This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

man3

1 - Linux cli command seed48_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command seed48_r and provides detailed information about the command seed48_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the seed48_r.

NAME 🖥️ seed48_r 🖥️

generate uniformly distributed pseudo-random numbers reentrantly

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int drand48_r(struct drand48_data *restrict buffer,
 double *restrict result);
int erand48_r(unsigned short xsubi[3],
 struct drand48_data *restrict buffer,
 double *restrict result);
int lrand48_r(struct drand48_data *restrict buffer,
 long *restrict result);
int nrand48_r(unsigned short xsubi[3],
 struct drand48_data *restrict buffer,
 long *restrict result);
int mrand48_r(struct drand48_data *restrict buffer,
 long *restrict result);
int jrand48_r(unsigned short xsubi[3],
 struct drand48_data *restrict buffer,
 long *restrict result);
int srand48_r(long int seedval, struct drand48_data *buffer);
int seed48_r(unsigned short seed16v[3], struct drand48_data *buffer);
int lcong48_r(unsigned short param[7], struct drand48_data *buffer);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

These functions are the reentrant analogs of the functions described in drand48(3). Instead of modifying the global random generator state, they use the supplied data buffer.

Before the first use, this struct must be initialized, for example, by filling it with zeros, or by calling one of the functions srand48_r(), seed48_r(), or lcong48_r().

RETURN VALUE

The return value is 0.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

drand48_r(), erand48_r(), lrand48_r(), nrand48_r(), mrand48_r(), jrand48_r(), srand48_r(), seed48_r(), lcong48_r()

Thread safetyMT-Safe race:buffer

STANDARDS

GNU.

SEE ALSO

drand48(3), rand(3), random(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2 - Linux cli command XShapeGetRectangles

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XShapeGetRectangles and provides detailed information about the command XShapeGetRectangles, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XShapeGetRectangles.

NAME 🖥️ XShapeGetRectangles 🖥️

X nonrectangular shape functions

SYNTAX

#include <X11/extensions/shape.h>
Bool XShapeQueryExtension (
	Display *dpy,
	int *event_basep,
	int *error_basep);
Status XShapeQueryVersion (
	Display *dpy,
	int *major_versionp,
	int *minor_versionp);
void XShapeCombineRegion (
	Display *dpy,
	Window dest,
	int destKind,
	int xOff,
	int yOff,
	struct _XRegion *r,
	int op);
void XShapeCombineRectangles (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	XRectangle *rects,
	int n_rects,
	int op,
	int ordering);
void XShapeCombineMask (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	Pixmap src,
	int op);
void XShapeCombineShape (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	Pixmap src,
	int srcKind,
	int op);
void XShapeOffsetShape (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff);
Status XShapeQueryExtents (
	Display *dpy,
	Window window,
	int *bShaped,
	int *xbs,
	int *ybs,
	unsigned int *wbs,
	unsigned int *hbs,
	int *cShaped,
	int *xcs,
	int *ycs,
	unsigned int *wcs,
	unsigned int *hcs);
void XShapeSelectInput (
	Display *dpy,
	Window window,
	unsigned longmask);
unsigned long XShapeInputSelected (
	Display *dpy,
	Window window);
XRectangle *XShapeGetRectangles (
	Display *dpy,
	Window window,
	int kind,
	int *count,
	int *ordering);

STRUCTURES

typedef struct {
    int type;	/* of event */
    unsigned long serial;	/* # of last request processed by server */
    Bool send_event;	/* true if this came from a SendEvent request */
    Display *display;	/* Display the event was read from */
    Window window;	/* window of event */
    int kind;	/* ShapeBounding or ShapeClip */
    int x, y;	/* extents of new region */
    unsigned width, height;
    Time time;	/* server timestamp when region changed */
    Bool shaped;	/* true if the region exists */
} XShapeEvent;

DESCRIPTION

The X11 Nonrectangular Window Shape Extension adds nonrectangular windows to the X Window System.

PREDEFINED VALUES

Operations:

 ShapeSet   ShapeUnion   ShapeIntersect   ShapeSubtract   ShapeInvert 

Shape Kinds:

 ShapeBounding   ShapeClip 

Event defines:

 ShapeNotifyMask   ShapeNotify 

BUGS

This manual page needs a lot more work.

SEE ALSO

X11 Nonrectangular Window Shape Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

3 - Linux cli command Moose_Cookbook_Legacy_Table_ClassMetaclasspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Legacy_Table_ClassMetaclasspm and provides detailed information about the command Moose_Cookbook_Legacy_Table_ClassMetaclasspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Legacy_Table_ClassMetaclasspm.

NAME 🖥️ Moose_Cookbook_Legacy_Table_ClassMetaclasspm 🖥️

Adding a “table” attribute to the metaclass

VERSION

version 2.2207

SYNOPSIS

package MyApp::Meta::Class; use Moose; extends Moose::Meta::Class; has table => ( is => rw, isa => Str, );

DESCRIPTION

WARNING: Subclassing metaclasses (as opposed to providing metaclass traits) is strongly discouraged. This recipe is provided solely for reference when encountering older code that does this.

In this recipe, we’ll create a new metaclass which has a “table” attribute. This metaclass is for classes associated with a DBMS table, as one might do for an ORM.

In this example, the table name is just a string, but in a real ORM the table might be an object describing the table.

THE METACLASS

This really is as simple as the recipe “SYNOPSIS” shows. The trick is getting your classes to use this metaclass, and providing some sort of sugar for declaring the table. This is covered in Moose::Cookbook::Extending::Recipe2, which shows how to make a module like Moose.pm itself, with sugar like has_table().

Using this Metaclass in Practice

Accessing this new table attribute is quite simple. Given a class named MyApp::User, we could simply write the following:

my $table = MyApp::User->meta->table;

As long as MyApp::User has arranged to use MyApp::Meta::Class as its metaclass, this method call just works. If we want to be more careful, we can check the metaclass’s class:

$table = MyApp::User->meta->table if MyApp::User->meta->isa(MyApp::Meta::Class);

CONCLUSION

Creating custom metaclass is trivial. Using it is a little harder, and is covered in other recipes. We will also talk about applying traits to a class metaclass, which is a more flexible and cooperative implementation.

SEE ALSO

Moose::Cookbook::Meta::Recipe5 - The “table” attribute implemented as a metaclass trait

Moose::Cookbook::Extending::Recipe2 - Acting like Moose.pm and providing sugar Moose-style

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

4 - Linux cli command SIMPLEQ_ENTRY

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SIMPLEQ_ENTRY and provides detailed information about the command SIMPLEQ_ENTRY, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SIMPLEQ_ENTRY.

NAME 🖥️ SIMPLEQ_ENTRY 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

5 - Linux cli command wctype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wctype and provides detailed information about the command wctype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wctype.

NAME 🖥️ wctype 🖥️

wide-character classification

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wctype.h>
wctype_t wctype(const char *name);

DESCRIPTION

The wctype_t type represents a property which a wide character may or may not have. In other words, it represents a class of wide characters. This type’s nature is implementation-dependent, but the special value (wctype_t) 0 denotes an invalid property. Nonzero wctype_t values can be passed to the iswctype(3) function to actually test whether a given wide character has the property.

The wctype() function returns a property, given by its name. The set of valid names depends on the LC_CTYPE category of the current locale, but the following names are valid in all locales.

    "alnum" - realizes the isalnum(3) classification function
    "alpha" - realizes the isalpha(3) classification function
    "blank" - realizes the isblank(3) classification function
    "cntrl" - realizes the iscntrl(3) classification function
    "digit" - realizes the isdigit(3) classification function
    "graph" - realizes the isgraph(3) classification function
    "lower" - realizes the islower(3) classification function
    "print" - realizes the isprint(3) classification function
    "punct" - realizes the ispunct(3) classification function
    "space" - realizes the isspace(3) classification function
    "upper" - realizes the isupper(3) classification function
    "xdigit" - realizes the isxdigit(3) classification function

RETURN VALUE

The wctype() function returns a property descriptor if the name is valid. Otherwise, it returns (wctype_t) 0.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wctype()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of wctype() depends on the LC_CTYPE category of the current locale.

SEE ALSO

iswctype(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

6 - Linux cli command lgamma

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lgamma and provides detailed information about the command lgamma, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lgamma.

NAME 🖥️ lgamma 🖥️

log gamma function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double lgamma(double x);
float lgammaf(float x);
long double lgammal(long double x);
double lgamma_r(double x, int *signp);
float lgammaf_r(float x, int *signp);
long double lgammal_r(long double x, int *signp);
extern int signgam;

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

lgamma():
    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

lgammaf(), lgammal():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

lgamma_r(), lgammaf_r(), lgammal_r():

    /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

signgam:

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

For the definition of the Gamma function, see tgamma(3).

The lgamma(), lgammaf(), and lgammal() functions return the natural logarithm of the absolute value of the Gamma function. The sign of the Gamma function is returned in the external integer signgam declared in <math.h>. It is 1 when the Gamma function is positive or zero, -1 when it is negative.

Since using a constant location signgam is not thread-safe, the functions lgamma_r(), lgammaf_r(), and lgammal_r() have been introduced; they return the sign via the argument signp.

RETURN VALUE

On success, these functions return the natural logarithm of Gamma(x).

If x is a NaN, a NaN is returned.

If x is 1 or 2, +0 is returned.

If x is positive infinity or negative infinity, positive infinity is returned.

If x is a nonpositive integer, a pole error occurs, and the functions return +HUGE_VAL, +HUGE_VALF, or +HUGE_VALL, respectively.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the correct mathematical sign.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Pole error: x is a nonpositive integer
errno is set to ERANGE (but see BUGS). A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised.

Range error: result overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

STANDARDS

lgamma()
lgammaf()
lgammal()
C11, POSIX.1-2008.

signgam
POSIX.1-2008.

lgamma_r()
lgammaf_r()
lgammal_r()
None.

HISTORY

lgamma()
lgammaf()
lgammal()
C99, POSIX.1-2001.

signgam
POSIX.1-2001.

lgamma_r()
lgammaf_r()
lgammal_r()
None.

BUGS

In glibc 2.9 and earlier, when a pole error occurs, errno is set to EDOM; instead of the POSIX-mandated ERANGE. Since glibc 2.10, glibc does the right thing.

SEE ALSO

tgamma(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

7 - Linux cli command malloc_hook

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command malloc_hook and provides detailed information about the command malloc_hook, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the malloc_hook.

NAME 🖥️ malloc_hook 🖥️

malloc debugging variables (DEPRECATED)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <malloc.h>
void *(*volatile __malloc_hook)(size_t size, const void *caller);
void *(*volatile __realloc_hook)(void *ptr, size_t size,
 const void *caller);
void *(*volatile __memalign_hook)(size_t alignment, size_t size,
 const void *caller);
void (*volatile __free_hook)(void *ptr, const void *caller);
void (*__malloc_initialize_hook)(void);
void (*volatile __after_morecore_hook)(void);

DESCRIPTION

The GNU C library lets you modify the behavior of malloc(3), realloc(3), and free(3) by specifying appropriate hook functions. You can use these hooks to help you debug programs that use dynamic memory allocation, for example.

The variable __malloc_initialize_hook points at a function that is called once when the malloc implementation is initialized. This is a weak variable, so it can be overridden in the application with a definition like the following:

void (*__malloc_initialize_hook)(void) = my_init_hook;

Now the function my_init_hook() can do the initialization of all hooks.

The four functions pointed to by __malloc_hook, __realloc_hook, __memalign_hook, __free_hook have a prototype like the functions malloc(3), realloc(3), memalign(3), free(3), respectively, except that they have a final argument caller that gives the address of the caller of malloc(3), etc.

The variable __after_morecore_hook points at a function that is called each time after sbrk(2) was asked for more memory.

STANDARDS

GNU.

NOTES

The use of these hook functions is not safe in multithreaded programs, and they are now deprecated. From glibc 2.24 onwards, the __malloc_initialize_hook variable has been removed from the API, and from glibc 2.34 onwards, all the hook variables have been removed from the API. Programmers should instead preempt calls to the relevant functions by defining and exporting malloc(), free(), realloc(), and calloc().

EXAMPLES

Here is a short example of how to use these variables.

#include <stdio.h>
#include <malloc.h>
/* Prototypes for our hooks */
static void my_init_hook(void);
static void *my_malloc_hook(size_t, const void *);
/* Variables to save original hooks */
static void *(*old_malloc_hook)(size_t, const void *);
/* Override initializing hook from the C library */
void (*__malloc_initialize_hook)(void) = my_init_hook;
static void
my_init_hook(void)
{
    old_malloc_hook = __malloc_hook;
    __malloc_hook = my_malloc_hook;
}
static void *
my_malloc_hook(size_t size, const void *caller)
{
    void *result;
    /* Restore all old hooks */
    __malloc_hook = old_malloc_hook;
    /* Call recursively */
    result = malloc(size);
    /* Save underlying hooks */
    old_malloc_hook = __malloc_hook;
    /* printf() might call malloc(), so protect it too */
    printf("malloc(%zu) called from %p returns %p

“, size, caller, result); /* Restore our own hooks */ __malloc_hook = my_malloc_hook; return result; }

SEE ALSO

mallinfo(3), malloc(3), mcheck(3), mtrace(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

8 - Linux cli command XtSessionGetToken

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtSessionGetToken and provides detailed information about the command XtSessionGetToken, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtSessionGetToken.

NAME 🖥️ XtSessionGetToken 🖥️

token management for checkpointing

SYNTAX

#include <X11/Intrinsic.h>

XtCheckpointToken XtSessionGetToken(Widget w);

void XtSessionReturnToken(XtCheckpointToken token);

ARGUMENTS

  1. Specifies the session widget.

token
Specifies the token to be returned.

DESCRIPTION

The XtSessionGetToken function will return NULL if the checkpoint operation instigated by the session manager is not currently under way.

To indicate the completion of a deferred save operation and to return the checkpoint token use XtSessionReturnToken.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

9 - Linux cli command zip_source_function_create

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_function_create and provides detailed information about the command zip_source_function_create, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_function_create.

libzip (-lzip)

The functions

and

creates a zip source from the user-provided function

which must be of the following type:

or

are used for reporting errors and can be

When called by the library, the first argument is the

argument supplied to the function. The next two arguments are a buffer

of size

when data is passed in or expected to be returned, or else

and 0. The last argument,

specifies which action the function should perform.

Depending on the uses, there are three useful sets of commands to be supported by a

Providing streamed data (for file data added to archives). Must support

and

Same as previous, but from a source allowing reading from arbitrary offsets (also for read-only zip archive). Must additionally support

and

Same as previous, but additionally allowing writing (also for writable zip archives). Must additionally support

and

Return 1 if an empty source should be accepted as a valid zip archive. This is the default if this command is not supported by a source. File system backed sources should return 0.

Prepare the source for writing. Use this to create any temporary file(s).

Prepare the source for writing, keeping the first

bytes of the original file. Only implement this command if it is more efficient than copying the data, and if it does not destructively overwrite the original file (you still have to be able to execute

The next write should happen at byte

Reading is done.

Finish writing to the source. Replace the original data with the newly written data. Clean up temporary files or internal buffers. Subsequently opening and reading from the source should return the newly written data.

Get error information.

points to an array of two ints, which should be filled with the libzip error code and the corresponding system error code for the error that occurred. See

for details on the error codes. If the source stores error information in a zip_error_t, use

and return its return value. Otherwise, return 2 * sizeof(int).

Clean up and free all resources, including

The callback function will not be called again.

Provide information about various data. Then the data should be put in the appropriate entry in the passed

argument, and the appropriate

value must be or’ed into the

member to denote that the corresponding data has been provided. A

structure can be initialized using

If a file is a plaintext file in ASCII. Can be used by extraction tools to automatically convert line endings (part of the interal file attributes). Member

flag

The general purpose bit flag in the zip in the local and central directory headers contain information about the compression method. Member

and

to denote which members have been set; flag

The external file attributes (usually operating system-specific). Member

flag

A minimum version needed required to unpack this entry (in the usual “major * 10 + minor” format). Member

flag

One of the operating systems as defined by the

variables (see

This value affects the interpretation of the external file attributes. Member

flag

Prepare for reading.

Read data into the buffer

of size

Return the number of bytes placed into

on success, and zero for end-of-file.

Remove the underlying file. This is called if a zip archive is empty when closed.

Abort writing to the source. Discard written data. Clean up temporary files or internal buffers. Subsequently opening and reading from the source should return the original data.

Specify position to read next byte from, like

Use

to decode the arguments into the following struct:

struct zip_source_args_seek { zip_int64_t offset; int whence; };

If the size of the source’s data is known, use

to validate the arguments and compute the new offset.

Specify position to write next byte to, like

See

for details.

Get meta information for the input data.

points to an allocated

which should be initialized using

and then filled in.

For uncompressed, unencrypted data, all information is optional. However, fill in as much information as is readily available.

If the data is compressed,

and

must be filled in.

If the data is encrypted,

and

must be filled in.

Information only available after the source has been read (e.g., size) can be omitted in an earlier call.

may be called with this argument even after being called with

Return sizeof(struct zip_stat) on success.

Return bitmap specifying which commands are supported. Use

If this command is not implemented, the source is assumed to be a read source without seek support.

Return the current read offset in the source, like

Return the current write offset in the source, like

Write data to the source. Return number of bytes written.

Commands should return -1 on error.

will be called to retrieve the error code. On success, commands return 0, unless specified otherwise in the description above.

The library will always issue

before issuing

or

When it no longer wishes to read from this source, it will issue

If the library wishes to read the data again, it will issue

a second time. If the function is unable to provide the data again, it should return -1.

or

will be called before

or

When writing is complete, either

or

will be called.

and

can be issued at any time.

will only be issued in response to the function returning -1.

will be the last command issued; if

was called and succeeded,

will be called before

and similarly for

or

and

or

Upon successful completion, the created source is returned. Otherwise,

is returned and the error code in

or

is set to indicate the error (unless it is

fails if:

Required memory could not be allocated.

and

were added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

10 - Linux cli command HTTP_Configpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTTP_Configpm and provides detailed information about the command HTTP_Configpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTTP_Configpm.

NAME 🖥️ HTTP_Configpm 🖥️

Configuration for request and response objects

VERSION

version 6.46

SYNOPSIS

use HTTP::Config; my $c = HTTP::Config->new; $c->add(m_domain => “.example.com”, m_scheme => “http”, verbose => 1); use HTTP::Request; my $request = HTTP::Request->new(GET => “http://www.example.com”); if (my @m = $c->matching($request)) { print “Yadayada " if $m[0]->{verbose}; }

DESCRIPTION

An HTTP::Config object is a list of entries that can be matched against request or request/response pairs. Its purpose is to hold configuration data that can be looked up given a request or response object.

Each configuration entry is a hash. Some keys specify matching to occur against attributes of request/response objects. Other keys can be used to hold user data.

The following methods are provided:

$conf = HTTP::Config->new
Constructs a new empty HTTP::Config object and returns it.

$conf->entries
Returns the list of entries in the configuration object. In scalar context returns the number of entries.

$conf->empty
Return true if there are no entries in the configuration object. This is just a shorthand for not $conf->entries.

$conf->add( %matchspec, %other )

$conf->add( \entry )

Adds a new entry to the configuration. You can either pass separate key/value pairs or a hash reference.

$conf->remove( %spec )
Removes (and returns) the entries that have matches for all the key/value pairs in %spec. If %spec is empty this will match all entries; so it will empty the configuration object.

$conf->matching( $uri, $request, $response )

$conf->matching( $uri )

$conf->matching( $request )

$conf->matching( $response )

Returns the entries that match the given $uri, $request and $response triplet. If called with a single $request object then the $uri is obtained by calling its ‘uri_canonical’ method. If called with a single $response object, then the request object is obtained by calling its ‘request’ method; and then the $uri is obtained as if a single $request was provided. The entries are returned with the most specific matches first. In scalar context returns the most specific match or undef in none match.

$conf->add_item( $item, %matchspec )

$conf->remove_items( %spec )

$conf->matching_items( $uri, $request, $response )

Wrappers that hides the entries themselves.

Matching

The following keys on a configuration entry specify matching. For all of these you can provide an array of values instead of a single value. The entry matches if at least one of the values in the array matches.

Entries that require match against a response object attribute will never match unless a response object was provided.

m_scheme => $scheme
Matches if the URI uses the specified scheme; e.g. “http”.

m_secure => $bool
If $bool is TRUE; matches if the URI uses a secure scheme. If $bool is FALSE; matches if the URI does not use a secure scheme. An example of a secure scheme is “https”.

m_host_port => “$hostname:$port”
Matches if the URI’s host_port method return the specified value.

m_host => $hostname
Matches if the URI’s host method returns the specified value.

m_port => $port
Matches if the URI’s port method returns the specified value.

m_domain => “.$domain”
Matches if the URI’s host method return a value that within the given domain. The hostname “www.example.com” will for instance match the domain “.com”.

m_path => $path
Matches if the URI’s path method returns the specified value.

m_path_prefix => $path
Matches if the URI’s path is the specified path or has the specified path as prefix.

m_path_match => $Regexp
Matches if the regular expression matches the URI’s path. Eg. qr/\html$/.

m_method => $method
Matches if the request method matches the specified value. Eg. “GET” or “POST”.

m_code => $digit

m_code => $status_code

Matches if the response status code matches. If a single digit is specified; matches for all response status codes beginning with that digit.

m_proxy => $url
Matches if the request is to be sent to the given Proxy server.

m_media_type => “*/*”

m_media_type => “text/*”

m_media_type => “html”

m_media_type => “xhtml”

m_media_type => “text/html”

Matches if the response media type matches. With a value of “html” matches if $response->content_is_html returns TRUE. With a value of “xhtml” matches if $response->content_is_xhtml returns TRUE.

m_uri_ _$method => undef
Matches if the URI object provides the method.

m_uri_ _$method => $string
Matches if the URI’s $method method returns the given value.

m_header_ _$field => $string
Matches if either the request or the response have a header $field with the given value.

m_response_attr_ _$key => undef

m_response_attr_ _$key => $string

Matches if the response object has that key, or the entry has the given value.

SEE ALSO

URI, HTTP::Request, HTTP::Response

AUTHOR

Gisle Aas <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 1994 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

11 - Linux cli command isprint_l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isprint_l and provides detailed information about the command isprint_l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isprint_l.

NAME 🖥️ isprint_l 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

12 - Linux cli command Net_DNS_RR_CNAMEpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_CNAMEpm and provides detailed information about the command Net_DNS_RR_CNAMEpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_CNAMEpm.

NAME 🖥️ Net_DNS_RR_CNAMEpm 🖥️

DNS CNAME resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name CNAME cname); $rr = Net::DNS::RR->new( name => alias.example.com, type => CNAME, cname => example.com, );

DESCRIPTION

Class for DNS Canonical Name (CNAME) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

cname

$cname = $rr->cname; $rr->cname( $cname );

A domain name which specifies the canonical or primary name for the owner. The owner name is an alias.

COPYRIGHT

Copyright (c)1997 Michael Fuhr.

Portions Copyright (c)2002-2003 Chris Reinhardt.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC1035(3.3.1) <https://iana.org/go/rfc1035#section-3.3.1>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

13 - Linux cli command XML_DOM_Parserpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_DOM_Parserpm and provides detailed information about the command XML_DOM_Parserpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_DOM_Parserpm.

NAME 🖥️ XML_DOM_Parserpm 🖥️

An XML::Parser that builds XML::DOM document structures

SYNOPSIS

use XML::DOM; my $parser = new XML::DOM::Parser; my $doc = $parser->parsefile (“file.xml”); $doc->dispose; # Avoid memory leaks - cleanup circular references

DESCRIPTION

XML::DOM::Parser extends XML::Parser

The XML::Parser module was written by Clark Cooper and is built on top of XML::Parser::Expat, which is a lower level interface to James Clark’s expat library.

XML::DOM::Parser parses XML strings or files and builds a data structure that conforms to the API of the Document Object Model as described at <http://www.w3.org/TR/REC-DOM-Level-1>. See the XML::Parser manpage for other additional properties of the XML::DOM::Parser class. Note that the ‘Style’ property should not be used (it is set internally.)

The XML::Parser NoExpand option is more or less supported, in that it will generate EntityReference objects whenever an entity reference is encountered in character data. I’m not sure how useful this is. Any comments are welcome.

As described in the synopsis, when you create an XML::DOM::Parser object, the parse and parsefile methods create an XML::DOM::Document object from the specified input. This Document object can then be examined, modified and written back out to a file or converted to a string.

When using XML::DOM with XML::Parser version 2.19 and up, setting the XML::DOM::Parser option KeepCDATA to 1 will store CDATASections in CDATASection nodes, instead of converting them to Text nodes. Subsequent CDATASection nodes will be merged into one. Let me know if this is a problem.

Using LWP to parse URLs

The parsefile() method now also supports URLs, e.g. http://www.erols.com/enno/xsa.xml. It uses LWP to download the file and then calls parse() on the resulting string. By default it will use a LWP::UserAgent that is created as follows:

use LWP::UserAgent; $LWP_USER_AGENT = LWP::UserAgent->new; $LWP_USER_AGENT->env_proxy;

Note that env_proxy reads proxy settings from environment variables, which is what I need to do to get thru our firewall. If you want to use a different LWP::UserAgent, you can either set it globally with:

XML::DOM::Parser::set_LWP_UserAgent ($my_agent);

or, you can specify it for a specific XML::DOM::Parser by passing it to the constructor:

my $parser = new XML::DOM::Parser (LWP_UserAgent => $my_agent);

Currently, LWP is used when the filename (passed to parsefile) starts with one of the following URL schemes: http, https, ftp, wais, gopher, or file (followed by a colon.) If I missed one, please let me know.

The LWP modules are part of libwww-perl which is available at CPAN.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

14 - Linux cli command Sub_Quotepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Sub_Quotepm and provides detailed information about the command Sub_Quotepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Sub_Quotepm.

NAME 🖥️ Sub_Quotepm 🖥️

Efficient generation of subroutines via string eval

SYNOPSIS

package Silly; use Sub::Quote qw(quote_sub unquote_sub quoted_from_sub); quote_sub Silly::kitty, q{ print “meow” }; quote_sub Silly::doggy, q{ print “woof” }; my $sound = 0; quote_sub Silly::dagron, q{ print ++$sound % 2 ? burninate : roar }, { $sound => \sound };

And elsewhere:

Silly->kitty; # meow Silly->doggy; # woof Silly->dagron; # burninate Silly->dagron; # roar Silly->dagron; # burninate

DESCRIPTION

This package provides performant ways to generate subroutines from strings.

SUBROUTINES

quote_sub

my $coderef = quote_sub Foo::bar, q{ print $x++ . " " }, { $x => � };

Arguments: ?$name, $code, ?\captures, ?\options

$name is the subroutine where the coderef will be installed.

$code is a string that will be turned into code.

\%captures is a hashref of variables that will be made available to the code. The keys should be the full name of the variable to be made available, including the sigil. The values should be references to the values. The variables will contain copies of the values. See the SYNOPSIS’s Silly::dagron for an example using captures.

Exported by default.

options

“no_install”
Boolean. Set this option to not install the generated coderef into the passed subroutine name on undefer.

“no_defer”
Boolean. Prevents a Sub::Defer wrapper from being generated for the quoted sub. If the sub will most likely be called at some point, setting this is a good idea. For a sub that will most likely be inlined, it is not recommended.

“package”
The package that the quoted sub will be evaluated in. If not specified, the package from sub calling quote_sub will be used.

“hints”
The value of $^H to use for the code being evaluated. This captures the settings of the strict pragma. If not specified, the value from the calling code will be used.

“warning_bits”
The value of ${^WARNING_BITS} to use for the code being evaluated. This captures the warnings set. If not specified, the warnings from the calling code will be used.

“%^H”
The value of %^H to use for the code being evaluated. This captures additional pragma settings. If not specified, the value from the calling code will be used if possible (on perl 5.10+).

“attributes”
The Subroutine Attributes in perlsub to apply to the sub generated. Should be specified as an array reference. The attributes will be applied to both the generated sub and the deferred wrapper, if one is used.

“file”
The apparent filename to use for the code being evaluated.

“line”
The apparent line number to use for the code being evaluated.

unquote_sub

my $coderef = unquote_sub $sub;

Forcibly replace subroutine with actual code.

If $sub is not a quoted sub, this is a no-op.

Exported by default.

quoted_from_sub

my $data = quoted_from_sub $sub; my ($name, $code, $captures, $compiled_sub) = @$data;

Returns original arguments to quote_sub, plus the compiled version if this sub has already been unquoted.

Note that $sub can be either the original quoted version or the compiled version for convenience.

Exported by default.

inlinify

my $prelude = capture_unroll $captures, { $x => 1, $y => 2, }, 4; my $inlined_code = inlinify q{ my ($x, $y) = @_; print $x + $y . " “; }, $x, $y, $prelude;

Takes a string of code, a string of arguments, a string of code which acts as a prelude, and a Boolean representing whether or not to localize the arguments.

quotify

my $quoted_value = quotify $value;

Quotes a single (non-reference) scalar value for use in a code string. The result should reproduce the original value, including strings, undef, integers, and floating point numbers. The resulting floating point numbers (including infinites and not a number) should be precisely equal to the original, if possible. The exact format of the resulting number should not be relied on, as it may include hex floats or math expressions.

capture_unroll

my $prelude = capture_unroll $captures, { $x => 1, $y => 2, }, 4;

Arguments: $from, \captures, $indent

Generates a snippet of code which is suitable to be used as a prelude for inlinify. $from is a string will be used as a hashref in the resulting code. The keys of %captures are the names of the variables and the values are ignored. $indent is the number of spaces to indent the result by.

qsub

my $hash = { coderef => qsub q{ print “hello”; }, other => 5, };

Arguments: $code

Works exactly like quote_sub, but includes a prototype to only accept a single parameter. This makes it easier to include in hash structures or lists.

Exported by default.

sanitize_identifier

my $var_name = $variable_for_ . sanitize_identifier(@name); quote_sub qq{ print ${var_name} }, { $var_name => \value };

Arguments: $identifier

Sanitizes a value so that it can be used in an identifier.

ENVIRONMENT

SUB_QUOTE_DEBUG

Causes code to be output to STDERR before being evaled. Several forms are supported:

  1. All subs will be output.

“/foo/”
Subs will be output if their code matches the given regular expression.

“simple_identifier”
Any sub with the given name will be output.

“Full::identifier”
A sub matching the full name will be output.

“Package::Name::”
Any sub in the given package (including anonymous subs) will be output.

CAVEATS

Much of this is just string-based code-generation, and as a result, a few caveats apply.

return

Calling return from a quote_sub’ed sub will not likely do what you intend. Instead of returning from the code you defined in quote_sub, it will return from the overall function it is composited into.

So when you pass in:

quote_sub q{ return 1 if $condition; $morecode }

It might turn up in the intended context as follows:

sub foo { <important code a> do { return 1 if $condition; $morecode }; <important code b> }

Which will obviously return from foo, when all you meant to do was return from the code context in quote_sub and proceed with running important code b.

pragmas

Sub::Quote preserves the environment of the code creating the quoted subs. This includes the package, strict, warnings, and any other lexical pragmas. This is done by prefixing the code with a block that sets up a matching environment. When inlining Sub::Quote subs, care should be taken that user pragmas won’t effect the rest of the code.

SUPPORT

Users’ IRC: #moose on irc.perl.org

Development and contribution IRC: #web-simple on irc.perl.org

Bugtracker: <https://rt.cpan.org/Public/Dist/Display.html?Name=Sub-Quote>

Git repository: <git://github.com/moose/Sub-Quote.git>

Git browser: <https://github.com/moose/Sub-Quote>

AUTHOR

mst - Matt S. Trout (cpan:MSTROUT) <[email protected]>

CONTRIBUTORS

frew - Arthur Axel fREW Schmidt (cpan:FREW) <[email protected]>

ribasushi - Peter Rabbitson (cpan:RIBASUSHI) <[email protected]>

Mithaldu - Christian Walde (cpan:MITHALDU) <[email protected]>

tobyink - Toby Inkster (cpan:TOBYINK) <[email protected]>

haarg - Graham Knop (cpan:HAARG) <[email protected]>

bluefeet - Aran Deltac (cpan:BLUEFEET) <[email protected]>

ether - Karen Etheridge (cpan:ETHER) <[email protected]>

dolmen - Olivier Mengué (cpan:DOLMEN) <[email protected]>

alexbio - Alessandro Ghedini (cpan:ALEXBIO) <[email protected]>

getty - Torsten Raudssus (cpan:GETTY) <[email protected]>

arcanez - Justin Hunter (cpan:ARCANEZ) <[email protected]>

kanashiro - Lucas Kanashiro (cpan:KANASHIRO) <[email protected]>

djerius - Diab Jerius (cpan:DJERIUS) <[email protected]>

COPYRIGHT

Copyright (c) 2010-2016 the Sub::Quote AUTHOR and CONTRIBUTORS as listed above.

LICENSE

This library is free software and may be distributed under the same terms as perl itself. See <http://dev.perl.org/licenses/>.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

15 - Linux cli command wcswidth

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcswidth and provides detailed information about the command wcswidth, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcswidth.

NAME 🖥️ wcswidth 🖥️

determine columns needed for a fixed-size wide-character string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _XOPEN_SOURCE /* See feature_test_macros(7) */
#include <wchar.h>
int wcswidth(const wchar_t *s, size_t n);

DESCRIPTION

The wcswidth() function returns the number of columns needed to represent the wide-character string pointed to by s, but at most n wide characters. If a nonprintable wide character occurs among these characters, -1 is returned.

RETURN VALUE

The wcswidth() function returns the number of column positions for the wide-character string s, truncated to at most length n.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcswidth()

Thread safetyMT-Safe locale

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

The behavior of wcswidth() depends on the LC_CTYPE category of the current locale.

SEE ALSO

iswprint(3), wcwidth(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

16 - Linux cli command XtMakeResizeRequest

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtMakeResizeRequest and provides detailed information about the command XtMakeResizeRequest, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtMakeResizeRequest.

NAME 🖥️ XtMakeResizeRequest 🖥️

make geometry manager request

SYNTAX

#include <X11/Intrinsic.h>

XtGeometryResult XtMakeGeometryRequest(Widget w, XtWidgetGeometry *request, XtWidgetGeometry *reply_return);

XtGeometryResult XtMakeResizeRequest(Widget w, Dimension width, Dimension height, Dimension *width_return, Dimension *height_return);

ARGUMENTS

reply_return
Returns the allowed widget size or may be NULL if the requesting widget is not interested in handling XtGeometryAlmost.

request
Specifies the desired widget geometry (size, position, border width, and stacking order).

  1. Specifies the widget that is making the request.

width_return

height_return
Return the allowed widget width and height.

DESCRIPTION

Depending on the condition, XtMakeGeometryRequest performs the following:

  • If the widget is unmanaged or the widget’s parent is not realized, it makes the changes and returns XtGeometryYes.

  • If the parent is not a subclass of compositeWidgetClass or the parent’s geometry_manager is NULL, it issues an error.

  • If the widget’s being_destroyed field is True, it returns XtGeometryNo.

  • If the widget x, y, width, height and border_width fields are all equal to the requested values, it returns XtGeometryYes; otherwise, it calls the parent’s geometry_manager procedure with the given parameters.

  • If the parent’s geometry manager returns XtGeometryYes and if XtCWQueryOnly is not set in the request_mode and if the widget is realized, XtMakeGeometryRequest calls the XConfigureWindow Xlib function to reconfigure the widget’s window (set its size, location, and stacking order as appropriate).

  • If the geometry manager returns XtGeometryDone, the change has been approved and actually has been done. In this case, XtMakeGeometryRequest does no configuring and returns XtGeometryYes. XtMakeGeometryRequest never returns XtGeometryDone.

Otherwise, XtMakeGeometryRequest returns the resulting value from the parent’s geometry manager.

Children of primitive widgets are always unmanaged; thus, XtMakeGeometryRequest always returns XtGeometryYes when called by a child of a primitive widget.

The XtMakeResizeRequest function, a simple interface to XtMakeGeometryRequest, creates a XtWidgetGeometry structure and specifies that width and height should change. The geometry manager is free to modify any of the other window attributes (position or stacking order) to satisfy the resize request. If the return value is XtGeometryAlmost, width_return and height_return contain a compromise width and height. If these are acceptable, the widget should immediately make an XtMakeResizeRequest and request that the compromise width and height be applied. If the widget is not interested in XtGeometryAlmost replies, it can pass NULL for width_return and height_return.

SEE ALSO

XtConfigureWidget(3), XtQueryGeometery(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

17 - Linux cli command Image_ExifTool_OOXMLpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_OOXMLpm and provides detailed information about the command Image_ExifTool_OOXMLpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_OOXMLpm.

NAME 🖥️ Image_ExifTool_OOXMLpm 🖥️

Read Office Open XML+ZIP files

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to extract meta information from Office Open XML files. This is the format of Word, Excel and PowerPoint files written by Microsoft Office 2007 – essentially ZIP archives of XML files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

“OOXML Tags” in Image::ExifTool::TagNames, “FlashPix Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

18 - Linux cli command procps_misc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command procps_misc and provides detailed information about the command procps_misc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the procps_misc.

NAME 🖥️ procps_misc 🖥️

API for miscellaneous information in the /proc filesystem

SYNOPSIS

#include <libproc2/misc.h>

Platform Particulars

long procps_cpu_count"(void);
long procps_hertz_get"(void);
unsigned int procps_pid_length"(void);
int procps_linux_version"(void);

Runtime Particulars

int procps_loadavg (double *av1, double *av5, double *av15);
int procps_uptime (double *uptime_secs, double *idle_secs);
char *procps_uptime_sprint (void);
char *procps_uptime_sprint_short (void);

Namespace Particulars

int procps_ns_get_id (const char *name);
const char *procps_ns_get_name (int id);
int procps_ns_read_pid (int pid, struct procps_ns *nsp);

Link with -lproc2.

DESCRIPTION

procps_cpu_count() returns the number of CPUs that are currently online as sysconf(_SC_NPROCESSORS_ONLY**)** or an assumed 1.

procps_hertz_get() returns the number of clock ticks per second as sysconf(_SC_CLK_TCK**)** or an assumed 100. Dividing tics by this value yields seconds.

procps_pid_length() returns the maximum string length for a PID on the system. For example, if the largest possible PID value on was 123, then the length would be 3. If the file /proc/sys/kernel/pid_max is unreadable, the value is assumed to be 5.

procps_linux_version() returns the current Linux version as an encoded integer. On non-Linux systems that have an emulated proc filesystem this function returns the version of the Linux emulation instead. The version consists of three positive integers representing the major, minor and patch levels. The following macros are provided for encoding a given Linux version or separating out the components of the current version.

LINUX_VERSION( major , minor , patch )

LINUX_VERSION_MAJOR( ver )

LINUX_VERSION_MINOR( ver )

LINUX_VERSION_PATCH( ver )

procps_loadavg() fetches the system load average and puts the 1, 5 and 15 minute averages into location(s) specified by any pointer which is not NULL.

procps_uptime() returns uptime and/or idle seconds into location(s) specified by any pointer which is not NULL. The sprint varieties return a human-readable string in one of two forms.

HH:MM:SS up HH:MM, # users, load average: 1, 5, 15 MM averages

up HH, MM

procps_ns_get_id() returns the integer id (enum namespace_type) of the namespace for the given namespace name.

procps_ns_get_name() returns the name of the namespace for the given id (enum namespace_type).

procps_ns_read_pid() returns the inodes for the namespaces of the given process in the procps_ns structure pointed to by nsp. Those inodes will appear in the order proscribed by enum namespace_type.

enum namespace_type { PROCPS_NS_CGROUP, PROCPS_NS_IPC, PROCPS_NS_MNT, PROCPS_NS_NET, PROCPS_NS_PID, PROCPS_NS_TIME, PROCPS_NS_USER, PROCPS_NS_UTS };

RETURN VALUE

Functions Returning an `int’ or `long'

An error will be indicated by a negative number that is always the inverse of some well known errno.h value.

Functions Returning an `address'

An error will be indicated by a NULL return pointer with the reason found in the formal errno value.

FILES

/proc/loadavg
The raw values for load average.

/proc/sys/kernel/osrelease
Contains the release version of the Linux kernel or proc filesystem.

/proc/sys/kernel/pid_max
Contains the value at which PIDs wrap around, one greater than the maximum PID value.

/proc/uptime
The raw values for uptime and idle time.

/proc/<PID>/ns
contains the set of namespaces for a particular PID.

SEE ALSO

procps(3), procps_pids(3), proc(5).

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

19 - Linux cli command getttyent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getttyent and provides detailed information about the command getttyent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getttyent.

NAME 🖥️ getttyent 🖥️

get ttys file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ttyent.h>
struct ttyent *getttyent(void);
struct ttyent *getttynam(const char *name);
int setttyent(void);
int endttyent(void);

DESCRIPTION

These functions provide an interface to the file _PATH_TTYS (e.g., /etc/ttys).

The function setttyent() opens the file or rewinds it if already open.

The function endttyent() closes the file.

The function getttynam() searches for a given terminal name in the file. It returns a pointer to a ttyent structure (description below).

The function getttyent() opens the file _PATH_TTYS (if necessary) and returns the first entry. If the file is already open, the next entry. The ttyent structure has the form:

struct ttyent {
    char *ty_name;     /* terminal device name */
    char *ty_getty;    /* command to execute, usually getty */
    char *ty_type;     /* terminal type for termcap */
    int   ty_status;   /* status flags */
    char *ty_window;   /* command to start up window manager */
    char *ty_comment;  /* comment field */
};

ty_status can be:

#define TTY_ON     0x01  /* enable logins (start ty_getty program) */
#define TTY_SECURE 0x02  /* allow UID 0 to login */

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getttyent(), setttyent(), endttyent(), getttynam()

Thread safetyMT-Unsafe race:ttyent

STANDARDS

BSD.

NOTES

Under Linux, the file /etc/ttys, and the functions described above, are not used.

SEE ALSO

ttyname(3), ttyslot(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

20 - Linux cli command scalbln

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command scalbln and provides detailed information about the command scalbln, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the scalbln.

NAME 🖥️ scalbln 🖥️

multiply floating-point number by integral power of radix

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double scalbln(double x, long exp);
float scalblnf(float x, long exp);
long double scalblnl(long double x, long exp);
double scalbn(double x, int exp);
float scalbnf(float x, int exp);
long double scalbnl(long double x, int exp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

scalbln(), scalblnf(), scalblnl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE

scalbn(), scalbnf(), scalbnl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions multiply their first argument x by FLT_RADIX (probably 2) to the power of exp, that is:

    x * FLT_RADIX ** exp

The definition of FLT_RADIX can be obtained by including <float.h>.

RETURN VALUE

On success, these functions return x * FLT_RADIX ** exp.

If x is a NaN, a NaN is returned.

If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.

If x is +0 (-0), +0 (-0) is returned.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with a sign the same as x.

If the result underflows, a range error occurs, and the functions return zero, with a sign the same as x.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error, overflow
An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error, underflow
errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

scalbn(), scalbnf(), scalbnl(), scalbln(), scalblnf(), scalblnl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

HISTORY

These functions differ from the obsolete functions described in scalb(3) in the type of their second argument. The functions described on this page have a second argument of an integral type, while those in scalb(3) have a second argument of type double.

NOTES

If FLT_RADIX equals 2 (which is usual), then scalbn() is equivalent to ldexp(3).

BUGS

Before glibc 2.20, these functions did not set errno for range errors.

SEE ALSO

ldexp(3), scalb(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

21 - Linux cli command XdbeBeginIdiom

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XdbeBeginIdiom and provides detailed information about the command XdbeBeginIdiom, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XdbeBeginIdiom.

NAME 🖥️ XdbeBeginIdiom 🖥️

marks the beginning of a DBE idiom sequence.

SYNOPSIS

#include <X11/extensions/Xdbe.h>

Status XdbeBeginIdiom( Display *dpy)

DESCRIPTION

This function marks the beginning of an idiom sequence.

SEE ALSO

DBE, XdbeAllocateBackBufferName(), XdbeDeallocateBackBufferName(), XdbeEndIdiom(), XdbeFreeVisualInfo(), XdbeGetBackBufferAttributes(), XdbeGetVisualInfo(), XdbeQueryExtension(), XdbeSwapBuffers().

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

22 - Linux cli command logbf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command logbf and provides detailed information about the command logbf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the logbf.

NAME 🖥️ logbf 🖥️

get exponent of a floating-point value

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double logb(double x);
float logbf(float x);
long double logbl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

logb():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

logbf(), logbl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions extract the exponent from the internal floating-point representation of x and return it as a floating-point value. The integer constant FLT_RADIX, defined in <float.h>, indicates the radix used for the system’s floating-point representation. If FLT_RADIX is 2, logb(x) is similar to floor(log2(fabs(x))), except that the latter may give an incorrect integer due to intermediate rounding.

If x is subnormal, logb() returns the exponent x would have if it were normalized.

RETURN VALUE

On success, these functions return the exponent of x.

If x is a NaN, a NaN is returned.

If x is zero, then a pole error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.

If x is negative infinity or positive infinity, then positive infinity is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Pole error: x is 0
A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised.

These functions do not set errno.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

logb(), logbf(), logbl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

logb()
4.3BSD (see IEEE.3 in the 4.3BSD manual).

SEE ALSO

ilogb(3), log(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

23 - Linux cli command Net_DBus_Test_MockIteratorpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Test_MockIteratorpm and provides detailed information about the command Net_DBus_Test_MockIteratorpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Test_MockIteratorpm.

NAME 🖥️ Net_DBus_Test_MockIteratorpm 🖥️

Iterator over a mock message

SYNOPSIS

Creating a new message

my $msg = new Net::DBus::Test::MockMessage my $iterator = $msg->iterator; $iterator->append_boolean(1); $iterator->append_byte(123);

Reading from a message

my $msg = …get it from somewhere… my $iter = $msg->iterator(); my $i = 0; while ($iter->has_next()) { $iter->next(); $i++; if ($i == 1) { my $val = $iter->get_boolean(); } elsif ($i == 2) { my $val = $iter->get_byte(); } }

DESCRIPTION

This module provides a “mock” counterpart to the Net::DBus::Binding::Iterator object which is capable of iterating over mock message objects. Instances of this module are not created directly, instead they are obtained via the iterator method on the Net::DBus::Test::MockMessage module.

METHODS

$res = $iter->has_next()
Determines if there are any more fields in the message itertor to be read. Returns a positive value if there are more fields, zero otherwise.

$success = $iter->next()
Skips the iterator onto the next field in the message. Returns a positive value if the current field pointer was successfully advanced, zero otherwise.

my $val = $iter->get_boolean()

$iter->append_boolean($val);

Read or write a boolean value from/to the message iterator

my $val = $iter->get_byte()

$iter->append_byte($val);

Read or write a single byte value from/to the message iterator.

my $val = $iter->get_string()

$iter->append_string($val);

Read or write a UTF-8 string value from/to the message iterator

my $val = $iter->get_object_path()

$iter->append_object_path($val);

Read or write a UTF-8 string value, whose contents is a valid object path, from/to the message iterator

my $val = $iter->get_signature()

$iter->append_signature($val);

Read or write a UTF-8 string, whose contents is a valid type signature, value from/to the message iterator

my $val = $iter->get_int16()

$iter->append_int16($val);

Read or write a signed 16 bit value from/to the message iterator

my $val = $iter->get_uint16()

$iter->append_uint16($val);

Read or write an unsigned 16 bit value from/to the message iterator

my $val = $iter->get_int32()

$iter->append_int32($val);

Read or write a signed 32 bit value from/to the message iterator

my $val = $iter->get_uint32()

$iter->append_uint32($val);

Read or write an unsigned 32 bit value from/to the message iterator

my $val = $iter->get_int64()

$iter->append_int64($val);

Read or write a signed 64 bit value from/to the message iterator. An error will be raised if this build of Perl does not support 64 bit integers

my $val = $iter->get_uint64()

$iter->append_uint64($val);

Read or write an unsigned 64 bit value from/to the message iterator. An error will be raised if this build of Perl does not support 64 bit integers

my $val = $iter->get_double()

$iter->append_double($val);

Read or write a double precision floating point value from/to the message iterator

my $val = $iter->get_unix_fd()

$iter->append_unix_fd($val);

Read or write a unix_fd value from/to the message iterator

my $value = $iter->get()

my $value = $iter->get($type);

Get the current value pointed to by this iterator. If the optional $type parameter is supplied, the wire type will be compared with the desired type & a warning output if their differ. The $type value must be one of the Net::DBus::Binding::Message::TYPE* constants.

my $hashref = $iter->get_dict()
If the iterator currently points to a dictionary value, unmarshalls and returns the value as a hash reference.

my $hashref = $iter->get_array()
If the iterator currently points to an array value, unmarshalls and returns the value as a array reference.

my $hashref = $iter->get_variant()
If the iterator currently points to a variant value, unmarshalls and returns the value contained in the variant.

my $hashref = $iter->get_struct()
If the iterator currently points to an struct value, unmarshalls and returns the value as a array reference. The values in the array correspond to members of the struct.

$iter->append($value)

$iter->append($value, $type)

Appends a value to the message associated with this iterator. The value is marshalled into wire format, according to the following rules. If the $value is an instance of Net::DBus::Binding::Value, the embedded data type is used. If the $type parameter is supplied, that is taken to represent the data type. The type must be one of the Net::DBus::Binding::Message::TYPE_* constants. Otherwise, the data type is chosen to be a string, dict or array according to the perl data types SCALAR, HASH or ARRAY.

my $type = $iter->guess_type($value)
Make a best guess at the on the wire data type to use for marshalling $value. If the value is a hash reference, the dictionary type is returned; if the value is an array reference the array type is returned; otherwise the string type is returned.

my $sig = $iter->format_signature($type)
Given a data type representation, construct a corresponding signature string

$iter->append_array($value, $type)
Append an array of values to the message. The $value parameter must be an array reference, whose elements all have the same data type specified by the $type parameter.

$iter->append_struct($value, $type)
Append a struct to the message. The $value parameter must be an array reference, whose elements correspond to members of the structure. The $type parameter encodes the type of each member of the struct.

$iter->append_dict($value, $type)
Append a dictionary to the message. The $value parameter must be an hash reference.The $type parameter encodes the type of the key and value of the hash.

$iter->append_variant($value)
Append a value to the message, encoded as a variant type. The $value can be of any type, however, the variant will be encoded as either a string, dictionary or array according to the rules of the guess_type method.

my $type = $iter->get_arg_type
Retrieves the type code of the value pointing to by this iterator. The returned code will correspond to one of the constants Net::DBus::Binding::Message::TYPE_*

my $type = $iter->get_element_type
If the iterator points to an array, retrieves the type code of array elements. The returned code will correspond to one of the constants Net::DBus::Binding::Message::TYPE_*

BUGS

It doesn’t completely replicate the API of Net::DBus::Binding::Iterator, merely enough to make the high level bindings work in a test scenario.

AUTHOR

Daniel P. Berrange

COPYRIGHT

Copyright (C) 2005-2009 Daniel P. Berrange

SEE ALSO

Net::DBus::Test::MockMessage, Net::DBus::Binding::Iterator, <http://www.mockobjects.com/Faq.html>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

24 - Linux cli command sinh

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sinh and provides detailed information about the command sinh, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sinh.

NAME 🖥️ sinh 🖥️

hyperbolic sine function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double sinh(double x);
float sinhf(float x);
long double sinhl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sinhf(), sinhl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the hyperbolic sine of x, which is defined mathematically as:

    sinh(x) = (exp(x) - exp(-x)) / 2

RETURN VALUE

On success, these functions return the hyperbolic sine of x.

If x is a NaN, a NaN is returned.

If x is +0 (-0), +0 (-0) is returned.

If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the same sign as x.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error: result overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sinh(), sinhf(), sinhl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

SEE ALSO

acosh(3), asinh(3), atanh(3), cosh(3), csinh(3), tanh(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

25 - Linux cli command wcslen

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcslen and provides detailed information about the command wcslen, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcslen.

NAME 🖥️ wcslen 🖥️

determine the length of a wide-character string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
size_t wcslen(const wchar_t *s);

DESCRIPTION

The wcslen() function is the wide-character equivalent of the strlen(3) function. It determines the length of the wide-character string pointed to by s, excluding the terminating null wide character (L’�’).

RETURN VALUE

The wcslen() function returns the number of wide characters in s.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcslen()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

In cases where the input buffer may not contain a terminating null wide character, wcsnlen(3) should be used instead.

SEE ALSO

strlen(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

26 - Linux cli command XtPopup

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtPopup and provides detailed information about the command XtPopup, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtPopup.

NAME 🖥️ XtPopup 🖥️

map a pop-up

SYNTAX

#include <X11/Intrinsic.h>

void XtPopup(Widget popup_shell, XtGrabKind grab_kind);

void XtPopupSpringLoaded(Widget popup_shell);

void XtCallbackNone(Widget w, XtPointer client_data, XtPointer call_data);

void XtCallbackNonexclusive(Widget w, XtPointer client_data, XtPointer call_data);

void XtCallbackExclusive(Widget w, XtPointer client_data, XtPointer call_data);

ACTIONS

void XtMenuPopup(String shell_name);

ARGUMENTS

call_data
Specifies the callback data, which is not used by this procedure.

client_data
Specifies the pop-up shell.

grab_kind
Specifies the way in which user events should be constrained.

popup_shell
Specifies the widget shell.

  1. Specifies the widget.

DESCRIPTION

The XtPopup function performs the following:

  • Calls XtCheckSubclass to ensure popup_shell is a subclass of Shell.

  • Generates an error if the shell’s popped_up field is already True.

  • Calls the callback procedures on the shell’s popup_callback list.

  • Sets the shell popped_up field to True, the shell spring_loaded field to False, and the shell grab_kind field from grab_kind.

  • If the shell’s create_popup_child field is non-NULL, XtPopup calls it with popup_shell as the parameter.

  • If grab_kind is either XtGrabNonexclusive or XtGrabExclusive, it calls:

XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), False)

  • Calls XtRealizeWidget with popup_shell specified.

  • Calls XMapWindow with popup_shell specified.

The XtPopupSpringLoaded function performs exactly as XtPopup except that it sets the shell spring_loaded field to True and always calls XtAddGrab with exclusive True and spring_loaded True.

The XtCallbackNone, XtCallbackNonexclusive, and XtCallbackExclusive functions call XtPopup with the shell specified by the client data argument and grab_kind set as the name specifies. XtCallbackNone, XtCallbackNonexclusive, and XtCallbackExclusive specify XtGrabNone, XtGrabNonexclusive, and XtGrabExclusive, respectively. Each function then sets the widget that executed the callback list to be insensitive by using XtSetSensitive. Using these functions in callbacks is not required. In particular, an application must provide customized code for callbacks that create pop-up shells dynamically or that must do more than desensitizing the button.

XtMenuPopup is known to the translation manager, which must perform special actions for spring-loaded pop-ups. Calls to XtMenuPopup in a translation specification are mapped into calls to a nonexported action procedure, and the translation manager fills in parameters based on the event specified on the left-hand side of a translation.

If XtMenuPopup is invoked on ButtonPress (possibly with modifiers), the translation manager pops up the shell with grab_kind set to XtGrabExclusive and spring_loaded set to True. If XtMenuPopup is invoked on EnterWindow (possibly with modifiers), the translation manager pops up the shell with grab_kind set to XtGrabNonexclusive and spring_loaded set to False. Otherwise, the translation manager generates an error. When the widget is popped up, the following actions occur:

  • Calls XtCheckSubclass to ensure popup_shell is a subclass of Shell.

  • Generates an error if the shell’s popped_up field is already True.

  • Calls the callback procedures on the shell’s popup_callback list.

  • Sets the shell popped_up field to True and the shell grab_kind and spring_loaded fields appropriately.

  • If the shell’s create_popup_child field is non-NULL, it is called with popup_shell as the parameter.

  • Calls:

XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), spring_loaded)

  • Calls XtRealizeWidget with popup_shell specified.

  • Calls XMapWindow with popup_shell specified.

(Note that these actions are the same as those for XtPopup.) XtMenuPopup tries to find the shell by searching the widget tree starting at the parent of the widget in which it is invoked. If it finds a shell with the specified name in the pop-up children of that parent, it pops up the shell with the appropriate parameters. Otherwise, it moves up the parent chain as needed. If XtMenuPopup gets to the application widget and cannot find a matching shell, it generates an error.

SEE ALSO

XtCreatePopupShell(3), XtPopdown(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

27 - Linux cli command zip_error_init

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_error_init and provides detailed information about the command zip_error_init, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_error_init.

libzip (-lzip)

The

function initializes the zip_error pointed to by

must be allocated before calling

The

function does the same, but additionally sets the zip error code to

and sets the system error code to the current

value, if appropriate.

and

were added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

28 - Linux cli command Image_ExifTool_Lang_frpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Lang_frpm and provides detailed information about the command Image_ExifTool_Lang_frpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Lang_frpm.

NAME 🖥️ Image_ExifTool_Lang_frpm 🖥️

ExifTool French language translations

DESCRIPTION

This file is used by Image::ExifTool to generate localized tag descriptions and values.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

ACKNOWLEDGEMENTS

Thanks to Jens Duttke, Bernard Guillotin, Jean Glasser, Jean Piquemal, Harry Nizard, Alphonse Philippe and Philippe Bonnaure (GraphicConverter) for providing this translation.

SEE ALSO

Image::ExifTool (3pm), Image::ExifTool::TagInfoXML (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

29 - Linux cli command iswlower

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command iswlower and provides detailed information about the command iswlower, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the iswlower.

NAME 🖥️ iswlower 🖥️

test for lowercase wide character

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wctype.h>
int iswlower(wint_t wc);

DESCRIPTION

The iswlower() function is the wide-character equivalent of the islower(3) function. It tests whether wc is a wide character belonging to the wide-character class “lower”.

The wide-character class “lower” is a subclass of the wide-character class “alpha”, and therefore also a subclass of the wide-character class “alnum”, of the wide-character class “graph” and of the wide-character class “print”.

Being a subclass of the wide-character class “print”, the wide-character class “lower” is disjoint from the wide-character class “cntrl”.

Being a subclass of the wide-character class “graph”, the wide-character class “lower” is disjoint from the wide-character class “space” and its subclass “blank”.

Being a subclass of the wide-character class “alnum”, the wide-character class “lower” is disjoint from the wide-character class “punct”.

Being a subclass of the wide-character class “alpha”, the wide-character class “lower” is disjoint from the wide-character class “digit”.

The wide-character class “lower” contains at least those characters wc which are equal to towlower(wc) and different from towupper(wc).

The wide-character class “lower” always contains at least the letters ‘a’ to ‘z’.

RETURN VALUE

The iswlower() function returns nonzero if wc is a wide character belonging to the wide-character class “lower”. Otherwise, it returns zero.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

iswlower()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of iswlower() depends on the LC_CTYPE category of the current locale.

This function is not very appropriate for dealing with Unicode characters, because Unicode knows about three cases: upper, lower, and title case.

SEE ALSO

islower(3), iswctype(3), towlower(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

30 - Linux cli command truncf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command truncf and provides detailed information about the command truncf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the truncf.

NAME 🖥️ truncf 🖥️

round to integer, toward zero

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double trunc(double x);
float truncf(float x);
long double truncl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

trunc(), truncf(), truncl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions round x to the nearest integer value that is not larger in magnitude than x.

RETURN VALUE

These functions return the rounded integer value, in floating format.

If x is integral, infinite, or NaN, x itself is returned.

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

trunc(), truncf(), truncl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

NOTES

The integral value returned by these functions may be too large to store in an integer type (int, long, etc.). To avoid an overflow, which will produce undefined results, an application should perform a range check on the returned value before assigning it to an integer type.

SEE ALSO

ceil(3), floor(3), lrint(3), nearbyint(3), rint(3), round(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

31 - Linux cli command gai_cancel

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gai_cancel and provides detailed information about the command gai_cancel, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gai_cancel.

NAME 🖥️ gai_cancel 🖥️

asynchronous network address and service translation

LIBRARY

Asynchronous name lookup library (libanl, -lanl)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <netdb.h>
int getaddrinfo_a(int mode, struct gaicb *list[restrict],
 int nitems, struct sigevent *restrict sevp);
int gai_suspend(const struct gaicb *const list[], int nitems,
 const struct timespec *timeout);
int gai_error(struct gaicb *req);
int gai_cancel(struct gaicb *req);

DESCRIPTION

The getaddrinfo_a() function performs the same task as getaddrinfo(3), but allows multiple name look-ups to be performed asynchronously, with optional notification on completion of look-up operations.

The mode argument has one of the following values:

GAI_WAIT
Perform the look-ups synchronously. The call blocks until the look-ups have completed.

GAI_NOWAIT
Perform the look-ups asynchronously. The call returns immediately, and the requests are resolved in the background. See the discussion of the sevp argument below.

The array list specifies the look-up requests to process. The nitems argument specifies the number of elements in list. The requested look-up operations are started in parallel. NULL elements in list are ignored. Each request is described by a gaicb structure, defined as follows:

struct gaicb {
    const char            *ar_name;
    const char            *ar_service;
    const struct addrinfo *ar_request;
    struct addrinfo       *ar_result;
};

The elements of this structure correspond to the arguments of getaddrinfo(3). Thus, ar_name corresponds to the node argument and ar_service to the service argument, identifying an Internet host and a service. The ar_request element corresponds to the hints argument, specifying the criteria for selecting the returned socket address structures. Finally, ar_result corresponds to the res argument; you do not need to initialize this element, it will be automatically set when the request is resolved. The addrinfo structure referenced by the last two elements is described in getaddrinfo(3).

When mode is specified as GAI_NOWAIT, notifications about resolved requests can be obtained by employing the sigevent structure pointed to by the sevp argument. For the definition and general details of this structure, see sigevent(3type). The sevp->sigev_notify field can have the following values:

SIGEV_NONE
Don’t provide any notification.

SIGEV_SIGNAL
When a look-up completes, generate the signal sigev_signo for the process. See sigevent(3type) for general details. The si_code field of the siginfo_t structure will be set to SI_ASYNCNL.

SIGEV_THREAD
When a look-up completes, invoke sigev_notify_function as if it were the start function of a new thread. See sigevent(3type) for details.

For SIGEV_SIGNAL and SIGEV_THREAD, it may be useful to point sevp->sigev_value.sival_ptr to list.

The gai_suspend() function suspends execution of the calling thread, waiting for the completion of one or more requests in the array list. The nitems argument specifies the size of the array list. The call blocks until one of the following occurs:

  • One or more of the operations in list completes.

  • The call is interrupted by a signal that is caught.

  • The time interval specified in timeout elapses. This argument specifies a timeout in seconds plus nanoseconds (see nanosleep(2) for details of the timespec structure). If timeout is NULL, then the call blocks indefinitely (until one of the events above occurs).

No explicit indication of which request was completed is given; you must determine which request(s) have completed by iterating with gai_error() over the list of requests.

The gai_error() function returns the status of the request req: either EAI_INPROGRESS if the request was not completed yet, 0 if it was handled successfully, or an error code if the request could not be resolved.

The gai_cancel() function cancels the request req. If the request has been canceled successfully, the error status of the request will be set to EAI_CANCELED and normal asynchronous notification will be performed. The request cannot be canceled if it is currently being processed; in that case, it will be handled as if gai_cancel() has never been called. If req is NULL, an attempt is made to cancel all outstanding requests that the process has made.

RETURN VALUE

The getaddrinfo_a() function returns 0 if all of the requests have been enqueued successfully, or one of the following nonzero error codes:

EAI_AGAIN
The resources necessary to enqueue the look-up requests were not available. The application may check the error status of each request to determine which ones failed.

EAI_MEMORY
Out of memory.

EAI_SYSTEM
mode is invalid.

The gai_suspend() function returns 0 if at least one of the listed requests has been completed. Otherwise, it returns one of the following nonzero error codes:

EAI_AGAIN
The given timeout expired before any of the requests could be completed.

EAI_ALLDONE
There were no actual requests given to the function.

EAI_INTR
A signal has interrupted the function. Note that this interruption might have been caused by signal notification of some completed look-up request.

The gai_error() function can return EAI_INPROGRESS for an unfinished look-up request, 0 for a successfully completed look-up (as described above), one of the error codes that could be returned by getaddrinfo(3), or the error code EAI_CANCELED if the request has been canceled explicitly before it could be finished.

The gai_cancel() function can return one of these values:

EAI_CANCELED
The request has been canceled successfully.

EAI_NOTCANCELED
The request has not been canceled.

EAI_ALLDONE
The request has already completed.

The gai_strerror(3) function translates these error codes to a human readable string, suitable for error reporting.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getaddrinfo_a(), gai_suspend(), gai_error(), gai_cancel()

Thread safetyMT-Safe

STANDARDS

GNU.

HISTORY

glibc 2.2.3.

The interface of getaddrinfo_a() was modeled after the lio_listio(3) interface.

EXAMPLES

Two examples are provided: a simple example that resolves several requests in parallel synchronously, and a complex example showing some of the asynchronous capabilities.

Synchronous example

The program below simply resolves several hostnames in parallel, giving a speed-up compared to resolving the hostnames sequentially using getaddrinfo(3). The program might be used like this:

$ ./a.out mirrors.kernel.org enoent.linuxfoundation.org gnu.org
mirrors.kernel.org: 139.178.88.99
enoent.linuxfoundation.org: Name or service not known
gnu.org: 209.51.188.116

Here is the program source code

#define _GNU_SOURCE
#include <err.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MALLOC(n, type)  ((type *) reallocarray(NULL, n, sizeof(type)))
int
main(int argc, char *argv[])
{
    int ret;
    struct gaicb *reqs[argc - 1];
    char host[NI_MAXHOST];
    struct addrinfo *res;
    if (argc < 2) {
        fprintf(stderr, "Usage: %s HOST...

“, argv[0]); exit(EXIT_FAILURE); } for (size_t i = 0; i < argc - 1; i++) { reqs[i] = MALLOC(1, struct gaicb); if (reqs[i] == NULL) err(EXIT_FAILURE, “malloc”); memset(reqs[i], 0, sizeof(*reqs[0])); reqs[i]->ar_name = argv[i + 1]; } ret = getaddrinfo_a(GAI_WAIT, reqs, argc - 1, NULL); if (ret != 0) { fprintf(stderr, “getaddrinfo_a() failed: %s “, gai_strerror(ret)); exit(EXIT_FAILURE); } for (size_t i = 0; i < argc - 1; i++) { printf("%s: “, reqs[i]->ar_name); ret = gai_error(reqs[i]); if (ret == 0) { res = reqs[i]->ar_result; ret = getnameinfo(res->ai_addr, res->ai_addrlen, host, sizeof(host), NULL, 0, NI_NUMERICHOST); if (ret != 0) { fprintf(stderr, “getnameinfo() failed: %s “, gai_strerror(ret)); exit(EXIT_FAILURE); } puts(host); } else { puts(gai_strerror(ret)); } } exit(EXIT_SUCCESS); }

Asynchronous example

This example shows a simple interactive getaddrinfo_a() front-end. The notification facility is not demonstrated.

An example session might look like this:

$ ./a.out
> a mirrors.kernel.org enoent.linuxfoundation.org gnu.org
> c 2
[2] gnu.org: Request not canceled
> w 0 1
[00] mirrors.kernel.org: Finished
> l
[00] mirrors.kernel.org: 139.178.88.99
[01] enoent.linuxfoundation.org: Processing request in progress
[02] gnu.org: 209.51.188.116
> l
[00] mirrors.kernel.org: 139.178.88.99
[01] enoent.linuxfoundation.org: Name or service not known
[02] gnu.org: 209.51.188.116

The program source is as follows:

#define _GNU_SOURCE
#include <assert.h>
#include <err.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define CALLOC(n, type)  ((type *) calloc(n, sizeof(type)))
#define REALLOCF(ptr, n, type)                                          \
({                                                                      \
    static_assert(__builtin_types_compatible_p(typeof(ptr), type *));   \
                                                                        \
    (type *) reallocarrayf(ptr, n, sizeof(type));                       \
})
static struct gaicb **reqs = NULL;
static size_t nreqs = 0;
static inline void *
reallocarrayf(void *p, size_t nmemb, size_t size)
{
    void  *q;
    q = reallocarray(p, nmemb, size);
    if (q == NULL && nmemb != 0 && size != 0)
        free(p);
    return q;
}
static char *
getcmd(void)
{
    static char buf[256];
    fputs("> ", stdout); fflush(stdout);
    if (fgets(buf, sizeof(buf), stdin) == NULL)
        return NULL;
    if (buf[strlen(buf) - 1] == '

‘) buf[strlen(buf) - 1] = 0; return buf; } /* Add requests for specified hostnames. */ static void add_requests(void) { size_t nreqs_base = nreqs; char *host; int ret; while ((host = strtok(NULL, " “))) { nreqs++; reqs = REALLOCF(reqs, nreqs, struct gaicb ); if (reqs == NULL) err(EXIT_FAILURE, “reallocf”); reqs[nreqs - 1] = CALLOC(1, struct gaicb); if (reqs[nreqs - 1] == NULL) err(EXIT_FAILURE, “calloc”); reqs[nreqs - 1]->ar_name = strdup(host); } / Queue nreqs_base..nreqs requests. / ret = getaddrinfo_a(GAI_NOWAIT, &reqs[nreqs_base], nreqs - nreqs_base, NULL); if (ret) { fprintf(stderr, “getaddrinfo_a() failed: %s “, gai_strerror(ret)); exit(EXIT_FAILURE); } } / Wait until at least one of specified requests completes. */ static void wait_requests(void) { char *id; int ret; size_t n; struct gaicb const **wait_reqs; wait_reqs = CALLOC(nreqs, const struct gaicb ); if (wait_reqs == NULL) err(EXIT_FAILURE, “calloc”); / NULL elements are ignored by gai_suspend(). / while ((id = strtok(NULL, " “)) != NULL) { n = atoi(id); if (n >= nreqs) { printf(“Bad request number: %s “, id); return; } wait_reqs[n] = reqs[n]; } ret = gai_suspend(wait_reqs, nreqs, NULL); if (ret) { printf(“gai_suspend(): %s “, gai_strerror(ret)); return; } for (size_t i = 0; i < nreqs; i++) { if (wait_reqs[i] == NULL) continue; ret = gai_error(reqs[i]); if (ret == EAI_INPROGRESS) continue; printf(”[%02zu] %s: %s “, i, reqs[i]->ar_name, ret == 0 ? “Finished” : gai_strerror(ret)); } } / Cancel specified requests. */ static void cancel_requests(void) { char id; int ret; size_t n; while ((id = strtok(NULL, " “)) != NULL) { n = atoi(id); if (n >= nreqs) { printf(“Bad request number: %s “, id); return; } ret = gai_cancel(reqs[n]); printf(”[%s] %s: %s “, id, reqs[atoi(id)]->ar_name, gai_strerror(ret)); } } / List all requests. */ static void list_requests(void) { int ret; char host[NI_MAXHOST]; struct addrinfo *res; for (size_t i = 0; i < nreqs; i++) { printf(”[%02zu] %s: “, i, reqs[i]->ar_name); ret = gai_error(reqs[i]); if (!ret) { res = reqs[i]->ar_result; ret = getnameinfo(res->ai_addr, res->ai_addrlen, host, sizeof(host), NULL, 0, NI_NUMERICHOST); if (ret) { fprintf(stderr, “getnameinfo() failed: %s “, gai_strerror(ret)); exit(EXIT_FAILURE); } puts(host); } else { puts(gai_strerror(ret)); } } } int main(void) { char *cmdline; char *cmd; while ((cmdline = getcmd()) != NULL) { cmd = strtok(cmdline, " “); if (cmd == NULL) { list_requests(); } else { switch (cmd[0]) { case ‘a’: add_requests(); break; case ‘w’: wait_requests(); break; case ‘c’: cancel_requests(); break; case ’l’: list_requests(); break; default: fprintf(stderr, “Bad command: %c “, cmd[0]); break; } } } exit(EXIT_SUCCESS); }

SEE ALSO

getaddrinfo(3), inet(3), lio_listio(3), hostname(7), ip(7), sigevent(3type)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

32 - Linux cli command sa_family_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sa_family_ttype and provides detailed information about the command sa_family_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sa_family_ttype.

NAME 🖥️ sa_family_ttype 🖥️

socket address

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/socket.h>
struct sockaddr {
 sa_family_t sa_family; /* Address family */
 char sa_data[]; /* Socket address */
};
struct sockaddr_storage {
 sa_family_t ss_family; /* Address family */
};
typedef /* ... */ socklen_t;
typedef /* ... */ sa_family_t;

Internet domain sockets

#include <netinet/in.h>
struct sockaddr_in {
 sa_family_t sin_family; /* AF_INET */
 in_port_t sin_port; /* Port number */
 struct in_addr sin_addr; /* IPv4 address */
};
struct sockaddr_in6 {
 sa_family_t sin6_family; /* AF_INET6 */
 in_port_t sin6_port; /* Port number */
 uint32_t sin6_flowinfo; /* IPv6 flow info */
 struct in6_addr sin6_addr; /* IPv6 address */
 uint32_t sin6_scope_id; /* Set of interfaces for a scope */
};
struct in_addr {
 in_addr_t s_addr;
};
struct in6_addr {
 uint8_t s6_addr[16];
};
typedef uint32_t in_addr_t;
typedef uint16_t in_port_t;

UNIX domain sockets

#include <sys/un.h>
struct sockaddr_un {
 sa_family_t sun_family; /* Address family */
 char sun_path[]; /* Socket pathname */
};

DESCRIPTION

sockaddr
Describes a socket address.

sockaddr_storage
A structure at least as large as any other sockaddr_* address structures. It’s aligned so that a pointer to it can be cast as a pointer to other sockaddr_* structures and used to access its fields.

socklen_t
Describes the length of a socket address. This is an integer type of at least 32 bits.

sa_family_t
Describes a socket’s protocol family. This is an unsigned integer type.

Internet domain sockets

sockaddr_in
Describes an IPv4 Internet domain socket address. The sin_port and sin_addr members are stored in network byte order.

sockaddr_in6
Describes an IPv6 Internet domain socket address. The sin6_addr.s6_addr array is used to contain a 128-bit IPv6 address, stored in network byte order.

UNIX domain sockets

sockaddr_un
Describes a UNIX domain socket address.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

socklen_t was invented by POSIX. See also accept(2).

These structures were invented before modern ISO C strict-aliasing rules. If aliasing rules are applied strictly, these structures would be extremely difficult to use without invoking Undefined Behavior. POSIX Issue 8 will fix this by requiring that implementations make sure that these structures can be safely used as they were designed.

NOTES

socklen_t is also defined in <netdb.h>.

sa_family_t is also defined in <netinet/in.h> and <sys/un.h>.

SEE ALSO

accept(2), bind(2), connect(2), getpeername(2), getsockname(2), getsockopt(2), sendto(2), setsockopt(2), socket(2), socketpair(2), getaddrinfo(3), gethostbyaddr(3), getnameinfo(3), htonl(3), ipv6(7), socket(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

33 - Linux cli command TAILQ_SWAP

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command TAILQ_SWAP and provides detailed information about the command TAILQ_SWAP, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the TAILQ_SWAP.

NAME 🖥️ TAILQ_SWAP 🖥️

implementation of a doubly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
TAILQ_ENTRY(TYPE);
TAILQ_HEAD(HEADNAME, TYPE);
TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD head);
void TAILQ_INIT(TAILQ_HEAD *head);
int TAILQ_EMPTY(TAILQ_HEAD *head);
void TAILQ_INSERT_HEAD(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_TAIL(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_AFTER(TAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_FIRST(TAILQ_HEAD *head);
struct TYPE *TAILQ_LAST(TAILQ_HEAD *head, HEADNAME);
struct TYPE *TAILQ_PREV(struct TYPE *elm, HEADNAME, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_NEXT(struct TYPE *elm, TAILQ_ENTRY NAME);
TAILQ_FOREACH(struct TYPE *var, TAILQ_HEAD *head,
 TAILQ_ENTRY NAME);
TAILQ_FOREACH_REVERSE(struct TYPE *var, TAILQ_HEAD *head, HEADNAME,
 TAILQ_ENTRY NAME);
void TAILQ_REMOVE(TAILQ_HEAD *head, struct TYPE *elm,
 TAILQ_ENTRY NAME);
void TAILQ_CONCAT(TAILQ_HEAD *head1, TAILQ_HEAD *head2,
 TAILQ_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked tail queues.

In the macro definitions, TYPE is the name of a user defined structure, that must contain a field of type TAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user defined structure that must be declared using the macro TAILQ_HEAD().

Creation

A tail queue is headed by a structure defined by the TAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the queue and the other to the last element in the queue. The elements are doubly linked so that an arbitrary element can be removed without traversing the queue. New elements can be added to the queue after an existing element, before an existing element, at the head of the queue, or at the end of the queue. A TAILQ_HEAD structure is declared as follows:

TAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the queue. A pointer to the head of the queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

TAILQ_ENTRY() declares a structure that connects the elements in the queue.

TAILQ_HEAD_INITIALIZER() evaluates to an initializer for the queue head.

TAILQ_INIT() initializes the queue referenced by

TAILQ_EMPTY() evaluates to true if there are no items on the queue. head.

Insertion

TAILQ_INSERT_HEAD() inserts the new element elm at the head of the queue.

TAILQ_INSERT_TAIL() inserts the new element elm at the end of the queue.

TAILQ_INSERT_BEFORE() inserts the new element elm before the element listelm.

TAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

TAILQ_FIRST() returns the first item on the queue, or NULL if the queue is empty.

TAILQ_LAST() returns the last item on the queue. If the queue is empty the return value is NULL.

TAILQ_PREV() returns the previous item on the queue, or NULL if this item is the first.

TAILQ_NEXT() returns the next item on the queue, or NULL if this item is the last.

TAILQ_FOREACH() traverses the queue referenced by head in the forward direction, assigning each element in turn to var. var is set to NULL if the loop completes normally, or if there were no elements.

TAILQ_FOREACH_REVERSE() traverses the queue referenced by head in the reverse direction, assigning each element in turn to var.

Removal

TAILQ_REMOVE() removes the element elm from the queue.

Other features

TAILQ_CONCAT() concatenates the queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

TAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

TAILQ_FIRST(), TAILQ_LAST(), TAILQ_PREV(), and TAILQ_NEXT() return a pointer to the first, last, previous, or next TYPE structure, respectively.

TAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

STANDARDS

BSD.

HISTORY

4.4BSD.

CAVEATS

TAILQ_FOREACH() and TAILQ_FOREACH_REVERSE() don’t allow var to be removed or freed within the loop, as it would interfere with the traversal. TAILQ_FOREACH_SAFE() and TAILQ_FOREACH_REVERSE_SAFE(), which are present on the BSDs but are not present in glibc, fix this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    TAILQ_ENTRY(entry) entries;             /* Tail queue */
};
TAILQ_HEAD(tailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct tailhead head;                   /* Tail queue head */
    int i;
    TAILQ_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    TAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    TAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    TAILQ_INSERT_AFTER(&head, n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    TAILQ_INSERT_BEFORE(n2, n3, entries);
    TAILQ_REMOVE(&head, n2, entries);       /* Deletion */
    free(n2);
                                            /* Forward traversal */
    i = 0;
    TAILQ_FOREACH(np, &head, entries)
        np->data = i++;
                                            /* Reverse traversal */
    TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = TAILQ_FIRST(&head); while (n1 != NULL) { n2 = TAILQ_NEXT(n1, entries); free(n1); n1 = n2; } TAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

34 - Linux cli command XdbeGetBackBufferAttributes

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XdbeGetBackBufferAttributes and provides detailed information about the command XdbeGetBackBufferAttributes, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XdbeGetBackBufferAttributes.

NAME 🖥️ XdbeGetBackBufferAttributes 🖥️

returns attributes of a DBE buffer.

SYNOPSIS

#include <X11/extensions/Xdbe.h>

XdbeBackBufferAttributes *XdbeGetBackBufferAttributes( Display *dpy, XdbeBackBuffer buffer)

DESCRIPTION

This function returns the attributes associated with the specified buffer.

The XdbeBackBufferAttributes structure has the following fields:

Window window window that buffer belongs to

If buffer is not a valid XdbeBackBuffer, window returns None.

The returned XdbeBackBufferAttributes structure can be freed with the Xlib function Xfree().

SEE ALSO

DBE, XdbeAllocateBackBufferName(), XdbeBeginIdiom(), XdbeDeallocateBackBufferName(), XdbeEndIdiom(), XdbeFreeVisualInfo(), XdbeGetVisualInfo(), XdbeQueryExtension(), XdbeSwapBuffers().

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

35 - Linux cli command XML_RegExppm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_RegExppm and provides detailed information about the command XML_RegExppm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_RegExppm.

NAME 🖥️ XML_RegExppm 🖥️

Regular expressions for XML tokens

SYNOPSIS

use XML::RegExp; if ($my_name =~ /^$XML::RegExp::Name$/) { # $my_name is a valid XML Name }

DESCRIPTION

This package contains regular expressions for the following XML tokens: BaseChar, Ideographic, Letter, Digit, Extender, CombiningChar, NameChar, EntityRef, CharRef, Reference, Name, NmToken, and AttValue.

The definitions of these tokens were taken from the XML spec (Extensible Markup Language 1.0) at <http://www.w3.org/TR/REC-xml>.

Also contains the regular expressions for the following tokens from the XML Namespaces spec at <http://www.w3.org/TR/REC-xml-names>: NCNameChar, NCName, QName, Prefix and LocalPart.

AUTHOR

Original Author is Enno Derksen <[email protected]>

Please send bugs, comments and suggestions to T.J. Mather <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

36 - Linux cli command le64toh

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command le64toh and provides detailed information about the command le64toh, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the le64toh.

NAME 🖥️ le64toh 🖥️

convert values between host and big-/little-endian byte order

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <endian.h>
uint16_t htobe16(uint16_t host_16bits);
uint16_t htole16(uint16_t host_16bits);
uint16_t be16toh(uint16_t big_endian_16bits);
uint16_t le16toh(uint16_t little_endian_16bits);
uint32_t htobe32(uint32_t host_32bits);
uint32_t htole32(uint32_t host_32bits);
uint32_t be32toh(uint32_t big_endian_32bits);
uint32_t le32toh(uint32_t little_endian_32bits);
uint64_t htobe64(uint64_t host_64bits);
uint64_t htole64(uint64_t host_64bits);
uint64_t be64toh(uint64_t big_endian_64bits);
uint64_t le64toh(uint64_t little_endian_64bits);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

htobe16(), htole16(), be16toh(), le16toh(), htobe32(), htole32(), be32toh(), le32toh(), htobe64(), htole64(), be64toh(), le64toh():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    In glibc up to and including 2.19:
        _BSD_SOURCE

DESCRIPTION

These functions convert the byte encoding of integer values from the byte order that the current CPU (the “host”) uses, to and from little-endian and big-endian byte order.

The number, nn, in the name of each function indicates the size of integer handled by the function, either 16, 32, or 64 bits.

The functions with names of the form “htobenn” convert from host byte order to big-endian order.

The functions with names of the form “htolenn” convert from host byte order to little-endian order.

The functions with names of the form “benntoh” convert from big-endian order to host byte order.

The functions with names of the form “lenntoh” convert from little-endian order to host byte order.

VERSIONS

Similar functions are present on the BSDs, where the required header file is <sys/endian.h> instead of <endian.h>. Unfortunately, NetBSD, FreeBSD, and glibc haven’t followed the original OpenBSD naming convention for these functions, whereby the nn component always appears at the end of the function name (thus, for example, in NetBSD, FreeBSD, and glibc, the equivalent of OpenBSDs “betoh32” is “be32toh”).

STANDARDS

None.

HISTORY

glibc 2.9.

These functions are similar to the older byteorder(3) family of functions. For example, be32toh() is identical to ntohl().

The advantage of the byteorder(3) functions is that they are standard functions available on all UNIX systems. On the other hand, the fact that they were designed for use in the context of TCP/IP means that they lack the 64-bit and little-endian variants described in this page.

EXAMPLES

The program below display the results of converting an integer from host byte order to both little-endian and big-endian byte order. Since host byte order is either little-endian or big-endian, only one of these conversions will have an effect. When we run this program on a little-endian system such as x86-32, we see the following:

$ ./a.out
x.u32 = 0x44332211
htole32(x.u32) = 0x44332211
htobe32(x.u32) = 0x11223344

Program source

#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    union {
        uint32_t u32;
        uint8_t arr[4];
    } x;
    x.arr[0] = 0x11;	/* Lowest-address byte */
    x.arr[1] = 0x22;
    x.arr[2] = 0x33;
    x.arr[3] = 0x44;	/* Highest-address byte */
    printf("x.u32 = %#x

“, x.u32); printf(“htole32(x.u32) = %#x “, htole32(x.u32)); printf(“htobe32(x.u32) = %#x “, htobe32(x.u32)); exit(EXIT_SUCCESS); }

SEE ALSO

bswap(3), byteorder(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

37 - Linux cli command pcap_list_tstamp_typespcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_list_tstamp_typespcap and provides detailed information about the command pcap_list_tstamp_typespcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_list_tstamp_typespcap.

NAME 🖥️ pcap_list_tstamp_typespcap 🖥️

get a list of time stamp types supported by a capture device, and free that list

SYNOPSIS

#include <pcap/pcap.h>
int pcap_list_tstamp_types(pcap_t *p, int **tstamp_typesp);
void pcap_free_tstamp_types(int *tstamp_types);

DESCRIPTION

pcap_list_tstamp_types() is used to get a list of the supported time stamp types of the interface associated with the pcap descriptor. pcap_list_tstamp_types() allocates an array to hold the list and sets *tstamp_typesp to point to the array. See pcap-tstamp(7) for a list of all the time stamp types.

The caller is responsible for freeing the array with pcap_free_tstamp_types(), which frees the list pointed to by tstamp_types.

RETURN VALUE

pcap_list_tstamp_types() returns the number of time stamp types in the array on success and PCAP_ERROR on failure. A return value of one means that the only time stamp type supported is the one in the list, which is the capture device’s default time stamp type. A return value of zero means that the only time stamp type supported is PCAP_TSTAMP_HOST, which is the capture device’s default time stamp type (only older versions of libpcap will return that; newer versions will always return one or more types). If PCAP_ERROR is returned, pcap_geterr(3PCAP) or pcap_perror(3PCAP) may be called with p as an argument to fetch or display the error text.

BACKWARD COMPATIBILITY

These functions became available in libpcap release 1.2.1. In previous releases, the time stamp type cannot be set; only the default time stamp type offered by a capture source is available.

SEE ALSO

pcap(3PCAP), pcap_tstamp_type_val_to_name(3PCAP), pcap-tstamp(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

38 - Linux cli command initstate

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command initstate and provides detailed information about the command initstate, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the initstate.

NAME 🖥️ initstate 🖥️

random number generator

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
long random(void);
void srandom(unsigned int seed);
char *initstate(unsigned int seed, char state[.n], size_t n);
char *setstate(char *state);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

random(), srandom(), initstate(), setstate():

    _XOPEN_SOURCE >= 500
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The random() function uses a nonlinear additive feedback random number generator employing a default table of size 31 long integers to return successive pseudo-random numbers in the range from 0 to 2^31 - 1. The period of this random number generator is very large, approximately 16 * ((2^31) - 1).

The srandom() function sets its argument as the seed for a new sequence of pseudo-random integers to be returned by random(). These sequences are repeatable by calling srandom() with the same seed value. If no seed value is provided, the random() function is automatically seeded with a value of 1.

The initstate() function allows a state array state to be initialized for use by random(). The size of the state array n is used by initstate() to decide how sophisticated a random number generator it should use—the larger the state array, the better the random numbers will be. Current “optimal” values for the size of the state array n are 8, 32, 64, 128, and 256 bytes; other amounts will be rounded down to the nearest known amount. Using less than 8 bytes results in an error. seed is the seed for the initialization, which specifies a starting point for the random number sequence, and provides for restarting at the same point.

The setstate() function changes the state array used by the random() function. The state array state is used for random number generation until the next call to initstate() or setstate(). state must first have been initialized using initstate() or be the result of a previous call of setstate().

RETURN VALUE

The random() function returns a value between 0 and (2^31) - 1. The srandom() function returns no value.

The initstate() function returns a pointer to the previous state array. On failure, it returns NULL, and errno is set to indicate the error.

On success, setstate() returns a pointer to the previous state array. On failure, it returns NULL, and errno is set to indicate the error.

ERRORS

EINVAL
The state argument given to setstate() was NULL.

EINVAL
A state array of less than 8 bytes was specified to initstate().

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

random(), srandom(), initstate(), setstate()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, 4.3BSD.

NOTES

Random-number generation is a complex topic. Numerical Recipes in C: The Art of Scientific Computing (William H. Press, Brian P. Flannery, Saul A. Teukolsky, William T. Vetterling; New York: Cambridge University Press, 2007, 3rd ed.) provides an excellent discussion of practical random-number generation issues in Chapter 7 (Random Numbers).

For a more theoretical discussion which also covers many practical issues in depth, see Chapter 3 (Random Numbers) in Donald E. Knuth’s The Art of Computer Programming, volume 2 (Seminumerical Algorithms), 2nd ed.; Reading, Massachusetts: Addison-Wesley Publishing Company, 1981.

CAVEATS

The random() function should not be used in multithreaded programs where reproducible behavior is required. Use random_r(3) for that purpose.

BUGS

According to POSIX, initstate() should return NULL on error. In the glibc implementation, errno is (as specified) set on error, but the function does not return NULL.

SEE ALSO

getrandom(2), drand48(3), rand(3), random_r(3), srand(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

39 - Linux cli command timevaltype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command timevaltype and provides detailed information about the command timevaltype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the timevaltype.

NAME 🖥️ timevaltype 🖥️

time in seconds and microseconds

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/time.h>
struct timeval {
 time_t tv_sec; /* Seconds */
 suseconds_t tv_usec; /* Microseconds */
};

DESCRIPTION

Describes times in seconds and microseconds.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

The following headers also provide this type: <sys/resource.h>, <sys/select.h>, and <utmpx.h>.

SEE ALSO

gettimeofday(2), select(2), utimes(2), adjtime(3), futimes(3), timeradd(3), suseconds_t(3type), time_t(3type), timespec(3type)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

40 - Linux cli command Mail_Fieldpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Mail_Fieldpm and provides detailed information about the command Mail_Fieldpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Mail_Fieldpm.

NAME 🖥️ Mail_Fieldpm 🖥️

base-class for manipulation of mail header fields

INHERITANCE

Mail::Field is extended by Mail::Field::AddrList Mail::Field::Date Mail::Field::Generic

SYNOPSIS

use Mail::Field; my $field = Mail::Field->new(Subject, some subject text); my $field = Mail::Field->new(Subject => some subject text); print $field->tag,": “,$field->stringify,” “; my $field = Mail::Field->subject(some subject text);

DESCRIPTION

Mail::Field creates and manipulates fields in MIME headers, collected within a Mail::Header object. Different field types have their own sub-class (extension), defining additional useful accessors to the field content.

People are invited to merge their implementation to special fields into MailTools, to maintain a consistent set of packages and documentation.

METHODS

Constructors

Mail::Field (and it’s sub-classes) define several methods which return new objects. These can all be categorized as constructor.

Mail::Field->combine($fields)
Take a LIST of Mail::Field objects (which should all be of the same sub-class) and create a new object in that same class.

Mail::Field->extract( $tag, $head [, $index ] )
Takes as arguments the tag name, a Mail::Head object and optionally an index. If the index argument is given then extract will retrieve the given tag from the Mail::Head object and create a new Mail::Field based object. undef will be returned in the field does not exist. If the index argument is not given the result depends on the context in which extract is called. If called in a scalar context the result will be as if extract was called with an index value of zero. If called in an array context then all tags will be retrieved and a list of Mail::Field objects will be returned.

Mail::Field->new( $tag [, STRING | %options] )
Create an object in the class which defines the field specified by the $tag argument.

“Fake” constructors

$obj->create(%options)
This constructor is used internally with preprocessed field information. When called on an existing object, its original content will get replaced.

$obj->parse()
Parse a field line.

Accessors

$obj->set(%options)
Change the settings (the content, but then smart) of this field.

$obj->stringify()
Returns the field as a string.

$obj->tag()

Mail::Field->tag()

Return the tag (in the correct case) for this item. Well, actually any casing is OK, because the field tags are treated case-insensitive; however people have some preferences.

Smart accessors

$obj->text( [STRING] )
Without arguments, the field is returned as stringify() does. Otherwise, the STRING is parsed with parse() to replace the object’s content. It is more clear to call either stringify() or parse() directly, because this method does not add additional processing.

DETAILS

SUB-CLASS PACKAGE NAMES

All sub-classes should be called Mail::Field::name where name is derived from the tag using these rules.

  • Consider a tag as being made up of elements separated by ‘-’

  • Convert all characters to lowercase except the first in each element, which should be uppercase.

  • name is then created from these elements by using the first N characters from each element.

  • N is calculated by using the formula :- int((7 + #elements) / #elements)

  • name is then limited to a maximum of 8 characters, keeping the first 8 characters.

For an example of this take a look at the definition of the _header_pkg_name() subroutine in Mail::Field

DIAGNOSTICS

Error: Undefined subroutine <method> called
Mail::Field objects use autoloading to compile new functionality. Apparently, the method called is not implemented for the specific class of the field object.

SEE ALSO

This module is part of the MailTools distribution, http://perl.overmeer.net/mailtools/.

AUTHORS

The MailTools bundle was developed by Graham Barr. Later, Mark Overmeer took over maintenance without commitment to further development.

Mail::Cap by Gisle Aas <[email protected]>. Mail::Field::AddrList by Peter Orbaek <[email protected]>. Mail::Mailer and Mail::Send by Tim Bunce <[email protected]>. For other contributors see ChangeLog.

LICENSE

Copyrights 1995-2000 Graham Barr <[email protected]> and 2001-2017 Mark Overmeer <[email protected]>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

41 - Linux cli command PA_FLAG_SHORTconst

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command PA_FLAG_SHORTconst and provides detailed information about the command PA_FLAG_SHORTconst, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the PA_FLAG_SHORTconst.

NAME 🖥️ PA_FLAG_SHORTconst 🖥️

define custom behavior for printf-like functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <printf.h>
int register_printf_specifier(int spec, printf_function func,
 printf_arginfo_size_function arginfo);
int register_printf_modifier(const wchar_t *str);
int register_printf_type(printf_va_arg_function fct);

Callbacks

typedef int printf_function(FILE *stream, const struct printf_info *info,
 const void *const args[]);
typedef int printf_arginfo_size_function(const struct printf_info *info,
 size_t n, int argtypes[n], int size[n]);
typedef void printf_va_arg_function(void *mem, va_list *ap);

Types

struct printf_info {
 int prec; // Precision
 int width; // Width
 wchar_t spec; // Format letter
 unsigned int is_long_double:1;// L or ll flag
 unsigned int is_short:1; // h flag
 unsigned int is_long:1; // l flag
 unsigned int alt:1; // # flag
 unsigned int space:1; // Space flag
 unsigned int left:1; // - flag
 unsigned int showsign:1; // + flag
 unsigned int group:1; // ' flag
 unsigned int extra:1; // For special use
 unsigned int is_char:1; // hh flag
 unsigned int wide:1; // True for wide character streams
 unsigned int i18n:1; // I flag
 unsigned int is_binary128:1; /* Floating-point argument is
  ABI-compatible with
  IEC 60559 binary128 */
 unsigned short user; // Bits for user-installed modifiers
 wchar_t pad; // Padding character
};

Constants

#define PA_FLAG_LONG_LONG /* ... */
#define PA_FLAG_LONG_DOUBLE /* ... */
#define PA_FLAG_LONG /* ... */
#define PA_FLAG_SHORT /* ... */
#define PA_FLAG_PTR /* ... */

DESCRIPTION

These functions serve to extend and/or modify the behavior of the printf(3) family of functions.

register_printf_specifier()

This function registers a custom conversion specifier for the printf(3) family of functions.

spec
The character which will be used as a conversion specifier in the format string.

func
Callback function that will be executed by the printf(3) family of functions to format the input arguments into the output stream.

stream
Output stream where the formatted output should be printed. This stream transparently represents the output, even in the case of functions that write to a string.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in arginfo.

args
Array of pointers to the arguments to the printf(3) -like function.

arginfo
Callback function that will be executed by the printf(3) family of functions to know how many arguments should be parsed for the custom specifier and also their types.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in func.

n
Number of arguments remaining to be parsed.

argtypes
This array should be set to define the type of each of the arguments that will be parsed. Each element in the array represents one of the arguments to be parsed, in the same order that they are passed to the printf(3) -like function. Each element should be set to a base type (PA_*) from the enum above, or a custom one, and optionally ORed with an appropriate length modifier (PA_FLAG_*).

The type is determined by using one of the following constants:

PA_INT
int.

PA_CHAR
int, cast to char.

PA_WCHAR
wchar_t.

PA_STRING
const char *, a ‘�’-terminated string.

PA_WSTRING
const wchar_t *, a wide character L’�’-terminated string.

PA_POINTER
void *.

PA_FLOAT
float.

PA_DOUBLE
double.

PA_LAST
TODO.

size
For user-defined types, the size of the type (in bytes) should also be specified through this array. Otherwise, leave it unused.

arginfo is called before func, and prepares some information needed to call func.

register_printf_modifier()

TODO

register_printf_type()

TODO

RETURN VALUE

register_printf_specifier(), register_printf_modifier(), and register_printf_type() return zero on success, or -1 on error.

Callbacks

The callback of type printf_function should return the number of characters written, or -1 on error.

The callback of type printf_arginfo_size_function should return the number of arguments to be parsed by this specifier. It also passes information about the type of those arguments to the caller through argtypes. On error, it should return -1.

ERRORS

EINVAL
The specifier was not a valid character.

STANDARDS

GNU.

HISTORY

register_printf_function(3) is an older function similar to register_printf_specifier(), and is now deprecated. That function can’t handle user-defined types.

register_printf_specifier() supersedes register_printf_function(3).

EXAMPLES

The following example program registers the ‘b’ and ‘B’ specifiers to print integers in binary format, mirroring rules for other unsigned conversion specifiers like ‘x’ and ‘u’. This can be used to print in binary prior to C23.

/* This code is in the public domain */
#include <err.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <printf.h>
#define GROUP_SEP  '\''
struct Printf_Pad {
    char    ch;
    size_t  len;
};
static int b_printf(FILE *stream, const struct printf_info *info,
                    const void *const args[]);
static int b_arginf_sz(const struct printf_info *info,
                    size_t n, int argtypes[n], int size[n]);
static uintmax_t b_value(const struct printf_info *info,
                    const void *arg);
static size_t b_bin_repr(char bin[UINTMAX_WIDTH],
                    const struct printf_info *info, const void *arg);
static size_t b_bin_len(const struct printf_info *info,
                    ptrdiff_t min_len);
static size_t b_pad_len(const struct printf_info *info,
                    ptrdiff_t bin_len);
static ssize_t b_print_prefix(FILE *stream,
                    const struct printf_info *info);
static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info,
                    ptrdiff_t min_len);
static ssize_t b_print_number(FILE *stream,
                    const struct printf_info *info,
                    const char bin[UINTMAX_WIDTH],
                    size_t min_len, size_t bin_len);
static char pad_ch(const struct printf_info *info);
static ssize_t pad_spaces(FILE *stream, size_t pad_len);
int
main(void)
{
    if (register_printf_specifier('b', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('b', ...)");
    if (register_printf_specifier('B', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('B', ...)");
    printf("....----....----....----....----

“); printf("%llb; “, 0x5Ellu); printf("%lB; “, 0x5Elu); printf("%b; “, 0x5Eu); printf("%hB; “, 0x5Eu); printf("%hhb; “, 0x5Eu); printf("%jb; “, (uintmax_t)0x5E); printf("%zb; “, (size_t)0x5E); printf(”….—-….—-….—-….—- “); printf(”%#b; “, 0x5Eu); printf(”%#B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf("%10b; “, 0x5Eu); printf("%010b; “, 0x5Eu); printf(”%.10b; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%-10B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%‘B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”….—-….—-….—-….—- “); printf(”%#16.12b; “, 0xAB); printf(”%-#‘20.12b; “, 0xAB); printf(”%#‘020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#020B; “, 0xAB); printf(”%‘020B; “, 0xAB); printf("%020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#021B; “, 0xAB); printf(”%‘021B; “, 0xAB); printf("%021B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#022B; “, 0xAB); printf(”%‘022B; “, 0xAB); printf("%022B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#023B; “, 0xAB); printf(”%‘023B; “, 0xAB); printf("%023B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%-#‘19.11b; “, 0xAB); printf(”%#‘019B; “, 0xAB); printf(”%#019B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%‘019B; “, 0xAB); printf("%019B; “, 0xAB); printf(”%#016b; “, 0xAB); printf(”….—-….—-….—-….—- “); return 0; } static int b_printf(FILE *stream, const struct printf_info *info, const void const args[]) { char bin[UINTMAX_WIDTH]; size_t min_len, bin_len; ssize_t len, tmp; struct Printf_Pad pad = {0}; len = 0; min_len = b_bin_repr(bin, info, args[0]); bin_len = b_bin_len(info, min_len); pad.ch = pad_ch(info); if (pad.ch == ’ ‘) pad.len = b_pad_len(info, bin_len); / Padding with ’ ’ (right aligned) / if ((pad.ch == ’ ‘) && !info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } / “0b”/“0B” prefix / if (info->alt) { tmp = b_print_prefix(stream, info); if (tmp == EOF) return EOF; len += tmp; } / Padding with ‘0’ / if (pad.ch == ‘0’) { tmp = b_pad_zeros(stream, info, min_len); if (tmp == EOF) return EOF; len += tmp; } / Print number (including leading 0s to fill precision) / tmp = b_print_number(stream, info, bin, min_len, bin_len); if (tmp == EOF) return EOF; len += tmp; / Padding with ’ ’ (left aligned) */ if (info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } return len; } static int b_arginf_sz(const struct printf_info *info, size_t n, int argtypes[n], [[maybe_unused]] int size[n]) { if (n < 1) return -1; if (info->is_long_double) argtypes[0] = PA_INT | PA_FLAG_LONG_LONG; else if (info->is_long) argtypes[0] = PA_INT | PA_FLAG_LONG; else argtypes[0] = PA_INT; return 1; } static uintmax_t b_value(const struct printf_info *info, const void *arg) { if (info->is_long_double) return *(const unsigned long long *)arg; if (info->is_long) return *(const unsigned long )arg; / short and char are both promoted to int */ return *(const unsigned int *)arg; } static size_t b_bin_repr(char bin[UINTMAX_WIDTH], const struct printf_info *info, const void *arg) { size_t min_len; uintmax_t val; val = b_value(info, arg); bin[0] = ‘0’; for (min_len = 0; val; min_len++) { bin[min_len] = ‘0’ + (val % 2); val »= 1; } return MAX(min_len, 1); } static size_t b_bin_len(const struct printf_info *info, ptrdiff_t min_len) { return MAX(info->prec, min_len); } static size_t b_pad_len(const struct printf_info *info, ptrdiff_t bin_len) { ptrdiff_t pad_len; pad_len = info->width - bin_len; if (info->alt) pad_len -= 2; if (info->group) pad_len -= (bin_len - 1) / 4; return MAX(pad_len, 0); } static ssize_t b_print_prefix(FILE *stream, const struct printf_info *info) { ssize_t len; len = 0; if (fputc(‘0’, stream) == EOF) return EOF; len++; if (fputc(info->spec, stream) == EOF) return EOF; len++; return len; } static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info, ptrdiff_t min_len) { ssize_t len; ptrdiff_t tmp; len = 0; tmp = info->width - (info->alt * 2); if (info->group) tmp -= tmp / 5 - !(tmp % 5); for (ptrdiff_t i = tmp - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static ssize_t b_print_number(FILE *stream, const struct printf_info info, const char bin[UINTMAX_WIDTH], size_t min_len, size_t bin_len) { ssize_t len; len = 0; / Print leading zeros to fill precision / for (size_t i = bin_len - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } / Print number */ for (size_t i = min_len - 1; i < min_len; i–) { if (fputc(bin[i], stream) == EOF) return EOF; len++; if (!info->group || (i % 4) || !i) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static char pad_ch(const struct printf_info *info) { if ((info->prec != -1) || (info->pad == ’ ‘) || info->left) return ’ ‘; return ‘0’; } static ssize_t pad_spaces(FILE *stream, size_t pad_len) { ssize_t len; len = 0; for (size_t i = pad_len - 1; i < pad_len; i–) { if (fputc(’ ‘, stream) == EOF) return EOF; len++; } return len; }

SEE ALSO

asprintf(3), printf(3), wprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

42 - Linux cli command putw

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command putw and provides detailed information about the command putw, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the putw.

NAME 🖥️ putw 🖥️

input and output of words (ints)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int getw(FILE *stream);
int putw(int w, FILE *stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getw(), putw():

    Since glibc 2.3.3:
        _XOPEN_SOURCE && ! (_POSIX_C_SOURCE >= 200112L)
            || /* glibc >= 2.19: */ _DEFAULT_SOURCE
            || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
    Before glibc 2.3.3:
        _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE

DESCRIPTION

getw() reads a word (that is, an int) from stream. It’s provided for compatibility with SVr4. We recommend you use fread(3) instead.

putw() writes the word w (that is, an int) to stream. It is provided for compatibility with SVr4, but we recommend you use fwrite(3) instead.

RETURN VALUE

Normally, getw() returns the word read, and putw() returns 0. On error, they return EOF.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getw(), putw()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

SVr4, SUSv2.

BUGS

The value returned on error is also a legitimate data value. ferror(3) can be used to distinguish between the two cases.

SEE ALSO

ferror(3), fread(3), fwrite(3), getc(3), putc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

43 - Linux cli command XauWriteAuth

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XauWriteAuth and provides detailed information about the command XauWriteAuth, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XauWriteAuth.

NAME 🖥️ XauWriteAuth 🖥️

X authority database routines

SYNOPSIS

#include <X11/Xauth.h>

typedef struct xauth {
        unsigned short  family;
        unsigned short  address_length;
        char    *address;
        unsigned short  number_length;
        char    *number;
        unsigned short  name_length;
        char    *name;
        unsigned short  data_length;
        char    *data;
} Xauth;
char *XauFileName (void);
Xauth *XauReadAuth (FILE *auth_file );
int XauWriteAuth (FILE *auth_file, Xauth *auth );
Xauth *XauGetAuthByAddr (unsigned short family , unsigned short
address_length , const char *address , unsigned short
number_length , const char *number , unsigned short
name_length , const char *name );
Xauth *XauGetBestAuthByAddr (unsigned short family , unsigned short
address_length , const char *address , unsigned short
number_length , const char *number , int types_length ,
char **types , const int *type_lengths );
int XauLockAuth (const char *file_name , int retries , int
timeout , long dead );
int XauUnlockAuth (const char *file_name );
int XauDisposeAuth (Xauth *auth );

DESCRIPTION

XauFileName generates the default authorization file name by first checking the XAUTHORITY environment variable if set, else it returns $HOME/.Xauthority. This name is statically allocated and should not be freed.

XauReadAuth reads the next entry from auth_file. The entry is not statically allocated and should be freed by calling XauDisposeAuth.

XauWriteAuth writes an authorization entry to auth_file. It returns 1 on success, 0 on failure.

XauGetAuthByAddr searches for an entry which matches the given network address/display number pair. The entry is not statically allocated and should be freed by calling XauDisposeAuth.

XauGetBestAuthByAddr is similar to XauGetAuthByAddr, except that a list of acceptable authentication methods is specified. Xau will choose the file entry which matches the earliest entry in this list (e.g., the most secure authentication method). The types argument is an array of strings, one string for each authentication method. types_length specifies how many elements are in the types array. types_lengths is an array of integers representing the length of each string.

XauLockAuth does the work necessary to synchronously update an authorization file. First it makes two file names, one with ``-c’’ appended to file_name, the other with ``-l’’ appended. If the ``-c’’ file already exists and is more than dead seconds old, XauLockAuth removes it and the associated ``-l’’ file. To prevent possible synchronization troubles with NFS, a dead value of zero forces the files to be removed. XauLockAuth makes retries attempts to create and link the file names, pausing timeout seconds between each attempt. XauLockAuth returns a collection of values depending on the results:

LOCK_ERROR
A system error occurred, either a file_name which is too long, or an unexpected failure from a system call. errno may prove useful.

LOCK_TIMEOUT
retries attempts failed

LOCK_SUCCESS
The lock succeeded.

XauUnlockAuth undoes the work of XauLockAuth by unlinking both the ``-c’’ and ``-l’’ file names.

XauDisposeAuth frees storage allocated to hold an authorization entry.

SEE ALSO

xauth(1), xdm(1)

AUTHOR

Keith Packard, MIT X Consortium

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

44 - Linux cli command zip_register_progress_callback

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_register_progress_callback and provides detailed information about the command zip_register_progress_callback, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_register_progress_callback.

libzip (-lzip)

The function

is the obsolete version of

The

function registers a callback function

for the zip archive

This function is called during

after every zip archive entry that’s completely written to disk. The value is a

in the range from 0.0 to 1.0. This can be used to provide progress indicators for user interfaces.

was added in libzip 1.2.0. It was deprecated in libzip 1.3.0, use

instead.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

45 - Linux cli command vwarn

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command vwarn and provides detailed information about the command vwarn, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the vwarn.

NAME 🖥️ vwarn 🖥️

formatted error messages

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <err.h>
[[noreturn]] void err(int eval, const char *fmt, ...);
[[noreturn]] void errx(int eval, const char *fmt, ...);
void warn(const char *fmt, ...);
void warnx(const char *fmt, ...);
#include <stdarg.h>
[[noreturn]] void verr(int eval, const char *fmt, va_list args);
[[noreturn]] void verrx(int eval, const char *fmt, va_list args);
void vwarn(const char *fmt, va_list args);
void vwarnx(const char *fmt, va_list args);

DESCRIPTION

The err() and warn() family of functions display a formatted error message on the standard error output. In all cases, the last component of the program name, a colon character, and a space are output. If the fmt argument is not NULL, the printf(3)-like formatted error message is output. The output is terminated by a newline character.

The err(), verr(), warn(), and vwarn() functions append an error message obtained from strerror(3) based on the global variable errno, preceded by another colon and space unless the fmt argument is NULL.

The errx() and warnx() functions do not append an error message.

The err(), verr(), errx(), and verrx() functions do not return, but exit with the value of the argument eval.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

err(), errx(), warn(), warnx(), verr(), verrx(), vwarn(), vwarnx()

Thread safetyMT-Safe locale

STANDARDS

BSD.

HISTORY

err()
warn()
4.4BSD.

EXAMPLES

Display the current errno information string and exit:

p = malloc(size);
if (p == NULL)
    err(EXIT_FAILURE, NULL);
fd = open(file_name, O_RDONLY, 0);
if (fd == -1)
    err(EXIT_FAILURE, "%s", file_name);

Display an error message and exit:

if (tm.tm_hour < START_TIME)
    errx(EXIT_FAILURE, "too early, wait until %s",
            start_time_string);

Warn of an error:

fd = open(raw_device, O_RDONLY, 0);
if (fd == -1)
    warnx("%s: %s: trying the block device",
            raw_device, strerror(errno));
fd = open(block_device, O_RDONLY, 0);
if (fd == -1)
    err(EXIT_FAILURE, "%s", block_device);

SEE ALSO

error(3), exit(3), perror(3), printf(3), strerror(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

46 - Linux cli command freopen

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command freopen and provides detailed information about the command freopen, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the freopen.

NAME 🖥️ freopen 🖥️

stream open functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
FILE *fopen(const char *restrict pathname",constchar*restrict"mode);
FILE *fdopen(int fd, const char *mode);
FILE *freopen(const char *restrict pathname",constchar*restrict"mode,
 FILE *restrict stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

fdopen():

    _POSIX_C_SOURCE

DESCRIPTION

The fopen() function opens the file whose name is the string pointed to by pathname and associates a stream with it.

The argument mode points to a string beginning with one of the following sequences (possibly followed by additional characters, as described below):

r
Open text file for reading. The stream is positioned at the beginning of the file.

r+
Open for reading and writing. The stream is positioned at the beginning of the file.

w
Truncate file to zero length or create text file for writing. The stream is positioned at the beginning of the file.

w+
Open for reading and writing. The file is created if it does not exist, otherwise it is truncated. The stream is positioned at the beginning of the file.

a
Open for appending (writing at end of file). The file is created if it does not exist. The stream is positioned at the end of the file.

a+
Open for reading and appending (writing at end of file). The file is created if it does not exist. Output is always appended to the end of the file. POSIX is silent on what the initial read position is when using this mode. For glibc, the initial file position for reading is at the beginning of the file, but for Android/BSD/MacOS, the initial file position for reading is at the end of the file.

The mode string can also include the letter ‘b’ either as a last character or as a character between the characters in any of the two-character strings described above. This is strictly for compatibility with ISO C and has no effect; the ‘b’ is ignored on all POSIX conforming systems, including Linux. (Other systems may treat text files and binary files differently, and adding the ‘b’ may be a good idea if you do I/O to a binary file and expect that your program may be ported to non-UNIX environments.)

See NOTES below for details of glibc extensions for mode.

Any created file will have the mode S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH (0666), as modified by the process’s umask value (see umask(2)).

Reads and writes may be intermixed on read/write streams in any order. Note that ANSI C requires that a file positioning function intervene between output and input, unless an input operation encounters end-of-file. (If this condition is not met, then a read is allowed to return the result of writes other than the most recent.) Therefore it is good practice (and indeed sometimes necessary under Linux) to put an fseek(3) or fsetpos(3) operation between write and read operations on such a stream. This operation may be an apparent no-op (as in fseek(…, 0L, SEEK_CUR) called for its synchronizing side effect).

Opening a file in append mode (a as the first character of mode) causes all subsequent write operations to this stream to occur at end-of-file, as if preceded by the call:

fseek(stream, 0, SEEK_END);

The file descriptor associated with the stream is opened as if by a call to open(2) with the following flags:

fopen() modeopen() flags
rO_RDONLY
wO_WRONLY | O_CREAT | O_TRUNC
aO_WRONLY | O_CREAT | O_APPEND
r+O_RDWR
w+O_RDWR | O_CREAT | O_TRUNC
a+O_RDWR | O_CREAT | O_APPEND

fdopen()

The fdopen() function associates a stream with the existing file descriptor, fd. The mode of the stream (one of the values “r”, “r+”, “w”, “w+”, “a”, “a+”) must be compatible with the mode of the file descriptor. The file position indicator of the new stream is set to that belonging to fd, and the error and end-of-file indicators are cleared. Modes “w” or “w+” do not cause truncation of the file. The file descriptor is not dup’ed, and will be closed when the stream created by fdopen() is closed. The result of applying fdopen() to a shared memory object is undefined.

freopen()

The freopen() function opens the file whose name is the string pointed to by pathname and associates the stream pointed to by stream with it. The original stream (if it exists) is closed. The mode argument is used just as in the fopen() function.

If the pathname argument is a null pointer, freopen() changes the mode of the stream to that specified in mode; that is, freopen() reopens the pathname that is associated with the stream. The specification for this behavior was added in the C99 standard, which says:

In this case, the file descriptor associated with the stream need not be closed if the call to freopen() succeeds. It is implementation-defined which changes of mode are permitted (if any), and under what circumstances.

The primary use of the freopen() function is to change the file associated with a standard text stream (stderr, stdin, or stdout).

RETURN VALUE

Upon successful completion fopen(), fdopen(), and freopen() return a FILE pointer. Otherwise, NULL is returned and errno is set to indicate the error.

ERRORS

EINVAL
The mode provided to fopen(), fdopen(), or freopen() was invalid.

The fopen(), fdopen(), and freopen() functions may also fail and set errno for any of the errors specified for the routine malloc(3).

The fopen() function may also fail and set errno for any of the errors specified for the routine open(2).

The fdopen() function may also fail and set errno for any of the errors specified for the routine fcntl(2).

The freopen() function may also fail and set errno for any of the errors specified for the routines open(2), fclose(3), and fflush(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fopen(), fdopen(), freopen()

Thread safetyMT-Safe

STANDARDS

fopen()
freopen()
C11, POSIX.1-2008.

fdopen()
POSIX.1-2008.

HISTORY

fopen()
freopen()
POSIX.1-2001, C89.

fdopen()
POSIX.1-2001.

NOTES

glibc notes

The GNU C library allows the following extensions for the string specified in mode:

c (since glibc 2.3.3)
Do not make the open operation, or subsequent read and write operations, thread cancelation points. This flag is ignored for fdopen().

e (since glibc 2.7)
Open the file with the O_CLOEXEC flag. See open(2) for more information. This flag is ignored for fdopen().

m (since glibc 2.3)
Attempt to access the file using mmap(2), rather than I/O system calls (read(2), write(2)). Currently, use of mmap(2) is attempted only for a file opened for reading.

x
Open the file exclusively (like the O_EXCL flag of open(2)). If the file already exists, fopen() fails, and sets errno to EEXIST. This flag is ignored for fdopen().

In addition to the above characters, fopen() and freopen() support the following syntax in mode:

** ,ccs=**string

The given string is taken as the name of a coded character set and the stream is marked as wide-oriented. Thereafter, internal conversion functions convert I/O to and from the character set string. If the **,ccs=**string syntax is not specified, then the wide-orientation of the stream is determined by the first file operation. If that operation is a wide-character operation, the stream is marked wide-oriented, and functions to convert to the coded character set are loaded.

BUGS

When parsing for individual flag characters in mode (i.e., the characters preceding the “ccs” specification), the glibc implementation of fopen() and freopen() limits the number of characters examined in mode to 7 (or, before glibc 2.14, to 6, which was not enough to include possible specifications such as “rb+cmxe”). The current implementation of fdopen() parses at most 5 characters in mode.

SEE ALSO

open(2), fclose(3), fileno(3), fmemopen(3), fopencookie(3), open_memstream(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

47 - Linux cli command Net_DBus_Annotationpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Annotationpm and provides detailed information about the command Net_DBus_Annotationpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Annotationpm.

NAME 🖥️ Net_DBus_Annotationpm 🖥️

annotations for changing behaviour of APIs

SYNOPSIS

use Net::DBus::Annotation qw(:call); my $object = $service->get_object("/org/example/systemMonitor"); # Block until processes are listed my $processes = $object->list_processes(“someuser”); # Just throw away list of processes, pretty pointless # in this example, but useful if the method doesnt have # a return value $object->list_processes(dbus_call_noreply, “someuser”); # List processes & get on with other work until # the list is returned. my $asyncreply = $object->list_processes(dbus_call_async, “someuser”); … some time later… my $processes = $asyncreply->get_data; # List processes, with a shorter 10 second timeout, instead of # the default 60 seconds my $object->list_processes(dbus_call_timeout, 10 * 1000, “someuser”);

DESCRIPTION

This module provides a number of annotations which will be useful when dealing with the DBus APIs. There are annotations for switching remote calls between sync, async and no-reply mode. More annotations may be added over time.

METHODS

dbus_call_sync
Requests that a method call be performed synchronously, waiting for the reply or error return to be received before continuing.

dbus_call_async
Requests that a method call be performed a-synchronously, returning a pending call object, which will collect the reply when it eventually arrives.

dbus_call_noreply
Requests that a method call be performed a-synchronously, discarding any possible reply or error message.

dbus_call_timeout
Indicates that the next parameter for the method call will specify the time to wait for a reply in milliseconds. If omitted, then the default timeout for the object will be used

AUTHOR

Daniel Berrange <[email protected]>

COPYRIGHT

Copright (C) 2006-2011, Daniel Berrange.

SEE ALSO

Net::DBus, Net::DBus::RemoteObject

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

48 - Linux cli command Regexp_Common_URI_waispm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_URI_waispm and provides detailed information about the command Regexp_Common_URI_waispm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_URI_waispm.

NAME 🖥️ Regexp_Common_URI_waispm 🖥️

  • Returns a pattern for WAIS URIs.

SYNOPSIS

use Regexp::Common qw /URI/; while (<>) { /$RE{URI}{WAIS}/ and print “Contains a WAIS URI. “; }

DESCRIPTION

$RE{URI}{WAIS}

Returns a pattern that matches WAIS URIs, as defined by RFC 1738. WAIS URIs have the form:

“wais:” “//” host [ “:” port ] “/” database [ ( “?” search ) | ( “/” wtype “/” wpath ) ]

Under {-keep}, the following are returned:

$1
The complete URI.

$2
The scheme.

$3
The hostname.

$4
The port, if given.

$5
The database, followed by search or wtype/wpath, if given.

$6
The database.

$7
The part following the database if given, including the question mark or slash.

$8
The search part, if given.

$9
The wtype, if given.

$10
The wpath, if given.

REFERENCES

[RFC 1738]
Berners-Lee, Tim, Masinter, L., McCahill, M.: Uniform Resource Locators (URL). December 1994.

SEE ALSO

Regexp::Common::URI for other supported URIs.

AUTHOR

Damian Conway ([email protected])

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

49 - Linux cli command Tk_eventpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_eventpm and provides detailed information about the command Tk_eventpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_eventpm.

NAME 🖥️ Tk_eventpm 🖥️

Miscellaneous event facilities: define virtual events and generate events

SYNOPSIS

$widget->eventAction(?arg, arg, …?);

DESCRIPTION

The eventAction methods provides several facilities for dealing with window system events, such as defining virtual events and synthesizing events. Virtual events are shared by all widgets of the same MainWindow. Different MainWindows can have different virtual event.

The following methods are currently supported:

$widget->eventAdd(’<<virtual>>’, sequence ?,sequence, …?)
Associates the virtual event virtual with the physical event sequence(s) given by the sequence arguments, so that the virtual event will trigger whenever any one of the sequences occurs. Virtual may be any string value and sequence may have any of the values allowed for the sequence argument to the bind method. If virtual is already defined, the new physical event sequences add to the existing sequences for the event.

$widget->eventDelete(’<<virtual>>’ ?,sequence, sequence, …?)
Deletes each of the sequences from those associated with the virtual event given by virtual. Virtual may be any string value and sequence may have any of the values allowed for the sequence argument to the bind method. Any sequences not currently associated with virtual are ignored. If no sequence argument is provided, all physical event sequences are removed for virtual, so that the virtual event will not trigger anymore.

$widget->eventGenerate(event ?,option => value, option => value, …?)
Generates a window event and arranges for it to be processed just as if it had come from the window system. $window is a reference to the window for which the event will be generated. Event provides a basic description of the event, such as <Shift-Button-2> or <<Paste>>. If Window is empty the whole screen is meant, and coordinates are relative to the screen. Event may have any of the forms allowed for the sequence argument of the bind method except that it must consist of a single event pattern, not a sequence. Option-value pairs may be used to specify additional attributes of the event, such as the x and y mouse position; see “EVENT FIELDS” below. If the -when option is not specified, the event is processed immediately: all of the handlers for the event will complete before the eventGenerate method returns. If the -when option is specified then it determines when the event is processed.

$widget->eventInfo(?’<<virtual>>’?)
Returns information about virtual events. If the <<virtual>> argument is omitted, the return value is a list of all the virtual events that are currently defined. If <<virtual>> is specified then the return value is a list whose elements are the physical event sequences currently defined for the given virtual event; if the virtual event is not defined then undef is returned.

EVENT FIELDS

The following options are supported for the eventGenerate method. These correspond to the ``%’’ expansions allowed in binding callback for the bind method.

-above => window
Window specifies the above field for the event, either as a window path name or as an integer window id. Valid for Configure events. Corresponds to the %a substitution for binding scripts.

-borderwidth => size
Size must be a screen distance; it specifies the border_width field for the event. Valid for Configure events. Corresponds to the %B substitution for binding scripts.

-button => number
Number must be an integer; it specifies the detail field for a ButtonPress or ButtonRelease event, overriding any button number provided in the base event argument. Corresponds to the %b substitution for binding scripts.

-count => number
Number must be an integer; it specifies the count field for the event. Valid for Expose events. Corresponds to the %c substitution for binding scripts.

-delta => number
number must be an integer; it specifies the delta field for the MouseWheel event. The delta refers to the direction and magnitude the mouse wheel was rotated. Note the value is not a screen distance but are units of motion in the mouse wheel. Typically these values are multiples of 120. For example, 120 should scroll the text widget up 4 lines and -240 would scroll the text widget down 8 lines. Of course, other widgets may define different behaviors for mouse wheel motion. This field corresponds to the %D substitution for binding scripts.

-detail => detail
Detail specifies the detail field for the event and must be one of the following:

NotifyAncestor NotifyNonlinearVirtual NotifyDetailNone NotifyPointer NotifyInferior NotifyPointerRoot NotifyNonlinear NotifyVirtual

Valid for Enter, Leave, FocusIn and FocusOut events. Corresponds to the %d substitution for binding scripts.

-focus boolean
Boolean must be a boolean value; it specifies the focus field for the event. Valid for Enter and Leave events. Corresponds to the %f substitution for binding scripts.

-height size
Size must be a screen distance; it specifies the height field for the event. Valid for Configure events. Corresponds to the %h substitution for binding scripts.

-keycode number
Number must be an integer; it specifies the keycode field for the event. Valid for KeyPress and KeyRelease events. Corresponds to the %k substitution for binding scripts.

-keysym name
Name must be the name of a valid keysym, such as g, space, or Return; its corresponding keycode value is used as the keycode field for event, overriding any detail specified in the base event argument. Valid for KeyPress and KeyRelease events. Corresponds to the %K substitution for binding scripts.

-mode notify
Notify specifies the mode field for the event and must be one of NotifyNormal, NotifyGrab, NotifyUngrab, or NotifyWhileGrabbed. Valid for Enter, Leave, FocusIn, and FocusOut events. Corresponds to the %m substitution for binding scripts.

-override boolean
Boolean must be a boolean value; it specifies the override_redirect field for the event. Valid for Map, Reparent, and Configure events. Corresponds to the %o substitution for binding scripts.

-place where
Where specifies the place field for the event; it must be either PlaceOnTop or PlaceOnBottom. Valid for Circulate events. Corresponds to the %p substitution for binding scripts.

-root window
Window must be either a window path name or an integer window identifier; it specifies the root field for the event. Valid for KeyPress, KeyRelease, ButtonPress, ButtonRelease, Enter, Leave, and Motion events. Corresponds to the %R substitution for binding scripts.

-rootx coord
Coord must be a screen distance; it specifies the x_root field for the event. Valid for KeyPress, KeyRelease, ButtonPress, ButtonRelease, Enter, Leave, and Motion events. Corresponds to the %X substitution for binding scripts.

-rooty coord
Coord must be a screen distance; it specifies the y_root field for the event. Valid for KeyPress, KeyRelease, ButtonPress, ButtonRelease, Enter, Leave, and Motion events. Corresponds to the %Y substitution for binding scripts.

-sendevent boolean
Boolean must be a boolean value; it specifies the send_event field for the event. Valid for all events. Corresponds to the %E substitution for binding scripts.

-serial number
Number must be an integer; it specifies the serial field for the event. Valid for all events. Corresponds to the %# substitution for binding scripts.

-state state
State specifies the state field for the event. For KeyPress, KeyRelease, ButtonPress, ButtonRelease, Enter, Leave, and Motion events it must be an integer value. For Visibility events it must be one of VisibilityUnobscured, VisibilityPartiallyObscured, or VisibilityFullyObscured. This option overrides any modifiers such as Meta or Control specified in the base event. Corresponds to the %s substitution for binding scripts.

-subwindow window
Window specifies the subwindow field for the event, either as a path name for a Tk widget or as an integer window identifier. Valid for KeyPress, KeyRelease, ButtonPress, ButtonRelease, Enter, Leave, and Motion events. Similar to %S substitution for binding scripts.

-time integer
Integer must be an integer value; it specifies the time field for the event. Valid for KeyPress, KeyRelease, ButtonPress, ButtonRelease, Enter, Leave, Motion, and Property events. Corresponds to the %t substitution for binding scripts.

-warp boolean
boolean must be a boolean value; it specifies whether the screen pointer should be warped as well. Valid for KeyPress, KeyRelease, ButtonPress, ButtonRelease, and Motion events.

-width size
Size must be a screen distance; it specifies the width field for the event. Valid for Configure events. Corresponds to the %w substitution for binding scripts.

-when when
When determines when the event will be processed; it must have one of the following values:

now
Process the event immediately, before the command returns. This also happens if the -when option is omitted.

tail
Place the event on perl/Tk’s event queue behind any events already queued for this application.

head
Place the event at the front of perl/Tk’s event queue, so that it will be handled before any other events already queued.

mark
Place the event at the front of perl/Tk’s event queue but behind any other events already queued with -when mark. This option is useful when generating a series of events that should be processed in order but at the front of the queue.

-x coord
Coord must be a screen distance; it specifies the x field for the event. Valid for KeyPress, KeyRelease, ButtonPress, ButtonRelease, Motion, Enter, Leave, Expose, Configure, Gravity, and Reparent events. Corresponds to the the %x substitution for binding scripts. If Window is empty the coordinate is relative to the screen, and this option corresponds to the %X substitution for binding scripts.

-y coord
Coord must be a screen distance; it specifies the y field for the event. Valid for KeyPress, KeyRelease, ButtonPress, ButtonRelease, Motion, Enter, Leave, Expose, Configure, Gravity, and Reparent events. Corresponds to the the %y substitution for binding scripts. If Window is empty the coordinate is relative to the screen, and this option corresponds to the %Y substitution for binding scripts. Any options that are not specified when generating an event are filled with the value 0, except for serial, which is filled with the next X event serial number.

VIRTUAL EVENT EXAMPLES

In order for a virtual event binding to trigger, two things must happen. First, the virtual event must be defined with the eventAdd method. Second, a binding must be created for the virtual event with the bind method. Consider the following virtual event definitions:

$widget->eventAdd(<<Paste>> => <Control-y>); $widget->eventAdd(<<Paste>> => <Button-2>); $widget->eventAdd(<<Save>> => <Control-X><Control-S>); $widget->eventAdd(<<Save>> => <Shift-F12>);

In the bind method, a virtual event can be bound like any other builtin event type as follows:

$entry->bind(Tk::Entry, <<Paste>> => sub { $entry->Insert($entry->selectionGet) });

The double angle brackets are used to specify that a virtual event is being bound. If the user types Control-y or presses button 2, or if a <<Paste>> virtual event is synthesized with eventGenerate, then the <<Paste>> binding will be invoked.

If a virtual binding has the exact same sequence as a separate physical binding, then the physical binding will take precedence. Consider the following example:

$mw->eventAdd(<<Paste>> => <Control-y>,<Meta-Control-y>); $mw->bind(Tk::Entry, <Control-y> => sub{print Control-y}); $mw->bind(Tk::Entry, <<Paste>> => sub{print Paste});

When the user types Control-y the <Control-y> binding will be invoked, because a physical event is considered more specific than a virtual event, all other things being equal. However, when the user types Meta-Control-y the <<Paste>> binding will be invoked, because the Meta modifier in the physical pattern associated with the virtual binding is more specific than the <Control-y> sequence for the physical event.

Bindings on a virtual event may be created before the virtual event exists. Indeed, the virtual event never actually needs to be defined, for instance, on platforms where the specific virtual event would meaningless or ungeneratable.

When a definition of a virtual event changes at run time, all windows will respond immediately to the new definition. Starting from the preceding example, if the following code is executed:

$entry->bind(ref($entry), <Control-y> => undef); $entry->eventAdd(<<Paste>> => <Key-F6>);

the behavior will change such in two ways. First, the shadowed <<Paste>> binding will emerge. Typing Control-y will no longer invoke the <Control-y> binding, but instead invoke the virtual event <<Paste>>. Second, pressing the F6 key will now also invoke the <<Paste>> binding.

SEE ALSO

Tk::bind Tk::callbacks

KEYWORDS

event, binding, define, handle, virtual event

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

50 - Linux cli command pthread_cleanup_pop

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_cleanup_pop and provides detailed information about the command pthread_cleanup_pop, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_cleanup_pop.

NAME 🖥️ pthread_cleanup_pop 🖥️

push and pop thread cancelation clean-up handlers

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
void pthread_cleanup_push(void (*routine)(void *), void *arg);
void pthread_cleanup_pop(int execute);

DESCRIPTION

These functions manipulate the calling thread’s stack of thread-cancelation clean-up handlers. A clean-up handler is a function that is automatically executed when a thread is canceled (or in various other circumstances described below); it might, for example, unlock a mutex so that it becomes available to other threads in the process.

The pthread_cleanup_push() function pushes routine onto the top of the stack of clean-up handlers. When routine is later invoked, it will be given arg as its argument.

The pthread_cleanup_pop() function removes the routine at the top of the stack of clean-up handlers, and optionally executes it if execute is nonzero.

A cancelation clean-up handler is popped from the stack and executed in the following circumstances:

  • When a thread is canceled, all of the stacked clean-up handlers are popped and executed in the reverse of the order in which they were pushed onto the stack.

  • When a thread terminates by calling pthread_exit(3), all clean-up handlers are executed as described in the preceding point. (Clean-up handlers are not called if the thread terminates by performing a return from the thread start function.)

  • When a thread calls pthread_cleanup_pop() with a nonzero execute argument, the top-most clean-up handler is popped and executed.

POSIX.1 permits pthread_cleanup_push() and pthread_cleanup_pop() to be implemented as macros that expand to text containing ‘{’ and ‘}’, respectively. For this reason, the caller must ensure that calls to these functions are paired within the same function, and at the same lexical nesting level. (In other words, a clean-up handler is established only during the execution of a specified section of code.)

Calling longjmp(3) (siglongjmp(3)) produces undefined results if any call has been made to pthread_cleanup_push() or pthread_cleanup_pop() without the matching call of the pair since the jump buffer was filled by setjmp(3) (sigsetjmp(3)). Likewise, calling longjmp(3) (siglongjmp(3)) from inside a clean-up handler produces undefined results unless the jump buffer was also filled by setjmp(3) (sigsetjmp(3)) inside the handler.

RETURN VALUE

These functions do not return a value.

ERRORS

There are no errors.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_cleanup_push(), pthread_cleanup_pop()

Thread safetyMT-Safe

VERSIONS

On glibc, the pthread_cleanup_push() and pthread_cleanup_pop() functions are implemented as macros that expand to text containing ‘{’ and ‘}’, respectively. This means that variables declared within the scope of paired calls to these functions will be visible within only that scope.

POSIX.1 says that the effect of using return, break, continue, or goto to prematurely leave a block bracketed pthread_cleanup_push() and pthread_cleanup_pop() is undefined. Portable applications should avoid doing this.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001. glibc 2.0.

EXAMPLES

The program below provides a simple example of the use of the functions described in this page. The program creates a thread that executes a loop bracketed by pthread_cleanup_push() and pthread_cleanup_pop(). This loop increments a global variable, cnt, once each second. Depending on what command-line arguments are supplied, the main thread sends the other thread a cancelation request, or sets a global variable that causes the other thread to exit its loop and terminate normally (by doing a return).

In the following shell session, the main thread sends a cancelation request to the other thread:

$ ./a.out
New thread started
cnt = 0
cnt = 1
Canceling thread
Called clean-up handler
Thread was canceled; cnt = 0

From the above, we see that the thread was canceled, and that the cancelation clean-up handler was called and it reset the value of the global variable cnt to 0.

In the next run, the main program sets a global variable that causes other thread to terminate normally:

$ ./a.out x
New thread started
cnt = 0
cnt = 1
Thread terminated normally; cnt = 2

From the above, we see that the clean-up handler was not executed (because cleanup_pop_arg was 0), and therefore the value of cnt was not reset.

In the next run, the main program sets a global variable that causes the other thread to terminate normally, and supplies a nonzero value for cleanup_pop_arg:

$ ./a.out x 1
New thread started
cnt = 0
cnt = 1
Called clean-up handler
Thread terminated normally; cnt = 0

In the above, we see that although the thread was not canceled, the clean-up handler was executed, because the argument given to pthread_cleanup_pop() was nonzero.

Program source

#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#define handle_error_en(en, msg) \
        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
static int done = 0;
static int cleanup_pop_arg = 0;
static int cnt = 0;
static void
cleanup_handler(void *arg)
{
    printf("Called clean-up handler

“); cnt = 0; } static void * thread_start(void arg) { time_t curr; printf(“New thread started “); pthread_cleanup_push(cleanup_handler, NULL); curr = time(NULL); while (!done) { pthread_testcancel(); / A cancelation point / if (curr < time(NULL)) { curr = time(NULL); printf(“cnt = %d “, cnt); / A cancelation point */ cnt++; } } pthread_cleanup_pop(cleanup_pop_arg); return NULL; } int main(int argc, char *argv[]) { pthread_t thr; int s; void res; s = pthread_create(&thr, NULL, thread_start, NULL); if (s != 0) handle_error_en(s, “pthread_create”); sleep(2); / Allow new thread to run a while */ if (argc > 1) { if (argc > 2) cleanup_pop_arg = atoi(argv[2]); done = 1; } else { printf(“Canceling thread “); s = pthread_cancel(thr); if (s != 0) handle_error_en(s, “pthread_cancel”); } s = pthread_join(thr, &res); if (s != 0) handle_error_en(s, “pthread_join”); if (res == PTHREAD_CANCELED) printf(“Thread was canceled; cnt = %d “, cnt); else printf(“Thread terminated normally; cnt = %d “, cnt); exit(EXIT_SUCCESS); }

SEE ALSO

pthread_cancel(3), pthread_cleanup_push_defer_np(3), pthread_setcancelstate(3), pthread_testcancel(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

51 - Linux cli command X11_Protocol_Connection_INETFHpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command X11_Protocol_Connection_INETFHpm and provides detailed information about the command X11_Protocol_Connection_INETFHpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the X11_Protocol_Connection_INETFHpm.

NAME 🖥️ X11_Protocol_Connection_INETFHpm 🖥️

Perl module for FileHandle-based TCP/IP X11 connections

SYNOPSIS

use X11::Protocol; use X11::Protocol::Connection::INETFH; $conn = X11::Protocol::Connection::INETFH ->open($host, $display_number); $x = X11::Protocol->new($conn);

DESCRIPTION

This module is used by X11::Protocol to establish a connection and communicate with a server over an internet-type TCP/IP socket connection, using the FileHandle module.

AUTHOR

Stephen McCamant <[email protected]>.

SEE ALSO

perl (1), X11::Protocol, X11::Protocol::Connection::UNIXFH, X11::Protocol::Connection::FileHandle, FileHandle.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

52 - Linux cli command zip_source_make_command_bitmap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_make_command_bitmap and provides detailed information about the command zip_source_make_command_bitmap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_make_command_bitmap.

libzip (-lzip)

The

function returns a bitmap of source commands suitable as return value for

It includes all the commands from the argument list, which must be terminated by -1.

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

53 - Linux cli command strcasecmp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strcasecmp and provides detailed information about the command strcasecmp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strcasecmp.

NAME 🖥️ strcasecmp 🖥️

compare two strings ignoring case

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <strings.h>
int strcasecmp(const char *s1, const char *s2);
int strncasecmp(const char s1[.n], const char s2[.n], size_t n);

DESCRIPTION

The strcasecmp() function performs a byte-by-byte comparison of the strings s1 and s2, ignoring the case of the characters. It returns an integer less than, equal to, or greater than zero if s1 is found, respectively, to be less than, to match, or be greater than s2.

The strncasecmp() function is similar, except that it compares no more than n bytes of s1 and s2.

RETURN VALUE

The strcasecmp() and strncasecmp() functions return an integer less than, equal to, or greater than zero if s1 is, after ignoring case, found to be less than, to match, or be greater than s2, respectively.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strcasecmp(), strncasecmp()

Thread safetyMT-Safe locale

STANDARDS

POSIX.1-2008.

HISTORY

4.4BSD, POSIX.1-2001.

The strcasecmp() and strncasecmp() functions first appeared in 4.4BSD, where they were declared in <string.h>. Thus, for reasons of historical compatibility, the glibc <string.h> header file also declares these functions, if the _DEFAULT_SOURCE (or, in glibc 2.19 and earlier, _BSD_SOURCE) feature test macro is defined.

The POSIX.1-2008 standard says of these functions:

When the LC_CTYPE category of the locale being used is from the POSIX locale, these functions shall behave as if the strings had been converted to lowercase and then a byte comparison performed. Otherwise, the results are unspecified.

SEE ALSO

memcmp(3), strcmp(3), strcoll(3), string(3), strncmp(3), wcscasecmp(3), wcsncasecmp(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

54 - Linux cli command uint16_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command uint16_ttype and provides detailed information about the command uint16_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the uint16_ttype.

NAME 🖥️ uint16_ttype 🖥️

fixed-width basic integer types

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <stdint.h>
typedef /* ... */ int8_t;
typedef /* ... */ int16_t;
typedef /* ... */ int32_t;
typedef /* ... */ int64_t;
typedef /* ... */ uint8_t;
typedef /* ... */ uint16_t;
typedef /* ... */ uint32_t;
typedef /* ... */ uint64_t;
#define INT8_WIDTH 8
#define INT16_WIDTH 16
#define INT32_WIDTH 32
#define INT64_WIDTH 64
#define UINT8_WIDTH 8
#define UINT16_WIDTH 16
#define UINT32_WIDTH 32
#define UINT64_WIDTH 64
#define INT8_MAX /* 2**(INT8_WIDTH - 1) - 1 */
#define INT16_MAX /* 2**(INT16_WIDTH - 1) - 1 */
#define INT32_MAX /* 2**(INT32_WIDTH - 1) - 1 */
#define INT64_MAX /* 2**(INT64_WIDTH - 1) - 1 */
#define INT8_MIN /* - 2**(INT8_WIDTH - 1) */
#define INT16_MIN /* - 2**(INT16_WIDTH - 1) */
#define INT32_MIN /* - 2**(INT32_WIDTH - 1) */
#define INT64_MIN /* - 2**(INT64_WIDTH - 1) */
#define UINT8_MAX /* 2**INT8_WIDTH - 1 */
#define UINT16_MAX /* 2**INT16_WIDTH - 1 */
#define UINT32_MAX /* 2**INT32_WIDTH - 1 */
#define UINT64_MAX /* 2**INT64_WIDTH - 1 */
#define INT8_C(c) c ## /* ... */
#define INT16_C(c) c ## /* ... */
#define INT32_C(c) c ## /* ... */
#define INT64_C(c) c ## /* ... */
#define UINT8_C(c) c ## /* ... */
#define UINT16_C(c) c ## /* ... */
#define UINT32_C(c) c ## /* ... */
#define UINT64_C(c) c ## /* ... */

DESCRIPTION

intN*_t* are signed integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are be capable of storing values in the range [INTN**_MIN**, INTN**_MAX**], substituting N by the appropriate number.

uintN*_t* are unsigned integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are capable of storing values in the range [0, UINTN**_MAX**], substituting N by the appropriate number.

According to POSIX, [u]int8_t, [u]int16_t, and [u]int32_t are required; [u]int64_t are only required in implementations that provide integer types with width 64; and all other types of this form are optional.

The macros [U]INTN**_WIDTH** expand to the width in bits of these types (N).

The macros [U]INTN**_MAX** expand to the maximum value that these types can hold.

The macros INTN**_MIN** expand to the minimum value that these types can hold.

The macros [U]INTN**_C**() expand their argument to an integer constant of type [u]intN*_t*.

The length modifiers for the [u]intN*_t* types for the printf(3) family of functions are expanded by macros of the forms PRIdN, PRIiN, PRIuN, and PRIxN (defined in <inttypes.h>); resulting for example in %“PRId64” or %“PRIi64” for printing int64_t values. The length modifiers for the [u]intN*_t* types for the scanf(3) family of functions are expanded by macros of the forms SCNdN, SCNiN, SCNuN, and SCNxN, (defined in <inttypes.h>); resulting for example in %“SCNu8” or %“SCNx8” for scanning uint8_t values.

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The [U]INTN**_WIDTH** macros were added in C23.

NOTES

The following header also provides these types: <inttypes.h>. <arpa/inet.h> also provides uint16_t and uint32_t.

SEE ALSO

intmax_t(3type), intptr_t(3type), printf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

55 - Linux cli command Jcodepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Jcodepm and provides detailed information about the command Jcodepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Jcodepm.

NAME 🖥️ Jcodepm 🖥️

Japanese Charset Handler

SYNOPSIS

use Jcode; # # traditional Jcode::convert(\str, $ocode, $icode, “z”); # or OOP! print Jcode->new($str)->h2z->tr($from, $to)->utf8;

DESCRIPTION

<Japanese document is now available as Jcode::Nihongo. >

Jcode.pm supports both object and traditional approach. With object approach, you can go like;

$iso_2022_jp = Jcode->new($str)->h2z->jis;

Which is more elegant than:

$iso_2022_jp = $str; &jcode::convert(\iso_2022_jp, jis, &jcode::getcode(\str), “z”);

For those unfamiliar with objects, Jcode.pm still supports getcode() and convert().

If the perl version is 5.8.1, Jcode acts as a wrapper to Encode, the standard charset handler module for Perl 5.8 or later.

Methods

Methods mentioned here all return Jcode object unless otherwise mentioned.

Constructors

$j = Jcode->new($str [, $icode])
Creates Jcode object $j from $str. Input code is automatically checked unless you explicitly set $icode. For available charset, see getcode below. For perl 5.8.1 or better, $icode can be any encoding name that Encode understands. $j = Jcode->new($european, iso-latin1); When the object is stringified, it returns the EUC-converted string so you can <print $j> instead of <print $j->euc>.

Passing Reference
Instead of scalar value, You can use reference as Jcode->new(\str); This saves time a little bit. In exchange of the value of $str being converted. (In a way, $str is now tied to jcode object).

$j->set($str [, $icode])
Sets $j’s internal string to $str. Handy when you use Jcode object repeatedly (saves time and memory to create object). # converts mailbox to SJIS format my $jconv = new Jcode; $/ = 00; while(<>){ print $jconv->set(\_)->mime_decode->sjis; }

$j->append($str [, $icode]);
Appends $str to $j’s internal string.

$j = jcode($str [, $icode]);
shortcut for Jcode->new() so you can go like;

Encoded Strings

In general, you can retrieve encoded string as $j->encoded.

$sjis = jcode($str)->sjis

$euc = $j->euc

$jis = $j->jis

$sjis = $j->sjis

$ucs2 = $j->ucs2

$utf8 = $j->utf8

What you code is what you get :)

$iso_2022_jp = $j->iso_2022_jp
Same as $j->h2z->jis. Hankaku Kanas are forcibly converted to Zenkaku. For perl 5.8.1 and better, you can also use any encoding names and aliases that Encode supports. For example: $european = $j->iso_latin1; # replace - with _ for names. FYI: Encode::Encoder uses similar trick.

$j->fallback($fallback)
For perl is 5.8.1 or better, Jcode stores the internal string in UTF-8. Any character that does not map to ->encoding are replaced with a ‘?’, which is Encode standard. my $unistr = “\x{262f}”; # YIN YANG my $j = jcode($unistr); # $j->euc is ? You can change this behavior by specifying fallback like Encode. Values are the same as Encode. Jcode::FB_PERLQQ, Jcode::FB_XMLCREF, Jcode::FB_HTMLCREF are aliased to those of Encode for convenice. print $j->fallback(Jcode::FB_PERLQQ)->euc; # \x{262f} print $j->fallback(Jcode::FB_XMLCREF)->euc; # ☯ print $j->fallback(Jcode::FB_HTMLCREF)->euc; # ☯ The global variable $Jcode::FALLBACK stores the default fallback so you can override that by assigning the value. $Jcode::FALLBACK = Jcode::FB_PERLQQ; # set default fallback scheme

[@lines =] $jcode->jfold([$width, $newline_str, $kref])
folds lines in jcode string every $width (default: 72) where $width is the number of halfwidth character. Fullwidth Characters are counted as two. with a newline string spefied by $newline_str (default: ). Rudimentary kinsoku suppport is now available for Perl 5.8.1 and better.

$length = $jcode->jlength();
returns character length properly, rather than byte length.

Methods that use MIME::Base64

To use methods below, you need MIME::Base64. To install, simply

perl -MCPAN -e CPAN::Shell->install(“MIME::Base64”)

If your perl is 5.6 or better, there is no need since MIME::Base64 is bundled.

$mime_header = $j->mime_encode([$lf, $bpl])
Converts $str to MIME-Header documented in RFC1522. When $lf is specified, it uses $lf to fold line (default: ). When $bpl is specified, it uses $bpl for the number of bytes (default: 76; this number must be smaller than 76). For Perl 5.8.1 or better, you can also encode MIME Header as: $mime_header = $j->MIME_Header; In which case the resulting $mime_header is MIME-B-encoded UTF-8 whereas $j->mime_encode() returnes MIME-B-encoded ISO-2022-JP. Most modern MUAs support both.

$j->mime_decode;
Decodes MIME-Header in Jcode object. For perl 5.8.1 or better, you can also do the same as: Jcode->new($str, MIME-Header)

Hankaku vs. Zenkaku

$j->h2z([$keep_dakuten])
Converts X201 kana (Hankaku) to X208 kana (Zenkaku). When $keep_dakuten is set, it leaves dakuten as is (That is, ka + dakuten is left as is instead of being converted to ga) You can retrieve the number of matches via $j->nmatch;

$j->z2h
Converts X208 kana (Zenkaku) to X201 kana (Hankaku). You can retrieve the number of matches via $j->nmatch;

Regexp emulators

To use ->m() and ->s(), you need perl 5.8.1 or better.

$j->tr($from, $to, $opt);
Applies tr/$from/$to/ on Jcode object where $from and $to are EUC-JP strings. On perl 5.8.1 or better, $from and $to can also be flagged UTF-8 strings. If $opt is set, tr/$from/$to/$opt is applied. $opt must be ‘c’, ’d’ or the combination thereof. You can retrieve the number of matches via $j->nmatch; The following methods are available only for perl 5.8.1 or better.

$j->s($patter, $replace, $opt);
Applies s/$pattern/$replace/$opt. $pattern and replace must be in EUC-JP or flagged UTF-8. $opt are the same as regexp options. See perlre for regexp options. Like $j->tr(), $j->s() returns the object itself so you can nest the operation as follows; $j->tr(“a-z”, “A-Z”)->s(“foo”, “bar”);

[@match = ] $j->m($pattern, $opt);
Applies m/$patter/$opt. Note that this method DOES NOT RETURN AN OBJECT so you can’t chain the method like $j->s().

Instance Variables

If you need to access instance variables of Jcode object, use access methods below instead of directly accessing them (That’s what OOP is all about)

FYI, Jcode uses a ref to array instead of ref to hash (common way) to optimize speed (Actually you don’t have to know as long as you use access methods instead; Once again, that’s OOP)

$j->r_str
Reference to the EUC-coded String.

$j->icode
Input charcode in recent operation.

$j->nmatch
Number of matches (Used in $j->tr, etc.)

Subroutines

($code, [$nmatch]) = getcode($str)
Returns char code of $str. Return codes are as follows ascii Ascii (Contains no Japanese Code) binary Binary (Not Text File) euc EUC-JP sjis SHIFT_JIS jis JIS (ISO-2022-JP) ucs2 UCS2 (Raw Unicode) utf8 UTF8 When array context is used instead of scaler, it also returns how many character codes are found. As mentioned above, $str can be \str instead. jcode.pl Users: This function is 100% upper-conpatible with jcode::getcode() Ω- well, almost; * When its return value is an array, the order is the opposite; jcode::getcode() returns $nmatch first. * jcode::getcode() returns undef when the number of EUC characters is equal to that of SJIS. Jcode::getcode() returns EUC. for Jcode.pm there is no in-betweens.

Jcode::convert($str, [$ocode, $icode, $opt])
Converts $str to char code specified by $ocode. When $icode is specified also, it assumes $icode for input string instead of the one checked by getcode(). As mentioned above, $str can be \str instead. jcode.pl Users: This function is 100% upper-conpatible with jcode::convert() !

BUGS

For perl is 5.8.1 or later, Jcode acts as a wrapper to Encode. Meaning Jcode is subject to bugs therein.

ACKNOWLEDGEMENTS

This package owes a lot in motivation, design, and code, to the jcode.pl for Perl4 by Kazumasa Utashiro <[email protected]>.

Hiroki Ohzaki <[email protected]> has helped me polish regexp from the very first stage of development.

JEncode by [email protected] has inspired me to integrate Encode to Jcode. He has also contributed Japanese POD.

And folks at Jcode Mailing list <[email protected]>. Without them, I couldn’t have coded this far.

SEE ALSO

Encode

Jcode::Nihongo

<http://www.iana.org/assignments/character-sets>

COPYRIGHT

Copyright 1999-2005 Dan Kogai <[email protected]>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

56 - Linux cli command X11_Protocol_Connection_UNIXFHpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command X11_Protocol_Connection_UNIXFHpm and provides detailed information about the command X11_Protocol_Connection_UNIXFHpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the X11_Protocol_Connection_UNIXFHpm.

NAME 🖥️ X11_Protocol_Connection_UNIXFHpm 🖥️

Perl module for FileHandle-based Unix-domain X11 connections

SYNOPSIS

use X11::Protocol; use X11::Protocol::Connection::UNIXFH; $conn = X11::Protocol::Connection::UNIXFH ->open($host, $display_number); $x = X11::Protocol->new($conn);

DESCRIPTION

This module is used by X11::Protocol to establish a connection and communicate with a server over a local Unix-domain socket connection, using the FileHandle module. The host argument is ignored.

AUTHOR

Stephen McCamant <[email protected]>.

SEE ALSO

perl (1), X11::Protocol, X11::Protocol::Connection::INETFH, X11::Protocol::Connection::FileHandle, FileHandle.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

57 - Linux cli command Image_ExifTool_Lang_plpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Lang_plpm and provides detailed information about the command Image_ExifTool_Lang_plpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Lang_plpm.

NAME 🖥️ Image_ExifTool_Lang_plpm 🖥️

ExifTool Polish language translations

DESCRIPTION

This file is used by Image::ExifTool to generate localized tag descriptions and values.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

ACKNOWLEDGEMENTS

Thanks to Jens Duttke, Przemyslaw Sulek and Kacper Perschke for providing this translation.

SEE ALSO

Image::ExifTool (3pm), Image::ExifTool::TagInfoXML (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

58 - Linux cli command pcap_fopen_offlinepcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_fopen_offlinepcap and provides detailed information about the command pcap_fopen_offlinepcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_fopen_offlinepcap.

NAME 🖥️ pcap_fopen_offlinepcap 🖥️

open a saved capture file for reading

SYNOPSIS

#include <pcap/pcap.h>
char errbuf[PCAP_ERRBUF_SIZE];
pcap_t *pcap_open_offline(const char *fname, char *errbuf);
pcap_t *pcap_open_offline_with_tstamp_precision(const char *fname,
    u_int precision, char *errbuf);
pcap_t *pcap_fopen_offline(FILE *fp, char *errbuf);
pcap_t *pcap_fopen_offline_with_tstamp_precision(FILE *fp,
    u_int precision, char *errbuf);

DESCRIPTION

pcap_open_offline() and pcap_open_offline_with_tstamp_precision() are called to open a ``savefile’’ for reading.

fname specifies the name of the file to open. The file can have the pcap file format as described in pcap-savefile(5), which is the file format used by, among other programs, tcpdump(1) and tcpslice(1), or can have the pcapng file format, although not all pcapng files can be read. The name “-” is a synonym for stdin.

pcap_open_offline_with_tstamp_precision() takes an additional precision argument specifying the time stamp precision desired; if PCAP_TSTAMP_PRECISION_MICRO is specified, packet time stamps will be supplied in seconds and microseconds, and if PCAP_TSTAMP_PRECISION_NANO is specified, packet time stamps will be supplied in seconds and nanoseconds. If the time stamps in the file do not have the same precision as the requested precision, they will be scaled up or down as necessary before being supplied.

Alternatively, you may call pcap_fopen_offline() or pcap_fopen_offline_with_tstamp_precision() to read dumped data from an existing open stream fp. pcap_fopen_offline_with_tstamp_precision() takes an additional precision argument as described above. Note that on Windows, that stream should be opened in binary mode.

RETURN VALUE

pcap_open_offline(), pcap_open_offline_with_tstamp_precision(), pcap_fopen_offline(), and pcap_fopen_offline_with_tstamp_precision() return a pcap_t * on success and NULL on failure. If NULL is returned, errbuf is filled in with an appropriate error message. errbuf is assumed to be able to hold at least PCAP_ERRBUF_SIZE chars.

BACKWARD COMPATIBILITY

pcap_open_offline_with_tstamp_precision() and pcap_fopen_offline_with_tstamp_precision() became available in libpcap release 1.5.1. In previous releases, time stamps from a savefile are always given in seconds and microseconds.

SEE ALSO

pcap(3PCAP), pcap-savefile(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

59 - Linux cli command IO_ScalarArraypm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_ScalarArraypm and provides detailed information about the command IO_ScalarArraypm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_ScalarArraypm.

NAME 🖥️ IO_ScalarArraypm 🖥️

IO:: interface for reading/writing an array of scalars

SYNOPSIS

Perform I/O on strings, using the basic OO interface…

use IO::ScalarArray; @data = (“My mes”, “sage: “); ### Open a handle on an array, and append to it: $AH = new IO::ScalarArray \data; $AH->print(“Hello”); $AH->print(”, world! Bye now! “); print “The array is now: “, @data, " “; ### Open a handle on an array, read it line-by-line, then close it: $AH = new IO::ScalarArray \data; while (defined($_ = $AH->getline)) { print “Got line: $_”; } $AH->close; ### Open a handle on an array, and slurp in all the lines: $AH = new IO::ScalarArray \data; print “All lines: “, $AH->getlines; ### Get the current position (either of two ways): $pos = $AH->getpos; $offset = $AH->tell; ### Set the current position (either of two ways): $AH->setpos($pos); $AH->seek($offset, 0); ### Open an anonymous temporary array: $AH = new IO::ScalarArray; $AH->print(“Hi there!”); print “I printed: “, @{$AH->aref}, " “; ### get at value

Don’t like OO for your I/O? No problem. Thanks to the magic of an invisible tie(), the following now works out of the box, just as it does with IO::Handle:

use IO::ScalarArray; @data = (“My mes”, “sage: “); ### Open a handle on an array, and append to it: $AH = new IO::ScalarArray \data; print $AH “Hello”; print $AH “, world! Bye now! “; print “The array is now: “, @data, " “; ### Open a handle on a string, read it line-by-line, then close it: $AH = new IO::ScalarArray \data; while (<$AH>) { print “Got line: $_”; } close $AH; ### Open a handle on a string, and slurp in all the lines: $AH = new IO::ScalarArray \data; print “All lines: “, <$AH>; ### Get the current position (WARNING: requires 5.6): $offset = tell $AH; ### Set the current position (WARNING: requires 5.6): seek $AH, $offset, 0; ### Open an anonymous temporary scalar: $AH = new IO::ScalarArray; print $AH “Hi there!”; print “I printed: “, @{$AH->aref}, " “; ### get at value

And for you folks with 1.x code out there: the old tie() style still works, though this is unnecessary and deprecated:

use IO::ScalarArray; ### Writing to a scalar… my @a; tie *OUT, IO::ScalarArray, \a; print OUT “line 1 line 2 “, “line 3 “; print “Array is now: “, @a, " " ### Reading and writing an anonymous scalar… tie *OUT, IO::ScalarArray; print OUT “line 1 line 2 “, “line 3 “; tied(OUT)->seek(0,0); while (<OUT>) { print “Got line: “, $_; }

DESCRIPTION

This class is part of the IO::Stringy distribution; see IO::Stringy for change log and general information.

The IO::ScalarArray class implements objects which behave just like IO::Handle (or FileHandle) objects, except that you may use them to write to (or read from) arrays of scalars. Logically, an array of scalars defines an in-core “file” whose contents are the concatenation of the scalars in the array. The handles created by this class are automatically tiehandled (though please see “WARNINGS” for information relevant to your Perl version).

For writing large amounts of data with individual print() statements, this class is likely to be more efficient than IO::Scalar.

Basically, this:

my @a; $AH = new IO::ScalarArray \a; $AH->print(“Hel”, “lo, “); ### OO style $AH->print(“world! “); ### ditto

Or this:

my @a; $AH = new IO::ScalarArray \a; print $AH “Hel”, “lo, “; ### non-OO style print $AH “world! “; ### ditto

Causes @a to be set to the following array of 3 strings:

( “Hel” , “lo, " , “world! " )

See IO::Scalar and compare with this class.

PUBLIC INTERFACE

Construction

new [ARGS…]
Class method. Return a new, unattached array handle. If any arguments are given, they’re sent to open().

open [ARRAYREF]
Instance method. Open the array handle on a new array, pointed to by ARRAYREF. If no ARRAYREF is given, a “private” array is created to hold the file data. Returns the self object on success, undefined on error.

opened
Instance method. Is the array handle opened on something?

close
Instance method. Disassociate the array handle from its underlying array. Done automatically on destroy.

Input and output

flush
Instance method. No-op, provided for OO compatibility.

fileno
Instance method. No-op, returns undef

getc
Instance method. Return the next character, or undef if none remain. This does a read (1), which is somewhat costly.

getline
Instance method. Return the next line, or undef on end of data. Can safely be called in an array context. Currently, lines are delimited by " “.

getlines
Instance method. Get all remaining lines. It will croak() if accidentally called in a scalar context.

print ARGS…
Instance method. Print ARGS to the underlying array. Currently, this always causes a “seek to the end of the array” and generates a new array entry. This may change in the future.

read BUF, NBYTES, [OFFSET];
Instance method. Read some bytes from the array. Returns the number of bytes actually read, 0 on end-of-file, undef on error.

write BUF, NBYTES, [OFFSET];
Instance method. Write some bytes into the array.

Seeking/telling and other attributes

autoflush
Instance method. No-op, provided for OO compatibility.

binmode
Instance method. No-op, provided for OO compatibility.

clearerr
Instance method. Clear the error and EOF flags. A no-op.

eof
Instance method. Are we at end of file?

seek POS,WHENCE
Instance method. Seek to a given position in the stream. Only a WHENCE of 0 (SEEK_SET) is supported.

tell
Instance method. Return the current position in the stream, as a numeric offset.

setpos POS
Instance method. Seek to a given position in the array, using the opaque getpos() value. Don’t expect this to be a number.

getpos
Instance method. Return the current position in the array, as an opaque value. Don’t expect this to be a number.

aref
Instance method. Return a reference to the underlying array.

AUTHOR

Eryq ([email protected]). President, ZeeGee Software Inc (http://www.zeegee.com).

CONTRIBUTORS

Dianne Skoll ([email protected]).

COPYRIGHT & LICENSE

Copyright (c) 1997 Erik (Eryq) Dorfman, ZeeGee Software, Inc. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

60 - Linux cli command scalbnl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command scalbnl and provides detailed information about the command scalbnl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the scalbnl.

NAME 🖥️ scalbnl 🖥️

multiply floating-point number by integral power of radix

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double scalbln(double x, long exp);
float scalblnf(float x, long exp);
long double scalblnl(long double x, long exp);
double scalbn(double x, int exp);
float scalbnf(float x, int exp);
long double scalbnl(long double x, int exp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

scalbln(), scalblnf(), scalblnl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE

scalbn(), scalbnf(), scalbnl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions multiply their first argument x by FLT_RADIX (probably 2) to the power of exp, that is:

    x * FLT_RADIX ** exp

The definition of FLT_RADIX can be obtained by including <float.h>.

RETURN VALUE

On success, these functions return x * FLT_RADIX ** exp.

If x is a NaN, a NaN is returned.

If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.

If x is +0 (-0), +0 (-0) is returned.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with a sign the same as x.

If the result underflows, a range error occurs, and the functions return zero, with a sign the same as x.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error, overflow
An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error, underflow
errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

scalbn(), scalbnf(), scalbnl(), scalbln(), scalblnf(), scalblnl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

HISTORY

These functions differ from the obsolete functions described in scalb(3) in the type of their second argument. The functions described on this page have a second argument of an integral type, while those in scalb(3) have a second argument of type double.

NOTES

If FLT_RADIX equals 2 (which is usual), then scalbn() is equivalent to ldexp(3).

BUGS

Before glibc 2.20, these functions did not set errno for range errors.

SEE ALSO

ldexp(3), scalb(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

61 - Linux cli command svc_getreq

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command svc_getreq and provides detailed information about the command svc_getreq, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the svc_getreq.

NAME 🖥️ svc_getreq 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

62 - Linux cli command Image_ExifTool_HTMLpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_HTMLpm and provides detailed information about the command Image_ExifTool_HTMLpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_HTMLpm.

NAME 🖥️ Image_ExifTool_HTMLpm 🖥️

Read HTML meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to extract meta information from HTML documents.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.w3.org/TR/html4/>

<http://www.daisy.org/publications/specifications/daisy_202.html>

<http://vancouver-webpages.com/META/metatags.detail.html>

<http://www.html-reference.com/META.htm>

SEE ALSO

“HTML Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

63 - Linux cli command Image_ExifTool_VCardpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_VCardpm and provides detailed information about the command Image_ExifTool_VCardpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_VCardpm.

NAME 🖥️ Image_ExifTool_VCardpm 🖥️

Read vCard and iCalendar meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read meta information from vCard VCF and iCalendar ICS files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://en.m.wikipedia.org/wiki/VCard>

<http://tools.ietf.org/html/rfc6350>

<http://tools.ietf.org/html/rfc5545>

SEE ALSO

“VCard Tags” in Image::ExifTool::TagNames, “VCard VCalendar Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

64 - Linux cli command posix_spawnp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command posix_spawnp and provides detailed information about the command posix_spawnp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the posix_spawnp.

NAME 🖥️ posix_spawnp 🖥️

spawn a process

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <spawn.h>
int posix_spawn(pid_t *restrict pid, const char *restrict path,
 const posix_spawn_file_actions_t *restrict file_actions,
 const posix_spawnattr_t *restrict attrp,
 char *const argv[restrict],
 char *const envp[restrict]);
int posix_spawnp(pid_t *restrict pid, const char *restrict file,
 const posix_spawn_file_actions_t *restrict file_actions,
 const posix_spawnattr_t *restrict attrp,
 char *const argv[restrict],
 char *const envp[restrict]);

DESCRIPTION

The posix_spawn() and posix_spawnp() functions are used to create a new child process that executes a specified file. These functions were specified by POSIX to provide a standardized method of creating new processes on machines that lack the capability to support the fork(2) system call. These machines are generally small, embedded systems lacking MMU support.

The posix_spawn() and posix_spawnp() functions provide the functionality of a combined fork(2) and exec(3), with some optional housekeeping steps in the child process before the exec(3). These functions are not meant to replace the fork(2) and execve(2) system calls. In fact, they provide only a subset of the functionality that can be achieved by using the system calls.

The only difference between posix_spawn() and posix_spawnp() is the manner in which they specify the file to be executed by the child process. With posix_spawn(), the executable file is specified as a pathname (which can be absolute or relative). With posix_spawnp(), the executable file is specified as a simple filename; the system searches for this file in the list of directories specified by PATH (in the same way as for execvp(3)). For the remainder of this page, the discussion is phrased in terms of posix_spawn(), with the understanding that posix_spawnp() differs only on the point just described.

The remaining arguments to these two functions are as follows:

pid
points to a buffer that is used to return the process ID of the new child process.

file_actions
points to a spawn file actions object that specifies file-related actions to be performed in the child between the fork(2) and exec(3) steps. This object is initialized and populated before the posix_spawn() call using posix_spawn_file_actions_init(3) and the posix_spawn_file_actions_*() functions.

attrp
points to an attributes objects that specifies various attributes of the created child process. This object is initialized and populated before the posix_spawn() call using posix_spawnattr_init(3) and the posix_spawnattr_*() functions.

argv
envp
specify the argument list and environment for the program that is executed in the child process, as for execve(2).

Below, the functions are described in terms of a three-step process: the fork() step, the pre-exec() step (executed in the child), and the exec() step (executed in the child).

fork() step

Since glibc 2.24, the posix_spawn() function commences by calling clone(2) with CLONE_VM and CLONE_VFORK flags. Older implementations use fork(2), or possibly vfork(2) (see below).

The PID of the new child process is placed in *pid. The posix_spawn() function then returns control to the parent process.

Subsequently, the parent can use one of the system calls described in wait(2) to check the status of the child process. If the child fails in any of the housekeeping steps described below, or fails to execute the desired file, it exits with a status of 127.

Before glibc 2.24, the child process is created using vfork(2) instead of fork(2) when either of the following is true:

  • the spawn-flags element of the attributes object pointed to by attrp contains the GNU-specific flag POSIX_SPAWN_USEVFORK; or

  • file_actions is NULL and the spawn-flags element of the attributes object pointed to by attrp does not contain POSIX_SPAWN_SETSIGMASK, POSIX_SPAWN_SETSIGDEF, POSIX_SPAWN_SETSCHEDPARAM, POSIX_SPAWN_SETSCHEDULER, POSIX_SPAWN_SETPGROUP, or POSIX_SPAWN_RESETIDS.

In other words, vfork(2) is used if the caller requests it, or if there is no cleanup expected in the child before it exec(3)s the requested file.

pre-exec() step: housekeeping

In between the fork() and the exec() steps, a child process may need to perform a set of housekeeping actions. The posix_spawn() and posix_spawnp() functions support a small, well-defined set of system tasks that the child process can accomplish before it executes the executable file. These operations are controlled by the attributes object pointed to by attrp and the file actions object pointed to by file_actions. In the child, processing is done in the following sequence:

  1. Process attribute actions: signal mask, signal default handlers, scheduling algorithm and parameters, process group, and effective user and group IDs are changed as specified by the attributes object pointed to by attrp.

  2. File actions, as specified in the file_actions argument, are performed in the order that they were specified using calls to the posix_spawn_file_actions_add*() functions.

  3. File descriptors with the FD_CLOEXEC flag set are closed.

All process attributes in the child, other than those affected by attributes specified in the object pointed to by attrp and the file actions in the object pointed to by file_actions, will be affected as though the child was created with fork(2) and it executed the program with execve(2).

The process attributes actions are defined by the attributes object pointed to by attrp. The spawn-flags attribute (set using posix_spawnattr_setflags(3)) controls the general actions that occur, and other attributes in the object specify values to be used during those actions.

The effects of the flags that may be specified in spawn-flags are as follows:

POSIX_SPAWN_SETSIGMASK
Set the signal mask to the signal set specified in the spawn-sigmask attribute of the object pointed to by attrp. If the POSIX_SPAWN_SETSIGMASK flag is not set, then the child inherits the parent’s signal mask.

POSIX_SPAWN_SETSIGDEF
Reset the disposition of all signals in the set specified in the spawn-sigdefault attribute of the object pointed to by attrp to the default. For the treatment of the dispositions of signals not specified in the spawn-sigdefault attribute, or the treatment when POSIX_SPAWN_SETSIGDEF is not specified, see execve(2).

POSIX_SPAWN_SETSCHEDPARAM
If this flag is set, and the POSIX_SPAWN_SETSCHEDULER flag is not set, then set the scheduling parameters to the parameters specified in the spawn-schedparam attribute of the object pointed to by attrp.

POSIX_SPAWN_SETSCHEDULER
Set the scheduling policy algorithm and parameters of the child, as follows:

  • The scheduling policy is set to the value specified in the spawn-schedpolicy attribute of the object pointed to by attrp.

  • The scheduling parameters are set to the value specified in the spawn-schedparam attribute of the object pointed to by attrp (but see BUGS).

If the POSIX_SPAWN_SETSCHEDPARAM and POSIX_SPAWN_SETSCHEDPOLICY flags are not specified, the child inherits the corresponding scheduling attributes from the parent.

POSIX_SPAWN_RESETIDS
If this flag is set, reset the effective UID and GID to the real UID and GID of the parent process. If this flag is not set, then the child retains the effective UID and GID of the parent. In either case, if the set-user-ID and set-group-ID permission bits are enabled on the executable file, their effect will override the setting of the effective UID and GID (se execve(2)).

POSIX_SPAWN_SETPGROUP
Set the process group to the value specified in the spawn-pgroup attribute of the object pointed to by attrp. If the spawn-pgroup attribute has the value 0, the child’s process group ID is made the same as its process ID. If the POSIX_SPAWN_SETPGROUP flag is not set, the child inherits the parent’s process group ID.

POSIX_SPAWN_USEVFORK
Since glibc 2.24, this flag has no effect. On older implementations, setting this flag forces the fork() step to use vfork(2) instead of fork(2). The _GNU_SOURCE feature test macro must be defined to obtain the definition of this constant.

POSIX_SPAWN_SETSID (since glibc 2.26)
If this flag is set, the child process shall create a new session and become the session leader. The child process shall also become the process group leader of the new process group in the session (see setsid(2)). The _GNU_SOURCE feature test macro must be defined to obtain the definition of this constant.

If attrp is NULL, then the default behaviors described above for each flag apply.

The file_actions argument specifies a sequence of file operations that are performed in the child process after the general processing described above, and before it performs the exec(3). If file_actions is NULL, then no special action is taken, and standard exec(3) semantics apply—file descriptors open before the exec remain open in the new process, except those for which the FD_CLOEXEC flag has been set. File locks remain in place.

If file_actions is not NULL, then it contains an ordered set of requests to open(2), close(2), and dup2(2) files. These requests are added to the file_actions by posix_spawn_file_actions_addopen(3), posix_spawn_file_actions_addclose(3), and posix_spawn_file_actions_adddup2(3). The requested operations are performed in the order they were added to file_actions.

If any of the housekeeping actions fails (due to bogus values being passed or other reasons why signal handling, process scheduling, process group ID functions, and file descriptor operations might fail), the child process exits with exit value 127.

exec() step

Once the child has successfully forked and performed all requested pre-exec steps, the child runs the requested executable.

The child process takes its environment from the envp argument, which is interpreted as if it had been passed to execve(2). The arguments to the created process come from the argv argument, which is processed as for execve(2).

RETURN VALUE

Upon successful completion, posix_spawn() and posix_spawnp() place the PID of the child process in pid, and return 0. If there is an error during the fork() step, then no child is created, the contents of *pid are unspecified, and these functions return an error number as described below.

Even when these functions return a success status, the child process may still fail for a plethora of reasons related to its pre-exec() initialization. In addition, the exec(3) may fail. In all of these cases, the child process will exit with the exit value of 127.

ERRORS

The posix_spawn() and posix_spawnp() functions fail only in the case where the underlying fork(2), vfork(2), or clone(2) call fails; in these cases, these functions return an error number, which will be one of the errors described for fork(2), vfork(2), or clone(2).

In addition, these functions fail if:

ENOSYS
Function not supported on this system.

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.2. POSIX.1-2001.

NOTES

The housekeeping activities in the child are controlled by the objects pointed to by attrp (for non-file actions) and file_actions In POSIX parlance, the posix_spawnattr_t and posix_spawn_file_actions_t data types are referred to as objects, and their elements are not specified by name. Portable programs should initialize these objects using only the POSIX-specified functions. (In other words, although these objects may be implemented as structures containing fields, portable programs must avoid dependence on such implementation details.)

According to POSIX, it is unspecified whether fork handlers established with pthread_atfork(3) are called when posix_spawn() is invoked. Since glibc 2.24, the fork handlers are not executed in any case. On older implementations, fork handlers are called only if the child is created using fork(2).

There is no “posix_fspawn” function (i.e., a function that is to posix_spawn() as fexecve(3) is to execve(2)). However, this functionality can be obtained by specifying the path argument as one of the files in the caller’s /proc/self/fd directory.

BUGS

POSIX.1 says that when POSIX_SPAWN_SETSCHEDULER is specified in spawn-flags, then the POSIX_SPAWN_SETSCHEDPARAM (if present) is ignored. However, before glibc 2.14, calls to posix_spawn() failed with an error if POSIX_SPAWN_SETSCHEDULER was specified without also specifying POSIX_SPAWN_SETSCHEDPARAM.

EXAMPLES

The program below demonstrates the use of various functions in the POSIX spawn API. The program accepts command-line attributes that can be used to create file actions and attributes objects. The remaining command-line arguments are used as the executable name and command-line arguments of the program that is executed in the child.

In the first run, the date(1) command is executed in the child, and the posix_spawn() call employs no file actions or attributes objects.

$ ./a.out date
PID of child: 7634
Tue Feb  1 19:47:50 CEST 2011
Child status: exited, status=0

In the next run, the -c command-line option is used to create a file actions object that closes standard output in the child. Consequently, date(1) fails when trying to perform output and exits with a status of 1.

$ ./a.out -c date
PID of child: 7636
date: write error: Bad file descriptor
Child status: exited, status=1

In the next run, the -s command-line option is used to create an attributes object that specifies that all (blockable) signals in the child should be blocked. Consequently, trying to kill child with the default signal sent by kill(1) (i.e., SIGTERM) fails, because that signal is blocked. Therefore, to kill the child, SIGKILL is necessary (SIGKILL can’t be blocked).

$ ./a.out -s sleep 60 &
[1] 7637
$ PID of child: 7638
$ kill 7638
$ kill -KILL 7638
$ Child status: killed by signal 9
[1]+  Done                    ./a.out -s sleep 60

When we try to execute a nonexistent command in the child, the exec(3) fails and the child exits with a status of 127.

$ ./a.out xxxxx
PID of child: 10190
Child status: exited, status=127

Program source

#include <errno.h>
#include <spawn.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <wait.h>
#define errExit(msg)    do { perror(msg); \
                             exit(EXIT_FAILURE); } while (0)
#define errExitEN(en, msg) \
                        do { errno = en; perror(msg); \
                             exit(EXIT_FAILURE); } while (0)
char **environ;
int
main(int argc, char *argv[])
{
    pid_t child_pid;
    int s, opt, status;
    sigset_t mask;
    posix_spawnattr_t attr;
    posix_spawnattr_t *attrp;
    posix_spawn_file_actions_t file_actions;
    posix_spawn_file_actions_t *file_actionsp;
    /* Parse command-line options, which can be used to specify an
       attributes object and file actions object for the child. */
    attrp = NULL;
    file_actionsp = NULL;
    while ((opt = getopt(argc, argv, "sc")) != -1) {
        switch (opt) {
        case 'c':       /* -c: close standard output in child */
            /* Create a file actions object and add a "close"
               action to it. */
            s = posix_spawn_file_actions_init(&file_actions);
            if (s != 0)
                errExitEN(s, "posix_spawn_file_actions_init");
            s = posix_spawn_file_actions_addclose(&file_actions,
                                                  STDOUT_FILENO);
            if (s != 0)
                errExitEN(s, "posix_spawn_file_actions_addclose");
            file_actionsp = &file_actions;
            break;
        case 's':       /* -s: block all signals in child */
            /* Create an attributes object and add a "set signal mask"
               action to it. */
            s = posix_spawnattr_init(&attr);
            if (s != 0)
                errExitEN(s, "posix_spawnattr_init");
            s = posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETSIGMASK);
            if (s != 0)
                errExitEN(s, "posix_spawnattr_setflags");
            sigfillset(&mask);
            s = posix_spawnattr_setsigmask(&attr, &mask);
            if (s != 0)
                errExitEN(s, "posix_spawnattr_setsigmask");
            attrp = &attr;
            break;
        }
    }
    /* Spawn the child. The name of the program to execute and the
       command-line arguments are taken from the command-line arguments
       of this program. The environment of the program execed in the
       child is made the same as the parent's environment. */
    s = posix_spawnp(&child_pid, argv[optind], file_actionsp, attrp,
                     &argv[optind], environ);
    if (s != 0)
        errExitEN(s, "posix_spawn");
    /* Destroy any objects that we created earlier. */
    if (attrp != NULL) {
        s = posix_spawnattr_destroy(attrp);
        if (s != 0)
            errExitEN(s, "posix_spawnattr_destroy");
    }
    if (file_actionsp != NULL) {
        s = posix_spawn_file_actions_destroy(file_actionsp);
        if (s != 0)
            errExitEN(s, "posix_spawn_file_actions_destroy");
    }
    printf("PID of child: %jd

“, (intmax_t) child_pid); /* Monitor status of the child until it terminates. */ do { s = waitpid(child_pid, &status, WUNTRACED | WCONTINUED); if (s == -1) errExit(“waitpid”); printf(“Child status: “); if (WIFEXITED(status)) { printf(“exited, status=%d “, WEXITSTATUS(status)); } else if (WIFSIGNALED(status)) { printf(“killed by signal %d “, WTERMSIG(status)); } else if (WIFSTOPPED(status)) { printf(“stopped by signal %d “, WSTOPSIG(status)); } else if (WIFCONTINUED(status)) { printf(“continued “); } } while (!WIFEXITED(status) && !WIFSIGNALED(status)); exit(EXIT_SUCCESS); }

SEE ALSO

close(2), dup2(2), execl(2), execlp(2), fork(2), open(2), sched_setparam(2), sched_setscheduler(2), setpgid(2), setuid(2), sigaction(2), sigprocmask(2), posix_spawn_file_actions_addclose(3), posix_spawn_file_actions_adddup2(3), posix_spawn_file_actions_addopen(3), posix_spawn_file_actions_destroy(3), posix_spawn_file_actions_init(3), posix_spawnattr_destroy(3), posix_spawnattr_getflags(3), posix_spawnattr_getpgroup(3), posix_spawnattr_getschedparam(3), posix_spawnattr_getschedpolicy(3), posix_spawnattr_getsigdefault(3), posix_spawnattr_getsigmask(3), posix_spawnattr_init(3), posix_spawnattr_setflags(3), posix_spawnattr_setpgroup(3), posix_spawnattr_setschedparam(3), posix_spawnattr_setschedpolicy(3), posix_spawnattr_setsigdefault(3), posix_spawnattr_setsigmask(3), pthread_atfork(3), <spawn.h>, Base Definitions volume of POSIX.1-2001, http://www.opengroup.org/unix/online.html

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

65 - Linux cli command XtRegisterDrawable

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtRegisterDrawable and provides detailed information about the command XtRegisterDrawable, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtRegisterDrawable.

NAME 🖥️ XtRegisterDrawable 🖥️

register a drawable with the Intrinsics event dispatcher

SYNTAX

#include <X11/Intrinsic.h>

void XtRegisterDrawable(Display* display, Drawable drawable, Widget widget);

void XtUnregisterDrawable(Display* display, Drawable drawable);

ARGUMENTS

display
Specifies the drawable’s display.

drawable
Specifies the drawable to register.

widget
Specifies the widget to register the drawable for.

DESCRIPTION

XtRegisterDrawable associates the specified drawable with the specified widget so that future calls to XtWindowToWidget with the drawable will return the widget. The default event dispatcher will dispatch future core events that arrive with the drawable to the widget as though the event contained the widget’s window, but the event itself will not be changed in any way when being passed to even handler or action procedures.

If the drawable is already registered with another widget, or if the drawable is the window of a widget in the client’s widget tree, the results of calling XtRegisterDrawable are undefined.

XtUnregisterDrawable removes an association created with XtRegisterDrawable. If the drawable is the window of a widget in the client’s widget tree the results of calling XtUnregisterDrawable are undefined.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

66 - Linux cli command XtSetValues

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtSetValues and provides detailed information about the command XtSetValues, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtSetValues.

NAME 🖥️ XtSetValues 🖥️

obtain and set widget resources

SYNTAX

#include <X11/Intrinsic.h>

void XtSetValues(Widget w, ArgList args, Cardinal num_args);

void XtVaSetValues(Widget w, … );

void XtSetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);

void XtVaSetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, … );

void XtGetValues(Widget w, ArgList args, Cardinal num_args);

void XtVaGetValues(Widget w, … );

void XtGetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);

void XtVaGetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, … );

ARGUMENTS

args
Specifies the argument list of name/address pairs that contain the resource name and either the address into which the resource value is to be stored or their new values.

base
Specifies the base address of the subpart data structure where the resources should be retrieved or written.

num_args
Specifies the number of arguments in the argument list.

resources
Specifies the nonwidget resource list or values.

num_resources
Specifies the number of resources in the resource list.

  1. Specifies the widget.


Specifies the variable argument list of name/address pairs that contain the resource name and either the address into which the resource value is to be stored or their new values.

DESCRIPTION

The XtSetValues function starts with the resources specified for the Core widget fields and proceeds down the subclass chain to the widget. At each stage, it writes the new value (if specified by one of the arguments) or the existing value (if no new value is specified) to a new widget data record. XtSetValues then calls the set_values procedures for the widget in superclass-to-subclass order. If the widget has any non-NULL set_values_hook fields, these are called immediately after the corresponding set_values procedure. This procedure permits subclasses to set nonwidget data for XtSetValues.

If the widget’s parent is a subclass of constraintWidgetClass, XtSetValues also updates the widget’s constraints. It starts with the constraint resources specified for constraintWidgetClass and proceeds down the subclass chain to the parent’s class. At each stage, it writes the new value or the existing value to a new constraint record. It then calls the constraint set_values procedures from constraintWidgetClass down to the parent’s class. The constraint set_values procedures are called with widget arguments, as for all set_values procedures, not just the constraint record arguments, so that they can make adjustments to the desired values based on full information about the widget.

XtSetValues determines if a geometry request is needed by comparing the current widget to the new widget. If any geometry changes are required, it makes the request, and the geometry manager returns XtGeometryYes, XtGeometryAlmost, or XtGeometryNo. If XtGeometryYes, XtSetValues calls the widget’s resize procedure. If XtGeometryNo, XtSetValues resets the geometry fields to their original values. If XtGeometryAlmost, XtSetValues calls the set_values_almost procedure, which determines what should be done and writes new values for the geometry fields into the new widget. XtSetValues then repeats this process, deciding once more whether the geometry manager should be called.

Finally, if any of the set_values procedures returned True, XtSetValues causes the widget’s expose procedure to be invoked by calling the Xlib XClearArea function on the widget’s window.

The XtSetSubvalues function stores resources into the structure identified by base.

The XtGetValues function starts with the resources specified for the core widget fields and proceeds down the subclass chain to the widget. The value field of a passed argument list should contain the address into which to store the corresponding resource value. It is the caller’s responsibility to allocate and deallocate this storage according to the size of the resource representation type used within the widget.

If the widget’s parent is a subclass of constraintWidgetClass, XtGetValues then fetches the values for any constraint resources requested. It starts with the constraint resources specified for constraintWidgetClass and proceeds down to the subclass chain to the parent’s constraint resources. If the argument list contains a resource name that is not found in any of the resource lists searched, the value at the corresponding address is not modified. Finally, if the get_values_hook procedures are non-NULL, they are called in superclass-to-subclass order after all the resource values have been fetched by XtGetValues. This permits a subclass to provide nonwidget resource data to XtGetValues.

The XtGetSubvalues function obtains resource values from the structure identified by base.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

67 - Linux cli command significand

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command significand and provides detailed information about the command significand, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the significand.

NAME 🖥️ significand 🖥️

get mantissa of floating-point number

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double significand(double x);
float significandf(float x);
long double significandl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

significand(), significandf(), significandl():

    /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the mantissa of x scaled to the range [1FLT_RADIX). They are equivalent to

scalb(x, (double) -ilogb(x))

This function exists mainly for use in certain standardized tests for IEEE 754 conformance.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

significand(), significandf(), significandl()

Thread safetyMT-Safe

STANDARDS

None.

significand()
BSD.

HISTORY

significand()
BSD.

SEE ALSO

ilogb(3), scalb(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

68 - Linux cli command getutline

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getutline and provides detailed information about the command getutline, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getutline.

NAME 🖥️ getutline 🖥️

access utmp file entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <utmp.h>
struct utmp *getutent(void);
struct utmp *getutid(const struct utmp *ut);
struct utmp *getutline(const struct utmp *ut);
struct utmp *pututline(const struct utmp *ut);
void setutent(void);
void endutent(void);
int utmpname(const char *file);

DESCRIPTION

New applications should use the POSIX.1-specified “utmpx” versions of these functions; see STANDARDS.

utmpname() sets the name of the utmp-format file for the other utmp functions to access. If utmpname() is not used to set the filename before the other functions are used, they assume _PATH_UTMP, as defined in <paths.h>.

setutent() rewinds the file pointer to the beginning of the utmp file. It is generally a good idea to call it before any of the other functions.

endutent() closes the utmp file. It should be called when the user code is done accessing the file with the other functions.

getutent() reads a line from the current file position in the utmp file. It returns a pointer to a structure containing the fields of the line. The definition of this structure is shown in utmp(5).

getutid() searches forward from the current file position in the utmp file based upon ut. If ut->ut_type is one of RUN_LVL, BOOT_TIME, NEW_TIME, or OLD_TIME, getutid() will find the first entry whose ut_type field matches ut->ut_type. If ut->ut_type is one of INIT_PROCESS, LOGIN_PROCESS, USER_PROCESS, or DEAD_PROCESS, getutid() will find the first entry whose ut_id field matches ut->ut_id.

getutline() searches forward from the current file position in the utmp file. It scans entries whose ut_type is USER_PROCESS or LOGIN_PROCESS and returns the first one whose ut_line field matches ut->ut_line.

pututline() writes the utmp structure ut into the utmp file. It uses getutid() to search for the proper place in the file to insert the new entry. If it cannot find an appropriate slot for ut, pututline() will append the new entry to the end of the file.

RETURN VALUE

getutent(), getutid(), and getutline() return a pointer to a struct utmp on success, and NULL on failure (which includes the “record not found” case). This struct utmp is allocated in static storage, and may be overwritten by subsequent calls.

On success pututline() returns ut; on failure, it returns NULL.

utmpname() returns 0 if the new name was successfully stored, or -1 on failure.

On failure, these functions errno set to indicate the error.

ERRORS

ENOMEM
Out of memory.

ESRCH
Record not found.

setutent(), pututline(), and the getut*() functions can also fail for the reasons described in open(2).

FILES

/var/run/utmp
database of currently logged-in users

/var/log/wtmp
database of past user logins

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getutent()

Thread safety

MT-Unsafe init race:utent race:utentbuf sig:ALRM timer

getutid(), getutline()

Thread safety

MT-Unsafe init race:utent sig:ALRM timer

pututline()

Thread safety

MT-Unsafe race:utent sig:ALRM timer

setutent(), endutent(), utmpname()

Thread safetyMT-Unsafe race:utent

In the above table, utent in race:utent signifies that if any of the functions setutent(), getutent(), getutid(), getutline(), pututline(), utmpname(), or endutent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

None.

HISTORY

XPG2, SVr4.

In XPG2 and SVID 2 the function pututline() is documented to return void, and that is what it does on many systems (AIX, HP-UX). HP-UX introduces a new function _pututline() with the prototype given above for pututline().

All these functions are obsolete now on non-Linux systems. POSIX.1-2001 and POSIX.1-2008, following SUSv1, does not have any of these functions, but instead uses

#include <utmpx.h> struct utmpx *getutxent(void); struct utmpx *getutxid(const struct utmpx *); struct utmpx *getutxline(const struct utmpx *); struct utmpx *pututxline(const struct utmpx *); void setutxent(void); void endutxent(void);

These functions are provided by glibc, and perform the same task as their equivalents without the “x”, but use struct utmpx, defined on Linux to be the same as struct utmp. For completeness, glibc also provides utmpxname(), although this function is not specified by POSIX.1.

On some other systems, the utmpx structure is a superset of the utmp structure, with additional fields, and larger versions of the existing fields, and parallel files are maintained, often /var/*/utmpx and /var/*/wtmpx.

Linux glibc on the other hand does not use a parallel utmpx file since its utmp structure is already large enough. The “x” functions listed above are just aliases for their counterparts without the “x” (e.g., getutxent() is an alias for getutent()).

NOTES

glibc notes

The above functions are not thread-safe. glibc adds reentrant versions

#include <utmp.h>
int getutent_r(struct utmp *ubuf, struct utmp **ubufp);
int getutid_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);
int getutline_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getutent_r(), getutid_r(), getutline_r():

    _GNU_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */    _SVID_SOURCE || _BSD_SOURCE

These functions are GNU extensions, analogs of the functions of the same name without the _r suffix. The ubuf argument gives these functions a place to store their result. On success, they return 0, and a pointer to the result is written in *ubufp. On error, these functions return -1. There are no utmpx equivalents of the above functions. (POSIX.1 does not specify such functions.)

EXAMPLES

The following example adds and removes a utmp record, assuming it is run from within a pseudo terminal. For usage in a real application, you should check the return values of getpwuid(3) and ttyname(3).

#include <pwd.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <utmp.h>
int
main(void)
{
    struct utmp entry;
    system("echo before adding entry:;who");
    entry.ut_type = USER_PROCESS;
    entry.ut_pid = getpid();
    strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen("/dev/"));
    /* only correct for ptys named /dev/tty[pqr][0-9a-z] */
    strcpy(entry.ut_id, ttyname(STDIN_FILENO) + strlen("/dev/tty"));
    entry.ut_time = time(NULL);
    strcpy(entry.ut_user, getpwuid(getuid())->pw_name);
    memset(entry.ut_host, 0, UT_HOSTSIZE);
    entry.ut_addr = 0;
    setutent();
    pututline(&entry);
    system("echo after adding entry:;who");
    entry.ut_type = DEAD_PROCESS;
    memset(entry.ut_line, 0, UT_LINESIZE);
    entry.ut_time = 0;
    memset(entry.ut_user, 0, UT_NAMESIZE);
    setutent();
    pututline(&entry);
    system("echo after removing entry:;who");
    endutent();
    exit(EXIT_SUCCESS);
}

SEE ALSO

getutmp(3), utmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

69 - Linux cli command XShm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XShm and provides detailed information about the command XShm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XShm.

NAME 🖥️ XShm 🖥️

X Shared Memory extension functions

SYNTAX

#include <X11/Xlib.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
Bool	XShmQueryExtension(
	Display *display);
Bool XShmQueryVersion(
	Display *display;
	int *major, *minor;
	Bool *pixmaps);
int XShmPixmapFormat(
	Display *display);
Bool XShmAttach(
	Display *display;
	XShmSegmentInfo *shminfo);
Bool XShmDetach(
	Display *display;
	XShmSegmentInfo *shminfo);

XImage *XShmCreateImage (
	Display *display;
	Visual *visual;
	unsigned int depth;
	int format;
	char *data;
	XShmSegmentInfo *shminfo;
	unsigned int width, height);
Bool XShmPutImage(
	Display *display;
	Drawable d;
	GC gc;
	XImage *image;
	int src_x, src_y, dest_x, dest_y;
	unsigned int width, height;
	bool send_event);
Bool XShmGetImage (
	Display *display;
	Drawable d;
	XImage *image;
	int x, y;
	unsigned long plane_mask);
Pixmap XShmCreatePixmap(
        Display *display;
        Drawable d;
        char *data;
	XShmSegmentInfo *shminfo;
	unsigned int width, height, depth);
Status XShmGetEventBase(
	Display *display);

STRUCTURES

Events:
typedef struct {
    int type;               /* of event */
    unsigned long serial;   /* # of last request processed by server*/
    Bool send_event;        /* true if this came from a SendEvent request*/
    Display *display;       /* Display the event was read from */
    Drawable drawable;      /* drawable of request */
    int major_code;         /* ShmReqCode */
    int minor_code;         /* X_ShmPutImage */
    ShmSeg shmseg;          /* the ShmSeg used in the request*/
    unsigned long offset;   /* the offset into ShmSeg used in the request*/
} XShmCompletionEvent;
a structure of type XShmSegmentInfo :

typedef struct {
    ShmSeg shmseg;      /* resource id */
    int shmid;          /* kernel id */
    char *shmaddr;      /* address in client */
    Bool readOnly;      /* how the server should attach it */
} XShmSegmentInfo;

DESCRIPTION

* XShmQueryExtension * checks to see if the shared memory extensions are available for the specified display.

* XShmQueryVersion * returns the version numbers of the extension implementation. Shared memory pixmaps are supported if the pixmaps argument returns true.

* XShmAttach * tells the server to attach to your shared memory segment. If all goes well, you will get a non-zero status, back and your XImage is ready for use.

* XShmDetach * tells the server to detach from your shared memory segment.

* XShmPutImage * combines an image in memory with a shape of the specified drawable. If XYBitmap format is used, the depth must be one, or a ``BadMatch’’ error results. The foreground pixel in the GC defines the source for the one bits in the image, and the background pixel defines the source for the zero bits. For XYPixmap and ZPixmap, the depth must match the depth of the drawable, or a ``BadMatch’’ error results.

* XShmGetImage * reads image data into a shared memory XImage where display is the display of interest, drawable is the source drawable, image is the destination XImage, x and y are offsets within the drawable, and plane_mask defines which planes are to be read.

* XShmCreateImage * allocates the memory needed for an XImage structure for the specified display but does not allocate space for the image itself.

* XShmPixmapFormat * gets the format for the server. If your application can deal with the server pixmap data format, a shared memory segment and shminfo structure are created.

* XShmCreatePixmap * points to a pixmap which you can manipulate in all of the usual ways, with the added bonus of being able to edit its contents directly through the shared memory segment.

* XShmGetEventBase * gets the completion event value.

SEE ALSO

MIT-SHM - The MIT Shared Memory Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

70 - Linux cli command regfree

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command regfree and provides detailed information about the command regfree, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the regfree.

NAME 🖥️ regfree 🖥️

POSIX regex functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <regex.h>
int regcomp(regex_t *restrict preg, const char *restrict regex,
 int cflags);
int regexec(const regex_t *restrict preg",constchar*restrict"string,
 size_t nmatch, regmatch_t pmatch[_Nullable restrict .nmatch],
 int eflags);
size_t regerror(int errcode, const regex_t *_Nullable restrict preg,
 char errbuf[_Nullable restrict .errbuf_size],
 size_t errbuf_size);
void regfree(regex_t *preg);
typedef struct {
 size_t re_nsub;
} regex_t;
typedef struct {
 regoff_t rm_so;
 regoff_t rm_eo;
} regmatch_t;
typedef /* ... */ regoff_t;

DESCRIPTION

Compilation

regcomp() is used to compile a regular expression into a form that is suitable for subsequent regexec() searches.

On success, the pattern buffer at *preg is initialized. regex is a null-terminated string. The locale must be the same when running regexec().

After regcomp() succeeds, preg->re_nsub holds the number of subexpressions in regex. Thus, a value of preg->re_nsub + 1 passed as nmatch to regexec() is sufficient to capture all matches.

cflags is the bitwise OR of zero or more of the following:

REG_EXTENDED
Use POSIX Extended Regular Expression syntax when interpreting regex. If not set, POSIX Basic Regular Expression syntax is used.

REG_ICASE
Do not differentiate case. Subsequent regexec() searches using this pattern buffer will be case insensitive.

REG_NOSUB
Report only overall success. regexec() will use only pmatch for REG_STARTEND, ignoring nmatch.

REG_NEWLINE
Match-any-character operators don’t match a newline.

A nonmatching list ([^…]) not containing a newline does not match a newline.

Match-beginning-of-line operator (^) matches the empty string immediately after a newline, regardless of whether eflags, the execution flags of regexec(), contains REG_NOTBOL.

Match-end-of-line operator ($) matches the empty string immediately before a newline, regardless of whether eflags contains REG_NOTEOL.

Matching

regexec() is used to match a null-terminated string against the compiled pattern buffer in *preg, which must have been initialised with regexec(). eflags is the bitwise OR of zero or more of the following flags:

REG_NOTBOL
The match-beginning-of-line operator always fails to match (but see the compilation flag REG_NEWLINE above). This flag may be used when different portions of a string are passed to regexec() and the beginning of the string should not be interpreted as the beginning of the line.

REG_NOTEOL
The match-end-of-line operator always fails to match (but see the compilation flag REG_NEWLINE above).

REG_STARTEND
Match [string + pmatch[0].rm_so,* string + pmatch[0].rm_eo*) instead of [string,* string + strlen(string)*). This allows matching embedded NUL bytes and avoids a strlen(3) on known-length strings. If any matches are returned (REG_NOSUB wasn’t passed to regcomp(), the match succeeded, and nmatch > 0), they overwrite pmatch as usual, and the match offsets remain relative to string (not string + pmatch[0].rm_so). This flag is a BSD extension, not present in POSIX.

Match offsets

Unless REG_NOSUB was passed to regcomp(), it is possible to obtain the locations of matches within string: regexec() fills nmatch elements of pmatch with results: pmatch[0] corresponds to the entire match, pmatch[1] to the first subexpression, etc. If there were more matches than nmatch, they are discarded; if fewer, unused elements of pmatch are filled with -1s.

Each returned valid (non--1) match corresponds to the range [string + rm_so,* string + rm_eo*).

regoff_t is a signed integer type capable of storing the largest value that can be stored in either an ptrdiff_t type or a ssize_t type.

Error reporting

regerror() is used to turn the error codes that can be returned by both regcomp() and regexec() into error message strings.

If preg isn’t a null pointer, errcode must be the latest error returned from an operation on preg.

If errbuf_size isn’t 0, up to errbuf_size bytes are copied to errbuf; the error string is always null-terminated, and truncated to fit.

Freeing

regfree() deinitializes the pattern buffer at *preg, freeing any associated memory; *preg must have been initialized via regcomp().

RETURN VALUE

regcomp() returns zero for a successful compilation or an error code for failure.

regexec() returns zero for a successful match or REG_NOMATCH for failure.

regerror() returns the size of the buffer required to hold the string.

ERRORS

The following errors can be returned by regcomp():

REG_BADBR
Invalid use of back reference operator.

REG_BADPAT
Invalid use of pattern operators such as group or list.

REG_BADRPT
Invalid use of repetition operators such as using ‘*’ as the first character.

REG_EBRACE
Un-matched brace interval operators.

REG_EBRACK
Un-matched bracket list operators.

REG_ECOLLATE
Invalid collating element.

REG_ECTYPE
Unknown character class name.

REG_EEND
Nonspecific error. This is not defined by POSIX.

REG_EESCAPE
Trailing backslash.

REG_EPAREN
Un-matched parenthesis group operators.

REG_ERANGE
Invalid use of the range operator; for example, the ending point of the range occurs prior to the starting point.

REG_ESIZE
Compiled regular expression requires a pattern buffer larger than 64 kB. This is not defined by POSIX.

REG_ESPACE
The regex routines ran out of memory.

REG_ESUBREG
Invalid back reference to a subexpression.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

regcomp(), regexec()

Thread safetyMT-Safe locale

regerror()

Thread safetyMT-Safe env

regfree()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

Prior to POSIX.1-2008, regoff_t was required to be capable of storing the largest value that can be stored in either an off_t type or a ssize_t type.

CAVEATS

re_nsub is only required to be initialized if REG_NOSUB wasn’t specified, but all known implementations initialize it regardless.

Both regex_t and regmatch_t may (and do) have more members, in any order. Always reference them by name.

EXAMPLES

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <regex.h>
#define ARRAY_SIZE(arr) (sizeof((arr)) / sizeof((arr)[0]))
static const char *const str =
        "1) John Driverhacker;
  1. John Doe;
  2. John Foo; “; static const char *const re = “John.*o”; int main(void) { static const char *s = str; regex_t regex; regmatch_t pmatch[1]; regoff_t off, len; if (regcomp(&regex, re, REG_NEWLINE)) exit(EXIT_FAILURE); printf(“String = "%s" “, str); printf(“Matches: “); for (unsigned int i = 0; ; i++) { if (regexec(&regex, s, ARRAY_SIZE(pmatch), pmatch, 0)) break; off = pmatch[0].rm_so + (s - str); len = pmatch[0].rm_eo - pmatch[0].rm_so; printf(”#%zu: “, i); printf(“offset = %jd; length = %jd “, (intmax_t) off, (intmax_t) len); printf(“substring = "%.*s" “, len, s + pmatch[0].rm_so); s += pmatch[0].rm_eo; } exit(EXIT_SUCCESS); }

SEE ALSO

grep(1), regex(7)

The glibc manual section, Regular Expressions

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

71 - Linux cli command STAILQ_INSERT_HEAD

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command STAILQ_INSERT_HEAD and provides detailed information about the command STAILQ_INSERT_HEAD, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the STAILQ_INSERT_HEAD.

NAME 🖥️ STAILQ_INSERT_HEAD 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

72 - Linux cli command Tk_LabFramepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_LabFramepm and provides detailed information about the command Tk_LabFramepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_LabFramepm.

NAME 🖥️ Tk_LabFramepm 🖥️

labeled frame.

SYNOPSIS

use Tk::LabFrame;

$f = $parent->LabFrame(?-label=>text, -labelside=>where, …?);

DESCRIPTION

LabFrame is exactly like Frame and additionally allows one to add a label to the frame.

WIDGET-OPTIONS

LabFrame supports the same options as the Frame widget.

Additional options of LabFrame are:

-font => font
Specifies the label’s font

-foreground => color
Specifies the label’s foreground color

-label => text
The text of the label to be placed with the Frame.

-labelside => where
Where can be one of left, right, top, bottom or acrosstop. The first four work as might be expected and place the label to the left, right, above or below the frame respectively. The acrosstop creates a grooved frame around the central frame and puts the label near the northwest corner such that it appears to “overwrite” the groove.

-labelvariable => scalar_ref
Specifies a reference to a variable and used as an alternative to -label. If the value of the variable changes, then the widget will be updated automatically to reflect the change. Used like -textvariable.

ADVERTISED SUBWIDGETS

See “Subwidget” in Tk::mega how to use advertised widgets.

border
Frame used to display the border

frame
Frame used to create new LabFrame children.

label
Label used for displaying text

EXAMPLE

Run the following test program to see this in action:

use strict; use Tk; require Tk::LabFrame; require Tk::LabEntry; my $test = Test this; my $mw = Tk::MainWindow->new; my $f = $mw->LabFrame(-label => “This is a label”, -labelside => “acrosstop”); $f->LabEntry(-label => “Testing”, -textvariable => \test)->pack; $f->pack; Tk::MainLoop;

BUGS

Perhaps LabFrame should be subsumed within the generic pTk labeled widget mechanism.

AUTHOR

Rajappa Iyer [email protected]

This code is derived from LabFrame.tcl and LabWidg.tcl in the Tix4.0 distribution by Ioi Lam. The code may be redistributed under the same terms as Perl.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

73 - Linux cli command XtOffset

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtOffset and provides detailed information about the command XtOffset, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtOffset.

NAME 🖥️ XtOffset 🖥️

determine the byte offset or number of array elements

SYNTAX

#include <X11/Intrinsic.h>

Cardinal XtOffset(Type pointer_type, Field field_name);

Cardinal XtOffsetOf(Type structure_type, Field field_name);

Cardinal XtNumber(ArrayVariable array);

ARGUMENTS

array
Specifies a fixed-size array.

field_name
Specifies the name of the field for which to calculate the byte offset.

pointer_type
Specifies a type that is declared as a pointer to the structure.

structure_type
Specifies a type that is declared as a structure.

DESCRIPTION

The XtOffset macro is usually used to determine the offset of various resource fields from the beginning of a widget and can be used at compile time in static initializations.

The XtOffsetOf macro expands to a constant expression that gives the offset in bytes to the specified structure member from the beginning of the structure. It is normally used to statically initialize resource lists and is more portable than XtOffset, which serves the same function.

The XtNumber macro returns the number of elements in the specified argument lists, resources lists, and other counted arrays.

SEE ALSO

XtGetResourceList(3), XtSetArg(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

74 - Linux cli command TAILQ_HEAD

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command TAILQ_HEAD and provides detailed information about the command TAILQ_HEAD, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the TAILQ_HEAD.

NAME 🖥️ TAILQ_HEAD 🖥️

implementation of a doubly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
TAILQ_ENTRY(TYPE);
TAILQ_HEAD(HEADNAME, TYPE);
TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD head);
void TAILQ_INIT(TAILQ_HEAD *head);
int TAILQ_EMPTY(TAILQ_HEAD *head);
void TAILQ_INSERT_HEAD(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_TAIL(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_AFTER(TAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_FIRST(TAILQ_HEAD *head);
struct TYPE *TAILQ_LAST(TAILQ_HEAD *head, HEADNAME);
struct TYPE *TAILQ_PREV(struct TYPE *elm, HEADNAME, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_NEXT(struct TYPE *elm, TAILQ_ENTRY NAME);
TAILQ_FOREACH(struct TYPE *var, TAILQ_HEAD *head,
 TAILQ_ENTRY NAME);
TAILQ_FOREACH_REVERSE(struct TYPE *var, TAILQ_HEAD *head, HEADNAME,
 TAILQ_ENTRY NAME);
void TAILQ_REMOVE(TAILQ_HEAD *head, struct TYPE *elm,
 TAILQ_ENTRY NAME);
void TAILQ_CONCAT(TAILQ_HEAD *head1, TAILQ_HEAD *head2,
 TAILQ_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked tail queues.

In the macro definitions, TYPE is the name of a user defined structure, that must contain a field of type TAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user defined structure that must be declared using the macro TAILQ_HEAD().

Creation

A tail queue is headed by a structure defined by the TAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the queue and the other to the last element in the queue. The elements are doubly linked so that an arbitrary element can be removed without traversing the queue. New elements can be added to the queue after an existing element, before an existing element, at the head of the queue, or at the end of the queue. A TAILQ_HEAD structure is declared as follows:

TAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the queue. A pointer to the head of the queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

TAILQ_ENTRY() declares a structure that connects the elements in the queue.

TAILQ_HEAD_INITIALIZER() evaluates to an initializer for the queue head.

TAILQ_INIT() initializes the queue referenced by

TAILQ_EMPTY() evaluates to true if there are no items on the queue. head.

Insertion

TAILQ_INSERT_HEAD() inserts the new element elm at the head of the queue.

TAILQ_INSERT_TAIL() inserts the new element elm at the end of the queue.

TAILQ_INSERT_BEFORE() inserts the new element elm before the element listelm.

TAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

TAILQ_FIRST() returns the first item on the queue, or NULL if the queue is empty.

TAILQ_LAST() returns the last item on the queue. If the queue is empty the return value is NULL.

TAILQ_PREV() returns the previous item on the queue, or NULL if this item is the first.

TAILQ_NEXT() returns the next item on the queue, or NULL if this item is the last.

TAILQ_FOREACH() traverses the queue referenced by head in the forward direction, assigning each element in turn to var. var is set to NULL if the loop completes normally, or if there were no elements.

TAILQ_FOREACH_REVERSE() traverses the queue referenced by head in the reverse direction, assigning each element in turn to var.

Removal

TAILQ_REMOVE() removes the element elm from the queue.

Other features

TAILQ_CONCAT() concatenates the queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

TAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

TAILQ_FIRST(), TAILQ_LAST(), TAILQ_PREV(), and TAILQ_NEXT() return a pointer to the first, last, previous, or next TYPE structure, respectively.

TAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

STANDARDS

BSD.

HISTORY

4.4BSD.

CAVEATS

TAILQ_FOREACH() and TAILQ_FOREACH_REVERSE() don’t allow var to be removed or freed within the loop, as it would interfere with the traversal. TAILQ_FOREACH_SAFE() and TAILQ_FOREACH_REVERSE_SAFE(), which are present on the BSDs but are not present in glibc, fix this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    TAILQ_ENTRY(entry) entries;             /* Tail queue */
};
TAILQ_HEAD(tailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct tailhead head;                   /* Tail queue head */
    int i;
    TAILQ_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    TAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    TAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    TAILQ_INSERT_AFTER(&head, n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    TAILQ_INSERT_BEFORE(n2, n3, entries);
    TAILQ_REMOVE(&head, n2, entries);       /* Deletion */
    free(n2);
                                            /* Forward traversal */
    i = 0;
    TAILQ_FOREACH(np, &head, entries)
        np->data = i++;
                                            /* Reverse traversal */
    TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = TAILQ_FIRST(&head); while (n1 != NULL) { n2 = TAILQ_NEXT(n1, entries); free(n1); n1 = n2; } TAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

75 - Linux cli command Tk_Popuppm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Popuppm and provides detailed information about the command Tk_Popuppm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Popuppm.

NAME 🖥️ Tk_Popuppm 🖥️

popup dialog windows.

SYNOPSIS

$dialog->Popup(qw/ -popover => cursor | $widget | undef, -overanchor => c | n | ne | e | se | s | sw | w | nw, -popanchor => c | n | ne | e | se | s | sw | w | nw, /);

DESCRIPTION

You’ve probably had occasion to use a Dialog (or DialogBox) widget. These widgets are derived from a Toplevel (which is a subclass of Tk::Wm, the window manager) and spend most of their time in a withdrawn state. It’s also common to use Toplevels as containers for custom built popup windows. Menus, too, are dialogs derived from the window manager class. For this discussion, we’ll use the simple term dialog to refer any widget that pops up and awaits user interaction, whether it be a Menu, a special purpose Toplevel, or any of the dialog-type widgets, including, but not limited to, ColorEditor, Dialog, DialogBox, ErrorDialog, FileSelect, FBox, getOpenFile and getSaveFile.

When it’s time to display these dialogs, we call the Perl/Tk window manager Popup method. Popup accepts three special purpose options that specify placement information in high-level terms rather than numerical coordinates. It is Popup’s responsibility to take our human specifications and turn them into actual screen coordinates before displaying the dialog.

We can direct the dialog to appear in two general locations, either over another window (e.g. the root window (screen) or a particular widget), or over the cursor. This is called the popover location. Once we’ve made this decision we can further refine the exact placement of the dialog relative to the popover location by specifying the intersection of two anchor points. The popanchor point is associated with the dialog and the overanchor point is associated with the popover location (whether it be a window or the cursor). The point where the two anchor points coincide is the popup locus. Anchor points are string values and can be c (for center), or any of the eight cardinal compass points: n, ne, e, se, s, sw, w or nw.

For example, if -popover specifies a widget, -popanchor is sw, and -overanchor is ne, the the dialog’s southwest corner pops up at the widget’s northeast corner.

OPTIONS

The options recognized by Popup are as follows:

-popover
Specifies whether the dialog “pops over” a window or the cursor. It may be the string cursor, a widget reference, or undef for the root window.

-popanchor
Specifies the anchor point of the dialog. For instance, if e is specified, the right side of the dialog is the anchor.

-overanchor
Specifies where the dialog should anchor relative to the popover location. For instance, if e is specified the dialog appears over the right side of the popover location and if it’s ne the the dialog is positioned at the upper-right corner of the popover location.

AUTHOR

Nick Ing-Simmons, Steve Lidie

This code is distributed under the same terms as Perl.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

76 - Linux cli command XtSetWMColormapWindows

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtSetWMColormapWindows and provides detailed information about the command XtSetWMColormapWindows, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtSetWMColormapWindows.

NAME 🖥️ XtSetWMColormapWindows 🖥️

Set the value of the WM_COLORMAP_WINDOWS property

SYNTAX

#include <X11/Intrinsic.h>

void XtSetWMColormapWindows(Widget widget, Widget* list, Cardinal count);

ARGUMENTS

widget
Specifies the widget on whose window the WM_COLORMAP_WINDOWS property will be stored. Must be of class Core or any subclass thereof.

list
Specifies a list of widgets whose windows are are potentially to be listed in the WM_COLORMAP_WINDOWS property.

count
Specifies the number of widgets in list.

DESCRIPTION

XtSetWMColormapWindows returns immediately if widget is not realized or if count is zero. Otherwise, XtSetWMColormapWindows constructs an ordered list of windows by examining each widget in list in turn and ignoring the widget if it is not realized, or adding the widget’s window to the window list if the widget is realized and its colormap resource is different from the colormap resources of all widgets whose windows are already on the window list.

Finally, XtSetWMColormapWindows stores the resulting window list in the WM_COLORMAP_WINDOWS property on the specified widget’s window.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

77 - Linux cli command Moose_Meta_Classpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Classpm and provides detailed information about the command Moose_Meta_Classpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Classpm.

NAME 🖥️ Moose_Meta_Classpm 🖥️

The Moose metaclass

VERSION

version 2.2207

DESCRIPTION

This class is a subclass of Class::MOP::Class that provides additional Moose-specific functionality.

To really understand this class, you will need to start with the Class::MOP::Class documentation. This class can be understood as a set of additional features on top of the basic feature provided by that parent class.

INHERITANCE

Moose::Meta::Class is a subclass of Class::MOP::Class.

METHODS

Moose::Meta::Class->initialize($package_name, %options)
This overrides the parent’s method in order to provide its own defaults for the attribute_metaclass, instance_metaclass, and method_metaclass options. These all default to the appropriate Moose class.

Moose::Meta::Class->create($package_name, %options)
This overrides the parent’s method in order to accept a roles option. This should be an array reference containing roles that the class does, each optionally followed by a hashref of options (-excludes and -alias). my $metaclass = Moose::Meta::Class->create( New::Class, roles => […] );

Moose::Meta::Class->create_anon_class
This overrides the parent’s method to accept a roles option, just as create does. It also accepts a cache option. If this is true, then the anonymous class will be cached based on its superclasses and roles. If an existing anonymous class in the cache has the same superclasses and roles, it will be reused. my $metaclass = Moose::Meta::Class->create_anon_class( superclasses => [Foo], roles => [qw/Some Roles Go Here/], cache => 1, ); Each entry in both the superclasses and the roles option can be followed by a hash reference with arguments. The superclasses option can be supplied with a -version option that ensures the loaded superclass satisfies the required version. The role option also takes the -version as an argument, but the option hash reference can also contain any other role relevant values like exclusions or parameterized role arguments.

$metaclass->new_object(%params)
This overrides the parent’s method in order to add support for attribute triggers.

$metaclass->superclasses(@superclasses)
This is the accessor allowing you to read or change the parents of the class. Each superclass can be followed by a hash reference containing a -version value. If the version requirement is not satisfied an error will be thrown. When you pass classes to this method, we will attempt to load them if they are not already loaded.

$metaclass->add_override_method_modifier($name, $sub)
This adds an override method modifier to the package.

$metaclass->add_augment_method_modifier($name, $sub)
This adds an augment method modifier to the package.

$metaclass->calculate_all_roles
This will return a unique array of Moose::Meta::Role instances which are attached to this class.

$metaclass->calculate_all_roles_with_inheritance
This will return a unique array of Moose::Meta::Role instances which are attached to this class, and each of this class’s ancestors.

$metaclass->add_role($role)
This takes a Moose::Meta::Role object, and adds it to the class’s list of roles. This does not actually apply the role to the class.

$metaclass->role_applications
Returns a list of Moose::Meta::Role::Application::ToClass objects, which contain the arguments to role application.

$metaclass->add_role_application($application)
This takes a Moose::Meta::Role::Application::ToClass object, and adds it to the class’s list of role applications. This does not actually apply any role to the class; it is only for tracking role applications.

$metaclass->does_role($role)
This returns a boolean indicating whether or not the class does the specified role. The role provided can be either a role name or a Moose::Meta::Role object. This tests both the class and its parents.

$metaclass->excludes_role($role_name)
A class excludes a role if it has already composed a role which excludes the named role. This tests both the class and its parents.

$metaclass->add_attribute($attr_name, %params|$params)
This overrides the parent’s method in order to allow the parameters to be provided as a hash reference.

$metaclass->constructor_class($class_name)

$metaclass->destructor_class($class_name)

These are the names of classes used when making a class immutable. These default to Moose::Meta::Method::Constructor and Moose::Meta::Method::Destructor respectively. These accessors are read-write, so you can use them to change the class name.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

78 - Linux cli command realloc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command realloc and provides detailed information about the command realloc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the realloc.

NAME 🖥️ realloc 🖥️

allocate and free dynamic memory

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
void *malloc(size_t size);
void free(void *_Nullable ptr);
void *calloc(size_t nmemb, size_t size);
void *realloc(void *_Nullable ptr, size_t size);
void *reallocarray(void *_Nullable ptr, size_t nmemb, size_t size);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

reallocarray():

    Since glibc 2.29:
        _DEFAULT_SOURCE
    glibc 2.28 and earlier:
        _GNU_SOURCE

DESCRIPTION

malloc()

The malloc() function allocates size bytes and returns a pointer to the allocated memory. The memory is not initialized. If size is 0, then malloc() returns a unique pointer value that can later be successfully passed to free(). (See “Nonportable behavior” for portability issues.)

free()

The free() function frees the memory space pointed to by ptr, which must have been returned by a previous call to malloc() or related functions. Otherwise, or if ptr has already been freed, undefined behavior occurs. If ptr is NULL, no operation is performed.

calloc()

The calloc() function allocates memory for an array of nmemb elements of size bytes each and returns a pointer to the allocated memory. The memory is set to zero. If nmemb or size is 0, then calloc() returns a unique pointer value that can later be successfully passed to free().

If the multiplication of nmemb and size would result in integer overflow, then calloc() returns an error. By contrast, an integer overflow would not be detected in the following call to malloc(), with the result that an incorrectly sized block of memory would be allocated:

malloc(nmemb * size);

realloc()

The realloc() function changes the size of the memory block pointed to by ptr to size bytes. The contents of the memory will be unchanged in the range from the start of the region up to the minimum of the old and new sizes. If the new size is larger than the old size, the added memory will not be initialized.

If ptr is NULL, then the call is equivalent to malloc(size), for all values of size.

If size is equal to zero, and ptr is not NULL, then the call is equivalent to free(ptr) (but see “Nonportable behavior” for portability issues).

Unless ptr is NULL, it must have been returned by an earlier call to malloc or related functions. If the area pointed to was moved, a free(ptr) is done.

reallocarray()

The reallocarray() function changes the size of (and possibly moves) the memory block pointed to by ptr to be large enough for an array of nmemb elements, each of which is size bytes. It is equivalent to the call

realloc(ptr, nmemb * size);

However, unlike that realloc() call, reallocarray() fails safely in the case where the multiplication would overflow. If such an overflow occurs, reallocarray() returns an error.

RETURN VALUE

The malloc(), calloc(), realloc(), and reallocarray() functions return a pointer to the allocated memory, which is suitably aligned for any type that fits into the requested size or less. On error, these functions return NULL and set errno. Attempting to allocate more than PTRDIFF_MAX bytes is considered an error, as an object that large could cause later pointer subtraction to overflow.

The free() function returns no value, and preserves errno.

The realloc() and reallocarray() functions return NULL if ptr is not NULL and the requested size is zero; this is not considered an error. (See “Nonportable behavior” for portability issues.) Otherwise, the returned pointer may be the same as ptr if the allocation was not moved (e.g., there was room to expand the allocation in-place), or different from ptr if the allocation was moved to a new address. If these functions fail, the original block is left untouched; it is not freed or moved.

ERRORS

calloc(), malloc(), realloc(), and reallocarray() can fail with the following error:

ENOMEM
Out of memory. Possibly, the application hit the RLIMIT_AS or RLIMIT_DATA limit described in getrlimit(2). Another reason could be that the number of mappings created by the caller process exceeded the limit specified by /proc/sys/vm/max_map_count.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

malloc(), free(), calloc(), realloc()

Thread safetyMT-Safe

STANDARDS

malloc()
free()
calloc()
realloc()
C11, POSIX.1-2008.

reallocarray()
None.

HISTORY

malloc()
free()
calloc()
realloc()
POSIX.1-2001, C89.

reallocarray()
glibc 2.26. OpenBSD 5.6, FreeBSD 11.0.

malloc() and related functions rejected sizes greater than PTRDIFF_MAX starting in glibc 2.30.

free() preserved errno starting in glibc 2.33.

NOTES

By default, Linux follows an optimistic memory allocation strategy. This means that when malloc() returns non-NULL there is no guarantee that the memory really is available. In case it turns out that the system is out of memory, one or more processes will be killed by the OOM killer. For more information, see the description of /proc/sys/vm/overcommit_memory and /proc/sys/vm/oom_adj in proc(5), and the Linux kernel source file Documentation/vm/overcommit-accounting.rst.

Normally, malloc() allocates memory from the heap, and adjusts the size of the heap as required, using sbrk(2). When allocating blocks of memory larger than MMAP_THRESHOLD bytes, the glibc malloc() implementation allocates the memory as a private anonymous mapping using mmap(2). MMAP_THRESHOLD is 128 kB by default, but is adjustable using mallopt(3). Prior to Linux 4.7 allocations performed using mmap(2) were unaffected by the RLIMIT_DATA resource limit; since Linux 4.7, this limit is also enforced for allocations performed using mmap(2).

To avoid corruption in multithreaded applications, mutexes are used internally to protect the memory-management data structures employed by these functions. In a multithreaded application in which threads simultaneously allocate and free memory, there could be contention for these mutexes. To scalably handle memory allocation in multithreaded applications, glibc creates additional memory allocation arenas if mutex contention is detected. Each arena is a large region of memory that is internally allocated by the system (using brk(2) or mmap(2)), and managed with its own mutexes.

If your program uses a private memory allocator, it should do so by replacing malloc(), free(), calloc(), and realloc(). The replacement functions must implement the documented glibc behaviors, including errno handling, size-zero allocations, and overflow checking; otherwise, other library routines may crash or operate incorrectly. For example, if the replacement free() does not preserve errno, then seemingly unrelated library routines may fail without having a valid reason in errno. Private memory allocators may also need to replace other glibc functions; see “Replacing malloc” in the glibc manual for details.

Crashes in memory allocators are almost always related to heap corruption, such as overflowing an allocated chunk or freeing the same pointer twice.

The malloc() implementation is tunable via environment variables; see mallopt(3) for details.

Nonportable behavior

The behavior of these functions when the requested size is zero is glibc specific; other implementations may return NULL without setting errno, and portable POSIX programs should tolerate such behavior. See realloc(3p).

POSIX requires memory allocators to set errno upon failure. However, the C standard does not require this, and applications portable to non-POSIX platforms should not assume this.

Portable programs should not use private memory allocators, as POSIX and the C standard do not allow replacement of malloc(), free(), calloc(), and realloc().

EXAMPLES

#include <err.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MALLOCARRAY(n, type)  ((type *) my_mallocarray(n, sizeof(type)))
#define MALLOC(type)          MALLOCARRAY(1, type)
static inline void *my_mallocarray(size_t nmemb, size_t size);
int
main(void)
{
    char  *p;
    p = MALLOCARRAY(32, char);
    if (p == NULL)
        err(EXIT_FAILURE, "malloc");
    strlcpy(p, "foo", 32);
    puts(p);
}
static inline void *
my_mallocarray(size_t nmemb, size_t size)
{
    return reallocarray(NULL, nmemb, size);
}

SEE ALSO

valgrind(1), brk(2), mmap(2), alloca(3), malloc_get_state(3), malloc_info(3), malloc_trim(3), malloc_usable_size(3), mallopt(3), mcheck(3), mtrace(3), posix_memalign(3)

For details of the GNU C library implementation, see .

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

79 - Linux cli command setutxent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setutxent and provides detailed information about the command setutxent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setutxent.

NAME 🖥️ setutxent 🖥️

access utmp file entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <utmp.h>
struct utmp *getutent(void);
struct utmp *getutid(const struct utmp *ut);
struct utmp *getutline(const struct utmp *ut);
struct utmp *pututline(const struct utmp *ut);
void setutent(void);
void endutent(void);
int utmpname(const char *file);

DESCRIPTION

New applications should use the POSIX.1-specified “utmpx” versions of these functions; see STANDARDS.

utmpname() sets the name of the utmp-format file for the other utmp functions to access. If utmpname() is not used to set the filename before the other functions are used, they assume _PATH_UTMP, as defined in <paths.h>.

setutent() rewinds the file pointer to the beginning of the utmp file. It is generally a good idea to call it before any of the other functions.

endutent() closes the utmp file. It should be called when the user code is done accessing the file with the other functions.

getutent() reads a line from the current file position in the utmp file. It returns a pointer to a structure containing the fields of the line. The definition of this structure is shown in utmp(5).

getutid() searches forward from the current file position in the utmp file based upon ut. If ut->ut_type is one of RUN_LVL, BOOT_TIME, NEW_TIME, or OLD_TIME, getutid() will find the first entry whose ut_type field matches ut->ut_type. If ut->ut_type is one of INIT_PROCESS, LOGIN_PROCESS, USER_PROCESS, or DEAD_PROCESS, getutid() will find the first entry whose ut_id field matches ut->ut_id.

getutline() searches forward from the current file position in the utmp file. It scans entries whose ut_type is USER_PROCESS or LOGIN_PROCESS and returns the first one whose ut_line field matches ut->ut_line.

pututline() writes the utmp structure ut into the utmp file. It uses getutid() to search for the proper place in the file to insert the new entry. If it cannot find an appropriate slot for ut, pututline() will append the new entry to the end of the file.

RETURN VALUE

getutent(), getutid(), and getutline() return a pointer to a struct utmp on success, and NULL on failure (which includes the “record not found” case). This struct utmp is allocated in static storage, and may be overwritten by subsequent calls.

On success pututline() returns ut; on failure, it returns NULL.

utmpname() returns 0 if the new name was successfully stored, or -1 on failure.

On failure, these functions errno set to indicate the error.

ERRORS

ENOMEM
Out of memory.

ESRCH
Record not found.

setutent(), pututline(), and the getut*() functions can also fail for the reasons described in open(2).

FILES

/var/run/utmp
database of currently logged-in users

/var/log/wtmp
database of past user logins

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getutent()

Thread safety

MT-Unsafe init race:utent race:utentbuf sig:ALRM timer

getutid(), getutline()

Thread safety

MT-Unsafe init race:utent sig:ALRM timer

pututline()

Thread safety

MT-Unsafe race:utent sig:ALRM timer

setutent(), endutent(), utmpname()

Thread safetyMT-Unsafe race:utent

In the above table, utent in race:utent signifies that if any of the functions setutent(), getutent(), getutid(), getutline(), pututline(), utmpname(), or endutent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

None.

HISTORY

XPG2, SVr4.

In XPG2 and SVID 2 the function pututline() is documented to return void, and that is what it does on many systems (AIX, HP-UX). HP-UX introduces a new function _pututline() with the prototype given above for pututline().

All these functions are obsolete now on non-Linux systems. POSIX.1-2001 and POSIX.1-2008, following SUSv1, does not have any of these functions, but instead uses

#include <utmpx.h> struct utmpx *getutxent(void); struct utmpx *getutxid(const struct utmpx *); struct utmpx *getutxline(const struct utmpx *); struct utmpx *pututxline(const struct utmpx *); void setutxent(void); void endutxent(void);

These functions are provided by glibc, and perform the same task as their equivalents without the “x”, but use struct utmpx, defined on Linux to be the same as struct utmp. For completeness, glibc also provides utmpxname(), although this function is not specified by POSIX.1.

On some other systems, the utmpx structure is a superset of the utmp structure, with additional fields, and larger versions of the existing fields, and parallel files are maintained, often /var/*/utmpx and /var/*/wtmpx.

Linux glibc on the other hand does not use a parallel utmpx file since its utmp structure is already large enough. The “x” functions listed above are just aliases for their counterparts without the “x” (e.g., getutxent() is an alias for getutent()).

NOTES

glibc notes

The above functions are not thread-safe. glibc adds reentrant versions

#include <utmp.h>
int getutent_r(struct utmp *ubuf, struct utmp **ubufp);
int getutid_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);
int getutline_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getutent_r(), getutid_r(), getutline_r():

    _GNU_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */    _SVID_SOURCE || _BSD_SOURCE

These functions are GNU extensions, analogs of the functions of the same name without the _r suffix. The ubuf argument gives these functions a place to store their result. On success, they return 0, and a pointer to the result is written in *ubufp. On error, these functions return -1. There are no utmpx equivalents of the above functions. (POSIX.1 does not specify such functions.)

EXAMPLES

The following example adds and removes a utmp record, assuming it is run from within a pseudo terminal. For usage in a real application, you should check the return values of getpwuid(3) and ttyname(3).

#include <pwd.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <utmp.h>
int
main(void)
{
    struct utmp entry;
    system("echo before adding entry:;who");
    entry.ut_type = USER_PROCESS;
    entry.ut_pid = getpid();
    strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen("/dev/"));
    /* only correct for ptys named /dev/tty[pqr][0-9a-z] */
    strcpy(entry.ut_id, ttyname(STDIN_FILENO) + strlen("/dev/tty"));
    entry.ut_time = time(NULL);
    strcpy(entry.ut_user, getpwuid(getuid())->pw_name);
    memset(entry.ut_host, 0, UT_HOSTSIZE);
    entry.ut_addr = 0;
    setutent();
    pututline(&entry);
    system("echo after adding entry:;who");
    entry.ut_type = DEAD_PROCESS;
    memset(entry.ut_line, 0, UT_LINESIZE);
    entry.ut_time = 0;
    memset(entry.ut_user, 0, UT_NAMESIZE);
    setutent();
    pututline(&entry);
    system("echo after removing entry:;who");
    endutent();
    exit(EXIT_SUCCESS);
}

SEE ALSO

getutmp(3), utmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

80 - Linux cli command HTML_FormatMarkdownpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_FormatMarkdownpm and provides detailed information about the command HTML_FormatMarkdownpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_FormatMarkdownpm.

NAME 🖥️ HTML_FormatMarkdownpm 🖥️

Format HTML as Markdown

VERSION

version 2.16

SYNOPSIS

use HTML::FormatMarkdown; my $string = HTML::FormatMarkdown->format_file( test.html ); open my $fh, “>”, “test.md” or die “$! “; print $fh $string; close $fh;

DESCRIPTION

HTML::FormatMarkdown is a formatter that outputs Markdown.

HTML::FormatMarkdown is built on HTML::Formatter and documentation for that module applies to this - especially new in HTML::Formatter, format_file in HTML::Formatter and format_string in HTML::Formatter.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Nigel Metheringham, 2002-2005 Sean M Burke, 1999-2002 Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

81 - Linux cli command strtoull

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strtoull and provides detailed information about the command strtoull, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strtoull.

NAME 🖥️ strtoull 🖥️

convert a string to an unsigned long integer

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
unsigned long strtoul(const char *restrict nptr,
 char **restrict endptr, int base);
unsigned long long strtoull(const char *restrict nptr,
 char **restrict endptr, int base);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strtoull():

    _ISOC99_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The strtoul() function converts the initial part of the string in nptr to an unsigned long value according to the given base, which must be between 2 and 36 inclusive, or be the special value 0.

The string may begin with an arbitrary amount of white space (as determined by isspace(3)) followed by a single optional ‘+’ or ‘-’ sign. If base is zero or 16, the string may then include a “0x” prefix, and the number will be read in base 16; otherwise, a zero base is taken as 10 (decimal) unless the next character is ‘0’, in which case it is taken as 8 (octal).

The remainder of the string is converted to an unsigned long value in the obvious manner, stopping at the first character which is not a valid digit in the given base. (In bases above 10, the letter ‘A’ in either uppercase or lowercase represents 10, ‘B’ represents 11, and so forth, with ‘Z’ representing 35.)

If endptr is not NULL, and the base is supported, strtoul() stores the address of the first invalid character in *endptr. If there were no digits at all, strtoul() stores the original value of nptr in *endptr (and returns 0). In particular, if *nptr is not ‘�’ but **endptr is ‘�’ on return, the entire string is valid.

The strtoull() function works just like the strtoul() function but returns an unsigned long long value.

RETURN VALUE

The strtoul() function returns either the result of the conversion or, if there was a leading minus sign, the negation of the result of the conversion represented as an unsigned value, unless the original (nonnegated) value would overflow; in the latter case, strtoul() returns ULONG_MAX and sets errno to ERANGE. Precisely the same holds for strtoull() (with ULLONG_MAX instead of ULONG_MAX).

ERRORS

This function does not modify errno on success.

EINVAL
(not in C99) The given base contains an unsupported value.

ERANGE
The resulting value was out of range.

The implementation may also set errno to EINVAL in case no conversion was performed (no digits seen, and 0 returned).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strtoul(), strtoull(), strtouq()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

strtoul()
POSIX.1-2001, C89, SVr4.

strtoull()
POSIX.1-2001, C99.

NOTES

Since strtoul() can legitimately return 0 or ULONG_MAX (ULLONG_MAX for strtoull()) on both success and failure, the calling program should set errno to 0 before the call, and then determine if an error occurred by checking whether errno has a nonzero value after the call.

In locales other than the “C” locale, other strings may be accepted. (For example, the thousands separator of the current locale may be supported.)

BSD also has

u_quad_t strtouq(const char *nptr, char **endptr, int base);

with completely analogous definition. Depending on the wordsize of the current architecture, this may be equivalent to strtoull() or to strtoul().

Negative values are considered valid input and are silently converted to the equivalent unsigned long value.

EXAMPLES

See the example on the strtol(3) manual page; the use of the functions described in this manual page is similar.

SEE ALSO

a64l(3), atof(3), atoi(3), atol(3), strtod(3), strtol(3), strtoumax(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

82 - Linux cli command XtGetValues

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGetValues and provides detailed information about the command XtGetValues, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGetValues.

NAME 🖥️ XtGetValues 🖥️

obtain and set widget resources

SYNTAX

#include <X11/Intrinsic.h>

void XtSetValues(Widget w, ArgList args, Cardinal num_args);

void XtVaSetValues(Widget w, … );

void XtSetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);

void XtVaSetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, … );

void XtGetValues(Widget w, ArgList args, Cardinal num_args);

void XtVaGetValues(Widget w, … );

void XtGetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);

void XtVaGetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, … );

ARGUMENTS

args
Specifies the argument list of name/address pairs that contain the resource name and either the address into which the resource value is to be stored or their new values.

base
Specifies the base address of the subpart data structure where the resources should be retrieved or written.

num_args
Specifies the number of arguments in the argument list.

resources
Specifies the nonwidget resource list or values.

num_resources
Specifies the number of resources in the resource list.

  1. Specifies the widget.


Specifies the variable argument list of name/address pairs that contain the resource name and either the address into which the resource value is to be stored or their new values.

DESCRIPTION

The XtSetValues function starts with the resources specified for the Core widget fields and proceeds down the subclass chain to the widget. At each stage, it writes the new value (if specified by one of the arguments) or the existing value (if no new value is specified) to a new widget data record. XtSetValues then calls the set_values procedures for the widget in superclass-to-subclass order. If the widget has any non-NULL set_values_hook fields, these are called immediately after the corresponding set_values procedure. This procedure permits subclasses to set nonwidget data for XtSetValues.

If the widget’s parent is a subclass of constraintWidgetClass, XtSetValues also updates the widget’s constraints. It starts with the constraint resources specified for constraintWidgetClass and proceeds down the subclass chain to the parent’s class. At each stage, it writes the new value or the existing value to a new constraint record. It then calls the constraint set_values procedures from constraintWidgetClass down to the parent’s class. The constraint set_values procedures are called with widget arguments, as for all set_values procedures, not just the constraint record arguments, so that they can make adjustments to the desired values based on full information about the widget.

XtSetValues determines if a geometry request is needed by comparing the current widget to the new widget. If any geometry changes are required, it makes the request, and the geometry manager returns XtGeometryYes, XtGeometryAlmost, or XtGeometryNo. If XtGeometryYes, XtSetValues calls the widget’s resize procedure. If XtGeometryNo, XtSetValues resets the geometry fields to their original values. If XtGeometryAlmost, XtSetValues calls the set_values_almost procedure, which determines what should be done and writes new values for the geometry fields into the new widget. XtSetValues then repeats this process, deciding once more whether the geometry manager should be called.

Finally, if any of the set_values procedures returned True, XtSetValues causes the widget’s expose procedure to be invoked by calling the Xlib XClearArea function on the widget’s window.

The XtSetSubvalues function stores resources into the structure identified by base.

The XtGetValues function starts with the resources specified for the core widget fields and proceeds down the subclass chain to the widget. The value field of a passed argument list should contain the address into which to store the corresponding resource value. It is the caller’s responsibility to allocate and deallocate this storage according to the size of the resource representation type used within the widget.

If the widget’s parent is a subclass of constraintWidgetClass, XtGetValues then fetches the values for any constraint resources requested. It starts with the constraint resources specified for constraintWidgetClass and proceeds down to the subclass chain to the parent’s constraint resources. If the argument list contains a resource name that is not found in any of the resource lists searched, the value at the corresponding address is not modified. Finally, if the get_values_hook procedures are non-NULL, they are called in superclass-to-subclass order after all the resource values have been fetched by XtGetValues. This permits a subclass to provide nonwidget resource data to XtGetValues.

The XtGetSubvalues function obtains resource values from the structure identified by base.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

83 - Linux cli command XML_DOM_ElementDeclpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_DOM_ElementDeclpm and provides detailed information about the command XML_DOM_ElementDeclpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_DOM_ElementDeclpm.

NAME 🖥️ XML_DOM_ElementDeclpm 🖥️

An XML ELEMENT declaration in XML::DOM

DESCRIPTION

XML::DOM::ElementDecl extends XML::DOM::Node but is not part of the DOM Level 1 specification.

This node represents an Element declaration, e.g.

<!ELEMENT address (street+, city, state, zip, country?)>

METHODS

getName
Returns the Element tagName.

getModel and setModel (model)
Returns and sets the model as a string, e.g. (street+, city, state, zip, country?) in the above example.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

84 - Linux cli command htole64

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command htole64 and provides detailed information about the command htole64, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the htole64.

NAME 🖥️ htole64 🖥️

convert values between host and big-/little-endian byte order

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <endian.h>
uint16_t htobe16(uint16_t host_16bits);
uint16_t htole16(uint16_t host_16bits);
uint16_t be16toh(uint16_t big_endian_16bits);
uint16_t le16toh(uint16_t little_endian_16bits);
uint32_t htobe32(uint32_t host_32bits);
uint32_t htole32(uint32_t host_32bits);
uint32_t be32toh(uint32_t big_endian_32bits);
uint32_t le32toh(uint32_t little_endian_32bits);
uint64_t htobe64(uint64_t host_64bits);
uint64_t htole64(uint64_t host_64bits);
uint64_t be64toh(uint64_t big_endian_64bits);
uint64_t le64toh(uint64_t little_endian_64bits);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

htobe16(), htole16(), be16toh(), le16toh(), htobe32(), htole32(), be32toh(), le32toh(), htobe64(), htole64(), be64toh(), le64toh():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    In glibc up to and including 2.19:
        _BSD_SOURCE

DESCRIPTION

These functions convert the byte encoding of integer values from the byte order that the current CPU (the “host”) uses, to and from little-endian and big-endian byte order.

The number, nn, in the name of each function indicates the size of integer handled by the function, either 16, 32, or 64 bits.

The functions with names of the form “htobenn” convert from host byte order to big-endian order.

The functions with names of the form “htolenn” convert from host byte order to little-endian order.

The functions with names of the form “benntoh” convert from big-endian order to host byte order.

The functions with names of the form “lenntoh” convert from little-endian order to host byte order.

VERSIONS

Similar functions are present on the BSDs, where the required header file is <sys/endian.h> instead of <endian.h>. Unfortunately, NetBSD, FreeBSD, and glibc haven’t followed the original OpenBSD naming convention for these functions, whereby the nn component always appears at the end of the function name (thus, for example, in NetBSD, FreeBSD, and glibc, the equivalent of OpenBSDs “betoh32” is “be32toh”).

STANDARDS

None.

HISTORY

glibc 2.9.

These functions are similar to the older byteorder(3) family of functions. For example, be32toh() is identical to ntohl().

The advantage of the byteorder(3) functions is that they are standard functions available on all UNIX systems. On the other hand, the fact that they were designed for use in the context of TCP/IP means that they lack the 64-bit and little-endian variants described in this page.

EXAMPLES

The program below display the results of converting an integer from host byte order to both little-endian and big-endian byte order. Since host byte order is either little-endian or big-endian, only one of these conversions will have an effect. When we run this program on a little-endian system such as x86-32, we see the following:

$ ./a.out
x.u32 = 0x44332211
htole32(x.u32) = 0x44332211
htobe32(x.u32) = 0x11223344

Program source

#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    union {
        uint32_t u32;
        uint8_t arr[4];
    } x;
    x.arr[0] = 0x11;	/* Lowest-address byte */
    x.arr[1] = 0x22;
    x.arr[2] = 0x33;
    x.arr[3] = 0x44;	/* Highest-address byte */
    printf("x.u32 = %#x

“, x.u32); printf(“htole32(x.u32) = %#x “, htole32(x.u32)); printf(“htobe32(x.u32) = %#x “, htobe32(x.u32)); exit(EXIT_SUCCESS); }

SEE ALSO

bswap(3), byteorder(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

85 - Linux cli command Net_DNS_SEC_RSApm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_SEC_RSApm and provides detailed information about the command Net_DNS_SEC_RSApm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_SEC_RSApm.

NAME 🖥️ Net_DNS_SEC_RSApm 🖥️

DNSSEC RSA digital signature algorithm

SYNOPSIS

require Net::DNS::SEC::RSA; $signature = Net::DNS::SEC::RSA->sign( $sigdata, $private ); $validated = Net::DNS::SEC::RSA->verify( $sigdata, $keyrr, $sigbin );

DESCRIPTION

Implementation of RSA digital signature generation and verification procedures.

sign

$signature = Net::DNS::SEC::RSA->sign( $sigdata, $private );

Generates the wire-format signature from the sigdata octet string and the appropriate private key object.

verify

$validated = Net::DNS::SEC::RSA->verify( $sigdata, $keyrr, $sigbin );

Verifies the signature over the sigdata octet string using the specified public key resource record.

ACKNOWLEDGMENT

Thanks are due to Eric Young and the many developers and contributors to the OpenSSL cryptographic library.

COPYRIGHT

Copyright (c)2014,2018 Dick Franks.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

Net::DNS, Net::DNS::SEC, RFC8017, RFC3110, OpenSSL <http://www.openssl.org/docs>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

86 - Linux cli command round

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command round and provides detailed information about the command round, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the round.

NAME 🖥️ round 🖥️

round to nearest integer, away from zero

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double round(double x);
float roundf(float x);
long double roundl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

round(), roundf(), roundl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions round x to the nearest integer, but round halfway cases away from zero (regardless of the current rounding direction, see fenv(3)), instead of to the nearest even integer like rint(3).

For example, round(0.5) is 1.0, and round(-0.5) is -1.0.

RETURN VALUE

These functions return the rounded integer value.

If x is integral, +0, -0, NaN, or infinite, x itself is returned.

ERRORS

No errors occur. POSIX.1-2001 documents a range error for overflows, but see NOTES.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

round(), roundf(), roundl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

NOTES

POSIX.1-2001 contains text about overflow (which might set errno to ERANGE, or raise an FE_OVERFLOW exception). In practice, the result cannot overflow on any current machine, so this error-handling stuff is just nonsense. (More precisely, overflow can happen only when the maximum value of the exponent is smaller than the number of mantissa bits. For the IEEE-754 standard 32-bit and 64-bit floating-point numbers the maximum value of the exponent is 127 (respectively, 1023), and the number of mantissa bits including the implicit bit is 24 (respectively, 53).)

If you want to store the rounded value in an integer type, you probably want to use one of the functions described in lround(3) instead.

SEE ALSO

ceil(3), floor(3), lround(3), nearbyint(3), rint(3), trunc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

87 - Linux cli command Spreadsheet_ParseExcelpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_ParseExcelpm and provides detailed information about the command Spreadsheet_ParseExcelpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_ParseExcelpm.

NAME 🖥️ Spreadsheet_ParseExcelpm 🖥️

Read information from an Excel file.

SYNOPSIS

#!/usr/bin/perl -w use strict; use Spreadsheet::ParseExcel; my $parser = Spreadsheet::ParseExcel->new(); my $workbook = $parser->parse(Book1.xls); if ( !defined $workbook ) { die $parser->error(), “. “; } for my $worksheet ( $workbook->worksheets() ) { my ( $row_min, $row_max ) = $worksheet->row_range(); my ( $col_min, $col_max ) = $worksheet->col_range(); for my $row ( $row_min .. $row_max ) { for my $col ( $col_min .. $col_max ) { my $cell = $worksheet->get_cell( $row, $col ); next unless $cell; print “Row, Col = ($row, $col) “; print “Value = “, $cell->value(), " “; print “Unformatted = “, $cell->unformatted(), " “; print " “; } } }

DESCRIPTION

The Spreadsheet::ParseExcel module can be used to read information from Excel 95-2003 binary files.

The module cannot read files in the Excel 2007 Open XML XLSX format. See the Spreadsheet::XLSX module instead.

Parser

new()

The new() method is used to create a new Spreadsheet::ParseExcel parser object.

my $parser = Spreadsheet::ParseExcel->new();

It is possible to pass a password to decrypt an encrypted file:

$parser = Spreadsheet::ParseExcel->new( Password => secret );

Only the default Excel encryption scheme is currently supported. See Decryption.

As an advanced feature it is also possible to pass a call-back handler to the parser to control the parsing of the spreadsheet.

$parser = Spreadsheet::ParseExcel->new( CellHandler => \cell_handler, NotSetCell => 1, );

The call-back can be used to ignore certain cells or to reduce memory usage. See the section Reducing the memory usage of Spreadsheet::ParseExcel for more information.

parse($filename, $formatter)

The Parser parse() method returns a Workbook object.

my $parser = Spreadsheet::ParseExcel->new(); my $workbook = $parser->parse(Book1.xls);

If an error occurs parse() returns undef. In general, programs should contain a test for failed parsing as follows:

my $parser = Spreadsheet::ParseExcel->new(); my $workbook = $parser->parse(Book1.xls); if ( !defined $workbook ) { die $parser->error(), “. “; }

The $filename parameter is generally the file to be parsed. However, it can also be a filehandle or a scalar reference.

The optional $formatter parameter can be an reference to a Formatter Class to format the value of cells. This is useful for parsing workbooks with Unicode or Asian characters:

my $parser = Spreadsheet::ParseExcel->new(); my $formatter = Spreadsheet::ParseExcel::FmtJapan->new(); my $workbook = $parser->parse( Book1.xls, $formatter );

The Spreadsheet::ParseExcel::FmtJapan formatter also supports Unicode. If you encounter any encoding problems with the default formatter try that instead.

error()

The Parser error() method returns an error string if a parse() fails:

my $parser = Spreadsheet::ParseExcel->new(); my $workbook = $parser->parse(Book1.xls); if ( !defined $workbook ) { die $parser->error(), “. “; }

If you wish to generate you own error string you can use the error_code() method instead (see below). The error() and error_code() values are as follows:

error() error_code() ======= ============ 0 File not found 1 No Excel data found in file 2 File is encrypted 3

The error_code() method is explained below.

Spreadsheet::ParseExcel will try to decrypt an encrypted Excel file using the default password or a user supplied password passed to new(), see above. If these fail the module will return the File is encrypted error. Only the default Excel encryption scheme is currently supported, see Decryption.

error_code()

The Parser error_code() method returns an error code if a parse() fails:

my $parser = Spreadsheet::ParseExcel->new(); my $workbook = $parser->parse(Book1.xls); if ( !defined $workbook ) { die “Got error code “, $parser->error_code, “. “; }

This can be useful if you wish to employ you own error strings or error handling methods.

Workbook

A Spreadsheet::ParseExcel::Workbook is created via the Spreadsheet::ParseExcel parse() method:

my $parser = Spreadsheet::ParseExcel->new(); my $workbook = $parser->parse(Book1.xls);

The main methods of the Workbook class are:

$workbook->worksheets() $workbook->worksheet() $workbook->worksheet_count() $workbook->get_filename()

These more commonly used methods of the Workbook class are outlined below. The other, less commonly used, methods are documented in Spreadsheet::ParseExcel::Worksheet.

worksheets()

Returns an array of Worksheet objects. This was most commonly used to iterate over the worksheets in a workbook:

for my $worksheet ( $workbook->worksheets() ) { … }

worksheet()

The worksheet() method returns a single Worksheet object using either its name or index:

$worksheet = $workbook->worksheet(Sheet1); $worksheet = $workbook->worksheet(0);

Returns undef if the sheet name or index doesn’t exist.

worksheet_count()

The worksheet_count() method returns the number of Worksheet objects in the Workbook.

my $worksheet_count = $workbook->worksheet_count();

get_filename()

The get_filename() method returns the name of the Excel file of undef if the data was read from a filehandle rather than a file.

my $filename = $workbook->get_filename();

Other Workbook Methods

For full documentation of the methods available via a Workbook object see Spreadsheet::ParseExcel::Workbook.

Worksheet

The Spreadsheet::ParseExcel::Worksheet class encapsulates the properties of an Excel worksheet.

A Worksheet object is obtained via the worksheets() or worksheet() methods.

for my $worksheet ( $workbook->worksheets() ) { … } # Or: $worksheet = $workbook->worksheet(Sheet1); $worksheet = $workbook->worksheet(0);

The most commonly used methods of the Worksheet class are:

$worksheet->get_cell() $worksheet->row_range() $worksheet->col_range() $worksheet->get_name()

The Spreadsheet::ParseExcel::Worksheet class exposes a lot of methods but in general very few are required unless you are writing an advanced filter.

The most commonly used methods are detailed below. The others are documented in Spreadsheet::ParseExcel::Worksheet.

get_cell($row, $col)

Return the Cell object at row $row and column $col if it is defined. Otherwise returns undef.

my $cell = $worksheet->get_cell($row, $col);

row_range()

Returns a two-element list ($min, $max) containing the minimum and maximum defined rows in the worksheet. If there is no row defined $max is smaller than $min.

my ( $row_min, $row_max ) = $worksheet->row_range();

col_range()

Returns a two-element list ($min, $max) containing the minimum and maximum of defined columns in the worksheet. If there is no column defined $max is smaller than $min.

my ( $col_min, $col_max ) = $worksheet->col_range();

get_name()

The get_name() method returns the name of the worksheet, such as ‘Sheet1’.

my $name = $worksheet->get_name();

Other Worksheet Methods

For other, less commonly used, Worksheet methods see Spreadsheet::ParseExcel::Worksheet.

Cell

The Spreadsheet::ParseExcel::Cell class has the following main methods.

$cell->value() $cell->unformatted()

value()

The value() method returns the formatted value of the cell.

my $value = $cell->value();

Formatted in this sense refers to the numeric format of the cell value. For example a number such as 40177 might be formatted as 40,117, 40117.000 or even as the date 2009/12/30.

If the cell doesn’t contain a numeric format then the formatted and unformatted cell values are the same, see the unformatted() method below.

For a defined $cell the value() method will always return a value.

In the case of a cell with formatting but no numeric or string contents the method will return the empty string .

unformatted()

The unformatted() method returns the unformatted value of the cell.

my $unformatted = $cell->unformatted();

Returns the cell value without a numeric format. See the value() method above.

Other Cell Methods

For other, less commonly used, Worksheet methods see Spreadsheet::ParseExcel::Cell.

Format

The Spreadsheet::ParseExcel::Format class has the following properties:

Format properties

$format->{Font} $format->{AlignH} $format->{AlignV} $format->{Indent} $format->{Wrap} $format->{Shrink} $format->{Rotate} $format->{JustLast} $format->{ReadDir} $format->{BdrStyle} $format->{BdrColor} $format->{BdrDiag} $format->{Fill} $format->{Lock} $format->{Hidden} $format->{Style}

These properties are generally only of interest to advanced users. Casual users can skip this section.

$format->{Font}

Returns the Font object for the Format.

$format->{AlignH}

Returns the horizontal alignment of the format where the value has the following meaning:

0 => No alignment 1 => Left 2 => Center 3 => Right 4 => Fill 5 => Justify 6 => Center across 7 => Distributed/Equal spaced

$format->{AlignV}

Returns the vertical alignment of the format where the value has the following meaning:

0 => Top 1 => Center 2 => Bottom 3 => Justify 4 => Distributed/Equal spaced

$format->{Indent}

Returns the indent level of the Left horizontal alignment.

$format->{Wrap}

Returns true if textwrap is on.

$format->{Shrink}

Returns true if Shrink to fit is set for the format.

$format->{Rotate}

Returns the text rotation. In Excel97+, it returns the angle in degrees of the text rotation.

In Excel95 or earlier it returns a value as follows:

0 => No rotation 1 => Top down 2 => 90 degrees anti-clockwise, 3 => 90 clockwise

$format->{JustLast}

Return true if the justify last property is set for the format.

$format->{ReadDir}

Returns the direction that the text is read from.

$format->{BdrStyle}

Returns an array ref of border styles as follows:

[ $left, $right, $top, $bottom ]

$format->{BdrColor}

Returns an array ref of border color indexes as follows:

[ $left, $right, $top, $bottom ]

$format->{BdrDiag}

Returns an array ref of diagonal border kind, style and color index as follows:

[$kind, $style, $color ]

Where kind is:

0 => None 1 => Right-Down 2 => Right-Up 3 => Both

$format->{Fill}

Returns an array ref of fill pattern and color indexes as follows:

[ $pattern, $front_color, $back_color ]

$format->{Lock}

Returns true if the cell is locked.

$format->{Hidden}

Returns true if the cell is Hidden.

$format->{Style}

Returns true if the format is a Style format.

Font

Spreadsheet::ParseExcel::Font

Format class has these properties:

Font Properties

$font->{Name} $font->{Bold} $font->{Italic} $font->{Height} $font->{Underline} $font->{UnderlineStyle} $font->{Color} $font->{Strikeout} $font->{Super}

$font->{Name}

Returns the name of the font, for example ‘Arial’.

$font->{Bold}

Returns true if the font is bold.

$font->{Italic}

Returns true if the font is italic.

$font->{Height}

Returns the size (height) of the font.

$font->{Underline}

Returns true if the font in underlined.

$font->{UnderlineStyle}

Returns the style of an underlined font where the value has the following meaning:

0 => None 1 => Single 2 => Double 33 => Single accounting 34 => Double accounting

$font->{Color}

Returns the color index for the font. The mapping to an RGB color is defined by each workbook.

The index can be converted to a RGB string using the $workbook-ColorIdxToRGB()> Parser method.

(Older versions of Spreadsheet::ParseExcel provided the ColorIdxToRGB class method, which is deprecated.)

$font->{Strikeout}

Returns true if the font has the strikeout property set.

$font->{Super}

Returns one of the following values if the superscript or subscript property of the font is set:

0 => None 1 => Superscript 2 => Subscript

Formatter Class

Formatters can be passed to the parse() method to deal with Unicode or Asian formatting.

Spreadsheet::ParseExcel includes 2 formatter classes. FmtDefault and FmtJapanese. It is also possible to create a user defined formatting class.

The formatter class Spreadsheet::ParseExcel::Fmt* should provide the following functions:

ChkType($self, $is_numeric, $format_index)

Method to check the type of data in the cell. Should return Date, Numeric or Text. It is passed the following parameters:

$self
A scalar reference to the Formatter object.

$is_numeric
If true, the value seems to be number.

$format_index
The index number for the cell Format object.

TextFmt($self, $string_data, $string_encoding)

Converts the string data in the cell into the correct encoding. It is passed the following parameters:

$self
A scalar reference to the Formatter object.

$string_data
The original string/text data.

$string_encoding
The character encoding of original string/text.

ValFmt($self, $cell, $workbook)

Convert the original unformatted cell value into the appropriate formatted value. For instance turn a number into a formatted date. It is passed the following parameters:

$self
A scalar reference to the Formatter object.

$cell
A scalar reference to the Cell object.

$workbook
A scalar reference to the Workbook object.

FmtString($self, $cell, $workbook)

Get the format string for the Cell. It is passed the following parameters:

$self
A scalar reference to the Formatter object.

$cell
A scalar reference to the Cell object.

$workbook
A scalar reference to the Workbook object.

Reducing the memory usage of Spreadsheet::ParseExcel

In some cases a Spreadsheet::ParseExcel application may consume a lot of memory when processing a large Excel file and, as a result, may fail to complete. The following explains why this can occur and how to resolve it.

Spreadsheet::ParseExcel processes an Excel file in two stages. In the first stage it extracts the Excel binary stream from the OLE container file using OLE::Storage_Lite. In the second stage it parses the binary stream to read workbook, worksheet and cell data which it then stores in memory. The majority of the memory usage is required for storing cell data.

The reason for this is that as the Excel file is parsed and each cell is encountered a cell handling function creates a relatively large nested cell object that contains the cell value and all of the data that relates to the cell formatting. For large files (a 10MB Excel file on a 256MB system) this overhead can cause the system to grind to a halt.

However, in a lot of cases when an Excel file is being processed the only information that is required are the cell values. In these cases it is possible to avoid most of the memory overhead by specifying your own cell handling function and by telling Spreadsheet::ParseExcel not to store the parsed cell data. This is achieved by passing a cell handler function to new() when creating the parse object. Here is an example.

#!/usr/bin/perl -w use strict; use Spreadsheet::ParseExcel; my $parser = Spreadsheet::ParseExcel->new( CellHandler => \cell_handler, NotSetCell => 1 ); my $workbook = $parser->parse(file.xls); sub cell_handler { my $workbook = $_[0]; my $sheet_index = $_[1]; my $row = $_[2]; my $col = $_[3]; my $cell = $_[4]; # Do something useful with the formatted cell value print $cell->value(), " “; }

The user specified cell handler is passed as a code reference to new() along with the parameter NotSetCell which tells Spreadsheet::ParseExcel not to store the parsed cell. Note, you don’t have to iterate over the rows and columns, this happens automatically as part of the parsing.

The cell handler is passed 5 arguments. The first, $workbook, is a reference to the Spreadsheet::ParseExcel::Workbook object that represent the parsed workbook. This can be used to access any of the Spreadsheet::ParseExcel::Workbook methods, see Workbook. The second $sheet_index is the zero-based index of the worksheet being parsed. The third and fourth, $row and $col, are the zero-based row and column number of the cell. The fifth, $cell, is a reference to the Spreadsheet::ParseExcel::Cell object. This is used to extract the data from the cell. See Cell for more information.

This technique can be useful if you are writing an Excel to database filter since you can put your DB calls in the cell handler.

If you don’t want all of the data in the spreadsheet you can add some control logic to the cell handler. For example we can extend the previous example so that it only prints the first 10 rows of the first two worksheets in the parsed workbook by adding some if() statements to the cell handler:

#!/usr/bin/perl -w use strict; use Spreadsheet::ParseExcel; my $parser = Spreadsheet::ParseExcel->new( CellHandler => \cell_handler, NotSetCell => 1 ); my $workbook = $parser->parse(file.xls); sub cell_handler { my $workbook = $_[0]; my $sheet_index = $_[1]; my $row = $_[2]; my $col = $_[3]; my $cell = $_[4]; # Skip some worksheets and rows (inefficiently). return if $sheet_index >= 3; return if $row >= 10; # Do something with the formatted cell value print $cell->value(), " “; }

However, this still processes the entire workbook. If you wish to save some additional processing time you can abort the parsing after you have read the data that you want, using the workbook ParseAbort method:

#!/usr/bin/perl -w use strict; use Spreadsheet::ParseExcel; my $parser = Spreadsheet::ParseExcel->new( CellHandler => \cell_handler, NotSetCell => 1 ); my $workbook = $parser->parse(file.xls); sub cell_handler { my $workbook = $_[0]; my $sheet_index = $_[1]; my $row = $_[2]; my $col = $_[3]; my $cell = $_[4]; # Skip some worksheets and rows (more efficiently). if ( $sheet_index >= 1 and $row >= 10 ) { $workbook->ParseAbort(1); return; } # Do something with the formatted cell value print $cell->value(), " “; }

Decryption

If a workbook is protected then Excel will encrypt the file whether a password is supplied or not. As of version 0.59 Spreadsheet::ParseExcel supports decrypting Excel workbooks using a default or user supplied password. However, only the following encryption scheme is supported:

Office 97/2000 Compatible encryption

The following encryption methods are not supported:

Weak Encryption (XOR) RC4, Microsoft Base Cryptographic Provider v1.0 RC4, Microsoft Base DSS and Diffie-Hellman Cryptographic Provider RC4, Microsoft DH SChannel Cryptographic Provider RC4, Microsoft Enhanced Cryptographic Provider v1.0 RC4, Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider RC4, Microsoft Enhanced RSA and AES Cryptographic Provider RC4, Microsoft RSA SChannel Cryptographic Provider RC4, Microsoft Strong Cryptographic Provider

See the following for more information on Excel encryption: <http://office.microsoft.com/en-us/office-2003-resource-kit/important-aspects-of-password-and-encryption-protection-HA001140311.aspx>.

KNOWN PROBLEMS

  • This module cannot read the values of formulas from files created with Spreadsheet::WriteExcel unless the user specified the values when creating the file (which is generally not the case). The reason for this is that Spreadsheet::WriteExcel writes the formula but not the formula result since it isn’t in a position to calculate arbitrary Excel formulas without access to Excel’s formula engine.

  • If Excel has date fields where the specified format is equal to the system-default for the short-date locale, Excel does not store the format, but defaults to an internal format which is system dependent. In these cases ParseExcel uses the date format ‘yyyy-mm-dd’.

REPORTING A BUG

Please report bugs on GitHub with a complete, working, sample application and a test xls file.

<https://github.com/jmcnamara/spreadsheet-parseexcel/issues>

SEE ALSO

  • xls2csv by Ken Prows <http://search.cpan.org/~ken/xls2csv-1.06/script/xls2csv>.

  • xls2csv and xlscat by H.Merijn Brand (these utilities are part of Spreadsheet::Read, see below).

  • excel2txt by Ken Youens-Clark, <http://search.cpan.org/~kclark/excel2txt/excel2txt>. This is an excellent example of an Excel filter using Spreadsheet::ParseExcel. It can produce CSV, Tab delimited, Html, XML and Yaml.

  • XLSperl by Jon Allen <http://search.cpan.org/~jonallen/XLSperl/bin/XLSperl>. This application allows you to use Perl one-liners with Microsoft Excel files.

  • Spreadsheet::XLSX <http://search.cpan.org/~dmow/Spreadsheet-XLSX/lib/Spreadsheet/XLSX.pm> by Dmitry Ovsyanko. A module with a similar interface to Spreadsheet::ParseExcel for parsing Excel 2007 XLSX OpenXML files.

  • Spreadsheet::Read <http://search.cpan.org/~hmbrand/Spreadsheet-Read/Read.pm> by H.Merijn Brand. A single interface for reading several different spreadsheet formats.

  • Spreadsheet::WriteExcel <http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel/lib/Spreadsheet/WriteExcel.pm>. A perl module for creating new Excel files.

  • Spreadsheet::ParseExcel::SaveParser <http://search.cpan.org/~jmcnamara/Spreadsheet-ParseExcel/lib/Spreadsheet/ParseExcel/SaveParser.pm>. This is a combination of Spreadsheet::ParseExcel and Spreadsheet::WriteExcel and it allows you to rewrite an Excel file. See the following example <http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel/lib/Spreadsheet/WriteExcel.pm#MODIFYING_AND_REWRITING_EXCEL_FILES>. It is part of the Spreadsheet::ParseExcel distro.

  • Text::CSV_XS <http://search.cpan.org/~hmbrand/Text-CSV_XS/CSV_XS.pm> by H.Merijn Brand. A fast and rigorous module for reading and writing CSV data. Don’t consider rolling your own CSV handling, use this module instead.

DONATIONS

If you’d care to donate to the Spreadsheet::ParseExcel project, you can do so via PayPal: <http://tinyurl.com/7ayes>

TODO

  • The current maintenance work is directed towards making the documentation more useful, improving and simplifying the API, and improving the maintainability of the code base. After that new features will be added.

  • Fix open bugs and documentation for SaveParser.

  • Add Formula support, Hyperlink support, Named Range support.

  • Improve Spreadsheet::ParseExcel::SaveParser compatibility with Spreadsheet::WriteExcel.

  • Improve Unicode and other encoding support. This will probably require dropping support for perls prior to 5.8+.

ACKNOWLEDGEMENTS

From Kawai Takanori:

First of all, I would like to acknowledge the following valuable programs and modules: XHTML, OLE::Storage and Spreadsheet::WriteExcel.

In no particular order: Yamaji Haruna, Simamoto Takesi, Noguchi Harumi, Ikezawa Kazuhiro, Suwazono Shugo, Hirofumi Morisada, Michael Edwards, Kim Namusk, Slaven Rezic, Grant Stevens, H.Merijn Brand and many many people + Kawai Mikako.

Alexey Mazurin added the decryption facility.

DISCLAIMER OF WARRANTY

Because this software is licensed free of charge, there is no warranty for the software, to the extent permitted by applicable law. Except when otherwise stated in writing the copyright holders and/or other parties provide the software as is without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the software is with you. Should the software prove defective, you assume the cost of all necessary servicing, repair, or correction.

In no event unless required by applicable law or agreed to in writing will any copyright holder, or any other party who may modify and/or redistribute the software as permitted by the above licence, be liable to you for damages, including any general, special, incidental, or consequential damages arising out of the use or inability to use the software (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the software to operate with any other software), even if such holder or other party has been advised of the possibility of such damages.

LICENSE

Either the Perl Artistic Licence <http://dev.perl.org/licenses/artistic.html> or the GPL <http://www.opensource.org/licenses/gpl-license.php>

AUTHOR

Current maintainer 0.60+: Douglas Wilson [email protected]

Maintainer 0.40-0.59: John McNamara [email protected]

Maintainer 0.27-0.33: Gabor Szabo [email protected]

Original author: Kawai Takanori (Hippo2000) [email protected]

COPYRIGHT

Copyright (c) 2014 Douglas Wilson

Copyright (c) 2009-2013 John McNamara

Copyright (c) 2006-2008 Gabor Szabo

Copyright (c) 2000-2006 Kawai Takanori

All rights reserved. This is free software. You may distribute under the terms of either the GNU General Public License or the Artistic License.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

88 - Linux cli command procps_pids

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command procps_pids and provides detailed information about the command procps_pids, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the procps_pids.

NAME 🖥️ procps_pids 🖥️

API to access process information in the /proc filesystem

SYNOPSIS

#include <libproc2/pids.h>

int procps_pids_new (struct pids_info **info, enum pids_item *items, int numitems);
int procps_pids_ref (struct pids_info *info);
int procps_pids_unref (struct pids_info **info);


struct pids_stack *procps_pids_get (
 struct pids_info *info,
 enum pids_fetch_type which);

struct pids_fetch *procps_pids_reap (
 struct pids_info *info,
 enum pids_fetch_type which);

struct pids_fetch *procps_pids_select (
 struct pids_info *info,
 unsigned *these,
 int numthese,
 enum pids_select_type which);

struct pids_stack **procps_pids_sort (
 struct pids_info *info,
 struct pids_stack *stacks[],
 int numstacked,
 enum pids_item sortitem,
 enum pids_sort_order order);

int procps_pids_reset (
 struct pids_info *info,
 enum pids_item *newitems,
 int newnumitems);

struct pids_stack *fatal_proc_unmounted (
 struct pids_info *info,
 int return_self);

Link with -lproc2.

DESCRIPTION

Overview

Central to this interface is a simple `result’ structure reflecting an `item’ plus its value (in a union with standard C language types as members). All `result’ structures are automatically allocated and provided by the library.

By specifying an array of `items’, these structures can be organized as a `stack’, potentially yielding many results with a single function call. Thus, a `stack’ can be viewed as a variable length record whose content and order is determined solely by the user.

As part of this interface there are two unique enumerators. The `noop’ and `extra’ items exist to hold user values. They are never set by the library, but the `extra’ result will be zeroed with each library interaction.

The pids.h file will be an essential document during user program development. There you will find available items, their return type (the `result’ struct member name) and the source for such values. Additional enumerators and structures are also documented there.

Usage

The following would be a typical sequence of calls to this interface.

1. fatal_proc_unmounted()
2. procps_pids_new()
3. procps_pids_get(), procps_pids_reap() or procps_pids_select()
4. procps_pids_unref()

The get function is an iterator for successive PIDs/TIDs, returning those `items’ previously identified via new or reset.

Two functions support unpredictable variable outcomes. The reap function gathers data for all processes while the select function deals with specific PIDs or UIDs. Both can return multiple `stacks’ each containing multiple `result’ structures. Optionally, a user may choose to sort such results

To exploit any `stack’, and access individual `result’ structures, a relative_enum is required as shown in the VAL macro defined in the header file. Such values could be hard coded as: 0 through numitems-1. However, this need is typically satisfied by creating your own enumerators corresponding to the order of the `items’ array.

Caveats

The <pids> API differs from others in that those items of interest must be provided at new or reset time, the latter being unique to this API. If either the items or numitems parameter is zero at new time, then reset becomes mandatory before issuing any other call.

For the new and unref functions, the address of an info struct pointer must be supplied. With new it must have been initialized to NULL. With unref it will be reset to NULL if the reference count reaches zero.

The get and reap functions use the which parameter to specify whether just tasks or both tasks and threads are to be fetched.

The select function requires an array of PIDs or UIDs as these along with numthese to identify which processes are to be fetched. This function then operates as a subset of reap.

When using the sort function, the parameters stacks and numstacked would normally be those returned in the `pids_fetch’ structure.

Lastly, a fatal_proc_unmounted function may be called before any other function to ensure that the /proc/ directory is mounted. As such, the info parameter would be NULL and the return_self parameter zero. If, however, some items are desired for the issuing program (a return_self other than zero) then the new call must precede it to identify the items and obtain the required info pointer.

RETURN VALUE

Functions Returning an `int'

An error will be indicated by a negative number that is always the inverse of some well known errno.h value.

Success is indicated by a zero return value. However, the ref and unref functions return the current info structure reference count.

Functions Returning an `address'

An error will be indicated by a NULL return pointer with the reason found in the formal errno value.

Success is indicated by a pointer to the named structure. However, if one survives the fatal_proc_unmounted call, NULL is always returned when return_self is zero.

DEBUGGING

To aid in program development, there are two procps-ng provisions that can be exploited.

The first is a supplied file named `libproc.supp’ which may be useful when developing a multi-threaded application. When used with the valgrind `–suppressions=’ option, warnings associated with the procps library itself are avoided.

Such warnings arise because the library handles heap based allocations in a thread-safe manner. A single-threaded application will not receive those warnings.

The second provision can help ensure `result’ member references agree with library expectations. It assumes that a supplied macro in the header file is used to access the `result’ value.

This feature can be activated through either of the following methods and any discrepancies will be written to stderr.

  1. Add CFLAGS=’-DXTRA_PROCPS_DEBUG’ to any other ./configure options your project may employ.

  2. Add #include <procps/xtra-procps-debug.h> to any program after the #include <procps/pids.h>.

This verification feature incurs substantial overhead. Therefore, it is important that it not be activated for a production/release build.

ENVIRONMENT VARIABLE(S)

The value set for the following is unimportant, just its presence.

LIBPROC_HIDE_KERNEL
This will hide kernel threads which would otherwise be returned with a procps_pids_get, procps_pids_select or procps_pids_reap call.

SEE ALSO

procps(3), procps_misc(3), proc(5).

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

89 - Linux cli command scalbl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command scalbl and provides detailed information about the command scalbl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the scalbl.

NAME 🖥️ scalbl 🖥️

multiply floating-point number by integral power of radix (OBSOLETE)

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
[[deprecated]] double scalb(double x, double exp);
[[deprecated]] float scalbf(float x, float exp);
[[deprecated]] long double scalbl(long double x, long double exp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

scalb():

    _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

scalbf(), scalbl():

    _XOPEN_SOURCE >= 600
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions multiply their first argument x by FLT_RADIX (probably 2) to the power of exp, that is:

    x * FLT_RADIX ** exp

The definition of FLT_RADIX can be obtained by including <float.h>.

RETURN VALUE

On success, these functions return x * FLT_RADIX ** exp.

If x or exp is a NaN, a NaN is returned.

If x is positive infinity (negative infinity), and exp is not negative infinity, positive infinity (negative infinity) is returned.

If x is +0 (-0), and exp is not positive infinity, +0 (-0) is returned.

If x is zero, and exp is positive infinity, a domain error occurs, and a NaN is returned.

If x is an infinity, and exp is negative infinity, a domain error occurs, and a NaN is returned.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with a sign the same as x.

If the result underflows, a range error occurs, and the functions return zero, with a sign the same as x.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is 0, and exp is positive infinity, or x is positive infinity and exp is negative infinity and the other argument is not a NaN
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

Range error, overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error, underflow
errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

scalb(), scalbf(), scalbl()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

scalb()
4.3BSD. Obsolescent in POSIX.1-2001; Removed in POSIX.1-2008, recommending the use of scalbln(3), scalblnf(3), or scalblnl(3) instead.

BUGS

Before glibc 2.20, these functions did not set errno for domain and range errors.

SEE ALSO

ldexp(3), scalbln(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

90 - Linux cli command Net_Server_Proto_SSLpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Server_Proto_SSLpm and provides detailed information about the command Net_Server_Proto_SSLpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Server_Proto_SSLpm.

NAME 🖥️ Net_Server_Proto_SSLpm 🖥️

Net::Server SSL protocol.

SYNOPSIS

Until this release, it was preferable to use the Net::Server::Proto::SSLEAY module. Recent versions include code that overcomes original limitations.

See Net::Server::Proto. See Net::Server::Proto::SSLEAY.

use base qw(Net::Server::HTTP); main->run( proto => ssl, SSL_key_file => “/path/to/my/file.key”, SSL_cert_file => “/path/to/my/file.crt”, ); # OR sub SSL_key_file { “/path/to/my/file.key” } sub SSL_cert_file { “/path/to/my/file.crt” } main->run(proto = ssl); # OR main->run( port => [443, 8443, “80/tcp”], # bind to two ssl ports and one tcp proto => “ssl”, # use ssl as the default ipv => “*”, # bind both IPv4 and IPv6 interfaces SSL_key_file => “/path/to/my/file.key”, SSL_cert_file => “/path/to/my/file.crt”, ); # OR main->run(port => [{ port => “443”, proto => “ssl”, # ipv => 4, # default - only do IPv4 SSL_key_file => “/path/to/my/file.key”, SSL_cert_file => “/path/to/my/file.crt”, }, { port => “8443”, proto => “ssl”, ipv => “*”, # IPv4 and IPv6 SSL_key_file => “/path/to/my/file2.key”, # separate key SSL_cert_file => “/path/to/my/file2.crt”, # separate cert SSL_foo => 1, # Any key prefixed with SSL_ passed as a port hashref # key/value will automatically be passed to IO::Socket::SSL }]);

DESCRIPTION

Protocol module for Net::Server based on IO::Socket::SSL. This module implements a secure socket layer over tcp (also known as SSL) via the IO::Socket::SSL module. If this module does not work in your situation, please also consider using the SSLEAY protocol (Net::Server::Proto::SSLEAY) which interfaces directly with Net::SSLeay. See Net::Server::Proto.

If you know that your server will only need IPv4 (which is the default for Net::Server), you can load IO::Socket::SSL in inet4 mode which will prevent it from using Socket6, IO::Socket::IP, or IO::Socket::INET6 since they would represent additional and unused overhead.

use IO::Socket::SSL qw(inet4); use base qw(Net::Server::Fork); _ _PACKAGE_ _->run(proto => “ssl”);

PARAMETERS

In addition to the normal Net::Server parameters, any of the SSL parameters from IO::Socket::SSL may also be specified. See IO::Socket::SSL for information on setting this up. All arguments prefixed with SSL_ will be passed to the IO::Socket::SSL->configure method.

BUGS

Until version Net::Server version 2, Net::Server::Proto::SSL used the default IO::Socket::SSL::accept method. This old approach introduces a DDOS vulnerability into the server, where the socket is accepted, but the parent server then has to block until the client negotiates the SSL connection. This has now been overcome by overriding the accept method and accepting the SSL negotiation after the parent socket has had the chance to go back to listening.

LICENCE

Distributed under the same terms as Net::Server

THANKS

Thanks to Vadim for pointing out the IO::Socket::SSL accept was returning objects blessed into the wrong class.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

91 - Linux cli command Tk_DropSitepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_DropSitepm and provides detailed information about the command Tk_DropSitepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_DropSitepm.

NAME 🖥️ Tk_DropSitepm 🖥️

Receive side of Drag & Drop abstraction

SYNOPSIS

use Tk::DropSite qw(…); $widget->DropSite(-entercommand => …, -dropcommand => …, -motioncommand => …, -dropcommand => …, );

DESCRIPTION

DropSite creates an object which represents a site on which things may be “Dropped”.

A DropSite provides the following methods:

$site->Enter($token,$event)

$site->Leave($token,$event)

$site->Motion($token,$event)

$site->Drop($token,$event)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

92 - Linux cli command Tk_Textpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Textpm and provides detailed information about the command Tk_Textpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Textpm.

NAME 🖥️ Tk_Textpm 🖥️

Create and manipulate Text widgets

SYNOPSIS

$text = $parent->Text(?options?);

-background -highlightbackground -insertontime -selectborderwidth -borderwidth -highlightcolor -insertwidth -selectforeground -cursor -highlightthickness -padx -setgrid -exportselection -insertbackground -pady -takefocus -font -insertborderwidth -relief -xscrollcommand -foreground -insertofftime -selectbackground -yscrollcommand

WIDGET-SPECIFIC OPTIONS

Name: height

Class: Height

Switch: -height

Specifies the desired height for the window, in units of characters in the font given by the -font option. Must be at least one.

Name: spacing1

Class: Spacing1

Switch: -spacing1

Requests additional space above each text line in the widget, using any of the standard forms for screen distances. If a line wraps, this option only applies to the first line on the display. This option may be overridden with -spacing1 options in tags.

Name: spacing2

Class: Spacing2

Switch: -spacing2

For lines that wrap (so that they cover more than one line on the display) this option specifies additional space to provide between the display lines that represent a single line of text. The value may have any of the standard forms for screen distances. This option may be overridden with -spacing2 options in tags.

Name: spacing3

Class: Spacing3

Switch: -spacing3

Requests additional space below each text line in the widget, using any of the standard forms for screen distances. If a line wraps, this option only applies to the last line on the display. This option may be overridden with -spacing3 options in tags.

Name: state

Class: State

Switch: -state

Specifies one of two states for the text: normal or disabled. If the text is disabled then characters may not be inserted or deleted and no insertion cursor will be displayed, even if the input focus is in the widget.

Name: tabs

Class: Tabs

Switch: -tabs

Specifies a set of tab stops for the window. The option’s value consists of a list of screen distances giving the positions of the tab stops. Each position may optionally be followed in the next list element by one of the keywords left, right, center, or numeric, which specifies how to justify text relative to the tab stop. Left is the default; it causes the text following the tab character to be positioned with its left edge at the tab position. Right means that the right edge of the text following the tab character is positioned at the tab position, and center means that the text is centered at the tab position. Numeric means that the decimal point in the text is positioned at the tab position; if there is no decimal point then the least significant digit of the number is positioned just to the left of the tab position; if there is no number in the text then the text is right-justified at the tab position. For example, -tabs => [qw/2c left 4c 6c center/] creates three tab stops at two-centimeter intervals; the first two use left justification and the third uses center justification. If the list of tab stops does not have enough elements to cover all of the tabs in a text line, then Tk extrapolates new tab stops using the spacing and alignment from the last tab stop in the list. The value of the tabs option may be overridden by -tabs options in tags. If no -tabs option is specified, or if it is specified as an empty list, then Tk uses default tabs spaced every eight (average size) characters.

Name: width

Class: Width

Switch: -width

Specifies the desired width for the window in units of characters in the font given by the -font option. If the font doesn’t have a uniform width then the width of the character ``0’’ is used in translating from character units to screen units.

Name: wrap

Class: Wrap

Switch: -wrap

Specifies how to handle lines in the text that are too long to be displayed in a single line of the text’s window. The value must be none or char or word. A wrap mode of none means that each line of text appears as exactly one line on the screen; extra characters that don’t fit on the screen are not displayed. In the other modes each line of text will be broken up into several screen lines if necessary to keep all the characters visible. In char mode a screen line break may occur after any character; in word mode a line break will only be made at word boundaries.

DESCRIPTION

The Text method creates a new window (given by the $text argument) and makes it into a text widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the text such as its default background color and relief. The text command returns the path name of the new window.

A text widget displays one or more lines of text and allows that text to be edited. Text widgets support four different kinds of annotations on the text, called tags, marks, embedded windows or embedded images. Tags allow different portions of the text to be displayed with different fonts and colors. In addition, perl/Tk callbacks can be associated with tags so that scripts are invoked when particular actions such as keystrokes and mouse button presses occur in particular ranges of the text. See “TAGS” below for more details.

The second form of annotation consists of marks, which are floating markers in the text. Marks are used to keep track of various interesting positions in the text as it is edited. See “MARKS” below for more details.

The third form of annotation allows arbitrary windows to be embedded in a text widget. See “EMBEDDED WINDOWS” below for more details.

The fourth form of annotation allows Tk images to be embedded in a text widget. See “EMBEDDED IMAGES” below for more details.

The Perl/Tk Text widget does not support undo/redo, use the TextUndo widget instead.

INDICES

Many of the methods for texts take one or more indices as arguments. An index is a string used to indicate a particular place within a text, such as a place to insert characters or one endpoint of a range of characters to delete. Indices have the syntax

base modifier modifier modifier …

Where base gives a starting point and the modifiers adjust the index from the starting point (e.g. move forward or backward one character). Every index must contain a base, but the modifiers are optional.

The base for an index must have one of the following forms:

line.char
Indicates char’th character on line line. Lines are numbered from 1 for consistency with other UNIX programs that use this numbering scheme. Within a line, characters are numbered from 0. If char is end then it refers to the newline character that ends the line.

@x,y
Indicates the character that covers the pixel whose x and y coordinates within the text’s window are x and y.

end
Indicates the end of the text (the character just after the last newline).

mark
Indicates the character just after the mark whose name is mark.

tag.first
Indicates the first character in the text that has been tagged with tag. This form generates an error if no characters are currently tagged with tag.

tag.last
Indicates the character just after the last one in the text that has been tagged with tag. This form generates an error if no characters are currently tagged with tag.

$widget
Indicates the position of the embedded window referenced by $widget. This form generates an error if $widget does not reference to an embedded window.

imageName
Indicates the position of the embedded image whose name is imageName. This form generates an error if there is no embedded image by the given name.

If the base could match more than one of the above forms, such as a mark and imageName both having the same value, then the form earlier in the above list takes precedence. If modifiers follow the base index, each one of them must have one of the forms listed below. Keywords such as chars and wordend may be abbreviated as long as the abbreviation is unambiguous.

+ count chars
Adjust the index forward by count characters, moving to later lines in the text if necessary. If there are fewer than count characters in the text after the current index, then set the index to the last character in the text. Spaces on either side of count are optional.

- count chars
Adjust the index backward by count characters, moving to earlier lines in the text if necessary. If there are fewer than count characters in the text before the current index, then set the index to the first character in the text. Spaces on either side of count are optional.

+ count lines
Adjust the index forward by count lines, retaining the same character position within the line. If there are fewer than count lines after the line containing the current index, then set the index to refer to the same character position on the last line of the text. Then, if the line is not long enough to contain a character at the indicated character position, adjust the character position to refer to the last character of the line (the newline). Spaces on either side of count are optional.

- count lines
Adjust the index backward by count lines, retaining the same character position within the line. If there are fewer than count lines before the line containing the current index, then set the index to refer to the same character position on the first line of the text. Then, if the line is not long enough to contain a character at the indicated character position, adjust the character position to refer to the last character of the line (the newline). Spaces on either side of count are optional.

linestart
Adjust the index to refer to the first character on the line.

lineend
Adjust the index to refer to the last character on the line (the newline).

wordstart
Adjust the index to refer to the first character of the word containing the current index. A word consists of any number of adjacent characters that are letters, digits, or underscores, or a single character that is not one of these.

wordend
Adjust the index to refer to the character just after the last one of the word containing the current index. If the current index refers to the last character of the text then it is not modified.

If more than one modifier is present then they are applied in left-to-right order. For example, the index ``end - 1 chars’’ refers to the next-to-last character in the text and ``insert wordstart - 1 c’’ refers to the character just before the first one in the word containing the insertion cursor.

TAGS

The first form of annotation in text widgets is a tag. A tag is a textual string that is associated with some of the characters in a text. Tags may contain arbitrary characters, but it is probably best to avoid using the the characters `` ’’ (space), +, or -: these characters have special meaning in indices, so tags containing them can’t be used as indices. There may be any number of tags associated with characters in a text. Each tag may refer to a single character, a range of characters, or several ranges of characters. An individual character may have any number of tags associated with it.

A priority order is defined among tags, and this order is used in implementing some of the tag-related functions described below. When a tag is defined (by associating it with characters or setting its display options or binding callbacks to it), it is given a priority higher than any existing tag. The priority order of tags may be redefined using the ``$text->tagRaise’’ and ``$text->tagLower’’ methods.

Tags serve three purposes in text widgets. First, they control the way information is displayed on the screen. By default, characters are displayed as determined by the background, font, and foreground options for the text widget. However, display options may be associated with individual tags using the ``$text->tagConfigure’’ method. If a character has been tagged, then the display options associated with the tag override the default display style. The following options are currently supported for tags:

-background => color
Color specifies the background color to use for characters associated with the tag. It may have any of the forms accepted by Tk_GetColor.

-bgstipple => bitmap
Bitmap specifies a bitmap that is used as a stipple pattern for the background. It may have any of the forms accepted by Tk_GetBitmap. If bitmap hasn’t been specified, or if it is specified as an empty string, then a solid fill will be used for the background.

-borderwidth => pixels
Pixels specifies the width of a 3-D border to draw around the background. It may have any of the forms accepted by Tk_GetPixels. This option is used in conjunction with the -relief option to give a 3-D appearance to the background for characters; it is ignored unless the -background option has been set for the tag.

-elide => boolean
Elide specifies whether the data should be elided. Elided data is not displayed and takes no space on screen, but further on behaves just as normal data.

-data => value
Allows an arbitrary perl scalar value to be associated with the tag.

-fgstipple => bitmap
Bitmap specifies a bitmap that is used as a stipple pattern when drawing text and other foreground information such as underlines. It may have any of the forms accepted by Tk_GetBitmap. If bitmap hasn’t been specified, or if it is specified as an empty string, then a solid fill will be used.

-font => fontName
FontName is the name of a font to use for drawing characters. It may have any of the forms accepted by Tk_GetFontStruct.

-foreground => color
Color specifies the color to use when drawing text and other foreground information such as underlines. It may have any of the forms accepted by Tk_GetColor.

-justify => justify
If the first character of a display line has a tag for which this option has been specified, then justify determines how to justify the line. It must be one of left, right, or center. If a line wraps, then the justification for each line on the display is determined by the first character of that display line.

-lmargin1 => pixels
If the first character of a text line has a tag for which this option has been specified, then pixels specifies how much the line should be indented from the left edge of the window. Pixels may have any of the standard forms for screen distances. If a line of text wraps, this option only applies to the first line on the display; the -lmargin2 option controls the indentation for subsequent lines.

-lmargin2 => pixels
If the first character of a display line has a tag for which this option has been specified, and if the display line is not the first for its text line (i.e., the text line has wrapped), then pixels specifies how much the line should be indented from the left edge of the window. Pixels may have any of the standard forms for screen distances. This option is only used when wrapping is enabled, and it only applies to the second and later display lines for a text line.

-offset => pixels
Pixels specifies an amount by which the text’s baseline should be offset vertically from the baseline of the overall line, in pixels. For example, a positive offset can be used for superscripts and a negative offset can be used for subscripts. Pixels may have any of the standard forms for screen distances.

-overstrike => boolean
Specifies whether or not to draw a horizontal rule through the middle of characters. Boolean may have any of the forms accepted by Tk_GetBoolean.

-relief => relief
Relief specifies the 3-D relief to use for drawing backgrounds, in any of the forms accepted by Tk_GetRelief. This option is used in conjunction with the -borderwidth option to give a 3-D appearance to the background for characters; it is ignored unless the -background option has been set for the tag.

-rmargin => pixels
If the first character of a display line has a tag for which this option has been specified, then pixels specifies how wide a margin to leave between the end of the line and the right edge of the window. Pixels may have any of the standard forms for screen distances. This option is only used when wrapping is enabled. If a text line wraps, the right margin for each line on the display is determined by the first character of that display line.

-spacing1 => pixels
Pixels specifies how much additional space should be left above each text line, using any of the standard forms for screen distances. If a line wraps, this option only applies to the first line on the display.

-spacing2 => pixels
For lines that wrap, this option specifies how much additional space to leave between the display lines for a single text line. Pixels may have any of the standard forms for screen distances.

-spacing3 => pixels
Pixels specifies how much additional space should be left below each text line, using any of the standard forms for screen distances. If a line wraps, this option only applies to the last line on the display.

-tabs => tabList
TabList specifies a set of tab stops in the same form as for the -tabs option for the text widget. This option only applies to a display line if it applies to the first character on that display line. If this option is specified as an empty string, it cancels the option, leaving it unspecified for the tag (the default). If the option is specified as a non-empty string that is an empty list, such as -tabs = " “>, then it requests default 8-character tabs as described for the tabs widget option.

-underline => boolean
Boolean specifies whether or not to draw an underline underneath characters. It may have any of the forms accepted by Tk_GetBoolean.

-wrap => mode
Mode specifies how to handle lines that are wider than the text’s window. It has the same legal values as the -wrap option for the text widget: none, char, or word. If this tag option is specified, it overrides the -wrap option for the text widget.

If a character has several tags associated with it, and if their display options conflict, then the options of the highest priority tag are used. If a particular display option hasn’t been specified for a particular tag, or if it is specified as an empty string, then that option will never be used; the next-highest-priority tag’s option will used instead. If no tag specifies a particular display option, then the default style for the widget will be used.

The second purpose for tags is event bindings. You can associate bindings with a tag in much the same way you can associate bindings with a widget class: whenever particular X events occur on characters with the given tag, a given <perl/Tk callback|Tk::callbacks> will be executed. Tag bindings can be used to give behaviors to ranges of characters; among other things, this allows hypertext-like features to be implemented. For details, see the description of the tagBind widget method below.

The third use for tags is in managing the selection. See “THE SELECTION” below.

MARKS

The second form of annotation in text widgets is a mark. Marks are used for remembering particular places in a text. They are something like tags, in that they have names and they refer to places in the file, but a mark isn’t associated with particular characters. Instead, a mark is associated with the gap between two characters. Only a single position may be associated with a mark at any given time. If the characters around a mark are deleted the mark will still remain; it will just have new neighbor characters. In contrast, if the characters containing a tag are deleted then the tag will no longer have an association with characters in the file. Marks may be manipulated with the ``$text->mark’’ text widget method, and their current locations may be determined by using the mark name as an index in methods.

Each mark also has a gravity, which is either left or right. The gravity for a mark specifies what happens to the mark when text is inserted at the point of the mark. If a mark has left gravity, then the mark is treated as if it were attached to the character on its left, so the mark will remain to the left of any text inserted at the mark position. If the mark has right gravity, new text inserted at the mark position will appear to the right of the mark. The gravity for a mark defaults to right.

The name space for marks is different from that for tags: the same name may be used for both a mark and a tag, but they will refer to different things.

Two marks have special significance. First, the mark insert is associated with the insertion cursor, as described under “THE INSERTION CURSOR” below. Second, the mark current is associated with the character closest to the mouse and is adjusted automatically to track the mouse position and any changes to the text in the widget (one exception: current is not updated in response to mouse motions if a mouse button is down; the update will be deferred until all mouse buttons have been released). Neither of these special marks may be deleted.

EMBEDDED WINDOWS

The third form of annotation in text widgets is an embedded window. Each embedded window annotation causes a window to be displayed at a particular point in the text. There may be any number of embedded windows in a text widget, and any widget may be used as an embedded window (subject to the usual rules for geometry management, which require the text window to be the parent of the embedded window or a descendant of its parent). The embedded window’s position on the screen will be updated as the text is modified or scrolled, and it will be mapped and unmapped as it moves into and out of the visible area of the text widget. Each embedded window occupies one character’s worth of index space in the text widget, and it may be referred to either by the name of its embedded window or by its position in the widget’s index space. If the range of text containing the embedded window is deleted then the window is destroyed.

When an embedded window is added to a text widget with the widgetCreate method, several configuration options may be associated with it. These options may be modified later with the widgetConfigure method. The following options are currently supported:

-align => where
If the window is not as tall as the line in which it is displayed, this option determines where the window is displayed in the line. Where must have one of the values top (align the top of the window with the top of the line), center (center the window within the range of the line), bottom (align the bottom of the window with the bottom of the line’s area), or baseline (align the bottom of the window with the baseline of the line).

-create => callback
Specifies a callback that may be evaluated to create the window for the annotation. If no -window option has been specified for the annotation this callback will be evaluated when the annotation is about to be displayed on the screen. Callback must create a window for the annotation and return the name of that window as its result. If the annotation’s window should ever be deleted, callback will be evaluated again the next time the annotation is displayed.

-padx => pixels
Pixels specifies the amount of extra space to leave on each side of the embedded window. It may have any of the usual forms defined for a screen distance (see Tk_GetPixels).

-pady => pixels
Pixels specifies the amount of extra space to leave on the top and on the bottom of the embedded window. It may have any of the usual forms defined for a screen distance (see Tk_GetPixels).

-stretch => boolean
If the requested height of the embedded window is less than the height of the line in which it is displayed, this option can be used to specify whether the window should be stretched vertically to fill its line. If the -pady option has been specified as well, then the requested padding will be retained even if the window is stretched.

-window => $widget
Specifies the name of a window to display in the annotation.

EMBEDDED IMAGES

The final form of annotation in text widgets is an embedded image. Each embedded image annotation causes an image to be displayed at a particular point in the text. There may be any number of embedded images in a text widget, and a particular image may be embedded in multiple places in the same text widget. The embedded image’s position on the screen will be updated as the text is modified or scrolled. Each embedded image occupies one character’s worth of index space in the text widget, and it may be referred to either by its position in the widget’s index space, or the name it is assigned when the image is inserted into the text widget with imageCreate. If the range of text containing the embedded image is deleted then that copy of the image is removed from the screen.

When an embedded image is added to a text widget with the image create method, a name unique to this instance of the image is returned. This name may then be used to refer to this image instance. The name is taken to be the value of the -name option (described below). If the -name option is not provided, the -image name is used instead. If the imageName is already in use in the text widget, then **#**nn is added to the end of the imageName, where nn is an arbitrary integer. This insures the imageName is unique. Once this name is assigned to this instance of the image, it does not change, even though the -image or -name values can be changed with image configure.

When an embedded image is added to a text widget with the imageCreate method, several configuration options may be associated with it. These options may be modified later with the image configure method. The following options are currently supported:

-align => where
If the image is not as tall as the line in which it is displayed, this option determines where the image is displayed in the line. Where must have one of the values top (align the top of the image with the top of the line), center (center the image within the range of the line), bottom (align the bottom of the image with the bottom of the line’s area), or baseline (align the bottom of the image with the baseline of the line).

-image => image
Specifies the name of the Tk image to display in the annotation. If image is not a valid Tk image, then an error is returned.

-name => ImageName
Specifies the name by which this image instance may be referenced in the text widget. If ImageName is not supplied, then the name of the Tk image is used instead. If the imageName is already in use, #nn is appended to the end of the name as described above.

-padx => pixels
Pixels specifies the amount of extra space to leave on each side of the embedded image. It may have any of the usual forms defined for a screen distance.

-pady => pixels
Pixels specifies the amount of extra space to leave on the top and on the bottom of the embedded image. It may have any of the usual forms defined for a screen distance.

THE SELECTION

Selection support is implemented via tags. If the exportSelection option for the text widget is true then the sel tag will be associated with the selection:

[1]
Whenever characters are tagged with sel the text widget will claim ownership of the selection.

[2]
Attempts to retrieve the selection will be serviced by the text widget, returning all the characters with the sel tag.

[3]
If the selection is claimed away by another application or by another window within this application, then the sel tag will be removed from all characters in the text.

[4]
Whenever the sel tag range changes a virtual event <<Selection>> is generated. The sel tag is automatically defined when a text widget is created, and it may not be deleted with the ``$text->tagDelete’’ method. Furthermore, the selectBackground, selectBorderWidth, and selectForeground options for the text widget are tied to the -background, -borderwidth, and -foreground options for the sel tag: changes in either will automatically be reflected in the other.

THE INSERTION CURSOR

The mark named insert has special significance in text widgets. It is defined automatically when a text widget is created and it may not be unset with the ``$text->markUnset’’ widget command. The insert mark represents the position of the insertion cursor, and the insertion cursor will automatically be drawn at this point whenever the text widget has the input focus.

THE MODIFIED FLAG

The text widget can keep track of changes to the content of the widget by means of the modified flag. Inserting or deleting text will set this flag. The flag can be queried, set and cleared programatically as well. Whenever the flag changes state a <<Modified>> virtual event is gener- ated. See the edit modified widget command for more details.

WIDGET METHODS

The Text method creates a widget object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class.

The following additional methods are available for text widgets. In addition, the extended text widget methods as documented in “Mastering Perl/Tk” are included in this pod (with permission from the publisher, O’Reilly and Associates Inc.).

$text->adjustSelect
Moves the end point of the selection and anchor point to the mouse pointer location.

$text->bbox(index)
Returns a list of four elements describing the screen area of the character given by index. The first two elements of the list give the x and y coordinates of the upper-left corner of the area occupied by the character, and the last two elements give the width and height of the area. If the character is only partially visible on the screen, then the return value reflects just the visible part. If the character is not visible on the screen then the return value is an empty list.

$text->clipboardColumnCopy
Performs a rectangular copy of the currently selected text with basic compensation for tab characters.

$text->clipboardColumnCut
Performs a rectangular cut of the currently selected text with basic compensation for tab characters.

$text->clipboardColumnPaste
Performs a rectangular paste of the text in the clipboard. The upper-left corner is specified by the current position of the insert mark with basic compensation for tab characters.

$text->compare(index1, op, index2)
Compares the indices given by index1 and index2 according to the relational operator given by op, and returns 1 if the relationship is satisfied and 0 if it isn’t. Op must be one of the operators <, <=, ==, >=, >, or !=. If op is == then 1 is returned if the two indices refer to the same character, if op is < then 1 is returned if index1 refers to an earlier character in the text than index2, and so on.

$text->Contents(?args?)
Query or change the entire contents of the text widget. If no arguments are given, the entire contents of the text widget are returned. If any arguments are given, the entire contents of the text widget are deleted and replaced by the argument list.

$text->debug(?boolean?)
If boolean is specified, then it must have one of the true or false values accepted by Tcl_GetBoolean. If the value is a true one then internal consistency checks will be turned on in the B-tree code associated with text widgets. If boolean has a false value then the debugging checks will be turned off. In either case the command returns an empty string. If boolean is not specified then the command returns on or off to indicate whether or not debugging is turned on. There is a single debugging switch shared by all text widgets: turning debugging on or off in any widget turns it on or off for all widgets. For widgets with large amounts of text, the consistency checks may cause a noticeable slow-down.

$text->delete(index1, ?index2?)
Delete a range of characters from the text. If both index1 and index2 are specified, then delete all the characters starting with the one given by index1 and stopping just before index2 (i.e. the character at index2 is not deleted). If index2 doesn’t specify a position later in the text than index1 then no characters are deleted. If index2 isn’t specified then the single character at index1 is deleted. It is not allowable to delete characters in a way that would leave the text without a newline as the last character. The command returns an empty string. If more indices are given, multiple ranges of text will be deleted. All indices are first checked for validity before any deletions are made. They are sorted and the text is removed from the last range to the first range to deleted text does not cause a undesired index shifting side-effects. If multiple ranges with the same start index are given, then the longest range is used. If overlapping ranges are given, then they will be merged into spans that do not cause deletion of text outside the given ranges due to text shifted during deletion.

$text->deleteSelected
Delete the currently selected text.

$text->deleteTextTaggedWith(tag)
Delete the text tagged with the tag parameter.

$text->deleteToEndofLine
Delete from the insert mark location to the end of line.

$text->dlineinfo(index)
Returns a list with five elements describing the area occupied by the display line containing index. The first two elements of the list give the x and y coordinates of the upper-left corner of the area occupied by the line, the third and fourth elements give the width and height of the area, and the fifth element gives the position of the baseline for the line, measured down from the top of the area. All of this information is measured in pixels. If the current wrap mode is none and the line extends beyond the boundaries of the window, the area returned reflects the entire area of the line, including the portions that are out of the window. If the line is shorter than the full width of the window then the area returned reflects just the portion of the line that is occupied by characters and embedded windows. If the display line containing index is not visible on the screen then the return value is an empty list.

$text->dump(?switches?, index1, ?index2?)
Return the contents of the text widget from index1 up to, but not including index2, including the text and information about marks, tags, and embedded windows. If index2 is not specified, then it defaults to one character past index1. The information is returned in the following format: key1 value1 index1 key2 value2 index2 … The possible key values are text, mark, tagon, tagoff, and $text. The corresponding value is the text, mark name, tag name, or window name. The index information is the index of the start of the text, the mark, the tag transition, or the window. One or more of the following switches (or abbreviations thereof) may be specified to control the dump:

-all
Return information about all elements: text, marks, tags, and windows. This is the default.

-command => callback
Instead of returning the information as the result of the dump operation, invoke the callback on each element of the text widget within the range. The callback has three arguments appended to it before it is evaluated: the key, value, and index.

-mark
Include information about marks in the dump results.

-tag
Include information about tag transitions in the dump results. Tag information is returned as tagon and tagoff elements that indicate the begin and end of each range of each tag, respectively.

-text
Include information about text in the dump results. The value is the text up to the next element or the end of range indicated by index2. A text element does not span newlines. A multi-line block of text that contains no marks or tag transitions will still be dumped as a set of text seqments that each end with a newline. The newline is part of the value.

-window

Include information about embedded windows in the dump results. The value of a window is its Tk pathname, unless the window has not been created yet. (It must have a create script.) In this case an empty string is returned, and you must query the window by its index position to get more information.

$text->edit( option, ?arg, arg …? );
This command controls the undo mechanism and the modified flag. The exact behavior of the command depends on the option argument that follows the edit argument. The following forms of the command are currently supported:

$text->editModified( ?boolean? );
If boolean is not specified, returns the modified flag of the widget. The insert, delete, edit undo and edit redo commands or the user can set or clear the modified flag. If boolean is specified, sets the modified flag of the widget to boolean.

$text->editRedo;
(Not implemented, use TextUndo.) When the -undo option is true, reapplies the last undone edits provided no other edits were done since then. Generates an error when the redo stack is empty. Does nothing when the -undo option is false.

$text->editReset;
(Not implemented, use TextUndo.) Clears the undo and redo stacks.

$text->editSeparator;
(Not implemented, use TextUndo.) Inserts a separator (boundary) on the undo stack. Does nothing when the -undo option is false.

$text->editUndo;
(Not implemented, use TextUndo.) Undoes the last edit action when the -undo option is true. An edit action is defined as all the insert and delete commands that are recorded on the undo stack in between two separators. Generates an error when the undo stack is empty. Does nothing when the -undo option is false.

$text->FindAll(mode, case, pattern)
Removes any current selections and then performs a global text search. All matches are tagged with the sel tag. mode can be be -exact or -regexp. See the search command for more information case can be -nocase or -case. See the search command for more information pattern is an exact string to match if mode is -exact or a regular expression if the match mode is -regexp.

$text->FindAndReplaceAll(mode, case, find, replace)
Same as the FindAll method, however additionally substitutes the matched text with the characters replace.

$text->FindAndReplacePopUp
Creates a find-and-replace popup window if one does not already exist. If there is currently selected text, then the ‘find’ field will be ‘pre-filled’ with the selection.

$text->FindNext(direction, mode, case, pattern)
Removes any current selections and then performs a forward or reverse text search. All matches are tagged with the sel tag. direction can be -forwards or -backwards. mode, case and pattern are as for the FindAll method.

$text->FindPopUp
Creates a find popup, if one does not yet exist. If there is currently selected text, then the ‘find’ field will be ‘pre-filled’ with the selection.

$text->FindSelectionNext
Gets the currently selected text and removes all selections. It then finds the next exact, case-sensitive string that matches in a forward direction and selects the text and makes the new selection visible.

$text->FindSelectionPrevious
Gets the currently selected text and removes all selections. It then finds the next exact, case-sensitive string that matches in a reverse direction and selects the text and makes the new selection visible.

$text->get(index1, ?index2?)
Return a range of characters from the text. The return value will be all the characters in the text starting with the one whose index is index1 and ending just before the one whose index is index2 (the character at index2 will not be returned). If index2 is omitted then the single character at index1 is returned. If there are no characters in the specified range (e.g. index1 is past the end of the file or index2 is less than or equal to index1) then an empty string is returned. If the specified range contains embedded windows, no information about them is included in the returned string. If multiple index pairs are given, multiple ranges of text will be returned in a list. Invalid ranges will not be represented with empty strings in the list. The ranges are returned in the order passed to get.

$text->getSelected
Return the currently selected text.

$text->GetTextTaggedWith(tag)
Return the text tagged with the tag parameter.

$text->GotoLineNumber(line_number)
Set the insert mark to line_number and ensures the line is visible.

$text->GotoLineNumberPopUp(line_number)
Displays a popup, pre-filling it with selected numeric text (if any), or the line number from GotoLineNumber (if any).

$text->image(option, ?arg, arg, …?)

$text->imageOption(?arg, arg, …?)

This method is used to manipulate embedded images. The behavior of the method depends on the option argument that follows the image prefix. The following forms of the methods are currently supported:

$text->imageCget(index, option)
Returns the value of a configuration option for an embedded image. Index identifies the embedded image, and option specifies a particular configuration option, which must be one of the ones listed in “EMBEDDED IMAGES”.

$text->imageConfigure(index, ?option, value, …?)
Query or modify the configuration options for an embedded image. If no option is specified, returns a list describing all of the available options for the embedded image at index (see Tk::options for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given option(s) to have the given value(s); in this case the command returns an empty string. See “EMBEDDED IMAGES” for information on the options that are supported.

$text->imageCreate(index, ?option, value, …?)
This command creates a new image annotation, which will appear in the text at the position given by index. Any number of option-value pairs may be specified to configure the annotation. Returns a unique identifier that may be used as an index to refer to this image. See “EMBEDDED IMAGES” for information on the options that are supported, and a description of the identifier returned.

$text->imageNames
Returns a list whose elements are the names of all image instances currently embedded in $text.

$text->index(index)
Returns the position corresponding to index in the form line.char where line is the line number and char is the character number. Index may have any of the forms described under “INDICES” above.

$text->insert(index, chars, ?tagList, chars, tagList, …?)
Inserts all of the chars arguments just before the character at index. If index refers to the end of the text (the character after the last newline) then the new text is inserted just before the last newline instead. If there is a single chars argument and no tagList, then the new text will receive any tags that are present on both the character before and the character after the insertion point; if a tag is present on only one of these characters then it will not be applied to the new text. If tagList is specified then it consists of a list of tag names; the new characters will receive all of the tags in this list and no others, regardless of the tags present around the insertion point. If multiple chars-tagList argument pairs are present, they produce the same effect as if a separate insert widget command had been issued for each pair, in order. The last tagList argument may be omitted.

$text->Insert(string)
Do NOT confuse this with the lower-case insert method. Insert string at the point of the insertion cursor. If there is a selection in the text, and it covers the point of the insertion cursor, then it deletes the selection before inserting.

$text->InsertKeypress(character)
Inserts character at the insert mark. If in overstrike mode, it firsts deletes the character at the insert mark.

$text->InsertSelection
Inserts the current selection at the insert mark.

$text->insertTab
Inserts a tab ( ) character at the insert mark.

$text->mark(option, ?arg, arg, …?)
This command is used to manipulate marks. The exact behavior of the command depends on the option argument that follows the mark argument. The following forms of the command are currently supported:

$text->markGravity(markName, ?direction?)
If direction is not specified, returns left or right to indicate which of its adjacent characters markName is attached to. If direction is specified, it must be left or right; the gravity of markName is set to the given value.

$text->markNames
Returns a list whose elements are the names of all the marks that are currently set.

$text->markNext(index)
Returns the name of the next mark at or after index. If index is specified in numerical form, then the search for the next mark begins at that index. If index is the name of a mark, then the search for the next mark begins immediately after that mark. This can still return a mark at the same position if there are multiple marks at the same index. These semantics mean that the mark next operation can be used to step through all the marks in a text widget in the same order as the mark information returned by the dump operation. If a mark has been set to the special end index, then it appears to be after end with respect to the mark next operation. An empty string is returned if there are no marks after index.

$text->markPrevious(index)
Returns the name of the mark at or before index. If index is specified in numerical form, then the search for the previous mark begins with the character just before that index. If index is the name of a mark, then the search for the next mark begins immediately before that mark. This can still return a mark at the same position if there are multiple marks at the same index. These semantics mean that the mark previous operation can be used to step through all the marks in a text widget in the reverse order as the mark information returned by the dump operation. An empty string is returned if there are no marks before index.

$text->markSet(markName, index)
Sets the mark named markName to a position just before the character at index. If markName already exists, it is moved from its old position; if it doesn’t exist, a new mark is created. This command returns an empty string.

$text->markUnset(markName?, markName, markName, …?)
Remove the mark corresponding to each of the markName arguments. The removed marks will not be usable in indices and will not be returned by future calls to ``$text->markNames’’. This command returns an empty string.

$text->markExists(markname)
Returns true if markname exists - false otherwise.

$text->menu(?menu?)
If menu reference is given as an argument, then the text widget menu is adjusted to use this new menu. If the menu argument is undef, then this command disables the current text widget menu. If the menu argument is omitted altogether, then the current text widget menu reference is returned.

$text->openLine
Inserts a newline ( ) at the insert mark.

$text->OverstrikeMode(?boolean?)
Returns the overstrike mode if boolean is omitted or sets the overstrike mode to boolean. True means overstrike mode is enabled.

$text->PostPopupMenu(x,y)
Creates a popup menu at the specified (x,y) pixel coordinates. The default menu has File, Edit, Search and View menu items which cascade to sub-menus for further commands. There is an implicit <Button-3> binding to this method that posts the menu over the cursor.

$text->ResetAnchor
Sets the selection anchor to whichever end is farthest from the index argument.

$text->scan(option, args) or

$text->scanoption(args)

This method is used to implement scanning on texts. It has two forms, depending on option:

$text->scanMark(x, y)
Records x and y and the current view in the text window, for use in conjunction with later scanDragto method. Typically this method is associated with a mouse button press in the widget. It returns an empty string.

$text->scanDragto(x, y)
This command computes the difference between its x and y arguments and the x and y arguments to the last scanMark method for the widget. It then adjusts the view by 10 times the difference in coordinates. This command is typically associated with mouse motion events in the widget, to produce the effect of dragging the text at high speed through the window. The return value is an empty string.

$text->search(?switches,? pattern, index, ?stopIndex?)
Searches the text in $text starting at index for a range of characters that matches pattern. If a match is found, the index of the first character in the match is returned as result; otherwise an empty string is returned. One or more of the following switches (or abbreviations thereof) may be specified to control the search:

-forwards
The search will proceed forward through the text, finding the first matching range starting at or after the position given by index. This is the default.

-backwards
The search will proceed backward through the text, finding the matching range closest to index whose first character is before index.

-exact
Use exact matching: the characters in the matching range must be identical to those in pattern. This is the default.

-regexp
Treat pattern as a regular expression and match it against the text using the rules for regular expressions (see the regexp command for details).

-nocase
Ignore case differences between the pattern and the text.

-count varName
The argument following -count gives the name of a variable; if a match is found, the number of characters in the matching range will be stored in the variable.

-hidden
Find hidden text as well. By default only displayed text is found.


This switch has no effect except to terminate the list of switches: the next argument will be treated as pattern even if it starts with -.

The matching range must be entirely within a single line of text. For regular expression matching the newlines are removed from the ends of the lines before matching: use the $ feature in regular expressions to match the end of a line. For exact matching the newlines are retained. If stopIndex is specified, the search stops at that index: for forward searches, no match at or after stopIndex will be considered; for backward searches, no match earlier in the text than stopIndex will be considered. If stopIndex is omitted, the entire text will be searched: when the beginning or end of the text is reached, the search continues at the other end until the starting location is reached again; if stopIndex is specified, no wrap-around will occur.

$text->see(index)
Adjusts the view in the window so that the character given by index is completely visible. If index is already visible then the command does nothing. If index is a short distance out of view, the command adjusts the view just enough to make index visible at the edge of the window. If index is far out of view, then the command centers index in the window.

$text->selectAll
Selects all the text in the widget.

$text->selectLine
Selects the line with the insert mark.

$text->selectWord
Selects the word with the insert mark.

$text->SetCursor(position)
Moves the insert mark to position.

$text->tag(option, ?arg, arg, …?)
This command is used to manipulate tags. The exact behavior of the command depends on the option argument that follows the tag argument. The following forms of the command are currently supported:

$text->tagAdd(tagName, index1, ?index2, index1, index2, …?)
Associate the tag tagName with all of the characters starting with index1 and ending just before index2 (the character at index2 isn’t tagged). A single command may contain any number of index1-index2 pairs. If the last index2 is omitted then the single character at index1 is tagged. If there are no characters in the specified range (e.g. index1 is past the end of the file or index2 is less than or equal to index1) then the command has no effect.

$text->tagBind(tagName, ?sequence?, ?script?)
This command associates script with the tag given by tagName. Whenever the event sequence given by sequence occurs for a character that has been tagged with tagName, the script will be invoked. This method is similar to the bind command except that it operates on characters in a text rather than entire widgets. See the Tk::bind documentation for complete details on the syntax of sequence and the substitutions performed on script before invoking it. If all arguments are specified then a new binding is created, replacing any existing binding for the same sequence and tagName (if the first character of script is ``+’’ then script augments an existing binding rather than replacing it). In this case the return value is an empty string. If script is omitted then the command returns the script associated with tagName and sequence (an error occurs if there is no such binding). If both script and sequence are omitted then the command returns a list of all the sequences for which bindings have been defined for tagName. The only events for which bindings may be specified are those related to the mouse and keyboard (such as Enter, Leave, ButtonPress, Motion, and KeyPress) or virtual events. Event bindings for a text widget use the current mark described under “MARKS” above. An Enter event triggers for a tag when the tag first becomes present on the current character, and a Leave event triggers for a tag when it ceases to be present on the current character. Enter and Leave events can happen either because the current mark moved or because the character at that position changed. Note that these events are different than Enter and Leave events for windows. Mouse and keyboard events are directed to the current character. If a virtual event is used in a binding, that binding can trigger only if the virtual event is defined by an underlying mouse-related or keyboard-related event. It is possible for the current character to have multiple tags, and for each of them to have a binding for a particular event sequence. When this occurs, one binding is invoked for each tag, in order from lowest-priority to highest priority. If there are multiple matching bindings for a single tag, then the most specific binding is chosen (see the the documentation for the bind command for details). continue and break commands within binding scripts are processed in the same way as for bindings created with the bind command. If bindings are created for the widget as a whole using the bind command, then those bindings will supplement the tag bindings. The tag bindings will be invoked first, followed by bindings for the window as a whole.

$text->tagCget(tagName, option)
This command returns the current value of the option named option associated with the tag given by tagName. Option may have any of the values accepted by the tag configure method.

$text->tagConfigure(tagName, ?option?, ?value?, ?option, value, …?)
This command is similar to the configure method except that it modifies options associated with the tag given by tagName instead of modifying options for the overall text widget. If no option is specified, the command returns a list describing all of the available options for tagName (see Tk::options for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given option(s) to have the given value(s) in tagName; in this case the command returns an empty string. See “TAGS” above for details on the options available for tags.

$text->tagDelete(tagName, ?tagName, …?)
Deletes all tag information for each of the tagName arguments. The command removes the tags from all characters in the file and also deletes any other information associated with the tags, such as bindings and display information. The command returns an empty string.

$text->tagLower(tagName?, belowThis?)
Changes the priority of tag tagName so that it is just lower in priority than the tag whose name is belowThis. If belowThis is omitted, then tagName’s priority is changed to make it lowest priority of all tags.

$text->tagNames(?index?)
Returns a list whose elements are the names of all the tags that are active at the character position given by index. If index is omitted, then the return value will describe all of the tags that exist for the text (this includes all tags that have been named in a ``$text->tag’’ widget command but haven’t been deleted by a ``$text->tagDelete’’ method, even if no characters are currently marked with the tag). The list will be sorted in order from lowest priority to highest priority.

$text->tagNextrange(tagName, index1, ?index2?)
This command searches the text for a range of characters tagged with tagName where the first character of the range is no earlier than the character at index1 and no later than the character just before index2 (a range starting at index2 will not be considered). If several matching ranges exist, the first one is chosen. The command’s return value is a list containing two elements, which are the index of the first character of the range and the index of the character just after the last one in the range. If no matching range is found then the return value is an empty string. If index2 is not given then it defaults to the end of the text.

$text->tagPrevrange(tagName, index1, ?index2?)
This command searches the text for a range of characters tagged with tagName where the first character of the range is before the character at index1 and no earlier than the character at index2 (a range starting at index2 will be considered). If several matching ranges exist, the one closest to index1 is chosen. The command’s return value is a list containing two elements, which are the index of the first character of the range and the index of the character just after the last one in the range. If no matching range is found then the return value is an empty string. If index2 is not given then it defaults to the beginning of the text.

$text->tagRaise(tagName, ?aboveThis?)
Changes the priority of tag tagName so that it is just higher in priority than the tag whose name is aboveThis. If aboveThis is omitted, then tagName’s priority is changed to make it highest priority of all tags.

$text->tagRanges(tagName)
Returns a list describing all of the ranges of text that have been tagged with tagName. The first two elements of the list describe the first tagged range in the text, the next two elements describe the second range, and so on. The first element of each pair contains the index of the first character of the range, and the second element of the pair contains the index of the character just after the last one in the range. If there are no characters tagged with tag then an empty string is returned.

$text->tagRemove(tagName, index1, ?index2, index1, index2, …?)
Remove the tag tagName from all of the characters starting at index1 and ending just before index2 (the character at index2 isn’t affected). A single command may contain any number of index1-index2 pairs. If the last index2 is omitted then the single character at index1 is tagged. If there are no characters in the specified range (e.g. index1 is past the end of the file or index2 is less than or equal to index1) then the command has no effect. This command returns an empty string.

$text->ToggleInsertMode
Toggles the current overstrike mode.

$text->unselectAll
Unselects all the text in the widget.

$text->WhatLineNumberPopup
Creates a popup that displays the current line number of the insert mark.

$text->widget(option?, arg, arg, …?)

$text->widgetOption(?arg, arg, …?)

This method is used to manipulate embedded windows. The behavior of the method depends on the option argument that follows the window argument. The following forms of the method are currently supported:

$text->windowCget(index, option)
Returns the value of a configuration option for an embedded window. Index identifies the embedded window, and option specifies a particular configuration option, which must be one of the ones listed in “EMBEDDED WINDOWS” above.

$text->windowConfigure(index?, option, value, …?)
Query or modify the configuration options for an embedded window. If no option is specified, returns a list describing all of the available options for the embedded window at index (see Tk::options for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given option(s) to have the given value(s); in this case the command returns an empty string. See “EMBEDDED WINDOWS” above for information on the options that are supported.

$text->windowCreate(index?, option, value, …?)
This command creates a new window annotation, which will appear in the text at the position given by index. Any number of option-value pairs may be specified to configure the annotation. See “EMBEDDED WINDOWS” above for information on the options that are supported. Returns an empty string.

$text->windowNames
Returns a list whose elements are the names of all windows currently embedded in $text.

$text->xview(option, args)
This command is used to query and change the horizontal position of the text in the widget’s window. It can take any of the following forms:

$text->xview
Returns a list containing two elements. Each element is a real fraction between 0 and 1; together they describe the portion of the document’s horizontal span that is visible in the window. For example, if the first element is .2 and the second element is .6, 20% of the text is off-screen to the left, the middle 40% is visible in the window, and 40% of the text is off-screen to the right. The fractions refer only to the lines that are actually visible in the window: if the lines in the window are all very short, so that they are entirely visible, the returned fractions will be 0 and 1, even if there are other lines in the text that are much wider than the window. These are the same values passed to scrollbars via the -xscrollcommand option.

$text->xviewMoveto(fraction)
Adjusts the view in the window so that fraction of the horizontal span of the text is off-screen to the left. Fraction is a fraction between 0 and 1.

$text->xviewScroll(number, what)
This command shifts the view in the window left or right according to number and what. Number must be an integer. What must be either units or pages or an abbreviation of one of these. If what is units, the view adjusts left or right by number average-width characters on the display; if it is pages then the view adjusts by number screenfuls. If number is negative then characters farther to the left become visible; if it is positive then characters farther to the right become visible.

$text->yview(?args?)
This command is used to query and change the vertical position of the text in the widget’s window. It can take any of the following forms:

$text->yview
Returns a list containing two elements, both of which are real fractions between 0 and 1. The first element gives the position of the first character in the top line in the window, relative to the text as a whole (0.5 means it is halfway through the text, for example). The second element gives the position of the character just after the last one in the bottom line of the window, relative to the text as a whole. These are the same values passed to scrollbars via the -yscrollcommand option.

$text->yviewMoveto(fraction)
Adjusts the view in the window so that the character given by fraction appears on the top line of the window. Fraction is a fraction between 0 and 1; 0 indicates the first character in the text, 0.33 indicates the character one-third the way through the text, and so on.

$text->yviewScroll(number, what)
This command adjust the view in the window up or down according to number and what. Number must be an integer. What must be either units or pages. If what is units, the view adjusts up or down by number lines on the display; if it is pages then the view adjusts by number screenfuls. If number is negative then earlier positions in the text become visible; if it is positive then later positions in the text become visible.

$text->yview(?-pickplace,? index)
Changes the view in the $text’s window to make index visible. If the -pickplace option isn’t specified then index will appear at the top of the window. If -pickplace is specified then the widget chooses where index appears in the window:

[1]
If index is already visible somewhere in the window then the command does nothing.

[2]
If index is only a few lines off-screen above the window then it will be positioned at the top of the window.

[3]
If index is only a few lines off-screen below the window then it will be positioned at the bottom of the window.

[4]
Otherwise, index will be centered in the window.

The -pickplace option has been obsoleted by the see widget command (see handles both x- and y-motion to make a location visible, whereas -pickplace only handles motion in y).

$text->yview(number)
This command makes the first character on the line after the one given by number visible at the top of the window. Number must be an integer. This command used to be used for scrolling, but now it is obsolete.

BINDINGS

Tk automatically creates class bindings for texts that give them the following default behavior. In the descriptions below, ``word’’ refers to a contiguous group of letters, digits, or ``_’’ characters, or any single character other than these.

[1]
Clicking mouse button 1 positions the insertion cursor just before the character underneath the mouse cursor, sets the input focus to this widget, and clears any selection in the widget. Dragging with mouse button 1 strokes out a selection between the insertion cursor and the character under the mouse.

[2]
Double-clicking with mouse button 1 selects the word under the mouse and positions the insertion cursor at the beginning of the word. Dragging after a double click will stroke out a selection consisting of whole words.

[3]
Triple-clicking with mouse button 1 selects the line under the mouse and positions the insertion cursor at the beginning of the line. Dragging after a triple click will stroke out a selection consisting of whole lines.

[4]
The ends of the selection can be adjusted by dragging with mouse button 1 while the Shift key is down; this will adjust the end of the selection that was nearest to the mouse cursor when button 1 was pressed. If the button is double-clicked before dragging then the selection will be adjusted in units of whole words; if it is triple-clicked then the selection will be adjusted in units of whole lines.

[5]
Clicking mouse button 1 with the Control key down will reposition the insertion cursor without affecting the selection.

[6]
If any normal printing characters are typed, they are inserted at the point of the insertion cursor.

[7]
The view in the widget can be adjusted by dragging with mouse button 2. If mouse button 2 is clicked without moving the mouse, the selection is copied into the text at the position of the mouse cursor. The Insert key also inserts the selection, but at the position of the insertion cursor.

[8]
If the mouse is dragged out of the widget while button 1 is pressed, the entry will automatically scroll to make more text visible (if there is more text off-screen on the side where the mouse left the window).

[9]
The Left and Right keys move the insertion cursor one character to the left or right; they also clear any selection in the text. If Left or Right is typed with the Shift key down, then the insertion cursor moves and the selection is extended to include the new character. Control-Left and Control-Right move the insertion cursor by words, and Control-Shift-Left and Control-Shift-Right move the insertion cursor by words and also extend the selection. Control-b and Control-f behave the same as Left and Right, respectively. Meta-b and Meta-f behave the same as Control-Left and Control-Right, respectively.

[10]
The Up and Down keys move the insertion cursor one line up or down and clear any selection in the text. If Up or Right is typed with the Shift key down, then the insertion cursor moves and the selection is extended to include the new character. Control-Up and Control-Down move the insertion cursor by paragraphs (groups of lines separated by blank lines), and Control-Shift-Up and Control-Shift-Down move the insertion cursor by paragraphs and also extend the selection. Control-p and Control-n behave the same as Up and Down, respectively.

[11]
The Next and Prior keys move the insertion cursor forward or backwards by one screenful and clear any selection in the text. If the Shift key is held down while Next or Prior is typed, then the selection is extended to include the new character. Control-v moves the view down one screenful without moving the insertion cursor or adjusting the selection.

[12]
Control-Next and Control-Prior scroll the view right or left by one page without moving the insertion cursor or affecting the selection.

[13]
Home and Control-a move the insertion cursor to the beginning of its line and clear any selection in the widget. Shift-Home moves the insertion cursor to the beginning of the line and also extends the selection to that point.

[14]
End and Control-e move the insertion cursor to the end of the line and clear any selection in the widget. Shift-End moves the cursor to the end of the line and extends the selection to that point.

[15]
Control-Home and Meta-< move the insertion cursor to the beginning of the text and clear any selection in the widget. Control-Shift-Home moves the insertion cursor to the beginning of the text and also extends the selection to that point.

[16]
Control-End and Meta-> move the insertion cursor to the end of the text and clear any selection in the widget. Control-Shift-End moves the cursor to the end of the text and extends the selection to that point.

[17]
The Select key and Control-Space set the selection anchor to the position of the insertion cursor. They don’t affect the current selection. Shift-Select and Control-Shift-Space adjust the selection to the current position of the insertion cursor, selecting from the anchor to the insertion cursor if there was not any selection previously.

[18]
Control-/ selects the entire contents of the widget.

[19]
Control-\ clears any selection in the widget.

[20]
The F16 key (labelled Copy on many Sun workstations) or Meta-w copies the selection in the widget to the clipboard, if there is a selection.

[21]
The F20 key (labelled Cut on many Sun workstations) or Control-w copies the selection in the widget to the clipboard and deletes the selection. If there is no selection in the widget then these keys have no effect.

[22]
The F18 key (labelled Paste on many Sun workstations) or Control-y inserts the contents of the clipboard at the position of the insertion cursor.

[23]
The Delete key deletes the selection, if there is one in the widget. If there is no selection, it deletes the character to the right of the insertion cursor.

[24]
Backspace and Control-h delete the selection, if there is one in the widget. If there is no selection, they delete the character to the left of the insertion cursor.

[25]
Control-d deletes the character to the right of the insertion cursor.

[26]
Meta-d deletes the word to the right of the insertion cursor.

[27]
Control-k deletes from the insertion cursor to the end of its line; if the insertion cursor is already at the end of a line, then Control-k deletes the newline character.

[28]
Control-o opens a new line by inserting a newline character in front of the insertion cursor without moving the insertion cursor.

[29]
Meta-backspace and Meta-Delete delete the word to the left of the insertion cursor.

[30]
Control-x deletes whatever is selected in the text widget.

[31]
Control-t reverses the order of the two characters to the right of the insertion cursor.

[32]
Control-z (and Control-underscore on UNIX when tk_strictMotif is true) undoes the last edit action if the -undo option is true. Does nothing otherwise.

[33]
Control-Z (or Control-y on Windows) reapplies the last undone edit action if the -undo option is true. Does nothing otherwise.

If the widget is disabled using the -state option, then its view can still be adjusted and text can still be selected, but no insertion cursor will be displayed and no text modifications will take place.

The behavior of texts can be changed by defining new bindings for individual widgets or by redefining the class bindings.

TIED INTERFACE

The Perl/Tk Text widget also has built-in TIEHANDLE methods for print and printf statements. This means you can print to file handles tied to a Text widget, and the tied methods automatically insert the print statement’s arguments into the Text widget.

For example:

#!/usr/local/bin/perl -w use POSIX acos; use Tk; use strict; my $mw = MainWindow->new; my $text = $mw->Text(qw/-width 40 -height 10/)->pack; tie *STDOUT, ref $text, $text; print “Hello Text World! “; printf “pi ~= %1.5f”, acos(-1.0); MainLoop;

To tie a scrolled Text widget, use the Subwidget method to get to the “real” widget:

my $text = $mw->Scrolled(Text)->pack; tie *STDOUT, Tk::Text, $text->Subwidget(scrolled);

PERFORMANCE ISSUES

Text widgets should run efficiently under a variety of conditions. The text widget uses about 2-3 bytes of main memory for each byte of text, so texts containing a megabyte or more should be practical on most workstations. Text is represented internally with a modified B-tree structure that makes operations relatively efficient even with large texts. Tags are included in the B-tree structure in a way that allows tags to span large ranges or have many disjoint smaller ranges without loss of efficiency. Marks are also implemented in a way that allows large numbers of marks. In most cases it is fine to have large numbers of unique tags, or a tag that has many distinct ranges.

One performance problem can arise if you have hundreds or thousands of different tags that all have the following characteristics: the first and last ranges of each tag are near the beginning and end of the text, respectively, or a single tag range covers most of the text widget. The cost of adding and deleting tags like this is proportional to the number of other tags with the same properties. In contrast, there is no problem with having thousands of distinct tags if their overall ranges are localized and spread uniformly throughout the text.

Very long text lines can be expensive, especially if they have many marks and tags within them.

The display line with the insert cursor is redrawn each time the cursor blinks, which causes a steady stream of graphics traffic. Set the -insertofftime option to 0 avoid this.

SEE ALSO

Tk::ROText Tk::TextUndo

KEYWORDS

text, widget

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

93 - Linux cli command Net_DNS_RR_PXpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_PXpm and provides detailed information about the command Net_DNS_RR_PXpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_PXpm.

NAME 🖥️ Net_DNS_RR_PXpm 🖥️

DNS PX resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name PX preference map822 mapx400);

DESCRIPTION

Class for DNS X.400 Mail Mapping Information (PX) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

preference

$preference = $rr->preference; $rr->preference( $preference );

A 16 bit integer which specifies the preference given to this RR among others at the same owner. Lower values are preferred.

map822

$map822 = $rr->map822; $rr->map822( $map822 );

A domain name element containing <rfc822-domain>, the RFC822 part of the MIXER Conformant Global Address Mapping.

mapx400

$mapx400 = $rr->mapx400; $rr->mapx400( $mapx400 );

A <domain-name> element containing the value of <x400-in-domain-syntax> derived from the X.400 part of the MIXER Conformant Global Address Mapping.

COPYRIGHT

Copyright (c)1997 Michael Fuhr.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC2163 <https://tools.ietf.org/html/rfc2163>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

94 - Linux cli command pthread_kill_other_threads_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_kill_other_threads_np and provides detailed information about the command pthread_kill_other_threads_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_kill_other_threads_np.

NAME 🖥️ pthread_kill_other_threads_np 🖥️

terminate all other threads in process

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
void pthread_kill_other_threads_np(void);

DESCRIPTION

pthread_kill_other_threads_np() has an effect only in the LinuxThreads threading implementation. On that implementation, calling this function causes the immediate termination of all threads in the application, except the calling thread. The cancelation state and cancelation type of the to-be-terminated threads are ignored, and the cleanup handlers are not called in those threads.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_kill_other_threads_np()

Thread safetyMT-Safe

VERSIONS

In the NPTL threading implementation, pthread_kill_other_threads_np() exists, but does nothing. (Nothing needs to be done, because the implementation does the right thing during an execve(2).)

STANDARDS

GNU; hence the suffix “_np” (nonportable) in the name.

HISTORY

glibc 2.0

NOTES

pthread_kill_other_threads_np() is intended to be called just before a thread calls execve(2) or a similar function. This function is designed to address a limitation in the obsolete LinuxThreads implementation whereby the other threads of an application are not automatically terminated (as POSIX.1-2001 requires) during execve(2).

SEE ALSO

execve(2), pthread_cancel(3), pthread_setcancelstate(3), pthread_setcanceltype(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

95 - Linux cli command tdestroy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tdestroy and provides detailed information about the command tdestroy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tdestroy.

NAME 🖥️ tdestroy 🖥️

manage a binary search tree

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <search.h>
typedef enum { preorder, postorder, endorder, leaf } VISIT;
void *tsearch(const void *key, void **rootp,
 int (*compar)(const void *, const void *));
void *tfind(const void *key, void *const *rootp,
 int (*compar)(const void *, const void *));
void *tdelete(const void *restrict key, void **restrict rootp,
 int (*compar)(const void *, const void *));
void twalk(const void *root,
 void (*action)(const void *nodep, VISIT which,
 int depth));
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <search.h>
void twalk_r(const void *root,
 void (*action)(const void *nodep, VISIT which,
 void *closure),
 void *closure);
void tdestroy(void *root, void (*free_node)(void *nodep));

DESCRIPTION

tsearch(), tfind(), twalk(), and tdelete() manage a binary search tree. They are generalized from Knuth (6.2.2) Algorithm T. The first field in each node of the tree is a pointer to the corresponding data item. (The calling program must store the actual data.) compar points to a comparison routine, which takes pointers to two items. It should return an integer which is negative, zero, or positive, depending on whether the first item is less than, equal to, or greater than the second.

tsearch() searches the tree for an item. key points to the item to be searched for. rootp points to a variable which points to the root of the tree. If the tree is empty, then the variable that rootp points to should be set to NULL. If the item is found in the tree, then tsearch() returns a pointer to the corresponding tree node. (In other words, tsearch() returns a pointer to a pointer to the data item.) If the item is not found, then tsearch() adds it, and returns a pointer to the corresponding tree node.

tfind() is like tsearch(), except that if the item is not found, then tfind() returns NULL.

tdelete() deletes an item from the tree. Its arguments are the same as for tsearch().

twalk() performs depth-first, left-to-right traversal of a binary tree. root points to the starting node for the traversal. If that node is not the root, then only part of the tree will be visited. twalk() calls the user function action each time a node is visited (that is, three times for an internal node, and once for a leaf). action, in turn, takes three arguments. The first argument is a pointer to the node being visited. The structure of the node is unspecified, but it is possible to cast the pointer to a pointer-to-pointer-to-element in order to access the element stored within the node. The application must not modify the structure pointed to by this argument. The second argument is an integer which takes one of the values preorder, postorder, or endorder depending on whether this is the first, second, or third visit to the internal node, or the value leaf if this is the single visit to a leaf node. (These symbols are defined in <search.h>.) The third argument is the depth of the node; the root node has depth zero.

(More commonly, preorder, postorder, and endorder are known as preorder, inorder, and postorder: before visiting the children, after the first and before the second, and after visiting the children. Thus, the choice of name postorder is rather confusing.)

twalk_r() is similar to twalk(), but instead of the depth argument, the closure argument pointer is passed to each invocation of the action callback, unchanged. This pointer can be used to pass information to and from the callback function in a thread-safe fashion, without resorting to global variables.

tdestroy() removes the whole tree pointed to by root, freeing all resources allocated by the tsearch() function. For the data in each tree node the function free_node is called. The pointer to the data is passed as the argument to the function. If no such work is necessary, free_node must point to a function doing nothing.

RETURN VALUE

tsearch() returns a pointer to a matching node in the tree, or to the newly added node, or NULL if there was insufficient memory to add the item. tfind() returns a pointer to the node, or NULL if no match is found. If there are multiple items that match the key, the item whose node is returned is unspecified.

tdelete() returns a pointer to the parent of the node deleted, or NULL if the item was not found. If the deleted node was the root node, tdelete() returns a dangling pointer that must not be accessed.

tsearch(), tfind(), and tdelete() also return NULL if rootp was NULL on entry.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tsearch(), tfind(), tdelete()

Thread safetyMT-Safe race:rootp

twalk()

Thread safetyMT-Safe race:root

twalk_r()

Thread safetyMT-Safe race:root

tdestroy()

Thread safetyMT-Safe

STANDARDS

tsearch()
tfind()
tdelete()
twalk()
POSIX.1-2008.

tdestroy()
twalk_r()
GNU.

HISTORY

tsearch()
tfind()
tdelete()
twalk()
POSIX.1-2001, POSIX.1-2008, SVr4.

twalk_r()
glibc 2.30.

NOTES

twalk() takes a pointer to the root, while the other functions take a pointer to a variable which points to the root.

tdelete() frees the memory required for the node in the tree. The user is responsible for freeing the memory for the corresponding data.

The example program depends on the fact that twalk() makes no further reference to a node after calling the user function with argument “endorder” or “leaf”. This works with the GNU library implementation, but is not in the System V documentation.

EXAMPLES

The following program inserts twelve random numbers into a binary tree, where duplicate numbers are collapsed, then prints the numbers in order.

#define _GNU_SOURCE     /* Expose declaration of tdestroy() */
#include <search.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
static void *root = NULL;
static void *
xmalloc(size_t n)
{
    void *p;
    p = malloc(n);
    if (p)
        return p;
    fprintf(stderr, "insufficient memory

“); exit(EXIT_FAILURE); } static int compare(const void *pa, const void pb) { if ((int *) pa < *(int ) pb) return -1; if ((int *) pa > *(int *) pb) return 1; return 0; } static void action(const void *nodep, VISIT which, int depth) { int *datap; switch (which) { case preorder: break; case postorder: datap = *(int **) nodep; printf("%6d “, *datap); break; case endorder: break; case leaf: datap = *(int **) nodep; printf("%6d “, *datap); break; } } int main(void) { int *ptr; int **val; srand(time(NULL)); for (unsigned int i = 0; i < 12; i++) { ptr = xmalloc(sizeof(*ptr)); *ptr = rand() & 0xff; val = tsearch(ptr, &root, compare); if (val == NULL) exit(EXIT_FAILURE); if (*val != ptr) free(ptr); } twalk(root, action); tdestroy(root, free); exit(EXIT_SUCCESS); }

SEE ALSO

bsearch(3), hsearch(3), lsearch(3), qsort(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

96 - Linux cli command SLIST_INIT

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SLIST_INIT and provides detailed information about the command SLIST_INIT, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SLIST_INIT.

NAME 🖥️ SLIST_INIT 🖥️

implementation of a singly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
SLIST_ENTRY(TYPE);
SLIST_HEAD(HEADNAME, TYPE);
SLIST_HEAD SLIST_HEAD_INITIALIZER(SLIST_HEAD head);
void SLIST_INIT(SLIST_HEAD *head);
int SLIST_EMPTY(SLIST_HEAD *head);
void SLIST_INSERT_HEAD(SLIST_HEAD *head,
 struct TYPE *elm, SLIST_ENTRY NAME);
void SLIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, SLIST_ENTRY NAME);
struct TYPE *SLIST_FIRST(SLIST_HEAD *head);
struct TYPE *SLIST_NEXT(struct TYPE *elm, SLIST_ENTRY NAME);
SLIST_FOREACH(struct TYPE *var, SLIST_HEAD *head, SLIST_ENTRY NAME);
void SLIST_REMOVE(SLIST_HEAD *head, struct TYPE *elm,
 SLIST_ENTRY NAME);
void SLIST_REMOVE_HEAD(SLIST_HEAD *head,
 SLIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on singly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type SLIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro SLIST_HEAD().

Creation

A singly linked list is headed by a structure defined by the SLIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the list after an existing element or at the head of the list. An SLIST_HEAD structure is declared as follows:

SLIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

SLIST_ENTRY() declares a structure that connects the elements in the list.

SLIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

SLIST_INIT() initializes the list referenced by head.

SLIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

SLIST_INSERT_HEAD() inserts the new element elm at the head of the list.

SLIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

SLIST_FIRST() returns the first element in the list, or NULL if the list is empty.

SLIST_NEXT() returns the next element in the list.

SLIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

SLIST_REMOVE() removes the element elm from the list.

SLIST_REMOVE_HEAD() removes the element elm from the head of the list. For optimum efficiency, elements being removed from the head of the list should explicitly use this macro instead of the generic SLIST_REMOVE().

RETURN VALUE

SLIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

SLIST_FIRST(), and SLIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

SLIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

SLIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. SLIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    SLIST_ENTRY(entry) entries;             /* Singly linked list */
};
SLIST_HEAD(slisthead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct slisthead head;                  /* Singly linked list
                                               head */
    SLIST_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    SLIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    SLIST_INSERT_AFTER(n1, n2, entries);
    SLIST_REMOVE(&head, n2, entry, entries);/* Deletion */
    free(n2);
    n3 = SLIST_FIRST(&head);
    SLIST_REMOVE_HEAD(&head, entries);      /* Deletion from the head */
    free(n3);
    for (unsigned int i = 0; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        SLIST_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    SLIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); while (!SLIST_EMPTY(&head)) { /* List deletion */ n1 = SLIST_FIRST(&head); SLIST_REMOVE_HEAD(&head, entries); free(n1); } SLIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

97 - Linux cli command strcspn

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strcspn and provides detailed information about the command strcspn, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strcspn.

NAME 🖥️ strcspn 🖥️

get length of a prefix substring

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
size_t strspn(const char *s, const char *accept);
size_t strcspn(const char *s, const char *reject);

DESCRIPTION

The strspn() function calculates the length (in bytes) of the initial segment of s which consists entirely of bytes in accept.

The strcspn() function calculates the length of the initial segment of s which consists entirely of bytes not in reject.

RETURN VALUE

The strspn() function returns the number of bytes in the initial segment of s which consist only of bytes from accept.

The strcspn() function returns the number of bytes in the initial segment of s which are not in the string reject.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strspn(), strcspn()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89, SVr4, 4.3BSD.

SEE ALSO

memchr(3), strchr(3), string(3), strpbrk(3), strsep(3), strstr(3), strtok(3), wcscspn(3), wcsspn(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

98 - Linux cli command XtRemoveBlockHook

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtRemoveBlockHook and provides detailed information about the command XtRemoveBlockHook, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtRemoveBlockHook.

NAME 🖥️ XtRemoveBlockHook 🖥️

register a block hook procedure

SYNTAX

#include <X11/Intrinsic.h>

XtBlockHookId XtAppAddBlockHook(XtAppContext app_context, XtBlockHookProc proc, XtPointer client_data);

void XtRemoveBlockHook(XtBlockHookId id);

ARGUMENTS

app_context
Specifies the application context.

proc
Specifies the block hook procedure.

num_args
Specifies the application-specific data to be passed to the block hook.

DESCRIPTION

XtAppAddBlockHook registers the specified procedure and returns an identifier for it. The hook is called at any time in the future when the Intrinsics are about to block pending some input.

Block hook procedures are removed automatically and the XtBlockHookId is destroyed when the application context in which they were added is destroyed.

XtRemoveBlockHook removes the specified block hook procedure from the list in which it was registered.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

99 - Linux cli command IO_Wrappm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_Wrappm and provides detailed information about the command IO_Wrappm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_Wrappm.

NAME 🖥️ IO_Wrappm 🖥️

Wrap raw filehandles in the IO::Handle interface

SYNOPSIS

use strict; use warnings; use IO::Wrap; # this is a fairly senseless use case as IO::Handle already does this. my $wrap_fh = IO::Wrap->new(\STDIN); my $line = $wrap_fh->getline(); # Do stuff with any kind of filehandle (including a bare globref), or # any kind of blessed object that responds to a print() message. # already have a globref? a FileHandle? a scalar filehandle name? $wrap_fh = IO::Wrap->new($some_unknown_thing); # At this point, we know we have an IO::Handle-like object! YAY $wrap_fh->print(“Hey there!”);

You can also do this using a convenience wrapper function

use strict; use warnings; use IO::Wrap qw(wraphandle); # this is a fairly senseless use case as IO::Handle already does this. my $wrap_fh = wraphandle(\STDIN); my $line = $wrap_fh->getline(); # Do stuff with any kind of filehandle (including a bare globref), or # any kind of blessed object that responds to a print() message. # already have a globref? a FileHandle? a scalar filehandle name? $wrap_fh = wraphandle($some_unknown_thing); # At this point, we know we have an IO::Handle-like object! YAY $wrap_fh->print(“Hey there!”);

DESCRIPTION

Let’s say you want to write some code which does I/O, but you don’t want to force the caller to provide you with a FileHandle or IO::Handle object. You want them to be able to say:

do_stuff(\STDOUT); do_stuff(STDERR); do_stuff($some_FileHandle_object); do_stuff($some_IO_Handle_object);

And even:

do_stuff($any_object_with_a_print_method);

Sure, one way to do it is to force the caller to use tiehandle(). But that puts the burden on them. Another way to do it is to use IO::Wrap.

Clearly, when wrapping a raw external filehandle (like \*STDOUT), I didn’t want to close the file descriptor when the wrapper object is destroyed; the user might not appreciate that! Hence, there’s no DESTROY method in this class.

When wrapping a FileHandle object, however, I believe that Perl will invoke the FileHandle::DESTROY when the last reference goes away, so in that case, the filehandle is closed if the wrapped FileHandle really was the last reference to it.

FUNCTIONS

IO::Wrap makes the following functions available.

wraphandle

# wrap a filehandle glob my $fh = wraphandle(\STDIN); # wrap a raw filehandle glob by name $fh = wraphandle(STDIN); # wrap a handle in an object $fh = wraphandle(Class::HANDLE); # wrap a blessed FileHandle object use FileHandle; my $fho = FileHandle->new("/tmp/foo.txt", “r”); $fh = wraphandle($fho); # wrap any other blessed object that shares IO::Handles interface $fh = wraphandle($some_object);

This function is simply a wrapper to the “new” in IO::Wrap constructor method.

METHODS

IO::Wrap implements the following methods.

close

$fh->close();

The close method will attempt to close the system file descriptor. For a more complete description, read “close” in perlfunc.

fileno

my $int = $fh->fileno();

The fileno method returns the file descriptor for the wrapped filehandle. See “fileno” in perlfunc for more information.

getline

my $data = $fh->getline();

The getline method mimics the function by the same name in IO::Handle. It’s like calling my $data = <$fh>; but only in scalar context.

getlines

my @data = $fh->getlines();

The getlines method mimics the function by the same name in IO::Handle. It’s like calling my @data = <$fh>; but only in list context. Calling this method in scalar context will result in a croak.

new

# wrap a filehandle glob my $fh = IO::Wrap->new(\STDIN); # wrap a raw filehandle glob by name $fh = IO::Wrap->new(STDIN); # wrap a handle in an object $fh = IO::Wrap->new(Class::HANDLE); # wrap a blessed FileHandle object use FileHandle; my $fho = FileHandle->new("/tmp/foo.txt", “r”); $fh = IO::Wrap->new($fho); # wrap any other blessed object that shares IO::Handles interface $fh = IO::Wrap->new($some_object);

The new constructor method takes in a single argument and decides to wrap it or not it based on what it seems to be.

A raw scalar file handle name, like "STDOUT" or "Class::HANDLE" can be wrapped, returning an IO::Wrap object instance.

A raw filehandle glob, like \*STDOUT can also be wrapped, returning an IO::Wrawp object instance.

A blessed FileHandle object can also be wrapped. This is a special case where an IO::Wrap object instance will only be returned in the case that your FileHandle object doesn’t support the read method.

Also, any other kind of blessed object that conforms to the IO::Handle interface can be passed in. In this case, you just get back that object.

In other words, we only wrap it into an IO::Wrap object when what you’ve supplied doesn’t already conform to the IO::Handle interface.

If you get back an IO::Wrap object, it will obey a basic subset of the IO:: interface. It will do so with object methods, not operators.

CAVEATS

This module does not allow you to wrap filehandle names which are given as strings that lack the package they were opened in. That is, if a user opens FOO in package Foo, they must pass it to you either as \*FOO or as "Foo::FOO". However, "STDIN" and friends will work just fine.

print

$fh->print(“Some string”); $fh->print(“more”, " than one", " string");

The print method will attempt to print a string or list of strings to the filehandle. For a more complete description, read “print” in perlfunc.

read

my $buffer; # try to read 30 chars into the buffer starting at the # current cursor position. my $num_chars_read = $fh->read($buffer, 30);

The read method attempts to read a number of characters, starting at the filehandle’s current cursor position. It returns the number of characters actually read. See “read” in perlfunc for more information.

seek

use Fcntl qw(:seek); # import the SEEK_CUR, SEEK_SET, SEEK_END constants # seek to the position in bytes $fh->seek(0, SEEK_SET); # seek to the position in bytes from the current position $fh->seek(22, SEEK_CUR); # seek to the EOF plus bytes $fh->seek(0, SEEK_END);

The seek method will attempt to set the cursor to a given position in bytes for the wrapped file handle. See “seek” in perlfunc for more information.

tell

my $bytes = $fh->tell();

The tell method will attempt to return the current position of the cursor in bytes for the wrapped file handle. See “tell” in perlfunc for more information.

AUTHOR

Eryq ([email protected]). President, ZeeGee Software Inc (http://www.zeegee.com).

CONTRIBUTORS

Dianne Skoll ([email protected]).

COPYRIGHT & LICENSE

Copyright (c) 1997 Erik (Eryq) Dorfman, ZeeGee Software, Inc. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

100 - Linux cli command Moose_Cookbook_Basics_Person_BUILDARGSAndBUILDpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Basics_Person_BUILDARGSAndBUILDpm and provides detailed information about the command Moose_Cookbook_Basics_Person_BUILDARGSAndBUILDpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Basics_Person_BUILDARGSAndBUILDpm.

NAME 🖥️ Moose_Cookbook_Basics_Person_BUILDARGSAndBUILDpm 🖥️

Using BUILDARGS and BUILD to hook into object construction

VERSION

version 2.2207

SYNOPSIS

package Person; has ssn => ( is => ro, isa => Str, predicate => has_ssn, ); has country_of_residence => ( is => ro, isa => Str, default => usa ); has first_name => ( is => ro, isa => Str, ); has last_name => ( is => ro, isa => Str, ); around BUILDARGS => sub { my $orig = shift; my $class = shift; if ( @_ == 1 && ! ref $_[0] ) { return $class->$orig(ssn => $_[0]); } else { return $class->$orig(@_); } }; sub BUILD { my $self = shift; if ( $self->country_of_residence eq usa ) { die Cannot create a Person who lives in the USA without an ssn. unless $self->has_ssn; } }

DESCRIPTION

This recipe demonstrates the use of BUILDARGS and BUILD. By defining these methods, we can hook into the object construction process without overriding new.

The BUILDARGS method is called before an object has been created. It is called as a class method, and receives all of the parameters passed to the new method. It is expected to do something with these arguments and return a hash reference. The keys of the hash must be attribute init_args.

The primary purpose of BUILDARGS is to allow a class to accept something other than named arguments. In the case of our Person class, we are allowing it to be called with a single argument, a social security number:

my $person = Person->new(123-45-6789);

The key part of our BUILDARGS is this conditional:

if ( @_ == 1 && ! ref $_[0] ) { return $class->$orig(ssn => $_[0]); }

By default, Moose constructors accept a list of key-value pairs, or a hash reference. We need to make sure that $_[0] is not a reference before assuming it is a social security number.

We call the original BUILDARGS method to handle all the other cases. You should always do this in your own BUILDARGS methods, since Moose::Object provides its own BUILDARGS method that handles hash references and a list of key-value pairs.

The BUILD method is called after the object is constructed, but before it is returned to the caller. The BUILD method provides an opportunity to check the object state as a whole. This is a good place to put logic that cannot be expressed as a type constraint on a single attribute.

In the Person class, we need to check the relationship between two attributes, ssn and country_of_residence. We throw an exception if the object is not logically consistent.

MORE CONSIDERATIONS

This recipe is made significantly simpler because all of the attributes are read-only. If the country_of_residence attribute were settable, we would need to check that a Person had an ssn if the new country was usa. This could be done with a before modifier.

CONCLUSION

We have repeatedly discouraged overriding new in Moose classes. This recipe shows how you can use BUILDARGS and BUILD to hook into object construction without overriding new.

The BUILDARGS method lets us expand on Moose’s built-in parameter handling for constructors. The BUILD method lets us implement logical constraints across the whole object after it is created.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

101 - Linux cli command WWW_Mechanize_Cookbookpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command WWW_Mechanize_Cookbookpm and provides detailed information about the command WWW_Mechanize_Cookbookpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the WWW_Mechanize_Cookbookpm.

NAME 🖥️ WWW_Mechanize_Cookbookpm 🖥️

Recipes for using WWW::Mechanize

VERSION

version 2.18

INTRODUCTION

First, please note that many of these are possible just using LWP::UserAgent. Since WWW::Mechanize is a subclass of LWP::UserAgent, whatever works on LWP::UserAgent should work on WWW::Mechanize. See the lwpcook man page included with LWP.

BASICS

Launch the WWW::Mechanize browser

use WWW::Mechanize; my $mech = WWW::Mechanize->new( autocheck => 1 );

The autocheck => 1 tells Mechanize to die if any IO fails, so you don’t have to manually check. It’s easier that way. If you want to do your own error checking, leave it out.

Fetch a page

$mech->get( “http://search.cpan.org” ); print $mech->content;

$mech->content contains the raw HTML from the web page. It is not parsed or handled in any way, at least through the content method.

Fetch a page into a file

Sometimes you want to dump your results directly into a file. For example, there’s no reason to read a JPEG into memory if you’re only going to write it out immediately. This can also help with memory issues on large files.

$mech->get( “http://www.cpan.org/src/stable.tar.gz", “:content_file” => “stable.tar.gz” );

Fetch a password-protected page

Generally, just call credentials before fetching the page.

$mech->credentials( admin => password ); $mech->get( http://10.11.12.13/password.html ); print $mech->content();

LINKS

Find all links that point to a JPEG, GIF or PNG.

my @links = $mech->find_all_links( tag => “a”, url_regex => qr/(jpe?g|gif|png)$/i );

Find all links that have the word “download” in them.

my @links = $mech->find_all_links( tag => “a”, text_regex => qr/download/i );

ADVANCED

See what will be sent without actually sending anything

$mech->add_handler(“request_send”, sub { shift->dump; exit; }); $mech->get(“http://www.example.com”);

SEE ALSO

WWW::Mechanize

AUTHOR

Andy Lester <andy at petdance.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2004 by Andy Lester.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

102 - Linux cli command getchar

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getchar and provides detailed information about the command getchar, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getchar.

NAME 🖥️ getchar 🖥️

input of characters and strings

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int fgetc(FILE *stream);
int getc(FILE *stream);
int getchar(void);
char *fgets(char s[restrict .size], int size, FILE *restrict stream);
int ungetc(int c, FILE *stream);

DESCRIPTION

fgetc() reads the next character from stream and returns it as an unsigned char cast to an int, or EOF on end of file or error.

getc() is equivalent to fgetc() except that it may be implemented as a macro which evaluates stream more than once.

getchar() is equivalent to getc(stdin).

fgets() reads in at most one less than size characters from stream and stores them into the buffer pointed to by s. Reading stops after an EOF or a newline. If a newline is read, it is stored into the buffer. A terminating null byte (‘�’) is stored after the last character in the buffer.

ungetc() pushes c back to stream, cast to unsigned char, where it is available for subsequent read operations. Pushed-back characters will be returned in reverse order; only one pushback is guaranteed.

Calls to the functions described here can be mixed with each other and with calls to other input functions from the stdio library for the same input stream.

For nonlocking counterparts, see unlocked_stdio(3).

RETURN VALUE

fgetc(), getc(), and getchar() return the character read as an unsigned char cast to an int or EOF on end of file or error.

fgets() returns s on success, and NULL on error or when end of file occurs while no characters have been read.

ungetc() returns c on success, or EOF on error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fgetc(), fgets(), getc(), getchar(), ungetc()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89.

NOTES

It is not advisable to mix calls to input functions from the stdio library with low-level calls to read(2) for the file descriptor associated with the input stream; the results will be undefined and very probably not what you want.

SEE ALSO

read(2), write(2), ferror(3), fgetwc(3), fgetws(3), fopen(3), fread(3), fseek(3), getline(3), gets(3), getwchar(3), puts(3), scanf(3), ungetwc(3), unlocked_stdio(3), feature_test_macros(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

103 - Linux cli command HTML_Tree_AboutObjectspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_Tree_AboutObjectspm and provides detailed information about the command HTML_Tree_AboutObjectspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_Tree_AboutObjectspm.

NAME 🖥️ HTML_Tree_AboutObjectspm 🖥️

  • article: “User’s View of Object-Oriented Modules”

SYNOPSIS

# This an article, not a module.

DESCRIPTION

The following article by Sean M. Burke first appeared in The Perl Journal #17 and is copyright 2000 The Perl Journal. It appears courtesy of Jon Orwant and The Perl Journal. This document may be distributed under the same terms as Perl itself.

A User’s View of Object-Oriented Modules

– Sean M. Burke

The first time that most Perl programmers run into object-oriented programming when they need to use a module whose interface is object-oriented. This is often a mystifying experience, since talk of methods and constructors is unintelligible to programmers who thought that functions and variables was all there was to worry about.

Articles and books that explain object-oriented programming (OOP), do so in terms of how to program that way. That’s understandable, and if you learn to write object-oriented code of your own, you’d find it easy to use object-oriented code that others write. But this approach is the long way around for people whose immediate goal is just to use existing object-oriented modules, but who don’t yet want to know all the gory details of having to write such modules for themselves.

This article is for those programmers Ω- programmers who want to know about objects from the perspective of using object-oriented modules.

Modules and Their Functional Interfaces

Modules are the main way that Perl provides for bundling up code for later use by yourself or others. As I’m sure you can’t help noticing from reading The Perl Journal, CPAN (the Comprehensive Perl Archive Network) is the repository for modules (or groups of modules) that others have written, to do anything from composing music to accessing Web pages. A good deal of those modules even come with every installation of Perl.

One module that you may have used before, and which is fairly typical in its interface, is Text::Wrap. It comes with Perl, so you don’t even need to install it from CPAN. You use it in a program of yours, by having your program code say early on:

use Text::Wrap;

and after that, you can access a function called wrap, which inserts line-breaks in text that you feed it, so that the text will be wrapped to seventy-two (or however many) columns.

The way this use Text::Wrap business works is that the module Text::Wrap exists as a file Text/Wrap.pm somewhere in one of your library directories. That file contains Perl code…

Footnote: And mixed in with the Perl code, there’s documentation, which is what you read with perldoc Text::Wrap. The perldoc program simply ignores the code and formats the documentation text, whereas use Text::Wrap loads and runs the code while ignoring the documentation.

…which, among other things, defines a function called Text::Wrap::wrap, and then exports that function, which means that when you say wrap after having said use Text::Wrap, you’ll be actually calling the Text::Wrap::wrap function. Some modules don’t export their functions, so you have to call them by their full name, like Text::Wrap::wrap(...parameters...).

Regardless of whether the typical module exports the functions it provides, a module is basically just a container for chunks of code that do useful things. The way the module allows for you to interact with it, is its interface. And when, like with Text::Wrap, its interface consists of functions, the module is said to have a functional interface.

Footnote: the term function (and therefore “functional”) has various senses. I’m using the term here in its broadest sense, to refer to routines Ω- bits of code that are called by some name and which take parameters and return some value.

Using modules with functional interfaces is straightforward Ω- instead of defining your own wrap function with sub wrap { ... }, you entrust use Text::Wrap to do that for you, along with whatever other functions its defines and exports, according to the module’s documentation. Without too much bother, you can even write your own modules to contain your frequently used functions; I suggest having a look at the perlmod man page for more leads on doing this.

Modules with Object-Oriented Interfaces

So suppose that one day you want to write a program that will automate the process of ftping a bunch of files from one server down to your local machine, and then off to another server.

A quick browse through search.cpan.org turns up the module Net::FTP, which you can download and install it using normal installation instructions (unless your sysadmin has already installed it, as many have).

Like Text::Wrap or any other module with a familiarly functional interface, you start off using Net::FTP in your program by saying:

use Net::FTP;

However, that’s where the similarity ends. The first hint of difference is that the documentation for Net::FTP refers to it as a class. A class is a kind of module, but one that has an object-oriented interface.

Whereas modules like Text::Wrap provide bits of useful code as functions, to be called like function(...parameters...) or like PackageName::function(...parameters...), Net::FTP and other modules with object-oriented interfaces provide methods. Methods are sort of like functions in that they have a name and parameters; but methods look different, and are different, because you have to call them with a syntax that has a class name or an object as a special argument. I’ll explain the syntax for method calls, and then later explain what they all mean.

Some methods are meant to be called as class methods, with the class name (same as the module name) as a special argument. Class methods look like this:

ClassName->methodname(parameter1, parameter2, …) ClassName->methodname() # if no parameters ClassName->methodname # same as above

which you will sometimes see written:

methodname ClassName (parameter1, parameter2, …) methodname ClassName # if no parameters

Basically all class methods are for making new objects, and methods that make objects are called “constructors (and the process of making them is called constructing or instantiating). Constructor methods typically have the name new, or something including new (new_from_file, etc.); but they can conceivably be named anything Ω- DBI’s constructor method is named connect”, for example.

The object that a constructor method returns is typically captured in a scalar variable:

$object = ClassName->new(param1, param2…);

Once you have an object (more later on exactly what that is), you can use the other kind of method call syntax, the syntax for object method calls. Calling object methods is just like class methods, except that instead of the ClassName as the special argument, you use an expression that yields an object. Usually this is just a scalar variable that you earlier captured the output of the constructor in. Object method calls look like this:

$object->methodname(parameter1, parameter2, …); $object->methodname() # if no parameters $object->methodname # same as above

which is occasionally written as:

methodname $object (parameter1, parameter2, …) methodname $object # if no parameters

Examples of method calls are:

my $session1 = Net::FTP->new(“ftp.myhost.com”); # Calls a class method “new”, from class Net::FTP, # with the single parameter “ftp.myhost.com”, # and saves the return value (which is, as usual, # an object), in $session1. # Could also be written: # new Net::FTP(ftp.myhost.com) $session1->login(“sburke”,“aoeuaoeu”) || die “failed to login! “; # calling the object method “login” print “Dir: “, $session1->dir(), " “; $session1->quit; # same as $session1->quit() print “Done “; exit;

Incidentally, I suggest always using the syntaxes with parentheses and -> in them,

Footnote: the character-pair -> is supposed to look like an arrow, not negative greater-than!

and avoiding the syntaxes that start out methodname $object or methodname ModuleName. When everything’s going right, they all mean the same thing as the -> variants, but the syntax with -> is more visually distinct from function calls, as well as being immune to some kinds of rare but puzzling ambiguities that can arise when you’re trying to call methods that have the same name as subroutines you’ve defined.

But, syntactic alternatives aside, all this talk of constructing objects and object methods begs the question Ω- what is an object? There are several angles to this question that the rest of this article will answer in turn: what can you do with objects? what’s in an object? what’s an object value? and why do some modules use objects at all?

What Can You Do with Objects?

You’ve seen that you can make objects, and call object methods with them. But what are object methods for? The answer depends on the class:

A Net::FTP object represents a session between your computer and an FTP server. So the methods you call on a Net::FTP object are for doing whatever you’d need to do across an FTP connection. You make the session and log in:

my $session = Net::FTP->new(ftp.aol.com); die “Couldnt connect!” unless defined $session; # The class method call to “new” will return # the new object if it goes OK, otherwise it # will return undef. $session->login(sburke, p@ssw3rD) || die “Did I change my password again?”; # The object method “login” will give a true # return value if actually logs in, otherwise # itll return false.

You can use the session object to change directory on that session:

$session->cwd("/home/sburke/public_html”) || die “Hey, that was REALLY supposed to work!”; # if the cwd fails, itll return false

…get files from the machine at the other end of the session…

foreach my $f (log_report_ua.txt, log_report_dom.txt, log_report_browsers.txt) { $session->get($f) || warn “Getting $f failed!” };

…and plenty else, ending finally with closing the connection:

$session->quit();

In short, object methods are for doing things related to (or with) whatever the object represents. For FTP sessions, it’s about sending commands to the server at the other end of the connection, and that’s about it Ω- there, methods are for doing something to the world outside the object, and the objects is just something that specifies what bit of the world (well, what FTP session) to act upon.

With most other classes, however, the object itself stores some kind of information, and it typically makes no sense to do things with such an object without considering the data that’s in the object.

What’s in an Object?

An object is (with rare exceptions) a data structure containing a bunch of attributes, each of which has a value, as well as a name that you use when you read or set the attribute’s value. Some of the object’s attributes are private, meaning you’ll never see them documented because they’re not for you to read or write; but most of the object’s documented attributes are at least readable, and usually writeable, by you. Net::FTP objects are a bit thin on attributes, so we’ll use objects from the class Business::US_Amort for this example. Business::US_Amort is a very simple class (available from CPAN) that I wrote for making calculations to do with loans (specifically, amortization, using US-style algorithms).

An object of the class Business::US_Amort represents a loan with particular parameters, i.e., attributes. The most basic attributes of a loan object are its interest rate, its principal (how much money it’s for), and it’s term (how long it’ll take to repay). You need to set these attributes before anything else can be done with the object. The way to get at those attributes for loan objects is just like the way to get at attributes for any class’s objects: through accessors. An accessor is simply any method that accesses (whether reading or writing, AKA getting or putting) some attribute in the given object. Moreover, accessors are the only way that you can change an object’s attributes. (If a module’s documentation wants you to know about any other way, it’ll tell you.)

Usually, for simplicity’s sake, an accessor is named after the attribute it reads or writes. With Business::US_Amort objects, the accessors you need to use first are principal, interest_rate, and term. Then, with at least those attributes set, you can call the run method to figure out several things about the loan. Then you can call various accessors, like total_paid_toward_interest, to read the results:

use Business::US_Amort; my $loan = Business::US_Amort->new; # Set the necessary attributes: $loan->principal(123654); $loan->interest_rate(9.25); $loan->term(20); # twenty years # NOW we know enough to calculate: $loan->run; # And see what came of that: print “Total paid toward interest: A WHOPPING “, $loan->total_paid_interest, “!! “;

This illustrates a convention that’s common with accessors: calling the accessor with no arguments (as with $loan->total_paid_interest) usually means to read the value of that attribute, but providing a value (as with $loan->term(20)) means you want that attribute to be set to that value. This stands to reason: why would you be providing a value, if not to set the attribute to that value?

Although a loan’s term, principal, and interest rates are all single numeric values, an objects values can any kind of scalar, or an array, or even a hash. Moreover, an attribute’s value(s) can be objects themselves. For example, consider MIDI files (as I wrote about in TPJ#13): a MIDI file usually consists of several tracks. A MIDI file is complex enough to merit being an object with attributes like its overall tempo, the file-format variant it’s in, and the list of instrument tracks in the file. But tracks themselves are complex enough to be objects too, with attributes like their track-type, a list of MIDI commands if they’re a MIDI track, or raw data if they’re not. So I ended up writing the MIDI modules so that the tracks attribute of a MIDI::Opus object is an array of objects from the class MIDI::Track. This may seem like a runaround Ω- you ask what’s in one object, and get another object, or several! But in this case, it exactly reflects what the module is for Ω- MIDI files contain MIDI tracks, which then contain data.

What is an Object Value?

When you call a constructor like Net::FTP->new(hostname), you get back an object value, a value you can later use, in combination with a method name, to call object methods.

Now, so far we’ve been pretending, in the above examples, that the variables $session or $loan are the objects you’re dealing with. This idea is innocuous up to a point, but it’s really a misconception that will, at best, limit you in what you know how to do. The reality is not that the variables $session or $query are objects; it’s a little more indirect Ω- they hold values that symbolize objects. The kind of value that $session or $query hold is what I’m calling an object value.

To understand what kind of value this is, first think about the other kinds of scalar values you know about: The first two scalar values you probably ever ran into in Perl are numbers and strings, which you learned (or just assumed) will usually turn into each other on demand; that is, the three-character string 2.5 can become the quantity two and a half, and vice versa. Then, especially if you started using perl -w early on, you learned about the undefined value, which can turn into 0 if you treat it as a number, or the empty-string if you treat it as a string.

Footnote: You may also have been learning about references, in which case you’re ready to hear that object values are just a kind of reference, except that they reflect the class that created thing they point to, instead of merely being a plain old array reference, hash reference, etc. If this makes makes sense to you, and you want to know more about how objects are implemented in Perl, have a look at the perltoot man page.

And now you’re learning about object values. An object value is a value that points to a data structure somewhere in memory, which is where all the attributes for this object are stored. That data structure as a whole belongs to a class (probably the one you named in the constructor method, like ClassName->new), so that the object value can be used as part of object method calls.

If you want to actually see what an object value is, you might try just saying print $object. That’ll get you something like this:

Net::FTP=GLOB(0x20154240)

or

Business::US_Amort=HASH(0x15424020)

That’s not very helpful if you wanted to really get at the object’s insides, but that’s because the object value is only a symbol for the object. This may all sound very abstruse and metaphysical, so a real-world allegory might be very helpful:

You get an advertisement in the mail saying that you have been (im)personally selected to have the rare privilege of applying for a credit card. For whatever reason, this offer sounds good to you, so you fill out the form and mail it back to the credit card company. They gleefully approve the application and create your account, and send you a card with a number on it. Now, you can do things with the number on that card Ω- clerks at stores can ring up things you want to buy, and charge your account by keying in the number on the card. You can pay for things you order online by punching in the card number as part of your online order. You can pay off part of the account by sending the credit card people some of your money (well, a check) with some note (usually the pre-printed slip) that has the card number for the account you want to pay toward. And you should be able to call the credit card company’s computer and ask it things about the card, like its balance, its credit limit, its APR, and maybe an itemization of recent purchases ad payments. Now, what you’re really doing is manipulating a credit card account, a completely abstract entity with some data attached to it (balance, APR, etc). But for ease of access, you have a credit card number that is a symbol for that account. Now, that symbol is just a bunch of digits, and the number is effectively meaningless and useless in and of itself Ω- but in the appropriate context, it’s understood to mean the credit card account you’re accessing.

This is exactly the relationship between objects and object values, and from this analogy, several facts about object values are a bit more explicable:

* An object value does nothing in and of itself, but it’s useful when you use it in the context of an $object->method call, the same way that a card number is useful in the context of some operation dealing with a card account.

Moreover, several copies of the same object value all refer to the same object, the same way that making several copies of your card number won’t change the fact that they all still refer to the same single account (this is true whether you’re copying the number by just writing it down on different slips of paper, or whether you go to the trouble of forging exact replicas of your own plastic credit card). That’s why this:

$x = Net::FTP->new(“ftp.aol.com”); $x->login(“sburke”, “aoeuaoeu”);

does the same thing as this:

$x = Net::FTP->new(“ftp.aol.com”); $y = $x; $z = $y; $z->login(“sburke”, “aoeuaoeu”);

That is, $z and $y and $x are three different slots for values, but what’s in those slots are all object values pointing to the same object Ω- you don’t have three different FTP connections, just three variables with values pointing to the some single FTP connection.

* You can’t tell much of anything about the object just by looking at the object value, any more than you can see your credit account balance by holding the plastic card up to the light, or by adding up the digits in your credit card number.

* You can’t just make up your own object values and have them work Ω- they can come only from constructor methods of the appropriate class. Similarly, you get a credit card number only by having a bank approve your application for a credit card account Ω- at which point they let you know what the number of your new card is.

Now, there’s even more to the fact that you can’t just make up your own object value: even though you can print an object value and get a string like Net::FTP=GLOB(0x20154240), that string is just a representation of an object value.

Internally, an object value has a basically different type from a string, or a number, or the undefined value Ω- if $x holds a real string, then that value’s slot in memory says “this is a value of type string, and its characters are…, whereas if it’s an object value, the value’s slot in memory says, this is a value of type reference, and the location in memory that it points to is…” (and by looking at what’s at that location, Perl can tell the class of what’s there).

Perl programmers typically don’t have to think about all these details of Perl’s internals. Many other languages force you to be more conscious of the differences between all of these (and also between types of numbers, which are stored differently depending on their size and whether they have fractional parts). But Perl does its best to hide the different types of scalars from you Ω- it turns numbers into strings and back as needed, and takes the string or number representation of undef or of object values as needed. However, you can’t go from a string representation of an object value, back to an object value. And that’s why this doesn’t work:

$x = Net::FTP->new(ftp.aol.com); $y = Net::FTP->new(ftp.netcom.com); $z = Net::FTP->new(ftp.qualcomm.com); $all = join( , $x,$y,$z); # !!! …later… ($aol, $netcom, $qualcomm) = split( , $all); # !!! $aol->login(“sburke”, “aoeuaoeu”); $netcom->login(“sburke”, “qjkxqjkx”); $qualcomm->login(“smb”, “dhtndhtn”);

This fails because $aol ends up holding merely the string representation of the object value from $x, not the object value itself Ω- when join tried to join the characters of the strings $x, $y, and $z, Perl saw that they weren’t strings at all, so it gave join their string representations.

Unfortunately, this distinction between object values and their string representations doesn’t really fit into the analogy of credit card numbers, because credit card numbers really are numbers Ω- even thought they don’t express any meaningful quantity, if you stored them in a database as a quantity (as opposed to just an ASCII string), that wouldn’t stop them from being valid as credit card numbers.

This may seem rather academic, but there’s there’s two common mistakes programmers new to objects often make, which make sense only in terms of the distinction between object values and their string representations:

The first common error involves forgetting (or never having known in the first place) that when you go to use a value as a hash key, Perl uses the string representation of that value. When you want to use the numeric value two and a half as a key, Perl turns it into the three-character string 2.5. But if you then want to use that string as a number, Perl will treat it as meaning two and a half, so you’re usually none the wiser that Perl converted the number to a string and back. But recall that Perl can’t turn strings back into objects Ω- so if you tried to use a Net::FTP object value as a hash key, Perl actually used its string representation, like Net::FTP=GLOB(0x20154240), but that string is unusable as an object value. (Incidentally, there’s a module Tie::RefHash that implements hashes that do let you use real object-values as keys.)

The second common error with object values is in trying to save an object value to disk (whether printing it to a file, or storing it in a conventional database file). All you’ll get is the string, which will be useless.

When you want to save an object and restore it later, you may find that the object’s class already provides a method specifically for this. For example, MIDI::Opus provides methods for writing an object to disk as a standard MIDI file. The file can later be read back into memory by a MIDI::Opus constructor method, which will return a new MIDI::Opus object representing whatever file you tell it to read into memory. Similar methods are available with, for example, classes that manipulate graphic images and can save them to files, which can be read back later.

But some classes, like Business::US_Amort, provide no such methods for storing an object in a file. When this is the case, you can try using any of the Data::Dumper, Storable, or FreezeThaw modules. Using these will be unproblematic for objects of most classes, but it may run into limitations with others. For example, a Business::US_Amort object can be turned into a string with Data::Dumper, and that string written to a file. When it’s restored later, its attributes will be accessible as normal. But in the unlikely case that the loan object was saved in mid-calculation, the calculation may not be resumable. This is because of the way that that particular class does its calculations, but similar limitations may occur with objects from other classes.

But often, even wanting to save an object is basically wrong Ω- what would saving an ftp session even mean? Saving the hostname, username, and password? current directory on both machines? the local TCP/IP port number? In the case of saving a Net::FTP object, you’re better off just saving whatever details you actually need for your own purposes, so that you can make a new object later and just set those values for it.

So Why Do Some Modules Use Objects?

All these details of using objects are definitely enough to make you wonder Ω- is it worth the bother? If you’re a module author, writing your module with an object-oriented interface restricts the audience of potential users to those who understand the basic concepts of objects and object values, as well as Perl’s syntax for calling methods. Why complicate things by having an object-oriented interface?

A somewhat esoteric answer is that a module has an object-oriented interface because the module’s insides are written in an object-oriented style. This article is about the basics of object-oriented interfaces, and it’d be going far afield to explain what object-oriented design is. But the short story is that object-oriented design is just one way of attacking messy problems. It’s a way that many programmers find very helpful (and which others happen to find to be far more of a hassle than it’s worth, incidentally), and it just happens to show up for you, the module user, as merely the style of interface.

But a simpler answer is that a functional interface is sometimes a hindrance, because it limits the number of things you can do at once Ω- limiting it, in fact, to one. For many problems that some modules are meant to solve, doing without an object-oriented interface would be like wishing that Perl didn’t use filehandles. The ideas are rather simpler Ω- just imagine that Perl let you access files, but only one at a time, with code like:

open(“foo.txt”) || die “Cant open foo.txt: $!”; while(readline) { print $_ if /bar/; } close;

That hypothetical kind of Perl would be simpler, by doing without filehandles. But you’d be out of luck if you wanted to read from one file while reading from another, or read from two and print to a third.

In the same way, a functional FTP module would be fine for just uploading files to one server at a time, but it wouldn’t allow you to easily write programs that make need to use several simultaneous sessions (like look at server A and server B, and if A has a file called X.dat, then download it locally and then upload it to server B Ω- except if B has a file called Y.dat, in which case do it the other way around).

Some kinds of problems that modules solve just lend themselves to an object-oriented interface. For those kinds of tasks, a functional interface would be more familiar, but less powerful. Learning to use object-oriented modules’ interfaces does require becoming comfortable with the concepts from this article. But in the end it will allow you to use a broader range of modules and, with them, to write programs that can do more.

[end body of article]

[Author Credit]

Sean M. Burke has contributed several modules to CPAN, about half of them object-oriented.

[The next section should be in a greybox:]

The Gory Details

For sake of clarity of explanation, I had to oversimplify some of the facts about objects. Here’s a few of the gorier details:

* Every example I gave of a constructor was a class method. But object methods can be constructors, too, if the class was written to work that way: $new = $old->copy, $node_y = $node_x->new_subnode, or the like.

* I’ve given the impression that there’s two kinds of methods: object methods and class methods. In fact, the same method can be both, because it’s not the kind of method it is, but the kind of calls it’s written to accept Ω- calls that pass an object, or calls that pass a class-name.

* The term object value isn’t something you’ll find used much anywhere else. It’s just my shorthand for what would properly be called an object reference or reference to a blessed item. In fact, people usually say object when they properly mean a reference to that object.

* I mentioned creating objects with constructors, but I didn’t mention destroying them with destructor Ω- a destructor is a kind of method that you call to tidy up the object once you’re done with it, and want it to neatly go away (close connections, delete temporary files, free up memory, etc). But because of the way Perl handles memory, most modules won’t require the user to know about destructors.

* I said that class method syntax has to have the class name, as in $session = Net::FTP->new($host). Actually, you can instead use any expression that returns a class name: $ftp_class = ‘Net::FTP’; $session = $ftp_class->new($host). Moreover, instead of the method name for object- or class-method calls, you can use a scalar holding the method name: $foo->$method($host). But, in practice, these syntaxes are rarely useful.

And finally, to learn about objects from the perspective of writing your own classes, see the perltoot documentation, or Damian Conway’s exhaustive and clear book Object Oriented Perl (Manning Publications 1999, ISBN 1-884777-79-1).

BACK

Return to the HTML::Tree docs.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

104 - Linux cli command Spreadsheet_ParseExcel_Workbookpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_ParseExcel_Workbookpm and provides detailed information about the command Spreadsheet_ParseExcel_Workbookpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_ParseExcel_Workbookpm.

get_active_sheet()

Return the number of the active (open) worksheet (at the time the workbook was saved. May return undef.

NAME 🖥️ Spreadsheet_ParseExcel_Workbookpm 🖥️

A class for Workbooks.

SYNOPSIS

See the documentation for Spreadsheet::ParseExcel.

DESCRIPTION

This module is used in conjunction with Spreadsheet::ParseExcel. See the documentation for Spreadsheet::ParseExcel.

Methods

The following Workbook methods are available:

$workbook->worksheets() $workbook->worksheet() $workbook->worksheet_count() $workbook->get_filename() $workbook->get_print_areas() $workbook->get_print_titles() $workbook->using_1904_date()

worksheets()

The worksheets() method returns an array of Worksheet objects. This was most commonly used to iterate over the worksheets in a workbook:

for my $worksheet ( $workbook->worksheets() ) { … }

worksheet()

The worksheet() method returns a single Worksheet object using either its name or index:

$worksheet = $workbook->worksheet(Sheet1); $worksheet = $workbook->worksheet(0);

Returns undef if the sheet name or index doesn’t exist.

worksheet_count()

The worksheet_count() method returns the number of Woksheet objects in the Workbook.

my $worksheet_count = $workbook->worksheet_count();

get_filename()

The get_filename() method returns the name of the Excel file of undef if the data was read from a filehandle rather than a file.

my $filename = $workbook->get_filename();

get_print_areas()

The get_print_areas() method returns an array ref of print areas.

my $print_areas = $workbook->get_print_areas();

Each print area is as follows:

[ $start_row, $start_col, $end_row, $end_col ]

Returns undef if there are no print areas.

get_print_titles()

The get_print_titles() method returns an array ref of print title hash refs.

my $print_titles = $workbook->get_print_titles();

Each print title array ref is as follows:

{ Row => [ $start_row, $end_row ], Column => [ $start_col, $end_col ], }

Returns undef if there are no print titles.

using_1904_date()

The using_1904_date() method returns true if the Excel file is using the 1904 date epoch instead of the 1900 epoch.

my $using_1904_date = $workbook->using_1904_date(); The Windows version of Excel generally uses the 1900 epoch while the Mac version of Excel generally uses the 1904 epoch.

Returns 0 if the 1900 epoch is in use.

AUTHOR

Current maintainer 0.60+: Douglas Wilson [email protected]

Maintainer 0.40-0.59: John McNamara [email protected]

Maintainer 0.27-0.33: Gabor Szabo [email protected]

Original author: Kawai Takanori [email protected]

COPYRIGHT

Copyright (c) 2014 Douglas Wilson

Copyright (c) 2009-2013 John McNamara

Copyright (c) 2006-2008 Gabor Szabo

Copyright (c) 2000-2006 Kawai Takanori

All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

105 - Linux cli command XtVaGetSubresources

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtVaGetSubresources and provides detailed information about the command XtVaGetSubresources, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtVaGetSubresources.

NAME 🖥️ XtVaGetSubresources 🖥️

obtain subresources

SYNTAX

#include <X11/Intrinsic.h>

void XtGetSubresources(Widget w, XtPointer base, const char *name, const char * class, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);

void XtVaGetSubresources(Widget w, XtPointer base, const char *name, const char *class, XtResourceList resources, Cardinal num_resources, …);

ARGUMENTS

args
Specifies the argument list to override resources obtained from the resource database.

base
Specifies the base address of the subpart data structure where the resources should be written.

class
Specifies the class of the subpart.

name
Specifies the name of the subpart.

num_args
Specifies the number of arguments in the argument list.

num_resources
Specifies the number of resources in the resource list.

resources
Specifies the resource list for the subpart.

  1. Specifies the widget that wants resources for a subpart or that identifies the resource database to search.


Specifies the variable arguments to override resources obtained from the resource database.

DESCRIPTION

The XtGetSubresources function constructs a name/class list from the application name/class, the name/classes of all its ancestors, and the widget itself. Then, it appends to this list the name/class pair passed in. The resources are fetched from the argument list, the resource database, or the default values in the resource list. Then, they are copied into the subpart record. If args is NULL, num_args must be zero. However, if num_args is zero, the argument list is not referenced.

SEE ALSO

XtGetApplicationResources, XtVaGetApplicationResources
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

106 - Linux cli command zip_fopen_index_encrypted

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_fopen_index_encrypted and provides detailed information about the command zip_fopen_index_encrypted, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_fopen_index_encrypted.

libzip (-lzip)

The

function opens the encrypted file name

in

using the password given in the

argument. The

argument are the same as for

The

function opens the file at position

see

These functions are called automatically by

you only need to call them if you want to specify a non-default password (see

Upon successful completion, a

pointer is returned. Otherwise,

is returned and the error code in

is set to indicate the error.

No password was provided.

The function

may also fail and set

for any of the errors specified for the routine

The function

may also fail and set

for any of the errors specified for the routine

and

were added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

107 - Linux cli command Image_ExifTool_TagLookuppm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_TagLookuppm and provides detailed information about the command Image_ExifTool_TagLookuppm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_TagLookuppm.

NAME 🖥️ Image_ExifTool_TagLookuppm 🖥️

Fast lookup for ExifTool tags

SYNOPSIS

This module is required by Image::ExifTool for writing tags.

DESCRIPTION

Provides a fast, case insensitive lookup for tag names.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Image::ExifTool (3pm), Image::ExifTool::BuildTagLookup (3pm), Image::ExifTool::TagNames (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

108 - Linux cli command mmap64

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mmap64 and provides detailed information about the command mmap64, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mmap64.

NAME 🖥️ mmap64 🖥️

map or unmap files or devices into memory

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/mman.h>
void *mmap(void addr[.length], size_t length",int prot ,int"flags,
 int fd, off_t offset);
int munmap(void addr[.length], size_t length);

See NOTES for information on feature test macro requirements.

DESCRIPTION

mmap() creates a new mapping in the virtual address space of the calling process. The starting address for the new mapping is specified in addr. The length argument specifies the length of the mapping (which must be greater than 0).

If addr is NULL, then the kernel chooses the (page-aligned) address at which to create the mapping; this is the most portable method of creating a new mapping. If addr is not NULL, then the kernel takes it as a hint about where to place the mapping; on Linux, the kernel will pick a nearby page boundary (but always above or equal to the value specified by /proc/sys/vm/mmap_min_addr) and attempt to create the mapping there. If another mapping already exists there, the kernel picks a new address that may or may not depend on the hint. The address of the new mapping is returned as the result of the call.

The contents of a file mapping (as opposed to an anonymous mapping; see MAP_ANONYMOUS below), are initialized using length bytes starting at offset offset in the file (or other object) referred to by the file descriptor fd. offset must be a multiple of the page size as returned by sysconf(_SC_PAGE_SIZE).

After the mmap() call has returned, the file descriptor, fd, can be closed immediately without invalidating the mapping.

The prot argument describes the desired memory protection of the mapping (and must not conflict with the open mode of the file). It is either PROT_NONE or the bitwise OR of one or more of the following flags:

PROT_EXEC
Pages may be executed.

PROT_READ
Pages may be read.

PROT_WRITE
Pages may be written.

PROT_NONE
Pages may not be accessed.

The flags argument

The flags argument determines whether updates to the mapping are visible to other processes mapping the same region, and whether updates are carried through to the underlying file. This behavior is determined by including exactly one of the following values in flags:

MAP_SHARED
Share this mapping. Updates to the mapping are visible to other processes mapping the same region, and (in the case of file-backed mappings) are carried through to the underlying file. (To precisely control when updates are carried through to the underlying file requires the use of msync(2).)

MAP_SHARED_VALIDATE (since Linux 4.15)
This flag provides the same behavior as MAP_SHARED except that MAP_SHARED mappings ignore unknown flags in flags. By contrast, when creating a mapping using MAP_SHARED_VALIDATE, the kernel verifies all passed flags are known and fails the mapping with the error EOPNOTSUPP for unknown flags. This mapping type is also required to be able to use some mapping flags (e.g., MAP_SYNC).

MAP_PRIVATE
Create a private copy-on-write mapping. Updates to the mapping are not visible to other processes mapping the same file, and are not carried through to the underlying file. It is unspecified whether changes made to the file after the mmap() call are visible in the mapped region.

Both MAP_SHARED and MAP_PRIVATE are described in POSIX.1-2001 and POSIX.1-2008. MAP_SHARED_VALIDATE is a Linux extension.

In addition, zero or more of the following values can be ORed in flags:

MAP_32BIT (since Linux 2.4.20, 2.6)
Put the mapping into the first 2 Gigabytes of the process address space. This flag is supported only on x86-64, for 64-bit programs. It was added to allow thread stacks to be allocated somewhere in the first 2 GB of memory, so as to improve context-switch performance on some early 64-bit processors. Modern x86-64 processors no longer have this performance problem, so use of this flag is not required on those systems. The MAP_32BIT flag is ignored when MAP_FIXED is set.

MAP_ANON
Synonym for MAP_ANONYMOUS; provided for compatibility with other implementations.

MAP_ANONYMOUS
The mapping is not backed by any file; its contents are initialized to zero. The fd argument is ignored; however, some implementations require fd to be -1 if MAP_ANONYMOUS (or MAP_ANON) is specified, and portable applications should ensure this. The offset argument should be zero. Support for MAP_ANONYMOUS in conjunction with MAP_SHARED was added in Linux 2.4.

MAP_DENYWRITE
This flag is ignored. (Long ago—Linux 2.0 and earlier—it signaled that attempts to write to the underlying file should fail with ETXTBSY. But this was a source of denial-of-service attacks.)

MAP_EXECUTABLE
This flag is ignored.

MAP_FILE
Compatibility flag. Ignored.

MAP_FIXED
Don’t interpret addr as a hint: place the mapping at exactly that address. addr must be suitably aligned: for most architectures a multiple of the page size is sufficient; however, some architectures may impose additional restrictions. If the memory region specified by addr and length overlaps pages of any existing mapping(s), then the overlapped part of the existing mapping(s) will be discarded. If the specified address cannot be used, mmap() will fail.

Software that aspires to be portable should use the MAP_FIXED flag with care, keeping in mind that the exact layout of a process’s memory mappings is allowed to change significantly between Linux versions, C library versions, and operating system releases. Carefully read the discussion of this flag in NOTES!

MAP_FIXED_NOREPLACE (since Linux 4.17)
This flag provides behavior that is similar to MAP_FIXED with respect to the addr enforcement, but differs in that MAP_FIXED_NOREPLACE never clobbers a preexisting mapped range. If the requested range would collide with an existing mapping, then this call fails with the error EEXIST. This flag can therefore be used as a way to atomically (with respect to other threads) attempt to map an address range: one thread will succeed; all others will report failure.

Note that older kernels which do not recognize the MAP_FIXED_NOREPLACE flag will typically (upon detecting a collision with a preexisting mapping) fall back to a “non-MAP_FIXED” type of behavior: they will return an address that is different from the requested address. Therefore, backward-compatible software should check the returned address against the requested address.

MAP_GROWSDOWN
This flag is used for stacks. It indicates to the kernel virtual memory system that the mapping should extend downward in memory. The return address is one page lower than the memory area that is actually created in the process’s virtual address space. Touching an address in the “guard” page below the mapping will cause the mapping to grow by a page. This growth can be repeated until the mapping grows to within a page of the high end of the next lower mapping, at which point touching the “guard” page will result in a SIGSEGV signal.

MAP_HUGETLB (since Linux 2.6.32)
Allocate the mapping using “huge” pages. See the Linux kernel source file Documentation/admin-guide/mm/hugetlbpage.rst for further information, as well as NOTES, below.

MAP_HUGE_2MB
MAP_HUGE_1GB (since Linux 3.8)
Used in conjunction with MAP_HUGETLB to select alternative hugetlb page sizes (respectively, 2 MB and 1 GB) on systems that support multiple hugetlb page sizes.

More generally, the desired huge page size can be configured by encoding the base-2 logarithm of the desired page size in the six bits at the offset MAP_HUGE_SHIFT. (A value of zero in this bit field provides the default huge page size; the default huge page size can be discovered via the Hugepagesize field exposed by /proc/meminfo.) Thus, the above two constants are defined as:

#define MAP_HUGE_2MB    (21 << MAP_HUGE_SHIFT)
#define MAP_HUGE_1GB    (30 << MAP_HUGE_SHIFT)

The range of huge page sizes that are supported by the system can be discovered by listing the subdirectories in /sys/kernel/mm/hugepages.

MAP_LOCKED (since Linux 2.5.37)
Mark the mapped region to be locked in the same way as mlock(2). This implementation will try to populate (prefault) the whole range but the mmap() call doesn’t fail with ENOMEM if this fails. Therefore major faults might happen later on. So the semantic is not as strong as mlock(2). One should use mmap() plus mlock(2) when major faults are not acceptable after the initialization of the mapping. The MAP_LOCKED flag is ignored in older kernels.

MAP_NONBLOCK (since Linux 2.5.46)
This flag is meaningful only in conjunction with MAP_POPULATE. Don’t perform read-ahead: create page tables entries only for pages that are already present in RAM. Since Linux 2.6.23, this flag causes MAP_POPULATE to do nothing. One day, the combination of MAP_POPULATE and MAP_NONBLOCK may be reimplemented.

MAP_NORESERVE
Do not reserve swap space for this mapping. When swap space is reserved, one has the guarantee that it is possible to modify the mapping. When swap space is not reserved one might get SIGSEGV upon a write if no physical memory is available. See also the discussion of the file /proc/sys/vm/overcommit_memory in proc(5). Before Linux 2.6, this flag had effect only for private writable mappings.

MAP_POPULATE (since Linux 2.5.46)
Populate (prefault) page tables for a mapping. For a file mapping, this causes read-ahead on the file. This will help to reduce blocking on page faults later. The mmap() call doesn’t fail if the mapping cannot be populated (for example, due to limitations on the number of mapped huge pages when using MAP_HUGETLB). Support for MAP_POPULATE in conjunction with private mappings was added in Linux 2.6.23.

MAP_STACK (since Linux 2.6.27)
Allocate the mapping at an address suitable for a process or thread stack.

This flag is currently a no-op on Linux. However, by employing this flag, applications can ensure that they transparently obtain support if the flag is implemented in the future. Thus, it is used in the glibc threading implementation to allow for the fact that some architectures may (later) require special treatment for stack allocations. A further reason to employ this flag is portability: MAP_STACK exists (and has an effect) on some other systems (e.g., some of the BSDs).

MAP_SYNC (since Linux 4.15)
This flag is available only with the MAP_SHARED_VALIDATE mapping type; mappings of type MAP_SHARED will silently ignore this flag. This flag is supported only for files supporting DAX (direct mapping of persistent memory). For other files, creating a mapping with this flag results in an EOPNOTSUPP error.

Shared file mappings with this flag provide the guarantee that while some memory is mapped writable in the address space of the process, it will be visible in the same file at the same offset even after the system crashes or is rebooted. In conjunction with the use of appropriate CPU instructions, this provides users of such mappings with a more efficient way of making data modifications persistent.

MAP_UNINITIALIZED (since Linux 2.6.33)
Don’t clear anonymous pages. This flag is intended to improve performance on embedded devices. This flag is honored only if the kernel was configured with the CONFIG_MMAP_ALLOW_UNINITIALIZED option. Because of the security implications, that option is normally enabled only on embedded devices (i.e., devices where one has complete control of the contents of user memory).

Of the above flags, only MAP_FIXED is specified in POSIX.1-2001 and POSIX.1-2008. However, most systems also support MAP_ANONYMOUS (or its synonym MAP_ANON).

munmap()

The munmap() system call deletes the mappings for the specified address range, and causes further references to addresses within the range to generate invalid memory references. The region is also automatically unmapped when the process is terminated. On the other hand, closing the file descriptor does not unmap the region.

The address addr must be a multiple of the page size (but length need not be). All pages containing a part of the indicated range are unmapped, and subsequent references to these pages will generate SIGSEGV. It is not an error if the indicated range does not contain any mapped pages.

RETURN VALUE

On success, mmap() returns a pointer to the mapped area. On error, the value MAP_FAILED (that is, (void *) -1) is returned, and errno is set to indicate the error.

On success, munmap() returns 0. On failure, it returns -1, and errno is set to indicate the error (probably to EINVAL).

ERRORS

EACCES
A file descriptor refers to a non-regular file. Or a file mapping was requested, but fd is not open for reading. Or MAP_SHARED was requested and PROT_WRITE is set, but fd is not open in read/write (O_RDWR) mode. Or PROT_WRITE is set, but the file is append-only.

EAGAIN
The file has been locked, or too much memory has been locked (see setrlimit(2)).

EBADF
fd is not a valid file descriptor (and MAP_ANONYMOUS was not set).

EEXIST
MAP_FIXED_NOREPLACE was specified in flags, and the range covered by addr and length clashes with an existing mapping.

EINVAL
We don’t like addr, length, or offset (e.g., they are too large, or not aligned on a page boundary).

EINVAL
(since Linux 2.6.12) length was 0.

EINVAL
flags contained none of MAP_PRIVATE, MAP_SHARED, or MAP_SHARED_VALIDATE.

ENFILE
The system-wide limit on the total number of open files has been reached.

ENODEV
The underlying filesystem of the specified file does not support memory mapping.

ENOMEM
No memory is available.

ENOMEM
The process’s maximum number of mappings would have been exceeded. This error can also occur for munmap(), when unmapping a region in the middle of an existing mapping, since this results in two smaller mappings on either side of the region being unmapped.

ENOMEM
(since Linux 4.7) The process’s RLIMIT_DATA limit, described in getrlimit(2), would have been exceeded.

ENOMEM
We don’t like addr, because it exceeds the virtual address space of the CPU.

EOVERFLOW
On 32-bit architecture together with the large file extension (i.e., using 64-bit off_t): the number of pages used for length plus number of pages used for offset would overflow unsigned long (32 bits).

EPERM
The prot argument asks for PROT_EXEC but the mapped area belongs to a file on a filesystem that was mounted no-exec.

EPERM
The operation was prevented by a file seal; see fcntl(2).

EPERM
The MAP_HUGETLB flag was specified, but the caller was not privileged (did not have the CAP_IPC_LOCK capability) and is not a member of the sysctl_hugetlb_shm_group group; see the description of /proc/sys/vm/sysctl_hugetlb_shm_group in proc_sys(5).

ETXTBSY
MAP_DENYWRITE was set but the object specified by fd is open for writing.

Use of a mapped region can result in these signals:

SIGSEGV
Attempted write into a region mapped as read-only.

SIGBUS
Attempted access to a page of the buffer that lies beyond the end of the mapped file. For an explanation of the treatment of the bytes in the page that corresponds to the end of a mapped file that is not a multiple of the page size, see NOTES.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mmap(), munmap()

Thread safetyMT-Safe

VERSIONS

On some hardware architectures (e.g., i386), PROT_WRITE implies PROT_READ. It is architecture dependent whether PROT_READ implies PROT_EXEC or not. Portable programs should always set PROT_EXEC if they intend to execute code in the new mapping.

The portable way to create a mapping is to specify addr as 0 (NULL), and omit MAP_FIXED from flags. In this case, the system chooses the address for the mapping; the address is chosen so as not to conflict with any existing mapping, and will not be 0. If the MAP_FIXED flag is specified, and addr is 0 (NULL), then the mapped address will be 0 (NULL).

Certain flags constants are defined only if suitable feature test macros are defined (possibly by default): _DEFAULT_SOURCE with glibc 2.19 or later; or _BSD_SOURCE or _SVID_SOURCE in glibc 2.19 and earlier. (Employing _GNU_SOURCE also suffices, and requiring that macro specifically would have been more logical, since these flags are all Linux-specific.) The relevant flags are: MAP_32BIT, MAP_ANONYMOUS (and the synonym MAP_ANON), MAP_DENYWRITE, MAP_EXECUTABLE, MAP_FILE, MAP_GROWSDOWN, MAP_HUGETLB, MAP_LOCKED, MAP_NONBLOCK, MAP_NORESERVE, MAP_POPULATE, and MAP_STACK.

C library/kernel differences

This page describes the interface provided by the glibc mmap() wrapper function. Originally, this function invoked a system call of the same name. Since Linux 2.4, that system call has been superseded by mmap2(2), and nowadays the glibc mmap() wrapper function invokes mmap2(2) with a suitably adjusted value for offset.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4, 4.4BSD.

On POSIX systems on which mmap(), msync(2), and munmap() are available, _POSIX_MAPPED_FILES is defined in <unistd.h> to a value greater than 0. (See also sysconf(3).)

NOTES

Memory mapped by mmap() is preserved across fork(2), with the same attributes.

A file is mapped in multiples of the page size. For a file that is not a multiple of the page size, the remaining bytes in the partial page at the end of the mapping are zeroed when mapped, and modifications to that region are not written out to the file. The effect of changing the size of the underlying file of a mapping on the pages that correspond to added or removed regions of the file is unspecified.

An application can determine which pages of a mapping are currently resident in the buffer/page cache using mincore(2).

Using MAP_FIXED safely

The only safe use for MAP_FIXED is where the address range specified by addr and length was previously reserved using another mapping; otherwise, the use of MAP_FIXED is hazardous because it forcibly removes preexisting mappings, making it easy for a multithreaded process to corrupt its own address space.

For example, suppose that thread A looks through /proc/pid/maps in order to locate an unused address range that it can map using MAP_FIXED, while thread B simultaneously acquires part or all of that same address range. When thread A subsequently employs mmap(MAP_FIXED), it will effectively clobber the mapping that thread B created. In this scenario, thread B need not create a mapping directly; simply making a library call that, internally, uses dlopen(3) to load some other shared library, will suffice. The dlopen(3) call will map the library into the process’s address space. Furthermore, almost any library call may be implemented in a way that adds memory mappings to the address space, either with this technique, or by simply allocating memory. Examples include brk(2), malloc(3), pthread_create(3), and the PAM libraries .

Since Linux 4.17, a multithreaded program can use the MAP_FIXED_NOREPLACE flag to avoid the hazard described above when attempting to create a mapping at a fixed address that has not been reserved by a preexisting mapping.

Timestamps changes for file-backed mappings

For file-backed mappings, the st_atime field for the mapped file may be updated at any time between the mmap() and the corresponding unmapping; the first reference to a mapped page will update the field if it has not been already.

The st_ctime and st_mtime field for a file mapped with PROT_WRITE and MAP_SHARED will be updated after a write to the mapped region, and before a subsequent msync(2) with the MS_SYNC or MS_ASYNC flag, if one occurs.

Huge page (Huge TLB) mappings

For mappings that employ huge pages, the requirements for the arguments of mmap() and munmap() differ somewhat from the requirements for mappings that use the native system page size.

For mmap(), offset must be a multiple of the underlying huge page size. The system automatically aligns length to be a multiple of the underlying huge page size.

For munmap(), addr, and length must both be a multiple of the underlying huge page size.

BUGS

On Linux, there are no guarantees like those suggested above under MAP_NORESERVE. By default, any process can be killed at any moment when the system runs out of memory.

Before Linux 2.6.7, the MAP_POPULATE flag has effect only if prot is specified as PROT_NONE.

SUSv3 specifies that mmap() should fail if length is 0. However, before Linux 2.6.12, mmap() succeeded in this case: no mapping was created and the call returned addr. Since Linux 2.6.12, mmap() fails with the error EINVAL for this case.

POSIX specifies that the system shall always zero fill any partial page at the end of the object and that system will never write any modification of the object beyond its end. On Linux, when you write data to such partial page after the end of the object, the data stays in the page cache even after the file is closed and unmapped and even though the data is never written to the file itself, subsequent mappings may see the modified content. In some cases, this could be fixed by calling msync(2) before the unmap takes place; however, this doesn’t work on tmpfs(5) (for example, when using the POSIX shared memory interface documented in shm_overview(7)).

EXAMPLES

The following program prints part of the file specified in its first command-line argument to standard output. The range of bytes to be printed is specified via offset and length values in the second and third command-line arguments. The program creates a memory mapping of the required pages of the file and then uses write(2) to output the desired bytes.

Program source

#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#define handle_error(msg) \
    do { perror(msg); exit(EXIT_FAILURE); } while (0)
int
main(int argc, char *argv[])
{
    int          fd;
    char         *addr;
    off_t        offset, pa_offset;
    size_t       length;
    ssize_t      s;
    struct stat  sb;
    if (argc < 3 || argc > 4) {
        fprintf(stderr, "%s file offset [length]

“, argv[0]); exit(EXIT_FAILURE); } fd = open(argv[1], O_RDONLY); if (fd == -1) handle_error(“open”); if (fstat(fd, &sb) == -1) /* To obtain file size / handle_error(“fstat”); offset = atoi(argv[2]); pa_offset = offset & ~(sysconf(_SC_PAGE_SIZE) - 1); / offset for mmap() must be page aligned / if (offset >= sb.st_size) { fprintf(stderr, “offset is past end of file “); exit(EXIT_FAILURE); } if (argc == 4) { length = atoi(argv[3]); if (offset + length > sb.st_size) length = sb.st_size - offset; / Can’t display bytes past end of file / } else { / No length arg ==> display to end of file */ length = sb.st_size - offset; } addr = mmap(NULL, length + offset - pa_offset, PROT_READ, MAP_PRIVATE, fd, pa_offset); if (addr == MAP_FAILED) handle_error(“mmap”); s = write(STDOUT_FILENO, addr + offset - pa_offset, length); if (s != length) { if (s == -1) handle_error(“write”); fprintf(stderr, “partial write”); exit(EXIT_FAILURE); } munmap(addr, length + offset - pa_offset); close(fd); exit(EXIT_SUCCESS); }

SEE ALSO

ftruncate(2), getpagesize(2), memfd_create(2), mincore(2), mlock(2), mmap2(2), mprotect(2), mremap(2), msync(2), remap_file_pages(2), setrlimit(2), shmat(2), userfaultfd(2), shm_open(3), shm_overview(7)

The descriptions of the following files in proc(5): /proc/pid/maps, /proc/pid/map_files, and /proc/pid/smaps.

B.O. Gallmeister, POSIX.4, O’Reilly, pp. 128–129 and 389–391.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

109 - Linux cli command pthread_tryjoin_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_tryjoin_np and provides detailed information about the command pthread_tryjoin_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_tryjoin_np.

NAME 🖥️ pthread_tryjoin_np 🖥️

try to join with a terminated thread

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <pthread.h>
int pthread_tryjoin_np(pthread_t thread, void **retval);
int pthread_timedjoin_np(pthread_t thread, void **retval,
 const struct timespec *abstime);

DESCRIPTION

These functions operate in the same way as pthread_join(3), except for the differences described on this page.

The pthread_tryjoin_np() function performs a nonblocking join with the thread thread, returning the exit status of the thread in *retval. If thread has not yet terminated, then instead of blocking, as is done by pthread_join(3), the call returns an error.

The pthread_timedjoin_np() function performs a join-with-timeout. If thread has not yet terminated, then the call blocks until a maximum time, specified in abstime, measured against the CLOCK_REALTIME clock. If the timeout expires before thread terminates, the call returns an error. The abstime argument is a timespec(3) structure, specifying an absolute time measured since the Epoch (see time(2)).

RETURN VALUE

On success, these functions return 0; on error, they return an error number.

ERRORS

These functions can fail with the same errors as pthread_join(3). pthread_tryjoin_np() can in addition fail with the following error:

EBUSY
thread had not yet terminated at the time of the call.

pthread_timedjoin_np() can in addition fail with the following errors:

EINVAL
abstime value is invalid (tv_sec is less than 0 or tv_nsec is greater than 1e9).

ETIMEDOUT
The call timed out before thread terminated.

pthread_timedjoin_np() never returns the error EINTR.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_tryjoin_np(), pthread_timedjoin_np()

Thread safetyMT-Safe

STANDARDS

GNU; hence the suffix “_np” (nonportable) in the names.

HISTORY

glibc 2.3.3.

BUGS

The pthread_timedjoin_np() function measures time by internally calculating a relative sleep interval that is then measured against the CLOCK_MONOTONIC clock instead of the CLOCK_REALTIME clock. Consequently, the timeout is unaffected by discontinuous changes to the CLOCK_REALTIME clock.

EXAMPLES

The following code waits to join for up to 5 seconds:

struct timespec ts;
int s;
...
if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {
    /* Handle error */
}
ts.tv_sec += 5;
s = pthread_timedjoin_np(thread, NULL, &ts);
if (s != 0) {
    /* Handle error */
}

SEE ALSO

clock_gettime(2), pthread_exit(3), pthread_join(3), timespec(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

110 - Linux cli command ts_read

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ts_read and provides detailed information about the command ts_read, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ts_read.

NAME 🖥️ ts_read 🖥️

read tslib touch samples

SYNOPSIS

#include <tslib.h>

int ts_read(struct tsdev *dev, struct ts_sample *samp, int nr);

int ts_read_raw(struct tsdev *dev, struct ts_sample *samp, int nr);

int ts_read_mt(struct tsdev *dev, struct ts_sample_mt **samp, int slots, int nr);

int ts_read_raw_mt(struct tsdev *dev, struct ts_sample_mt **samp, int slots, int nr);

DESCRIPTION

ts_read() reads nr input samples with tslib’s filters applied. struct ts_sample is define as follows:

struct ts_sample {
        int             x;
        int             y;
        unsigned int    pressure;
        struct timeval  tv;
};

ts_read_mt() reads nr * slots input samples with tslib’s filters applied. struct ts_sample_mt is defined as follows:

struct ts_sample_mt {
        /* most recent ABS_MT_* event codes.
         * see linux/input.h for descriptions */
        int             x;
        int             y;
        unsigned int    pressure;
        int             slot;
        int             tracking_id;

        int             tool_type;
        int             tool_x;
        int             tool_y;
        unsigned int    touch_major;
        unsigned int    width_major;
        unsigned int    touch_minor;
        unsigned int    width_minor;
        int             orientation;
        int             distance;
        int             blob_id;

        struct timeval  tv;

        /* BTN_TOUCH state */
        short           pen_down;

        /* the TSLIB_MT_VALID bit is set in valid if this sample
         * contains new data;
	 * valid is set to 0 otherwise */
        short           valid;
};

The user has to provide the amount of memory described in nr and slots to hold them.

ts_read_raw() and ts_read_raw_mt() do the same thing without tslib’s filters applied.

RETURN VALUE

The number of actually read samples is returned. Especially when opened in non-blocking mode, see ts_setup() , that can be less than requested in the call. On failure, a negative error number is returned.

EXAMPLE

The following program continuously reads tslib multitouch input samples and prints slot and position values to stdout as the touch screen is touched.

#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>

#include <tslib.h>

#define READ_SAMPLES 1
#define MAX_SLOTS 5

int main(int argc, char **argv)
{
        struct tsdev *ts;
        struct ts_sample_mt **samp_mt = NULL;
        int i, j;
        int ret;

        ts = ts_setup(NULL, 0);
        if (!ts)
                return -1;

        samp_mt = malloc(READ_SAMPLES * sizeof(struct ts_sample_mt **));
        if (!samp_mt)
                return -1;

        for (i = 0; i < READ_SAMPLES; i++) {
                samp_mt[i] = calloc(MAX_SLOTS, sizeof(struct ts_sample_mt));
                if (!samp_mt[i])
                        return -1;
        }

        while(1) {
                ret = ts_read_mt(ts, samp_mt, MAX_SLOTS, READ_SAMPLES);
                for (i = 0; i < ret; i++) {
                        printf("sample nr %d, i);
                        for (j = 0; i < MAX_SLOTS; j++) {
                                if (!(samp_mt[i][j].valid & TSLIB_MT_VALID))
                                        continue;

                                printf("slot %d: X:%d Y: %d,
                                       samp_mt[i][j].slot,
                                       samp_mt[i][j].x,
                                       samp_mt[i][j].y);
                        }
                }
        }
}

SEE ALSO

ts_setup(3), ts_config(3), ts_open(3), ts_close(3), ts.conf(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

111 - Linux cli command XtAddGrab

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAddGrab and provides detailed information about the command XtAddGrab, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAddGrab.

NAME 🖥️ XtAddGrab 🖥️

redirect user input to a modal widget

SYNTAX

#include <X11/Intrinsic.h>

void XtAddGrab(Widget w, Boolean exclusive, Boolean spring_loaded);

void XtRemoveGrab(Widget w);

ARGUMENTS

exclusive
Specifies whether user events should be dispatched exclusively to this widget or also to previous widgets in the cascade.

spring_loaded
Specifies whether this widget was popped up because the user pressed a pointer button.

  1. Specifies the widget to add to or remove from the modal cascade.

DESCRIPTION

The XtAddGrab function appends the widget (and associated parameters) to the modal cascade and checks that exclusive is True if spring_loaded is True. If these are not True, XtAddGrab generates an error.

The modal cascade is used by XtDispatchEvent when it tries to dispatch a user event. When at least one modal widget is in the widget cascade, XtDispatchEvent first determines if the event should be delivered. It starts at the most recent cascade entry and follows the cascade up to and including the most recent cascade entry added with the exclusive parameter True.

This subset of the modal cascade along with all descendants of these widgets comprise the active subset. User events that occur outside the widgets in this subset are ignored or remapped. Modal menus with submenus generally add a submenu widget to the cascade with exclusive False. Modal dialog boxes that need to restrict user input to the most deeply nested dialog box add a subdialog widget to the cascade with exclusive True. User events that occur within the active subset are delivered to the appropriate widget, which is usually a child or further descendant of the modal widget.

Regardless of where on the screen they occur, remap events are always delivered to the most recent widget in the active subset of the cascade that has spring_loaded True, if any such widget exists.

The XtRemoveGrab function removes widgets from the modal cascade starting at the most recent widget up to and including the specified widget. It issues an error if the specified widget is not on the modal cascade.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

112 - Linux cli command mbstate_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mbstate_ttype and provides detailed information about the command mbstate_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mbstate_ttype.

NAME 🖥️ mbstate_ttype 🖥️

multi-byte-character conversion state

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <wchar.h>
typedef /* ... */ mbstate_t;

DESCRIPTION

Character conversion between the multibyte representation and the wide character representation uses conversion state, of type mbstate_t. Conversion of a string uses a finite-state machine; when it is interrupted after the complete conversion of a number of characters, it may need to save a state for processing the remaining characters. Such a conversion state is needed for the sake of encodings such as ISO/IEC 2022 and UTF-7.

The initial state is the state at the beginning of conversion of a string. There are two kinds of state: the one used by multibyte to wide character conversion functions, such as mbsrtowcs(3), and the one used by wide character to multibyte conversion functions, such as wcsrtombs(3), but they both fit in a mbstate_t, and they both have the same representation for an initial state.

For 8-bit encodings, all states are equivalent to the initial state. For multibyte encodings like UTF-8, EUC-*, BIG5, or SJIS, the wide character to multibyte conversion functions never produce non-initial states, but the multibyte to wide-character conversion functions like mbrtowc(3) do produce non-initial states when interrupted in the middle of a character.

One possible way to create an mbstate_t in initial state is to set it to zero:

mbstate_t state;
memset(&state, 0, sizeof(state));

On Linux, the following works as well, but might generate compiler warnings:

mbstate_t state = { 0 };

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

SEE ALSO

mbrlen(3), mbrtowc(3), mbsinit(3), mbsrtowcs(3), wcrtomb(3), wcsrtombs(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

113 - Linux cli command htobe16

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command htobe16 and provides detailed information about the command htobe16, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the htobe16.

NAME 🖥️ htobe16 🖥️

convert values between host and big-/little-endian byte order

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <endian.h>
uint16_t htobe16(uint16_t host_16bits);
uint16_t htole16(uint16_t host_16bits);
uint16_t be16toh(uint16_t big_endian_16bits);
uint16_t le16toh(uint16_t little_endian_16bits);
uint32_t htobe32(uint32_t host_32bits);
uint32_t htole32(uint32_t host_32bits);
uint32_t be32toh(uint32_t big_endian_32bits);
uint32_t le32toh(uint32_t little_endian_32bits);
uint64_t htobe64(uint64_t host_64bits);
uint64_t htole64(uint64_t host_64bits);
uint64_t be64toh(uint64_t big_endian_64bits);
uint64_t le64toh(uint64_t little_endian_64bits);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

htobe16(), htole16(), be16toh(), le16toh(), htobe32(), htole32(), be32toh(), le32toh(), htobe64(), htole64(), be64toh(), le64toh():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    In glibc up to and including 2.19:
        _BSD_SOURCE

DESCRIPTION

These functions convert the byte encoding of integer values from the byte order that the current CPU (the “host”) uses, to and from little-endian and big-endian byte order.

The number, nn, in the name of each function indicates the size of integer handled by the function, either 16, 32, or 64 bits.

The functions with names of the form “htobenn” convert from host byte order to big-endian order.

The functions with names of the form “htolenn” convert from host byte order to little-endian order.

The functions with names of the form “benntoh” convert from big-endian order to host byte order.

The functions with names of the form “lenntoh” convert from little-endian order to host byte order.

VERSIONS

Similar functions are present on the BSDs, where the required header file is <sys/endian.h> instead of <endian.h>. Unfortunately, NetBSD, FreeBSD, and glibc haven’t followed the original OpenBSD naming convention for these functions, whereby the nn component always appears at the end of the function name (thus, for example, in NetBSD, FreeBSD, and glibc, the equivalent of OpenBSDs “betoh32” is “be32toh”).

STANDARDS

None.

HISTORY

glibc 2.9.

These functions are similar to the older byteorder(3) family of functions. For example, be32toh() is identical to ntohl().

The advantage of the byteorder(3) functions is that they are standard functions available on all UNIX systems. On the other hand, the fact that they were designed for use in the context of TCP/IP means that they lack the 64-bit and little-endian variants described in this page.

EXAMPLES

The program below display the results of converting an integer from host byte order to both little-endian and big-endian byte order. Since host byte order is either little-endian or big-endian, only one of these conversions will have an effect. When we run this program on a little-endian system such as x86-32, we see the following:

$ ./a.out
x.u32 = 0x44332211
htole32(x.u32) = 0x44332211
htobe32(x.u32) = 0x11223344

Program source

#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    union {
        uint32_t u32;
        uint8_t arr[4];
    } x;
    x.arr[0] = 0x11;	/* Lowest-address byte */
    x.arr[1] = 0x22;
    x.arr[2] = 0x33;
    x.arr[3] = 0x44;	/* Highest-address byte */
    printf("x.u32 = %#x

“, x.u32); printf(“htole32(x.u32) = %#x “, htole32(x.u32)); printf(“htobe32(x.u32) = %#x “, htobe32(x.u32)); exit(EXIT_SUCCESS); }

SEE ALSO

bswap(3), byteorder(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

114 - Linux cli command pcap_datalink_val_to_description_or_dltpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_datalink_val_to_description_or_dltpcap and provides detailed information about the command pcap_datalink_val_to_description_or_dltpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_datalink_val_to_description_or_dltpcap.

NAME 🖥️ pcap_datalink_val_to_description_or_dltpcap 🖥️

get a name or description for a link-layer header type value

SYNOPSIS

#include <pcap.h>
const char *pcap_datalink_val_to_name(int dlt);
const char *pcap_datalink_val_to_description(int dlt);
const char *pcap_datalink_val_to_description_or_dlt(int dlt);

DESCRIPTION

pcap_datalink_val_to_name() translates a link-layer header type value to the corresponding link-layer header type name, which is the DLT_ name for the link-layer header type value with the DLT_ removed. NULL is returned if the type value does not correspond to a known DLT_ value.

pcap_datalink_val_to_description() translates a link-layer header type value to a short description of that link-layer header type. NULL is returned if the type value does not correspond to a known DLT_ value.

pcap_datalink_val_to_description_or_dlt() translates a link-layer header type value to a short description of that link-layer header type just like pcap_datalink_val_to_description(). If the type value does not correspond to a known DLT_ value, the string “DLT n” is returned, where n is the value of the dlt argument.

BACKWARD COMPATIBILITY

The pcap_datalink_val_to_description_or_dlt() function first became available in libpcap release 1.9.1. In previous releases, pcap_datalink_val_to_description() would have to be called and, if it returned NULL, a default string would have to be constructed.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

115 - Linux cli command getmntent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getmntent and provides detailed information about the command getmntent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getmntent.

NAME 🖥️ getmntent 🖥️

get filesystem descriptor file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
#include <mntent.h>
FILE *setmntent(const char *filename, const char *type);
struct mntent *getmntent(FILE *stream);
int addmntent(FILE *restrict stream,
 const struct mntent *restrict mnt);
int endmntent(FILE *streamp);
char *hasmntopt(const struct mntent *mnt, const char *opt);
/* GNU extension */
#include <mntent.h>
struct mntent *getmntent_r(FILE *restrict streamp,
 struct mntent *restrict mntbuf,
 char buf[restrict .buflen], int buflen);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getmntent_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These routines are used to access the filesystem description file /etc/fstab and the mounted filesystem description file /etc/mtab.

The setmntent() function opens the filesystem description file filename and returns a file pointer which can be used by getmntent(). The argument type is the type of access required and can take the same values as the mode argument of fopen(3). The returned stream should be closed using endmntent() rather than fclose(3).

The getmntent() function reads the next line of the filesystem description file from stream and returns a pointer to a structure containing the broken out fields from a line in the file. The pointer points to a static area of memory which is overwritten by subsequent calls to getmntent().

The addmntent() function adds the mntent structure mnt to the end of the open stream.

The endmntent() function closes the stream associated with the filesystem description file.

The hasmntopt() function scans the mnt_opts field (see below) of the mntent structure mnt for a substring that matches opt. See <mntent.h> and mount(8) for valid mount options.

The reentrant getmntent_r() function is similar to getmntent(), but stores the mntent structure in the provided *mntbuf, and stores the strings pointed to by the entries in that structure in the provided array buf of size buflen.

The mntent structure is defined in <mntent.h> as follows:

struct mntent {
    char *mnt_fsname;   /* name of mounted filesystem */
    char *mnt_dir;      /* filesystem path prefix */
    char *mnt_type;     /* mount type (see mntent.h) */
    char *mnt_opts;     /* mount options (see mntent.h) */
    int   mnt_freq;     /* dump frequency in days */
    int   mnt_passno;   /* pass number on parallel fsck */
};

Since fields in the mtab and fstab files are separated by whitespace, octal escapes are used to represent the characters space ( ), tab ( ), newline ( ), and backslash () in those files when they occur in one of the four strings in a mntent structure. The routines addmntent() and getmntent() will convert from string representation to escaped representation and back. When converting from escaped representation, the sequence \134 is also converted to a backslash.

RETURN VALUE

The getmntent() and getmntent_r() functions return a pointer to the mntent structure or NULL on failure.

The addmntent() function returns 0 on success and 1 on failure.

The endmntent() function always returns 1.

The hasmntopt() function returns the address of the substring if a match is found and NULL otherwise.

FILES

/etc/fstab
filesystem description file

/etc/mtab
mounted filesystem description file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setmntent(), endmntent(), hasmntopt()

Thread safetyMT-Safe

getmntent()

Thread safety

MT-Unsafe race:mntentbuf locale

addmntent()

Thread safety

MT-Safe race:stream locale

getmntent_r()

Thread safetyMT-Safe locale

STANDARDS

None.

HISTORY

The nonreentrant functions are from SunOS 4.1.3. A routine getmntent_r() was introduced in HP-UX 10, but it returns an int. The prototype shown above is glibc-only.

System V also has a getmntent() function but the calling sequence differs, and the returned structure is different. Under System V /etc/mnttab is used. 4.4BSD and Digital UNIX have a routine getmntinfo(), a wrapper around the system call getfsstat().

SEE ALSO

fopen(3), fstab(5), mount(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

116 - Linux cli command XtOwnSelection

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtOwnSelection and provides detailed information about the command XtOwnSelection, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtOwnSelection.

NAME 🖥️ XtOwnSelection 🖥️

set selection owner

SYNTAX

#include <X11/Intrinsic.h>

Boolean XtOwnSelection(Widget w, Atom selection, Time time, XtConvertSelectionProc convert_proc, XtLoseSelectionProc lose_selection, XtSelectionDoneProc done_proc);

Boolean XtOwnSelectionIncremental(Widget w, Atom selection, Time time, XtConvertSelectionIncrProc convert_callback, XtLoseSelectionIncrProc lose_callback, XtSelectionDoneIncrProc done_callback, XtCancelConvertSelectionProc cancel_callback, XtPointer client_data);

void XtDisownSelection(Widget w, Atom selection, Time time);

ARGUMENTS

convert_proc
Specifies the procedure that is to be called whenever someone requests the current value of the selection.

done_proc
Specifies the procedure that is called after the requestor has received the selection or NULL if the owner is not interested in being called back.

lose_selection
Specifies the procedure that is to be called whenever the widget has lost selection ownership or NULL if the owner is not interested in being called back.

selection
Specifies an atom that describes the type of the selection (for example, XA_PRIMARY, XA_SECONDARY, or XA_CLIPBOARD).

time
Specifies the timestamp that indicates when the selection ownership should commence or is to be relinquished.

  1. Specifies the widget that wishes to become the owner or to relinquish ownership.

DESCRIPTION

The XtOwnSelection function informs the Intrinsics selection mechanism that a widget believes it owns a selection. It returns True if the widget has successfully become the owner and False otherwise. The widget may fail to become the owner if some other widget has asserted ownership at a time later than this widget. Note that widgets can lose selection ownership either because someone else asserted later ownership of the selection or because the widget voluntarily gave up ownership of the selection. Also note that the lose_selection procedure is not called if the widget fails to obtain selection ownership in the first place.

The XtOwnSelectionIncremental procedure informs the Intrinsics incremental selection mechanism that the specified widget wishes to own the selection. It returns True if the specified widget successfully becomes the selection owner or False otherwise. For more information about selection, target, and time, see Section 2.6 of the Inter-Client Communication Conventions Manual.

A widget that becomes the selection owner using XtOwnSelectionIncremental may use XtDisownSelection to relinquish selection ownership.

The XtDisownSelection function informs the Intrinsics selection mechanism that the specified widget is to lose ownership of the selection. If the widget does not currently own the selection either because it lost the selection or because it never had the selection to begin with, XtDisownSelection does nothing.

After a widget has called XtDisownSelection, its convert procedure is not called even if a request arrives later with a timestamp during the period that this widget owned the selection. However, its done procedure will be called if a conversion that started before the call to XtDisownSelection finishes after the call to XtDisownSelection.

SEE ALSO

XtAppGetSelectionTimeout(3), XtGetSelectionValue(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

117 - Linux cli command fts_children

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fts_children and provides detailed information about the command fts_children, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fts_children.

NAME 🖥️ fts_children 🖥️

traverse a file hierarchy

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <sys/stat.h>
#include <fts.h>
FTS *fts_open(char *const *path_argv, int options,
 int (*_Nullable compar)(const FTSENT **, const FTSENT **));
FTSENT *fts_read(FTS *ftsp);
FTSENT *fts_children(FTS *ftsp, int instr);
int fts_set(FTS *ftsp, FTSENT *f, int instr);
int fts_close(FTS *ftsp);

DESCRIPTION

The fts functions are provided for traversing file hierarchies. A simple overview is that the fts_open() function returns a “handle” (of type FTS *) that refers to a file hierarchy “stream”. This handle is then supplied to the other fts functions. The function fts_read() returns a pointer to a structure describing one of the files in the file hierarchy. The function fts_children() returns a pointer to a linked list of structures, each of which describes one of the files contained in a directory in the hierarchy.

In general, directories are visited two distinguishable times; in preorder (before any of their descendants are visited) and in postorder (after all of their descendants have been visited). Files are visited once. It is possible to walk the hierarchy “logically” (visiting the files that symbolic links point to) or physically (visiting the symbolic links themselves), order the walk of the hierarchy or prune and/or revisit portions of the hierarchy.

Two structures (and associated types) are defined in the include file <fts.h>. The first type is FTS, the structure that represents the file hierarchy itself. The second type is FTSENT, the structure that represents a file in the file hierarchy. Normally, an FTSENT structure is returned for every file in the file hierarchy. In this manual page, “file” and “FTSENT structure” are generally interchangeable.

The FTSENT structure contains fields describing a file. The structure contains at least the following fields (there are additional fields that should be considered private to the implementation):

typedef struct _ftsent {
    unsigned short  fts_info;     /* flags for FTSENT structure */
    char           *fts_accpath;  /* access path */
    char           *fts_path;     /* root path */
    short           fts_pathlen;  /* strlen(fts_path) +
                                     strlen(fts_name) */
    char           *fts_name;     /* filename */
    short           fts_namelen;  /* strlen(fts_name) */
    short           fts_level;    /* depth (-1 to N) */
    int             fts_errno;    /* file errno */
    long            fts_number;   /* local numeric value */
    void           *fts_pointer;  /* local address value */
    struct _ftsent *fts_parent;   /* parent directory */
    struct _ftsent *fts_link;     /* next file structure */
    struct _ftsent *fts_cycle;    /* cycle structure */
    struct stat    *fts_statp;    /* [l]stat(2) information */
} FTSENT;

These fields are defined as follows:

fts_info
One of the following values describing the returned FTSENT structure and the file it represents. With the exception of directories without errors (FTS_D), all of these entries are terminal, that is, they will not be revisited, nor will any of their descendants be visited.

FTS_D
A directory being visited in preorder.

FTS_DC
A directory that causes a cycle in the tree. (The fts_cycle field of the FTSENT structure will be filled in as well.)

FTS_DEFAULT
Any FTSENT structure that represents a file type not explicitly described by one of the other fts_info values.

FTS_DNR
A directory which cannot be read. This is an error return, and the fts_errno field will be set to indicate what caused the error.

FTS_DOT
A file named “.” or “..” which was not specified as a filename to fts_open() (see FTS_SEEDOT).

FTS_DP
A directory being visited in postorder. The contents of the FTSENT structure will be unchanged from when it was returned in preorder, that is, with the fts_info field set to FTS_D.

FTS_ERR
This is an error return, and the fts_errno field will be set to indicate what caused the error.

FTS_F
A regular file.

FTS_NS
A file for which no [l] stat(2) information was available. The contents of the fts_statp field are undefined. This is an error return, and the fts_errno field will be set to indicate what caused the error.

FTS_NSOK
A file for which no [l] stat(2) information was requested. The contents of the fts_statp field are undefined.

FTS_SL
A symbolic link.

FTS_SLNONE
A symbolic link with a nonexistent target. The contents of the fts_statp field reference the file characteristic information for the symbolic link itself.

fts_accpath
A path for accessing the file from the current directory.

fts_path
The path for the file relative to the root of the traversal. This path contains the path specified to fts_open() as a prefix.

fts_pathlen
The sum of the lengths of the strings referenced by fts_path and fts_name.

fts_name
The name of the file.

fts_namelen
The length of the string referenced by fts_name.

fts_level
The depth of the traversal, numbered from -1 to N, where this file was found. The FTSENT structure representing the parent of the starting point (or root) of the traversal is numbered -1, and the FTSENT structure for the root itself is numbered 0.

fts_errno
If fts_children() or fts_read() returns an FTSENT structure whose fts_info field is set to FTS_DNR, FTS_ERR, or FTS_NS, the fts_errno field contains the error number (i.e., the errno value) specifying the cause of the error. Otherwise, the contents of the fts_errno field are undefined.

fts_number
This field is provided for the use of the application program and is not modified by the fts functions. It is initialized to 0.

fts_pointer
This field is provided for the use of the application program and is not modified by the fts functions. It is initialized to NULL.

fts_parent
A pointer to the FTSENT structure referencing the file in the hierarchy immediately above the current file, that is, the directory of which this file is a member. A parent structure for the initial entry point is provided as well, however, only the fts_level, fts_number, and fts_pointer fields are guaranteed to be initialized.

fts_link
Upon return from the fts_children() function, the fts_link field points to the next structure in the NULL-terminated linked list of directory members. Otherwise, the contents of the fts_link field are undefined.

fts_cycle
If a directory causes a cycle in the hierarchy (see FTS_DC), either because of a hard link between two directories, or a symbolic link pointing to a directory, the fts_cycle field of the structure will point to the FTSENT structure in the hierarchy that references the same file as the current FTSENT structure. Otherwise, the contents of the fts_cycle field are undefined.

fts_statp
A pointer to [l] stat(2) information for the file.

A single buffer is used for all of the paths of all of the files in the file hierarchy. Therefore, the fts_path and fts_accpath fields are guaranteed to be null-terminated only for the file most recently returned by fts_read(). To use these fields to reference any files represented by other FTSENT structures will require that the path buffer be modified using the information contained in that FTSENT structure’s fts_pathlen field. Any such modifications should be undone before further calls to fts_read() are attempted. The fts_name field is always null-terminated.

fts_open()

The fts_open() function takes a pointer to an array of character pointers naming one or more paths which make up a logical file hierarchy to be traversed. The array must be terminated by a null pointer.

There are a number of options, at least one of which (either FTS_LOGICAL or FTS_PHYSICAL) must be specified. The options are selected by ORing the following values:

FTS_LOGICAL
This option causes the fts routines to return FTSENT structures for the targets of symbolic links instead of the symbolic links themselves. If this option is set, the only symbolic links for which FTSENT structures are returned to the application are those referencing nonexistent files: the fts_statp field is obtained via stat(2) with a fallback to lstat(2).

FTS_PHYSICAL
This option causes the fts routines to return FTSENT structures for symbolic links themselves instead of the target files they point to. If this option is set, FTSENT structures for all symbolic links in the hierarchy are returned to the application: the fts_statp field is obtained via lstat(2).

FTS_COMFOLLOW
This option causes any symbolic link specified as a root path to be followed immediately, as if via FTS_LOGICAL, regardless of the primary mode.

FTS_NOCHDIR
As a performance optimization, the fts functions change directories as they walk the file hierarchy. This has the side-effect that an application cannot rely on being in any particular directory during the traversal. This option turns off this optimization, and the fts functions will not change the current directory. Note that applications should not themselves change their current directory and try to access files unless FTS_NOCHDIR is specified and absolute pathnames were provided as arguments to fts_open().

FTS_NOSTAT
By default, returned FTSENT structures reference file characteristic information (the fts_statp field) for each file visited. This option relaxes that requirement as a performance optimization, allowing the fts functions to set the fts_info field to FTS_NSOK and leave the contents of the fts_statp field undefined.

FTS_SEEDOT
By default, unless they are specified as path arguments to fts_open(), any files named “.” or “..” encountered in the file hierarchy are ignored. This option causes the fts routines to return FTSENT structures for them.

FTS_XDEV
This option prevents fts from descending into directories that have a different device number than the file from which the descent began.

The argument compar() specifies a user-defined function which may be used to order the traversal of the hierarchy. It takes two pointers to pointers to FTSENT structures as arguments and should return a negative value, zero, or a positive value to indicate if the file referenced by its first argument comes before, in any order with respect to, or after, the file referenced by its second argument. The fts_accpath, fts_path, and fts_pathlen fields of the FTSENT structures may never be used in this comparison. If the fts_info field is set to FTS_NS or FTS_NSOK, the fts_statp field may not either. If the compar() argument is NULL, the directory traversal order is in the order listed in path_argv for the root paths, and in the order listed in the directory for everything else.

fts_read()

The fts_read() function returns a pointer to an FTSENT structure describing a file in the hierarchy. Directories (that are readable and do not cause cycles) are visited at least twice, once in preorder and once in postorder. All other files are visited at least once. (Hard links between directories that do not cause cycles or symbolic links to symbolic links may cause files to be visited more than once, or directories more than twice.)

If all the members of the hierarchy have been returned, fts_read() returns NULL and sets errno to 0. If an error unrelated to a file in the hierarchy occurs, fts_read() returns NULL and sets errno to indicate the error. If an error related to a returned file occurs, a pointer to an FTSENT structure is returned, and errno may or may not have been set (see fts_info).

The FTSENT structures returned by fts_read() may be overwritten after a call to fts_close() on the same file hierarchy stream, or, after a call to fts_read() on the same file hierarchy stream unless they represent a file of type directory, in which case they will not be overwritten until after a call to fts_read() after the FTSENT structure has been returned by the function fts_read() in postorder.

fts_children()

The fts_children() function returns a pointer to an FTSENT structure describing the first entry in a NULL-terminated linked list of the files in the directory represented by the FTSENT structure most recently returned by fts_read(). The list is linked through the fts_link field of the FTSENT structure, and is ordered by the user-specified comparison function, if any. Repeated calls to fts_children() will re-create this linked list.

As a special case, if fts_read() has not yet been called for a hierarchy, fts_children() will return a pointer to the files in the logical directory specified to fts_open(), that is, the arguments specified to fts_open(). Otherwise, if the FTSENT structure most recently returned by fts_read() is not a directory being visited in preorder, or the directory does not contain any files, fts_children() returns NULL and sets errno to zero. If an error occurs, fts_children() returns NULL and sets errno to indicate the error.

The FTSENT structures returned by fts_children() may be overwritten after a call to fts_children(), fts_close(), or fts_read() on the same file hierarchy stream.

The instr argument is either zero or the following value:

FTS_NAMEONLY
Only the names of the files are needed. The contents of all the fields in the returned linked list of structures are undefined with the exception of the fts_name and fts_namelen fields.

fts_set()

The function fts_set() allows the user application to determine further processing for the file f of the stream ftsp. The fts_set() function returns 0 on success, and -1 if an error occurs.

The instr argument is either 0 (meaning “do nothing”) or one of the following values:

FTS_AGAIN
Revisit the file; any file type may be revisited. The next call to fts_read() will return the referenced file. The fts_stat and fts_info fields of the structure will be reinitialized at that time, but no other fields will have been changed. This option is meaningful only for the most recently returned file from fts_read(). Normal use is for postorder directory visits, where it causes the directory to be revisited (in both preorder and postorder) as well as all of its descendants.

FTS_FOLLOW
The referenced file must be a symbolic link. If the referenced file is the one most recently returned by fts_read(), the next call to fts_read() returns the file with the fts_info and fts_statp fields reinitialized to reflect the target of the symbolic link instead of the symbolic link itself. If the file is one of those most recently returned by fts_children(), the fts_info and fts_statp fields of the structure, when returned by fts_read(), will reflect the target of the symbolic link instead of the symbolic link itself. In either case, if the target of the symbolic link does not exist, the fields of the returned structure will be unchanged and the fts_info field will be set to FTS_SLNONE.

If the target of the link is a directory, the preorder return, followed by the return of all of its descendants, followed by a postorder return, is done.

FTS_SKIP
No descendants of this file are visited. The file may be one of those most recently returned by either fts_children() or fts_read().

fts_close()

The fts_close() function closes the file hierarchy stream referred to by ftsp and restores the current directory to the directory from which fts_open() was called to open ftsp. The fts_close() function returns 0 on success, and -1 if an error occurs.

ERRORS

The function fts_open() may fail and set errno for any of the errors specified for open(2) and malloc(3).

In addition, fts_open() may fail and set errno as follows:

ENOENT
Any element of path_argv was an empty string.

The function fts_close() may fail and set errno for any of the errors specified for chdir(2) and close(2).

The functions fts_read() and fts_children() may fail and set errno for any of the errors specified for chdir(2), malloc(3), opendir(3), readdir(3), and [l] stat(2).

In addition, fts_children(), fts_open(), and fts_set() may fail and set errno as follows:

EINVAL
options or instr was invalid.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fts_open(), fts_set(), fts_close()

Thread safetyMT-Safe

fts_read(), fts_children()

Thread safetyMT-Unsafe

STANDARDS

None.

HISTORY

glibc 2. 4.4BSD.

BUGS

Before glibc 2.23, all of the APIs described in this man page are not safe when compiling a program using the LFS APIs (e.g., when compiling with -D_FILE_OFFSET_BITS=64).

SEE ALSO

find(1), chdir(2), lstat(2), stat(2), ftw(3), qsort(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

118 - Linux cli command sockaddr_in6type

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sockaddr_in6type and provides detailed information about the command sockaddr_in6type, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sockaddr_in6type.

NAME 🖥️ sockaddr_in6type 🖥️

socket address

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/socket.h>
struct sockaddr {
 sa_family_t sa_family; /* Address family */
 char sa_data[]; /* Socket address */
};
struct sockaddr_storage {
 sa_family_t ss_family; /* Address family */
};
typedef /* ... */ socklen_t;
typedef /* ... */ sa_family_t;

Internet domain sockets

#include <netinet/in.h>
struct sockaddr_in {
 sa_family_t sin_family; /* AF_INET */
 in_port_t sin_port; /* Port number */
 struct in_addr sin_addr; /* IPv4 address */
};
struct sockaddr_in6 {
 sa_family_t sin6_family; /* AF_INET6 */
 in_port_t sin6_port; /* Port number */
 uint32_t sin6_flowinfo; /* IPv6 flow info */
 struct in6_addr sin6_addr; /* IPv6 address */
 uint32_t sin6_scope_id; /* Set of interfaces for a scope */
};
struct in_addr {
 in_addr_t s_addr;
};
struct in6_addr {
 uint8_t s6_addr[16];
};
typedef uint32_t in_addr_t;
typedef uint16_t in_port_t;

UNIX domain sockets

#include <sys/un.h>
struct sockaddr_un {
 sa_family_t sun_family; /* Address family */
 char sun_path[]; /* Socket pathname */
};

DESCRIPTION

sockaddr
Describes a socket address.

sockaddr_storage
A structure at least as large as any other sockaddr_* address structures. It’s aligned so that a pointer to it can be cast as a pointer to other sockaddr_* structures and used to access its fields.

socklen_t
Describes the length of a socket address. This is an integer type of at least 32 bits.

sa_family_t
Describes a socket’s protocol family. This is an unsigned integer type.

Internet domain sockets

sockaddr_in
Describes an IPv4 Internet domain socket address. The sin_port and sin_addr members are stored in network byte order.

sockaddr_in6
Describes an IPv6 Internet domain socket address. The sin6_addr.s6_addr array is used to contain a 128-bit IPv6 address, stored in network byte order.

UNIX domain sockets

sockaddr_un
Describes a UNIX domain socket address.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

socklen_t was invented by POSIX. See also accept(2).

These structures were invented before modern ISO C strict-aliasing rules. If aliasing rules are applied strictly, these structures would be extremely difficult to use without invoking Undefined Behavior. POSIX Issue 8 will fix this by requiring that implementations make sure that these structures can be safely used as they were designed.

NOTES

socklen_t is also defined in <netdb.h>.

sa_family_t is also defined in <netinet/in.h> and <sys/un.h>.

SEE ALSO

accept(2), bind(2), connect(2), getpeername(2), getsockname(2), getsockopt(2), sendto(2), setsockopt(2), socket(2), socketpair(2), getaddrinfo(3), gethostbyaddr(3), getnameinfo(3), htonl(3), ipv6(7), socket(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

119 - Linux cli command ts_close_restricted

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ts_close_restricted and provides detailed information about the command ts_close_restricted, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ts_close_restricted.

NAME 🖥️ ts_close_restricted 🖥️

use a custom function for closing the touchscreen’s input device file

SYNOPSIS

#include <tslib.h>

"void(*ts_close_restricted)(intfd,void*user_data);

DESCRIPTION

ts_close_restricted() is useful if libts should not be run as root. If such a function is implemented by the user and assigned to the ts_close_restricted pointer, it will be called by ts_close() instead of the close() system call directly.

It should obviously close the device with file descriptor fd while user_data is currently unused.

SEE ALSO

ts_open_restricted(3), ts_open(3), ts_setup(3), ts_close(3), ts.conf(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

120 - Linux cli command xdrmem_create

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdrmem_create and provides detailed information about the command xdrmem_create, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdrmem_create.

NAME 🖥️ xdrmem_create 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

121 - Linux cli command zip_file_extra_fields_count_by_id

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_file_extra_fields_count_by_id and provides detailed information about the command zip_file_extra_fields_count_by_id, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_file_extra_fields_count_by_id.

libzip (-lzip)

The

function counts the extra fields for the file at position

in the zip archive.

The following

are supported:

Count extra fields from the archive’s central directory.

Count extra fields from the local file headers.

Count the original unchanged extra fields, ignoring any changes made.

The

function counts the extra fields with ID (two-byte signature)

The other arguments are the same as for

Extra fields that are the same in the central directory and the local file header are merged into one. Therefore, the counts with

and

do not need to add up to the same value as when given

at the same time.

Upon successful completion, the requested number of extra fields is returned. Otherwise, -1 is returned and the error code in

is set to indicate the error.

and

fail if:

is not a valid file index in

and

were added in libzip 0.11.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

122 - Linux cli command XtDispatchEvent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtDispatchEvent and provides detailed information about the command XtDispatchEvent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtDispatchEvent.

NAME 🖥️ XtDispatchEvent 🖥️

query and process events and input

SYNTAX

#include <X11/Intrinsic.h>

void XtAppNextEvent(XtAppContext app_context, XEvent *event_return);

Boolean XtAppPeekEvent(XtAppContext app_context, XEvent *event_return);

XtInputMask XtAppPending(XtAppContext app_context);

void XtAppProcessEvent(XtAppContext app_context, XtInputMask mask);

Boolean XtDispatchEvent(XEvent *event);

void XtAppMainLoop(XtAppContext app_context);

ARGUMENTS

app_context
Specifies the application context that identifies the application.

event
Specifies a pointer to the event structure that is to be dispatched to the appropriate event handler.

event_return
Returns the event information to the specified event structure.

mask
Specifies what types of events to process. The mask is the bitwise inclusive OR of any combination of XtIMXEvent, XtIMTimer, XtIMAlternateInput, and XtIMSignal. As a convenience, the X Toolkit defines the symbolic name XtIMAll to be the bitwise inclusive OR of all event types.

DESCRIPTION

If the X event queue is empty, XtAppNextEvent flushes the X output buffers of each Display in the application context and waits for an event while looking at the other input sources, timeout timeout values, and signal handlers and calling any callback procedures triggered by them. This wait time can be used for background processing (see Section 7.8).

If there is an event in the queue, XtAppPeekEvent fills in the event and returns a nonzero value. If no X input is on the queue, XtAppPeekEvent flushes the output buffer and blocks until input is available (possibly calling some timeout callbacks in the process). If the input is an event, XtAppPeekEvent fills in the event and returns a nonzero value. Otherwise, the input is for an alternate input source, and XtAppPeekEvent returns zero.

The XtAppPending function returns a nonzero value if there are events pending from the X server, timer pending, or other input sources pending. The value returned is a bit mask that is the OR of XtIMXEvent, XtIMTimer, XtIMAlternateInput, and XtIMSignal (see XtAppProcessEvent). If there are no events pending, XtAppPending flushes the output buffer and returns zero.

The XtAppProcessEvent function processes one timer, alternate input, signal source, or X event. If there is nothing of the appropriate type to process, XtAppProcessEvent blocks until there is. If there is more than one type of thing available to process, it is undefined which will get processed. Usually, this procedure is not called by client applications (see XtAppMainLoop). XtAppProcessEvent processes timer events by calling any appropriate timer callbacks, alternate input by calling any appropriate alternate input callbacks, signal source by calling any appropriate signal callbacks, and X events by calling XtDispatchEvent.

When an X event is received, it is passed to XtDispatchEvent, which calls the appropriate event handlers and passes them the widget, the event, and client-specific data registered with each procedure. If there are no handlers for that event registered, the event is ignored and the dispatcher simply returns. The order in which the handlers are called is undefined.

The XtDispatchEvent function sends those events to the event handler functions that have been previously registered with the dispatch routine. XtDispatchEvent returns True if it dispatched the event to some handler and False if it found no handler to dispatch the event to. The most common use of XtDispatchEvent is to dispatch events acquired with the XtAppNextEvent procedure. However, it also can be used to dispatch user-constructed events. XtDispatchEvent also is responsible for implementing the grab semantics for XtAddGrab.

The XtAppMainLoop function processes events using XtAppProcessEvent, varying the mask parameter and using XtAppPending to ensure that it has a chance to handle events of all types, i.e., X events, timer events, input events and signal sources. This constitutes the main loop of X Toolkit applications, and, as such, it does not return unless XtAppSetExitFlag is called. Applications are expected to exit in response to some user action. There is nothing special about XtAppMainLoop; it is simply an loop that processes events until XtAppGetExitFlag() returns true.

Applications can provide their own version of this loop, which tests some global termination flag or tests that the number of top-level widgets is larger than zero before circling back for the next event.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

123 - Linux cli command gid_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gid_ttype and provides detailed information about the command gid_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gid_ttype.

NAME 🖥️ gid_ttype 🖥️

process/user/group identifier

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/types.h>
typedef /* ... */ pid_t;
typedef /* ... */ uid_t;
typedef /* ... */ gid_t;
typedef /* ... */ id_t;

DESCRIPTION

pid_t is a type used for storing process IDs, process group IDs, and session IDs. It is a signed integer type.

uid_t is a type used to hold user IDs. It is an integer type.

gid_t is a type used to hold group IDs. It is an integer type.

id_t is a type used to hold a general identifier. It is an integer type that can be used to contain a pid_t, uid_t, or gid_t.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

The following headers also provide pid_t: <fcntl.h>, <sched.h>, <signal.h>, <spawn.h>, <sys/msg.h>, <sys/sem.h>, <sys/shm.h>, <sys/wait.h>, <termios.h>, <time.h>, <unistd.h>, and <utmpx.h>.

The following headers also provide uid_t: <pwd.h>, <signal.h>, <stropts.h>, <sys/ipc.h>, <sys/stat.h>, and <unistd.h>.

The following headers also provide gid_t: <grp.h>, <pwd.h>, <signal.h>, <stropts.h>, <sys/ipc.h>, <sys/stat.h>, and <unistd.h>.

The following header also provides id_t: <sys/resource.h>.

SEE ALSO

chown(2), fork(2), getegid(2), geteuid(2), getgid(2), getgroups(2), getpgid(2), getpid(2), getppid(2), getpriority(2), getpwnam(3), getresgid(2), getresuid(2), getsid(2), gettid(2), getuid(2), kill(2), pidfd_open(2), sched_setscheduler(2), waitid(2), getgrnam(3), sigqueue(3), credentials(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

124 - Linux cli command Net_DNS_RR_CDSpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_CDSpm and provides detailed information about the command Net_DNS_RR_CDSpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_CDSpm.

NAME 🖥️ Net_DNS_RR_CDSpm 🖥️

DNS CDS resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name CDS keytag algorithm digtype digest);

DESCRIPTION

DNS Child DS resource record

This is a clone of the DS record and inherits all properties of the Net::DNS::RR::DS class.

Please see the Net::DNS::RR::DS perl documentation for details.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

COPYRIGHT

Copyright (c)2014,2017 Dick Franks

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR Net::DNS::RR::DS RFC7344 <https://tools.ietf.org/html/rfc7344>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

125 - Linux cli command Regexp_Common_URI_RFC2396pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_URI_RFC2396pm and provides detailed information about the command Regexp_Common_URI_RFC2396pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_URI_RFC2396pm.

NAME 🖥️ Regexp_Common_URI_RFC2396pm 🖥️

  • Definitions from RFC2396;

SYNOPSIS

use Regexp::Common::URI::RFC2396 qw /:ALL/;

DESCRIPTION

This package exports definitions from RFC2396. It’s intended usage is for Regexp::Common::URI submodules only. Its interface might change without notice.

REFERENCES

[RFC 2396]
Berners-Lee, Tim, Fielding, R., and Masinter, L.: Uniform Resource Identifiers (URI): Generic Syntax. August 1998.

AUTHOR

Damian Conway ([email protected])

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

126 - Linux cli command ts_get_eventpath

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ts_get_eventpath and provides detailed information about the command ts_get_eventpath, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ts_get_eventpath.

NAME 🖥️ ts_get_eventpath 🖥️

get the path to the currently opened touchscreen device file

SYNOPSIS

#include <tslib.h>

char *ts_get_eventpath(struct tsdev *tsdev);

DESCRIPTION

ts_get_eventpath() This function returns the path to the touchscreen device file that was opened with ts_open(). In case ts_setup() is used instead of ts_open() directly, it is often not known to the application in advance.

RETURN VALUE

This function returns the path to the touchscreen device file that was opened with ts_open(). It returns NULL in case of failure.

SEE ALSO

ts_setup(3), ts_read(3), ts.conf(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

127 - Linux cli command zip_error_clear

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_error_clear and provides detailed information about the command zip_error_clear, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_error_clear.

libzip (-lzip)

The

function clears the error state for the zip archive

The

function does the same for the zip file

and

were added in libzip 0.8.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

128 - Linux cli command pthread_atfork

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_atfork and provides detailed information about the command pthread_atfork, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_atfork.

NAME 🖥️ pthread_atfork 🖥️

register fork handlers

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_atfork(void (*prepare)(void), void (*parent)(void),
 void (*child)(void));

DESCRIPTION

The pthread_atfork() function registers fork handlers that are to be executed when fork(2) is called by any thread in a process. The handlers are executed in the context of the thread that calls fork(2).

Three kinds of handler can be registered:

  • prepare specifies a handler that is executed in the parent process before fork(2) processing starts.

  • parent specifies a handler that is executed in the parent process after fork(2) processing completes.

  • child specifies a handler that is executed in the child process after fork(2) processing completes.

Any of the three arguments may be NULL if no handler is needed in the corresponding phase of fork(2) processing.

RETURN VALUE

On success, pthread_atfork() returns zero. On error, it returns an error number. pthread_atfork() may be called multiple times by a process to register additional handlers. The handlers for each phase are called in a specified order: the prepare handlers are called in reverse order of registration; the parent and child handlers are called in the order of registration.

ERRORS

ENOMEM
Could not allocate memory to record the fork handler list entry.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

When fork(2) is called in a multithreaded process, only the calling thread is duplicated in the child process. The original intention of pthread_atfork() was to allow the child process to be returned to a consistent state. For example, at the time of the call to fork(2), other threads may have locked mutexes that are visible in the user-space memory duplicated in the child. Such mutexes would never be unlocked, since the threads that placed the locks are not duplicated in the child. The intent of pthread_atfork() was to provide a mechanism whereby the application (or a library) could ensure that mutexes and other process and thread state would be restored to a consistent state. In practice, this task is generally too difficult to be practicable.

After a fork(2) in a multithreaded process returns in the child, the child should call only async-signal-safe functions (see signal-safety(7)) until such time as it calls execve(2) to execute a new program.

POSIX.1 specifies that pthread_atfork() shall not fail with the error EINTR.

SEE ALSO

fork(2), atexit(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

129 - Linux cli command XtDatabase

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtDatabase and provides detailed information about the command XtDatabase, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtDatabase.

NAME 🖥️ XtDatabase 🖥️

initialize, open, or close a display

SYNTAX

#include <X11/Intrinsic.h>

void XtDisplayInitialize(XtAppContext app_context, Display *display, const char *application_name, const char *application_class, XrmOptionDescRec *options, Cardinal num_options, int *argc, char **argv);

Display *XtOpenDisplay(XtAppContext app_context, const char *display_string, const char *application_name, const char *application_class, XrmOptionDescRec *options, Cardinal num_options, int *argc, char **argv);

void XtCloseDisplay(Display *display);

XrmDatabase XtDatabase(Display *display);

XrmDatabase XtScreenDatabase(Screen* screen);

ARGUMENTS

argc
Specifies a pointer to the number of command line parameters.

argv
Specifies the command line parameters.

app_context
Specifies the application context.

application_class
Specifies the class name of this application, which usually is the generic name for all instances of this application.

application_name
Specifies the name of the application instance.

display
Specifies the display. Note that a display can be in at most one application context.

num_options
Specifies the number of entries in the options list.

options
Specifies how to parse the command line for any application-specific resources. The options argument is passed as a parameter to XrmParseCommand. For further information, see Xlib - C Language X Interface.

screen
Specifies the screen whose resource database is to be returned.

DESCRIPTION

The XtDisplayInitialize function builds the resource database, calls the Xlib XrmParseCommand function to parse the command line, and performs other per display initialization. After XrmParseCommand has been called, argc and argv contain only those parameters that were not in the standard option table or in the table specified by the options argument. If the modified argc is not zero, most applications simply print out the modified argv along with a message listing the allowable options. On UNIX-based systems, the application name is usually the final component of argv[0]. If the synchronize resource is True for the specified application, XtDisplayInitialize calls the Xlib XSynchronize function to put Xlib into synchronous mode for this display connection. If the reverseVideo resource is True, the Intrinsics exchange XtDefaultForeground and XtDefaultBackground for widgets created on this display. (See Section 9.6.1).

The XtOpenDisplay function calls XOpenDisplay the specified display name. If display_string is NULL, XtOpenDisplay uses the current value of the -display option specified in argv and if no display is specified in argv, uses the user’s default display (on UNIX-based systems, this is the value of the DISPLAY environment variable).

If this succeeds, it then calls XtDisplayInitialize and pass it the opened display and the value of the -name option specified in argv as the application name. If no name option is specified, it uses the application name passed to XtOpenDisplay. If the application name is NULL, it uses the last component of argv[0]. XtOpenDisplay returns the newly opened display or NULL if it failed.

XtOpenDisplay is provided as a convenience to the application programmer.

The XtCloseDisplay function closes the specified display as soon as it is safe to do so. If called from within an event dispatch (for example, a callback procedure), XtCloseDisplay does not close the display until the dispatch is complete. Note that applications need only call XtCloseDisplay if they are to continue executing after closing the display; otherwise, they should call XtDestroyApplicationContext or just exit.

The XtDatabase function returns the fully merged resource database that was built by XtDisplayInitialize associated with the display that was passed in. If this display has not been initialized by XtDisplayInitialize, the results are not defined.

The XtScreenDatabase function returns the fully merged resource database associated with the specified screen. If the screen does not belong to a Display initialized by XtDisplayInitialize, the results are undefined.

SEE ALSO

XtAppCreateShell(3), XtCreateApplicationContext(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

130 - Linux cli command strfromf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strfromf and provides detailed information about the command strfromf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strfromf.

NAME 🖥️ strfromf 🖥️

convert a floating-point value into a string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int strfromd(char str[restrict .n], size_t n,
 const char *restrict format, double fp);
int strfromf(char str[restrict .n], size_t n,
 const char *restrict format, float fp);
int strfroml(char str[restrict .n], size_t n,
 const char *restrict format, long double fp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strfromd(), strfromf(), strfroml():

    __STDC_WANT_IEC_60559_BFP_EXT__

DESCRIPTION

These functions convert a floating-point value, fp, into a string of characters, str, with a configurable format string. At most n characters are stored into str.

The terminating null byte (‘�’) is written if and only if n is sufficiently large, otherwise the written string is truncated at n characters.

The strfromd(), strfromf(), and strfroml() functions are equivalent to

snprintf(str, n, format, fp);

except for the format string.

Format of the format string

The format string must start with the character ‘%’. This is followed by an optional precision which starts with the period character (.), followed by an optional decimal integer. If no integer is specified after the period character, a precision of zero is used. Finally, the format string should have one of the conversion specifiers a, A, e, E, f, F, g, or G.

The conversion specifier is applied based on the floating-point type indicated by the function suffix. Therefore, unlike snprintf(), the format string does not have a length modifier character. See snprintf(3) for a detailed description of these conversion specifiers.

The implementation conforms to the C99 standard on conversion of NaN and infinity values:

If fp is a NaN, +NaN, or -NaN, and f (or a, e, g) is the conversion specifier, the conversion is to “nan”, “nan”, or “-nan”, respectively. If F (or A, E, G) is the conversion specifier, the conversion is to “NAN” or “-NAN”.

Likewise if fp is infinity, it is converted to [-]inf or [-]INF.

A malformed format string results in undefined behavior.

RETURN VALUE

The strfromd(), strfromf(), and strfroml() functions return the number of characters that would have been written in str if n had enough space, not counting the terminating null byte. Thus, a return value of n or greater means that the output was truncated.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7) and the POSIX Safety Concepts section in GNU C Library manual.

InterfaceAttributeValue

strfromd(), strfromf(), strfroml()

Thread safetyMT-Safe locale
Async-signal safetyAS-Unsafe heap
Async-cancel safetyAC-Unsafe mem

Note: these attributes are preliminary.

STANDARDS

ISO/IEC TS 18661-1.

VERSIONS

strfromd()
strfromf()
strfroml()
glibc 2.25.

NOTES

These functions take account of the LC_NUMERIC category of the current locale.

EXAMPLES

To convert the value 12.1 as a float type to a string using decimal notation, resulting in “12.100000”:

#define __STDC_WANT_IEC_60559_BFP_EXT__
#include <stdlib.h>
int ssize = 10;
char s[ssize];
strfromf(s, ssize, "%f", 12.1);

To convert the value 12.3456 as a float type to a string using decimal notation with two digits of precision, resulting in “12.35”:

#define __STDC_WANT_IEC_60559_BFP_EXT__
#include <stdlib.h>
int ssize = 10;
char s[ssize];
strfromf(s, ssize, "%.2f", 12.3456);

To convert the value 12.345e19 as a double type to a string using scientific notation with zero digits of precision, resulting in “1E+20”:

#define __STDC_WANT_IEC_60559_BFP_EXT__
#include <stdlib.h>
int ssize = 10;
char s[ssize];
strfromd(s, ssize, "%.E", 12.345e19);

SEE ALSO

atof(3), snprintf(3), strtod(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

131 - Linux cli command getrpcport

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getrpcport and provides detailed information about the command getrpcport, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getrpcport.

NAME 🖥️ getrpcport 🖥️

get RPC port number

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <rpc/rpc.h>
int getrpcport(const char *host, unsigned long prognum,
 unsigned long versnum, unsigned int proto);

DESCRIPTION

getrpcport() returns the port number for version versnum of the RPC program prognum running on host and using protocol proto. It returns 0 if it cannot contact the portmapper, or if prognum is not registered. If prognum is registered but not with version versnum, it will still return a port number (for some version of the program) indicating that the program is indeed registered. The version mismatch will be detected upon the first call to the service.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getrpcport()

Thread safetyMT-Safe env locale

STANDARDS

BSD.

HISTORY

BSD, Solaris.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

132 - Linux cli command pcap_set_buffer_sizepcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_set_buffer_sizepcap and provides detailed information about the command pcap_set_buffer_sizepcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_set_buffer_sizepcap.

NAME 🖥️ pcap_set_buffer_sizepcap 🖥️

set the buffer size for a not-yet-activated capture handle

SYNOPSIS

#include <pcap/pcap.h>
int pcap_set_buffer_size(pcap_t *p, int buffer_size);

DESCRIPTION

pcap_set_buffer_size() sets the buffer size that will be used on a capture handle when the handle is activated to buffer_size, which is in units of bytes.

RETURN VALUE

pcap_set_buffer_size() returns 0 on success or PCAP_ERROR_ACTIVATED if called on a capture handle that has been activated.

SEE ALSO

pcap(3PCAP), pcap_create(3PCAP), pcap_activate(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

133 - Linux cli command Net_RawIP_libpcappm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_RawIP_libpcappm and provides detailed information about the command Net_RawIP_libpcappm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_RawIP_libpcappm.

NAME 🖥️ Net_RawIP_libpcappm 🖥️

An interface to libpcap in Net::RawIP(3pm)

DESCRIPTION

Function The input parameters The output parameters open_live a network Return value is a pcap_t* device(eth0,ppp0,…); If retval less than zero a snap length; then $err filled with a promisc - boolean; an error string. a timeout in sec; $err is an undef scalar; open_offline a filename which is filled Return value is pcap_t* with a raw output of dump; If retval less than zero $err is an unfef scalar; then $err filled with an error string. dump_open pcap_t*; Return value is a FILE* $err; lookupdev $err; Return value is a name of first device which is found by libpcap lookupnet a network device; a netnumber; a netnumer is undef; a netmask; a netmask is undef; If retval less than zero $err is undef; then $err filled with an error string. dispatch a scalar with pcap_t*; No output parameters. number of packets for proce- ssing; reference to the perl call- back,this callback will be called with 3 parameters: $_[0] is fourth parameter from dispatch, $_[1] is a scalar with struc- ture pcap_pkthdr for a current packet, $_[2] is a scalar with a current packet; fourth parameter could be an array or a hash reference or a pointer (FILE*) returned by dump_open,it can be unre- ferenced in the perl call- back or be used as a perl filehandle in that callback. loop As for dispatch. As for dispatch. dump As for a perl callback No output. but $_[0] must be a pointer (FILE*) only. compile a scalar with pcap_t*; a scalar with bpf_program. a bpf_program is undef; If retval is less than zero a scalar with filter string; then there was a problem with a boolean value (optimize or filter grammar. not); a scalar with netmask; setfilter a scalar with pcap_t*; If retval is less than zero a scalar with bpf_program then there was a problem while returned by compile. settting filter. next a scalar with pcap_t*; A scalar with next packet; a scalar with with struc- a scalar with with structure ture pcap_pkthdr for a current pcap_pkthdr also will be modi packet,originally is undef. filed for an every packet and it can be accessed but for read only. datalink a scalar with pcap_t*; Retval is the link layer type, e.g. DLT_EN10MB. snapshot a scalar with pcap_t*; Retval is the snapshot length specified when open_live was called. is_swapped a scalar with pcap_t*; returns true if the current savefile uses a different byte order than the current system. major_version a scalar with pcap_t*; returns the major number of the version of the pcap used to write the savefile. minor_version a scalar with pcap_t*; returns the minor number of the version of the pcap used to write the savefile. file a scalar with pcap_t*; returns the name of the savefile. stats a scalar with pcap_t*; If retval 0 then a scalar a scalar with structure with structure pcap_stat will pcap_stat,originally undef be filled with the packet statistics. fileno a scalar with pcap_t*; returns the file descriptor number of the savefile. A core perl function is available as CORE::fileno. geterr a scalar with pcap_t*; returns the error text pertaining to the last pcap library error. perror a scalar with pcap_t*; prints the text of the last a scalar with prefix; pcap library error on stderr, prefixed by prefix. close a scalar with pcap_t*; closes the files associated with pcap_t* and deallocates resources. A core perl function is available as CORE::close. dump_close a scalar with pcap_t*; closes the savefile.

AUTHOR

Sergey Kolychev <[email protected]>

SEE ALSO

Net::RawIP (3pm),pcap (3).

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

134 - Linux cli command strtoq

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strtoq and provides detailed information about the command strtoq, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strtoq.

NAME 🖥️ strtoq 🖥️

convert a string to a long integer

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
long strtol(const char *restrict nptr,
 char **restrict endptr, int base);
long long strtoll(const char *restrict nptr,
 char **restrict endptr, int base);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strtoll():

    _ISOC99_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The strtol() function converts the initial part of the string in nptr to a long integer value according to the given base, which must be between 2 and 36 inclusive, or be the special value 0.

The string may begin with an arbitrary amount of white space (as determined by isspace(3)) followed by a single optional ‘+’ or ‘-’ sign. If base is zero or 16, the string may then include a “0x” or “0X” prefix, and the number will be read in base 16; otherwise, a zero base is taken as 10 (decimal) unless the next character is ‘0’, in which case it is taken as 8 (octal).

The remainder of the string is converted to a long value in the obvious manner, stopping at the first character which is not a valid digit in the given base. (In bases above 10, the letter ‘A’ in either uppercase or lowercase represents 10, ‘B’ represents 11, and so forth, with ‘Z’ representing 35.)

If endptr is not NULL, and the base is supported, strtol() stores the address of the first invalid character in *endptr. If there were no digits at all, strtol() stores the original value of nptr in *endptr (and returns 0). In particular, if *nptr is not ‘�’ but **endptr is ‘�’ on return, the entire string is valid.

The strtoll() function works just like the strtol() function but returns a long long integer value.

RETURN VALUE

The strtol() function returns the result of the conversion, unless the value would underflow or overflow. If an underflow occurs, strtol() returns LONG_MIN. If an overflow occurs, strtol() returns LONG_MAX. In both cases, errno is set to ERANGE. Precisely the same holds for strtoll() (with LLONG_MIN and LLONG_MAX instead of LONG_MIN and LONG_MAX).

ERRORS

This function does not modify errno on success.

EINVAL
(not in C99) The given base contains an unsupported value.

ERANGE
The resulting value was out of range.

The implementation may also set errno to EINVAL in case no conversion was performed (no digits seen, and 0 returned).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strtol(), strtoll(), strtoq()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

strtol()
POSIX.1-2001, C89, SVr4, 4.3BSD.

strtoll()
POSIX.1-2001, C99.

NOTES

Since strtol() can legitimately return 0, LONG_MAX, or LONG_MIN (LLONG_MAX or LLONG_MIN for strtoll()) on both success and failure, the calling program should set errno to 0 before the call, and then determine if an error occurred by checking whether errno == ERANGE after the call.

According to POSIX.1, in locales other than “C” and “POSIX”, these functions may accept other, implementation-defined numeric strings.

BSD also has

quad_t strtoq(const char *nptr, char **endptr, int base);

with completely analogous definition. Depending on the wordsize of the current architecture, this may be equivalent to strtoll() or to strtol().

CAVEATS

If the base needs to be tested, it should be tested in a call where the string is known to succeed. Otherwise, it’s impossible to portably differentiate the errors.

errno = 0;
strtol("0", NULL, base);
if (errno == EINVAL)
    goto unsupported_base;

EXAMPLES

The program shown below demonstrates the use of strtol(). The first command-line argument specifies a string from which strtol() should parse a number. The second (optional) argument specifies the base to be used for the conversion. (This argument is converted to numeric form using atoi(3), a function that performs no error checking and has a simpler interface than strtol().) Some examples of the results produced by this program are the following:

$ ./a.out 123
strtol() returned 123
$ ./a.out ' 123'
strtol() returned 123
$ ./a.out 123abc
strtol() returned 123
Further characters after number: "abc"
$ ./a.out 123abc 55
strtol: Invalid argument
$ ./a.out ''
No digits were found
$ ./a.out 4000000000
strtol: Numerical result out of range

Program source

#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
    int base;
    char *endptr, *str;
    long val;
    if (argc < 2) {
        fprintf(stderr, "Usage: %s str [base]

“, argv[0]); exit(EXIT_FAILURE); } str = argv[1]; base = (argc > 2) ? atoi(argv[2]) : 0; errno = 0; /* To distinguish success/failure after call / strtol(“0”, NULL, base); if (errno == EINVAL) { perror(“strtol”); exit(EXIT_FAILURE); } errno = 0; / To distinguish success/failure after call / val = strtol(str, &endptr, base); / Check for various possible errors. / if (errno == ERANGE) { perror(“strtol”); exit(EXIT_FAILURE); } if (endptr == str) { fprintf(stderr, “No digits were found “); exit(EXIT_FAILURE); } / If we got here, strtol() successfully parsed a number. */ printf(“strtol() returned %ld “, val); if (endptr != ‘�’) / Not necessarily an error… */ printf(“Further characters after number: "%s" “, endptr); exit(EXIT_SUCCESS); }

SEE ALSO

atof(3), atoi(3), atol(3), strtod(3), strtoimax(3), strtoul(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

135 - Linux cli command HTML_TreeBuilderpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_TreeBuilderpm and provides detailed information about the command HTML_TreeBuilderpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_TreeBuilderpm.

NAME 🖥️ HTML_TreeBuilderpm 🖥️

Parser that builds a HTML syntax tree

VERSION

This document describes version 5.07 of HTML::TreeBuilder, released August 31, 2017 as part of HTML-Tree.

SYNOPSIS

use HTML::TreeBuilder 5 -weak; # Ensure weak references in use foreach my $file_name (@ARGV) { my $tree = HTML::TreeBuilder->new; # empty tree $tree->parse_file($file_name); print “Hey, heres a dump of the parse tree of $file_name: “; $tree->dump; # a method we inherit from HTML::Element print “And here it is, bizarrely rerendered as HTML: “, $tree->as_HTML, " “; # Now that were done with it, we must destroy it. # $tree = $tree->delete; # Not required with weak references }

DESCRIPTION

(This class is part of the HTML::Tree dist.)

This class is for HTML syntax trees that get built out of HTML source. The way to use it is to:

1. start a new (empty) HTML::TreeBuilder object,

2. then use one of the methods from HTML::Parser (presumably with $tree->parse_file($filename) for files, or with $tree->parse($document_content) and $tree->eof if you’ve got the content in a string) to parse the HTML document into the tree $tree.

(You can combine steps 1 and 2 with the new_from_file or new_from_content methods.)

2b. call $root->elementify() if you want.

3. do whatever you need to do with the syntax tree, presumably involving traversing it looking for some bit of information in it,

4. previous versions of HTML::TreeBuilder required you to call $tree->delete() to erase the contents of the tree from memory when you’re done with the tree. This is not normally required anymore. See Weak References in HTML::Element for details.

ATTRIBUTES

Most of the following attributes native to HTML::TreeBuilder control how parsing takes place; they should be set before you try parsing into the given object. You can set the attributes by passing a TRUE or FALSE value as argument. E.g., $root->implicit_tags returns the current setting for the implicit_tags option, $root->implicit_tags(1) turns that option on, and $root->implicit_tags(0) turns it off.

implicit_tags

Setting this attribute to true will instruct the parser to try to deduce implicit elements and implicit end tags. If it is false you get a parse tree that just reflects the text as it stands, which is unlikely to be useful for anything but quick and dirty parsing. (In fact, I’d be curious to hear from anyone who finds it useful to have implicit_tags set to false.) Default is true.

Implicit elements have the implicit in HTML::Element attribute set.

implicit_body_p_tag

This controls an aspect of implicit element behavior, if implicit_tags is on: If a text element (PCDATA) or a phrasal element (such as <em>) is to be inserted under <body>, two things can happen: if implicit_body_p_tag is true, it’s placed under a new, implicit <p> tag. (Past DTDs suggested this was the only correct behavior, and this is how past versions of this module behaved.) But if implicit_body_p_tag is false, nothing is implicated Ω- the PCDATA or phrasal element is simply placed under <body>. Default is false.

no_expand_entities

This attribute controls whether entities are decoded during the initial parse of the source. Enable this if you don’t want entities decoded to their character value. e.g. ‘&’ is decoded to ‘&’ by default, but will be unchanged if this is enabled. Default is false (entities will be decoded.)

ignore_unknown

This attribute controls whether unknown tags should be represented as elements in the parse tree, or whether they should be ignored. Default is true (to ignore unknown tags.)

ignore_text

Do not represent the text content of elements. This saves space if all you want is to examine the structure of the document. Default is false.

ignore_ignorable_whitespace

If set to true, TreeBuilder will try to avoid creating ignorable whitespace text nodes in the tree. Default is true. (In fact, I’d be interested in hearing if there’s ever a case where you need this off, or where leaving it on leads to incorrect behavior.)

no_space_compacting

This determines whether TreeBuilder compacts all whitespace strings in the document (well, outside of PRE or TEXTAREA elements), or leaves them alone. Normally (default, value of 0), each string of contiguous whitespace in the document is turned into a single space. But that’s not done if no_space_compacting is set to 1.

Setting no_space_compacting to 1 might be useful if you want to read in a tree just to make some minor changes to it before writing it back out.

This method is experimental. If you use it, be sure to report any problems you might have with it.

p_strict

If set to true (and it defaults to false), TreeBuilder will take a narrower than normal view of what can be under a <p> element; if it sees a non-phrasal element about to be inserted under a <p>, it will close that <p>. Otherwise it will close <p> elements only for other <p>’s, headings, and <form> (although the latter may be removed in future versions).

For example, when going thru this snippet of code,

<p>stuff <ul>

TreeBuilder will normally (with p_strict false) put the <ul> element under the <p> element. However, with p_strict set to true, it will close the <p> first.

In theory, there should be strictness options like this for other/all elements besides just <p>; but I treat this as a special case simply because of the fact that <p> occurs so frequently and its end-tag is omitted so often; and also because application of strictness rules at parse-time across all elements often makes tiny errors in HTML coding produce drastically bad parse-trees, in my experience.

If you find that you wish you had an option like this to enforce content-models on all elements, then I suggest that what you want is content-model checking as a stage after TreeBuilder has finished parsing.

store_comments

This determines whether TreeBuilder will normally store comments found while parsing content into $root. Currently, this is off by default.

store_declarations

This determines whether TreeBuilder will normally store markup declarations found while parsing content into $root. This is on by default.

store_pis

This determines whether TreeBuilder will normally store processing instructions found while parsing content into $root Ω- assuming a recent version of HTML::Parser (old versions won’t parse PIs correctly). Currently, this is off (false) by default.

It is somewhat of a known bug (to be fixed one of these days, if anyone needs it?) that PIs in the preamble (before the <html> start-tag) end up actually under the <html> element.

warn

This determines whether syntax errors during parsing should generate warnings, emitted via Perl’s warn function.

This is off (false) by default.

METHODS

Objects of this class inherit the methods of both HTML::Parser and HTML::Element. The methods inherited from HTML::Parser are used for building the HTML tree, and the methods inherited from HTML::Element are what you use to scrutinize the tree. Besides this (HTML::TreeBuilder) documentation, you must also carefully read the HTML::Element documentation, and also skim the HTML::Parser documentation Ω- probably only its parse and parse_file methods are of interest.

new_from_file

$root = HTML::TreeBuilder->new_from_file($filename_or_filehandle);

This shortcut constructor merely combines constructing a new object (with the new method, below), and calling $new->parse_file(...) on it. Returns the new object. Note that this provides no way of setting any parse options like store_comments (for that, call new, and then set options, before calling parse_file). See the notes (below) on parameters to parse_file.

If HTML::TreeBuilder is unable to read the file, then new_from_file dies. The error can also be found in $!. (This behavior is new in HTML-Tree 5. Previous versions returned a tree with only implicit elements.)

new_from_content

$root = HTML::TreeBuilder->new_from_content(…);

This shortcut constructor merely combines constructing a new object (with the new method, below), and calling for(...){$new->parse($_)} and $new->eof on it. Returns the new object. Note that this provides no way of setting any parse options like store_comments (for that, call new, and then set options, before calling parse). Example usages: HTML::TreeBuilder->new_from_content(@lines), or HTML::TreeBuilder->new_from_content($content).

new_from_url

$root = HTML::TreeBuilder->new_from_url($url)

This shortcut constructor combines constructing a new object (with the new method, below), loading LWP::UserAgent, fetching the specified URL, and calling $new->parse( $response->decoded_content) and $new->eof on it. Returns the new object. Note that this provides no way of setting any parse options like store_comments.

If LWP is unable to fetch the URL, or the response is not HTML (as determined by content_is_html in HTTP::Headers), then new_from_url dies, and the HTTP::Response object is found in $HTML::TreeBuilder::lwp_response.

You must have installed LWP::UserAgent for this method to work. LWP is not installed automatically, because it’s a large set of modules and you might not need it.

new

$root = HTML::TreeBuilder->new();

This creates a new HTML::TreeBuilder object. This method takes no attributes.

parse_file

$root->parse_file(…)

[An important method inherited from HTML::Parser, which see. Current versions of HTML::Parser can take a filespec, or a filehandle object, like *FOO, or some object from class IO::Handle, IO::File, IO::Socket) or the like. I think you should check that a given file exists before calling $root->parse_file($filespec).]

When you pass a filename to parse_file, HTML::Parser opens it in binary mode, which means it’s interpreted as Latin-1 (ISO-8859-1). If the file is in another encoding, like UTF-8 or UTF-16, this will not do the right thing.

One solution is to open the file yourself using the proper :encoding layer, and pass the filehandle to parse_file. You can automate this process by using html_file in IO::HTML, which will use the HTML5 encoding sniffing algorithm to automatically determine the proper :encoding layer and apply it.

In the next major release of HTML-Tree, I plan to have it use IO::HTML automatically. If you really want your file opened in binary mode, you should open it yourself and pass the filehandle to parse_file.

The return value is undef if there’s an error opening the file. In that case, the error will be in $!.

parse

$root->parse(…)

[A important method inherited from HTML::Parser, which see. See the note below for $root->eof().]

eof

$root->eof();

This signals that you’re finished parsing content into this tree; this runs various kinds of crucial cleanup on the tree. This is called for you when you call $root->parse_file(...), but not when you call $root->parse(...). So if you call $root->parse(...), then you must call $root->eof() once you’ve finished feeding all the chunks to parse(...), and before you actually start doing anything else with the tree in $root.

parse_content

$root->parse_content(…);

Basically a handy alias for $root->parse(...); $root->eof. Takes the exact same arguments as $root->parse().

delete

$root->delete();

[A previously important method inherited from HTML::Element, which see.]

elementify

$root->elementify();

This changes the class of the object in $root from HTML::TreeBuilder to the class used for all the rest of the elements in that tree (generally HTML::Element). Returns $root.

For most purposes, this is unnecessary, but if you call this after (after!!) you’ve finished building a tree, then it keeps you from accidentally trying to call anything but HTML::Element methods on it. (I.e., if you accidentally call $root->parse_file(...) on the already-complete and elementified tree, then instead of charging ahead and wreaking havoc, it’ll throw a fatal error Ω- since $root is now an object just of class HTML::Element which has no parse_file method.

Note that elementify currently deletes all the private attributes of $root except for _tag, _parent, _content, _pos, and _implicit. If anyone requests that I change this to leave in yet more private attributes, I might do so, in future versions.

guts

@nodes = $root->guts(); $parent_for_nodes = $root->guts();

In list context (as in the first case), this method returns the topmost non-implicit nodes in a tree. This is useful when you’re parsing HTML code that you know doesn’t expect an HTML document, but instead just a fragment of an HTML document. For example, if you wanted the parse tree for a file consisting of just this:

<li>I like pie!

Then you would get that with @nodes = $root->guts();. It so happens that in this case, @nodes will contain just one element object, representing the <li> node (with I like pie! being its text child node). However, consider if you were parsing this:

<hr>Hooboy!<hr>

In that case, $root->guts() would return three items: an element object for the first <hr>, a text string Hooboy!, and another <hr> element object.

For cases where you want definitely one element (so you can treat it as a document fragment, roughly speaking), call guts() in scalar context, as in $parent_for_nodes = $root->guts(). That works like guts() in list context; in fact, guts() in list context would have returned exactly one value, and if it would have been an object (as opposed to a text string), then that’s what guts in scalar context will return. Otherwise, if guts() in list context would have returned no values at all, then guts() in scalar context returns undef. In all other cases, guts() in scalar context returns an implicit <div> element node, with children consisting of whatever nodes guts() in list context would have returned. Note that that may detach those nodes from $root’s tree.

disembowel

@nodes = $root->disembowel(); $parent_for_nodes = $root->disembowel();

The disembowel() method works just like the guts() method, except that disembowel definitively destroys the tree above the nodes that are returned. Usually when you want the guts from a tree, you’re just going to toss out the rest of the tree anyway, so this saves you the bother. (Remember, disembowel means remove the guts from.)

INTERNAL METHODS

You should not need to call any of the following methods directly.

element_class

$classname = $h->element_class;

This method returns the class which will be used for new elements. It defaults to HTML::Element, but can be overridden by subclassing or esoteric means best left to those will will read the source and then not complain when those esoteric means change. (Just subclass.)

comment

Accept a here’s a comment signal from HTML::Parser.

declaration

Accept a here’s a markup declaration signal from HTML::Parser.

done

TODO: document

end

Either: Accept an end-tag signal from HTML::Parser Or: Method for closing currently open elements in some fairly complex way, as used by other methods in this class.

TODO: Why is this hidden?

process

Accept a here’s a PI signal from HTML::Parser.

start

Accept a signal from HTML::Parser for start-tags.

TODO: Why is this hidden?

stunt

TODO: document

stunted

TODO: document

text

Accept a here’s a text token signal from HTML::Parser.

TODO: Why is this hidden?

tighten_up

Legacy

Redirects to delete_ignorable_whitespace in HTML::Element.

warning

Wrapper for CORE::warn

TODO: why not just use carp?

SUBROUTINES

DEBUG

Are we in Debug mode? This is a constant subroutine, to allow compile-time optimizations. To control debug mode, set $HTML::TreeBuilder::DEBUG before loading HTML::TreeBuilder.

HTML AND ITS DISCONTENTS

HTML is rather harder to parse than people who write it generally suspect.

Here’s the problem: HTML is a kind of SGML that permits minimization and implication. In short, this means that you don’t have to close every tag you open (because the opening of a subsequent tag may implicitly close it), and if you use a tag that can’t occur in the context you seem to using it in, under certain conditions the parser will be able to realize you mean to leave the current context and enter the new one, that being the only one that your code could correctly be interpreted in.

Now, this would all work flawlessly and unproblematically if: 1) all the rules that both prescribe and describe HTML were (and had been) clearly set out, and 2) everyone was aware of these rules and wrote their code in compliance to them.

However, it didn’t happen that way, and so most HTML pages are difficult if not impossible to correctly parse with nearly any set of straightforward SGML rules. That’s why the internals of HTML::TreeBuilder consist of lots and lots of special cases Ω- instead of being just a generic SGML parser with HTML DTD rules plugged in.

TRANSLATIONS?

The techniques that HTML::TreeBuilder uses to perform what I consider very robust parses on everyday code are not things that can work only in Perl. To date, the algorithms at the center of HTML::TreeBuilder have been implemented only in Perl, as far as I know; and I don’t foresee getting around to implementing them in any other language any time soon.

If, however, anyone is looking for a semester project for an applied programming class (or if they merely enjoy extra-curricular masochism), they might do well to see about choosing as a topic the implementation/adaptation of these routines to any other interesting programming language that you feel currently suffers from a lack of robust HTML-parsing. I welcome correspondence on this subject, and point out that one can learn a great deal about languages by trying to translate between them, and then comparing the result.

The HTML::TreeBuilder source may seem long and complex, but it is rather well commented, and symbol names are generally self-explanatory. (You are encouraged to read the Mozilla HTML parser source for comparison.) Some of the complexity comes from little-used features, and some of it comes from having the HTML tokenizer (HTML::Parser) being a separate module, requiring somewhat of a different interface than you’d find in a combined tokenizer and tree-builder. But most of the length of the source comes from the fact that it’s essentially a long list of special cases, with lots and lots of sanity-checking, and sanity-recovery Ω- because, as Roseanne Rosannadanna once said, “it’s always something”.

Users looking to compare several HTML parsers should look at the source for Raggett’s Tidy (<http://www.w3.org/People/Raggett/tidy/>), Mozilla (<http://www.mozilla.org/>), and possibly root around the browsers section of Yahoo to find the various open-source ones (<http://dir.yahoo.com/Computers_and_Internet/Software/Internet/World_Wide_Web/Browsers/>).

BUGS

* Framesets seem to work correctly now. Email me if you get a strange parse from a document with framesets.

* Really bad HTML code will, often as not, make for a somewhat objectionable parse tree. Regrettable, but unavoidably true.

* If you’re running with implicit_tags off (God help you!), consider that $tree->content_list probably contains the tree or grove from the parse, and not $tree itself (which will, oddly enough, be an implicit <html> element). This seems counter-intuitive and problematic; but seeing as how almost no HTML ever parses correctly with implicit_tags off, this interface oddity seems the least of your problems.

BUG REPORTS

When a document parses in a way different from how you think it should, I ask that you report this to me as a bug. The first thing you should do is copy the document, trim out as much of it as you can while still producing the bug in question, and then email me that mini-document and the code you’re using to parse it, to the HTML::Tree bug queue at <bug-html-tree at rt.cpan.org>.

Include a note as to how it parses (presumably including its $tree->dump output), and then a careful and clear explanation of where you think the parser is going astray, and how you would prefer that it work instead.

SEE ALSO

For more information about the HTML-Tree distribution: HTML::Tree.

Modules used by HTML::TreeBuilder: HTML::Parser, HTML::Element, HTML::Tagset.

For converting between XML::DOM::Node, HTML::Element, and XML::Element trees: HTML::DOMbo.

For opening a HTML file with automatic charset detection: IO::HTML.

AUTHOR

Current maintainers:

  • Christopher J. Madsen <perl AT cjmweb.net>

  • Jeff Fearn <jfearn AT cpan.org>

Original HTML-Tree author:

  • Gisle Aas

Former maintainers:

  • Sean M. Burke

  • Andy Lester

  • Pete Krawczyk <petek AT cpan.org>

You can follow or contribute to HTML-Tree’s development at <https://github.com/kentfredric/HTML-Tree>.

COPYRIGHT AND LICENSE

Copyright 1995-1998 Gisle Aas, 1999-2004 Sean M. Burke, 2005 Andy Lester, 2006 Pete Krawczyk, 2010 Jeff Fearn, 2012 Christopher J. Madsen.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The programs in this library are distributed in the hope that they will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

136 - Linux cli command XShapeQueryExtents

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XShapeQueryExtents and provides detailed information about the command XShapeQueryExtents, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XShapeQueryExtents.

NAME 🖥️ XShapeQueryExtents 🖥️

X nonrectangular shape functions

SYNTAX

#include <X11/extensions/shape.h>
Bool XShapeQueryExtension (
	Display *dpy,
	int *event_basep,
	int *error_basep);
Status XShapeQueryVersion (
	Display *dpy,
	int *major_versionp,
	int *minor_versionp);
void XShapeCombineRegion (
	Display *dpy,
	Window dest,
	int destKind,
	int xOff,
	int yOff,
	struct _XRegion *r,
	int op);
void XShapeCombineRectangles (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	XRectangle *rects,
	int n_rects,
	int op,
	int ordering);
void XShapeCombineMask (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	Pixmap src,
	int op);
void XShapeCombineShape (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	Pixmap src,
	int srcKind,
	int op);
void XShapeOffsetShape (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff);
Status XShapeQueryExtents (
	Display *dpy,
	Window window,
	int *bShaped,
	int *xbs,
	int *ybs,
	unsigned int *wbs,
	unsigned int *hbs,
	int *cShaped,
	int *xcs,
	int *ycs,
	unsigned int *wcs,
	unsigned int *hcs);
void XShapeSelectInput (
	Display *dpy,
	Window window,
	unsigned longmask);
unsigned long XShapeInputSelected (
	Display *dpy,
	Window window);
XRectangle *XShapeGetRectangles (
	Display *dpy,
	Window window,
	int kind,
	int *count,
	int *ordering);

STRUCTURES

typedef struct {
    int type;	/* of event */
    unsigned long serial;	/* # of last request processed by server */
    Bool send_event;	/* true if this came from a SendEvent request */
    Display *display;	/* Display the event was read from */
    Window window;	/* window of event */
    int kind;	/* ShapeBounding or ShapeClip */
    int x, y;	/* extents of new region */
    unsigned width, height;
    Time time;	/* server timestamp when region changed */
    Bool shaped;	/* true if the region exists */
} XShapeEvent;

DESCRIPTION

The X11 Nonrectangular Window Shape Extension adds nonrectangular windows to the X Window System.

PREDEFINED VALUES

Operations:

 ShapeSet   ShapeUnion   ShapeIntersect   ShapeSubtract   ShapeInvert 

Shape Kinds:

 ShapeBounding   ShapeClip 

Event defines:

 ShapeNotifyMask   ShapeNotify 

BUGS

This manual page needs a lot more work.

SEE ALSO

X11 Nonrectangular Window Shape Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

137 - Linux cli command pthread_join

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_join and provides detailed information about the command pthread_join, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_join.

NAME 🖥️ pthread_join 🖥️

join with a terminated thread

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_join(pthread_t thread, void **retval);

DESCRIPTION

The pthread_join() function waits for the thread specified by thread to terminate. If that thread has already terminated, then pthread_join() returns immediately. The thread specified by thread must be joinable.

If retval is not NULL, then pthread_join() copies the exit status of the target thread (i.e., the value that the target thread supplied to pthread_exit(3)) into the location pointed to by retval. If the target thread was canceled, then PTHREAD_CANCELED is placed in the location pointed to by retval.

If multiple threads simultaneously try to join with the same thread, the results are undefined. If the thread calling pthread_join() is canceled, then the target thread will remain joinable (i.e., it will not be detached).

RETURN VALUE

On success, pthread_join() returns 0; on error, it returns an error number.

ERRORS

EDEADLK
A deadlock was detected (e.g., two threads tried to join with each other); or thread specifies the calling thread.

EINVAL
thread is not a joinable thread.

EINVAL
Another thread is already waiting to join with this thread.

ESRCH
No thread with the ID thread could be found.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_join()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

After a successful call to pthread_join(), the caller is guaranteed that the target thread has terminated. The caller may then choose to do any clean-up that is required after termination of the thread (e.g., freeing memory or other resources that were allocated to the target thread).

Joining with a thread that has previously been joined results in undefined behavior.

Failure to join with a thread that is joinable (i.e., one that is not detached), produces a “zombie thread”. Avoid doing this, since each zombie thread consumes some system resources, and when enough zombie threads have accumulated, it will no longer be possible to create new threads (or processes).

There is no pthreads analog of waitpid(-1, &status, 0), that is, “join with any terminated thread”. If you believe you need this functionality, you probably need to rethink your application design.

All of the threads in a process are peers: any thread can join with any other thread in the process.

EXAMPLES

See pthread_create(3).

SEE ALSO

pthread_cancel(3), pthread_create(3), pthread_detach(3), pthread_exit(3), pthread_tryjoin_np(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

138 - Linux cli command random

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command random and provides detailed information about the command random, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the random.

NAME 🖥️ random 🖥️

random number generator

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
long random(void);
void srandom(unsigned int seed);
char *initstate(unsigned int seed, char state[.n], size_t n);
char *setstate(char *state);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

random(), srandom(), initstate(), setstate():

    _XOPEN_SOURCE >= 500
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The random() function uses a nonlinear additive feedback random number generator employing a default table of size 31 long integers to return successive pseudo-random numbers in the range from 0 to 2^31 - 1. The period of this random number generator is very large, approximately 16 * ((2^31) - 1).

The srandom() function sets its argument as the seed for a new sequence of pseudo-random integers to be returned by random(). These sequences are repeatable by calling srandom() with the same seed value. If no seed value is provided, the random() function is automatically seeded with a value of 1.

The initstate() function allows a state array state to be initialized for use by random(). The size of the state array n is used by initstate() to decide how sophisticated a random number generator it should use—the larger the state array, the better the random numbers will be. Current “optimal” values for the size of the state array n are 8, 32, 64, 128, and 256 bytes; other amounts will be rounded down to the nearest known amount. Using less than 8 bytes results in an error. seed is the seed for the initialization, which specifies a starting point for the random number sequence, and provides for restarting at the same point.

The setstate() function changes the state array used by the random() function. The state array state is used for random number generation until the next call to initstate() or setstate(). state must first have been initialized using initstate() or be the result of a previous call of setstate().

RETURN VALUE

The random() function returns a value between 0 and (2^31) - 1. The srandom() function returns no value.

The initstate() function returns a pointer to the previous state array. On failure, it returns NULL, and errno is set to indicate the error.

On success, setstate() returns a pointer to the previous state array. On failure, it returns NULL, and errno is set to indicate the error.

ERRORS

EINVAL
The state argument given to setstate() was NULL.

EINVAL
A state array of less than 8 bytes was specified to initstate().

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

random(), srandom(), initstate(), setstate()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, 4.3BSD.

NOTES

Random-number generation is a complex topic. Numerical Recipes in C: The Art of Scientific Computing (William H. Press, Brian P. Flannery, Saul A. Teukolsky, William T. Vetterling; New York: Cambridge University Press, 2007, 3rd ed.) provides an excellent discussion of practical random-number generation issues in Chapter 7 (Random Numbers).

For a more theoretical discussion which also covers many practical issues in depth, see Chapter 3 (Random Numbers) in Donald E. Knuth’s The Art of Computer Programming, volume 2 (Seminumerical Algorithms), 2nd ed.; Reading, Massachusetts: Addison-Wesley Publishing Company, 1981.

CAVEATS

The random() function should not be used in multithreaded programs where reproducible behavior is required. Use random_r(3) for that purpose.

BUGS

According to POSIX, initstate() should return NULL on error. In the glibc implementation, errno is (as specified) set on error, but the function does not return NULL.

SEE ALSO

getrandom(2), drand48(3), rand(3), random_r(3), srand(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

139 - Linux cli command tcflush

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tcflush and provides detailed information about the command tcflush, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tcflush.

NAME 🖥️ tcflush 🖥️

get and set terminal attributes, line control, get and set baud rate

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <termios.h>
#include <unistd.h>
int tcgetattr(int fd, struct termios *termios_p);
int tcsetattr(int fd, int optional_actions,
 const struct termios *termios_p);
int tcsendbreak(int fd, int duration);
int tcdrain(int fd);
int tcflush(int fd, int queue_selector);
int tcflow(int fd, int action);
void cfmakeraw(struct termios *termios_p);
speed_t cfgetispeed(const struct termios *termios_p);
speed_t cfgetospeed(const struct termios *termios_p);
int cfsetispeed(struct termios *termios_p, speed_t speed);
int cfsetospeed(struct termios *termios_p, speed_t speed);
int cfsetspeed(struct termios *termios_p, speed_t speed);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

cfsetspeed(), cfmakeraw():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The termios functions describe a general terminal interface that is provided to control asynchronous communications ports.

The termios structure

Many of the functions described here have a termios_p argument that is a pointer to a termios structure. This structure contains at least the following members:

tcflag_t c_iflag;      /* input modes */
tcflag_t c_oflag;      /* output modes */
tcflag_t c_cflag;      /* control modes */
tcflag_t c_lflag;      /* local modes */
cc_t     c_cc[NCCS];   /* special characters */

The values that may be assigned to these fields are described below. In the case of the first four bit-mask fields, the definitions of some of the associated flags that may be set are exposed only if a specific feature test macro (see feature_test_macros(7)) is defined, as noted in brackets ("[]").

In the descriptions below, “not in POSIX” means that the value is not specified in POSIX.1-2001, and “XSI” means that the value is specified in POSIX.1-2001 as part of the XSI extension.

c_iflag flag constants:

IGNBRK
Ignore BREAK condition on input.

BRKINT
If IGNBRK is set, a BREAK is ignored. If it is not set but BRKINT is set, then a BREAK causes the input and output queues to be flushed, and if the terminal is the controlling terminal of a foreground process group, it will cause a SIGINT to be sent to this foreground process group. When neither IGNBRK nor BRKINT are set, a BREAK reads as a null byte (‘�’), except when PARMRK is set, in which case it reads as the sequence \377 � �.

IGNPAR
Ignore framing errors and parity errors.

PARMRK
If this bit is set, input bytes with parity or framing errors are marked when passed to the program. This bit is meaningful only when INPCK is set and IGNPAR is not set. The way erroneous bytes are marked is with two preceding bytes, \377 and �. Thus, the program actually reads three bytes for one erroneous byte received from the terminal. If a valid byte has the value \377, and ISTRIP (see below) is not set, the program might confuse it with the prefix that marks a parity error. Therefore, a valid byte \377 is passed to the program as two bytes, \377 \377, in this case.

If neither IGNPAR nor PARMRK is set, read a character with a parity error or framing error as �.

INPCK
Enable input parity checking.

ISTRIP
Strip off eighth bit.

INLCR
Translate NL to CR on input.

IGNCR
Ignore carriage return on input.

ICRNL
Translate carriage return to newline on input (unless IGNCR is set).

IUCLC
(not in POSIX) Map uppercase characters to lowercase on input.

IXON
Enable XON/XOFF flow control on output.

IXANY
(XSI) Typing any character will restart stopped output. (The default is to allow just the START character to restart output.)

IXOFF
Enable XON/XOFF flow control on input.

IMAXBEL
(not in POSIX) Ring bell when input queue is full. Linux does not implement this bit, and acts as if it is always set.

IUTF8 (since Linux 2.6.4)
(not in POSIX) Input is UTF8; this allows character-erase to be correctly performed in cooked mode.

c_oflag flag constants:

OPOST
Enable implementation-defined output processing.

OLCUC
(not in POSIX) Map lowercase characters to uppercase on output.

ONLCR
(XSI) Map NL to CR-NL on output.

OCRNL
Map CR to NL on output.

ONOCR
Don’t output CR at column 0.

ONLRET
The NL character is assumed to do the carriage-return function; the kernel’s idea of the current column is set to 0 after both NL and CR.

OFILL
Send fill characters for a delay, rather than using a timed delay.

OFDEL
Fill character is ASCII DEL (0177). If unset, fill character is ASCII NUL (‘�’). (Not implemented on Linux.)

NLDLY
Newline delay mask. Values are NL0 and NL1. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

CRDLY
Carriage return delay mask. Values are CR0, CR1, CR2, or CR3. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

TABDLY
Horizontal tab delay mask. Values are TAB0, TAB1, TAB2, TAB3 (or XTABS, but see the BUGS section). A value of TAB3, that is, XTABS, expands tabs to spaces (with tab stops every eight columns). [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

BSDLY
Backspace delay mask. Values are BS0 or BS1. (Has never been implemented.) [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

VTDLY
Vertical tab delay mask. Values are VT0 or VT1.

FFDLY
Form feed delay mask. Values are FF0 or FF1. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

c_cflag flag constants:

CBAUD
(not in POSIX) Baud speed mask (4+1 bits). [requires _BSD_SOURCE or _SVID_SOURCE]

CBAUDEX
(not in POSIX) Extra baud speed mask (1 bit), included in CBAUD. [requires _BSD_SOURCE or _SVID_SOURCE]

(POSIX says that the baud speed is stored in the termios structure without specifying where precisely, and provides cfgetispeed() and cfsetispeed() for getting at it. Some systems use bits selected by CBAUD in c_cflag, other systems use separate fields, for example, sg_ispeed and sg_ospeed.)

CSIZE
Character size mask. Values are CS5, CS6, CS7, or CS8.

CSTOPB
Set two stop bits, rather than one.

CREAD
Enable receiver.

PARENB
Enable parity generation on output and parity checking for input.

PARODD
If set, then parity for input and output is odd; otherwise even parity is used.

HUPCL
Lower modem control lines after last process closes the device (hang up).

CLOCAL
Ignore modem control lines.

LOBLK
(not in POSIX) Block output from a noncurrent shell layer. For use by shl (shell layers). (Not implemented on Linux.)

CIBAUD
(not in POSIX) Mask for input speeds. The values for the CIBAUD bits are the same as the values for the CBAUD bits, shifted left IBSHIFT bits. [requires _BSD_SOURCE or _SVID_SOURCE] (Not implemented in glibc, supported on Linux via TCGET* and TCSET* ioctls; see ioctl_tty(2))

CMSPAR
(not in POSIX) Use “stick” (mark/space) parity (supported on certain serial devices): if PARODD is set, the parity bit is always 1; if PARODD is not set, then the parity bit is always 0. [requires _BSD_SOURCE or _SVID_SOURCE]

CRTSCTS
(not in POSIX) Enable RTS/CTS (hardware) flow control. [requires _BSD_SOURCE or _SVID_SOURCE]

c_lflag flag constants:

ISIG
When any of the characters INTR, QUIT, SUSP, or DSUSP are received, generate the corresponding signal.

ICANON
Enable canonical mode (described below).

XCASE
(not in POSIX; not supported under Linux) If ICANON is also set, terminal is uppercase only. Input is converted to lowercase, except for characters preceded by \ On output, uppercase characters are preceded by \ and lowercase characters are converted to uppercase. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

ECHO
Echo input characters.

ECHOE
If ICANON is also set, the ERASE character erases the preceding input character, and WERASE erases the preceding word.

ECHOK
If ICANON is also set, the KILL character erases the current line.

ECHONL
If ICANON is also set, echo the NL character even if ECHO is not set.

ECHOCTL
(not in POSIX) If ECHO is also set, terminal special characters other than TAB, NL, START, and STOP are echoed as ^X, where X is the character with ASCII code 0x40 greater than the special character. For example, character 0x08 (BS) is echoed as ^H. [requires _BSD_SOURCE or _SVID_SOURCE]

ECHOPRT
(not in POSIX) If ICANON and ECHO are also set, characters are printed as they are being erased. [requires _BSD_SOURCE or _SVID_SOURCE]

ECHOKE
(not in POSIX) If ICANON is also set, KILL is echoed by erasing each character on the line, as specified by ECHOE and ECHOPRT. [requires _BSD_SOURCE or _SVID_SOURCE]

DEFECHO
(not in POSIX) Echo only when a process is reading. (Not implemented on Linux.)

FLUSHO
(not in POSIX; not supported under Linux) Output is being flushed. This flag is toggled by typing the DISCARD character. [requires _BSD_SOURCE or _SVID_SOURCE]

NOFLSH
Disable flushing the input and output queues when generating signals for the INT, QUIT, and SUSP characters.

TOSTOP
Send the SIGTTOU signal to the process group of a background process which tries to write to its controlling terminal.

PENDIN
(not in POSIX; not supported under Linux) All characters in the input queue are reprinted when the next character is read. (bash(1) handles typeahead this way.) [requires _BSD_SOURCE or _SVID_SOURCE]

IEXTEN
Enable implementation-defined input processing. This flag, as well as ICANON must be enabled for the special characters EOL2, LNEXT, REPRINT, WERASE to be interpreted, and for the IUCLC flag to be effective.

The c_cc array defines the terminal special characters. The symbolic indices (initial values) and meaning are:

VDISCARD
(not in POSIX; not supported under Linux; 017, SI, Ctrl-O) Toggle: start/stop discarding pending output. Recognized when IEXTEN is set, and then not passed as input.

VDSUSP
(not in POSIX; not supported under Linux; 031, EM, Ctrl-Y) Delayed suspend character (DSUSP): send SIGTSTP signal when the character is read by the user program. Recognized when IEXTEN and ISIG are set, and the system supports job control, and then not passed as input.

VEOF
(004, EOT, Ctrl-D) End-of-file character (EOF). More precisely: this character causes the pending tty buffer to be sent to the waiting user program without waiting for end-of-line. If it is the first character of the line, the read(2) in the user program returns 0, which signifies end-of-file. Recognized when ICANON is set, and then not passed as input.

VEOL
(0, NUL) Additional end-of-line character (EOL). Recognized when ICANON is set.

VEOL2
(not in POSIX; 0, NUL) Yet another end-of-line character (EOL2). Recognized when ICANON is set.

VERASE
(0177, DEL, rubout, or 010, BS, Ctrl-H, or also #) Erase character (ERASE). This erases the previous not-yet-erased character, but does not erase past EOF or beginning-of-line. Recognized when ICANON is set, and then not passed as input.

VINTR
(003, ETX, Ctrl-C, or also 0177, DEL, rubout) Interrupt character (INTR). Send a SIGINT signal. Recognized when ISIG is set, and then not passed as input.

VKILL
(025, NAK, Ctrl-U, or Ctrl-X, or also @) Kill character (KILL). This erases the input since the last EOF or beginning-of-line. Recognized when ICANON is set, and then not passed as input.

VLNEXT
(not in POSIX; 026, SYN, Ctrl-V) Literal next (LNEXT). Quotes the next input character, depriving it of a possible special meaning. Recognized when IEXTEN is set, and then not passed as input.

VMIN
Minimum number of characters for noncanonical read (MIN).

VQUIT
(034, FS, Ctrl-\ Quit character (QUIT). Send SIGQUIT signal. Recognized when ISIG is set, and then not passed as input.

VREPRINT
(not in POSIX; 022, DC2, Ctrl-R) Reprint unread characters (REPRINT). Recognized when ICANON and IEXTEN are set, and then not passed as input.

VSTART
(021, DC1, Ctrl-Q) Start character (START). Restarts output stopped by the Stop character. Recognized when IXON is set, and then not passed as input.

VSTATUS
(not in POSIX; not supported under Linux; status request: 024, DC4, Ctrl-T). Status character (STATUS). Display status information at terminal, including state of foreground process and amount of CPU time it has consumed. Also sends a SIGINFO signal (not supported on Linux) to the foreground process group.

VSTOP
(023, DC3, Ctrl-S) Stop character (STOP). Stop output until Start character typed. Recognized when IXON is set, and then not passed as input.

VSUSP
(032, SUB, Ctrl-Z) Suspend character (SUSP). Send SIGTSTP signal. Recognized when ISIG is set, and then not passed as input.

VSWTCH
(not in POSIX; not supported under Linux; 0, NUL) Switch character (SWTCH). Used in System V to switch shells in shell layers, a predecessor to shell job control.

VTIME
Timeout in deciseconds for noncanonical read (TIME).

VWERASE
(not in POSIX; 027, ETB, Ctrl-W) Word erase (WERASE). Recognized when ICANON and IEXTEN are set, and then not passed as input.

An individual terminal special character can be disabled by setting the value of the corresponding c_cc element to _POSIX_VDISABLE.

The above symbolic subscript values are all different, except that VTIME, VMIN may have the same value as VEOL, VEOF, respectively. In noncanonical mode the special character meaning is replaced by the timeout meaning. For an explanation of VMIN and VTIME, see the description of noncanonical mode below.

Retrieving and changing terminal settings

tcgetattr() gets the parameters associated with the object referred by fd and stores them in the termios structure referenced by termios_p. This function may be invoked from a background process; however, the terminal attributes may be subsequently changed by a foreground process.

tcsetattr() sets the parameters associated with the terminal (unless support is required from the underlying hardware that is not available) from the termios structure referred to by termios_p. optional_actions specifies when the changes take effect:

TCSANOW
the change occurs immediately.

TCSADRAIN
the change occurs after all output written to fd has been transmitted. This option should be used when changing parameters that affect output.

TCSAFLUSH
the change occurs after all output written to the object referred by fd has been transmitted, and all input that has been received but not read will be discarded before the change is made.

Canonical and noncanonical mode

The setting of the ICANON canon flag in c_lflag determines whether the terminal is operating in canonical mode (ICANON set) or noncanonical mode (ICANON unset). By default, ICANON is set.

In canonical mode:

  • Input is made available line by line. An input line is available when one of the line delimiters is typed (NL, EOL, EOL2; or EOF at the start of line). Except in the case of EOF, the line delimiter is included in the buffer returned by read(2).

  • Line editing is enabled (ERASE, KILL; and if the IEXTEN flag is set: WERASE, REPRINT, LNEXT). A read(2) returns at most one line of input; if the read(2) requested fewer bytes than are available in the current line of input, then only as many bytes as requested are read, and the remaining characters will be available for a future read(2).

  • The maximum line length is 4096 chars (including the terminating newline character); lines longer than 4096 chars are truncated. After 4095 characters, input processing (e.g., ISIG and ECHO* processing) continues, but any input data after 4095 characters up to (but not including) any terminating newline is discarded. This ensures that the terminal can always receive more input until at least one line can be read.

In noncanonical mode input is available immediately (without the user having to type a line-delimiter character), no input processing is performed, and line editing is disabled. The read buffer will only accept 4095 chars; this provides the necessary space for a newline char if the input mode is switched to canonical. The settings of MIN (c_cc[VMIN]) and TIME (c_cc[VTIME]) determine the circumstances in which a read(2) completes; there are four distinct cases:

MIN == 0, TIME == 0 (polling read)
If data is available, read(2) returns immediately, with the lesser of the number of bytes available, or the number of bytes requested. If no data is available, read(2) returns 0.

MIN > 0, TIME == 0 (blocking read)
read(2) blocks until MIN bytes are available, and returns up to the number of bytes requested.

MIN == 0, TIME > 0 (read with timeout)
TIME specifies the limit for a timer in tenths of a second. The timer is started when read(2) is called. read(2) returns either when at least one byte of data is available, or when the timer expires. If the timer expires without any input becoming available, read(2) returns 0. If data is already available at the time of the call to read(2), the call behaves as though the data was received immediately after the call.

MIN > 0, TIME > 0 (read with interbyte timeout)
TIME specifies the limit for a timer in tenths of a second. Once an initial byte of input becomes available, the timer is restarted after each further byte is received. read(2) returns when any of the following conditions is met:

  • MIN bytes have been received.

  • The interbyte timer expires.

  • The number of bytes requested by read(2) has been received. (POSIX does not specify this termination condition, and on some other implementations read(2) does not return in this case.)

Because the timer is started only after the initial byte becomes available, at least one byte will be read. If data is already available at the time of the call to read(2), the call behaves as though the data was received immediately after the call.

POSIX does not specify whether the setting of the O_NONBLOCK file status flag takes precedence over the MIN and TIME settings. If O_NONBLOCK is set, a read(2) in noncanonical mode may return immediately, regardless of the setting of MIN or TIME. Furthermore, if no data is available, POSIX permits a read(2) in noncanonical mode to return either 0, or -1 with errno set to EAGAIN.

Raw mode

cfmakeraw() sets the terminal to something like the “raw” mode of the old Version 7 terminal driver: input is available character by character, echoing is disabled, and all special processing of terminal input and output characters is disabled. The terminal attributes are set as follows:

termios_p->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
                | INLCR | IGNCR | ICRNL | IXON);
termios_p->c_oflag &= ~OPOST;
termios_p->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
termios_p->c_cflag &= ~(CSIZE | PARENB);
termios_p->c_cflag |= CS8;

Line control

tcsendbreak() transmits a continuous stream of zero-valued bits for a specific duration, if the terminal is using asynchronous serial data transmission. If duration is zero, it transmits zero-valued bits for at least 0.25 seconds, and not more than 0.5 seconds. If duration is not zero, it sends zero-valued bits for some implementation-defined length of time.

If the terminal is not using asynchronous serial data transmission, tcsendbreak() returns without taking any action.

tcdrain() waits until all output written to the object referred to by fd has been transmitted.

tcflush() discards data written to the object referred to by fd but not transmitted, or data received but not read, depending on the value of queue_selector:

TCIFLUSH
flushes data received but not read.

TCOFLUSH
flushes data written but not transmitted.

TCIOFLUSH
flushes both data received but not read, and data written but not transmitted.

tcflow() suspends transmission or reception of data on the object referred to by fd, depending on the value of action:

TCOOFF
suspends output.

TCOON
restarts suspended output.

TCIOFF
transmits a STOP character, which stops the terminal device from transmitting data to the system.

TCION
transmits a START character, which starts the terminal device transmitting data to the system.

The default on open of a terminal file is that neither its input nor its output is suspended.

Line speed

The baud rate functions are provided for getting and setting the values of the input and output baud rates in the termios structure. The new values do not take effect until tcsetattr() is successfully called.

Setting the speed to B0 instructs the modem to “hang up”. The actual bit rate corresponding to B38400 may be altered with setserial(8).

The input and output baud rates are stored in the termios structure.

cfgetospeed() returns the output baud rate stored in the termios structure pointed to by termios_p.

cfsetospeed() sets the output baud rate stored in the termios structure pointed to by termios_p to speed, which must be one of these constants:

B0
B50
B75
B110
B134
B150
B200
B300
B600
B1200
B1800
B2400
B4800
B9600
B19200
B38400
B57600
B115200
B230400
B460800
B500000
B576000
B921600
B1000000
B1152000
B1500000
B2000000

These constants are additionally supported on the SPARC architecture:

B76800
B153600
B307200
B614400

These constants are additionally supported on non-SPARC architectures:

B2500000
B3000000
B3500000
B4000000

Due to differences between architectures, portable applications should check if a particular Bnnn constant is defined prior to using it.

The zero baud rate, B0, is used to terminate the connection. If B0 is specified, the modem control lines shall no longer be asserted. Normally, this will disconnect the line. CBAUDEX is a mask for the speeds beyond those defined in POSIX.1 (57600 and above). Thus, B57600 & CBAUDEX is nonzero.

Setting the baud rate to a value other than those defined by Bnnn constants is possible via the TCSETS2 ioctl; see ioctl_tty(2).

cfgetispeed() returns the input baud rate stored in the termios structure.

cfsetispeed() sets the input baud rate stored in the termios structure to speed, which must be specified as one of the Bnnn constants listed above for cfsetospeed(). If the input baud rate is set to the literal constant 0 (not the symbolic constant B0), the input baud rate will be equal to the output baud rate.

cfsetspeed() is a 4.4BSD extension. It takes the same arguments as cfsetispeed(), and sets both input and output speed.

RETURN VALUE

cfgetispeed() returns the input baud rate stored in the termios structure.

cfgetospeed() returns the output baud rate stored in the termios structure.

All other functions return:

0
on success.

-1
on failure and set errno to indicate the error.

Note that tcsetattr() returns success if any of the requested changes could be successfully carried out. Therefore, when making multiple changes it may be necessary to follow this call with a further call to tcgetattr() to check that all changes have been performed successfully.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tcgetattr(), tcsetattr(), tcdrain(), tcflush(), tcflow(), tcsendbreak(), cfmakeraw(), cfgetispeed(), cfgetospeed(), cfsetispeed(), cfsetospeed(), cfsetspeed()

Thread safetyMT-Safe

STANDARDS

tcgetattr()
tcsetattr()
tcsendbreak()
tcdrain()
tcflush()
tcflow()
cfgetispeed()
cfgetospeed()
cfsetispeed()
cfsetospeed()
POSIX.1-2008.

cfmakeraw()
cfsetspeed()
BSD.

HISTORY

tcgetattr()
tcsetattr()
tcsendbreak()
tcdrain()
tcflush()
tcflow()
cfgetispeed()
cfgetospeed()
cfsetispeed()
cfsetospeed()
POSIX.1-2001.

cfmakeraw()
cfsetspeed()
BSD.

NOTES

UNIX V7 and several later systems have a list of baud rates where after the values B0 through B9600 one finds the two constants EXTA, EXTB (“External A” and “External B”). Many systems extend the list with much higher baud rates.

The effect of a nonzero duration with tcsendbreak() varies. SunOS specifies a break of duration * N seconds, where N is at least 0.25, and not more than 0.5. Linux, AIX, DU, Tru64 send a break of duration milliseconds. FreeBSD and NetBSD and HP-UX and MacOS ignore the value of duration. Under Solaris and UnixWare, tcsendbreak() with nonzero duration behaves like tcdrain().

BUGS

On the Alpha architecture before Linux 4.16 (and glibc before glibc 2.28), the XTABS value was different from TAB3 and it was ignored by the N_TTY line discipline code of the terminal driver as a result (because as it wasn’t part of the TABDLY mask).

SEE ALSO

reset(1), setterm(1), stty(1), tput(1), tset(1), tty(1), ioctl_console(2), ioctl_tty(2), cc_t(3type), speed_t(3type), tcflag_t(3type), setserial(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

140 - Linux cli command Moose_Meta_Role_Attributepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Role_Attributepm and provides detailed information about the command Moose_Meta_Role_Attributepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Role_Attributepm.

NAME 🖥️ Moose_Meta_Role_Attributepm 🖥️

The Moose attribute metaclass for Roles

VERSION

version 2.2207

DESCRIPTION

This class implements the API for attributes in roles. Attributes in roles are more like attribute prototypes than full blown attributes. While they are introspectable, they have very little behavior.

METHODS

Moose::Meta::Role::Attribute->new(…)

This method accepts all the options that would be passed to the constructor for Moose::Meta::Attribute.

$attr->metaclass

$attr->is

Returns the option as passed to the constructor.

$attr->associated_role

Returns the Moose::Meta::Role to which this attribute belongs, if any.

$attr->original_role

Returns the Moose::Meta::Role in which this attribute was first defined. This may not be the same as the value of associated_role() for attributes in a composite role, or when one role consumes other roles.

$attr->original_options

Returns a hash reference of options passed to the constructor. This is used when creating a Moose::Meta::Attribute object from this object.

$attr->attach_to_role($role)

Attaches the attribute to the given Moose::Meta::Role.

$attr->attribute_for_class($metaclass)

Given an attribute metaclass name, this method calls $metaclass->interpolate_class_and_new to construct an attribute object which can be added to a Moose::Meta::Class.

$attr->clone

Creates a new object identical to the object on which the method is called.

$attr->is_same_as($other_attr)

Compares two role attributes and returns true if they are identical.

In addition, this class implements all informational predicates implements by Moose::Meta::Attribute (and Class::MOP::Attribute).

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

141 - Linux cli command tanhf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tanhf and provides detailed information about the command tanhf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tanhf.

NAME 🖥️ tanhf 🖥️

hyperbolic tangent function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double tanh(double x);
float tanhf(float x);
long double tanhl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

tanhf(), tanhl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the hyperbolic tangent of x, which is defined mathematically as:

    tanh(x) = sinh(x) / cosh(x)

RETURN VALUE

On success, these functions return the hyperbolic tangent of x.

If x is a NaN, a NaN is returned.

If x is +0 (-0), +0 (-0) is returned.

If x is positive infinity (negative infinity), +1 (-1) is returned.

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tanh(), tanhf(), tanhl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

SEE ALSO

acosh(3), asinh(3), atanh(3), cosh(3), ctanh(3), sinh(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

142 - Linux cli command Tk_Bitmappm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Bitmappm and provides detailed information about the command Tk_Bitmappm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Bitmappm.

NAME 🖥️ Tk_Bitmappm 🖥️

Images that display two colors

SYNOPSIS

$image = $widget->Bitmap?(name??,options?)

DESCRIPTION

A bitmap is an image whose pixels can display either of two colors or be transparent. A bitmap image is defined by four things: a background color, a foreground color, and two bitmaps, called the source and the mask. Each of the bitmaps specifies 0/1 values for a rectangular array of pixels, and the two bitmaps must have the same dimensions. For pixels where the mask is zero, the image displays nothing, producing a transparent effect. For other pixels, the image displays the foreground color if the source data is one and the background color if the source data is zero.

CREATING BITMAPS

Bitmaps are created using $widget->Bitmap. Bitmaps support the following options:

-background => color
Specifies a background color for the image in any of the standard ways accepted by Tk. If this option is set to an empty string then the background pixels will be transparent. This effect is achieved by using the source bitmap as the mask bitmap, ignoring any -maskdata or -maskfile options.

-data => string
Specifies the contents of the source bitmap as a string. The string must adhere to X11 bitmap format (e.g., as generated by the bitmap program). If both the -data and -file options are specified, the -data option takes precedence.

-file => name
name gives the name of a file whose contents define the source bitmap. The file must adhere to X11 bitmap format (e.g., as generated by the bitmap program).

-foreground => color
Specifies a foreground color for the image in any of the standard ways accepted by Tk.

-maskdata => string
Specifies the contents of the mask as a string. The string must adhere to X11 bitmap format (e.g., as generated by the bitmap program). If both the -maskdata and -maskfile options are specified, the -maskdata option takes precedence.

-maskfile => name
name gives the name of a file whose contents define the mask. The file must adhere to X11 bitmap format (e.g., as generated by the bitmap program).

IMAGE METHODS

When a bitmap image is created, Tk also creates a new object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above.

SEE ALSO

Tk::Image Tk::Pixmap Tk::Photo

KEYWORDS

bitmap, image

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

143 - Linux cli command getmntent_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getmntent_r and provides detailed information about the command getmntent_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getmntent_r.

NAME 🖥️ getmntent_r 🖥️

get filesystem descriptor file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
#include <mntent.h>
FILE *setmntent(const char *filename, const char *type);
struct mntent *getmntent(FILE *stream);
int addmntent(FILE *restrict stream,
 const struct mntent *restrict mnt);
int endmntent(FILE *streamp);
char *hasmntopt(const struct mntent *mnt, const char *opt);
/* GNU extension */
#include <mntent.h>
struct mntent *getmntent_r(FILE *restrict streamp,
 struct mntent *restrict mntbuf,
 char buf[restrict .buflen], int buflen);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getmntent_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These routines are used to access the filesystem description file /etc/fstab and the mounted filesystem description file /etc/mtab.

The setmntent() function opens the filesystem description file filename and returns a file pointer which can be used by getmntent(). The argument type is the type of access required and can take the same values as the mode argument of fopen(3). The returned stream should be closed using endmntent() rather than fclose(3).

The getmntent() function reads the next line of the filesystem description file from stream and returns a pointer to a structure containing the broken out fields from a line in the file. The pointer points to a static area of memory which is overwritten by subsequent calls to getmntent().

The addmntent() function adds the mntent structure mnt to the end of the open stream.

The endmntent() function closes the stream associated with the filesystem description file.

The hasmntopt() function scans the mnt_opts field (see below) of the mntent structure mnt for a substring that matches opt. See <mntent.h> and mount(8) for valid mount options.

The reentrant getmntent_r() function is similar to getmntent(), but stores the mntent structure in the provided *mntbuf, and stores the strings pointed to by the entries in that structure in the provided array buf of size buflen.

The mntent structure is defined in <mntent.h> as follows:

struct mntent {
    char *mnt_fsname;   /* name of mounted filesystem */
    char *mnt_dir;      /* filesystem path prefix */
    char *mnt_type;     /* mount type (see mntent.h) */
    char *mnt_opts;     /* mount options (see mntent.h) */
    int   mnt_freq;     /* dump frequency in days */
    int   mnt_passno;   /* pass number on parallel fsck */
};

Since fields in the mtab and fstab files are separated by whitespace, octal escapes are used to represent the characters space ( ), tab ( ), newline ( ), and backslash () in those files when they occur in one of the four strings in a mntent structure. The routines addmntent() and getmntent() will convert from string representation to escaped representation and back. When converting from escaped representation, the sequence \134 is also converted to a backslash.

RETURN VALUE

The getmntent() and getmntent_r() functions return a pointer to the mntent structure or NULL on failure.

The addmntent() function returns 0 on success and 1 on failure.

The endmntent() function always returns 1.

The hasmntopt() function returns the address of the substring if a match is found and NULL otherwise.

FILES

/etc/fstab
filesystem description file

/etc/mtab
mounted filesystem description file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setmntent(), endmntent(), hasmntopt()

Thread safetyMT-Safe

getmntent()

Thread safety

MT-Unsafe race:mntentbuf locale

addmntent()

Thread safety

MT-Safe race:stream locale

getmntent_r()

Thread safetyMT-Safe locale

STANDARDS

None.

HISTORY

The nonreentrant functions are from SunOS 4.1.3. A routine getmntent_r() was introduced in HP-UX 10, but it returns an int. The prototype shown above is glibc-only.

System V also has a getmntent() function but the calling sequence differs, and the returned structure is different. Under System V /etc/mnttab is used. 4.4BSD and Digital UNIX have a routine getmntinfo(), a wrapper around the system call getfsstat().

SEE ALSO

fopen(3), fstab(5), mount(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

144 - Linux cli command Net_DNS_SEC_DSApm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_SEC_DSApm and provides detailed information about the command Net_DNS_SEC_DSApm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_SEC_DSApm.

NAME 🖥️ Net_DNS_SEC_DSApm 🖥️

DNSSEC DSA digital signature algorithm

SYNOPSIS

require Net::DNS::SEC::DSA; $signature = Net::DNS::SEC::DSA->sign( $sigdata, $private ); $validated = Net::DNS::SEC::DSA->verify( $sigdata, $keyrr, $sigbin );

DESCRIPTION

Implementation of DSA digital signature generation and verification procedures.

sign

$signature = Net::DNS::SEC::DSA->sign( $sigdata, $private );

Generates the wire-format signature from the sigdata octet string and the appropriate private key object.

verify

$validated = Net::DNS::SEC::DSA->verify( $sigdata, $keyrr, $sigbin );

Verifies the signature over the sigdata octet string using the specified public key resource record.

ACKNOWLEDGMENT

Thanks are due to Eric Young and the many developers and contributors to the OpenSSL cryptographic library.

COPYRIGHT

Copyright (c)2014,2018 Dick Franks.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

Net::DNS, Net::DNS::SEC, RFC2536, OpenSSL <http://www.openssl.org/docs>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

145 - Linux cli command JSONpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command JSONpm and provides detailed information about the command JSONpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the JSONpm.

NAME 🖥️ JSONpm 🖥️

JSON (JavaScript Object Notation) encoder/decoder

SYNOPSIS

use JSON; # imports encode_json, decode_json, to_json and from_json. # simple and fast interfaces (expect/generate UTF-8) $utf8_encoded_json_text = encode_json $perl_hash_or_arrayref; $perl_hash_or_arrayref = decode_json $utf8_encoded_json_text; # OO-interface $json = JSON->new->allow_nonref; $json_text = $json->encode( $perl_scalar ); $perl_scalar = $json->decode( $json_text ); $pretty_printed = $json->pretty->encode( $perl_scalar ); # pretty-printing

DESCRIPTION

This module is a thin wrapper for JSON::XS-compatible modules with a few additional features. All the backend modules convert a Perl data structure to a JSON text and vice versa. This module uses JSON::XS by default, and when JSON::XS is not available, falls back on JSON::PP, which is in the Perl core since 5.14. If JSON::PP is not available either, this module then falls back on JSON::backportPP (which is actually JSON::PP in a different .pm file) bundled in the same distribution as this module. You can also explicitly specify to use Cpanel::JSON::XS, a fork of JSON::XS by Reini Urban.

All these backend modules have slight incompatibilities between them, including extra features that other modules don’t support, but as long as you use only common features (most important ones are described below), migration from backend to backend should be reasonably easy. For details, see each backend module you use.

CHOOSING BACKEND

This module respects an environmental variable called PERL_JSON_BACKEND when it decides a backend module to use. If this environmental variable is not set, it tries to load JSON::XS, and if JSON::XS is not available, it falls back on JSON::PP, and then JSON::backportPP if JSON::PP is not available either.

If you always don’t want it to fall back on pure perl modules, set the variable like this (export may be setenv, set and the likes, depending on your environment):

> export PERL_JSON_BACKEND=JSON::XS

If you prefer Cpanel::JSON::XS to JSON::XS, then:

> export PERL_JSON_BACKEND=Cpanel::JSON::XS,JSON::XS,JSON::PP

You may also want to set this variable at the top of your test files, in order not to be bothered with incompatibilities between backends (you need to wrap this in BEGIN, and set before actually use-ing JSON module, as it decides its backend as soon as it’s loaded):

BEGIN { $ENV{PERL_JSON_BACKEND}=JSON::backportPP; } use JSON;

USING OPTIONAL FEATURES

There are a few options you can set when you use this module. These historical options are only kept for backward compatibility, and should not be used in a new application.

-support_by_pp
BEGIN { $ENV{PERL_JSON_BACKEND} = JSON::XS } use JSON -support_by_pp; my $json = JSON->new; # escape_slash is for JSON::PP only. $json->allow_nonref->escape_slash->encode("/"); With this option, this module loads its pure perl backend along with its XS backend (if available), and lets the XS backend to watch if you set a flag only JSON::PP supports. When you do, the internal JSON::XS object is replaced with a newly created JSON::PP object with the setting copied from the XS object, so that you can use JSON::PP flags (and its slower decode/encode methods) from then on. In other words, this is not something that allows you to hook JSON::XS to change its behavior while keeping its speed. JSON::XS and JSON::PP objects are quite different (JSON::XS object is a blessed scalar reference, while JSON::PP object is a blessed hash reference), and can’t share their internals. To avoid needless overhead (by copying settings), you are advised not to use this option and just to use JSON::PP explicitly when you need JSON::PP features.

-convert_blessed_universally
use JSON -convert_blessed_universally; my $json = JSON->new->allow_nonref->convert_blessed; my $object = bless {foo => bar}, Foo; $json->encode($object); # => {“foo”:“bar”} JSON::XS-compatible backend modules don’t encode blessed objects by default (except for their boolean values, which are typically blessed JSON::PP::Boolean objects). If you need to encode a data structure that may contain objects, you usually need to look into the structure and replace objects with alternative non-blessed values, or enable convert_blessed and provide a TO_JSON method for each object’s (base) class that may be found in the structure, in order to let the methods replace the objects with whatever scalar values the methods return. If you need to serialise data structures that may contain arbitrary objects, it’s probably better to use other serialisers (such as Sereal or Storable for example), but if you do want to use this module for that purpose, -convert_blessed_universally option may help, which tweaks encode method of the backend to install UNIVERSAL::TO_JSON method (locally) before encoding, so that all the objects that don’t have their own TO_JSON method can fall back on the method in the UNIVERSAL namespace. Note that you still need to enable convert_blessed flag to actually encode objects in a data structure, and UNIVERSAL::TO_JSON method installed by this option only converts blessed hash/array references into their unblessed clone (including private keys/values that are not supposed to be exposed). Other blessed references will be converted into null. This feature is experimental and may be removed in the future.

-no_export
When you don’t want to import functional interfaces from a module, you usually supply () to its use statement. use JSON (); # no functional interfaces If you don’t want to import functional interfaces, but you also want to use any of the above options, add -no_export to the option list. # no functional interfaces, while JSON::PP support is enabled. use JSON -support_by_pp, -no_export;

FUNCTIONAL INTERFACE

This section is taken from JSON::XS. encode_json and decode_json are exported by default.

This module also exports to_json and from_json for backward compatibility. These are slower, and may expect/generate different stuff from what encode_json and decode_json do, depending on their options. It’s better just to use Object-Oriented interfaces than using these two functions.

encode_json

$json_text = encode_json $perl_scalar

Converts the given Perl data structure to a UTF-8 encoded, binary string (that is, the string contains octets only). Croaks on error.

This function call is functionally identical to:

$json_text = JSON->new->utf8->encode($perl_scalar)

Except being faster.

decode_json

$perl_scalar = decode_json $json_text

The opposite of encode_json: expects an UTF-8 (binary) string and tries to parse that as an UTF-8 encoded JSON text, returning the resulting reference. Croaks on error.

This function call is functionally identical to:

$perl_scalar = JSON->new->utf8->decode($json_text)

Except being faster.

to_json

$json_text = to_json($perl_scalar[, $optional_hashref])

Converts the given Perl data structure to a Unicode string by default. Croaks on error.

Basically, this function call is functionally identical to:

$json_text = JSON->new->encode($perl_scalar)

Except being slower.

You can pass an optional hash reference to modify its behavior, but that may change what to_json expects/generates (see ENCODING/CODESET FLAG NOTES for details).

$json_text = to_json($perl_scalar, {utf8 => 1, pretty => 1}) # => JSON->new->utf8(1)->pretty(1)->encode($perl_scalar)

from_json

$perl_scalar = from_json($json_text[, $optional_hashref])

The opposite of to_json: expects a Unicode string and tries to parse it, returning the resulting reference. Croaks on error.

Basically, this function call is functionally identical to:

$perl_scalar = JSON->new->decode($json_text)

You can pass an optional hash reference to modify its behavior, but that may change what from_json expects/generates (see ENCODING/CODESET FLAG NOTES for details).

$perl_scalar = from_json($json_text, {utf8 => 1}) # => JSON->new->utf8(1)->decode($json_text)

JSON::is_bool

$is_boolean = JSON::is_bool($scalar)

Returns true if the passed scalar represents either JSON::true or JSON::false, two constants that act like 1 and 0 respectively and are also used to represent JSON true and false in Perl strings.

See MAPPING, below, for more information on how JSON values are mapped to Perl.

COMMON OBJECT-ORIENTED INTERFACE

This section is also taken from JSON::XS.

The object oriented interface lets you configure your own encoding or decoding style, within the limits of supported formats.

new

$json = JSON->new

Creates a new JSON::XS-compatible backend object that can be used to de/encode JSON strings. All boolean flags described below are by default disabled (with the exception of allow_nonref, which defaults to enabled since version 4.0).

The mutators for flags all return the backend object again and thus calls can be chained:

my $json = JSON->new->utf8->space_after->encode({a => [1,2]}) => {“a”: [1, 2]}

ascii

$json = $json->ascii([$enable]) $enabled = $json->get_ascii

If $enable is true (or missing), then the encode method will not generate characters outside the code range 0..127 (which is ASCII). Any Unicode characters outside that range will be escaped using either a single \uXXXX (BMP characters) or a double \uHHHH\uLLLLL escape sequence, as per RFC4627. The resulting encoded JSON text can be treated as a native Unicode string, an ascii-encoded, latin1-encoded or UTF-8 encoded string, or any other superset of ASCII.

If $enable is false, then the encode method will not escape Unicode characters unless required by the JSON syntax or other flags. This results in a faster and more compact format.

See also the section ENCODING/CODESET FLAG NOTES later in this document.

The main use for this flag is to produce JSON texts that can be transmitted over a 7-bit channel, as the encoded JSON texts will not contain any 8 bit characters.

JSON->new->ascii(1)->encode([chr 0x10401]) => ["������"]

latin1

$json = $json->latin1([$enable]) $enabled = $json->get_latin1

If $enable is true (or missing), then the encode method will encode the resulting JSON text as latin1 (or iso-8859-1), escaping any characters outside the code range 0..255. The resulting string can be treated as a latin1-encoded JSON text or a native Unicode string. The decode method will not be affected in any way by this flag, as decode by default expects Unicode, which is a strict superset of latin1.

If $enable is false, then the encode method will not escape Unicode characters unless required by the JSON syntax or other flags.

See also the section ENCODING/CODESET FLAG NOTES later in this document.

The main use for this flag is efficiently encoding binary data as JSON text, as most octets will not be escaped, resulting in a smaller encoded size. The disadvantage is that the resulting JSON text is encoded in latin1 (and must correctly be treated as such when storing and transferring), a rare encoding for JSON. It is therefore most useful when you want to store data structures known to contain binary data efficiently in files or databases, not when talking to other JSON encoders/decoders.

JSON->new->latin1->encode (["\x{89}\x{abc}"] => ["\x{89}\u0abc"] # (perl syntax, U+abc escaped, U+89 not)

utf8

$json = $json->utf8([$enable]) $enabled = $json->get_utf8

If $enable is true (or missing), then the encode method will encode the JSON result into UTF-8, as required by many protocols, while the decode method expects to be handled an UTF-8-encoded string. Please note that UTF-8-encoded strings do not contain any characters outside the range 0..255, they are thus useful for bytewise/binary I/O. In future versions, enabling this option might enable autodetection of the UTF-16 and UTF-32 encoding families, as described in RFC4627.

If $enable is false, then the encode method will return the JSON string as a (non-encoded) Unicode string, while decode expects thus a Unicode string. Any decoding or encoding (e.g. to UTF-8 or UTF-16) needs to be done yourself, e.g. using the Encode module.

See also the section ENCODING/CODESET FLAG NOTES later in this document.

Example, output UTF-16BE-encoded JSON:

use Encode; $jsontext = encode “UTF-16BE”, JSON->new->encode ($object);

Example, decode UTF-32LE-encoded JSON:

use Encode; $object = JSON->new->decode (decode “UTF-32LE”, $jsontext);

pretty

$json = $json->pretty([$enable])

This enables (or disables) all of the indent, space_before and space_after (and in the future possibly more) flags in one call to generate the most readable (or most compact) form possible.

indent

$json = $json->indent([$enable]) $enabled = $json->get_indent

If $enable is true (or missing), then the encode method will use a multiline format as output, putting every array member or object/hash key-value pair into its own line, indenting them properly.

If $enable is false, no newlines or indenting will be produced, and the resulting JSON text is guaranteed not to contain any newlines.

This setting has no effect when decoding JSON texts.

space_before

$json = $json->space_before([$enable]) $enabled = $json->get_space_before

If $enable is true (or missing), then the encode method will add an extra optional space before the : separating keys from values in JSON objects.

If $enable is false, then the encode method will not add any extra space at those places.

This setting has no effect when decoding JSON texts. You will also most likely combine this setting with space_after.

Example, space_before enabled, space_after and indent disabled:

{“key” :“value”}

space_after

$json = $json->space_after([$enable]) $enabled = $json->get_space_after

If $enable is true (or missing), then the encode method will add an extra optional space after the : separating keys from values in JSON objects and extra whitespace after the , separating key-value pairs and array members.

If $enable is false, then the encode method will not add any extra space at those places.

This setting has no effect when decoding JSON texts.

Example, space_before and indent disabled, space_after enabled:

{“key”: “value”}

relaxed

$json = $json->relaxed([$enable]) $enabled = $json->get_relaxed

If $enable is true (or missing), then decode will accept some extensions to normal JSON syntax (see below). encode will not be affected in any way. Be aware that this option makes you accept invalid JSON texts as if they were valid!. I suggest only to use this option to parse application-specific files written by humans (configuration files, resource files etc.)

If $enable is false (the default), then decode will only accept valid JSON texts.

Currently accepted extensions are:

  • list items can have an end-comma JSON separates array elements and key-value pairs with commas. This can be annoying if you write JSON texts manually and want to be able to quickly append elements, so this extension accepts comma at the end of such items not just between them: [ 1, 2, <- this comma not normally allowed ] { “k1”: “v1”, “k2”: “v2”, <- this comma not normally allowed }

  • shell-style ‘#’-comments Whenever JSON allows whitespace, shell-style comments are additionally allowed. They are terminated by the first carriage-return or line-feed character, after which more white-space and comments are allowed. [ 1, # this comment not allowed in JSON # neither this one… ]

canonical

$json = $json->canonical([$enable]) $enabled = $json->get_canonical

If $enable is true (or missing), then the encode method will output JSON objects by sorting their keys. This is adding a comparatively high overhead.

If $enable is false, then the encode method will output key-value pairs in the order Perl stores them (which will likely change between runs of the same script, and can change even within the same run from 5.18 onwards).

This option is useful if you want the same data structure to be encoded as the same JSON text (given the same overall settings). If it is disabled, the same hash might be encoded differently even if contains the same data, as key-value pairs have no inherent ordering in Perl.

This setting has no effect when decoding JSON texts.

This setting has currently no effect on tied hashes.

allow_nonref

$json = $json->allow_nonref([$enable]) $enabled = $json->get_allow_nonref

Unlike other boolean options, this option is enabled by default beginning with version 4.0.

If $enable is true (or missing), then the encode method can convert a non-reference into its corresponding string, number or null JSON value, which is an extension to RFC4627. Likewise, decode will accept those JSON values instead of croaking.

If $enable is false, then the encode method will croak if it isn’t passed an arrayref or hashref, as JSON texts must either be an object or array. Likewise, decode will croak if given something that is not a JSON object or array.

Example, encode a Perl scalar as JSON value with enabled allow_nonref, resulting in an invalid JSON text:

JSON->new->allow_nonref->encode (“Hello, World!”) => “Hello, World!”

allow_unknown

$json = $json->allow_unknown ([$enable]) $enabled = $json->get_allow_unknown

If $enable is true (or missing), then encode will not throw an exception when it encounters values it cannot represent in JSON (for example, filehandles) but instead will encode a JSON null value. Note that blessed objects are not included here and are handled separately by c<allow_blessed>.

If $enable is false (the default), then encode will throw an exception when it encounters anything it cannot encode as JSON.

This option does not affect decode in any way, and it is recommended to leave it off unless you know your communications partner.

allow_blessed

$json = $json->allow_blessed([$enable]) $enabled = $json->get_allow_blessed

See OBJECT SERIALISATION for details.

If $enable is true (or missing), then the encode method will not barf when it encounters a blessed reference that it cannot convert otherwise. Instead, a JSON null value is encoded instead of the object.

If $enable is false (the default), then encode will throw an exception when it encounters a blessed object that it cannot convert otherwise.

This setting has no effect on decode.

convert_blessed

$json = $json->convert_blessed([$enable]) $enabled = $json->get_convert_blessed

See OBJECT SERIALISATION for details.

If $enable is true (or missing), then encode, upon encountering a blessed object, will check for the availability of the TO_JSON method on the object’s class. If found, it will be called in scalar context and the resulting scalar will be encoded instead of the object.

The TO_JSON method may safely call die if it wants. If TO_JSON returns other blessed objects, those will be handled in the same way. TO_JSON must take care of not causing an endless recursion cycle (== crash) in this case. The name of TO_JSON was chosen because other methods called by the Perl core (== not by the user of the object) are usually in upper case letters and to avoid collisions with any to_json function or method.

If $enable is false (the default), then encode will not consider this type of conversion.

This setting has no effect on decode.

allow_tags (since version 3.0)

$json = $json->allow_tags([$enable]) $enabled = $json->get_allow_tags

See OBJECT SERIALISATION for details.

If $enable is true (or missing), then encode, upon encountering a blessed object, will check for the availability of the FREEZE method on the object’s class. If found, it will be used to serialise the object into a nonstandard tagged JSON value (that JSON decoders cannot decode).

It also causes decode to parse such tagged JSON values and deserialise them via a call to the THAW method.

If $enable is false (the default), then encode will not consider this type of conversion, and tagged JSON values will cause a parse error in decode, as if tags were not part of the grammar.

boolean_values (since version 4.0)

$json->boolean_values([$false, $true]) ($false, $true) = $json->get_boolean_values

By default, JSON booleans will be decoded as overloaded $JSON::false and $JSON::true objects.

With this method you can specify your own boolean values for decoding - on decode, JSON false will be decoded as a copy of $false, and JSON true will be decoded as $true (copy here is the same thing as assigning a value to another variable, i.e. $copy = $false).

This is useful when you want to pass a decoded data structure directly to other serialisers like YAML, Data::MessagePack and so on.

Note that this works only when you decode. You can set incompatible boolean objects (like boolean), but when you encode a data structure with such boolean objects, you still need to enable convert_blessed (and add a TO_JSON method if necessary).

Calling this method without any arguments will reset the booleans to their default values.

get_boolean_values will return both $false and $true values, or the empty list when they are set to the default.

filter_json_object

$json = $json->filter_json_object([$coderef])

When $coderef is specified, it will be called from decode each time it decodes a JSON object. The only argument is a reference to the newly-created hash. If the code references returns a single scalar (which need not be a reference), this value (or rather a copy of it) is inserted into the deserialised data structure. If it returns an empty list (NOTE: not undef, which is a valid scalar), the original deserialised hash will be inserted. This setting can slow down decoding considerably.

When $coderef is omitted or undefined, any existing callback will be removed and decode will not change the deserialised hash in any way.

Example, convert all JSON objects into the integer 5:

my $js = JSON->new->filter_json_object(sub { 5 }); # returns [5] $js->decode([{}]); # returns 5 $js->decode({“a”:1, “b”:2});

filter_json_single_key_object

$json = $json->filter_json_single_key_object($key [=> $coderef])

Works remotely similar to filter_json_object, but is only called for JSON objects having a single key named $key.

This $coderef is called before the one specified via filter_json_object, if any. It gets passed the single value in the JSON object. If it returns a single value, it will be inserted into the data structure. If it returns nothing (not even undef but the empty list), the callback from filter_json_object will be called next, as if no single-key callback were specified.

If $coderef is omitted or undefined, the corresponding callback will be disabled. There can only ever be one callback for a given key.

As this callback gets called less often then the filter_json_object one, decoding speed will not usually suffer as much. Therefore, single-key objects make excellent targets to serialise Perl objects into, especially as single-key JSON objects are as close to the type-tagged value concept as JSON gets (it’s basically an ID/VALUE tuple). Of course, JSON does not support this in any way, so you need to make sure your data never looks like a serialised Perl hash.

Typical names for the single object key are _ _class_whatever_ _, or $_ _dollars_are_rarely_used_ _$ or }ugly_brace_placement, or even things like _ _class_md5sum(classname)_ _, to reduce the risk of clashing with real hashes.

Example, decode JSON objects of the form { "_ _widget_ _" => <id> } into the corresponding $WIDGET{<id>} object:

# return whatever is in $WIDGET{5}: JSON ->new ->filter_json_single_key_object (_ _widget_ _ => sub { $WIDGET{ $_[0] } }) ->decode ({"_ _widget_ _": 5) # this can be used with a TO_JSON method in some “widget” class # for serialisation to json: sub WidgetBase::TO_JSON { my ($self) = @_; unless ($self->{id}) { $self->{id} = ..get..some..id..; $WIDGET{$self->{id}} = $self; } { _ _widget_ _ => $self->{id} } }

max_depth

$json = $json->max_depth([$maximum_nesting_depth]) $max_depth = $json->get_max_depth

Sets the maximum nesting level (default 512) accepted while encoding or decoding. If a higher nesting level is detected in JSON text or a Perl data structure, then the encoder and decoder will stop and croak at that point.

Nesting level is defined by number of hash- or arrayrefs that the encoder needs to traverse to reach a given point or the number of { or [ characters without their matching closing parenthesis crossed to reach a given character in a string.

Setting the maximum depth to one disallows any nesting, so that ensures that the object is only a single hash/object or array.

If no argument is given, the highest possible setting will be used, which is rarely useful.

See SECURITY CONSIDERATIONS in JSON::XS for more info on why this is useful.

max_size

$json = $json->max_size([$maximum_string_size]) $max_size = $json->get_max_size

Set the maximum length a JSON text may have (in bytes) where decoding is being attempted. The default is 0, meaning no limit. When decode is called on a string that is longer then this many bytes, it will not attempt to decode the string but throw an exception. This setting has no effect on encode (yet).

If no argument is given, the limit check will be deactivated (same as when 0 is specified).

See SECURITY CONSIDERATIONS in JSON::XS for more info on why this is useful.

encode

$json_text = $json->encode($perl_scalar)

Converts the given Perl value or data structure to its JSON representation. Croaks on error.

decode

$perl_scalar = $json->decode($json_text)

The opposite of encode: expects a JSON text and tries to parse it, returning the resulting simple scalar or reference. Croaks on error.

decode_prefix

($perl_scalar, $characters) = $json->decode_prefix($json_text)

This works like the decode method, but instead of raising an exception when there is trailing garbage after the first JSON object, it will silently stop parsing there and return the number of characters consumed so far.

This is useful if your JSON texts are not delimited by an outer protocol and you need to know where the JSON text ends.

JSON->new->decode_prefix ("[1] the tail") => ([1], 3)

ADDITIONAL METHODS

The following methods are for this module only.

backend

$backend = $json->backend

Since 2.92, backend method returns an abstract backend module used currently, which should be JSON::Backend::XS (which inherits JSON::XS or Cpanel::JSON::XS), or JSON::Backend::PP (which inherits JSON::PP), not to monkey-patch the actual backend module globally.

If you need to know what is used actually, use isa, instead of string comparison.

is_xs

$boolean = $json->is_xs

Returns true if the backend inherits JSON::XS or Cpanel::JSON::XS.

is_pp

$boolean = $json->is_pp

Returns true if the backend inherits JSON::PP.

property

$settings = $json->property()

Returns a reference to a hash that holds all the common flag settings.

$json = $json->property(utf8 => 1) $value = $json->property(utf8) # 1

You can use this to get/set a value of a particular flag.

boolean

$boolean_object = JSON->boolean($scalar)

Returns $JSON::true if $scalar contains a true value, $JSON::false otherwise. You can use this as a full-qualified function (JSON::boolean($scalar)).

INCREMENTAL PARSING

This section is also taken from JSON::XS.

In some cases, there is the need for incremental parsing of JSON texts. While this module always has to keep both JSON text and resulting Perl data structure in memory at one time, it does allow you to parse a JSON stream incrementally. It does so by accumulating text until it has a full JSON object, which it then can decode. This process is similar to using decode_prefix to see if a full JSON object is available, but is much more efficient (and can be implemented with a minimum of method calls).

This module will only attempt to parse the JSON text once it is sure it has enough text to get a decisive result, using a very simple but truly incremental parser. This means that it sometimes won’t stop as early as the full parser, for example, it doesn’t detect mismatched parentheses. The only thing it guarantees is that it starts decoding as soon as a syntactically valid JSON text has been seen. This means you need to set resource limits (e.g. max_size) to ensure the parser will stop parsing in the presence if syntax errors.

The following methods implement this incremental parser.

incr_parse

$json->incr_parse( [$string] ) # void context $obj_or_undef = $json->incr_parse( [$string] ) # scalar context @obj_or_empty = $json->incr_parse( [$string] ) # list context

This is the central parsing function. It can both append new text and extract objects from the stream accumulated so far (both of these functions are optional).

If $string is given, then this string is appended to the already existing JSON fragment stored in the $json object.

After that, if the function is called in void context, it will simply return without doing anything further. This can be used to add more text in as many chunks as you want.

If the method is called in scalar context, then it will try to extract exactly one JSON object. If that is successful, it will return this object, otherwise it will return undef. If there is a parse error, this method will croak just as decode would do (one can then use incr_skip to skip the erroneous part). This is the most common way of using the method.

And finally, in list context, it will try to extract as many objects from the stream as it can find and return them, or the empty list otherwise. For this to work, there must be no separators (other than whitespace) between the JSON objects or arrays, instead they must be concatenated back-to-back. If an error occurs, an exception will be raised as in the scalar context case. Note that in this case, any previously-parsed JSON texts will be lost.

Example: Parse some JSON arrays/objects in a given string and return them.

my @objs = JSON->new->incr_parse ("[5][7][1,2]");

incr_text

$lvalue_string = $json->incr_text

This method returns the currently stored JSON fragment as an lvalue, that is, you can manipulate it. This only works when a preceding call to incr_parse in scalar context successfully returned an object. Under all other circumstances you must not call this function (I mean it. although in simple tests it might actually work, it will fail under real world conditions). As a special exception, you can also call this method before having parsed anything.

That means you can only use this function to look at or manipulate text before or after complete JSON objects, not while the parser is in the middle of parsing a JSON object.

This function is useful in two cases: a) finding the trailing text after a JSON object or b) parsing multiple JSON objects separated by non-JSON text (such as commas).

incr_skip

$json->incr_skip

This will reset the state of the incremental parser and will remove the parsed text from the input buffer so far. This is useful after incr_parse died, in which case the input buffer and incremental parser state is left unchanged, to skip the text parsed so far and to reset the parse state.

The difference to incr_reset is that only text until the parse error occurred is removed.

incr_reset

$json->incr_reset

This completely resets the incremental parser, that is, after this call, it will be as if the parser had never parsed anything.

This is useful if you want to repeatedly parse JSON objects and want to ignore any trailing data, which means you have to reset the parser after each successful decode.

MAPPING

Most of this section is also taken from JSON::XS.

This section describes how the backend modules map Perl values to JSON values and vice versa. These mappings are designed to do the right thing in most circumstances automatically, preserving round-tripping characteristics (what you put in comes out as something equivalent).

For the more enlightened: note that in the following descriptions, lowercase perl refers to the Perl interpreter, while uppercase Perl refers to the abstract Perl language itself.

JSON -> PERL

object
A JSON object becomes a reference to a hash in Perl. No ordering of object keys is preserved (JSON does not preserver object key ordering itself).

array
A JSON array becomes a reference to an array in Perl.

string
A JSON string becomes a string scalar in Perl - Unicode codepoints in JSON are represented by the same codepoints in the Perl string, so no manual decoding is necessary.

number
A JSON number becomes either an integer, numeric (floating point) or string scalar in perl, depending on its range and any fractional parts. On the Perl level, there is no difference between those as Perl handles all the conversion details, but an integer may take slightly less memory and might represent more values exactly than floating point numbers. If the number consists of digits only, this module will try to represent it as an integer value. If that fails, it will try to represent it as a numeric (floating point) value if that is possible without loss of precision. Otherwise it will preserve the number as a string value (in which case you lose roundtripping ability, as the JSON number will be re-encoded to a JSON string). Numbers containing a fractional or exponential part will always be represented as numeric (floating point) values, possibly at a loss of precision (in which case you might lose perfect roundtripping ability, but the JSON number will still be re-encoded as a JSON number). Note that precision is not accuracy - binary floating point values cannot represent most decimal fractions exactly, and when converting from and to floating point, this module only guarantees precision up to but not including the least significant bit.

true, false
These JSON atoms become JSON::true and JSON::false, respectively. They are overloaded to act almost exactly like the numbers 1 and 0. You can check whether a scalar is a JSON boolean by using the JSON::is_bool function.

null
A JSON null atom becomes undef in Perl.

shell-style comments ("# text")
As a nonstandard extension to the JSON syntax that is enabled by the relaxed setting, shell-style comments are allowed. They can start anywhere outside strings and go till the end of the line.

tagged values ("(tag)value").
Another nonstandard extension to the JSON syntax, enabled with the allow_tags setting, are tagged values. In this implementation, the tag must be a perl package/class name encoded as a JSON string, and the value must be a JSON array encoding optional constructor arguments. See OBJECT SERIALISATION, below, for details.

PERL -> JSON

The mapping from Perl to JSON is slightly more difficult, as Perl is a truly typeless language, so we can only guess which JSON type is meant by a Perl value.

hash references
Perl hash references become JSON objects. As there is no inherent ordering in hash keys (or JSON objects), they will usually be encoded in a pseudo-random order. This module can optionally sort the hash keys (determined by the canonical flag), so the same data structure will serialise to the same JSON text (given same settings and version of the same backend), but this incurs a runtime overhead and is only rarely useful, e.g. when you want to compare some JSON text against another for equality.

array references
Perl array references become JSON arrays.

other references
Other unblessed references are generally not allowed and will cause an exception to be thrown, except for references to the integers 0 and 1, which get turned into false and true atoms in JSON. You can also use JSON::false and JSON::true to improve readability. encode_json [�,JSON::true] # yields [false,true]

JSON::true, JSON::false, JSON::null
These special values become JSON true and JSON false values, respectively. You can also use \1 and directly if you want.

blessed objects
Blessed objects are not directly representable in JSON, but JSON::XS allows various ways of handling objects. See OBJECT SERIALISATION, below, for details.

simple scalars
Simple Perl scalars (any scalar that is not a reference) are the most difficult objects to encode: this module will encode undefined scalars as JSON null values, scalars that have last been used in a string context before encoding as JSON strings, and anything else as number value: # dump as number encode_json [2] # yields [2] encode_json [-3.0e17] # yields [-3e+17] my $value = 5; encode_json [$value] # yields [5] # used as string, so dump as string print $value; encode_json [$value] # yields [“5”] # undef becomes null encode_json [undef] # yields [null] You can force the type to be a string by stringifying it: my $x = 3.1; # some variable containing a number “$x”; # stringified $x .= “”; # another, more awkward way to stringify print $x; # perl does it for you, too, quite often You can force the type to be a number by numifying it: my $x = “3”; # some variable containing a string $x += 0; # numify it, ensuring it will be dumped as a number $x *= 1; # same thing, the choice is yours. You can not currently force the type in other, less obscure, ways. Tell me if you need this capability (but don’t forget to explain why it’s needed :). Since version 2.91_01, JSON::PP uses a different number detection logic that converts a scalar that is possible to turn into a number safely. The new logic is slightly faster, and tends to help people who use older perl or who want to encode complicated data structure. However, this may results in a different JSON text from the one JSON::XS encodes (and thus may break tests that compare entire JSON texts). If you do need the previous behavior for better compatibility or for finer control, set PERL_JSON_PP_USE_B environmental variable to true before you use JSON. Note that numerical precision has the same meaning as under Perl (so binary to decimal conversion follows the same rules as in Perl, which can differ to other languages). Also, your perl interpreter might expose extensions to the floating point numbers of your platform, such as infinities or NaN’s - these cannot be represented in JSON, and it is an error to pass those in. JSON.pm backend modules trust what you pass to encode method (or encode_json function) is a clean, validated data structure with values that can be represented as valid JSON values only, because it’s not from an external data source (as opposed to JSON texts you pass to decode or decode_json, which JSON backends consider tainted and don’t trust). As JSON backends don’t know exactly what you and consumers of your JSON texts want the unexpected values to be (you may want to convert them into null, or to stringify them with or without normalisation (string representation of infinities/NaN may vary depending on platforms), or to croak without conversion), you’re advised to do what you and your consumers need before you encode, and also not to numify values that may start with values that look like a number (including infinities/NaN), without validating.

OBJECT SERIALISATION

As JSON cannot directly represent Perl objects, you have to choose between a pure JSON representation (without the ability to deserialise the object automatically again), and a nonstandard extension to the JSON syntax, tagged values.

SERIALISATION

What happens when this module encounters a Perl object depends on the allow_blessed, convert_blessed and allow_tags settings, which are used in this order:

  1. In this case, JSON creates a tagged JSON value, using a nonstandard extension to the JSON syntax. This works by invoking the FREEZE method on the object, with the first argument being the object to serialise, and the second argument being the constant string JSON to distinguish it from other serialisers. The FREEZE method can return any number of values (i.e. zero or more). These values and the package/classname of the object will then be encoded as a tagged JSON value in the following format: (“classname”)[FREEZE return values…] e.g.: (“URI”)[“http://www.google.com/"] (“MyDate”)[2013,10,29] (“ImageData::JPEG”)[“Z3…VlCg==”] For example, the hypothetical My::Object FREEZE method might use the objects type and id members to encode the object: sub My::Object::FREEZE { my ($self, $serialiser) = @_; ($self->{type}, $self->{id}) }

  2. In this case, the TO_JSON method of the object is invoked in scalar context. It must return a single scalar that can be directly encoded into JSON. This scalar replaces the object in the JSON text. For example, the following TO_JSON method will convert all URI objects to JSON strings when serialised. The fact that these values originally were URI objects is lost. sub URI::TO_JSON { my ($uri) = @_; $uri->as_string }

  3. The object will be serialised as a JSON null value.

  4. If none of the settings are enabled or the respective methods are missing, this module throws an exception.

DESERIALISATION

For deserialisation there are only two cases to consider: either nonstandard tagging was used, in which case allow_tags decides, or objects cannot be automatically be deserialised, in which case you can use postprocessing or the filter_json_object or filter_json_single_key_object callbacks to get some real objects our of your JSON.

This section only considers the tagged value case: a tagged JSON object is encountered during decoding and allow_tags is disabled, a parse error will result (as if tagged values were not part of the grammar).

If allow_tags is enabled, this module will look up the THAW method of the package/classname used during serialisation (it will not attempt to load the package as a Perl module). If there is no such method, the decoding will fail with an error.

Otherwise, the THAW method is invoked with the classname as first argument, the constant string JSON as second argument, and all the values from the JSON array (the values originally returned by the FREEZE method) as remaining arguments.

The method must then return the object. While technically you can return any Perl scalar, you might have to enable the allow_nonref setting to make that work in all cases, so better return an actual blessed reference.

As an example, let’s implement a THAW function that regenerates the My::Object from the FREEZE example earlier:

sub My::Object::THAW { my ($class, $serialiser, $type, $id) = @_; $class->new (type => $type, id => $id) }

ENCODING/CODESET FLAG NOTES

This section is taken from JSON::XS.

The interested reader might have seen a number of flags that signify encodings or codesets - utf8, latin1 and ascii. There seems to be some confusion on what these do, so here is a short comparison:

utf8 controls whether the JSON text created by encode (and expected by decode) is UTF-8 encoded or not, while latin1 and ascii only control whether encode escapes character values outside their respective codeset range. Neither of these flags conflict with each other, although some combinations make less sense than others.

Care has been taken to make all flags symmetrical with respect to encode and decode, that is, texts encoded with any combination of these flag values will be correctly decoded when the same flags are used - in general, if you use different flag settings while encoding vs. when decoding you likely have a bug somewhere.

Below comes a verbose discussion of these flags. Note that a codeset is simply an abstract set of character-codepoint pairs, while an encoding takes those codepoint numbers and encodes them, in our case into octets. Unicode is (among other things) a codeset, UTF-8 is an encoding, and ISO-8859-1 (= latin 1) and ASCII are both codesets and encodings at the same time, which can be confusing.

“utf8” flag disabled
When utf8 is disabled (the default), then encode/decode generate and expect Unicode strings, that is, characters with high ordinal Unicode values (> 255) will be encoded as such characters, and likewise such characters are decoded as-is, no changes to them will be done, except (re-)interpreting them as Unicode codepoints or Unicode characters, respectively (to Perl, these are the same thing in strings unless you do funny/weird/dumb stuff). This is useful when you want to do the encoding yourself (e.g. when you want to have UTF-16 encoded JSON texts) or when some other layer does the encoding for you (for example, when printing to a terminal using a filehandle that transparently encodes to UTF-8 you certainly do NOT want to UTF-8 encode your data first and have Perl encode it another time).

“utf8” flag enabled
If the utf8-flag is enabled, encode/decode will encode all characters using the corresponding UTF-8 multi-byte sequence, and will expect your input strings to be encoded as UTF-8, that is, no character of the input string must have any value > 255, as UTF-8 does not allow that. The utf8 flag therefore switches between two modes: disabled means you will get a Unicode string in Perl, enabled means you get an UTF-8 encoded octet/binary string in Perl.

“latin1” or “ascii” flags enabled
With latin1 (or ascii) enabled, encode will escape characters with ordinal values > 255 (> 127 with ascii) and encode the remaining characters as specified by the utf8 flag. If utf8 is disabled, then the result is also correctly encoded in those character sets (as both are proper subsets of Unicode, meaning that a Unicode string with all character values < 256 is the same thing as a ISO-8859-1 string, and a Unicode string with all character values < 128 is the same thing as an ASCII string in Perl). If utf8 is enabled, you still get a correct UTF-8-encoded string, regardless of these flags, just some more characters will be escaped using \uXXXX then before. Note that ISO-8859-1-encoded strings are not compatible with UTF-8 encoding, while ASCII-encoded strings are. That is because the ISO-8859-1 encoding is NOT a subset of UTF-8 (despite the ISO-8859-1 codeset being a subset of Unicode), while ASCII is. Surprisingly, decode will ignore these flags and so treat all input values as governed by the utf8 flag. If it is disabled, this allows you to decode ISO-8859-1- and ASCII-encoded strings, as both strict subsets of Unicode. If it is enabled, you can correctly decode UTF-8 encoded strings. So neither latin1 nor ascii are incompatible with the utf8 flag - they only govern when the JSON output engine escapes a character or not. The main use for latin1 is to relatively efficiently store binary data as JSON, at the expense of breaking compatibility with most JSON decoders. The main use for ascii is to force the output to not contain characters with values > 127, which means you can interpret the resulting string as UTF-8, ISO-8859-1, ASCII, KOI8-R or most about any character set and 8-bit-encoding, and still get the same data structure back. This is useful when your channel for JSON transfer is not 8-bit clean or the encoding might be mangled in between (e.g. in mail), and works because ASCII is a proper subset of most 8-bit and multibyte encodings in use in the world.

BACKWARD INCOMPATIBILITY

Since version 2.90, stringification (and string comparison) for JSON::true and JSON::false has not been overloaded. It shouldn’t matter as long as you treat them as boolean values, but a code that expects they are stringified as true or false doesn’t work as you have expected any more.

if (JSON::true eq true) { # now fails print “The result is $JSON::true now.”; # => The result is 1 now.

And now these boolean values don’t inherit JSON::Boolean, either. When you need to test a value is a JSON boolean value or not, use JSON::is_bool function, instead of testing the value inherits a particular boolean class or not.

BUGS

Please report bugs on backend selection and additional features this module provides to RT or GitHub issues for this module:

<https://rt.cpan.org/Public/Dist/Display.html?Queue=JSON>

<https://github.com/makamaka/JSON/issues>

As for bugs on a specific behavior, please report to the author of the backend module you are using.

As for new features and requests to change common behaviors, please ask the author of JSON::XS (Marc Lehmann, <schmorp[at]schmorp.de>) first, by email (important!), to keep compatibility among JSON.pm backends.

SEE ALSO

JSON::XS, Cpanel::JSON::XS, JSON::PP for backends.

JSON::MaybeXS, an alternative that prefers Cpanel::JSON::XS.

RFC4627(<http://www.ietf.org/rfc/rfc4627.txt>)

RFC7159 (<http://www.ietf.org/rfc/rfc7159.txt>)

RFC8259 (<http://www.ietf.org/rfc/rfc8259.txt>)

AUTHOR

Makamaka Hannyaharamitu, <makamaka[at]cpan.org>

JSON::XS was written by Marc Lehmann <schmorp[at]schmorp.de>

The release of this new version owes to the courtesy of Marc Lehmann.

CURRENT MAINTAINER

Kenichi Ishigaki, <ishigaki[at]cpan.org>

COPYRIGHT AND LICENSE

Copyright 2005-2013 by Makamaka Hannyaharamitu

Most of the documentation is taken from JSON::XS by Marc Lehmann

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

146 - Linux cli command secure_getenv

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command secure_getenv and provides detailed information about the command secure_getenv, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the secure_getenv.

NAME 🖥️ secure_getenv 🖥️

get an environment variable

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
char *getenv(const char *name);
char *secure_getenv(const char *name);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

secure_getenv():

    _GNU_SOURCE

DESCRIPTION

The getenv() function searches the environment list to find the environment variable name, and returns a pointer to the corresponding value string.

The GNU-specific secure_getenv() function is just like getenv() except that it returns NULL in cases where “secure execution” is required. Secure execution is required if one of the following conditions was true when the program run by the calling process was loaded:

  • the process’s effective user ID did not match its real user ID or the process’s effective group ID did not match its real group ID (typically this is the result of executing a set-user-ID or set-group-ID program);

  • the effective capability bit was set on the executable file; or

  • the process has a nonempty permitted capability set.

Secure execution may also be required if triggered by some Linux security modules.

The secure_getenv() function is intended for use in general-purpose libraries to avoid vulnerabilities that could occur if set-user-ID or set-group-ID programs accidentally trusted the environment.

RETURN VALUE

The getenv() function returns a pointer to the value in the environment, or NULL if there is no match.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getenv(), secure_getenv()

Thread safetyMT-Safe env

STANDARDS

getenv()
C11, POSIX.1-2008.

secure_getenv()
GNU.

HISTORY

getenv()
POSIX.1-2001, C89, C99, SVr4, 4.3BSD.

secure_getenv()
glibc 2.17.

NOTES

The strings in the environment list are of the form name=value.

As typically implemented, getenv() returns a pointer to a string within the environment list. The caller must take care not to modify this string, since that would change the environment of the process.

The implementation of getenv() is not required to be reentrant. The string pointed to by the return value of getenv() may be statically allocated, and can be modified by a subsequent call to getenv(), putenv(3), setenv(3), or unsetenv(3).

The “secure execution” mode of secure_getenv() is controlled by the AT_SECURE flag contained in the auxiliary vector passed from the kernel to user space.

SEE ALSO

clearenv(3), getauxval(3), putenv(3), setenv(3), unsetenv(3), capabilities(7), environ(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

147 - Linux cli command XML_Handler_Subspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_Handler_Subspm and provides detailed information about the command XML_Handler_Subspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_Handler_Subspm.

NAME 🖥️ XML_Handler_Subspm 🖥️

a PerlSAX handler base class for calling user-defined subs

SYNOPSIS

use XML::Handler::Subs; package MyHandlers; use vars qw{ @ISA }; sub s_NAME { my ($self, $element) = @_ }; sub e_NAME { my ($self, $element) = @_ }; $self->{Names}; # an array of names $self->{Nodes}; # an array of $element nodes $handler = MyHandlers->new(); $self->in_element($name); $self->within_element($name);

DESCRIPTION

XML::Handler::Subs is a base class for PerlSAX handlers. XML::Handler::Subs is subclassed to implement complete behavior and to add element-specific handling.

Each time an element starts, a method by that name prefixed with `s_’ is called with the element to be processed. Each time an element ends, a method with that name prefixed with `e_’ is called. Any special characters in the element name are replaced by underscores.

Subclassing XML::Handler::Subs in this way is similar to XML::Parser’s Subs style.

XML::Handler::Subs maintains a stack of element names, `$self-{Names}’, and a stack of element nodes, `$self-{Nodes}>’ that can be used by subclasses. The current element is pushed on the stacks before calling an element-name start method and popped off the stacks after calling the element-name end method. The `in_element()’ and `within_element()’ calls use these stacks.

If the subclass implements `start_document()’, `end_document()’, `start_element()’, and `end_element()’, be sure to use `SUPER::’ to call the the superclass methods also. See perlobj (1) for details on SUPER::. `SUPER::start_element()’ and `SUPER::end_element()’ return 1 if an element-name method is called, they return 0 if no method was called.

XML::Handler::Subs does not implement any other PerlSAX handlers.

XML::Handler::Subs supports the following methods:

new( OPTIONS )
A basic `new()’ method. `new()’ takes a list of key, value pairs or a hash and creates and returns a hash with those options; the hash is blessed into the subclass.

in_element($name)
Returns true if `$name’ is equal to the name of the innermost currently opened element.

within_element($name)
Returns the number of times the `$name’ appears in Names.

AUTHOR

Ken MacLeod, [email protected]

SEE ALSO

perl (1), PerlSAX.pod (3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

148 - Linux cli command iswxdigit

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command iswxdigit and provides detailed information about the command iswxdigit, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the iswxdigit.

NAME 🖥️ iswxdigit 🖥️

test for hexadecimal digit wide character

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wctype.h>
int iswxdigit(wint_t wc);

DESCRIPTION

The iswxdigit() function is the wide-character equivalent of the isxdigit(3) function. It tests whether wc is a wide character belonging to the wide-character class “xdigit”.

The wide-character class “xdigit” is a subclass of the wide-character class “alnum”, and therefore also a subclass of the wide-character class “graph” and of the wide-character class “print”.

Being a subclass of the wide-character class “print”, the wide-character class “xdigit” is disjoint from the wide-character class “cntrl”.

Being a subclass of the wide-character class “graph”, the wide-character class “xdigit” is disjoint from the wide-character class “space” and its subclass “blank”.

Being a subclass of the wide-character class “alnum”, the wide-character class “xdigit” is disjoint from the wide-character class “punct”.

The wide-character class “xdigit” always contains at least the letters ‘A’ to ‘F’, ‘a’ to ‘f’ and the digits ‘0’ to ‘9’.

RETURN VALUE

The iswxdigit() function returns nonzero if wc is a wide character belonging to the wide-character class “xdigit”. Otherwise, it returns zero.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

iswxdigit()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of iswxdigit() depends on the LC_CTYPE category of the current locale.

SEE ALSO

iswctype(3), isxdigit(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

149 - Linux cli command sigmask

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigmask and provides detailed information about the command sigmask, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigmask.

NAME 🖥️ sigmask 🖥️

BSD signal API

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
[[deprecated]] int sigvec(int sig, const struct sigvec *vec,
 struct sigvec *ovec);
[[deprecated]] int sigmask(int signum);
[[deprecated]] int sigblock(int mask);
[[deprecated]] int sigsetmask(int mask);
[[deprecated]] int siggetmask(void);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

These functions are provided in glibc as a compatibility interface for programs that make use of the historical BSD signal API. This API is obsolete: new applications should use the POSIX signal API (sigaction(2), sigprocmask(2), etc.).

The sigvec() function sets and/or gets the disposition of the signal sig (like the POSIX sigaction(2)). If vec is not NULL, it points to a sigvec structure that defines the new disposition for sig. If ovec is not NULL, it points to a sigvec structure that is used to return the previous disposition of sig. To obtain the current disposition of sig without changing it, specify NULL for vec, and a non-null pointer for ovec.

The dispositions for SIGKILL and SIGSTOP cannot be changed.

The sigvec structure has the following form:

struct sigvec {
    void (*sv_handler)(int); /* Signal disposition */
    int    sv_mask;          /* Signals to be blocked in handler */
    int    sv_flags;         /* Flags */
};

The sv_handler field specifies the disposition of the signal, and is either: the address of a signal handler function; SIG_DFL, meaning the default disposition applies for the signal; or SIG_IGN, meaning that the signal is ignored.

If sv_handler specifies the address of a signal handler, then sv_mask specifies a mask of signals that are to be blocked while the handler is executing. In addition, the signal for which the handler is invoked is also blocked. Attempts to block SIGKILL or SIGSTOP are silently ignored.

If sv_handler specifies the address of a signal handler, then the sv_flags field specifies flags controlling what happens when the handler is called. This field may contain zero or more of the following flags:

SV_INTERRUPT
If the signal handler interrupts a blocking system call, then upon return from the handler the system call is not restarted: instead it fails with the error EINTR. If this flag is not specified, then system calls are restarted by default.

SV_RESETHAND
Reset the disposition of the signal to the default before calling the signal handler. If this flag is not specified, then the handler remains established until explicitly removed by a later call to sigvec() or until the process performs an execve(2).

SV_ONSTACK
Handle the signal on the alternate signal stack (historically established under BSD using the obsolete sigstack() function; the POSIX replacement is sigaltstack(2)).

The sigmask() macro constructs and returns a “signal mask” for signum. For example, we can initialize the vec.sv_mask field given to sigvec() using code such as the following:

vec.sv_mask = sigmask(SIGQUIT) | sigmask(SIGABRT);
            /* Block SIGQUIT and SIGABRT during
               handler execution */

The sigblock() function adds the signals in mask to the process’s signal mask (like POSIX sigprocmask(SIG_BLOCK)), and returns the process’s previous signal mask. Attempts to block SIGKILL or SIGSTOP are silently ignored.

The sigsetmask() function sets the process’s signal mask to the value given in mask (like POSIX sigprocmask(SIG_SETMASK)), and returns the process’s previous signal mask.

The siggetmask() function returns the process’s current signal mask. This call is equivalent to sigblock(0).

RETURN VALUE

The sigvec() function returns 0 on success; on error, it returns -1 and sets errno to indicate the error.

The sigblock() and sigsetmask() functions return the previous signal mask.

The sigmask() macro returns the signal mask for signum.

ERRORS

See the ERRORS under sigaction(2) and sigprocmask(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sigvec(), sigmask(), sigblock(), sigsetmask(), siggetmask()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

sigvec()
sigblock()
sigmask()
sigsetmask()
4.3BSD.

siggetmask()
Unclear origin.

sigvec()
Removed in glibc 2.21.

NOTES

On 4.3BSD, the signal() function provided reliable semantics (as when calling sigvec() with vec.sv_mask equal to 0). On System V, signal() provides unreliable semantics. POSIX.1 leaves these aspects of signal() unspecified. See signal(2) for further details.

In order to wait for a signal, BSD and System V both provided a function named sigpause(3), but this function has a different argument on the two systems. See sigpause(3) for details.

SEE ALSO

kill(2), pause(2), sigaction(2), signal(2), sigprocmask(2), raise(3), sigpause(3), sigset(3), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

150 - Linux cli command Spreadsheet_WriteExcel_Worksheetpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_WriteExcel_Worksheetpm and provides detailed information about the command Spreadsheet_WriteExcel_Worksheetpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_WriteExcel_Worksheetpm.

NAME 🖥️ Spreadsheet_WriteExcel_Worksheetpm 🖥️

A writer class for Excel Worksheets.

SYNOPSIS

See the documentation for Spreadsheet::WriteExcel

DESCRIPTION

This module is used in conjunction with Spreadsheet::WriteExcel.

AUTHOR

John McNamara [email protected]

COPYRIGHT

Copyright MM-MMX, John McNamara.

All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

151 - Linux cli command freeaddrinfo

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command freeaddrinfo and provides detailed information about the command freeaddrinfo, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the freeaddrinfo.

NAME 🖥️ freeaddrinfo 🖥️

network address and service translation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
int getaddrinfo(const char *restrict node,
 const char *restrict service,
 const struct addrinfo *restrict hints,
 struct addrinfo **restrict res);
void freeaddrinfo(struct addrinfo *res);
const char *gai_strerror(int errcode);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getaddrinfo(), freeaddrinfo(), gai_strerror():

    Since glibc 2.22:
        _POSIX_C_SOURCE >= 200112L
    glibc 2.21 and earlier:
        _POSIX_C_SOURCE

DESCRIPTION

Given node and service, which identify an Internet host and a service, getaddrinfo() returns one or more addrinfo structures, each of which contains an Internet address that can be specified in a call to bind(2) or connect(2). The getaddrinfo() function combines the functionality provided by the gethostbyname(3) and getservbyname(3) functions into a single interface, but unlike the latter functions, getaddrinfo() is reentrant and allows programs to eliminate IPv4-versus-IPv6 dependencies.

The addrinfo structure used by getaddrinfo() contains the following fields:

struct addrinfo {
    int              ai_flags;
    int              ai_family;
    int              ai_socktype;
    int              ai_protocol;
    socklen_t        ai_addrlen;
    struct sockaddr *ai_addr;
    char            *ai_canonname;
    struct addrinfo *ai_next;
};

The hints argument points to an addrinfo structure that specifies criteria for selecting the socket address structures returned in the list pointed to by res. If hints is not NULL it points to an addrinfo structure whose ai_family, ai_socktype, and ai_protocol specify criteria that limit the set of socket addresses returned by getaddrinfo(), as follows:

ai_family
This field specifies the desired address family for the returned addresses. Valid values for this field include AF_INET and AF_INET6. The value AF_UNSPEC indicates that getaddrinfo() should return socket addresses for any address family (either IPv4 or IPv6, for example) that can be used with node and service.

ai_socktype
This field specifies the preferred socket type, for example SOCK_STREAM or SOCK_DGRAM. Specifying 0 in this field indicates that socket addresses of any type can be returned by getaddrinfo().

ai_protocol
This field specifies the protocol for the returned socket addresses. Specifying 0 in this field indicates that socket addresses with any protocol can be returned by getaddrinfo().

ai_flags
This field specifies additional options, described below. Multiple flags are specified by bitwise OR-ing them together.

All the other fields in the structure pointed to by hints must contain either 0 or a null pointer, as appropriate.

Specifying hints as NULL is equivalent to setting ai_socktype and ai_protocol to 0; ai_family to AF_UNSPEC; and ai_flags to (AI_V4MAPPED | AI_ADDRCONFIG). (POSIX specifies different defaults for ai_flags; see NOTES.) node specifies either a numerical network address (for IPv4, numbers-and-dots notation as supported by inet_aton(3); for IPv6, hexadecimal string format as supported by inet_pton(3)), or a network hostname, whose network addresses are looked up and resolved. If hints.ai_flags contains the AI_NUMERICHOST flag, then node must be a numerical network address. The AI_NUMERICHOST flag suppresses any potentially lengthy network host address lookups.

If the AI_PASSIVE flag is specified in hints.ai_flags, and node is NULL, then the returned socket addresses will be suitable for bind(2)ing a socket that will accept(2) connections. The returned socket address will contain the “wildcard address” (INADDR_ANY for IPv4 addresses, IN6ADDR_ANY_INIT for IPv6 address). The wildcard address is used by applications (typically servers) that intend to accept connections on any of the host’s network addresses. If node is not NULL, then the AI_PASSIVE flag is ignored.

If the AI_PASSIVE flag is not set in hints.ai_flags, then the returned socket addresses will be suitable for use with connect(2), sendto(2), or sendmsg(2). If node is NULL, then the network address will be set to the loopback interface address (INADDR_LOOPBACK for IPv4 addresses, IN6ADDR_LOOPBACK_INIT for IPv6 address); this is used by applications that intend to communicate with peers running on the same host.

service sets the port in each returned address structure. If this argument is a service name (see services(5)), it is translated to the corresponding port number. This argument can also be specified as a decimal number, which is simply converted to binary. If service is NULL, then the port number of the returned socket addresses will be left uninitialized. If AI_NUMERICSERV is specified in hints.ai_flags and service is not NULL, then service must point to a string containing a numeric port number. This flag is used to inhibit the invocation of a name resolution service in cases where it is known not to be required.

Either node or service, but not both, may be NULL.

The getaddrinfo() function allocates and initializes a linked list of addrinfo structures, one for each network address that matches node and service, subject to any restrictions imposed by hints, and returns a pointer to the start of the list in res. The items in the linked list are linked by the ai_next field.

There are several reasons why the linked list may have more than one addrinfo structure, including: the network host is multihomed, accessible over multiple protocols (e.g., both AF_INET and AF_INET6); or the same service is available from multiple socket types (one SOCK_STREAM address and another SOCK_DGRAM address, for example). Normally, the application should try using the addresses in the order in which they are returned. The sorting function used within getaddrinfo() is defined in RFC 3484; the order can be tweaked for a particular system by editing /etc/gai.conf (available since glibc 2.5).

If hints.ai_flags includes the AI_CANONNAME flag, then the ai_canonname field of the first of the addrinfo structures in the returned list is set to point to the official name of the host.

The remaining fields of each returned addrinfo structure are initialized as follows:

  • The ai_family, ai_socktype, and ai_protocol fields return the socket creation parameters (i.e., these fields have the same meaning as the corresponding arguments of socket(2)). For example, ai_family might return AF_INET or AF_INET6; ai_socktype might return SOCK_DGRAM or SOCK_STREAM; and ai_protocol returns the protocol for the socket.

  • A pointer to the socket address is placed in the ai_addr field, and the length of the socket address, in bytes, is placed in the ai_addrlen field.

If hints.ai_flags includes the AI_ADDRCONFIG flag, then IPv4 addresses are returned in the list pointed to by res only if the local system has at least one IPv4 address configured, and IPv6 addresses are returned only if the local system has at least one IPv6 address configured. The loopback address is not considered for this case as valid as a configured address. This flag is useful on, for example, IPv4-only systems, to ensure that getaddrinfo() does not return IPv6 socket addresses that would always fail in connect(2) or bind(2).

If hints.ai_flags specifies the AI_V4MAPPED flag, and hints.ai_family was specified as AF_INET6, and no matching IPv6 addresses could be found, then return IPv4-mapped IPv6 addresses in the list pointed to by res. If both AI_V4MAPPED and AI_ALL are specified in hints.ai_flags, then return both IPv6 and IPv4-mapped IPv6 addresses in the list pointed to by res. AI_ALL is ignored if AI_V4MAPPED is not also specified.

The freeaddrinfo() function frees the memory that was allocated for the dynamically allocated linked list res.

Extensions to getaddrinfo() for Internationalized Domain Names

Starting with glibc 2.3.4, getaddrinfo() has been extended to selectively allow the incoming and outgoing hostnames to be transparently converted to and from the Internationalized Domain Name (IDN) format (see RFC 3490, Internationalizing Domain Names in Applications (IDNA)). Four new flags are defined:

AI_IDN
If this flag is specified, then the node name given in node is converted to IDN format if necessary. The source encoding is that of the current locale.

If the input name contains non-ASCII characters, then the IDN encoding is used. Those parts of the node name (delimited by dots) that contain non-ASCII characters are encoded using ASCII Compatible Encoding (ACE) before being passed to the name resolution functions.

AI_CANONIDN
After a successful name lookup, and if the AI_CANONNAME flag was specified, getaddrinfo() will return the canonical name of the node corresponding to the addrinfo structure value passed back. The return value is an exact copy of the value returned by the name resolution function.

If the name is encoded using ACE, then it will contain the xn– prefix for one or more components of the name. To convert these components into a readable form the AI_CANONIDN flag can be passed in addition to AI_CANONNAME. The resulting string is encoded using the current locale’s encoding.

AI_IDN_ALLOW_UNASSIGNED
AI_IDN_USE_STD3_ASCII_RULES
Setting these flags will enable the IDNA_ALLOW_UNASSIGNED (allow unassigned Unicode code points) and IDNA_USE_STD3_ASCII_RULES (check output to make sure it is a STD3 conforming hostname) flags respectively to be used in the IDNA handling.

RETURN VALUE

getaddrinfo() returns 0 if it succeeds, or one of the following nonzero error codes:

EAI_ADDRFAMILY
The specified network host does not have any network addresses in the requested address family.

EAI_AGAIN
The name server returned a temporary failure indication. Try again later.

EAI_BADFLAGS
hints.ai_flags contains invalid flags; or, hints.ai_flags included AI_CANONNAME and node was NULL.

EAI_FAIL
The name server returned a permanent failure indication.

EAI_FAMILY
The requested address family is not supported.

EAI_MEMORY
Out of memory.

EAI_NODATA
The specified network host exists, but does not have any network addresses defined.

EAI_NONAME
The node or service is not known; or both node and service are NULL; or AI_NUMERICSERV was specified in hints.ai_flags and service was not a numeric port-number string.

EAI_SERVICE
The requested service is not available for the requested socket type. It may be available through another socket type. For example, this error could occur if service was “shell” (a service available only on stream sockets), and either hints.ai_protocol was IPPROTO_UDP, or hints.ai_socktype was SOCK_DGRAM; or the error could occur if service was not NULL, and hints.ai_socktype was SOCK_RAW (a socket type that does not support the concept of services).

EAI_SOCKTYPE
The requested socket type is not supported. This could occur, for example, if hints.ai_socktype and hints.ai_protocol are inconsistent (e.g., SOCK_DGRAM and IPPROTO_TCP, respectively).

EAI_SYSTEM
Other system error; errno is set to indicate the error.

The gai_strerror() function translates these error codes to a human readable string, suitable for error reporting.

FILES

/etc/gai.conf

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getaddrinfo()

Thread safetyMT-Safe env locale

freeaddrinfo(), gai_strerror()

Thread safetyMT-Safe

VERSIONS

According to POSIX.1, specifying hints as NULL should cause ai_flags to be assumed as 0. The GNU C library instead assumes a value of (AI_V4MAPPED | AI_ADDRCONFIG) for this case, since this value is considered an improvement on the specification.

STANDARDS

POSIX.1-2008.

getaddrinfo()
RFC 2553.

HISTORY

POSIX.1-2001.

AI_ADDRCONFIG
AI_ALL
AI_V4MAPPED
glibc 2.3.3.

AI_NUMERICSERV
glibc 2.3.4.

NOTES

getaddrinfo() supports the address**%**scope-id notation for specifying the IPv6 scope-ID.

EXAMPLES

The following programs demonstrate the use of getaddrinfo(), gai_strerror(), freeaddrinfo(), and getnameinfo(3). The programs are an echo server and client for UDP datagrams.

Server program

#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
#define BUF_SIZE 500
int
main(int argc, char *argv[])
{
    int                      sfd, s;
    char                     buf[BUF_SIZE];
    ssize_t                  nread;
    socklen_t                peer_addrlen;
    struct addrinfo          hints;
    struct addrinfo          *result, *rp;
    struct sockaddr_storage  peer_addr;
    if (argc != 2) {
        fprintf(stderr, "Usage: %s port

“, argv[0]); exit(EXIT_FAILURE); } memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 / hints.ai_socktype = SOCK_DGRAM; / Datagram socket / hints.ai_flags = AI_PASSIVE; / For wildcard IP address / hints.ai_protocol = 0; / Any protocol / hints.ai_canonname = NULL; hints.ai_addr = NULL; hints.ai_next = NULL; s = getaddrinfo(NULL, argv[1], &hints, &result); if (s != 0) { fprintf(stderr, “getaddrinfo: %s “, gai_strerror(s)); exit(EXIT_FAILURE); } / getaddrinfo() returns a list of address structures. Try each address until we successfully bind(2). If socket(2) (or bind(2)) fails, we (close the socket and) try the next address. / for (rp = result; rp != NULL; rp = rp->ai_next) { sfd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); if (sfd == -1) continue; if (bind(sfd, rp->ai_addr, rp->ai_addrlen) == 0) break; / Success / close(sfd); } freeaddrinfo(result); / No longer needed / if (rp == NULL) { / No address succeeded / fprintf(stderr, “Could not bind “); exit(EXIT_FAILURE); } / Read datagrams and echo them back to sender. */ for (;;) { char host[NI_MAXHOST], service[NI_MAXSERV]; peer_addrlen = sizeof(peer_addr); nread = recvfrom(sfd, buf, BUF_SIZE, 0, (struct sockaddr ) &peer_addr, &peer_addrlen); if (nread == -1) continue; / Ignore failed request */ s = getnameinfo((struct sockaddr *) &peer_addr, peer_addrlen, host, NI_MAXHOST, service, NI_MAXSERV, NI_NUMERICSERV); if (s == 0) printf(“Received %zd bytes from %s:%s “, nread, host, service); else fprintf(stderr, “getnameinfo: %s “, gai_strerror(s)); if (sendto(sfd, buf, nread, 0, (struct sockaddr *) &peer_addr, peer_addrlen) != nread) { fprintf(stderr, “Error sending response “); } } }

Client program

#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
#define BUF_SIZE 500
int
main(int argc, char *argv[])
{
    int              sfd, s;
    char             buf[BUF_SIZE];
    size_t           len;
    ssize_t          nread;
    struct addrinfo  hints;
    struct addrinfo  *result, *rp;
    if (argc < 3) {
        fprintf(stderr, "Usage: %s host port msg...

“, argv[0]); exit(EXIT_FAILURE); } /* Obtain address(es) matching host/port. / memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; / Allow IPv4 or IPv6 / hints.ai_socktype = SOCK_DGRAM; / Datagram socket / hints.ai_flags = 0; hints.ai_protocol = 0; / Any protocol / s = getaddrinfo(argv[1], argv[2], &hints, &result); if (s != 0) { fprintf(stderr, “getaddrinfo: %s “, gai_strerror(s)); exit(EXIT_FAILURE); } / getaddrinfo() returns a list of address structures. Try each address until we successfully connect(2). If socket(2) (or connect(2)) fails, we (close the socket and) try the next address. / for (rp = result; rp != NULL; rp = rp->ai_next) { sfd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); if (sfd == -1) continue; if (connect(sfd, rp->ai_addr, rp->ai_addrlen) != -1) break; / Success / close(sfd); } freeaddrinfo(result); / No longer needed / if (rp == NULL) { / No address succeeded / fprintf(stderr, “Could not connect “); exit(EXIT_FAILURE); } / Send remaining command-line arguments as separate datagrams, and read responses from server. / for (size_t j = 3; j < argc; j++) { len = strlen(argv[j]) + 1; / +1 for terminating null byte */ if (len > BUF_SIZE) { fprintf(stderr, “Ignoring long message in argument %zu “, j); continue; } if (write(sfd, argv[j], len) != len) { fprintf(stderr, “partial/failed write “); exit(EXIT_FAILURE); } nread = read(sfd, buf, BUF_SIZE); if (nread == -1) { perror(“read”); exit(EXIT_FAILURE); } printf(“Received %zd bytes: %s “, nread, buf); } exit(EXIT_SUCCESS); }

SEE ALSO

getaddrinfo_a(3), gethostbyname(3), getnameinfo(3), inet(3), gai.conf(5), hostname(7), ip(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

152 - Linux cli command XML_DOM_Attrpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_DOM_Attrpm and provides detailed information about the command XML_DOM_Attrpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_DOM_Attrpm.

NAME 🖥️ XML_DOM_Attrpm 🖥️

An XML attribute in XML::DOM

DESCRIPTION

XML::DOM::Attr extends XML::DOM::Node.

The Attr nodes built by the XML::DOM::Parser always have one child node which is a Text node containing the expanded string value (i.e. EntityReferences are always expanded.) EntityReferences may be added when modifying or creating a new Document.

The Attr interface represents an attribute in an Element object. Typically the allowable values for the attribute are defined in a document type definition.

Attr objects inherit the Node interface, but since they are not actually child nodes of the element they describe, the DOM does not consider them part of the document tree. Thus, the Node attributes parentNode, previousSibling, and nextSibling have a undef value for Attr objects. The DOM takes the view that attributes are properties of elements rather than having a separate identity from the elements they are associated with; this should make it more efficient to implement such features as default attributes associated with all elements of a given type. Furthermore, Attr nodes may not be immediate children of a DocumentFragment. However, they can be associated with Element nodes contained within a DocumentFragment. In short, users and implementors of the DOM need to be aware that Attr nodes have some things in common with other objects inheriting the Node interface, but they also are quite distinct.

The attribute’s effective value is determined as follows: if this attribute has been explicitly assigned any value, that value is the attribute’s effective value; otherwise, if there is a declaration for this attribute, and that declaration includes a default value, then that default value is the attribute’s effective value; otherwise, the attribute does not exist on this element in the structure model until it has been explicitly added. Note that the nodeValue attribute on the Attr instance can also be used to retrieve the string version of the attribute’s value(s).

In XML, where the value of an attribute can contain entity references, the child nodes of the Attr node provide a representation in which entity references are not expanded. These child nodes may be either Text or EntityReference nodes. Because the attribute type may be unknown, there are no tokenized attribute values.

METHODS

getValue
On retrieval, the value of the attribute is returned as a string. Character and general entity references are replaced with their values.

setValue (str)
DOM Spec: On setting, this creates a Text node with the unparsed contents of the string.

getName
Returns the name of this attribute.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

153 - Linux cli command XShapeQueryVersion

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XShapeQueryVersion and provides detailed information about the command XShapeQueryVersion, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XShapeQueryVersion.

NAME 🖥️ XShapeQueryVersion 🖥️

X nonrectangular shape functions

SYNTAX

#include <X11/extensions/shape.h>
Bool XShapeQueryExtension (
	Display *dpy,
	int *event_basep,
	int *error_basep);
Status XShapeQueryVersion (
	Display *dpy,
	int *major_versionp,
	int *minor_versionp);
void XShapeCombineRegion (
	Display *dpy,
	Window dest,
	int destKind,
	int xOff,
	int yOff,
	struct _XRegion *r,
	int op);
void XShapeCombineRectangles (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	XRectangle *rects,
	int n_rects,
	int op,
	int ordering);
void XShapeCombineMask (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	Pixmap src,
	int op);
void XShapeCombineShape (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	Pixmap src,
	int srcKind,
	int op);
void XShapeOffsetShape (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff);
Status XShapeQueryExtents (
	Display *dpy,
	Window window,
	int *bShaped,
	int *xbs,
	int *ybs,
	unsigned int *wbs,
	unsigned int *hbs,
	int *cShaped,
	int *xcs,
	int *ycs,
	unsigned int *wcs,
	unsigned int *hcs);
void XShapeSelectInput (
	Display *dpy,
	Window window,
	unsigned longmask);
unsigned long XShapeInputSelected (
	Display *dpy,
	Window window);
XRectangle *XShapeGetRectangles (
	Display *dpy,
	Window window,
	int kind,
	int *count,
	int *ordering);

STRUCTURES

typedef struct {
    int type;	/* of event */
    unsigned long serial;	/* # of last request processed by server */
    Bool send_event;	/* true if this came from a SendEvent request */
    Display *display;	/* Display the event was read from */
    Window window;	/* window of event */
    int kind;	/* ShapeBounding or ShapeClip */
    int x, y;	/* extents of new region */
    unsigned width, height;
    Time time;	/* server timestamp when region changed */
    Bool shaped;	/* true if the region exists */
} XShapeEvent;

DESCRIPTION

The X11 Nonrectangular Window Shape Extension adds nonrectangular windows to the X Window System.

PREDEFINED VALUES

Operations:

 ShapeSet   ShapeUnion   ShapeIntersect   ShapeSubtract   ShapeInvert 

Shape Kinds:

 ShapeBounding   ShapeClip 

Event defines:

 ShapeNotifyMask   ShapeNotify 

BUGS

This manual page needs a lot more work.

SEE ALSO

X11 Nonrectangular Window Shape Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

154 - Linux cli command XtGetSelectionValue

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGetSelectionValue and provides detailed information about the command XtGetSelectionValue, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGetSelectionValue.

NAME 🖥️ XtGetSelectionValue 🖥️

obtain selection values

SYNTAX

#include <X11/Intrinsic.h>

void XtGetSelectionValue(Widget w, Atom selection, Atom target, XtSelectionCallbackProc callback, XtPointer client_data, Time time);

void XtGetSelectionValues(Widget w, Atom selection, Atom *targets, int count, XtSelectionCallbackProc callback, XtPointer *client_data, Time time);

ARGUMENTS

callback
Specifies the callback procedure that is to be called when the selection value has been obtained.

client_data
Specifies the argument that is to be passed to the specified procedure when it is called.

client_data
Specifies the client data (one for each target type) that is passed to the callback procedure when it is called for that target.

count
Specifies the length of the targets and client_data lists.

selection
Specifies the particular selection desired (that is, primary or secondary).

target
Specifies the type of the information that is needed about the selection.

targets
Specifies the types of information that is needed about the selection.

time
Specifies the timestamp that indicates when the selection value is desired.

  1. Specifies the widget that is making the request.

DESCRIPTION

The XtGetSelectionValue function requests the value of the selection that has been converted to the target type. The specified callback will be called some time after XtGetSelectionValue is called; in fact, it may be called before or after XtGetSelectionValue returns.

The XtGetSelectionValues function is similar to XtGetSelectionValue except that it takes a list of target types and a list of client data and obtains the current value of the selection converted to each of the targets. The effect is as if each target were specified in a separate call to XtGetSelectionValue. The callback is called once with the corresponding client data for each target. XtGetSelectionValues does guarantee that all the conversions will use the same selection value because the ownership of the selection cannot change in the middle of the list, as would be when calling XtGetSelectionValue repeatedly.

SEE ALSO

XtAppGetSelectionTimeout(3), XtOwnSelection(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

155 - Linux cli command Moose_Cookbook_Basics_Company_Subtypespm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Basics_Company_Subtypespm and provides detailed information about the command Moose_Cookbook_Basics_Company_Subtypespm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Basics_Company_Subtypespm.

NAME 🖥️ Moose_Cookbook_Basics_Company_Subtypespm 🖥️

Demonstrates the use of subtypes and how to model classes related to companies, people, employees, etc.

VERSION

version 2.2207

SYNOPSIS

package Address; use Moose; use Moose::Util::TypeConstraints; use Locale::US; use Regexp::Common zip; my $STATES = Locale::US->new; subtype USState => as Str => where { ( exists $STATES->{code2state}{ uc($_) } || exists $STATES->{state2code}{ uc($_) } ); }; subtype USZipCode => as Value => where { /^$RE{zip}{US}{-extended => allow}$/; }; has street => ( is => rw, isa => Str ); has city => ( is => rw, isa => Str ); has state => ( is => rw, isa => USState ); has zip_code => ( is => rw, isa => USZipCode ); package Company; use Moose; use Moose::Util::TypeConstraints; has name => ( is => rw, isa => Str, required => 1 ); has address => ( is => rw, isa => Address ); has employees => ( is => rw, isa => ArrayRef[Employee], default => sub { [] }, ); sub BUILD { my ( $self, $params ) = @_; foreach my $employee ( @{ $self->employees } ) { $employee->employer($self); } } after employees => sub { my ( $self, $employees ) = @_; return unless $employees; foreach my $employee ( @$employees ) { $employee->employer($self); } }; package Person; use Moose; has first_name => ( is => rw, isa => Str, required => 1 ); has last_name => ( is => rw, isa => Str, required => 1 ); has middle_initial => ( is => rw, isa => Str, predicate => has_middle_initial ); has address => ( is => rw, isa => Address ); sub full_name { my $self = shift; return $self->first_name . ( $self->has_middle_initial ? . $self->middle_initial . . : ) . $self->last_name; } package Employee; use Moose; extends Person; has title => ( is => rw, isa => Str, required => 1 ); has employer => ( is => rw, isa => Company, weak_ref => 1 ); override full_name => sub { my $self = shift; super() . , . $self->title; };

DESCRIPTION

This recipe introduces the subtype sugar function from Moose::Util::TypeConstraints. The subtype function lets you declaratively create type constraints without building an entire class.

In the recipe we also make use of Locale::US and Regexp::Common to build constraints, showing how constraints can make use of existing CPAN tools for data validation.

Finally, we introduce the required attribute option.

In the Address class we define two subtypes. The first uses the Locale::US module to check the validity of a state. It accepts either a state abbreviation or full name.

A state will be passed in as a string, so we make our USState type a subtype of Moose’s builtin Str type. This is done using the as sugar. The actual constraint is defined using where. This function accepts a single subroutine reference. That subroutine will be called with the value to be checked in $_ (1). It is expected to return a true or false value indicating whether the value is valid for the type.

We can now use the USState type just like Moose’s builtin types:

has state => ( is => rw, isa => USState );

When the state attribute is set, the value is checked against the USState constraint. If the value is not valid, an exception will be thrown.

The next subtype, USZipCode, uses Regexp::Common. Regexp::Common includes a regex for validating US zip codes. We use this constraint for the zip_code attribute.

subtype USZipCode => as Value => where { /^$RE{zip}{US}{-extended => allow}$/; };

Using a subtype instead of requiring a class for each type greatly simplifies the code. We don’t really need a class for these types, as they’re just strings, but we do want to ensure that they’re valid.

The type constraints we created are reusable. Type constraints are stored by name in a global registry, which means that we can refer to them in other classes. Because the registry is global, we do recommend that you use some sort of namespacing in real applications, like MyApp::Type::USState (just as you would do with class names).

These two subtypes allow us to define a simple Address class.

Then we define our Company class, which has an address. As we saw in earlier recipes, Moose automatically creates a type constraint for each our classes, so we can use that for the Company class’s address attribute:

has address => ( is => rw, isa => Address );

A company also needs a name:

has name => ( is => rw, isa => Str, required => 1 );

This introduces a new attribute option, required. If an attribute is required, then it must be passed to the class’s constructor, or an exception will be thrown. It’s important to understand that a required attribute can still be false or undef, if its type constraint allows that.

The next attribute, employees, uses a parameterized type constraint:

has employees => ( is => rw, isa => ArrayRef[Employee] default => sub { [] }, );

This constraint says that employees must be an array reference where each element of the array is an Employee object. It’s worth noting that an empty array reference also satisfies this constraint, such as the value given as the default here.

Parameterizable type constraints (or “container types”), such as ArrayRef[`a], can be made more specific with a type parameter. In fact, we can arbitrarily nest these types, producing something like HashRef[ArrayRef[Int]]. However, you can also just use the type by itself, so ArrayRef is legal. (2)

If you jump down to the definition of the Employee class, you will see that it has an employer attribute.

When we set the employees for a Company we want to make sure that each of these employee objects refers back to the right Company in its employer attribute.

To do that, we need to hook into object construction. Moose lets us do this by writing a BUILD method in our class. When your class defines a BUILD method, it will be called by the constructor immediately after object construction, but before the object is returned to the caller. Note that all BUILD methods in your class hierarchy will be called automatically; there is no need to (and you should not) call the superclass BUILD method.

The Company class uses the BUILD method to ensure that each employee of a company has the proper Company object in its employer attribute:

sub BUILD { my ( $self, $params ) = @_; foreach my $employee ( @{ $self->employees } ) { $employee->employer($self); } }

The BUILD method is executed after type constraints are checked, so it is safe to assume that if $self->employees has a value, it will be an array reference, and that the elements of that array reference will be Employee objects.

We also want to make sure that whenever the employees attribute for a Company is changed, we also update the employer for each employee.

To do this we can use an after modifier:

after employees => sub { my ( $self, $employees ) = @_; return unless $employees; foreach my $employee ( @$employees ) { $employee->employer($self); } };

Again, as with the BUILD method, we know that the type constraint check has already happened, so we know that if $employees is defined it will contain an array reference of Employee objects.

Note that employees is a read/write accessor, so we must return early if it’s called as a reader.

The Person class does not really demonstrate anything new. It has several required attributes. It also has a predicate method, which we first used in Moose::Cookbook::Basics::BinaryTree_AttributeFeatures.

The only new feature in the Employee class is the override method modifier:

override full_name => sub { my $self = shift; super() . , . $self->title; };

This is just a sugary alternative to Perl’s built in SUPER:: feature. However, there is one difference. You cannot pass any arguments to super. Instead, Moose simply passes the same parameters that were passed to the method.

A more detailed example of usage can be found in t/recipes/basics_company_subtypes.t.

CONCLUSION

This recipe was intentionally longer and more complex. It illustrates how Moose classes can be used together with type constraints, as well as the density of information that you can get out of a small amount of typing when using Moose.

This recipe also introduced the subtype function, the required attribute, and the override method modifier.

We will revisit type constraints in future recipes, and cover type coercion as well.

FOOTNOTES

  1. The value being checked is also passed as the first argument to the where block, so it can be accessed as $_[0].

  2. Note that ArrayRef[] will not work. Moose will not parse this as a container type, and instead you will have a new type named “ArrayRef[]”, which doesn’t make any sense.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

156 - Linux cli command Net_DNS_Packetpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_Packetpm and provides detailed information about the command Net_DNS_Packetpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_Packetpm.

NAME 🖥️ Net_DNS_Packetpm 🖥️

DNS protocol packet

SYNOPSIS

use Net::DNS::Packet; $query = Net::DNS::Packet->new( example.com, MX, IN ); $reply = $resolver->send( $query );

DESCRIPTION

A Net::DNS::Packet object represents a DNS protocol packet.

METHODS

new

$packet = Net::DNS::Packet->new( example.com ); $packet = Net::DNS::Packet->new( example.com, MX, IN ); $packet = Net::DNS::Packet->new();

If passed a domain, type, and class, new() creates a Net::DNS::Packet object which is suitable for making a DNS query for the specified information. The type and class may be omitted; they default to A and IN.

If called with an empty argument list, new() creates an empty packet.

$packet = Net::DNS::Packet->decode( \data ); $packet = Net::DNS::Packet->decode( \data, 1 ); # debug $packet = Net::DNS::Packet->new( \data … );

If passed a reference to a scalar containing DNS packet data, a new packet object is created by decoding the data. The optional second boolean argument enables debugging output.

Returns undef if unable to create a packet object.

Decoding errors, including data corruption and truncation, are collected in the $@ ($EVAL_ERROR) variable.

( $packet, $length ) = Net::DNS::Packet->decode( \data );

If called in array context, returns a packet object and the number of octets successfully decoded.

Note that the number of RRs in each section of the packet may differ from the corresponding header value if the data has been truncated or corrupted during transmission.

data

$data = $packet->data; $data = $packet->data( $size );

Returns the packet data in binary format, suitable for sending as a query or update request to a nameserver.

Truncation may be specified using a non-zero optional size argument.

$header = $packet->header;

Constructor method which returns a Net::DNS::Header object which represents the header section of the packet.

edns

$edns = $packet->edns; $version = $edns->version; $UDPsize = $edns->size;

Auxiliary function which provides access to the EDNS protocol extension OPT RR.

reply

$reply = $query->reply( $UDPmax );

Constructor method which returns a new reply packet.

The optional UDPsize argument is the maximum UDP packet size which can be reassembled by the local network stack, and is advertised in response to an EDNS query.

question, zone

@question = $packet->question;

Returns a list of Net::DNS::Question objects representing the question section of the packet.

In dynamic update packets, this section is known as zone() and specifies the DNS zone to be updated.

answer, pre, prerequisite

@answer = $packet->answer;

Returns a list of Net::DNS::RR objects representing the answer section of the packet.

In dynamic update packets, this section is known as pre() or prerequisite() and specifies the RRs or RRsets which must or must not preexist.

authority, update

@authority = $packet->authority;

Returns a list of Net::DNS::RR objects representing the authority section of the packet.

In dynamic update packets, this section is known as update() and specifies the RRs or RRsets to be added or deleted.

additional

@additional = $packet->additional;

Returns a list of Net::DNS::RR objects representing the additional section of the packet.

print

$packet->print;

Prints the entire packet to the currently selected output filehandle using the master file format mandated by RFC1035.

string

print $packet->string;

Returns a string representation of the packet.

from

print “packet received from “, $packet->from, " “;

Returns the IP address from which this packet was received. This method will return undef for user-created packets.

size

print “packet size: “, $packet->size, " octets “;

Returns the size of the packet in octets as it was received from a nameserver. This method will return undef for user-created packets (use length($packet->data) instead).

push

$ancount = $packet->push( prereq => $rr ); $nscount = $packet->push( update => $rr ); $arcount = $packet->push( additional => $rr ); $nscount = $packet->push( update => $rr1, $rr2, $rr3 ); $nscount = $packet->push( update => @rr );

Adds RRs to the specified section of the packet.

Returns the number of resource records in the specified section.

Section names may be abbreviated to the first three characters.

unique_push

$ancount = $packet->unique_push( prereq => $rr ); $nscount = $packet->unique_push( update => $rr ); $arcount = $packet->unique_push( additional => $rr ); $nscount = $packet->unique_push( update => $rr1, $rr2, $rr3 ); $nscount = $packet->unique_push( update => @rr );

Adds RRs to the specified section of the packet provided that the RRs are not already present in the same section.

Returns the number of resource records in the specified section.

Section names may be abbreviated to the first three characters.

pop

my $rr = $packet->pop( pre ); my $rr = $packet->pop( update ); my $rr = $packet->pop( additional );

Removes a single RR from the specified section of the packet.

sign_tsig

$query = Net::DNS::Packet->new( www.example.com, A ); $query->sign_tsig( $keyfile, fudge => 60 ); $reply = $res->send( $query ); $reply->verify( $query ) || die $reply->verifyerr;

Attaches a TSIG resource record object, which will be used to sign the packet (see RFC 2845).

The TSIG record can be customised by optional additional arguments to sign_tsig() or by calling the appropriate Net::DNS::RR::TSIG methods.

If you wish to create a TSIG record using a non-standard algorithm, you will have to create it yourself. In all cases, the TSIG name must uniquely identify the key shared between the parties, and the algorithm name must identify the signing function to be used with the specified key.

$tsig = Net::DNS::RR->new( name => tsig.example, type => TSIG, algorithm => custom-algorithm, key => <base64 key text>, sig_function => sub { my ($key, $data) = @_; … } ); $query->sign_tsig( $tsig );

The response to an inbound request is signed by presenting the request in place of the key parameter.

$response = $request->reply; $response->sign_tsig( $request, @options );

Multi-packet transactions are signed by chaining the sign_tsig() calls together as follows:

$opaque = $packet1->sign_tsig( Kexample.+165+13281.private ); $opaque = $packet2->sign_tsig( $opaque ); $packet3->sign_tsig( $opaque );

The opaque intermediate object references returned during multi-packet signing are not intended to be accessed by the end-user application. Any such access is expressly forbidden.

Note that a TSIG record is added to every packet; this implementation does not support the suppressed signature scheme described in RFC2845.

verify and verifyerr

$packet->verify() || die $packet->verifyerr; $reply->verify( $query ) || die $reply->verifyerr;

Verify TSIG signature of packet or reply to the corresponding query.

$opaque = $packet1->verify( $query ) || die $packet1->verifyerr; $opaque = $packet2->verify( $opaque ); $verifed = $packet3->verify( $opaque ) || die $packet3->verifyerr;

The opaque intermediate object references returned during multi-packet verify() will be undefined (Boolean false) if verification fails. Access to the object itself, if it exists, is expressly forbidden. Testing at every stage may be omitted, which results in a BADSIG error on the final packet in the absence of more specific information.

sign_sig0

SIG0 support is provided through the Net::DNS::RR::SIG class. The requisite cryptographic components are not integrated into Net::DNS but reside in the Net::DNS::SEC distribution available from CPAN.

$update = Net::DNS::Update->new(example.com); $update->push( update => rr_add(foo.example.com A 10.1.2.3)); $update->sign_sig0(Kexample.com+003+25317.private);

Execution will be terminated if Net::DNS::SEC is not available.

verify SIG0

$packet->verify( $keyrr ) || die $packet->verifyerr; $packet->verify( [$keyrr, …] ) || die $packet->verifyerr;

Verify SIG0 packet signature against one or more specified KEY RRs.

sigrr

$sigrr = $packet->sigrr() || die unsigned packet;

The sigrr method returns the signature RR from a signed packet or undefined if the signature is absent.

truncate

The truncate method takes a maximum length as argument and then tries to truncate the packet and set the TC bit according to the rules of RFC2181 Section 9.

The smallest length limit that is honoured is 512 octets.

COPYRIGHT

Copyright (c)1997-2000 Michael Fuhr.

Portions Copyright (c)2002-2004 Chris Reinhardt.

Portions Copyright (c)2002-2009 Olaf Kolkman

Portions Copyright (c)2007-2019 Dick Franks

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::Update Net::DNS::Header Net::DNS::Question Net::DNS::RR Net::DNS::RR::TSIG RFC1035(4.1) <https://tools.ietf.org/html/rfc1035> RFC2136 (2) <https://tools.ietf.org/html/rfc2136> RFC8945 <https://tools.ietf.org/html/rfc8945>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

157 - Linux cli command NetPacket_TCPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command NetPacket_TCPpm and provides detailed information about the command NetPacket_TCPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the NetPacket_TCPpm.

NAME 🖥️ NetPacket_TCPpm 🖥️

Assemble and disassemble TCP (Transmission Control Protocol) packets.

VERSION

version 1.7.2

SYNOPSIS

use NetPacket::TCP; $tcp_obj = NetPacket::TCP->decode($raw_pkt); $tcp_pkt = $tcp_obj->encode($ip_pkt); $tcp_data = NetPacket::TCP::strip($raw_pkt);

DESCRIPTION

NetPacket::TCP provides a set of routines for assembling and disassembling packets using TCP (Transmission Control Protocol).

Methods

“NetPacket::TCP->decode([RAW PACKET])”
Decode the raw packet data given and return an object containing instance data. This method will quite happily decode garbage input. It is the responsibility of the programmer to ensure valid packet data is passed to this method.

“NetPacket::TCP->encode($ip_obj)”
Return a TCP packet encoded with the instance data specified. Needs parts of the ip header contained in $ip_obj in order to calculate the TCP checksum.

“$packet->parse_tcp_options”
Returns a hash (or a hash ref in scalar context) containing the packet’s options. For now the method only recognizes well-known and widely used options (MSS, noop, windows scale factor, SACK permitted, SACK, timestamp). If the packet contains options unknown to the method, it may fail.

Functions

“NetPacket::TCP::strip([RAW PACKET])”
Return the encapsulated data (or payload) contained in the TCP packet. This data is suitable to be used as input for other NetPacket::* modules. This function is equivalent to creating an object using the decode() constructor and returning the data field of that object.

Instance data

The instance data for the NetPacket::TCP object consists of the following fields.

src_port
The source TCP port for the packet.

dest_port
The destination TCP port for the packet.

seqnum
The TCP sequence number for this packet.

acknum
The TCP acknowledgement number for this packet.

hlen
The header length for this packet.

reserved
The 6-bit reserved space in the TCP header.

flags
Contains the urg, ack, psh, rst, syn, fin, ece and cwr flags for this packet.

winsize
The TCP window size for this packet.

cksum
The TCP checksum.

urg
The TCP urgent pointer.

options
Any TCP options for this packet in binary form.

data
The encapsulated data (payload) for this packet.

Exports

default
FIN SYN RST PSH ACK URG ECE CWR Can be used to set the appropriate flag.

exportable
tcp_strip

tags
The following tags group together related exportable items.

“:strip”
Import the strip function tcp_strip.

“:ALL”
All the above exportable items.

EXAMPLE

The following script is a primitive pop3 sniffer.

#!/usr/bin/perl -w use strict; use Net::PcapUtils; use NetPacket::Ethernet qw(:strip); use NetPacket::IP qw(:strip); use NetPacket::TCP; sub process_pkt { my($arg, $hdr, $pkt) = @_; my $tcp_obj = NetPacket::TCP->decode(ip_strip(eth_strip($pkt))); if (($tcp_obj->{src_port} == 110) or ($tcp_obj->{dest_port} == 110)) { print($tcp_obj->{data}); } } Net::PcapUtils::loop(\process_pkt, FILTER => tcp);

The following uses NetPacket together with Net::Divert to add a syn flag to all TCP packets passing through:

#!/usr/bin/perl use Net::Divert; use NetPacket::IP qw(IP_PROTO_TCP); use NetPacket::TCP; $divobj = Net::Divert->new(yourhostname,9999); $divobj->getPackets(\alterPacket); sub alterPacket { my($packet,$fwtag) = @_; # decode the IP header $ip_obj = NetPacket::IP->decode($packet); # check if this is a TCP packet if($ip_obj->{proto} == IP_PROTO_TCP) { # decode the TCP header $tcp_obj = NetPacket::TCP->decode($ip_obj->{data}); # set the syn flag $tcp_obj->{flags} |= SYN; # construct the new ip packet $ip_obj->{data} = $tcp_obj->encode($ip_obj); $packet = $ip_obj->encode; } # write it back out $divobj->putPacket($packet,$fwtag); }

TODO

Assembly of TCP fragments into a data stream

Option processing

Nicer processing of TCP flags

COPYRIGHT

Copyright (c) 2001 Tim Potter and Stephanie Wehner.

Copyright (c) 1995,1996,1997,1998,1999 ANU and CSIRO on behalf of the participants in the CRC for Advanced Computational Systems (‘ACSys’).

This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

AUTHOR

Tim Potter <[email protected]>

Stephanie Wehner <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

158 - Linux cli command posix_fallocate

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command posix_fallocate and provides detailed information about the command posix_fallocate, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the posix_fallocate.

NAME 🖥️ posix_fallocate 🖥️

allocate file space

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <fcntl.h>
int posix_fallocate(int fd, off_t offset, off_t len);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

posix_fallocate():

    _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The function posix_fallocate() ensures that disk space is allocated for the file referred to by the file descriptor fd for the bytes in the range starting at offset and continuing for len bytes. After a successful call to posix_fallocate(), subsequent writes to bytes in the specified range are guaranteed not to fail because of lack of disk space.

If the size of the file is less than offset+len, then the file is increased to this size; otherwise the file size is left unchanged.

RETURN VALUE

posix_fallocate() returns zero on success, or an error number on failure. Note that errno is not set.

ERRORS

EBADF
fd is not a valid file descriptor, or is not opened for writing.

EFBIG
offset+len exceeds the maximum file size.

EINTR
A signal was caught during execution.

EINVAL
offset was less than 0, or len was less than or equal to 0, or the underlying filesystem does not support the operation.

ENODEV
fd does not refer to a regular file.

ENOSPC
There is not enough space left on the device containing the file referred to by fd.

EOPNOTSUPP
The filesystem containing the file referred to by fd does not support this operation. This error code can be returned by C libraries that don’t perform the emulation shown in NOTES, such as musl libc.

ESPIPE
fd refers to a pipe.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

posix_fallocate()

Thread safety

MT-Safe (but see NOTES)

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.1.94. POSIX.1-2001

POSIX.1-2008 says that an implementation shall give the EINVAL error if len was 0, or offset was less than 0. POSIX.1-2001 says that an implementation shall give the EINVAL error if len is less than 0, or offset was less than 0, and may give the error if len equals zero.

CAVEATS

In the glibc implementation, posix_fallocate() is implemented using the fallocate(2) system call, which is MT-safe. If the underlying filesystem does not support fallocate(2), then the operation is emulated with the following caveats:

  • The emulation is inefficient.

  • There is a race condition where concurrent writes from another thread or process could be overwritten with null bytes.

  • There is a race condition where concurrent file size increases by another thread or process could result in a file whose size is smaller than expected.

  • If fd has been opened with the O_APPEND or O_WRONLY flags, the function fails with the error EBADF.

In general, the emulation is not MT-safe. On Linux, applications may use fallocate(2) if they cannot tolerate the emulation caveats. In general, this is only recommended if the application plans to terminate the operation if EOPNOTSUPP is returned, otherwise the application itself will need to implement a fallback with all the same problems as the emulation provided by glibc.

SEE ALSO

fallocate(1), fallocate(2), lseek(2), posix_fadvise(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

159 - Linux cli command strcmp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strcmp and provides detailed information about the command strcmp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strcmp.

NAME 🖥️ strcmp 🖥️

compare two strings

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
int strcmp(const char *s1, const char *s2);
int strncmp(const char s1[.n], const char s2[.n], size_t n);

DESCRIPTION

The strcmp() function compares the two strings s1 and s2. The locale is not taken into account (for a locale-aware comparison, see strcoll(3)). The comparison is done using unsigned characters.

strcmp() returns an integer indicating the result of the comparison, as follows:

  • 0, if the s1 and s2 are equal;

  • a negative value if s1 is less than s2;

  • a positive value if s1 is greater than s2.

The strncmp() function is similar, except it compares only the first (at most) n bytes of s1 and s2.

RETURN VALUE

The strcmp() and strncmp() functions return an integer less than, equal to, or greater than zero if s1 (or the first n bytes thereof) is found, respectively, to be less than, to match, or be greater than s2.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strcmp(), strncmp()

Thread safetyMT-Safe

VERSIONS

POSIX.1 specifies only that:

The sign of a nonzero return value shall be determined by the sign of the difference between the values of the first pair of bytes (both interpreted as type unsigned char) that differ in the strings being compared.

In glibc, as in most other implementations, the return value is the arithmetic result of subtracting the last compared byte in s2 from the last compared byte in s1. (If the two characters are equal, this difference is 0.)

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89, SVr4, 4.3BSD.

EXAMPLES

The program below can be used to demonstrate the operation of strcmp() (when given two arguments) and strncmp() (when given three arguments). First, some examples using strcmp():

$ ./string_comp ABC ABC
<str1> and <str2> are equal
$ ./string_comp ABC AB      # 'C' is ASCII 67; 'C' - '' = 67
<str1> is greater than <str2> (67)
$ ./string_comp ABA ABZ     # 'A' is ASCII 65; 'Z' is ASCII 90
<str1> is less than <str2> (-25)
$ ./string_comp ABJ ABC
<str1> is greater than <str2> (7)
$ ./string_comp $'\201' A   # 0201 - 0101 = 0100 (or 64 decimal)
<str1> is greater than <str2> (64)

The last example uses bash(1)-specific syntax to produce a string containing an 8-bit ASCII code; the result demonstrates that the string comparison uses unsigned characters.

And then some examples using strncmp():

$ ./string_comp ABC AB 3
<str1> is greater than <str2> (67)
$ ./string_comp ABC AB 2
<str1> and <str2> are equal in the first 2 bytes

Program source

/* string_comp.c
   Licensed under GNU General Public License v2 or later.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int
main(int argc, char *argv[])
{
    int res;
    if (argc < 3) {
        fprintf(stderr, "Usage: %s <str1> <str2> [<len>]

“, argv[0]); exit(EXIT_FAILURE); } if (argc == 3) res = strcmp(argv[1], argv[2]); else res = strncmp(argv[1], argv[2], atoi(argv[3])); if (res == 0) { printf(" and are equal”); if (argc > 3) printf(" in the first %d bytes “, atoi(argv[3])); printf(” “); } else if (res < 0) { printf(" is less than (%d) “, res); } else { printf(" is greater than (%d) “, res); } exit(EXIT_SUCCESS); }

SEE ALSO

memcmp(3), strcasecmp(3), strcoll(3), string(3), strncasecmp(3), strverscmp(3), wcscmp(3), wcsncmp(3), ascii(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

160 - Linux cli command X11_Protocol_Ext_XC_MISCpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command X11_Protocol_Ext_XC_MISCpm and provides detailed information about the command X11_Protocol_Ext_XC_MISCpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the X11_Protocol_Ext_XC_MISCpm.

NAME 🖥️ X11_Protocol_Ext_XC_MISCpm 🖥️

Perl module for the X11 Protocol XC-MISC Extension

SYNOPSIS

use X11::Protocol; $x = X11::Protocol->new(); $x->init_extension(XC-MISC);

DESCRIPTION

This module is used by the programmer to pre-acquire large numbers of X resource IDs to be used with the X11::Protocol module.

If supported by the server, X11::Protocol will load this module automatically when additional resource IDs are needed via the standard new_rsrc() interface. However, if you anticipate that a program will run for a long time and allocate many resources, it would be a good idea to initialize the extension at startup to verify its existence.

REQUESTS

This extension adds three requests, called as shown below:

$x->XCMiscGetVersion => ($major, $minor) $x->XCMiscGetXIDRange => ($start_id, $count) $x->XCMiscGetXIDList($count) => ($count, @ids)

AUTHOR

Jay Kominek <[email protected]>.

SEE ALSO

perl (1), X11::Protocol, XC-MISC Extension (X Consortium Standard).

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

161 - Linux cli command Package_Stashpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Package_Stashpm and provides detailed information about the command Package_Stashpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Package_Stashpm.

NAME 🖥️ Package_Stashpm 🖥️

Routines for manipulating stashes

VERSION

version 0.40

SYNOPSIS

my $stash = Package::Stash->new(Foo); $stash->add_symbol(%foo, {bar => 1}); # $Foo::foo{bar} == 1 $stash->has_symbol($foo) # false my $namespace = $stash->namespace; *{ $namespace->{foo} }{HASH} # {bar => 1}

DESCRIPTION

Manipulating stashes (Perl’s symbol tables) is occasionally necessary, but incredibly messy, and easy to get wrong. This module hides all of that behind a simple API.

NOTE: Most methods in this class require a variable specification that includes a sigil. If this sigil is absent, it is assumed to represent the IO slot.

Due to limitations in the typeglob API available to perl code, and to typeglob manipulation in perl being quite slow, this module provides two implementations - one in pure perl, and one using XS. The XS implementation is to be preferred for most usages; the pure perl one is provided for cases where XS modules are not a possibility. The current implementation in use can be set by setting $ENV{PACKAGE_STASH_IMPLEMENTATION} or $Package::Stash::IMPLEMENTATION before loading Package::Stash (with the environment variable taking precedence), otherwise, it will use the XS implementation if possible, falling back to the pure perl one.

METHODS

new $package_name

Creates a new Package::Stash object, for the package given as the only argument.

name

Returns the name of the package that this object represents.

namespace

Returns the raw stash itself.

add_symbol $variable $value %opts

Adds a new package symbol, for the symbol given as $variable, and optionally gives it an initial value of $value. $variable should be the name of variable including the sigil, so

Package::Stash->new(Foo)->add_symbol(%foo)

will create %Foo::foo.

Valid options (all optional) are filename, first_line_num, and last_line_num.

$opts{filename}, $opts{first_line_num}, and $opts{last_line_num} can be used to indicate where the symbol should be regarded as having been defined. Currently these values are only used if the symbol is a subroutine (’&’ sigil) and only if $^P & 0x10 is true, in which case the special %DB::sub hash is updated to record the values of filename, first_line_num, and last_line_num for the subroutine. If these are not passed, their values are inferred (as much as possible) from caller information.

remove_glob $name

Removes all package variables with the given name, regardless of sigil.

has_symbol $variable

Returns whether or not the given package variable (including sigil) exists.

get_symbol $variable

Returns the value of the given package variable (including sigil).

get_or_add_symbol $variable

Like get_symbol, except that it will return an empty hashref or arrayref if the variable doesn’t exist.

remove_symbol $variable

Removes the package variable described by $variable (which includes the sigil); other variables with the same name but different sigils will be untouched.

list_all_symbols $type_filter

Returns a list of package variable names in the package, without sigils. If a type_filter is passed, it is used to select package variables of a given type, where valid types are the slots of a typeglob (‘SCALAR’, ‘CODE’, ‘HASH’, etc). Note that if the package contained any BEGIN blocks, perl will leave an empty typeglob in the BEGIN slot, so this will show up if no filter is used (and similarly for INIT, END, etc).

get_all_symbols $type_filter

Returns a hashref, keyed by the variable names in the package. If $type_filter is passed, the hash will contain every variable of that type in the package as values, otherwise, it will contain the typeglobs corresponding to the variable names (basically, a clone of the stash).

This is especially useful for debuggers and profilers, which use %DB::sub to determine where the source code for a subroutine can be found. See <http://perldoc.perl.org/perldebguts.html#Debugger-Internals> for more information about %DB::sub.

WORKING WITH VARIABLES

It is important to note, that when working with scalar variables, the default behavior is to copy values.

my $stash = Package::Stash->new(Some::Namespace); my $variable = 1; # $Some::Namespace::name is a copy of $variable $stash->add_symbol($name, $variable); $variable++ # $Some::Namespace::name == 1 , $variable == 2

This will likely confuse people who expect it to work the same as typeglob assignment, which simply creates new references to existing variables.

my $variable = 1; { no strict refs; # assign $Package::Stash::name = $variable *{Package::Stash::name} = \variable; } $variable++ # affects both names

If this behaviour is desired when working with Package::Stash, simply pass Package::Stash a scalar ref:

my $stash = Package::Stash->new(Some::Namespace); my $variable = 1; # $Some::Namespace::name is now $variable $stash->add_symbol($name, \variable); $variable++ # $Some::Namespace::name == 2 , $variable == 2

This will be what you want as well if you’re ever working with Readonly variables:

use Readonly; Readonly my $value, hello; $stash->add_symbol($name, \value); # reference print $Some::Namespace::name; # hello # Tries to modify the read-only hello and dies. $Some::Namespace::name .= " world"; $stash->add_symbol($name, $value); # copy print $Some::Namespace::name; # hello # No problem, modifying a copy, not the original $Some::Namespace::name .= " world";

BUGS / CAVEATS

  • Prior to perl 5.10, scalar slots are only considered to exist if they are defined This is due to a shortcoming within perl itself. See Making References in perlref point 7 for more information.

  • GLOB and FORMAT variables are not (yet) accessible through this module.

  • Also, see the BUGS section for the specific backends (Package::Stash::XS and Package::Stash::PP)

SEE ALSO

  • Class::MOP::Package This module is a factoring out of code that used to live here

HISTORY

Based on code from Class::MOP::Package, by Stevan Little and the Moose Cabal.

SUPPORT

Bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=Package-Stash> (or [email protected] <mailto:[email protected]>).

AUTHORS

CONTRIBUTORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2022 by Jesse Luehrs.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

162 - Linux cli command XML_ESISParserpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_ESISParserpm and provides detailed information about the command XML_ESISParserpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_ESISParserpm.

NAME 🖥️ XML_ESISParserpm 🖥️

Perl SAX parser using nsgmls

SYNOPSIS

use XML::ESISParser; $parser = XML::ESISParser->new( [OPTIONS] ); $result = $parser->parse( [OPTIONS] ); $result = $parser->parse($string);

DESCRIPTION

XML::ESISParser is a Perl SAX parser using the `nsgmls’ command of James Clark’s SGML Parser (SP), a validating XML and SGML parser. This man page summarizes the specific options, handlers, and properties supported by XML::ESISParser; please refer to the Perl SAX standard in `SAX.pod’ for general usage information.

XML::ESISParser defaults to parsing XML and has an option for parsing SGML.

`nsgmls’ source, and binaries for some platforms, is available from <http://www.jclark.com/>. `nsgmls’ is included in both the SP and Jade packages.

METHODS

new
Creates a new parser object. Default options for parsing, described below, are passed as key-value pairs or as a single hash. Options may be changed directly in the parser object unless stated otherwise. Options passed to `parse()’ override the default options in the parser object for the duration of the parse.

OPTIONS

The following options are supported by XML::ESISParser:

Handler default handler to receive events DocumentHandler handler to receive document events DTDHandler handler to receive DTD events ErrorHandler handler to receive error events Source hash containing the input source for parsing IsSGML the document to be parsed is in SGML

If no handlers are provided then all events will be silently ignored.

If a single string argument is passed to the `parse()’ method, it is treated as if a `Source’ option was given with a `String’ parameter.

The `Source’ hash may contain the following parameters:

ByteStream The raw byte stream (file handle) containing the document. String A string containing the document. SystemId The system identifier (URI) of the document.

If more than one of `ByteStream’, `String’, or `SystemId’, then preference is given first to `ByteStream’, then `String’, then `SystemId'.

HANDLERS

The following handlers and properties are supported by XML::ESISParser:

DocumentHandler methods

start_document
Receive notification of the beginning of a document. No properties defined.

end_document
Receive notification of the end of a document. No properties defined.

start_element
Receive notification of the beginning of an element. Name The element type name. Attributes A hash containing the attributes attached to the element, if any. IncludedSubelement This element is an included subelement. Empty This element is declared empty. The `Attributes’ hash contains only string values. The `Empty’ flag is not set for an element that merely has no content, it is set only if the DTD declares it empty. BETA: Attribute values currently do not expand SData entities into entity objects, they are still in the system data notation used by nsgmls (inside `|’). A future version of XML::ESISParser will also convert other types of attributes into their respective objects, currently just their notation or entity names are given.

end_element
Receive notification of the end of an element. Name The element type name.

characters
Receive notification of character data. Data The characters from the document.

record_end
Receive notification of a record end sequence. XML applications should convert this to a new-line.

processing_instruction
Receive notification of a processing instruction. Target The processing instruction target in XML. Data The processing instruction data, if any.

internal_entity_ref
Receive notification of a system data (SData) internal entity reference. Name The name of the internal entity reference.

external_entity_ref
Receive notification of a external entity reference. Name The name of the external entity reference.

start_subdoc
Receive notification of the start of a sub document. Name The name of the external entity reference.

end_subdoc
Receive notification of the end of a sub document. Name The name of the external entity reference.

conforming
Receive notification that the document just parsed conforms to it’s document type declaration (DTD). No properties defined.

DTDHandler methods

external_entity_decl
Receive notification of an external entity declaration. Name The entitys entity name. Type The entitys type (CDATA, NDATA, etc.) SystemId The entitys system identifier. PublicId The entitys public identifier, if any. GeneratedId Generated system identifiers, if any.

internal_entity_decl
Receive notification of an internal entity declaration. Name The entitys entity name. Type The entitys type (CDATA, NDATA, etc.) Value The entitys character value.

notation_decl
Receive notification of a notation declaration. Name The notations name. SystemId The notations system identifier. PublicId The notations public identifier, if any. GeneratedId Generated system identifiers, if any.

subdoc_entity_decl
Receive notification of a subdocument entity declaration. Name The entitys entity name. SystemId The entitys system identifier. PublicId The entitys public identifier, if any. GeneratedId Generated system identifiers, if any.

external_sgml_entity_decl
Receive notification of an external SGML-entity declaration. Name The entitys entity name. SystemId The entitys system identifier. PublicId The entitys public identifier, if any. GeneratedId Generated system identifiers, if any.

AUTHOR

Ken MacLeod, [email protected]

SEE ALSO

perl (1), PerlSAX.pod (3)

Extensible Markup Language (XML) <http://www.w3c.org/XML/> SAX 1.0: The Simple API for XML <http://www.megginson.com/SAX/> SGML Parser (SP) <http://www.jclark.com/sp/>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

163 - Linux cli command XtMapWidget

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtMapWidget and provides detailed information about the command XtMapWidget, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtMapWidget.

NAME 🖥️ XtMapWidget 🖥️

map and unmap widgets

SYNTAX

#include <X11/Intrinsic.h>

void XtMapWidget(Widget w );

void XtSetMappedWhenManaged(Widget w, Boolean map_when_managed);

void XtUnmapWidget(Widget w );

ARGUMENTS

map_when_managed
Specifies a Boolean value that indicates the new value of the map_when_managed field.

  1. Specifies the widget.

DESCRIPTION

If the widget is realized and managed and if the new value of map_when_managed is True, XtSetMappedWhenManaged maps the window. If the widget is realized and managed and if the new value of map_when_managed is False, it unmaps the window. XtSetMappedWhenManaged is a convenience function that is equivalent to (but slightly faster than) calling XtSetValues and setting the new value for the mappedWhenManaged resource. As an alternative to using XtSetMappedWhenManaged to control mapping, a client may set mapped_when_managed to False and use XtMapWidget and XtUnmapWidget explicitly.

SEE ALSO

XtManageChildren(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

164 - Linux cli command Regexp_Common_delimitedpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_delimitedpm and provides detailed information about the command Regexp_Common_delimitedpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_delimitedpm.

NAME 🖥️ Regexp_Common_delimitedpm 🖥️

  • provides a regex for delimited strings

SYNOPSIS

use Regexp::Common qw /delimited/; while (<>) { /$RE{delimited}{-delim=>"}/ and print a \ delimited string; /$RE{delimited}{-delim=>/}/ and print a \ delimited string; }

DESCRIPTION

Please consult the manual of Regexp::Common for a general description of the works of this interface.

Do not use this module directly, but load it via Regexp::Common.

“$RE{delimited}{-delim}{-cdelim}{-esc}”

Returns a pattern that matches a single-character-delimited substring, with optional internal escaping of the delimiter.

When -delim = S> is specified, each character in the sequence S is a possible delimiter. There is no default delimiter, so this flag must always be specified.

By default, the closing delimiter is the same character as the opening delimiter. If this is not wanted, for instance, if you want to match a string with symmetric delimiters, you can specify the closing delimiter(s) with -cdelim = S>. Each character in S is matched with the corresponding character supplied with the -delim option. If the -cdelim option has less characters than the -delim option, the last character is repeated as often as necessary. If the -cdelim option has more characters than the -delim option, the extra characters are ignored.

If -esc = S> is specified, each character in the sequence S is the delimiter for the corresponding character in the -delim=S list. The default escape is backslash.

For example:

$RE{delimited}{-delim=>"} # match “a \ delimited string” $RE{delimited}{-delim=>"}{-esc=>"} # match “a "” delimited string" $RE{delimited}{-delim=>/} # match /a \ delimited string/ $RE{delimited}{-delim=>q{"}} # match “string” or string $RE{delimited}{-delim=>"("}{-cdelim=>")"} # match (string)

Under -keep (See Regexp::Common):

$1
captures the entire match

$2
captures the opening delimiter

$3
captures delimited portion of the string

$4
captures the closing delimiter

$RE{quoted}{-esc}

A synonym for $RE {delimited} {-delim => q {"`}} {...}.

$RE {bquoted} {-esc}

This is a pattern which matches delimited strings, where the delimiters are a set of matching brackets. Currently, this comes 85 pairs. This includes the 60 pairs of bidirection paired brackets, as listed in <http://www.unicode.org/Public/UNIDATA/BidiBrackets.txt>.

The other 25 pairs are the quotation marks, the double quotation marks, the single and double pointing quoation marks, the heavy single and double commas, 4 pairs of top-bottom parenthesis and brackets, 9 pairs of presentation form for vertical brackets, and the low paraphrase, raised omission, substitution, double substitution, and transposition brackets.

In a future update, pairs may be added (or deleted).

This pattern requires perl 5.14.0 or higher.

For a full list of bracket pairs, inspect the output of Regexp::Common::delimited::bracket_pair (), which returns a list of two element arrays, each holding the Unicode names of matching pair of delimiters.

The {-esc => S } works as in the $RE {delimited} pattern.

If {-keep} is given, the following things will be captured:

$1
captures the entire match

$2
captures the opening delimiter

$3
captures delimited portion of the string

$4
captures the closing delimiter

SEE ALSO

Regexp::Common for a general description of how to use this interface.

AUTHOR

Damian Conway ([email protected])

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

For a start, there are many common regexes missing. Send them in to [email protected].

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

165 - Linux cli command Image_ExifTool_MWGpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_MWGpm and provides detailed information about the command Image_ExifTool_MWGpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_MWGpm.

NAME 🖥️ Image_ExifTool_MWGpm 🖥️

Metadata Working Group support

SYNOPSIS

# enable MWG Composite tags use Image::ExifTool::MWG; Image::ExifTool::MWG::Load(); # enable MWG strict mode $Image::ExifTool::MWG::strict = 1; # disable MWG strict mode $Image::ExifTool::MWG::strict = 0;

DESCRIPTION

The MWG module contains Composite tag definitions which are designed to simplify implementation of the Metadata Working Group guidelines. These special MWG Composite tags are enabled by calling the Load() method:

use Image::ExifTool::MWG; Image::ExifTool::MWG::Load();

By default, loading the MWG Composite tags enables “strict MWG conformance” unless previously enabled or disabled by the user. In this mode, ExifTool will generate a Warning instead of extracting EXIF, IPTC and XMP from non-standard locations. The strict mode may be disabled or enabled at any time by setting the MWG “strict” flag to 0 or 1. eg)

$Image::ExifTool::MWG::strict = 0;

This module also contains the MWG XMP tags which are loaded automatically by ExifTool as required, and are independent of the MWG Composite tags which must be loaded explicitly as described above.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.metadataworkinggroup.org/>

SEE ALSO

“MWG Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

166 - Linux cli command putgrent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command putgrent and provides detailed information about the command putgrent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the putgrent.

NAME 🖥️ putgrent 🖥️

write a group database entry to a file

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <grp.h>
int putgrent(const struct group *restrict grp",FILE*restrict"stream);

DESCRIPTION

The putgrent() function is the counterpart for fgetgrent(3). The function writes the content of the provided struct group into the stream. The list of group members must be NULL-terminated or NULL-initialized.

The struct group is defined as follows:

struct group {
    char   *gr_name;      /* group name */
    char   *gr_passwd;    /* group password */
    gid_t   gr_gid;       /* group ID */
    char  **gr_mem;       /* group members */
};

RETURN VALUE

The function returns zero on success, and a nonzero value on error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

putgrent()

Thread safetyMT-Safe

STANDARDS

GNU.

SEE ALSO

fgetgrent(3), getgrent(3), group(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

167 - Linux cli command TAILQ_INSERT_BEFORE

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command TAILQ_INSERT_BEFORE and provides detailed information about the command TAILQ_INSERT_BEFORE, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the TAILQ_INSERT_BEFORE.

NAME 🖥️ TAILQ_INSERT_BEFORE 🖥️

implementation of a doubly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
TAILQ_ENTRY(TYPE);
TAILQ_HEAD(HEADNAME, TYPE);
TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD head);
void TAILQ_INIT(TAILQ_HEAD *head);
int TAILQ_EMPTY(TAILQ_HEAD *head);
void TAILQ_INSERT_HEAD(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_TAIL(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_AFTER(TAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_FIRST(TAILQ_HEAD *head);
struct TYPE *TAILQ_LAST(TAILQ_HEAD *head, HEADNAME);
struct TYPE *TAILQ_PREV(struct TYPE *elm, HEADNAME, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_NEXT(struct TYPE *elm, TAILQ_ENTRY NAME);
TAILQ_FOREACH(struct TYPE *var, TAILQ_HEAD *head,
 TAILQ_ENTRY NAME);
TAILQ_FOREACH_REVERSE(struct TYPE *var, TAILQ_HEAD *head, HEADNAME,
 TAILQ_ENTRY NAME);
void TAILQ_REMOVE(TAILQ_HEAD *head, struct TYPE *elm,
 TAILQ_ENTRY NAME);
void TAILQ_CONCAT(TAILQ_HEAD *head1, TAILQ_HEAD *head2,
 TAILQ_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked tail queues.

In the macro definitions, TYPE is the name of a user defined structure, that must contain a field of type TAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user defined structure that must be declared using the macro TAILQ_HEAD().

Creation

A tail queue is headed by a structure defined by the TAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the queue and the other to the last element in the queue. The elements are doubly linked so that an arbitrary element can be removed without traversing the queue. New elements can be added to the queue after an existing element, before an existing element, at the head of the queue, or at the end of the queue. A TAILQ_HEAD structure is declared as follows:

TAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the queue. A pointer to the head of the queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

TAILQ_ENTRY() declares a structure that connects the elements in the queue.

TAILQ_HEAD_INITIALIZER() evaluates to an initializer for the queue head.

TAILQ_INIT() initializes the queue referenced by

TAILQ_EMPTY() evaluates to true if there are no items on the queue. head.

Insertion

TAILQ_INSERT_HEAD() inserts the new element elm at the head of the queue.

TAILQ_INSERT_TAIL() inserts the new element elm at the end of the queue.

TAILQ_INSERT_BEFORE() inserts the new element elm before the element listelm.

TAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

TAILQ_FIRST() returns the first item on the queue, or NULL if the queue is empty.

TAILQ_LAST() returns the last item on the queue. If the queue is empty the return value is NULL.

TAILQ_PREV() returns the previous item on the queue, or NULL if this item is the first.

TAILQ_NEXT() returns the next item on the queue, or NULL if this item is the last.

TAILQ_FOREACH() traverses the queue referenced by head in the forward direction, assigning each element in turn to var. var is set to NULL if the loop completes normally, or if there were no elements.

TAILQ_FOREACH_REVERSE() traverses the queue referenced by head in the reverse direction, assigning each element in turn to var.

Removal

TAILQ_REMOVE() removes the element elm from the queue.

Other features

TAILQ_CONCAT() concatenates the queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

TAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

TAILQ_FIRST(), TAILQ_LAST(), TAILQ_PREV(), and TAILQ_NEXT() return a pointer to the first, last, previous, or next TYPE structure, respectively.

TAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

STANDARDS

BSD.

HISTORY

4.4BSD.

CAVEATS

TAILQ_FOREACH() and TAILQ_FOREACH_REVERSE() don’t allow var to be removed or freed within the loop, as it would interfere with the traversal. TAILQ_FOREACH_SAFE() and TAILQ_FOREACH_REVERSE_SAFE(), which are present on the BSDs but are not present in glibc, fix this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    TAILQ_ENTRY(entry) entries;             /* Tail queue */
};
TAILQ_HEAD(tailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct tailhead head;                   /* Tail queue head */
    int i;
    TAILQ_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    TAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    TAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    TAILQ_INSERT_AFTER(&head, n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    TAILQ_INSERT_BEFORE(n2, n3, entries);
    TAILQ_REMOVE(&head, n2, entries);       /* Deletion */
    free(n2);
                                            /* Forward traversal */
    i = 0;
    TAILQ_FOREACH(np, &head, entries)
        np->data = i++;
                                            /* Reverse traversal */
    TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = TAILQ_FIRST(&head); while (n1 != NULL) { n2 = TAILQ_NEXT(n1, entries); free(n1); n1 = n2; } TAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

168 - Linux cli command funlockfile

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command funlockfile and provides detailed information about the command funlockfile, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the funlockfile.

NAME 🖥️ funlockfile 🖥️

lock FILE for stdio

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
void flockfile(FILE *filehandle);
int ftrylockfile(FILE *filehandle);
void funlockfile(FILE *filehandle);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    /* Since glibc 2.24: */ _POSIX_C_SOURCE >= 199309L
        || /* glibc <= 2.23: */ _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The stdio functions are thread-safe. This is achieved by assigning to each FILE object a lockcount and (if the lockcount is nonzero) an owning thread. For each library call, these functions wait until the FILE object is no longer locked by a different thread, then lock it, do the requested I/O, and unlock the object again.

(Note: this locking has nothing to do with the file locking done by functions like flock(2) and lockf(3).)

All this is invisible to the C-programmer, but there may be two reasons to wish for more detailed control. On the one hand, maybe a series of I/O actions by one thread belongs together, and should not be interrupted by the I/O of some other thread. On the other hand, maybe the locking overhead should be avoided for greater efficiency.

To this end, a thread can explicitly lock the FILE object, then do its series of I/O actions, then unlock. This prevents other threads from coming in between. If the reason for doing this was to achieve greater efficiency, one does the I/O with the nonlocking versions of the stdio functions: with getc_unlocked(3) and putc_unlocked(3) instead of getc(3) and putc(3).

The flockfile() function waits for *filehandle to be no longer locked by a different thread, then makes the current thread owner of *filehandle, and increments the lockcount.

The funlockfile() function decrements the lock count.

The ftrylockfile() function is a nonblocking version of flockfile(). It does nothing in case some other thread owns *filehandle, and it obtains ownership and increments the lockcount otherwise.

RETURN VALUE

The ftrylockfile() function returns zero for success (the lock was obtained), and nonzero for failure.

ERRORS

None.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

flockfile(), ftrylockfile(), funlockfile()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

These functions are available when _POSIX_THREAD_SAFE_FUNCTIONS is defined.

SEE ALSO

unlocked_stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

169 - Linux cli command Sub_Identifypm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Sub_Identifypm and provides detailed information about the command Sub_Identifypm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Sub_Identifypm.

NAME 🖥️ Sub_Identifypm 🖥️

Retrieve names of code references

SYNOPSIS

use Sub::Identify :all; my $subname = sub_name( $some_coderef ); my $packagename = stash_name( $some_coderef ); # or, to get all at once… my $fully_qualified_name = sub_fullname( $some_coderef ); defined $subname and say “this coderef points to sub $subname in package $packagename”; my ($file, $line) = get_code_location( $some_coderef ); $file and say “this coderef is defined at line $line in file $file”; is_sub_constant( $some_coderef ) and say “this coderef points to a constant subroutine”;

DESCRIPTION

Sub::Identify allows you to retrieve the real name of code references.

It provides six functions, all of them taking a code reference.

sub_name returns the name of the code reference passed as an argument (or _ _ANON_ _ if it’s an anonymous code reference), stash_name returns its package, and sub_fullname returns the concatenation of the two.

get_code_info returns a list of two elements, the package and the subroutine name (in case of you want both and are worried by the speed.)

In case of subroutine aliasing, those functions always return the original name.

get_code_location returns a two-element list containing the file name and the line number where the subroutine has been defined.

is_sub_constant returns a boolean value indicating whether the subroutine is a constant or not.

Pure-Perl version

By default Sub::Identify tries to load an XS implementation of the get_code_info, get_code_location and (on perl versions 5.16.0 and later) is_sub_constant functions, for speed; if that fails, or if the environment variable PERL_SUB_IDENTIFY_PP is defined to a true value, it will fall back to a pure perl implementation, that uses perl’s introspection mechanism, provided by the B module.

SEE ALSO

Sub::Util, part of the module distribution Scalar::List::Utils since version 1.40. Since this will be a core module starting with perl 5.22.0, it is encouraged to migrate to Sub::Util when possible.

Sub::Name

SOURCE

A git repository for the sources is at <https://github.com/rgs/Sub-Identify>.

LICENSE

(c) Rafael Garcia-Suarez (rgs at consttype dot org) 2005, 2008, 2012, 2014, 2015

This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

170 - Linux cli command HTML_Element_traversepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_Element_traversepm and provides detailed information about the command HTML_Element_traversepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_Element_traversepm.

NAME 🖥️ HTML_Element_traversepm 🖥️

discussion of HTML::Element’s traverse method

VERSION

This document describes version 5.07 of HTML::Element::traverse, released August 31, 2017 as part of HTML-Tree.

SYNOPSIS

# $element->traverse is unnecessary and obscure. # Dont use it in new code.

DESCRIPTION

HTML::Element provides a method traverse that traverses the tree and calls user-specified callbacks for each node, in pre- or post-order. However, use of the method is quite superfluous: if you want to recursively visit every node in the tree, it’s almost always simpler to write a subroutine does just that, than it is to bundle up the pre- and/or post-order code in callbacks for the traverse method.

EXAMPLES

Suppose you want to traverse at/under a node $tree and give elements an ‘id’ attribute unless they already have one.

You can use the traverse method:

{ my $counter = x0000; $start_node->traverse( [ # Callbacks; # pre-order callback: sub { my $x = $_[0]; $x->attr(id, $counter++) unless defined $x->attr(id); return HTML::Element::OK; # keep traversing }, # post-order callback: undef ], 1, # dont call the callbacks for text nodes ); }

or you can just be simple and clear (and not have to understand the calling format for traverse) by writing a sub that traverses the tree by just calling itself:

{ my $counter = x0000; sub give_id { my $x = $_[0]; $x->attr(id, $counter++) unless defined $x->attr(id); foreach my $c ($x->content_list) { give_id($c) if ref $c; # ignore text nodes } }; give_id($start_node); }

See, isn’t that nice and clear?

But, if you really need to know:

THE TRAVERSE METHOD

The traverse() method is a general object-method for traversing a tree or subtree and calling user-specified callbacks. It accepts the following syntaxes:

$h->traverse(\callback)

or $h->traverse(\callback, $ignore_text)

or $h->traverse( [\pre_callback,\post_callback] , $ignore_text)

These all mean to traverse the element and all of its children. That is, this method starts at node $h, pre-order visits $h, traverses its children, and then will post-order visit $h. Visiting means that the callback routine is called, with these arguments:

$_[0] : the node (element or text segment), $_[1] : a startflag, and $_[2] : the depth

If the $ignore_text parameter is given and true, then the pre-order call will not be happen for text content.

The startflag is 1 when we enter a node (i.e., in pre-order calls) and 0 when we leave the node (in post-order calls).

Note, however, that post-order calls don’t happen for nodes that are text segments or are elements that are prototypically empty (like br, hr, etc.).

If we visit text nodes (i.e., unless $ignore_text is given and true), then when text nodes are visited, we will also pass two extra arguments to the callback:

$_[3] : the element thats the parent of this text node $_[4] : the index of this text node in its parents content list

Note that you can specify that the pre-order routine can be a different routine from the post-order one:

$h->traverse( [\pre_callback,\post_callback], …);

You can also specify that no post-order calls are to be made, by providing a false value as the post-order routine:

$h->traverse([ \pre_callback,0 ], …);

And similarly for suppressing pre-order callbacks:

$h->traverse([ 0,\post_callback ], …);

Note that these two syntaxes specify the same operation:

$h->traverse([\foo,\foo], …); $h->traverse( \foo , …);

The return values from calls to your pre- or post-order routines are significant, and are used to control recursion into the tree.

These are the values you can return, listed in descending order of my estimation of their usefulness:

HTML::Element::OK, 1, or any other true value
…to keep on traversing. Note that HTML::Element::OK et al are constants. So if you’re running under use strict (as I hope you are), and you say: return HTML::Element::PRUEN the compiler will flag this as an error (an unallowable bareword, specifically), whereas if you spell PRUNE correctly, the compiler will not complain.

undef, 0, ‘0’, ‘’, or HTML::Element::PRUNE
…to block traversing under the current element’s content. (This is ignored if received from a post-order callback, since by then the recursion has already happened.) If this is returned by a pre-order callback, no post-order callback for the current node will happen. (Recall that if your callback exits with just return;, it is returning undef Ω- at least in scalar context, and traverse always calls your callbacks in scalar context.)

HTML::Element::ABORT
…to abort the whole traversal immediately. This is often useful when you’re looking for just the first node in the tree that meets some criterion of yours.

HTML::Element::PRUNE_UP
…to abort continued traversal into this node and its parent node. No post-order callback for the current or parent node will happen.

HTML::Element::PRUNE_SOFTLY
Like PRUNE, except that the post-order call for the current node is not blocked.

Almost every task to do with extracting information from a tree can be expressed in terms of traverse operations (usually in only one pass, and usually paying attention to only pre-order, or to only post-order), or operations based on traversing. (In fact, many of the other methods in this class are basically calls to traverse() with particular arguments.)

The source code for HTML::Element and HTML::TreeBuilder contain several examples of the use of the traverse method to gather information about the content of trees and subtrees.

(Note: you should not change the structure of a tree while you are traversing it.)

[End of documentation for the traverse() method]

Traversing with Recursive Anonymous Routines

Now, if you’ve been reading Structure and Interpretation of Computer Programs too much, maybe you even want a recursive lambda. Go ahead:

{ my $counter = x0000; my $give_id; $give_id = sub { my $x = $_[0]; $x->attr(id, $counter++) unless defined $x->attr(id); foreach my $c ($x->content_list) { $give_id->($c) if ref $c; # ignore text nodes } }; $give_id->($start_node); undef $give_id; }

It’s a bit nutty, and it’s still more concise than a call to the traverse method!

It is left as an exercise to the reader to figure out how to do the same thing without using a $give_id symbol at all.

It is also left as an exercise to the reader to figure out why I undefine $give_id, above; and why I could achieved the same effect with any of:

$give_id = I like pie!; # or… $give_id = []; # or even; $give_id = sub { print “Mmmm pie! " };

But not:

$give_id = sub { print “Im $give_id and I like pie! " }; # nor… $give_id = \give_id; # nor… $give_id = { pie => \give_id, mode => a la };

Doing Recursive Things Iteratively

Note that you may at times see an iterative implementation of pre-order traversal, like so:

{ my @to_do = ($tree); # start-node while(@to_do) { my $this = shift @to_do; # “Visit” the node: $this->attr(id, $counter++) unless defined $this->attr(id); unshift @to_do, grep ref $_, $this->content_list; # Put children on the stack – theyll be visited next } }

This can under certain circumstances be more efficient than just a normal recursive routine, but at the cost of being rather obscure. It gains efficiency by avoiding the overhead of function-calling, but since there are several method dispatches however you do it (to attr and content_list), the overhead for a simple function call is insignificant.

Pruning and Whatnot

The traverse method does have the fairly neat features of the ABORT, PRUNE_UP and PRUNE_SOFTLY signals. None of these can be implemented totally straightforwardly with recursive routines, but it is quite possible. ABORT-like behavior can be implemented either with using non-local returning with eval/die:

my $died_on; # if you need to know where… sub thing { … visits $_[0]… … maybe set $died_on to $_[0] and die “ABORT_TRAV” … … else call thing($child) for each child… …any post-order visiting $_[0]… } eval { thing($node) }; if($@) { if($@ =~ m<^ABORT_TRAV>) { …it died (aborted) on $died_on… } else { die $@; # some REAL error happened } }

or you can just do it with flags:

my($abort_flag, $died_on); sub thing { … visits $_[0]… … maybe set $abort_flag = 1; $died_on = $_[0]; return; foreach my $c ($_[0]->content_list) { thing($c); return if $abort_flag; } …any post-order visiting $_[0]… return; } $abort_flag = $died_on = undef; thing($node); …if defined $abort_flag, it died on $died_on

SEE ALSO

HTML::Element

AUTHOR

Current maintainers:

  • Christopher J. Madsen <perl AT cjmweb.net>

  • Jeff Fearn <jfearn AT cpan.org>

Original HTML-Tree author:

  • Gisle Aas

Former maintainers:

  • Sean M. Burke

  • Andy Lester

  • Pete Krawczyk <petek AT cpan.org>

You can follow or contribute to HTML-Tree’s development at <https://github.com/kentfredric/HTML-Tree>.

COPYRIGHT

Copyright 2000,2001 Sean M. Burke

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

171 - Linux cli command Image_ExifTool_MXFpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_MXFpm and provides detailed information about the command Image_ExifTool_MXFpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_MXFpm.

NAME 🖥️ Image_ExifTool_MXFpm 🖥️

Read MXF meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read meta information from MXF (Material Exchange Format) files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://sourceforge.net/projects/mxflib/>

<http://www.aafassociation.org/downloads/whitepapers/MXFPhysicalview.pdf>

<http://archive.nlm.nih.gov/pubs/pearson/MJ2_Metadata2005.pdf>

<http://www.aafassociation.org/downloads/specifications/AMWA-AS-03-Delivery-Spec-1_0.pdf>

<http://paul-sampson.ca/private/s385m.pdf>

<http://avwiki.nl/documents/eg41.pdf>

<http://avwiki.nl/documents/eg42.pdf>

<http://www.amwa.tv/downloads/specifications/aafobjectspec-v1.1.pdf>

<http://www.smpte-ra.org/mdd/RP210v12-publication-20100623.xls>

<http://rhea.tele.ucl.ac.be:8081/Plone/Members/egoray/thesaurus-dictionnaire-metadata/>

<http://www.mog-solutions.com/img_upload/PDF/XML%20Schema%20for%20MXF%20Metadata.pdf>

<http://www.freemxf.org/freemxf_board/viewtopic.php?p=545&sid=00a5c17e07d828c1e93ecdbaed3076f7>

SEE ALSO

“MXF Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

172 - Linux cli command printf_functiontype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command printf_functiontype and provides detailed information about the command printf_functiontype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the printf_functiontype.

NAME 🖥️ printf_functiontype 🖥️

define custom behavior for printf-like functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <printf.h>
int register_printf_specifier(int spec, printf_function func,
 printf_arginfo_size_function arginfo);
int register_printf_modifier(const wchar_t *str);
int register_printf_type(printf_va_arg_function fct);

Callbacks

typedef int printf_function(FILE *stream, const struct printf_info *info,
 const void *const args[]);
typedef int printf_arginfo_size_function(const struct printf_info *info,
 size_t n, int argtypes[n], int size[n]);
typedef void printf_va_arg_function(void *mem, va_list *ap);

Types

struct printf_info {
 int prec; // Precision
 int width; // Width
 wchar_t spec; // Format letter
 unsigned int is_long_double:1;// L or ll flag
 unsigned int is_short:1; // h flag
 unsigned int is_long:1; // l flag
 unsigned int alt:1; // # flag
 unsigned int space:1; // Space flag
 unsigned int left:1; // - flag
 unsigned int showsign:1; // + flag
 unsigned int group:1; // ' flag
 unsigned int extra:1; // For special use
 unsigned int is_char:1; // hh flag
 unsigned int wide:1; // True for wide character streams
 unsigned int i18n:1; // I flag
 unsigned int is_binary128:1; /* Floating-point argument is
  ABI-compatible with
  IEC 60559 binary128 */
 unsigned short user; // Bits for user-installed modifiers
 wchar_t pad; // Padding character
};

Constants

#define PA_FLAG_LONG_LONG /* ... */
#define PA_FLAG_LONG_DOUBLE /* ... */
#define PA_FLAG_LONG /* ... */
#define PA_FLAG_SHORT /* ... */
#define PA_FLAG_PTR /* ... */

DESCRIPTION

These functions serve to extend and/or modify the behavior of the printf(3) family of functions.

register_printf_specifier()

This function registers a custom conversion specifier for the printf(3) family of functions.

spec
The character which will be used as a conversion specifier in the format string.

func
Callback function that will be executed by the printf(3) family of functions to format the input arguments into the output stream.

stream
Output stream where the formatted output should be printed. This stream transparently represents the output, even in the case of functions that write to a string.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in arginfo.

args
Array of pointers to the arguments to the printf(3) -like function.

arginfo
Callback function that will be executed by the printf(3) family of functions to know how many arguments should be parsed for the custom specifier and also their types.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in func.

n
Number of arguments remaining to be parsed.

argtypes
This array should be set to define the type of each of the arguments that will be parsed. Each element in the array represents one of the arguments to be parsed, in the same order that they are passed to the printf(3) -like function. Each element should be set to a base type (PA_*) from the enum above, or a custom one, and optionally ORed with an appropriate length modifier (PA_FLAG_*).

The type is determined by using one of the following constants:

PA_INT
int.

PA_CHAR
int, cast to char.

PA_WCHAR
wchar_t.

PA_STRING
const char *, a ‘�’-terminated string.

PA_WSTRING
const wchar_t *, a wide character L’�’-terminated string.

PA_POINTER
void *.

PA_FLOAT
float.

PA_DOUBLE
double.

PA_LAST
TODO.

size
For user-defined types, the size of the type (in bytes) should also be specified through this array. Otherwise, leave it unused.

arginfo is called before func, and prepares some information needed to call func.

register_printf_modifier()

TODO

register_printf_type()

TODO

RETURN VALUE

register_printf_specifier(), register_printf_modifier(), and register_printf_type() return zero on success, or -1 on error.

Callbacks

The callback of type printf_function should return the number of characters written, or -1 on error.

The callback of type printf_arginfo_size_function should return the number of arguments to be parsed by this specifier. It also passes information about the type of those arguments to the caller through argtypes. On error, it should return -1.

ERRORS

EINVAL
The specifier was not a valid character.

STANDARDS

GNU.

HISTORY

register_printf_function(3) is an older function similar to register_printf_specifier(), and is now deprecated. That function can’t handle user-defined types.

register_printf_specifier() supersedes register_printf_function(3).

EXAMPLES

The following example program registers the ‘b’ and ‘B’ specifiers to print integers in binary format, mirroring rules for other unsigned conversion specifiers like ‘x’ and ‘u’. This can be used to print in binary prior to C23.

/* This code is in the public domain */
#include <err.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <printf.h>
#define GROUP_SEP  '\''
struct Printf_Pad {
    char    ch;
    size_t  len;
};
static int b_printf(FILE *stream, const struct printf_info *info,
                    const void *const args[]);
static int b_arginf_sz(const struct printf_info *info,
                    size_t n, int argtypes[n], int size[n]);
static uintmax_t b_value(const struct printf_info *info,
                    const void *arg);
static size_t b_bin_repr(char bin[UINTMAX_WIDTH],
                    const struct printf_info *info, const void *arg);
static size_t b_bin_len(const struct printf_info *info,
                    ptrdiff_t min_len);
static size_t b_pad_len(const struct printf_info *info,
                    ptrdiff_t bin_len);
static ssize_t b_print_prefix(FILE *stream,
                    const struct printf_info *info);
static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info,
                    ptrdiff_t min_len);
static ssize_t b_print_number(FILE *stream,
                    const struct printf_info *info,
                    const char bin[UINTMAX_WIDTH],
                    size_t min_len, size_t bin_len);
static char pad_ch(const struct printf_info *info);
static ssize_t pad_spaces(FILE *stream, size_t pad_len);
int
main(void)
{
    if (register_printf_specifier('b', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('b', ...)");
    if (register_printf_specifier('B', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('B', ...)");
    printf("....----....----....----....----

“); printf("%llb; “, 0x5Ellu); printf("%lB; “, 0x5Elu); printf("%b; “, 0x5Eu); printf("%hB; “, 0x5Eu); printf("%hhb; “, 0x5Eu); printf("%jb; “, (uintmax_t)0x5E); printf("%zb; “, (size_t)0x5E); printf(”….—-….—-….—-….—- “); printf(”%#b; “, 0x5Eu); printf(”%#B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf("%10b; “, 0x5Eu); printf("%010b; “, 0x5Eu); printf(”%.10b; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%-10B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%‘B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”….—-….—-….—-….—- “); printf(”%#16.12b; “, 0xAB); printf(”%-#‘20.12b; “, 0xAB); printf(”%#‘020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#020B; “, 0xAB); printf(”%‘020B; “, 0xAB); printf("%020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#021B; “, 0xAB); printf(”%‘021B; “, 0xAB); printf("%021B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#022B; “, 0xAB); printf(”%‘022B; “, 0xAB); printf("%022B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#023B; “, 0xAB); printf(”%‘023B; “, 0xAB); printf("%023B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%-#‘19.11b; “, 0xAB); printf(”%#‘019B; “, 0xAB); printf(”%#019B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%‘019B; “, 0xAB); printf("%019B; “, 0xAB); printf(”%#016b; “, 0xAB); printf(”….—-….—-….—-….—- “); return 0; } static int b_printf(FILE *stream, const struct printf_info *info, const void const args[]) { char bin[UINTMAX_WIDTH]; size_t min_len, bin_len; ssize_t len, tmp; struct Printf_Pad pad = {0}; len = 0; min_len = b_bin_repr(bin, info, args[0]); bin_len = b_bin_len(info, min_len); pad.ch = pad_ch(info); if (pad.ch == ’ ‘) pad.len = b_pad_len(info, bin_len); / Padding with ’ ’ (right aligned) / if ((pad.ch == ’ ‘) && !info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } / “0b”/“0B” prefix / if (info->alt) { tmp = b_print_prefix(stream, info); if (tmp == EOF) return EOF; len += tmp; } / Padding with ‘0’ / if (pad.ch == ‘0’) { tmp = b_pad_zeros(stream, info, min_len); if (tmp == EOF) return EOF; len += tmp; } / Print number (including leading 0s to fill precision) / tmp = b_print_number(stream, info, bin, min_len, bin_len); if (tmp == EOF) return EOF; len += tmp; / Padding with ’ ’ (left aligned) */ if (info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } return len; } static int b_arginf_sz(const struct printf_info *info, size_t n, int argtypes[n], [[maybe_unused]] int size[n]) { if (n < 1) return -1; if (info->is_long_double) argtypes[0] = PA_INT | PA_FLAG_LONG_LONG; else if (info->is_long) argtypes[0] = PA_INT | PA_FLAG_LONG; else argtypes[0] = PA_INT; return 1; } static uintmax_t b_value(const struct printf_info *info, const void *arg) { if (info->is_long_double) return *(const unsigned long long *)arg; if (info->is_long) return *(const unsigned long )arg; / short and char are both promoted to int */ return *(const unsigned int *)arg; } static size_t b_bin_repr(char bin[UINTMAX_WIDTH], const struct printf_info *info, const void *arg) { size_t min_len; uintmax_t val; val = b_value(info, arg); bin[0] = ‘0’; for (min_len = 0; val; min_len++) { bin[min_len] = ‘0’ + (val % 2); val »= 1; } return MAX(min_len, 1); } static size_t b_bin_len(const struct printf_info *info, ptrdiff_t min_len) { return MAX(info->prec, min_len); } static size_t b_pad_len(const struct printf_info *info, ptrdiff_t bin_len) { ptrdiff_t pad_len; pad_len = info->width - bin_len; if (info->alt) pad_len -= 2; if (info->group) pad_len -= (bin_len - 1) / 4; return MAX(pad_len, 0); } static ssize_t b_print_prefix(FILE *stream, const struct printf_info *info) { ssize_t len; len = 0; if (fputc(‘0’, stream) == EOF) return EOF; len++; if (fputc(info->spec, stream) == EOF) return EOF; len++; return len; } static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info, ptrdiff_t min_len) { ssize_t len; ptrdiff_t tmp; len = 0; tmp = info->width - (info->alt * 2); if (info->group) tmp -= tmp / 5 - !(tmp % 5); for (ptrdiff_t i = tmp - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static ssize_t b_print_number(FILE *stream, const struct printf_info info, const char bin[UINTMAX_WIDTH], size_t min_len, size_t bin_len) { ssize_t len; len = 0; / Print leading zeros to fill precision / for (size_t i = bin_len - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } / Print number */ for (size_t i = min_len - 1; i < min_len; i–) { if (fputc(bin[i], stream) == EOF) return EOF; len++; if (!info->group || (i % 4) || !i) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static char pad_ch(const struct printf_info *info) { if ((info->prec != -1) || (info->pad == ’ ‘) || info->left) return ’ ‘; return ‘0’; } static ssize_t pad_spaces(FILE *stream, size_t pad_len) { ssize_t len; len = 0; for (size_t i = pad_len - 1; i < pad_len; i–) { if (fputc(’ ‘, stream) == EOF) return EOF; len++; } return len; }

SEE ALSO

asprintf(3), printf(3), wprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

173 - Linux cli command getdate_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getdate_r and provides detailed information about the command getdate_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getdate_r.

NAME 🖥️ getdate_r 🖥️

convert a date-plus-time string to broken-down time

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <time.h>
struct tm *getdate(const char *string);
extern int getdate_err;
int getdate_r(const char *restrict string, struct tm *restrict res);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getdate():

    _XOPEN_SOURCE >= 500

getdate_r():

    _GNU_SOURCE

DESCRIPTION

The function getdate() converts a string representation of a date and time, contained in the buffer pointed to by string, into a broken-down time. The broken-down time is stored in a tm structure, and a pointer to this structure is returned as the function result. This tm structure is allocated in static storage, and consequently it will be overwritten by further calls to getdate().

In contrast to strptime(3), (which has a format argument), getdate() uses the formats found in the file whose full pathname is given in the environment variable DATEMSK. The first line in the file that matches the given input string is used for the conversion.

The matching is done case insensitively. Superfluous whitespace, either in the pattern or in the string to be converted, is ignored.

The conversion specifications that a pattern can contain are those given for strptime(3). One more conversion specification is specified in POSIX.1-2001:

%Z
Timezone name. This is not implemented in glibc.

When %Z is given, the structure containing the broken-down time is initialized with values corresponding to the current time in the given timezone. Otherwise, the structure is initialized to the broken-down time corresponding to the current local time (as by a call to localtime(3)).

When only the day of the week is given, the day is taken to be the first such day on or after today.

When only the month is given (and no year), the month is taken to be the first such month equal to or after the current month. If no day is given, it is the first day of the month.

When no hour, minute, and second are given, the current hour, minute, and second are taken.

If no date is given, but we know the hour, then that hour is taken to be the first such hour equal to or after the current hour.

getdate_r() is a GNU extension that provides a reentrant version of getdate(). Rather than using a global variable to report errors and a static buffer to return the broken down time, it returns errors via the function result value, and returns the resulting broken-down time in the caller-allocated buffer pointed to by the argument res.

RETURN VALUE

When successful, getdate() returns a pointer to a struct tm. Otherwise, it returns NULL and sets the global variable getdate_err to one of the error numbers shown below. Changes to errno are unspecified.

On success getdate_r() returns 0; on error it returns one of the error numbers shown below.

ERRORS

The following errors are returned via getdate_err (for getdate()) or as the function result (for getdate_r()):

1
The DATEMSK environment variable is not defined, or its value is an empty string.

2
The template file specified by DATEMSK cannot be opened for reading.

3
Failed to get file status information.

4
The template file is not a regular file.

5
An error was encountered while reading the template file.

6
Memory allocation failed (not enough memory available).

7
There is no line in the file that matches the input.

8
Invalid input specification.

ENVIRONMENT

DATEMSK
File containing format patterns.

TZ
LC_TIME
Variables used by strptime(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getdate()

Thread safety

MT-Unsafe race:getdate env locale

getdate_r()

Thread safety

MT-Safe env locale

VERSIONS

The POSIX.1 specification for strptime(3) contains conversion specifications using the %E or %O modifier, while such specifications are not given for getdate(). In glibc, getdate() is implemented using strptime(3), so that precisely the same conversions are supported by both.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

EXAMPLES

The program below calls getdate() for each of its command-line arguments, and for each call displays the values in the fields of the returned tm structure. The following shell session demonstrates the operation of the program:

$ TFILE=$PWD/tfile
$ echo '%A' > $TFILE  # Full name of the day of the week
$ echo '%T' >> $TFILE # Time (HH:MM:SS)
$ echo '%F' >> $TFILE # ISO date (YYYY-MM-DD)
$ date
$ export DATEMSK=$TFILE
$ ./a.out Tuesday '2009-12-28' '12:22:33'
Sun Sep  7 06:03:36 CEST 2008
Call 1 ("Tuesday") succeeded:
    tm_sec   = 36
    tm_min   = 3
    tm_hour  = 6
    tm_mday  = 9
    tm_mon   = 8
    tm_year  = 108
    tm_wday  = 2
    tm_yday  = 252
    tm_isdst = 1
Call 2 ("2009-12-28") succeeded:
    tm_sec   = 36
    tm_min   = 3
    tm_hour  = 6
    tm_mday  = 28
    tm_mon   = 11
    tm_year  = 109
    tm_wday  = 1
    tm_yday  = 361
    tm_isdst = 0
Call 3 ("12:22:33") succeeded:
    tm_sec   = 33
    tm_min   = 22
    tm_hour  = 12
    tm_mday  = 7
    tm_mon   = 8
    tm_year  = 108
    tm_wday  = 0
    tm_yday  = 250
    tm_isdst = 1

Program source

#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int
main(int argc, char *argv[])
{
    struct tm *tmp;
    for (size_t j = 1; j < argc; j++) {
        tmp = getdate(argv[j]);
        if (tmp == NULL) {
            printf("Call %zu failed; getdate_err = %d

“, j, getdate_err); continue; } printf(“Call %zu ("%s") succeeded: “, j, argv[j]); printf(” tm_sec = %d “, tmp->tm_sec); printf(” tm_min = %d “, tmp->tm_min); printf(” tm_hour = %d “, tmp->tm_hour); printf(” tm_mday = %d “, tmp->tm_mday); printf(” tm_mon = %d “, tmp->tm_mon); printf(” tm_year = %d “, tmp->tm_year); printf(” tm_wday = %d “, tmp->tm_wday); printf(” tm_yday = %d “, tmp->tm_yday); printf(” tm_isdst = %d “, tmp->tm_isdst); } exit(EXIT_SUCCESS); }

SEE ALSO

time(2), localtime(3), setlocale(3), strftime(3), strptime(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

174 - Linux cli command islessequal

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command islessequal and provides detailed information about the command islessequal, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the islessequal.

NAME 🖥️ islessequal 🖥️

floating-point relational tests without exception for NaN

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
int isgreater(x, y);
int isgreaterequal(x, y);
int isless(x, y);
int islessequal(x, y);
int islessgreater(x, y);
int isunordered(x, y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

    All functions described here:
        _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The normal relational operations (like <, “less than”) fail if one of the operands is NaN. This will cause an exception. To avoid this, C99 defines the macros listed below.

These macros are guaranteed to evaluate their arguments only once. The arguments must be of real floating-point type (note: do not pass integer values as arguments to these macros, since the arguments will not be promoted to real-floating types).

isgreater()
determines (x) > (y) without an exception if x or y is NaN.

isgreaterequal()
determines (x) >= (y) without an exception if x or y is NaN.

isless()
determines (x) < (y) without an exception if x or y is NaN.

islessequal()
determines (x) <= (y) without an exception if x or y is NaN.

islessgreater()
determines (x) < (y) || (x) > (y) without an exception if x or y is NaN. This macro is not equivalent to x != y because that expression is true if x or y is NaN.

isunordered()
determines whether its arguments are unordered, that is, whether at least one of the arguments is a NaN.

RETURN VALUE

The macros other than isunordered() return the result of the relational comparison; these macros return 0 if either argument is a NaN.

isunordered() returns 1 if x or y is NaN and 0 otherwise.

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isgreater(), isgreaterequal(), isless(), islessequal(), islessgreater(), isunordered()

Thread safetyMT-Safe

VERSIONS

Not all hardware supports these functions, and where hardware support isn’t provided, they will be emulated by macros. This will result in a performance penalty. Don’t use these functions if NaN is of no concern for you.

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

fpclassify(3), isnan(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

175 - Linux cli command JSON_backportPP_Compat5006pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command JSON_backportPP_Compat5006pm and provides detailed information about the command JSON_backportPP_Compat5006pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the JSON_backportPP_Compat5006pm.

NAME 🖥️ JSON_backportPP_Compat5006pm 🖥️

Helper module in using JSON::PP in Perl 5.6

DESCRIPTION

JSON::PP calls internally.

AUTHOR

Makamaka Hannyaharamitu, <makamaka[at]cpan.org>

COPYRIGHT AND LICENSE

Copyright 2007-2012 by Makamaka Hannyaharamitu

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

176 - Linux cli command URI__punycodepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command URI__punycodepm and provides detailed information about the command URI__punycodepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the URI__punycodepm.

NAME 🖥️ URI__punycodepm 🖥️

encodes Unicode string in Punycode

SYNOPSIS

use strict; use warnings; use utf8; use URI::_punycode qw(encode_punycode decode_punycode); # encode a unicode string my $punycode = encode_punycode(http://☃.net); # http://.net-xc8g $punycode = encode_punycode(bücher); # bcher-kva $punycode = encode_punycode(他们为什么不说中文); # ihqwcrb4cv8a8dqg056pqjye # decode a punycode string back into a unicode string my $unicode = decode_punycode(http://.net-xc8g); # http://☃.net $unicode = decode_punycode(bcher-kva); # bücher $unicode = decode_punycode(ihqwcrb4cv8a8dqg056pqjye); # 他们为什么不说中文

DESCRIPTION

URI::_punycode is a module to encode / decode Unicode strings into Punycode <https://tools.ietf.org/html/rfc3492>, an efficient encoding of Unicode for use with IDNA <https://tools.ietf.org/html/rfc5890>.

FUNCTIONS

All functions throw exceptions on failure. You can catch them with Syntax::Keyword::Try or Try::Tiny. The following functions are exported by default.

encode_punycode

my $punycode = encode_punycode(http://☃.net); # http://.net-xc8g $punycode = encode_punycode(bücher); # bcher-kva $punycode = encode_punycode(他们为什么不说中文) # ihqwcrb4cv8a8dqg056pqjye

Takes a Unicode string (UTF8-flagged variable) and returns a Punycode encoding for it.

decode_punycode

my $unicode = decode_punycode(http://.net-xc8g); # http://☃.net $unicode = decode_punycode(bcher-kva); # bücher $unicode = decode_punycode(ihqwcrb4cv8a8dqg056pqjye); # 他们为什么不说中文

Takes a Punycode encoding and returns original Unicode string.

AUTHOR

Tatsuhiko Miyagawa <[email protected]> is the author of IDNA::Punycode which was the basis for this module.

SEE ALSO

IDNA::Punycode, RFC 3492 <https://tools.ietf.org/html/rfc3492>, RFC 5891 <https://tools.ietf.org/html/rfc5891>

COPYRIGHT AND LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

177 - Linux cli command WWW_RobotRules_AnyDBM_Filepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command WWW_RobotRules_AnyDBM_Filepm and provides detailed information about the command WWW_RobotRules_AnyDBM_Filepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the WWW_RobotRules_AnyDBM_Filepm.

NAME 🖥️ WWW_RobotRules_AnyDBM_Filepm 🖥️

Persistent RobotRules

SYNOPSIS

require WWW::RobotRules::AnyDBM_File; require LWP::RobotUA; # Create a robot useragent that uses a diskcaching RobotRules my $rules = WWW::RobotRules::AnyDBM_File->new( my-robot/1.0, cachefile ); my $ua = WWW::RobotUA->new( my-robot/1.0, [email protected], $rules ); # Then just use $ua as usual $res = $ua->request($req);

DESCRIPTION

This is a subclass of WWW::RobotRules that uses the AnyDBM_File package to implement persistent diskcaching of robots.txt and host visit information.

The constructor (the new() method) takes an extra argument specifying the name of the DBM file to use. If the DBM file already exists, then you can specify undef as agent name as the name can be obtained from the DBM database.

SEE ALSO

WWW::RobotRules, LWP::RobotUA

AUTHORS

Hakan Ardo <[email protected]>, Gisle Aas <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

178 - Linux cli command vfprintf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command vfprintf and provides detailed information about the command vfprintf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the vfprintf.

NAME 🖥️ vfprintf 🖥️

formatted output conversion

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int printf(const char *restrict format, ...);
int fprintf(FILE *restrict stream,
 const char *restrict format, ...);
int dprintf(int fd,
 const char *restrict format, ...);
int sprintf(char *restrict str,
 const char *restrict format, ...);
int snprintf(char str[restrict .size], size_t size,
 const char *restrict format, ...);
int vprintf(const char *restrict format, va_list ap);
int vfprintf(FILE *restrict stream,
 const char *restrict format, va_list ap);
int vdprintf(int fd,
 const char *restrict format, va_list ap);
int vsprintf(char *restrict str,
 const char *restrict format, va_list ap);
int vsnprintf(char str[restrict .size], size_t size,
 const char *restrict format, va_list ap);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

snprintf(), vsnprintf():

    _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE

dprintf(), vdprintf():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The functions in the printf() family produce output according to a format as described below. The functions printf() and vprintf() write output to stdout, the standard output stream; fprintf() and vfprintf() write output to the given output stream; sprintf(), snprintf(), vsprintf(), and vsnprintf() write to the character string str.

The function dprintf() is the same as fprintf() except that it outputs to a file descriptor, fd, instead of to a stdio(3) stream.

The functions snprintf() and vsnprintf() write at most size bytes (including the terminating null byte (‘�’)) to str.

The functions vprintf(), vfprintf(), vdprintf(), vsprintf(), vsnprintf() are equivalent to the functions printf(), fprintf(), dprintf(), sprintf(), snprintf(), respectively, except that they are called with a va_list instead of a variable number of arguments. These functions do not call the va_end macro. Because they invoke the va_arg macro, the value of ap is undefined after the call. See stdarg(3).

All of these functions write the output under the control of a format string that specifies how subsequent arguments (or arguments accessed via the variable-length argument facilities of stdarg(3)) are converted for output.

C99 and POSIX.1-2001 specify that the results are undefined if a call to sprintf(), snprintf(), vsprintf(), or vsnprintf() would cause copying to take place between objects that overlap (e.g., if the target string array and one of the supplied input arguments refer to the same buffer). See CAVEATS.

Format of the format string

The format string is a character string, beginning and ending in its initial shift state, if any. The format string is composed of zero or more directives: ordinary characters (not %), which are copied unchanged to the output stream; and conversion specifications, each of which results in fetching zero or more subsequent arguments. Each conversion specification is introduced by the character %, and ends with a conversion specifier. In between there may be (in this order) zero or more flags, an optional minimum field width, an optional precision and an optional length modifier.

The overall syntax of a conversion specification is:

%[$][flags][width][.precision][length modifier]conversion

The arguments must correspond properly (after type promotion) with the conversion specifier. By default, the arguments are used in the order given, where each ‘*’ (see Field width and Precision below) and each conversion specifier asks for the next argument (and it is an error if insufficiently many arguments are given). One can also specify explicitly which argument is taken, at each place where an argument is required, by writing “%m$” instead of ‘%’ and “*m$” instead of ‘*’, where the decimal integer m denotes the position in the argument list of the desired argument, indexed starting from 1. Thus,

printf("%*d", width, num);

and

printf("%2$*1$d", width, num);

are equivalent. The second style allows repeated references to the same argument. The C99 standard does not include the style using ‘$’, which comes from the Single UNIX Specification. If the style using ‘$’ is used, it must be used throughout for all conversions taking an argument and all width and precision arguments, but it may be mixed with “%%” formats, which do not consume an argument. There may be no gaps in the numbers of arguments specified using ‘$’; for example, if arguments 1 and 3 are specified, argument 2 must also be specified somewhere in the format string.

For some numeric conversions a radix character (“decimal point”) or thousands’ grouping character is used. The actual character used depends on the LC_NUMERIC part of the locale. (See setlocale(3).) The POSIX locale uses ‘.’ as radix character, and does not have a grouping character. Thus,

printf("%'.2f", 1234567.89);

results in “1234567.89” in the POSIX locale, in “1234567,89” in the nl_NL locale, and in “1.234.567,89” in the da_DK locale.

Flag characters

The character % is followed by zero or more of the following flags:

#
The value should be converted to an “alternate form”. For o conversions, the first character of the output string is made zero (by prefixing a 0 if it was not zero already). For x and X conversions, a nonzero result has the string “0x” (or “0X” for X conversions) prepended to it. For a, A, e, E, f, F, g, and G conversions, the result will always contain a decimal point, even if no digits follow it (normally, a decimal point appears in the results of those conversions only if a digit follows). For g and G conversions, trailing zeros are not removed from the result as they would otherwise be. For m, if errno contains a valid error code, the output of strerrorname_np(errno) is printed; otherwise, the value stored in errno is printed as a decimal number. For other conversions, the result is undefined.

0
The value should be zero padded. For d, i, o, u, x, X, a, A, e, E, f, F, g, and G conversions, the converted value is padded on the left with zeros rather than blanks. If the 0 and - flags both appear, the 0 flag is ignored. If a precision is given with an integer conversion (d, i, o, u, x, and X), the 0 flag is ignored. For other conversions, the behavior is undefined.

-
The converted value is to be left adjusted on the field boundary. (The default is right justification.) The converted value is padded on the right with blanks, rather than on the left with blanks or zeros. A - overrides a 0 if both are given.

’ ‘
(a space) A blank should be left before a positive number (or empty string) produced by a signed conversion.

+
A sign (+ or -) should always be placed before a number produced by a signed conversion. By default, a sign is used only for negative numbers. A + overrides a space if both are used.

The five flag characters above are defined in the C99 standard. The Single UNIX Specification specifies one further flag character.


For decimal conversion (i, d, u, f, F, g, G) the output is to be grouped with thousands’ grouping characters if the locale information indicates any. (See setlocale(3).) Note that many versions of gcc(1) cannot parse this option and will issue a warning. (SUSv2 did not include %‘F, but SUSv3 added it.) Note also that the default locale of a C program is “C” whose locale information indicates no thousands’ grouping character. Therefore, without a prior call to setlocale(3), no thousands’ grouping characters will be printed.

glibc 2.2 adds one further flag character.

I
For decimal integer conversion (i, d, u) the output uses the locale’s alternative output digits, if any. For example, since glibc 2.2.3 this will give Arabic-Indic digits in the Persian (“fa_IR”) locale.

Field width

An optional decimal digit string (with nonzero first digit) specifying a minimum field width. If the converted value has fewer characters than the field width, it will be padded with spaces on the left (or right, if the left-adjustment flag has been given). Instead of a decimal digit string one may write “*” or “*m$” (for some decimal integer m) to specify that the field width is given in the next argument, or in the m-th argument, respectively, which must be of type int. A negative field width is taken as a ‘-’ flag followed by a positive field width. In no case does a nonexistent or small field width cause truncation of a field; if the result of a conversion is wider than the field width, the field is expanded to contain the conversion result.

Precision

An optional precision, in the form of a period (’.’) followed by an optional decimal digit string. Instead of a decimal digit string one may write “*” or “*m$” (for some decimal integer m) to specify that the precision is given in the next argument, or in the m-th argument, respectively, which must be of type int. If the precision is given as just ‘.’, the precision is taken to be zero. A negative precision is taken as if the precision were omitted. This gives the minimum number of digits to appear for d, i, o, u, x, and X conversions, the number of digits to appear after the radix character for a, A, e, E, f, and F conversions, the maximum number of significant digits for g and G conversions, or the maximum number of characters to be printed from a string for s and S conversions.

Length modifier

Here, “integer conversion” stands for d, i, o, u, x, or X conversion.

hh
A following integer conversion corresponds to a signed char or unsigned char argument, or a following n conversion corresponds to a pointer to a signed char argument.

h
A following integer conversion corresponds to a short or unsigned short argument, or a following n conversion corresponds to a pointer to a short argument.

l
(ell) A following integer conversion corresponds to a long or unsigned long argument, or a following n conversion corresponds to a pointer to a long argument, or a following c conversion corresponds to a wint_t argument, or a following s conversion corresponds to a pointer to wchar_t argument. On a following a, A, e, E, f, F, g, or G conversion, this length modifier is ignored (C99; not in SUSv2).

ll
(ell-ell). A following integer conversion corresponds to a long long or unsigned long long argument, or a following n conversion corresponds to a pointer to a long long argument.

q
A synonym for ll. This is a nonstandard extension, derived from BSD; avoid its use in new code.

L
A following a, A, e, E, f, F, g, or G conversion corresponds to a long double argument. (C99 allows %LF, but SUSv2 does not.)

j
A following integer conversion corresponds to an intmax_t or uintmax_t argument, or a following n conversion corresponds to a pointer to an intmax_t argument.

z
A following integer conversion corresponds to a size_t or ssize_t argument, or a following n conversion corresponds to a pointer to a size_t argument.

Z
A nonstandard synonym for z that predates the appearance of z. Do not use in new code.

t
A following integer conversion corresponds to a ptrdiff_t argument, or a following n conversion corresponds to a pointer to a ptrdiff_t argument.

SUSv3 specifies all of the above, except for those modifiers explicitly noted as being nonstandard extensions. SUSv2 specified only the length modifiers h (in hd, hi, ho, hx, hX, hn) and l (in ld, li, lo, lx, lX, ln, lc, ls) and L (in Le, LE, Lf, Lg, LG).

As a nonstandard extension, the GNU implementations treats ll and L as synonyms, so that one can, for example, write llg (as a synonym for the standards-compliant Lg) and Ld (as a synonym for the standards compliant lld). Such usage is nonportable.

Conversion specifiers

A character that specifies the type of conversion to be applied. The conversion specifiers and their meanings are:

d, i
The int argument is converted to signed decimal notation. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.

o, u, x, X
The unsigned int argument is converted to unsigned octal (o), unsigned decimal (u), or unsigned hexadecimal (x and X) notation. The letters abcdef are used for x conversions; the letters ABCDEF are used for X conversions. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.

e, E
The double argument is rounded and converted in the style [-]d**.ddde**±dd where there is one digit (which is nonzero if the argument is nonzero) before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero, no decimal-point character appears. An E conversion uses the letter E (rather than e) to introduce the exponent. The exponent always contains at least two digits; if the value is zero, the exponent is 00.

f, F
The double argument is rounded and converted to decimal notation in the style [-]ddd**.**ddd, where the number of digits after the decimal-point character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. If a decimal point appears, at least one digit appears before it.

(SUSv2 does not know about F and says that character string representations for infinity and NaN may be made available. SUSv3 adds a specification for F. The C99 standard specifies “[-]inf” or “[-]infinity” for infinity, and a string starting with “nan” for NaN, in the case of f conversion, and “[-]INF” or “[-]INFINITY” or “NAN” in the case of F conversion.)

g, G
The double argument is converted in style f or e (or F or E for G conversions). The precision specifies the number of significant digits. If the precision is missing, 6 digits are given; if the precision is zero, it is treated as 1. Style e is used if the exponent from its conversion is less than -4 or greater than or equal to the precision. Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit.

a, A
(C99; not in SUSv2, but added in SUSv3) For a conversion, the double argument is converted to hexadecimal notation (using the letters abcdef) in the style [-]0xh**.hhhhp**±d; for A conversion the prefix 0X, the letters ABCDEF, and the exponent separator P is used. There is one hexadecimal digit before the decimal point, and the number of digits after it is equal to the precision. The default precision suffices for an exact representation of the value if an exact representation in base 2 exists and otherwise is sufficiently large to distinguish values of type double. The digit before the decimal point is unspecified for nonnormalized numbers, and nonzero but otherwise unspecified for normalized numbers. The exponent always contains at least one digit; if the value is zero, the exponent is 0.

c
If no l modifier is present, the int argument is converted to an unsigned char, and the resulting character is written. If an l modifier is present, the wint_t (wide character) argument is converted to a multibyte sequence by a call to the wcrtomb(3) function, with a conversion state starting in the initial state, and the resulting multibyte string is written.

s
If no l modifier is present: the const char * argument is expected to be a pointer to an array of character type (pointer to a string). Characters from the array are written up to (but not including) a terminating null byte (‘�’); if a precision is specified, no more than the number specified are written. If a precision is given, no null byte need be present; if the precision is not specified, or is greater than the size of the array, the array must contain a terminating null byte.

If an l modifier is present: the const wchar_t * argument is expected to be a pointer to an array of wide characters. Wide characters from the array are converted to multibyte characters (each by a call to the wcrtomb(3) function, with a conversion state starting in the initial state before the first wide character), up to and including a terminating null wide character. The resulting multibyte characters are written up to (but not including) the terminating null byte. If a precision is specified, no more bytes than the number specified are written, but no partial multibyte characters are written. Note that the precision determines the number of bytes written, not the number of wide characters or screen positions. The array must contain a terminating null wide character, unless a precision is given and it is so small that the number of bytes written exceeds it before the end of the array is reached.

C
(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.) Synonym for lc. Don’t use.

S
(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.) Synonym for ls. Don’t use.

p
The void * pointer argument is printed in hexadecimal (as if by %#x or %#lx).

n
The number of characters written so far is stored into the integer pointed to by the corresponding argument. That argument shall be an int *, or variant whose size matches the (optionally) supplied integer length modifier. No argument is converted. (This specifier is not supported by the bionic C library.) The behavior is undefined if the conversion specification includes any flags, a field width, or a precision.

m
(glibc extension; supported by uClibc and musl.) Print output of strerror(errno) (or strerrorname_np(errno) in the alternate form). No argument is required.

%
A ‘%’ is written. No argument is converted. The complete conversion specification is ‘%%’.

RETURN VALUE

Upon successful return, these functions return the number of bytes printed (excluding the null byte used to end output to strings).

The functions snprintf() and vsnprintf() do not write more than size bytes (including the terminating null byte (‘�’)). If the output was truncated due to this limit, then the return value is the number of characters (excluding the terminating null byte) which would have been written to the final string if enough space had been available. Thus, a return value of size or more means that the output was truncated. (See also below under CAVEATS.)

If an output error is encountered, a negative value is returned.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

printf(), fprintf(), sprintf(), snprintf(), vprintf(), vfprintf(), vsprintf(), vsnprintf()

Thread safetyMT-Safe locale

STANDARDS

fprintf()
printf()
sprintf()
vprintf()
vfprintf()
vsprintf()
snprintf()
vsnprintf()
C11, POSIX.1-2008.

dprintf()
vdprintf()
GNU, POSIX.1-2008.

HISTORY

fprintf()
printf()
sprintf()
vprintf()
vfprintf()
vsprintf()
C89, POSIX.1-2001.

snprintf()
vsnprintf()
SUSv2, C99, POSIX.1-2001.

Concerning the return value of snprintf(), SUSv2 and C99 contradict each other: when snprintf() is called with size=0 then SUSv2 stipulates an unspecified return value less than 1, while C99 allows str to be NULL in this case, and gives the return value (as always) as the number of characters that would have been written in case the output string has been large enough. POSIX.1-2001 and later align their specification of snprintf() with C99.

dprintf()
vdprintf()
GNU, POSIX.1-2008.

glibc 2.1 adds length modifiers hh, j, t, and z and conversion characters a and A.

glibc 2.2 adds the conversion character F with C99 semantics, and the flag character I.

glibc 2.35 gives a meaning to the alternate form (#) of the m conversion specifier, that is %#m.

CAVEATS

Some programs imprudently rely on code such as the following

sprintf(buf, "%s some further text", buf);

to append text to buf. However, the standards explicitly note that the results are undefined if source and destination buffers overlap when calling sprintf(), snprintf(), vsprintf(), and vsnprintf(). Depending on the version of gcc(1) used, and the compiler options employed, calls such as the above will not produce the expected results.

The glibc implementation of the functions snprintf() and vsnprintf() conforms to the C99 standard, that is, behaves as described above, since glibc 2.1. Until glibc 2.0.6, they would return -1 when the output was truncated.

BUGS

Because sprintf() and vsprintf() assume an arbitrarily long string, callers must be careful not to overflow the actual space; this is often impossible to assure. Note that the length of the strings produced is locale-dependent and difficult to predict. Use snprintf() and vsnprintf() instead (or asprintf(3) and vasprintf(3)).

Code such as printf(foo); often indicates a bug, since foo may contain a % character. If foo comes from untrusted user input, it may contain %n, causing the printf() call to write to memory and creating a security hole.

EXAMPLES

To print Pi to five decimal places:

#include <math.h>
#include <stdio.h>
fprintf(stdout, "pi = %.5f

“, 4 * atan(1.0));

To print a date and time in the form “Sunday, July 3, 10:02”, where weekday and month are pointers to strings:

#include <stdio.h>
fprintf(stdout, "%s, %s %d, %.2d:%.2d

“, weekday, month, day, hour, min);

Many countries use the day-month-year order. Hence, an internationalized version must be able to print the arguments in an order specified by the format:

#include <stdio.h>
fprintf(stdout, format,
        weekday, month, day, hour, min);

where format depends on locale, and may permute the arguments. With the value:

"%1$s, %3$d. %2$s, %4$d:%5$.2d

"

one might obtain “Sonntag, 3. Juli, 10:02”.

To allocate a sufficiently large string and print into it (code correct for both glibc 2.0 and glibc 2.1):

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
char *
make_message(const char *fmt, ...)
{
    int n = 0;
    size_t size = 0;
    char *p = NULL;
    va_list ap;
    /* Determine required size. */
    va_start(ap, fmt);
    n = vsnprintf(p, size, fmt, ap);
    va_end(ap);
    if (n < 0)
        return NULL;
    size = (size_t) n + 1;      /* One extra byte for '' */
    p = malloc(size);
    if (p == NULL)
        return NULL;
    va_start(ap, fmt);
    n = vsnprintf(p, size, fmt, ap);
    va_end(ap);
    if (n < 0) {
        free(p);
        return NULL;
    }
    return p;
}

If truncation occurs in glibc versions prior to glibc 2.0.6, this is treated as an error instead of being handled gracefully.

SEE ALSO

printf(1), asprintf(3), puts(3), scanf(3), setlocale(3), strfromd(3), wcrtomb(3), wprintf(3), locale(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

179 - Linux cli command XtSetMultiClickTime

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtSetMultiClickTime and provides detailed information about the command XtSetMultiClickTime, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtSetMultiClickTime.

NAME 🖥️ XtSetMultiClickTime 🖥️

set and get multi-click times

SYNTAX

#include <X11/Intrinsic.h>

void XtSetMultiClickTime(Display* display, int time);

int XtGetMultiClickTime(Display* display);

ARGUMENTS

display
Specifies the display connection.

time
Specifies the multi-click time in milliseconds.

DESCRIPTION

XtSetMultiClickTime sets the time interval used by the translation manager to determine when multiple events are interpreted as a repeated event.

XtGetMultiClickTime returns the time in milliseconds that the translation manager uses to determine if multiple events are to be interpreted as a repeated event for purposes of matching a translation entry containing a repeat count.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

180 - Linux cli command strerror_l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strerror_l and provides detailed information about the command strerror_l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strerror_l.

NAME 🖥️ strerror_l 🖥️

return string describing error number

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strerror(int errnum);
const char *strerrorname_np(int errnum);
const char *strerrordesc_np(int errnum);
int strerror_r(int errnum, char buf[.buflen], size_t buflen);
               /* XSI-compliant */
char *strerror_r(int errnum, char buf[.buflen], size_t buflen);
               /* GNU-specific */
char *strerror_l(int errnum, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strerrorname_np(), strerrordesc_np():

    _GNU_SOURCE

strerror_r():

    The XSI-compliant version is provided if:
        (_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE
    Otherwise, the GNU-specific version is provided.

DESCRIPTION

The strerror() function returns a pointer to a string that describes the error code passed in the argument errnum, possibly using the LC_MESSAGES part of the current locale to select the appropriate language. (For example, if errnum is EINVAL, the returned description will be “Invalid argument”.) This string must not be modified by the application, and the returned pointer will be invalidated on a subsequent call to strerror() or strerror_l(), or if the thread that obtained the string exits. No other library function, including perror(3), will modify this string.

Like strerror(), the strerrordesc_np() function returns a pointer to a string that describes the error code passed in the argument errnum, with the difference that the returned string is not translated according to the current locale.

The strerrorname_np() function returns a pointer to a string containing the name of the error code passed in the argument errnum. For example, given EPERM as an argument, this function returns a pointer to the string “EPERM”. Given 0 as an argument, this function returns a pointer to the string “0”.

strerror_r()

strerror_r() is like strerror(), but might use the supplied buffer buf instead of allocating one internally. This function is available in two versions: an XSI-compliant version specified in POSIX.1-2001 (available since glibc 2.3.4, but not POSIX-compliant until glibc 2.13), and a GNU-specific version (available since glibc 2.0). The XSI-compliant version is provided with the feature test macros settings shown in the SYNOPSIS; otherwise the GNU-specific version is provided. If no feature test macros are explicitly defined, then (since glibc 2.4) _POSIX_C_SOURCE is defined by default with the value 200112L, so that the XSI-compliant version of strerror_r() is provided by default.

The XSI-compliant strerror_r() is preferred for portable applications. It returns the error string in the user-supplied buffer buf of length buflen.

The GNU-specific strerror_r() returns a pointer to a string containing the error message. This may be either a pointer to a string that the function stores in buf, or a pointer to some (immutable) static string (in which case buf is unused). If the function stores a string in buf, then at most buflen bytes are stored (the string may be truncated if buflen is too small and errnum is unknown). The string always includes a terminating null byte (‘�’).

strerror_l()

strerror_l() is like strerror(), but maps errnum to a locale-dependent error message in the locale specified by locale. The behavior of strerror_l() is undefined if locale is the special locale object LC_GLOBAL_LOCALE or is not a valid locale object handle.

RETURN VALUE

The strerror(), strerror_l(), and the GNU-specific strerror_r() functions return the appropriate error description string, or an “Unknown error nnn” message if the error number is unknown.

On success, strerrorname_np() and strerrordesc_np() return the appropriate error description string. If errnum is an invalid error number, these functions return NULL.

The XSI-compliant strerror_r() function returns 0 on success. On error, a (positive) error number is returned (since glibc 2.13), or -1 is returned and errno is set to indicate the error (before glibc 2.13).

POSIX.1-2001 and POSIX.1-2008 require that a successful call to strerror() or strerror_l() shall leave errno unchanged, and note that, since no function return value is reserved to indicate an error, an application that wishes to check for errors should initialize errno to zero before the call, and then check errno after the call.

ERRORS

EINVAL
The value of errnum is not a valid error number.

ERANGE
Insufficient storage was supplied to contain the error description string.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strerror()

Thread safety

MT-Safe

strerrorname_np(), strerrordesc_np()

Thread safetyMT-Safe

strerror_r(), strerror_l()

Thread safetyMT-Safe

Before glibc 2.32, strerror() is not MT-Safe.

STANDARDS

strerror()
C11, POSIX.1-2008.

strerror_r()
strerror_l()
POSIX.1-2008.

strerrorname_np()
strerrordesc_np()
GNU.

POSIX.1-2001 permits strerror() to set errno if the call encounters an error, but does not specify what value should be returned as the function result in the event of an error. On some systems, strerror() returns NULL if the error number is unknown. On other systems, strerror() returns a string something like “Error nnn occurred” and sets errno to EINVAL if the error number is unknown. C99 and POSIX.1-2008 require the return value to be non-NULL.

HISTORY

strerror()
POSIX.1-2001, C89.

strerror_r()
POSIX.1-2001.

strerror_l()
glibc 2.6. POSIX.1-2008.

strerrorname_np()
strerrordesc_np()
glibc 2.32.

NOTES

strerrorname_np() and strerrordesc_np() are thread-safe and async-signal-safe.

SEE ALSO

err(3), errno(3), error(3), perror(3), strsignal(3), locale(7), signal-safety(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

181 - Linux cli command sprintf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sprintf and provides detailed information about the command sprintf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sprintf.

NAME 🖥️ sprintf 🖥️

formatted output conversion

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int printf(const char *restrict format, ...);
int fprintf(FILE *restrict stream,
 const char *restrict format, ...);
int dprintf(int fd,
 const char *restrict format, ...);
int sprintf(char *restrict str,
 const char *restrict format, ...);
int snprintf(char str[restrict .size], size_t size,
 const char *restrict format, ...);
int vprintf(const char *restrict format, va_list ap);
int vfprintf(FILE *restrict stream,
 const char *restrict format, va_list ap);
int vdprintf(int fd,
 const char *restrict format, va_list ap);
int vsprintf(char *restrict str,
 const char *restrict format, va_list ap);
int vsnprintf(char str[restrict .size], size_t size,
 const char *restrict format, va_list ap);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

snprintf(), vsnprintf():

    _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE

dprintf(), vdprintf():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The functions in the printf() family produce output according to a format as described below. The functions printf() and vprintf() write output to stdout, the standard output stream; fprintf() and vfprintf() write output to the given output stream; sprintf(), snprintf(), vsprintf(), and vsnprintf() write to the character string str.

The function dprintf() is the same as fprintf() except that it outputs to a file descriptor, fd, instead of to a stdio(3) stream.

The functions snprintf() and vsnprintf() write at most size bytes (including the terminating null byte (‘�’)) to str.

The functions vprintf(), vfprintf(), vdprintf(), vsprintf(), vsnprintf() are equivalent to the functions printf(), fprintf(), dprintf(), sprintf(), snprintf(), respectively, except that they are called with a va_list instead of a variable number of arguments. These functions do not call the va_end macro. Because they invoke the va_arg macro, the value of ap is undefined after the call. See stdarg(3).

All of these functions write the output under the control of a format string that specifies how subsequent arguments (or arguments accessed via the variable-length argument facilities of stdarg(3)) are converted for output.

C99 and POSIX.1-2001 specify that the results are undefined if a call to sprintf(), snprintf(), vsprintf(), or vsnprintf() would cause copying to take place between objects that overlap (e.g., if the target string array and one of the supplied input arguments refer to the same buffer). See CAVEATS.

Format of the format string

The format string is a character string, beginning and ending in its initial shift state, if any. The format string is composed of zero or more directives: ordinary characters (not %), which are copied unchanged to the output stream; and conversion specifications, each of which results in fetching zero or more subsequent arguments. Each conversion specification is introduced by the character %, and ends with a conversion specifier. In between there may be (in this order) zero or more flags, an optional minimum field width, an optional precision and an optional length modifier.

The overall syntax of a conversion specification is:

%[$][flags][width][.precision][length modifier]conversion

The arguments must correspond properly (after type promotion) with the conversion specifier. By default, the arguments are used in the order given, where each ‘*’ (see Field width and Precision below) and each conversion specifier asks for the next argument (and it is an error if insufficiently many arguments are given). One can also specify explicitly which argument is taken, at each place where an argument is required, by writing “%m$” instead of ‘%’ and “*m$” instead of ‘*’, where the decimal integer m denotes the position in the argument list of the desired argument, indexed starting from 1. Thus,

printf("%*d", width, num);

and

printf("%2$*1$d", width, num);

are equivalent. The second style allows repeated references to the same argument. The C99 standard does not include the style using ‘$’, which comes from the Single UNIX Specification. If the style using ‘$’ is used, it must be used throughout for all conversions taking an argument and all width and precision arguments, but it may be mixed with “%%” formats, which do not consume an argument. There may be no gaps in the numbers of arguments specified using ‘$’; for example, if arguments 1 and 3 are specified, argument 2 must also be specified somewhere in the format string.

For some numeric conversions a radix character (“decimal point”) or thousands’ grouping character is used. The actual character used depends on the LC_NUMERIC part of the locale. (See setlocale(3).) The POSIX locale uses ‘.’ as radix character, and does not have a grouping character. Thus,

printf("%'.2f", 1234567.89);

results in “1234567.89” in the POSIX locale, in “1234567,89” in the nl_NL locale, and in “1.234.567,89” in the da_DK locale.

Flag characters

The character % is followed by zero or more of the following flags:

#
The value should be converted to an “alternate form”. For o conversions, the first character of the output string is made zero (by prefixing a 0 if it was not zero already). For x and X conversions, a nonzero result has the string “0x” (or “0X” for X conversions) prepended to it. For a, A, e, E, f, F, g, and G conversions, the result will always contain a decimal point, even if no digits follow it (normally, a decimal point appears in the results of those conversions only if a digit follows). For g and G conversions, trailing zeros are not removed from the result as they would otherwise be. For m, if errno contains a valid error code, the output of strerrorname_np(errno) is printed; otherwise, the value stored in errno is printed as a decimal number. For other conversions, the result is undefined.

0
The value should be zero padded. For d, i, o, u, x, X, a, A, e, E, f, F, g, and G conversions, the converted value is padded on the left with zeros rather than blanks. If the 0 and - flags both appear, the 0 flag is ignored. If a precision is given with an integer conversion (d, i, o, u, x, and X), the 0 flag is ignored. For other conversions, the behavior is undefined.

-
The converted value is to be left adjusted on the field boundary. (The default is right justification.) The converted value is padded on the right with blanks, rather than on the left with blanks or zeros. A - overrides a 0 if both are given.

’ ‘
(a space) A blank should be left before a positive number (or empty string) produced by a signed conversion.

+
A sign (+ or -) should always be placed before a number produced by a signed conversion. By default, a sign is used only for negative numbers. A + overrides a space if both are used.

The five flag characters above are defined in the C99 standard. The Single UNIX Specification specifies one further flag character.


For decimal conversion (i, d, u, f, F, g, G) the output is to be grouped with thousands’ grouping characters if the locale information indicates any. (See setlocale(3).) Note that many versions of gcc(1) cannot parse this option and will issue a warning. (SUSv2 did not include %‘F, but SUSv3 added it.) Note also that the default locale of a C program is “C” whose locale information indicates no thousands’ grouping character. Therefore, without a prior call to setlocale(3), no thousands’ grouping characters will be printed.

glibc 2.2 adds one further flag character.

I
For decimal integer conversion (i, d, u) the output uses the locale’s alternative output digits, if any. For example, since glibc 2.2.3 this will give Arabic-Indic digits in the Persian (“fa_IR”) locale.

Field width

An optional decimal digit string (with nonzero first digit) specifying a minimum field width. If the converted value has fewer characters than the field width, it will be padded with spaces on the left (or right, if the left-adjustment flag has been given). Instead of a decimal digit string one may write “*” or “*m$” (for some decimal integer m) to specify that the field width is given in the next argument, or in the m-th argument, respectively, which must be of type int. A negative field width is taken as a ‘-’ flag followed by a positive field width. In no case does a nonexistent or small field width cause truncation of a field; if the result of a conversion is wider than the field width, the field is expanded to contain the conversion result.

Precision

An optional precision, in the form of a period (’.’) followed by an optional decimal digit string. Instead of a decimal digit string one may write “*” or “*m$” (for some decimal integer m) to specify that the precision is given in the next argument, or in the m-th argument, respectively, which must be of type int. If the precision is given as just ‘.’, the precision is taken to be zero. A negative precision is taken as if the precision were omitted. This gives the minimum number of digits to appear for d, i, o, u, x, and X conversions, the number of digits to appear after the radix character for a, A, e, E, f, and F conversions, the maximum number of significant digits for g and G conversions, or the maximum number of characters to be printed from a string for s and S conversions.

Length modifier

Here, “integer conversion” stands for d, i, o, u, x, or X conversion.

hh
A following integer conversion corresponds to a signed char or unsigned char argument, or a following n conversion corresponds to a pointer to a signed char argument.

h
A following integer conversion corresponds to a short or unsigned short argument, or a following n conversion corresponds to a pointer to a short argument.

l
(ell) A following integer conversion corresponds to a long or unsigned long argument, or a following n conversion corresponds to a pointer to a long argument, or a following c conversion corresponds to a wint_t argument, or a following s conversion corresponds to a pointer to wchar_t argument. On a following a, A, e, E, f, F, g, or G conversion, this length modifier is ignored (C99; not in SUSv2).

ll
(ell-ell). A following integer conversion corresponds to a long long or unsigned long long argument, or a following n conversion corresponds to a pointer to a long long argument.

q
A synonym for ll. This is a nonstandard extension, derived from BSD; avoid its use in new code.

L
A following a, A, e, E, f, F, g, or G conversion corresponds to a long double argument. (C99 allows %LF, but SUSv2 does not.)

j
A following integer conversion corresponds to an intmax_t or uintmax_t argument, or a following n conversion corresponds to a pointer to an intmax_t argument.

z
A following integer conversion corresponds to a size_t or ssize_t argument, or a following n conversion corresponds to a pointer to a size_t argument.

Z
A nonstandard synonym for z that predates the appearance of z. Do not use in new code.

t
A following integer conversion corresponds to a ptrdiff_t argument, or a following n conversion corresponds to a pointer to a ptrdiff_t argument.

SUSv3 specifies all of the above, except for those modifiers explicitly noted as being nonstandard extensions. SUSv2 specified only the length modifiers h (in hd, hi, ho, hx, hX, hn) and l (in ld, li, lo, lx, lX, ln, lc, ls) and L (in Le, LE, Lf, Lg, LG).

As a nonstandard extension, the GNU implementations treats ll and L as synonyms, so that one can, for example, write llg (as a synonym for the standards-compliant Lg) and Ld (as a synonym for the standards compliant lld). Such usage is nonportable.

Conversion specifiers

A character that specifies the type of conversion to be applied. The conversion specifiers and their meanings are:

d, i
The int argument is converted to signed decimal notation. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.

o, u, x, X
The unsigned int argument is converted to unsigned octal (o), unsigned decimal (u), or unsigned hexadecimal (x and X) notation. The letters abcdef are used for x conversions; the letters ABCDEF are used for X conversions. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.

e, E
The double argument is rounded and converted in the style [-]d**.ddde**±dd where there is one digit (which is nonzero if the argument is nonzero) before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero, no decimal-point character appears. An E conversion uses the letter E (rather than e) to introduce the exponent. The exponent always contains at least two digits; if the value is zero, the exponent is 00.

f, F
The double argument is rounded and converted to decimal notation in the style [-]ddd**.**ddd, where the number of digits after the decimal-point character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. If a decimal point appears, at least one digit appears before it.

(SUSv2 does not know about F and says that character string representations for infinity and NaN may be made available. SUSv3 adds a specification for F. The C99 standard specifies “[-]inf” or “[-]infinity” for infinity, and a string starting with “nan” for NaN, in the case of f conversion, and “[-]INF” or “[-]INFINITY” or “NAN” in the case of F conversion.)

g, G
The double argument is converted in style f or e (or F or E for G conversions). The precision specifies the number of significant digits. If the precision is missing, 6 digits are given; if the precision is zero, it is treated as 1. Style e is used if the exponent from its conversion is less than -4 or greater than or equal to the precision. Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit.

a, A
(C99; not in SUSv2, but added in SUSv3) For a conversion, the double argument is converted to hexadecimal notation (using the letters abcdef) in the style [-]0xh**.hhhhp**±d; for A conversion the prefix 0X, the letters ABCDEF, and the exponent separator P is used. There is one hexadecimal digit before the decimal point, and the number of digits after it is equal to the precision. The default precision suffices for an exact representation of the value if an exact representation in base 2 exists and otherwise is sufficiently large to distinguish values of type double. The digit before the decimal point is unspecified for nonnormalized numbers, and nonzero but otherwise unspecified for normalized numbers. The exponent always contains at least one digit; if the value is zero, the exponent is 0.

c
If no l modifier is present, the int argument is converted to an unsigned char, and the resulting character is written. If an l modifier is present, the wint_t (wide character) argument is converted to a multibyte sequence by a call to the wcrtomb(3) function, with a conversion state starting in the initial state, and the resulting multibyte string is written.

s
If no l modifier is present: the const char * argument is expected to be a pointer to an array of character type (pointer to a string). Characters from the array are written up to (but not including) a terminating null byte (‘�’); if a precision is specified, no more than the number specified are written. If a precision is given, no null byte need be present; if the precision is not specified, or is greater than the size of the array, the array must contain a terminating null byte.

If an l modifier is present: the const wchar_t * argument is expected to be a pointer to an array of wide characters. Wide characters from the array are converted to multibyte characters (each by a call to the wcrtomb(3) function, with a conversion state starting in the initial state before the first wide character), up to and including a terminating null wide character. The resulting multibyte characters are written up to (but not including) the terminating null byte. If a precision is specified, no more bytes than the number specified are written, but no partial multibyte characters are written. Note that the precision determines the number of bytes written, not the number of wide characters or screen positions. The array must contain a terminating null wide character, unless a precision is given and it is so small that the number of bytes written exceeds it before the end of the array is reached.

C
(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.) Synonym for lc. Don’t use.

S
(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.) Synonym for ls. Don’t use.

p
The void * pointer argument is printed in hexadecimal (as if by %#x or %#lx).

n
The number of characters written so far is stored into the integer pointed to by the corresponding argument. That argument shall be an int *, or variant whose size matches the (optionally) supplied integer length modifier. No argument is converted. (This specifier is not supported by the bionic C library.) The behavior is undefined if the conversion specification includes any flags, a field width, or a precision.

m
(glibc extension; supported by uClibc and musl.) Print output of strerror(errno) (or strerrorname_np(errno) in the alternate form). No argument is required.

%
A ‘%’ is written. No argument is converted. The complete conversion specification is ‘%%’.

RETURN VALUE

Upon successful return, these functions return the number of bytes printed (excluding the null byte used to end output to strings).

The functions snprintf() and vsnprintf() do not write more than size bytes (including the terminating null byte (‘�’)). If the output was truncated due to this limit, then the return value is the number of characters (excluding the terminating null byte) which would have been written to the final string if enough space had been available. Thus, a return value of size or more means that the output was truncated. (See also below under CAVEATS.)

If an output error is encountered, a negative value is returned.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

printf(), fprintf(), sprintf(), snprintf(), vprintf(), vfprintf(), vsprintf(), vsnprintf()

Thread safetyMT-Safe locale

STANDARDS

fprintf()
printf()
sprintf()
vprintf()
vfprintf()
vsprintf()
snprintf()
vsnprintf()
C11, POSIX.1-2008.

dprintf()
vdprintf()
GNU, POSIX.1-2008.

HISTORY

fprintf()
printf()
sprintf()
vprintf()
vfprintf()
vsprintf()
C89, POSIX.1-2001.

snprintf()
vsnprintf()
SUSv2, C99, POSIX.1-2001.

Concerning the return value of snprintf(), SUSv2 and C99 contradict each other: when snprintf() is called with size=0 then SUSv2 stipulates an unspecified return value less than 1, while C99 allows str to be NULL in this case, and gives the return value (as always) as the number of characters that would have been written in case the output string has been large enough. POSIX.1-2001 and later align their specification of snprintf() with C99.

dprintf()
vdprintf()
GNU, POSIX.1-2008.

glibc 2.1 adds length modifiers hh, j, t, and z and conversion characters a and A.

glibc 2.2 adds the conversion character F with C99 semantics, and the flag character I.

glibc 2.35 gives a meaning to the alternate form (#) of the m conversion specifier, that is %#m.

CAVEATS

Some programs imprudently rely on code such as the following

sprintf(buf, "%s some further text", buf);

to append text to buf. However, the standards explicitly note that the results are undefined if source and destination buffers overlap when calling sprintf(), snprintf(), vsprintf(), and vsnprintf(). Depending on the version of gcc(1) used, and the compiler options employed, calls such as the above will not produce the expected results.

The glibc implementation of the functions snprintf() and vsnprintf() conforms to the C99 standard, that is, behaves as described above, since glibc 2.1. Until glibc 2.0.6, they would return -1 when the output was truncated.

BUGS

Because sprintf() and vsprintf() assume an arbitrarily long string, callers must be careful not to overflow the actual space; this is often impossible to assure. Note that the length of the strings produced is locale-dependent and difficult to predict. Use snprintf() and vsnprintf() instead (or asprintf(3) and vasprintf(3)).

Code such as printf(foo); often indicates a bug, since foo may contain a % character. If foo comes from untrusted user input, it may contain %n, causing the printf() call to write to memory and creating a security hole.

EXAMPLES

To print Pi to five decimal places:

#include <math.h>
#include <stdio.h>
fprintf(stdout, "pi = %.5f

“, 4 * atan(1.0));

To print a date and time in the form “Sunday, July 3, 10:02”, where weekday and month are pointers to strings:

#include <stdio.h>
fprintf(stdout, "%s, %s %d, %.2d:%.2d

“, weekday, month, day, hour, min);

Many countries use the day-month-year order. Hence, an internationalized version must be able to print the arguments in an order specified by the format:

#include <stdio.h>
fprintf(stdout, format,
        weekday, month, day, hour, min);

where format depends on locale, and may permute the arguments. With the value:

"%1$s, %3$d. %2$s, %4$d:%5$.2d

"

one might obtain “Sonntag, 3. Juli, 10:02”.

To allocate a sufficiently large string and print into it (code correct for both glibc 2.0 and glibc 2.1):

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
char *
make_message(const char *fmt, ...)
{
    int n = 0;
    size_t size = 0;
    char *p = NULL;
    va_list ap;
    /* Determine required size. */
    va_start(ap, fmt);
    n = vsnprintf(p, size, fmt, ap);
    va_end(ap);
    if (n < 0)
        return NULL;
    size = (size_t) n + 1;      /* One extra byte for '' */
    p = malloc(size);
    if (p == NULL)
        return NULL;
    va_start(ap, fmt);
    n = vsnprintf(p, size, fmt, ap);
    va_end(ap);
    if (n < 0) {
        free(p);
        return NULL;
    }
    return p;
}

If truncation occurs in glibc versions prior to glibc 2.0.6, this is treated as an error instead of being handled gracefully.

SEE ALSO

printf(1), asprintf(3), puts(3), scanf(3), setlocale(3), strfromd(3), wcrtomb(3), wprintf(3), locale(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

182 - Linux cli command Net_DNS_RR_Apm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_Apm and provides detailed information about the command Net_DNS_RR_Apm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_Apm.

NAME 🖥️ Net_DNS_RR_Apm 🖥️

DNS A resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name IN A address); $rr = Net::DNS::RR->new( name => example.com, type => A, address => 192.0.2.1 );

DESCRIPTION

Class for DNS Address (A) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

address

$IPv4_address = $rr->address; $rr->address( $IPv4_address );

Version 4 IP address represented using dotted-quad notation.

COPYRIGHT

Copyright (c)1997 Michael Fuhr.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC1035(3.4.1) <https://iana.org/go/rfc1035#section-3.4.1>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

183 - Linux cli command rint

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command rint and provides detailed information about the command rint, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the rint.

NAME 🖥️ rint 🖥️

round to nearest integer

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double nearbyint(double x);
float nearbyintf(float x);
long double nearbyintl(long double x);
double rint(double x);
float rintf(float x);
long double rintl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

nearbyint(), nearbyintf(), nearbyintl():

    _POSIX_C_SOURCE >= 200112L || _ISOC99_SOURCE

rint():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

rintf(), rintl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The nearbyint(), nearbyintf(), and nearbyintl() functions round their argument to an integer value in floating-point format, using the current rounding direction (see fesetround(3)) and without raising the inexact exception. When the current rounding direction is to nearest, these functions round halfway cases to the even integer in accordance with IEEE-754.

The rint(), rintf(), and rintl() functions do the same, but will raise the inexact exception (FE_INEXACT, checkable via fetestexcept(3)) when the result differs in value from the argument.

RETURN VALUE

These functions return the rounded integer value.

If x is integral, +0, -0, NaN, or infinite, x itself is returned.

ERRORS

No errors occur. POSIX.1-2001 documents a range error for overflows, but see NOTES.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

nearbyint(), nearbyintf(), nearbyintl(), rint(), rintf(), rintl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

NOTES

SUSv2 and POSIX.1-2001 contain text about overflow (which might set errno to ERANGE, or raise an FE_OVERFLOW exception). In practice, the result cannot overflow on any current machine, so this error-handling stuff is just nonsense. (More precisely, overflow can happen only when the maximum value of the exponent is smaller than the number of mantissa bits. For the IEEE-754 standard 32-bit and 64-bit floating-point numbers the maximum value of the exponent is 127 (respectively, 1023), and the number of mantissa bits including the implicit bit is 24 (respectively, 53).)

If you want to store the rounded value in an integer type, you probably want to use one of the functions described in lrint(3) instead.

SEE ALSO

ceil(3), floor(3), lrint(3), round(3), trunc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

184 - Linux cli command Net_DBus_ProxyObjectpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_ProxyObjectpm and provides detailed information about the command Net_DBus_ProxyObjectpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_ProxyObjectpm.

NAME 🖥️ Net_DBus_ProxyObjectpm 🖥️

Implement objects to export to the bus

SYNOPSIS

# Connecting an object to the bus, under a service package main; use Net::DBus; # Attach to the bus my $bus = Net::DBus->find; # Create our applications object instance my $object = Demo::HelloWorld->new() # Acquire a service org.demo.Hello my $service = $bus->export_service(“org.demo.Hello”); # Finally export the object to the bus my $proxy = Demo::HelloWorld::DBus->new($object); ….rest of program… # Define a new package for the object were going # to export package Demo::HelloWorld; sub new { my $class = shift; my $service = shift; my $self = {}; $self->{sighandler} = undef; bless $self, $class; return $self; } sub sighandler { my $self = shift; my $callback = shift; $self->[sighandler} = $callback; } sub Hello { my $self = shift; my $name = shift; &{$self->{sighandler}}(“Greeting”, “Hello $name”); return “Said hello to $name”; } sub Goodbye { my $self = shift; my $name = shift; &{$self->{sighandler}}(“Greeting”, “Goodbye $name”); return “Said goodbye to $name”; } # Define a new package for the object were going # to export package Demo::HelloWorld::DBus; # Specify the main interface provided by our object use Net::DBus::Exporter qw(org.example.demo.Greeter); # Were going to be a DBus object use base qw(Net::DBus::ProxyObject); # Export a Greeting signal taking a stringl string parameter dbus_signal(“Greeting”, [“string”]); # Export Hello as a method accepting a single string # parameter, and returning a single string value dbus_method(“Hello”, [“string”], [“string”]); sub new { my $class = shift; my $service = shift; my $impl = shfit; my $self = $class->SUPER::new($service, “/org/demo/HelloWorld”, $impl); bless $self, $class; $self->sighandler(sub { my $signame = shift; my $arg = shift; $self->emit_signal($signame, $arg); }); return $self; } # Export Goodbye as a method accepting a single string # parameter, and returning a single string, but put it # in the org.exaple.demo.Farewell interface dbus_method(“Goodbye”, [“string”], [“string”], “org.example.demo.Farewell”);

DESCRIPTION

This the base for creating a proxy between a bus object and an application’s object. It allows the application’s object model to remain separate from the RPC object model. The proxy object will forward method calls from the bus, to the implementation object. The proxy object can also register callbacks against the application object, which it can use to then emit signals on the bus.

METHODS

my $object = Net::DBus::ProxyObject->new($service, $path, $impl)
This creates a new DBus object with an path of $path registered within the service $service. The $path parameter should be a string complying with the usual DBus requirements for object paths, while the $service parameter should be an instance of Net::DBus::Service. The latter is typically obtained by calling the export_service method on the Net::DBus object. The $impl parameter is the application object which will implement the methods being exported to the bus.

my $object = Net::DBus::ProxyObject->new($parentobj, $subpath, $impl)
This creates a new DBus child object with an path of $subpath relative to its parent $parentobj. The $subpath parameter should be a string complying with the usual DBus requirements for object paths, while the $parentobj parameter should be an instance of Net::DBus::BaseObject or a subclass. The $impl parameter is the application object which will implement the methods being exported to the bus.

AUTHOR

Daniel P. Berrange

COPYRIGHT

Copyright (C) 2005-2011 Daniel P. Berrange

SEE ALSO

Net::DBus, Net::DBus::Service, Net::DBus::BaseObject, Net::DBus::ProxyObject, Net::DBus::Exporter, Net::DBus::RemoteObject

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

185 - Linux cli command Net_DNS_RR_L64pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_L64pm and provides detailed information about the command Net_DNS_RR_L64pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_L64pm.

NAME 🖥️ Net_DNS_RR_L64pm 🖥️

DNS L64 resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name IN L64 preference locator64); $rr = Net::DNS::RR->new( name => example.com, type => L64, preference => 10, locator64 => 2001:0DB8:1140:1000 );

DESCRIPTION

Class for DNS 64-bit Locator (L64) resource records.

The L64 resource record is used to hold 64-bit Locator values for ILNPv6-capable nodes.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

preference

$preference = $rr->preference; $rr->preference( $preference );

A 16 bit unsigned integer in network byte order that indicates the relative preference for this L64 record among other L64 records associated with this owner name. Lower values are preferred over higher values.

locator64

$locator64 = $rr->locator64;

The Locator64 field is an unsigned 64-bit integer in network byte order that has the same syntax and semantics as a 64-bit IPv6 routing prefix.

COPYRIGHT

Copyright (c)2012 Dick Franks.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC6742 <https://tools.ietf.org/html/rfc6742>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

186 - Linux cli command POD2_JA_Text_LineFoldpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command POD2_JA_Text_LineFoldpm and provides detailed information about the command POD2_JA_Text_LineFoldpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the POD2_JA_Text_LineFoldpm.

NAME 🖥️ POD2_JA_Text_LineFoldpm 🖥️

プレインテキストの行折り

SYNOPSIS

use Text::LineFold; $lf = Text::LineFold->new(); # 行折りする $folded = $lf->fold($string, PLAIN); $indented = $lf->fold( x 8, x 4, $string); # 行折りを戻す $unfolded = $lf->unfold($string, FIXED);

DESCRIPTION

Text::LineFold は、プレインテキストの行折りをしたり行折りを戻したりする。 電子メールメッセージを主眼に置いており、RFC 3676 の flowed 形式にも対応する。

公開インタフェース

new ([KEY => VALUE, …])
コンストラクタ。 KEY => VALUE の対については config メソッドを参照。

$self->config (KEY)

$self->config ([KEY => VAL, …])

インスタンスメソッド。 設定を取得または更新する。以下の KEY => VALUE 対を指定できる。

Charset => CHARSET
入力文字列を符号化しているキャラクタセット。 文字列または MIME::Charset~[ja] オブジェクト。 初期値は "UTF-8"

Language => LANGUAGE
Charset オプションとともに、言語/地域の文脈を決めるのに使える。 初期値は "XX"。 “Context” in Unicode::LineBreak~[ja] オプションも参照。

Newline => STRING
改行の文字列。 初期値は " "

OutputCharset => CHARSET
fold()/unfold() の結果を符号化するキャラクタセット。 文字列または MIME::Charset~[ja] オブジェクト。 特殊値 "_UNICODE_" を指定すると、結果は Unicode 文字列となる。 初期値は Charset オプションの値。

TabSize => NUMBER
タブストップの桁数。 0 を指定すると、タブストップを無視する。 初期値は 8。

BreakIndent

CharMax

ColMax

ColMin

ComplexBreaking

EAWidth

HangulAsAL

LBClass

LegacyCM

Prep

Urgent

“オプション” in Unicode::LineBreak~[ja] を参照。

$self->fold (STRING, [METHOD])

$self->fold (INITIAL_TAB, SUBSEQUENT_TAB, STRING, …)

インスタンスメソッド。 文字列 STRING を行折りする。 行末の余分な空白文字や水平タブ文字を除去し、 改行の文字列を Newline オプションで指定したものに置き換え、 テキスト末尾に改行がなければ追加する。 水平タブ文字は TabSize オプションによる幅のタブストップと見なす。 ひとつめの形式では、METHOD 引数に以下のオプションを指定できる。

“FIXED”
">" で始まる行は行折りしない。 段落は空行で分かたれる。

“FLOWED”
RFC 3676 で定義される "Format=Flowed; DelSp=Yes" 形式。

“PLAIN”
初期の方法。すべての行を行折りする。

ふたつめの形式は、"wrap()" in Text::Wrap に似ている。 すべての行を行折りする。段落の先頭には INITIAL_TAB を、ほかの行の先頭には SUBSEQUENT_TAB を挿入する。

$self->unfold (STRING, METHOD)
文字列 STRING の行折りされた段落をつなぎ直してそれを返す。 METHOD 引数には以下のオプションを指定できる。

“FIXED”
初期の方法。 ">" で始まる行はつなぎ直さない。 空行を段落の区切りとみなす。

“FLOWED”
RFC 3676 で定義される "Format=Flowed; DelSp=Yes" 形式をつなぎ直す。

“FLOWEDSP”
RFC 3676 で定義される "Format=Flowed; DelSp=No" 形式をつなぎ直す。

BUGS

バグやバグのような動作は開発者に教えてください。

CPAN Request Tracker: <http://rt.cpan.org/Public/Dist/Display.html?Name=Unicode-LineBreak>.

VERSION

$VERSION 変数を見てほしい。

SEE ALSO

Unicode::LineBreak~[ja], Text::Wrap.

AUTHOR

Copyright (C) 2009-2012 Hatuka*nezumi - IKEDA Soji <hatuka(at)nezumi.nu>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

187 - Linux cli command pthread_rwlockattr_getkind_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_rwlockattr_getkind_np and provides detailed information about the command pthread_rwlockattr_getkind_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_rwlockattr_getkind_np.

NAME 🖥️ pthread_rwlockattr_getkind_np 🖥️

set/get the read-write lock kind of the thread read-write lock attribute object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_rwlockattr_setkind_np(pthread_rwlockattr_t *attr,
 int pref);
int pthread_rwlockattr_getkind_np(
 const pthread_rwlockattr_t *restrict attr,
 int *restrict pref);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

pthread_rwlockattr_setkind_np(), pthread_rwlockattr_getkind_np():

    _XOPEN_SOURCE >= 500 || _POSIX_C_SOURCE >= 200809L

DESCRIPTION

The pthread_rwlockattr_setkind_np() function sets the “lock kind” attribute of the read-write lock attribute object referred to by attr to the value specified in pref. The argument pref may be set to one of the following:

PTHREAD_RWLOCK_PREFER_READER_NP
This is the default. A thread may hold multiple read locks; that is, read locks are recursive. According to The Single Unix Specification, the behavior is unspecified when a reader tries to place a lock, and there is no write lock but writers are waiting. Giving preference to the reader, as is set by PTHREAD_RWLOCK_PREFER_READER_NP, implies that the reader will receive the requested lock, even if a writer is waiting. As long as there are readers, the writer will be starved.

PTHREAD_RWLOCK_PREFER_WRITER_NP
This is intended as the write lock analog of PTHREAD_RWLOCK_PREFER_READER_NP. This is ignored by glibc because the POSIX requirement to support recursive read locks would cause this option to create trivial deadlocks; instead use PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP which ensures the application developer will not take recursive read locks thus avoiding deadlocks.

PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP
Setting the lock kind to this avoids writer starvation as long as any read locking is not done in a recursive fashion.

The pthread_rwlockattr_getkind_np() function returns the value of the lock kind attribute of the read-write lock attribute object referred to by attr in the pointer pref.

RETURN VALUE

On success, these functions return 0. Given valid pointer arguments, pthread_rwlockattr_getkind_np() always succeeds. On error, pthread_rwlockattr_setkind_np() returns a nonzero error number.

ERRORS

EINVAL
pref specifies an unsupported value.

STANDARDS

GNU; hence the suffix “_np” (nonportable) in the names.

HISTORY

glibc 2.1.

SEE ALSO

pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

188 - Linux cli command zip_file_extra_field_get

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_file_extra_field_get and provides detailed information about the command zip_file_extra_field_get, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_file_extra_field_get.

libzip (-lzip)

The

function returns the extra field with index

for the file at position

in the zip archive. This pointer should not be modified or

and becomes invalid when

is closed. If

is not

the integer to which it points will be set to the ID (two-byte signature) of the selected extra field. If

is not

the integer to which it points will be set to the length of the extra field. Generally speaking,

and

should be passed since only the extra field data is returned (i.e., neither the ID nor the length, if the

and

arguments are not provided).

The following

are supported:

Return extra fields from the archive’s central directory.

Return extra fields from the local file headers.

Return the original unchanged extra fields, ignoring any changes made.

The

function returns the extra field with ID (two-byte signature)

and index

(in other words, the

extra field with ID

The other arguments are the same as for

Upon successful completion, a pointer to an extra field is returned, or

if there is no extra field with that

for the file with index

In case of an error,

is returned and the error code in

is set to indicate the error.

and

fail if:

is not a valid file index in

or

is not a valid extra file index (for ID

and

were added in libzip 0.11.

and

Please note that the extra field IDs 0x0001 (ZIP64 extension), 0x6375 (Infozip UTF-8 comment), and 0x7075 (Infozip UTF-8 file name) can not be read using

since they are used by

internally.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

189 - Linux cli command XShapeCombineRectangles

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XShapeCombineRectangles and provides detailed information about the command XShapeCombineRectangles, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XShapeCombineRectangles.

NAME 🖥️ XShapeCombineRectangles 🖥️

X nonrectangular shape functions

SYNTAX

#include <X11/extensions/shape.h>
Bool XShapeQueryExtension (
	Display *dpy,
	int *event_basep,
	int *error_basep);
Status XShapeQueryVersion (
	Display *dpy,
	int *major_versionp,
	int *minor_versionp);
void XShapeCombineRegion (
	Display *dpy,
	Window dest,
	int destKind,
	int xOff,
	int yOff,
	struct _XRegion *r,
	int op);
void XShapeCombineRectangles (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	XRectangle *rects,
	int n_rects,
	int op,
	int ordering);
void XShapeCombineMask (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	Pixmap src,
	int op);
void XShapeCombineShape (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	Pixmap src,
	int srcKind,
	int op);
void XShapeOffsetShape (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff);
Status XShapeQueryExtents (
	Display *dpy,
	Window window,
	int *bShaped,
	int *xbs,
	int *ybs,
	unsigned int *wbs,
	unsigned int *hbs,
	int *cShaped,
	int *xcs,
	int *ycs,
	unsigned int *wcs,
	unsigned int *hcs);
void XShapeSelectInput (
	Display *dpy,
	Window window,
	unsigned longmask);
unsigned long XShapeInputSelected (
	Display *dpy,
	Window window);
XRectangle *XShapeGetRectangles (
	Display *dpy,
	Window window,
	int kind,
	int *count,
	int *ordering);

STRUCTURES

typedef struct {
    int type;	/* of event */
    unsigned long serial;	/* # of last request processed by server */
    Bool send_event;	/* true if this came from a SendEvent request */
    Display *display;	/* Display the event was read from */
    Window window;	/* window of event */
    int kind;	/* ShapeBounding or ShapeClip */
    int x, y;	/* extents of new region */
    unsigned width, height;
    Time time;	/* server timestamp when region changed */
    Bool shaped;	/* true if the region exists */
} XShapeEvent;

DESCRIPTION

The X11 Nonrectangular Window Shape Extension adds nonrectangular windows to the X Window System.

PREDEFINED VALUES

Operations:

 ShapeSet   ShapeUnion   ShapeIntersect   ShapeSubtract   ShapeInvert 

Shape Kinds:

 ShapeBounding   ShapeClip 

Event defines:

 ShapeNotifyMask   ShapeNotify 

BUGS

This manual page needs a lot more work.

SEE ALSO

X11 Nonrectangular Window Shape Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

190 - Linux cli command XtAddExposureToRegion

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAddExposureToRegion and provides detailed information about the command XtAddExposureToRegion, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAddExposureToRegion.

NAME 🖥️ XtAddExposureToRegion 🖥️

merge exposure events into a region

SYNTAX

#include <X11/Intrinsic.h>

void XtAddExposureToRegion(XEvent *event, Region region);

ARGUMENTS

event
Specifies a pointer to the Expose or GraphicsExpose event.

region
Specifies the region object (as defined in <X11/Xutil.h>).

DESCRIPTION

The XtAddExposureToRegion function computes the union of the rectangle defined by the exposure event and the specified region. Then, it stores the results back in region. If the event argument is not an Expose or GraphicsExpose event, XtAddExposureToRegion returns without an error and without modifying region.

This function is used by the exposure compression mechanism (see Section 7.9.3).

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

191 - Linux cli command finitel

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command finitel and provides detailed information about the command finitel, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the finitel.

NAME 🖥️ finitel 🖥️

BSD floating-point classification functions

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
int finite(double x);
int finitef(float x);
int finitel(long double x);
int isinf(double x);
int isinff(float x);
int isinfl(long double x);
int isnan(double x);
int isnanf(float x);
int isnanl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

finite(), finitef(), finitel():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
isinf():
    _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isinff(), isinfl():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isnan():

    _XOPEN_SOURCE || _ISOC99_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isnanf(), isnanl():

    _XOPEN_SOURCE >= 600
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The finite(), finitef(), and finitel() functions return a nonzero value if x is neither infinite nor a “not-a-number” (NaN) value, and 0 otherwise.

The isnan(), isnanf(), and isnanl() functions return a nonzero value if x is a NaN value, and 0 otherwise.

The isinf(), isinff(), and isinfl() functions return 1 if x is positive infinity, -1 if x is negative infinity, and 0 otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

finite(), finitef(), finitel(), isinf(), isinff(), isinfl(), isnan(), isnanf(), isnanl()

Thread safetyMT-Safe

NOTES

Note that these functions are obsolete. C99 defines macros isfinite(), isinf(), and isnan() (for all types) replacing them. Further note that the C99 isinf() has weaker guarantees on the return value. See fpclassify(3).

SEE ALSO

fpclassify(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

192 - Linux cli command fmal

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fmal and provides detailed information about the command fmal, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fmal.

NAME 🖥️ fmal 🖥️

floating-point multiply and add

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double fma(double x, double y, double z);
float fmaf(float x, float y, float z);
long double fmal(long double x, long double y, long double z);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

fma(), fmaf(), fmal():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions compute x * y + z. The result is rounded as one ternary operation according to the current rounding mode (see fenv(3)).

RETURN VALUE

These functions return the value of x * y + z, rounded as one ternary operation.

If x or y is a NaN, a NaN is returned.

If x times y is an exact infinity, and z is an infinity with the opposite sign, a domain error occurs, and a NaN is returned.

If one of x or y is an infinity, the other is 0, and z is not a NaN, a domain error occurs, and a NaN is returned.

If one of x or y is an infinity, and the other is 0, and z is a NaN, a domain error occurs, and a NaN is returned.

If x times y is not an infinity times zero (or vice versa), and z is a NaN, a NaN is returned.

If the result overflows, a range error occurs, and an infinity with the correct sign is returned.

If the result underflows, a range error occurs, and a signed 0 is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x * y + z, or x * y is invalid and z is not a NaN
An invalid floating-point exception (FE_INVALID) is raised.

Range error: result overflow
An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error: result underflow
An underflow floating-point exception (FE_UNDERFLOW) is raised.

These functions do not set errno.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fma(), fmaf(), fmal()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

remainder(3), remquo(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

193 - Linux cli command sigsetjmp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigsetjmp and provides detailed information about the command sigsetjmp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigsetjmp.

NAME 🖥️ sigsetjmp 🖥️

performing a nonlocal goto

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <setjmp.h>
int setjmp(jmp_buf env);
int sigsetjmp(sigjmp_buf env, int savesigs);
[[noreturn]] void longjmp(jmp_buf env, int val);
[[noreturn]] void siglongjmp(sigjmp_buf env, int val);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

setjmp(): see NOTES.

sigsetjmp():

    _POSIX_C_SOURCE

DESCRIPTION

The functions described on this page are used for performing “nonlocal gotos”: transferring execution from one function to a predetermined location in another function. The setjmp() function dynamically establishes the target to which control will later be transferred, and longjmp() performs the transfer of execution.

The setjmp() function saves various information about the calling environment (typically, the stack pointer, the instruction pointer, possibly the values of other registers and the signal mask) in the buffer env for later use by longjmp(). In this case, setjmp() returns 0.

The longjmp() function uses the information saved in env to transfer control back to the point where setjmp() was called and to restore (“rewind”) the stack to its state at the time of the setjmp() call. In addition, and depending on the implementation (see NOTES), the values of some other registers and the process signal mask may be restored to their state at the time of the setjmp() call.

Following a successful longjmp(), execution continues as if setjmp() had returned for a second time. This “fake” return can be distinguished from a true setjmp() call because the “fake” return returns the value provided in val. If the programmer mistakenly passes the value 0 in val, the “fake” return will instead return 1.

sigsetjmp() and siglongjmp()

sigsetjmp() and siglongjmp() also perform nonlocal gotos, but provide predictable handling of the process signal mask.

If, and only if, the savesigs argument provided to sigsetjmp() is nonzero, the process’s current signal mask is saved in env and will be restored if a siglongjmp() is later performed with this env.

RETURN VALUE

setjmp() and sigsetjmp() return 0 when called directly; on the “fake” return that occurs after longjmp() or siglongjmp(), the nonzero value specified in val is returned.

The longjmp() or siglongjmp() functions do not return.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setjmp(), sigsetjmp()

Thread safetyMT-Safe

longjmp(), siglongjmp()

Thread safetyMT-Safe

STANDARDS

setjmp()
longjmp()
C11, POSIX.1-2008.

sigsetjmp()
siglongjmp()
POSIX.1-2008.

HISTORY

setjmp()
longjmp()
POSIX.1-2001, C89.

sigsetjmp()
siglongjmp()
POSIX.1-2001.

POSIX does not specify whether setjmp() will save the signal mask (to be later restored during longjmp()). In System V it will not. In 4.3BSD it will, and there is a function _setjmp() that will not. The behavior under Linux depends on the glibc version and the setting of feature test macros. Before glibc 2.19, setjmp() follows the System V behavior by default, but the BSD behavior is provided if the _BSD_SOURCE feature test macro is explicitly defined and none of _POSIX_SOURCE, _POSIX_C_SOURCE, _XOPEN_SOURCE, _GNU_SOURCE, or _SVID_SOURCE is defined. Since glibc 2.19, <setjmp.h> exposes only the System V version of setjmp(). Programs that need the BSD semantics should replace calls to setjmp() with calls to sigsetjmp() with a nonzero savesigs argument.

NOTES

setjmp() and longjmp() can be useful for dealing with errors inside deeply nested function calls or to allow a signal handler to pass control to a specific point in the program, rather than returning to the point where the handler interrupted the main program. In the latter case, if you want to portably save and restore signal masks, use sigsetjmp() and siglongjmp(). See also the discussion of program readability below.

CAVEATS

The compiler may optimize variables into registers, and longjmp() may restore the values of other registers in addition to the stack pointer and program counter. Consequently, the values of automatic variables are unspecified after a call to longjmp() if they meet all the following criteria:

  • they are local to the function that made the corresponding setjmp() call;

  • their values are changed between the calls to setjmp() and longjmp(); and

  • they are not declared as volatile.

Analogous remarks apply for siglongjmp().

Nonlocal gotos and program readability

While it can be abused, the traditional C “goto” statement at least has the benefit that lexical cues (the goto statement and the target label) allow the programmer to easily perceive the flow of control. Nonlocal gotos provide no such cues: multiple setjmp() calls might employ the same jmp_buf variable so that the content of the variable may change over the lifetime of the application. Consequently, the programmer may be forced to perform detailed reading of the code to determine the dynamic target of a particular longjmp() call. (To make the programmer’s life easier, each setjmp() call should employ a unique jmp_buf variable.)

Adding further difficulty, the setjmp() and longjmp() calls may not even be in the same source code module.

In summary, nonlocal gotos can make programs harder to understand and maintain, and an alternative should be used if possible.

Undefined Behavior

If the function which called setjmp() returns before longjmp() is called, the behavior is undefined. Some kind of subtle or unsubtle chaos is sure to result.

If, in a multithreaded program, a longjmp() call employs an env buffer that was initialized by a call to setjmp() in a different thread, the behavior is undefined.

POSIX.1-2008 Technical Corrigendum 2 adds longjmp() and siglongjmp() to the list of async-signal-safe functions. However, the standard recommends avoiding the use of these functions from signal handlers and goes on to point out that if these functions are called from a signal handler that interrupted a call to a non-async-signal-safe function (or some equivalent, such as the steps equivalent to exit(3) that occur upon a return from the initial call to main()), the behavior is undefined if the program subsequently makes a call to a non-async-signal-safe function. The only way of avoiding undefined behavior is to ensure one of the following:

  • After long jumping from the signal handler, the program does not call any non-async-signal-safe functions and does not return from the initial call to main().

  • Any signal whose handler performs a long jump must be blocked during every call to a non-async-signal-safe function and no non-async-signal-safe functions are called after returning from the initial call to main().

SEE ALSO

signal(7), signal-safety(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

194 - Linux cli command Tk_Photopm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Photopm and provides detailed information about the command Tk_Photopm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Photopm.

NAME 🖥️ Tk_Photopm 🖥️

Full-color images

SYNOPSIS

$widget->Photo(?name??, options?)

DESCRIPTION

A photo is an image whose pixels can display any color or be transparent. A photo image is stored internally in full color (32 bits per pixel), and is displayed using dithering if necessary. Image data for a photo image can be obtained from a file or a string, or it can be supplied from C code through a procedural interface. At present, only GIF, XBM, XPM, BMP, JPEG, PNG and PPM/PGM formats are supported, but an interface exists to allow additional image file formats to be added easily. A photo image is transparent in regions where no image data has been supplied or where it has been set transparent by the transparencySet subcommand.

CREATING PHOTOS

Photos are created using the Photo method. Photo supports the following options:

-data => string
Specifies the contents of the image as a string. The string can contain base64 encoded data or binary data. The format of the string must be one of those for which there is an image file format handler that will accept string data. If both the -data and -file options are specified, the -file option takes precedence.

-format => format-name
Specifies the name of the file format for the data specified with the -data or -file option.

-file => name
name gives the name of a file that is to be read to supply data for the photo image. The file format must be one of those for which there is an image file format handler that can read data.

-gamma => value
Specifies that the colors allocated for displaying this image in a window should be corrected for a non-linear display with the specified gamma exponent value. (The intensity produced by most CRT displays is a power function of the input value, to a good approximation; gamma is the exponent and is typically around 2). The value specified must be greater than zero. The default value is one (no correction). In general, values greater than one will make the image lighter, and values less than one will make it darker.

-height => number
Specifies the height of the image, in pixels. This option is useful primarily in situations where the user wishes to build up the contents of the image piece by piece. A value of zero (the default) allows the image to expand or shrink vertically to fit the data stored in it.

-palette => palette-spec
Specifies the resolution of the color cube to be allocated for displaying this image, and thus the number of colors used from the colormaps of the windows where it is displayed. The palette-spec string may be either a single decimal number, specifying the number of shades of gray to use, or three decimal numbers separated by slashes (/), specifying the number of shades of red, green and blue to use, respectively. If the first form (a single number) is used, the image will be displayed in monochrome (i.e., grayscale).

-width => number
Specifies the width of the image, in pixels. This option is useful primarily in situations where the user wishes to build up the contents of the image piece by piece. A value of zero (the default) allows the image to expand or shrink horizontally to fit the data stored in it.

IMAGE METHODS

When a photo image is created, Tk also creates a new object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above.

Those options that write data to the image generally expand the size of the image, if necessary, to accommodate the data written to the image, unless the user has specified non-zero values for the -width and/or -height configuration options, in which case the width and/or height, respectively, of the image will not be changed.

The following addition methods are available for photo images:

$image->blank
Blank the image; that is, set the entire image to have no data, so it will be displayed as transparent, and the background of whatever window it is displayed in will show through.

$image->copy(sourceImage ?,option value(s) …?)
Copies a region from the image called $sourceImage (which must be a photo image) to the image called $image, possibly with pixel zooming and/or subsampling. If no options are specified, this method copies the whole of $sourceImage into $image, starting at coordinates (0,0) in $image. The following options may be specified:

-from => x1, y1, ? ,x2, y2?
Specifies a rectangular sub-region of the source image to be copied. (x1,y1) and (x2,y2) specify diagonally opposite corners of the rectangle. If x2 and y2 are not specified, the default value is the bottom-right corner of the source image. The pixels copied will include the left and top edges of the specified rectangle but not the bottom or right edges. If the -from option is not given, the default is the whole source image.

-to => x1, y1, ?, x2, y2?
Specifies a rectangular sub-region of the destination image to be affected. (x1,y1) and (x2,y2) specify diagonally opposite corners of the rectangle. If x2 and y2 are not specified, the default value is (x1,y1) plus the size of the source region (after subsampling and zooming, if specified). If x2 and y2 are specified, the source region will be replicated if necessary to fill the destination region in a tiled fashion.

-shrink
Specifies that the size of the destination image should be reduced, if necessary, so that the region being copied into is at the bottom-right corner of the image. This option will not affect the width or height of the image if the user has specified a non-zero value for the -width or -height configuration option, respectively.

-zoom => x, y
Specifies that the source region should be magnified by a factor of x in the X direction and y in the Y direction. If y is not given, the default value is the same as x. With this option, each pixel in the source image will be expanded into a block of x x y pixels in the destination image, all the same color. x and y must be greater than 0.

-subsample => x, y
Specifies that the source image should be reduced in size by using only every xth pixel in the X direction and yth pixel in the Y direction. Negative values will cause the image to be flipped about the Y or X axes, respectively. If y is not given, the default value is the same as x.

-compositingrule => rule
Specifies how transparent pixels in the source image are combined with the destination image. When a compositing rule of overlay is set, the old contents of the destination image are visible, as if the source image were printed on a piece of transparent film and placed over the top of the destination. When a compositing rule of set is set, the old contents of the destination image are discarded and the source image is used as-is. The default compositing rule is overlay.

$image->data(?option value(s), …?)
Returns image data in the form of a string. The following options may be specified:

-background => color
If the color is specified, the data will not contain any transparency information. In all transparent pixels the color will be replaced by the specified color.

-format => format-name
Specifies the name of the image file format handler to be used. Specifically, this method searches for the first handler whose name matches a initial substring of format-name and which has the capability to read this image data. If this option is not given, this method uses the first handler that has the capability to read the image data.

-from => x1, y1, ?, x2, y2?
Specifies a rectangular region of $image to be returned. If only x1 and y1 are specified, the region extends from (x1,y1) to the bottom-right corner of $image. If all four coordinates are given, they specify diagonally opposite corners of the rectangular region, including x1,y1 and excluding x2,y2. The default, if this option is not given, is the whole image.

-grayscale
If this options is specified, the data will not contain color information. All pixel data will be transformed into grayscale.

$image->get(x, y)
Returns the color of the pixel at coordinates (x,y) in the image as a list of three integers between 0 and 255, representing the red, green and blue components respectively.

$image->put(data ?,-format=>format-name? ?,-to=> x1 y1 ?x2 y2??)
Sets pixels in $image to the data specified in data. This command first searches the list of image file format handlers for a handler that can interpret the data in data, and then reads the image encoded within into $image (the destination image). If data does not match any known format, an attempt to interpret it as a (top-to-bottom) list of scan-lines is made, with each scan-line being a (left-to-right) list of pixel colors (see Tk_GetColor for a description of valid colors.) Every scan-line must be of the same length. Note that when data is a single color name, you are instructing Tk to fill a rectangular region with that color. The following options may be specified:

-format =>format-name
Specifies the format of the image data in data. Specifically, only image file format handlers whose names begin with format-name will be used while searching for an image data format handler to read the data.

-to =>x, y ?, x2, y2?
Specifies the coordinates of the top-left corner (x1,y1) of the region of $image into which data from filename are to be read. The default is (0,0). If x2,y2 is given and data is not large enough to cover the rectangle specified by this option, the image data extracted will be tiled so it covers the entire destination rectangle. Note that if data specifies a single color value, then a region extending to the bottom-right corner represented by (x2,y2) will be filled with that color.

$image->read(filename ?,option value(s), …?)
Reads image data from the file named filename into the image. This method first searches the list of image file format handlers for a handler that can interpret the data in filename, and then reads the image in filename into $image (the destination image). The following options may be specified:

-format => format-name
Specifies the format of the image data in filename. Specifically, only image file format handlers whose names begin with format-name will be used while searching for an image data format handler to read the data.

-from => x1, y1, x2, y2
Specifies a rectangular sub-region of the image file data to be copied to the destination image. If only x1 and y1 are specified, the region extends from (x1,y1) to the bottom-right corner of the image in the image file. If all four coordinates are specified, they specify diagonally opposite corners or the region. The default, if this option is not specified, is the whole of the image in the image file.

-shrink
If this option is specified, the size of $image will be reduced, if necessary, so that the region into which the image file data are read is at the bottom-right corner of the $image. This option will not affect the width or height of the image if the user has specified a non-zero value for the -width or -height configuration option, respectively.

-to => x, y
Specifies the coordinates of the top-left corner of the region of $image into which data from filename are to be read. The default is (0,0).

$image->redither
The dithering algorithm used in displaying photo images propagates quantization errors from one pixel to its neighbors. If the image data for $image is supplied in pieces, the dithered image may not be exactly correct. Normally the difference is not noticeable, but if it is a problem, this method can be used to recalculate the dithered image in each window where the image is displayed.

$image->transparency(subcommand, ?arg, arg …?);
Allows examination and manipulation of the transparency information in the photo image. Several subcommands are available:

$image->transparencyGet(x, y);
Returns a boolean indicating if the pixel at (x,y) is transparent.

$image->transparencySet(x, y, boolean);
Makes the pixel at (x,y) transparent if boolean is true, and makes that pixel opaque otherwise.

$image->write(filename ?,option value(s), …?)
Writes image data from $image to a file named filename. The following options may be specified:

-background => color
If the color is specified, the data will not contain any transparency information. In all transparent pixels the color will be replaced by the specified color.

-format => format-name
Specifies the name of the image file format handler to be used to write the data to the file. Specifically, this subcommand searches for the first handler whose name matches a initial substring of format-name and which has the capability to write an image file. If this option is not given, this subcommand uses the first handler that has the capability to write an image file.

-from => x1, y1, ?, x2, y2?
Specifies a rectangular region of $image to be written to the image file. If only x1 and y1 are specified, the region extends from (x1,y1) to the bottom-right corner of $image. If all four coordinates are given, they specify diagonally opposite corners of the rectangular region. The default, if this option is not given, is the whole image.

-grayscale
If this options is specified, the data will not contain color information. All pixel data will be transformed into grayscale.

IMAGE FORMATS

The photo image code is structured to allow handlers for additional image file formats to be added easily. The photo image code maintains a list of these handlers. Handlers are added to the list by registering them with a call to Tk_CreatePhotoImageFormat. The standard Tk distribution comes with handlers for XBM, XPM, BMP, JPEG, PNG and PPM/PGM formats, which are automatically registered on initialization.

When reading an image file or processing string data specified with the -data configuration option, the photo image code invokes each handler in turn until one is found that claims to be able to read the data in the file or string. Usually this will find the correct handler, but if it doesn’t, the user may give a format name with the -format option to specify which handler to use. In fact the photo image code will try those handlers whose names begin with the string specified for the -format option (the comparison is case-insensitive). For example, if the user specifies -format => gif, then a handler named GIF87 or GIF89 may be invoked, but a handler named JPEG may not (assuming that such handlers had been registered).

When writing image data to a file, the processing of the -format option is slightly different: the string value given for the -format option must begin with the complete name of the requested handler, and may contain additional information following that, which the handler can use, for example, to specify which variant to use of the formats supported by the handler. Note that not all image handlers may support writing transparency data to a file, even where the target image format does.

COLOR ALLOCATION

When a photo image is displayed in a window, the photo image code allocates colors to use to display the image and dithers the image, if necessary, to display a reasonable approximation to the image using the colors that are available. The colors are allocated as a color cube, that is, the number of colors allocated is the product of the number of shades of red, green and blue.

Normally, the number of colors allocated is chosen based on the depth of the window. For example, in an 8-bit PseudoColor window, the photo image code will attempt to allocate seven shades of red, seven shades of green and four shades of blue, for a total of 198 colors. In a 1-bit StaticGray (monochrome) window, it will allocate two colors, black and white. In a 24-bit DirectColor or TrueColor window, it will allocate 256 shades each of red, green and blue. Fortunately, because of the way that pixel values can be combined in DirectColor and TrueColor windows, this only requires 256 colors to be allocated. If not all of the colors can be allocated, the photo image code reduces the number of shades of each primary color and tries again.

The user can exercise some control over the number of colors that a photo image uses with the -palette configuration option. If this option is used, it specifies the maximum number of shades of each primary color to try to allocate. It can also be used to force the image to be displayed in shades of gray, even on a color display, by giving a single number rather than three numbers separated by slashes.

CREDITS

The photo image type was designed and implemented by Paul Mackerras, based on his earlier photo widget and some suggestions from John Ousterhout.

SEE ALSO

Tk::Bitmap Tk::Image Tk::Pixmap

KEYWORDS

photo, image, color

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

195 - Linux cli command nexttowardl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command nexttowardl and provides detailed information about the command nexttowardl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the nexttowardl.

NAME 🖥️ nexttowardl 🖥️

floating-point number manipulation

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double nextafter(double x, double y);
float nextafterf(float x, float y);
long double nextafterl(long double x, long double y);
double nexttoward(double x, long double y);
float nexttowardf(float x, long double y);
long double nexttowardl(long double x, long double y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

nextafter():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

nextafterf(), nextafterl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

nexttoward(), nexttowardf(), nexttowardl():

    _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE
        || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The nextafter(), nextafterf(), and nextafterl() functions return the next representable floating-point value following x in the direction of y. If y is less than x, these functions will return the largest representable number less than x.

If x equals y, the functions return y.

The nexttoward(), nexttowardf(), and nexttowardl() functions do the same as the corresponding nextafter() functions, except that they have a long double second argument.

RETURN VALUE

On success, these functions return the next representable floating-point value after x in the direction of y.

If x equals y, then y (cast to the same type as x) is returned.

If x or y is a NaN, a NaN is returned.

If x is finite, and the result would overflow, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the correct mathematical sign.

If x is not equal to y, and the correct function result would be subnormal, zero, or underflow, a range error occurs, and either the correct value (if it can be represented), or 0.0, is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error: result overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error: result is subnormal or underflows
errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

nextafter(), nextafterf(), nextafterl(), nexttoward(), nexttowardf(), nexttowardl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

This function is defined in IEC 559 (and the appendix with recommended functions in IEEE 754/IEEE 854).

HISTORY

C99, POSIX.1-2001.

BUGS

In glibc 2.5 and earlier, these functions do not raise an underflow floating-point (FE_UNDERFLOW) exception when an underflow occurs.

Before glibc 2.23 these functions did not set errno.

SEE ALSO

nearbyint(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

196 - Linux cli command X11_Protocol_Connectionpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command X11_Protocol_Connectionpm and provides detailed information about the command X11_Protocol_Connectionpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the X11_Protocol_Connectionpm.

NAME 🖥️ X11_Protocol_Connectionpm 🖥️

Perl module abstract base class for X11 client to server connections

SYNOPSIS

# In connection object module package X11::Protocol::Connection::CarrierPigeon; use X11::Protocol::Connection; @ISA = (X11::Protocol::Connection); sub open { … } sub give { … } sub get { … } sub fh { … } … # In program $connection = X11::Protocol::Connection::CarrierPigeon ->open($host, $display_number); $x = X11::Protocol->new($connection); $connection->give($data); $reply = unpack(“I”, $connection->get(4)); use IO::Select; $sel = IO::select->new($connection->fh); if ($sel->can_read == $connection->fh) …

DESCRIPTION

This module is an abstract base class for the various X11::Protocol::Connection::* modules that provide connections to X servers for the X11::Protocol module. It provides stubs for the following methods:

open

$conn = X11::Protocol::Connection::Foo->open($host, $display_num)

Open a connection to the specified display (numbered from 0) on the specified $host.

give

$conn->give($data)

Send the given data to the server. Normally, this method is used only by the protocol module itself.

get

$data = $conn->get($n)

Read $n bytes of data from the server. Normally, this method is used only by the protocol module itself.

fh

$filehandle = $conn->fh

Return an object suitable for use as a filehandle. This is mainly useful for doing select() and other such system calls.

AUTHOR

Stephen McCamant <[email protected]>.

SEE ALSO

perl (1), X11::Protocol, X11::Protocol::Connection::Socket, X11::Protocol::Connection::FileHandle, X11::Protocol::Connection::INETSocket, X11::Protocol::Connection::UNIXSocket, X11::Protocol::Connection::INETFH, X11::Protocol::Connection::UNIXFH.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

197 - Linux cli command XauReadAuth

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XauReadAuth and provides detailed information about the command XauReadAuth, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XauReadAuth.

NAME 🖥️ XauReadAuth 🖥️

X authority database routines

SYNOPSIS

#include <X11/Xauth.h>

typedef struct xauth {
        unsigned short  family;
        unsigned short  address_length;
        char    *address;
        unsigned short  number_length;
        char    *number;
        unsigned short  name_length;
        char    *name;
        unsigned short  data_length;
        char    *data;
} Xauth;
char *XauFileName (void);
Xauth *XauReadAuth (FILE *auth_file );
int XauWriteAuth (FILE *auth_file, Xauth *auth );
Xauth *XauGetAuthByAddr (unsigned short family , unsigned short
address_length , const char *address , unsigned short
number_length , const char *number , unsigned short
name_length , const char *name );
Xauth *XauGetBestAuthByAddr (unsigned short family , unsigned short
address_length , const char *address , unsigned short
number_length , const char *number , int types_length ,
char **types , const int *type_lengths );
int XauLockAuth (const char *file_name , int retries , int
timeout , long dead );
int XauUnlockAuth (const char *file_name );
int XauDisposeAuth (Xauth *auth );

DESCRIPTION

XauFileName generates the default authorization file name by first checking the XAUTHORITY environment variable if set, else it returns $HOME/.Xauthority. This name is statically allocated and should not be freed.

XauReadAuth reads the next entry from auth_file. The entry is not statically allocated and should be freed by calling XauDisposeAuth.

XauWriteAuth writes an authorization entry to auth_file. It returns 1 on success, 0 on failure.

XauGetAuthByAddr searches for an entry which matches the given network address/display number pair. The entry is not statically allocated and should be freed by calling XauDisposeAuth.

XauGetBestAuthByAddr is similar to XauGetAuthByAddr, except that a list of acceptable authentication methods is specified. Xau will choose the file entry which matches the earliest entry in this list (e.g., the most secure authentication method). The types argument is an array of strings, one string for each authentication method. types_length specifies how many elements are in the types array. types_lengths is an array of integers representing the length of each string.

XauLockAuth does the work necessary to synchronously update an authorization file. First it makes two file names, one with ``-c’’ appended to file_name, the other with ``-l’’ appended. If the ``-c’’ file already exists and is more than dead seconds old, XauLockAuth removes it and the associated ``-l’’ file. To prevent possible synchronization troubles with NFS, a dead value of zero forces the files to be removed. XauLockAuth makes retries attempts to create and link the file names, pausing timeout seconds between each attempt. XauLockAuth returns a collection of values depending on the results:

LOCK_ERROR
A system error occurred, either a file_name which is too long, or an unexpected failure from a system call. errno may prove useful.

LOCK_TIMEOUT
retries attempts failed

LOCK_SUCCESS
The lock succeeded.

XauUnlockAuth undoes the work of XauLockAuth by unlinking both the ``-c’’ and ``-l’’ file names.

XauDisposeAuth frees storage allocated to hold an authorization entry.

SEE ALSO

xauth(1), xdm(1)

AUTHOR

Keith Packard, MIT X Consortium

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

198 - Linux cli command utmpname

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command utmpname and provides detailed information about the command utmpname, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the utmpname.

NAME 🖥️ utmpname 🖥️

access utmp file entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <utmp.h>
struct utmp *getutent(void);
struct utmp *getutid(const struct utmp *ut);
struct utmp *getutline(const struct utmp *ut);
struct utmp *pututline(const struct utmp *ut);
void setutent(void);
void endutent(void);
int utmpname(const char *file);

DESCRIPTION

New applications should use the POSIX.1-specified “utmpx” versions of these functions; see STANDARDS.

utmpname() sets the name of the utmp-format file for the other utmp functions to access. If utmpname() is not used to set the filename before the other functions are used, they assume _PATH_UTMP, as defined in <paths.h>.

setutent() rewinds the file pointer to the beginning of the utmp file. It is generally a good idea to call it before any of the other functions.

endutent() closes the utmp file. It should be called when the user code is done accessing the file with the other functions.

getutent() reads a line from the current file position in the utmp file. It returns a pointer to a structure containing the fields of the line. The definition of this structure is shown in utmp(5).

getutid() searches forward from the current file position in the utmp file based upon ut. If ut->ut_type is one of RUN_LVL, BOOT_TIME, NEW_TIME, or OLD_TIME, getutid() will find the first entry whose ut_type field matches ut->ut_type. If ut->ut_type is one of INIT_PROCESS, LOGIN_PROCESS, USER_PROCESS, or DEAD_PROCESS, getutid() will find the first entry whose ut_id field matches ut->ut_id.

getutline() searches forward from the current file position in the utmp file. It scans entries whose ut_type is USER_PROCESS or LOGIN_PROCESS and returns the first one whose ut_line field matches ut->ut_line.

pututline() writes the utmp structure ut into the utmp file. It uses getutid() to search for the proper place in the file to insert the new entry. If it cannot find an appropriate slot for ut, pututline() will append the new entry to the end of the file.

RETURN VALUE

getutent(), getutid(), and getutline() return a pointer to a struct utmp on success, and NULL on failure (which includes the “record not found” case). This struct utmp is allocated in static storage, and may be overwritten by subsequent calls.

On success pututline() returns ut; on failure, it returns NULL.

utmpname() returns 0 if the new name was successfully stored, or -1 on failure.

On failure, these functions errno set to indicate the error.

ERRORS

ENOMEM
Out of memory.

ESRCH
Record not found.

setutent(), pututline(), and the getut*() functions can also fail for the reasons described in open(2).

FILES

/var/run/utmp
database of currently logged-in users

/var/log/wtmp
database of past user logins

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getutent()

Thread safety

MT-Unsafe init race:utent race:utentbuf sig:ALRM timer

getutid(), getutline()

Thread safety

MT-Unsafe init race:utent sig:ALRM timer

pututline()

Thread safety

MT-Unsafe race:utent sig:ALRM timer

setutent(), endutent(), utmpname()

Thread safetyMT-Unsafe race:utent

In the above table, utent in race:utent signifies that if any of the functions setutent(), getutent(), getutid(), getutline(), pututline(), utmpname(), or endutent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

None.

HISTORY

XPG2, SVr4.

In XPG2 and SVID 2 the function pututline() is documented to return void, and that is what it does on many systems (AIX, HP-UX). HP-UX introduces a new function _pututline() with the prototype given above for pututline().

All these functions are obsolete now on non-Linux systems. POSIX.1-2001 and POSIX.1-2008, following SUSv1, does not have any of these functions, but instead uses

#include <utmpx.h> struct utmpx *getutxent(void); struct utmpx *getutxid(const struct utmpx *); struct utmpx *getutxline(const struct utmpx *); struct utmpx *pututxline(const struct utmpx *); void setutxent(void); void endutxent(void);

These functions are provided by glibc, and perform the same task as their equivalents without the “x”, but use struct utmpx, defined on Linux to be the same as struct utmp. For completeness, glibc also provides utmpxname(), although this function is not specified by POSIX.1.

On some other systems, the utmpx structure is a superset of the utmp structure, with additional fields, and larger versions of the existing fields, and parallel files are maintained, often /var/*/utmpx and /var/*/wtmpx.

Linux glibc on the other hand does not use a parallel utmpx file since its utmp structure is already large enough. The “x” functions listed above are just aliases for their counterparts without the “x” (e.g., getutxent() is an alias for getutent()).

NOTES

glibc notes

The above functions are not thread-safe. glibc adds reentrant versions

#include <utmp.h>
int getutent_r(struct utmp *ubuf, struct utmp **ubufp);
int getutid_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);
int getutline_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getutent_r(), getutid_r(), getutline_r():

    _GNU_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */    _SVID_SOURCE || _BSD_SOURCE

These functions are GNU extensions, analogs of the functions of the same name without the _r suffix. The ubuf argument gives these functions a place to store their result. On success, they return 0, and a pointer to the result is written in *ubufp. On error, these functions return -1. There are no utmpx equivalents of the above functions. (POSIX.1 does not specify such functions.)

EXAMPLES

The following example adds and removes a utmp record, assuming it is run from within a pseudo terminal. For usage in a real application, you should check the return values of getpwuid(3) and ttyname(3).

#include <pwd.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <utmp.h>
int
main(void)
{
    struct utmp entry;
    system("echo before adding entry:;who");
    entry.ut_type = USER_PROCESS;
    entry.ut_pid = getpid();
    strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen("/dev/"));
    /* only correct for ptys named /dev/tty[pqr][0-9a-z] */
    strcpy(entry.ut_id, ttyname(STDIN_FILENO) + strlen("/dev/tty"));
    entry.ut_time = time(NULL);
    strcpy(entry.ut_user, getpwuid(getuid())->pw_name);
    memset(entry.ut_host, 0, UT_HOSTSIZE);
    entry.ut_addr = 0;
    setutent();
    pututline(&entry);
    system("echo after adding entry:;who");
    entry.ut_type = DEAD_PROCESS;
    memset(entry.ut_line, 0, UT_LINESIZE);
    entry.ut_time = 0;
    memset(entry.ut_user, 0, UT_NAMESIZE);
    setutent();
    pututline(&entry);
    system("echo after removing entry:;who");
    endutent();
    exit(EXIT_SUCCESS);
}

SEE ALSO

getutmp(3), utmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

199 - Linux cli command _Static_assert

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command _Static_assert and provides detailed information about the command _Static_assert, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the _Static_assert.

NAME 🖥️ _Static_assert 🖥️

fail compilation if assertion is false

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <assert.h>
void static_assert(scalar constant-expression, const char *msg);
/* Since C23: */
void static_assert(scalar constant-expression);

DESCRIPTION

This macro is similar to assert(3), but it works at compile time, generating a compilation error (with an optional message) when the input is false (i.e., compares equal to zero).

If the input is nonzero, no code is emitted.

msg must be a string literal. Since C23, this argument is optional.

There’s a keyword, _Static_assert(), that behaves identically, and can be used without including <assert.h>.

RETURN VALUE

No value is returned.

VERSIONS

In C11, the second argument (msg) was mandatory; since C23, it can be omitted.

STANDARDS

C11 and later.

EXAMPLES

static_assert() can’t be used in some places, like for example at global scope. For that, a macro must_be() can be written in terms of static_assert(). The following program uses the macro to get the size of an array safely.

#include <assert.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
 * This macro behaves like static_assert(), failing to
 * compile if its argument is not true.  However, it always
 * returns 0, which allows using it everywhere an expression
 * can be used.
 */
#define must_be(e)                                        \
(                                                         \
    0 * (int) sizeof(                                     \
        struct {                                          \
            static_assert(e);                             \
            int  ISO_C_forbids_a_struct_with_no_members;  \
        }                                                 \
    )                                                     \
)
#define is_same_type(a, b)  \
    __builtin_types_compatible_p(typeof(a), typeof(b))
#define is_array(arr)       (!is_same_type((arr), &*(arr)))
#define must_be_array(arr)  must_be(is_array(arr))
#define sizeof_array(arr)   (sizeof(arr) + must_be_array(arr))
#define nitems(arr)         (sizeof((arr)) / sizeof((arr)[0]) \
                             + must_be_array(arr))
int     foo[10];
int8_t  bar[sizeof_array(foo)];
int
main(void)
{
    for (size_t i = 0; i < nitems(foo); i++) {
        foo[i] = i;
    }
    memcpy(bar, foo, sizeof_array(bar));
    for (size_t i = 0; i < nitems(bar); i++) {
        printf("%d,", bar[i]);
    }
    exit(EXIT_SUCCESS);
}

SEE ALSO

assert(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

200 - Linux cli command va_start

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command va_start and provides detailed information about the command va_start, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the va_start.

NAME 🖥️ va_start 🖥️

variable argument lists

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdarg.h>
void va_start(va_list ap, last);
type va_arg(va_list ap, type);
void va_end(va_list ap);
void va_copy(va_list dest, va_list src);

DESCRIPTION

A function may be called with a varying number of arguments of varying types. The include file <stdarg.h> declares a type va_list and defines three macros for stepping through a list of arguments whose number and types are not known to the called function.

The called function must declare an object of type va_list which is used by the macros va_start(), va_arg(), and va_end().

va_start()

The va_start() macro initializes ap for subsequent use by va_arg() and va_end(), and must be called first.

The argument last is the name of the last argument before the variable argument list, that is, the last argument of which the calling function knows the type.

Because the address of this argument may be used in the va_start() macro, it should not be declared as a register variable, or as a function or an array type.

va_arg()

The va_arg() macro expands to an expression that has the type and value of the next argument in the call. The argument ap is the va_list ap initialized by va_start(). Each call to va_arg() modifies ap so that the next call returns the next argument. The argument type is a type name specified so that the type of a pointer to an object that has the specified type can be obtained simply by adding a * to type.

The first use of the va_arg() macro after that of the va_start() macro returns the argument after last. Successive invocations return the values of the remaining arguments.

If there is no next argument, or if type is not compatible with the type of the actual next argument (as promoted according to the default argument promotions), random errors will occur.

If ap is passed to a function that uses va_arg(ap,type), then the value of ap is undefined after the return of that function.

va_end()

Each invocation of va_start() must be matched by a corresponding invocation of va_end() in the same function. After the call va_end(ap) the variable ap is undefined. Multiple traversals of the list, each bracketed by va_start() and va_end() are possible. va_end() may be a macro or a function.

va_copy()

The va_copy() macro copies the (previously initialized) variable argument list src to dest. The behavior is as if va_start() were applied to dest with the same last argument, followed by the same number of va_arg() invocations that was used to reach the current state of src.

An obvious implementation would have a va_list be a pointer to the stack frame of the variadic function. In such a setup (by far the most common) there seems nothing against an assignment

va_list aq = ap;

Unfortunately, there are also systems that make it an array of pointers (of length 1), and there one needs

va_list aq;
*aq = *ap;

Finally, on systems where arguments are passed in registers, it may be necessary for va_start() to allocate memory, store the arguments there, and also an indication of which argument is next, so that va_arg() can step through the list. Now va_end() can free the allocated memory again. To accommodate this situation, C99 adds a macro va_copy(), so that the above assignment can be replaced by

va_list aq;
va_copy(aq, ap);
...
va_end(aq);

Each invocation of va_copy() must be matched by a corresponding invocation of va_end() in the same function. Some systems that do not supply va_copy() have __va_copy instead, since that was the name used in the draft proposal.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

va_start(), va_end(), va_copy()

Thread safetyMT-Safe

va_arg()

Thread safetyMT-Safe race:ap

STANDARDS

C11, POSIX.1-2008.

HISTORY

va_start()
va_arg()
va_end()
C89, POSIX.1-2001.

va_copy()
C99, POSIX.1-2001.

CAVEATS

Unlike the historical varargs macros, the stdarg macros do not permit programmers to code a function with no fixed arguments. This problem generates work mainly when converting varargs code to stdarg code, but it also creates difficulties for variadic functions that wish to pass all of their arguments on to a function that takes a va_list argument, such as vfprintf(3).

EXAMPLES

The function foo takes a string of format characters and prints out the argument associated with each format character based on the type.

#include <stdio.h>
#include <stdarg.h>
void
foo(char *fmt, ...)   /* '...' is C syntax for a variadic function */
{
    va_list ap;
    int d;
    char c;
    char *s;
    va_start(ap, fmt);
    while (*fmt)
        switch (*fmt++) {
        case 's':              /* string */
            s = va_arg(ap, char *);
            printf("string %s

“, s); break; case ’d’: /* int / d = va_arg(ap, int); printf(“int %d “, d); break; case ‘c’: / char / / need a cast here since va_arg only takes fully promoted types */ c = (char) va_arg(ap, int); printf(“char %c “, c); break; } va_end(ap); }

SEE ALSO

vprintf(3), vscanf(3), vsyslog(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

201 - Linux cli command finite

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command finite and provides detailed information about the command finite, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the finite.

NAME 🖥️ finite 🖥️

BSD floating-point classification functions

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
int finite(double x);
int finitef(float x);
int finitel(long double x);
int isinf(double x);
int isinff(float x);
int isinfl(long double x);
int isnan(double x);
int isnanf(float x);
int isnanl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

finite(), finitef(), finitel():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
isinf():
    _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isinff(), isinfl():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isnan():

    _XOPEN_SOURCE || _ISOC99_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isnanf(), isnanl():

    _XOPEN_SOURCE >= 600
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The finite(), finitef(), and finitel() functions return a nonzero value if x is neither infinite nor a “not-a-number” (NaN) value, and 0 otherwise.

The isnan(), isnanf(), and isnanl() functions return a nonzero value if x is a NaN value, and 0 otherwise.

The isinf(), isinff(), and isinfl() functions return 1 if x is positive infinity, -1 if x is negative infinity, and 0 otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

finite(), finitef(), finitel(), isinf(), isinff(), isinfl(), isnan(), isnanf(), isnanl()

Thread safetyMT-Safe

NOTES

Note that these functions are obsolete. C99 defines macros isfinite(), isinf(), and isnan() (for all types) replacing them. Further note that the C99 isinf() has weaker guarantees on the return value. See fpclassify(3).

SEE ALSO

fpclassify(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

202 - Linux cli command tcsetattr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tcsetattr and provides detailed information about the command tcsetattr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tcsetattr.

NAME 🖥️ tcsetattr 🖥️

get and set terminal attributes, line control, get and set baud rate

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <termios.h>
#include <unistd.h>
int tcgetattr(int fd, struct termios *termios_p);
int tcsetattr(int fd, int optional_actions,
 const struct termios *termios_p);
int tcsendbreak(int fd, int duration);
int tcdrain(int fd);
int tcflush(int fd, int queue_selector);
int tcflow(int fd, int action);
void cfmakeraw(struct termios *termios_p);
speed_t cfgetispeed(const struct termios *termios_p);
speed_t cfgetospeed(const struct termios *termios_p);
int cfsetispeed(struct termios *termios_p, speed_t speed);
int cfsetospeed(struct termios *termios_p, speed_t speed);
int cfsetspeed(struct termios *termios_p, speed_t speed);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

cfsetspeed(), cfmakeraw():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The termios functions describe a general terminal interface that is provided to control asynchronous communications ports.

The termios structure

Many of the functions described here have a termios_p argument that is a pointer to a termios structure. This structure contains at least the following members:

tcflag_t c_iflag;      /* input modes */
tcflag_t c_oflag;      /* output modes */
tcflag_t c_cflag;      /* control modes */
tcflag_t c_lflag;      /* local modes */
cc_t     c_cc[NCCS];   /* special characters */

The values that may be assigned to these fields are described below. In the case of the first four bit-mask fields, the definitions of some of the associated flags that may be set are exposed only if a specific feature test macro (see feature_test_macros(7)) is defined, as noted in brackets ("[]").

In the descriptions below, “not in POSIX” means that the value is not specified in POSIX.1-2001, and “XSI” means that the value is specified in POSIX.1-2001 as part of the XSI extension.

c_iflag flag constants:

IGNBRK
Ignore BREAK condition on input.

BRKINT
If IGNBRK is set, a BREAK is ignored. If it is not set but BRKINT is set, then a BREAK causes the input and output queues to be flushed, and if the terminal is the controlling terminal of a foreground process group, it will cause a SIGINT to be sent to this foreground process group. When neither IGNBRK nor BRKINT are set, a BREAK reads as a null byte (‘�’), except when PARMRK is set, in which case it reads as the sequence \377 � �.

IGNPAR
Ignore framing errors and parity errors.

PARMRK
If this bit is set, input bytes with parity or framing errors are marked when passed to the program. This bit is meaningful only when INPCK is set and IGNPAR is not set. The way erroneous bytes are marked is with two preceding bytes, \377 and �. Thus, the program actually reads three bytes for one erroneous byte received from the terminal. If a valid byte has the value \377, and ISTRIP (see below) is not set, the program might confuse it with the prefix that marks a parity error. Therefore, a valid byte \377 is passed to the program as two bytes, \377 \377, in this case.

If neither IGNPAR nor PARMRK is set, read a character with a parity error or framing error as �.

INPCK
Enable input parity checking.

ISTRIP
Strip off eighth bit.

INLCR
Translate NL to CR on input.

IGNCR
Ignore carriage return on input.

ICRNL
Translate carriage return to newline on input (unless IGNCR is set).

IUCLC
(not in POSIX) Map uppercase characters to lowercase on input.

IXON
Enable XON/XOFF flow control on output.

IXANY
(XSI) Typing any character will restart stopped output. (The default is to allow just the START character to restart output.)

IXOFF
Enable XON/XOFF flow control on input.

IMAXBEL
(not in POSIX) Ring bell when input queue is full. Linux does not implement this bit, and acts as if it is always set.

IUTF8 (since Linux 2.6.4)
(not in POSIX) Input is UTF8; this allows character-erase to be correctly performed in cooked mode.

c_oflag flag constants:

OPOST
Enable implementation-defined output processing.

OLCUC
(not in POSIX) Map lowercase characters to uppercase on output.

ONLCR
(XSI) Map NL to CR-NL on output.

OCRNL
Map CR to NL on output.

ONOCR
Don’t output CR at column 0.

ONLRET
The NL character is assumed to do the carriage-return function; the kernel’s idea of the current column is set to 0 after both NL and CR.

OFILL
Send fill characters for a delay, rather than using a timed delay.

OFDEL
Fill character is ASCII DEL (0177). If unset, fill character is ASCII NUL (‘�’). (Not implemented on Linux.)

NLDLY
Newline delay mask. Values are NL0 and NL1. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

CRDLY
Carriage return delay mask. Values are CR0, CR1, CR2, or CR3. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

TABDLY
Horizontal tab delay mask. Values are TAB0, TAB1, TAB2, TAB3 (or XTABS, but see the BUGS section). A value of TAB3, that is, XTABS, expands tabs to spaces (with tab stops every eight columns). [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

BSDLY
Backspace delay mask. Values are BS0 or BS1. (Has never been implemented.) [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

VTDLY
Vertical tab delay mask. Values are VT0 or VT1.

FFDLY
Form feed delay mask. Values are FF0 or FF1. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

c_cflag flag constants:

CBAUD
(not in POSIX) Baud speed mask (4+1 bits). [requires _BSD_SOURCE or _SVID_SOURCE]

CBAUDEX
(not in POSIX) Extra baud speed mask (1 bit), included in CBAUD. [requires _BSD_SOURCE or _SVID_SOURCE]

(POSIX says that the baud speed is stored in the termios structure without specifying where precisely, and provides cfgetispeed() and cfsetispeed() for getting at it. Some systems use bits selected by CBAUD in c_cflag, other systems use separate fields, for example, sg_ispeed and sg_ospeed.)

CSIZE
Character size mask. Values are CS5, CS6, CS7, or CS8.

CSTOPB
Set two stop bits, rather than one.

CREAD
Enable receiver.

PARENB
Enable parity generation on output and parity checking for input.

PARODD
If set, then parity for input and output is odd; otherwise even parity is used.

HUPCL
Lower modem control lines after last process closes the device (hang up).

CLOCAL
Ignore modem control lines.

LOBLK
(not in POSIX) Block output from a noncurrent shell layer. For use by shl (shell layers). (Not implemented on Linux.)

CIBAUD
(not in POSIX) Mask for input speeds. The values for the CIBAUD bits are the same as the values for the CBAUD bits, shifted left IBSHIFT bits. [requires _BSD_SOURCE or _SVID_SOURCE] (Not implemented in glibc, supported on Linux via TCGET* and TCSET* ioctls; see ioctl_tty(2))

CMSPAR
(not in POSIX) Use “stick” (mark/space) parity (supported on certain serial devices): if PARODD is set, the parity bit is always 1; if PARODD is not set, then the parity bit is always 0. [requires _BSD_SOURCE or _SVID_SOURCE]

CRTSCTS
(not in POSIX) Enable RTS/CTS (hardware) flow control. [requires _BSD_SOURCE or _SVID_SOURCE]

c_lflag flag constants:

ISIG
When any of the characters INTR, QUIT, SUSP, or DSUSP are received, generate the corresponding signal.

ICANON
Enable canonical mode (described below).

XCASE
(not in POSIX; not supported under Linux) If ICANON is also set, terminal is uppercase only. Input is converted to lowercase, except for characters preceded by \ On output, uppercase characters are preceded by \ and lowercase characters are converted to uppercase. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

ECHO
Echo input characters.

ECHOE
If ICANON is also set, the ERASE character erases the preceding input character, and WERASE erases the preceding word.

ECHOK
If ICANON is also set, the KILL character erases the current line.

ECHONL
If ICANON is also set, echo the NL character even if ECHO is not set.

ECHOCTL
(not in POSIX) If ECHO is also set, terminal special characters other than TAB, NL, START, and STOP are echoed as ^X, where X is the character with ASCII code 0x40 greater than the special character. For example, character 0x08 (BS) is echoed as ^H. [requires _BSD_SOURCE or _SVID_SOURCE]

ECHOPRT
(not in POSIX) If ICANON and ECHO are also set, characters are printed as they are being erased. [requires _BSD_SOURCE or _SVID_SOURCE]

ECHOKE
(not in POSIX) If ICANON is also set, KILL is echoed by erasing each character on the line, as specified by ECHOE and ECHOPRT. [requires _BSD_SOURCE or _SVID_SOURCE]

DEFECHO
(not in POSIX) Echo only when a process is reading. (Not implemented on Linux.)

FLUSHO
(not in POSIX; not supported under Linux) Output is being flushed. This flag is toggled by typing the DISCARD character. [requires _BSD_SOURCE or _SVID_SOURCE]

NOFLSH
Disable flushing the input and output queues when generating signals for the INT, QUIT, and SUSP characters.

TOSTOP
Send the SIGTTOU signal to the process group of a background process which tries to write to its controlling terminal.

PENDIN
(not in POSIX; not supported under Linux) All characters in the input queue are reprinted when the next character is read. (bash(1) handles typeahead this way.) [requires _BSD_SOURCE or _SVID_SOURCE]

IEXTEN
Enable implementation-defined input processing. This flag, as well as ICANON must be enabled for the special characters EOL2, LNEXT, REPRINT, WERASE to be interpreted, and for the IUCLC flag to be effective.

The c_cc array defines the terminal special characters. The symbolic indices (initial values) and meaning are:

VDISCARD
(not in POSIX; not supported under Linux; 017, SI, Ctrl-O) Toggle: start/stop discarding pending output. Recognized when IEXTEN is set, and then not passed as input.

VDSUSP
(not in POSIX; not supported under Linux; 031, EM, Ctrl-Y) Delayed suspend character (DSUSP): send SIGTSTP signal when the character is read by the user program. Recognized when IEXTEN and ISIG are set, and the system supports job control, and then not passed as input.

VEOF
(004, EOT, Ctrl-D) End-of-file character (EOF). More precisely: this character causes the pending tty buffer to be sent to the waiting user program without waiting for end-of-line. If it is the first character of the line, the read(2) in the user program returns 0, which signifies end-of-file. Recognized when ICANON is set, and then not passed as input.

VEOL
(0, NUL) Additional end-of-line character (EOL). Recognized when ICANON is set.

VEOL2
(not in POSIX; 0, NUL) Yet another end-of-line character (EOL2). Recognized when ICANON is set.

VERASE
(0177, DEL, rubout, or 010, BS, Ctrl-H, or also #) Erase character (ERASE). This erases the previous not-yet-erased character, but does not erase past EOF or beginning-of-line. Recognized when ICANON is set, and then not passed as input.

VINTR
(003, ETX, Ctrl-C, or also 0177, DEL, rubout) Interrupt character (INTR). Send a SIGINT signal. Recognized when ISIG is set, and then not passed as input.

VKILL
(025, NAK, Ctrl-U, or Ctrl-X, or also @) Kill character (KILL). This erases the input since the last EOF or beginning-of-line. Recognized when ICANON is set, and then not passed as input.

VLNEXT
(not in POSIX; 026, SYN, Ctrl-V) Literal next (LNEXT). Quotes the next input character, depriving it of a possible special meaning. Recognized when IEXTEN is set, and then not passed as input.

VMIN
Minimum number of characters for noncanonical read (MIN).

VQUIT
(034, FS, Ctrl-\ Quit character (QUIT). Send SIGQUIT signal. Recognized when ISIG is set, and then not passed as input.

VREPRINT
(not in POSIX; 022, DC2, Ctrl-R) Reprint unread characters (REPRINT). Recognized when ICANON and IEXTEN are set, and then not passed as input.

VSTART
(021, DC1, Ctrl-Q) Start character (START). Restarts output stopped by the Stop character. Recognized when IXON is set, and then not passed as input.

VSTATUS
(not in POSIX; not supported under Linux; status request: 024, DC4, Ctrl-T). Status character (STATUS). Display status information at terminal, including state of foreground process and amount of CPU time it has consumed. Also sends a SIGINFO signal (not supported on Linux) to the foreground process group.

VSTOP
(023, DC3, Ctrl-S) Stop character (STOP). Stop output until Start character typed. Recognized when IXON is set, and then not passed as input.

VSUSP
(032, SUB, Ctrl-Z) Suspend character (SUSP). Send SIGTSTP signal. Recognized when ISIG is set, and then not passed as input.

VSWTCH
(not in POSIX; not supported under Linux; 0, NUL) Switch character (SWTCH). Used in System V to switch shells in shell layers, a predecessor to shell job control.

VTIME
Timeout in deciseconds for noncanonical read (TIME).

VWERASE
(not in POSIX; 027, ETB, Ctrl-W) Word erase (WERASE). Recognized when ICANON and IEXTEN are set, and then not passed as input.

An individual terminal special character can be disabled by setting the value of the corresponding c_cc element to _POSIX_VDISABLE.

The above symbolic subscript values are all different, except that VTIME, VMIN may have the same value as VEOL, VEOF, respectively. In noncanonical mode the special character meaning is replaced by the timeout meaning. For an explanation of VMIN and VTIME, see the description of noncanonical mode below.

Retrieving and changing terminal settings

tcgetattr() gets the parameters associated with the object referred by fd and stores them in the termios structure referenced by termios_p. This function may be invoked from a background process; however, the terminal attributes may be subsequently changed by a foreground process.

tcsetattr() sets the parameters associated with the terminal (unless support is required from the underlying hardware that is not available) from the termios structure referred to by termios_p. optional_actions specifies when the changes take effect:

TCSANOW
the change occurs immediately.

TCSADRAIN
the change occurs after all output written to fd has been transmitted. This option should be used when changing parameters that affect output.

TCSAFLUSH
the change occurs after all output written to the object referred by fd has been transmitted, and all input that has been received but not read will be discarded before the change is made.

Canonical and noncanonical mode

The setting of the ICANON canon flag in c_lflag determines whether the terminal is operating in canonical mode (ICANON set) or noncanonical mode (ICANON unset). By default, ICANON is set.

In canonical mode:

  • Input is made available line by line. An input line is available when one of the line delimiters is typed (NL, EOL, EOL2; or EOF at the start of line). Except in the case of EOF, the line delimiter is included in the buffer returned by read(2).

  • Line editing is enabled (ERASE, KILL; and if the IEXTEN flag is set: WERASE, REPRINT, LNEXT). A read(2) returns at most one line of input; if the read(2) requested fewer bytes than are available in the current line of input, then only as many bytes as requested are read, and the remaining characters will be available for a future read(2).

  • The maximum line length is 4096 chars (including the terminating newline character); lines longer than 4096 chars are truncated. After 4095 characters, input processing (e.g., ISIG and ECHO* processing) continues, but any input data after 4095 characters up to (but not including) any terminating newline is discarded. This ensures that the terminal can always receive more input until at least one line can be read.

In noncanonical mode input is available immediately (without the user having to type a line-delimiter character), no input processing is performed, and line editing is disabled. The read buffer will only accept 4095 chars; this provides the necessary space for a newline char if the input mode is switched to canonical. The settings of MIN (c_cc[VMIN]) and TIME (c_cc[VTIME]) determine the circumstances in which a read(2) completes; there are four distinct cases:

MIN == 0, TIME == 0 (polling read)
If data is available, read(2) returns immediately, with the lesser of the number of bytes available, or the number of bytes requested. If no data is available, read(2) returns 0.

MIN > 0, TIME == 0 (blocking read)
read(2) blocks until MIN bytes are available, and returns up to the number of bytes requested.

MIN == 0, TIME > 0 (read with timeout)
TIME specifies the limit for a timer in tenths of a second. The timer is started when read(2) is called. read(2) returns either when at least one byte of data is available, or when the timer expires. If the timer expires without any input becoming available, read(2) returns 0. If data is already available at the time of the call to read(2), the call behaves as though the data was received immediately after the call.

MIN > 0, TIME > 0 (read with interbyte timeout)
TIME specifies the limit for a timer in tenths of a second. Once an initial byte of input becomes available, the timer is restarted after each further byte is received. read(2) returns when any of the following conditions is met:

  • MIN bytes have been received.

  • The interbyte timer expires.

  • The number of bytes requested by read(2) has been received. (POSIX does not specify this termination condition, and on some other implementations read(2) does not return in this case.)

Because the timer is started only after the initial byte becomes available, at least one byte will be read. If data is already available at the time of the call to read(2), the call behaves as though the data was received immediately after the call.

POSIX does not specify whether the setting of the O_NONBLOCK file status flag takes precedence over the MIN and TIME settings. If O_NONBLOCK is set, a read(2) in noncanonical mode may return immediately, regardless of the setting of MIN or TIME. Furthermore, if no data is available, POSIX permits a read(2) in noncanonical mode to return either 0, or -1 with errno set to EAGAIN.

Raw mode

cfmakeraw() sets the terminal to something like the “raw” mode of the old Version 7 terminal driver: input is available character by character, echoing is disabled, and all special processing of terminal input and output characters is disabled. The terminal attributes are set as follows:

termios_p->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
                | INLCR | IGNCR | ICRNL | IXON);
termios_p->c_oflag &= ~OPOST;
termios_p->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
termios_p->c_cflag &= ~(CSIZE | PARENB);
termios_p->c_cflag |= CS8;

Line control

tcsendbreak() transmits a continuous stream of zero-valued bits for a specific duration, if the terminal is using asynchronous serial data transmission. If duration is zero, it transmits zero-valued bits for at least 0.25 seconds, and not more than 0.5 seconds. If duration is not zero, it sends zero-valued bits for some implementation-defined length of time.

If the terminal is not using asynchronous serial data transmission, tcsendbreak() returns without taking any action.

tcdrain() waits until all output written to the object referred to by fd has been transmitted.

tcflush() discards data written to the object referred to by fd but not transmitted, or data received but not read, depending on the value of queue_selector:

TCIFLUSH
flushes data received but not read.

TCOFLUSH
flushes data written but not transmitted.

TCIOFLUSH
flushes both data received but not read, and data written but not transmitted.

tcflow() suspends transmission or reception of data on the object referred to by fd, depending on the value of action:

TCOOFF
suspends output.

TCOON
restarts suspended output.

TCIOFF
transmits a STOP character, which stops the terminal device from transmitting data to the system.

TCION
transmits a START character, which starts the terminal device transmitting data to the system.

The default on open of a terminal file is that neither its input nor its output is suspended.

Line speed

The baud rate functions are provided for getting and setting the values of the input and output baud rates in the termios structure. The new values do not take effect until tcsetattr() is successfully called.

Setting the speed to B0 instructs the modem to “hang up”. The actual bit rate corresponding to B38400 may be altered with setserial(8).

The input and output baud rates are stored in the termios structure.

cfgetospeed() returns the output baud rate stored in the termios structure pointed to by termios_p.

cfsetospeed() sets the output baud rate stored in the termios structure pointed to by termios_p to speed, which must be one of these constants:

B0
B50
B75
B110
B134
B150
B200
B300
B600
B1200
B1800
B2400
B4800
B9600
B19200
B38400
B57600
B115200
B230400
B460800
B500000
B576000
B921600
B1000000
B1152000
B1500000
B2000000

These constants are additionally supported on the SPARC architecture:

B76800
B153600
B307200
B614400

These constants are additionally supported on non-SPARC architectures:

B2500000
B3000000
B3500000
B4000000

Due to differences between architectures, portable applications should check if a particular Bnnn constant is defined prior to using it.

The zero baud rate, B0, is used to terminate the connection. If B0 is specified, the modem control lines shall no longer be asserted. Normally, this will disconnect the line. CBAUDEX is a mask for the speeds beyond those defined in POSIX.1 (57600 and above). Thus, B57600 & CBAUDEX is nonzero.

Setting the baud rate to a value other than those defined by Bnnn constants is possible via the TCSETS2 ioctl; see ioctl_tty(2).

cfgetispeed() returns the input baud rate stored in the termios structure.

cfsetispeed() sets the input baud rate stored in the termios structure to speed, which must be specified as one of the Bnnn constants listed above for cfsetospeed(). If the input baud rate is set to the literal constant 0 (not the symbolic constant B0), the input baud rate will be equal to the output baud rate.

cfsetspeed() is a 4.4BSD extension. It takes the same arguments as cfsetispeed(), and sets both input and output speed.

RETURN VALUE

cfgetispeed() returns the input baud rate stored in the termios structure.

cfgetospeed() returns the output baud rate stored in the termios structure.

All other functions return:

0
on success.

-1
on failure and set errno to indicate the error.

Note that tcsetattr() returns success if any of the requested changes could be successfully carried out. Therefore, when making multiple changes it may be necessary to follow this call with a further call to tcgetattr() to check that all changes have been performed successfully.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tcgetattr(), tcsetattr(), tcdrain(), tcflush(), tcflow(), tcsendbreak(), cfmakeraw(), cfgetispeed(), cfgetospeed(), cfsetispeed(), cfsetospeed(), cfsetspeed()

Thread safetyMT-Safe

STANDARDS

tcgetattr()
tcsetattr()
tcsendbreak()
tcdrain()
tcflush()
tcflow()
cfgetispeed()
cfgetospeed()
cfsetispeed()
cfsetospeed()
POSIX.1-2008.

cfmakeraw()
cfsetspeed()
BSD.

HISTORY

tcgetattr()
tcsetattr()
tcsendbreak()
tcdrain()
tcflush()
tcflow()
cfgetispeed()
cfgetospeed()
cfsetispeed()
cfsetospeed()
POSIX.1-2001.

cfmakeraw()
cfsetspeed()
BSD.

NOTES

UNIX V7 and several later systems have a list of baud rates where after the values B0 through B9600 one finds the two constants EXTA, EXTB (“External A” and “External B”). Many systems extend the list with much higher baud rates.

The effect of a nonzero duration with tcsendbreak() varies. SunOS specifies a break of duration * N seconds, where N is at least 0.25, and not more than 0.5. Linux, AIX, DU, Tru64 send a break of duration milliseconds. FreeBSD and NetBSD and HP-UX and MacOS ignore the value of duration. Under Solaris and UnixWare, tcsendbreak() with nonzero duration behaves like tcdrain().

BUGS

On the Alpha architecture before Linux 4.16 (and glibc before glibc 2.28), the XTABS value was different from TAB3 and it was ignored by the N_TTY line discipline code of the terminal driver as a result (because as it wasn’t part of the TABDLY mask).

SEE ALSO

reset(1), setterm(1), stty(1), tput(1), tset(1), tty(1), ioctl_console(2), ioctl_tty(2), cc_t(3type), speed_t(3type), tcflag_t(3type), setserial(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

203 - Linux cli command Net_Server_Forkpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Server_Forkpm and provides detailed information about the command Net_Server_Forkpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Server_Forkpm.

NAME 🖥️ Net_Server_Forkpm 🖥️

Net::Server personality

SYNOPSIS

use base qw(Net::Server::Fork); sub process_request { #…code… } _ _PACKAGE_ _->run();

DESCRIPTION

Please read the pod on Net::Server first. This module is a personality, or extension, or sub class, of the Net::Server module.

This personality binds to one or more ports and then waits for a client connection. When a connection is received, the server forks a child. The child handles the request and then closes.

With the exception of parent/child signaling, this module will work (with basic functionality) on Win32 systems.

ARGUMENTS

check_for_dead
Number of seconds to wait before looking for dead children. This only takes place if the maximum number of child processes (max_servers) has been reached. Default is 60 seconds.

max_servers
The maximum number of children to fork. The server will not accept connections until there are free children. Default is 256 children.

max_dequeue
The maximum number of dequeue processes to start. If a value of zero or undef is given, no dequeue processes will be started. The number of running dequeue processes will be checked by the check_for_dead variable.

check_for_dequeue
Seconds to wait before forking off a dequeue process. It is intended to use the dequeue process to take care of items such as mail queues. If a value of undef is given, no dequeue processes will be started.

CONFIGURATION FILE

See Net::Server.

PROCESS FLOW

Process flow follows Net::Server until the post_accept phase. At this point a child is forked. The parent is immediately able to wait for another request. The child handles the request and then exits.

HOOKS

The Fork server has the following hooks in addition to the hooks provided by the Net::Server base class. See Net::Server

“$self->pre_accept_hook()”
This hook occurs just before the accept is called.

“$self->post_accept_hook()”
This hook occurs in the child after the accept and fork.

“$self->run_dequeue()”
This hook only gets called in conjunction with the check_for_dequeue setting.

HOT DEPLOY

Since version 2.000, the Fork server has accepted the TTIN and TTOU signals. When a TTIN is received, the max_servers is increased by 1. If a TTOU signal is received the max_servers is decreased by 1. This allows for adjusting the number of handling processes without having to restart the server.

AUTHOR

Paul Seamons <[email protected]>

Rob Brown <[email protected]>

SEE ALSO

Please see also Net::Server::INET, Net::Server::PreFork, Net::Server::MultiType, Net::Server::SIG Net::Server::Single

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

204 - Linux cli command XML_PatAct_PatternTemplpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_PatAct_PatternTemplpm and provides detailed information about the command XML_PatAct_PatternTemplpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_PatAct_PatternTemplpm.

NAME 🖥️ XML_PatAct_PatternTemplpm 🖥️

A pattern module for

SYNOPSIS

use XML::PatAct::PATTERN; my $patterns = [ PATTERN => ACTION, … ] my $matcher = XML::PatAct::PATTERN->new( Patterns => $patterns );

DESCRIPTION

XML::PatAct::PATTERN is a pattern module for use with PatAct action modules for applying pattern-action lists to XML parses or trees. XML::PatAct::PATTERN …

Parameters can be passed as a list of key, value pairs or a hash.

DESCRIBE THE FORMAT OR LANGUAGE OF YOUR PATTERNS HERE

AUTHOR

This template file was written by Ken MacLeod, [email protected]

SEE ALSO

perl (1)

``Using PatAct Modules’’ and ``Creating PatAct Modules’’ in libxml-perl.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

205 - Linux cli command HTML_FormatPSpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_FormatPSpm and provides detailed information about the command HTML_FormatPSpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_FormatPSpm.

NAME 🖥️ HTML_FormatPSpm 🖥️

Format HTML as PostScript

VERSION

version 2.16

SYNOPSIS

use HTML::TreeBuilder; $tree = HTML::TreeBuilder->new->parse_file(“test.html”); use HTML::FormatPS; $formatter = HTML::FormatPS->new( FontFamily => Helvetica, PaperSize => Letter, ); print $formatter->format($tree);

Or, for short:

use HTML::FormatPS; print HTML::FormatPS->format_file( “test.html”, FontFamily => Helvetica, PaperSize => Letter, );

DESCRIPTION

The HTML::FormatPS is a formatter that outputs PostScript code. Formatting of HTML tables and forms is not implemented.

HTML::FormatPS is built on top of HTML::Formatter and so further detail may be found in the documentation for HTML::Formatter.

You might specify the following parameters when constructing the formatter object (or when calling format_file or format_string):

PaperSize
What kind of paper should we format for. The value can be one of these: A3, A4, A5, B4, B5, Letter, Legal, Executive, Tabloid, Statement, Folio, 10x14, Quarto. The default is A4.

PaperWidth
The width of the paper, in points. Setting PaperSize also defines this value.

PaperHeight
The height of the paper, in points. Setting PaperSize also defines this value.

LeftMargin
The left margin, in points.

RightMargin
The right margin, in points.

HorizontalMargin
Both left and right margin at the same time. The default value is 4 cm.

TopMargin
The top margin, in points.

BottomMargin
The bottom margin, in points.

VerticalMargin
Both top and bottom margin at the same time. The default value is 2 cm,

PageNo
This parameter determines if we should put page numbers on the pages. The default value is true; so you have to set this value to 0 in order to suppress page numbers. (The No in PageNo means number/numero!)

FontFamily
This parameter specifies which family of fonts to use for the formatting. Legal values are Courier, Helvetica and Times. The default is Times.

FontScale
This is a scaling factor for all the font sizes. The default value is 1. For example, if you want everything to be almost three times as large, you could set this to 2.7. If you wanted things just a bit smaller than normal, you could set it to .92.

Leading
This option (pronounced ledding, not leeding) controls how much is space between lines. This is a factor of the font size used for that line. Default is 0.1 Ω- so between two 12-point lines, there will be 1.2 points of space.

StartPage
Assuming you have PageNo on, StartPage controls what the page number of the first page will be. By default, it is 1. So if you set this to 87, the first page would say 87 on it, the next 88, and so on.

NoProlog
If this option is set to a true value, HTML::FormatPS will make a point of not emitting the PostScript prolog before the document. By default, this is off, meaning that HTML::FormatPS will emit the prolog. This option is of interest only to advanced users.

NoTrailer
If this option is set to a true value, HTML::FormatPS will make a point of not emitting the PostScript trailer at the end of the document. By default, this is off, meaning that HTML::FormatPS will emit the bit of PostScript that ends the document. This option is of interest only to advanced users.

METHODS

new

my $formatter = FormatterClass->new( option1 => value1, option2 => value2, … );

This creates a new formatter object with the given options.

SEE ALSO

HTML::Formatter

ISSUES

  • Output is in ISO Latin1 format. The underlying HTML parsers tend to now work in Unicode (perl native) code points. There is an impedance mismatch between these, which may give issues with complex characters within HTML.

TO DO

  • Support for some more character styles, notably including: strike-through, underlining, superscript, and subscript.

  • Support for Unicode.

  • Support for Win-1252 encoding, since that’s what most people mean when they use characters in the range 0x80-0x9F in HTML.

  • And, if it’s ever even reasonably possible, support for tables.

I would welcome email from people who can help me out or advise me on the above.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Nigel Metheringham, 2002-2005 Sean M Burke, 1999-2002 Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

206 - Linux cli command Image_ExifTool_GeoTiffpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_GeoTiffpm and provides detailed information about the command Image_ExifTool_GeoTiffpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_GeoTiffpm.

NAME 🖥️ Image_ExifTool_GeoTiffpm 🖥️

Read GeoTiff meta information

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret GeoTiff meta information. GeoTiff information is used in images to specify exact geometric mappings used to transform the image to real world coordinates.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

ftp://ftp.remotesensing.org/geotiff/libgeotiff/libgeotiff-1.1.4.tar.gz

http://www.charttiff.com/whitepapers.shtml

SEE ALSO

“GeoTiff Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

207 - Linux cli command Tk_Buttonpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Buttonpm and provides detailed information about the command Tk_Buttonpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Buttonpm.

NAME 🖥️ Tk_Buttonpm 🖥️

Create and manipulate Button widgets

SYNOPSIS

$button = $parent->Button(?options?);

STANDARD OPTIONS

-activebackground -activeforeground -anchor -background -bitmap -borderwidth -compound -cursor -disabledforeground -font -foreground -highlightbackground -highlightcolor -highlightthickness -image -justify -padx -pady -relief -repeatdelay -repeatinterval -takefocus -text -textvariable -underline -wraplength

See Tk::options for details of the standard options.

WIDGET-SPECIFIC OPTIONS

Name: command

Class: Command

Switch: -command

Specifies a Perl/Tk callback to associate with the button. This command is typically invoked when mouse button 1 is released over the button window.

Command-Line Name: -compound

Database Name: compound

Database Class: Compound

Specifies whether the button should display both an image and text, and if so, where the image should be placed relative to the text. Valid values for this option are bottom, center, left, none, right and top. The default value is none, meaning that the button will display either an image or text, depending on the values of the -image and -bitmap options.

Name: default

Class: Default

Switch: -default

Specifies one of three states for the default ring: normal, active, or disabled. In active state, the button is drawn with the platform specific appearance for a default button. In normal state, the button is drawn with the platform specific appearance for a non-default button, leaving enough space to draw the default button appearance. The normal and active states will result in buttons of the same size. In disabled state, the button is drawn with the non-default button appearance without leaving space for the default appearance. The disabled state may result in a smaller button than the active state. ring.

Name: height

Class: Height

Switch: -height

Specifies a desired height for the button. If an image or bitmap is being displayed in the button then the value is in screen units (i.e. any of the forms acceptable to Tk_GetPixels); for text it is in lines of text. If this option isn’t specified, the button’s desired height is computed from the size of the image or bitmap or text being displayed in it.

Command-Line Name: -overrelief

Database Name: overRelief

Database Class: OverRelief

Specifies an alternative relief for the button, to be used when the mouse cursor is over the widget. This option can be used to make toolbar buttons, by configuring -relief flat -overrelief raised. If the value of this option is the empty string, then no alternative relief is used when the mouse cursor is over the button. The empty string is the default value.

Name: state

Class: State

Switch: -state

Specifies one of three states for the button: normal, active, or disabled. In normal state the button is displayed using the foreground and background options. The active state is typically used when the pointer is over the button. In active state the button is displayed using the activeForeground and activeBackground options. Disabled state means that the button should be insensitive: the default bindings will refuse to activate the widget and will ignore mouse button presses. In this state the disabledForeground and background options determine how the button is displayed.

Name: width

Class: Width

Switch: -width

Specifies a desired width for the button. If an image or bitmap is being displayed in the button then the value is in screen units (i.e. any of the forms acceptable to Tk_GetPixels); for text it is in characters. If this option isn’t specified, the button’s desired width is computed from the size of the image or bitmap or text being displayed in it.

DESCRIPTION

The Button method creates a new window (given by the $widget argument) and makes it into a button widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the button such as its colors, font, text, and initial relief. The button command returns its $widget argument. At the time this command is invoked, there must not exist a window named $widget, but $widget’s parent must exist.

A button is a widget that displays a textual string, bitmap or image. If text is displayed, it must all be in a single font, but it can occupy multiple lines on the screen (if it contains newlines or if wrapping occurs because of the -wraplength option) and one of the characters may optionally be underlined using the -underline option. It can display itself in either of three different ways, according to the -state option; it can be made to appear raised, sunken, or flat; and it can be made to flash. When a user invokes the button (by pressing mouse button 1 with the cursor over the button), then the perl/Tk callback specified in the -command option is invoked.

WIDGET METHODS

The Button method creates a widget object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class.

The following additional methods are available for button widgets:

$button->flash
Flash the button. This is accomplished by redisplaying the button several times, alternating between active and normal colors. At the end of the flash the button is left in the same normal/active state as when the command was invoked. This command is ignored if the button’s state is disabled.

$button->invoke
Invoke the callback associated with the buttons -command option, if there is one. The return value is the return value from the callback, or the undefined value if there is no callback associated with the button. This command is ignored if the button’s state is disabled.

DEFAULT BINDINGS

Tk automatically creates class bindings for buttons that give them default behavior:

[1]
A button activates whenever the mouse passes over it and deactivates whenever the mouse leaves the button. Under Windows, this binding is only active when mouse button 1 has been pressed over the button.

[2]
A button’s relief is changed to sunken whenever mouse button 1 is pressed over the button, and the relief is restored to its original value when button 1 is later released.

[3]
If mouse button 1 is pressed over a button and later released over the button, the button is invoked. However, if the mouse is not over the button when button 1 is released, then no invocation occurs.

[4]
When a button has the input focus, the space key causes the button to be invoked. If the button’s state is disabled then none of the above actions occur: the button is completely non-responsive. The behavior of buttons can be changed by defining new bindings for individual widgets or by redefining the class bindings.

KEYWORDS

button, widget

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

208 - Linux cli command Tk_Optionmenupm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Optionmenupm and provides detailed information about the command Tk_Optionmenupm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Optionmenupm.

NAME 🖥️ Tk_Optionmenupm 🖥️

Let the user select one of some predefined options values

SYNOPSIS

use Tk::Optionmenu; $opt = $w->Optionmenu( -options => REFERENCE_to_OPTIONLIST, -command => CALLBACK, -variable => SCALAR_REF, ); $opt->addOptions( OPTIONLIST ); # OPTION LIST is # a) $val1, $val2, $val3,… # b) [ $lab1=>$val1], [$lab2=>val2], … ] # c) combination of a) and b), e.g., # val1, [$lab2=>val2], val3, val4, […], …

DESCRIPTION

The Optionmenu widget allows the user chose between a given set of options.

If the user should be able to change the available option have a look at Tk::BrowseEntry.

OPTIONS

-options
(Re)sets the list of options presented.

-command
Defines the callback that is invokes when a new option is selected.

-variable
Reference to a scalar that contains the current value of the selected option.

-textvariable
Reference to a scalar that contains the text label of the current value of the selected option.

METHODS

addOptions
Adds OPTION_LIST to the already available options.

EXAMPLE

use Tk; my $mw = MainWindow->new(); my ($var, $tvar); my $opt = $mw->Optionmenu( -options => [[jan=>1], [feb=>2], [mar=>3], [apr=>4]], -command => sub { print “got: “, shift, " " }, -variable => \var, -textvariable => \tvar )->pack; $opt->addOptions([may=>5],[jun=>6],[jul=>7],[aug=>8]); my $f = $mw->Frame(-relief=>groove, -borderwidth => 2)->pack; $f->Label(-textvariable=>\tvar)->pack(-side => left); $f->Label(-text => " -> “)->pack(-side => left); $f->Label(-textvariable=>\var)->pack(-side => left); $mw->Button(-text=>Exit, -command=>sub{$mw->destroy})->pack; MainLoop;

SEE ALSO

Tk::Menubutton, Tk::BrowseEntry

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

209 - Linux cli command yn

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command yn and provides detailed information about the command yn, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the yn.

NAME 🖥️ yn 🖥️

Bessel functions of the second kind

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double y0(double x);
double y1(double x);
double yn(int n, double x);
float y0f(float x);
float y1f(float x);
float ynf(int n, float x);
long double y0l(long double x);
long double y1l(long double x);
long double ynl(int n, long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

y0(), y1(), yn():

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

y0f(), y0l(), y1f(), y1l(), ynf(), ynl():

    _XOPEN_SOURCE >= 600
        || (_ISOC99_SOURCE && _XOPEN_SOURCE)
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The y0() and y1() functions return Bessel functions of x of the second kind of orders 0 and 1, respectively. The yn() function returns the Bessel function of x of the second kind of order n.

The value of x must be positive.

The y0f(), y1f(), and ynf() functions are versions that take and return float values. The y0l(), y1l(), and ynl() functions are versions that take and return long double values.

RETURN VALUE

On success, these functions return the appropriate Bessel value of the second kind for x.

If x is a NaN, a NaN is returned.

If x is negative, a domain error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively. (POSIX.1-2001 also allows a NaN return for this case.)

If x is 0.0, a pole error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.

If the result underflows, a range error occurs, and the functions return 0.0

If the result overflows, a range error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively. (POSIX.1-2001 also allows a 0.0 return for this case.)

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is negative
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

Pole error: x is 0.0
errno is set to ERANGE and an FE_DIVBYZERO exception is raised (but see BUGS).

Range error: result underflow
errno is set to ERANGE. No FE_UNDERFLOW exception is returned by fetestexcept(3) for this case.

Range error: result overflow
errno is set to ERANGE (but see BUGS). An overflow floating-point exception (FE_OVERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

y0(), y0f(), y0l()

Thread safetyMT-Safe

y1(), y1f(), y1l()

Thread safetyMT-Safe

yn(), ynf(), ynl()

Thread safetyMT-Safe

STANDARDS

y0()
y1()
yn()
POSIX.1-2008.

Others:
BSD.

HISTORY

y0()
y1()
yn()
SVr4, 4.3BSD, POSIX.1-2001.

Others:
BSD.

BUGS

Before glibc 2.19, these functions misdiagnosed pole errors: errno was set to EDOM, instead of ERANGE and no FE_DIVBYZERO exception was raised.

Before glibc 2.17, did not set errno for “range error: result underflow”.

In glibc 2.3.2 and earlier, these functions do not raise an invalid floating-point exception (FE_INVALID) when a domain error occurs.

SEE ALSO

j0(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

210 - Linux cli command htons

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command htons and provides detailed information about the command htons, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the htons.

NAME 🖥️ htons 🖥️

convert values between host and network byte order

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <arpa/inet.h>
uint32_t htonl(uint32_t hostlong);
uint16_t htons(uint16_t hostshort);
uint32_t ntohl(uint32_t netlong);
uint16_t ntohs(uint16_t netshort);

DESCRIPTION

The htonl() function converts the unsigned integer hostlong from host byte order to network byte order.

The htons() function converts the unsigned short integer hostshort from host byte order to network byte order.

The ntohl() function converts the unsigned integer netlong from network byte order to host byte order.

The ntohs() function converts the unsigned short integer netshort from network byte order to host byte order.

On the i386 the host byte order is Least Significant Byte first, whereas the network byte order, as used on the Internet, is Most Significant Byte first.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

htonl(), htons(), ntohl(), ntohs()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

SEE ALSO

bswap(3), endian(3), gethostbyname(3), getservent(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

211 - Linux cli command Net_HTTPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_HTTPpm and provides detailed information about the command Net_HTTPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_HTTPpm.

NAME 🖥️ Net_HTTPpm 🖥️

Low-level HTTP connection (client)

VERSION

version 6.23

SYNOPSIS

use Net::HTTP; my $s = Net::HTTP->new(Host => “www.perl.com”) || die $@; $s->write_request(GET => “/”, User-Agent => “Mozilla/5.0”); my($code, $mess, %h) = $s->read_response_headers; while (1) { my $buf; my $n = $s->read_entity_body($buf, 1024); die “read failed: $!” unless defined $n; last unless $n; print $buf; }

DESCRIPTION

The Net::HTTP class is a low-level HTTP client. An instance of the Net::HTTP class represents a connection to an HTTP server. The HTTP protocol is described in RFC 2616. The Net::HTTP class supports HTTP/1.0 and HTTP/1.1.

Net::HTTP is a sub-class of one of IO::Socket::IP (IPv6+IPv4), IO::Socket::INET6 (IPv6+IPv4), or IO::Socket::INET (IPv4 only). You can mix the methods described below with reading and writing from the socket directly. This is not necessary a good idea, unless you know what you are doing.

The following methods are provided (in addition to those of IO::Socket::INET):

“$s = Net::HTTP->new( %options )”
The Net::HTTP constructor method takes the same options as IO::Socket::INET’s as well as these: Host: Initial host attribute value KeepAlive: Initial keep_alive attribute value SendTE: Initial send_te attribute_value HTTPVersion: Initial http_version attribute value PeerHTTPVersion: Initial peer_http_version attribute value MaxLineLength: Initial max_line_length attribute value MaxHeaderLines: Initial max_header_lines attribute value The Host option is also the default for IO::Socket::INET’s PeerAddr. The PeerPort defaults to 80 if not provided. The PeerPort specification can also be embedded in the PeerAddr by preceding it with a :, and closing the IPv6 address on brackets [] if necessary: 192.0.2.1:80,[2001:db8::1]:80,any.example.com:80. The Listen option provided by IO::Socket::INET’s constructor method is not allowed. If unable to connect to the given HTTP server then the constructor returns undef and $@ contains the reason. After a successful connect, a Net:HTTP object is returned.

“$s->host”
Get/set the default value of the Host header to send. The $host must not be set to an empty string (or undef) for HTTP/1.1.

“$s->keep_alive”
Get/set the keep-alive value. If this value is TRUE then the request will be sent with headers indicating that the server should try to keep the connection open so that multiple requests can be sent. The actual headers set will depend on the value of the http_version and peer_http_version attributes.

“$s->send_te”
Get/set the a value indicating if the request will be sent with a TE header to indicate the transfer encodings that the server can choose to use. The list of encodings announced as accepted by this client depends on availability of the following modules: Compress::Raw::Zlib for deflate, and IO::Compress::Gunzip for gzip.

“$s->http_version”
Get/set the HTTP version number that this client should announce. This value can only be set to 1.0 or 1.1. The default is 1.1.

“$s->peer_http_version”
Get/set the protocol version number of our peer. This value will initially be 1.0, but will be updated by a successful read_response_headers() method call.

“$s->max_line_length”
Get/set a limit on the length of response line and response header lines. The default is 8192. A value of 0 means no limit.

“$s->max_header_length”
Get/set a limit on the number of header lines that a response can have. The default is 128. A value of 0 means no limit.

“$s->format_request($method, $uri, %headers, [$content])”
Format a request message and return it as a string. If the headers do not include a Host header, then a header is inserted with the value of the host attribute. Headers like Connection and Keep-Alive might also be added depending on the status of the keep_alive attribute. If $content is given (and it is non-empty), then a Content-Length header is automatically added unless it was already present.

“$s->write_request($method, $uri, %headers, [$content])”
Format and send a request message. Arguments are the same as for format_request(). Returns true if successful.

“$s->format_chunk( $data )”
Returns the string to be written for the given chunk of data.

“$s->write_chunk($data)”
Will write a new chunk of request entity body data. This method should only be used if the Transfer-Encoding header with a value of chunked was sent in the request. Note, writing zero-length data is a no-op. Use the write_chunk_eof() method to signal end of entity body data. Returns true if successful.

“$s->format_chunk_eof( %trailers )”
Returns the string to be written for signaling EOF when a Transfer-Encoding of chunked is used.

“$s->write_chunk_eof( %trailers )”
Will write eof marker for chunked data and optional trailers. Note that trailers should not really be used unless is was signaled with a Trailer header. Returns true if successful.

“($code, $mess, %headers) = $s->read_response_headers( %opts )”
Read response headers from server and return it. The $code is the 3 digit HTTP status code (see HTTP::Status) and $mess is the textual message that came with it. Headers are then returned as key/value pairs. Since key letter casing is not normalized and the same key can even occur multiple times, assigning these values directly to a hash is not wise. Only the $code is returned if this method is called in scalar context. As a side effect this method updates the ‘peer_http_version’ attribute. Options might be passed in as key/value pairs. There are currently only two options supported; laxed and junk_out. The laxed option will make read_response_headers() more forgiving towards servers that have not learned how to speak HTTP properly. The laxed option is a boolean flag, and is enabled by passing in a TRUE value. The junk_out option can be used to capture bad header lines when laxed is enabled. The value should be an array reference. Bad header lines will be pushed onto the array. The laxed option must be specified in order to communicate with pre-HTTP/1.0 servers that don’t describe the response outcome or the data they send back with a header block. For these servers peer_http_version is set to 0.9 and this method returns (200, Assumed OK). The method will raise an exception (die) if the server does not speak proper HTTP or if the max_line_length or max_header_length limits are reached. If the laxed option is turned on and max_line_length and max_header_length checks are turned off, then no exception will be raised and this method will always return a response code.

“$n = $s->read_entity_body($buf, $size);”
Reads chunks of the entity body content. Basically the same interface as for read() and sysread(), but the buffer offset argument is not supported yet. This method should only be called after a successful read_response_headers() call. The return value will be undef on read errors, 0 on EOF, -1 if no data could be returned this time, otherwise the number of bytes assigned to $buf. The $buf is set to "" when the return value is -1. You normally want to retry this call if this function returns either -1 or undef with $! as EINTR or EAGAIN (see Errno). EINTR can happen if the application catches signals and EAGAIN can happen if you made the socket non-blocking. This method will raise exceptions (die) if the server does not speak proper HTTP. This can only happen when reading chunked data.

“%headers = $s->get_trailers”
After read_entity_body() has returned 0 to indicate end of the entity body, you might call this method to pick up any trailers.

“$s->_rbuf”
Get/set the read buffer content. The read_response_headers() and read_entity_body() methods use an internal buffer which they will look for data before they actually sysread more from the socket itself. If they read too much, the remaining data will be left in this buffer.

“$s->_rbuf_length”
Returns the number of bytes in the read buffer. This should always be the same as: length($s->_rbuf) but might be more efficient.

SUBCLASSING

The read_response_headers() and read_entity_body() will invoke the sysread() method when they need more data. Subclasses might want to override this method to control how reading takes place.

The object itself is a glob. Subclasses should avoid using hash key names prefixed with http_ and io_.

SEE ALSO

LWP, IO::Socket::INET, Net::HTTP::NB

AUTHOR

Gisle Aas <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 2001 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

212 - Linux cli command setgrent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setgrent and provides detailed information about the command setgrent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setgrent.

NAME 🖥️ setgrent 🖥️

get group file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <grp.h>
struct group *getgrent(void);
void setgrent(void);
void endgrent(void);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

setgrent():

    _XOPEN_SOURCE >= 500
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

getgrent(), endgrent():

    Since glibc 2.22:
        _XOPEN_SOURCE >= 500 || _DEFAULT_SOURCE
    glibc 2.21 and earlier
        _XOPEN_SOURCE >= 500
            || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L
            || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The getgrent() function returns a pointer to a structure containing the broken-out fields of a record in the group database (e.g., the local group file /etc/group, NIS, and LDAP). The first time getgrent() is called, it returns the first entry; thereafter, it returns successive entries.

The setgrent() function rewinds to the beginning of the group database, to allow repeated scans.

The endgrent() function is used to close the group database after all processing has been performed.

The group structure is defined in <grp.h> as follows:

struct group {
    char   *gr_name;        /* group name */
    char   *gr_passwd;      /* group password */
    gid_t   gr_gid;         /* group ID */
    char  **gr_mem;         /* NULL-terminated array of pointers
                               to names of group members */
};

For more information about the fields of this structure, see group(5).

RETURN VALUE

The getgrent() function returns a pointer to a group structure, or NULL if there are no more entries or an error occurs.

Upon error, errno may be set. If one wants to check errno after the call, it should be set to zero before the call.

The return value may point to a static area, and may be overwritten by subsequent calls to getgrent(), getgrgid(3), or getgrnam(3). (Do not pass the returned pointer to free(3).)

ERRORS

EAGAIN
The service was temporarily unavailable; try again later. For NSS backends in glibc this indicates a temporary error talking to the backend. The error may correct itself, retrying later is suggested.

EINTR
A signal was caught; see signal(7).

EIO
I/O error.

EMFILE
The per-process limit on the number of open file descriptors has been reached.

ENFILE
The system-wide limit on the total number of open files has been reached.

ENOENT
A necessary input file cannot be found. For NSS backends in glibc this indicates the backend is not correctly configured.

ENOMEM
Insufficient memory to allocate group structure.

ERANGE
Insufficient buffer space supplied.

FILES

/etc/group
local group database file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getgrent()

Thread safety

MT-Unsafe race:grent race:grentbuf locale

setgrent(), endgrent()

Thread safety

MT-Unsafe race:grent locale

In the above table, grent in race:grent signifies that if any of the functions setgrent(), getgrent(), or endgrent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4, 4.3BSD.

SEE ALSO

fgetgrent(3), getgrent_r(3), getgrgid(3), getgrnam(3), getgrouplist(3), putgrent(3), group(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

213 - Linux cli command vasprintf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command vasprintf and provides detailed information about the command vasprintf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the vasprintf.

NAME 🖥️ vasprintf 🖥️

print to allocated string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <stdio.h>
int asprintf(char **restrict strp, const char *restrict fmt, ...);
int vasprintf(char **restrict strp, const char *restrict fmt,
 va_list ap);

DESCRIPTION

The functions asprintf() and vasprintf() are analogs of sprintf(3) and vsprintf(3), except that they allocate a string large enough to hold the output including the terminating null byte (‘�’), and return a pointer to it via the first argument. This pointer should be passed to free(3) to release the allocated storage when it is no longer needed.

RETURN VALUE

When successful, these functions return the number of bytes printed, just like sprintf(3). If memory allocation wasn’t possible, or some other error occurs, these functions will return -1, and the contents of strp are undefined.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

asprintf(), vasprintf()

Thread safetyMT-Safe locale

VERSIONS

The FreeBSD implementation sets strp to NULL on error.

STANDARDS

GNU, BSD.

SEE ALSO

free(3), malloc(3), printf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

214 - Linux cli command pcap_strerrorpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_strerrorpcap and provides detailed information about the command pcap_strerrorpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_strerrorpcap.

NAME 🖥️ pcap_strerrorpcap 🖥️

convert an errno value to a string

SYNOPSIS

#include <pcap/pcap.h>
const char *pcap_strerror(int error);

DESCRIPTION

pcap_strerror() is provided in case strerror(3) isn’t available. It returns an error message string corresponding to error.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

215 - Linux cli command tgammal

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tgammal and provides detailed information about the command tgammal, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tgammal.

NAME 🖥️ tgammal 🖥️

true gamma function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double tgamma(double x);
float tgammaf(float x);
long double tgammal(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

tgamma(), tgammaf(), tgammal():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions calculate the Gamma function of x.

The Gamma function is defined by

Gamma(x) = integral from 0 to infinity of t^(x-1) e^-t dt

It is defined for every real number except for nonpositive integers. For nonnegative integral m one has

Gamma(m+1) = m!

and, more generally, for all x:

Gamma(x+1) = x * Gamma(x)

Furthermore, the following is valid for all values of x outside the poles:

Gamma(x) * Gamma(1 - x) = PI / sin(PI * x)

RETURN VALUE

On success, these functions return Gamma(x).

If x is a NaN, a NaN is returned.

If x is positive infinity, positive infinity is returned.

If x is a negative integer, or is negative infinity, a domain error occurs, and a NaN is returned.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the correct mathematical sign.

If the result underflows, a range error occurs, and the functions return 0, with the correct mathematical sign.

If x is -0 or +0, a pole error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the same sign as the 0.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is a negative integer, or negative infinity
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised (but see BUGS).

Pole error: x is +0 or -0
errno is set to ERANGE. A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised.

Range error: result overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

glibc also gives the following error which is not specified in C99 or POSIX.1-2001.

Range error: result underflow
An underflow floating-point exception (FE_UNDERFLOW) is raised, and errno is set to ERANGE.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tgamma(), tgammaf(), tgammal()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

NOTES

This function had to be called “true gamma function” since there is already a function gamma(3) that returns something else (see gamma(3) for details).

BUGS

Before glibc 2.18, the glibc implementation of these functions did not set errno to EDOM when x is negative infinity.

Before glibc 2.19, the glibc implementation of these functions did not set errno to ERANGE on an underflow range error.

In glibc versions 2.3.3 and earlier, an argument of +0 or -0 incorrectly produced a domain error (errno set to EDOM and an FE_INVALID exception raised), rather than a pole error.

SEE ALSO

gamma(3), lgamma(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

216 - Linux cli command HTML_TokeParserpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_TokeParserpm and provides detailed information about the command HTML_TokeParserpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_TokeParserpm.

NAME 🖥️ HTML_TokeParserpm 🖥️

Alternative HTML::Parser interface

SYNOPSIS

require HTML::TokeParser; $p = HTML::TokeParser->new(“index.html”) || die “Cant open: $!”; $p->empty_element_tags(1); # configure its behaviour while (my $token = $p->get_token) { #… }

DESCRIPTION

The HTML::TokeParser is an alternative interface to the HTML::Parser class. It is an HTML::PullParser subclass with a predeclared set of token types. If you wish the tokens to be reported differently you probably want to use the HTML::PullParser directly.

The following methods are available:

$p = HTML::TokeParser->new( $filename, %opt );

$p = HTML::TokeParser->new( $filehandle, %opt );

$p = HTML::TokeParser->new( \document, %opt );

The object constructor argument is either a file name, a file handle object, or the complete document to be parsed. Extra options can be provided as key/value pairs and are processed as documented by the base classes. If the argument is a plain scalar, then it is taken as the name of a file to be opened and parsed. If the file can’t be opened for reading, then the constructor will return undef and $! will tell you why it failed. If the argument is a reference to a plain scalar, then this scalar is taken to be the literal document to parse. The value of this scalar should not be changed before all tokens have been extracted. Otherwise the argument is taken to be some object that the HTML::TokeParser can read() from when it needs more data. Typically it will be a filehandle of some kind. The stream will be read() until EOF, but not closed. A newly constructed HTML::TokeParser differ from its base classes by having the unbroken_text attribute enabled by default. See HTML::Parser for a description of this and other attributes that influence how the document is parsed. It is often a good idea to enable empty_element_tags behaviour. Note that the parsing result will likely not be valid if raw undecoded UTF-8 is used as a source. When parsing UTF-8 encoded files turn on UTF-8 decoding: open(my $fh, “<:utf8”, “index.html”) || die “Cant open index.html: $!”; my $p = HTML::TokeParser->new( $fh ); # … If a $filename is passed to the constructor the file will be opened in raw mode and the parsing result will only be valid if its content is Latin-1 or pure ASCII. If parsing from an UTF-8 encoded string buffer decode it first: utf8::decode($document); my $p = HTML::TokeParser->new( \document ); # …

$p->get_token
This method will return the next token found in the HTML document, or undef at the end of the document. The token is returned as an array reference. The first element of the array will be a string denoting the type of this token: “S” for start tag, “E” for end tag, “T” for text, “C” for comment, “D” for declaration, and “PI” for process instructions. The rest of the token array depend on the type like this: [“S”, $tag, $attr, $attrseq, $text] [“E”, $tag, $text] [“T”, $text, $is_data] [“C”, $text] [“D”, $text] [“PI”, $token0, $text] where $attr is a hash reference, $attrseq is an array reference and the rest are plain scalars. The “Argspec” in HTML::Parser explains the details.

$p->unget_token( @tokens )
If you find you have read too many tokens you can push them back, so that they are returned the next time $p->get_token is called.

$p->get_tag

$p->get_tag( @tags )

This method returns the next start or end tag (skipping any other tokens), or undef if there are no more tags in the document. If one or more arguments are given, then we skip tokens until one of the specified tag types is found. For example: $p->get_tag(“font”, “/font”); will find the next start or end tag for a font-element. The tag information is returned as an array reference in the same form as for $p->get_token above, but the type code (first element) is missing. A start tag will be returned like this: [$tag, $attr, $attrseq, $text] The tagname of end tags are prefixed with “/”, i.e. end tag is returned like this: ["/$tag", $text]

$p->get_text

$p->get_text( @endtags )

This method returns all text found at the current position. It will return a zero length string if the next token is not text. Any entities will be converted to their corresponding character. If one or more arguments are given, then we return all text occurring before the first of the specified tags found. For example: $p->get_text(“p”, “br”); will return the text up to either a paragraph of line break element. The text might span tags that should be textified. This is controlled by the $p->{textify} attribute, which is a hash that defines how certain tags can be treated as text. If the name of a start tag matches a key in this hash then this tag is converted to text. The hash value is used to specify which tag attribute to obtain the text from. If this tag attribute is missing, then the upper case name of the tag enclosed in brackets is returned, e.g. “[IMG]”. The hash value can also be a subroutine reference. In this case the routine is called with the start tag token content as its argument and the return value is treated as the text. The default $p->{textify} value is: {img => “alt”, applet => “alt”} This means that <IMG> and <APPLET> tags are treated as text, and that the text to substitute can be found in the ALT attribute.

$p->get_trimmed_text

$p->get_trimmed_text( @endtags )

Same as $p->get_text above, but will collapse any sequences of white space to a single space character. Leading and trailing white space is removed.

$p->get_phrase
This will return all text found at the current position ignoring any phrasal-level tags. Text is extracted until the first non phrasal-level tag. Textification of tags is the same as for get_text(). This method will collapse white space in the same way as get_trimmed_text() does. The definition of <i>phrasal-level tags</i> is obtained from the HTML::Tagset module.

EXAMPLES

This example extracts all links from a document. It will print one line for each link, containing the URL and the textual description between the <A>…</A> tags:

use HTML::TokeParser; $p = HTML::TokeParser->new(shift||“index.html”); while (my $token = $p->get_tag(“a”)) { my $url = $token->[1]{href} || “-”; my $text = $p->get_trimmed_text("/a"); print “$url $text “; }

This example extract the <TITLE> from the document:

use HTML::TokeParser; $p = HTML::TokeParser->new(shift||“index.html”); if ($p->get_tag(“title”)) { my $title = $p->get_trimmed_text; print “Title: $title “; }

SEE ALSO

HTML::PullParser, HTML::Parser

COPYRIGHT

Copyright 1998-2005 Gisle Aas.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

217 - Linux cli command Regexp_Common_URIpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_URIpm and provides detailed information about the command Regexp_Common_URIpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_URIpm.

NAME 🖥️ Regexp_Common_URIpm 🖥️

  • provide patterns for URIs.

SYNOPSIS

use Regexp::Common qw /URI/; while (<>) { /$RE{URI}{HTTP}/ and print “Contains an HTTP URI. “; }

DESCRIPTION

Patterns for the following URIs are supported: fax, file, FTP, gopher, HTTP, news, NTTP, pop, prospero, tel, telnet, tv and WAIS. Each is documented in the Regexp::Common::URI::scheme, manual page, for the appropriate scheme (in lowercase), except for NNTP URIs which are found in Regexp::Common::URI::news.

$RE{URI}

Return a pattern that recognizes any of the supported URIs. With {-keep}, only the entire URI is returned (in $1).

REFERENCES

[DRAFT-URI-TV]
Zigmond, D. and Vickers, M: Uniform Resource Identifiers for Television Broadcasts. December 2000.

[DRAFT-URL-FTP]
Casey, James: A FTP URL Format. November 1996.

[RFC 1035]
Mockapetris, P.: DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION. November 1987.

[RFC 1738]
Berners-Lee, Tim, Masinter, L., McCahill, M.: Uniform Resource Locators (URL). December 1994.

[RFC 2396]
Berners-Lee, Tim, Fielding, R., and Masinter, L.: Uniform Resource Identifiers (URI): Generic Syntax. August 1998.

[RFC 2616]
Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P. and Berners-Lee, Tim: Hypertext Transfer Protocol – HTTP/1.1. June 1999.

[RFC 2806]
Vaha-Sipila, A.: URLs for Telephone Calls. April 2000.

SEE ALSO

Regexp::Common for a general description of how to use this interface.

AUTHOR

Damian Conway ([email protected])

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

For a start, there are many common regexes missing. Send them in to [email protected].

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

218 - Linux cli command getservbyport_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getservbyport_r and provides detailed information about the command getservbyport_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getservbyport_r.

NAME 🖥️ getservbyport_r 🖥️

get service entry (reentrant)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
int getservent_r(struct servent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct servent **restrict result);
int getservbyname_r(const char *restrict name,
 const char *restrict proto,
 struct servent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct servent **restrict result);
int getservbyport_r(int port,
 const char *restrict proto,
 struct servent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct servent **restrict result);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getservent_r(), getservbyname_r(), getservbyport_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The getservent_r(), getservbyname_r(), and getservbyport_r() functions are the reentrant equivalents of, respectively, getservent(3), getservbyname(3), and getservbyport(3). They differ in the way that the servent structure is returned, and in the function calling signature and return value. This manual page describes just the differences from the nonreentrant functions.

Instead of returning a pointer to a statically allocated servent structure as the function result, these functions copy the structure into the location pointed to by result_buf.

The buf array is used to store the string fields pointed to by the returned servent structure. (The nonreentrant functions allocate these strings in static storage.) The size of this array is specified in buflen. If buf is too small, the call fails with the error ERANGE, and the caller must try again with a larger buffer. (A buffer of length 1024 bytes should be sufficient for most applications.)

If the function call successfully obtains a service record, then *result is set pointing to result_buf; otherwise, *result is set to NULL.

RETURN VALUE

On success, these functions return 0. On error, they return one of the positive error numbers listed in errors.

On error, record not found (getservbyname_r(), getservbyport_r()), or end of input (getservent_r()) result is set to NULL.

ERRORS

ENOENT
(getservent_r()) No more records in database.

ERANGE
buf is too small. Try again with a larger buffer (and increased buflen).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getservent_r(), getservbyname_r(), getservbyport_r()

Thread safetyMT-Safe locale

VERSIONS

Functions with similar names exist on some other systems, though typically with different calling signatures.

STANDARDS

GNU.

EXAMPLES

The program below uses getservbyport_r() to retrieve the service record for the port and protocol named in its first command-line argument. If a third (integer) command-line argument is supplied, it is used as the initial value for buflen; if getservbyport_r() fails with the error ERANGE, the program retries with larger buffer sizes. The following shell session shows a couple of sample runs:

$ ./a.out 7 tcp 1
ERANGE! Retrying with larger buffer
getservbyport_r() returned: 0 (success)  (buflen=87)
s_name=echo; s_proto=tcp; s_port=7; aliases=
$ ./a.out 77777 tcp
getservbyport_r() returned: 0 (success)  (buflen=1024)
Call failed/record not found

Program source

#define _GNU_SOURCE
#include <ctype.h>
#include <errno.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_BUF 10000
int
main(int argc, char *argv[])
{
    int buflen, erange_cnt, port, s;
    struct servent result_buf;
    struct servent *result;
    char buf[MAX_BUF];
    char *protop;
    if (argc < 3) {
        printf("Usage: %s port-num proto-name [buflen]

“, argv[0]); exit(EXIT_FAILURE); } port = htons(atoi(argv[1])); protop = (strcmp(argv[2], “null”) == 0 || strcmp(argv[2], “NULL”) == 0) ? NULL : argv[2]; buflen = 1024; if (argc > 3) buflen = atoi(argv[3]); if (buflen > MAX_BUF) { printf(“Exceeded buffer limit (%d) “, MAX_BUF); exit(EXIT_FAILURE); } erange_cnt = 0; do { s = getservbyport_r(port, protop, &result_buf, buf, buflen, &result); if (s == ERANGE) { if (erange_cnt == 0) printf(“ERANGE! Retrying with larger buffer “); erange_cnt++; /* Increment a byte at a time so we can see exactly what size buffer was required. */ buflen++; if (buflen > MAX_BUF) { printf(“Exceeded buffer limit (%d) “, MAX_BUF); exit(EXIT_FAILURE); } } } while (s == ERANGE); printf(“getservbyport_r() returned: %s (buflen=%d) “, (s == 0) ? “0 (success)” : (s == ENOENT) ? “ENOENT” : strerror(s), buflen); if (s != 0 || result == NULL) { printf(“Call failed/record not found “); exit(EXIT_FAILURE); } printf(“s_name=%s; s_proto=%s; s_port=%d; aliases=”, result_buf.s_name, result_buf.s_proto, ntohs(result_buf.s_port)); for (char **p = result_buf.s_aliases; *p != NULL; p++) printf("%s “, *p); printf(” “); exit(EXIT_SUCCESS); }

SEE ALSO

getservent(3), services(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

219 - Linux cli command pthread_attr_getstackaddr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_attr_getstackaddr and provides detailed information about the command pthread_attr_getstackaddr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_attr_getstackaddr.

NAME 🖥️ pthread_attr_getstackaddr 🖥️

set/get stack address attribute in thread attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
[[deprecated]]
int pthread_attr_setstackaddr(pthread_attr_t *attr",void*"stackaddr);
[[deprecated]]
int pthread_attr_getstackaddr(const pthread_attr_t *restrict attr,
 void **restrict stackaddr);

DESCRIPTION

These functions are obsolete: do not use them. Use pthread_attr_setstack(3) and pthread_attr_getstack(3) instead.

The pthread_attr_setstackaddr() function sets the stack address attribute of the thread attributes object referred to by attr to the value specified in stackaddr. This attribute specifies the location of the stack that should be used by a thread that is created using the thread attributes object attr.

stackaddr should point to a buffer of at least PTHREAD_STACK_MIN bytes that was allocated by the caller. The pages of the allocated buffer should be both readable and writable.

The pthread_attr_getstackaddr() function returns the stack address attribute of the thread attributes object referred to by attr in the buffer pointed to by stackaddr.

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

No errors are defined (but applications should nevertheless handle a possible error return).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_attr_setstackaddr(), pthread_attr_getstackaddr()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

glibc 2.1. Marked obsolete in POSIX.1-2001. Removed in POSIX.1-2008.

NOTES

Do not use these functions! They cannot be portably used, since they provide no way of specifying the direction of growth or the range of the stack. For example, on architectures with a stack that grows downward, stackaddr specifies the next address past the highest address of the allocated stack area. However, on architectures with a stack that grows upward, stackaddr specifies the lowest address in the allocated stack area. By contrast, the stackaddr used by pthread_attr_setstack(3) and pthread_attr_getstack(3), is always a pointer to the lowest address in the allocated stack area (and the stacksize argument specifies the range of the stack).

SEE ALSO

pthread_attr_init(3), pthread_attr_setstack(3), pthread_attr_setstacksize(3), pthread_create(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

220 - Linux cli command Tk_bindtagspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_bindtagspm and provides detailed information about the command Tk_bindtagspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_bindtagspm.

NAME 🖥️ Tk_bindtagspm 🖥️

Determine which bindings apply to a window, and order of evaluation

SYNOPSIS

$widget->bindtags([tagList]);

@tags = $widget->bindtags;

DESCRIPTION

When a binding is created with the bind command, it is associated either with a particular window such as $widget, a class name such as Tk::Button, the keyword all, or any other string. All of these forms are called binding tags. Each window has a list of binding tags that determine how events are processed for the window. When an event occurs in a window, it is applied to each of the window’s tags in order: for each tag, the most specific binding that matches the given tag and event is executed. See the Tk::bind documentation for more information on the matching process.

By default, each window has four binding tags consisting of the the window’s class name, name of the window, the name of the window’s nearest toplevel ancestor, and all, in that order. Toplevel windows have only three tags by default, since the toplevel name is the same as that of the window.

Note that this order is different from order used by Tcl/Tk. Tcl/Tk has the window ahead of the class name in the binding order. This is because Tcl is procedural rather than object oriented and the normal way for Tcl/Tk applications to override class bindings is with an instance binding. However, with perl/Tk the normal way to override a class binding is to derive a class. The perl/Tk order causes instance bindings to execute after the class binding, and so instance bind callbacks can make use of state changes (e.g. changes to the selection) than the class bindings have made.

The bindtags command allows the binding tags for a window to be read and modified.

If $widget->bindtags is invoked without an argument, then the current set of binding tags for $widget is returned as a list. If the tagList argument is specified to bindtags, then it must be a reference to and array; the tags for $widget are changed to the elements of the array. (A reference to an anonymous array can be created by enclosin the elements in [ ].) The elements of tagList may be arbitrary strings or widget objects, if no window exists for an object at the time an event is processed, then the tag is ignored for that event. The order of the elements in tagList determines the order in which binding callbacks are executed in response to events. For example, the command

$b->bindtags([$b,ref($b),$b->toplevel,all])

applies the Tcl/Tk binding order which binding callbacks will be evaluated for a button (say) $b so that $b’s instance bindings are invoked first, following by bindings for $b’s class, followed by bindings for $b’s toplevel, followed by ‘all’ bindings.

If tagList is an empty list i.e. [], then the binding tags for $widget are returned to the perl/Tk default state described above.

The bindtags command may be used to introduce arbitrary additional binding tags for a window, or to remove standard tags. For example, the command

$b->bindtags([TrickyButton,$b->toplevel,all])

replaces the (say) Tk::Button tag for $b with TrickyButton. This means that the default widget bindings for buttons, which are associated with the Tk::Button tag, will no longer apply to $b, but any bindings associated with TrickyButton (perhaps some new button behavior) will apply.

BUGS

The current mapping of the ’native’ Tk behaviour of this method i.e. returning a list but only accepting a reference to an array is counter intuitive. The perl/Tk interface may be tidied up, returning a list is sensible so, most likely fix will be to allow a list to be passed to set the bindtags.

SEE ALSO

Tk::bind Tk::callbacks

KEYWORDS

binding, event, tag

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

221 - Linux cli command wchar_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wchar_ttype and provides detailed information about the command wchar_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wchar_ttype.

NAME 🖥️ wchar_ttype 🖥️

wide-character type

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <stddef.h>
typedef /* ... */ wchar_t;
#include <stdint.h>
#define WCHAR_WIDTH /* ... */
#define WCHAR_MAX /* ... */
#define WCHAR_MIN /* ... */

DESCRIPTION

wchar_t is a type used for storing a wide character. It is an integer type.

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The WCHAR_WIDTH macro was added in C23.

NOTES

The following headers also provide this type: <inttypes.h>, <stdlib.h>, <wchar.h>, <wctype.h>.

The following header also provides these macros: <wchar.h>.

SEE ALSO

wint_t(3type), fputwc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

222 - Linux cli command pthread_attr_getschedpolicy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_attr_getschedpolicy and provides detailed information about the command pthread_attr_getschedpolicy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_attr_getschedpolicy.

NAME 🖥️ pthread_attr_getschedpolicy 🖥️

set/get scheduling policy attribute in thread attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy);
int pthread_attr_getschedpolicy(const pthread_attr_t *restrict attr,
 int *restrict policy);

DESCRIPTION

The pthread_attr_setschedpolicy() function sets the scheduling policy attribute of the thread attributes object referred to by attr to the value specified in policy. This attribute determines the scheduling policy of a thread created using the thread attributes object attr.

The supported values for policy are SCHED_FIFO, SCHED_RR, and SCHED_OTHER, with the semantics described in sched(7).

The pthread_attr_getschedpolicy() returns the scheduling policy attribute of the thread attributes object attr in the buffer pointed to by policy.

In order for the policy setting made by pthread_attr_setschedpolicy() to have effect when calling pthread_create(3), the caller must use pthread_attr_setinheritsched(3) to set the inherit-scheduler attribute of the attributes object attr to PTHREAD_EXPLICIT_SCHED.

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

pthread_attr_setschedpolicy() can fail with the following error:

EINVAL
Invalid value in policy.

POSIX.1 also documents an optional ENOTSUP error (“attempt was made to set the attribute to an unsupported value”) for pthread_attr_setschedpolicy().

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_attr_setschedpolicy(), pthread_attr_getschedpolicy()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.0. POSIX.1-2001.

EXAMPLES

See pthread_setschedparam(3).

SEE ALSO

pthread_attr_init(3), pthread_attr_setinheritsched(3), pthread_attr_setschedparam(3), pthread_create(3), pthread_setschedparam(3), pthread_setschedprio(3), pthreads(7), sched(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

223 - Linux cli command string

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command string and provides detailed information about the command string, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the string.

NAME 🖥️ string 🖥️

string operations

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <strings.h>

int strcasecmp(const char *s1, const char *s2);
Compare the strings s1 and s2 ignoring case.

int strncasecmp(const char s1[.n], const char s2[.n], size_t n);
Compare the first n bytes of the strings s1 and s2 ignoring case.

char *index(const char *s, int c);
Identical to strchr(3).

char *rindex(const char *s, int c);
Identical to strrchr(3).

#include <string.h>
char *stpcpy(char *restrict dest, const char *restrict src);
Copy a string from src to dest, returning a pointer to the end of the resulting string at dest.

char *strcat(char *restrict dest, const char *restrict src);
Append the string src to the string dest, returning a pointer dest.

char *strchr(const char *s, int c);
Return a pointer to the first occurrence of the character c in the string s.

int strcmp(const char *s1, const char *s2);
Compare the strings s1 with s2.

int strcoll(const char *s1, const char *s2);
Compare the strings s1 with s2 using the current locale.

char *strcpy(char *restrict dest, const char *restrict src);
Copy the string src to dest, returning a pointer to the start of dest.

size_t strcspn(const char *s, const char *reject);
Calculate the length of the initial segment of the string s which does not contain any of bytes in the string reject,

char *strdup(const char *s);
Return a duplicate of the string s in memory allocated using malloc(3).

char *strfry(char *string);
Randomly swap the characters in string.

size_t strlen(const char *s);
Return the length of the string s.

char *strncat(char dest[restrict strlen(.dest) + .n + 1],
 const char src[restrict .n],
 size_t n);

Append at most n bytes from the unterminated string src to the string dest, returning a pointer to dest.

int strncmp(const char s1[.n], const char s2[.n], size_t n);
Compare at most n bytes of the strings s1 and s2.

char *strpbrk(const char *s, const char *accept);
Return a pointer to the first occurrence in the string s of one of the bytes in the string accept.

char *strrchr(const char *s, int c);
Return a pointer to the last occurrence of the character c in the string s.

char *strsep(char **restrict stringp, const char *restrict delim);
Extract the initial token in stringp that is delimited by one of the bytes in delim.

size_t strspn(const char *s, const char *accept);
Calculate the length of the starting segment in the string s that consists entirely of bytes in accept.

char *strstr(const char *haystack, const char *needle);
Find the first occurrence of the substring needle in the string haystack, returning a pointer to the found substring.

char *strtok(char *restrict s, const char *restrict delim);
Extract tokens from the string s that are delimited by one of the bytes in delim.

size_t strxfrm(char dest[restrict .n], const char src[restrict .n],
 size_t n);

Transforms src to the current locale and copies the first n bytes to dest.

char *strncpy(char dest[restrict .n], const char src[restrict .n],
 size_t n);

Fill a fixed-size buffer with leading non-null bytes from a source array, padding with null bytes as needed.

DESCRIPTION

The string functions perform operations on null-terminated strings. See the individual man pages for descriptions of each function.

SEE ALSO

bstring(3), stpcpy(3), strcasecmp(3), strcat(3), strchr(3), strcmp(3), strcoll(3), strcpy(3), strcspn(3), strdup(3), strfry(3), strlen(3), strncasecmp(3), strncat(3), strncmp(3), strncpy(3), strpbrk(3), strrchr(3), strsep(3), strspn(3), strstr(3), strtok(3), strxfrm(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

224 - Linux cli command XtVaSetSubvalues

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtVaSetSubvalues and provides detailed information about the command XtVaSetSubvalues, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtVaSetSubvalues.

NAME 🖥️ XtVaSetSubvalues 🖥️

obtain and set widget resources

SYNTAX

#include <X11/Intrinsic.h>

void XtSetValues(Widget w, ArgList args, Cardinal num_args);

void XtVaSetValues(Widget w, … );

void XtSetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);

void XtVaSetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, … );

void XtGetValues(Widget w, ArgList args, Cardinal num_args);

void XtVaGetValues(Widget w, … );

void XtGetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);

void XtVaGetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, … );

ARGUMENTS

args
Specifies the argument list of name/address pairs that contain the resource name and either the address into which the resource value is to be stored or their new values.

base
Specifies the base address of the subpart data structure where the resources should be retrieved or written.

num_args
Specifies the number of arguments in the argument list.

resources
Specifies the nonwidget resource list or values.

num_resources
Specifies the number of resources in the resource list.

  1. Specifies the widget.


Specifies the variable argument list of name/address pairs that contain the resource name and either the address into which the resource value is to be stored or their new values.

DESCRIPTION

The XtSetValues function starts with the resources specified for the Core widget fields and proceeds down the subclass chain to the widget. At each stage, it writes the new value (if specified by one of the arguments) or the existing value (if no new value is specified) to a new widget data record. XtSetValues then calls the set_values procedures for the widget in superclass-to-subclass order. If the widget has any non-NULL set_values_hook fields, these are called immediately after the corresponding set_values procedure. This procedure permits subclasses to set nonwidget data for XtSetValues.

If the widget’s parent is a subclass of constraintWidgetClass, XtSetValues also updates the widget’s constraints. It starts with the constraint resources specified for constraintWidgetClass and proceeds down the subclass chain to the parent’s class. At each stage, it writes the new value or the existing value to a new constraint record. It then calls the constraint set_values procedures from constraintWidgetClass down to the parent’s class. The constraint set_values procedures are called with widget arguments, as for all set_values procedures, not just the constraint record arguments, so that they can make adjustments to the desired values based on full information about the widget.

XtSetValues determines if a geometry request is needed by comparing the current widget to the new widget. If any geometry changes are required, it makes the request, and the geometry manager returns XtGeometryYes, XtGeometryAlmost, or XtGeometryNo. If XtGeometryYes, XtSetValues calls the widget’s resize procedure. If XtGeometryNo, XtSetValues resets the geometry fields to their original values. If XtGeometryAlmost, XtSetValues calls the set_values_almost procedure, which determines what should be done and writes new values for the geometry fields into the new widget. XtSetValues then repeats this process, deciding once more whether the geometry manager should be called.

Finally, if any of the set_values procedures returned True, XtSetValues causes the widget’s expose procedure to be invoked by calling the Xlib XClearArea function on the widget’s window.

The XtSetSubvalues function stores resources into the structure identified by base.

The XtGetValues function starts with the resources specified for the core widget fields and proceeds down the subclass chain to the widget. The value field of a passed argument list should contain the address into which to store the corresponding resource value. It is the caller’s responsibility to allocate and deallocate this storage according to the size of the resource representation type used within the widget.

If the widget’s parent is a subclass of constraintWidgetClass, XtGetValues then fetches the values for any constraint resources requested. It starts with the constraint resources specified for constraintWidgetClass and proceeds down to the subclass chain to the parent’s constraint resources. If the argument list contains a resource name that is not found in any of the resource lists searched, the value at the corresponding address is not modified. Finally, if the get_values_hook procedures are non-NULL, they are called in superclass-to-subclass order after all the resource values have been fetched by XtGetValues. This permits a subclass to provide nonwidget resource data to XtGetValues.

The XtGetSubvalues function obtains resource values from the structure identified by base.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

225 - Linux cli command IPC_Shareablepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IPC_Shareablepm and provides detailed information about the command IPC_Shareablepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IPC_Shareablepm.

NAME 🖥️ IPC_Shareablepm 🖥️

Use shared memory backed variables across processes

SYNOPSIS

use IPC::Shareable qw(:lock); my $href = IPC::Shareable->new(%options); # …or tie SCALAR, IPC::Shareable, OPTIONS; tie ARRAY, IPC::Shareable, OPTIONS; tie HASH, IPC::Shareable, OPTIONS; tied(VARIABLE)->lock; tied(VARIABLE)->unlock; tied(VARIABLE)->lock(LOCK_SH|LOCK_NB) or print “Resource unavailable “; my $segment = tied(VARIABLE)->seg; my $semaphore = tied(VARIABLE)->sem; tied(VARIABLE)->remove; IPC::Shareable::clean_up; IPC::Shareable::clean_up_all; IPC::Shareable::clean_up_protected; # Ensure only one instance of a script can be run at any time IPC::Shareable->singleton(UNIQUE SCRIPT LOCK STRING); # Get the actual IPC::Shareable tied object my $knot = tied(VARIABLE); # Dereference first if using a tied reference

DESCRIPTION

IPC::Shareable allows you to tie a variable to shared memory making it easy to share the contents of that variable with other Perl processes and scripts.

Scalars, arrays, hashes and even objects can be tied. The variable being tied may contain arbitrarily complex data structures - including references to arrays, hashes of hashes, etc.

The association between variables in distinct processes is provided by GLUE (aka key). This is any arbitrary string or integer that serves as a common identifier for data across process space. Hence the statement:

tie my $scalar, IPC::Shareable, { key => GLUE STRING, create => 1 };

…in program one and the statement

tie my $variable, IPC::Shareable, { key => GLUE STRING };

…in program two will create and bind $scalar the shared memory in program one and bind it to $variable in program two.

There is no pre-set limit to the number of processes that can bind to data; nor is there a pre-set limit to the complexity of the underlying data of the tied variables. The amount of data that can be shared within a single bound variable is limited by the system’s maximum size for a shared memory segment (the exact value is system-dependent).

The bound data structures are all linearized (using Raphael Manfredi’s Storable module or optionally JSON) before being slurped into shared memory. Upon retrieval, the original format of the data structure is recovered. Semaphore flags can be used for locking data between competing processes.

OPTIONS

Options are specified by passing a reference to a hash as the third argument to the tie() function that enchants a variable.

The following fields are recognized in the options hash:

key

key is the GLUE that is a direct reference to the shared memory segment that’s to be tied to the variable.

If this option is missing, we’ll default to using IPC_PRIVATE. This default key will not allow sharing of the variable between processes.

Default: IPC_PRIVATE

create

create is used to control whether the process creates a new shared memory segment or not. If create is set to a true value, IPC::Shareable will create a new binding associated with GLUE as needed. If create is false, IPC::Shareable will not attempt to create a new shared memory segment associated with GLUE. In this case, a shared memory segment associated with GLUE must already exist or we’ll croak().

Defult: false

exclusive

If exclusive field is set to a true value, we will croak() if the data binding associated with GLUE already exists. If set to a false value, calls to tie() will succeed even if a shared memory segment associated with GLUE already exists.

See graceful for a silent, non-exception exit if a second process attempts to obtain an in-use exclusive segment.

Default: false

graceful

If exclusive is set to a true value, we normally croak() if a second process attempts to obtain the same shared memory segment. Set graceful to true and we’ll exit silently and gracefully. This option does nothing if exclusive isn’t set.

Useful for ensuring only a single process is running at a time.

Default: false

warn

When set to a true value, graceful will output a warning if there are process collisions.

Default: false

mode

The mode argument is an octal number specifying the access permissions when a new data binding is being created. These access permission are the same as file access permissions in that 0666 is world readable, 0600 is readable only by the effective UID of the process creating the shared variable, etc.

Default: 0666 (world read and writeable)

size

This field may be used to specify the size of the shared memory segment allocated.

The maximum size we allow by default is ~1GB. See the limit option to override this default.

Default: IPC::Shareable::SHM_BUFSIZ() (ie. 65536)

protected

If set, the clean_up() and clean_up_all() routines will not remove the segments or semaphores related to the tied object.

Set this to a specific integer so we can pass the value to any child objects created under the main one.

To clean up protected objects, call (tied %object)->clean_up_protected(integer), where ‘integer’ is the value you set the protected option to. You can call this cleanup routine in the script you created the segment, or anywhere else, at any time.

Default: 0

limit

This field will allow you to set a segment size larger than the default maximum which is 1,073,741,824 bytes (approximately 1 GB). If set, we will croak() if a size specified is larger than the maximum. If it’s set to a false value, we’ll croak() if you send in a size larger than the total system RAM.

Default: true

destroy

If set to a true value, the shared memory segment underlying the data binding will be removed when the process that initialized the shared memory segment exits (gracefully)[1].

Only those memory segments that were created by the current process will be removed.

Use this option with care. In particular you should not use this option in a program that will fork after binding the data. On the other hand, shared memory is a finite resource and should be released if it is not needed.

NOTE: If the segment was created with its protected attribute set, it will not be removed upon program completion, even if destroy is set.

Default: false

tidy

For long running processes, set this to a true value to clean up unneeded segments from nested data structures. Comes with a slight performance hit.

Default: false

serializer

By default, we use Storable as the data serializer when writing to or reading from the shared memory segments we create. For cross-platform and cross-language purposes, you can optionally use JSON for this task.

Send in either json or storable as the value to use the respective serializer.

Default: storable

Default Option Values

Default values for options are:

key => IPC_PRIVATE, # 0 create => 0, exclusive => 0, mode => 0666, size => IPC::Shareable::SHM_BUFSIZ(), # 65536 protected => 0, limit => 1, destroy => 0, graceful => 0, warn => 0, tidy => 0, serializer => storable,

METHODS

new

Instantiates and returns a reference to a hash backed by shared memory.

my $href = IPC::Shareable->new(key => “testing”, create => 1); $href=>{a} = 1; # Call tied() on the dereferenced variable to access object methods # and information tied(%$href)->ipcs;

Parameters:

Hash, Optional: See the OPTIONS section for a list of all available options. Most often, you’ll want to send in the key and create options.

It is possible to get a reference to an array or scalar as well. Simply send in either var = > ARRAY or var => SCALAR to do so.

Return: A reference to a hash (or array or scalar) which is backed by shared memory.

singleton($glue, $warn)

Class method that ensures that only a single instance of a script can be run at any given time.

Parameters:

$glue

Mandatory, String: The key/glue that identifies the shared memory segment.

$warn

Optional, Bool: Send in a true value to have subsequent processes throw a warning that there’s been a shared memory violation and that it will exit.

Default: false

ipcs

Returns the number of instantiated shared memory segments that currently exist on the system. This isn’t precise; it simply does a wc -l line count on your system’s ipcs -m call. It is guaranteed though to produce reliable results.

Return: Integer

lock($flags)

Obtains a lock on the shared memory. $flags specifies the type of lock to acquire. If $flags is not specified, an exclusive read/write lock is obtained. Acceptable values for $flags are the same as for the flock() system call.

Returns true on success, and undef on error. For non-blocking calls (see below), the method returns 0 if it would have blocked.

Obtain an exclusive lock like this:

tied(%var)->lock(LOCK_EX); # same as default

Only one process can hold an exclusive lock on the shared memory at a given time.

Obtain a shared (read) lock:

tied(%var)->lock(LOCK_SH);

Multiple processes can hold a shared (read) lock at a given time. If a process attempts to obtain an exclusive lock while one or more processes hold shared locks, it will be blocked until they have all finished.

Either of the locks may be specified as non-blocking:

tied(%var)->lock( LOCK_EX|LOCK_NB ); tied(%var)->lock( LOCK_SH|LOCK_NB );

A non-blocking lock request will return 0 if it would have had to wait to obtain the lock.

Note that these locks are advisory (just like flock), meaning that all cooperating processes must coordinate their accesses to shared memory using these calls in order for locking to work. See the flock() call for details.

Locks are inherited through forks, which means that two processes actually can possess an exclusive lock at the same time. Don’t do that.

The constants LOCK_EX, LOCK_SH, LOCK_NB, and LOCK_UN are available for import using any of the following export tags:

use IPC::Shareable qw(:lock); use IPC::Shareable qw(:flock); use IPC::Shareable qw(:all);

Or, just use the flock constants available in the Fcntl module.

See LOCKING for further details.

unlock

Removes a lock. Takes no parameters, returns true on success.

This is equivalent of calling shlock(LOCK_UN).

See LOCKING for further details.

seg

Called on either the tied variable or the tie object, returns the shared memory segment object currently in use.

sem

Called on either the tied variable or the tie object, returns the semaphore object related to the memory segment currently in use.

attributes

Retrieves the list of attributes that drive the IPC::Shareable object.

Parameters:

$attribute

Optional, String: The name of the attribute. If sent in, we’ll return the value of this specific attribute. Returns undef if the attribute isn’t found.

Attributes are the OPTIONS that were used to create the object.

Returns: A hash reference of all attributes if $attributes isn’t sent in, the value of the specific attribute if it is.

global_register

Returns a hash reference of hashes of all in-use shared memory segments across all processes. The key is the memory segment ID, and the value is the segment and semaphore objects.

process_register

Returns a hash reference of hashes of all in-use shared memory segments created by the calling process. The key is the memory segment ID, and the value is the segment and semaphore objects.

LOCKING

IPC::Shareable provides methods to implement application-level advisory locking of the shared data structures. These methods are called lock() and unlock(). To use them you must first get the object underlying the tied variable, either by saving the return value of the original call to tie() or by using the built-in tied() function.

To lock and subsequently unlock a variable, do this:

my $knot = tie my %hash, IPC::Shareable, { %options }; $knot->lock; $hash{a} = foo; $knot->unlock;

or equivalently, if you’ve decided to throw away the return of tie():

tie my %hash, IPC::Shareable, { %options }; tied(%hash)->lock; $hash{a} = foo; tied(%hash)->unlock;

This will place an exclusive lock on the data of $scalar. You can also get shared locks or attempt to get a lock without blocking.

IPC::Shareable makes the constants LOCK_EX, LOCK_SH, LOCK_UN, and LOCK_NB exportable to your address space with the export tags :lock, :flock, or :all. The values should be the same as the standard flock option arguments.

if (tied(%hash)->lock(LOCK_SH|LOCK_NB)){ print “The value is $hash{a} “; tied(%hash)->unlock; } else { print “Another process has an exclusive lock. “; }

If no argument is provided to lock, it defaults to LOCK_EX.

There are some pitfalls regarding locking and signals about which you should make yourself aware; these are discussed in NOTES.

Note that in the background, we perform lock optimization when reading and writing to the shared storage even if the advisory locks aren’t being used.

Using the advisory locks can speed up processes that are doing several writes/ reads at the same time.

DESTRUCTION

perl (1) will destroy the object underlying a tied variable when then tied variable goes out of scope. Unfortunately for IPC::Shareable, this may not be desirable: other processes may still need a handle on the relevant shared memory segment.

IPC::Shareable therefore provides several options to control the timing of removal of shared memory segments.

destroy Option

As described in OPTIONS, specifying the destroy option when tie()ing a variable coerces IPC::Shareable to remove the underlying shared memory segment when the process calling tie() exits gracefully.

NOTE: The destruction is handled in an END block. Only those memory segments that are tied to the current process will be removed.

NOTE: If the segment was created with its protected attribute set, it will not be removed in the END block, even if destroy is set.

remove

tied($var)->remove; # or $knot->remove;

Calling remove() on the object underlying a tie()d variable removes the associated shared memory segments. The segment is removed irrespective of whether it has the destroy option set or not and irrespective of whether the calling process created the segment.

clean_up

IPC::Shareable->clean_up; # or tied($var)->clean_up; # or $knot->clean_up;

This is a class method that provokes IPC::Shareable to remove all shared memory segments created by the process. Segments not created by the calling process are not removed.

This method will not clean up segments created with the protected option.

clean_up_all

IPC::Shareable->clean_up_all; # or tied($var)->clean_up_all; # or $knot->clean_up_all

This is a class method that provokes IPC::Shareable to remove all shared memory segments encountered by the process. Segments are removed even if they were not created by the calling process.

This method will not clean up segments created with the protected option.

clean_up_protected($protect_key)

If a segment is created with the protected option, it, nor its children will be removed during calls of clean_up() or clean_up_all().

When setting protected, you specified a lock key integer. When calling this method, you must send that integer in as a parameter so we know which segments to clean up.

my $protect_key = 93432; IPC::Shareable->clean_up_protected($protect_key); # or tied($var)->clean_up_protected($protect_key; # or $knot->clean_up_protected($protect_key)

Parameters:

$protect_key

Mandatory, Integer: The integer protect key you assigned wit the protected option

RETURN VALUES

Calls to tie() that try to implement IPC::Shareable will return an instance of IPC::Shareable on success, and undef otherwise.

AUTHOR

Benjamin Sugars <[email protected]>

MAINTAINED BY

Steve Bertrand <[email protected]>

NOTES

Footnotes from the above sections

  1. If the process has been smoked by an untrapped signal, the binding will remain in shared memory. If you’re cautious, you might try: $SIG{INT} = \catch_int; sub catch_int { die; } … tie $variable, IPC::Shareable, { key => GLUE, create => 1, destroy => 1 }; which will at least clean up after your user hits CTRL-C because IPC::Shareable’s END method will be called. Or, maybe you’d like to leave the binding in shared memory, so subsequent process can recover the data…

General Notes

  1. When using lock() to lock a variable, be careful to guard against signals. Under normal circumstances, IPC::Shareable’s END method unlocks any locked variables when the process exits. However, if an untrapped signal is received while a process holds an exclusive lock, END will not be called and the lock may be maintained even though the process has exited. If this scares you, you might be better off implementing your own locking methods. One advantage of using flock on some known file instead of the locking implemented with semaphores in IPC::Shareable is that when a process dies, it automatically releases any locks. This only happens with IPC::Shareable if the process dies gracefully. The alternative is to attempt to account for every possible calamitous ending for your process (robust signal handling in Perl is a source of much debate, though it usually works just fine) or to become familiar with your system’s tools for removing shared memory and semaphores. This concern should be balanced against the significant performance improvements you can gain for larger data structures by using the locking mechanism implemented in IPC::Shareable.

  2. There is a program called ipcs(1/8) (and ipcrm(1/8)) that is available on at least Solaris and Linux that might be useful for cleaning moribund shared memory segments or semaphore sets produced by bugs in either IPC::Shareable or applications using it. Examples: # List all semaphores and memory segments in use on the system ipcs -a # List all memory segments and semaphores along with each ones associated process ID ipcs -ap # List just the shared memory segments ipcs -m # List the details of an individual memory segment ipcs -i 12345678 # Remove *all* semaphores and memory segments ipcrm -a

  3. This version of IPC::Shareable does not understand the format of shared memory segments created by versions prior to 0.60. If you try to tie to such segments, you will get an error. The only work around is to clear the shared memory segments and start with a fresh set.

  4. Iterating over a hash causes a special optimization if you have not obtained a lock (it is better to obtain a read (or write) lock before iterating over a hash tied to IPC::Shareable, but we attempt this optimization if you do not). For tied hashes, the fetch/thaw operation is performed when the first key is accessed. Subsequent key and and value accesses are done without accessing shared memory. Doing an assignment to the hash or fetching another value between key accesses causes the hash to be replaced from shared memory. The state of the iterator in this case is not defined by the Perl documentation. Caveat Emptor.

CREDITS

Thanks to all those with comments or bug fixes, especially

Maurice Aubrey <[email protected]> Stephane Bortzmeyer <[email protected]> Doug MacEachern <[email protected]> Robert Emmery <[email protected]> Mohammed J. Kabir <[email protected]> Terry Ewing <[email protected]> Tim Fries <[email protected]> Joe Thomas <[email protected]> Paul Makepeace <[email protected]> Raphael Manfredi <[email protected]> Lee Lindley <[email protected]> Dave Rolsky <[email protected]> Steve Bertrand <[email protected]>

SEE ALSO

perltie, Storable, shmget, ipcs, ipcrm and other SysV IPC manual pages.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

226 - Linux cli command XtGetActionKeysym

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGetActionKeysym and provides detailed information about the command XtGetActionKeysym, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGetActionKeysym.

NAME 🖥️ XtGetActionKeysym 🖥️

obtain corresponding keysym

SYNTAX

#include <X11/Intrinsic.h>

KeySym XtGetActionKeysym(XEvent* event, Modifiers* modifiers_return);

ARGUMENTS

event
Specifies the event pointer passed to the action procedure by the Intrinsics.

modifiers_return
Returns the modifiers that caused the match, if non-NULL.

DESCRIPTION

If XtGetActionKeysym is called after an action procedure has been invoked by the Intrinsics and before that action procedure returns, and if the event pointer has the same value as the event pointer passed to that action routine, and if the event is a KeyPress or KeyRelease event, then XtGetActionKeysym returns the KeySym that matched the final event specification in the translation table and, if modifiers_return is non-NULL, the modifier state actually used to generate this KeySym; otherwise, if the event is a KeyPress or KeyRelease event, then XtGetActionKeysym calls XtTranslateKeycode and returns the results; else it returns NoSymbol and does not examine modifiers_return.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

227 - Linux cli command int64_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command int64_ttype and provides detailed information about the command int64_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the int64_ttype.

NAME 🖥️ int64_ttype 🖥️

fixed-width basic integer types

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <stdint.h>
typedef /* ... */ int8_t;
typedef /* ... */ int16_t;
typedef /* ... */ int32_t;
typedef /* ... */ int64_t;
typedef /* ... */ uint8_t;
typedef /* ... */ uint16_t;
typedef /* ... */ uint32_t;
typedef /* ... */ uint64_t;
#define INT8_WIDTH 8
#define INT16_WIDTH 16
#define INT32_WIDTH 32
#define INT64_WIDTH 64
#define UINT8_WIDTH 8
#define UINT16_WIDTH 16
#define UINT32_WIDTH 32
#define UINT64_WIDTH 64
#define INT8_MAX /* 2**(INT8_WIDTH - 1) - 1 */
#define INT16_MAX /* 2**(INT16_WIDTH - 1) - 1 */
#define INT32_MAX /* 2**(INT32_WIDTH - 1) - 1 */
#define INT64_MAX /* 2**(INT64_WIDTH - 1) - 1 */
#define INT8_MIN /* - 2**(INT8_WIDTH - 1) */
#define INT16_MIN /* - 2**(INT16_WIDTH - 1) */
#define INT32_MIN /* - 2**(INT32_WIDTH - 1) */
#define INT64_MIN /* - 2**(INT64_WIDTH - 1) */
#define UINT8_MAX /* 2**INT8_WIDTH - 1 */
#define UINT16_MAX /* 2**INT16_WIDTH - 1 */
#define UINT32_MAX /* 2**INT32_WIDTH - 1 */
#define UINT64_MAX /* 2**INT64_WIDTH - 1 */
#define INT8_C(c) c ## /* ... */
#define INT16_C(c) c ## /* ... */
#define INT32_C(c) c ## /* ... */
#define INT64_C(c) c ## /* ... */
#define UINT8_C(c) c ## /* ... */
#define UINT16_C(c) c ## /* ... */
#define UINT32_C(c) c ## /* ... */
#define UINT64_C(c) c ## /* ... */

DESCRIPTION

intN*_t* are signed integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are be capable of storing values in the range [INTN**_MIN**, INTN**_MAX**], substituting N by the appropriate number.

uintN*_t* are unsigned integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are capable of storing values in the range [0, UINTN**_MAX**], substituting N by the appropriate number.

According to POSIX, [u]int8_t, [u]int16_t, and [u]int32_t are required; [u]int64_t are only required in implementations that provide integer types with width 64; and all other types of this form are optional.

The macros [U]INTN**_WIDTH** expand to the width in bits of these types (N).

The macros [U]INTN**_MAX** expand to the maximum value that these types can hold.

The macros INTN**_MIN** expand to the minimum value that these types can hold.

The macros [U]INTN**_C**() expand their argument to an integer constant of type [u]intN*_t*.

The length modifiers for the [u]intN*_t* types for the printf(3) family of functions are expanded by macros of the forms PRIdN, PRIiN, PRIuN, and PRIxN (defined in <inttypes.h>); resulting for example in %“PRId64” or %“PRIi64” for printing int64_t values. The length modifiers for the [u]intN*_t* types for the scanf(3) family of functions are expanded by macros of the forms SCNdN, SCNiN, SCNuN, and SCNxN, (defined in <inttypes.h>); resulting for example in %“SCNu8” or %“SCNx8” for scanning uint8_t values.

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The [U]INTN**_WIDTH** macros were added in C23.

NOTES

The following header also provides these types: <inttypes.h>. <arpa/inet.h> also provides uint16_t and uint32_t.

SEE ALSO

intmax_t(3type), intptr_t(3type), printf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

228 - Linux cli command Moose_Rolepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Rolepm and provides detailed information about the command Moose_Rolepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Rolepm.

NAME 🖥️ Moose_Rolepm 🖥️

The Moose Role

VERSION

version 2.2207

SYNOPSIS

package Eq; use Moose::Role; # automatically turns on strict and warnings requires equal; sub no_equal { my ($self, $other) = @_; !$self->equal($other); } # … then in your classes package Currency; use Moose; # automatically turns on strict and warnings with Eq; sub equal { my ($self, $other) = @_; $self->as_float == $other->as_float; } # … and also package Comparator; use Moose; has compare_to => ( is => ro, does => Eq, handles => Eq, ); # … which allows my $currency1 = Currency->new(…); my $currency2 = Currency->new(…); Comparator->new(compare_to => $currency1)->equal($currency2);

DESCRIPTION

The concept of roles is documented in Moose::Manual::Roles. This document serves as API documentation.

EXPORTED FUNCTIONS

Moose::Role currently supports all of the functions that Moose exports, but differs slightly in how some items are handled (see “CAVEATS” below for details).

Moose::Role also offers two role-specific keyword exports:

requires (@method_names)

Roles can require that certain methods are implemented by any class which does the role.

Note that attribute accessors also count as methods for the purposes of satisfying the requirements of a role.

excludes (@role_names)

Roles can exclude other roles, in effect saying “I can never be combined with these @role_names”. This is a feature which should not be used lightly.

no Moose::Role

Moose::Role offers a way to remove the keywords it exports, through the unimport method. You simply have to say no Moose::Role at the bottom of your code for this to work.

METACLASS

When you use Moose::Role, you can specify traits which will be applied to your role metaclass:

use Moose::Role -traits => My::Trait;

This is very similar to the attribute traits feature. When you do this, your class’s meta object will have the specified traits applied to it. See “Metaclass and Trait Name Resolution” in Moose for more details.

All role metaclasses (note, not the role itself) extend Moose::Meta::Role. You can test if a package is a role or not using “is_role” in Moose::Util.

APPLYING ROLES

In addition to being applied to a class using the ‘with’ syntax (see Moose::Manual::Roles) and using the Moose::Util ‘apply_all_roles’ method, roles may also be applied to an instance of a class using Moose::Util ‘apply_all_roles’ or the role’s metaclass:

MyApp::Test::SomeRole->meta->apply( $instance );

Doing this creates a new, mutable, anonymous subclass, applies the role to that, and reblesses. In a debugger, for example, you will see class names of the form Moose::Meta::Class::_ _ANON_ _::SERIAL::6, which means that doing a ‘ref’ on your instance may not return what you expect. See Moose::Object for ‘DOES’.

Additional params may be added to the new instance by providing ‘rebless_params’. See Moose::Meta::Role::Application::ToInstance.

CAVEATS

Role support has only a few caveats:

  • Roles cannot use the extends keyword; it will throw an exception for now. The same is true of the augment and inner keywords (not sure those really make sense for roles). All other Moose keywords will be deferred so that they can be applied to the consuming class.

  • Role composition does its best to not be order-sensitive when it comes to conflict resolution and requirements detection. However, it is order-sensitive when it comes to method modifiers. All before/around/after modifiers are included whenever a role is composed into a class, and then applied in the order in which the roles are used. This also means that there is no conflict for before/around/after modifiers. In most cases, this will be a non-issue; however, it is something to keep in mind when using method modifiers in a role. You should never assume any ordering.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

229 - Linux cli command getprotoent_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getprotoent_r and provides detailed information about the command getprotoent_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getprotoent_r.

NAME 🖥️ getprotoent_r 🖥️

get protocol entry (reentrant)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
int getprotoent_r(struct protoent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct protoent **restrict result);
int getprotobyname_r(const char *restrict name,
 struct protoent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct protoent **restrict result);
int getprotobynumber_r(int proto,
 struct protoent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct protoent **restrict result);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getprotoent_r(), getprotobyname_r(), getprotobynumber_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The getprotoent_r(), getprotobyname_r(), and getprotobynumber_r() functions are the reentrant equivalents of, respectively, getprotoent(3), getprotobyname(3), and getprotobynumber(3). They differ in the way that the protoent structure is returned, and in the function calling signature and return value. This manual page describes just the differences from the nonreentrant functions.

Instead of returning a pointer to a statically allocated protoent structure as the function result, these functions copy the structure into the location pointed to by result_buf.

The buf array is used to store the string fields pointed to by the returned protoent structure. (The nonreentrant functions allocate these strings in static storage.) The size of this array is specified in buflen. If buf is too small, the call fails with the error ERANGE, and the caller must try again with a larger buffer. (A buffer of length 1024 bytes should be sufficient for most applications.)

If the function call successfully obtains a protocol record, then *result is set pointing to result_buf; otherwise, *result is set to NULL.

RETURN VALUE

On success, these functions return 0. On error, they return one of the positive error numbers listed in ERRORS.

On error, record not found (getprotobyname_r(), getprotobynumber_r()), or end of input (getprotoent_r()) result is set to NULL.

ERRORS

ENOENT
(getprotoent_r()) No more records in database.

ERANGE
buf is too small. Try again with a larger buffer (and increased buflen).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getprotoent_r(), getprotobyname_r(), getprotobynumber_r()

Thread safetyMT-Safe locale

VERSIONS

Functions with similar names exist on some other systems, though typically with different calling signatures.

STANDARDS

GNU.

EXAMPLES

The program below uses getprotobyname_r() to retrieve the protocol record for the protocol named in its first command-line argument. If a second (integer) command-line argument is supplied, it is used as the initial value for buflen; if getprotobyname_r() fails with the error ERANGE, the program retries with larger buffer sizes. The following shell session shows a couple of sample runs:

$ ./a.out tcp 1
ERANGE! Retrying with larger buffer
getprotobyname_r() returned: 0 (success)  (buflen=78)
p_name=tcp; p_proto=6; aliases=TCP
$ ./a.out xxx 1
ERANGE! Retrying with larger buffer
getprotobyname_r() returned: 0 (success)  (buflen=100)
Call failed/record not found

Program source

#define _GNU_SOURCE
#include <ctype.h>
#include <errno.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_BUF 10000
int
main(int argc, char *argv[])
{
    int buflen, erange_cnt, s;
    struct protoent result_buf;
    struct protoent *result;
    char buf[MAX_BUF];
    if (argc < 2) {
        printf("Usage: %s proto-name [buflen]

“, argv[0]); exit(EXIT_FAILURE); } buflen = 1024; if (argc > 2) buflen = atoi(argv[2]); if (buflen > MAX_BUF) { printf(“Exceeded buffer limit (%d) “, MAX_BUF); exit(EXIT_FAILURE); } erange_cnt = 0; do { s = getprotobyname_r(argv[1], &result_buf, buf, buflen, &result); if (s == ERANGE) { if (erange_cnt == 0) printf(“ERANGE! Retrying with larger buffer “); erange_cnt++; /* Increment a byte at a time so we can see exactly what size buffer was required. */ buflen++; if (buflen > MAX_BUF) { printf(“Exceeded buffer limit (%d) “, MAX_BUF); exit(EXIT_FAILURE); } } } while (s == ERANGE); printf(“getprotobyname_r() returned: %s (buflen=%d) “, (s == 0) ? “0 (success)” : (s == ENOENT) ? “ENOENT” : strerror(s), buflen); if (s != 0 || result == NULL) { printf(“Call failed/record not found “); exit(EXIT_FAILURE); } printf(“p_name=%s; p_proto=%d; aliases=”, result_buf.p_name, result_buf.p_proto); for (char **p = result_buf.p_aliases; *p != NULL; p++) printf("%s “, *p); printf(” “); exit(EXIT_SUCCESS); }

SEE ALSO

getprotoent(3), protocols(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

230 - Linux cli command Image_ExifTool_NikonCustompm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_NikonCustompm and provides detailed information about the command Image_ExifTool_NikonCustompm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_NikonCustompm.

NAME 🖥️ Image_ExifTool_NikonCustompm 🖥️

Read and Write Nikon custom settings

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

The Nikon custom functions are very specific to the camera model (and sometimes even change with firmware version). The information is stored as unformatted binary data in the ShotInfo record of the Nikon MakerNotes. This module contains the definitions necessary for Image::ExifTool to decode this information.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

ACKNOWLEDGEMENTS

Thanks to Jens Duttke and Warren Hatch for their help decoding the D300, D3 and Z9 custom settings. And thanks to the customer service personnel at Best Buy for not bugging me while I spent lots of time playing with their cameras.

SEE ALSO

“Nikon Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

231 - Linux cli command malloc_set_state

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command malloc_set_state and provides detailed information about the command malloc_set_state, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the malloc_set_state.

NAME 🖥️ malloc_set_state 🖥️

record and restore state of malloc implementation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <malloc.h>
void *malloc_get_state(void);
int malloc_set_state(void *state);

DESCRIPTION

Note: these functions are removed in glibc 2.25.

The malloc_get_state() function records the current state of all malloc(3) internal bookkeeping variables (but not the actual contents of the heap or the state of malloc_hook(3) functions pointers). The state is recorded in a system-dependent opaque data structure dynamically allocated via malloc(3), and a pointer to that data structure is returned as the function result. (It is the caller’s responsibility to free(3) this memory.)

The malloc_set_state() function restores the state of all malloc(3) internal bookkeeping variables to the values recorded in the opaque data structure pointed to by state.

RETURN VALUE

On success, malloc_get_state() returns a pointer to a newly allocated opaque data structure. On error (for example, memory could not be allocated for the data structure), malloc_get_state() returns NULL.

On success, malloc_set_state() returns 0. If the implementation detects that state does not point to a correctly formed data structure, malloc_set_state() returns -1. If the implementation detects that the version of the data structure referred to by state is a more recent version than this implementation knows about, malloc_set_state() returns -2.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

malloc_get_state(), malloc_set_state()

Thread safetyMT-Safe

STANDARDS

GNU.

NOTES

These functions are useful when using this malloc(3) implementation as part of a shared library, and the heap contents are saved/restored via some other method. This technique is used by GNU Emacs to implement its “dumping” function.

Hook function pointers are never saved or restored by these functions, with two exceptions: if malloc checking (see mallopt(3)) was in use when malloc_get_state() was called, then malloc_set_state() resets malloc checking hooks if possible; if malloc checking was not in use in the recorded state, but the caller has requested malloc checking, then the hooks are reset to 0.

SEE ALSO

malloc(3), mallopt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

232 - Linux cli command isalnum_l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isalnum_l and provides detailed information about the command isalnum_l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isalnum_l.

NAME 🖥️ isalnum_l 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

233 - Linux cli command mcheck_pedantic

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mcheck_pedantic and provides detailed information about the command mcheck_pedantic, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mcheck_pedantic.

NAME 🖥️ mcheck_pedantic 🖥️

heap consistency checking

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <mcheck.h>
int mcheck(void (*abortfunc)(enum mcheck_status mstatus));
int mcheck_pedantic(void (*abortfunc)(enum mcheck_status mstatus));
void mcheck_check_all(void);
enum mcheck_status mprobe(void *ptr);

DESCRIPTION

The mcheck() function installs a set of debugging hooks for the malloc(3) family of memory-allocation functions. These hooks cause certain consistency checks to be performed on the state of the heap. The checks can detect application errors such as freeing a block of memory more than once or corrupting the bookkeeping data structures that immediately precede a block of allocated memory.

To be effective, the mcheck() function must be called before the first call to malloc(3) or a related function. In cases where this is difficult to ensure, linking the program with -lmcheck inserts an implicit call to mcheck() (with a NULL argument) before the first call to a memory-allocation function.

The mcheck_pedantic() function is similar to mcheck(), but performs checks on all allocated blocks whenever one of the memory-allocation functions is called. This can be very slow!

The mcheck_check_all() function causes an immediate check on all allocated blocks. This call is effective only if mcheck() is called beforehand.

If the system detects an inconsistency in the heap, the caller-supplied function pointed to by abortfunc is invoked with a single argument, mstatus, that indicates what type of inconsistency was detected. If abortfunc is NULL, a default function prints an error message on stderr and calls abort(3).

The mprobe() function performs a consistency check on the block of allocated memory pointed to by ptr. The mcheck() function should be called beforehand (otherwise mprobe() returns MCHECK_DISABLED).

The following list describes the values returned by mprobe() or passed as the mstatus argument when abortfunc is invoked:

MCHECK_DISABLED (mprobe() only)
mcheck() was not called before the first memory allocation function was called. Consistency checking is not possible.

MCHECK_OK (mprobe() only)
No inconsistency detected.

MCHECK_HEAD
Memory preceding an allocated block was clobbered.

MCHECK_TAIL
Memory following an allocated block was clobbered.

MCHECK_FREE
A block of memory was freed twice.

RETURN VALUE

mcheck() and mcheck_pedantic() return 0 on success, or -1 on error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mcheck(), mcheck_pedantic(), mcheck_check_all(), mprobe()

Thread safety

MT-Unsafe race:mcheck const:malloc_hooks

STANDARDS

GNU.

HISTORY

mcheck_pedantic()
mcheck_check_all()
glibc 2.2.

mcheck()
mprobe()
glibc 2.0.

NOTES

Linking a program with -lmcheck and using the MALLOC_CHECK_ environment variable (described in mallopt(3)) cause the same kinds of errors to be detected. But, using MALLOC_CHECK_ does not require the application to be relinked.

EXAMPLES

The program below calls mcheck() with a NULL argument and then frees the same block of memory twice. The following shell session demonstrates what happens when running the program:

$ ./a.out
About to free
About to free a second time
block freed twice
Aborted (core dumped)

Program source

#include <mcheck.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    char *p;
    if (mcheck(NULL) != 0) {
        fprintf(stderr, "mcheck() failed

“); exit(EXIT_FAILURE); } p = malloc(1000); fprintf(stderr, “About to free “); free(p); fprintf(stderr, " About to free a second time “); free(p); exit(EXIT_SUCCESS); }

SEE ALSO

malloc(3), mallopt(3), mtrace(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

234 - Linux cli command Net_Server_Multiplexpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Server_Multiplexpm and provides detailed information about the command Net_Server_Multiplexpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Server_Multiplexpm.

NAME 🖥️ Net_Server_Multiplexpm 🖥️

Multiplex several connections within one process

SYNOPSIS

package MyPlexer; use base qw(Net::Server::Multiplex); sub mux_input { #…code… } _ _PACKAGE_ _->run();

DESCRIPTION

This personality is designed to handle multiple connections all within one process. It should only be used with protocols that are guaranteed to be able to respond quickly on a packet by packet basis. If determining a response could take a while or an unknown period of time, all other connections established will block until the response completes. If this condition might ever occur, this personality should probably not be used.

This takes some nice features of Net::Server (like the server listen socket setup, configuration file processing, safe signal handling, convenient inet style STDIN/STDOUT handling, logging features, deamonization and pid tracking, and restartability -SIGHUP) and some nice features of IO::Multiplex (automatic buffered IO and per-file-handle objects) and combines them for an easy-to-use interface.

See examples/samplechat.pl distributed with Net::Server for a simple chat server that uses several of these features.

PROCESS FLOW

The process flow is written in an open, easy to override, easy to hook, fashion. The basic flow is shown below.

$self->configure_hook; $self->configure(@_); $self->post_configure; $self->post_configure_hook; $self->pre_bind; $self->bind; if (Restarting server) { $self->restart_open_hook(); } $self->post_bind_hook; $self->post_bind; $self->pre_loop_hook; $self->loop; # This basically just runs IO::Multiplex::loop # For routines inside a $self->loop # See CLIENT PROCESSING below $self->pre_server_close_hook; $self->post_child_cleanup_hook; $self->server_close; if (Restarting server) { $self->restart_close_hook(); $self->hup_server; # Redo process again starting with configure_hook }

The server then exits.

CLIENT PROCESSING

The following represents the client processing program flow:

$self->{server}->{client} = Net::Server::Proto::TCP->accept(); # NOTE: Multiplexed with mux_input() below if (check_for_dequeue seconds have passed) { $self->run_dequeue(); } $self->get_client_info; $self->post_accept_hook; # Net::Server style if ($self->allow_deny && $self->allow_deny_hook) { # (Net::Server style $self->process_request() is never called.) # A unique client specific object is created # for all mux_* methods from this point on. $self = _ _PACKAGE_ _->new($self, client); $self->mux_connection; # IO::Multiplex style for (every packet received) { $self->mux_input; # NOTE: Multiplexed with accept() above } } else { $self->request_denied_hook; # Notice that if either allow_deny or allow_deny_hook fails, then # new(), mux_connection(), and mux_input() will never be called. # mux_eof() and mux_close() will still be called, but using a # common listen socket callback object instead of a unique client # specific object. } $self->mux_eof; $self->post_process_request_hook; $self->mux_close;

This process then loops multiplexing between the accept() for the next connection and mux_input() when input arrives to avoid blocking either one.

HOOKS

The *_hook methods mentioned above are meant to be overridden with your own subroutines if you desire to provide additional functionality.

The loop() method of Net::Server has been overridden to run the loop routine of IO::Multiplex instead. The Net::Server methods may access the IO::Multiplex object at $self->{mux} if desired. The IO::Multiplex methods may access the Net::Server object at $self->{net_server} if desired.

The process_request() method is never used with this personality.

The other Net::Server hooks and methods should work the same.

“$self->run_dequeue()”
This hook only gets called in conjunction with the check_for_dequeue setting. It will run every check_for_dequeue seconds. Since no forking is done, this hook should run fast in order to prevent blocking the rest of the processing.

TIMEOUTS

set_timeout

To utilize the optional timeout feature of IO::Multiplex, you need to specify a timeout by using the set_timeout method.

$self->{net_server}->{mux}->set_timeout($fh, $seconds_from_now);

$fh may be either a client socket or a listen socket file descriptor within the mux. $seconds_from_now may be fractional to achieve more precise timeouts. This is used in conjunction with mux_timeout, which you should define yourself.

mux_timeout

The main loop() routine will call $obj->mux_timeout($mux, $fh) when the timeout specified in set_timeout is reached where $fh is the same as the one specified in set_timeout() and $obj is its corresponding object (either the unique client specific object or the main listen callback object) and $mux is the main IO::Multiplex object itself.

CALLBACK INTERFACE

Callback objects should support the following interface. You do not have to provide all of these methods, just provide the ones you are interested in. These are just like the IO::Multiplex hooks except that STDOUT is tied to the corresponding client socket handle for your convenience and to more closely emulate the Net::Server model. However, unlike some other Net::Server personalities, you should never read directly from STDIN yourself. You should define one or more of the following methods:

mux_connection ($mux,$fh)

(OPTIONAL) Run once when the client first connects if the allow_deny passes. Note that the $self->{net_server}->{server} property hash may be modified by future connections through Net::Server. Any values within it that this object may need to use later should be copied within its own object at this point.

Example: $self->{peerport} = $self->{net_server}->{server}->{peerport};

mux_input ($mux,$fh,\data)

(REQUIRED) Run each time a packet is read. It should consume $data starting at the left and leave unconsumed data in the scalar for future calls to mux_input.

mux_eof ($mux,$fh,\data)

(OPTIONAL) Run once when the client is done writing. It should consume the rest of $data since mux_input() will never be run again.

mux_close ($mux,$fh)

(OPTIONAL) Run after the entire client socket has been closed. No more attempts should be made to read or write to the client or to STDOUT.

mux_timeout ($mux,$fh)

(OPTIONAL) Run once when the set_timeout setting expires as explained above.

BUGS

This is only known to work with TCP servers.

If you need to use the IO::Multiplex style set_timeout / mux_timeout interface, you cannot use the Net::Server style check_for_dequeue / run_dequeue interface. It will not work if the check_for_dequeue option is specified. The run_dequeue method is just a compatibility interface to comply with the Net::Server::Fork style run_dequeue but is implemented in terms of the IO::Multiplex style set_timeout and mux_timeout methods.

AUTHOR

Rob Brown <[email protected]>

MAINTAINER

Paul Seamons <[email protected]>

LICENSE

This package may be distributed under the terms of either the GNU General Public License or the Perl Artistic License All rights reserved.

SEE ALSO

Net::Server by Paul Seamons <[email protected]>,

IO::Multiplex by Bruce Keeler <[email protected]>.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

235 - Linux cli command Regexp_Common_URI_tvpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_URI_tvpm and provides detailed information about the command Regexp_Common_URI_tvpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_URI_tvpm.

NAME 🖥️ Regexp_Common_URI_tvpm 🖥️

  • Returns a pattern for tv URIs.

SYNOPSIS

use Regexp::Common qw /URI/; while (<>) { /$RE{URI}{tv}/ and print “Contains a tv URI. “; }

DESCRIPTION

“$RE{URI}{tv}”

Returns a pattern that recognizes TV uris as per an Internet draft [DRAFT-URI-TV].

Under {-keep}, the following are returned:

$1
The entire URI.

$2
The scheme.

$3
The host.

REFERENCES

[DRAFT-URI-TV]
Zigmond, D. and Vickers, M: Uniform Resource Identifiers for Television Broadcasts. December 2000.

[RFC 2396]
Berners-Lee, Tim, Fielding, R., and Masinter, L.: Uniform Resource Identifiers (URI): Generic Syntax. August 1998.

SEE ALSO

Regexp::Common::URI for other supported URIs.

AUTHOR

Damian Conway ([email protected])

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

236 - Linux cli command X11_Protocolpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command X11_Protocolpm and provides detailed information about the command X11_Protocolpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the X11_Protocolpm.

NAME 🖥️ X11_Protocolpm 🖥️

Perl module for the X Window System Protocol, version 11

SYNOPSIS

use X11::Protocol; $x = X11::Protocol->new(); $win = $x->new_rsrc; $x->CreateWindow($win, $x->root, InputOutput, $x->root_depth, CopyFromParent, ($x_coord, $y_coord), $width, $height, $border_w); …

DESCRIPTION

X11::Protocol is a client-side interface to the X11 Protocol (see X(1) for information about X11), allowing perl programs to display windows and graphics on X11 servers.

A full description of the protocol is beyond the scope of this documentation; for complete information, see the X Window System Protocol, X Version 11, available as Postscript or *roff source from ftp://ftp.x.org, or Volume 0: X Protocol Reference Manual of O’Reilly & Associates’s series of books about X (ISBN 1-56592-083-X, http://www.oreilly.com), which contains most of the same information.

DISCLAIMER

``The protocol contains many management mechanisms that are not intended for normal applications. Not all mechanisms are needed to build a particular user interface. It is important to keep in mind that the protocol is intended to provide mechanism, not policy.’’ Ω- Robert W. Scheifler

BASIC METHODS

new

$x = X11::Protocol->new(); $x = X11::Protocol->new($display_name); $x = X11::Protocol->new($connection); $x = X11::Protocol->new($display_name, [$auth_type, $auth_data]); $x = X11::Protocol->new($connection, [$auth_type, $auth_data]);

Open a connection to a server. $display_name should be an X display name, of the form ‘host:display_num.screen_num’; if no arguments are supplied, the contents of the DISPLAY environment variable are used. Alternatively, a pre-opened connection, of one of the X11::Protocol::Connection classes (see X11::Protocol::Connection, X11::Protocol::Connection::FileHandle, X11::Protocol::Connection::Socket, X11::Protocol::Connection::UNIXFH, X11::Protocol::Connection::INETFH, X11::Protocol::Connection::UNIXSocket, X11::Protocol::Connection::INETSocket) can be given. The authorization data is obtained using X11::Auth or the second argument. If the display is specified by $display_name, rather than $connection, a choose_screen() is also performed, defaulting to screen 0 if the ‘.screen_num’ of the display name is not present. Returns the new protocol object.

new_rsrc

$x->new_rsrc;

Returns a new resource identifier. A unique resource ID is required for every object that the server creates on behalf of the client: windows, fonts, cursors, etc. (IDs are chosen by the client instead of the server for efficiency Ω- the client doesn’t have to wait for the server to acknowledge the creation before starting to use the object).

Note that the total number of available resource IDs, while large, is finite. Beginning from the establishment of a connection, resource IDs are allocated sequentially from a range whose size is server dependent (commonly 2**21, about 2 million). If this limit is reached and the server does not support the XC_MISC extension, subsequent calls to new_rsrc will croak. If the server does support this extension, the module will attempt to request a new range of free IDs from the server. This should allow the program to continue, but it is an imperfect solution, as over time the set of available IDs may fragment, requiring increasingly frequent round-trip range requests from the server. For long-running programs, the best approach may be to keep track of free IDs as resources are destroyed. In the current version, however, no special support is provided for this.

handle_input

$x->handle_input;

Get one chunk of information from the server, and do something with it. If it’s an error, handle it using the protocol object’s handler (’error_handler’ Ω- default is kill the program with an explanatory message). If it’s an event, pass it to the chosen event handler, or put it in a queue if the handler is ‘queue’. If it’s a reply to a request, save using the object’s ‘replies’ hash for further processing.

atom_name

$name = $x->atom_name($atom);

Return the string corresponding to the atom $atom. This is similar to the GetAtomName request, but caches the result for efficiency.

atom

$atom = $x->atom($name);

The inverse operation; Return the (numeric) atom corresponding to $name. This is similar to the InternAtom request, but caches the result.

choose_screen

$x->choose_screen($screen_num);

Indicate that you prefer to use a particular screen of the display. Per-screen information, such as ‘root’, ‘width_in_pixels’, and ‘white_pixel’ will be made available as

$x->{root}

instead of

$x->{screens}[$screen_num]{root}

SYMBOLIC CONSTANTS

Generally, symbolic constants used by the protocol, like ‘CopyFromParent’ or ‘PieSlice’ are passed to methods as strings, and converted into numbers by the module. Their names are the same as those in the protocol specification, including capitalization, but with hyphens (’-’) changed to underscores (’_’) to look more perl-ish. If you want to do the conversion yourself for some reason, the following methods are available:

num

$num = $x->num($type, $str)

Given a string representing a constant and a string specifying what type of constant it is, return the corresponding number. $type should be a name like ‘VisualClass’ or ‘GCLineStyle’. If the name is not recognized, it is returned intact.

interp

$name = $x->interp($type, $num)

The inverse operation; given a number and string specifying its type, return a string representing the constant.

You can disable interp() and the module’s internal interpretation of numbers by setting $x->{‘do_interp’} to zero. Of course, this isn’t very useful, unless you have you own definitions for all the constants.

Here is a list of available constant types:

AccessMode, AllowEventsMode, AutoRepeatMode, BackingStore, BitGravity, Bool, ChangePropertyMode, CirculateDirection, CirculatePlace, Class, ClipRectangleOrdering, CloseDownMode, ColormapNotifyState, CoordinateMode, CrossingNotifyDetail, CrossingNotifyMode, DeviceEvent, DrawDirection, Error, EventMask, Events, FocusDetail, FocusMode, GCArcMode, GCCapStyle, GCFillRule, GCFillStyle, GCFunction, GCJoinStyle, GCLineStyle, GCSubwindowMode, GrabStatus, HostChangeMode, HostFamily, ImageFormat, InputFocusRevertTo, KeyMask, LedMode, MapState, MappingChangeStatus, MappingNotifyRequest, PointerEvent, PolyShape, PropertyNotifyState, Request, ScreenSaver, ScreenSaverAction, Significance, SizeClass, StackMode, SyncMode, VisibilityState, VisualClass, WinGravity

SERVER INFORMATION

At connection time, the server sends a large amount of information about itself to the client. This information is stored in the protocol object for future reference. It can be read directly, like

$x->{release_number}

or, for object oriented True Believers, using a method:

$x->release_number

The method method also has a one argument form for setting variables, but it isn’t really useful for some of the more complex structures.

Here is an example of what the object’s information might look like:

connection => X11::Connection::UNIXSocket(0x814526fd), byte_order => l, protocol_major_version => 11, protocol_minor_version => 0, authorization_protocol_name => MIT-MAGIC-COOKIE-1, release_number => 3110, resource_id_base => 0x1c000002, motion_buffer_size => 0, maximum_request_length => 65535, # units of 4 bytes image_byte_order => LeastSiginificant, bitmap_bit_order => LeastSiginificant, bitmap_scanline_unit => 32, bitmap_scanline_pad => 32, min_keycode => 8, max_keycode => 134, vendor => The XFree86 Project, Inc, pixmap_formats => {1 => {bits_per_pixel => 1, scanline_pad => 32}, 8 => {bits_per_pixel => 8, scanline_pad => 32}}, screens => [{root => 43, width_in_pixels => 800, height_in_pixels => 600, width_in_millimeters => 271, height_in_millimeters => 203, root_depth => 8, root_visual => 34, default_colormap => 33, white_pixel => 0, black_pixel => 1, min_installed_maps => 1, max_installed_maps => 1, backing_stores => Always, save_unders => 1, current_input_masks => 0x58003d, allowed_depths => [{depth => 1, visuals => []}, {depth => 8, visuals => [ {visual_id => 34, blue_mask => 0, green_mask => 0, red_mask => 0, class => PseudoColor, bits_per_rgb_value => 6, colormap_entries => 256}, {visual_id => 35, blue_mask => 0xc0, green_mask => 0x38, red_mask => 0x7, class => DirectColor, bits_per_rgb_value => 6, colormap_entries => 8}, …]}]], visuals => {34 => {depth => 8, class => PseudoColor, red_mask => 0, green_mask => 0, blue_mask=> 0, bits_per_rgb_value => 6, colormap_entries => 256}, 35 => {depth => 8, class => DirectColor, red_mask => 0x7, green_mask => 0x38, blue_mask=> 0xc0, bits_per_rgb_value => 6, colormap_entries => 8}, …} error_handler => &\X11::Protocol::default_error_handler, event_handler => sub {}, do_interp => 1

REQUESTS

request

$x->request(CreateWindow, …); $x->req(CreateWindow, …); $x->CreateWindow(…);

Send a protocol request to the server, and get the reply, if any. For names of and information about individual requests, see below and/or the protocol reference manual.

robust_req

$x->robust_req(CreateWindow, …);

Like request(), but if the server returns an error, return the error information rather than calling the error handler (which by default just croaks). If the request succeeds, returns an array reference containing whatever request() would have. Otherwise, returns the error type, the major and minor opcodes of the failed request, and the extra error information, if any. Note that even if the request normally wouldn’t have a reply, this method still has to wait for a round-trip time to see whether an error occurred. If you’re concerned about performance, you should design your error handling to be asynchronous.

add_reply

$x->add_reply($sequence_num, \var);

Add a stub for an expected reply to the object’s ‘replies’ hash. When a reply numbered $sequence_num comes, it will be stored in $var.

delete_reply

$x->delete_reply($sequence_num);

Delete the entry in ‘replies’ for the specified reply. (This should be done after the reply is received).

send

$x->send(CreateWindow, …);

Send a request, but do not wait for a reply. You must handle the reply, if any, yourself, using add_reply(), handle_input(), delete_reply(), and unpack_reply(), generally in that order.

unpack_reply

$x->unpack_reply(GetWindowAttributes, $data);

Interpret the raw reply data $data, according to the reply format for the named request. Returns data in the same format as request($request_name, ...).

This section includes only a short calling summary for each request; for full descriptions, see the protocol standard. Argument order is usually the same as listed in the spec, but you generally don’t have to pass lengths of strings or arrays, since perl keeps track. Symbolic constants are generally passed as strings. Most replies are returned as lists, but when there are many values, a hash is used. Lists usually come last; when there is more than one, each is passed by reference. In lists of multi-part structures, each element is a list ref. Parenthesis are inserted in arg lists for clarity, but are optional. Requests are listed in order by major opcode, so related requests are usually close together. Replies follow the ‘=>’.

$x->CreateWindow($wid, $parent, $class, $depth, $visual, ($x, $y), $width, $height, $border_width, attribute => $value, …) $x->ChangeWindowAttributes($window, attribute => $value, …) $x->GetWindowAttributes($window) => (backing_store => $backing_store, …)

This is an example of a return value that is meant to be assigned to a hash.

$x->DestroyWindow($win) $x->DestroySubwindows($win) $x->ChangeSaveSet($window, $mode) $x->ReparentWindow($win, $parent, ($x, $y)) $x->MapWindow($win) $x->MapSubwindows($win) $x->UnmapWindow($win) $x->UnmapSubwindows($win) $x->ConfigureWindow($win, attribute => $value, …) $x->CirculateWindow($win, $direction)

Note that this request actually circulates the subwindows of $win, not the window itself.

$x->GetGeometry($drawable) => (root => $root, …) $x->QueryTree($win) => ($root, $parent, @kids) $x->InternAtom($name, $only_if_exists) => $atom $x->GetAtomName($atom) => $name $x->ChangeProperty($window, $property, $type, $format, $mode, $data) $x->DeleteProperty($win, $atom) $x->GetProperty($window, $property, $type, $offset, $length, $delete) => ($value, $type, $format, $bytes_after)

Notice that the value comes first, so you can easily ignore the rest.

$x->ListProperties($window) => (@atoms) $x->SetSelectionOwner($selection, $owner, $time) $x->GetSelectionOwner($selection) => $owner $x->ConvertSelection($selection, $target, $property, $requestor, $time) $x->SendEvent($destination, $propagate, $event_mask, $event)

The $event argument should be the result of a pack_event() (see EVENTS)

$x->GrabPointer($grab_window, $owner_events, $event_mask, $pointer_mode, $keyboard_mode, $confine_to, $cursor, $time) => $status $x->UngrabPointer($time) $x->GrabButton($modifiers, $button, $grab_window, $owner_events, $event_mask, $pointer_mode, $keyboard_mode, $confine_to, $cursor) $x->UngrabButton($modifiers, $button, $grab_window) $x->ChangeActivePointerGrab($event_mask, $cursor, $time) $x->GrabKeyboard($grab_window, $owner_events, $pointer_mode, $keyboard_mode, $time) => $status $x->UngrabKeyboard($time) $x->GrabKey($key, $modifiers, $grab_window, $owner_events, $pointer_mode, $keyboard_mode) $x->UngrabKey($key, $modifiers, $grab_window) $x->AllowEvents($mode, $time) $x->GrabServer $x->UngrabServer $x->QueryPointer($window) => (root => $root, …) $x->GetMotionEvents($start, $stop, $window) => ([$time, ($x, $y)], [$time, ($x, $y)], …) $x->TranslateCoordinates($src_window, $dst_window, $src_x, $src_y) => ($same_screen, $child, $dst_x, $dst_y) $x->WarpPointer($src_window, $dst_window, $src_x, $src_y, $src_width, $src_height, $dst_x, $dst_y) $x->SetInputFocus($focus, $revert_to, $time) $x->GetInputFocus => ($focus, $revert_to) $x->QueryKeymap => $keys

$keys is a bit vector, so you should use vec() to read it.

$x->OpenFont($fid, $name) $x->CloseFont($font) $x->QueryFont($font) => (min_char_or_byte2 => $min_char_or_byte2, …, min_bounds => [$left_side_bearing, $right_side_bearing, $character_width, $ascent, $descent, $attributes], …, char_infos => [[$left_side_bearing, $right_side_bearing, $character_width, $ascent, $descent, $attributes], …], properties => {$prop => $value, …} ) $x->QueryTextExtents($font, $string) => (draw_direction => $draw_direction, …) $x->ListFonts($pattern, $max_names) => @names $x->ListFontsWithInfo($pattern, $max_names) => ({name => $name, …}, {name => $name, …}, …)

The information in each hash is the same as the the information returned by QueryFont, but without per-character size information. This request is special in that it is the only request that can have more than one reply. This means you should probably only use request() with it, not send(), as the reply counting is complicated. Luckily, you never need this request anyway, as its function is completely duplicated by other requests.

$x->SetFontPath(@strings) $x->GetFontPath => @strings $x->CreatePixmap($pixmap, $drawable, $depth, $width, $height) $x->FreePixmap($pixmap) $x->CreateGC($cid, $drawable, attribute => $value, …) $x->ChangeGC($gc, attribute => $value, …) $x->CopyGC($src, $dest, attribute, attribute, …) $x->SetDashes($gc, $dash_offset, (@dashes)) $x->SetClipRectangles($gc, ($clip_x_origin, $clip_y_origin), $ordering, [$x, $y, $width, $height], …) $x->ClearArea($window, ($x, $y), $width, $height, $exposures) $x->CopyArea($src_drawable, $dst_drawable, $gc, ($src_x, $src_y), $width, $height, ($dst_x, $dst_y)) $x->CopyPlane($src_drawable, $dst_drawable, $gc, ($src_x, $src_y), $width, $height, ($dst_x, $dst_y), $bit_plane) $x->PolyPoint($drawable, $gc, $coordinate_mode, ($x, $y), ($x, $y), …) $x->PolyLine($drawable, $gc, $coordinate_mode, ($x, $y), ($x, $y), …) $x->PolySegment($drawable, $gc, ($x, $y) => ($x, $y), ($x, $y) => ($x, $y), …) $x->PolyRectangle($drawable, $gc, [($x, $y), $width, $height], …) $x->PolyArc($drawable, $gc, [($x, $y), $width, $height, $angle1, $angle2], …) $x->FillPoly($drawable, $gc, $shape, $coordinate_mode, ($x, $y), …) $x->PolyFillRectangle($drawable, $gc, [($x, $y), $width, $height], …) $x->PolyFillArc($drawable, $gc, [($x, $y), $width, $height, $angle1, $angle2], …) $x->PutImage($drawable, $gc, $depth, $width, $height, ($dst_x, $dst_y), $left_pad, $format, $data)

Currently, the module has no code to handle the various bitmap formats that the server might specify. Therefore, this request will not work portably without a lot of work.

$x->GetImage($drawable, ($x, $y), $width, $height, $plane_mask, $format) $x->PolyText8($drawable, $gc, ($x, $y), ($font OR [$delta, $string]), …) $x->PolyText16($drawable, $gc, ($x, $y), ($font OR [$delta, $string]), …) $x->ImageText8($drawable, $gc, ($x, $y), $string) $x->ImageText16($drawable, $gc, ($x, $y), $string) $x->CreateColormap($mid, $visual, $window, $alloc) $x->FreeColormap($cmap) $x->CopyColormapAndFree($mid, $src_cmap) $x->InstallColormap($cmap) $x->UninstallColormap($cmap) $x->ListInstalledColormaps($window) => @cmaps $x->AllocColor($cmap, ($red, $green, $blue)) => ($pixel, ($red, $green, $blue)) $x->AllocNamedColor($cmap, $name) => ($pixel, ($exact_red, $exact_green, $exact_blue), ($visual_red, $visual_green, $visual_blue)) $x->AllocColorCells($cmap, $colors, $planes, $contiguous) => ([@pixels], [@masks]) $x->AllocColorPlanes($cmap, $colors, ($reds, $greens, $blues), $contiguous) => (($red_mask, $green_mask, $blue_mask), @pixels) $x->FreeColors($cmap, $plane_mask, @pixels) $x->StoreColors($cmap, [$pixel, $red, $green, $blue, $do_mask], …)

The 1, 2, and 4 bits in $do_mask are do-red, do-green, and do-blue. $do_mask can be omitted, defaulting to 7, the usual case Ω- change the whole color.

$x->StoreNamedColor($cmap, $pixel, $name, $do_mask)

$do_mask has the same interpretation as above, but is mandatory.

$x->QueryColors($cmap, @pixels) => ([$red, $green, $blue], …) $x->LookupColor($cmap, $name) => (($exact_red, $exact_green, $exact_blue), ($visual_red, $visual_green, $visual_blue)) $x->CreateCursor($cid, $source, $mask, ($fore_red, $fore_green, $fore_blue), ($back_red, $back_green, $back_blue), ($x, $y)) $x->CreateGlyphCursor($cid, $source_font, $mask_font, $source_char, $mask_char, ($fore_red, $fore_green, $fore_blue), ($back_red, $back_green, $back_blue)) $x->FreeCursor($cursor) $x->RecolorCursor($cursor, ($fore_red, $fore_green, $fore_blue), ($back_red, $back_green, $back_blue)) $x->QueryBestSize($class, $drawable, $width, $height) => ($width, $height) $x->QueryExtension($name) => ($major_opcode, $first_event, $first_error)

If the extension is not present, an empty list is returned.

$x->ListExtensions => (@names) $x->ChangeKeyboardMapping($first_keycode, $keysysms_per_keycode, @keysyms) $x->GetKeyboardMapping($first_keycode, $count) => ($keysysms_per_keycode, [$keysym, …], [$keysym, …], …) $x->ChangeKeyboardControl(attribute => $value, …) $x->GetKeyboardControl => (global_auto_repeat => $global_auto_repeat, …) $x->Bell($percent) $x->ChangePointerControl($do_acceleration, $do_threshold, $acceleration_numerator, $acceleration_denominator, $threshold) $x->GetPointerControl => ($acceleration_numerator, $acceleration_denominator, $threshold) $x->SetScreenSaver($timeout, $interval, $prefer_blanking, $allow_exposures) $x->GetScreenSaver => ($timeout, $interval, $prefer_blanking, $allow_exposures) $x->ChangeHosts($mode, $host_family, $host_address) $x->ListHosts => ($mode, [$family, $host], …) $x->SetAccessControl($mode) $x->SetCloseDownMode($mode) $x->KillClient($resource) $x->RotateProperties($win, $delta, @props) $x->ForceScreenSaver($mode) $x->SetPointerMapping(@map) => $status $x->GetPointerMapping => @map $x->SetModifierMapping(@keycodes) => $status $x->GetModiferMapping => @keycodes $x->NoOperation($length)

$length specifies the length of the entire useless request, in four byte units, and is optional.

EVENTS

To receive events, first set the ’event_mask’ attribute on a window to indicate what types of events you desire (see pack_event_mask). Then, set the protocol object’s ’event_handler’ to a subroutine reference that will handle the events. Alternatively, set ’event_handler’ to ‘queue’, and retrieve events using dequeue_event() or next_event(). In both cases, events are returned as a hash. For instance, a typical MotionNotify event might look like this:

%event = (name => MotionNotify, sequence_number => 12, state => 0, event => 58720256, root => 43, child => None, same_screen => 1, time => 966080746, detail => Normal, event_x => 10, event_y => 3, code => 6, root_x => 319, root_y => 235)

pack_event_mask

$mask = $x->pack_event_mask(ButtonPress, KeyPress, Exposure);

Make an event mask (suitable as the ’event_mask’ of a window) from a list of strings specifying event types.

unpack_event_mask

@event_types = $x->unpack_event_mask($mask);

The inverse operation; convert an event mask obtained from the server into a list of names of event categories.

dequeue_event

%event = $x->dequeue_event;

If there is an event waiting in the queue, return it.

next_event

%event = $x->next_event;

Like Xlib’s XNextEvent(), this function is equivalent to

$x->handle_input until %event = dequeue_event;

pack_event

$data = $x->pack_event(%event);

Given an event in hash form, pack it into a string. This is only useful as an argument to SendEvent().

unpack_event

%event = $x->unpack_event($data);

The inverse operation; given the raw data for an event (32 bytes), unpack it into hash form. Normally, this is done automatically.

EXTENSIONS

Protocol extensions add new requests, event types, and error types to the protocol. Support for them is compartmentalized in modules in the X11::Protocol::Ext:: hierarchy. For an example, see X11::Protocol::Ext::SHAPE. You can tell if the module has loaded an extension by looking at

$x->{ext}{$extension_name}

If the extension has been initialized, this value will be an array reference, [$major_request_number, $first_event_number, $first_error_number, $obj], where $obj is an object containing information private to the extension.

init_extension

$x->init_extension($name);

Initialize an extension: query the server to find the extension’s request number, then load the corresponding module. Returns 0 if the server does not support the named extension, or if no module to interface with it exists.

init_extensions

$x->init_extensions;

Initialize protocol extensions. This does a ListExtensions request, then calls init_extension() for each extension that the server supports.

WRITING EXTENSIONS

Internally, the X11::Protocol module is table driven. All an extension has to do is to add new add entries to the protocol object’s tables. An extension module should use X11::Protocol, and should define an new() method

X11::Protocol::Ext::NAME ->new($x, $request_num, $event_num, $error_num)

where $x is the protocol object and $request_num, $event_num and $error_num are the values returned by QueryExtension().

The new() method should add new types of constant like

$x->{ext_const}{ConstantType} = [Constant, Constant, …]

and set up the corresponding name to number translation hashes like

$x->{ext_const_num}{ConstantType} = {make_num_hash($x->{ext_const}{ConstantType})}

Event names go in

$x->{ext_const}{Events}[$event_number]

while specifications for event contents go in

$x->{ext_event}[$event_number]

each element of which is either [\&unpack_sub, \&pack_sub] or [$pack_format, $field, $field, ...], where each $field is name, [name, const_type], or [name, [special_name_for_zero, special_name_for_one]], where special_name_for_one is optional.

Finally,

$x->{ext_request}{$major_request_number}

should be an array of arrays, with each array either [$name, \&packit] or [$name, \&packit, \&unpackit], and

$x->{ext_request_num}{$request_name}

should be initialized with [$minor_num, $major_num] for each request the extension defines. For examples of code that does all of this, look at X11::Protocol::Ext::SHAPE.

X11::Protocol exports several functions that might be useful in extensions (note that these are not methods).

padding

$p = padding $x;

Given an integer, compute the number need to round it up to a multiple of 4. For instance, padding(5) is 3.

pad

$p = pad $str;

Given a string, return the number of extra bytes needed to make a multiple of 4. Equivalent to padding(length($str)).

padded

$data = pack(padded($str), $str);

Return a format string, suitable for pack(), for a string padded to a multiple of 4 bytes. For instance, pack(padded(Hello), Hello) gives "Hello".

hexi

$str = hexi $n;

Format a number in hexidecimal, and add a 0x to the front.

make_num_hash

%hash = make_num_hash([A, B, C]);

Given a reference to a list of strings, return a hash mapping the strings onto numbers representing their position in the list, as used by $x->{ext_const_num}.

BUGS

This module is too big (~2500 lines), too slow (10 sec to load on a slow machine), too inefficient (request args are copied several times), and takes up too much memory (3000K for basicwin).

If you have more than 65535 replies outstanding at once, sequence numbers can collide.

The protocol is too complex.

AUTHOR

Stephen McCamant <[email protected]>.

SEE ALSO

perl (1), X(1), X11::Keysyms, X11::Protocol::Ext::SHAPE, X11::Protocol::Ext::BIG_REQUESTS, X11::Protocol::Ext::XC_MISC, X11::Protocol::Ext::DPMS, X11::Protocol::Ext::XFree86_Misc, X11::Auth, X Window System Protocol (X Version 11), Inter-Client Communications Conventions Manual, X Logical Font Description Conventions.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

237 - Linux cli command XShmQueryVersion

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XShmQueryVersion and provides detailed information about the command XShmQueryVersion, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XShmQueryVersion.

NAME 🖥️ XShmQueryVersion 🖥️

X Shared Memory extension functions

SYNTAX

#include <X11/Xlib.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
Bool	XShmQueryExtension(
	Display *display);
Bool XShmQueryVersion(
	Display *display;
	int *major, *minor;
	Bool *pixmaps);
int XShmPixmapFormat(
	Display *display);
Bool XShmAttach(
	Display *display;
	XShmSegmentInfo *shminfo);
Bool XShmDetach(
	Display *display;
	XShmSegmentInfo *shminfo);

XImage *XShmCreateImage (
	Display *display;
	Visual *visual;
	unsigned int depth;
	int format;
	char *data;
	XShmSegmentInfo *shminfo;
	unsigned int width, height);
Bool XShmPutImage(
	Display *display;
	Drawable d;
	GC gc;
	XImage *image;
	int src_x, src_y, dest_x, dest_y;
	unsigned int width, height;
	bool send_event);
Bool XShmGetImage (
	Display *display;
	Drawable d;
	XImage *image;
	int x, y;
	unsigned long plane_mask);
Pixmap XShmCreatePixmap(
        Display *display;
        Drawable d;
        char *data;
	XShmSegmentInfo *shminfo;
	unsigned int width, height, depth);
Status XShmGetEventBase(
	Display *display);

STRUCTURES

Events:
typedef struct {
    int type;               /* of event */
    unsigned long serial;   /* # of last request processed by server*/
    Bool send_event;        /* true if this came from a SendEvent request*/
    Display *display;       /* Display the event was read from */
    Drawable drawable;      /* drawable of request */
    int major_code;         /* ShmReqCode */
    int minor_code;         /* X_ShmPutImage */
    ShmSeg shmseg;          /* the ShmSeg used in the request*/
    unsigned long offset;   /* the offset into ShmSeg used in the request*/
} XShmCompletionEvent;
a structure of type XShmSegmentInfo :

typedef struct {
    ShmSeg shmseg;      /* resource id */
    int shmid;          /* kernel id */
    char *shmaddr;      /* address in client */
    Bool readOnly;      /* how the server should attach it */
} XShmSegmentInfo;

DESCRIPTION

* XShmQueryExtension * checks to see if the shared memory extensions are available for the specified display.

* XShmQueryVersion * returns the version numbers of the extension implementation. Shared memory pixmaps are supported if the pixmaps argument returns true.

* XShmAttach * tells the server to attach to your shared memory segment. If all goes well, you will get a non-zero status, back and your XImage is ready for use.

* XShmDetach * tells the server to detach from your shared memory segment.

* XShmPutImage * combines an image in memory with a shape of the specified drawable. If XYBitmap format is used, the depth must be one, or a ``BadMatch’’ error results. The foreground pixel in the GC defines the source for the one bits in the image, and the background pixel defines the source for the zero bits. For XYPixmap and ZPixmap, the depth must match the depth of the drawable, or a ``BadMatch’’ error results.

* XShmGetImage * reads image data into a shared memory XImage where display is the display of interest, drawable is the source drawable, image is the destination XImage, x and y are offsets within the drawable, and plane_mask defines which planes are to be read.

* XShmCreateImage * allocates the memory needed for an XImage structure for the specified display but does not allocate space for the image itself.

* XShmPixmapFormat * gets the format for the server. If your application can deal with the server pixmap data format, a shared memory segment and shminfo structure are created.

* XShmCreatePixmap * points to a pixmap which you can manipulate in all of the usual ways, with the added bonus of being able to edit its contents directly through the shared memory segment.

* XShmGetEventBase * gets the completion event value.

SEE ALSO

MIT-SHM - The MIT Shared Memory Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

238 - Linux cli command Parallel_ForkManagerpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Parallel_ForkManagerpm and provides detailed information about the command Parallel_ForkManagerpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Parallel_ForkManagerpm.

NAME 🖥️ Parallel_ForkManagerpm 🖥️

A simple parallel processing fork manager

VERSION

version 2.02

SYNOPSIS

use Parallel::ForkManager; my $pm = Parallel::ForkManager->new($MAX_PROCESSES); DATA_LOOP: foreach my $data (@all_data) { # Forks and returns the pid for the child: my $pid = $pm->start and next DATA_LOOP; … do some work with $data in the child process … $pm->finish; # Terminates the child process }

DESCRIPTION

This module is intended for use in operations that can be done in parallel where the number of processes to be forked off should be limited. Typical use is a downloader which will be retrieving hundreds/thousands of files.

The code for a downloader would look something like this:

use LWP::Simple; use Parallel::ForkManager; … my @links=( [“http://www.foo.bar/rulez.data","rulez_data.txt”], [“http://new.host/more_data.doc”,“more_data.doc”], … ); … # Max 30 processes for parallel download my $pm = Parallel::ForkManager->new(30); LINKS: foreach my $linkarray (@links) { $pm->start and next LINKS; # do the fork my ($link, $fn) = @$linkarray; warn “Cannot get $fn from $link” if getstore($link, $fn) != RC_OK; $pm->finish; # do the exit in the child process } $pm->wait_all_children;

First you need to instantiate the ForkManager with the new constructor. You must specify the maximum number of processes to be created. If you specify 0, then NO fork will be done; this is good for debugging purposes.

Next, use $pm->start to do the fork. $pm returns 0 for the child process, and child pid for the parent process (see also fork() in perlfunc (1p)). The and next skips the internal loop in the parent process. NOTE: $pm->start dies if the fork fails.

$pm->finish terminates the child process (assuming a fork was done in the start).

NOTE: You cannot use $pm->start if you are already in the child process. If you want to manage another set of subprocesses in the child process, you must instantiate another Parallel::ForkManager object!

METHODS

The comment letter indicates where the method should be run. P for parent, C for child.

new $processes
Instantiate a new Parallel::ForkManager object. You must specify the maximum number of children to fork off. If you specify 0 (zero), then no children will be forked. This is intended for debugging purposes. The optional second parameter, $tempdir, is only used if you want the children to send back a reference to some data (see RETRIEVING DATASTRUCTURES below). If not provided, it is set via a call to File::Temp::tempdir(). The new method will die if the temporary directory does not exist or it is not a directory. Since version 2.00, the constructor can also be called in the typical Moo/Moose fashion. I.e. my $fm = Parallel::ForkManager->new( max_procs => 4, tempdir => …, child_role => Parallel::ForkManager::CustomChild, );

child_role
Returns the name of the role consumed by the ForkManager object in child processes. Defaults to Parallel::ForkManager::Child and can be set to something else via the constructor.

start [ $process_identifier ]
This method does the fork. It returns the pid of the child process for the parent, and 0 for the child process. If the $processes parameter for the constructor is 0 then, assuming you’re in the child process, $pm->start simply returns 0. An optional $process_identifier can be provided to this method… It is used by the run_on_finish callback (see CALLBACKS) for identifying the finished process.

start_child [ $process_identifier, ] \callback
Like start, but will run the &callback as the child. If the callback returns anything, it’ll be passed as the data to transmit back to the parent process via finish().

finish [ $exit_code [, $data_structure_reference] ]
Closes the child process by exiting and accepts an optional exit code (default exit code is 0) which can be retrieved in the parent via callback. If the second optional parameter is provided, the child attempts to send its contents back to the parent. If you use the program in debug mode ($processes == 0), this method just calls the callback. If the $data_structure_reference is provided, then it is serialized and passed to the parent process. See RETRIEVING DATASTRUCTURES for more info.

set_max_procs $processes
Allows you to set a new maximum number of children to maintain.

wait_all_children
You can call this method to wait for all the processes which have been forked. This is a blocking wait.

reap_finished_children
This is a non-blocking call to reap children and execute callbacks independent of calls to start or wait_all_children. Use this in scenarios where start is called infrequently but you would like the callbacks executed quickly.

is_parent
Returns true if within the parent or false if within the child.

is_child
Returns true if within the child or false if within the parent.

max_procs
Returns the maximal number of processes the object will fork.

running_procs
Returns the pids of the forked processes currently monitored by the Parallel::ForkManager. Note that children are still reported as running until the fork manager harvest them, via the next call to start or wait_all_children. my @pids = $pm->running_procs; my $nbr_children =- $pm->running_procs;

wait_for_available_procs( $n )
Wait until $n available process slots are available. If $n is not given, defaults to 1.

waitpid_blocking_sleep
Returns the sleep period, in seconds, of the pseudo-blocking calls. The sleep period can be a fraction of second. Returns 0 if disabled. Defaults to 1 second. See BLOCKING CALLS for more details.

set_waitpid_blocking_sleep $seconds
Sets the the sleep period, in seconds, of the pseudo-blocking calls. Set to 0 to disable. See BLOCKING CALLS for more details.

CALLBACKS

You can define callbacks in the code, which are called on events like starting a process or upon finish. Declare these before the first call to start().

The callbacks can be defined with the following methods:

run_on_finish $code [, $pid ]
You can define a subroutine which is called when a child is terminated. It is called in the parent process. The parameters of the $code are the following: - pid of the process, which is terminated - exit code of the program - identification of the process (if provided in the “start” method) - exit signal (0-127: signal name) - core dump (1 if there was core dump at exit) - datastructure reference or undef (see RETRIEVING DATASTRUCTURES)

run_on_start $code
You can define a subroutine which is called when a child is started. It called after the successful startup of a child in the parent process. The parameters of the $code are the following: - pid of the process which has been started - identification of the process (if provided in the “start” method)

run_on_wait $code, [$period]
You can define a subroutine which is called when the child process needs to wait for the startup. If $period is not defined, then one call is done per child. If $period is defined, then $code is called periodically and the module waits for $period seconds between the two calls. Note, $period can be fractional number also. The exact $period seconds is not guaranteed, signals can shorten and the process scheduler can make it longer (on busy systems). The $code called in the start and the wait_all_children method also. No parameters are passed to the $code on the call.

BLOCKING CALLS

When it comes to waiting for child processes to terminate, Parallel::ForkManager is between a fork and a hard place (if you excuse the terrible pun). The underlying Perl waitpid function that the module relies on can block until either one specific or any child process terminate, but not for a process part of a given group.

This means that the module can do one of two things when it waits for one of its child processes to terminate:

Only wait for its own child processes
This is done via a loop using a waitpid non-blocking call and a sleep statement. The code does something along the lines of while(1) { if ( any of the P::FM child process terminated ) { return its pid } sleep $sleep_period } This is the default behavior that the module will use. This is not the most efficient way to wait for child processes, but it’s the safest way to ensure that Parallel::ForkManager won’t interfere with any other part of the codebase. The sleep period is set via the method set_waitpid_blocking_sleep.

Block until any process terminate
Alternatively, Parallel::ForkManager can call waitpid such that it will block until any child process terminate. If the child process was not one of the monitored subprocesses, the wait will resume. This is more efficient, but mean that P::FM can captures (and discards) the termination notification that a different part of the code might be waiting for. If this is a race condition that doesn’t apply to your codebase, you can set the waitpid_blocking_sleep period to 0, which will enable waitpid call blocking. my $pm = Parallel::ForkManager->new( 4 ); $pm->set_waitpid_blocking_sleep(0); # true blocking calls enabled for ( 1..100 ) { $pm->start and next; …; # do work $pm->finish; }

RETRIEVING DATASTRUCTURES from child processes

The ability for the parent to retrieve data structures is new as of version 0.7.6.

Each child process may optionally send 1 data structure back to the parent. By data structure, we mean a reference to a string, hash or array. The contents of the data structure are written out to temporary files on disc using the Storable modules’ store() method. The reference is then retrieved from within the code you send to the run_on_finish callback.

The data structure can be any scalar perl data structure which makes sense: string, numeric value or a reference to an array, hash or object.

There are 2 steps involved in retrieving data structures:

1) A reference to the data structure the child wishes to send back to the parent is provided as the second argument to the finish() call. It is up to the child to decide whether or not to send anything back to the parent.

2) The data structure reference is retrieved using the callback provided in the run_on_finish() method.

Keep in mind that data structure retrieval is not the same as returning a data structure from a method call. That is not what actually occurs. The data structure referenced in a given child process is serialized and written out to a file by Storable. The file is subsequently read back into memory and a new data structure belonging to the parent process is created. Please consider the performance penalty it can imply, so try to keep the returned structure small.

EXAMPLES

Parallel get

This small example can be used to get URLs in parallel.

use Parallel::ForkManager; use LWP::Simple; my $pm = Parallel::ForkManager->new(10); LINKS: for my $link (@ARGV) { $pm->start and next LINKS; my ($fn) = $link =~ /^.*(.*?)$/; if (!$fn) { warn “Cannot determine filename from $fn “; } else { $0 .= " " . $fn; print “Getting $fn from $link “; my $rc = getstore($link, $fn); print “$link downloaded. response code: $rc “; }; $pm->finish; };

Callbacks

Example of a program using callbacks to get child exit codes:

use strict; use Parallel::ForkManager; my $max_procs = 5; my @names = qw( Fred Jim Lily Steve Jessica Bob Dave Christine Rico Sara ); # hash to resolve PIDs back to child specific information my $pm = Parallel::ForkManager->new($max_procs); # Setup a callback for when a child finishes up so we can # get its exit code $pm->run_on_finish( sub { my ($pid, $exit_code, $ident) = @_; print “** $ident just got out of the pool “. “with PID $pid and exit code: $exit_code “; }); $pm->run_on_start( sub { my ($pid, $ident)=@_; print “** $ident started, pid: $pid “; }); $pm->run_on_wait( sub { print “** Have to wait for one children … " }, 0.5 ); NAMES: foreach my $child ( 0 .. $#names ) { my $pid = $pm->start($names[$child]) and next NAMES; # This code is the child process print “This is $names[$child], Child number $child “; sleep ( 2 * $child ); print “$names[$child], Child $child is about to get out… “; sleep 1; $pm->finish($child); # pass an exit code to finish } print “Waiting for Children… “; $pm->wait_all_children; print “Everybody is out of the pool! “;

Data structure retrieval

In this simple example, each child sends back a string reference.

use Parallel::ForkManager 0.7.6; use strict; my $pm = Parallel::ForkManager->new(2, /server/path/to/temp/dir/); # data structure retrieval and handling $pm -> run_on_finish ( # called BEFORE the first call to start() sub { my ($pid, $exit_code, $ident, $exit_signal, $core_dump, $data_structure_reference) = @_; # retrieve data structure from child if (defined($data_structure_reference)) { # children are not forced to send anything my $string = ${$data_structure_reference}; # child passed a string reference print “$string “; } else { # problems occurring during storage or retrieval will throw a warning print qq|No message received from child process $pid! |; } } ); # prep random statement components my @foods = (chocolate, ice cream, peanut butter, pickles, pizza, bacon, pancakes, spaghetti, cookies); my @preferences = (loves, q|cant stand|, always wants more, will walk 100 miles for, only eats, would starve rather than eat); # run the parallel processes PERSONS: foreach my $person (qw(Fred Wilma Ernie Bert Lucy Ethel Curly Moe Larry)) { $pm->start() and next PERSONS; # generate a random statement about food preferences my $statement = $person . . $preferences[int(rand @preferences)] . . $foods[int(rand @foods)]; # send it back to the parent process $pm->finish(0, \statement); # note that its a scalar REFERENCE, not the scalar itself } $pm->wait_all_children;

A second datastructure retrieval example demonstrates how children decide whether or not to send anything back, what to send and how the parent should process whatever is retrieved.

use Parallel::ForkManager 0.7.6; use Data::Dumper; # to display the data structures retrieved. use strict; my $pm = Parallel::ForkManager->new(20); # using the system temp dir $L<File::Temp::tempdir() # data structure retrieval and handling my %retrieved_responses = (); # for collecting responses $pm -> run_on_finish ( sub { my ($pid, $exit_code, $ident, $exit_signal, $core_dump, $data_structure_reference) = @_; # see what the child sent us, if anything if (defined($data_structure_reference)) { # test rather than assume child sent anything my $reftype = ref($data_structure_reference); print qq|ident “$ident” returned a “$reftype” reference.

|; if (1) { # simple on/off switch to display the contents print &Dumper($data_structure_reference) . qq|end of “$ident” sent structure

|; } # we can also collect retrieved data structures for processing after all children have exited $retrieved_responses{$ident} = $data_structure_reference; } else { print qq|ident “$ident” did not send anything.

|; } } ); # generate a list of instructions my @instructions = ( # a unique identifier and what the child process should send {name => %ENV keys as a string, send => keys}, {name => Send Nothing}, # not instructing the child to send anything back to the parent {name => Childs %ENV, send => all}, {name => Child chooses randomly, send => random}, {name => Invalid send instructions, send => Na Na Nana Na}, {name => ENV values in an array, send => values}, ); INSTRUCTS: foreach my $instruction (@instructions) { $pm->start($instruction->{name}) and next INSTRUCTS; # this time we are using an explicit, unique child process identifier # last step in child processing $pm->finish(0) unless $instruction->{send}; # no data structure is sent unless this child is told what to send. if ($instruction->{send} eq keys) { $pm->finish(0, \join(, , keys %ENV)); } elsif ($instruction->{send} eq values) { $pm->finish(0, [values %ENV]); # kinda useless without knowing which keys they belong to… } elsif ($instruction->{send} eq all) { $pm->finish(0, \ENV); # remember, we are not “returning” anything, just copying the hash to disc # demonstrate clearly that the child determines what type of reference to send } elsif ($instruction->{send} eq random) { my $string = q|Im just a string.|; my @array = qw(I am an array); my %hash = (type => associative array, synonym => hash, cool => very :)); my $return_choice = (string, array, hash)[int(rand 3)]; # randomly choose return data type $pm->finish(0, \string) if ($return_choice eq string); $pm->finish(0, \array) if ($return_choice eq array); $pm->finish(0, \hash) if ($return_choice eq hash); # as a responsible child, inform parent that their instruction was invalid } else { $pm->finish(0, \qq|Invalid instructions: “$instruction->{send}”.|); # ordinarily I wouldnt include invalid input in a response… } } $pm->wait_all_children; # blocks until all forked processes have exited # post fork processing of returned data structures for (sort keys %retrieved_responses) { print qq|Post processing “$_”… |; }

USING RAND() IN FORKED PROCESSES

A caveat worth noting is that all forked processes will use the same random seed, so potentially providing the same results (see <http://blogs.perl.org/users/brian_phillips/2010/06/when-rand-isnt-random.html>). If you are using rand() and want each forked child to use a different seed, you can add the following to your program:

$pm->run_on_start(sub { srand });

EXTENDING

As of version 2.0.0, Parallel::ForkManager uses Moo under the hood. When a process is being forked from the parent object, the forked instance of the object will be modified to consume the Parallel::ForkManager::Child role. All of this makes extending Parallel::ForkManager to implement any storing/retrieving mechanism or any other behavior fairly easy.

Example: store and retrieve data via a web service

{ package Parallel::ForkManager::Web; use HTTP::Tiny; use Moo; extends Parallel::ForkManager; has ua => ( is => ro, lazy => 1, default => sub { HTTP::Tiny->new; } ); sub store { my( $self, $data ) = @_; $self->ua->post( “http://…/store/$$”, { body => $data } ); } sub retrieve { my( $self, $kid_id ) = @_; $self->ua->get( “http://…/store/$kid_id” )->{content}; } } my $fm = Parallel::ForkManager::Web->new(2); $fm->run_on_finish(sub{ my $retrieved = $_[5]; print “got “, $retrieved, " “; }); $fm->start_child(sub { return $_**2; }) for 1..3; $fm->wait_all_children;

Example: have the child processes exit differently

use Parallel::ForkManager; package Parallel::ForkManager::Child::PosixExit { use Moo::Role; with Parallel::ForkManager::Child; sub finish { POSIX::_exit() }; } my $fm = Parallel::ForkManager->new( max_proc => 1, child_role => Parallel::ForkManager::Child::PosixExit );

SECURITY

Parallel::ForkManager uses temporary files when a child process returns information to its parent process. The filenames are based on the process of the parent and child processes, so they are fairly easy to guess. So if security is a concern in your environment, make sure the directory used by Parallel::ForkManager is restricted to the current user only (the default behavior is to create a directory, via File::Temp’s tempdir, which does that).

TROUBLESHOOTING

PerlIO::gzip and Parallel::ForkManager do not play nice together

If you are using PerlIO::gzip in your child processes, you may end up with garbled files. This is not really P::FM’s fault, but rather a problem between PerlIO::gzip and fork() (see <https://rt.cpan.org/Public/Bug/Display.html?id=114557>).

Fortunately, it seems there is an easy way to fix the problem by adding the unix layer? I.e.,

open(IN, <:unix:gzip, …

BUGS AND LIMITATIONS

Do not use Parallel::ForkManager in an environment where other child processes can affect the run of the main program; using this module is not recommended in an environment where fork() / wait() is already used.

If you want to use more than one copies of the Parallel::ForkManager, then you have to make sure that all children processes are terminated, before you use the second object in the main program.

You are free to use a new copy of Parallel::ForkManager in the child processes, although I don’t think it makes sense.

CREDITS

Michael Gang (bug report) Noah Robin <[email protected]> (documentation tweaks) Chuck Hirstius <[email protected]> (callback exit status, example) Grant Hopwood <[email protected]> (win32 port) Mark Southern <[email protected]> (bugfix) Ken Clarke <www.perlprogrammer.net> (datastructure retrieval)

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2018, 2016, 2015 by Balázs Szabó.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

239 - Linux cli command zip_source_file

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_file and provides detailed information about the command zip_source_file, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_file.

libzip (-lzip)

The functions

and

create a zip source from a file. They open

and read

bytes from offset

from it. If

is 0 or -1, the whole file (starting from

is used.

If the file supports seek, the source can be used to open a zip archive from.

The file is opened and read when the data from the source is used, usually by

or

Upon successful completion, the created source is returned. Otherwise,

is returned and the error code in

or

is set to indicate the error.

and

fail if:

or

are invalid.

Required memory could not be allocated.

Opening

failed.

and

were added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

240 - Linux cli command gmtime

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gmtime and provides detailed information about the command gmtime, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gmtime.

NAME 🖥️ gmtime 🖥️

transform date and time to broken-down time or ASCII

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <time.h>
char *asctime(const struct tm *tm);
char *asctime_r(const struct tm *restrict tm,
 char buf[restrict 26]);
char *ctime(const time_t *timep);
char *ctime_r(const time_t *restrict timep,
 char buf[restrict 26]);
struct tm *gmtime(const time_t *timep);
struct tm *gmtime_r(const time_t *restrict timep,
 struct tm *restrict result);
struct tm *localtime(const time_t *timep);
struct tm *localtime_r(const time_t *restrict timep,
 struct tm *restrict result);
time_t mktime(struct tm *tm);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

asctime_r(), ctime_r(), gmtime_r(), localtime_r():

    _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The ctime(), gmtime(), and localtime() functions all take an argument of data type time_t, which represents calendar time. When interpreted as an absolute time value, it represents the number of seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).

The asctime() and mktime() functions both take an argument representing broken-down time, which is a representation separated into year, month, day, and so on.

Broken-down time is stored in the structure tm, described in tm(3type).

The call ctime(t) is equivalent to asctime(localtime(t)). It converts the calendar time t into a null-terminated string of the form

"Wed Jun 30 21:49:08 1993

"

The abbreviations for the days of the week are “Sun”, “Mon”, “Tue”, “Wed”, “Thu”, “Fri”, and “Sat”. The abbreviations for the months are “Jan”, “Feb”, “Mar”, “Apr”, “May”, “Jun”, “Jul”, “Aug”, “Sep”, “Oct”, “Nov”, and “Dec”. The return value points to a statically allocated string which might be overwritten by subsequent calls to any of the date and time functions. The function also sets the external variables tzname, timezone, and daylight (see tzset(3)) with information about the current timezone. The reentrant version ctime_r() does the same, but stores the string in a user-supplied buffer which should have room for at least 26 bytes. It need not set tzname, timezone, and daylight.

The gmtime() function converts the calendar time timep to broken-down time representation, expressed in Coordinated Universal Time (UTC). It may return NULL when the year does not fit into an integer. The return value points to a statically allocated struct which might be overwritten by subsequent calls to any of the date and time functions. The gmtime_r() function does the same, but stores the data in a user-supplied struct.

The localtime() function converts the calendar time timep to broken-down time representation, expressed relative to the user’s specified timezone. The function acts as if it called tzset(3) and sets the external variables tzname with information about the current timezone, timezone with the difference between Coordinated Universal Time (UTC) and local standard time in seconds, and daylight to a nonzero value if daylight savings time rules apply during some part of the year. The return value points to a statically allocated struct which might be overwritten by subsequent calls to any of the date and time functions. The localtime_r() function does the same, but stores the data in a user-supplied struct. It need not set tzname, timezone, and daylight.

The asctime() function converts the broken-down time value tm into a null-terminated string with the same format as ctime(). The return value points to a statically allocated string which might be overwritten by subsequent calls to any of the date and time functions. The asctime_r() function does the same, but stores the string in a user-supplied buffer which should have room for at least 26 bytes.

The mktime() function converts a broken-down time structure, expressed as local time, to calendar time representation. The function ignores the values supplied by the caller in the tm_wday and tm_yday fields. The value specified in the tm_isdst field informs mktime() whether or not daylight saving time (DST) is in effect for the time supplied in the tm structure: a positive value means DST is in effect; zero means that DST is not in effect; and a negative value means that mktime() should (use timezone information and system databases to) attempt to determine whether DST is in effect at the specified time.

The mktime() function modifies the fields of the tm structure as follows: tm_wday and tm_yday are set to values determined from the contents of the other fields; if structure members are outside their valid interval, they will be normalized (so that, for example, 40 October is changed into 9 November); tm_isdst is set (regardless of its initial value) to a positive value or to 0, respectively, to indicate whether DST is or is not in effect at the specified time. Calling mktime() also sets the external variable tzname with information about the current timezone.

If the specified broken-down time cannot be represented as calendar time (seconds since the Epoch), mktime() returns (time_t) -1 and does not alter the members of the broken-down time structure.

RETURN VALUE

On success, gmtime() and localtime() return a pointer to a struct tm.

On success, gmtime_r() and localtime_r() return the address of the structure pointed to by result.

On success, asctime() and ctime() return a pointer to a string.

On success, asctime_r() and ctime_r() return a pointer to the string pointed to by buf.

On success, mktime() returns the calendar time (seconds since the Epoch), expressed as a value of type time_t.

On error, mktime() returns the value (time_t) -1. The remaining functions return NULL on error. On error, errno is set to indicate the error.

ERRORS

EOVERFLOW
The result cannot be represented.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

asctime()

Thread safety

MT-Unsafe race:asctime locale

asctime_r()

Thread safety

MT-Safe locale

ctime()

Thread safety

MT-Unsafe race:tmbuf race:asctime env locale

ctime_r(), gmtime_r(), localtime_r(), mktime()

Thread safety

MT-Safe env locale

gmtime(), localtime()

Thread safety

MT-Unsafe race:tmbuf env locale

VERSIONS

POSIX doesn’t specify the parameters of ctime_r() to be restrict; that is specific to glibc.

In many implementations, including glibc, a 0 in tm_mday is interpreted as meaning the last day of the preceding month.

According to POSIX.1-2001, localtime() is required to behave as though tzset(3) was called, while localtime_r() does not have this requirement. For portable code, tzset(3) should be called before localtime_r().

STANDARDS

asctime()
ctime()
gmtime()
localtime()
mktime()
C11, POSIX.1-2008.

asctime_r()
ctime_r()
gmtime_r()
localtime_r()
POSIX.1-2008.

HISTORY

gmtime()
localtime()
mktime()
C89, POSIX.1-2001.

asctime()
ctime()
C89, POSIX.1-2001. Marked obsolete in POSIX.1-2008 (recommending strftime(3)).

gmtime_r()
localtime_r()
POSIX.1-2001.

asctime_r()
ctime_r()
POSIX.1-2001. Marked obsolete in POSIX.1-2008 (recommending strftime(3)).

NOTES

The four functions asctime(), ctime(), gmtime(), and localtime() return a pointer to static data and hence are not thread-safe. The thread-safe versions, asctime_r(), ctime_r(), gmtime_r(), and localtime_r(), are specified by SUSv2.

POSIX.1-2001 says: “The asctime(), ctime(), gmtime(), and localtime() functions shall return values in one of two static objects: a broken-down time structure and an array of type char. Execution of any of the functions may overwrite the information returned in either of these objects by any of the other functions.” This can occur in the glibc implementation.

SEE ALSO

date(1), gettimeofday(2), time(2), utime(2), clock(3), difftime(3), strftime(3), strptime(3), timegm(3), tzset(3), time(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

241 - Linux cli command Image_ExifTool_PNGpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_PNGpm and provides detailed information about the command Image_ExifTool_PNGpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_PNGpm.

NAME 🖥️ Image_ExifTool_PNGpm 🖥️

Read and write PNG meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to read and write PNG (Portable Network Graphics), MNG (Multi-image Network Graphics) and JNG (JPEG Network Graphics) images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.libpng.org/pub/png/spec/1.2/>

<http://www.faqs.org/docs/png/>

<http://www.libpng.org/pub/mng/>

<http://www.libpng.org/pub/png/spec/register/>

SEE ALSO

“PNG Tags” in Image::ExifTool::TagNames, “MNG Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

242 - Linux cli command HUGE_VALF

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HUGE_VALF and provides detailed information about the command HUGE_VALF, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HUGE_VALF.

NAME 🖥️ HUGE_VALF 🖥️

floating-point constants

LIBRARY

Math library (libm)

SYNOPSIS

#define _ISOC99_SOURCE /* See feature_test_macros(7) */
#include <math.h>
INFINITY
NAN
HUGE_VAL
HUGE_VALF
HUGE_VALL

DESCRIPTION

The macro INFINITY expands to a float constant representing positive infinity.

The macro NAN expands to a float constant representing a quiet NaN (when supported). A quiet NaN is a NaN (“not-a-number”) that does not raise exceptions when it is used in arithmetic. The opposite is a signaling NaN. See IEC 60559:1989.

The macros HUGE_VAL, HUGE_VALF, HUGE_VALL expand to constants of types double, float, and long double, respectively, that represent a large positive value, possibly positive infinity.

STANDARDS

C11.

HISTORY

C99.

On a glibc system, the macro HUGE_VAL is always available. Availability of the NAN macro can be tested using #ifdef NAN, and similarly for INFINITY, HUGE_VALF, HUGE_VALL. They will be defined by <math.h> if _ISOC99_SOURCE or _GNU_SOURCE is defined, or __STDC_VERSION__ is defined and has a value not less than 199901L.

SEE ALSO

fpclassify(3), math_error(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

243 - Linux cli command Tk_NoteBookpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_NoteBookpm and provides detailed information about the command Tk_NoteBookpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_NoteBookpm.

NAME 🖥️ Tk_NoteBookpm 🖥️

display several windows in limited space with notebook metaphor.

SYNOPSIS

use Tk::NoteBook; … $w = $frame->NoteBook(); $page1 = $w->add(“page1”, options); $page2 = $w->add(“page2”, options); … $page2 = $w->add(“page2”, options);

DESCRIPTION

The NoteBook widget provides a notebook metaphor to display several windows in limited space. The notebook is divided into a stack of pages of which only one is displayed at any time. The other pages can be selected by means of choosing the visual “tabs” at the top of the widget. Additionally, the <Tab> key may be used to traverse the pages. If -underline is used, Alt- bindings will also work.

The widget takes all the options that a Frame does. In addition, it supports the following options:

-dynamicgeometry
If set to false (default and recommended), the size of the NoteBook will match the size of the largest page. Otherwise the size will match the size of the current page causing the NoteBook to change size when different pages of different sizes are selected.

-ipadx
The amount of internal horizontal padding around the pages.

-ipady
The amount of internal vertical padding around the pages.

-backpagecolor
The background color of the tabs and back page.

-disabledforeground
XXX

-focuscolor
The color of the focus border around the tabs.

-font
The font of the tab labels.

-inactivebackground
XXX

-tabpadx
Horizonzal padding around the tab label.

-tabpady
Vertical padding around the tab label.

METHODS

The following methods may be used with a NoteBook object in addition to standard methods.

add(pageName, options)
Adds a page with name pageName to the notebook. Returns an object of type Frame. The recognized options are:

-anchor
Specifies how the information in a tab is to be displayed. Must be one of n, ne, e, se, s, sw, w, nw or center.

-bitmap
Specifies a bitmap to display on the tab of this page. The bitmap is displayed only if none of the -label or -image options are specified.

-image
Specifies an image to display on the tab of this page. The image is displayed only if the -label option is not specified.

-label
Specifies the text string to display on the tab of this page.

-justify
When there are multiple lines of text displayed in a tab, this option determines the justification of the lines.

-createcmd
Specifies a callback to be called the first time the page is shown on the screen. This option can be used to delay the creation of the contents of a page until necessary. It can be useful in situations where there are a large number of pages in a NoteBook widget; with -createcmd you do not have to make the user wait until all pages are constructed before displaying the first page.

-raisecmd
Specifies a callback to be called whenever this page is raised by the user.

-state
Specifies whether this page can be raised by the user. Must be either normal or disabled.

-underline
Specifies the integer index of a character to underline in the tab. This option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of text displayed on the widget, 1 to the next character and so on.

-wraplength
This option specifies the maximum line length of the label string on this tab. If the line length of the label string exceeds this length, then it is wrapped onto the next line so that no line is longer than the specified length. The value may be specified in any standard forms for screen distances. If this value is less than or equal to 0, then no wrapping is done: lines will break only at newline characters in the text.

delete(pageName)
Deletes the page identified by pageName.

pagecget(pageName, -option)
Returns the current value of the configuration option given by -option in the page given by pageName. Option may have any of the values accepted in the add method.

pageconfigure(pageName, options)
Like configure for the page indicated by pageName. Options may be any of the options accepted by the add method.

pages
Returns a list consisting of the names of all currently defined pages, i.e., those created with the add method.

page_widget(pageName)
Returns the page with name pageName.

raise(pageName)
Raise the page identified by pageName.

raised()
Returns the name of the currently raised page.

geometryinfo
Return the dimensions of the tab area.

identify(x,y)
Identify the tab’s page name under the specified coordinates. Return an empty string if there’s no tab.

info(“pages”)
Return a list of all pages.

info(“focus”)
Return the page name of the tab with the current focus.

info(“focusnext”)
Return the page name of the tab which would receive the next focus.

info(“focusprev”)
Return the page name of the tab which had the previous focus.

info(“active”)
Return the page name of the active tab.

BUGS

The options -width and -height do not work.

AUTHORS

Rajappa Iyer <[email protected]> Nick Ing-Simmons <[email protected]>

This code and documentation was derived from NoteBook.tcl in Tix4.0 written by Ioi Lam. It may be distributed under the same conditions as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

244 - Linux cli command mode_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mode_ttype and provides detailed information about the command mode_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mode_ttype.

NAME 🖥️ mode_ttype 🖥️

file attributes

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/types.h>
typedef /* ... */ mode_t;

DESCRIPTION

Used for some file attributes (e.g., file mode). It is an integer type.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

The following headers also provide this type: <fcntl.h>, <ndbm.h>, <spawn.h>, <sys/ipc.h>, <sys/mman.h>, and <sys/stat.h>.

SEE ALSO

chmod(2), mkdir(2), open(2), umask(2), stat(3type)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

245 - Linux cli command Net_DNS_Resolver_cygwinpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_Resolver_cygwinpm and provides detailed information about the command Net_DNS_Resolver_cygwinpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_Resolver_cygwinpm.

NAME 🖥️ Net_DNS_Resolver_cygwinpm 🖥️

Cygwin resolver class

SYNOPSIS

use Net::DNS::Resolver;

DESCRIPTION

This class implements the OS specific portions of Net::DNS::Resolver.

No user serviceable parts inside, see Net::DNS::Resolver for all your resolving needs.

COPYRIGHT

Copyright (c)2003 Sidney Markowitz.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl, Net::DNS, Net::DNS::Resolver

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

246 - Linux cli command pcap_dump_closepcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_dump_closepcap and provides detailed information about the command pcap_dump_closepcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_dump_closepcap.

NAME 🖥️ pcap_dump_closepcap 🖥️

close a savefile being written to

SYNOPSIS

#include <pcap/pcap.h>
void pcap_dump_close(pcap_dumper_t *p);

DESCRIPTION

pcap_dump_close() closes the ``savefile.''

SEE ALSO

pcap(3PCAP), pcap_dump_open(3PCAP), pcap_dump(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

247 - Linux cli command Pod_Selectpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Pod_Selectpm and provides detailed information about the command Pod_Selectpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Pod_Selectpm.

NAME 🖥️ Pod_Selectpm 🖥️

extract selected sections of POD from input

SYNOPSIS

use Pod::Select; ## Select all the POD sections for each file in @filelist ## and print the result on standard output. podselect(@filelist); ## Same as above, but write to tmp.out podselect({-output => “tmp.out”}, @filelist): ## Select from the given filelist, only those POD sections that are ## within a 1st level section named any of: NAME, SYNOPSIS, OPTIONS. podselect({-sections => [“NAME|SYNOPSIS”, “OPTIONS”]}, @filelist): ## Select the “DESCRIPTION” section of the PODs from STDIN and write ## the result to STDERR. podselect({-output => “>&STDERR”, -sections => [“DESCRIPTION”]}, \STDIN);

or

use Pod::Select; ## Create a parser object for selecting POD sections from the input $parser = new Pod::Select(); ## Select all the POD sections for each file in @filelist ## and print the result to tmp.out. $parser->parse_from_file("<&STDIN", “tmp.out”); ## Select from the given filelist, only those POD sections that are ## within a 1st level section named any of: NAME, SYNOPSIS, OPTIONS. $parser->select(“NAME|SYNOPSIS”, “OPTIONS”); for (@filelist) { $parser->parse_from_file($_); } ## Select the “DESCRIPTION” and “SEE ALSO” sections of the PODs from ## STDIN and write the result to STDERR. $parser->select(“DESCRIPTION”); $parser->add_selection(“SEE ALSO”); $parser->parse_from_filehandle(\STDIN, \STDERR);

REQUIRES

perl5.005, Pod::Parser, Exporter, Carp

EXPORTS

podselect()

DESCRIPTION

NOTE: This module is considered legacy; modern Perl releases (5.31.1 and higher) are going to remove Pod-Parser from core and use Pod::Simple for all things POD.

podselect() is a function which will extract specified sections of pod documentation from an input stream. This ability is provided by the Pod::Select module which is a subclass of Pod::Parser. Pod::Select provides a method named select() to specify the set of POD sections to select for processing/printing. podselect() merely creates a Pod::Select object and then invokes the podselect() followed by parse_from_file().

SECTION SPECIFICATIONS

podselect() and Pod::Select::select() may be given one or more “section specifications” to restrict the text processed to only the desired set of sections and their corresponding subsections. A section specification is a string containing one or more Perl-style regular expressions separated by forward slashes ("/"). If you need to use a forward slash literally within a section title you can escape it with a backslash ("").

The formal syntax of a section specification is:

  • head1-title-regex/head2-title-regex/…

Any omitted or empty regular expressions will default to “.*”. Please note that each regular expression given is implicitly anchored by adding “^” and “$” to the beginning and end. Also, if a given regular expression starts with a “!” character, then the expression is negated (so !foo would match anything except foo).

Some example section specifications follow.

  • Match the NAME and SYNOPSIS sections and all of their subsections: NAME|SYNOPSIS

  • Match only the Question and Answer subsections of the DESCRIPTION section: DESCRIPTION/Question|Answer

  • Match the Comments subsection of all sections: /Comments

  • Match all subsections of DESCRIPTION except for Comments: DESCRIPTION/!Comments

  • Match the DESCRIPTION section but do not match any of its subsections: DESCRIPTION/!.+

  • Match all top level sections but none of their subsections: /!.+

OBJECT METHODS

The following methods are provided in this module. Each one takes a reference to the object itself as an implicit first parameter.

curr_headings()

($head1, $head2, $head3, …) = $parser->curr_headings(); $head1 = $parser->curr_headings(1);

This method returns a list of the currently active section headings and subheadings in the document being parsed. The list of headings returned corresponds to the most recently parsed paragraph of the input.

If an argument is given, it must correspond to the desired section heading number, in which case only the specified section heading is returned. If there is no current section heading at the specified level, then undef is returned.

select()

$parser->select($section_spec1,$section_spec2,…);

This method is used to select the particular sections and subsections of POD documentation that are to be printed and/or processed. The existing set of selected sections is replaced with the given set of sections. See add_selection() for adding to the current set of selected sections.

Each of the $section_spec arguments should be a section specification as described in “SECTION SPECIFICATIONS”. The section specifications are parsed by this method and the resulting regular expressions are stored in the invoking object.

If no $section_spec arguments are given, then the existing set of selected sections is cleared out (which means all sections will be processed).

This method should not normally be overridden by subclasses.

add_selection()

$parser->add_selection($section_spec1,$section_spec2,…);

This method is used to add to the currently selected sections and subsections of POD documentation that are to be printed and/or processed. See <select()> for replacing the currently selected sections.

Each of the $section_spec arguments should be a section specification as described in “SECTION SPECIFICATIONS”. The section specifications are parsed by this method and the resulting regular expressions are stored in the invoking object.

This method should not normally be overridden by subclasses.

clear_selections()

$parser->clear_selections();

This method takes no arguments, it has the exact same effect as invoking <select()> with no arguments.

match_section()

$boolean = $parser->match_section($heading1,$heading2,…);

Returns a value of true if the given section and subsection heading titles match any of the currently selected section specifications in effect from prior calls to select() and add_selection() (or if there are no explicitly selected/deselected sections).

The arguments $heading1, $heading2, etc. are the heading titles of the corresponding sections, subsections, etc. to try and match. If $headingN is omitted then it defaults to the current corresponding section heading title in the input.

This method should not normally be overridden by subclasses.

is_selected()

$boolean = $parser->is_selected($paragraph);

This method is used to determine if the block of text given in $paragraph falls within the currently selected set of POD sections and subsections to be printed or processed. This method is also responsible for keeping track of the current input section and subsections. It is assumed that $paragraph is the most recently read (but not yet processed) input paragraph.

The value returned will be true if the $paragraph and the rest of the text in the same section as $paragraph should be selected (included) for processing; otherwise a false value is returned.

EXPORTED FUNCTIONS

The following functions are exported by this module. Please note that these are functions (not methods) and therefore do not take an implicit first argument.

podselect()

podselect(\options,@filelist);

podselect will print the raw (untranslated) POD paragraphs of all POD sections in the given input files specified by @filelist according to the options given in \%options.

If any argument to podselect is a reference to a hash (associative array) then the values with the following keys are processed as follows:

-output
A string corresponding to the desired output file (or “>&STDOUT” or “>&STDERR”), or a filehandle to write on. The default is to use standard output.

-sections
A reference to an array of sections specifications (as described in “SECTION SPECIFICATIONS”) which indicate the desired set of POD sections and subsections to be selected from input. If no section specifications are given, then all sections of the PODs are used.

All other arguments are optional and should correspond to filehandles to read from or the names of input files containing POD sections. A file name of “”, “-” or “<&STDIN” will be interpreted to mean standard input (which is the default if no arguments are given).

PRIVATE METHODS AND DATA

Pod::Select makes uses a number of internal methods and data fields which clients should not need to see or use. For the sake of avoiding name collisions with client data and methods, these methods and fields are briefly discussed here. Determined hackers may obtain further information about them by reading the Pod::Select source code.

Private data fields are stored in the hash-object whose reference is returned by the new() constructor for this class. The names of all private methods and data-fields used by Pod::Select begin with a prefix of “_” and match the regular expression /^_\w+$/.

SEE ALSO

Pod::Parser

AUTHOR

Please report bugs using <http://rt.cpan.org>.

Brad Appleton <[email protected]>

Based on code for pod2text written by Tom Christiansen <[email protected]>

Pod::Select is part of the Pod::Parser distribution.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

248 - Linux cli command strtok_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strtok_r and provides detailed information about the command strtok_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strtok_r.

NAME 🖥️ strtok_r 🖥️

extract tokens from strings

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strtok(char *restrict str, const char *restrict delim);
char *strtok_r(char *restrict str, const char *restrict delim,
 char **restrict saveptr);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strtok_r():

    _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The strtok() function breaks a string into a sequence of zero or more nonempty tokens. On the first call to strtok(), the string to be parsed should be specified in str. In each subsequent call that should parse the same string, str must be NULL.

The delim argument specifies a set of bytes that delimit the tokens in the parsed string. The caller may specify different strings in delim in successive calls that parse the same string.

Each call to strtok() returns a pointer to a null-terminated string containing the next token. This string does not include the delimiting byte. If no more tokens are found, strtok() returns NULL.

A sequence of calls to strtok() that operate on the same string maintains a pointer that determines the point from which to start searching for the next token. The first call to strtok() sets this pointer to point to the first byte of the string. The start of the next token is determined by scanning forward for the next nondelimiter byte in str. If such a byte is found, it is taken as the start of the next token. If no such byte is found, then there are no more tokens, and strtok() returns NULL. (A string that is empty or that contains only delimiters will thus cause strtok() to return NULL on the first call.)

The end of each token is found by scanning forward until either the next delimiter byte is found or until the terminating null byte (‘�’) is encountered. If a delimiter byte is found, it is overwritten with a null byte to terminate the current token, and strtok() saves a pointer to the following byte; that pointer will be used as the starting point when searching for the next token. In this case, strtok() returns a pointer to the start of the found token.

From the above description, it follows that a sequence of two or more contiguous delimiter bytes in the parsed string is considered to be a single delimiter, and that delimiter bytes at the start or end of the string are ignored. Put another way: the tokens returned by strtok() are always nonempty strings. Thus, for example, given the string “aaa;;bbb,”, successive calls to strtok() that specify the delimiter string “;,” would return the strings “aaa” and “bbb”, and then a null pointer.

The strtok_r() function is a reentrant version of strtok(). The saveptr argument is a pointer to a char * variable that is used internally by strtok_r() in order to maintain context between successive calls that parse the same string.

On the first call to strtok_r(), str should point to the string to be parsed, and the value of *saveptr is ignored (but see NOTES). In subsequent calls, str should be NULL, and saveptr (and the buffer that it points to) should be unchanged since the previous call.

Different strings may be parsed concurrently using sequences of calls to strtok_r() that specify different saveptr arguments.

RETURN VALUE

The strtok() and strtok_r() functions return a pointer to the next token, or NULL if there are no more tokens.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strtok()

Thread safetyMT-Unsafe race:strtok

strtok_r()

Thread safetyMT-Safe

VERSIONS

On some implementations, *saveptr is required to be NULL on the first call to strtok_r() that is being used to parse str.

STANDARDS

strtok()
C11, POSIX.1-2008.

strtok_r()
POSIX.1-2008.

HISTORY

strtok()
POSIX.1-2001, C89, SVr4, 4.3BSD.

strtok_r()
POSIX.1-2001.

BUGS

Be cautious when using these functions. If you do use them, note that:

  • These functions modify their first argument.

  • These functions cannot be used on constant strings.

  • The identity of the delimiting byte is lost.

  • The strtok() function uses a static buffer while parsing, so it’s not thread safe. Use strtok_r() if this matters to you.

EXAMPLES

The program below uses nested loops that employ strtok_r() to break a string into a two-level hierarchy of tokens. The first command-line argument specifies the string to be parsed. The second argument specifies the delimiter byte(s) to be used to separate that string into “major” tokens. The third argument specifies the delimiter byte(s) to be used to separate the “major” tokens into subtokens.

An example of the output produced by this program is the following:

$ ./a.out 'a/bbb///cc;xxx:yyy:' ':;' '/'
1: a/bbb///cc
         --> a
         --> bbb
         --> cc
2: xxx
         --> xxx
3: yyy
         --> yyy

Program source

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int
main(int argc, char *argv[])
{
    char *str1, *str2, *token, *subtoken;
    char *saveptr1, *saveptr2;
    int j;
    if (argc != 4) {
        fprintf(stderr, "Usage: %s string delim subdelim

“, argv[0]); exit(EXIT_FAILURE); } for (j = 1, str1 = argv[1]; ; j++, str1 = NULL) { token = strtok_r(str1, argv[2], &saveptr1); if (token == NULL) break; printf("%d: %s “, j, token); for (str2 = token; ; str2 = NULL) { subtoken = strtok_r(str2, argv[3], &saveptr2); if (subtoken == NULL) break; printf(” –> %s “, subtoken); } } exit(EXIT_SUCCESS); }

Another example program using strtok() can be found in getaddrinfo_a(3).

SEE ALSO

memchr(3), strchr(3), string(3), strpbrk(3), strsep(3), strspn(3), strstr(3), wcstok(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

249 - Linux cli command XtGrabKeyboard

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGrabKeyboard and provides detailed information about the command XtGrabKeyboard, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGrabKeyboard.

NAME 🖥️ XtGrabKeyboard 🖥️

manage grabs

SYNTAX

#include <X11/Intrinsic.h>

void XtGrabKey(Widget widget, KeyCode keycode, Modifiers modifiers, Boolean owner_events, int pointer_mode, int keyboard_mode);

void XtUngrabKey(Widget widget, KeyCode keycode, Modifiers modifiers);

int XtGrabKeyboard(Widget widget, Boolean owner_events, int pointer_mode, int keyboard_mode, Time time);

void XtUngrabKeyboard(Widget widget, Time time);

void XtGrabButton(Widget widget, int button, Modifiers modifiers, Boolean owner_events, unsigned int event_mask, int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor);

void XtUngrabButton(Widget widget, unsigned button, Modifiers modifiers);

int XtGrabPointer(Widget widget, Boolean owner_events, unsigned int event_mask, int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor, Time time);

void XtUngrabPointer(Widget widget, Time time);

ARGUMENTS

widget
Specifies the widget in whose window the grab will occur. Must be of class Core or a subclass thereof.

keycode

modifiers

owner_events

pointer_mode

keyboard_mode

time

button

confine_to

cursor
Specifies arguments to the associated Xlib function call.

DESCRIPTION

XtGrabKey calls XGrabKey specifying the widget’s window as the grab window if the widget is realized. The remaining arguments are exactly as for XGrabKey. If the widget is not realized, or is later unrealized, the call to XGrabKey will be performed (again) when the widget is realized and its window becomes mapped. In the future, if XtDispatchEvent is called with a KeyPress event matching the specified keycode and modifiers (which may be AnyKey or AnyModifier, respectively) for the widget’s window, the Intrinsics will call XtUngrabKeyboard with the timestamp from the KeyPress event if either of the following conditions is true:

  • There is a modal cascade and the widget is not in the active subset of the cascade and the keyboard was not previously grabbed, or

  • XFilterEvent returns True.

XtUngrabKey calls XUngrabKey specifying the widget’s window as the ungrab window if the widget is realized. The remaining arguments are exactly as for XUngrabKey. If the widget is not realized, XtUngrabKey removes a deferred XtGrabKey request, if any, for the specified widget, keycode, and modifiers.

If the specified widget is realized XtGrabKeyboard calls XGrabKeyboard specifying the widget’s window as the grab window. The remaining arguments and return value are exactly as for XGrabKeyboard. If the widget is not realized, XtGrabKeyboard immediately returns GrabNotViewable. No future ungrab is implied by XtGrabKeyboard.

XtUngrabKeyboard calls XUngrabKeyboard with the specified time.

XtGrabButton calls XGrabButton specifying the widget’s window as the grab window if the widget is realized. The remaining arguments are exactly as for XGrabButton. If the widget is not realized, or is later unrealized, the call to XGrabButton will be performed (again) when the widget is realized and its window becomes mapped. In the future, if XtDispatchEvent is called with a ButtonPress event matching the specified button and modifiers (which may be AnyButton or AnyModifier, respectively) for the widget’s window, the Intrinsics will call XtUngrabPointer with the timestamp from the ButtonPress event if either of the following conditions is true:

  • There is a modal cascade and the widget is not in the active subset of the cascade and the pointer was not previously grabbed, or

  • XFilterEvent returns True.

XtUngrabButton calls XUngrabButton specifying the widget’s window as the ungrab window if the widget is realized. The remaining arguments are exactly as for XUngrabButton. If the widget is not realized, XtUngrabButton removes a deferred XtGrabButton request, if any, for the specified widget, button, and modifiers.

XtGrabPointer calls XGrabPointer specifying the widget’s window as the grab window. The remaining arguments and return value are exactly as for XGrabPointer. If the widget is not realized, XtGrabPointer immediately returns GrabNotViewable. No future ungrab is implied by XtGrabPointer.

XtUngrabPointer calls XUngrabPointer with the specified time.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

250 - Linux cli command __freading

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __freading and provides detailed information about the command __freading, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __freading.

NAME 🖥️ __freading 🖥️

interfaces to stdio FILE structure

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
#include <stdio_ext.h>
size_t __fbufsize(FILE *stream);
size_t __fpending(FILE *stream);
int __flbf(FILE *stream);
int __freadable(FILE *stream);
int __fwritable(FILE *stream);
int __freading(FILE *stream);
int __fwriting(FILE *stream);
int __fsetlocking(FILE *stream, int type);
void _flushlbf(void);
void __fpurge(FILE *stream);

DESCRIPTION

Solaris introduced routines to allow portable access to the internals of the FILE structure, and glibc also implemented these.

The __fbufsize() function returns the size of the buffer currently used by the given stream.

The __fpending() function returns the number of bytes in the output buffer. For wide-oriented streams the unit is wide characters. This function is undefined on buffers in reading mode, or opened read-only.

The __flbf() function returns a nonzero value if the stream is line-buffered, and zero otherwise.

The __freadable() function returns a nonzero value if the stream allows reading, and zero otherwise.

The __fwritable() function returns a nonzero value if the stream allows writing, and zero otherwise.

The __freading() function returns a nonzero value if the stream is read-only, or if the last operation on the stream was a read operation, and zero otherwise.

The __fwriting() function returns a nonzero value if the stream is write-only (or append-only), or if the last operation on the stream was a write operation, and zero otherwise.

The __fsetlocking() function can be used to select the desired type of locking on the stream. It returns the current type. The type argument can take the following three values:

FSETLOCKING_INTERNAL
Perform implicit locking around every operation on the given stream (except for the *_unlocked ones). This is the default.

FSETLOCKING_BYCALLER
The caller will take care of the locking (possibly using flockfile(3) in case there is more than one thread), and the stdio routines will not do locking until the state is reset to FSETLOCKING_INTERNAL.

FSETLOCKING_QUERY
Don’t change the type of locking. (Only return it.)

The _flushlbf() function flushes all line-buffered streams. (Presumably so that output to a terminal is forced out, say before reading keyboard input.)

The __fpurge() function discards the contents of the stream’s buffer.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

__fbufsize(), __fpending(), __fpurge(), __fsetlocking()

Thread safetyMT-Safe race:stream

__flbf(), __freadable(), __freading(), __fwritable(), __fwriting(), _flushlbf()

Thread safetyMT-Safe

SEE ALSO

flockfile(3), fpurge(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

251 - Linux cli command pcap_dump_flushpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_dump_flushpcap and provides detailed information about the command pcap_dump_flushpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_dump_flushpcap.

NAME 🖥️ pcap_dump_flushpcap 🖥️

flush to a savefile packets dumped

SYNOPSIS

#include <pcap/pcap.h>
int pcap_dump_flush(pcap_dumper_t *p);

DESCRIPTION

pcap_dump_flush() flushes the output buffer to the ``savefile,’’ so that any packets written with pcap_dump(3PCAP) but not yet written to the ``savefile’’ will be written.

RETURN VALUE

pcap_dump_flush() returns 0 on success and PCAP_ERROR on failure.

SEE ALSO

pcap(3PCAP), pcap_dump_open(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

252 - Linux cli command POD2_JA_Unicode_LineBreakpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command POD2_JA_Unicode_LineBreakpm and provides detailed information about the command POD2_JA_Unicode_LineBreakpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the POD2_JA_Unicode_LineBreakpm.

NAME 🖥️ POD2_JA_Unicode_LineBreakpm 🖥️

UAX #14 Unicode 行分割アルゴリズム

SYNOPSIS

use Unicode::LineBreak; $lb = Unicode::LineBreak->new(); $broken = $lb->break($string);

DESCRIPTION

Unicode::LineBreak は、Unicode 標準の附属書14 [UAX #14] で述べる Unicode 行分割アルゴリズムを実行する。 分割位置を決定する際に、附属書11 [UAX #11] で定義される East_Asian_Width 参考特性も考慮する。

用語

便宜的に以下の用語を使う。

強制分割〔mandatory break〕は、基本規則で定められており、周囲の文字に関係なく義務的に実行される行分割動作。 任意分割は、基本規則で認められており、ユーザが実行すると決めた場合に行われる行分割動作。 [UAX #14] で定義される任意分割には直接分割〔direct break〕と間接分割〔indirect break〕とがある。

音素文字的な文字〔alphabetic characters〕は、通常、他の文字が分割の機会を与えないかぎり、文字同士の間で行分割できない文字。 表語文字的な文字〔ideographic characters〕は、通常、その前後で行分割できる文字。 [UAX #14] では音素文字的な文字のほとんどを AL に、表語文字的な文字のほとんどを ID に分類している (これらの用語は文字学の観点からすれば不正確である)。 若干の用字系では、個々の文字からは分割位置が明確にならないため、辞書による発見的方法を用いる。

文字列の桁数は、文字列に含まれる文字の数と等しいとはかぎらない。 個々の文字は広い〔wide〕か、狭い〔narrow〕か、前進を伴わない〔nonspacing〕かのいずれかであり、各々 2 桁、1 桁、0 桁を占める。 若干の文字は、使われる文脈によって広くも狭くもなり得る。 カスタマイズによって、文字はより多様な幅を持ちうる。

PUBLIC INTERFACE

行の分割

new ([KEY => VALUE, …])
コンストラクタ。 KEY => VALUE の対については “オプション” を参照。

break (STRING)
インスタンスメソッド。 Unicode 文字列 STRING を分割し、それを返す。 配列コンテクストでは、結果の各行の配列を返す。

break_partial (STRING)
インスタンスメソッドbreak() と同じだが、文字列を少しずつ追加して入力する場合。 入力が完了したことを示すには、STRING 引数に undef を与える。

config (KEY)

config (KEY => VALUE, …)

インスタンスメソッド。 設定を取得または変更する。 KEY => VALUE の対については “オプション” を参照。

copy
コピーコンストラクタ。 オブジェクトインスタンスの複製をつくる。

情報の取得

breakingRule (BEFORESTR, AFTERSTR)
インスタンスメソッド。 文字列 BEFORESTR と AFTERSTR の間での行分割動作を得る。 返値については “定数” を参照。 : このメソッドは、行分割のおおまかな動作を表す値を返すにすぎない。 実際のテキストを行折りするには、break() 等のメソッドを使ってほしい。

context ([Charset => CHARSET], [Language => LANGUAGE])
関数。 キャラクタセット CHARSET および言語コード LANGUAGE から、それを使う言語/地域の文脈を得る。

オプション

“new”、“config” の両メソッドには以下の対を指定できる。 桁数の算出 ([E])、書記素クラスタ分節 ([G]) (Unicode::GCString~[ja] も参照)、行分割動作 ([L]) に影響するものがある。

BreakIndent => “YES” | “NO”
[L] 行頭の SPACE の並び (インデント) の後では常に分割を許す。 [UAX #14] は SPACE のこのような用法を考慮していない。 初期値は "YES": このオプションはリリース 1.011 で導入された。

CharMax => NUMBER
[L] 行に含みうる最大の文字数。行末の空白文字と改行の文字列を除く。 文字数は一般に行の長さを表さないことに注意。 初期値は 9980 にはできない。

ColMin => NUMBER
[L] 任意分割された行の、改行の文字列と行末の空白文字を含めない最小桁数。 初期値は 0

ColMax => NUMBER
[L] 行の、改行の文字列と行末の空白文字を含めない最大桁数。つまり、行の最大長。 初期値は 76

“Urgent” オプションおよび “ユーザ定義の行分割動作” も参照。

ComplexBreaking => “YES” | “NO”
[L] 東南アジアの複雑な文脈で、発見的な行折りを行う。 初期値は、東南アジアの表記体系での単語分節が有効なら "YES"

Context => CONTEXT
[E][L] 言語/地域の文脈を指定する。 現在使える文脈は "EASTASIAN""NONEASTASIAN"。 初期の文脈は "NONEASTASIAN""EASTASIAN" 文脈では、East_Asian_Width 特性が曖昧 (A) であれば「広い」文字とみなし、行分割特性が AI であれば表語文字的 (ID) とみなす。 "NONEASTASIAN" 文脈では、East_Asian_Width 特性が曖昧 (A) であれば「狭い」文字とみなし、行分割特性が AI であれば音素文字的 (AL) とみなす。

EAWidth => “[” ORD “=>” PROPERTY “]”

EAWidth => “undef”

[E] 個々の文字の East_Asian_Width 特性を手直しする。 ORD は文字の UCS インデクス値か、それらの配列への参照。 PROPERTY は East_Asian_Width 特性値か拡張値のいずれか (“定数” を参照)。 このオプションは複数回指定できる。 undef を指定すると、それまでの手直しをすべて取り消す。 初期値では、East_Asian_width 特性の手直しはしない。 “文字の特性の手直し” も参照。

Format => METHOD
[L] 分割した行を整形する方法を指定する。

“SIMPLE”
初期の方法。 任意分割の位置に改行を挿入するだけ。

“NEWLINE”
“Newline” オプションで指定したもので改行を置き換える。 改行の前とテキスト終端の空白文字を除去する。 テキスト終端に改行がなければ追加する。

“TRIM”
任意分割の位置に改行を挿入する。 改行の前の空白文字を除去する。

“undef”
なにもしない (改行の挿入も)。

サブルーチンへの参照
“行の整形” を参照。

HangulAsAL => “YES” | “NO”
[L] ハングル音節とハングル連結チャモ〔conjoining jamo〕を音素文字的な文字 (AL) と扱う。 初期値は "NO"

LBClass => “[” ORD “=>” CLASS “]”

LBClass => “undef”

[G][L] 個々の文字の行分割特性 (分類) を手直しする。 ORD は文字の UCS インデクス値か、それらの配列への参照。 CLASS は行分割特性値のいずれか (“定数” を参照)。 このオプションは複数回指定できる。 undef を指定すると、それまでの手直しをすべて取り消す。 初期値では、行分割特性の手直しはしない。 “文字の特性の手直し” も参照。

LegacyCM => “YES” | “NO”
[G][L] 前に空白文字がついた結合文字を単独の結合文字 (ID) と扱う。 Unicode 5.0 版からは、空白文字のこのような使いかたは推奨されない。 初期値は "YES"

Newline => STRING
[L] 改行の文字列とする Unicode 文字列。 初期値は " "

Prep => METHOD
[L] ユーザ定義の行分割動作を追加する。 このオプションは複数回指定できる。 METHOD には以下のものを指定できる。

“NONBREAKURI”
URI を分割しない。

“BREAKURI”
URI を、印刷物に適した規則で分割する。 詳しくは [CMOS] の 6.17 節と 17.11 節を参照。

“[” REGEX, SUBREF “]”
正規表現 REGEX にマッチする文字列を、SUBREF で参照されるサブルーチンで分割する。 詳細は “ユーザ定義の行分割動作” を参照。

“undef”
それまでに追加した動作をすべて取り消す。

Sizing => METHOD
[L] 文字列の長さを算出する方法を指定する。 以下のオプションが使える。

“UAX11”
初期の方法。 組み込みの文字データベースによって文字の桁数を算出する。

“undef”
文字列に含まれる書記素クラスタ (Unicode::GCString 参照) の数を返す。

サブルーチンへの参照
“文字列長の算出” を参照。

“ColMax”、“ColMin”、“EAWidth” オプションも参照。

Urgent => METHOD
[L] 長すぎる行の扱いかたを指定する。 以下のオプションが使える。

“CROAK”
エラーメッセージを出力して死ぬ。

“FORCE”
長すぎる文字列を無理やり分割する。

“undef”
初期の方法。 長すぎる文字列も分割しない。

サブルーチンへの参照
“ユーザ定義の行分割動作” を参照。

ViramaAsJoiner => “YES” | “NO”
[G] ヴィラーマ記号 (ヒンディ語では「ハラント」、クメール文字での「脚」) とそれに続く字とを分離しない。 初期値は "YES": このオプションはリリース 2011.001_29 で導入された。 以前のリリースでは "NO" に固定であった。 これは、[UAX #29] で定義する「初期の」書記素クラスタには含まれない仕様である。

定数

“EA_Na”, “EA_N”, “EA_A”, “EA_W”, “EA_H”, “EA_F”
[UAX #11] で定義される 6 つの East_Asian_Width 特性値。 狭 (Na)、中立 (N)、曖昧 (A)、広 (W)、半角 (H)、全角 (F)。

“EA_Z”
前進を伴わない文字の East_Asian_Width 特性の値。 : この「前進を伴わない」値は当モジュールによる拡張であり、 [UAX #11] の一部ではない。

“LB_BK”, “LB_CR”, “LB_LF”, “LB_NL”, “LB_SP”, “LB_OP”, “LB_CL”, “LB_CP”, “LB_QU”, “LB_GL”, “LB_NS”, “LB_EX”, “LB_SY”, “LB_IS”, “LB_PR”, “LB_PO”, “LB_NU”, “LB_AL”, “LB_HL”, “LB_ID”, “LB_IN”, “LB_HY”, “LB_BA”, “LB_BB”, “LB_B2”, “LB_CB”, “LB_ZW”, “LB_CM”, “LB_WJ”, “LB_H2”, “LB_H3”, “LB_JL”, “LB_JV”, “LB_JT”, “LB_SG”, “LB_AI”, “LB_CJ”, “LB_SA”, “LB_XX”, “LB_RI”
[UAX #14] で定義される 40 の行分割特性値 (分類)。 : 特性値 CP はUnicode 5.2.0版で導入された。 特性値 HL と CJ はUnicode 6.1.0版で導入された。 特性値 RI は Unicode 6.2.0版で導入された。

“MANDATORY”, “DIRECT”, “INDIRECT”, “PROHIBITED”
行分割動作を表す 4 つの値。 強制分割。直接分割も間接分割も認める。間接分割を認めるが直接分割は禁ずる。分割を禁ずる。

“Unicode::LineBreak::SouthEastAsian::supported”
東南アジアの表記体系のための単語分節機能が有効かどうかを示すフラグ。 この機能が有効になっていれば、空でない文字列。 そうでなければ undef: 現リリースでは現代タイ語のタイ文字にのみ対応している。

“UNICODE_VERSION”
このモジュールが参照する Unicode 標準の版を示す文字列。

CUSTOMIZATION

行の整形

“Format” オプションにサブルーチンへの参照を指定する場合、そのサブルーチンは 3 つの引数を取らなければならない。

$修正後 = &サブルーチン(SELF, EVENT, STR);

SELF は Unicode::LineBreak オブジェクト、EVENT はサブルーチンが呼ばれた文脈を表す文字列、STR は分割位置の前または後の Unicode 文字列の断片。

EVENT |駆動の契機 |STR —————————————————————– “sot” |テキスト先頭 |最初の行の断片 “sop” |強制分割の後 |次の行の断片 “sol” |任意分割の後 |続きの行の断片 "" |分割の直前 |行全体 (終端の空白文字を除く) “eol” |任意分割 |分割位置の前の空白文字 “eop” |強制分割 |改行とその前の空白文字 “eot” |テキスト終端 |テキスト終端の空白文字 (と改行) —————————————————————–

サブルーチンは、テキストの断片を修正して返さなければならない。なにも修正しなかったことを示すには、undef を返せばよい。 なお、"sot""sop""sol" の文脈での修正はその後の分割位置の決定に影響するが、ほかの文脈での修正は影響しない。

注意: 文字列の引数は実際には書記素クラスタ列である。 Unicode::GCString~[ja] 参照。

たとえば次のコードは、行末の空白を取り除いて行折りをする。

sub fmt { if ($_[1] =~ /^eo/) { return " “; } return undef; } my $lb = Unicode::LineBreak->new(Format => \fmt); $output = $lb->break($text);

ユーザ定義の行分割動作

任意分割によって生じる行が CharMax、ColMax、ColMin のいずれかの制限を超えると見込まれるときは、引き続く文字列に対して緊急分割を実行できる。 “Urgent” オプションにサブルーチンへの参照を指定する場合、そのサブルーチンは 2 つの引数を取らなければならない。

@分割後 = &サブルーチン(SELF, STR);

SELF は Unicode::LineBreak オブジェクト、STR は分割すべき Unicode 文字列。

サブルーチンは、文字列 STR を分割した結果の配列を返さなければならない。

注意: 文字列の引数は実際には書記素クラスタ列である。 Unicode::GCString~[ja] 参照。

たとえば次のコードは、若干の化学物質 (チチンのような) の名称にハイフンを挿入し、行折りできるようにする。

sub hyphenize { return map {$_ =~ s/yl$/yl-/; $_} split /(\w+?yl(?=\w))/, $_[1]; } my $lb = Unicode::LineBreak->new(Urgent => \hyphenize); $output = $lb->break(“Methionylthreonylthreonylglutaminylarginyl…”);

“Prep” オプションに [REGEX, SUBREF] の配列参照を指定する場合、サブルーチンは 2 つの引数を取らなければならない。

@分割後 = &サブルーチン(SELF, STR);

SELF は Unicode::LineBreak オブジェクト、STR は REGEX にマッチする分割すべき Unicode 文字列。

サブルーチンは、文字列 STR を分割した結果の配列を返さなければならない。

たとえば次のコードは、HTTP URL を [CMOS] の規則を用いて分割する。

my $url = qr{http://[!-]+}i; sub breakurl { my $self = shift; my $str = shift; return split m{(?<=[/]) (?=[^/]) | (?<=[^-.]) (?=[-.,_?%=&]) | (?<=[=&]) (?=.)}x, $str; } my $lb = Unicode::LineBreak->new(Prep => [$url, \breakurl]); $output = $lb->break($string);

状態の保存

Unicode::LineBreak オブジェクトはハッシュ参照としてふるまう。 任意の要素を、オブジェクトの存在期間中保存できる。

たとえば次のコードは、段落を空行で分ける。

sub paraformat { my $self = shift; my $action = shift; my $str = shift; if ($action eq sot or $action eq sop) { $self->{line} = ; } elsif ($action eq ) { $self->{line} = $str; } elsif ($action eq eol) { return " “; } elsif ($action eq eop) { if (length $self->{line}) { return "

“; } else { return " “; } } elsif ($action eq eot) { return " “; } return undef; } my $lb = Unicode::LineBreak->new(Format => \paraformat); $output = $lb->break($string);

文字列長の算出

“Sizing” オプションにサブルーチンへの参照を指定する場合、そのサブルーチンは 5 つの引数を取らなければならない。

$桁数 = &サブルーチン(SELF, LEN, PRE, SPC, STR);

SELF は Unicode::LineBreak オブジェクト、LEN は先行する文字列の長さ、PRE は先行する Unicode 文字列、SPC は追加される空白文字、STR は処理する Unicode 文字列。

サブルーチンは PRE.SPC.STR の桁数を算出して返さなければならない。 桁数は整数でなくてもよい。桁数の単位は随意に選べるが、“ColMin” オプションおよび “ColMax” オプションのそれと一致させなければならない。

注意: 文字列の引数は実際には書記素クラスタ列である。 Unicode::GCString~[ja] 参照。

たとえば次のコードは、行に 8 桁ごとのタブストップがあるものとして処理する。

sub tabbedsizing { my ($self, $cols, $pre, $spc, $str) = @_; my $spcstr = $spc.$str; while ($spcstr->lbc == LB_SP) { my $c = $spcstr->item(0); if ($c eq " “) { $cols += 8 - $cols % 8; } else { $cols += $c->columns; } $spcstr = $spcstr->substr(1); } $cols += $spcstr->columns; return $cols; }; my $lb = Unicode::LineBreak->new(LBClass => [ord(” “) => LB_SP], Sizing => \tabbedsizing); $output = $lb->break($string);

文字の特性の手直し

“LBClass” オプションおよび “EAWidth” オプションで個々の文字の行分割特性 (分類) や East_Asian_Width 特性を手直しできる。その際に便利な定数をいくつか定義してある。

行分割特性

仮名などの行頭禁則文字

初期値では、若干の仮名や仮名に準ずるものを行頭禁則文字 (NS または CJ) と扱う。 以下の対を LBClass オプションに指定すれば、これらの文字を通常の表語文字的な文字 (ID) と扱える。

“KANA_NONSTARTERS() => LB_ID”
下記の文字すべて。

“IDEOGRAPHIC_ITERATION_MARKS() => LB_ID”
表語文字的な繰り返し記号。 U+3005 繰返し記号、U+303B ゆすり点、U+309D 平仮名繰返し記号、U+309E 平仮名繰返し記号 (濁点)、U+30FD 片仮名繰返し記号、U+30FE 片仮名繰返し記号 (濁点)。 注。仮名ではないものもある。

“KANA_SMALL_LETTERS() => LB_ID”

“KANA_PROLONGED_SOUND_MARKS() => LB_ID”

小書き仮名。 小書き平仮名 U+3041 ぁ, U+3043 ぃ, U+3045 ぅ, U+3047 ぇ, U+3049 ぉ, U+3063 っ, U+3083 ゃ, U+3085 ゅ, U+3087 ょ, U+308E ゎ, U+3095 ゕ, U+3096 ゖ。 小書き片仮名 U+30A1 ァ, U+30A3 ィ, U+30A5 ゥ, U+30A7 ェ, U+30A9 ォ, U+30C3 ッ, U+30E3 ャ, U+30E5 ュ, U+30E7 ョ, U+30EE ヮ, U+30F5 ヵ, U+30F6 ヶ。 片仮名表音拡張 U+31F0 ㇰ - U+31FF ㇿ。 小書き片仮名 (代替名称) U+FF67 ァ - U+FF6F ッ。 長音記号。 U+30FC 長音記号、U+FF70 長音記号 (代替名称)。 注。これらの文字は行頭禁則文字と扱われることも、通常の表語文字的な文字と扱われることもある。[JIS X 4051] 6.1.1、[JLREQ] 3.1.7 や [UAX14] を参照。 注。U+3095 ゕ, U+3096 ゖ, U+30F5 ヵ, U+30F6 ヶ は仮名ではないとされる。

“MASU_MARK() => LB_ID”
U+303C ます記号。 注。この文字は仮名ではないが、通常 "ます""マス" の略記として用いられる。 注。この文字は [UAX #14] では行頭禁則文字 (NS) に分類されるが、[JIS X 4051] や [JLREQ] では文字クラス (13) や cl-19 (ID に相当) に分類される。

曖昧な引用符

初期値では、若干の記号を曖昧な引用符 (QU) と扱う。

“BACKWARD_QUOTES() => LB_OP, FORWARD_QUOTES() => LB_CL”
ある言語 (オランダ語、英語、イタリア語、ポルトガル語、スペイン語、トルコ語、 および東アジアの多くの言語) では、開き記号に 9 が回転した形状の引用符 (‘ “) を、閉じ記号に 9 の形状の引用符 (’ ”) を用いる。

“FORWARD_QUOTES() => LB_OP, BACKWARD_QUOTES() => LB_CL”
ほかの言語 (チェコ語、ドイツ語、スロヴァク語) では、9 の形状の引用符 (’ ”) を開き記号に、9 が回転した形状の引用符 (‘ “) を閉じ記号に用いる。

“BACKWARD_GUILLEMETS() => LB_OP, FORWARD_GUILLEMETS() => LB_CL”
フランス語、ギリシャ語、ロシア語などでは、左向きのギュメ (« ‹) を開き記号に、右向きのギュメ (» ›) を閉じ記号に用いる。

“FORWARD_GUILLEMETS() => LB_OP, BACKWARD_GUILLEMETS() => LB_CL”
ドイツ語やスロヴァク語では、右向きのギュメ (» ›) を開き記号に、左向きのギュメ (« ‹) を閉じ記号に用いる。

デーン語、フィン語、ノルウェー語、スウェーデン語では、9 の形状の引用符や 右向きのギュメ (’ ” » ›) を開き記号にも閉じ記号にも用いる。

和字間隔

“IDEOGRAPHIC_SPACE() => LB_BA”
U+3000 和字間隔が行頭に来ないようにする。 これが初期の挙動である。

“IDEOGRAPHIC_SPACE() => LB_ID”
和字間隔が行頭に来ることがある。 Unicode 6.2以前はこれが初期の挙動であった。

“IDEOGRAPHIC_SPACE() => LB_SP”
和字間隔が行頭に来ず、行末でははみ出すようにする。

East_Asian_Width 特性

ラテン、ギリシア、キリルの各用字系では、特定の文字が曖昧 (A) の East_Asian_Width 特性を持っている。このため、こういった文字は "EASTASIAN" 文脈で広い文字と扱われる。 EAWidth => [ AMBIGUOUS_*() => EA_N ] と指定することで、そのような文字を常に狭い文字と扱う。

“AMBIGUOUS_ALPHABETICS() => EA_N”
下記の文字すべてを East_Asian_Width 特性 N (中立) の文字と扱う。

“AMBIGUOUS_CYRILLIC() => EA_N”

“AMBIGUOUS_GREEK() => EA_N”

“AMBIGUOUS_LATIN() => EA_N”

曖昧 (A) の幅を持つキリル、ギリシア、ラテン用字系の文字を中立 (N) の文字と扱う。

いっぽう、東アジアの符号化文字集合に対する多くの実装でたびたび広い文字に描画されてきたにもかかわらず、Unicode 標準では全角 (F) の互換文字を持つがゆえに狭い (Na) 文字とされている文字が若干ある。EAWidth オプションに以下のように指定することで、これらの文字を "EASTASIAN" 文脈で広い文字と扱える。

“QUESTIONABLE_NARROW_SIGNS() => EA_A”
U+00A2 セント記号、U+00A3 ポンド記号、U+00A5 円記号 (または元記号)、U+00A6 破断線、U+00AC 否定、U+00AF マクロン。

設定ファイル

“new” メソッドおよび “config” メソッドのオプション引数の組み込み初期値は、 設定ファイルで上書きできる。 Unicode/LineBreak/Defaults.pm。 詳細は Unicode/LineBreak/Defaults.pm.sample を読んでほしい。

BUGS

バグやバグのような動作は、開発者に教えてください。

CPAN Request Tracker: <http://rt.cpan.org/Public/Dist/Display.html?Name=Unicode-LineBreak>.

VERSION

$VERSION 変数を参照してほしい。

非互換な変更

-   

**eawidth()** メソッドを廃止した。 代わりに "columns" in Unicode::GCString が使えるかもしれない。

-   **lbclass()** メソッドを廃止した。 "lbc" in Unicode::GCString や "lbcext" in Unicode::GCString を使ってほしい。

標準への適合性

このモジュールで用いている文字の特性値は、Unicode 標準 8.0.0版による。

このモジュールでは、実装水準 UAX14-C2 を実装しているつもり。

IMPLEMENTATION NOTES

  • 一部の表語文字的な文字を NS として扱うか ID として扱うかを選べる。

  • ハングル音節およびハングル連結チャモを ID として扱うか AL として扱うかを選べる。

  • AI に分類される文字を AL と ID のどちらに解決するかを選べる。

  • CB に分類される文字は解決しない。

  • CJ に分類される文字は常に NS に解決する。より柔軟な手直しの機構が提供される。

  • 東南アジアの表記体系の単語分節に対応しない場合は、 SA に分類される文字は AL に解決する。 ただし、Grapheme_Cluster_Break 特性の値が Extend か SpacingMark である文字は CM に解決する。

  • SG や XX に分類される文字は AL に解決する。

  • 以下の UCS の範囲にあるコードポイントは、文字が割り当てられていなくても決まった特性値を持つ。 範囲 | UAX #14 | UAX #11 | 説明 ————————————————————- U+20A0..U+20CF | PR [*1] | N [*2] | 通貨記号 U+3400..U+4DBF | ID | W | CJK漢字 U+4E00..U+9FFF | ID | W | CJK漢字 U+D800..U+DFFF | AL (SG) | N | サロゲート U+E000..U+F8FF | AL (XX) | F か N (A) | 私用領域 U+F900..U+FAFF | ID | W | CJK漢字 U+20000..U+2FFFD | ID | W | CJK漢字 U+30000..U+3FFFD | ID | W | 古漢字 U+F0000..U+FFFFD | AL (XX) | F か N (A) | 私用領域 U+100000..U+10FFFD | AL (XX) | F か N (A) | 私用領域 その他未割り当て | AL (XX) | N | 未割り当て、 | | | 予約、非文字 ————————————————————- [*1] U+20A7 ペセタ記号 (PO)、U+20B6 トゥール・リーヴル記号 (PO)、U+20BB スカンディナヴィア・マルク記号 (PO)、U+20BE ラリ記号 (PO) を除く。 [*2] U+20A9 ウォン記号 (H)、U+20AC ユーロ記号 (F か N (A)) を 除く。

  • 一般カテゴリ特性が Mn、Me、Cc、Cf、Zl、Zp のいずれかである文字は、前進を伴わない文字とみなす。

REFERENCES

[CMOS]
The Chicago Manual of Style, 15th edition. University of Chicago Press, 2003.

[JIS X 4051]
JIS X 4051:2004 日本語文書の組版方法. 日本規格協会, 2004.

[JLREQ]
阿南康宏他. 日本語組版処理の要件, W3C 技術ノート 2012年4月3日. <http://www.w3.org/TR/2012/NOTE-jlreq-20120403/ja/>.

[UAX #11]
A. Freytag (ed.) (2008-2009). Unicode Standard Annex #11: East Asian Width, Revisions 17-19. <http://unicode.org/reports/tr11/>.

[UAX #14]
A. Freytag and A. Heninger (eds.) (2008-2015). Unicode Standard Annex #14: Unicode Line Breaking Algorithm, Revisions 22-35. <http://unicode.org/reports/tr14/>.

[UAX #29]
Mark Davis (ed.) (2009-2013). Unicode Standard Annex #29: Unicode Text Segmentation, Revisions 15-23. <http://www.unicode.org/reports/tr29/>.

SEE ALSO

Text::LineFold~[ja], Text::Wrap, Unicode::GCString~[ja].

AUTHOR

Copyright (C) 2009-2018 Hatuka*nezumi - IKEDA Soji <hatuka(at)nezumi.nu>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

253 - Linux cli command Image_ExifTool_PhaseOnepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_PhaseOnepm and provides detailed information about the command Image_ExifTool_PhaseOnepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_PhaseOnepm.

NAME 🖥️ Image_ExifTool_PhaseOnepm 🖥️

Phase One maker notes tags

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to decode Phase One maker notes.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.cybercom.net/~dcoffin/dcraw/>

SEE ALSO

“PhaseOne Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

254 - Linux cli command setkey_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setkey_r and provides detailed information about the command setkey_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setkey_r.

NAME 🖥️ setkey_r 🖥️

encrypt 64-bit messages

LIBRARY

Password hashing library (libcrypt, -lcrypt)

SYNOPSIS

#define _XOPEN_SOURCE /* See feature_test_macros(7) */
#include <unistd.h>
[[deprecated]] void encrypt(char block[64], int edflag);
#define _XOPEN_SOURCE /* See feature_test_macros(7) */
#include <stdlib.h>
[[deprecated]] void setkey(const char *key);
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <crypt.h>
[[deprecated]] void setkey_r(const char *key, struct crypt_data *data);
[[deprecated]] void encrypt_r(char *block, int edflag,
 struct crypt_data *data);

DESCRIPTION

These functions encrypt and decrypt 64-bit messages. The setkey() function sets the key used by encrypt(). The key argument used here is an array of 64 bytes, each of which has numerical value 1 or 0. The bytes key[n] where n=8*i-1 are ignored, so that the effective key length is 56 bits.

The encrypt() function modifies the passed buffer, encoding if edflag is 0, and decoding if 1 is being passed. Like the key argument, also block is a bit vector representation of the actual value that is encoded. The result is returned in that same vector.

These two functions are not reentrant, that is, the key data is kept in static storage. The functions setkey_r() and encrypt_r() are the reentrant versions. They use the following structure to hold the key data:

struct crypt_data {
    char keysched[16 * 8];
    char sb0[32768];
    char sb1[32768];
    char sb2[32768];
    char sb3[32768];
    char crypt_3_buf[14];
    char current_salt[2];
    long current_saltbits;
    int  direction;
    int  initialized;
};

Before calling setkey_r() set data->initialized to zero.

RETURN VALUE

These functions do not return any value.

ERRORS

Set errno to zero before calling the above functions. On success, errno is unchanged.

ENOSYS
The function is not provided. (For example because of former USA export restrictions.)

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

encrypt(), setkey()

Thread safetyMT-Unsafe race:crypt

encrypt_r(), setkey_r()

Thread safetyMT-Safe

STANDARDS

encrypt()
setkey()
POSIX.1-2008.

encrypt_r()
setkey_r()
None.

HISTORY

Removed in glibc 2.28.

Because they employ the DES block cipher, which is no longer considered secure, these functions were removed from glibc. Applications should switch to a modern cryptography library, such as libgcrypt.

encrypt()
setkey()
POSIX.1-2001, SUS, SVr4.

Availability in glibc

See crypt(3).

Features in glibc

In glibc 2.2, these functions use the DES algorithm.

EXAMPLES

#define _XOPEN_SOURCE
#include <crypt.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int
main(void)
{
    char key[64];
    char orig[9] = "eggplant";
    char buf[64];
    char txt[9];
    for (size_t i = 0; i < 64; i++) {
        key[i] = rand() & 1;
    }
    for (size_t i = 0; i < 8; i++) {
        for (size_t j = 0; j < 8; j++) {
            buf[i * 8 + j] = orig[i] >> j & 1;
        }
        setkey(key);
    }
    printf("Before encrypting: %s

“, orig); encrypt(buf, 0); for (size_t i = 0; i < 8; i++) { for (size_t j = 0, txt[i] = ‘�’; j < 8; j++) { txt[i] |= buf[i * 8 + j] « j; } txt[8] = ‘�’; } printf(“After encrypting: %s “, txt); encrypt(buf, 1); for (size_t i = 0; i < 8; i++) { for (size_t j = 0, txt[i] = ‘�’; j < 8; j++) { txt[i] |= buf[i * 8 + j] « j; } txt[8] = ‘�’; } printf(“After decrypting: %s “, txt); exit(EXIT_SUCCESS); }

SEE ALSO

cbc_crypt(3), crypt(3), ecb_crypt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

255 - Linux cli command Net_DBus_Test_MockObjectpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Test_MockObjectpm and provides detailed information about the command Net_DBus_Test_MockObjectpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Test_MockObjectpm.

NAME 🖥️ Net_DBus_Test_MockObjectpm 🖥️

Fake an object from the bus for unit testing

SYNOPSIS

use Net::DBus; use Net::DBus::Test::MockObject; my $bus = Net::DBus->test # Lets fake presence of HAL… # First we need to define the service my $service = $bus->export_service(“org.freedesktop.Hal”); # Then create a mock object my $object = Net::DBus::Test::MockObject->new($service, “/org/freedesktop/Hal/Manager”); # Fake the GetAllDevices method $object->seed_action(“org.freedesktop.Hal.Manager”, “GetAllDevices”, reply => { return => [ “/org/freedesktop/Hal/devices/computer_i8042_Aux_Port”, “/org/freedesktop/Hal/devices/computer_i8042_Aux_Port_logicaldev_input”, “/org/freedesktop/Hal/devices/computer_i8042_Kbd_Port”, “/org/freedesktop/Hal/devices/computer_i8042_Kbd_Port_logicaldev_input” ], }); # Now can test any class which calls out to GetAllDevices in HAL ….test stuff….

DESCRIPTION

This provides an alternate for Net::DBus::Object to enable bus objects to be quickly mocked up, thus facilitating creation of unit tests for services which may need to call out to objects provided by 3rd party services on the bus. It is typically used as a companion to the Net::DBus::MockBus object, to enable complex services to be tested without actually starting a real bus.

!!!!! WARNING !!!

This object & its APIs should be considered very experimental at this point in time, and no guarantees about future API compatibility are provided what-so-ever. Comments & suggestions on how to evolve this framework are, however, welcome & encouraged.

METHODS

my $object = Net::DBus::Test::MockObject->new($service, $path, $interface);
Create a new mock object, attaching to the service defined by the $service parameter. This would be an instance of the Net::DBus::Service object. The $path parameter defines the object path at which to attach this mock object, and $interface defines the interface it will support.

my $service = $object->get_service
Retrieves the Net::DBus::Service object within which this object is exported.

my $path = $object->get_object_path
Retrieves the path under which this object is exported

my $msg = $object->get_last_message
Retrieves the last message processed by this object. The returned object is an instance of Net::DBus::Binding::Message

my $sig = $object->get_last_message_signature
Retrieves the type signature of the last processed message.

my $value = $object->get_last_message_param
Returns the first value supplied as an argument to the last processed message.

my @values = $object->get_last_message_param_list
Returns a list of all the values supplied as arguments to the last processed message.

$object->seed_action($interface, $method, %action);
Registers an action to be performed when a message corresponding to the method $method within the interface $interface is received. The %action parameter can have a number of possible keys set:

signals
Causes a signal to be emitted when the method is invoked. The value associated with this key should be an instance of the Net::DBus::Binding::Message::Signal class.

error
Causes an error to be generated when the method is invoked. The value associated with this key should be a hash reference, with two elements. The first, name, giving the error name, and the second, description, providing the descriptive text.

reply
Causes a normal method return to be generated. The value associated with this key should be an array reference, whose elements are the values to be returned by the method.

BUGS

It doesn’t completely replicate the API of Net::DBus::Binding::Object, merely enough to make the high level bindings work in a test scenario.

AUTHOR

Daniel P. Berrange

COPYRIGHT

Copyright (C) 2004-2009 Daniel P. Berrange

SEE ALSO

Net::DBus, Net::DBus::Object, Net::DBus::Test::MockConnection, <http://www.mockobjects.com/Faq.html>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

256 - Linux cli command XtAddInput

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAddInput and provides detailed information about the command XtAddInput, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAddInput.

NAME 🖥️ XtAddInput 🖥️

register input, timeout, and workprocs

SYNTAX

#include <X11/Intrinsic.h>

XtInputId XtAddInput(int source, XtPointer condition, XtInputCallbackProc proc, XtPointer client_data);

XtIntervalId XtAddTimeOut(unsigned long interval, XtTimerCallbackProc proc, XtPointer client_data);

XtWorkProcId XtAddWorkProc(XtWorkProc proc, XtPointer client_data);

ARGUMENTS

client_data
Specifies the argument that is to be passed to the specified procedure when input is available

condition
Specifies the mask that indicates a read, write, or exception condition or some operating system dependent condition.

proc
Specifies the procedure that is to be called when input is available.

source
Specifies the source file descriptor on a UNIX-based system or other operating system dependent device specification.

DESCRIPTION

XtAddInput has been replaced by XtAppAddInput.

XtAddTimeOut has been replaced by XtAppAddTimeOut.

XtAddWorkProc has been replaced by XtAppAddWorkProc.

SEE ALSO

XtAppAddInput(3), XtAppAddTimeOut(3), XtAppAddWorkProc(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

257 - Linux cli command Net_IPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_IPpm and provides detailed information about the command Net_IPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_IPpm.

NAME 🖥️ Net_IPpm 🖥️

Perl extension for manipulating IPv4/IPv6 addresses

SYNOPSIS

use Net::IP; my $ip = new Net::IP (193.0.1/24) or die (Net::IP::Error()); print (“IP : “.$ip->ip().” “); print (“Sho : “.$ip->short().” “); print (“Bin : “.$ip->binip().” “); print (“Int : “.$ip->intip().” “); print (“Mask: “.$ip->mask().” “); print (“Last: “.$ip->last_ip().” “); print (“Len : “.$ip->prefixlen().” “); print (“Size: “.$ip->size().” “); print (“Type: “.$ip->iptype().” “); print (“Rev: “.$ip->reverse_ip().” “);

DESCRIPTION

This module provides functions to deal with IPv4/IPv6 addresses. The module can be used as a class, allowing the user to instantiate IP objects, which can be single IP addresses, prefixes, or ranges of addresses. There is also a procedural way of accessing most of the functions. Most subroutines can take either IPv4 or IPv6 addresses transparently.

OBJECT-ORIENTED INTERFACE

Object Creation

A Net::IP object can be created from a single IP address:

$ip = new Net::IP (193.0.1.46) || die …

Or from a Classless Prefix (a /24 prefix is equivalent to a C class):

$ip = new Net::IP (195.114.80/24) || die …

Or from a range of addresses:

$ip = new Net::IP (20.34.101.207 - 201.3.9.99) || die …

Or from a address plus a number:

$ip = new Net::IP (20.34.10.0 + 255) || die …

The new() function accepts IPv4 and IPv6 addresses:

$ip = new Net::IP (dead:beef::/32) || die …

Optionally, the function can be passed the version of the IP. Otherwise, it tries to guess what the version is (see _is_ipv4() and _is_ipv6()).

$ip = new Net::IP (195/8,4); # Class A

OBJECT METHODS

Most of these methods are front-ends for the real functions, which use a procedural interface. Most functions return undef on failure, and a true value on success. A detailed description of the procedural interface is provided below.

set

Set an IP address in an existing IP object. This method has the same functionality as the new() method, except that it reuses an existing object to store the new IP.

$ip->set(130.23.1/24,4);

Like new(), set() takes two arguments - a string used to build an IP address, prefix, or range, and optionally, the IP version of the considered address.

It returns an IP object on success, and undef on failure.

error

Return the current object error string. The error string is set whenever one of the methods produces an error. Also, a global, class-wide Error() function is available.

warn ($ip->error());

errno

Return the current object error number. The error number is set whenever one of the methods produces an error. Also, a global $ERRNO variable is set when an error is produced.

warn ($ip->errno());

ip

Return the IP address (or first IP of the prefix or range) in quad format, as a string.

print ($ip->ip());

binip

Return the IP address as a binary string of 0s and 1s.

print ($ip->binip());

prefixlen

Return the length in bits of the current prefix.

print ($ip->prefixlen());

version

Return the version of the current IP object (4 or 6).

print ($ip->version());

size

Return the number of IP addresses in the current prefix or range. Use of this function requires Math::BigInt.

print ($ip->size());

binmask

Return the binary mask of the current prefix, if applicable.

print ($ip->binmask());

mask

Return the mask in quad format of the current prefix.

print ($ip->mask());

prefix

Return the full prefix (ip+prefix length) in quad (standard) format.

print ($ip->prefix());

print

Print the IP object (IP/Prefix or First - Last)

print ($ip->print());

intip

Convert the IP in integer format and return it as a Math::BigInt object.

print ($ip->intip());

hexip

Return the IP in hex format

print ($ip->hexip());

hexmask

Return the mask in hex format

print ($ip->hexmask());

short

Return the IP in short format: IPv4 addresses: 194.5/16 IPv6 addresses: ab32:f000::

print ($ip->short());

iptype

Return the IP Type - this describes the type of an IP (Public, Private, Reserved, etc.) See procedural interface ip_iptype for more details.

print ($ip->iptype());

reverse_ip

Return the reverse IP for a given IP address (in.addr. format).

print ($ip->reserve_ip());

last_ip

Return the last IP of a prefix/range in quad format.

print ($ip->last_ip());

last_bin

Return the last IP of a prefix/range in binary format.

print ($ip->last_bin());

last_int

Return the last IP of a prefix/range in integer format.

print ($ip->last_int());

find_prefixes

This function finds all the prefixes that can be found between the two addresses of a range. The function returns a list of prefixes.

@list = $ip->find_prefixes($other_ip));

bincomp

Binary comparaison of two IP objects. The function takes an operation and an IP object as arguments. It returns a boolean value.

The operation can be one of: lt: less than (smaller than) le: smaller or equal to gt: greater than ge: greater or equal to

if ($ip->bincomp(lt,$ip2) {...}

binadd

Binary addition of two IP objects. The value returned is an IP object.

my $sum = $ip->binadd($ip2);

aggregate

Aggregate 2 IPs - Append one range/prefix of IPs to another. The last address of the first range must be the one immediately preceding the first address of the second range. A new IP object is returned.

my $total = $ip->aggregate($ip2);

overlaps

Check if two IP ranges/prefixes overlap each other. The value returned by the function should be one of: $IP_PARTIAL_OVERLAP (ranges overlap) $IP_NO_OVERLAP (no overlap) $IP_A_IN_B_OVERLAP (range2 contains range1) $IP_B_IN_A_OVERLAP (range1 contains range2) $IP_IDENTICAL (ranges are identical) undef (problem)

if ($ip->overlaps($ip2)==$IP_A_IN_B_OVERLAP) {...};

looping

The + operator is overloaded in order to allow looping though a whole range of IP addresses:

my $ip = new Net::IP (195.45.6.7 - 195.45.6.19) || die; # Loop do { print $ip->ip(), " “; } while (++$ip);

The ++ operator returns undef when the last address of the range is reached.

auth

Return IP authority information from the IP::Authority module

$auth = ip-auth ();>

Note: IPv4 only

PROCEDURAL INTERFACE

These functions do the real work in the module. Like the OO methods, most of these return undef on failure. In order to access error codes and strings, instead of using $ip->error() and $ip->errno(), use the global functions Error() and Errno().

The functions of the procedural interface are not exported by default. In order to import these functions, you need to modify the use statement for the module:

use Net::IP qw(:PROC);

Error

Returns the error string corresponding to the last error generated in the module. This is also useful for the OO interface, as if the new() function fails, we cannot call $ip->error() and so we have to use Error().

warn Error();

Errno

Returns a numeric error code corresponding to the error string returned by Error.

ip_iptobin

Transform an IP address into a bit string.

Params : IP address, IP version Returns : binary IP string on success, undef otherwise

$binip = ip_iptobin ($ip,6);

ip_bintoip

Transform a bit string into an IP address

Params : binary IP, IP version Returns : IP address on success, undef otherwise

$ip = ip_bintoip ($binip,6);

ip_bintoint

Transform a bit string into a BigInt.

Params : binary IP Returns : BigInt

$bigint = new Math::BigInt (ip_bintoint($binip));

ip_inttobin

Transform a BigInt into a bit string. Warning: sets warnings (-w) off. This is necessary because Math::BigInt is not compliant.

Params : BigInt, IP version Returns : binary IP

$binip = ip_inttobin ($bigint);

ip_get_version

Try to guess the IP version of an IP address.

Params : IP address Returns : 4, 6, undef(unable to determine)

$version = ip_get_version ($ip)

ip_is_ipv4

Check if an IP address is of type 4.

Params : IP address Returns : 1 (yes) or 0 (no)

ip_is_ipv4($ip) and print "$ip is IPv4";

ip_is_ipv6

Check if an IP address is of type 6.

Params : IP address Returns : 1 (yes) or 0 (no)

ip_is_ipv6($ip) and print "$ip is IPv6";

ip_expand_address

Expand an IP address from compact notation.

Params : IP address, IP version Returns : expanded IP address or undef on failure

$ip = ip_expand_address ($ip,4);

ip_get_mask

Get IP mask from prefix length.

Params : Prefix length, IP version Returns : Binary Mask

$mask = ip_get_mask ($len,6);

ip_last_address_bin

Return the last binary address of a prefix.

Params : First binary IP, prefix length, IP version Returns : Binary IP

$lastbin = ip_last_address_bin ($ip,$len,6);

ip_splitprefix

Split a prefix into IP and prefix length. If it was passed a simple IP, it just returns it.

Params : Prefix Returns : IP, optionally length of prefix

($ip,$len) = ip_splitprefix ($prefix)

ip_prefix_to_range

Get a range of IPs from a prefix.

Params : Prefix, IP version Returns : First IP, last IP

($ip1,$ip2) = ip_prefix_to_range ($prefix,6);

ip_bincomp

Compare binary Ips with <, >, <=, >=. Operators are lt(<), le(<=), gt(>), and ge(>=)

Params : First binary IP, operator, Last binary IP Returns : 1 (yes), 0 (no), or undef (problem)

ip_bincomp ($ip1,lt,$ip2) == 1 or do {}

ip_binadd

Add two binary IPs.

Params : First binary IP, Last binary IP Returns : Binary sum or undef (problem)

$binip = ip_binadd ($bin1,$bin2);

ip_get_prefix_length

Get the prefix length for a given range of 2 IPs.

Params : First binary IP, Last binary IP Returns : Length of prefix or undef (problem)

$len = ip_get_prefix_length ($ip1,$ip2);

ip_range_to_prefix

Return all prefixes between two IPs.

Params : First IP (binary format), Last IP (binary format), IP version Returns : List of Prefixes or undef (problem)

The prefixes returned have the form q.q.q.q/nn.

@prefix = ip_range_to_prefix ($ip1,$ip2,6);

ip_compress_v4_prefix

Compress an IPv4 Prefix.

Params : IP, Prefix length Returns : Compressed Prefix

$ip = ip_compress_v4_prefix ($ip, $len);

ip_compress_address

Compress an IPv6 address. Just returns the IP if it is an IPv4.

Params : IP, IP version Returns : Compressed IP or undef (problem)

$ip = ip_compress_adress ($ip, $version);

ip_is_overlap

Check if two ranges of IPs overlap.

Params : Four binary IPs (begin of range 1,end1,begin2,end2), IP version $IP_PARTIAL_OVERLAP (ranges overlap) $IP_NO_OVERLAP (no overlap) $IP_A_IN_B_OVERLAP (range2 contains range1) $IP_B_IN_A_OVERLAP (range1 contains range2) $IP_IDENTICAL (ranges are identical) undef (problem)

(ip_is_overlap($rb1,$re1,$rb2,$re2,4) eq $IP_A_IN_B_OVERLAP) and do {};

ip_get_embedded_ipv4

Get an IPv4 embedded in an IPv6 address

Params : IPv6 Returns : IPv4 string or undef (not found)

$ip4 = ip_get_embedded($ip6);

ip_check_mask

Check the validity of a binary IP mask

Params : Mask Returns : 1 or undef (invalid)

ip_check_mask($binmask) or do {};

Checks if mask has only 1s followed by 0s.

ip_aggregate

Aggregate 2 ranges of binary IPs

Params : 1st range (1st IP, Last IP), last range (1st IP, last IP), IP version Returns : prefix or undef (invalid)

$prefix = ip_aggregate ($bip1,$eip1,$bip2,$eip2) || die ...

ip_iptypev4

Return the type of an IPv4 address.

Params: binary IP Returns: type as of the following table or undef (invalid ip)

See RFC 5735 and RFC 6598

Address Block       Present Use                Reference ——————————————————————- 0.0.0.0/8           This Network             RFC 1122 PRIVATE 10.0.0.0/8          Private-Use Networks       RFC 1918 PRIVATE 100.64.0.0/10       CGN Shared Address Space   RFC 6598 SHARED 127.0.0.0/8         Loopback                   RFC 1122 LOOPBACK 169.254.0.0/16      Link Local                 RFC 3927 LINK-LOCAL 172.16.0.0/12       Private-Use Networks       RFC 1918 PRIVATE 192.0.0.0/24        IETF Protocol Assignments  RFC 5736 RESERVED 192.0.2.0/24        TEST-NET-1                 RFC 5737 TEST-NET 192.88.99.0/24      6to4 Relay Anycast         RFC 3068 6TO4-RELAY 192.168.0.0/16      Private-Use Networks       RFC 1918 PRIVATE 198.18.0.0/15       Network Interconnect                     Device Benchmark Testing   RFC 2544 RESERVED 198.51.100.0/24     TEST-NET-2                 RFC 5737 TEST-NET 203.0.113.0/24      TEST-NET-3                 RFC 5737 TEST-NET 224.0.0.0/4         Multicast                  RFC 3171 MULTICAST 240.0.0.0/4         Reserved for Future Use    RFC 1112 RESERVED 255.255.255.255/32  Limited Broadcast          RFC 919  BROADCAST                                                RFC 922

ip_iptypev6

Return the type of an IPv6 address.

Params: binary ip Returns: type as of the following table or undef (invalid)

See IANA Internet Protocol Version 6 Address Space <http://www.iana.org/assignments/ipv6-address-space/ipv6-address-space.txt> and IANA IPv6 Special Purpose Address Registry <http://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.txt>

Prefix      Allocation           Reference ————————————————————- 0000::/8    Reserved by IETF     [RFC4291] RESERVED 0100::/8    Reserved by IETF     [RFC4291] RESERVED 0200::/7    Reserved by IETF     [RFC4048] RESERVED 0400::/6    Reserved by IETF     [RFC4291] RESERVED 0800::/5    Reserved by IETF     [RFC4291] RESERVED 1000::/4    Reserved by IETF     [RFC4291] RESERVED 2000::/3    Global Unicast       [RFC4291] GLOBAL-UNICAST 4000::/3    Reserved by IETF     [RFC4291] RESERVED 6000::/3    Reserved by IETF     [RFC4291] RESERVED 8000::/3    Reserved by IETF     [RFC4291] RESERVED A000::/3    Reserved by IETF     [RFC4291] RESERVED C000::/3    Reserved by IETF     [RFC4291] RESERVED E000::/4    Reserved by IETF     [RFC4291] RESERVED F000::/5    Reserved by IETF     [RFC4291] RESERVED F800::/6    Reserved by IETF     [RFC4291] RESERVED FC00::/7    Unique Local Unicast [RFC4193] UNIQUE-LOCAL-UNICAST FE00::/9    Reserved by IETF     [RFC4291] RESERVED FE80::/10   Link Local Unicast   [RFC4291] LINK-LOCAL-UNICAST FEC0::/10   Reserved by IETF     [RFC3879] RESERVED FF00::/8    Multicast            [RFC4291] MULTICAST

Prefix          Assignment            Reference ——————————————————————— ::1/128         Loopback Address      [RFC4291] UNSPECIFIED ::/128          Unspecified Address   [RFC4291] LOOPBACK ::FFFF:0:0/96   IPv4-mapped Address   [RFC4291] IPV4MAP 0100::/64       Discard-Only Prefix   [RFC6666] DISCARD 2001:0000::/32  TEREDO                [RFC4380] TEREDO 2001:0002::/48  BMWG                  [RFC5180] BMWG 2001:db8::/32   Documentation Prefix  [RFC3849] DOCUMENTATION 2001:10::/28    ORCHID                [RFC4843] ORCHID 2002::/16       6to4                  [RFC3056] 6TO4 FC00::/7        Unique-Local          [RFC4193] UNIQUE-LOCAL-UNICAST FE80::/10       Linked-Scoped Unicast [RFC4291] LINK-LOCAL-UNICAST FF00::/8        Multicast             [RFC4291] MULTICAST

ip_iptype

Return the type of an IP (Public, Private, Reserved)

Params : Binary IP to test, IP version (defaults to 6) Returns : type (see ip_iptypev4 and ip_iptypev6 for details) or undef (invalid)

$type = ip_iptype ($ip);

ip_check_prefix

Check the validity of a prefix

Params : binary IP, length of prefix, IP version Returns : 1 or undef (invalid)

Checks if the variant part of a prefix only has 0s, and the length is correct.

ip_check_prefix ($ip,$len,$ipv) or do {};

ip_reverse

Get a reverse name from a prefix

Params : IP, length of prefix, IP version Returns : Reverse name or undef (error)

$reverse = ip_reverse ($ip);

ip_normalize

Normalize data to a range/prefix of IP addresses

Params : Data String (Single IP, Range, Prefix) Returns : ip1, ip2 (if range/prefix) or undef (error)

($ip1,$ip2) = ip_normalize ($data);

ip_auth

Return IP authority information from the IP::Authority module

Params : IP, version Returns : Auth info (RI for RIPE, AR for ARIN, etc)

$auth = ip_auth ($ip,4);

Note: IPv4 only

BUGS

The Math::BigInt library is needed for functions that use integers. These are ip_inttobin, ip_bintoint, and the size method. In a next version, Math::BigInt will become optional.

AUTHORS

Manuel Valente <[email protected]>.

Original IPv4 code by Monica Cortes Sack <[email protected]>.

Original IPv6 code by Lee Wilmot <[email protected]>.

BASED ON

ipv4pack.pm, iplib.pm, iplibncc.pm.

SEE ALSO

perl (1), IP::Authority

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

258 - Linux cli command getchar_unlocked

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getchar_unlocked and provides detailed information about the command getchar_unlocked, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getchar_unlocked.

NAME 🖥️ getchar_unlocked 🖥️

nonlocking stdio functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int getc_unlocked(FILE *stream);
int getchar_unlocked(void);
int putc_unlocked(int c, FILE *stream);
int putchar_unlocked(int c);
void clearerr_unlocked(FILE *stream);
int feof_unlocked(FILE *stream);
int ferror_unlocked(FILE *stream);
int fileno_unlocked(FILE *stream);
int fflush_unlocked(FILE *_Nullable stream);
int fgetc_unlocked(FILE *stream);
int fputc_unlocked(int c, FILE *stream);
size_t fread_unlocked(void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
size_t fwrite_unlocked(const void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
char *fgets_unlocked(char s[restrict .n], int n",FILE*restrict"stream);
int fputs_unlocked(const char *restrict s, FILE *restrict stream);
#include <wchar.h>
wint_t getwc_unlocked(FILE *stream);
wint_t getwchar_unlocked(void);
wint_t fgetwc_unlocked(FILE *stream);
wint_t fputwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwchar_unlocked(wchar_t wc);
wchar_t *fgetws_unlocked(wchar_t ws[restrict .n], int n,
 FILE *restrict stream);
int fputws_unlocked(const wchar_t *restrict ws,
 FILE *restrict stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getc_unlocked(), getchar_unlocked(), putc_unlocked(), putchar_unlocked():

    /* glibc >= 2.24: */ _POSIX_C_SOURCE >= 199309L
        || /* glibc <= 2.23: */ _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

clearerr_unlocked(), feof_unlocked(), ferror_unlocked(), fileno_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), getwchar_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwchar_unlocked(), fgetws_unlocked(), fputws_unlocked():

    _GNU_SOURCE

DESCRIPTION

Each of these functions has the same behavior as its counterpart without the “_unlocked” suffix, except that they do not use locking (they do not set locks themselves, and do not test for the presence of locks set by others) and hence are thread-unsafe. See flockfile(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getc_unlocked(), putc_unlocked(), clearerr_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked(), fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwc_unlocked(), fgetws_unlocked(), fputws_unlocked()

Thread safety

MT-Safe race:stream

getchar_unlocked(), getwchar_unlocked()

Thread safety

MT-Unsafe race:stdin

putchar_unlocked(), putwchar_unlocked()

Thread safety

MT-Unsafe race:stdout

feof_unlocked(), ferror_unlocked(), fileno_unlocked()

Thread safetyMT-Safe

STANDARDS

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2008.

Others:
None.

HISTORY

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2001.

SEE ALSO

flockfile(3), stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

259 - Linux cli command Net_DBus_RemoteObjectpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_RemoteObjectpm and provides detailed information about the command Net_DBus_RemoteObjectpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_RemoteObjectpm.

NAME 🖥️ Net_DBus_RemoteObjectpm 🖥️

Access objects provided on the bus

SYNOPSIS

my $service = $bus->get_service(“org.freedesktop.DBus”); my $object = $service->get_object("/org/freedesktop/DBus"); print “Names on the bus { “; foreach my $name (sort @{$object->ListNames}) { print " “, $name, " “; } print “} “;

DESCRIPTION

This module provides the API for accessing remote objects available on the bus. It uses the autoloader to fake the presence of methods based on the API of the remote object. There is also support for setting callbacks against signals, and accessing properties of the object.

METHODS

my $object = Net::DBus::RemoteObject->new($service, $object_path[, $interface], \params);
Creates a new handle to a remote object. The $service parameter is an instance of the Net::DBus::RemoteService method, and $object_path is the identifier of an object exported by this service, for example /org/freedesktop/DBus. For remote objects which implement more than one interface it is possible to specify an optional name of an interface as the third parameter. This is only really required, however, if two interfaces in the object provide methods with the same name, since introspection data can be used to automatically resolve the correct interface to call cases where method names are unique. Rather than using this constructor directly, it is preferable to use the get_object method on Net::DBus::RemoteService, since this caches handles to remote objects, eliminating unnecessary introspection data lookups. The %params parameter contains extra configuration parameters for the object. Currently a single parameter is supported, timeout which takes a value in milliseconds to use as the timeout for method calls on the object.

my $object = $object->as_interface($interface);
Casts the object to a specific interface, returning a new instance of the Net::DBus::RemoteObject specialized to the desired interface. It is only necessary to cast objects to a specific interface, if two interfaces export methods or signals with the same name, or the remote object does not support introspection.

my $service = $object->get_service
Retrieves a handle for the remote service on which this object is attached. The returned object is an instance of Net::DBus::RemoteService

my $path = $object->get_object_path
Retrieves the unique path identifier for this object within the service.

my $object = $object->get_child_object($subpath, [$interface])
Retrieves a handle to a child of this object, identified by the relative path $subpath. The returned object is an instance of Net::DBus::RemoteObject. The optional $interface parameter can be used to immediately cast the object to a specific type.

my $sigid = $object->connect_to_signal($name, $coderef);
Connects a callback to a signal emitted by the object. The $name parameter is the name of the signal within the object, and $coderef is a reference to an anonymous subroutine. When the signal $name is emitted by the remote object, the subroutine $coderef will be invoked, and passed the parameters from the signal. A unique $sigid will be returned, which can be later passed to disconnect_from_signal to remove the handler

$object->disconnect_from_signal($name, $sigid);
Disconnects from a signal emitted by the object. The $name parameter is the name of the signal within the object. The $sigid must be the unique signal handler ID returned by a previous connect_to_signal method call.

AUTHOR

Daniel Berrange <[email protected]>

COPYRIGHT

Copright (C) 2004-2011, Daniel Berrange.

SEE ALSO

Net::DBus::RemoteService, Net::DBus::Object, Net::DBus::Annotation

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

260 - Linux cli command svc_unregister

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command svc_unregister and provides detailed information about the command svc_unregister, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the svc_unregister.

NAME 🖥️ svc_unregister 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

261 - Linux cli command Image_ExifTool_SigmaRawpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_SigmaRawpm and provides detailed information about the command Image_ExifTool_SigmaRawpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_SigmaRawpm.

NAME 🖥️ Image_ExifTool_SigmaRawpm 🖥️

Read Sigma/Foveon RAW (X3F) meta information

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to read Sigma and Foveon X3F images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.x3f.info/technotes/FileDocs/X3F_Format.pdf>

SEE ALSO

“SigmaRaw Tags” in Image::ExifTool::TagNames, Image::ExifTool::Sigma (3pm), Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

262 - Linux cli command WWW_Mechanizepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command WWW_Mechanizepm and provides detailed information about the command WWW_Mechanizepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the WWW_Mechanizepm.

NAME 🖥️ WWW_Mechanizepm 🖥️

Handy web browsing in a Perl object

VERSION

version 2.18

SYNOPSIS

WWW::Mechanize supports performing a sequence of page fetches including following links and submitting forms. Each fetched page is parsed and its links and forms are extracted. A link or a form can be selected, form fields can be filled and the next page can be fetched. Mech also stores a history of the URLs you’ve visited, which can be queried and revisited.

use WWW::Mechanize (); my $mech = WWW::Mechanize->new(); $mech->get( $url ); $mech->follow_link( n => 3 ); $mech->follow_link( text_regex => qr/download this/i ); $mech->follow_link( url => http://host.com/index.html ); $mech->submit_form( form_number => 3, fields => { username => mungo, password => lost-and-alone, } ); $mech->submit_form( form_name => search, fields => { query => pot of gold, }, button => Search Now ); # Enable strict form processing to catch typos and non-existant form fields. my $strict_mech = WWW::Mechanize->new( strict_forms => 1); $strict_mech->get( $url ); # This method call will die, saving you lots of time looking for the bug. $strict_mech->submit_form( form_number => 3, fields => { usernaem => mungo, # typo in field name password => lost-and-alone, extra_field => 123, # field does not exist } );

DESCRIPTION

WWW::Mechanize, or Mech for short, is a Perl module for stateful programmatic web browsing, used for automating interaction with websites.

Features include:

  • All HTTP methods

  • High-level hyperlink and HTML form support, without having to parse HTML yourself

  • SSL support

  • Automatic cookies

  • Custom HTTP headers

  • Automatic handling of redirections

  • Proxies

  • HTTP authentication

Mech is well suited for use in testing web applications. If you use one of the Test::*, like Test::HTML::Lint modules, you can check the fetched content and use that as input to a test call.

use Test::More; like( $mech->content(), qr/$expected/, “Got expected content” );

Each page fetch stores its URL in a history stack which you can traverse.

$mech->back();

If you want finer control over your page fetching, you can use these methods. follow_link() and submit_form() are just high level wrappers around them.

$mech->find_link( n => $number ); $mech->form_number( $number ); $mech->form_name( $name ); $mech->field( $name, $value ); $mech->set_fields( %field_values ); $mech->set_visible( @criteria ); $mech->click( $button );

WWW::Mechanize is a proper subclass of LWP::UserAgent and you can also use any of LWP::UserAgent’s methods.

$mech->add_header($name => $value);

Please note that Mech does NOT support JavaScript, you need additional software for that. Please check “JavaScript” in WWW::Mechanize::FAQ for more.

IMPORTANT LINKS

  • <https://github.com/libwww-perl/WWW-Mechanize/issues> The queue for bugs & enhancements in WWW::Mechanize. Please note that the queue at <http://rt.cpan.org> is no longer maintained.

  • <https://metacpan.org/pod/WWW::Mechanize> The CPAN documentation page for Mechanize.

  • <https://metacpan.org/pod/distribution/WWW-Mechanize/lib/WWW/Mechanize/FAQ.pod> Frequently asked questions. Make sure you read here FIRST.

CONSTRUCTOR AND STARTUP

new()

Creates and returns a new WWW::Mechanize object, hereafter referred to as the “agent”.

my $mech = WWW::Mechanize->new()

The constructor for WWW::Mechanize overrides two of the params to the LWP::UserAgent constructor:

agent => WWW-Mechanize/#.## cookie_jar => {} # an empty, memory-only HTTP::Cookies object

You can override these overrides by passing params to the constructor, as in:

my $mech = WWW::Mechanize->new( agent => wonderbot 1.01 );

If you want none of the overhead of a cookie jar, or don’t want your bot accepting cookies, you have to explicitly disallow it, like so:

my $mech = WWW::Mechanize->new( cookie_jar => undef );

Here are the params that WWW::Mechanize recognizes. These do not include params that LWP::UserAgent recognizes.

  • autocheck => [0|1] Checks each request made to see if it was successful. This saves you the trouble of manually checking yourself. Any errors found are errors, not warnings. The default value is ON, unless it’s being subclassed, in which case it is OFF. This means that standalone WWW::Mechanize instances have autocheck turned on, which is protective for the vast majority of Mech users who don’t bother checking the return value of get() and post() and can’t figure why their code fails. However, if WWW::Mechanize is subclassed, such as for Test::WWW::Mechanize or Test::WWW::Mechanize::Catalyst, this may not be an appropriate default, so it’s off.

  • noproxy => [0|1] Turn off the automatic call to the LWP::UserAgent env_proxy function. This needs to be explicitly turned off if you’re using Crypt::SSLeay to access a https site via a proxy server. Note: you still need to set your HTTPS_PROXY environment variable as appropriate.

  • onwarn => \&func Reference to a warn-compatible function, such as Carp::carp, that is called when a warning needs to be shown. If this is set to undef, no warnings will ever be shown. However, it’s probably better to use the quiet method to control that behavior. If this value is not passed, Mech uses Carp::carp if Carp is installed, or CORE::warn if not.

  • onerror => \&func Reference to a die-compatible function, such as Carp::croak, that is called when there’s a fatal error. If this is set to undef, no errors will ever be shown. If this value is not passed, Mech uses Carp::croak if Carp is installed, or CORE::die if not.

  • quiet => [0|1] Don’t complain on warnings. Setting quiet => 1 is the same as calling $mech->quiet(1). Default is off.

  • stack_depth => $value Sets the depth of the page stack that keeps track of all the downloaded pages. Default is effectively infinite stack size. If the stack is eating up your memory, then set this to a smaller number, say 5 or 10. Setting this to zero means Mech will keep no history.

In addition, WWW::Mechanize also allows you to globally enable strict and verbose mode for form handling, which is done with HTML::Form.

  • strict_forms => [0|1] Globally sets the HTML::Form strict flag which causes form submission to croak if any of the passed fields don’t exist in the form, and/or a value doesn’t exist in a select element. This can still be disabled in individual calls to submit_form(). Default is off.

  • verbose_forms => [0|1] Globally sets the HTML::Form verbose flag which causes form submission to warn about any bad HTML form constructs found. This cannot be disabled later. Default is off.

  • marked_sections => [0|1] Globally sets the HTML::Parser marked sections flag which causes HTML CDATA[[ sections to be honoured. This cannot be disabled later. Default is on.

To support forms, WWW::Mechanize’s constructor pushes POST on to the agent’s requests_redirectable list (see also LWP::UserAgent.)

$mech->agent_alias( $alias )

Sets the user agent string to the expanded version from a table of actual user strings. $alias can be one of the following:

  • Windows IE 6

  • Windows Mozilla

  • Mac Safari

  • Mac Mozilla

  • Linux Mozilla

  • Linux Konqueror

then it will be replaced with a more interesting one. For instance,

$mech->agent_alias( Windows IE 6 );

sets your User-Agent to

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

The list of valid aliases can be returned from known_agent_aliases(). The current list is:

  • Windows IE 6

  • Windows Mozilla

  • Mac Safari

  • Mac Mozilla

  • Linux Mozilla

  • Linux Konqueror

$mech->known_agent_aliases()

Returns a list of all the agent aliases that Mech knows about. This can also be called as a package or class method.

@aliases = WWW::Mechanize::known_agent_aliases(); @aliases = WWW::Mechanize->known_agent_aliases(); @aliases = $mech->known_agent_aliases();

PAGE-FETCHING METHODS

$mech->get( $uri )

Given a URL/URI, fetches it. Returns an HTTP::Response object. $uri can be a well-formed URL string, a URI object, or a WWW::Mechanize::Link object.

The results are stored internally in the agent object, but you don’t know that. Just use the accessors listed below. Poking at the internals is deprecated and subject to change in the future.

get() is a well-behaved overloaded version of the method in LWP::UserAgent. This lets you do things like

$mech->get( $uri, :content_file => $filename );

and you can rest assured that the params will get filtered down appropriately. See “get” in LWP::UserAgent for more details.

NOTE: The file in :content_file will contain the raw content of the response. If the response content is encoded (e.g. gzip encoded), the file will be encoded as well. Use $mech->save_content if you need the decoded content.

NOTE: Because :content_file causes the page contents to be stored in a file instead of the response object, some Mech functions that expect it to be there won’t work as expected. Use with caution.

Here is a non-complete list of methods that do not work as expected with :content_file: forms(), current_form(), links(), title(), content(...), text(), all content-handling methods, all link methods, all image methods, all form methods, all field methods, save_content(...), dump_links(...), dump_images(...), dump_forms(...), dump_text(...)

$mech->post( $uri, content => $content )

POSTs $content to $uri. Returns an HTTP::Response object. $uri can be a well-formed URI string, a URI object, or a WWW::Mechanize::Link object.

$mech->put( $uri, content => $content )

PUTs $content to $uri. Returns an HTTP::Response object. $uri can be a well-formed URI string, a URI object, or a WWW::Mechanize::Link object.

my $res = $mech->put( $uri ); my $res = $mech->put( $uri , $field_name => $value, … );

$mech->head ($uri )

Performs a HEAD request to $uri. Returns an HTTP::Response object. $uri can be a well-formed URI string, a URI object, or a WWW::Mechanize::Link object.

$mech->delete ($uri )

Performs a DELETE request to $uri. Returns an HTTP::Response object. $uri can be a well-formed URI string, a URI object, or a WWW::Mechanize::Link object.

$mech->reload()

Acts like the reload button in a browser: repeats the current request. The history (as per the back() method) is not altered.

Returns the HTTP::Response object from the reload, or undef if there’s no current request.

$mech->back()

The equivalent of hitting the “back” button in a browser. Returns to the previous page. Won’t go back past the first page. (Really, what would it do if it could?)

Returns true if it could go back, or false if not.

$mech->clear_history()

This deletes all the history entries and returns true.

$mech->history_count()

This returns the number of items in the browser history. This number does include the most recently made request.

$mech->history($n)

This returns the nth item in history. The 0th item is the most recent request and response, which would be acted on by methods like find_link(). The 1st item is the state you’d return to if you called back().

The maximum useful value for $n is $mech->history_count - 1. Requests beyond that bound will return undef.

History items are returned as hash references, in the form:

{ req => $http_request, res => $http_response }

STATUS METHODS

$mech->success()

Returns a boolean telling whether the last request was successful. If there hasn’t been an operation yet, returns false.

This is a convenience function that wraps $mech->res->is_success.

$mech->uri()

Returns the current URI as a URI object. This object stringifies to the URI itself.

$mech->response() / $mech->res()

Return the current response as an HTTP::Response object.

Synonym for $mech->response().

$mech->status()

Returns the HTTP status code of the response. This is a 3-digit number like 200 for OK, 404 for not found, and so on.

$mech->ct() / $mech->content_type()

Returns the content type of the response.

$mech->base()

Returns the base URI for the current response

$mech->forms()

When called in a list context, returns a list of the forms found in the last fetched page. In a scalar context, returns a reference to an array with those forms. The forms returned are all HTML::Form objects.

$mech->current_form()

Returns the current form as an HTML::Form object.

When called in a list context, returns a list of the links found in the last fetched page. In a scalar context it returns a reference to an array with those links. Each link is a WWW::Mechanize::Link object.

$mech->is_html()

Returns true/false on whether our content is HTML, according to the HTTP headers.

$mech->title()

Returns the contents of the <TITLE> tag, as parsed by HTML::HeadParser. Returns undef if the content is not HTML.

$mech->redirects()

Convenience method to get the redirects from the most recent HTTP::Response.

Note that you can also use is_redirect to see if the most recent response was a redirect like this.

$mech->get($url); do_stuff() if $mech->res->is_redirect;

CONTENT-HANDLING METHODS

$mech->content(…)

Returns the content that the mech uses internally for the last page fetched. Ordinarily this is the same as $mech->response()->decoded_content(), but this may differ for HTML documents if update_html is overloaded (in which case the value passed to the base-class implementation of same will be returned), and/or extra named arguments are passed to content():

$mech->content( format => ’text’ )
Returns a text-only version of the page, with all HTML markup stripped. This feature requires HTML::TreeBuilder version 5 or higher to be installed, or a fatal error will be thrown. This works only if the contents are HTML.

$mech->content( base_href => [$base_href|undef] )
Returns the HTML document, modified to contain a <base href="$base_href"> mark-up in the header. $base_href is $mech->base() if not specified. This is handy to pass the HTML to e.g. HTML::Display. This works only if the contents are HTML.

$mech->content( raw => 1 )
Returns $self->response()->content(), i.e. the raw contents from the response.

$mech->content( decoded_by_headers => 1 )
Returns the content after applying all Content-Encoding headers but with not additional mangling.

$mech->content( charset => $charset )
Returns $self->response()->decoded_content(charset => $charset) (see HTTP::Response for details).

To preserve backwards compatibility, additional parameters will be ignored unless none of raw | decoded_by_headers | charset is specified and the text is HTML, in which case an error will be triggered.

A fresh instance of WWW::Mechanize will return undef when $mech->content() is called, because no content is present before a request has been made.

$mech->text()

Returns the text of the current HTML content. If the content isn’t HTML, $mech will die.

The text is extracted by parsing the content, and then the extracted text is cached, so don’t worry about performance of calling this repeatedly.

LINK METHODS

Lists all the links on the current page. Each link is a WWW::Mechanize::Link object. In list context, returns a list of all links. In scalar context, returns an array reference of all links.

Follows a specified link on the page. You specify the match to be found using the same params that find_link() uses.

Here some examples:

  • 3rd link called “download” $mech->follow_link( text => download, n => 3 );

  • first link where the URL has “download” in it, regardless of case: $mech->follow_link( url_regex => qr/download/i ); or $mech->follow_link( url_regex => qr/(?i:download)/ );

  • 3rd link on the page $mech->follow_link( n => 3 );

  • the link with the url $mech->follow_link( url => /other/page ); or $mech->follow_link( url => http://example.com/page );

Returns the result of the GET method (an HTTP::Response object) if a link was found.

If the page has no links, or the specified link couldn’t be found, returns undef. If autocheck is enabled an exception will be thrown instead.

Finds a link in the currently fetched page. It returns a WWW::Mechanize::Link object which describes the link. (You’ll probably be most interested in the url() property.) If it fails to find a link it returns undef.

You can take the URL part and pass it to the get() method. If that’s your plan, you might as well use the follow_link() method directly, since it does the get() for you automatically.

Note that <FRAME SRC="..."> tags are parsed out of the HTML and treated as links so this method works with them.

You can select which link to find by passing in one or more of these key/value pairs:

  • text => string, and text_regex => qr/regex/, text matches the text of the link against string, which must be an exact match. To select a link with text that is exactly “download”, use $mech->find_link( text => download ); text_regex matches the text of the link against regex. To select a link with text that has “download” anywhere in it, regardless of case, use $mech->find_link( text_regex => qr/download/i ); Note that the text extracted from the page’s links are trimmed. For example, <a> foo </a> is stored as ‘foo’, and searching for leading or trailing spaces will fail.

  • url => string, and url_regex => qr/regex/, Matches the URL of the link against string or regex, as appropriate. The URL may be a relative URL, like foo/bar.html, depending on how it’s coded on the page.

  • url_abs => string and url_abs_regex => regex Matches the absolute URL of the link against string or regex, as appropriate. The URL will be an absolute URL, even if it’s relative in the page.

  • name => string and name_regex => regex Matches the name of the link against string or regex, as appropriate.

  • rel => string and rel_regex => regex Matches the rel of the link against string or regex, as appropriate. This can be used to find stylesheets, favicons, or links the author of the page does not want bots to follow.

  • id => string and id_regex => regex Matches the attribute ‘id’ of the link against string or regex, as appropriate.

  • class => string and class_regex => regex Matches the attribute ‘class’ of the link against string or regex, as appropriate.

  • tag => string and tag_regex => regex Matches the tag that the link came from against string or regex, as appropriate. The tag_regex is probably most useful to check for more than one tag, as in: $mech->find_link( tag_regex => qr/^(a|frame)$/ ); The tags and attributes looked at are defined below.

If n is not specified, it defaults to 1. Therefore, if you don’t specify any params, this method defaults to finding the first link on the page.

Note that you can specify multiple text or URL parameters, which will be ANDed together. For example, to find the first link with text of “News” and with “cnn.com” in the URL, use:

$mech->find_link( text => News, url_regex => qr/cnn\com/ );

The return value is a reference to an array containing a WWW::Mechanize::Link object for every link in $self->content.

The links come from the following:

“<a href=…>”

“<area href=…>”

“<frame src=…>”

“<iframe src=…>”

“<link href=…>”

“<meta content=…>”

Returns all the links on the current page that match the criteria. The method for specifying link criteria is the same as in find_link(). Each of the links returned is a WWW::Mechanize::Link object.

In list context, find_all_links() returns a list of the links. Otherwise, it returns a reference to the list of links.

find_all_links() with no parameters returns all links in the page.

$mech->find_all_inputs( … criteria … )

find_all_inputs() returns an array of all the input controls in the current form whose properties match all of the regexes passed in. The controls returned are all descended from HTML::Form::Input. See “INPUTS” in HTML::Form for details.

If no criteria are passed, all inputs will be returned.

If there is no current page, there is no form on the current page, or there are no submit controls in the current form then the return will be an empty array.

You may use a regex or a literal string:

# get all textarea controls whose names begin with “customer” my @customer_text_inputs = $mech->find_all_inputs( type => textarea, name_regex => qr/^customer/, ); # get all text or textarea controls called “customer” my @customer_text_inputs = $mech->find_all_inputs( type_regex => qr/^(text|textarea)$/, name => customer, );

$mech->find_all_submits( … criteria … )

find_all_submits() does the same thing as find_all_inputs() except that it only returns controls that are submit controls, ignoring other types of input controls like text and checkboxes.

IMAGE METHODS

$mech->images

Lists all the images on the current page. Each image is a WWW::Mechanize::Image object. In list context, returns a list of all images. In scalar context, returns an array reference of all images.

$mech->find_image()

Finds an image in the current page. It returns a WWW::Mechanize::Image object which describes the image. If it fails to find an image it returns undef.

You can select which image to find by passing in one or more of these key/value pairs:

  • alt => string and alt_regex => qr/regex/ alt matches the ALT attribute of the image against string, which must be an exact match. To select a image with an ALT tag that is exactly “download”, use $mech->find_image( alt => download ); alt_regex matches the ALT attribute of the image against a regular expression. To select an image with an ALT attribute that has “download” anywhere in it, regardless of case, use $mech->find_image( alt_regex => qr/download/i );

  • url => string and url_regex => qr/regex/ Matches the URL of the image against string or regex, as appropriate. The URL may be a relative URL, like foo/bar.html, depending on how it’s coded on the page.

  • url_abs => string and url_abs_regex => regex Matches the absolute URL of the image against string or regex, as appropriate. The URL will be an absolute URL, even if it’s relative in the page.

  • tag => string and tag_regex => regex Matches the tag that the image came from against string or regex, as appropriate. The tag_regex is probably most useful to check for more than one tag, as in: $mech->find_image( tag_regex => qr/^(img|input)$/ ); The tags supported are <img> and <input>.

  • id => string and id_regex => regex id matches the id attribute of the image against string, which must be an exact match. To select an image with the exact id “download-image”, use $mech->find_image( id => download-image ); id_regex matches the id attribute of the image against a regular expression. To select the first image with an id that contains “download” anywhere in it, use $mech->find_image( id_regex => qr/download/ );

  • classs => string and class_regex => regex class matches the class attribute of the image against string, which must be an exact match. To select an image with the exact class “img-fuid”, use $mech->find_image( class => img-fluid ); To select an image with the class attribute “rounded float-left”, use $mech->find_image( class => rounded float-left ); Note that the classes have to be matched as a complete string, in the exact order they appear in the website’s source code. class_regex matches the class attribute of the image against a regular expression. Use this if you want a partial class name, or if an image has several classes, but you only care about one. To select the first image with the class “rounded”, where there are multiple images that might also have either class “float-left” or “float-right”, use $mech->find_image( class_regex => qr/rounded/ ); Selecting an image with multiple classes where you do not care about the order they appear in the website’s source code is not currently supported.

If n is not specified, it defaults to 1. Therefore, if you don’t specify any params, this method defaults to finding the first image on the page.

Note that you can specify multiple ALT or URL parameters, which will be ANDed together. For example, to find the first image with ALT text of “News” and with “cnn.com” in the URL, use:

$mech->find_image( image => News, url_regex => qr/cnn\com/ );

The return value is a reference to an array containing a WWW::Mechanize::Image object for every image in $mech->content.

$mech->find_all_images( … )

Returns all the images on the current page that match the criteria. The method for specifying image criteria is the same as in find_image(). Each of the images returned is a WWW::Mechanize::Image object.

In list context, find_all_images() returns a list of the images. Otherwise, it returns a reference to the list of images.

find_all_images() with no parameters returns all images in the page.

FORM METHODS

These methods let you work with the forms on a page. The idea is to choose a form that you’ll later work with using the field methods below.

$mech->forms

Lists all the forms on the current page. Each form is an HTML::Form object. In list context, returns a list of all forms. In scalar context, returns an array reference of all forms.

$mech->form_number($number)

Selects the numberth form on the page as the target for subsequent calls to field() and click(). Also returns the form that was selected.

If it is found, the form is returned as an HTML::Form object and set internally for later use with Mech’s form methods such as field() and click(). When called in a list context, the number of the found form is also returned as a second value.

Emits a warning and returns undef if no form is found.

The first form is number 1, not zero.

$mech->form_action( $action )

Selects a form by action, using a regex containing $action. If there is more than one form on the page matching that action, then the first one is used, and a warning is generated.

If it is found, the form is returned as an HTML::Form object and set internally for later use with Mech’s form methods such as field() and click().

Returns undef if no form is found.

$mech->form_name( $name [, \args ] )

Selects a form by name.

By default, the first form that has this name will be returned.

my $form = $mech->form_name(“order_form”);

If you want the second, third or nth match, pass an optional arguments hash reference as the final parameter with a key n to pick which instance you want. The numbering starts at 1.

my $third_product_form = $mech->form_name(“buy_now”, { n => 3 });

If the n parameter is not passed, and there is more than one form on the page with that name, then the first one is used, and a warning is generated.

If it is found, the form is returned as an HTML::Form object and set internally for later use with Mech’s form methods such as field() and click().

Returns undef if no form is found.

$mech->form_id( $id [, \args ] )

Selects a form by ID.

By default, the first form that has this ID will be returned.

my $form = $mech->form_id(“order_form”);

Although the HTML specification requires the ID to be unique within a page, some pages might not adhere to that. If you want the second, third or nth match, pass an optional arguments hash reference as the final parameter with a key n to pick which instance you want. The numbering starts at 1.

my $third_product_form = $mech->form_id(“buy_now”, { n => 3 });

If the n parameter is not passed, and there is more than one form on the page with that ID, then the first one is used, and a warning is generated.

If it is found, the form is returned as an HTML::Form object and set internally for later use with Mech’s form methods such as field() and click().

If no form is found it returns undef. This will also trigger a warning, unless quiet is enabled.

$mech->all_forms_with_fields( @fields )

Selects a form by passing in a list of field names it must contain. All matching forms (perhaps none) are returned as a list of HTML::Form objects.

$mech->form_with_fields( @fields, [ \args ] )

Selects a form by passing in a list of field names it must contain. By default, the first form that matches all of these field names will be returned.

my $form = $mech->form_with_fields( qw/sku quantity add_to_cart/ );

If you want the second, third or nth match, pass an optional arguments hash reference as the final parameter with a key n to pick which instance you want. The numbering starts at 1.

my $form = $mech->form_with_fields( sky, qty, { n => 2 } );

If the n parameter is not passed, and there is more than one form on the page with that ID, then the first one is used, and a warning is generated.

If it is found, the form is returned as an HTML::Form object and set internally for later used with Mech’s form methods such as field() and click().

Returns undef and emits a warning if no form is found.

Note that this functionality requires libwww-perl 5.69 or higher.

$mech->all_forms_with( $attr1 => $value1, $attr2 => $value2, … )

Searches for forms with arbitrary attribute/value pairs within the <form> tag. When given more than one pair, all criteria must match. Using undef as value means that the attribute in question must not be present.

All matching forms (perhaps none) are returned as a list of HTML::Form objects.

$mech->form_with( $attr1 => $value1, $attr2 => $value2, …, [ \args ] )

Searches for forms with arbitrary attribute/value pairs within the <form> tag. When given more than one pair, all criteria must match. Using undef as value means that the attribute in question must not be present.

By default, the first form that matches all criteria will be returned.

my $form = $mech->form_with( name => order_form, method => POST );

If you want the second, third or nth match, pass an optional arguments hash reference as the final parameter with a key n to pick which instance you want. The numbering starts at 1.

my $form = $mech->form_with( method => POST, { n => 4 } );

If the n parameter is not passed, and there is more than one form on the page matching these criteria, then the first one is used, and a warning is generated.

If it is found, the form is returned as an HTML::Form object and set internally for later used with Mech’s form methods such as field() and click().

Returns undef if no form is found.

FIELD METHODS

These methods allow you to set the values of fields in a given form.

$mech->field( $name, $value, $number )

$mech->field( $name, \values, $number )

$mech->field( $name, \file_upload_values, $number )

Given the name of a field, set its value to the value specified. This applies to the current form (as set by the form_name() or form_number() method or defaulting to the first form on the page).

If the field is of type “file”, its value should be an arrayref. Example:

$mech->field( $file_input, [/tmp/file.txt] );

Value examples for “file” inputs, followed by explanation of what each index mean:

# 0: filepath 1: filename 3: headers [/tmp/file.txt] [/tmp/file.txt, filename.txt] [/tmp/file.txt, filename.txt, @headers] [/tmp/file.txt, filename.txt, Content => some content] [undef, filename.txt, Content => content here]

Index 0 is the filepath that will be read from disk. Index 1 is the filename which will be used in the HTTP request body; if not given, filepath (index 0) is used instead. If Content => content here is used as shown, then filepath will be ignored.

The optional $number parameter is used to distinguish between two fields with the same name. The fields are numbered from 1.

$mech->select($name, $new_or_additional_single_value)

$mech->select($name, \new_single_value_by_number)

$mech->select($name, \new_list_of_values)

$mech->select($name, \new_list_of_values_by_number)

Given the name of a select field, set its value to the value specified.

# select foo $mech->select($name, foo);

If the field is not <select multiple> and the $value is an array reference, only the first value will be set. [Note: until version 1.05_03 the documentation claimed that only the last value would be set, but this was incorrect.]

# select bar $mech->select($name, [bar, ignored, ignored]);

Passing $value as a hash reference with an n key selects an item by number.

# select the third value $mech->select($name, {n => 3});

The numbering starts at 1. This applies to the current form.

If you have a field with <select multiple> and you pass a single $value, then $value will be added to the list of fields selected, without clearing the others.

# add bar to the list of selected values $mech->select($name, bar);

However, if you pass an array reference, then all previously selected values will be cleared and replaced with all values inside the array reference.

# replace the selection with foo and bar $mech->select($name, [foo, bar]);

This also works when selecting by numbers, in which case the value of the n key will be an array reference of value numbers you want to replace the selection with.

# replace the selection with the 2nd and 4th element $mech->select($name, {n => [2, 4]});

To add multiple additional values to the list of selected fields without clearing, call select in the simple $value form with each single value in a loop.

# add all values in the array to the selection $mech->select($name, $_) for @additional_values;

Returns true on successfully setting the value. On failure, returns false and calls $self->warn() with an error message.

$mech->set_fields( $name => $value … )

$mech->set_fields( $name => \value_and_instance_number )

$mech->set_fields( $name => \value_instance_number )

$mech->set_fields( $name => \file_upload )

This method sets multiple fields of the current form. It takes a list of field name and value pairs. If there is more than one field with the same name, the first one found is set. If you want to select which of the duplicate field to set, use a value which is an anonymous array which has the field value and its number as the 2 elements.

# set the second $name field to foo $mech->set_fields( $name => [ foo, 2 ] );

The value of a field of type “file” should be an arrayref as described in field(). Examples:

$mech->set_fields( $file_field => [/tmp/file.txt] ); $mech->set_fields( $file_field => [/tmp/file.txt, filename.txt] );

The value for a “file” input can also be an arrayref containing an arrayref and a number, as documented in submit_form(). The number will be used to find the field in the form. Example:

$mech->set_fields( $file_field => [[/tmp/file.txt], 1] );

The fields are numbered from 1.

For fields that have a predefined set of values, you may also provide a reference to an integer, if you don’t know the options for the field, but you know you just want (e.g.) the first one.

# select the first value in the $name select box $mech->set_fields( $name => � ); # select the last value in the $name select box $mech->set_fields( $name => \1 );

This applies to the current form.

$mech->set_visible( @criteria )

This method sets fields of the current form without having to know their names. So if you have a login screen that wants a username and password, you do not have to fetch the form and inspect the source (or use the mech-dump utility, installed with WWW::Mechanize) to see what the field names are; you can just say

$mech->set_visible( $username, $password );

and the first and second fields will be set accordingly. The method is called set_visible because it acts only on visible fields; hidden form inputs are not considered. The order of the fields is the order in which they appear in the HTML source which is nearly always the order anyone viewing the page would think they are in, but some creative work with tables could change that; caveat user.

Each element in @criteria is either a field value or a field specifier. A field value is a scalar. A field specifier allows you to specify the type of input field you want to set and is denoted with an arrayref containing two elements. So you could specify the first radio button with

$mech->set_visible( [ radio => KCRW ] );

Field values and specifiers can be intermixed, hence

$mech->set_visible( fred, secret, [ option => Checking ] );

would set the first two fields to “fred” and “secret”, and the next OPTION menu field to “Checking”.

The possible field specifier types are: “text”, “password”, “hidden”, “textarea”, “file”, “image”, “submit”, “radio”, “checkbox” and “option”.

set_visible returns the number of values set.

$mech->tick( $name, $value [, $set] )

“Ticks” the first checkbox that has both the name and value associated with it on the current form. If there is no value to the input, just pass an empty string as the value. Dies if there is no named checkbox for the value given, if a value is given. Passing in a false value as the third optional argument will cause the checkbox to be unticked. The third value does not need to be set if you wish to merely tick the box.

$mech->tick(extra, cheese); $mech->tick(extra, mushrooms); $mech->tick(no_value, ); # <input type=“checkbox” name=“no_value”>

$mech->untick($name, $value)

Causes the checkbox to be unticked. Shorthand for tick($name,$value,undef)

$mech->value( $name [, $number] )

Given the name of a field, return its value. This applies to the current form.

The optional $number parameter is used to distinguish between two fields with the same name. The fields are numbered from 1.

If the field is of type file (file upload field), the value is always cleared to prevent remote sites from downloading your local files. To upload a file, specify its file name explicitly.

$mech->click( $button [, $x, $y] )

Has the effect of clicking a button on the current form. The first argument is the name of the button to be clicked. The second and third arguments (optional) allow you to specify the (x,y) coordinates of the click.

If there is only one button on the form, $mech->click() with no arguments simply clicks that one button.

Returns an HTTP::Response object.

$mech->click_button( … )

Has the effect of clicking a button on the current form by specifying its attributes. The arguments are a list of key/value pairs. Only one of name, id, number, input or value must be specified in the keys.

Dies if no button is found.

  • name => name Clicks the button named name in the current form.

  • id => id Clicks the button with the id id in the current form.

  • number => n Clicks the nth button with type submit in the current form. Numbering starts at 1.

  • value => value Clicks the button with the value value in the current form.

  • input => $inputobject Clicks on the button referenced by $inputobject, an instance of HTML::Form::SubmitInput obtained e.g. from $mech->current_form()->find_input( undef, submit ) $inputobject must belong to the current form.

  • x => x

  • y => y These arguments (optional) allow you to specify the (x,y) coordinates of the click.

$mech->submit()

Submits the current form, without specifying a button to click. Actually, no button is clicked at all.

Returns an HTTP::Response object.

This used to be a synonym for $mech->click( submit ), but is no longer so.

$mech->submit_form( … )

This method lets you select a form from the previously fetched page, fill in its fields, and submit it. It combines the form_number/form_name, set_fields and click methods into one higher level call. Its arguments are a list of key/value pairs, all of which are optional.

  • fields => \%fields Specifies the fields to be filled in the current form.

  • with_fields => \%fields Probably all you need for the common case. It combines a smart form selector and data setting in one operation. It selects the first form that contains all fields mentioned in \%fields. This is nice because you don’t need to know the name or number of the form to do this. (calls form_with_fields() and set_fields()). If you choose with_fields, the fields option will be ignored. The form_number, form_name and form_id options will still be used. An exception will be thrown unless exactly one form matches all of the provided criteria.

  • form_number => n Selects the nth form (calls form_number(). If this param is not specified, the currently-selected form is used.

  • form_name => name Selects the form named name (calls form_name())

  • form_id => ID Selects the form with ID ID (calls form_id())

  • button => button Clicks on button button (calls click())

  • x => x, y => y Sets the x or y values for click()

  • strict_forms => bool Sets the HTML::Form strict flag which causes form submission to croak if any of the passed fields don’t exist on the page, and/or a value doesn’t exist in a select element. By default HTML::Form sets this value to false. This behavior can also be turned on globally by passing strict_forms => 1 to WWW::Mechanize->new. If you do that, you can still disable it for individual calls by passing strict_forms => 0 here.

If no form is selected, the first form found is used.

If button is not passed, then the submit() method is used instead.

If you want to submit a file and get its content from a scalar rather than a file in the filesystem, you can use:

$mech->submit_form(with_fields => { logfile => [ [ undef, whatever, Content => $content ], 1 ] } );

Returns an HTTP::Response object.

MISCELLANEOUS METHODS

$mech->add_header( name => $value [, name => $value… ] )

Sets HTTP headers for the agent to add or remove from the HTTP request.

$mech->add_header( Encoding => text/klingon );

If a value is undef, then that header will be removed from any future requests. For example, to never send a Referer header:

$mech->add_header( Referer => undef );

If you want to delete a header, use delete_header.

Returns the number of name/value pairs added.

NOTE: This method was very different in WWW::Mechanize before 1.00. Back then, the headers were stored in a package hash, not as a member of the object instance. Calling add_header() would modify the headers for every WWW::Mechanize object, even after your object no longer existed.

$mech->delete_header( name [, name … ] )

Removes HTTP headers from the agent’s list of special headers. For instance, you might need to do something like:

# Dont send a Referer for this URL $mech->add_header( Referer => undef ); # Get the URL $mech->get( $url ); # Back to the default behavior $mech->delete_header( Referer );

$mech->quiet(true/false)

Allows you to suppress warnings to the screen.

$mech->quiet(0); # turns on warnings (the default) $mech->quiet(1); # turns off warnings $mech->quiet(); # returns the current quietness status

$mech->autocheck(true/false)

Allows you to enable and disable autochecking.

Autocheck checks each request made to see if it was successful. This saves you the trouble of manually checking yourself. Any errors found are errors, not warnings. Please see new for more details.

$mech->autocheck(1); # turns on automatic request checking (the default) $mech->autocheck(0); # turns off automatic request checking $mech->autocheck(); # returns the current autocheck status

$mech->stack_depth( $max_depth )

Get or set the page stack depth. Use this if you’re doing a lot of page scraping and running out of memory.

A value of 0 means “no history at all.” By default, the max stack depth is humongously large, effectively keeping all history.

$mech->save_content( $filename, %opts )

Dumps the contents of $mech->content into $filename. $filename will be overwritten. Dies if there are any errors.

If the content type does not begin with "text/", then the content is saved in binary mode (i.e. binmode() is set on the output filehandle).

Additional arguments can be passed as key/value pairs:

$mech->save_content( $filename, binary => 1 )
Filehandle is set with binmode to :raw and contents are taken calling $self->content(decoded_by_headers => 1). Same as calling: $mech->save_content( $filename, binmode => :raw, decoded_by_headers => 1 ); This should be the safest way to save contents verbatim.

$mech->save_content( $filename, binmode => $binmode )
Filehandle is set to binary mode. If $binmode begins with :, it is passed as a parameter to binmode: binmode $fh, $binmode; otherwise the filehandle is set to binary mode if $binmode is true: binmode $fh;

all other arguments
are passed as-is to $mech->content(%opts). In particular, decoded_by_headers might come handy if you want to revert the effect of line compression performed by the web server but without further interpreting the contents (e.g. decoding it according to the charset).

$mech->dump_headers( [$fh] )

Prints a dump of the HTTP response headers for the most recent response. If $fh is not specified or is undef, it dumps to STDOUT.

Unlike the rest of the dump_* methods, $fh can be a scalar. It will be used as a file name.

Prints a dump of the links on the current page to $fh. If $fh is not specified or is undef, it dumps to STDOUT.

If $absolute is true, links displayed are absolute, not relative.

$mech->dump_images( [[$fh], $absolute] )

Prints a dump of the images on the current page to $fh. If $fh is not specified or is undef, it dumps to STDOUT.

If $absolute is true, links displayed are absolute, not relative.

The output will include empty lines for images that have no src attribute and therefore no URL.

$mech->dump_forms( [$fh] )

Prints a dump of the forms on the current page to $fh. If $fh is not specified or is undef, it dumps to STDOUT. Running the following:

my $mech = WWW::Mechanize->new(); $mech->get(“https://www.google.com/"); $mech->dump_forms;

will print:

GET https://www.google.com/search [f] ie=ISO-8859-1 (hidden readonly) hl=en (hidden readonly) source=hp (hidden readonly) biw= (hidden readonly) bih= (hidden readonly) q= (text) btnG=Google Search (submit) btnI=Im Feeling Lucky (submit) gbv=1 (hidden readonly)

$mech->dump_text( [$fh] )

Prints a dump of the text on the current page to $fh. If $fh is not specified or is undef, it dumps to STDOUT.

OVERRIDDEN LWP::UserAgent METHODS

$mech->clone()

Clone the mech object. The clone will be using the same cookie jar as the original mech.

$mech->redirect_ok()

An overloaded version of redirect_ok() in LWP::UserAgent. This method is used to determine whether a redirection in the request should be followed.

Note that WWW::Mechanize’s constructor pushes POST on to the agent’s requests_redirectable list.

$mech->request( $request [, $arg [, $size]])

Overloaded version of request() in LWP::UserAgent. Performs the actual request. Normally, if you’re using WWW::Mechanize, it’s because you don’t want to deal with this level of stuff anyway.

Note that $request will be modified.

Returns an HTTP::Response object.

$mech->update_html( $html )

Allows you to replace the HTML that the mech has found. Updates the forms and links parse-trees that the mech uses internally.

Say you have a page that you know has malformed output, and you want to update it so the links come out correctly:

my $html = $mech->content; $html =~ s[</option>.{0,3}</td>][</option></select></td>]isg; $mech->update_html( $html );

This method is also used internally by the mech itself to update its own HTML content when loading a page. This means that if you would like to systematically perform the above HTML substitution, you would overload update_html in a subclass thusly:

package MyMech; use base WWW::Mechanize; sub update_html { my ($self, $html) = @_; $html =~ s[</option>.{0,3}</td>][</option></select></td>]isg; $self->WWW::Mechanize::update_html( $html ); }

If you do this, then the mech will use the tidied-up HTML instead of the original both when parsing for its own needs, and for returning to you through content().

Overloading this method is also the recommended way of implementing extra validation steps (e.g. link checkers) for every HTML page received. warn and warn would then come in handy to signal validation errors.

$mech->credentials( $username, $password )

Provide credentials to be used for HTTP Basic authentication for all sites and realms until further notice.

The four argument form described in LWP::UserAgent is still supported.

$mech->get_basic_credentials( $realm, $uri, $isproxy )

Returns the credentials for the realm and URI.

$mech->clear_credentials()

Remove any credentials set up with credentials().

INHERITED UNCHANGED LWP::UserAgent METHODS

As a subclass of LWP::UserAgent, WWW::Mechanize inherits all of LWP::UserAgent’s methods. Many of which are overridden or extended. The following methods are inherited unchanged. View the LWP::UserAgent documentation for their implementation descriptions.

This is not meant to be an inclusive list. LWP::UA may have added others.

$mech->head()

Inherited from LWP::UserAgent.

$mech->mirror()

Inherited from LWP::UserAgent.

$mech->simple_request()

Inherited from LWP::UserAgent.

$mech->is_protocol_supported()

Inherited from LWP::UserAgent.

$mech->prepare_request()

Inherited from LWP::UserAgent.

$mech->progress()

Inherited from LWP::UserAgent.

INTERNAL-ONLY METHODS

These methods are only used internally. You probably don’t need to know about them.

$mech->_update_page($request, $response)

Updates all internal variables in $mech as if $request was just performed, and returns $response. The page stack is not altered by this method, it is up to caller (e.g. request) to do that.

$mech->_modify_request( $req )

Modifies a HTTP::Request before the request is sent out, for both GET and POST requests.

We add a Referer header, as well as header to note that we can accept gzip encoded content, if Compress::Zlib is installed.

$mech->_make_request()

Convenience method to make it easier for subclasses like WWW::Mechanize::Cached to intercept the request.

$mech->_reset_page()

Resets the internal fields that track page parsed stuff.

Extracts links from the content of a webpage, and populates the {links} property with WWW::Mechanize::Link objects.

$mech->_push_page_stack()

The agent keeps a stack of visited pages, which it can pop when it needs to go BACK and so on.

The current page needs to be pushed onto the stack before we get a new page, and the stack needs to be popped when BACK occurs.

Neither of these take any arguments, they just operate on the $mech object.

warn( @messages )

Centralized warning method, for diagnostics and non-fatal problems. Defaults to calling CORE::warn, but may be overridden by setting onwarn in the constructor.

die( @messages )

Centralized error method. Defaults to calling CORE::die, but may be overridden by setting onerror in the constructor.

BEST PRACTICES

The default settings can get you up and running quickly, but there are settings you can change in order to make your life easier.

autocheck
autocheck can save you the overhead of checking status codes for success. You may outgrow it as your needs get more sophisticated, but it’s a safe option to start with. my $agent = WWW::Mechanize->new( autocheck => 1 );

cookie_jar
You are encouraged to install Mozilla::PublicSuffix and use HTTP::CookieJar::LWP as your cookie jar. HTTP::CookieJar::LWP provides a better security model matching that of current Web browsers when Mozilla::PublicSuffix is installed. use HTTP::CookieJar::LWP (); my $jar = HTTP::CookieJar::LWP->new; my $agent = WWW::Mechanize->new( cookie_jar => $jar );

protocols_allowed
This option is inherited directly from LWP::UserAgent. It may be used to allow arbitrary protocols. my $agent = WWW::Mechanize->new( protocols_allowed => [ http, https ] ); This will prevent you from inadvertently following URLs like file:///etc/passwd

protocols_forbidden
This option is also inherited directly from LWP::UserAgent. It may be used to deny arbitrary protocols. my $agent = WWW::Mechanize->new( protocols_forbidden => [ file, mailto, ssh, ] ); This will prevent you from inadvertently following URLs like file:///etc/passwd

strict_forms
Consider turning on the strict_forms option when you create a new Mech. This will perform a helpful sanity check on form fields every time you are submitting a form, which can save you a lot of debugging time. my $agent = WWW::Mechanize->new( strict_forms => 1 ); If you do not want to have this option globally, you can still turn it on for individual forms. $agent->submit_form( fields => { foo => bar } , strict_forms => 1 );

WWW::MECHANIZE’S GIT REPOSITORY

WWW::Mechanize is hosted at GitHub.

Repository: <https://github.com/libwww-perl/WWW-Mechanize>. Bugs: <https://github.com/libwww-perl/WWW-Mechanize/issues>.

OTHER DOCUMENTATION

Spidering Hacks, by Kevin Hemenway and Tara Calishain

Spidering Hacks from O’Reilly (<http://www.oreilly.com/catalog/spiderhks/>) is a great book for anyone wanting to know more about screen-scraping and spidering.

There are six hacks that use Mech or a Mech derivative:

#21 WWW::Mechanize 101

#22 Scraping with WWW::Mechanize

#36 Downloading Images from Webshots

#44 Archiving Yahoo! Groups Messages with WWW::Yahoo::Groups

#64 Super Author Searching

#73 Scraping TV Listings

The book was also positively reviewed on Slashdot: <http://books.slashdot.org/article.pl?sid=03/12/11/2126256>

ONLINE RESOURCES AND SUPPORT

  • WWW::Mechanize mailing list The Mech mailing list is at <http://groups.google.com/group/www-mechanize-users> and is specific to Mechanize, unlike the LWP mailing list below. Although it is a users list, all development discussion takes place here, too.

  • LWP mailing list The LWP mailing list is at <http://lists.perl.org/showlist.cgi?name=libwww>, and is more user-oriented and well-populated than the WWW::Mechanize list.

  • Perlmonks <http://perlmonks.org> is an excellent community of support, and many questions about Mech have already been answered there.

  • WWW::Mechanize::Examples A random array of examples submitted by users, included with the Mechanize distribution.

ARTICLES ABOUT WWW::MECHANIZE

  • <http://www.ibm.com/developerworks/linux/library/wa-perlsecure/> IBM article “Secure Web site access with Perl”

  • <http://www.oreilly.com/catalog/googlehks2/chapter/hack84.pdf> Leland Johnson’s hack #84 in Google Hacks, 2nd Edition is an example of a production script that uses WWW::Mechanize and HTML::TableContentParser. It takes in keywords and returns the estimated price of these keywords on Google’s AdWords program.

  • <http://www.perl.com/pub/a/2004/06/04/recorder.html> Linda Julien writes about using HTTP::Recorder to create WWW::Mechanize scripts.

  • <http://www.developer.com/lang/other/article.php/3454041> Jason Gilmore’s article on using WWW::Mechanize for scraping sales information from Amazon and eBay.

  • <http://www.perl.com/pub/a/2003/01/22/mechanize.html> Chris Ball’s article about using WWW::Mechanize for scraping TV listings.

  • <http://www.stonehenge.com/merlyn/LinuxMag/col47.html> Randal Schwartz’s article on scraping Yahoo News for images. It’s already out of date: He manually walks the list of links hunting for matches, which wouldn’t have been necessary if the find_link() method existed at press time.

  • <http://www.perladvent.org/2002/16th/> WWW::Mechanize on the Perl Advent Calendar, by Mark Fowler.

  • <http://www.linux-magazin.de/ausgaben/2004/03/datenruessel/> Michael Schilli’s article on Mech and WWW::Mechanize::Shell for the German magazine Linux Magazin.

Other modules that use Mechanize

Here are modules that use or subclass Mechanize. Let me know of any others:

  • Finance::Bank::LloydsTSB

  • HTTP::Recorder Acts as a proxy for web interaction, and then generates WWW::Mechanize scripts.

  • Win32::IE::Mechanize Just like Mech, but using Microsoft Internet Explorer to do the work.

  • WWW::Bugzilla

  • WWW::Google::Groups

  • WWW::Hotmail

  • WWW::Mechanize::Cached

  • WWW::Mechanize::Cached::GZip

  • WWW::Mechanize::FormFiller

  • WWW::Mechanize::Shell

  • WWW::Mechanize::Sleepy

  • WWW::Mechanize::SpamCop

  • WWW::Mechanize::Timed

  • WWW::SourceForge

  • WWW::Yahoo::Groups

  • WWW::Scripter

ACKNOWLEDGEMENTS

Thanks to the numerous people who have helped out on WWW::Mechanize in one way or another, including Kirrily Robert for the original WWW::Automate, Lyle Hopkins, Damien Clark, Ansgar Burchardt, Gisle Aas, Jeremy Ary, Hilary Holz, Rafael Kitover, Norbert Buchmuller, Dave Page, David Sainty, H.Merijn Brand, Matt Lawrence, Michael Schwern, Adriano Ferreira, Miyagawa, Peteris Krumins, Rafael Kitover, David Steinbrunner, Kevin Falcone, Mike O’Regan, Mark Stosberg, Uri Guttman, Peter Scott, Philippe Bruhat, Ian Langworth, John Beppu, Gavin Estey, Jim Brandt, Ask Bjoern Hansen, Greg Davies, Ed Silva, Mark-Jason Dominus, Autrijus Tang, Mark Fowler, Stuart Children, Max Maischein, Meng Wong, Prakash Kailasa, Abigail, Jan Pazdziora, Dominique Quatravaux, Scott Lanning, Rob Casey, Leland Johnson, Joshua Gatcomb, Julien Beasley, Abe Timmerman, Peter Stevens, Pete Krawczyk, Tad McClellan, and the late great Iain Truskett.

AUTHOR

Andy Lester <andy at petdance.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2004 by Andy Lester.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

263 - Linux cli command Spreadsheet_WriteExcel_Workbookpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_WriteExcel_Workbookpm and provides detailed information about the command Spreadsheet_WriteExcel_Workbookpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_WriteExcel_Workbookpm.

NAME 🖥️ Spreadsheet_WriteExcel_Workbookpm 🖥️

A writer class for Excel Workbooks.

SYNOPSIS

See the documentation for Spreadsheet::WriteExcel

DESCRIPTION

This module is used in conjunction with Spreadsheet::WriteExcel.

AUTHOR

John McNamara [email protected]

COPYRIGHT

Copyright MM-MMX, John McNamara.

All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

264 - Linux cli command XtCallbackNone

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtCallbackNone and provides detailed information about the command XtCallbackNone, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtCallbackNone.

NAME 🖥️ XtCallbackNone 🖥️

map a pop-up

SYNTAX

#include <X11/Intrinsic.h>

void XtPopup(Widget popup_shell, XtGrabKind grab_kind);

void XtPopupSpringLoaded(Widget popup_shell);

void XtCallbackNone(Widget w, XtPointer client_data, XtPointer call_data);

void XtCallbackNonexclusive(Widget w, XtPointer client_data, XtPointer call_data);

void XtCallbackExclusive(Widget w, XtPointer client_data, XtPointer call_data);

ACTIONS

void XtMenuPopup(String shell_name);

ARGUMENTS

call_data
Specifies the callback data, which is not used by this procedure.

client_data
Specifies the pop-up shell.

grab_kind
Specifies the way in which user events should be constrained.

popup_shell
Specifies the widget shell.

  1. Specifies the widget.

DESCRIPTION

The XtPopup function performs the following:

  • Calls XtCheckSubclass to ensure popup_shell is a subclass of Shell.

  • Generates an error if the shell’s popped_up field is already True.

  • Calls the callback procedures on the shell’s popup_callback list.

  • Sets the shell popped_up field to True, the shell spring_loaded field to False, and the shell grab_kind field from grab_kind.

  • If the shell’s create_popup_child field is non-NULL, XtPopup calls it with popup_shell as the parameter.

  • If grab_kind is either XtGrabNonexclusive or XtGrabExclusive, it calls:

XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), False)

  • Calls XtRealizeWidget with popup_shell specified.

  • Calls XMapWindow with popup_shell specified.

The XtPopupSpringLoaded function performs exactly as XtPopup except that it sets the shell spring_loaded field to True and always calls XtAddGrab with exclusive True and spring_loaded True.

The XtCallbackNone, XtCallbackNonexclusive, and XtCallbackExclusive functions call XtPopup with the shell specified by the client data argument and grab_kind set as the name specifies. XtCallbackNone, XtCallbackNonexclusive, and XtCallbackExclusive specify XtGrabNone, XtGrabNonexclusive, and XtGrabExclusive, respectively. Each function then sets the widget that executed the callback list to be insensitive by using XtSetSensitive. Using these functions in callbacks is not required. In particular, an application must provide customized code for callbacks that create pop-up shells dynamically or that must do more than desensitizing the button.

XtMenuPopup is known to the translation manager, which must perform special actions for spring-loaded pop-ups. Calls to XtMenuPopup in a translation specification are mapped into calls to a nonexported action procedure, and the translation manager fills in parameters based on the event specified on the left-hand side of a translation.

If XtMenuPopup is invoked on ButtonPress (possibly with modifiers), the translation manager pops up the shell with grab_kind set to XtGrabExclusive and spring_loaded set to True. If XtMenuPopup is invoked on EnterWindow (possibly with modifiers), the translation manager pops up the shell with grab_kind set to XtGrabNonexclusive and spring_loaded set to False. Otherwise, the translation manager generates an error. When the widget is popped up, the following actions occur:

  • Calls XtCheckSubclass to ensure popup_shell is a subclass of Shell.

  • Generates an error if the shell’s popped_up field is already True.

  • Calls the callback procedures on the shell’s popup_callback list.

  • Sets the shell popped_up field to True and the shell grab_kind and spring_loaded fields appropriately.

  • If the shell’s create_popup_child field is non-NULL, it is called with popup_shell as the parameter.

  • Calls:

XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), spring_loaded)

  • Calls XtRealizeWidget with popup_shell specified.

  • Calls XMapWindow with popup_shell specified.

(Note that these actions are the same as those for XtPopup.) XtMenuPopup tries to find the shell by searching the widget tree starting at the parent of the widget in which it is invoked. If it finds a shell with the specified name in the pop-up children of that parent, it pops up the shell with the appropriate parameters. Otherwise, it moves up the parent chain as needed. If XtMenuPopup gets to the application widget and cannot find a matching shell, it generates an error.

SEE ALSO

XtCreatePopupShell(3), XtPopdown(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

265 - Linux cli command XtRemoveSignal

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtRemoveSignal and provides detailed information about the command XtRemoveSignal, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtRemoveSignal.

NAME 🖥️ XtRemoveSignal 🖥️

register and remove a signal source

SYNTAX

#include <X11/Intrinsic.h>

XtSignalId XtAppAddSignal(XtAppContext app_context, XtSignalCallbackProc proc, XtPointer client_data);

void XtRemoveSignal(XtSignalId id);

void XtNoticeSignal(XtSignalId id);

ARGUMENTS

app_context
Specifies the application context.

client_data
Specifies the argument that is to be passed to the specified procedure when a signal has been raised.

id
Specifies the ID returned from the corresponding XtAppAddSignal call.

proc
Specifies the procedure that is to be called when the signal has been raised.

DESCRIPTION

The XtAppAddSignal function initiates a mechanism for handling signals within the context of the Intrinsics. Prior to establishing an operating system dependent signal handler the application may call XtAppAddSignal and store the returned id in a place accessible to the signal handler.

Upon receipt of a signal from the operating system, the application may call XtNoticeSignal passing the id returned by the call to XtAppAddSignal.

XtNoticeSignal is the only Intrinsics function that can safely be called from a signal handler. If XtNoticeSignal is called multiple times before the Intrinsics are able to invoke the registered callback, the callback is only called once. Logically the Intrinsics maintain pending for each registered callback. This flag is initially False and is set to True by XtNoticeSignal; the Intrinsics invoke the callback whenever the flag is True, and the flag is set to False just before the callback is invoked.

The XtRemoveSignal function is called to remove the specified Intrinsics signal handler. The client should disable the source of the signal before calling XtRemoveSignal.

SEE ALSO

XtAppAddTimeOut(3),XtAppAddInput(3),XtAppAddWorkProc(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

266 - Linux cli command HTTP_Request_Commonpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTTP_Request_Commonpm and provides detailed information about the command HTTP_Request_Commonpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTTP_Request_Commonpm.

NAME 🖥️ HTTP_Request_Commonpm 🖥️

Construct common HTTP::Request objects

VERSION

version 6.46

SYNOPSIS

use HTTP::Request::Common; $ua = LWP::UserAgent->new; $ua->request(GET http://www.sn.no/); $ua->request(POST http://somewhere/foo, foo => bar, bar => foo); $ua->request(PATCH http://somewhere/foo, foo => bar, bar => foo); $ua->request(PUT http://somewhere/foo, foo => bar, bar => foo); $ua->request(OPTIONS http://somewhere/foo, foo => bar, bar => foo);

DESCRIPTION

This module provides functions that return newly created HTTP::Request objects. These functions are usually more convenient to use than the standard HTTP::Request constructor for the most common requests.

Note that LWP::UserAgent has several convenience methods, including get, head, delete, post and put.

The following functions are provided:

GET $url

GET $url, Header => Value,…

The GET function returns an HTTP::Request object initialized with the “GET” method and the specified URL. It is roughly equivalent to the following call HTTP::Request->new( GET => $url, HTTP::Headers->new(Header => Value,…), ) but is less cluttered. What is different is that a header named Content will initialize the content part of the request instead of setting a header field. Note that GET requests should normally not have a content, so this hack makes more sense for the PUT, PATCH and POST functions described below. The get(...) method of LWP::UserAgent exists as a shortcut for $ua->request(GET ...).

HEAD $url

HEAD $url, Header => Value,…

Like GET() but the method in the request is “HEAD”. The head(...) method of LWP::UserAgent exists as a shortcut for $ua->request(HEAD ...).

DELETE $url

DELETE $url, Header => Value,…

Like GET but the method in the request is DELETE. This function is not exported by default.

PATCH $url

PATCH $url, Header => Value,…

PATCH $url, $form_ref, Header => Value,…

PATCH $url, Header => Value,…, Content => $form_ref

PATCH $url, Header => Value,…, Content => $content

The same as POST below, but the method in the request is PATCH.

PUT $url

PUT $url, Header => Value,…

PUT $url, $form_ref, Header => Value,…

PUT $url, Header => Value,…, Content => $form_ref

PUT $url, Header => Value,…, Content => $content

The same as POST below, but the method in the request is PUT

OPTIONS $url

OPTIONS $url, Header => Value,…

OPTIONS $url, $form_ref, Header => Value,…

OPTIONS $url, Header => Value,…, Content => $form_ref

OPTIONS $url, Header => Value,…, Content => $content

The same as POST below, but the method in the request is OPTIONS This was added in version 6.21, so you should require that in your code: use HTTP::Request::Common 6.21;

POST $url

POST $url, Header => Value,…

POST $url, $form_ref, Header => Value,…

POST $url, Header => Value,…, Content => $form_ref

POST $url, Header => Value,…, Content => $content

POST, PATCH and PUT all work with the same parameters. %data = ( title => something, body => something else ); $ua = LWP::UserAgent->new(); $request = HTTP::Request::Common::POST( $url, [ %data ] ); $response = $ua->request($request); They take a second optional array or hash reference parameter $form_ref. The content can also be specified directly using the Content pseudo-header, and you may also provide the $form_ref this way. The Content pseudo-header steals a bit of the header field namespace as there is no way to directly specify a header that is actually called “Content”. If you really need this you must update the request returned in a separate statement. The $form_ref argument can be used to pass key/value pairs for the form content. By default we will initialize a request using the application/x-www-form-urlencoded content type. This means that you can emulate an HTML <form> POSTing like this: POST http://www.perl.org/survey.cgi, [ name => Gisle Aas, email => [email protected], gender => M, born => 1964, perc => 3%, ]; This will create an HTTP::Request object that looks like this: POST http://www.perl.org/survey.cgi Content-Length: 66 Content-Type: application/x-www-form-urlencoded name=Gisle%20Aas&email=gisle%40aas.no&gender=M&born=1964&perc=3%25 Multivalued form fields can be specified by either repeating the field name or by passing the value as an array reference. The POST method also supports the multipart/form-data content used for Form-based File Upload as specified in RFC 1867. You trigger this content format by specifying a content type of form-data as one of the request headers. If one of the values in the $form_ref is an array reference, then it is treated as a file part specification with the following interpretation: [ $file, $filename, Header => Value… ] [ undef, $filename, Header => Value,…, Content => $content ] The first value in the array ($file) is the name of a file to open. This file will be read and its content placed in the request. The routine will croak if the file can’t be opened. Use an undef as $file value if you want to specify the content directly with a Content header. The $filename is the filename to report in the request. If this value is undefined, then the basename of the $file will be used. You can specify an empty string as $filename if you want to suppress sending the filename when you provide a $file value. If a $file is provided by no Content-Type header, then Content-Type and Content-Encoding will be filled in automatically with the values returned by LWP::MediaTypes::guess_media_type() Sending my ~/.profile to the survey used as example above can be achieved by this: POST http://www.perl.org/survey.cgi, Content_Type => form-data, Content => [ name => Gisle Aas, email => [email protected], gender => M, born => 1964, init => ["$ENV{HOME}/.profile"], ] This will create an HTTP::Request object that almost looks this (the boundary and the content of your ~/.profile is likely to be different): POST http://www.perl.org/survey.cgi Content-Length: 388 Content-Type: multipart/form-data; boundary=“6G+f” –6G+f Content-Disposition: form-data; name=“name” Gisle Aas –6G+f Content-Disposition: form-data; name=“email” [email protected] –6G+f Content-Disposition: form-data; name=“gender” M –6G+f Content-Disposition: form-data; name=“born” 1964 –6G+f Content-Disposition: form-data; name=“init”; filename=".profile" Content-Type: text/plain PATH=/local/perl/bin:$PATH export PATH –6G+f– If you set the $DYNAMIC_FILE_UPLOAD variable (exportable) to some TRUE value, then you get back a request object with a subroutine closure as the content attribute. This subroutine will read the content of any files on demand and return it in suitable chunks. This allow you to upload arbitrary big files without using lots of memory. You can even upload infinite files like /dev/audio if you wish; however, if the file is not a plain file, there will be no Content-Length header defined for the request. Not all servers (or server applications) like this. Also, if the file(s) change in size between the time the Content-Length is calculated and the time that the last chunk is delivered, the subroutine will Croak. The post(...) method of LWP::UserAgent exists as a shortcut for $ua->request(POST ...).

SEE ALSO

HTTP::Request, LWP::UserAgent

Also, there are some examples in “EXAMPLES” in HTTP::Request that you might find useful. For example, batch requests are explained there.

AUTHOR

Gisle Aas <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 1994 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

267 - Linux cli command imaxabs

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command imaxabs and provides detailed information about the command imaxabs, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the imaxabs.

NAME 🖥️ imaxabs 🖥️

compute the absolute value of an integer

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int abs(int j);
long labs(long j);
long long llabs(long long j);
#include <inttypes.h>
intmax_t imaxabs(intmax_t j);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

llabs():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The abs() function computes the absolute value of the integer argument j. The labs(), llabs(), and imaxabs() functions compute the absolute value of the argument j of the appropriate integer type for the function.

RETURN VALUE

Returns the absolute value of the integer argument, of the appropriate integer type for the function.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

abs(), labs(), llabs(), imaxabs()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99, SVr4, 4.3BSD.

C89 only includes the abs() and labs() functions; the functions llabs() and imaxabs() were added in C99.

NOTES

Trying to take the absolute value of the most negative integer is not defined.

The llabs() function is included since glibc 2.0. The imaxabs() function is included since glibc 2.1.1.

For llabs() to be declared, it may be necessary to define _ISOC99_SOURCE or _ISOC9X_SOURCE (depending on the version of glibc) before including any standard headers.

By default, GCC handles abs(), labs(), and (since GCC 3.0) llabs() and imaxabs() as built-in functions.

SEE ALSO

cabs(3), ceil(3), fabs(3), floor(3), rint(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

268 - Linux cli command pthread_mutex_unlock

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_mutex_unlock and provides detailed information about the command pthread_mutex_unlock, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_mutex_unlock.

NAME 🖥️ pthread_mutex_unlock 🖥️

operations on mutexes

SYNOPSIS

#include <pthread.h>
pthread_mutex_t fastmutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t recmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
pthread_mutex_t errchkmutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
int pthread_mutex_init(pthread_mutex_t *mutex,
 const pthread_mutexattr_t *mutexattr);
int pthread_mutex_lock(pthread_mutex_t *mutex);
int pthread_mutex_trylock(pthread_mutex_t *mutex);
int pthread_mutex_unlock(pthread_mutex_t *mutex);
int pthread_mutex_destroy(pthread_mutex_t *mutex);

DESCRIPTION

A mutex is a MUTual EXclusion device, and is useful for protecting shared data structures from concurrent modifications, and implementing critical sections and monitors.

A mutex has two possible states: unlocked (not owned by any thread), and locked (owned by one thread). A mutex can never be owned by two different threads simultaneously. A thread attempting to lock a mutex that is already locked by another thread is suspended until the owning thread unlocks the mutex first.

pthread_mutex_init initializes the mutex object pointed to by mutex according to the mutex attributes specified in mutexattr. If mutexattr is NULL, default attributes are used instead.

The LinuxThreads implementation supports only one mutex attributes, the mutex kind, which is either ``fast’’, ``recursive’’, or ``error checking’’. The kind of a mutex determines whether it can be locked again by a thread that already owns it. The default kind is ``fast’’. See pthread_mutexattr_init(3) for more information on mutex attributes.

Variables of type pthread_mutex_t can also be initialized statically, using the constants PTHREAD_MUTEX_INITIALIZER (for fast mutexes), PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP (for recursive mutexes), and PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP (for error checking mutexes).

pthread_mutex_lock locks the given mutex. If the mutex is currently unlocked, it becomes locked and owned by the calling thread, and pthread_mutex_lock returns immediately. If the mutex is already locked by another thread, pthread_mutex_lock suspends the calling thread until the mutex is unlocked.

If the mutex is already locked by the calling thread, the behavior of pthread_mutex_lock depends on the kind of the mutex. If the mutex is of the ``fast’’ kind, the calling thread is suspended until the mutex is unlocked, thus effectively causing the calling thread to deadlock. If the mutex is of the ``error checking’’ kind, pthread_mutex_lock returns immediately with the error code EDEADLK. If the mutex is of the ``recursive’’ kind, pthread_mutex_lock succeeds and returns immediately, recording the number of times the calling thread has locked the mutex. An equal number of pthread_mutex_unlock operations must be performed before the mutex returns to the unlocked state.

pthread_mutex_trylock behaves identically to pthread_mutex_lock, except that it does not block the calling thread if the mutex is already locked by another thread (or by the calling thread in the case of a ``fast’’ mutex). Instead, pthread_mutex_trylock returns immediately with the error code EBUSY.

pthread_mutex_unlock unlocks the given mutex. The mutex is assumed to be locked and owned by the calling thread on entrance to pthread_mutex_unlock. If the mutex is of the ``fast’’ kind, pthread_mutex_unlock always returns it to the unlocked state. If it is of the ``recursive’’ kind, it decrements the locking count of the mutex (number of pthread_mutex_lock operations performed on it by the calling thread), and only when this count reaches zero is the mutex actually unlocked.

On ``error checking’’ and ``recursive’’ mutexes, pthread_mutex_unlock actually checks at run-time that the mutex is locked on entrance, and that it was locked by the same thread that is now calling pthread_mutex_unlock. If these conditions are not met, an error code is returned and the mutex remains unchanged. ``Fast’’ mutexes perform no such checks, thus allowing a locked mutex to be unlocked by a thread other than its owner. This is non-portable behavior and must not be relied upon.

pthread_mutex_destroy destroys a mutex object, freeing the resources it might hold. The mutex must be unlocked on entrance. In the LinuxThreads implementation, no resources are associated with mutex objects, thus pthread_mutex_destroy actually does nothing except checking that the mutex is unlocked.

CANCELLATION

None of the mutex functions is a cancelation point, not even pthread_mutex_lock, in spite of the fact that it can suspend a thread for arbitrary durations. This way, the status of mutexes at cancelation points is predictable, allowing cancelation handlers to unlock precisely those mutexes that need to be unlocked before the thread stops executing. Consequently, threads using deferred cancelation should never hold a mutex for extended periods of time.

ASYNC-SIGNAL SAFETY

The mutex functions are not async-signal safe. What this means is that they should not be called from a signal handler. In particular, calling pthread_mutex_lock or pthread_mutex_unlock from a signal handler may deadlock the calling thread.

RETURN VALUE

pthread_mutex_init always returns 0. The other mutex functions return 0 on success and a non-zero error code on error.

ERRORS

The pthread_mutex_lock function returns the following error code on error:

EINVAL
The mutex has not been properly initialized.

EDEADLK
The mutex is already locked by the calling thread (``error checking’’ mutexes only).

The pthread_mutex_trylock function returns the following error codes on error:

EBUSY
The mutex could not be acquired because it was currently locked.

EINVAL
The mutex has not been properly initialized.

The pthread_mutex_unlock function returns the following error code on error:

EINVAL
The mutex has not been properly initialized.

EPERM
The calling thread does not own the mutex (``error checking’’ mutexes only).

The pthread_mutex_destroy function returns the following error code on error:

EBUSY
The mutex is currently locked.

SEE ALSO

pthread_mutexattr_init(3), pthread_mutexattr_setkind_np(3), pthread_cancel(3).

EXAMPLE

A shared global variable x can be protected by a mutex as follows:

int x;
pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER;

All accesses and modifications to x should be bracketed by calls to pthread_mutex_lock and pthread_mutex_unlock as follows:

pthread_mutex_lock(&mut);
/* operate on x */
pthread_mutex_unlock(&mut);
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

269 - Linux cli command XtIsWidget

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtIsWidget and provides detailed information about the command XtIsWidget, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtIsWidget.

NAME 🖥️ XtIsWidget 🖥️

obtain and verify a widget’s class

SYNTAX

#include <X11/Intrinsic.h>

WidgetClass XtClass(Widget w);

WidgetClass XtSuperclass(Widget w);

Boolean XtIsSubclass(Widget w, WidgetClass widget_class);

void XtCheckSubclass(Widget widget, WidgetClass widget_class, String message);

Boolean XtIsObject(Widget w);

Boolean XtIsRectObj(Widget w);

Boolean XtIsWidget(Widget w);

Boolean XtIsComposite(Widget w);

Boolean XtIsConstraint(Widget w);

Boolean XtIsShell(Widget w);

Boolean XtIsOverrideShell(Widget w);

Boolean XtIsWMShell(Widget w);

Boolean XtIsVendorShell(Widget w);

Boolean XtIsTransientShell(Widget w);

Boolean XtIsTopLevelShell(Widget w);

Boolean XtIsApplicationShell(Widget w);

Boolean XtIsSessionShell(Widget w);

ARGUMENTS

  1. Specifies the widget.

widget_class
Specifies the widget class.

message
Specifies the message that is to be used.

DESCRIPTION

The XtClass function returns a pointer to the widget’s class structure.

The XtSuperclass function returns a pointer to the widget’s superclass class structure.

The XtIsSubclass function returns True if the class of the specified widget is equal to or is a subclass of the specified class. The widget’s class can be any number of subclasses down the chain and need not be an immediate subclass of the specified class. Composite widgets that need to restrict the class of the items they contain can use XtIsSubclass to find out if a widget belongs to the desired class of objects.

The XtCheckSubclass macro determines if the class of the specified widget is equal to or is a subclass of the specified widget class. The widget can be any number of subclasses down the chain and need not be an immediate subclass of the specified widget class. If the specified widget is not a subclass, XtCheckSubclass constructs an error message from the supplied message, the widget’s actual class, and the expected class and calls XtErrorMsg. XtCheckSubclass should be used at the entry point of exported routines to ensure that the client has passed in a valid widget class for the exported operation.

XtCheckSubclass is only executed when the widget has been compiled with the compiler symbol DEBUG defined; otherwise, it is defined as the empty string and generates no code.

To test if a given widget belongs to a subclass of an Intrinsics-defined class, the Intrinsics defines macros or functions equivalent to XtIsSubclass for each of the built-in classes. These procedures are XtIsObject, XtIsRectObj, XtIsWidget, XtIsComposite, XtIsConstraint, XtIsShell, XtIsOverrideShell, XtIsWMShell, XtIsVendorShell, XtIsTransientShell, XtIsTopLevelShell, XtIsApplicationShell, and XtIsSessionShell.

The

SEE ALSO

XtAppErrorMsg(3), XtDisplay(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

270 - Linux cli command zip_source_seek_compute_offset

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_seek_compute_offset and provides detailed information about the command zip_source_seek_compute_offset, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_seek_compute_offset.

libzip (-lzip)

Use this function to compute the offset for a

or

command.

and

are the arguments to the source callback,

is the current offset and

is the length of the source data or, for

the amount of data written.

On success, it returns the new offset, on error it returns -1 and sets

fails if:

One of the arguments is invalid or the seek would place the offset outside the data.

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

271 - Linux cli command signgam

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command signgam and provides detailed information about the command signgam, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the signgam.

NAME 🖥️ signgam 🖥️

log gamma function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double lgamma(double x);
float lgammaf(float x);
long double lgammal(long double x);
double lgamma_r(double x, int *signp);
float lgammaf_r(float x, int *signp);
long double lgammal_r(long double x, int *signp);
extern int signgam;

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

lgamma():
    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

lgammaf(), lgammal():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

lgamma_r(), lgammaf_r(), lgammal_r():

    /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

signgam:

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

For the definition of the Gamma function, see tgamma(3).

The lgamma(), lgammaf(), and lgammal() functions return the natural logarithm of the absolute value of the Gamma function. The sign of the Gamma function is returned in the external integer signgam declared in <math.h>. It is 1 when the Gamma function is positive or zero, -1 when it is negative.

Since using a constant location signgam is not thread-safe, the functions lgamma_r(), lgammaf_r(), and lgammal_r() have been introduced; they return the sign via the argument signp.

RETURN VALUE

On success, these functions return the natural logarithm of Gamma(x).

If x is a NaN, a NaN is returned.

If x is 1 or 2, +0 is returned.

If x is positive infinity or negative infinity, positive infinity is returned.

If x is a nonpositive integer, a pole error occurs, and the functions return +HUGE_VAL, +HUGE_VALF, or +HUGE_VALL, respectively.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the correct mathematical sign.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Pole error: x is a nonpositive integer
errno is set to ERANGE (but see BUGS). A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised.

Range error: result overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

STANDARDS

lgamma()
lgammaf()
lgammal()
C11, POSIX.1-2008.

signgam
POSIX.1-2008.

lgamma_r()
lgammaf_r()
lgammal_r()
None.

HISTORY

lgamma()
lgammaf()
lgammal()
C99, POSIX.1-2001.

signgam
POSIX.1-2001.

lgamma_r()
lgammaf_r()
lgammal_r()
None.

BUGS

In glibc 2.9 and earlier, when a pole error occurs, errno is set to EDOM; instead of the POSIX-mandated ERANGE. Since glibc 2.10, glibc does the right thing.

SEE ALSO

tgamma(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

272 - Linux cli command XtSetArg

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtSetArg and provides detailed information about the command XtSetArg, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtSetArg.

NAME 🖥️ XtSetArg 🖥️

set and merge ArgLists

SYNTAX

#include <X11/Intrinsic.h>

int XtSetArg(Arg arg, String name, XtArgVal value);

ArgList XtMergeArgLists(ArgList args1, Cardinal num_args1, ArgList args2, Cardinal num_args2);

ARGUMENTS

arg
Specifies the name-value pair to set.

args1
Specifies the first ArgList.

args2
Specifies the second ArgList.

num_args1
Specifies the number of arguments in the first argument list.

num_args2
Specifies the number of arguments in the second argument list.

name
Specifies the name of the resource.

value
Specifies the value of the resource if it will fit in an XtArgVal or the address.

DESCRIPTION

The XtSetArg function is usually used in a highly stylized manner to minimize the probability of making a mistake; for example:

Arg args[20]; int n;

n = 0;
XtSetArg(args[n], XtNheight, 100);      n++;
XtSetArg(args[n], XtNwidth, 200);       n++;
XtSetValues(widget, args, n);

Alternatively, an application can statically declare the argument list and use XtNumber:

static Args args[] = { {XtNheight, (XtArgVal) 100}, {XtNwidth, (XtArgVal) 200}, }; XtSetValues(Widget, args, XtNumber(args));

Note that you should not use auto-increment or auto-decrement within the first argument to XtSetArg. XtSetArg can be implemented as a macro that dereferences the first argument twice.

The XtMergeArgLists function allocates enough storage to hold the combined ArgList structures and copies them into it. Note that it does not check for duplicate entries. When it is no longer needed, free the returned storage by using XtFree.

SEE ALSO

XtOffset(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

273 - Linux cli command getdtablesize

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getdtablesize and provides detailed information about the command getdtablesize, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getdtablesize.

NAME 🖥️ getdtablesize 🖥️

get file descriptor table size

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
int getdtablesize(void);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getdtablesize():

    Since glibc 2.20:
        _DEFAULT_SOURCE || ! (_POSIX_C_SOURCE >= 200112L)
    glibc 2.12 to glibc 2.19:
        _BSD_SOURCE || ! (_POSIX_C_SOURCE >= 200112L)
    Before glibc 2.12:
        _BSD_SOURCE || _XOPEN_SOURCE >= 500

DESCRIPTION

getdtablesize() returns the maximum number of files a process can have open, one more than the largest possible value for a file descriptor.

RETURN VALUE

The current limit on the number of open files per process.

ERRORS

On Linux, getdtablesize() can return any of the errors described for getrlimit(2); see NOTES below.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getdtablesize()

Thread safetyMT-Safe

VERSIONS

The glibc version of getdtablesize() calls getrlimit(2) and returns the current RLIMIT_NOFILE limit, or OPEN_MAX when that fails.

Portable applications should employ sysconf(_SC_OPEN_MAX) instead of this call.

STANDARDS

None.

HISTORY

SVr4, 4.4BSD (first appeared in 4.2BSD).

SEE ALSO

close(2), dup(2), getrlimit(2), open(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

274 - Linux cli command Spreadsheet_WriteExcel_Chart_Scatterpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_WriteExcel_Chart_Scatterpm and provides detailed information about the command Spreadsheet_WriteExcel_Chart_Scatterpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_WriteExcel_Chart_Scatterpm.

NAME 🖥️ Spreadsheet_WriteExcel_Chart_Scatterpm 🖥️

A writer class for Excel Scatter charts.

SYNOPSIS

To create a simple Excel file with a Scatter chart using Spreadsheet::WriteExcel:

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( chart.xls ); my $worksheet = $workbook->add_worksheet(); my $chart = $workbook->add_chart( type => scatter ); # Configure the chart. $chart->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, ); # Add the worksheet data the chart refers to. my $data = [ [ Category, 2, 3, 4, 5, 6, 7 ], [ Value, 1, 4, 5, 2, 1, 5 ], ]; $worksheet->write( A1, $data ); _ _END_ _

DESCRIPTION

This module implements Scatter charts for Spreadsheet::WriteExcel. The chart object is created via the Workbook add_chart() method:

my $chart = $workbook->add_chart( type => scatter );

Once the object is created it can be configured via the following methods that are common to all chart classes:

$chart->add_series(); $chart->set_x_axis(); $chart->set_y_axis(); $chart->set_title();

These methods are explained in detail in Spreadsheet::WriteExcel::Chart. Class specific methods or settings, if any, are explained below.

Scatter Chart Methods

There aren’t currently any scatter chart specific methods. See the TODO section of Spreadsheet::WriteExcel::Chart.

EXAMPLE

Here is a complete example that demonstrates most of the available features when creating a chart.

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( chart_scatter.xls ); my $worksheet = $workbook->add_worksheet(); my $bold = $workbook->add_format( bold => 1 ); # Add the worksheet data that the charts will refer to. my $headings = [ Number, Sample 1, Sample 2 ]; my $data = [ [ 2, 3, 4, 5, 6, 7 ], [ 1, 4, 5, 2, 1, 5 ], [ 3, 6, 7, 5, 4, 3 ], ]; $worksheet->write( A1, $headings, $bold ); $worksheet->write( A2, $data ); # Create a new chart object. In this case an embedded chart. my $chart = $workbook->add_chart( type => scatter, embedded => 1 ); # Configure the first series. (Sample 1) $chart->add_series( name => Sample 1, categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, ); # Configure the second series. (Sample 2) $chart->add_series( name => Sample 2, categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$C$2:$C$7, ); # Add a chart title and some axis labels. $chart->set_title ( name => Results of sample analysis ); $chart->set_x_axis( name => Test number ); $chart->set_y_axis( name => Sample length (cm) ); # Insert the chart into the worksheet (with an offset). $worksheet->insert_chart( D2, $chart, 25, 10 ); _ _END_ _

AUTHOR

John McNamara [email protected]

COPYRIGHT

Copyright MM-MMX, John McNamara.

All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

275 - Linux cli command Types_Serialiser_Errorpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Types_Serialiser_Errorpm and provides detailed information about the command Types_Serialiser_Errorpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Types_Serialiser_Errorpm.

NAME 🖥️ Types_Serialiser_Errorpm 🖥️

dummy module for Types::Serialiser

SYNOPSIS

# do not “use” yourself

DESCRIPTION

This module exists only to provide overload resolution for Storable and similar modules that assume that class name equals module name. See Types::Serialiser for more info about this class.

AUTHOR

Marc Lehmann <[email protected]> http://home.schmorp.de/

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

276 - Linux cli command XShmAttach

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XShmAttach and provides detailed information about the command XShmAttach, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XShmAttach.

NAME 🖥️ XShmAttach 🖥️

X Shared Memory extension functions

SYNTAX

#include <X11/Xlib.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
Bool	XShmQueryExtension(
	Display *display);
Bool XShmQueryVersion(
	Display *display;
	int *major, *minor;
	Bool *pixmaps);
int XShmPixmapFormat(
	Display *display);
Bool XShmAttach(
	Display *display;
	XShmSegmentInfo *shminfo);
Bool XShmDetach(
	Display *display;
	XShmSegmentInfo *shminfo);

XImage *XShmCreateImage (
	Display *display;
	Visual *visual;
	unsigned int depth;
	int format;
	char *data;
	XShmSegmentInfo *shminfo;
	unsigned int width, height);
Bool XShmPutImage(
	Display *display;
	Drawable d;
	GC gc;
	XImage *image;
	int src_x, src_y, dest_x, dest_y;
	unsigned int width, height;
	bool send_event);
Bool XShmGetImage (
	Display *display;
	Drawable d;
	XImage *image;
	int x, y;
	unsigned long plane_mask);
Pixmap XShmCreatePixmap(
        Display *display;
        Drawable d;
        char *data;
	XShmSegmentInfo *shminfo;
	unsigned int width, height, depth);
Status XShmGetEventBase(
	Display *display);

STRUCTURES

Events:
typedef struct {
    int type;               /* of event */
    unsigned long serial;   /* # of last request processed by server*/
    Bool send_event;        /* true if this came from a SendEvent request*/
    Display *display;       /* Display the event was read from */
    Drawable drawable;      /* drawable of request */
    int major_code;         /* ShmReqCode */
    int minor_code;         /* X_ShmPutImage */
    ShmSeg shmseg;          /* the ShmSeg used in the request*/
    unsigned long offset;   /* the offset into ShmSeg used in the request*/
} XShmCompletionEvent;
a structure of type XShmSegmentInfo :

typedef struct {
    ShmSeg shmseg;      /* resource id */
    int shmid;          /* kernel id */
    char *shmaddr;      /* address in client */
    Bool readOnly;      /* how the server should attach it */
} XShmSegmentInfo;

DESCRIPTION

* XShmQueryExtension * checks to see if the shared memory extensions are available for the specified display.

* XShmQueryVersion * returns the version numbers of the extension implementation. Shared memory pixmaps are supported if the pixmaps argument returns true.

* XShmAttach * tells the server to attach to your shared memory segment. If all goes well, you will get a non-zero status, back and your XImage is ready for use.

* XShmDetach * tells the server to detach from your shared memory segment.

* XShmPutImage * combines an image in memory with a shape of the specified drawable. If XYBitmap format is used, the depth must be one, or a ``BadMatch’’ error results. The foreground pixel in the GC defines the source for the one bits in the image, and the background pixel defines the source for the zero bits. For XYPixmap and ZPixmap, the depth must match the depth of the drawable, or a ``BadMatch’’ error results.

* XShmGetImage * reads image data into a shared memory XImage where display is the display of interest, drawable is the source drawable, image is the destination XImage, x and y are offsets within the drawable, and plane_mask defines which planes are to be read.

* XShmCreateImage * allocates the memory needed for an XImage structure for the specified display but does not allocate space for the image itself.

* XShmPixmapFormat * gets the format for the server. If your application can deal with the server pixmap data format, a shared memory segment and shminfo structure are created.

* XShmCreatePixmap * points to a pixmap which you can manipulate in all of the usual ways, with the added bonus of being able to edit its contents directly through the shared memory segment.

* XShmGetEventBase * gets the completion event value.

SEE ALSO

MIT-SHM - The MIT Shared Memory Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

277 - Linux cli command HTML_AsSubspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_AsSubspm and provides detailed information about the command HTML_AsSubspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_AsSubspm.

NAME 🖥️ HTML_AsSubspm 🖥️

functions that construct a HTML syntax tree

VERSION

This document describes version 5.07 of HTML::AsSubs, released August 31, 2017 as part of HTML-Tree.

SYNOPSIS

use HTML::AsSubs; $h = body( h1(“This is the heading”), p(“This is the first paragraph which contains a “, a({href=>link.html}, “link”), " and an “, img({src=>img.gif, alt=>image}), “.” ), ); print $h->as_HTML;

DESCRIPTION

This module exports functions that can be used to construct various HTML elements. The functions are named after the tags of the corresponding HTML element and are all written in lower case. If the first argument is a hash reference then it will be used to initialize the attributes of this element. The remaining arguments are regarded as content.

For a similar idea (i.e., it’s another case where the syntax tree of the Perl source mirrors the syntax tree of the HTML produced), see HTML::Element’s new_from_lol method.

For what I now think is a cleaner implementation of this same idea, see the excellent module XML::Generator, which is what I suggest for actual real-life use. (I suggest this over HTML::AsSubs and over CGI.pm’s HTML-making functions.)

ACKNOWLEDGEMENT

This module was inspired by the following message:

Date: Tue, 4 Oct 1994 16:11:30 +0100 Subject: Wow! I have a large lightbulb above my head! Take a moment to consider these lines: %OVERLOAD=( "” => sub { join(””, @{$_[0]}) } ); sub html { my($type)=shift; bless ["<$type>", @_, “</$type>”]; } :-) I *love* Perl 5! Thankyou Larry and Ilya. Regards, Tim Bunce. p.s. If you didnt get it, think about recursive data types: html(html()) p.p.s. Ill turn this into a much more practical example in a day or two. p.p.p.s. Its a pity that overloads are not inherited. Is this a bug?

BUGS

The exported link() function overrides the builtin link() function. The exported tr() function must be called using &tr(…) syntax because it clashes with the builtin tr/../../ operator.

SEE ALSO

HTML::Element, XML::Generator

A bunch of methods for creating tags.

Private Functions

_elem()

The _elem() function is wrapped by all the html ’tag’ functions. It takes a tag-name, optional hashref of attributes and a list of content as parameters.

AUTHOR

Current maintainers:

  • Christopher J. Madsen <perl AT cjmweb.net>

  • Jeff Fearn <jfearn AT cpan.org>

Original HTML-Tree author:

  • Gisle Aas

Former maintainers:

  • Sean M. Burke

  • Andy Lester

  • Pete Krawczyk <petek AT cpan.org>

You can follow or contribute to HTML-Tree’s development at <https://github.com/kentfredric/HTML-Tree>.

COPYRIGHT AND LICENSE

Copyright 1995-1998 Gisle Aas, 1999-2004 Sean M. Burke, 2005 Andy Lester, 2006 Pete Krawczyk, 2010 Jeff Fearn, 2012 Christopher J. Madsen.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The programs in this library are distributed in the hope that they will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

278 - Linux cli command Moose_Manual_Contributingpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Manual_Contributingpm and provides detailed information about the command Moose_Manual_Contributingpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Manual_Contributingpm.

NAME 🖥️ Moose_Manual_Contributingpm 🖥️

How to get involved in Moose

VERSION

version 2.2207

GETTING INVOLVED

Moose is an open project, and we are always willing to accept bug fixes, more tests, and documentation patches. Commit bits are given out freely and it’s easy to get started!

Get the Code

If you just want to get your feet wet and check out the code, you can do so from the comfort of your web browser by going to the official repository on GitHub: <https://github.com/moose/Moose>.

However, if you know how to use git and would rather have a local copy (because, why wouldn’t you?!), then you can clone it:

git clone [email protected]:moose/Moose.git

If, at some point, you think you’d like to contribute a patch, please see “Getting Started”.

NOTE: Your contribution is very important to us. If, for some reason, you would prefer not to use Git/GitHub, come talk to us at #moose on irc.perl.org and we can work something out.

People

As Moose has matured, some structure has emerged in the process.

Cabal - people who can release moose
These people are the ones who have co-maint on Moose itself and can create a release. They’re listed under “CABAL” in Moose in the Moose documentation. They are responsible for reviewing branches, and are the only people who are allowed to push to stable branches. Cabal members are listed in Moose and can often be found on irc in the <irc://irc.perl.org/#moose-dev> channel.

Contributors - people creating a topic or branch
You!

New Features

Moose already has a fairly large feature set, and we are currently not looking to add any major new features to it. If you have an idea for a new feature in Moose, you are encouraged to create a MooseX module first.

At this stage, no new features will even be considered for addition into the core without first being vetted as a MooseX module, unless it is absolutely 100% impossible to implement the feature outside the core.

If you think it is 100% impossible, please come discuss it with us on IRC or via e-mail. Your feature may need a small hook in the core, or a refactoring of some core modules, and we are definitely open to that.

Moose was built from the ground up with the idea of being highly extensible, and quite often the feature requests we see can be implemented through small extensions. Try it, it’s much easier than you might think.

Branch Layout

The repository is divided into several branches to make maintenance easier for everyone involved. The branches below are ordered by level of stability.

stable/*
The branch from which releases are cut. When making a new major release, the release manager makes a new stable/X.YY branch at the current position of master. The version used in the stable branch should not include the last two digits of the version number. For minor releases, patches will be committed to master, and backported (cherry-picked) to the appropriate stable branch as needed. A stable branch is only updated by someone from the Cabal during a release.

master
The main development branch. All new code should be written against this branch. This branch contains code that has been reviewed, and will be included in the next major release. Commits which are judged to not break backwards compatibility may be backported into stable to be included in the next minor release.

topic/*
Small personal branches that are still in progress. They can be freely rebased. They contain targeted features that may span a handful of commits. Any change or bugfix should be created in a topic branch.

rfc/*
Topic branches that are completed and waiting on review. A Cabal member will look over branches in this namespace, and either merge them to master if they are acceptable, or move them back to a different namespace otherwise. This namespace is being phased out now that we are using GitHub’s pull requests in our “Development Workflow”.

attic/*
Branches which have been reviewed, and rejected. They remain in the repository in case we later change our mind, or in case parts of them are still useful.

abandoned/*
Topic branches which have had no activity for a long period of time will be moved here, to keep the main areas clean.

Larger, longer term branches can also be created in the root namespace (i.e. at the same level as master and stable). This may be appropriate if multiple people are intending to work on the branch. These branches should not be rebased without checking with other developers first.

WORKFLOWS

Getting Started

So, you’ve cloned the main Moose repository to your local machine (see “Get the Code”) and you’re ready to do some hacking. We couldn’t be happier to welcome you to our community!

Of course, to ensure that your first experience is as productive and satisfying as possible, you should probably take some time to read over this entire POD document. Doing so will give you a full understanding of how Moose developers and maintainers work together and what they expect from one another. Done? Great!

Next, assuming you have a GitHub account, go to <http://github.com/moose/Moose> and fork the repository (see <https://help.github.com/articles/fork-a-repo>). This will put an exact replica of the Moose repository into your GitHub account, which will serve as a place to publish your patches for the Moose maintainers to review and incorporate.

Once your fork has been created, switch to your local working repository directory and update your origin remote’s push URL. This allows you to use a single remote (origin) to both pull in the latest code from GitHub and also push your work to your own fork:

# Replace YOUR_USERNAME below with your GitHub username git remote set-url –push origin [email protected]:YOUR_USERNAME/moose.git

You can verify your work:

$ git remote -v origin [email protected]:moose/Moose.git (fetch) origin [email protected]:YOUR_USERNAME/moose.git (push)

Now, you’re ready for action! From now on, you just follow the “Development Workflow” to publish your work and submit pull requests to the Moose Cabal.

Development Workflow

The general gist of the STANDARD WORKFLOW is:

What follows is a more detailed rundown of that workflow. Please make sure to review and follow the steps in the previous section, “Getting Started”, if you have not done so already.

Update Your Repository

Update your local copy of the master branch from the remote:

git checkout master git pull –rebase

Create Your Topic Branch

Now, create a new topic branch based on your master branch. It’s useful to use concise, descriptive branch names such as: pod-syntax-contrib, feat-autodelegation, patch-23-role-comp, etc. However, we’ll just call ours my-feature for demonstration purposes:

git checkout -b topic/my-feature

Hack. Commit. Repeat.

While you’re hacking, the most important thing to remember is that your topic branch is yours to do with as you like. Nothing you do there will affect anyone else at this point. Commit as often as little or as often as you need to and don’t let perfection get in the way of progress. However, don’t try to do too much as the easiest changes to integrate are small and focused.

If it’s been a while since you created your topic branch, it’s often a good idea to periodically rebase your branch off of the upstream master to reduce your work later on:

git fetch # or, git remote update git rebase origin/master # or, git pull –rebase origin master

You should also feel free to publish (using push --force if necessary) your branch to your GitHub fork if you simply need feedback from others. (Note: actual collaboration takes a bit more finesse and a lot less --force however).

Clean Up Your Branch

Finally, when your development is done, it’s time to prepare your branch for review. Even the smallest branches can often use a little bit of tidying up before they are unleashed on a reviewer. Clarifying/cleaning up commit messages, reordering commits, splitting large commits or those which contain different types of changes, squashing related or straggler commits are all highly worthwhile activities to undertake on your topic branch.

Remember: Your topic branch is yours. Don’t worry about rewriting its history or breaking fast-forward. Some useful commands are listed below but please make sure that you understand what they do as they can rewrite history:

- git commit –amend - git rebase –interactive - git cherry-pick

Ultimately, your goal in cleaning up your branch is to craft a set of commits whose content and messages are as focused and understandable as possible. Doing so will greatly increase the chances of a speedy review and acceptance into the mainline development.

Rebase on the Latest

Before your final push and issuing a pull request, you need to ensure that your changes can be easily merged into the master branch of the upstream repository. This is done by once again rebasing your branch on the latest origin/master.

git fetch # or, git remote update git rebase origin/master # or, git pull –rebase origin master

Publish and Pull Request

Now it’s time to make your final push of the branch to your fork. The --force flag is only necessary if you’ve pushed before and subsequently rewriting your history:

git push –force

After your branch is published, you can issue a pull request to the Moose Cabal. See <https://help.github.com/articles/using-pull-requests> for details.

Congratulations! You’re now a contributor!

Approval Workflow

Moose is an open project but it is also an increasingly important one. Many modules depend on Moose being stable. Therefore, we have a basic set of criteria for reviewing and merging branches. What follows is a set of rough guidelines that ensures all new code is properly vetted before it is merged to the master branch.

It should be noted that if you want your specific branch to be approved, it is your responsibility to follow this process and advocate for your branch.

Small bug fixes, doc patches and additional passing tests.
These items don’t really require approval beyond one of the core contributors just doing a simple review. For especially simple patches (doc patches especially), committing directly to master is fine.

Larger bug fixes, doc additions and TODO or failing tests.
Larger bug fixes should be reviewed by at least one cabal member and should be tested using the xt/author/test-my-dependents.t test. New documentation is always welcome, but should also be reviewed by a cabal member for accuracy. TODO tests are basically feature requests, see our “New Features” section for more information on that. If your feature needs core support, create a topic/ branch using the “Development Workflow” and start hacking away. Failing tests are basically bug reports. You should find a core contributor and/or cabal member to see if it is a real bug, then submit the bug and your test to the RT queue. Source control is not a bug reporting tool.

New user-facing features.
Anything that creates a new user-visible feature needs to be approved by more than one cabal member. Make sure you have reviewed “New Features” to be sure that you are following the guidelines. Do not be surprised if a new feature is rejected for the core.

New internals features.
New features for Moose internals are less restrictive than user facing features, but still require approval by at least one cabal member. Ideally you will have run the xt/author/test-my-dependents.t script to be sure you are not breaking any MooseX module or causing any other unforeseen havoc. If you do this (rather than make us do it), it will only help to hasten your branch’s approval.

Backwards incompatible changes.
Anything that breaks backwards compatibility must be discussed by the cabal. Backwards incompatible changes should not be merged to master if there are strong objections from any cabal members. We have a policy for what we see as sane “BACKWARDS COMPATIBILITY” for Moose. If your changes break back-compat, you must be ready to discuss and defend your change.

Release Workflow

# major releases (including trial releases) git checkout master # minor releases git checkout stable/X.YY # do final changelogging, etc git commit dzil release # or dzil release –trial for trial releases

Release How-To

Moose uses Dist::Zilla to manage releases. Although the git repository comes with a Makefile.PL, it is a very basic one just to allow the basic perl Makefile.PL && make && make test cycle to work. In particular, it doesn’t include any release metadata, such as dependencies. In order to get started with Dist::Zilla, first install it: cpanm Dist::Zilla, and then install the plugins necessary for reading the dist.ini: dzil authordeps | cpanm.

Moose releases fall into two categories, each with their own level of release preparation. A minor release is one which does not include any API changes, deprecations, and so on. In that case, it is sufficient to simply test the release candidate against a few different Perls. Testing should be done against at least two recent major versions of Perl (5.8.8 and 5.10.1, for example). If you have more versions available, you are encouraged to test them all. However, we do not put a lot of effort into supporting older 5.8.x releases.

For major releases which include an API change or deprecation, you should run the xt/author/test-my-dependents.t test. This tests a long list of MooseX and other Moose-using modules from CPAN. In order to run this script, you must arrange to have the new version of Moose in Perl’s include path. You can use prove -b and prove -I, install the module, or fiddle with the PERL5LIB environment variable, whatever makes you happy.

This test downloads each module from CPAN, runs its tests, and logs failures and warnings to a set of files named test-mydeps-$$-*.log. If there are failures or warnings, please work with the authors of the modules in question to fix them. If the module author simply isn’t available or does not want to fix the bug, it is okay to make a release.

Regardless of whether or not a new module is available, any breakages should be noted in the conflicts list in the distribution’s dist.ini.

Emergency Bug Workflow (for immediate release)

The stable branch exists for easily making bug fix releases.

git remote update git checkout -b topic/my-emergency-fix origin/master # hack git commit

Then a cabal member merges into master, and backports the change into stable/X.YY:

git checkout master git merge topic/my-emergency-fix git push git checkout stable/X.YY git cherry-pick -x master git push # release

Project Workflow

For longer lasting branches, we use a subversion style branch layout, where master is routinely merged into the branch. Rebasing is allowed as long as all the branch contributors are using git pull --rebase properly.

commit --amend, rebase --interactive, etc. are not allowed, and should only be done in topic branches. Committing to master is still done with the same review process as a topic branch, and the branch must merge as a fast forward.

This is pretty much the way we’re doing branches for large-ish things right now.

Obviously there is no technical limitation on the number of branches. You can freely create topic branches off of project branches, or sub projects inside larger projects freely. Such branches should incorporate the name of the branch they were made off so that people don’t accidentally assume they should be merged into master:

git checkout -b my-project–topic/foo my-project

(unfortunately Git will not allow my-project/foo as a branch name if my-project is a valid ref).

BRANCH ARCHIVAL

Merged branches should be deleted.

Failed branches may be kept, but should be moved to attic/ to differentiate them from in-progress topic branches.

Branches that have not been worked on for a long time will be moved to abandoned/ periodically, but feel free to move the branch back to topic/ if you want to start working on it again.

TESTS, TESTS, TESTS

If you write any code for Moose, you must add tests for that code. If you do not write tests then we cannot guarantee your change will not be removed or altered at a later date, as there is nothing to confirm this is desired behavior.

If your code change/addition is deep within the bowels of Moose and your test exercises this feature in a non-obvious way, please add some comments either near the code in question or in the test so that others know.

We also greatly appreciate documentation to go with your changes, and an entry in the Changes file. Make sure to give yourself credit! Major changes or new user-facing features should also be documented in Moose::Manual::Delta.

DOCS, DOCS, DOCS

Any user-facing changes must be accompanied by documentation. If you’re not comfortable writing docs yourself, you might be able to convince another Moose dev to help you.

Our goal is to make sure that all features are documented. Undocumented features are not considered part of the API when it comes to determining whether a change is backwards compatible.

BACKWARDS COMPATIBILITY

Change is inevitable, and Moose is not immune to this. We do our best to maintain backwards compatibility, but we do not want the code base to become overburdened by this. This is not to say that we will be frivolous with our changes, quite the opposite, just that we are not afraid of change and will do our best to keep it as painless as possible for the end user.

Our policy for handling backwards compatibility is documented in more detail in Moose::Manual::Support.

All backwards incompatible changes must be documented in Moose::Manual::Delta. Make sure to document any useful tips or workarounds for the change in that document.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

279 - Linux cli command zip_get_archive_flag

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_get_archive_flag and provides detailed information about the command zip_get_archive_flag, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_get_archive_flag.

libzip (-lzip)

The

function returns if the flag

is set for the archive

The archive flags might have been changed with

if

is set to

the original unchanged flags are tested.

Supported flags are:

The archive is read-only.

returns 1 if

is set for

0 if not, and -1 if an error occurred.

was added in libzip 0.9. In libzip 0.11 the type of

was changed from

to

and the type of

was changed from

to

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

280 - Linux cli command strtouq

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strtouq and provides detailed information about the command strtouq, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strtouq.

NAME 🖥️ strtouq 🖥️

convert a string to an unsigned long integer

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
unsigned long strtoul(const char *restrict nptr,
 char **restrict endptr, int base);
unsigned long long strtoull(const char *restrict nptr,
 char **restrict endptr, int base);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strtoull():

    _ISOC99_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The strtoul() function converts the initial part of the string in nptr to an unsigned long value according to the given base, which must be between 2 and 36 inclusive, or be the special value 0.

The string may begin with an arbitrary amount of white space (as determined by isspace(3)) followed by a single optional ‘+’ or ‘-’ sign. If base is zero or 16, the string may then include a “0x” prefix, and the number will be read in base 16; otherwise, a zero base is taken as 10 (decimal) unless the next character is ‘0’, in which case it is taken as 8 (octal).

The remainder of the string is converted to an unsigned long value in the obvious manner, stopping at the first character which is not a valid digit in the given base. (In bases above 10, the letter ‘A’ in either uppercase or lowercase represents 10, ‘B’ represents 11, and so forth, with ‘Z’ representing 35.)

If endptr is not NULL, and the base is supported, strtoul() stores the address of the first invalid character in *endptr. If there were no digits at all, strtoul() stores the original value of nptr in *endptr (and returns 0). In particular, if *nptr is not ‘�’ but **endptr is ‘�’ on return, the entire string is valid.

The strtoull() function works just like the strtoul() function but returns an unsigned long long value.

RETURN VALUE

The strtoul() function returns either the result of the conversion or, if there was a leading minus sign, the negation of the result of the conversion represented as an unsigned value, unless the original (nonnegated) value would overflow; in the latter case, strtoul() returns ULONG_MAX and sets errno to ERANGE. Precisely the same holds for strtoull() (with ULLONG_MAX instead of ULONG_MAX).

ERRORS

This function does not modify errno on success.

EINVAL
(not in C99) The given base contains an unsupported value.

ERANGE
The resulting value was out of range.

The implementation may also set errno to EINVAL in case no conversion was performed (no digits seen, and 0 returned).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strtoul(), strtoull(), strtouq()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

strtoul()
POSIX.1-2001, C89, SVr4.

strtoull()
POSIX.1-2001, C99.

NOTES

Since strtoul() can legitimately return 0 or ULONG_MAX (ULLONG_MAX for strtoull()) on both success and failure, the calling program should set errno to 0 before the call, and then determine if an error occurred by checking whether errno has a nonzero value after the call.

In locales other than the “C” locale, other strings may be accepted. (For example, the thousands separator of the current locale may be supported.)

BSD also has

u_quad_t strtouq(const char *nptr, char **endptr, int base);

with completely analogous definition. Depending on the wordsize of the current architecture, this may be equivalent to strtoull() or to strtoul().

Negative values are considered valid input and are silently converted to the equivalent unsigned long value.

EXAMPLES

See the example on the strtol(3) manual page; the use of the functions described in this manual page is similar.

SEE ALSO

a64l(3), atof(3), atoi(3), atol(3), strtod(3), strtol(3), strtoumax(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

281 - Linux cli command wcpcpy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcpcpy and provides detailed information about the command wcpcpy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcpcpy.

NAME 🖥️ wcpcpy 🖥️

copy a wide-character string, returning a pointer to its end

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
wchar_t *wcpcpy(wchar_t *restrict dest",constwchar_t*restrict"src);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

wcpcpy():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The wcpcpy() function is the wide-character equivalent of the stpcpy(3) function. It copies the wide-character string pointed to by src, including the terminating null wide character (L’�’), to the array pointed to by dest.

The strings may not overlap.

The programmer must ensure that there is room for at least wcslen(src)+1 wide characters at dest.

RETURN VALUE

wcpcpy() returns a pointer to the end of the wide-character string dest, that is, a pointer to the terminating null wide character.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcpcpy()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

SEE ALSO

strcpy(3), wcscpy(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

282 - Linux cli command Image_ExifTool_MacOSpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_MacOSpm and provides detailed information about the command Image_ExifTool_MacOSpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_MacOSpm.

NAME 🖥️ Image_ExifTool_MacOSpm 🖥️

Read/write MacOS system tags

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to extract MDItem* and XAttr* tags on MacOS systems using the “mdls” and “xattr” utilities respectively. It also reads metadata directly from the MacOS “_.” sidecar files that are used on some filesystems to store file attributes. Writable tags use “xattr”, “setfile” or “osascript” for writing.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

“MacOS Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

283 - Linux cli command Tk_Entrypm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Entrypm and provides detailed information about the command Tk_Entrypm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Entrypm.

NAME 🖥️ Tk_Entrypm 🖥️

Create and manipulate Entry widgets

SYNOPSIS

$entry = $parent->Entry(?options?);

STANDARD OPTIONS

-background -highlightbackground -insertontime -selectforeground -borderwidth -highlightcolor -insertwidth -takefocus -cursor -highlightthickness -justify -textvariable -exportselection -insertbackground -relief -xscrollcommand -font -insertborderwidth -selectbackground -foreground -insertofftime -selectborderwidth

WIDGET-SPECIFIC OPTIONS

Command-Line Name: -disabledbackground

Database Name: disabledBackground

Database Class: DisabledBackground

Specifies the background color to use when the entry is disabled. If this option is the empty string, the normal background color is used.

Command-Line Name: -disabledforeground

Database Name: disabledForeground

Database Class: DisabledForeground

Specifies the foreground color to use when the entry is disabled. If this option is the empty string, the normal foreground color is used.

Name: invalidCommand

Class: InvalidCommand

Switch: -invalidcommand

Alias: -invcmd

Specifies a script to eval when validateCommand returns 0. Setting it to <undef> disables this feature (the default). The best use of this option is to set it to bell. See Validation below for more information.

Command-Line Name: -readonlybackground

Database Name: readonlyBackground

Database Class: ReadonlyBackground

Specifies the background color to use when the entry is read-only. If this option is the empty string, the normal background color is used.

Name: show

Class: Show

Switch: -show

If this option is specified, then the true contents of the entry are not displayed in the window. Instead, each character in the entry’s value will be displayed as the first character in the value of this option, such as ``*’’. This is useful, for example, if the entry is to be used to enter a password. If characters in the entry are selected and copied elsewhere, the information copied will be what is displayed, not the true contents of the entry.

Name: state

Class: State

Switch: -state

Specifies one of three states for the entry: normal, disabled, or readonly. If the entry is readonly, then the value may not be changed using widget commands and no insertion cursor will be displayed, even if the input focus is in the widget; the contents of the widget may still be selected. If the entry is disabled, the value may not be changed, no insertion cursor will be displayed, the contents will not be selectable, and the entry may be displayed in a different color, depending on the values of the -disabledforeground and -disabledbackground options.

Name: validate

Class: Validate

Switch: -validate

Specifies the mode in which validation should operate: none, focus, focusin, focusout, key, or all. It defaults to none. When you want validation, you must explicitly state which mode you wish to use. See Validation below for more.

Name: validateCommand

Class: ValidateCommand

Switch: -validatecommand

Alias: -vcmd

Specifies a script to eval when you want to validate the input into the entry widget. Setting it to undef disables this feature (the default). This command must return a valid boolean value. If it returns 0 (or the valid boolean equivalent) then it means you reject the new edition and it will not occur and the invalidCommand will be evaluated if it is set. If it returns 1, then the new edition occurs. See Validation below for more information.

Name: width

Class: Width

Switch: -width

Specifies an integer value indicating the desired width of the entry window, in average-size characters of the widget’s font. If the value is less than or equal to zero, the widget picks a size just large enough to hold its current text.

DESCRIPTION

The Entry method creates a new window (given by the $entry argument) and makes it into an entry widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the entry such as its colors, font, and relief. The entry command returns its $entry argument. At the time this command is invoked, there must not exist a window named $entry, but $entry’s parent must exist.

An entry is a widget that displays a one-line text string and allows that string to be edited using methods described below, which are typically bound to keystrokes and mouse actions. When first created, an entry’s string is empty. A portion of the entry may be selected as described below. If an entry is exporting its selection (see the exportSelection option), then it will observe the standard X11 protocols for handling the selection; entry selections are available as type STRING. Entries also observe the standard Tk rules for dealing with the input focus. When an entry has the input focus it displays an insertion cursor to indicate where new characters will be inserted.

Entries are capable of displaying strings that are too long to fit entirely within the widget’s window. In this case, only a portion of the string will be displayed; methods described below may be used to change the view in the window. Entries use the standard xScrollCommand mechanism for interacting with scrollbars (see the description of the -xscrollcommand option for details). They also support scanning, as described below.

VALIDATION

Validation of entry widgets is derived from part of the patch written by [email protected]. This works by setting the validateCommand option to a callback which will be evaluated according to the validate option as follows:

none
Default. This means no validation will occur.

focus
validateCommand will be called when the entry receives or loses focus.

focusin
validateCommand will be called when the entry receives focus.

focusout
validateCommand will be called when the entry loses focus.

key
validateCommand will be called when the entry is edited.

all
validateCommand will be called for all above conditions.

The validateCommand and invalidCommand are called with the following arguments:

  • The proposed value of the entry. If you are configuring the entry widget to have a new textvariable, this will be the value of that textvariable.

  • The characters to be added (or deleted). This will be undef if validation is due to focus, explcit call to validate or if change is due to -textvariable changing.

  • The current value of entry i.e. before the proposed change.

  • index of char string to be added/deleted, if any. -1 otherwise

  • type of action. 1 == INSERT, 0 == DELETE, -1 if it’s a forced validation or textvariable validation

In general, the textVariable and validateCommand can be dangerous to mix. If you try set the textVariable to something that the validateCommand will not accept it will be set back to the value of the entry widget. Using the textVariable for read-only purposes will never cause problems.

The validateCommand will turn itself off by setting validate to none when an error occurs, for example when the validateCommand or invalidCommand encounters an error in its script while evaluating, or validateCommand does not return a valid boolean value.

With the perl/Tk version validate option is supposed to be “suspended” while executing the validateCommand or the invalidCommand. This is experimental but in theory either callback can “correct” the value of the widget, and override the proposed change. (validateCommand should still return false to inhibit the change from happening when it returns.)

WIDGET METHODS

The Entry method creates a widget object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class.

Many of the additional methods for entries take one or more indices as arguments. An index specifies a particular character in the entry’s string, in any of the following ways:

number
Specifies the character as a numerical index, where 0 corresponds to the first character in the string.

anchor
Indicates the anchor point for the selection, which is set with the selectionFrom and selectionAdjust methods.

end
Indicates the character just after the last one in the entry’s string. This is equivalent to specifying a numerical index equal to the length of the entry’s string.

insert
Indicates the character adjacent to and immediately following the insertion cursor.

sel.first
Indicates the first character in the selection. It is an error to use this form if the selection isn’t in the entry window.

sel.last
Indicates the character just after the last one in the selection. It is an error to use this form if the selection isn’t in the entry window.

  1. In this form, number is treated as an x-coordinate in the entry’s window; the character spanning that x-coordinate is used. For example, ``@0’’ indicates the left-most character in the window.

Abbreviations may be used for any of the forms above, e.g. ``e’’ or ``sel.f’’. In general, out-of-range indices are automatically rounded to the nearest legal value.

The following additional methods are available for entry widgets:

$entry->bbox(index)
Returns a list of four numbers describing the bounding box of the character given by index. The first two elements of the list give the x and y coordinates of the upper-left corner of the screen area covered by the character (in pixels relative to the widget) and the last two elements give the width and height of the character, in pixels. The bounding box may refer to a region outside the visible area of the window.

$entry->cget(?option?)
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the entry command.

$entry->configure(?option?, ?value, option, value, …?)
Query or modify the configuration options of the widget. If no option is specified, returns a list describing all of the available options for $entry (see Tk::configure for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the entry command.

$entry->delete(first, ?last?)
Delete one or more elements of the entry. First is the index of the first character to delete, and last is the index of the character just after the last one to delete. If last isn’t specified it defaults to first+1, i.e. a single character is deleted. This method returns an empty string.

$entry->get
Returns the entry’s string.

$entry->icursor(index)
Arrange for the insertion cursor to be displayed just before the character given by index. Returns an empty string.

$entry->index(index)
Returns the numerical index corresponding to index.

$entry->insert(index, string)
Insert the characters of string just before the character indicated by index. Returns an empty string.

$entry->scan(option, args)

$entry->scanOption(args)

This method is used to implement scanning on entries. It has two forms, depending on Option:

$entry->scanMark(x)
Records x and the current view in the entry widget; used in conjunction with later scanDragto methods. Typically this method is associated with a mouse button press in the widget. It returns an empty string.

$entry->scanDragto(x)
This method computes the difference between its x argument and the x argument to the last scanMark method for the widget. It then adjusts the view left or right by 10 times the difference in x-coordinates. This method is typically associated with mouse motion events in the widget, to produce the effect of dragging the entry at high speed through the widget. The return value is an empty string.

$entry->selection(option, arg)

$entry->selectionOption(arg)

This method is used to adjust the selection within an entry. It has several forms, depending on Option:

$entry->selectionAdjust(index)
Locate the end of the selection nearest to the character given by index, and adjust that end of the selection to be at index (i.e including but not going beyond index). The other end of the selection is made the anchor point for future selectionTo methods. If the selection isn’t currently in the entry, then a new selection is created to include the characters between index and the most recent selection anchor point, inclusive. Returns an empty string.

$entry->selectionClear
Clear the selection if it is currently in this widget. If the selection isn’t in this widget then the method has no effect. Returns an empty string.

$entry->selectionFrom(index)
Set the selection anchor point to just before the character given by index. Doesn’t change the selection. Returns an empty string.

$entry->selectionPresent
Returns 1 if there is are characters selected in the entry, 0 if nothing is selected.

$entry->selectionRange(start, end)
Sets the selection to include the characters starting with the one indexed by start and ending with the one just before end. If end refers to the same character as start or an earlier one, then the entry’s selection is cleared.

$entry->selectionTo(index)
If index is before the anchor point, set the selection to the characters from index up to but not including the anchor point. If index is the same as the anchor point, do nothing. If index is after the anchor point, set the selection to the characters from the anchor point up to but not including index. The anchor point is determined by the most recent selectionFrom or selectionAdjust method in this widget. If the selection isn’t in this widget then a new selection is created using the most recent anchor point specified for the widget. Returns an empty string.

$entry->validate
This command is used to force an evaluation of the validateCommand independent of the conditions specified by the validate option. It returns 0 or 1.

$entry->xview(args)
This command is used to query and change the horizontal position of the text in the widget’s window. It can take any of the following forms:

$entry->xview
Returns a list containing two elements. Each element is a real fraction between 0 and 1; together they describe the horizontal span that is visible in the window. For example, if the first element is .2 and the second element is .7, 20% of the entry’s text is off-screen to the left, the middle 50% is visible in the window, and 30% of the text is off-screen to the right. These are the same values passed to scrollbars via the -xscrollcommand option.

$entry->xview(index)
Adjusts the view in the window so that the character given by index is displayed at the left edge of the window.

$entry->xviewMoveto(fraction)
Adjusts the view in the window so that the character fraction of the way through the text appears at the left edge of the window. Fraction must be a fraction between 0 and 1.

$entry->xviewScroll(number, what)
This method shifts the view in the window left or right according to number and what. Number must be an integer. What must be either units or pages or an abbreviation of one of these. If what is units, the view adjusts left or right by number average-width characters on the display; if it is pages then the view adjusts by number screenfuls. If number is negative then characters farther to the left become visible; if it is positive then characters farther to the right become visible.

DEFAULT BINDINGS

Tk automatically creates class bindings for entries that give them the following default behavior. In the descriptions below, ``word’’ refers to a contiguous group of letters, digits, or ``_’’ characters, or any single character other than these.

[1]
Clicking mouse button 1 positions the insertion cursor just before the character underneath the mouse cursor, sets the input focus to this widget, and clears any selection in the widget. Dragging with mouse button 1 strokes out a selection between the insertion cursor and the character under the mouse.

[2]
Double-clicking with mouse button 1 selects the word under the mouse and positions the insertion cursor at the beginning of the word. Dragging after a double click will stroke out a selection consisting of whole words.

[3]
Triple-clicking with mouse button 1 selects all of the text in the entry and positions the insertion cursor before the first character.

[4]
The ends of the selection can be adjusted by dragging with mouse button 1 while the Shift key is down; this will adjust the end of the selection that was nearest to the mouse cursor when button 1 was pressed. If the button is double-clicked before dragging then the selection will be adjusted in units of whole words.

[5]
Clicking mouse button 1 with the Control key down will position the insertion cursor in the entry without affecting the selection.

[6]
If any normal printing characters are typed in an entry, they are inserted at the point of the insertion cursor.

[7]
The view in the entry can be adjusted by dragging with mouse button 2. If mouse button 2 is clicked without moving the mouse, the selection is copied into the entry at the position of the mouse cursor.

[8]
If the mouse is dragged out of the entry on the left or right sides while button 1 is pressed, the entry will automatically scroll to make more text visible (if there is more text off-screen on the side where the mouse left the window).

[9]
The Left and Right keys move the insertion cursor one character to the left or right; they also clear any selection in the entry and set the selection anchor. If Left or Right is typed with the Shift key down, then the insertion cursor moves and the selection is extended to include the new character. Control-Left and Control-Right move the insertion cursor by words, and Control-Shift-Left and Control-Shift-Right move the insertion cursor by words and also extend the selection. Control-b and Control-f behave the same as Left and Right, respectively. Meta-b and Meta-f behave the same as Control-Left and Control-Right, respectively.

[10]
The Home key, or Control-a, will move the insertion cursor to the beginning of the entry and clear any selection in the entry. Shift-Home moves the insertion cursor to the beginning of the entry and also extends the selection to that point.

[11]
The End key, or Control-e, will move the insertion cursor to the end of the entry and clear any selection in the entry. Shift-End moves the cursor to the end and extends the selection to that point.

[12]
The Select key and Control-Space set the selection anchor to the position of the insertion cursor. They don’t affect the current selection. Shift-Select and Control-Shift-Space adjust the selection to the current position of the insertion cursor, selecting from the anchor to the insertion cursor if there was not any selection previously.

[13]
Control-/ selects all the text in the entry.

[14]
Control-\ clears any selection in the entry.

[15]
The F16 key (labelled Copy on many Sun workstations) or Meta-w copies the selection in the widget to the clipboard, if there is a selection.

[16]
The F20 key (labelled Cut on many Sun workstations) or Control-w copies the selection in the widget to the clipboard and deletes the selection. If there is no selection in the widget then these keys have no effect.

[17]
The F18 key (labelled Paste on many Sun workstations) or Control-y inserts the contents of the clipboard at the position of the insertion cursor.

[18]
The Delete key deletes the selection, if there is one in the entry. If there is no selection, it deletes the character to the right of the insertion cursor.

[19]
The BackSpace key and Control-h delete the selection, if there is one in the entry. If there is no selection, it deletes the character to the left of the insertion cursor.

[20]
Control-d deletes the character to the right of the insertion cursor.

[21]
Meta-d deletes the word to the right of the insertion cursor.

[22]
Control-k deletes all the characters to the right of the insertion cursor.

[23]
Control-t reverses the order of the two characters to the right of the insertion cursor. If the entry is disabled using the -state option, then the entry’s view can still be adjusted and text in the entry can still be selected, but no insertion cursor will be displayed and no text modifications will take place. The behavior of entries can be changed by defining new bindings for individual widgets or by redefining the class bindings.

KEYWORDS

entry, widget

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

284 - Linux cli command Import_Intopm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Import_Intopm and provides detailed information about the command Import_Intopm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Import_Intopm.

NAME 🖥️ Import_Intopm 🖥️

Import packages into other packages

SYNOPSIS

package My::MultiExporter; use Import::Into; # simple sub import { Thing1->import::into(scalar caller); } # multiple sub import { my $target = caller; Thing1->import::into($target); Thing2->import::into($target, qw(import arguments)); } # by level sub import { Thing1->import::into(1); } # with exporter use base qw(Exporter); sub import { shift->export_to_level(1); Thing1->import::into(1); } # no My::MultiExporter == no Thing1 sub unimport { Thing1->unimport::out_of(scalar caller); }

People wanting to re-export your module should also be using Import::Into. Any exporter or pragma will work seamlessly.

Note: You do not need to make any changes to Thing1 to be able to call import::into on it. This is a global method, and is callable on any package (and in fact on any object as well, although it’s rarer that you’d want to do that).

DESCRIPTION

Writing exporters is a pain. Some use Exporter, some use Sub::Exporter, some use Moose::Exporter, some use Exporter::Declare … and some things are pragmas.

Exporting on someone else’s behalf is harder. The exporters don’t provide a consistent API for this, and pragmas need to have their import method called directly, since they effect the current unit of compilation.

Import::Into provides global methods to make this painless.

METHODS

$package->import::into( $target, @arguments );

A global method, callable on any package. Loads and imports the given package into $target. @arguments are passed along to the package’s import method.

$target can be an package name to export to, an integer for the caller level to export to, or a hashref with the following options:

package
The target package to export to.

filename
The apparent filename to export to. Some exporting modules, such as autodie or strictures, care about the filename they are being imported to.

line
The apparent line number to export to. To be combined with the filename option.

level
The caller level to export to. This will automatically populate the package, filename, and line options, making it the easiest most constent option.

version
A version number to check for the module. The equivalent of specifying the version number on a use line.

$package->unimport::out_of( $target, @arguments );

Equivalent to import::into, but dispatches to $package’s unimport method instead of import.

WHY USE THIS MODULE

The APIs for exporting modules aren’t consistent. Exporter subclasses provide export_to_level, but if they overrode their import method all bets are off. Sub::Exporter provides an into parameter but figuring out something used it isn’t trivial. Pragmas need to have their import method called directly since they affect the current unit of compilation.

It’s … annoying.

However, there is an approach that actually works for all of these types.

eval “package $target; use $thing;”

will work for anything checking caller, which is everything except pragmas. But it doesn’t work for pragmas - pragmas need:

$thing->import;

because they’re designed to affect the code currently being compiled - so within an eval, that’s the scope of the eval itself, not the module that just used you - so

sub import { eval “use strict;” }

doesn’t do what you wanted, but

sub import { strict->import; }

will apply strict to the calling file correctly.

Of course, now you have two new problems - first, that you still need to know if something’s a pragma, and second that you can’t use either of these approaches alone on something like Moose or Moo that’s both an exporter and a pragma.

So, a solution for that is:

use Module::Runtime; my $sub = eval “package $target; sub { use_module(shift)->import(\_) }”; $sub->($thing, @import_args);

which means that import is called from the right place for pragmas to take effect, and from the right package for caller checking to work - and so behaves correctly for all types of exporter, for pragmas, and for hybrids.

Additionally, some import routines check the filename they are being imported to. This can be dealt with by generating a #line directive in the eval, which will change what caller reports for the filename when called in the importer. The filename and line number to use in the directive then need to be fetched using caller:

my ($target, $file, $line) = caller(1); my $sub = eval qq{ package $target; #line $line “$file” sub { use_module(shift)->import(\_) } }; $sub->($thing, @import_args);

And you need to switch between these implementations depending on if you are targeting a specific package, or something in your call stack.

Remembering all this, however, is excessively irritating. So I wrote a module so I didn’t have to anymore. Loading Import::Into creates a global method import::into which you can call on any package to import it into another package. So now you can simply write:

use Import::Into; $thing->import::into($target, @import_args);

This works because of how perl resolves method calls - a call to a simple method name is resolved against the package of the class or object, so

$thing->method_name(@args);

is roughly equivalent to:

my $code_ref = $thing->can(method_name); $code_ref->($thing, @args);

while if a :: is found, the lookup is made relative to the package name (i.e. everything before the last ::) so

$thing->Package::Name::method_name(@args);

is roughly equivalent to:

my $code_ref = Package::Name->can(method_name); $code_ref->($thing, @args);

So since Import::Into defines a method into in package import the syntax reliably calls that.

For more craziness of this order, have a look at the article I wrote at <http://shadow.cat/blog/matt-s-trout/madness-with-methods> which covers coderef abuse and the ${\...} syntax.

And that’s it.

SEE ALSO

I gave a lightning talk on this module (and curry and Safe::Isa) at YAPC::NA 2013 <https://www.youtube.com/watch?v=wFXWV2yY7gE&t=46m05s>.

ACKNOWLEDGEMENTS

Thanks to Getty for asking “how can I get use strict; use warnings; turned on for all consumers of my code? and then why is this not a module?!”.

AUTHOR

mst - Matt S. Trout (cpan:MSTROUT) <[email protected]>

CONTRIBUTORS

haarg - Graham Knop (cpan:HAARG) <[email protected]>

Mithaldu - Christian Walde (cpan:MITHALDU) <[email protected]>

COPYRIGHT

Copyright (c) 2012 the Import::Into AUTHOR and CONTRIBUTORS as listed above.

LICENSE

This library is free software and may be distributed under the same terms as perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

285 - Linux cli command NULLconst

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command NULLconst and provides detailed information about the command NULLconst, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the NULLconst.

NAME 🖥️ NULLconst 🖥️

null pointer constant

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <stddef.h>
#define NULL ((void *) 0)

DESCRIPTION

NULL represents a null pointer constant, that is, a pointer that does not point to anything.

CONFORMING TO

C99 and later; POSIX.1-2001 and later.

NOTES

The following headers also provide NULL: <locale.h>, <stdio.h>, <stdlib.h>, <string.h>, <time.h>, <unistd.h>, and <wchar.h>.

CAVEATS

It is undefined behavior to dereference a null pointer, and that usually causes a segmentation fault in practice.

It is also undefined behavior to perform pointer arithmetic on it.

NULL - NULL is undefined behavior, according to ISO C, but is defined to be 0 in C++.

To avoid confusing human readers of the code, do not compare pointer variables to 0, and do not assign 0 to them. Instead, always use NULL.

NULL shouldn’t be confused with NUL, which is an ascii(7) character, represented in C as ‘�’.

BUGS

When it is necessary to set a pointer variable to a null pointer, it is not enough to use memset(3) to zero the pointer (this is usually done when zeroing a struct that contains pointers), since ISO C and POSIX don’t guarantee that a bit pattern of all 0s represent a null pointer. See the EXAMPLES section in getaddrinfo(3) for an example program that does this correctly.

SEE ALSO

void(3type)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

286 - Linux cli command Regexp_Common_zippm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_zippm and provides detailed information about the command Regexp_Common_zippm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_zippm.

NAME 🖥️ Regexp_Common_zippm 🖥️

  • provide regexes for postal codes.

SYNOPSIS

use Regexp::Common qw /zip/; while (<>) { /^$RE{zip}{Netherlands}$/ and print “Dutch postal code “; }

DESCRIPTION

Please consult the manual of Regexp::Common for a general description of the works of this interface.

Do not use this module directly, but load it via Regexp::Common.

This module offers patterns for zip or postal codes of many different countries. They all have the form $RE{zip}{Country}[{options}].

The following common options are used:

“{-prefix=[yes|no|allow]}” and “{-country=PAT}”.

Postal codes can be prefixed with a country abbreviation. That is, a Dutch postal code of 1234 AB can also be written as NL-1234 AB. By default, all the patterns will allow the prefixes. But this can be changed with the -prefix option. With -prefix=yes, the returned pattern requires a country prefix, while -prefix=no disallows a prefix. Any argument that doesn’t start with a y or a n allows a country prefix, but doesn’t require them.

The prefixes used are, unfortunately, not always the same. Officially, ISO country codes need to be used, but the usage of CEPT codes (the same ones as used on cars) is common too. By default, each postal code will recognize a country prefix that’s either the ISO standard or the CEPT code. That is, German postal codes may prefixed with either DE or D. The recognized prefix can be changed with the -country option, which takes a (sub)pattern as argument. The arguments iso and cept are special, and indicate the language prefix should be the ISO country code, or the CEPT code.

Examples: /$RE{zip}{Netherlands}/; # Matches ‘1234 AB’ and ‘NL-1234 AB’. /$RE{zip}{Netherlands}{-prefix => ’no’}/; # Matches ‘1234 AB’ but not ‘NL-1234 AB’. /$RE{zip}{Netherlands}{-prefix => ‘yes’}/; # Matches ‘NL-1234 AB’ but not ‘1234 AB’.

/$RE{zip}{Germany}/; # Matches DE-12345 and D-12345. /$RE{zip}{Germany}{-country => iso}/; # Matches DE-12345 but not D-12345. /$RE{zip}{Germany}{-country => cept}/; # Matches D-12345 but not DE-12345. /$RE{zip}{Germany}{-country => GER}/; # Matches GER-12345.

“{-sep=PAT}”

Some countries have postal codes that consist of two parts. Typically there is an official way of separating those parts; but in practise people tend to use different separators. For instance, if the official way to separate parts is to use a space, it happens that the space is left off. The -sep option can be given a pattern as argument which indicates what to use as a separator between the parts.

Examples: /$RE{zip}{Netherlands}/; # Matches ‘1234 AB’ but not ‘1234AB’. /$RE{zip}{Netherlands}{-sep => ‘\s*’}/; # Matches ‘1234 AB’ and ‘1234AB’.

“$RE{zip}{Australia}{-lax}”

Returns a pattern that recognizes Australian postal codes. Australian postal codes consist of four digits; the first two digits, which range from ‘10’ to ‘97’, indicate the state, although there are exceptions. Territories use ‘02’ or ‘08’ as starting digits. ‘0909’ is the only postal code starting with ‘09’ - this is the postal code for the Northern Territory University). The (optional) country prefixes are AU (ISO country code) and AUS (CEPT code).

It the past, it was claimed that for postal codes starting with a 0, the leading 0 may be omitted, and up to (and including) version 2016060201, the leading 0 was optional. But there doesn’t seem be solid evidence the leading 0 is optional. So, we now require there always to be four digit – unless the {-lax} option is given, then a possibly leading 0 is optional.

Regexp::Common 2.107 and before used $RE{zip}{Australian}. This is still supported.

If {-keep} is used, the following variables will be set:

$1
The entire postal code.

$2
The country code prefix.

$3
The postal code without the country prefix.

As of version 2016060201, no $4 or $5 will be set.

“$RE {zip} {Austria}”

Returns a pattern which recognizes Austrian postal codes. Austrian postal codes consists of 4 digits, but not all possibilities are used. This pattern matches the postal codes in use. The (optional) country prefixes are AT (ISO country code) and AUT (CEPT code).

If {-keep} is used, the following variables will be set:

$1
The entire postal code.

$2
The country code prefix.

$3
The postal code without the country code prefix.

“$RE{zip}{Belgium}”

Returns a pattern than recognizes Belgian postal codes. Belgian postal codes consist of 4 digits, of which the first indicates the province. The (optional) country prefixes are BE (ISO country code) and B (CEPT code).

If {-keep} is used, the following variables will be set:

$1
The entire postal code.

$2
The country code prefix.

$3
The postal code without the country prefix.

“$RE{zip}{Denmark}”

Returns a pattern that recognizes Danish postal codes. Danish postal codes consist of four numbers; the first digit indicates the distribution region, the second the distribution district. The (optional) country prefix is DK, which is both the ISO country code and the CEPT code.

If {-keep} is used, the following variables will be set:

$1
The entire postal code.

$2
The country code prefix.

$3
The postal code without the country prefix.

Danish postal codes will not start with 39. Postal codes of the form 39XX are reserved from Greenland; the pattern for Danish postal codes will not recognize them.

“$RE{zip}{France}”

Returns a pattern that recognizes French postal codes. French postal codes consist of five numbers; the first two numbers, which range from ‘01’ to ‘98’, indicate the department. The (optional) country prefixes are FR (ISO country code) and F (CEPT code). Regexp::Common 2.107 and before used $RE{zip}{French}. This is still supported.

Monaco uses postal codes which are part of the numbering system used by the French postal code system; their numbers start with 980. These numbers are not recognized by this pattern.

If {-keep} is used, the following variables will be set:

$1
The entire postal code.

$2
The country code prefix.

$3
The postal code without the country prefix.

“$RE{zip}{Germany}”

Returns a pattern that recognizes German postal codes. German postal codes consist of five numbers; the first two numbers indicating a wider postal area, the last three digits a postal district. The (optional) country prefixes are DE (ISO country code) and D (CEPT code). Regexp::Common 2.107 and before used $RE{zip}{German}. This is still supported.

If {-keep} is used, the following variables will be set:

$1
The entire postal code.

$2
The country code prefix.

$3
The postal code without the country prefix.

“$RE{zip}{Greenland}”

Returns a pattern that recognizes postal codes from Greenland. Greenland, uses the Danish postal codes system. Postal codes starting with 39 are reserved for Greenland, and all Greenlandic postal codes start with 39. Except the postal code for Santa. He uses 2412.

The (optional) country prefix is GL, which is use both as the ISO country code and the CEPT code. Earlier versions used DK as the prefix.

If {-keep} is used, the following variables will be set:

$1
The entire postal code.

$2
The country code prefix.

$3
The postal code without the country prefix.

“$RE{zip}{Italy}”

Returns a pattern recognizing Italian postal codes. Italian postal codes consist of 5 digits. The first digit indicates the region, the second the province. The third digit is odd for province capitals, and even for the province itself. The fourth digit indicates the route, and the fifth a place on the route (0 for small places, alphabetically for the rest).

Codes starting with 4789 are postal codes for San Marino; they are not recognized by the pattern. Use $RE {zip} {San Marino} instead.

The country prefix is either IT (the ISO country code), or I (the CEPT code).

If {-keep} is used, the following variables will be set:

$1
The entire postal code.

$2
The country code prefix.

$3
The postal code without the country prefix.

“$RE {zip} {Liechtenstein}”

Returns a pattern which recognizes postal codes used in Liechtenstein. Liechtenstein uses postal codes from the Swiss postal code system. This system uses four digits. Postal codes which start with 94, and use 8 or 9 as a third digit are postal codes for Liechtenstein.

If {-keep} is used, the following variables will be set:

$1
The entire postal code.

$2
The country code prefix.

$3
The postal code without the country prefix.

The ISO country prefix is LI, the CEPT country prefix is LIE.

“$RE {zip {Monaco}”

Returns a pattern for postal codes used in Monaco. Monaco uses a range from the system used in France. They are 5 digits, starting with 980. The number 98000 is used for physical addresses. Numbers ending in 01 to 99 are used for special deliveries.

The ISO country code is MC.

If {-keep} is used, the following variables will be set:

$1
The entire postal code.

$2
The country code prefix.

$3
The postal code without the country prefix.

“$RE{zip}{Netherlands}”

Returns a pattern that recognizes Dutch postal codes. Dutch postal codes consist of 4 digits and 2 letters, separated by a space. The separator can be changed using the {-sep} option, as discussed above. The (optional) country prefix is NL, which is both the ISO country code and the CEPT code. Regexp::Common 2.107 and earlier used $RE{zip}{Dutch}. This is still supported.

If {-keep} is used, the following variables will be set:

$1
The entire postal code.

$2
The country code prefix.

$3
The postal code without the country prefix.

$4
The digits part of the postal code.

$5
The separator between the digits and the letters.

$6
The letters part of the postal code.

“$RE{zip}{Norway}”

Returns a pattern that recognizes Norwegian postal codes. Norwegian postal codes consist of four digits.

The country prefix is either NO (the ISO country code), or N (the CEPT code).

If {-keep} is used, the following variables will be set:

$1
The entire postal code.

$2
The country code prefix.

$3
The postal code without the country prefix.

“$RE {zip} {San Marino}”

Postal codes of San Marino use a slice from the Italian postal codes. Any code starting 4789, followed by another digit belongs to San Marino.

The country prefix for San Marino is SM.

If {-keep} is used, the following variables will be set:

$1
The entire postal code.

$2
The country code prefix.

$3
The postal code without the country prefix.

“$RE{zip}{Spain}”

Returns a pattern that recognizes Spanish postal codes. Spanish postal codes consist of 5 digits. The first 2 indicate one of Spain’s fifties provinces (in alphabetical order), starting with 00. The third digit indicates a main city or the main delivery rounds. The last two digits are the delivery area, secondary delivery route or a link to rural areas.

The country prefix is either ES (the ISO country code), or E (the CEPT code).

If {-keep} is used, the following variables will be set:

$1
The entire postal code.

$2
The country code prefix.

$3
The postal code without the country prefix.

$4
The two digits indicating the province.

$5
The digit indicating the main city or main delivery route.

$6
The digits indicating the delivery area, secondary delivery route or a link to rural areas.

“$RE {zip} {Switzerland}”

Returns a pattern that recognizes Swiss postal codes. Swiss postal codes consist of 4 digits, but not all combinations are used. Postal codes starting with 948 and 949 are for location in Liechtenstein, and will not be recognized by the pattern for Swiss postal codes. Use $RE {zip} {Liechtenstein} for those.

If {-keep} is used, the following variables will be set:

$1
The entire postal code.

$2
The country code prefix.

$3
The postal code without the country prefix.

The country prefix is CH, for both the ISO and CEPT prefixes.

“$RE{zip}{US}{-extended => [yes|no|allow]}”

Returns a pattern that recognizes US zip codes. US zip codes consist of 5 digits, with an optional 4 digit extension. By default, extensions are allowed, but not required. This can be influenced by the -extended option. If its argument starts with a y, extensions are required; if the argument starts with a n, extensions will not be recognized. If an extension is used, a dash is used to separate the main part from the extension, but this can be changed with the -sep option.

The country prefix is either US (the ISO country code), or USA (the CEPT code).

If {-keep} is being used, the following variables will be set:

$1
The entire postal code.

$2
The country code prefix.

$3
The postal code without the country prefix.

$4
The first 5 digits of the postal code.

$5
The first three digits of the postal code, indicating a sectional center or a large city. New in Regexp::Common 2.119.

$6
The last 2 digits of the 5 digit part of the postal code, indicating a post office facility or delivery area. New in Regexp::Common 2.119.

$7
The separator between the 5 digit part and the 4 digit part. Up to Regexp::Common 2.118, this used to be $5.

$8
The 4 digit part of the postal code (if any). Up to Regexp::Common 2.118, this used to be $6.

$9
The first two digits of the 4 digit part of the postal code, indicating a sector, or several blocks. New in Regexp::Common 2.119.

$10
The last two digits of the 4 digit part of the postal code, indicating a segment or one side of a street. New in Regexp::Common 2.119.

Questions

  • Can the 5 digit part of the zip code (in theory) start with 000?

  • Can the 5 digit part of the zip code (in theory) end with 00?

  • Can the 4 digit part of the zip code (in theory) start with 00?

  • Can the 4 digit part of the zip code (in theory) end with 00?

“$RE {zip} {Vatican City}”

Vatican City uses a single postal code; taken from the Italian system of postal codes, and sharing the single code with a part of Rome.

If {-keep} is used, the following variables will be set:

$1
The entire postal code.

$2
The country code prefix.

$3
The postal code without the country prefix.

The country prefix for Vatican City is VA.

SEE ALSO

Regexp::Common for a general description of how to use this interface.

<http://www.columbia.edu/kermit/postal.html>
Frank’s compulsive guide to postal addresses.

<http://www.upu.int/post_code/en/addressing_formats_guide.shtml>
Postal addressing systems.

<http://www.uni-koeln.de/~arcd2/33e.htm>
Postal code information.

<http://www.grcdi.nl/linkspc.htm>
Links to Postcode Pages.

<https://postcode.auspost.com.au/free_display.html?id=1>
All Australian postal codes in use.

<http://hdusps.esecurecare.net/cgi-bin/hdusps.cfg/php/enduser/std_adp.php?p_faqid=1014>
Information about US postal codes.

<http://en.wikipedia.org/wiki/Postal_code>

<http://download.geonames.org/export/zip/>

Lots of zip files with active postal codes.

<http://postal-codes.findthedata.com/>
Find postal codes.

AUTHORS

Damian Conway ([email protected]) and Abigail ([email protected]).

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Zip codes for most countries are missing. Send them in to [email protected].

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

287 - Linux cli command wcscat

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcscat and provides detailed information about the command wcscat, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcscat.

NAME 🖥️ wcscat 🖥️

concatenate two wide-character strings

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
wchar_t *wcscat(wchar_t *restrict dest",constwchar_t*restrict"src);

DESCRIPTION

The wcscat() function is the wide-character equivalent of the strcat(3) function. It copies the wide-character string pointed to by src, including the terminating null wide character (L’�’), to the end of the wide-character string pointed to by dest.

The strings may not overlap.

The programmer must ensure that there is room for at least wcslen(dest)+wcslen(src)+1 wide characters at dest.

RETURN VALUE

wcscat() returns dest.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcscat()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

strcat(3), wcpcpy(3), wcscpy(3), wcsncat(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

288 - Linux cli command free

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command free and provides detailed information about the command free, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the free.

NAME 🖥️ free 🖥️

allocate and free dynamic memory

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
void *malloc(size_t size);
void free(void *_Nullable ptr);
void *calloc(size_t nmemb, size_t size);
void *realloc(void *_Nullable ptr, size_t size);
void *reallocarray(void *_Nullable ptr, size_t nmemb, size_t size);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

reallocarray():

    Since glibc 2.29:
        _DEFAULT_SOURCE
    glibc 2.28 and earlier:
        _GNU_SOURCE

DESCRIPTION

malloc()

The malloc() function allocates size bytes and returns a pointer to the allocated memory. The memory is not initialized. If size is 0, then malloc() returns a unique pointer value that can later be successfully passed to free(). (See “Nonportable behavior” for portability issues.)

free()

The free() function frees the memory space pointed to by ptr, which must have been returned by a previous call to malloc() or related functions. Otherwise, or if ptr has already been freed, undefined behavior occurs. If ptr is NULL, no operation is performed.

calloc()

The calloc() function allocates memory for an array of nmemb elements of size bytes each and returns a pointer to the allocated memory. The memory is set to zero. If nmemb or size is 0, then calloc() returns a unique pointer value that can later be successfully passed to free().

If the multiplication of nmemb and size would result in integer overflow, then calloc() returns an error. By contrast, an integer overflow would not be detected in the following call to malloc(), with the result that an incorrectly sized block of memory would be allocated:

malloc(nmemb * size);

realloc()

The realloc() function changes the size of the memory block pointed to by ptr to size bytes. The contents of the memory will be unchanged in the range from the start of the region up to the minimum of the old and new sizes. If the new size is larger than the old size, the added memory will not be initialized.

If ptr is NULL, then the call is equivalent to malloc(size), for all values of size.

If size is equal to zero, and ptr is not NULL, then the call is equivalent to free(ptr) (but see “Nonportable behavior” for portability issues).

Unless ptr is NULL, it must have been returned by an earlier call to malloc or related functions. If the area pointed to was moved, a free(ptr) is done.

reallocarray()

The reallocarray() function changes the size of (and possibly moves) the memory block pointed to by ptr to be large enough for an array of nmemb elements, each of which is size bytes. It is equivalent to the call

realloc(ptr, nmemb * size);

However, unlike that realloc() call, reallocarray() fails safely in the case where the multiplication would overflow. If such an overflow occurs, reallocarray() returns an error.

RETURN VALUE

The malloc(), calloc(), realloc(), and reallocarray() functions return a pointer to the allocated memory, which is suitably aligned for any type that fits into the requested size or less. On error, these functions return NULL and set errno. Attempting to allocate more than PTRDIFF_MAX bytes is considered an error, as an object that large could cause later pointer subtraction to overflow.

The free() function returns no value, and preserves errno.

The realloc() and reallocarray() functions return NULL if ptr is not NULL and the requested size is zero; this is not considered an error. (See “Nonportable behavior” for portability issues.) Otherwise, the returned pointer may be the same as ptr if the allocation was not moved (e.g., there was room to expand the allocation in-place), or different from ptr if the allocation was moved to a new address. If these functions fail, the original block is left untouched; it is not freed or moved.

ERRORS

calloc(), malloc(), realloc(), and reallocarray() can fail with the following error:

ENOMEM
Out of memory. Possibly, the application hit the RLIMIT_AS or RLIMIT_DATA limit described in getrlimit(2). Another reason could be that the number of mappings created by the caller process exceeded the limit specified by /proc/sys/vm/max_map_count.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

malloc(), free(), calloc(), realloc()

Thread safetyMT-Safe

STANDARDS

malloc()
free()
calloc()
realloc()
C11, POSIX.1-2008.

reallocarray()
None.

HISTORY

malloc()
free()
calloc()
realloc()
POSIX.1-2001, C89.

reallocarray()
glibc 2.26. OpenBSD 5.6, FreeBSD 11.0.

malloc() and related functions rejected sizes greater than PTRDIFF_MAX starting in glibc 2.30.

free() preserved errno starting in glibc 2.33.

NOTES

By default, Linux follows an optimistic memory allocation strategy. This means that when malloc() returns non-NULL there is no guarantee that the memory really is available. In case it turns out that the system is out of memory, one or more processes will be killed by the OOM killer. For more information, see the description of /proc/sys/vm/overcommit_memory and /proc/sys/vm/oom_adj in proc(5), and the Linux kernel source file Documentation/vm/overcommit-accounting.rst.

Normally, malloc() allocates memory from the heap, and adjusts the size of the heap as required, using sbrk(2). When allocating blocks of memory larger than MMAP_THRESHOLD bytes, the glibc malloc() implementation allocates the memory as a private anonymous mapping using mmap(2). MMAP_THRESHOLD is 128 kB by default, but is adjustable using mallopt(3). Prior to Linux 4.7 allocations performed using mmap(2) were unaffected by the RLIMIT_DATA resource limit; since Linux 4.7, this limit is also enforced for allocations performed using mmap(2).

To avoid corruption in multithreaded applications, mutexes are used internally to protect the memory-management data structures employed by these functions. In a multithreaded application in which threads simultaneously allocate and free memory, there could be contention for these mutexes. To scalably handle memory allocation in multithreaded applications, glibc creates additional memory allocation arenas if mutex contention is detected. Each arena is a large region of memory that is internally allocated by the system (using brk(2) or mmap(2)), and managed with its own mutexes.

If your program uses a private memory allocator, it should do so by replacing malloc(), free(), calloc(), and realloc(). The replacement functions must implement the documented glibc behaviors, including errno handling, size-zero allocations, and overflow checking; otherwise, other library routines may crash or operate incorrectly. For example, if the replacement free() does not preserve errno, then seemingly unrelated library routines may fail without having a valid reason in errno. Private memory allocators may also need to replace other glibc functions; see “Replacing malloc” in the glibc manual for details.

Crashes in memory allocators are almost always related to heap corruption, such as overflowing an allocated chunk or freeing the same pointer twice.

The malloc() implementation is tunable via environment variables; see mallopt(3) for details.

Nonportable behavior

The behavior of these functions when the requested size is zero is glibc specific; other implementations may return NULL without setting errno, and portable POSIX programs should tolerate such behavior. See realloc(3p).

POSIX requires memory allocators to set errno upon failure. However, the C standard does not require this, and applications portable to non-POSIX platforms should not assume this.

Portable programs should not use private memory allocators, as POSIX and the C standard do not allow replacement of malloc(), free(), calloc(), and realloc().

EXAMPLES

#include <err.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MALLOCARRAY(n, type)  ((type *) my_mallocarray(n, sizeof(type)))
#define MALLOC(type)          MALLOCARRAY(1, type)
static inline void *my_mallocarray(size_t nmemb, size_t size);
int
main(void)
{
    char  *p;
    p = MALLOCARRAY(32, char);
    if (p == NULL)
        err(EXIT_FAILURE, "malloc");
    strlcpy(p, "foo", 32);
    puts(p);
}
static inline void *
my_mallocarray(size_t nmemb, size_t size)
{
    return reallocarray(NULL, nmemb, size);
}

SEE ALSO

valgrind(1), brk(2), mmap(2), alloca(3), malloc_get_state(3), malloc_info(3), malloc_trim(3), malloc_usable_size(3), mallopt(3), mcheck(3), mtrace(3), posix_memalign(3)

For details of the GNU C library implementation, see .

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

289 - Linux cli command getnetgrent_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getnetgrent_r and provides detailed information about the command getnetgrent_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getnetgrent_r.

NAME 🖥️ getnetgrent_r 🖥️

handle network group entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
int setnetgrent(const char *netgroup);
void endnetgrent(void);
int getnetgrent(char **restrict host,
 char **restrict user, char **restrict domain);
int getnetgrent_r(char **restrict host,
 char **restrict user, char **restrict domain,
 char buf[restrict .buflen], size_t buflen);
int innetgr(const char *netgroup, const char *host,
 const char *user, const char *domain);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

setnetgrent(), endnetgrent(), getnetgrent(), getnetgrent_r(), innetgr():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The netgroup is a SunOS invention. A netgroup database is a list of string triples (hostname, username, domainname) or other netgroup names. Any of the elements in a triple can be empty, which means that anything matches. The functions described here allow access to the netgroup databases. The file /etc/nsswitch.conf defines what database is searched.

The setnetgrent() call defines the netgroup that will be searched by subsequent getnetgrent() calls. The getnetgrent() function retrieves the next netgroup entry, and returns pointers in host, user, domain. A null pointer means that the corresponding entry matches any string. The pointers are valid only as long as there is no call to other netgroup-related functions. To avoid this problem you can use the GNU function getnetgrent_r() that stores the strings in the supplied buffer. To free all allocated buffers use endnetgrent().

In most cases you want to check only if the triplet (hostname, username, domainname) is a member of a netgroup. The function innetgr() can be used for this without calling the above three functions. Again, a null pointer is a wildcard and matches any string. The function is thread-safe.

RETURN VALUE

These functions return 1 on success and 0 for failure.

FILES

/etc/netgroup
/etc/nsswitch.conf

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setnetgrent(), getnetgrent_r(), innetgr()

Thread safety

MT-Unsafe race:netgrent locale

endnetgrent()

Thread safety

MT-Unsafe race:netgrent

getnetgrent()

Thread safety

MT-Unsafe race:netgrent race:netgrentbuf locale

In the above table, netgrent in race:netgrent signifies that if any of the functions setnetgrent(), getnetgrent_r(), innetgr(), getnetgrent(), or endnetgrent() are used in parallel in different threads of a program, then data races could occur.

VERSIONS

In the BSD implementation, setnetgrent() returns void.

STANDARDS

None.

HISTORY

setnetgrent(), endnetgrent(), getnetgrent(), and innetgr() are available on most UNIX systems. getnetgrent_r() is not widely available on other systems.

SEE ALSO

sethostent(3), setprotoent(3), setservent(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

290 - Linux cli command Image_ExifTool_NikonCapturepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_NikonCapturepm and provides detailed information about the command Image_ExifTool_NikonCapturepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_NikonCapturepm.

NAME 🖥️ Image_ExifTool_NikonCapturepm 🖥️

Read/write Nikon Capture information

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains routines to read and write Nikon Capture information in the maker notes of NEF images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.cybercom.net/~dcoffin/dcraw/>

SEE ALSO

“NikonCapture Tags” in Image::ExifTool::TagNames, “Nikon Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

291 - Linux cli command Image_ExifTool_ICC_Profilepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_ICC_Profilepm and provides detailed information about the command Image_ExifTool_ICC_Profilepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_ICC_Profilepm.

NAME 🖥️ Image_ExifTool_ICC_Profilepm 🖥️

Read ICC Profile meta information

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains the definitions to read information from ICC profiles. ICC (International Color Consortium) profiles are used to translate color data created on one device into another device’s native color space.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.color.org/icc_specs2.html>

<http://developer.apple.com/documentation/GraphicsImaging/Reference/ColorSync_Manager/ColorSync_Manager.pdf>

<https://color.org/specification/ICC.2-2019.pdf>

SEE ALSO

“ICC_Profile Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

292 - Linux cli command STAILQ_HEAD

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command STAILQ_HEAD and provides detailed information about the command STAILQ_HEAD, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the STAILQ_HEAD.

NAME 🖥️ STAILQ_HEAD 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

293 - Linux cli command Net_DBus_RemoteServicepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_RemoteServicepm and provides detailed information about the command Net_DBus_RemoteServicepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_RemoteServicepm.

NAME 🖥️ Net_DBus_RemoteServicepm 🖥️

Access services provided on the bus

SYNOPSIS

my $bus = Net::DBus->find; my $service = $bus->get_service(“org.freedesktop.DBus”); my $object = $service->get_object("/org/freedesktop/DBus"); foreach (@{$object->ListNames}) { print “$_ “; }

DESCRIPTION

This object provides a handle to a remote service on the bus. From this handle it is possible to access objects associated with the service. If a service is not running, an attempt will be made to activate it the first time a method is called against one of its objects.

METHODS

my $service = Net::DBus::RemoteService->new($bus, $owner, $service_name);
Creates a new handle for a remote service. The $bus parameter is an instance of Net::DBus, $owner is the name of the client providing the service, while $service_name is the well known name of the service on the bus. Service names consist of two or more tokens, separated by periods, while the tokens comprise the letters a-z, A-Z, 0-9 and _, for example org.freedesktop.DBus. There is generally no need to call this constructor, instead the get_service method on Net::DBus should be used. This caches handles to remote services, eliminating repeated retrieval of introspection data.

my $bus = $service->get_bus;
Retrieves a handle for the bus to which this service is attached. The returned object will be an instance of Net::DBus.

my $service_name = $service->get_service_name
Retrieves the name of the remote service as known to the bus.

my $owner_name = $service->get_owner_name;
Retrieves the name of the client owning the service at the time it was connected to.

my $object = $service->get_object($object_path[, $interface]); =item my $object = $service->get_object($object_path, \params);
Retrieves a handle to the remote object provided by the service with the name of $object_path. If the optional $interface parameter is provided, the object will immediately be cast to the designated interface. NB, it is only necessary to cast an object to a specific interface if there are multiple interfaces on the object providing methods with the same name, or the remote object does support introspection. The returned object will be an instance of Net::DBus::RemoteObject. An alternate form of the method is available, passing a hash reference of extra parameters. Valid keys in the hash are interface specifying the interface name to cast to, and timeout specifying a timeout in milliseconds

my $timeout = $service->timeout(60 * 1000);
Sets or retrieves the timeout value which will be used for DBus requests belongs to this service. The value is in milliseconds. If the timeout for a service is undefined, then the default timeout from the bus will apply.

AUTHOR

Daniel Berrange <[email protected]>

COPYRIGHT

Copright (C) 2004-2011, Daniel Berrange.

SEE ALSO

Net::DBus::RemoteObject, Net::DBus::Service, Net::DBus

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

294 - Linux cli command uintmax_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command uintmax_ttype and provides detailed information about the command uintmax_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the uintmax_ttype.

NAME 🖥️ uintmax_ttype 🖥️

greatest-width basic integer types

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <stdint.h>
typedef /* ... */ intmax_t;
typedef /* ... */ uintmax_t;
#define INTMAX_WIDTH /* ... */
#define UINTMAX_WIDTH INTMAX_WIDTH
#define INTMAX_MAX /* 2**(INTMAX_WIDTH - 1) - 1 */
#define INTMAX_MIN /* - 2**(INTMAX_WIDTH - 1) */
#define UINTMAX_MAX /* 2**UINTMAX_WIDTH - 1 */
#define INTMAX_C(c) c ## /* ... */
#define UINTMAX_C(c) c ## /* ... */

DESCRIPTION

intmax_t is a signed integer type capable of representing any value of any basic signed integer type supported by the implementation. It is capable of storing values in the range [INTMAX_MIN, INTMAX_MAX].

uintmax_t is an unsigned integer type capable of representing any value of any basic unsigned integer type supported by the implementation. It is capable of storing values in the range [0, UINTMAX_MAX].

The macros [U]INTMAX_WIDTH expand to the width in bits of these types.

The macros [U]INTMAX_MAX expand to the maximum value that these types can hold.

The macro INTMAX_MIN expands to the minimum value that intmax_t can hold.

The macros [U]INTMAX_C() expand their argument to an integer constant of type [u]intmax_t.

The length modifier for [u]intmax_t for the printf(3) and the scanf(3) families of functions is j; resulting commonly in %jd, %ji, %ju, or %jx for printing [u]intmax_t values.

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

NOTES

The following header also provides these types: <inttypes.h>.

BUGS

These types may not be as large as extended integer types, such as __int128

SEE ALSO

int64_t(3type), intptr_t(3type), printf(3), strtoimax(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

295 - Linux cli command getnetbyname

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getnetbyname and provides detailed information about the command getnetbyname, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getnetbyname.

NAME 🖥️ getnetbyname 🖥️

get network entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
struct netent *getnetent(void);
struct netent *getnetbyname(const char *name);
struct netent *getnetbyaddr(uint32_t net, int type);
void setnetent(int stayopen);
void endnetent(void);

DESCRIPTION

The getnetent() function reads the next entry from the networks database and returns a netent structure containing the broken-out fields from the entry. A connection is opened to the database if necessary.

The getnetbyname() function returns a netent structure for the entry from the database that matches the network name.

The getnetbyaddr() function returns a netent structure for the entry from the database that matches the network number net of type type. The net argument must be in host byte order.

The setnetent() function opens a connection to the database, and sets the next entry to the first entry. If stayopen is nonzero, then the connection to the database will not be closed between calls to one of the getnet*() functions.

The endnetent() function closes the connection to the database.

The netent structure is defined in <netdb.h> as follows:

struct netent {
    char      *n_name;     /* official network name */
    char     **n_aliases;  /* alias list */
    int        n_addrtype; /* net address type */
    uint32_t   n_net;      /* network number */
}

The members of the netent structure are:

n_name
The official name of the network.

n_aliases
A NULL-terminated list of alternative names for the network.

n_addrtype
The type of the network number; always AF_INET.

n_net
The network number in host byte order.

RETURN VALUE

The getnetent(), getnetbyname(), and getnetbyaddr() functions return a pointer to a statically allocated netent structure, or a null pointer if an error occurs or the end of the file is reached.

FILES

/etc/networks
networks database file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getnetent()

Thread safety

MT-Unsafe race:netent race:netentbuf env locale

getnetbyname()

Thread safety

MT-Unsafe race:netbyname env locale

getnetbyaddr()

Thread safety

MT-Unsafe race:netbyaddr locale

setnetent(), endnetent()

Thread safety

MT-Unsafe race:netent env locale

In the above table, netent in race:netent signifies that if any of the functions setnetent(), getnetent(), or endnetent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, 4.3BSD.

Before glibc 2.2, the net argument of getnetbyaddr() was of type long.

SEE ALSO

getnetent_r(3), getprotoent(3), getservent(3)
RFC 1101

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

296 - Linux cli command nextafterf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command nextafterf and provides detailed information about the command nextafterf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the nextafterf.

NAME 🖥️ nextafterf 🖥️

floating-point number manipulation

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double nextafter(double x, double y);
float nextafterf(float x, float y);
long double nextafterl(long double x, long double y);
double nexttoward(double x, long double y);
float nexttowardf(float x, long double y);
long double nexttowardl(long double x, long double y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

nextafter():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

nextafterf(), nextafterl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

nexttoward(), nexttowardf(), nexttowardl():

    _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE
        || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The nextafter(), nextafterf(), and nextafterl() functions return the next representable floating-point value following x in the direction of y. If y is less than x, these functions will return the largest representable number less than x.

If x equals y, the functions return y.

The nexttoward(), nexttowardf(), and nexttowardl() functions do the same as the corresponding nextafter() functions, except that they have a long double second argument.

RETURN VALUE

On success, these functions return the next representable floating-point value after x in the direction of y.

If x equals y, then y (cast to the same type as x) is returned.

If x or y is a NaN, a NaN is returned.

If x is finite, and the result would overflow, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the correct mathematical sign.

If x is not equal to y, and the correct function result would be subnormal, zero, or underflow, a range error occurs, and either the correct value (if it can be represented), or 0.0, is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error: result overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error: result is subnormal or underflows
errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

nextafter(), nextafterf(), nextafterl(), nexttoward(), nexttowardf(), nexttowardl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

This function is defined in IEC 559 (and the appendix with recommended functions in IEEE 754/IEEE 854).

HISTORY

C99, POSIX.1-2001.

BUGS

In glibc 2.5 and earlier, these functions do not raise an underflow floating-point (FE_UNDERFLOW) exception when an underflow occurs.

Before glibc 2.23 these functions did not set errno.

SEE ALSO

nearbyint(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

297 - Linux cli command pthread_rwlockattr_setkind_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_rwlockattr_setkind_np and provides detailed information about the command pthread_rwlockattr_setkind_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_rwlockattr_setkind_np.

NAME 🖥️ pthread_rwlockattr_setkind_np 🖥️

set/get the read-write lock kind of the thread read-write lock attribute object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_rwlockattr_setkind_np(pthread_rwlockattr_t *attr,
 int pref);
int pthread_rwlockattr_getkind_np(
 const pthread_rwlockattr_t *restrict attr,
 int *restrict pref);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

pthread_rwlockattr_setkind_np(), pthread_rwlockattr_getkind_np():

    _XOPEN_SOURCE >= 500 || _POSIX_C_SOURCE >= 200809L

DESCRIPTION

The pthread_rwlockattr_setkind_np() function sets the “lock kind” attribute of the read-write lock attribute object referred to by attr to the value specified in pref. The argument pref may be set to one of the following:

PTHREAD_RWLOCK_PREFER_READER_NP
This is the default. A thread may hold multiple read locks; that is, read locks are recursive. According to The Single Unix Specification, the behavior is unspecified when a reader tries to place a lock, and there is no write lock but writers are waiting. Giving preference to the reader, as is set by PTHREAD_RWLOCK_PREFER_READER_NP, implies that the reader will receive the requested lock, even if a writer is waiting. As long as there are readers, the writer will be starved.

PTHREAD_RWLOCK_PREFER_WRITER_NP
This is intended as the write lock analog of PTHREAD_RWLOCK_PREFER_READER_NP. This is ignored by glibc because the POSIX requirement to support recursive read locks would cause this option to create trivial deadlocks; instead use PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP which ensures the application developer will not take recursive read locks thus avoiding deadlocks.

PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP
Setting the lock kind to this avoids writer starvation as long as any read locking is not done in a recursive fashion.

The pthread_rwlockattr_getkind_np() function returns the value of the lock kind attribute of the read-write lock attribute object referred to by attr in the pointer pref.

RETURN VALUE

On success, these functions return 0. Given valid pointer arguments, pthread_rwlockattr_getkind_np() always succeeds. On error, pthread_rwlockattr_setkind_np() returns a nonzero error number.

ERRORS

EINVAL
pref specifies an unsupported value.

STANDARDS

GNU; hence the suffix “_np” (nonportable) in the names.

HISTORY

glibc 2.1.

SEE ALSO

pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

298 - Linux cli command XML_DOM_PerlSAXpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_DOM_PerlSAXpm and provides detailed information about the command XML_DOM_PerlSAXpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_DOM_PerlSAXpm.

NAME 🖥️ XML_DOM_PerlSAXpm 🖥️

Old name of XML::Handler::BuildDOM

SYNOPSIS

See L<XML::DOM::BuildDOM>

DESCRIPTION

XML::DOM::PerlSAX was renamed to XML::Handler::BuildDOM to comply with naming conventions for PerlSAX filters/handlers.

For backward compatibility, this package will remain in existence (it simply includes XML::Handler::BuildDOM), but it will print a warning when running with ‘perl -w’.

AUTHOR

Enno Derksen is the original author.

Send bug reports, hints, tips, suggestions to T.J Mather at <[email protected]>.

SEE ALSO

XML::Handler::BuildDOM, XML::DOM

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

299 - Linux cli command PA_WCHARconst

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command PA_WCHARconst and provides detailed information about the command PA_WCHARconst, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the PA_WCHARconst.

NAME 🖥️ PA_WCHARconst 🖥️

define custom behavior for printf-like functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <printf.h>
int register_printf_specifier(int spec, printf_function func,
 printf_arginfo_size_function arginfo);
int register_printf_modifier(const wchar_t *str);
int register_printf_type(printf_va_arg_function fct);

Callbacks

typedef int printf_function(FILE *stream, const struct printf_info *info,
 const void *const args[]);
typedef int printf_arginfo_size_function(const struct printf_info *info,
 size_t n, int argtypes[n], int size[n]);
typedef void printf_va_arg_function(void *mem, va_list *ap);

Types

struct printf_info {
 int prec; // Precision
 int width; // Width
 wchar_t spec; // Format letter
 unsigned int is_long_double:1;// L or ll flag
 unsigned int is_short:1; // h flag
 unsigned int is_long:1; // l flag
 unsigned int alt:1; // # flag
 unsigned int space:1; // Space flag
 unsigned int left:1; // - flag
 unsigned int showsign:1; // + flag
 unsigned int group:1; // ' flag
 unsigned int extra:1; // For special use
 unsigned int is_char:1; // hh flag
 unsigned int wide:1; // True for wide character streams
 unsigned int i18n:1; // I flag
 unsigned int is_binary128:1; /* Floating-point argument is
  ABI-compatible with
  IEC 60559 binary128 */
 unsigned short user; // Bits for user-installed modifiers
 wchar_t pad; // Padding character
};

Constants

#define PA_FLAG_LONG_LONG /* ... */
#define PA_FLAG_LONG_DOUBLE /* ... */
#define PA_FLAG_LONG /* ... */
#define PA_FLAG_SHORT /* ... */
#define PA_FLAG_PTR /* ... */

DESCRIPTION

These functions serve to extend and/or modify the behavior of the printf(3) family of functions.

register_printf_specifier()

This function registers a custom conversion specifier for the printf(3) family of functions.

spec
The character which will be used as a conversion specifier in the format string.

func
Callback function that will be executed by the printf(3) family of functions to format the input arguments into the output stream.

stream
Output stream where the formatted output should be printed. This stream transparently represents the output, even in the case of functions that write to a string.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in arginfo.

args
Array of pointers to the arguments to the printf(3) -like function.

arginfo
Callback function that will be executed by the printf(3) family of functions to know how many arguments should be parsed for the custom specifier and also their types.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in func.

n
Number of arguments remaining to be parsed.

argtypes
This array should be set to define the type of each of the arguments that will be parsed. Each element in the array represents one of the arguments to be parsed, in the same order that they are passed to the printf(3) -like function. Each element should be set to a base type (PA_*) from the enum above, or a custom one, and optionally ORed with an appropriate length modifier (PA_FLAG_*).

The type is determined by using one of the following constants:

PA_INT
int.

PA_CHAR
int, cast to char.

PA_WCHAR
wchar_t.

PA_STRING
const char *, a ‘�’-terminated string.

PA_WSTRING
const wchar_t *, a wide character L’�’-terminated string.

PA_POINTER
void *.

PA_FLOAT
float.

PA_DOUBLE
double.

PA_LAST
TODO.

size
For user-defined types, the size of the type (in bytes) should also be specified through this array. Otherwise, leave it unused.

arginfo is called before func, and prepares some information needed to call func.

register_printf_modifier()

TODO

register_printf_type()

TODO

RETURN VALUE

register_printf_specifier(), register_printf_modifier(), and register_printf_type() return zero on success, or -1 on error.

Callbacks

The callback of type printf_function should return the number of characters written, or -1 on error.

The callback of type printf_arginfo_size_function should return the number of arguments to be parsed by this specifier. It also passes information about the type of those arguments to the caller through argtypes. On error, it should return -1.

ERRORS

EINVAL
The specifier was not a valid character.

STANDARDS

GNU.

HISTORY

register_printf_function(3) is an older function similar to register_printf_specifier(), and is now deprecated. That function can’t handle user-defined types.

register_printf_specifier() supersedes register_printf_function(3).

EXAMPLES

The following example program registers the ‘b’ and ‘B’ specifiers to print integers in binary format, mirroring rules for other unsigned conversion specifiers like ‘x’ and ‘u’. This can be used to print in binary prior to C23.

/* This code is in the public domain */
#include <err.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <printf.h>
#define GROUP_SEP  '\''
struct Printf_Pad {
    char    ch;
    size_t  len;
};
static int b_printf(FILE *stream, const struct printf_info *info,
                    const void *const args[]);
static int b_arginf_sz(const struct printf_info *info,
                    size_t n, int argtypes[n], int size[n]);
static uintmax_t b_value(const struct printf_info *info,
                    const void *arg);
static size_t b_bin_repr(char bin[UINTMAX_WIDTH],
                    const struct printf_info *info, const void *arg);
static size_t b_bin_len(const struct printf_info *info,
                    ptrdiff_t min_len);
static size_t b_pad_len(const struct printf_info *info,
                    ptrdiff_t bin_len);
static ssize_t b_print_prefix(FILE *stream,
                    const struct printf_info *info);
static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info,
                    ptrdiff_t min_len);
static ssize_t b_print_number(FILE *stream,
                    const struct printf_info *info,
                    const char bin[UINTMAX_WIDTH],
                    size_t min_len, size_t bin_len);
static char pad_ch(const struct printf_info *info);
static ssize_t pad_spaces(FILE *stream, size_t pad_len);
int
main(void)
{
    if (register_printf_specifier('b', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('b', ...)");
    if (register_printf_specifier('B', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('B', ...)");
    printf("....----....----....----....----

“); printf("%llb; “, 0x5Ellu); printf("%lB; “, 0x5Elu); printf("%b; “, 0x5Eu); printf("%hB; “, 0x5Eu); printf("%hhb; “, 0x5Eu); printf("%jb; “, (uintmax_t)0x5E); printf("%zb; “, (size_t)0x5E); printf(”….—-….—-….—-….—- “); printf(”%#b; “, 0x5Eu); printf(”%#B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf("%10b; “, 0x5Eu); printf("%010b; “, 0x5Eu); printf(”%.10b; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%-10B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%‘B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”….—-….—-….—-….—- “); printf(”%#16.12b; “, 0xAB); printf(”%-#‘20.12b; “, 0xAB); printf(”%#‘020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#020B; “, 0xAB); printf(”%‘020B; “, 0xAB); printf("%020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#021B; “, 0xAB); printf(”%‘021B; “, 0xAB); printf("%021B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#022B; “, 0xAB); printf(”%‘022B; “, 0xAB); printf("%022B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#023B; “, 0xAB); printf(”%‘023B; “, 0xAB); printf("%023B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%-#‘19.11b; “, 0xAB); printf(”%#‘019B; “, 0xAB); printf(”%#019B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%‘019B; “, 0xAB); printf("%019B; “, 0xAB); printf(”%#016b; “, 0xAB); printf(”….—-….—-….—-….—- “); return 0; } static int b_printf(FILE *stream, const struct printf_info *info, const void const args[]) { char bin[UINTMAX_WIDTH]; size_t min_len, bin_len; ssize_t len, tmp; struct Printf_Pad pad = {0}; len = 0; min_len = b_bin_repr(bin, info, args[0]); bin_len = b_bin_len(info, min_len); pad.ch = pad_ch(info); if (pad.ch == ’ ‘) pad.len = b_pad_len(info, bin_len); / Padding with ’ ’ (right aligned) / if ((pad.ch == ’ ‘) && !info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } / “0b”/“0B” prefix / if (info->alt) { tmp = b_print_prefix(stream, info); if (tmp == EOF) return EOF; len += tmp; } / Padding with ‘0’ / if (pad.ch == ‘0’) { tmp = b_pad_zeros(stream, info, min_len); if (tmp == EOF) return EOF; len += tmp; } / Print number (including leading 0s to fill precision) / tmp = b_print_number(stream, info, bin, min_len, bin_len); if (tmp == EOF) return EOF; len += tmp; / Padding with ’ ’ (left aligned) */ if (info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } return len; } static int b_arginf_sz(const struct printf_info *info, size_t n, int argtypes[n], [[maybe_unused]] int size[n]) { if (n < 1) return -1; if (info->is_long_double) argtypes[0] = PA_INT | PA_FLAG_LONG_LONG; else if (info->is_long) argtypes[0] = PA_INT | PA_FLAG_LONG; else argtypes[0] = PA_INT; return 1; } static uintmax_t b_value(const struct printf_info *info, const void *arg) { if (info->is_long_double) return *(const unsigned long long *)arg; if (info->is_long) return *(const unsigned long )arg; / short and char are both promoted to int */ return *(const unsigned int *)arg; } static size_t b_bin_repr(char bin[UINTMAX_WIDTH], const struct printf_info *info, const void *arg) { size_t min_len; uintmax_t val; val = b_value(info, arg); bin[0] = ‘0’; for (min_len = 0; val; min_len++) { bin[min_len] = ‘0’ + (val % 2); val »= 1; } return MAX(min_len, 1); } static size_t b_bin_len(const struct printf_info *info, ptrdiff_t min_len) { return MAX(info->prec, min_len); } static size_t b_pad_len(const struct printf_info *info, ptrdiff_t bin_len) { ptrdiff_t pad_len; pad_len = info->width - bin_len; if (info->alt) pad_len -= 2; if (info->group) pad_len -= (bin_len - 1) / 4; return MAX(pad_len, 0); } static ssize_t b_print_prefix(FILE *stream, const struct printf_info *info) { ssize_t len; len = 0; if (fputc(‘0’, stream) == EOF) return EOF; len++; if (fputc(info->spec, stream) == EOF) return EOF; len++; return len; } static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info, ptrdiff_t min_len) { ssize_t len; ptrdiff_t tmp; len = 0; tmp = info->width - (info->alt * 2); if (info->group) tmp -= tmp / 5 - !(tmp % 5); for (ptrdiff_t i = tmp - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static ssize_t b_print_number(FILE *stream, const struct printf_info info, const char bin[UINTMAX_WIDTH], size_t min_len, size_t bin_len) { ssize_t len; len = 0; / Print leading zeros to fill precision / for (size_t i = bin_len - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } / Print number */ for (size_t i = min_len - 1; i < min_len; i–) { if (fputc(bin[i], stream) == EOF) return EOF; len++; if (!info->group || (i % 4) || !i) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static char pad_ch(const struct printf_info *info) { if ((info->prec != -1) || (info->pad == ’ ‘) || info->left) return ’ ‘; return ‘0’; } static ssize_t pad_spaces(FILE *stream, size_t pad_len) { ssize_t len; len = 0; for (size_t i = pad_len - 1; i < pad_len; i–) { if (fputc(’ ‘, stream) == EOF) return EOF; len++; } return len; }

SEE ALSO

asprintf(3), printf(3), wprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

300 - Linux cli command xdr_bool

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_bool and provides detailed information about the command xdr_bool, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_bool.

NAME 🖥️ xdr_bool 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

301 - Linux cli command getdelim

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getdelim and provides detailed information about the command getdelim, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getdelim.

NAME 🖥️ getdelim 🖥️

delimited string input

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
ssize_t getline(char **restrict lineptr, size_t *restrict n,
 FILE *restrict stream);
ssize_t getdelim(char **restrict lineptr, size_t *restrict n,
 int delim, FILE *restrict stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getline(), getdelim():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

getline() reads an entire line from stream, storing the address of the buffer containing the text into *lineptr. The buffer is null-terminated and includes the newline character, if one was found.

If *lineptr is set to NULL before the call, then getline() will allocate a buffer for storing the line. This buffer should be freed by the user program even if getline() failed.

Alternatively, before calling getline(), *lineptr can contain a pointer to a malloc(3)-allocated buffer *n bytes in size. If the buffer is not large enough to hold the line, getline() resizes it with realloc(3), updating *lineptr and *n as necessary.

In either case, on a successful call, *lineptr and *n will be updated to reflect the buffer address and allocated size respectively.

getdelim() works like getline(), except that a line delimiter other than newline can be specified as the delimiter argument. As with getline(), a delimiter character is not added if one was not present in the input before end of file was reached.

RETURN VALUE

On success, getline() and getdelim() return the number of characters read, including the delimiter character, but not including the terminating null byte (‘�’). This value can be used to handle embedded null bytes in the line read.

Both functions return -1 on failure to read a line (including end-of-file condition). In the event of a failure, errno is set to indicate the error.

If *lineptr was set to NULL before the call, then the buffer should be freed by the user program even on failure.

ERRORS

EINVAL
Bad arguments (n or lineptr is NULL, or stream is not valid).

ENOMEM
Allocation or reallocation of the line buffer failed.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getline(), getdelim()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

GNU, POSIX.1-2008.

EXAMPLES

#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
    FILE *stream;
    char *line = NULL;
    size_t len = 0;
    ssize_t nread;
    if (argc != 2) {
        fprintf(stderr, "Usage: %s <file>

“, argv[0]); exit(EXIT_FAILURE); } stream = fopen(argv[1], “r”); if (stream == NULL) { perror(“fopen”); exit(EXIT_FAILURE); } while ((nread = getline(&line, &len, stream)) != -1) { printf(“Retrieved line of length %zd: “, nread); fwrite(line, nread, 1, stdout); } free(line); fclose(stream); exit(EXIT_SUCCESS); }

SEE ALSO

read(2), fgets(3), fopen(3), fread(3), scanf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

302 - Linux cli command rewinddir

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command rewinddir and provides detailed information about the command rewinddir, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the rewinddir.

NAME 🖥️ rewinddir 🖥️

reset directory stream

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <dirent.h>
void rewinddir(DIR *dirp);

DESCRIPTION

The rewinddir() function resets the position of the directory stream dirp to the beginning of the directory.

RETURN VALUE

The rewinddir() function returns no value.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

rewinddir()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4, 4.3BSD.

SEE ALSO

closedir(3), opendir(3), readdir(3), scandir(3), seekdir(3), telldir(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

303 - Linux cli command Xau

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Xau and provides detailed information about the command Xau, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Xau.

NAME 🖥️ Xau 🖥️

X authority database routines

SYNOPSIS

#include <X11/Xauth.h>

typedef struct xauth {
        unsigned short  family;
        unsigned short  address_length;
        char    *address;
        unsigned short  number_length;
        char    *number;
        unsigned short  name_length;
        char    *name;
        unsigned short  data_length;
        char    *data;
} Xauth;
char *XauFileName (void);
Xauth *XauReadAuth (FILE *auth_file );
int XauWriteAuth (FILE *auth_file, Xauth *auth );
Xauth *XauGetAuthByAddr (unsigned short family , unsigned short
address_length , const char *address , unsigned short
number_length , const char *number , unsigned short
name_length , const char *name );
Xauth *XauGetBestAuthByAddr (unsigned short family , unsigned short
address_length , const char *address , unsigned short
number_length , const char *number , int types_length ,
char **types , const int *type_lengths );
int XauLockAuth (const char *file_name , int retries , int
timeout , long dead );
int XauUnlockAuth (const char *file_name );
int XauDisposeAuth (Xauth *auth );

DESCRIPTION

XauFileName generates the default authorization file name by first checking the XAUTHORITY environment variable if set, else it returns $HOME/.Xauthority. This name is statically allocated and should not be freed.

XauReadAuth reads the next entry from auth_file. The entry is not statically allocated and should be freed by calling XauDisposeAuth.

XauWriteAuth writes an authorization entry to auth_file. It returns 1 on success, 0 on failure.

XauGetAuthByAddr searches for an entry which matches the given network address/display number pair. The entry is not statically allocated and should be freed by calling XauDisposeAuth.

XauGetBestAuthByAddr is similar to XauGetAuthByAddr, except that a list of acceptable authentication methods is specified. Xau will choose the file entry which matches the earliest entry in this list (e.g., the most secure authentication method). The types argument is an array of strings, one string for each authentication method. types_length specifies how many elements are in the types array. types_lengths is an array of integers representing the length of each string.

XauLockAuth does the work necessary to synchronously update an authorization file. First it makes two file names, one with ``-c’’ appended to file_name, the other with ``-l’’ appended. If the ``-c’’ file already exists and is more than dead seconds old, XauLockAuth removes it and the associated ``-l’’ file. To prevent possible synchronization troubles with NFS, a dead value of zero forces the files to be removed. XauLockAuth makes retries attempts to create and link the file names, pausing timeout seconds between each attempt. XauLockAuth returns a collection of values depending on the results:

LOCK_ERROR
A system error occurred, either a file_name which is too long, or an unexpected failure from a system call. errno may prove useful.

LOCK_TIMEOUT
retries attempts failed

LOCK_SUCCESS
The lock succeeded.

XauUnlockAuth undoes the work of XauLockAuth by unlinking both the ``-c’’ and ``-l’’ file names.

XauDisposeAuth frees storage allocated to hold an authorization entry.

SEE ALSO

xauth(1), xdm(1)

AUTHOR

Keith Packard, MIT X Consortium

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

304 - Linux cli command getgrent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getgrent and provides detailed information about the command getgrent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getgrent.

NAME 🖥️ getgrent 🖥️

get group file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <grp.h>
struct group *getgrent(void);
void setgrent(void);
void endgrent(void);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

setgrent():

    _XOPEN_SOURCE >= 500
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

getgrent(), endgrent():

    Since glibc 2.22:
        _XOPEN_SOURCE >= 500 || _DEFAULT_SOURCE
    glibc 2.21 and earlier
        _XOPEN_SOURCE >= 500
            || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L
            || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The getgrent() function returns a pointer to a structure containing the broken-out fields of a record in the group database (e.g., the local group file /etc/group, NIS, and LDAP). The first time getgrent() is called, it returns the first entry; thereafter, it returns successive entries.

The setgrent() function rewinds to the beginning of the group database, to allow repeated scans.

The endgrent() function is used to close the group database after all processing has been performed.

The group structure is defined in <grp.h> as follows:

struct group {
    char   *gr_name;        /* group name */
    char   *gr_passwd;      /* group password */
    gid_t   gr_gid;         /* group ID */
    char  **gr_mem;         /* NULL-terminated array of pointers
                               to names of group members */
};

For more information about the fields of this structure, see group(5).

RETURN VALUE

The getgrent() function returns a pointer to a group structure, or NULL if there are no more entries or an error occurs.

Upon error, errno may be set. If one wants to check errno after the call, it should be set to zero before the call.

The return value may point to a static area, and may be overwritten by subsequent calls to getgrent(), getgrgid(3), or getgrnam(3). (Do not pass the returned pointer to free(3).)

ERRORS

EAGAIN
The service was temporarily unavailable; try again later. For NSS backends in glibc this indicates a temporary error talking to the backend. The error may correct itself, retrying later is suggested.

EINTR
A signal was caught; see signal(7).

EIO
I/O error.

EMFILE
The per-process limit on the number of open file descriptors has been reached.

ENFILE
The system-wide limit on the total number of open files has been reached.

ENOENT
A necessary input file cannot be found. For NSS backends in glibc this indicates the backend is not correctly configured.

ENOMEM
Insufficient memory to allocate group structure.

ERANGE
Insufficient buffer space supplied.

FILES

/etc/group
local group database file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getgrent()

Thread safety

MT-Unsafe race:grent race:grentbuf locale

setgrent(), endgrent()

Thread safety

MT-Unsafe race:grent locale

In the above table, grent in race:grent signifies that if any of the functions setgrent(), getgrent(), or endgrent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4, 4.3BSD.

SEE ALSO

fgetgrent(3), getgrent_r(3), getgrgid(3), getgrnam(3), getgrouplist(3), putgrent(3), group(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

305 - Linux cli command Image_ExifTool_Otherpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Otherpm and provides detailed information about the command Image_ExifTool_Otherpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Otherpm.

NAME 🖥️ Image_ExifTool_Otherpm 🖥️

Read meta information from other uncommon formats

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to extract information from Portable FloatMap (PFM) images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

PFM <http://www.pauldebevec.com/Research/HDR/PFM/>

SEE ALSO

“Other Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

306 - Linux cli command PA_STRINGconst

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command PA_STRINGconst and provides detailed information about the command PA_STRINGconst, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the PA_STRINGconst.

NAME 🖥️ PA_STRINGconst 🖥️

define custom behavior for printf-like functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <printf.h>
int register_printf_specifier(int spec, printf_function func,
 printf_arginfo_size_function arginfo);
int register_printf_modifier(const wchar_t *str);
int register_printf_type(printf_va_arg_function fct);

Callbacks

typedef int printf_function(FILE *stream, const struct printf_info *info,
 const void *const args[]);
typedef int printf_arginfo_size_function(const struct printf_info *info,
 size_t n, int argtypes[n], int size[n]);
typedef void printf_va_arg_function(void *mem, va_list *ap);

Types

struct printf_info {
 int prec; // Precision
 int width; // Width
 wchar_t spec; // Format letter
 unsigned int is_long_double:1;// L or ll flag
 unsigned int is_short:1; // h flag
 unsigned int is_long:1; // l flag
 unsigned int alt:1; // # flag
 unsigned int space:1; // Space flag
 unsigned int left:1; // - flag
 unsigned int showsign:1; // + flag
 unsigned int group:1; // ' flag
 unsigned int extra:1; // For special use
 unsigned int is_char:1; // hh flag
 unsigned int wide:1; // True for wide character streams
 unsigned int i18n:1; // I flag
 unsigned int is_binary128:1; /* Floating-point argument is
  ABI-compatible with
  IEC 60559 binary128 */
 unsigned short user; // Bits for user-installed modifiers
 wchar_t pad; // Padding character
};

Constants

#define PA_FLAG_LONG_LONG /* ... */
#define PA_FLAG_LONG_DOUBLE /* ... */
#define PA_FLAG_LONG /* ... */
#define PA_FLAG_SHORT /* ... */
#define PA_FLAG_PTR /* ... */

DESCRIPTION

These functions serve to extend and/or modify the behavior of the printf(3) family of functions.

register_printf_specifier()

This function registers a custom conversion specifier for the printf(3) family of functions.

spec
The character which will be used as a conversion specifier in the format string.

func
Callback function that will be executed by the printf(3) family of functions to format the input arguments into the output stream.

stream
Output stream where the formatted output should be printed. This stream transparently represents the output, even in the case of functions that write to a string.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in arginfo.

args
Array of pointers to the arguments to the printf(3) -like function.

arginfo
Callback function that will be executed by the printf(3) family of functions to know how many arguments should be parsed for the custom specifier and also their types.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in func.

n
Number of arguments remaining to be parsed.

argtypes
This array should be set to define the type of each of the arguments that will be parsed. Each element in the array represents one of the arguments to be parsed, in the same order that they are passed to the printf(3) -like function. Each element should be set to a base type (PA_*) from the enum above, or a custom one, and optionally ORed with an appropriate length modifier (PA_FLAG_*).

The type is determined by using one of the following constants:

PA_INT
int.

PA_CHAR
int, cast to char.

PA_WCHAR
wchar_t.

PA_STRING
const char *, a ‘�’-terminated string.

PA_WSTRING
const wchar_t *, a wide character L’�’-terminated string.

PA_POINTER
void *.

PA_FLOAT
float.

PA_DOUBLE
double.

PA_LAST
TODO.

size
For user-defined types, the size of the type (in bytes) should also be specified through this array. Otherwise, leave it unused.

arginfo is called before func, and prepares some information needed to call func.

register_printf_modifier()

TODO

register_printf_type()

TODO

RETURN VALUE

register_printf_specifier(), register_printf_modifier(), and register_printf_type() return zero on success, or -1 on error.

Callbacks

The callback of type printf_function should return the number of characters written, or -1 on error.

The callback of type printf_arginfo_size_function should return the number of arguments to be parsed by this specifier. It also passes information about the type of those arguments to the caller through argtypes. On error, it should return -1.

ERRORS

EINVAL
The specifier was not a valid character.

STANDARDS

GNU.

HISTORY

register_printf_function(3) is an older function similar to register_printf_specifier(), and is now deprecated. That function can’t handle user-defined types.

register_printf_specifier() supersedes register_printf_function(3).

EXAMPLES

The following example program registers the ‘b’ and ‘B’ specifiers to print integers in binary format, mirroring rules for other unsigned conversion specifiers like ‘x’ and ‘u’. This can be used to print in binary prior to C23.

/* This code is in the public domain */
#include <err.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <printf.h>
#define GROUP_SEP  '\''
struct Printf_Pad {
    char    ch;
    size_t  len;
};
static int b_printf(FILE *stream, const struct printf_info *info,
                    const void *const args[]);
static int b_arginf_sz(const struct printf_info *info,
                    size_t n, int argtypes[n], int size[n]);
static uintmax_t b_value(const struct printf_info *info,
                    const void *arg);
static size_t b_bin_repr(char bin[UINTMAX_WIDTH],
                    const struct printf_info *info, const void *arg);
static size_t b_bin_len(const struct printf_info *info,
                    ptrdiff_t min_len);
static size_t b_pad_len(const struct printf_info *info,
                    ptrdiff_t bin_len);
static ssize_t b_print_prefix(FILE *stream,
                    const struct printf_info *info);
static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info,
                    ptrdiff_t min_len);
static ssize_t b_print_number(FILE *stream,
                    const struct printf_info *info,
                    const char bin[UINTMAX_WIDTH],
                    size_t min_len, size_t bin_len);
static char pad_ch(const struct printf_info *info);
static ssize_t pad_spaces(FILE *stream, size_t pad_len);
int
main(void)
{
    if (register_printf_specifier('b', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('b', ...)");
    if (register_printf_specifier('B', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('B', ...)");
    printf("....----....----....----....----

“); printf("%llb; “, 0x5Ellu); printf("%lB; “, 0x5Elu); printf("%b; “, 0x5Eu); printf("%hB; “, 0x5Eu); printf("%hhb; “, 0x5Eu); printf("%jb; “, (uintmax_t)0x5E); printf("%zb; “, (size_t)0x5E); printf(”….—-….—-….—-….—- “); printf(”%#b; “, 0x5Eu); printf(”%#B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf("%10b; “, 0x5Eu); printf("%010b; “, 0x5Eu); printf(”%.10b; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%-10B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%‘B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”….—-….—-….—-….—- “); printf(”%#16.12b; “, 0xAB); printf(”%-#‘20.12b; “, 0xAB); printf(”%#‘020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#020B; “, 0xAB); printf(”%‘020B; “, 0xAB); printf("%020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#021B; “, 0xAB); printf(”%‘021B; “, 0xAB); printf("%021B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#022B; “, 0xAB); printf(”%‘022B; “, 0xAB); printf("%022B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#023B; “, 0xAB); printf(”%‘023B; “, 0xAB); printf("%023B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%-#‘19.11b; “, 0xAB); printf(”%#‘019B; “, 0xAB); printf(”%#019B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%‘019B; “, 0xAB); printf("%019B; “, 0xAB); printf(”%#016b; “, 0xAB); printf(”….—-….—-….—-….—- “); return 0; } static int b_printf(FILE *stream, const struct printf_info *info, const void const args[]) { char bin[UINTMAX_WIDTH]; size_t min_len, bin_len; ssize_t len, tmp; struct Printf_Pad pad = {0}; len = 0; min_len = b_bin_repr(bin, info, args[0]); bin_len = b_bin_len(info, min_len); pad.ch = pad_ch(info); if (pad.ch == ’ ‘) pad.len = b_pad_len(info, bin_len); / Padding with ’ ’ (right aligned) / if ((pad.ch == ’ ‘) && !info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } / “0b”/“0B” prefix / if (info->alt) { tmp = b_print_prefix(stream, info); if (tmp == EOF) return EOF; len += tmp; } / Padding with ‘0’ / if (pad.ch == ‘0’) { tmp = b_pad_zeros(stream, info, min_len); if (tmp == EOF) return EOF; len += tmp; } / Print number (including leading 0s to fill precision) / tmp = b_print_number(stream, info, bin, min_len, bin_len); if (tmp == EOF) return EOF; len += tmp; / Padding with ’ ’ (left aligned) */ if (info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } return len; } static int b_arginf_sz(const struct printf_info *info, size_t n, int argtypes[n], [[maybe_unused]] int size[n]) { if (n < 1) return -1; if (info->is_long_double) argtypes[0] = PA_INT | PA_FLAG_LONG_LONG; else if (info->is_long) argtypes[0] = PA_INT | PA_FLAG_LONG; else argtypes[0] = PA_INT; return 1; } static uintmax_t b_value(const struct printf_info *info, const void *arg) { if (info->is_long_double) return *(const unsigned long long *)arg; if (info->is_long) return *(const unsigned long )arg; / short and char are both promoted to int */ return *(const unsigned int *)arg; } static size_t b_bin_repr(char bin[UINTMAX_WIDTH], const struct printf_info *info, const void *arg) { size_t min_len; uintmax_t val; val = b_value(info, arg); bin[0] = ‘0’; for (min_len = 0; val; min_len++) { bin[min_len] = ‘0’ + (val % 2); val »= 1; } return MAX(min_len, 1); } static size_t b_bin_len(const struct printf_info *info, ptrdiff_t min_len) { return MAX(info->prec, min_len); } static size_t b_pad_len(const struct printf_info *info, ptrdiff_t bin_len) { ptrdiff_t pad_len; pad_len = info->width - bin_len; if (info->alt) pad_len -= 2; if (info->group) pad_len -= (bin_len - 1) / 4; return MAX(pad_len, 0); } static ssize_t b_print_prefix(FILE *stream, const struct printf_info *info) { ssize_t len; len = 0; if (fputc(‘0’, stream) == EOF) return EOF; len++; if (fputc(info->spec, stream) == EOF) return EOF; len++; return len; } static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info, ptrdiff_t min_len) { ssize_t len; ptrdiff_t tmp; len = 0; tmp = info->width - (info->alt * 2); if (info->group) tmp -= tmp / 5 - !(tmp % 5); for (ptrdiff_t i = tmp - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static ssize_t b_print_number(FILE *stream, const struct printf_info info, const char bin[UINTMAX_WIDTH], size_t min_len, size_t bin_len) { ssize_t len; len = 0; / Print leading zeros to fill precision / for (size_t i = bin_len - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } / Print number */ for (size_t i = min_len - 1; i < min_len; i–) { if (fputc(bin[i], stream) == EOF) return EOF; len++; if (!info->group || (i % 4) || !i) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static char pad_ch(const struct printf_info *info) { if ((info->prec != -1) || (info->pad == ’ ‘) || info->left) return ’ ‘; return ‘0’; } static ssize_t pad_spaces(FILE *stream, size_t pad_len) { ssize_t len; len = 0; for (size_t i = pad_len - 1; i < pad_len; i–) { if (fputc(’ ‘, stream) == EOF) return EOF; len++; } return len; }

SEE ALSO

asprintf(3), printf(3), wprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

307 - Linux cli command XdbeAllocateBackBufferName

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XdbeAllocateBackBufferName and provides detailed information about the command XdbeAllocateBackBufferName, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XdbeAllocateBackBufferName.

NAME 🖥️ XdbeAllocateBackBufferName 🖥️

allocates a DBE buffer.

SYNOPSIS

#include <X11/extensions/Xdbe.h>

XdbeBackBuffer XdbeAllocateBackBufferName( Display *dpy, Window window, XdbeSwapAction swap_action)

DESCRIPTION

This function returns a drawable ID used to refer to the back buffer of the specified window. The swap_action is a hint to indicate the swap action that will likely be used in subsequent calls to XdbeSwapBuffers(). The actual swap action used in calls to XdbeSwapBuffers() does not have to be the same as the swap_action passed to this function, though clients are encouraged to provide accurate information whenever possible.

ERRORS

BadAlloc

BadIDChoice

BadMatch
The specified window is not an InputOutput window or its visual does not support DBE.

BadValue
An invalid swap action was specified.

BadWindow
An invalid window was specified.

SEE ALSO

DBE, XdbeBeginIdiom(), XdbeDeallocateBackBufferName(), XdbeEndIdiom(), XdbeFreeVisualInfo(), XdbeGetBackBufferAttributes(), XdbeGetVisualInfo(), XdbeQueryExtension(), XdbeSwapBuffers().

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

308 - Linux cli command XtRegisterExtensionSelector

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtRegisterExtensionSelector and provides detailed information about the command XtRegisterExtensionSelector, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtRegisterExtensionSelector.

NAME 🖥️ XtRegisterExtensionSelector 🖥️

extension event handling

SYNTAX

#include <X11/Intrinsic.h>

void XtInsertEventTypeHandler(Widget widget, int event_type, XtPointer select_data, XtEventHandler proc, XtPointer client_data, XtListPosition position);

void XtRemoveEventTypeHandler(Widget widget, int event_type, XtPointer select_data, XtEventHandler proc, XtPointer client_data);

void XtRegisterExtensionSelector(Display* display, int min_event_type, int max_event_type, XtExtensionSelectProc proc, XtPointer client_data);

XtEventDispatchProc XtSetEventDispatcher(Display* display, int event_type, XtEventDispatchProc proc);

Boolean XtDispatchEventToWidget(Widget widget, XEvent* event);

ARGUMENTS

widget
Specifies the widget for this event handler. Must be of class Core or any subclass thereof.

event_type
Specifies the event type.

select_data
Specifies data used to select or deselect events from the server.

proc
Specifies the proc.

client_data
Specifies additional data to be passed to the event handler.

position
Specifies when the event handler is to be called relative to other previously registered handlers.

display
Specifies the display.

min_event_type, max_event_type
Specifies the range of event types for this extension.

event
Specifies a pointer to the event to be dispatched.

DESCRIPTION

The XtInsertEventTypeHandler function registers a procedure with the dispatch mechanism that is to be called when an event that matches the specified event_type is dispatched to the specified widget.

If event_type is one of the core X protocol events then select_data must be a pointer to a value of type EventMask, indicating the event mask to be used to select for the desired event. This event mask will be included in the value returned by XtBuildEventMask. If the widget is realized XtInsertEventTypeHandler calls XSelectInput if necessary. Specifying NULL for select_data is equivalent to specifying a pointer to an event mask containing 0. This is similar to the XtInsertRawEventHandler function.

If event_type specifies an extension event type then the semantics of the data pointed to by select_data are defined by the extension selector registered for the specified event type.

In either case the Intrinsics are not required to copy the data pointed to by select_data, so the caller must ensure that it remains valid as long as the event handler remains registered with this value of select_data.

The position argument allows the client to control the order of the invocation of event handlers registered for the same event type. If the client does not care about the order, it should normally specify XtListTail, which registers this event handler after any previously registered handlers for this event type.

The XtRemoveEventTypeHandler function unregisters an even handler registered with XtInsertEventTypeHandler for the specified event type. The request is ignored if client_data does not match the value given with the handler was registered.

If event_type specifies on of the core X protocol events, select_data must be a pointer to a value of type EventMask, indicating the mask to be used to deselect for the appropriate event. If the widget is realized, XtRemoveEventTypeHandler calls XSelectInput if necessary. Specifying NULL for select_data is equivalent to specifying a pointer to an event mask containing 0. This is similar to the XtRemoveRawEventHandler function.

If event_type specifies an extension event type then the semantics of the data pointed to by select_data are defined by the extension selector registered for the specified event type.

The XtRegisterExtensionSelector function registers a procedure to arrange for the delivery of extension events to widgets.

If min_event_type and max_event_type match the parameters to a previous call to XtRegisterExtensionSelector for the same display, the proc and client_data replace the previously registered values. If the range specified by min_event_type and max_event_type overlaps the range of the parameters to a previous call for the same display in any other way, an error results.

The XtSetEventDispatcher function registers the event dispatcher procedure specified by proc for events with the type event_type. The previously registered dispatcher (or the default dispatcher if there was no previously registered dispatcher) is returned. If proc is NULL, the default procedure is restored for the specified type.

In the future, when XtDispatchEvent is called with an event of event_type, the specified proc (or the default dispatcher) will be invoked to determine a widget ot which to dispatch the event.

The XtDispatchEventToWidget function scans the list of registered event handlers for the specified widget and calls each handler that has been registered for the specified event type, subject to the continue_to_dispatch value returned by each handler. The Intrinsics behave as if event handlers were registered at the head of the list for Expose, NoExpose, GraphicsExpose, and VisibilityNotify events to invoke the widget’s expose procedure according to the exposure compression rules and to update the widget’s visible field if visible_interest is True. These internal event handlers never set continue_to_dispatch to False.

XtDispatchEventToWidget returns True if any event handler was called and False otherwise.

SEE ALSO

XtGetKeyboardFocusWidget(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

309 - Linux cli command tempnam

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tempnam and provides detailed information about the command tempnam, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tempnam.

NAME 🖥️ tempnam 🖥️

create a name for a temporary file

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
char *tempnam(const char *dir, const char *pfx);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

tempnam():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

Never use this function. Use mkstemp(3) or tmpfile(3) instead.

The tempnam() function returns a pointer to a string that is a valid filename, and such that a file with this name did not exist when tempnam() checked. The filename suffix of the pathname generated will start with pfx in case pfx is a non-NULL string of at most five bytes. The directory prefix part of the pathname generated is required to be “appropriate” (often that at least implies writable).

Attempts to find an appropriate directory go through the following steps:

a)
In case the environment variable TMPDIR exists and contains the name of an appropriate directory, that is used.

b)
Otherwise, if the dir argument is non-NULL and appropriate, it is used.

c)
Otherwise, P_tmpdir (as defined in <stdio.h>) is used when appropriate.

d)
Finally an implementation-defined directory may be used.

The string returned by tempnam() is allocated using malloc(3) and hence should be freed by free(3).

RETURN VALUE

On success, the tempnam() function returns a pointer to a unique temporary filename. It returns NULL if a unique name cannot be generated, with errno set to indicate the error.

ERRORS

ENOMEM
Allocation of storage failed.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tempnam()

Thread safetyMT-Safe env

STANDARDS

POSIX.1-2008.

HISTORY

SVr4, 4.3BSD, POSIX.1-2001. Obsoleted in POSIX.1-2008.

NOTES

Although tempnam() generates names that are difficult to guess, it is nevertheless possible that between the time that tempnam() returns a pathname, and the time that the program opens it, another program might create that pathname using open(2), or create it as a symbolic link. This can lead to security holes. To avoid such possibilities, use the open(2) O_EXCL flag to open the pathname. Or better yet, use mkstemp(3) or tmpfile(3).

SUSv2 does not mention the use of TMPDIR; glibc will use it only when the program is not set-user-ID. On SVr4, the directory used under d) is /tmp (and this is what glibc does).

Because it dynamically allocates memory used to return the pathname, tempnam() is reentrant, and thus thread safe, unlike tmpnam(3).

The tempnam() function generates a different string each time it is called, up to TMP_MAX (defined in <stdio.h>) times. If it is called more than TMP_MAX times, the behavior is implementation defined.

tempnam() uses at most the first five bytes from pfx.

The glibc implementation of tempnam() fails with the error EEXIST upon failure to find a unique name.

BUGS

The precise meaning of “appropriate” is undefined; it is unspecified how accessibility of a directory is determined.

SEE ALSO

mkstemp(3), mktemp(3), tmpfile(3), tmpnam(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

310 - Linux cli command XtProcessUnlock

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtProcessUnlock and provides detailed information about the command XtProcessUnlock, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtProcessUnlock.

NAME 🖥️ XtProcessUnlock 🖥️

lock and unlock process

SYNTAX

#include <X11/Intrinsic.h>

void XtProcessLock(void);

void XtProcessUnlock(void);

DESCRIPTION

XtProcessLock is used to lock all process global data.

XtProcessUnlock unlocks the process.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

311 - Linux cli command XtReleaseGC

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtReleaseGC and provides detailed information about the command XtReleaseGC, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtReleaseGC.

NAME 🖥️ XtReleaseGC 🖥️

obtain and destroy a sharable GC

SYNTAX

#include <X11/Intrinsic.h>

GC XtGetGC(Widget w, XtGCMask value_mask, XGCValues *values);

void XtReleaseGC(Widget w, GC gc);

ARGUMENTS

gc
Specifies the GC to be deallocated.

values
Specifies the actual values for this GC.

value_mask
Specifies which fields of the values are specified.

  1. Specifies the widget.

DESCRIPTION

The XtGetGC function returns a sharable, read-only GC. The parameters to this function are the same as those for XCreateGC except that a widget is passed instead of a display. XtGetGC shares only GCs in which all values in the GC returned by XCreateGC are the same. In particular, it does not use the value_mask provided to determine which fields of the GC a widget considers relevant. The value_mask is used only to tell the server which fields should be filled in with widget data and which it should fill in with default values. For further information about value_mask and values, see XCreateGC in the Xlib - C Language X Interface.

The XtReleaseGC function deallocate the specified shared GC.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

312 - Linux cli command fstatvfs

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fstatvfs and provides detailed information about the command fstatvfs, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fstatvfs.

NAME 🖥️ fstatvfs 🖥️

get filesystem statistics

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/statvfs.h>
int statvfs(const char *restrict path",structstatvfs*restrict"buf);
int fstatvfs(int fd, struct statvfs *buf);

DESCRIPTION

The function statvfs() returns information about a mounted filesystem. path is the pathname of any file within the mounted filesystem. buf is a pointer to a statvfs structure defined approximately as follows:

struct statvfs {
    unsigned long  f_bsize;    /* Filesystem block size */
    unsigned long  f_frsize;   /* Fragment size */
    fsblkcnt_t     f_blocks;   /* Size of fs in f_frsize units */
    fsblkcnt_t     f_bfree;    /* Number of free blocks */
    fsblkcnt_t     f_bavail;   /* Number of free blocks for
                                  unprivileged users */
    fsfilcnt_t     f_files;    /* Number of inodes */
    fsfilcnt_t     f_ffree;    /* Number of free inodes */
    fsfilcnt_t     f_favail;   /* Number of free inodes for
                                  unprivileged users */
    unsigned long  f_fsid;     /* Filesystem ID */
    unsigned long  f_flag;     /* Mount flags */
    unsigned long  f_namemax;  /* Maximum filename length */
};

Here the types fsblkcnt_t and fsfilcnt_t are defined in <sys/types.h>. Both used to be unsigned long.

The field f_flag is a bit mask indicating various options that were employed when mounting this filesystem. It contains zero or more of the following flags:

ST_MANDLOCK
Mandatory locking is permitted on the filesystem (see fcntl(2)).

ST_NOATIME
Do not update access times; see mount(2).

ST_NODEV
Disallow access to device special files on this filesystem.

ST_NODIRATIME
Do not update directory access times; see mount(2).

ST_NOEXEC
Execution of programs is disallowed on this filesystem.

ST_NOSUID
The set-user-ID and set-group-ID bits are ignored by exec(3) for executable files on this filesystem

ST_RDONLY
This filesystem is mounted read-only.

ST_RELATIME
Update atime relative to mtime/ctime; see mount(2).

ST_SYNCHRONOUS
Writes are synched to the filesystem immediately (see the description of O_SYNC in open(2)).

It is unspecified whether all members of the returned struct have meaningful values on all filesystems.

fstatvfs() returns the same information about an open file referenced by descriptor fd.

RETURN VALUE

On success, zero is returned. On error, -1 is returned, and errno is set to indicate the error.

ERRORS

EACCES
(statvfs()) Search permission is denied for a component of the path prefix of path. (See also path_resolution(7).)

EBADF
(fstatvfs()) fd is not a valid open file descriptor.

EFAULT
Buf or path points to an invalid address.

EINTR
This call was interrupted by a signal; see signal(7).

EIO
An I/O error occurred while reading from the filesystem.

ELOOP
(statvfs()) Too many symbolic links were encountered in translating path.

ENAMETOOLONG
(statvfs()) path is too long.

ENOENT
(statvfs()) The file referred to by path does not exist.

ENOMEM
Insufficient kernel memory was available.

ENOSYS
The filesystem does not support this call.

ENOTDIR
(statvfs()) A component of the path prefix of path is not a directory.

EOVERFLOW
Some values were too large to be represented in the returned struct.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

statvfs(), fstatvfs()

Thread safetyMT-Safe

VERSIONS

Only the ST_NOSUID and ST_RDONLY flags of the f_flag field are specified in POSIX.1. To obtain definitions of the remaining flags, one must define _GNU_SOURCE.

NOTES

The Linux kernel has system calls statfs(2) and fstatfs(2) to support this library call.

The glibc implementations of

pathconf(path, _PC_REC_XFER_ALIGN);
pathconf(path, _PC_ALLOC_SIZE_MIN);
pathconf(path, _PC_REC_MIN_XFER_SIZE);

respectively use the f_frsize, f_frsize, and f_bsize fields returned by a call to statvfs() with the argument path.

Under Linux, f_favail is always the same as f_ffree, and there’s no way for a filesystem to report otherwise. This is not an issue, since no filesystems with an inode root reservation exist.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

Before glibc 2.13, statvfs() populated the bits of the f_flag field by scanning the mount options shown in /proc/mounts. However, starting with Linux 2.6.36, the underlying statfs(2) system call provides the necessary information via the f_flags field, and since glibc 2.13, the statvfs() function will use information from that field rather than scanning /proc/mounts.

SEE ALSO

statfs(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

313 - Linux cli command Tk_getOpenFilepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_getOpenFilepm and provides detailed information about the command Tk_getOpenFilepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_getOpenFilepm.

NAME 🖥️ Tk_getOpenFilepm 🖥️

pop up a dialog box for the user to select a file to open.

SYNOPSIS

$widget->getOpenFile(?-option=>value, …>?)

$widget->getSaveFile(?-option=>value, …>?)

DESCRIPTION

The methods getOpenFile and getSaveFile pop up a dialog box for the user to select a file to open or save.

The getOpenFile method is usually associated with the Open command in the File menu. Its purpose is for the user to select an existing file only. If the user enters an non-existent file, the dialog box gives the user an error prompt and requires the user to give an alternative selection. If an application allows the user to create new files, it should do so by providing a separate New menu command.

The getSaveFile method is usually associated with the Save as command in the File menu. If the user enters a file that already exists, the dialog box prompts the user for confirmation whether the existing file should be overwritten or not.

If the user selects a file, both getOpenFile and getSaveFile return the full pathname of this file. If the user cancels the operation, both commands return an undefined value.

The following option-value pairs are possible as command line arguments to these two commands:

-defaultextension => extension
Specifies a string that will be appended to the filename if the user enters a filename without an extension. The default value is the empty string, which means no extension will be appended to the filename in any case. This option is ignored on the Macintosh platform, which does not require extensions to filenames, and the UNIX implementation guesses reasonable values for this from the -filetypes option when this is not supplied.

-filetypes => [filePattern ?, …?]
If a File types listbox exists in the file dialog on the particular platform, this option gives the filetypes in this listbox. When the user choose a filetype in the listbox, only the files of that type are listed. If this option is unspecified, or if it is set to the empty list, or if the File types listbox is not supported by the particular platform then all files are listed regardless of their types. See “SPECIFYING FILE PATTERNS” below for a discussion on the contents of filePatterns.

-initialdir => directory
Specifies that the files in directory should be displayed when the dialog pops up. If this parameter is not specified, then the files in the current working directory are displayed. This option may not always work on the Macintosh. This is not a bug. Rather, the General Controls control panel on the Mac allows the end user to override the application default directory.

-initialfile => filename
Specifies a filename to be displayed in the dialog when it pops up. This option is ignored by the getOpenFile method.

-multiple
Allows the user to choose multiple files from the Open dialog. On the Macintosh, this is only available when Navigation Services are installed.

-message => string
Specifies a message to include in the client area of the dialog. This is only available on the Macintosh, and only when Navigation Services are installed.

-title => titleString
Specifies a string to display as the title of the dialog box. If this option is not specified, then a default title is displayed. This option is ignored on the Macintosh platform.

SPECIFYING FILE PATTERNS

The filePatterns given by the -filetypes option are a list of file patterns. Each file pattern is a list of the form

typeName [extension ?extension …?] ?[macType ?macType …?]?

typeName is the name of the file type described by this file pattern and is the text string that appears in the File types listbox. extension is a file extension for this file pattern. macType is a four-character Macintosh file type. The list of macTypes is optional and may be omitted for applications that do not need to execute on the Macintosh platform.

Several file patterns may have the same typeName, in which case they refer to the same file type and share the same entry in the listbox. When the user selects an entry in the listbox, all the files that match at least one of the file patterns corresponding to that entry are listed. Usually, each file pattern corresponds to a distinct type of file. The use of more than one file patterns for one type of file is necessary on the Macintosh platform only.

On the Macintosh platform, a file matches a file pattern if its name matches at least one of the extension(s) AND it belongs to at least one of the macType(s) of the file pattern. For example, the C Source Files file pattern in the sample code matches with files that have a \c extension AND belong to the macType TEXT. To use the OR rule instead, you can use two file patterns, one with the extensions only and the other with the macType only. The GIF Files file type in the sample code matches files that EITHER have a \gif extension OR belong to the macType GIFF.

On the Unix and Windows platforms, a file matches a file pattern if its name matches at at least one of the extension(s) of the file pattern. The macTypes are ignored.

SPECIFYING EXTENSIONS

On the Unix and Macintosh platforms, extensions are matched using glob-style pattern matching. On the Windows platforms, extensions are matched by the underlying operating system. The types of possible extensions are: (1) the special extension * matches any file; (2) the special extension "" matches any files that do not have an extension (i.e., the filename contains no full stop character); (3) any character string that does not contain any wild card characters (* and ?).

Due to the different pattern matching rules on the various platforms, to ensure portability, wild card characters are not allowed in the extensions, except as in the special extension *. Extensions without a full stop character (e.g, ~) are allowed but may not work on all platforms.

CAVEATS

See “CAVEATS” in Tk::chooseDirectory.

EXAMPLE

my $types = [ [Text Files, [.txt, .text]], [TCL Scripts, .tcl ], [C Source Files, .c, TEXT], [GIF Files, .gif, ], [GIF Files, , GIFF], [All Files, *, ], ]; my $filename = $widget->getOpenFile(-filetypes=>$types); if ($filename ne “”) { # Open the file … }

SEE ALSO

Tk::FBox, Tk::FileSelect

KEYWORDS

file selection dialog

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

314 - Linux cli command uint32_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command uint32_ttype and provides detailed information about the command uint32_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the uint32_ttype.

NAME 🖥️ uint32_ttype 🖥️

fixed-width basic integer types

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <stdint.h>
typedef /* ... */ int8_t;
typedef /* ... */ int16_t;
typedef /* ... */ int32_t;
typedef /* ... */ int64_t;
typedef /* ... */ uint8_t;
typedef /* ... */ uint16_t;
typedef /* ... */ uint32_t;
typedef /* ... */ uint64_t;
#define INT8_WIDTH 8
#define INT16_WIDTH 16
#define INT32_WIDTH 32
#define INT64_WIDTH 64
#define UINT8_WIDTH 8
#define UINT16_WIDTH 16
#define UINT32_WIDTH 32
#define UINT64_WIDTH 64
#define INT8_MAX /* 2**(INT8_WIDTH - 1) - 1 */
#define INT16_MAX /* 2**(INT16_WIDTH - 1) - 1 */
#define INT32_MAX /* 2**(INT32_WIDTH - 1) - 1 */
#define INT64_MAX /* 2**(INT64_WIDTH - 1) - 1 */
#define INT8_MIN /* - 2**(INT8_WIDTH - 1) */
#define INT16_MIN /* - 2**(INT16_WIDTH - 1) */
#define INT32_MIN /* - 2**(INT32_WIDTH - 1) */
#define INT64_MIN /* - 2**(INT64_WIDTH - 1) */
#define UINT8_MAX /* 2**INT8_WIDTH - 1 */
#define UINT16_MAX /* 2**INT16_WIDTH - 1 */
#define UINT32_MAX /* 2**INT32_WIDTH - 1 */
#define UINT64_MAX /* 2**INT64_WIDTH - 1 */
#define INT8_C(c) c ## /* ... */
#define INT16_C(c) c ## /* ... */
#define INT32_C(c) c ## /* ... */
#define INT64_C(c) c ## /* ... */
#define UINT8_C(c) c ## /* ... */
#define UINT16_C(c) c ## /* ... */
#define UINT32_C(c) c ## /* ... */
#define UINT64_C(c) c ## /* ... */

DESCRIPTION

intN*_t* are signed integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are be capable of storing values in the range [INTN**_MIN**, INTN**_MAX**], substituting N by the appropriate number.

uintN*_t* are unsigned integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are capable of storing values in the range [0, UINTN**_MAX**], substituting N by the appropriate number.

According to POSIX, [u]int8_t, [u]int16_t, and [u]int32_t are required; [u]int64_t are only required in implementations that provide integer types with width 64; and all other types of this form are optional.

The macros [U]INTN**_WIDTH** expand to the width in bits of these types (N).

The macros [U]INTN**_MAX** expand to the maximum value that these types can hold.

The macros INTN**_MIN** expand to the minimum value that these types can hold.

The macros [U]INTN**_C**() expand their argument to an integer constant of type [u]intN*_t*.

The length modifiers for the [u]intN*_t* types for the printf(3) family of functions are expanded by macros of the forms PRIdN, PRIiN, PRIuN, and PRIxN (defined in <inttypes.h>); resulting for example in %“PRId64” or %“PRIi64” for printing int64_t values. The length modifiers for the [u]intN*_t* types for the scanf(3) family of functions are expanded by macros of the forms SCNdN, SCNiN, SCNuN, and SCNxN, (defined in <inttypes.h>); resulting for example in %“SCNu8” or %“SCNx8” for scanning uint8_t values.

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The [U]INTN**_WIDTH** macros were added in C23.

NOTES

The following header also provides these types: <inttypes.h>. <arpa/inet.h> also provides uint16_t and uint32_t.

SEE ALSO

intmax_t(3type), intptr_t(3type), printf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

315 - Linux cli command Net_DNS_RR_GPOSpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_GPOSpm and provides detailed information about the command Net_DNS_RR_GPOSpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_GPOSpm.

NAME 🖥️ Net_DNS_RR_GPOSpm 🖥️

DNS GPOS resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name GPOS latitude longitude altitude);

DESCRIPTION

Class for DNS Geographical Position (GPOS) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

latitude

$latitude = $rr->latitude; $rr->latitude( $latitude );

Floating-point representation of latitude, in degrees.

longitude

$longitude = $rr->longitude; $rr->longitude( $longitude );

Floating-point representation of longitude, in degrees.

altitude

$altitude = $rr->altitude; $rr->altitude( $altitude );

Floating-point representation of altitude, in metres.

COPYRIGHT

Copyright (c)1997,1998 Michael Fuhr.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC1712 <https://tools.ietf.org/html/rfc1712>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

316 - Linux cli command pthread_setschedparam

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_setschedparam and provides detailed information about the command pthread_setschedparam, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_setschedparam.

NAME 🖥️ pthread_setschedparam 🖥️

set/get scheduling policy and parameters of a thread

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_setschedparam(pthread_t thread, int policy,
 const struct sched_param *param);
int pthread_getschedparam(pthread_t thread, int *restrict policy,
 struct sched_param *restrict param);

DESCRIPTION

The pthread_setschedparam() function sets the scheduling policy and parameters of the thread thread.

policy specifies the new scheduling policy for thread. The supported values for policy, and their semantics, are described in sched(7).

The structure pointed to by param specifies the new scheduling parameters for thread. Scheduling parameters are maintained in the following structure:

struct sched_param {
    int sched_priority;     /* Scheduling priority */
};

As can be seen, only one scheduling parameter is supported. For details of the permitted ranges for scheduling priorities in each scheduling policy, see sched(7).

The pthread_getschedparam() function returns the scheduling policy and parameters of the thread thread, in the buffers pointed to by policy and param, respectively. The returned priority value is that set by the most recent pthread_setschedparam(), pthread_setschedprio(3), or pthread_create(3) call that affected thread. The returned priority does not reflect any temporary priority adjustments as a result of calls to any priority inheritance or priority ceiling functions (see, for example, pthread_mutexattr_setprioceiling(3) and pthread_mutexattr_setprotocol(3)).

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number. If pthread_setschedparam() fails, the scheduling policy and parameters of thread are not changed.

ERRORS

Both of these functions can fail with the following error:

ESRCH
No thread with the ID thread could be found.

pthread_setschedparam() may additionally fail with the following errors:

EINVAL
policy is not a recognized policy, or param does not make sense for the policy.

EPERM
The caller does not have appropriate privileges to set the specified scheduling policy and parameters.

POSIX.1 also documents an ENOTSUP (“attempt was made to set the policy or scheduling parameters to an unsupported value”) error for pthread_setschedparam().

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_setschedparam(), pthread_getschedparam()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.0 POSIX.1-2001.

NOTES

For a description of the permissions required to, and the effect of, changing a thread’s scheduling policy and priority, and details of the permitted ranges for priorities in each scheduling policy, see sched(7).

EXAMPLES

The program below demonstrates the use of pthread_setschedparam() and pthread_getschedparam(), as well as the use of a number of other scheduling-related pthreads functions.

In the following run, the main thread sets its scheduling policy to SCHED_FIFO with a priority of 10, and initializes a thread attributes object with a scheduling policy attribute of SCHED_RR and a scheduling priority attribute of 20. The program then sets (using pthread_attr_setinheritsched(3)) the inherit scheduler attribute of the thread attributes object to PTHREAD_EXPLICIT_SCHED, meaning that threads created using this attributes object should take their scheduling attributes from the thread attributes object. The program then creates a thread using the thread attributes object, and that thread displays its scheduling policy and priority.

$ su      # Need privilege to set real-time scheduling policies
Password:
# ./a.out -mf10 -ar20 -i e
Scheduler settings of main thread
    policy=SCHED_FIFO, priority=10
Scheduler settings in 'attr'
    policy=SCHED_RR, priority=20
    inheritsched is EXPLICIT
Scheduler attributes of new thread
    policy=SCHED_RR, priority=20

In the above output, one can see that the scheduling policy and priority were taken from the values specified in the thread attributes object.

The next run is the same as the previous, except that the inherit scheduler attribute is set to PTHREAD_INHERIT_SCHED, meaning that threads created using the thread attributes object should ignore the scheduling attributes specified in the attributes object and instead take their scheduling attributes from the creating thread.

# ./a.out -mf10 -ar20 -i i
Scheduler settings of main thread
    policy=SCHED_FIFO, priority=10
Scheduler settings in 'attr'
    policy=SCHED_RR, priority=20
    inheritsched is INHERIT
Scheduler attributes of new thread
    policy=SCHED_FIFO, priority=10

In the above output, one can see that the scheduling policy and priority were taken from the creating thread, rather than the thread attributes object.

Note that if we had omitted the -i i option, the output would have been the same, since PTHREAD_INHERIT_SCHED is the default for the inherit scheduler attribute.

Program source

/* pthreads_sched_test.c */
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define handle_error_en(en, msg) \
        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
[[noreturn]]
static void
usage(char *prog_name, char *msg)
{
    if (msg != NULL)
        fputs(msg, stderr);
    fprintf(stderr, "Usage: %s [options]

“, prog_name); fprintf(stderr, “Options are: “); #define fpe(msg) fprintf(stderr, " %s”, msg) /* Shorter */ fpe("-a Set scheduling policy and priority in “); fpe(” thread attributes object “); fpe(” can be “); fpe(” f SCHED_FIFO “); fpe(” r SCHED_RR “); fpe(” o SCHED_OTHER “); fpe("-A Use default thread attributes object “); fpe("-i {e|i} Set inherit scheduler attribute to “); fpe(” ’explicit’ or ‘inherit’ “); fpe("-m Set scheduling policy and priority on “); fpe(” main thread before pthread_create() call “); exit(EXIT_FAILURE); } static int get_policy(char p, int *policy) { switch (p) { case ‘f’: *policy = SCHED_FIFO; return 1; case ‘r’: *policy = SCHED_RR; return 1; case ‘o’: *policy = SCHED_OTHER; return 1; default: return 0; } } static void display_sched_attr(int policy, const struct sched_param *param) { printf(” policy=%s, priority=%d “, (policy == SCHED_FIFO) ? “SCHED_FIFO” : (policy == SCHED_RR) ? “SCHED_RR” : (policy == SCHED_OTHER) ? “SCHED_OTHER” : “???”, param->sched_priority); } static void display_thread_sched_attr(char *msg) { int policy, s; struct sched_param param; s = pthread_getschedparam(pthread_self(), &policy, &param); if (s != 0) handle_error_en(s, “pthread_getschedparam”); printf("%s “, msg); display_sched_attr(policy, &param); } static void * thread_start(void *arg) { display_thread_sched_attr(“Scheduler attributes of new thread”); return NULL; } int main(int argc, char *argv[]) { int s, opt, inheritsched, use_null_attrib, policy; pthread_t thread; pthread_attr_t attr; pthread_attr_t *attrp; char *attr_sched_str, *main_sched_str, inheritsched_str; struct sched_param param; / Process command-line options. / use_null_attrib = 0; attr_sched_str = NULL; main_sched_str = NULL; inheritsched_str = NULL; while ((opt = getopt(argc, argv, “a:Ai:m:”)) != -1) { switch (opt) { case ‘a’: attr_sched_str = optarg; break; case ‘A’: use_null_attrib = 1; break; case ‘i’: inheritsched_str = optarg; break; case ’m’: main_sched_str = optarg; break; default: usage(argv[0], “Unrecognized option “); } } if (use_null_attrib && (inheritsched_str != NULL || attr_sched_str != NULL)) { usage(argv[0], “Can’t specify -A with -i or -a “); } / Optionally set scheduling attributes of main thread, and display the attributes. / if (main_sched_str != NULL) { if (!get_policy(main_sched_str[0], &policy)) usage(argv[0], “Bad policy for main thread (-m) “); param.sched_priority = strtol(&main_sched_str[1], NULL, 0); s = pthread_setschedparam(pthread_self(), policy, &param); if (s != 0) handle_error_en(s, “pthread_setschedparam”); } display_thread_sched_attr(“Scheduler settings of main thread”); printf(” “); / Initialize thread attributes object according to options. / attrp = NULL; if (!use_null_attrib) { s = pthread_attr_init(&attr); if (s != 0) handle_error_en(s, “pthread_attr_init”); attrp = &attr; } if (inheritsched_str != NULL) { if (inheritsched_str[0] == ’e’) inheritsched = PTHREAD_EXPLICIT_SCHED; else if (inheritsched_str[0] == ‘i’) inheritsched = PTHREAD_INHERIT_SCHED; else usage(argv[0], “Value for -i must be ’e’ or ‘i’ “); s = pthread_attr_setinheritsched(&attr, inheritsched); if (s != 0) handle_error_en(s, “pthread_attr_setinheritsched”); } if (attr_sched_str != NULL) { if (!get_policy(attr_sched_str[0], &policy)) usage(argv[0], “Bad policy for ‘attr’ (-a) “); param.sched_priority = strtol(&attr_sched_str[1], NULL, 0); s = pthread_attr_setschedpolicy(&attr, policy); if (s != 0) handle_error_en(s, “pthread_attr_setschedpolicy”); s = pthread_attr_setschedparam(&attr, &param); if (s != 0) handle_error_en(s, “pthread_attr_setschedparam”); } / If we initialized a thread attributes object, display the scheduling attributes that were set in the object. / if (attrp != NULL) { s = pthread_attr_getschedparam(&attr, &param); if (s != 0) handle_error_en(s, “pthread_attr_getschedparam”); s = pthread_attr_getschedpolicy(&attr, &policy); if (s != 0) handle_error_en(s, “pthread_attr_getschedpolicy”); printf(“Scheduler settings in ‘attr’ “); display_sched_attr(policy, &param); pthread_attr_getinheritsched(&attr, &inheritsched); printf(” inheritsched is %s “, (inheritsched == PTHREAD_INHERIT_SCHED) ? “INHERIT” : (inheritsched == PTHREAD_EXPLICIT_SCHED) ? “EXPLICIT” : “???”); printf(” “); } / Create a thread that will display its scheduling attributes. / s = pthread_create(&thread, attrp, &thread_start, NULL); if (s != 0) handle_error_en(s, “pthread_create”); / Destroy unneeded thread attributes object. */ if (!use_null_attrib) { s = pthread_attr_destroy(&attr); if (s != 0) handle_error_en(s, “pthread_attr_destroy”); } s = pthread_join(thread, NULL); if (s != 0) handle_error_en(s, “pthread_join”); exit(EXIT_SUCCESS); }

SEE ALSO

getrlimit(2), sched_get_priority_min(2), pthread_attr_init(3), pthread_attr_setinheritsched(3), pthread_attr_setschedparam(3), pthread_attr_setschedpolicy(3), pthread_create(3), pthread_self(3), pthread_setschedprio(3), pthreads(7), sched(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

317 - Linux cli command LWP_Debugpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LWP_Debugpm and provides detailed information about the command LWP_Debugpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LWP_Debugpm.

NAME 🖥️ LWP_Debugpm 🖥️

deprecated

DESCRIPTION

This module has been deprecated. Please see LWP::ConsoleLogger for your debugging needs.

LWP::Debug is used to provide tracing facilities, but these are not used by LWP any more. The code in this module is kept around (undocumented) so that 3rd party code that happens to use the old interfaces continue to run.

One useful feature that LWP::Debug provided (in an imprecise and troublesome way) was network traffic monitoring. The following section provides some hints about recommended replacements.

Network traffic monitoring

The best way to monitor the network traffic that LWP generates is to use an external TCP monitoring program. The WireShark <http://www.wireshark.org/> program is highly recommended for this.

Another approach it to use a debugging HTTP proxy server and make LWP direct all its traffic via this one. Call $ua->proxy to set it up and then just use LWP as before.

For less precise monitoring needs just setting up a few simple handlers might do. The following example sets up handlers to dump the request and response objects that pass through LWP:

use LWP::UserAgent; $ua = LWP::UserAgent->new; $ua->default_header(Accept-Encoding => scalar HTTP::Message::decodable()); $ua->add_handler(“request_send”, sub { shift->dump; return }); $ua->add_handler(“response_done”, sub { shift->dump; return }); $ua->get(“http://www.example.com”);

SEE ALSO

LWP::ConsoleLogger, LWP::ConsoleLogger::Everywhere, LWP::UserAgent

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

318 - Linux cli command mq_notify

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mq_notify and provides detailed information about the command mq_notify, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mq_notify.

NAME 🖥️ mq_notify 🖥️

register for notification when a message is available

LIBRARY

Real-time library (librt, -lrt)

SYNOPSIS

#include <mqueue.h>
#include <signal.h> /* Definition of SIGEV_* constants */
int mq_notify(mqd_t mqdes, const struct sigevent *sevp);

DESCRIPTION

mq_notify() allows the calling process to register or unregister for delivery of an asynchronous notification when a new message arrives on the empty message queue referred to by the message queue descriptor mqdes.

The sevp argument is a pointer to a sigevent structure. For the definition and general details of this structure, see sigevent(3type).

If sevp is a non-null pointer, then mq_notify() registers the calling process to receive message notification. The sigev_notify field of the sigevent structure to which sevp points specifies how notification is to be performed. This field has one of the following values:

SIGEV_NONE
A “null” notification: the calling process is registered as the target for notification, but when a message arrives, no notification is sent.

SIGEV_SIGNAL
Notify the process by sending the signal specified in sigev_signo. See sigevent(3type) for general details. The si_code field of the siginfo_t structure will be set to SI_MESGQ. In addition, si_pid will be set to the PID of the process that sent the message, and si_uid will be set to the real user ID of the sending process.

SIGEV_THREAD
Upon message delivery, invoke sigev_notify_function as if it were the start function of a new thread. See sigevent(3type) for details.

Only one process can be registered to receive notification from a message queue.

If sevp is NULL, and the calling process is currently registered to receive notifications for this message queue, then the registration is removed; another process can then register to receive a message notification for this queue.

Message notification occurs only when a new message arrives and the queue was previously empty. If the queue was not empty at the time mq_notify() was called, then a notification will occur only after the queue is emptied and a new message arrives.

If another process or thread is waiting to read a message from an empty queue using mq_receive(3), then any message notification registration is ignored: the message is delivered to the process or thread calling mq_receive(3), and the message notification registration remains in effect.

Notification occurs once: after a notification is delivered, the notification registration is removed, and another process can register for message notification. If the notified process wishes to receive the next notification, it can use mq_notify() to request a further notification. This should be done before emptying all unread messages from the queue. (Placing the queue in nonblocking mode is useful for emptying the queue of messages without blocking once it is empty.)

RETURN VALUE

On success mq_notify() returns 0; on error, -1 is returned, with errno set to indicate the error.

ERRORS

EBADF
The message queue descriptor specified in mqdes is invalid.

EBUSY
Another process has already registered to receive notification for this message queue.

EINVAL
sevp->sigev_notify is not one of the permitted values; or sevp->sigev_notify is SIGEV_SIGNAL and sevp->sigev_signo is not a valid signal number.

ENOMEM
Insufficient memory.

POSIX.1-2008 says that an implementation may generate an EINVAL error if sevp is NULL, and the caller is not currently registered to receive notifications for the queue mqdes.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mq_notify()

Thread safetyMT-Safe

VERSIONS

C library/kernel differences

In the glibc implementation, the mq_notify() library function is implemented on top of the system call of the same name. When sevp is NULL, or specifies a notification mechanism other than SIGEV_THREAD, the library function directly invokes the system call. For SIGEV_THREAD, much of the implementation resides within the library, rather than the kernel. (This is necessarily so, since the thread involved in handling the notification is one that must be managed by the C library POSIX threads implementation.) The implementation involves the use of a raw netlink(7) socket and creates a new thread for each notification that is delivered to the process.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

EXAMPLES

The following program registers a notification request for the message queue named in its command-line argument. Notification is performed by creating a thread. The thread executes a function which reads one message from the queue and then terminates the process.

Program source

#include <mqueue.h>
#include <pthread.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define handle_error(msg) \
    do { perror(msg); exit(EXIT_FAILURE); } while (0)
static void                     /* Thread start function */
tfunc(union sigval sv)
{
    struct mq_attr attr;
    ssize_t nr;
    void *buf;
    mqd_t mqdes = *((mqd_t *) sv.sival_ptr);
    /* Determine max. msg size; allocate buffer to receive msg */
    if (mq_getattr(mqdes, &attr) == -1)
        handle_error("mq_getattr");
    buf = malloc(attr.mq_msgsize);
    if (buf == NULL)
        handle_error("malloc");
    nr = mq_receive(mqdes, buf, attr.mq_msgsize, NULL);
    if (nr == -1)
        handle_error("mq_receive");
    printf("Read %zd bytes from MQ

“, nr); free(buf); exit(EXIT_SUCCESS); /* Terminate the process */ } int main(int argc, char argv[]) { mqd_t mqdes; struct sigevent sev; if (argc != 2) { fprintf(stderr, “Usage: %s “, argv[0]); exit(EXIT_FAILURE); } mqdes = mq_open(argv[1], O_RDONLY); if (mqdes == (mqd_t) -1) handle_error(“mq_open”); sev.sigev_notify = SIGEV_THREAD; sev.sigev_notify_function = tfunc; sev.sigev_notify_attributes = NULL; sev.sigev_value.sival_ptr = &mqdes; / Arg. to thread func. / if (mq_notify(mqdes, &sev) == -1) handle_error(“mq_notify”); pause(); / Process will be terminated by thread function */ }

SEE ALSO

mq_close(3), mq_getattr(3), mq_open(3), mq_receive(3), mq_send(3), mq_unlink(3), mq_overview(7), sigevent(3type)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

319 - Linux cli command timespectype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command timespectype and provides detailed information about the command timespectype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the timespectype.

NAME 🖥️ timespectype 🖥️

time in seconds and nanoseconds

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <time.h>
struct timespec {
 time_t tv_sec; /* Seconds */
 /* ... */ tv_nsec;"/*Nanoseconds["0, 999'999'999] */
};

DESCRIPTION

Describes times in seconds and nanoseconds.

tv_nsec is of an implementation-defined signed type capable of holding the specified range. Under glibc, this is usually long, and long long on X32. It can be safely down-cast to any concrete 32-bit integer type for processing.

VERSIONS

Prior to C23, tv_nsec was long.

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

The following headers also provide this type: <aio.h>, <mqueue.h>, <sched.h>, <signal.h>, <sys/select.h>, and <sys/stat.h>.

SEE ALSO

clock_gettime(2), clock_nanosleep(2), nanosleep(2), timerfd_gettime(2), timer_gettime(2), time_t(3type), timeval(3type)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

320 - Linux cli command URI_ldappm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command URI_ldappm and provides detailed information about the command URI_ldappm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the URI_ldappm.

NAME 🖥️ URI_ldappm 🖥️

LDAP Uniform Resource Locators

SYNOPSIS

use URI; $uri = URI->new(“ldap:$uri_string”); $dn = $uri->dn; $filter = $uri->filter; @attr = $uri->attributes; $scope = $uri->scope; %extn = $uri->extensions; $uri = URI->new(“ldap:”); # start empty $uri->host(“ldap.itd.umich.edu”); $uri->dn(“o=University of Michigan,c=US”); $uri->attributes(qw(postalAddress)); $uri->scope(sub); $uri->filter((cn=Babs Jensen)); print $uri->as_string," “;

DESCRIPTION

URI::ldap provides an interface to parse an LDAP URI into its constituent parts and also to build a URI as described in RFC 2255.

METHODS

URI::ldap supports all the generic and server methods defined by URI, plus the following.

Each of the following methods can be used to set or get the value in the URI. The values are passed in unescaped form. None of these return undefined values, but elements without a default can be empty. If arguments are given, then a new value is set for the given part of the URI.

$uri->dn( [$new_dn] )
Sets or gets the Distinguished Name part of the URI. The DN identifies the base object of the LDAP search.

$uri->attributes( [@new_attrs] )
Sets or gets the list of attribute names which are returned by the search.

$uri->scope( [$new_scope] )
Sets or gets the scope to be used by the search. The value can be one of "base", "one" or "sub". If none is given in the URI then the return value defaults to "base".

$uri->_scope( [$new_scope] )
Same as scope(), but does not default to anything.

$uri->filter( [$new_filter] )
Sets or gets the filter to be used by the search. If none is given in the URI then the return value defaults to "(objectClass=*)".

$uri->_filter( [$new_filter] )
Same as filter(), but does not default to anything.

$uri->extensions( [$etype => $evalue,…] )
Sets or gets the extensions used for the search. The list passed should be in the form etype1 => evalue1, etype2 => evalue2,… This is also the form of list that is returned.

SEE ALSO

<http://tools.ietf.org/html/rfc2255>

AUTHOR

Graham Barr <[email protected]>

Slightly modified by Gisle Aas to fit into the URI distribution.

COPYRIGHT

Copyright (c) 1998 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

321 - Linux cli command mkostemp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mkostemp and provides detailed information about the command mkostemp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mkostemp.

NAME 🖥️ mkostemp 🖥️

create a unique temporary file

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int mkstemp(char *template);
int mkostemp(char *template, int flags);
int mkstemps(char *template, int suffixlen);
int mkostemps(char *template, int suffixlen, int flags);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

mkstemp():

    _XOPEN_SOURCE >= 500
        || /* glibc >= 2.12: */ _POSIX_C_SOURCE >= 200809L
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

mkostemp():

    _GNU_SOURCE

mkstemps():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

mkostemps():

    _GNU_SOURCE

DESCRIPTION

The mkstemp() function generates a unique temporary filename from template, creates and opens the file, and returns an open file descriptor for the file.

The last six characters of template must be “XXXXXX” and these are replaced with a string that makes the filename unique. Since it will be modified, template must not be a string constant, but should be declared as a character array.

The file is created with permissions 0600, that is, read plus write for owner only. The returned file descriptor provides both read and write access to the file. The file is opened with the open(2) O_EXCL flag, guaranteeing that the caller is the process that creates the file.

The mkostemp() function is like mkstemp(), with the difference that the following bits—with the same meaning as for open(2)—may be specified in flags: O_APPEND, O_CLOEXEC, and O_SYNC. Note that when creating the file, mkostemp() includes the values O_RDWR, O_CREAT, and O_EXCL in the flags argument given to open(2); including these values in the flags argument given to mkostemp() is unnecessary, and produces errors on some systems.

The mkstemps() function is like mkstemp(), except that the string in template contains a suffix of suffixlen characters. Thus, template is of the form prefixXXXXXXsuffix, and the string XXXXXX is modified as for mkstemp().

The mkostemps() function is to mkstemps() as mkostemp() is to mkstemp().

RETURN VALUE

On success, these functions return the file descriptor of the temporary file. On error, -1 is returned, and errno is set to indicate the error.

ERRORS

EEXIST
Could not create a unique temporary filename. Now the contents of template are undefined.

EINVAL
For mkstemp() and mkostemp(): The last six characters of template were not XXXXXX; now template is unchanged.

For mkstemps() and mkostemps(): template is less than (6 + suffixlen) characters long, or the last 6 characters before the suffix in template were not XXXXXX.

These functions may also fail with any of the errors described for open(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mkstemp(), mkostemp(), mkstemps(), mkostemps()

Thread safetyMT-Safe

STANDARDS

mkstemp()
POSIX.1-2001.

mkstemps()
BSD.

mkostemp()
mkostemps()
GNU.

HISTORY

mkstemp()
4.3BSD, POSIX.1-2001.

mkstemps()
glibc 2.11. BSD, Mac OS X, Solaris, Tru64.

mkostemp()
glibc 2.7.

mkostemps()
glibc 2.11.

In glibc versions 2.06 and earlier, the file is created with permissions 0666, that is, read and write for all users. This old behavior may be a security risk, especially since other UNIX flavors use 0600, and somebody might overlook this detail when porting programs. POSIX.1-2008 adds a requirement that the file be created with mode 0600.

More generally, the POSIX specification of mkstemp() does not say anything about file modes, so the application should make sure its file mode creation mask (see umask(2)) is set appropriately before calling mkstemp() (and mkostemp()).

SEE ALSO

mkdtemp(3), mktemp(3), tempnam(3), tmpfile(3), tmpnam(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

322 - Linux cli command Regexp_Common_CCpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_CCpm and provides detailed information about the command Regexp_Common_CCpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_CCpm.

NAME 🖥️ Regexp_Common_CCpm 🖥️

  • provide patterns for credit card numbers.

SYNOPSIS

use Regexp::Common qw /CC/; while (<>) { /^$RE{CC}{Mastercard}$/ and print “Mastercard card number “; }

DESCRIPTION

Please consult the manual of Regexp::Common for a general description of the works of this interface.

Do not use this module directly, but load it via Regexp::Common.

This module offers patterns for credit card numbers of several major credit card types. Currently, the supported cards are: Mastercard, Amex, Diners Club, and Discover.

SEE ALSO

Regexp::Common for a general description of how to use this interface.

<http://www.freedom.nlachnet.com/~hstiles/cardtype.html>
Credit Card Validation - Check Digits

<http://euro.ecom.cmu.edu/resources/elibrary/everycc.htm>
Everything you ever wanted to know about CC’s

<http://www.webopedia.com/TERM/L/Luhn_formula.html>
Luhn formula

AUTHORS

Damian Conway ([email protected]) and Abigail ([email protected]).

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty. Send them in to [email protected].

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

323 - Linux cli command getdirentries

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getdirentries and provides detailed information about the command getdirentries, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getdirentries.

NAME 🖥️ getdirentries 🖥️

get directory entries in a filesystem-independent format

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <dirent.h>
ssize_t getdirentries(int fd, char buf[restrict .nbytes], size_t nbytes,
 off_t *restrict basep);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getdirentries():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

Read directory entries from the directory specified by fd into buf. At most nbytes are read. Reading starts at offset *basep, and *basep is updated with the new position after reading.

RETURN VALUE

getdirentries() returns the number of bytes read or zero when at the end of the directory. If an error occurs, -1 is returned, and errno is set to indicate the error.

ERRORS

See the Linux library source code for details.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getdirentries()

Thread safetyMT-Safe

STANDARDS

BSD.

NOTES

Use opendir(3) and readdir(3) instead.

SEE ALSO

lseek(2), open(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

324 - Linux cli command pcap_compilepcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_compilepcap and provides detailed information about the command pcap_compilepcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_compilepcap.

NAME 🖥️ pcap_compilepcap 🖥️

compile a filter expression

SYNOPSIS

#include <pcap/pcap.h>
int pcap_compile(pcap_t *p, struct bpf_program *fp,
const char *str, int optimize, bpf_u_int32 netmask);

DESCRIPTION

pcap_compile() is used to compile the string str into a filter program. See pcap-filter(7) for the syntax of that string. fp is a pointer to a bpf_program struct and is filled in by pcap_compile(). optimize controls whether optimization on the resulting code is performed. netmask specifies the IPv4 netmask of the network on which packets are being captured; it is used only when checking for IPv4 broadcast addresses in the filter program. If the netmask of the network on which packets are being captured isn’t known to the program, or if packets are being captured on the Linux “any” pseudo-interface that can capture on more than one network, a value of PCAP_NETMASK_UNKNOWN can be supplied; tests for IPv4 broadcast addresses will fail to compile, but all other tests in the filter program will be OK.

NOTE: in libpcap 1.8.0 and later, pcap_compile() can be used in multiple threads within a single process. However, in earlier versions of libpcap, it is not safe to use pcap_compile() in multiple threads in a single process without some form of mutual exclusion allowing only one thread to call it at any given time.

RETURN VALUE

pcap_compile() returns 0 on success and PCAP_ERROR on failure. If PCAP_ERROR is returned, pcap_geterr(3PCAP) or pcap_perror(3PCAP) may be called with p as an argument to fetch or display the error text.

BACKWARD COMPATIBILITY

The PCAP_NETMASK_UNKNOWN constant became available in libpcap release 1.1.0.

SEE ALSO

pcap(3PCAP), pcap_setfilter(3PCAP), pcap_freecode(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

325 - Linux cli command Net_DNS_Domainpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_Domainpm and provides detailed information about the command Net_DNS_Domainpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_Domainpm.

NAME 🖥️ Net_DNS_Domainpm 🖥️

DNS domains

SYNOPSIS

use Net::DNS::Domain; $domain = Net::DNS::Domain->new(example.com); $name = $domain->name;

DESCRIPTION

The Net::DNS::Domain module implements a class of abstract DNS domain objects with associated class and instance methods.

Each domain object instance represents a single DNS domain which has a fixed identity throughout its lifetime.

Internally, the primary representation is a (possibly empty) list of ASCII domain name labels, and optional link to an origin domain object topologically closer to the DNS root.

The computational expense of Unicode character-set conversion is partially mitigated by use of caches.

METHODS

new

$object = Net::DNS::Domain->new(example.com);

Creates a domain object which represents the DNS domain specified by the character string argument. The argument consists of a sequence of labels delimited by dots.

A character preceded by \ represents itself, without any special interpretation.

Arbitrary 8-bit codes can be represented by \ followed by exactly three decimal digits. Character code points are ASCII, irrespective of the character coding scheme employed by the underlying platform.

Argument string literals should be delimited by single quotes to avoid escape sequences being interpreted as octal character codes by the Perl compiler.

The character string presentation format follows the conventions for zone files described in RFC1035.

Users should be aware that non-ASCII domain names will be transcoded to NFC before encoding, which is an irreversible process.

name

$name = $domain->name;

Returns the domain name as a character string corresponding to the “common interpretation” to which RFC1034, 3.1, paragraph 9 alludes.

Character escape sequences are used to represent a dot inside a domain name label and the escape character itself.

Any non-printable code point is represented using the appropriate numerical escape sequence.

fqdn

$fqdn = $domain->fqdn;

Returns a character string containing the fully qualified domain name, including the trailing dot.

xname

$xname = $domain->xname;

Interprets an extended name containing Unicode domain name labels encoded as Punycode A-labels.

If decoding is not possible, the ACE encoded name is returned.

label

@label = $domain->label;

Identifies the domain by means of a list of domain labels.

string

$string = $object->string;

Returns a character string containing the fully qualified domain name as it appears in a zone file.

Characters which are recognised by RFC1035 zone file syntax are represented by the appropriate escape sequence.

origin

$create = Net::DNS::Domain->origin( $ORIGIN ); $result = &$create( sub{ Net::DNS::RR->new( mx MX 10 a ); } ); $expect = Net::DNS::RR->new( “mx.$ORIGIN. MX 10 a.$ORIGIN.” );

Class method which returns a reference to a subroutine wrapper which executes a given constructor in a dynamically scoped context where relative names become descendents of the specified $ORIGIN.

BUGS

Coding strategy is intended to avoid creating unnecessary argument lists and stack frames. This improves efficiency at the expense of code readability.

Platform specific character coding features are conditionally compiled into the code.

COPYRIGHT

Copyright (c)2009-2011,2017 Dick Franks.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::LibIDN2 RFC1034 <https://tools.ietf.org/html/rfc1034> RFC1035 <https://tools.ietf.org/html/rfc1035> RFC5891 <https://tools.ietf.org/html/rfc5891>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

326 - Linux cli command htole16

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command htole16 and provides detailed information about the command htole16, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the htole16.

NAME 🖥️ htole16 🖥️

convert values between host and big-/little-endian byte order

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <endian.h>
uint16_t htobe16(uint16_t host_16bits);
uint16_t htole16(uint16_t host_16bits);
uint16_t be16toh(uint16_t big_endian_16bits);
uint16_t le16toh(uint16_t little_endian_16bits);
uint32_t htobe32(uint32_t host_32bits);
uint32_t htole32(uint32_t host_32bits);
uint32_t be32toh(uint32_t big_endian_32bits);
uint32_t le32toh(uint32_t little_endian_32bits);
uint64_t htobe64(uint64_t host_64bits);
uint64_t htole64(uint64_t host_64bits);
uint64_t be64toh(uint64_t big_endian_64bits);
uint64_t le64toh(uint64_t little_endian_64bits);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

htobe16(), htole16(), be16toh(), le16toh(), htobe32(), htole32(), be32toh(), le32toh(), htobe64(), htole64(), be64toh(), le64toh():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    In glibc up to and including 2.19:
        _BSD_SOURCE

DESCRIPTION

These functions convert the byte encoding of integer values from the byte order that the current CPU (the “host”) uses, to and from little-endian and big-endian byte order.

The number, nn, in the name of each function indicates the size of integer handled by the function, either 16, 32, or 64 bits.

The functions with names of the form “htobenn” convert from host byte order to big-endian order.

The functions with names of the form “htolenn” convert from host byte order to little-endian order.

The functions with names of the form “benntoh” convert from big-endian order to host byte order.

The functions with names of the form “lenntoh” convert from little-endian order to host byte order.

VERSIONS

Similar functions are present on the BSDs, where the required header file is <sys/endian.h> instead of <endian.h>. Unfortunately, NetBSD, FreeBSD, and glibc haven’t followed the original OpenBSD naming convention for these functions, whereby the nn component always appears at the end of the function name (thus, for example, in NetBSD, FreeBSD, and glibc, the equivalent of OpenBSDs “betoh32” is “be32toh”).

STANDARDS

None.

HISTORY

glibc 2.9.

These functions are similar to the older byteorder(3) family of functions. For example, be32toh() is identical to ntohl().

The advantage of the byteorder(3) functions is that they are standard functions available on all UNIX systems. On the other hand, the fact that they were designed for use in the context of TCP/IP means that they lack the 64-bit and little-endian variants described in this page.

EXAMPLES

The program below display the results of converting an integer from host byte order to both little-endian and big-endian byte order. Since host byte order is either little-endian or big-endian, only one of these conversions will have an effect. When we run this program on a little-endian system such as x86-32, we see the following:

$ ./a.out
x.u32 = 0x44332211
htole32(x.u32) = 0x44332211
htobe32(x.u32) = 0x11223344

Program source

#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    union {
        uint32_t u32;
        uint8_t arr[4];
    } x;
    x.arr[0] = 0x11;	/* Lowest-address byte */
    x.arr[1] = 0x22;
    x.arr[2] = 0x33;
    x.arr[3] = 0x44;	/* Highest-address byte */
    printf("x.u32 = %#x

“, x.u32); printf(“htole32(x.u32) = %#x “, htole32(x.u32)); printf(“htobe32(x.u32) = %#x “, htobe32(x.u32)); exit(EXIT_SUCCESS); }

SEE ALSO

bswap(3), byteorder(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

327 - Linux cli command pthread_attr_setstackaddr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_attr_setstackaddr and provides detailed information about the command pthread_attr_setstackaddr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_attr_setstackaddr.

NAME 🖥️ pthread_attr_setstackaddr 🖥️

set/get stack address attribute in thread attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
[[deprecated]]
int pthread_attr_setstackaddr(pthread_attr_t *attr",void*"stackaddr);
[[deprecated]]
int pthread_attr_getstackaddr(const pthread_attr_t *restrict attr,
 void **restrict stackaddr);

DESCRIPTION

These functions are obsolete: do not use them. Use pthread_attr_setstack(3) and pthread_attr_getstack(3) instead.

The pthread_attr_setstackaddr() function sets the stack address attribute of the thread attributes object referred to by attr to the value specified in stackaddr. This attribute specifies the location of the stack that should be used by a thread that is created using the thread attributes object attr.

stackaddr should point to a buffer of at least PTHREAD_STACK_MIN bytes that was allocated by the caller. The pages of the allocated buffer should be both readable and writable.

The pthread_attr_getstackaddr() function returns the stack address attribute of the thread attributes object referred to by attr in the buffer pointed to by stackaddr.

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

No errors are defined (but applications should nevertheless handle a possible error return).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_attr_setstackaddr(), pthread_attr_getstackaddr()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

glibc 2.1. Marked obsolete in POSIX.1-2001. Removed in POSIX.1-2008.

NOTES

Do not use these functions! They cannot be portably used, since they provide no way of specifying the direction of growth or the range of the stack. For example, on architectures with a stack that grows downward, stackaddr specifies the next address past the highest address of the allocated stack area. However, on architectures with a stack that grows upward, stackaddr specifies the lowest address in the allocated stack area. By contrast, the stackaddr used by pthread_attr_setstack(3) and pthread_attr_getstack(3), is always a pointer to the lowest address in the allocated stack area (and the stacksize argument specifies the range of the stack).

SEE ALSO

pthread_attr_init(3), pthread_attr_setstack(3), pthread_attr_setstacksize(3), pthread_create(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

328 - Linux cli command Tk_gridpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_gridpm and provides detailed information about the command Tk_gridpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_gridpm.

NAME 🖥️ Tk_gridpm 🖥️

Geometry manager that arranges widgets in a grid

SYNOPSIS

$widget->grid?(?widget …,? ?arg ?…>?)?

$widget->gridOption?(arg ?,arg …?)?

DESCRIPTION

The grid method is used to communicate with the grid geometry manager that arranges widgets in rows and columns inside of another window, called the geometry master (or master window). The grid method can have any of several forms, depending on the option argument:

$slave->grid(?$slave, …??, options?)
The arguments consist of the optional references to more slave windows followed by pairs of arguments that specify how to manage the slaves. The characters -, x and ^, can be specified instead of a window reference to alter the default location of a $slave, as described in “RELATIVE PLACEMENT”, below. If any of the slaves are already managed by the geometry manager then any unspecified options for them retain their previous values rather than receiving default values. The following options are supported:

-column => n
Insert the $slave so that it occupies the nth column in the grid. Column numbers start with 0. If this option is not supplied, then the $slave is arranged just to the right of previous slave specified on this call to grid, or column “0” if it is the first slave. For each x that immediately precedes the $slave, the column position is incremented by one. Thus the x represents a blank column for this row in the grid.

-columnspan => n
Insert the slave so that it occupies n columns in the grid. The default is one column, unless the window name is followed by a -, in which case the columnspan is incremented once for each immediately following -.

-in => $other
Insert the slave(s) in the master window given by $other. The default is the first slave’s parent window.

-ipadx => amount
The amount specifies how much horizontal internal padding to leave on each side of the slave(s). This is space is added inside the slave(s) border. The amount must be a valid screen distance, such as 2 or ’.5c’. It defaults to 0.

-ipady => amount
The amount specifies how much vertical internal padding to leave on on the top and bottom of the slave(s). This space is added inside the slave(s) border. The amount defaults to 0.

-padx => amount
The amount specifies how much horizontal external padding to leave on each side of the slave(s), in screen units. The amount defaults to 0. This space is added outside the slave(s) border.

-pady => amount
The amount specifies how much vertical external padding to leave on the top and bottom of the slave(s), in screen units. The amount defaults to 0. This space is added outside the slave(s) border.

-row => n
Insert the slave so that it occupies the nth row in the grid. Row numbers start with 0. If this option is not supplied, then the slave is arranged on the same row as the previous slave specified on this call to grid, or the first unoccupied row if this is the first slave.

-rowspan => n
Insert the slave so that it occupies n rows in the grid. The default is one row. If the next grid method contains ^ characters instead of *$slave*s that line up with the columns of this $slave, then the rowspan of this $slave is extended by one.

-sticky => style
If a slave’s cell is larger than its requested dimensions, this option may be used to position (or stretch) the slave within its cell. Style is a string that contains zero or more of the characters n, s, e or w. The string can optionally contain spaces or commas, but they are ignored. Each letter refers to a side (north, south, east, or west) that the slave will “stick” to. If both n and s (or e and w) are specified, the slave will be stretched to fill the entire height (or width) of its cavity. The sticky option subsumes the combination of -anchor and -fill that is used by pack. The default is ’’, which causes the slave to be centered in its cavity, at its requested size.

$master->gridBbox(?column, row,? ?column2, row2?)
With no arguments, the bounding box (in pixels) of the grid is returned. The return value consists of 4 integers. The first two are the pixel offset from the master window (x then y) of the top-left corner of the grid, and the second two integers are the width and height of the grid, also in pixels. If a single column and row is specified on the command line, then the bounding box for that cell is returned, where the top left cell is numbered from zero. If both column and row arguments are specified, then the bounding box spanning the rows and columns indicated is returned.

$master->gridColumnconfigure(index?, -option=>value, …?)
Query or set the column properties of the index column of the geometry master, $master. The valid options are -minsize, -weight and -pad. If one or more options are provided, then index may be given as a list of column indices to which the configuration options will operate on. The -minsize option sets the minimum size, in screen units, that will be permitted for this column. The -weight option (an integer value) sets the relative weight for apportioning any extra spaces among columns. A weight of zero (0) indicates the column will not deviate from its requested size. A column whose weight is two will grow at twice the rate as a column of weight one when extra space is allocated to the layout. The -uniform option, when a non-empty value is supplied, places the column in a uniform group with other columns that have the same value for -uniform. The space for columns belonging to a uniform group is allocated so that their sizes are always in strict proportion to their -weight values. See THE GRID ALGORITHM below for further details. The -pad option specifies the number of screen units that will be added to the largest window contained completely in that column when the grid geometry manager requests a size from the containing window. If only an option is specified, with no value, the current value of that option is returned. If only the master window and index is specified, all the current settings are returned in an list of “-option value” pairs.

$slave->gridConfigure(?$slave, …?, options?)
The same as grid method.

$slave->gridForget?($slave, …)?
Removes each of the *$slave*s from grid for its master and unmaps their windows. The slaves will no longer be managed by the grid geometry manager. The configuration options for that window are forgotten, so that if the slave is managed once more by the grid geometry manager, the initial default settings are used.

$slave->gridInfo
Returns a list whose elements are the current configuration state of the slave given by $slave in the same option-value form that might be specified to gridConfigure. The first two elements of the list are ``-in=>$master’’ where $master is the slave’s master.

$master->gridLocation(x, y)
Given x and y values in screen units relative to the master window, the column and row number at that x and y location is returned. For locations that are above or to the left of the grid, -1 is returned.

$master->gridPropagate?(boolean)?
If boolean has a true boolean value such as 1 or on then propagation is enabled for $master, which must be a window name (see “GEOMETRY PROPAGATION” below). If boolean has a false boolean value then propagation is disabled for $master. In either of these cases an empty string is returned. If boolean is omitted then the method returns 0 or 1 to indicate whether propagation is currently enabled for $master. Propagation is enabled by default.

$master->gridRowconfigure(index?, -option=>value, …?)
Query or set the row properties of the index row of the geometry master, $master. The valid options are -minsize, -weight and -pad. If one or more options are provided, then index may be given as a list of row indeces to which the configuration options will operate on. The -minsize option sets the minimum size, in screen units, that will be permitted for this row. The -weight option (an integer value) sets the relative weight for apportioning any extra spaces among rows. A weight of zero (0) indicates the row will not deviate from its requested size. A row whose weight is two will grow at twice the rate as a row of weight one when extra space is allocated to the layout. The -uniform option, when a non-empty value is supplied, places the row in a uniform group with other rows that have the same value for -uniform. The space for rows belonging to a uniform group is allocated so that their sizes are always in strict proportion to their -weight values. See THE GRID ALGORITHM below for further details. The -pad option specifies the number of screen units that will be added to the largest window contained completely in that row when the grid geometry manager requests a size from the containing window. If only an option is specified, with no value, the current value of that option is returned. If only the master window and index is specified, all the current settings are returned in an list of “option-value” pairs.

$slave->gridRemove?($slave, …)?
Removes each of the *$slave*s from grid for its master and unmaps their windows. The slaves will no longer be managed by the grid geometry manager. However, the configuration options for that window are remembered, so that if the slave is managed once more by the grid geometry manager, the previous values are retained.

$master->gridSize
Returns the size of the grid (in columns then rows) for $master. The size is determined either by the $slave occupying the largest row or column, or the largest column or row with a -minsize, -weight, or -pad that is non-zero.

$master->gridSlaves?(-option=>value)?
If no options are supplied, a list of all of the slaves in $master are returned, most recently manages first. -option can be either -row or -column which causes only the slaves in the row (or column) specified by value to be returned.

RELATIVE PLACEMENT

The grid method contains a limited set of capabilities that permit layouts to be created without specifying the row and column information for each slave. This permits slaves to be rearranged, added, or removed without the need to explicitly specify row and column information. When no column or row information is specified for a $slave, default values are chosen for -column, -row, -columnspan and -rowspan at the time the $slave is managed. The values are chosen based upon the current layout of the grid, the position of the $slave relative to other *$slave*s in the same grid method, and the presence of the characters -, ^, and ^ in grid method where $slave names are normally expected.

  • This increases the columnspan of the $slave to the left. Several -’s in a row will successively increase the columnspan. A - may not follow a ^ or a x.
  1. This leaves an empty column between the $slave on the left and the $slave on the right.

^
This extends the -rowspan of the $slave above the ^’s in the grid. The number of ^’s in a row must match the number of columns spanned by the $slave above it.

THE GRID ALGORITHM

The grid geometry manager lays out its slaves in three steps. In the first step, the minimum size needed to fit all of the slaves is computed, then (if propagation is turned on), a request is made of the master window to become that size. In the second step, the requested size is compared against the actual size of the master. If the sizes are different, then space is added to or taken away from the layout as needed. For the final step, each slave is positioned in its row(s) and column(s) based on the setting of its sticky flag.

To compute the minimum size of a layout, the grid geometry manager first looks at all slaves whose columnspan and rowspan values are one, and computes the nominal size of each row or column to be either the minsize for that row or column, or the sum of the padding plus the size of the largest slave, whichever is greater. Then the slaves whose rowspans or columnspans are greater than one are examined. If a group of rows or columns need to be increased in size in order to accommodate these slaves, then extra space is added to each row or column in the group according to its weight. For each group whose weights are all zero, the additional space is apportioned equally.

When multiple rows or columns belong to a uniform group, the space allocated to them is always in proportion to their weights. (A weight of zero is considered to be 1.) In other words, a row or column configured with -weight 1 -uniform a will have exactly the same size as any other row or column configured with -weight 1 -uniform a. A row or column configured with -weight 2 -uniform b will be exactly twice as large as one that is configured with -weight 1 -uniform b.

More technically, each row or column in the group will have a size equal to k*weight for some constant k. The constant k is chosen so that no row or column becomes smaller than its minimum size. For example, if all rows or columns in a group have the same weight, then each row or column will have the same size as the largest row or column in the group.

For masters whose size is larger than the requested layout, the additional space is apportioned according to the row and column weights. If all of the weights are zero, the layout is centered within its master. For masters whose size is smaller than the requested layout, space is taken away from columns and rows according to their weights. However, once a column or row shrinks to its minsize, its weight is taken to be zero. If more space needs to be removed from a layout than would be permitted, as when all the rows or columns are at there minimum sizes, the layout is clipped on the bottom and right.

GEOMETRY PROPAGATION

The grid geometry manager normally computes how large a master must be to just exactly meet the needs of its slaves, and it sets the requested width and height of the master to these dimensions. This causes geometry information to propagate up through a window hierarchy to a top-level window so that the entire sub-tree sizes itself to fit the needs of the leaf windows. However, the gridPropagate method may be used to turn off propagation for one or more masters. If propagation is disabled then grid will not set the requested width and height of the master window. This may be useful if, for example, you wish for a master window to have a fixed size that you specify.

RESTRICTIONS ON MASTER WINDOWS

The master for each slave must either be the slave’s parent (the default) or a descendant of the slave’s parent. This restriction is necessary to guarantee that the slave can be placed over any part of its master that is visible without danger of the slave being clipped by its parent. In addition, all slaves in one call to grid must have the same master.

STACKING ORDER

If the master for a slave is not its parent then you must make sure that the slave is higher in the stacking order than the master. Otherwise the master will obscure the slave and it will appear as if the slave hasn’t been managed correctly. The easiest way to make sure the slave is higher than the master is to create the master window first: the most recently created window will be highest in the stacking order.

CREDITS

The grid method is based on ideas taken from the GridBag geometry manager written by Doug. Stein, and the blt_table geometry manager, written by George Howlett.

SEE ALSO

Tk::form Tk::pack Tk::place

KEYWORDS

geometry manager, location, grid, cell, propagation, size, pack, master, slave

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

329 - Linux cli command Net_Server_MultiTypepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Server_MultiTypepm and provides detailed information about the command Net_Server_MultiTypepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Server_MultiTypepm.

NAME 🖥️ Net_Server_MultiTypepm 🖥️

Net::Server personality

SYNOPSIS

use base qw(Net::Server::MultiType); sub process_request { #…code… } my @types = qw(PreFork Fork Single); Net::Server::MultiType->run(server_type => \types);

DESCRIPTION

Please read the pod on Net::Server first. This module is a personality, or extension, or sub class, of the Net::Server module.

This personality is intended to allow for easy use of multiple Net::Server personalities. Given a list of server types, Net::Server::MultiType will require one at a time until it finds one that is installed on the system. It then adds that package to its @ISA, thus inheriting the methods of that personality.

ARGUMENTS

In addition to the command line arguments of the Net::Server base class, Net::Server::MultiType contains one other configurable parameter.

Key Value Default server_type server_type Single

server_type
May be called many times to build up an array or possible server_types. At execution, Net::Server::MultiType will find the first available one and then inherit the methods of that personality

CONFIGURATION FILE

Net::Server::MultiType allows for the use of a configuration file to read in server parameters. The format of this conf file is simple key value pairs. Comments and white space are ignored.

#————– file test.conf ————– ### multi type info ### try PreFork first, then go to Single server_type PreFork server_type Single ### server information min_servers 20 max_servers 80 spare_servers 10 max_requests 1000 ### user and group to become user somebody group everybody ### logging ? log_file /var/log/server.log log_level 3 pid_file /tmp/server.pid ### access control allow .+(net|com) allow domain\com deny a.+ ### background the process? background 1 ### ports to bind host 127.0.0.1 port localhost:20204 port 20205 ### reverse lookups ? # reverse_lookups on #————– file test.conf ————–

PROCESS FLOW

See Net::Server

HOOKS

There are no additional hooks in Net::Server::MultiType.

TO DO

See Net::Server

AUTHOR

Paul T. Seamons [email protected]

SEE ALSO

Please see also Net::Server::Fork, Net::Server::INET, Net::Server::PreFork, Net::Server::MultiType, Net::Server::Single

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

330 - Linux cli command strncpy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strncpy and provides detailed information about the command strncpy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strncpy.

NAME 🖥️ strncpy 🖥️

fill a fixed-size buffer with non-null bytes from a string, padding with null bytes as needed

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strncpy(char dst[restrict .dsize], const char *restrict src,
 size_t dsize);
char *stpncpy(char dst[restrict .dsize], const char *restrict src,
 size_t dsize);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

stpncpy():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions copy non-null bytes from the string pointed to by src into the array pointed to by dst. If the source has too few non-null bytes to fill the destination, the functions pad the destination with trailing null bytes. If the destination buffer, limited by its size, isn’t large enough to hold the copy, the resulting character sequence is truncated. For the difference between the two functions, see RETURN VALUE.

An implementation of these functions might be:

char *
strncpy(char *restrict dst, const char *restrict src, size_t dsize)
{
    stpncpy(dst, src, dsize);
    return dst;
}
char *
stpncpy(char *restrict dst, const char *restrict src, size_t dsize)
{
    size_t  dlen;
    dlen = strnlen(src, dsize);
    return memset(mempcpy(dst, src, dlen), 0, dsize - dlen);
}

RETURN VALUE

strncpy()
returns dst.

stpncpy()
returns a pointer to one after the last character in the destination character sequence.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

stpncpy(), strncpy()

Thread safetyMT-Safe

STANDARDS

strncpy()
C11, POSIX.1-2008.

stpncpy()
POSIX.1-2008.

HISTORY

strncpy()
C89, POSIX.1-2001, SVr4, 4.3BSD.

stpncpy()
glibc 1.07. POSIX.1-2008.

CAVEATS

The name of these functions is confusing. These functions produce a null-padded character sequence, not a string (see string_copying(7)). For example:

strncpy(buf, "1", 5);       // { '1',   0,   0,   0,   0 }
strncpy(buf, "1234", 5);    // { '1', '2', '3', '4',   0 }
strncpy(buf, "12345", 5);   // { '1', '2', '3', '4', '5' }
strncpy(buf, "123456", 5);  // { '1', '2', '3', '4', '5' }

It’s impossible to distinguish truncation by the result of the call, from a character sequence that just fits the destination buffer; truncation should be detected by comparing the length of the input string with the size of the destination buffer.

If you’re going to use this function in chained calls, it would be useful to develop a similar function that accepts a pointer to the end (one after the last element) of the destination buffer instead of its size.

EXAMPLES

#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int
main(void)
{
    char    *p;
    char    buf1[20];
    char    buf2[20];
    size_t  len;
    if (sizeof(buf2) < strlen("Hello world!"))
        errx("strncpy: truncating character sequence");
    strncpy(buf2, "Hello world!", sizeof(buf2));
    len = strnlen(buf2, sizeof(buf2));
    printf("[len = %zu]: ", len);
    fwrite(buf2, 1, len, stdout);
    putchar('

‘); if (sizeof(buf1) < strlen(“Hello world!”)) errx(“stpncpy: truncating character sequence”); p = stpncpy(buf1, “Hello world!”, sizeof(buf1)); len = p - buf1; printf("[len = %zu]: “, len); fwrite(buf1, 1, len, stdout); putchar(’ ‘); exit(EXIT_SUCCESS); }

SEE ALSO

wcpncpy(3), string_copying(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

331 - Linux cli command Tk_Compoundpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Compoundpm and provides detailed information about the command Tk_Compoundpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Compoundpm.

NAME 🖥️ Tk_Compoundpm 🖥️

Create multi-line compound images.

SYNOPSIS

use Tk::Compound; $image = $widget->Compound(name,options); $image->Line(options); $image->Text(options); $image->Bitmap(options); $image->Image(options); $image->Space(options);

DESCRIPTION

Compound image types can be used to create images that consists of multiple horizontal lines; each line is composed of a series of items (texts, bitmaps, images or spaces) arranged from left to right. Compound images are mainly used to embed complex drawings into widgets that support the -image option. As shown in the EXAMPLE section below, a compound image can be used to display a bitmap and a text string simutaneously in a Tk Button widget.

Compound images can only be used on windows on the same display as, and with the same pixel depth and visual as the $widget used to create them.

CREATING COMPOUND IMAGES

Compounds are created using $widget->Compound. Compounds support the following options:

-background => color
Specifies the background color of the compound image. This color is also used as the default background color for the bitmap items in the compound image.

-borderwidth => pixels
Specifies a non-negative value indicating the width of the 3-D border drawn around the compound image.

-font => font
Specifies the default font for the text items in the compound image.

-foreground => color
Specifies the default foreground color for the bitmap and text items in the compound image.

-padx => value
Specifies a non-negative value indicating how much extra space to request for the compound image in the X-direction. The value may have any of the forms acceptable to Tk_GetPixels (3).

-pady => value
Specifies a non-negative value indicating how much extra space to request for the compound image in the Y-direction.

-relief => value
Specifies the 3-D effect desired for the background of the compound image. Acceptable values are raised, sunken, flat, ridge, and groove.

-showbackground => value
Specifies whether the background and the 3D borders should be drawn. Must be a valid boolean value. By default the background is not drawn and the compound image appears to have a transparent background.

IMAGE COMMAND

When a compound image is created, Tk also creates a new object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above.

The object also supports the following methods:

$compound->Line?(option = value …>)?
Creates a new line at the bottom of the compound image. Lines support the following options:

-anchor value
Specifies how the line should be aligned along the horizontal axis. When the values are w, sw or nw, the line is aligned to the left. When the values are c, s or n, the line is aligned to the middle. When the values are e, se or ne, the line is aligned to the right.

-padx => value
Specifies a non-negative value indicating how much extra space to request for this line in the X-direction.

$compound->Itemtype?(option = value …>)?
Creates a new item of the type Itemtype at the end of the last line of the compound image. All types of items support these following common options:

-anchor value
Specifies how the item should be aligned along the vertical axis. When the values are n, nw or ne, the item is aligned to the top of the line. When the values are c, w or e, the item is aligned to the middle of the line. When the values are s, se or sw, the item is aligned to the bottom of the line.

-padx => value
Specifies a non-negative value indicating how much extra space to request for this item in the X-direction.

-pady => value
Specifies a non-negative value indicating how much extra space to request for this item in the Y-direction.

item-type can be any of the following:

$compound->Bitmap?(option = value …>)?

Creates a new bitmap item of at the end of the last line of the compound image. Additional options accepted by the bitmap type are:

-background => color
Specifies the background color of the bitmap item.

-bitmap => name
Specifies a bitmap to display in this item, in any of the forms acceptable to Tk_GetBitmap (3).

-foreground => color
Specifies the foreground color of the bitmap item.

$compound->Image?(option = value …>)?
Creates a new image item of at the end of the last line of the compound image. Additional options accepted by the image type are:

-image => name
Specifies an image to display in this item. name must have been created with the image create command.

$compound->Space?(option = value …>)?
Creates a new space item of at the end of the last line of the compound image. Space items do not display anything. They just acts as space holders that add additional spaces between items inside a compound image. Additional options accepted by the image type are:

-width => value
Specifies the width of this space. The value may have any of the forms acceptable to Tk_GetPixels (3).

-height => value
Specifies the height of this space. The value may have any of the forms acceptable to Tk_GetPixels (3).

$compound->Text?(option = value …>)?
Creates a new text item of at the end of the last line of the compound image. Additional options accepted by the text type are:

-background => color
Specifies the background color of the text item.

-font => name
Specifies the font to be used for this text item.

-foreground => color
Specifies the foreground color of the text item.

-justify value
When there are multiple lines of text displayed in a text item, this option determines how the lines line up with each other. value must be one of left, center, or right. Left means that the lines’ left edges all line up, center means that the lines’ centers are aligned, and right means that the lines’ right edges line up.

-text => string
Specifies a text string to display in this text item.

-underline value
Specifies the integer index of a character to underline in the text item. 0 corresponds to the first character of the text displayed in the text item, 1 to the next character, and so on.

-wraplength value
This option specifies the maximum line length of the label string on this text item. If the line length of the label string exceeds this length, it is wrapped onto the next line, so that no line is longer than the specified length. The value may be specified in any of the standard forms for screen distances. If this value is less than or equal to 0 then no wrapping is done: lines will break only at newline characters in the text.

EXAMPLE

The following example creates a compound image with a bitmap and a text string and places this image into a Button(n) widget. Notice that the image must be created using the widget that it resides in.

my $b = $parent->Button; my $c = $b->Compound; $b->configure(-image => $c); $c->Line; $c->Bitmap(-bitmap => warning); $c->Space(-width => 8); $c->Text(-text => “Warning”, -underline => 0); $b->pack;

KEYWORDS

image(n), Tix(n)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

332 - Linux cli command XtNew

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtNew and provides detailed information about the command XtNew, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtNew.

NAME 🖥️ XtNew 🖥️

memory management functions

SYNTAX

#include <X11/Intrinsic.h>

char *XtMalloc(Cardinal size);

char *XtCalloc(Cardinal num, Cardinal size);

char *XtRealloc(char *ptr, Cardinal num);

void XtFree(char *ptr);

type *XtNew(type);

String XtNewString(String string);

Cardinal XtAsprintf(char **new_string, const char *format, …);

ARGUMENTS

num
Specifies the number of bytes or array elements.

ptr
Specifies a pointer to the old storage or to the block of storage that is to be freed.

size
Specifies the size of an array element (in bytes) or the number of bytes desired.

string
Specifies a previously declared string.

type
Specifies a previously declared data type.

new_string
Specifies a pointer to write a newly allocated string to.

format
Specifies a formatting string as defined by sprintf(3c)

DESCRIPTION

The XtMalloc functions returns a pointer to a block of storage of at least the specified size bytes. If there is insufficient memory to allocate the new block, XtMalloc calls XtErrorMsg.

The XtCalloc function allocates space for the specified number of array elements of the specified size and initializes the space to zero. If there is insufficient memory to allocate the new block, XtCalloc calls XtErrorMsg.

The XtRealloc function changes the size of a block of storage (possibly moving it). Then, it copies the old contents (or as much as will fit) into the new block and frees the old block. If there is insufficient memory to allocate the new block, XtRealloc calls XtErrorMsg. If ptr is NULL, XtRealloc allocates the new storage without copying the old contents; that is, it simply calls XtMalloc.

The XtFree function returns storage and allows it to be reused. If ptr is NULL, XtFree returns immediately.

XtNew returns a pointer to the allocated storage. If there is insufficient memory to allocate the new block, XtNew calls XtErrorMsg. XtNew is a convenience macro that calls XtMalloc with the following arguments specified:

((type *) XtMalloc((unsigned) sizeof(type))

XtNewString returns a pointer to a new string which is a duplicate of string. If there is insufficient memory to allocate the new block, or the argument is NULL XtNewString returns NULL. The memory can be freed with XtFree.

The XtAsprintf function allocates space for a string large enough to hold the string specified by the sprintf(3c) format pattern when used with the remaining arguments, and fills it with the formatted results. The address of the allocated string is placed into the pointer passed as ret. The length of the string (not including the terminating null byte) is returned. If there is insufficient memory to allocate the new block, XtAsprintf calls XtErrorMsg.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

333 - Linux cli command Moose_Manual_Classespm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Manual_Classespm and provides detailed information about the command Moose_Manual_Classespm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Manual_Classespm.

NAME 🖥️ Moose_Manual_Classespm 🖥️

Making your classes use Moose (and subclassing)

VERSION

version 2.2207

USING MOOSE

Using Moose is very simple, you just use Moose:

package Person; use Moose;

That’s it, you’ve made a class with Moose!

There’s actually a lot going on here under the hood, so let’s step through it.

When you load Moose, a bunch of sugar functions are exported into your class, such as extends, has, with, and more. These functions are what you use to define your class. For example, you might define an attribute …

package Person; use Moose; has ssn => ( is => rw );

Attributes are described in the Moose::Manual::Attributes documentation.

Loading Moose also enables the strict and warnings pragmas in your class.

When you load Moose, your class will become a subclass of Moose::Object. The Moose::Object class provides a default constructor and destructor, as well as object construction helper methods. You can read more about this in the Moose::Manual::Construction document.

As a convenience, Moose creates a new class type for your class. See the Moose::Manual::Types document to learn more about types.

It also creates a Moose::Meta::Class object for your class. This metaclass object is now available by calling a meta method on your class, for example Person->meta.

The metaclass object provides an introspection API for your class. It is also used by Moose itself under the hood to add attributes, define parent classes, and so on. In fact, all of Moose’s sugar does the real work by calling methods on this metaclass object (and other meta API objects).

SUBCLASSING

Moose provides a simple sugar function for declaring your parent classes, extends:

package User; use Moose; extends Person; has username => ( is => rw );

Note that each call to extends will reset your parents. For multiple inheritance you must provide all the parents at once, extends Foo, Bar.

When you call extends Moose will try to load any classes you pass.

You can use Moose to extend a non-Moose parent. However, when you do this, you will inherit the parent class’s constructor (assuming it is also called new). In that case, you will have to take care of initializing attributes manually, either in the parent’s constructor, or in your subclass, and you will lose a lot of Moose magic.

See the MooseX::NonMoose module on CPAN if you’re interested in extending non-Moose parent classes with Moose child classes.

CLEANING UP MOOSE DROPPINGS

Moose exports a number of functions into your class. It’s a good idea to remove these sugar functions from your class’s namespace, so that Person->can(has) will no longer return true.

There are several ways to do this. We recommend using namespace::autoclean, a CPAN module. Not only will it remove Moose exports, it will also remove any other exports.

package Person; use namespace::autoclean; use Moose;

If you absolutely can’t use a CPAN module (but can use Moose?), you can write no Moose at the end of your class. This will remove any Moose exports in your class.

package Person; use Moose; has ssn => ( is => rw ); no Moose;

MAKING IT FASTER

Moose has a feature called “immutabilization” that you can use to greatly speed up your classes at runtime. However, using it incurs a cost when your class is first being loaded. When you make your class immutable you tell Moose that you will not be changing it in the future. You will not be adding any more attributes, methods, roles, etc.

This allows Moose to generate code specific to your class. In particular, it creates an “inline” constructor, making object construction much faster.

To make your class immutable you simply call make_immutable on your class’s metaclass object.

_ _PACKAGE_ _->meta->make_immutable;

Immutabilization and new()

If you override new() in your class, then the immutabilization code will not be able to provide an optimized constructor for your class. Instead, you should use a BUILD() method, which will be called from the inlined constructor.

Alternately, if you really need to provide a different new(), you can also provide your own immutabilization method. Doing so requires extending the Moose metaclasses, and is well beyond the scope of this manual.

INSTANTIATING CLASSES

When you’re ready to use Moose classes in an application, reference them in your code in the regular Perl OO way by including a use directive at the top of the file where the objects should be created.

use Person; my $person = Person->new( # attribute values at instantiation # go here ssn => 123456789, );

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

334 - Linux cli command rexec_af

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command rexec_af and provides detailed information about the command rexec_af, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the rexec_af.

NAME 🖥️ rexec_af 🖥️

return stream to a remote command

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
[[deprecated]]
int rexec(char **restrict ahost, int inport,
 const char *restrict user, const char *restrict passwd,
 const char *restrict cmd, int *restrict fd2p);
[[deprecated]]
int rexec_af(char **restrict ahost, int inport,
 const char *restrict user, const char *restrict passwd,
 const char *restrict cmd, int *restrict fd2p,
 sa_family_t af);

rexec(), rexec_af():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    In glibc up to and including 2.19:
        _BSD_SOURCE

DESCRIPTION

This interface is obsoleted by rcmd(3).

The rexec() function looks up the host *ahost using gethostbyname(3), returning -1 if the host does not exist. Otherwise, *ahost is set to the standard name of the host. If a username and password are both specified, then these are used to authenticate to the foreign host; otherwise the environment and then the .netrc file in user’s home directory are searched for appropriate information. If all this fails, the user is prompted for the information.

The port inport specifies which well-known DARPA Internet port to use for the connection; the call getservbyname(“exec”, “tcp”) (see getservent(3)) will return a pointer to a structure that contains the necessary port. The protocol for connection is described in detail in rexecd(8).

If the connection succeeds, a socket in the Internet domain of type SOCK_STREAM is returned to the caller, and given to the remote command as stdin and stdout. If fd2p is nonzero, then an auxiliary channel to a control process will be setup, and a file descriptor for it will be placed in *fd2p. The control process will return diagnostic output from the command (unit 2) on this channel, and will also accept bytes on this channel as being UNIX signal numbers, to be forwarded to the process group of the command. The diagnostic information returned does not include remote authorization failure, as the secondary connection is set up after authorization has been verified. If fd2p is 0, then the stderr (unit 2 of the remote command) will be made the same as the stdout and no provision is made for sending arbitrary signals to the remote process, although you may be able to get its attention by using out-of-band data.

rexec_af()

The rexec() function works over IPv4 (AF_INET). By contrast, the rexec_af() function provides an extra argument, af, that allows the caller to select the protocol. This argument can be specified as AF_INET, AF_INET6, or AF_UNSPEC (to allow the implementation to select the protocol).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

rexec(), rexec_af()

Thread safetyMT-Unsafe

STANDARDS

None.

HISTORY

rexec()
4.2BSD, BSD, Solaris.

rexec_af()
glibc 2.2.

BUGS

The rexec() function sends the unencrypted password across the network.

The underlying service is considered a big security hole and therefore not enabled on many sites; see rexecd(8) for explanations.

SEE ALSO

rcmd(3), rexecd(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

335 - Linux cli command Tk_TListpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_TListpm and provides detailed information about the command Tk_TListpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_TListpm.

NAME 🖥️ Tk_TListpm 🖥️

Create and manipulate Tix Tabular List widgets

SYNOPSIS

$tlist = $parent->TList(?options?);

SUPER-CLASS

None.

STANDARD OPTIONS

-background -borderwidth -class -cursor -foreground -font -height -highlightcolor -highlightthickness -relief -selectbackground -selectforeground -xscrollcommand -yscrollcommand -width

See Tk::options for details of the standard options.

WIDGET-SPECIFIC OPTIONS

Name: browsecmd

Class: BrowseCmd

Switch: -browsecmd

Specifies a perl/Tk callback to be executed when the user browses through the entries in the TList widget.

Name: command

Class: Command

Switch: -command

Specifies the perl/Tk callback to be executed when the user invokes a list entry in the TList widget. Normally the user invokes a list entry by double-clicking it or pressing the Return key.

Name: foreground

Class: Foreground

Switch: -foreground

Alias: -fg

Specifies the default foreground color for the list entries.

Name: height

Class: Height

Switch: -height

Specifies the desired height for the window in number of characters.

Name: itemType

Class: ItemType

Switch: -itemtype

Specifies the default type of display item for this TList widget. When you call the insert methods, display items of this type will be created if the -itemtype option is not specified.

Name: orient

Class: Orient

Switch: -orient

Specifies the order of tabularizing the list entries. When set to “vertical”, the entries are arranged in a column, from top to bottom. If the entries cannot be contained in one column, the remaining entries will go to the next column, and so on. When set to “horizontal”, the entries are arranged in a row, from left to right. If the entries cannot be contained in one row, the remaining entries will go to the next row, and so on.

Name: padX

Class: Pad

Switch: -padx

The default horizontal padding for list entries.

Name: padY

Class: Pad

Switch: -padx

The default vertical padding for list entries.

Name: selectBackground

Class: SelectBackground

Switch: -selectbackground

Specifies the background color for the selected list entries.

Name: selectBorderWidth

Class: BorderWidth

Switch: -selectborderwidth

Specifies a non-negative value indicating the width of the 3-D border to draw around selected items. The value may have any of the forms acceptable to Tk_GetPixels.

Name: selectForeground

Class: SelectForeground

Switch: -selectforeground

Specifies the foreground color for the selected list entries.

Name: selectMode

Class: SelectMode

Switch: -selectmode

Specifies one of several styles for manipulating the selection. The value of the option may be arbitrary, but the default bindings expect it to be either single, browse, multiple, or extended; the default value is single.

Name: sizeCmd

Class: SizeCmd

Switch: -sizecmd

Specifies a perl/Tk callback to be called whenever the TList widget changes its size. This command can be useful to implement “user scroll bars when needed” features.

Name: state

Class: State

Switch: -state

Specifies whether the TList command should react to user actions. When set to “normal”, the TList reacts to user actions in the normal way. When set to “disabled”, the TList can only be scrolled, but its entries cannot be selected or activated.

Name: width

Class: Width

Switch: -width

Specifies the desired width for the window in characters.

DESCRIPTION

The TList method creates a new window (given by the $widget argument) and makes it into a TList widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the TList widget such as its cursor and relief.

The TList widget can be used to display data in a tabular format. The list entries of a TList widget are similar to the entries in the Tk listbox widget. The main differences are (1) the TList widget can display the list entries in a two dimensional format and (2) you can use graphical images as well as multiple colors and fonts for the list entries.

Each list entry is identified by an index, which can be in the following forms:

number
An integer that indicates the position of the entry in the list. 0 means the first position, 1 means the second position, and so on.

end
Indicates the end of the listbox. For some commands this means just after the last entry; for other commands it means the last entry.

@x,y
Indicates the element that covers the point in the listbox window specified by x and y (in pixel coordinates). If no element covers that point, then the closest element to that point is used.

DISPLAY ITEMS

Each list entry in an TList widget is associated with a display item. The display item determines what visual information should be displayed for this list entry. Please see Tk::DItem for a list of all display items.

When a list entry is created by the insert command, the type of its display item is determined by the -itemtype option passed to these commands. If the -itemtype is omitted, then by default the type specified by this TList widget’s -itemtype option is used.

WIDGET METHODS

The TList method creates a widget object.

This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class.

The following additional methods are available for TList widgets:

$tlist->anchorSet(index)
Sets the anchor to the list entry identified by index. The anchor is the end of the selection that is fixed while dragging out a selection with the mouse.

$tlist->anchorClear
Removes the anchor, if any, from this TList widget. This only removes the surrounding highlights of the anchor entry and does not affect its selection status.

$tlist->delete(from, ?to?)
Deletes one or more list entries between the two entries specified by the indices from and to. If to is not specified, deletes the single entry specified by from.

$tlist->dragsiteSet(index)
Sets the dragsite to the list entry identified by index. The dragsite is used to indicate the source of a drag-and-drop action. Currently drag-and-drop functionality has not been implemented in Tix yet.

$tlist->dragsiteClear
Remove the dragsite, if any, from the this TList widget. This only removes the surrounding highlights of the dragsite entry and does not affect its selection status.

$tlist->dropsiteSet(index)
Sets the dropsite to the list entry identified by index. The dropsite is used to indicate the target of a drag-and-drop action. Currently drag-and-drop functionality has not been implemented in Tix yet.

$tlist->dropsiteClear
Remove the dropsite, if any, from the this TList widget. This only removes the surrounding highlights of the dropsite entry and does not affect its selection status.

$tlist->entrycget(index, option)
Returns the current value of the configuration option given by option for the entry indentfied by index. Option may have any of the values accepted by the insert method.

$tlist->entryconfigure(index, ?option?, ?value, option, value, …?)
Query or modify the configuration options of the list entry identified by index. If no option is specified, returns a list describing all of the available options for index (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, then the method returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given option(s) to have the given value(s); in this case the method returns an empty string. Option may have any of the values accepted by the insert method. The exact set of options depends on the value of the -itemtype option passed to the the insert method when this list entry is created.

$tlist->insert(index, ?option, value, …?)
Creates a new list entry at the position indicated by index. The following configuration options can be given to configure the list entry:

-itemtype => type
Specifies the type of display item to be display for the new list entry. type must be a valid display item type. Currently the available display item types are image, imagetext, text, and $widget. If this option is not specified, then by default the type specified by this TList widget’s -itemtype option is used.

-state => state
Specifies whether this entry can be selected or invoked by the user. Must be either normal or disabled.

-data => data
Arbitrary data to be associated with the entry (a perl scalar value).

The insert method accepts additional configuration options to configure the display item associated with this list entry. The set of additional configuration options depends on the type of the display item given by the -itemtype option. Please see Tk::DItem for a list of the configuration options for each of the display item types.

$tlist->info(option, arg, …)
Query information about the TList widget. option can be one of the following:

$tlist->info(anchor, index)
Returns the index of the current anchor, if any, of the TList widget. If the anchor is not set, returns the empty string.

$tlist->info(dragsite, index)
Returns the index of the current dragsite, if any, of the TList widget. If the dragsite is not set, returns the empty string.

$tlist->info(dropsite, index)
Returns the index of the current dropsite, if any, of the TList widget. If the dropsite is not set, returns the empty string.

$tlist->info(selection)
Returns a list of selected elements in the TList widget. If no entries are selected, returns an empty string.

$tlist->nearest(x, y)
Given an (x,y) coordinate within the TList window, this command returns the index of the TList element nearest to that coordinate.

$tlist->see(index)
Adjust the view in the TList so that the entry given by index is visible. If the entry is already visible then the command has no effect; otherwise TList scrolls to bring the element into view at the edge to which it is nearest.

$tlist->selection(option, arg, …)
This command is used to adjust the selection within a TList widget. It has several forms, depending on option:

$tlist->selectionClear(?from?, ?to?)
When no extra arguments are given, deselects all of the list entrie(s) in this TList widget. When only from is given, only the list entry identified by from is deselected. When both from and to are given, deselects all of the list entrie(s) between between from and to, inclusive, without affecting the selection state of entries outside that range.

$tlist->selectionIncludes(index)
Returns 1 if the list entry indicated by index is currently selected; returns 0 otherwise.

$tlist->selectionSet(from, ?to?)
Selects all of the list entrie(s) between between from and to, inclusive, without affecting the selection state of entries outside that range. When only from is given, only the list entry identified by from is selected.

$tlist->xview(args)
This command is used to query and change the horizontal position of the information in the widget’s window. It can take any of the following forms:

$tlist->xview
Returns a list containing two elements. Each element is a real fraction between 0 and 1; together they describe the horizontal span that is visible in the window. For example, if the first element is 0.2 and the second element is 0.6, 20% of the TList entry is off-screen to the left, the middle 40% is visible in the window, and 40% of the entry is off-screen to the right. These are the same values passed to scrollbars via the -xscrollcommand option.

$tlist->xview(index)
Adjusts the view in the window so that the list entry identified by index is aligned to the left edge of the window.

$tlist->xviewMoveto(fraction)
Adjusts the view in the window so that fraction of the total width of the TList is off-screen to the left. fraction must be a fraction between 0 and 1.

$tlist->xviewScroll(number, what)
This command shifts the view in the window left or right according to number and what. Number must be an integer. What must be either units or pages or an abbreviation of one of these. If what is units, the view adjusts left or right by number character units (the width of the 0 character) on the display; if it is pages then the view adjusts by number screenfuls. If number is negative then characters farther to the left become visible; if it is positive then characters farther to the right become visible.

$tlist->yview(?args?)
This command is used to query and change the vertical position of the entries in the widget’s window. It can take any of the following forms:

$tlist->yview
Returns a list containing two elements, both of which are real fractions between 0 and 1. The first element gives the position of the list element at the top of the window, relative to the TList as a whole (0.5 means it is halfway through the TList, for example). The second element gives the position of the list entry just after the last one in the window, relative to the TList as a whole. These are the same values passed to scrollbars via the -yscrollcommand option.

$tlist->yview(index)
Adjusts the view in the window so that the list entry given by index is displayed at the top of the window.

$tlist->yviewMoveto(fraction)
Adjusts the view in the window so that the list entry given by fraction appears at the top of the window. Fraction is a fraction between 0 and 1; 0 indicates the first entry in the TList, 0.33 indicates the entry one-third the way through the TList, and so on.

$tlist->yviewScroll(number, what)
This command adjust the view in the window up or down according to number and what. Number must be an integer. What must be either units or pages. If what is units, the view adjusts up or down by number lines; if it is pages then the view adjusts by number screenfuls. If number is negative then earlier entries become visible; if it is positive then later entries become visible.

BINDINGS

[1]
If the -selectmode is “browse”, when the user drags the mouse pointer over the list entries, the entry under the pointer will be highlighted and the -browsecmd procedure will be called with one parameter, the index of the highlighted entry. Only one entry can be highlighted at a time. The -command procedure will be called when the user double-clicks on a list entry.

[2]
If the -selectmode is “single”, the entries will only be highlighted by mouse <ButtonRelease-1> events. When a new list entry is highlighted, the -browsecmd procedure will be called with one parameter indicating the highlighted list entry. The -command procedure will be called when the user double-clicks on a list entry.

[3]
If the -selectmode is “multiple”, when the user drags the mouse pointer over the list entries, all the entries under the pointer will be highlighted. However, only a contiguous region of list entries can be selected. When the highlighted area is changed, the -browsecmd procedure will be called with an undefined parameter. It is the responsibility of the -browsecmd procedure to find out the exact highlighted selection in the TList. The -command procedure will be called when the user double-clicks on a list entry.

[4]
If the -selectmode is “extended”, when the user drags the mouse pointer over the list entries, all the entries under the pointer will be highlighted. The user can also make disjointed selections using <Control-ButtonPress-1>. When the highlighted area is changed, the -browsecmd procedure will be called with an undefined parameter. It is the responsibility of the -browsecmd procedure to find out the exact highlighted selection in the TList. The -command procedure will be called when the user double-clicks on a list entry.

EXAMPLE

This example demonstrates how to use an TList to store a list of numbers:

use strict; use Tk (); use Tk::TList; my $mw = Tk::MainWindow->new(); my $image = $mw->Getimage(folder); my $tlist = $mw->TList(-orient => vertical); for my $text ( qw/one two three four five six seven eight nine/ ) { $tlist->insert(end, -itemtype=>imagetext, -image=>$image, -text=>$text); } $tlist->pack(-expand=>yes, -fill=>both); Tk::MainLoop;

SEE ALSO

Tk::options Tk::Widget Tk::DItem Tk::HList Tk::TixGrid

KEYWORDS

Tix(n), Tabular Listbox, Display Items

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

336 - Linux cli command Image_ExifTool_MIFFpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_MIFFpm and provides detailed information about the command Image_ExifTool_MIFFpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_MIFFpm.

NAME 🖥️ Image_ExifTool_MIFFpm 🖥️

Read Magick Image File Format meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to read MIFF (Magick Image File Format) images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.imagemagick.org/script/miff.php>

<http://www.cs.uni.edu/Help/ImageMagick/www/miff.html>

SEE ALSO

“MIFF Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

337 - Linux cli command zip_source_seek

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_seek and provides detailed information about the command zip_source_seek, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_seek.

libzip (-lzip)

The function

sets the current read offset for

Just like in

depending on the

argument, the

is counted relative from:

start of file

current read offset in file

end of file

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

338 - Linux cli command zip_stat_init

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_stat_init and provides detailed information about the command zip_stat_init, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_stat_init.

libzip (-lzip)

The

function initializes the members of a struct zip_stat. The current members are described in

but this function should be used to initialize it to make sure none are missed. The structure pointed to by

must be allocated before calling

This function should be used by functions provided to

when returning

information to make sure all fields are initialized.

If

is valid, the function is always successful.

was added in libzip 0.8.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

339 - Linux cli command getcwd

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getcwd and provides detailed information about the command getcwd, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getcwd.

NAME 🖥️ getcwd 🖥️

get current working directory

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
char *getcwd(char buf[.size], size_t size);
char *get_current_dir_name(void);
[[deprecated]] char *getwd(char buf[PATH_MAX]);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

get_current_dir_name():

    _GNU_SOURCE

getwd():

    Since glibc 2.12:
        (_XOPEN_SOURCE >= 500) && ! (_POSIX_C_SOURCE >= 200809L)
            || /* glibc >= 2.19: */ _DEFAULT_SOURCE
            || /* glibc <= 2.19: */ _BSD_SOURCE
    Before glibc 2.12:
        _BSD_SOURCE || _XOPEN_SOURCE >= 500

DESCRIPTION

These functions return a null-terminated string containing an absolute pathname that is the current working directory of the calling process. The pathname is returned as the function result and via the argument buf, if present.

The getcwd() function copies an absolute pathname of the current working directory to the array pointed to by buf, which is of length size.

If the length of the absolute pathname of the current working directory, including the terminating null byte, exceeds size bytes, NULL is returned, and errno is set to ERANGE; an application should check for this error, and allocate a larger buffer if necessary.

As an extension to the POSIX.1-2001 standard, glibc’s getcwd() allocates the buffer dynamically using malloc(3) if buf is NULL. In this case, the allocated buffer has the length size unless size is zero, when buf is allocated as big as necessary. The caller should free(3) the returned buffer.

get_current_dir_name() will malloc(3) an array big enough to hold the absolute pathname of the current working directory. If the environment variable PWD is set, and its value is correct, then that value will be returned. The caller should free(3) the returned buffer.

getwd() does not malloc(3) any memory. The buf argument should be a pointer to an array at least PATH_MAX bytes long. If the length of the absolute pathname of the current working directory, including the terminating null byte, exceeds PATH_MAX bytes, NULL is returned, and errno is set to ENAMETOOLONG. (Note that on some systems, PATH_MAX may not be a compile-time constant; furthermore, its value may depend on the filesystem, see pathconf(3).) For portability and security reasons, use of getwd() is deprecated.

RETURN VALUE

On success, these functions return a pointer to a string containing the pathname of the current working directory. In the case of getcwd() and getwd() this is the same value as buf.

On failure, these functions return NULL, and errno is set to indicate the error. The contents of the array pointed to by buf are undefined on error.

ERRORS

EACCES
Permission to read or search a component of the filename was denied.

EFAULT
buf points to a bad address.

EINVAL
The size argument is zero and buf is not a null pointer.

EINVAL
getwd(): buf is NULL.

ENAMETOOLONG
getwd(): The size of the null-terminated absolute pathname string exceeds PATH_MAX bytes.

ENOENT
The current working directory has been unlinked.

ENOMEM
Out of memory.

ERANGE
The size argument is less than the length of the absolute pathname of the working directory, including the terminating null byte. You need to allocate a bigger array and try again.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getcwd(), getwd()

Thread safetyMT-Safe

get_current_dir_name()

Thread safetyMT-Safe env

VERSIONS

POSIX.1-2001 leaves the behavior of getcwd() unspecified if buf is NULL.

POSIX.1-2001 does not define any errors for getwd().

VERSIONS

C library/kernel differences

On Linux, the kernel provides a getcwd() system call, which the functions described in this page will use if possible. The system call takes the same arguments as the library function of the same name, but is limited to returning at most PATH_MAX bytes. (Before Linux 3.12, the limit on the size of the returned pathname was the system page size. On many architectures, PATH_MAX and the system page size are both 4096 bytes, but a few architectures have a larger page size.) If the length of the pathname of the current working directory exceeds this limit, then the system call fails with the error ENAMETOOLONG. In this case, the library functions fall back to a (slower) alternative implementation that returns the full pathname.

Following a change in Linux 2.6.36, the pathname returned by the getcwd() system call will be prefixed with the string “(unreachable)” if the current directory is not below the root directory of the current process (e.g., because the process set a new filesystem root using chroot(2) without changing its current directory into the new root). Such behavior can also be caused by an unprivileged user by changing the current directory into another mount namespace. When dealing with pathname from untrusted sources, callers of the functions described in this page should consider checking whether the returned pathname starts with ‘/’ or ‘(’ to avoid misinterpreting an unreachable path as a relative pathname.

STANDARDS

getcwd()
POSIX.1-2008.

get_current_dir_name()
GNU.

getwd()
None.

HISTORY

getcwd()
POSIX.1-2001.

getwd()
POSIX.1-2001, but marked LEGACY. Removed in POSIX.1-2008. Use getcwd() instead.

Under Linux, these functions make use of the getcwd() system call (available since Linux 2.1.92). On older systems they would query /proc/self/cwd. If both system call and proc filesystem are missing, a generic implementation is called. Only in that case can these calls fail under Linux with EACCES.

NOTES

These functions are often used to save the location of the current working directory for the purpose of returning to it later. Opening the current directory (".") and calling fchdir(2) to return is usually a faster and more reliable alternative when sufficiently many file descriptors are available, especially on platforms other than Linux.

BUGS

Since the Linux 2.6.36 change that added “(unreachable)” in the circumstances described above, the glibc implementation of getcwd() has failed to conform to POSIX and returned a relative pathname when the API contract requires an absolute pathname. With glibc 2.27 onwards this is corrected; calling getcwd() from such a pathname will now result in failure with ENOENT.

SEE ALSO

pwd(1), chdir(2), fchdir(2), open(2), unlink(2), free(3), malloc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

340 - Linux cli command strxfrm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strxfrm and provides detailed information about the command strxfrm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strxfrm.

NAME 🖥️ strxfrm 🖥️

string transformation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
size_t strxfrm(char dest[restrict .n], const char src[restrict .n],
 size_t n);

DESCRIPTION

The strxfrm() function transforms the src string into a form such that the result of strcmp(3) on two strings that have been transformed with strxfrm() is the same as the result of strcoll(3) on the two strings before their transformation. The first n bytes of the transformed string are placed in dest. The transformation is based on the program’s current locale for category LC_COLLATE. (See setlocale(3)).

RETURN VALUE

The strxfrm() function returns the number of bytes required to store the transformed string in dest excluding the terminating null byte (‘�’). If the value returned is n or more, the contents of dest are indeterminate.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strxfrm()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89, SVr4, 4.3BSD.

SEE ALSO

memcmp(3), setlocale(3), strcasecmp(3), strcmp(3), strcoll(3), string(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

341 - Linux cli command zip_error_init_with_code

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_error_init_with_code and provides detailed information about the command zip_error_init_with_code, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_error_init_with_code.

libzip (-lzip)

The

function initializes the zip_error pointed to by

must be allocated before calling

The

function does the same, but additionally sets the zip error code to

and sets the system error code to the current

value, if appropriate.

and

were added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

342 - Linux cli command fputc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fputc and provides detailed information about the command fputc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fputc.

NAME 🖥️ fputc 🖥️

output of characters and strings

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int fputc(int c, FILE *stream);
int putc(int c, FILE *stream);
int putchar(int c);
int fputs(const char *restrict s, FILE *restrict stream);
int puts(const char *s);

DESCRIPTION

fputc() writes the character c, cast to an unsigned char, to stream.

putc() is equivalent to fputc() except that it may be implemented as a macro which evaluates stream more than once.

putchar(c) is equivalent to putc(c, stdout).

fputs() writes the string s to stream, without its terminating null byte (‘�’).

puts() writes the string s and a trailing newline to stdout.

Calls to the functions described here can be mixed with each other and with calls to other output functions from the stdio library for the same output stream.

For nonlocking counterparts, see unlocked_stdio(3).

RETURN VALUE

fputc(), putc(), and putchar() return the character written as an unsigned char cast to an int or EOF on error.

puts() and fputs() return a nonnegative number on success, or EOF on error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fputc(), fputs(), putc(), putchar(), puts()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89, C99.

BUGS

It is not advisable to mix calls to output functions from the stdio library with low-level calls to write(2) for the file descriptor associated with the same output stream; the results will be undefined and very probably not what you want.

SEE ALSO

write(2), ferror(3), fgets(3), fopen(3), fputwc(3), fputws(3), fseek(3), fwrite(3), putwchar(3), scanf(3), unlocked_stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

343 - Linux cli command Spreadsheet_ParseExcel_Utilitypm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_ParseExcel_Utilitypm and provides detailed information about the command Spreadsheet_ParseExcel_Utilitypm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_ParseExcel_Utilitypm.

NAME 🖥️ Spreadsheet_ParseExcel_Utilitypm 🖥️

Utility functions for Spreadsheet::ParseExcel.

SYNOPSIS

use Spreadsheet::ParseExcel::Utility qw(ExcelFmt ExcelLocaltime LocaltimeExcel); # Convert localtime to Excel time my $datetime = LocaltimeExcel(11, 10, 12, 23, 2, 64); # 1964-3-23 12:10:11 print $datetime, " “; # 23459.5070717593 (Excel date/time format) # Convert Excel Time to localtime my @time = ExcelLocaltime($datetime); print join(”:", @time), " “; # 11:10:12:23:2:64:1:0 # Formatting print ExcelFmt(yyyy-mm-dd, $datetime), " “; # 1964-3-23 print ExcelFmt(m-d-yy, $datetime), " “; # 3-23-64 print ExcelFmt(#,##0, $datetime), " “; # 23,460 print ExcelFmt(#,##0.00, $datetime), " “; # 23,459.51

DESCRIPTION

The Spreadsheet::ParseExcel::Utility module provides utility functions for working with ParseExcel and Excel data.

Functions

Spreadsheet::ParseExcel::Utility can export the following functions:

ExcelFmt ExcelLocaltime LocaltimeExcel col2int int2col sheetRef xls2csv

These functions must be imported implicitly:

# Just one function. use Spreadsheet::ParseExcel::Utility col2int; # More than one. use Spreadsheet::ParseExcel::Utility qw(ExcelFmt ExcelLocaltime LocaltimeExcel);

ExcelFmt($format_string, $number, $is_1904)

Excel stores data such as dates and currency values as numbers. The way these numbers are displayed is controlled by the number format string for the cell. For example a cell with a number format of $#,##0.00 for currency and a value of 1234.567 would be displayed as follows:

$#,##0.00 + 1234.567 = $1,234.57.

The ExcelFmt() function tries to emulate this formatting so that the user can convert raw numbers returned by Spreadsheet::ParseExel to a desired format. For example:

print ExcelFmt($#,##0.00, 1234.567); # $1,234.57.

The syntax of the function is:

my $text = ExcelFmt($format_string, $number, $is_1904);

Where $format_string is an Excel number format string, $number is a real or integer number and is_1904 is an optional flag to indicate that dates should use Excel’s 1904 epoch instead of the default 1900 epoch.

ExcelFmt() is also used internally to convert numbers returned by the Cell::unformatted() method to the formatted value returned by the Cell::value() method:

my $cell = $worksheet->get_cell( 0, 0 ); print $cell->unformatted(), " “; # 1234.567 print $cell->value(), " “; # $1,234.57

The most common usage for ExcelFmt is to convert numbers to dates. Dates and times in Excel are represented by real numbers, for example 1 Jan 2001 12:30 PM is represented by the number 36892.521. The integer part of the number stores the number of days since the epoch and the fractional part stores the percentage of the day. By applying an Excel number format the number is converted to the desired string representation:

print ExcelFmt(d mmm yyyy h:mm AM/PM, 36892.521); # 1 Jan 2001 12:30 PM

$is_1904 is an optional flag to indicate that dates should use Excel’s 1904 epoch instead of the default 1900 epoch. Excel for Windows generally uses 1900 and Excel for Mac OS uses 1904. The $is1904 flag isn’t required very often by a casual user and can usually be ignored.

ExcelLocaltime($excel_datetime, $is_1904)

The ExcelLocaltime() function converts from an Excel date/time number to a localtime()-like array of values:

my @time = ExcelLocaltime($excel_datetime); # 0 1 2 3 4 5 6 7 my ( $sec, $min, $hour, $day, $month, $year, $wday, $msec ) = @time;

The array elements from (0 .. 6) are the same as Perl’s localtime(). The last element $msec is milliseconds. In particular it should be noted that, in common with localtime(), the month is zero indexed and the year is the number of years since 1900. This means that you will usually need to do the following:

$month++; $year += 1900;

See also Perl’s documentation for localtime():

The $is_1904 flag is an optional. It is used to indicate that dates should use Excel’s 1904 epoch instead of the default 1900 epoch.

LocaltimeExcel($sec, $min, $hour, $day, $month, $year, $wday, $msec, $is_1904)

The LocaltimeExcel() function converts from a localtime()-like array of values to an Excel date/time number:

$excel_datetime = LocaltimeExcel($sec, $min, $hour, $day, $month, $year, $wday, $msec);

The array elements from (0 .. 6) are the same as Perl’s localtime(). The last element $msec is milliseconds. In particular it should be noted that, in common with localtime(), the month is zero indexed and the year is the number of years since 1900. See also Perl’s documentation for localtime():

The $wday and $msec elements are usually optional. This time elements can also be zeroed if they aren’t of interest:

# sec, min, hour, day, month, year $excel_datetime = LocaltimeExcel( 0, 0, 0, 1, 0, 101 ); print ExcelFmt(d mmm yyyy, $excel_datetime); # 1 Jan 2001

The $is_1904 flag is also optional. It is used to indicate that dates should use Excel’s 1904 epoch instead of the default 1900 epoch.

col2int($column)

The col2int() function converts an Excel column letter to an zero-indexed column number:

print col2int(A); # 0 print col2int(AA); # 26

This function was contributed by Kevin Mulholland.

int2col($column_number)

The int2col() function converts an zero-indexed Excel column number to a column letter:

print int2col(0); # A print int2col(26); # AA

This function was contributed by Kevin Mulholland.

sheetRef($cell_string)

The sheetRef() function converts an Excel cell reference in ‘A1’ notation to a zero-indexed (row, col) pair.

my ($row, $col) = sheetRef(A1); # ( 0, 0 ) my ($row, $col) = sheetRef(C2); # ( 1, 2 )

This function was contributed by Kevin Mulholland.

xls2csv($filename, $region, $rotate)

The xls2csv() function converts a section of an Excel file into a CSV text string.

$csv_text = xls2csv($filename, $region, $rotate);

Where:

$region = “sheet-colrow:colrow” For example 1-A1:B2 means A1:B2 for sheet 1. and $rotate = 0 or 1 (output is rotated/transposed or not)

This function requires Text::CSV_XS to be installed. It was contributed by Kevin Mulholland along with the xls2csv script in the sample directory of the distro.

See also the following xls2csv utilities: Ken Prows’ xls2csv: http://search.cpan.org/~ken/xls2csv/script/xls2csv and H.Merijn Brand’s xls2csv (which is part of Spreadsheet::Read): http://search.cpan.org/~hmbrand/Spreadsheet-Read/

AUTHOR

Current maintainer 0.60+: Douglas Wilson [email protected]

Maintainer 0.40-0.59: John McNamara [email protected]

Maintainer 0.27-0.33: Gabor Szabo [email protected]

Original author: Kawai Takanori [email protected]

COPYRIGHT

Copyright (c) 2014 Douglas Wilson

Copyright (c) 2009-2013 John McNamara

Copyright (c) 2006-2008 Gabor Szabo

Copyright (c) 2000-2006 Kawai Takanori

All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

344 - Linux cli command siginterrupt

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command siginterrupt and provides detailed information about the command siginterrupt, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the siginterrupt.

NAME 🖥️ siginterrupt 🖥️

allow signals to interrupt system calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
[[deprecated]] int siginterrupt(int sig, int flag);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

siginterrupt():

    _XOPEN_SOURCE >= 500
        || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L
        || /* glibc <= 2.19: */ _BSD_SOURCE

DESCRIPTION

The siginterrupt() function changes the restart behavior when a system call is interrupted by the signal sig. If the flag argument is false (0), then system calls will be restarted if interrupted by the specified signal sig. This is the default behavior in Linux.

If the flag argument is true (1) and no data has been transferred, then a system call interrupted by the signal sig will return -1 and errno will be set to EINTR.

If the flag argument is true (1) and data transfer has started, then the system call will be interrupted and will return the actual amount of data transferred.

RETURN VALUE

The siginterrupt() function returns 0 on success. It returns -1 if the signal number sig is invalid, with errno set to indicate the error.

ERRORS

EINVAL
The specified signal number is invalid.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

siginterrupt()

Thread safety

MT-Unsafe const:sigintr

STANDARDS

POSIX.1-2008.

HISTORY

4.3BSD, POSIX.1-2001. Obsolete in POSIX.1-2008, recommending the use of sigaction(2) with the SA_RESTART flag instead.

SEE ALSO

signal(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

345 - Linux cli command Sub_Namepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Sub_Namepm and provides detailed information about the command Sub_Namepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Sub_Namepm.

NAME 🖥️ Sub_Namepm 🖥️

(Re)name a sub

VERSION

version 0.27

SYNOPSIS

use Sub::Name; subname $name, $subref; $subref = subname foo => sub { … };

DESCRIPTION

This module has only one function, which is also exported by default:

subname NAME, CODEREF

Assigns a new name to referenced sub. If package specification is omitted in the name, then the current package is used. The return value is the sub.

The name is only used for informative routines (caller, Carp, etc). You won’t be able to actually invoke the sub by the given name. To allow that, you need to do glob-assignment yourself.

Note that for anonymous closures (subs that reference lexicals declared outside the sub itself) you can name each instance of the closure differently, which can be very useful for debugging.

SEE ALSO

  • Sub::Identify - for getting information about subs

  • Sub::Util - set_subname is another implementation of subname

SUPPORT

Bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=Sub-Name> (or [email protected] <mailto:[email protected]>).

There is also an irc channel available for users of this distribution, at #toolchain on irc.perl.org <irc://irc.perl.org/#toolchain>.

AUTHOR

Matthijs van Duin <[email protected]>

CONTRIBUTORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2004, 2008 by Matthijs van Duin, all rights reserved; copyright (c) 2014 cPanel Inc., all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

346 - Linux cli command pututline

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pututline and provides detailed information about the command pututline, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pututline.

NAME 🖥️ pututline 🖥️

access utmp file entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <utmp.h>
struct utmp *getutent(void);
struct utmp *getutid(const struct utmp *ut);
struct utmp *getutline(const struct utmp *ut);
struct utmp *pututline(const struct utmp *ut);
void setutent(void);
void endutent(void);
int utmpname(const char *file);

DESCRIPTION

New applications should use the POSIX.1-specified “utmpx” versions of these functions; see STANDARDS.

utmpname() sets the name of the utmp-format file for the other utmp functions to access. If utmpname() is not used to set the filename before the other functions are used, they assume _PATH_UTMP, as defined in <paths.h>.

setutent() rewinds the file pointer to the beginning of the utmp file. It is generally a good idea to call it before any of the other functions.

endutent() closes the utmp file. It should be called when the user code is done accessing the file with the other functions.

getutent() reads a line from the current file position in the utmp file. It returns a pointer to a structure containing the fields of the line. The definition of this structure is shown in utmp(5).

getutid() searches forward from the current file position in the utmp file based upon ut. If ut->ut_type is one of RUN_LVL, BOOT_TIME, NEW_TIME, or OLD_TIME, getutid() will find the first entry whose ut_type field matches ut->ut_type. If ut->ut_type is one of INIT_PROCESS, LOGIN_PROCESS, USER_PROCESS, or DEAD_PROCESS, getutid() will find the first entry whose ut_id field matches ut->ut_id.

getutline() searches forward from the current file position in the utmp file. It scans entries whose ut_type is USER_PROCESS or LOGIN_PROCESS and returns the first one whose ut_line field matches ut->ut_line.

pututline() writes the utmp structure ut into the utmp file. It uses getutid() to search for the proper place in the file to insert the new entry. If it cannot find an appropriate slot for ut, pututline() will append the new entry to the end of the file.

RETURN VALUE

getutent(), getutid(), and getutline() return a pointer to a struct utmp on success, and NULL on failure (which includes the “record not found” case). This struct utmp is allocated in static storage, and may be overwritten by subsequent calls.

On success pututline() returns ut; on failure, it returns NULL.

utmpname() returns 0 if the new name was successfully stored, or -1 on failure.

On failure, these functions errno set to indicate the error.

ERRORS

ENOMEM
Out of memory.

ESRCH
Record not found.

setutent(), pututline(), and the getut*() functions can also fail for the reasons described in open(2).

FILES

/var/run/utmp
database of currently logged-in users

/var/log/wtmp
database of past user logins

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getutent()

Thread safety

MT-Unsafe init race:utent race:utentbuf sig:ALRM timer

getutid(), getutline()

Thread safety

MT-Unsafe init race:utent sig:ALRM timer

pututline()

Thread safety

MT-Unsafe race:utent sig:ALRM timer

setutent(), endutent(), utmpname()

Thread safetyMT-Unsafe race:utent

In the above table, utent in race:utent signifies that if any of the functions setutent(), getutent(), getutid(), getutline(), pututline(), utmpname(), or endutent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

None.

HISTORY

XPG2, SVr4.

In XPG2 and SVID 2 the function pututline() is documented to return void, and that is what it does on many systems (AIX, HP-UX). HP-UX introduces a new function _pututline() with the prototype given above for pututline().

All these functions are obsolete now on non-Linux systems. POSIX.1-2001 and POSIX.1-2008, following SUSv1, does not have any of these functions, but instead uses

#include <utmpx.h> struct utmpx *getutxent(void); struct utmpx *getutxid(const struct utmpx *); struct utmpx *getutxline(const struct utmpx *); struct utmpx *pututxline(const struct utmpx *); void setutxent(void); void endutxent(void);

These functions are provided by glibc, and perform the same task as their equivalents without the “x”, but use struct utmpx, defined on Linux to be the same as struct utmp. For completeness, glibc also provides utmpxname(), although this function is not specified by POSIX.1.

On some other systems, the utmpx structure is a superset of the utmp structure, with additional fields, and larger versions of the existing fields, and parallel files are maintained, often /var/*/utmpx and /var/*/wtmpx.

Linux glibc on the other hand does not use a parallel utmpx file since its utmp structure is already large enough. The “x” functions listed above are just aliases for their counterparts without the “x” (e.g., getutxent() is an alias for getutent()).

NOTES

glibc notes

The above functions are not thread-safe. glibc adds reentrant versions

#include <utmp.h>
int getutent_r(struct utmp *ubuf, struct utmp **ubufp);
int getutid_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);
int getutline_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getutent_r(), getutid_r(), getutline_r():

    _GNU_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */    _SVID_SOURCE || _BSD_SOURCE

These functions are GNU extensions, analogs of the functions of the same name without the _r suffix. The ubuf argument gives these functions a place to store their result. On success, they return 0, and a pointer to the result is written in *ubufp. On error, these functions return -1. There are no utmpx equivalents of the above functions. (POSIX.1 does not specify such functions.)

EXAMPLES

The following example adds and removes a utmp record, assuming it is run from within a pseudo terminal. For usage in a real application, you should check the return values of getpwuid(3) and ttyname(3).

#include <pwd.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <utmp.h>
int
main(void)
{
    struct utmp entry;
    system("echo before adding entry:;who");
    entry.ut_type = USER_PROCESS;
    entry.ut_pid = getpid();
    strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen("/dev/"));
    /* only correct for ptys named /dev/tty[pqr][0-9a-z] */
    strcpy(entry.ut_id, ttyname(STDIN_FILENO) + strlen("/dev/tty"));
    entry.ut_time = time(NULL);
    strcpy(entry.ut_user, getpwuid(getuid())->pw_name);
    memset(entry.ut_host, 0, UT_HOSTSIZE);
    entry.ut_addr = 0;
    setutent();
    pututline(&entry);
    system("echo after adding entry:;who");
    entry.ut_type = DEAD_PROCESS;
    memset(entry.ut_line, 0, UT_LINESIZE);
    entry.ut_time = 0;
    memset(entry.ut_user, 0, UT_NAMESIZE);
    setutent();
    pututline(&entry);
    system("echo after removing entry:;who");
    endutent();
    exit(EXIT_SUCCESS);
}

SEE ALSO

getutmp(3), utmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

347 - Linux cli command getutxid

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getutxid and provides detailed information about the command getutxid, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getutxid.

NAME 🖥️ getutxid 🖥️

access utmp file entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <utmp.h>
struct utmp *getutent(void);
struct utmp *getutid(const struct utmp *ut);
struct utmp *getutline(const struct utmp *ut);
struct utmp *pututline(const struct utmp *ut);
void setutent(void);
void endutent(void);
int utmpname(const char *file);

DESCRIPTION

New applications should use the POSIX.1-specified “utmpx” versions of these functions; see STANDARDS.

utmpname() sets the name of the utmp-format file for the other utmp functions to access. If utmpname() is not used to set the filename before the other functions are used, they assume _PATH_UTMP, as defined in <paths.h>.

setutent() rewinds the file pointer to the beginning of the utmp file. It is generally a good idea to call it before any of the other functions.

endutent() closes the utmp file. It should be called when the user code is done accessing the file with the other functions.

getutent() reads a line from the current file position in the utmp file. It returns a pointer to a structure containing the fields of the line. The definition of this structure is shown in utmp(5).

getutid() searches forward from the current file position in the utmp file based upon ut. If ut->ut_type is one of RUN_LVL, BOOT_TIME, NEW_TIME, or OLD_TIME, getutid() will find the first entry whose ut_type field matches ut->ut_type. If ut->ut_type is one of INIT_PROCESS, LOGIN_PROCESS, USER_PROCESS, or DEAD_PROCESS, getutid() will find the first entry whose ut_id field matches ut->ut_id.

getutline() searches forward from the current file position in the utmp file. It scans entries whose ut_type is USER_PROCESS or LOGIN_PROCESS and returns the first one whose ut_line field matches ut->ut_line.

pututline() writes the utmp structure ut into the utmp file. It uses getutid() to search for the proper place in the file to insert the new entry. If it cannot find an appropriate slot for ut, pututline() will append the new entry to the end of the file.

RETURN VALUE

getutent(), getutid(), and getutline() return a pointer to a struct utmp on success, and NULL on failure (which includes the “record not found” case). This struct utmp is allocated in static storage, and may be overwritten by subsequent calls.

On success pututline() returns ut; on failure, it returns NULL.

utmpname() returns 0 if the new name was successfully stored, or -1 on failure.

On failure, these functions errno set to indicate the error.

ERRORS

ENOMEM
Out of memory.

ESRCH
Record not found.

setutent(), pututline(), and the getut*() functions can also fail for the reasons described in open(2).

FILES

/var/run/utmp
database of currently logged-in users

/var/log/wtmp
database of past user logins

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getutent()

Thread safety

MT-Unsafe init race:utent race:utentbuf sig:ALRM timer

getutid(), getutline()

Thread safety

MT-Unsafe init race:utent sig:ALRM timer

pututline()

Thread safety

MT-Unsafe race:utent sig:ALRM timer

setutent(), endutent(), utmpname()

Thread safetyMT-Unsafe race:utent

In the above table, utent in race:utent signifies that if any of the functions setutent(), getutent(), getutid(), getutline(), pututline(), utmpname(), or endutent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

None.

HISTORY

XPG2, SVr4.

In XPG2 and SVID 2 the function pututline() is documented to return void, and that is what it does on many systems (AIX, HP-UX). HP-UX introduces a new function _pututline() with the prototype given above for pututline().

All these functions are obsolete now on non-Linux systems. POSIX.1-2001 and POSIX.1-2008, following SUSv1, does not have any of these functions, but instead uses

#include <utmpx.h> struct utmpx *getutxent(void); struct utmpx *getutxid(const struct utmpx *); struct utmpx *getutxline(const struct utmpx *); struct utmpx *pututxline(const struct utmpx *); void setutxent(void); void endutxent(void);

These functions are provided by glibc, and perform the same task as their equivalents without the “x”, but use struct utmpx, defined on Linux to be the same as struct utmp. For completeness, glibc also provides utmpxname(), although this function is not specified by POSIX.1.

On some other systems, the utmpx structure is a superset of the utmp structure, with additional fields, and larger versions of the existing fields, and parallel files are maintained, often /var/*/utmpx and /var/*/wtmpx.

Linux glibc on the other hand does not use a parallel utmpx file since its utmp structure is already large enough. The “x” functions listed above are just aliases for their counterparts without the “x” (e.g., getutxent() is an alias for getutent()).

NOTES

glibc notes

The above functions are not thread-safe. glibc adds reentrant versions

#include <utmp.h>
int getutent_r(struct utmp *ubuf, struct utmp **ubufp);
int getutid_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);
int getutline_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getutent_r(), getutid_r(), getutline_r():

    _GNU_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */    _SVID_SOURCE || _BSD_SOURCE

These functions are GNU extensions, analogs of the functions of the same name without the _r suffix. The ubuf argument gives these functions a place to store their result. On success, they return 0, and a pointer to the result is written in *ubufp. On error, these functions return -1. There are no utmpx equivalents of the above functions. (POSIX.1 does not specify such functions.)

EXAMPLES

The following example adds and removes a utmp record, assuming it is run from within a pseudo terminal. For usage in a real application, you should check the return values of getpwuid(3) and ttyname(3).

#include <pwd.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <utmp.h>
int
main(void)
{
    struct utmp entry;
    system("echo before adding entry:;who");
    entry.ut_type = USER_PROCESS;
    entry.ut_pid = getpid();
    strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen("/dev/"));
    /* only correct for ptys named /dev/tty[pqr][0-9a-z] */
    strcpy(entry.ut_id, ttyname(STDIN_FILENO) + strlen("/dev/tty"));
    entry.ut_time = time(NULL);
    strcpy(entry.ut_user, getpwuid(getuid())->pw_name);
    memset(entry.ut_host, 0, UT_HOSTSIZE);
    entry.ut_addr = 0;
    setutent();
    pututline(&entry);
    system("echo after adding entry:;who");
    entry.ut_type = DEAD_PROCESS;
    memset(entry.ut_line, 0, UT_LINESIZE);
    entry.ut_time = 0;
    memset(entry.ut_user, 0, UT_NAMESIZE);
    setutent();
    pututline(&entry);
    system("echo after removing entry:;who");
    endutent();
    exit(EXIT_SUCCESS);
}

SEE ALSO

getutmp(3), utmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

348 - Linux cli command Regexp_Commonpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Commonpm and provides detailed information about the command Regexp_Commonpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Commonpm.

NAME 🖥️ Regexp_Commonpm 🖥️

Provide commonly requested regular expressions

SYNOPSIS

# STANDARD USAGE use Regexp::Common; while (<>) { /$RE{num}{real}/ and print q{a number}; /$RE{quoted}/ and print q{a ["`] quoted string}; m[$RE{delimited}{-delim=>/}] and print q{a /…/ sequence}; /$RE{balanced}{-parens=>()}/ and print q{balanced parentheses}; /$RE{profanity}/ and print q{a #*@%-ing word}; } # SUBROUTINE-BASED INTERFACE use Regexp::Common RE_ALL; while (<>) { $_ =~ RE_num_real() and print q{a number}; $_ =~ RE_quoted() and print q{a ["`] quoted string}; $_ =~ RE_delimited(-delim=>/) and print q{a /…/ sequence}; $_ =~ RE_balanced(-parens=>()} and print q{balanced parentheses}; $_ =~ RE_profanity() and print q{a #*@%-ing word}; } # IN-LINE MATCHING… if ( $RE{num}{int}->matches($text) ) {…} # …AND SUBSTITUTION my $cropped = $RE{ws}{crop}->subs($uncropped); # ROLL-YOUR-OWN PATTERNS use Regexp::Common pattern; pattern name => [name, mine], create => (?i:J[.]?\s+A[.]?\s+Perl-Hacker), ; my $name_matcher = $RE{name}{mine}; pattern name => [ lineof, -char=_ ], create => sub { my $flags = shift; my $char = quotemeta $flags->{-char}; return (?:^$char+$); }, match => sub { my ($self, $str) = @_; return $str !~ /[^$self->{flags}{-char}]/; }, subs => sub { my ($self, $str, $replacement) = @_; $_[1] =~ s/^$self->{flags}{-char}+$//g; }, ; my $asterisks = $RE{lineof}{-char=>*}; # DECIDING WHICH PATTERNS TO LOAD. use Regexp::Common qw /comment number/; # Comment and number patterns. use Regexp::Common qw /no_defaults/; # Dont load any patterns. use Regexp::Common qw /!delimited/; # All, but delimited patterns.

DESCRIPTION

By default, this module exports a single hash (%RE) that stores or generates commonly needed regular expressions (see “List of available patterns”).

There is an alternative, subroutine-based syntax described in “Subroutine-based interface”.

General syntax for requesting patterns

To access a particular pattern, %RE is treated as a hierarchical hash of hashes (of hashes…), with each successive key being an identifier. For example, to access the pattern that matches real numbers, you specify:

$RE{num}{real}

and to access the pattern that matches integers:

$RE{num}{int}

Deeper layers of the hash are used to specify flags: arguments that modify the resulting pattern in some way. The keys used to access these layers are prefixed with a minus sign and may have a value; if a value is given, it’s done by using a multidimensional key. For example, to access the pattern that matches base-2 real numbers with embedded commas separating groups of three digits (e.g. 10,101,110.110101101):

$RE{num}{real}{-base => 2}{-sep => ,}{-group => 3}

Through the magic of Perl, these flag layers may be specified in any order (and even interspersed through the identifier keys!) so you could get the same pattern with:

$RE{num}{real}{-sep => ,}{-group => 3}{-base => 2}

or:

$RE{num}{-base => 2}{real}{-group => 3}{-sep => ,}

or even:

$RE{-base => 2}{-group => 3}{-sep => ,}{num}{real}

etc.

Note, however, that the relative order of amongst the identifier keys is significant. That is:

$RE{list}{set}

would not be the same as:

$RE{set}{list}

Flag syntax

In versions prior to 2.113, flags could also be written as {"-flag=value"}. This no longer works, although {"-flag$;value"} still does. However, {-flag => value} is the preferred syntax.

Universal flags

Normally, flags are specific to a single pattern. However, there is two flags that all patterns may specify.

“-keep”
By default, the patterns provided by %RE contain no capturing parentheses. However, if the -keep flag is specified (it requires no value) then any significant substrings that the pattern matches are captured. For example: if ($str =~ $RE{num}{real}{-keep}) { $number = $1; $whole = $3; $decimals = $5; } Special care is needed if a “kept” pattern is interpolated into a larger regular expression, as the presence of other capturing parentheses is likely to change the “number variables” into which significant substrings are saved. See also “Adding new regular expressions”, which describes how to create new patterns with “optional” capturing brackets that respond to -keep.

“-i”
Some patterns or subpatterns only match lowercase or uppercase letters. If one wants the do case insensitive matching, one option is to use the /i regexp modifier, or the special sequence (?i). But if the functional interface is used, one does not have this option. The -i switch solves this problem; by using it, the pattern will do case insensitive matching.

OO interface and inline matching/substitution

The patterns returned from %RE are objects, so rather than writing:

if ($str =~ /$RE{some}{pattern}/ ) {…}

you can write:

if ( $RE{some}{pattern}->matches($str) ) {…}

For matching this would seem to have no great advantage apart from readability (but see below).

For substitutions, it has other significant benefits. Frequently you want to perform a substitution on a string without changing the original. Most people use this:

$changed = $original; $changed =~ s/$RE{some}{pattern}/$replacement/;

The more adept use:

($changed = $original) =~ s/$RE{some}{pattern}/$replacement/;

Regexp::Common allows you do write this:

$changed = $RE{some}{pattern}->subs($original=>$replacement);

Apart from reducing precedence-angst, this approach has the added advantages that the substitution behaviour can be optimized from the regular expression, and the replacement string can be provided by default (see “Adding new regular expressions”).

For example, in the implementation of this substitution:

$cropped = $RE{ws}{crop}->subs($uncropped);

the default empty string is provided automatically, and the substitution is optimized to use:

$uncropped =~ s/^\s+//; $uncropped =~ s/\s+$//;

rather than:

$uncropped =~ s/^\s+|\s+$//g;

Subroutine-based interface

The hash-based interface was chosen because it allows regexes to be effortlessly interpolated, and because it also allows them to be “curried”. For example:

my $num = $RE{num}{int}; my $commad = $num->{-sep=>,}{-group=>3}; my $duodecimal = $num->{-base=>12};

However, the use of tied hashes does make the access to Regexp::Common patterns slower than it might otherwise be. In contexts where impatience overrules laziness, Regexp::Common provides an additional subroutine-based interface.

For each (sub-)entry in the %RE hash ($RE{key1}{key2}{etc}), there is a corresponding exportable subroutine: RE_key1_key2_etc(). The name of each subroutine is the underscore-separated concatenation of the non-flag keys that locate the same pattern in %RE. Flags are passed to the subroutine in its argument list. Thus:

use Regexp::Common qw( RE_ws_crop RE_num_real RE_profanity ); $str =~ RE_ws_crop() and die “Surrounded by whitespace”; $str =~ RE_num_real(-base=>8, -sep=>" “) or next; $offensive = RE_profanity(-keep); $str =~ s/$offensive/$bad{$1}++; “<expletive deleted>"/ge;

Note that, unlike the hash-based interface (which returns objects), these subroutines return ordinary qr’d regular expressions. Hence they do not curry, nor do they provide the OO match and substitution inlining described in the previous section.

It is also possible to export subroutines for all available patterns like so:

use Regexp::Common RE_ALL;

Or you can export all subroutines with a common prefix of keys like so:

use Regexp::Common RE_num_ALL;

which will export RE_num_int and RE_num_real (and if you have create more patterns who have first key num, those will be exported as well). In general, RE_key1_…_keyn_ALL will export all subroutines whose pattern names have first keys key1keyn.

Adding new regular expressions

You can add your own regular expressions to the %RE hash at run-time, using the exportable pattern subroutine. It expects a hash-like list of key/value pairs that specify the behaviour of the pattern. The various possible argument pairs are:

“name => [ @list ]”
A required argument that specifies the name of the pattern, and any flags it may take, via a reference to a list of strings. For example: pattern name => [qw( line of -char )], # other args here ; This specifies an entry $RE{line}{of}, which may take a -char flag. Flags may also be specified with a default value, which is then used whenever the flag is specified without an explicit value (but not when the flag is omitted). For example: pattern name => [qw( line of -char=_ )], # default char is _ # other args here ;

“create => $sub_ref_or_string”
A required argument that specifies either a string that is to be returned as the pattern: pattern name => [qw( line of underscores )], create => q/(?:^_+$)/ ; or a reference to a subroutine that will be called to create the pattern: pattern name => [qw( line of -char=_ )], create => sub { my ($self, $flags) = @_; my $char = quotemeta $flags->{-char}; return (?:^$char+$); }, ; If the subroutine version is used, the subroutine will be called with three arguments: a reference to the pattern object itself, a reference to a hash containing the flags and their values, and a reference to an array containing the non-flag keys. Whatever the subroutine returns is stringified as the pattern. No matter how the pattern is created, it is immediately postprocessed to include or exclude capturing parentheses (according to the value of the -keep flag). To specify such “optional” capturing parentheses within the regular expression associated with create, use the notation (?k:...). Any parentheses of this type will be converted to (...) when the -keep flag is specified, or (?:...) when it is not. It is a Regexp::Common convention that the outermost capturing parentheses always capture the entire pattern, but this is not enforced.

“match => $sub_ref”
An optional argument that specifies a subroutine that is to be called when the $RE{...}->matches(...) method of this pattern is invoked. The subroutine should expect two arguments: a reference to the pattern object itself, and the string to be matched against. It should return the same types of values as a m/.../ does. pattern name => [qw( line of -char )], create => sub {…}, match => sub { my ($self, $str) = @_; $str !~ /[^$self->{flags}{-char}]/; }, ;

“subs => $sub_ref”
An optional argument that specifies a subroutine that is to be called when the $RE{...}->subs(...) method of this pattern is invoked. The subroutine should expect three arguments: a reference to the pattern object itself, the string to be changed, and the value to be substituted into it. The third argument may be undef, indicating the default substitution is required. The subroutine should return the same types of values as an s/.../.../ does. For example: pattern name => [ lineof, -char=_ ], create => sub {…}, subs => sub { my ($self, $str, $ignore_replacement) = @_; $_[1] =~ s/^$self->{flags}{-char}+$//g; }, ; Note that such a subroutine will almost always need to modify $_[1] directly.

“version => $minimum_perl_version”
If this argument is given, it specifies the minimum version of perl required to use the new pattern. Attempts to use the pattern with earlier versions of perl will generate a fatal diagnostic.

Loading specific sets of patterns.

By default, all the sets of patterns listed below are made available. However, it is possible to indicate which sets of patterns should be made available - the wanted sets should be given as arguments to use. Alternatively, it is also possible to indicate which sets of patterns should not be made available - those sets will be given as argument to the use statement, but are preceded with an exclaimation mark. The argument no_defaults indicates none of the default patterns should be made available. This is useful for instance if all you want is the pattern() subroutine.

Examples:

use Regexp::Common qw /comment number/; # Comment and number patterns. use Regexp::Common qw /no_defaults/; # Dont load any patterns. use Regexp::Common qw /!delimited/; # All, but delimited patterns.

It’s also possible to load your own set of patterns. If you have a module Regexp::Common::my_patterns that makes patterns available, you can have it made available with

use Regexp::Common qw /my_patterns/;

Note that the default patterns will still be made available - only if you use no_defaults, or mention one of the default sets explicitly, the non mentioned defaults aren’t made available.

List of available patterns

The patterns listed below are currently available. Each set of patterns has its own manual page describing the details. For each pattern set named name, the manual page Regexp::Common::name describes the details.

Currently available are:

Regexp::Common::balanced
Provides regexes for strings with balanced parenthesized delimiters.

Regexp::Common::comment
Provides regexes for comments of various languages (43 languages currently).

Regexp::Common::delimited
Provides regexes for delimited strings.

Regexp::Common::lingua
Provides regexes for palindromes.

Regexp::Common::list
Provides regexes for lists.

Regexp::Common::net
Provides regexes for IPv4, IPv6, and MAC addresses.

Regexp::Common::number
Provides regexes for numbers (integers and reals).

Regexp::Common::profanity
Provides regexes for profanity.

Regexp::Common::whitespace
Provides regexes for leading and trailing whitespace.

Regexp::Common::zip
Provides regexes for zip codes.

Forthcoming patterns and features

Future releases of the module will also provide patterns for the following:

* email addresses * HTML/XML tags * more numerical matchers, * mail headers (including multiline ones), * more URLS * telephone numbers of various countries * currency (universal 3 letter format, Latin-1, currency names) * dates * binary formats (e.g. UUencoded, MIMEd)

If you have other patterns or pattern generators that you think would be generally useful, please send them to the maintainer – preferably as source code using the pattern subroutine. Submissions that include a set of tests will be especially welcome.

DIAGNOSTICS

“Cant export unknown subroutine %s”
The subroutine-based interface didn’t recognize the requested subroutine. Often caused by a spelling mistake or an incompletely specified name.

“Cant create unknown regex: $RE{…}”
Regexp::Common doesn’t have a generator for the requested pattern. Often indicates a misspelt or missing parameter.

“Perl %f does not support the pattern $RE{…}. You need Perl %f or later”
The requested pattern requires advanced regex features (e.g. recursion) that not available in your version of Perl. Time to upgrade.

“pattern() requires argument: name => [ @list ]”
Every user-defined pattern specification must have a name.

“pattern() requires argument: create => $sub_ref_or_string”
Every user-defined pattern specification must provide a pattern creation mechanism: either a pattern string or a reference to a subroutine that returns the pattern string.

“Base must be between 1 and 36”
The $RE{num}{real}{-base=>N} pattern uses the characters [0-9A-Z] to represent the digits of various bases. Hence it only produces regular expressions for bases up to hexatricensimal.

“Must specify delimiter in $RE{delimited}”
The pattern has no default delimiter. You need to write: $RE{delimited}{-delim=>X} for some character X

ACKNOWLEDGEMENTS

Deepest thanks to the many people who have encouraged and contributed to this project, especially: Elijah, Jarkko, Tom, Nat, Ed, and Vivek.

Further thanks go to: Alexandr Ciornii, Blair Zajac, Bob Stockdale, Charles Thomas, Chris Vertonghen, the CPAN Testers, David Hand, Fany, Geoffrey Leach, Hermann-Marcus Behrens, Jerome Quelin, Jim Cromie, Lars Wilke, Linda Julien, Mike Arms, Mike Castle, Mikko, Murat Uenalan, Rafaël Garcia-Suarez, Ron Savage, Sam Vilain, Slaven Rezic, Smylers, Tim Maher, and all the others I’ve forgotten.

AUTHOR

Damian Conway ([email protected])

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

For a start, there are many common regexes missing. Send them in to [email protected].

There are some POD issues when installing this module using a pre-5.6.0 perl; some manual pages may not install, or may not install correctly using a perl that is that old. You might consider upgrading your perl.

NOT A BUG

  • The various patterns are not anchored. That is, a pattern like $RE {num} {int} will match against “abc4def”, because a substring of the subject matches. This is by design, and not a bug. If you want the pattern to be anchored, use something like: my $integer = $RE {num} {int}; $subj =~ /^$integer$/ and print “Matches! “;

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

349 - Linux cli command nearbyint

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command nearbyint and provides detailed information about the command nearbyint, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the nearbyint.

NAME 🖥️ nearbyint 🖥️

round to nearest integer

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double nearbyint(double x);
float nearbyintf(float x);
long double nearbyintl(long double x);
double rint(double x);
float rintf(float x);
long double rintl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

nearbyint(), nearbyintf(), nearbyintl():

    _POSIX_C_SOURCE >= 200112L || _ISOC99_SOURCE

rint():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

rintf(), rintl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The nearbyint(), nearbyintf(), and nearbyintl() functions round their argument to an integer value in floating-point format, using the current rounding direction (see fesetround(3)) and without raising the inexact exception. When the current rounding direction is to nearest, these functions round halfway cases to the even integer in accordance with IEEE-754.

The rint(), rintf(), and rintl() functions do the same, but will raise the inexact exception (FE_INEXACT, checkable via fetestexcept(3)) when the result differs in value from the argument.

RETURN VALUE

These functions return the rounded integer value.

If x is integral, +0, -0, NaN, or infinite, x itself is returned.

ERRORS

No errors occur. POSIX.1-2001 documents a range error for overflows, but see NOTES.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

nearbyint(), nearbyintf(), nearbyintl(), rint(), rintf(), rintl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

NOTES

SUSv2 and POSIX.1-2001 contain text about overflow (which might set errno to ERANGE, or raise an FE_OVERFLOW exception). In practice, the result cannot overflow on any current machine, so this error-handling stuff is just nonsense. (More precisely, overflow can happen only when the maximum value of the exponent is smaller than the number of mantissa bits. For the IEEE-754 standard 32-bit and 64-bit floating-point numbers the maximum value of the exponent is 127 (respectively, 1023), and the number of mantissa bits including the implicit bit is 24 (respectively, 53).)

If you want to store the rounded value in an integer type, you probably want to use one of the functions described in lrint(3) instead.

SEE ALSO

ceil(3), floor(3), lrint(3), round(3), trunc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

350 - Linux cli command Regexp_Common_balancedpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_balancedpm and provides detailed information about the command Regexp_Common_balancedpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_balancedpm.

NAME 🖥️ Regexp_Common_balancedpm 🖥️

  • provide regexes for strings with balanced parenthesized delimiters or arbitrary delimiters.

SYNOPSIS

use Regexp::Common qw /balanced/; while (<>) { /$RE{balanced}{-parens=>()}/ and print q{balanced parentheses }; }

DESCRIPTION

Please consult the manual of Regexp::Common for a general description of the works of this interface.

Do not use this module directly, but load it via Regexp::Common.

“$RE{balanced}{-parens}”

Returns a pattern that matches a string that starts with the nominated opening parenthesis or bracket, contains characters and properly nested parenthesized subsequences, and ends in the matching parenthesis.

More than one type of parenthesis can be specified:

$RE{balanced}{-parens=>(){}}

in which case all specified parenthesis types must be correctly balanced within the string.

Since version 2013030901, $1 will always be set (to the entire matched substring), regardless whether {-keep} is used or not.

“$RE{balanced}{-begin => “begin”}{-end => “end”}”

Returns a pattern that matches a string that is properly balanced using the begin and end strings as start and end delimiters. Multiple sets of begin and end strings can be given by separating them by |s (which can be escaped with a backslash).

qr/$RE{balanced}{-begin => “do|if|case”}{-end => “done|fi|esac”}/

will match properly balanced strings that either start with do and end with done, start with if and end with fi, or start with case and end with esac.

If -end contains less cases than -begin, the last case of -end is repeated. If it contains more cases than -begin, the extra cases are ignored. If either of -begin or -end isn’t given, or is empty, -begin => ‘(’ and -end => ‘)’ are assumed.

Since version 2013030901, $1 will always be set (to the entire matched substring), regardless whether {-keep} is used or not.

Note

Since version 2013030901 the pattern will make of the recursive construct (?-1), instead of using the problematic (??{ }) construct. This fixes an problem that was introduced in the 5.17 development track.

SEE ALSO

Regexp::Common for a general description of how to use this interface.

AUTHOR

Damian Conway ([email protected])

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

For a start, there are many common regexes missing. Send them in to [email protected].

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

351 - Linux cli command Spreadsheet_ParseExcel_FmtJapan2pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_ParseExcel_FmtJapan2pm and provides detailed information about the command Spreadsheet_ParseExcel_FmtJapan2pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_ParseExcel_FmtJapan2pm.

NAME 🖥️ Spreadsheet_ParseExcel_FmtJapan2pm 🖥️

A class for Cell formats.

SYNOPSIS

See the documentation for Spreadsheet::ParseExcel.

DESCRIPTION

This module is used in conjunction with Spreadsheet::ParseExcel. See the documentation for Spreadsheet::ParseExcel.

AUTHOR

Current maintainer 0.60+: Douglas Wilson [email protected]

Maintainer 0.40-0.59: John McNamara [email protected]

Maintainer 0.27-0.33: Gabor Szabo [email protected]

Original author: Kawai Takanori [email protected]

COPYRIGHT

Copyright (c) 2014 Douglas Wilson

Copyright (c) 2009-2013 John McNamara

Copyright (c) 2006-2008 Gabor Szabo

Copyright (c) 2000-2006 Kawai Takanori

All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

352 - Linux cli command wcstombs

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcstombs and provides detailed information about the command wcstombs, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcstombs.

NAME 🖥️ wcstombs 🖥️

convert a wide-character string to a multibyte string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
size_t wcstombs(char dest[restrict .n], const wchar_t *restrict src,
 size_t n);

DESCRIPTION

If dest is not NULL, the wcstombs() function converts the wide-character string src to a multibyte string starting at dest. At most n bytes are written to dest. The sequence of characters placed in dest begins in the initial shift state. The conversion can stop for three reasons:

  • A wide character has been encountered that can not be represented as a multibyte sequence (according to the current locale). In this case, (size_t) -1 is returned.

  • The length limit forces a stop. In this case, the number of bytes written to dest is returned, but the shift state at this point is lost.

  • The wide-character string has been completely converted, including the terminating null wide character (L’�’). In this case, the conversion ends in the initial shift state. The number of bytes written to dest, excluding the terminating null byte (‘�’), is returned.

The programmer must ensure that there is room for at least n bytes at dest.

If dest is NULL, n is ignored, and the conversion proceeds as above, except that the converted bytes are not written out to memory, and no length limit exists.

In order to avoid the case 2 above, the programmer should make sure n is greater than or equal to wcstombs(NULL,src,0)+1.

RETURN VALUE

The wcstombs() function returns the number of bytes that make up the converted part of a multibyte sequence, not including the terminating null byte. If a wide character was encountered which could not be converted, (size_t) -1 is returned.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcstombs()

Thread safetyMT-Safe

VERSIONS

The function wcsrtombs(3) provides a better interface to the same functionality.

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of wcstombs() depends on the LC_CTYPE category of the current locale.

SEE ALSO

mblen(3), mbstowcs(3), mbtowc(3), wcsrtombs(3), wctomb(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

353 - Linux cli command mq_getattr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mq_getattr and provides detailed information about the command mq_getattr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mq_getattr.

NAME 🖥️ mq_getattr 🖥️

get/set message queue attributes

LIBRARY

Real-time library (librt, -lrt)

SYNOPSIS

#include <mqueue.h>
int mq_getattr(mqd_t mqdes, struct mq_attr *attr);
int mq_setattr(mqd_t mqdes, const struct mq_attr *restrict newattr,
 struct mq_attr *restrict oldattr);

DESCRIPTION

mq_getattr() and mq_setattr() respectively retrieve and modify attributes of the message queue referred to by the message queue descriptor mqdes.

mq_getattr() returns an mq_attr structure in the buffer pointed by attr. This structure is defined as:

struct mq_attr {
    long mq_flags;       /* Flags: 0 or O_NONBLOCK */
    long mq_maxmsg;      /* Max. # of messages on queue */
    long mq_msgsize;     /* Max. message size (bytes) */
    long mq_curmsgs;     /* # of messages currently in queue */
};

The mq_flags field contains flags associated with the open message queue description. This field is initialized when the queue is created by mq_open(3). The only flag that can appear in this field is O_NONBLOCK.

The mq_maxmsg and mq_msgsize fields are set when the message queue is created by mq_open(3). The mq_maxmsg field is an upper limit on the number of messages that may be placed on the queue using mq_send(3). The mq_msgsize field is an upper limit on the size of messages that may be placed on the queue. Both of these fields must have a value greater than zero. Two /proc files that place ceilings on the values for these fields are described in mq_overview(7).

The mq_curmsgs field returns the number of messages currently held in the queue.

mq_setattr() sets message queue attributes using information supplied in the mq_attr structure pointed to by newattr. The only attribute that can be modified is the setting of the O_NONBLOCK flag in mq_flags. The other fields in newattr are ignored. If the oldattr field is not NULL, then the buffer that it points to is used to return an mq_attr structure that contains the same information that is returned by mq_getattr().

RETURN VALUE

On success mq_getattr() and mq_setattr() return 0; on error, -1 is returned, with errno set to indicate the error.

ERRORS

EBADF
The message queue descriptor specified in mqdes is invalid.

EINVAL
newattr->mq_flags contained set bits other than O_NONBLOCK.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mq_getattr(), mq_setattr()

Thread safetyMT-Safe

VERSIONS

On Linux, mq_getattr() and mq_setattr() are library functions layered on top of the mq_getsetattr(2) system call.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

EXAMPLES

The program below can be used to show the default mq_maxmsg and mq_msgsize values that are assigned to a message queue that is created with a call to mq_open(3) in which the attr argument is NULL. Here is an example run of the program:

$ ./a.out /testq
Maximum # of messages on queue:   10
Maximum message size:             8192

Since Linux 3.5, the following /proc files (described in mq_overview(7)) can be used to control the defaults:

$ uname -sr
Linux 3.8.0
$ cat /proc/sys/fs/mqueue/msg_default
10
$ cat /proc/sys/fs/mqueue/msgsize_default
8192

Program source

#include <fcntl.h>
#include <mqueue.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <unistd.h>
#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \
                        } while (0)
int
main(int argc, char *argv[])
{
    mqd_t mqd;
    struct mq_attr attr;
    if (argc != 2) {
        fprintf(stderr, "Usage: %s mq-name

“, argv[0]); exit(EXIT_FAILURE); } mqd = mq_open(argv[1], O_CREAT | O_EXCL, 0600, NULL); if (mqd == (mqd_t) -1) errExit(“mq_open”); if (mq_getattr(mqd, &attr) == -1) errExit(“mq_getattr”); printf(“Maximum # of messages on queue: %ld “, attr.mq_maxmsg); printf(“Maximum message size: %ld “, attr.mq_msgsize); if (mq_unlink(argv[1]) == -1) errExit(“mq_unlink”); exit(EXIT_SUCCESS); }

SEE ALSO

mq_close(3), mq_notify(3), mq_open(3), mq_receive(3), mq_send(3), mq_unlink(3), mq_overview(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

354 - Linux cli command xdr_int

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_int and provides detailed information about the command xdr_int, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_int.

NAME 🖥️ xdr_int 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

355 - Linux cli command __setfpucw

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __setfpucw and provides detailed information about the command __setfpucw, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __setfpucw.

NAME 🖥️ __setfpucw 🖥️

set FPU control word on i386 architecture (obsolete)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <i386/fpu_control.h>
[[deprecated]] void __setfpucw(unsigned short control_word);

DESCRIPTION

__setfpucw() transfers control_word to the registers of the FPU (floating-point unit) on the i386 architecture. This was used to control floating-point precision, rounding and floating-point exceptions.

STANDARDS

GNU.

HISTORY

Removed in glibc 2.1.

NOTES

There are new functions from C99, with prototypes in <fenv.h>, to control FPU rounding modes, like fegetround(3), fesetround(3), and the floating-point environment, like fegetenv(3), feholdexcept(3), fesetenv(3), feupdateenv(3), and FPU exception handling, like feclearexcept(3), fegetexceptflag(3), feraiseexcept(3), fesetexceptflag(3), and fetestexcept(3).

If direct access to the FPU control word is still needed, the _FPU_GETCW and _FPU_SETCW macros from <fpu_control.h> can be used.

EXAMPLES

__setfpucw(0x1372)

Set FPU control word on the i386 architecture to

  • extended precision

  • rounding to nearest

  • exceptions on overflow, zero divide and NaN

SEE ALSO

feclearexcept(3)

<fpu_control.h>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

356 - Linux cli command zip_error_set

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_error_set and provides detailed information about the command zip_error_set, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_error_set.

libzip (-lzip)

The

function sets the zip_error pointed to by

to the libzip error code

and the system error code

must be allocated and initialized with

before calling

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

357 - Linux cli command Image_ExifTool_Pentaxpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Pentaxpm and provides detailed information about the command Image_ExifTool_Pentaxpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Pentaxpm.

NAME 🖥️ Image_ExifTool_Pentaxpm 🖥️

Pentax/Asahi maker notes tags

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret Pentax and Asahi maker notes in EXIF information.

NOTES

I couldn’t find a good source for Pentax maker notes information, but I’ve managed to discover a fair bit of information by analyzing sample images downloaded from the internet, and through tests with my own Optio S, Optio WP, K10D, K-01 and K-5, and with help provided by other ExifTool users (see “ACKNOWLEDGEMENTS”).

The Pentax maker notes are stored in standard EXIF format, but the offsets used for some of their cameras are wacky. The Optio 330 gives the offset relative to the offset of the tag in the directory, the Optio WP uses a base offset in the middle of nowhere, and the Optio 550 uses different (and totally illogical) bases for different menu entries. Very weird. (It wouldn’t surprise me if Pentax can’t read their own maker notes!) Luckily, there are only a few entries in the maker notes which are large enough to require offsets, so this doesn’t affect much useful information. ExifTool attempts to make sense of this fiasco by making an assumption about where the information should be stored to deduce the correct offsets.

REFERENCES

Image::MakerNotes::Pentax

<http://johnst.org/sw/exiftags/> (Asahi models)

<http://kobe1995.jp/~kaz/astro/istD.html>

<http://www.cybercom.net/~dcoffin/dcraw/>

(…plus lots of testing with my Optio WP, K10D and K-5!)

ACKNOWLEDGEMENTS

Thanks to Wayne Smith, John Francis, Douglas O’Brien, Cvetan Ivanov, Jens Duttke, Dave Nicholson, Iliah Borg, Klaus Homeister, Louis Granboulan and Andras Salamon for help figuring out some Pentax tags, Ger Vermeulen and Niels Kristian Bech Jensen for contributing print conversion values for some tags, and everyone who helped contribute to the LensType values.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

“Pentax Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm), Image::Info (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

358 - Linux cli command Moo_Rolepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moo_Rolepm and provides detailed information about the command Moo_Rolepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moo_Rolepm.

NAME 🖥️ Moo_Rolepm 🖥️

Minimal Object Orientation support for Roles

SYNOPSIS

package My::Role; use Moo::Role; use strictures 2; sub foo { … } sub bar { … } has baz => ( is => ro, ); 1;

And elsewhere:

package Some::Class; use Moo; use strictures 2; # bar gets imported, but not foo with My::Role; sub foo { … } 1;

DESCRIPTION

Moo::Role builds upon Role::Tiny, so look there for most of the documentation on how this works (in particular, using Moo::Role also enables strict and warnings). The main addition here is extra bits to make the roles more Moosey; which is to say, it adds has.

IMPORTED SUBROUTINES

See IMPORTED SUBROUTINES in Role::Tiny for all the other subroutines that are imported by this module.

has

has attr => ( is => ro, );

Declares an attribute for the class to be composed into. See has in Moo for all options.

CLEANING UP IMPORTS

Moo::Role cleans up its own imported methods and any imports declared before the use Moo::Role statement automatically. Anything imported after use Moo::Role will be composed into consuming packages. A package that consumes this role:

package My::Role::ID; use Digest::MD5 qw(md5_hex); use Moo::Role; use Digest::SHA qw(sha1_hex); requires name; sub as_md5 { my ($self) = @_; return md5_hex($self->name); } sub as_sha1 { my ($self) = @_; return sha1_hex($self->name); } 1;

..will now have a $self->sha1_hex() method available to it that probably does not do what you expect. On the other hand, a call to $self->md5_hex() will die with the helpful error message: Cant locate object method "md5_hex".

See CLEANING UP IMPORTS in Moo for more details.

SUPPORT

See Moo for support and contact information.

AUTHORS

See Moo for authors.

COPYRIGHT AND LICENSE

See Moo for the copyright and license.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

359 - Linux cli command XtGetSelectionRequest

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGetSelectionRequest and provides detailed information about the command XtGetSelectionRequest, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGetSelectionRequest.

NAME 🖥️ XtGetSelectionRequest 🖥️

retrieve the event that triggered the XtConvertSelectionProc

SYNTAX

#include <X11/Intrinsic.h>

XSelectionRequestEvent* XtGetSelectionRequest(Widget w, Atom selection, XtRequestId request_id);

ARGUMENTS

  1. Specifies the widget.

selection
Specifies the selection being processed.

request_id
Specifies the requestor id in the case of incremental selections, or NULL in the case of atomic transfers.

DESCRIPTION

XtGetSelectionRequest may only be called from within an XtConvertSelectionProc procedure and returns a pointer to the SelectionRequest event that caused the conversion procedure to be invoked. Request_id specifies a unique id for the individual request in the case that multiple incremental transfers are outstanding. For atomic transfers, request_id must be specified as NULL. If no SelectionRequest event is being processed for the specified widget, selection, and request_id, XtGetSelectionRequest returns NULL.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

360 - Linux cli command srand48_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command srand48_r and provides detailed information about the command srand48_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the srand48_r.

NAME 🖥️ srand48_r 🖥️

generate uniformly distributed pseudo-random numbers reentrantly

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int drand48_r(struct drand48_data *restrict buffer,
 double *restrict result);
int erand48_r(unsigned short xsubi[3],
 struct drand48_data *restrict buffer,
 double *restrict result);
int lrand48_r(struct drand48_data *restrict buffer,
 long *restrict result);
int nrand48_r(unsigned short xsubi[3],
 struct drand48_data *restrict buffer,
 long *restrict result);
int mrand48_r(struct drand48_data *restrict buffer,
 long *restrict result);
int jrand48_r(unsigned short xsubi[3],
 struct drand48_data *restrict buffer,
 long *restrict result);
int srand48_r(long int seedval, struct drand48_data *buffer);
int seed48_r(unsigned short seed16v[3], struct drand48_data *buffer);
int lcong48_r(unsigned short param[7], struct drand48_data *buffer);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

These functions are the reentrant analogs of the functions described in drand48(3). Instead of modifying the global random generator state, they use the supplied data buffer.

Before the first use, this struct must be initialized, for example, by filling it with zeros, or by calling one of the functions srand48_r(), seed48_r(), or lcong48_r().

RETURN VALUE

The return value is 0.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

drand48_r(), erand48_r(), lrand48_r(), nrand48_r(), mrand48_r(), jrand48_r(), srand48_r(), seed48_r(), lcong48_r()

Thread safetyMT-Safe race:buffer

STANDARDS

GNU.

SEE ALSO

drand48(3), rand(3), random(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

361 - Linux cli command Moose_Objectpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Objectpm and provides detailed information about the command Moose_Objectpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Objectpm.

NAME 🖥️ Moose_Objectpm 🖥️

The base object for Moose

VERSION

version 2.2207

DESCRIPTION

This class is the default base class for all Moose-using classes. When you use Moose in this class, your class will inherit from this class.

It provides a default constructor and destructor, which run all of the BUILD and DEMOLISH methods in the inheritance hierarchy, respectively.

You don’t actually need to inherit from this in order to use Moose, but it makes it easier to take advantage of all of Moose’s features.

METHODS

Moose::Object->new(%params|$params)

This method calls $class->BUILDARGS(@_), and then creates a new instance of the appropriate class. Once the instance is created, it calls $instance->BUILD($params) for each BUILD method in the inheritance hierarchy.

Moose::Object->BUILDARGS(%params|$params)

The default implementation of this method accepts a hash or hash reference of named parameters. If it receives a single argument that isn’t a hash reference it throws an error.

You can override this method in your class to handle other types of options passed to the constructor.

This method should always return a hash reference of named options.

$object->does($role_name)

This returns true if the object does the given role.

$object->DOES($class_or_role_name)

This is a Moose role-aware implementation of “DOES” in UNIVERSAL.

This is effectively the same as writing:

$object->does($name) || $object->isa($name)

This method will work with Perl 5.8, which did not implement UNIVERSAL::DOES.

$object->dump($maxdepth)

This is a handy utility for Data::Dumpering an object. By default, there is no maximum depth.

$object->DESTROY

A default destructor is provided, which calls $instance->DEMOLISH($in_global_destruction) for each DEMOLISH method in the inheritance hierarchy.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

362 - Linux cli command pcap_createpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_createpcap and provides detailed information about the command pcap_createpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_createpcap.

NAME 🖥️ pcap_createpcap 🖥️

create a live capture handle

SYNOPSIS

#include <pcap/pcap.h>
char errbuf[PCAP_ERRBUF_SIZE];
pcap_t *pcap_create(const char *source, char *errbuf);

DESCRIPTION

pcap_create() is used to create a packet capture handle to look at packets on the network. source is a string that specifies the network device to open; on Linux systems with 2.2 or later kernels, a source argument of “any” or NULL can be used to capture packets from all interfaces.

The returned handle must be activated with pcap_activate(3PCAP) before packets can be captured with it; options for the capture, such as promiscuous mode, can be set on the handle before activating it.

RETURN VALUE

pcap_create() returns a pcap_t * on success and NULL on failure. If NULL is returned, errbuf is filled in with an appropriate error message. errbuf is assumed to be able to hold at least PCAP_ERRBUF_SIZE chars.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

363 - Linux cli command pthread_attr_getinheritsched

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_attr_getinheritsched and provides detailed information about the command pthread_attr_getinheritsched, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_attr_getinheritsched.

NAME 🖥️ pthread_attr_getinheritsched 🖥️

set/get inherit-scheduler attribute in thread attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_attr_setinheritsched(pthread_attr_t *attr,
 int inheritsched);
int pthread_attr_getinheritsched(const pthread_attr_t *restrict attr,
 int *restrict inheritsched);

DESCRIPTION

The pthread_attr_setinheritsched() function sets the inherit-scheduler attribute of the thread attributes object referred to by attr to the value specified in inheritsched. The inherit-scheduler attribute determines whether a thread created using the thread attributes object attr will inherit its scheduling attributes from the calling thread or whether it will take them from attr.

The following scheduling attributes are affected by the inherit-scheduler attribute: scheduling policy (pthread_attr_setschedpolicy(3)), scheduling priority (pthread_attr_setschedparam(3)), and contention scope (pthread_attr_setscope(3)).

The following values may be specified in inheritsched:

PTHREAD_INHERIT_SCHED
Threads that are created using attr inherit scheduling attributes from the creating thread; the scheduling attributes in attr are ignored.

PTHREAD_EXPLICIT_SCHED
Threads that are created using attr take their scheduling attributes from the values specified by the attributes object.

The default setting of the inherit-scheduler attribute in a newly initialized thread attributes object is PTHREAD_INHERIT_SCHED.

The pthread_attr_getinheritsched() returns the inherit-scheduler attribute of the thread attributes object attr in the buffer pointed to by inheritsched.

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

pthread_attr_setinheritsched() can fail with the following error:

EINVAL
Invalid value in inheritsched.

POSIX.1 also documents an optional ENOTSUP error (“attempt was made to set the attribute to an unsupported value”) for pthread_attr_setinheritsched().

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_attr_setinheritsched(), pthread_attr_getinheritsched()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.0. POSIX.1-2001.

BUGS

As at glibc 2.8, if a thread attributes object is initialized using pthread_attr_init(3), then the scheduling policy of the attributes object is set to SCHED_OTHER and the scheduling priority is set to 0. However, if the inherit-scheduler attribute is then set to PTHREAD_EXPLICIT_SCHED, then a thread created using the attribute object wrongly inherits its scheduling attributes from the creating thread. This bug does not occur if either the scheduling policy or scheduling priority attribute is explicitly set in the thread attributes object before calling pthread_create(3).

EXAMPLES

See pthread_setschedparam(3).

SEE ALSO

pthread_attr_init(3), pthread_attr_setschedparam(3), pthread_attr_setschedpolicy(3), pthread_attr_setscope(3), pthread_create(3), pthread_setschedparam(3), pthread_setschedprio(3), pthreads(7), sched(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

364 - Linux cli command getOpenFilepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getOpenFilepm and provides detailed information about the command getOpenFilepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getOpenFilepm.

NAME 🖥️ getOpenFilepm 🖥️

pop up a dialog box for the user to select a file to open.

SYNOPSIS

$widget->getOpenFile(?-option=>value, …>?)

$widget->getSaveFile(?-option=>value, …>?)

DESCRIPTION

The methods getOpenFile and getSaveFile pop up a dialog box for the user to select a file to open or save.

The getOpenFile method is usually associated with the Open command in the File menu. Its purpose is for the user to select an existing file only. If the user enters an non-existent file, the dialog box gives the user an error prompt and requires the user to give an alternative selection. If an application allows the user to create new files, it should do so by providing a separate New menu command.

The getSaveFile method is usually associated with the Save as command in the File menu. If the user enters a file that already exists, the dialog box prompts the user for confirmation whether the existing file should be overwritten or not.

If the user selects a file, both getOpenFile and getSaveFile return the full pathname of this file. If the user cancels the operation, both commands return an undefined value.

The following option-value pairs are possible as command line arguments to these two commands:

-defaultextension => extension
Specifies a string that will be appended to the filename if the user enters a filename without an extension. The default value is the empty string, which means no extension will be appended to the filename in any case. This option is ignored on the Macintosh platform, which does not require extensions to filenames, and the UNIX implementation guesses reasonable values for this from the -filetypes option when this is not supplied.

-filetypes => [filePattern ?, …?]
If a File types listbox exists in the file dialog on the particular platform, this option gives the filetypes in this listbox. When the user choose a filetype in the listbox, only the files of that type are listed. If this option is unspecified, or if it is set to the empty list, or if the File types listbox is not supported by the particular platform then all files are listed regardless of their types. See “SPECIFYING FILE PATTERNS” below for a discussion on the contents of filePatterns.

-initialdir => directory
Specifies that the files in directory should be displayed when the dialog pops up. If this parameter is not specified, then the files in the current working directory are displayed. This option may not always work on the Macintosh. This is not a bug. Rather, the General Controls control panel on the Mac allows the end user to override the application default directory.

-initialfile => filename
Specifies a filename to be displayed in the dialog when it pops up. This option is ignored by the getOpenFile method.

-multiple
Allows the user to choose multiple files from the Open dialog. On the Macintosh, this is only available when Navigation Services are installed.

-message => string
Specifies a message to include in the client area of the dialog. This is only available on the Macintosh, and only when Navigation Services are installed.

-title => titleString
Specifies a string to display as the title of the dialog box. If this option is not specified, then a default title is displayed. This option is ignored on the Macintosh platform.

SPECIFYING FILE PATTERNS

The filePatterns given by the -filetypes option are a list of file patterns. Each file pattern is a list of the form

typeName [extension ?extension …?] ?[macType ?macType …?]?

typeName is the name of the file type described by this file pattern and is the text string that appears in the File types listbox. extension is a file extension for this file pattern. macType is a four-character Macintosh file type. The list of macTypes is optional and may be omitted for applications that do not need to execute on the Macintosh platform.

Several file patterns may have the same typeName, in which case they refer to the same file type and share the same entry in the listbox. When the user selects an entry in the listbox, all the files that match at least one of the file patterns corresponding to that entry are listed. Usually, each file pattern corresponds to a distinct type of file. The use of more than one file patterns for one type of file is necessary on the Macintosh platform only.

On the Macintosh platform, a file matches a file pattern if its name matches at least one of the extension(s) AND it belongs to at least one of the macType(s) of the file pattern. For example, the C Source Files file pattern in the sample code matches with files that have a \c extension AND belong to the macType TEXT. To use the OR rule instead, you can use two file patterns, one with the extensions only and the other with the macType only. The GIF Files file type in the sample code matches files that EITHER have a \gif extension OR belong to the macType GIFF.

On the Unix and Windows platforms, a file matches a file pattern if its name matches at at least one of the extension(s) of the file pattern. The macTypes are ignored.

SPECIFYING EXTENSIONS

On the Unix and Macintosh platforms, extensions are matched using glob-style pattern matching. On the Windows platforms, extensions are matched by the underlying operating system. The types of possible extensions are: (1) the special extension * matches any file; (2) the special extension "" matches any files that do not have an extension (i.e., the filename contains no full stop character); (3) any character string that does not contain any wild card characters (* and ?).

Due to the different pattern matching rules on the various platforms, to ensure portability, wild card characters are not allowed in the extensions, except as in the special extension *. Extensions without a full stop character (e.g, ~) are allowed but may not work on all platforms.

CAVEATS

See “CAVEATS” in Tk::chooseDirectory.

EXAMPLE

my $types = [ [Text Files, [.txt, .text]], [TCL Scripts, .tcl ], [C Source Files, .c, TEXT], [GIF Files, .gif, ], [GIF Files, , GIFF], [All Files, *, ], ]; my $filename = $widget->getOpenFile(-filetypes=>$types); if ($filename ne “”) { # Open the file … }

SEE ALSO

Tk::FBox, Tk::FileSelect

KEYWORDS

file selection dialog

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

365 - Linux cli command IO_All_HTTPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_All_HTTPpm and provides detailed information about the command IO_All_HTTPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_All_HTTPpm.

NAME 🖥️ IO_All_HTTPpm 🖥️

Extends IO::All to HTTP URLs

SYNOPSIS

use IO::All; $content < io(http://example.org); # GET webpage into scalar io(http://example.org) > io(index.html); # GET to file “hello " > io(http://example.org/index.html); # PUT webpage # two ways of getting a page with a password: $content < io(http://me:[email protected]); $content < io(http://example.org)->user(me)->password(secret);

DESCRIPTION

This module extends IO::All for dealing with HTTP URLs. Note that you don’t need to use it explicitly, as it is autoloaded by IO::All whenever it sees something that looks like an HTTP URL.

The SYNOPSIS shows some simple typical examples, but there are many other interesting combinations with other IO::All features! For example, you can get an HTTP URL and write the content to a socket, or to an FTP URL, of to a DBM file.

METHODS

This is a subclass of IO::All::LWP. The only new method is http, which can be used to create a blank IO::All::HTTP object; or it can also take an HTTP URL as a parameter. Note that in most cases it is simpler just to call io(‘http://example.com’), which calls the http method automatically.

OPERATOR OVERLOADING

The same operators from IO::All may be used. < GETs an HTTP URL; > PUTs to an HTTP URL.

SEE ALSO

IO::All, IO::All::LWP, LWP.

AUTHORS

Ivan Tubert-Brohman <[email protected]> and Brian Ingerson <[email protected]>

COPYRIGHT

Copyright (c) 2007. Ivan Tubert-Brohman and Brian Ingerson. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See <http://www.perl.com/perl/misc/Artistic.html>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

366 - Linux cli command MIN

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command MIN and provides detailed information about the command MIN, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the MIN.

NAME 🖥️ MIN 🖥️

maximum or minimum of two values

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/param.h>
MAX(a, b);
MIN(a, b);

DESCRIPTION

These macros return the maximum or minimum of a and b.

RETURN VALUE

These macros return the value of one of their arguments, possibly converted to a different type (see BUGS).

ERRORS

These macros may raise the “invalid” floating-point exception when any of the arguments is NaN.

STANDARDS

GNU, BSD.

NOTES

If either of the arguments is of a floating-point type, you might prefer to use fmax(3) or fmin(3), which can handle NaN.

The arguments may be evaluated more than once, or not at all.

Some UNIX systems might provide these macros in a different header, or not at all.

BUGS

Due to the usual arithmetic conversions, the result of these macros may be very different from either of the arguments. To avoid this, ensure that both arguments have the same type.

EXAMPLES

#include <stdio.h>
#include <stdlib.h>
#include <sys/param.h>
int
main(int argc, char *argv[])
{
    int a, b, x;
    if (argc != 3) {
        fprintf(stderr, "Usage: %s <num> <num>

“, argv[0]); exit(EXIT_FAILURE); } a = atoi(argv[1]); b = atoi(argv[2]); x = MAX(a, b); printf(“MAX(%d, %d) is %d “, a, b, x); exit(EXIT_SUCCESS); }

SEE ALSO

fmax(3), fmin(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

367 - Linux cli command strtoll

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strtoll and provides detailed information about the command strtoll, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strtoll.

NAME 🖥️ strtoll 🖥️

convert a string to a long integer

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
long strtol(const char *restrict nptr,
 char **restrict endptr, int base);
long long strtoll(const char *restrict nptr,
 char **restrict endptr, int base);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strtoll():

    _ISOC99_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The strtol() function converts the initial part of the string in nptr to a long integer value according to the given base, which must be between 2 and 36 inclusive, or be the special value 0.

The string may begin with an arbitrary amount of white space (as determined by isspace(3)) followed by a single optional ‘+’ or ‘-’ sign. If base is zero or 16, the string may then include a “0x” or “0X” prefix, and the number will be read in base 16; otherwise, a zero base is taken as 10 (decimal) unless the next character is ‘0’, in which case it is taken as 8 (octal).

The remainder of the string is converted to a long value in the obvious manner, stopping at the first character which is not a valid digit in the given base. (In bases above 10, the letter ‘A’ in either uppercase or lowercase represents 10, ‘B’ represents 11, and so forth, with ‘Z’ representing 35.)

If endptr is not NULL, and the base is supported, strtol() stores the address of the first invalid character in *endptr. If there were no digits at all, strtol() stores the original value of nptr in *endptr (and returns 0). In particular, if *nptr is not ‘�’ but **endptr is ‘�’ on return, the entire string is valid.

The strtoll() function works just like the strtol() function but returns a long long integer value.

RETURN VALUE

The strtol() function returns the result of the conversion, unless the value would underflow or overflow. If an underflow occurs, strtol() returns LONG_MIN. If an overflow occurs, strtol() returns LONG_MAX. In both cases, errno is set to ERANGE. Precisely the same holds for strtoll() (with LLONG_MIN and LLONG_MAX instead of LONG_MIN and LONG_MAX).

ERRORS

This function does not modify errno on success.

EINVAL
(not in C99) The given base contains an unsupported value.

ERANGE
The resulting value was out of range.

The implementation may also set errno to EINVAL in case no conversion was performed (no digits seen, and 0 returned).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strtol(), strtoll(), strtoq()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

strtol()
POSIX.1-2001, C89, SVr4, 4.3BSD.

strtoll()
POSIX.1-2001, C99.

NOTES

Since strtol() can legitimately return 0, LONG_MAX, or LONG_MIN (LLONG_MAX or LLONG_MIN for strtoll()) on both success and failure, the calling program should set errno to 0 before the call, and then determine if an error occurred by checking whether errno == ERANGE after the call.

According to POSIX.1, in locales other than “C” and “POSIX”, these functions may accept other, implementation-defined numeric strings.

BSD also has

quad_t strtoq(const char *nptr, char **endptr, int base);

with completely analogous definition. Depending on the wordsize of the current architecture, this may be equivalent to strtoll() or to strtol().

CAVEATS

If the base needs to be tested, it should be tested in a call where the string is known to succeed. Otherwise, it’s impossible to portably differentiate the errors.

errno = 0;
strtol("0", NULL, base);
if (errno == EINVAL)
    goto unsupported_base;

EXAMPLES

The program shown below demonstrates the use of strtol(). The first command-line argument specifies a string from which strtol() should parse a number. The second (optional) argument specifies the base to be used for the conversion. (This argument is converted to numeric form using atoi(3), a function that performs no error checking and has a simpler interface than strtol().) Some examples of the results produced by this program are the following:

$ ./a.out 123
strtol() returned 123
$ ./a.out ' 123'
strtol() returned 123
$ ./a.out 123abc
strtol() returned 123
Further characters after number: "abc"
$ ./a.out 123abc 55
strtol: Invalid argument
$ ./a.out ''
No digits were found
$ ./a.out 4000000000
strtol: Numerical result out of range

Program source

#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
    int base;
    char *endptr, *str;
    long val;
    if (argc < 2) {
        fprintf(stderr, "Usage: %s str [base]

“, argv[0]); exit(EXIT_FAILURE); } str = argv[1]; base = (argc > 2) ? atoi(argv[2]) : 0; errno = 0; /* To distinguish success/failure after call / strtol(“0”, NULL, base); if (errno == EINVAL) { perror(“strtol”); exit(EXIT_FAILURE); } errno = 0; / To distinguish success/failure after call / val = strtol(str, &endptr, base); / Check for various possible errors. / if (errno == ERANGE) { perror(“strtol”); exit(EXIT_FAILURE); } if (endptr == str) { fprintf(stderr, “No digits were found “); exit(EXIT_FAILURE); } / If we got here, strtol() successfully parsed a number. */ printf(“strtol() returned %ld “, val); if (endptr != ‘�’) / Not necessarily an error… */ printf(“Further characters after number: "%s" “, endptr); exit(EXIT_SUCCESS); }

SEE ALSO

atof(3), atoi(3), atol(3), strtod(3), strtoimax(3), strtoul(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

368 - Linux cli command pcap_findalldevspcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_findalldevspcap and provides detailed information about the command pcap_findalldevspcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_findalldevspcap.

NAME 🖥️ pcap_findalldevspcap 🖥️

get a list of capture devices, and free that list

SYNOPSIS

#include <pcap/pcap.h>
char errbuf[PCAP_ERRBUF_SIZE];
int pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf);
void pcap_freealldevs(pcap_if_t *alldevs);

DESCRIPTION

pcap_findalldevs() constructs a list of network devices that can be opened with pcap_create(3PCAP) and pcap_activate(3PCAP) or with pcap_open_live(3PCAP). (Note that there may be network devices that cannot be opened by the process calling pcap_findalldevs(), because, for example, that process does not have sufficient privileges to open them for capturing; if so, those devices will not appear on the list.) If pcap_findalldevs() succeeds, the pointer pointed to by alldevsp is set to point to the first element of the list, or to NULL if no devices were found (this is considered success). Each element of the list is of type pcap_if_t, and has the following members:

next
if not NULL, a pointer to the next element in the list; NULL for the last element of the list

name
a pointer to a string giving a name for the device to pass to pcap_open_live()

description
if not NULL, a pointer to a string giving a human-readable description of the device

addresses
a pointer to the first element of a list of network addresses for the device, or NULL if the device has no addresses

flags
device flags:

PCAP_IF_LOOPBACK
set if the device is a loopback interface

PCAP_IF_UP
set if the device is up

PCAP_IF_RUNNING
set if the device is running

PCAP_IF_WIRELESS
set if the device is a wireless interface; this includes IrDA as well as radio-based networks such as IEEE 802.15.4 and IEEE 802.11, so it doesn’t just mean Wi-Fi

PCAP_IF_CONNECTION_STATUS
a bitmask for an indication of whether the adapter is connected or not; for wireless interfaces, “connected” means “associated with a network”

The possible values for the connection status bits are:
PCAP_IF_CONNECTION_STATUS_UNKNOWN
it’s unknown whether the adapter is connected or not

PCAP_IF_CONNECTION_STATUS_CONNECTED
the adapter is connected

PCAP_IF_CONNECTION_STATUS_DISCONNECTED
the adapter is disconnected

PCAP_IF_CONNECTION_STATUS_NOT_APPLICABLE
the notion of “connected” and “disconnected” don’t apply to this interface; for example, it doesn’t apply to a loopback device

Each element of the list of addresses is of type pcap_addr_t, and has the following members:

next
if not NULL, a pointer to the next element in the list; NULL for the last element of the list

addr
a pointer to a struct sockaddr containing an address

netmask
if not NULL, a pointer to a struct sockaddr that contains the netmask corresponding to the address pointed to by addr

broadaddr
if not NULL, a pointer to a struct sockaddr that contains the broadcast address corresponding to the address pointed to by addr; may be null if the device doesn’t support broadcasts

dstaddr
if not NULL, a pointer to a struct sockaddr that contains the destination address corresponding to the address pointed to by addr; may be null if the device isn’t a point-to-point interface

Note that the addresses in the list of addresses might be IPv4 addresses, IPv6 addresses, or some other type of addresses, so you must check the sa_family member of the struct sockaddr before interpreting the contents of the address; do not assume that the addresses are all IPv4 addresses, or even all IPv4 or IPv6 addresses. IPv4 addresses have the value AF_INET, IPv6 addresses have the value AF_INET6 (which older operating systems that don’t support IPv6 might not define), and other addresses have other values. Whether other addresses are returned, and what types they might have is platform-dependent. For IPv4 addresses, the struct sockaddr pointer can be interpreted as if it pointed to a struct sockaddr_in; for IPv6 addresses, it can be interpreted as if it pointed to a struct sockaddr_in6.

The list of devices must be freed with pcap_freealldevs(3PCAP), which frees the list pointed to by alldevs.

RETURN VALUE

pcap_findalldevs() returns 0 on success and PCAP_ERROR on failure; as indicated, finding no devices is considered success, rather than failure, so 0 will be returned in that case. If PCAP_ERROR is returned, errbuf is filled in with an appropriate error message. errbuf is assumed to be able to hold at least PCAP_ERRBUF_SIZE chars.

BACKWARD COMPATIBILITY

The PCAP_IF_UP and PCAP_IF_RUNNING constants became available in libpcap release 1.6.1. The PCAP_IF_WIRELESS, PCAP_IF_CONNECTION_STATUS, PCAP_IF_CONNECTION_STATUS_UNKNOWN, PCAP_IF_CONNECTION_STATUS_CONNECTED, PCAP_IF_CONNECTION_STATUS_DISCONNECTED, and PCAP_IF_CONNECTION_STATUS_NOT_APPLICABLE constants became available in libpcap release 1.9.0.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

369 - Linux cli command Tk_IconListpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_IconListpm and provides detailed information about the command Tk_IconListpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_IconListpm.

NAME 🖥️ Tk_IconListpm 🖥️

an icon list widget

SYNOPSIS

use Tk::IconList; $il = $mw->IconList(-browsecmd => sub { … }, -command => sub { … })->pack; $il->Add($icon1, $text1); $il->Add($icon2, $text2); $il->Arrange; … $il->DeleteAll;

DESCRIPTION

OPTIONS

-browsecmd

-command

-font

-item -foreground|-fg

METHODS

DeleteAll
Deletes all the items inside the canvas subwidget and reset the IconList’s state.

Add($image, $text)
Adds an icon into the IconList with the designated image and text.

Arrange
Places the icons in a column-major arrangement.

Get
Return the selected item.

Invoke
Gets called when the user invokes the IconList (usually by double-clicking or pressing the Return key) (internal method).

See($tag)
If the item is not (completely) visible, scroll the canvas so that it becomes visible (internal method).

COPYRIGHT

The original tkfbox.tcl from Tcl/Tk is:

Copyright (c) 1994-1996 Sun Microsystems, Inc.

See the file “license.terms” for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.

Translated to Perl/Tk by Slaven Rezic <[email protected]>.

SEE ALSO

Tk::FBox.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

370 - Linux cli command uint64_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command uint64_ttype and provides detailed information about the command uint64_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the uint64_ttype.

NAME 🖥️ uint64_ttype 🖥️

fixed-width basic integer types

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <stdint.h>
typedef /* ... */ int8_t;
typedef /* ... */ int16_t;
typedef /* ... */ int32_t;
typedef /* ... */ int64_t;
typedef /* ... */ uint8_t;
typedef /* ... */ uint16_t;
typedef /* ... */ uint32_t;
typedef /* ... */ uint64_t;
#define INT8_WIDTH 8
#define INT16_WIDTH 16
#define INT32_WIDTH 32
#define INT64_WIDTH 64
#define UINT8_WIDTH 8
#define UINT16_WIDTH 16
#define UINT32_WIDTH 32
#define UINT64_WIDTH 64
#define INT8_MAX /* 2**(INT8_WIDTH - 1) - 1 */
#define INT16_MAX /* 2**(INT16_WIDTH - 1) - 1 */
#define INT32_MAX /* 2**(INT32_WIDTH - 1) - 1 */
#define INT64_MAX /* 2**(INT64_WIDTH - 1) - 1 */
#define INT8_MIN /* - 2**(INT8_WIDTH - 1) */
#define INT16_MIN /* - 2**(INT16_WIDTH - 1) */
#define INT32_MIN /* - 2**(INT32_WIDTH - 1) */
#define INT64_MIN /* - 2**(INT64_WIDTH - 1) */
#define UINT8_MAX /* 2**INT8_WIDTH - 1 */
#define UINT16_MAX /* 2**INT16_WIDTH - 1 */
#define UINT32_MAX /* 2**INT32_WIDTH - 1 */
#define UINT64_MAX /* 2**INT64_WIDTH - 1 */
#define INT8_C(c) c ## /* ... */
#define INT16_C(c) c ## /* ... */
#define INT32_C(c) c ## /* ... */
#define INT64_C(c) c ## /* ... */
#define UINT8_C(c) c ## /* ... */
#define UINT16_C(c) c ## /* ... */
#define UINT32_C(c) c ## /* ... */
#define UINT64_C(c) c ## /* ... */

DESCRIPTION

intN*_t* are signed integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are be capable of storing values in the range [INTN**_MIN**, INTN**_MAX**], substituting N by the appropriate number.

uintN*_t* are unsigned integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are capable of storing values in the range [0, UINTN**_MAX**], substituting N by the appropriate number.

According to POSIX, [u]int8_t, [u]int16_t, and [u]int32_t are required; [u]int64_t are only required in implementations that provide integer types with width 64; and all other types of this form are optional.

The macros [U]INTN**_WIDTH** expand to the width in bits of these types (N).

The macros [U]INTN**_MAX** expand to the maximum value that these types can hold.

The macros INTN**_MIN** expand to the minimum value that these types can hold.

The macros [U]INTN**_C**() expand their argument to an integer constant of type [u]intN*_t*.

The length modifiers for the [u]intN*_t* types for the printf(3) family of functions are expanded by macros of the forms PRIdN, PRIiN, PRIuN, and PRIxN (defined in <inttypes.h>); resulting for example in %“PRId64” or %“PRIi64” for printing int64_t values. The length modifiers for the [u]intN*_t* types for the scanf(3) family of functions are expanded by macros of the forms SCNdN, SCNiN, SCNuN, and SCNxN, (defined in <inttypes.h>); resulting for example in %“SCNu8” or %“SCNx8” for scanning uint8_t values.

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The [U]INTN**_WIDTH** macros were added in C23.

NOTES

The following header also provides these types: <inttypes.h>. <arpa/inet.h> also provides uint16_t and uint32_t.

SEE ALSO

intmax_t(3type), intptr_t(3type), printf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

371 - Linux cli command XtGetClassExtension

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGetClassExtension and provides detailed information about the command XtGetClassExtension, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGetClassExtension.

NAME 🖥️ XtGetClassExtension 🖥️

locate a class extension record

SYNTAX

#include <X11/Intrinsic.h>

XtPointer XtGetClassExtension(WidgetClass object_class, Cardinal byte_offset, XrmQuark type, long version, Cardinal record_size);

ARGUMENTS

object_class
Specifies the widget class containing the extension list to be searched.

byte_offset
Specifies the offset in bytes form the base of the widget class of the extension field to be searched.

type
Specifies the name of the class extension to be located.

version
Specifies the minimum acceptable version of the class extension required for a match.

record_size
Specifies the minimum acceptable length of the class extension record required for match, or 0.

DESCRIPTION

The list of extension records at the specified offset in the specified widget_class will be searched for a match on the specified type, a version greater than or equal to the specified version, and a record size greater than or equal the specified record_size if it is nonzero. XtGetClassExtension returns a pointer to a matching extension record or NULL if no match is found. The returned extension record is owned by the widget class and must not be modified or freed by the caller, except possibly to be modified by the widget class owner.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

372 - Linux cli command zip_file_set_dostime

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_file_set_dostime and provides detailed information about the command zip_file_set_dostime, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_file_set_dostime.

libzip (-lzip)

The

function sets the last modification time (mtime) for the file at position

in the zip archive to

Currently, no support for any

is implemented.

In the zip archive, the time and date are saved as two 16-bit integers. To set the values directly, call the

function. The values of the time bytes are defined as follows:

day of the month (1-31)

month (January = 1, February = 2, …)

year offset from 1980 (1980 = 0, 1981 = 1, …)

The values of the date bytes are defined as follows:

seconds divided by two (1-2 = 1, 3-4 = 2, …)

minute (0-59)

hour (0-23)

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

and

fail if:

is not a valid file index in

Required memory could not be allocated.

The

was opened in read-only mode.

was added in libzip 1.0.

was added in libzip 1.6.

and

Following historical practice, the

function translates the time from the zip archive into the local time zone. If you want to avoid this, use the

function instead.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

373 - Linux cli command __ppc_set_ppr_med_high

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __ppc_set_ppr_med_high and provides detailed information about the command __ppc_set_ppr_med_high, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __ppc_set_ppr_med_high.

Programmer’s Manual"

NAME 🖥️ __ppc_set_ppr_med_high 🖥️

Set the Program Priority Register

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/platform/ppc.h>
void __ppc_set_ppr_med(void);
void __ppc_set_ppr_very_low(void);
void __ppc_set_ppr_low(void);
void __ppc_set_ppr_med_low(void);
void __ppc_set_ppr_med_high(void);

DESCRIPTION

These functions provide access to the Program Priority Register (PPR) on the Power architecture.

The PPR is a 64-bit register that controls the program’s priority. By adjusting the PPR value the programmer may improve system throughput by causing system resources to be used more efficiently, especially in contention situations. The available unprivileged states are covered by the following functions:

__ppc_set_ppr_med()
sets the Program Priority Register value to medium (default).

__ppc_set_ppr_very_low()
sets the Program Priority Register value to very low.

__ppc_set_ppr_low()
sets the Program Priority Register value to low.

__ppc_set_ppr_med_low()
sets the Program Priority Register value to medium low.

The privileged state medium high may also be set during certain time intervals by problem-state (unprivileged) programs, with the following function:

__ppc_set_ppr_med_high()
sets the Program Priority to medium high.

If the program priority is medium high when the time interval expires or if an attempt is made to set the priority to medium high when it is not allowed, the priority is set to medium.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

__ppc_set_ppr_med(), __ppc_set_ppr_very_low(), __ppc_set_ppr_low(), __ppc_set_ppr_med_low(), __ppc_set_ppr_med_high()

Thread safetyMT-Safe

STANDARDS

GNU.

HISTORY

__ppc_set_ppr_med()
__ppc_set_ppr_low()
__ppc_set_ppr_med_low()
glibc 2.18.

__ppc_set_ppr_very_low()
__ppc_set_ppr_med_high()
glibc 2.23.

NOTES

The functions __ppc_set_ppr_very_low() and __ppc_set_ppr_med_high() will be defined by <sys/platform/ppc.h> if _ARCH_PWR8 is defined. Availability of these functions can be tested using #ifdef _ARCH_PWR8.

SEE ALSO

__ppc_yield(3)

Power ISA, Book II - Section 3.1 (Program Priority Registers)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

374 - Linux cli command nanl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command nanl and provides detailed information about the command nanl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the nanl.

NAME 🖥️ nanl 🖥️

return ‘Not a Number’

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double nan(const char *tagp);
float nanf(const char *tagp);
long double nanl(const char *tagp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

nan(), nanf(), nanl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions return a representation (determined by tagp) of a quiet NaN. If the implementation does not support quiet NaNs, these functions return zero.

The call nan(“char-sequence”) is equivalent to:

strtod("NAN(char-sequence)", NULL);

Similarly, calls to nanf() and nanl() are equivalent to analogous calls to strtof(3) and strtold(3).

The argument tagp is used in an unspecified manner. On IEEE 754 systems, there are many representations of NaN, and tagp selects one. On other systems it may do nothing.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

nan(), nanf(), nanl()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

See also IEC 559 and the appendix with recommended functions in IEEE 754/IEEE 854.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

isnan(3), strtod(3), math_error(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

375 - Linux cli command Spreadsheet_ParseExcel_Fontpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_ParseExcel_Fontpm and provides detailed information about the command Spreadsheet_ParseExcel_Fontpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_ParseExcel_Fontpm.

NAME 🖥️ Spreadsheet_ParseExcel_Fontpm 🖥️

A class for Cell fonts.

SYNOPSIS

See the documentation for Spreadsheet::ParseExcel.

DESCRIPTION

This module is used in conjunction with Spreadsheet::ParseExcel. See the documentation for Spreadsheet::ParseExcel.

AUTHOR

Current maintainer 0.60+: Douglas Wilson [email protected]

Maintainer 0.40-0.59: John McNamara [email protected]

Maintainer 0.27-0.33: Gabor Szabo [email protected]

Original author: Kawai Takanori [email protected]

COPYRIGHT

Copyright (c) 2014 Douglas Wilson

Copyright (c) 2009-2013 John McNamara

Copyright (c) 2006-2008 Gabor Szabo

Copyright (c) 2000-2006 Kawai Takanori

All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

376 - Linux cli command wcpncpy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcpncpy and provides detailed information about the command wcpncpy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcpncpy.

NAME 🖥️ wcpncpy 🖥️

copy a fixed-size string of wide characters, returning a pointer to its end

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
wchar_t *wcpncpy(wchar_t dest[restrict .n],
 const wchar_t src[restrict .n],
 size_t n);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

wcpncpy():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The wcpncpy() function is the wide-character equivalent of the stpncpy(3) function. It copies at most n wide characters from the wide-character string pointed to by src, including the terminating null wide (L’�’), to the array pointed to by dest. Exactly n wide characters are written at dest. If the length wcslen(src) is smaller than n, the remaining wide characters in the array pointed to by dest are filled with L’�’ characters. If the length wcslen(src) is greater than or equal to n, the string pointed to by dest will not be L’�’ terminated.

The strings may not overlap.

The programmer must ensure that there is room for at least n wide characters at dest.

RETURN VALUE

wcpncpy() returns a pointer to the last wide character written, that is, dest+n-1.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcpncpy()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

SEE ALSO

stpncpy(3), wcsncpy(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

377 - Linux cli command XtAddConverter

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAddConverter and provides detailed information about the command XtAddConverter, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAddConverter.

NAME 🖥️ XtAddConverter 🖥️

register resource converter

SYNTAX

#include <X11/Intrinsic.h>

void XtAppAddConverter(XtAppContext app_context, const char *from_type, const char *to_type, XtConverter converter, XtConvertArgList convert_args, Cardinal num_args);

void XtAddConverter(const char *from_type, const char *to_type, XtConverter converter, XtConvertArgList convert_args, Cardinal num_args);

ARGUMENTS

app_context
Specifies the application context.

converter
Specifies the type converter procedure.

convert_args
Specifies how to compute the additional arguments to the converter or NULL.

from_type
Specifies the source type.

num_args
Specifies the number of additional arguments to the converter or zero.

to_type
Specifies the destination type.

DESCRIPTION

XtAppAddConverter is equivalent in function to XtAppSetTypeConverter with cache_type equal to XtCacheAll for old-format type converters. It has been superseded by XtAppSetTypeConverter.

XtAddConverter is equivalent in function to XtSetTypeConverter with cache_type equal to XtCacheAll for old-format type converters. It has been superseded by XtSetTypeConverter.

SEE ALSO

XtConvert(3), XtStringConversionWarning(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

378 - Linux cli command XtGetSelectionValuesIncremental

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGetSelectionValuesIncremental and provides detailed information about the command XtGetSelectionValuesIncremental, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGetSelectionValuesIncremental.

NAME 🖥️ XtGetSelectionValuesIncremental 🖥️

obtain selection values

SYNTAX

#include <X11/Intrinsic.h>

void XtGetSelectionValueIncremental(Widget w, Atom selection, Atom target, XtSelectionCallbackProc callback, XtPointer client_data, Time time);

void XtGetSelectionValuesIncremental(Widget w, Atom selection, Atom *targets, int count, XtSelectionCallbackProc callback, XtPointer *client_data, Time time);

ARGUMENTS

callback
Specifies the callback procedure that is to be called when the selection value has been obtained.

client_data
Specifies the argument that is to be passed to the specified procedure when it is called.

client_data
Specifies the client data (one for each target type) that is passed to the callback procedure when it is called for that target.

count
Specifies the length of the targets and client_data lists.

selection
Specifies the particular selection desired (that is, primary or secondary).

target
Specifies the type of the information that is needed about the selection.

targets
Specifies the types of information that is needed about the selection.

time
Specifies the timestamp that indicates when the selection value is desired.

  1. Specifies the widget that is making the request.

DESCRIPTION

The XtGetSelectionValueIncremental function is similar to XtGetSelectionValue except that the selection_callback procedure will be called repeatedly upon delivery of multiple segments of the selection value. The end of the selection value is indicated when selection_callback is called with a non-NULL value of length zero, which must still be freed by the client. If the transfer of the selection is aborted in the middle of a transfer (for example, because to timeout), the selection_callback procedure is called with a type value equal to the symbolic constant XT_CONVERT_FAIL so that the requestor can dispose of the partial selection value it has collected up until that point. Upon receiving XT_CONVERT_FAIL, the requesting client must determine for itself whether or not a partially completed transfer is meaningful.

The XtGetSelectionValuesIncremental function is similar to XtGetSelectionValueIncremental except that it takes a list of target types and a list of client data and obtains the current value of the selection converted to each of the targets. The effect is as if each target were specified in a separate call to XtGetSelectionValueIncremental. The callback is called once with the corresponding client data for each target. XtGetSelectionValuesIncremental does guarantee that all the conversions will use the same selection value because the ownership of the selection cannot change in the middle of the list, as would be when calling XtGetSelectionValueIncremental repeatedly.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

379 - Linux cli command fread

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fread and provides detailed information about the command fread, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fread.

NAME 🖥️ fread 🖥️

binary stream input/output

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
size_t fread(void ptr[restrict .size * .nmemb],
 size_t size, size_t nmemb,
 FILE *restrict stream);
size_t fwrite(const void ptr[restrict .size * .nmemb],
 size_t size, size_t nmemb,
 FILE *restrict stream);

DESCRIPTION

The function fread() reads nmemb items of data, each size bytes long, from the stream pointed to by stream, storing them at the location given by ptr.

The function fwrite() writes nmemb items of data, each size bytes long, to the stream pointed to by stream, obtaining them from the location given by ptr.

For nonlocking counterparts, see unlocked_stdio(3).

RETURN VALUE

On success, fread() and fwrite() return the number of items read or written. This number equals the number of bytes transferred only when size is 1. If an error occurs, or the end of the file is reached, the return value is a short item count (or zero).

The file position indicator for the stream is advanced by the number of bytes successfully read or written.

fread() does not distinguish between end-of-file and error, and callers must use feof(3) and ferror(3) to determine which occurred.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fread(), fwrite()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89.

EXAMPLES

The program below demonstrates the use of fread() by parsing /bin/sh ELF executable in binary mode and printing its magic and class:

$ ./a.out
ELF magic: 0x7f454c46
Class: 0x02

Program source

#include <stdio.h>
#include <stdlib.h>
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
int
main(void)
{
    FILE           *fp;
    size_t         ret;
    unsigned char  buffer[4];
    fp = fopen("/bin/sh", "rb");
    if (!fp) {
        perror("fopen");
        return EXIT_FAILURE;
    }
    ret = fread(buffer, sizeof(*buffer), ARRAY_SIZE(buffer), fp);
    if (ret != ARRAY_SIZE(buffer)) {
        fprintf(stderr, "fread() failed: %zu

“, ret); exit(EXIT_FAILURE); } printf(“ELF magic: %#04x%02x%02x%02x “, buffer[0], buffer[1], buffer[2], buffer[3]); ret = fread(buffer, 1, 1, fp); if (ret != 1) { fprintf(stderr, “fread() failed: %zu “, ret); exit(EXIT_FAILURE); } printf(“Class: %#04x “, buffer[0]); fclose(fp); exit(EXIT_SUCCESS); }

SEE ALSO

read(2), write(2), feof(3), ferror(3), unlocked_stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

380 - Linux cli command pthread_mutex_lock

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_mutex_lock and provides detailed information about the command pthread_mutex_lock, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_mutex_lock.

NAME 🖥️ pthread_mutex_lock 🖥️

operations on mutexes

SYNOPSIS

#include <pthread.h>
pthread_mutex_t fastmutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t recmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
pthread_mutex_t errchkmutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
int pthread_mutex_init(pthread_mutex_t *mutex,
 const pthread_mutexattr_t *mutexattr);
int pthread_mutex_lock(pthread_mutex_t *mutex);
int pthread_mutex_trylock(pthread_mutex_t *mutex);
int pthread_mutex_unlock(pthread_mutex_t *mutex);
int pthread_mutex_destroy(pthread_mutex_t *mutex);

DESCRIPTION

A mutex is a MUTual EXclusion device, and is useful for protecting shared data structures from concurrent modifications, and implementing critical sections and monitors.

A mutex has two possible states: unlocked (not owned by any thread), and locked (owned by one thread). A mutex can never be owned by two different threads simultaneously. A thread attempting to lock a mutex that is already locked by another thread is suspended until the owning thread unlocks the mutex first.

pthread_mutex_init initializes the mutex object pointed to by mutex according to the mutex attributes specified in mutexattr. If mutexattr is NULL, default attributes are used instead.

The LinuxThreads implementation supports only one mutex attributes, the mutex kind, which is either ``fast’’, ``recursive’’, or ``error checking’’. The kind of a mutex determines whether it can be locked again by a thread that already owns it. The default kind is ``fast’’. See pthread_mutexattr_init(3) for more information on mutex attributes.

Variables of type pthread_mutex_t can also be initialized statically, using the constants PTHREAD_MUTEX_INITIALIZER (for fast mutexes), PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP (for recursive mutexes), and PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP (for error checking mutexes).

pthread_mutex_lock locks the given mutex. If the mutex is currently unlocked, it becomes locked and owned by the calling thread, and pthread_mutex_lock returns immediately. If the mutex is already locked by another thread, pthread_mutex_lock suspends the calling thread until the mutex is unlocked.

If the mutex is already locked by the calling thread, the behavior of pthread_mutex_lock depends on the kind of the mutex. If the mutex is of the ``fast’’ kind, the calling thread is suspended until the mutex is unlocked, thus effectively causing the calling thread to deadlock. If the mutex is of the ``error checking’’ kind, pthread_mutex_lock returns immediately with the error code EDEADLK. If the mutex is of the ``recursive’’ kind, pthread_mutex_lock succeeds and returns immediately, recording the number of times the calling thread has locked the mutex. An equal number of pthread_mutex_unlock operations must be performed before the mutex returns to the unlocked state.

pthread_mutex_trylock behaves identically to pthread_mutex_lock, except that it does not block the calling thread if the mutex is already locked by another thread (or by the calling thread in the case of a ``fast’’ mutex). Instead, pthread_mutex_trylock returns immediately with the error code EBUSY.

pthread_mutex_unlock unlocks the given mutex. The mutex is assumed to be locked and owned by the calling thread on entrance to pthread_mutex_unlock. If the mutex is of the ``fast’’ kind, pthread_mutex_unlock always returns it to the unlocked state. If it is of the ``recursive’’ kind, it decrements the locking count of the mutex (number of pthread_mutex_lock operations performed on it by the calling thread), and only when this count reaches zero is the mutex actually unlocked.

On ``error checking’’ and ``recursive’’ mutexes, pthread_mutex_unlock actually checks at run-time that the mutex is locked on entrance, and that it was locked by the same thread that is now calling pthread_mutex_unlock. If these conditions are not met, an error code is returned and the mutex remains unchanged. ``Fast’’ mutexes perform no such checks, thus allowing a locked mutex to be unlocked by a thread other than its owner. This is non-portable behavior and must not be relied upon.

pthread_mutex_destroy destroys a mutex object, freeing the resources it might hold. The mutex must be unlocked on entrance. In the LinuxThreads implementation, no resources are associated with mutex objects, thus pthread_mutex_destroy actually does nothing except checking that the mutex is unlocked.

CANCELLATION

None of the mutex functions is a cancelation point, not even pthread_mutex_lock, in spite of the fact that it can suspend a thread for arbitrary durations. This way, the status of mutexes at cancelation points is predictable, allowing cancelation handlers to unlock precisely those mutexes that need to be unlocked before the thread stops executing. Consequently, threads using deferred cancelation should never hold a mutex for extended periods of time.

ASYNC-SIGNAL SAFETY

The mutex functions are not async-signal safe. What this means is that they should not be called from a signal handler. In particular, calling pthread_mutex_lock or pthread_mutex_unlock from a signal handler may deadlock the calling thread.

RETURN VALUE

pthread_mutex_init always returns 0. The other mutex functions return 0 on success and a non-zero error code on error.

ERRORS

The pthread_mutex_lock function returns the following error code on error:

EINVAL
The mutex has not been properly initialized.

EDEADLK
The mutex is already locked by the calling thread (``error checking’’ mutexes only).

The pthread_mutex_trylock function returns the following error codes on error:

EBUSY
The mutex could not be acquired because it was currently locked.

EINVAL
The mutex has not been properly initialized.

The pthread_mutex_unlock function returns the following error code on error:

EINVAL
The mutex has not been properly initialized.

EPERM
The calling thread does not own the mutex (``error checking’’ mutexes only).

The pthread_mutex_destroy function returns the following error code on error:

EBUSY
The mutex is currently locked.

SEE ALSO

pthread_mutexattr_init(3), pthread_mutexattr_setkind_np(3), pthread_cancel(3).

EXAMPLE

A shared global variable x can be protected by a mutex as follows:

int x;
pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER;

All accesses and modifications to x should be bracketed by calls to pthread_mutex_lock and pthread_mutex_unlock as follows:

pthread_mutex_lock(&mut);
/* operate on x */
pthread_mutex_unlock(&mut);
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

381 - Linux cli command SIMPLEQ_HEAD_INITIALIZER

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SIMPLEQ_HEAD_INITIALIZER and provides detailed information about the command SIMPLEQ_HEAD_INITIALIZER, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SIMPLEQ_HEAD_INITIALIZER.

NAME 🖥️ SIMPLEQ_HEAD_INITIALIZER 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

382 - Linux cli command XtRemoveRawEventHandler

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtRemoveRawEventHandler and provides detailed information about the command XtRemoveRawEventHandler, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtRemoveRawEventHandler.

NAME 🖥️ XtRemoveRawEventHandler 🖥️

add and remove event handlers

SYNTAX

#include <X11/Intrinsic.h>

void XtAddEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data);

void XtAddRawEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data);

void XtRemoveEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data);

void XtRemoveRawEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data);

void XtInsertEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data, XtListPosition position);

void XtInsertRawEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data, XtListPosition position);

typedef enum { XtListHead, XtListTail } XtListPosition;

ARGUMENTS

client_data
Specifies additional data to be passed to the client’s event handler.

event_mask
Specifies the event mask for which to call or unregister this procedure.

nonmaskable
Specifies a Boolean value that indicates whether this procedure should be called or removed on the nonmaskable events ( GraphicsExpose, NoExpose, SelectionClear, SelectionRequest, SelectionNotify, ClientMessage, and MappingNotify).

proc
Specifies the procedure that is to be added or removed.

  1. Specifies the widget for which this event handler is being registered.

position
Specifies when the event handler is to be called relative to other previously registered handlers.

DESCRIPTION

The XtAddEventHandler function registers a procedure with the dispatch mechanism that is to be called when an event that matches the mask occurs on the specified widget. If the procedure is already registered with the same client_data, the specified mask is ORed into the existing mask. If the widget is realized, XtAddEventHandler calls XSelectInput, if necessary.

The XtAddRawEventHandler function is similar to XtAddEventHandler except that it does not affect the widget’s mask and never causes an XSelectInput for its events. Note that the widget might already have those mask bits set because of other nonraw event handlers registered on it.

The XtRemoveRawEventHandler function stops the specified procedure from receiving the specified events. Because the procedure is a raw event handler, this does not affect the widget’s mask and never causes a call on XSelectInput.

XtInsertEventHandler is identical to XtAddEventHandler with the additional position argument. If position is XtListHead, the event handler is registered to that it will be called before any event handlers that were previously registered for the same widget. If position is XtListTail, the event handler is registered to be called after any previously registered event handlers. If the procedure is already registered with the same client_data value, the specified mask augments the existing mask and the procedure is repositioned in the list.

XtInsertRawEventHandler is similar to XtInsertEventHandler except that it does not modify the widget’s event mask and never causes an XSelectInput for the specified events. If the procedure is already registered with the same client_data value, the specified mask augments the existing mask and the procedure is repositioned in the list.

SEE ALSO

XtAppNextEvent(3), XtBuildEventMask(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

383 - Linux cli command NetSNMP_default_storepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command NetSNMP_default_storepm and provides detailed information about the command NetSNMP_default_storepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the NetSNMP_default_storepm.

NAME 🖥️ NetSNMP_default_storepm 🖥️

Perl extension for Net-SNMP generic storage of global data

SYNOPSIS

use NetSNMP::default_store qw(:all); $port = netsnmp_ds_get_int(NETSNMP_DS_LIBRARY_ID, DS_LIB_DEFAULT_PORT); netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, DS_LIB_DEFAULT_PORT, 161);

DESCRIPTION

This module is a wrapper around the net-snmp default store routines. See the net-snmp default_store manual page for details on what the various functions do and the values that can be set/retrieved.

EXPORT

None by default.

Exportable constants

NETSNMP_DS_MAX_IDS NETSNMP_DS_MAX_SUBIDS NETSNMP_DS_LIBRARY_ID NETSNMP_DS_APPLICATION_ID NETSNMP_DS_TOKEN_ID NETSNMP_DS_LIB_MIB_ERRORS NETSNMP_DS_LIB_SAVE_MIB_DESCRS NETSNMP_DS_LIB_MIB_COMMENT_TERM NETSNMP_DS_LIB_MIB_PARSE_LABEL NETSNMP_DS_LIB_DUMP_PACKET NETSNMP_DS_LIB_LOG_TIMESTAMP NETSNMP_DS_LIB_DONT_READ_CONFIGS NETSNMP_DS_LIB_MIB_REPLACE NETSNMP_DS_LIB_PRINT_NUMERIC_ENUM NETSNMP_DS_LIB_PRINT_NUMERIC_OIDS NETSNMP_DS_LIB_DONT_BREAKDOWN_OIDS NETSNMP_DS_LIB_ALARM_DONT_USE_SIG NETSNMP_DS_LIB_PRINT_FULL_OID NETSNMP_DS_LIB_QUICK_PRINT NETSNMP_DS_LIB_RANDOM_ACCESS NETSNMP_DS_LIB_REGEX_ACCESS NETSNMP_DS_LIB_DONT_CHECK_RANGE NETSNMP_DS_LIB_NO_TOKEN_WARNINGS NETSNMP_DS_LIB_NUMERIC_TIMETICKS NETSNMP_DS_LIB_ESCAPE_QUOTES NETSNMP_DS_LIB_REVERSE_ENCODE NETSNMP_DS_LIB_PRINT_BARE_VALUE NETSNMP_DS_LIB_EXTENDED_INDEX NETSNMP_DS_LIB_PRINT_HEX_TEXT NETSNMP_DS_LIB_PRINT_UCD_STYLE_OID NETSNMP_DS_LIB_READ_UCD_STYLE_OID NETSNMP_DS_LIB_HAVE_READ_PREMIB_CONFIG NETSNMP_DS_LIB_HAVE_READ_CONFIG NETSNMP_DS_LIB_QUICKE_PRINT NETSNMP_DS_LIB_DONT_PRINT_UNITS NETSNMP_DS_LIB_NO_DISPLAY_HINT NETSNMP_DS_LIB_16BIT_IDS NETSNMP_DS_LIB_DONT_PERSIST_STATE NETSNMP_DS_LIB_2DIGIT_HEX_OUTPUT NETSNMP_DS_LIB_IGNORE_NO_COMMUNITY NETSNMP_DS_LIB_DISABLE_PERSISTENT_LOAD NETSNMP_DS_LIB_DISABLE_PERSISTENT_SAVE NETSNMP_DS_LIB_APPEND_LOGFILES NETSNMP_DS_LIB_CLIENT_ADDR_USES_PORT NETSNMP_DS_LIB_MIB_WARNINGS NETSNMP_DS_LIB_SECLEVEL NETSNMP_DS_LIB_SNMPVERSION NETSNMP_DS_LIB_DEFAULT_PORT NETSNMP_DS_LIB_OID_OUTPUT_FORMAT NETSNMP_DS_LIB_STRING_OUTPUT_FORMAT NETSNMP_DS_LIB_HEX_OUTPUT_LENGTH NETSNMP_DS_LIB_SERVERSENDBUF NETSNMP_DS_LIB_SERVERRECVBUF NETSNMP_DS_LIB_CLIENTSENDBUF NETSNMP_DS_LIB_CLIENTRECVBUF NETSNMP_DS_SNMP_VERSION_1 NETSNMP_DS_SNMP_VERSION_2c NETSNMP_DS_SNMP_VERSION_3 NETSNMP_DS_LIB_SECNAME NETSNMP_DS_LIB_CONTEXT NETSNMP_DS_LIB_PASSPHRASE NETSNMP_DS_LIB_AUTHPASSPHRASE NETSNMP_DS_LIB_PRIVPASSPHRASE NETSNMP_DS_LIB_OPTIONALCONFIG NETSNMP_DS_LIB_APPTYPE NETSNMP_DS_LIB_COMMUNITY NETSNMP_DS_LIB_PERSISTENT_DIR NETSNMP_DS_LIB_CONFIGURATION_DIR NETSNMP_DS_LIB_SECMODEL NETSNMP_DS_LIB_MIBDIRS NETSNMP_DS_LIB_OIDSUFFIX NETSNMP_DS_LIB_OIDPREFIX NETSNMP_DS_LIB_CLIENT_ADDR NETSNMP_DS_LIB_TEMP_FILE_PATTERN NETSNMP_DS_LIB_AUTHMASTERKEY NETSNMP_DS_LIB_PRIVMASTERKEY NETSNMP_DS_LIB_AUTHLOCALIZEDKEY NETSNMP_DS_LIB_PRIVLOCALIZEDKEY NETSNMP_DS_LIB_APPTYPES NETSNMP_DS_LIB_KSM_KEYTAB NETSNMP_DS_LIB_KSM_SERVICE_NAME NETSNMP_DS_LIB_SBSM_LOCAL_PWD

Exportable functions

int netsnmp_ds_get_boolean(int storeid, int which) int netsnmp_ds_get_int(int storeid, int which) char *netsnmp_ds_get_string(int storeid, int which) void *netsnmp_ds_get_void(int storeid, int which) int netsnmp_ds_register_config(unsigned char type, const char *ftype, const char *token, int storeid, int which) int netsnmp_ds_register_premib(unsigned char type, const char *ftype, const char *token, int storeid, int which) int netsnmp_ds_set_boolean(int storeid, int which, int value) int netsnmp_ds_set_int(int storeid, int which, int value) int netsnmp_ds_set_string(int storeid, int which, const char *value) int netsnmp_ds_set_void(int storeid, int which, void *value) void netsnmp_ds_shutdown(void) int netsnmp_ds_toggle_boolean(int storeid, int which)

AUTHOR

Wes Hardaker, [email protected]

SEE ALSO

perl (1), default_store (3).

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

384 - Linux cli command XtSetWarningMsgHandler

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtSetWarningMsgHandler and provides detailed information about the command XtSetWarningMsgHandler, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtSetWarningMsgHandler.

NAME 🖥️ XtSetWarningMsgHandler 🖥️

high-level error handlers

SYNTAX

#include <X11/Intrinsic.h>

void XtErrorMsg(const char *name, const char *type, const char *class, const char *defaultMsg, String *params, Cardinal *num_params);

void XtSetErrorMsgHandler(XtErrorMsgHandler msg_handler);

void XtSetWarningMsgHandler(XtErrorMsgHandler msg_handler);

void XtWarningMsg(const char *name, const char *type, const char *class, const char *defaultMsg, String *params, Cardinal *num_params);

ARGUMENTS

class
Specifies the resource class of the error message.

default
Specifies the default message to use.

name
Specifies the general kind of error.

type
Specifies the detailed name of the error.

msg_handler
Specifies the new fatal error procedure, which should not return or the nonfatal error procedure, which usually returns.

num_params
Specifies the number of values in the parameter list.

params
Specifies a pointer to a list of values to be stored in the message.

DESCRIPTION

The XtErrorMsg function has been superceded by XtAppErrorMsg.

The XtSetErrorMsgHandler function has been superceded by XtAppSetErrorMsgHandler.

The XtSetWarningMsgHandler function has been superceded by XtAppSetWarningMsgHandler.

The XtWarningMsg function has been superceded by XtAppWarningMsg

SEE ALSO

XtAppErrorMsg(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

385 - Linux cli command IO_All_STDIOpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_All_STDIOpm and provides detailed information about the command IO_All_STDIOpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_All_STDIOpm.

NAME 🖥️ IO_All_STDIOpm 🖥️

STDIO Support for IO::All

SYNOPSIS

See IO::All.

DESCRIPTION

<<<cpan-foot>>>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

386 - Linux cli command snprintf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command snprintf and provides detailed information about the command snprintf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the snprintf.

NAME 🖥️ snprintf 🖥️

formatted output conversion

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int printf(const char *restrict format, ...);
int fprintf(FILE *restrict stream,
 const char *restrict format, ...);
int dprintf(int fd,
 const char *restrict format, ...);
int sprintf(char *restrict str,
 const char *restrict format, ...);
int snprintf(char str[restrict .size], size_t size,
 const char *restrict format, ...);
int vprintf(const char *restrict format, va_list ap);
int vfprintf(FILE *restrict stream,
 const char *restrict format, va_list ap);
int vdprintf(int fd,
 const char *restrict format, va_list ap);
int vsprintf(char *restrict str,
 const char *restrict format, va_list ap);
int vsnprintf(char str[restrict .size], size_t size,
 const char *restrict format, va_list ap);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

snprintf(), vsnprintf():

    _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE

dprintf(), vdprintf():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The functions in the printf() family produce output according to a format as described below. The functions printf() and vprintf() write output to stdout, the standard output stream; fprintf() and vfprintf() write output to the given output stream; sprintf(), snprintf(), vsprintf(), and vsnprintf() write to the character string str.

The function dprintf() is the same as fprintf() except that it outputs to a file descriptor, fd, instead of to a stdio(3) stream.

The functions snprintf() and vsnprintf() write at most size bytes (including the terminating null byte (‘�’)) to str.

The functions vprintf(), vfprintf(), vdprintf(), vsprintf(), vsnprintf() are equivalent to the functions printf(), fprintf(), dprintf(), sprintf(), snprintf(), respectively, except that they are called with a va_list instead of a variable number of arguments. These functions do not call the va_end macro. Because they invoke the va_arg macro, the value of ap is undefined after the call. See stdarg(3).

All of these functions write the output under the control of a format string that specifies how subsequent arguments (or arguments accessed via the variable-length argument facilities of stdarg(3)) are converted for output.

C99 and POSIX.1-2001 specify that the results are undefined if a call to sprintf(), snprintf(), vsprintf(), or vsnprintf() would cause copying to take place between objects that overlap (e.g., if the target string array and one of the supplied input arguments refer to the same buffer). See CAVEATS.

Format of the format string

The format string is a character string, beginning and ending in its initial shift state, if any. The format string is composed of zero or more directives: ordinary characters (not %), which are copied unchanged to the output stream; and conversion specifications, each of which results in fetching zero or more subsequent arguments. Each conversion specification is introduced by the character %, and ends with a conversion specifier. In between there may be (in this order) zero or more flags, an optional minimum field width, an optional precision and an optional length modifier.

The overall syntax of a conversion specification is:

%[$][flags][width][.precision][length modifier]conversion

The arguments must correspond properly (after type promotion) with the conversion specifier. By default, the arguments are used in the order given, where each ‘*’ (see Field width and Precision below) and each conversion specifier asks for the next argument (and it is an error if insufficiently many arguments are given). One can also specify explicitly which argument is taken, at each place where an argument is required, by writing “%m$” instead of ‘%’ and “*m$” instead of ‘*’, where the decimal integer m denotes the position in the argument list of the desired argument, indexed starting from 1. Thus,

printf("%*d", width, num);

and

printf("%2$*1$d", width, num);

are equivalent. The second style allows repeated references to the same argument. The C99 standard does not include the style using ‘$’, which comes from the Single UNIX Specification. If the style using ‘$’ is used, it must be used throughout for all conversions taking an argument and all width and precision arguments, but it may be mixed with “%%” formats, which do not consume an argument. There may be no gaps in the numbers of arguments specified using ‘$’; for example, if arguments 1 and 3 are specified, argument 2 must also be specified somewhere in the format string.

For some numeric conversions a radix character (“decimal point”) or thousands’ grouping character is used. The actual character used depends on the LC_NUMERIC part of the locale. (See setlocale(3).) The POSIX locale uses ‘.’ as radix character, and does not have a grouping character. Thus,

printf("%'.2f", 1234567.89);

results in “1234567.89” in the POSIX locale, in “1234567,89” in the nl_NL locale, and in “1.234.567,89” in the da_DK locale.

Flag characters

The character % is followed by zero or more of the following flags:

#
The value should be converted to an “alternate form”. For o conversions, the first character of the output string is made zero (by prefixing a 0 if it was not zero already). For x and X conversions, a nonzero result has the string “0x” (or “0X” for X conversions) prepended to it. For a, A, e, E, f, F, g, and G conversions, the result will always contain a decimal point, even if no digits follow it (normally, a decimal point appears in the results of those conversions only if a digit follows). For g and G conversions, trailing zeros are not removed from the result as they would otherwise be. For m, if errno contains a valid error code, the output of strerrorname_np(errno) is printed; otherwise, the value stored in errno is printed as a decimal number. For other conversions, the result is undefined.

0
The value should be zero padded. For d, i, o, u, x, X, a, A, e, E, f, F, g, and G conversions, the converted value is padded on the left with zeros rather than blanks. If the 0 and - flags both appear, the 0 flag is ignored. If a precision is given with an integer conversion (d, i, o, u, x, and X), the 0 flag is ignored. For other conversions, the behavior is undefined.

-
The converted value is to be left adjusted on the field boundary. (The default is right justification.) The converted value is padded on the right with blanks, rather than on the left with blanks or zeros. A - overrides a 0 if both are given.

’ ‘
(a space) A blank should be left before a positive number (or empty string) produced by a signed conversion.

+
A sign (+ or -) should always be placed before a number produced by a signed conversion. By default, a sign is used only for negative numbers. A + overrides a space if both are used.

The five flag characters above are defined in the C99 standard. The Single UNIX Specification specifies one further flag character.


For decimal conversion (i, d, u, f, F, g, G) the output is to be grouped with thousands’ grouping characters if the locale information indicates any. (See setlocale(3).) Note that many versions of gcc(1) cannot parse this option and will issue a warning. (SUSv2 did not include %‘F, but SUSv3 added it.) Note also that the default locale of a C program is “C” whose locale information indicates no thousands’ grouping character. Therefore, without a prior call to setlocale(3), no thousands’ grouping characters will be printed.

glibc 2.2 adds one further flag character.

I
For decimal integer conversion (i, d, u) the output uses the locale’s alternative output digits, if any. For example, since glibc 2.2.3 this will give Arabic-Indic digits in the Persian (“fa_IR”) locale.

Field width

An optional decimal digit string (with nonzero first digit) specifying a minimum field width. If the converted value has fewer characters than the field width, it will be padded with spaces on the left (or right, if the left-adjustment flag has been given). Instead of a decimal digit string one may write “*” or “*m$” (for some decimal integer m) to specify that the field width is given in the next argument, or in the m-th argument, respectively, which must be of type int. A negative field width is taken as a ‘-’ flag followed by a positive field width. In no case does a nonexistent or small field width cause truncation of a field; if the result of a conversion is wider than the field width, the field is expanded to contain the conversion result.

Precision

An optional precision, in the form of a period (’.’) followed by an optional decimal digit string. Instead of a decimal digit string one may write “*” or “*m$” (for some decimal integer m) to specify that the precision is given in the next argument, or in the m-th argument, respectively, which must be of type int. If the precision is given as just ‘.’, the precision is taken to be zero. A negative precision is taken as if the precision were omitted. This gives the minimum number of digits to appear for d, i, o, u, x, and X conversions, the number of digits to appear after the radix character for a, A, e, E, f, and F conversions, the maximum number of significant digits for g and G conversions, or the maximum number of characters to be printed from a string for s and S conversions.

Length modifier

Here, “integer conversion” stands for d, i, o, u, x, or X conversion.

hh
A following integer conversion corresponds to a signed char or unsigned char argument, or a following n conversion corresponds to a pointer to a signed char argument.

h
A following integer conversion corresponds to a short or unsigned short argument, or a following n conversion corresponds to a pointer to a short argument.

l
(ell) A following integer conversion corresponds to a long or unsigned long argument, or a following n conversion corresponds to a pointer to a long argument, or a following c conversion corresponds to a wint_t argument, or a following s conversion corresponds to a pointer to wchar_t argument. On a following a, A, e, E, f, F, g, or G conversion, this length modifier is ignored (C99; not in SUSv2).

ll
(ell-ell). A following integer conversion corresponds to a long long or unsigned long long argument, or a following n conversion corresponds to a pointer to a long long argument.

q
A synonym for ll. This is a nonstandard extension, derived from BSD; avoid its use in new code.

L
A following a, A, e, E, f, F, g, or G conversion corresponds to a long double argument. (C99 allows %LF, but SUSv2 does not.)

j
A following integer conversion corresponds to an intmax_t or uintmax_t argument, or a following n conversion corresponds to a pointer to an intmax_t argument.

z
A following integer conversion corresponds to a size_t or ssize_t argument, or a following n conversion corresponds to a pointer to a size_t argument.

Z
A nonstandard synonym for z that predates the appearance of z. Do not use in new code.

t
A following integer conversion corresponds to a ptrdiff_t argument, or a following n conversion corresponds to a pointer to a ptrdiff_t argument.

SUSv3 specifies all of the above, except for those modifiers explicitly noted as being nonstandard extensions. SUSv2 specified only the length modifiers h (in hd, hi, ho, hx, hX, hn) and l (in ld, li, lo, lx, lX, ln, lc, ls) and L (in Le, LE, Lf, Lg, LG).

As a nonstandard extension, the GNU implementations treats ll and L as synonyms, so that one can, for example, write llg (as a synonym for the standards-compliant Lg) and Ld (as a synonym for the standards compliant lld). Such usage is nonportable.

Conversion specifiers

A character that specifies the type of conversion to be applied. The conversion specifiers and their meanings are:

d, i
The int argument is converted to signed decimal notation. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.

o, u, x, X
The unsigned int argument is converted to unsigned octal (o), unsigned decimal (u), or unsigned hexadecimal (x and X) notation. The letters abcdef are used for x conversions; the letters ABCDEF are used for X conversions. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.

e, E
The double argument is rounded and converted in the style [-]d**.ddde**±dd where there is one digit (which is nonzero if the argument is nonzero) before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero, no decimal-point character appears. An E conversion uses the letter E (rather than e) to introduce the exponent. The exponent always contains at least two digits; if the value is zero, the exponent is 00.

f, F
The double argument is rounded and converted to decimal notation in the style [-]ddd**.**ddd, where the number of digits after the decimal-point character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. If a decimal point appears, at least one digit appears before it.

(SUSv2 does not know about F and says that character string representations for infinity and NaN may be made available. SUSv3 adds a specification for F. The C99 standard specifies “[-]inf” or “[-]infinity” for infinity, and a string starting with “nan” for NaN, in the case of f conversion, and “[-]INF” or “[-]INFINITY” or “NAN” in the case of F conversion.)

g, G
The double argument is converted in style f or e (or F or E for G conversions). The precision specifies the number of significant digits. If the precision is missing, 6 digits are given; if the precision is zero, it is treated as 1. Style e is used if the exponent from its conversion is less than -4 or greater than or equal to the precision. Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit.

a, A
(C99; not in SUSv2, but added in SUSv3) For a conversion, the double argument is converted to hexadecimal notation (using the letters abcdef) in the style [-]0xh**.hhhhp**±d; for A conversion the prefix 0X, the letters ABCDEF, and the exponent separator P is used. There is one hexadecimal digit before the decimal point, and the number of digits after it is equal to the precision. The default precision suffices for an exact representation of the value if an exact representation in base 2 exists and otherwise is sufficiently large to distinguish values of type double. The digit before the decimal point is unspecified for nonnormalized numbers, and nonzero but otherwise unspecified for normalized numbers. The exponent always contains at least one digit; if the value is zero, the exponent is 0.

c
If no l modifier is present, the int argument is converted to an unsigned char, and the resulting character is written. If an l modifier is present, the wint_t (wide character) argument is converted to a multibyte sequence by a call to the wcrtomb(3) function, with a conversion state starting in the initial state, and the resulting multibyte string is written.

s
If no l modifier is present: the const char * argument is expected to be a pointer to an array of character type (pointer to a string). Characters from the array are written up to (but not including) a terminating null byte (‘�’); if a precision is specified, no more than the number specified are written. If a precision is given, no null byte need be present; if the precision is not specified, or is greater than the size of the array, the array must contain a terminating null byte.

If an l modifier is present: the const wchar_t * argument is expected to be a pointer to an array of wide characters. Wide characters from the array are converted to multibyte characters (each by a call to the wcrtomb(3) function, with a conversion state starting in the initial state before the first wide character), up to and including a terminating null wide character. The resulting multibyte characters are written up to (but not including) the terminating null byte. If a precision is specified, no more bytes than the number specified are written, but no partial multibyte characters are written. Note that the precision determines the number of bytes written, not the number of wide characters or screen positions. The array must contain a terminating null wide character, unless a precision is given and it is so small that the number of bytes written exceeds it before the end of the array is reached.

C
(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.) Synonym for lc. Don’t use.

S
(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.) Synonym for ls. Don’t use.

p
The void * pointer argument is printed in hexadecimal (as if by %#x or %#lx).

n
The number of characters written so far is stored into the integer pointed to by the corresponding argument. That argument shall be an int *, or variant whose size matches the (optionally) supplied integer length modifier. No argument is converted. (This specifier is not supported by the bionic C library.) The behavior is undefined if the conversion specification includes any flags, a field width, or a precision.

m
(glibc extension; supported by uClibc and musl.) Print output of strerror(errno) (or strerrorname_np(errno) in the alternate form). No argument is required.

%
A ‘%’ is written. No argument is converted. The complete conversion specification is ‘%%’.

RETURN VALUE

Upon successful return, these functions return the number of bytes printed (excluding the null byte used to end output to strings).

The functions snprintf() and vsnprintf() do not write more than size bytes (including the terminating null byte (‘�’)). If the output was truncated due to this limit, then the return value is the number of characters (excluding the terminating null byte) which would have been written to the final string if enough space had been available. Thus, a return value of size or more means that the output was truncated. (See also below under CAVEATS.)

If an output error is encountered, a negative value is returned.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

printf(), fprintf(), sprintf(), snprintf(), vprintf(), vfprintf(), vsprintf(), vsnprintf()

Thread safetyMT-Safe locale

STANDARDS

fprintf()
printf()
sprintf()
vprintf()
vfprintf()
vsprintf()
snprintf()
vsnprintf()
C11, POSIX.1-2008.

dprintf()
vdprintf()
GNU, POSIX.1-2008.

HISTORY

fprintf()
printf()
sprintf()
vprintf()
vfprintf()
vsprintf()
C89, POSIX.1-2001.

snprintf()
vsnprintf()
SUSv2, C99, POSIX.1-2001.

Concerning the return value of snprintf(), SUSv2 and C99 contradict each other: when snprintf() is called with size=0 then SUSv2 stipulates an unspecified return value less than 1, while C99 allows str to be NULL in this case, and gives the return value (as always) as the number of characters that would have been written in case the output string has been large enough. POSIX.1-2001 and later align their specification of snprintf() with C99.

dprintf()
vdprintf()
GNU, POSIX.1-2008.

glibc 2.1 adds length modifiers hh, j, t, and z and conversion characters a and A.

glibc 2.2 adds the conversion character F with C99 semantics, and the flag character I.

glibc 2.35 gives a meaning to the alternate form (#) of the m conversion specifier, that is %#m.

CAVEATS

Some programs imprudently rely on code such as the following

sprintf(buf, "%s some further text", buf);

to append text to buf. However, the standards explicitly note that the results are undefined if source and destination buffers overlap when calling sprintf(), snprintf(), vsprintf(), and vsnprintf(). Depending on the version of gcc(1) used, and the compiler options employed, calls such as the above will not produce the expected results.

The glibc implementation of the functions snprintf() and vsnprintf() conforms to the C99 standard, that is, behaves as described above, since glibc 2.1. Until glibc 2.0.6, they would return -1 when the output was truncated.

BUGS

Because sprintf() and vsprintf() assume an arbitrarily long string, callers must be careful not to overflow the actual space; this is often impossible to assure. Note that the length of the strings produced is locale-dependent and difficult to predict. Use snprintf() and vsnprintf() instead (or asprintf(3) and vasprintf(3)).

Code such as printf(foo); often indicates a bug, since foo may contain a % character. If foo comes from untrusted user input, it may contain %n, causing the printf() call to write to memory and creating a security hole.

EXAMPLES

To print Pi to five decimal places:

#include <math.h>
#include <stdio.h>
fprintf(stdout, "pi = %.5f

“, 4 * atan(1.0));

To print a date and time in the form “Sunday, July 3, 10:02”, where weekday and month are pointers to strings:

#include <stdio.h>
fprintf(stdout, "%s, %s %d, %.2d:%.2d

“, weekday, month, day, hour, min);

Many countries use the day-month-year order. Hence, an internationalized version must be able to print the arguments in an order specified by the format:

#include <stdio.h>
fprintf(stdout, format,
        weekday, month, day, hour, min);

where format depends on locale, and may permute the arguments. With the value:

"%1$s, %3$d. %2$s, %4$d:%5$.2d

"

one might obtain “Sonntag, 3. Juli, 10:02”.

To allocate a sufficiently large string and print into it (code correct for both glibc 2.0 and glibc 2.1):

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
char *
make_message(const char *fmt, ...)
{
    int n = 0;
    size_t size = 0;
    char *p = NULL;
    va_list ap;
    /* Determine required size. */
    va_start(ap, fmt);
    n = vsnprintf(p, size, fmt, ap);
    va_end(ap);
    if (n < 0)
        return NULL;
    size = (size_t) n + 1;      /* One extra byte for '' */
    p = malloc(size);
    if (p == NULL)
        return NULL;
    va_start(ap, fmt);
    n = vsnprintf(p, size, fmt, ap);
    va_end(ap);
    if (n < 0) {
        free(p);
        return NULL;
    }
    return p;
}

If truncation occurs in glibc versions prior to glibc 2.0.6, this is treated as an error instead of being handled gracefully.

SEE ALSO

printf(1), asprintf(3), puts(3), scanf(3), setlocale(3), strfromd(3), wcrtomb(3), wprintf(3), locale(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

387 - Linux cli command uintptr_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command uintptr_ttype and provides detailed information about the command uintptr_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the uintptr_ttype.

NAME 🖥️ uintptr_ttype 🖥️

integer types wide enough to hold pointers

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <stdint.h>
typedef /* ... */ intptr_t;
typedef /* ... */ uintptr_t;
#define INTPTR_WIDTH /* ... */
#define UINTPTR_WIDTH INTPTR_WIDTH
#define INTPTR_MAX /* 2**(INTPTR_WIDTH - 1) - 1 */
#define INTPTR_MIN /* - 2**(INTPTR_WIDTH - 1) */
#define UINTPTR_MAX /* 2**UINTPTR_WIDTH - 1 */

DESCRIPTION

intptr_t is a signed integer type such that any valid (void *) value can be converted to this type and then converted back. It is capable of storing values in the range [INTPTR_MIN, INTPTR_MAX].

uintptr_t is an unsigned integer type such that any valid (void *) value can be converted to this type and then converted back. It is capable of storing values in the range [0, INTPTR_MAX].

The macros [U]INTPTR_WIDTH expand to the width in bits of these types.

The macros [U]INTPTR_MAX expand to the maximum value that these types can hold.

The macro INTPTR_MIN expands to the minimum value that intptr_t can hold.

The length modifiers for the [u]intptr_t types for the printf(3) family of functions are expanded by the macros PRIdPTR, PRIiPTR, and PRIuPTR (defined in <inttypes.h>); resulting commonly in %“PRIdPTR” or %“PRIiPTR” for printing intptr_t values. The length modifiers for the *[u]*intptr_t types for the scanf(3) family of functions are expanded by the macros SCNdPTR, SCNiPTR, and SCNuPTR (defined in <inttypes.h>); resulting commonly in %“SCNuPTR” for scanning uintptr_t values.

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

NOTES

The following header also provides these types: <inttypes.h>.

SEE ALSO

intmax_t(3type), void(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

388 - Linux cli command procps

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command procps and provides detailed information about the command procps, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the procps.

NAME 🖥️ procps 🖥️

API to access system level information in the /proc filesystem

SYNOPSIS

Five distinct interfaces are represented in this synopsis and named after the files they access in the /proc pseudo filesystem: diskstats, meminfo, slabinfo, stat and vmstat.

#include <libproc2/named_interface.h>

int procps_new (struct info **info);
int procps_ref (struct info *info);
int procps_unref (struct info **info);

struct result *procps_get (
 struct info *info,
[ const char *name, ] diskstats api only
 enum item item);

struct stack *procps_select (
 struct info *info,
[ const char *name, ] diskstats api only
 enum item *items,
 int numitems);

struct reaped *procps_reap (
 struct info *info,
[ enum reap_type what, ] stat api only
 enum item *items,
 int numitems);

struct stack **procps_sort (
 struct info *info,
 struct stack *stacks[],
 int numstacked,
 enum item sortitem,
 enum sort_order order);

The above functions and structures are generic but the specific named_interface would also be part of any identifiers. For example, `procps_new’ would actually be `procps_meminfo_new’ and `info’ would really be `diskstats_info’, etc.

The same named_interface is used in each header file name with an appended `.h’ suffix.

Link with -lproc2.

DESCRIPTION

Overview

Central to these interfaces is a simple `result’ structure reflecting an `item’ plus its value (in a union with standard C language types as members). All `result’ structures are automatically allocated and provided by the library.

By specifying an array of `items’, these structures can be organized as a `stack’, potentially yielding many results with a single function call. Thus, a `stack’ can be viewed as a variable length record whose content and order is determined solely by the user.

As part of each interface there are two unique enumerators. The `noop’ and `extra’ items exist to hold user values. They are never set by the library, but the `extra’ result will be zeroed with each library interaction.

The named_interface header file will be an essential document during user program development. There you will find available items, their return type (the `result’ struct member name) and the source for such values. Additional enumerators and structures are also documented there.

Usage

The following would be a typical sequence of calls to these interfaces.

1. procps_new()
2. procps_get(), procps_select() or procps_reap()
3. procps_unref()

The get function is used to retrieve a `result’ structure for a single `item’. Alternatively, a GET macro is available when only the return value is of interest.

The select function can retrieve multiple `result’ structures in a single `stack'.

For unpredictable variable outcomes, the diskstats, slabinfo and stat interfaces export a reap function. It is used to retrieve multiple `stacks’ each containing multiple `result’ structures. Optionally, a user may choose to sort those results.

To exploit any `stack’, and access individual `result’ structures, a relative_enum is required as shown in the VAL macro defined in the header file. Such values could be hard coded as: 0 through numitems-1. However, this need is typically satisfied by creating your own enumerators corresponding to the order of the `items’ array.

Caveats

The new, ref, unref, get and select functions are available in all five interfaces.

For the new and unref functions, the address of an info struct pointer must be supplied. With new it must have been initialized to NULL. With unref it will be reset to NULL if the reference count reaches zero.

In the case of the diskstats interface, a name parameter on the get and select functions identifies a disk or partition name

For the stat interface, a what parameter on the reap function identifies whether data for just CPUs or both CPUs and NUMA nodes is to be gathered.

When using the sort function, the parameters stacks and numstacked would normally be those returned in the `reaped’ structure.

RETURN VALUE

Functions Returning an `int'

An error will be indicated by a negative number that is always the inverse of some well known errno.h value.

Success is indicated by a zero return value. However, the ref and unref functions return the current info structure reference count.

Functions Returning an `address'

An error will be indicated by a NULL return pointer with the reason found in the formal errno value.

Success is indicated by a pointer to the named structure.

DEBUGGING

To aid in program development, there is a provision that can help ensure `result’ member references agree with library expectations. It assumes that a supplied macro in the header file is used to access the `result’ value.

This feature can be activated through either of the following methods and any discrepancies will be written to stderr.

  1. Add CFLAGS=’-DXTRA_PROCPS_DEBUG’ to any other ./configure options employed.

  2. Add #include <procps/xtra-procps-debug.h> to any program after the named interface includes.

This verification feature incurs substantial overhead. Therefore, it is important that it not be activated for a production/release build.

SEE ALSO

procps_misc(3), procps_pids(3), proc(5).

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

389 - Linux cli command strndupa

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strndupa and provides detailed information about the command strndupa, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strndupa.

NAME 🖥️ strndupa 🖥️

duplicate a string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strdup(const char *s);
char *strndup(const char s[.n], size_t n);
char *strdupa(const char *s);
char *strndupa(const char s[.n], size_t n);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strdup():

    _XOPEN_SOURCE >= 500
        || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

strndup():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

strdupa(), strndupa():

    _GNU_SOURCE

DESCRIPTION

The strdup() function returns a pointer to a new string which is a duplicate of the string s. Memory for the new string is obtained with malloc(3), and can be freed with free(3).

The strndup() function is similar, but copies at most n bytes. If s is longer than n, only n bytes are copied, and a terminating null byte (‘�’) is added.

strdupa() and strndupa() are similar, but use alloca(3) to allocate the buffer.

RETURN VALUE

On success, the strdup() function returns a pointer to the duplicated string. It returns NULL if insufficient memory was available, with errno set to indicate the error.

ERRORS

ENOMEM
Insufficient memory available to allocate duplicate string.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strdup(), strndup(), strdupa(), strndupa()

Thread safetyMT-Safe

STANDARDS

strdup()
strndup()
POSIX.1-2008.

strdupa()
strndupa()
GNU.

HISTORY

strdup()
SVr4, 4.3BSD-Reno, POSIX.1-2001.

strndup()
POSIX.1-2008.

strdupa()
strndupa()
GNU.

SEE ALSO

alloca(3), calloc(3), free(3), malloc(3), realloc(3), string(3), wcsdup(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

390 - Linux cli command ttyslot

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ttyslot and provides detailed information about the command ttyslot, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ttyslot.

NAME 🖥️ ttyslot 🖥️

find the slot of the current user’s terminal in some file

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h> /* See NOTES */
int ttyslot(void);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

ttyslot():

    Since glibc 2.24:
        _DEFAULT_SOURCE
    From glibc 2.20 to glibc 2.23:
        _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)
    glibc 2.19 and earlier:
        _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)

DESCRIPTION

The legacy function ttyslot() returns the index of the current user’s entry in some file.

Now “What file?” you ask. Well, let’s first look at some history.

Ancient history

There used to be a file /etc/ttys in UNIX V6, that was read by the init(1) program to find out what to do with each terminal line. Each line consisted of three characters. The first character was either ‘0’ or ‘1’, where ‘0’ meant “ignore”. The second character denoted the terminal: ‘8’ stood for “/dev/tty8”. The third character was an argument to getty(8) indicating the sequence of line speeds to try (’-’ was: start trying 110 baud). Thus a typical line was “18-”. A hang on some line was solved by changing the ‘1’ to a ‘0’, signaling init, changing back again, and signaling init again.

In UNIX V7 the format was changed: here the second character was the argument to getty(8) indicating the sequence of line speeds to try (‘0’ was: cycle through 300-1200-150-110 baud; ‘4’ was for the on-line console DECwriter) while the rest of the line contained the name of the tty. Thus a typical line was “14console”.

Later systems have more elaborate syntax. System V-like systems have /etc/inittab instead.

Ancient history (2)

On the other hand, there is the file /etc/utmp listing the people currently logged in. It is maintained by login(1). It has a fixed size, and the appropriate index in the file was determined by login(1) using the ttyslot() call to find the number of the line in /etc/ttys (counting from 1).

The semantics of ttyslot

Thus, the function ttyslot() returns the index of the controlling terminal of the calling process in the file /etc/ttys, and that is (usually) the same as the index of the entry for the current user in the file /etc/utmp. BSD still has the /etc/ttys file, but System V-like systems do not, and hence cannot refer to it. Thus, on such systems the documentation says that ttyslot() returns the current user’s index in the user accounting data base.

RETURN VALUE

If successful, this function returns the slot number. On error (e.g., if none of the file descriptors 0, 1, or 2 is associated with a terminal that occurs in this data base) it returns 0 on UNIX V6 and V7 and BSD-like systems, but -1 on System V-like systems.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

ttyslot()

Thread safetyMT-Unsafe

VERSIONS

The utmp file is found in various places on various systems, such as /etc/utmp, /var/adm/utmp, /var/run/utmp.

STANDARDS

None.

HISTORY

SUSv1; marked as LEGACY in SUSv2; removed in POSIX.1-2001. SUSv2 requires -1 on error.

The glibc2 implementation of this function reads the file _PATH_TTYS, defined in <ttyent.h> as “/etc/ttys”. It returns 0 on error. Since Linux systems do not usually have “/etc/ttys”, it will always return 0.

On BSD-like systems and Linux, the declaration of ttyslot() is provided by <unistd.h>. On System V-like systems, the declaration is provided by <stdlib.h>. Since glibc 2.24, <stdlib.h> also provides the declaration with the following feature test macro definitions:

(_XOPEN_SOURCE >= 500 ||
        (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED))
    && ! (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600)

Minix also has fttyslot(fd).

SEE ALSO

getttyent(3), ttyname(3), utmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

391 - Linux cli command XML_Parser_Style_Streampm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_Parser_Style_Streampm and provides detailed information about the command XML_Parser_Style_Streampm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_Parser_Style_Streampm.

NAME 🖥️ XML_Parser_Style_Streampm 🖥️

Stream style for XML::Parser

SYNOPSIS

use XML::Parser; my $p = XML::Parser->new(Style => Stream, Pkg => MySubs); $p->parsefile(foo.xml); { package MySubs; sub StartTag { my ($e, $name) = @_; # do something with start tags } sub EndTag { my ($e, $name) = @_; # do something with end tags } sub Characters { my ($e, $data) = @_; # do something with text nodes } }

DESCRIPTION

This style uses the Pkg option to find subs in a given package to call for each event. If none of the subs that this style looks for is there, then the effect of parsing with this style is to print a canonical copy of the document without comments or declarations. All the subs receive as their 1st parameter the Expat instance for the document they’re parsing.

It looks for the following routines:

  • StartDocument Called at the start of the parse .

  • StartTag Called for every start tag with a second parameter of the element type. The $_ variable will contain a copy of the tag and the %_ variable will contain attribute values supplied for that element.

  • EndTag Called for every end tag with a second parameter of the element type. The $_ variable will contain a copy of the end tag.

  • Text Called just before start or end tags with accumulated non-markup text in the $_ variable.

  • PI Called for processing instructions. The $_ variable will contain a copy of the PI and the target and data are sent as 2nd and 3rd parameters respectively.

  • EndDocument Called at conclusion of the parse.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

392 - Linux cli command metaclasspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command metaclasspm and provides detailed information about the command metaclasspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the metaclasspm.

NAME 🖥️ metaclasspm 🖥️

a pragma for installing and using Class::MOP metaclasses

VERSION

version 2.2207

SYNOPSIS

package MyClass; # use Class::MOP::Class use metaclass; # … or use a custom metaclass use metaclass MyMetaClass; # … or use a custom metaclass # and custom attribute and method # metaclasses use metaclass MyMetaClass => ( attribute_metaclass => MyAttributeMetaClass, method_metaclass => MyMethodMetaClass, ); # … or just specify custom attribute # and method classes, and Class::MOP::Class # is the assumed metaclass use metaclass ( attribute_metaclass => MyAttributeMetaClass, method_metaclass => MyMethodMetaClass, ); # if wed rather not install a meta method, we can do this use metaclass meta_name => undef; # or if wed like it to have a different name, use metaclass meta_name => my_meta;

DESCRIPTION

This is a pragma to make it easier to use a specific metaclass and a set of custom attribute and method metaclasses. It also installs a meta method to your class as well, unless undef is passed to the meta_name option.

Note that if you are using Moose, you most likely do not want to be using this - look into Moose::Util::MetaRole instead.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

393 - Linux cli command updwtmp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command updwtmp and provides detailed information about the command updwtmp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the updwtmp.

NAME 🖥️ updwtmp 🖥️

append an entry to the wtmp file

LIBRARY

System utilities library (libutil, -lutil)

SYNOPSIS

#include <utmp.h>
void updwtmp(const char *wtmp_file, const struct utmp *ut);
void logwtmp(const char *line, const char *name",constchar*"host);

DESCRIPTION

updwtmp() appends the utmp structure ut to the wtmp file.

logwtmp() constructs a utmp structure using line, name, host, current time, and current process ID. Then it calls updwtmp() to append the structure to the wtmp file.

FILES

/var/log/wtmp
database of past user logins

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

updwtmp(), logwtmp()

Thread safetyMT-Unsafe sig:ALRM timer

VERSIONS

For consistency with the other “utmpx” functions (see getutxent(3)), glibc provides (since glibc 2.1):

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <utmpx.h>
void updwtmpx (const char *wtmpx_file, const struct utmpx *utx);

This function performs the same task as updwtmp(), but differs in that it takes a utmpx structure as its last argument.

STANDARDS

None.

HISTORY

Solaris, NetBSD.

SEE ALSO

getutxent(3), wtmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

394 - Linux cli command XtFindFile

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtFindFile and provides detailed information about the command XtFindFile, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtFindFile.

NAME 🖥️ XtFindFile 🖥️

search for a file using substitutions in the path list

SYNTAX

#include <X11/Intrinsic.h>

char * XtFindFile(const char *path, Substitution substitutions, Cardinal num_substitutions, XtFilePredicate predicate);

ARGUMENTS

path
Specifies a path of file names, including substitution characters.

substitutions
Specifies a list of substitutions to make into a path.

num_substitutions
Specifies the number of substitutions passed in.

predicate
Specifies a procedure to call to judge a potential file name, or NULL.

DESCRIPTION

The path parameter specifies a string that consists of a series of potential file names delimited by colons. Within each name, the percent character specifies a string substitution selected by the following character. The character sequence %: specifies an embedded colon that is not a delimiter; the sequence is replaced by a single colon. The character sequence %% specifies a percent character that does not introduce a substitution; the sequence is replaced by a single percent character. If a percent character is followed by any other character, XtFindFile looks through the specified substitutions for that character in the match field and if found replaces the percent and match characters with the string in the corresponding substitution field. A substitution field entry of NULL is equivalent to a pointer to an empty string. If the operating system does not interpret multiple embedded name separators in the path (i.e., / in POSIX) the same way as a single separator, XtFindFile will collapse multiple separators into a single one after performing all string substitutions. Except for collapsing embedded separators, the contents of the string substitutions are not interpreted by XtFindFile and may therefore contain any operating-system-dependent characters, including additional name separators. Each resulting string is passed to the predicate procedure until a string is found for which the procedure returns True; this string is the return value for XtFindFile. If no string yields a True return from the predicate, XtFindFile returns NULL.

If the predicate parameter is NULL, an internal procedure that checks if the file exists, is readable, and is not a directory will be used.

It is the responsibility of the caller to free the returned string using XtFree when it is no longer needed.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

395 - Linux cli command ynf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ynf and provides detailed information about the command ynf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ynf.

NAME 🖥️ ynf 🖥️

Bessel functions of the second kind

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double y0(double x);
double y1(double x);
double yn(int n, double x);
float y0f(float x);
float y1f(float x);
float ynf(int n, float x);
long double y0l(long double x);
long double y1l(long double x);
long double ynl(int n, long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

y0(), y1(), yn():

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

y0f(), y0l(), y1f(), y1l(), ynf(), ynl():

    _XOPEN_SOURCE >= 600
        || (_ISOC99_SOURCE && _XOPEN_SOURCE)
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The y0() and y1() functions return Bessel functions of x of the second kind of orders 0 and 1, respectively. The yn() function returns the Bessel function of x of the second kind of order n.

The value of x must be positive.

The y0f(), y1f(), and ynf() functions are versions that take and return float values. The y0l(), y1l(), and ynl() functions are versions that take and return long double values.

RETURN VALUE

On success, these functions return the appropriate Bessel value of the second kind for x.

If x is a NaN, a NaN is returned.

If x is negative, a domain error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively. (POSIX.1-2001 also allows a NaN return for this case.)

If x is 0.0, a pole error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.

If the result underflows, a range error occurs, and the functions return 0.0

If the result overflows, a range error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively. (POSIX.1-2001 also allows a 0.0 return for this case.)

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is negative
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

Pole error: x is 0.0
errno is set to ERANGE and an FE_DIVBYZERO exception is raised (but see BUGS).

Range error: result underflow
errno is set to ERANGE. No FE_UNDERFLOW exception is returned by fetestexcept(3) for this case.

Range error: result overflow
errno is set to ERANGE (but see BUGS). An overflow floating-point exception (FE_OVERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

y0(), y0f(), y0l()

Thread safetyMT-Safe

y1(), y1f(), y1l()

Thread safetyMT-Safe

yn(), ynf(), ynl()

Thread safetyMT-Safe

STANDARDS

y0()
y1()
yn()
POSIX.1-2008.

Others:
BSD.

HISTORY

y0()
y1()
yn()
SVr4, 4.3BSD, POSIX.1-2001.

Others:
BSD.

BUGS

Before glibc 2.19, these functions misdiagnosed pole errors: errno was set to EDOM, instead of ERANGE and no FE_DIVBYZERO exception was raised.

Before glibc 2.17, did not set errno for “range error: result underflow”.

In glibc 2.3.2 and earlier, these functions do not raise an invalid floating-point exception (FE_INVALID) when a domain error occurs.

SEE ALSO

j0(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

396 - Linux cli command stpncpy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command stpncpy and provides detailed information about the command stpncpy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the stpncpy.

NAME 🖥️ stpncpy 🖥️

fill a fixed-size buffer with non-null bytes from a string, padding with null bytes as needed

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strncpy(char dst[restrict .dsize], const char *restrict src,
 size_t dsize);
char *stpncpy(char dst[restrict .dsize], const char *restrict src,
 size_t dsize);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

stpncpy():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions copy non-null bytes from the string pointed to by src into the array pointed to by dst. If the source has too few non-null bytes to fill the destination, the functions pad the destination with trailing null bytes. If the destination buffer, limited by its size, isn’t large enough to hold the copy, the resulting character sequence is truncated. For the difference between the two functions, see RETURN VALUE.

An implementation of these functions might be:

char *
strncpy(char *restrict dst, const char *restrict src, size_t dsize)
{
    stpncpy(dst, src, dsize);
    return dst;
}
char *
stpncpy(char *restrict dst, const char *restrict src, size_t dsize)
{
    size_t  dlen;
    dlen = strnlen(src, dsize);
    return memset(mempcpy(dst, src, dlen), 0, dsize - dlen);
}

RETURN VALUE

strncpy()
returns dst.

stpncpy()
returns a pointer to one after the last character in the destination character sequence.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

stpncpy(), strncpy()

Thread safetyMT-Safe

STANDARDS

strncpy()
C11, POSIX.1-2008.

stpncpy()
POSIX.1-2008.

HISTORY

strncpy()
C89, POSIX.1-2001, SVr4, 4.3BSD.

stpncpy()
glibc 1.07. POSIX.1-2008.

CAVEATS

The name of these functions is confusing. These functions produce a null-padded character sequence, not a string (see string_copying(7)). For example:

strncpy(buf, "1", 5);       // { '1',   0,   0,   0,   0 }
strncpy(buf, "1234", 5);    // { '1', '2', '3', '4',   0 }
strncpy(buf, "12345", 5);   // { '1', '2', '3', '4', '5' }
strncpy(buf, "123456", 5);  // { '1', '2', '3', '4', '5' }

It’s impossible to distinguish truncation by the result of the call, from a character sequence that just fits the destination buffer; truncation should be detected by comparing the length of the input string with the size of the destination buffer.

If you’re going to use this function in chained calls, it would be useful to develop a similar function that accepts a pointer to the end (one after the last element) of the destination buffer instead of its size.

EXAMPLES

#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int
main(void)
{
    char    *p;
    char    buf1[20];
    char    buf2[20];
    size_t  len;
    if (sizeof(buf2) < strlen("Hello world!"))
        errx("strncpy: truncating character sequence");
    strncpy(buf2, "Hello world!", sizeof(buf2));
    len = strnlen(buf2, sizeof(buf2));
    printf("[len = %zu]: ", len);
    fwrite(buf2, 1, len, stdout);
    putchar('

‘); if (sizeof(buf1) < strlen(“Hello world!”)) errx(“stpncpy: truncating character sequence”); p = stpncpy(buf1, “Hello world!”, sizeof(buf1)); len = p - buf1; printf("[len = %zu]: “, len); fwrite(buf1, 1, len, stdout); putchar(’ ‘); exit(EXIT_SUCCESS); }

SEE ALSO

wcpncpy(3), string_copying(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

397 - Linux cli command hypotf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command hypotf and provides detailed information about the command hypotf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the hypotf.

NAME 🖥️ hypotf 🖥️

Euclidean distance function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double hypot(double x, double y);
float hypotf(float x, float y);
long double hypotl(long double x, long double y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

hypot():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

hypotf(), hypotl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return sqrt(x*x+y*y). This is the length of the hypotenuse of a right-angled triangle with sides of length x and y, or the distance of the point (x,y) from the origin.

The calculation is performed without undue overflow or underflow during the intermediate steps of the calculation.

RETURN VALUE

On success, these functions return the length of the hypotenuse of a right-angled triangle with sides of length x and y.

If x or y is an infinity, positive infinity is returned.

If x or y is a NaN, and the other argument is not an infinity, a NaN is returned.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively.

If both arguments are subnormal, and the result is subnormal, a range error occurs, and the correct result is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error: result overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error: result underflow
An underflow floating-point exception (FE_UNDERFLOW) is raised.

These functions do not set errno for this case.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

hypot(), hypotf(), hypotl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD.

SEE ALSO

cabs(3), sqrt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

398 - Linux cli command pthread_mutexattr_getkind_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_mutexattr_getkind_np and provides detailed information about the command pthread_mutexattr_getkind_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_mutexattr_getkind_np.

NAME 🖥️ pthread_mutexattr_getkind_np 🖥️

deprecated mutex creation attributes

SYNOPSIS

#include <pthread.h>
int pthread_mutexattr_setkind_np(pthread_mutexattr_t *attr, int kind);
int pthread_mutexattr_getkind_np(const pthread_mutexattr_t *attr,
 int *kind);

DESCRIPTION

These functions are deprecated, use pthread_mutexattr_settype(3) and pthread_mutexattr_gettype(3) instead.

RETURN VALUE

pthread_mutexattr_getkind_np always returns 0.

pthread_mutexattr_setkind_np returns 0 on success and a non-zero error code on error.

ERRORS

On error, pthread_mutexattr_setkind_np returns the following error code:

EINVAL
kind is neither PTHREAD_MUTEX_FAST_NP nor PTHREAD_MUTEX_RECURSIVE_NP nor PTHREAD_MUTEX_ERRORCHECK_NP.

SEE ALSO

pthread_mutexattr_settype(3), pthread_mutexattr_gettype(3).

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

399 - Linux cli command undocumented

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command undocumented and provides detailed information about the command undocumented, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the undocumented.

NAME 🖥️ undocumented 🖥️

undocumented library functions

SYNOPSIS

Undocumented library functions

DESCRIPTION

This man page mentions those library functions which are implemented in the standard libraries but not yet documented in man pages.

Solicitation

If you have information about these functions, please look in the source code, write a man page (using a style similar to that of the other Linux section 3 man pages), and send it to [email protected] for inclusion in the next man page release.

The list

authdes_create(3), authdes_getucred(3), authdes_pk_create(3), clntunix_create(3), creat64(3), dn_skipname(3), fcrypt(3), fp_nquery(3), fp_query(3), fp_resstat(3), freading(3), freopen64(3), fseeko64(3), ftello64(3), ftw64(3), fwscanf(3), get_avphys_pages(3), getdirentries64(3), getmsg(3), getnetname(3), get_phys_pages(3), getpublickey(3), getsecretkey(3), h_errlist(3), host2netname(3), hostalias(3), inet_nsap_addr(3), inet_nsap_ntoa(3), init_des(3), libc_nls_init(3), mstats(3), netname2host(3), netname2user(3), nlist(3), obstack_free(3), parse_printf_format(3), p_cdname(3), p_cdnname(3), p_class(3), p_fqname(3), p_option(3), p_query(3), printf_size(3), printf_size_info(3), p_rr(3), p_time(3), p_type(3), putlong(3), putshort(3), re_compile_fastmap(3), re_compile_pattern(3), register_printf_function(3), re_match(3), re_match_2(3), re_rx_search(3), re_search(3), re_search_2(3), re_set_registers(3), re_set_syntax(3), res_send_setqhook(3), res_send_setrhook(3), ruserpass(3), setfileno(3), sethostfile(3), svc_exit(3), svcudp_enablecache(3), tell(3), thrd_create(3), thrd_current(3), thrd_equal(3), thrd_sleep(3), thrd_yield(3), tr_break(3), tzsetwall(3), ufc_dofinalperm(3), ufc_doit(3), user2netname(3), wcschrnul(3), wcsftime(3), wscanf(3), xdr_authdes_cred(3), xdr_authdes_verf(3), xdr_cryptkeyarg(3), xdr_cryptkeyres(3), xdr_datum(3), xdr_des_block(3), xdr_domainname(3), xdr_getcredres(3), xdr_keybuf(3), xdr_keystatus(3), xdr_mapname(3), xdr_netnamestr(3), xdr_netobj(3), xdr_passwd(3), xdr_peername(3), xdr_rmtcall_args(3), xdr_rmtcallres(3), xdr_unixcred(3), xdr_yp_buf(3), xdr_yp_inaddr(3), xdr_ypbind_binding(3), xdr_ypbind_resp(3), xdr_ypbind_resptype(3), xdr_ypbind_setdom(3), xdr_ypdelete_args(3), xdr_ypmaplist(3), xdr_ypmaplist_str(3), xdr_yppasswd(3), xdr_ypreq_key(3), xdr_ypreq_nokey(3), xdr_ypresp_all(3), xdr_ypresp_all_seq(3), xdr_ypresp_key_val(3), xdr_ypresp_maplist(3), xdr_ypresp_master(3), xdr_ypresp_order(3), xdr_ypresp_val(3), xdr_ypstat(3), xdr_ypupdate_args(3), yp_all(3), yp_bind(3), yperr_string(3), yp_first(3), yp_get_default_domain(3), yp_maplist(3), yp_master(3), yp_match(3), yp_next(3), yp_order(3), ypprot_err(3), yp_unbind(3), yp_update(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

400 - Linux cli command Image_ExifTool_Sigmapm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Sigmapm and provides detailed information about the command Image_ExifTool_Sigmapm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Sigmapm.

NAME 🖥️ Image_ExifTool_Sigmapm 🖥️

Sigma/Foveon EXIF maker notes tags

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret Sigma and Foveon maker notes in EXIF information.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.x3f.info/technotes/FileDocs/MakerNoteDoc.html>

SEE ALSO

“Sigma Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

401 - Linux cli command nanf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command nanf and provides detailed information about the command nanf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the nanf.

NAME 🖥️ nanf 🖥️

return ‘Not a Number’

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double nan(const char *tagp);
float nanf(const char *tagp);
long double nanl(const char *tagp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

nan(), nanf(), nanl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions return a representation (determined by tagp) of a quiet NaN. If the implementation does not support quiet NaNs, these functions return zero.

The call nan(“char-sequence”) is equivalent to:

strtod("NAN(char-sequence)", NULL);

Similarly, calls to nanf() and nanl() are equivalent to analogous calls to strtof(3) and strtold(3).

The argument tagp is used in an unspecified manner. On IEEE 754 systems, there are many representations of NaN, and tagp selects one. On other systems it may do nothing.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

nan(), nanf(), nanl()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

See also IEC 559 and the appendix with recommended functions in IEEE 754/IEEE 854.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

isnan(3), strtod(3), math_error(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

402 - Linux cli command isdigit_l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isdigit_l and provides detailed information about the command isdigit_l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isdigit_l.

NAME 🖥️ isdigit_l 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

403 - Linux cli command Moose_Exceptionpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Exceptionpm and provides detailed information about the command Moose_Exceptionpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Exceptionpm.

NAME 🖥️ Moose_Exceptionpm 🖥️

Superclass for Moose internal exceptions

VERSION

version 2.2207

DESCRIPTION

This class contains attributes which are common to all Moose internal exception classes.

WARNING WARNING WARNING

If you’re writing your own exception classes, you should instead prefer the Throwable role or the Throwable::Error superclass - this is effectively a cut-down internal fork of the latter, and not designed for use in user code.

Of course if you’re writing metaclass traits, it would then make sense to subclass the relevant Moose exceptions - but only then.

METHODS

$exception->message

This attribute contains the exception message.

Every subclass of Moose::Exception is expected to override _build_message method in order to construct this value.

$exception->trace

This attribute contains the stack trace for the given exception. It returns a Devel::StackTrace object.

$exception->as_string

This method returns a stringified form of the exception, including a stack trace. By default, this method skips Moose-internal stack frames until it sees a caller outside of the Moose core. If the MOOSE_FULL_EXCEPTION environment variable is true, these frames are included.

SEE ALSO

  • Moose::Manual::Exceptions

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

404 - Linux cli command xdr_pmaplist

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_pmaplist and provides detailed information about the command xdr_pmaplist, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_pmaplist.

NAME 🖥️ xdr_pmaplist 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

405 - Linux cli command HTML_Tagsetpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_Tagsetpm and provides detailed information about the command HTML_Tagsetpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_Tagsetpm.

NAME 🖥️ HTML_Tagsetpm 🖥️

data tables useful in parsing HTML

VERSION

Version 3.24

SYNOPSIS

use HTML::Tagset; # Then use any of the items in the HTML::Tagset package # as need arises

DESCRIPTION

This module contains several data tables useful in various kinds of HTML parsing operations.

Note that all tag names used are lowercase.

In the following documentation, a “hashset” is a hash being used as a set – the hash conveys that its keys are there, and the actual values associated with the keys are not significant. (But what values are there, are always true.)

VARIABLES

Note that none of these variables are exported.

hashset %HTML::Tagset::emptyElement

This hashset has as values the tag-names (GIs) of elements that cannot have content. (For example, “base”, “br”, “hr”.) So $HTML::Tagset::emptyElement{hr} exists and is true. $HTML::Tagset::emptyElement{dl} does not exist, and so is not true.

hashset %HTML::Tagset::optionalEndTag

This hashset lists tag-names for elements that can have content, but whose end-tags are generally, “safely”, omissible. Example: $HTML::Tagset::emptyElement{li} exists and is true.

hash %HTML::Tagset::linkElements

Values in this hash are tagnames for elements that might contain links, and the value for each is a reference to an array of the names of attributes whose values can be links.

hash %HTML::Tagset::boolean_attr

This hash (not hashset) lists what attributes of what elements can be printed without showing the value (for example, the “noshade” attribute of “hr” elements). For elements with only one such attribute, its value is simply that attribute name. For elements with many such attributes, the value is a reference to a hashset containing all such attributes.

hashset %HTML::Tagset::isPhraseMarkup

This hashset contains all phrasal-level elements.

hashset %HTML::Tagset::is_Possible_Strict_P_Content

This hashset contains all phrasal-level elements that be content of a P element, for a strict model of HTML.

hashset %HTML::Tagset::isHeadElement

This hashset contains all elements that elements that should be present only in the ‘head’ element of an HTML document.

hashset %HTML::Tagset::isList

This hashset contains all elements that can contain “li” elements.

hashset %HTML::Tagset::isTableElement

This hashset contains all elements that are to be found only in/under a “table” element.

hashset %HTML::Tagset::isFormElement

This hashset contains all elements that are to be found only in/under a “form” element.

hashset %HTML::Tagset::isBodyElement

This hashset contains all elements that are to be found only in/under the “body” element of an HTML document.

hashset %HTML::Tagset::isHeadOrBodyElement

This hashset includes all elements that I notice can fall either in the head or in the body.

hashset %HTML::Tagset::isKnown

This hashset lists all known HTML elements.

hashset %HTML::Tagset::canTighten

This hashset lists elements that might have ignorable whitespace as children or siblings.

array @HTML::Tagset::p_closure_barriers

This array has a meaning that I have only seen a need for in HTML::TreeBuilder, but I include it here on the off chance that someone might find it of use:

When we see a “<p>” token, we go lookup up the lineage for a p element we might have to minimize. At first sight, we might say that if there’s a p anywhere in the lineage of this new p, it should be closed. But that’s wrong. Consider this document:

<html> <head> <title>foo</title> </head> <body> <p>foo <table> <tr> <td> foo <p>bar </td> </tr> </table> </p> </body> </html>

The second p is quite legally inside a much higher p.

My formalization of the reason why this is legal, but this:

<p>foo<p>bar</p></p>

isn’t, is that something about the table constitutes a “barrier” to the application of the rule about what p must minimize.

So @HTML::Tagset::p_closure_barriers is the list of all such barrier-tags.

hashset %isCDATA_Parent

This hashset includes all elements whose content is CDATA.

CAVEATS

You may find it useful to alter the behavior of modules (like HTML::Element or HTML::TreeBuilder) that use HTML::Tagset’s data tables by altering the data tables themselves. You are welcome to try, but be careful; and be aware that different modules may or may react differently to the data tables being changed.

Note that it may be inappropriate to use these tables for producing HTML – for example, %isHeadOrBodyElement lists the tagnames for all elements that can appear either in the head or in the body, such as “script”. That doesn’t mean that I am saying your code that produces HTML should feel free to put script elements in either place! If you are producing programs that spit out HTML, you should be intimately familiar with the DTDs for HTML or XHTML (available at http://www.w3.org/), and you should slavishly obey them, not the data tables in this document.

SEE ALSO

HTML::Element, HTML::TreeBuilder, HTML::LinkExtor

COPYRIGHT & LICENSE

Copyright 1995-2000 Gisle Aas.

Copyright 2000-2005 Sean M. Burke.

Copyright 2005-2024 Andy Lester.

This library is free software; you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.

ACKNOWLEDGEMENTS

Most of the code/data in this module was adapted from code written by Gisle Aas for HTML::Element, HTML::TreeBuilder, and HTML::LinkExtor. Then it was maintained by Sean M. Burke.

AUTHOR

Current maintainer: Andy Lester, <andy at petdance.com>

BUGS

Please report any bugs or feature requests to bug-html-tagset at rt.cpan.org, or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=HTML-Tagset>. I will be notified, and then you’ll automatically be notified of progress on your bug as I make changes.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

406 - Linux cli command Net_Server_Log_Sys_Syslogpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Server_Log_Sys_Syslogpm and provides detailed information about the command Net_Server_Log_Sys_Syslogpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Server_Log_Sys_Syslogpm.

NAME 🖥️ Net_Server_Log_Sys_Syslogpm 🖥️

log via Syslog

SYNOPSIS

use base qw(Net::Server::PreFork); _ _PACKAGE_ _->run( log_file => Sys::Syslog, syslog_ident => myapp, );

DESCRIPTION

This module provides Sys::Syslog logging to the Net::Server system.

CONFIGURATION

log_file
To begin using Sys::Syslog logging, simply set the Net::Server log_file configuration parameter to Sys::Syslog. If the magic name Sys::Syslog is used, all logging will take place via the Sys::Syslog module. If syslog is used the parameters syslog_logsock, syslog_ident, and syslog_logopt,and syslog_facility may also be defined.

syslog_logsock
Only available if log_file is equal to Sys::Syslog. May be either unix, inet, native, console, stream, udp, or tcp, or an arrayref of the types to try. Default is unix if the version of Sys::Syslog < 0.15 - otherwise the default is to not call setlogsock. See Sys::Syslog.

syslog_ident
Only available if log_file is equal to Sys::Syslog. Id to prepend on syslog entries. Default is net_server. See Sys::Syslog.

syslog_logopt
Only available if log_file is equal to Sys::Syslog. May be either zero or more of pid,cons,ndelay,nowait. Default is pid. See Sys::Syslog.

syslog_facility
Only available if log_file is equal to Sys::Syslog. See Sys::Syslog and syslog. Default is daemon.

DEFAULT ARGUMENTS FOR Net::Server

The following arguments are available in the default Net::Server or Net::Server::Single modules. (Other personalities may use additional parameters and may optionally not use parameters from the base class.)

Key Value Default ## syslog parameters (if log_file eq Sys::Syslog) syslog_logsock (native|unix|inet|udp |tcp|stream|console) unix (on Sys::Syslog < 0.15) syslog_ident “identity” “net_server” syslog_logopt (cons|ndelay|nowait|pid) pid syslog_facility \w+ daemon

METHODS

“initialize”
This method is called during the initilize_logging method of Net::Server. It returns a single code ref that will be stored under the log_function property of the Net::Server object. That code ref takes log_level and message as arguments and calls the initialized log4perl system.

“handle_log_error”
This method is called if the log_function fails for some reason. It is passed the Net::Server object, the error that occurred while logging and an arrayref containing the log level and the message. In turn, this calls the legacy Net::Server::handle_syslog_error method.

LICENCE

Distributed under the same terms as Net::Server

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

407 - Linux cli command Image_ExifTool_FITSpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_FITSpm and provides detailed information about the command Image_ExifTool_FITSpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_FITSpm.

NAME 🖥️ Image_ExifTool_FITSpm 🖥️

Read Flexible Image Transport System metadata

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read meta information from FITS (Flexible Image Transport System) images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<https://fits.gsfc.nasa.gov/fits_standard.html>

SEE ALSO

“FITS Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

408 - Linux cli command URI_icappm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command URI_icappm and provides detailed information about the command URI_icappm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the URI_icappm.

NAME 🖥️ URI_icappm 🖥️

URI scheme for ICAP Identifiers

VERSION

Version 5.20

SYNOPSIS

use URI::icap; my $uri = URI->new(icap://icap-proxy.example.com/);

DESCRIPTION

This module implements the icap: URI scheme defined in RFC 3507 <http://tools.ietf.org/html/rfc3507>, for the Internet Content Adaptation Protocol <https://en.wikipedia.org/wiki/Internet_Content_Adaptation_Protocol>.

SUBROUTINES/METHODS

This module inherits the behaviour of URI::http and overrides the default_portdefault_port> method.

default_port

The default port for icap servers is 1344

DIAGNOSTICS

See URI

CONFIGURATION AND ENVIRONMENT

See URI and URI

DEPENDENCIES

None

INCOMPATIBILITIES

None reported

BUGS AND LIMITATIONS

See URI

SEE ALSO

RFC 3507 <http://tools.ietf.org/html/rfc3507>

AUTHOR

David Dick, <ddick at cpan.org>

LICENSE AND COPYRIGHT

Copyright 2016 David Dick.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See <http://dev.perl.org/licenses/> for more information.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

409 - Linux cli command XtCloseDisplay

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtCloseDisplay and provides detailed information about the command XtCloseDisplay, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtCloseDisplay.

NAME 🖥️ XtCloseDisplay 🖥️

initialize, open, or close a display

SYNTAX

#include <X11/Intrinsic.h>

void XtDisplayInitialize(XtAppContext app_context, Display *display, const char *application_name, const char *application_class, XrmOptionDescRec *options, Cardinal num_options, int *argc, char **argv);

Display *XtOpenDisplay(XtAppContext app_context, const char *display_string, const char *application_name, const char *application_class, XrmOptionDescRec *options, Cardinal num_options, int *argc, char **argv);

void XtCloseDisplay(Display *display);

XrmDatabase XtDatabase(Display *display);

XrmDatabase XtScreenDatabase(Screen* screen);

ARGUMENTS

argc
Specifies a pointer to the number of command line parameters.

argv
Specifies the command line parameters.

app_context
Specifies the application context.

application_class
Specifies the class name of this application, which usually is the generic name for all instances of this application.

application_name
Specifies the name of the application instance.

display
Specifies the display. Note that a display can be in at most one application context.

num_options
Specifies the number of entries in the options list.

options
Specifies how to parse the command line for any application-specific resources. The options argument is passed as a parameter to XrmParseCommand. For further information, see Xlib - C Language X Interface.

screen
Specifies the screen whose resource database is to be returned.

DESCRIPTION

The XtDisplayInitialize function builds the resource database, calls the Xlib XrmParseCommand function to parse the command line, and performs other per display initialization. After XrmParseCommand has been called, argc and argv contain only those parameters that were not in the standard option table or in the table specified by the options argument. If the modified argc is not zero, most applications simply print out the modified argv along with a message listing the allowable options. On UNIX-based systems, the application name is usually the final component of argv[0]. If the synchronize resource is True for the specified application, XtDisplayInitialize calls the Xlib XSynchronize function to put Xlib into synchronous mode for this display connection. If the reverseVideo resource is True, the Intrinsics exchange XtDefaultForeground and XtDefaultBackground for widgets created on this display. (See Section 9.6.1).

The XtOpenDisplay function calls XOpenDisplay the specified display name. If display_string is NULL, XtOpenDisplay uses the current value of the -display option specified in argv and if no display is specified in argv, uses the user’s default display (on UNIX-based systems, this is the value of the DISPLAY environment variable).

If this succeeds, it then calls XtDisplayInitialize and pass it the opened display and the value of the -name option specified in argv as the application name. If no name option is specified, it uses the application name passed to XtOpenDisplay. If the application name is NULL, it uses the last component of argv[0]. XtOpenDisplay returns the newly opened display or NULL if it failed.

XtOpenDisplay is provided as a convenience to the application programmer.

The XtCloseDisplay function closes the specified display as soon as it is safe to do so. If called from within an event dispatch (for example, a callback procedure), XtCloseDisplay does not close the display until the dispatch is complete. Note that applications need only call XtCloseDisplay if they are to continue executing after closing the display; otherwise, they should call XtDestroyApplicationContext or just exit.

The XtDatabase function returns the fully merged resource database that was built by XtDisplayInitialize associated with the display that was passed in. If this display has not been initialized by XtDisplayInitialize, the results are not defined.

The XtScreenDatabase function returns the fully merged resource database associated with the specified screen. If the screen does not belong to a Display initialized by XtDisplayInitialize, the results are undefined.

SEE ALSO

XtAppCreateShell(3), XtCreateApplicationContext(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

410 - Linux cli command Font_AFMpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Font_AFMpm and provides detailed information about the command Font_AFMpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Font_AFMpm.

NAME 🖥️ Font_AFMpm 🖥️

Interface to Adobe Font Metrics files

SYNOPSIS

use Font::AFM; $h = new Font::AFM “Helvetica”; $copyright = $h->Notice; $w = $h->Wx->{“aring”}; $w = $h->stringwidth(“Gisle”, 10); $h->dump; # for debugging

DESCRIPTION

This module implements the Font::AFM class. Objects of this class are initialised from an AFM (Adobe Font Metrics) file and allow you to obtain information about the font and the metrics of the various glyphs in the font.

All measurements in AFM files are given in terms of units equal to 1/1000 of the scale factor of the font being used. To compute actual sizes in a document, these amounts should be multiplied by (scale factor of font)/1000.

The following methods are available:

$afm = Font::AFM->new($fontname)
Object constructor. Takes the name of the font as argument. Croaks if the font can not be found.

$afm->latin1_wx_table()
Returns a 256-element array, where each element contains the width of the corresponding character in the iso-8859-1 character set.

$afm->stringwidth($string, [$fontsize])
Returns the width of the argument string. The string is assumed to be encoded in the iso-8859-1 character set. A second argument can be used to scale the width according to the font size.

$afm->FontName
The name of the font as presented to the PostScript language findfont operator, for instance Times-Roman.

$afm->FullName
Unique, human-readable name for an individual font, for instance Times Roman.

$afm->FamilyName
Human-readable name for a group of fonts that are stylistic variants of a single design. All fonts that are members of such a group should have exactly the same FamilyName. Example of a family name is Times.

$afm->Weight
Human-readable name for the weight, or boldness, attribute of a font. Examples are Roman, Bold, Light.

$afm->ItalicAngle
Angle in degrees counterclockwise from the vertical of the dominant vertical strokes of the font.

$afm->IsFixedPitch
If true, the font is a fixed-pitch (monospaced) font.

$afm->FontBBox
A string of four numbers giving the lower-left x, lower-left y, upper-right x, and upper-right y of the font bounding box. The font bounding box is the smallest rectangle enclosing the shape that would result if all the characters of the font were placed with their origins coincident, and then painted.

$afm->UnderlinePosition
Recommended distance from the baseline for positioning underline strokes. This number is the y coordinate of the center of the stroke.

$afm->UnderlineThickness
Recommended stroke width for underlining.

$afm->Version
Version number of the font.

$afm->Notice
Trademark or copyright notice, if applicable.

$afm->Comment
Comments found in the AFM file.

$afm->EncodingScheme
The name of the standard encoding scheme for the font. Most Adobe fonts use the AdobeStandardEncoding. Special fonts might state FontSpecific.

$afm->CapHeight
Usually the y-value of the top of the capital H.

$afm->XHeight
Typically the y-value of the top of the lowercase x.

$afm->Ascender
Typically the y-value of the top of the lowercase d.

$afm->Descender
Typically the y-value of the bottom of the lowercase p.

$afm->Wx
Returns a hash table that maps from glyph names to the width of that glyph.

$afm->BBox
Returns a hash table that maps from glyph names to bounding box information. The bounding box consist of four numbers: llx, lly, urx, ury.

$afm->dump
Dumps the content of the Font::AFM object to STDOUT. Might sometimes be useful for debugging.

The AFM specification can be found at:

http://partners.adobe.com/asn/developer/pdfs/tn/5004.AFM_Spec.pdf

ENVIRONMENT

METRICS
Contains the path to search for AFM-files. Format is as for the PATH environment variable. The default path built into this library is: /usr/lib/afm:/usr/local/lib/afm:/usr/openwin/lib/fonts/afm/:.

BUGS

Kerning data and composite character data are not yet parsed. Ligature data is not parsed.

COPYRIGHT

Copyright 1995-1998 Gisle Aas. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

411 - Linux cli command LIST_INSERT_AFTER

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LIST_INSERT_AFTER and provides detailed information about the command LIST_INSERT_AFTER, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LIST_INSERT_AFTER.

NAME 🖥️ LIST_INSERT_AFTER 🖥️

implementation of a doubly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
LIST_ENTRY(TYPE);
LIST_HEAD(HEADNAME, TYPE);
LIST_HEAD LIST_HEAD_INITIALIZER(LIST_HEAD head);
void LIST_INIT(LIST_HEAD *head);
int LIST_EMPTY(LIST_HEAD *head);
void LIST_INSERT_HEAD(LIST_HEAD *head,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
struct TYPE *LIST_FIRST(LIST_HEAD *head);
struct TYPE *LIST_NEXT(struct TYPE *elm, LIST_ENTRY NAME);
LIST_FOREACH(struct TYPE *var, LIST_HEAD *head, LIST_ENTRY NAME);
void LIST_REMOVE(struct TYPE *elm, LIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type LIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro LIST_HEAD().

Creation

A list is headed by a structure defined by the LIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are doubly linked so that an arbitrary element can be removed without traversing the list. New elements can be added to the list after an existing element, before an existing element, or at the head of the list. A LIST_HEAD structure is declared as follows:

LIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

LIST_ENTRY() declares a structure that connects the elements in the list.

LIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

LIST_INIT() initializes the list referenced by head.

LIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

LIST_INSERT_HEAD() inserts the new element elm at the head of the list.

LIST_INSERT_BEFORE() inserts the new element elm before the element listelm.

LIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

LIST_FIRST() returns the first element in the list, or NULL if the list is empty.

LIST_NEXT() returns the next element in the list, or NULL if this is the last.

LIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

LIST_REMOVE() removes the element elm from the list.

RETURN VALUE

LIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

LIST_FIRST(), and LIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

LIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

LIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. LIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    LIST_ENTRY(entry) entries;              /* List */
};
LIST_HEAD(listhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct listhead head;                   /* List head */
    int i;
    LIST_INIT(&head);                       /* Initialize the list */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    LIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    LIST_INSERT_AFTER(n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    LIST_INSERT_BEFORE(n2, n3, entries);
    i = 0;                                  /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        np->data = i++;
    LIST_REMOVE(n2, entries);               /* Deletion */
    free(n2);
                                            /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* List deletion */ n1 = LIST_FIRST(&head); while (n1 != NULL) { n2 = LIST_NEXT(n1, entries); free(n1); n1 = n2; } LIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

412 - Linux cli command Net_DNS_RR_MBpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_MBpm and provides detailed information about the command Net_DNS_RR_MBpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_MBpm.

NAME 🖥️ Net_DNS_RR_MBpm 🖥️

DNS MB resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name MB madname);

DESCRIPTION

Class for DNS Mailbox (MB) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

madname

$madname = $rr->madname; $rr->madname( $madname );

A domain name which specifies a host which has the specified mailbox.

COPYRIGHT

Copyright (c)1997 Michael Fuhr.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC1035(3.3.3) <https://iana.org/go/rfc1035#section-3.3.3>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

413 - Linux cli command stpcpy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command stpcpy and provides detailed information about the command stpcpy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the stpcpy.

NAME 🖥️ stpcpy 🖥️

copy or catenate a string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *stpcpy(char *restrict dst, const char *restrict src);
char *strcpy(char *restrict dst, const char *restrict src);
char *strcat(char *restrict dst, const char *restrict src);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

stpcpy():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

stpcpy()
strcpy()
These functions copy the string pointed to by src, into a string at the buffer pointed to by dst. The programmer is responsible for allocating a destination buffer large enough, that is, strlen(src) + 1. For the difference between the two functions, see RETURN VALUE.

strcat()
This function catenates the string pointed to by src, after the string pointed to by dst (overwriting its terminating null byte). The programmer is responsible for allocating a destination buffer large enough, that is, strlen(dst) + strlen(src) + 1.

An implementation of these functions might be:

char *
stpcpy(char *restrict dst, const char *restrict src)
{
    char  *p;
    p = mempcpy(dst, src, strlen(src));
    *p = '';
    return p;
}
char *
strcpy(char *restrict dst, const char *restrict src)
{
    stpcpy(dst, src);
    return dst;
}
char *
strcat(char *restrict dst, const char *restrict src)
{
    stpcpy(dst + strlen(dst), src);
    return dst;
}

RETURN VALUE

stpcpy()
This function returns a pointer to the terminating null byte of the copied string.

strcpy()
strcat()
These functions return dst.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

stpcpy(), strcpy(), strcat()

Thread safetyMT-Safe

STANDARDS

stpcpy()
POSIX.1-2008.

strcpy()
strcat()
C11, POSIX.1-2008.

STANDARDS

stpcpy()
POSIX.1-2008.

strcpy()
strcat()
POSIX.1-2001, C89, SVr4, 4.3BSD.

CAVEATS

The strings src and dst may not overlap.

If the destination buffer is not large enough, the behavior is undefined. See _FORTIFY_SOURCE in feature_test_macros(7).

strcat() can be very inefficient. Read about Shlemiel the painter.

EXAMPLES

#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int
main(void)
{
    char    *p;
    char    *buf1;
    char    *buf2;
    size_t  len, maxsize;
    maxsize = strlen("Hello ") + strlen("world") + strlen("!") + 1;
    buf1 = malloc(sizeof(*buf1) * maxsize);
    if (buf1 == NULL)
        err(EXIT_FAILURE, "malloc()");
    buf2 = malloc(sizeof(*buf2) * maxsize);
    if (buf2 == NULL)
        err(EXIT_FAILURE, "malloc()");
    p = buf1;
    p = stpcpy(p, "Hello ");
    p = stpcpy(p, "world");
    p = stpcpy(p, "!");
    len = p - buf1;
    printf("[len = %zu]: ", len);
    puts(buf1);  // "Hello world!"
    free(buf1);
    strcpy(buf2, "Hello ");
    strcat(buf2, "world");
    strcat(buf2, "!");
    len = strlen(buf2);
    printf("[len = %zu]: ", len);
    puts(buf2);  // "Hello world!"
    free(buf2);
    exit(EXIT_SUCCESS);
}

SEE ALSO

strdup(3), string(3), wcscpy(3), string_copying(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

414 - Linux cli command Regexp_Common_commentpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_commentpm and provides detailed information about the command Regexp_Common_commentpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_commentpm.

NAME 🖥️ Regexp_Common_commentpm 🖥️

  • provide regexes for comments.

SYNOPSIS

use Regexp::Common qw /comment/; while (<>) { /$RE{comment}{C}/ and print “Contains a C comment “; /$RE{comment}{C++}/ and print “Contains a C++ comment “; /$RE{comment}{PHP}/ and print “Contains a PHP comment “; /$RE{comment}{Java}/ and print “Contains a Java comment “; /$RE{comment}{Perl}/ and print “Contains a Perl comment “; /$RE{comment}{awk}/ and print “Contains an awk comment “; /$RE{comment}{HTML}/ and print “Contains an HTML comment “; } use Regexp::Common qw /comment RE_comment_HTML/; while (<>) { $_ =~ RE_comment_HTML() and print “Contains an HTML comment “; }

DESCRIPTION

Please consult the manual of Regexp::Common for a general description of the works of this interface.

Do not use this module directly, but load it via Regexp::Common.

This modules gives you regular expressions for comments in various languages.

THE LANGUAGES

Below, the comments of each of the languages are described. The patterns are available as $RE{comment}{LANG}, foreach language LANG. Some languages have variants; it’s described at the individual languages how to get the patterns for the variants. Unless mentioned otherwise, {-keep} sets $1, $2, $3 and $4 to the entire comment, the opening marker, the content of the comment, and the closing marker (for many languages, the latter is a newline) respectively.

ABC
Comments in ABC start with a backslash (\), and last till the end of the line. See <http://homepages.cwi.nl/%7Esteven/abc/>.

Ada
Comments in Ada start with --, and last till the end of the line.

Advisor
Advisor is a language used by the HP product glance. Comments for this language start with either # or //, and last till the end of the line.

Advsys
Comments for the Advsys language start with ; and last till the end of the line. See also <http://www.wurb.com/if/devsys/12>.

Alan
Alan comments start with --, and last till the end of the line. See also <http://w1.132.telia.com/~u13207378/alan/manual/alanTOC.html>.

Algol 60
Comments in the Algol 60 language start with the keyword comment, and end with a ;. See <http://www.masswerk.at/algol60/report.htm>.

Algol 68
In Algol 68, comments are either delimited by #, or by one of the keywords co or comment. The keywords should not be part of another word. See <http://westein.arb-phys.uni-dortmund.de/~wb/a68s.txt>. With {-keep}, only $1 will be set, returning the entire comment.

ALPACA
The ALPACA language has comments starting with /* and ending with */.

awk
The awk programming language uses comments that start with # and end at the end of the line.

  1. The B language has comments starting with /* and ending with */.

BASIC
There are various forms of BASIC around. Currently, we only support the variant supported by mvEnterprise, whose pattern is available as $RE{comment}{BASIC}{mvEnterprise}. Comments in this language start with a !, a * or the keyword REM, and end till the end of the line. See <http://www.rainingdata.com/products/beta/docs/mve/50/ReferenceManual/Basic.pdf>.

Beatnik
The esotoric language Beatnik only uses words consisting of letters. Words are scored according to the rules of Scrabble. Words scoring less than 5 points, or 18 points or more are considered comments (although the compiler might mock at you if you score less than 5 points). Regardless whether {-keep}, $1 will be set, and set to the entire comment. This pattern requires perl 5.8.0 or newer.

beta-Juliet
The beta-Juliet programming language has comments that start with // and that continue till the end of the line. See also <http://www.catseye.mb.ca/esoteric/b-juliet/index.html>.

Befunge-98
The esotoric language Befunge-98 uses comments that start and end with a ;. See <http://www.catseye.mb.ca/esoteric/befunge/98/spec98.html>.

BML
BML, or Better Markup Language is an HTML templating language that uses comments starting with <?c_, and ending with c_?>. See <http://www.livejournal.com/doc/server/bml.index.html>.

Brainfuck
The minimal language Brainfuck uses only eight characters, <, >, [, ], +, -, . and ,. Any other characters are considered comments. With {-keep}, $1 is set to the entire comment.

  1. The C language has comments starting with /* and ending with */.

C–
The C– language has comments starting with /* and ending with */. See <http://cs.uas.arizona.edu/classes/453/programs/C–Spec.html>.

C++
The C++ language has two forms of comments. Comments that start with // and last till the end of the line, and comments that start with /*, and end with */. If {-keep} is used, only $1 will be set, and set to the entire comment.

C#
The C# language has two forms of comments. Comments that start with // and last till the end of the line, and comments that start with /*, and end with */. If {-keep} is used, only $1 will be set, and set to the entire comment. See <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csspec/html/vclrfcsharpspec_C.asp>.

Caml
Comments in Caml start with (*, end with *), and can be nested. See <http://www.cs.caltech.edu/courses/cs134/cs134b/book.pdf> and <http://pauillac.inria.fr/caml/index-eng.html>.

Cg
The Cg language has two forms of comments. Comments that start with // and last till the end of the line, and comments that start with /*, and end with */. If {-keep} is used, only $1 will be set, and set to the entire comment. See <http://developer.nvidia.com/attach/3722>.

CLU
In CLU, a comment starts with a procent sign (%), and ends with the next newline. See <ftp://ftp.lcs.mit.edu:/pub/pclu/CLU-syntax.ps> and <http://www.pmg.lcs.mit.edu/CLU.html>.

COBOL
Traditionally, comments in COBOL are indicated by an asteriks in the seventh column. This is what the pattern matches. Modern compiler may more lenient though. See <http://www.csis.ul.ie/cobol/Course/COBOLIntro.htm>, and <http://www.csis.ul.ie/cobol/default.htm>.

CQL
Comments in the chess query language (CQL) start with a semi colon (;) and last till the end of the line. See <http://www.rbnn.com/cql/>.

Crystal Report
The formula editor in Crystal Reports uses comments that start with //, and end with the end of the line.

Dylan
There are two types of comments in Dylan. They either start with //, or are nested comments, delimited with /* and */. Under {-keep}, only $1 will be set, returning the entire comment. This pattern requires perl 5.6.0 or newer.

ECMAScript
The ECMAScript language has two forms of comments. Comments that start with // and last till the end of the line, and comments that start with /*, and end with */. If {-keep} is used, only $1 will be set, and set to the entire comment. JavaScript is Netscapes implementation of ECMAScript. See <http://www.ecma-international.org/publications/files/ecma-st/Ecma-262.pdf>, and <http://www.ecma-international.org/publications/standards/Ecma-262.htm>.

Eiffel
Eiffel comments start with --, and last till the end of the line.

False
In False, comments start with { and end with }. See <http://wouter.fov120.com/false/false.txt>

FPL
The FPL language has two forms of comments. Comments that start with // and last till the end of the line, and comments that start with /*, and end with */. If {-keep} is used, only $1 will be set, and set to the entire comment.

Forth
Comments in Forth start with \, and end with the end of the line. See also <http://docs.sun.com/sb/doc/806-1377-10>.

Fortran
There are two forms of Fortran. There’s free form Fortran, which has comments that start with !, and end at the end of the line. The pattern for this is given by $RE{Fortran}. Fixed form Fortran, which has been obsoleted, has comments that start with C, c or * in the first column, or with ! anywhere, but the sixth column. The pattern for this are given by $RE{Fortran}{fixed}. See also <http://www.cray.com/craydoc/manuals/007-3692-005/html-007-3692-005/>.

Funge-98
The esotoric language Funge-98 uses comments that start and end with a ;.

fvwm2
Configuration files for fvwm2 have comments starting with a # and lasting the rest of the line.

Haifu
Haifu, an esotoric language using haikus, has comments starting and ending with a ,. See <http://www.dangermouse.net/esoteric/haifu.html>.

Haskell
There are two types of comments in Haskell. They either start with at least two dashes, or are nested comments, delimited with {- and -}. Under {-keep}, only $1 will be set, returning the entire comment. This pattern requires perl 5.6.0 or newer.

HTML
In HTML, comments only appear inside a comment declaration. A comment declaration starts with a <!, and ends with a >. Inside this declaration, we have zero or more comments. Comments starts with -- and end with --, and are optionally followed by whitespace. The pattern $RE{comment}{HTML} recognizes those comment declarations (and hence more than a comment). Note that this is not the same as something that starts with <!-- and ends with -->, because the following will be matched completely: <!– First Comment – –> Second Comment <!– – Third Comment –> Do not be fooled by what your favourite browser thinks is an HTML comment. If {-keep} is used, the following are returned:

$1
captures the entire comment declaration.

$2
captures the MDO (markup declaration open), <!.

$3
captures the content between the MDO and the MDC.

$4
captures the (last) comment, without the surrounding dashes.

$5
captures the MDC (markup declaration close), >.

Hugo
There are two types of comments in Hugo. They either start with ! (which cannot be followed by a \), or are nested comments, delimited with !\ and \!. Under {-keep}, only $1 will be set, returning the entire comment. This pattern requires perl 5.6.0 or newer.

Icon
Icon has comments that start with # and end at the next new line. See <http://www.toolsofcomputing.com/IconHandbook/IconHandbook.pdf>, <http://www.cs.arizona.edu/icon/index.htm>, and <http://burks.bton.ac.uk/burks/language/icon/index.htm>.

ILLGOL
The esotoric language ILLGOL uses comments starting with NB and lasting till the end of the line. See <http://www.catseye.mb.ca/esoteric/illgol/index.html>.

INTERCAL
Comments in INTERCAL are single line comments. They start with one of the keywords NOT or NT, and can optionally be preceded by the keywords DO and PLEASE. If both keywords are used, PLEASE precedes DO. Keywords are separated by whitespace.

  1. The language J uses comments that start with NB., and that last till the end of the line. See <http://www.jsoftware.com/books/help/primer/contents.htm>, and <http://www.jsoftware.com/>.

Java
The Java language has two forms of comments. Comments that start with // and last till the end of the line, and comments that start with /*, and end with */. If {-keep} is used, only $1 will be set, and set to the entire comment.

JavaDoc
The Javadoc documentation syntax is demarked with a subset of ordinary Java comments to separate it from code. Comments start with /** end with */. If {-keep} is used, only $1 will be set, and set to the entire comment. See <http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#format>.

JavaScript
The JavaScript language has two forms of comments. Comments that start with // and last till the end of the line, and comments that start with /*, and end with */. If {-keep} is used, only $1 will be set, and set to the entire comment. JavaScript is Netscapes implementation of ECMAScript. See <http://www.mozilla.org/js/language/E262-3.pdf>, and <http://www.mozilla.org/js/language/>.

LaTeX
The documentation language LaTeX uses comments starting with % and ending at the end of the line.

Lisp
Comments in Lisp start with a semi-colon (;) and last till the end of the line.

LPC
The LPC language has comments starting with /* and ending with */.

LOGO
Comments for the language LOGO start with ;, and last till the end of the line.

lua
Comments for the lua language start with --, and last till the end of the line. See also <http://www.lua.org/manual/manual.html>.

M, MUMPS
In M (aka MUMPS), comments start with a semi-colon, and last till the end of a line. The language specification requires the semi-colon to be preceded by one or more linestart characters. Those characters default to a space, but that’s configurable. This requirement, of preceding the comment with linestart characters is not tested for. See <ftp://ftp.intersys.com/pub/openm/ism/ism64docs.zip>, <http://mtechnology.intersys.com/mproducts/openm/index.html>, and <http://mcenter.com/mtrc/index.html>.

m4
By default, the preprocessor language m4 uses single line comments, that start with a # and continue to the end of the line, including the newline. The pattern $RE {comment} {m4} matches such comments. In m4, it is possible to change the starting token though. See <http://wolfram.schneider.org/bsd/7thEdManVol2/m4/m4.pdf>, <http://www.cs.stir.ac.uk/~kjt/research/pdf/expl-m4.pdf>, and <http://www.gnu.org/software/m4/manual/>.

Modula-2
In Modula-2, comments start with (*, and end with *). Comments may be nested. See <http://www.modula2.org/>.

Modula-3
In Modula-3, comments start with (*, and end with *). Comments may be nested. See <http://www.m3.org/>.

mutt
Configuration files for mutt have comments starting with a # and lasting the rest of the line.

Nickle
The Nickle language has one line comments starting with # (like Perl), or multiline comments delimited by /* and */ (like C). Under -keep, only $1 will be set. See also <http://www.nickle.org>.

Oberon
Comments in Oberon start with (* and end with *). See <http://www.oberon.ethz.ch/oreport.html>.

Pascal
There are many implementations of Pascal. This modules provides pattern for comments of several implementations.

“$RE{comment}{Pascal}”
This is the pattern that recognizes comments according to the Pascal ISO standard. This standard says that comments start with either {, or (*, and end with } or *). This means that {*) and (*} are considered to be comments. Many Pascal applications don’t allow this. See <http://www.pascal-central.com/docs/iso10206.txt>

“$RE{comment}{Pascal}{Alice}”
The Alice Pascal compiler accepts comments that start with { and end with }. Comments are not allowed to contain newlines. See <http://www.templetons.com/brad/alice/language/>.

“$RE{comment}{Pascal}{Delphi}”, “$RE{comment}{Pascal}{Free}” and “$RE{comment}{Pascal}{GPC}”
The Delphi Pascal, Free Pascal and the Gnu Pascal Compiler implementations of Pascal all have comments that either start with // and last till the end of the line, are delimited with { and } or are delimited with (* and *). Patterns for those comments are given by $RE{comment}{Pascal}{Delphi}, $RE{comment}{Pascal}{Free} and $RE{comment}{Pascal}{GPC} respectively. These patterns only set $1 when {-keep} is used, which will then include the entire comment. See <http://info.borland.com/techpubs/delphi5/oplg/>, <http://www.freepascal.org/docs-html/ref/ref.html> and <http://www.gnu-pascal.de/gpc/>.

“$RE{comment}{Pascal}{Workshop}”
The Workshop Pascal compiler, from SUN Microsystems, allows comments that are delimited with either { and }, delimited with (*) and *), delimited with /*, and */, or starting and ending with a double quote ("). When {-keep} is used, only $1 is set, and returns the entire comment. See <http://docs.sun.com/db/doc/802-5762>.

PEARL
Comments in PEARL start with a ! and last till the end of the line, or start with /* and end with */. With {-keep}, $1 will be set to the entire comment.

PHP
Comments in PHP start with either # or // and last till the end of the line, or are delimited by /* and */. With {-keep}, $1 will be set to the entire comment.

PL/B
In PL/B, comments start with either . or ;, and end with the next newline. See <http://www.mmcctech.com/pl-b/plb-0010.htm>.

PL/I
The PL/I language has comments starting with /* and ending with */.

PL/SQL
In PL/SQL, comments either start with -- and run till the end of the line, or start with /* and end with */.

Perl
Perl uses comments that start with a #, and continue till the end of the line.

Portia
The Portia programming language has comments that start with //, and last till the end of the line.

Python
Python uses comments that start with a #, and continue till the end of the line.

Q-BAL
Comments in the Q-BAL language start with ` (a backtick), and contine till the end of the line.

QML
In QML, comments start with # and last till the end of the line. See <http://www.questionmark.com/uk/qml/overview.doc>.

  1. The statistical language R uses comments that start with a # and end with the following new line. See <http://www.r-project.org/>.

REBOL
Comments for the REBOL language start with ; and last till the end of the line.

Ruby
Comments in Ruby start with # and last till the end of the time.

Scheme
Scheme comments start with ;, and last till the end of the line. See <http://schemers.org/>.

shell
Comments in various shells start with a # and end at the end of the line.

Shelta
The esotoric language Shelta uses comments that start and end with a ;. See <http://www.catseye.mb.ca/esoteric/shelta/index.html>.

SLIDE
The SLIDE language has two froms of comments. First there is the line comment, which starts with a # and includes the rest of the line (just like Perl). Second, there is the multiline, nested comment, which are delimited by (* and *). Under C{-keep}>, only $1 is set, and is set to the entire comment. See <http://www.cs.freedom.nlrkeley.edu/~ug/slide/docs/slide/spec/spec_frame_intro.shtml>.

slrn
Configuration files for slrn have comments starting with a % and lasting the rest of the line.

Smalltalk
Smalltalk uses comments that start and end with a double quote, ".

SMITH
Comments in the SMITH language start with ;, and last till the end of the line.

Squeak
In the Smalltalk variant Squeak, comments start and end with ". Double quotes can appear inside comments by doubling them.

SQL
Standard SQL uses comments starting with two or more dashes, and ending at the end of the line. MySQL does not follow the standard. Instead, it allows comments that start with a # or -- (that’s two dashes and a space) ending with the following newline, and comments starting with /*, and ending with the next ; or */ that isn’t inside single or double quotes. A pattern for this is returned by $RE{comment}{SQL}{MySQL}. With {-keep}, only $1 will be set, and it returns the entire comment.

Tcl
In Tcl, comments start with # and continue till the end of the line.

TeX
The documentation language TeX uses comments starting with % and ending at the end of the line.

troff
The document formatting language troff uses comments starting with \", and continuing till the end of the line.

Ubercode
The Windows programming language Ubercode uses comments that start with // and continue to the end of the line. See <http://www.ubercode.com>.

  1. In configuration files for the editor vi, one can use comments starting with ", and ending at the end of the line.

*W
In the language *W, comments start with ||, and end with !!.

zonefile
Comments in DNS zonefiles start with ;, and continue till the end of the line.

ZZT-OOP
The in-game language ZZT-OOP uses comments that start with a character, and end at the following newline. See <http://dave2.rocketjump.org/rad/zzthelp/lang.html>.

REFERENCES

[Go 90]
Charles F. Goldfarb: The SGML Handbook. Oxford: Oxford University Press. 1990. ISBN 0-19-853737-9. Ch. 10.3, pp 390-391.

SEE ALSO

Regexp::Common for a general description of how to use this interface.

AUTHOR

Damian Conway ([email protected])

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

For a start, there are many common regexes missing. Send them in to [email protected].

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

415 - Linux cli command getttynam

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getttynam and provides detailed information about the command getttynam, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getttynam.

NAME 🖥️ getttynam 🖥️

get ttys file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ttyent.h>
struct ttyent *getttyent(void);
struct ttyent *getttynam(const char *name);
int setttyent(void);
int endttyent(void);

DESCRIPTION

These functions provide an interface to the file _PATH_TTYS (e.g., /etc/ttys).

The function setttyent() opens the file or rewinds it if already open.

The function endttyent() closes the file.

The function getttynam() searches for a given terminal name in the file. It returns a pointer to a ttyent structure (description below).

The function getttyent() opens the file _PATH_TTYS (if necessary) and returns the first entry. If the file is already open, the next entry. The ttyent structure has the form:

struct ttyent {
    char *ty_name;     /* terminal device name */
    char *ty_getty;    /* command to execute, usually getty */
    char *ty_type;     /* terminal type for termcap */
    int   ty_status;   /* status flags */
    char *ty_window;   /* command to start up window manager */
    char *ty_comment;  /* comment field */
};

ty_status can be:

#define TTY_ON     0x01  /* enable logins (start ty_getty program) */
#define TTY_SECURE 0x02  /* allow UID 0 to login */

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getttyent(), setttyent(), endttyent(), getttynam()

Thread safetyMT-Unsafe race:ttyent

STANDARDS

BSD.

NOTES

Under Linux, the file /etc/ttys, and the functions described above, are not used.

SEE ALSO

ttyname(3), ttyslot(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

416 - Linux cli command htole32

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command htole32 and provides detailed information about the command htole32, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the htole32.

NAME 🖥️ htole32 🖥️

convert values between host and big-/little-endian byte order

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <endian.h>
uint16_t htobe16(uint16_t host_16bits);
uint16_t htole16(uint16_t host_16bits);
uint16_t be16toh(uint16_t big_endian_16bits);
uint16_t le16toh(uint16_t little_endian_16bits);
uint32_t htobe32(uint32_t host_32bits);
uint32_t htole32(uint32_t host_32bits);
uint32_t be32toh(uint32_t big_endian_32bits);
uint32_t le32toh(uint32_t little_endian_32bits);
uint64_t htobe64(uint64_t host_64bits);
uint64_t htole64(uint64_t host_64bits);
uint64_t be64toh(uint64_t big_endian_64bits);
uint64_t le64toh(uint64_t little_endian_64bits);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

htobe16(), htole16(), be16toh(), le16toh(), htobe32(), htole32(), be32toh(), le32toh(), htobe64(), htole64(), be64toh(), le64toh():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    In glibc up to and including 2.19:
        _BSD_SOURCE

DESCRIPTION

These functions convert the byte encoding of integer values from the byte order that the current CPU (the “host”) uses, to and from little-endian and big-endian byte order.

The number, nn, in the name of each function indicates the size of integer handled by the function, either 16, 32, or 64 bits.

The functions with names of the form “htobenn” convert from host byte order to big-endian order.

The functions with names of the form “htolenn” convert from host byte order to little-endian order.

The functions with names of the form “benntoh” convert from big-endian order to host byte order.

The functions with names of the form “lenntoh” convert from little-endian order to host byte order.

VERSIONS

Similar functions are present on the BSDs, where the required header file is <sys/endian.h> instead of <endian.h>. Unfortunately, NetBSD, FreeBSD, and glibc haven’t followed the original OpenBSD naming convention for these functions, whereby the nn component always appears at the end of the function name (thus, for example, in NetBSD, FreeBSD, and glibc, the equivalent of OpenBSDs “betoh32” is “be32toh”).

STANDARDS

None.

HISTORY

glibc 2.9.

These functions are similar to the older byteorder(3) family of functions. For example, be32toh() is identical to ntohl().

The advantage of the byteorder(3) functions is that they are standard functions available on all UNIX systems. On the other hand, the fact that they were designed for use in the context of TCP/IP means that they lack the 64-bit and little-endian variants described in this page.

EXAMPLES

The program below display the results of converting an integer from host byte order to both little-endian and big-endian byte order. Since host byte order is either little-endian or big-endian, only one of these conversions will have an effect. When we run this program on a little-endian system such as x86-32, we see the following:

$ ./a.out
x.u32 = 0x44332211
htole32(x.u32) = 0x44332211
htobe32(x.u32) = 0x11223344

Program source

#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    union {
        uint32_t u32;
        uint8_t arr[4];
    } x;
    x.arr[0] = 0x11;	/* Lowest-address byte */
    x.arr[1] = 0x22;
    x.arr[2] = 0x33;
    x.arr[3] = 0x44;	/* Highest-address byte */
    printf("x.u32 = %#x

“, x.u32); printf(“htole32(x.u32) = %#x “, htole32(x.u32)); printf(“htobe32(x.u32) = %#x “, htobe32(x.u32)); exit(EXIT_SUCCESS); }

SEE ALSO

bswap(3), byteorder(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

417 - Linux cli command key_setsecret

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command key_setsecret and provides detailed information about the command key_setsecret, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the key_setsecret.

NAME 🖥️ key_setsecret 🖥️

interfaces to rpc keyserver daemon

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <rpc/rpc.h>
int key_decryptsession(char *remotename, des_block *deskey);
int key_encryptsession(char *remotename, des_block *deskey);
int key_gendes(des_block *deskey);
int key_setsecret(char *key);
int key_secretkey_is_set(void);

DESCRIPTION

The functions here are used within the RPC’s secure authentication mechanism (AUTH_DES). There should be no need for user programs to use this functions.

The function key_decryptsession() uses the (remote) server netname and takes the DES key for decrypting. It uses the public key of the server and the secret key associated with the effective UID of the calling process.

The function key_encryptsession() is the inverse of key_decryptsession(). It encrypts the DES keys with the public key of the server and the secret key associated with the effective UID of the calling process.

The function key_gendes() is used to ask the keyserver for a secure conversation key.

The function key_setsecret() is used to set the key for the effective UID of the calling process.

The function key_secretkey_is_set() can be used to determine whether a key has been set for the effective UID of the calling process.

RETURN VALUE

These functions return 1 on success and 0 on failure.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

key_decryptsession(), key_encryptsession(), key_gendes(), key_setsecret(), key_secretkey_is_set()

Thread safetyMT-Safe

NOTES

Note that we talk about two types of encryption here. One is asymmetric using a public and secret key. The other is symmetric, the 64-bit DES.

These routines were part of the Linux/Doors-project, abandoned by now.

SEE ALSO

crypt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

418 - Linux cli command malloc_info

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command malloc_info and provides detailed information about the command malloc_info, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the malloc_info.

NAME 🖥️ malloc_info 🖥️

export malloc state to a stream

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <malloc.h>
int malloc_info(int options, FILE *stream);

DESCRIPTION

The malloc_info() function exports an XML string that describes the current state of the memory-allocation implementation in the caller. The string is printed on the file stream stream. The exported string includes information about all arenas (see malloc(3)).

As currently implemented, options must be zero.

RETURN VALUE

On success, malloc_info() returns 0. On failure, it returns -1, and errno is set to indicate the error.

ERRORS

EINVAL
options was nonzero.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

malloc_info()

Thread safetyMT-Safe

STANDARDS

GNU.

HISTORY

glibc 2.10.

NOTES

The memory-allocation information is provided as an XML string (rather than a C structure) because the information may change over time (according to changes in the underlying implementation). The output XML string includes a version field.

The open_memstream(3) function can be used to send the output of malloc_info() directly into a buffer in memory, rather than to a file.

The malloc_info() function is designed to address deficiencies in malloc_stats(3) and mallinfo(3).

EXAMPLES

The program below takes up to four command-line arguments, of which the first three are mandatory. The first argument specifies the number of threads that the program should create. All of the threads, including the main thread, allocate the number of blocks of memory specified by the second argument. The third argument controls the size of the blocks to be allocated. The main thread creates blocks of this size, the second thread created by the program allocates blocks of twice this size, the third thread allocates blocks of three times this size, and so on.

The program calls malloc_info() twice to display the memory-allocation state. The first call takes place before any threads are created or memory allocated. The second call is performed after all threads have allocated memory.

In the following example, the command-line arguments specify the creation of one additional thread, and both the main thread and the additional thread allocate 10000 blocks of memory. After the blocks of memory have been allocated, malloc_info() shows the state of two allocation arenas.

$ getconf GNU_LIBC_VERSION
glibc 2.13
$ ./a.out 1 10000 100
============ Before allocating blocks ============
<malloc version="1">
<heap nr="0">
<sizes>
</sizes>
<total type="fast" count="0" size="0"/>
<total type="rest" count="0" size="0"/>
<system type="current" size="135168"/>
<system type="max" size="135168"/>
<aspace type="total" size="135168"/>
<aspace type="mprotect" size="135168"/>
</heap>
<total type="fast" count="0" size="0"/>
<total type="rest" count="0" size="0"/>
<system type="current" size="135168"/>
<system type="max" size="135168"/>
<aspace type="total" size="135168"/>
<aspace type="mprotect" size="135168"/>
</malloc>
============ After allocating blocks ============
<malloc version="1">
<heap nr="0">
<sizes>
</sizes>
<total type="fast" count="0" size="0"/>
<total type="rest" count="0" size="0"/>
<system type="current" size="1081344"/>
<system type="max" size="1081344"/>
<aspace type="total" size="1081344"/>
<aspace type="mprotect" size="1081344"/>
</heap>
<heap nr="1">
<sizes>
</sizes>
<total type="fast" count="0" size="0"/>
<total type="rest" count="0" size="0"/>
<system type="current" size="1032192"/>
<system type="max" size="1032192"/>
<aspace type="total" size="1032192"/>
<aspace type="mprotect" size="1032192"/>
</heap>
<total type="fast" count="0" size="0"/>
<total type="rest" count="0" size="0"/>
<system type="current" size="2113536"/>
<system type="max" size="2113536"/>
<aspace type="total" size="2113536"/>
<aspace type="mprotect" size="2113536"/>
</malloc>

Program source

#include <err.h>
#include <errno.h>
#include <malloc.h>
#include <pthread.h>
#include <stdlib.h>
#include <unistd.h>
static size_t        blockSize;
static size_t        numThreads;
static unsigned int  numBlocks;
static void *
thread_func(void *arg)
{
    int tn = (int) arg;
    /* The multiplier '(2 + tn)' ensures that each thread (including
       the main thread) allocates a different amount of memory. */
    for (unsigned int j = 0; j < numBlocks; j++)
        if (malloc(blockSize * (2 + tn)) == NULL)
            err(EXIT_FAILURE, "malloc-thread");
    sleep(100);         /* Sleep until main thread terminates. */
    return NULL;
}
int
main(int argc, char *argv[])
{
    int        sleepTime;
    pthread_t  *thr;
    if (argc < 4) {
        fprintf(stderr,
                "%s num-threads num-blocks block-size [sleep-time]

“, argv[0]); exit(EXIT_FAILURE); } numThreads = atoi(argv[1]); numBlocks = atoi(argv[2]); blockSize = atoi(argv[3]); sleepTime = (argc > 4) ? atoi(argv[4]) : 0; thr = calloc(numThreads, sizeof(thr)); if (thr == NULL) err(EXIT_FAILURE, “calloc”); printf("============ Before allocating blocks ============ “); malloc_info(0, stdout); / Create threads that allocate different amounts of memory. */ for (size_t tn = 0; tn < numThreads; tn++) { errno = pthread_create(&thr[tn], NULL, thread_func, (void ) tn); if (errno != 0) err(EXIT_FAILURE, “pthread_create”); / If we add a sleep interval after the start-up of each thread, the threads likely won’t contend for malloc mutexes, and therefore additional arenas won’t be allocated (see malloc(3)). / if (sleepTime > 0) sleep(sleepTime); } / The main thread also allocates some memory. / for (unsigned int j = 0; j < numBlocks; j++) if (malloc(blockSize) == NULL) err(EXIT_FAILURE, “malloc”); sleep(2); / Give all threads a chance to complete allocations. */ printf(” ============ After allocating blocks ============ “); malloc_info(0, stdout); exit(EXIT_SUCCESS); }

SEE ALSO

mallinfo(3), malloc(3), malloc_stats(3), mallopt(3), open_memstream(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

419 - Linux cli command readdir_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command readdir_r and provides detailed information about the command readdir_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the readdir_r.

NAME 🖥️ readdir_r 🖥️

read a directory

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <dirent.h>
[[deprecated]] int readdir_r(DIR *restrict dirp,
 struct dirent *restrict entry,
 struct dirent **restrict result);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

readdir_r():

    _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

This function is deprecated; use readdir(3) instead.

The readdir_r() function was invented as a reentrant version of readdir(3). It reads the next directory entry from the directory stream dirp, and returns it in the caller-allocated buffer pointed to by entry. For details of the dirent structure, see readdir(3).

A pointer to the returned buffer is placed in *result; if the end of the directory stream was encountered, then NULL is instead returned in *result.

It is recommended that applications use readdir(3) instead of readdir_r(). Furthermore, since glibc 2.24, glibc deprecates readdir_r(). The reasons are as follows:

  • On systems where NAME_MAX is undefined, calling readdir_r() may be unsafe because the interface does not allow the caller to specify the length of the buffer used for the returned directory entry.

  • On some systems, readdir_r() can’t read directory entries with very long names. When the glibc implementation encounters such a name, readdir_r() fails with the error ENAMETOOLONG after the final directory entry has been read. On some other systems, readdir_r() may return a success status, but the returned d_name field may not be null terminated or may be truncated.

  • In the current POSIX.1 specification (POSIX.1-2008), readdir(3) is not required to be thread-safe. However, in modern implementations (including the glibc implementation), concurrent calls to readdir(3) that specify different directory streams are thread-safe. Therefore, the use of readdir_r() is generally unnecessary in multithreaded programs. In cases where multiple threads must read from the same directory stream, using readdir(3) with external synchronization is still preferable to the use of readdir_r(), for the reasons given in the points above.

  • It is expected that a future version of POSIX.1 will make readdir_r() obsolete, and require that readdir(3) be thread-safe when concurrently employed on different directory streams.

RETURN VALUE

The readdir_r() function returns 0 on success. On error, it returns a positive error number (listed under ERRORS). If the end of the directory stream is reached, readdir_r() returns 0, and returns NULL in *result.

ERRORS

EBADF
Invalid directory stream descriptor dirp.

ENAMETOOLONG
A directory entry whose name was too long to be read was encountered.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

readdir_r()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

SEE ALSO

readdir(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

420 - Linux cli command puts

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command puts and provides detailed information about the command puts, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the puts.

NAME 🖥️ puts 🖥️

output of characters and strings

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int fputc(int c, FILE *stream);
int putc(int c, FILE *stream);
int putchar(int c);
int fputs(const char *restrict s, FILE *restrict stream);
int puts(const char *s);

DESCRIPTION

fputc() writes the character c, cast to an unsigned char, to stream.

putc() is equivalent to fputc() except that it may be implemented as a macro which evaluates stream more than once.

putchar(c) is equivalent to putc(c, stdout).

fputs() writes the string s to stream, without its terminating null byte (‘�’).

puts() writes the string s and a trailing newline to stdout.

Calls to the functions described here can be mixed with each other and with calls to other output functions from the stdio library for the same output stream.

For nonlocking counterparts, see unlocked_stdio(3).

RETURN VALUE

fputc(), putc(), and putchar() return the character written as an unsigned char cast to an int or EOF on error.

puts() and fputs() return a nonnegative number on success, or EOF on error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fputc(), fputs(), putc(), putchar(), puts()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89, C99.

BUGS

It is not advisable to mix calls to output functions from the stdio library with low-level calls to write(2) for the file descriptor associated with the same output stream; the results will be undefined and very probably not what you want.

SEE ALSO

write(2), ferror(3), fgets(3), fopen(3), fputwc(3), fputws(3), fseek(3), fwrite(3), putwchar(3), scanf(3), unlocked_stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

421 - Linux cli command iconv_close

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command iconv_close and provides detailed information about the command iconv_close, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the iconv_close.

NAME 🖥️ iconv_close 🖥️

deallocate descriptor for character set conversion

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <iconv.h>
int iconv_close(iconv_t cd);

DESCRIPTION

The iconv_close() function deallocates a conversion descriptor cd previously allocated using iconv_open(3).

RETURN VALUE

On success, iconv_close() returns 0; otherwise, it returns -1 and sets errno to indicate the error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

iconv_close()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.1. POSIX.1-2001.

SEE ALSO

iconv(3), iconv_open(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

422 - Linux cli command Image_ExifTool_PLUSpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_PLUSpm and provides detailed information about the command Image_ExifTool_PLUSpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_PLUSpm.

NAME 🖥️ Image_ExifTool_PLUSpm 🖥️

PLUS (Picture Licensing Universal System) tags

DESCRIPTION

Definitions for PLUS (Picture Licensing Universal System) tags.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.useplus.com/useplus/standards.asp>

SEE ALSO

“PLUS Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

423 - Linux cli command OLE_Storage_Litepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command OLE_Storage_Litepm and provides detailed information about the command OLE_Storage_Litepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the OLE_Storage_Litepm.

NAME 🖥️ OLE_Storage_Litepm 🖥️

Simple Class for OLE document interface.

SYNOPSIS

use OLE::Storage_Lite; # Initialize. # From a file my $oOl = OLE::Storage_Lite->new(“some.xls”); # From a filehandle object use IO::File; my $oIo = new IO::File; $oIo->open("<iofile.xls"); binmode($oIo); my $oOl = OLE::Storage_Lite->new($oFile); # Read data my $oPps = $oOl->getPpsTree(1); # Save Data # To a File $oPps->save(“kaba.xls”); #kaba.xls $oPps->save(-); #STDOUT # To a filehandle object my $oIo = new IO::File; $oIo->open(">iofile.xls"); bimode($oIo); $oPps->save($oIo);

DESCRIPTION

OLE::Storage_Lite allows you to read and write an OLE structured file.

OLE::Storage_Lite::PPS is a class representing PPS. OLE::Storage_Lite::PPS::Root, OLE::Storage_Lite::PPS::File and OLE::Storage_Lite::PPS::Dir are subclasses of OLE::Storage_Lite::PPS.

new()

Constructor.

$oOle = OLE::Storage_Lite->new($sFile);

Creates a OLE::Storage_Lite object for $sFile. $sFile must be a correct file name.

The new() constructor also accepts a valid filehandle. Remember to binmode() the filehandle first.

getPpsTree()

$oPpsRoot = $oOle->getPpsTree([$bData]);

Returns PPS as an OLE::Storage_Lite::PPS::Root object. Other PPS objects will be included as its children.

If $bData is true, the objects will have data in the file.

getPpsSearch()

$oPpsRoot = $oOle->getPpsTree($raName [, $bData][, $iCase] );

Returns PPSs as OLE::Storage_Lite::PPS objects that has the name specified in $raName array.

If $bData is true, the objects will have data in the file. If $iCase is true, search is case insensitive.

getNthPps()

$oPpsRoot = $oOle->getNthPps($iNth [, $bData]);

Returns PPS as OLE::Storage_Lite::PPS object specified number $iNth.

If $bData is true, the objects will have data in the file.

Asc2Ucs()

$sUcs2 = OLE::Storage_Lite::Asc2Ucs($sAsc>);

Utility function. Just adds 0x00 after every characters in $sAsc.

Ucs2Asc()

$sAsc = OLE::Storage_Lite::Ucs2Asc($sUcs2);

Utility function. Just deletes 0x00 after words in $sUcs.

OLE::Storage_Lite::PPS

OLE::Storage_Lite::PPS has these properties:

No
Order number in saving.

Name
Its name in UCS2 (a.k.a Unicode).

Type
Its type (1:Dir, 2:File (Data), 5: Root)

PrevPps
Previous pps (as No)

NextPps
Next pps (as No)

DirPps
Dir pps (as No).

Time1st
Timestamp 1st in array ref as similar format of localtime.

Time2nd
Timestamp 2nd in array ref as similar format of localtime.

StartBlock
Start block number

Size
Size of the pps

Data
Its data

Child
Its child PPSs in array ref

OLE::Storage_Lite::PPS::Root

OLE::Storage_Lite::PPS::Root has 2 methods.

new()

$oRoot = OLE::Storage_Lite::PPS::Root->new( $raTime1st, $raTime2nd, $raChild);

Constructor.

$raTime1st, $raTime2nd are array refs with ($iSec, $iMin, $iHour, $iDay, $iMon, $iYear). $iSec means seconds, $iMin means minutes. $iHour means hours. $iDay means day. $iMon is month -1. $iYear is year - 1900.

$raChild is a array ref of children PPSs.

save()

$oRoot = $oRoot>->save( $sFile, $bNoAs);

Saves information into $sFile. If $sFile is ‘-’, this will use STDOUT.

The new() constructor also accepts a valid filehandle. Remember to binmode() the filehandle first.

If $bNoAs is defined, this function will use the No of PPSs for saving order. If $bNoAs is undefined, this will calculate PPS saving order.

OLE::Storage_Lite::PPS::Dir

OLE::Storage_Lite::PPS::Dir has 1 method.

new()

$oRoot = OLE::Storage_Lite::PPS::Dir->new( $sName, [, $raTime1st] [, $raTime2nd] [, $raChild>]);

Constructor.

$sName is a name of the PPS.

$raTime1st, $raTime2nd is a array ref as ($iSec, $iMin, $iHour, $iDay, $iMon, $iYear). $iSec means seconds, $iMin means minutes. $iHour means hours. $iDay means day. $iMon is month -1. $iYear is year - 1900.

$raChild is a array ref of children PPSs.

OLE::Storage_Lite::PPS::File

OLE::Storage_Lite::PPS::File has 3 method.

new

$oRoot = OLE::Storage_Lite::PPS::File->new($sName, $sData);

$sName is name of the PPS.

$sData is data of the PPS.

newFile()

$oRoot = OLE::Storage_Lite::PPS::File->newFile($sName, $sFile);

This function makes to use file handle for getting and storing data.

$sName is name of the PPS.

If $sFile is scalar, it assumes that is a filename. If $sFile is an IO::Handle object, it uses that specified handle. If $sFile is undef or ‘’, it uses temporary file.

CAUTION: Take care $sFile will be updated by append method. So if you want to use IO::Handle and append a data to it, you should open the handle with r+.

append()

$oRoot = $oPps->append($sData);

appends specified data to that PPS.

$sData is appending data for that PPS.

CAUTION

A saved file with VBA (a.k.a Macros) by this module will not work correctly. However modules can get the same information from the file, the file occurs a error in application(Word, Excel …).

DEPRECATED FEATURES

Older version of OLE::Storage_Lite autovivified a scalar ref in the new() constructors into a scalar filehandle. This functionality is still there for backwards compatibility but it is highly recommended that you do not use it. Instead create a filehandle (scalar or otherwise) and pass that in.

COPYRIGHT

The OLE::Storage_Lite module is Copyright (c) 2000,2001 Kawai Takanori. Japan. All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.

ACKNOWLEDGEMENTS

First of all, I would like to acknowledge to Martin Schwartz and his module OLE::Storage.

AUTHOR

Kawai Takanori [email protected]

This module is currently maintained by John McNamara [email protected]

SEE ALSO

OLE::Storage

Documentation for the OLE Compound document has been released by Microsoft under the Open Specification Promise. See http://www.microsoft.com/interop/docs/supportingtechnologies.mspx

The Digital Imaging Group have also detailed the OLE format in the JPEG2000 specification: see Appendix A of http://www.i3a.org/pdf/wg1n1017.pdf

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

424 - Linux cli command Spreadsheet_WriteExcel_Formatpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_WriteExcel_Formatpm and provides detailed information about the command Spreadsheet_WriteExcel_Formatpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_WriteExcel_Formatpm.

NAME 🖥️ Spreadsheet_WriteExcel_Formatpm 🖥️

A class for defining Excel formatting.

SYNOPSIS

See the documentation for Spreadsheet::WriteExcel

DESCRIPTION

This module is used in conjunction with Spreadsheet::WriteExcel.

AUTHOR

John McNamara [email protected]

COPYRIGHT

Copyright MM-MMX, John McNamara.

All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

425 - Linux cli command TAILQ_FOREACH_REVERSE

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command TAILQ_FOREACH_REVERSE and provides detailed information about the command TAILQ_FOREACH_REVERSE, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the TAILQ_FOREACH_REVERSE.

NAME 🖥️ TAILQ_FOREACH_REVERSE 🖥️

implementation of a doubly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
TAILQ_ENTRY(TYPE);
TAILQ_HEAD(HEADNAME, TYPE);
TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD head);
void TAILQ_INIT(TAILQ_HEAD *head);
int TAILQ_EMPTY(TAILQ_HEAD *head);
void TAILQ_INSERT_HEAD(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_TAIL(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_AFTER(TAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_FIRST(TAILQ_HEAD *head);
struct TYPE *TAILQ_LAST(TAILQ_HEAD *head, HEADNAME);
struct TYPE *TAILQ_PREV(struct TYPE *elm, HEADNAME, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_NEXT(struct TYPE *elm, TAILQ_ENTRY NAME);
TAILQ_FOREACH(struct TYPE *var, TAILQ_HEAD *head,
 TAILQ_ENTRY NAME);
TAILQ_FOREACH_REVERSE(struct TYPE *var, TAILQ_HEAD *head, HEADNAME,
 TAILQ_ENTRY NAME);
void TAILQ_REMOVE(TAILQ_HEAD *head, struct TYPE *elm,
 TAILQ_ENTRY NAME);
void TAILQ_CONCAT(TAILQ_HEAD *head1, TAILQ_HEAD *head2,
 TAILQ_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked tail queues.

In the macro definitions, TYPE is the name of a user defined structure, that must contain a field of type TAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user defined structure that must be declared using the macro TAILQ_HEAD().

Creation

A tail queue is headed by a structure defined by the TAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the queue and the other to the last element in the queue. The elements are doubly linked so that an arbitrary element can be removed without traversing the queue. New elements can be added to the queue after an existing element, before an existing element, at the head of the queue, or at the end of the queue. A TAILQ_HEAD structure is declared as follows:

TAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the queue. A pointer to the head of the queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

TAILQ_ENTRY() declares a structure that connects the elements in the queue.

TAILQ_HEAD_INITIALIZER() evaluates to an initializer for the queue head.

TAILQ_INIT() initializes the queue referenced by

TAILQ_EMPTY() evaluates to true if there are no items on the queue. head.

Insertion

TAILQ_INSERT_HEAD() inserts the new element elm at the head of the queue.

TAILQ_INSERT_TAIL() inserts the new element elm at the end of the queue.

TAILQ_INSERT_BEFORE() inserts the new element elm before the element listelm.

TAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

TAILQ_FIRST() returns the first item on the queue, or NULL if the queue is empty.

TAILQ_LAST() returns the last item on the queue. If the queue is empty the return value is NULL.

TAILQ_PREV() returns the previous item on the queue, or NULL if this item is the first.

TAILQ_NEXT() returns the next item on the queue, or NULL if this item is the last.

TAILQ_FOREACH() traverses the queue referenced by head in the forward direction, assigning each element in turn to var. var is set to NULL if the loop completes normally, or if there were no elements.

TAILQ_FOREACH_REVERSE() traverses the queue referenced by head in the reverse direction, assigning each element in turn to var.

Removal

TAILQ_REMOVE() removes the element elm from the queue.

Other features

TAILQ_CONCAT() concatenates the queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

TAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

TAILQ_FIRST(), TAILQ_LAST(), TAILQ_PREV(), and TAILQ_NEXT() return a pointer to the first, last, previous, or next TYPE structure, respectively.

TAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

STANDARDS

BSD.

HISTORY

4.4BSD.

CAVEATS

TAILQ_FOREACH() and TAILQ_FOREACH_REVERSE() don’t allow var to be removed or freed within the loop, as it would interfere with the traversal. TAILQ_FOREACH_SAFE() and TAILQ_FOREACH_REVERSE_SAFE(), which are present on the BSDs but are not present in glibc, fix this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    TAILQ_ENTRY(entry) entries;             /* Tail queue */
};
TAILQ_HEAD(tailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct tailhead head;                   /* Tail queue head */
    int i;
    TAILQ_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    TAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    TAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    TAILQ_INSERT_AFTER(&head, n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    TAILQ_INSERT_BEFORE(n2, n3, entries);
    TAILQ_REMOVE(&head, n2, entries);       /* Deletion */
    free(n2);
                                            /* Forward traversal */
    i = 0;
    TAILQ_FOREACH(np, &head, entries)
        np->data = i++;
                                            /* Reverse traversal */
    TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = TAILQ_FIRST(&head); while (n1 != NULL) { n2 = TAILQ_NEXT(n1, entries); free(n1); n1 = n2; } TAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

426 - Linux cli command Text_CSVpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Text_CSVpm and provides detailed information about the command Text_CSVpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Text_CSVpm.

NAME 🖥️ Text_CSVpm 🖥️

comma-separated values manipulator (using XS or PurePerl)

SYNOPSIS

This section is taken from Text::CSV_XS.

# Functional interface use Text::CSV qw( csv ); # Read whole file in memory my $aoa = csv (in => “data.csv”); # as array of array my $aoh = csv (in => “data.csv”, headers => “auto”); # as array of hash # Write array of arrays as csv file csv (in => $aoa, out => “file.csv”, sep_char => “;”); # Only show lines where “code” is odd csv (in => “data.csv”, filter => { code => sub { $_ % 2 }}); # Object interface use Text::CSV; my @rows; # Read/parse CSV my $csv = Text::CSV->new ({ binary => 1, auto_diag => 1 }); open my $fh, “<:encoding(utf8)”, “test.csv” or die “test.csv: $!”; while (my $row = $csv->getline ($fh)) { $row->[2] =~ m/pattern/ or next; # 3rd field should match push @rows, $row; } close $fh; # and write as CSV open $fh, “>:encoding(utf8)”, “new.csv” or die “new.csv: $!”; $csv->say ($fh, $_) for @rows; close $fh or die “new.csv: $!”;

DESCRIPTION

Text::CSV is a thin wrapper for Text::CSV_XS-compatible modules now. All the backend modules provide facilities for the composition and decomposition of comma-separated values. Text::CSV uses Text::CSV_XS by default, and when Text::CSV_XS is not available, falls back on Text::CSV_PP, which is bundled in the same distribution as this module.

CHOOSING BACKEND

This module respects an environmental variable called PERL_TEXT_CSV when it decides a backend module to use. If this environmental variable is not set, it tries to load Text::CSV_XS, and if Text::CSV_XS is not available, falls back on Text::CSV_PP;

If you always don’t want it to fall back on Text::CSV_PP, set the variable like this (export may be setenv, set and the likes, depending on your environment):

> export PERL_TEXT_CSV=Text::CSV_XS

If you prefer Text::CSV_XS to Text::CSV_PP (default), then:

> export PERL_TEXT_CSV=Text::CSV_XS,Text::CSV_PP

You may also want to set this variable at the top of your test files, in order not to be bothered with incompatibilities between backends (you need to wrap this in BEGIN, and set before actually use-ing Text::CSV module, as it decides its backend as soon as it’s loaded):

BEGIN { $ENV{PERL_TEXT_CSV}=Text::CSV_PP; } use Text::CSV;

NOTES

This section is also taken from Text::CSV_XS.

Embedded newlines

Important Note: The default behavior is to accept only ASCII characters in the range from 0x20 (space) to 0x7E (tilde). This means that the fields can not contain newlines. If your data contains newlines embedded in fields, or characters above 0x7E (tilde), or binary data, you must set binary => 1 in the call to new. To cover the widest range of parsing options, you will always want to set binary.

But you still have the problem that you have to pass a correct line to the parse method, which is more complicated from the usual point of usage:

my $csv = Text::CSV->new ({ binary => 1, eol => $/ }); while (<>) { # WRONG! $csv->parse ($_); my @fields = $csv->fields (); }

this will break, as the while might read broken lines: it does not care about the quoting. If you need to support embedded newlines, the way to go is to not pass eol in the parser (it accepts , , and by default) and then

my $csv = Text::CSV->new ({ binary => 1 }); open my $fh, “<”, $file or die “$file: $!”; while (my $row = $csv->getline ($fh)) { my @fields = @$row; }

The old(er) way of using global file handles is still supported

while (my $row = $csv->getline (*ARGV)) { … }

Unicode

Unicode is only tested to work with perl-5.8.2 and up.

See also BOM.

The simplest way to ensure the correct encoding is used for in- and output is by either setting layers on the filehandles, or setting the encoding argument for csv.

open my $fh, “<:encoding(UTF-8)”, “in.csv” or die “in.csv: $!”; or my $aoa = csv (in => “in.csv”, encoding => “UTF-8”); open my $fh, “>:encoding(UTF-8)”, “out.csv” or die “out.csv: $!”; or csv (in => $aoa, out => “out.csv”, encoding => “UTF-8”);

On parsing (both for getline and parse), if the source is marked being UTF8, then all fields that are marked binary will also be marked UTF8.

On combining (print and combine): if any of the combining fields was marked UTF8, the resulting string will be marked as UTF8. Note however that all fields before the first field marked UTF8 and contained 8-bit characters that were not upgraded to UTF8, these will be bytes in the resulting string too, possibly causing unexpected errors. If you pass data of different encoding, or you don’t know if there is different encoding, force it to be upgraded before you pass them on:

$csv->print ($fh, [ map { utf8::upgrade (my $x = $_); $x } @data ]);

For complete control over encoding, please use Text::CSV::Encoded:

use Text::CSV::Encoded; my $csv = Text::CSV::Encoded->new ({ encoding_in => “iso-8859-1”, # the encoding comes into Perl encoding_out => “cp1252”, # the encoding comes out of Perl }); $csv = Text::CSV::Encoded->new ({ encoding => “utf8” }); # combine () and print () accept *literally* utf8 encoded data # parse () and getline () return *literally* utf8 encoded data $csv = Text::CSV::Encoded->new ({ encoding => undef }); # default # combine () and print () accept UTF8 marked data # parse () and getline () return UTF8 marked data

BOM

BOM (or Byte Order Mark) handling is available only inside the header method. This method supports the following encodings: utf-8, utf-1, utf-32be, utf-32le, utf-16be, utf-16le, utf-ebcdic, scsu, bocu-1, and gb-18030. See Wikipedia <https://en.wikipedia.org/wiki/Byte_order_mark>.

If a file has a BOM, the easiest way to deal with that is

my $aoh = csv (in => $file, detect_bom => 1);

All records will be encoded based on the detected BOM.

This implies a call to the header method, which defaults to also set the column_names. So this is not the same as

my $aoh = csv (in => $file, headers => “auto”);

which only reads the first record to set column_names but ignores any meaning of possible present BOM.

METHODS

This section is also taken from Text::CSV_XS.

version

(Class method) Returns the current module version.

new

(Class method) Returns a new instance of class Text::CSV. The attributes are described by the (optional) hash ref \%attr.

my $csv = Text::CSV->new ({ attributes … });

The following attributes are available:

eol

my $csv = Text::CSV->new ({ eol => $/ }); $csv->eol (undef); my $eol = $csv->eol;

The end-of-line string to add to rows for print or the record separator for getline.

When not passed in a parser instance, the default behavior is to accept , , and , so it is probably safer to not specify eol at all. Passing undef or the empty string behave the same.

When not passed in a generating instance, records are not terminated at all, so it is probably wise to pass something you expect. A safe choice for eol on output is either $/ or .

Common values for eol are " " ( or Line Feed), " " ( or Carriage Return, Line Feed), and " " ( or Carriage Return). The eol attribute cannot exceed 7 (ASCII) characters.

If both $/ and eol equal " ", parsing lines that end on only a Carriage Return without Line Feed, will be parsed correct.

sep_char

my $csv = Text::CSV->new ({ sep_char => “;” }); $csv->sep_char (";"); my $c = $csv->sep_char;

The char used to separate fields, by default a comma. (,). Limited to a single-byte character, usually in the range from 0x20 (space) to 0x7E (tilde). When longer sequences are required, use sep.

The separation character can not be equal to the quote character or to the escape character.

sep

my $csv = Text::CSV->new ({ sep => “\N{FULLWIDTH COMMA}” }); $csv->sep (";"); my $sep = $csv->sep;

The chars used to separate fields, by default undefined. Limited to 8 bytes.

When set, overrules sep_char. If its length is one byte it acts as an alias to sep_char.

quote_char

my $csv = Text::CSV->new ({ quote_char => "" }); $csv->quote_char (undef); my $c = $csv->quote_char;

The character to quote fields containing blanks or binary data, by default the double quote character ("). A value of undef suppresses quote chars (for simple cases only). Limited to a single-byte character, usually in the range from 0x20 (space) to 0x7E (tilde). When longer sequences are required, use quote.

quote_char can not be equal to sep_char.

quote

my $csv = Text::CSV->new ({ quote => “\N{FULLWIDTH QUOTATION MARK}” }); $csv->quote (""); my $quote = $csv->quote;

The chars used to quote fields, by default undefined. Limited to 8 bytes.

When set, overrules quote_char. If its length is one byte it acts as an alias to quote_char.

This method does not support undef. Use quote_char to disable quotation.

escape_char

my $csv = Text::CSV->new ({ escape_char => “" }); $csv->escape_char (”:"); my $c = $csv->escape_char;

The character to escape certain characters inside quoted fields. This is limited to a single-byte character, usually in the range from 0x20 (space) to 0x7E (tilde).

The escape_char defaults to being the double-quote mark ("). In other words the same as the default quote_char. This means that doubling the quote mark in a field escapes it:

“foo”,“bar”,“Escape ““quote mark”” with two ““quote marks”””,“baz”

If you change the quote_char without changing the escape_char, the escape_char will still be the double-quote ("). If instead you want to escape the quote_char by doubling it you will need to also change the escape_char to be the same as what you have changed the quote_char to.

Setting escape_char to undef or "" will completely disable escapes and is greatly discouraged. This will also disable escape_null.

The escape character can not be equal to the separation character.

binary

my $csv = Text::CSV->new ({ binary => 1 }); $csv->binary (0); my $f = $csv->binary;

If this attribute is 1, you may use binary characters in quoted fields, including line feeds, carriage returns and NULL bytes. (The latter could be escaped as "0.) By default this feature is off.

If a string is marked UTF8, binary will be turned on automatically when binary characters other than CR and NL are encountered. Note that a simple string like "\x{00a0}" might still be binary, but not marked UTF8, so setting { binary => 1 } is still a wise option.

strict

my $csv = Text::CSV->new ({ strict => 1 }); $csv->strict (0); my $f = $csv->strict;

If this attribute is set to 1, any row that parses to a different number of fields than the previous row will cause the parser to throw error 2014.

skip_empty_rows

my $csv = Text::CSV->new ({ skip_empty_rows => 1 }); $csv->skip_empty_rows (“eof”); my $f = $csv->skip_empty_rows;

This attribute defines the behavior for empty rows: an eol immediately following the start of line. Default behavior is to return one single empty field.

This attribute is only used in parsing. This attribute is ineffective when using parse and fields.

Possible values for this attribute are

0 | undef
my $csv = Text::CSV->new ({ skip_empty_rows => 0 }); $csv->skip_empty_rows (undef); No special action is taken. The result will be one single empty field.

1 | “skip”
my $csv = Text::CSV->new ({ skip_empty_rows => 1 }); $csv->skip_empty_rows (“skip”); The row will be skipped.

2 | “eof” | “stop”
my $csv = Text::CSV->new ({ skip_empty_rows => 2 }); $csv->skip_empty_rows (“eof”); The parsing will stop as if an eof was detected.

3 | “die”
my $csv = Text::CSV->new ({ skip_empty_rows => 3 }); $csv->skip_empty_rows (“die”); The parsing will stop. The internal error code will be set to 2015 and the parser will die.

4 | “croak”
my $csv = Text::CSV->new ({ skip_empty_rows => 4 }); $csv->skip_empty_rows (“croak”); The parsing will stop. The internal error code will be set to 2015 and the parser will croak.

5 | “error”
my $csv = Text::CSV->new ({ skip_empty_rows => 5 }); $csv->skip_empty_rows (“error”); The parsing will fail. The internal error code will be set to 2015.

callback
my $csv = Text::CSV->new ({ skip_empty_rows => sub { [] } }); $csv->skip_empty_rows (sub { [ 42, $., undef, “empty” ] }); The callback is invoked and its result used instead. If you want the parse to stop after the callback, make sure to return a false value. The returned value from the callback should be an array-ref. Any other type will cause the parse to stop, so these are equivalent in behavior: csv (in => $fh, skip_empty_rows => “stop”); csv (in => $fh. skip_empty_rows => sub { 0; });

Without arguments, the current value is returned: 0, 1, eof, die, croak or the callback.

formula_handling

Alias for formula

formula

my $csv = Text::CSV->new ({ formula => “none” }); $csv->formula (“none”); my $f = $csv->formula;

This defines the behavior of fields containing formulas. As formulas are considered dangerous in spreadsheets, this attribute can define an optional action to be taken if a field starts with an equal sign (=).

For purpose of code-readability, this can also be written as

my $csv = Text::CSV->new ({ formula_handling => “none” }); $csv->formula_handling (“none”); my $f = $csv->formula_handling;

Possible values for this attribute are

none
Take no specific action. This is the default. $csv->formula (“none”);

die
Cause the process to die whenever a leading = is encountered. $csv->formula (“die”);

croak
Cause the process to croak whenever a leading = is encountered. (See Carp) $csv->formula (“croak”);

diag
Report position and content of the field whenever a leading = is found. The value of the field is unchanged. $csv->formula (“diag”);

empty
Replace the content of fields that start with a = with the empty string. $csv->formula (“empty”); $csv->formula ("");

undef
Replace the content of fields that start with a = with undef. $csv->formula (“undef”); $csv->formula (undef);

a callback
Modify the content of fields that start with a = with the return-value of the callback. The original content of the field is available inside the callback as $_; # Replace all formulas with 42 $csv->formula (sub { 42; }); # same as $csv->formula (“empty”) but slower $csv->formula (sub { "" }); # Allow =4+12 $csv->formula (sub { s/^=(\d+\d+)$/$1/eer }); # Allow more complex calculations $csv->formula (sub { eval { s{^=([-+*/0-9()]+)$}{$1}ee }; $_ });

All other values will give a warning and then fallback to diag.

decode_utf8

my $csv = Text::CSV->new ({ decode_utf8 => 1 }); $csv->decode_utf8 (0); my $f = $csv->decode_utf8;

This attributes defaults to TRUE.

While parsing, fields that are valid UTF-8, are automatically set to be UTF-8, so that

$csv->parse (“Ĩ “);

results in

PV("\304\250"�) [UTF8 “\x{128}”]

Sometimes it might not be a desired action. To prevent those upgrades, set this attribute to false, and the result will be

PV("\304\250"�)

auto_diag

my $csv = Text::CSV->new ({ auto_diag => 1 }); $csv->auto_diag (2); my $l = $csv->auto_diag;

Set this attribute to a number between 1 and 9 causes error_diag to be automatically called in void context upon errors.

In case of error 2012 - EOF, this call will be void.

If auto_diag is set to a numeric value greater than 1, it will die on errors instead of warn. If set to anything unrecognized, it will be silently ignored.

Future extensions to this feature will include more reliable auto-detection of autodie being active in the scope of which the error occurred which will increment the value of auto_diag with 1 the moment the error is detected.

diag_verbose

my $csv = Text::CSV->new ({ diag_verbose => 1 }); $csv->diag_verbose (2); my $l = $csv->diag_verbose;

Set the verbosity of the output triggered by auto_diag. Currently only adds the current input-record-number (if known) to the diagnostic output with an indication of the position of the error.

blank_is_undef

my $csv = Text::CSV->new ({ blank_is_undef => 1 }); $csv->blank_is_undef (0); my $f = $csv->blank_is_undef;

Under normal circumstances, CSV data makes no distinction between quoted- and unquoted empty fields. These both end up in an empty string field once read, thus

1,””,," “,2

is read as

(“1”, “”, “”, " “, “2”)

When writing CSV files with either always_quote or quote_empty set, the unquoted empty field is the result of an undefined value. To enable this distinction when reading CSV data, the blank_is_undef attribute will cause unquoted empty fields to be set to undef, causing the above to be parsed as

(“1”, “”, undef, " “, “2”)

Note that this is specifically important when loading CSV fields into a database that allows NULL values, as the perl equivalent for NULL is undef in DBI land.

empty_is_undef

my $csv = Text::CSV->new ({ empty_is_undef => 1 }); $csv->empty_is_undef (0); my $f = $csv->empty_is_undef;

Going one step further than blank_is_undef, this attribute converts all empty fields to undef, so

1,””,,” “,2

is read as

(1, undef, undef, " “, 2)

Note that this affects only fields that are originally empty, not fields that are empty after stripping allowed whitespace. YMMV.

allow_whitespace

my $csv = Text::CSV->new ({ allow_whitespace => 1 }); $csv->allow_whitespace (0); my $f = $csv->allow_whitespace;

When this option is set to true, the whitespace (TAB’s and SPACE’s) surrounding the separation character is removed when parsing. If either TAB or SPACE is one of the three characters sep_char, quote_char, or escape_char it will not be considered whitespace.

Now lines like:

1 , “foo” , bar , 3 , zapp

are parsed as valid CSV, even though it violates the CSV specs.

Note that all whitespace is stripped from both start and end of each field. That would make it more than a feature to enable parsing bad CSV lines, as

1, 2.0, 3, ape , monkey

will now be parsed as

(“1”, “2.0”, “3”, “ape”, “monkey”)

even if the original line was perfectly acceptable CSV.

allow_loose_quotes

my $csv = Text::CSV->new ({ allow_loose_quotes => 1 }); $csv->allow_loose_quotes (0); my $f = $csv->allow_loose_quotes;

By default, parsing unquoted fields containing quote_char characters like

1,foo “bar” baz,42

would result in parse error 2034. Though it is still bad practice to allow this format, we cannot help the fact that some vendors make their applications spit out lines styled this way.

If there is really bad CSV data, like

1,“foo “bar” baz”,42

or

1,““foo bar baz”",42

there is a way to get this data-line parsed and leave the quotes inside the quoted field as-is. This can be achieved by setting allow_loose_quotes AND making sure that the escape_char is not equal to quote_char.

allow_loose_escapes

my $csv = Text::CSV->new ({ allow_loose_escapes => 1 }); $csv->allow_loose_escapes (0); my $f = $csv->allow_loose_escapes;

Parsing fields that have escape_char characters that escape characters that do not need to be escaped, like:

my $csv = Text::CSV->new ({ escape_char => “" }); $csv->parse (qq{1,“my bar\s”,baz,42});

would result in parse error 2025. Though it is bad practice to allow this format, this attribute enables you to treat all escape character sequences equal.

allow_unquoted_escape

my $csv = Text::CSV->new ({ allow_unquoted_escape => 1 }); $csv->allow_unquoted_escape (0); my $f = $csv->allow_unquoted_escape;

A backward compatibility issue where escape_char differs from quote_char prevents escape_char to be in the first position of a field. If quote_char is equal to the default " and escape_char is set to \, this would be illegal:

1,�,2

Setting this attribute to 1 might help to overcome issues with backward compatibility and allow this style.

always_quote

my $csv = Text::CSV->new ({ always_quote => 1 }); $csv->always_quote (0); my $f = $csv->always_quote;

By default the generated fields are quoted only if they need to be. For example, if they contain the separator character. If you set this attribute to 1 then all defined fields will be quoted. (undef fields are not quoted, see blank_is_undef). This makes it quite often easier to handle exported data in external applications.

quote_space

my $csv = Text::CSV->new ({ quote_space => 1 }); $csv->quote_space (0); my $f = $csv->quote_space;

By default, a space in a field would trigger quotation. As no rule exists this to be forced in CSV, nor any for the opposite, the default is true for safety. You can exclude the space from this trigger by setting this attribute to 0.

quote_empty

my $csv = Text::CSV->new ({ quote_empty => 1 }); $csv->quote_empty (0); my $f = $csv->quote_empty;

By default the generated fields are quoted only if they need to be. An empty (defined) field does not need quotation. If you set this attribute to 1 then empty defined fields will be quoted. (undef fields are not quoted, see blank_is_undef). See also always_quote.

quote_binary

my $csv = Text::CSV->new ({ quote_binary => 1 }); $csv->quote_binary (0); my $f = $csv->quote_binary;

By default, all unsafe bytes inside a string cause the combined field to be quoted. By setting this attribute to 0, you can disable that trigger for bytes >= 0x7F.

escape_null

my $csv = Text::CSV->new ({ escape_null => 1 }); $csv->escape_null (0); my $f = $csv->escape_null;

By default, a NULL byte in a field would be escaped. This option enables you to treat the NULL byte as a simple binary character in binary mode (the { binary => 1 } is set). The default is true. You can prevent NULL escapes by setting this attribute to 0.

When the escape_char attribute is set to undefined, this attribute will be set to false.

The default setting will encode =�= as

“=“0=”

With escape_null set, this will result in

“=�=”

The default when using the csv function is false.

For backward compatibility reasons, the deprecated old name quote_null is still recognized.

keep_meta_info

my $csv = Text::CSV->new ({ keep_meta_info => 1 }); $csv->keep_meta_info (0); my $f = $csv->keep_meta_info;

By default, the parsing of input records is as simple and fast as possible. However, some parsing information - like quotation of the original field - is lost in that process. Setting this flag to true enables retrieving that information after parsing with the methods meta_info, is_quoted, and is_binary described below. Default is false for performance.

If you set this attribute to a value greater than 9, then you can control output quotation style like it was used in the input of the the last parsed record (unless quotation was added because of other reasons).

my $csv = Text::CSV->new ({ binary => 1, keep_meta_info => 1, quote_space => 0, }); my $row = $csv->parse (q{1,,””, ,” “,f,“g”,“h"“h”,help,“help”}); $csv->print (*STDOUT, \row); # 1,,, , ,f,g,“h"“h”,help,help $csv->keep_meta_info (11); $csv->print (*STDOUT, \row); # 1,,””, ,” “,f,“g”,“h"“h”,help,“help”

undef_str

my $csv = Text::CSV->new ({ undef_str => “\N” }); $csv->undef_str (undef); my $s = $csv->undef_str;

This attribute optionally defines the output of undefined fields. The value passed is not changed at all, so if it needs quotation, the quotation needs to be included in the value of the attribute. Use with caution, as passing a value like ",",,,,""" will for sure mess up your output. The default for this attribute is undef, meaning no special treatment.

This attribute is useful when exporting CSV data to be imported in custom loaders, like for MySQL, that recognize special sequences for NULL data.

This attribute has no meaning when parsing CSV data.

comment_str

my $csv = Text::CSV->new ({ comment_str => “#” }); $csv->comment_str (undef); my $s = $csv->comment_str;

This attribute optionally defines a string to be recognized as comment. If this attribute is defined, all lines starting with this sequence will not be parsed as CSV but skipped as comment.

This attribute has no meaning when generating CSV.

Comment strings that start with any of the special characters/sequences are not supported (so it cannot start with any of sep_char, quote_char, escape_char, sep, quote, or eol).

For convenience, comment is an alias for comment_str.

verbatim

my $csv = Text::CSV->new ({ verbatim => 1 }); $csv->verbatim (0); my $f = $csv->verbatim;

This is a quite controversial attribute to set, but makes some hard things possible.

The rationale behind this attribute is to tell the parser that the normally special characters newline (NL) and Carriage Return (CR) will not be special when this flag is set, and be dealt with as being ordinary binary characters. This will ease working with data with embedded newlines.

When verbatim is used with getline, getline auto-chomp’s every line.

Imagine a file format like

M^^Hans^Janssen^Klas 2 2A^Ja^11-06-2007#

where, the line ending is a very specific "# ", and the sep_char is a ^ (caret). None of the fields is quoted, but embedded binary data is likely to be present. With the specific line ending, this should not be too hard to detect.

By default, Text::CSV’ parse function is instructed to only know about " " and " " to be legal line endings, and so has to deal with the embedded newline as a real end-of-line, so it can scan the next line if binary is true, and the newline is inside a quoted field. With this option, we tell parse to parse the line as if " " is just nothing more than a binary character.

For parse this means that the parser has no more idea about line ending and getline chomps line endings on reading.

types

A set of column types; the attribute is immediately passed to the types method.

callbacks

See the Callbacks section below.

accessors

To sum it up,

$csv = Text::CSV->new ();

is equivalent to

$csv = Text::CSV->new ({ eol => undef, # , , or sep_char => ,, sep => undef, quote_char => “, quote => undef, escape_char => “, binary => 0, decode_utf8 => 1, auto_diag => 0, diag_verbose => 0, blank_is_undef => 0, empty_is_undef => 0, allow_whitespace => 0, allow_loose_quotes => 0, allow_loose_escapes => 0, allow_unquoted_escape => 0, always_quote => 0, quote_empty => 0, quote_space => 1, escape_null => 1, quote_binary => 1, keep_meta_info => 0, strict => 0, skip_empty_rows => 0, formula => 0, verbatim => 0, undef_str => undef, comment_str => undef, types => undef, callbacks => undef, });

For all of the above mentioned flags, an accessor method is available where you can inquire the current value, or change the value

my $quote = $csv->quote_char; $csv->binary (1);

It is not wise to change these settings halfway through writing CSV data to a stream. If however you want to create a new stream using the available CSV object, there is no harm in changing them.

If the new constructor call fails, it returns undef, and makes the fail reason available through the error_diag method.

$csv = Text::CSV->new ({ ecs_char => 1 }) or die “".Text::CSV->error_diag ();

error_diag will return a string like

“INI - Unknown attribute ecs_char”

known_attributes

@attr = Text::CSV->known_attributes; @attr = Text::CSV::known_attributes; @attr = $csv->known_attributes;

This method will return an ordered list of all the supported attributes as described above. This can be useful for knowing what attributes are valid in classes that use or extend Text::CSV.

print

$status = $csv->print ($fh, $colref);

Similar to combine + string + print, but much more efficient. It expects an array ref as input (not an array!) and the resulting string is not really created, but immediately written to the $fh object, typically an IO handle or any other object that offers a print method.

For performance reasons print does not create a result string, so all string, status, fields, and error_input methods will return undefined information after executing this method.

If $colref is undef (explicit, not through a variable argument) and bind_columns was used to specify fields to be printed, it is possible to make performance improvements, as otherwise data would have to be copied as arguments to the method call:

$csv->bind_columns ($foo, $bar)); $status = $csv->print ($fh, undef);

A short benchmark

my @data = (“aa” .. “zz”); $csv->bind_columns (@data)); $csv->print ($fh, [ @data ]); # 11800 recs/sec $csv->print ($fh, \data ); # 57600 recs/sec $csv->print ($fh, undef ); # 48500 recs/sec

say

$status = $csv->say ($fh, $colref);

Like print, but eol defaults to $\.

$csv->print_hr ($fh, $ref);

Provides an easy way to print a $ref (as fetched with getline_hr) provided the column names are set with column_names.

It is just a wrapper method with basic parameter checks over

$csv->print ($fh, [ map { $ref->{$_} } $csv->column_names ]);

combine

$status = $csv->combine (@fields);

This method constructs a CSV record from @fields, returning success or failure. Failure can result from lack of arguments or an argument that contains an invalid character. Upon success, string can be called to retrieve the resultant CSV string. Upon failure, the value returned by string is undefined and error_input could be called to retrieve the invalid argument.

string

$line = $csv->string ();

This method returns the input to parse or the resultant CSV string of combine, whichever was called more recently.

getline

$colref = $csv->getline ($fh);

This is the counterpart to print, as parse is the counterpart to combine: it parses a row from the $fh handle using the getline method associated with $fh and parses this row into an array ref. This array ref is returned by the function or undef for failure. When $fh does not support getline, you are likely to hit errors.

When fields are bound with bind_columns the return value is a reference to an empty list.

The string, fields, and status methods are meaningless again.

getline_all

$arrayref = $csv->getline_all ($fh); $arrayref = $csv->getline_all ($fh, $offset); $arrayref = $csv->getline_all ($fh, $offset, $length);

This will return a reference to a list of getline ($fh) results. In this call, keep_meta_info is disabled. If $offset is negative, as with splice, only the last abs ($offset) records of $fh are taken into consideration. Parameters $offset and $length are expected to be integers. Non-integer values are interpreted as integer without check.

Given a CSV file with 10 lines:

lines call —– ——————————————————— 0..9 $csv->getline_all ($fh) # all 0..9 $csv->getline_all ($fh, 0) # all 8..9 $csv->getline_all ($fh, 8) # start at 8 - $csv->getline_all ($fh, 0, 0) # start at 0 first 0 rows 0..4 $csv->getline_all ($fh, 0, 5) # start at 0 first 5 rows 4..5 $csv->getline_all ($fh, 4, 2) # start at 4 first 2 rows 8..9 $csv->getline_all ($fh, -2) # last 2 rows 6..7 $csv->getline_all ($fh, -4, 2) # first 2 of last 4 rows

getline_hr

The getline_hr and column_names methods work together to allow you to have rows returned as hashrefs. You must call column_names first to declare your column names.

$csv->column_names (qw( code name price description )); $hr = $csv->getline_hr ($fh); print “Price for $hr->{name} is $hr->{price} EUR “;

getline_hr will croak if called before column_names.

Note that getline_hr creates a hashref for every row and will be much slower than the combined use of bind_columns and getline but still offering the same easy to use hashref inside the loop:

my @cols = @{$csv->getline ($fh)}; $csv->column_names (@cols); while (my $row = $csv->getline_hr ($fh)) { print $row->{price}; }

Could easily be rewritten to the much faster:

my @cols = @{$csv->getline ($fh)}; my $row = {}; $csv->bind_columns ({$row}{@cols}); while ($csv->getline ($fh)) { print $row->{price}; }

Your mileage may vary for the size of the data and the number of rows. With perl-5.14.2 the comparison for a 100_000 line file with 14 columns:

Rate hashrefs getlines hashrefs 1.00/s – -76% getlines 4.15/s 313% –

getline_hr_all

$arrayref = $csv->getline_hr_all ($fh); $arrayref = $csv->getline_hr_all ($fh, $offset); $arrayref = $csv->getline_hr_all ($fh, $offset, $length);

This will return a reference to a list of getline_hr ($fh) results. In this call, keep_meta_info is disabled.

parse

$status = $csv->parse ($line);

This method decomposes a CSV string into fields, returning success or failure. Failure can result from a lack of argument or the given CSV string is improperly formatted. Upon success, fields can be called to retrieve the decomposed fields. Upon failure calling fields will return undefined data and error_input can be called to retrieve the invalid argument.

You may use the types method for setting column types. See types’ description below.

The $line argument is supposed to be a simple scalar. Everything else is supposed to croak and set error 1500.

fragment

This function tries to implement RFC7111 (URI Fragment Identifiers for the text/csv Media Type) - https://datatracker.ietf.org/doc/html/rfc7111

my $AoA = $csv->fragment ($fh, $spec);

In specifications, * is used to specify the last item, a dash (-) to indicate a range. All indices are 1-based: the first row or column has index 1. Selections can be combined with the semi-colon (;).

When using this method in combination with column_names, the returned reference will point to a list of hashes instead of a list of lists. A disjointed cell-based combined selection might return rows with different number of columns making the use of hashes unpredictable.

$csv->column_names (“Name”, “Age”); my $AoH = $csv->fragment ($fh, “col=3;8”);

If the after_parse callback is active, it is also called on every line parsed and skipped before the fragment.

row
row=4 row=5-7 row=6-* row=1-2;4;6-*

col
col=2 col=1-3 col=4-* col=1-2;4;7-*

cell
In cell-based selection, the comma (,) is used to pair row and column cell=4,1 The range operator (-) using cells can be used to define top-left and bottom-right cell location cell=3,1-4,6 The * is only allowed in the second part of a pair cell=3,2-*,2 # row 3 till end, only column 2 cell=3,2-3,* # column 2 till end, only row 3 cell=3,2-*,* # strip row 1 and 2, and column 1 Cells and cell ranges may be combined with ;, possibly resulting in rows with different numbers of columns cell=1,1-2,2;3,3-4,4;1,4;4,1 Disjointed selections will only return selected cells. The cells that are not specified will not be included in the returned set, not even as undef. As an example given a CSV like 11,12,13,…19 21,22,…28,29 : : 91,…97,98,99 with cell=1,1-2,2;3,3-4,4;1,4;4,1 will return: 11,12,14 21,22 33,34 41,43,44 Overlapping cell-specs will return those cells only once, So cell=1,1-3,3;2,2-4,4;2,3;4,2 will return: 11,12,13 21,22,23,24 31,32,33,34 42,43,44

RFC7111 <https://datatracker.ietf.org/doc/html/rfc7111> does not allow different types of specs to be combined (either row or col or cell). Passing an invalid fragment specification will croak and set error 2013.

column_names

Set the keys that will be used in the getline_hr calls. If no keys (column names) are passed, it will return the current setting as a list.

column_names accepts a list of scalars (the column names) or a single array_ref, so you can pass the return value from getline too:

$csv->column_names ($csv->getline ($fh));

column_names does no checking on duplicates at all, which might lead to unexpected results. Undefined entries will be replaced with the string `”

427 - Linux cli command XtQueryGeometry

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtQueryGeometry and provides detailed information about the command XtQueryGeometry, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtQueryGeometry.

NAME 🖥️ XtQueryGeometry 🖥️

query the preferred geometry of a child widget

SYNTAX

#include <X11/Intrinsic.h>

XtGeometryResult XtQueryGeometry(Widget w , XtWidgetGeometry *intended, XtWidgetGeometry *preferred_return );

ARGUMENTS

intended
Specifies any changes the parent plans to make to the child’s geometry or NULL.

preferred_return
Returns the child widget’s preferred geometry.

  1. Specifies the widget.

DESCRIPTION

To discover a child’s preferred geometry, the child’s parent sets any changes that it intends to make to the child’s geometry in the corresponding fields of the intended structure, sets the corresponding bits in intended.request_mode, and calls XtQueryGeometry.

XtQueryGeometry clears all bits in the preferred_return->request_mode and checks the query_geometry field of the specified widget’s class record. If query_geometry is not NULL, XtQueryGeometry calls the query_geometry procedure and passes as arguments the specified widget, intended, and preferred_return structures. If the intended argument is NULL, XtQueryGeometry replaces it with a pointer to an XtWidgetGeometry structure with request_mode=0 before calling query_geometry.

SEE ALSO

XtConfigureWidget(3), XtMakeGeometryRequest(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

428 - Linux cli command LIST_FOREACH

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LIST_FOREACH and provides detailed information about the command LIST_FOREACH, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LIST_FOREACH.

NAME 🖥️ LIST_FOREACH 🖥️

implementation of a doubly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
LIST_ENTRY(TYPE);
LIST_HEAD(HEADNAME, TYPE);
LIST_HEAD LIST_HEAD_INITIALIZER(LIST_HEAD head);
void LIST_INIT(LIST_HEAD *head);
int LIST_EMPTY(LIST_HEAD *head);
void LIST_INSERT_HEAD(LIST_HEAD *head,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
struct TYPE *LIST_FIRST(LIST_HEAD *head);
struct TYPE *LIST_NEXT(struct TYPE *elm, LIST_ENTRY NAME);
LIST_FOREACH(struct TYPE *var, LIST_HEAD *head, LIST_ENTRY NAME);
void LIST_REMOVE(struct TYPE *elm, LIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type LIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro LIST_HEAD().

Creation

A list is headed by a structure defined by the LIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are doubly linked so that an arbitrary element can be removed without traversing the list. New elements can be added to the list after an existing element, before an existing element, or at the head of the list. A LIST_HEAD structure is declared as follows:

LIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

LIST_ENTRY() declares a structure that connects the elements in the list.

LIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

LIST_INIT() initializes the list referenced by head.

LIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

LIST_INSERT_HEAD() inserts the new element elm at the head of the list.

LIST_INSERT_BEFORE() inserts the new element elm before the element listelm.

LIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

LIST_FIRST() returns the first element in the list, or NULL if the list is empty.

LIST_NEXT() returns the next element in the list, or NULL if this is the last.

LIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

LIST_REMOVE() removes the element elm from the list.

RETURN VALUE

LIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

LIST_FIRST(), and LIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

LIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

LIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. LIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    LIST_ENTRY(entry) entries;              /* List */
};
LIST_HEAD(listhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct listhead head;                   /* List head */
    int i;
    LIST_INIT(&head);                       /* Initialize the list */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    LIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    LIST_INSERT_AFTER(n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    LIST_INSERT_BEFORE(n2, n3, entries);
    i = 0;                                  /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        np->data = i++;
    LIST_REMOVE(n2, entries);               /* Deletion */
    free(n2);
                                            /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* List deletion */ n1 = LIST_FIRST(&head); while (n1 != NULL) { n2 = LIST_NEXT(n1, entries); free(n1); n1 = n2; } LIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

429 - Linux cli command Net_DBus_Tutorial_ExportingObjectspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Tutorial_ExportingObjectspm and provides detailed information about the command Net_DBus_Tutorial_ExportingObjectspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Tutorial_ExportingObjectspm.

NAME 🖥️ Net_DBus_Tutorial_ExportingObjectspm 🖥️

tutorials on providing a DBus service

DESCRIPTION

This document provides a tutorial on providing a DBus service using the Perl Net::DBus application bindings. This examples in this document will be based on the code from the Music::Player distribution, which is a simple DBus service providing a music track player.

CREATING AN OBJECT

The first step in creating an object is to create a new package which inherits from Net::DBus::Object. The Music::Player::Manager object provides an API for managing the collection of music player backends for different track types. To start with, lets create the skeleton of the package & its constructor. The constructor of the super type, Net::DBus::Object expects to be given to parameters, a handle to the Net::DBus::Service owning the object, and a path under which the object shall be exported. Since the manager class is intended to be a singleton object, we can hard code the path to it within the constructor:

package Music::Player::Manager; use base qw(Net::DBus::Object); sub new { my $class = shift; my $service = shift; my $self = $class->SUPER::new($service, “/music/player/manager”); bless $self, $class; return $self; } 1;

Now, as mentioned, the manager with handle a number of different player backends. So we need to provide methods for registering new backends, and querying for backends capable of playing a particular file type. So modifying the above code we add a hash table in the constructor, to store the backends:

sub new { my $class = shift; my $service = shift; my $self = $class->SUPER::new($service, “/music/player/manager”); $self->{backends} = {}; bless $self, $class; return $self; }

And now a method to register a new backend. This takes a Perl module name and uses it to instantiate a backend. Since the backends are also going to be DBus objects, we need to pass in a reference to the service we are attached to, along with a path under which to register the backend. We use the get_service method to retreieve a reference to the service the manager is attached to, and attach the player backend to this same service: When a method on DBus object is invoked, the first parameter is the object reference ($self), and the remainder are the parameters provided to the method call. Thus writing a method implementation on a DBUs is really no different to normal object oriented Perl (cf perltoot):

sub register_backend { my $self = shift; my $name = shift; my $module = shift; eval “use $module”; if ($@) { die “cannot load backend $module: $@” ; } $self->{backends}->{$name} = $module->new($self->get_service, “/music/player/backend/$name”); }

Looking at this one might wonder what happens if the die method is triggered. In such a scenario, rather than terminating the service process, the error will be caught and propagated back to the remote caller to deal with.

The player backends provide a method get_track_types which returns an array reference of the music track types they support. We can use this method to provide an API to allow easy retrieval of a backend for a particular track type. This method will return a path with which the backend object can be accessed

sub find_backend { my $self = shift; my $extension = shift; foreach my $name (keys %{$self->{backends}}) { my $backend = $self->{backends}->{$name}; foreach my $type (@{$backend->get_track_types}) { if ($type eq $extension) { return $backend->get_object_path; } } } die “no backend for type $extension”; }

Lets take a quick moment to consider how this method would be used to play a music track. If you’ve not already done so, refresh your memory from Net::DBus::Tutorial::UsingObjects. Now, we have an MP3 file which we wish to play, so we search for the path to a backend, then retrieve the object for it, and play the track:

…get the music player service… # Ask for a path to a player for mp3 files my $path = $service->find_backend(“mp3”); # $path now contains /music/player/backend/mpg123 # and we can get the backend object my $backend = $service->get_object($path); # and finally play the track $backend->play("/vol/music/beck/guero/09-scarecrow.mp3");

PROVIDING INTROSPECTION DATA

The code above is a complete working object, ready to be registered with a service, and since the parameters and return values for the two methods are both simple strings we could stop there. In some cases, however, one might want to be more specific about data types expected for parameters, for example signed vs unsigned integers. Adding explicit data typing also makes interaction with other programming languages more reliable. Providing explicit data type definitions for exported method is known in the DBus world as Introspection, and it makes life much more reliable for users of one’s service whom may be using a strongly typed language such as C.

The first step in providing introspection data for a DBus object in Perl, is to specify the name of the interface provided by the object. This is typically a period separated string, by convention containing the domain name of the application as its first component. Since most Perl modules end up living on CPAN, one might use org.cpan as the first component, followed by the package name of the module (replacing :: with .), eg org.cpan.music.player.manager. If it is not planned to host the module on CPAN, a personal/project domain might be used eg com.berrange.music.player.manager. The interface for an object is defined by loading the Net::DBus::Exporter module, providing the interface as its first parameter. So the earlier code example would be modified to look like:

package Music::Player::Manager; use base qw(Net::DBus); use Net::DBus::Exporter qw(com.berrange.music.player.manager)

Next up, it is necessary to provide data types for the parameters and return values of the methods. The Net::DBus::Exporter module provides a method dbus_method for this purpose, which takes three parameter, the name of the method being exported, an array reference of parameter types, and an array reference of return types (the latter can be omitted if there are no return values). This can be called at any point in the module’s code, but by convention it is preferable to associate calls to dbus_method with the actual method implementation, thus:

dbus_method(“register_backend”, [“string”, “string”]); sub register_backend { my $self = shift; my $name = shift; my $module = shift; .. snipped rest of method body … }

And, thus:

dbus_method(“find_backend”, [“string”], [“string”]) sub find_backend { my $self = shift; my $extension = shift; … snip method body… }

DEFINING A SERVICE

Now that the objects have been written, it is time to define a service. A service is nothing more than a well known name for a given API contract. A contract can be thought of as a definition of a list of object paths, and the corresponding interfaces they provide. So, someone else could come along a provide an alternate music player implementation using the Python or QT bindings for DBus, and if they provided the same set of object paths & interfaces, they could justifiably register the same service on the bus.

The Net::DBus::Service module provides the means to register a service. Its constructor expects a reference to the bus object (an instance of Net::DBus), along with the name of the service. As with interface names, the first component of a service name is usually derived from a domain name, and then suffixed with the name of the application, in our example forming org.cpan.Music.Player. While some objects will be created on the fly during execution of the application, others are created upon initial startup. The music player manager object created earlier in this tutorial is an example of the latter. It is typical to instantiate and register these objects in the constructor for the service. Thus a service object for the music player application would look like:

package Music::Player; use base qw(Net::DBus::Service); sub new { my $class = shift; my $bus = shift; my $self = $class->SUPER::new($bus, “org.cpan.music.player”); bless $self, $class; $self->{manager} = Music::Player::Manager->new($self); return $self; }

The Net::DBus::Service automatically provides one special object to all services, under the path /org/freedesktop/DBus/Exporter. This object implements the org.freedesktop.DBus.Exporter interface which has a method ListObject. This enables clients to determine a list of all objects exported within a service. While not functionally necessary for most applications, it is none-the-less a useful tool for developers debugging applications, or wondering what a service provides.

CONNECTING TO THE BUS

The final step in getting our service up and running is to connect it to the bus. This brings up an interesting conundrum, does one export the service on the system bus (shared by all users & processes on the machine), or the session bus (one per user logged into a machine). In some cases the answer, with only one of the two buses conceptually making sense. In other cases, however, both the session & system bus are valid. In the former one would use the session or <system> methods on Net::DBus to get a handle to the desired bus, while in the latter case, the find method would be used. This applies a heuristic to determine the correct bus based on execution environment. In the case of the music player, either bus is relevant, so the code to connect the service to the bus would look like:

use Net::DBus; my $bus = Net::DBus->find; my $player = Music::Player->new($bus);

With the service attached to the bus, it is merely necessary to run the main event processing loop to listen out for & handle incoming DBus messages. So the above code is modified to start a simple reactor:

use Net::DBus; use Net::DBus::Reactor; my $bus = Net::DBus->find; my $player = Music::Player->new($bus); Net::DBus::Reactor->main->run; exit 0;

Saving this code into a script /usr/bin/music-player.pl, coding is complete and the service ready for use by clients on the bus.

SERVICE ACTIVATION

One might now wonder how best to start the service, particularly if it is a service capable of running on both the system and session buses. DBus has the answer in the concept of activation. What happens is that when a client on the bus attempts to call a method, or register a signal handler against, a service not currently running, it will first try and start the service. Service’s which wish to participate in this process merely need stick a simple service definition file into the directory /usr/share/dbus-1/services. The file should be named to match the service name, with the file extension .service appended. eg, /usr/share/dbus-1/services/org.cpan.music.player.service The file contains two keys, first the name of the service, and second the name of the executable used to run the service, or in this case the Perl script. So, for our simple service the data file would contain:

[D-BUS Service] Name=org.cpan.music.player Exec=/usr/bin/music-player.pl

SEE ALSO

Net::DBus::Tutorial for details of other tutorials, and Net::DBus for API documentation

AUTHORS

Daniel Berrange <[email protected]>

COPYRIGHT

Copyright (C) 2005 Daniel P. Berrange

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

430 - Linux cli command pthread_sigmask

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_sigmask and provides detailed information about the command pthread_sigmask, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_sigmask.

NAME 🖥️ pthread_sigmask 🖥️

examine and change mask of blocked signals

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <signal.h>
int pthread_sigmask(int how, const sigset_t *set",sigset_t*"oldset);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

pthread_sigmask():

    _POSIX_C_SOURCE >= 199506L || _XOPEN_SOURCE >= 500

DESCRIPTION

The pthread_sigmask() function is just like sigprocmask(2), with the difference that its use in multithreaded programs is explicitly specified by POSIX.1. Other differences are noted in this page.

For a description of the arguments and operation of this function, see sigprocmask(2).

RETURN VALUE

On success, pthread_sigmask() returns 0; on error, it returns an error number.

ERRORS

See sigprocmask(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_sigmask()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

A new thread inherits a copy of its creator’s signal mask.

The glibc pthread_sigmask() function silently ignores attempts to block the two real-time signals that are used internally by the NPTL threading implementation. See nptl(7) for details.

EXAMPLES

The program below blocks some signals in the main thread, and then creates a dedicated thread to fetch those signals via sigwait(3). The following shell session demonstrates its use:

$ ./a.out &
[1] 5423
$ kill -QUIT %1
Signal handling thread got signal 3
$ kill -USR1 %1
Signal handling thread got signal 10
$ kill -TERM %1
[1]+  Terminated              ./a.out

Program source

#include <errno.h>
#include <pthread.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
/* Simple error handling functions */
#define handle_error_en(en, msg) \
        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
static void *
sig_thread(void *arg)
{
    sigset_t *set = arg;
    int s, sig;
    for (;;) {
        s = sigwait(set, &sig);
        if (s != 0)
            handle_error_en(s, "sigwait");
        printf("Signal handling thread got signal %d

“, sig); } } int main(void) { pthread_t thread; sigset_t set; int s; /* Block SIGQUIT and SIGUSR1; other threads created by main() will inherit a copy of the signal mask. / sigemptyset(&set); sigaddset(&set, SIGQUIT); sigaddset(&set, SIGUSR1); s = pthread_sigmask(SIG_BLOCK, &set, NULL); if (s != 0) handle_error_en(s, “pthread_sigmask”); s = pthread_create(&thread, NULL, &sig_thread, &set); if (s != 0) handle_error_en(s, “pthread_create”); / Main thread carries on to create other threads and/or do other work. / pause(); / Dummy pause so we can test program */ }

SEE ALSO

sigaction(2), sigpending(2), sigprocmask(2), pthread_attr_setsigmask_np(3), pthread_create(3), pthread_kill(3), sigsetops(3), pthreads(7), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

431 - Linux cli command Image_ExifTool_PSPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_PSPpm and provides detailed information about the command Image_ExifTool_PSPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_PSPpm.

NAME 🖥️ Image_ExifTool_PSPpm 🖥️

Read Paint Shop Pro meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to extract information from Paint Shop Pro images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.jasc.com/support/kb/articles/pspspec.asp>

SEE ALSO

“PSP Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

432 - Linux cli command mbrlen

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mbrlen and provides detailed information about the command mbrlen, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mbrlen.

NAME 🖥️ mbrlen 🖥️

determine number of bytes in next multibyte character

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
size_t mbrlen(const char s[restrict .n], size_t n,
 mbstate_t *restrict ps);

DESCRIPTION

The mbrlen() function inspects at most n bytes of the multibyte string starting at s and extracts the next complete multibyte character. It updates the shift state *ps. If the multibyte character is not the null wide character, it returns the number of bytes that were consumed from s. If the multibyte character is the null wide character, it resets the shift state *ps to the initial state and returns 0.

If the n bytes starting at s do not contain a complete multibyte character, mbrlen() returns (size_t) -2. This can happen even if n >= MB_CUR_MAX, if the multibyte string contains redundant shift sequences.

If the multibyte string starting at s contains an invalid multibyte sequence before the next complete character, mbrlen() returns (size_t) -1 and sets errno to EILSEQ. In this case, the effects on *ps are undefined.

If ps is NULL, a static anonymous state known only to the mbrlen() function is used instead.

RETURN VALUE

The mbrlen() function returns the number of bytes parsed from the multibyte sequence starting at s, if a non-null wide character was recognized. It returns 0, if a null wide character was recognized. It returns (size_t) -1 and sets errno to EILSEQ, if an invalid multibyte sequence was encountered. It returns (size_t) -2 if it couldn’t parse a complete multibyte character, meaning that n should be increased.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mbrlen()

Thread safetyMT-Unsafe race:mbrlen/!ps

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of mbrlen() depends on the LC_CTYPE category of the current locale.

SEE ALSO

mbrtowc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

433 - Linux cli command wcscspn

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcscspn and provides detailed information about the command wcscspn, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcscspn.

NAME 🖥️ wcscspn 🖥️

search a wide-character string for any of a set of wide characters

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
size_t wcscspn(const wchar_t *wcs, const wchar_t *reject);

DESCRIPTION

The wcscspn() function is the wide-character equivalent of the strcspn(3) function. It determines the length of the longest initial segment of wcs which consists entirely of wide-characters not listed in reject. In other words, it searches for the first occurrence in the wide-character string wcs of any of the characters in the wide-character string reject.

RETURN VALUE

The wcscspn() function returns the number of wide characters in the longest initial segment of wcs which consists entirely of wide-characters not listed in reject. In other words, it returns the position of the first occurrence in the wide-character string wcs of any of the characters in the wide-character string reject, or wcslen(wcs) if there is none.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcscspn()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

strcspn(3), wcspbrk(3), wcsspn(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

434 - Linux cli command Moose_Manual_Typespm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Manual_Typespm and provides detailed information about the command Moose_Manual_Typespm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Manual_Typespm.

NAME 🖥️ Moose_Manual_Typespm 🖥️

Moose’s type system

VERSION

version 2.2207

TYPES IN PERL?

Moose provides its own type system for attributes. You can also use these types to validate method parameters with the help of a MooseX module.

Moose’s type system is based on a combination of Perl 5’s own implicit types and some Perl 6 concepts. You can create your own subtypes with custom constraints, making it easy to express any sort of validation.

Types have names, and you can re-use them by name, making it easy to share types throughout a large application.

However, this is not a “real” type system. Moose does not magically make Perl start associating types with variables. This is just an advanced parameter checking system which allows you to associate a name with a constraint.

That said, it’s still pretty damn useful, and we think it’s one of the things that makes Moose both fun and powerful. Taking advantage of the type system makes it much easier to ensure that you are getting valid data, and it also contributes greatly to code maintainability.

THE TYPES

The basic Moose type hierarchy looks like this

Any Item Bool Maybe[`a] Undef Defined Value Str Num Int ClassName RoleName Ref ScalarRef[`a] ArrayRef[`a] HashRef[`a] CodeRef RegexpRef GlobRef FileHandle Object

In practice, the only difference between Any and Item is conceptual. Item is used as the top-level type in the hierarchy.

The rest of these types correspond to existing Perl concepts. In particular:

  • Bool accepts 1 for true, and undef, 0, or the empty string as false.

  • Maybe[`a] accepts either `a or undef.

  • Num accepts integers, floating point numbers (both in decimal notation & exponential notation), 0, .0, 0.0 etc. It doesn’t accept numbers with whitespace, Inf, Infinity, “0 but true”, NaN & other such strings.

  • ClassName and RoleName accept strings that are either the name of a class or the name of a role. The class/role must already be loaded when the constraint is checked.

  • FileHandle accepts either an IO::Handle object or a builtin perl filehandle (see “openhandle” in Scalar::Util).

  • Object accepts any blessed reference.

The types followed by “[`a]” can be parameterized. So instead of just plain ArrayRef we can say that we want ArrayRef[Int] instead. We can even do something like HashRef[ArrayRef[Str]].

The Maybe[`a] type deserves a special mention. Used by itself, it doesn’t really mean anything (and is equivalent to Item). When it is parameterized, it means that the value is either undef or the parameterized type. So Maybe[Int] means an integer or undef.

For more details on the type hierarchy, see Moose::Util::TypeConstraints.

WHAT IS A TYPE?

It’s important to realize that types are not classes (or packages). Types are just objects (Moose::Meta::TypeConstraint objects, to be exact) with a name and a constraint. Moose maintains a global type registry that lets it convert names like Num into the appropriate object.

However, class names can be type names. When you define a new class using Moose, it defines an associated type name behind the scenes:

package MyApp::User; use Moose;

Now you can use MyApp::User as a type name:

has creator => ( is => ro, isa => MyApp::User, );

However, for non-Moose classes there’s no magic. You may have to explicitly declare the class type. This is a bit muddled because Moose assumes that any unknown type name passed as the isa value for an attribute is a class. So this works:

has birth_date => ( is => ro, isa => DateTime, );

In general, when Moose is presented with an unknown name, it assumes that the name is a class:

subtype ModernDateTime => as DateTime => where { $_->year() >= 1980 } => message { The date you provided is not modern enough }; has valid_dates => ( is => ro, isa => ArrayRef[DateTime], );

Moose will assume that DateTime is a class name in both of these instances.

SUBTYPES

Moose uses subtypes in its built-in hierarchy. For example, Int is a child of Num.

A subtype is defined in terms of a parent type and a constraint. Any constraints defined by the parent(s) will be checked first, followed by constraints defined by the subtype. A value must pass all of these checks to be valid for the subtype.

Typically, a subtype takes the parent’s constraint and makes it more specific.

A subtype can also define its own constraint failure message. This lets you do things like have an error “The value you provided (20), was not a valid rating, which must be a number from 1-10.” This is much friendlier than the default error, which just says that the value failed a validation check for the type. The default error can, however, be made more friendly by installing Devel::PartialDump (version 0.14 or higher), which Moose will use if possible to display the invalid value.

Here’s a simple (and useful) subtype example:

subtype PositiveInt, as Int, where { $_ > 0 }, message { “The number you provided, $_, was not a positive number” };

Note that the sugar functions for working with types are all exported by Moose::Util::TypeConstraints.

TYPE NAMES

Type names are global throughout the current Perl interpreter. Internally, Moose maps names to type objects via a registry.

If you have multiple apps or libraries all using Moose in the same process, you could have problems with collisions. We recommend that you prefix names with some sort of namespace indicator to prevent these sorts of collisions.

For example, instead of calling a type “PositiveInt”, call it “MyApp::Type::PositiveInt” or “MyApp::Types::PositiveInt”. We recommend that you centralize all of these definitions in a single package, MyApp::Types, which can be loaded by other classes in your application.

However, before you do this, you should look at the MooseX::Types module. This module makes it easy to create a “type library” module, which can export your types as perl constants.

has counter => (is => rw, isa => PositiveInt);

This lets you use a short name rather than needing to fully qualify the name everywhere. It also allows you to easily create parameterized types:

has counts => (is => ro, isa => HashRef[PositiveInt]);

This module will check your names at compile time, and is generally more robust than the string type parsing for complex cases.

COERCION

A coercion lets you tell Moose to automatically convert one type to another.

subtype ArrayRefOfInts, as ArrayRef[Int]; coerce ArrayRefOfInts, from Int, via { [ $_ ] };

You’ll note that we created a subtype rather than coercing ArrayRef[Int] directly. It’s a bad idea to add coercions to the raw built in types.

Coercions are global, just like type names, so a coercion applied to a built in type is seen by all modules using Moose types. This is another reason why it is good to namespace your types.

Moose will never try to coerce a value unless you explicitly ask for it. This is done by setting the coerce attribute option to a true value:

package Foo; has sizes => ( is => ro, isa => ArrayRefOfInts, coerce => 1, ); Foo->new( sizes => 42 );

This code example will do the right thing, and the newly created object will have [ 42 ] as its sizes attribute.

Deep coercion

Deep coercion is the coercion of type parameters for parameterized types. Let’s take these types as an example:

subtype HexNum, as Str, where { /[a-f0-9]/i }; coerce Int, from HexNum, via { hex $_ }; has sizes => ( is => ro, isa => ArrayRef[Int], coerce => 1, );

If we try passing an array reference of hex numbers for the sizes attribute, Moose will not do any coercion.

However, you can define a set of subtypes to enable coercion between two parameterized types.

subtype ArrayRefOfHexNums, as ArrayRef[HexNum]; subtype ArrayRefOfInts, as ArrayRef[Int]; coerce ArrayRefOfInts, from ArrayRefOfHexNums, via { [ map { hex } @{$_} ] }; Foo->new( sizes => [ a1, ff, 22 ] );

Now Moose will coerce the hex numbers to integers.

Moose does not attempt to chain coercions, so it will not coerce a single hex number. To do that, we need to define a separate coercion:

coerce ArrayRefOfInts, from HexNum, via { [ hex $_ ] };

Yes, this can all get verbose, but coercion is tricky magic, and we think it’s best to make it explicit.

TYPE UNIONS

Moose allows you to say that an attribute can be of two or more disparate types. For example, we might allow an Object or FileHandle:

has output => ( is => rw, isa => Object | FileHandle, );

Moose actually parses that string and recognizes that you are creating a type union. The output attribute will accept any sort of object, as well as an unblessed file handle. It is up to you to do the right thing for each of them in your code.

Whenever you use a type union, you should consider whether or not coercion might be a better answer.

For our example above, we might want to be more specific, and insist that output be an object with a print method:

duck_type CanPrint, [qw(print)];

We can coerce file handles to an object that satisfies this condition with a simple wrapper class:

package FHWrapper; use Moose; has handle => ( is => rw, isa => FileHandle, ); sub print { my $self = shift; my $fh = $self->handle(); print {$fh} @_; }

Now we can define a coercion from FileHandle to our wrapper class:

coerce CanPrint => from FileHandle => via { FHWrapper->new( handle => $_ ) }; has output => ( is => rw, isa => CanPrint, coerce => 1, );

This pattern of using a coercion instead of a type union will help make your class internals simpler.

TYPE CREATION HELPERS

The Moose::Util::TypeConstraints module exports a number of helper functions for creating specific kinds of types. These include class_type, role_type, maybe_type, and duck_type. See the docs for details.

One helper worth noting is enum, which allows you to create a subtype of Str that only allows the specified values:

enum RGB, [qw( red green blue )];

This creates a type named RGB.

ANONYMOUS TYPES

All of the type creation functions return a type object. This type object can be used wherever you would use a type name, as a parent type, or as the value for an attribute’s isa option:

has size => ( is => ro, isa => subtype( Int => where { $_ > 0 } ), );

This is handy when you want to create a one-off type and don’t want to “pollute” the global namespace registry.

VALIDATING METHOD PARAMETERS

Moose does not provide any means of validating method parameters. However, there are several MooseX extensions on CPAN which let you do this.

The simplest and least sugary is Params::ValidationCompiler. This lets you validate a set of named parameters using Moose types:

use Moose::Util::TypeConstraints qw( find_type_constraint ); use Params::ValidationCompiler qw( validation_for ); { my $validator = validation_for( params => { foo => { type => find_type_constraint(Int) }, bar => { type => find_type_constraint(Str), optional => 1, }, baz => { type => find_type_constraint(Int), default => 42, }, }, ); sub foo { my %args = $validator->(@_); } }

Params::ValidationCompiler also supports coercions.

There are several more powerful extensions that support method parameter validation using Moose types, including Moops, which gives you a full-blown method keyword.

method morning ( Str $name ) { $self->say(“Good morning ${name}!”); }

LOAD ORDER ISSUES

Because Moose types are defined at runtime, you may run into load order problems. In particular, you may want to use a class’s type constraint before that type has been defined.

In order to ameliorate this problem, we recommend defining all of your custom types in one module, MyApp::Types, and then loading this module in all of your other modules.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

435 - Linux cli command Moose_Meta_Attribute_Native_Trait_Counterpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Attribute_Native_Trait_Counterpm and provides detailed information about the command Moose_Meta_Attribute_Native_Trait_Counterpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Attribute_Native_Trait_Counterpm.

NAME 🖥️ Moose_Meta_Attribute_Native_Trait_Counterpm 🖥️

Helper trait for Int attributes which represent counters

VERSION

version 2.2207

SYNOPSIS

package MyHomePage; use Moose; has counter => ( traits => [Counter], is => ro, isa => Num, default => 0, handles => { inc_counter => inc, dec_counter => dec, reset_counter => reset, }, ); my $page = MyHomePage->new(); $page->inc_counter; # same as $page->counter( $page->counter + 1 ); $page->dec_counter; # same as $page->counter( $page->counter - 1 ); my $count_by_twos = 2; $page->inc_counter($count_by_twos);

DESCRIPTION

This trait provides native delegation methods for counters. A counter can be any sort of number (integer or not). The delegation methods allow you to increment, decrement, or reset the value.

DEFAULT TYPE

If you don’t provide an isa value for your attribute, it will default to Num.

PROVIDED METHODS

  • set($value) Sets the counter to the specified value and returns the new value. This method requires a single argument.

  • inc

  • inc($arg) Increases the attribute value by the amount of the argument, or by 1 if no argument is given. This method returns the new value. This method accepts a single argument.

  • dec

  • dec($arg) Decreases the attribute value by the amount of the argument, or by 1 if no argument is given. This method returns the new value. This method accepts a single argument.

  • reset Resets the value stored in this slot to its default value, and returns the new value.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

436 - Linux cli command XML_DOM_CharacterDatapm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_DOM_CharacterDatapm and provides detailed information about the command XML_DOM_CharacterDatapm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_DOM_CharacterDatapm.

NAME 🖥️ XML_DOM_CharacterDatapm 🖥️

Common interface for Text, CDATASections and Comments

DESCRIPTION

XML::DOM::CharacterData extends XML::DOM::Node

The CharacterData interface extends Node with a set of attributes and methods for accessing character data in the DOM. For clarity this set is defined here rather than on each object that uses these attributes and methods. No DOM objects correspond directly to CharacterData, though Text, Comment and CDATASection do inherit the interface from it. All offsets in this interface start from 0.

METHODS

getData and setData (data)
The character data of the node that implements this interface. The DOM implementation may not put arbitrary limits on the amount of data that may be stored in a CharacterData node. However, implementation limits may mean that the entirety of a node’s data may not fit into a single DOMString. In such cases, the user may call substringData to retrieve the data in appropriately sized pieces.

getLength
The number of characters that are available through data and the substringData method below. This may have the value zero, i.e., CharacterData nodes may be empty.

substringData (offset, count)
Extracts a range of data from the node. Parameters: offset Start offset of substring to extract. count The number of characters to extract. Return Value: The specified substring. If the sum of offset and count exceeds the length, then all characters to the end of the data are returned.

appendData (str)
Appends the string to the end of the character data of the node. Upon success, data provides access to the concatenation of data and the DOMString specified.

insertData (offset, arg)
Inserts a string at the specified character offset. Parameters: offset The character offset at which to insert. arg The DOMString to insert.

deleteData (offset, count)
Removes a range of characters from the node. Upon success, data and length reflect the change. If the sum of offset and count exceeds length then all characters from offset to the end of the data are deleted. Parameters: offset The offset from which to remove characters. count The number of characters to delete.

replaceData (offset, count, arg)
Replaces the characters starting at the specified character offset with the specified string. Parameters: offset The offset from which to start replacing. count The number of characters to replace. arg The DOMString with which the range must be replaced. If the sum of offset and count exceeds length, then all characters to the end of the data are replaced (i.e., the effect is the same as a remove method call with the same range, followed by an append method invocation).

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

437 - Linux cli command __fbufsize

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __fbufsize and provides detailed information about the command __fbufsize, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __fbufsize.

NAME 🖥️ __fbufsize 🖥️

interfaces to stdio FILE structure

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
#include <stdio_ext.h>
size_t __fbufsize(FILE *stream);
size_t __fpending(FILE *stream);
int __flbf(FILE *stream);
int __freadable(FILE *stream);
int __fwritable(FILE *stream);
int __freading(FILE *stream);
int __fwriting(FILE *stream);
int __fsetlocking(FILE *stream, int type);
void _flushlbf(void);
void __fpurge(FILE *stream);

DESCRIPTION

Solaris introduced routines to allow portable access to the internals of the FILE structure, and glibc also implemented these.

The __fbufsize() function returns the size of the buffer currently used by the given stream.

The __fpending() function returns the number of bytes in the output buffer. For wide-oriented streams the unit is wide characters. This function is undefined on buffers in reading mode, or opened read-only.

The __flbf() function returns a nonzero value if the stream is line-buffered, and zero otherwise.

The __freadable() function returns a nonzero value if the stream allows reading, and zero otherwise.

The __fwritable() function returns a nonzero value if the stream allows writing, and zero otherwise.

The __freading() function returns a nonzero value if the stream is read-only, or if the last operation on the stream was a read operation, and zero otherwise.

The __fwriting() function returns a nonzero value if the stream is write-only (or append-only), or if the last operation on the stream was a write operation, and zero otherwise.

The __fsetlocking() function can be used to select the desired type of locking on the stream. It returns the current type. The type argument can take the following three values:

FSETLOCKING_INTERNAL
Perform implicit locking around every operation on the given stream (except for the *_unlocked ones). This is the default.

FSETLOCKING_BYCALLER
The caller will take care of the locking (possibly using flockfile(3) in case there is more than one thread), and the stdio routines will not do locking until the state is reset to FSETLOCKING_INTERNAL.

FSETLOCKING_QUERY
Don’t change the type of locking. (Only return it.)

The _flushlbf() function flushes all line-buffered streams. (Presumably so that output to a terminal is forced out, say before reading keyboard input.)

The __fpurge() function discards the contents of the stream’s buffer.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

__fbufsize(), __fpending(), __fpurge(), __fsetlocking()

Thread safetyMT-Safe race:stream

__flbf(), __freadable(), __freading(), __fwritable(), __fwriting(), _flushlbf()

Thread safetyMT-Safe

SEE ALSO

flockfile(3), fpurge(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

438 - Linux cli command gnu_get_libc_version

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gnu_get_libc_version and provides detailed information about the command gnu_get_libc_version, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gnu_get_libc_version.

NAME 🖥️ gnu_get_libc_version 🖥️

get glibc version and release

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <gnu/libc-version.h>
const char *gnu_get_libc_version(void);
const char *gnu_get_libc_release(void);

DESCRIPTION

The function gnu_get_libc_version() returns a string that identifies the glibc version available on the system.

The function gnu_get_libc_release() returns a string indicates the release status of the glibc version available on the system. This will be a string such as stable.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

gnu_get_libc_version(), gnu_get_libc_release()

Thread safetyMT-Safe

STANDARDS

GNU.

HISTORY

glibc 2.1.

EXAMPLES

When run, the program below will produce output such as the following:

$ ./a.out
GNU libc version: 2.8
GNU libc release: stable

Program source

#include <stdio.h>
#include <stdlib.h>
#include <gnu/libc-version.h>
int
main(void)
{
    printf("GNU libc version: %s

“, gnu_get_libc_version()); printf(“GNU libc release: %s “, gnu_get_libc_release()); exit(EXIT_SUCCESS); }

SEE ALSO

confstr(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

439 - Linux cli command Tk_Tilerpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Tilerpm and provides detailed information about the command Tk_Tilerpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Tilerpm.

NAME 🖥️ Tk_Tilerpm 🖥️

Scrollable frame with sub-widgets arranged into rows

SYNOPSIS

use Tk::Tiler; my $tl = $parent->Scrolled(Tiler, -columns => n, -rows => n); my $a = $tl->Xxxxx(…); my $b = $tl->Xxxxx(…); my $c = $tl->Xxxxx(…); $tl->Manage($a,$b,$c);

DESCRIPTION

Tiler is derived form Tk::Frame. It is a geometry managing widget which accepts widgets to manage. It places the widgets in a grid with as many widgets as possible in a row. All the “slots” in the grid are the same size, which is determined by the largest managed widget.

The grid may be scrolled vertically.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

440 - Linux cli command JSON_XS_Booleanpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command JSON_XS_Booleanpm and provides detailed information about the command JSON_XS_Booleanpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the JSON_XS_Booleanpm.

NAME 🖥️ JSON_XS_Booleanpm 🖥️

dummy module providing JSON::XS::Boolean

SYNOPSIS

# do not “use” yourself

DESCRIPTION

This module exists only to provide overload resolution for Storable and similar modules. It’s only needed for compatibility with data serialised (by other modules such as Storable) that was decoded by JSON::XS versions before 3.0.

Since 3.0, JSON::PP::Boolean has replaced it. Support for JSON::XS::Boolean will be removed in a future release.

AUTHOR

Marc Lehmann <[email protected]> http://home.schmorp.de/

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

441 - Linux cli command realpath

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command realpath and provides detailed information about the command realpath, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the realpath.

NAME 🖥️ realpath 🖥️

return the canonicalized absolute pathname

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <limits.h>
#include <stdlib.h>
char *realpath(const char *restrict path,
 char *restrict resolved_path);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

realpath():

    _XOPEN_SOURCE >= 500
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE

DESCRIPTION

realpath() expands all symbolic links and resolves references to /./, /../ and extra ‘/’ characters in the null-terminated string named by path to produce a canonicalized absolute pathname. The resulting pathname is stored as a null-terminated string, up to a maximum of PATH_MAX bytes, in the buffer pointed to by resolved_path. The resulting path will have no symbolic link, /./ or /../ components.

If resolved_path is specified as NULL, then realpath() uses malloc(3) to allocate a buffer of up to PATH_MAX bytes to hold the resolved pathname, and returns a pointer to this buffer. The caller should deallocate this buffer using free(3).

RETURN VALUE

If there is no error, realpath() returns a pointer to the resolved_path.

Otherwise, it returns NULL, the contents of the array resolved_path are undefined, and errno is set to indicate the error.

ERRORS

EACCES
Read or search permission was denied for a component of the path prefix.

EINVAL
path is NULL. (Before glibc 2.3, this error is also returned if resolved_path is NULL.)

EIO
An I/O error occurred while reading from the filesystem.

ELOOP
Too many symbolic links were encountered in translating the pathname.

ENAMETOOLONG
A component of a pathname exceeded NAME_MAX characters, or an entire pathname exceeded PATH_MAX characters.

ENOENT
The named file does not exist.

ENOMEM
Out of memory.

ENOTDIR
A component of the path prefix is not a directory.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

realpath()

Thread safetyMT-Safe

VERSIONS

GNU extensions

If the call fails with either EACCES or ENOENT and resolved_path is not NULL, then the prefix of path that is not readable or does not exist is returned in resolved_path.

STANDARDS

POSIX.1-2008.

HISTORY

4.4BSD, POSIX.1-2001, Solaris.

POSIX.1-2001 says that the behavior if resolved_path is NULL is implementation-defined. POSIX.1-2008 specifies the behavior described in this page.

In 4.4BSD and Solaris, the limit on the pathname length is MAXPATHLEN (found in <sys/param.h>). SUSv2 prescribes PATH_MAX and NAME_MAX, as found in <limits.h> or provided by the pathconf(3) function. A typical source fragment would be

#ifdef PATH_MAX
  path_max = PATH_MAX;
#else
  path_max = pathconf(path, _PC_PATH_MAX);
  if (path_max <= 0)
    path_max = 4096;
#endif

(But see the BUGS section.)

BUGS

The POSIX.1-2001 standard version of this function is broken by design, since it is impossible to determine a suitable size for the output buffer, resolved_path. According to POSIX.1-2001 a buffer of size PATH_MAX suffices, but PATH_MAX need not be a defined constant, and may have to be obtained using pathconf(3). And asking pathconf(3) does not really help, since, on the one hand POSIX warns that the result of pathconf(3) may be huge and unsuitable for mallocing memory, and on the other hand pathconf(3) may return -1 to signify that PATH_MAX is not bounded. The resolved_path == NULL feature, not standardized in POSIX.1-2001, but standardized in POSIX.1-2008, allows this design problem to be avoided.

SEE ALSO

realpath(1), readlink(2), canonicalize_file_name(3), getcwd(3), pathconf(3), sysconf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

442 - Linux cli command NetSNMP_TrapReceiverpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command NetSNMP_TrapReceiverpm and provides detailed information about the command NetSNMP_TrapReceiverpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the NetSNMP_TrapReceiverpm.

NAME 🖥️ NetSNMP_TrapReceiverpm 🖥️

Embedded perl trap handling for Net-SNMP’s snmptrapd

SYNOPSIS

Put the following lines in your snmptrapd.conf file:

perl NetSNMP::TrapReceiver::register(“trapOID”, \myfunc);

ABSTRACT

The NetSNMP::TrapReceiver module is used to register perl subroutines into the Net-SNMP snmptrapd process. Net-SNMP MUST have been configured using –enable-embedded-perl. Registration of functions is then done through the snmptrapd.conf configuration file. This module can NOT be used in a normal perl script to receive traps. It is intended solely for embedded use within the snmptrapd daemon.

DESCRIPTION

Within the snmptrapd.conf file, the keyword “perl” may be used to call any perl expression and using this ability, you can use the NetSNMP::TrapReceiver module to register functions which will be called every time a given notification (a trap or an inform) is received. Registered functions are called with 2 arguments. The first is a reference to a hash containing information about how the trap was received (what version of the SNMP protocol was used, where it came from, what SNMP user name or community name it was sent under, etc). The second argument is a reference to an array containing the variable bindings (OID and value information) that define the noification itself. Each variable is itself a reference to an array containing four values: a NetSNMP::OID object, a string representation of the value that came associated with it, the value’s numeric type (see NetSNMP::ASN for further details on SNMP typing information), and the raw value of the trap, encoded according to its type, 64-bit integer types are returned as strings, integer types as integers, strings as strings, object identifiers as NetSNMP::OID objects, and any other types as undefs.

Registered functions should return one of the following values:

NETSNMPTRAPD_HANDLER_OK
Handling the trap succeeded, but lets the snmptrapd daemon check for further appropriate handlers.

NETSNMPTRAPD_HANDLER_FAIL
Handling the trap failed, but lets the snmptrapd daemon check for further appropriate handlers.

NETSNMPTRAPD_HANDLER_BREAK
Stops evaluating the list of handlers for this specific trap, but lets the snmptrapd daemon apply global handlers.

NETSNMPTRAPD_HANDLER_FINISH
Stops searching for further appropriate handlers.

If a handler function does not return anything appropriate or even nothing at all, a return value of NETSNMPTRAPD_HANDLER_OK is assumed.

Subroutines are registered using the NetSNMP::TrapReceiver::register function, which takes two arguments. The first is a string describing the notification you want to register for (such as “linkUp” or “MyMIB::MyTrap” or “.1.3.6.1.4.1.2021….”). Two special keywords can be used in place of an OID: “default” and “all”. The “default” keyword indicates you want your handler to be called in the case where no other handlers are called. The “all” keyword indicates that the handler should ALWAYS be called for every notification.

EXAMPLE

As an example, put the following code into a file (say “/usr/local/share/snmp/mytrapd.pl”):

#!/usr/bin/perl sub my_receiver { print “********** PERL RECEIVED A NOTIFICATION: “; # print the PDU info (a hash reference) print “PDU INFO: “; foreach my $k(keys(%{$_[0]})) { if ($k eq “securityEngineID” || $k eq “contextEngineID”) { printf " %-30s 0x%s “, $k, unpack(h*, $_[0]{$k}); } else { printf " %-30s %s “, $k, $_[0]{$k}; } } # print the variable bindings: print “VARBINDS: “; foreach my $x (@{$_[1]}) { printf " %-30s type=%-2d value=%s “, $x->[0], $x->[2], $x->[1]; } } NetSNMP::TrapReceiver::register(“all”, \my_receiver) || warn “failed to register our perl trap handler “; print STDERR “Loaded the example perl snmptrapd handler “;

Then, put the following line in your snmprapd.conf file:

perl do “/usr/local/share/snmp/mytrapd.pl”;

Start snmptrapd (as root, and the following other opions make it stay in the foreground and log to stderr):

snmptrapd -f -Le

You should see it start up and display the final message from the end of the above perl script:

Loaded the perl snmptrapd handler 2004-02-11 10:08:45 NET-SNMP version 5.2 Started.

Then, if you send yourself a fake trap using the following example command:

snmptrap -v 2c -c mycommunity localhost 0 linkUp ifIndex.1 i 1 \ ifAdminStatus.1 i up ifOperStatus.1 i up ifDescr s eth0

You should see the following output appear from snmptrapd as your perl code gets executed:

********** PERL RECEIVED A NOTIFICATION: PDU INFO: notificationtype TRAP receivedfrom 127.0.0.1 version 1 errorstatus 0 messageid 0 community mycommunity transactionid 2 errorindex 0 requestid 765160220 VARBINDS: sysUpTimeInstance type=67 value=0:0:00:00.00 snmpTrapOID.0 type=6 value=linkUp ifIndex.1 type=2 value=1 ifAdminStatus.1 type=2 value=1 ifOperStatus.1 type=2 value=1 ifDescr type=4 value=“eth0”

Passing Arguments

If you need to pass arguments in to the script, you’ll need to do it by one of two methods:

Using Subroutines

You can either define a subroutine in the file rather than have the file itself do something. IE, in the file if you put:

sub foo { print “$_[0] “; }

and then put these lines in the snmptrapd.conf file:

perl do /path/to/script perl foo(“hello world”); perl foo(“now I am passing something different”);

It’d call the foo function twice, and print the results to the console where snmptrapd was started.

Using Variables

Or you could always set a variable ahead of time:

perl $myVariable = 42; perl do /path/to/script

And have the script look for and use the $myVariable value in the script

EXPORT

None by default.

Exportable constants

NETSNMPTRAPD_AUTH_HANDLER NETSNMPTRAPD_HANDLER_BREAK NETSNMPTRAPD_HANDLER_FAIL NETSNMPTRAPD_HANDLER_FINISH NETSNMPTRAPD_HANDLER_OK NETSNMPTRAPD_POST_HANDLER NETSNMPTRAPD_PRE_HANDLER

SEE ALSO

NetSNMP::OID, NetSNMP::ASN

snmptrapd.conf (5) for configuring the Net-SNMP trap receiver.

snmpd.conf (5) for configuring the Net-SNMP snmp agent for sending traps.

http://www.Net-SNMP.org/

AUTHOR

W. Hardaker, <[email protected]>

COPYRIGHT AND LICENSE

Copyright 2004 by W. Hardaker

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

443 - Linux cli command Regexp_Common_linguapm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_linguapm and provides detailed information about the command Regexp_Common_linguapm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_linguapm.

NAME 🖥️ Regexp_Common_linguapm 🖥️

  • provide regexes for language related stuff.

SYNOPSIS

use Regexp::Common qw /lingua/; while (<>) { /^$RE{lingua}{palindrome}$/ and print “is a palindrome “; }

DESCRIPTION

Please consult the manual of Regexp::Common for a general description of the works of this interface.

Do not use this module directly, but load it via Regexp::Common.

“$RE{lingua}{palindrome}”

Returns a pattern that recognizes a palindrome, a string that is the same if you reverse it. By default, it only matches strings consisting of letters, but this can be changed using the {-chars} option. This option takes a character class (default is [A-Za-z]) as argument.

If {-keep} is used, only $1 will be set, and set to the entire match.

This pattern requires at least perl 5.6.0.

SEE ALSO

Regexp::Common for a general description of how to use this interface.

AUTHOR

Damian Conway ([email protected])

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Many regexes are missing. Send them in to [email protected].

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

444 - Linux cli command svctcp_create

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command svctcp_create and provides detailed information about the command svctcp_create, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the svctcp_create.

NAME 🖥️ svctcp_create 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

445 - Linux cli command Tk_Scrollbarpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Scrollbarpm and provides detailed information about the command Tk_Scrollbarpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Scrollbarpm.

NAME 🖥️ Tk_Scrollbarpm 🖥️

Create and manipulate Scrollbar widgets

SYNOPSIS

$scrollbar = $parent->Scrollbar(?options?);

STANDARD OPTIONS

-activebackground -highlightbackground -orient -takefocus -background -highlightcolor -relief -troughcolor -borderwidth -highlightthickness -repeatdelay -cursor -jump -repeatinterval

See Tk::options for details of the standard options.

WIDGET-SPECIFIC OPTIONS

Name: activeRelief

Class: ActiveRelief

Switch: -activerelief

Specifies the relief to use when displaying the element that is active, if any. Elements other than the active element are always displayed with a raised relief.

Name: command

Class: Command

Switch: -command

Specifies a callback to invoke to change the view in the widget associated with the scrollbar. When a user requests a view change by manipulating the scrollbar, the callback is invoked. The callback is passed additional arguments as described later. This option almost always has a value such as [xview => $widget] or [yview => $widget], consisting of the a widget object and either xview (if the scrollbar is for horizontal scrolling) or yview (for vertical scrolling). All scrollable widgets have xview and yview methods that take exactly the additional arguments appended by the scrollbar as described in “SCROLLING COMMANDS” below.

Name: elementBorderWidth

Class: BorderWidth

Switch: -elementborderwidth

Specifies the width of borders drawn around the internal elements of the scrollbar (the two arrows and the slider). The value may have any of the forms acceptable to Tk_GetPixels. If this value is less than zero, the value of the borderWidth option is used in its place.

Name: width

Class: Width

Switch: -width

Specifies the desired narrow dimension of the scrollbar window, not including 3-D border, if any. For vertical scrollbars this will be the width and for horizontal scrollbars this will be the height. The value may have any of the forms acceptable to Tk_GetPixels.

DESCRIPTION

The Scrollbar method creates a new window (given by the $widget argument) and makes it into a scrollbar widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the scrollbar such as its colors, orientation, and relief. The scrollbar command returns its $widget argument. At the time this command is invoked, there must not exist a window named $widget, but $widget’s parent must exist.

A scrollbar is a widget that displays two arrows, one at each end of the scrollbar, and a slider in the middle portion of the scrollbar. It provides information about what is visible in an associated window that displays an document of some sort (such as a file being edited or a drawing). The position and size of the slider indicate which portion of the document is visible in the associated window. For example, if the slider in a vertical scrollbar covers the top third of the area between the two arrows, it means that the associated window displays the top third of its document.

Scrollbars can be used to adjust the view in the associated window by clicking or dragging with the mouse. See “BINDINGS” below for details.

ELEMENTS

A scrollbar displays five elements, which are referred to in the methods for the scrollbar:

arrow1
The top or left arrow in the scrollbar.

trough1
The region between the slider and arrow1.

slider
The rectangle that indicates what is visible in the associated widget.

trough2
The region between the slider and arrow2.

arrow2
The bottom or right arrow in the scrollbar.

WIDGET METHODS

The Scrollbar method creates a widget object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class.

The following additional methods are available for scrollbar widgets:

$scrollbar->activate(?element?)
Marks the element indicated by element as active, which causes it to be displayed as specified by the activeBackground and activeRelief options. The only element values understood by this command are arrow1, slider, or arrow2. If any other value is specified then no element of the scrollbar will be active. If element is not specified, the command returns the name of the element that is currently active, or an empty string if no element is active.

$scrollbar->delta(deltaX, deltaY)
Returns a real number indicating the fractional change in the scrollbar setting that corresponds to a given change in slider position. For example, if the scrollbar is horizontal, the result indicates how much the scrollbar setting must change to move the slider deltaX pixels to the right (deltaY is ignored in this case). If the scrollbar is vertical, the result indicates how much the scrollbar setting must change to move the slider deltaY pixels down. The arguments and the result may be zero or negative.

$scrollbar->fraction(x, y)
Returns a real number between 0 and 1 indicating where the point given by x and y lies in the trough area of the scrollbar. The value 0 corresponds to the top or left of the trough, the value 1 corresponds to the bottom or right, 0.5 corresponds to the middle, and so on. X and y must be pixel coordinates relative to the scrollbar widget. If x and y refer to a point outside the trough, the closest point in the trough is used.

$scrollbar->get
Returns the scrollbar settings in the form of a list whose elements are the arguments to the most recent set method.

$scrollbar->identify(x, y)
Returns the name of the element under the point given by x and y (such as arrow1), or an empty string if the point does not lie in any element of the scrollbar. X and y must be pixel coordinates relative to the scrollbar widget.

$scrollbar->set(first, last)
This command is invoked by the scrollbar’s associated widget to tell the scrollbar about the current view in the widget. The command takes two arguments, each of which is a real fraction between 0 and 1. The fractions describe the range of the document that is visible in the associated widget. For example, if first is 0.2 and last is 0.4, it means that the first part of the document visible in the window is 20% of the way through the document, and the last visible part is 40% of the way through.

SCROLLING COMMANDS

When the user interacts with the scrollbar, for example by dragging the slider, the scrollbar notifies the associated widget that it must change its view. The scrollbar makes the notification by evaluating a callback specified as the scrollbar’s -command option. The callback may take several forms. In each case, the initial arguments passed are those specified in the -command callback itself, which usually has a form like [yview => $widget]. (Which will invoke $widget->yview(…) where the … part is as below. See Tk::callbacks for details.) The callback is passed additional arguments as follows:

moveto,fraction
Fraction is a real number between 0 and 1. The widget should adjust its view so that the point given by fraction appears at the beginning of the widget. If fraction is 0 it refers to the beginning of the document. 1.0 refers to the end of the document, 0.333 refers to a point one-third of the way through the document, and so on.

scroll,number,units
The widget should adjust its view by number units. The units are defined in whatever way makes sense for the widget, such as characters or lines in a text widget. Number is either 1, which means one unit should scroll off the top or left of the window, or -1, which means that one unit should scroll off the bottom or right of the window.

scroll,number,page
The widget should adjust its view by number pages. It is up to the widget to define the meaning of a page; typically it is slightly less than what fits in the window, so that there is a slight overlap between the old and new views. Number is either 1, which means the next page should become visible, or -1, which means that the previous page should become visible.

OLD COMMAND SYNTAX

In versions of Tk before 4.0, the set and get widget commands used a different form. This form is still supported for backward compatibility, but it is deprecated. In the old command syntax, the set method has the following form:

$scrollbar->set(totalUnits, windowUnits, firstUnit, lastUnit)
In this form the arguments are all integers. TotalUnits gives the total size of the object being displayed in the associated widget. The meaning of one unit depends on the associated widget; for example, in a text editor widget units might correspond to lines of text. WindowUnits indicates the total number of units that can fit in the associated window at one time. FirstUnit and lastUnit give the indices of the first and last units currently visible in the associated window (zero corresponds to the first unit of the object).

Under the old syntax the get method returns a list of four integers, consisting of the totalUnits, windowUnits, firstUnit, and lastUnit values from the last set method.

The callbacks generated by scrollbars also have a different form when the old syntax is being used, the callback is passed a single argument:

unit
Unit is an integer that indicates what should appear at the top or left of the associated widget’s window. It has the same meaning as the firstUnit and lastUnit arguments to the set method.

The most recent set method determines whether or not to use the old syntax. If it is given two real arguments then the new syntax will be used in the future, and if it is given four integer arguments then the old syntax will be used.

BINDINGS

Tk automatically creates class bindings for scrollbars that give them the following default behavior. If the behavior is different for vertical and horizontal scrollbars, the horizontal behavior is described in parentheses.

[1]
Pressing button 1 over arrow1 causes the view in the associated widget to shift up (left) by one unit so that the document appears to move down (right) one unit. If the button is held down, the action auto-repeats.

[2]
Pressing button 1 over trough1 causes the view in the associated widget to shift up (left) by one screenful so that the document appears to move down (right) one screenful. If the button is held down, the action auto-repeats.

[3]
Pressing button 1 over the slider and dragging causes the view to drag with the slider. If the jump option is true, then the view doesn’t drag along with the slider; it changes only when the mouse button is released.

[4]
Pressing button 1 over trough2 causes the view in the associated widget to shift down (right) by one screenful so that the document appears to move up (left) one screenful. If the button is held down, the action auto-repeats.

[5]
Pressing button 1 over arrow2 causes the view in the associated widget to shift down (right) by one unit so that the document appears to move up (left) one unit. If the button is held down, the action auto-repeats.

[6]
If button 2 is pressed over the trough or the slider, it sets the view to correspond to the mouse position; dragging the mouse with button 2 down causes the view to drag with the mouse. If button 2 is pressed over one of the arrows, it causes the same behavior as pressing button 1.

[7]
If button 1 is pressed with the Control key down, then if the mouse is over arrow1 or trough1 the view changes to the very top (left) of the document; if the mouse is over arrow2 or trough2 the view changes to the very bottom (right) of the document; if the mouse is anywhere else then the button press has no effect.

[8]
In vertical scrollbars the Up and Down keys have the same behavior as mouse clicks over arrow1 and arrow2, respectively. In horizontal scrollbars these keys have no effect.

[9]
In vertical scrollbars Control-Up and Control-Down have the same behavior as mouse clicks over trough1 and trough2, respectively. In horizontal scrollbars these keys have no effect.

[10]
In horizontal scrollbars the Up and Down keys have the same behavior as mouse clicks over arrow1 and arrow2, respectively. In vertical scrollbars these keys have no effect.

[11]
In horizontal scrollbars Control-Up and Control-Down have the same behavior as mouse clicks over trough1 and trough2, respectively. In vertical scrollbars these keys have no effect.

[12]
The Prior and Next keys have the same behavior as mouse clicks over trough1 and trough2, respectively.

[13]
The Home key adjusts the view to the top (left edge) of the document.

[14]
The End key adjusts the view to the bottom (right edge) of the document.

SEE ALSO

Tk::callbacks Tk::Scrolled

KEYWORDS

scrollbar, widget

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

446 - Linux cli command vprintf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command vprintf and provides detailed information about the command vprintf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the vprintf.

NAME 🖥️ vprintf 🖥️

formatted output conversion

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int printf(const char *restrict format, ...);
int fprintf(FILE *restrict stream,
 const char *restrict format, ...);
int dprintf(int fd,
 const char *restrict format, ...);
int sprintf(char *restrict str,
 const char *restrict format, ...);
int snprintf(char str[restrict .size], size_t size,
 const char *restrict format, ...);
int vprintf(const char *restrict format, va_list ap);
int vfprintf(FILE *restrict stream,
 const char *restrict format, va_list ap);
int vdprintf(int fd,
 const char *restrict format, va_list ap);
int vsprintf(char *restrict str,
 const char *restrict format, va_list ap);
int vsnprintf(char str[restrict .size], size_t size,
 const char *restrict format, va_list ap);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

snprintf(), vsnprintf():

    _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE

dprintf(), vdprintf():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The functions in the printf() family produce output according to a format as described below. The functions printf() and vprintf() write output to stdout, the standard output stream; fprintf() and vfprintf() write output to the given output stream; sprintf(), snprintf(), vsprintf(), and vsnprintf() write to the character string str.

The function dprintf() is the same as fprintf() except that it outputs to a file descriptor, fd, instead of to a stdio(3) stream.

The functions snprintf() and vsnprintf() write at most size bytes (including the terminating null byte (‘�’)) to str.

The functions vprintf(), vfprintf(), vdprintf(), vsprintf(), vsnprintf() are equivalent to the functions printf(), fprintf(), dprintf(), sprintf(), snprintf(), respectively, except that they are called with a va_list instead of a variable number of arguments. These functions do not call the va_end macro. Because they invoke the va_arg macro, the value of ap is undefined after the call. See stdarg(3).

All of these functions write the output under the control of a format string that specifies how subsequent arguments (or arguments accessed via the variable-length argument facilities of stdarg(3)) are converted for output.

C99 and POSIX.1-2001 specify that the results are undefined if a call to sprintf(), snprintf(), vsprintf(), or vsnprintf() would cause copying to take place between objects that overlap (e.g., if the target string array and one of the supplied input arguments refer to the same buffer). See CAVEATS.

Format of the format string

The format string is a character string, beginning and ending in its initial shift state, if any. The format string is composed of zero or more directives: ordinary characters (not %), which are copied unchanged to the output stream; and conversion specifications, each of which results in fetching zero or more subsequent arguments. Each conversion specification is introduced by the character %, and ends with a conversion specifier. In between there may be (in this order) zero or more flags, an optional minimum field width, an optional precision and an optional length modifier.

The overall syntax of a conversion specification is:

%[$][flags][width][.precision][length modifier]conversion

The arguments must correspond properly (after type promotion) with the conversion specifier. By default, the arguments are used in the order given, where each ‘*’ (see Field width and Precision below) and each conversion specifier asks for the next argument (and it is an error if insufficiently many arguments are given). One can also specify explicitly which argument is taken, at each place where an argument is required, by writing “%m$” instead of ‘%’ and “*m$” instead of ‘*’, where the decimal integer m denotes the position in the argument list of the desired argument, indexed starting from 1. Thus,

printf("%*d", width, num);

and

printf("%2$*1$d", width, num);

are equivalent. The second style allows repeated references to the same argument. The C99 standard does not include the style using ‘$’, which comes from the Single UNIX Specification. If the style using ‘$’ is used, it must be used throughout for all conversions taking an argument and all width and precision arguments, but it may be mixed with “%%” formats, which do not consume an argument. There may be no gaps in the numbers of arguments specified using ‘$’; for example, if arguments 1 and 3 are specified, argument 2 must also be specified somewhere in the format string.

For some numeric conversions a radix character (“decimal point”) or thousands’ grouping character is used. The actual character used depends on the LC_NUMERIC part of the locale. (See setlocale(3).) The POSIX locale uses ‘.’ as radix character, and does not have a grouping character. Thus,

printf("%'.2f", 1234567.89);

results in “1234567.89” in the POSIX locale, in “1234567,89” in the nl_NL locale, and in “1.234.567,89” in the da_DK locale.

Flag characters

The character % is followed by zero or more of the following flags:

#
The value should be converted to an “alternate form”. For o conversions, the first character of the output string is made zero (by prefixing a 0 if it was not zero already). For x and X conversions, a nonzero result has the string “0x” (or “0X” for X conversions) prepended to it. For a, A, e, E, f, F, g, and G conversions, the result will always contain a decimal point, even if no digits follow it (normally, a decimal point appears in the results of those conversions only if a digit follows). For g and G conversions, trailing zeros are not removed from the result as they would otherwise be. For m, if errno contains a valid error code, the output of strerrorname_np(errno) is printed; otherwise, the value stored in errno is printed as a decimal number. For other conversions, the result is undefined.

0
The value should be zero padded. For d, i, o, u, x, X, a, A, e, E, f, F, g, and G conversions, the converted value is padded on the left with zeros rather than blanks. If the 0 and - flags both appear, the 0 flag is ignored. If a precision is given with an integer conversion (d, i, o, u, x, and X), the 0 flag is ignored. For other conversions, the behavior is undefined.

-
The converted value is to be left adjusted on the field boundary. (The default is right justification.) The converted value is padded on the right with blanks, rather than on the left with blanks or zeros. A - overrides a 0 if both are given.

’ ‘
(a space) A blank should be left before a positive number (or empty string) produced by a signed conversion.

+
A sign (+ or -) should always be placed before a number produced by a signed conversion. By default, a sign is used only for negative numbers. A + overrides a space if both are used.

The five flag characters above are defined in the C99 standard. The Single UNIX Specification specifies one further flag character.


For decimal conversion (i, d, u, f, F, g, G) the output is to be grouped with thousands’ grouping characters if the locale information indicates any. (See setlocale(3).) Note that many versions of gcc(1) cannot parse this option and will issue a warning. (SUSv2 did not include %‘F, but SUSv3 added it.) Note also that the default locale of a C program is “C” whose locale information indicates no thousands’ grouping character. Therefore, without a prior call to setlocale(3), no thousands’ grouping characters will be printed.

glibc 2.2 adds one further flag character.

I
For decimal integer conversion (i, d, u) the output uses the locale’s alternative output digits, if any. For example, since glibc 2.2.3 this will give Arabic-Indic digits in the Persian (“fa_IR”) locale.

Field width

An optional decimal digit string (with nonzero first digit) specifying a minimum field width. If the converted value has fewer characters than the field width, it will be padded with spaces on the left (or right, if the left-adjustment flag has been given). Instead of a decimal digit string one may write “*” or “*m$” (for some decimal integer m) to specify that the field width is given in the next argument, or in the m-th argument, respectively, which must be of type int. A negative field width is taken as a ‘-’ flag followed by a positive field width. In no case does a nonexistent or small field width cause truncation of a field; if the result of a conversion is wider than the field width, the field is expanded to contain the conversion result.

Precision

An optional precision, in the form of a period (’.’) followed by an optional decimal digit string. Instead of a decimal digit string one may write “*” or “*m$” (for some decimal integer m) to specify that the precision is given in the next argument, or in the m-th argument, respectively, which must be of type int. If the precision is given as just ‘.’, the precision is taken to be zero. A negative precision is taken as if the precision were omitted. This gives the minimum number of digits to appear for d, i, o, u, x, and X conversions, the number of digits to appear after the radix character for a, A, e, E, f, and F conversions, the maximum number of significant digits for g and G conversions, or the maximum number of characters to be printed from a string for s and S conversions.

Length modifier

Here, “integer conversion” stands for d, i, o, u, x, or X conversion.

hh
A following integer conversion corresponds to a signed char or unsigned char argument, or a following n conversion corresponds to a pointer to a signed char argument.

h
A following integer conversion corresponds to a short or unsigned short argument, or a following n conversion corresponds to a pointer to a short argument.

l
(ell) A following integer conversion corresponds to a long or unsigned long argument, or a following n conversion corresponds to a pointer to a long argument, or a following c conversion corresponds to a wint_t argument, or a following s conversion corresponds to a pointer to wchar_t argument. On a following a, A, e, E, f, F, g, or G conversion, this length modifier is ignored (C99; not in SUSv2).

ll
(ell-ell). A following integer conversion corresponds to a long long or unsigned long long argument, or a following n conversion corresponds to a pointer to a long long argument.

q
A synonym for ll. This is a nonstandard extension, derived from BSD; avoid its use in new code.

L
A following a, A, e, E, f, F, g, or G conversion corresponds to a long double argument. (C99 allows %LF, but SUSv2 does not.)

j
A following integer conversion corresponds to an intmax_t or uintmax_t argument, or a following n conversion corresponds to a pointer to an intmax_t argument.

z
A following integer conversion corresponds to a size_t or ssize_t argument, or a following n conversion corresponds to a pointer to a size_t argument.

Z
A nonstandard synonym for z that predates the appearance of z. Do not use in new code.

t
A following integer conversion corresponds to a ptrdiff_t argument, or a following n conversion corresponds to a pointer to a ptrdiff_t argument.

SUSv3 specifies all of the above, except for those modifiers explicitly noted as being nonstandard extensions. SUSv2 specified only the length modifiers h (in hd, hi, ho, hx, hX, hn) and l (in ld, li, lo, lx, lX, ln, lc, ls) and L (in Le, LE, Lf, Lg, LG).

As a nonstandard extension, the GNU implementations treats ll and L as synonyms, so that one can, for example, write llg (as a synonym for the standards-compliant Lg) and Ld (as a synonym for the standards compliant lld). Such usage is nonportable.

Conversion specifiers

A character that specifies the type of conversion to be applied. The conversion specifiers and their meanings are:

d, i
The int argument is converted to signed decimal notation. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.

o, u, x, X
The unsigned int argument is converted to unsigned octal (o), unsigned decimal (u), or unsigned hexadecimal (x and X) notation. The letters abcdef are used for x conversions; the letters ABCDEF are used for X conversions. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.

e, E
The double argument is rounded and converted in the style [-]d**.ddde**±dd where there is one digit (which is nonzero if the argument is nonzero) before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero, no decimal-point character appears. An E conversion uses the letter E (rather than e) to introduce the exponent. The exponent always contains at least two digits; if the value is zero, the exponent is 00.

f, F
The double argument is rounded and converted to decimal notation in the style [-]ddd**.**ddd, where the number of digits after the decimal-point character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. If a decimal point appears, at least one digit appears before it.

(SUSv2 does not know about F and says that character string representations for infinity and NaN may be made available. SUSv3 adds a specification for F. The C99 standard specifies “[-]inf” or “[-]infinity” for infinity, and a string starting with “nan” for NaN, in the case of f conversion, and “[-]INF” or “[-]INFINITY” or “NAN” in the case of F conversion.)

g, G
The double argument is converted in style f or e (or F or E for G conversions). The precision specifies the number of significant digits. If the precision is missing, 6 digits are given; if the precision is zero, it is treated as 1. Style e is used if the exponent from its conversion is less than -4 or greater than or equal to the precision. Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit.

a, A
(C99; not in SUSv2, but added in SUSv3) For a conversion, the double argument is converted to hexadecimal notation (using the letters abcdef) in the style [-]0xh**.hhhhp**±d; for A conversion the prefix 0X, the letters ABCDEF, and the exponent separator P is used. There is one hexadecimal digit before the decimal point, and the number of digits after it is equal to the precision. The default precision suffices for an exact representation of the value if an exact representation in base 2 exists and otherwise is sufficiently large to distinguish values of type double. The digit before the decimal point is unspecified for nonnormalized numbers, and nonzero but otherwise unspecified for normalized numbers. The exponent always contains at least one digit; if the value is zero, the exponent is 0.

c
If no l modifier is present, the int argument is converted to an unsigned char, and the resulting character is written. If an l modifier is present, the wint_t (wide character) argument is converted to a multibyte sequence by a call to the wcrtomb(3) function, with a conversion state starting in the initial state, and the resulting multibyte string is written.

s
If no l modifier is present: the const char * argument is expected to be a pointer to an array of character type (pointer to a string). Characters from the array are written up to (but not including) a terminating null byte (‘�’); if a precision is specified, no more than the number specified are written. If a precision is given, no null byte need be present; if the precision is not specified, or is greater than the size of the array, the array must contain a terminating null byte.

If an l modifier is present: the const wchar_t * argument is expected to be a pointer to an array of wide characters. Wide characters from the array are converted to multibyte characters (each by a call to the wcrtomb(3) function, with a conversion state starting in the initial state before the first wide character), up to and including a terminating null wide character. The resulting multibyte characters are written up to (but not including) the terminating null byte. If a precision is specified, no more bytes than the number specified are written, but no partial multibyte characters are written. Note that the precision determines the number of bytes written, not the number of wide characters or screen positions. The array must contain a terminating null wide character, unless a precision is given and it is so small that the number of bytes written exceeds it before the end of the array is reached.

C
(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.) Synonym for lc. Don’t use.

S
(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.) Synonym for ls. Don’t use.

p
The void * pointer argument is printed in hexadecimal (as if by %#x or %#lx).

n
The number of characters written so far is stored into the integer pointed to by the corresponding argument. That argument shall be an int *, or variant whose size matches the (optionally) supplied integer length modifier. No argument is converted. (This specifier is not supported by the bionic C library.) The behavior is undefined if the conversion specification includes any flags, a field width, or a precision.

m
(glibc extension; supported by uClibc and musl.) Print output of strerror(errno) (or strerrorname_np(errno) in the alternate form). No argument is required.

%
A ‘%’ is written. No argument is converted. The complete conversion specification is ‘%%’.

RETURN VALUE

Upon successful return, these functions return the number of bytes printed (excluding the null byte used to end output to strings).

The functions snprintf() and vsnprintf() do not write more than size bytes (including the terminating null byte (‘�’)). If the output was truncated due to this limit, then the return value is the number of characters (excluding the terminating null byte) which would have been written to the final string if enough space had been available. Thus, a return value of size or more means that the output was truncated. (See also below under CAVEATS.)

If an output error is encountered, a negative value is returned.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

printf(), fprintf(), sprintf(), snprintf(), vprintf(), vfprintf(), vsprintf(), vsnprintf()

Thread safetyMT-Safe locale

STANDARDS

fprintf()
printf()
sprintf()
vprintf()
vfprintf()
vsprintf()
snprintf()
vsnprintf()
C11, POSIX.1-2008.

dprintf()
vdprintf()
GNU, POSIX.1-2008.

HISTORY

fprintf()
printf()
sprintf()
vprintf()
vfprintf()
vsprintf()
C89, POSIX.1-2001.

snprintf()
vsnprintf()
SUSv2, C99, POSIX.1-2001.

Concerning the return value of snprintf(), SUSv2 and C99 contradict each other: when snprintf() is called with size=0 then SUSv2 stipulates an unspecified return value less than 1, while C99 allows str to be NULL in this case, and gives the return value (as always) as the number of characters that would have been written in case the output string has been large enough. POSIX.1-2001 and later align their specification of snprintf() with C99.

dprintf()
vdprintf()
GNU, POSIX.1-2008.

glibc 2.1 adds length modifiers hh, j, t, and z and conversion characters a and A.

glibc 2.2 adds the conversion character F with C99 semantics, and the flag character I.

glibc 2.35 gives a meaning to the alternate form (#) of the m conversion specifier, that is %#m.

CAVEATS

Some programs imprudently rely on code such as the following

sprintf(buf, "%s some further text", buf);

to append text to buf. However, the standards explicitly note that the results are undefined if source and destination buffers overlap when calling sprintf(), snprintf(), vsprintf(), and vsnprintf(). Depending on the version of gcc(1) used, and the compiler options employed, calls such as the above will not produce the expected results.

The glibc implementation of the functions snprintf() and vsnprintf() conforms to the C99 standard, that is, behaves as described above, since glibc 2.1. Until glibc 2.0.6, they would return -1 when the output was truncated.

BUGS

Because sprintf() and vsprintf() assume an arbitrarily long string, callers must be careful not to overflow the actual space; this is often impossible to assure. Note that the length of the strings produced is locale-dependent and difficult to predict. Use snprintf() and vsnprintf() instead (or asprintf(3) and vasprintf(3)).

Code such as printf(foo); often indicates a bug, since foo may contain a % character. If foo comes from untrusted user input, it may contain %n, causing the printf() call to write to memory and creating a security hole.

EXAMPLES

To print Pi to five decimal places:

#include <math.h>
#include <stdio.h>
fprintf(stdout, "pi = %.5f

“, 4 * atan(1.0));

To print a date and time in the form “Sunday, July 3, 10:02”, where weekday and month are pointers to strings:

#include <stdio.h>
fprintf(stdout, "%s, %s %d, %.2d:%.2d

“, weekday, month, day, hour, min);

Many countries use the day-month-year order. Hence, an internationalized version must be able to print the arguments in an order specified by the format:

#include <stdio.h>
fprintf(stdout, format,
        weekday, month, day, hour, min);

where format depends on locale, and may permute the arguments. With the value:

"%1$s, %3$d. %2$s, %4$d:%5$.2d

"

one might obtain “Sonntag, 3. Juli, 10:02”.

To allocate a sufficiently large string and print into it (code correct for both glibc 2.0 and glibc 2.1):

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
char *
make_message(const char *fmt, ...)
{
    int n = 0;
    size_t size = 0;
    char *p = NULL;
    va_list ap;
    /* Determine required size. */
    va_start(ap, fmt);
    n = vsnprintf(p, size, fmt, ap);
    va_end(ap);
    if (n < 0)
        return NULL;
    size = (size_t) n + 1;      /* One extra byte for '' */
    p = malloc(size);
    if (p == NULL)
        return NULL;
    va_start(ap, fmt);
    n = vsnprintf(p, size, fmt, ap);
    va_end(ap);
    if (n < 0) {
        free(p);
        return NULL;
    }
    return p;
}

If truncation occurs in glibc versions prior to glibc 2.0.6, this is treated as an error instead of being handled gracefully.

SEE ALSO

printf(1), asprintf(3), puts(3), scanf(3), setlocale(3), strfromd(3), wcrtomb(3), wprintf(3), locale(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

447 - Linux cli command XtCreateWidget

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtCreateWidget and provides detailed information about the command XtCreateWidget, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtCreateWidget.

NAME 🖥️ XtCreateWidget 🖥️

create and destroy widgets

SYNTAX

#include <X11/Intrinsic.h>

Widget XtCreateWidget(const char *name, WidgetClass widget_class, Widget parent, ArgList args, Cardinal num_args);

Widget XtVaCreateWidget(const char *name, WidgetClass widget_class, Widget parent, … );

Widget XtCreateManagedWidget(const char *name, WidgetClass widget_class, Widget parent, ArgList args, Cardinal num_args);

Widget XtVaCreateManagedWidget(const char *name, WidgetClass widget_class, Widget parent, … );

void XtDestroyWidget(Widget w);

ARGUMENTS

args
Specifies the argument list to override the resource defaults.

name
Specifies the resource name for the created widget, which is used for retrieving resources and, for that reason, should not be the same as any other widget that is a child of same parent.

num_args
Specifies the number of arguments in the argument list.

parent
Specifies the parent widget.

  1. Specifies the widget.

widget_class
Specifies the widget class pointer for the created widget.


Specifies the variable argument list to override the resource defaults.

DESCRIPTION

The XtCreateWidget function performs much of the boilerplate operations of widget creation:

  • Checks to see if the class_initialize procedure has been called for this class and for all superclasses and, if not, calls those necessary in a superclass-to-subclass order.

  • Allocates memory for the widget instance.

  • If the parent is a subclass of constraintWidgetClass, it allocates memory for the parent’s constraints and stores the address of this memory into the constraints field.

  • Initializes the core nonresource data fields (for example, parent and visible).

  • Initializes the resource fields (for example, background_pixel) by using the resource lists specified for this class and all superclasses.

  • If the parent is a subclass of constraintWidgetClass, it initializes the resource fields of the constraints record by using the constraint resource list specified for the parent’s class and all superclasses up to constraintWidgetClass.

  • Calls the initialize procedures for the widget by starting at the Core initialize procedure on down to the widget’s initialize procedure.

  • If the parent is a subclass of compositeWidgetClass, it puts the widget into its parent’s children list by calling its parent’s insert_child procedure. For further information, see Section 3.5.

  • If the parent is a subclass of constraintWidgetClass, it calls the constraint initialize procedures, starting at constraintWidgetClass on down to the parent’s constraint initialize procedure.

Note that you can determine the number of arguments in an argument list by using the XtNumber macro. For further information, see Section 11.1.

The XtCreateManagedWidget function is a convenience routine that calls XtCreateWidget and XtManageChild.

The XtDestroyWidget function provides the only method of destroying a widget, including widgets that need to destroy themselves. It can be called at any time, including from an application callback routine of the widget being destroyed. This requires a two-phase destroy process in order to avoid dangling references to destroyed widgets.

In phase one, XtDestroyWidget performs the following:

  • If the being_destroyed field of the widget is True, it returns immediately.

  • Recursively descends the widget tree and sets the being_destroyed field to True for the widget and all children.

  • Adds the widget to a list of widgets (the destroy list) that should be destroyed when it is safe to do so.

Entries on the destroy list satisfy the invariant that if w2 occurs after w1 on the destroy list then w2 is not a descendent of w1. (A descendant refers to both normal and pop-up children.)

Phase two occurs when all procedures that should execute as a result of the current event have been called (including all procedures registered with the event and translation managers), that is, when the current invocation of XtDispatchEvent is about to return or immediately if not in XtDispatchEvent.

In phase two, XtDestroyWidget performs the following on each entry in the destroy list:

  • Calls the destroy callback procedures registered on the widget (and all descendants) in post-order (it calls children callbacks before parent callbacks).

  • If the widget’s parent is a subclass of compositeWidgetClass and if the parent is not being destroyed, it calls XtUnmanageChild on the widget and then calls the widget’s parent’s delete_child procedure (see Section 3.4).

  • If the widget’s parent is a subclass of constraintWidgetClass, it calls the constraint destroy procedure for the parent, then the parent’s superclass, until finally it calls the constraint destroy procedure for constraintWidgetClass.

  • Calls the destroy methods for the widget (and all descendants) in post-order. For each such widget, it calls the destroy procedure declared in the widget class, then the destroy procedure declared in its superclass, until finally it calls the destroy procedure declared in the Core class record.

  • Calls XDestroyWindow if the widget is realized (that is, has an X window). The server recursively destroys all descendant windows.

  • Recursively descends the tree and deallocates all pop-up widgets, constraint records, callback lists and, if the widget is a subclass of compositeWidgetClass, children.

SEE ALSO

XtAppCreateShell(3), XtCreatePopupShell(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

448 - Linux cli command pthread_detach

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_detach and provides detailed information about the command pthread_detach, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_detach.

NAME 🖥️ pthread_detach 🖥️

detach a thread

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_detach(pthread_t thread);

DESCRIPTION

The pthread_detach() function marks the thread identified by thread as detached. When a detached thread terminates, its resources are automatically released back to the system without the need for another thread to join with the terminated thread.

Attempting to detach an already detached thread results in unspecified behavior.

RETURN VALUE

On success, pthread_detach() returns 0; on error, it returns an error number.

ERRORS

EINVAL
thread is not a joinable thread.

ESRCH
No thread with the ID thread could be found.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_detach()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

Once a thread has been detached, it can’t be joined with pthread_join(3) or be made joinable again.

A new thread can be created in a detached state using pthread_attr_setdetachstate(3) to set the detached attribute of the attr argument of pthread_create(3).

The detached attribute merely determines the behavior of the system when the thread terminates; it does not prevent the thread from being terminated if the process terminates using exit(3) (or equivalently, if the main thread returns).

Either pthread_join(3) or pthread_detach() should be called for each thread that an application creates, so that system resources for the thread can be released. (But note that the resources of any threads for which one of these actions has not been done will be freed when the process terminates.)

EXAMPLES

The following statement detaches the calling thread:

pthread_detach(pthread_self());

SEE ALSO

pthread_attr_setdetachstate(3), pthread_cancel(3), pthread_create(3), pthread_exit(3), pthread_join(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

449 - Linux cli command malloc_usable_size

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command malloc_usable_size and provides detailed information about the command malloc_usable_size, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the malloc_usable_size.

NAME 🖥️ malloc_usable_size 🖥️

obtain size of block of memory allocated from heap

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <malloc.h>
size_t malloc_usable_size(void *_Nullable ptr);

DESCRIPTION

This function can be used for diagnostics or statistics about allocations from malloc(3) or a related function.

RETURN VALUE

malloc_usable_size() returns a value no less than the size of the block of allocated memory pointed to by ptr. If ptr is NULL, 0 is returned.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

malloc_usable_size()

Thread safetyMT-Safe

STANDARDS

GNU.

CAVEATS

The value returned by malloc_usable_size() may be greater than the requested size of the allocation because of various internal implementation details, none of which the programmer should rely on. This function is intended to only be used for diagnostics and statistics; writing to the excess memory without first calling realloc(3) to resize the allocation is not supported. The returned value is only valid at the time of the call.

SEE ALSO

malloc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

450 - Linux cli command zip_open_from_source

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_open_from_source and provides detailed information about the command zip_open_from_source, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_open_from_source.

libzip (-lzip)

The

function opens the zip archive specified by

and returns a pointer to a

used to manipulate the archive. The

are specified by

the following values, or 0 for none of them.

Perform additional stricter consistency checks on the archive, and error if they fail.

Create the archive if it does not exist.

Error if archive already exists.

If archive exists, ignore its current contents. In other words, handle it the same way as an empty archive.

Open archive in read-only mode.

If an error occurs and

is

it will be set to the corresponding error code.

The

function opens a zip archive encapsulated by the zip_source

using the provided

In case of error, the zip_error

is filled in.

Upon successful completion

and

return a

pointer. Otherwise,

is returned and

sets

to indicate the error, while

sets

to indicate the error.

The archive specified by

is opened unless:

The file specified by

exists and

is set.

Inconsistencies were found in the file specified by

This error is often caused by specifying

but can also happen without it.

The

argument is

Required memory could not be allocated.

The file specified by

does not exist and

is not set.

The file specified by

is not a zip archive.

The file specified by

could not be opened.

A read error occurred; see

for details.

The file specified by

does not allow seeks.

and

were added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

451 - Linux cli command Image_ExifTool_CanonVRDpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_CanonVRDpm and provides detailed information about the command Image_ExifTool_CanonVRDpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_CanonVRDpm.

NAME 🖥️ Image_ExifTool_CanonVRDpm 🖥️

Read/write Canon VRD and DR4 information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read and write VRD and DR4 Recipe Data information as written by the Canon Digital Photo Professional software. This information is written to VRD and DR4 files, and as a trailer in JPEG, CRW, CR2 and TIFF images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

ACKNOWLEDGEMENTS

Thanks to Bogdan and Gert Kello for decoding some tags.

SEE ALSO

“CanonVRD Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

452 - Linux cli command HTML_Form_ListInputpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_Form_ListInputpm and provides detailed information about the command HTML_Form_ListInputpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_Form_ListInputpm.

NAME 🖥️ HTML_Form_ListInputpm 🖥️

An HTML form list input element for use with HTML::Form

VERSION

version 6.11

AUTHOR

Gisle Aas <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 1998 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

453 - Linux cli command IO_Stringypm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_Stringypm and provides detailed information about the command IO_Stringypm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_Stringypm.

NAME 🖥️ IO_Stringypm 🖥️

stringy - I/O on in-core objects like strings and arrays

SYNOPSIS

use strict; use warnings; use IO::AtomicFile; # Write a file which is updated atomically use IO::InnerFile; # define a file inside another file use IO::Lines; # I/O handle to read/write to array of lines use IO::Scalar; # I/O handle to read/write to a string use IO::ScalarArray; # I/O handle to read/write to array of scalars use IO::Wrap; # Wrap old-style FHs in standard OO interface use IO::WrapTie; # Tie your handles & retain full OO interface # …

DESCRIPTION

This toolkit primarily provides modules for performing both traditional and object-oriented i/o) on things other than normal filehandles; in particular, IO::Scalar, IO::ScalarArray, and IO::Lines.

In the more-traditional IO::Handle front, we have IO::AtomicFile which may be used to painlessly create files which are updated atomically.

And in the “this-may-prove-useful” corner, we have IO::Wrap, whose exported wraphandle() function will clothe anything that’s not a blessed object in an IO::Handle-like wrapper… so you can just use OO syntax and stop worrying about whether your function’s caller handed you a string, a globref, or a FileHandle.

AUTHOR

Eryq ([email protected]). President, ZeeGee Software Inc (http://www.zeegee.com).

CONTRIBUTORS

Dianne Skoll ([email protected]).

COPYRIGHT & LICENSE

Copyright (c) 1997 Erik (Eryq) Dorfman, ZeeGee Software, Inc. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

454 - Linux cli command JSON_backportPPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command JSON_backportPPpm and provides detailed information about the command JSON_backportPPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the JSON_backportPPpm.

NAME 🖥️ JSON_backportPPpm 🖥️

JSON::XS compatible pure-Perl module.

SYNOPSIS

use JSON::PP; # exported functions, they croak on error # and expect/generate UTF-8 $utf8_encoded_json_text = encode_json $perl_hash_or_arrayref; $perl_hash_or_arrayref = decode_json $utf8_encoded_json_text; # OO-interface $json = JSON::PP->new->ascii->pretty->allow_nonref; $pretty_printed_json_text = $json->encode( $perl_scalar ); $perl_scalar = $json->decode( $json_text ); # Note that JSON version 2.0 and above will automatically use # JSON::XS or JSON::PP, so you should be able to just: use JSON;

DESCRIPTION

JSON::PP is a pure perl JSON decoder/encoder, and (almost) compatible to much faster JSON::XS written by Marc Lehmann in C. JSON::PP works as a fallback module when you use JSON module without having installed JSON::XS.

Because of this fallback feature of JSON.pm, JSON::PP tries not to be more JavaScript-friendly than JSON::XS (i.e. not to escape extra characters such as U+2028 and U+2029, etc), in order for you not to lose such JavaScript-friendliness silently when you use JSON.pm and install JSON::XS for speed or by accident. If you need JavaScript-friendly RFC7159-compliant pure perl module, try JSON::Tiny, which is derived from Mojolicious web framework and is also smaller and faster than JSON::PP.

JSON::PP has been in the Perl core since Perl 5.14, mainly for CPAN toolchain modules to parse META.json.

FUNCTIONAL INTERFACE

This section is taken from JSON::XS almost verbatim. encode_json and decode_json are exported by default.

encode_json

$json_text = encode_json $perl_scalar

Converts the given Perl data structure to a UTF-8 encoded, binary string (that is, the string contains octets only). Croaks on error.

This function call is functionally identical to:

$json_text = JSON::PP->new->utf8->encode($perl_scalar)

Except being faster.

decode_json

$perl_scalar = decode_json $json_text

The opposite of encode_json: expects an UTF-8 (binary) string and tries to parse that as an UTF-8 encoded JSON text, returning the resulting reference. Croaks on error.

This function call is functionally identical to:

$perl_scalar = JSON::PP->new->utf8->decode($json_text)

Except being faster.

JSON::PP::is_bool

$is_boolean = JSON::PP::is_bool($scalar)

Returns true if the passed scalar represents either JSON::PP::true or JSON::PP::false, two constants that act like 1 and 0 respectively and are also used to represent JSON true and false in Perl strings.

On perl 5.36 and above, will also return true when given one of perl’s standard boolean values, such as the result of a comparison.

See MAPPING, below, for more information on how JSON values are mapped to Perl.

OBJECT-ORIENTED INTERFACE

This section is also taken from JSON::XS.

The object oriented interface lets you configure your own encoding or decoding style, within the limits of supported formats.

new

$json = JSON::PP->new

Creates a new JSON::PP object that can be used to de/encode JSON strings. All boolean flags described below are by default disabled (with the exception of allow_nonref, which defaults to enabled since version 4.0).

The mutators for flags all return the JSON::PP object again and thus calls can be chained:

my $json = JSON::PP->new->utf8->space_after->encode({a => [1,2]}) => {“a”: [1, 2]}

ascii

$json = $json->ascii([$enable]) $enabled = $json->get_ascii

If $enable is true (or missing), then the encode method will not generate characters outside the code range 0..127 (which is ASCII). Any Unicode characters outside that range will be escaped using either a single \uXXXX (BMP characters) or a double \uHHHH\uLLLLL escape sequence, as per RFC4627. The resulting encoded JSON text can be treated as a native Unicode string, an ascii-encoded, latin1-encoded or UTF-8 encoded string, or any other superset of ASCII.

If $enable is false, then the encode method will not escape Unicode characters unless required by the JSON syntax or other flags. This results in a faster and more compact format.

See also the section ENCODING/CODESET FLAG NOTES later in this document.

The main use for this flag is to produce JSON texts that can be transmitted over a 7-bit channel, as the encoded JSON texts will not contain any 8 bit characters.

JSON::PP->new->ascii(1)->encode([chr 0x10401]) => ["������"]

latin1

$json = $json->latin1([$enable]) $enabled = $json->get_latin1

If $enable is true (or missing), then the encode method will encode the resulting JSON text as latin1 (or iso-8859-1), escaping any characters outside the code range 0..255. The resulting string can be treated as a latin1-encoded JSON text or a native Unicode string. The decode method will not be affected in any way by this flag, as decode by default expects Unicode, which is a strict superset of latin1.

If $enable is false, then the encode method will not escape Unicode characters unless required by the JSON syntax or other flags.

See also the section ENCODING/CODESET FLAG NOTES later in this document.

The main use for this flag is efficiently encoding binary data as JSON text, as most octets will not be escaped, resulting in a smaller encoded size. The disadvantage is that the resulting JSON text is encoded in latin1 (and must correctly be treated as such when storing and transferring), a rare encoding for JSON. It is therefore most useful when you want to store data structures known to contain binary data efficiently in files or databases, not when talking to other JSON encoders/decoders.

JSON::PP->new->latin1->encode (["\x{89}\x{abc}"] => ["\x{89}\u0abc"] # (perl syntax, U+abc escaped, U+89 not)

utf8

$json = $json->utf8([$enable]) $enabled = $json->get_utf8

If $enable is true (or missing), then the encode method will encode the JSON result into UTF-8, as required by many protocols, while the decode method expects to be handled an UTF-8-encoded string. Please note that UTF-8-encoded strings do not contain any characters outside the range 0..255, they are thus useful for bytewise/binary I/O. In future versions, enabling this option might enable autodetection of the UTF-16 and UTF-32 encoding families, as described in RFC4627.

If $enable is false, then the encode method will return the JSON string as a (non-encoded) Unicode string, while decode expects thus a Unicode string. Any decoding or encoding (e.g. to UTF-8 or UTF-16) needs to be done yourself, e.g. using the Encode module.

See also the section ENCODING/CODESET FLAG NOTES later in this document.

Example, output UTF-16BE-encoded JSON:

use Encode; $jsontext = encode “UTF-16BE”, JSON::PP->new->encode ($object);

Example, decode UTF-32LE-encoded JSON:

use Encode; $object = JSON::PP->new->decode (decode “UTF-32LE”, $jsontext);

pretty

$json = $json->pretty([$enable])

This enables (or disables) all of the indent, space_before and space_after (and in the future possibly more) flags in one call to generate the most readable (or most compact) form possible.

indent

$json = $json->indent([$enable]) $enabled = $json->get_indent

If $enable is true (or missing), then the encode method will use a multiline format as output, putting every array member or object/hash key-value pair into its own line, indenting them properly.

If $enable is false, no newlines or indenting will be produced, and the resulting JSON text is guaranteed not to contain any newlines.

This setting has no effect when decoding JSON texts.

The default indent space length is three. You can use indent_length to change the length.

space_before

$json = $json->space_before([$enable]) $enabled = $json->get_space_before

If $enable is true (or missing), then the encode method will add an extra optional space before the : separating keys from values in JSON objects.

If $enable is false, then the encode method will not add any extra space at those places.

This setting has no effect when decoding JSON texts. You will also most likely combine this setting with space_after.

Example, space_before enabled, space_after and indent disabled:

{“key” :“value”}

space_after

$json = $json->space_after([$enable]) $enabled = $json->get_space_after

If $enable is true (or missing), then the encode method will add an extra optional space after the : separating keys from values in JSON objects and extra whitespace after the , separating key-value pairs and array members.

If $enable is false, then the encode method will not add any extra space at those places.

This setting has no effect when decoding JSON texts.

Example, space_before and indent disabled, space_after enabled:

{“key”: “value”}

relaxed

$json = $json->relaxed([$enable]) $enabled = $json->get_relaxed

If $enable is true (or missing), then decode will accept some extensions to normal JSON syntax (see below). encode will not be affected in anyway. Be aware that this option makes you accept invalid JSON texts as if they were valid!. I suggest only to use this option to parse application-specific files written by humans (configuration files, resource files etc.)

If $enable is false (the default), then decode will only accept valid JSON texts.

Currently accepted extensions are:

  • list items can have an end-comma JSON separates array elements and key-value pairs with commas. This can be annoying if you write JSON texts manually and want to be able to quickly append elements, so this extension accepts comma at the end of such items not just between them: [ 1, 2, <- this comma not normally allowed ] { “k1”: “v1”, “k2”: “v2”, <- this comma not normally allowed }

  • shell-style ‘#’-comments Whenever JSON allows whitespace, shell-style comments are additionally allowed. They are terminated by the first carriage-return or line-feed character, after which more white-space and comments are allowed. [ 1, # this comment not allowed in JSON # neither this one… ]

  • C-style multiple-line ‘/* */’-comments (JSON::PP only) Whenever JSON allows whitespace, C-style multiple-line comments are additionally allowed. Everything between /* and */ is a comment, after which more white-space and comments are allowed. [ 1, /* this comment not allowed in JSON */ /* neither this one… */ ]

  • C++-style one-line ‘//’-comments (JSON::PP only) Whenever JSON allows whitespace, C++-style one-line comments are additionally allowed. They are terminated by the first carriage-return or line-feed character, after which more white-space and comments are allowed. [ 1, // this comment not allowed in JSON // neither this one… ]

  • literal ASCII TAB characters in strings Literal ASCII TAB characters are now allowed in strings (and treated as ). [ “Hello World”, “Hello<TAB>World”, # literal <TAB> would not normally be allowed ]

canonical

$json = $json->canonical([$enable]) $enabled = $json->get_canonical

If $enable is true (or missing), then the encode method will output JSON objects by sorting their keys. This is adding a comparatively high overhead.

If $enable is false, then the encode method will output key-value pairs in the order Perl stores them (which will likely change between runs of the same script, and can change even within the same run from 5.18 onwards).

This option is useful if you want the same data structure to be encoded as the same JSON text (given the same overall settings). If it is disabled, the same hash might be encoded differently even if contains the same data, as key-value pairs have no inherent ordering in Perl.

This setting has no effect when decoding JSON texts.

This setting has currently no effect on tied hashes.

allow_nonref

$json = $json->allow_nonref([$enable]) $enabled = $json->get_allow_nonref

Unlike other boolean options, this opotion is enabled by default beginning with version 4.0.

If $enable is true (or missing), then the encode method can convert a non-reference into its corresponding string, number or null JSON value, which is an extension to RFC4627. Likewise, decode will accept those JSON values instead of croaking.

If $enable is false, then the encode method will croak if it isn’t passed an arrayref or hashref, as JSON texts must either be an object or array. Likewise, decode will croak if given something that is not a JSON object or array.

Example, encode a Perl scalar as JSON value without enabled allow_nonref, resulting in an error:

JSON::PP->new->allow_nonref(0)->encode (“Hello, World!”) => hash- or arrayref expected…

allow_unknown

$json = $json->allow_unknown([$enable]) $enabled = $json->get_allow_unknown

If $enable is true (or missing), then encode will not throw an exception when it encounters values it cannot represent in JSON (for example, filehandles) but instead will encode a JSON null value. Note that blessed objects are not included here and are handled separately by c<allow_blessed>.

If $enable is false (the default), then encode will throw an exception when it encounters anything it cannot encode as JSON.

This option does not affect decode in any way, and it is recommended to leave it off unless you know your communications partner.

allow_blessed

$json = $json->allow_blessed([$enable]) $enabled = $json->get_allow_blessed

See OBJECT SERIALISATION for details.

If $enable is true (or missing), then the encode method will not barf when it encounters a blessed reference that it cannot convert otherwise. Instead, a JSON null value is encoded instead of the object.

If $enable is false (the default), then encode will throw an exception when it encounters a blessed object that it cannot convert otherwise.

This setting has no effect on decode.

convert_blessed

$json = $json->convert_blessed([$enable]) $enabled = $json->get_convert_blessed

See OBJECT SERIALISATION for details.

If $enable is true (or missing), then encode, upon encountering a blessed object, will check for the availability of the TO_JSON method on the object’s class. If found, it will be called in scalar context and the resulting scalar will be encoded instead of the object.

The TO_JSON method may safely call die if it wants. If TO_JSON returns other blessed objects, those will be handled in the same way. TO_JSON must take care of not causing an endless recursion cycle (== crash) in this case. The name of TO_JSON was chosen because other methods called by the Perl core (== not by the user of the object) are usually in upper case letters and to avoid collisions with any to_json function or method.

If $enable is false (the default), then encode will not consider this type of conversion.

This setting has no effect on decode.

allow_tags

$json = $json->allow_tags([$enable]) $enabled = $json->get_allow_tags

See OBJECT SERIALISATION for details.

If $enable is true (or missing), then encode, upon encountering a blessed object, will check for the availability of the FREEZE method on the object’s class. If found, it will be used to serialise the object into a nonstandard tagged JSON value (that JSON decoders cannot decode).

It also causes decode to parse such tagged JSON values and deserialise them via a call to the THAW method.

If $enable is false (the default), then encode will not consider this type of conversion, and tagged JSON values will cause a parse error in decode, as if tags were not part of the grammar.

boolean_values

$json->boolean_values([$false, $true]) ($false, $true) = $json->get_boolean_values

By default, JSON booleans will be decoded as overloaded $JSON::PP::false and $JSON::PP::true objects.

With this method you can specify your own boolean values for decoding - on decode, JSON false will be decoded as a copy of $false, and JSON true will be decoded as $true (copy here is the same thing as assigning a value to another variable, i.e. $copy = $false).

This is useful when you want to pass a decoded data structure directly to other serialisers like YAML, Data::MessagePack and so on.

Note that this works only when you decode. You can set incompatible boolean objects (like boolean), but when you encode a data structure with such boolean objects, you still need to enable convert_blessed (and add a TO_JSON method if necessary).

Calling this method without any arguments will reset the booleans to their default values.

get_boolean_values will return both $false and $true values, or the empty list when they are set to the default.

core_bools

$json->core_bools([$enable]);

If $enable is true (or missing), then decode, will produce standard perl boolean values. Equivalent to calling:

$json->boolean_values(!!1, !!0)

get_core_bools will return true if this has been set. On perl 5.36, it will also return true if the boolean values have been set to perl’s core booleans using the boolean_values method.

The methods unblessed_bool and get_unblessed_bool are provided as aliases for compatibility with Cpanel::JSON::XS.

filter_json_object

$json = $json->filter_json_object([$coderef])

When $coderef is specified, it will be called from decode each time it decodes a JSON object. The only argument is a reference to the newly-created hash. If the code references returns a single scalar (which need not be a reference), this value (or rather a copy of it) is inserted into the deserialised data structure. If it returns an empty list (NOTE: not undef, which is a valid scalar), the original deserialised hash will be inserted. This setting can slow down decoding considerably.

When $coderef is omitted or undefined, any existing callback will be removed and decode will not change the deserialised hash in any way.

Example, convert all JSON objects into the integer 5:

my $js = JSON::PP->new->filter_json_object(sub { 5 }); # returns [5] $js->decode([{}]); # returns 5 $js->decode({“a”:1, “b”:2});

filter_json_single_key_object

$json = $json->filter_json_single_key_object($key [=> $coderef])

Works remotely similar to filter_json_object, but is only called for JSON objects having a single key named $key.

This $coderef is called before the one specified via filter_json_object, if any. It gets passed the single value in the JSON object. If it returns a single value, it will be inserted into the data structure. If it returns nothing (not even undef but the empty list), the callback from filter_json_object will be called next, as if no single-key callback were specified.

If $coderef is omitted or undefined, the corresponding callback will be disabled. There can only ever be one callback for a given key.

As this callback gets called less often then the filter_json_object one, decoding speed will not usually suffer as much. Therefore, single-key objects make excellent targets to serialise Perl objects into, especially as single-key JSON objects are as close to the type-tagged value concept as JSON gets (it’s basically an ID/VALUE tuple). Of course, JSON does not support this in any way, so you need to make sure your data never looks like a serialised Perl hash.

Typical names for the single object key are _ _class_whatever_ _, or $_ _dollars_are_rarely_used_ _$ or }ugly_brace_placement, or even things like _ _class_md5sum(classname)_ _, to reduce the risk of clashing with real hashes.

Example, decode JSON objects of the form { "_ _widget_ _" => <id> } into the corresponding $WIDGET{<id>} object:

# return whatever is in $WIDGET{5}: JSON::PP ->new ->filter_json_single_key_object (_ _widget_ _ => sub { $WIDGET{ $_[0] } }) ->decode ({"_ _widget_ _": 5) # this can be used with a TO_JSON method in some “widget” class # for serialisation to json: sub WidgetBase::TO_JSON { my ($self) = @_; unless ($self->{id}) { $self->{id} = ..get..some..id..; $WIDGET{$self->{id}} = $self; } { _ _widget_ _ => $self->{id} } }

shrink

$json = $json->shrink([$enable]) $enabled = $json->get_shrink

If $enable is true (or missing), the string returned by encode will be shrunk (i.e. downgraded if possible).

The actual definition of what shrink does might change in future versions, but it will always try to save space at the expense of time.

If $enable is false, then JSON::PP does nothing.

max_depth

$json = $json->max_depth([$maximum_nesting_depth]) $max_depth = $json->get_max_depth

Sets the maximum nesting level (default 512) accepted while encoding or decoding. If a higher nesting level is detected in JSON text or a Perl data structure, then the encoder and decoder will stop and croak at that point.

Nesting level is defined by number of hash- or arrayrefs that the encoder needs to traverse to reach a given point or the number of { or [ characters without their matching closing parenthesis crossed to reach a given character in a string.

Setting the maximum depth to one disallows any nesting, so that ensures that the object is only a single hash/object or array.

If no argument is given, the highest possible setting will be used, which is rarely useful.

See SECURITY CONSIDERATIONS in JSON::XS for more info on why this is useful.

max_size

$json = $json->max_size([$maximum_string_size]) $max_size = $json->get_max_size

Set the maximum length a JSON text may have (in bytes) where decoding is being attempted. The default is 0, meaning no limit. When decode is called on a string that is longer then this many bytes, it will not attempt to decode the string but throw an exception. This setting has no effect on encode (yet).

If no argument is given, the limit check will be deactivated (same as when 0 is specified).

See SECURITY CONSIDERATIONS in JSON::XS for more info on why this is useful.

encode

$json_text = $json->encode($perl_scalar)

Converts the given Perl value or data structure to its JSON representation. Croaks on error.

decode

$perl_scalar = $json->decode($json_text)

The opposite of encode: expects a JSON text and tries to parse it, returning the resulting simple scalar or reference. Croaks on error.

decode_prefix

($perl_scalar, $characters) = $json->decode_prefix($json_text)

This works like the decode method, but instead of raising an exception when there is trailing garbage after the first JSON object, it will silently stop parsing there and return the number of characters consumed so far.

This is useful if your JSON texts are not delimited by an outer protocol and you need to know where the JSON text ends.

JSON::PP->new->decode_prefix ("[1] the tail") => ([1], 3)

FLAGS FOR JSON::PP ONLY

The following flags and properties are for JSON::PP only. If you use any of these, you can’t make your application run faster by replacing JSON::PP with JSON::XS. If you need these and also speed boost, you might want to try Cpanel::JSON::XS, a fork of JSON::XS by Reini Urban, which supports some of these (with a different set of incompatibilities). Most of these historical flags are only kept for backward compatibility, and should not be used in a new application.

allow_singlequote

$json = $json->allow_singlequote([$enable]) $enabled = $json->get_allow_singlequote

If $enable is true (or missing), then decode will accept invalid JSON texts that contain strings that begin and end with single quotation marks. encode will not be affected in any way. Be aware that this option makes you accept invalid JSON texts as if they were valid!. I suggest only to use this option to parse application-specific files written by humans (configuration files, resource files etc.)

If $enable is false (the default), then decode will only accept valid JSON texts.

$json->allow_singlequote->decode(qq|{“foo”:bar}|); $json->allow_singlequote->decode(qq|{foo:“bar”}|); $json->allow_singlequote->decode(qq|{foo:bar}|);

allow_barekey

$json = $json->allow_barekey([$enable]) $enabled = $json->get_allow_barekey

If $enable is true (or missing), then decode will accept invalid JSON texts that contain JSON objects whose names don’t begin and end with quotation marks. encode will not be affected in any way. Be aware that this option makes you accept invalid JSON texts as if they were valid!. I suggest only to use this option to parse application-specific files written by humans (configuration files, resource files etc.)

If $enable is false (the default), then decode will only accept valid JSON texts.

$json->allow_barekey->decode(qq|{foo:“bar”}|);

allow_bignum

$json = $json->allow_bignum([$enable]) $enabled = $json->get_allow_bignum

If $enable is true (or missing), then decode will convert big integers Perl cannot handle as integer into Math::BigInt objects and convert floating numbers into Math::BigFloat objects. encode will convert Math::BigInt and Math::BigFloat objects into JSON numbers.

$json->allow_nonref->allow_bignum; $bigfloat = $json->decode(2.000000000000000000000000001); print $json->encode($bigfloat); # => 2.000000000000000000000000001

See also MAPPING.

loose

$json = $json->loose([$enable]) $enabled = $json->get_loose

If $enable is true (or missing), then decode will accept invalid JSON texts that contain unescaped [�-"\] characters. encode will not be affected in any way. Be aware that this option makes you accept invalid JSON texts as if they were valid!. I suggest only to use this option to parse application-specific files written by humans (configuration files, resource files etc.)

If $enable is false (the default), then decode will only accept valid JSON texts.

$json->loose->decode(qq|[“abc def”]|);

escape_slash

$json = $json->escape_slash([$enable]) $enabled = $json->get_escape_slash

If $enable is true (or missing), then encode will explicitly escape slash (solidus; U+002F) characters to reduce the risk of XSS (cross site scripting) that may be caused by </script> in a JSON text, with the cost of bloating the size of JSON texts.

This option may be useful when you embed JSON in HTML, but embedding arbitrary JSON in HTML (by some HTML template toolkit or by string interpolation) is risky in general. You must escape necessary characters in correct order, depending on the context.

decode will not be affected in any way.

indent_length

$json = $json->indent_length($number_of_spaces) $length = $json->get_indent_length

This option is only useful when you also enable indent or pretty.

JSON::XS indents with three spaces when you encode (if requested by indent or pretty), and the number cannot be changed. JSON::PP allows you to change/get the number of indent spaces with these mutator/accessor. The default number of spaces is three (the same as JSON::XS), and the acceptable range is from 0 (no indentation; it’d be better to disable indentation by indent(0)) to 15.

sort_by

$json = $json->sort_by($code_ref) $json = $json->sort_by($subroutine_name)

If you just want to sort keys (names) in JSON objects when you encode, enable canonical option (see above) that allows you to sort object keys alphabetically.

If you do need to sort non-alphabetically for whatever reasons, you can give a code reference (or a subroutine name) to sort_by, then the argument will be passed to Perl’s sort built-in function.

As the sorting is done in the JSON::PP scope, you usually need to prepend JSON::PP:: to the subroutine name, and the special variables $a and $b used in the subrontine used by sort function.

Example:

my %ORDER = (id => 1, class => 2, name => 3); $json->sort_by(sub { ($ORDER{$JSON::PP::a} // 999) <=> ($ORDER{$JSON::PP::b} // 999) or $JSON::PP::a cmp $JSON::PP::b }); print $json->encode([ {name => CPAN, id => 1, href => http://cpan.org} ]); # [{“id”:1,“name”:“CPAN”,“href”:“http://cpan.org”}]

Note that sort_by affects all the plain hashes in the data structure. If you need finer control, tie necessary hashes with a module that implements ordered hash (such as Hash::Ordered and Tie::IxHash). canonical and sort_by don’t affect the key order in tied hashes.

use Hash::Ordered; tie my %hash, Hash::Ordered, (name => CPAN, id => 1, href => http://cpan.org); print $json->encode([\hash]); # [{“name”:“CPAN”,“id”:1,“href”:“http://cpan.org”}] # order is kept

INCREMENTAL PARSING

This section is also taken from JSON::XS.

In some cases, there is the need for incremental parsing of JSON texts. While this module always has to keep both JSON text and resulting Perl data structure in memory at one time, it does allow you to parse a JSON stream incrementally. It does so by accumulating text until it has a full JSON object, which it then can decode. This process is similar to using decode_prefix to see if a full JSON object is available, but is much more efficient (and can be implemented with a minimum of method calls).

JSON::PP will only attempt to parse the JSON text once it is sure it has enough text to get a decisive result, using a very simple but truly incremental parser. This means that it sometimes won’t stop as early as the full parser, for example, it doesn’t detect mismatched parentheses. The only thing it guarantees is that it starts decoding as soon as a syntactically valid JSON text has been seen. This means you need to set resource limits (e.g. max_size) to ensure the parser will stop parsing in the presence if syntax errors.

The following methods implement this incremental parser.

incr_parse

$json->incr_parse( [$string] ) # void context $obj_or_undef = $json->incr_parse( [$string] ) # scalar context @obj_or_empty = $json->incr_parse( [$string] ) # list context

This is the central parsing function. It can both append new text and extract objects from the stream accumulated so far (both of these functions are optional).

If $string is given, then this string is appended to the already existing JSON fragment stored in the $json object.

After that, if the function is called in void context, it will simply return without doing anything further. This can be used to add more text in as many chunks as you want.

If the method is called in scalar context, then it will try to extract exactly one JSON object. If that is successful, it will return this object, otherwise it will return undef. If there is a parse error, this method will croak just as decode would do (one can then use incr_skip to skip the erroneous part). This is the most common way of using the method.

And finally, in list context, it will try to extract as many objects from the stream as it can find and return them, or the empty list otherwise. For this to work, there must be no separators (other than whitespace) between the JSON objects or arrays, instead they must be concatenated back-to-back. If an error occurs, an exception will be raised as in the scalar context case. Note that in this case, any previously-parsed JSON texts will be lost.

Example: Parse some JSON arrays/objects in a given string and return them.

my @objs = JSON::PP->new->incr_parse ("[5][7][1,2]");

incr_text

$lvalue_string = $json->incr_text

This method returns the currently stored JSON fragment as an lvalue, that is, you can manipulate it. This only works when a preceding call to incr_parse in scalar context successfully returned an object. Under all other circumstances you must not call this function (I mean it. although in simple tests it might actually work, it will fail under real world conditions). As a special exception, you can also call this method before having parsed anything.

That means you can only use this function to look at or manipulate text before or after complete JSON objects, not while the parser is in the middle of parsing a JSON object.

This function is useful in two cases: a) finding the trailing text after a JSON object or b) parsing multiple JSON objects separated by non-JSON text (such as commas).

incr_skip

$json->incr_skip

This will reset the state of the incremental parser and will remove the parsed text from the input buffer so far. This is useful after incr_parse died, in which case the input buffer and incremental parser state is left unchanged, to skip the text parsed so far and to reset the parse state.

The difference to incr_reset is that only text until the parse error occurred is removed.

incr_reset

$json->incr_reset

This completely resets the incremental parser, that is, after this call, it will be as if the parser had never parsed anything.

This is useful if you want to repeatedly parse JSON objects and want to ignore any trailing data, which means you have to reset the parser after each successful decode.

MAPPING

Most of this section is also taken from JSON::XS.

This section describes how JSON::PP maps Perl values to JSON values and vice versa. These mappings are designed to do the right thing in most circumstances automatically, preserving round-tripping characteristics (what you put in comes out as something equivalent).

For the more enlightened: note that in the following descriptions, lowercase perl refers to the Perl interpreter, while uppercase Perl refers to the abstract Perl language itself.

JSON -> PERL

object
A JSON object becomes a reference to a hash in Perl. No ordering of object keys is preserved (JSON does not preserve object key ordering itself).

array
A JSON array becomes a reference to an array in Perl.

string
A JSON string becomes a string scalar in Perl - Unicode codepoints in JSON are represented by the same codepoints in the Perl string, so no manual decoding is necessary.

number
A JSON number becomes either an integer, numeric (floating point) or string scalar in perl, depending on its range and any fractional parts. On the Perl level, there is no difference between those as Perl handles all the conversion details, but an integer may take slightly less memory and might represent more values exactly than floating point numbers. If the number consists of digits only, JSON::PP will try to represent it as an integer value. If that fails, it will try to represent it as a numeric (floating point) value if that is possible without loss of precision. Otherwise it will preserve the number as a string value (in which case you lose roundtripping ability, as the JSON number will be re-encoded to a JSON string). Numbers containing a fractional or exponential part will always be represented as numeric (floating point) values, possibly at a loss of precision (in which case you might lose perfect roundtripping ability, but the JSON number will still be re-encoded as a JSON number). Note that precision is not accuracy - binary floating point values cannot represent most decimal fractions exactly, and when converting from and to floating point, JSON::PP only guarantees precision up to but not including the least significant bit. When allow_bignum is enabled, big integer values and any numeric values will be converted into Math::BigInt and Math::BigFloat objects respectively, without becoming string scalars or losing precision.

true, false
These JSON atoms become JSON::PP::true and JSON::PP::false, respectively. They are overloaded to act almost exactly like the numbers 1 and 0. You can check whether a scalar is a JSON boolean by using the JSON::PP::is_bool function.

null
A JSON null atom becomes undef in Perl.

shell-style comments ("# text")
As a nonstandard extension to the JSON syntax that is enabled by the relaxed setting, shell-style comments are allowed. They can start anywhere outside strings and go till the end of the line.

tagged values ("(tag)value").
Another nonstandard extension to the JSON syntax, enabled with the allow_tags setting, are tagged values. In this implementation, the tag must be a perl package/class name encoded as a JSON string, and the value must be a JSON array encoding optional constructor arguments. See OBJECT SERIALISATION, below, for details.

PERL -> JSON

The mapping from Perl to JSON is slightly more difficult, as Perl is a truly typeless language, so we can only guess which JSON type is meant by a Perl value.

hash references
Perl hash references become JSON objects. As there is no inherent ordering in hash keys (or JSON objects), they will usually be encoded in a pseudo-random order. JSON::PP can optionally sort the hash keys (determined by the canonical flag and/or sort_by property), so the same data structure will serialise to the same JSON text (given same settings and version of JSON::PP), but this incurs a runtime overhead and is only rarely useful, e.g. when you want to compare some JSON text against another for equality.

array references
Perl array references become JSON arrays.

other references
Other unblessed references are generally not allowed and will cause an exception to be thrown, except for references to the integers 0 and 1, which get turned into false and true atoms in JSON. You can also use JSON::PP::false and JSON::PP::true to improve readability. to_json [�, JSON::PP::true] # yields [false,true]

JSON::PP::true, JSON::PP::false
These special values become JSON true and JSON false values, respectively. You can also use \1 and directly if you want.

JSON::PP::null
This special value becomes JSON null.

blessed objects
Blessed objects are not directly representable in JSON, but JSON::PP allows various ways of handling objects. See OBJECT SERIALISATION, below, for details.

simple scalars
Simple Perl scalars (any scalar that is not a reference) are the most difficult objects to encode: JSON::PP will encode undefined scalars as JSON null values, scalars that have last been used in a string context before encoding as JSON strings, and anything else as number value: # dump as number encode_json [2] # yields [2] encode_json [-3.0e17] # yields [-3e+17] my $value = 5; encode_json [$value] # yields [5] # used as string, so dump as string print $value; encode_json [$value] # yields [“5”] # undef becomes null encode_json [undef] # yields [null] You can force the type to be a JSON string by stringifying it: my $x = 3.1; # some variable containing a number “$x”; # stringified $x .= “”; # another, more awkward way to stringify print $x; # perl does it for you, too, quite often # (but for older perls) You can force the type to be a JSON number by numifying it: my $x = “3”; # some variable containing a string $x += 0; # numify it, ensuring it will be dumped as a number $x *= 1; # same thing, the choice is yours. You can not currently force the type in other, less obscure, ways. Since version 2.91_01, JSON::PP uses a different number detection logic that converts a scalar that is possible to turn into a number safely. The new logic is slightly faster, and tends to help people who use older perl or who want to encode complicated data structure. However, this may results in a different JSON text from the one JSON::XS encodes (and thus may break tests that compare entire JSON texts). If you do need the previous behavior for compatibility or for finer control, set PERL_JSON_PP_USE_B environmental variable to true before you use JSON::PP (or JSON.pm). Note that numerical precision has the same meaning as under Perl (so binary to decimal conversion follows the same rules as in Perl, which can differ to other languages). Also, your perl interpreter might expose extensions to the floating point numbers of your platform, such as infinities or NaN’s - these cannot be represented in JSON, and it is an error to pass those in. JSON::PP (and JSON::XS) trusts what you pass to encode method (or encode_json function) is a clean, validated data structure with values that can be represented as valid JSON values only, because it’s not from an external data source (as opposed to JSON texts you pass to decode or decode_json, which JSON::PP considers tainted and doesn’t trust). As JSON::PP doesn’t know exactly what you and consumers of your JSON texts want the unexpected values to be (you may want to convert them into null, or to stringify them with or without normalisation (string representation of infinities/NaN may vary depending on platforms), or to croak without conversion), you’re advised to do what you and your consumers need before you encode, and also not to numify values that may start with values that look like a number (including infinities/NaN), without validating.

OBJECT SERIALISATION

As JSON cannot directly represent Perl objects, you have to choose between a pure JSON representation (without the ability to deserialise the object automatically again), and a nonstandard extension to the JSON syntax, tagged values.

SERIALISATION

What happens when JSON::PP encounters a Perl object depends on the allow_blessed, convert_blessed, allow_tags and allow_bignum settings, which are used in this order:

  1. In this case, JSON::PP creates a tagged JSON value, using a nonstandard extension to the JSON syntax. This works by invoking the FREEZE method on the object, with the first argument being the object to serialise, and the second argument being the constant string JSON to distinguish it from other serialisers. The FREEZE method can return any number of values (i.e. zero or more). These values and the paclkage/classname of the object will then be encoded as a tagged JSON value in the following format: (“classname”)[FREEZE return values…] e.g.: (“URI”)[“http://www.google.com/"] (“MyDate”)[2013,10,29] (“ImageData::JPEG”)[“Z3…VlCg==”] For example, the hypothetical My::Object FREEZE method might use the objects type and id members to encode the object: sub My::Object::FREEZE { my ($self, $serialiser) = @_; ($self->{type}, $self->{id}) }

  2. In this case, the TO_JSON method of the object is invoked in scalar context. It must return a single scalar that can be directly encoded into JSON. This scalar replaces the object in the JSON text. For example, the following TO_JSON method will convert all URI objects to JSON strings when serialised. The fact that these values originally were URI objects is lost. sub URI::TO_JSON { my ($uri) = @_; $uri->as_string }

  3. The object will be serialised as a JSON number value.

  4. The object will be serialised as a JSON null value.

  5. If none of the settings are enabled or the respective methods are missing, JSON::PP throws an exception.

DESERIALISATION

For deserialisation there are only two cases to consider: either nonstandard tagging was used, in which case allow_tags decides, or objects cannot be automatically be deserialised, in which case you can use postprocessing or the filter_json_object or filter_json_single_key_object callbacks to get some real objects our of your JSON.

This section only considers the tagged value case: a tagged JSON object is encountered during decoding and allow_tags is disabled, a parse error will result (as if tagged values were not part of the grammar).

If allow_tags is enabled, JSON::PP will look up the THAW method of the package/classname used during serialisation (it will not attempt to load the package as a Perl module). If there is no such method, the decoding will fail with an error.

Otherwise, the THAW method is invoked with the classname as first argument, the constant string JSON as second argument, and all the values from the JSON array (the values originally returned by the FREEZE method) as remaining arguments.

The method must then return the object. While technically you can return any Perl scalar, you might have to enable the allow_nonref setting to make that work in all cases, so better return an actual blessed reference.

As an example, let’s implement a THAW function that regenerates the My::Object from the FREEZE example earlier:

sub My::Object::THAW { my ($class, $serialiser, $type, $id) = @_; $class->new (type => $type, id => $id) }

ENCODING/CODESET FLAG NOTES

This section is taken from JSON::XS.

The interested reader might have seen a number of flags that signify encodings or codesets - utf8, latin1 and ascii. There seems to be some confusion on what these do, so here is a short comparison:

utf8 controls whether the JSON text created by encode (and expected by decode) is UTF-8 encoded or not, while latin1 and ascii only control whether encode escapes character values outside their respective codeset range. Neither of these flags conflict with each other, although some combinations make less sense than others.

Care has been taken to make all flags symmetrical with respect to encode and decode, that is, texts encoded with any combination of these flag values will be correctly decoded when the same flags are used - in general, if you use different flag settings while encoding vs. when decoding you likely have a bug somewhere.

Below comes a verbose discussion of these flags. Note that a codeset is simply an abstract set of character-codepoint pairs, while an encoding takes those codepoint numbers and encodes them, in our case into octets. Unicode is (among other things) a codeset, UTF-8 is an encoding, and ISO-8859-1 (= latin 1) and ASCII are both codesets and encodings at the same time, which can be confusing.

“utf8” flag disabled
When utf8 is disabled (the default), then encode/decode generate and expect Unicode strings, that is, characters with high ordinal Unicode values (> 255) will be encoded as such characters, and likewise such characters are decoded as-is, no changes to them will be done, except (re-)interpreting them as Unicode codepoints or Unicode characters, respectively (to Perl, these are the same thing in strings unless you do funny/weird/dumb stuff). This is useful when you want to do the encoding yourself (e.g. when you want to have UTF-16 encoded JSON texts) or when some other layer does the encoding for you (for example, when printing to a terminal using a filehandle that transparently encodes to UTF-8 you certainly do NOT want to UTF-8 encode your data first and have Perl encode it another time).

“utf8” flag enabled
If the utf8-flag is enabled, encode/decode will encode all characters using the corresponding UTF-8 multi-byte sequence, and will expect your input strings to be encoded as UTF-8, that is, no character of the input string must have any value > 255, as UTF-8 does not allow that. The utf8 flag therefore switches between two modes: disabled means you will get a Unicode string in Perl, enabled means you get an UTF-8 encoded octet/binary string in Perl.

“latin1” or “ascii” flags enabled
With latin1 (or ascii) enabled, encode will escape characters with ordinal values > 255 (> 127 with ascii) and encode the remaining characters as specified by the utf8 flag. If utf8 is disabled, then the result is also correctly encoded in those character sets (as both are proper subsets of Unicode, meaning that a Unicode string with all character values < 256 is the same thing as a ISO-8859-1 string, and a Unicode string with all character values < 128 is the same thing as an ASCII string in Perl). If utf8 is enabled, you still get a correct UTF-8-encoded string, regardless of these flags, just some more characters will be escaped using \uXXXX then before. Note that ISO-8859-1-encoded strings are not compatible with UTF-8 encoding, while ASCII-encoded strings are. That is because the ISO-8859-1 encoding is NOT a subset of UTF-8 (despite the ISO-8859-1 codeset being a subset of Unicode), while ASCII is. Surprisingly, decode will ignore these flags and so treat all input values as governed by the utf8 flag. If it is disabled, this allows you to decode ISO-8859-1- and ASCII-encoded strings, as both strict subsets of Unicode. If it is enabled, you can correctly decode UTF-8 encoded strings. So neither latin1 nor ascii are incompatible with the utf8 flag - they only govern when the JSON output engine escapes a character or not. The main use for latin1 is to relatively efficiently store binary data as JSON, at the expense of breaking compatibility with most JSON decoders. The main use for ascii is to force the output to not contain characters with values > 127, which means you can interpret the resulting string as UTF-8, ISO-8859-1, ASCII, KOI8-R or most about any character set and 8-bit-encoding, and still get the same data structure back. This is useful when your channel for JSON transfer is not 8-bit clean or the encoding might be mangled in between (e.g. in mail), and works because ASCII is a proper subset of most 8-bit and multibyte encodings in use in the world.

BUGS

Please report bugs on a specific behavior of this module to RT or GitHub issues (preferred):

<https://github.com/makamaka/JSON-PP/issues>

<https://rt.cpan.org/Public/Dist/Display.html?Queue=JSON-PP>

As for new features and requests to change common behaviors, please ask the author of JSON::XS (Marc Lehmann, <schmorp[at]schmorp.de>) first, by email (important!), to keep compatibility among JSON.pm backends.

Generally speaking, if you need something special for you, you are advised to create a new module, maybe based on JSON::Tiny, which is smaller and written in a much cleaner way than this module.

SEE ALSO

The json_pp command line utility for quick experiments.

JSON::XS, Cpanel::JSON::XS, and JSON::Tiny for faster alternatives. JSON and JSON::MaybeXS for easy migration.

JSON::backportPP::Compat5005 and JSON::backportPP::Compat5006 for older perl users.

RFC4627 (<http://www.ietf.org/rfc/rfc4627.txt>)

RFC7159 (<http://www.ietf.org/rfc/rfc7159.txt>)

RFC8259 (<http://www.ietf.org/rfc/rfc8259.txt>)

AUTHOR

Makamaka Hannyaharamitu, <makamaka[at]cpan.org>

CURRENT MAINTAINER

Kenichi Ishigaki, <ishigaki[at]cpan.org>

COPYRIGHT AND LICENSE

Copyright 2007-2016 by Makamaka Hannyaharamitu

Most of the documentation is taken from JSON::XS by Marc Lehmann

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

455 - Linux cli command XtGrabButton

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGrabButton and provides detailed information about the command XtGrabButton, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGrabButton.

NAME 🖥️ XtGrabButton 🖥️

manage grabs

SYNTAX

#include <X11/Intrinsic.h>

void XtGrabKey(Widget widget, KeyCode keycode, Modifiers modifiers, Boolean owner_events, int pointer_mode, int keyboard_mode);

void XtUngrabKey(Widget widget, KeyCode keycode, Modifiers modifiers);

int XtGrabKeyboard(Widget widget, Boolean owner_events, int pointer_mode, int keyboard_mode, Time time);

void XtUngrabKeyboard(Widget widget, Time time);

void XtGrabButton(Widget widget, int button, Modifiers modifiers, Boolean owner_events, unsigned int event_mask, int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor);

void XtUngrabButton(Widget widget, unsigned button, Modifiers modifiers);

int XtGrabPointer(Widget widget, Boolean owner_events, unsigned int event_mask, int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor, Time time);

void XtUngrabPointer(Widget widget, Time time);

ARGUMENTS

widget
Specifies the widget in whose window the grab will occur. Must be of class Core or a subclass thereof.

keycode

modifiers

owner_events

pointer_mode

keyboard_mode

time

button

confine_to

cursor
Specifies arguments to the associated Xlib function call.

DESCRIPTION

XtGrabKey calls XGrabKey specifying the widget’s window as the grab window if the widget is realized. The remaining arguments are exactly as for XGrabKey. If the widget is not realized, or is later unrealized, the call to XGrabKey will be performed (again) when the widget is realized and its window becomes mapped. In the future, if XtDispatchEvent is called with a KeyPress event matching the specified keycode and modifiers (which may be AnyKey or AnyModifier, respectively) for the widget’s window, the Intrinsics will call XtUngrabKeyboard with the timestamp from the KeyPress event if either of the following conditions is true:

  • There is a modal cascade and the widget is not in the active subset of the cascade and the keyboard was not previously grabbed, or

  • XFilterEvent returns True.

XtUngrabKey calls XUngrabKey specifying the widget’s window as the ungrab window if the widget is realized. The remaining arguments are exactly as for XUngrabKey. If the widget is not realized, XtUngrabKey removes a deferred XtGrabKey request, if any, for the specified widget, keycode, and modifiers.

If the specified widget is realized XtGrabKeyboard calls XGrabKeyboard specifying the widget’s window as the grab window. The remaining arguments and return value are exactly as for XGrabKeyboard. If the widget is not realized, XtGrabKeyboard immediately returns GrabNotViewable. No future ungrab is implied by XtGrabKeyboard.

XtUngrabKeyboard calls XUngrabKeyboard with the specified time.

XtGrabButton calls XGrabButton specifying the widget’s window as the grab window if the widget is realized. The remaining arguments are exactly as for XGrabButton. If the widget is not realized, or is later unrealized, the call to XGrabButton will be performed (again) when the widget is realized and its window becomes mapped. In the future, if XtDispatchEvent is called with a ButtonPress event matching the specified button and modifiers (which may be AnyButton or AnyModifier, respectively) for the widget’s window, the Intrinsics will call XtUngrabPointer with the timestamp from the ButtonPress event if either of the following conditions is true:

  • There is a modal cascade and the widget is not in the active subset of the cascade and the pointer was not previously grabbed, or

  • XFilterEvent returns True.

XtUngrabButton calls XUngrabButton specifying the widget’s window as the ungrab window if the widget is realized. The remaining arguments are exactly as for XUngrabButton. If the widget is not realized, XtUngrabButton removes a deferred XtGrabButton request, if any, for the specified widget, button, and modifiers.

XtGrabPointer calls XGrabPointer specifying the widget’s window as the grab window. The remaining arguments and return value are exactly as for XGrabPointer. If the widget is not realized, XtGrabPointer immediately returns GrabNotViewable. No future ungrab is implied by XtGrabPointer.

XtUngrabPointer calls XUngrabPointer with the specified time.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

456 - Linux cli command Image_ExifTool_EXEpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_EXEpm and provides detailed information about the command Image_ExifTool_EXEpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_EXEpm.

NAME 🖥️ Image_ExifTool_EXEpm 🖥️

Read executable file meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to extract meta information from various types of Windows, MacOS and Unix executable and library files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.openwatcom.org/ftp/devel/docs/pecoff.pdf>

<http://support.microsoft.com/kb/65122>

<http://www.opensource.apple.com>

<http://www.skyfree.org/linux/references/ELF_Format.pdf>

<http://msdn.microsoft.com/en-us/library/ms809762.aspx>

<http://code.google.com/p/pefile/>

<http://www.codeproject.com/KB/DLL/showver.aspx>

SEE ALSO

“EXE Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

457 - Linux cli command mblen

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mblen and provides detailed information about the command mblen, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mblen.

NAME 🖥️ mblen 🖥️

determine number of bytes in next multibyte character

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int mblen(const char s[.n], size_t n);

DESCRIPTION

If s is not NULL, the mblen() function inspects at most n bytes of the multibyte string starting at s and extracts the next complete multibyte character. It uses a static anonymous shift state known only to the mblen() function. If the multibyte character is not the null wide character, it returns the number of bytes that were consumed from s. If the multibyte character is the null wide character, it returns 0.

If the n bytes starting at s do not contain a complete multibyte character, mblen() returns -1. This can happen even if n is greater than or equal to MB_CUR_MAX, if the multibyte string contains redundant shift sequences.

If the multibyte string starting at s contains an invalid multibyte sequence before the next complete character, mblen() also returns -1.

If s is NULL, the mblen() function resets the shift state, known to only this function, to the initial state, and returns nonzero if the encoding has nontrivial shift state, or zero if the encoding is stateless.

RETURN VALUE

The mblen() function returns the number of bytes parsed from the multibyte sequence starting at s, if a non-null wide character was recognized. It returns 0, if a null wide character was recognized. It returns -1, if an invalid multibyte sequence was encountered or if it couldn’t parse a complete multibyte character.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mblen()

Thread safetyMT-Unsafe race

VERSIONS

The function mbrlen(3) provides a better interface to the same functionality.

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of mblen() depends on the LC_CTYPE category of the current locale.

SEE ALSO

mbrlen(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

458 - Linux cli command nl_langinfo

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command nl_langinfo and provides detailed information about the command nl_langinfo, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the nl_langinfo.

NAME 🖥️ nl_langinfo 🖥️

query language and locale information

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <langinfo.h>
char *nl_langinfo(nl_item item);
char *nl_langinfo_l(nl_item item, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

nl_langinfo_l():

    Since glibc 2.24:
        _POSIX_C_SOURCE >= 200809L
    glibc 2.23 and earlier:
        _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The nl_langinfo() and nl_langinfo_l() functions provide access to locale information in a more flexible way than localeconv(3). nl_langinfo() returns a string which is the value corresponding to item in the program’s current global locale. nl_langinfo_l() returns a string which is the value corresponding to item for the locale identified by the locale object locale, which was previously created by newlocale(3). Individual and additional elements of the locale categories can be queried. setlocale(3) needs to be executed with proper arguments before.

Examples for the locale elements that can be specified in item using the constants defined in <langinfo.h> are:

CODESET (LC_CTYPE)
Return a string with the name of the character encoding used in the selected locale, such as “UTF-8”, “ISO-8859-1”, or “ANSI_X3.4-1968” (better known as US-ASCII). This is the same string that you get with “locale charmap”. For a list of character encoding names, try “locale -m” (see locale(1)).

D_T_FMT (LC_TIME)
Return a string that can be used as a format string for strftime(3) to represent time and date in a locale-specific way (%c conversion specification).

D_FMT (LC_TIME)
Return a string that can be used as a format string for strftime(3) to represent a date in a locale-specific way (%x conversion specification).

T_FMT (LC_TIME)
Return a string that can be used as a format string for strftime(3) to represent a time in a locale-specific way (%X conversion specification).

AM_STR (LC_TIME)
Return a string that represents affix for ante meridiem (before noon, “AM”) time. (Used in %p strftime(3) conversion specification.)

PM_STR (LC_TIME)
Return a string that represents affix for post meridiem (before midnight, “PM”) time. (Used in %p strftime(3) conversion specification.)

T_FMT_AMPM (LC_TIME)
Return a string that can be used as a format string for strftime(3) to represent a time in a.m. or p.m. notation in a locale-specific way (%r conversion specification).

ERA (LC_TIME)
Return era description, which contains information about how years are counted and displayed for each era in a locale. Each era description segment shall have the format:

direction:offset:start_date:end_date:era_name:era_format

according to the definitions below:

direction
Either a “+” or a “-” character. The “+” means that years increase from the start_date towards the end_date, “-” means the opposite.

offset
The epoch year of the start_date.

start_date
A date in the form yyyy/mm/dd, where yyyy, mm, and dd are the year, month, and day numbers respectively of the start of the era.

end_date
The ending date of the era, in the same format as the start_date, or one of the two special values “-*” (minus infinity) or “+*” (plus infinity).

era_name
The name of the era, corresponding to the %EC strftime(3) conversion specification.

era_format
The format of the year in the era, corresponding to the %EY strftime(3) conversion specification.

Era description segments are separated by semicolons. Most locales do not define this value. Examples of locales that do define this value are the Japanese and Thai locales.

ERA_D_T_FMT (LC_TIME)
Return a string that can be used as a format string for strftime(3) for alternative representation of time and date in a locale-specific way (%Ec conversion specification).

ERA_D_FMT (LC_TIME)
Return a string that can be used as a format string for strftime(3) for alternative representation of a date in a locale-specific way (%Ex conversion specification).

ERA_T_FMT (LC_TIME)
Return a string that can be used as a format string for strftime(3) for alternative representation of a time in a locale-specific way (%EX conversion specification).

DAY_{1–7} (LC_TIME)
Return name of the n-th day of the week. [Warning: this follows the US convention DAY_1 = Sunday, not the international convention (ISO 8601) that Monday is the first day of the week.] (Used in %A strftime(3) conversion specification.)

ABDAY_{1–7} (LC_TIME)
Return abbreviated name of the n-th day of the week. (Used in %a strftime(3) conversion specification.)

MON_{1–12} (LC_TIME)
Return name of the n-th month. (Used in %B strftime(3) conversion specification.)

ABMON_{1–12} (LC_TIME)
Return abbreviated name of the n-th month. (Used in %b strftime(3) conversion specification.)

RADIXCHAR (LC_NUMERIC)
Return radix character (decimal dot, decimal comma, etc.).

THOUSEP (LC_NUMERIC)
Return separator character for thousands (groups of three digits).

YESEXPR (LC_MESSAGES)
Return a regular expression that can be used with the regex(3) function to recognize a positive response to a yes/no question.

NOEXPR (LC_MESSAGES)
Return a regular expression that can be used with the regex(3) function to recognize a negative response to a yes/no question.

CRNCYSTR (LC_MONETARY)
Return the currency symbol, preceded by “-” if the symbol should appear before the value, “+” if the symbol should appear after the value, or “.” if the symbol should replace the radix character.

The above list covers just some examples of items that can be requested. For a more detailed list, consult The GNU C Library Reference Manual.

RETURN VALUE

On success, these functions return a pointer to a string which is the value corresponding to item in the specified locale.

If no locale has been selected by setlocale(3) for the appropriate category, nl_langinfo() return a pointer to the corresponding string in the “C” locale. The same is true of nl_langinfo_l() if locale specifies a locale where langinfo data is not defined.

If item is not valid, a pointer to an empty string is returned.

The pointer returned by these functions may point to static data that may be overwritten, or the pointer itself may be invalidated, by a subsequent call to nl_langinfo(), nl_langinfo_l(), or setlocale(3). The same statements apply to nl_langinfo_l() if the locale object referred to by locale is freed or modified by freelocale(3) or newlocale(3).

POSIX specifies that the application may not modify the string returned by these functions.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

nl_langinfo()

Thread safetyMT-Safe locale

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SUSv2.

NOTES

The behavior of nl_langinfo_l() is undefined if locale is the special locale object LC_GLOBAL_LOCALE or is not a valid locale object handle.

EXAMPLES

The following program sets the character type and the numeric locale according to the environment and queries the terminal character set and the radix character.

#include <langinfo.h>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    setlocale(LC_CTYPE, "");
    setlocale(LC_NUMERIC, "");
    printf("%s

“, nl_langinfo(CODESET)); printf("%s “, nl_langinfo(RADIXCHAR)); exit(EXIT_SUCCESS); }

SEE ALSO

locale(1), localeconv(3), setlocale(3), charsets(7), locale(7)

The GNU C Library Reference Manual

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

459 - Linux cli command svcerr_weakauth

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command svcerr_weakauth and provides detailed information about the command svcerr_weakauth, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the svcerr_weakauth.

NAME 🖥️ svcerr_weakauth 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

460 - Linux cli command fnmatcham

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fnmatcham and provides detailed information about the command fnmatcham, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fnmatcham.

NAME 🖥️ fnmatcham 🖥️

compare a string against a filename wildcard

SYNOPSIS

@load “fnmatch”

result = fnmatch(pattern, string, flags)

DESCRIPTION

The fnmatch extension provides an AWK interface to the fnmatch(3) routine. It adds a single function named fnmatch(), one predefined variable (FNM_NOMATCH), and an array of flag values named FNM.

The first argument is the filename wildcard to match, the second is the filename string, and the third is either zero, or the bitwise OR of one or more of the flags in the FNM array.

The return value is zero on success, FNM_NOMATCH if the string did not match the pattern, or a different non-zero value if an error occurred.

The flags are follows:

FNM[“CASEFOLD”]
Corresponds to the FNM_CASEFOLD flag as defined in fnmatch(3).

FNM[“FILE_NAME”]
Corresponds to the FNM_FILE_NAME flag as defined in fnmatch(3).

FNM[“LEADING_DIR”]
Corresponds to the FNM_LEADING_DIR flag as defined in fnmatch(3).

FNM[“NOESCAPE”]
Corresponds to the FNM_NOESCAPE flag as defined in fnmatch(3).

FNM[“PATHNAME”]
Corresponds to the FNM_PATHNAME flag as defined in fnmatch(3).

FNM[“PERIOD”]
Corresponds to the FNM_PERIOD flag as defined in fnmatch(3).

NOTES

Nothing prevents AWK code from changing the predefined variable FNM_NOMATCH, but doing so may cause strange results.

EXAMPLE

@load "fnmatch"
...
flags = or(FNM["PERIOD"], FNM["NOESCAPE"])
if (fnmatch("*.a", "foo.c", flags) == FNM_NOMATCH)
	print "no match"

SEE ALSO

GAWK: Effective AWK Programming, filefuncs(3am), fork(3am), inplace(3am), ordchr(3am), readdir(3am), readfile(3am), revoutput(3am), rwarray(3am), time(3am).

fnmatch(3).

AUTHOR

Arnold Robbins, [email protected].

COPYING PERMISSIONS

Copyright © 2012, 2013, 2018, Free Software Foundation, Inc.

Permission is granted to make and distribute verbatim copies of this manual page provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to process this file through troff and print the results, provided the printed document carries copying permission notice identical to this one except for the removal of this paragraph (this paragraph not being relevant to the printed manual page).

Permission is granted to copy and distribute modified versions of this manual page under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual page into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

461 - Linux cli command Moose_Manualpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Manualpm and provides detailed information about the command Moose_Manualpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Manualpm.

NAME 🖥️ Moose_Manualpm 🖥️

What is Moose, and how do I use it?

VERSION

version 2.2207

WHAT IS MOOSE?

Moose is a complete object system for Perl 5. Consider any modern object-oriented language (which Perl 5 definitely isn’t). It provides keywords for attribute declaration, object construction, inheritance, and maybe more. These keywords are part of the language, and you don’t care how they are implemented.

Moose aims to do the same thing for Perl 5 OO. We can’t actually create new keywords, but we do offer “sugar” that looks a lot like them. More importantly, with Moose, you define your class declaratively, without needing to know about blessed hashrefs, accessor methods, and so on.

With Moose, you can concentrate on the logical structure of your classes, focusing on “what” rather than “how”. A class definition with Moose reads like a list of very concise English sentences.

Moose is built on top of Class::MOP, a meta-object protocol (aka MOP). Using the MOP, Moose provides complete introspection for all Moose-using classes. This means you can ask classes about their attributes, parents, children, methods, etc., all using a well-defined API. The MOP abstracts away the symbol table, looking at @ISA vars, and all the other crufty Perl tricks we know and love(?).

Moose is based in large part on the Perl 6 object system, as well as drawing on the best ideas from CLOS, Smalltalk, and many other languages.

WHY MOOSE?

Moose makes Perl 5 OO both simpler and more powerful. It encapsulates Perl 5 power tools in high-level declarative APIs which are easy to use. Best of all, you don’t need to be a wizard to use it.

But if you want to dig about in the guts, Moose lets you do that too, by using and extending its powerful introspection API.

AN EXAMPLE

package Person; use Moose; has first_name => ( is => rw, isa => Str, ); has last_name => ( is => rw, isa => Str, ); no Moose; _ _PACKAGE_ _->meta->make_immutable;

This is a complete and usable class definition!

package User; use DateTime; use Moose; extends Person; has password => ( is => rw, isa => Str, ); has last_login => ( is => rw, isa => DateTime, handles => { date_of_last_login => date }, ); sub login { my $self = shift; my $pw = shift; return 0 if $pw ne $self->password; $self->last_login( DateTime->now() ); return 1; } no Moose; _ _PACKAGE_ _->meta->make_immutable;

When ready to instantiate your class in an application, use it in the “traditional” Perl manner:

use User; my $user = User->new( first_name => Example, last_name => User, password => letmein, ); $user->login(letmein); say $user->date_of_last_login;

We’ll leave the line-by-line explanation of this code to other documentation, but you can see how Moose reduces common OO idioms to simple declarative constructs.

TABLE OF CONTENTS

This manual consists of a number of documents.

Moose::Manual::Concepts
Introduces Moose concepts, and contrasts them against “old school” Perl 5 OO.

Moose::Manual::Unsweetened
Shows two example classes, each written first with Moose and then with “plain old Perl 5”.

Moose::Manual::Classes
How do you make use of Moose in your classes? Now that I’m a Moose, how do I subclass something?

Moose::Manual::Attributes
Attributes are a core part of the Moose OO system. An attribute is a piece of data that an object has. Moose has a lot of attribute-related features!

Moose::Manual::Delegation
Delegation is a powerful way to make use of attributes which are themselves objects.

Moose::Manual::Construction
Learn how objects are built in Moose, and in particular about the BUILD and BUILDARGS methods. Also covers object destruction with DEMOLISH.

Moose::Manual::MethodModifiers
A method modifier lets you say “before calling method X, do this first”, or “wrap method X in this code”. Method modifiers are particularly handy in roles and with attribute accessors.

Moose::Manual::Roles
A role is something a class does (like “Debuggable” or “Printable”). Roles provide a way of adding behavior to classes that is orthogonal to inheritance.

Moose::Manual::Types
Moose’s type system lets you strictly define what values an attribute can contain.

Moose::Manual::MOP
Moose’s meta API system lets you ask classes about their parents, children, methods, attributes, etc.

Moose::Manual::MooseX
This document describes a few of the most useful Moose extensions on CPAN.

Moose::Manual::BestPractices
Moose has a lot of features, and there’s definitely more than one way to do it. However, we think that picking a subset of these features and using them consistently makes everyone’s life easier.

Moose::Manual::FAQ
Frequently asked questions about Moose.

Moose::Manual::Resources
Links to various tutorials, videos, blogs, presentations, interviews, etc…

Moose::Manual::Contributing
Interested in hacking on Moose? Read this.

Moose::Manual::Delta
This document details backwards-incompatibilities and other major changes to Moose.

JUSTIFICATION

If you’re still asking yourself “Why do I need this?”, then this section is for you.

Another object system!?!?
Yes, we know there are many, many ways to build objects in Perl 5, many of them based on inside-out objects and other such things. Moose is different because it is not a new object system for Perl 5, but instead an extension of the existing object system. Moose is built on top of Class::MOP, which is a metaclass system for Perl 5. This means that Moose not only makes building normal Perl 5 objects better, but it also provides the power of metaclass programming.

Is this for real? Or is this just an experiment?
Moose is based on the prototypes and experiments Stevan did for the Perl 6 meta-model. However, Moose is NOT an experiment or prototype; it is for real.

Is this ready for use in production?
Yes. Moose has been used successfully in production environments by many people and companies. There are Moose applications which have been in production with little or no issue now for years. We consider it highly stable and we are committed to keeping it stable. Of course, in the end, you need to make this call yourself. If you have any questions or concerns, please feel free to email Stevan or the [email protected] list, or just stop by irc.perl.org#moose and ask away.

Is Moose just Perl 6 in Perl 5?
No. While Moose is very much inspired by Perl 6, it is not itself Perl 6. Instead, it is an OO system for Perl 5. Stevan built Moose because he was tired of writing the same old boring Perl 5 OO code, and drooling over Perl 6 OO. So instead of switching to Ruby, he wrote Moose :)

Wait, post modern, I thought it was just modern?
Stevan read Larry Wall’s talk from the 1999 Linux World entitled “Perl, the first postmodern computer language” in which he talks about how he picked the features for Perl because he thought they were cool and he threw out the ones that he thought sucked. This got him thinking about how we have done the same thing in Moose. For Moose, we have “borrowed” features from Perl 6, CLOS (LISP), Smalltalk, Java, BETA, OCaml, Ruby and more, and the bits we didn’t like (cause they sucked) we tossed aside. So for this reason (and a few others) Stevan has re-dubbed Moose a postmodern object system. Nuff Said.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

462 - Linux cli command Net_DBus_Tutorialpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Tutorialpm and provides detailed information about the command Net_DBus_Tutorialpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Tutorialpm.

NAME 🖥️ Net_DBus_Tutorialpm 🖥️

tutorials on the Perl DBus APIs

DESCRIPTION

This section includes tutorials on the Perl DBus APIs. Current topics include providing a service, by exporting objects to the bus, and accessing a service, by calling objects on the bus.

Net::DBus::Tutorial::ExportingObjects
This tutorial covers how to provide a service to the bus by exporting objects. The topics covered include basics of creating objects and methods, emitting signals, exporting properties, registering services for automatic activation.

Net::DBus::Tutorial::UsingObjects
This tutorial cover how to use a service provided on the bus by another application. The topics covered include the basics of calling methods on remote objects, explicitly calling methods in particular interfaces, listening for signals. NB This tutorial is yet to be written.

SEE ALSO

Net::DBus, Net::DBus::Object, Net::DBus::RemoteObject, <http://freedesktop.org/>

AUTHORS

Daniel P. Berrange <mailto:[email protected]>

COPYRIGHT

Copyright 2005 Daniel P. Berrange

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

463 - Linux cli command POD2_JA_MIME_Charsetpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command POD2_JA_MIME_Charsetpm and provides detailed information about the command POD2_JA_MIME_Charsetpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the POD2_JA_MIME_Charsetpm.

NAME 🖥️ POD2_JA_MIME_Charsetpm 🖥️

MIME のためのキャラクタセット情報

SYNOPSIS

use MIME::Charset: $charset = MIME::Charset->new(“euc-jp”);

キャラクタセット情報の取得:

$benc = $charset->body_encoding; # 例 “Q” $cset = $charset->as_string; # 例 “US-ASCII” $henc = $charset->header_encoding; # 例 “S” $cset = $charset->output_charset; # 例 “ISO-2022-JP”

テキストデータの変換:

($text, $charset, $encoding) = $charset->header_encode( “��Ū����Ū”. “��ʪ���ϴ�”, Charset => euc-jp); # …例えば (<変換ずみ文字列>, “ISO-2022-JP”, “B”) を返す。 ($text, $charset, $encoding) = $charset->body_encode( “Collectioneur path�tiquement “, Charset => latin1); # …例えば (<元の文字列>, “ISO-8859-1”, “QUOTED-PRINTABLE”) を返す。 $len = $charset->encoded_header_len( “Perl言語”, Charset => “utf-8”, Encoding => “b”); # …例えば 28 を返す。

モジュール既定値の操作:

MIME::Charset::alias(“csEUCKR”, “euc-kr”); MIME::Charset::default(“iso-8859-1”); MIME::Charset::fallback(“us-ascii”);

非OO関数 (近い将来に廃止):

use MIME::Charset qw(:info); $benc = body_encoding(“iso-8859-2”); # “Q” $cset = canonical_charset(“ANSI X3.4-1968”); # “US-ASCII” $henc = header_encoding(“utf-8”); # “S” $cset = output_charset(“shift_jis”); # “ISO-2022-JP” use MIME::Charset qw(:trans); ($text, $charset, $encoding) = header_encode( “��Ū����Ū”. “��ʪ���ϴ�”, “euc-jp”); # …(<変換されたテキスト>, “ISO-2022-JP”, “B”) を返す。 ($text, $charset, $encoding) = body_encode( “Collectioneur path�tiquement “. “�clectique de d�chets”, “latin1”); # …(<元のテキスト>, “ISO-8859-1”, “QUOTED-PRINTABLE”) を返す。 $len = encoded_header_len( “Perl言語”, “b”, “utf-8”); # 28

DESCRIPTION

MIME::Charset は、インターネット上での MIME メッセージに用いるキャラクタセットの情報を提供する。

定義

キャラクタセット とは、MIME での ``character set’’ のことで、 オクテットの列を文字の列に変換する方法を指す。 これは、ISO/IEC における ``符号化文字集合’’ (CCS) と ``文字符号化法’’ (CES) の両方の概念を包含する。

エンコーディング とは、MIME でのそれのことで、 メッセージ本体やメッセージヘッダ本体を印字可能な US-ASCII 文字の列として表現する方法を指す。

コンストラクタ

$charset = MIME::Charset->new([CHARSET [, OPTS]])
キャラクタセットオブジェクトを作成して返す。 OPTS には次の対を指定できる。 NOTE: Unicode/マルチバイト対応が有効になっていないとき (USE_ENCODE 参照) は、 変換を行わないので、次のオプションは効果を持たない。

Mapping => MAPTYPE
キャラクタセット名に対して実際に使うマッピングの拡張をするかどうか。 "EXTENDED" は拡張マッピングを使う。 "STANDARD" は標準化されている厳密なマッピングを使う。 既定は "EXTENDED"

キャラクタセット情報の取得

$charset->body_encoding

body_encoding CHARSET

CHARSET のメッセージ本体で推奨される伝送エンコーディングを取得する。 返値は "B" (BASE64)、"Q" (QUOTED-PRINTABLE)、"S" (どちらか短いほう)、 undef (伝送エンコードしなくてよい — 7BIT か 8BIT) のいずれか。これはメッセージヘッダのエンコーディングとは違うこともある。

$charset->as_string

canonical_charset CHARSET

キャラクタセットの正規の名前を取得する。

$charset->decoder
キャラクタセットを Unicode に復号するのに使う Encode::Encoding オブジェクトを返す。 キャラクタセットが指定されていなかったか、当モジュールの知らないキャラクタセットであった場合は、undef 値を返す。

$charset->dup
キャラクタセットオブジェクトを複写する。

$charset->encoder([CHARSET])
インターネット上の MIME メッセージで使うことを推奨される互換キャラクタセットで符号化するのに使う Encode::Encoding オブジェクトを返す。 CHARSET 引数を指定した場合、$charset オブジェクトの符号化器 (および出力キャラクタセット名) を、CHARSET のそれに置き換える。 つまり、$charset オブジェクトは元のキャラクタセットから新たな CHARSET への変換器となる。

$charset->header_encoding

header_encoding CHARSET

CHARSET のメッセージヘッダで推奨されるエンコーディング法を取得する。 返値は "B""Q""S" (どちらか短くなるほう)、 undef (エンコードしなくてよい) のいずれか。これはメッセージ本体のエンコーディングとは違うこともある。

$charset->output_charset

output_charset CHARSET

指定した CHARSET と互換で、インターネット上の MIME メッセージで使うことを推奨されるキャラクタセット名を (当モジュールが知っていれば) 取得する。 Unicode/マルチバイト対応が有効になっていないとき (USE_ENCODE 参照) は、 この関数は単に canonical_charset の結果を返す。

テキストデータの変換

$charset->body_encode(STRING [, OPTS])

body_encode STRING, CHARSET [, OPTS]

STRING を (必要なら) 変換したデータと、 メッセージ本体で推奨される伝送エンコーディングを取得する。 CHARSET は STRING を符号化しているキャラクタセット。 OPTS には以下の対を指定できる。 NOTE: Unicode/マルチバイト対応が有効になっていないとき (USE_ENCODE 参照) は、 変換を行わないので、以下のオプションは効果を持たない。

Detect7bit => YESNO
CHARSET がないとき、7ビットのキャラクタセットを自動認識しようとする。 既定は "YES"

Replacement => REPLACEMENT
エラー処理法の指定。エラー処理 参照。

3要素のリスト (変換ずみの文字列, 出力のキャラクタセット, 伝送エンコーディング) が返る。 伝送エンコーディング"BASE64""QUOTED-PRINTABLE""7BIT""8BIT" のいずれか。出力のキャラクタセット が決定できず、 変換ずみの文字列 が ASCII以外のバイトを含むときは、 出力のキャラクタセットundef伝送エンコーディング"BASE64" となる。 出力のキャラクタセット"US-ASCII" となるのは、文字列が ASCII以外のバイトを含まないときに限る。

$charset->decode(STRING [,CHECK])
STRING を Unicode 文字列に復号する。 NOTE: Unicode/マルチバイト対応が有効になっていないとき (USE_ENCODE 参照) は、 この機能を実行すると死ぬ。

detect_7bit_charset STRING
文字列 STRING を符号化している7 ビットキャラクタセットを推測する。 STRING が8ビットのバイトを含むときは undef を返す。 そうでないとき、キャラクタセットが不明なら初期キャラクタセットを返す。

$charset->encode(STRING [, CHECK])
STRING (Unicode 文字列または普通の文字列) を、 元のキャラクタセットと互換でインターネット上の MIME メッセージで使うことを推奨されるキャラクタセットを (当モジュールが知っていれば) 使って、符号化する。 元のキャラクタセットと互換キャラクタセットが同じでも、 文字列を Unicode に復号してから符号化することに注意。 NOTE: Unicode/マルチバイト対応が有効になっていないとき (USE_ENCODE 参照) は、 この機能を実行すると死ぬ。

$charset->encoded_header_len(STRING [, ENCODING])

encoded_header_len STRING, ENCODING, CHARSET

STRING をメッセージヘッダとしてエンコードしたときの長さ (行折りはしないとして) を取得する。 ENCODING は "B""Q""S" ("B""Q" のうち短くなるほう) のいずれか。

$charset->header_encode(STRING [, OPTS])

header_encode STRING, CHARSET [, OPTS]

STRING を (必要なら) 変換したデータと、 メッセージヘッダで推奨されるエンコーディング法を取得する。 CHARSET は STRING を符号化しているキャラクタセット。 OPTS には以下の対を指定できる。 NOTE: Unicode/マルチバイト対応が有効になっていないとき (USE_ENCODE 参照) は、 変換を行わないので、以下のオプションは効果を持たない。

Detect7bit => YESNO
CHARSET がないとき、7ビットのキャラクタセットを自動認識しようとする。 既定は "YES"

Replacement => REPLACEMENT
エラー処理法の指定。エラー処理 参照。

3要素のリスト (変換ずみの文字列, 出力のキャラクタセット, エンコーディング法) が返る。 エンコーディング法"B""Q"undef (エンコードしなくてよい) のいずれか。 出力のキャラクタセット が決定できず、変換ずみの文字列 が ASCII以外のバイトを含むときは、出力のキャラクタセット"8BIT" (これはキャラクタセットの名前ではなく、符号化が不可能なデータを表す特殊値) で エンコーディング法undef (エンコードするべきではない) となる。 出力のキャラクタセット"US-ASCII" となるのは、文字列が ASCII以外のバイトを含まないときに限る。

$charset->undecode(STRING [,CHECK])
Unicode 文字列 string を、 $charset の入力キャラクタセットを使って文字列に変換する。 これは $charset->decoder->encode() と同等である。 NOTE: Unicode/マルチバイト対応が有効になっていないとき (USE_ENCODE 参照) は、 この機能を実行すると死ぬ。

モジュール既定値の操作

alias ALIAS [, CHARSET]
canonical_charset で正規名を決定するためのキャラクタセットの別名を取得/設定する。 CHARSET があって偽でないとき、ALIAS が CHARSET の別名に登録される。 さもなければ、別名に変更はない。いずれの場合でも、 現在 ALIAS が登録されているキャラクタセットを返す。

default [CHARSET]
既定キャラクタセットを取得/設定する。 既定キャラクタセットとは、 当モジュールで、処理のためのキャラクタセットが不明なときに用いるキャラクタセット。 当モジュールを利用するモジュールでは、 処理のためのキャラクタセットが不明なときや暗黙の既定値が必要なとき、 このキャラクタセットを使うことを推奨する。 これは既定では "US-ASCII"。 CHARSET があって偽でなければ、それを既定キャラクタセットに設定する。 さもなければ、既定キャラクタセットは変わらない。いずれの場合でも、 現在の既定キャラクタセットを返す。 NOTE: 既定キャラクタセットは変更するべきではない

fallback [CHARSET]
予備キャラクタセットを取得/設定する。 予備キャラクタセットとは、 当モジュールで、指定されたキャラクタセットでの変換が失敗し、 エラー処理法に "FALLBACK" が指定されていたときに用いるキャラクタセット。 当モジュールを利用するモジュールでは、 キャラクタセット変換が失敗するときに最終手段としてこのキャラクタセットを使ってもよい。 これは既定では "UTF-8"。 CHARSET があって偽でなければ、それを予備キャラクタセットに設定する。 CHARSET が "NONE" であれば、予備キャラクタセットを未定にする。 さもなければ、予備キャラクタセットは変わらない。いずれの場合でも、 現在の予備キャラクタセットを返す。 NOTE: 予備キャラクタセットに "US-ASCII" を指定する価値はある。 変換の結果は、キャラクタセット情報がないときも可読となる。

recommended CHARSET [, HEADERENC, BODYENC [, ENCCHARSET]]
キャラクタセットの特性を取得/設定する。 必須でない引数があってそのどれかが偽でなければ、 その引数で CHARSET の特性を設定する。さもなければ、特性は変わらない。 いずれの場合でも、CHARSET の現在の特性を 3 要素のリスト (HEADERENC, BODYENC, ENCCHARSET) として返す。 HEADERENC はメッセージヘッダで推奨されるエンコーディング法。 "B""Q""S" (どちらか短くなるほう)、 undef (エンコードしなくてよい) を指定できる。 BODYENC はメッセージ本体で推奨される伝送エンコーディング。 "B""Q""S" (どちらか短くなるほう)、undef (伝送エンコードしなくてよい) を指定できる。 ENCCHARSET は、指定した CHARSET と互換で、インターネット上の MIME メッセージで使うことを推奨されるキャラクタセット名。 変換が必要ない (または当モジュールが適当なキャラクタセットを知らない) ときは、 ENCCHARSET は undefNOTE: この関数の今後の版では、ほかにも必須でない引数をとれるようになるかもしれない (たとえば、文字幅、行分割の挙動などについての属性)。 そのため、返値の形式も変わるかもしれない。個々の特性を取得するには header_encoding、body_encoding、output_charset を使ってほしい。

定数

USE_ENCODE
Unicode/マルチバイト対応フラグ。 Unicode とマルチバイトへの対応が有効になっているときは、空でない文字列が設定されている。 現在、このフラグは Perl 5.7.3 以降で空でなく、それより以前の Perl では空の文字列。

エラー処理

body_encode と header_encode の Replacement オプションには以下のものを指定できる:

“DEFAULT”
不正な文字を置き換え文字で置き換える。 UCM に基づく符号化器を持つキャラクタセットでは <subchar> を使うことがある。

“FALLBACK”
予備キャラクタセット を使って "DEFAULT" 方式をやってみる (fallback 参照)。 予備キャラクタセットが未定で変換がエラーを起こしたときは、 コードはエラーメッセージを出力して死ぬ。

“CROAK”
コードはエラーメッセージを出力してすぐ死ぬ。 したがって、本当にエラーで死なせたくなければ eval{} で致命的エラーを受け止めなければいけない。 "STRICT" でも同じ。

“PERLQQ”

“HTMLCREF”

“XMLCREF”

Encode モジュールで定義している FB_PERLQQFB_HTMLCREFFB_XMLCREF の方式を使う。

数値
数値を指定することもできる。 詳細は Handling Malformed Data in Encode を見てほしい。

エラー処理法が指定されないか、上記以外のエラー処理法が指定されたときは、 "DEFAULT" とみなす。

設定ファイル

オプションのパラメタの組み込み既定値は、設定ファイル MIME/Charset/Defaults.pm で変更することができる。 詳しくは MIME/Charset/Defaults.pm.sample を読んでほしい。

VERSION

$VERSION 変数を見てほしい。

このモジュールの開発版が <http://hatuka.nezumi.nu/repos/MIME-Charset/> にある。

非互換な変更

-   

**new()** メソッドは CHARSET 引数を指定しなくてもオブジェクトを返すようになった。
-   

encoded-word に含まれる文字種を RFC 2047 の 5 (3) 節のとおりにした。 **encoded\_header\_len()** メソッドの返値も変わる。
-   

**body\_encoding()** メソッドも `"S"` を返せるようになった。

-   **body\_encode()** メソッドの UTF-8 に対する返値のエンコーディング要素は、 これまでのリリースでは `"BASE64"` に固定だったが、`"QUOTED-PRINTABLE"` になることがある。

SEE ALSO

Multipurpose Internet Mail Extensions (MIME).

AUTHOR

Hatuka*nezumi - IKEDA Soji <hatuka(at)nezumi.nu>

COPYRIGHT

Copyright (C) 2006-2017 Hatuka*nezumi - IKEDA Soji. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

464 - Linux cli command roundup

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command roundup and provides detailed information about the command roundup, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the roundup.

NAME 🖥️ roundup 🖥️

round up in steps

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/param.h>
roundup(x, step);

DESCRIPTION

This macro rounds x to the nearest multiple of step that is not less than x.

It is typically used for rounding up a pointer to align it or increasing a buffer to be allocated.

This API is not designed to be generic, and doesn’t work in some cases that are not important for the typical use cases described above. See CAVEATS.

RETURN VALUE

This macro returns the rounded value.

STANDARDS

None.

CAVEATS

The arguments may be evaluated more than once.

x should be nonnegative, and step should be positive.

If x + step would overflow or wrap around, the behavior is undefined.

SEE ALSO

ceil(3), floor(3), lrint(3), rint(3), lround(3), round(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

465 - Linux cli command zip_source_begin_write_cloning

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_begin_write_cloning and provides detailed information about the command zip_source_begin_write_cloning, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_begin_write_cloning.

libzip (-lzip)

The functions

and

prepare

for writing. Usually this involves creating temporary files or allocating buffers.

preserves the first

bytes of the original file. This is done efficiently, and writes to

won’t overwrite the original data until

is called.

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

was added in libzip 1.0.

was added in libzip 1.4.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

466 - Linux cli command mq_receive

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mq_receive and provides detailed information about the command mq_receive, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mq_receive.

NAME 🖥️ mq_receive 🖥️

receive a message from a message queue

LIBRARY

Real-time library (librt, -lrt)

SYNOPSIS

#include <mqueue.h>
ssize_t mq_receive(mqd_t mqdes, char msg_ptr[.msg_len],
 size_t msg_len, unsigned int *msg_prio);
#include <time.h>
#include <mqueue.h>
ssize_t mq_timedreceive(mqd_t mqdes, char *restrict msg_ptr[.msg_len],
 size_t msg_len, unsigned int *restrict msg_prio,
 const struct timespec *restrict abs_timeout);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

mq_timedreceive():

    _POSIX_C_SOURCE >= 200112L

DESCRIPTION

mq_receive() removes the oldest message with the highest priority from the message queue referred to by the message queue descriptor mqdes, and places it in the buffer pointed to by msg_ptr. The msg_len argument specifies the size of the buffer pointed to by msg_ptr; this must be greater than or equal to the mq_msgsize attribute of the queue (see mq_getattr(3)). If msg_prio is not NULL, then the buffer to which it points is used to return the priority associated with the received message.

If the queue is empty, then, by default, mq_receive() blocks until a message becomes available, or the call is interrupted by a signal handler. If the O_NONBLOCK flag is enabled for the message queue description, then the call instead fails immediately with the error EAGAIN.

mq_timedreceive() behaves just like mq_receive(), except that if the queue is empty and the O_NONBLOCK flag is not enabled for the message queue description, then abs_timeout points to a structure which specifies how long the call will block. This value is an absolute timeout in seconds and nanoseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC), specified in a timespec(3) structure.

If no message is available, and the timeout has already expired by the time of the call, mq_timedreceive() returns immediately.

RETURN VALUE

On success, mq_receive() and mq_timedreceive() return the number of bytes in the received message; on error, -1 is returned, with errno set to indicate the error.

ERRORS

EAGAIN
The queue was empty, and the O_NONBLOCK flag was set for the message queue description referred to by mqdes.

EBADF
The descriptor specified in mqdes was invalid or not opened for reading.

EINTR
The call was interrupted by a signal handler; see signal(7).

EINVAL
The call would have blocked, and abs_timeout was invalid, either because tv_sec was less than zero, or because tv_nsec was less than zero or greater than 1000 million.

EMSGSIZE
msg_len was less than the mq_msgsize attribute of the message queue.

ETIMEDOUT
The call timed out before a message could be transferred.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mq_receive(), mq_timedreceive()

Thread safetyMT-Safe

VERSIONS

On Linux, mq_timedreceive() is a system call, and mq_receive() is a library function layered on top of that system call.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

SEE ALSO

mq_close(3), mq_getattr(3), mq_notify(3), mq_open(3), mq_send(3), mq_unlink(3), timespec(3), mq_overview(7), time(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

467 - Linux cli command fputs

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fputs and provides detailed information about the command fputs, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fputs.

NAME 🖥️ fputs 🖥️

output of characters and strings

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int fputc(int c, FILE *stream);
int putc(int c, FILE *stream);
int putchar(int c);
int fputs(const char *restrict s, FILE *restrict stream);
int puts(const char *s);

DESCRIPTION

fputc() writes the character c, cast to an unsigned char, to stream.

putc() is equivalent to fputc() except that it may be implemented as a macro which evaluates stream more than once.

putchar(c) is equivalent to putc(c, stdout).

fputs() writes the string s to stream, without its terminating null byte (‘�’).

puts() writes the string s and a trailing newline to stdout.

Calls to the functions described here can be mixed with each other and with calls to other output functions from the stdio library for the same output stream.

For nonlocking counterparts, see unlocked_stdio(3).

RETURN VALUE

fputc(), putc(), and putchar() return the character written as an unsigned char cast to an int or EOF on error.

puts() and fputs() return a nonnegative number on success, or EOF on error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fputc(), fputs(), putc(), putchar(), puts()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89, C99.

BUGS

It is not advisable to mix calls to output functions from the stdio library with low-level calls to write(2) for the file descriptor associated with the same output stream; the results will be undefined and very probably not what you want.

SEE ALSO

write(2), ferror(3), fgets(3), fopen(3), fputwc(3), fputws(3), fseek(3), fwrite(3), putwchar(3), scanf(3), unlocked_stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

468 - Linux cli command psignal

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command psignal and provides detailed information about the command psignal, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the psignal.

NAME 🖥️ psignal 🖥️

print signal description

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
void psignal(int sig, const char *s);
void psiginfo(const siginfo_t *pinfo, const char *s);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

psignal():

    Since glibc 2.19:
            _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

psiginfo():

    _POSIX_C_SOURCE >= 200809L

DESCRIPTION

The psignal() function displays a message on stderr consisting of the string s, a colon, a space, a string describing the signal number sig, and a trailing newline. If the string s is NULL or empty, the colon and space are omitted. If sig is invalid, the message displayed will indicate an unknown signal.

The psiginfo() function is like psignal(), except that it displays information about the signal described by pinfo, which should point to a valid siginfo_t structure. As well as the signal description, psiginfo() displays information about the origin of the signal, and other information relevant to the signal (e.g., the relevant memory address for hardware-generated signals, the child process ID for SIGCHLD, and the user ID and process ID of the sender, for signals set using kill(2) or sigqueue(3)).

RETURN VALUE

The psignal() and psiginfo() functions return no value.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

psignal(), psiginfo()

Thread safetyMT-Safe locale

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.10. POSIX.1-2008, 4.3BSD.

BUGS

Up to glibc 2.12, psiginfo() had the following bugs:

  • In some circumstances, a trailing newline is not printed.

  • Additional details are not displayed for real-time signals.

SEE ALSO

sigaction(2), perror(3), strsignal(3), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

469 - Linux cli command Mail_Headerpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Mail_Headerpm and provides detailed information about the command Mail_Headerpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Mail_Headerpm.

NAME 🖥️ Mail_Headerpm 🖥️

manipulate MIME headers

SYNOPSIS

use Mail::Header; my $head = Mail::Header->new; my $head = Mail::Header->new( \STDIN ); my $head = Mail::Header->new( [<>], Modify => 0);

DESCRIPTION

Read, write, create, and manipulate MIME headers, the leading part of each modern e-mail message, but also used in other protocols like HTTP. The fields are kept in Mail::Field objects.

Be aware that the header fields each have a name part, which shall be treated case-insensitive, and a content part, which may be folded over multiple lines.

Mail::Header does not always follow the RFCs strict enough, does not help you with character encodings. It does not use weak references where it could (because those did not exist when the module was written) which costs some performance and make the implementation a little more complicated. The Mail::Message::Head implementation is much newer and therefore better.

METHODS

Constructors

$obj->dup()
Create a duplicate of the current object.

$obj->new( [$source], [%options] )

Mail::Header->new( [$source], [%options] )

The $source may be either a file descriptor (reference to a GLOB) or a reference to an array. If given the new object will be initialized with headers either from the array of read from the file descriptor. %options is a list of options given in the form of key-value pairs, just like a hash table. Valid options are -Option –Default FoldLength 79 MailFrom KEEP Modify false

FoldLength => INTEGER
The default length of line to be used when folding header lines. See fold_length().

MailFrom => ‘IGNORE’|‘COERCE’|‘KEEP’|‘ERROR’
See method mail_from().

Modify => BOOLEAN
If this value is true then the headers will be re-formatted, otherwise the format of the header lines will remain unchanged.

“Fake” constructors

Be warned that the next constructors all require an already created header object, of which the original content will be destroyed.

$obj->empty()
Empty an existing Mail::Header object of all lines.

$obj->extract(ARRAY)
Extract a header from the given array into an existing Mail::Header object. extract will modify this array. Returns the object that the method was called on.

$obj->header( [ARRAY] )
header does multiple operations. First it will extract a header from the ARRAY, if given. It will then reformat the header (if reformatting is permitted), and finally return a reference to an array which contains the header in a printable form.

$obj->header_hashref( [HASH] )
As header(), but it will eventually set headers from a hash reference, and it will return the headers as a hash reference. example: $fields->{From} = Tobias Brox <[email protected]>; $fields->{To} = [you@somewhere, me@localhost]; $head->header_hashref($fields);

$obj->read($fh)
Read a header from the given file descriptor into an existing Mail::Header object.

Accessors

$obj->fold_length( [$tag], [$length] )
Set the default fold length for all tags or just one. With no arguments the default fold length is returned. With two arguments it sets the fold length for the given tag and returns the previous value. If only $length is given it sets the default fold length for the current object. In the two argument form fold_length may be called as a static method, setting default fold lengths for tags that will be used by all Mail::Header objects. See the fold method for a description on how Mail::Header uses these values.

$obj->mail_from(‘IGNORE’|‘COERCE’|‘KEEP’|‘ERROR’)
This specifies what to do when a `From line is encountered. Valid values are IGNORE - ignore and discard the header, ERROR - invoke an error (call die), COERCE - rename them as Mail-From and KEEP - keep them.

$obj->modify( [$value] )
If $value is false then Mail::Header will not do any automatic reformatting of the headers, other than to ensure that the line starts with the tags given.

Processing

$obj->add( $tag, $line [, $index] )
Add a new line to the header. If $tag is undef the tag will be extracted from the beginning of the given line. If $index is given, the new line will be inserted into the header at the given point, otherwise the new line will be appended to the end of the header.

$obj->as_string()
Returns the header as a single string.

$obj->cleanup()
Remove any header line that, other than the tag, only contains whitespace

$obj->combine( $tag [, $with] )
Combine all instances of $tag into one. The lines will be joined together $with, or a single space if not given. The new item will be positioned in the header where the first instance was, all other instances of $tag will be removed.

$obj->count($tag)
Returns the number of times the given atg appears in the header

$obj->delete( $tag [, $index ] )
Delete a tag from the header. If an $index id is given, then the Nth instance of the tag will be removed. If no $index is given, then all instances of tag will be removed.

$obj->fold( [$length] )
Fold the header. If $length is not given, then Mail::Header uses the following rules to determine what length to fold a line.

$obj->get( $tag [, $index] )
Get the text from a line. If an $index is given, then the text of the Nth instance will be returned. If it is not given the return value depends on the context in which get was called. In an array context a list of all the text from all the instances of the $tag will be returned. In a scalar context the text for the first instance will be returned. The lines are unfolded, but still terminated with a new-line (see chomp)

$obj->print( [$fh] )
Print the header to the given file descriptor, or STDOUT if no file descriptor is given.

$obj->replace( $tag, $line [, $index ] )
Replace a line in the header. If $tag is undef the tag will be extracted from the beginning of the given line. If $index is given the new line will replace the Nth instance of that tag, otherwise the first instance of the tag is replaced. If the tag does not appear in the header then a new line will be appended to the header.

$obj->tags()
Returns an array of all the tags that exist in the header. Each tag will only appear in the list once. The order of the tags is not specified.

$obj->unfold( [$tag] )
Unfold all instances of the given tag so that they do not spread across multiple lines. If $tag is not given then all lines are unfolded. The unfolding process is wrong but (for compatibility reasons) will not be repaired: only one blank at the start of the line should be removed, not all of them.

SEE ALSO

This module is part of the MailTools distribution, http://perl.overmeer.net/mailtools/.

AUTHORS

The MailTools bundle was developed by Graham Barr. Later, Mark Overmeer took over maintenance without commitment to further development.

Mail::Cap by Gisle Aas <[email protected]>. Mail::Field::AddrList by Peter Orbaek <[email protected]>. Mail::Mailer and Mail::Send by Tim Bunce <[email protected]>. For other contributors see ChangeLog.

LICENSE

Copyrights 1995-2000 Graham Barr <[email protected]> and 2001-2017 Mark Overmeer <[email protected]>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

470 - Linux cli command XtScreenOfObject

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtScreenOfObject and provides detailed information about the command XtScreenOfObject, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtScreenOfObject.

NAME 🖥️ XtScreenOfObject 🖥️

obtain window information about a widget

SYNTAX

#include <X11/Intrinsic.h>

Display *XtDisplay(Widget w);

Display *XtDisplayOfObject(Widget object);

Screen *XtScreen(Widget w);

Screen *XtScreenOfObject(Widget object);

Window XtWindow(Widget w);

Window XtWindowOfObject(Widget object);

ARGUMENTS

  1. Specifies the widget.

object
Specifies the widget.

DESCRIPTION

XtDisplay returns the display pointer for the specified widget.

XtDisplayOfObject returns the display pointer for the specified object.

XtScreen returns the screen pointer for the specified widget.

XtScreenOfObject returns the screen pointer for the specified object.

XtWindow returns the window of the specified widget.

XtWindowOfObject returns the window of the specified object.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

471 - Linux cli command SIMPLEQ_INSERT_AFTER

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SIMPLEQ_INSERT_AFTER and provides detailed information about the command SIMPLEQ_INSERT_AFTER, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SIMPLEQ_INSERT_AFTER.

NAME 🖥️ SIMPLEQ_INSERT_AFTER 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

472 - Linux cli command jnl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command jnl and provides detailed information about the command jnl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the jnl.

NAME 🖥️ jnl 🖥️

Bessel functions of the first kind

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double j0(double x);
double j1(double x);
double jn(int n, double x);
float j0f(float x);
float j1f(float x);
float jnf(int n, float x);
long double j0l(long double x);
long double j1l(long double x);
long double jnl(int n, long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

j0(), j1(), jn():

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

j0f(), j0l(), j1f(), j1l(), jnf(), jnl():

    _XOPEN_SOURCE >= 600
        || (_ISOC99_SOURCE && _XOPEN_SOURCE)
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The j0() and j1() functions return Bessel functions of x of the first kind of orders 0 and 1, respectively. The jn() function returns the Bessel function of x of the first kind of order n.

The j0f(), j1f(), and jnf(), functions are versions that take and return float values. The j0l(), j1l(), and jnl() functions are versions that take and return long double values.

RETURN VALUE

On success, these functions return the appropriate Bessel value of the first kind for x.

If x is a NaN, a NaN is returned.

If x is too large in magnitude, or the result underflows, a range error occurs, and the return value is 0.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error: result underflow, or x is too large in magnitude
errno is set to ERANGE.

These functions do not raise exceptions for fetestexcept(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

j0(), j0f(), j0l()

Thread safetyMT-Safe

j1(), j1f(), j1l()

Thread safetyMT-Safe

jn(), jnf(), jnl()

Thread safetyMT-Safe

STANDARDS

j0()
j1()
jn()
POSIX.1-2008.

Others:
BSD.

HISTORY

j0()
j1()
jn()
SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008.

Others:
BSD.

BUGS

There are errors of up to 2e-16 in the values returned by j0(), j1(), and jn() for values of x between -8 and 8.

SEE ALSO

y0(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

473 - Linux cli command verrx

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command verrx and provides detailed information about the command verrx, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the verrx.

NAME 🖥️ verrx 🖥️

formatted error messages

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <err.h>
[[noreturn]] void err(int eval, const char *fmt, ...);
[[noreturn]] void errx(int eval, const char *fmt, ...);
void warn(const char *fmt, ...);
void warnx(const char *fmt, ...);
#include <stdarg.h>
[[noreturn]] void verr(int eval, const char *fmt, va_list args);
[[noreturn]] void verrx(int eval, const char *fmt, va_list args);
void vwarn(const char *fmt, va_list args);
void vwarnx(const char *fmt, va_list args);

DESCRIPTION

The err() and warn() family of functions display a formatted error message on the standard error output. In all cases, the last component of the program name, a colon character, and a space are output. If the fmt argument is not NULL, the printf(3)-like formatted error message is output. The output is terminated by a newline character.

The err(), verr(), warn(), and vwarn() functions append an error message obtained from strerror(3) based on the global variable errno, preceded by another colon and space unless the fmt argument is NULL.

The errx() and warnx() functions do not append an error message.

The err(), verr(), errx(), and verrx() functions do not return, but exit with the value of the argument eval.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

err(), errx(), warn(), warnx(), verr(), verrx(), vwarn(), vwarnx()

Thread safetyMT-Safe locale

STANDARDS

BSD.

HISTORY

err()
warn()
4.4BSD.

EXAMPLES

Display the current errno information string and exit:

p = malloc(size);
if (p == NULL)
    err(EXIT_FAILURE, NULL);
fd = open(file_name, O_RDONLY, 0);
if (fd == -1)
    err(EXIT_FAILURE, "%s", file_name);

Display an error message and exit:

if (tm.tm_hour < START_TIME)
    errx(EXIT_FAILURE, "too early, wait until %s",
            start_time_string);

Warn of an error:

fd = open(raw_device, O_RDONLY, 0);
if (fd == -1)
    warnx("%s: %s: trying the block device",
            raw_device, strerror(errno));
fd = open(block_device, O_RDONLY, 0);
if (fd == -1)
    err(EXIT_FAILURE, "%s", block_device);

SEE ALSO

error(3), exit(3), perror(3), printf(3), strerror(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

474 - Linux cli command Image_ExifTool_Samsungpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Samsungpm and provides detailed information about the command Image_ExifTool_Samsungpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Samsungpm.

NAME 🖥️ Image_ExifTool_Samsungpm 🖥️

Samsung EXIF maker notes tags

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret Samsung maker notes in EXIF information.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.cybercom.net/~dcoffin/dcraw/>

ACKNOWLEDGEMENTS

Thanks to Tae-Sun Park for decoding a number of tags, Pascal de Bruijn for the PictureWizard values, and everyone else who helped by discovering new Samsung information.

SEE ALSO

“Samsung Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

475 - Linux cli command Moose_Meta_Methodpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Methodpm and provides detailed information about the command Moose_Meta_Methodpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Methodpm.

NAME 🖥️ Moose_Meta_Methodpm 🖥️

A Moose Method metaclass

VERSION

version 2.2207

DESCRIPTION

This class is a subclass of Class::MOP::Method that provides additional Moose-specific functionality, all of which is private.

To understand this class, you should read the Class::MOP::Method documentation.

INHERITANCE

Moose::Meta::Method is a subclass of Class::MOP::Method.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

476 - Linux cli command Regexp_Common_URI_newspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_URI_newspm and provides detailed information about the command Regexp_Common_URI_newspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_URI_newspm.

NAME 🖥️ Regexp_Common_URI_newspm 🖥️

  • Returns a pattern for file URIs.

SYNOPSIS

use Regexp::Common qw /URI/; while (<>) { /$RE{URI}{news}/ and print “Contains a news URI. “; }

DESCRIPTION

$RE{URI}{news}

Returns a pattern that matches news URIs, as defined by RFC 1738. News URIs have the form:

“news:” ( “*” | group | article “@” host )

Under {-keep}, the following are returned:

$1
The complete URI.

$2
The scheme.

$3
The part of the URI following “news://”.

$RE{URI}{NNTP}

Returns a pattern that matches NNTP URIs, as defined by RFC 1738. NNTP URIs have the form:

“nntp://” host [ “:” port ] “/” group [ “/” digits ]

Under {-keep}, the following are returned:

$1
The complete URI.

$2
The scheme.

$3
The part of the URI following “nntp://”.

$4
The host and port, separated by a colon. If no port was given, just the host.

$5
The host.

$6
The port, if given.

$7
The group.

$8
The digits, if given.

REFERENCES

[RFC 1738]
Berners-Lee, Tim, Masinter, L., McCahill, M.: Uniform Resource Locators (URL). December 1994.

SEE ALSO

Regexp::Common::URI for other supported URIs.

AUTHOR

Damian Conway ([email protected])

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

477 - Linux cli command sem_wait

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sem_wait and provides detailed information about the command sem_wait, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sem_wait.

NAME 🖥️ sem_wait 🖥️

lock a semaphore

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <semaphore.h>
int sem_wait(sem_t *sem);
int sem_trywait(sem_t *sem);
int sem_timedwait(sem_t *restrict sem,
 const struct timespec *restrict abs_timeout);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sem_timedwait():

    _POSIX_C_SOURCE >= 200112L

DESCRIPTION

sem_wait() decrements (locks) the semaphore pointed to by sem. If the semaphore’s value is greater than zero, then the decrement proceeds, and the function returns, immediately. If the semaphore currently has the value zero, then the call blocks until either it becomes possible to perform the decrement (i.e., the semaphore value rises above zero), or a signal handler interrupts the call.

sem_trywait() is the same as sem_wait(), except that if the decrement cannot be immediately performed, then call returns an error (errno set to EAGAIN) instead of blocking.

sem_timedwait() is the same as sem_wait(), except that abs_timeout specifies a limit on the amount of time that the call should block if the decrement cannot be immediately performed. The abs_timeout argument points to a timespec(3) structure that specifies an absolute timeout in seconds and nanoseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).

If the timeout has already expired by the time of the call, and the semaphore could not be locked immediately, then sem_timedwait() fails with a timeout error (errno set to ETIMEDOUT).

If the operation can be performed immediately, then sem_timedwait() never fails with a timeout error, regardless of the value of abs_timeout. Furthermore, the validity of abs_timeout is not checked in this case.

RETURN VALUE

All of these functions return 0 on success; on error, the value of the semaphore is left unchanged, -1 is returned, and errno is set to indicate the error.

ERRORS

EAGAIN
(sem_trywait()) The operation could not be performed without blocking (i.e., the semaphore currently has the value zero).

EINTR
The call was interrupted by a signal handler; see signal(7).

EINVAL
sem is not a valid semaphore.

EINVAL
(sem_timedwait()) The value of abs_timeout.tv_nsecs is less than 0, or greater than or equal to 1000 million.

ETIMEDOUT
(sem_timedwait()) The call timed out before the semaphore could be locked.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sem_wait(), sem_trywait(), sem_timedwait()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

EXAMPLES

The (somewhat trivial) program shown below operates on an unnamed semaphore. The program expects two command-line arguments. The first argument specifies a seconds value that is used to set an alarm timer to generate a SIGALRM signal. This handler performs a sem_post(3) to increment the semaphore that is being waited on in main() using sem_timedwait(). The second command-line argument specifies the length of the timeout, in seconds, for sem_timedwait(). The following shows what happens on two different runs of the program:

$ ./a.out 2 3
About to call sem_timedwait()
sem_post() from handler
sem_timedwait() succeeded
$ ./a.out 2 1
About to call sem_timedwait()
sem_timedwait() timed out

Program source

#include <errno.h>
#include <semaphore.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include <assert.h>
sem_t sem;
#define handle_error(msg) \
    do { perror(msg); exit(EXIT_FAILURE); } while (0)
static void
handler(int sig)
{
    write(STDOUT_FILENO, "sem_post() from handler

“, 24); if (sem_post(&sem) == -1) { write(STDERR_FILENO, “sem_post() failed “, 18); _exit(EXIT_FAILURE); } } int main(int argc, char argv[]) { struct sigaction sa; struct timespec ts; int s; if (argc != 3) { fprintf(stderr, “Usage: %s “, argv[0]); exit(EXIT_FAILURE); } if (sem_init(&sem, 0, 0) == -1) handle_error(“sem_init”); / Establish SIGALRM handler; set alarm timer using argv[1]. / sa.sa_handler = handler; sigemptyset(&sa.sa_mask); sa.sa_flags = 0; if (sigaction(SIGALRM, &sa, NULL) == -1) handle_error(“sigaction”); alarm(atoi(argv[1])); / Calculate relative interval as current time plus number of seconds given argv[2]. / if (clock_gettime(CLOCK_REALTIME, &ts) == -1) handle_error(“clock_gettime”); ts.tv_sec += atoi(argv[2]); printf("%s() about to call sem_timedwait() “, func); while ((s = sem_timedwait(&sem, &ts)) == -1 && errno == EINTR) continue; / Restart if interrupted by handler. / / Check what happened. */ if (s == -1) { if (errno == ETIMEDOUT) printf(“sem_timedwait() timed out “); else perror(“sem_timedwait”); } else printf(“sem_timedwait() succeeded “); exit((s == 0) ? EXIT_SUCCESS : EXIT_FAILURE); }

SEE ALSO

clock_gettime(2), sem_getvalue(3), sem_post(3), timespec(3), sem_overview(7), time(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

478 - Linux cli command zip_close

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_close and provides detailed information about the command zip_close, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_close.

libzip (-lzip)

The

function writes any changes made to

to disk. If

contains no files, the file is completely removed (no empty archive is written). If successful,

is freed. Otherwise

is left unchanged and must still be freed.

To close and free a zip archive without saving changes, use

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error code in

is set to indicate the error.

will fail if:

Unexpected end-of-file found while reading from a file.

The callback function of an added or replaced file returned an error but failed to report which.

The

argument is

Required memory could not be allocated.

File is not a zip archive.

A file read failed.

A temporary file could not be renamed to its final name.

A file seek failed.

A temporary file could not be created.

A file write failed.

An error occurred while (de)compressing a stream with

Additionally, any errors returned by the callback function for added or replaced files will be passed back.

was added in libzip 0.6.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

479 - Linux cli command zip_file_extra_field_set

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_file_extra_field_set and provides detailed information about the command zip_file_extra_field_set, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_file_extra_field_set.

libzip (-lzip)

The

function sets the extra field with ID (two-byte signature)

and index

for the file at position

in the zip archive. The extra field’s data will be set to

and length

If a new entry shall be appended, set

to

At least one of the following

must be set:

Set extra field in the archive’s central directory.

Set extra field in the local file headers.

Please note that the extra field IDs 0x0001 (ZIP64 extension), 0x6375 (Infozip UTF-8 comment), and 0x7075 (Infozip UTF-8 file name) can not be set using

since they are set by

automatically when needed.

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error code in

is set to indicate the error.

fails if:

The extra field size is too large (ID and length need 4 bytes; the maximum length of all extra fields for one file combined is 65536 bytes). This error also occurs if

is too large.

Required memory could not be allocated.

is not a valid file index in

was added in libzip 0.11.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

480 - Linux cli command PA_FLOATconst

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command PA_FLOATconst and provides detailed information about the command PA_FLOATconst, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the PA_FLOATconst.

NAME 🖥️ PA_FLOATconst 🖥️

define custom behavior for printf-like functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <printf.h>
int register_printf_specifier(int spec, printf_function func,
 printf_arginfo_size_function arginfo);
int register_printf_modifier(const wchar_t *str);
int register_printf_type(printf_va_arg_function fct);

Callbacks

typedef int printf_function(FILE *stream, const struct printf_info *info,
 const void *const args[]);
typedef int printf_arginfo_size_function(const struct printf_info *info,
 size_t n, int argtypes[n], int size[n]);
typedef void printf_va_arg_function(void *mem, va_list *ap);

Types

struct printf_info {
 int prec; // Precision
 int width; // Width
 wchar_t spec; // Format letter
 unsigned int is_long_double:1;// L or ll flag
 unsigned int is_short:1; // h flag
 unsigned int is_long:1; // l flag
 unsigned int alt:1; // # flag
 unsigned int space:1; // Space flag
 unsigned int left:1; // - flag
 unsigned int showsign:1; // + flag
 unsigned int group:1; // ' flag
 unsigned int extra:1; // For special use
 unsigned int is_char:1; // hh flag
 unsigned int wide:1; // True for wide character streams
 unsigned int i18n:1; // I flag
 unsigned int is_binary128:1; /* Floating-point argument is
  ABI-compatible with
  IEC 60559 binary128 */
 unsigned short user; // Bits for user-installed modifiers
 wchar_t pad; // Padding character
};

Constants

#define PA_FLAG_LONG_LONG /* ... */
#define PA_FLAG_LONG_DOUBLE /* ... */
#define PA_FLAG_LONG /* ... */
#define PA_FLAG_SHORT /* ... */
#define PA_FLAG_PTR /* ... */

DESCRIPTION

These functions serve to extend and/or modify the behavior of the printf(3) family of functions.

register_printf_specifier()

This function registers a custom conversion specifier for the printf(3) family of functions.

spec
The character which will be used as a conversion specifier in the format string.

func
Callback function that will be executed by the printf(3) family of functions to format the input arguments into the output stream.

stream
Output stream where the formatted output should be printed. This stream transparently represents the output, even in the case of functions that write to a string.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in arginfo.

args
Array of pointers to the arguments to the printf(3) -like function.

arginfo
Callback function that will be executed by the printf(3) family of functions to know how many arguments should be parsed for the custom specifier and also their types.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in func.

n
Number of arguments remaining to be parsed.

argtypes
This array should be set to define the type of each of the arguments that will be parsed. Each element in the array represents one of the arguments to be parsed, in the same order that they are passed to the printf(3) -like function. Each element should be set to a base type (PA_*) from the enum above, or a custom one, and optionally ORed with an appropriate length modifier (PA_FLAG_*).

The type is determined by using one of the following constants:

PA_INT
int.

PA_CHAR
int, cast to char.

PA_WCHAR
wchar_t.

PA_STRING
const char *, a ‘�’-terminated string.

PA_WSTRING
const wchar_t *, a wide character L’�’-terminated string.

PA_POINTER
void *.

PA_FLOAT
float.

PA_DOUBLE
double.

PA_LAST
TODO.

size
For user-defined types, the size of the type (in bytes) should also be specified through this array. Otherwise, leave it unused.

arginfo is called before func, and prepares some information needed to call func.

register_printf_modifier()

TODO

register_printf_type()

TODO

RETURN VALUE

register_printf_specifier(), register_printf_modifier(), and register_printf_type() return zero on success, or -1 on error.

Callbacks

The callback of type printf_function should return the number of characters written, or -1 on error.

The callback of type printf_arginfo_size_function should return the number of arguments to be parsed by this specifier. It also passes information about the type of those arguments to the caller through argtypes. On error, it should return -1.

ERRORS

EINVAL
The specifier was not a valid character.

STANDARDS

GNU.

HISTORY

register_printf_function(3) is an older function similar to register_printf_specifier(), and is now deprecated. That function can’t handle user-defined types.

register_printf_specifier() supersedes register_printf_function(3).

EXAMPLES

The following example program registers the ‘b’ and ‘B’ specifiers to print integers in binary format, mirroring rules for other unsigned conversion specifiers like ‘x’ and ‘u’. This can be used to print in binary prior to C23.

/* This code is in the public domain */
#include <err.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <printf.h>
#define GROUP_SEP  '\''
struct Printf_Pad {
    char    ch;
    size_t  len;
};
static int b_printf(FILE *stream, const struct printf_info *info,
                    const void *const args[]);
static int b_arginf_sz(const struct printf_info *info,
                    size_t n, int argtypes[n], int size[n]);
static uintmax_t b_value(const struct printf_info *info,
                    const void *arg);
static size_t b_bin_repr(char bin[UINTMAX_WIDTH],
                    const struct printf_info *info, const void *arg);
static size_t b_bin_len(const struct printf_info *info,
                    ptrdiff_t min_len);
static size_t b_pad_len(const struct printf_info *info,
                    ptrdiff_t bin_len);
static ssize_t b_print_prefix(FILE *stream,
                    const struct printf_info *info);
static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info,
                    ptrdiff_t min_len);
static ssize_t b_print_number(FILE *stream,
                    const struct printf_info *info,
                    const char bin[UINTMAX_WIDTH],
                    size_t min_len, size_t bin_len);
static char pad_ch(const struct printf_info *info);
static ssize_t pad_spaces(FILE *stream, size_t pad_len);
int
main(void)
{
    if (register_printf_specifier('b', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('b', ...)");
    if (register_printf_specifier('B', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('B', ...)");
    printf("....----....----....----....----

“); printf("%llb; “, 0x5Ellu); printf("%lB; “, 0x5Elu); printf("%b; “, 0x5Eu); printf("%hB; “, 0x5Eu); printf("%hhb; “, 0x5Eu); printf("%jb; “, (uintmax_t)0x5E); printf("%zb; “, (size_t)0x5E); printf(”….—-….—-….—-….—- “); printf(”%#b; “, 0x5Eu); printf(”%#B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf("%10b; “, 0x5Eu); printf("%010b; “, 0x5Eu); printf(”%.10b; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%-10B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%‘B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”….—-….—-….—-….—- “); printf(”%#16.12b; “, 0xAB); printf(”%-#‘20.12b; “, 0xAB); printf(”%#‘020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#020B; “, 0xAB); printf(”%‘020B; “, 0xAB); printf("%020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#021B; “, 0xAB); printf(”%‘021B; “, 0xAB); printf("%021B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#022B; “, 0xAB); printf(”%‘022B; “, 0xAB); printf("%022B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#023B; “, 0xAB); printf(”%‘023B; “, 0xAB); printf("%023B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%-#‘19.11b; “, 0xAB); printf(”%#‘019B; “, 0xAB); printf(”%#019B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%‘019B; “, 0xAB); printf("%019B; “, 0xAB); printf(”%#016b; “, 0xAB); printf(”….—-….—-….—-….—- “); return 0; } static int b_printf(FILE *stream, const struct printf_info *info, const void const args[]) { char bin[UINTMAX_WIDTH]; size_t min_len, bin_len; ssize_t len, tmp; struct Printf_Pad pad = {0}; len = 0; min_len = b_bin_repr(bin, info, args[0]); bin_len = b_bin_len(info, min_len); pad.ch = pad_ch(info); if (pad.ch == ’ ‘) pad.len = b_pad_len(info, bin_len); / Padding with ’ ’ (right aligned) / if ((pad.ch == ’ ‘) && !info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } / “0b”/“0B” prefix / if (info->alt) { tmp = b_print_prefix(stream, info); if (tmp == EOF) return EOF; len += tmp; } / Padding with ‘0’ / if (pad.ch == ‘0’) { tmp = b_pad_zeros(stream, info, min_len); if (tmp == EOF) return EOF; len += tmp; } / Print number (including leading 0s to fill precision) / tmp = b_print_number(stream, info, bin, min_len, bin_len); if (tmp == EOF) return EOF; len += tmp; / Padding with ’ ’ (left aligned) */ if (info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } return len; } static int b_arginf_sz(const struct printf_info *info, size_t n, int argtypes[n], [[maybe_unused]] int size[n]) { if (n < 1) return -1; if (info->is_long_double) argtypes[0] = PA_INT | PA_FLAG_LONG_LONG; else if (info->is_long) argtypes[0] = PA_INT | PA_FLAG_LONG; else argtypes[0] = PA_INT; return 1; } static uintmax_t b_value(const struct printf_info *info, const void *arg) { if (info->is_long_double) return *(const unsigned long long *)arg; if (info->is_long) return *(const unsigned long )arg; / short and char are both promoted to int */ return *(const unsigned int *)arg; } static size_t b_bin_repr(char bin[UINTMAX_WIDTH], const struct printf_info *info, const void *arg) { size_t min_len; uintmax_t val; val = b_value(info, arg); bin[0] = ‘0’; for (min_len = 0; val; min_len++) { bin[min_len] = ‘0’ + (val % 2); val »= 1; } return MAX(min_len, 1); } static size_t b_bin_len(const struct printf_info *info, ptrdiff_t min_len) { return MAX(info->prec, min_len); } static size_t b_pad_len(const struct printf_info *info, ptrdiff_t bin_len) { ptrdiff_t pad_len; pad_len = info->width - bin_len; if (info->alt) pad_len -= 2; if (info->group) pad_len -= (bin_len - 1) / 4; return MAX(pad_len, 0); } static ssize_t b_print_prefix(FILE *stream, const struct printf_info *info) { ssize_t len; len = 0; if (fputc(‘0’, stream) == EOF) return EOF; len++; if (fputc(info->spec, stream) == EOF) return EOF; len++; return len; } static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info, ptrdiff_t min_len) { ssize_t len; ptrdiff_t tmp; len = 0; tmp = info->width - (info->alt * 2); if (info->group) tmp -= tmp / 5 - !(tmp % 5); for (ptrdiff_t i = tmp - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static ssize_t b_print_number(FILE *stream, const struct printf_info info, const char bin[UINTMAX_WIDTH], size_t min_len, size_t bin_len) { ssize_t len; len = 0; / Print leading zeros to fill precision / for (size_t i = bin_len - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } / Print number */ for (size_t i = min_len - 1; i < min_len; i–) { if (fputc(bin[i], stream) == EOF) return EOF; len++; if (!info->group || (i % 4) || !i) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static char pad_ch(const struct printf_info *info) { if ((info->prec != -1) || (info->pad == ’ ‘) || info->left) return ’ ‘; return ‘0’; } static ssize_t pad_spaces(FILE *stream, size_t pad_len) { ssize_t len; len = 0; for (size_t i = pad_len - 1; i < pad_len; i–) { if (fputc(’ ‘, stream) == EOF) return EOF; len++; } return len; }

SEE ALSO

asprintf(3), printf(3), wprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

481 - Linux cli command getutid

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getutid and provides detailed information about the command getutid, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getutid.

NAME 🖥️ getutid 🖥️

access utmp file entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <utmp.h>
struct utmp *getutent(void);
struct utmp *getutid(const struct utmp *ut);
struct utmp *getutline(const struct utmp *ut);
struct utmp *pututline(const struct utmp *ut);
void setutent(void);
void endutent(void);
int utmpname(const char *file);

DESCRIPTION

New applications should use the POSIX.1-specified “utmpx” versions of these functions; see STANDARDS.

utmpname() sets the name of the utmp-format file for the other utmp functions to access. If utmpname() is not used to set the filename before the other functions are used, they assume _PATH_UTMP, as defined in <paths.h>.

setutent() rewinds the file pointer to the beginning of the utmp file. It is generally a good idea to call it before any of the other functions.

endutent() closes the utmp file. It should be called when the user code is done accessing the file with the other functions.

getutent() reads a line from the current file position in the utmp file. It returns a pointer to a structure containing the fields of the line. The definition of this structure is shown in utmp(5).

getutid() searches forward from the current file position in the utmp file based upon ut. If ut->ut_type is one of RUN_LVL, BOOT_TIME, NEW_TIME, or OLD_TIME, getutid() will find the first entry whose ut_type field matches ut->ut_type. If ut->ut_type is one of INIT_PROCESS, LOGIN_PROCESS, USER_PROCESS, or DEAD_PROCESS, getutid() will find the first entry whose ut_id field matches ut->ut_id.

getutline() searches forward from the current file position in the utmp file. It scans entries whose ut_type is USER_PROCESS or LOGIN_PROCESS and returns the first one whose ut_line field matches ut->ut_line.

pututline() writes the utmp structure ut into the utmp file. It uses getutid() to search for the proper place in the file to insert the new entry. If it cannot find an appropriate slot for ut, pututline() will append the new entry to the end of the file.

RETURN VALUE

getutent(), getutid(), and getutline() return a pointer to a struct utmp on success, and NULL on failure (which includes the “record not found” case). This struct utmp is allocated in static storage, and may be overwritten by subsequent calls.

On success pututline() returns ut; on failure, it returns NULL.

utmpname() returns 0 if the new name was successfully stored, or -1 on failure.

On failure, these functions errno set to indicate the error.

ERRORS

ENOMEM
Out of memory.

ESRCH
Record not found.

setutent(), pututline(), and the getut*() functions can also fail for the reasons described in open(2).

FILES

/var/run/utmp
database of currently logged-in users

/var/log/wtmp
database of past user logins

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getutent()

Thread safety

MT-Unsafe init race:utent race:utentbuf sig:ALRM timer

getutid(), getutline()

Thread safety

MT-Unsafe init race:utent sig:ALRM timer

pututline()

Thread safety

MT-Unsafe race:utent sig:ALRM timer

setutent(), endutent(), utmpname()

Thread safetyMT-Unsafe race:utent

In the above table, utent in race:utent signifies that if any of the functions setutent(), getutent(), getutid(), getutline(), pututline(), utmpname(), or endutent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

None.

HISTORY

XPG2, SVr4.

In XPG2 and SVID 2 the function pututline() is documented to return void, and that is what it does on many systems (AIX, HP-UX). HP-UX introduces a new function _pututline() with the prototype given above for pututline().

All these functions are obsolete now on non-Linux systems. POSIX.1-2001 and POSIX.1-2008, following SUSv1, does not have any of these functions, but instead uses

#include <utmpx.h> struct utmpx *getutxent(void); struct utmpx *getutxid(const struct utmpx *); struct utmpx *getutxline(const struct utmpx *); struct utmpx *pututxline(const struct utmpx *); void setutxent(void); void endutxent(void);

These functions are provided by glibc, and perform the same task as their equivalents without the “x”, but use struct utmpx, defined on Linux to be the same as struct utmp. For completeness, glibc also provides utmpxname(), although this function is not specified by POSIX.1.

On some other systems, the utmpx structure is a superset of the utmp structure, with additional fields, and larger versions of the existing fields, and parallel files are maintained, often /var/*/utmpx and /var/*/wtmpx.

Linux glibc on the other hand does not use a parallel utmpx file since its utmp structure is already large enough. The “x” functions listed above are just aliases for their counterparts without the “x” (e.g., getutxent() is an alias for getutent()).

NOTES

glibc notes

The above functions are not thread-safe. glibc adds reentrant versions

#include <utmp.h>
int getutent_r(struct utmp *ubuf, struct utmp **ubufp);
int getutid_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);
int getutline_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getutent_r(), getutid_r(), getutline_r():

    _GNU_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */    _SVID_SOURCE || _BSD_SOURCE

These functions are GNU extensions, analogs of the functions of the same name without the _r suffix. The ubuf argument gives these functions a place to store their result. On success, they return 0, and a pointer to the result is written in *ubufp. On error, these functions return -1. There are no utmpx equivalents of the above functions. (POSIX.1 does not specify such functions.)

EXAMPLES

The following example adds and removes a utmp record, assuming it is run from within a pseudo terminal. For usage in a real application, you should check the return values of getpwuid(3) and ttyname(3).

#include <pwd.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <utmp.h>
int
main(void)
{
    struct utmp entry;
    system("echo before adding entry:;who");
    entry.ut_type = USER_PROCESS;
    entry.ut_pid = getpid();
    strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen("/dev/"));
    /* only correct for ptys named /dev/tty[pqr][0-9a-z] */
    strcpy(entry.ut_id, ttyname(STDIN_FILENO) + strlen("/dev/tty"));
    entry.ut_time = time(NULL);
    strcpy(entry.ut_user, getpwuid(getuid())->pw_name);
    memset(entry.ut_host, 0, UT_HOSTSIZE);
    entry.ut_addr = 0;
    setutent();
    pututline(&entry);
    system("echo after adding entry:;who");
    entry.ut_type = DEAD_PROCESS;
    memset(entry.ut_line, 0, UT_LINESIZE);
    entry.ut_time = 0;
    memset(entry.ut_user, 0, UT_NAMESIZE);
    setutent();
    pututline(&entry);
    system("echo after removing entry:;who");
    endutent();
    exit(EXIT_SUCCESS);
}

SEE ALSO

getutmp(3), utmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

482 - Linux cli command llroundl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command llroundl and provides detailed information about the command llroundl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the llroundl.

NAME 🖥️ llroundl 🖥️

round to nearest integer

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
long lround(double x);
long lroundf(float x);
long lroundl(long double x);
long long llround(double x);
long long llroundf(float x);
long long llroundl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions round their argument to the nearest integer value, rounding halfway cases away from zero, regardless of the current rounding direction (see fenv(3)).

Note that unlike the round(3) and ceil(3), functions, the return type of these functions differs from that of their arguments.

RETURN VALUE

These functions return the rounded integer value.

If x is a NaN or an infinity, or the rounded value is too large to be stored in a long (long long in the case of the ll* functions), then a domain error occurs, and the return value is unspecified.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is a NaN or infinite, or the rounded value is too large
An invalid floating-point exception (FE_INVALID) is raised.

These functions do not set errno.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

lround(), lroundf(), lroundl(), llround(), llroundf(), llroundl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

ceil(3), floor(3), lrint(3), nearbyint(3), rint(3), round(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

483 - Linux cli command setfsent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setfsent and provides detailed information about the command setfsent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setfsent.

NAME 🖥️ setfsent 🖥️

handle fstab entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <fstab.h>
int setfsent(void);
struct fstab *getfsent(void);
void endfsent(void);
struct fstab *getfsfile(const char *mount_point);
struct fstab *getfsspec(const char *special_file);

DESCRIPTION

These functions read from the file /etc/fstab. The struct fstab is defined by:

struct fstab {
    char       *fs_spec;       /* block device name */
    char       *fs_file;       /* mount point */
    char       *fs_vfstype;    /* filesystem type */
    char       *fs_mntops;     /* mount options */
    const char *fs_type;       /* rw/rq/ro/sw/xx option */
    int         fs_freq;       /* dump frequency, in days */
    int         fs_passno;     /* pass number on parallel dump */
};

Here the field fs_type contains (on a *BSD system) one of the five strings “rw”, “rq”, “ro”, “sw”, “xx” (read-write, read-write with quota, read-only, swap, ignore).

The function setfsent() opens the file when required and positions it at the first line.

The function getfsent() parses the next line from the file. (After opening it when required.)

The function endfsent() closes the file when required.

The function getfsspec() searches the file from the start and returns the first entry found for which the fs_spec field matches the special_file argument.

The function getfsfile() searches the file from the start and returns the first entry found for which the fs_file field matches the mount_point argument.

RETURN VALUE

Upon success, the functions getfsent(), getfsfile(), and getfsspec() return a pointer to a struct fstab, while setfsent() returns 1. Upon failure or end-of-file, these functions return NULL and 0, respectively.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

endfsent(), setfsent()

Thread safety

MT-Unsafe race:fsent

getfsent(), getfsspec(), getfsfile()

Thread safety

MT-Unsafe race:fsent locale

VERSIONS

Several operating systems have these functions, for example, *BSD, SunOS, Digital UNIX, AIX (which also has a getfstype()). HP-UX has functions of the same names, that however use a struct checklist instead of a struct fstab, and calls these functions obsolete, superseded by getmntent(3).

STANDARDS

None.

HISTORY

The getfsent() function appeared in 4.0BSD; the other four functions appeared in 4.3BSD.

NOTES

These functions are not thread-safe.

Since Linux allows mounting a block special device in several places, and since several devices can have the same mount point, where the last device with a given mount point is the interesting one, while getfsfile() and getfsspec() only return the first occurrence, these two functions are not suitable for use under Linux.

SEE ALSO

getmntent(3), fstab(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

484 - Linux cli command timerclear

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command timerclear and provides detailed information about the command timerclear, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the timerclear.

NAME 🖥️ timerclear 🖥️

timeval operations

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/time.h>
void timeradd(struct timeval *a, struct timeval *b,
 struct timeval *res);
void timersub(struct timeval *a, struct timeval *b,
 struct timeval *res);
void timerclear(struct timeval *tvp);
int timerisset(struct timeval *tvp);
int timercmp(struct timeval *a, struct timeval *b, CMP);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The macros are provided to operate on timeval structures, defined in <sys/time.h> as:

struct timeval {
    time_t      tv_sec;     /* seconds */
    suseconds_t tv_usec;    /* microseconds */
};

timeradd() adds the time values in a and b, and places the sum in the timeval pointed to by res. The result is normalized such that res->tv_usec has a value in the range 0 to 999,999.

timersub() subtracts the time value in b from the time value in a, and places the result in the timeval pointed to by res. The result is normalized such that res->tv_usec has a value in the range 0 to 999,999.

timerclear() zeros out the timeval structure pointed to by tvp, so that it represents the Epoch: 1970-01-01 00:00:00 +0000 (UTC).

timerisset() returns true (nonzero) if either field of the timeval structure pointed to by tvp contains a nonzero value.

timercmp() compares the timer values in a and b using the comparison operator CMP, and returns true (nonzero) or false (0) depending on the result of the comparison. Some systems (but not Linux/glibc), have a broken timercmp() implementation, in which CMP of >=, <=, and == do not work; portable applications can instead use

!timercmp(..., <)
!timercmp(..., >)
!timercmp(..., !=)

RETURN VALUE

timerisset() and timercmp() return true (nonzero) or false (0).

ERRORS

No errors are defined.

STANDARDS

None.

HISTORY

BSD.

SEE ALSO

gettimeofday(2), time(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

485 - Linux cli command XML_DOMpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_DOMpm and provides detailed information about the command XML_DOMpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_DOMpm.

NAME 🖥️ XML_DOMpm 🖥️

A perl module for building DOM Level 1 compliant document structures

SYNOPSIS

use XML::DOM; my $parser = new XML::DOM::Parser; my $doc = $parser->parsefile (“file.xml”); # print all HREF attributes of all CODEBASE elements my $nodes = $doc->getElementsByTagName (“CODEBASE”); my $n = $nodes->getLength; for (my $i = 0; $i < $n; $i++) { my $node = $nodes->item ($i); my $href = $node->getAttributeNode (“HREF”); print $href->getValue . " “; } # Print doc file $doc->printToFile (“out.xml”); # Print to string print $doc->toString; # Avoid memory leaks - cleanup circular references for garbage collection $doc->dispose;

DESCRIPTION

This module extends the XML::Parser module by Clark Cooper. The XML::Parser module is built on top of XML::Parser::Expat, which is a lower level interface to James Clark’s expat library.

XML::DOM::Parser is derived from XML::Parser. It parses XML strings or files and builds a data structure that conforms to the API of the Document Object Model as described at http://www.w3.org/TR/REC-DOM-Level-1. See the XML::Parser manpage for other available features of the XML::DOM::Parser class. Note that the ‘Style’ property should not be used (it is set internally.)

The XML::Parser NoExpand option is more or less supported, in that it will generate EntityReference objects whenever an entity reference is encountered in character data. I’m not sure how useful this is. Any comments are welcome.

As described in the synopsis, when you create an XML::DOM::Parser object, the parse and parsefile methods create an XML::DOM::Document object from the specified input. This Document object can then be examined, modified and written back out to a file or converted to a string.

When using XML::DOM with XML::Parser version 2.19 and up, setting the XML::DOM::Parser option KeepCDATA to 1 will store CDATASections in CDATASection nodes, instead of converting them to Text nodes. Subsequent CDATASection nodes will be merged into one. Let me know if this is a problem.

When using XML::Parser 2.27 and above, you can suppress expansion of parameter entity references (e.g. %pent;) in the DTD, by setting ParseParamEnt to 1 and ExpandParamEnt to 0. See Hidden Nodes for details.

A Document has a tree structure consisting of Node objects. A Node may contain other nodes, depending on its type. A Document may have Element, Text, Comment, and CDATASection nodes. Element nodes may have Attr, Element, Text, Comment, and CDATASection nodes. The other nodes may not have any child nodes.

This module adds several node types that are not part of the DOM spec (yet.) These are: ElementDecl (for <!ELEMENT …> declarations), AttlistDecl (for <!ATTLIST …> declarations), XMLDecl (for <?xml …?> declarations) and AttDef (for attribute definitions in an AttlistDecl.)

XML::DOM Classes

The XML::DOM module stores XML documents in a tree structure with a root node of type XML::DOM::Document. Different nodes in tree represent different parts of the XML file. The DOM Level 1 Specification defines the following node types:

  • XML::DOM::Node - Super class of all node types

  • XML::DOM::Document - The root of the XML document

  • XML::DOM::DocumentType - Describes the document structure: <!DOCTYPE root [ … ]>

  • XML::DOM::Element - An XML element: <elem attr=val> … </elem>

  • XML::DOM::Attr - An XML element attribute: name=value

  • XML::DOM::CharacterData - Super class of Text, Comment and CDATASection

  • XML::DOM::Text - Text in an XML element

  • XML::DOM::CDATASection - Escaped block of text: <![CDATA[ text ]]>

  • XML::DOM::Comment - An XML comment: <!– comment –>

  • XML::DOM::EntityReference - Refers to an ENTITY: &ent; or %ent;

  • XML::DOM::Entity - An ENTITY definition: <!ENTITY …>

  • XML::DOM::ProcessingInstruction - <?PI target>

  • XML::DOM::DocumentFragment - Lightweight node for cut & paste

  • XML::DOM::Notation - An NOTATION definition: <!NOTATION …>

In addition, the XML::DOM module contains the following nodes that are not part of the DOM Level 1 Specification:

  • XML::DOM::ElementDecl - Defines an element: <!ELEMENT …>

  • XML::DOM::AttlistDecl - Defines one or more attributes in an <!ATTLIST …>

  • XML::DOM::AttDef - Defines one attribute in an <!ATTLIST …>

  • XML::DOM::XMLDecl - An XML declaration: <?xml version=1.0 …>

Other classes that are part of the DOM Level 1 Spec:

  • XML::DOM::Implementation - Provides information about this implementation. Currently it doesn’t do much.

  • XML::DOM::NodeList - Used internally to store a node’s child nodes. Also returned by getElementsByTagName.

  • XML::DOM::NamedNodeMap - Used internally to store an element’s attributes.

Other classes that are not part of the DOM Level 1 Spec:

  • XML::DOM::Parser - An non-validating XML parser that creates XML::DOM::Documents

  • XML::DOM::ValParser - A validating XML parser that creates XML::DOM::Documents. It uses XML::Checker to check against the DocumentType (DTD)

  • XML::Handler::BuildDOM - A PerlSAX handler that creates XML::DOM::Documents.

XML::DOM package

Constant definitions
The following predefined constants indicate which type of node it is.

UNKNOWN_NODE (0) The node type is unknown (not part of DOM) ELEMENT_NODE (1) The node is an Element. ATTRIBUTE_NODE (2) The node is an Attr. TEXT_NODE (3) The node is a Text node. CDATA_SECTION_NODE (4) The node is a CDATASection. ENTITY_REFERENCE_NODE (5) The node is an EntityReference. ENTITY_NODE (6) The node is an Entity. PROCESSING_INSTRUCTION_NODE (7) The node is a ProcessingInstruction. COMMENT_NODE (8) The node is a Comment. DOCUMENT_NODE (9) The node is a Document. DOCUMENT_TYPE_NODE (10) The node is a DocumentType. DOCUMENT_FRAGMENT_NODE (11) The node is a DocumentFragment. NOTATION_NODE (12) The node is a Notation. ELEMENT_DECL_NODE (13) The node is an ElementDecl (not part of DOM) ATT_DEF_NODE (14) The node is an AttDef (not part of DOM) XML_DECL_NODE (15) The node is an XMLDecl (not part of DOM) ATTLIST_DECL_NODE (16) The node is an AttlistDecl (not part of DOM) Usage: if ($node->getNodeType == ELEMENT_NODE) { print “Its an Element”; }

Not In DOM Spec: The DOM Spec does not mention UNKNOWN_NODE and, quite frankly, you should never encounter it. The last 4 node types were added to support the 4 added node classes.

Global Variables

$VERSION
The variable $XML::DOM::VERSION contains the version number of this implementation, e.g. 1.43.

METHODS

These methods are not part of the DOM Level 1 Specification.

getIgnoreReadOnly and ignoreReadOnly (readOnly)
The DOM Level 1 Spec does not allow you to edit certain sections of the document, e.g. the DocumentType, so by default this implementation throws DOMExceptions (i.e. NO_MODIFICATION_ALLOWED_ERR) when you try to edit a readonly node. These readonly checks can be disabled by (temporarily) setting the global IgnoreReadOnly flag. The ignoreReadOnly method sets the global IgnoreReadOnly flag and returns its previous value. The getIgnoreReadOnly method simply returns its current value. my $oldIgnore = XML::DOM::ignoreReadOnly (1); eval { … do whatever you want, catching any other exceptions … }; XML::DOM::ignoreReadOnly ($oldIgnore); # restore previous value Another way to do it, using a local variable: { # start new scope local $XML::DOM::IgnoreReadOnly = 1; … do whatever you want, dont worry about exceptions … } # end of scope ($IgnoreReadOnly is set back to its previous value)

isValidName (name)
Whether the specified name is a valid Name as specified in the XML spec. Characters with Unicode values > 127 are now also supported.

getAllowReservedNames and allowReservedNames (boolean)
The first method returns whether reserved names are allowed. The second takes a boolean argument and sets whether reserved names are allowed. The initial value is 1 (i.e. allow reserved names.) The XML spec states that Names starting with (X|x)(M|m)(L|l) are reserved for future use. (Amusingly enough, the XML version of the XML spec (REC-xml-19980210.xml) breaks that very rule by defining an ENTITY with the name ‘xmlpio’.) A Name in this context means the Name token as found in the BNF rules in the XML spec. XML::DOM only checks for errors when you modify the DOM tree, not when the DOM tree is built by the XML::DOM::Parser.

setTagCompression (funcref)
There are 3 possible styles for printing empty Element tags:

Style 0
<empty/> or <empty attr=“val”/> XML::DOM uses this style by default for all Elements.

Style 1
<empty></empty> or <empty attr=“val”></empty>

Style 2
<empty /> or <empty attr=“val” /> This style is sometimes desired when using XHTML. (Note the extra space before the slash /) See <http://www.w3.org/TR/xhtml1> Appendix C for more details.

By default XML::DOM compresses all empty Element tags (style 0.) You can control which style is used for a particular Element by calling XML::DOM::setTagCompression with a reference to a function that takes 2 arguments. The first is the tag name of the Element, the second is the XML::DOM::Element that is being printed. The function should return 0, 1 or 2 to indicate which style should be used to print the empty tag. E.g. XML::DOM::setTagCompression (\my_tag_compression); sub my_tag_compression { my ($tag, $elem) = @_; # Print empty br, hr and img tags like this: <br /> return 2 if $tag =~ /^(br|hr|img)$/; # Print other empty tags like this: <empty></empty> return 1; }

IMPLEMENTATION DETAILS

  • Perl Mappings The value undef was used when the DOM Spec said null. The DOM Spec says: Applications must encode DOMString using UTF-16 (defined in Appendix C.3 of [UNICODE] and Amendment 1 of [ISO-10646]). In this implementation we use plain old Perl strings encoded in UTF-8 instead of UTF-16.

  • Text and CDATASection nodes The Expat parser expands EntityReferences and CDataSection sections to raw strings and does not indicate where it was found. This implementation does therefore convert both to Text nodes at parse time. CDATASection and EntityReference nodes that are added to an existing Document (by the user) will be preserved. Also, subsequent Text nodes are always merged at parse time. Text nodes that are added later can be merged with the normalize method. Consider using the addText method when adding Text nodes.

  • Printing and toString When printing (and converting an XML Document to a string) the strings have to encoded differently depending on where they occur. E.g. in a CDATASection all substrings are allowed except for ]]>. In regular text, certain characters are not allowed, e.g. > has to be converted to >. These routines should be verified by someone who knows the details.

  • Quotes Certain sections in XML are quoted, like attribute values in an Element. XML::Parser strips these quotes and the print methods in this implementation always uses double quotes, so when parsing and printing a document, single quotes may be converted to double quotes. The default value of an attribute definition (AttDef) in an AttlistDecl, however, will maintain its quotes.

  • AttlistDecl Attribute declarations for a certain Element are always merged into a single AttlistDecl object.

  • Comments Comments in the DOCTYPE section are not kept in the right place. They will become child nodes of the Document.

  • Hidden Nodes Previous versions of XML::DOM would expand parameter entity references (like %pent;), so when printing the DTD, it would print the contents of the external entity, instead of the parameter entity reference. With this release (1.27), you can prevent this by setting the XML::DOM::Parser options ParseParamEnt => 1 and ExpandParamEnt => 0. When it is parsing the contents of the external entities, it *DOES* still add the nodes to the DocumentType, but it marks these nodes by setting the ‘Hidden’ property. In addition, it adds an EntityReference node to the DocumentType node. When printing the DocumentType node (or when using to_expat() or to_sax()), the ‘Hidden’ nodes are suppressed, so you will see the parameter entity reference instead of the contents of the external entities. See test case t/dom_extent.t for an example. The reason for adding the ‘Hidden’ nodes to the DocumentType node, is that the nodes may contain <!ENTITY> definitions that are referenced further in the document. (Simply not adding the nodes to the DocumentType could cause such entity references to be expanded incorrectly.) Note that you need XML::Parser 2.27 or higher for this to work correctly.

SEE ALSO

XML::DOM::XPath

The Japanese version of this document by Takanori Kawai (Hippo2000) at <http://member.nifty.ne.jp/hippo2000/perltips/xml/dom.htm>

The DOM Level 1 specification at <http://www.w3.org/TR/REC-DOM-Level-1>

The XML spec (Extensible Markup Language 1.0) at <http://www.w3.org/TR/REC-xml>

The XML::Parser and XML::Parser::Expat manual pages.

XML::LibXML also provides a DOM Parser, and is significantly faster than XML::DOM, and is under active development. It requires that you download the Gnome libxml library.

XML::GDOME will provide the DOM Level 2 Core API, and should be as fast as XML::LibXML, but more robust, since it uses the memory management functions of libgdome. For more details see <http://tjmather.com/xml-gdome/>

CAVEATS

The method getElementsByTagName() does not return a live NodeList. Whether this is an actual caveat is debatable, but a few people on the www-dom mailing list seemed to think so. I haven’t decided yet. It’s a pain to implement, it slows things down and the benefits seem marginal. Let me know what you think.

AUTHOR

Enno Derksen is the original author.

Send patches to T.J. Mather at <[email protected]>.

Paid support is available from directly from the maintainers of this package. Please see <http://www.maxmind.com/app/opensourceservices> for more details.

Thanks to Clark Cooper for his help with the initial version.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

486 - Linux cli command inet

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command inet and provides detailed information about the command inet, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the inet.

NAME 🖥️ inet 🖥️

Internet address manipulation routines

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
int inet_aton(const char *cp, struct in_addr *inp);
in_addr_t inet_addr(const char *cp);
in_addr_t inet_network(const char *cp);
[[deprecated]] char *inet_ntoa(struct in_addr in);
[[deprecated]] struct in_addr inet_makeaddr(in_addr_t net,
 in_addr_t host);
[[deprecated]] in_addr_t inet_lnaof(struct in_addr in);
[[deprecated]] in_addr_t inet_netof(struct in_addr in);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

inet_aton(), inet_ntoa():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    In glibc up to and including 2.19:
        _BSD_SOURCE || _BSD_SOURCE

DESCRIPTION

inet_aton() converts the Internet host address cp from the IPv4 numbers-and-dots notation into binary form (in network byte order) and stores it in the structure that inp points to. inet_aton() returns nonzero if the address is valid, zero if not. The address supplied in cp can have one of the following forms:

a.b.c.d
Each of the four numeric parts specifies a byte of the address; the bytes are assigned in left-to-right order to produce the binary address.

a.b.c
Parts a and b specify the first two bytes of the binary address. Part c is interpreted as a 16-bit value that defines the rightmost two bytes of the binary address. This notation is suitable for specifying (outmoded) Class B network addresses.

a.b
Part a specifies the first byte of the binary address. Part b is interpreted as a 24-bit value that defines the rightmost three bytes of the binary address. This notation is suitable for specifying (outmoded) Class A network addresses.

a
The value a is interpreted as a 32-bit value that is stored directly into the binary address without any byte rearrangement.

In all of the above forms, components of the dotted address can be specified in decimal, octal (with a leading 0), or hexadecimal, with a leading 0X). Addresses in any of these forms are collectively termed IPV4 numbers-and-dots notation. The form that uses exactly four decimal numbers is referred to as IPv4 dotted-decimal notation (or sometimes: IPv4 dotted-quad notation).

inet_aton() returns 1 if the supplied string was successfully interpreted, or 0 if the string is invalid (errno is not set on error).

The inet_addr() function converts the Internet host address cp from IPv4 numbers-and-dots notation into binary data in network byte order. If the input is invalid, INADDR_NONE (usually -1) is returned. Use of this function is problematic because -1 is a valid address (255.255.255.255). Avoid its use in favor of inet_aton(), inet_pton(3), or getaddrinfo(3), which provide a cleaner way to indicate error return.

The inet_network() function converts cp, a string in IPv4 numbers-and-dots notation, into a number in host byte order suitable for use as an Internet network address. On success, the converted address is returned. If the input is invalid, -1 is returned.

The inet_ntoa() function converts the Internet host address in, given in network byte order, to a string in IPv4 dotted-decimal notation. The string is returned in a statically allocated buffer, which subsequent calls will overwrite.

The inet_lnaof() function returns the local network address part of the Internet address in. The returned value is in host byte order.

The inet_netof() function returns the network number part of the Internet address in. The returned value is in host byte order.

The inet_makeaddr() function is the converse of inet_netof() and inet_lnaof(). It returns an Internet host address in network byte order, created by combining the network number net with the local address host, both in host byte order.

The structure in_addr as used in inet_ntoa(), inet_makeaddr(), inet_lnaof(), and inet_netof() is defined in <netinet/in.h> as:

typedef uint32_t in_addr_t;
struct in_addr {
    in_addr_t s_addr;
};

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

inet_aton(), inet_addr(), inet_network(), inet_ntoa()

Thread safetyMT-Safe locale

inet_makeaddr(), inet_lnaof(), inet_netof()

Thread safetyMT-Safe

STANDARDS

inet_addr()
inet_ntoa()
POSIX.1-2008.

inet_aton()
None.

STANDARDS

inet_addr()
inet_ntoa()
POSIX.1-2001, 4.3BSD.

inet_lnaof(), inet_netof(), and inet_makeaddr() are legacy functions that assume they are dealing with classful network addresses. Classful networking divides IPv4 network addresses into host and network components at byte boundaries, as follows:

Class A
This address type is indicated by the value 0 in the most significant bit of the (network byte ordered) address. The network address is contained in the most significant byte, and the host address occupies the remaining three bytes.

Class B
This address type is indicated by the binary value 10 in the most significant two bits of the address. The network address is contained in the two most significant bytes, and the host address occupies the remaining two bytes.

Class C
This address type is indicated by the binary value 110 in the most significant three bits of the address. The network address is contained in the three most significant bytes, and the host address occupies the remaining byte.

Classful network addresses are now obsolete, having been superseded by Classless Inter-Domain Routing (CIDR), which divides addresses into network and host components at arbitrary bit (rather than byte) boundaries.

NOTES

On x86 architectures, the host byte order is Least Significant Byte first (little endian), whereas the network byte order, as used on the Internet, is Most Significant Byte first (big endian).

EXAMPLES

An example of the use of inet_aton() and inet_ntoa() is shown below. Here are some example runs:

$ ./a.out 226.000.000.037 # Last byte is in octal
226.0.0.31
$ ./a.out 0x7f.1  # First byte is in hex
127.0.0.1

Program source

#define _DEFAULT_SOURCE
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
    struct in_addr addr;
    if (argc != 2) {
        fprintf(stderr, "%s <dotted-address>

“, argv[0]); exit(EXIT_FAILURE); } if (inet_aton(argv[1], &addr) == 0) { fprintf(stderr, “Invalid address “); exit(EXIT_FAILURE); } printf("%s “, inet_ntoa(addr)); exit(EXIT_SUCCESS); }

SEE ALSO

byteorder(3), getaddrinfo(3), gethostbyname(3), getnameinfo(3), getnetent(3), inet_net_pton(3), inet_ntop(3), inet_pton(3), hosts(5), networks(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

487 - Linux cli command sigpause

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigpause and provides detailed information about the command sigpause, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigpause.

NAME 🖥️ sigpause 🖥️

atomically release blocked signals and wait for interrupt

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
[[deprecated]] int sigpause(int sigmask); /* BSD (but see NOTES) */
[[deprecated]] int sigpause(int sig); /* POSIX.1 / SysV / UNIX 95 */

DESCRIPTION

Don’t use this function. Use sigsuspend(2) instead.

The function sigpause() is designed to wait for some signal. It changes the process’s signal mask (set of blocked signals), and then waits for a signal to arrive. Upon arrival of a signal, the original signal mask is restored.

RETURN VALUE

If sigpause() returns, it was interrupted by a signal and the return value is -1 with errno set to EINTR.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sigpause()

Thread safetyMT-Safe

VERSIONS

On Linux, this routine is a system call only on the Sparc (sparc64) architecture.

glibc uses the BSD version if the _BSD_SOURCE feature test macro is defined and none of _POSIX_SOURCE, _POSIX_C_SOURCE, _XOPEN_SOURCE, _GNU_SOURCE, or _SVID_SOURCE is defined. Otherwise, the System V version is used, and feature test macros must be defined as follows to obtain the declaration:

  • Since glibc 2.26: _XOPEN_SOURCE >= 500

  • glibc 2.25 and earlier: _XOPEN_SOURCE

Since glibc 2.19, only the System V version is exposed by <signal.h>; applications that formerly used the BSD sigpause() should be amended to use sigsuspend(2).

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001. Obsoleted in POSIX.1-2008.

The classical BSD version of this function appeared in 4.2BSD. It sets the process’s signal mask to sigmask. UNIX 95 standardized the incompatible System V version of this function, which removes only the specified signal sig from the process’s signal mask. The unfortunate situation with two incompatible functions with the same name was solved by the sigsuspend(2) function, that takes a sigset_t * argument (instead of an int).

SEE ALSO

kill(2), sigaction(2), sigprocmask(2), sigsuspend(2), sigblock(3), sigvec(3), feature_test_macros(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

488 - Linux cli command Net_DNS_SEC_ECDSApm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_SEC_ECDSApm and provides detailed information about the command Net_DNS_SEC_ECDSApm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_SEC_ECDSApm.

NAME 🖥️ Net_DNS_SEC_ECDSApm 🖥️

DNSSEC ECDSA digital signature algorithm

SYNOPSIS

require Net::DNS::SEC::ECDSA; $signature = Net::DNS::SEC::ECDSA->sign( $sigdata, $private ); $validated = Net::DNS::SEC::ECDSA->verify( $sigdata, $keyrr, $sigbin );

DESCRIPTION

Implementation of ECDSA elliptic curve digital signature generation and verification procedures.

sign

$signature = Net::DNS::SEC::ECDSA->sign( $sigdata, $private );

Generates the wire-format signature from the sigdata octet string and the appropriate private key object.

verify

$validated = Net::DNS::SEC::ECDSA->verify( $sigdata, $keyrr, $sigbin );

Verifies the signature over the sigdata octet string using the specified public key resource record.

ACKNOWLEDGMENT

Thanks are due to Eric Young and the many developers and contributors to the OpenSSL cryptographic library.

COPYRIGHT

Copyright (c)2014,2018 Dick Franks.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

Net::DNS, Net::DNS::SEC, RFC6090, RFC6605, OpenSSL <http://www.openssl.org/docs>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

489 - Linux cli command STAILQ_NEXT

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command STAILQ_NEXT and provides detailed information about the command STAILQ_NEXT, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the STAILQ_NEXT.

NAME 🖥️ STAILQ_NEXT 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

490 - Linux cli command sigqueue

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigqueue and provides detailed information about the command sigqueue, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigqueue.

NAME 🖥️ sigqueue 🖥️

queue a signal and data to a process

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
int sigqueue(pid_t pid, int sig, const union sigval value);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sigqueue():

    _POSIX_C_SOURCE >= 199309L

DESCRIPTION

sigqueue() sends the signal specified in sig to the process whose PID is given in pid. The permissions required to send a signal are the same as for kill(2). As with kill(2), the null signal (0) can be used to check if a process with a given PID exists.

The value argument is used to specify an accompanying item of data (either an integer or a pointer value) to be sent with the signal, and has the following type:

union sigval {
    int   sival_int;
    void *sival_ptr;
};

If the receiving process has installed a handler for this signal using the SA_SIGINFO flag to sigaction(2), then it can obtain this data via the si_value field of the siginfo_t structure passed as the second argument to the handler. Furthermore, the si_code field of that structure will be set to SI_QUEUE.

RETURN VALUE

On success, sigqueue() returns 0, indicating that the signal was successfully queued to the receiving process. Otherwise, -1 is returned and errno is set to indicate the error.

ERRORS

EAGAIN
The limit of signals which may be queued has been reached. (See signal(7) for further information.)

EINVAL
sig was invalid.

EPERM
The process does not have permission to send the signal to the receiving process. For the required permissions, see kill(2).

ESRCH
No process has a PID matching pid.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sigqueue()

Thread safetyMT-Safe

VERSIONS

C library/kernel differences

On Linux, sigqueue() is implemented using the rt_sigqueueinfo(2) system call. The system call differs in its third argument, which is the siginfo_t structure that will be supplied to the receiving process’s signal handler or returned by the receiving process’s sigtimedwait(2) call. Inside the glibc sigqueue() wrapper, this argument, uinfo, is initialized as follows:

uinfo.si_signo = sig;      /* Argument supplied to sigqueue() */
uinfo.si_code = SI_QUEUE;
uinfo.si_pid = getpid();   /* Process ID of sender */
uinfo.si_uid = getuid();   /* Real UID of sender */
uinfo.si_value = val;      /* Argument supplied to sigqueue() */

STANDARDS

POSIX.1-2008.

HISTORY

Linux 2.2. POSIX.1-2001.

NOTES

If this function results in the sending of a signal to the process that invoked it, and that signal was not blocked by the calling thread, and no other threads were willing to handle this signal (either by having it unblocked, or by waiting for it using sigwait(3)), then at least some signal must be delivered to this thread before this function returns.

SEE ALSO

kill(2), rt_sigqueueinfo(2), sigaction(2), signal(2), pthread_sigqueue(3), sigwait(3), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

491 - Linux cli command HUGE_VALL

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HUGE_VALL and provides detailed information about the command HUGE_VALL, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HUGE_VALL.

NAME 🖥️ HUGE_VALL 🖥️

floating-point constants

LIBRARY

Math library (libm)

SYNOPSIS

#define _ISOC99_SOURCE /* See feature_test_macros(7) */
#include <math.h>
INFINITY
NAN
HUGE_VAL
HUGE_VALF
HUGE_VALL

DESCRIPTION

The macro INFINITY expands to a float constant representing positive infinity.

The macro NAN expands to a float constant representing a quiet NaN (when supported). A quiet NaN is a NaN (“not-a-number”) that does not raise exceptions when it is used in arithmetic. The opposite is a signaling NaN. See IEC 60559:1989.

The macros HUGE_VAL, HUGE_VALF, HUGE_VALL expand to constants of types double, float, and long double, respectively, that represent a large positive value, possibly positive infinity.

STANDARDS

C11.

HISTORY

C99.

On a glibc system, the macro HUGE_VAL is always available. Availability of the NAN macro can be tested using #ifdef NAN, and similarly for INFINITY, HUGE_VALF, HUGE_VALL. They will be defined by <math.h> if _ISOC99_SOURCE or _GNU_SOURCE is defined, or __STDC_VERSION__ is defined and has a value not less than 199901L.

SEE ALSO

fpclassify(3), math_error(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

492 - Linux cli command rcmd_af

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command rcmd_af and provides detailed information about the command rcmd_af, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the rcmd_af.

NAME 🖥️ rcmd_af 🖥️

routines for returning a stream to a remote command

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h> /* Or <unistd.h> on some systems */
int rcmd(char **restrict ahost, unsigned short inport,
 const char *restrict locuser,
 const char *restrict remuser,
 const char *restrict cmd, int *restrict fd2p);
int rresvport(int *port);
int iruserok(uint32_t raddr, int superuser,
 const char *ruser, const char *luser);
int ruserok(const char *rhost, int superuser,
 const char *ruser, const char *luser);
int rcmd_af(char **restrict ahost, unsigned short inport,
 const char *restrict locuser,
 const char *restrict remuser,
 const char *restrict cmd, int *restrict fd2p,
 sa_family_t af);
int rresvport_af(int *port, sa_family_t af);
int iruserok_af(const void *restrict raddr, int superuser,
 const char *restrict ruser, const char *restrict luser,
 sa_family_t af);
int ruserok_af(const char *rhost, int superuser,
 const char *ruser, const char *luser,
 sa_family_t af);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

rcmd(), rcmd_af(), rresvport(), rresvport_af(), iruserok(), iruserok_af(), ruserok(), ruserok_af():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The rcmd() function is used by the superuser to execute a command on a remote machine using an authentication scheme based on privileged port numbers. The rresvport() function returns a file descriptor to a socket with an address in the privileged port space. The iruserok() and ruserok() functions are used by servers to authenticate clients requesting service with rcmd(). All four functions are used by the rshd(8) server (among others).

rcmd()

The rcmd() function looks up the host *ahost using gethostbyname(3), returning -1 if the host does not exist. Otherwise, *ahost is set to the standard name of the host and a connection is established to a server residing at the well-known Internet port inport.

If the connection succeeds, a socket in the Internet domain of type SOCK_STREAM is returned to the caller, and given to the remote command as stdin and stdout. If fd2p is nonzero, then an auxiliary channel to a control process will be set up, and a file descriptor for it will be placed in *fd2p. The control process will return diagnostic output from the command (unit 2) on this channel, and will also accept bytes on this channel as being UNIX signal numbers, to be forwarded to the process group of the command. If fd2p is 0, then the stderr (unit 2 of the remote command) will be made the same as the stdout and no provision is made for sending arbitrary signals to the remote process, although you may be able to get its attention by using out-of-band data.

The protocol is described in detail in rshd(8).

rresvport()

The rresvport() function is used to obtain a socket with a privileged port bound to it. This socket is suitable for use by rcmd() and several other functions. Privileged ports are those in the range 0 to 1023. Only a privileged process (on Linux, a process that has the CAP_NET_BIND_SERVICE capability in the user namespace governing its network namespace) is allowed to bind to a privileged port. In the glibc implementation, this function restricts its search to the ports from 512 to 1023. The port argument is value-result: the value it supplies to the call is used as the starting point for a circular search of the port range; on (successful) return, it contains the port number that was bound to.

iruserok() and ruserok()

The iruserok() and ruserok() functions take a remote host’s IP address or name, respectively, two usernames and a flag indicating whether the local user’s name is that of the superuser. Then, if the user is not the superuser, it checks the /etc/hosts.equiv file. If that lookup is not done, or is unsuccessful, the .rhosts in the local user’s home directory is checked to see if the request for service is allowed.

If this file does not exist, is not a regular file, is owned by anyone other than the user or the superuser, is writable by anyone other than the owner, or is hardlinked anywhere, the check automatically fails. Zero is returned if the machine name is listed in the hosts.equiv file, or the host and remote username are found in the .rhosts file; otherwise iruserok() and ruserok() return -1. If the local domain (as obtained from gethostname(2)) is the same as the remote domain, only the machine name need be specified.

If the IP address of the remote host is known, iruserok() should be used in preference to ruserok(), as it does not require trusting the DNS server for the remote host’s domain.

*_af() variants

All of the functions described above work with IPv4 (AF_INET) sockets. The “_af” variants take an extra argument that allows the socket address family to be specified. For these functions, the af argument can be specified as AF_INET or AF_INET6. In addition, rcmd_af() supports the use of AF_UNSPEC.

RETURN VALUE

The rcmd() function returns a valid socket descriptor on success. It returns -1 on error and prints a diagnostic message on the standard error.

The rresvport() function returns a valid, bound socket descriptor on success. On failure, it returns -1 and sets errno to indicate the error. The error code EAGAIN is overloaded to mean: “All network ports in use”.

For information on the return from ruserok() and iruserok(), see above.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

rcmd(), rcmd_af()

Thread safetyMT-Unsafe

rresvport(), rresvport_af()

Thread safetyMT-Safe

iruserok(), ruserok(), iruserok_af(), ruserok_af()

Thread safetyMT-Safe locale

STANDARDS

BSD.

HISTORY

iruserok_af()
rcmd_af()
rresvport_af()
ruserok_af()
glibc 2.2.

Solaris, 4.2BSD. The “_af” variants are more recent additions, and are not present on as wide a range of systems.

BUGS

iruserok() and iruserok_af() are declared in glibc headers only since glibc 2.12.

SEE ALSO

rlogin(1), rsh(1), rexec(3), rexecd(8), rlogind(8), rshd(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

493 - Linux cli command Net_DNS_RR_EUI64pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_EUI64pm and provides detailed information about the command Net_DNS_RR_EUI64pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_EUI64pm.

NAME 🖥️ Net_DNS_RR_EUI64pm 🖥️

DNS EUI64 resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name IN EUI64 address); $rr = Net::DNS::RR->new( name => example.com, type => EUI64, address => 00-00-5e-ef-10-00-00-2a );

DESCRIPTION

DNS resource records for 64-bit Extended Unique Identifier (EUI64).

The EUI64 resource record is used to represent IEEE Extended Unique Identifiers used in various layer-2 networks, ethernet for example.

EUI64 addresses SHOULD NOT be published in the public DNS. RFC7043 describes potentially severe privacy implications resulting from indiscriminate publication of link-layer addresses in the DNS.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

address The address field is a 8-octet layer-2 address in network byte order.

The presentation format is hexadecimal separated by “-”.

COPYRIGHT

Copyright (c)2013 Dick Franks.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC7043 <https://tools.ietf.org/html/rfc7043>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

494 - Linux cli command XtSetKeyTranslator

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtSetKeyTranslator and provides detailed information about the command XtSetKeyTranslator, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtSetKeyTranslator.

NAME 🖥️ XtSetKeyTranslator 🖥️

convert KeySym to KeyCodes

SYNTAX

#include <X11/Intrinsic.h>

void XtSetKeyTranslator(Display *display, XtKeyProc proc);

void XtTranslateKeycode(Display *display, KeyCode keycode, Modifiers modifiers, Modifiers *modifiers_return, KeySym *keysym_return);

void XtRegisterCaseConverter(Display *display, XtCaseProc proc, KeySym start, KeySym stop);

void XtConvertCase(Display *display, KeySym keysym, KeySym *lower_return, KeySym *upper_return);

ARGUMENTS

display
Specifies the display.

keycode
Specifies the KeyCode to translate.

keysym
Specifies the KeySym to convert.

keysym_return
Returns the resulting KeySym.

lower_return
Returns the lowercase equivalent of the KeySym.

upper_return
Returns the uppercase equivalent of the KeySym.

modifiers
Specifies the modifiers to the KeyCode.

modifiers_return
Returns a mask that indicates the modifiers actually used to generate the KeySym.

proc
Specifies the procedure that is to perform key translations or conversions.

start
Specifies the first KeySym for which this converter is valid.

stop
Specifies the last KeySym for which this converter is valid.

DESCRIPTION

The XtSetKeyTranslator function sets the specified procedure as the current key translator. The default translator is XtTranslateKey, an XtKeyProc that uses Shift and Lock modifiers with the interpretations defined by the core protocol. It is provided so that new translators can call it to get default KeyCode-to-KeySym translations and so that the default translator can be reinstalled.

The XtTranslateKeycode function passes the specified arguments directly to the currently registered KeyCode to KeySym translator.

The XtRegisterCaseConverter registers the specified case converter. The start and stop arguments provide the inclusive range of KeySyms for which this converter is to be called. The new converter overrides any previous converters for KeySyms in that range. No interface exists to remove converters; you need to register an identity converter. When a new converter is registered, the Intrinsics refreshes the keyboard state if necessary. The default converter understands case conversion for all KeySyms defined in the core protocol.

The XtConvertCase function calls the appropriate converter and returns the results. A user-supplied XtKeyProc may need to use this function.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

495 - Linux cli command XtWindowToWidget

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtWindowToWidget and provides detailed information about the command XtWindowToWidget, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtWindowToWidget.

NAME 🖥️ XtWindowToWidget 🖥️

translating strings to widgets or widgets to windows

SYNTAX

#include <X11/Intrinsic.h>

Widget XtNameToWidget(Widget reference, const char *names);

Widget XtWindowToWidget(Display *display, Window window);

ARGUMENTS

display
Specifies the display on which the window is defined.

names
Specifies the fully qualified name of the desired widget.

reference
Specifies the widget from which the search is to start.

window
Specify the window for which you want the widget.

DESCRIPTION

The XtNameToWidget function looks for a widget whose name is the first component in the specified names and that is a pop-up child of reference (or a normal child if reference is a subclass of compositeWidgetClass). It then uses that widget as the new reference and repeats the search after deleting the first component from the specified names. If it cannot find the specified widget, XtNameToWidget returns NULL.

Note that the names argument contains the name of a widget with respect to the specified reference widget and can contain more than one widget name (separated by periods) for widgets that are not direct children of the specified reference widget.

If more than one child of the reference widget matches the name, XtNameToWidget can return any of the children. The Intrinsics do not require that all children of a widget have unique names. If the specified names contain more than one component and if more than one child matches the first component, XtNameToWidget can return NULL if the single branch that it follows does not contain the named widget. That is, XtNameToWidget does not back up and follow other matching branches of the widget tree.

The XtWindowToWidget function translates the specified window and display pointer into the appropriate widget instance.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

496 - Linux cli command zip_source_tell_write

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_tell_write and provides detailed information about the command zip_source_tell_write, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_tell_write.

libzip (-lzip)

The function

returns the current write offset for

The return value can be passed to

with

set to

to return to the same location in the source.

Upon successful completion the current write offset is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

497 - Linux cli command Image_ExifTool_Panasonicpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Panasonicpm and provides detailed information about the command Image_ExifTool_Panasonicpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Panasonicpm.

NAME 🖥️ Image_ExifTool_Panasonicpm 🖥️

Panasonic/Leica maker notes tags

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret Panasonic and Leica maker notes in EXIF information.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.compton.nu/panasonic.html>

<http://johnst.org/sw/exiftags/>

<http://homepage3.nifty.com/kamisaka/makernote/makernote_pana.htm>

<http://bretteville.com/pdfs/M8Metadata_v2.pdf>

<http://www.digital-leica.com/lens_codes/index.html>

(…plus lots of testing with store demos and my wife’s DMC-FS7!)

ACKNOWLEDGEMENTS

Thanks to Tels, Marcel Coenen, Jens Duttke, Joerg, Michael Byczkowski, Carl Bretteville, Zdenek Mihula and Olaf Ulrich for their contributions.

SEE ALSO

“Panasonic Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

498 - Linux cli command SIMPLEQ_EMPTY

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SIMPLEQ_EMPTY and provides detailed information about the command SIMPLEQ_EMPTY, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SIMPLEQ_EMPTY.

NAME 🖥️ SIMPLEQ_EMPTY 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

499 - Linux cli command Net_DNS_RR_SMIMEApm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_SMIMEApm and provides detailed information about the command Net_DNS_RR_SMIMEApm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_SMIMEApm.

NAME 🖥️ Net_DNS_RR_SMIMEApm 🖥️

DNS SMIMEA resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name SMIMEA usage selector matchingtype certificate);

DESCRIPTION

The SMIMEA DNS resource record (RR) is used to associate an end entity certificate or public key with the associated email address, thus forming a “SMIMEA certificate association”. The semantics of how the SMIMEA RR is interpreted are described in RFC6698.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

usage

$usage = $rr->usage; $rr->usage( $usage );

8-bit integer value which specifies the provided association that will be used to match the certificate.

selector

$selector = $rr->selector; $rr->selector( $selector );

8-bit integer value which specifies which part of the certificate presented by the server will be matched against the association data.

matchingtype

$matchingtype = $rr->matchingtype; $rr->matchingtype( $matchingtype );

8-bit integer value which specifies how the certificate association is presented.

certificate

cert

$cert = $rr->cert; $rr->cert( $cert );

Hexadecimal representation of the certificate data.

certbin

$certbin = $rr->certbin; $rr->certbin( $certbin );

Binary representation of the certificate data.

babble

print $rr->babble;

The babble() method returns the ‘BubbleBabble’ representation of the digest if the Digest::BubbleBabble package is available, otherwise an empty string is returned.

BubbleBabble represents a message digest as a string of plausible words, to make the digest easier to verify. The “words” are not necessarily real words, but they look more like words than a string of hex characters.

The ‘BubbleBabble’ string is appended as a comment when the string method is called.

COPYRIGHT

Copyright (c)2016 Dick Franks.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC8162 <https://tools.ietf.org/html/rfc8162> RFC6698 <https://tools.ietf.org/html/rfc6698>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

500 - Linux cli command ordchram

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ordchram and provides detailed information about the command ordchram, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ordchram.

NAME 🖥️ ordchram 🖥️

convert characters to strings and vice versa

SYNOPSIS

@load “ordchr”

number = ord(“A”)
string = chr(65)

DESCRIPTION

The ordchr extension adds two functions named ord(). and chr(), as follows.

ord()
This function takes a string argument, and returns the numeric value of the first character in the string.

chr()
This function takes a numeric argument and returns a string whose first character is that represented by the number.

These functions are inspired by the Pascal language functions of the same name.

EXAMPLE

@load "ordchr"
...
printf("The numeric value of 'A' is %d

“, ord(“A”)) printf(“The string value of 65 is %s “, chr(65))

SEE ALSO

GAWK: Effective AWK Programming, filefuncs(3am), fnmatch(3am), fork(3am), inplace(3am), readdir(3am), readfile(3am), revoutput(3am), rwarray(3am), time(3am).

AUTHOR

Arnold Robbins, [email protected].

COPYING PERMISSIONS

Copyright © 2012, 2013, 2018, Free Software Foundation, Inc.

Permission is granted to make and distribute verbatim copies of this manual page provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to process this file through troff and print the results, provided the printed document carries copying permission notice identical to this one except for the removal of this paragraph (this paragraph not being relevant to the printed manual page).

Permission is granted to copy and distribute modified versions of this manual page under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual page into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

501 - Linux cli command malloc_get_state

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command malloc_get_state and provides detailed information about the command malloc_get_state, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the malloc_get_state.

NAME 🖥️ malloc_get_state 🖥️

record and restore state of malloc implementation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <malloc.h>
void *malloc_get_state(void);
int malloc_set_state(void *state);

DESCRIPTION

Note: these functions are removed in glibc 2.25.

The malloc_get_state() function records the current state of all malloc(3) internal bookkeeping variables (but not the actual contents of the heap or the state of malloc_hook(3) functions pointers). The state is recorded in a system-dependent opaque data structure dynamically allocated via malloc(3), and a pointer to that data structure is returned as the function result. (It is the caller’s responsibility to free(3) this memory.)

The malloc_set_state() function restores the state of all malloc(3) internal bookkeeping variables to the values recorded in the opaque data structure pointed to by state.

RETURN VALUE

On success, malloc_get_state() returns a pointer to a newly allocated opaque data structure. On error (for example, memory could not be allocated for the data structure), malloc_get_state() returns NULL.

On success, malloc_set_state() returns 0. If the implementation detects that state does not point to a correctly formed data structure, malloc_set_state() returns -1. If the implementation detects that the version of the data structure referred to by state is a more recent version than this implementation knows about, malloc_set_state() returns -2.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

malloc_get_state(), malloc_set_state()

Thread safetyMT-Safe

STANDARDS

GNU.

NOTES

These functions are useful when using this malloc(3) implementation as part of a shared library, and the heap contents are saved/restored via some other method. This technique is used by GNU Emacs to implement its “dumping” function.

Hook function pointers are never saved or restored by these functions, with two exceptions: if malloc checking (see mallopt(3)) was in use when malloc_get_state() was called, then malloc_set_state() resets malloc checking hooks if possible; if malloc checking was not in use in the recorded state, but the caller has requested malloc checking, then the hooks are reset to 0.

SEE ALSO

malloc(3), mallopt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

502 - Linux cli command pcap_freecodepcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_freecodepcap and provides detailed information about the command pcap_freecodepcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_freecodepcap.

NAME 🖥️ pcap_freecodepcap 🖥️

free a BPF program

SYNOPSIS

#include <pcap/pcap.h>
void pcap_freecode(struct bpf_program *);

DESCRIPTION

pcap_freecode() is used to free up allocated memory pointed to by a bpf_program struct generated by pcap_compile(3PCAP) when that BPF program is no longer needed, for example after it has been made the filter program for a pcap structure by a call to pcap_setfilter(3PCAP).

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

503 - Linux cli command strchr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strchr and provides detailed information about the command strchr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strchr.

NAME 🖥️ strchr 🖥️

locate character in string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strchr(const char *s, int c);
char *strrchr(const char *s, int c);
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <string.h>
char *strchrnul(const char *s, int c);

DESCRIPTION

The strchr() function returns a pointer to the first occurrence of the character c in the string s.

The strrchr() function returns a pointer to the last occurrence of the character c in the string s.

The strchrnul() function is like strchr() except that if c is not found in s, then it returns a pointer to the null byte at the end of s, rather than NULL.

Here “character” means “byte”; these functions do not work with wide or multibyte characters.

RETURN VALUE

The strchr() and strrchr() functions return a pointer to the matched character or NULL if the character is not found. The terminating null byte is considered part of the string, so that if c is specified as ‘�’, these functions return a pointer to the terminator.

The strchrnul() function returns a pointer to the matched character, or a pointer to the null byte at the end of s (i.e., s+strlen(s)) if the character is not found.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strchr(), strrchr(), strchrnul()

Thread safetyMT-Safe

STANDARDS

strchr()
strrchr()
C11, POSIX.1-2008.

strchrnul()
GNU.

HISTORY

strchr()
strrchr()
POSIX.1-2001, C89, SVr4, 4.3BSD.

strchrnul()
glibc 2.1.1, FreeBSD 10, NetBSD 8.

SEE ALSO

memchr(3), string(3), strlen(3), strpbrk(3), strsep(3), strspn(3), strstr(3), strtok(3), wcschr(3), wcsrchr(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

504 - Linux cli command setttyent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setttyent and provides detailed information about the command setttyent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setttyent.

NAME 🖥️ setttyent 🖥️

get ttys file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ttyent.h>
struct ttyent *getttyent(void);
struct ttyent *getttynam(const char *name);
int setttyent(void);
int endttyent(void);

DESCRIPTION

These functions provide an interface to the file _PATH_TTYS (e.g., /etc/ttys).

The function setttyent() opens the file or rewinds it if already open.

The function endttyent() closes the file.

The function getttynam() searches for a given terminal name in the file. It returns a pointer to a ttyent structure (description below).

The function getttyent() opens the file _PATH_TTYS (if necessary) and returns the first entry. If the file is already open, the next entry. The ttyent structure has the form:

struct ttyent {
    char *ty_name;     /* terminal device name */
    char *ty_getty;    /* command to execute, usually getty */
    char *ty_type;     /* terminal type for termcap */
    int   ty_status;   /* status flags */
    char *ty_window;   /* command to start up window manager */
    char *ty_comment;  /* comment field */
};

ty_status can be:

#define TTY_ON     0x01  /* enable logins (start ty_getty program) */
#define TTY_SECURE 0x02  /* allow UID 0 to login */

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getttyent(), setttyent(), endttyent(), getttynam()

Thread safetyMT-Unsafe race:ttyent

STANDARDS

BSD.

NOTES

Under Linux, the file /etc/ttys, and the functions described above, are not used.

SEE ALSO

ttyname(3), ttyslot(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

505 - Linux cli command Tk_tixWmpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_tixWmpm and provides detailed information about the command Tk_tixWmpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_tixWmpm.

NAME 🖥️ Tk_tixWmpm 🖥️

Tix’s addition to the standard TK wm command.

SYNOPSIS

$widget->wmCapture

$widget->wmRelease

DESCRIPTION

The wmCapture and the wmRelease methods change the toplevel attribute of Tk widgets.

METHODS

$widget->wmCapture
Converts the toplevel window specified by $widget into a non-toplevel widget. Normally this command is called to convert a Toplevel widget into a Frame widget. The newly-converted frame widget is un-mapped from the screen. To make it appear inside its parent, you must call a geometry manager (e.g. grid or pack) explicitly.

$widget->wmRelease
Makes the non-toplevel window specified by $widget into a toplevel widget. Normally this command is called to convert a Frame widget into a Toplevel widget, but it can also be used on any non-toplevel widget (e.g, label). The newly-converted toplevel window is in a withdrawn state. To make it appear on the screen, you must call deiconify after calling wmRelease. Any data associated with $widget via wm methods (icon, protocol, command etc.) are released, and must be re-established if window is later re-captured.

BUGS

wmCapture does not exist in the Win32 window manager code.

How these methods interact with perl/Tk’s class hierarchy is not yet clear. In particular a wmReleased window will not automatically ``inherit’’ the Tk::Wm methods, however a wmCaptured window still will. (A released Label might make a good candidate for an Icon.)

AUTHORS

Ioi Kim Lam - [email protected] wrote original Tix version. Updated for tk8.0, Win32 and perl by Nick Ing-Simmons.

SEE ALSO

Tk::Wm Tk::Mwm Tk::Frame Tk::Toplevel

KEYWORDS

window manager, wm, TIX

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

506 - Linux cli command XStringpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XStringpm and provides detailed information about the command XStringpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XStringpm.

NAME 🖥️ XStringpm 🖥️

Isolated String helpers from B

VERSION

version 0.005

SYNOPSIS

#!perl use strict; use warnings; use Test::More; use XString; use B; is XString::cstring( q[astring"with quotes] ), B::cstring( q[astring"with quotes] ), q[“astring\with quotes”]; is XString::perlstring( q[astring"with quotes] ), B::perlstring( q[astring"with quotes] ), q[“astring\with quotes”]; done_testing;

DESCRIPTION

XString provides the B string helpers in one isolated package. Right now only cstring and perlstring are available.

FUNCTIONS

cstring(STR)

Similar to B::cstring; Returns a double-quote-surrounded escaped version of STR which can be used as a string in C source code.

perlstring(STR)

Similar to B::perlstring; Returns a double-quote-surrounded escaped version of STR which can be used as a string in Perl source code.

AUTHOR

Nicolas R <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 2018 by cPanel, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

507 - Linux cli command XtGetSelectionValues

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGetSelectionValues and provides detailed information about the command XtGetSelectionValues, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGetSelectionValues.

NAME 🖥️ XtGetSelectionValues 🖥️

obtain selection values

SYNTAX

#include <X11/Intrinsic.h>

void XtGetSelectionValue(Widget w, Atom selection, Atom target, XtSelectionCallbackProc callback, XtPointer client_data, Time time);

void XtGetSelectionValues(Widget w, Atom selection, Atom *targets, int count, XtSelectionCallbackProc callback, XtPointer *client_data, Time time);

ARGUMENTS

callback
Specifies the callback procedure that is to be called when the selection value has been obtained.

client_data
Specifies the argument that is to be passed to the specified procedure when it is called.

client_data
Specifies the client data (one for each target type) that is passed to the callback procedure when it is called for that target.

count
Specifies the length of the targets and client_data lists.

selection
Specifies the particular selection desired (that is, primary or secondary).

target
Specifies the type of the information that is needed about the selection.

targets
Specifies the types of information that is needed about the selection.

time
Specifies the timestamp that indicates when the selection value is desired.

  1. Specifies the widget that is making the request.

DESCRIPTION

The XtGetSelectionValue function requests the value of the selection that has been converted to the target type. The specified callback will be called some time after XtGetSelectionValue is called; in fact, it may be called before or after XtGetSelectionValue returns.

The XtGetSelectionValues function is similar to XtGetSelectionValue except that it takes a list of target types and a list of client data and obtains the current value of the selection converted to each of the targets. The effect is as if each target were specified in a separate call to XtGetSelectionValue. The callback is called once with the corresponding client data for each target. XtGetSelectionValues does guarantee that all the conversions will use the same selection value because the ownership of the selection cannot change in the middle of the list, as would be when calling XtGetSelectionValue repeatedly.

SEE ALSO

XtAppGetSelectionTimeout(3), XtOwnSelection(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

508 - Linux cli command Image_ExifTool_DPXpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_DPXpm and provides detailed information about the command Image_ExifTool_DPXpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_DPXpm.

NAME 🖥️ Image_ExifTool_DPXpm 🖥️

Read DPX meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read metadata from DPX (Digital Picture Exchange) images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.cineon.com/ff_draft.php>

SEE ALSO

“DPX Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

509 - Linux cli command pcap_is_swappedpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_is_swappedpcap and provides detailed information about the command pcap_is_swappedpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_is_swappedpcap.

NAME 🖥️ pcap_is_swappedpcap 🖥️

find out whether a savefile has the native byte order

SYNOPSIS

#include <pcap/pcap.h>
int pcap_is_swapped(pcap_t *p);

DESCRIPTION

pcap_is_swapped() returns true (1) if p refers to a ``savefile’’ that uses a different byte order than the current system. For a live capture, it always returns false (0).

It must not be called on a pcap descriptor created by pcap_create(3PCAP) that has not yet been activated by pcap_activate(3PCAP).

RETURN VALUE

pcap_is_swapped() returns true (1) or false (0) on success and PCAP_ERROR_NOT_ACTIVATED if called on a capture handle that has been created but not activated.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

510 - Linux cli command Time_Zonepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Time_Zonepm and provides detailed information about the command Time_Zonepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Time_Zonepm.

NAME 🖥️ Time_Zonepm 🖥️

  • miscellaneous timezone manipulations routines

SYNOPSIS

use Time::Zone; print tz2zone(); print tz2zone($ENV{TZ}); print tz2zone($ENV{TZ}, time()); print tz2zone($ENV{TZ}, undef, $isdst); $offset = tz_local_offset(); $offset = tz_offset($TZ);

DESCRIPTION

This is a collection of miscellaneous timezone manipulation routines.

tz2zone() parses the TZ environment variable and returns a timezone string suitable for inclusion in date (1)-like output. It opionally takes a timezone string, a time, and a is-dst flag.

tz_local_offset() determins the offset from GMT time in seconds. It only does the calculation once.

tz_offset() determines the offset from GMT in seconds of a specified timezone.

tz_name() determines the name of the timezone based on its offset

AUTHORS

Graham Barr <[email protected]> David Muir Sharnoff <[email protected]> Paul Foley <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

511 - Linux cli command Tk_DItempm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_DItempm and provides detailed information about the command Tk_DItempm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_DItempm.

NAME 🖥️ Tk_DItempm 🖥️

Tix Display Items

SYNOPSIS

DESCRIPTION

The Tix Display Items and Display Types are devised to solve a general problem: many Tix widgets (both existing and planned ones) display many items of many types simultaneously.

For example, a hierarchical listbox widget (see Tk::HList) can display items of images, plain text and subwindows in the form of a hierarchy. Another widget, the tabular listbox widget (see Tk::TList) also displays items of the same types, although it arranges the items in a tabular form. Yet another widget, the spreadsheet widget (see Tk::TixGrid), also displays similar types items, but in yet another format.

In these examples, the display items in different widgets are only different in how they are arranged by the host widget. In Tix, display items are clearly separated from the host widgets. The advantage is two-fold: first, the creation and configuration of display items become uniform across different host widgets. Second, new display item types can be added without the need to modify the existing host widgets.

In a way, Tix display items are similar to the items inside Tk the canvas widget. However, unlike the Tix display items, the canvas items are not independent of the canvas widget; this makes it impossible to use the canvas items inside other types of TK widgets.

The appearance of a display item is controlled by a set of attributes. It is observed that each the attributes usually fall into one of two categroies: ``individual’’ or ``collective’’. For example, the text items inside a HList widget may all display a different text string; however, in most cases, the text items share the same color, font and spacing. Instead of keeping a duplicated version of the same attributes inside each display item, it will be advantageous to put the collective attributes in a special object called a display style. First, there is the space concern: a host widget may have many thousands of items; keeping dupilcated attributes will be very wasteful. Second, when it becomes necessary to change a collective attribute, such as changing all the text items’ foreground color to red, it will be more efficient to change only the display style object than to modify all the text items one by one.

The attributes of the a display item are thus stored in two places: it has a set of item options to store its individual attributes. Each display item is also associated with a display style, which specifies the collective attributes of all items associated with itself.

The division between the individual and collective attributes are fixed and cannot be changed. Thus, when it becomes necessary for some items to differ in their collective attributes, two or more display styles can be used. For example, suppose you want to display two columns of text items inside an HList widget, one column in red and the other in blue. You can create a TextStyle object called ``$red’’ which defines a red foreground, and another called ``$blue’’, which defines a blue foreground. You can then associate all text items of the first column to ``$red’’ and the second column to ``$blue''

DISPLAY ITEM TYPES AND OPTIONS

Currently there are three types of display items: text, imagetext and window.

IMAGETEXT ITEMS

Display items of the type imagetext are used to display an image together with a text string. Imagetext items support the following options:

Imagetext Item Options

Name: bitmap

Class: Bitmap

Switch: -bitmap

Specifies the bitmap to display in the item.

Name: image

Class: Image

Switch: -image

Specifies the image to display in the item. When both the -bitmap and -image options are specified, only the image will be displayed.

Name: imageTextStyle

Class: ImageTextStyle

Switch: -style

Specifies the display style to use for this item. Must be the name of a imagetext display style that has already be created with ItemStyle.

Name: showImage

Class: ShowImage

Switch: -showimage

A Boolean value that specifies whether the image/bitmap should be displayed.

Name: showText

Class: ShowText

Switch: -showtext

A Boolean value that specifies whether the text string should be displayed.

Name: text

Class: Text

Switch: -text

Specifies the text string to display in the item.

Name: underline

Class: Underline

Switch: -underline

Specifies the integer index of a character to underline in the text string in the item. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.

Imagetext Style Options

The style information of imagetext items are stored in the imagetext display style. The following options are supported:

STANDARD OPTIONS

-activebackground -activeforeground -anchor -background -disabledbackground -disabledforeground -foreground -font -justify -padx -pady -selectbackground -selectforeground -wraplength

See Tk::options for details of the standard options.

STYLE-SPECIFIC OPTIONS

Name: gap

Class: Gap

Switch: -gap

Specifies the distance between the bitmap/image and the text string, in number of pixels.

Name: textAnchor

Class: TextAnchor

Switch: -textanchor

The anchor position on the image to which text part is attached. This is a perl/Tk addition. Defaults to e for compatibility with standard Tix. The interesting cases are

  1. Text is centred above the image.

  2. Text is centred below the image

  3. Text is centred to right of the image.

  4. Text is centred to left of the image.

  5. Text is centred over the image.

The sw, se, ne, and b<nw> cases look rather odd. To get items to line up correctly it will usually be necessary to specify -anchor as well. e.g. with default e then anchoring item as a whole w lines images up down left with text stuck to right side.

TEXT ITEMS

Display items of the type text are used to display a text string in a widget. Text items support the following options:

Text Item Options

Name: textStyle

Class: TextStyle

Switch: -style

Specifies the display style to use for this text item. Must be the name of a text display style that has already be created with ItemStyle.

Name: text

Class: Text

Switch: -text

Specifies the text string to display in the item.

Name: underline

Class: Underline

Switch: -underline

Specifies the integer index of a character to underline in the item. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.

Text Style Options

STANDARD OPTIONS

-activebackground -activeforeground -anchor -background -disabledbackground -disabledforeground -foreground -font -justify -padx -pady -selectbackground -selectforeground -wraplength

See Tk::options for details of the standard options.

WINDOW ITEMS

Display items of the type window are used to display a sub-window in a widget. Window items support the following options:

Window Item Options

Name: windowStyle

Class: WindowStyle

Switch: -style

Specifies the display style to use for this window item. Must be the name of a window display style that has already be created with the ItemStyle method.

Name: window

Class: Window

Switch: -window

Alias: -widget

Specifies the sub-window to display in the item.

Window Style Options

STYLE STANDARD OPTIONS

-anchor -padx -pady

See Tk::options for details of the standard options.

CREATING DISPLAY ITEMS

Display items do not exist on their and thus they cannot be created independently of the widgets they reside in. As a rule, display items are created by special methods of their ``host’’ widgets. For example, the HList widgets has a method item which can be used to create new display items. The following code creates a new text item at the third column of the entry foo inside an HList widget:

my $hlist = $parent->HList(-columns=>3); $hlist->add(foo); $hlist->itemCreate(foo, 2, -itemtype=>text, -text=>Hello);

The itemCreate method of the HList widget accepts a variable number of arguments. The special argument -itemtype specifies which type of display item to create. Options that are valid for this type of display items can then be specified by one or more option-value pairs.

After the display item is created, they can then be configured or destroyed using the methods provided by the host widget. For example, the HList widget has the methods itemConfigure, itemCget and itemDelete for accessing the display items.

CREATING AND MANIPULATING ITEM STYLES

Item styles are created with ItemStyle:

SYNOPSIS

$widget->ItemStyle(itemType ?,-stylename=>name? ?,-refwindow=>pathName? ?,option=>value, …>?);

itemType must be one of the existing display items types such as text, imagetext, window or any new types added by the user. Additional arguments can be given in one or more option-value pairs. option can be any of the valid option for this display style or any of the following:

-stylename => name
Specifies a name for this style. If unspecified, then a default name will be chosen for this style.

-refwindow => $otherwidget
Specifies a window to use for determine the default values of the display type. If unspecified, the $widget will be used. Default values for the display types can be set via the options database. The following example sets the -disablebackground and -disabledforeground options of a text display style via the option database: $widget->optionAdd(*table.list*disabledForeground => blue); $widget->optionAdd(*table.list*disabledBackground => darkgray); $widget->ItemStyle(text, -refwindow => $table_list, -fg => red); By using the option database to set the options of the display styles, we can advoid hard-coding the option values and give the user more flexibility in customization. See Tk::option for a detailed description of the option database.

STYLE METHODS

The ItemStyle method creates an object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above.

The following additional methods are available for item styles:

$style->delete
Destroy this display style object.

EXAMPLE

The following example creates two columns of data in a HList widget. The first column is in red and the second column in blue. The colors of the columns are controlled by two different text styles. Also, the anchor and font of the second column is chosen so that the income data is aligned properly.

use strict; use Tk; use Tk::HList; use Tk::ItemStyle; my $mw = MainWindow->new(); my $hlist = $mw->HList(-columns=>2)->pack; my $red = $hlist->ItemStyle(text, -foreground=>#800000); my $blue = $hlist->ItemStyle(text, -foreground=>#000080, -anchor=>e); my $e; foreach ([Joe => $10,000], [Peter => $20,000], [Raj => $90,000], [Zinh => $0]) { $e = $hlist->addchild(""); $hlist->itemCreate($e, 0, -itemtype=>text, -text=>$_->[0], -style=>$red ); $hlist->itemCreate($e, 1, -itemtype=>text, -text=>$_->[1], -style=>$blue); } Tk::MainLoop;

SEE ALSO

Tk::HList Tk::TixGrid Tk::TList

KEYWORDS

display item, display style, item style

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

512 - Linux cli command usleep

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command usleep and provides detailed information about the command usleep, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the usleep.

NAME 🖥️ usleep 🖥️

suspend execution for microsecond intervals

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
int usleep(useconds_t usec);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

usleep():

    Since glibc 2.12:
        (_XOPEN_SOURCE >= 500) && ! (_POSIX_C_SOURCE >= 200809L)
            || /* glibc >= 2.19: */ _DEFAULT_SOURCE
            || /* glibc <= 2.19: */ _BSD_SOURCE
    Before glibc 2.12:
        _BSD_SOURCE || _XOPEN_SOURCE >= 500

DESCRIPTION

The usleep() function suspends execution of the calling thread for (at least) usec microseconds. The sleep may be lengthened slightly by any system activity or by the time spent processing the call or by the granularity of system timers.

RETURN VALUE

The usleep() function returns 0 on success. On error, -1 is returned, with errno set to indicate the error.

ERRORS

EINTR
Interrupted by a signal; see signal(7).

EINVAL
usec is greater than or equal to 1000000. (On systems where that is considered an error.)

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

usleep()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

4.3BSD, POSIX.1-2001. POSIX.1-2001 declares it obsolete, suggesting nanosleep(2) instead. Removed in POSIX.1-2008.

On the original BSD implementation, and before glibc 2.2.2, the return type of this function is void. The POSIX version returns int, and this is also the prototype used since glibc 2.2.2.

Only the EINVAL error return is documented by SUSv2 and POSIX.1-2001.

CAVEATS

The interaction of this function with the SIGALRM signal, and with other timer functions such as alarm(2), sleep(3), nanosleep(2), setitimer(2), timer_create(2), timer_delete(2), timer_getoverrun(2), timer_gettime(2), timer_settime(2), ualarm(3) is unspecified.

SEE ALSO

alarm(2), getitimer(2), nanosleep(2), select(2), setitimer(2), sleep(3), ualarm(3), useconds_t(3type), time(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

513 - Linux cli command Moose_Meta_Attribute_Native_Trait_Numberpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Attribute_Native_Trait_Numberpm and provides detailed information about the command Moose_Meta_Attribute_Native_Trait_Numberpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Attribute_Native_Trait_Numberpm.

NAME 🖥️ Moose_Meta_Attribute_Native_Trait_Numberpm 🖥️

Helper trait for Num attributes

VERSION

version 2.2207

SYNOPSIS

package Real; use Moose; has integer => ( traits => [Number], is => ro, isa => Num, default => 5, handles => { set => set, add => add, sub => sub, mul => mul, div => div, mod => mod, abs => abs, }, ); my $real = Real->new(); $real->add(5); # same as $real->integer($real->integer + 5); $real->sub(2); # same as $real->integer($real->integer - 2);

DESCRIPTION

This trait provides native delegation methods for numbers. All of the operations correspond to arithmetic operations like addition or multiplication.

DEFAULT TYPE

If you don’t provide an isa value for your attribute, it will default to Num.

PROVIDED METHODS

All of these methods modify the attribute’s value in place. All methods return the new value.

  • add($value) Adds the current value of the attribute to $value.

  • sub($value) Subtracts $value from the current value of the attribute.

  • mul($value) Multiplies the current value of the attribute by $value.

  • div($value) Divides the current value of the attribute by $value.

  • mod($value) Returns the current value of the attribute modulo $value.

  • abs Sets the current value of the attribute to its absolute value.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

514 - Linux cli command Moose_Meta_TypeConstraint_Enumpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_TypeConstraint_Enumpm and provides detailed information about the command Moose_Meta_TypeConstraint_Enumpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_TypeConstraint_Enumpm.

NAME 🖥️ Moose_Meta_TypeConstraint_Enumpm 🖥️

Type constraint for enumerated values.

VERSION

version 2.2207

DESCRIPTION

This class represents type constraints based on an enumerated list of acceptable values.

INHERITANCE

Moose::Meta::TypeConstraint::Enum is a subclass of Moose::Meta::TypeConstraint.

METHODS

Moose::Meta::TypeConstraint::Enum->new(%options)

This creates a new enum type constraint based on the given %options.

It takes the same options as its parent, with several exceptions. First, it requires an additional option, values. This should be an array reference containing a list of valid string values. Second, it automatically sets the parent to the Str type.

Finally, it ignores any provided constraint option. The constraint is generated automatically based on the provided values.

$constraint->values

Returns the array reference of acceptable values provided to the constructor.

$constraint->create_child_type

This returns a new Moose::Meta::TypeConstraint object with the type as its parent.

Note that it does not return a Moose::Meta::TypeConstraint::Enum object!

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

515 - Linux cli command SIMPLEQ_INSERT_HEAD

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SIMPLEQ_INSERT_HEAD and provides detailed information about the command SIMPLEQ_INSERT_HEAD, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SIMPLEQ_INSERT_HEAD.

NAME 🖥️ SIMPLEQ_INSERT_HEAD 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

516 - Linux cli command pthread_setcanceltype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_setcanceltype and provides detailed information about the command pthread_setcanceltype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_setcanceltype.

NAME 🖥️ pthread_setcanceltype 🖥️

set cancelability state and type

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_setcancelstate(int state, int *oldstate);
int pthread_setcanceltype(int type, int *oldtype);

DESCRIPTION

The pthread_setcancelstate() sets the cancelability state of the calling thread to the value given in state. The previous cancelability state of the thread is returned in the buffer pointed to by oldstate. The state argument must have one of the following values:

PTHREAD_CANCEL_ENABLE
The thread is cancelable. This is the default cancelability state in all new threads, including the initial thread. The thread’s cancelability type determines when a cancelable thread will respond to a cancelation request.

PTHREAD_CANCEL_DISABLE
The thread is not cancelable. If a cancelation request is received, it is blocked until cancelability is enabled.

The pthread_setcanceltype() sets the cancelability type of the calling thread to the value given in type. The previous cancelability type of the thread is returned in the buffer pointed to by oldtype. The type argument must have one of the following values:

PTHREAD_CANCEL_DEFERRED
A cancelation request is deferred until the thread next calls a function that is a cancelation point (see pthreads(7)). This is the default cancelability type in all new threads, including the initial thread.

Even with deferred cancelation, a cancelation point in an asynchronous signal handler may still be acted upon and the effect is as if it was an asynchronous cancelation.

PTHREAD_CANCEL_ASYNCHRONOUS
The thread can be canceled at any time. (Typically, it will be canceled immediately upon receiving a cancelation request, but the system doesn’t guarantee this.)

The set-and-get operation performed by each of these functions is atomic with respect to other threads in the process calling the same function.

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

The pthread_setcancelstate() can fail with the following error:

EINVAL
Invalid value for state.

The pthread_setcanceltype() can fail with the following error:

EINVAL
Invalid value for type.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_setcancelstate(), pthread_setcanceltype()

Thread safety

MT-Safe

pthread_setcancelstate(), pthread_setcanceltype()

Async-cancel safety

AC-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.0 POSIX.1-2001.

NOTES

For details of what happens when a thread is canceled, see pthread_cancel(3).

Briefly disabling cancelability is useful if a thread performs some critical action that must not be interrupted by a cancelation request. Beware of disabling cancelability for long periods, or around operations that may block for long periods, since that will render the thread unresponsive to cancelation requests.

Asynchronous cancelability

Setting the cancelability type to PTHREAD_CANCEL_ASYNCHRONOUS is rarely useful. Since the thread could be canceled at any time, it cannot safely reserve resources (e.g., allocating memory with malloc(3)), acquire mutexes, semaphores, or locks, and so on. Reserving resources is unsafe because the application has no way of knowing what the state of these resources is when the thread is canceled; that is, did cancelation occur before the resources were reserved, while they were reserved, or after they were released? Furthermore, some internal data structures (e.g., the linked list of free blocks managed by the malloc(3) family of functions) may be left in an inconsistent state if cancelation occurs in the middle of the function call. Consequently, clean-up handlers cease to be useful.

Functions that can be safely asynchronously canceled are called async-cancel-safe functions. POSIX.1-2001 and POSIX.1-2008 require only that pthread_cancel(3), pthread_setcancelstate(), and pthread_setcanceltype() be async-cancel-safe. In general, other library functions can’t be safely called from an asynchronously cancelable thread.

One of the few circumstances in which asynchronous cancelability is useful is for cancelation of a thread that is in a pure compute-bound loop.

Portability notes

The Linux threading implementations permit the oldstate argument of pthread_setcancelstate() to be NULL, in which case the information about the previous cancelability state is not returned to the caller. Many other implementations also permit a NULL oldstat argument, but POSIX.1 does not specify this point, so portable applications should always specify a non-NULL value in oldstate. A precisely analogous set of statements applies for the oldtype argument of pthread_setcanceltype().

EXAMPLES

See pthread_cancel(3).

SEE ALSO

pthread_cancel(3), pthread_cleanup_push(3), pthread_testcancel(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

517 - Linux cli command timegm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command timegm and provides detailed information about the command timegm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the timegm.

NAME 🖥️ timegm 🖥️

inverses of gmtime and localtime

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <time.h>
[[deprecated]] time_t timelocal(struct tm *tm);
time_t timegm(struct tm *tm);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

timelocal(), timegm():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The functions timelocal() and timegm() are the inverses of localtime(3) and gmtime(3). Both functions take a broken-down time and convert it to calendar time (seconds since the Epoch, 1970-01-01 00:00:00 +0000, UTC). The difference between the two functions is that timelocal() takes the local timezone into account when doing the conversion, while timegm() takes the input value to be Coordinated Universal Time (UTC).

RETURN VALUE

On success, these functions return the calendar time (seconds since the Epoch), expressed as a value of type time_t. On error, they return the value (time_t) -1 and set errno to indicate the error.

ERRORS

EOVERFLOW
The result cannot be represented.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

timelocal(), timegm()

Thread safetyMT-Safe env locale

STANDARDS

BSD.

HISTORY

GNU, BSD.

The timelocal() function is equivalent to the POSIX standard function mktime(3). There is no reason to ever use it.

SEE ALSO

gmtime(3), localtime(3), mktime(3), tzset(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

518 - Linux cli command XtHasCallbacks

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtHasCallbacks and provides detailed information about the command XtHasCallbacks, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtHasCallbacks.

NAME 🖥️ XtHasCallbacks 🖥️

process callbacks

SYNTAX

#include <X11/Intrinsic.h>

void XtCallCallbacks(Widget w, const char *callback_name, XtPointer call_data);

void XtCallCallbackList(Widget w, XtCallbackList callbacks, XtPointer call_data);

typedef enum {XtCallbackNoList, XtCallbackHasNone, XtCallbackHasSome} XtCallbackStatus;

XtCallbackStatus XtHasCallbacks(Widget w, const char *callback_name);

ARGUMENTS

callback_name
Specifies the callback list to be executed or checked.

call_data
Specifies a callback-list specific data value to pass to each of the callback procedure in the list.

callbacks
Specifies the callback list to be executed.

  1. Specifies the widget.

DESCRIPTION

The XtCallCallbacks function calls each procedure that is registered in the specified widget’s callback list.

If callbacks is not NULL, XtCallCallbackList calls each of the callback procedures in the list, passing client data and call_data. The callbacks parameter must specify the contents of a widget or object resource declared with representation type XtRCallback.

The XtHasCallbacks function first checks to see if the widget has a callback list identified by callback_name. If the callback list does not exist, XtHasCallbacks returns XtCallbackNoList. If the callback list exists but is empty, it returns XtCallbackHasNone. If the callback list exists and has at least one callback registered, it returns XtCallbackHasSome.

SEE ALSO

XtAddCallback(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

519 - Linux cli command XtUnmanageChildren

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtUnmanageChildren and provides detailed information about the command XtUnmanageChildren, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtUnmanageChildren.

NAME 🖥️ XtUnmanageChildren 🖥️

manage and unmanage children

SYNTAX

#include <X11/Intrinsic.h>

typedef Widget *WidgetList;

void XtManageChildren(WidgetList children, Cardinal num_children);

void XtManageChild(Widget child);

void XtUnmanageChildren(WidgetList children, Cardinal num_children);

void XtUnmanageChild(Widget child);

void XtChangeManagedSet(WidgetList unmanage_children, Cardinal num_unmanage_children, XtDoChangeProc do_change_proc, XtPointer client_data, WidgetList manage_children, Cardinal num_manage_children);

Boolean XtIsManaged(Widget widget);

ARGUMENTS

child
Specifies the child.

children
Specifies a list of child widgets.

num_children
Specifies the number of children.

widget
Specifies the widget.

manage_children
Specifies the list of widget children to add to the managed set.

num_manage_children
Specifies the number of entries in the manage_children list.

unmanage_children
Specifies the list of widget children to remove from the managed set.

num_unmanage_children
Specifies the number of entries in the unmanage_children list.

do_change_proc
Specifies the post unmanage, pre manage hook procedure to invoke.

client_data
Specifies the client data to be passed to the hook procedure.

DESCRIPTION

The XtManageChildren function performs the following:

  • Issues an error if the children do not all have the same parent or if the parent is not a subclass of compositeWidgetClass.

  • Returns immediately if the common parent is being destroyed; otherwise, for each unique child on the list, XtManageChildren ignores the child if it already is managed or is being destroyed and marks it if not.

  • If the parent is realized and after all children have been marked, it makes some of the newly managed children viewable:

    • Calls the change_managed routine of the widgets’ parent.

    • Calls XtRealizeWidget on each previously unmanaged child that is unrealized.

    • Maps each previously unmanaged child that has map_when_managed True.

Managing children is independent of the ordering of children and independent of creating and deleting children. The layout routine of the parent should consider children whose managed field is True and should ignore all other children. Note that some composite widgets, especially fixed boxes, call XtManageChild from their insert_child procedure.

If the parent widget is realized, its change_managed procedure is called to notify it that its set of managed children has changed. The parent can reposition and resize any of its children. It moves each child as needed by calling XtMoveWidget, which first updates the x and y fields and then calls XMoveWindow if the widget is realized.

The XtManageChild function constructs a WidgetList of length one and calls XtManageChildren.

The XtUnmanageChildren function performs the following:

  • Issues an error if the children do not all have the same parent or if the parent is not a subclass of compositeWidgetClass.

  • Returns immediately if the common parent is being destroyed; otherwise, for each unique child on the list, XtUnmanageChildren performs the following:

    • Ignores the child if it already is unmanaged or is being destroyed and marks it if not.

    • If the child is realized, it makes it nonvisible by unmapping it.

  • Calls the change_managed routine of the widgets’ parent after all children have been marked if the parent is realized.

XtUnmanageChildren does not destroy the children widgets. Removing widgets from a parent’s managed set is often a temporary banishment, and, some time later, you may manage the children again.

The XtUnmanageChild function constructs a widget list of length one and calls XtUnmanageChildren.

The XtChangeManagedSet function performs the following:

  • Issues an error if the widgets specified in the manage_children and the unmanage_children lists to no all have the same parent, or if that parent is not a subclass of compositeWidgetClass.

  • Returns immediately if the common parent is being destroyed.

  • If no CompositeClassExtension is defined, or a CompositeClassExtension is defined but with an allows_change_managed_set field with a value of False, and XtChangeManagedSet was invoked with a non-NULL do_change_proc procedure then XtChangeManagedSet performs the following:

    • Calls XtUnmanageChildren (unmanage_children, num_unmanage_children).

    • Calls the do_change_proc specified.

    • Calls XtManageChildren (manage_children, num_manage_children) and then returns immediately.

  • Otherwise, if a CompositeClassExtension is defined with an allows_change_managed_set field with a value of True, or if no CompositeClassExtension is defined, and XtChangeManagedSet was invoked with a NULL do_change_proc procedure, then the following is performed:

    • For each child on the unmanage_children list; if the child is already unmanaged or is being destroyed it is ignored, otherwise it is marked as being unmanaged and if it is realized it is made nonvisible by being unmapped.

    • If the do_change_proc procedure is non-NULL then it is invoked as specified.

    • For each child on the manage_children list; if the child is already managed or it is being destroyed it is ignored, otherwise it is marked as managed

  • If the parent is realized and after all children have been marked, the change_managed method of the parent is invoked and subsequently some of the newly managed children are made viewable by:

    • Calling XtRealizeWidget on each of the previously unmanaged child that is unrealized.

    • Mapping each previously unmanaged child that has map_when_managed True.

The XtIsManaged function returns True if the specified widget is of class RectObj or any subclass thereof and is managed, or False otherwise.

SEE ALSO

XtMapWidget(3), XtRealizeWidget(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

520 - Linux cli command XtWarning

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtWarning and provides detailed information about the command XtWarning, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtWarning.

NAME 🖥️ XtWarning 🖥️

low-level error handlers

SYNTAX

#include <X11/Intrinsic.h>

void XtError(const char *message);

void XtSetErrorHandler(XtErrorHandler handler);

void XtSetWarningHandler(XtErrorHandler handler);

void XtWarning(const char *message);

ARGUMENTS

message
Specifies the nonfatal error message that is to be reported.

handler
Specifies the new fatal error procedure, which should not return, or the nonfatal error procedure, which usually returns.

message
Specifies the message that is to be reported.

DESCRIPTION

The XtError function has been superceded by XtAppError.

The XtSetErrorHandler function has been superceded by XtAppSetErrorHandler.

The XtSetWarningHandler function has been superceded by XtAppSetWarningHandler.

The XtWarning function has been superceded by XtAppWarning.

SEE ALSO

XtAppError(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

521 - Linux cli command Tk_selectionpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_selectionpm and provides detailed information about the command Tk_selectionpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_selectionpm.

NAME 🖥️ Tk_selectionpm 🖥️

Manipulate the X selection

SYNOPSIS

$widget->SelectionOption?(args)?

DESCRIPTION

This command provides an interface to the X selection mechanism and implements the full selection functionality described in the X Inter-Client Communication Conventions Manual (ICCCM).

The widget object used to invoke the methods below determines which display is used to access the selection. In order to avoid conflicts with selection methods of widget classes (e.g. Text) this set of methods uses the prefix Selection. The following methods are currently supported:

$widget->SelectionClear?(-selection=>selection)?
If selection exists anywhere on $widget’s display, clear it so that no window owns the selection anymore. Selection specifies the X selection that should be cleared, and should be an atom name such as PRIMARY or CLIPBOARD; see the Inter-Client Communication Conventions Manual for complete details. Selection defaults to PRIMARY. Returns an empty string.

$widget->SelectionGet?(?-selection=>selection?,?-type=>type?)?
Retrieves the value of selection from $widget’s display and returns it as a result. Selection defaults to PRIMARY. Type specifies the form in which the selection is to be returned (the desired ``target’’ for conversion, in ICCCM terminology), and should be an atom name such as STRING or FILE_NAME; see the Inter-Client Communication Conventions Manual for complete details. Type defaults to STRING. The selection owner may choose to return the selection in any of several different representation formats, such as STRING, ATOM, INTEGER, etc. (this format is different than the selection type; see the ICCCM for all the confusing details). If format is not STRING then things get messy, the following description is from the Tcl/Tk man page as yet incompetely translated for the perl version - it is misleading at best. If the selection is returned in a non-string format, such as INTEGER or ATOM, the SelectionGet converts it to a list of perl values: atoms are converted to their textual names, and anything else is converted integers. A goal of the perl port is to provide better handling of different formats than Tcl/Tk does, which should be possible given perl’s wider range of ``types’’. Although some thought went into this in very early days of perl/Tk what exactly happens is still “not quite right” and subject to change.

$widget->SelectionHandle(?-selection=>selection?,?-type=>type?,?-format=>format? callback)
Creates a handler for selection requests, such that callback will be executed whenever selection is owned by $widget and someone attempts to retrieve it in the form given by type (e.g. type is specified in the selection get command). Selection defaults to PRIMARY, type defaults to STRING, and format defaults to STRING. If callback is an empty string then any existing handler for $widget, type, and selection is removed. When selection is requested, $widget is the selection owner, and type is the requested type, callback will be executed with two additional arguments. The two additional arguments are offset and maxBytes: offset specifies a starting character position in the selection and maxBytes gives the maximum number of bytes to retrieve. The command should return a value consisting of at most maxBytes of the selection, starting at position offset. For very large selections (larger than maxBytes) the selection will be retrieved using several invocations of callback with increasing offset values. If callback returns a string whose length is less than maxBytes, the return value is assumed to include all of the remainder of the selection; if the length of callback’s result is equal to maxBytes then callback will be invoked again, until it eventually returns a result shorter than maxBytes. The value of maxBytes will always be relatively large (thousands of bytes). If callback returns an error (e.g. via die) then the selection retrieval is rejected just as if the selection didn’t exist at all. The format argument specifies the representation that should be used to transmit the selection to the requester (the second column of Table 2 of the ICCCM), and defaults to STRING. If format is STRING, the selection is transmitted as 8-bit ASCII characters (i.e. just in the form returned by command). If format is not STRING then things get messy, the following description is from the Tcl/Tk man page as yet untranslated for the perl version - it is misleading at best. If format is ATOM, then the return value from command is divided into fields separated by white space; each field is converted to its atom value, and the 32-bit atom value is transmitted instead of the atom name. For any other format, the return value from command is divided into fields separated by white space and each field is converted to a 32-bit integer; an array of integers is transmitted to the selection requester. The format argument is needed only for compatibility with many selection requesters, except Tcl/Tk. If Tcl/Tk is being used to retrieve the selection then the value is converted back to a string at the requesting end, so format is irrelevant. A goal of the perl port is to provide better handling of different formats than Tcl/Tk does, which should be possible given perl’s wider range of ``types’’. Although some thought went into this in very early days of perl/Tk what exactly happens is still “not quite right” and subject to change.

$widget->SelectionOwner?(-selection=>selection)?
SelectionOwner returns the window in this application that owns selection on the display containing $widget, or an empty string if no window in this application owns the selection. Selection defaults to PRIMARY.

$widget->SelectionOwn?(?-command=>callback?,?-selection=>selection?)?
SelectionOwn causes $widget to become the new owner of selection on $widget’s display, returning an empty string as result. The existing owner, if any, is notified that it has lost the selection. If callback is specified, it will be executed when some other window claims ownership of the selection away from $widget. Selection defaults to PRIMARY.

KEYWORDS

clear, format, handler, ICCCM, own, selection, target, type

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

522 - Linux cli command HUGE_VAL

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HUGE_VAL and provides detailed information about the command HUGE_VAL, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HUGE_VAL.

NAME 🖥️ HUGE_VAL 🖥️

floating-point constants

LIBRARY

Math library (libm)

SYNOPSIS

#define _ISOC99_SOURCE /* See feature_test_macros(7) */
#include <math.h>
INFINITY
NAN
HUGE_VAL
HUGE_VALF
HUGE_VALL

DESCRIPTION

The macro INFINITY expands to a float constant representing positive infinity.

The macro NAN expands to a float constant representing a quiet NaN (when supported). A quiet NaN is a NaN (“not-a-number”) that does not raise exceptions when it is used in arithmetic. The opposite is a signaling NaN. See IEC 60559:1989.

The macros HUGE_VAL, HUGE_VALF, HUGE_VALL expand to constants of types double, float, and long double, respectively, that represent a large positive value, possibly positive infinity.

STANDARDS

C11.

HISTORY

C99.

On a glibc system, the macro HUGE_VAL is always available. Availability of the NAN macro can be tested using #ifdef NAN, and similarly for INFINITY, HUGE_VALF, HUGE_VALL. They will be defined by <math.h> if _ISOC99_SOURCE or _GNU_SOURCE is defined, or __STDC_VERSION__ is defined and has a value not less than 199901L.

SEE ALSO

fpclassify(3), math_error(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

523 - Linux cli command Image_ExifTool_Audiblepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Audiblepm and provides detailed information about the command Image_ExifTool_Audiblepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Audiblepm.

NAME 🖥️ Image_ExifTool_Audiblepm 🖥️

Read meta information from Audible audio books

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read meta information from Audible audio books.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<https://github.com/jteeuwen/audible>

<https://code.google.com/p/pyaudibletags/>

<http://wiki.multimedia.cx/index.php?title=Audible_Audio>

SEE ALSO

“Audible Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

524 - Linux cli command Tk_IOpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_IOpm and provides detailed information about the command Tk_IOpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_IOpm.

NAME 🖥️ Tk_IOpm 🖥️

high level interface to Tk’s ‘fileevent’ mechanism

SYNOPSIS

my $fh = Tk::IO->new(-linecommand => callback, -childcommand => callback); $fh->exec(“command”) $fh->wait $fh->kill

WARNING

INTERFACES TO THIS MODULE MAY CHANGE AS PERL’S IO EVOLVES AND WITH PORT OF TK4.1

DESCRIPTION

Tk::IO is now layered on perl’s IO::Handle class. Interfaces have changed, and are still evolving.

In theory C methods which enable non-blocking IO as in earlier Tk-b* release(s) are still there. I have not changed them to use perl’s additional Configure information, or tested them much.

Assumption is that exec is used to fork a child process and a callback is called each time a complete line arrives up the implied pipe.

“line” should probably be defined in terms of perl’s input record separator but is not yet.

The -childcommand callback is called when end-of-file occurs.

$fh->wait can be used to wait for child process while processing other Tk events.

$fh->kill can be used to send signal to child process.

BUGS

Still not finished. Idea is to use “exec” to emulate “system” in a non-blocking manner.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

525 - Linux cli command URI_Escapepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command URI_Escapepm and provides detailed information about the command URI_Escapepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the URI_Escapepm.

NAME 🖥️ URI_Escapepm 🖥️

Percent-encode and percent-decode unsafe characters

SYNOPSIS

use URI::Escape; $safe = uri_escape(“10% is enough “); $verysafe = uri_escape(“foo”, “�-\377”); $str = uri_unescape($safe);

DESCRIPTION

This module provides functions to percent-encode and percent-decode URI strings as defined by RFC 3986. Percent-encoding URI’s is informally called “URI escaping”. This is the terminology used by this module, which predates the formalization of the terms by the RFC by several years.

A URI consists of a restricted set of characters. The restricted set of characters consists of digits, letters, and a few graphic symbols chosen from those common to most of the character encodings and input facilities available to Internet users. They are made up of the “unreserved” and “reserved” character sets as defined in RFC 3986.

unreserved = ALPHA / DIGIT / “-” / “.” / “_” / “~” reserved = “:” / “/” / “?” / “#” / “[” / “]” / “@” “!” / “$” / “&” / "” / “(” / “)” / “*” / “+” / “,” / “;” / “=”

In addition, any byte (octet) can be represented in a URI by an escape sequence: a triplet consisting of the character “%” followed by two hexadecimal digits. A byte can also be represented directly by a character, using the US-ASCII character for that octet.

Some of the characters are reserved for use as delimiters or as part of certain URI components. These must be escaped if they are to be treated as ordinary data. Read RFC 3986 for further details.

The functions provided (and exported by default) from this module are:

uri_escape( $string )

uri_escape( $string, $unsafe )

Replaces each unsafe character in the $string with the corresponding escape sequence and returns the result. The $string argument should be a string of bytes. The uri_escape() function will croak if given a characters with code above 255. Use uri_escape_utf8() if you know you have such chars or/and want chars in the 128 .. 255 range treated as UTF-8. The uri_escape() function takes an optional second argument that overrides the set of characters that are to be escaped. The set is specified as a string that can be used in a regular expression character class (between [ ]). E.g.: “�--�” # all control and hi-bit characters “a-z” # all lower case characters “^A-Za-z” # everything not a letter The default set of characters to be escaped is all those which are not part of the unreserved character class shown above as well as the reserved characters. I.e. the default is: “^A-Za-z0-9\_~” The second argument can also be specified as a regular expression object: qr/[^A-Za-z]/ Any strings matched by this regular expression will have all of their characters escaped.

uri_escape_utf8( $string )

uri_escape_utf8( $string, $unsafe )

Works like uri_escape(), but will encode chars as UTF-8 before escaping them. This makes this function able to deal with characters with code above 255 in $string. Note that chars in the 128 .. 255 range will be escaped differently by this function compared to what uri_escape() would. For chars in the 0 .. 127 range there is no difference. Equivalent to: utf8::encode($string); my $uri = uri_escape($string); Note: JavaScript has a function called escape() that produces the sequence “%uXXXX” for chars in the 256 .. 65535 range. This function has really nothing to do with URI escaping but some folks got confused since it “does the right thing” in the 0 .. 255 range. Because of this you sometimes see “URIs” with these kind of escapes. The JavaScript encodeURIComponent() function is similar to uri_escape_utf8().

uri_unescape($string,…)
Returns a string with each %XX sequence replaced with the actual byte (octet). This does the same as: $string =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg; but does not modify the string in-place as this RE would. Using the uri_unescape() function instead of the RE might make the code look cleaner and is a few characters less to type. In a simple benchmark test I did, calling the function (instead of the inline RE above) if a few chars were unescaped was something like 40% slower, and something like 700% slower if none were. If you are going to unescape a lot of times it might be a good idea to inline the RE. If the uri_unescape() function is passed multiple strings, then each one is returned unescaped.

The module can also export the %escapes hash, which contains the mapping from all 256 bytes to the corresponding escape codes. Lookup in this hash is faster than evaluating sprintf("%%%02X", ord($byte)) each time.

SEE ALSO

URI

COPYRIGHT

Copyright 1995-2004 Gisle Aas.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

526 - Linux cli command X11_Protocol_Connection_FileHandlepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command X11_Protocol_Connection_FileHandlepm and provides detailed information about the command X11_Protocol_Connection_FileHandlepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the X11_Protocol_Connection_FileHandlepm.

NAME 🖥️ X11_Protocol_Connection_FileHandlepm 🖥️

Perl module base class for FileHandle-based X11 connections

SYNOPSIS

package X11::Protocol::Connection::WeirdFH; use X11::Protocol::Connection::FileHandle; @ISA = (X11::Protocol::Connection::FileHandle)

DESCRIPTION

This module defines get(), give() and fh() methods common to X11::Protocol::Connection types that are based on the FileHandle package. They expect the object they are called with to be a reference to a FileHandle.

AUTHOR

Stephen McCamant <[email protected]>.

SEE ALSO

perl (1), X11::Protocol, X11::Protocol::Connection::INETFH, X11::Protocol::Connection::UNIXFH, FileHandle.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

527 - Linux cli command Image_ExifTool_Motorolapm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Motorolapm and provides detailed information about the command Image_ExifTool_Motorolapm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Motorolapm.

NAME 🖥️ Image_ExifTool_Motorolapm 🖥️

Read Motorola meta information

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains the definitions to read meta information from Motorola cell phone images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

“Motorola Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

528 - Linux cli command LIST_INIT

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LIST_INIT and provides detailed information about the command LIST_INIT, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LIST_INIT.

NAME 🖥️ LIST_INIT 🖥️

implementation of a doubly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
LIST_ENTRY(TYPE);
LIST_HEAD(HEADNAME, TYPE);
LIST_HEAD LIST_HEAD_INITIALIZER(LIST_HEAD head);
void LIST_INIT(LIST_HEAD *head);
int LIST_EMPTY(LIST_HEAD *head);
void LIST_INSERT_HEAD(LIST_HEAD *head,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
struct TYPE *LIST_FIRST(LIST_HEAD *head);
struct TYPE *LIST_NEXT(struct TYPE *elm, LIST_ENTRY NAME);
LIST_FOREACH(struct TYPE *var, LIST_HEAD *head, LIST_ENTRY NAME);
void LIST_REMOVE(struct TYPE *elm, LIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type LIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro LIST_HEAD().

Creation

A list is headed by a structure defined by the LIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are doubly linked so that an arbitrary element can be removed without traversing the list. New elements can be added to the list after an existing element, before an existing element, or at the head of the list. A LIST_HEAD structure is declared as follows:

LIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

LIST_ENTRY() declares a structure that connects the elements in the list.

LIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

LIST_INIT() initializes the list referenced by head.

LIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

LIST_INSERT_HEAD() inserts the new element elm at the head of the list.

LIST_INSERT_BEFORE() inserts the new element elm before the element listelm.

LIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

LIST_FIRST() returns the first element in the list, or NULL if the list is empty.

LIST_NEXT() returns the next element in the list, or NULL if this is the last.

LIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

LIST_REMOVE() removes the element elm from the list.

RETURN VALUE

LIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

LIST_FIRST(), and LIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

LIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

LIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. LIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    LIST_ENTRY(entry) entries;              /* List */
};
LIST_HEAD(listhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct listhead head;                   /* List head */
    int i;
    LIST_INIT(&head);                       /* Initialize the list */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    LIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    LIST_INSERT_AFTER(n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    LIST_INSERT_BEFORE(n2, n3, entries);
    i = 0;                                  /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        np->data = i++;
    LIST_REMOVE(n2, entries);               /* Deletion */
    free(n2);
                                            /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* List deletion */ n1 = LIST_FIRST(&head); while (n1 != NULL) { n2 = LIST_NEXT(n1, entries); free(n1); n1 = n2; } LIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

529 - Linux cli command if_indextoname

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command if_indextoname and provides detailed information about the command if_indextoname, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the if_indextoname.

NAME 🖥️ if_indextoname 🖥️

mappings between network interface names and indexes

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <net/if.h>
unsigned int if_nametoindex(const char *ifname);
char *if_indextoname(unsigned int ifindex, char *ifname);

DESCRIPTION

The if_nametoindex() function returns the index of the network interface corresponding to the name ifname.

The if_indextoname() function returns the name of the network interface corresponding to the interface index ifindex. The name is placed in the buffer pointed to by ifname. The buffer must allow for the storage of at least IF_NAMESIZE bytes.

RETURN VALUE

On success, if_nametoindex() returns the index number of the network interface; on error, 0 is returned and errno is set to indicate the error.

On success, if_indextoname() returns ifname; on error, NULL is returned and errno is set to indicate the error.

ERRORS

if_nametoindex() may fail and set errno if:

ENODEV
No interface found with given name.

if_indextoname() may fail and set errno if:

ENXIO
No interface found for the index.

if_nametoindex() and if_indextoname() may also fail for any of the errors specified for socket(2) or ioctl(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

if_nametoindex(), if_indextoname()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008, RFC 3493.

HISTORY

POSIX.1-2001. BSDi.

SEE ALSO

getifaddrs(3), if_nameindex(3), ifconfig(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

530 - Linux cli command Tk_JPEGpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_JPEGpm and provides detailed information about the command Tk_JPEGpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_JPEGpm.

NAME 🖥️ Tk_JPEGpm 🖥️

JPEG loader for Tk::Photo

SYNOPSIS

use Tk; use Tk::JPEG; my $image = $widget->Photo(-format => jpeg, -file => something.jpg);

DESCRIPTION

This is an extension for Tk which supplies JPEG format loader for Photo image type.

JPEG access is via release 5 of the The Independent JPEG Group’s (IJG) free JPEG software.

HISTORY

This extension works for Tk800.015 and later and is by default bundled with Perl/Tk since Tk804.

AUTHOR

Nick Ing-Simmons <[email protected]>

SEE ALSO

Tk::Photo.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

531 - Linux cli command toupper_l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command toupper_l and provides detailed information about the command toupper_l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the toupper_l.

NAME 🖥️ toupper_l 🖥️

convert uppercase or lowercase

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int toupper(int c);
int tolower(int c);
int toupper_l(int c, locale_t locale);
int tolower_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

toupper_l(), tolower_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions convert lowercase letters to uppercase, and vice versa.

If c is a lowercase letter, toupper() returns its uppercase equivalent, if an uppercase representation exists in the current locale. Otherwise, it returns c. The toupper_l() function performs the same task, but uses the locale referred to by the locale handle locale.

If c is an uppercase letter, tolower() returns its lowercase equivalent, if a lowercase representation exists in the current locale. Otherwise, it returns c. The tolower_l() function performs the same task, but uses the locale referred to by the locale handle locale.

If c is neither an unsigned char value nor EOF, the behavior of these functions is undefined.

The behavior of toupper_l() and tolower_l() is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

RETURN VALUE

The value returned is that of the converted letter, or c if the conversion was not possible.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

toupper(), tolower(), toupper_l(), tolower_l()

Thread safetyMT-Safe

STANDARDS

toupper()
tolower()
C11, POSIX.1-2008.

toupper_l()
tolower_l()
POSIX.1-2008.

HISTORY

toupper()
tolower()
C89, 4.3BSD, POSIX.1-2001.

toupper_l()
tolower_l()
POSIX.1-2008.

NOTES

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what constitutes an uppercase or lowercase letter depend on the locale. For example, the default “C” locale does not know about umlauts, so no conversion is done for them.

In some non-English locales, there are lowercase letters with no corresponding uppercase equivalent; the German sharp s is one example.

SEE ALSO

isalpha(3), newlocale(3), setlocale(3), towlower(3), towupper(3), uselocale(3), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

532 - Linux cli command XShmPutImage

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XShmPutImage and provides detailed information about the command XShmPutImage, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XShmPutImage.

NAME 🖥️ XShmPutImage 🖥️

X Shared Memory extension functions

SYNTAX

#include <X11/Xlib.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
Bool	XShmQueryExtension(
	Display *display);
Bool XShmQueryVersion(
	Display *display;
	int *major, *minor;
	Bool *pixmaps);
int XShmPixmapFormat(
	Display *display);
Bool XShmAttach(
	Display *display;
	XShmSegmentInfo *shminfo);
Bool XShmDetach(
	Display *display;
	XShmSegmentInfo *shminfo);

XImage *XShmCreateImage (
	Display *display;
	Visual *visual;
	unsigned int depth;
	int format;
	char *data;
	XShmSegmentInfo *shminfo;
	unsigned int width, height);
Bool XShmPutImage(
	Display *display;
	Drawable d;
	GC gc;
	XImage *image;
	int src_x, src_y, dest_x, dest_y;
	unsigned int width, height;
	bool send_event);
Bool XShmGetImage (
	Display *display;
	Drawable d;
	XImage *image;
	int x, y;
	unsigned long plane_mask);
Pixmap XShmCreatePixmap(
        Display *display;
        Drawable d;
        char *data;
	XShmSegmentInfo *shminfo;
	unsigned int width, height, depth);
Status XShmGetEventBase(
	Display *display);

STRUCTURES

Events:
typedef struct {
    int type;               /* of event */
    unsigned long serial;   /* # of last request processed by server*/
    Bool send_event;        /* true if this came from a SendEvent request*/
    Display *display;       /* Display the event was read from */
    Drawable drawable;      /* drawable of request */
    int major_code;         /* ShmReqCode */
    int minor_code;         /* X_ShmPutImage */
    ShmSeg shmseg;          /* the ShmSeg used in the request*/
    unsigned long offset;   /* the offset into ShmSeg used in the request*/
} XShmCompletionEvent;
a structure of type XShmSegmentInfo :

typedef struct {
    ShmSeg shmseg;      /* resource id */
    int shmid;          /* kernel id */
    char *shmaddr;      /* address in client */
    Bool readOnly;      /* how the server should attach it */
} XShmSegmentInfo;

DESCRIPTION

* XShmQueryExtension * checks to see if the shared memory extensions are available for the specified display.

* XShmQueryVersion * returns the version numbers of the extension implementation. Shared memory pixmaps are supported if the pixmaps argument returns true.

* XShmAttach * tells the server to attach to your shared memory segment. If all goes well, you will get a non-zero status, back and your XImage is ready for use.

* XShmDetach * tells the server to detach from your shared memory segment.

* XShmPutImage * combines an image in memory with a shape of the specified drawable. If XYBitmap format is used, the depth must be one, or a ``BadMatch’’ error results. The foreground pixel in the GC defines the source for the one bits in the image, and the background pixel defines the source for the zero bits. For XYPixmap and ZPixmap, the depth must match the depth of the drawable, or a ``BadMatch’’ error results.

* XShmGetImage * reads image data into a shared memory XImage where display is the display of interest, drawable is the source drawable, image is the destination XImage, x and y are offsets within the drawable, and plane_mask defines which planes are to be read.

* XShmCreateImage * allocates the memory needed for an XImage structure for the specified display but does not allocate space for the image itself.

* XShmPixmapFormat * gets the format for the server. If your application can deal with the server pixmap data format, a shared memory segment and shminfo structure are created.

* XShmCreatePixmap * points to a pixmap which you can manipulate in all of the usual ways, with the added bonus of being able to edit its contents directly through the shared memory segment.

* XShmGetEventBase * gets the completion event value.

SEE ALSO

MIT-SHM - The MIT Shared Memory Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

533 - Linux cli command NetPacket_UDPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command NetPacket_UDPpm and provides detailed information about the command NetPacket_UDPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the NetPacket_UDPpm.

NAME 🖥️ NetPacket_UDPpm 🖥️

Assemble and disassemble UDP (User Datagram Protocol) packets.

VERSION

version 1.7.2

SYNOPSIS

use NetPacket::UDP; $udp_obj = NetPacket::UDP->decode($raw_pkt); $udp_pkt = $udp_obj->encode($l3_obj); $udp_data = NetPacket::UDP::strip($raw_pkt);

DESCRIPTION

NetPacket::UDP provides a set of routines for assembling and disassembling packets using UDP (User Datagram Protocol).

Methods

“NetPacket::UDP->decode([RAW PACKET])”
Decode the raw packet data given and return an object containing instance data. This method will quite happily decode garbage input. It is the responsibility of the programmer to ensure valid packet data is passed to this method.

“$udp_packet-<gt"encode($l3_obj)>
Return the encoded version of the UDP packet object. Needs part of the IP header contained (src_ip and dest_ip specifically) in $l3_obj, in order to calculate the UDP checksum. The length field will also be set automatically based on values provided.

Functions

“NetPacket::UDP::strip([RAW PACKET])”
Return the encapsulated data (or payload) contained in the UDP packet. This data is suitable to be used as input for other NetPacket::* modules. This function is equivalent to creating an object using the decode() constructor and returning the data field of that object.

Instance data

The instance data for the NetPacket::UDP object consists of the following fields.

src_port
The source UDP port for the datagram.

dest_port
The destination UDP port for the datagram.

len
The length (including length of header) in bytes for this packet.

cksum
The checksum value for this packet.

data
The encapsulated data (payload) for this packet.

IP data

The IP data for the $l3_obj object consists of the following fields. Additional items may be supplied as well as passing the whole object returned by NetPacket::IP->decode but are unnecessary.

src_ip
The source IP for the datagram

dest_ip
The destination IP for the datagram

Exports

default
none

exportable
udp_strip

tags
The following tags group together related exportable items.

“:strip”
Import the strip function udp_strip.

“:ALL”
All the above exportable items.

EXAMPLE

The following example prints the source IP address and port, the destination IP address and port, and the UDP packet length:

#!/usr/bin/perl -w use strict; use Net::PcapUtils; use NetPacket::Ethernet qw(:strip); use NetPacket::IP; use NetPacket::UDP; sub process_pkt { my($arg, $hdr, $pkt) = @_; my $ip_obj = NetPacket::IP->decode(eth_strip($pkt)); my $udp_obj = NetPacket::UDP->decode($ip_obj->{data}); print("$ip_obj->{src_ip}:$udp_obj->{src_port} -> “, “$ip_obj->{dest_ip}:$udp_obj->{dest_port} “, “$udp_obj->{len} “); } Net::PcapUtils::loop(\process_pkt, FILTER => udp);

The following is an example use in combination with Net::Divert to alter the payload of packets that pass through. All occurrences of foo will be replaced with bar. This example is easy to test with netcat, but otherwise makes little sense. :) Adapt to your needs:

use Net::Divert; use NetPacket::IP qw(IP_PROTO_UDP); use NetPacket::UDP; $divobj = Net::Divert->new(yourhost,9999); $divobj->getPackets(\alterPacket); sub alterPacket { my ($data, $fwtag) = @_; $ip_obj = NetPacket::IP->decode($data); if($ip_obj->{proto} == IP_PROTO_UDP) { # decode the UDP header $udp_obj = NetPacket::UDP->decode($ip_obj->{data}); # replace foo in the payload with bar $udp_obj->{data} =~ s/foo/bar/g; # re-encode the packet $ip_obj->{data} = $udp_obj->encode($udp_obj, $ip_obj); $data = $ip_obj->encode; } $divobj->putPacket($data,$fwtag); }

COPYRIGHT

Copyright (c) 2001 Tim Potter.

Copyright (c) 1995,1996,1997,1998,1999 ANU and CSIRO on behalf of the participants in the CRC for Advanced Computational Systems (‘ACSys’).

This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

AUTHOR

Tim Potter <[email protected]>

Stephanie Wehner <[email protected]>

Yanick Champoux <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

534 - Linux cli command llround

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command llround and provides detailed information about the command llround, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the llround.

NAME 🖥️ llround 🖥️

round to nearest integer

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
long lround(double x);
long lroundf(float x);
long lroundl(long double x);
long long llround(double x);
long long llroundf(float x);
long long llroundl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions round their argument to the nearest integer value, rounding halfway cases away from zero, regardless of the current rounding direction (see fenv(3)).

Note that unlike the round(3) and ceil(3), functions, the return type of these functions differs from that of their arguments.

RETURN VALUE

These functions return the rounded integer value.

If x is a NaN or an infinity, or the rounded value is too large to be stored in a long (long long in the case of the ll* functions), then a domain error occurs, and the return value is unspecified.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is a NaN or infinite, or the rounded value is too large
An invalid floating-point exception (FE_INVALID) is raised.

These functions do not set errno.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

lround(), lroundf(), lroundl(), llround(), llroundf(), llroundl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

ceil(3), floor(3), lrint(3), nearbyint(3), rint(3), round(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

535 - Linux cli command Moose_Cookbook_Basics_HTTP_SubtypesAndCoercionpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Basics_HTTP_SubtypesAndCoercionpm and provides detailed information about the command Moose_Cookbook_Basics_HTTP_SubtypesAndCoercionpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Basics_HTTP_SubtypesAndCoercionpm.

NAME 🖥️ Moose_Cookbook_Basics_HTTP_SubtypesAndCoercionpm 🖥️

Demonstrates subtypes and coercion use HTTP-related classes (Request, Protocol, etc.)

VERSION

version 2.2207

SYNOPSIS

package Request; use Moose; use Moose::Util::TypeConstraints; use HTTP::Headers (); use Params::Coerce (); use URI (); subtype My::Types::HTTP::Headers => as class_type(HTTP::Headers); coerce My::Types::HTTP::Headers => from ArrayRef => via { HTTP::Headers->new( @{$_} ) } => from HashRef => via { HTTP::Headers->new( %{$_} ) }; subtype My::Types::URI => as class_type(URI); coerce My::Types::URI => from Object => via { $_->isa(URI) ? $_ : Params::Coerce::coerce( URI, $_ ); } => from Str => via { URI->new( $_, http ) }; subtype Protocol => as Str => where { /^HTTP\[0-9]\[0-9]$/ }; has base => ( is => rw, isa => My::Types::URI, coerce => 1 ); has uri => ( is => rw, isa => My::Types::URI, coerce => 1 ); has method => ( is => rw, isa => Str ); has protocol => ( is => rw, isa => Protocol ); has headers => ( is => rw, isa => My::Types::HTTP::Headers, coerce => 1, default => sub { HTTP::Headers->new } );

DESCRIPTION

This recipe introduces type coercions, which are defined with the coerce sugar function. Coercions are attached to existing type constraints, and define a (one-way) transformation from one type to another.

This is very powerful, but it can also have unexpected consequences, so you have to explicitly ask for an attribute to be coerced. To do this, you must set the coerce attribute option to a true value.

First, we create the subtype to which we will coerce the other types:

subtype My::Types::HTTP::Headers => as class_type(HTTP::Headers);

We are creating a subtype rather than using HTTP::Headers as a type directly. The reason we do this is that coercions are global, and a coercion defined for HTTP::Headers in our Request class would then be defined for all Moose-using classes in the current Perl interpreter. It’s a best practice to avoid this sort of namespace pollution.

The class_type sugar function is simply a shortcut for this:

subtype HTTP::Headers => as Object => where { $_->isa(HTTP::Headers) };

Internally, Moose creates a type constraint for each Moose-using class, but for non-Moose classes, the type must be declared explicitly.

We could go ahead and use this new type directly:

has headers => ( is => rw, isa => My::Types::HTTP::Headers, default => sub { HTTP::Headers->new } );

This creates a simple attribute which defaults to an empty instance of HTTP::Headers.

The constructor for HTTP::Headers accepts a list of key-value pairs representing the HTTP header fields. In Perl, such a list could be stored in an ARRAY or HASH reference. We want our headers attribute to accept those data structures instead of an HTTP::Headers instance, and just do the right thing. This is exactly what coercion is for:

coerce My::Types::HTTP::Headers => from ArrayRef => via { HTTP::Headers->new( @{$_} ) } => from HashRef => via { HTTP::Headers->new( %{$_} ) };

The first argument to coerce is the type to which we are coercing. Then we give it a set of from/via clauses. The from function takes some other type name and via takes a subroutine reference which actually does the coercion.

However, defining the coercion doesn’t do anything until we tell Moose we want a particular attribute to be coerced:

has headers => ( is => rw, isa => My::Types::HTTP::Headers, coerce => 1, default => sub { HTTP::Headers->new } );

Now, if we use an ArrayRef or HashRef to populate headers, it will be coerced into a new HTTP::Headers instance. With the coercion in place, the following lines of code are all equivalent:

$foo->headers( HTTP::Headers->new( bar => 1, baz => 2 ) ); $foo->headers( [ bar, 1, baz, 2 ] ); $foo->headers( { bar => 1, baz => 2 } );

As you can see, careful use of coercions can produce a very open interface for your class, while still retaining the “safety” of your type constraint checks. (1)

Our next coercion shows how we can leverage existing CPAN modules to help implement coercions. In this case we use Params::Coerce.

Once again, we need to declare a class type for our non-Moose URI class:

subtype My::Types::URI => as class_type(URI);

Then we define the coercion:

coerce My::Types::URI => from Object => via { $_->isa(URI) ? $_ : Params::Coerce::coerce( URI, $_ ); } => from Str => via { URI->new( $_, http ) };

The first coercion takes any object and makes it a URI object. The coercion system isn’t that smart, and does not check if the object is already a URI, so we check for that ourselves. If it’s not a URI already, we let Params::Coerce do its magic, and we just use its return value.

If Params::Coerce didn’t return a URI object (for whatever reason), Moose would throw a type constraint error.

The other coercion takes a string and converts it to a URI. In this case, we are using the coercion to apply a default behavior, where a string is assumed to be an http URI.

Finally, we need to make sure our attributes enable coercion.

has base => ( is => rw, isa => My::Types::URI, coerce => 1 ); has uri => ( is => rw, isa => My::Types::URI, coerce => 1 );

Re-using the coercion lets us enforce a consistent API across multiple attributes.

CONCLUSION

This recipe showed the use of coercions to create a more flexible and DWIM-y API. Like any powerful feature, we recommend some caution. Sometimes it’s better to reject a value than just guess at how to DWIM.

We also showed the use of the class_type sugar function as a shortcut for defining a new subtype of Object.

FOOTNOTES

  1. This particular example could be safer. Really we only want to coerce an array with an even number of elements. We could create a new EvenElementArrayRef type, and then coerce from that type, as opposed to a plain ArrayRef

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

536 - Linux cli command XtSetMappedWhenManaged

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtSetMappedWhenManaged and provides detailed information about the command XtSetMappedWhenManaged, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtSetMappedWhenManaged.

NAME 🖥️ XtSetMappedWhenManaged 🖥️

map and unmap widgets

SYNTAX

#include <X11/Intrinsic.h>

void XtMapWidget(Widget w );

void XtSetMappedWhenManaged(Widget w, Boolean map_when_managed);

void XtUnmapWidget(Widget w );

ARGUMENTS

map_when_managed
Specifies a Boolean value that indicates the new value of the map_when_managed field.

  1. Specifies the widget.

DESCRIPTION

If the widget is realized and managed and if the new value of map_when_managed is True, XtSetMappedWhenManaged maps the window. If the widget is realized and managed and if the new value of map_when_managed is False, it unmaps the window. XtSetMappedWhenManaged is a convenience function that is equivalent to (but slightly faster than) calling XtSetValues and setting the new value for the mappedWhenManaged resource. As an alternative to using XtSetMappedWhenManaged to control mapping, a client may set mapped_when_managed to False and use XtMapWidget and XtUnmapWidget explicitly.

SEE ALSO

XtManageChildren(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

537 - Linux cli command XtAppNextEvent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppNextEvent and provides detailed information about the command XtAppNextEvent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppNextEvent.

NAME 🖥️ XtAppNextEvent 🖥️

query and process events and input

SYNTAX

#include <X11/Intrinsic.h>

void XtAppNextEvent(XtAppContext app_context, XEvent *event_return);

Boolean XtAppPeekEvent(XtAppContext app_context, XEvent *event_return);

XtInputMask XtAppPending(XtAppContext app_context);

void XtAppProcessEvent(XtAppContext app_context, XtInputMask mask);

Boolean XtDispatchEvent(XEvent *event);

void XtAppMainLoop(XtAppContext app_context);

ARGUMENTS

app_context
Specifies the application context that identifies the application.

event
Specifies a pointer to the event structure that is to be dispatched to the appropriate event handler.

event_return
Returns the event information to the specified event structure.

mask
Specifies what types of events to process. The mask is the bitwise inclusive OR of any combination of XtIMXEvent, XtIMTimer, XtIMAlternateInput, and XtIMSignal. As a convenience, the X Toolkit defines the symbolic name XtIMAll to be the bitwise inclusive OR of all event types.

DESCRIPTION

If the X event queue is empty, XtAppNextEvent flushes the X output buffers of each Display in the application context and waits for an event while looking at the other input sources, timeout timeout values, and signal handlers and calling any callback procedures triggered by them. This wait time can be used for background processing (see Section 7.8).

If there is an event in the queue, XtAppPeekEvent fills in the event and returns a nonzero value. If no X input is on the queue, XtAppPeekEvent flushes the output buffer and blocks until input is available (possibly calling some timeout callbacks in the process). If the input is an event, XtAppPeekEvent fills in the event and returns a nonzero value. Otherwise, the input is for an alternate input source, and XtAppPeekEvent returns zero.

The XtAppPending function returns a nonzero value if there are events pending from the X server, timer pending, or other input sources pending. The value returned is a bit mask that is the OR of XtIMXEvent, XtIMTimer, XtIMAlternateInput, and XtIMSignal (see XtAppProcessEvent). If there are no events pending, XtAppPending flushes the output buffer and returns zero.

The XtAppProcessEvent function processes one timer, alternate input, signal source, or X event. If there is nothing of the appropriate type to process, XtAppProcessEvent blocks until there is. If there is more than one type of thing available to process, it is undefined which will get processed. Usually, this procedure is not called by client applications (see XtAppMainLoop). XtAppProcessEvent processes timer events by calling any appropriate timer callbacks, alternate input by calling any appropriate alternate input callbacks, signal source by calling any appropriate signal callbacks, and X events by calling XtDispatchEvent.

When an X event is received, it is passed to XtDispatchEvent, which calls the appropriate event handlers and passes them the widget, the event, and client-specific data registered with each procedure. If there are no handlers for that event registered, the event is ignored and the dispatcher simply returns. The order in which the handlers are called is undefined.

The XtDispatchEvent function sends those events to the event handler functions that have been previously registered with the dispatch routine. XtDispatchEvent returns True if it dispatched the event to some handler and False if it found no handler to dispatch the event to. The most common use of XtDispatchEvent is to dispatch events acquired with the XtAppNextEvent procedure. However, it also can be used to dispatch user-constructed events. XtDispatchEvent also is responsible for implementing the grab semantics for XtAddGrab.

The XtAppMainLoop function processes events using XtAppProcessEvent, varying the mask parameter and using XtAppPending to ensure that it has a chance to handle events of all types, i.e., X events, timer events, input events and signal sources. This constitutes the main loop of X Toolkit applications, and, as such, it does not return unless XtAppSetExitFlag is called. Applications are expected to exit in response to some user action. There is nothing special about XtAppMainLoop; it is simply an loop that processes events until XtAppGetExitFlag() returns true.

Applications can provide their own version of this loop, which tests some global termination flag or tests that the number of top-level widgets is larger than zero before circling back for the next event.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

538 - Linux cli command xdr_reference

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_reference and provides detailed information about the command xdr_reference, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_reference.

NAME 🖥️ xdr_reference 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

539 - Linux cli command logout

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command logout and provides detailed information about the command logout, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the logout.

NAME 🖥️ logout 🖥️

write utmp and wtmp entries

LIBRARY

System utilities library (libutil, -lutil)

SYNOPSIS

#include <utmp.h>
void login(const struct utmp *ut);
int logout(const char *ut_line);

DESCRIPTION

The utmp file records who is currently using the system. The wtmp file records all logins and logouts. See utmp(5).

The function login() takes the supplied struct utmp, ut, and writes it to both the utmp and the wtmp file.

The function logout() clears the entry in the utmp file again.

GNU details

More precisely, login() takes the argument ut struct, fills the field ut->ut_type (if there is such a field) with the value USER_PROCESS, and fills the field ut->ut_pid (if there is such a field) with the process ID of the calling process. Then it tries to fill the field ut->ut_line. It takes the first of stdin, stdout, stderr that is a terminal, and stores the corresponding pathname minus a possible leading /dev/ into this field, and then writes the struct to the utmp file. On the other hand, if no terminal name was found, this field is filled with “???” and the struct is not written to the utmp file. After this, the struct is written to the wtmp file.

The logout() function searches the utmp file for an entry matching the ut_line argument. If a record is found, it is updated by zeroing out the ut_name and ut_host fields, updating the ut_tv timestamp field and setting ut_type (if there is such a field) to DEAD_PROCESS.

RETURN VALUE

The logout() function returns 1 if the entry was successfully written to the database, or 0 if an error occurred.

FILES

/var/run/utmp
user accounting database, configured through _PATH_UTMP in <paths.h>

/var/log/wtmp
user accounting log file, configured through _PATH_WTMP in <paths.h>

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

login(), logout()

Thread safety

MT-Unsafe race:utent sig:ALRM timer

In the above table, utent in race:utent signifies that if any of the functions setutent(3), getutent(3), or endutent(3) are used in parallel in different threads of a program, then data races could occur. login() and logout() calls those functions, so we use race:utent to remind users.

VERSIONS

The member ut_user of struct utmp is called ut_name in BSD. Therefore, ut_name is defined as an alias for ut_user in <utmp.h>.

STANDARDS

BSD.

SEE ALSO

getutent(3), utmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

540 - Linux cli command Net_DNS_RR_AAAApm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_AAAApm and provides detailed information about the command Net_DNS_RR_AAAApm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_AAAApm.

NAME 🖥️ Net_DNS_RR_AAAApm 🖥️

DNS AAAA resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name IN AAAA address); $rr = Net::DNS::RR->new( name => example.com, type => AAAA, address => 2001:DB8::8:800:200C:417A );

DESCRIPTION

Class for DNS IPv6 Address (AAAA) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

address

$IPv6_address = $rr->address;

Returns the text representation of the IPv6 address.

address_long

$IPv6_address = $rr->address_long;

Returns the text representation specified in RFC3513, 2.2(1).

address_short

$IPv6_address = $rr->address_short;

Returns the textual form of address recommended by RFC5952.

COPYRIGHT

Copyright (c)1997 Michael Fuhr.

Portions Copyright (c)2003 Chris Reinhardt.

Portions Copyright (c)2012 Dick Franks.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC3596 <https://tools.ietf.org/html/rfc3596>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

541 - Linux cli command pthread_mutex_destroy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_mutex_destroy and provides detailed information about the command pthread_mutex_destroy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_mutex_destroy.

NAME 🖥️ pthread_mutex_destroy 🖥️

operations on mutexes

SYNOPSIS

#include <pthread.h>
pthread_mutex_t fastmutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t recmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
pthread_mutex_t errchkmutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
int pthread_mutex_init(pthread_mutex_t *mutex,
 const pthread_mutexattr_t *mutexattr);
int pthread_mutex_lock(pthread_mutex_t *mutex);
int pthread_mutex_trylock(pthread_mutex_t *mutex);
int pthread_mutex_unlock(pthread_mutex_t *mutex);
int pthread_mutex_destroy(pthread_mutex_t *mutex);

DESCRIPTION

A mutex is a MUTual EXclusion device, and is useful for protecting shared data structures from concurrent modifications, and implementing critical sections and monitors.

A mutex has two possible states: unlocked (not owned by any thread), and locked (owned by one thread). A mutex can never be owned by two different threads simultaneously. A thread attempting to lock a mutex that is already locked by another thread is suspended until the owning thread unlocks the mutex first.

pthread_mutex_init initializes the mutex object pointed to by mutex according to the mutex attributes specified in mutexattr. If mutexattr is NULL, default attributes are used instead.

The LinuxThreads implementation supports only one mutex attributes, the mutex kind, which is either ``fast’’, ``recursive’’, or ``error checking’’. The kind of a mutex determines whether it can be locked again by a thread that already owns it. The default kind is ``fast’’. See pthread_mutexattr_init(3) for more information on mutex attributes.

Variables of type pthread_mutex_t can also be initialized statically, using the constants PTHREAD_MUTEX_INITIALIZER (for fast mutexes), PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP (for recursive mutexes), and PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP (for error checking mutexes).

pthread_mutex_lock locks the given mutex. If the mutex is currently unlocked, it becomes locked and owned by the calling thread, and pthread_mutex_lock returns immediately. If the mutex is already locked by another thread, pthread_mutex_lock suspends the calling thread until the mutex is unlocked.

If the mutex is already locked by the calling thread, the behavior of pthread_mutex_lock depends on the kind of the mutex. If the mutex is of the ``fast’’ kind, the calling thread is suspended until the mutex is unlocked, thus effectively causing the calling thread to deadlock. If the mutex is of the ``error checking’’ kind, pthread_mutex_lock returns immediately with the error code EDEADLK. If the mutex is of the ``recursive’’ kind, pthread_mutex_lock succeeds and returns immediately, recording the number of times the calling thread has locked the mutex. An equal number of pthread_mutex_unlock operations must be performed before the mutex returns to the unlocked state.

pthread_mutex_trylock behaves identically to pthread_mutex_lock, except that it does not block the calling thread if the mutex is already locked by another thread (or by the calling thread in the case of a ``fast’’ mutex). Instead, pthread_mutex_trylock returns immediately with the error code EBUSY.

pthread_mutex_unlock unlocks the given mutex. The mutex is assumed to be locked and owned by the calling thread on entrance to pthread_mutex_unlock. If the mutex is of the ``fast’’ kind, pthread_mutex_unlock always returns it to the unlocked state. If it is of the ``recursive’’ kind, it decrements the locking count of the mutex (number of pthread_mutex_lock operations performed on it by the calling thread), and only when this count reaches zero is the mutex actually unlocked.

On ``error checking’’ and ``recursive’’ mutexes, pthread_mutex_unlock actually checks at run-time that the mutex is locked on entrance, and that it was locked by the same thread that is now calling pthread_mutex_unlock. If these conditions are not met, an error code is returned and the mutex remains unchanged. ``Fast’’ mutexes perform no such checks, thus allowing a locked mutex to be unlocked by a thread other than its owner. This is non-portable behavior and must not be relied upon.

pthread_mutex_destroy destroys a mutex object, freeing the resources it might hold. The mutex must be unlocked on entrance. In the LinuxThreads implementation, no resources are associated with mutex objects, thus pthread_mutex_destroy actually does nothing except checking that the mutex is unlocked.

CANCELLATION

None of the mutex functions is a cancelation point, not even pthread_mutex_lock, in spite of the fact that it can suspend a thread for arbitrary durations. This way, the status of mutexes at cancelation points is predictable, allowing cancelation handlers to unlock precisely those mutexes that need to be unlocked before the thread stops executing. Consequently, threads using deferred cancelation should never hold a mutex for extended periods of time.

ASYNC-SIGNAL SAFETY

The mutex functions are not async-signal safe. What this means is that they should not be called from a signal handler. In particular, calling pthread_mutex_lock or pthread_mutex_unlock from a signal handler may deadlock the calling thread.

RETURN VALUE

pthread_mutex_init always returns 0. The other mutex functions return 0 on success and a non-zero error code on error.

ERRORS

The pthread_mutex_lock function returns the following error code on error:

EINVAL
The mutex has not been properly initialized.

EDEADLK
The mutex is already locked by the calling thread (``error checking’’ mutexes only).

The pthread_mutex_trylock function returns the following error codes on error:

EBUSY
The mutex could not be acquired because it was currently locked.

EINVAL
The mutex has not been properly initialized.

The pthread_mutex_unlock function returns the following error code on error:

EINVAL
The mutex has not been properly initialized.

EPERM
The calling thread does not own the mutex (``error checking’’ mutexes only).

The pthread_mutex_destroy function returns the following error code on error:

EBUSY
The mutex is currently locked.

SEE ALSO

pthread_mutexattr_init(3), pthread_mutexattr_setkind_np(3), pthread_cancel(3).

EXAMPLE

A shared global variable x can be protected by a mutex as follows:

int x;
pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER;

All accesses and modifications to x should be bracketed by calls to pthread_mutex_lock and pthread_mutex_unlock as follows:

pthread_mutex_lock(&mut);
/* operate on x */
pthread_mutex_unlock(&mut);
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

542 - Linux cli command STAILQ_REMOVE_HEAD

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command STAILQ_REMOVE_HEAD and provides detailed information about the command STAILQ_REMOVE_HEAD, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the STAILQ_REMOVE_HEAD.

NAME 🖥️ STAILQ_REMOVE_HEAD 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

543 - Linux cli command strspn

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strspn and provides detailed information about the command strspn, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strspn.

NAME 🖥️ strspn 🖥️

get length of a prefix substring

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
size_t strspn(const char *s, const char *accept);
size_t strcspn(const char *s, const char *reject);

DESCRIPTION

The strspn() function calculates the length (in bytes) of the initial segment of s which consists entirely of bytes in accept.

The strcspn() function calculates the length of the initial segment of s which consists entirely of bytes not in reject.

RETURN VALUE

The strspn() function returns the number of bytes in the initial segment of s which consist only of bytes from accept.

The strcspn() function returns the number of bytes in the initial segment of s which are not in the string reject.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strspn(), strcspn()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89, SVr4, 4.3BSD.

SEE ALSO

memchr(3), strchr(3), string(3), strpbrk(3), strsep(3), strstr(3), strtok(3), wcscspn(3), wcsspn(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

544 - Linux cli command Image_ExifTool_Opuspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Opuspm and provides detailed information about the command Image_ExifTool_Opuspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Opuspm.

NAME 🖥️ Image_ExifTool_Opuspm 🖥️

Read Ogg Opus audio meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to extract meta information from Ogg Opus audio files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<https://www.opus-codec.org/docs/>

<https://wiki.xiph.org/OggOpus>

<https://tools.ietf.org/pdf/rfc7845.pdf>

SEE ALSO

“Opus Tags” in Image::ExifTool::TagNames, “Ogg Tags” in Image::ExifTool::TagNames, “Vorbis Tags” in Image::ExifTool::TagNames, “FLAC Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

545 - Linux cli command IO_Scalarpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_Scalarpm and provides detailed information about the command IO_Scalarpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_Scalarpm.

NAME 🖥️ IO_Scalarpm 🖥️

IO:: interface for reading/writing a scalar

SYNOPSIS

Perform I/O on strings, using the basic OO interface…

use 5.005; use IO::Scalar; $data = “My message: “; ### Open a handle on a string, and append to it: $SH = new IO::Scalar \data; $SH->print(“Hello”); $SH->print(”, world! Bye now! “); print “The string is now: “, $data, " “; ### Open a handle on a string, read it line-by-line, then close it: $SH = new IO::Scalar \data; while (defined($_ = $SH->getline)) { print “Got line: $_”; } $SH->close; ### Open a handle on a string, and slurp in all the lines: $SH = new IO::Scalar \data; print “All lines: “, $SH->getlines; ### Get the current position (either of two ways): $pos = $SH->getpos; $offset = $SH->tell; ### Set the current position (either of two ways): $SH->setpos($pos); $SH->seek($offset, 0); ### Open an anonymous temporary scalar: $SH = new IO::Scalar; $SH->print(“Hi there!”); print “I printed: “, ${$SH->sref}, " “; ### get at value

Don’t like OO for your I/O? No problem. Thanks to the magic of an invisible tie(), the following now works out of the box, just as it does with IO::Handle:

use 5.005; use IO::Scalar; $data = “My message: “; ### Open a handle on a string, and append to it: $SH = new IO::Scalar \data; print $SH “Hello”; print $SH “, world! Bye now! “; print “The string is now: “, $data, " “; ### Open a handle on a string, read it line-by-line, then close it: $SH = new IO::Scalar \data; while (<$SH>) { print “Got line: $_”; } close $SH; ### Open a handle on a string, and slurp in all the lines: $SH = new IO::Scalar \data; print “All lines: “, <$SH>; ### Get the current position (WARNING: requires 5.6): $offset = tell $SH; ### Set the current position (WARNING: requires 5.6): seek $SH, $offset, 0; ### Open an anonymous temporary scalar: $SH = new IO::Scalar; print $SH “Hi there!”; print “I printed: “, ${$SH->sref}, " “; ### get at value

And for you folks with 1.x code out there: the old tie() style still works, though this is unnecessary and deprecated:

use IO::Scalar; ### Writing to a scalar… my $s; tie *OUT, IO::Scalar, \s; print OUT “line 1 line 2 “, “line 3 “; print “String is now: $s " ### Reading and writing an anonymous scalar… tie *OUT, IO::Scalar; print OUT “line 1 line 2 “, “line 3 “; tied(OUT)->seek(0,0); while (<OUT>) { print “Got line: “, $_; }

Stringification works, too!

my $SH = new IO::Scalar \data; print $SH “Hello, “; print $SH “world!”; print “I printed: $SH “;

DESCRIPTION

This class is part of the IO::Stringy distribution; see IO::Stringy for change log and general information.

The IO::Scalar class implements objects which behave just like IO::Handle (or FileHandle) objects, except that you may use them to write to (or read from) scalars. These handles are automatically tiehandled (though please see “WARNINGS” for information relevant to your Perl version).

Basically, this:

my $s; $SH = new IO::Scalar \s; $SH->print(“Hel”, “lo, “); ### OO style $SH->print(“world! “); ### ditto

Or this:

my $s; $SH = tie *OUT, IO::Scalar, \s; print OUT “Hel”, “lo, “; ### non-OO style print OUT “world! “; ### ditto

Causes $s to be set to:

“Hello, world! "

PUBLIC INTERFACE

Construction

new [ARGS…]
Class method. Return a new, unattached scalar handle. If any arguments are given, they’re sent to open().

open [SCALARREF]
Instance method. Open the scalar handle on a new scalar, pointed to by SCALARREF. If no SCALARREF is given, a “private” scalar is created to hold the file data. Returns the self object on success, undefined on error.

opened
Instance method. Is the scalar handle opened on something?

close
Instance method. Disassociate the scalar handle from its underlying scalar. Done automatically on destroy.

Input and output

flush
Instance method. No-op, provided for OO compatibility.

fileno
Instance method. No-op, returns undef

getc
Instance method. Return the next character, or undef if none remain.

getline
Instance method. Return the next line, or undef on end of string. Can safely be called in an array context. Currently, lines are delimited by " “.

getlines
Instance method. Get all remaining lines. It will croak() if accidentally called in a scalar context.

print ARGS…
Instance method. Print ARGS to the underlying scalar. Warning: this continues to always cause a seek to the end of the string, but if you perform **seek()**s and **tell()**s, it is still safer to explicitly seek-to-end before subsequent **print()**s.

read BUF, NBYTES, [OFFSET]
Instance method. Read some bytes from the scalar. Returns the number of bytes actually read, 0 on end-of-file, undef on error.

write BUF, NBYTES, [OFFSET]
Instance method. Write some bytes to the scalar.

sysread BUF, LEN, [OFFSET]
Instance method. Read some bytes from the scalar. Returns the number of bytes actually read, 0 on end-of-file, undef on error.

syswrite BUF, NBYTES, [OFFSET]
Instance method. Write some bytes to the scalar.

Seeking/telling and other attributes

autoflush
Instance method. No-op, provided for OO compatibility.

binmode
Instance method. No-op, provided for OO compatibility.

clearerr
Instance method. Clear the error and EOF flags. A no-op.

eof
Instance method. Are we at end of file?

seek OFFSET, WHENCE
Instance method. Seek to a given position in the stream.

sysseek OFFSET, WHENCE
Instance method. Identical to seek OFFSET, WHENCE, q.v.

tell
Instance method. Return the current position in the stream, as a numeric offset.

setpos POS
Instance method. Set the current position, using the opaque value returned by getpos().

getpos
Instance method. Return the current position in the string, as an opaque object.

sref
Instance method. Return a reference to the underlying scalar.

AUTHOR

Eryq ([email protected]). President, ZeeGee Software Inc (http://www.zeegee.com).

CONTRIBUTORS

Dianne Skoll ([email protected]).

COPYRIGHT & LICENSE

Copyright (c) 1997 Erik (Eryq) Dorfman, ZeeGee Software, Inc. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

546 - Linux cli command lroundl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lroundl and provides detailed information about the command lroundl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lroundl.

NAME 🖥️ lroundl 🖥️

round to nearest integer

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
long lround(double x);
long lroundf(float x);
long lroundl(long double x);
long long llround(double x);
long long llroundf(float x);
long long llroundl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions round their argument to the nearest integer value, rounding halfway cases away from zero, regardless of the current rounding direction (see fenv(3)).

Note that unlike the round(3) and ceil(3), functions, the return type of these functions differs from that of their arguments.

RETURN VALUE

These functions return the rounded integer value.

If x is a NaN or an infinity, or the rounded value is too large to be stored in a long (long long in the case of the ll* functions), then a domain error occurs, and the return value is unspecified.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is a NaN or infinite, or the rounded value is too large
An invalid floating-point exception (FE_INVALID) is raised.

These functions do not set errno.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

lround(), lroundf(), lroundl(), llround(), llroundf(), llroundl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

ceil(3), floor(3), lrint(3), nearbyint(3), rint(3), round(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

547 - Linux cli command svcerr_progvers

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command svcerr_progvers and provides detailed information about the command svcerr_progvers, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the svcerr_progvers.

NAME 🖥️ svcerr_progvers 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

548 - Linux cli command XtNextEvent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtNextEvent and provides detailed information about the command XtNextEvent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtNextEvent.

NAME 🖥️ XtNextEvent 🖥️

query and process events and input

SYNTAX

#include <X11/Intrinsic.h>

void XtNextEvent(XEvent *event_return);

Boolean XtPeekEvent(XEvent *event_return);

Boolean XtPending(void);

void XtProcessEvent(XtInputMask mask);

void XtMainLoop(void);

ARGUMENTS

event
Specifies a pointer to the event structure that is to be dispatched to the appropriate event handler.

event_return
Returns the event information to the specified event structure.

mask
Specifies what types of events to process. The mask is the bitwise inclusive OR of any combination of XtIMXEvent, XtIMTimer, XtIMAlternateInput, and XtIMSignal. As a convenience, the X Toolkit defines the symbolic name XtIMAll to be the bitwise inclusive OR of all event types.

DESCRIPTION

XtNextEvent has been replaced by XtAppNextEvent.

XtPeekEvent has been replaced by XtAppPeekEvent.

XtPending has been replaced by XtAppPending.

XtProcessEvent has been replaced by XtAppProcessEvent.

XtMainLoop has been replaced by XtAppMainLoop.

SEE ALSO

XtAppNextEvent(3xt), XtAppPending(3), XtAppPeekEvent(3), XtAppProcessEvent(3), XtAppMainLoop(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

549 - Linux cli command XtIsOverrideShell

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtIsOverrideShell and provides detailed information about the command XtIsOverrideShell, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtIsOverrideShell.

NAME 🖥️ XtIsOverrideShell 🖥️

obtain and verify a widget’s class

SYNTAX

#include <X11/Intrinsic.h>

WidgetClass XtClass(Widget w);

WidgetClass XtSuperclass(Widget w);

Boolean XtIsSubclass(Widget w, WidgetClass widget_class);

void XtCheckSubclass(Widget widget, WidgetClass widget_class, String message);

Boolean XtIsObject(Widget w);

Boolean XtIsRectObj(Widget w);

Boolean XtIsWidget(Widget w);

Boolean XtIsComposite(Widget w);

Boolean XtIsConstraint(Widget w);

Boolean XtIsShell(Widget w);

Boolean XtIsOverrideShell(Widget w);

Boolean XtIsWMShell(Widget w);

Boolean XtIsVendorShell(Widget w);

Boolean XtIsTransientShell(Widget w);

Boolean XtIsTopLevelShell(Widget w);

Boolean XtIsApplicationShell(Widget w);

Boolean XtIsSessionShell(Widget w);

ARGUMENTS

  1. Specifies the widget.

widget_class
Specifies the widget class.

message
Specifies the message that is to be used.

DESCRIPTION

The XtClass function returns a pointer to the widget’s class structure.

The XtSuperclass function returns a pointer to the widget’s superclass class structure.

The XtIsSubclass function returns True if the class of the specified widget is equal to or is a subclass of the specified class. The widget’s class can be any number of subclasses down the chain and need not be an immediate subclass of the specified class. Composite widgets that need to restrict the class of the items they contain can use XtIsSubclass to find out if a widget belongs to the desired class of objects.

The XtCheckSubclass macro determines if the class of the specified widget is equal to or is a subclass of the specified widget class. The widget can be any number of subclasses down the chain and need not be an immediate subclass of the specified widget class. If the specified widget is not a subclass, XtCheckSubclass constructs an error message from the supplied message, the widget’s actual class, and the expected class and calls XtErrorMsg. XtCheckSubclass should be used at the entry point of exported routines to ensure that the client has passed in a valid widget class for the exported operation.

XtCheckSubclass is only executed when the widget has been compiled with the compiler symbol DEBUG defined; otherwise, it is defined as the empty string and generates no code.

To test if a given widget belongs to a subclass of an Intrinsics-defined class, the Intrinsics defines macros or functions equivalent to XtIsSubclass for each of the built-in classes. These procedures are XtIsObject, XtIsRectObj, XtIsWidget, XtIsComposite, XtIsConstraint, XtIsShell, XtIsOverrideShell, XtIsWMShell, XtIsVendorShell, XtIsTransientShell, XtIsTopLevelShell, XtIsApplicationShell, and XtIsSessionShell.

The

SEE ALSO

XtAppErrorMsg(3), XtDisplay(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

550 - Linux cli command XtWindow

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtWindow and provides detailed information about the command XtWindow, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtWindow.

NAME 🖥️ XtWindow 🖥️

obtain window information about a widget

SYNTAX

#include <X11/Intrinsic.h>

Display *XtDisplay(Widget w);

Display *XtDisplayOfObject(Widget object);

Screen *XtScreen(Widget w);

Screen *XtScreenOfObject(Widget object);

Window XtWindow(Widget w);

Window XtWindowOfObject(Widget object);

ARGUMENTS

  1. Specifies the widget.

object
Specifies the widget.

DESCRIPTION

XtDisplay returns the display pointer for the specified widget.

XtDisplayOfObject returns the display pointer for the specified object.

XtScreen returns the screen pointer for the specified widget.

XtScreenOfObject returns the screen pointer for the specified object.

XtWindow returns the window of the specified widget.

XtWindowOfObject returns the window of the specified object.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

551 - Linux cli command roundl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command roundl and provides detailed information about the command roundl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the roundl.

NAME 🖥️ roundl 🖥️

round to nearest integer, away from zero

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double round(double x);
float roundf(float x);
long double roundl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

round(), roundf(), roundl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions round x to the nearest integer, but round halfway cases away from zero (regardless of the current rounding direction, see fenv(3)), instead of to the nearest even integer like rint(3).

For example, round(0.5) is 1.0, and round(-0.5) is -1.0.

RETURN VALUE

These functions return the rounded integer value.

If x is integral, +0, -0, NaN, or infinite, x itself is returned.

ERRORS

No errors occur. POSIX.1-2001 documents a range error for overflows, but see NOTES.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

round(), roundf(), roundl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

NOTES

POSIX.1-2001 contains text about overflow (which might set errno to ERANGE, or raise an FE_OVERFLOW exception). In practice, the result cannot overflow on any current machine, so this error-handling stuff is just nonsense. (More precisely, overflow can happen only when the maximum value of the exponent is smaller than the number of mantissa bits. For the IEEE-754 standard 32-bit and 64-bit floating-point numbers the maximum value of the exponent is 127 (respectively, 1023), and the number of mantissa bits including the implicit bit is 24 (respectively, 53).)

If you want to store the rounded value in an integer type, you probably want to use one of the functions described in lround(3) instead.

SEE ALSO

ceil(3), floor(3), lround(3), nearbyint(3), rint(3), trunc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

552 - Linux cli command Tk_formpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_formpm and provides detailed information about the command Tk_formpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_formpm.

NAME 🖥️ Tk_formpm 🖥️

Geometry manager based on attachment rules

SYNOPSIS

$widget->form?(args)?

$widget->formOption?(args)?

DESCRIPTION

The form method is used to communicate with the form Geometry Manager, a geometry manager that arranges the geometry of the children in a parent window according to attachment rules. The form geometry manager is very flexible and powerful; it can be used to emulate all the existing features of the Tk packer and placer geometry managers (see pack, place). The form method can have any of several forms, depending on Option:

$slave->form?(options)?
Sets or adjusts the attachment values of the slave window according to the -option=>value argument pairs.

-b => attachment
Abbreviation for the -bottom option.

-bottom => attachment
Specifies an attachment for the bottom edge of the slave window. The attachment must specified according to “SPECIFYING ATTACHMENTS” below.

-bottomspring => weight
Specifies the weight of the spring at the bottom edge of the slave window. See “USING SPRINGS” below.

-bp => value
Abbreviation for the -padbottom option.

-bs => weight
Abbreviation for the -bottomspring option.

-fill => style
Specifies the fillings when springs are used for this widget. The value must be x, y, both or none.

-in => $master
Places the slave window into the specified $master window. If the slave was originally in another master window, all attachment values with respect to the original master window are discarded. Even if the attachment values are the same as in the original master window, they need to be specified again. The -in flag, when needed, must appear as the first flag of options. Otherwise an error is generated.

-l => attachment
Abbreviation for the -left option.

-left => attachment
Specifies an attachment for the left edge of the slave window. The attachment must specified according to “SPECIFYING ATTACHMENTS” below.

-leftspring => weight
Specifies the weight of the spring at the left edge of the slave window. See “USING SPRINGS” below.

-lp => value
Abbreviation for the -padleft option.

-ls => weight
Abbreviation for the -leftspring option.

-padbottom => value
Specifies the amount of external padding to leave on the bottom side of the slave. The value may have any of the forms acceptable to Tk_GetPixels.

-padleft => value
Specifies the amount of external padding to leave on the left side of the slave.

-padright => value
Specifies the amount of external padding to leave on the right side of the slave.

-padtop => value
Specifies the amount of external padding to leave on the top side of the slave.

-padx => value
Specifies the amount of external padding to leave on both the left and the right sides of the slave.

-pady => value
Specifies the amount of external padding to leave on both the top and the bottom sides of the slave.

-r => attachment
Abbreviation for the -right option.

-right => attachment
Specifies an attachment for the right edge of the slave window. The attachment must specified according to “SPECIFYING ATTACHMENTS” below.

-rightspring => weight
Specifies the weight of the spring at the right edge of the slave window. See “USING SPRINGS” below.

-rp => value
Abbreviation for the -padright option.

-rs => weight
Abbreviation for the -rightspring option.

-t => attachment
Abbreviation for the -top option.

-top => attachment
Specifies an attachment for the top edge of the slave window. The attachment must specified according to “SPECIFYING ATTACHMENTS” below.

-topspring => weight
Specifies the weight of the spring at the top edge of the slave window. See “USING SPRINGS” below.

-tp => value
Abbreviation for the -padtop option.

-ts => weight
Abbreviation for the -topspring option.

$master->formCheck
This method checks whether there is circular dependency in the attachments of the master’s slaves (see “CIRCULAR DEPENDENCY” below). It returns the Boolean value TRUE if it discover circular dependency and FALSE otherwise.

$slave->formForget
Removes the slave from its master and unmaps its window. The slave will no longer be managed by form. All attachment values with respect to its master window are discarded. If another slave is attached to this slave, then the attachment of the other slave will be changed to grid attachment based on its geometry.

$master->formGrid?(x_size, y_size)?
When x_size and y_size are given, this method returns the number of grids of the $master window in a pair of integers of the form (x_size, y_size). When both x_size and y_size are given, this method changes the number of horizontal and vertical grids on the master window.

$slave->formInfo?(-option)?
Queries the attachment options of a slave window. -option can be any of the options accepted by the form method. If -option is given, only the value of that option is returned. Otherwise, this method returns a list whose elements are the current configuration state of the slave given in the same option-value form that might be specified to form. The first two elements in this list list are “-in=>$master” where $master is the slave’s master window.

$master->formSlaves
Returns a list of all of the slaves for the master window. The order of the slaves in the list is the same as their order in the packing order. If master has no slaves then an empty string is returned.

SPECIFYING ATTACHMENTS

One can specify an attachment for each side of a slave window managed by form. An attachment is specified in the the form “-side => [anchor_point, offset]”. -side can be one of -top, -bottom, -left or -right.

Offset is given in screen units (i.e. any of the forms acceptable to Tk_GetPixels). A positive offset indicates shifting to a position to the right or bottom of an anchor point. A negative offset indicates shifting to a position to the left or top of an anchor point.

Anchor_point can be given in one of the following forms:

Grid Attachment
The master window is divided into a number of horizontal and vertical grids. By default the master window is divided into 100x100 grids; the number of grids can be adjusted by the formGrid method. A grid attachment anchor point is given by a % sign followed by an integer value. For example, ’%0’ specifies the first grid line (the top or left edge of the master window). ’%100’ specifies the last grid line (the bottom or right edge of the master window).

Opposite Side Attachment
Opposite attachment specifies an anchor point located on the opposite side of another slave widget, which must be managed by form in the same master window. An opposite attachment anchor point is given by the name of another widget. For example, “$b->form(-top=>[$a,0])” attaches the top side of the widget $b to the bottom of the widget $a.

Parallel Side Attachment
Opposite attachment specifies an anchor point located on the same side of another slave widget, which must be managed by form in the same master window. An parallel attachment anchor point is given by the sign & follwed by the name of another widget. For example, “$b->form(-top=>[’&’,$a,0])” attaches the top side of the widget $b to the top of the widget $a, making the top sides of these two widgets at the same vertical position in their parent window.

No Attachment
Specifies a side of the slave to be attached to nothing, indicated by the keyword none. When the none anchor point is given, the offset must be zero (or not present). When a side of a slave is attached to [’none’, 0], the position of this side is calculated by the position of the other side and the natural size of the slave. For example, if a the left side of a widget is attached to [’%0’, 100], its right side attached to [’none’, 0], and the natural size of the widget is 50 pixels, the right side of the widget will be positioned at pixel [’%0’, 149]. When both -top and -bottom are attached to none, then by default -top will be attached to [’%0’, 0]. When both -left and -right are attached to none, then by default -left will be attached to [’%0’, 0].

Shifting effects can be achieved by specifying a non-zero offset with an anchor point. In the following example, the top side of widget \b is attached to the bottom of \a; hence \b always appears below \a. Also, the left edge of \b is attached to the left side of \a with a 10 pixel offest. Therefore, the left edge of \b is always shifted 10 pixels to the right of \a’s left edge:

$b->form(-left=>[$a,10], -top=>[$a,0]);

ABBREVIATIONS:

Certain abbreviations can be made on the attachment specifications: First an offset of zero can be omitted. Thus, the following two lines are equivalent:

$b->form(-top=>[$a,0], -right=>[’%100’,0]);

$b->form(-top=>[$a], -right=>’%100’);

In the second case, when the anchor point is omitted, the offset must be given. A default anchor point is chosen according to the value of the offset. If the anchor point is 0 or positive, the default anchor point %0 is used; thus, “$b->form(-top=>15)” attaches the top edge of $b to a position 15 pixels below the top edge of the master window. If the anchor point is “-0” or negative, the default anchor point %100 is used; thus, “$a->form(-right=>-2)” attaches the right edge of \a to a position 2 pixels to the left of the master window’s right edge. An further example below shows a method with its equivalent abbreviation.

$b->form(-top=>[’%0’,10], -bottom=>[’%100’,0]);

$b->form(-top=>10, -bottom=>-0);

USING SPRINGS

To be written.

ALGORITHM OF FORM

form starts with any slave in the list of slaves of the master window. Then it tries to determine the position of each side of the slave.

If the attachment of a side of the slave is grid attachment, the position of the side is readily determined.

If the attachment of this side is none, then form tries to determine the position of the opposite side first, and then use the position of the opposite side and the natural size of the slave to determine the position of this side.

If the attachment is opposite or parallel widget attachments, then form tries to determine the positions of the other widget first, and then use the positions of the other widget and the natural size of the slave determine the position of this side. This recursive algorithmis carried on until the positions of all slaves are determined.

CIRCULAR DEPENDENCY

The algorithm of form will fail if a circular dependency exists in the attachments of the slaves. For example:

$c->form(-left=>$b);

$b->form(-right=>$c);

In this example, the position of the left side of $b depends on the right side of $c, which in turn depends on the left side of $b.

When a circular dependency is discovered during the execution of the form algorithm, form will generate a background error and the geometry of the slaves are undefined (and will be arbitrary). Notice that form only executes the algorithm when the specification of the slaves’ attachments is complete. Therefore, it allows intermediate states of circular dependency during the specification of the slaves’ attachments. Also, unlike the Motif Form manager widget, form defines circular dependency as ``dependency in the same dimension’’. Therefore, the following code fragment will does not have circular dependency because the two widgets do not depend on each other in the same dimension ($b depends $c in the horizontal dimension and $c depends on $b in the vertical dimension):

$b->form(-left=>$c);

$c->form(-top=>$b);

BUGS

Springs have not been fully implemented yet.

SEE ALSO

Tk::grid Tk::pack Tk::place

KEYWORDS

geometry manager, form, attachment, spring, propagation, size, pack, tix, master, slave

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

553 - Linux cli command isgreater

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isgreater and provides detailed information about the command isgreater, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isgreater.

NAME 🖥️ isgreater 🖥️

floating-point relational tests without exception for NaN

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
int isgreater(x, y);
int isgreaterequal(x, y);
int isless(x, y);
int islessequal(x, y);
int islessgreater(x, y);
int isunordered(x, y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

    All functions described here:
        _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The normal relational operations (like <, “less than”) fail if one of the operands is NaN. This will cause an exception. To avoid this, C99 defines the macros listed below.

These macros are guaranteed to evaluate their arguments only once. The arguments must be of real floating-point type (note: do not pass integer values as arguments to these macros, since the arguments will not be promoted to real-floating types).

isgreater()
determines (x) > (y) without an exception if x or y is NaN.

isgreaterequal()
determines (x) >= (y) without an exception if x or y is NaN.

isless()
determines (x) < (y) without an exception if x or y is NaN.

islessequal()
determines (x) <= (y) without an exception if x or y is NaN.

islessgreater()
determines (x) < (y) || (x) > (y) without an exception if x or y is NaN. This macro is not equivalent to x != y because that expression is true if x or y is NaN.

isunordered()
determines whether its arguments are unordered, that is, whether at least one of the arguments is a NaN.

RETURN VALUE

The macros other than isunordered() return the result of the relational comparison; these macros return 0 if either argument is a NaN.

isunordered() returns 1 if x or y is NaN and 0 otherwise.

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isgreater(), isgreaterequal(), isless(), islessequal(), islessgreater(), isunordered()

Thread safetyMT-Safe

VERSIONS

Not all hardware supports these functions, and where hardware support isn’t provided, they will be emulated by macros. This will result in a performance penalty. Don’t use these functions if NaN is of no concern for you.

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

fpclassify(3), isnan(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

554 - Linux cli command zip_fopen

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_fopen and provides detailed information about the command zip_fopen, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_fopen.

libzip (-lzip)

The

function opens the file name

in

The

argument specifies how the name lookup should be done, according to the values are described in

Also, the following values may be

to it.

Read the compressed data. Otherwise the data is uncompressed by

Read the original data from the zip archive, ignoring any changes made to the file.

The

function opens the file at position

If encrypted data is encountered, the functions call

or

respectively, using the default password set with

Upon successful completion, a

pointer is returned. Otherwise,

is returned and the error code in

is set to indicate the error.

The file data has been changed.

The compression method used is not supported.

The encryption method used is not supported.

Required memory could not be allocated.

The file is encrypted, but no password has been provided.

A file read error occurred.

A file seek error occurred.

The provided password does not match the password used for encryption. Note that some incorrect passwords are not detected by the check done by

Initializing the zlib stream failed.

The function

may also fail and set

for any of the errors specified for the routine

The function

may also fail with

if

is invalid.

and

were added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

555 - Linux cli command inet_net_ntop

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command inet_net_ntop and provides detailed information about the command inet_net_ntop, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the inet_net_ntop.

NAME 🖥️ inet_net_ntop 🖥️

Internet network number conversion

LIBRARY

Resolver library (libresolv, -lresolv)

SYNOPSIS

#include <arpa/inet.h>
int inet_net_pton(int af, const char *pres,
 void netp[.nsize], size_t nsize);
char *inet_net_ntop(int af,
 const void netp[(.bits - CHAR_BIT + 1) / CHAR_BIT],
 int bits,
 char pres[.psize], size_t psize);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

inet_net_pton(), inet_net_ntop():

    Since glibc 2.20:
        _DEFAULT_SOURCE
    Before glibc 2.20:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions convert network numbers between presentation (i.e., printable) format and network (i.e., binary) format.

For both functions, af specifies the address family for the conversion; the only supported value is AF_INET.

inet_net_pton()

The inet_net_pton() function converts pres, a null-terminated string containing an Internet network number in presentation format to network format. The result of the conversion, which is in network byte order, is placed in the buffer pointed to by netp. (The netp argument typically points to an in_addr structure.) The nsize argument specifies the number of bytes available in netp.

On success, inet_net_pton() returns the number of bits in the network number field of the result placed in netp. For a discussion of the input presentation format and the return value, see NOTES.

Note: the buffer pointed to by netp should be zeroed out before calling inet_net_pton(), since the call writes only as many bytes as are required for the network number (or as are explicitly specified by pres), which may be less than the number of bytes in a complete network address.

inet_net_ntop()

The inet_net_ntop() function converts the network number in the buffer pointed to by netp to presentation format; *netp is interpreted as a value in network byte order. The bits argument specifies the number of bits in the network number in *netp.

The null-terminated presentation-format string is placed in the buffer pointed to by pres. The psize argument specifies the number of bytes available in pres. The presentation string is in CIDR format: a dotted-decimal number representing the network address, followed by a slash, and the size of the network number in bits.

RETURN VALUE

On success, inet_net_pton() returns the number of bits in the network number. On error, it returns -1, and errno is set to indicate the error.

On success, inet_net_ntop() returns pres. On error, it returns NULL, and errno is set to indicate the error.

ERRORS

EAFNOSUPPORT
af specified a value other than AF_INET.

EMSGSIZE
The size of the output buffer was insufficient.

ENOENT
(inet_net_pton()) pres was not in correct presentation format.

STANDARDS

None.

NOTES

Input presentation format for inet_net_pton()

The network number may be specified either as a hexadecimal value or in dotted-decimal notation.

Hexadecimal values are indicated by an initial “0x” or “0X”. The hexadecimal digits populate the nibbles (half octets) of the network number from left to right in network byte order.

In dotted-decimal notation, up to four octets are specified, as decimal numbers separated by dots. Thus, any of the following forms are accepted:

a.b.c.d
a.b.c
a.b
a

Each part is a number in the range 0 to 255 that populates one byte of the resulting network number, going from left to right, in network-byte (big endian) order. Where a part is omitted, the resulting byte in the network number is zero.

For either hexadecimal or dotted-decimal format, the network number can optionally be followed by a slash and a number in the range 0 to 32, which specifies the size of the network number in bits.

Return value of inet_net_pton()

The return value of inet_net_pton() is the number of bits in the network number field. If the input presentation string terminates with a slash and an explicit size value, then that size becomes the return value of inet_net_pton(). Otherwise, the return value, bits, is inferred as follows:

  • If the most significant byte of the network number is greater than or equal to 240, then bits is 32.

  • Otherwise, if the most significant byte of the network number is greater than or equal to 224, then bits is 4.

  • Otherwise, if the most significant byte of the network number is greater than or equal to 192, then bits is 24.

  • Otherwise, if the most significant byte of the network number is greater than or equal to 128, then bits is 16.

  • Otherwise, bits is 8.

If the resulting bits value from the above steps is greater than or equal to 8, but the number of octets specified in the network number exceed bits/8, then bits is set to 8 times the number of octets actually specified.

EXAMPLES

The program below demonstrates the use of inet_net_pton() and inet_net_ntop(). It uses inet_net_pton() to convert the presentation format network address provided in its first command-line argument to binary form, displays the return value from inet_net_pton(). It then uses inet_net_ntop() to convert the binary form back to presentation format, and displays the resulting string.

In order to demonstrate that inet_net_pton() may not write to all bytes of its netp argument, the program allows an optional second command-line argument, a number used to initialize the buffer before inet_net_pton() is called. As its final line of output, the program displays all of the bytes of the buffer returned by inet_net_pton() allowing the user to see which bytes have not been touched by inet_net_pton().

An example run, showing that inet_net_pton() infers the number of bits in the network number:

$ ./a.out 193.168
inet_net_pton() returned: 24
inet_net_ntop() yielded:  193.168.0/24
Raw address:              c1a80000

Demonstrate that inet_net_pton() does not zero out unused bytes in its result buffer:

$ ./a.out 193.168 0xffffffff
inet_net_pton() returned: 24
inet_net_ntop() yielded:  193.168.0/24
Raw address:              c1a800ff

Demonstrate that inet_net_pton() will widen the inferred size of the network number, if the supplied number of bytes in the presentation string exceeds the inferred value:

$ ./a.out 193.168.1.128
inet_net_pton() returned: 32
inet_net_ntop() yielded:  193.168.1.128/32
Raw address:              c1a80180

Explicitly specifying the size of the network number overrides any inference about its size (but any extra bytes that are explicitly specified will still be used by inet_net_pton(): to populate the result buffer):

$ ./a.out 193.168.1.128/24
inet_net_pton() returned: 24
inet_net_ntop() yielded:  193.168.1/24
Raw address:              c1a80180

Program source

/* Link with "-lresolv" */
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \
                        } while (0)
int
main(int argc, char *argv[])
{
    char buf[100];
    struct in_addr addr;
    int bits;
    if (argc < 2) {
        fprintf(stderr,
                "Usage: %s presentation-form [addr-init-value]

“, argv[0]); exit(EXIT_FAILURE); } /* If argv[2] is supplied (a numeric value), use it to initialize the output buffer given to inet_net_pton(), so that we can see that inet_net_pton() initializes only those bytes needed for the network number. If argv[2] is not supplied, then initialize the buffer to zero (as is recommended practice). / addr.s_addr = (argc > 2) ? strtod(argv[2], NULL) : 0; / Convert presentation network number in argv[1] to binary. / bits = inet_net_pton(AF_INET, argv[1], &addr, sizeof(addr)); if (bits == -1) errExit(“inet_net_ntop”); printf(“inet_net_pton() returned: %d “, bits); / Convert binary format back to presentation, using ‘bits’ returned by inet_net_pton(). / if (inet_net_ntop(AF_INET, &addr, bits, buf, sizeof(buf)) == NULL) errExit(“inet_net_ntop”); printf(“inet_net_ntop() yielded: %s “, buf); / Display ‘addr’ in raw form (in network byte order), so we can see bytes not displayed by inet_net_ntop(); some of those bytes may not have been touched by inet_net_ntop(), and so will still have any initial value that was specified in argv[2]. */ printf(“Raw address: %x “, htonl(addr.s_addr)); exit(EXIT_SUCCESS); }

SEE ALSO

inet(3), networks(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

556 - Linux cli command IO_Linespm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_Linespm and provides detailed information about the command IO_Linespm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_Linespm.

NAME 🖥️ IO_Linespm 🖥️

IO:: interface for reading/writing an array of lines

SYNOPSIS

use IO::Lines; ### See IO::ScalarArray for details

DESCRIPTION

This class implements objects which behave just like FileHandle (or IO::Handle) objects, except that you may use them to write to (or read from) an array of lines. tiehandle capable as well.

This is a subclass of IO::ScalarArray in which the underlying array has its data stored in a line-oriented-format: that is, every element ends in a " ", with the possible exception of the final element. This makes getline() much more efficient; if you plan to do line-oriented reading/printing, you want this class.

The print() method will enforce this rule, so you can print arbitrary data to the line-array: it will break the data at newlines appropriately.

See IO::ScalarArray for full usage and warnings.

VERSION

$Id: Lines.pm,v 1.3 2005/02/10 21:21:53 dfs Exp $

AUTHOR

Eryq ([email protected]). President, ZeeGee Software Inc (http://www.zeegee.com).

CONTRIBUTORS

Dianne Skoll ([email protected]).

COPYRIGHT & LICENSE

Copyright (c) 1997 Erik (Eryq) Dorfman, ZeeGee Software, Inc. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

557 - Linux cli command Moose_Meta_Instancepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Instancepm and provides detailed information about the command Moose_Meta_Instancepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Instancepm.

NAME 🖥️ Moose_Meta_Instancepm 🖥️

The Moose Instance metaclass

VERSION

version 2.2207

SYNOPSIS

# nothing to see here

DESCRIPTION

This class provides the low level data storage abstractions for attributes.

Using this API directly in your own code violates encapsulation, and we recommend that you use the appropriate APIs in Moose::Meta::Class and Moose::Meta::Attribute instead. Those APIs in turn call the methods in this class as appropriate.

At present, this is an empty subclass of Class::MOP::Instance, so you should see that class for all API details.

INHERITANCE

Moose::Meta::Instance is a subclass of Class::MOP::Instance.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

558 - Linux cli command zip_stat_index

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_stat_index and provides detailed information about the command zip_stat_index, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_stat_index.

libzip (-lzip)

The

function obtains information about the file named

in

The

argument specifies how the name lookup should be done. Its values are described in

Also,

may be

to it to request information about the original file in the archive, ignoring any changes made.

The

function obtains information about the file at position

The

argument is a pointer to a

(shown below), into which information about the file is placed.

struct zip_stat { zip_uint64_t valid; /* which fields have valid values */ const char *name; /* name of the file */ zip_uint64_t index; /* index within archive */ zip_uint64_t size; /* size of file (uncompressed) */ zip_uint64_t comp_size; /* size of file (compressed) */ time_t mtime; /* modification time */ zip_uint32_t crc; /* crc of file data */ zip_uint16_t comp_method; /* compression method used */ zip_uint16_t encryption_method; /* encryption method used */ zip_uint32_t flags; /* reserved for future use */ };

The structure pointed to by

must be allocated before calling

or

The

field of the structure specifies which other fields are valid. Check if the flag defined by the following defines are in

before accessing the fields:

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

The function

can fail for any of the errors specified for the routine

The function

fails and sets the error information to

if

is invalid. If

is not set and no information can be obtained from the source callback, the error information is set to

was added in libzip 0.6. In libzip 0.11 the type of

was changed from

to

was added in libzip 0.6. In libzip 0.10 the type of

was changed from

to

In libzip 0.11 the type of

was changed from

to

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

559 - Linux cli command fmax

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fmax and provides detailed information about the command fmax, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fmax.

NAME 🖥️ fmax 🖥️

determine maximum of two floating-point numbers

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double fmax(double x, double y);
float fmaxf(float x, float y);
long double fmaxl(long double x, long double y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

fmax(), fmaxf(), fmaxl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions return the larger value of x and y.

RETURN VALUE

These functions return the maximum of x and y.

If one argument is a NaN, the other argument is returned.

If both arguments are NaN, a NaN is returned.

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fmax(), fmaxf(), fmaxl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

fdim(3), fmin(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

560 - Linux cli command IO_All_Dirpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_All_Dirpm and provides detailed information about the command IO_All_Dirpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_All_Dirpm.

NAME 🖥️ IO_All_Dirpm 🖥️

Directory Support for IO::All

SYNOPSIS

See IO::All.

DESCRIPTION

<<<cpan-foot>>>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

561 - Linux cli command strtol

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strtol and provides detailed information about the command strtol, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strtol.

NAME 🖥️ strtol 🖥️

convert a string to a long integer

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
long strtol(const char *restrict nptr,
 char **restrict endptr, int base);
long long strtoll(const char *restrict nptr,
 char **restrict endptr, int base);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strtoll():

    _ISOC99_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The strtol() function converts the initial part of the string in nptr to a long integer value according to the given base, which must be between 2 and 36 inclusive, or be the special value 0.

The string may begin with an arbitrary amount of white space (as determined by isspace(3)) followed by a single optional ‘+’ or ‘-’ sign. If base is zero or 16, the string may then include a “0x” or “0X” prefix, and the number will be read in base 16; otherwise, a zero base is taken as 10 (decimal) unless the next character is ‘0’, in which case it is taken as 8 (octal).

The remainder of the string is converted to a long value in the obvious manner, stopping at the first character which is not a valid digit in the given base. (In bases above 10, the letter ‘A’ in either uppercase or lowercase represents 10, ‘B’ represents 11, and so forth, with ‘Z’ representing 35.)

If endptr is not NULL, and the base is supported, strtol() stores the address of the first invalid character in *endptr. If there were no digits at all, strtol() stores the original value of nptr in *endptr (and returns 0). In particular, if *nptr is not ‘�’ but **endptr is ‘�’ on return, the entire string is valid.

The strtoll() function works just like the strtol() function but returns a long long integer value.

RETURN VALUE

The strtol() function returns the result of the conversion, unless the value would underflow or overflow. If an underflow occurs, strtol() returns LONG_MIN. If an overflow occurs, strtol() returns LONG_MAX. In both cases, errno is set to ERANGE. Precisely the same holds for strtoll() (with LLONG_MIN and LLONG_MAX instead of LONG_MIN and LONG_MAX).

ERRORS

This function does not modify errno on success.

EINVAL
(not in C99) The given base contains an unsupported value.

ERANGE
The resulting value was out of range.

The implementation may also set errno to EINVAL in case no conversion was performed (no digits seen, and 0 returned).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strtol(), strtoll(), strtoq()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

strtol()
POSIX.1-2001, C89, SVr4, 4.3BSD.

strtoll()
POSIX.1-2001, C99.

NOTES

Since strtol() can legitimately return 0, LONG_MAX, or LONG_MIN (LLONG_MAX or LLONG_MIN for strtoll()) on both success and failure, the calling program should set errno to 0 before the call, and then determine if an error occurred by checking whether errno == ERANGE after the call.

According to POSIX.1, in locales other than “C” and “POSIX”, these functions may accept other, implementation-defined numeric strings.

BSD also has

quad_t strtoq(const char *nptr, char **endptr, int base);

with completely analogous definition. Depending on the wordsize of the current architecture, this may be equivalent to strtoll() or to strtol().

CAVEATS

If the base needs to be tested, it should be tested in a call where the string is known to succeed. Otherwise, it’s impossible to portably differentiate the errors.

errno = 0;
strtol("0", NULL, base);
if (errno == EINVAL)
    goto unsupported_base;

EXAMPLES

The program shown below demonstrates the use of strtol(). The first command-line argument specifies a string from which strtol() should parse a number. The second (optional) argument specifies the base to be used for the conversion. (This argument is converted to numeric form using atoi(3), a function that performs no error checking and has a simpler interface than strtol().) Some examples of the results produced by this program are the following:

$ ./a.out 123
strtol() returned 123
$ ./a.out ' 123'
strtol() returned 123
$ ./a.out 123abc
strtol() returned 123
Further characters after number: "abc"
$ ./a.out 123abc 55
strtol: Invalid argument
$ ./a.out ''
No digits were found
$ ./a.out 4000000000
strtol: Numerical result out of range

Program source

#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
    int base;
    char *endptr, *str;
    long val;
    if (argc < 2) {
        fprintf(stderr, "Usage: %s str [base]

“, argv[0]); exit(EXIT_FAILURE); } str = argv[1]; base = (argc > 2) ? atoi(argv[2]) : 0; errno = 0; /* To distinguish success/failure after call / strtol(“0”, NULL, base); if (errno == EINVAL) { perror(“strtol”); exit(EXIT_FAILURE); } errno = 0; / To distinguish success/failure after call / val = strtol(str, &endptr, base); / Check for various possible errors. / if (errno == ERANGE) { perror(“strtol”); exit(EXIT_FAILURE); } if (endptr == str) { fprintf(stderr, “No digits were found “); exit(EXIT_FAILURE); } / If we got here, strtol() successfully parsed a number. */ printf(“strtol() returned %ld “, val); if (endptr != ‘�’) / Not necessarily an error… */ printf(“Further characters after number: "%s" “, endptr); exit(EXIT_SUCCESS); }

SEE ALSO

atof(3), atoi(3), atol(3), strtod(3), strtoimax(3), strtoul(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

562 - Linux cli command PA_LASTconst

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command PA_LASTconst and provides detailed information about the command PA_LASTconst, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the PA_LASTconst.

NAME 🖥️ PA_LASTconst 🖥️

define custom behavior for printf-like functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <printf.h>
int register_printf_specifier(int spec, printf_function func,
 printf_arginfo_size_function arginfo);
int register_printf_modifier(const wchar_t *str);
int register_printf_type(printf_va_arg_function fct);

Callbacks

typedef int printf_function(FILE *stream, const struct printf_info *info,
 const void *const args[]);
typedef int printf_arginfo_size_function(const struct printf_info *info,
 size_t n, int argtypes[n], int size[n]);
typedef void printf_va_arg_function(void *mem, va_list *ap);

Types

struct printf_info {
 int prec; // Precision
 int width; // Width
 wchar_t spec; // Format letter
 unsigned int is_long_double:1;// L or ll flag
 unsigned int is_short:1; // h flag
 unsigned int is_long:1; // l flag
 unsigned int alt:1; // # flag
 unsigned int space:1; // Space flag
 unsigned int left:1; // - flag
 unsigned int showsign:1; // + flag
 unsigned int group:1; // ' flag
 unsigned int extra:1; // For special use
 unsigned int is_char:1; // hh flag
 unsigned int wide:1; // True for wide character streams
 unsigned int i18n:1; // I flag
 unsigned int is_binary128:1; /* Floating-point argument is
  ABI-compatible with
  IEC 60559 binary128 */
 unsigned short user; // Bits for user-installed modifiers
 wchar_t pad; // Padding character
};

Constants

#define PA_FLAG_LONG_LONG /* ... */
#define PA_FLAG_LONG_DOUBLE /* ... */
#define PA_FLAG_LONG /* ... */
#define PA_FLAG_SHORT /* ... */
#define PA_FLAG_PTR /* ... */

DESCRIPTION

These functions serve to extend and/or modify the behavior of the printf(3) family of functions.

register_printf_specifier()

This function registers a custom conversion specifier for the printf(3) family of functions.

spec
The character which will be used as a conversion specifier in the format string.

func
Callback function that will be executed by the printf(3) family of functions to format the input arguments into the output stream.

stream
Output stream where the formatted output should be printed. This stream transparently represents the output, even in the case of functions that write to a string.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in arginfo.

args
Array of pointers to the arguments to the printf(3) -like function.

arginfo
Callback function that will be executed by the printf(3) family of functions to know how many arguments should be parsed for the custom specifier and also their types.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in func.

n
Number of arguments remaining to be parsed.

argtypes
This array should be set to define the type of each of the arguments that will be parsed. Each element in the array represents one of the arguments to be parsed, in the same order that they are passed to the printf(3) -like function. Each element should be set to a base type (PA_*) from the enum above, or a custom one, and optionally ORed with an appropriate length modifier (PA_FLAG_*).

The type is determined by using one of the following constants:

PA_INT
int.

PA_CHAR
int, cast to char.

PA_WCHAR
wchar_t.

PA_STRING
const char *, a ‘�’-terminated string.

PA_WSTRING
const wchar_t *, a wide character L’�’-terminated string.

PA_POINTER
void *.

PA_FLOAT
float.

PA_DOUBLE
double.

PA_LAST
TODO.

size
For user-defined types, the size of the type (in bytes) should also be specified through this array. Otherwise, leave it unused.

arginfo is called before func, and prepares some information needed to call func.

register_printf_modifier()

TODO

register_printf_type()

TODO

RETURN VALUE

register_printf_specifier(), register_printf_modifier(), and register_printf_type() return zero on success, or -1 on error.

Callbacks

The callback of type printf_function should return the number of characters written, or -1 on error.

The callback of type printf_arginfo_size_function should return the number of arguments to be parsed by this specifier. It also passes information about the type of those arguments to the caller through argtypes. On error, it should return -1.

ERRORS

EINVAL
The specifier was not a valid character.

STANDARDS

GNU.

HISTORY

register_printf_function(3) is an older function similar to register_printf_specifier(), and is now deprecated. That function can’t handle user-defined types.

register_printf_specifier() supersedes register_printf_function(3).

EXAMPLES

The following example program registers the ‘b’ and ‘B’ specifiers to print integers in binary format, mirroring rules for other unsigned conversion specifiers like ‘x’ and ‘u’. This can be used to print in binary prior to C23.

/* This code is in the public domain */
#include <err.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <printf.h>
#define GROUP_SEP  '\''
struct Printf_Pad {
    char    ch;
    size_t  len;
};
static int b_printf(FILE *stream, const struct printf_info *info,
                    const void *const args[]);
static int b_arginf_sz(const struct printf_info *info,
                    size_t n, int argtypes[n], int size[n]);
static uintmax_t b_value(const struct printf_info *info,
                    const void *arg);
static size_t b_bin_repr(char bin[UINTMAX_WIDTH],
                    const struct printf_info *info, const void *arg);
static size_t b_bin_len(const struct printf_info *info,
                    ptrdiff_t min_len);
static size_t b_pad_len(const struct printf_info *info,
                    ptrdiff_t bin_len);
static ssize_t b_print_prefix(FILE *stream,
                    const struct printf_info *info);
static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info,
                    ptrdiff_t min_len);
static ssize_t b_print_number(FILE *stream,
                    const struct printf_info *info,
                    const char bin[UINTMAX_WIDTH],
                    size_t min_len, size_t bin_len);
static char pad_ch(const struct printf_info *info);
static ssize_t pad_spaces(FILE *stream, size_t pad_len);
int
main(void)
{
    if (register_printf_specifier('b', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('b', ...)");
    if (register_printf_specifier('B', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('B', ...)");
    printf("....----....----....----....----

“); printf("%llb; “, 0x5Ellu); printf("%lB; “, 0x5Elu); printf("%b; “, 0x5Eu); printf("%hB; “, 0x5Eu); printf("%hhb; “, 0x5Eu); printf("%jb; “, (uintmax_t)0x5E); printf("%zb; “, (size_t)0x5E); printf(”….—-….—-….—-….—- “); printf(”%#b; “, 0x5Eu); printf(”%#B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf("%10b; “, 0x5Eu); printf("%010b; “, 0x5Eu); printf(”%.10b; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%-10B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%‘B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”….—-….—-….—-….—- “); printf(”%#16.12b; “, 0xAB); printf(”%-#‘20.12b; “, 0xAB); printf(”%#‘020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#020B; “, 0xAB); printf(”%‘020B; “, 0xAB); printf("%020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#021B; “, 0xAB); printf(”%‘021B; “, 0xAB); printf("%021B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#022B; “, 0xAB); printf(”%‘022B; “, 0xAB); printf("%022B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#023B; “, 0xAB); printf(”%‘023B; “, 0xAB); printf("%023B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%-#‘19.11b; “, 0xAB); printf(”%#‘019B; “, 0xAB); printf(”%#019B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%‘019B; “, 0xAB); printf("%019B; “, 0xAB); printf(”%#016b; “, 0xAB); printf(”….—-….—-….—-….—- “); return 0; } static int b_printf(FILE *stream, const struct printf_info *info, const void const args[]) { char bin[UINTMAX_WIDTH]; size_t min_len, bin_len; ssize_t len, tmp; struct Printf_Pad pad = {0}; len = 0; min_len = b_bin_repr(bin, info, args[0]); bin_len = b_bin_len(info, min_len); pad.ch = pad_ch(info); if (pad.ch == ’ ‘) pad.len = b_pad_len(info, bin_len); / Padding with ’ ’ (right aligned) / if ((pad.ch == ’ ‘) && !info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } / “0b”/“0B” prefix / if (info->alt) { tmp = b_print_prefix(stream, info); if (tmp == EOF) return EOF; len += tmp; } / Padding with ‘0’ / if (pad.ch == ‘0’) { tmp = b_pad_zeros(stream, info, min_len); if (tmp == EOF) return EOF; len += tmp; } / Print number (including leading 0s to fill precision) / tmp = b_print_number(stream, info, bin, min_len, bin_len); if (tmp == EOF) return EOF; len += tmp; / Padding with ’ ’ (left aligned) */ if (info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } return len; } static int b_arginf_sz(const struct printf_info *info, size_t n, int argtypes[n], [[maybe_unused]] int size[n]) { if (n < 1) return -1; if (info->is_long_double) argtypes[0] = PA_INT | PA_FLAG_LONG_LONG; else if (info->is_long) argtypes[0] = PA_INT | PA_FLAG_LONG; else argtypes[0] = PA_INT; return 1; } static uintmax_t b_value(const struct printf_info *info, const void *arg) { if (info->is_long_double) return *(const unsigned long long *)arg; if (info->is_long) return *(const unsigned long )arg; / short and char are both promoted to int */ return *(const unsigned int *)arg; } static size_t b_bin_repr(char bin[UINTMAX_WIDTH], const struct printf_info *info, const void *arg) { size_t min_len; uintmax_t val; val = b_value(info, arg); bin[0] = ‘0’; for (min_len = 0; val; min_len++) { bin[min_len] = ‘0’ + (val % 2); val »= 1; } return MAX(min_len, 1); } static size_t b_bin_len(const struct printf_info *info, ptrdiff_t min_len) { return MAX(info->prec, min_len); } static size_t b_pad_len(const struct printf_info *info, ptrdiff_t bin_len) { ptrdiff_t pad_len; pad_len = info->width - bin_len; if (info->alt) pad_len -= 2; if (info->group) pad_len -= (bin_len - 1) / 4; return MAX(pad_len, 0); } static ssize_t b_print_prefix(FILE *stream, const struct printf_info *info) { ssize_t len; len = 0; if (fputc(‘0’, stream) == EOF) return EOF; len++; if (fputc(info->spec, stream) == EOF) return EOF; len++; return len; } static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info, ptrdiff_t min_len) { ssize_t len; ptrdiff_t tmp; len = 0; tmp = info->width - (info->alt * 2); if (info->group) tmp -= tmp / 5 - !(tmp % 5); for (ptrdiff_t i = tmp - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static ssize_t b_print_number(FILE *stream, const struct printf_info info, const char bin[UINTMAX_WIDTH], size_t min_len, size_t bin_len) { ssize_t len; len = 0; / Print leading zeros to fill precision / for (size_t i = bin_len - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } / Print number */ for (size_t i = min_len - 1; i < min_len; i–) { if (fputc(bin[i], stream) == EOF) return EOF; len++; if (!info->group || (i % 4) || !i) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static char pad_ch(const struct printf_info *info) { if ((info->prec != -1) || (info->pad == ’ ‘) || info->left) return ’ ‘; return ‘0’; } static ssize_t pad_spaces(FILE *stream, size_t pad_len) { ssize_t len; len = 0; for (size_t i = pad_len - 1; i < pad_len; i–) { if (fputc(’ ‘, stream) == EOF) return EOF; len++; } return len; }

SEE ALSO

asprintf(3), printf(3), wprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

563 - Linux cli command wctrans

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wctrans and provides detailed information about the command wctrans, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wctrans.

NAME 🖥️ wctrans 🖥️

wide-character translation mapping

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wctype.h>
wctrans_t wctrans(const char *name);

DESCRIPTION

The wctrans_t type represents a mapping which can map a wide character to another wide character. Its nature is implementation-dependent, but the special value (wctrans_t) 0 denotes an invalid mapping. Nonzero wctrans_t values can be passed to the towctrans(3) function to actually perform the wide-character mapping.

The wctrans() function returns a mapping, given by its name. The set of valid names depends on the LC_CTYPE category of the current locale, but the following names are valid in all locales.

    "tolower" - realizes the tolower(3) mapping
    "toupper" - realizes the toupper(3) mapping

RETURN VALUE

The wctrans() function returns a mapping descriptor if the name is valid. Otherwise, it returns (wctrans_t) 0.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wctrans()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of wctrans() depends on the LC_CTYPE category of the current locale.

SEE ALSO

towctrans(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

564 - Linux cli command getlogin

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getlogin and provides detailed information about the command getlogin, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getlogin.

NAME 🖥️ getlogin 🖥️

get username

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
char *getlogin(void);
int getlogin_r(char buf[.bufsize], size_t bufsize);
#include <stdio.h>
char *cuserid(char *string);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getlogin_r():

    _POSIX_C_SOURCE >= 199506L

cuserid():

    Since glibc 2.24:
        (_XOPEN_SOURCE && ! (_POSIX_C_SOURCE >= 200112L)
            || _GNU_SOURCE
    Up to and including glibc 2.23:
        _XOPEN_SOURCE

DESCRIPTION

getlogin() returns a pointer to a string containing the name of the user logged in on the controlling terminal of the process, or a null pointer if this information cannot be determined. The string is statically allocated and might be overwritten on subsequent calls to this function or to cuserid().

getlogin_r() returns this same username in the array buf of size bufsize.

cuserid() returns a pointer to a string containing a username associated with the effective user ID of the process. If string is not a null pointer, it should be an array that can hold at least L_cuserid characters; the string is returned in this array. Otherwise, a pointer to a string in a static area is returned. This string is statically allocated and might be overwritten on subsequent calls to this function or to getlogin().

The macro L_cuserid is an integer constant that indicates how long an array you might need to store a username. L_cuserid is declared in <stdio.h>.

These functions let your program identify positively the user who is running (cuserid()) or the user who logged in this session (getlogin()). (These can differ when set-user-ID programs are involved.)

For most purposes, it is more useful to use the environment variable LOGNAME to find out who the user is. This is more flexible precisely because the user can set LOGNAME arbitrarily.

RETURN VALUE

getlogin() returns a pointer to the username when successful, and NULL on failure, with errno set to indicate the error. getlogin_r() returns 0 when successful, and nonzero on failure.

ERRORS

POSIX specifies:

EMFILE
The per-process limit on the number of open file descriptors has been reached.

ENFILE
The system-wide limit on the total number of open files has been reached.

ENXIO
The calling process has no controlling terminal.

ERANGE
(getlogin_r) The length of the username, including the terminating null byte (‘�’), is larger than bufsize.

Linux/glibc also has:

ENOENT
There was no corresponding entry in the utmp-file.

ENOMEM
Insufficient memory to allocate passwd structure.

ENOTTY
Standard input didn’t refer to a terminal. (See BUGS.)

FILES

/etc/passwd
password database file

/var/run/utmp
(traditionally /etc/utmp; some libc versions used /var/adm/utmp)

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getlogin()

Thread safety

MT-Unsafe race:getlogin race:utent sig:ALRM timer locale

getlogin_r()

Thread safety

MT-Unsafe race:utent sig:ALRM timer locale

cuserid()

Thread safety

MT-Unsafe race:cuserid/!string locale

In the above table, utent in race:utent signifies that if any of the functions setutent(3), getutent(3), or endutent(3) are used in parallel in different threads of a program, then data races could occur. getlogin() and getlogin_r() call those functions, so we use race:utent to remind users.

VERSIONS

OpenBSD has getlogin() and setlogin(), and a username associated with a session, even if it has no controlling terminal.

STANDARDS

getlogin()
getlogin_r()
POSIX.1-2008.

cuserid()
None.

STANDARDS

getlogin()
getlogin_r():
POSIX.1-2001. OpenBSD.

cuserid()
System V, POSIX.1-1988. Removed in POSIX.1-1990. SUSv2. Removed in POSIX.1-2001.

System V has a cuserid() function which uses the real user ID rather than the effective user ID.

BUGS

Unfortunately, it is often rather easy to fool getlogin(). Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling terminal of our program need not be the user who started it. Avoid getlogin() for security-related purposes.

Note that glibc does not follow the POSIX specification and uses stdin instead of /dev/tty. A bug. (Other recent systems, like SunOS 5.8 and HP-UX 11.11 and FreeBSD 4.8 all return the login name also when stdin is redirected.)

Nobody knows precisely what cuserid() does; avoid it in portable programs. Or avoid it altogether: use getpwuid(geteuid()) instead, if that is what you meant. Do not use cuserid().

SEE ALSO

logname(1), geteuid(2), getuid(2), utmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

565 - Linux cli command timelocal

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command timelocal and provides detailed information about the command timelocal, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the timelocal.

NAME 🖥️ timelocal 🖥️

inverses of gmtime and localtime

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <time.h>
[[deprecated]] time_t timelocal(struct tm *tm);
time_t timegm(struct tm *tm);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

timelocal(), timegm():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The functions timelocal() and timegm() are the inverses of localtime(3) and gmtime(3). Both functions take a broken-down time and convert it to calendar time (seconds since the Epoch, 1970-01-01 00:00:00 +0000, UTC). The difference between the two functions is that timelocal() takes the local timezone into account when doing the conversion, while timegm() takes the input value to be Coordinated Universal Time (UTC).

RETURN VALUE

On success, these functions return the calendar time (seconds since the Epoch), expressed as a value of type time_t. On error, they return the value (time_t) -1 and set errno to indicate the error.

ERRORS

EOVERFLOW
The result cannot be represented.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

timelocal(), timegm()

Thread safetyMT-Safe env locale

STANDARDS

BSD.

HISTORY

GNU, BSD.

The timelocal() function is equivalent to the POSIX standard function mktime(3). There is no reason to ever use it.

SEE ALSO

gmtime(3), localtime(3), mktime(3), tzset(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

566 - Linux cli command Image_ExifTool_WritePNGpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_WritePNGpm and provides detailed information about the command Image_ExifTool_WritePNGpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_WritePNGpm.

NAME 🖥️ Image_ExifTool_WritePNGpm 🖥️

Write PNG meta information

SYNOPSIS

These routines are autoloaded by Image::ExifTool::PNG.

DESCRIPTION

This file contains routines to write PNG metadata.

NOTES

Compress::Zlib is required to write compressed text.

Existing text tags are always rewritten in their original form (compressed zTXt, uncompressed tEXt or international iTXt), so pre-existing compressed information can only be modified if Compress::Zlib is available.

Newly created textual information is written in uncompressed tEXt form by default, or as compressed zTXt if the Compress option is used and Compress::Zlib is available (but only if the resulting compressed data is smaller than the original text, which isn’t always the case for short text strings).

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Image::ExifTool::PNG (3pm), Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

567 - Linux cli command pthread_setaffinity_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_setaffinity_np and provides detailed information about the command pthread_setaffinity_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_setaffinity_np.

NAME 🖥️ pthread_setaffinity_np 🖥️

set/get CPU affinity of a thread

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <pthread.h>
int pthread_setaffinity_np(pthread_t thread, size_t cpusetsize,
 const cpu_set_t *cpuset);
int pthread_getaffinity_np(pthread_t thread, size_t cpusetsize,
 cpu_set_t *cpuset);

DESCRIPTION

The pthread_setaffinity_np() function sets the CPU affinity mask of the thread thread to the CPU set pointed to by cpuset. If the call is successful, and the thread is not currently running on one of the CPUs in cpuset, then it is migrated to one of those CPUs.

The pthread_getaffinity_np() function returns the CPU affinity mask of the thread thread in the buffer pointed to by cpuset.

For more details on CPU affinity masks, see sched_setaffinity(2). For a description of a set of macros that can be used to manipulate and inspect CPU sets, see CPU_SET(3).

The argument cpusetsize is the length (in bytes) of the buffer pointed to by cpuset. Typically, this argument would be specified as sizeof(cpu_set_t). (It may be some other value, if using the macros described in CPU_SET(3) for dynamically allocating a CPU set.)

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

EFAULT
A supplied memory address was invalid.

EINVAL
(pthread_setaffinity_np()) The affinity bit mask mask contains no processors that are currently physically on the system and permitted to the thread according to any restrictions that may be imposed by the “cpuset” mechanism described in cpuset(7).

EINVAL
(pthread_setaffinity_np()) cpuset specified a CPU that was outside the set supported by the kernel. (The kernel configuration option CONFIG_NR_CPUS defines the range of the set supported by the kernel data type used to represent CPU sets.)

EINVAL
(pthread_getaffinity_np()) cpusetsize is smaller than the size of the affinity mask used by the kernel.

ESRCH
No thread with the ID thread could be found.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_setaffinity_np(), pthread_getaffinity_np()

Thread safetyMT-Safe

STANDARDS

GNU; hence the suffix “_np” (nonportable) in the names.

HISTORY

glibc 2.3.4.

In glibc 2.3.3 only, versions of these functions were provided that did not have a cpusetsize argument. Instead the CPU set size given to the underlying system calls was always sizeof(cpu_set_t).

NOTES

After a call to pthread_setaffinity_np(), the set of CPUs on which the thread will actually run is the intersection of the set specified in the cpuset argument and the set of CPUs actually present on the system. The system may further restrict the set of CPUs on which the thread runs if the “cpuset” mechanism described in cpuset(7) is being used. These restrictions on the actual set of CPUs on which the thread will run are silently imposed by the kernel.

These functions are implemented on top of the sched_setaffinity(2) and sched_getaffinity(2) system calls.

A new thread created by pthread_create(3) inherits a copy of its creator’s CPU affinity mask.

EXAMPLES

In the following program, the main thread uses pthread_setaffinity_np() to set its CPU affinity mask to include CPUs 0 to 7 (which may not all be available on the system), and then calls pthread_getaffinity_np() to check the resulting CPU affinity mask of the thread.

#define _GNU_SOURCE
#include <err.h>
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    int s;
    cpu_set_t cpuset;
    pthread_t thread;
    thread = pthread_self();
    /* Set affinity mask to include CPUs 0 to 7. */
    CPU_ZERO(&cpuset);
    for (size_t j = 0; j < 8; j++)
        CPU_SET(j, &cpuset);
    s = pthread_setaffinity_np(thread, sizeof(cpuset), &cpuset);
    if (s != 0)
        errc(EXIT_FAILURE, s, "pthread_setaffinity_np");
    /* Check the actual affinity mask assigned to the thread. */
    s = pthread_getaffinity_np(thread, sizeof(cpuset), &cpuset);
    if (s != 0)
        errc(EXIT_FAILURE, s, "pthread_getaffinity_np");
    printf("Set returned by pthread_getaffinity_np() contained:

“); for (size_t j = 0; j < CPU_SETSIZE; j++) if (CPU_ISSET(j, &cpuset)) printf(” CPU %zu “, j); exit(EXIT_SUCCESS); }

SEE ALSO

sched_setaffinity(2), CPU_SET(3), pthread_attr_setaffinity_np(3), pthread_self(3), sched_getcpu(3), cpuset(7), pthreads(7), sched(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

568 - Linux cli command suseconds_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command suseconds_ttype and provides detailed information about the command suseconds_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the suseconds_ttype.

NAME 🖥️ suseconds_ttype 🖥️

integer time

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <time.h>
typedef /* ... */ time_t;
#include <sys/types.h>
typedef /* ... */ suseconds_t;
typedef /* ... */ useconds_t;

DESCRIPTION

time_t
Used for time in seconds. According to POSIX, it is an integer type.

suseconds_t
Used for time in microseconds. It is a signed integer type capable of storing values at least in the range [-1, 1000000].

useconds_t
Used for time in microseconds. It is an unsigned integer type capable of storing values at least in the range [0, 1000000].

STANDARDS

time_t
C11, POSIX.1-2008.

suseconds_t
useconds_t
POSIX.1-2008.

HISTORY

time_t
C89, POSIX.1-2001.

suseconds_t
useconds_t
POSIX.1-2001.

<sched.h> defines time_t since POSIX.1-2008.

POSIX.1-2001 defined useconds_t in <unistd.h> too.

NOTES

On some architectures, the width of time_t can be controlled with the feature test macro _TIME_BITS. See feature_test_macros(7).

The following headers also provide time_t: <sched.h>, <sys/msg.h>, <sys/select.h>, <sys/sem.h>, <sys/shm.h>, <sys/stat.h>, <sys/time.h>, <sys/types.h>, and <utime.h>.

The following headers also provide suseconds_t: <sys/select.h> and <sys/time.h>.

SEE ALSO

stime(2), time(2), ctime(3), difftime(3), usleep(3), timeval(3type)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

569 - Linux cli command in_addrtype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command in_addrtype and provides detailed information about the command in_addrtype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the in_addrtype.

NAME 🖥️ in_addrtype 🖥️

socket address

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/socket.h>
struct sockaddr {
 sa_family_t sa_family; /* Address family */
 char sa_data[]; /* Socket address */
};
struct sockaddr_storage {
 sa_family_t ss_family; /* Address family */
};
typedef /* ... */ socklen_t;
typedef /* ... */ sa_family_t;

Internet domain sockets

#include <netinet/in.h>
struct sockaddr_in {
 sa_family_t sin_family; /* AF_INET */
 in_port_t sin_port; /* Port number */
 struct in_addr sin_addr; /* IPv4 address */
};
struct sockaddr_in6 {
 sa_family_t sin6_family; /* AF_INET6 */
 in_port_t sin6_port; /* Port number */
 uint32_t sin6_flowinfo; /* IPv6 flow info */
 struct in6_addr sin6_addr; /* IPv6 address */
 uint32_t sin6_scope_id; /* Set of interfaces for a scope */
};
struct in_addr {
 in_addr_t s_addr;
};
struct in6_addr {
 uint8_t s6_addr[16];
};
typedef uint32_t in_addr_t;
typedef uint16_t in_port_t;

UNIX domain sockets

#include <sys/un.h>
struct sockaddr_un {
 sa_family_t sun_family; /* Address family */
 char sun_path[]; /* Socket pathname */
};

DESCRIPTION

sockaddr
Describes a socket address.

sockaddr_storage
A structure at least as large as any other sockaddr_* address structures. It’s aligned so that a pointer to it can be cast as a pointer to other sockaddr_* structures and used to access its fields.

socklen_t
Describes the length of a socket address. This is an integer type of at least 32 bits.

sa_family_t
Describes a socket’s protocol family. This is an unsigned integer type.

Internet domain sockets

sockaddr_in
Describes an IPv4 Internet domain socket address. The sin_port and sin_addr members are stored in network byte order.

sockaddr_in6
Describes an IPv6 Internet domain socket address. The sin6_addr.s6_addr array is used to contain a 128-bit IPv6 address, stored in network byte order.

UNIX domain sockets

sockaddr_un
Describes a UNIX domain socket address.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

socklen_t was invented by POSIX. See also accept(2).

These structures were invented before modern ISO C strict-aliasing rules. If aliasing rules are applied strictly, these structures would be extremely difficult to use without invoking Undefined Behavior. POSIX Issue 8 will fix this by requiring that implementations make sure that these structures can be safely used as they were designed.

NOTES

socklen_t is also defined in <netdb.h>.

sa_family_t is also defined in <netinet/in.h> and <sys/un.h>.

SEE ALSO

accept(2), bind(2), connect(2), getpeername(2), getsockname(2), getsockopt(2), sendto(2), setsockopt(2), socket(2), socketpair(2), getaddrinfo(3), gethostbyaddr(3), getnameinfo(3), htonl(3), ipv6(7), socket(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

570 - Linux cli command opendir

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command opendir and provides detailed information about the command opendir, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the opendir.

NAME 🖥️ opendir 🖥️

open a directory

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <dirent.h>
DIR *opendir(const char *name);
DIR *fdopendir(int fd);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

fdopendir():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The opendir() function opens a directory stream corresponding to the directory name, and returns a pointer to the directory stream. The stream is positioned at the first entry in the directory.

The fdopendir() function is like opendir(), but returns a directory stream for the directory referred to by the open file descriptor fd. After a successful call to fdopendir(), fd is used internally by the implementation, and should not otherwise be used by the application.

RETURN VALUE

The opendir() and fdopendir() functions return a pointer to the directory stream. On error, NULL is returned, and errno is set to indicate the error.

ERRORS

EACCES
Permission denied.

EBADF
fd is not a valid file descriptor opened for reading.

EMFILE
The per-process limit on the number of open file descriptors has been reached.

ENFILE
The system-wide limit on the total number of open files has been reached.

ENOENT
Directory does not exist, or name is an empty string.

ENOMEM
Insufficient memory to complete the operation.

ENOTDIR
name is not a directory.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

opendir(), fdopendir()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

STANDARDS

opendir()
SVr4, 4.3BSD, POSIX.1-2001.

fdopendir()
POSIX.1-2008. glibc 2.4.

NOTES

Filename entries can be read from a directory stream using readdir(3).

The underlying file descriptor of the directory stream can be obtained using dirfd(3).

The opendir() function sets the close-on-exec flag for the file descriptor underlying the DIR *. The fdopendir() function leaves the setting of the close-on-exec flag unchanged for the file descriptor, fd. POSIX.1-200x leaves it unspecified whether a successful call to fdopendir() will set the close-on-exec flag for the file descriptor, fd.

SEE ALSO

open(2), closedir(3), dirfd(3), readdir(3), rewinddir(3), scandir(3), seekdir(3), telldir(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

571 - Linux cli command getsubopt

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getsubopt and provides detailed information about the command getsubopt, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getsubopt.

NAME 🖥️ getsubopt 🖥️

parse suboption arguments from a string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int getsubopt(char **restrict optionp, char *const *restrict tokens,
 char **restrict valuep);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getsubopt():

    _XOPEN_SOURCE >= 500
        || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L

DESCRIPTION

getsubopt() parses the list of comma-separated suboptions provided in optionp. (Such a suboption list is typically produced when getopt(3) is used to parse a command line; see for example the -o option of mount(8).) Each suboption may include an associated value, which is separated from the suboption name by an equal sign. The following is an example of the kind of string that might be passed in optionp:

ro,name=xyz

The tokens argument is a pointer to a NULL-terminated array of pointers to the tokens that getsubopt() will look for in optionp. The tokens should be distinct, null-terminated strings containing at least one character, with no embedded equal signs or commas.

Each call to getsubopt() returns information about the next unprocessed suboption in optionp. The first equal sign in a suboption (if any) is interpreted as a separator between the name and the value of that suboption. The value extends to the next comma, or (for the last suboption) to the end of the string. If the name of the suboption matches a known name from tokens, and a value string was found, getsubopt() sets *valuep to the address of that string. The first comma in optionp is overwritten with a null byte, so *valuep is precisely the “value string” for that suboption.

If the suboption is recognized, but no value string was found, *valuep is set to NULL.

When getsubopt() returns, optionp points to the next suboption, or to the null byte (‘�’) at the end of the string if the last suboption was just processed.

RETURN VALUE

If the first suboption in optionp is recognized, getsubopt() returns the index of the matching suboption element in tokens. Otherwise, -1 is returned and *valuep is the entire name**[=value]** string.

Since *optionp is changed, the first suboption before the call to getsubopt() is not (necessarily) the same as the first suboption after getsubopt().

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getsubopt()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

Since getsubopt() overwrites any commas it finds in the string *optionp, that string must be writable; it cannot be a string constant.

EXAMPLES

The following program expects suboptions following a “-o” option.

#define _XOPEN_SOURCE 500
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
int
main(int argc, char *argv[])
{
    enum {
        RO_OPT = 0,
        RW_OPT,
        NAME_OPT
    };
    char *const token[] = {
        [RO_OPT]   = "ro",
        [RW_OPT]   = "rw",
        [NAME_OPT] = "name",
        NULL
    };
    char *subopts;
    char *value;
    int opt;
    int readonly = 0;
    int readwrite = 0;
    char *name = NULL;
    int errfnd = 0;
    while ((opt = getopt(argc, argv, "o:")) != -1) {
        switch (opt) {
        case 'o':
            subopts = optarg;
            while (*subopts != '' && !errfnd) {
                switch (getsubopt(&subopts, token, &value)) {
                case RO_OPT:
                    readonly = 1;
                    break;
                case RW_OPT:
                    readwrite = 1;
                    break;
                case NAME_OPT:
                    if (value == NULL) {
                        fprintf(stderr,
                                "Missing value for suboption '%s'

“, token[NAME_OPT]); errfnd = 1; continue; } name = value; break; default: fprintf(stderr, “No match found for token: /%s/ “, value); errfnd = 1; break; } } if (readwrite && readonly) { fprintf(stderr, “Only one of ‘%s’ and ‘%s’ can be specified “, token[RO_OPT], token[RW_OPT]); errfnd = 1; } break; default: errfnd = 1; } } if (errfnd || argc == 1) { fprintf(stderr, " Usage: %s -o “, argv[0]); fprintf(stderr, “suboptions are ‘ro’, ‘rw’, and ’name=’ “); exit(EXIT_FAILURE); } /* Remainder of program… */ exit(EXIT_SUCCESS); }

SEE ALSO

getopt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

572 - Linux cli command inet_aton

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command inet_aton and provides detailed information about the command inet_aton, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the inet_aton.

NAME 🖥️ inet_aton 🖥️

Internet address manipulation routines

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
int inet_aton(const char *cp, struct in_addr *inp);
in_addr_t inet_addr(const char *cp);
in_addr_t inet_network(const char *cp);
[[deprecated]] char *inet_ntoa(struct in_addr in);
[[deprecated]] struct in_addr inet_makeaddr(in_addr_t net,
 in_addr_t host);
[[deprecated]] in_addr_t inet_lnaof(struct in_addr in);
[[deprecated]] in_addr_t inet_netof(struct in_addr in);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

inet_aton(), inet_ntoa():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    In glibc up to and including 2.19:
        _BSD_SOURCE || _BSD_SOURCE

DESCRIPTION

inet_aton() converts the Internet host address cp from the IPv4 numbers-and-dots notation into binary form (in network byte order) and stores it in the structure that inp points to. inet_aton() returns nonzero if the address is valid, zero if not. The address supplied in cp can have one of the following forms:

a.b.c.d
Each of the four numeric parts specifies a byte of the address; the bytes are assigned in left-to-right order to produce the binary address.

a.b.c
Parts a and b specify the first two bytes of the binary address. Part c is interpreted as a 16-bit value that defines the rightmost two bytes of the binary address. This notation is suitable for specifying (outmoded) Class B network addresses.

a.b
Part a specifies the first byte of the binary address. Part b is interpreted as a 24-bit value that defines the rightmost three bytes of the binary address. This notation is suitable for specifying (outmoded) Class A network addresses.

a
The value a is interpreted as a 32-bit value that is stored directly into the binary address without any byte rearrangement.

In all of the above forms, components of the dotted address can be specified in decimal, octal (with a leading 0), or hexadecimal, with a leading 0X). Addresses in any of these forms are collectively termed IPV4 numbers-and-dots notation. The form that uses exactly four decimal numbers is referred to as IPv4 dotted-decimal notation (or sometimes: IPv4 dotted-quad notation).

inet_aton() returns 1 if the supplied string was successfully interpreted, or 0 if the string is invalid (errno is not set on error).

The inet_addr() function converts the Internet host address cp from IPv4 numbers-and-dots notation into binary data in network byte order. If the input is invalid, INADDR_NONE (usually -1) is returned. Use of this function is problematic because -1 is a valid address (255.255.255.255). Avoid its use in favor of inet_aton(), inet_pton(3), or getaddrinfo(3), which provide a cleaner way to indicate error return.

The inet_network() function converts cp, a string in IPv4 numbers-and-dots notation, into a number in host byte order suitable for use as an Internet network address. On success, the converted address is returned. If the input is invalid, -1 is returned.

The inet_ntoa() function converts the Internet host address in, given in network byte order, to a string in IPv4 dotted-decimal notation. The string is returned in a statically allocated buffer, which subsequent calls will overwrite.

The inet_lnaof() function returns the local network address part of the Internet address in. The returned value is in host byte order.

The inet_netof() function returns the network number part of the Internet address in. The returned value is in host byte order.

The inet_makeaddr() function is the converse of inet_netof() and inet_lnaof(). It returns an Internet host address in network byte order, created by combining the network number net with the local address host, both in host byte order.

The structure in_addr as used in inet_ntoa(), inet_makeaddr(), inet_lnaof(), and inet_netof() is defined in <netinet/in.h> as:

typedef uint32_t in_addr_t;
struct in_addr {
    in_addr_t s_addr;
};

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

inet_aton(), inet_addr(), inet_network(), inet_ntoa()

Thread safetyMT-Safe locale

inet_makeaddr(), inet_lnaof(), inet_netof()

Thread safetyMT-Safe

STANDARDS

inet_addr()
inet_ntoa()
POSIX.1-2008.

inet_aton()
None.

STANDARDS

inet_addr()
inet_ntoa()
POSIX.1-2001, 4.3BSD.

inet_lnaof(), inet_netof(), and inet_makeaddr() are legacy functions that assume they are dealing with classful network addresses. Classful networking divides IPv4 network addresses into host and network components at byte boundaries, as follows:

Class A
This address type is indicated by the value 0 in the most significant bit of the (network byte ordered) address. The network address is contained in the most significant byte, and the host address occupies the remaining three bytes.

Class B
This address type is indicated by the binary value 10 in the most significant two bits of the address. The network address is contained in the two most significant bytes, and the host address occupies the remaining two bytes.

Class C
This address type is indicated by the binary value 110 in the most significant three bits of the address. The network address is contained in the three most significant bytes, and the host address occupies the remaining byte.

Classful network addresses are now obsolete, having been superseded by Classless Inter-Domain Routing (CIDR), which divides addresses into network and host components at arbitrary bit (rather than byte) boundaries.

NOTES

On x86 architectures, the host byte order is Least Significant Byte first (little endian), whereas the network byte order, as used on the Internet, is Most Significant Byte first (big endian).

EXAMPLES

An example of the use of inet_aton() and inet_ntoa() is shown below. Here are some example runs:

$ ./a.out 226.000.000.037 # Last byte is in octal
226.0.0.31
$ ./a.out 0x7f.1  # First byte is in hex
127.0.0.1

Program source

#define _DEFAULT_SOURCE
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
    struct in_addr addr;
    if (argc != 2) {
        fprintf(stderr, "%s <dotted-address>

“, argv[0]); exit(EXIT_FAILURE); } if (inet_aton(argv[1], &addr) == 0) { fprintf(stderr, “Invalid address “); exit(EXIT_FAILURE); } printf("%s “, inet_ntoa(addr)); exit(EXIT_SUCCESS); }

SEE ALSO

byteorder(3), getaddrinfo(3), gethostbyname(3), getnameinfo(3), getnetent(3), inet_net_pton(3), inet_ntop(3), inet_pton(3), hosts(5), networks(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

573 - Linux cli command remquo

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command remquo and provides detailed information about the command remquo, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the remquo.

NAME 🖥️ remquo 🖥️

remainder and part of quotient

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double remquo(double x, double y, int *quo);
float remquof(float x, float y, int *quo);
long double remquol(long double x, long double y, int *quo);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

remquo(), remquof(), remquol():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions compute the remainder and part of the quotient upon division of x by y. A few bits of the quotient are stored via the quo pointer. The remainder is returned as the function result.

The value of the remainder is the same as that computed by the remainder(3) function.

The value stored via the quo pointer has the sign of x / y and agrees with the quotient in at least the low order 3 bits.

For example, remquo(29.0, 3.0) returns -1.0 and might store 2. Note that the actual quotient might not fit in an integer.

RETURN VALUE

On success, these functions return the same value as the analogous functions described in remainder(3).

If x or y is a NaN, a NaN is returned.

If x is an infinity, and y is not a NaN, a domain error occurs, and a NaN is returned.

If y is zero, and x is not a NaN, a domain error occurs, and a NaN is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is an infinity or y is 0, and the other argument is not a NaN
An invalid floating-point exception (FE_INVALID) is raised.

These functions do not set errno.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

remquo(), remquof(), remquol()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

fmod(3), logb(3), remainder(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

574 - Linux cli command svc_freeargs

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command svc_freeargs and provides detailed information about the command svc_freeargs, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the svc_freeargs.

NAME 🖥️ svc_freeargs 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

575 - Linux cli command Image_ExifTool_Lang_kopm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Lang_kopm and provides detailed information about the command Image_ExifTool_Lang_kopm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Lang_kopm.

NAME 🖥️ Image_ExifTool_Lang_kopm 🖥️

ExifTool Korean language translations

DESCRIPTION

This file is used by Image::ExifTool to generate localized tag descriptions and values.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

ACKNOWLEDGEMENTS

Thanks to Jens Duttke and Jeong Beom Kim for providing this translation.

SEE ALSO

Image::ExifTool (3pm), Image::ExifTool::TagInfoXML (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

576 - Linux cli command Image_ExifTool_CBORpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_CBORpm and provides detailed information about the command Image_ExifTool_CBORpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_CBORpm.

NAME 🖥️ Image_ExifTool_CBORpm 🖥️

Read CBOR format metadata

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool read Concise Binary Object Representation (CBOR) formatted metadata, used by the C2PA specification.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<https://c2pa.org/public-draft/>

<https://datatracker.ietf.org/doc/html/rfc7049>

<https://www.iana.org/assignments/cbor-tags/cbor-tags.xhtml>

SEE ALSO

“CBOR Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

577 - Linux cli command iswalpha

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command iswalpha and provides detailed information about the command iswalpha, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the iswalpha.

NAME 🖥️ iswalpha 🖥️

test for alphabetic wide character

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wctype.h>
int iswalpha(wint_t wc);

DESCRIPTION

The iswalpha() function is the wide-character equivalent of the isalpha(3) function. It tests whether wc is a wide character belonging to the wide-character class “alpha”.

The wide-character class “alpha” is a subclass of the wide-character class “alnum”, and therefore also a subclass of the wide-character class “graph” and of the wide-character class “print”.

Being a subclass of the wide-character class “print”, the wide-character class “alpha” is disjoint from the wide-character class “cntrl”.

Being a subclass of the wide-character class “graph”, the wide-character class “alpha” is disjoint from the wide-character class “space” and its subclass “blank”.

Being a subclass of the wide-character class “alnum”, the wide-character class “alpha” is disjoint from the wide-character class “punct”.

The wide-character class “alpha” is disjoint from the wide-character class “digit”.

The wide-character class “alpha” contains the wide-character classes “upper” and “lower”.

The wide-character class “alpha” always contains at least the letters ‘A’ to ‘Z’ and ‘a’ to ‘z’.

RETURN VALUE

The iswalpha() function returns nonzero if wc is a wide character belonging to the wide-character class “alpha”. Otherwise, it returns zero.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

iswalpha()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of iswalpha() depends on the LC_CTYPE category of the current locale.

SEE ALSO

isalpha(3), iswctype(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

578 - Linux cli command Spreadsheet_ParseExcel_FmtDefaultpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_ParseExcel_FmtDefaultpm and provides detailed information about the command Spreadsheet_ParseExcel_FmtDefaultpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_ParseExcel_FmtDefaultpm.

NAME 🖥️ Spreadsheet_ParseExcel_FmtDefaultpm 🖥️

A class for Cell formats.

SYNOPSIS

See the documentation for Spreadsheet::ParseExcel.

DESCRIPTION

This module is used in conjunction with Spreadsheet::ParseExcel. See the documentation for Spreadsheet::ParseExcel.

AUTHOR

Current maintainer 0.60+: Douglas Wilson [email protected]

Maintainer 0.40-0.59: John McNamara [email protected]

Maintainer 0.27-0.33: Gabor Szabo [email protected]

Original author: Kawai Takanori [email protected]

COPYRIGHT

Copyright (c) 2014 Douglas Wilson

Copyright (c) 2009-2013 John McNamara

Copyright (c) 2006-2008 Gabor Szabo

Copyright (c) 2000-2006 Kawai Takanori

All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

579 - Linux cli command vwprintf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command vwprintf and provides detailed information about the command vwprintf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the vwprintf.

NAME 🖥️ vwprintf 🖥️

formatted wide-character output conversion

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
#include <wchar.h>
int wprintf(const wchar_t *restrict format, ...);
int fwprintf(FILE *restrict stream,
 const wchar_t *restrict format, ...);
int swprintf(wchar_t wcs[restrict .maxlen], size_t maxlen,
 const wchar_t *restrict format, ...);
int vwprintf(const wchar_t *restrict format, va_list args);
int vfwprintf(FILE *restrict stream,
 const wchar_t *restrict format, va_list args);
int vswprintf(wchar_t wcs[restrict .maxlen], size_t maxlen,
 const wchar_t *restrict format, va_list args);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE
        || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The wprintf() family of functions is the wide-character equivalent of the printf(3) family of functions. It performs formatted output of wide characters.

The wprintf() and vwprintf() functions perform wide-character output to stdout. stdout must not be byte oriented; see fwide(3) for more information.

The fwprintf() and vfwprintf() functions perform wide-character output to stream. stream must not be byte oriented; see fwide(3) for more information.

The swprintf() and vswprintf() functions perform wide-character output to an array of wide characters. The programmer must ensure that there is room for at least maxlen wide characters at wcs.

These functions are like the printf(3), vprintf(3), fprintf(3), vfprintf(3), sprintf(3), vsprintf(3) functions except for the following differences:

·
The format string is a wide-character string.

·
The output consists of wide characters, not bytes.

·
swprintf() and vswprintf() take a maxlen argument, sprintf(3) and vsprintf(3) do not. (snprintf(3) and vsnprintf(3) take a maxlen argument, but these functions do not return -1 upon buffer overflow on Linux.)

The treatment of the conversion characters c and s is different:

c
If no l modifier is present, the int argument is converted to a wide character by a call to the btowc(3) function, and the resulting wide character is written. If an l modifier is present, the wint_t (wide character) argument is written.

s
If no l modifier is present: the const char * argument is expected to be a pointer to an array of character type (pointer to a string) containing a multibyte character sequence beginning in the initial shift state. Characters from the array are converted to wide characters (each by a call to the mbrtowc(3) function with a conversion state starting in the initial state before the first byte). The resulting wide characters are written up to (but not including) the terminating null wide character (L’�’). If a precision is specified, no more wide characters than the number specified are written. Note that the precision determines the number of wide characters written, not the number of bytes or screen positions. The array must contain a terminating null byte (‘�’), unless a precision is given and it is so small that the number of converted wide characters reaches it before the end of the array is reached. If an l modifier is present: the const wchar_t * argument is expected to be a pointer to an array of wide characters. Wide characters from the array are written up to (but not including) a terminating null wide character. If a precision is specified, no more than the number specified are written. The array must contain a terminating null wide character, unless a precision is given and it is smaller than or equal to the number of wide characters in the array.

RETURN VALUE

The functions return the number of wide characters written, excluding the terminating null wide character in case of the functions swprintf() and vswprintf(). They return -1 when an error occurs.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wprintf(), fwprintf(), swprintf(), vwprintf(), vfwprintf(), vswprintf()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of wprintf() et al. depends on the LC_CTYPE category of the current locale.

If the format string contains non-ASCII wide characters, the program will work correctly only if the LC_CTYPE category of the current locale at run time is the same as the LC_CTYPE category of the current locale at compile time. This is because the wchar_t representation is platform- and locale-dependent. (The glibc represents wide characters using their Unicode (ISO/IEC 10646) code point, but other platforms don’t do this. Also, the use of C99 universal character names of the form \unnnn does not solve this problem.) Therefore, in internationalized programs, the format string should consist of ASCII wide characters only, or should be constructed at run time in an internationalized way (e.g., using gettext(3) or iconv(3), followed by mbstowcs(3)).

SEE ALSO

fprintf(3), fputwc(3), fwide(3), printf(3), snprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

580 - Linux cli command __fpending

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __fpending and provides detailed information about the command __fpending, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __fpending.

NAME 🖥️ __fpending 🖥️

interfaces to stdio FILE structure

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
#include <stdio_ext.h>
size_t __fbufsize(FILE *stream);
size_t __fpending(FILE *stream);
int __flbf(FILE *stream);
int __freadable(FILE *stream);
int __fwritable(FILE *stream);
int __freading(FILE *stream);
int __fwriting(FILE *stream);
int __fsetlocking(FILE *stream, int type);
void _flushlbf(void);
void __fpurge(FILE *stream);

DESCRIPTION

Solaris introduced routines to allow portable access to the internals of the FILE structure, and glibc also implemented these.

The __fbufsize() function returns the size of the buffer currently used by the given stream.

The __fpending() function returns the number of bytes in the output buffer. For wide-oriented streams the unit is wide characters. This function is undefined on buffers in reading mode, or opened read-only.

The __flbf() function returns a nonzero value if the stream is line-buffered, and zero otherwise.

The __freadable() function returns a nonzero value if the stream allows reading, and zero otherwise.

The __fwritable() function returns a nonzero value if the stream allows writing, and zero otherwise.

The __freading() function returns a nonzero value if the stream is read-only, or if the last operation on the stream was a read operation, and zero otherwise.

The __fwriting() function returns a nonzero value if the stream is write-only (or append-only), or if the last operation on the stream was a write operation, and zero otherwise.

The __fsetlocking() function can be used to select the desired type of locking on the stream. It returns the current type. The type argument can take the following three values:

FSETLOCKING_INTERNAL
Perform implicit locking around every operation on the given stream (except for the *_unlocked ones). This is the default.

FSETLOCKING_BYCALLER
The caller will take care of the locking (possibly using flockfile(3) in case there is more than one thread), and the stdio routines will not do locking until the state is reset to FSETLOCKING_INTERNAL.

FSETLOCKING_QUERY
Don’t change the type of locking. (Only return it.)

The _flushlbf() function flushes all line-buffered streams. (Presumably so that output to a terminal is forced out, say before reading keyboard input.)

The __fpurge() function discards the contents of the stream’s buffer.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

__fbufsize(), __fpending(), __fpurge(), __fsetlocking()

Thread safetyMT-Safe race:stream

__flbf(), __freadable(), __freading(), __fwritable(), __fwriting(), _flushlbf()

Thread safetyMT-Safe

SEE ALSO

flockfile(3), fpurge(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

581 - Linux cli command strfromd

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strfromd and provides detailed information about the command strfromd, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strfromd.

NAME 🖥️ strfromd 🖥️

convert a floating-point value into a string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int strfromd(char str[restrict .n], size_t n,
 const char *restrict format, double fp);
int strfromf(char str[restrict .n], size_t n,
 const char *restrict format, float fp);
int strfroml(char str[restrict .n], size_t n,
 const char *restrict format, long double fp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strfromd(), strfromf(), strfroml():

    __STDC_WANT_IEC_60559_BFP_EXT__

DESCRIPTION

These functions convert a floating-point value, fp, into a string of characters, str, with a configurable format string. At most n characters are stored into str.

The terminating null byte (‘�’) is written if and only if n is sufficiently large, otherwise the written string is truncated at n characters.

The strfromd(), strfromf(), and strfroml() functions are equivalent to

snprintf(str, n, format, fp);

except for the format string.

Format of the format string

The format string must start with the character ‘%’. This is followed by an optional precision which starts with the period character (.), followed by an optional decimal integer. If no integer is specified after the period character, a precision of zero is used. Finally, the format string should have one of the conversion specifiers a, A, e, E, f, F, g, or G.

The conversion specifier is applied based on the floating-point type indicated by the function suffix. Therefore, unlike snprintf(), the format string does not have a length modifier character. See snprintf(3) for a detailed description of these conversion specifiers.

The implementation conforms to the C99 standard on conversion of NaN and infinity values:

If fp is a NaN, +NaN, or -NaN, and f (or a, e, g) is the conversion specifier, the conversion is to “nan”, “nan”, or “-nan”, respectively. If F (or A, E, G) is the conversion specifier, the conversion is to “NAN” or “-NAN”.

Likewise if fp is infinity, it is converted to [-]inf or [-]INF.

A malformed format string results in undefined behavior.

RETURN VALUE

The strfromd(), strfromf(), and strfroml() functions return the number of characters that would have been written in str if n had enough space, not counting the terminating null byte. Thus, a return value of n or greater means that the output was truncated.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7) and the POSIX Safety Concepts section in GNU C Library manual.

InterfaceAttributeValue

strfromd(), strfromf(), strfroml()

Thread safetyMT-Safe locale
Async-signal safetyAS-Unsafe heap
Async-cancel safetyAC-Unsafe mem

Note: these attributes are preliminary.

STANDARDS

ISO/IEC TS 18661-1.

VERSIONS

strfromd()
strfromf()
strfroml()
glibc 2.25.

NOTES

These functions take account of the LC_NUMERIC category of the current locale.

EXAMPLES

To convert the value 12.1 as a float type to a string using decimal notation, resulting in “12.100000”:

#define __STDC_WANT_IEC_60559_BFP_EXT__
#include <stdlib.h>
int ssize = 10;
char s[ssize];
strfromf(s, ssize, "%f", 12.1);

To convert the value 12.3456 as a float type to a string using decimal notation with two digits of precision, resulting in “12.35”:

#define __STDC_WANT_IEC_60559_BFP_EXT__
#include <stdlib.h>
int ssize = 10;
char s[ssize];
strfromf(s, ssize, "%.2f", 12.3456);

To convert the value 12.345e19 as a double type to a string using scientific notation with zero digits of precision, resulting in “1E+20”:

#define __STDC_WANT_IEC_60559_BFP_EXT__
#include <stdlib.h>
int ssize = 10;
char s[ssize];
strfromd(s, ssize, "%.E", 12.345e19);

SEE ALSO

atof(3), snprintf(3), strtod(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

582 - Linux cli command Tk_Fontpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Fontpm and provides detailed information about the command Tk_Fontpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Fontpm.

NAME 🖥️ Tk_Fontpm 🖥️

Create and inspect fonts.

SYNOPSIS

$widget->Font(option?, arg, arg, …?)

$font->Option?(arg, arg, …)?

DESCRIPTION

The Font method provides several facilities for dealing with fonts, such as defining named fonts and inspecting the actual attributes of a font. The command has several different forms, determined by the first argument. The following forms are currently supported:

$font->actual(-option?)

$widget->fontActual(font?, -option?)

Returns information about the actual attributes that are obtained when font is used on $font’s display; the actual attributes obtained may differ from the attributes requested due to platform-dependant limitations, such as the availability of font families and pointsizes. font is a font description; see “FONT DESCRIPTION” below. If option is specified, returns the value of that attribute; if it is omitted, the return value is a list of all the attributes and their values. See “FONT OPTIONS” below for a list of the possible attributes.

$font->configure(-option??=>value, -option=>value, …?)
Query or modify the desired attributes for $font. If no -option is specified, returns a list describing all the options and their values for fontname. If a single -option is specified with no value, then returns the current value of that attribute. If one or more option-value pairs are specified, then the method modifies the given named font to have the given values; in this case, all widgets using that font will redisplay themselves using the new attributes for the font. See “FONT OPTIONS” below for a list of the possible attributes. Note: the above behaviour differs in detail to configure on widgets, images etc.

$font = $widget->Font(-option=>value, …>?)

$font = $widget->fontCreate(?fontname??, -option=>value, …>?)

Creates a new font object and returns a reference to it. fontname specifies the name for the font; if it is omitted, then Tk generates a new name of the form fontx, where x is an integer. There may be any number of option-value pairs, which provide the desired attributes for the new named font. See “FONT OPTIONS” below for a list of the possible attributes. Note: the created font is not shared between widgets of different MainWindows.

$font->delete

$widget->fontDelete(fontname?, fontname, …?)

Delete the specified named fonts. If there are widgets using the named font, the named font won’t actually be deleted until all the instances are released. Those widgets will continue to display using the last known values for the named font. If a deleted named font is subsequently recreated with another call to fontCreate, the widgets will use the new named font and redisplay themselves using the new attributes of that font.

$widget->fontFamilies
The return value is a list of the case-insensitive names of all font families that exist on $widget’s display.

$font->measure(text)

$widget->fontMeasure(font, text)

Measures the amount of space the string text would use in the given font when displayed in $widget. font is a font description; see “FONT DESCRIPTION” below. The return value is the total width in pixels of text, not including the extra pixels used by highly exagerrated characters such as cursive ``f’’. If the string contains newlines or tabs, those characters are not expanded or treated specially when measuring the string.

$font->metrics(-option?)

$widget->fontMetrics(font?, -option?)

Returns information about the metrics (the font-specific data), for font when it is used on $widget’s display. font is a font description; see “FONT DESCRIPTION” below. If option is specified, returns the value of that metric; if it is omitted, the return value is a list of all the metrics and their values. See “FONT METRICS” below for a list of the possible metrics.

$widget->fontNames
The return value is a list of all font objects that are currently defined for $widget’s MainWindow.

FONT DESCRIPTION

The following formats are accepted as a font description anywhere font is specified as an argument above; these same forms are also permitted when specifying the -font option for widgets.

[1] fontname
The name of a named font, created using the fontCreate method. When a widget uses a named font, it is guaranteed that this will never cause an error, as long as the named font exists, no matter what potentially invalid or meaningless set of attributes the named font has. If the named font cannot be displayed with exactly the specified attributes, some other close font will be substituted automatically.

[1a] $font
A font object created using the Font method. This is essentially the same as using a named font. The object is a reference to the name, and carries additional information e.g. which MainWindow it relates to in an manner peculiar to perl/Tk.

[2] systemfont
The platform-specific name of a font, interpreted by the graphics server. This also includes, under X, an XLFD (see [4]) for which a single ``*’’ character was used to elide more than one field in the middle of the name. See “PLATFORM-SPECIFIC ISSUES” for a list of the system fonts.

[3] [family,?size,??style,??style …?]
A properly formed list whose first element is the desired font family and whose optional second element is the desired size. The interpretation of the size attribute follows the same rules described for -size in “FONT OPTIONS” below. Any additional optional arguments following the size are font styles. Possible values for the style arguments are as follows: normal bold roman italic underline overstrike

[4] X-font names (XLFD)
A Unix-centric font name of the form -foundry-family-weight-slant-setwidth-addstyle-pixel-point-resx-resy-spacing-width-charset-encoding. The ``*’’ character may be used to skip individual fields that the user does not care about. There must be exactly one ``*’’ for each field skipped, except that a ``*’’ at the end of the XLFD skips any remaining fields; the shortest valid XLFD is simply ``*’’, signifying all fields as defaults. Any fields that were skipped are given default values. For compatibility, an XLFD always chooses a font of the specified pixel size (not point size); although this interpretation is not strictly correct, all existing applications using XLFDs assumed that one ``point’’ was in fact one pixel and would display incorrectly (generally larger) if the correct size font were actually used.

[5] option value ?option value …?
A properly formed list of option-value pairs that specify the desired attributes of the font, in the same format used when defining a named font; see “FONT OPTIONS” below.

When font description font is used, the system attempts to parse the description according to each of the above five rules, in the order specified. Cases [1] and [2] must match the name of an existing named font or of a system font. Cases [3], [4], and [5] are accepted on all platforms and the closest available font will be used. In some situations it may not be possible to find any close font (e.g., the font family was a garbage value); in that case, some system-dependant default font is chosen. If the font description does not match any of the above patterns, an error is generated.

FONT METRICS

The following options are used by the metrics/fontMetrics method to query font-specific data determined when the font was created. These properties are for the whole font itself and not for individual characters drawn in that font. In the following definitions, the ``baseline’’ of a font is the horizontal line where the bottom of most letters line up; certain letters, such as lower-case ``g’’ stick below the baseline.

-ascent
The amount in pixels that the tallest letter sticks up above the baseline of the font, plus any extra blank space added by the designer of the font. ($font->ascent is provided for compatibility.)

-descent
The largest amount in pixels that any letter sticks down below the baseline of the font, plus any extra blank space added by the designer of the font. ($font->descent is provided for compatibility.)

-linespace
Returns how far apart vertically in pixels two lines of text using the same font should be placed so that none of the characters in one line overlap any of the characters in the other line. This is generally the sum of the ascent above the baseline line plus the descent below the baseline.

-fixed
Returns a boolean flag that is ``1’’ if this is a fixed-width font, where each normal character is the the same width as all the other characters, or is ``0’’ if this is a proportionally-spaced font, where individual characters have different widths. The widths of control characters, tab characters, and other non-printing characters are not included when calculating this value.

FONT OPTIONS

The following options are supported on all platforms, and are used when constructing a named font or when specifying a font using style [5] as above:

-family => name
The case-insensitive font family name. Tk guarantees to support the font families named Courier (a monospaced ``typewriter’’ font), Times (a serifed ``newspaper’’ font), and Helvetica (a sans-serif ``European’’ font). The most closely matching native font family will automatically be substituted when one of the above font families is used. The name may also be the name of a native, platform-specific font family; in that case it will work as desired on one platform but may not display correctly on other platforms. If the family is unspecified or unrecognized, a platform-specific default font will be chosen.

-size => size
The desired size of the font. If the size argument is a positive number, it is interpreted as a size in points. If size is a negative number, its absolute value is interpreted as a size in pixels. If a font cannot be displayed at the specified size, a nearby size will be chosen. If size is unspecified or zero, a platform-dependent default size will be chosen. The original Tcl/Tk authors believe sizes should normally be specified in points so the application will remain the same ruler size on the screen, even when changing screen resolutions or moving scripts across platforms. While this is an admirable goal it does not work as well in practice as they hoped. The mapping between points and pixels is set when the application starts, based on alleged properties of the installed monitor, but it can be overridden by calling the scaling command. However this can be problematic when system has no way of telling if (say) an 11" or 22" monitor is attached, also if it can tell then some monitor sizes may result in poorer quality scaled fonts being used rather than a “tuned” bitmap font. In addition specifying pixels is useful in certain circumstances such as when a piece of text must line up with respect to a fixed-size bitmap. At present the Tcl/Tk scheme is used unchanged, with “point” size being returned by actual (as an integer), and used internally. Suggestions for work-rounds to undesirable behaviour welcome.

-weight => weight
The nominal thickness of the characters in the font. The value normal specifies a normal weight font, while bold specifies a bold font. The closest available weight to the one specified will be chosen. The default weight is normal.

-slant => slant
The amount the characters in the font are slanted away from the vertical. Valid values for slant are roman and italic. A roman font is the normal, upright appearance of a font, while an italic font is one that is tilted some number of degrees from upright. The closest available slant to the one specified will be chosen. The default slant is roman.

-underline => boolean
The value is a boolean flag that specifies whether characters in this font should be underlined. The default value for underline is false.

-overstrike => boolean
The value is a boolean flag that specifies whether a horizontal line should be drawn through the middle of characters in this font. The default value for overstrike is false.

PLATFORM-SPECIFIC ISSUES

The following named system fonts are supported:

X Windows:
All valid X font names, including those listed by xlsfonts (1), are available.

MS Windows:
system ansi device systemfixed ansifixed oemfixed

Macintosh:
system application

COMPATIBILITY WITH PREVIOUS VERSIONS

In prior versions of perl/Tk the $widget->Font method was a perl wrapper on the original “[4] X-font names (XLFD)” style as described above (which was the only form supported by versions of core tk prior to version tk8.0). This module is provided in its original form (it has just been renamed) via:

use Tk::X11Font; I<$widget>-E<gt>B<X11Font>(…)

However the methods of the old scheme have been mimiced as closely as possible with the new scheme. It is intended that code should work without modification, except for the case of using :

@names = $font->Name;

i.e. the Name method in an array/list context. This now returns one element on all platforms (as it did on Win32), while previously on X systems it returned a list of fonts that matched an under-specified pattern.

Briefly the methods supported for compatibility are as follows:

$newfont = $font->Clone(-option=>value, …>?)
Returns a new font object $newfont related to the original $font by changing the values of the specified -options.

$font->Family - maps to -family

$font->Weight - maps to -weight

$font->Slant - maps to -slant

$font->Pixel and Point - map to -size

New code should use $font->configure to achieve same effect as last four items above.

Foundry, Swidth, Adstyle, Xres, Yres, Space, Avgwidth, Registry, Encoding
Are all ignored if set, and return ‘*’ if queried.

$font->Name
Returns the name of a named font, or a string representation of an unnamed font. Using $font in a scalar context does the same. Note this is distinctly different from behaviour of X11Font’s Name in a list context.

$font->Pattern
Returns a XLFD string for the font based on actual values, and some heuristics to map Tk’s forms to the “standard” X conventions.

SEE ALSO

Tk::options

Tk::X11Font

KEYWORDS

font

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

583 - Linux cli command xdr_callhdr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_callhdr and provides detailed information about the command xdr_callhdr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_callhdr.

NAME 🖥️ xdr_callhdr 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

584 - Linux cli command hcreate_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command hcreate_r and provides detailed information about the command hcreate_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the hcreate_r.

NAME 🖥️ hcreate_r 🖥️

hash table management

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <search.h>
int hcreate(size_t nel);
void hdestroy(void);
ENTRY *hsearch(ENTRY item, ACTION action);
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <search.h>
int hcreate_r(size_t nel, struct hsearch_data *htab);
void hdestroy_r(struct hsearch_data *htab);
int hsearch_r(ENTRY item, ACTION action, ENTRY **retval,
 struct hsearch_data *htab);

DESCRIPTION

The three functions hcreate(), hsearch(), and hdestroy() allow the caller to create and manage a hash search table containing entries consisting of a key (a string) and associated data. Using these functions, only one hash table can be used at a time.

The three functions hcreate_r(), hsearch_r(), hdestroy_r() are reentrant versions that allow a program to use more than one hash search table at the same time. The last argument, htab, points to a structure that describes the table on which the function is to operate. The programmer should treat this structure as opaque (i.e., do not attempt to directly access or modify the fields in this structure).

First a hash table must be created using hcreate(). The argument nel specifies the maximum number of entries in the table. (This maximum cannot be changed later, so choose it wisely.) The implementation may adjust this value upward to improve the performance of the resulting hash table.

The hcreate_r() function performs the same task as hcreate(), but for the table described by the structure *htab. The structure pointed to by htab must be zeroed before the first call to hcreate_r().

The function hdestroy() frees the memory occupied by the hash table that was created by hcreate(). After calling hdestroy(), a new hash table can be created using hcreate(). The hdestroy_r() function performs the analogous task for a hash table described by *htab, which was previously created using hcreate_r().

The hsearch() function searches the hash table for an item with the same key as item (where “the same” is determined using strcmp(3)), and if successful returns a pointer to it.

The argument item is of type ENTRY, which is defined in <search.h> as follows:

typedef struct entry {
    char *key;
    void *data;
} ENTRY;

The field key points to a null-terminated string which is the search key. The field data points to data that is associated with that key.

The argument action determines what hsearch() does after an unsuccessful search. This argument must either have the value ENTER, meaning insert a copy of item (and return a pointer to the new hash table entry as the function result), or the value FIND, meaning that NULL should be returned. (If action is FIND, then data is ignored.)

The hsearch_r() function is like hsearch() but operates on the hash table described by *htab. The hsearch_r() function differs from hsearch() in that a pointer to the found item is returned in *retval, rather than as the function result.

RETURN VALUE

hcreate() and hcreate_r() return nonzero on success. They return 0 on error, with errno set to indicate the error.

On success, hsearch() returns a pointer to an entry in the hash table. hsearch() returns NULL on error, that is, if action is ENTER and the hash table is full, or action is FIND and item cannot be found in the hash table. hsearch_r() returns nonzero on success, and 0 on error. In the event of an error, these two functions set errno to indicate the error.

ERRORS

hcreate_r() and hdestroy_r() can fail for the following reasons:

EINVAL
htab is NULL.

hsearch() and hsearch_r() can fail for the following reasons:

ENOMEM
action was ENTER, key was not found in the table, and there was no room in the table to add a new entry.

ESRCH
action was FIND, and key was not found in the table.

POSIX.1 specifies only the ENOMEM error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

hcreate(), hsearch(), hdestroy()

Thread safetyMT-Unsafe race:hsearch

hcreate_r(), hsearch_r(), hdestroy_r()

Thread safetyMT-Safe race:htab

STANDARDS

hcreate()
hsearch()
hdestroy()
POSIX.1-2008.

hcreate_r()
hsearch_r()
hdestroy_r()
GNU.

HISTORY

hcreate()
hsearch()
hdestroy()
SVr4, POSIX.1-2001.

hcreate_r()
hsearch_r()
hdestroy_r()
GNU.

NOTES

Hash table implementations are usually more efficient when the table contains enough free space to minimize collisions. Typically, this means that nel should be at least 25% larger than the maximum number of elements that the caller expects to store in the table.

The hdestroy() and hdestroy_r() functions do not free the buffers pointed to by the key and data elements of the hash table entries. (It can’t do this because it doesn’t know whether these buffers were allocated dynamically.) If these buffers need to be freed (perhaps because the program is repeatedly creating and destroying hash tables, rather than creating a single table whose lifetime matches that of the program), then the program must maintain bookkeeping data structures that allow it to free them.

BUGS

SVr4 and POSIX.1-2001 specify that action is significant only for unsuccessful searches, so that an ENTER should not do anything for a successful search. In libc and glibc (before glibc 2.3), the implementation violates the specification, updating the data for the given key in this case.

Individual hash table entries can be added, but not deleted.

EXAMPLES

The following program inserts 24 items into a hash table, then prints some of them.

#include <search.h>
#include <stdio.h>
#include <stdlib.h>
static char *data[] = { "alpha", "bravo", "charlie", "delta",
     "echo", "foxtrot", "golf", "hotel", "india", "juliet",
     "kilo", "lima", "mike", "november", "oscar", "papa",
     "quebec", "romeo", "sierra", "tango", "uniform",
     "victor", "whisky", "x-ray", "yankee", "zulu"
};
int
main(void)
{
    ENTRY e;
    ENTRY *ep;
    hcreate(30);
    for (size_t i = 0; i < 24; i++) {
        e.key = data[i];
        /* data is just an integer, instead of a
           pointer to something */
        e.data = (void *) i;
        ep = hsearch(e, ENTER);
        /* there should be no failures */
        if (ep == NULL) {
            fprintf(stderr, "entry failed

“); exit(EXIT_FAILURE); } } for (size_t i = 22; i < 26; i++) { /* print two entries from the table, and show that two are not in the table */ e.key = data[i]; ep = hsearch(e, FIND); printf("%9.9s -> %9.9s:%d “, e.key, ep ? ep->key : “NULL”, ep ? (int)(ep->data) : 0); } hdestroy(); exit(EXIT_SUCCESS); }

SEE ALSO

bsearch(3), lsearch(3), malloc(3), tsearch(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

585 - Linux cli command XtAddCallback

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAddCallback and provides detailed information about the command XtAddCallback, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAddCallback.

NAME 🖥️ XtAddCallback 🖥️

add and remove callback procedures

SYNTAX

#include <X11/Intrinsic.h>

void XtAddCallback(Widget w, const char *callback_name, XtCallbackProc callback, XtPointer client_data);

void XtAddCallbacks(Widget w, const char *callback_name, XtCallbackList callbacks);

void XtRemoveCallback(Widget w, const char *callback_name, XtCallbackProc callback, XtPointer client_data);

void XtRemoveCallbacks(Widget w, const char *callback_name, XtCallbackList callbacks);

void XtRemoveAllCallbacks(Widget w, const char *callback_name);

ARGUMENTS

callback
Specifies the callback procedure.

callbacks
Specifies the null-terminated list of callback procedures and corresponding client data.

callback_name
Specifies the callback list to which the procedure is to be appended or deleted.

client_data
Specifies the argument that is to be passed to the specified procedure when it is invoked by XtCallbacks or NULL, or the client data to match on the registered callback procedures.

  1. Specifies the widget.

DESCRIPTION

The XtAddCallback function adds the specified callback procedure to the specified widget’s callback list.

The XtAddCallbacks add the specified list of callbacks to the specified widget’s callback list.

The XtRemoveCallback function removes a callback only if both the procedure and the client data match.

The XtRemoveCallbacks function removes the specified callback procedures from the specified widget’s callback list.

The XtRemoveAllCallbacks function removes all the callback procedures from the specified widget’s callback list.

SEE ALSO

XtCallCallbacks(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

586 - Linux cli command getnetgrent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getnetgrent and provides detailed information about the command getnetgrent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getnetgrent.

NAME 🖥️ getnetgrent 🖥️

handle network group entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
int setnetgrent(const char *netgroup);
void endnetgrent(void);
int getnetgrent(char **restrict host,
 char **restrict user, char **restrict domain);
int getnetgrent_r(char **restrict host,
 char **restrict user, char **restrict domain,
 char buf[restrict .buflen], size_t buflen);
int innetgr(const char *netgroup, const char *host,
 const char *user, const char *domain);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

setnetgrent(), endnetgrent(), getnetgrent(), getnetgrent_r(), innetgr():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The netgroup is a SunOS invention. A netgroup database is a list of string triples (hostname, username, domainname) or other netgroup names. Any of the elements in a triple can be empty, which means that anything matches. The functions described here allow access to the netgroup databases. The file /etc/nsswitch.conf defines what database is searched.

The setnetgrent() call defines the netgroup that will be searched by subsequent getnetgrent() calls. The getnetgrent() function retrieves the next netgroup entry, and returns pointers in host, user, domain. A null pointer means that the corresponding entry matches any string. The pointers are valid only as long as there is no call to other netgroup-related functions. To avoid this problem you can use the GNU function getnetgrent_r() that stores the strings in the supplied buffer. To free all allocated buffers use endnetgrent().

In most cases you want to check only if the triplet (hostname, username, domainname) is a member of a netgroup. The function innetgr() can be used for this without calling the above three functions. Again, a null pointer is a wildcard and matches any string. The function is thread-safe.

RETURN VALUE

These functions return 1 on success and 0 for failure.

FILES

/etc/netgroup
/etc/nsswitch.conf

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setnetgrent(), getnetgrent_r(), innetgr()

Thread safety

MT-Unsafe race:netgrent locale

endnetgrent()

Thread safety

MT-Unsafe race:netgrent

getnetgrent()

Thread safety

MT-Unsafe race:netgrent race:netgrentbuf locale

In the above table, netgrent in race:netgrent signifies that if any of the functions setnetgrent(), getnetgrent_r(), innetgr(), getnetgrent(), or endnetgrent() are used in parallel in different threads of a program, then data races could occur.

VERSIONS

In the BSD implementation, setnetgrent() returns void.

STANDARDS

None.

HISTORY

setnetgrent(), endnetgrent(), getnetgrent(), and innetgr() are available on most UNIX systems. getnetgrent_r() is not widely available on other systems.

SEE ALSO

sethostent(3), setprotoent(3), setservent(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

587 - Linux cli command Image_ExifTool_AESpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_AESpm and provides detailed information about the command Image_ExifTool_AESpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_AESpm.

NAME 🖥️ Image_ExifTool_AESpm 🖥️

AES encryption with cipher-block chaining

SYNOPSIS

use Image::ExifTool::AES qw(Crypt); $err = Crypt(\plaintext, $key, 1); # encryption $err = Crypt(\ciphertext, $key); # decryption

DESCRIPTION

This module contains an implementation of the AES encryption/decryption algorithms with cipher-block chaining (CBC) and RFC 2898 PKCS #5 padding. This is the AESV2 and AESV3 encryption mode used in PDF documents.

EXPORTS

Exports nothing by default, but “Crypt” may be exported.

METHODS

Crypt

Implement AES encryption/decryption with cipher-block chaining.

Inputs:
0) Scalar reference for data to encrypt/decrypt. 1) Encryption key string (must have length 16, 24 or 32). 2) [optional] Encrypt flag (false to decrypt). 3) [optional] Flag to avoid removing padding after decrypting, or to avoid adding 16 bytes of padding before encrypting when data length is already a multiple of 16 bytes.

Returns:
On success, the return value is undefined and the data is encrypted or decrypted as specified. Otherwise returns an error string and the data is left in an indeterminate state.

Notes:
The length of the encryption key dictates the AES mode, with lengths of 16, 24 and 32 bytes resulting in AES-128, AES-192 and AES-256. When encrypting, the input data may be any length and will be padded to an even 16-byte block size using the specified padding technique. If the encrypt flag has length 16, it is used as the initialization vector for the cipher-block chaining, otherwise a random IV is generated. Upon successful return the data will be encrypted, with the first 16 bytes of the data being the CBC IV. When decrypting, the input data begins with the 16-byte CBC initialization vector.

BUGS

This code is blindingly slow. But in truth, slowing down processing is the main purpose of encryption, so this really can’t be considered a bug.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.hoozi.com/Articles/AESEncryption.htm>

<http://www.csrc.nist.gov/publications/fips/fips197/fips-197.pdf>

<http://www.faqs.org/rfcs/rfc3602.html>

SEE ALSO

Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

588 - Linux cli command ntp_gettimex

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ntp_gettimex and provides detailed information about the command ntp_gettimex, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ntp_gettimex.

NAME 🖥️ ntp_gettimex 🖥️

get time parameters (NTP daemon interface)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/timex.h>
int ntp_gettime(struct ntptimeval *ntv);
int ntp_gettimex(struct ntptimeval *ntv);

DESCRIPTION

Both of these APIs return information to the caller via the ntv argument, a structure of the following type:

struct ntptimeval {
    struct timeval time;    /* Current time */
    long maxerror;          /* Maximum error */
    long esterror;          /* Estimated error */
    long tai;               /* TAI offset */
    /* Further padding bytes allowing for future expansion */
};

The fields of this structure are as follows:

time
The current time, expressed as a timeval structure:

struct timeval {
    time_t      tv_sec;   /* Seconds since the Epoch */
    suseconds_t tv_usec;  /* Microseconds */
};

maxerror
Maximum error, in microseconds. This value can be initialized by ntp_adjtime(3), and is increased periodically (on Linux: each second), but is clamped to an upper limit (the kernel constant NTP_PHASE_MAX, with a value of 16,000).

esterror
Estimated error, in microseconds. This value can be set via ntp_adjtime(3) to contain an estimate of the difference between the system clock and the true time. This value is not used inside the kernel.

tai
TAI (Atomic International Time) offset.

ntp_gettime() returns an ntptimeval structure in which the time, maxerror, and esterror fields are filled in.

ntp_gettimex() performs the same task as ntp_gettime(), but also returns information in the tai field.

RETURN VALUE

The return values for ntp_gettime() and ntp_gettimex() are as for adjtimex(2). Given a correct pointer argument, these functions always succeed.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

ntp_gettime(), ntp_gettimex()

Thread safetyMT-Safe

STANDARDS

ntp_gettime()
NTP Kernel Application Program Interface.

ntp_gettimex()
GNU.

HISTORY

ntp_gettime()
glibc 2.1.

ntp_gettimex()
glibc 2.12.

SEE ALSO

adjtimex(2), ntp_adjtime(3), time(7)

NTP “Kernel Application Program Interface”

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

589 - Linux cli command flockfile

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command flockfile and provides detailed information about the command flockfile, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the flockfile.

NAME 🖥️ flockfile 🖥️

lock FILE for stdio

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
void flockfile(FILE *filehandle);
int ftrylockfile(FILE *filehandle);
void funlockfile(FILE *filehandle);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    /* Since glibc 2.24: */ _POSIX_C_SOURCE >= 199309L
        || /* glibc <= 2.23: */ _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The stdio functions are thread-safe. This is achieved by assigning to each FILE object a lockcount and (if the lockcount is nonzero) an owning thread. For each library call, these functions wait until the FILE object is no longer locked by a different thread, then lock it, do the requested I/O, and unlock the object again.

(Note: this locking has nothing to do with the file locking done by functions like flock(2) and lockf(3).)

All this is invisible to the C-programmer, but there may be two reasons to wish for more detailed control. On the one hand, maybe a series of I/O actions by one thread belongs together, and should not be interrupted by the I/O of some other thread. On the other hand, maybe the locking overhead should be avoided for greater efficiency.

To this end, a thread can explicitly lock the FILE object, then do its series of I/O actions, then unlock. This prevents other threads from coming in between. If the reason for doing this was to achieve greater efficiency, one does the I/O with the nonlocking versions of the stdio functions: with getc_unlocked(3) and putc_unlocked(3) instead of getc(3) and putc(3).

The flockfile() function waits for *filehandle to be no longer locked by a different thread, then makes the current thread owner of *filehandle, and increments the lockcount.

The funlockfile() function decrements the lock count.

The ftrylockfile() function is a nonblocking version of flockfile(). It does nothing in case some other thread owns *filehandle, and it obtains ownership and increments the lockcount otherwise.

RETURN VALUE

The ftrylockfile() function returns zero for success (the lock was obtained), and nonzero for failure.

ERRORS

None.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

flockfile(), ftrylockfile(), funlockfile()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

These functions are available when _POSIX_THREAD_SAFE_FUNCTIONS is defined.

SEE ALSO

unlocked_stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

590 - Linux cli command Image_ExifTool_Lang_svpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Lang_svpm and provides detailed information about the command Image_ExifTool_Lang_svpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Lang_svpm.

NAME 🖥️ Image_ExifTool_Lang_svpm 🖥️

ExifTool Swedish language translations

DESCRIPTION

This file is used by Image::ExifTool to generate localized tag descriptions and values.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

ACKNOWLEDGEMENTS

Thanks to Jens Duttke and Björn Söderström for providing this translation.

SEE ALSO

Image::ExifTool (3pm), Image::ExifTool::TagInfoXML (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

591 - Linux cli command getutxline

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getutxline and provides detailed information about the command getutxline, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getutxline.

NAME 🖥️ getutxline 🖥️

access utmp file entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <utmp.h>
struct utmp *getutent(void);
struct utmp *getutid(const struct utmp *ut);
struct utmp *getutline(const struct utmp *ut);
struct utmp *pututline(const struct utmp *ut);
void setutent(void);
void endutent(void);
int utmpname(const char *file);

DESCRIPTION

New applications should use the POSIX.1-specified “utmpx” versions of these functions; see STANDARDS.

utmpname() sets the name of the utmp-format file for the other utmp functions to access. If utmpname() is not used to set the filename before the other functions are used, they assume _PATH_UTMP, as defined in <paths.h>.

setutent() rewinds the file pointer to the beginning of the utmp file. It is generally a good idea to call it before any of the other functions.

endutent() closes the utmp file. It should be called when the user code is done accessing the file with the other functions.

getutent() reads a line from the current file position in the utmp file. It returns a pointer to a structure containing the fields of the line. The definition of this structure is shown in utmp(5).

getutid() searches forward from the current file position in the utmp file based upon ut. If ut->ut_type is one of RUN_LVL, BOOT_TIME, NEW_TIME, or OLD_TIME, getutid() will find the first entry whose ut_type field matches ut->ut_type. If ut->ut_type is one of INIT_PROCESS, LOGIN_PROCESS, USER_PROCESS, or DEAD_PROCESS, getutid() will find the first entry whose ut_id field matches ut->ut_id.

getutline() searches forward from the current file position in the utmp file. It scans entries whose ut_type is USER_PROCESS or LOGIN_PROCESS and returns the first one whose ut_line field matches ut->ut_line.

pututline() writes the utmp structure ut into the utmp file. It uses getutid() to search for the proper place in the file to insert the new entry. If it cannot find an appropriate slot for ut, pututline() will append the new entry to the end of the file.

RETURN VALUE

getutent(), getutid(), and getutline() return a pointer to a struct utmp on success, and NULL on failure (which includes the “record not found” case). This struct utmp is allocated in static storage, and may be overwritten by subsequent calls.

On success pututline() returns ut; on failure, it returns NULL.

utmpname() returns 0 if the new name was successfully stored, or -1 on failure.

On failure, these functions errno set to indicate the error.

ERRORS

ENOMEM
Out of memory.

ESRCH
Record not found.

setutent(), pututline(), and the getut*() functions can also fail for the reasons described in open(2).

FILES

/var/run/utmp
database of currently logged-in users

/var/log/wtmp
database of past user logins

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getutent()

Thread safety

MT-Unsafe init race:utent race:utentbuf sig:ALRM timer

getutid(), getutline()

Thread safety

MT-Unsafe init race:utent sig:ALRM timer

pututline()

Thread safety

MT-Unsafe race:utent sig:ALRM timer

setutent(), endutent(), utmpname()

Thread safetyMT-Unsafe race:utent

In the above table, utent in race:utent signifies that if any of the functions setutent(), getutent(), getutid(), getutline(), pututline(), utmpname(), or endutent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

None.

HISTORY

XPG2, SVr4.

In XPG2 and SVID 2 the function pututline() is documented to return void, and that is what it does on many systems (AIX, HP-UX). HP-UX introduces a new function _pututline() with the prototype given above for pututline().

All these functions are obsolete now on non-Linux systems. POSIX.1-2001 and POSIX.1-2008, following SUSv1, does not have any of these functions, but instead uses

#include <utmpx.h> struct utmpx *getutxent(void); struct utmpx *getutxid(const struct utmpx *); struct utmpx *getutxline(const struct utmpx *); struct utmpx *pututxline(const struct utmpx *); void setutxent(void); void endutxent(void);

These functions are provided by glibc, and perform the same task as their equivalents without the “x”, but use struct utmpx, defined on Linux to be the same as struct utmp. For completeness, glibc also provides utmpxname(), although this function is not specified by POSIX.1.

On some other systems, the utmpx structure is a superset of the utmp structure, with additional fields, and larger versions of the existing fields, and parallel files are maintained, often /var/*/utmpx and /var/*/wtmpx.

Linux glibc on the other hand does not use a parallel utmpx file since its utmp structure is already large enough. The “x” functions listed above are just aliases for their counterparts without the “x” (e.g., getutxent() is an alias for getutent()).

NOTES

glibc notes

The above functions are not thread-safe. glibc adds reentrant versions

#include <utmp.h>
int getutent_r(struct utmp *ubuf, struct utmp **ubufp);
int getutid_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);
int getutline_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getutent_r(), getutid_r(), getutline_r():

    _GNU_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */    _SVID_SOURCE || _BSD_SOURCE

These functions are GNU extensions, analogs of the functions of the same name without the _r suffix. The ubuf argument gives these functions a place to store their result. On success, they return 0, and a pointer to the result is written in *ubufp. On error, these functions return -1. There are no utmpx equivalents of the above functions. (POSIX.1 does not specify such functions.)

EXAMPLES

The following example adds and removes a utmp record, assuming it is run from within a pseudo terminal. For usage in a real application, you should check the return values of getpwuid(3) and ttyname(3).

#include <pwd.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <utmp.h>
int
main(void)
{
    struct utmp entry;
    system("echo before adding entry:;who");
    entry.ut_type = USER_PROCESS;
    entry.ut_pid = getpid();
    strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen("/dev/"));
    /* only correct for ptys named /dev/tty[pqr][0-9a-z] */
    strcpy(entry.ut_id, ttyname(STDIN_FILENO) + strlen("/dev/tty"));
    entry.ut_time = time(NULL);
    strcpy(entry.ut_user, getpwuid(getuid())->pw_name);
    memset(entry.ut_host, 0, UT_HOSTSIZE);
    entry.ut_addr = 0;
    setutent();
    pututline(&entry);
    system("echo after adding entry:;who");
    entry.ut_type = DEAD_PROCESS;
    memset(entry.ut_line, 0, UT_LINESIZE);
    entry.ut_time = 0;
    memset(entry.ut_user, 0, UT_NAMESIZE);
    setutent();
    pututline(&entry);
    system("echo after removing entry:;who");
    endutent();
    exit(EXIT_SUCCESS);
}

SEE ALSO

getutmp(3), utmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

592 - Linux cli command iscntrl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command iscntrl and provides detailed information about the command iscntrl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the iscntrl.

NAME 🖥️ iscntrl 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

593 - Linux cli command l64a

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command l64a and provides detailed information about the command l64a, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the l64a.

NAME 🖥️ l64a 🖥️

convert between long and base-64

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
long a64l(const char *str64);
char *l64a(long value);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

a64l(), l64a():

    _XOPEN_SOURCE >= 500
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

DESCRIPTION

These functions provide a conversion between 32-bit long integers and little-endian base-64 ASCII strings (of length zero to six). If the string used as argument for a64l() has length greater than six, only the first six bytes are used. If the type long has more than 32 bits, then l64a() uses only the low order 32 bits of value, and a64l() sign-extends its 32-bit result.

The 64 digits in the base-64 system are:

‘.’ represents a 0 ‘/’ represents a 1 0-9 represent 2-11 A-Z represent 12-37 a-z represent 38-63

So 123 = 59*64^0 + 1*64^1 = “v/”.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

l64a()

Thread safetyMT-Unsafe race:l64a

a64l()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

The value returned by l64a() may be a pointer to a static buffer, possibly overwritten by later calls.

The behavior of l64a() is undefined when value is negative. If value is zero, it returns an empty string.

These functions are broken before glibc 2.2.5 (puts most significant digit first).

This is not the encoding used by uuencode(1).

SEE ALSO

uuencode(1), strtoul(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

594 - Linux cli command isnanl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isnanl and provides detailed information about the command isnanl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isnanl.

NAME 🖥️ isnanl 🖥️

BSD floating-point classification functions

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
int finite(double x);
int finitef(float x);
int finitel(long double x);
int isinf(double x);
int isinff(float x);
int isinfl(long double x);
int isnan(double x);
int isnanf(float x);
int isnanl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

finite(), finitef(), finitel():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
isinf():
    _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isinff(), isinfl():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isnan():

    _XOPEN_SOURCE || _ISOC99_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isnanf(), isnanl():

    _XOPEN_SOURCE >= 600
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The finite(), finitef(), and finitel() functions return a nonzero value if x is neither infinite nor a “not-a-number” (NaN) value, and 0 otherwise.

The isnan(), isnanf(), and isnanl() functions return a nonzero value if x is a NaN value, and 0 otherwise.

The isinf(), isinff(), and isinfl() functions return 1 if x is positive infinity, -1 if x is negative infinity, and 0 otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

finite(), finitef(), finitel(), isinf(), isinff(), isinfl(), isnan(), isnanf(), isnanl()

Thread safetyMT-Safe

NOTES

Note that these functions are obsolete. C99 defines macros isfinite(), isinf(), and isnan() (for all types) replacing them. Further note that the C99 isinf() has weaker guarantees on the return value. See fpclassify(3).

SEE ALSO

fpclassify(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

595 - Linux cli command vsnprintf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command vsnprintf and provides detailed information about the command vsnprintf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the vsnprintf.

NAME 🖥️ vsnprintf 🖥️

formatted output conversion

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int printf(const char *restrict format, ...);
int fprintf(FILE *restrict stream,
 const char *restrict format, ...);
int dprintf(int fd,
 const char *restrict format, ...);
int sprintf(char *restrict str,
 const char *restrict format, ...);
int snprintf(char str[restrict .size], size_t size,
 const char *restrict format, ...);
int vprintf(const char *restrict format, va_list ap);
int vfprintf(FILE *restrict stream,
 const char *restrict format, va_list ap);
int vdprintf(int fd,
 const char *restrict format, va_list ap);
int vsprintf(char *restrict str,
 const char *restrict format, va_list ap);
int vsnprintf(char str[restrict .size], size_t size,
 const char *restrict format, va_list ap);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

snprintf(), vsnprintf():

    _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE

dprintf(), vdprintf():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The functions in the printf() family produce output according to a format as described below. The functions printf() and vprintf() write output to stdout, the standard output stream; fprintf() and vfprintf() write output to the given output stream; sprintf(), snprintf(), vsprintf(), and vsnprintf() write to the character string str.

The function dprintf() is the same as fprintf() except that it outputs to a file descriptor, fd, instead of to a stdio(3) stream.

The functions snprintf() and vsnprintf() write at most size bytes (including the terminating null byte (‘�’)) to str.

The functions vprintf(), vfprintf(), vdprintf(), vsprintf(), vsnprintf() are equivalent to the functions printf(), fprintf(), dprintf(), sprintf(), snprintf(), respectively, except that they are called with a va_list instead of a variable number of arguments. These functions do not call the va_end macro. Because they invoke the va_arg macro, the value of ap is undefined after the call. See stdarg(3).

All of these functions write the output under the control of a format string that specifies how subsequent arguments (or arguments accessed via the variable-length argument facilities of stdarg(3)) are converted for output.

C99 and POSIX.1-2001 specify that the results are undefined if a call to sprintf(), snprintf(), vsprintf(), or vsnprintf() would cause copying to take place between objects that overlap (e.g., if the target string array and one of the supplied input arguments refer to the same buffer). See CAVEATS.

Format of the format string

The format string is a character string, beginning and ending in its initial shift state, if any. The format string is composed of zero or more directives: ordinary characters (not %), which are copied unchanged to the output stream; and conversion specifications, each of which results in fetching zero or more subsequent arguments. Each conversion specification is introduced by the character %, and ends with a conversion specifier. In between there may be (in this order) zero or more flags, an optional minimum field width, an optional precision and an optional length modifier.

The overall syntax of a conversion specification is:

%[$][flags][width][.precision][length modifier]conversion

The arguments must correspond properly (after type promotion) with the conversion specifier. By default, the arguments are used in the order given, where each ‘*’ (see Field width and Precision below) and each conversion specifier asks for the next argument (and it is an error if insufficiently many arguments are given). One can also specify explicitly which argument is taken, at each place where an argument is required, by writing “%m$” instead of ‘%’ and “*m$” instead of ‘*’, where the decimal integer m denotes the position in the argument list of the desired argument, indexed starting from 1. Thus,

printf("%*d", width, num);

and

printf("%2$*1$d", width, num);

are equivalent. The second style allows repeated references to the same argument. The C99 standard does not include the style using ‘$’, which comes from the Single UNIX Specification. If the style using ‘$’ is used, it must be used throughout for all conversions taking an argument and all width and precision arguments, but it may be mixed with “%%” formats, which do not consume an argument. There may be no gaps in the numbers of arguments specified using ‘$’; for example, if arguments 1 and 3 are specified, argument 2 must also be specified somewhere in the format string.

For some numeric conversions a radix character (“decimal point”) or thousands’ grouping character is used. The actual character used depends on the LC_NUMERIC part of the locale. (See setlocale(3).) The POSIX locale uses ‘.’ as radix character, and does not have a grouping character. Thus,

printf("%'.2f", 1234567.89);

results in “1234567.89” in the POSIX locale, in “1234567,89” in the nl_NL locale, and in “1.234.567,89” in the da_DK locale.

Flag characters

The character % is followed by zero or more of the following flags:

#
The value should be converted to an “alternate form”. For o conversions, the first character of the output string is made zero (by prefixing a 0 if it was not zero already). For x and X conversions, a nonzero result has the string “0x” (or “0X” for X conversions) prepended to it. For a, A, e, E, f, F, g, and G conversions, the result will always contain a decimal point, even if no digits follow it (normally, a decimal point appears in the results of those conversions only if a digit follows). For g and G conversions, trailing zeros are not removed from the result as they would otherwise be. For m, if errno contains a valid error code, the output of strerrorname_np(errno) is printed; otherwise, the value stored in errno is printed as a decimal number. For other conversions, the result is undefined.

0
The value should be zero padded. For d, i, o, u, x, X, a, A, e, E, f, F, g, and G conversions, the converted value is padded on the left with zeros rather than blanks. If the 0 and - flags both appear, the 0 flag is ignored. If a precision is given with an integer conversion (d, i, o, u, x, and X), the 0 flag is ignored. For other conversions, the behavior is undefined.

-
The converted value is to be left adjusted on the field boundary. (The default is right justification.) The converted value is padded on the right with blanks, rather than on the left with blanks or zeros. A - overrides a 0 if both are given.

’ ‘
(a space) A blank should be left before a positive number (or empty string) produced by a signed conversion.

+
A sign (+ or -) should always be placed before a number produced by a signed conversion. By default, a sign is used only for negative numbers. A + overrides a space if both are used.

The five flag characters above are defined in the C99 standard. The Single UNIX Specification specifies one further flag character.


For decimal conversion (i, d, u, f, F, g, G) the output is to be grouped with thousands’ grouping characters if the locale information indicates any. (See setlocale(3).) Note that many versions of gcc(1) cannot parse this option and will issue a warning. (SUSv2 did not include %‘F, but SUSv3 added it.) Note also that the default locale of a C program is “C” whose locale information indicates no thousands’ grouping character. Therefore, without a prior call to setlocale(3), no thousands’ grouping characters will be printed.

glibc 2.2 adds one further flag character.

I
For decimal integer conversion (i, d, u) the output uses the locale’s alternative output digits, if any. For example, since glibc 2.2.3 this will give Arabic-Indic digits in the Persian (“fa_IR”) locale.

Field width

An optional decimal digit string (with nonzero first digit) specifying a minimum field width. If the converted value has fewer characters than the field width, it will be padded with spaces on the left (or right, if the left-adjustment flag has been given). Instead of a decimal digit string one may write “*” or “*m$” (for some decimal integer m) to specify that the field width is given in the next argument, or in the m-th argument, respectively, which must be of type int. A negative field width is taken as a ‘-’ flag followed by a positive field width. In no case does a nonexistent or small field width cause truncation of a field; if the result of a conversion is wider than the field width, the field is expanded to contain the conversion result.

Precision

An optional precision, in the form of a period (’.’) followed by an optional decimal digit string. Instead of a decimal digit string one may write “*” or “*m$” (for some decimal integer m) to specify that the precision is given in the next argument, or in the m-th argument, respectively, which must be of type int. If the precision is given as just ‘.’, the precision is taken to be zero. A negative precision is taken as if the precision were omitted. This gives the minimum number of digits to appear for d, i, o, u, x, and X conversions, the number of digits to appear after the radix character for a, A, e, E, f, and F conversions, the maximum number of significant digits for g and G conversions, or the maximum number of characters to be printed from a string for s and S conversions.

Length modifier

Here, “integer conversion” stands for d, i, o, u, x, or X conversion.

hh
A following integer conversion corresponds to a signed char or unsigned char argument, or a following n conversion corresponds to a pointer to a signed char argument.

h
A following integer conversion corresponds to a short or unsigned short argument, or a following n conversion corresponds to a pointer to a short argument.

l
(ell) A following integer conversion corresponds to a long or unsigned long argument, or a following n conversion corresponds to a pointer to a long argument, or a following c conversion corresponds to a wint_t argument, or a following s conversion corresponds to a pointer to wchar_t argument. On a following a, A, e, E, f, F, g, or G conversion, this length modifier is ignored (C99; not in SUSv2).

ll
(ell-ell). A following integer conversion corresponds to a long long or unsigned long long argument, or a following n conversion corresponds to a pointer to a long long argument.

q
A synonym for ll. This is a nonstandard extension, derived from BSD; avoid its use in new code.

L
A following a, A, e, E, f, F, g, or G conversion corresponds to a long double argument. (C99 allows %LF, but SUSv2 does not.)

j
A following integer conversion corresponds to an intmax_t or uintmax_t argument, or a following n conversion corresponds to a pointer to an intmax_t argument.

z
A following integer conversion corresponds to a size_t or ssize_t argument, or a following n conversion corresponds to a pointer to a size_t argument.

Z
A nonstandard synonym for z that predates the appearance of z. Do not use in new code.

t
A following integer conversion corresponds to a ptrdiff_t argument, or a following n conversion corresponds to a pointer to a ptrdiff_t argument.

SUSv3 specifies all of the above, except for those modifiers explicitly noted as being nonstandard extensions. SUSv2 specified only the length modifiers h (in hd, hi, ho, hx, hX, hn) and l (in ld, li, lo, lx, lX, ln, lc, ls) and L (in Le, LE, Lf, Lg, LG).

As a nonstandard extension, the GNU implementations treats ll and L as synonyms, so that one can, for example, write llg (as a synonym for the standards-compliant Lg) and Ld (as a synonym for the standards compliant lld). Such usage is nonportable.

Conversion specifiers

A character that specifies the type of conversion to be applied. The conversion specifiers and their meanings are:

d, i
The int argument is converted to signed decimal notation. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.

o, u, x, X
The unsigned int argument is converted to unsigned octal (o), unsigned decimal (u), or unsigned hexadecimal (x and X) notation. The letters abcdef are used for x conversions; the letters ABCDEF are used for X conversions. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.

e, E
The double argument is rounded and converted in the style [-]d**.ddde**±dd where there is one digit (which is nonzero if the argument is nonzero) before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero, no decimal-point character appears. An E conversion uses the letter E (rather than e) to introduce the exponent. The exponent always contains at least two digits; if the value is zero, the exponent is 00.

f, F
The double argument is rounded and converted to decimal notation in the style [-]ddd**.**ddd, where the number of digits after the decimal-point character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. If a decimal point appears, at least one digit appears before it.

(SUSv2 does not know about F and says that character string representations for infinity and NaN may be made available. SUSv3 adds a specification for F. The C99 standard specifies “[-]inf” or “[-]infinity” for infinity, and a string starting with “nan” for NaN, in the case of f conversion, and “[-]INF” or “[-]INFINITY” or “NAN” in the case of F conversion.)

g, G
The double argument is converted in style f or e (or F or E for G conversions). The precision specifies the number of significant digits. If the precision is missing, 6 digits are given; if the precision is zero, it is treated as 1. Style e is used if the exponent from its conversion is less than -4 or greater than or equal to the precision. Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit.

a, A
(C99; not in SUSv2, but added in SUSv3) For a conversion, the double argument is converted to hexadecimal notation (using the letters abcdef) in the style [-]0xh**.hhhhp**±d; for A conversion the prefix 0X, the letters ABCDEF, and the exponent separator P is used. There is one hexadecimal digit before the decimal point, and the number of digits after it is equal to the precision. The default precision suffices for an exact representation of the value if an exact representation in base 2 exists and otherwise is sufficiently large to distinguish values of type double. The digit before the decimal point is unspecified for nonnormalized numbers, and nonzero but otherwise unspecified for normalized numbers. The exponent always contains at least one digit; if the value is zero, the exponent is 0.

c
If no l modifier is present, the int argument is converted to an unsigned char, and the resulting character is written. If an l modifier is present, the wint_t (wide character) argument is converted to a multibyte sequence by a call to the wcrtomb(3) function, with a conversion state starting in the initial state, and the resulting multibyte string is written.

s
If no l modifier is present: the const char * argument is expected to be a pointer to an array of character type (pointer to a string). Characters from the array are written up to (but not including) a terminating null byte (‘�’); if a precision is specified, no more than the number specified are written. If a precision is given, no null byte need be present; if the precision is not specified, or is greater than the size of the array, the array must contain a terminating null byte.

If an l modifier is present: the const wchar_t * argument is expected to be a pointer to an array of wide characters. Wide characters from the array are converted to multibyte characters (each by a call to the wcrtomb(3) function, with a conversion state starting in the initial state before the first wide character), up to and including a terminating null wide character. The resulting multibyte characters are written up to (but not including) the terminating null byte. If a precision is specified, no more bytes than the number specified are written, but no partial multibyte characters are written. Note that the precision determines the number of bytes written, not the number of wide characters or screen positions. The array must contain a terminating null wide character, unless a precision is given and it is so small that the number of bytes written exceeds it before the end of the array is reached.

C
(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.) Synonym for lc. Don’t use.

S
(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.) Synonym for ls. Don’t use.

p
The void * pointer argument is printed in hexadecimal (as if by %#x or %#lx).

n
The number of characters written so far is stored into the integer pointed to by the corresponding argument. That argument shall be an int *, or variant whose size matches the (optionally) supplied integer length modifier. No argument is converted. (This specifier is not supported by the bionic C library.) The behavior is undefined if the conversion specification includes any flags, a field width, or a precision.

m
(glibc extension; supported by uClibc and musl.) Print output of strerror(errno) (or strerrorname_np(errno) in the alternate form). No argument is required.

%
A ‘%’ is written. No argument is converted. The complete conversion specification is ‘%%’.

RETURN VALUE

Upon successful return, these functions return the number of bytes printed (excluding the null byte used to end output to strings).

The functions snprintf() and vsnprintf() do not write more than size bytes (including the terminating null byte (‘�’)). If the output was truncated due to this limit, then the return value is the number of characters (excluding the terminating null byte) which would have been written to the final string if enough space had been available. Thus, a return value of size or more means that the output was truncated. (See also below under CAVEATS.)

If an output error is encountered, a negative value is returned.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

printf(), fprintf(), sprintf(), snprintf(), vprintf(), vfprintf(), vsprintf(), vsnprintf()

Thread safetyMT-Safe locale

STANDARDS

fprintf()
printf()
sprintf()
vprintf()
vfprintf()
vsprintf()
snprintf()
vsnprintf()
C11, POSIX.1-2008.

dprintf()
vdprintf()
GNU, POSIX.1-2008.

HISTORY

fprintf()
printf()
sprintf()
vprintf()
vfprintf()
vsprintf()
C89, POSIX.1-2001.

snprintf()
vsnprintf()
SUSv2, C99, POSIX.1-2001.

Concerning the return value of snprintf(), SUSv2 and C99 contradict each other: when snprintf() is called with size=0 then SUSv2 stipulates an unspecified return value less than 1, while C99 allows str to be NULL in this case, and gives the return value (as always) as the number of characters that would have been written in case the output string has been large enough. POSIX.1-2001 and later align their specification of snprintf() with C99.

dprintf()
vdprintf()
GNU, POSIX.1-2008.

glibc 2.1 adds length modifiers hh, j, t, and z and conversion characters a and A.

glibc 2.2 adds the conversion character F with C99 semantics, and the flag character I.

glibc 2.35 gives a meaning to the alternate form (#) of the m conversion specifier, that is %#m.

CAVEATS

Some programs imprudently rely on code such as the following

sprintf(buf, "%s some further text", buf);

to append text to buf. However, the standards explicitly note that the results are undefined if source and destination buffers overlap when calling sprintf(), snprintf(), vsprintf(), and vsnprintf(). Depending on the version of gcc(1) used, and the compiler options employed, calls such as the above will not produce the expected results.

The glibc implementation of the functions snprintf() and vsnprintf() conforms to the C99 standard, that is, behaves as described above, since glibc 2.1. Until glibc 2.0.6, they would return -1 when the output was truncated.

BUGS

Because sprintf() and vsprintf() assume an arbitrarily long string, callers must be careful not to overflow the actual space; this is often impossible to assure. Note that the length of the strings produced is locale-dependent and difficult to predict. Use snprintf() and vsnprintf() instead (or asprintf(3) and vasprintf(3)).

Code such as printf(foo); often indicates a bug, since foo may contain a % character. If foo comes from untrusted user input, it may contain %n, causing the printf() call to write to memory and creating a security hole.

EXAMPLES

To print Pi to five decimal places:

#include <math.h>
#include <stdio.h>
fprintf(stdout, "pi = %.5f

“, 4 * atan(1.0));

To print a date and time in the form “Sunday, July 3, 10:02”, where weekday and month are pointers to strings:

#include <stdio.h>
fprintf(stdout, "%s, %s %d, %.2d:%.2d

“, weekday, month, day, hour, min);

Many countries use the day-month-year order. Hence, an internationalized version must be able to print the arguments in an order specified by the format:

#include <stdio.h>
fprintf(stdout, format,
        weekday, month, day, hour, min);

where format depends on locale, and may permute the arguments. With the value:

"%1$s, %3$d. %2$s, %4$d:%5$.2d

"

one might obtain “Sonntag, 3. Juli, 10:02”.

To allocate a sufficiently large string and print into it (code correct for both glibc 2.0 and glibc 2.1):

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
char *
make_message(const char *fmt, ...)
{
    int n = 0;
    size_t size = 0;
    char *p = NULL;
    va_list ap;
    /* Determine required size. */
    va_start(ap, fmt);
    n = vsnprintf(p, size, fmt, ap);
    va_end(ap);
    if (n < 0)
        return NULL;
    size = (size_t) n + 1;      /* One extra byte for '' */
    p = malloc(size);
    if (p == NULL)
        return NULL;
    va_start(ap, fmt);
    n = vsnprintf(p, size, fmt, ap);
    va_end(ap);
    if (n < 0) {
        free(p);
        return NULL;
    }
    return p;
}

If truncation occurs in glibc versions prior to glibc 2.0.6, this is treated as an error instead of being handled gracefully.

SEE ALSO

printf(1), asprintf(3), puts(3), scanf(3), setlocale(3), strfromd(3), wcrtomb(3), wprintf(3), locale(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

596 - Linux cli command Image_ExifTool_Fontpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Fontpm and provides detailed information about the command Image_ExifTool_Fontpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Fontpm.

NAME 🖥️ Image_ExifTool_Fontpm 🖥️

Read meta information from font files

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains the routines required by Image::ExifTool to read meta information from various format font files. Currently recognized font file types are OTF, TTF, TTC, DFONT, PFA, PFB, PFM, AFM, ACFM and AMFM. As well, WOFF and WOFF2 font files are identified, but metadata is not currently extracted from these formats.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://developer.apple.com/textfonts/TTRefMan/RM06/Chap6.html>

<http://www.microsoft.com/typography/otspec/otff.htm>

<http://partners.adobe.com/public/developer/opentype/index_font_file.html>

<http://partners.adobe.com/public/developer/en/font/5178.PFM.pdf>

<http://opensource.adobe.com/svn/opensource/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/MimeMappings.java>

<http://www.adobe.com/devnet/font/pdfs/5004.AFM_Spec.pdf>

SEE ALSO

“Font Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

597 - Linux cli command XtRemoveEventTypeHandler

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtRemoveEventTypeHandler and provides detailed information about the command XtRemoveEventTypeHandler, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtRemoveEventTypeHandler.

NAME 🖥️ XtRemoveEventTypeHandler 🖥️

extension event handling

SYNTAX

#include <X11/Intrinsic.h>

void XtInsertEventTypeHandler(Widget widget, int event_type, XtPointer select_data, XtEventHandler proc, XtPointer client_data, XtListPosition position);

void XtRemoveEventTypeHandler(Widget widget, int event_type, XtPointer select_data, XtEventHandler proc, XtPointer client_data);

void XtRegisterExtensionSelector(Display* display, int min_event_type, int max_event_type, XtExtensionSelectProc proc, XtPointer client_data);

XtEventDispatchProc XtSetEventDispatcher(Display* display, int event_type, XtEventDispatchProc proc);

Boolean XtDispatchEventToWidget(Widget widget, XEvent* event);

ARGUMENTS

widget
Specifies the widget for this event handler. Must be of class Core or any subclass thereof.

event_type
Specifies the event type.

select_data
Specifies data used to select or deselect events from the server.

proc
Specifies the proc.

client_data
Specifies additional data to be passed to the event handler.

position
Specifies when the event handler is to be called relative to other previously registered handlers.

display
Specifies the display.

min_event_type, max_event_type
Specifies the range of event types for this extension.

event
Specifies a pointer to the event to be dispatched.

DESCRIPTION

The XtInsertEventTypeHandler function registers a procedure with the dispatch mechanism that is to be called when an event that matches the specified event_type is dispatched to the specified widget.

If event_type is one of the core X protocol events then select_data must be a pointer to a value of type EventMask, indicating the event mask to be used to select for the desired event. This event mask will be included in the value returned by XtBuildEventMask. If the widget is realized XtInsertEventTypeHandler calls XSelectInput if necessary. Specifying NULL for select_data is equivalent to specifying a pointer to an event mask containing 0. This is similar to the XtInsertRawEventHandler function.

If event_type specifies an extension event type then the semantics of the data pointed to by select_data are defined by the extension selector registered for the specified event type.

In either case the Intrinsics are not required to copy the data pointed to by select_data, so the caller must ensure that it remains valid as long as the event handler remains registered with this value of select_data.

The position argument allows the client to control the order of the invocation of event handlers registered for the same event type. If the client does not care about the order, it should normally specify XtListTail, which registers this event handler after any previously registered handlers for this event type.

The XtRemoveEventTypeHandler function unregisters an even handler registered with XtInsertEventTypeHandler for the specified event type. The request is ignored if client_data does not match the value given with the handler was registered.

If event_type specifies on of the core X protocol events, select_data must be a pointer to a value of type EventMask, indicating the mask to be used to deselect for the appropriate event. If the widget is realized, XtRemoveEventTypeHandler calls XSelectInput if necessary. Specifying NULL for select_data is equivalent to specifying a pointer to an event mask containing 0. This is similar to the XtRemoveRawEventHandler function.

If event_type specifies an extension event type then the semantics of the data pointed to by select_data are defined by the extension selector registered for the specified event type.

The XtRegisterExtensionSelector function registers a procedure to arrange for the delivery of extension events to widgets.

If min_event_type and max_event_type match the parameters to a previous call to XtRegisterExtensionSelector for the same display, the proc and client_data replace the previously registered values. If the range specified by min_event_type and max_event_type overlaps the range of the parameters to a previous call for the same display in any other way, an error results.

The XtSetEventDispatcher function registers the event dispatcher procedure specified by proc for events with the type event_type. The previously registered dispatcher (or the default dispatcher if there was no previously registered dispatcher) is returned. If proc is NULL, the default procedure is restored for the specified type.

In the future, when XtDispatchEvent is called with an event of event_type, the specified proc (or the default dispatcher) will be invoked to determine a widget ot which to dispatch the event.

The XtDispatchEventToWidget function scans the list of registered event handlers for the specified widget and calls each handler that has been registered for the specified event type, subject to the continue_to_dispatch value returned by each handler. The Intrinsics behave as if event handlers were registered at the head of the list for Expose, NoExpose, GraphicsExpose, and VisibilityNotify events to invoke the widget’s expose procedure according to the exposure compression rules and to update the widget’s visible field if visible_interest is True. These internal event handlers never set continue_to_dispatch to False.

XtDispatchEventToWidget returns True if any event handler was called and False otherwise.

SEE ALSO

XtGetKeyboardFocusWidget(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

598 - Linux cli command Image_ExifTool_Casiopm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Casiopm and provides detailed information about the command Image_ExifTool_Casiopm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Casiopm.

NAME 🖥️ Image_ExifTool_Casiopm 🖥️

Casio EXIF maker notes tags

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret Casio maker notes in EXIF information.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html>

ACKNOWLEDGEMENTS

Thanks to Joachim Loehr for adding support for the type 2 maker notes, and Jens Duttke and Robert Chi for decoding some tags.

SEE ALSO

“Casio Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

599 - Linux cli command XML_XPathEngine_Numberpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_XPathEngine_Numberpm and provides detailed information about the command XML_XPathEngine_Numberpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_XPathEngine_Numberpm.

NAME 🖥️ XML_XPathEngine_Numberpm 🖥️

Simple numeric values.

DESCRIPTION

This class holds simple numeric values. It doesn’t support -0, +/- Infinity, or NaN, as the XPath spec says it should, but I’m not hurting anyone I don’t think.

API

new($num)

Creates a new XML::XPathEngine::Number object, with the value in $num. Does some rudimentary numeric checking on $num to ensure it actually is a number.

value()

Also as overloaded stringification. Returns the numeric value held.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

600 - Linux cli command pcap_filenopcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_filenopcap and provides detailed information about the command pcap_filenopcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_filenopcap.

NAME 🖥️ pcap_filenopcap 🖥️

get the file descriptor for a live capture

SYNOPSIS

#include <pcap/pcap.h>
int pcap_fileno(pcap_t *p);

DESCRIPTION

If p refers to a network device that was opened for a live capture using a combination of pcap_create(3PCAP) and pcap_activate(3PCAP), or using pcap_open_live(3PCAP), pcap_fileno() returns the file descriptor from which captured packets are read.

If p refers to a ``savefile’’ that was opened using functions such as pcap_open_offline(3PCAP) or pcap_fopen_offline(3PCAP), a ``dead’’ pcap_t opened using pcap_open_dead(3PCAP), or a pcap_t that was created with pcap_create() but that has not yet been activated with pcap_activate(), it returns PCAP_ERROR.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

601 - Linux cli command sigsetmask

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigsetmask and provides detailed information about the command sigsetmask, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigsetmask.

NAME 🖥️ sigsetmask 🖥️

BSD signal API

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
[[deprecated]] int sigvec(int sig, const struct sigvec *vec,
 struct sigvec *ovec);
[[deprecated]] int sigmask(int signum);
[[deprecated]] int sigblock(int mask);
[[deprecated]] int sigsetmask(int mask);
[[deprecated]] int siggetmask(void);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

These functions are provided in glibc as a compatibility interface for programs that make use of the historical BSD signal API. This API is obsolete: new applications should use the POSIX signal API (sigaction(2), sigprocmask(2), etc.).

The sigvec() function sets and/or gets the disposition of the signal sig (like the POSIX sigaction(2)). If vec is not NULL, it points to a sigvec structure that defines the new disposition for sig. If ovec is not NULL, it points to a sigvec structure that is used to return the previous disposition of sig. To obtain the current disposition of sig without changing it, specify NULL for vec, and a non-null pointer for ovec.

The dispositions for SIGKILL and SIGSTOP cannot be changed.

The sigvec structure has the following form:

struct sigvec {
    void (*sv_handler)(int); /* Signal disposition */
    int    sv_mask;          /* Signals to be blocked in handler */
    int    sv_flags;         /* Flags */
};

The sv_handler field specifies the disposition of the signal, and is either: the address of a signal handler function; SIG_DFL, meaning the default disposition applies for the signal; or SIG_IGN, meaning that the signal is ignored.

If sv_handler specifies the address of a signal handler, then sv_mask specifies a mask of signals that are to be blocked while the handler is executing. In addition, the signal for which the handler is invoked is also blocked. Attempts to block SIGKILL or SIGSTOP are silently ignored.

If sv_handler specifies the address of a signal handler, then the sv_flags field specifies flags controlling what happens when the handler is called. This field may contain zero or more of the following flags:

SV_INTERRUPT
If the signal handler interrupts a blocking system call, then upon return from the handler the system call is not restarted: instead it fails with the error EINTR. If this flag is not specified, then system calls are restarted by default.

SV_RESETHAND
Reset the disposition of the signal to the default before calling the signal handler. If this flag is not specified, then the handler remains established until explicitly removed by a later call to sigvec() or until the process performs an execve(2).

SV_ONSTACK
Handle the signal on the alternate signal stack (historically established under BSD using the obsolete sigstack() function; the POSIX replacement is sigaltstack(2)).

The sigmask() macro constructs and returns a “signal mask” for signum. For example, we can initialize the vec.sv_mask field given to sigvec() using code such as the following:

vec.sv_mask = sigmask(SIGQUIT) | sigmask(SIGABRT);
            /* Block SIGQUIT and SIGABRT during
               handler execution */

The sigblock() function adds the signals in mask to the process’s signal mask (like POSIX sigprocmask(SIG_BLOCK)), and returns the process’s previous signal mask. Attempts to block SIGKILL or SIGSTOP are silently ignored.

The sigsetmask() function sets the process’s signal mask to the value given in mask (like POSIX sigprocmask(SIG_SETMASK)), and returns the process’s previous signal mask.

The siggetmask() function returns the process’s current signal mask. This call is equivalent to sigblock(0).

RETURN VALUE

The sigvec() function returns 0 on success; on error, it returns -1 and sets errno to indicate the error.

The sigblock() and sigsetmask() functions return the previous signal mask.

The sigmask() macro returns the signal mask for signum.

ERRORS

See the ERRORS under sigaction(2) and sigprocmask(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sigvec(), sigmask(), sigblock(), sigsetmask(), siggetmask()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

sigvec()
sigblock()
sigmask()
sigsetmask()
4.3BSD.

siggetmask()
Unclear origin.

sigvec()
Removed in glibc 2.21.

NOTES

On 4.3BSD, the signal() function provided reliable semantics (as when calling sigvec() with vec.sv_mask equal to 0). On System V, signal() provides unreliable semantics. POSIX.1 leaves these aspects of signal() unspecified. See signal(2) for further details.

In order to wait for a signal, BSD and System V both provided a function named sigpause(3), but this function has a different argument on the two systems. See sigpause(3) for details.

SEE ALSO

kill(2), pause(2), sigaction(2), signal(2), sigprocmask(2), raise(3), sigpause(3), sigset(3), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

602 - Linux cli command inet_network

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command inet_network and provides detailed information about the command inet_network, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the inet_network.

NAME 🖥️ inet_network 🖥️

Internet address manipulation routines

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
int inet_aton(const char *cp, struct in_addr *inp);
in_addr_t inet_addr(const char *cp);
in_addr_t inet_network(const char *cp);
[[deprecated]] char *inet_ntoa(struct in_addr in);
[[deprecated]] struct in_addr inet_makeaddr(in_addr_t net,
 in_addr_t host);
[[deprecated]] in_addr_t inet_lnaof(struct in_addr in);
[[deprecated]] in_addr_t inet_netof(struct in_addr in);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

inet_aton(), inet_ntoa():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    In glibc up to and including 2.19:
        _BSD_SOURCE || _BSD_SOURCE

DESCRIPTION

inet_aton() converts the Internet host address cp from the IPv4 numbers-and-dots notation into binary form (in network byte order) and stores it in the structure that inp points to. inet_aton() returns nonzero if the address is valid, zero if not. The address supplied in cp can have one of the following forms:

a.b.c.d
Each of the four numeric parts specifies a byte of the address; the bytes are assigned in left-to-right order to produce the binary address.

a.b.c
Parts a and b specify the first two bytes of the binary address. Part c is interpreted as a 16-bit value that defines the rightmost two bytes of the binary address. This notation is suitable for specifying (outmoded) Class B network addresses.

a.b
Part a specifies the first byte of the binary address. Part b is interpreted as a 24-bit value that defines the rightmost three bytes of the binary address. This notation is suitable for specifying (outmoded) Class A network addresses.

a
The value a is interpreted as a 32-bit value that is stored directly into the binary address without any byte rearrangement.

In all of the above forms, components of the dotted address can be specified in decimal, octal (with a leading 0), or hexadecimal, with a leading 0X). Addresses in any of these forms are collectively termed IPV4 numbers-and-dots notation. The form that uses exactly four decimal numbers is referred to as IPv4 dotted-decimal notation (or sometimes: IPv4 dotted-quad notation).

inet_aton() returns 1 if the supplied string was successfully interpreted, or 0 if the string is invalid (errno is not set on error).

The inet_addr() function converts the Internet host address cp from IPv4 numbers-and-dots notation into binary data in network byte order. If the input is invalid, INADDR_NONE (usually -1) is returned. Use of this function is problematic because -1 is a valid address (255.255.255.255). Avoid its use in favor of inet_aton(), inet_pton(3), or getaddrinfo(3), which provide a cleaner way to indicate error return.

The inet_network() function converts cp, a string in IPv4 numbers-and-dots notation, into a number in host byte order suitable for use as an Internet network address. On success, the converted address is returned. If the input is invalid, -1 is returned.

The inet_ntoa() function converts the Internet host address in, given in network byte order, to a string in IPv4 dotted-decimal notation. The string is returned in a statically allocated buffer, which subsequent calls will overwrite.

The inet_lnaof() function returns the local network address part of the Internet address in. The returned value is in host byte order.

The inet_netof() function returns the network number part of the Internet address in. The returned value is in host byte order.

The inet_makeaddr() function is the converse of inet_netof() and inet_lnaof(). It returns an Internet host address in network byte order, created by combining the network number net with the local address host, both in host byte order.

The structure in_addr as used in inet_ntoa(), inet_makeaddr(), inet_lnaof(), and inet_netof() is defined in <netinet/in.h> as:

typedef uint32_t in_addr_t;
struct in_addr {
    in_addr_t s_addr;
};

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

inet_aton(), inet_addr(), inet_network(), inet_ntoa()

Thread safetyMT-Safe locale

inet_makeaddr(), inet_lnaof(), inet_netof()

Thread safetyMT-Safe

STANDARDS

inet_addr()
inet_ntoa()
POSIX.1-2008.

inet_aton()
None.

STANDARDS

inet_addr()
inet_ntoa()
POSIX.1-2001, 4.3BSD.

inet_lnaof(), inet_netof(), and inet_makeaddr() are legacy functions that assume they are dealing with classful network addresses. Classful networking divides IPv4 network addresses into host and network components at byte boundaries, as follows:

Class A
This address type is indicated by the value 0 in the most significant bit of the (network byte ordered) address. The network address is contained in the most significant byte, and the host address occupies the remaining three bytes.

Class B
This address type is indicated by the binary value 10 in the most significant two bits of the address. The network address is contained in the two most significant bytes, and the host address occupies the remaining two bytes.

Class C
This address type is indicated by the binary value 110 in the most significant three bits of the address. The network address is contained in the three most significant bytes, and the host address occupies the remaining byte.

Classful network addresses are now obsolete, having been superseded by Classless Inter-Domain Routing (CIDR), which divides addresses into network and host components at arbitrary bit (rather than byte) boundaries.

NOTES

On x86 architectures, the host byte order is Least Significant Byte first (little endian), whereas the network byte order, as used on the Internet, is Most Significant Byte first (big endian).

EXAMPLES

An example of the use of inet_aton() and inet_ntoa() is shown below. Here are some example runs:

$ ./a.out 226.000.000.037 # Last byte is in octal
226.0.0.31
$ ./a.out 0x7f.1  # First byte is in hex
127.0.0.1

Program source

#define _DEFAULT_SOURCE
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
    struct in_addr addr;
    if (argc != 2) {
        fprintf(stderr, "%s <dotted-address>

“, argv[0]); exit(EXIT_FAILURE); } if (inet_aton(argv[1], &addr) == 0) { fprintf(stderr, “Invalid address “); exit(EXIT_FAILURE); } printf("%s “, inet_ntoa(addr)); exit(EXIT_SUCCESS); }

SEE ALSO

byteorder(3), getaddrinfo(3), gethostbyname(3), getnameinfo(3), getnetent(3), inet_net_pton(3), inet_ntop(3), inet_pton(3), hosts(5), networks(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

603 - Linux cli command XtIsSubclass

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtIsSubclass and provides detailed information about the command XtIsSubclass, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtIsSubclass.

NAME 🖥️ XtIsSubclass 🖥️

obtain and verify a widget’s class

SYNTAX

#include <X11/Intrinsic.h>

WidgetClass XtClass(Widget w);

WidgetClass XtSuperclass(Widget w);

Boolean XtIsSubclass(Widget w, WidgetClass widget_class);

void XtCheckSubclass(Widget widget, WidgetClass widget_class, String message);

Boolean XtIsObject(Widget w);

Boolean XtIsRectObj(Widget w);

Boolean XtIsWidget(Widget w);

Boolean XtIsComposite(Widget w);

Boolean XtIsConstraint(Widget w);

Boolean XtIsShell(Widget w);

Boolean XtIsOverrideShell(Widget w);

Boolean XtIsWMShell(Widget w);

Boolean XtIsVendorShell(Widget w);

Boolean XtIsTransientShell(Widget w);

Boolean XtIsTopLevelShell(Widget w);

Boolean XtIsApplicationShell(Widget w);

Boolean XtIsSessionShell(Widget w);

ARGUMENTS

  1. Specifies the widget.

widget_class
Specifies the widget class.

message
Specifies the message that is to be used.

DESCRIPTION

The XtClass function returns a pointer to the widget’s class structure.

The XtSuperclass function returns a pointer to the widget’s superclass class structure.

The XtIsSubclass function returns True if the class of the specified widget is equal to or is a subclass of the specified class. The widget’s class can be any number of subclasses down the chain and need not be an immediate subclass of the specified class. Composite widgets that need to restrict the class of the items they contain can use XtIsSubclass to find out if a widget belongs to the desired class of objects.

The XtCheckSubclass macro determines if the class of the specified widget is equal to or is a subclass of the specified widget class. The widget can be any number of subclasses down the chain and need not be an immediate subclass of the specified widget class. If the specified widget is not a subclass, XtCheckSubclass constructs an error message from the supplied message, the widget’s actual class, and the expected class and calls XtErrorMsg. XtCheckSubclass should be used at the entry point of exported routines to ensure that the client has passed in a valid widget class for the exported operation.

XtCheckSubclass is only executed when the widget has been compiled with the compiler symbol DEBUG defined; otherwise, it is defined as the empty string and generates no code.

To test if a given widget belongs to a subclass of an Intrinsics-defined class, the Intrinsics defines macros or functions equivalent to XtIsSubclass for each of the built-in classes. These procedures are XtIsObject, XtIsRectObj, XtIsWidget, XtIsComposite, XtIsConstraint, XtIsShell, XtIsOverrideShell, XtIsWMShell, XtIsVendorShell, XtIsTransientShell, XtIsTopLevelShell, XtIsApplicationShell, and XtIsSessionShell.

The

SEE ALSO

XtAppErrorMsg(3), XtDisplay(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

604 - Linux cli command LWP_Protocol_httpspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LWP_Protocol_httpspm and provides detailed information about the command LWP_Protocol_httpspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LWP_Protocol_httpspm.

NAME 🖥️ LWP_Protocol_httpspm 🖥️

Provide https support for LWP::UserAgent

SYNOPSIS

use LWP::UserAgent; $ua = LWP::UserAgent->new(ssl_opts => { verify_hostname => 1 }); $res = $ua->get(“https://www.example.com”); # specify a CA path $ua = LWP::UserAgent->new( ssl_opts => { SSL_ca_path => /etc/ssl/certs, verify_hostname => 1, } );

DESCRIPTION

The LWP::Protocol::https module provides support for using https schemed URLs with LWP. This module is a plug-in to the LWP protocol handling, so you don’t use it directly. Once the module is installed LWP is able to access sites using HTTP over SSL/TLS.

If hostname verification is requested by LWP::UserAgent’s ssl_opts, and neither SSL_ca_file nor SSL_ca_path is set, then SSL_ca_file is implied to be the one provided by Mozilla::CA. If the Mozilla::CA module isn’t available SSL requests will fail. Either install this module, set up an alternative SSL_ca_file or disable hostname verification.

This module used to be bundled with the libwww-perl, but it was unbundled in v6.02 in order to be able to declare its dependencies properly for the CPAN tool-chain. Applications that need https support can just declare their dependency on LWP::Protocol::https and will no longer need to know what underlying modules to install.

SEE ALSO

IO::Socket::SSL, Crypt::SSLeay, Mozilla::CA

COPYRIGHT & LICENSE

Copyright (c) 1997-2011 Gisle Aas.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

605 - Linux cli command nextupf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command nextupf and provides detailed information about the command nextupf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the nextupf.

NAME 🖥️ nextupf 🖥️

return next floating-point number toward positive/negative infinity

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <math.h>
double nextup(double x);
float nextupf(float x);
long double nextupl(long double x);
double nextdown(double x);
float nextdownf(float x);
long double nextdownl(long double x);

DESCRIPTION

The nextup(), nextupf(), and nextupl() functions return the next representable floating-point number greater than x.

If x is the smallest representable negative number in the corresponding type, these functions return -0. If x is 0, the returned value is the smallest representable positive number of the corresponding type.

If x is positive infinity, the returned value is positive infinity. If x is negative infinity, the returned value is the largest representable finite negative number of the corresponding type.

If x is Nan, the returned value is NaN.

The value returned by nextdown(x) is -nextup(-x), and similarly for the other types.

RETURN VALUE

See DESCRIPTION.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

nextup(), nextupf(), nextupl(), nextdown(), nextdownf(), nextdownl()

Thread safetyMT-Safe

STANDARDS

These functions are described in IEEE Std 754-2008 - Standard for Floating-Point Arithmetic and ISO/IEC TS 18661.

HISTORY

glibc 2.24.

SEE ALSO

nearbyint(3), nextafter(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

606 - Linux cli command pthread_mutexattr_setkind_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_mutexattr_setkind_np and provides detailed information about the command pthread_mutexattr_setkind_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_mutexattr_setkind_np.

NAME 🖥️ pthread_mutexattr_setkind_np 🖥️

deprecated mutex creation attributes

SYNOPSIS

#include <pthread.h>
int pthread_mutexattr_setkind_np(pthread_mutexattr_t *attr, int kind);
int pthread_mutexattr_getkind_np(const pthread_mutexattr_t *attr,
 int *kind);

DESCRIPTION

These functions are deprecated, use pthread_mutexattr_settype(3) and pthread_mutexattr_gettype(3) instead.

RETURN VALUE

pthread_mutexattr_getkind_np always returns 0.

pthread_mutexattr_setkind_np returns 0 on success and a non-zero error code on error.

ERRORS

On error, pthread_mutexattr_setkind_np returns the following error code:

EINVAL
kind is neither PTHREAD_MUTEX_FAST_NP nor PTHREAD_MUTEX_RECURSIVE_NP nor PTHREAD_MUTEX_ERRORCHECK_NP.

SEE ALSO

pthread_mutexattr_settype(3), pthread_mutexattr_gettype(3).

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

607 - Linux cli command vswprintf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command vswprintf and provides detailed information about the command vswprintf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the vswprintf.

NAME 🖥️ vswprintf 🖥️

formatted wide-character output conversion

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
#include <wchar.h>
int wprintf(const wchar_t *restrict format, ...);
int fwprintf(FILE *restrict stream,
 const wchar_t *restrict format, ...);
int swprintf(wchar_t wcs[restrict .maxlen], size_t maxlen,
 const wchar_t *restrict format, ...);
int vwprintf(const wchar_t *restrict format, va_list args);
int vfwprintf(FILE *restrict stream,
 const wchar_t *restrict format, va_list args);
int vswprintf(wchar_t wcs[restrict .maxlen], size_t maxlen,
 const wchar_t *restrict format, va_list args);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE
        || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The wprintf() family of functions is the wide-character equivalent of the printf(3) family of functions. It performs formatted output of wide characters.

The wprintf() and vwprintf() functions perform wide-character output to stdout. stdout must not be byte oriented; see fwide(3) for more information.

The fwprintf() and vfwprintf() functions perform wide-character output to stream. stream must not be byte oriented; see fwide(3) for more information.

The swprintf() and vswprintf() functions perform wide-character output to an array of wide characters. The programmer must ensure that there is room for at least maxlen wide characters at wcs.

These functions are like the printf(3), vprintf(3), fprintf(3), vfprintf(3), sprintf(3), vsprintf(3) functions except for the following differences:

·
The format string is a wide-character string.

·
The output consists of wide characters, not bytes.

·
swprintf() and vswprintf() take a maxlen argument, sprintf(3) and vsprintf(3) do not. (snprintf(3) and vsnprintf(3) take a maxlen argument, but these functions do not return -1 upon buffer overflow on Linux.)

The treatment of the conversion characters c and s is different:

c
If no l modifier is present, the int argument is converted to a wide character by a call to the btowc(3) function, and the resulting wide character is written. If an l modifier is present, the wint_t (wide character) argument is written.

s
If no l modifier is present: the const char * argument is expected to be a pointer to an array of character type (pointer to a string) containing a multibyte character sequence beginning in the initial shift state. Characters from the array are converted to wide characters (each by a call to the mbrtowc(3) function with a conversion state starting in the initial state before the first byte). The resulting wide characters are written up to (but not including) the terminating null wide character (L’�’). If a precision is specified, no more wide characters than the number specified are written. Note that the precision determines the number of wide characters written, not the number of bytes or screen positions. The array must contain a terminating null byte (‘�’), unless a precision is given and it is so small that the number of converted wide characters reaches it before the end of the array is reached. If an l modifier is present: the const wchar_t * argument is expected to be a pointer to an array of wide characters. Wide characters from the array are written up to (but not including) a terminating null wide character. If a precision is specified, no more than the number specified are written. The array must contain a terminating null wide character, unless a precision is given and it is smaller than or equal to the number of wide characters in the array.

RETURN VALUE

The functions return the number of wide characters written, excluding the terminating null wide character in case of the functions swprintf() and vswprintf(). They return -1 when an error occurs.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wprintf(), fwprintf(), swprintf(), vwprintf(), vfwprintf(), vswprintf()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of wprintf() et al. depends on the LC_CTYPE category of the current locale.

If the format string contains non-ASCII wide characters, the program will work correctly only if the LC_CTYPE category of the current locale at run time is the same as the LC_CTYPE category of the current locale at compile time. This is because the wchar_t representation is platform- and locale-dependent. (The glibc represents wide characters using their Unicode (ISO/IEC 10646) code point, but other platforms don’t do this. Also, the use of C99 universal character names of the form \unnnn does not solve this problem.) Therefore, in internationalized programs, the format string should consist of ASCII wide characters only, or should be constructed at run time in an internationalized way (e.g., using gettext(3) or iconv(3), followed by mbstowcs(3)).

SEE ALSO

fprintf(3), fputwc(3), fwide(3), printf(3), snprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

608 - Linux cli command XtDestroyApplicationContext

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtDestroyApplicationContext and provides detailed information about the command XtDestroyApplicationContext, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtDestroyApplicationContext.

NAME 🖥️ XtDestroyApplicationContext 🖥️

create, destroy, and obtain an application context

SYNTAX

#include <X11/Intrinsic.h>

XtAppContext XtCreateApplicationContext(void);

void XtDestroyApplicationContext(XtAppContext app_context);

XtAppContext XtWidgetToApplicationContext(Widget w);

void XtToolkitInitialize(void);

ARGUMENTS

app_context
Specifies the application context.

  1. Specifies the widget that you want the application context for.

DESCRIPTION

The XtCreateApplicationContext function returns an application context, which is an opaque type. Every application must have at least one application context.

The XtDestroyApplicationContext function destroys the specified application context as soon as it is safe to do so. If called from with an event dispatch (for example, a callback procedure), XtDestroyApplicationContext does not destroy the application context until the dispatch is complete.

The XtWidgetToApplicationContext function returns the application context for the specified widget.

The XtToolkitInitialize function initializes the Intrinsics internals. If XtToolkitInitialize was previously called it returns immediately.

SEE ALSO

XtDisplayInitialize(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

609 - Linux cli command IPC_System_Simplepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IPC_System_Simplepm and provides detailed information about the command IPC_System_Simplepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IPC_System_Simplepm.

NAME 🖥️ IPC_System_Simplepm 🖥️

Run commands simply, with detailed diagnostics

SYNOPSIS

use IPC::System::Simple qw(system systemx capture capturex); system(“some_command”); # Command succeeds or dies! system(“some_command”,@args); # Succeeds or dies, avoids shell if @args systemx(“some_command”,@args); # Succeeds or dies, NEVER uses the shell # Capture the output of a command (just like backticks). Dies on error. my $output = capture(“some_command”); # Just like backticks in list context. Dies on error. my @output = capture(“some_command”); # As above, but avoids the shell if @args is non-empty my $output = capture(“some_command”, @args); # As above, but NEVER invokes the shell. my $output = capturex(“some_command”, @args); my @output = capturex(“some_command”, @args);

DESCRIPTION

Calling Perl’s in-built system() function is easy, determining if it was successful is hard. Let’s face it, $? isn’t the nicest variable in the world to play with, and even if you do check it, producing a well-formatted error string takes a lot of work.

IPC::System::Simple takes the hard work out of calling external commands. In fact, if you want to be really lazy, you can just write:

use IPC::System::Simple qw(system);

and all of your system commands will either succeed (run to completion and return a zero exit value), or die with rich diagnostic messages.

The IPC::System::Simple module also provides a simple replacement to Perl’s backticks operator. Simply write:

use IPC::System::Simple qw(capture);

and then use the capture() command just like you’d use backticks. If there’s an error, it will die with a detailed description of what went wrong. Better still, you can even use capturex() to run the equivalent of backticks, but without the shell:

use IPC::System::Simple qw(capturex); my $result = capturex($command, @args);

If you want more power than the basic interface, including the ability to specify which exit values are acceptable, trap errors, or process diagnostics, then read on!

ADVANCED SYNOPSIS

use IPC::System::Simple qw( capture capturex system systemx run runx $EXITVAL EXIT_ANY ); # Run a command, throwing exception on failure run(“some_command”); runx(“some_command”,@args); # Run a command, avoiding the shell # Do the same thing, but with the drop-in system replacement. system(“some_command”); systemx(“some_command”, @args); # Run a command which must return 0..5, avoid the shell, and get the # exit value (we could also look at $EXITVAL) my $exit_value = runx([0..5], “some_command”, @args); # The same, but any exit value will do. my $exit_value = runx(EXIT_ANY, “some_command”, @args); # Capture output into $result and throw exception on failure my $result = capture(“some_command”); # Check exit value from captured command print “some_command exited with status $EXITVAL “; # Captures into @lines, splitting on $/ my @lines = capture(“some_command”); # Run a command which must return 0..5, capture the output into # @lines, and avoid the shell. my @lines = capturex([0..5], “some_command”, @args);

ADVANCED USAGE

run() and system()

IPC::System::Simple provides a subroutine called run, that executes a command using the same semantics as Perl’s built-in system:

use IPC::System::Simple qw(run); run(“cat *.txt”); # Execute command via the shell run(“cat”,"/etc/motd”); # Execute command without shell

The primary difference between Perl’s in-built system and the run command is that run will throw an exception on failure, and allows a list of acceptable exit values to be set. See Exit values for further information.

In fact, you can even have IPC::System::Simple replace the default system function for your package so it has the same behaviour:

use IPC::System::Simple qw(system); system(“cat *.txt”); # system now succeeds or dies!

system and run are aliases to each other.

See also runx(), systemx() and capturex() for variants of system() and run() that never invoke the shell, even with a single argument.

capture()

A second subroutine, named capture executes a command with the same semantics as Perl’s built-in backticks (and qx()):

use IPC::System::Simple qw(capture); # Capture text while invoking the shell. my $file = capture(“cat /etc/motd”); my @lines = capture(“cat /etc/passwd”);

However unlike regular backticks, which always use the shell, capture will bypass the shell when called with multiple arguments:

# Capture text while avoiding the shell. my $file = capture(“cat”, “/etc/motd”); my @lines = capture(“cat”, “/etc/passwd”);

See also runx(), systemx() and capturex() for a variant of capture() that never invokes the shell, even with a single argument.

runx(), systemx() and capturex()

The runx(), systemx() and capturex() commands are identical to the multi-argument forms of run(), system() and capture() respectively, but never invoke the shell, even when called with a single argument. These forms are particularly useful when a command’s argument list might be empty, for example:

systemx($cmd, @args);

The use of systemx() here guarantees that the shell will never be invoked, even if @args is empty.

Exception handling

In the case where the command returns an unexpected status, both run and capture will throw an exception, which if not caught will terminate your program with an error.

Capturing the exception is easy:

eval { run(“cat *.txt”); }; if ($@) { print “Something went wrong - $@ “; }

See the diagnostics section below for more details.

Exception cases

IPC::System::Simple considers the following to be unexpected, and worthy of exception:

  • Failing to start entirely (eg, command not found, permission denied).

  • Returning an exit value other than zero (but see below).

  • Being killed by a signal.

  • Being passed tainted data (in taint mode).

Exit values

Traditionally, system commands return a zero status for success and a non-zero status for failure. IPC::System::Simple will default to throwing an exception if a non-zero exit value is returned.

You may specify a range of values which are considered acceptable exit values by passing an array reference as the first argument. The special constant EXIT_ANY can be used to allow any exit value to be returned.

use IPC::System::Simple qw(run system capture EXIT_ANY); run( [0..5], “cat *.txt”); # Exit values 0-5 are OK system( [0..5], “cat *.txt”); # This works the same way my @lines = capture( EXIT_ANY, “cat *.txt”); # Any exit is fine.

The run and replacement system subroutines returns the exit value of the process:

my $exit_value = run( [0..5], “cat *.txt”); # OR: my $exit_value = system( [0..5] “cat *.txt”); print “Program exited with value $exit_value “;

$EXITVAL

The exit value of any command executed by IPC::System::Simple can always be retrieved from the $IPC::System::Simple::EXITVAL variable:

This is particularly useful when inspecting results from capture, which returns the captured text from the command.

use IPC::System::Simple qw(capture $EXITVAL EXIT_ANY); my @enemies_defeated = capture(EXIT_ANY, “defeat_evil”, “/dev/mordor”); print “Program exited with value $EXITVAL “;

$EXITVAL will be set to -1 if the command did not exit normally (eg, being terminated by a signal) or did not start. In this situation an exception will also be thrown.

WINDOWS-SPECIFIC NOTES

The run subroutine make available the full 32-bit exit value on Win32 systems. This has been true since IPC::System::Simple v0.06 when called with multiple arguments, and since v1.25 when called with a single argument. This is different from the previous versions of IPC::System::Simple and from Perl’s in-build system() function, which can only handle 8-bit return values.

The capture subroutine always returns the 32-bit exit value under Windows. The capture subroutine also never uses the shell, even when passed a single argument.

The run subroutine always uses a shell when passed a single argument. On NT systems, it uses cmd.exe in the system root, and on non-NT systems it uses command.com in the system root.

As of IPC::System::Simple v1.25, the runx and capturex subroutines, as well as multiple-argument calls to the run and capture subroutines, have their arguments properly quoted, so that arugments with spaces and the like work properly. Unfortunately, this breaks any attempt to invoke the shell itself. If you really need to execute cmd.exe or command.com, use the single-argument form. For single-argument calls to run and capture, the argument must be properly shell-quoted in advance of the call.

Versions of IPC::System::Simple before v0.09 would not search the PATH environment variable when the multi-argument form of run() was called. Versions from v0.09 onwards correctly search the path provided the command is provided including the extension (eg, notepad.exe rather than just notepad, or gvim.bat rather than just gvim). If no extension is provided, .exe is assumed.

Signals are not supported on Windows systems. Sending a signal to a Windows process will usually cause it to exit with the signal number used.

DIAGNOSTICS

“%s” failed to start: “%s”
The command specified did not even start. It may not exist, or you may not have permission to use it. The reason it could not start (as determined from $!) will be provided.

“%s” unexpectedly returned exit value %d
The command ran successfully, but returned an exit value we did not expect. The value returned is reported.

“%s” died to signal “%s” (%d) %s
The command was killed by a signal. The name of the signal will be reported, or UNKNOWN if it cannot be determined. The signal number is always reported. If we detected that the process dumped core, then the string and dumped core is appended.

IPC::System::Simple::%s called with no arguments
You attempted to call run or capture but did not provide any arguments at all. At the very lease you need to supply a command to run.

IPC::System::Simple::%s called with no command
You called run or capture with a list of acceptable exit values, but no actual command.

IPC::System::Simple::%s called with tainted argument “%s”
You called run or capture with tainted (untrusted) arguments, which is almost certainly a bad idea. To untaint your arguments you’ll need to pass your data through a regular expression and use the resulting match variables. See Laundering and Detecting Tainted Data in perlsec for more information.

IPC::System::Simple::%s called with tainted environment $ENV{%s}
You called run or capture but part of your environment was tainted (untrusted). You should either delete the named environment variable before calling run, or set it to an untainted value (usually one set inside your program). See Cleaning Up Your Path in perlsec for more information.

Error in IPC::System::Simple plumbing: “%s” - “%s”
Implementing the capture command involves dark and terrible magicks involving pipes, and one of them has sprung a leak. This could be due to a lack of file descriptors, although there are other possibilities. If you are able to reproduce this error, you are encouraged to submit a bug report according to the Reporting bugs section below.

Internal error in IPC::System::Simple: “%s”
You’ve found a bug in IPC::System::Simple. Please check to see if an updated version of IPC::System::Simple is available. If not, please file a bug report according to the Reporting bugs section below.

IPC::System::Simple::%s called with undefined command
You’ve passed the undefined value as a command to be executed. While this is a very Zen-like action, it’s not supported by Perl’s current implementation.

DEPENDENCIES

This module depends upon Win32::Process when used on Win32 system. Win32::Process is bundled as a core module in ActivePerl 5.6 and above.

There are no non-core dependencies on non-Win32 systems.

COMPARISON TO OTHER APIs

Perl provides a range of in-built functions for handling external commands, and CPAN provides even more. The IPC::System::Simple differentiates itself from other options by providing:

Extremely detailed diagnostics
The diagnostics produced by IPC::System::Simple are designed to provide as much information as possible. Rather than requiring the developer to inspect $?, IPC::System::Simple does the hard work for you. If an odd exit status is provided, you’re informed of what it is. If a signal kills your process, you are informed of both its name and number. If tainted data or environment prevents your command from running, you are informed of exactly which data or environmental variable is tainted.

Exceptions on failure
IPC::System::Simple takes an aggressive approach to error handling. Rather than allow commands to fail silently, exceptions are thrown when unexpected results are seen. This allows for easy development using a try/catch style, and avoids the possibility of accidentally continuing after a failed command.

Easy access to exit status
The run, system and capture commands all set $EXITVAL, making it easy to determine the exit status of a command. Additionally, the system and run interfaces return the exit status.

Consistent interfaces
When called with multiple arguments, the run, system and capture interfaces never invoke the shell. This differs from the in-built Perl system command which may invoke the shell under Windows when called with multiple arguments. It differs from the in-built Perl backticks operator which always invokes the shell.

BUGS

When system is exported, the exotic form system { $cmd } @args is not supported. Attemping to use the exotic form is a syntax error. This affects the calling package only. Use CORE::system if you need it, or consider using the autodie module to replace system with lexical scope.

Core dumps are only checked for when a process dies due to a signal. It is not believed there are any systems where processes can dump core without dying to a signal.

WIFSTOPPED status is not checked, as perl never spawns processes with the WUNTRACED option.

Signals are not supported under Win32 systems, since they don’t work at all like Unix signals. Win32 signals cause commands to exit with a given exit value, which this modules does capture.

Reporting bugs

Before reporting a bug, please check to ensure you are using the most recent version of IPC::System::Simple. Your problem may have already been fixed in a new release.

You can find the IPC::System::Simple bug-tracker at <http://rt.cpan.org/Public/Dist/Display.html?Name=IPC-System-Simple> . Please check to see if your bug has already been reported; if in doubt, report yours anyway.

Submitting a patch and/or failing test case will greatly expedite the fixing of bugs.

FEEDBACK

If you find this module useful, please consider rating it on the CPAN Ratings service at <http://cpanratings.perl.org/rate/?distribution=IPC-System-Simple> .

The module author loves to hear how IPC::System::Simple has made your life better (or worse). Feedback can be sent to <[email protected]>.

SEE ALSO

autodie uses IPC::System::Simple to provide succeed-or-die replacements to system (and other built-ins) with lexical scope.

POSIX, IPC::Run::Simple, perlipc, perlport, IPC::Run, IPC::Run3, Win32::Process

AUTHOR

Paul Fenwick <[email protected]>

COPYRIGHT AND LICENSE

Copyright (C) 2006-2008 by Paul Fenwick

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

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

610 - Linux cli command LIST_FIRST

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LIST_FIRST and provides detailed information about the command LIST_FIRST, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LIST_FIRST.

NAME 🖥️ LIST_FIRST 🖥️

implementation of a doubly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
LIST_ENTRY(TYPE);
LIST_HEAD(HEADNAME, TYPE);
LIST_HEAD LIST_HEAD_INITIALIZER(LIST_HEAD head);
void LIST_INIT(LIST_HEAD *head);
int LIST_EMPTY(LIST_HEAD *head);
void LIST_INSERT_HEAD(LIST_HEAD *head,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
struct TYPE *LIST_FIRST(LIST_HEAD *head);
struct TYPE *LIST_NEXT(struct TYPE *elm, LIST_ENTRY NAME);
LIST_FOREACH(struct TYPE *var, LIST_HEAD *head, LIST_ENTRY NAME);
void LIST_REMOVE(struct TYPE *elm, LIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type LIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro LIST_HEAD().

Creation

A list is headed by a structure defined by the LIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are doubly linked so that an arbitrary element can be removed without traversing the list. New elements can be added to the list after an existing element, before an existing element, or at the head of the list. A LIST_HEAD structure is declared as follows:

LIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

LIST_ENTRY() declares a structure that connects the elements in the list.

LIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

LIST_INIT() initializes the list referenced by head.

LIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

LIST_INSERT_HEAD() inserts the new element elm at the head of the list.

LIST_INSERT_BEFORE() inserts the new element elm before the element listelm.

LIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

LIST_FIRST() returns the first element in the list, or NULL if the list is empty.

LIST_NEXT() returns the next element in the list, or NULL if this is the last.

LIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

LIST_REMOVE() removes the element elm from the list.

RETURN VALUE

LIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

LIST_FIRST(), and LIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

LIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

LIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. LIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    LIST_ENTRY(entry) entries;              /* List */
};
LIST_HEAD(listhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct listhead head;                   /* List head */
    int i;
    LIST_INIT(&head);                       /* Initialize the list */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    LIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    LIST_INSERT_AFTER(n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    LIST_INSERT_BEFORE(n2, n3, entries);
    i = 0;                                  /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        np->data = i++;
    LIST_REMOVE(n2, entries);               /* Deletion */
    free(n2);
                                            /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* List deletion */ n1 = LIST_FIRST(&head); while (n1 != NULL) { n2 = LIST_NEXT(n1, entries); free(n1); n1 = n2; } LIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

611 - Linux cli command XtScreen

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtScreen and provides detailed information about the command XtScreen, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtScreen.

NAME 🖥️ XtScreen 🖥️

obtain window information about a widget

SYNTAX

#include <X11/Intrinsic.h>

Display *XtDisplay(Widget w);

Display *XtDisplayOfObject(Widget object);

Screen *XtScreen(Widget w);

Screen *XtScreenOfObject(Widget object);

Window XtWindow(Widget w);

Window XtWindowOfObject(Widget object);

ARGUMENTS

  1. Specifies the widget.

object
Specifies the widget.

DESCRIPTION

XtDisplay returns the display pointer for the specified widget.

XtDisplayOfObject returns the display pointer for the specified object.

XtScreen returns the screen pointer for the specified widget.

XtScreenOfObject returns the screen pointer for the specified object.

XtWindow returns the window of the specified widget.

XtWindowOfObject returns the window of the specified object.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

612 - Linux cli command Image_ExifTool_Parrotpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Parrotpm and provides detailed information about the command Image_ExifTool_Parrotpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Parrotpm.

NAME 🖥️ Image_ExifTool_Parrotpm 🖥️

Read timed metadata from Parrot drone videos

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret timed metadata from the ‘mett’ frame found in Parrot drone MP4 videos.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<https://developer.parrot.com/docs/pdraw/metadata.html>

SEE ALSO

“Parrot Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

613 - Linux cli command S_ISDIR

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command S_ISDIR and provides detailed information about the command S_ISDIR, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the S_ISDIR.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

614 - Linux cli command XtSetLanguageProc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtSetLanguageProc and provides detailed information about the command XtSetLanguageProc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtSetLanguageProc.

NAME 🖥️ XtSetLanguageProc 🖥️

set the language procedure

SYNTAX

#include <X11/Intrinsic.h>

XtLanguageProc XtSetLanguageProc(XtAppContext app_context, XtLanguageProc proc, XtPointer client_data);

ARGUMENTS

app_context
Specifies the application context in which the language procedure is to be used, or NULL.

proc
Specifies the language procedure, or NULL.

client_data
Specifies additional client data to be passed to the language procedure when it is called.

DESCRIPTION

XtSetLanguageProc sets the language procedure that will be called from XtDisplayInitialize for all subsequent Displays initialized in the specified application context. If app_context is NULL, the specified language procedure is registered in all application contexts created by the calling process, including any future application contexts that may be created. If proc is NULL a default language procedure is registered. XtSetLanguageProc returns the previously registered language procedure. If a language procedure has not yet been registered, the return value is unspecified but if this return value is used in a subsequent call to XtSetLanguageProc, it will cause the default language procedure to be registered.

The default language procedure does the following:

  • Sets the locale according to the environment. On ANSI C-based systems this is done by calling setlocale( LC_ALL, language ). If an error is encountered a warning message is issued with XtWarning.

  • Calls XSupportsLocale to verify that the current locale is supported. If the locale is not supported, a warning message is issued with XtWarning and the locale is set to C.

  • Calls XSetLocaleModifiers specifying the empty string.

  • Returns the value of the current locale. On ANSI C-based systems this is the return value from a final call to setlocale( LC_ALL, NULL ).

A client wishing to use this mechanism to establish locale can do so by calling XtSetLanguageProc prior to XtDisplayInitialize.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

615 - Linux cli command hash

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command hash and provides detailed information about the command hash, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the hash.

NAME 🖥️ hash 🖥️

hash database access method

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <db.h>

DESCRIPTION

Note well: This page documents interfaces provided up until glibc 2.1. Since glibc 2.2, glibc no longer provides these interfaces. Probably, you are looking for the APIs provided by the libdb library instead.

The routine dbopen(3) is the library interface to database files. One of the supported file formats is hash files. The general description of the database access methods is in dbopen(3), this manual page describes only the hash-specific information.

The hash data structure is an extensible, dynamic hashing scheme.

The access-method-specific data structure provided to dbopen(3) is defined in the <db.h> include file as follows:

typedef struct {
    unsigned int       bsize;
    unsigned int       ffactor;
    unsigned int       nelem;
    unsigned int       cachesize;
    uint32_t         (*hash)(const void *, size_t);
    int         lorder;
} HASHINFO;

The elements of this structure are as follows:

bsize
defines the hash table bucket size, and is, by default, 256 bytes. It may be preferable to increase the page size for disk-resident tables and tables with large data items.

ffactor
indicates a desired density within the hash table. It is an approximation of the number of keys allowed to accumulate in any one bucket, determining when the hash table grows or shrinks. The default value is 8.

nelem
is an estimate of the final size of the hash table. If not set or set too low, hash tables will expand gracefully as keys are entered, although a slight performance degradation may be noticed. The default value is 1.

cachesize
is the suggested maximum size, in bytes, of the memory cache. This value is only advisory, and the access method will allocate more memory rather than fail.

hash
is a user-defined hash function. Since no hash function performs equally well on all possible data, the user may find that the built-in hash function does poorly on a particular data set. A user-specified hash functions must take two arguments (a pointer to a byte string and a length) and return a 32-bit quantity to be used as the hash value.

lorder
is the byte order for integers in the stored database metadata. The number should represent the order as an integer; for example, big endian order would be the number 4,321. If lorder is 0 (no order is specified), the current host order is used. If the file already exists, the specified value is ignored and the value specified when the tree was created is used.

If the file already exists (and the O_TRUNC flag is not specified), the values specified for bsize, ffactor, lorder, and nelem are ignored and the values specified when the tree was created are used.

If a hash function is specified, hash_open attempts to determine if the hash function specified is the same as the one with which the database was created, and fails if it is not.

Backward-compatible interfaces to the routines described in dbm(3), and ndbm(3) are provided, however these interfaces are not compatible with previous file formats.

ERRORS

The hash access method routines may fail and set errno for any of the errors specified for the library routine dbopen(3).

BUGS

Only big and little endian byte order are supported.

SEE ALSO

btree(3), dbopen(3), mpool(3), recno(3)

Dynamic Hash Tables, Per-Ake Larson, Communications of the ACM, April 1988.

A New Hash Package for UNIX, Margo Seltzer, USENIX Proceedings, Winter 1991.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

616 - Linux cli command memccpy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command memccpy and provides detailed information about the command memccpy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the memccpy.

NAME 🖥️ memccpy 🖥️

copy memory area

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
void *memccpy(void dest[restrict .n], const void src[restrict .n],
 int c, size_t n);

DESCRIPTION

The memccpy() function copies no more than n bytes from memory area src to memory area dest, stopping when the character c is found.

If the memory areas overlap, the results are undefined.

RETURN VALUE

The memccpy() function returns a pointer to the next character in dest after c, or NULL if c was not found in the first n characters of src.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

memccpy()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4, 4.3BSD.

SEE ALSO

bcopy(3), bstring(3), memcpy(3), memmove(3), strcpy(3), strncpy(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

617 - Linux cli command strpbrk

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strpbrk and provides detailed information about the command strpbrk, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strpbrk.

NAME 🖥️ strpbrk 🖥️

search a string for any of a set of bytes

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strpbrk(const char *s, const char *accept);

DESCRIPTION

The strpbrk() function locates the first occurrence in the string s of any of the bytes in the string accept.

RETURN VALUE

The strpbrk() function returns a pointer to the byte in s that matches one of the bytes in accept, or NULL if no such byte is found.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strpbrk()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89, SVr4, 4.3BSD.

SEE ALSO

memchr(3), strchr(3), string(3), strsep(3), strspn(3), strstr(3), strtok(3), wcspbrk(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

618 - Linux cli command XtGetKeyboardFocusWidget

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGetKeyboardFocusWidget and provides detailed information about the command XtGetKeyboardFocusWidget, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGetKeyboardFocusWidget.

NAME 🖥️ XtGetKeyboardFocusWidget 🖥️

extension event handling

SYNTAX

#include <X11/Intrinsic.h>

Widget XtGetKeyboardFocusWidget(Widget widget);

ARGUMENTS

widget
Specifies the widget for this event handler. Must be of class Core or any subclass thereof.

DESCRIPTION

XtGetKeyboardFocusWidget function returns the widget that would be the end result of keyboard event forwarding for a keyboard event for the specified widget.

SEE ALSO

XtInsertEventTypeHandler(3), XtRemoveEventTypeHandler(3), XtRegisterExtensionSelector(3), XtSetEventDispatcher(3), XtDispatchEventToWidget(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

619 - Linux cli command zip_unchange_all

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_unchange_all and provides detailed information about the command zip_unchange_all, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_unchange_all.

libzip (-lzip)

All changes to files and global information in

are reverted.

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error code in

is set to indicate the error.

was added in libzip 0.6.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

620 - Linux cli command __ppc_get_timebase

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __ppc_get_timebase and provides detailed information about the command __ppc_get_timebase, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __ppc_get_timebase.

NAME 🖥️ __ppc_get_timebase 🖥️

get the current value of the Time Base Register on Power architecture and its frequency.

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/platform/ppc.h>
uint64_t __ppc_get_timebase(void);
uint64_t __ppc_get_timebase_freq(void);

DESCRIPTION

__ppc_get_timebase() reads the current value of the Time Base Register and returns its value, while __ppc_get_timebase_freq() returns the frequency in which the Time Base Register is updated.

The Time Base Register is a 64-bit register provided by Power Architecture processors. It stores a monotonically incremented value that is updated at a system-dependent frequency that may be different from the processor frequency.

RETURN VALUE

__ppc_get_timebase() returns a 64-bit unsigned integer that represents the current value of the Time Base Register.

__ppc_get_timebase_freq() returns a 64-bit unsigned integer that represents the frequency at which the Time Base Register is updated.

STANDARDS

GNU.

HISTORY

__ppc_get_timebase()
glibc 2.16.

__ppc_get_timebase_freq()
glibc 2.17.

EXAMPLES

The following program will calculate the time, in microseconds, spent between two calls to __ppc_get_timebase().

Program source

#include <inttypes.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/platform/ppc.h>
/* Maximum value of the Time Base Register: 2^60 - 1.
   Source: POWER ISA.  */
#define MAX_TB 0xFFFFFFFFFFFFFFF
int
main(void)
{
    uint64_t tb1, tb2, diff;
    uint64_t freq;
    freq = __ppc_get_timebase_freq();
    printf("Time Base frequency = %"PRIu64" Hz

“, freq); tb1 = __ppc_get_timebase(); // Do some stuff… tb2 = __ppc_get_timebase(); if (tb2 > tb1) { diff = tb2 - tb1; } else { /* Treat Time Base Register overflow. */ diff = (MAX_TB - tb2) + tb1; } printf(“Elapsed time = %1.2f usecs “, (double) diff * 1000000 / freq); exit(EXIT_SUCCESS); }

SEE ALSO

time(2), usleep(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

621 - Linux cli command XML_SAX2Perlpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_SAX2Perlpm and provides detailed information about the command XML_SAX2Perlpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_SAX2Perlpm.

NAME 🖥️ XML_SAX2Perlpm 🖥️

  • translate Java/CORBA style SAX methods to Perl methods

SYNOPSIS

use XML::SAX2Perl; $sax2perl = XML::SAX2Perl(Handler => $my_handler); $sax->setDocumentHandler($sax2perl);

DESCRIPTION

XML::SAX2Perl is a SAX filter that translates Java/CORBA style SAX methods to Perl style method calls. This man page summarizes the specific options, handlers, and properties supported by XML::SAX2Perl; please refer to the Perl SAX standard XML::SAX for general usage information.

METHODS

new
Creates a new parser object. Default options for parsing, described below, are passed as key-value pairs or as a single hash. Options may be changed directly in the parser object unless stated otherwise. Options passed to `parse()’ override the default options in the parser object for the duration of the parse.

parse
Parses a document. Options, described below, are passed as key-value pairs or as a single hash. Options passed to `parse()’ override default options in the parser object.

location
Returns the location as a hash: ColumnNumber The column number of the parse. LineNumber The line number of the parse. PublicId A string containing the public identifier, or undef if none is available. SystemId A string containing the system identifier, or undef if none is available.

SAX DocumentHandler Methods
The following methods are DocumentHandler methods that the SAX 1.0 parser will call and XML::SAX2Perl will translate to Perl SAX methods calls. See SAX 1.0 for details. setDocumentLocator(locator) startDocument() endDocument() startElement(name, atts) endElement(name) characters(ch, start, length) ignorableWhitespace(ch, start, length) processingInstruction(target, data)

OPTIONS

The following options are supported by XML::SAX2Perl:

Handler default handler to receive events DocumentHandler handler to receive document events DTDHandler handler to receive DTD events ErrorHandler handler to receive error events EntityResolver handler to resolve entities Locale locale to provide localisation for errors Source hash containing the input source for parsing

If no handlers are provided then all events will be silently ignored, except for `fatal_error()’ which will cause a `die()’ to be called after calling `end_document()'.

If a single string argument is passed to the `parse()’ method, it is treated as if a `Source’ option was given with a `String’ parameter.

The `Source’ hash may contain the following parameters:

ByteStream The raw byte stream (file handle) containing the document. String A string containing the document. SystemId The system identifier (URI) of the document. PublicId The public identifier. Encoding A string describing the character encoding.

If more than one of `ByteStream’, `String’, or `SystemId’, then preference is given first to `ByteStream’, then `String’, then `SystemId'.

HANDLERS

The following handlers and properties are supported by XML::SAX2Perl:

DocumentHandler methods

start_document
Receive notification of the beginning of a document. Locator An object that can return the location of any SAX document event.

end_document
Receive notification of the end of a document. No properties defined.

start_element
Receive notification of the beginning of an element. Name The element type name. Attributes Attributes attached to the element, if any. ALPHA WARNING: The `Attributes’ value is not translated from the SAX 1.0 value, so it will contain an AttributeList object.

end_element
Receive notification of the end of an element. Name The element type name.

characters
Receive notification of character data. Data The characters from the XML document.

ignorable_whitespace
Receive notification of ignorable whitespace in element content. Data The characters from the XML document.

processing_instruction
Receive notification of a processing instruction. Target The processing instruction target. Data The processing instruction data, if any.

AUTHOR

Ken MacLeod <[email protected]>

SEE ALSO

perl (1), XML::Perl2SAX (3).

Extensible Markup Language (XML) <http://www.w3c.org/XML/> Simple API for XML (SAX) <http://www.megginson.com/SAX/>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

622 - Linux cli command UUIDpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command UUIDpm and provides detailed information about the command UUIDpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the UUIDpm.

NAME 🖥️ UUIDpm 🖥️

Universally Unique Identifier library for Perl

SYNOPSIS

# SIMPLE use UUID qw(uuid); # see EXPORTS my $str = uuid(); # generate version 4 UUID string # SPECIFIC $str = uuid1(); # new version 1 UUID string $str = uuid4(); # new version 4 UUID string $str = uuid6(); # new version 6 UUID string $str = uuid7(); # new version 7 UUID string # NAMESPACE is dns, url, oid, or x500; case-insensitive. $str = uuid3(dns => www.example.com); $str = uuid5(url => https://www.example.com/foo.html); UUID::generate_v1($bin); # new version 1 binary UUID UUID::generate_v4($bin); # new version 4 binary UUID UUID::generate_v6($bin); # new version 6 binary UUID UUID::generate_v7($bin); # new version 7 binary UUID UUID::generate_v3($bin, dns => www.example.com); UUID::generate_v5($bin, url => https://www.example.com/foo.txt); UUID::generate($bin); # alias for generate_v1() UUID::generate_time($bin); # alias for generate_v1() UUID::generate_random($bin); # alias for generate_v4() UUID::unparse($bin, $str); # stringify $bin; prefer lowercase UUID::unparse_lower($bin, $str); # force lowercase stringify UUID::unparse_upper($bin, $str); # force uppercase stringify UUID::parse($str, $bin); # map string to binary UUID UUID::compare($bin1, $bin2); # compare binary UUIDs UUID::copy($dst, $src); # copy binary UUID from $src to $dst UUID::clear($bin); # set binary UUID to NULL UUID::is_null($bin); # compare binary UUID to NULL UUID::time($bin); # return UUID time UUID::type($bin); # return UUID type UUID::variant($bin); # return UUID variant UUID::version($bin); # return UUID version

DESCRIPTION

The UUID library is used to generate unique identifiers for objects that may be accessible beyond the local system. For instance, they could be used to generate unique HTTP cookies across multiple web servers without communication between the servers, and without fear of a name clash.

The generated UUIDs can be reasonably expected to be unique within a system, and unique across all systems, and are compatible with those created by the Open Software Foundation (OSF) Distributed Computing Environment (DCE).

All generated UUIDs are either version 1, 3, 4, 5, 6, or version 7. And all are variant 1, meaning compliant with the OSF DCE standard as described in RFC4122.

Versions 6 and 7 are not standardized. They are presented here as proposed in RFC4122bis, version 14, and may change in the future. RFC4122bis is noted to replace RFC4122, if approved.

FUNCTIONS

Most of the UUID functions expose the historically underlying libuuid C interface rather directly. That is, many return their values in their parameters and nothing else.

Not very Perlish, but it’s been like that for a long time so not likely to change any time soon.

All take or return UUIDs in either binary or string format. The string format resembles the following:

21b081a3-de83-4480-a14f-e89a1dcf8f0f

Or, in terms of printf (3) format:

“%08x-%04x-%04x-%04x-%012x”

The binary form is simply a packed 16 byte binary value.

clear( $uuid )

Sets binary $uuid equal to the value of the NULL UUID.

compare( $uuid1**,** $uuid2 )

Compares two binary UUIDs.

Returns an integer less than, equal to, or greater than zero if $uuid1 is less than, equal to, or greater than $uuid2.

If one is defined and the other not, the defined value is deemed the larger.

If either operand is not a binary UUID, falls back to a simple string comparison returning similar values.

copy( $dst**,** $src )

Copies the binary $src UUID to $dst.

If $src isn’t a UUID, $dst is set to the NULL UUID.

generate( $uuid )

Alias for generate_v4().

Prior to version 0.33, this function provided either a binary version 4 UUID or fell back to version 1 in some cases. This is no longer the case. The fallback feature was removed with the addition of an onboard crypto-strength number generator.

generate_random( $uuid )

Alias for generate_v4().

generate_time( $uuid )

Alias for generate_v1().

generate_v1( $uuid )

Generates a new version 1 binary UUID using the current time and the local ethernet MAC address, if available.

If the MAC address is not available at startup, or a randomized address is requested (see :mac in EXPORTS), a random address is used. The multicast bit of this address is set to avoid conflict with addresses returned from network cards.

generate_v3( $uuid, NAMESPACE => NAME )

Generate a new version 3 binary UUID using the given namespace and name hashed through the MD5 algorithm.

Namespace is one of “dns”, “url”, “oid”, or “x500”, and case-insensitive. It is used to select the namespace UUID to hash with the name.

Name should be an entity from the given namespace, but can really be any text.

generate_v4( $uuid )

Generates a new version 4 binary UUID using mostly random data. There are 6 bits used for the UUID format, leaving 122 bits for randomness.

generate_v5( $uuid, NAMESPACE => NAME )

Generate a new version 5 binary UUID using the given namespace and name hashed through the SHA1 algorithm.

Namespace is one of “dns”, “url”, “oid”, or “x500”, and case-insensitive. It is used to select the namespace UUID to hash with the name.

Name should be an entity from the given namespace, but can really be any text.

generate_v6( $uuid )

Generates a new version 6 binary UUID using the current time and the local ethernet MAC address, if available.

If the MAC address is not available at startup, or a randomized address is requested (see :mac in EXPORTS), a random address is used. The multicast bit of this address is set to avoid conflict with addresses returned from network cards.

Version 6 is the same as version 1, with reversed time fields to make it more database friendly.

generate_v7( $uuid )

Generates a new version 7 binary UUID using the current time and random data. There are 6 bits used for the UUID format and 48 bits for timestamp, leaving 74 bits for randomness.

Version 7 is the same as version 6, in that it uses reversed timestamp fields, but also uses a Unix epoch time base instead of Gregorian.

is_null( $uuid )

Compares the value of $uuid to the NULL UUID.

Returns 1 if NULL, and 0 otherwise.

parse( $string**,** $uuid )

Converts the string format UUID in $string to binary and returns in $uuid. The previous content of $uuid, if any, is lost.

Returns 0 on success and -1 on failure. Additionally on failure, the content of $uuid is unchanged.

time( $uuid )

Returns the time element of a binary UUID in seconds since the epoch, the same as Perl’s time function.

Keep in mind this only works for version 1, 6, and version 7 UUIDs. Values returned from other versions are always 0.

type( $uuid )

Alias for version().

unparse( $uuid**,** $string )

Alias for unparse_lower().

Prior to version 0.32, casing of the return value was system-dependent. Later versions are lowercase, per RFC4122.

unparse_lower( $uuid**,** $string )

Converts the binary UUID in $uuid to string format and returns in $string. The previous content of $string, if any, is lost.

unparse_upper( $uuid**,** $string )

Same as unparse_lower() but $string is forced to upper case.

uuid()

Alias for uuid4().

uuid0()

Returns a new string format NULL UUID.

uuid1()

Returns a new string format version 1 UUID. Functionally the equivalent of calling generate_v1() then unparse(), but throwing away the intermediate binary UUID.

uuid3(NAMESPACE = NAME)>

Same as uuid1() but version 3. See generate_v3().

uuid4()

Same as uuid1() but version 4.

uuid5(NAMESPACE = NAME)>

Same as uuid1() but version 5. See generate_v5().

uuid6()

Same as uuid1() but version 6.

uuid7()

Same as uuid1() but version 7.

variant( $uuid )

Returns the variant of binary $uuid.

This module only generates variant 1 UUIDs. Others may be found in the wild.

Known variants:

0 NCS 1 DCE 2 Microsoft 3 Other

version( $uuid> )

Returns the version of binary $uuid.

This module only generates version 1, 3, 4, 5, 6, and version 7 UUIDs. Others may be found in the wild.

Known versions:

v1 date/time and node address v2 date/time and node address, security version v3 namespace based, MD5 hash v4 random v5 namespace based, SHA-1 hash v6 reverse date/time and node address v7 reverse unix date/time and random v8 custom

MAINTAINING STATE

Internal state is optionally maintained for timestamped UUIDs (versions 1, 6, and 7) via a file designated by the :persist export tag. See EXPORTS for details.

The file records various internal states at the time the last UUID is generated, preventing future instances from overlapping the prior UUID sequence. This allows the sequence to absolutely survive reboots and, more importantly, backwards resetting of system time.

If :persist is not used, time resets will still be detected while the module is loaded and handled by incrementing the UUID clock_seq field. The clock_seq field is randomly initialized in this case anyway, so the chance of overlap is low but still exists since clock_seq is only 14 bits wide. Using a random MAC will help (see :mac in EXPORTS), adding an additional 48 bits of randomness.

NOTE: Using :persist incurs a serious performance penalty, in excess of 95% on tested platforms. You can run make compare in the distribution directory to see how this might affect your application, but unless you need many thousands of UUIDs/sec it’s probably a non-issue.

RANDOM NUMBERS

Versions 4 and 7 UUIDs are partially filled with random numbers, as well as versions 1 and 6 when used with the :mac option.

Prior to version 0.33, UUID obtained randomness from the system’s /dev/random device, or similar interface. On some platforms it called getrandom() and on others it read directly from /dev/urandom. And of course, Win32 did something completely different.

Starting in 0.33, UUID generates random numbers itself using the ChaCha20 algorithm which is considered crypto-strength in most circles. This is the same algo used as the basis for many modern kernel RNGs, albeit without the same entropy gathering ability.

To compensate, UUID mixes the output from ChaCha with output from another RNG, Xoshiro. The idea is that by mixing the two, the true output from either is effectively hidden, making discovery of either’s key much more unlikely than it already is. And without the keys, you can’t predict the future.

Well, that’s the theory anyway.

NAMESPACES

Versions 3 and 5 generate UUIDs within namespaces. What this really means is that the NAME value is concatenated with a dedicated NAMESPACE UUID before hashing.

Available namespaces and UUIDs:

dns 6ba7b810-9dad-11d1-80b4-00c04fd430c8 url 6ba7b811-9dad-11d1-80b4-00c04fd430c8 oid 6ba7b812-9dad-11d1-80b4-00c04fd430c8 x500 6ba7b814-9dad-11d1-80b4-00c04fd430c8

For example, if you need to create some UUIDs within your own “questions” and “answers” namespaces using SHA1:

$ns_base = uuid5( dns => www.example.com ); $ns_questions = uuid5( $ns_base, questions ); $ns_answers = uuid5( $ns_base, answers ); for $topic ( next_qa_aref() ) { ($q, $a) = @$topic; $uuid_question = uuid5( $ns_questions, $q ); $uuid_answer = uuid5( $ns_answers, $a ); … }

This way, you can deterministically convert existing (and likely colliding) namespaces over to one UUID namespace, which is often useful when merging datasets.

You also don’t need to publish your base and namespace UUIDs. Anyone using the same logic can generate the same question and answer UUIDs.

EXPORTS

None by default. All functions may be imported in the usual manner, either individually or all at once using the :all tag.

Beware that importing :all clobbers Perl’s time(), not to mention a few other commonly used subs, like copy() from File::Copy.

:mac=mode

The MAC address used for MAC-inclusive UUIDS (versions 1 and 6) is forced to always be random in one of two modes:

random The MAC address is generated once at startup and used through the lifetime of the process. This is the default if a real MAC cannot be found. unique A new MAC address is generated for each new UUID. It is not guaranteed to be unique beyond the probability of randomness.

:persist=path/to/state.txt

Path to timestamp state maintenance file. (See MAINTAINING STATE.) The path may be either relative or absolute.

If the file does not exist, it will be created provided the path exists and the user has permission.

If the file cannot be opened, cannot be created, or is a symlink, UUID will ignore it. No state will be maintained.

WARNING: Do not :persist in a public directory. See CVE-2013-4184. UUID attempts to avoid this, but nothing is foolproof. Only YOU can prevent symlink attacks!

:defer[=N]

Persistence of state is deferred N seconds when generating time-based UUIDs. More precisely, state is only saved every N seconds. If UUIDs are generated more often, those within the N second window will not save state.

Defer values greater than some platform-specific interval greatly reduce the performance penalty introduced through persistence. While the default, :defer=0.001, is probably fine, you can run make persist in the distribution directory to see the effect of various values.

THREAD SAFETY

This module is believed to be thread safe.

UUID LIBRARY

Releases prior to UUID-0.32 required libuuid or similar be installed first. This is no longer the case. Version 0.33 bundled the e2fsprogs UUID code, and version 0.34 removed it altogether.

BENCHMARKS

There are a few benchmarks in the distribution ubin directory which can be run either standalone or through the Makefile.

make compare

Runs all three of the following tests.

make speeds

Runs ubin/cmp_speeds.pl to compare the speeds of various UUID versions.

make styles

Runs ubin/cmp_styles.pl to compare different UUID calling styles.

make persist

Runs ubin/cmp_persist.pl to compare different deferral values for persistent state.

COPYRIGHT AND LICENSE

This software is Copyright (c) 2014-2024 by Rick Myers.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)

Details of this license can be found within the ‘LICENSE’ text file.

AUTHOR

Current maintainer:

Rick Myers <[email protected]>.

Authors and/or previous maintainers:

Lukas Zapletal <[email protected]> Joseph N. Hall <[email protected]> Colin Faber <[email protected]> Peter J. Braam <[email protected]>

CONTRIBUTORS

David E. Wheeler

William Faulk

gregor herrmann

Slaven Rezic

twata

Christopher Rasch-Olsen Raa

Petr Pisar

SEE ALSO

RFC4122 - <https://www.rfc-editor.org/rfc/rfc4122>

RFC4122bis - <https://www.ietf.org/archive/id/draft-ietf-uuidrev-rfc4122bis-14.html>

perl (1).

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

623 - Linux cli command xcrypt

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xcrypt and provides detailed information about the command xcrypt, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xcrypt.

NAME 🖥️ xcrypt 🖥️

RFS password encryption

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <rpc/des_crypt.h>
void passwd2des(char *passwd, char *key);
int xencrypt(char *secret, char *passwd);
int xdecrypt(char *secret, char *passwd);

DESCRIPTION

WARNING: Do not use these functions in new code. They do not achieve any type of acceptable cryptographic security guarantees.

The function passwd2des() takes a character string passwd of arbitrary length and fills a character array key of length 8. The array key is suitable for use as DES key. It has odd parity set in bit 0 of each byte. Both other functions described here use this function to turn their argument passwd into a DES key.

The xencrypt() function takes the ASCII character string secret given in hex, which must have a length that is a multiple of 16, encrypts it using the DES key derived from passwd by passwd2des(), and outputs the result again in secret as a hex string of the same length.

The xdecrypt() function performs the converse operation.

RETURN VALUE

The functions xencrypt() and xdecrypt() return 1 on success and 0 on error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

passwd2des(), xencrypt(), xdecrypt()

Thread safetyMT-Safe

VERSIONS

These functions are available since glibc 2.1.

BUGS

The prototypes are missing from the abovementioned include file.

SEE ALSO

cbc_crypt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

624 - Linux cli command initgroups

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command initgroups and provides detailed information about the command initgroups, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the initgroups.

NAME 🖥️ initgroups 🖥️

initialize the supplementary group access list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <grp.h>
int initgroups(const char *user, gid_t group);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

initgroups():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The initgroups() function initializes the group access list by reading the group database /etc/group and using all groups of which user is a member. The additional group group is also added to the list.

The user argument must be non-NULL.

RETURN VALUE

The initgroups() function returns 0 on success. On error, -1 is returned, and errno is set to indicate the error.

ERRORS

ENOMEM
Insufficient memory to allocate group information structure.

EPERM
The calling process has insufficient privilege. See the underlying system call setgroups(2).

FILES

/etc/group
group database file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

initgroups()

Thread safetyMT-Safe locale

STANDARDS

None.

HISTORY

SVr4, 4.3BSD.

SEE ALSO

getgroups(2), setgroups(2), credentials(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

625 - Linux cli command zip_source_buffer_create

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_buffer_create and provides detailed information about the command zip_source_buffer_create, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_buffer_create.

libzip (-lzip)

The functions

and

create a zip source from the buffer

of size

If

is non-zero, the buffer will be freed when it is no longer needed.

must remain valid for the lifetime of the created source.

The source can be used to open a zip archive from.

Upon successful completion, the created source is returned. Otherwise,

is returned and the error code in

or

is set to indicate the error.

and

fail if:

is greater than zero and

is

Required memory could not be allocated.

and

were added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

626 - Linux cli command llrintf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command llrintf and provides detailed information about the command llrintf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the llrintf.

NAME 🖥️ llrintf 🖥️

round to nearest integer

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
long lrint(double x);
long lrintf(float x);
long lrintl(long double x);
long long llrint(double x);
long long llrintf(float x);
long long llrintl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions round their argument to the nearest integer value, using the current rounding direction (see fesetround(3)).

Note that unlike the rint(3) family of functions, the return type of these functions differs from that of their arguments.

RETURN VALUE

These functions return the rounded integer value.

If x is a NaN or an infinity, or the rounded value is too large to be stored in a long (long long in the case of the ll* functions), then a domain error occurs, and the return value is unspecified.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is a NaN or infinite, or the rounded value is too large
An invalid floating-point exception (FE_INVALID) is raised.

These functions do not set errno.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

lrint(), lrintf(), lrintl(), llrint(), llrintf(), llrintl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

ceil(3), floor(3), lround(3), nearbyint(3), rint(3), round(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

627 - Linux cli command major

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command major and provides detailed information about the command major, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the major.

NAME 🖥️ major 🖥️

manage a device number

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/sysmacros.h>
dev_t makedev(unsigned int maj, unsigned int min);
unsigned int major(dev_t dev);
unsigned int minor(dev_t dev);

DESCRIPTION

A device ID consists of two parts: a major ID, identifying the class of the device, and a minor ID, identifying a specific instance of a device in that class. A device ID is represented using the type dev_t.

Given major and minor device IDs, makedev() combines these to produce a device ID, returned as the function result. This device ID can be given to mknod(2), for example.

The major() and minor() functions perform the converse task: given a device ID, they return, respectively, the major and minor components. These macros can be useful to, for example, decompose the device IDs in the structure returned by stat(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

makedev(), major(), minor()

Thread safetyMT-Safe

VERSIONS

The BSDs expose the definitions for these macros via <sys/types.h>.

STANDARDS

None.

HISTORY

BSD, HP-UX, Solaris, AIX, Irix.

These interfaces are defined as macros. Since glibc 2.3.3, they have been aliases for three GNU-specific functions: gnu_dev_makedev(), gnu_dev_major(), and gnu_dev_minor(). The latter names are exported, but the traditional names are more portable.

Depending on the version, glibc also exposes definitions for these macros from <sys/types.h> if suitable feature test macros are defined. However, this behavior was deprecated in glibc 2.25, and since glibc 2.28, <sys/types.h> no longer provides these definitions.

SEE ALSO

mknod(2), stat(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

628 - Linux cli command pthread_once

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_once and provides detailed information about the command pthread_once, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_once.

NAME 🖥️ pthread_once 🖥️

once-only initialization

SYNOPSIS

#include <pthread.h>

pthread_once_t once_control = PTHREAD_ONCE_INIT;

int pthread_once(pthread_once_t *once_control, void (*init_routine) (void));

DESCRIPTION

The purpose of pthread_once is to ensure that a piece of initialization code is executed at most once. The once_control argument points to a static or extern variable statically initialized to PTHREAD_ONCE_INIT.

The first time pthread_once is called with a given once_control argument, it calls init_routine with no argument and changes the value of the once_control variable to record that initialization has been performed. Subsequent calls to pthread_once with the same once_control argument do nothing.

RETURN VALUE

pthread_once always returns 0.

ERRORS

None.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

629 - Linux cli command Spreadsheet_ParseExcel_Cellpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_ParseExcel_Cellpm and provides detailed information about the command Spreadsheet_ParseExcel_Cellpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_ParseExcel_Cellpm.

NAME 🖥️ Spreadsheet_ParseExcel_Cellpm 🖥️

A class for Cell data and formatting.

SYNOPSIS

See the documentation for Spreadsheet::ParseExcel.

DESCRIPTION

This module is used in conjunction with Spreadsheet::ParseExcel. See the documentation for Spreadsheet::ParseExcel.

Methods

The following Cell methods are available:

$cell->value() $cell->unformatted() $cell->get_format() $cell->type() $cell->encoding() $cell->is_merged() $cell->get_rich_text() $cell->get_hyperlink()

value()

The value() method returns the formatted value of the cell.

my $value = $cell->value();

Formatted in this sense refers to the numeric format of the cell value. For example a number such as 40177 might be formatted as 40,117, 40117.000 or even as the date 2009/12/30.

If the cell doesn’t contain a numeric format then the formatted and unformatted cell values are the same, see the unformatted() method below.

For a defined $cell the value() method will always return a value.

In the case of a cell with formatting but no numeric or string contents the method will return the empty string .

unformatted()

The unformatted() method returns the unformatted value of the cell.

my $unformatted = $cell->unformatted();

Returns the cell value without a numeric format. See the value() method above.

get_format()

The get_format() method returns the Spreadsheet::ParseExcel::Format object for the cell.

my $format = $cell->get_format();

If a user defined format hasn’t been applied to the cell then the default cell format is returned.

type()

The type() method returns the type of cell such as Text, Numeric or Date. If the type was detected as Numeric, and the Cell Format matches m{^[dmy][-\/dmy]*$}i, it will be treated as a Date type.

my $type = $cell->type();

See also Dates and Time in Excel.

encoding()

The encoding() method returns the character encoding of the cell.

my $encoding = $cell->encoding();

This method is only of interest to developers. In general Spreadsheet::ParseExcel will return all character strings in UTF-8 regardless of the encoding used by Excel.

The encoding() method returns one of the following values:

  • 0: Unknown format. This shouldn’t happen. In the default case the format should be 1.

  • 1: 8bit ASCII or single byte UTF-16. This indicates that the characters are encoded in a single byte. In Excel 95 and earlier This usually meant ASCII or an international variant. In Excel 97 it refers to a compressed UTF-16 character string where all of the high order bytes are 0 and are omitted to save space.

  • 2: UTF-16BE.

  • 3: Native encoding. In Excel 95 and earlier this encoding was used to represent multi-byte character encodings such as SJIS.

is_merged()

The is_merged() method returns true if the cell is merged.

my $is_merged = $cell->is_merged();

Returns undef if the property isn’t set.

get_rich_text()

The get_rich_text() method returns an array ref of font information about each string block in a rich, i.e. multi-format, string.

my $rich_text = $cell->get_rich_text();

The return value is an arrayref of arrayrefs in the form:

[ [ $start_position, $font_object ], …, ]

Returns undef if the property isn’t set.

If a cell contains a hyperlink, the get_hyperlink() method returns an array ref of information about it.

A cell can contain at most one hyperlink. If it does, it contains no other value.

Otherwise, it returns undef;

The array contains:

  • 0: Description (what’s displayed); undef if not present

  • 1: Link, converted to an appropriate URL - Note: Relative links are based on the input file. %REL% is used if the input file is unknown (e.g. a file handle or scalar)

  • 2: Target - target frame (or undef if none)

Dates and Time in Excel

Dates and times in Excel are represented by real numbers, for example Jan 1 2001 12:30 PM is represented by the number 36892.521.

The integer part of the number stores the number of days since the epoch and the fractional part stores the percentage of the day.

A date or time in Excel is just like any other number. The way in which it is displayed is controlled by the number format:

Number format $cell->value() $cell->unformatted() ============= ============== ============== dd/mm/yy 28/02/08 39506.5 mm/dd/yy 02/28/08 39506.5 d-m-yyyy 28-2-2008 39506.5 dd/mm/yy hh:mm 28/02/08 12:00 39506.5 d mmm yyyy 28 Feb 2008 39506.5 mmm d yyyy hh:mm AM/PM Feb 28 2008 12:00 PM 39506.5

The Spreadsheet::ParseExcel::Utility module contains a function called ExcelLocaltime which will convert between an unformatted Excel date/time number and a localtime() like array.

For date conversions using the CPAN DateTime framework see DateTime::Format::Excel http://search.cpan.org/search?dist=DateTime-Format-Excel

AUTHOR

Current maintainer 0.60+: Douglas Wilson [email protected]

Maintainer 0.40-0.59: John McNamara [email protected]

Maintainer 0.27-0.33: Gabor Szabo [email protected]

Original author: Kawai Takanori [email protected]

COPYRIGHT

Copyright (c) 2014 Douglas Wilson

Copyright (c) 2009-2013 John McNamara

Copyright (c) 2006-2008 Gabor Szabo

Copyright (c) 2000-2006 Kawai Takanori

All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

630 - Linux cli command Tk_Listboxpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Listboxpm and provides detailed information about the command Tk_Listboxpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Listboxpm.

NAME 🖥️ Tk_Listboxpm 🖥️

Create and manipulate Listbox widgets

SYNOPSIS

$listbox = $parent->Listbox(?options?);

STANDARD OPTIONS

-background -borderwidth -cursor -disabledforeground -exportselection -font -foreground -height -highlightbackground -highlightcolor -highlightthickness -offset -relief -selectbackground -selectborderwidth -selectforeground -setgrid -state -takefocus -tile -width -xscrollcommand -yscrollcommand

See Tk::options for details of the standard options.

WIDGET-SPECIFIC OPTIONS

Name: activeStyle

Class: ActiveStyle

Switch: -activestyle

Specifies the style in which to draw the active element. This must be one of dotbox (show a focus ring around the active element), none (no special indication of active element) or underline (underline the active element). The default is underline.

Name: height

Class: Height

Switch: -height

Specifies the desired height for the window, in lines. If zero or less, then the desired height for the window is made just large enough to hold all the elements in the listbox.

Name: listVariable

Class: Variable

Switch: -listvariable

The following is only partially implemented in Perl/Tk: Specifies the reference of a variable. The value of the variable is an array to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. Attempts to assign a variable with an invalid list value to -listvariable will cause an error. Attempts to unset a variable in use as a -listvariable will fail but will not generate an error.

Name: selectMode

Class: SelectMode

Switch: -selectmode

Specifies one of several styles for manipulating the selection. The value of the option may be arbitrary, but the default bindings expect it to be either single, browse, multiple, or extended; the default value is browse.

Name: state

Class: State

Switch: -state

Specifies one of two states for the listbox: normal or disabled. If the listbox is disabled then items may not be inserted or deleted, items are drawn in the -disabledforeground color, and selection cannot be modified and is not shown (though selection information is retained).

Name: width

Class: Width

Switch: -width

Specifies the desired width for the window in characters. If the font doesn’t have a uniform width then the width of the character ``0’’ is used in translating from character units to screen units. If zero or less, then the desired width for the window is made just large enough to hold all the elements in the listbox.

DESCRIPTION

The Listbox method creates a new window (given by the $widget argument) and makes it into a listbox widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the listbox such as its colors, font, text, and relief. The listbox command returns its $widget argument. At the time this command is invoked, there must not exist a window named $widget, but $widget’s parent must exist.

A listbox is a widget that displays a list of strings, one per line. When first created, a new listbox has no elements. Elements may be added or deleted using methods described below. In addition, one or more elements may be selected as described below. If a listbox is exporting its selection (see exportSelection option), then it will observe the standard X11 protocols for handling the selection. Listbox selections are available as type STRING; the value of the selection will be the text of the selected elements, with newlines separating the elements.

It is not necessary for all the elements to be displayed in the listbox window at once; commands described below may be used to change the view in the window. Listboxes allow scrolling in both directions using the standard xScrollCommand and yScrollCommand options. They also support scanning, as described below.

INDICES

Many of the methods for listboxes take one or more indices as arguments. An index specifies a particular element of the listbox, in any of the following ways:

number
Specifies the element as a numerical index, where 0 corresponds to the first element in the listbox.

active
Indicates the element that has the location cursor. This element will be displayed with an underline when the listbox has the keyboard focus, and it is specified with the activate method.

anchor
Indicates the anchor point for the selection, which is set with the selection anchor method.

end
Indicates the end of the listbox. For most commands this refers to the last element in the listbox, but for a few commands such as index and insert it refers to the element just after the last one.

@x,y
Indicates the element that covers the point in the listbox window specified by x and y (in pixel coordinates). If no element covers that point, then the closest element to that point is used.

In the method descriptions below, arguments named index, first, and last always contain text indices in one of the above forms.

WIDGET METHODS

The Listbox method creates a widget object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class.

The following additional methods are available for listbox widgets:

$listbox->activate(index)
Sets the active element to the one indicated by index. If index is outside the range of elements in the listbox then the closest element is activated. The active element is drawn with an underline when the widget has the input focus, and its index may be retrieved with the index active.

$listbox->bbox(index)
Returns a list of four numbers describing the bounding box of the text in the element given by index. The first two elements of the list give the x and y coordinates of the upper-left corner of the screen area covered by the text (specified in pixels relative to the widget) and the last two elements give the width and height of the area, in pixels. If no part of the element given by index is visible on the screen, or if index refers to a non-existent element, then the result is an empty string; if the element is partially visible, the result gives the full area of the element, including any parts that are not visible.

$listbox->curselection
Returns a list containing the numerical indices of all of the elements in the listbox that are currently selected. If there are no elements selected in the listbox then an empty string is returned.

$listbox->delete(first, ?last?)
Deletes one or more elements of the listbox. First and last are indices specifying the first and last elements in the range to delete. If last isn’t specified it defaults to first, i.e. a single element is deleted.

$listbox->get(first, ?last?)
If last is omitted, returns the contents of the listbox element indicated by first, or an empty string if first refers to a non-existent element. If last is specified, the command returns a list whose elements are all of the listbox elements between first and last, inclusive. Both first and last may have any of the standard forms for indices.

$listbox->index(index)
Returns the integer index value that corresponds to index. If index is end the return value is a count of the number of elements in the listbox (not the index of the last element).

$listbox->insert(index, ?element, element, …?)
Inserts zero or more new elements in the list just before the element given by index. If index is specified as end then the new elements are added to the end of the list. Returns an empty string.

$listbox->itemcget(index, option)
Returns the current value of the item configuration option given by option. Option may have any of the values accepted by the listbox itemconfigure command.

$listbox->itemconfigure(index, ?option, value, option, value, …?)
Query or modify the configuration options of an item in the listbox. If no option is specified, returns a list describing all of the available options for the item (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. The following options are currently supported for items:

-background => color
Color specifies the background color to use when displaying the item. It may have any of the forms accepted by Tk_GetColor.

-foreground => color
Color specifies the foreground color to use when displaying the item. It may have any of the forms accepted by Tk_GetColor.

-selectbackground => color
Color specifies the background color to use when displaying the item while it is selected. It may have any of the forms accepted by Tk_GetColor.

-selectforeground => color
Color specifies the foreground color to use when displaying the item while it is selected. It may have any of the forms accepted by Tk_GetColor.

$listbox->nearest(y)
Given a y-coordinate within the listbox window, this command returns the index of the (visible) listbox element nearest to that y-coordinate.

$listbox->scan(option, args)
This command is used to implement scanning on listboxes. It has two forms, depending on option:

$listbox->scanMark(x, y)
Records x and y and the current view in the listbox window; used in conjunction with later scan dragto commands. Typically this command is associated with a mouse button press in the widget. It returns an empty string.

$listbox->scanDragto(x, y.)
This command computes the difference between its x and y arguments and the x and y arguments to the last scan mark command for the widget. It then adjusts the view by 10 times the difference in coordinates. This command is typically associated with mouse motion events in the widget, to produce the effect of dragging the list at high speed through the window. The return value is an empty string.

$listbox->see(index)
Adjust the view in the listbox so that the element given by index is visible. If the element is already visible then the command has no effect; if the element is near one edge of the window then the listbox scrolls to bring the element into view at the edge; otherwise the listbox scrolls to center the element.

$listbox->selection(option, arg)
This command is used to adjust the selection within a listbox. It has several forms, depending on option:

$listbox->selectionAnchor(index)
Sets the selection anchor to the element given by index. If index refers to a non-existent element, then the closest element is used. The selection anchor is the end of the selection that is fixed while dragging out a selection with the mouse. The index anchor may be used to refer to the anchor element.

$listbox->selectionClear(first, ?last?)
If any of the elements between first and last (inclusive) are selected, they are deselected. The selection state is not changed for elements outside this range.

$listbox->selectionIncludes(index)
Returns 1 if the element indicated by index is currently selected, 0 if it isn’t.

$listbox->selectionSet(first, ?last?)
Selects all of the elements in the range between first and last, inclusive, without affecting the selection state of elements outside that range.

$listbox->size
Returns a decimal string indicating the total number of elements in the listbox.

$listbox->xview(args)
This command is used to query and change the horizontal position of the information in the widget’s window. It can take any of the following forms:

$listbox->xview
Returns a list containing two elements. Each element is a real fraction between 0 and 1; together they describe the horizontal span that is visible in the window. For example, if the first element is .2 and the second element is .6, 20% of the listbox’s text is off-screen to the left, the middle 40% is visible in the window, and 40% of the text is off-screen to the right. These are the same values passed to scrollbars via the -xscrollcommand option.

$listbox->xview(index)
Adjusts the view in the window so that the character position given by index is displayed at the left edge of the window. Character positions are defined by the width of the character 0.

$listbox->xviewMoveto( fraction );
Adjusts the view in the window so that fraction of the total width of the listbox text is off-screen to the left. fraction must be a fraction between 0 and 1.

$listbox->xviewScroll( number, what );
This command shifts the view in the window left or right according to number and what. Number must be an integer. What must be either units or pages or an abbreviation of one of these. If what is units, the view adjusts left or right by number character units (the width of the 0 character) on the display; if it is pages then the view adjusts by number screenfuls. If number is negative then characters farther to the left become visible; if it is positive then characters farther to the right become visible.

$listbox->yview(?args?)
This command is used to query and change the vertical position of the text in the widget’s window. It can take any of the following forms:

$listbox->yview
Returns a list containing two elements, both of which are real fractions between 0 and 1. The first element gives the position of the listbox element at the top of the window, relative to the listbox as a whole (0.5 means it is halfway through the listbox, for example). The second element gives the position of the listbox element just after the last one in the window, relative to the listbox as a whole. These are the same values passed to scrollbars via the -yscrollcommand option.

$listbox->yview(index)
Adjusts the view in the window so that the element given by index is displayed at the top of the window.

$listbox->yviewMoveto( fraction );
Adjusts the view in the window so that the element given by fraction appears at the top of the window. Fraction is a fraction between 0 and 1; 0 indicates the first element in the listbox, 0.33 indicates the element one-third the way through the listbox, and so on.

$listbox->yviewScroll( number, what );
This command adjusts the view in the window up or down according to number and what. Number must be an integer. What must be either units or pages. If what is units, the view adjusts up or down by number lines; if it is pages then the view adjusts by number screenfuls. If number is negative then earlier elements become visible; if it is positive then later elements become visible.

DEFAULT BINDINGS

Tk automatically creates class bindings for listboxes that give them Motif-like behavior. Much of the behavior of a listbox is determined by its selectMode option, which selects one of four ways of dealing with the selection.

If the selection mode is single or browse, at most one element can be selected in the listbox at once. In both modes, clicking button 1 on an element selects it and deselects any other selected item. In browse mode it is also possible to drag the selection with button 1.

If the selection mode is multiple or extended, any number of elements may be selected at once, including discontiguous ranges. In multiple mode, clicking button 1 on an element toggles its selection state without affecting any other elements. In extended mode, pressing button 1 on an element selects it, deselects everything else, and sets the anchor to the element under the mouse; dragging the mouse with button 1 down extends the selection to include all the elements between the anchor and the element under the mouse, inclusive.

Most people will probably want to use browse mode for single selections and extended mode for multiple selections; the other modes appear to be useful only in special situations.

Any time the selection changes in the listbox, the virtual event <<ListboxSelect>> will be generated. It is easiest to bind to this event to be made aware of any changes to listbox selection.

In addition to the above behavior, the following additional behavior is defined by the default bindings:

[1]
In extended mode, the selected range can be adjusted by pressing button 1 with the Shift key down: this modifies the selection to consist of the elements between the anchor and the element under the mouse, inclusive. The un-anchored end of this new selection can also be dragged with the button down.

[2]
In extended mode, pressing button 1 with the Control key down starts a toggle operation: the anchor is set to the element under the mouse, and its selection state is reversed. The selection state of other elements isn’t changed. If the mouse is dragged with button 1 down, then the selection state of all elements between the anchor and the element under the mouse is set to match that of the anchor element; the selection state of all other elements remains what it was before the toggle operation began.

[3]
If the mouse leaves the listbox window with button 1 down, the window scrolls away from the mouse, making information visible that used to be off-screen on the side of the mouse. The scrolling continues until the mouse re-enters the window, the button is released, or the end of the listbox is reached.

[4]
Mouse button 2 may be used for scanning. If it is pressed and dragged over the listbox, the contents of the listbox drag at high speed in the direction the mouse moves.

[5]
If the Up or Down key is pressed, the location cursor (active element) moves up or down one element. If the selection mode is browse or extended then the new active element is also selected and all other elements are deselected. In extended mode the new active element becomes the selection anchor.

[6]
In extended mode, Shift-Up and Shift-Down move the location cursor (active element) up or down one element and also extend the selection to that element in a fashion similar to dragging with mouse button 1.

[7]
The Left and Right keys scroll the listbox view left and right by the width of the character 0. Control-Left and Control-Right scroll the listbox view left and right by the width of the window. Control-Prior and Control-Next also scroll left and right by the width of the window.

[8]
The Prior and Next keys scroll the listbox view up and down by one page (the height of the window).

[9]
The Home and End keys scroll the listbox horizontally to the left and right edges, respectively.

[10]
Control-Home sets the location cursor to the the first element in the listbox, selects that element, and deselects everything else in the listbox.

[11]
Control-End sets the location cursor to the the last element in the listbox, selects that element, and deselects everything else in the listbox.

[12]
In extended mode, Control-Shift-Home extends the selection to the first element in the listbox and Control-Shift-End extends the selection to the last element.

[13]
In multiple mode, Control-Shift-Home moves the location cursor to the first element in the listbox and Control-Shift-End moves the location cursor to the last element.

[14]
The space and Select keys make a selection at the location cursor (active element) just as if mouse button 1 had been pressed over this element.

[15]
In extended mode, Control-Shift-space and Shift-Select extend the selection to the active element just as if button 1 had been pressed with the Shift key down.

[16]
In extended mode, the Escape key cancels the most recent selection and restores all the elements in the selected range to their previous selection state.

[17]
Control-slash selects everything in the widget, except in single and browse modes, in which case it selects the active element and deselects everything else.

[18]
Control-backslash deselects everything in the widget, except in browse mode where it has no effect.

[19]
The F16 key (labelled Copy on many Sun workstations) or Meta-w copies the selection in the widget to the clipboard, if there is a selection. The behavior of listboxes can be changed by defining new bindings for individual widgets or by redefining the class bindings.

TIED INTERFACE

The Tk::Listbox widget can also be tied to a scalar or array variable, with different behaviour depending on the variable type, with the following tie commands:

use Tk; my ( @array, $scalar, $other ); my %options = ( ReturnType => “index” ); my $MW = MainWindow->new(); my $lbox = $MW->Listbox()->pack(); my @list = ( “a”, “b”, “c”, “d”, “e”, “f” ); $lbox->insert(end, @list ); tie @array, “Tk::Listbox”, $lbox tie $scalar, “Tk::Listbox”, $lbox; tie $other, “Tk::Listbox”, $lbox, %options;

currently only one modifier is implemented, a 3 way flag for tied scalars “ReturnType” which can have values “element”, “index” or “both”. The default is “element”.

Tied Arrays
If you tie an array to the Listbox you can manipulate the items currently contained by the box in the same manner as a normal array, e.g. print @array; push(@array, @list); my $popped = pop(@array); my $shifted = shift(@array); unshift(@array, @list); delete $array[$index]; print $string if exists $array[$i]; @array = (); splice @array, $offset, $length, @list The delete function is implemented slightly differently from the standard array implementation. Instead of setting the element at that index to undef it instead physically removes it from the Listbox. This has the effect of changing the array indices, so for instance if you had a list on non-continuous indices you wish to remove from the Listbox you should reverse sort the list and then apply the delete function, e.g. my @list = ( 1, 2, 4, 12, 20 ); my @remove = reverse sort { $a <=> $b } @list; delete @array[@remove]; would safely remove indices 20, 12, 4, 2 and 1 from the Listbox without problems. It should also be noted that a similar warning applies to the splice function (which would normally be used in this context to perform the same job).

Tied Scalars
Unlike tied arrays, if you tie a scalar to the Listbox you can retrieve the currently selected elements in the box as an array referenced by the scalar, for instance my @list = ( “a”, “b”, “c”, “d”, “e”, “f” ); $lbox->insert(end, sort @list ); $lbox->selectionSet(1); inserts @list as elements in an already existing listbox and selects the element at index 1, which is “b”. If we then print @$selected; this will return the currently selected elements, in this case “b”. However, if the “ReturnType” argument is passed when tying the Listbox to the scalar with value “index” then the indices of the selected elements will be returned instead of the elements themselves, ie in this case “1”. This can be useful when manipulating both contents and selected elements in the Listbox at the same time. Importantly, if a value “both” is given the scalar will not be tied to an array, but instead to a hash, with keys being the indices and values being the elements at those indices You can also manipulate the selected items using the scalar. Equating the scalar to an array reference will select any elements that match elements in the Listbox, non-matching array items are ignored, e.g. my @list = ( “a”, “b”, “c”, “d”, “e”, “f” ); $lbox->insert(end, sort @list ); $lbox->selectionSet(1); would insert the array @list into an already existing Listbox and select element at index 1, i.e. “b” @array = ( “a”, “b”, “f” ); $selected = \array; would select elements “a”, “b” and “f” in the Listbox. Again, if the “index” we indicate we want to use indices in the options hash then the indices are use instead of elements, e.g. @array = ( 0, 1, 5 ); $selected = \array; would have the same effect, selecting elements “a”, “b” and “f” if the $selected variable was tied with %options = ( ReturnType => “index” ). If we are returning “both”, i.e. the tied scalar points to a hash, both key and value must match, e.g. %hash = ( 0 => “a”, 1 => “b”, 5 => “f” ); $selected = \hash; would have the same effect as the previous examples. It should be noted that, despite being a reference to an array (or possibly a has), you still can not copy the tied variable without it being untied, instead you must pass a reference to the tied scalar between subroutines.

KEYWORDS

listbox, widget, tied

SEE ALSO

Tk::HList, Tk::TextList.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

631 - Linux cli command XtParseAcceleratorTable

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtParseAcceleratorTable and provides detailed information about the command XtParseAcceleratorTable, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtParseAcceleratorTable.

NAME 🖥️ XtParseAcceleratorTable 🖥️

managing accelerator tables

SYNTAX

#include <X11/Intrinsic.h>

XtAccelerators XtParseAcceleratorTable(const char * source);

void XtInstallAccelerators(Widget destination, Widget source);

void XtInstallAllAccelerators(Widget destination, Widget source);

ARGUMENTS

source
Specifies the accelerator table to compile.

destination
Specifies the widget on which the accelerators are to be installed.

source
Specifies the widget or the root widget of the widget tree from which the accelerators are to come.

DESCRIPTION

The XtParseAcceleratorTable function compiles the accelerator table into the opaque internal representation.

The XtInstallAccelerators function installs the accelerators from source onto destination by augmenting the destination translations with the source accelerators. If the source display_accelerator method is non-NULL, XtInstallAccelerators calls it with the source widget and a string representation of the accelerator table, which indicates that its accelerators have been installed and that it should display them appropriately. The string representation of the accelerator table is its canonical translation table representation.

The XtInstallAllAccelerators function recursively descends the widget tree rooted at source and installs the accelerators of each widget encountered onto destination. A common use os to call XtInstallAllAccelerators and pass the application main window as the source.

SEE ALSO

XtParseTranslationTable(1)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

632 - Linux cli command Image_ExifTool_MPFpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_MPFpm and provides detailed information about the command Image_ExifTool_MPFpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_MPFpm.

NAME 🖥️ Image_ExifTool_MPFpm 🖥️

Read Multi-Picture Format information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains tag definitions and routines to read Multi-Picture Format (MPF) information from JPEG images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.cipa.jp/std/documents/e/DC-007_E.pdf>

SEE ALSO

“MPF Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

633 - Linux cli command iswctype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command iswctype and provides detailed information about the command iswctype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the iswctype.

NAME 🖥️ iswctype 🖥️

wide-character classification

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wctype.h>
int iswctype(wint_t wc, wctype_t desc);

DESCRIPTION

If wc is a wide character having the character property designated by desc (or in other words: belongs to the character class designated by desc), then the iswctype() function returns nonzero. Otherwise, it returns zero. If wc is WEOF, zero is returned.

desc must be a character property descriptor returned by the wctype(3) function.

RETURN VALUE

The iswctype() function returns nonzero if the wc has the designated property. Otherwise, it returns 0.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

iswctype()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of iswctype() depends on the LC_CTYPE category of the current locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), wctype(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

634 - Linux cli command pcap_closepcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_closepcap and provides detailed information about the command pcap_closepcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_closepcap.

NAME 🖥️ pcap_closepcap 🖥️

close a capture device or savefile

SYNOPSIS

#include <pcap/pcap.h>
void pcap_close(pcap_t *p);

DESCRIPTION

pcap_close() closes the files associated with p and deallocates resources.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

635 - Linux cli command pcap_major_versionpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_major_versionpcap and provides detailed information about the command pcap_major_versionpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_major_versionpcap.

NAME 🖥️ pcap_major_versionpcap 🖥️

get the version number of a savefile

SYNOPSIS

#include <pcap/pcap.h>
int pcap_major_version(pcap_t *p);
int pcap_minor_version(pcap_t *p);

DESCRIPTION

If p refers to a ``savefile’’, pcap_major_version() returns the major number of the file format of the ``savefile’’ and pcap_minor_version() returns the minor number of the file format of the ``savefile’’. The version number is stored in the ``savefile’’; note that the meaning of its values depends on the type of ``savefile’’ (for example, pcap or pcapng).

If p refers to a live capture, the values returned by pcap_major_version() and pcap_minor_version() are not meaningful.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

636 - Linux cli command LWP_RobotUApm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LWP_RobotUApm and provides detailed information about the command LWP_RobotUApm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LWP_RobotUApm.

NAME 🖥️ LWP_RobotUApm 🖥️

a class for well-behaved Web robots

SYNOPSIS

use LWP::RobotUA; my $ua = LWP::RobotUA->new(my-robot/0.1, [email protected]); $ua->delay(10); # be very nice – max one hit every ten minutes! … # Then just use it just like a normal LWP::UserAgent: my $response = $ua->get(http://whatever.int/...);

DESCRIPTION

This class implements a user agent that is suitable for robot applications. Robots should be nice to the servers they visit. They should consult the /robots.txt file to ensure that they are welcomed and they should not make requests too frequently.

But before you consider writing a robot, take a look at <http://www.robotstxt.org/>.

When you use an LWP::RobotUA object as your user agent, then you do not really have to think about these things yourself; robots.txt files are automatically consulted and obeyed, the server isn’t queried too rapidly, and so on. Just send requests as you do when you are using a normal LWP::UserAgent object (using $ua->get(...), $ua->head(...), $ua->request(...), etc.), and this special agent will make sure you are nice.

METHODS

The LWP::RobotUA is a sub-class of LWP::UserAgent and implements the same methods. In addition the following methods are provided:

new

my $ua = LWP::RobotUA->new( %options ) my $ua = LWP::RobotUA->new( $agent, $from ) my $ua = LWP::RobotUA->new( $agent, $from, $rules )

The LWP::UserAgent options agent and from are mandatory. The options delay, use_sleep and rules initialize attributes private to the RobotUA. If rules are not provided, then WWW::RobotRules is instantiated providing an internal database of robots.txt.

It is also possible to just pass the value of agent, from and optionally rules as plain positional arguments.

delay

my $delay = $ua->delay; $ua->delay( $minutes );

Get/set the minimum delay between requests to the same server, in minutes. The default is 1 minute. Note that this number doesn’t have to be an integer; for example, this sets the delay to 10 seconds:

$ua->delay(10/60);

use_sleep

my $bool = $ua->use_sleep; $ua->use_sleep( $boolean );

Get/set a value indicating whether the UA should “sleep” in LWP::RobotUA if requests arrive too fast, defined as $ua->delay minutes not passed since last request to the given server. The default is true. If this value is false then an internal SERVICE_UNAVAILABLE response will be generated. It will have a Retry-After header that indicates when it is OK to send another request to this server.

rules

my $rules = $ua->rules; $ua->rules( $rules );

Set/get which WWW::RobotRules object to use.

no_visits

my $num = $ua->no_visits( $netloc )

Returns the number of documents fetched from this server host. Yeah I know, this method should probably have been named num_visits or something like that. :-(

host_wait

my $num = $ua->host_wait( $netloc )

Returns the number of seconds (from now) you must wait before you can make a new request to this host.

as_string

my $string = $ua->as_string;

Returns a string that describes the state of the UA. Mainly useful for debugging.

SEE ALSO

LWP::UserAgent, WWW::RobotRules

COPYRIGHT

Copyright 1996-2004 Gisle Aas.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

637 - Linux cli command ftime

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ftime and provides detailed information about the command ftime, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ftime.

NAME 🖥️ ftime 🖥️

return date and time

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/timeb.h>
int ftime(struct timeb *tp);

DESCRIPTION

NOTE: This function is no longer provided by the GNU C library. Use clock_gettime(2) instead.

This function returns the current time as seconds and milliseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). The time is returned in tp, which is declared as follows:

struct timeb {
    time_t         time;
    unsigned short millitm;
    short          timezone;
    short          dstflag;
};

Here time is the number of seconds since the Epoch, and millitm is the number of milliseconds since time seconds since the Epoch. The timezone field is the local timezone measured in minutes of time west of Greenwich (with a negative value indicating minutes east of Greenwich). The dstflag field is a flag that, if nonzero, indicates that Daylight Saving time applies locally during the appropriate part of the year.

POSIX.1-2001 says that the contents of the timezone and dstflag fields are unspecified; avoid relying on them.

RETURN VALUE

This function always returns 0. (POSIX.1-2001 specifies, and some systems document, a -1 error return.)

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

ftime()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

Removed in glibc 2.33. 4.2BSD, POSIX.1-2001. Removed in POSIX.1-2008.

This function is obsolete. Don’t use it. If the time in seconds suffices, time(2) can be used; gettimeofday(2) gives microseconds; clock_gettime(2) gives nanoseconds but is not as widely available.

BUGS

Early glibc2 is buggy and returns 0 in the millitm field; glibc 2.1.1 is correct again.

SEE ALSO

gettimeofday(2), time(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

638 - Linux cli command Moose_Meta_Method_Metapm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Method_Metapm and provides detailed information about the command Moose_Meta_Method_Metapm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Method_Metapm.

NAME 🖥️ Moose_Meta_Method_Metapm 🖥️

A Moose Method metaclass for “meta” methods

VERSION

version 2.2207

DESCRIPTION

This class is a subclass of Class::MOP::Method::Meta that provides additional Moose-specific functionality, all of which is private.

To understand this class, you should read the Class::MOP::Method::Meta documentation.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

639 - Linux cli command HTTP_Statuspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTTP_Statuspm and provides detailed information about the command HTTP_Statuspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTTP_Statuspm.

NAME 🖥️ HTTP_Statuspm 🖥️

HTTP Status code processing

VERSION

version 6.46

SYNOPSIS

use HTTP::Status qw(:constants :is status_message); if ($rc != HTTP_OK) { print status_message($rc), " “; } if (is_success($rc)) { … } if (is_error($rc)) { … } if (is_redirect($rc)) { … }

DESCRIPTION

HTTP::Status is a library of routines for defining and classifying HTTP status codes for libwww-perl. Status codes are used to encode the overall outcome of an HTTP response message. Codes correspond to those defined in RFC 2616 and RFC 2518.

CONSTANTS

The following constant functions can be used as mnemonic status code names. None of these are exported by default. Use the :constants tag to import them all.

HTTP_CONTINUE (100) HTTP_SWITCHING_PROTOCOLS (101) HTTP_PROCESSING (102) HTTP_EARLY_HINTS (103) HTTP_OK (200) HTTP_CREATED (201) HTTP_ACCEPTED (202) HTTP_NON_AUTHORITATIVE_INFORMATION (203) HTTP_NO_CONTENT (204) HTTP_RESET_CONTENT (205) HTTP_PARTIAL_CONTENT (206) HTTP_MULTI_STATUS (207) HTTP_ALREADY_REPORTED (208) HTTP_IM_USED (226) HTTP_MULTIPLE_CHOICES (300) HTTP_MOVED_PERMANENTLY (301) HTTP_FOUND (302) HTTP_SEE_OTHER (303) HTTP_NOT_MODIFIED (304) HTTP_USE_PROXY (305) HTTP_TEMPORARY_REDIRECT (307) HTTP_PERMANENT_REDIRECT (308) HTTP_BAD_REQUEST (400) HTTP_UNAUTHORIZED (401) HTTP_PAYMENT_REQUIRED (402) HTTP_FORBIDDEN (403) HTTP_NOT_FOUND (404) HTTP_METHOD_NOT_ALLOWED (405) HTTP_NOT_ACCEPTABLE (406) HTTP_PROXY_AUTHENTICATION_REQUIRED (407) HTTP_REQUEST_TIMEOUT (408) HTTP_CONFLICT (409) HTTP_GONE (410) HTTP_LENGTH_REQUIRED (411) HTTP_PRECONDITION_FAILED (412) HTTP_CONTENT_TOO_LARGE (413) HTTP_URI_TOO_LONG (414) HTTP_UNSUPPORTED_MEDIA_TYPE (415) HTTP_RANGE_NOT_SATISFIABLE (416) HTTP_EXPECTATION_FAILED (417) HTTP_MISDIRECTED REQUEST (421) HTTP_UNPROCESSABLE_CONTENT (422) HTTP_LOCKED (423) HTTP_FAILED_DEPENDENCY (424) HTTP_TOO_EARLY (425) HTTP_UPGRADE_REQUIRED (426) HTTP_PRECONDITION_REQUIRED (428) HTTP_TOO_MANY_REQUESTS (429) HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE (431) HTTP_UNAVAILABLE_FOR_LEGAL_REASONS (451) HTTP_INTERNAL_SERVER_ERROR (500) HTTP_NOT_IMPLEMENTED (501) HTTP_BAD_GATEWAY (502) HTTP_SERVICE_UNAVAILABLE (503) HTTP_GATEWAY_TIMEOUT (504) HTTP_HTTP_VERSION_NOT_SUPPORTED (505) HTTP_VARIANT_ALSO_NEGOTIATES (506) HTTP_INSUFFICIENT_STORAGE (507) HTTP_LOOP_DETECTED (508) HTTP_NOT_EXTENDED (510) HTTP_NETWORK_AUTHENTICATION_REQUIRED (511)

FUNCTIONS

The following additional functions are provided. Most of them are exported by default. The :is import tag can be used to import all the classification functions.

status_message( $code )
The status_message() function will translate status codes to human readable strings. The string is the same as found in the constant names above. For example, status_message(303) will return "Not Found". If the $code is not registered in the list of IANA HTTP Status Codes <https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml> then undef is returned.

status_constant_name( $code )
The status_constant_name() function will translate a status code to a string which has the name of the constant for that status code. For example, status_constant_name(404) will return "HTTP_NOT_FOUND". If the $code is not registered in the list of IANA HTTP Status Codes <https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml> then undef is returned.

is_info( $code )
Return TRUE if $code is an Informational status code (1xx). This class of status code indicates a provisional response which can’t have any content.

is_success( $code )
Return TRUE if $code is a Successful status code (2xx).

is_redirect( $code )
Return TRUE if $code is a Redirection status code (3xx). This class of status code indicates that further action needs to be taken by the user agent in order to fulfill the request.

is_error( $code )
Return TRUE if $code is an Error status code (4xx or 5xx). The function returns TRUE for both client and server error status codes.

is_client_error( $code )
Return TRUE if $code is a Client Error status code (4xx). This class of status code is intended for cases in which the client seems to have erred. This function is not exported by default.

is_server_error( $code )
Return TRUE if $code is a Server Error status code (5xx). This class of status codes is intended for cases in which the server is aware that it has erred or is incapable of performing the request. This function is not exported by default.

is_cacheable_by_default( $code )
Return TRUE if $code indicates that a response is cacheable by default, and it can be reused by a cache with heuristic expiration. All other status codes are not cacheable by default. See RFC 7231 - HTTP/1.1 Semantics and Content, Section 6.1. Overview of Status Codes <https://tools.ietf.org/html/rfc7231#section-6.1>. This function is not exported by default.

status_codes
Returns a hash mapping numerical HTTP status code (e.g. 200) to text status messages (e.g. “OK”) This function is not exported by default.

SEE ALSO

IANA HTTP Status Codes <https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml>

BUGS

For legacy reasons all the HTTP_ constants are exported by default with the prefix RC_. It’s recommended to use explicit imports and the :constants tag instead of relying on this.

AUTHOR

Gisle Aas <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 1994 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

640 - Linux cli command Image_ExifTool_MRCpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_MRCpm and provides detailed information about the command Image_ExifTool_MRCpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_MRCpm.

NAME 🖥️ Image_ExifTool_MRCpm 🖥️

Read MRC meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read metadata from Medical Research Council (MRC) images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<https://www.ccpem.ac.uk/mrc_format/mrc2014.php>

<http://legacy.ccp4.ac.uk/html/library.html>

<https://github.com/ccpem/mrcfile/blob/master/mrcfile/dtypes.py>

SEE ALSO

“MRC Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

641 - Linux cli command rindex

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command rindex and provides detailed information about the command rindex, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the rindex.

NAME 🖥️ rindex 🖥️

locate character in string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <strings.h>
[[deprecated]] char *index(const char *s, int c);
[[deprecated]] char *rindex(const char *s, int c);

DESCRIPTION

index() is identical to strchr(3).

rindex() is identical to strrchr(3).

Use strchr(3) and strrchr(3) instead of these functions.

STANDARDS

None.

HISTORY

4.3BSD; marked as LEGACY in POSIX.1-2001. Removed in POSIX.1-2008, recommending strchr(3) and strrchr(3) instead.

SEE ALSO

strchr(3), strrchr(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

642 - Linux cli command XtVaOpenApplication

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtVaOpenApplication and provides detailed information about the command XtVaOpenApplication, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtVaOpenApplication.

NAME 🖥️ XtVaOpenApplication 🖥️

initialize, open, or close a display

SYNTAX

#include <X11/Intrinsic.h>

Widget XtOpenApplication(XtAppContext *app_context_return, const char *application_class, XrmOptionDescRec *options, Cardinal num_options, int *argc_in_out, char **argv_in_out, String *fallback_resources, WidgetClass widget_class, ArgList args, Cardinal num_args);

Widget XtVaOpenApplication(XtAppContext *app_context_return, const char *application_class, XrmOptionDescRec *options, Cardinal num_options, int *argc_in_out, char **argv_in_out, String *fallback_resources, WidgetClass widget_class, … );

ARGUMENTS

app_context_return
Specifies the application context.

application_class
Specifies the class name of this application, which usually is the generic name for all instances of this application.

options
Specifies how to parse the command line for any application-specific resources. The options argument is passed as a parameter to XrmParseCommand. For further information, see Xlib - C Language X Interface.

num_options
Specifies the number of entries in the options list.

argc_in_out
Specifies a pointer to the number of command line parameters.

argv_in_out
Specifies the command line parameters.

fallback_resources
Specifies resource values to be used if the application class resource file cannot be opened or read, or NULL.

widget_class
Specifies the widget class of the shell to be created.

args
Specifies the argument list to override any other resource specification for the created shell widget.

num_args
Specifies the number of entries in the argument list.


Specifies the variable argument list to override any other resource specification for the created shell widget.

DESCRIPTION

The XtOpenApplication function calls XtToolkitInitialize followed by XtCreateApplicationContext, then calls XtOpenDisplay with display_string NULL and application_name NULL, and finally calls XtAppCreateShell with application_name NULL, the specified widget_class, and the specified args and num_args and returns the created shell. The modified argc and argv returned by XtDisplayInitialize are returned in argc_in_out and argv_in_out. If app_context_return is not NULL, the created application context is also returned. If the display specified by the command line cannot be opened, an error message is issued and XtOpenApplication terminates the application. If fallback_resources is non-NULL, XtAppSetFallbackResources is called with the value prior to calling XtOpenDisplay.

XtAppInitialize and XtVaAppInitialize have been superceded by XtOpenApplication and XtVaOpenApplication respectively.

SEE ALSO

XtAppInitialize(3), XtVaAppInitialize(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

643 - Linux cli command Net_DBus_Binding_Watchpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Binding_Watchpm and provides detailed information about the command Net_DBus_Binding_Watchpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Binding_Watchpm.

NAME 🖥️ Net_DBus_Binding_Watchpm 🖥️

binding to the dbus watch API

AUTHOR

Daniel P. Berrange.

COPYRIGHT

Copyright (C) 2004-2011 Daniel P. Berrange

SEE ALSO

Net::DBus::Binding::Connection

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

644 - Linux cli command Image_ExifTool_WritePostScriptpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_WritePostScriptpm and provides detailed information about the command Image_ExifTool_WritePostScriptpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_WritePostScriptpm.

NAME 🖥️ Image_ExifTool_WritePostScriptpm 🖥️

Write PostScript meta information

SYNOPSIS

This file is autoloaded by Image::ExifTool::PostScript.

DESCRIPTION

This file contains routines to write meta information in PostScript documents. Six forms of meta information may be written:

1) PostScript comments (Adobe DSC specification) 2) XMP information embedded in a document-level XMP stream 3) EXIF information embedded in a Photoshop record 4) IPTC information embedded in a PhotoShop record 5) ICC_Profile information embedded in an ICCProfile record 6) TIFF information embedded in DOS-style binary header

NOTES

Currently, information is written only in the outer-level document.

Photoshop will discard meta information in a PostScript document if it has to rasterize the image, and it will rasterize anything that doesn’t contain the Photoshop-specific ‘ImageData’ tag. So don’t expect Photoshop to read any meta information added to EPS images that it didn’t create.

The following two acronyms may be confusing since they are so similar and have different meanings with respect to PostScript documents:

DSC = Document Structuring Conventions DCS = Desktop Color Separation

REFERENCES

See references in PostScript.pm, plus:

<http://www.adobe.com/products/postscript/pdfs/PLRM.pdf>

<http://www-cdf.fnal.gov/offline/PostScript/PLRM2.pdf>

<http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/pdf_creation_apis_and_specs/pdfmarkReference.pdf>

ACKNOWLEDGEMENTS

Thanks to Tim Kordick for his help testing the EPS writer.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Image::ExifTool::PostScript (3pm), Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

645 - Linux cli command Tk_FBoxpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_FBoxpm and provides detailed information about the command Tk_FBoxpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_FBoxpm.

NAME 🖥️ Tk_FBoxpm 🖥️

a file dialog

SYNOPSIS

use Tk::FBox; $file = $mw->FBox(…)->Show;

DESCRIPTION

Tk::FBox is the dialog implementation behind the getOpenFile, getSaveFile, and chooseDirectory method calls in the Unix/X11 world. As such, it supports all options for these methods and additionally:

-sortcmd => sub { $_[0] cmp $_[1] }
Specified a callback for changing the sorting of the icons in the IconList widget. By default, perl’s cmp operator will be used. From the source code: # Using -sortcmd is really strange :-( # $top->getOpenFile(-sortcmd => sub { package Tk::FBox; uc $b cmp uc $a}); # or, un-perlish, but useable (now activated in code): # $top->getOpenFile(-sortcmd => sub { uc $_[1] cmp uc $_[0]}); This is an experimental option!

-type => $type
Type should be “open” for choosing existing files to open (default), “save” for choosing existing or non-existing files to save, or “dir” for choosing directories.

-filter => $glob
A file glob to restrict displayed files. This is only active if no -filetypes are defined.

-force => $bool
If true, then there will be no dialog if a file already exists.

COPYRIGHT

The original tkfbox.tcl from Tcl/Tk is:

Copyright (c) 1994-1996 Sun Microsystems, Inc.

See the file “license.terms” for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.

Translated to Perl/Tk by Slaven Rezic <[email protected]>.

SEE ALSO

Tk::getOpenFile, Tk::IconList.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

646 - Linux cli command gamma

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gamma and provides detailed information about the command gamma, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gamma.

NAME 🖥️ gamma 🖥️

(logarithm of the) gamma function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
[[deprecated]] double gamma(double x);
[[deprecated]] float gammaf(float x);
[[deprecated]] long double gammal(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

gamma():

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

gammaf(), gammal():

    _XOPEN_SOURCE >= 600 || (_XOPEN_SOURCE && _ISOC99_SOURCE)
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions are deprecated: instead, use either the tgamma(3) or the lgamma(3) functions, as appropriate.

For the definition of the Gamma function, see tgamma(3).

*BSD version

The libm in 4.4BSD and some versions of FreeBSD had a gamma() function that computes the Gamma function, as one would expect.

glibc version

glibc has a gamma() function that is equivalent to lgamma(3) and computes the natural logarithm of the Gamma function.

RETURN VALUE

See lgamma(3).

ERRORS

See lgamma(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

gamma(), gammaf(), gammal()

Thread safetyMT-Unsafe race:signgam

STANDARDS

None.

HISTORY

SVID 2.

Because of historical variations in behavior across systems, this function is not specified in any recent standard.

4.2BSD had a gamma() that computed ln(|Gamma(|x|)|), leaving the sign of Gamma(|x|) in the external integer signgam. In 4.3BSD the name was changed to lgamma(3), and the man page promises

“At some time in the future the name gamma will be rehabilitated and used for the Gamma function”

This did indeed happen in 4.4BSD, where gamma() computes the Gamma function (with no effect on signgam). However, this came too late, and we now have tgamma(3), the “true gamma” function.

SEE ALSO

lgamma(3), signgam(3), tgamma(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

647 - Linux cli command regex

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command regex and provides detailed information about the command regex, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the regex.

NAME 🖥️ regex 🖥️

POSIX regex functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <regex.h>
int regcomp(regex_t *restrict preg, const char *restrict regex,
 int cflags);
int regexec(const regex_t *restrict preg",constchar*restrict"string,
 size_t nmatch, regmatch_t pmatch[_Nullable restrict .nmatch],
 int eflags);
size_t regerror(int errcode, const regex_t *_Nullable restrict preg,
 char errbuf[_Nullable restrict .errbuf_size],
 size_t errbuf_size);
void regfree(regex_t *preg);
typedef struct {
 size_t re_nsub;
} regex_t;
typedef struct {
 regoff_t rm_so;
 regoff_t rm_eo;
} regmatch_t;
typedef /* ... */ regoff_t;

DESCRIPTION

Compilation

regcomp() is used to compile a regular expression into a form that is suitable for subsequent regexec() searches.

On success, the pattern buffer at *preg is initialized. regex is a null-terminated string. The locale must be the same when running regexec().

After regcomp() succeeds, preg->re_nsub holds the number of subexpressions in regex. Thus, a value of preg->re_nsub + 1 passed as nmatch to regexec() is sufficient to capture all matches.

cflags is the bitwise OR of zero or more of the following:

REG_EXTENDED
Use POSIX Extended Regular Expression syntax when interpreting regex. If not set, POSIX Basic Regular Expression syntax is used.

REG_ICASE
Do not differentiate case. Subsequent regexec() searches using this pattern buffer will be case insensitive.

REG_NOSUB
Report only overall success. regexec() will use only pmatch for REG_STARTEND, ignoring nmatch.

REG_NEWLINE
Match-any-character operators don’t match a newline.

A nonmatching list ([^…]) not containing a newline does not match a newline.

Match-beginning-of-line operator (^) matches the empty string immediately after a newline, regardless of whether eflags, the execution flags of regexec(), contains REG_NOTBOL.

Match-end-of-line operator ($) matches the empty string immediately before a newline, regardless of whether eflags contains REG_NOTEOL.

Matching

regexec() is used to match a null-terminated string against the compiled pattern buffer in *preg, which must have been initialised with regexec(). eflags is the bitwise OR of zero or more of the following flags:

REG_NOTBOL
The match-beginning-of-line operator always fails to match (but see the compilation flag REG_NEWLINE above). This flag may be used when different portions of a string are passed to regexec() and the beginning of the string should not be interpreted as the beginning of the line.

REG_NOTEOL
The match-end-of-line operator always fails to match (but see the compilation flag REG_NEWLINE above).

REG_STARTEND
Match [string + pmatch[0].rm_so,* string + pmatch[0].rm_eo*) instead of [string,* string + strlen(string)*). This allows matching embedded NUL bytes and avoids a strlen(3) on known-length strings. If any matches are returned (REG_NOSUB wasn’t passed to regcomp(), the match succeeded, and nmatch > 0), they overwrite pmatch as usual, and the match offsets remain relative to string (not string + pmatch[0].rm_so). This flag is a BSD extension, not present in POSIX.

Match offsets

Unless REG_NOSUB was passed to regcomp(), it is possible to obtain the locations of matches within string: regexec() fills nmatch elements of pmatch with results: pmatch[0] corresponds to the entire match, pmatch[1] to the first subexpression, etc. If there were more matches than nmatch, they are discarded; if fewer, unused elements of pmatch are filled with -1s.

Each returned valid (non--1) match corresponds to the range [string + rm_so,* string + rm_eo*).

regoff_t is a signed integer type capable of storing the largest value that can be stored in either an ptrdiff_t type or a ssize_t type.

Error reporting

regerror() is used to turn the error codes that can be returned by both regcomp() and regexec() into error message strings.

If preg isn’t a null pointer, errcode must be the latest error returned from an operation on preg.

If errbuf_size isn’t 0, up to errbuf_size bytes are copied to errbuf; the error string is always null-terminated, and truncated to fit.

Freeing

regfree() deinitializes the pattern buffer at *preg, freeing any associated memory; *preg must have been initialized via regcomp().

RETURN VALUE

regcomp() returns zero for a successful compilation or an error code for failure.

regexec() returns zero for a successful match or REG_NOMATCH for failure.

regerror() returns the size of the buffer required to hold the string.

ERRORS

The following errors can be returned by regcomp():

REG_BADBR
Invalid use of back reference operator.

REG_BADPAT
Invalid use of pattern operators such as group or list.

REG_BADRPT
Invalid use of repetition operators such as using ‘*’ as the first character.

REG_EBRACE
Un-matched brace interval operators.

REG_EBRACK
Un-matched bracket list operators.

REG_ECOLLATE
Invalid collating element.

REG_ECTYPE
Unknown character class name.

REG_EEND
Nonspecific error. This is not defined by POSIX.

REG_EESCAPE
Trailing backslash.

REG_EPAREN
Un-matched parenthesis group operators.

REG_ERANGE
Invalid use of the range operator; for example, the ending point of the range occurs prior to the starting point.

REG_ESIZE
Compiled regular expression requires a pattern buffer larger than 64 kB. This is not defined by POSIX.

REG_ESPACE
The regex routines ran out of memory.

REG_ESUBREG
Invalid back reference to a subexpression.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

regcomp(), regexec()

Thread safetyMT-Safe locale

regerror()

Thread safetyMT-Safe env

regfree()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

Prior to POSIX.1-2008, regoff_t was required to be capable of storing the largest value that can be stored in either an off_t type or a ssize_t type.

CAVEATS

re_nsub is only required to be initialized if REG_NOSUB wasn’t specified, but all known implementations initialize it regardless.

Both regex_t and regmatch_t may (and do) have more members, in any order. Always reference them by name.

EXAMPLES

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <regex.h>
#define ARRAY_SIZE(arr) (sizeof((arr)) / sizeof((arr)[0]))
static const char *const str =
        "1) John Driverhacker;
  1. John Doe;
  2. John Foo; “; static const char *const re = “John.*o”; int main(void) { static const char *s = str; regex_t regex; regmatch_t pmatch[1]; regoff_t off, len; if (regcomp(&regex, re, REG_NEWLINE)) exit(EXIT_FAILURE); printf(“String = "%s" “, str); printf(“Matches: “); for (unsigned int i = 0; ; i++) { if (regexec(&regex, s, ARRAY_SIZE(pmatch), pmatch, 0)) break; off = pmatch[0].rm_so + (s - str); len = pmatch[0].rm_eo - pmatch[0].rm_so; printf(”#%zu: “, i); printf(“offset = %jd; length = %jd “, (intmax_t) off, (intmax_t) len); printf(“substring = "%.*s" “, len, s + pmatch[0].rm_so); s += pmatch[0].rm_eo; } exit(EXIT_SUCCESS); }

SEE ALSO

grep(1), regex(7)

The glibc manual section, Regular Expressions

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

648 - Linux cli command rwarrayam

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command rwarrayam and provides detailed information about the command rwarrayam, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the rwarrayam.

NAME 🖥️ rwarrayam 🖥️

write and read gawk arrays to/from files

SYNOPSIS

@load “rwarray”

ret = writea(file, array)
ret = reada(file, array)
ret = writeall(file)
ret = readall(file)

DESCRIPTION

The rwarray extension adds functions named writea(), reada(), writeall(), and readall(), as follows.

writea()
This function takes a string argument, which is the name of the file to which dump the array, and the array itself as the second argument. writea() understands multidimensional arrays. It returns one on success, or zero upon failure.

reada()
is the inverse of writea(); it reads the file named as its first argument, filling in the array named as the second argument. It clears the array first. Here too, the return value is one on success and zero upon failure.

writeall()
This function takes a string argument, which is the name of the file to which dump the state of all variables. Calling this function is completely equivalent to calling writea() with the second argument equal to SYMTAB. It returns one on success, or zero upon failure.

readall()
This function takes a string argument, which is the name of the file from which to read the contents of various global variables. For each variable in the file, the data is loaded unless the variable already exists. If the variable already exists, the data for that variable in the file is ignored. It returns one on success, or zero upon failure.

NOTES

The array created by reada() is identical to that written by writea() in the sense that the contents are the same. However, due to implementation issues, the array traversal order of the recreated array will likely be different from that of the original array. As array traversal order in AWK is by default undefined, this is not (technically) a problem. If you need to guarantee a particular traversal order, use the array sorting features in gawk to do so.

The file contains binary data. All integral values are written in network byte order. However, double precision floating-point values are written as native binary data. Thus, arrays containing only string data can theoretically be dumped on systems with one byte order and restored on systems with a different one, but this has not been tried.

EXAMPLE

@load "rwarray"
...
ret = writea("arraydump.bin", array)
...
ret = reada("arraydump.bin", array)
...
ret = writeall("globalstate.bin")
...
ret = readall("globalstate.bin")

SEE ALSO

GAWK: Effective AWK Programming, filefuncs(3am), fnmatch(3am), fork(3am), inplace(3am), ordchr(3am), readdir(3am), readfile(3am), revoutput(3am), time(3am).

AUTHOR

Arnold Robbins, [email protected].

COPYING PERMISSIONS

Copyright © 2012, 2013, 2018, 2022 Free Software Foundation, Inc.

Permission is granted to make and distribute verbatim copies of this manual page provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to process this file through troff and print the results, provided the printed document carries copying permission notice identical to this one except for the removal of this paragraph (this paragraph not being relevant to the printed manual page).

Permission is granted to copy and distribute modified versions of this manual page under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual page into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

649 - Linux cli command nexttowardf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command nexttowardf and provides detailed information about the command nexttowardf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the nexttowardf.

NAME 🖥️ nexttowardf 🖥️

floating-point number manipulation

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double nextafter(double x, double y);
float nextafterf(float x, float y);
long double nextafterl(long double x, long double y);
double nexttoward(double x, long double y);
float nexttowardf(float x, long double y);
long double nexttowardl(long double x, long double y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

nextafter():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

nextafterf(), nextafterl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

nexttoward(), nexttowardf(), nexttowardl():

    _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE
        || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The nextafter(), nextafterf(), and nextafterl() functions return the next representable floating-point value following x in the direction of y. If y is less than x, these functions will return the largest representable number less than x.

If x equals y, the functions return y.

The nexttoward(), nexttowardf(), and nexttowardl() functions do the same as the corresponding nextafter() functions, except that they have a long double second argument.

RETURN VALUE

On success, these functions return the next representable floating-point value after x in the direction of y.

If x equals y, then y (cast to the same type as x) is returned.

If x or y is a NaN, a NaN is returned.

If x is finite, and the result would overflow, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the correct mathematical sign.

If x is not equal to y, and the correct function result would be subnormal, zero, or underflow, a range error occurs, and either the correct value (if it can be represented), or 0.0, is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error: result overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error: result is subnormal or underflows
errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

nextafter(), nextafterf(), nextafterl(), nexttoward(), nexttowardf(), nexttowardl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

This function is defined in IEC 559 (and the appendix with recommended functions in IEEE 754/IEEE 854).

HISTORY

C99, POSIX.1-2001.

BUGS

In glibc 2.5 and earlier, these functions do not raise an underflow floating-point (FE_UNDERFLOW) exception when an underflow occurs.

Before glibc 2.23 these functions did not set errno.

SEE ALSO

nearbyint(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

650 - Linux cli command Image_ExifTool_Minoltapm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Minoltapm and provides detailed information about the command Image_ExifTool_Minoltapm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Minoltapm.

NAME 🖥️ Image_ExifTool_Minoltapm 🖥️

Minolta EXIF maker notes tags

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret Minolta and Konica-Minolta maker notes in EXIF information, and to read and write Minolta RAW (MRW) images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.dalibor.cz/minolta/makernote.htm>

<http://www.cybercom.net/~dcoffin/dcraw/>

ACKNOWLEDGEMENTS

Thanks to Jay Al-Saadi, Niels Kristian Bech Jensen, Shingo Noguchi, Pedro Corte-Real, Jeffery Small, Jens Duttke, Thomas Kassner, Mladen Sever, Olaf Ulrich, Lukasz Stelmach, Igal Milchtaich, Jos Roost and Michael Reitinger for the information they provided, and for everyone who helped with the LensType list.

SEE ALSO

“Minolta Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

651 - Linux cli command memalign

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command memalign and provides detailed information about the command memalign, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the memalign.

NAME 🖥️ memalign 🖥️

allocate aligned memory

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int posix_memalign(void **memptr, size_t alignment, size_t size);
void *aligned_alloc(size_t alignment, size_t size);
[[deprecated]] void *valloc(size_t size);
#include <malloc.h>
[[deprecated]] void *memalign(size_t alignment, size_t size);
[[deprecated]] void *pvalloc(size_t size);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

posix_memalign():

    _POSIX_C_SOURCE >= 200112L

aligned_alloc():

    _ISOC11_SOURCE

valloc():

    Since glibc 2.12:
        (_XOPEN_SOURCE >= 500) && !(_POSIX_C_SOURCE >= 200112L)
            || /* glibc >= 2.19: */ _DEFAULT_SOURCE
            || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
    Before glibc 2.12:
        _BSD_SOURCE || _XOPEN_SOURCE >= 500

DESCRIPTION

posix_memalign() allocates size bytes and places the address of the allocated memory in *memptr. The address of the allocated memory will be a multiple of alignment, which must be a power of two and a multiple of sizeof(void *). This address can later be successfully passed to free(3). If size is 0, then the value placed in *memptr is either NULL or a unique pointer value.

The obsolete function memalign() allocates size bytes and returns a pointer to the allocated memory. The memory address will be a multiple of alignment, which must be a power of two.

aligned_alloc() is the same as memalign(), except for the added restriction that alignment must be a power of two.

The obsolete function valloc() allocates size bytes and returns a pointer to the allocated memory. The memory address will be a multiple of the page size. It is equivalent to memalign(sysconf(_SC_PAGESIZE),size).

The obsolete function pvalloc() is similar to valloc(), but rounds the size of the allocation up to the next multiple of the system page size.

For all of these functions, the memory is not zeroed.

RETURN VALUE

aligned_alloc(), memalign(), valloc(), and pvalloc() return a pointer to the allocated memory on success. On error, NULL is returned, and errno is set to indicate the error.

posix_memalign() returns zero on success, or one of the error values listed in the next section on failure. The value of errno is not set. On Linux (and other systems), posix_memalign() does not modify memptr on failure. A requirement standardizing this behavior was added in POSIX.1-2008 TC2.

ERRORS

EINVAL
The alignment argument was not a power of two, or was not a multiple of sizeof(void *).

ENOMEM
Out of memory.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

aligned_alloc(), memalign(), posix_memalign()

Thread safetyMT-Safe

valloc(), pvalloc()

Thread safetyMT-Unsafe init

STANDARDS

aligned_alloc()
C11.

posix_memalign()
POSIX.1-2008.

memalign()
valloc()
None.

pvalloc()
GNU.

HISTORY

aligned_alloc()
glibc 2.16. C11.

posix_memalign()
glibc 2.1.91. POSIX.1d, POSIX.1-2001.

memalign()
glibc 2.0. SunOS 4.1.3.

valloc()
glibc 2.0. 3.0BSD. Documented as obsolete in 4.3BSD, and as legacy in SUSv2.

pvalloc()
glibc 2.0.

Headers

Everybody agrees that posix_memalign() is declared in <stdlib.h>.

On some systems memalign() is declared in <stdlib.h> instead of <malloc.h>.

According to SUSv2, valloc() is declared in <stdlib.h>. glibc declares it in <malloc.h>, and also in <stdlib.h> if suitable feature test macros are defined (see above).

NOTES

On many systems there are alignment restrictions, for example, on buffers used for direct block device I/O. POSIX specifies the pathconf(path,_PC_REC_XFER_ALIGN) call that tells what alignment is needed. Now one can use posix_memalign() to satisfy this requirement.

posix_memalign() verifies that alignment matches the requirements detailed above. memalign() may not check that the alignment argument is correct.

POSIX requires that memory obtained from posix_memalign() can be freed using free(3). Some systems provide no way to reclaim memory allocated with memalign() or valloc() (because one can pass to free(3) only a pointer obtained from malloc(3), while, for example, memalign() would call malloc(3) and then align the obtained value). The glibc implementation allows memory obtained from any of these functions to be reclaimed with free(3).

The glibc malloc(3) always returns 8-byte aligned memory addresses, so these functions are needed only if you require larger alignment values.

SEE ALSO

brk(2), getpagesize(2), free(3), malloc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

652 - Linux cli command on_exit

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command on_exit and provides detailed information about the command on_exit, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the on_exit.

NAME 🖥️ on_exit 🖥️

register a function to be called at normal process termination

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int on_exit(void (*function)(int, void *), void *arg);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

on_exit():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The on_exit() function registers the given function to be called at normal process termination, whether via exit(3) or via return from the program’s main(). The function is passed the status argument given to the last call to exit(3) and the arg argument from on_exit().

The same function may be registered multiple times: it is called once for each registration.

When a child process is created via fork(2), it inherits copies of its parent’s registrations. Upon a successful call to one of the exec(3) functions, all registrations are removed.

RETURN VALUE

The on_exit() function returns the value 0 if successful; otherwise it returns a nonzero value.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

on_exit()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

SunOS 4, glibc. Removed in Solaris (SunOS 5). Use the standard atexit(3) instead.

CAVEATS

By the time function is executed, stack (auto) variables may already have gone out of scope. Therefore, arg should not be a pointer to a stack variable; it may however be a pointer to a heap variable or a global variable.

SEE ALSO

_exit(2), atexit(3), exit(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

653 - Linux cli command TAILQ_EMPTY

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command TAILQ_EMPTY and provides detailed information about the command TAILQ_EMPTY, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the TAILQ_EMPTY.

NAME 🖥️ TAILQ_EMPTY 🖥️

implementation of a doubly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
TAILQ_ENTRY(TYPE);
TAILQ_HEAD(HEADNAME, TYPE);
TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD head);
void TAILQ_INIT(TAILQ_HEAD *head);
int TAILQ_EMPTY(TAILQ_HEAD *head);
void TAILQ_INSERT_HEAD(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_TAIL(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_AFTER(TAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_FIRST(TAILQ_HEAD *head);
struct TYPE *TAILQ_LAST(TAILQ_HEAD *head, HEADNAME);
struct TYPE *TAILQ_PREV(struct TYPE *elm, HEADNAME, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_NEXT(struct TYPE *elm, TAILQ_ENTRY NAME);
TAILQ_FOREACH(struct TYPE *var, TAILQ_HEAD *head,
 TAILQ_ENTRY NAME);
TAILQ_FOREACH_REVERSE(struct TYPE *var, TAILQ_HEAD *head, HEADNAME,
 TAILQ_ENTRY NAME);
void TAILQ_REMOVE(TAILQ_HEAD *head, struct TYPE *elm,
 TAILQ_ENTRY NAME);
void TAILQ_CONCAT(TAILQ_HEAD *head1, TAILQ_HEAD *head2,
 TAILQ_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked tail queues.

In the macro definitions, TYPE is the name of a user defined structure, that must contain a field of type TAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user defined structure that must be declared using the macro TAILQ_HEAD().

Creation

A tail queue is headed by a structure defined by the TAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the queue and the other to the last element in the queue. The elements are doubly linked so that an arbitrary element can be removed without traversing the queue. New elements can be added to the queue after an existing element, before an existing element, at the head of the queue, or at the end of the queue. A TAILQ_HEAD structure is declared as follows:

TAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the queue. A pointer to the head of the queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

TAILQ_ENTRY() declares a structure that connects the elements in the queue.

TAILQ_HEAD_INITIALIZER() evaluates to an initializer for the queue head.

TAILQ_INIT() initializes the queue referenced by

TAILQ_EMPTY() evaluates to true if there are no items on the queue. head.

Insertion

TAILQ_INSERT_HEAD() inserts the new element elm at the head of the queue.

TAILQ_INSERT_TAIL() inserts the new element elm at the end of the queue.

TAILQ_INSERT_BEFORE() inserts the new element elm before the element listelm.

TAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

TAILQ_FIRST() returns the first item on the queue, or NULL if the queue is empty.

TAILQ_LAST() returns the last item on the queue. If the queue is empty the return value is NULL.

TAILQ_PREV() returns the previous item on the queue, or NULL if this item is the first.

TAILQ_NEXT() returns the next item on the queue, or NULL if this item is the last.

TAILQ_FOREACH() traverses the queue referenced by head in the forward direction, assigning each element in turn to var. var is set to NULL if the loop completes normally, or if there were no elements.

TAILQ_FOREACH_REVERSE() traverses the queue referenced by head in the reverse direction, assigning each element in turn to var.

Removal

TAILQ_REMOVE() removes the element elm from the queue.

Other features

TAILQ_CONCAT() concatenates the queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

TAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

TAILQ_FIRST(), TAILQ_LAST(), TAILQ_PREV(), and TAILQ_NEXT() return a pointer to the first, last, previous, or next TYPE structure, respectively.

TAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

STANDARDS

BSD.

HISTORY

4.4BSD.

CAVEATS

TAILQ_FOREACH() and TAILQ_FOREACH_REVERSE() don’t allow var to be removed or freed within the loop, as it would interfere with the traversal. TAILQ_FOREACH_SAFE() and TAILQ_FOREACH_REVERSE_SAFE(), which are present on the BSDs but are not present in glibc, fix this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    TAILQ_ENTRY(entry) entries;             /* Tail queue */
};
TAILQ_HEAD(tailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct tailhead head;                   /* Tail queue head */
    int i;
    TAILQ_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    TAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    TAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    TAILQ_INSERT_AFTER(&head, n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    TAILQ_INSERT_BEFORE(n2, n3, entries);
    TAILQ_REMOVE(&head, n2, entries);       /* Deletion */
    free(n2);
                                            /* Forward traversal */
    i = 0;
    TAILQ_FOREACH(np, &head, entries)
        np->data = i++;
                                            /* Reverse traversal */
    TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = TAILQ_FIRST(&head); while (n1 != NULL) { n2 = TAILQ_NEXT(n1, entries); free(n1); n1 = n2; } TAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

654 - Linux cli command zip_source_begin_write

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_begin_write and provides detailed information about the command zip_source_begin_write, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_begin_write.

libzip (-lzip)

The functions

and

prepare

for writing. Usually this involves creating temporary files or allocating buffers.

preserves the first

bytes of the original file. This is done efficiently, and writes to

won’t overwrite the original data until

is called.

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

was added in libzip 1.0.

was added in libzip 1.4.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

655 - Linux cli command lwpcookpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lwpcookpm and provides detailed information about the command lwpcookpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lwpcookpm.

NAME 🖥️ lwpcookpm 🖥️

The libwww-perl cookbook

DESCRIPTION

This document contain some examples that show typical usage of the libwww-perl library. You should consult the documentation for the individual modules for more detail.

All examples should be runnable programs. You can, in most cases, test the code sections by piping the program text directly to perl.

GET

It is very easy to use this library to just fetch documents from the net. The LWP::Simple module provides the get() function that return the document specified by its URL argument:

use LWP::Simple; $doc = get http://search.cpan.org/dist/libwww-perl/;

or, as a perl one-liner using the getprint() function:

perl -MLWP::Simple -e getprint “http://search.cpan.org/dist/libwww-perl/"

or, how about fetching the latest perl by running this command:

perl -MLWP::Simple -e getstore “ftp://ftp.sunet.se/pub/lang/perl/CPAN/src/latest.tar.gz", “perl.tar.gz”

You will probably first want to find a CPAN site closer to you by running something like the following command:

perl -MLWP::Simple -e getprint “http://www.cpan.org/SITES.html"

Enough of this simple stuff! The LWP object oriented interface gives you more control over the request sent to the server. Using this interface you have full control over headers sent and how you want to handle the response returned.

use LWP::UserAgent; $ua = LWP::UserAgent->new; $ua->agent("$0/0.1 " . $ua->agent); # $ua->agent(“Mozilla/8.0”) # pretend we are very capable browser $req = HTTP::Request->new( GET => http://search.cpan.org/dist/libwww-perl/); $req->header(Accept => text/html); # send request $res = $ua->request($req); # check the outcome if ($res->is_success) { print $res->decoded_content; } else { print “Error: " . $res->status_line . " “; }

The lwp-request program (alias GET) that is distributed with the library can also be used to fetch documents from WWW servers.

HEAD

If you just want to check if a document is present (i.e. the URL is valid) try to run code that looks like this:

use LWP::Simple; if (head($url)) { # ok document exists }

The head() function really returns a list of meta-information about the document. The first three values of the list returned are the document type, the size of the document, and the age of the document.

More control over the request or access to all header values returned require that you use the object oriented interface described for GET above. Just s/GET/HEAD/g.

POST

There is no simple procedural interface for posting data to a WWW server. You must use the object oriented interface for this. The most common POST operation is to access a WWW form application:

use LWP::UserAgent; $ua = LWP::UserAgent->new; my $req = HTTP::Request->new( POST => https://rt.cpan.org/Public/Dist/Display.html); $req->content_type(application/x-www-form-urlencoded); $req->content(Status=Active&Name=libwww-perl); my $res = $ua->request($req); print $res->as_string;

Lazy people use the HTTP::Request::Common module to set up a suitable POST request message (it handles all the escaping issues) and has a suitable default for the content_type:

use HTTP::Request::Common qw(POST); use LWP::UserAgent; $ua = LWP::UserAgent->new; my $req = POST https://rt.cpan.org/Public/Dist/Display.html, [ Status => Active, Name => libwww-perl ]; print $ua->request($req)->as_string;

The lwp-request program (alias POST) that is distributed with the library can also be used for posting data.

PROXIES

Some sites use proxies to go through fire wall machines, or just as cache in order to improve performance. Proxies can also be used for accessing resources through protocols not supported directly (or supported badly :-) by the libwww-perl library.

You should initialize your proxy setting before you start sending requests:

use LWP::UserAgent; $ua = LWP::UserAgent->new; $ua->env_proxy; # initialize from environment variables # or $ua->proxy(ftp => http://proxy.myorg.com); $ua->proxy(wais => http://proxy.myorg.com); $ua->no_proxy(qw(no se fi)); my $req = HTTP::Request->new(GET => wais://xxx.com/); print $ua->request($req)->as_string;

The LWP::Simple interface will call env_proxy() for you automatically. Applications that use the $ua->env_proxy() method will normally not use the $ua->proxy() and $ua->no_proxy() methods.

Some proxies also require that you send it a username/password in order to let requests through. You should be able to add the required header, with something like this:

use LWP::UserAgent; $ua = LWP::UserAgent->new; $ua->proxy([http, ftp] => http://username:[email protected]); $req = HTTP::Request->new(GET,“http://www.perl.com”); $res = $ua->request($req); print $res->decoded_content if $res->is_success;

Replace proxy.myorg.com, username and password with something suitable for your site.

ACCESS TO PROTECTED DOCUMENTS

Documents protected by basic authorization can easily be accessed like this:

use LWP::UserAgent; $ua = LWP::UserAgent->new; $req = HTTP::Request->new(GET => http://www.linpro.no/secret/); $req->authorization_basic(aas, mypassword); print $ua->request($req)->as_string;

The other alternative is to provide a subclass of LWP::UserAgent that overrides the get_basic_credentials() method. Study the lwp-request program for an example of this.

COOKIES

Some sites like to play games with cookies. By default LWP ignores cookies provided by the servers it visits. LWP will collect cookies and respond to cookie requests if you set up a cookie jar. LWP doesn’t provide a cookie jar itself, but if you install HTTP::CookieJar::LWP, it can be used like this:

use LWP::UserAgent; use HTTP::CookieJar::LWP; $ua = LWP::UserAgent->new( cookie_jar => HTTP::CookieJar::LWP->new, ); # and then send requests just as you used to do $res = $ua->request(HTTP::Request->new(GET => “http://no.yahoo.com/")); print $res->status_line, " “;

HTTPS

URLs with https scheme are accessed in exactly the same way as with http scheme, provided that an SSL interface module for LWP has been properly installed (see the README.SSL file found in the libwww-perl distribution for more details). If no SSL interface is installed for LWP to use, then you will get “501 Protocol scheme ‘https’ is not supported” errors when accessing such URLs.

Here’s an example of fetching and printing a WWW page using SSL:

use LWP::UserAgent; my $ua = LWP::UserAgent->new; my $req = HTTP::Request->new(GET => https://www.helsinki.fi/); my $res = $ua->request($req); if ($res->is_success) { print $res->as_string; } else { print “Failed: “, $res->status_line, " “; }

MIRRORING

If you want to mirror documents from a WWW server, then try to run code similar to this at regular intervals:

use LWP::Simple; %mirrors = ( http://www.sn.no/ => sn.html, http://www.perl.com/ => perl.html, http://search.cpan.org/distlibwww-perl/ => lwp.html, gopher://gopher.sn.no/ => gopher.html, ); while (($url, $localfile) = each(%mirrors)) { mirror($url, $localfile); }

Or, as a perl one-liner:

perl -MLWP::Simple -e mirror(“http://www.perl.com/", “perl.html”);

The document will not be transferred unless it has been updated.

LARGE DOCUMENTS

If the document you want to fetch is too large to be kept in memory, then you have two alternatives. You can instruct the library to write the document content to a file (second $ua->request() argument is a file name):

use LWP::UserAgent; $ua = LWP::UserAgent->new; my $req = HTTP::Request->new(GET => http://www.cpan.org/CPAN/authors/id/O/OA/OALDERS/libwww-perl-6.26.tar.gz); $res = $ua->request($req, “libwww-perl.tar.gz”); if ($res->is_success) { print “ok “; } else { print $res->status_line, " “; }

Or you can process the document as it arrives (second $ua->request() argument is a code reference):

use LWP::UserAgent; $ua = LWP::UserAgent->new; $URL = ftp://ftp.isc.org/pub/rfc/rfc-index.txt; my $expected_length; my $bytes_received = 0; my $res = $ua->request(HTTP::Request->new(GET => $URL), sub { my($chunk, $res) = @_; $bytes_received += length($chunk); unless (defined $expected_length) { $expected_length = $res->content_length || 0; } if ($expected_length) { printf STDERR “%d%% - “, 100 * $bytes_received / $expected_length; } print STDERR “$bytes_received bytes received “; # XXX Should really do something with the chunk itself # print $chunk; }); print $res->status_line, " “;

COPYRIGHT

Copyright 1996-2001, Gisle Aas

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

656 - Linux cli command ntohs

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ntohs and provides detailed information about the command ntohs, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ntohs.

NAME 🖥️ ntohs 🖥️

convert values between host and network byte order

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <arpa/inet.h>
uint32_t htonl(uint32_t hostlong);
uint16_t htons(uint16_t hostshort);
uint32_t ntohl(uint32_t netlong);
uint16_t ntohs(uint16_t netshort);

DESCRIPTION

The htonl() function converts the unsigned integer hostlong from host byte order to network byte order.

The htons() function converts the unsigned short integer hostshort from host byte order to network byte order.

The ntohl() function converts the unsigned integer netlong from network byte order to host byte order.

The ntohs() function converts the unsigned short integer netshort from network byte order to host byte order.

On the i386 the host byte order is Least Significant Byte first, whereas the network byte order, as used on the Internet, is Most Significant Byte first.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

htonl(), htons(), ntohl(), ntohs()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

SEE ALSO

bswap(3), endian(3), gethostbyname(3), getservent(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

657 - Linux cli command XtNewString

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtNewString and provides detailed information about the command XtNewString, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtNewString.

NAME 🖥️ XtNewString 🖥️

memory management functions

SYNTAX

#include <X11/Intrinsic.h>

char *XtMalloc(Cardinal size);

char *XtCalloc(Cardinal num, Cardinal size);

char *XtRealloc(char *ptr, Cardinal num);

void XtFree(char *ptr);

type *XtNew(type);

String XtNewString(String string);

Cardinal XtAsprintf(char **new_string, const char *format, …);

ARGUMENTS

num
Specifies the number of bytes or array elements.

ptr
Specifies a pointer to the old storage or to the block of storage that is to be freed.

size
Specifies the size of an array element (in bytes) or the number of bytes desired.

string
Specifies a previously declared string.

type
Specifies a previously declared data type.

new_string
Specifies a pointer to write a newly allocated string to.

format
Specifies a formatting string as defined by sprintf(3c)

DESCRIPTION

The XtMalloc functions returns a pointer to a block of storage of at least the specified size bytes. If there is insufficient memory to allocate the new block, XtMalloc calls XtErrorMsg.

The XtCalloc function allocates space for the specified number of array elements of the specified size and initializes the space to zero. If there is insufficient memory to allocate the new block, XtCalloc calls XtErrorMsg.

The XtRealloc function changes the size of a block of storage (possibly moving it). Then, it copies the old contents (or as much as will fit) into the new block and frees the old block. If there is insufficient memory to allocate the new block, XtRealloc calls XtErrorMsg. If ptr is NULL, XtRealloc allocates the new storage without copying the old contents; that is, it simply calls XtMalloc.

The XtFree function returns storage and allows it to be reused. If ptr is NULL, XtFree returns immediately.

XtNew returns a pointer to the allocated storage. If there is insufficient memory to allocate the new block, XtNew calls XtErrorMsg. XtNew is a convenience macro that calls XtMalloc with the following arguments specified:

((type *) XtMalloc((unsigned) sizeof(type))

XtNewString returns a pointer to a new string which is a duplicate of string. If there is insufficient memory to allocate the new block, or the argument is NULL XtNewString returns NULL. The memory can be freed with XtFree.

The XtAsprintf function allocates space for a string large enough to hold the string specified by the sprintf(3c) format pattern when used with the remaining arguments, and fills it with the formatted results. The address of the allocated string is placed into the pointer passed as ret. The length of the string (not including the terminating null byte) is returned. If there is insufficient memory to allocate the new block, XtAsprintf calls XtErrorMsg.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

658 - Linux cli command __ppc_set_ppr_very_low

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __ppc_set_ppr_very_low and provides detailed information about the command __ppc_set_ppr_very_low, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __ppc_set_ppr_very_low.

Programmer’s Manual"

NAME 🖥️ __ppc_set_ppr_very_low 🖥️

Set the Program Priority Register

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/platform/ppc.h>
void __ppc_set_ppr_med(void);
void __ppc_set_ppr_very_low(void);
void __ppc_set_ppr_low(void);
void __ppc_set_ppr_med_low(void);
void __ppc_set_ppr_med_high(void);

DESCRIPTION

These functions provide access to the Program Priority Register (PPR) on the Power architecture.

The PPR is a 64-bit register that controls the program’s priority. By adjusting the PPR value the programmer may improve system throughput by causing system resources to be used more efficiently, especially in contention situations. The available unprivileged states are covered by the following functions:

__ppc_set_ppr_med()
sets the Program Priority Register value to medium (default).

__ppc_set_ppr_very_low()
sets the Program Priority Register value to very low.

__ppc_set_ppr_low()
sets the Program Priority Register value to low.

__ppc_set_ppr_med_low()
sets the Program Priority Register value to medium low.

The privileged state medium high may also be set during certain time intervals by problem-state (unprivileged) programs, with the following function:

__ppc_set_ppr_med_high()
sets the Program Priority to medium high.

If the program priority is medium high when the time interval expires or if an attempt is made to set the priority to medium high when it is not allowed, the priority is set to medium.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

__ppc_set_ppr_med(), __ppc_set_ppr_very_low(), __ppc_set_ppr_low(), __ppc_set_ppr_med_low(), __ppc_set_ppr_med_high()

Thread safetyMT-Safe

STANDARDS

GNU.

HISTORY

__ppc_set_ppr_med()
__ppc_set_ppr_low()
__ppc_set_ppr_med_low()
glibc 2.18.

__ppc_set_ppr_very_low()
__ppc_set_ppr_med_high()
glibc 2.23.

NOTES

The functions __ppc_set_ppr_very_low() and __ppc_set_ppr_med_high() will be defined by <sys/platform/ppc.h> if _ARCH_PWR8 is defined. Availability of these functions can be tested using #ifdef _ARCH_PWR8.

SEE ALSO

__ppc_yield(3)

Power ISA, Book II - Section 3.1 (Program Priority Registers)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

659 - Linux cli command xdrrec_skiprecord

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdrrec_skiprecord and provides detailed information about the command xdrrec_skiprecord, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdrrec_skiprecord.

NAME 🖥️ xdrrec_skiprecord 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

660 - Linux cli command zip_file_extra_field_delete

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_file_extra_field_delete and provides detailed information about the command zip_file_extra_field_delete, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_file_extra_field_delete.

libzip (-lzip)

The

function deletes the extra field with index

for the file at position

in the zip archive.

If

is

then all extra fields will be deleted.

The following

are supported:

Delete extra fields from the archive’s central directory.

Delete extra fields from the local file headers.

The

function deletes the extra field with ID (two-byte signature)

and index

(in other words, the

extra field with ID

The other arguments are the same as for

will delete all extra fields of the specified ID).

Please note that due to the library design, the index of an extra field may be different between central directory and local file headers. For this reason, it is not allowed to specify both

and

in

except when deleting all extra fields (i.e.,

being

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error code in

is set to indicate the error.

and

fail if:

is not a valid file index in

and

were added in libzip 0.11.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

661 - Linux cli command NetSNMP_agent_default_storepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command NetSNMP_agent_default_storepm and provides detailed information about the command NetSNMP_agent_default_storepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the NetSNMP_agent_default_storepm.

NAME 🖥️ NetSNMP_agent_default_storepm 🖥️

Perl extension for Net-SNMP agent default storage

SYNOPSIS

use NetSNMP::agent::default_store qw(:all);

DESCRIPTION

The NetSNMP::agent::default_store module defines the agent-specific Net-SNMP default storage variables.

EXPORT

None by default.

Exportable constants

NETSNMP_DS_AGENT_VERBOSE NETSNMP_DS_AGENT_ROLE NETSNMP_DS_AGENT_NO_ROOT_ACCESS NETSNMP_DS_AGENT_AGENTX_MASTER NETSNMP_DS_AGENT_QUIT_IMMEDIATELY NETSNMP_DS_AGENT_DISABLE_PERL NETSNMP_DS_AGENT_NO_CONNECTION_WARNINGS NETSNMP_DS_AGENT_LEAVE_PIDFILE NETSNMP_DS_AGENT_NO_CACHING NETSNMP_DS_AGENT_STRICT_DISMAN NETSNMP_DS_AGENT_DONT_RETAIN_NOTIFICATIONS NETSNMP_DS_AGENT_DONT_LOG_TCPWRAPPERS_CONNECTS NETSNMP_DS_AGENT_SKIPNFSINHOSTRESOURCES NETSNMP_DS_AGENT_PROGNAME NETSNMP_DS_AGENT_X_SOCKET NETSNMP_DS_AGENT_PORTS NETSNMP_DS_AGENT_INTERNAL_SECNAME NETSNMP_DS_AGENT_PERL_INIT_FILE NETSNMP_DS_SMUX_SOCKET NETSNMP_DS_NOTIF_LOG_CTX NETSNMP_DS_AGENT_FLAGS NETSNMP_DS_AGENT_USERID NETSNMP_DS_AGENT_GROUPID NETSNMP_DS_AGENT_AGENTX_PING_INTERVAL NETSNMP_DS_AGENT_AGENTX_TIMEOUT NETSNMP_DS_AGENT_AGENTX_RETRIES NETSNMP_DS_AGENT_X_SOCK_PERM NETSNMP_DS_AGENT_X_DIR_PERM NETSNMP_DS_AGENT_X_SOCK_USER NETSNMP_DS_AGENT_X_SOCK_GROUP NETSNMP_DS_AGENT_CACHE_TIMEOUT NETSNMP_DS_AGENT_INTERNAL_VERSION NETSNMP_DS_AGENT_INTERNAL_SECLEVEL NETSNMP_DS_AGENT_MAX_GETBULKREPEATS NETSNMP_DS_AGENT_MAX_GETBULKRESPONSES NETSNMP_DS_AGENT_VERBOSE NETSNMP_DS_AGENT_ROLE NETSNMP_DS_AGENT_NO_ROOT_ACCESS NETSNMP_DS_AGENT_AGENTX_MASTER NETSNMP_DS_AGENT_QUIT_IMMEDIATELY NETSNMP_DS_AGENT_DISABLE_PERL NETSNMP_DS_AGENT_NO_CONNECTION_WARNINGS NETSNMP_DS_AGENT_LEAVE_PIDFILE NETSNMP_DS_AGENT_NO_CACHING NETSNMP_DS_AGENT_STRICT_DISMAN NETSNMP_DS_AGENT_DONT_RETAIN_NOTIFICATIONS NETSNMP_DS_AGENT_DONT_LOG_TCPWRAPPERS_CONNECTS NETSNMP_DS_AGENT_SKIPNFSINHOSTRESOURCES NETSNMP_DS_AGENT_PROGNAME NETSNMP_DS_AGENT_X_SOCKET NETSNMP_DS_AGENT_PORTS NETSNMP_DS_AGENT_INTERNAL_SECNAME NETSNMP_DS_AGENT_PERL_INIT_FILE NETSNMP_DS_SMUX_SOCKET NETSNMP_DS_NOTIF_LOG_CTX NETSNMP_DS_AGENT_FLAGS NETSNMP_DS_AGENT_USERID NETSNMP_DS_AGENT_GROUPID NETSNMP_DS_AGENT_AGENTX_PING_INTERVAL NETSNMP_DS_AGENT_AGENTX_TIMEOUT NETSNMP_DS_AGENT_AGENTX_RETRIES NETSNMP_DS_AGENT_X_SOCK_PERM NETSNMP_DS_AGENT_X_DIR_PERM NETSNMP_DS_AGENT_X_SOCK_USER NETSNMP_DS_AGENT_X_SOCK_GROUP NETSNMP_DS_AGENT_CACHE_TIMEOUT NETSNMP_DS_AGENT_INTERNAL_VERSION NETSNMP_DS_AGENT_INTERNAL_SECLEVEL NETSNMP_DS_AGENT_VERBOSE NETSNMP_DS_AGENT_ROLE NETSNMP_DS_AGENT_NO_ROOT_ACCESS NETSNMP_DS_AGENT_AGENTX_MASTER NETSNMP_DS_AGENT_QUIT_IMMEDIATELY NETSNMP_DS_AGENT_DISABLE_PERL NETSNMP_DS_AGENT_NO_CONNECTION_WARNINGS NETSNMP_DS_AGENT_LEAVE_PIDFILE NETSNMP_DS_AGENT_NO_CACHING NETSNMP_DS_AGENT_STRICT_DISMAN NETSNMP_DS_AGENT_DONT_RETAIN_NOTIFICATIONS NETSNMP_DS_AGENT_DONT_LOG_TCPWRAPPERS_CONNECTS NETSNMP_DS_AGENT_SKIPNFSINHOSTRESOURCES NETSNMP_DS_AGENT_PROGNAME NETSNMP_DS_AGENT_X_SOCKET NETSNMP_DS_AGENT_PORTS NETSNMP_DS_AGENT_INTERNAL_SECNAME NETSNMP_DS_AGENT_PERL_INIT_FILE NETSNMP_DS_SMUX_SOCKET NETSNMP_DS_NOTIF_LOG_CTX NETSNMP_DS_AGENT_FLAGS NETSNMP_DS_AGENT_USERID NETSNMP_DS_AGENT_GROUPID NETSNMP_DS_AGENT_AGENTX_PING_INTERVAL NETSNMP_DS_AGENT_AGENTX_TIMEOUT NETSNMP_DS_AGENT_AGENTX_RETRIES NETSNMP_DS_AGENT_X_SOCK_PERM NETSNMP_DS_AGENT_X_DIR_PERM NETSNMP_DS_AGENT_X_SOCK_USER NETSNMP_DS_AGENT_X_SOCK_GROUP NETSNMP_DS_AGENT_CACHE_TIMEOUT NETSNMP_DS_AGENT_INTERNAL_VERSION NETSNMP_DS_AGENT_INTERNAL_SECLEVEL NETSNMP_DS_AGENT_VERBOSE NETSNMP_DS_AGENT_ROLE NETSNMP_DS_AGENT_NO_ROOT_ACCESS NETSNMP_DS_AGENT_AGENTX_MASTER NETSNMP_DS_AGENT_QUIT_IMMEDIATELY NETSNMP_DS_AGENT_DISABLE_PERL NETSNMP_DS_AGENT_NO_CONNECTION_WARNINGS NETSNMP_DS_AGENT_LEAVE_PIDFILE NETSNMP_DS_AGENT_NO_CACHING NETSNMP_DS_AGENT_STRICT_DISMAN NETSNMP_DS_AGENT_DONT_RETAIN_NOTIFICATIONS NETSNMP_DS_AGENT_DONT_LOG_TCPWRAPPERS_CONNECTS NETSNMP_DS_AGENT_SKIPNFSINHOSTRESOURCES NETSNMP_DS_AGENT_PROGNAME NETSNMP_DS_AGENT_X_SOCKET NETSNMP_DS_AGENT_PORTS NETSNMP_DS_AGENT_INTERNAL_SECNAME NETSNMP_DS_AGENT_PERL_INIT_FILE NETSNMP_DS_SMUX_SOCKET NETSNMP_DS_NOTIF_LOG_CTX NETSNMP_DS_AGENT_FLAGS NETSNMP_DS_AGENT_USERID NETSNMP_DS_AGENT_GROUPID NETSNMP_DS_AGENT_AGENTX_PING_INTERVAL NETSNMP_DS_AGENT_AGENTX_TIMEOUT NETSNMP_DS_AGENT_AGENTX_RETRIES NETSNMP_DS_AGENT_X_SOCK_PERM NETSNMP_DS_AGENT_X_DIR_PERM NETSNMP_DS_AGENT_X_SOCK_USER NETSNMP_DS_AGENT_X_SOCK_GROUP NETSNMP_DS_AGENT_CACHE_TIMEOUT NETSNMP_DS_AGENT_INTERNAL_VERSION NETSNMP_DS_AGENT_INTERNAL_SECLEVEL NETSNMP_DS_AGENT_VERBOSE NETSNMP_DS_AGENT_ROLE NETSNMP_DS_AGENT_NO_ROOT_ACCESS NETSNMP_DS_AGENT_AGENTX_MASTER NETSNMP_DS_AGENT_QUIT_IMMEDIATELY NETSNMP_DS_AGENT_DISABLE_PERL NETSNMP_DS_AGENT_NO_CONNECTION_WARNINGS NETSNMP_DS_AGENT_LEAVE_PIDFILE NETSNMP_DS_AGENT_NO_CACHING NETSNMP_DS_AGENT_STRICT_DISMAN NETSNMP_DS_AGENT_DONT_RETAIN_NOTIFICATIONS NETSNMP_DS_AGENT_DONT_LOG_TCPWRAPPERS_CONNECTS NETSNMP_DS_AGENT_SKIPNFSINHOSTRESOURCES NETSNMP_DS_AGENT_PROGNAME NETSNMP_DS_AGENT_X_SOCKET NETSNMP_DS_AGENT_PORTS NETSNMP_DS_AGENT_INTERNAL_SECNAME NETSNMP_DS_AGENT_PERL_INIT_FILE NETSNMP_DS_SMUX_SOCKET NETSNMP_DS_NOTIF_LOG_CTX NETSNMP_DS_AGENT_FLAGS NETSNMP_DS_AGENT_USERID NETSNMP_DS_AGENT_GROUPID NETSNMP_DS_AGENT_AGENTX_PING_INTERVAL NETSNMP_DS_AGENT_AGENTX_TIMEOUT NETSNMP_DS_AGENT_AGENTX_RETRIES NETSNMP_DS_AGENT_X_SOCK_PERM NETSNMP_DS_AGENT_X_DIR_PERM NETSNMP_DS_AGENT_X_SOCK_USER NETSNMP_DS_AGENT_X_SOCK_GROUP NETSNMP_DS_AGENT_CACHE_TIMEOUT NETSNMP_DS_AGENT_INTERNAL_VERSION NETSNMP_DS_AGENT_INTERNAL_SECLEVEL NETSNMP_DS_AGENT_VERBOSE NETSNMP_DS_AGENT_ROLE NETSNMP_DS_AGENT_NO_ROOT_ACCESS NETSNMP_DS_AGENT_AGENTX_MASTER NETSNMP_DS_AGENT_QUIT_IMMEDIATELY NETSNMP_DS_AGENT_DISABLE_PERL NETSNMP_DS_AGENT_PROGNAME NETSNMP_DS_AGENT_X_SOCKET NETSNMP_DS_AGENT_PORTS NETSNMP_DS_AGENT_INTERNAL_SECNAME NETSNMP_DS_AGENT_PERL_INIT_FILE NETSNMP_DS_AGENT_FLAGS NETSNMP_DS_AGENT_USERID NETSNMP_DS_AGENT_GROUPID NETSNMP_DS_AGENT_AGENTX_PING_INTERVAL DS_AGENT_AGENTX_MASTER DS_AGENT_AGENTX_PING_INTERVAL DS_AGENT_FLAGS DS_AGENT_GROUPID DS_AGENT_INTERNAL_SECNAME DS_AGENT_NO_ROOT_ACCESS DS_AGENT_PORTS DS_AGENT_PROGNAME DS_AGENT_ROLE DS_AGENT_USERID DS_AGENT_VERBOSE DS_AGENT_X_SOCKET

AUTHOR

Wes Hardaker, <[email protected]>

SEE ALSO

NetSNMP::default_store (3pm), NetSNMP::agent (3pm), perl (1).

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

662 - Linux cli command XtGetActionList

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGetActionList and provides detailed information about the command XtGetActionList, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGetActionList.

NAME 🖥️ XtGetActionList 🖥️

obtain class action list

SYNTAX

#include <X11/Intrinsic.h>

void XtGetActionList(WidgetClass widget_class, XtActionList* actions_return, Cardinal* num_actions_return);

ARGUMENTS

widget_class
Specifies the widget class whose actions are to be returned.

actions_return
Returns the action list.

num_actions_return
Returns the number of action procedures declared by the class.

DESCRIPTION

XtGetActionList returns the action table defined by the specified widget class. This table does not include actions defined by the superclasses. If widget_class is not initialized, or is not coreWidgetClass or a subclass thereof, or if the class does not define any actions, *actions_return will be NULL and *num_actions_return will be zero. If *actions_return is non-NULL the client is responsible for freeing the table using XtFree when it is no longer needed.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

663 - Linux cli command LWP_Protocol_socks4pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LWP_Protocol_socks4pm and provides detailed information about the command LWP_Protocol_socks4pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LWP_Protocol_socks4pm.

NAME 🖥️ LWP_Protocol_socks4pm 🖥️

adds support for the socks protocol and proxy facility

SYNOPSIS

use LWP::Protocol::socks;

DESCRIPTION

Use this package when you wish to use a socks proxy for your connections.

It provides some essential hooks into the LWP system to implement a socks scheme similar to http for describing your socks connection, and can be used to proxy either http or https connections.

The use case is to use LWP::UserAgent’s proxy method to register your socks proxy like so:

$ua->proxy([qw(http https)] => socks://socks.yahoo.com:1080);

Then just use your $ua object as usual!

EXAMPLES

#!/usr/local/bin/perl use strict; use LWP::UserAgent; my $ua = new LWP::UserAgent(agent => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5); $ua->proxy([qw(http https)] => socks://socks.yahoo.com:1080); my $response = $ua->get(“http://www.freebsd.org”); print $response->code, , $response->message," “; my $response = $ua->get(“https://www.microsoft.com”); print $response->code, , $response->message,” “;

SEE ALSO

URI::socks4

LWP::Protocol::socks

AUTHORS

Oleg G <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

664 - Linux cli command nrand48

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command nrand48 and provides detailed information about the command nrand48, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the nrand48.

NAME 🖥️ nrand48 🖥️

generate uniformly distributed pseudo-random numbers

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
double drand48(void);
double erand48(unsigned short xsubi[3]);
long lrand48(void);
long nrand48(unsigned short xsubi[3]);
long mrand48(void);
long jrand48(unsigned short xsubi[3]);
void srand48(long seedval);
unsigned short *seed48(unsigned short seed16v[3]);
void lcong48(unsigned short param[7]);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

DESCRIPTION

These functions generate pseudo-random numbers using the linear congruential algorithm and 48-bit integer arithmetic.

The drand48() and erand48() functions return nonnegative double-precision floating-point values uniformly distributed over the interval [0.0, 1.0).

The lrand48() and nrand48() functions return nonnegative long integers uniformly distributed over the interval [0, 2^31).

The mrand48() and jrand48() functions return signed long integers uniformly distributed over the interval [-2^31, 2^31).

The srand48(), seed48(), and lcong48() functions are initialization functions, one of which should be called before using drand48(), lrand48(), or mrand48(). The functions erand48(), nrand48(), and jrand48() do not require an initialization function to be called first.

All the functions work by generating a sequence of 48-bit integers, Xi, according to the linear congruential formula:

Xn+1 = (aXn + c) mod m, where n >= 0

The parameter m = 2^48, hence 48-bit integer arithmetic is performed. Unless lcong48() is called, a and c are given by:

a = 0x5DEECE66D
c = 0xB

The value returned by any of the functions drand48(), erand48(), lrand48(), nrand48(), mrand48(), or jrand48() is computed by first generating the next 48-bit Xi in the sequence. Then the appropriate number of bits, according to the type of data item to be returned, is copied from the high-order bits of Xi and transformed into the returned value.

The functions drand48(), lrand48(), and mrand48() store the last 48-bit Xi generated in an internal buffer. The functions erand48(), nrand48(), and jrand48() require the calling program to provide storage for the successive Xi values in the array argument xsubi. The functions are initialized by placing the initial value of Xi into the array before calling the function for the first time.

The initializer function srand48() sets the high order 32-bits of Xi to the argument seedval. The low order 16-bits are set to the arbitrary value 0x330E.

The initializer function seed48() sets the value of Xi to the 48-bit value specified in the array argument seed16v. The previous value of Xi is copied into an internal buffer and a pointer to this buffer is returned by seed48().

The initialization function lcong48() allows the user to specify initial values for Xi, a, and c. Array argument elements param[0-2] specify Xi, param[3-5] specify a, and param[6] specifies c. After lcong48() has been called, a subsequent call to either srand48() or seed48() will restore the standard values of a and c.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

drand48(), erand48(), lrand48(), nrand48(), mrand48(), jrand48(), srand48(), seed48(), lcong48()

Thread safety

MT-Unsafe race:drand48

The above functions record global state information for the random number generator, so they are not thread-safe.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4.

SEE ALSO

rand(3), random(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

665 - Linux cli command Tk_placepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_placepm and provides detailed information about the command Tk_placepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_placepm.

NAME 🖥️ Tk_placepm 🖥️

Geometry manager for fixed or rubber-sheet placement

SYNOPSIS

$widget->place?(-option=>value?, -option=>value, …)?

$widget->placeForget

$widget->placeInfo

$master->placeSlaves

DESCRIPTION

The placer is a geometry manager for Tk. It provides simple fixed placement of windows, where you specify the exact size and location of one window, called the slave, within another window, called the master. The placer also provides rubber-sheet placement, where you specify the size and location of the slave in terms of the dimensions of the master, so that the slave changes size and location in response to changes in the size of the master. Lastly, the placer allows you to mix these styles of placement so that, for example, the slave has a fixed width and height but is centered inside the master.

$slave->place?(-option=>value?, -option=>value, …?)?
The place method arranges for the placer to manage the geometry of $slave. The remaining arguments consist of one or more -option=>value pairs that specify the way in which $slave’s geometry is managed. -option may have any of the values accepted by the placeConfigure method. The place method returns $slave.

$slave->placeConfigure?(-option=>value?, -option=>value, …?)?
Query or modify the geometry options of the $slave. If no option is specified, this method returns a list describing the available options (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the method modifies the given option(s) to have the given value(s); in this case the command returns undef. The following -option=>value pairs are supported:

-anchor => where
Where specifies which point of $slave is to be positioned at the (x,y) location selected by the -x, -y, -relx, and -rely options. The anchor point is in terms of the outer area of $slave including its border, if any. Thus if where is se then the lower-right corner of $slave’s border will appear at the given (x,y) location in the master. The anchor position defaults to nw.

-bordermode => mode
Mode determines the degree to which borders within the master are used in determining the placement of the slave. The default and most common value is inside. In this case the placer considers the area of the master to be the innermost area of the master, inside any border: an option of -x=>0 corresponds to an x-coordinate just inside the border and an option of -relwidth=>1.0 means $slave will fill the area inside the master’s border. If mode is outside then the placer considers the area of the master to include its border; this mode is typically used when placing $slave outside its master, as with the options -x=>0, -y=>0, -anchor=>ne. Lastly, mode may be specified as ignore, in which case borders are ignored: the area of the master is considered to be its official X area, which includes any internal border but no external border. A bordermode of ignore is probably not very useful.

-height => size
Size specifies the height for $slave in screen units (i.e. any of the forms accepted by Tk_GetPixels). The height will be the outer dimension of $slave including its border, if any. If size is an empty string, or if no -height or -relheight option is specified, then the height requested internally by the window will be used.

-in => $master
$master is the reference to the window relative to which $slave is to be placed. $master must either be $slave’s parent or a descendant of $slave’s parent. In addition, $master and $slave must both be descendants of the same top-level window. These restrictions are necessary to guarantee that $slave is visible whenever $master is visible. If this option isn’t specified then the master defaults to $slave’s parent.

-relheight => size
Size specifies the height for $slave. In this case the height is specified as a floating-point number relative to the height of the master: 0.5 means $slave will be half as high as the master, 1.0 means $slave will have the same height as the master, and so on. If both -height and -relheight are specified for a slave, their values are summed. For example, -relheight=>1.0, -height=>-2 makes the slave 2 pixels shorter than the master.

-relwidth => size
Size specifies the width for $slave. In this case the width is specified as a floating-point number relative to the width of the master: 0.5 means $slave will be half as wide as the master, 1.0 means $slave will have the same width as the master, and so on. If both -width and -relwidth are specified for a slave, their values are summed. For example, -relwidth=>1.0, -width=>5 makes the slave 5 pixels wider than the master.

-relx => location
Location specifies the x-coordinate within the master window of the anchor point for $slave widget. In this case the location is specified in a relative fashion as a floating-point number: 0.0 corresponds to the left edge of the master and 1.0 corresponds to the right edge of the master. Location need not be in the range 0.0-1.0. If both -x and -relx are specified for a slave then their values are summed. For example, “-relx=>0.5, -x=-2” positions the left edge of the slave 2 pixels to the left of the center of its master.

-rely => location
Location specifies the y-coordinate within the master window of the anchor point for $slave widget. In this case the value is specified in a relative fashion as a floating-point number: 0.0 corresponds to the top edge of the master and 1.0 corresponds to the bottom edge of the master. Location need not be in the range 0.0-1.0. If both -y and -rely are specified for a slave then their values are summed. For example, -rely=>0.5, -x=>3 positions the top edge of the slave 3 pixels below the center of its master.

-width => size
Size specifies the width for $slave in screen units (i.e. any of the forms accepted by Tk_GetPixels). The width will be the outer width of $slave including its border, if any. If size is an empty string, or if no -width or -relwidth option is specified, then the width requested internally by the window will be used.

-x => location
Location specifies the x-coordinate within the master window of the anchor point for $slave widget. The location is specified in screen units (i.e. any of the forms accepted by Tk_GetPixels) and need not lie within the bounds of the master window.

-y => location
Location specifies the y-coordinate within the master window of the anchor point for $slave widget. The location is specified in screen units (i.e. any of the forms accepted by Tk_GetPixels) and need not lie within the bounds of the master window.

If the same value is specified separately with two different options, such as -x and -relx, then the most recent option is used and the older one is ignored.

$slave->placeForget
The placeForget method causes the placer to stop managing the geometry of $slave. As a side effect of this method call $slave will be unmapped so that it doesn’t appear on the screen. If $slave isn’t currently managed by the placer then the method call has no effect. placeForget returns an empty string as result.

$slave->placeInfo
The placeInfo method returns a list giving the current configuration of $slave. The list consists of -option=>value pairs in exactly the same form as might be specified to the place method.

$slave->placeSlaves
The placeSlaves method returns a list of all the slave windows for which $master is the master. If there are no slaves for $master then an empty list is returned.

If the configuration of a window has been retrieved with placeInfo, that configuration can be restored later by first using placeForget to erase any existing information for the window and then invoking place with the saved information.

FINE POINTS

It is not necessary for the master window to be the parent of the slave window. This feature is useful in at least two situations. First, for complex window layouts it means you can create a hierarchy of subwindows whose only purpose is to assist in the layout of the parent. The ``real children’’ of the parent (i.e. the windows that are significant for the application’s user interface) can be children of the parent yet be placed inside the windows of the geometry-management hierarchy. This means that the path names of the ``real children’’ don’t reflect the geometry-management hierarchy and users can specify options for the real children without being aware of the structure of the geometry-management hierarchy.

A second reason for having a master different than the slave’s parent is to tie two siblings together. For example, the placer can be used to force a window always to be positioned centered just below one of its siblings by specifying the configuration

-in=>$sibling, -relx=>0.5, -rely=>1.0, -anchor=>’n’, -bordermode=>‘outside’

Whenever the $sibling widget is repositioned in the future, the slave will be repositioned as well.

Unlike many other geometry managers (such as the packer) the placer does not make any attempt to manipulate the geometry of the master windows or the parents of slave windows (i.e. it doesn’t set their requested sizes). To control the sizes of these windows, make them windows like frames and canvases that provide configuration options for this purpose.

SEE ALSO

Tk::form, Tk::grid, Tk::pack

KEYWORDS

geometry manager, height, location, master, place, rubber sheet, slave, width

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

666 - Linux cli command XtCallConverter

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtCallConverter and provides detailed information about the command XtCallConverter, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtCallConverter.

NAME 🖥️ XtCallConverter 🖥️

invoke resource converters

SYNTAX

#include <X11/Intrinsic.h>

Boolean XtConvertAndStore(Widget widget, const char *from_type, XrmValuePtr from, const char *to_type, XrmValuePtr to_in_out);

Boolean XtCallConverter(Display* dpy, XtTypeConverter converter, XrmValuePtr args, Cardinal num_args, XrmValuePtr from, XrmValuePtr to_in_out, XtCacheRef* cache_ref_return);

ARGUMENTS

args
Specifies the argument list that contains the additional arguments needed to perform the conversion, or NULL.

converter
Specifies the conversion procedure that is to be called.

from
Specifies the value to be converted.

from_type
Specifies the source type.

num_args
Specifies the number of additional arguments (often zero).

to_type
Specifies the destination type.

to_in_out
Returns the converted value.

widget
Specifies the widget to use for additional arguments, if any are needed, and the destroy callback list.

dpy
Specifies the display with which the conversion is to be associated.

DESCRIPTION

The XtConvertAndStore function looks up the type converter registered to convert from_type to to_type, computes any additional arguments needed, and then calls XtCallConverter. (or XtDirectConvert if an old-style converter was registered with XtAddConverter or XtAppAddConverter. ) with the from and to_in_out arguments.

The XtCallConverter function looks up the specified type converter in the application context associated with the display and, if the converter was not registered or was registered with cache type XtCacheAll or XtCacheByDisplay looks in the conversion cache to see if this conversion procedure has been called with the specified conversion arguments. If so, it checks the success status of the prior call, and if the conversion failed, XtCallConverter returns False immediately; otherwise it checks the size specified in the to argument and, if it is greater than or equal to the size stored in the cache, copies the information stored in the cache into the location specified by to->addr, stores the cache size into to->size, and returns True. If the size specified in the to argument is smaller than the size stored in the cache, XtCallConverter copies the cache size into the to->size and returns False. If the converter was registered with cache type XtCacheNone or no value was found in the conversion cache, XtCallConverter calls the converter and, if it was not registered with cache type XtCacheNone, enters the result into the cache. XtCallConverter then returns what the converter returned.

The cache_ref_return field specifies storage allocated by the caller in which an opaque value will be stored. If the type converter has been registered with the XtCacheRefCount modifier and if the value returned in in cache_ref_return is non-NULL, then the call should store the cache_ref_return value in order to decrement the reference count when the converted value is no longer required. The cache_ref_return argument should be NULL if the caller is unwilling or unable to store the value.

SEE ALSO

XtAppReleaseCacheRefs(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

667 - Linux cli command logl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command logl and provides detailed information about the command logl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the logl.

NAME 🖥️ logl 🖥️

natural logarithmic function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double log(double x);
float logf(float x);
long double logl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

logf(), logl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the natural logarithm of x.

RETURN VALUE

On success, these functions return the natural logarithm of x.

If x is a NaN, a NaN is returned.

If x is 1, the result is +0.

If x is positive infinity, positive infinity is returned.

If x is zero, then a pole error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.

If x is negative (including negative infinity), then a domain error occurs, and a NaN (not a number) is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is negative
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

Pole error: x is zero
errno is set to ERANGE. A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

log(), logf(), logl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

BUGS

In glibc 2.5 and earlier, taking the log() of a NaN produces a bogus invalid floating-point (FE_INVALID) exception.

SEE ALSO

cbrt(3), clog(3), log10(3), log1p(3), log2(3), sqrt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

668 - Linux cli command Net_DNS_RR_AMTRELAYpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_AMTRELAYpm and provides detailed information about the command Net_DNS_RR_AMTRELAYpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_AMTRELAYpm.

NAME 🖥️ Net_DNS_RR_AMTRELAYpm 🖥️

DNS AMTRELAY resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(owner AMTRELAY precedence Dbit relaytype relay);

DESCRIPTION

AMTRELAY resource record designed to permit DNS Reverse IP AMT Discovery (DRIAD), a mechanism for AMT gateways to discover AMT relays that are capable of forwarding multicast traffic from a known source IP address.

AMT (Automatic Multicast Tunneling) is defined in RFC7450 and provides a method to transport multicast traffic over a unicast tunnel in order to traverse network segments that are not multicast capable.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

precedence

$precedence = $rr->precedence; $rr->precedence( $precedence );

8-bit integer which indicates relative precedence within the RRset. Relays listed in AMTRELAY records with lower precedence are to be attempted first.

Dbit, Discovery Optional

$Dbit = $rr->Dbit; $rr->Dbit(1);

Boolean field which indicates that the gateway MAY send an AMT Request message directly to the discovered relay address without first sending an AMT Discovery message.

relaytype

$relaytype = $rr->relaytype;

The relaytype type field indicates the format of the information that is stored in the relay field.

The following values are defined:

0: The relay field is empty (0 bytes). 1: The relay field contains a 4-octet IPv4 address. 2: The relay field contains a 16-octet IPv6 address. 3: The relay field contains a wire-encoded domain name.

relay

$relay = $rr->relay; $rr->relay( $relay );

The relay field is the address or domain name of the AMT relay. It is formatted according to the relaytype field.

COPYRIGHT

Copyright (c)2020 Dick Franks.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC8777 <https://tools.ietf.org/html/rfc8777>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

669 - Linux cli command libxml

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command libxml and provides detailed information about the command libxml, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the libxml.

NAME 🖥️ libxml 🖥️

library used to parse XML files

DESCRIPTION

The libxml library is used to parse XML files. Its internal document representation is as close as possible to the DOM (Document Object Model) interface, an API for accessing XML or HTML structured documents.

The libxml library also has a SAX-like interface, which is designed to be compatible with expat(1). NOTE: SAX, the Simple API for XML, is a standard interface for event-based XML parsing, developed collaboratively by the members of the XML-DEV mailing list, currently hosted by OASIS. The expat library is a XML 1.0 parser written in C, which aims to be fully conforming. It is currently not a validating XML processor.

The libxml library now includes a nearly complete XPath implementation. The XPath (XML Path Language) is a language for addressing parts of an XML document, designed to be used by both XSLT and XPointer.

The libxml library exports Push and Pull type parser interfaces for both XML and html.

FILES

/depot/lib/libxml_2.0.0/libxml.a
static library

/depot/lib/libxml_2.0.0/libxml.so
shared library

/depot/package/libxml_2.0.0/bin/xmllint
binary application for parsing XML files

AUTHORS

Daniel Veillard ([email protected]). Red Hat Inc. Manual page by Ziying Sherwin ([email protected]), Lister Hill National Center for Biomedical Communications, U.S. National Library of Medicine.

SEE ALSO

xmllint(1), libxslt(3), libexslt(3), xsltproc(1)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

670 - Linux cli command sigset

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigset and provides detailed information about the command sigset, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigset.

NAME 🖥️ sigset 🖥️

System V signal API

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
typedef void (*sighandler_t)(int);
[[deprecated]] sighandler_t sigset(int sig, sighandler_t disp);
[[deprecated]] int sighold(int sig);
[[deprecated]] int sigrelse(int sig);
[[deprecated]] int sigignore(int sig);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sigset(), sighold(), sigrelse(), sigignore():

    _XOPEN_SOURCE >= 500

DESCRIPTION

These functions are provided in glibc as a compatibility interface for programs that make use of the historical System V signal API. This API is obsolete: new applications should use the POSIX signal API (sigaction(2), sigprocmask(2), etc.)

The sigset() function modifies the disposition of the signal sig. The disp argument can be the address of a signal handler function, or one of the following constants:

SIG_DFL
Reset the disposition of sig to the default.

SIG_IGN
Ignore sig.

SIG_HOLD
Add sig to the process’s signal mask, but leave the disposition of sig unchanged.

If disp specifies the address of a signal handler, then sig is added to the process’s signal mask during execution of the handler.

If disp was specified as a value other than SIG_HOLD, then sig is removed from the process’s signal mask.

The dispositions for SIGKILL and SIGSTOP cannot be changed.

The sighold() function adds sig to the calling process’s signal mask.

The sigrelse() function removes sig from the calling process’s signal mask.

The sigignore() function sets the disposition of sig to SIG_IGN.

RETURN VALUE

On success, sigset() returns SIG_HOLD if sig was blocked before the call, or the signal’s previous disposition if it was not blocked before the call. On error, sigset() returns -1, with errno set to indicate the error. (But see BUGS below.)

The sighold(), sigrelse(), and sigignore() functions return 0 on success; on error, these functions return -1 and set errno to indicate the error.

ERRORS

For sigset() see the ERRORS under sigaction(2) and sigprocmask(2).

For sighold() and sigrelse() see the ERRORS under sigprocmask(2).

For sigignore(), see the errors under sigaction(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sigset(), sighold(), sigrelse(), sigignore()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

sighandler_t
GNU. POSIX.1 uses the same type but without a typedef.

HISTORY

glibc 2.1. SVr4, POSIX.1-2001. POSIX.1-2008 marks these functions as obsolete, recommending the use of sigaction(2), sigprocmask(2), pthread_sigmask(3), and sigsuspend(2) instead.

NOTES

The sigset() function provides reliable signal handling semantics (as when calling sigaction(2) with sa_mask equal to 0).

On System V, the signal() function provides unreliable semantics (as when calling sigaction(2) with sa_mask equal to SA_RESETHAND | SA_NODEFER). On BSD, signal() provides reliable semantics. POSIX.1-2001 leaves these aspects of signal() unspecified. See signal(2) for further details.

In order to wait for a signal, BSD and System V both provided a function named sigpause(3), but this function has a different argument on the two systems. See sigpause(3) for details.

BUGS

Before glibc 2.2, sigset() did not unblock sig if disp was specified as a value other than SIG_HOLD.

Before glibc 2.5, sigset() does not correctly return the previous disposition of the signal in two cases. First, if disp is specified as SIG_HOLD, then a successful sigset() always returns SIG_HOLD. Instead, it should return the previous disposition of the signal (unless the signal was blocked, in which case SIG_HOLD should be returned). Second, if the signal is currently blocked, then the return value of a successful sigset() should be SIG_HOLD. Instead, the previous disposition of the signal is returned. These problems have been fixed since glibc 2.5.

SEE ALSO

kill(2), pause(2), sigaction(2), signal(2), sigprocmask(2), raise(3), sigpause(3), sigvec(3), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

671 - Linux cli command strfroml

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strfroml and provides detailed information about the command strfroml, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strfroml.

NAME 🖥️ strfroml 🖥️

convert a floating-point value into a string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int strfromd(char str[restrict .n], size_t n,
 const char *restrict format, double fp);
int strfromf(char str[restrict .n], size_t n,
 const char *restrict format, float fp);
int strfroml(char str[restrict .n], size_t n,
 const char *restrict format, long double fp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strfromd(), strfromf(), strfroml():

    __STDC_WANT_IEC_60559_BFP_EXT__

DESCRIPTION

These functions convert a floating-point value, fp, into a string of characters, str, with a configurable format string. At most n characters are stored into str.

The terminating null byte (‘�’) is written if and only if n is sufficiently large, otherwise the written string is truncated at n characters.

The strfromd(), strfromf(), and strfroml() functions are equivalent to

snprintf(str, n, format, fp);

except for the format string.

Format of the format string

The format string must start with the character ‘%’. This is followed by an optional precision which starts with the period character (.), followed by an optional decimal integer. If no integer is specified after the period character, a precision of zero is used. Finally, the format string should have one of the conversion specifiers a, A, e, E, f, F, g, or G.

The conversion specifier is applied based on the floating-point type indicated by the function suffix. Therefore, unlike snprintf(), the format string does not have a length modifier character. See snprintf(3) for a detailed description of these conversion specifiers.

The implementation conforms to the C99 standard on conversion of NaN and infinity values:

If fp is a NaN, +NaN, or -NaN, and f (or a, e, g) is the conversion specifier, the conversion is to “nan”, “nan”, or “-nan”, respectively. If F (or A, E, G) is the conversion specifier, the conversion is to “NAN” or “-NAN”.

Likewise if fp is infinity, it is converted to [-]inf or [-]INF.

A malformed format string results in undefined behavior.

RETURN VALUE

The strfromd(), strfromf(), and strfroml() functions return the number of characters that would have been written in str if n had enough space, not counting the terminating null byte. Thus, a return value of n or greater means that the output was truncated.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7) and the POSIX Safety Concepts section in GNU C Library manual.

InterfaceAttributeValue

strfromd(), strfromf(), strfroml()

Thread safetyMT-Safe locale
Async-signal safetyAS-Unsafe heap
Async-cancel safetyAC-Unsafe mem

Note: these attributes are preliminary.

STANDARDS

ISO/IEC TS 18661-1.

VERSIONS

strfromd()
strfromf()
strfroml()
glibc 2.25.

NOTES

These functions take account of the LC_NUMERIC category of the current locale.

EXAMPLES

To convert the value 12.1 as a float type to a string using decimal notation, resulting in “12.100000”:

#define __STDC_WANT_IEC_60559_BFP_EXT__
#include <stdlib.h>
int ssize = 10;
char s[ssize];
strfromf(s, ssize, "%f", 12.1);

To convert the value 12.3456 as a float type to a string using decimal notation with two digits of precision, resulting in “12.35”:

#define __STDC_WANT_IEC_60559_BFP_EXT__
#include <stdlib.h>
int ssize = 10;
char s[ssize];
strfromf(s, ssize, "%.2f", 12.3456);

To convert the value 12.345e19 as a double type to a string using scientific notation with zero digits of precision, resulting in “1E+20”:

#define __STDC_WANT_IEC_60559_BFP_EXT__
#include <stdlib.h>
int ssize = 10;
char s[ssize];
strfromd(s, ssize, "%.E", 12.345e19);

SEE ALSO

atof(3), snprintf(3), strtod(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

672 - Linux cli command putc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command putc and provides detailed information about the command putc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the putc.

NAME 🖥️ putc 🖥️

output of characters and strings

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int fputc(int c, FILE *stream);
int putc(int c, FILE *stream);
int putchar(int c);
int fputs(const char *restrict s, FILE *restrict stream);
int puts(const char *s);

DESCRIPTION

fputc() writes the character c, cast to an unsigned char, to stream.

putc() is equivalent to fputc() except that it may be implemented as a macro which evaluates stream more than once.

putchar(c) is equivalent to putc(c, stdout).

fputs() writes the string s to stream, without its terminating null byte (‘�’).

puts() writes the string s and a trailing newline to stdout.

Calls to the functions described here can be mixed with each other and with calls to other output functions from the stdio library for the same output stream.

For nonlocking counterparts, see unlocked_stdio(3).

RETURN VALUE

fputc(), putc(), and putchar() return the character written as an unsigned char cast to an int or EOF on error.

puts() and fputs() return a nonnegative number on success, or EOF on error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fputc(), fputs(), putc(), putchar(), puts()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89, C99.

BUGS

It is not advisable to mix calls to output functions from the stdio library with low-level calls to write(2) for the file descriptor associated with the same output stream; the results will be undefined and very probably not what you want.

SEE ALSO

write(2), ferror(3), fgets(3), fopen(3), fputwc(3), fputws(3), fseek(3), fwrite(3), putwchar(3), scanf(3), unlocked_stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

673 - Linux cli command Spreadsheet_ParseExcel_Formatpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_ParseExcel_Formatpm and provides detailed information about the command Spreadsheet_ParseExcel_Formatpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_ParseExcel_Formatpm.

NAME 🖥️ Spreadsheet_ParseExcel_Formatpm 🖥️

A class for Cell formats.

SYNOPSIS

See the documentation for Spreadsheet::ParseExcel.

DESCRIPTION

This module is used in conjunction with Spreadsheet::ParseExcel. See the documentation for Spreadsheet::ParseExcel.

AUTHOR

Current maintainer 0.60+: Douglas Wilson [email protected]

Maintainer 0.40-0.59: John McNamara [email protected]

Maintainer 0.27-0.33: Gabor Szabo [email protected]

Original author: Kawai Takanori [email protected]

COPYRIGHT

Copyright (c) 2014 Douglas Wilson

Copyright (c) 2009-2013 John McNamara

Copyright (c) 2006-2008 Gabor Szabo

Copyright (c) 2000-2006 Kawai Takanori

All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

674 - Linux cli command wctob

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wctob and provides detailed information about the command wctob, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wctob.

NAME 🖥️ wctob 🖥️

try to represent a wide character as a single byte

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
int wctob(wint_t c);

DESCRIPTION

The wctob() function tests whether the multibyte representation of the wide character c, starting in the initial state, consists of a single byte. If so, it is returned as an unsigned char.

Never use this function. It cannot help you in writing internationalized programs. Internationalized programs must never distinguish single-byte and multibyte characters.

RETURN VALUE

The wctob() function returns the single-byte representation of c, if it exists, or EOF otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wctob()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of wctob() depends on the LC_CTYPE category of the current locale.

This function should never be used. Internationalized programs must never distinguish single-byte and multibyte characters. Use either wctomb(3) or the thread-safe wcrtomb(3) instead.

SEE ALSO

btowc(3), wcrtomb(3), wctomb(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

675 - Linux cli command y0f

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command y0f and provides detailed information about the command y0f, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the y0f.

NAME 🖥️ y0f 🖥️

Bessel functions of the second kind

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double y0(double x);
double y1(double x);
double yn(int n, double x);
float y0f(float x);
float y1f(float x);
float ynf(int n, float x);
long double y0l(long double x);
long double y1l(long double x);
long double ynl(int n, long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

y0(), y1(), yn():

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

y0f(), y0l(), y1f(), y1l(), ynf(), ynl():

    _XOPEN_SOURCE >= 600
        || (_ISOC99_SOURCE && _XOPEN_SOURCE)
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The y0() and y1() functions return Bessel functions of x of the second kind of orders 0 and 1, respectively. The yn() function returns the Bessel function of x of the second kind of order n.

The value of x must be positive.

The y0f(), y1f(), and ynf() functions are versions that take and return float values. The y0l(), y1l(), and ynl() functions are versions that take and return long double values.

RETURN VALUE

On success, these functions return the appropriate Bessel value of the second kind for x.

If x is a NaN, a NaN is returned.

If x is negative, a domain error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively. (POSIX.1-2001 also allows a NaN return for this case.)

If x is 0.0, a pole error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.

If the result underflows, a range error occurs, and the functions return 0.0

If the result overflows, a range error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively. (POSIX.1-2001 also allows a 0.0 return for this case.)

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is negative
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

Pole error: x is 0.0
errno is set to ERANGE and an FE_DIVBYZERO exception is raised (but see BUGS).

Range error: result underflow
errno is set to ERANGE. No FE_UNDERFLOW exception is returned by fetestexcept(3) for this case.

Range error: result overflow
errno is set to ERANGE (but see BUGS). An overflow floating-point exception (FE_OVERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

y0(), y0f(), y0l()

Thread safetyMT-Safe

y1(), y1f(), y1l()

Thread safetyMT-Safe

yn(), ynf(), ynl()

Thread safetyMT-Safe

STANDARDS

y0()
y1()
yn()
POSIX.1-2008.

Others:
BSD.

HISTORY

y0()
y1()
yn()
SVr4, 4.3BSD, POSIX.1-2001.

Others:
BSD.

BUGS

Before glibc 2.19, these functions misdiagnosed pole errors: errno was set to EDOM, instead of ERANGE and no FE_DIVBYZERO exception was raised.

Before glibc 2.17, did not set errno for “range error: result underflow”.

In glibc 2.3.2 and earlier, these functions do not raise an invalid floating-point exception (FE_INVALID) when a domain error occurs.

SEE ALSO

j0(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

676 - Linux cli command pcap_get_selectable_fdpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_get_selectable_fdpcap and provides detailed information about the command pcap_get_selectable_fdpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_get_selectable_fdpcap.

NAME 🖥️ pcap_get_selectable_fdpcap 🖥️

get a file descriptor on which a select() can be done for a live capture

SYNOPSIS

#include <pcap/pcap.h>
int pcap_get_selectable_fd(pcap_t *p);

DESCRIPTION

pcap_get_selectable_fd() returns, on UNIX, a file descriptor number for a file descriptor on which one can do a select(2), poll(2), epoll_wait(2), kevent(2), or other such call to wait for it to be possible to read packets without blocking, if such a descriptor exists, or -1, if no such descriptor exists.

Some network devices opened with pcap_create(3PCAP) and pcap_activate(3PCAP), or with pcap_open_live(3PCAP), do not support those calls (for example, regular network devices on FreeBSD 4.3 and 4.4, and Endace DAG devices), so -1 is returned for those devices. In that case, those calls must be given a timeout less than or equal to the timeout returned by pcap_get_required_select_timeout(3PCAP) for the device for which pcap_get_selectable_fd() returned -1, the device must be put in non-blocking mode with a call to pcap_setnonblock(3PCAP), and an attempt must always be made to read packets from the device when the call returns. If pcap_get_required_select_timeout() returns NULL, it is not possible to wait for packets to arrive on the device in an event loop.

Note that a device on which a read can be done without blocking may, on some platforms, not have any packets to read if the packet buffer timeout has expired. A call to pcap_dispatch(3PCAP) or pcap_next_ex(3PCAP) will return 0 in this case, but will not block.

Note that in:

FreeBSD prior to FreeBSD 4.6;

NetBSD prior to NetBSD 3.0;

OpenBSD prior to OpenBSD 2.4;

Mac OS X prior to Mac OS X 10.7;

select(), poll(), and kevent() do not work correctly on BPF devices; pcap_get_selectable_fd() will return a file descriptor on most of those versions (the exceptions being FreeBSD 4.3 and 4.4), but a simple select(), poll(), or kevent() call will not indicate that the descriptor is readable until a full buffer’s worth of packets is received, even if the packet timeout expires before then. To work around this, code that uses those calls to wait for packets to arrive must put the pcap_t in non-blocking mode, and must arrange that the call have a timeout less than or equal to the packet buffer timeout, and must try to read packets after that timeout expires, regardless of whether the call indicated that the file descriptor for the pcap_t is ready to be read or not. (That workaround will not work in FreeBSD 4.3 and later; however, in FreeBSD 4.6 and later, those calls work correctly on BPF devices, so the workaround isn’t necessary, although it does no harm.)

Note also that poll() and kevent() doesn’t work on character special files, including BPF devices, in Mac OS X 10.4 and 10.5, so, while select() can be used on the descriptor returned by pcap_get_selectable_fd(), poll() and kevent() cannot be used on it those versions of Mac OS X. poll(), but not kevent(), works on that descriptor in Mac OS X releases prior to 10.4; poll() and kevent() work on that descriptor in Mac OS X 10.6 and later.

pcap_get_selectable_fd() is not available on Windows.

RETURN VALUE

A selectable file descriptor is returned if one exists; otherwise, -1 is returned.

SEE ALSO

pcap(3PCAP), kqueue(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

677 - Linux cli command XtAppError

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppError and provides detailed information about the command XtAppError, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppError.

NAME 🖥️ XtAppError 🖥️

low-level error handlers

SYNTAX

#include <X11/Intrinsic.h>

void XtAppError(XtAppContext app_context, const char *message);

XtErrorHandler XtAppSetErrorHandler(XtAppContext app_context, XtErrorHandler handler);

XtErrorHandler XtAppSetWarningHandler(XtAppContext app_context, XtErrorHandler handler);

void XtAppWarning(XtAppContext app_context, const char *message);

ARGUMENTS

app_context
Specifies the application context.

message
Specifies the nonfatal error message that is to be reported.

handler
Specifies the new fatal error procedure, which should not return, or the nonfatal error procedure, which usually returns.

message
Specifies the message that is to be reported.

DESCRIPTION

The XtAppError function calls the installed error procedure and passes the specified message.

The XtAppSetErrorHandler function registers the specified procedure, which is called when a fatal error condition occurs.

The XtAppSetWarningHandler registers the specified procedure, which is called when a nonfatal error condition occurs.

The XtAppWarning function calls the installed nonfatal error procedure and passes the specified message.

SEE ALSO

XtAppGetErrorDatabase(3), XtAppErrorMsg(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

678 - Linux cli command IO_HTMLpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_HTMLpm and provides detailed information about the command IO_HTMLpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_HTMLpm.

NAME 🖥️ IO_HTMLpm 🖥️

Open an HTML file with automatic charset detection

VERSION

This document describes version 1.004 of IO::HTML, released September 26, 2020.

SYNOPSIS

use IO::HTML; # exports html_file by default use HTML::TreeBuilder; my $tree = HTML::TreeBuilder->new_from_file( html_file(foo.html) ); # Alternative interface: open(my $in, <:raw, bar.html); my $encoding = IO::HTML::sniff_encoding($in, bar.html);

DESCRIPTION

IO::HTML provides an easy way to open a file containing HTML while automatically determining its encoding. It uses the HTML5 encoding sniffing algorithm specified in section 8.2.2.2 of the draft standard.

The algorithm as implemented here is:

  1. If the file begins with a byte order mark indicating UTF-16LE, UTF-16BE, or UTF-8, then that is the encoding.

  2. If the first $bytes_to_check bytes of the file contain a <meta> tag that indicates the charset, and Encode recognizes the specified charset name, then that is the encoding. (This portion of the algorithm is implemented by find_charset_in.) The <meta> tag can be in one of two formats: <meta charset="…"> <meta http-equiv=“Content-Type” content="…charset=…"> The search is case-insensitive, and the order of attributes within the tag is irrelevant. Any additional attributes of the tag are ignored. The first matching tag with a recognized encoding ends the search.

  3. If the first $bytes_to_check bytes of the file are valid UTF-8 (with at least 1 non-ASCII character), then the encoding is UTF-8.

  4. If all else fails, use the default character encoding. The HTML5 standard suggests the default encoding should be locale dependent, but currently it is always cp1252 unless you set $IO::HTML::default_encoding to a different value. Note: sniff_encoding does not apply this step; only html_file does that.

SUBROUTINES

html_file

$filehandle = html_file($filename, \options);

This function (exported by default) is the primary entry point. It opens the file specified by $filename for reading, uses sniff_encoding to find a suitable encoding layer, and applies it. It also applies the :crlf layer. If the file begins with a BOM, the filehandle is positioned just after the BOM.

The optional second argument is a hashref containing options. The possible keys are described under find_charset_in.

If sniff_encoding is unable to determine the encoding, it defaults to $IO::HTML::default_encoding, which is set to cp1252 (a.k.a. Windows-1252) by default. According to the standard, the default should be locale dependent, but that is not currently implemented.

It dies if the file cannot be opened, or if sniff_encoding cannot determine the encoding and $IO::HTML::default_encoding has been set to undef.

html_file_and_encoding

($filehandle, $encoding, $bom) = html_file_and_encoding($filename, \options);

This function (exported only by request) is just like html_file, but returns more information. In addition to the filehandle, it returns the name of the encoding used, and a flag indicating whether a byte order mark was found (if $bom is true, the file began with a BOM). This may be useful if you want to write the file out again (especially in conjunction with the html_outfile function).

The optional second argument is a hashref containing options. The possible keys are described under find_charset_in.

It dies if the file cannot be opened, or if sniff_encoding cannot determine the encoding and $IO::HTML::default_encoding has been set to undef.

The result of calling html_file_and_encoding in scalar context is undefined (in the C sense of there is no guarantee what you’ll get).

html_outfile

$filehandle = html_outfile($filename, $encoding, $bom);

This function (exported only by request) opens $filename for output using $encoding, and writes a BOM to it if $bom is true. If $encoding is undef, it defaults to $IO::HTML::default_encoding. $encoding may be either an encoding name or an Encode::Encoding object.

It dies if the file cannot be opened, or if both $encoding and $IO::HTML::default_encoding are undef.

sniff_encoding

($encoding, $bom) = sniff_encoding($filehandle, $filename, \options);

This function (exported only by request) runs the HTML5 encoding sniffing algorithm on $filehandle (which must be seekable, and should have been opened in :raw mode). $filename is used only for error messages (if there’s a problem using the filehandle), and defaults to file if omitted. The optional third argument is a hashref containing options. The possible keys are described under find_charset_in.

It returns Perl’s canonical name for the encoding, which is not necessarily the same as the MIME or IANA charset name. It returns undef if the encoding cannot be determined. $bom is true if the file began with a byte order mark. In scalar context, it returns only $encoding.

The filehandle’s position is restored to its original position (normally the beginning of the file) unless $bom is true. In that case, the position is immediately after the BOM.

Tip: If you want to run sniff_encoding on a file you’ve already loaded into a string, open an in-memory file on the string, and pass that handle:

($encoding, $bom) = do { open(my $fh, <, \string); sniff_encoding($fh) };

(This only makes sense if $string contains bytes, not characters.)

find_charset_in

$encoding = find_charset_in($string_containing_HTML, \options);

This function (exported only by request) looks for charset information in a <meta> tag in a possibly-incomplete HTML document using the two step algorithm specified by HTML5. It does not look for a BOM. The <meta> tag must begin within the first $IO::HTML::bytes_to_check bytes of the string.

It returns Perl’s canonical name for the encoding, which is not necessarily the same as the MIME or IANA charset name. It returns undef if no charset is specified or if the specified charset is not recognized by the Encode module.

The optional second argument is a hashref containing options. The following keys are recognized:

“encoding”
If true, return the Encode::Encoding object instead of its name. Defaults to false.

“need_pragma”
If true (the default), follow the HTML5 spec and examine the content attribute only of <meta http-equiv="Content-Type". If set to 0, relax the HTML5 spec, and look for charset= in the content attribute of every meta tag.

EXPORTS

By default, only html_file is exported. Other functions may be exported on request.

For people who prefer not to export functions, all functions beginning with html_ have an alias without that prefix (e.g. you can call IO::HTML::file(...) instead of IO::HTML::html_file(...). These aliases are not exportable.

The following export tags are available:

“:all”
All exportable functions.

“:rw”
html_file, html_file_and_encoding, html_outfile.

SEE ALSO

The HTML5 specification, section 8.2.2.2 Determining the character encoding: <http://www.w3.org/TR/html5/syntax.html#determining-the-character-encoding>

DIAGNOSTICS

“Could not read %s: %s”
The specified file could not be read from for the reason specified by $!.

“Could not seek %s: %s”
The specified file could not be rewound for the reason specified by $!.

“Failed to open %s: %s”
The specified file could not be opened for reading for the reason specified by $!.

“No default encoding specified”
The sniff_encoding algorithm didn’t find an encoding to use, and you set $IO::HTML::default_encoding to undef.

CONFIGURATION AND ENVIRONMENT

There are two global variables that affect IO::HTML. If you need to change them, you should do so using local if possible:

my $file = do { # This file may define the charset later in the header local $IO::HTML::bytes_to_check = 4096; html_file(…); };

$bytes_to_check
This is the number of bytes that sniff_encoding will read from the stream. It is also the number of bytes that find_charset_in will search for a <meta> tag containing charset information. It must be a positive integer. The HTML 5 specification recommends using the default value of 1024, but some pages do not follow the specification.

$default_encoding
This is the encoding that html_file and html_file_and_encoding will use if no encoding can be detected by sniff_encoding. The default value is cp1252 (a.k.a. Windows-1252). Setting it to undef will cause the file subroutines to croak if sniff_encoding fails to determine the encoding. (sniff_encoding itself does not use $default_encoding).

DEPENDENCIES

IO::HTML has no non-core dependencies for Perl 5.8.7+. With earlier versions of Perl 5.8, you need to upgrade Encode to at least version 2.10, and you may need to upgrade Exporter to at least version 5.57.

INCOMPATIBILITIES

None reported.

BUGS AND LIMITATIONS

No bugs have been reported.

AUTHOR

Christopher J. Madsen <perl AT cjmweb.net>

Please report any bugs or feature requests to <bug-IO-HTML AT rt.cpan.org> or through the web interface at <http://rt.cpan.org/Public/Bug/Report.html?Queue=IO-HTML>.

You can follow or contribute to IO-HTML’s development at <https://github.com/madsen/io-html>.

COPYRIGHT AND LICENSE

This software is copyright (c) 2020 by Christopher J. Madsen.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

679 - Linux cli command JSON_XSpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command JSON_XSpm and provides detailed information about the command JSON_XSpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the JSON_XSpm.

NAME 🖥️ JSON_XSpm 🖥️

JSON serialising/deserialising, done correctly and fast

JSON::XS - 正しくて高速な JSON シリアライザ/デシリアライザ (http://fleur.hio.jp/perldoc/mix/lib/JSON/XS.html)

SYNOPSIS

use JSON::XS; # exported functions, they croak on error # and expect/generate UTF-8 $utf8_encoded_json_text = encode_json $perl_hash_or_arrayref; $perl_hash_or_arrayref = decode_json $utf8_encoded_json_text; # OO-interface $coder = JSON::XS->new->ascii->pretty->allow_nonref; $pretty_printed_unencoded = $coder->encode ($perl_scalar); $perl_scalar = $coder->decode ($unicode_json_text); # Note that JSON version 2.0 and above will automatically use JSON::XS # if available, at virtually no speed overhead either, so you should # be able to just: use JSON; # and do the same things, except that you have a pure-perl fallback now.

DESCRIPTION

This module converts Perl data structures to JSON and vice versa. Its primary goal is to be correct and its secondary goal is to be fast. To reach the latter goal it was written in C.

See MAPPING, below, on how JSON::XS maps perl values to JSON values and vice versa.

FEATURES

  • correct Unicode handling This module knows how to handle Unicode, documents how and when it does so, and even documents what “correct” means.

  • round-trip integrity When you serialise a perl data structure using only data types supported by JSON and Perl, the deserialised data structure is identical on the Perl level. (e.g. the string “2.0” doesn’t suddenly become “2” just because it looks like a number). There are minor exceptions to this, read the MAPPING section below to learn about those.

  • strict checking of JSON correctness There is no guessing, no generating of illegal JSON texts by default, and only JSON is accepted as input by default (the latter is a security feature).

  • fast Compared to other JSON modules and other serialisers such as Storable, this module usually compares favourably in terms of speed, too.

  • simple to use This module has both a simple functional interface as well as an object oriented interface.

  • reasonably versatile output formats You can choose between the most compact guaranteed-single-line format possible (nice for simple line-based protocols), a pure-ASCII format (for when your transport is not 8-bit clean, still supports the whole Unicode range), or a pretty-printed format (for when you want to read that stuff). Or you can combine those features in whatever way you like.

FUNCTIONAL INTERFACE

The following convenience methods are provided by this module. They are exported by default:

$json_text = encode_json $perl_scalar
Converts the given Perl data structure to a UTF-8 encoded, binary string (that is, the string contains octets only). Croaks on error. This function call is functionally identical to: $json_text = JSON::XS->new->utf8->encode ($perl_scalar) Except being faster.

$perl_scalar = decode_json $json_text
The opposite of encode_json: expects a UTF-8 (binary) string and tries to parse that as a UTF-8 encoded JSON text, returning the resulting reference. Croaks on error. This function call is functionally identical to: $perl_scalar = JSON::XS->new->utf8->decode ($json_text) Except being faster.

A FEW NOTES ON UNICODE AND PERL

Since this often leads to confusion, here are a few very clear words on how Unicode works in Perl, modulo bugs.

  1. This enables you to store Unicode characters as single characters in a Perl string - very natural.

  2. … until you force it to, e.g. when matching it against a regex, or printing the scalar to a file, in which case Perl either interprets your string as locale-encoded text, octets/binary, or as Unicode, depending on various settings. In no case is an encoding stored together with your data, it is use that decides encoding, not any magical meta data.

  3. Just ignore that flag unless you debug a Perl bug, a module written in XS or want to dive into the internals of perl. Otherwise it will only confuse you, as, despite the name, it says nothing about how your string is encoded. You can have Unicode strings with that flag set, with that flag clear, and you can have binary data with that flag set and that flag clear. Other possibilities exist, too. If you didn’t know about that flag, just the better, pretend it doesn’t exist.

  4. If you have UTF-8 encoded data, it is no longer a Unicode string, but a Unicode string encoded in UTF-8, giving you a binary string.

  5. It’s a fact. Learn to live with it.

I hope this helps :)

OBJECT-ORIENTED INTERFACE

The object oriented interface lets you configure your own encoding or decoding style, within the limits of supported formats.

$json = new JSON::XS
Creates a new JSON::XS object that can be used to de/encode JSON strings. All boolean flags described below are by default disabled (with the exception of allow_nonref, which defaults to enabled since version 4.0). The mutators for flags all return the JSON object again and thus calls can be chained: my $json = JSON::XS->new->utf8->space_after->encode ({a => [1,2]}) => {“a”: [1, 2]}

$json = $json->ascii ([$enable])

$enabled = $json->get_ascii

If $enable is true (or missing), then the encode method will not generate characters outside the code range 0..127 (which is ASCII). Any Unicode characters outside that range will be escaped using either a single \uXXXX (BMP characters) or a double \uHHHH\uLLLLL escape sequence, as per RFC4627. The resulting encoded JSON text can be treated as a native Unicode string, an ascii-encoded, latin1-encoded or UTF-8 encoded string, or any other superset of ASCII. If $enable is false, then the encode method will not escape Unicode characters unless required by the JSON syntax or other flags. This results in a faster and more compact format. See also the section ENCODING/CODESET FLAG NOTES later in this document. The main use for this flag is to produce JSON texts that can be transmitted over a 7-bit channel, as the encoded JSON texts will not contain any 8 bit characters. JSON::XS->new->ascii (1)->encode ([chr 0x10401]) => ["������"]

$json = $json->latin1 ([$enable])

$enabled = $json->get_latin1

If $enable is true (or missing), then the encode method will encode the resulting JSON text as latin1 (or iso-8859-1), escaping any characters outside the code range 0..255. The resulting string can be treated as a latin1-encoded JSON text or a native Unicode string. The decode method will not be affected in any way by this flag, as decode by default expects Unicode, which is a strict superset of latin1. If $enable is false, then the encode method will not escape Unicode characters unless required by the JSON syntax or other flags. See also the section ENCODING/CODESET FLAG NOTES later in this document. The main use for this flag is efficiently encoding binary data as JSON text, as most octets will not be escaped, resulting in a smaller encoded size. The disadvantage is that the resulting JSON text is encoded in latin1 (and must correctly be treated as such when storing and transferring), a rare encoding for JSON. It is therefore most useful when you want to store data structures known to contain binary data efficiently in files or databases, not when talking to other JSON encoders/decoders. JSON::XS->new->latin1->encode (["\x{89}\x{abc}"] => ["\x{89}\u0abc"] # (perl syntax, U+abc escaped, U+89 not)

$json = $json->utf8 ([$enable])

$enabled = $json->get_utf8

If $enable is true (or missing), then the encode method will encode the JSON result into UTF-8, as required by many protocols, while the decode method expects to be handed a UTF-8-encoded string. Please note that UTF-8-encoded strings do not contain any characters outside the range 0..255, they are thus useful for bytewise/binary I/O. In future versions, enabling this option might enable autodetection of the UTF-16 and UTF-32 encoding families, as described in RFC4627. If $enable is false, then the encode method will return the JSON string as a (non-encoded) Unicode string, while decode expects thus a Unicode string. Any decoding or encoding (e.g. to UTF-8 or UTF-16) needs to be done yourself, e.g. using the Encode module. See also the section ENCODING/CODESET FLAG NOTES later in this document. Example, output UTF-16BE-encoded JSON: use Encode; $jsontext = encode “UTF-16BE”, JSON::XS->new->encode ($object); Example, decode UTF-32LE-encoded JSON: use Encode; $object = JSON::XS->new->decode (decode “UTF-32LE”, $jsontext);

$json = $json->pretty ([$enable])
This enables (or disables) all of the indent, space_before and space_after (and in the future possibly more) flags in one call to generate the most readable (or most compact) form possible. Example, pretty-print some simple structure: my $json = JSON::XS->new->pretty(1)->encode ({a => [1,2]}) => { “a” : [ 1, 2 ] }

$json = $json->indent ([$enable])

$enabled = $json->get_indent

If $enable is true (or missing), then the encode method will use a multiline format as output, putting every array member or object/hash key-value pair into its own line, indenting them properly. If $enable is false, no newlines or indenting will be produced, and the resulting JSON text is guaranteed not to contain any newlines. This setting has no effect when decoding JSON texts.

$json = $json->space_before ([$enable])

$enabled = $json->get_space_before

If $enable is true (or missing), then the encode method will add an extra optional space before the : separating keys from values in JSON objects. If $enable is false, then the encode method will not add any extra space at those places. This setting has no effect when decoding JSON texts. You will also most likely combine this setting with space_after. Example, space_before enabled, space_after and indent disabled: {“key” :“value”}

$json = $json->space_after ([$enable])

$enabled = $json->get_space_after

If $enable is true (or missing), then the encode method will add an extra optional space after the : separating keys from values in JSON objects and extra whitespace after the , separating key-value pairs and array members. If $enable is false, then the encode method will not add any extra space at those places. This setting has no effect when decoding JSON texts. Example, space_before and indent disabled, space_after enabled: {“key”: “value”}

$json = $json->relaxed ([$enable])

$enabled = $json->get_relaxed

If $enable is true (or missing), then decode will accept some extensions to normal JSON syntax (see below). encode will not be affected in any way. Be aware that this option makes you accept invalid JSON texts as if they were valid!. I suggest only to use this option to parse application-specific files written by humans (configuration files, resource files etc.) If $enable is false (the default), then decode will only accept valid JSON texts. Currently accepted extensions are:

  • list items can have an end-comma JSON separates array elements and key-value pairs with commas. This can be annoying if you write JSON texts manually and want to be able to quickly append elements, so this extension accepts comma at the end of such items not just between them: [ 1, 2, <- this comma not normally allowed ] { “k1”: “v1”, “k2”: “v2”, <- this comma not normally allowed }

  • shell-style ‘#’-comments Whenever JSON allows whitespace, shell-style comments are additionally allowed. They are terminated by the first carriage-return or line-feed character, after which more white-space and comments are allowed. [ 1, # this comment not allowed in JSON # neither this one… ]

  • literal ASCII TAB characters in strings Literal ASCII TAB characters are now allowed in strings (and treated as ). [ “Hello World”, “Hello<TAB>World”, # literal <TAB> would not normally be allowed ]

$json = $json->canonical ([$enable])

$enabled = $json->get_canonical

If $enable is true (or missing), then the encode method will output JSON objects by sorting their keys. This is adding a comparatively high overhead. If $enable is false, then the encode method will output key-value pairs in the order Perl stores them (which will likely change between runs of the same script, and can change even within the same run from 5.18 onwards). This option is useful if you want the same data structure to be encoded as the same JSON text (given the same overall settings). If it is disabled, the same hash might be encoded differently even if contains the same data, as key-value pairs have no inherent ordering in Perl. This setting has no effect when decoding JSON texts. This setting has currently no effect on tied hashes.

$json = $json->allow_nonref ([$enable])

$enabled = $json->get_allow_nonref

Unlike other boolean options, this opotion is enabled by default beginning with version 4.0. See “SECURITY CONSIDERATIONS” for the gory details. If $enable is true (or missing), then the encode method can convert a non-reference into its corresponding string, number or null JSON value, which is an extension to RFC4627. Likewise, decode will accept those JSON values instead of croaking. If $enable is false, then the encode method will croak if it isn’t passed an arrayref or hashref, as JSON texts must either be an object or array. Likewise, decode will croak if given something that is not a JSON object or array. Example, encode a Perl scalar as JSON value without enabled allow_nonref, resulting in an error: JSON::XS->new->allow_nonref (0)->encode (“Hello, World!”) => hash- or arrayref expected…

$json = $json->allow_unknown ([$enable])

$enabled = $json->get_allow_unknown

If $enable is true (or missing), then encode will not throw an exception when it encounters values it cannot represent in JSON (for example, filehandles) but instead will encode a JSON null value. Note that blessed objects are not included here and are handled separately by c<allow_nonref>. If $enable is false (the default), then encode will throw an exception when it encounters anything it cannot encode as JSON. This option does not affect decode in any way, and it is recommended to leave it off unless you know your communications partner.

$json = $json->allow_blessed ([$enable])

$enabled = $json->get_allow_blessed

See “OBJECT SERIALISATION” for details. If $enable is true (or missing), then the encode method will not barf when it encounters a blessed reference that it cannot convert otherwise. Instead, a JSON null value is encoded instead of the object. If $enable is false (the default), then encode will throw an exception when it encounters a blessed object that it cannot convert otherwise. This setting has no effect on decode.

$json = $json->convert_blessed ([$enable])

$enabled = $json->get_convert_blessed

See “OBJECT SERIALISATION” for details. If $enable is true (or missing), then encode, upon encountering a blessed object, will check for the availability of the TO_JSON method on the object’s class. If found, it will be called in scalar context and the resulting scalar will be encoded instead of the object. The TO_JSON method may safely call die if it wants. If TO_JSON returns other blessed objects, those will be handled in the same way. TO_JSON must take care of not causing an endless recursion cycle (== crash) in this case. The name of TO_JSON was chosen because other methods called by the Perl core (== not by the user of the object) are usually in upper case letters and to avoid collisions with any to_json function or method. If $enable is false (the default), then encode will not consider this type of conversion. This setting has no effect on decode.

$json = $json->allow_tags ([$enable])

$enabled = $json->get_allow_tags

See “OBJECT SERIALISATION” for details. If $enable is true (or missing), then encode, upon encountering a blessed object, will check for the availability of the FREEZE method on the object’s class. If found, it will be used to serialise the object into a nonstandard tagged JSON value (that JSON decoders cannot decode). It also causes decode to parse such tagged JSON values and deserialise them via a call to the THAW method. If $enable is false (the default), then encode will not consider this type of conversion, and tagged JSON values will cause a parse error in decode, as if tags were not part of the grammar.

$json->boolean_values ([$false, $true])

($false, $true) = $json->get_boolean_values

By default, JSON booleans will be decoded as overloaded $Types::Serialiser::false and $Types::Serialiser::true objects. With this method you can specify your own boolean values for decoding - on decode, JSON false will be decoded as a copy of $false, and JSON true will be decoded as $true (“copy” here is the same thing as assigning a value to another variable, i.e. $copy = $false). Calling this method without any arguments will reset the booleans to their default values. get_boolean_values will return both $false and $true values, or the empty list when they are set to the default.

$json = $json->filter_json_object ([$coderef->($hashref)])
When $coderef is specified, it will be called from decode each time it decodes a JSON object. The only argument is a reference to the newly-created hash. If the code reference returns a single scalar (which need not be a reference), this value (or rather a copy of it) is inserted into the deserialised data structure. If it returns an empty list (NOTE: not undef, which is a valid scalar), the original deserialised hash will be inserted. This setting can slow down decoding considerably. When $coderef is omitted or undefined, any existing callback will be removed and decode will not change the deserialised hash in any way. Example, convert all JSON objects into the integer 5: my $js = JSON::XS->new->filter_json_object (sub { 5 }); # returns [5] $js->decode ([{}]) # throw an exception because allow_nonref is not enabled # so a lone 5 is not allowed. $js->decode ({“a”:1, “b”:2});

$json = $json->filter_json_single_key_object ($key [=> $coderef->($value)])
Works remotely similar to filter_json_object, but is only called for JSON objects having a single key named $key. This $coderef is called before the one specified via filter_json_object, if any. It gets passed the single value in the JSON object. If it returns a single value, it will be inserted into the data structure. If it returns nothing (not even undef but the empty list), the callback from filter_json_object will be called next, as if no single-key callback were specified. If $coderef is omitted or undefined, the corresponding callback will be disabled. There can only ever be one callback for a given key. As this callback gets called less often then the filter_json_object one, decoding speed will not usually suffer as much. Therefore, single-key objects make excellent targets to serialise Perl objects into, especially as single-key JSON objects are as close to the type-tagged value concept as JSON gets (it’s basically an ID/VALUE tuple). Of course, JSON does not support this in any way, so you need to make sure your data never looks like a serialised Perl hash. Typical names for the single object key are _ _class_whatever_ _, or $_ _dollars_are_rarely_used_ _$ or }ugly_brace_placement, or even things like _ _class_md5sum(classname)_ _, to reduce the risk of clashing with real hashes. Example, decode JSON objects of the form { "_ _widget_ _" => <id> } into the corresponding $WIDGET{<id>} object: # return whatever is in $WIDGET{5}: JSON::XS ->new ->filter_json_single_key_object (_ _widget_ _ => sub { $WIDGET{ $_[0] } }) ->decode ({"_ _widget_ _": 5) # this can be used with a TO_JSON method in some “widget” class # for serialisation to json: sub WidgetBase::TO_JSON { my ($self) = @_; unless ($self->{id}) { $self->{id} = ..get..some..id..; $WIDGET{$self->{id}} = $self; } { _ _widget_ _ => $self->{id} } }

$json = $json->shrink ([$enable])

$enabled = $json->get_shrink

Perl usually over-allocates memory a bit when allocating space for strings. This flag optionally resizes strings generated by either encode or decode to their minimum size possible. This can save memory when your JSON texts are either very very long or you have many short strings. It will also try to downgrade any strings to octet-form if possible: perl stores strings internally either in an encoding called UTF-X or in octet-form. The latter cannot store everything but uses less space in general (and some buggy Perl or C code might even rely on that internal representation being used). The actual definition of what shrink does might change in future versions, but it will always try to save space at the expense of time. If $enable is true (or missing), the string returned by encode will be shrunk-to-fit, while all strings generated by decode will also be shrunk-to-fit. If $enable is false, then the normal perl allocation algorithms are used. If you work with your data, then this is likely to be faster. In the future, this setting might control other things, such as converting strings that look like integers or floats into integers or floats internally (there is no difference on the Perl level), saving space.

$json = $json->max_depth ([$maximum_nesting_depth])

$max_depth = $json->get_max_depth

Sets the maximum nesting level (default 512) accepted while encoding or decoding. If a higher nesting level is detected in JSON text or a Perl data structure, then the encoder and decoder will stop and croak at that point. Nesting level is defined by number of hash- or arrayrefs that the encoder needs to traverse to reach a given point or the number of { or [ characters without their matching closing parenthesis crossed to reach a given character in a string. Setting the maximum depth to one disallows any nesting, so that ensures that the object is only a single hash/object or array. If no argument is given, the highest possible setting will be used, which is rarely useful. Note that nesting is implemented by recursion in C. The default value has been chosen to be as large as typical operating systems allow without crashing. See SECURITY CONSIDERATIONS, below, for more info on why this is useful.

$json = $json->max_size ([$maximum_string_size])

$max_size = $json->get_max_size

Set the maximum length a JSON text may have (in bytes) where decoding is being attempted. The default is 0, meaning no limit. When decode is called on a string that is longer then this many bytes, it will not attempt to decode the string but throw an exception. This setting has no effect on encode (yet). If no argument is given, the limit check will be deactivated (same as when 0 is specified). See SECURITY CONSIDERATIONS, below, for more info on why this is useful.

$json_text = $json->encode ($perl_scalar)
Converts the given Perl value or data structure to its JSON representation. Croaks on error.

$perl_scalar = $json->decode ($json_text)
The opposite of encode: expects a JSON text and tries to parse it, returning the resulting simple scalar or reference. Croaks on error.

($perl_scalar, $characters) = $json->decode_prefix ($json_text)
This works like the decode method, but instead of raising an exception when there is trailing garbage after the first JSON object, it will silently stop parsing there and return the number of characters consumed so far. This is useful if your JSON texts are not delimited by an outer protocol and you need to know where the JSON text ends. JSON::XS->new->decode_prefix ("[1] the tail") => ([1], 3)

INCREMENTAL PARSING

In some cases, there is the need for incremental parsing of JSON texts. While this module always has to keep both JSON text and resulting Perl data structure in memory at one time, it does allow you to parse a JSON stream incrementally. It does so by accumulating text until it has a full JSON object, which it then can decode. This process is similar to using decode_prefix to see if a full JSON object is available, but is much more efficient (and can be implemented with a minimum of method calls).

JSON::XS will only attempt to parse the JSON text once it is sure it has enough text to get a decisive result, using a very simple but truly incremental parser. This means that it sometimes won’t stop as early as the full parser, for example, it doesn’t detect mismatched parentheses. The only thing it guarantees is that it starts decoding as soon as a syntactically valid JSON text has been seen. This means you need to set resource limits (e.g. max_size) to ensure the parser will stop parsing in the presence if syntax errors.

The following methods implement this incremental parser.

[void, scalar or list context] = $json->incr_parse ([$string])
This is the central parsing function. It can both append new text and extract objects from the stream accumulated so far (both of these functions are optional). If $string is given, then this string is appended to the already existing JSON fragment stored in the $json object. After that, if the function is called in void context, it will simply return without doing anything further. This can be used to add more text in as many chunks as you want. If the method is called in scalar context, then it will try to extract exactly one JSON object. If that is successful, it will return this object, otherwise it will return undef. If there is a parse error, this method will croak just as decode would do (one can then use incr_skip to skip the erroneous part). This is the most common way of using the method. And finally, in list context, it will try to extract as many objects from the stream as it can find and return them, or the empty list otherwise. For this to work, there must be no separators (other than whitespace) between the JSON objects or arrays, instead they must be concatenated back-to-back. If an error occurs, an exception will be raised as in the scalar context case. Note that in this case, any previously-parsed JSON texts will be lost. Example: Parse some JSON arrays/objects in a given string and return them. my @objs = JSON::XS->new->incr_parse ("[5][7][1,2]");

$lvalue_string = $json->incr_text
This method returns the currently stored JSON fragment as an lvalue, that is, you can manipulate it. This only works when a preceding call to incr_parse in scalar context successfully returned an object. Under all other circumstances you must not call this function (I mean it. although in simple tests it might actually work, it will fail under real world conditions). As a special exception, you can also call this method before having parsed anything. That means you can only use this function to look at or manipulate text before or after complete JSON objects, not while the parser is in the middle of parsing a JSON object. This function is useful in two cases: a) finding the trailing text after a JSON object or b) parsing multiple JSON objects separated by non-JSON text (such as commas).

$json->incr_skip
This will reset the state of the incremental parser and will remove the parsed text from the input buffer so far. This is useful after incr_parse died, in which case the input buffer and incremental parser state is left unchanged, to skip the text parsed so far and to reset the parse state. The difference to incr_reset is that only text until the parse error occurred is removed.

$json->incr_reset
This completely resets the incremental parser, that is, after this call, it will be as if the parser had never parsed anything. This is useful if you want to repeatedly parse JSON objects and want to ignore any trailing data, which means you have to reset the parser after each successful decode.

LIMITATIONS

The incremental parser is a non-exact parser: it works by gathering as much text as possible that could be a valid JSON text, followed by trying to decode it.

That means it sometimes needs to read more data than strictly necessary to diagnose an invalid JSON text. For example, after parsing the following fragment, the parser could stop with an error, as this fragment cannot be the beginning of a valid JSON text:

[,

In reality, hopwever, the parser might continue to read data until a length limit is exceeded or it finds a closing bracket.

EXAMPLES

Some examples will make all this clearer. First, a simple example that works similarly to decode_prefix: We want to decode the JSON object at the start of a string and identify the portion after the JSON object:

my $text = “[1,2,3] hello”; my $json = new JSON::XS; my $obj = $json->incr_parse ($text) or die “expected JSON object or array at beginning of string”; my $tail = $json->incr_text; # $tail now contains " hello"

Easy, isn’t it?

Now for a more complicated example: Imagine a hypothetical protocol where you read some requests from a TCP stream, and each request is a JSON array, without any separation between them (in fact, it is often useful to use newlines as “separators”, as these get interpreted as whitespace at the start of the JSON text, which makes it possible to test said protocol with telnet…).

Here is how you’d do it (it is trivial to write this in an event-based manner):

my $json = new JSON::XS; # read some data from the socket while (sysread $socket, my $buf, 4096) { # split and decode as many requests as possible for my $request ($json->incr_parse ($buf)) { # act on the $request } }

Another complicated example: Assume you have a string with JSON objects or arrays, all separated by (optional) comma characters (e.g. [1],[2], [3]). To parse them, we have to skip the commas between the JSON texts, and here is where the lvalue-ness of incr_text comes in useful:

my $text = “[1],[2], [3]”; my $json = new JSON::XS; # void context, so no parsing done $json->incr_parse ($text); # now extract as many objects as possible. note the # use of scalar context so incr_text can be called. while (my $obj = $json->incr_parse) { # do something with $obj # now skip the optional comma $json->incr_text =~ s/^ \s* , //x; }

Now lets go for a very complex example: Assume that you have a gigantic JSON array-of-objects, many gigabytes in size, and you want to parse it, but you cannot load it into memory fully (this has actually happened in the real world :).

Well, you lost, you have to implement your own JSON parser. But JSON::XS can still help you: You implement a (very simple) array parser and let JSON decode the array elements, which are all full JSON objects on their own (this wouldn’t work if the array elements could be JSON numbers, for example):

my $json = new JSON::XS; # open the monster open my $fh, “<bigfile.json” or die “bigfile: $!”; # first parse the initial “[” for (;;) { sysread $fh, my $buf, 65536 or die “read error: $!”; $json->incr_parse ($buf); # void context, so no parsing # Exit the loop once we found and removed(!) the initial “[”. # In essence, we are (ab-)using the $json object as a simple scalar # we append data to. last if $json->incr_text =~ s/^ \s* \ //x; } # now we have the skipped the initial “[”, so continue # parsing all the elements. for (;;) { # in this loop we read data until we got a single JSON object for (;;) { if (my $obj = $json->incr_parse) { # do something with $obj last; } # add more data sysread $fh, my $buf, 65536 or die “read error: $!”; $json->incr_parse ($buf); # void context, so no parsing } # in this loop we read data until we either found and parsed the # separating “,” between elements, or the final “]” for (;;) { # first skip whitespace $json->incr_text =~ s/^\s*//; # if we find “]”, we are done if ($json->incr_text =~ s/^//) { print “finished. “; exit; } # if we find “,”, we can continue with the next element if ($json->incr_text =~ s/^,//) { last; } # if we find anything else, we have a parse error! if (length $json->incr_text) { die “parse error near “, $json->incr_text; } # else add more data sysread $fh, my $buf, 65536 or die “read error: $!”; $json->incr_parse ($buf); # void context, so no parsing }

This is a complex example, but most of the complexity comes from the fact that we are trying to be correct (bear with me if I am wrong, I never ran the above example :).

MAPPING

This section describes how JSON::XS maps Perl values to JSON values and vice versa. These mappings are designed to “do the right thing” in most circumstances automatically, preserving round-tripping characteristics (what you put in comes out as something equivalent).

For the more enlightened: note that in the following descriptions, lowercase perl refers to the Perl interpreter, while uppercase Perl refers to the abstract Perl language itself.

JSON -> PERL

object
A JSON object becomes a reference to a hash in Perl. No ordering of object keys is preserved (JSON does not preserve object key ordering itself).

array
A JSON array becomes a reference to an array in Perl.

string
A JSON string becomes a string scalar in Perl - Unicode codepoints in JSON are represented by the same codepoints in the Perl string, so no manual decoding is necessary.

number
A JSON number becomes either an integer, numeric (floating point) or string scalar in perl, depending on its range and any fractional parts. On the Perl level, there is no difference between those as Perl handles all the conversion details, but an integer may take slightly less memory and might represent more values exactly than floating point numbers. If the number consists of digits only, JSON::XS will try to represent it as an integer value. If that fails, it will try to represent it as a numeric (floating point) value if that is possible without loss of precision. Otherwise it will preserve the number as a string value (in which case you lose roundtripping ability, as the JSON number will be re-encoded to a JSON string). Numbers containing a fractional or exponential part will always be represented as numeric (floating point) values, possibly at a loss of precision (in which case you might lose perfect roundtripping ability, but the JSON number will still be re-encoded as a JSON number). Note that precision is not accuracy - binary floating point values cannot represent most decimal fractions exactly, and when converting from and to floating point, JSON::XS only guarantees precision up to but not including the least significant bit.

true, false
These JSON atoms become Types::Serialiser::true and Types::Serialiser::false, respectively. They are overloaded to act almost exactly like the numbers 1 and 0. You can check whether a scalar is a JSON boolean by using the Types::Serialiser::is_bool function (after use Types::Serialier, of course).

null
A JSON null atom becomes undef in Perl.

shell-style comments (”# text”)
As a nonstandard extension to the JSON syntax that is enabled by the relaxed setting, shell-style comments are allowed. They can start anywhere outside strings and go till the end of the line.

tagged values ("(tag)value”).
Another nonstandard extension to the JSON syntax, enabled with the allow_tags setting, are tagged values. In this implementation, the tag must be a perl package/class name encoded as a JSON string, and the value must be a JSON array encoding optional constructor arguments. See “OBJECT SERIALISATION”, below, for details.

PERL -> JSON

The mapping from Perl to JSON is slightly more difficult, as Perl is a truly typeless language, so we can only guess which JSON type is meant by a Perl value.

hash references
Perl hash references become JSON objects. As there is no inherent ordering in hash keys (or JSON objects), they will usually be encoded in a pseudo-random order. JSON::XS can optionally sort the hash keys (determined by the canonical flag), so the same datastructure will serialise to the same JSON text (given same settings and version of JSON::XS), but this incurs a runtime overhead and is only rarely useful, e.g. when you want to compare some JSON text against another for equality.

array references
Perl array references become JSON arrays.

other references
Other unblessed references are generally not allowed and will cause an exception to be thrown, except for references to the integers 0 and 1, which get turned into false and true atoms in JSON. Since JSON::XS uses the boolean model from Types::Serialiser, you can also use Types::Serialiser and then use Types::Serialiser::false and Types::Serialiser::true to improve readability. use Types::Serialiser; encode_json [�, Types::Serialiser::true] # yields [false,true]

Types::Serialiser::true, Types::Serialiser::false
These special values from the Types::Serialiser module become JSON true and JSON false values, respectively. You can also use \1 and directly if you want.

blessed objects
Blessed objects are not directly representable in JSON, but JSON::XS allows various ways of handling objects. See “OBJECT SERIALISATION”, below, for details.

simple scalars
Simple Perl scalars (any scalar that is not a reference) are the most difficult objects to encode: JSON::XS will encode undefined scalars as JSON null values, scalars that have last been used in a string context before encoding as JSON strings, and anything else as number value: # dump as number encode_json [2] # yields [2] encode_json [-3.0e17] # yields [-3e+17] my $value = 5; encode_json [$value] # yields [5] # used as string, so dump as string print $value; encode_json [$value] # yields [“5”] # undef becomes null encode_json [undef] # yields [null] You can force the type to be a JSON string by stringifying it: my $x = 3.1; # some variable containing a number “$x”; # stringified $x .= “”; # another, more awkward way to stringify print $x; # perl does it for you, too, quite often You can force the type to be a JSON number by numifying it: my $x = “3”; # some variable containing a string $x += 0; # numify it, ensuring it will be dumped as a number $x *= 1; # same thing, the choice is yours. You can not currently force the type in other, less obscure, ways. Tell me if you need this capability (but don’t forget to explain why it’s needed :). Note that numerical precision has the same meaning as under Perl (so binary to decimal conversion follows the same rules as in Perl, which can differ to other languages). Also, your perl interpreter might expose extensions to the floating point numbers of your platform, such as infinities or NaN’s - these cannot be represented in JSON, and it is an error to pass those in.

OBJECT SERIALISATION

As JSON cannot directly represent Perl objects, you have to choose between a pure JSON representation (without the ability to deserialise the object automatically again), and a nonstandard extension to the JSON syntax, tagged values.

SERIALISATION

What happens when JSON::XS encounters a Perl object depends on the allow_blessed, convert_blessed and allow_tags settings, which are used in this order:

  1. In this case, JSON::XS uses the Types::Serialiser object serialisation protocol to create a tagged JSON value, using a nonstandard extension to the JSON syntax. This works by invoking the FREEZE method on the object, with the first argument being the object to serialise, and the second argument being the constant string JSON to distinguish it from other serialisers. The FREEZE method can return any number of values (i.e. zero or more). These values and the paclkage/classname of the object will then be encoded as a tagged JSON value in the following format: (“classname”)[FREEZE return values…] e.g.: (“URI”)[“http://www.google.com/"] (“MyDate”)[2013,10,29] (“ImageData::JPEG”)[“Z3…VlCg==”] For example, the hypothetical My::Object FREEZE method might use the objects type and id members to encode the object: sub My::Object::FREEZE { my ($self, $serialiser) = @_; ($self->{type}, $self->{id}) }

  2. In this case, the TO_JSON method of the object is invoked in scalar context. It must return a single scalar that can be directly encoded into JSON. This scalar replaces the object in the JSON text. For example, the following TO_JSON method will convert all URI objects to JSON strings when serialised. The fatc that these values originally were URI objects is lost. sub URI::TO_JSON { my ($uri) = @_; $uri->as_string }

  3. The object will be serialised as a JSON null value.

  4. If none of the settings are enabled or the respective methods are missing, JSON::XS throws an exception.

DESERIALISATION

For deserialisation there are only two cases to consider: either nonstandard tagging was used, in which case allow_tags decides, or objects cannot be automatically be deserialised, in which case you can use postprocessing or the filter_json_object or filter_json_single_key_object callbacks to get some real objects our of your JSON.

This section only considers the tagged value case: I a tagged JSON object is encountered during decoding and allow_tags is disabled, a parse error will result (as if tagged values were not part of the grammar).

If allow_tags is enabled, JSON::XS will look up the THAW method of the package/classname used during serialisation (it will not attempt to load the package as a Perl module). If there is no such method, the decoding will fail with an error.

Otherwise, the THAW method is invoked with the classname as first argument, the constant string JSON as second argument, and all the values from the JSON array (the values originally returned by the FREEZE method) as remaining arguments.

The method must then return the object. While technically you can return any Perl scalar, you might have to enable the enable_nonref setting to make that work in all cases, so better return an actual blessed reference.

As an example, let’s implement a THAW function that regenerates the My::Object from the FREEZE example earlier:

sub My::Object::THAW { my ($class, $serialiser, $type, $id) = @_; $class->new (type => $type, id => $id) }

ENCODING/CODESET FLAG NOTES

The interested reader might have seen a number of flags that signify encodings or codesets - utf8, latin1 and ascii. There seems to be some confusion on what these do, so here is a short comparison:

utf8 controls whether the JSON text created by encode (and expected by decode) is UTF-8 encoded or not, while latin1 and ascii only control whether encode escapes character values outside their respective codeset range. Neither of these flags conflict with each other, although some combinations make less sense than others.

Care has been taken to make all flags symmetrical with respect to encode and decode, that is, texts encoded with any combination of these flag values will be correctly decoded when the same flags are used - in general, if you use different flag settings while encoding vs. when decoding you likely have a bug somewhere.

Below comes a verbose discussion of these flags. Note that a “codeset” is simply an abstract set of character-codepoint pairs, while an encoding takes those codepoint numbers and encodes them, in our case into octets. Unicode is (among other things) a codeset, UTF-8 is an encoding, and ISO-8859-1 (= latin 1) and ASCII are both codesets and encodings at the same time, which can be confusing.

“utf8” flag disabled
When utf8 is disabled (the default), then encode/decode generate and expect Unicode strings, that is, characters with high ordinal Unicode values (> 255) will be encoded as such characters, and likewise such characters are decoded as-is, no changes to them will be done, except “(re-)interpreting” them as Unicode codepoints or Unicode characters, respectively (to Perl, these are the same thing in strings unless you do funny/weird/dumb stuff). This is useful when you want to do the encoding yourself (e.g. when you want to have UTF-16 encoded JSON texts) or when some other layer does the encoding for you (for example, when printing to a terminal using a filehandle that transparently encodes to UTF-8 you certainly do NOT want to UTF-8 encode your data first and have Perl encode it another time).

“utf8” flag enabled
If the utf8-flag is enabled, encode/decode will encode all characters using the corresponding UTF-8 multi-byte sequence, and will expect your input strings to be encoded as UTF-8, that is, no “character” of the input string must have any value > 255, as UTF-8 does not allow that. The utf8 flag therefore switches between two modes: disabled means you will get a Unicode string in Perl, enabled means you get a UTF-8 encoded octet/binary string in Perl.

“latin1” or “ascii” flags enabled
With latin1 (or ascii) enabled, encode will escape characters with ordinal values > 255 (> 127 with ascii) and encode the remaining characters as specified by the utf8 flag. If utf8 is disabled, then the result is also correctly encoded in those character sets (as both are proper subsets of Unicode, meaning that a Unicode string with all character values < 256 is the same thing as a ISO-8859-1 string, and a Unicode string with all character values < 128 is the same thing as an ASCII string in Perl). If utf8 is enabled, you still get a correct UTF-8-encoded string, regardless of these flags, just some more characters will be escaped using \uXXXX then before. Note that ISO-8859-1-encoded strings are not compatible with UTF-8 encoding, while ASCII-encoded strings are. That is because the ISO-8859-1 encoding is NOT a subset of UTF-8 (despite the ISO-8859-1 codeset being a subset of Unicode), while ASCII is. Surprisingly, decode will ignore these flags and so treat all input values as governed by the utf8 flag. If it is disabled, this allows you to decode ISO-8859-1- and ASCII-encoded strings, as both strict subsets of Unicode. If it is enabled, you can correctly decode UTF-8 encoded strings. So neither latin1 nor ascii are incompatible with the utf8 flag - they only govern when the JSON output engine escapes a character or not. The main use for latin1 is to relatively efficiently store binary data as JSON, at the expense of breaking compatibility with most JSON decoders. The main use for ascii is to force the output to not contain characters with values > 127, which means you can interpret the resulting string as UTF-8, ISO-8859-1, ASCII, KOI8-R or most about any character set and 8-bit-encoding, and still get the same data structure back. This is useful when your channel for JSON transfer is not 8-bit clean or the encoding might be mangled in between (e.g. in mail), and works because ASCII is a proper subset of most 8-bit and multibyte encodings in use in the world.

JSON and ECMAscript

JSON syntax is based on how literals are represented in javascript (the not-standardised predecessor of ECMAscript) which is presumably why it is called “JavaScript Object Notation”.

However, JSON is not a subset (and also not a superset of course) of ECMAscript (the standard) or javascript (whatever browsers actually implement).

If you want to use javascript’s eval function to “parse” JSON, you might run into parse errors for valid JSON texts, or the resulting data structure might not be queryable:

One of the problems is that U+2028 and U+2029 are valid characters inside JSON strings, but are not allowed in ECMAscript string literals, so the following Perl fragment will not output something that can be guaranteed to be parsable by javascript’s eval:

use JSON::XS; print encode_json [chr 0x2028];

The right fix for this is to use a proper JSON parser in your javascript programs, and not rely on eval (see for example Douglas Crockford’s json2.js parser).

If this is not an option, you can, as a stop-gap measure, simply encode to ASCII-only JSON:

use JSON::XS; print JSON::XS->new->ascii->encode ([chr 0x2028]);

Note that this will enlarge the resulting JSON text quite a bit if you have many non-ASCII characters. You might be tempted to run some regexes to only escape U+2028 and U+2029, e.g.:

# DO NOT USE THIS! my $json = JSON::XS->new->utf8->encode ([chr 0x2028]); $json =~ s/
/\u2028/g; # escape U+2028 $json =~ s/
/\u2029/g; # escape U+2029 print $json;

Note that this is a bad idea: the above only works for U+2028 and U+2029 and thus only for fully ECMAscript-compliant parsers. Many existing javascript implementations, however, have issues with other characters as well - using eval naively simply will cause problems.

Another problem is that some javascript implementations reserve some property names for their own purposes (which probably makes them non-ECMAscript-compliant). For example, Iceweasel reserves the _ _proto_ _ property name for its own purposes.

If that is a problem, you could parse try to filter the resulting JSON output for these property strings, e.g.:

$json =~ s/”_ _proto_ _"\s*:/”_ _proto_ _renamed":/g;

This works because _ _proto_ _ is not valid outside of strings, so every occurrence of "_ _proto_ _"\s*: must be a string used as property name.

If you know of other incompatibilities, please let me know.

JSON and YAML

You often hear that JSON is a subset of YAML. This is, however, a mass hysteria(*) and very far from the truth (as of the time of this writing), so let me state it clearly: in general, there is no way to configure JSON::XS to output a data structure as valid YAML that works in all cases.

If you really must use JSON::XS to generate YAML, you should use this algorithm (subject to change in future versions):

my $to_yaml = JSON::XS->new->utf8->space_after (1); my $yaml = $to_yaml->encode ($ref) . " “;

This will usually generate JSON texts that also parse as valid YAML. Please note that YAML has hardcoded limits on (simple) object key lengths that JSON doesn’t have and also has different and incompatible unicode character escape syntax, so you should make sure that your hash keys are noticeably shorter than the 1024 “stream characters” YAML allows and that you do not have characters with codepoint values outside the Unicode BMP (basic multilingual page). YAML also does not allow \/ sequences in strings (which JSON::XS does not currently generate, but other JSON generators might).

There might be other incompatibilities that I am not aware of (or the YAML specification has been changed yet again - it does so quite often). In general you should not try to generate YAML with a JSON generator or vice versa, or try to parse JSON with a YAML parser or vice versa: chances are high that you will run into severe interoperability problems when you least expect it.

(*)
I have been pressured multiple times by Brian Ingerson (one of the authors of the YAML specification) to remove this paragraph, despite him acknowledging that the actual incompatibilities exist. As I was personally bitten by this “JSON is YAML” lie, I refused and said I will continue to educate people about these issues, so others do not run into the same problem again and again. After this, Brian called me a (quote)complete and worthless idiot(unquote). In my opinion, instead of pressuring and insulting people who actually clarify issues with YAML and the wrong statements of some of its proponents, I would kindly suggest reading the JSON spec (which is not that difficult or long) and finally make YAML compatible to it, and educating users about the changes, instead of spreading lies about the real compatibility for many years and trying to silence people who point out that it isn’t true. Addendum/2009: the YAML 1.2 spec is still incompatible with JSON, even though the incompatibilities have been documented (and are known to Brian) for many years and the spec makes explicit claims that YAML is a superset of JSON. It would be so easy to fix, but apparently, bullying people and corrupting userdata is so much easier.

SPEED

It seems that JSON::XS is surprisingly fast, as shown in the following tables. They have been generated with the help of the eg/bench program in the JSON::XS distribution, to make it easy to compare on your own system.

First comes a comparison between various modules using a very short single-line JSON string (also available at <http://dist.schmorp.de/misc/json/short.json>).

{“method”: “handleMessage”, “params”: [“user1”, “we were just talking”], “id”: null, “array”:[1,11,234,-5,1e5,1e7, 1, 0]}

It shows the number of encodes/decodes per second (JSON::XS uses the functional interface, while JSON::XS/2 uses the OO interface with pretty-printing and hashkey sorting enabled, JSON::XS/3 enables shrink. JSON::DWIW/DS uses the deserialise function, while JSON::DWIW::FJ uses the from_json method). Higher is better:

module | encode | decode | ————–|————|————| JSON::DWIW/DS | 86302.551 | 102300.098 | JSON::DWIW/FJ | 86302.551 | 75983.768 | JSON::PP | 15827.562 | 6638.658 | JSON::Syck | 63358.066 | 47662.545 | JSON::XS | 511500.488 | 511500.488 | JSON::XS/2 | 291271.111 | 388361.481 | JSON::XS/3 | 361577.931 | 361577.931 | Storable | 66788.280 | 265462.278 | ————–+————+————+

That is, JSON::XS is almost six times faster than JSON::DWIW on encoding, about five times faster on decoding, and over thirty to seventy times faster than JSON’s pure perl implementation. It also compares favourably to Storable for small amounts of data.

Using a longer test string (roughly 18KB, generated from Yahoo! Locals search API (<http://dist.schmorp.de/misc/json/long.json>).

module | encode | decode | ————–|————|————| JSON::DWIW/DS | 1647.927 | 2673.916 | JSON::DWIW/FJ | 1630.249 | 2596.128 | JSON::PP | 400.640 | 62.311 | JSON::Syck | 1481.040 | 1524.869 | JSON::XS | 20661.596 | 9541.183 | JSON::XS/2 | 10683.403 | 9416.938 | JSON::XS/3 | 20661.596 | 9400.054 | Storable | 19765.806 | 10000.725 | ————–+————+————+

Again, JSON::XS leads by far (except for Storable which non-surprisingly decodes a bit faster).

On large strings containing lots of high Unicode characters, some modules (such as JSON::PC) seem to decode faster than JSON::XS, but the result will be broken due to missing (or wrong) Unicode handling. Others refuse to decode or encode properly, so it was impossible to prepare a fair comparison table for that case.

SECURITY CONSIDERATIONS

When you are using JSON in a protocol, talking to untrusted potentially hostile creatures requires relatively few measures.

First of all, your JSON decoder should be secure, that is, should not have any buffer overflows. Obviously, this module should ensure that and I am trying hard on making that true, but you never know.

Second, you need to avoid resource-starving attacks. That means you should limit the size of JSON texts you accept, or make sure then when your resources run out, that’s just fine (e.g. by using a separate process that can crash safely). The size of a JSON text in octets or characters is usually a good indication of the size of the resources required to decode it into a Perl structure. While JSON::XS can check the size of the JSON text, it might be too late when you already have it in memory, so you might want to check the size before you accept the string.

Third, JSON::XS recurses using the C stack when decoding objects and arrays. The C stack is a limited resource: for instance, on my amd64 machine with 8MB of stack size I can decode around 180k nested arrays but only 14k nested JSON objects (due to perl itself recursing deeply on croak to free the temporary). If that is exceeded, the program crashes. To be conservative, the default nesting limit is set to 512. If your process has a smaller stack, you should adjust this setting accordingly with the max_depth method.

Something else could bomb you, too, that I forgot to think of. In that case, you get to keep the pieces. I am always open for hints, though…

Also keep in mind that JSON::XS might leak contents of your Perl data structures in its error messages, so when you serialise sensitive information you might want to make sure that exceptions thrown by JSON::XS will not end up in front of untrusted eyes.

If you are using JSON::XS to return packets to consumption by JavaScript scripts in a browser you should have a look at <http://blog.archive.jpsykes.com/47/practical-csrf-and-json-security/> to see whether you are vulnerable to some common attack vectors (which really are browser design bugs, but it is still you who will have to deal with it, as major browser developers care only for features, not about getting security right).

“OLD” VS. “NEW” JSON (RFC4627 VS. RFC7159)

JSON originally required JSON texts to represent an array or object - scalar values were explicitly not allowed. This has changed, and versions of JSON::XS beginning with 4.0 reflect this by allowing scalar values by default.

One reason why one might not want this is that this removes a fundamental property of JSON texts, namely that they are self-delimited and self-contained, or in other words, you could take any number of “old” JSON texts and paste them together, and the result would be unambiguously parseable:

[1,3]{“k”:5}[][null] # four JSON texts, without doubt

By allowing scalars, this property is lost: in the following example, is this one JSON text (the number 12) or two JSON texts (the numbers 1 and 2):

12 # could be 12, or 1 and 2

Another lost property of “old” JSON is that no lookahead is required to know the end of a JSON text, i.e. the JSON text definitely ended at the last ] or } character, there was no need to read extra characters.

For example, a viable network protocol with “old” JSON was to simply exchange JSON texts without delimiter. For “new” JSON, you have to use a suitable delimiter (such as a newline) after every JSON text or ensure you never encode/decode scalar values.

Most protocols do work by only transferring arrays or objects, and the easiest way to avoid problems with the “new” JSON definition is to explicitly disallow scalar values in your encoder and decoder:

$json_coder = JSON::XS->new->allow_nonref (0)

This is a somewhat unhappy situation, and the blame can fully be put on JSON’s inmventor, Douglas Crockford, who unilaterally changed the format in 2006 without consulting the IETF, forcing the IETF to either fork the format or go with it (as I was told, the IETF wasn’t amused).

RELATIONSHIP WITH I-JSON

JSON is a somewhat sloppily-defined format - it carries around obvious Javascript baggage, such as not really defining number range, probably because Javascript only has one type of numbers: IEEE 64 bit floats (“binary64”).

For this reaosn, RFC7493 defines “Internet JSON”, which is a restricted subset of JSON that is supposedly more interoperable on the internet.

While JSON::XS does not offer specific support for I-JSON, it of course accepts valid I-JSON and by default implements some of the limitations of I-JSON, such as parsing numbers as perl numbers, which are usually a superset of binary64 numbers.

To generate I-JSON, follow these rules:

  • always generate UTF-8 I-JSON must be encoded in UTF-8, the default for encode_json.

  • numbers should be within IEEE 754 binary64 range Basically all existing perl installations use binary64 to represent floating point numbers, so all you need to do is to avoid large integers.

  • objects must not have duplicate keys This is trivially done, as JSON::XS does not allow duplicate keys.

  • do not generate scalar JSON texts, use ->allow_nonref (0) I-JSON strongly requests you to only encode arrays and objects into JSON.

  • times should be strings in ISO 8601 format There are a myriad of modules on CPAN dealing with ISO 8601 - search for ISO8601 on CPAN and use one.

  • encode binary data as base64 While it’s tempting to just dump binary data as a string (and let JSON::XS do the escaping), for I-JSON, it’s recommended to encode binary data as base64.

There are some other considerations - read RFC7493 for the details if interested.

INTEROPERABILITY WITH OTHER MODULES

JSON::XS uses the Types::Serialiser module to provide boolean constants. That means that the JSON true and false values will be compatible to true and false values of other modules that do the same, such as JSON::PP and CBOR::XS.

INTEROPERABILITY WITH OTHER JSON DECODERS

As long as you only serialise data that can be directly expressed in JSON, JSON::XS is incapable of generating invalid JSON output (modulo bugs, but JSON::XS has found more bugs in the official JSON testsuite (1) than the official JSON testsuite has found in JSON::XS (0)).

When you have trouble decoding JSON generated by this module using other decoders, then it is very likely that you have an encoding mismatch or the other decoder is broken.

When decoding, JSON::XS is strict by default and will likely catch all errors. There are currently two settings that change this: relaxed makes JSON::XS accept (but not generate) some non-standard extensions, and allow_tags will allow you to encode and decode Perl objects, at the cost of not outputting valid JSON anymore.

TAGGED VALUE SYNTAX AND STANDARD JSON EN/DECODERS

When you use allow_tags to use the extended (and also nonstandard and invalid) JSON syntax for serialised objects, and you still want to decode the generated When you want to serialise objects, you can run a regex to replace the tagged syntax by standard JSON arrays (it only works for “normal” package names without comma, newlines or single colons). First, the readable Perl version:

# if your FREEZE methods return no values, you need this replace first: $json =~ s/\ \s* (” (?: [^":,]+|.|::)* “) \s* \ \s* \s*/[$1]/gx; # this works for non-empty constructor arg lists: $json =~ s/\ \s* (” (?: [^":,]+|.|::)* “) \s* \ \s* /[$1,/gx;

And here is a less readable version that is easy to adapt to other languages:

$json =~ s/\s*(”([^":,]+|.|::)*")\s*\s*/[$1,/g;

Here is an ECMAScript version (same regex):

json = json.replace (/\s*("([^":,]+|.|::)*")\s*\s*/g, “[$1,”);

Since this syntax converts to standard JSON arrays, it might be hard to distinguish serialised objects from normal arrays. You can prepend a “magic number” as first array element to reduce chances of a collision:

$json =~ s/\s*("([^":,]+|.|::)*")\s*\s*/[“XU1peReLzT4ggEllLanBYq4G9VzliwKF”,$1,/g;

And after decoding the JSON text, you could walk the data structure looking for arrays with a first element of XU1peReLzT4ggEllLanBYq4G9VzliwKF.

The same approach can be used to create the tagged format with another encoder. First, you create an array with the magic string as first member, the classname as second, and constructor arguments last, encode it as part of your JSON structure, and then:

$json =~ s/\s*“XU1peReLzT4ggEllLanBYq4G9VzliwKF”\s*,\s*("([^":,]+|.|::)*")\s*,/($1)[/g;

Again, this has some limitations - the magic string must not be encoded with character escapes, and the constructor arguments must be non-empty.

(I-)THREADS

This module is not guaranteed to be ithread (or MULTIPLICITY-) safe and there are no plans to change this. Note that perl’s builtin so-called threads/ithreads are officially deprecated and should not be used.

THE PERILS OF SETLOCALE

Sometimes people avoid the Perl locale support and directly call the system’s setlocale function with LC_ALL.

This breaks both perl and modules such as JSON::XS, as stringification of numbers no longer works correctly (e.g. $x = 0.1; print "$x"+1 might print 1, and JSON::XS might output illegal JSON as JSON::XS relies on perl to stringify numbers).

The solution is simple: don’t call setlocale, or use it for only those categories you need, such as LC_MESSAGES or LC_CTYPE.

If you need LC_NUMERIC, you should enable it only around the code that actually needs it (avoiding stringification of numbers), and restore it afterwards.

SOME HISTORY

At the time this module was created there already were a number of JSON modules available on CPAN, so what was the reason to write yet another JSON module? While it seems there are many JSON modules, none of them correctly handled all corner cases, and in most cases their maintainers are unresponsive, gone missing, or not listening to bug reports for other reasons.

Beginning with version 2.0 of the JSON module, when both JSON and JSON::XS are installed, then JSON will fall back on JSON::XS (this can be overridden) with no overhead due to emulation (by inheriting constructor and methods). If JSON::XS is not available, it will fall back to the compatible JSON::PP module as backend, so using JSON instead of JSON::XS gives you a portable JSON API that can be fast when you need it and doesn’t require a C compiler when that is a problem.

Somewhere around version 3, this module was forked into Cpanel::JSON::XS, because its maintainer had serious trouble understanding JSON and insisted on a fork with many bugs “fixed” that weren’t actually bugs, while spreading FUD about this module without actually giving any details on his accusations. You be the judge, but in my personal opinion, if you want quality, you will stay away from dangerous forks like that.

BUGS

While the goal of this module is to be correct, that unfortunately does not mean it’s bug-free, only that I think its design is bug-free. If you keep reporting bugs they will be fixed swiftly, though.

Please refrain from using rt.cpan.org or any other bug reporting service. I put the contact address into my modules for a reason.

SEE ALSO

The json_xs command line utility for quick experiments.

AUTHOR

Marc Lehmann <[email protected]> http://home.schmorp.de/

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

680 - Linux cli command XML_PatAct_MatchNamepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_PatAct_MatchNamepm and provides detailed information about the command XML_PatAct_MatchNamepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_PatAct_MatchNamepm.

NAME 🖥️ XML_PatAct_MatchNamepm 🖥️

A pattern module for matching element names

SYNOPSIS

use XML::PatAct::MatchName; my $matcher = XML::PatAct::MatchName->new(); my $patterns = [ foo => ACTION, bar/foo => ACTION, … ];

DESCRIPTION

XML::PatAct::MatchName is a pattern module for use with PatAct drivers for applying pattern-action lists to XML parses or trees. XML::PatAct::MatchName is a simple pattern module that uses just element names to match on. If multiple names are supplied separated by `/’ characters, then all of the parent element names must match as well.

The order of patterns in the list is not significant. XML::PatAct::MatchName will use the most specific match. Using the synopsis above as an example, if you have an element `foo’, `bar/foo’ will match if `foo’ is in an element `bar’, otherwise just the pattern with `foo’ will match.

AUTHOR

Ken MacLeod, [email protected]

SEE ALSO

perl (1)

``Using PatAct Modules’’ and ``Creating PatAct Modules’’ in libxml-perl.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

681 - Linux cli command XtGetApplicationResources

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGetApplicationResources and provides detailed information about the command XtGetApplicationResources, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGetApplicationResources.

NAME 🖥️ XtGetApplicationResources 🖥️

obtain application resources

SYNTAX

#include <X11/Intrinsic.h>

void XtGetApplicationResources(Widget w, XtPointer base, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);

void XtVaGetApplicationResources(Widget w, XtPointer base, XtResourceList resources, Cardinal num_resources, … );

ARGUMENTS

args
Specifies the argument list to override resources obtained from the resource database.

base
Specifies the base address of the subpart data structure where the resources should be written.

num_args
Specifies the number of arguments in the argument list.

num_resources
Specifies the number of resources in the resource list.

resources
Specifies the resource list for the subpart.

  1. Specifies the widget that wants resources for a subpart or that identifies the resource database to search.


Specifies the variable arguments to override resources obtained from the resource database.

DESCRIPTION

The XtGetApplicationResources function first uses the passed widget, which is usually an application shell, to construct a resource name and class list, Then, it retrieves the resources from the argument list, the resource database, or the resource list default values. After adding base to each address, XtGetApplicationResources copies the resources into the address given in the resource list. If args is NULL, num_args must be zero. However, if num_args is zero, the argument list is not referenced. The portable way to specify application resources is to declare them as members of a structure and pass the address of the structure as the base argument.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

682 - Linux cli command isblank_l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isblank_l and provides detailed information about the command isblank_l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isblank_l.

NAME 🖥️ isblank_l 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

683 - Linux cli command pthread_equal

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_equal and provides detailed information about the command pthread_equal, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_equal.

NAME 🖥️ pthread_equal 🖥️

compare thread IDs

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_equal(pthread_t t1, pthread_t t2);

DESCRIPTION

The pthread_equal() function compares two thread identifiers.

RETURN VALUE

If the two thread IDs are equal, pthread_equal() returns a nonzero value; otherwise, it returns 0.

ERRORS

This function always succeeds.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_equal()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

The pthread_equal() function is necessary because thread IDs should be considered opaque: there is no portable way for applications to directly compare two pthread_t values.

SEE ALSO

pthread_create(3), pthread_self(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

684 - Linux cli command XtMainLoop

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtMainLoop and provides detailed information about the command XtMainLoop, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtMainLoop.

NAME 🖥️ XtMainLoop 🖥️

query and process events and input

SYNTAX

#include <X11/Intrinsic.h>

void XtNextEvent(XEvent *event_return);

Boolean XtPeekEvent(XEvent *event_return);

Boolean XtPending(void);

void XtProcessEvent(XtInputMask mask);

void XtMainLoop(void);

ARGUMENTS

event
Specifies a pointer to the event structure that is to be dispatched to the appropriate event handler.

event_return
Returns the event information to the specified event structure.

mask
Specifies what types of events to process. The mask is the bitwise inclusive OR of any combination of XtIMXEvent, XtIMTimer, XtIMAlternateInput, and XtIMSignal. As a convenience, the X Toolkit defines the symbolic name XtIMAll to be the bitwise inclusive OR of all event types.

DESCRIPTION

XtNextEvent has been replaced by XtAppNextEvent.

XtPeekEvent has been replaced by XtAppPeekEvent.

XtPending has been replaced by XtAppPending.

XtProcessEvent has been replaced by XtAppProcessEvent.

XtMainLoop has been replaced by XtAppMainLoop.

SEE ALSO

XtAppNextEvent(3xt), XtAppPending(3), XtAppPeekEvent(3), XtAppProcessEvent(3), XtAppMainLoop(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

685 - Linux cli command tfind

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tfind and provides detailed information about the command tfind, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tfind.

NAME 🖥️ tfind 🖥️

manage a binary search tree

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <search.h>
typedef enum { preorder, postorder, endorder, leaf } VISIT;
void *tsearch(const void *key, void **rootp,
 int (*compar)(const void *, const void *));
void *tfind(const void *key, void *const *rootp,
 int (*compar)(const void *, const void *));
void *tdelete(const void *restrict key, void **restrict rootp,
 int (*compar)(const void *, const void *));
void twalk(const void *root,
 void (*action)(const void *nodep, VISIT which,
 int depth));
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <search.h>
void twalk_r(const void *root,
 void (*action)(const void *nodep, VISIT which,
 void *closure),
 void *closure);
void tdestroy(void *root, void (*free_node)(void *nodep));

DESCRIPTION

tsearch(), tfind(), twalk(), and tdelete() manage a binary search tree. They are generalized from Knuth (6.2.2) Algorithm T. The first field in each node of the tree is a pointer to the corresponding data item. (The calling program must store the actual data.) compar points to a comparison routine, which takes pointers to two items. It should return an integer which is negative, zero, or positive, depending on whether the first item is less than, equal to, or greater than the second.

tsearch() searches the tree for an item. key points to the item to be searched for. rootp points to a variable which points to the root of the tree. If the tree is empty, then the variable that rootp points to should be set to NULL. If the item is found in the tree, then tsearch() returns a pointer to the corresponding tree node. (In other words, tsearch() returns a pointer to a pointer to the data item.) If the item is not found, then tsearch() adds it, and returns a pointer to the corresponding tree node.

tfind() is like tsearch(), except that if the item is not found, then tfind() returns NULL.

tdelete() deletes an item from the tree. Its arguments are the same as for tsearch().

twalk() performs depth-first, left-to-right traversal of a binary tree. root points to the starting node for the traversal. If that node is not the root, then only part of the tree will be visited. twalk() calls the user function action each time a node is visited (that is, three times for an internal node, and once for a leaf). action, in turn, takes three arguments. The first argument is a pointer to the node being visited. The structure of the node is unspecified, but it is possible to cast the pointer to a pointer-to-pointer-to-element in order to access the element stored within the node. The application must not modify the structure pointed to by this argument. The second argument is an integer which takes one of the values preorder, postorder, or endorder depending on whether this is the first, second, or third visit to the internal node, or the value leaf if this is the single visit to a leaf node. (These symbols are defined in <search.h>.) The third argument is the depth of the node; the root node has depth zero.

(More commonly, preorder, postorder, and endorder are known as preorder, inorder, and postorder: before visiting the children, after the first and before the second, and after visiting the children. Thus, the choice of name postorder is rather confusing.)

twalk_r() is similar to twalk(), but instead of the depth argument, the closure argument pointer is passed to each invocation of the action callback, unchanged. This pointer can be used to pass information to and from the callback function in a thread-safe fashion, without resorting to global variables.

tdestroy() removes the whole tree pointed to by root, freeing all resources allocated by the tsearch() function. For the data in each tree node the function free_node is called. The pointer to the data is passed as the argument to the function. If no such work is necessary, free_node must point to a function doing nothing.

RETURN VALUE

tsearch() returns a pointer to a matching node in the tree, or to the newly added node, or NULL if there was insufficient memory to add the item. tfind() returns a pointer to the node, or NULL if no match is found. If there are multiple items that match the key, the item whose node is returned is unspecified.

tdelete() returns a pointer to the parent of the node deleted, or NULL if the item was not found. If the deleted node was the root node, tdelete() returns a dangling pointer that must not be accessed.

tsearch(), tfind(), and tdelete() also return NULL if rootp was NULL on entry.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tsearch(), tfind(), tdelete()

Thread safetyMT-Safe race:rootp

twalk()

Thread safetyMT-Safe race:root

twalk_r()

Thread safetyMT-Safe race:root

tdestroy()

Thread safetyMT-Safe

STANDARDS

tsearch()
tfind()
tdelete()
twalk()
POSIX.1-2008.

tdestroy()
twalk_r()
GNU.

HISTORY

tsearch()
tfind()
tdelete()
twalk()
POSIX.1-2001, POSIX.1-2008, SVr4.

twalk_r()
glibc 2.30.

NOTES

twalk() takes a pointer to the root, while the other functions take a pointer to a variable which points to the root.

tdelete() frees the memory required for the node in the tree. The user is responsible for freeing the memory for the corresponding data.

The example program depends on the fact that twalk() makes no further reference to a node after calling the user function with argument “endorder” or “leaf”. This works with the GNU library implementation, but is not in the System V documentation.

EXAMPLES

The following program inserts twelve random numbers into a binary tree, where duplicate numbers are collapsed, then prints the numbers in order.

#define _GNU_SOURCE     /* Expose declaration of tdestroy() */
#include <search.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
static void *root = NULL;
static void *
xmalloc(size_t n)
{
    void *p;
    p = malloc(n);
    if (p)
        return p;
    fprintf(stderr, "insufficient memory

“); exit(EXIT_FAILURE); } static int compare(const void *pa, const void pb) { if ((int *) pa < *(int ) pb) return -1; if ((int *) pa > *(int *) pb) return 1; return 0; } static void action(const void *nodep, VISIT which, int depth) { int *datap; switch (which) { case preorder: break; case postorder: datap = *(int **) nodep; printf("%6d “, *datap); break; case endorder: break; case leaf: datap = *(int **) nodep; printf("%6d “, *datap); break; } } int main(void) { int *ptr; int **val; srand(time(NULL)); for (unsigned int i = 0; i < 12; i++) { ptr = xmalloc(sizeof(*ptr)); *ptr = rand() & 0xff; val = tsearch(ptr, &root, compare); if (val == NULL) exit(EXIT_FAILURE); if (*val != ptr) free(ptr); } twalk(root, action); tdestroy(root, free); exit(EXIT_SUCCESS); }

SEE ALSO

bsearch(3), hsearch(3), lsearch(3), qsort(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

686 - Linux cli command gammaf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gammaf and provides detailed information about the command gammaf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gammaf.

NAME 🖥️ gammaf 🖥️

(logarithm of the) gamma function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
[[deprecated]] double gamma(double x);
[[deprecated]] float gammaf(float x);
[[deprecated]] long double gammal(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

gamma():

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

gammaf(), gammal():

    _XOPEN_SOURCE >= 600 || (_XOPEN_SOURCE && _ISOC99_SOURCE)
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions are deprecated: instead, use either the tgamma(3) or the lgamma(3) functions, as appropriate.

For the definition of the Gamma function, see tgamma(3).

*BSD version

The libm in 4.4BSD and some versions of FreeBSD had a gamma() function that computes the Gamma function, as one would expect.

glibc version

glibc has a gamma() function that is equivalent to lgamma(3) and computes the natural logarithm of the Gamma function.

RETURN VALUE

See lgamma(3).

ERRORS

See lgamma(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

gamma(), gammaf(), gammal()

Thread safetyMT-Unsafe race:signgam

STANDARDS

None.

HISTORY

SVID 2.

Because of historical variations in behavior across systems, this function is not specified in any recent standard.

4.2BSD had a gamma() that computed ln(|Gamma(|x|)|), leaving the sign of Gamma(|x|) in the external integer signgam. In 4.3BSD the name was changed to lgamma(3), and the man page promises

“At some time in the future the name gamma will be rehabilitated and used for the Gamma function”

This did indeed happen in 4.4BSD, where gamma() computes the Gamma function (with no effect on signgam). However, this came too late, and we now have tgamma(3), the “true gamma” function.

SEE ALSO

lgamma(3), signgam(3), tgamma(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

687 - Linux cli command pcap_dispatchpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_dispatchpcap and provides detailed information about the command pcap_dispatchpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_dispatchpcap.

NAME 🖥️ pcap_dispatchpcap 🖥️

process packets from a live capture or savefile

SYNOPSIS

#include <pcap/pcap.h>
typedef void (*pcap_handler)(u_char *user, const struct pcap_pkthdr *h,
			     const u_char *bytes);
int pcap_loop(pcap_t *p, int cnt,
pcap_handler callback, u_char *user);
int pcap_dispatch(pcap_t *p, int cnt,
pcap_handler callback, u_char *user);

DESCRIPTION

pcap_loop() processes packets from a live capture or ``savefile’’ until cnt packets are processed, the end of the ``savefile’’ is reached when reading from a ``savefile’’, pcap_breakloop(3PCAP) is called, or an error occurs. It does not return when live packet buffer timeouts occur. A value of -1 or 0 for cnt is equivalent to infinity, so that packets are processed until another ending condition occurs.

pcap_dispatch() processes packets from a live capture or ``savefile’’ until cnt packets are processed, the end of the current bufferful of packets is reached when doing a live capture, the end of the ``savefile’’ is reached when reading from a ``savefile’’, pcap_breakloop() is called, or an error occurs. Thus, when doing a live capture, cnt is the maximum number of packets to process before returning, but is not a minimum number; when reading a live capture, only one bufferful of packets is read at a time, so fewer than cnt packets may be processed. A value of -1 or 0 for cnt causes all the packets received in one buffer to be processed when reading a live capture, and causes all the packets in the file to be processed when reading a ``savefile’'.

Note that, when doing a live capture on some platforms, if the read timeout expires when there are no packets available, pcap_dispatch() will return 0, even when not in non-blocking mode, as there are no packets to process. Applications should be prepared for this to happen, but must not rely on it happening.

callback specifies a pcap_handler routine to be called with three arguments: a u_char pointer which is passed in the user argument to pcap_loop() or pcap_dispatch(), a const struct pcap_pkthdr pointer pointing to the packet time stamp and lengths, and a const u_char pointer to the first caplen (as given in the struct pcap_pkthdr a pointer to which is passed to the callback routine) bytes of data from the packet. The struct pcap_pkthdr and the packet data are not to be freed by the callback routine, and are not guaranteed to be valid after the callback routine returns; if the code needs them to be valid after the callback, it must make a copy of them.

The bytes of data from the packet begin with a link-layer header. The format of the link-layer header is indicated by the return value of the pcap_datalink(3PCAP) routine when handed the pcap_t value also passed to pcap_loop() or pcap_dispatch(). https://www.tcpdump.org/linktypes.html lists the values pcap_datalink() can return and describes the packet formats that correspond to those values. The value it returns will be valid for all packets received unless and until pcap_set_datalink(3PCAP) is called; after a successful call to pcap_set_datalink(), all subsequent packets will have a link-layer header of the type specified by the link-layer header type value passed to pcap_set_datalink().

Do NOT assume that the packets for a given capture or ``savefile`` will have any given link-layer header type, such as DLT_EN10MB for Ethernet. For example, the “any” device on Linux will have a link-layer header type of DLT_LINUX_SLL or DLT_LINUX_SLL2 even if all devices on the system at the time the “any” device is opened have some other data link type, such as DLT_EN10MB for Ethernet.

RETURN VALUE

pcap_loop() returns 0 if cnt is exhausted or if, when reading from a ``savefile’’, no more packets are available. It returns PCAP_ERROR_BREAK if the loop terminated due to a call to pcap_breakloop() before any packets were processed, PCAP_ERROR_NOT_ACTIVATED if called on a capture handle that has been created but not activated, or PCAP_ERROR if another error occurs. It does not return when live packet buffer timeouts occur; instead, it attempts to read more packets.

pcap_dispatch() returns the number of packets processed on success; this can be 0 if no packets were read from a live capture (if, for example, they were discarded because they didn’t pass the packet filter, or if, on platforms that support a packet buffer timeout that starts before any packets arrive, the timeout expires before any packets arrive, or if the file descriptor for the capture device is in non-blocking mode and no packets were available to be read) or if no more packets are available in a ``savefile.’’ It returns PCAP_ERROR_BREAK if the loop terminated due to a call to pcap_breakloop() before any packets were processed, PCAP_ERROR_NOT_ACTIVATED if called on a capture handle that has been created but not activated, or PCAP_ERROR if another error occurs.

If your application uses pcap_breakloop(), make sure that you explicitly check for PCAP_ERROR and PCAP_ERROR_BREAK, rather than just checking for a return value < 0.

If PCAP_ERROR is returned, pcap_geterr(3PCAP) or pcap_perror(3PCAP) may be called with p as an argument to fetch or display the error text.

BACKWARD COMPATIBILITY

In libpcap versions before 1.5.0, the behavior when cnt was 0 was undefined; different platforms and devices behaved differently, so code that must work with these versions of libpcap should use -1, not 0, as the value of cnt.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

688 - Linux cli command isgraph_l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isgraph_l and provides detailed information about the command isgraph_l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isgraph_l.

NAME 🖥️ isgraph_l 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

689 - Linux cli command key_gendes

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command key_gendes and provides detailed information about the command key_gendes, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the key_gendes.

NAME 🖥️ key_gendes 🖥️

interfaces to rpc keyserver daemon

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <rpc/rpc.h>
int key_decryptsession(char *remotename, des_block *deskey);
int key_encryptsession(char *remotename, des_block *deskey);
int key_gendes(des_block *deskey);
int key_setsecret(char *key);
int key_secretkey_is_set(void);

DESCRIPTION

The functions here are used within the RPC’s secure authentication mechanism (AUTH_DES). There should be no need for user programs to use this functions.

The function key_decryptsession() uses the (remote) server netname and takes the DES key for decrypting. It uses the public key of the server and the secret key associated with the effective UID of the calling process.

The function key_encryptsession() is the inverse of key_decryptsession(). It encrypts the DES keys with the public key of the server and the secret key associated with the effective UID of the calling process.

The function key_gendes() is used to ask the keyserver for a secure conversation key.

The function key_setsecret() is used to set the key for the effective UID of the calling process.

The function key_secretkey_is_set() can be used to determine whether a key has been set for the effective UID of the calling process.

RETURN VALUE

These functions return 1 on success and 0 on failure.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

key_decryptsession(), key_encryptsession(), key_gendes(), key_setsecret(), key_secretkey_is_set()

Thread safetyMT-Safe

NOTES

Note that we talk about two types of encryption here. One is asymmetric using a public and secret key. The other is symmetric, the 64-bit DES.

These routines were part of the Linux/Doors-project, abandoned by now.

SEE ALSO

crypt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

690 - Linux cli command pcap_lookupdevpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_lookupdevpcap and provides detailed information about the command pcap_lookupdevpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_lookupdevpcap.

NAME 🖥️ pcap_lookupdevpcap 🖥️

find the default device on which to capture

SYNOPSIS

#include <pcap/pcap.h>
char errbuf[PCAP_ERRBUF_SIZE];
[DEPRECATED] char *pcap_lookupdev(char *errbuf);

DESCRIPTION

This interface is obsoleted by pcap_findalldevs(3PCAP). To find a default device on which to capture, call pcap_findalldevs() and, if the list it returns is not empty, use the first device in the list. (If the list is empty, there are no devices on which capture is possible.)

If pcap_init(3PCAP) has been called, this interface always returns NULL.

pcap_lookupdev() returns a pointer to a string giving the name of a network device suitable for use with pcap_create(3PCAP) and pcap_activate(3PCAP), or with pcap_open_live(3PCAP), and with pcap_lookupnet(3PCAP). If there is an error, or if pcap_init(3PCAP) has been called, NULL is returned and errbuf is filled in with an appropriate error message. errbuf is assumed to be able to hold at least PCAP_ERRBUF_SIZE chars.

SEE ALSO

pcap(3PCAP)

BUGS

The pointer returned by pcap_lookupdev() points to a static buffer; subsequent calls to pcap_lookupdev() in the same thread, or calls to pcap_lookupdev() in another thread, may overwrite that buffer.

In WinPcap and Npcap, this function may return a UTF-16 string rather than an ASCII or UTF-8 string.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

691 - Linux cli command XtGetDisplays

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGetDisplays and provides detailed information about the command XtGetDisplays, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGetDisplays.

NAME 🖥️ XtGetDisplays 🖥️

retrieve a list of displays associated with an application context

SYNTAX

#include <X11/Intrinsic.h>

void XtGetDisplays(XtAppContext app_context, Display ***dpy_return, Cardinal* num_dpy_return);

ARGUMENTS

app_context
Specifies the application context.

dpy_return
Returns a list of open X display connections in the specified application context.

num_dpy_return
Returns the count of open X display connections in dpy_return.

DESCRIPTION

To free the list of displays, use XtFree.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

692 - Linux cli command lseek64

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lseek64 and provides detailed information about the command lseek64, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lseek64.

NAME 🖥️ lseek64 🖥️

reposition 64-bit read/write file offset

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _LARGEFILE64_SOURCE /* See feature_test_macros(7) */
#include <sys/types.h>
#include <unistd.h>
off64_t lseek64(int fd, off64_t offset, int whence);

DESCRIPTION

The lseek() family of functions reposition the offset of the open file associated with the file descriptor fd to offset bytes relative to the start, current position, or end of the file, when whence has the value SEEK_SET, SEEK_CUR, or SEEK_END, respectively.

For more details, return value, and errors, see lseek(2).

Four interfaces are available: lseek(), lseek64(), llseek(), and _llseek().

lseek()

Prototype:

off_t lseek(int fd, off_t offset, int whence);

The C library’s lseek() wrapper function uses the type off_t. This is a 32-bit signed type on 32-bit architectures, unless one compiles with

#define _FILE_OFFSET_BITS 64

in which case it is a 64-bit signed type.

lseek64()

Prototype:

off64_t lseek64(int fd, off64_t offset, int whence);

The lseek64() library function uses a 64-bit type even when off_t is a 32-bit type. Its prototype (and the type off64_t) is available only when one compiles with

#define _LARGEFILE64_SOURCE

The function lseek64() is available since glibc 2.1.

llseek()

Prototype:

loff_t llseek(int fd, loff_t offset, int whence);

The type loff_t is a 64-bit signed type. The llseek() library function is available in glibc and works without special defines. However, the glibc headers do not provide a prototype. Users should add the above prototype, or something equivalent, to their own source. When users complained about data loss caused by a miscompilation of e2fsck(8), glibc 2.1.3 added the link-time warning

“the `llseek’ function may be dangerous; use `lseek64’ instead.”

This makes this function unusable if one desires a warning-free compilation.

Since glibc 2.28, this function symbol is no longer available to newly linked applications.

_llseek()

On 32-bit architectures, this is the system call that is used (by the C library wrapper functions) to implement all of the above functions. The prototype is:

int _llseek(int fd, off_t offset_hi, off_t offset_lo,
 loff_t *result, int whence);

For more details, see llseek(2).

64-bit systems don’t need an _llseek() system call. Instead, they have an lseek(2) system call that supports 64-bit file offsets.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

lseek64()

Thread safetyMT-Safe

NOTES

lseek64() is one of the functions that was specified in the Large File Summit (LFS) specification that was completed in 1996. The purpose of the specification was to provide transitional support that allowed applications on 32-bit systems to access files whose size exceeds that which can be represented with a 32-bit off_t type. As noted above, this symbol is exposed by header files if the _LARGEFILE64_SOURCE feature test macro is defined. ALternatively, on a 32-bit system, the symbol lseek is aliased to lseek64 if the macro _FILE_OFFSET_BITS is defined with the value 64.

SEE ALSO

llseek(2), lseek(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

693 - Linux cli command vscanf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command vscanf and provides detailed information about the command vscanf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the vscanf.

NAME 🖥️ vscanf 🖥️

input FILE format conversion

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int scanf(const char *restrict format, ...);
int fscanf(FILE *restrict stream,
 const char *restrict format, ...);
#include <stdarg.h>
int vscanf(const char *restrict format, va_list ap);
int vfscanf(FILE *restrict stream,
 const char *restrict format, va_list ap);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

vscanf(), vfscanf():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The scanf() family of functions scans formatted input like sscanf(3), but read from a FILE. It is very difficult to use these functions correctly, and it is preferable to read entire lines with fgets(3) or getline(3) and parse them later with sscanf(3) or more specialized functions such as strtol(3).

The scanf() function reads input from the standard input stream stdin and fscanf() reads input from the stream pointer stream.

The vfscanf() function is analogous to vfprintf(3) and reads input from the stream pointer stream using a variable argument list of pointers (see stdarg(3). The vscanf() function is analogous to vprintf(3) and reads from the standard input.

RETURN VALUE

On success, these functions return the number of input items successfully matched and assigned; this can be fewer than provided for, or even zero, in the event of an early matching failure.

The value EOF is returned if the end of input is reached before either the first successful conversion or a matching failure occurs. EOF is also returned if a read error occurs, in which case the error indicator for the stream (see ferror(3)) is set, and errno is set to indicate the error.

ERRORS

EAGAIN
The file descriptor underlying stream is marked nonblocking, and the read operation would block.

EBADF
The file descriptor underlying stream is invalid, or not open for reading.

EILSEQ
Input byte sequence does not form a valid character.

EINTR
The read operation was interrupted by a signal; see signal(7).

EINVAL
Not enough arguments; or format is NULL.

ENOMEM
Out of memory.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

scanf(), fscanf(), vscanf(), vfscanf()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

CAVEATS

These functions make it difficult to distinguish newlines from other white space, This is especially problematic with line-buffered input, like the standard input stream.

These functions can’t report errors after the last non-suppressed conversion specification.

BUGS

It is impossible to accurately know how many characters these functions have consumed from the input stream, since they only report the number of successful conversions. For example, if the input is “123 a”, scanf("%d %d", &a, &b) will consume the digits, the newline, and the space, but not the letter a. This makes it difficult to recover from invalid input.

SEE ALSO

fgets(3), getline(3), sscanf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

694 - Linux cli command getgrent_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getgrent_r and provides detailed information about the command getgrent_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getgrent_r.

NAME 🖥️ getgrent_r 🖥️

get group file entry reentrantly

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <grp.h>
int getgrent_r(struct group *restrict gbuf,
 char buf[restrict .buflen], size_t buflen,
 struct group **restrict gbufp);
int fgetgrent_r(FILE *restrict stream, struct group *restrict gbuf,
 char buf[restrict .buflen], size_t buflen,
 struct group **restrict gbufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getgrent_r():

    _GNU_SOURCE

fgetgrent_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _SVID_SOURCE

DESCRIPTION

The functions getgrent_r() and fgetgrent_r() are the reentrant versions of getgrent(3) and fgetgrent(3). The former reads the next group entry from the stream initialized by setgrent(3). The latter reads the next group entry from stream.

The group structure is defined in <grp.h> as follows:

struct group {
    char   *gr_name;        /* group name */
    char   *gr_passwd;      /* group password */
    gid_t   gr_gid;         /* group ID */
    char  **gr_mem;         /* NULL-terminated array of pointers
                               to names of group members */
};

For more information about the fields of this structure, see group(5).

The nonreentrant functions return a pointer to static storage, where this static storage contains further pointers to group name, password, and members. The reentrant functions described here return all of that in caller-provided buffers. First of all there is the buffer gbuf that can hold a struct group. And next the buffer buf of size buflen that can hold additional strings. The result of these functions, the struct group read from the stream, is stored in the provided buffer *gbuf, and a pointer to this struct group is returned in *gbufp.

RETURN VALUE

On success, these functions return 0 and *gbufp is a pointer to the struct group. On error, these functions return an error value and *gbufp is NULL.

ERRORS

ENOENT
No more entries.

ERANGE
Insufficient buffer space supplied. Try again with larger buffer.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getgrent_r()

Thread safety

MT-Unsafe race:grent locale

fgetgrent_r()

Thread safety

MT-Safe

In the above table, grent in race:grent signifies that if any of the functions setgrent(3), getgrent(3), endgrent(3), or getgrent_r() are used in parallel in different threads of a program, then data races could occur.

VERSIONS

Other systems use the prototype

struct group *getgrent_r(struct group *grp, char *buf,
                         int buflen);

or, better,

int getgrent_r(struct group *grp, char *buf, int buflen,
               FILE **gr_fp);

STANDARDS

GNU.

HISTORY

These functions are done in a style resembling the POSIX version of functions like getpwnam_r(3).

NOTES

The function getgrent_r() is not really reentrant since it shares the reading position in the stream with all other threads.

EXAMPLES

#define _GNU_SOURCE
#include <grp.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#define BUFLEN 4096
int
main(void)
{
    struct group grp;
    struct group *grpp;
    char buf[BUFLEN];
    int i;
    setgrent();
    while (1) {
        i = getgrent_r(&grp, buf, sizeof(buf), &grpp);
        if (i)
            break;
        printf("%s (%jd):", grpp->gr_name, (intmax_t) grpp->gr_gid);
        for (size_t j = 0; ; j++) {
            if (grpp->gr_mem[j] == NULL)
                break;
            printf(" %s", grpp->gr_mem[j]);
        }
        printf("

“); } endgrent(); exit(EXIT_SUCCESS); }

SEE ALSO

fgetgrent(3), getgrent(3), getgrgid(3), getgrnam(3), putgrent(3), group(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

695 - Linux cli command Image_ExifTool_Geotagpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Geotagpm and provides detailed information about the command Image_ExifTool_Geotagpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Geotagpm.

NAME 🖥️ Image_ExifTool_Geotagpm 🖥️

Geotagging utility routines

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module loads GPS track logs, interpolates to determine position based on time, and sets new GPS values for geotagging images. Currently supported formats are GPX, NMEA RMC/GGA/GLL, KML, IGC, Garmin XML and TCX, Magellan PMGNTRK, Honeywell PTNTHPR, Bramor gEO, Winplus Beacon text, Google Takeout JSON, GPS/IMU CSV, DJI CSV, ExifTool CSV log files.

Methods in this module should not be called directly. Instead, the Geotag feature is accessed by writing the values of the ExifTool Geotag, Geosync and Geotime tags (see the Extra Tags in the tag name documentation).

NOTES

To take advantage of attitude information in the PTNTHPR NMEA sentence, the user-defined tag GPSRoll, must be active.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.topografix.com/GPX/1/1/>

<http://www.gpsinformation.org/dale/nmea.htm#GSA>

<http://code.google.com/apis/kml/documentation/kmlreference.html>

<http://www.fai.org/gliding/system/files/tech_spec_gnss.pdf>

ACKNOWLEDGEMENTS

Thanks to Lionel Genet for the ability to read IGC format track logs.

SEE ALSO

“Extra Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

696 - Linux cli command mbtowc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mbtowc and provides detailed information about the command mbtowc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mbtowc.

NAME 🖥️ mbtowc 🖥️

convert a multibyte sequence to a wide character

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int mbtowc(wchar_t *restrict pwc, const char s[restrict .n], size_t n);

DESCRIPTION

The main case for this function is when s is not NULL and pwc is not NULL. In this case, the mbtowc() function inspects at most n bytes of the multibyte string starting at s, extracts the next complete multibyte character, converts it to a wide character and stores it at *pwc. It updates an internal shift state known only to the mbtowc() function. If s does not point to a null byte (‘�’), it returns the number of bytes that were consumed from s, otherwise it returns 0.

If the n bytes starting at s do not contain a complete multibyte character, or if they contain an invalid multibyte sequence, mbtowc() returns -1. This can happen even if n >= MB_CUR_MAX, if the multibyte string contains redundant shift sequences.

A different case is when s is not NULL but pwc is NULL. In this case, the mbtowc() function behaves as above, except that it does not store the converted wide character in memory.

A third case is when s is NULL. In this case, pwc and n are ignored. The mbtowc() function resets the shift state, only known to this function, to the initial state, and returns nonzero if the encoding has nontrivial shift state, or zero if the encoding is stateless.

RETURN VALUE

If s is not NULL, the mbtowc() function returns the number of consumed bytes starting at s, or 0 if s points to a null byte, or -1 upon failure.

If s is NULL, the mbtowc() function returns nonzero if the encoding has nontrivial shift state, or zero if the encoding is stateless.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mbtowc()

Thread safetyMT-Unsafe race

VERSIONS

This function is not multithread safe. The function mbrtowc(3) provides a better interface to the same functionality.

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of mbtowc() depends on the LC_CTYPE category of the current locale.

SEE ALSO

MB_CUR_MAX(3), mblen(3), mbrtowc(3), mbstowcs(3), wcstombs(3), wctomb(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

697 - Linux cli command sqrt

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sqrt and provides detailed information about the command sqrt, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sqrt.

NAME 🖥️ sqrt 🖥️

square root function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double sqrt(double x);
float sqrtf(float x);
long double sqrtl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sqrtf(), sqrtl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the nonnegative square root of x.

RETURN VALUE

On success, these functions return the square root of x.

If x is a NaN, a NaN is returned.

If x is +0 (-0), +0 (-0) is returned.

If x is positive infinity, positive infinity is returned.

If x is less than -0, a domain error occurs, and a NaN is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x less than -0
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sqrt(), sqrtf(), sqrtl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

SEE ALSO

cbrt(3), csqrt(3), hypot(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

698 - Linux cli command XtGetSelectionParameters

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGetSelectionParameters and provides detailed information about the command XtGetSelectionParameters, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGetSelectionParameters.

NAME 🖥️ XtGetSelectionParameters 🖥️

retrieve target parameters for a selection request with a single target

SYNTAX

#include <X11/Intrinsic.h>

void XtGetSelectionParameters(Widget owner, Atom selection, XtRequestId request_id, Atom *type_return, XtPointer *value_return, unsigned long *length_return, int *format_return);

ARGUMENTS

owner
Specifies the widget that owns the specified selection.

selection
Specifies the selection being processed.

request_id
Specifies the requestor id in the case of incremental selections, or NULL in the case of atomic transfers.

type_return
Specifies a pointer to an atom in which the property type of the parameters will be stored.

value_return
Specifies a pointer into which a pointer to the parameters are to be stored. A NULL will be stored if no parameters accompany the request.

length_return
Specifies a pointer into which the number of data elements in value_return of size indicated by format_return will be stored.

format_return
Specifies a pointer into which the size in bits of the parameter data in the elements of value_return will be stored.

DESCRIPTION

XtGetSelectionParameters may only be called from within an XtConvertSelectionProc or from within the last call to an XtConvertSelectionIncrProc with a new request_id.

SEE ALSO

XtSetSelectionParameters(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

699 - Linux cli command Net_DNS_Resolverpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_Resolverpm and provides detailed information about the command Net_DNS_Resolverpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_Resolverpm.

NAME 🖥️ Net_DNS_Resolverpm 🖥️

DNS resolver class

SYNOPSIS

use Net::DNS; $resolver = Net::DNS::Resolver->new(); # Perform a lookup, using the searchlist if appropriate. $reply = $resolver->search( example.com ); # Perform a lookup, without the searchlist $reply = $resolver->query( example.com, MX ); # Perform a lookup, without pre or post-processing $reply = $resolver->send( example.com, MX, IN ); # Send a prebuilt query packet $query = Net::DNS::Packet->new( … ); $reply = $resolver->send( $query );

DESCRIPTION

Instances of the Net::DNS::Resolver class represent resolver objects. A program may have multiple resolver objects, each maintaining its own state information such as the nameservers to be queried, whether recursion is desired, etc.

METHODS

new

# Use the default configuration $resolver = Net::DNS::Resolver->new(); # Use my own configuration file $resolver = Net::DNS::Resolver->new( config_file => /my/dns.conf ); # Set options in the constructor $resolver = Net::DNS::Resolver->new( nameservers => [ 2001:DB8::1, ns.example.com ], recurse => 0, debug => 1 );

Returns a resolver object. If no arguments are supplied, new() returns an object having the default configuration.

On Unix and Linux systems, the default values are read from the following files, in the order indicated:

/etc/resolv.conf, $HOME/.resolv.conf, ./.resolv.conf

The following keywords are recognised in resolver configuration files:

nameserver address IP address of a name server that the resolver should query. domain localdomain The domain suffix to be appended to a short non-absolute name. search domain … A space-separated list of domains in the desired search path. options option:value … A space-separated list of key:value items.

Except for /etc/resolv.conf, files will only be read if owned by the effective userid running the program. In addition, several environment variables may contain configuration information; see “ENVIRONMENT”.

Note that the domain and searchlist keywords are mutually exclusive. If both are present, the resulting behaviour is unspecified. If neither is present, the domain is determined from the local hostname.

On Windows systems, an attempt is made to determine the system defaults using the registry. Systems with many dynamically configured network interfaces may confuse Net::DNS.

# Use my own configuration file $resolver = Net::DNS::Resolver->new( config_file => /my/dns.conf );

You can include a configuration file of your own when creating a resolver object. This is supported on both Unix and Windows.

If a custom configuration file is specified at first instantiation, all other configuration files and environment variables are ignored.

# Set options in the constructor $resolver = Net::DNS::Resolver->new( nameservers => [ 2001:DB8::1, ns.example.com ], recurse => 0 );

Explicit arguments to new() override the corresponding configuration variables. The argument list consists of a sequence of (name=>value) pairs, each interpreted as an invocation of the corresponding method.

print

$resolver->print;

Prints the resolver state on the standard output.

query

$packet = $resolver->query( host ); $packet = $resolver->query( host.example.com ); $packet = $resolver->query( 2001:DB8::1 ); $packet = $resolver->query( example.com, MX ); $packet = $resolver->query( annotation.example.com, TXT, IN );

Performs a DNS query for the given name; the search list is not applied. If defnames is true, the default domain will be appended to unqualified names.

The record type and class can be omitted; they default to A and IN. If the name looks like an IP address (IPv4 or IPv6), then a query within in-addr.arpa or ip6.arpa will be performed.

Returns a Net::DNS::Packet object, or undef if no answers were found. The reason for failure may be determined using errorstring().

If you need to examine the response packet, whether it contains any answers or not, use the send() method instead.

$packet = $resolver->search( host ); $packet = $resolver->search( host.example.com ); $packet = $resolver->search( 2001:DB8::1 ); $packet = $resolver->search( example.com, MX ); $packet = $resolver->search( annotation.example.com, TXT, IN );

Performs a DNS query for the given name, applying the searchlist if appropriate. The search algorithm is as follows:

If the name contains one or more non-terminal dots, perform an initial query using the unmodified name.

If the number of dots is less than ndots, and there is no terminal dot, try appending each suffix in the search list.

The record type and class can be omitted; they default to A and IN. If the name looks like an IP address (IPv4 or IPv6), then a query within in-addr.arpa or ip6.arpa will be performed.

Returns a Net::DNS::Packet object, or undef if no answers were found. The reason for failure may be determined using errorstring().

If you need to examine the response packet, whether it contains any answers or not, use the send() method instead.

send

$packet = $resolver->send( $query ); $packet = $resolver->send( host.example.com ); $packet = $resolver->send( 2001:DB8::1 ); $packet = $resolver->send( example.com, MX ); $packet = $resolver->send( annotation.example.com, TXT, IN );

Performs a DNS query for the given name. Neither the searchlist nor the default domain will be appended.

The argument list can be either a pre-built query Net::DNS::Packet or a list of strings. The record type and class can be omitted; they default to A and IN. If the name looks like an IP address (IPv4 or IPv6), then a query within in-addr.arpa or ip6.arpa will be performed.

Returns a Net::DNS::Packet object whether there were any answers or not. Use $packet->header->ancount or $packet->answer to find out if there were any records in the answer section. Returns undef if no response was received.

axfr

@zone = $resolver->axfr(); @zone = $resolver->axfr( example.com ); @zone = $resolver->axfr( example.com, IN ); $iterator = $resolver->axfr(); $iterator = $resolver->axfr( example.com ); $iterator = $resolver->axfr( example.com, IN ); $rr = $iterator->();

Performs a zone transfer using the resolver nameservers list, attempted in the order listed.

If the zone is omitted, it defaults to the first zone listed in the resolver search list.

If the class is omitted, it defaults to IN.

When called in list context, axfr() returns a list of Net::DNS::RR objects. The redundant SOA record that terminates the zone transfer is not returned to the caller.

In deferrence to RFC1035(6.3), a complete zone transfer is expected to return all records in the zone or nothing at all. When no resource records are returned by axfr(), the reason for failure may be determined using errorstring().

Here is an example that uses a timeout and TSIG verification:

$resolver->tcp_timeout( 10 ); $resolver->tsig( $keyfile ); @zone = $resolver->axfr( example.com ); foreach $rr (@zone) { $rr->print; }

When called in scalar context, axfr() returns an iterator object. Each invocation of the iterator returns a single Net::DNS::RR or undef when the zone is exhausted.

An exception is raised if the zone transfer can not be completed.

The redundant SOA record that terminates the zone transfer is not returned to the caller.

Here is the example above, implemented using an iterator:

$resolver->tcp_timeout( 10 ); $resolver->tsig( $keyfile ); $iterator = $resolver->axfr( example.com ); while ( $rr = $iterator->() ) { $rr->print; }

bgsend

$handle = $resolver->bgsend( $packet ) || die $resolver->errorstring; $handle = $resolver->bgsend( host.example.com ); $handle = $resolver->bgsend( 2001:DB8::1 ); $handle = $resolver->bgsend( example.com, MX ); $handle = $resolver->bgsend( annotation.example.com, TXT, IN );

Performs a background DNS query for the given name and returns immediately without waiting for the response. The program can then perform other tasks while awaiting the response from the nameserver.

The argument list can be either a Net::DNS::Packet object or a list of strings. The record type and class can be omitted; they default to A and IN. If the name looks like an IP address (IPv4 or IPv6), then a query within in-addr.arpa or ip6.arpa will be performed.

Returns an opaque handle which is passed to subsequent invocations of the bgbusy() and bgread() methods. Errors are indicated by returning undef in which case the reason for failure may be determined using errorstring().

The response Net::DNS::Packet object is obtained by calling bgread().

BEWARE: Programs should make no assumptions about the nature of the handles returned by bgsend() which should be used strictly as described here.

bgread

$handle = $resolver->bgsend( www.example.com ); $packet = $resolver->bgread($handle);

Reads the response following a background query. The argument is the handle returned by bgsend().

Returns a Net::DNS::Packet object or undef if no response was received before the timeout interval expired.

bgbusy

$handle = $resolver->bgsend( foo.example.com ); while ($resolver->bgbusy($handle)) { … } $packet = $resolver->bgread($handle);

Returns true while awaiting the response or for the transaction to time out. The argument is the handle returned by bgsend().

Truncated UDP packets will be retried transparently using TCP while continuing to assert busy to the caller.

debug

print debug flag: , $resolver->debug, " “; $resolver->debug(1);

Get or set the debug flag. If set, calls to search(), query(), and send() will print debugging information on the standard output. The default is false.

defnames

print defnames flag: , $resolver->defnames, " “; $resolver->defnames(0);

Get or set the defnames flag. If true, calls to query() will append the default domain to resolve names that are not fully qualified. The default is true.

dnsrch

print dnsrch flag: , $resolver->dnsrch, " “; $resolver->dnsrch(0);

Get or set the dnsrch flag. If true, calls to search() will apply the search list to resolve names that are not fully qualified. The default is true.

domain

$domain = $resolver->domain; $resolver->domain( domain.example );

Gets or sets the resolver default domain.

igntc

print igntc flag: , $resolver->igntc, " “; $resolver->igntc(1);

Get or set the igntc flag. If true, truncated packets will be ignored. If false, the query will be retried using TCP. The default is false.

nameserver, nameservers

@nameservers = $resolver->nameservers(); $resolver->nameservers( 2001:DB8::1, 192.0.2.1 ); $resolver->nameservers( ns.domain.example. );

Gets or sets the nameservers to be queried.

Also see the IPv6 transport notes below

persistent_tcp

print Persistent TCP flag: , $resolver->persistent_tcp, " “; $resolver->persistent_tcp(1);

Get or set the persistent TCP setting. If true, Net::DNS will keep a TCP socket open for each host:port to which it connects. This is useful if you are using TCP and need to make a lot of queries or updates to the same nameserver.

The default is false unless you are running a SOCKSified Perl, in which case the default is true.

persistent_udp

print Persistent UDP flag: , $resolver->persistent_udp, " “; $resolver->persistent_udp(1);

Get or set the persistent UDP setting. If true, a Net::DNS resolver will use the same UDP socket for all queries within each address family.

This avoids the cost of creating and tearing down UDP sockets, but also defeats source port randomisation.

port

print sending queries to port , $resolver->port, " “; $resolver->port(9732);

Gets or sets the port to which queries are sent. Convenient for nameserver testing using a non-standard port. The default is port 53.

recurse

print recursion flag: , $resolver->recurse, " “; $resolver->recurse(0);

Get or set the recursion flag. If true, this will direct nameservers to perform a recursive query. The default is true.

retrans

print retrans interval: , $resolver->retrans, " “; $resolver->retrans(3);

Get or set the retransmission interval The default is 5 seconds.

retry

print number of tries: , $resolver->retry, " “; $resolver->retry(2);

Get or set the number of times to try the query. The default is 4.

searchlist

@searchlist = $resolver->searchlist; $resolver->searchlist( a.example, b.example, c.example );

Gets or sets the resolver search list.

srcaddr

$resolver->srcaddr(2001::DB8::1);

Sets the source address from which queries are sent. Convenient for forcing queries from a specific interface on a multi-homed host. The default is to use any local address.

srcport

$resolver->srcport(5353);

Sets the port from which queries are sent. The default is 0, meaning any port.

tcp_timeout

print TCP timeout: , $resolver->tcp_timeout, " “; $resolver->tcp_timeout(10);

Get or set the TCP timeout in seconds. The default is 120 seconds (2 minutes).

udp_timeout

print UDP timeout: , $resolver->udp_timeout, " “; $resolver->udp_timeout(10);

Get or set the bgsend() UDP timeout in seconds. The default is 30 seconds.

udppacketsize

print “udppacketsize: “, $resolver->udppacketsize, " “; $resolver->udppacketsize(2048);

Get or set the UDP packet size. If set to a value not less than the default DNS packet size, an EDNS extension will be added indicating support for large UDP datagrams.

usevc

print usevc flag: , $resolver->usevc, " “; $resolver->usevc(1);

Get or set the usevc flag. If true, queries will be performed using virtual circuits (TCP) instead of datagrams (UDP). The default is false.

replyfrom

print last response was from: , $resolver->replyfrom, " “;

Returns the IP address from which the most recent packet was received in response to a query.

errorstring

print query status: , $resolver->errorstring, " “;

Returns a string containing error information from the most recent DNS protocol interaction. errorstring() is meaningful only when interrogated immediately after the corresponding method call.

dnssec

print “dnssec flag: “, $resolver->dnssec, " “; $resolver->dnssec(0);

The dnssec flag causes the resolver to transmit DNSSEC queries and to add a EDNS0 record as required by RFC2671 and RFC3225. The actions of, and response from, the remote nameserver is determined by the settings of the AD and CD flags.

Calling the dnssec() method with a non-zero value will also set the UDP packet size to the default value of 2048. If that is too small or too big for your environment, you should call the udppacketsize() method immediately after.

$resolver->dnssec(1); # DNSSEC using default packetsize $resolver->udppacketsize(1250); # lower the UDP packet size

A fatal exception will be raised if the dnssec() method is called but the Net::DNS::SEC library has not been installed.

adflag

$resolver->dnssec(1); $resolver->adflag(1); print “authentication desired flag: “, $resolver->adflag, " “;

Gets or sets the AD bit for dnssec queries. This bit indicates that the caller is interested in the returned AD (authentic data) bit but does not require any dnssec RRs to be included in the response. The default value is false.

cdflag

$resolver->dnssec(1); $resolver->cdflag(1); print “checking disabled flag: “, $resolver->cdflag, " “;

Gets or sets the CD bit for dnssec queries. This bit indicates that authentication by upstream nameservers should be suppressed. Any dnssec RRs required to execute the authentication procedure should be included in the response. The default value is false.

tsig

$resolver->tsig( $keyfile ); $resolver->tsig( $keyfile, fudge => 60 ); $resolver->tsig( $tsig_rr ); $resolver->tsig( undef );

Set the TSIG record used to automatically sign outgoing queries, zone transfers and updates. Automatic signing is disabled if called with undefined arguments.

The default resolver behaviour is not to sign any packets. You must call this method to set the key if you would like the resolver to sign and verify packets automatically.

Packets can also be signed manually; see the Net::DNS::Packet and Net::DNS::Update manual pages for examples. TSIG records in manually-signed packets take precedence over those that the resolver would add automatically.

ENVIRONMENT

The following environment variables can also be used to configure the resolver:

RES_NAMESERVERS

# Bourne Shell RES_NAMESERVERS=“2001:DB8::1 192.0.2.1” export RES_NAMESERVERS # C Shell setenv RES_NAMESERVERS “2001:DB8::1 192.0.2.1”

A space-separated list of nameservers to query.

RES_SEARCHLIST

# Bourne Shell RES_SEARCHLIST=“a.example.com b.example.com c.example.com” export RES_SEARCHLIST # C Shell setenv RES_SEARCHLIST “a.example.com b.example.com c.example.com”

A space-separated list of domains to put in the search list.

LOCALDOMAIN

# Bourne Shell LOCALDOMAIN=example.com export LOCALDOMAIN # C Shell setenv LOCALDOMAIN example.com

The default domain.

RES_OPTIONS

# Bourne Shell RES_OPTIONS=“retrans:3 retry:2 inet6” export RES_OPTIONS # C Shell setenv RES_OPTIONS “retrans:3 retry:2 inet6”

A space-separated list of resolver options to set. Options that take values are specified as option:value.

IPv4 TRANSPORT

The force_v4(), force_v6(), prefer_v4(), and prefer_v6() methods with non-zero argument may be used to configure transport selection.

The behaviour of the nameserver() method illustrates the transport selection mechanism. If, for example, IPv4 transport has been forced, the nameserver() method will only return IPv4 addresses:

$resolver->nameservers( 192.0.2.1, 192.0.2.2, 2001:DB8::3 ); $resolver->force_v4(1); print join , $resolver->nameservers();

will print

192.0.2.1 192.0.2.2

CUSTOMISED RESOLVERS

Net::DNS::Resolver is actually an empty subclass. At compile time a super class is chosen based on the current platform. A side benefit of this allows for easy modification of the methods in Net::DNS::Resolver. You can simply add a method to the namespace!

For example, if we wanted to cache lookups:

package Net::DNS::Resolver; my %cache; sub search { $self = shift; $cache{”@_”} ||= $self->SUPER::search(@_); }

COPYRIGHT

Copyright (c)1997-2000 Michael Fuhr.

Portions Copyright (c)2002-2004 Chris Reinhardt.

Portions Copyright (c)2005 Olaf M. Kolkman, NLnet Labs.

Portions Copyright (c)2014,2015 Dick Franks.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::Packet Net::DNS::Update Net::DNS::Header Net::DNS::Question Net::DNS::RR resolver (5) RFC1034 <https://tools.ietf.org/html/rfc1034> RFC1035 <https://tools.ietf.org/html/rfc1035>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

700 - Linux cli command getspent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getspent and provides detailed information about the command getspent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getspent.

NAME 🖥️ getspent 🖥️

get shadow password file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

/* General shadow password file API */
#include <shadow.h>
struct spwd *getspnam(const char *name);
struct spwd *getspent(void);
void setspent(void);
void endspent(void);
struct spwd *fgetspent(FILE *stream);
struct spwd *sgetspent(const char *s);
int putspent(const struct spwd *p, FILE *stream);
int lckpwdf(void);
int ulckpwdf(void);
/* GNU extension */
#include <shadow.h>
int getspent_r(struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int getspnam_r(const char *name, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int fgetspent_r(FILE *stream, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int sgetspent_r(const char *s, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getspent_r(), getspnam_r(), fgetspent_r(), sgetspent_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

Long ago it was considered safe to have encrypted passwords openly visible in the password file. When computers got faster and people got more security-conscious, this was no longer acceptable. Julianne Frances Haugh implemented the shadow password suite that keeps the encrypted passwords in the shadow password database (e.g., the local shadow password file /etc/shadow, NIS, and LDAP), readable only by root.

The functions described below resemble those for the traditional password database (e.g., see getpwnam(3) and getpwent(3)).

The getspnam() function returns a pointer to a structure containing the broken-out fields of the record in the shadow password database that matches the username name.

The getspent() function returns a pointer to the next entry in the shadow password database. The position in the input stream is initialized by setspent(). When done reading, the program may call endspent() so that resources can be deallocated.

The fgetspent() function is similar to getspent() but uses the supplied stream instead of the one implicitly opened by setspent().

The sgetspent() function parses the supplied string s into a struct spwd.

The putspent() function writes the contents of the supplied struct spwd *p as a text line in the shadow password file format to stream. String entries with value NULL and numerical entries with value -1 are written as an empty string.

The lckpwdf() function is intended to protect against multiple simultaneous accesses of the shadow password database. It tries to acquire a lock, and returns 0 on success, or -1 on failure (lock not obtained within 15 seconds). The ulckpwdf() function releases the lock again. Note that there is no protection against direct access of the shadow password file. Only programs that use lckpwdf() will notice the lock.

These were the functions that formed the original shadow API. They are widely available.

Reentrant versions

Analogous to the reentrant functions for the password database, glibc also has reentrant functions for the shadow password database. The getspnam_r() function is like getspnam() but stores the retrieved shadow password structure in the space pointed to by spbuf. This shadow password structure contains pointers to strings, and these strings are stored in the buffer buf of size buflen. A pointer to the result (in case of success) or NULL (in case no entry was found or an error occurred) is stored in *spbufp.

The functions getspent_r(), fgetspent_r(), and sgetspent_r() are similarly analogous to their nonreentrant counterparts.

Some non-glibc systems also have functions with these names, often with different prototypes.

Structure

The shadow password structure is defined in <shadow.h> as follows:

struct spwd {
    char *sp_namp;     /* Login name */
    char *sp_pwdp;     /* Encrypted password */
    long  sp_lstchg;   /* Date of last change
                          (measured in days since
                          1970-01-01 00:00:00 +0000 (UTC)) */
    long  sp_min;      /* Min # of days between changes */
    long  sp_max;      /* Max # of days between changes */
    long  sp_warn;     /* # of days before password expires
                          to warn user to change it */
    long  sp_inact;    /* # of days after password expires
                          until account is disabled */
    long  sp_expire;   /* Date when account expires
                          (measured in days since
                          1970-01-01 00:00:00 +0000 (UTC)) */
    unsigned long sp_flag;  /* Reserved */
};

RETURN VALUE

The functions that return a pointer return NULL if no more entries are available or if an error occurs during processing. The functions which have int as the return value return 0 for success and -1 for failure, with errno set to indicate the error.

For the nonreentrant functions, the return value may point to static area, and may be overwritten by subsequent calls to these functions.

The reentrant functions return zero on success. In case of error, an error number is returned.

ERRORS

EACCES
The caller does not have permission to access the shadow password file.

ERANGE
Supplied buffer is too small.

FILES

/etc/shadow
local shadow password database file

/etc/.pwd.lock
lock file

The include file <paths.h> defines the constant _PATH_SHADOW to the pathname of the shadow password file.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getspnam()

Thread safety

MT-Unsafe race:getspnam locale

getspent()

Thread safety

MT-Unsafe race:getspent race:spentbuf locale

setspent(), endspent(), getspent_r()

Thread safety

MT-Unsafe race:getspent locale

fgetspent()

Thread safety

MT-Unsafe race:fgetspent

sgetspent()

Thread safety

MT-Unsafe race:sgetspent

putspent(), getspnam_r(), sgetspent_r()

Thread safety

MT-Safe locale

lckpwdf(), ulckpwdf(), fgetspent_r()

Thread safety

MT-Safe

In the above table, getspent in race:getspent signifies that if any of the functions setspent(), getspent(), getspent_r(), or endspent() are used in parallel in different threads of a program, then data races could occur.

VERSIONS

Many other systems provide a similar API.

STANDARDS

None.

SEE ALSO

getgrnam(3), getpwnam(3), getpwnam_r(3), shadow(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

701 - Linux cli command hstrerror

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command hstrerror and provides detailed information about the command hstrerror, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the hstrerror.

NAME 🖥️ hstrerror 🖥️

get network host entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
void sethostent(int stayopen);
void endhostent(void);
[[deprecated]] extern int h_errno;
[[deprecated]] struct hostent *gethostbyname(const char *name);
[[deprecated]] struct hostent *gethostbyaddr(const void addr[.len],
 socklen_t len, int type);
[[deprecated]] void herror(const char *s);
[[deprecated]] const char *hstrerror(int err);
/* System V/POSIX extension */
struct hostent *gethostent(void);
/* GNU extensions */
[[deprecated]]
struct hostent *gethostbyname2(const char *name, int af);
int gethostent_r(struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyaddr_r(const void addr[restrict .len], socklen_t len,
 int type,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyname_r(const char *restrict name,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyname2_r(const char *restrict name, int af,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

gethostbyname2(), gethostent_r(), gethostbyaddr_r(), gethostbyname_r(), gethostbyname2_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc up to and including 2.19:
        _BSD_SOURCE || _SVID_SOURCE

herror(), hstrerror():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.8 to glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE
    Before glibc 2.8:
        none

h_errno:

    Since glibc 2.19
        _DEFAULT_SOURCE || _POSIX_C_SOURCE < 200809L
    glibc 2.12 to glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE || _POSIX_C_SOURCE < 200809L
    Before glibc 2.12:
        none

DESCRIPTION

The gethostbyname*(), gethostbyaddr*(), herror(), and hstrerror() functions are obsolete. Applications should use getaddrinfo(3), getnameinfo(3), and gai_strerror(3) instead.

The sethostent() function specifies, if stayopen is true (1), that a connected TCP socket should be used for the name server queries and that the connection should remain open during successive queries. Otherwise, name server queries will use UDP datagrams.

The endhostent() function ends the use of a TCP connection for name server queries.

The gethostbyname() function returns a structure of type hostent for the given host name. Here name is either a hostname or an IPv4 address in standard dot notation (as for inet_addr(3)). If name is an IPv4 address, no lookup is performed and gethostbyname() simply copies name into the h_name field and its struct in_addr equivalent into the h_addr_list[0] field of the returned hostent structure. If name doesn’t end in a dot and the environment variable HOSTALIASES is set, the alias file pointed to by HOSTALIASES will first be searched for name (see hostname(7) for the file format). The current domain and its parents are searched unless name ends in a dot.

The gethostbyaddr() function returns a structure of type hostent for the given host address addr of length len and address type type. Valid address types are AF_INET and AF_INET6 (defined in <sys/socket.h>). The host address argument is a pointer to a struct of a type depending on the address type, for example a struct in_addr * (probably obtained via a call to inet_addr(3)) for address type AF_INET.

The (obsolete) herror() function prints the error message associated with the current value of h_errno on stderr.

The (obsolete) hstrerror() function takes an error number (typically h_errno) and returns the corresponding message string.

The domain name queries carried out by gethostbyname() and gethostbyaddr() rely on the Name Service Switch (nsswitch.conf(5)) configured sources or a local name server (named(8)). The default action is to query the Name Service Switch (nsswitch.conf(5)) configured sources, failing that, a local name server (named(8)).

Historical

The nsswitch.conf(5) file is the modern way of controlling the order of host lookups.

In glibc 2.4 and earlier, the order keyword was used to control the order of host lookups as defined in /etc/host.conf (host.conf(5)).

The hostent structure is defined in <netdb.h> as follows:

struct hostent {
    char  *h_name;            /* official name of host */
    char **h_aliases;         /* alias list */
    int    h_addrtype;        /* host address type */
    int    h_length;          /* length of address */
    char **h_addr_list;       /* list of addresses */
}
#define h_addr h_addr_list[0] /* for backward compatibility */

The members of the hostent structure are:

h_name
The official name of the host.

h_aliases
An array of alternative names for the host, terminated by a null pointer.

h_addrtype
The type of address; always AF_INET or AF_INET6 at present.

h_length
The length of the address in bytes.

h_addr_list
An array of pointers to network addresses for the host (in network byte order), terminated by a null pointer.

h_addr
The first address in h_addr_list for backward compatibility.

RETURN VALUE

The gethostbyname() and gethostbyaddr() functions return the hostent structure or a null pointer if an error occurs. On error, the h_errno variable holds an error number. When non-NULL, the return value may point at static data, see the notes below.

ERRORS

The variable h_errno can have the following values:

HOST_NOT_FOUND
The specified host is unknown.

NO_DATA
The requested name is valid but does not have an IP address. Another type of request to the name server for this domain may return an answer. The constant NO_ADDRESS is a synonym for NO_DATA.

NO_RECOVERY
A nonrecoverable name server error occurred.

TRY_AGAIN
A temporary error occurred on an authoritative name server. Try again later.

FILES

/etc/host.conf
resolver configuration file

/etc/hosts
host database file

/etc/nsswitch.conf
name service switch configuration

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

gethostbyname()

Thread safety

MT-Unsafe race:hostbyname env locale

gethostbyaddr()

Thread safety

MT-Unsafe race:hostbyaddr env locale

sethostent(), endhostent(), gethostent_r()

Thread safety

MT-Unsafe race:hostent env locale

herror(), hstrerror()

Thread safetyMT-Safe

gethostent()

Thread safety

MT-Unsafe race:hostent race:hostentbuf env locale

gethostbyname2()

Thread safety

MT-Unsafe race:hostbyname2 env locale

gethostbyaddr_r(), gethostbyname_r(), gethostbyname2_r()

Thread safetyMT-Safe env locale

In the above table, hostent in race:hostent signifies that if any of the functions sethostent(), gethostent(), gethostent_r(), or endhostent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

sethostent()
endhostent()
gethostent()
POSIX.1-2008.

gethostent_r()
GNU.

Others:
None.

HISTORY

sethostent()
endhostent()
gethostent()
POSIX.1-2001.

gethostbyname()
gethostbyaddr()
h_errno
Marked obsolescent in POSIX.1-2001. Removed in POSIX.1-2008, recommending the use of getaddrinfo(3) and getnameinfo(3) instead.

NOTES

The functions gethostbyname() and gethostbyaddr() may return pointers to static data, which may be overwritten by later calls. Copying the struct hostent does not suffice, since it contains pointers; a deep copy is required.

In the original BSD implementation the len argument of gethostbyname() was an int. The SUSv2 standard is buggy and declares the len argument of gethostbyaddr() to be of type size_t. (That is wrong, because it has to be int, and size_t is not. POSIX.1-2001 makes it socklen_t, which is OK.) See also accept(2).

The BSD prototype for gethostbyaddr() uses const char * for the first argument.

System V/POSIX extension

POSIX requires the gethostent() call, which should return the next entry in the host data base. When using DNS/BIND this does not make much sense, but it may be reasonable if the host data base is a file that can be read line by line. On many systems, a routine of this name reads from the file /etc/hosts. It may be available only when the library was built without DNS support. The glibc version will ignore ipv6 entries. This function is not reentrant, and glibc adds a reentrant version gethostent_r().

GNU extensions

glibc2 also has a gethostbyname2() that works like gethostbyname(), but permits to specify the address family to which the address must belong.

glibc2 also has reentrant versions gethostent_r(), gethostbyaddr_r(), gethostbyname_r(), and gethostbyname2_r(). The caller supplies a hostent structure ret which will be filled in on success, and a temporary work buffer buf of size buflen. After the call, result will point to the result on success. In case of an error or if no entry is found result will be NULL. The functions return 0 on success and a nonzero error number on failure. In addition to the errors returned by the nonreentrant versions of these functions, if buf is too small, the functions will return ERANGE, and the call should be retried with a larger buffer. The global variable h_errno is not modified, but the address of a variable in which to store error numbers is passed in h_errnop.

BUGS

gethostbyname() does not recognize components of a dotted IPv4 address string that are expressed in hexadecimal.

SEE ALSO

getaddrinfo(3), getnameinfo(3), inet(3), inet_ntop(3), inet_pton(3), resolver(3), hosts(5), nsswitch.conf(5), hostname(7), named(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

702 - Linux cli command Image_ExifTool_Lang_skpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Lang_skpm and provides detailed information about the command Image_ExifTool_Lang_skpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Lang_skpm.

NAME 🖥️ Image_ExifTool_Lang_skpm 🖥️

ExifTool Slovak language translations

DESCRIPTION

This file is used by Image::ExifTool to generate localized tag descriptions and values.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

ACKNOWLEDGEMENTS

Thanks to Peter Bagin for providing this translation.

SEE ALSO

Image::ExifTool (3pm), Image::ExifTool::TagInfoXML (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

703 - Linux cli command Image_ExifTool_Palmpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Palmpm and provides detailed information about the command Image_ExifTool_Palmpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Palmpm.

NAME 🖥️ Image_ExifTool_Palmpm 🖥️

Read Palm Database files

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains code to extract metadata from Palm database files (PDB and PRC extensions), Mobipocket electronic books (MOBI), and Amazon Kindle KF7 and KF8 books (AZW and AZW3).

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://wiki.mobileread.com/wiki/PDB>

<http://wiki.mobileread.com/wiki/MOBI>

SEE ALSO

“Palm Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

704 - Linux cli command Pod_Parserpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Pod_Parserpm and provides detailed information about the command Pod_Parserpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Pod_Parserpm.

NAME 🖥️ Pod_Parserpm 🖥️

base class for creating POD filters and translators

SYNOPSIS

use Pod::Parser; package MyParser; @ISA = qw(Pod::Parser); sub command { my ($parser, $command, $paragraph, $line_num) = @_; ## Interpret the command and its text; sample actions might be: if ($command eq head1) { … } elsif ($command eq head2) { … } ## … other commands and their actions my $out_fh = $parser->output_handle(); my $expansion = $parser->interpolate($paragraph, $line_num); print $out_fh $expansion; } sub verbatim { my ($parser, $paragraph, $line_num) = @_; ## Format verbatim paragraph; sample actions might be: my $out_fh = $parser->output_handle(); print $out_fh $paragraph; } sub textblock { my ($parser, $paragraph, $line_num) = @_; ## Translate/Format this block of text; sample actions might be: my $out_fh = $parser->output_handle(); my $expansion = $parser->interpolate($paragraph, $line_num); print $out_fh $expansion; } sub interior_sequence { my ($parser, $seq_command, $seq_argument) = @_; ## Expand an interior sequence; sample actions might be: return “*$seq_argument*” if ($seq_command eq B); return “`$seq_argument” if ($seq_command eq C); return “_${seq_argument}_” if ($seq_command eq I); ## … other sequence commands and their resulting text } package main; ## Create a parser object and have it parse file whose name was ## given on the command-line (use STDIN if no files were given). $parser = new MyParser(); $parser->parse_from_filehandle(\STDIN) if (@ARGV == 0); for (@ARGV) { $parser->parse_from_file($_); }

REQUIRES

perl5.005, Pod::InputObjects, Exporter, Symbol, Carp

EXPORTS

Nothing.

DESCRIPTION

NOTE: This module is considered legacy; modern Perl releases (5.31.1 and higher) are going to remove Pod-Parser from core and use Pod::Simple for all things POD.

Pod::Parser is a base class for creating POD filters and translators. It handles most of the effort involved with parsing the POD sections from an input stream, leaving subclasses free to be concerned only with performing the actual translation of text.

Pod::Parser parses PODs, and makes method calls to handle the various components of the POD. Subclasses of Pod::Parser override these methods to translate the POD into whatever output format they desire.

QUICK OVERVIEW

To create a POD filter for translating POD documentation into some other format, you create a subclass of Pod::Parser which typically overrides just the base class implementation for the following methods:

  • command()

  • verbatim()

  • textblock()

  • interior_sequence()

You may also want to override the begin_input() and end_input() methods for your subclass (to perform any needed per-file and/or per-document initialization or cleanup).

If you need to perform any preprocessing of input before it is parsed you may want to override one or more of preprocess_line() and/or preprocess_paragraph().

Sometimes it may be necessary to make more than one pass over the input files. If this is the case you have several options. You can make the first pass using Pod::Parser and override your methods to store the intermediate results in memory somewhere for the end_pod() method to process. You could use Pod::Parser for several passes with an appropriate state variable to control the operation for each pass. If your input source can’t be reset to start at the beginning, you can store it in some other structure as a string or an array and have that structure implement a getline() method (which is all that parse_from_filehandle() uses to read input).

Feel free to add any member data fields you need to keep track of things like current font, indentation, horizontal or vertical position, or whatever else you like. Be sure to read “PRIVATE METHODS AND DATA” to avoid name collisions.

For the most part, the Pod::Parser base class should be able to do most of the input parsing for you and leave you free to worry about how to interpret the commands and translate the result.

Note that all we have described here in this quick overview is the simplest most straightforward use of Pod::Parser to do stream-based parsing. It is also possible to use the Pod::Parser::parse_text function to do more sophisticated tree-based parsing. See “TREE-BASED PARSING”.

PARSING OPTIONS

A parse-option is simply a named option of Pod::Parser with a value that corresponds to a certain specified behavior. These various behaviors of Pod::Parser may be enabled/disabled by setting or unsetting one or more parse-options using the parseopts() method. The set of currently accepted parse-options is as follows:

-want_nonPODs (default: unset)
Normally (by default) Pod::Parser will only provide access to the POD sections of the input. Input paragraphs that are not part of the POD-format documentation are not made available to the caller (not even using preprocess_paragraph()). Setting this option to a non-empty, non-zero value will allow preprocess_paragraph() to see non-POD sections of the input as well as POD sections. The cutting() method can be used to determine if the corresponding paragraph is a POD paragraph, or some other input paragraph.

-process_cut_cmd (default: unset)
Normally (by default) Pod::Parser handles the =cut POD directive by itself and does not pass it on to the caller for processing. Setting this option to a non-empty, non-zero value will cause Pod::Parser to pass the =cut directive to the caller just like any other POD command (and hence it may be processed by the command() method). Pod::Parser will still interpret the =cut directive to mean that “cutting mode” has been (re)entered, but the caller will get a chance to capture the actual =cut paragraph itself for whatever purpose it desires.

-warnings (default: unset)
Normally (by default) Pod::Parser recognizes a bare minimum of pod syntax errors and warnings and issues diagnostic messages for errors, but not for warnings. (Use Pod::Checker to do more thorough checking of POD syntax.) Setting this option to a non-empty, non-zero value will cause Pod::Parser to issue diagnostics for the few warnings it recognizes as well as the errors.

Please see “parseopts()” for a complete description of the interface for the setting and unsetting of parse-options.

RECOMMENDED SUBROUTINE/METHOD OVERRIDES

Pod::Parser provides several methods which most subclasses will probably want to override. These methods are as follows:

command()

$parser->command($cmd,$text,$line_num,$pod_para);

This method should be overridden by subclasses to take the appropriate action when a POD command paragraph (denoted by a line beginning with “=”) is encountered. When such a POD directive is seen in the input, this method is called and is passed:

$cmd
the name of the command for this POD paragraph

$text
the paragraph text for the given POD paragraph command.

$line_num
the line-number of the beginning of the paragraph

$pod_para
a reference to a Pod::Paragraph object which contains further information about the paragraph command (see Pod::InputObjects for details).

Note that this method is called for =pod paragraphs.

The base class implementation of this method simply treats the raw POD command as normal block of paragraph text (invoking the textblock() method with the command paragraph).

verbatim()

$parser->verbatim($text,$line_num,$pod_para);

This method may be overridden by subclasses to take the appropriate action when a block of verbatim text is encountered. It is passed the following parameters:

$text
the block of text for the verbatim paragraph

$line_num
the line-number of the beginning of the paragraph

$pod_para
a reference to a Pod::Paragraph object which contains further information about the paragraph (see Pod::InputObjects for details).

The base class implementation of this method simply prints the textblock (unmodified) to the output filehandle.

textblock()

$parser->textblock($text,$line_num,$pod_para);

This method may be overridden by subclasses to take the appropriate action when a normal block of POD text is encountered (although the base class method will usually do what you want). It is passed the following parameters:

$text
the block of text for the a POD paragraph

$line_num
the line-number of the beginning of the paragraph

$pod_para
a reference to a Pod::Paragraph object which contains further information about the paragraph (see Pod::InputObjects for details).

In order to process interior sequences, subclasses implementations of this method will probably want to invoke either interpolate() or parse_text(), passing it the text block $text, and the corresponding line number in $line_num, and then perform any desired processing upon the returned result.

The base class implementation of this method simply prints the text block as it occurred in the input stream).

interior_sequence()

$parser->interior_sequence($seq_cmd,$seq_arg,$pod_seq);

This method should be overridden by subclasses to take the appropriate action when an interior sequence is encountered. An interior sequence is an embedded command within a block of text which appears as a command name (usually a single uppercase character) followed immediately by a string of text which is enclosed in angle brackets. This method is passed the sequence command $seq_cmd and the corresponding text $seq_arg. It is invoked by the interpolate() method for each interior sequence that occurs in the string that it is passed. It should return the desired text string to be used in place of the interior sequence. The $pod_seq argument is a reference to a Pod::InteriorSequence object which contains further information about the interior sequence. Please see Pod::InputObjects for details if you need to access this additional information.

Subclass implementations of this method may wish to invoke the nested() method of $pod_seq to see if it is nested inside some other interior-sequence (and if so, which kind).

The base class implementation of the interior_sequence() method simply returns the raw text of the interior sequence (as it occurred in the input) to the caller.

OPTIONAL SUBROUTINE/METHOD OVERRIDES

Pod::Parser provides several methods which subclasses may want to override to perform any special pre/post-processing. These methods do not have to be overridden, but it may be useful for subclasses to take advantage of them.

new()

my $parser = Pod::Parser->new();

This is the constructor for Pod::Parser and its subclasses. You do not need to override this method! It is capable of constructing subclass objects as well as base class objects, provided you use any of the following constructor invocation styles:

my $parser1 = MyParser->new(); my $parser2 = new MyParser(); my $parser3 = $parser2->new();

where MyParser is some subclass of Pod::Parser.

Using the syntax MyParser::new() to invoke the constructor is not recommended, but if you insist on being able to do this, then the subclass will need to override the new() constructor method. If you do override the constructor, you must be sure to invoke the initialize() method of the newly blessed object.

Using any of the above invocations, the first argument to the constructor is always the corresponding package name (or object reference). No other arguments are required, but if desired, an associative array (or hash-table) my be passed to the new() constructor, as in:

my $parser1 = MyParser->new( MYDATA => $value1, MOREDATA => $value2 ); my $parser2 = new MyParser( -myflag => 1 );

All arguments passed to the new() constructor will be treated as key/value pairs in a hash-table. The newly constructed object will be initialized by copying the contents of the given hash-table (which may have been empty). The new() constructor for this class and all of its subclasses returns a blessed reference to the initialized object (hash-table).

initialize()

$parser->initialize();

This method performs any necessary object initialization. It takes no arguments (other than the object instance of course, which is typically copied to a local variable named $self). If subclasses override this method then they must be sure to invoke $self->SUPER::initialize().

begin_pod()

$parser->begin_pod();

This method is invoked at the beginning of processing for each POD document that is encountered in the input. Subclasses should override this method to perform any per-document initialization.

begin_input()

$parser->begin_input();

This method is invoked by parse_from_filehandle() immediately before processing input from a filehandle. The base class implementation does nothing, however, subclasses may override it to perform any per-file initializations.

Note that if multiple files are parsed for a single POD document (perhaps the result of some future =include directive) this method is invoked for every file that is parsed. If you wish to perform certain initializations once per document, then you should use begin_pod().

end_input()

$parser->end_input();

This method is invoked by parse_from_filehandle() immediately after processing input from a filehandle. The base class implementation does nothing, however, subclasses may override it to perform any per-file cleanup actions.

Please note that if multiple files are parsed for a single POD document (perhaps the result of some kind of =include directive) this method is invoked for every file that is parsed. If you wish to perform certain cleanup actions once per document, then you should use end_pod().

end_pod()

$parser->end_pod();

This method is invoked at the end of processing for each POD document that is encountered in the input. Subclasses should override this method to perform any per-document finalization.

preprocess_line()

$textline = $parser->preprocess_line($text, $line_num);

This method should be overridden by subclasses that wish to perform any kind of preprocessing for each line of input (before it has been determined whether or not it is part of a POD paragraph). The parameter $text is the input line; and the parameter $line_num is the line number of the corresponding text line.

The value returned should correspond to the new text to use in its place. If the empty string or an undefined value is returned then no further processing will be performed for this line.

Please note that the preprocess_line() method is invoked before the preprocess_paragraph() method. After all (possibly preprocessed) lines in a paragraph have been assembled together and it has been determined that the paragraph is part of the POD documentation from one of the selected sections, then preprocess_paragraph() is invoked.

The base class implementation of this method returns the given text.

preprocess_paragraph()

$textblock = $parser->preprocess_paragraph($text, $line_num);

This method should be overridden by subclasses that wish to perform any kind of preprocessing for each block (paragraph) of POD documentation that appears in the input stream. The parameter $text is the POD paragraph from the input file; and the parameter $line_num is the line number for the beginning of the corresponding paragraph.

The value returned should correspond to the new text to use in its place If the empty string is returned or an undefined value is returned, then the given $text is ignored (not processed).

This method is invoked after gathering up all the lines in a paragraph and after determining the cutting state of the paragraph, but before trying to further parse or interpret them. After preprocess_paragraph() returns, the current cutting state (which is returned by $self->cutting()) is examined. If it evaluates to true then input text (including the given $text) is cut (not processed) until the next POD directive is encountered.

Please note that the preprocess_line() method is invoked before the preprocess_paragraph() method. After all (possibly preprocessed) lines in a paragraph have been assembled together and either it has been determined that the paragraph is part of the POD documentation from one of the selected sections or the -want_nonPODs option is true, then preprocess_paragraph() is invoked.

The base class implementation of this method returns the given text.

METHODS FOR PARSING AND PROCESSING

Pod::Parser provides several methods to process input text. These methods typically won’t need to be overridden (and in some cases they can’t be overridden), but subclasses may want to invoke them to exploit their functionality.

parse_text()

$ptree1 = $parser->parse_text($text, $line_num); $ptree2 = $parser->parse_text({%opts}, $text, $line_num); $ptree3 = $parser->parse_text(\opts, $text, $line_num);

This method is useful if you need to perform your own interpolation of interior sequences and can’t rely upon interpolate to expand them in simple bottom-up order.

The parameter $text is a string or block of text to be parsed for interior sequences; and the parameter $line_num is the line number corresponding to the beginning of $text.

parse_text() will parse the given text into a parse-tree of “nodes.” and interior-sequences. Each “node” in the parse tree is either a text-string, or a Pod::InteriorSequence. The result returned is a parse-tree of type Pod::ParseTree. Please see Pod::InputObjects for more information about Pod::InteriorSequence and Pod::ParseTree.

If desired, an optional hash-ref may be specified as the first argument to customize certain aspects of the parse-tree that is created and returned. The set of recognized option keywords are:

-expand_seq => code-ref|method-name
Normally, the parse-tree returned by parse_text() will contain an unexpanded Pod::InteriorSequence object for each interior-sequence encountered. Specifying -expand_seq tells parse_text() to “expand” every interior-sequence it sees by invoking the referenced function (or named method of the parser object) and using the return value as the expanded result. If a subroutine reference was given, it is invoked as: &$code_ref( $parser, $sequence ) and if a method-name was given, it is invoked as: $parser->method_name( $sequence ) where $parser is a reference to the parser object, and $sequence is a reference to the interior-sequence object. [NOTE: If the interior_sequence() method is specified, then it is invoked according to the interface specified in “interior_sequence()”].

-expand_text => code-ref|method-name
Normally, the parse-tree returned by parse_text() will contain a text-string for each contiguous sequence of characters outside of an interior-sequence. Specifying -expand_text tells parse_text() to “preprocess” every such text-string it sees by invoking the referenced function (or named method of the parser object) and using the return value as the preprocessed (or “expanded”) result. [Note that if the result is an interior-sequence, then it will not be expanded as specified by the -expand_seq option; Any such recursive expansion needs to be handled by the specified callback routine.] If a subroutine reference was given, it is invoked as: &$code_ref( $parser, $text, $ptree_node ) and if a method-name was given, it is invoked as: $parser->method_name( $text, $ptree_node ) where $parser is a reference to the parser object, $text is the text-string encountered, and $ptree_node is a reference to the current node in the parse-tree (usually an interior-sequence object or else the top-level node of the parse-tree).

-expand_ptree => code-ref|method-name
Rather than returning a Pod::ParseTree, pass the parse-tree as an argument to the referenced subroutine (or named method of the parser object) and return the result instead of the parse-tree object. If a subroutine reference was given, it is invoked as: &$code_ref( $parser, $ptree ) and if a method-name was given, it is invoked as: $parser->method_name( $ptree ) where $parser is a reference to the parser object, and $ptree is a reference to the parse-tree object.

interpolate()

$textblock = $parser->interpolate($text, $line_num);

This method translates all text (including any embedded interior sequences) in the given text string $text and returns the interpolated result. The parameter $line_num is the line number corresponding to the beginning of $text.

interpolate() merely invokes a private method to recursively expand nested interior sequences in bottom-up order (innermost sequences are expanded first). If there is a need to expand nested sequences in some alternate order, use parse_text instead.

parse_from_filehandle()

$parser->parse_from_filehandle($in_fh,$out_fh);

This method takes an input filehandle (which is assumed to already be opened for reading) and reads the entire input stream looking for blocks (paragraphs) of POD documentation to be processed. If no first argument is given the default input filehandle STDIN is used.

The $in_fh parameter may be any object that provides a getline() method to retrieve a single line of input text (hence, an appropriate wrapper object could be used to parse PODs from a single string or an array of strings).

Using $in_fh->getline(), input is read line-by-line and assembled into paragraphs or “blocks” (which are separated by lines containing nothing but whitespace). For each block of POD documentation encountered it will invoke a method to parse the given paragraph.

If a second argument is given then it should correspond to a filehandle where output should be sent (otherwise the default output filehandle is STDOUT if no output filehandle is currently in use).

NOTE: For performance reasons, this method caches the input stream at the top of the stack in a local variable. Any attempts by clients to change the stack contents during processing when in the midst executing of this method will not affect the input stream used by the current invocation of this method.

This method does not usually need to be overridden by subclasses.

parse_from_file()

$parser->parse_from_file($filename,$outfile);

This method takes a filename and does the following:

  • opens the input and output files for reading (creating the appropriate filehandles)

  • invokes the parse_from_filehandle() method passing it the corresponding input and output filehandles.

  • closes the input and output files.

If the special input filename “”, “-” or “<&STDIN” is given then the STDIN filehandle is used for input (and no open or close is performed). If no input filename is specified then “-” is implied. Filehandle references, or objects that support the regular IO operations (like <$fh> or $fh-<Egtgetline>) are also accepted; the handles must already be opened.

If a second argument is given then it should be the name of the desired output file. If the special output filename “-” or “>&STDOUT” is given then the STDOUT filehandle is used for output (and no open or close is performed). If the special output filename “>&STDERR” is given then the STDERR filehandle is used for output (and no open or close is performed). If no output filehandle is currently in use and no output filename is specified, then “-” is implied. Alternatively, filehandle references or objects that support the regular IO operations (like print, e.g. IO::String) are also accepted; the object must already be opened.

This method does not usually need to be overridden by subclasses.

ACCESSOR METHODS

Clients of Pod::Parser should use the following methods to access instance data fields:

errorsub()

$parser->errorsub(“method_name”); $parser->errorsub(\warn_user); $parser->errorsub(sub { print STDERR, @_ });

Specifies the method or subroutine to use when printing error messages about POD syntax. The supplied method/subroutine must return TRUE upon successful printing of the message. If undef is given, then the carp builtin is used to issue error messages (this is the default behavior).

my $errorsub = $parser->errorsub() my $errmsg = “This is an error message! " (ref $errorsub) and &{$errorsub}($errmsg) or (defined $errorsub) and $parser->$errorsub($errmsg) or carp($errmsg);

Returns a method name, or else a reference to the user-supplied subroutine used to print error messages. Returns undef if the carp builtin is used to issue error messages (this is the default behavior).

cutting()

$boolean = $parser->cutting();

Returns the current cutting state: a boolean-valued scalar which evaluates to true if text from the input file is currently being “cut” (meaning it is not considered part of the POD document).

$parser->cutting($boolean);

Sets the current cutting state to the given value and returns the result.

parseopts()

When invoked with no additional arguments, parseopts returns a hashtable of all the current parsing options.

## See if we are parsing non-POD sections as well as POD ones my %opts = $parser->parseopts(); $opts{-want_nonPODs} and print “-want_nonPODs “;

When invoked using a single string, parseopts treats the string as the name of a parse-option and returns its corresponding value if it exists (returns undef if it doesn’t).

## Did we ask to see =cut paragraphs? my $want_cut = $parser->parseopts(-process_cut_cmd); $want_cut and print “-process_cut_cmd “;

When invoked with multiple arguments, parseopts treats them as key/value pairs and the specified parse-option names are set to the given values. Any unspecified parse-options are unaffected.

## Set them back to the default $parser->parseopts(-warnings => 0);

When passed a single hash-ref, parseopts uses that hash to completely reset the existing parse-options, all previous parse-option values are lost.

## Reset all options to default $parser->parseopts( { } );

See “PARSING OPTIONS” for more information on the name and meaning of each parse-option currently recognized.

output_file()

$fname = $parser->output_file();

Returns the name of the output file being written.

output_handle()

$fhandle = $parser->output_handle();

Returns the output filehandle object.

input_file()

$fname = $parser->input_file();

Returns the name of the input file being read.

input_handle()

$fhandle = $parser->input_handle();

Returns the current input filehandle object.

PRIVATE METHODS AND DATA

Pod::Parser makes use of several internal methods and data fields which clients should not need to see or use. For the sake of avoiding name collisions for client data and methods, these methods and fields are briefly discussed here. Determined hackers may obtain further information about them by reading the Pod::Parser source code.

Private data fields are stored in the hash-object whose reference is returned by the new() constructor for this class. The names of all private methods and data-fields used by Pod::Parser begin with a prefix of “_” and match the regular expression /^_\w+$/.

TREE-BASED PARSING

If straightforward stream-based parsing wont meet your needs (as is likely the case for tasks such as translating PODs into structured markup languages like HTML and XML) then you may need to take the tree-based approach. Rather than doing everything in one pass and calling the interpolate() method to expand sequences into text, it may be desirable to instead create a parse-tree using the parse_text() method to return a tree-like structure which may contain an ordered list of children (each of which may be a text-string, or a similar tree-like structure).

Pay special attention to “METHODS FOR PARSING AND PROCESSING” and to the objects described in Pod::InputObjects. The former describes the gory details and parameters for how to customize and extend the parsing behavior of Pod::Parser. Pod::InputObjects provides several objects that may all be used interchangeably as parse-trees. The most obvious one is the Pod::ParseTree object. It defines the basic interface and functionality that all things trying to be a POD parse-tree should do. A Pod::ParseTree is defined such that each “node” may be a text-string, or a reference to another parse-tree. Each Pod::Paragraph object and each Pod::InteriorSequence object also supports the basic parse-tree interface.

The parse_text() method takes a given paragraph of text, and returns a parse-tree that contains one or more children, each of which may be a text-string, or an InteriorSequence object. There are also callback-options that may be passed to parse_text() to customize the way it expands or transforms interior-sequences, as well as the returned result. These callbacks can be used to create a parse-tree with custom-made objects (which may or may not support the parse-tree interface, depending on how you choose to do it).

If you wish to turn an entire POD document into a parse-tree, that process is fairly straightforward. The parse_text() method is the key to doing this successfully. Every paragraph-callback (i.e. the polymorphic methods for command(), verbatim(), and textblock() paragraphs) takes a Pod::Paragraph object as an argument. Each paragraph object has a parse_tree() method that can be used to get or set a corresponding parse-tree. So for each of those paragraph-callback methods, simply call parse_text() with the options you desire, and then use the returned parse-tree to assign to the given paragraph object.

That gives you a parse-tree for each paragraph - so now all you need is an ordered list of paragraphs. You can maintain that yourself as a data element in the object/hash. The most straightforward way would be simply to use an array-ref, with the desired set of custom “options” for each invocation of parse_text. Let’s assume the desired option-set is given by the hash %options. Then we might do something like the following:

package MyPodParserTree; @ISA = qw( Pod::Parser ); … sub begin_pod { my $self = shift; $self->{-paragraphs} = []; ## initialize paragraph list } sub command { my ($parser, $command, $paragraph, $line_num, $pod_para) = @_; my $ptree = $parser->parse_text({%options}, $paragraph, …); $pod_para->parse_tree( $ptree ); push @{ $self->{-paragraphs} }, $pod_para; } sub verbatim { my ($parser, $paragraph, $line_num, $pod_para) = @_; push @{ $self->{-paragraphs} }, $pod_para; } sub textblock { my ($parser, $paragraph, $line_num, $pod_para) = @_; my $ptree = $parser->parse_text({%options}, $paragraph, …); $pod_para->parse_tree( $ptree ); push @{ $self->{-paragraphs} }, $pod_para; } … package main; … my $parser = new MyPodParserTree(…); $parser->parse_from_file(…); my $paragraphs_ref = $parser->{-paragraphs};

Of course, in this module-author’s humble opinion, I’d be more inclined to use the existing Pod::ParseTree object than a simple array. That way everything in it, paragraphs and sequences, all respond to the same core interface for all parse-tree nodes. The result would look something like:

package MyPodParserTree2; … sub begin_pod { my $self = shift; $self->{-ptree} = new Pod::ParseTree; ## initialize parse-tree } sub parse_tree { ## convenience method to get/set the parse-tree for the entire POD (@_ > 1) and $_[0]->{-ptree} = $_[1]; return $_[0]->{-ptree}; } sub command { my ($parser, $command, $paragraph, $line_num, $pod_para) = @_; my $ptree = $parser->parse_text({<<options>>}, $paragraph, …); $pod_para->parse_tree( $ptree ); $parser->parse_tree()->append( $pod_para ); } sub verbatim { my ($parser, $paragraph, $line_num, $pod_para) = @_; $parser->parse_tree()->append( $pod_para ); } sub textblock { my ($parser, $paragraph, $line_num, $pod_para) = @_; my $ptree = $parser->parse_text({<<options>>}, $paragraph, …); $pod_para->parse_tree( $ptree ); $parser->parse_tree()->append( $pod_para ); } … package main; … my $parser = new MyPodParserTree2(…); $parser->parse_from_file(…); my $ptree = $parser->parse_tree; …

Now you have the entire POD document as one great big parse-tree. You can even use the -expand_seq option to parse_text to insert whole different kinds of objects. Just don’t expect Pod::Parser to know what to do with them after that. That will need to be in your code. Or, alternatively, you can insert any object you like so long as it conforms to the Pod::ParseTree interface.

One could use this to create subclasses of Pod::Paragraphs and Pod::InteriorSequences for specific commands (or to create your own custom node-types in the parse-tree) and add some kind of emit() method to each custom node/subclass object in the tree. Then all you’d need to do is recursively walk the tree in the desired order, processing the children (most likely from left to right) by formatting them if they are text-strings, or by calling their emit() method if they are objects/references.

CAVEATS

Please note that POD has the notion of “paragraphs”: this is something starting after a blank (read: empty) line, with the single exception of the file start, which is also starting a paragraph. That means that especially a command (e.g. =head1) must be preceded with a blank line; _ _END_ _ is not a blank line.

SEE ALSO

Pod::InputObjects, Pod::Select

Pod::InputObjects defines POD input objects corresponding to command paragraphs, parse-trees, and interior-sequences.

Pod::Select is a subclass of Pod::Parser which provides the ability to selectively include and/or exclude sections of a POD document from being translated based upon the current heading, subheading, subsubheading, etc.

AUTHOR

Please report bugs using <http://rt.cpan.org>.

Brad Appleton <[email protected]>

Based on code for Pod::Text written by Tom Christiansen <[email protected]>

LICENSE

Pod-Parser is free software; you can redistribute it and/or modify it under the terms of the Artistic License distributed with Perl version 5.000 or (at your option) any later version. Please refer to the Artistic License that came with your Perl distribution for more details. If your version of Perl was not distributed under the terms of the Artistic License, than you may distribute PodParser under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

705 - Linux cli command setstate

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setstate and provides detailed information about the command setstate, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setstate.

NAME 🖥️ setstate 🖥️

random number generator

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
long random(void);
void srandom(unsigned int seed);
char *initstate(unsigned int seed, char state[.n], size_t n);
char *setstate(char *state);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

random(), srandom(), initstate(), setstate():

    _XOPEN_SOURCE >= 500
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The random() function uses a nonlinear additive feedback random number generator employing a default table of size 31 long integers to return successive pseudo-random numbers in the range from 0 to 2^31 - 1. The period of this random number generator is very large, approximately 16 * ((2^31) - 1).

The srandom() function sets its argument as the seed for a new sequence of pseudo-random integers to be returned by random(). These sequences are repeatable by calling srandom() with the same seed value. If no seed value is provided, the random() function is automatically seeded with a value of 1.

The initstate() function allows a state array state to be initialized for use by random(). The size of the state array n is used by initstate() to decide how sophisticated a random number generator it should use—the larger the state array, the better the random numbers will be. Current “optimal” values for the size of the state array n are 8, 32, 64, 128, and 256 bytes; other amounts will be rounded down to the nearest known amount. Using less than 8 bytes results in an error. seed is the seed for the initialization, which specifies a starting point for the random number sequence, and provides for restarting at the same point.

The setstate() function changes the state array used by the random() function. The state array state is used for random number generation until the next call to initstate() or setstate(). state must first have been initialized using initstate() or be the result of a previous call of setstate().

RETURN VALUE

The random() function returns a value between 0 and (2^31) - 1. The srandom() function returns no value.

The initstate() function returns a pointer to the previous state array. On failure, it returns NULL, and errno is set to indicate the error.

On success, setstate() returns a pointer to the previous state array. On failure, it returns NULL, and errno is set to indicate the error.

ERRORS

EINVAL
The state argument given to setstate() was NULL.

EINVAL
A state array of less than 8 bytes was specified to initstate().

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

random(), srandom(), initstate(), setstate()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, 4.3BSD.

NOTES

Random-number generation is a complex topic. Numerical Recipes in C: The Art of Scientific Computing (William H. Press, Brian P. Flannery, Saul A. Teukolsky, William T. Vetterling; New York: Cambridge University Press, 2007, 3rd ed.) provides an excellent discussion of practical random-number generation issues in Chapter 7 (Random Numbers).

For a more theoretical discussion which also covers many practical issues in depth, see Chapter 3 (Random Numbers) in Donald E. Knuth’s The Art of Computer Programming, volume 2 (Seminumerical Algorithms), 2nd ed.; Reading, Massachusetts: Addison-Wesley Publishing Company, 1981.

CAVEATS

The random() function should not be used in multithreaded programs where reproducible behavior is required. Use random_r(3) for that purpose.

BUGS

According to POSIX, initstate() should return NULL on error. In the glibc implementation, errno is (as specified) set on error, but the function does not return NULL.

SEE ALSO

getrandom(2), drand48(3), rand(3), random_r(3), srand(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

706 - Linux cli command sockaddr_untype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sockaddr_untype and provides detailed information about the command sockaddr_untype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sockaddr_untype.

NAME 🖥️ sockaddr_untype 🖥️

socket address

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/socket.h>
struct sockaddr {
 sa_family_t sa_family; /* Address family */
 char sa_data[]; /* Socket address */
};
struct sockaddr_storage {
 sa_family_t ss_family; /* Address family */
};
typedef /* ... */ socklen_t;
typedef /* ... */ sa_family_t;

Internet domain sockets

#include <netinet/in.h>
struct sockaddr_in {
 sa_family_t sin_family; /* AF_INET */
 in_port_t sin_port; /* Port number */
 struct in_addr sin_addr; /* IPv4 address */
};
struct sockaddr_in6 {
 sa_family_t sin6_family; /* AF_INET6 */
 in_port_t sin6_port; /* Port number */
 uint32_t sin6_flowinfo; /* IPv6 flow info */
 struct in6_addr sin6_addr; /* IPv6 address */
 uint32_t sin6_scope_id; /* Set of interfaces for a scope */
};
struct in_addr {
 in_addr_t s_addr;
};
struct in6_addr {
 uint8_t s6_addr[16];
};
typedef uint32_t in_addr_t;
typedef uint16_t in_port_t;

UNIX domain sockets

#include <sys/un.h>
struct sockaddr_un {
 sa_family_t sun_family; /* Address family */
 char sun_path[]; /* Socket pathname */
};

DESCRIPTION

sockaddr
Describes a socket address.

sockaddr_storage
A structure at least as large as any other sockaddr_* address structures. It’s aligned so that a pointer to it can be cast as a pointer to other sockaddr_* structures and used to access its fields.

socklen_t
Describes the length of a socket address. This is an integer type of at least 32 bits.

sa_family_t
Describes a socket’s protocol family. This is an unsigned integer type.

Internet domain sockets

sockaddr_in
Describes an IPv4 Internet domain socket address. The sin_port and sin_addr members are stored in network byte order.

sockaddr_in6
Describes an IPv6 Internet domain socket address. The sin6_addr.s6_addr array is used to contain a 128-bit IPv6 address, stored in network byte order.

UNIX domain sockets

sockaddr_un
Describes a UNIX domain socket address.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

socklen_t was invented by POSIX. See also accept(2).

These structures were invented before modern ISO C strict-aliasing rules. If aliasing rules are applied strictly, these structures would be extremely difficult to use without invoking Undefined Behavior. POSIX Issue 8 will fix this by requiring that implementations make sure that these structures can be safely used as they were designed.

NOTES

socklen_t is also defined in <netdb.h>.

sa_family_t is also defined in <netinet/in.h> and <sys/un.h>.

SEE ALSO

accept(2), bind(2), connect(2), getpeername(2), getsockname(2), getsockopt(2), sendto(2), setsockopt(2), socket(2), socketpair(2), getaddrinfo(3), gethostbyaddr(3), getnameinfo(3), htonl(3), ipv6(7), socket(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

707 - Linux cli command XML_Handler_BuildDOMpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_Handler_BuildDOMpm and provides detailed information about the command XML_Handler_BuildDOMpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_Handler_BuildDOMpm.

NAME 🖥️ XML_Handler_BuildDOMpm 🖥️

PerlSAX handler that creates XML::DOM document structures

SYNOPSIS

use XML::Handler::BuildDOM; use XML::Parser::PerlSAX; my $handler = new XML::Handler::BuildDOM (KeepCDATA => 1); my $parser = new XML::Parser::PerlSAX (Handler => $handler); my $doc = $parser->parsefile (“file.xml”);

DESCRIPTION

XML::Handler::BuildDOM creates XML::DOM document structures (i.e. XML::DOM::Document) from PerlSAX events.

This class used to be called XML::PerlSAX::DOM prior to libxml-enno 1.0.1.

CONSTRUCTOR OPTIONS

The XML::Handler::BuildDOM constructor supports the following options:

  • KeepCDATA => 1 If set to 0 (default), CDATASections will be converted to regular text.

  • Document => $doc If undefined, start_document will extract it from Element or DocType (if set), otherwise it will create a new XML::DOM::Document.

  • Element => $elem If undefined, it is set to Document. This will be the insertion point (or parent) for the nodes defined by the following callbacks.

  • DocType => $doctype If undefined, start_document will extract it from Document (if possible). Otherwise it adds a new XML::DOM::DocumentType to the Document.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

708 - Linux cli command __realloc_hook

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __realloc_hook and provides detailed information about the command __realloc_hook, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __realloc_hook.

NAME 🖥️ __realloc_hook 🖥️

malloc debugging variables (DEPRECATED)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <malloc.h>
void *(*volatile __malloc_hook)(size_t size, const void *caller);
void *(*volatile __realloc_hook)(void *ptr, size_t size,
 const void *caller);
void *(*volatile __memalign_hook)(size_t alignment, size_t size,
 const void *caller);
void (*volatile __free_hook)(void *ptr, const void *caller);
void (*__malloc_initialize_hook)(void);
void (*volatile __after_morecore_hook)(void);

DESCRIPTION

The GNU C library lets you modify the behavior of malloc(3), realloc(3), and free(3) by specifying appropriate hook functions. You can use these hooks to help you debug programs that use dynamic memory allocation, for example.

The variable __malloc_initialize_hook points at a function that is called once when the malloc implementation is initialized. This is a weak variable, so it can be overridden in the application with a definition like the following:

void (*__malloc_initialize_hook)(void) = my_init_hook;

Now the function my_init_hook() can do the initialization of all hooks.

The four functions pointed to by __malloc_hook, __realloc_hook, __memalign_hook, __free_hook have a prototype like the functions malloc(3), realloc(3), memalign(3), free(3), respectively, except that they have a final argument caller that gives the address of the caller of malloc(3), etc.

The variable __after_morecore_hook points at a function that is called each time after sbrk(2) was asked for more memory.

STANDARDS

GNU.

NOTES

The use of these hook functions is not safe in multithreaded programs, and they are now deprecated. From glibc 2.24 onwards, the __malloc_initialize_hook variable has been removed from the API, and from glibc 2.34 onwards, all the hook variables have been removed from the API. Programmers should instead preempt calls to the relevant functions by defining and exporting malloc(), free(), realloc(), and calloc().

EXAMPLES

Here is a short example of how to use these variables.

#include <stdio.h>
#include <malloc.h>
/* Prototypes for our hooks */
static void my_init_hook(void);
static void *my_malloc_hook(size_t, const void *);
/* Variables to save original hooks */
static void *(*old_malloc_hook)(size_t, const void *);
/* Override initializing hook from the C library */
void (*__malloc_initialize_hook)(void) = my_init_hook;
static void
my_init_hook(void)
{
    old_malloc_hook = __malloc_hook;
    __malloc_hook = my_malloc_hook;
}
static void *
my_malloc_hook(size_t size, const void *caller)
{
    void *result;
    /* Restore all old hooks */
    __malloc_hook = old_malloc_hook;
    /* Call recursively */
    result = malloc(size);
    /* Save underlying hooks */
    old_malloc_hook = __malloc_hook;
    /* printf() might call malloc(), so protect it too */
    printf("malloc(%zu) called from %p returns %p

“, size, caller, result); /* Restore our own hooks */ __malloc_hook = my_malloc_hook; return result; }

SEE ALSO

mallinfo(3), malloc(3), mcheck(3), mtrace(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

709 - Linux cli command NetSNMP_ASNpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command NetSNMP_ASNpm and provides detailed information about the command NetSNMP_ASNpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the NetSNMP_ASNpm.

NAME 🖥️ NetSNMP_ASNpm 🖥️

Perl extension for SNMP ASN.1 types

SYNOPSIS

use NetSNMP::ASN qw(:all); my $asn_int = ASN_INTEGER;

DESCRIPTION

The NetSNMP::ASN module provides the ASN.1 types for SNMP.

EXPORT

None by default.

Exportable constants

ASN_APPLICATION ASN_BIT_STR ASN_BOOLEAN ASN_COUNTER ASN_COUNTER64 ASN_DOUBLE ASN_FLOAT ASN_GAUGE ASN_INTEGER ASN_INTEGER64 ASN_IPADDRESS ASN_NULL ASN_OBJECT_ID ASN_OCTET_STR ASN_OPAQUE ASN_SEQUENCE ASN_SET ASN_TIMETICKS ASN_UNSIGNED ASN_UNSIGNED64

AUTHOR

Wes Hardaker, <[email protected]>

SEE ALSO

SNMP (3pm), NetSNMP::OID (3pm)

perl (1).

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

710 - Linux cli command XtSetSensitive

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtSetSensitive and provides detailed information about the command XtSetSensitive, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtSetSensitive.

NAME 🖥️ XtSetSensitive 🖥️

set and check a widget’s sensitivity state

SYNTAX

#include <X11/Intrinsic.h>

void XtSetSensitive(Widget w, Boolean sensitive);

Boolean XtIsSensitive(Widget w);

ARGUMENTS

sensitive
Specifies a Boolean value that indicates whether the widget should receive keyboard and pointer events.

  1. Specifies the widget.

DESCRIPTION

The XtSetSensitive function first calls XtSetValues on the current widget with an argument list specifying that the sensitive field should change to the new value. It then recursively propagates the new value down the managed children tree by calling XtSetValues on each child to set the ancestor_sensitive to the new value if the new values for sensitive and the child’s ancestor_sensitive are not the same.

XtSetSensitive calls XtSetValues to change sensitive and ancestor_sensitive. Therefore, when one of these changes, the widget’s set_values procedure should take whatever display actions are needed (for example, greying out or stippling the widget).

XtSetSensitive maintains the invariant that if parent has either sensitive or ancestor_sensitive False, then all children have ancestor_sensitive False.

The XtIsSensitive function returns True or False to indicate whether or not user input events are being dispatched. If both core.sensitive and core.ancestor_sensitive are True, XtIsSensitive returns True; otherwise, it returns False.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

711 - Linux cli command Moose_Cookbook_Basics_Immutablepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Basics_Immutablepm and provides detailed information about the command Moose_Cookbook_Basics_Immutablepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Basics_Immutablepm.

NAME 🖥️ Moose_Cookbook_Basics_Immutablepm 🖥️

Making Moose fast by making your class immutable

VERSION

version 2.2207

SYNOPSIS

package Point; use Moose; has x => ( isa => Int, is => ro ); has y => ( isa => Int, is => rw ); _ _PACKAGE_ _->meta->make_immutable;

DESCRIPTION

The Moose metaclass API provides a make_immutable() method. Calling this method does two things to your class. First, it makes it faster. In particular, object construction and destruction are effectively “inlined” in your class, and no longer invoke the meta API.

Second, you can no longer make changes via the metaclass API, such as adding attributes. In practice, this won’t be a problem, as you rarely need to do this after first loading the class.

CONCLUSION

We strongly recommend you make your classes immutable. It makes your code much faster, with a small compile-time cost. This will be especially noticeable when creating many objects.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

712 - Linux cli command Moose_Manual_Deltapm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Manual_Deltapm and provides detailed information about the command Moose_Manual_Deltapm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Manual_Deltapm.

NAME 🖥️ Moose_Manual_Deltapm 🖥️

Important Changes in Moose

VERSION

version 2.2207

DESCRIPTION

This documents any important or noteworthy changes in Moose, with a focus on things that affect backwards compatibility. This does duplicate data from the Changes file, but aims to provide more details and when possible workarounds.

Besides helping keep up with changes, you can also use this document for finding the lowest version of Moose that supported a given feature. If you encounter a problem and have a solution but don’t see it documented here, or think we missed an important feature, please send us a patch.

2.1400

Overloading implementation has changed
Overloading meta information used to be implemented by a Class::MOP::Method::Overload class. This class has been removed, and overloading is now implemented by Class::MOP::Overload. Overloading is not really equivalent to a method, so the former implementation didn’t work properly for various cases. All of the overloading-related methods for classes and roles have the same names, but those methods now return Class::MOP::Overload objects.

Core support for overloading in roles
Roles which use overloading now pass that overloading onto other classes (and roles) which consume that role. This works much like MooseX::Role::WithOverloading, except that we properly detect overloading conflicts during role summation and when applying one role to another. MooseX::Role::WithOverloading did not do any conflict detection. If you want to write code that uses overloading and works with previous versions of Moose and this one, upgrade to MooseX::Role::WithOverloading version 0.15 or greater. That version will detect when Moose itself handles overloading and get out of the way.

2.1200

Classes created by Moose are now registered in %INC
This means that this will no longer die (and will also no longer try to load Foo.pm): { package Foo; use Moose; } # … use Foo; If you’re using the MOP, this behavior will occur when the create (or create_anon_class) method is used, but not when the initialize method is used.

Moose now uses Module::Runtime instead of Class::Load to load classes
Class::Load has always had some weird issues with the ways that it tries to figure out if a class is loaded. For instance, extending an empty package was previously impossible, because Class::Load would think that the class failed to load, even though that is a perfectly valid thing to do. It was also difficult to deal with modules like IO::Handle, which partially populate several other packages when they are loaded (so calling load_class on IO::Handle followed by IO::File could end up with a broken IO::File, in some cases). Now, Moose uses the same mechanisms as perl itself to figure out if a class is loaded. A class is considered to be loaded if its entry in %INC is set. Perl sets the %INC entry for you automatically whenever a file is loaded via use or require. Also, as mentioned above, Moose also now sets the %INC entry for any classes defined with it, even if they aren’t loaded from a separate file. This does however mean that if you are trying to use Moose with non-Moose classes defined in the same file, then you will need to set %INC manually now, where it may have worked in the past. For instance: { package My::NonMoose; sub new { bless {}, shift } $INC{My/NonMoose.pm} = _ _FILE_ _; # alternatively: # use Module::Runtime module_notional_filename; # $INC{module_notional_filename(_ _PACKAGE_ _)} = _ _FILE_ _; } { package My::Moose; use Moose; extends My::NonMoose; } If you don’t do this, you will get an error message about not being able to locate My::NonMoose in @INC. We hope that this case will be fairly rare.

The Class::Load wrapper functions in Class::MOP have been deprecated
Class::MOP::load_class, Class::MOP::is_class_loaded, and Class::MOP::load_first_existing_class have been deprecated. They have been undocumented and discouraged since version 2.0200. You should replace their use with the corresponding functions in Class::Load, or just use Module::Runtime directly.

The non-arrayref forms of “enum” and “duck_type” have been deprecated
Originally, enum could be called like this: enum(MyType => qw(foo bar baz)) This was confusing, however (since it was different from the syntax for anonymous enum types), and it makes error checking more difficult (since you can’t tell just by looking whether enum(Foo, Bar, Baz) was intended to be a type named Foo with elements of Bar and Baz, or if this was actually a mistake where someone got the syntax for an anonymous enum type wrong). This all also applies to duck_type. Calling enum and duck_type with a list of arguments as described above has been undocumented since version 0.93, and is now deprecated. You should replace enum MyType => qw(foo bar baz); in your code with enum MyType => [qw(foo bar baz)];

Moose string exceptions have been replaced by Moose exception objects
Previously, Moose threw string exceptions on error conditions, which were not so verbose. All those string exceptions have now been converted to exception objects, which provide very detailed information about the exceptions. These exception objects provide a string overload that matches the previous exception message, so in most cases you should not have to change your code. For learning about the usage of Moose exception objects, read Moose::Manual::Exceptions. Individual exceptions are documented in Moose::Manual::Exceptions::Manifest. This work was funded as part of the GNOME Outreach Program for Women.

2.1000

The Num type is now stricter
The Num type used to accept anything that fits Perl’s notion of a number, which included Inf, NaN, and strings like " 1234 ". We believe that the type constraint should indicate “this is a number”, not “this coerces to a number”. Therefore, Num now only accepts integers, floating point numbers (both in decimal notation and exponential notation), 0, .0, 0.0, etc. If you want the old behavior you can use the LaxNum type in MooseX::Types::LaxNum.

You can use Specio instead of core Moose types
The Specio distribution is an experimental new type system intended to eventually replace the core Moose types, but yet also work with things like Moo and Mouse and anything else. Right now this is all speculative, but at least you can use Specio with Moose.

2.0600

“->init_meta” is even less reliable at loading extensions
Previously, calling MooseX::Foo->init_meta(@_) (and nothing else) from within your own init_meta had a decent chance of doing something useful. This was never supported behavior, and didn’t always work anyway. Due to some implementation adjustments, this now has a smaller chance of doing something useful, which could break code that was expecting it to continue doing useful things. Code that does this should instead just call MooseX::Foo->import({ into => $into }).

All the Cookbook recipes have been renamed
We’ve given them all descriptive names, rather than numbers. This makes it easier to talk about them, and eliminates the need to renumber recipes in order to reorder them or delete one.

2.0400

The parent of a union type is its components’ nearest common ancestor
Previously, union types considered all of their component types their parent types. This was incorrect because parent types are defined as types that must be satisfied in order for the child type to be satisfied, but in a union, validating as any parent type will validate against the entire union. This has been changed to find the nearest common ancestor for all of its components. For example, a union of “Int|ArrayRef[Int]” now has a parent of “Defined”.

Union types consider all members in the “is_subtype_of” and “is_a_type_of” methods
Previously, a union type would report itself as being of a subtype of a type if any of its member types were subtypes of that type. This was incorrect because any value that passes a subtype constraint must also pass a parent constraint. This has changed so that all of its member types must be a subtype of the specified type.

Enum types now work with just one value
Previously, an enum type needed to have two or more values. Nobody knew why, so we fixed it.

Methods defined in UNIVERSAL now appear in the MOP
Any method introspection methods that look at methods from parent classes now find methods defined in UNIVERSAL. This includes methods like $class->get_all_methods and $class->find_method_by_name. This also means that you can now apply method modifiers to these methods.

Hand-optimized type constraint code causes a deprecation warning
If you provide an optimized sub ref for a type constraint, this now causes a deprecation warning. Typically, this comes from passing an optimize_as parameter to subtype, but it could also happen if you create a Moose::Meta::TypeConstraint object directly. Use the inlining feature (inline_as) added in 2.0100 instead.

“Class::Load::load_class” and “is_class_loaded” have been removed
The Class::MOP::load_class and Class::MOP::is_class_loaded subroutines are no longer documented, and will cause a deprecation warning in the future. Moose now uses Class::Load to provide this functionality, and you should do so as well.

2.0205

Array and Hash native traits provide a “shallow_clone” method
The Array and Hash native traits now provide a “shallow_clone” method, which will return a reference to a new container with the same contents as the attribute’s reference.

2.0200

Hand-optimized type constraint code is deprecated in favor of inlining
Moose allows you to provide a hand-optimized version of a type constraint’s subroutine reference. This version allows type constraints to generate inline code, and you should use this inlining instead of providing a hand-optimized subroutine reference. This affects the optimize_as sub exported by Moose::Util::TypeConstraints. Use inline_as instead. This will start warning in the 2.0300 release.

2.0002

More useful type constraint error messages
If you have Devel::PartialDump version 0.14 or higher installed, Moose’s type constraint error messages will use it to display the invalid value, rather than just displaying it directly. This will generally be much more useful. For instance, instead of this: Attribute (foo) does not pass the type constraint because: Validation failed for ArrayRef[Int] with value ARRAY(0x275eed8) the error message will instead look like Attribute (foo) does not pass the type constraint because: Validation failed for ArrayRef[Int] with value [ “a” ] Note that Devel::PartialDump can’t be made a direct dependency at the moment, because it uses Moose itself, but we’re considering options to make this easier.

2.0000

Roles have their own default attribute metaclass
Previously, when a role was applied to a class, it would use the attribute metaclass defined in the class when copying over the attributes in the role. This was wrong, because for instance, using MooseX::FollowPBP in the class would end up renaming all of the accessors generated by the role, some of which may be being called in the role, causing it to break. Roles now keep track of their own attribute metaclass to use by default when being applied to a class (defaulting to Moose::Meta::Attribute). This is modifiable using Moose::Util::MetaRole by passing the applied_attribute key to the role_metaroles option, as in: Moose::Util::MetaRole::apply_metaroles( for => _ _PACKAGE_ _, class_metaroles => { attribute => [My::Meta::Role::Attribute], }, role_metaroles => { applied_attribute => [My::Meta::Role::Attribute], }, );

Class::MOP has been folded into the Moose dist
Moose and Class::MOP are tightly related enough that they have always had to be kept pretty closely in step in terms of versions. Making them into a single dist should simplify the upgrade process for users, as it should no longer be possible to upgrade one without the other and potentially cause issues. No functionality has changed, and this should be entirely transparent.

Moose’s conflict checking is more robust and useful
There are two parts to this. The most useful one right now is that Moose will ship with a moose-outdated script, which can be run at any point to list the modules which are installed that conflict with the installed version of Moose. After upgrading Moose, running moose-outdated | cpanm should be sufficient to ensure that all of the Moose extensions you use will continue to work. The other part is that Moose’s META.json file will also specify the conflicts under the x_conflicts (now x_breaks) key. We are working with the Perl tool chain developers to try to get conflicts support added to CPAN clients, and if/when that happens, the metadata already exists, and so the conflict checking will become automatic.

The lazy_build attribute feature is discouraged
While not deprecated, we strongly discourage you from using this feature.

Most deprecated APIs/features are slated for removal in Moose 2.0200
Most of the deprecated APIs and features in Moose will start throwing an error in Moose 2.0200. Some of the features will go away entirely, and some will simply throw an error. The things on the chopping block are:

  • Old public methods in Class::MOP and Moose This includes things like Class::MOP::Class->get_attribute_map, Class::MOP::Class->construct_instance, and many others. These were deprecated in Class::MOP 0.80_01, released on April 5, 2009. These methods will be removed entirely in Moose 2.0200.

  • Old public functions in Class::MOP This include Class::MOP::subname, Class::MOP::in_global_destruction, and the Class::MOP::HAS_ISAREV constant. The first two were deprecated in 0.84, and the last in 0.80. Class::MOP 0.84 was released on May 12, 2009. These functions will be removed entirely in Moose 2.0200.

  • The alias and excludes option for role composition These were renamed to -alias and -excludes in Moose 0.89, released on August 13, 2009. Passing these will throw an error in Moose 2.0200.

  • The old Moose::Util::MetaRole API This include the apply_metaclass_roles() function, as well as passing the for_class or any key ending in _roles to apply_metaroles(). This was deprecated in Moose 0.93_01, released on January 4, 2010. These will all throw an error in Moose 2.0200.

  • Passing plain lists to type() or subtype() The old API for these functions allowed you to pass a plain list of parameter, rather than a list of hash references (which is what as(), where, etc. return). This was deprecated in Moose 0.71_01, released on February 22, 2009. This will throw an error in Moose 2.0200.

  • The Role subtype This subtype was deprecated in Moose 0.84, released on June 26, 2009. This will be removed entirely in Moose 2.0200.

1.21

  • New release policy As of the 2.0 release, Moose now has an official release and support policy, documented in Moose::Manual::Support. All API changes will now go through a deprecation cycle of at least one year, after which the deprecated API can be removed. Deprecations and removals will only happen in major releases. In between major releases, we will still make minor releases to add new features, fix bugs, update documentation, etc.

1.16

Configurable stacktraces
Classes which use the Moose::Error::Default error class can now have stacktraces disabled by setting the MOOSE_ERROR_STYLE env var to croak. This is experimental, fairly incomplete, and won’t work in all cases (because Moose’s error system in general is all of these things), but this should allow for reducing at least some of the verbosity in most cases.

1.15

Native Delegations
In previous versions of Moose, the Native delegations were created as closures. The generated code was often quite slow compared to doing the same thing by hand. For example, the Array’s push delegation ended up doing something like this: push @{ $self->$reader() }, @_; If the attribute was created without a reader, the $reader sub reference followed a very slow code path. Even with a reader, this is still slower than it needs to be. Native delegations are now generated as inline code, just like other accessors, so we can access the slot directly. In addition, native traits now do proper constraint checking in all cases. In particular, constraint checking has been improved for array and hash references. Previously, only the contained type (the Str in HashRef[Str]) would be checked when a new value was added to the collection. However, if there was a constraint that applied to the whole value, this was never checked. In addition, coercions are now called on the whole value. The delegation methods now do more argument checking. All of the methods check that a valid number of arguments were passed to the method. In addition, the delegation methods check that the arguments are sane (array indexes, hash keys, numbers, etc.) when applicable. We have tried to emulate the behavior of Perl builtins as much as possible. Finally, triggers are called whenever the value of the attribute is changed by a Native delegation. These changes are only likely to break code in a few cases. The inlining code may or may not preserve the original reference when changes are made. In some cases, methods which change the value may replace it entirely. This will break tied values. If you have a typed arrayref or hashref attribute where the type enforces a constraint on the whole collection, this constraint will now be checked. It’s possible that code which previously ran without errors will now cause the constraint to fail. However, presumably this is a good thing ;) If you are passing invalid arguments to a delegation which were previously being ignored, these calls will now fail. If your code relied on the trigger only being called for a regular writer, that may cause problems. As always, you are encouraged to test before deploying the latest version of Moose to production.

Defaults is and default for String, Counter, and Bool
A few native traits (String, Counter, Bool) provide default values of “is” and “default” when you created an attribute. Allowing them to provide these values is now deprecated. Supply the value yourself when creating the attribute.

The “meta” method
Moose and Class::MOP have been cleaned up internally enough to make the meta method that you get by default optional. use Moose and use Moose::Role now can take an additional -meta_name option, which tells Moose what name to use when installing the meta method. Passing undef to this option suppresses generation of the meta method entirely. This should be useful for users of modules which also use a meta method or function, such as Curses or Rose::DB::Object.

1.09

All deprecated features now warn
Previously, deprecation mostly consisted of simply saying “X is deprecated” in the Changes file. We were not very consistent about actually warning. Now, all deprecated features still present in Moose actually give a warning. The warning is issued once per calling package. See Moose::Deprecated for more details.

You cannot pass “coerce => 1” unless the attribute’s type constraint has a coercion
Previously, this was accepted, and it sort of worked, except that if you attempted to set the attribute after the object was created, you would get a runtime error. Now you will get a warning when you attempt to define the attribute.

“no Moose”, “no Moose::Role”, and “no Moose::Exporter” no longer unimport strict and warnings
This change was made in 1.05, and has now been reverted. We don’t know if the user has explicitly loaded strict or warnings on their own, and unimporting them is just broken in that case.

Reversed logic when defining which options can be changed
Moose::Meta::Attribute now allows all options to be changed in an overridden attribute. The previous behaviour required each option to be whitelisted using the legal_options_for_inheritance method. This method has been removed, and there is a new method, illegal_options_for_inheritance, which can now be used to prevent certain options from being changeable. In addition, we only throw an error if the illegal option is actually changed. If the superclass didn’t specify this option at all when defining the attribute, the subclass version can still add it as an option. Example of overriding this in an attribute trait: package Bar::Meta::Attribute; use Moose::Role; has my_illegal_option => ( isa => CodeRef, is => rw, ); around illegal_options_for_inheritance => sub { return ( shift->(@_), qw/my_illegal_option/ ); };

1.05

“BUILD” in Moose::Object methods are now called when calling “new_object”
Previously, BUILD methods would only be called from Moose::Object::new, but now they are also called when constructing an object via Moose::Meta::Class::new_object. BUILD methods are an inherent part of the object construction process, and this should make $meta->new_object actually usable without forcing people to use $meta->name->new.

“no Moose”, “no Moose::Role”, and “no Moose::Exporter” now unimport strict and warnings
In the interest of having no Moose clean up everything that use Moose does in the calling scope, no Moose (as well as all other Moose::Exporter-using modules) now unimports strict and warnings.

Metaclass compatibility checking and fixing should be much more robust
The metaclass compatibility checking and fixing algorithms have been completely rewritten, in both Class::MOP and Moose. This should resolve many confusing errors when dealing with non-Moose inheritance and with custom metaclasses for things like attributes, constructors, etc. For correct code, the only thing that should require a change is that custom error metaclasses must now inherit from Moose::Error::Default.

1.02

Moose::Meta::TypeConstraint::Class is_subtype_of behavior
Earlier versions of is_subtype_of would incorrectly return true when called with itself, its own TC name or its class name as an argument. (i.e. $foo_tc->is_subtype_of(‘Foo’) == 1) This behavior was a caused by isa being checked before the class name. The old behavior can be accessed with is_type_of

1.00

Moose::Meta::Attribute::Native::Trait::Code no longer creates reader methods by default
Earlier versions of Moose::Meta::Attribute::Native::Trait::Code created read-only accessors for the attributes it’s been applied to, even if you didn’t ask for it with is => ro. This incorrect behaviour has now been fixed.

0.95

Moose::Util add_method_modifier behavior
add_method_modifier (and subsequently the sugar functions Moose::before, Moose::after, and Moose::around) can now accept arrayrefs, with the same behavior as lists. Types other than arrayref and regexp result in an error.

0.93_01 and 0.94

Moose::Util::MetaRole API has changed
The apply_metaclass_roles function is now called apply_metaroles. The way arguments are supplied has been changed to force you to distinguish between metaroles applied to Moose::Meta::Class (and helpers) versus Moose::Meta::Role. The old API still works, but will warn in a future release, and eventually be removed.

Moose::Meta::Role has real attributes
The attributes returned by Moose::Meta::Role are now instances of the Moose::Meta::Role::Attribute class, instead of bare hash references.

“no Moose” now removes “blessed” and “confess”
Moose is now smart enough to know exactly what it exported, even when it re-exports functions from other packages. When you unimport Moose, it will remove these functions from your namespace unless you also imported them directly from their respective packages. If you have a no Moose in your code before you call blessed or confess, your code will break. You can either move the no Moose call later in your code, or explicitly import the relevant functions from the packages that provide them.

Moose::Exporter is smarter about unimporting re-exports
The change above comes from a general improvement to Moose::Exporter. It will now unimport any function it exports, even if that function is a re-export from another package.

Attributes in roles can no longer override class attributes with “+foo”
Previously, this worked more or less accidentally, because role attributes weren’t objects. This was never documented, but a few MooseX modules took advantage of this.

The composition_class_roles attribute in Moose::Meta::Role is now a method
This was done to make it possible for roles to alter the list of composition class roles by applying a method modifiers. Previously, this was an attribute and MooseX modules override it. Since that no longer works, this was made a method. This should be an attribute, so this may switch back to being an attribute in the future if we can figure out how to make this work.

0.93

Calling $object->new() is no longer deprecated
We decided to undeprecate this. Now it just works.

Both “get_method_map” and “get_attribute_map” is deprecated
These metaclass methods were never meant to be public, and they are both now deprecated. The work around if you still need the functionality they provided is to iterate over the list of names manually. my %fields = map { $_ => $meta->get_attribute($_) } $meta->get_attribute_list; This was actually a change in Class::MOP, but this version of Moose requires a version of Class::MOP that includes said change.

0.90

Added Native delegation for Code refs
See Moose::Meta::Attribute::Native::Trait::Code for details.

Calling $object->new() is deprecated
Moose has long supported this, but it’s never really been documented, and we don’t think this is a good practice. If you want to construct an object from an existing object, you should provide some sort of alternate constructor like $object->clone. Calling $object->new now issues a warning, and will be an error in a future release.

Moose no longer warns if you call “make_immutable” for a class with mutable ancestors
While in theory this is a good thing to warn about, we found so many exceptions to this that doing this properly became quite problematic.

0.89_02

New Native delegation methods from List::Util and List::MoreUtils
In particular, we now have reduce, shuffle, uniq, and natatime.

The Moose::Exporter with_caller feature is now deprecated
Use with_meta instead. The with_caller option will start warning in a future release.

Moose now warns if you call “make_immutable” for a class with mutable ancestors
This is dangerous because modifying a class after a subclass has been immutabilized will lead to incorrect results in the subclass, due to inlining, caching, etc. This occasionally happens accidentally, when a class loads one of its subclasses in the middle of its class definition, so pointing out that this may cause issues should be helpful. Metaclasses (classes that inherit from Class::MOP::Object) are currently exempt from this check, since at the moment we aren’t very consistent about which metaclasses we immutabilize.

“enum” and “duck_type” now take arrayrefs for all forms
Previously, calling these functions with a list would take the first element of the list as the type constraint name, and use the remainder as the enum values or method names. This makes the interface inconsistent with the anon-type forms of these functions (which must take an arrayref), and a free-form list where the first value is sometimes special is hard to validate (and harder to give reasonable error messages for). These functions have been changed to take arrayrefs in all their forms - so, enum My::Type => [qw(foo bar)] is now the preferred way to create an enum type constraint. The old syntax still works for now, but it will hopefully be deprecated and removed in a future release.

0.89_01

Moose::Meta::Attribute::Native has been moved into the Moose core from MooseX::AttributeHelpers. Major changes include:

“traits”, not “metaclass”
Method providers are only available via traits.

“handles”, not “provides” or “curries”
The provides syntax was like core Moose handles => HASHREF syntax, but with the keys and values reversed. This was confusing, and AttributeHelpers now uses handles => HASHREF in a way that should be intuitive to anyone already familiar with how it is used for other attributes. The curries functionality provided by AttributeHelpers has been generalized to apply to all cases of handles => HASHREF, though not every piece of functionality has been ported (currying with a CODEREF is not supported).

“empty” is now “is_empty”, and means empty, not non-empty
Previously, the empty method provided by Arrays and Hashes returned true if the attribute was not empty (no elements). Now it returns true if the attribute is empty. It was also renamed to is_empty, to reflect this.

“find” was renamed to “first”, and “first” and “last” were removed
List::Util refers to the functionality that we used to provide under find as first, so that will likely be more familiar (and will fit in better if we decide to add more List::Util functions). first and last were removed, since their functionality is easily duplicated with curries of get.

Helpers that take a coderef of one argument now use $_
Subroutines passed as the first argument to first, map, and grep now receive their argument in $_ rather than as a parameter to the subroutine. Helpers that take a coderef of two or more arguments remain using the argument list (there are technical limitations to using $a and $b like sort does). See Moose::Meta::Attribute::Native for the new documentation.

The alias and excludes role parameters have been renamed to -alias and -excludes. The old names still work, but new code should use the new names, and eventually the old ones will be deprecated and removed.

0.89

use Moose -metaclass => Foo now does alias resolution, just like -traits (and the metaclass and traits options to has).

Added two functions meta_class_alias and meta_attribute_alias to Moose::Util, to simplify aliasing metaclasses and metatraits. This is a wrapper around the old

package Moose::Meta::Class::Custom::Trait::FooTrait; sub register_implementation { My::Meta::Trait }

way of doing this.

0.84

When an attribute generates no accessors, we now warn. This is to help users who forget the is option. If you really do not want any accessors, you can use is => bare. You can maintain back compat with older versions of Moose by using something like:

($Moose::VERSION >= 0.84 ? is => bare : ())

When an accessor overwrites an existing method, we now warn. To work around this warning (if you really must have this behavior), you can explicitly remove the method before creating it as an accessor:

sub foo {} _ _PACKAGE_ _->meta->remove_method(foo); has foo => ( is => ro, );

When an unknown option is passed to has, we now warn. You can silence the warning by fixing your code. :)

The Role type has been deprecated. On its own, it was useless, since it just checked $object->can(does). If you were using it as a parent type, just call role_type(Role::Name) to create an appropriate type instead.

0.78

use Moose::Exporter; now imports strict and warnings into packages that use it.

0.77

DEMOLISHALL and DEMOLISH now receive an argument indicating whether or not we are in global destruction.

0.76

Type constraints no longer run coercions for a value that already matches the constraint. This may affect some (arguably buggy) edge case coercions that rely on side effects in the via clause.

0.75

Moose::Exporter now accepts the -metaclass option for easily overriding the metaclass (without metaclass). This works for classes and roles.

0.74

Added a duck_type sugar function to Moose::Util::TypeConstraints to make integration with non-Moose classes easier. It simply checks if $obj->can() a list of methods.

A number of methods (mostly inherited from Class::MOP) have been renamed with a leading underscore to indicate their internal-ness. The old method names will still work for a while, but will warn that the method has been renamed. In a few cases, the method will be removed entirely in the future. This may affect MooseX authors who were using these methods.

0.73

Calling subtype with a name as the only argument now throws an exception. If you want an anonymous subtype do:

my $subtype = subtype as Foo;

This is related to the changes in version 0.71_01.

The is_needed method in Moose::Meta::Method::Destructor is now only usable as a class method. Previously, it worked as a class or object method, with a different internal implementation for each version.

The internals of making a class immutable changed a lot in Class::MOP 0.78_02, and Moose’s internals have changed along with it. The external $metaclass->make_immutable method still works the same way.

0.72

A mutable class accepted Foo->new(undef) without complaint, while an immutable class would blow up with an unhelpful error. Now, in both cases we throw a helpful error instead.

This “feature” was originally added to allow for cases such as this:

my $args; if ( something() ) { $args = {…}; } return My::Class->new($args);

But we decided this is a bad idea and a little too magical, because it can easily mask real errors.

0.71_01

Calling type or subtype without the sugar helpers (as, where, message) is now deprecated.

As a side effect, this meant we ended up using Perl prototypes on as, and code like this will no longer work:

use Moose::Util::TypeConstraints; use Declare::Constraints::Simple -All; subtype ArrayOfInts => as ArrayRef => IsArrayRef(IsInt);

Instead it must be changed to this:

subtype( ArrayOfInts => { as => ArrayRef, where => IsArrayRef(IsInt) } );

If you want to maintain backwards compat with older versions of Moose, you must explicitly test Moose’s VERSION:

if ( Moose->VERSION < 0.71_01 ) { subtype ArrayOfInts => as ArrayRef => IsArrayRef(IsInt); } else { subtype( ArrayOfInts => { as => ArrayRef, where => IsArrayRef(IsInt) } ); }

0.70

We no longer pass the meta-attribute object as a final argument to triggers. This actually changed for inlined code a while back, but the non-inlined version and the docs were still out of date.

If by some chance you actually used this feature, the workaround is simple. You fetch the attribute object from out of the $self that is passed as the first argument to trigger, like so:

has foo => ( is => ro, isa => Any, trigger => sub { my ( $self, $value ) = @_; my $attr = $self->meta->find_attribute_by_name(foo); # … } );

0.66

If you created a subtype and passed a parent that Moose didn’t know about, it simply ignored the parent. Now it automatically creates the parent as a class type. This may not be what you want, but is less broken than before.

You could declare a name with subtype such as “Foo!Bar”. Moose would accept this allowed, but if you used it in a parameterized type such as “ArrayRef[Foo!Bar]” it wouldn’t work. We now do some vetting on names created via the sugar functions, so that they can only contain alphanumerics, “:”, and “.”.

0.65

Methods created via an attribute can now fulfill a requires declaration for a role. Honestly we don’t know why Stevan didn’t make this work originally, he was just insane or something.

Stack traces from inlined code will now report the line and file as being in your class, as opposed to in Moose guts.

0.62_02

When a class does not provide all of a role’s required methods, the error thrown now mentions all of the missing methods, as opposed to just the first missing method.

Moose will no longer inline a constructor for your class unless it inherits its constructor from Moose::Object, and will warn when it doesn’t inline. If you want to force inlining anyway, pass replace_constructor => 1 to make_immutable.

If you want to get rid of the warning, pass inline_constructor => 0.

0.62

Removed the (deprecated) make_immutable keyword.

Removing an attribute from a class now also removes delegation (handles) methods installed for that attribute. This is correct behavior, but if you were wrongly relying on it you might get bit.

0.58

Roles now add methods by calling add_method, not alias_method. They make sure to always provide a method object, which will be cloned internally. This means that it is now possible to track the source of a method provided by a role, and even follow its history through intermediate roles. This means that methods added by a role now show up when looking at a class’s method list/map.

Parameter and Union args are now sorted, this makes Int|Str the same constraint as Str|Int. Also, incoming type constraint strings are normalized to remove all whitespace differences. This is mostly for internals and should not affect outside code.

Moose::Exporter will no longer remove a subroutine that the exporting package re-exports. Moose re-exports the Carp::confess function, among others. The reasoning is that we cannot know whether you have also explicitly imported those functions for your own use, so we err on the safe side and always keep them.

0.56

Moose::init_meta should now be called as a method.

New modules for extension writers, Moose::Exporter and Moose::Util::MetaRole.

0.55_01

Implemented metaclass traits (and wrote a recipe for it):

use Moose -traits => Foo

This should make writing small Moose extensions a little easier.

0.55

Fixed coerce to accept anon types just like subtype can. So that you can do:

coerce $some_anon_type => from Str => via { … };

0.51

Added BUILDARGS, a new step in Moose::Object->new().

0.49

Fixed how the is => (ro|rw) works with custom defined reader, writer and accessor options. See the below table for details:

is => ro, writer => _foo # turns into (reader => foo, writer => _foo) is => rw, writer => _foo # turns into (reader => foo, writer => _foo) is => rw, accessor => _foo # turns into (accessor => _foo) is => ro, accessor => _foo # error, accesor is rw

0.45

The before/around/after method modifiers now support regexp matching of method names. NOTE: this only works for classes, it is currently not supported in roles, but, … patches welcome.

The has keyword for roles now accepts the same array ref form that Moose.pm does for classes.

A trigger on a read-only attribute is no longer an error, as it’s useful to trigger off of the constructor.

Subtypes of parameterizable types now are parameterizable types themselves.

0.44

Fixed issue where DEMOLISHALL was eating the value in $@, and so not working correctly. It still kind of eats them, but so does vanilla perl.

0.41

Inherited attributes may now be extended without restriction on the type (‘isa’, ‘does’).

The entire set of Moose::Meta::TypeConstraint::* classes were refactored in this release. If you were relying on their internals you should test your code carefully.

0.40

Documenting the use of ‘+name’ with attributes that come from recently composed roles. It makes sense, people are using it, and so why not just officially support it.

The Moose::Meta::Class->create method now supports roles.

It is now possible to make anonymous enum types by passing enum an array reference instead of the enum $name => @values.

0.37

Added the make_immutable keyword as a shortcut to calling make_immutable on the meta object. This eventually got removed!

Made init_arg => undef work in Moose. This means “do not accept a constructor parameter for this attribute”.

Type errors now use the provided message. Prior to this release they didn’t.

0.34

Moose is now a postmodern object system :)

The Role system was completely refactored. It is 100% backwards compat, but the internals were totally changed. If you relied on the internals then you are advised to test carefully.

Added method exclusion and aliasing for Roles in this release.

Added the Moose::Util::TypeConstraints::OptimizedConstraints module.

Passing a list of values to an accessor (which is only expecting one value) used to be silently ignored, now it throws an error.

0.26

Added parameterized types and did a pretty heavy refactoring of the type constraint system.

Better framework extensibility and better support for “making your own Moose”.

0.25 or before

Honestly, you shouldn’t be using versions of Moose that are this old, so many bug fixes and speed improvements have been made you would be crazy to not upgrade.

Also, I am tired of going through the Changelog so I am stopping here, if anyone would like to continue this please feel free.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

713 - Linux cli command Net_DNS_RR_L32pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_L32pm and provides detailed information about the command Net_DNS_RR_L32pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_L32pm.

NAME 🖥️ Net_DNS_RR_L32pm 🖥️

DNS L32 resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name IN L32 preference locator32); $rr = Net::DNS::RR->new( name => example.com, type => L32, preference => 10, locator32 => 10.1.02.0 );

DESCRIPTION

Class for DNS 32-bit Locator (L32) resource records.

The L32 resource record is used to hold 32-bit Locator values for ILNPv4-capable nodes.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

preference

$preference = $rr->preference; $rr->preference( $preference );

A 16 bit unsigned integer in network byte order that indicates the relative preference for this L32 record among other L32 records associated with this owner name. Lower values are preferred over higher values.

locator32

$locator32 = $rr->locator32;

The Locator32 field is an unsigned 32-bit integer in network byte order that has the same syntax and semantics as a 32-bit IPv4 routing prefix.

COPYRIGHT

Copyright (c)2012 Dick Franks.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC6742 <https://tools.ietf.org/html/rfc6742>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

714 - Linux cli command Net_Server_Daemonizepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Server_Daemonizepm and provides detailed information about the command Net_Server_Daemonizepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Server_Daemonizepm.

NAME 🖥️ Net_Server_Daemonizepm 🖥️

Safe fork and daemonization utilities

SYNOPSIS

use Net::Server::Daemonize qw(daemonize); daemonize( nobody, # User nobody, # Group /var/state/mydaemon.pid # Path to PID file - optional );

DESCRIPTION

This module is intended to let you simply and safely daemonize your server on systems supporting the POSIX module. This means that your Perl script runs in the background, and it’s process ID is stored in a file so you can easily stop it later.

EXPORTED FUNCTIONS

daemonize
Main routine. Arguments are user (or userid), group (or group id or space delimited list of groups), and pid_file (path to file). This routine will check on the pid file, safely fork, create the pid file (storing the pid in the file), become another user and group, close STDIN, STDOUT and STDERR, separate from the process group (become session leader), and install $SIG{INT} to remove the pid file. In otherwords - daemonize. All errors result in a die. As of version 0.89 the pid_file is optional.

safe_fork
Block SIGINT during fork. No arguments. Returns pid of forked child. All errors result in a die.

set_user
Become another user and group. Arguments are user (or userid) and group (or group id or space delimited list of groups).

set_uid
Become another user. Argument is user (or userid). All errors die.

set_gid
Become another group. Arguments are groups (or group ids or space delimited list of groups or group ids). All errors die.

get_uid
Find the uid. Argument is user (userid returns userid). Returns userid. All errors die.

get_gid
Find the gids. Arguments are groups or space delimited list of groups. All errors die.

is_root_user
Determine if the process is running as root. Returns 1 or undef.

check_pid_file
Arguments are pid_file (full path to pid_file). Checks for existence of pid_file. If file exists, open it and determine if the process that created it is still running. This is done first by checking for a /proc file system and second using a ps command (BSD syntax). (If neither of these options exist it assumed that the process has ended) If the process is still running, it aborts. Otherwise, returns true. All errors die.

create_pid_file.
Arguments are pid_file (full path to pid_file). Calls check_pid_file. If it is successful (no pid_file exists), creates a pid file and stores $$ in the file.

unlink_pid_file
Does just that.

SEE ALSO

Net::Server. Net::Daemon, The Perl Cookbook Recipe 17.15.

AUTHORS

Jeremy Howard <[email protected]>

Program flow, concepts and initial work.

Paul Seamons <[email protected]>

Code rework and componentization. Ongoing maintainer.

LICENSE

This package may be distributed under the terms of either the GNU General Public License or the Perl Artistic License All rights reserved.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

715 - Linux cli command XtAppSetSelectionTimeout

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppSetSelectionTimeout and provides detailed information about the command XtAppSetSelectionTimeout, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppSetSelectionTimeout.

NAME 🖥️ XtAppSetSelectionTimeout 🖥️

set and obtain selection timeout values

SYNTAX

#include <X11/Intrinsic.h>

unsigned long XtAppGetSelectionTimeout(XtAppContext app_context);

void XtAppSetSelectionTimeout(XtAppContext app_context, unsigned long timeout);

ARGUMENTS

app_context
Specifies the application context.

timeout
Specifies the selection timeout in milliseconds.

DESCRIPTION

The XtAppGetSelectionTimeout function returns the current selection timeout value, in milliseconds. The selection timeout is the time within which the two communicating applications must respond to one another. The initial timeout value is set by the selectionTimeout application resource, or, if selectionTimeout is not specified, it defaults to five seconds.

The XtAppSetSelectionTimeout function sets the Intrinsics’s selection timeout mechanism. Note that most applications should not set the selection timeout.

SEE ALSO

XtOwnSelection(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

716 - Linux cli command XtAllocateGC

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAllocateGC and provides detailed information about the command XtAllocateGC, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAllocateGC.

NAME 🖥️ XtAllocateGC 🖥️

obtain a sharable GC with modifiable fields

SYNTAX

#include <X11/Intrinsic.h>

GC XtAllocateGC(Widget w, Cardinal depth, XtGCMask value_mask, XGCValues *values, XtGCMask dynamic_mask, XtGCMask unused_mask);

ARGUMENTS

values
Specifies the actual values for this GC.

value_mask
Specifies which fields of the values are specified.

  1. Specifies the widget.

depth
Specifies the depth for which the returned GC is valid, or 0.

dynamic_mask
Specifies the fields of the GC that will be modified by the caller.

unused_mask
Specifies the fields of the GC that will not be needed by the caller.

DESCRIPTION

The XtAllocateGC function returns a sharable GC that may be modified by the client. The screen field of the specified widget or of the nearest widget ancestor of the specified object and the specified depth argument supply the root and drawable depths for which the GC is to be valid. If depth is zero the depth is taken from the depth field of the specified widget or of the nearest widget ancestor of the specified object.

The value_mask argument specifies the fields of the GC that will be initialized with the respective members of the values structure. The dynamic_mask argument specifies fields that the caller intends to modify during program execution. The caller must ensure that the corresponding GC field is set prior to each use of the GC. The unused_mask argument specifies fields of the GC that are of no interest to the caller. The caller may make no assumptions about the contents of any fields specified in unused_mask. The caller may assume that at all times all fields not specified in either dynamic_mask or unused_mask have their default value if not specified in value_mask or the value specified by values. If a field is specified in both value_mask and dynamic_mask, the effect is as if it were specified only in dynamic_mask and then immediately set to the value in values. If a field is set in unused_mask and also in either value_mask or dynamic_mask, the specification in unused_mask is ignored.

XtAllocateGC tries to minimize the number of unique GCs created by comparing the arguments with those of previous calls and returning an existing GC when there are no conflicts. XtAllocateGC may modify and return an existing GC if it was allocated with a nonzero unused_mask.

SEE ALSO

XtGetGC
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

717 - Linux cli command zip_ftell

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_ftell and provides detailed information about the command zip_ftell, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_ftell.

libzip (-lzip)

The

function reports the current offset in the file.

only works on uncompressed (stored) data. When called on compressed data it will return an error.

If successful,

returns the current file position. Otherwise, -1 is returned.

was added in libzip 1.2.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

718 - Linux cli command lgammal

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lgammal and provides detailed information about the command lgammal, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lgammal.

NAME 🖥️ lgammal 🖥️

log gamma function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double lgamma(double x);
float lgammaf(float x);
long double lgammal(long double x);
double lgamma_r(double x, int *signp);
float lgammaf_r(float x, int *signp);
long double lgammal_r(long double x, int *signp);
extern int signgam;

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

lgamma():
    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

lgammaf(), lgammal():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

lgamma_r(), lgammaf_r(), lgammal_r():

    /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

signgam:

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

For the definition of the Gamma function, see tgamma(3).

The lgamma(), lgammaf(), and lgammal() functions return the natural logarithm of the absolute value of the Gamma function. The sign of the Gamma function is returned in the external integer signgam declared in <math.h>. It is 1 when the Gamma function is positive or zero, -1 when it is negative.

Since using a constant location signgam is not thread-safe, the functions lgamma_r(), lgammaf_r(), and lgammal_r() have been introduced; they return the sign via the argument signp.

RETURN VALUE

On success, these functions return the natural logarithm of Gamma(x).

If x is a NaN, a NaN is returned.

If x is 1 or 2, +0 is returned.

If x is positive infinity or negative infinity, positive infinity is returned.

If x is a nonpositive integer, a pole error occurs, and the functions return +HUGE_VAL, +HUGE_VALF, or +HUGE_VALL, respectively.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the correct mathematical sign.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Pole error: x is a nonpositive integer
errno is set to ERANGE (but see BUGS). A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised.

Range error: result overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

STANDARDS

lgamma()
lgammaf()
lgammal()
C11, POSIX.1-2008.

signgam
POSIX.1-2008.

lgamma_r()
lgammaf_r()
lgammal_r()
None.

HISTORY

lgamma()
lgammaf()
lgammal()
C99, POSIX.1-2001.

signgam
POSIX.1-2001.

lgamma_r()
lgammaf_r()
lgammal_r()
None.

BUGS

In glibc 2.9 and earlier, when a pole error occurs, errno is set to EDOM; instead of the POSIX-mandated ERANGE. Since glibc 2.10, glibc does the right thing.

SEE ALSO

tgamma(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

719 - Linux cli command printf.hhead

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command printf.hhead and provides detailed information about the command printf.hhead, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the printf.hhead.

NAME 🖥️ printf.hhead 🖥️

define custom behavior for printf-like functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <printf.h>
int register_printf_specifier(int spec, printf_function func,
 printf_arginfo_size_function arginfo);
int register_printf_modifier(const wchar_t *str);
int register_printf_type(printf_va_arg_function fct);

Callbacks

typedef int printf_function(FILE *stream, const struct printf_info *info,
 const void *const args[]);
typedef int printf_arginfo_size_function(const struct printf_info *info,
 size_t n, int argtypes[n], int size[n]);
typedef void printf_va_arg_function(void *mem, va_list *ap);

Types

struct printf_info {
 int prec; // Precision
 int width; // Width
 wchar_t spec; // Format letter
 unsigned int is_long_double:1;// L or ll flag
 unsigned int is_short:1; // h flag
 unsigned int is_long:1; // l flag
 unsigned int alt:1; // # flag
 unsigned int space:1; // Space flag
 unsigned int left:1; // - flag
 unsigned int showsign:1; // + flag
 unsigned int group:1; // ' flag
 unsigned int extra:1; // For special use
 unsigned int is_char:1; // hh flag
 unsigned int wide:1; // True for wide character streams
 unsigned int i18n:1; // I flag
 unsigned int is_binary128:1; /* Floating-point argument is
  ABI-compatible with
  IEC 60559 binary128 */
 unsigned short user; // Bits for user-installed modifiers
 wchar_t pad; // Padding character
};

Constants

#define PA_FLAG_LONG_LONG /* ... */
#define PA_FLAG_LONG_DOUBLE /* ... */
#define PA_FLAG_LONG /* ... */
#define PA_FLAG_SHORT /* ... */
#define PA_FLAG_PTR /* ... */

DESCRIPTION

These functions serve to extend and/or modify the behavior of the printf(3) family of functions.

register_printf_specifier()

This function registers a custom conversion specifier for the printf(3) family of functions.

spec
The character which will be used as a conversion specifier in the format string.

func
Callback function that will be executed by the printf(3) family of functions to format the input arguments into the output stream.

stream
Output stream where the formatted output should be printed. This stream transparently represents the output, even in the case of functions that write to a string.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in arginfo.

args
Array of pointers to the arguments to the printf(3) -like function.

arginfo
Callback function that will be executed by the printf(3) family of functions to know how many arguments should be parsed for the custom specifier and also their types.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in func.

n
Number of arguments remaining to be parsed.

argtypes
This array should be set to define the type of each of the arguments that will be parsed. Each element in the array represents one of the arguments to be parsed, in the same order that they are passed to the printf(3) -like function. Each element should be set to a base type (PA_*) from the enum above, or a custom one, and optionally ORed with an appropriate length modifier (PA_FLAG_*).

The type is determined by using one of the following constants:

PA_INT
int.

PA_CHAR
int, cast to char.

PA_WCHAR
wchar_t.

PA_STRING
const char *, a ‘�’-terminated string.

PA_WSTRING
const wchar_t *, a wide character L’�’-terminated string.

PA_POINTER
void *.

PA_FLOAT
float.

PA_DOUBLE
double.

PA_LAST
TODO.

size
For user-defined types, the size of the type (in bytes) should also be specified through this array. Otherwise, leave it unused.

arginfo is called before func, and prepares some information needed to call func.

register_printf_modifier()

TODO

register_printf_type()

TODO

RETURN VALUE

register_printf_specifier(), register_printf_modifier(), and register_printf_type() return zero on success, or -1 on error.

Callbacks

The callback of type printf_function should return the number of characters written, or -1 on error.

The callback of type printf_arginfo_size_function should return the number of arguments to be parsed by this specifier. It also passes information about the type of those arguments to the caller through argtypes. On error, it should return -1.

ERRORS

EINVAL
The specifier was not a valid character.

STANDARDS

GNU.

HISTORY

register_printf_function(3) is an older function similar to register_printf_specifier(), and is now deprecated. That function can’t handle user-defined types.

register_printf_specifier() supersedes register_printf_function(3).

EXAMPLES

The following example program registers the ‘b’ and ‘B’ specifiers to print integers in binary format, mirroring rules for other unsigned conversion specifiers like ‘x’ and ‘u’. This can be used to print in binary prior to C23.

/* This code is in the public domain */
#include <err.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <printf.h>
#define GROUP_SEP  '\''
struct Printf_Pad {
    char    ch;
    size_t  len;
};
static int b_printf(FILE *stream, const struct printf_info *info,
                    const void *const args[]);
static int b_arginf_sz(const struct printf_info *info,
                    size_t n, int argtypes[n], int size[n]);
static uintmax_t b_value(const struct printf_info *info,
                    const void *arg);
static size_t b_bin_repr(char bin[UINTMAX_WIDTH],
                    const struct printf_info *info, const void *arg);
static size_t b_bin_len(const struct printf_info *info,
                    ptrdiff_t min_len);
static size_t b_pad_len(const struct printf_info *info,
                    ptrdiff_t bin_len);
static ssize_t b_print_prefix(FILE *stream,
                    const struct printf_info *info);
static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info,
                    ptrdiff_t min_len);
static ssize_t b_print_number(FILE *stream,
                    const struct printf_info *info,
                    const char bin[UINTMAX_WIDTH],
                    size_t min_len, size_t bin_len);
static char pad_ch(const struct printf_info *info);
static ssize_t pad_spaces(FILE *stream, size_t pad_len);
int
main(void)
{
    if (register_printf_specifier('b', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('b', ...)");
    if (register_printf_specifier('B', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('B', ...)");
    printf("....----....----....----....----

“); printf("%llb; “, 0x5Ellu); printf("%lB; “, 0x5Elu); printf("%b; “, 0x5Eu); printf("%hB; “, 0x5Eu); printf("%hhb; “, 0x5Eu); printf("%jb; “, (uintmax_t)0x5E); printf("%zb; “, (size_t)0x5E); printf(”….—-….—-….—-….—- “); printf(”%#b; “, 0x5Eu); printf(”%#B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf("%10b; “, 0x5Eu); printf("%010b; “, 0x5Eu); printf(”%.10b; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%-10B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%‘B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”….—-….—-….—-….—- “); printf(”%#16.12b; “, 0xAB); printf(”%-#‘20.12b; “, 0xAB); printf(”%#‘020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#020B; “, 0xAB); printf(”%‘020B; “, 0xAB); printf("%020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#021B; “, 0xAB); printf(”%‘021B; “, 0xAB); printf("%021B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#022B; “, 0xAB); printf(”%‘022B; “, 0xAB); printf("%022B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#023B; “, 0xAB); printf(”%‘023B; “, 0xAB); printf("%023B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%-#‘19.11b; “, 0xAB); printf(”%#‘019B; “, 0xAB); printf(”%#019B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%‘019B; “, 0xAB); printf("%019B; “, 0xAB); printf(”%#016b; “, 0xAB); printf(”….—-….—-….—-….—- “); return 0; } static int b_printf(FILE *stream, const struct printf_info *info, const void const args[]) { char bin[UINTMAX_WIDTH]; size_t min_len, bin_len; ssize_t len, tmp; struct Printf_Pad pad = {0}; len = 0; min_len = b_bin_repr(bin, info, args[0]); bin_len = b_bin_len(info, min_len); pad.ch = pad_ch(info); if (pad.ch == ’ ‘) pad.len = b_pad_len(info, bin_len); / Padding with ’ ’ (right aligned) / if ((pad.ch == ’ ‘) && !info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } / “0b”/“0B” prefix / if (info->alt) { tmp = b_print_prefix(stream, info); if (tmp == EOF) return EOF; len += tmp; } / Padding with ‘0’ / if (pad.ch == ‘0’) { tmp = b_pad_zeros(stream, info, min_len); if (tmp == EOF) return EOF; len += tmp; } / Print number (including leading 0s to fill precision) / tmp = b_print_number(stream, info, bin, min_len, bin_len); if (tmp == EOF) return EOF; len += tmp; / Padding with ’ ’ (left aligned) */ if (info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } return len; } static int b_arginf_sz(const struct printf_info *info, size_t n, int argtypes[n], [[maybe_unused]] int size[n]) { if (n < 1) return -1; if (info->is_long_double) argtypes[0] = PA_INT | PA_FLAG_LONG_LONG; else if (info->is_long) argtypes[0] = PA_INT | PA_FLAG_LONG; else argtypes[0] = PA_INT; return 1; } static uintmax_t b_value(const struct printf_info *info, const void *arg) { if (info->is_long_double) return *(const unsigned long long *)arg; if (info->is_long) return *(const unsigned long )arg; / short and char are both promoted to int */ return *(const unsigned int *)arg; } static size_t b_bin_repr(char bin[UINTMAX_WIDTH], const struct printf_info *info, const void *arg) { size_t min_len; uintmax_t val; val = b_value(info, arg); bin[0] = ‘0’; for (min_len = 0; val; min_len++) { bin[min_len] = ‘0’ + (val % 2); val »= 1; } return MAX(min_len, 1); } static size_t b_bin_len(const struct printf_info *info, ptrdiff_t min_len) { return MAX(info->prec, min_len); } static size_t b_pad_len(const struct printf_info *info, ptrdiff_t bin_len) { ptrdiff_t pad_len; pad_len = info->width - bin_len; if (info->alt) pad_len -= 2; if (info->group) pad_len -= (bin_len - 1) / 4; return MAX(pad_len, 0); } static ssize_t b_print_prefix(FILE *stream, const struct printf_info *info) { ssize_t len; len = 0; if (fputc(‘0’, stream) == EOF) return EOF; len++; if (fputc(info->spec, stream) == EOF) return EOF; len++; return len; } static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info, ptrdiff_t min_len) { ssize_t len; ptrdiff_t tmp; len = 0; tmp = info->width - (info->alt * 2); if (info->group) tmp -= tmp / 5 - !(tmp % 5); for (ptrdiff_t i = tmp - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static ssize_t b_print_number(FILE *stream, const struct printf_info info, const char bin[UINTMAX_WIDTH], size_t min_len, size_t bin_len) { ssize_t len; len = 0; / Print leading zeros to fill precision / for (size_t i = bin_len - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } / Print number */ for (size_t i = min_len - 1; i < min_len; i–) { if (fputc(bin[i], stream) == EOF) return EOF; len++; if (!info->group || (i % 4) || !i) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static char pad_ch(const struct printf_info *info) { if ((info->prec != -1) || (info->pad == ’ ‘) || info->left) return ’ ‘; return ‘0’; } static ssize_t pad_spaces(FILE *stream, size_t pad_len) { ssize_t len; len = 0; for (size_t i = pad_len - 1; i < pad_len; i–) { if (fputc(’ ‘, stream) == EOF) return EOF; len++; } return len; }

SEE ALSO

asprintf(3), printf(3), wprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

720 - Linux cli command HTML_FormatTextpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_FormatTextpm and provides detailed information about the command HTML_FormatTextpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_FormatTextpm.

NAME 🖥️ HTML_FormatTextpm 🖥️

Format HTML as plaintext

VERSION

version 2.16

SYNOPSIS

use HTML::TreeBuilder; $tree = HTML::TreeBuilder->new->parse_file(“test.html”); use HTML::FormatText; $formatter = HTML::FormatText->new(leftmargin => 0, rightmargin => 50); print $formatter->format($tree);

or, more simply:

use HTML::FormatText; my $string = HTML::FormatText->format_file( test.html, leftmargin => 0, rightmargin => 50 );

DESCRIPTION

HTML::FormatText is a formatter that outputs plain text. All character attributes (bold/italic/underline) are ignored. Formatting of HTML tables and forms is not implemented.

HTML::FormatText is built on HTML::Formatter and documentation for that module applies to this - especially new in HTML::Formatter, format_file in HTML::Formatter and format_string in HTML::Formatter.

You might specify the following parameters when constructing the formatter:

leftmargin (alias lm)
The column of the left margin. The default is 3.

rightmargin (alias rm)
The column of the right margin. The default is 72.

SEE ALSO

HTML::Formatter

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Nigel Metheringham, 2002-2005 Sean M Burke, 1999-2002 Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

721 - Linux cli command XML_PatAct_Amsterdampm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_PatAct_Amsterdampm and provides detailed information about the command XML_PatAct_Amsterdampm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_PatAct_Amsterdampm.

NAME 🖥️ XML_PatAct_Amsterdampm 🖥️

An action module for simplistic style-sheets

SYNOPSIS

use XML::PatAct::Amsterdam; my $patterns = [ PATTERN => { Before => before, After => after }, … ]; my $matcher = XML::PatAct::Amsterdam->new( I<OPTIONS> );

DESCRIPTION

XML::PatAct::Amsterdam is a PerlSAX handler for applying pattern-action lists to XML parses or trees. XML::PatAct::Amsterdam applies a very simple style sheet to an instance and outputs the result. Amsterdam gets it’s name from the Amsterdam SGML Parser (ASP) which inspired this module.

CAUTION: Amsterdam is a very simple style module, you will run into it’s limitations quickly with even moderately complex XML instances, be aware of and prepared to switch to more complete style modules.

New XML::PatAct::Amsterdam instances are creating by calling `new()’. Parameters can be passed as a list of key, value pairs or a hash. A Patterns and Matcher options are required. The following OPTIONS are supported:

Patterns
The pattern-action list to apply. The list is an anonymous array of pattern, action pairs. Each action in the list contains either or both a Before and an After string to copy to the output before and after processing an XML element. The Before and After strings may contain attribute names enclosed in square brackets (`[NAME `]’), these are replaced with the value of the attribute with that name. The special NAME `_element’ will be replaced with the element’s name.

Matcher
An instance of the pattern or query matching module.

Output
An IO::Handle or one of it’s subclasses (such as IO::File), if this parameter is not present and the AsString option is not used, the module will write to standard output.

AsString
Return the generated output as a string from the `parse()’ method of the PerlSAX event generator.

AUTHOR

Ken MacLeod, [email protected]

SEE ALSO

perl (1)

``Using PatAct Modules’’ and ``Creating PatAct Modules’’ in libxml-perl.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

722 - Linux cli command XtAugmentTranslations

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAugmentTranslations and provides detailed information about the command XtAugmentTranslations, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAugmentTranslations.

NAME 🖥️ XtAugmentTranslations 🖥️

manage translation tables

SYNTAX

#include <X11/Intrinsic.h>

XtTranslations XtParseTranslationTable(const char *table);

void XtAugmentTranslations(Widget w, XtTranslations translations);

void XtOverrideTranslations(Widget w, XtTranslations translations);

void XtUninstallTranslations(Widget w);

ARGUMENTS

table
Specifies the translation table to compile.

translations
Specifies the compiled translation table to merge in (must not be NULL).

  1. Specifies the widget into which the new translations are to be merged or removed.

DESCRIPTION

The XtParseTranslationTable function compiles the translation table into the opaque internal representation of type XtTranslations. Note that if an empty translation table is required for any purpose, one can be obtained by calling XtParseTranslationTable and passing an empty string.

The XtAugmentTranslations function nondestructively merges the new translations into the existing widget translations. If the new translations contain an event or event sequence that already exists in the widget’s translations, the new translation is ignored.

The XtOverrideTranslations function destructively merges the new translations into the existing widget translations. If the new translations contain an event or event sequence that already exists in the widget’s translations, the new translation is merged in and override the widget’s translation.

To replace a widget’s translations completely, use XtSetValues on the XtNtranslations resource and specify a compiled translation table as the value.

The XtUninstallTranslations function causes the entire translation table for widget to be removed.

SEE ALSO

XtAppAddActions(3), XtCreatePopupShell(3), XtParseAcceleratorTable(3), XtPopup(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

723 - Linux cli command XtPopdown

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtPopdown and provides detailed information about the command XtPopdown, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtPopdown.

NAME 🖥️ XtPopdown 🖥️

unmap a pop-up

SYNTAX

#include <X11/Intrinsic.h>

void XtPopdown(Widget popup_shell);

void XtCallbackPopdown(Widget w, XtPointer client_data, XtPointer call_data);

ACTIONS

void XtMenuPopdown(String shell_name);

ARGUMENTS

call_data
Specifies the callback data, which is not used by this procedure.

client_data
Specifies a pointer to the XtPopdownID structure.

popup_shell
Specifies the widget shell to pop down.

shell_name
Specifies the name of the widget shell to pop down.

  1. Specifies the widget.

DESCRIPTION

The XtPopdown function performs the following:

  • Calls XtCheckSubclass to ensure popup_shell is a subclass of Shell.

  • Checks that popup_shell is currently popped_up; otherwise, it generates an error.

  • Unmaps popup_shell’s window.

  • If popup_shell’s grab_kind is either XtGrabNonexclusive or XtGrabExclusive, it calls XtRemoveGrab.

  • Sets pop-up shell’s popped_up field to False.

  • Calls the callback procedures on the shell’s popdown_callback list.

The XtCallbackPopdown function casts the client data parameter to an XtPopdownID pointer:

typedef struct { Widget shell_widget; Widget enable_widget; } XtPopdownIDRec, *XtPopdownID;

The shell_widget is the pop-up shell to pop down, and the enable_widget is the widget that was used to pop it up.

XtCallbackPopdown calls XtPopdown with the specified shell_widget and then calls XtSetSensitive to resensitize the enable_widget.

If a shell name is not given, XtMenuPopdown calls XtPopdown with the widget for which the translation is specified. If a shell_name is specified in the translation table, XtMenuPopdown tries to find the shell by looking up the widget tree starting at the parent of the widget in which it is invoked. If it finds a shell with the specified name in the pop-up children of that parent, it pops down the shell; otherwise, it moves up the parent chain as needed. If XtMenuPopdown gets to the application top-level shell widget and cannot find a matching shell, it generates an error.

SEE ALSO

XtCreatePopupShell(3), XtPopup(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

724 - Linux cli command fputs_unlocked

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fputs_unlocked and provides detailed information about the command fputs_unlocked, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fputs_unlocked.

NAME 🖥️ fputs_unlocked 🖥️

nonlocking stdio functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int getc_unlocked(FILE *stream);
int getchar_unlocked(void);
int putc_unlocked(int c, FILE *stream);
int putchar_unlocked(int c);
void clearerr_unlocked(FILE *stream);
int feof_unlocked(FILE *stream);
int ferror_unlocked(FILE *stream);
int fileno_unlocked(FILE *stream);
int fflush_unlocked(FILE *_Nullable stream);
int fgetc_unlocked(FILE *stream);
int fputc_unlocked(int c, FILE *stream);
size_t fread_unlocked(void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
size_t fwrite_unlocked(const void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
char *fgets_unlocked(char s[restrict .n], int n",FILE*restrict"stream);
int fputs_unlocked(const char *restrict s, FILE *restrict stream);
#include <wchar.h>
wint_t getwc_unlocked(FILE *stream);
wint_t getwchar_unlocked(void);
wint_t fgetwc_unlocked(FILE *stream);
wint_t fputwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwchar_unlocked(wchar_t wc);
wchar_t *fgetws_unlocked(wchar_t ws[restrict .n], int n,
 FILE *restrict stream);
int fputws_unlocked(const wchar_t *restrict ws,
 FILE *restrict stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getc_unlocked(), getchar_unlocked(), putc_unlocked(), putchar_unlocked():

    /* glibc >= 2.24: */ _POSIX_C_SOURCE >= 199309L
        || /* glibc <= 2.23: */ _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

clearerr_unlocked(), feof_unlocked(), ferror_unlocked(), fileno_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), getwchar_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwchar_unlocked(), fgetws_unlocked(), fputws_unlocked():

    _GNU_SOURCE

DESCRIPTION

Each of these functions has the same behavior as its counterpart without the “_unlocked” suffix, except that they do not use locking (they do not set locks themselves, and do not test for the presence of locks set by others) and hence are thread-unsafe. See flockfile(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getc_unlocked(), putc_unlocked(), clearerr_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked(), fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwc_unlocked(), fgetws_unlocked(), fputws_unlocked()

Thread safety

MT-Safe race:stream

getchar_unlocked(), getwchar_unlocked()

Thread safety

MT-Unsafe race:stdin

putchar_unlocked(), putwchar_unlocked()

Thread safety

MT-Unsafe race:stdout

feof_unlocked(), ferror_unlocked(), fileno_unlocked()

Thread safetyMT-Safe

STANDARDS

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2008.

Others:
None.

HISTORY

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2001.

SEE ALSO

flockfile(3), stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

725 - Linux cli command Image_ExifTool_Stimpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Stimpm and provides detailed information about the command Image_ExifTool_Stimpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Stimpm.

NAME 🖥️ Image_ExifTool_Stimpm 🖥️

Definitions for Stereo Still Image tags

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains tag definitions for Stereo Still Image format (Stim) information.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.cipa.jp/std/documents/e/DC-006_E.pdf>

SEE ALSO

“Stim Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

726 - Linux cli command SLIST_FIRST

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SLIST_FIRST and provides detailed information about the command SLIST_FIRST, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SLIST_FIRST.

NAME 🖥️ SLIST_FIRST 🖥️

implementation of a singly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
SLIST_ENTRY(TYPE);
SLIST_HEAD(HEADNAME, TYPE);
SLIST_HEAD SLIST_HEAD_INITIALIZER(SLIST_HEAD head);
void SLIST_INIT(SLIST_HEAD *head);
int SLIST_EMPTY(SLIST_HEAD *head);
void SLIST_INSERT_HEAD(SLIST_HEAD *head,
 struct TYPE *elm, SLIST_ENTRY NAME);
void SLIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, SLIST_ENTRY NAME);
struct TYPE *SLIST_FIRST(SLIST_HEAD *head);
struct TYPE *SLIST_NEXT(struct TYPE *elm, SLIST_ENTRY NAME);
SLIST_FOREACH(struct TYPE *var, SLIST_HEAD *head, SLIST_ENTRY NAME);
void SLIST_REMOVE(SLIST_HEAD *head, struct TYPE *elm,
 SLIST_ENTRY NAME);
void SLIST_REMOVE_HEAD(SLIST_HEAD *head,
 SLIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on singly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type SLIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro SLIST_HEAD().

Creation

A singly linked list is headed by a structure defined by the SLIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the list after an existing element or at the head of the list. An SLIST_HEAD structure is declared as follows:

SLIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

SLIST_ENTRY() declares a structure that connects the elements in the list.

SLIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

SLIST_INIT() initializes the list referenced by head.

SLIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

SLIST_INSERT_HEAD() inserts the new element elm at the head of the list.

SLIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

SLIST_FIRST() returns the first element in the list, or NULL if the list is empty.

SLIST_NEXT() returns the next element in the list.

SLIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

SLIST_REMOVE() removes the element elm from the list.

SLIST_REMOVE_HEAD() removes the element elm from the head of the list. For optimum efficiency, elements being removed from the head of the list should explicitly use this macro instead of the generic SLIST_REMOVE().

RETURN VALUE

SLIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

SLIST_FIRST(), and SLIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

SLIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

SLIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. SLIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    SLIST_ENTRY(entry) entries;             /* Singly linked list */
};
SLIST_HEAD(slisthead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct slisthead head;                  /* Singly linked list
                                               head */
    SLIST_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    SLIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    SLIST_INSERT_AFTER(n1, n2, entries);
    SLIST_REMOVE(&head, n2, entry, entries);/* Deletion */
    free(n2);
    n3 = SLIST_FIRST(&head);
    SLIST_REMOVE_HEAD(&head, entries);      /* Deletion from the head */
    free(n3);
    for (unsigned int i = 0; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        SLIST_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    SLIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); while (!SLIST_EMPTY(&head)) { /* List deletion */ n1 = SLIST_FIRST(&head); SLIST_REMOVE_HEAD(&head, entries); free(n1); } SLIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

727 - Linux cli command Image_ExifTool_Photoshoppm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Photoshoppm and provides detailed information about the command Image_ExifTool_Photoshoppm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Photoshoppm.

NAME 🖥️ Image_ExifTool_Photoshoppm 🖥️

Read/write Photoshop IRB meta information

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

Photoshop writes its own format of meta information called a Photoshop IRB resource which is located in the APP13 record of JPEG files. This module contains the definitions to read this information.

NOTES

Photoshop IRB blocks may have an associated resource name. These names are usually just an empty string, but if not empty they are displayed in the verbose level 2 (or greater) output. A special SetResourceName flag may be set to ‘1’ in the tag information hash to cause the resource name to be appended to the value when extracted. If this is done, the returned value has the form “VALUE/#NAME#/”. When writing, the writer routine looks for this syntax (if SetResourceName is defined), and and uses the embedded name to set the name of the new resource. This allows the resource names to be preserved when copying Photoshop information via user-defined tags.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.fine-view.com/jp/lab/doc/ps6ffspecsv2.pdf>

<http://www.ozhiker.com/electronics/pjmt/jpeg_info/irb_jpeg_qual.html>

<http://www.fileformat.info/format/psd/egff.htm>

<http://libpsd.graphest.com/files/Photoshop%20File%20Formats.pdf>

<http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/>

SEE ALSO

“Photoshop Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm), Image::MetaData::JPEG (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

728 - Linux cli command Net_DNS_RR_AFSDBpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_AFSDBpm and provides detailed information about the command Net_DNS_RR_AFSDBpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_AFSDBpm.

NAME 🖥️ Net_DNS_RR_AFSDBpm 🖥️

DNS AFSDB resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name AFSDB subtype hostname);

DESCRIPTION

Class for DNS AFS Data Base (AFSDB) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

subtype

$subtype = $rr->subtype; $rr->subtype( $subtype );

A 16 bit integer which indicates the service offered by the listed host.

hostname

$hostname = $rr->hostname; $rr->hostname( $hostname );

The hostname field is a domain name of a host that has a server for the cell named by the owner name of the RR.

COPYRIGHT

Copyright (c)1997 Michael Fuhr.

Portions Copyright (c)2002,2003 Chris Reinhardt.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC1183 (1) <https://iana.org/go/rfc1183#section-1> RFC5864 <https://iana.org/go/rfc5864>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

729 - Linux cli command Net_DBus_Binding_Buspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Binding_Buspm and provides detailed information about the command Net_DBus_Binding_Buspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Binding_Buspm.

NAME 🖥️ Net_DBus_Binding_Buspm 🖥️

Handle to a well-known message bus instance

SYNOPSIS

use Net::DBus::Binding::Bus; # Get a handle to the system bus my $bus = Net::DBus::Binding::Bus->new(type => &Net::DBus::Binding::Bus::SYSTEM);

DESCRIPTION

This is a specialization of the Net::DBus::Binding::Connection module providing convenience constructor for connecting to one of the well-known bus types. There is no reason to use this module directly, instead get a handle to the bus with the session or system methods in Net::DBus.

METHODS

my $bus = Net::DBus::Binding::Bus->new(type => $type);

my $bus = Net::DBus::Binding::Bus->new(address => $addr);

Open a connection to a message bus, either a well known bus type specified using the type parameter, or an arbitrary bus specified using the address parameter. If the private parameter is set to a true value, then a private connection to the bus is obtained. The caller must explicitly disconnect this bus instance before releasing the last instance of the object.

$bus->request_name($service_name)
Send a request to the bus registering the well known name specified in the $service_name parameter. If another client already owns the name, registration will be queued up, pending the exit of the other client.

my $name = $bus->get_unique_name
Returns the unique name by which this processes’ connection to the bus is known. Unique names are never re-used for the entire lifetime of the bus daemon.

$bus->add_match($rule)
Register a signal match rule with the bus controller, allowing matching broadcast signals to routed to this client.

$bus->remove_match($rule)
Unregister a signal match rule with the bus controller, preventing further broadcast signals being routed to this client

AUTHOR

Daniel P. Berrange

COPYRIGHT

Copyright (C) 2004-2011 Daniel P. Berrange

SEE ALSO

Net::DBus::Binding::Connection, Net::DBus

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

730 - Linux cli command Net_DNS_RR_RPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_RPpm and provides detailed information about the command Net_DNS_RR_RPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_RPpm.

NAME 🖥️ Net_DNS_RR_RPpm 🖥️

DNS RP resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name RP mbox txtdname);

DESCRIPTION

Class for DNS Responsible Person (RP) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

mbox

$mbox = $rr->mbox; $rr->mbox( $mbox );

A domain name which specifies the mailbox for the person responsible for this domain. The format in master files uses the DNS encoding convention for mailboxes, identical to that used for the RNAME mailbox field in the SOA RR. The root domain name (just “.”) may be specified to indicate that no mailbox is available.

txtdname

$txtdname = $rr->txtdname; $rr->txtdname( $txtdname );

A domain name identifying TXT RRs. A subsequent query can be performed to retrieve the associated TXT records. This provides a level of indirection so that the entity can be referred to from multiple places in the DNS. The root domain name (just “.”) may be specified to indicate that there is no associated TXT RR.

COPYRIGHT

Copyright (c)1997 Michael Fuhr.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC1183(2.2) <https://iana.org/go/rfc1183#section-2.2>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

731 - Linux cli command zip_source_stat

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_stat and provides detailed information about the command zip_source_stat, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_stat.

libzip (-lzip)

The

function obtains information about the zip source

The

argument is a pointer to a

(shown below), into which information about the zip source is placed.

struct zip_source_stat { zip_uint64_t valid; /* which fields have valid values */ const char *name; /* name of the file */ zip_uint64_t index; /* index within archive */ zip_uint64_t size; /* size of file (uncompressed) */ zip_uint64_t comp_size; /* size of file (compressed) */ time_t mtime; /* modification time */ zip_uint32_t crc; /* crc of file data */ zip_uint16_t comp_method; /* compression method used */ zip_uint16_t encryption_method; /* encryption method used */ zip_uint32_t flags; /* reserved for future use */ };

The structure pointed to by

must be initialized with

before calling

The

field of the structure specifies which other fields are valid. Check if the flag defined by the following defines are in

before accessing the fields:

Some fields may only be filled out after all data has been read from the source, for example the

or

fields.

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

732 - Linux cli command fmodf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fmodf and provides detailed information about the command fmodf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fmodf.

NAME 🖥️ fmodf 🖥️

floating-point remainder function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double fmod(double x, double y);
float fmodf(float x, float y);
long double fmodl(long double x, long double y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

fmodf(), fmodl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions compute the floating-point remainder of dividing x by y. The return value is x - n * y, where n is the quotient of x / y, rounded toward zero to an integer.

To obtain the modulus, more specifically, the Least Positive Residue, you will need to adjust the result from fmod like so:

z = fmod(x, y);
if (z < 0)
	z += y;

An alternate way to express this is with fmod(fmod(x, y) + y, y), but the second fmod() usually costs way more than the one branch.

RETURN VALUE

On success, these functions return the value x - n*y, for some integer n, such that the returned value has the same sign as x and a magnitude less than the magnitude of y.

If x or y is a NaN, a NaN is returned.

If x is an infinity, a domain error occurs, and a NaN is returned.

If y is zero, a domain error occurs, and a NaN is returned.

If x is +0 (-0), and y is not zero, +0 (-0) is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is an infinity
errno is set to EDOM (but see BUGS). An invalid floating-point exception (FE_INVALID) is raised.

Domain error: y is zero
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fmod(), fmodf(), fmodl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

BUGS

Before glibc 2.10, the glibc implementation did not set errno to EDOM when a domain error occurred for an infinite x.

EXAMPLES

The call fmod(372, 360) returns 348.

The call fmod(-372, 360) returns -12.

The call fmod(-372, -360) also returns -12.

SEE ALSO

remainder(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

733 - Linux cli command mallinfo

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mallinfo and provides detailed information about the command mallinfo, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mallinfo.

NAME 🖥️ mallinfo 🖥️

obtain memory allocation information

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <malloc.h>
struct mallinfo mallinfo(void);
struct mallinfo2 mallinfo2(void);

DESCRIPTION

These functions return a copy of a structure containing information about memory allocations performed by malloc(3) and related functions. The structure returned by each function contains the same fields. However, the older function, mallinfo(), is deprecated since the type used for the fields is too small (see BUGS).

Note that not all allocations are visible to these functions; see BUGS and consider using malloc_info(3) instead.

The mallinfo2 structure returned by mallinfo2() is defined as follows:

struct mallinfo2 {
    size_t arena;     /* Non-mmapped space allocated (bytes) */
    size_t ordblks;   /* Number of free chunks */
    size_t smblks;    /* Number of free fastbin blocks */
    size_t hblks;     /* Number of mmapped regions */
    size_t hblkhd;    /* Space allocated in mmapped regions
                         (bytes) */
    size_t usmblks;   /* See below */
    size_t fsmblks;   /* Space in freed fastbin blocks (bytes) */
    size_t uordblks;  /* Total allocated space (bytes) */
    size_t fordblks;  /* Total free space (bytes) */
    size_t keepcost;  /* Top-most, releasable space (bytes) */
};

The mallinfo structure returned by the deprecated mallinfo() function is exactly the same, except that the fields are typed as int.

The structure fields contain the following information:

arena
The total amount of memory allocated by means other than mmap(2) (i.e., memory allocated on the heap). This figure includes both in-use blocks and blocks on the free list.

ordblks
The number of ordinary (i.e., non-fastbin) free blocks.

smblks
The number of fastbin free blocks (see mallopt(3)).

hblks
The number of blocks currently allocated using mmap(2). (See the discussion of M_MMAP_THRESHOLD in mallopt(3).)

hblkhd
The number of bytes in blocks currently allocated using mmap(2).

usmblks
This field is unused, and is always 0. Historically, it was the “highwater mark” for allocated space—that is, the maximum amount of space that was ever allocated (in bytes); this field was maintained only in nonthreading environments.

fsmblks
The total number of bytes in fastbin free blocks.

uordblks
The total number of bytes used by in-use allocations.

fordblks
The total number of bytes in free blocks.

keepcost
The total amount of releasable free space at the top of the heap. This is the maximum number of bytes that could ideally (i.e., ignoring page alignment restrictions, and so on) be released by malloc_trim(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mallinfo(), mallinfo2()

Thread safety

MT-Unsafe init const:mallopt

mallinfo()/ mallinfo2() would access some global internal objects. If modify them with non-atomically, may get inconsistent results. The identifier mallopt in const:mallopt mean that mallopt() would modify the global internal objects with atomics, that make sure mallinfo()/ mallinfo2() is safe enough, others modify with non-atomically maybe not.

STANDARDS

None.

HISTORY

mallinfo()
glibc 2.0. SVID.

mallinfo2()
glibc 2.33.

BUGS

Information is returned for only the main memory allocation area. Allocations in other arenas are excluded. See malloc_stats(3) and malloc_info(3) for alternatives that include information about other arenas.

The fields of the mallinfo structure that is returned by the older mallinfo() function are typed as int. However, because some internal bookkeeping values may be of type long, the reported values may wrap around zero and thus be inaccurate.

EXAMPLES

The program below employs mallinfo2() to retrieve memory allocation statistics before and after allocating and freeing some blocks of memory. The statistics are displayed on standard output.

The first two command-line arguments specify the number and size of blocks to be allocated with malloc(3).

The remaining three arguments specify which of the allocated blocks should be freed with free(3). These three arguments are optional, and specify (in order): the step size to be used in the loop that frees blocks (the default is 1, meaning free all blocks in the range); the ordinal position of the first block to be freed (default 0, meaning the first allocated block); and a number one greater than the ordinal position of the last block to be freed (default is one greater than the maximum block number). If these three arguments are omitted, then the defaults cause all allocated blocks to be freed.

In the following example run of the program, 1000 allocations of 100 bytes are performed, and then every second allocated block is freed:

$ ./a.out 1000 100 2
============== Before allocating blocks ==============
Total non-mmapped bytes (arena):       0
# of free chunks (ordblks):            1
# of free fastbin blocks (smblks):     0
# of mapped regions (hblks):           0
Bytes in mapped regions (hblkhd):      0
Max. total allocated space (usmblks):  0
Free bytes held in fastbins (fsmblks): 0
Total allocated space (uordblks):      0
Total free space (fordblks):           0
Topmost releasable block (keepcost):   0
============== After allocating blocks ==============
Total non-mmapped bytes (arena):       135168
# of free chunks (ordblks):            1
# of free fastbin blocks (smblks):     0
# of mapped regions (hblks):           0
Bytes in mapped regions (hblkhd):      0
Max. total allocated space (usmblks):  0
Free bytes held in fastbins (fsmblks): 0
Total allocated space (uordblks):      104000
Total free space (fordblks):           31168
Topmost releasable block (keepcost):   31168
============== After freeing blocks ==============
Total non-mmapped bytes (arena):       135168
# of free chunks (ordblks):            501
# of free fastbin blocks (smblks):     0
# of mapped regions (hblks):           0
Bytes in mapped regions (hblkhd):      0
Max. total allocated space (usmblks):  0
Free bytes held in fastbins (fsmblks): 0
Total allocated space (uordblks):      52000
Total free space (fordblks):           83168
Topmost releasable block (keepcost):   31168

Program source

#include <malloc.h>
#include <stdlib.h>
#include <string.h>
static void
display_mallinfo2(void)
{
    struct mallinfo2 mi;
    mi = mallinfo2();
    printf("Total non-mmapped bytes (arena):       %zu

“, mi.arena); printf(”# of free chunks (ordblks): %zu “, mi.ordblks); printf(”# of free fastbin blocks (smblks): %zu “, mi.smblks); printf(”# of mapped regions (hblks): %zu “, mi.hblks); printf(“Bytes in mapped regions (hblkhd): %zu “, mi.hblkhd); printf(“Max. total allocated space (usmblks): %zu “, mi.usmblks); printf(“Free bytes held in fastbins (fsmblks): %zu “, mi.fsmblks); printf(“Total allocated space (uordblks): %zu “, mi.uordblks); printf(“Total free space (fordblks): %zu “, mi.fordblks); printf(“Topmost releasable block (keepcost): %zu “, mi.keepcost); } int main(int argc, char *argv[]) { #define MAX_ALLOCS 2000000 char *alloc[MAX_ALLOCS]; size_t blockSize, numBlocks, freeBegin, freeEnd, freeStep; if (argc < 3 || strcmp(argv[1], “–help”) == 0) { fprintf(stderr, “%s num-blocks block-size [free-step " “[start-free [end-free]]] “, argv[0]); exit(EXIT_FAILURE); } numBlocks = atoi(argv[1]); blockSize = atoi(argv[2]); freeStep = (argc > 3) ? atoi(argv[3]) : 1; freeBegin = (argc > 4) ? atoi(argv[4]) : 0; freeEnd = (argc > 5) ? atoi(argv[5]) : numBlocks; printf("============== Before allocating blocks ============== “); display_mallinfo2(); for (size_t j = 0; j < numBlocks; j++) { if (numBlocks >= MAX_ALLOCS) { fprintf(stderr, “Too many allocations “); exit(EXIT_FAILURE); } alloc[j] = malloc(blockSize); if (alloc[j] == NULL) { perror(“malloc”); exit(EXIT_FAILURE); } } printf(” ============== After allocating blocks ============== “); display_mallinfo2(); for (size_t j = freeBegin; j < freeEnd; j += freeStep) free(alloc[j]); printf(” ============== After freeing blocks ============== “); display_mallinfo2(); exit(EXIT_SUCCESS); }

SEE ALSO

mmap(2), malloc(3), malloc_info(3), malloc_stats(3), malloc_trim(3), mallopt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

734 - Linux cli command minor

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command minor and provides detailed information about the command minor, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the minor.

NAME 🖥️ minor 🖥️

manage a device number

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/sysmacros.h>
dev_t makedev(unsigned int maj, unsigned int min);
unsigned int major(dev_t dev);
unsigned int minor(dev_t dev);

DESCRIPTION

A device ID consists of two parts: a major ID, identifying the class of the device, and a minor ID, identifying a specific instance of a device in that class. A device ID is represented using the type dev_t.

Given major and minor device IDs, makedev() combines these to produce a device ID, returned as the function result. This device ID can be given to mknod(2), for example.

The major() and minor() functions perform the converse task: given a device ID, they return, respectively, the major and minor components. These macros can be useful to, for example, decompose the device IDs in the structure returned by stat(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

makedev(), major(), minor()

Thread safetyMT-Safe

VERSIONS

The BSDs expose the definitions for these macros via <sys/types.h>.

STANDARDS

None.

HISTORY

BSD, HP-UX, Solaris, AIX, Irix.

These interfaces are defined as macros. Since glibc 2.3.3, they have been aliases for three GNU-specific functions: gnu_dev_makedev(), gnu_dev_major(), and gnu_dev_minor(). The latter names are exported, but the traditional names are more portable.

Depending on the version, glibc also exposes definitions for these macros from <sys/types.h> if suitable feature test macros are defined. However, this behavior was deprecated in glibc 2.25, and since glibc 2.28, <sys/types.h> no longer provides these definitions.

SEE ALSO

mknod(2), stat(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

735 - Linux cli command wcsncpy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcsncpy and provides detailed information about the command wcsncpy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcsncpy.

NAME 🖥️ wcsncpy 🖥️

copy a fixed-size string of wide characters

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
wchar_t *wcsncpy(wchar_t dest[restrict .n],
 const wchar_t src[restrict .n],
 size_t n);

DESCRIPTION

The wcsncpy() function is the wide-character equivalent of the strncpy(3) function. It copies at most n wide characters from the wide-character string pointed to by src, including the terminating null wide character (L’�’), to the array pointed to by dest. Exactly n wide characters are written at dest. If the length wcslen(src) is smaller than n, the remaining wide characters in the array pointed to by dest are filled with null wide characters. If the length wcslen(src) is greater than or equal to n, the string pointed to by dest will not be terminated by a null wide character.

The strings may not overlap.

The programmer must ensure that there is room for at least n wide characters at dest.

RETURN VALUE

wcsncpy() returns dest.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcsncpy()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

strncpy(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

736 - Linux cli command HTML_Entitiespm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_Entitiespm and provides detailed information about the command HTML_Entitiespm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_Entitiespm.

NAME 🖥️ HTML_Entitiespm 🖥️

Encode or decode strings with HTML entities

SYNOPSIS

use HTML::Entities; $a = “Våre norske tegn bør &#230res”; decode_entities($a); encode_entities($a, “\200-\377”);

For example, this:

$input = “vis-à-vis Beyoncés naïve papier-mâché résumé”; print encode_entities($input), " "

Prints this out:

vis-à-vis Beyoncés naïve papier-mâché résumé

DESCRIPTION

This module deals with encoding and decoding of strings with HTML character entities. The module provides the following functions:

decode_entities( $string, … )
This routine replaces HTML entities found in the $string with the corresponding Unicode character. Unrecognized entities are left alone. If multiple strings are provided as argument they are each decoded separately and the same number of strings are returned. If called in void context the arguments are decoded in-place. This routine is exported by default.

_decode_entities( $string, \entity2char )

_decode_entities( $string, \entity2char, $expand_prefix )

This will in-place replace HTML entities in $string. The %entity2char hash must be provided. Named entities not found in the %entity2char hash are left alone. Numeric entities are expanded unless their value overflow. The keys in %entity2char are the entity names to be expanded and their values are what they should expand into. The values do not have to be single character strings. If a key has “;” as suffix, then occurrences in $string are only expanded if properly terminated with “;”. Entities without “;” will be expanded regardless of how they are terminated for compatibility with how common browsers treat entities in the Latin-1 range. If $expand_prefix is TRUE then entities without trailing “;” in %entity2char will even be expanded as a prefix of a longer unrecognized name. The longest matching name in %entity2char will be used. This is mainly present for compatibility with an MSIE misfeature. $string = “foo&nbspbar”; _decode_entities($string, { nb => “@”, nbsp => “�” }, 1); print $string; # will print “foo bar” This routine is exported by default.

encode_entities( $string )

encode_entities( $string, $unsafe_chars )

This routine replaces unsafe characters in $string with their entity representation. A second argument can be given to specify which characters to consider unsafe. The unsafe characters is specified using the regular expression character class syntax (what you find within brackets in regular expressions). The default set of characters to encode are control chars, high-bit chars, and the <, &, >, and " characters. But this, for example, would encode just the <, &, >, and " characters: $encoded = encode_entities($input, <>&"); and this would only encode non-plain ASCII: $encoded = encode_entities($input, ^ -%’-~); This routine is exported by default.

encode_entities_numeric( $string )

encode_entities_numeric( $string, $unsafe_chars )

This routine works just like encode_entities, except that the replacement entities are always &#xhexnum; and never &entname;. For example, encode_entities("r�le") returns “rôle”, but encode_entities_numeric("r�le") returns “rôle”. This routine is not exported by default. But you can always export it with use HTML::Entities qw(encode_entities_numeric); or even use HTML::Entities qw(:DEFAULT encode_entities_numeric);

All these routines modify the string passed as the first argument, if called in a void context. In scalar and array contexts, the encoded or decoded string is returned (without changing the input string).

If you prefer not to import these routines into your namespace, you can call them as:

use HTML::Entities (); $decoded = HTML::Entities::decode($a); $encoded = HTML::Entities::encode($a); $encoded = HTML::Entities::encode_numeric($a);

The module can also export the %char2entity and the %entity2char hashes, which contain the mapping from all characters to the corresponding entities (and vice versa, respectively).

COPYRIGHT

Copyright 1995-2006 Gisle Aas. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

737 - Linux cli command LWP_Simplepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LWP_Simplepm and provides detailed information about the command LWP_Simplepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LWP_Simplepm.

NAME 🖥️ LWP_Simplepm 🖥️

simple procedural interface to LWP

SYNOPSIS

perl -MLWP::Simple -e getprint “http://www.sn.no” use LWP::Simple; $content = get(“http://www.sn.no/"); die “Couldnt get it!” unless defined $content; if (mirror(“http://www.sn.no/", “foo”) == RC_NOT_MODIFIED) { … } if (is_success(getprint(“http://www.sn.no/"))) { … }

DESCRIPTION

This module is meant for people who want a simplified view of the libwww-perl library. It should also be suitable for one-liners. If you need more control or access to the header fields in the requests sent and responses received, then you should use the full object-oriented interface provided by the LWP::UserAgent module.

The module will also export the LWP::UserAgent object as $ua if you ask for it explicitly.

The user agent created by this module will identify itself as LWP::Simple/#.## and will initialize its proxy defaults from the environment (by calling $ua->env_proxy).

FUNCTIONS

The following functions are provided (and exported) by this module:

get

my $res = get($url);

The get() function will fetch the document identified by the given URL and return it. It returns undef if it fails. The $url argument can be either a string or a reference to a URI object.

You will not be able to examine the response code or response headers (like Content-Type) when you are accessing the web using this function. If you need that information you should use the full OO interface (see LWP::UserAgent).

my $res = head($url);

Get document headers. Returns the following 5 values if successful: ($content_type, $document_length, $modified_time, $expires, $server)

Returns an empty list if it fails. In scalar context returns TRUE if successful.

getprint

my $code = getprint($url);

Get and print a document identified by a URL. The document is printed to the selected default filehandle for output (normally STDOUT) as data is received from the network. If the request fails, then the status code and message are printed on STDERR. The return value is the HTTP response code.

getstore

my $code = getstore($url, $file) my $code = getstore($url, $filehandle)

Gets a document identified by a URL and stores it in the file. The return value is the HTTP response code. You may also pass a writeable filehandle or similar, such as a File::Temp object.

mirror

my $code = mirror($url, $file);

Get and store a document identified by a URL, using If-modified-since, and checking the Content-Length. Returns the HTTP response code.

STATUS CONSTANTS

This module also exports the HTTP::Status constants and procedures. You can use them when you check the response code from “getprint” in LWP::Simple, “getstore” in LWP::Simple or “mirror” in LWP::Simple. The constants are:

RC_CONTINUE RC_SWITCHING_PROTOCOLS RC_OK RC_CREATED RC_ACCEPTED RC_NON_AUTHORITATIVE_INFORMATION RC_NO_CONTENT RC_RESET_CONTENT RC_PARTIAL_CONTENT RC_MULTIPLE_CHOICES RC_MOVED_PERMANENTLY RC_MOVED_TEMPORARILY RC_SEE_OTHER RC_NOT_MODIFIED RC_USE_PROXY RC_BAD_REQUEST RC_UNAUTHORIZED RC_PAYMENT_REQUIRED RC_FORBIDDEN RC_NOT_FOUND RC_METHOD_NOT_ALLOWED RC_NOT_ACCEPTABLE RC_PROXY_AUTHENTICATION_REQUIRED RC_REQUEST_TIMEOUT RC_CONFLICT RC_GONE RC_LENGTH_REQUIRED RC_PRECONDITION_FAILED RC_REQUEST_ENTITY_TOO_LARGE RC_REQUEST_URI_TOO_LARGE RC_UNSUPPORTED_MEDIA_TYPE RC_INTERNAL_SERVER_ERROR RC_NOT_IMPLEMENTED RC_BAD_GATEWAY RC_SERVICE_UNAVAILABLE RC_GATEWAY_TIMEOUT RC_HTTP_VERSION_NOT_SUPPORTED

CLASSIFICATION FUNCTIONS

The HTTP::Status classification functions are:

is_success

my $bool = is_success($rc);

True if response code indicated a successful request.

is_error

my $bool = is_error($rc)

True if response code indicated that an error occurred.

CAVEAT

Note that if you are using both LWP::Simple and the very popular CGI module, you may be importing a head function from each module, producing a warning like Prototype mismatch: sub main::head ($) vs none. Get around this problem by just not importing LWP::Simple’s head function, like so:

use LWP::Simple qw(!head); use CGI qw(:standard); # then only CGI.pm defines a head()

Then if you do need LWP::Simple’s head function, you can just call it as LWP::Simple::head($url).

SEE ALSO

LWP, lwpcook, LWP::UserAgent, HTTP::Status, lwp-request, lwp-mirror

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

738 - Linux cli command mallopt

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mallopt and provides detailed information about the command mallopt, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mallopt.

NAME 🖥️ mallopt 🖥️

set memory allocation parameters

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <malloc.h>
int mallopt(int param, int value);

DESCRIPTION

The mallopt() function adjusts parameters that control the behavior of the memory-allocation functions (see malloc(3)). The param argument specifies the parameter to be modified, and value specifies the new value for that parameter.

The following values can be specified for param:

M_ARENA_MAX
If this parameter has a nonzero value, it defines a hard limit on the maximum number of arenas that can be created. An arena represents a pool of memory that can be used by malloc(3) (and similar) calls to service allocation requests. Arenas are thread safe and therefore may have multiple concurrent memory requests. The trade-off is between the number of threads and the number of arenas. The more arenas you have, the lower the per-thread contention, but the higher the memory usage.

The default value of this parameter is 0, meaning that the limit on the number of arenas is determined according to the setting of M_ARENA_TEST.

This parameter has been available since glibc 2.10 via –enable-experimental-malloc, and since glibc 2.15 by default. In some versions of the allocator there was no limit on the number of created arenas (e.g., CentOS 5, RHEL 5).

When employing newer glibc versions, applications may in some cases exhibit high contention when accessing arenas. In these cases, it may be beneficial to increase M_ARENA_MAX to match the number of threads. This is similar in behavior to strategies taken by tcmalloc and jemalloc (e.g., per-thread allocation pools).

M_ARENA_TEST
This parameter specifies a value, in number of arenas created, at which point the system configuration will be examined to determine a hard limit on the number of created arenas. (See M_ARENA_MAX for the definition of an arena.)

The computation of the arena hard limit is implementation-defined and is usually calculated as a multiple of the number of available CPUs. Once the hard limit is computed, the result is final and constrains the total number of arenas.

The default value for the M_ARENA_TEST parameter is 2 on systems where sizeof(long) is 4; otherwise the default value is 8.

This parameter has been available since glibc 2.10 via –enable-experimental-malloc, and since glibc 2.15 by default.

The value of M_ARENA_TEST is not used when M_ARENA_MAX has a nonzero value.

M_CHECK_ACTION
Setting this parameter controls how glibc responds when various kinds of programming errors are detected (e.g., freeing the same pointer twice). The 3 least significant bits (2, 1, and 0) of the value assigned to this parameter determine the glibc behavior, as follows:

Bit 0
If this bit is set, then print a one-line message on stderr that provides details about the error. The message starts with the string “*** glibc detected ***”, followed by the program name, the name of the memory-allocation function in which the error was detected, a brief description of the error, and the memory address where the error was detected.

Bit 1
If this bit is set, then, after printing any error message specified by bit 0, the program is terminated by calling abort(3). Since glibc 2.4, if bit 0 is also set, then, between printing the error message and aborting, the program also prints a stack trace in the manner of backtrace(3), and prints the process’s memory mapping in the style of /proc/pid/maps (see proc(5)).

Bit 2 (since glibc 2.4)
This bit has an effect only if bit 0 is also set. If this bit is set, then the one-line message describing the error is simplified to contain just the name of the function where the error was detected and the brief description of the error.

The remaining bits in value are ignored.

Combining the above details, the following numeric values are meaningful for M_CHECK_ACTION:

0
Ignore error conditions; continue execution (with undefined results).

1
Print a detailed error message and continue execution.

2
Abort the program.

3
Print detailed error message, stack trace, and memory mappings, and abort the program.

5
Print a simple error message and continue execution.

7
Print simple error message, stack trace, and memory mappings, and abort the program.

Since glibc 2.3.4, the default value for the M_CHECK_ACTION parameter is 3. In glibc 2.3.3 and earlier, the default value is 1.

Using a nonzero M_CHECK_ACTION value can be useful because otherwise a crash may happen much later, and the true cause of the problem is then very hard to track down.

M_MMAP_MAX
This parameter specifies the maximum number of allocation requests that may be simultaneously serviced using mmap(2). This parameter exists because some systems have a limited number of internal tables for use by mmap(2), and using more than a few of them may degrade performance.

The default value is 65,536, a value which has no special significance and which serves only as a safeguard. Setting this parameter to 0 disables the use of mmap(2) for servicing large allocation requests.

M_MMAP_THRESHOLD
For allocations greater than or equal to the limit specified (in bytes) by M_MMAP_THRESHOLD that can’t be satisfied from the free list, the memory-allocation functions employ mmap(2) instead of increasing the program break using sbrk(2).

Allocating memory using mmap(2) has the significant advantage that the allocated memory blocks can always be independently released back to the system. (By contrast, the heap can be trimmed only if memory is freed at the top end.) On the other hand, there are some disadvantages to the use of mmap(2): deallocated space is not placed on the free list for reuse by later allocations; memory may be wasted because mmap(2) allocations must be page-aligned; and the kernel must perform the expensive task of zeroing out memory allocated via mmap(2). Balancing these factors leads to a default setting of 128*1024 for the M_MMAP_THRESHOLD parameter.

The lower limit for this parameter is 0. The upper limit is DEFAULT_MMAP_THRESHOLD_MAX: 512*1024 on 32-bit systems or 4*1024*1024*sizeof(long) on 64-bit systems.

Note: Nowadays, glibc uses a dynamic mmap threshold by default. The initial value of the threshold is 128*1024, but when blocks larger than the current threshold and less than or equal to DEFAULT_MMAP_THRESHOLD_MAX are freed, the threshold is adjusted upward to the size of the freed block. When dynamic mmap thresholding is in effect, the threshold for trimming the heap is also dynamically adjusted to be twice the dynamic mmap threshold. Dynamic adjustment of the mmap threshold is disabled if any of the M_TRIM_THRESHOLD, M_TOP_PAD, M_MMAP_THRESHOLD, or M_MMAP_MAX parameters is set.

M_MXFAST (since glibc 2.3)
Set the upper limit for memory allocation requests that are satisfied using “fastbins”. (The measurement unit for this parameter is bytes.) Fastbins are storage areas that hold deallocated blocks of memory of the same size without merging adjacent free blocks. Subsequent reallocation of blocks of the same size can be handled very quickly by allocating from the fastbin, although memory fragmentation and the overall memory footprint of the program can increase.

The default value for this parameter is 64*sizeof(size_t)/4 (i.e., 64 on 32-bit architectures). The range for this parameter is 0 to 80*sizeof(size_t)/4. Setting M_MXFAST to 0 disables the use of fastbins.

M_PERTURB (since glibc 2.4)
If this parameter is set to a nonzero value, then bytes of allocated memory (other than allocations via calloc(3)) are initialized to the complement of the value in the least significant byte of value, and when allocated memory is released using free(3), the freed bytes are set to the least significant byte of value. This can be useful for detecting errors where programs incorrectly rely on allocated memory being initialized to zero, or reuse values in memory that has already been freed.

The default value for this parameter is 0.

M_TOP_PAD
This parameter defines the amount of padding to employ when calling sbrk(2) to modify the program break. (The measurement unit for this parameter is bytes.) This parameter has an effect in the following circumstances:

  • When the program break is increased, then M_TOP_PAD bytes are added to the sbrk(2) request.

  • When the heap is trimmed as a consequence of calling free(3) (see the discussion of M_TRIM_THRESHOLD) this much free space is preserved at the top of the heap.

In either case, the amount of padding is always rounded to a system page boundary.

Modifying M_TOP_PAD is a trade-off between increasing the number of system calls (when the parameter is set low) and wasting unused memory at the top of the heap (when the parameter is set high).

The default value for this parameter is 128*1024.

M_TRIM_THRESHOLD
When the amount of contiguous free memory at the top of the heap grows sufficiently large, free(3) employs sbrk(2) to release this memory back to the system. (This can be useful in programs that continue to execute for a long period after freeing a significant amount of memory.) The M_TRIM_THRESHOLD parameter specifies the minimum size (in bytes) that this block of memory must reach before sbrk(2) is used to trim the heap.

The default value for this parameter is 128*1024. Setting M_TRIM_THRESHOLD to -1 disables trimming completely.

Modifying M_TRIM_THRESHOLD is a trade-off between increasing the number of system calls (when the parameter is set low) and wasting unused memory at the top of the heap (when the parameter is set high).

Environment variables

A number of environment variables can be defined to modify some of the same parameters as are controlled by mallopt(). Using these variables has the advantage that the source code of the program need not be changed. To be effective, these variables must be defined before the first call to a memory-allocation function. (If the same parameters are adjusted via mallopt(), then the mallopt() settings take precedence.) For security reasons, these variables are ignored in set-user-ID and set-group-ID programs.

The environment variables are as follows (note the trailing underscore at the end of the name of some variables):

MALLOC_ARENA_MAX
Controls the same parameter as mallopt() M_ARENA_MAX.

MALLOC_ARENA_TEST
Controls the same parameter as mallopt() M_ARENA_TEST.

MALLOC_CHECK_
This environment variable controls the same parameter as mallopt() M_CHECK_ACTION. If this variable is set to a nonzero value, then a special implementation of the memory-allocation functions is used. (This is accomplished using the malloc_hook(3) feature.) This implementation performs additional error checking, but is slower than the standard set of memory-allocation functions. (This implementation does not detect all possible errors; memory leaks can still occur.)

The value assigned to this environment variable should be a single digit, whose meaning is as described for M_CHECK_ACTION. Any characters beyond the initial digit are ignored.

For security reasons, the effect of MALLOC_CHECK_ is disabled by default for set-user-ID and set-group-ID programs. However, if the file /etc/suid-debug exists (the content of the file is irrelevant), then MALLOC_CHECK_ also has an effect for set-user-ID and set-group-ID programs.

MALLOC_MMAP_MAX_
Controls the same parameter as mallopt() M_MMAP_MAX.

MALLOC_MMAP_THRESHOLD_
Controls the same parameter as mallopt() M_MMAP_THRESHOLD.

MALLOC_PERTURB_
Controls the same parameter as mallopt() M_PERTURB.

MALLOC_TRIM_THRESHOLD_
Controls the same parameter as mallopt() M_TRIM_THRESHOLD.

MALLOC_TOP_PAD_
Controls the same parameter as mallopt() M_TOP_PAD.

RETURN VALUE

On success, mallopt() returns 1. On error, it returns 0.

ERRORS

On error, errno is not set.

VERSIONS

A similar function exists on many System V derivatives, but the range of values for param varies across systems. The SVID defined options M_MXFAST, M_NLBLKS, M_GRAIN, and M_KEEP, but only the first of these is implemented in glibc.

STANDARDS

None.

HISTORY

glibc 2.0.

BUGS

Specifying an invalid value for param does not generate an error.

A calculation error within the glibc implementation means that a call of the form:

mallopt(M_MXFAST, n)

does not result in fastbins being employed for all allocations of size up to n. To ensure desired results, n should be rounded up to the next multiple greater than or equal to (2k+1)*sizeof(size_t), where k is an integer.

If mallopt() is used to set M_PERTURB, then, as expected, the bytes of allocated memory are initialized to the complement of the byte in value, and when that memory is freed, the bytes of the region are initialized to the byte specified in value. However, there is an off-by-sizeof(size_t) error in the implementation: instead of initializing precisely the block of memory being freed by the call free(p), the block starting at p+sizeof(size_t) is initialized.

EXAMPLES

The program below demonstrates the use of M_CHECK_ACTION. If the program is supplied with an (integer) command-line argument, then that argument is used to set the M_CHECK_ACTION parameter. The program then allocates a block of memory, and frees it twice (an error).

The following shell session shows what happens when we run this program under glibc, with the default value for M_CHECK_ACTION:

$ ./a.out
main(): returned from first free() call
*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***
======= Backtrace: =========
/lib/libc.so.6(+0x6c501)[0x523501]
/lib/libc.so.6(+0x6dd70)[0x524d70]
/lib/libc.so.6(cfree+0x6d)[0x527e5d]
./a.out[0x80485db]
/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7]
./a.out[0x8048471]
======= Memory map: ========
001e4000-001fe000 r-xp 00000000 08:06 1083555    /lib/libgcc_s.so.1
001fe000-001ff000 r--p 00019000 08:06 1083555    /lib/libgcc_s.so.1
[some lines omitted]
b7814000-b7817000 rw-p 00000000 00:00 0
bff53000-bff74000 rw-p 00000000 00:00 0          [stack]
Aborted (core dumped)

The following runs show the results when employing other values for M_CHECK_ACTION:

$ ./a.out 1             # Diagnose error and continue
main(): returned from first free() call
*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***
main(): returned from second free() call
$ ./a.out 2             # Abort without error message
main(): returned from first free() call
Aborted (core dumped)
$ ./a.out 0             # Ignore error and continue
main(): returned from first free() call
main(): returned from second free() call

The next run shows how to set the same parameter using the MALLOC_CHECK_ environment variable:

$ MALLOC_CHECK_=1 ./a.out
main(): returned from first free() call
*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***
main(): returned from second free() call

Program source

#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
    char *p;
    if (argc > 1) {
        if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {
            fprintf(stderr, "mallopt() failed");
            exit(EXIT_FAILURE);
        }
    }
    p = malloc(1000);
    if (p == NULL) {
        fprintf(stderr, "malloc() failed");
        exit(EXIT_FAILURE);
    }
    free(p);
    printf("%s(): returned from first free() call

“, func); free(p); printf("%s(): returned from second free() call “, func); exit(EXIT_SUCCESS); }

SEE ALSO

mmap(2), sbrk(2), mallinfo(3), malloc(3), malloc_hook(3), malloc_info(3), malloc_stats(3), malloc_trim(3), mcheck(3), mtrace(3), posix_memalign(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

739 - Linux cli command mkfifo

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mkfifo and provides detailed information about the command mkfifo, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mkfifo.

NAME 🖥️ mkfifo 🖥️

make a FIFO special file (a named pipe)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <sys/stat.h>
int mkfifo(const char *pathname, mode_t mode);
#include <fcntl.h> /* Definition of AT_* constants */
#include <sys/stat.h>
int mkfifoat(int dirfd, const char *pathname, mode_t mode);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

mkfifoat():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _ATFILE_SOURCE

DESCRIPTION

mkfifo() makes a FIFO special file with name pathname. mode specifies the FIFO’s permissions. It is modified by the process’s umask in the usual way: the permissions of the created file are **(**mode & ~umask).

A FIFO special file is similar to a pipe, except that it is created in a different way. Instead of being an anonymous communications channel, a FIFO special file is entered into the filesystem by calling mkfifo().

Once you have created a FIFO special file in this way, any process can open it for reading or writing, in the same way as an ordinary file. However, it has to be open at both ends simultaneously before you can proceed to do any input or output operations on it. Opening a FIFO for reading normally blocks until some other process opens the same FIFO for writing, and vice versa. See fifo(7) for nonblocking handling of FIFO special files.

mkfifoat()

The mkfifoat() function operates in exactly the same way as mkfifo(), except for the differences described here.

If the pathname given in pathname is relative, then it is interpreted relative to the directory referred to by the file descriptor dirfd (rather than relative to the current working directory of the calling process, as is done by mkfifo() for a relative pathname).

If pathname is relative and dirfd is the special value AT_FDCWD, then pathname is interpreted relative to the current working directory of the calling process (like mkfifo()).

If pathname is absolute, then dirfd is ignored.

See openat(2) for an explanation of the need for mkfifoat().

RETURN VALUE

On success mkfifo() and mkfifoat() return 0. On error, -1 is returned and errno is set to indicate the error.

ERRORS

EACCES
One of the directories in pathname did not allow search (execute) permission.

EBADF
(mkfifoat()) pathname is relative but dirfd is neither AT_FDCWD nor a valid file descriptor.

EDQUOT
The user’s quota of disk blocks or inodes on the filesystem has been exhausted.

EEXIST
pathname already exists. This includes the case where pathname is a symbolic link, dangling or not.

ENAMETOOLONG
Either the total length of pathname is greater than PATH_MAX, or an individual filename component has a length greater than NAME_MAX. In the GNU system, there is no imposed limit on overall filename length, but some filesystems may place limits on the length of a component.

ENOENT
A directory component in pathname does not exist or is a dangling symbolic link.

ENOSPC
The directory or filesystem has no room for the new file.

ENOTDIR
A component used as a directory in pathname is not, in fact, a directory.

ENOTDIR
(mkfifoat()) pathname is a relative pathname and dirfd is a file descriptor referring to a file other than a directory.

EROFS
pathname refers to a read-only filesystem.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mkfifo(), mkfifoat()

Thread safetyMT-Safe

VERSIONS

It is implemented using mknodat(2).

STANDARDS

POSIX.1-2008.

HISTORY

mkfifo()
POSIX.1-2001.

mkfifoat()
glibc 2.4. POSIX.1-2008.

SEE ALSO

mkfifo(1), close(2), open(2), read(2), stat(2), umask(2), write(2), fifo(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

740 - Linux cli command nftw

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command nftw and provides detailed information about the command nftw, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the nftw.

NAME 🖥️ nftw 🖥️

file tree walk

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ftw.h>
int nftw(const char *dirpath,
 int (*fn)(const char *fpath, const struct stat *sb,
 int typeflag, struct FTW *ftwbuf),
 int nopenfd, int flags);
[[deprecated]]
int ftw(const char *dirpath,
 int (*fn)(const char *fpath, const struct stat *sb,
 int typeflag),
 int nopenfd);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

nftw():

    _XOPEN_SOURCE >= 500

DESCRIPTION

nftw() walks through the directory tree that is located under the directory dirpath, and calls fn() once for each entry in the tree. By default, directories are handled before the files and subdirectories they contain (preorder traversal).

To avoid using up all of the calling process’s file descriptors, nopenfd specifies the maximum number of directories that nftw() will hold open simultaneously. When the search depth exceeds this, nftw() will become slower because directories have to be closed and reopened. nftw() uses at most one file descriptor for each level in the directory tree.

For each entry found in the tree, nftw() calls fn() with four arguments: fpath, sb, typeflag, and ftwbuf. fpath is the pathname of the entry, and is expressed either as a pathname relative to the calling process’s current working directory at the time of the call to nftw(), if dirpath was expressed as a relative pathname, or as an absolute pathname, if dirpath was expressed as an absolute pathname. sb is a pointer to the stat structure returned by a call to stat(2) for fpath.

The typeflag argument passed to fn() is an integer that has one of the following values:

FTW_F
fpath is a regular file.

FTW_D
fpath is a directory.

FTW_DNR
fpath is a directory which can’t be read.

FTW_DP
fpath is a directory, and FTW_DEPTH was specified in flags. (If FTW_DEPTH was not specified in flags, then directories will always be visited with typeflag set to FTW_D.) All of the files and subdirectories within fpath have been processed.

FTW_NS
The stat(2) call failed on fpath, which is not a symbolic link. The probable cause for this is that the caller had read permission on the parent directory, so that the filename fpath could be seen, but did not have execute permission, so that the file could not be reached for stat(2). The contents of the buffer pointed to by sb are undefined.

FTW_SL
fpath is a symbolic link, and FTW_PHYS was set in flags.

FTW_SLN
fpath is a symbolic link pointing to a nonexistent file. (This occurs only if FTW_PHYS is not set.) In this case the sb argument passed to fn() contains information returned by performing lstat(2) on the “dangling” symbolic link. (But see BUGS.)

The fourth argument (ftwbuf) that nftw() supplies when calling fn() is a pointer to a structure of type FTW:

struct FTW {
    int base;
    int level;
};

base is the offset of the filename (i.e., basename component) in the pathname given in fpath. level is the depth of fpath in the directory tree, relative to the root of the tree (dirpath, which has depth 0).

To stop the tree walk, fn() returns a nonzero value; this value will become the return value of nftw(). As long as fn() returns 0, nftw() will continue either until it has traversed the entire tree, in which case it will return zero, or until it encounters an error (such as a malloc(3) failure), in which case it will return -1.

Because nftw() uses dynamic data structures, the only safe way to exit out of a tree walk is to return a nonzero value from fn(). To allow a signal to terminate the walk without causing a memory leak, have the handler set a global flag that is checked by fn(). Don’t use longjmp(3) unless the program is going to terminate.

The flags argument of nftw() is formed by ORing zero or more of the following flags:

FTW_ACTIONRETVAL (since glibc 2.3.3)
If this glibc-specific flag is set, then nftw() handles the return value from fn() differently. fn() should return one of the following values:

FTW_CONTINUE
Instructs nftw() to continue normally.

FTW_SKIP_SIBLINGS
If fn() returns this value, then siblings of the current entry will be skipped, and processing continues in the parent.

FTW_SKIP_SUBTREE
If fn() is called with an entry that is a directory (typeflag is FTW_D), this return value will prevent objects within that directory from being passed as arguments to fn(). nftw() continues processing with the next sibling of the directory.

FTW_STOP
Causes nftw() to return immediately with the return value FTW_STOP.

Other return values could be associated with new actions in the future; fn() should not return values other than those listed above.

The feature test macro _GNU_SOURCE must be defined (before including any header files) in order to obtain the definition of FTW_ACTIONRETVAL from <ftw.h>.

FTW_CHDIR
If set, do a chdir(2) to each directory before handling its contents. This is useful if the program needs to perform some action in the directory in which fpath resides. (Specifying this flag has no effect on the pathname that is passed in the fpath argument of fn.)

FTW_DEPTH
If set, do a post-order traversal, that is, call fn() for the directory itself after handling the contents of the directory and its subdirectories. (By default, each directory is handled before its contents.)

FTW_MOUNT
If set, stay within the same filesystem (i.e., do not cross mount points).

FTW_PHYS
If set, do not follow symbolic links. (This is what you want.) If not set, symbolic links are followed, but no file is reported twice.

If FTW_PHYS is not set, but FTW_DEPTH is set, then the function fn() is never called for a directory that would be a descendant of itself.

ftw()

ftw() is an older function that offers a subset of the functionality of nftw(). The notable differences are as follows:

  • ftw() has no flags argument. It behaves the same as when nftw() is called with flags specified as zero.

  • The callback function, fn(), is not supplied with a fourth argument.

  • The range of values that is passed via the typeflag argument supplied to fn() is smaller: just FTW_F, FTW_D, FTW_DNR, FTW_NS, and (possibly) FTW_SL.

RETURN VALUE

These functions return 0 on success, and -1 if an error occurs.

If fn() returns nonzero, then the tree walk is terminated and the value returned by fn() is returned as the result of ftw() or nftw().

If nftw() is called with the FTW_ACTIONRETVAL flag, then the only nonzero value that should be used by fn() to terminate the tree walk is FTW_STOP, and that value is returned as the result of nftw().

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

nftw()

Thread safetyMT-Safe cwd

ftw()

Thread safetyMT-Safe

VERSIONS

In some implementations (e.g., glibc), ftw() will never use FTW_SL; on other systems FTW_SL occurs only for symbolic links that do not point to an existing file; and again on other systems ftw() will use FTW_SL for each symbolic link. If fpath is a symbolic link and stat(2) failed, POSIX.1-2008 states that it is undefined whether FTW_NS or FTW_SL is passed in typeflag. For predictable results, use nftw().

STANDARDS

POSIX.1-2008.

HISTORY

ftw()
POSIX.1-2001, SVr4, SUSv1. POSIX.1-2008 marks it as obsolete.

nftw()
glibc 2.1. POSIX.1-2001, SUSv1.

FTW_SL
POSIX.1-2001, SUSv1.

NOTES

POSIX.1-2008 notes that the results are unspecified if fn does not preserve the current working directory.

BUGS

According to POSIX.1-2008, when the typeflag argument passed to fn() contains FTW_SLN, the buffer pointed to by sb should contain information about the dangling symbolic link (obtained by calling lstat(2) on the link). Early glibc versions correctly followed the POSIX specification on this point. However, as a result of a regression introduced in glibc 2.4, the contents of the buffer pointed to by sb were undefined when FTW_SLN is passed in typeflag. (More precisely, the contents of the buffer were left unchanged in this case.) This regression was eventually fixed in glibc 2.30, so that the glibc implementation (once more) follows the POSIX specification.

EXAMPLES

The following program traverses the directory tree under the path named in its first command-line argument, or under the current directory if no argument is supplied. It displays various information about each file. The second command-line argument can be used to specify characters that control the value assigned to the flags argument when calling nftw().

Program source

#define _XOPEN_SOURCE 500
#include <ftw.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static int
display_info(const char *fpath, const struct stat *sb,
             int tflag, struct FTW *ftwbuf)
{
    printf("%-3s %2d ",
           (tflag == FTW_D) ?   "d"   : (tflag == FTW_DNR) ? "dnr" :
           (tflag == FTW_DP) ?  "dp"  : (tflag == FTW_F) ?   "f" :
           (tflag == FTW_NS) ?  "ns"  : (tflag == FTW_SL) ?  "sl" :
           (tflag == FTW_SLN) ? "sln" : "???",
           ftwbuf->level);
    if (tflag == FTW_NS)
        printf("-------");
    else
        printf("%7jd", (intmax_t) sb->st_size);
    printf("   %-40s %d %s

“, fpath, ftwbuf->base, fpath + ftwbuf->base); return 0; /* To tell nftw() to continue */ } int main(int argc, char *argv[]) { int flags = 0; if (argc > 2 && strchr(argv[2], ’d’) != NULL) flags |= FTW_DEPTH; if (argc > 2 && strchr(argv[2], ‘p’) != NULL) flags |= FTW_PHYS; if (nftw((argc < 2) ? “.” : argv[1], display_info, 20, flags) == -1) { perror(“nftw”); exit(EXIT_FAILURE); } exit(EXIT_SUCCESS); }

SEE ALSO

stat(2), fts(3), readdir(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

741 - Linux cli command reallocarray

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command reallocarray and provides detailed information about the command reallocarray, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the reallocarray.

NAME 🖥️ reallocarray 🖥️

allocate and free dynamic memory

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
void *malloc(size_t size);
void free(void *_Nullable ptr);
void *calloc(size_t nmemb, size_t size);
void *realloc(void *_Nullable ptr, size_t size);
void *reallocarray(void *_Nullable ptr, size_t nmemb, size_t size);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

reallocarray():

    Since glibc 2.29:
        _DEFAULT_SOURCE
    glibc 2.28 and earlier:
        _GNU_SOURCE

DESCRIPTION

malloc()

The malloc() function allocates size bytes and returns a pointer to the allocated memory. The memory is not initialized. If size is 0, then malloc() returns a unique pointer value that can later be successfully passed to free(). (See “Nonportable behavior” for portability issues.)

free()

The free() function frees the memory space pointed to by ptr, which must have been returned by a previous call to malloc() or related functions. Otherwise, or if ptr has already been freed, undefined behavior occurs. If ptr is NULL, no operation is performed.

calloc()

The calloc() function allocates memory for an array of nmemb elements of size bytes each and returns a pointer to the allocated memory. The memory is set to zero. If nmemb or size is 0, then calloc() returns a unique pointer value that can later be successfully passed to free().

If the multiplication of nmemb and size would result in integer overflow, then calloc() returns an error. By contrast, an integer overflow would not be detected in the following call to malloc(), with the result that an incorrectly sized block of memory would be allocated:

malloc(nmemb * size);

realloc()

The realloc() function changes the size of the memory block pointed to by ptr to size bytes. The contents of the memory will be unchanged in the range from the start of the region up to the minimum of the old and new sizes. If the new size is larger than the old size, the added memory will not be initialized.

If ptr is NULL, then the call is equivalent to malloc(size), for all values of size.

If size is equal to zero, and ptr is not NULL, then the call is equivalent to free(ptr) (but see “Nonportable behavior” for portability issues).

Unless ptr is NULL, it must have been returned by an earlier call to malloc or related functions. If the area pointed to was moved, a free(ptr) is done.

reallocarray()

The reallocarray() function changes the size of (and possibly moves) the memory block pointed to by ptr to be large enough for an array of nmemb elements, each of which is size bytes. It is equivalent to the call

realloc(ptr, nmemb * size);

However, unlike that realloc() call, reallocarray() fails safely in the case where the multiplication would overflow. If such an overflow occurs, reallocarray() returns an error.

RETURN VALUE

The malloc(), calloc(), realloc(), and reallocarray() functions return a pointer to the allocated memory, which is suitably aligned for any type that fits into the requested size or less. On error, these functions return NULL and set errno. Attempting to allocate more than PTRDIFF_MAX bytes is considered an error, as an object that large could cause later pointer subtraction to overflow.

The free() function returns no value, and preserves errno.

The realloc() and reallocarray() functions return NULL if ptr is not NULL and the requested size is zero; this is not considered an error. (See “Nonportable behavior” for portability issues.) Otherwise, the returned pointer may be the same as ptr if the allocation was not moved (e.g., there was room to expand the allocation in-place), or different from ptr if the allocation was moved to a new address. If these functions fail, the original block is left untouched; it is not freed or moved.

ERRORS

calloc(), malloc(), realloc(), and reallocarray() can fail with the following error:

ENOMEM
Out of memory. Possibly, the application hit the RLIMIT_AS or RLIMIT_DATA limit described in getrlimit(2). Another reason could be that the number of mappings created by the caller process exceeded the limit specified by /proc/sys/vm/max_map_count.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

malloc(), free(), calloc(), realloc()

Thread safetyMT-Safe

STANDARDS

malloc()
free()
calloc()
realloc()
C11, POSIX.1-2008.

reallocarray()
None.

HISTORY

malloc()
free()
calloc()
realloc()
POSIX.1-2001, C89.

reallocarray()
glibc 2.26. OpenBSD 5.6, FreeBSD 11.0.

malloc() and related functions rejected sizes greater than PTRDIFF_MAX starting in glibc 2.30.

free() preserved errno starting in glibc 2.33.

NOTES

By default, Linux follows an optimistic memory allocation strategy. This means that when malloc() returns non-NULL there is no guarantee that the memory really is available. In case it turns out that the system is out of memory, one or more processes will be killed by the OOM killer. For more information, see the description of /proc/sys/vm/overcommit_memory and /proc/sys/vm/oom_adj in proc(5), and the Linux kernel source file Documentation/vm/overcommit-accounting.rst.

Normally, malloc() allocates memory from the heap, and adjusts the size of the heap as required, using sbrk(2). When allocating blocks of memory larger than MMAP_THRESHOLD bytes, the glibc malloc() implementation allocates the memory as a private anonymous mapping using mmap(2). MMAP_THRESHOLD is 128 kB by default, but is adjustable using mallopt(3). Prior to Linux 4.7 allocations performed using mmap(2) were unaffected by the RLIMIT_DATA resource limit; since Linux 4.7, this limit is also enforced for allocations performed using mmap(2).

To avoid corruption in multithreaded applications, mutexes are used internally to protect the memory-management data structures employed by these functions. In a multithreaded application in which threads simultaneously allocate and free memory, there could be contention for these mutexes. To scalably handle memory allocation in multithreaded applications, glibc creates additional memory allocation arenas if mutex contention is detected. Each arena is a large region of memory that is internally allocated by the system (using brk(2) or mmap(2)), and managed with its own mutexes.

If your program uses a private memory allocator, it should do so by replacing malloc(), free(), calloc(), and realloc(). The replacement functions must implement the documented glibc behaviors, including errno handling, size-zero allocations, and overflow checking; otherwise, other library routines may crash or operate incorrectly. For example, if the replacement free() does not preserve errno, then seemingly unrelated library routines may fail without having a valid reason in errno. Private memory allocators may also need to replace other glibc functions; see “Replacing malloc” in the glibc manual for details.

Crashes in memory allocators are almost always related to heap corruption, such as overflowing an allocated chunk or freeing the same pointer twice.

The malloc() implementation is tunable via environment variables; see mallopt(3) for details.

Nonportable behavior

The behavior of these functions when the requested size is zero is glibc specific; other implementations may return NULL without setting errno, and portable POSIX programs should tolerate such behavior. See realloc(3p).

POSIX requires memory allocators to set errno upon failure. However, the C standard does not require this, and applications portable to non-POSIX platforms should not assume this.

Portable programs should not use private memory allocators, as POSIX and the C standard do not allow replacement of malloc(), free(), calloc(), and realloc().

EXAMPLES

#include <err.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MALLOCARRAY(n, type)  ((type *) my_mallocarray(n, sizeof(type)))
#define MALLOC(type)          MALLOCARRAY(1, type)
static inline void *my_mallocarray(size_t nmemb, size_t size);
int
main(void)
{
    char  *p;
    p = MALLOCARRAY(32, char);
    if (p == NULL)
        err(EXIT_FAILURE, "malloc");
    strlcpy(p, "foo", 32);
    puts(p);
}
static inline void *
my_mallocarray(size_t nmemb, size_t size)
{
    return reallocarray(NULL, nmemb, size);
}

SEE ALSO

valgrind(1), brk(2), mmap(2), alloca(3), malloc_get_state(3), malloc_info(3), malloc_trim(3), malloc_usable_size(3), mallopt(3), mcheck(3), mtrace(3), posix_memalign(3)

For details of the GNU C library implementation, see .

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

742 - Linux cli command Tk_Xrmpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Xrmpm and provides detailed information about the command Tk_Xrmpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Xrmpm.

NAME 🖥️ Tk_Xrmpm 🖥️

X Resource/Defaults/Options routines that obey the rules.

SYNOPSIS

use Tk; use Tk::Xrm;

DESCRIPTION

Using this modules causes Tk’s Option code to be replaced by versions which use routines from <X11/Xresource.h> - i.e. same ones every other X toolkit uses.

Result is that “matching” of name/Class with the options database follows the same rules as other X toolkits. This makes it more predictable, and makes it easier to have a single ~/.Xdefaults file which gives sensible results for both Tk and (say) Motif applications.

BUGS

Currently optionAdd(key => value?, priority?) ignores optional priority completely and just does XrmPutStringResource(). Perhaps it should be more subtle and do XrmMergeDatabases() or XrmCombineDatabase().

This version is a little slower than Tk’s re-invention but there is more optimization that can be done.

SEE ALSO

Tk::option

KEYWORDS

database, option, priority, retrieve

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

743 - Linux cli command xprt_register

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xprt_register and provides detailed information about the command xprt_register, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xprt_register.

NAME 🖥️ xprt_register 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

744 - Linux cli command XShapeOffsetShape

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XShapeOffsetShape and provides detailed information about the command XShapeOffsetShape, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XShapeOffsetShape.

NAME 🖥️ XShapeOffsetShape 🖥️

X nonrectangular shape functions

SYNTAX

#include <X11/extensions/shape.h>
Bool XShapeQueryExtension (
	Display *dpy,
	int *event_basep,
	int *error_basep);
Status XShapeQueryVersion (
	Display *dpy,
	int *major_versionp,
	int *minor_versionp);
void XShapeCombineRegion (
	Display *dpy,
	Window dest,
	int destKind,
	int xOff,
	int yOff,
	struct _XRegion *r,
	int op);
void XShapeCombineRectangles (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	XRectangle *rects,
	int n_rects,
	int op,
	int ordering);
void XShapeCombineMask (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	Pixmap src,
	int op);
void XShapeCombineShape (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	Pixmap src,
	int srcKind,
	int op);
void XShapeOffsetShape (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff);
Status XShapeQueryExtents (
	Display *dpy,
	Window window,
	int *bShaped,
	int *xbs,
	int *ybs,
	unsigned int *wbs,
	unsigned int *hbs,
	int *cShaped,
	int *xcs,
	int *ycs,
	unsigned int *wcs,
	unsigned int *hcs);
void XShapeSelectInput (
	Display *dpy,
	Window window,
	unsigned longmask);
unsigned long XShapeInputSelected (
	Display *dpy,
	Window window);
XRectangle *XShapeGetRectangles (
	Display *dpy,
	Window window,
	int kind,
	int *count,
	int *ordering);

STRUCTURES

typedef struct {
    int type;	/* of event */
    unsigned long serial;	/* # of last request processed by server */
    Bool send_event;	/* true if this came from a SendEvent request */
    Display *display;	/* Display the event was read from */
    Window window;	/* window of event */
    int kind;	/* ShapeBounding or ShapeClip */
    int x, y;	/* extents of new region */
    unsigned width, height;
    Time time;	/* server timestamp when region changed */
    Bool shaped;	/* true if the region exists */
} XShapeEvent;

DESCRIPTION

The X11 Nonrectangular Window Shape Extension adds nonrectangular windows to the X Window System.

PREDEFINED VALUES

Operations:

 ShapeSet   ShapeUnion   ShapeIntersect   ShapeSubtract   ShapeInvert 

Shape Kinds:

 ShapeBounding   ShapeClip 

Event defines:

 ShapeNotifyMask   ShapeNotify 

BUGS

This manual page needs a lot more work.

SEE ALSO

X11 Nonrectangular Window Shape Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

745 - Linux cli command NetSNMP_agentpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command NetSNMP_agentpm and provides detailed information about the command NetSNMP_agentpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the NetSNMP_agentpm.

NAME 🖥️ NetSNMP_agentpm 🖥️

Perl extension for the net-snmp agent.

SYNOPSIS

use NetSNMP::agent; my $agent = new NetSNMP::agent(Name => my_agent_name);

DESCRIPTION

This module implements an API set to make a SNMP agent act as a snmp agent, a snmp subagent (using the AgentX subagent protocol) and/or embedded perl-APIs directly within the traditional net-snmp agent daemon.

Also see the tutorial about the genaral Net-SNMP C API, which this module implements in a perl-way, and a perl specific tutorial at:

http://www.net-snmp.org/tutorial-5/toolkit/

EXAMPLES

Sub-agent example

use NetSNMP::agent (:all); use NetSNMP::ASN qw(ASN_OCTET_STR); my $value = “hello world”; sub myhandler { my ($handler, $registration_info, $request_info, $requests) = @_; my $request; for($request = $requests; $request; $request = $request->next()) { my $oid = $request->getOID(); if ($request_info->getMode() == MODE_GET) { # … generally, you would calculate value from oid if ($oid == new NetSNMP::OID(".1.3.6.1.4.1.8072.9999.9999.7375.1.0")) { $request->setValue(ASN_OCTET_STR, $value); } } elsif ($request_info->getMode() == MODE_GETNEXT) { # … generally, you would calculate value from oid if ($oid < new NetSNMP::OID(".1.3.6.1.4.1.8072.9999.9999.7375.1.0")) { $request->setOID(".1.3.6.1.4.1.8072.9999.9999.7375.1.0"); $request->setValue(ASN_OCTET_STR, $value); } } elsif ($request_info->getMode() == MODE_SET_RESERVE1) { if ($oid != new NetSNMP::OID(".1.3.6.1.4.1.8072.9999.9999.7375.1.0")) { # do error checking here $request->setError($request_info, SNMP_ERR_NOSUCHNAME); } } elsif ($request_info->getMode() == MODE_SET_ACTION) { # … (or use the value) $value = $request->getValue(); } } } my $agent = new NetSNMP::agent( # makes the agent read a my_agent_name.conf file Name => “my_agent_name”, AgentX => 1 ); $agent->register(“my_agent_name”, “.1.3.6.1.4.1.8072.9999.9999.7375”, \myhandler); my $running = 1; while($running) { $agent->agent_check_and_process(1); } $agent->shutdown();

Embedded agent example

# place this in a .pl file, and then in your snmpd.conf file put: # perl do /path/to/file.pl; use NetSNMP::agent; my $agent; sub myhandler { my ($handler, $registration_info, $request_info, $requests) = @_; # … } $agent = new NetSNMP::agent( Name => my_agent_name ); $agent->register(“my_agent_name”, “.1.3.6.1.4.1.8072.9999.9999.7375”, \myhandler); $agent->main_loop();

CONSTRUCTOR

new ( OPTIONS ) This is the constructor for a new NetSNMP::agent object. Possible options are: Name - Name of the agent (optional, defaults to “perl”) (The snmp library will read a NAME.conf snmp configuration file based on this argument.) AgentX - Make us a sub-agent (0 = false, 1 = true) (The Net-SNMP master agent must be running first) Ports - Ports this agent will listen on (EG: “udp:161,tcp:161”) Example: $agent = new NetSNMP::agent( Name => my_agent_name, AgentX => 1 );

METHODS

register (NAME, OID, \handler_routine ) Registers the callback handler with given OID. $agent->register(); A return code of 0 indicates no error. agent_check_and_process ( BLOCKING ) Run one iteration of the main loop. BLOCKING - Blocking or non-blocking call. 1 = true, 0 = false. $agent->agent_check_and_process(1); main_loop () Runs the agent in a loop. Does not return. shutdown () Nicely shuts down the agent or sub-agent. $agent->shutdown();

HANDLER CALLBACKS

handler ( HANDLER, REGISTRATION_INFO, REQUEST_INFO, REQUESTS ) The handler is called with the following parameters: HANDLER - FIXME REGISTRATION_INFO - what are the correct meanings of these? REQUEST_INFO - REQUESTS - Example handler: sub myhandler { my ($handler, $reg_info, $request_info, $requests) = @_; # … }

The handler subroutine will be called when a SNMP request received by the agent for anything below the registered OID. The handler is passed 4 arguments: $handler, $registration_info, $request_info, $requests. These match the arguments passed to the C version of the same API. Note that they are not entirely complete objects but are functional “enough” at this point in time.

$request_info object functions

getMode () Returns the mode of the request. See the MODES section for list of valid modes. $mode = $request->getMode();

$registration_info object functions

getRootOID () Returns a NetSNMP::OID object that describes the registration point that the handler is getting called for (in case you register one handler function with multiple OIDs, which should be rare anyway) $root_oid = $request->getRootOID();

$request object functions

next () Returns the next request in the list or undef if there is no next request. $request = $request->next(); getOID () Returns the oid of the request (a NetSNMP::OID class). $oid = $request->getOID(); setOID (new NetSNMP::OID(“someoid”)) Sets the OID of the request to a passed oid value. This should generally only be done during handling of GETNEXT requests. $request->setOID(new NetSNMP::OID(“someoid”)); getValue () Returns the value of the request. Used for example when setting values. $value = $request->getValue(); FIXME: how to get the type of the value? Is it even available? [Wes: no, not yet.] setValue ( TYPE, DATA ) Sets the data to be returned to the daemon. Returns 1 on success, 0 on error. TYPE - Type of the data. See NetSNMP::ASN for valid types. DATA - The data to return. $ret = $request->setValue(ASN_OCTET_STR, “test”); setError ( REQUEST_INFO, ERROR_CODE ) Sets the given error code for the request. See the ERROR CODES section for list of valid codes. $request->setError($request_info, SNMP_ERR_NOTWRITABLE); getProcessed () The processed flag indicates that a request does not need to be dealt with because someone else (a higher handler) has dealt with it already. $processed = $request->getProcessed(); setProcessed ( PROCESSED ) Sets the processed flag flag in the request. You generally should not have to set this yourself. PROCESSED - 0 = false, 1 = true $request->setProcessed(1); getDelegated () If you can handle a request in the background or at a future time (EG, youre waiting on a file handle, or network traffic, or …), the delegated flag can be set in the request. When the request is processed in the future the flag should be set back to 0 so the agent will know that it can wrap up the original request and send it back to the manager. This has not been tested within perl, but it hopefully should work. $delegated = $request->getDelegated(); setDelegated ( DELEGATED ) Sets the delegated flag. DELEGATED - 0 = false, 1 = true $request->setDelegated(1); getRepeat () The repeat flag indicates that a getbulk operation is being handled and this indicates how many answers need to be returned. Generally, if you didnt register to directly handle getbulk support yourself, you wont need to deal with this value. $repeat = $request->getRepeat(); setRepeat ( REPEAT ) Sets the repeat count (decrement after answering requests if you handle getbulk requests yourself) REPEAT - repeat count FIXME $request->setRepeat(5); getSourceIp () Gets the IPv4 address of the device making the request to the handler. use Socket; print “Source: “, inet_ntoa($request->getSourceIp()), " “; getDestIp () Gets the IPv4 address of the destination that the request was sent to. use Socket; print “Destination: “, inet_ntoa($request->getDestIp()), " “;

MODES

MODE_GET MODE_GETBULK MODE_GETNEXT MODE_SET_ACTION MODE_SET_BEGIN MODE_SET_COMMIT MODE_SET_FREE MODE_SET_RESERVE1 MODE_SET_RESERVE2 MODE_SET_UNDO

ERROR CODES

SNMP_ERR_NOERROR SNMP_ERR_TOOBIG SNMP_ERR_NOSUCHNAME SNMP_ERR_BADVALUE SNMP_ERR_READONLY SNMP_ERR_GENERR SNMP_ERR_NOACCESS SNMP_ERR_WRONGTYPE SNMP_ERR_WRONGLENGTH SNMP_ERR_WRONGENCODING SNMP_ERR_WRONGVALUE SNMP_ERR_NOCREATION SNMP_ERR_INCONSISTENTVALUE SNMP_ERR_RESOURCEUNAVAILABLE SNMP_ERR_COMMITFAILED SNMP_ERR_UNDOFAILED SNMP_ERR_AUTHORIZATIONERROR SNMP_ERR_NOTWRITABLE

AUTHOR

Please mail the [email protected] mailing list for help, questions or comments about this module.

Module written by: Wes Hardaker <[email protected]>

Documentation written by: Toni Willberg <[email protected]> Wes Hardaker <[email protected]>

SEE ALSO

NetSNMP::OID (3), NetSNMP::ASN (3), perl (1).

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

746 - Linux cli command Image_ExifToolpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifToolpm and provides detailed information about the command Image_ExifToolpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifToolpm.

NAME 🖥️ Image_ExifToolpm 🖥️

Read and write meta information

SYNOPSIS

use Image::ExifTool qw(:Public); # —- Simple procedural usage —- # Get hash of meta information tag names/values from an image $info = ImageInfo(a.jpg); # —- Object-oriented usage —- # Create a new Image::ExifTool object $exifTool = Image::ExifTool->new; # Extract meta information from an image $exifTool->ExtractInfo($file, \options); # Get list of tags in the order they were found in the file @tagList = $exifTool->GetFoundTags(File); # Get the value of a specified tag $value = $exifTool->GetValue($tag, $type); # Get a tag description $description = $exifTool->GetDescription($tag); # Get the group name associated with this tag $group = $exifTool->GetGroup($tag, $family); # Set a new value for a tag $exifTool->SetNewValue($tag, $newValue); # Write new meta information to a file $success = $exifTool->WriteInfo($srcfile, $dstfile); # …plus a host of other useful methods…

DESCRIPTION

Reads and writes meta information in a wide variety of files, including the maker notes of many digital cameras by various manufacturers such as Canon, Casio, DJI, FLIR, FujiFilm, GE, GoPro, HP, JVC/Victor, Kodak, Leaf, Minolta/Konica-Minolta, Nikon, Nintendo, Olympus/Epson, Panasonic/Leica, Pentax/Asahi, Phase One, Reconyx, Ricoh, Samsung, Sanyo, Sigma/Foveon and Sony.

Below is a list of file types and meta information formats currently supported by ExifTool (r = read, w = write, c = create):

File Types ————+————-+————-+————-+———— 360 r/w | DOCX r | ITC r | O r | RSRC r 3FR r | DPX r | J2C r | ODP r | RTF r 3G2 r/w | DR4 r/w/c | JNG r/w | ODS r | RW2 r/w 3GP r/w | DSS r | JP2 r/w | ODT r | RWL r/w 7Z r | DV r | JPEG r/w | OFR r | RWZ r A r | DVB r/w | JSON r | OGG r | RM r AA r | DVR-MS r | JXL r | OGV r | SEQ r AAC r | DYLIB r | K25 r | ONP r | SKETCH r AAE r | EIP r | KDC r | OPUS r | SO r AAX r/w | EPS r/w | KEY r | ORF r/w | SR2 r/w ACR r | EPUB r | LA r | ORI r/w | SRF r AFM r | ERF r/w | LFP r | OTF r | SRW r/w AI r/w | EXE r | LIF r | PAC r | SVG r AIFF r | EXIF r/w/c | LNK r | PAGES r | SWF r APE r | EXR r | LRV r/w | PBM r/w | THM r/w ARQ r/w | EXV r/w/c | M2TS r | PCD r | TIFF r/w ARW r/w | F4A/V r/w | M4A/V r/w | PCX r | TORRENT r ASF r | FFF r/w | MACOS r | PDB r | TTC r AVI r | FITS r | MAX r | PDF r/w | TTF r AVIF r/w | FLA r | MEF r/w | PEF r/w | TXT r AZW r | FLAC r | MIE r/w/c | PFA r | VCF r BMP r | FLIF r/w | MIFF r | PFB r | VNT r BPG r | FLV r | MKA r | PFM r | VRD r/w/c BTF r | FPF r | MKS r | PGF r | VSD r C2PA r | FPX r | MKV r | PGM r/w | WAV r CHM r | GIF r/w | MNG r/w | PLIST r | WDP r/w COS r | GLV r/w | MOBI r | PICT r | WEBP r/w CR2 r/w | GPR r/w | MODD r | PMP r | WEBM r CR3 r/w | GZ r | MOI r | PNG r/w | WMA r CRM r/w | HDP r/w | MOS r/w | PPM r/w | WMV r CRW r/w | HDR r | MOV r/w | PPT r | WPG r CS1 r/w | HEIC r/w | MP3 r | PPTX r | WTV r CSV r | HEIF r/w | MP4 r/w | PS r/w | WV r CUR r | HTML r | MPC r | PSB r/w | X3F r/w CZI r | ICC r/w/c | MPG r | PSD r/w | XCF r DCM r | ICO r | MPO r/w | PSP r | XISF r DCP r/w | ICS r | MQV r/w | QTIF r/w | XLS r DCR r | IDML r | MRC r | R3D r | XLSX r DFONT r | IIQ r/w | MRW r/w | RA r | XMP r/w/c DIVX r | IND r/w | MXF r | RAF r/w | ZIP r DJVU r | INSP r/w | NEF r/w | RAM r | DLL r | INSV r | NKSC r/w | RAR r | DNG r/w | INX r | NRW r/w | RAW r/w | DOC r | ISO r | NUMBERS r | RIFF r | Meta Information ———————-+———————-+——————— EXIF r/w/c | CIFF r/w | Ricoh RMETA r GPS r/w/c | AFCP r/w | Picture Info r IPTC r/w/c | Kodak Meta r/w | Adobe APP14 r XMP r/w/c | FotoStation r/w | MPF r MakerNotes r/w/c | PhotoMechanic r/w | Stim r Photoshop IRB r/w/c | JPEG 2000 r | DPX r ICC Profile r/w/c | DICOM r | APE r MIE r/w/c | Flash r | Vorbis r JFIF r/w/c | FlashPix r | SPIFF r Ducky APP12 r/w/c | QuickTime r | DjVu r PDF r/w/c | Matroska r | M2TS r PNG r/w/c | MXF r | PE/COFF r Canon VRD r/w/c | PrintIM r | AVCHD r Nikon Capture r/w/c | FLAC r | ZIP r GeoTIFF r/w/c | ID3 r | (and more)

CONFIGURATION

User-defined tags can be added via the ExifTool configuration file, or by defining the %Image::ExifTool::UserDefined hash before calling any ExifTool methods. See “ExifTool_config” in the ExifTool distribution for more details.

By default ExifTool looks for a configuration file named “.ExifTool_config” first in your home directory, then in the directory of the application script, but a different directory may be specified by setting the EXIFTOOL_HOME environment variable, or a different file may be specified by setting the ExifTool configFile variable before using Image::ExifTool. For example:

BEGIN { $Image::ExifTool::configFile = /Users/phil/myconfig.cfg } use Image::ExifTool;

The configuration feature may also be disabled by setting configFile to an empty string:

BEGIN { $Image::ExifTool::configFile = } use Image::ExifTool;

EXPORTS

Exports nothing by default, but “ImageInfo” and all static methods may be exported with the :Public export list.

METHODS

All ExifTool features are accessed through the methods of the public interface listed below. Other Image::ExifTool methods and modules should not be accessed directly because their interface may change with future versions.

None of these methods should ever die or issue warnings to STDERR if called with the proper arguments (with the exception of “SetNewValue” which may send an error message to STDERR, but only when called in scalar context). Error and warning messages that occur during processing are stored in the values of the Error and Warning tags, and are accessible via the “GetValue” method to retrieve a single Error or Warning message, or “GetInfo” to retrieve any number of them.

The ExifTool methods are not thread safe.

new

Creates a new ExifTool object.

$exifTool = Image::ExifTool->new;

One ExifTool object may be used to process many files, so creating multiple ExifTool objects usually is not necessary.

Note that ExifTool uses AUTOLOAD to load non-member methods, so any class using Image::ExifTool as a base class must define an AUTOLOAD which calls Image::ExifTool::DoAutoLoad(). eg)

sub AUTOLOAD { Image::ExifTool::DoAutoLoad($AUTOLOAD, @_); }

ImageInfo

Read image file and return meta information. This is the one step function for retrieving meta information from an image. Internally, “ImageInfo” calls “ExtractInfo” to extract the information, “GetInfo” to generate the information hash, and “GetTagList” for the returned tag list.

# return meta information for 2 tags only (procedural) $info = ImageInfo($filename, $tag1, $tag2); # return information about an open image file (object-oriented) $info = $exifTool->ImageInfo(\FILE); # return information from image data in memory for specified tags %options = (PrintConv => 0); @tagList = qw(filename imagesize xmp:creator exif:* -ifd1:*); $info = ImageInfo(\imageData, \tagList, \options); # extract information from an embedded thumbnail image $info = ImageInfo(image.jpg, thumbnailimage); $thumbInfo = ImageInfo($$info{ThumbnailImage});

Inputs:
“ImageInfo” is very flexible about the input arguments, and interprets them based on their type. It may be called with one or more arguments. The one required argument is either a SCALAR (the image file name), a file reference (a reference to the image file) or a SCALAR reference (a reference to the image in memory). Other arguments are optional. The order of the arguments is not significant, except that the first SCALAR is taken to be the file name unless a file reference or scalar reference comes earlier in the argument list. Below is an explanation of how the “ImageInfo” function arguments are interpreted:

ExifTool ref
“ImageInfo” may be called with an ExifTool object if desired. Advantages of using the object-oriented form are that options may be set before calling “ImageInfo”, and the object may be used afterward to access member functions. Must be the first argument if used.

SCALAR
The first scalar argument is taken to be the file name unless an earlier argument specified the image data via a file reference (file ref) or data reference (SCALAR ref). The remaining scalar arguments are names of tags for requested information. All tags are returned if no tags are specified. Tag names are case-insensitive and may be prefixed by optional group names separated by colons. A group name may begin with a family number (eg. ‘1IPTC:Keywords’), to restrict matches to a specific family. In the tag name, a ‘?’ matches any single character and a ‘*’ matches zero or more characters. Thus ‘GROUP:*’ represents all tags in a specific group. Wildcards may not be used in group names, with the exception that a group name of ‘*’ may be used to extract all available instances of a tag regardless of the “Duplicates” setting (eg. ‘*:WhiteBalance’). Multiple groups may be specified (eg. ‘EXIF:Time:*’ extracts all EXIF Time tags). And finally, a leading ‘-’ indicates a tag to be excluded (eg. ‘-IFD1:*’), or a trailing ‘#’ causes the ValueConv value to be returned for this tag. Note that keys in the returned information hash and elements of the returned tag list are not necessarily the same as these tag names because group names are removed, the case may be changed, and an instance number may be added. For this reason it is best to use either the keys of the returned hash or the elements of the returned tag list when accessing the tag values. See Image::ExifTool::TagNames for a complete list of ExifTool tag names.

File ref
A reference to an open image file. If you use this method (or a SCALAR reference) to access information in an image, the FileName and Directory tags will not be returned. (Also, a number of the File System tags will not be returned unless it is a plain file.) Image processing begins at the current file position, and on return the file position is unspecified. May be either a standard filehandle, or a reference to a File::RandomAccess object. Note that the file remains open and must be closed by the caller after “ImageInfo” returns. [Advanced: To allow a non-rewindable stream (eg. a network socket) to be re-read after processing with ExifTool, first wrap the file reference in a File::RandomAccess object, then pass this object to “ImageInfo”. The File::RandomAccess object will buffer the file if necessary, and may be used to re-read the file after “ImageInfo” returns.]

SCALAR ref
A reference to image data in memory.

ARRAY ref
Reference to a list of tag names. On entry, any elements in the list are added to the list of requested tags. Tags with names beginning with ‘-’ are excluded. On return, this list is updated to contain an ordered list of tag keys for the returned information. There will be 1:1 correspondence between the requested tags and the returned tag keys only if the “Duplicates” option is 0 and “Sort” is ‘Input’. (With “Duplicates” enabled, there may be more entries in the returned list of tag keys, and with other “Sort” settings the entries may not be in the same order as requested.) If a requested tag doesn’t exist, a tag key is still generated, but the tag value is undefined. Note: Do not reuse this list in subsequent calls to “ImageInfo” because it returns tag keys, not names, and the list will grow for each call resulting in increasingly slower performance.

HASH ref
Reference to a hash containing the options settings valid for this call only. See “Options” documentation below for a list of available options. Options specified as arguments to “ImageInfo” take precedence over “Options” settings.

Return Values:
“ImageInfo” returns a reference to a hash of tag-key/value pairs. The tag keys are identifiers – essentially case-sensitive tag names with an appended instance number if multiple tags with the same name were extracted from the image. Many of the ExifTool functions require a tag key as an argument. Use “GetTagName [static]” to get the tag name for a given tag key. Note that the case of the tag names may not be the same as requested. Here is a simple example to print out the information returned by “ImageInfo”: foreach (sort keys %$info) { print “$_ => $$info{$_} “; } Values of the returned hash are usually simple scalars, but a scalar reference is used to indicate binary data and an array reference may be used to indicate a list. Also, a hash reference may be returned if the “Struct” option is used. Lists of values are joined by commas into a single string only if the PrintConv option is enabled and the ListJoin option is enabled (which are the defaults). Note that binary values are not necessarily extracted unless specifically requested, or the Binary option is enabled and the tag is not specifically excluded. If not extracted the value is a reference to a string of the form “Binary data ##### bytes”. The code below gives an example of how to handle these return values, as well as illustrating the use of other ExifTool functions: use Image::ExifTool; my $exifTool = Image::ExifTool->new; $exifTool->Options(Unknown => 1); my $info = $exifTool->ImageInfo(a.jpg); my $group = ; my $tag; foreach $tag ($exifTool->GetFoundTags(Group0)) { if ($group ne $exifTool->GetGroup($tag)) { $group = $exifTool->GetGroup($tag); print “—- $group —- “; } my $val = $info->{$tag}; if (ref $val eq SCALAR) { if ($$val =~ /^Binary data/) { $val = “($$val)”; } else { my $len = length($$val); $val = “(Binary data $len bytes)”; } } printf(”%-32s : %s “, $exifTool->GetDescription($tag), $val); }

Notes:
ExifTool returns all values as byte strings of encoded characters. Perl wide characters are not used. See “CHARACTER ENCODINGS” for details about the encodings. By default, most returned values are encoded in UTF-8. For these, Encode::decode_utf8() may be used to convert to a sequence of logical Perl characters. As well as tags representing information extracted from the image, the following Extra tags generated by ExifTool may be returned: ExifToolVersion - The ExifTool version number. Error - An error message if the image could not be processed. Warning - A warning message if problems were encountered while processing the image.

Options

Get/set ExifTool options. This function can be called to set the default options for an ExifTool object. Options set this way are in effect for all function calls but may be overridden by options passed as arguments to some functions. Option names are not case sensitive, but option values are.

The default option values may be changed by defining a %Image::ExifTool::UserDefined::Options hash. See the ExifTool_config file in the full ExifTool distribution for examples. Unless otherwise noted, a default of undef has the same effect as a value of 0 for options with numerical values.

# exclude the OwnerName tag from returned information $exifTool->Options(Exclude => OwnerName); # only get information in EXIF or MakerNotes groups $exifTool->Options(Group0 => [EXIF, MakerNotes]); # ignore information from IFD1 $exifTool->Options(Group1 => -IFD1); # sort by groups in family 2, and extract unknown tags $exifTool->Options(Sort => Group2, Unknown => 1); # reset DateFormat option $exifTool->Options(DateFormat => undef); # do not extract duplicate tag names $oldSetting = $exifTool->Options(Duplicates => 0); # get current Verbose setting $isVerbose = $exifTool->Options(Verbose); # set a user parameter $exifTool->Options(UserParam => MyParam=some value);

Inputs:
0) ExifTool object reference 1) Option parameter name (case-insensitive) 2) [optional] Option parameter value (may be undef to clear option) 3-N) [optional] Additional parameter/value pairs

Option Parameters:
Note that these API options may also be used in the exiftool application via the command-line -api option.

Binary
Flag to extract the value data for all binary tags. Tag values representing large binary data blocks (eg. ThumbnailImage) are not necessarily extracted unless this option is set or the tag is specifically requested by name. Default is undef.

BlockExtract
Flag to extract some directories (mentioned in the ExifTool tag name documentation) as a block. Setting this to a value of 2 also prevents parsing the block to extract tags contained within.

ByteOrder
The byte order for newly created EXIF segments when writing. Note that if EXIF information already exists, the existing order is maintained. Valid values are ‘MM’, ‘II’ and undef. If ByteOrder is not defined (the default), then the maker note byte order is used (if they are being copied), otherwise big-endian (‘MM’) order is assumed. This can also be set via the ExifByteOrder tag, but the ByteOrder option takes precedence if both are set.

ByteUnit
Units for print conversion of FileSize and other byte values. Either ‘SI’ (eg. kB for 1000 bytes) or ‘Binary’ (eg. KiB for 1024 bytes). Default is ‘SI’.

Charset
Character set for encoding character tag values passed to/from ExifTool with code points above U+007F. Default is ‘UTF8’. Valid values are listed below, case is not significant: Value Alias(es) Description ———– ————— ———————————- UTF8 cp65001, UTF-8 UTF-8 characters Latin cp1252, Latin1 Windows Latin1 (West European) Latin2 cp1250 Windows Latin2 (Central European) Cyrillic cp1251, Russian Windows Cyrillic Greek cp1253 Windows Greek Turkish cp1254 Windows Turkish Hebrew cp1255 Windows Hebrew Arabic cp1256 Windows Arabic Baltic cp1257 Windows Baltic Vietnam cp1258 Windows Vietnamese Thai cp874 Windows Thai DOSLatinUS cp437 DOS Latin US DOSLatin1 cp850 DOS Latin1 DOSCyrillic cp866 DOS Cyrillic MacRoman cp10000, Roman Macintosh Roman MacLatin2 cp10029 Macintosh Latin2 (Central Europe) MacCyrillic cp10007 Macintosh Cyrillic MacGreek cp10006 Macintosh Greek MacTurkish cp10081 Macintosh Turkish MacRomanian cp10010 Macintosh Romanian MacIceland cp10079 Macintosh Icelandic MacCroatian cp10082 Macintosh Croatian Note that this option affects some types of information when reading/writing the file and other types when getting/setting tag values, so it must be defined for both types of access. See the “CHARACTER ENCODINGS” section for more information about the handling of special characters.

CharsetEXIF
Internal encoding to use for stored EXIF “ASCII” string values. May also be set to undef to pass through EXIF “ASCII” values without recoding. Set to “UTF8” to conform with the MWG recommendation. Default is undef.

CharsetFileName
External character set used for file names passed to ExifTool functions. When set in Windows, this triggers use of Windows wide-character i/o library routines (requires Win32API::File). Default is undef. May also be set to an empty string to avoid “encoding not specified” warnings on Windows.

CharsetID3
Internal encoding to assume for ID3v1 strings. By the specification ID3v1 strings should be encoded in ISO 8859-1 (essentially Latin), but some applications may use local encoding instead. Default is ‘Latin’.

CharsetIPTC
Fallback internal IPTC character set to assume if IPTC information contains no CodedCharacterSet tag. Possible values are the same as the “Charset” option. Default is ‘Latin’. Note that this option affects some types of information when reading/writing the file and other types when getting/setting tag values, so it must be defined for both types of access.

CharsetPhotoshop
Internal encoding to assume for Photoshop IRB resource names. Default is ‘Latin’.

CharsetQuickTime
Internal encoding to assume for QuickTime strings stored with an unspecified encoding. Default is ‘MacRoman’.

CharsetRIFF
Internal encoding to assume for strings in RIFF metadata (eg. AVI and WAV files). The default value of 0 assumes “Latin” encoding unless otherwise specified by the RIFF CSET chunk. Set to undef to pass through strings without recoding. Default is 0.

Compact
Comma-delimited list of settings for writing compact XMP. Below is a list of available settings. Note that ‘NoPadding’ effects only embedded XMP since padding is never written for stand-alone XMP files. Also note that ‘OneDesc’ is not recommended when writing XMP larger than 64 KiB to a JPG file because it interferes with ExifTool’s technique of splitting off large rdf:Description elements into the extended XMP. Case is not significant for any of these options. Aliases are given in brackets. Default is undef. NoPadding - Avoid 2 KiB of recommended padding at end of XMP (NoPad) NoIndent - No spaces to indent lines (NoSpace, NoSpaces) NoNewline - Avoid unnecessary newlines (NoNewlines) Shorthand - Use XMP Shorthand format OneDesc - Combine properties into a single rdf:Description (OneDescr) AllSpace - Equivalent to NoPadding,NoIndent,NoNewline AllFormat - Equivalent to Shorthand,OneDesc All - Equivalent to AllSpace,AllFormat

Composite
Flag to generate Composite tags when extracting information. Default is 1.

Compress
Flag to write new values in compressed format if possible. Has no effect unless the relevant compression library is available. Valid when writing metadata to PNG, JXL or MIE images. Setting this to zero causes JXL metadata to be rewritten as uncompressed when edited. Default is undef.

CoordFormat
Format for printing GPS coordinates. This is a printf format string with specifiers for degrees, minutes and seconds in that order, however minutes and seconds may be omitted. If the hemisphere is known, a reference direction (N, S, E or W) is appended to each printed coordinate, but adding a + to the first format specifier (eg. %+.6f) prints a signed coordinate instead. For example, the following table gives the output for the same coordinate using various formats: CoordFormat Example Output ——————- —————— q{%d deg %d %.2f”} 54 deg 59 22.80” (default for reading) q{%d %d %.8f} 54 59 22.80000000 (default for copying) q{%d deg %.4f min} 54 deg 59.3800 min q{%.6f degrees} 54.989667 degrees Note: To avoid loss of precision, the default coordinate format is different when copying tags with “SetNewValuesFromFile”.

DateFormat
Format for printing date/time values. See strftime in the POSIX package and <https://exiftool.org/filename.html#codes> for details about the format string. If the date can not be converted, the value is left unchanged unless the StrictDate option is set. Timezones are ignored. The inverse conversion (ie. when calling “SetNewValue”) is performed only if POSIX::strptime or Time::Piece is installed. The default setting of undef causes date/time values to remain in standard EXIF format (similar to a DateFormat of “%Y:%m:%d %H:%M:%S”).

Duplicates
Flag to return values from tags with duplicate names when extracting information. Default is 1. Forced to 1 when copying tags with “SetNewValuesFromFile”.

Escape
Escape special characters in extracted values for HTML or XML. Also unescapes HTML or XML character entities in input values passed to “SetNewValue”. Valid settings are ‘HTML’, ‘XML’ or undef. Default is undef.

Exclude
Exclude specified tags when extracting information. Note that this option is applied after all of the tags have already been loaded into memory (so different tags may be excluded in subsequent calls to “GetInfo”). See the IgnoreTags option to save memory by not loading the tags in the first place. The option value is either a tag name or reference to a list of tag names to exclude. The case of tag names is not significant. This option is ignored for specifically requested tags. Tags may also be excluded by preceding their name with a ‘-’ in the arguments to “ImageInfo”.

ExtendedXMP
This setting affects the reading and editing of extended XMP in JPEG images. According to the XMP specification, extended XMP is only valid if it has the GUID specified by the HasExtendedXMP tag, so by default ExifTool will ignore other extended XMP, but this option allows full control over the extended XMP to be extracted. 0 - Ignore all extended XMP 1 - Read extended XMP with valid GUID only (default) 2 - Read extended XMP with any GUID <guid> - Read extended XMP with a specific GUID

ExtractEmbedded
Flag to extract information from embedded documents in EPS files, embedded EPS information and JPEG and Jpeg2000 images in PDF files, embedded MPF images in JPEG and MPO files, metadata after the first Cluster in MKV files, timed metadata in videos, all frames of a multipart EXR image, and the resource fork of Mac OS files. A setting of 2 also causes the H264 video stream in MP4 files to be parsed until the first SEI message is decoded, or 3 to parse the entire H264 stream in MP4 videos and the entire M2TS file to look for any unlisted program containing GPS metadata. Default is undef.

FastScan
Flag to increase speed when reading files by avoiding extraction of some types of metadata. With this option set to 1, ExifTool will not scan to the end of a JPEG image to check for an AFCP, CanonVRD, FotoStation, PhotoMechanic, MIE or PreviewImage trailer. This also stops the parsing after the first comment in GIF images, and at the audio/video data of RIFF-format files (AVI, WAV, etc), so any trailing metadata (eg. XMP written by some utilities) may be missed. Also disables input buffering for some types of files to reduce memory usage when reading from a non-seekable stream, and bypasses CRC validation for speed when writing PNG files. When combined with the ScanForXMP option, prevents scanning for XMP in recognized file types. With a value of 2, ExifTool will also avoid extracting any EXIF MakerNote information, and will stop processing at the IDAT chunk of PNG images and the mdat atom in QuickTime-format files. (By the PNG specification, metadata is allowed after IDAT, but ExifTool always writes it before because some utilities will ignore it otherwise.) When set to 3 or higher, only pseudo system tags and FileType are generated. For 3, the file header is read to provide an educated guess at FileType. For 4, the file is not read at all and FileType is determined based on the file’s extension. For 5, generation of Composite tags is also disabled (like setting “Composite” to 0). Default is undef.

Filter
Perl expression used to filter values for all tags. The expression acts on the value of the Perl default variable ($_), and changes the value of this variable as required. The current ExifTool object may be accessed through $self. The value is not changed if $_ is set to undef. List items are filtered individually. Applies to all returned values unless PrintConv option is disabled.

FilterW
Perl expression used to filter PrintConv values when writing. The expression acts on the value of the Perl default variable ($_), and changes the value of this variable as required. The current ExifTool object may be accessed through $self. The tag is not written if $_ is set to undef.

FixBase
Fix maker notes base offset. A common problem with image editing software is that offsets in the maker notes are not adjusted properly when the file is modified. This may cause the wrong values to be extracted for some maker note entries when reading the edited file. FixBase specifies an integer value to be added to the maker notes base offset. It may also be set to the empty string (’’) for ExifTool will take its best guess at the correct base, or undef (the default) for no base adjustment.

GeoMaxIntSecs
Maximum interpolation time in seconds for geotagging. Geotagging is treated as an extrapolation if the Geotime value lies between two fixes in the same track which are separated by a number of seconds greater than this. Otherwise, the coordinates are calculated as a linear interpolation between the nearest fixes on either side of the Geotime value. Set to 0 to disable interpolation and use the coordinates of the nearest fix instead (provided it is within GeoMaxExtSecs, otherwise geotagging fails). Default is 1800.

GeoMaxExtSecs
Maximum extrapolation time in seconds for geotagging. Geotagging fails if the Geotime value lies outside a GPS track by a number of seconds greater than this. Otherwise, for an extrapolation the coordinates of the nearest fix are taken (ie. it is assumed that you weren’t moving during this period). Default is 1800.

GeoMaxHDOP
Maximum Horizontal (2D) Dilution Of Precision for geotagging. GPS fixes are ignored if the HDOP is greater than this. Default is undef.

GeoMaxPDOP
Maximum Position (3D) Dilution Of Precision for geotagging. GPS fixes are ignored if the PDOP is greater than this. Default is undef.

GeoMinSats
Minimum number of satellites for geotagging. GPS fixes are ignored if the number of acquired satellites is less than this. Default is undef.

GeoSpeedRef
Reference units for writing GPSSpeed when geotagging: K, k or km/h - km/h M, m or mph - mph <anything else> - knots (default undef)

GlobalTimeShift
Time shift to apply to all extracted date/time PrintConv values. Does not affect ValueConv values. Value is a date/time shift string (see Image::ExifTool::Shift (3pm)), with a leading ‘-’ for negative shifts. Default is undef.

Group#
Extract tags only for specified groups in family # (Group0 assumed if # not given). The option value may be a single group name or a reference to a list of groups. Case is significant in group names. Specify a group to be excluded by preceding group name with a ‘-’. See “GetGroup” for a description of group families, and “GetAllGroups [static]” for lists of group names.

HexTagIDs
Return hexadecimal instead of decimal for the family 7 group names of tags with numerical ID’s.

HtmlDump
Dump information in hex to dynamic HTML web page. The value may be 0-3 for increasingly larger limits on the maximum block size. Default is 0. Output goes to the file specified by the TextOut option (\STDOUT by default).

HtmlDumpBase
Base for HTML dump offsets. If not defined, the EXIF/TIFF base offset is used. Set to 0 for absolute offsets. Default is undef.

IgnoreMinorErrors
Flag to ignore minor errors. Causes minor errors to be downgraded to warnings, and minor warnings to be ignored. This option is provided mainly to allow writing of files when minor errors occur, but by ignoring some minor warnings the behaviour of ExifTool may be changed to allow some questionable operations to proceed (such as extracting thumbnail and preview images even if they don’t have a recognizable header). Minor errors and warnings are denoted by “[minor]” at the start of the message, or “[Minor]” (with a capital “M”) for warnings that affect processing when ignored.

IgnoreTags
List of tag names to ignore when reading. This may help in situations where memory is limited because the ignored tag values are not stored in memory. The tag names are case insensitive and group names and wildcards are not allowed. A special tag name of “All” may be used to ignore all tags except those specified by the “RequestTags” option. Set to undef to clear the previous IgnoreTags list. Default is undef.

ImageHashType
Sets type of hash algorithem used for the ImageDataHash tag calculation. Supported options are ‘MD5’, ‘SHA256’, and ‘SHA512’. Default is ‘MD5’.

Lang
Localized language for exiftool tag descriptions, etc. Available languages are given by the Image::ExifTool::Lang module names (eg. ‘fr’, ‘zh_cn’). If the specified language isn’t available, the option is not changed. May be set to undef to select the built-in default language. Default is ’en’.

LargeFileSupport
Flag to indicate that 64-bit file offsets are supported on this system. Default is undef.

LimitLongValues
When extracting values for some specific tags (usually Unknown tags), the PrintConv values are length-limited and the value is truncated with an ellipsis (”[…]”) if it exceeds a specified length. This option specifies the length limit for these tags. A setting of 4 or less disables the limit (because the ellipsis string is longer than this). Default is 60.

ListItem
Return only a specific item from list-type values. A value of 0 returns the first item in the list, 1 return the second item, etc. Negative indices may also be used, with -1 representing the last item in the list. Applies only to the top-level list of nested lists. Default is undef to return all items in the list.

ListJoin
Separator used to join the PrintConv value of multi-item List-type tags into a single string. If not defined, multi-item lists are returned as a list reference. Does not affect ValueConv values. Default is ‘, ‘.

ListSplit
Regular expression used to split values of list-type tags into individual items when writing. (eg. use ‘,\s*’ to split a comma-separated list.) Split when writing either PrintConv or ValueConv values. Default is undef.

MakerNotes
Option to extract MakerNotes and other writable subdirectories (such as PrintIM) as a data block. Normally when the MakerNotes are extracted they are rebuilt to include data outside the boundaries of the original maker note data block, but a value of 2 disables this feature. Possible values are: 0 - Do not extract writable subdirectories (same as default of undef) 1 - Extract and rebuild maker notes into self-contained block 2 - Extract without rebuilding maker notes

MDItemTags
Flag to extract the OS X metadata item tags (see the “mdls” man page and “MacOS MDItem Tags” in Image::ExifTool::TagNames for more information).

MissingTagValue
Value for missing tags in tag name expressions (or tags where the advanced formatting expression returns undef). If not set, a minor error is issued for missing values, or the value is set to ’’ if “IgnoreMinorErrors” is set. Default is undef.

NoDups
Flag to remove duplicate items from queued values for List-type tags when writing. This applies only to queued values, and doesn’t resolve duplicates with existing values in the file when adding to an existing list. Default is undef.

NoMandatory
Flag to bypass writing of mandatory EXIF tags. Default is undef.

NoMultiExif
Raise error when attempting to write multi-segment EXIF in a JPEG image. Default is undef.

NoPDFList
Flag to avoid splitting PDF list-type tag values into separate items. Default is undef.

NoWarning[+]
Regular expression to suppress matching warning messages. For example, a value of “^Ignored” suppresses all warnings that begin with the word “Ignored”. Has no other effect on processing, unlike IgnoreMinorWarnings for some warnings. Start the expression with “(?i)” for case-insensitive matching. Use NoWarning+ to add to existing expressions. Default is undef.

Password
Password for reading/writing password-protected PDF documents. Ignored if a password is not required. Character encoding of the password is determined by the value of the Charset option at processing time. Default is undef.

PrintConv
Flag to enable automatic print conversion. Also enables inverse print conversion for writing. Default is 1.

QuickTimeHandler
Flag set to add an ‘mdir’ Handler to a newly created Meta box when adding QuickTime ItemList tags. Adobe Bridge does not add this Handler, but it is commonly found in samples from other software, and it has been reported that Apple QuickTime Player and Photos.apps will ignore ItemList tags if this is missing. Default is 1.

QuickTimePad
Flag to preserve the padding of some QuickTime atoms when writing. QuickTime-based Canon CR3 files pad the values of container atoms with null bytes. This padding is removed by default when the file is rewritten, but setting this option to 1 adds padding to preserve the original atom size if the new atom would be smaller than the original. Default is undef.

QuickTimeUTC
Flag set to assume that QuickTime date/time values are stored as UTC, causing conversion to local time when they are extracted and from local time when written. According to the QuickTime specification date/time values should be UTC, but many digital cameras store local time instead (presumably because they don’t know the time zone), so the default is to not convert these times (except for Canon CR3 files, which always use UTC times). This option also disables the autodetection of incorrect time-zero offsets in QuickTime date/time values, and enforces a time zero of 1904 as per the QuickTime specification.

RequestAll
Flag to request all tags to be extracted. This causes some tags to be generated which normally would not be unless specifically requested (by passing the tag name to “ImageInfo” or “ExtractInfo”). May be set to 2 or 3 to enable generation of some additional tags as mentioned in the tag name documentation. Default is undef.

RequestTags
List of additional tag and/or group names to request in the next call to “ExtractInfo”. This option is useful only for tags/groups which aren’t extracted unless specifically requested. Value may be a list reference, a delimited string of names (any delimiter is allowed), or undef to clear the current RequestTags list. Groups are requested by adding a colon after the name (eg. “MacOS:”). Names are converted to lower case as they are added to the list. Default is undef.

SaveFormat
Flag to save EXIF/TIFF format type as the family 6 group name when extracting information. Without this option set, the family 6 group names are not generated. Default is undef. See the “GetGroup” option for more details.

SavePath
Flag to save the metadata path as the family 5 group name when extracting information. Without this option set, the family 5 group names are not generated. Default is undef. See the “GetGroup” option for more details.

ScanForXMP
Flag to scan all files (even unrecognized formats) for XMP information unless XMP was already found in the file. When combined with the FastScan option, only unrecognized file types are scanned for XMP. Default is undef.

Sort
Specifies order to sort tags in returned list: Input - Sort in same order as input tag arguments (default) File - Sort in order that tags were found in the file Tag - Sort alphabetically by tag name Descr - Sort by tag description (for current Lang setting) Group# - Sort by tag group, where # is zero or more family numbers separated by colons. If # is not specified, Group0 is assumed. See GetGroup for a description of group families.

Sort2
Secondary sort order used for tags within each group when Sort is ‘Group’: File - Sort in order tags were found in the file (default) Tag - Sort alphabetically by tag name Descr - Sort by tag description (for current Lang setting)

StrictDate
Flag to return undefined value for any date which can’t be converted when the DateFormat option is used. Default is undef. undef - Same as 0 for reading/writing, or 1 for copying 0 - Return date/time value unchanged if it cant be converted 1 - Return undef if date/time value cant be converted When set to 1 while writing a PrintConv date/time value with the DateFormat option set, the value is written only if POSIX::strptime or Time::Piece is available and can successfully convert the value. For PNG CreationTime, a setting of 1 has the additional effect of causing the date/time to be reformatted according to PNG 1.2 recommendation (RFC-1123) when writing, and a warning to be issued for any non-standard value when reading (but note that Windows may not recognize PNG date/time values in standard format).

Struct
Flag to return XMP structures as hash references instead of flattening into individual tags. Has no effect when writing since both flattened and structured tags may always be written. Possible values are: undef - (default) Same as 0 for reading, 2 for copying 0 - Read/copy flattened tags 1 - Read/copy structured tags 2 - Read/copy both flattened and structured tags, but flag flattened tags as unsafe for copying

StructFormat
Format for serialized structures when reading/writing. undef - Default ExifTool format JSON - JSON format JSONQ - JSON with quoted numerical values

SystemTags
Flag to extract the following additional File System tags: FileAttributes, FileDeviceNumber, FileInodeNumber, FileHardLinks, FileUserID, FileGroupID, FileDeviceID, FileBlockSize and FileBlockCount.

TextOut
Output file reference for Verbose and HtmlDump options. Default is \STDOUT.

TimeZone
Time zone for local date/time values. May be set to any valid TZ string. Uses the system time zone if not specified. Default is undef. (Requires POSIX::tzset, which may not be available in Windows. A work-around in Windows is to set TZ=<zone> before running ExifTool.)

Unknown
Flag to get the values of unknown tags. If set to 1, unknown tags are extracted from EXIF (or other tagged-format) directories. If set to 2, unknown tags are also extracted from binary data blocks. Default is 0.

UserParam
Special option to set/get user-defined parameters. Useful to allow external input into tag name expressions and ValueConv logic. Valid UserParam values are: PARAM - Get parameter PARAM= - Clear parameter PARAM^= - Set parameter to empty string PARAM=VALUE - Set parameter <hash ref> - Set entire UserParam hash lookup undef - Clear all user parameters Where PARAM is the user-defined parameter name (case insensitive). User-defined parameters may be accessed in tag name expressions by prefixing the parameter name with a dollar sign just like normal tags, or via the API by calling Options(UserParam,PARAM). Appending a hash tag (#) to the parameter name also causes the parameter to be extracted as a normal tag (in the UserParam group). If called without additional arguments, Options(UserParam) returns a reference to the hash of all user parameters (with lower-case names).

Validate
Flag to perform extra validation metadata checks when reading, causing extra warnings to be generated if problems are found. Default is undef.

Verbose
Print verbose messages to file specified by TextOut option. Value may be from 0 to 5 for increasingly verbose messages. Default is 0. With the verbose option set, messages are printed to the console as the file is parsed. Level 1 prints the tag names and raw values. Level 2 adds more details about the tags. Level 3 adds a hex dump of the tag data, but with limits on the number of bytes dumped. Levels 4 and 5 remove the dump limit on tag values and JPEG segment data respectively.

WindowsWideFile
Force the use of wide-character Windows I/O functions when the “CharsetFileName” option is used. This may be necessary when files are on a network drive and the current directory name contains Unicode characters. By default, the wide-character functions are used only if the specified file path contains Unicode characters.

WriteMode
Set tag write/create mode. Value is a string of one or more characters from list below. Default is ‘wcg’. w - Write existing tags c - Create new tags g - create new Groups as necessary The level of the group differs for different types of metadata. For XMP or IPTC this is the full XMP/IPTC block (the family 0 group), but for EXIF this is the individual IFD (the family 1 group). The ‘w’ and ‘c’ modes are tested only when “SetNewValue” is called, but the ‘g’ mode is also tested in “WriteInfo”.

XAttrTags
Flag to extract the OS X extended attribute tags (see the “xattr” man page and “MacOS XAttr Tags” in Image::ExifTool::TagNames for more information).

XMPAutoConv
Flag to enable automatic conversion for unknown XMP tags with values that look like rational numbers or dates. Default is 1.

Return Values:
The original value of the last specified parameter.

ClearOptions

Reset all options to their default values. Loads user-defined default option values from the %Image::ExifTool::UserDefined::Options hash in the .ExifTool_config file if it exists.

$exifTool->ClearOptions();

Inputs:
0) ExifTool object reference

Return Values:
(none)

ExtractInfo

Extract all meta information from an image.

$success = $exifTool->ExtractInfo(image.jpg, \options);

Inputs:
“ExtractInfo” takes exactly the same arguments as “ImageInfo”. The only difference is that a list of tag keys is not returned if an ARRAY reference is given. The following options are effective in the call to “ExtractInfo”: Binary, Charset, CharsetEXIF, CharsetFileName, CharsetID3, CharsetIPTC, CharsetPhotoshop, CharsetQuickTime, CharsetRIFF, Composite, ExtendedXMP, ExtractEmbedded, FastScan, FixBase, HtmlDump, HtmlDumpBase, IgnoreMinorErrors, IgnoreTags, Lang, LargeFileSupport, MakerNotes, MDItemTags, NoPDFList, Password, QuickTimeUTC (enforced 1904 time zero), RequestAll, RequestTags, SaveFormat, SavePath, ScanForXMP, Struct, TextOut, Unknown, Verbose, WindowsWideFile, XAttrTags and XMPAutoConv.

Return Value:
1 if this was a recognized file format, 0 otherwise (and ‘Error’ tag set).

GetInfo

“GetInfo” is called to return meta information after it has been extracted from the image by a previous call to “ExtractInfo” or “ImageInfo”. This function may be called repeatedly after a single call to “ExtractInfo” or “ImageInfo”.

# get image width and height only $info = $exifTool->GetInfo(ImageWidth, ImageHeight); # get all Error and Warning messages $info = $exifTool->GetInfo(Error, Warning); # get information for all tags in list (list updated with tags found) $info = $exifTool->GetInfo(\ioTagList); # get all information in Author or Location groups $info = $exifTool->GetInfo({Group2 => [Author, Location]});

Inputs:
Inputs are the same as “ExtractInfo” and “ImageInfo” except that an image can not be specified. Options in effect are: Charset, CoordFormat, DateFormat, Duplicates, Escape, Exclude, Filter, Group#, GlobalTimeShift, Lang, ListItem, ListJoin, PrintConv, Sort (if a tag list reference is given) and StrictDate.

Return Value:
Reference to information hash, the same as with “ImageInfo”.

The following options are effective in the call to “GetInfo”:

Charset, CoordFormat, DateFormat, Duplicates, Escape, Exclude, Filter, Group#, GlobalTimeShift, Lang, ListItem, ListJoin, PrintConv, QuickTimeUTC (conversion to local time), Sort (if a tag list reference is given) and StrictDate.

WriteInfo

Write meta information to a file. The specified source file is rewritten to the same-type destination file with new information as specified by previous calls to “SetNewValue”. The necessary segments and/or directories are created in the destination file as required to store the specified information. May be called repeatedly to write the same information to additional files without the need to call “SetNewValue” again.

ExifTool queues all new values that are assigned via calls to “SetNewValue”, then applies them to any number of files through one or more calls to “WriteInfo”. These queued values may be accessed through “GetNewValue”, and are completely separate from metadata extracted from files via “ExtractInfo” or “ImageInfo” and accessed through “GetInfo” or “GetValue”.

To be clear, it is NOT necessary to call “ExtractInfo” or “ImageInfo” before “WriteInfo”. “WriteInfo” changes only metadata specified by previous calls to “SetNewValue”.

# add information to a source file, writing output to new file $exifTool->WriteInfo($srcfile, $dstfile); # create XMP data file from scratch $exifTool->WriteInfo(undef, $dstfile, XMP); # overwrite file (you do have backups, right?) $exifTool->WriteInfo($srcfile);

Inputs:
0) ExifTool object reference 1) Source file name, file reference, scalar reference, or undef to create a file from scratch. A reference to a File::RandomAccess object is also allowed as a source, but in this case the destination is not optional. 2) [optional] Destination file name, file reference, scalar reference to write to memory, or undef to overwrite the original file. May be ‘-’ to write to stdout. 3) [optional] Destination file type. Ignored if a source is defined.

Return Value:
1 if file was written OK, 2 if file was written but no changes made, 0 on file write error. If an error code is returned, an Error tag is set and GetValue(‘Error’) can be called to obtain the error description. A Warning tag may be set even if this routine is successful. Calling WriteInfo clears any pre-existing Error and Warning tags. $errorMessage = $exifTool->GetValue(Error); $warningMessage = $exifTool->GetValue(Warning);

Notes:
The source file name may be undefined to create a file from scratch (currently only XMP, MIE, ICC, VRD, DR4, EXV and EXIF files can be created in this way – see “CanCreate” for details). If undefined, the destination file type is required unless the type can be determined from the extension of the destination file name. If a destination file name is given, the specified file must not exist because an existing destination file will not be overwritten. Any new values for FileName, Directory or HardLink are ignored when a destination file name is specified. The destination file name may be undefined to overwrite the original file (make sure you have backups!). In this case, if a source file name is provided, a temporary file is created and renamed to replace the source file if no errors occurred while writing. Otherwise, if a source file reference or scalar reference is used, the image is first written to memory then copied back to replace the original if there were no errors. On Mac OS systems, the file resource fork is preserved if this routine is called with a source file name.

The following ExifTool options are effective in the call to “WriteInfo”:

ByteOrder, Charset, CharsetEXIF, CharsetFileName, CharsetIPTC, Compact, Compress, FixBase, IgnoreMinorErrors, NoMultiExif, NoPDFList, Password, QuickTimeHandler, QuickTimePad, Verbose, WindowsWideFile and WriteMode.

GetTagList

Get a sorted list of tags from the specified information hash or tag list.

@tags = $exifTool->GetTagList($info, Group0);

Inputs:
0) ExifTool object reference 1) [optional] Information hash reference or tag list reference 2) [optional] Sort order (‘Input’, ‘File’, ‘Tag’, ‘Descr’ or ‘Group#’) 3) [optional] Secondary sort order (‘File’, ‘Tag’ or ‘Descr’) If the information hash or tag list reference is not provided, then the list of found tags from the last call to “ImageInfo”, “ExtractInfo” or “GetInfo” is used instead, and the result is the same as if “GetFoundTags” was called. If sort order is not specified, the sort order is taken from the current options settings.

Return Values:
A list of tag keys in the specified order.

GetFoundTags

Get list of found tags in specified sort order. The found tags are the tags for the information obtained from the most recent call to “ImageInfo”, “ExtractInfo” or “GetInfo” for this object.

@tags = $exifTool->GetFoundTags(File);

Inputs:
0) ExifTool object reference 1) [optional] Sort order (‘Input’, ‘File’, ‘Tag’, ‘Descr’ or ‘Group#’) 2) [optional] Secondary sort order (‘File’, ‘Tag’ or ‘Descr’) If sort order is not specified, the sort order from the ExifTool options is used.

Return Values:
A list of tag keys in the specified order.

GetRequestedTags

Get list of requested tags. These are the tags that were specified in the arguments of the most recent call to “ImageInfo”, “ExtractInfo” or “GetInfo”, including tags specified via a tag list reference. Shortcut tags are expanded in the list.

@tags = $exifTool->GetRequestedTags();

Inputs:
(none)

Return Values:
List of requested tag keys in the same order that the tags were specified. Note that this list will be empty if tags were not specifically requested (ie. If extracting all tags).

GetValue

Get the value of a specified tag. The returned value is either the human-readable (PrintConv) value, the converted machine-readable (ValueConv) value, the original raw (Raw) value, or the original rational (Rational) value for rational formats. If the value type is not specified, the PrintConv value is returned if the PrintConv option is set, otherwise the ValueConv value is returned. The PrintConv values are same as the values returned by “ImageInfo” and “GetInfo” in the tag/value hash unless the PrintConv option is disabled.

Tags which represent lists of multiple values (as may happen with ‘Keywords’ for example) are handled specially. In scalar context, the returned PrintConv value for these tags is either a string of values or a list reference (depending on the ListJoin option setting), and the ValueConv value is always a list reference. But in list context, “GetValue” always returns the list itself.

Note that “GetValue” requires a case-sensitive tag key as an argument. To retrieve tag information based on a case-insensitive tag name (with an optional group specifier), use “GetInfo” instead.

# PrintConv example my $val = $exifTool->GetValue($tag); if (ref $val eq SCALAR) { print “$tag = (unprintable value) “; } else { print “$tag = $val “; } # ValueConv examples my $val = $exifTool->GetValue($tag, ValueConv); if (ref $val eq ARRAY) { print “$tag is a list of values “; } elsif (ref $val eq SCALAR) { print “$tag represents binary data “; } else { print “$tag is a simple scalar “; } my @keywords = $exifTool->GetValue(Keywords, ValueConv);

The following options are in effect when “GetValue” is called:

Charset, CoordFormat, DateFormat, Escape, Filter, GlobalTimeShift, Lang, ListItem, ListJoin, PrintConv, QuickTimeUTC (conversion to local time), StrictDate and TimeZone.

Inputs:
0) ExifTool object reference 1) Tag key, or case-sensitive tag name with optional group prefix(es) 2) [optional] Value type: ‘PrintConv’, ‘ValueConv’, ‘Both’, ‘Raw’ or ‘Rational’ The default value type is ‘PrintConv’ if the PrintConv option is set, otherwise the default is ‘ValueConv’. A value type of ‘Both’ returns both ValueConv and PrintConv values as a list. ‘Rational’ returns the raw rational value as a string fraction for rational types, or undef for other types.

Return Values:
The value of the specified tag. If the tag represents a list of multiple values and the ListJoin option is enabled then PrintConv returns a string of values, otherwise a reference to the list is returned in scalar context. The list itself is returned in list context. (Unless ‘Both’ values are requested, in which case two list references are returned, regardless of context.) Values may also be scalar references to binary data, or hash references if the “Struct” option is set. Note: It is possible for “GetValue” to return an undefined ValueConv or PrintConv value (or an empty list in list context) even if the tag exists, since it is possible for these conversions to yield undefined values. And the Rational value will be undefined for any non-rational tag. The Raw value should always exist if the tag exists.

SetNewValue

Set the new value for a tag. The routine may be called multiple times to set the values of many tags before using “WriteInfo” to write the new values to an image. These values remain queued for writing to subsequent files until “SetNewValue” is called without arguments to reset the queued values.

For list-type tags (like Keywords), either call repeatedly with the same tag name for each value, or call with a reference to the list of values.

# set a new value for a tag (errors go to STDERR) $success = $exifTool->SetNewValue($tag, $value); # set a new value and capture any error message ($success, $errStr) = $exifTool->SetNewValue($tag, $value); # delete information for specified tag if it exists in image # (also resets AddValue and DelValue options for this tag) $exifTool->SetNewValue($tag); # reset all values from previous calls to SetNewValue() $exifTool->SetNewValue(); # delete a specific keyword $exifTool->SetNewValue(Keywords, $word, DelValue => 1); # set keywords (a list-type tag) with two new values $exifTool->SetNewValue(Keywords => word1); $exifTool->SetNewValue(Keywords => word2); # equivalent, but set both in one call using an array reference $exifTool->SetNewValue(Keywords => [word1,word2]); # add a keyword without replacing existing keywords in the file $exifTool->SetNewValue(Keywords => $word, AddValue => 1); # conditionally add a tag if it didnt exist before, # or replace it if it had a specified value (“old value”) $exifTool->SetNewValue(Description => , DelValue => 1); $exifTool->SetNewValue(Description => old value, DelValue => 1); $exifTool->SetNewValue(Description => new value); # set a tag in a specific group $exifTool->SetNewValue(Headline => $val, Group => XMP); $exifTool->SetNewValue(XMP:Headline => $val); # (equivalent) # shift original date/time back by 2.5 hours $exifTool->SetNewValue(DateTimeOriginal => 2:30, Shift => -1); # write a tag only if it had a specific value # (the order of the following calls is not significant) $exifTool->SetNewValue(Title => $oldVal, DelValue => 1); $exifTool->SetNewValue(Title => $newVal); # write tag by numerical value $exifTool->SetNewValue(Orientation => 6, Type => ValueConv); $exifTool->SetNewValue(Orientation# => 6); # (equivalent) # delete all but EXIF tags $exifTool->SetNewValue(*); # delete all… $exifTool->SetNewValue(EXIF:*, undef, Replace => 2); # …but EXIF # write structured information as a HASH reference $exifTool->SetNewValue(XMP:Flash => { mode => on, fired => true, return => not }); # write structured information as a serialized string $exifTool->SetNewValue(XMP:Flash=>{mode=on,fired=true,return=not});

(See <https://exiftool.org/struct.html#Serialize> for a description of the structure serialization technique.)

Inputs:
0) ExifTool object reference 1) [optional] Tag key or tag name, or undef to clear all new values. The tag name may be prefixed by one or more family 0, 1 or 2 group names with optional leading family numbers, separated by colons (eg. ‘EXIF:Artist’, ‘XMP:Time:*’), which is equivalent to using a Group option argument. Also, a ‘#’ may be appended to the tag name (eg. ‘EXIF:Orientation#’), with the same effect as setting Type to ‘ValueConv’. Wildcards (’*’ and ‘?’) may be used in the tag name to assign or delete multiple tags simultaneously. A tag name of ‘*’ is special when deleting information, and will delete an entire group even if some individual tags in the group are not writable, but only if a single family 0 or 1 group is specified (otherwise the tags are deleted individually). Use “GetDeleteGroups” to get a list of deletable group names, and see Image::ExifTool::TagNames for a complete list of tag names. 2) [optional] New value for tag. Undefined to delete tag from file. May be a scalar, scalar reference, list reference to set a list of values, or hash reference for a structure. Integer values may be specified as a hexadecimal string (with a leading ‘0x’), and simple rational values may be specified in fractional form (eg. ‘4/10’). Structure tags may be specified either as a hash reference or a serialized string (see the last two examples above). 3-N) [optional] SetNewValue option/value pairs (see below).

SetNewValue Options:

AddValue

Specifies that the value be added to an existing list in a file rather than overwriting the existing values. Valid settings are 0 (overwrite any existing tag value), 1 (add to an existing list and warn for non-list tags) or 2 (add to existing list and overwrite non-list tags). Default is 0.

DelValue
Delete existing tag from a file if it has the specified value. For list-type tags this deletes a specified item from the list. For non-list tags this may be used to conditionally replace a tag by providing a new value in a separate call to SetNewValue (see examples above). For structured tags, the entire structure is deleted/replaced only if all of the specified fields match the existing structure. Option values are 0 or 1. Default is 0.

EditGroup
Create tags in existing groups only. Don’t create new group. Valid values are 0 and 1. Effectively removes the ‘g’ from the ExifTool WriteMode option for this tag only. Default is 0.

EditOnly
Edit tag only if it already exists. Don’t create new tag. Valid values are 0 and 1. Effectively removes the ‘c’ from the ExifTool WriteMode option for this tag only. Default is 0.

Group
Specifies group name where tag should be written. This option is superseded by any group specified in the tag name. If not specified, tag is written to highest priority group as specified by “SetNewGroups”. May be one or more family 0, 1 or 2 groups with optional leading family number, separated by colons. Case is not significant.

NoFlat
Treat flattened tags as ‘unsafe’.

NoShortcut
Disables default behaviour of looking up tag in shortcuts if not found otherwise.

Protected
Bit mask for tag protection levels to write. Bit 0x01 allows writing of ‘unsafe’ tags (ie. tags not copied automatically via “SetNewValuesFromFile”). Bit 0x02 allows writing of ‘protected’ tags, and should only be used internally by ExifTool. See Image::ExifTool::TagNames, for a list of tag names indicating ‘unsafe’ and ‘protected’ tags. Default is 0.

ProtectSaved
Avoid setting new values which were saved after the Nth call to “SaveNewValues”. Has no effect on unsaved values, or values saved before Nth call. Option value is N. Default is undef.

Replace
Flag to replace the previous new values for this tag (ie. replace the values set in previous calls to “SetNewValue”). This option is most commonly used to replace previously-set new values for list-type tags. Valid values are 0 (set new value normally – adds to new values for list-type tags), 1 (reset any previous new values before setting new value) or 2 (reset previous new values only; new value argument is ignored). Default is 0.

Shift
Shift the tag by the specified value. Currently only date/time tags and tags with numerical values may be shifted. Undefined for no shift, 1 for a positive shift, or -1 for a negative shift. A value of 0 causes a positive shift to be applied if the tag is shiftable and AddValue is set, or a negative shift for date/time tags only if DelValue is set. Default is undef. See Image::ExifTool::Shift (3pm) for more information.

Type
The type of value being set. Valid values are PrintConv, ValueConv or Raw. Default is PrintConv if the “PrintConv” Option is set, otherwise ValueConv.

Return Values:
In scalar context, returns the number of tags set and error messages are printed to STDERR. In list context, returns the number of tags set, and the error string (which is undefined if there was no error).

Notes:
When deleting groups of tags, the Replace option may be used to exclude specific groups from a mass delete. However, this technique may not be used to exclude individual tags from a group delete (unless a family 2 group was specified in the delete). Instead, use “SetNewValuesFromFile” to recover the values of individual tags after deleting a group. When deleting all tags from a JPEG image, the APP14 “Adobe” information is not deleted by default because doing so may affect the appearance of the image. However, this information may be deleted by specifying it explicitly, either by group (with ‘Adobe:*’) or as a block (with ‘Adobe’).

The following ExifTool options are effective in the call to “SetNewValue”:

Charset, DateFormat, Escape, IgnoreMinorErrors, Lang, ListJoin, ListSplit, PrintConv, QuickTimeUTC, StrictDate, TimeZone, Verbose and WriteMode.

GetNewValue

Get the new Raw value for a tag. This is the value set by “SetNewValue” this is queued to be written to file. List-type tags may return multiple values in list context.

$rawVal = $exifTool->GetNewValue($tag); @rawVals = $exifTool->GetNewValue($tag);

Notes:
The API NoDups option applies when this routine is called, and removes duplicate items from values returned for List-type tags.

Inputs:
0) ExifTool object reference 1) Tag name (case sensitive, may be prefixed by family 0, 1 or 7 group names, separated by colons)

Return Values:
List of new Raw tag values, or first value in list when called in scalar context. The list may be empty either if the tag isn’t being written, or if it is being deleted (ie. if “SetNewValue” was called without a value).

SetNewValuesFromFile

A very powerful routine that sets new values for tags from information found in a specified file.

# set new values from all information in a file… my $info = $exifTool->SetNewValuesFromFile($srcFile); # …then write these values to another image my $result = $exifTool->WriteInfo($file2, $outFile); # set all new values, preserving original groups $exifTool->SetNewValuesFromFile($srcFile, *:*); # set specific information $exifTool->SetNewValuesFromFile($srcFile, @tags); # set new value from a different tag in specific group $exifTool->SetNewValuesFromFile($fp, XMP-dc:Subject<IPTC:Keywords); # add all IPTC keywords to XMP subject list $exifTool->SetNewValuesFromFile($fp, XMP-dc:Subject+<IPTC:Keywords); # set new value from an expression involving other tags $exifTool->SetNewValuesFromFile($file, Comment<ISO=$ISO Aperture=$aperture Exposure=$shutterSpeed); # set keywords list from the values of multiple tags $exifTool->SetNewValuesFromFile($file, { Replace => 0 }, keywords<xmp:subject, keywords<filename); # copy all EXIF information, preserving the original IFD # (without *.*< tags would be copied to the preferred EXIF IFD) $exifTool->SetNewValuesFromFile($file, *:*<EXIF:*); # copy all tags with names starting with “gps” (note: this is # different than “gps:*” because it will also copy XMP GPS tags) $exifTool->SetNewValuesFromFile($file, gps*); # set FileName from Model, translating questionable characters $exifTool->SetNewValuesFromFile($file, filename<${model; tr(/\?*:|"><)(_) }.jpg);

Inputs:
0) ExifTool object reference 1) File name, file reference, or scalar reference 2-N) [optional] List of tag names to set or options hash references. All writable tags are set if none are specified. The tag names are not case sensitive, and may be prefixed by one or more family 0, 1, 2 or 7 group names with optional leading family numbers, separated by colons (eg. ’exif:iso’). A leading ‘-’ indicates tags to be excluded (eg. ‘-comment’), or a trailing ‘#’ causes the ValueConv value to be copied (same as setting the Type option to ‘ValueConv’ for this tag only). A leading ‘+’ sets the Replace option to 0 on a per-tag basis (see Options below). Wildcards (’*’ and ‘?’) may be used in the tag name. A tag name of ‘*’ is commonly used when a group is specified to copy all tags in the group (eg. ‘XMP:*’). A special feature allows tag names of the form ‘DSTTAG<SRCTAG’ (or ‘SRCTAG>DSTTAG’) to be specified to copy information to a tag with a different name or a specified group. Both ‘SRCTAG’ and ‘DSTTAG’ may contain wildcards and/or be prefixed by a group name (eg. ‘fileModifyDate<modifyDate’ or ‘xmp:*<*’), and/or suffixed by a ‘#’ to disable print conversion. Copied tags may also be added or deleted from a list with arguments of the form ‘DSTTAG+<SRCTAG’ or ‘DSTTAG-<SRCTAG’. Tags are evaluated in order, so exclusions apply only to tags included earlier in the list. An extension of this feature allows the tag value to be set from a string containing tag names with leading ‘$’ symbols (eg. ‘Comment<the file is $filename’). Braces ‘{}’ may be used around a tag name to separate it from subsequent text, and a ‘$$’ is used to to represent a ‘$’ symbol. The behaviour for missing tags in expressions is defined by the “MissingTagValue” option. The tag value may be modified via changes to the default input variable ($_) in a Perl expression placed inside the braces and after a semicolon following the tag name (see the last example above). A ‘@’ may be added after the tag name (before the semicolon) to make the expression act on individual list items instead of the concatenated string for list-type tags. The expression has access to the full ExifTool API through the current ExifTool object ($self) and the tag key ($tag). Braces within the expression must be balanced. Multiple options hash references may be passed to set different options for different tags. Options apply to subsequent tags in the argument list. By default, this routine will commute information between same-named tags in different groups, allowing information to be translated between images with different formats. This behaviour may be modified by specifying a group name for extracted tags (even if ‘*’ is used as a group name), in which case the information is written to the original group, unless redirected to a different group. When ‘*’ is used for a group name, by default the family 1 group of the original tag is preserved, but a different family may be specified with a leading family number. (For example, specifying ‘*:*’ copies all information while preserving the original family 1 groups, while ‘0*:*’ preserves the family 0 group.)

SetNewValuesFromFile Options:
The options are the same was for “SetNewValue”, and are passed directly to “SetNewValue” internally, with a few exceptions: - The Replace option defaults to 1 instead of 0 as with “SetNewValue”, however the tag name argument may be prefixed with ‘+’ to set the Replace option to 0 for this argument only. - The AddValue or DelValue option is set for individual tags if ‘+>’ or ‘->’ (or ‘+<’ or ‘-<’) are used. - The Group option is set for tags where a group name is given. - The Protected flag is set to 1 for individually specified tags. - The Type option also applies to extracted tags.

Return Values:
A hash of information that was set successfully. May include Warning or Error entries if there were problems reading the input file.

Notes:
The PrintConv option applies to this routine, but it normally should be left on to provide more reliable transfer of information between groups. If a preview image exists, it is not copied. The preview image must be transferred separately if desired, in a separate call to “WriteInfo” When simply copying all information between files of the same type, it is usually desirable to preserve the original groups by specifying ‘*:*’ for the tags to set. The “Duplicates” option is always in effect for tags extracted from the source file using this routine. The “Struct” option is enabled by default for tags extracted by this routine. This allows the hierarchy of complex structures to be preserved when copying, but the Struct option may be set to 0 to override this behaviour and copy as flattened tags instead.

CountNewValues

Return the total number of new values set.

$numSet = $exifTool->CountNewValues(); ($numSet, $numPseudo) = $exifTool->CountNewValues();

Inputs:
0) ExifTool object reference

Return Values:
In scalar context, returns the total number of tags with new values set. In list context, also returns the number of “pseudo” tag values which have been set. “Pseudo” tags are tags like FileName and FileModifyDate which are not contained within the file and can be changed without rewriting the file.

SaveNewValues

Save state of new values to be later restored by “RestoreNewValues”.

$exifTool->SaveNewValues(); # save state of new values $exifTool->SetNewValue(ISO => 100); # set new value for ISO $exifTool->WriteInfo($src, $dst1); # write ISO + previous new values $exifTool->RestoreNewValues(); # restore previous new values $exifTool->WriteInfo($src, $dst2); # write previous new values only

Inputs:
0) ExifTool object reference

Return Value:
Count of the number of times this routine has been called (N) since the last time the new values were reset.

RestoreNewValues

Restore new values to the settings that existed when “SaveNewValues” was last called. May be called repeatedly after a single call to “SaveNewValues”. See “SaveNewValues” above for an example.

Inputs:
0) ExifTool object reference

Return Value:
None.

SetAlternateFile

Specify alternate file from which to read metadata. Tags from the alternate file are available after “ExtractInfo” is called or during a call to “SetNewValuesFromFile” by using a family 8 group name (eg. ‘File1’ in the example below).

$exifTool->SetAlternateFile(File1 => images/test1.jpg);

Inputs:
0) ExifTool object reference 1) Family 8 group name, case insensitive (eg. ‘File1’, ‘File2’…) 2) Name of alternate input file, or undef to reset

Return Values:
1 on success, or 0 if the group name is invalid.

SetFileModifyDate

Write the filesystem modification or creation time from the new value of the FileModifyDate or FileCreateDate tag.

$exifTool->SetNewValue(FileModifyDate => 2000:01:02 03:04:05-05:00, Protected => 1); $result = $exifTool->SetFileModifyDate($file);

Inputs:
0) ExifTool object reference 1) File name 2) [optional] Base time if applying shift (days before $^T) 3) [optional] Tag to write: ‘FileModifyDate’ (default), or ‘FileCreateDate’

Return Value:
1 if the time was changed, 0 if nothing was done, or -1 if there was an error setting the time.

Notes:
Equivalent to, but more efficient than calling “WriteInfo” when only the FileModifyDate or FileCreateDate tag has been set. If a timezone is not specified, local time is assumed. When shifting, the time of the original file is used unless the optional base time is specified. The ability to write FileCreateDate is currently restricted to Windows systems only.

SetFileName

Set the file name and directory, or create a hard link. If not specified, the new file name is derived from the new values of the FileName and Directory tags, or from the HardLink or SymLink tag if creating a link. If the FileName tag contains a ‘/’, then the file is renamed into a new directory. If FileName ends with ‘/’, then it is taken as a directory name and the file is moved into the new directory. The new value for the Directory tag takes precedence over any directory specified in FileName.

$result = $exifTool->SetFileName($file); $result = $exifTool->SetFileName($file, $newName);

Inputs:
0) ExifTool object reference 1) Current file name 2) [optional] New file name 3) [optional] ‘HardLink’ or ‘SymLink’ to create a hard or symbolic link instead of renaming the file, or ‘Test’ to test renaming feature by printing the old and new names instead of changing anything.

Return Value:
1 on success, 0 if nothing was done, or -1 if there was an error renaming the file or creating the link.

Notes:
Will not overwrite existing files. New directories are created as necessary. If the file is successfully renamed, the new file name may be accessed via $$exifTool{NewName}.

SetNewGroups

Set the order of the preferred groups when adding new information. In subsequent calls to “SetNewValue”, new information will be created in the first valid group of this list. This has an impact only if the group is not specified when calling “SetNewValue” and if the tag name exists in more than one group. The default order is EXIF, IPTC, XMP, MakerNotes, QuickTime, Photoshop, ICC_Profile, CanonVRD, Adobe. Any family 0 group name may be used. Case is not significant.

$exifTool->SetNewGroups(XMP,EXIF,IPTC);

Inputs:
0) ExifTool object reference 1-N) Groups in order of priority. If no groups are specified, the priorities are reset to the defaults.

Return Value:
None.

GetNewGroups

Get current group priority list.

@groups = $exifTool->GetNewGroups();

Inputs:
0) ExifTool object reference

Return Values:
List of group names in order of write priority. Highest priority first.

GetTagID

Get the ID for the specified tag. The ID is the IFD tag number in EXIF information, the property name in XMP information, or the data offset in a binary data block. For some tags, such as Composite tags where there is no ID, an empty string is returned. In list context, also returns a language code for the tag if available and different from the default language (eg. with alternate language entries for XMP “lang-alt” tags).

$id = $exifTool->GetTagID($tag); ($id, $lang) = $exifTool->GetTagID($tag);

Inputs:
0) ExifTool object reference 1) Tag key

Return Values:
In scalar context, returns the tag ID or ’’ if there is no ID for this tag. In list context, returns the tag ID (or ‘’) and the language code (or undef).

GetDescription

Get description for specified tag. This function will always return a defined value. In the case where the description doesn’t exist, one is generated from the tag name.

Inputs:
0) ExifTool object reference 1) Tag key

Return Values:
A description for the specified tag.

GetGroup

Get group name(s) for a specified tag.

# return family 0 group name (eg. EXIF); $group = $exifTool->GetGroup($tag, 0); # return all groups (eg. qw{EXIF IFD0 Author Main}) @groups = $exifTool->GetGroup($tag); # return groups as a string (eg. Main:IFD0:Author) $group = $exifTool->GetGroup($tag, :3:1:2); # return groups as a simplified string (eg. IFD0:Author) $group = $exifTool->GetGroup($tag, 3:1:2);

Inputs:
0) ExifTool object reference 1) Tag key 2) [optional] Group family number, or string of numbers separated by colons

Return Values:
Group name (or ’’ if tag has no group). If no group family is specified, “GetGroup” returns the name of the group in family 0 when called in scalar context, or the names of groups for all families in list context. Returns a string of group names separated by colons if the input group family contains a colon. The string is simplified to remove a leading ‘Main:’ and adjacent identical group names unless the family string begins with a colon.

Notes:
The group family numbers are currently available: 0) Information Type (eg. EXIF, XMP, IPTC) 1) Specific Location (eg. IFD0, XMP-dc) 2) Category (eg. Author, Time) 3) Document Number (eg. Main, Doc1, Doc3-2) 4) Instance Number (eg. Copy1, Copy2, Copy3…) 5) Metadata Path (eg. JPEG-APP1-IFD0-ExifIFD) 6) EXIF/TIFF Format (eg. int8u, int32u, undef, string) 7) Tag ID (eg. ID-271, ID-rights, ID-a9aut) 8) Alternate File Number (eg. File1, File2, File3…) Families 0 and 1 are based on the file structure, and are similar except that family 1 is more specific and sub-divides some groups to give more detail about the specific location where the information was found. For example, the EXIF group is split up based on the specific IFD (Image File Directory), the MakerNotes group is divided into groups for each manufacturer, and the XMP group is separated based on the XMP namespace prefix. Note that only common XMP namespaces are listed in the GetAllGroups documentation, but additional namespaces may be present in some XMP data. Also note that the ‘XMP-xmp…’ group names may appear in the older form ‘XMP-xap…’ since these names evolved as the XMP standard was developed. The ICC_Profile group is broken down to give information about the specific ICC_Profile tag from which multiple values were extracted. As well, information extracted from the ICC_Profile header is separated into the ICC-header group. Family 2 classifies information based on the logical category to which the information refers. Family 3 gives the document number for tags extracted from embedded documents, or ‘Main’ for tags from the main document. (See the “ExtractEmbedded” option for extracting tags from embedded documents.) Nested sub-documents (if they exist) are indicated by numbers separated with dashes in the group name, to an arbitrary depth. (eg. ‘Doc2-3-1’ is the 1st sub-sub-document of the 3rd sub-document of the 2nd embedded document of the main file.) Document numbers are also used to differentiate samples for timed metadata in videos. Family 4 provides a method for differentiating tags when multiple tags exist with the same name in the same location. The primary instance of a tag (the tag extracted when the Duplicates option is disabled and no group is specified) has no family 4 group name, but additional instances have family 4 group names of ‘Copy1’, ‘Copy2’, ‘Copy3’, etc. For convenience, the primary tag may also be accessed using a group name of ‘Copy0’. Family 5 is experimental, and gives the complete path for the metadata in the file. Generated only if the “SavePath” option is used when extracting. Family 6 is currently used only for EXIF/TIFF metadata, and gives the format type of the extracted value. Generated only if the “SaveFormat” option is used when extracting. Family 7 is used for tag ID’s. The group names are the actual tag ID’s, with a leading “ID-” string. Non-numerical ID’s have characters other than [-_A-Za-z0-9] converted to hex. Numerical tag ID’s are returned in hex if the “HexTagIDs” option is set, otherwise decimal is used. When specifying a family 7 group name, numerical ID’s may be in hex or decimal, and non-numerical ID’s may or may not have characters other than [-_A-Za-z0-9] converted to hex. Note that unlike other group names, the tag ID’s of family 7 group names are case sensitive (but the leading “ID-” is not). Family 8 specifies the alternate file set from a call to “SetAlternateFile”. See “GetAllGroups [static]” for complete lists of group names.

GetGroups

Get list of group names that exist in the specified information.

@groups = $exifTool->GetGroups($info, 2); @groups = $exifTool->GetGroups(3:1);

Inputs:
0) ExifTool object reference 1) [optional] Info hash ref (default is all extracted info) 2) [optional] Group family number, or string of numbers (default 0)

Return Values:
List of group names in alphabetical order. If information hash is not specified, the group names are returned for all extracted information. See “GetGroup” for an description of family numbers and family number strings.

BuildCompositeTags

Builds composite tags from required tags. The composite tags are convenience tags which are derived from the values of other tags. This routine is called automatically by “ImageInfo” and “ExtractInfo” if the Composite option is set.

Inputs:
0) ExifTool object reference

Return Values:
(none)

Notes:
Tag values are calculated in alphabetical order unless a tag Require’s or Desire’s another composite tag, in which case the calculation is deferred until after the other tag is calculated. Composite tags may need to read data from the image for their value to be determined, and for these “BuildCompositeTags” must be called while the image is available. This is only a problem if “ImageInfo” is called with a filename (as opposed to a file reference or scalar reference) since in this case the file is closed before “ImageInfo” returns. Here the Composite option may be used so that “BuildCompositeTags” is called from within “ImageInfo”, before the file is closed.

AvailableOptions [static]

Get a list of available API options. (See “Options” for option details.)

Inputs:
(none)

Return Values:
Reference to list of available options. Each entry in the list is a list reference with 3 items: 0=Option name, 1=Default value, 2=Description. my $opts = Image::ExifTool::<b>AvailableOptions</b>(); foreach (@$opts) { my ($optionName, $defaultValue, $description) = @$_; … }

GetTagName [static]

Get name of tag from tag key. This is a convenience function that strips the embedded instance number, if it exists, from the tag key.

Note: “static” in the heading above indicates that the function does not require an ExifTool object reference as the first argument. All functions documented below are also static.

$tagName = Image::ExifTool::GetTagName($tag);

Inputs:
0) Tag key

Return Value:
Tag name. This is the same as the tag key but has the instance number removed.

GetShortcuts [static]

Get a list of shortcut tags.

Inputs:
(none)

Return Values:
List of shortcut tags (as defined in Image::ExifTool::Shortcuts).

GetAllTags [static]

Get list of all available tag names.

@tagList = Image::ExifTool::GetAllTags($group);

Inputs:
0) [optional] Group name, or string of group names separated by colons

Return Values:
A list of all available tags in alphabetical order, or all tags in a specified group or intersection of groups. The group name is case insensitive, and any group in families 0-2 may be used except for EXIF family 1 groups (ie. the specific IFD).

GetWritableTags [static]

Get list of all writable tag names.

@tagList = Image::ExifTool::GetWritableTags($group);

Inputs:
0) [optional] Group name, or string of group names separated by colons

Return Values:
A list of all writable tags in alphabetical order. These are the tags for which values may be set through “SetNewValue”. If a group name is given, returns only writable tags in specified group(s). The group name is case insensitive, and any group in families 0-2 may be used except for EXIF family 1 groups (ie. the specific IFD).

GetAllGroups [static]

Get list of all group names in specified family.

@groupList = Image::ExifTool::GetAllGroups($family);

Inputs:
0) Group family number (0-7)

Return Values:
A list of all groups in the specified family in alphabetical order.

Here is a complete list of groups for each of these families:

Family 0 (Information Type):
AAC, AFCP, AIFF, APE, APP0, APP1, APP11, APP12, APP13, APP14, APP15, APP2, APP3, APP4, APP5, APP6, APP7, APP8, APP9, ASF, Audible, Canon, CanonVRD, Composite, DICOM, DNG, DV, DjVu, Ducky, EXE, EXIF, ExifTool, FITS, FLAC, FLIR, File, Flash, FlashPix, Font, FotoStation, GIF, GIMP, GeoTiff, GoPro, H264, HTML, ICC_Profile, ID3, IPTC, ISO, ITC, JFIF, JPEG, JSON, JUMBF, Jpeg2000, LNK, Leaf, Lytro, M2TS, MIE, MIFF, MISB, MNG, MOI, MPC, MPEG, MPF, MXF, MakerNotes, Matroska, Meta, Ogg, OpenEXR, Opus, PDF, PICT, PLIST, PNG, PSP, Palm, PanasonicRaw, Parrot, PhotoCD, PhotoMechanic, Photoshop, PostScript, PrintIM, QuickTime, RAF, RIFF, RSRC, RTF, Radiance, Rawzor, Real, Red, SVG, SigmaRaw, Sony, Stim, Theora, Torrent, Trailer, VCard, Vorbis, WTV, XML, XMP, ZIP

Family 1 (Specific Location):
AAC, AC3, AFCP, AIFF, APE, ASF, AVI1, Adobe, AdobeCM, AdobeDNG, Apple, Audible, CBOR, CIFF, CameraIFD, Canon, CanonCustom, CanonDR4, CanonRaw, CanonVRD, Casio, Chapter#, Composite, DICOM, DJI, DNG, DV, DjVu, DjVu-Meta, Ducky, EPPIM, EXE, EXIF, ExifIFD, ExifTool, FITS, FLAC, FLIR, File, Flash, FlashPix, Font, FotoStation, FujiFilm, FujiIFD, GE, GIF, GIMP, GPS, GSpherical, Garmin, GeoTiff, GlobParamIFD, GoPro, GraphConv, H264, HP, HTC, HTML, HTML-dc, HTML-ncc, HTML-office, HTML-prod, HTML-vw96, HTTP-equiv, ICC-chrm, ICC-clrt, ICC-header, ICC-meas, ICC-meta, ICC-view, ICC_Profile, ICC_Profile#, ID3, ID3v1, ID3v1_Enh, ID3v2_2, ID3v2_3, ID3v2_4, IFD0, IFD1, IPTC, IPTC#, ISO, ITC, InfiRay, Insta360, InteropIFD, ItemList, JFIF, JFXX, JPEG, JPEG-HDR, JPS, JSON, JUMBF, JVC, Jpeg2000, KDC_IFD, Keys, Kodak, KodakBordersIFD, KodakEffectsIFD, KodakIFD, KyoceraRaw, LNK, Leaf, LeafSubIFD, Leica, Lyrics3, Lytro, M-RAW, M2TS, MAC, MIE-Audio, MIE-Camera, MIE-Canon, MIE-Doc, MIE-Extender, MIE-Flash, MIE-GPS, MIE-Geo, MIE-Image, MIE-Lens, MIE-Main, MIE-MakerNotes, MIE-Meta, MIE-Orient, MIE-Preview, MIE-Thumbnail, MIE-UTM, MIE-Unknown, MIE-Video, MIFF, MISB, MNG, MOBI, MOI, MPC, MPEG, MPF0, MPImage, MS-DOC, MXF, MacOS, MakerNotes, MakerUnknown, Matroska, MediaJukebox, Meta, MetaIFD, Microsoft, Minolta, MinoltaRaw, Motorola, NITF, Nikon, NikonCapture, NikonCustom, NikonScan, NikonSettings, NineEdits, Nintendo, Ocad, Ogg, Olympus, OpenEXR, Opus, PDF, PICT, PNG, PNG-cICP, PNG-pHYs, PSP, Palm, Panasonic, PanasonicRaw, Parrot, Pentax, PhaseOne, PhotoCD, PhotoMechanic, Photoshop, PictureInfo, PostScript, PreviewIFD, PrintIM, ProfileIFD, Qualcomm, QuickTime, RAF, RAF2, RIFF, RMETA, RSRC, RTF, Radiance, Rawzor, Real, Real-CONT, Real-MDPR, Real-PROP, Real-RA3, Real-RA4, Real-RA5, Real-RJMD, Reconyx, Red, Ricoh, SPIFF, SR2, SR2DataIFD, SR2SubIFD, SRF#, SVG, Samsung, Sanyo, Scalado, Sigma, SigmaRaw, Sony, SonyIDC, Stim, SubIFD, System, Theora, Torrent, Track#, UserData, VCalendar, VCard, VNote, Version0, Vorbis, WTV, XML, XMP, XMP-DICOM, XMP-Device, XMP-GAudio, XMP-GCamera, XMP-GCreations, XMP-GDepth, XMP-GFocus, XMP-GImage, XMP-GPano, XMP-GSpherical, XMP-LImage, XMP-MP, XMP-MP1, XMP-PixelLive, XMP-aas, XMP-acdsee, XMP-album, XMP-apple-fi, XMP-ast, XMP-aux, XMP-cc, XMP-cell, XMP-crd, XMP-creatorAtom, XMP-crs, XMP-dc, XMP-dex, XMP-digiKam, XMP-drone-dji, XMP-dwc, XMP-et, XMP-exif, XMP-exifEX, XMP-expressionmedia, XMP-extensis, XMP-fpv, XMP-getty, XMP-hdr, XMP-hdrgm, XMP-ics, XMP-iptcCore, XMP-iptcExt, XMP-lr, XMP-mediapro, XMP-microsoft, XMP-mwg-coll, XMP-mwg-kw, XMP-mwg-rs, XMP-nine, XMP-panorama, XMP-pdf, XMP-pdfx, XMP-photomech, XMP-photoshop, XMP-plus, XMP-pmi, XMP-prism, XMP-prl, XMP-prm, XMP-pur, XMP-rdf, XMP-sdc, XMP-swf, XMP-tiff, XMP-x, XMP-xmp, XMP-xmpBJ, XMP-xmpDM, XMP-xmpDSA, XMP-xmpMM, XMP-xmpNote, XMP-xmpPLUS, XMP-xmpRights, XMP-xmpTPg, ZIP, iTunes

Family 2 (Category):
Audio, Author, Camera, Device, Document, ExifTool, Image, Location, Other, Preview, Printing, Time, Unknown, Video

Family 3 (Document Number):
Doc#, Main

Family 4 (Instance Number):
Copy#

Family 5 (Metadata Path):
eg. JPEG-APP1-IFD0-ExifIFD

Family 6 (EXIF/TIFF Format):
int8u, string, int16u, int32u, rational64u, int8s, undef, int16s, int32s, rational64s, float, double, ifd, unicode, complex, int64u, int64s, ifd64

Family 7 (Tag ID):
ID-xxx (Where xxx is the tag ID. Numerical ID’s are returned in hex with a leading “0x” if the HexTagIDs option is set, or decimal otherwise. Characters in non-numerical ID’s which are not valid in a group name are returned as 2 hex digits.)

Family 8 (Alternate File):
File#

Note: This function may also be called as an ExifTool member function to allow the HexTagIDs option to be set when retrieving family 7 group names.

GetDeleteGroups [static]

Get list of all deletable group names.

@delGroups = Image::ExifTool::GetDeleteGroups();

Inputs:
None.

Return Values:
A list of deletable group names in alphabetical order. The current list of deletable group names is: Adobe, AFCP, APP0, APP1, APP10, APP11, APP12, APP13, APP14, APP15, APP2, APP3, APP4, APP5, APP6, APP7, APP8, APP9, Audio, Author, Camera, CanonVRD, CIFF, Document, Ducky, EXIF, ExifIFD, ExifTool, File, FlashPix, FotoStation, GlobParamIFD, GPS, ICC_Profile, IFD0, IFD1, Image, Insta360, InteropIFD, IPTC, ItemList, JFIF, Jpeg2000, Keys, Location, MakerNotes, Meta, MetaIFD, Microsoft, MIE, MPF, NikonCapture, Other, PDF, PDF-update, PhotoMechanic, Photoshop, PNG, PNG-pHYs, Preview, PrintIM, Printing, QuickTime, RMETA, RSRC, SubIFD, Time, Trailer, UserData, Video, XML, XML-*, XMP, XMP-* To schedule a group for deletion, call “SetNewValue” with a tag name like ‘EXIF:*’ and an undefined tag value. Deleting a family 0 or 1 group will delete the entire corresponding block of metadata, but deleting a family 2 group (eg. Audio, Author, Camera, etc.) deletes the individual tags belonging to that category. The ‘Trailer’ group allows all trailers in JPEG and TIFF-format images to be deleted at once, including unknown trailers. Note that the JPEG “APP” groups are special, and are used only to delete application segments which are not associated with another deletable group. For example, deleting ‘APP14:*’ will delete other APP14 segments, but not the APP14 “Adobe” segment.

GetFileType [static]

Get type of file given file name.

my $type = Image::ExifTool::GetFileType($filename); my $desc = Image::ExifTool::GetFileType($filename, 1);

Inputs:
0) [optional] File name (or just an extension) 1) [optional] Flag to return a description instead of a type. Default is undef. Set to 0 to also return types of recognized but unsupported files (otherwise the return value for unsupported files is undef), or 1 to return descriptions.

Return Value:
A string, based on the file extension, which indicates the basic format of the file. Note that some files may be based on other formats (like many RAW image formats are based on TIFF). In list context, may return more than one file type if the file may be based on different formats. Returns undef if files with this extension are not yet supported by ExifTool. Returns a list of extensions for all supported file types if no input extension is specified (or all recognized file types if the description flag is set to 0). Returns a more detailed description of the specific file format when the description flag is set.

CanWrite [static]

Can the specified file be written?

my $writable = Image::ExifTool::CanWrite($filename);

Inputs:
0) File name or extension

Return Value:
True if ExifTool supports writing files of this type (based on the file extension).

CanCreate [static]

Can the specified file be created?

my $creatable = Image::ExifTool::CanCreate($filename);

Inputs:
0) File name or extension

Return Value:
True if ExifTool can create files with this extension from scratch. Currently, this can only be done with XMP, MIE, ICC, VRD, DR4, EXV and EXIF files.

AddUserDefinedTags [static]

Add user-defined tags to an existing tag table at run time. This differs from the usual technique of creating user-defined tags via the %Image::ExifTool::UserDefined hash (see the ExifTool_config file in the Image::ExifTool distribution) because it allows tags to be added after a tag table has been initialized.

use Image::ExifTool :Public; my %tags = ( TestTagID1 => { Name => TestTagName1 }, TestTagID2 => { Name => TestTagName2 }, ); my $num = AddUserDefinedTags(Image::ExifTool::PDF::Info, %tags);

Inputs:
0) Destination tag table name 1-N) Pairs of tag ID / tag information hash references for the new tags

Return Value:
The number of tags added.

Notes
Pre-existing tags with the same ID will be replaced in the destination table. See lib/Image/ExifTool/README in the full distribution for full details on the elements of the tag information hash.

CHARACTER ENCODINGS

Certain meta information formats allow coded character sets other than plain ASCII. When reading, most known encodings are converted to the external character set according to the “Charset” option, or to UTF-8 by default. When writing, the inverse conversions are performed. Alternatively, special characters may be converted to/from HTML character entities with the “Escape” HTML option.

A distinction is made between the external character set visible via the ExifTool API, and the internal character used to store text in the metadata of a file. These character sets may be specified separately as follows:

External Character Sets:
The encoding for tag values passed to/from ExifTool API functions is set via the “Charset” option, which is ‘UTF8’ by default. The encoding of file names is specified via the “CharsetFileName” option. By default, “CharsetFileName” is not defined, and file names passed to ExifTool are used directly in calls to the system i/o routines (which expect UTF-8 strings on Mac/Linux, but default to the system code page on Windows). In this mode on Windows a warning is issued if a file name contains special characters, but this warning may be avoided by setting “CharsetFileName” to an empty string. Setting “CharsetFileName” to any other value causes file names to be converted from the specified encoding to one appropriate for the system. In Windows this also has the effect of activating Unicode filename support via the special Windows wide-character i/o routines if Win32API::File is available.

Internal Character Sets:
The encodings used to store strings in the various metadata formats. These encodings may be changed for certain types of metadata via the “CharsetEXIF”, “CharsetID3”, “CharsetIPTC”, “CharsetPhotoshop”, “CharsetQuickTime” and “CharsetRIFF” options.

Values are returned as byte strings of encoded characters. Perl wide characters are not used. By default, most returned strings are encoded in UTF-8. For these, Encode::decode_utf8() may be used to convert to a sequence of logical Perl characters. Note that some settings of the PERL_UNICODE environment variable may be incompatible with ExifTool’s character handling.

More specific details are given below about how character coding is handled for EXIF, IPTC, XMP, PNG, ID3, PDF, Photoshop, QuickTime, AIFF, MIE and Vorbis information:

EXIF

Most textual information in EXIF is stored in ASCII format (called “string” in the ExifTool tag name documentation). By default ExifTool does not convert these strings. However, it is not uncommon for applications to write UTF-8 or other encodings where ASCII is expected. To deal with these, ExifTool allows the internal EXIF string encoding to be specified with “CharsetEXIF”, which causes EXIF string values to be converted from the specified character set when reading, and stored with this character set when writing. (The MWG recommends using UTF-8 encoding for EXIF strings, and in keeping with this the MWG module sets the default internal EXIF string encoding to UTF-8, but note that this will have no effect unless the external encoding is also set to something other than the default of UTF-8.)

A few EXIF tags (UserComment, GPSProcessingMethod and GPSAreaInformation) support a designated internal text encoding, with values stored as ASCII, Unicode (UCS-2) or JIS. When reading these tags, ExifTool converts Unicode and JIS to the external character set specified by the “Charset” option, or to UTF-8 by default. ASCII text is not converted. When writing, text is stored as ASCII unless the string contains special characters, in which case it is converted from the external character set (UTF-8 by default), and stored as Unicode. ExifTool writes Unicode in native EXIF byte ordering by default, but the byte order may be specified by setting the ExifUnicodeByteOrder tag (see the Extra Tags documentation).

The EXIF “XP” tags (XPTitle, XPComment, etc) are always stored as little-endian Unicode (UCS-2), and are read and written using the specified character set.

IPTC

The value of the IPTC:CodedCharacterSet tag determines how the internal IPTC string values are interpreted. If CodedCharacterSet exists and has a value of ‘UTF8’ (or ‘ESC % G’) then string values are assumed to be stored as UTF-8, otherwise Windows Latin1 (cp1252, ‘Latin’) coding is assumed by default, but this can be changed with the “CharsetIPTC” option. When reading, these strings are converted to the character set specified by the “Charset” option. When writing, the inverse conversions are performed. No conversion is done if the internal (IPTC) and external (ExifTool) character sets are the same. Note that ISO 2022 character set shifting is not supported. Instead, a warning is issued and the string is not converted if an ISO 2022 shift code is encountered. See <http://www.iptc.org/IIM/> for the official IPTC specification.

ExifTool may be used to convert IPTC values to a different internal encoding. To do this, all IPTC tags must be rewritten along with the desired value of CodedCharacterSet. For example, the following command changes the internal IPTC encoding to UTF-8 (from Windows Latin1 unless CodedCharacterSet was already ‘UTF8’):

exiftool -tagsfromfile @ -iptc:all -codedcharacterset=utf8 a.jpg

or from Windows Latin2 (cp1250) to UTF-8:

exiftool -tagsfromfile @ -iptc:all -codedcharacterset=utf8 \ -charset iptc=latin2 a.jpg

and this command changes it back from UTF-8 to Windows Latin1 (cp1252):

exiftool -tagsfromfile @ -iptc:all -codedcharacterset= a.jpg

or to Windows Latin2:

exiftool -tagsfromfile @ -iptc:all -codedcharacterset= \ -charset iptc=latin2 a.jpg

Unless CodedCharacterSet is ‘UTF8’, applications have no reliable way to determine the IPTC character encoding. For this reason, it is recommended that CodedCharacterSet be set to ‘UTF8’ when creating new IPTC.

(Note: Here, “IPTC” Refers to the older IPTC IIM format. The more recent IPTC Core and Extension specifications actually use the XMP format.)

XMP

ExifTool reads XMP encoded as UTF-8, UTF-16 or UTF-32, and converts them all to UTF-8 internally. Also, all XML character entity references and numeric character references are converted. When writing, ExifTool always encodes XMP as UTF-8, converting the following 5 characters to XML character references: & < > ’ “. By default no further conversion is performed, however if the “Charset” option is other than ‘UTF8’ then text is converted to/from the specified character set when reading/writing.

PNG

PNG TextualData tags are stored as tEXt, zTXt and iTXt chunks in PNG images. The tEXt and zTXt chunks use ISO 8859-1 encoding, while iTXt uses UTF-8. When reading, ExifTool converts all PNG textual data to the character set specified by the “Charset” option. When writing, ExifTool generates a tEXt chunk (or zTXt with the “Compress” option) if the text doesn’t contain special characters or if Latin encoding is specified; otherwise an iTXt chunk is used and the text is converted from the specified character set and stored as UTF-8.

JPEG Comment

The encoding for the JPEG Comment (COM segment) is not specified, so ExifTool reads/writes this text without conversion.

ID3

The ID3v1 specification officially supports only ISO 8859-1 encoding (a subset of Windows Latin1), although some applications may incorrectly use other character sets. By default ExifTool converts ID3v1 text from Latin to the character set specified by the “Charset” option. However, the internal ID3v1 charset may be specified with the “CharsetID3” option. The encoding for ID3v2 information is stored in the file, so ExifTool converts ID3v2 text from this encoding to the character set specified by the “Charset” option. ExifTool does not currently write ID3 information.

PDF

PDF text strings are stored in either PDFDocEncoding (similar to Windows Latin1) or Unicode (UCS-2). When reading, ExifTool converts to the character set specified by the “Charset” option. When writing, ExifTool encodes input text from the specified character set as Unicode only if the string contains special characters, otherwise PDFDocEncoding is used.

Photoshop

Some Photoshop resource names are stored as Pascal strings with unknown encoding. By default, ExifTool assumes MacRoman encoding and converts this to UTF-8, but the internal and external character sets may be specified with the “CharsetPhotoshop” and “Charset” options respectively.

QuickTime

QuickTime text strings may be stored in a variety of poorly document formats. ExifTool does its best to decode these according to the “Charset” option setting. For some QuickTime strings, ExifTool assumes a default encoding of MacRoman, but this may be changed with the “CharsetQuickTime” option.

AIFF

AIFF strings are assumed to be stored in MacRoman, and are converted according to the “Charset” option when reading.

RIFF

The internal encoding of RIFF strings (eg. in AVI and WAV files) is assumed to be Latin unless otherwise specified by the RIFF CSET chunk or the “CharsetRIFF” option.

MIE

MIE strings are stored as either UTF-8 or ISO 8859-1. When reading, UTF-8 strings are converted according to the “Charset” option, and ISO 8859-1 strings are never converted. When writing, input strings are converted from the specified character set to UTF-8. The resulting strings are stored as UTF-8 if they contain multi-byte UTF-8 character sequences, otherwise they are stored as ISO 8859-1.

Vorbis

Vorbis comments are stored as UTF-8, and are converted to the character set specified by the “Charset” option.

AUTHOR

Copyright 2003-2024, Phil Harvey

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

ACKNOWLEDGEMENTS

Many people have helped in the development of ExifTool through their bug reports, comments and suggestions, and/or additions to the code. See the ACKNOWLEDGEMENTS in the individual Image::ExifTool modules and in html/index.html of the Image::ExifTool distribution package for a list of people who have contributed to this project.

SEE ALSO

exiftool (1), Image::ExifTool::TagNames (3pm), Image::ExifTool::Shortcuts (3pm), Image::ExifTool::Shift (3pm), Image::Info (3pm), Image::MetaData::JPEG (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

747 - Linux cli command srand48

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command srand48 and provides detailed information about the command srand48, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the srand48.

NAME 🖥️ srand48 🖥️

generate uniformly distributed pseudo-random numbers

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
double drand48(void);
double erand48(unsigned short xsubi[3]);
long lrand48(void);
long nrand48(unsigned short xsubi[3]);
long mrand48(void);
long jrand48(unsigned short xsubi[3]);
void srand48(long seedval);
unsigned short *seed48(unsigned short seed16v[3]);
void lcong48(unsigned short param[7]);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

DESCRIPTION

These functions generate pseudo-random numbers using the linear congruential algorithm and 48-bit integer arithmetic.

The drand48() and erand48() functions return nonnegative double-precision floating-point values uniformly distributed over the interval [0.0, 1.0).

The lrand48() and nrand48() functions return nonnegative long integers uniformly distributed over the interval [0, 2^31).

The mrand48() and jrand48() functions return signed long integers uniformly distributed over the interval [-2^31, 2^31).

The srand48(), seed48(), and lcong48() functions are initialization functions, one of which should be called before using drand48(), lrand48(), or mrand48(). The functions erand48(), nrand48(), and jrand48() do not require an initialization function to be called first.

All the functions work by generating a sequence of 48-bit integers, Xi, according to the linear congruential formula:

Xn+1 = (aXn + c) mod m, where n >= 0

The parameter m = 2^48, hence 48-bit integer arithmetic is performed. Unless lcong48() is called, a and c are given by:

a = 0x5DEECE66D
c = 0xB

The value returned by any of the functions drand48(), erand48(), lrand48(), nrand48(), mrand48(), or jrand48() is computed by first generating the next 48-bit Xi in the sequence. Then the appropriate number of bits, according to the type of data item to be returned, is copied from the high-order bits of Xi and transformed into the returned value.

The functions drand48(), lrand48(), and mrand48() store the last 48-bit Xi generated in an internal buffer. The functions erand48(), nrand48(), and jrand48() require the calling program to provide storage for the successive Xi values in the array argument xsubi. The functions are initialized by placing the initial value of Xi into the array before calling the function for the first time.

The initializer function srand48() sets the high order 32-bits of Xi to the argument seedval. The low order 16-bits are set to the arbitrary value 0x330E.

The initializer function seed48() sets the value of Xi to the 48-bit value specified in the array argument seed16v. The previous value of Xi is copied into an internal buffer and a pointer to this buffer is returned by seed48().

The initialization function lcong48() allows the user to specify initial values for Xi, a, and c. Array argument elements param[0-2] specify Xi, param[3-5] specify a, and param[6] specifies c. After lcong48() has been called, a subsequent call to either srand48() or seed48() will restore the standard values of a and c.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

drand48(), erand48(), lrand48(), nrand48(), mrand48(), jrand48(), srand48(), seed48(), lcong48()

Thread safety

MT-Unsafe race:drand48

The above functions record global state information for the random number generator, so they are not thread-safe.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4.

SEE ALSO

rand(3), random(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

748 - Linux cli command TAILQ_INSERT_AFTER

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command TAILQ_INSERT_AFTER and provides detailed information about the command TAILQ_INSERT_AFTER, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the TAILQ_INSERT_AFTER.

NAME 🖥️ TAILQ_INSERT_AFTER 🖥️

implementation of a doubly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
TAILQ_ENTRY(TYPE);
TAILQ_HEAD(HEADNAME, TYPE);
TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD head);
void TAILQ_INIT(TAILQ_HEAD *head);
int TAILQ_EMPTY(TAILQ_HEAD *head);
void TAILQ_INSERT_HEAD(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_TAIL(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_AFTER(TAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_FIRST(TAILQ_HEAD *head);
struct TYPE *TAILQ_LAST(TAILQ_HEAD *head, HEADNAME);
struct TYPE *TAILQ_PREV(struct TYPE *elm, HEADNAME, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_NEXT(struct TYPE *elm, TAILQ_ENTRY NAME);
TAILQ_FOREACH(struct TYPE *var, TAILQ_HEAD *head,
 TAILQ_ENTRY NAME);
TAILQ_FOREACH_REVERSE(struct TYPE *var, TAILQ_HEAD *head, HEADNAME,
 TAILQ_ENTRY NAME);
void TAILQ_REMOVE(TAILQ_HEAD *head, struct TYPE *elm,
 TAILQ_ENTRY NAME);
void TAILQ_CONCAT(TAILQ_HEAD *head1, TAILQ_HEAD *head2,
 TAILQ_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked tail queues.

In the macro definitions, TYPE is the name of a user defined structure, that must contain a field of type TAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user defined structure that must be declared using the macro TAILQ_HEAD().

Creation

A tail queue is headed by a structure defined by the TAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the queue and the other to the last element in the queue. The elements are doubly linked so that an arbitrary element can be removed without traversing the queue. New elements can be added to the queue after an existing element, before an existing element, at the head of the queue, or at the end of the queue. A TAILQ_HEAD structure is declared as follows:

TAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the queue. A pointer to the head of the queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

TAILQ_ENTRY() declares a structure that connects the elements in the queue.

TAILQ_HEAD_INITIALIZER() evaluates to an initializer for the queue head.

TAILQ_INIT() initializes the queue referenced by

TAILQ_EMPTY() evaluates to true if there are no items on the queue. head.

Insertion

TAILQ_INSERT_HEAD() inserts the new element elm at the head of the queue.

TAILQ_INSERT_TAIL() inserts the new element elm at the end of the queue.

TAILQ_INSERT_BEFORE() inserts the new element elm before the element listelm.

TAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

TAILQ_FIRST() returns the first item on the queue, or NULL if the queue is empty.

TAILQ_LAST() returns the last item on the queue. If the queue is empty the return value is NULL.

TAILQ_PREV() returns the previous item on the queue, or NULL if this item is the first.

TAILQ_NEXT() returns the next item on the queue, or NULL if this item is the last.

TAILQ_FOREACH() traverses the queue referenced by head in the forward direction, assigning each element in turn to var. var is set to NULL if the loop completes normally, or if there were no elements.

TAILQ_FOREACH_REVERSE() traverses the queue referenced by head in the reverse direction, assigning each element in turn to var.

Removal

TAILQ_REMOVE() removes the element elm from the queue.

Other features

TAILQ_CONCAT() concatenates the queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

TAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

TAILQ_FIRST(), TAILQ_LAST(), TAILQ_PREV(), and TAILQ_NEXT() return a pointer to the first, last, previous, or next TYPE structure, respectively.

TAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

STANDARDS

BSD.

HISTORY

4.4BSD.

CAVEATS

TAILQ_FOREACH() and TAILQ_FOREACH_REVERSE() don’t allow var to be removed or freed within the loop, as it would interfere with the traversal. TAILQ_FOREACH_SAFE() and TAILQ_FOREACH_REVERSE_SAFE(), which are present on the BSDs but are not present in glibc, fix this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    TAILQ_ENTRY(entry) entries;             /* Tail queue */
};
TAILQ_HEAD(tailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct tailhead head;                   /* Tail queue head */
    int i;
    TAILQ_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    TAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    TAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    TAILQ_INSERT_AFTER(&head, n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    TAILQ_INSERT_BEFORE(n2, n3, entries);
    TAILQ_REMOVE(&head, n2, entries);       /* Deletion */
    free(n2);
                                            /* Forward traversal */
    i = 0;
    TAILQ_FOREACH(np, &head, entries)
        np->data = i++;
                                            /* Reverse traversal */
    TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = TAILQ_FIRST(&head); while (n1 != NULL) { n2 = TAILQ_NEXT(n1, entries); free(n1); n1 = n2; } TAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

749 - Linux cli command iovectype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command iovectype and provides detailed information about the command iovectype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the iovectype.

NAME 🖥️ iovectype 🖥️

Vector I/O data structure

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/uio.h>
struct iovec {
 void *iov_base; /* Starting address */
 size_t iov_len; /* Size of the memory pointed to by 
iov_base. */
};

DESCRIPTION

Describes a region of memory, beginning at iov_base address and with the size of iov_len bytes. System calls use arrays of this structure, where each element of the array represents a memory region, and the whole array represents a vector of memory regions. The maximum number of iovec structures in that array is limited by IOV_MAX (defined in <limits.h>, or accessible via the call sysconf(_SC_IOV_MAX)).

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

The following header also provides this type: <sys/socket.h>.

SEE ALSO

process_madvise(2), readv(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

750 - Linux cli command list

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command list and provides detailed information about the command list, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the list.

NAME 🖥️ list 🖥️

implementation of a doubly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
LIST_ENTRY(TYPE);
LIST_HEAD(HEADNAME, TYPE);
LIST_HEAD LIST_HEAD_INITIALIZER(LIST_HEAD head);
void LIST_INIT(LIST_HEAD *head);
int LIST_EMPTY(LIST_HEAD *head);
void LIST_INSERT_HEAD(LIST_HEAD *head,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
struct TYPE *LIST_FIRST(LIST_HEAD *head);
struct TYPE *LIST_NEXT(struct TYPE *elm, LIST_ENTRY NAME);
LIST_FOREACH(struct TYPE *var, LIST_HEAD *head, LIST_ENTRY NAME);
void LIST_REMOVE(struct TYPE *elm, LIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type LIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro LIST_HEAD().

Creation

A list is headed by a structure defined by the LIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are doubly linked so that an arbitrary element can be removed without traversing the list. New elements can be added to the list after an existing element, before an existing element, or at the head of the list. A LIST_HEAD structure is declared as follows:

LIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

LIST_ENTRY() declares a structure that connects the elements in the list.

LIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

LIST_INIT() initializes the list referenced by head.

LIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

LIST_INSERT_HEAD() inserts the new element elm at the head of the list.

LIST_INSERT_BEFORE() inserts the new element elm before the element listelm.

LIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

LIST_FIRST() returns the first element in the list, or NULL if the list is empty.

LIST_NEXT() returns the next element in the list, or NULL if this is the last.

LIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

LIST_REMOVE() removes the element elm from the list.

RETURN VALUE

LIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

LIST_FIRST(), and LIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

LIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

LIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. LIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    LIST_ENTRY(entry) entries;              /* List */
};
LIST_HEAD(listhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct listhead head;                   /* List head */
    int i;
    LIST_INIT(&head);                       /* Initialize the list */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    LIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    LIST_INSERT_AFTER(n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    LIST_INSERT_BEFORE(n2, n3, entries);
    i = 0;                                  /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        np->data = i++;
    LIST_REMOVE(n2, entries);               /* Deletion */
    free(n2);
                                            /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* List deletion */ n1 = LIST_FIRST(&head); while (n1 != NULL) { n2 = LIST_NEXT(n1, entries); free(n1); n1 = n2; } LIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

751 - Linux cli command res_nquerydomain

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command res_nquerydomain and provides detailed information about the command res_nquerydomain, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the res_nquerydomain.

NAME 🖥️ res_nquerydomain 🖥️

resolver routines

LIBRARY

Resolver library (libresolv, -lresolv)

SYNOPSIS

#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
struct __res_state;
typedef struct __res_state *res_state;
int res_ninit(res_state statep);
void res_nclose(res_state statep);
int res_nquery(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nsearch(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nquerydomain(res_state statep,
 const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
int res_nmkquery(res_state statep,
 int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
int res_nsend(res_state statep,
 const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);
int dn_comp(const char *exp_dn, unsigned char comp_dn[.length],
 int length, unsigned char **dnptrs,
 unsigned char **lastdnptr);
int dn_expand(const unsigned char *msg,
 const unsigned char *eomorig,
 const unsigned char *comp_dn, char exp_dn[.length],
 int length);
[[deprecated]] extern struct __res_state _res;
[[deprecated]] int res_init(void);
[[deprecated]]
int res_query(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_search(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_querydomain(const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
[[deprecated]]
int res_mkquery(int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
[[deprecated]]
int res_send(const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);

DESCRIPTION

Note: This page is incomplete (various resolver functions provided by glibc are not described) and likely out of date.

The functions described below make queries to and interpret the responses from Internet domain name servers.

The API consists of a set of more modern, reentrant functions and an older set of nonreentrant functions that have been superseded. The traditional resolver interfaces such as res_init() and res_query() use some static (global) state stored in the _res structure, rendering these functions non-thread-safe. BIND 8.2 introduced a set of new interfaces res_ninit(), res_nquery(), and so on, which take a res_state as their first argument, so you can use a per-thread resolver state.

The res_ninit() and res_init() functions read the configuration files (see resolv.conf(5)) to get the default domain name and name server address(es). If no server is given, the local host is tried. If no domain is given, that associated with the local host is used. It can be overridden with the environment variable LOCALDOMAIN. res_ninit() or res_init() is normally executed by the first call to one of the other functions. Every call to res_ninit() requires a corresponding call to res_nclose() to free memory allocated by res_ninit() and subsequent calls to res_nquery().

The res_nquery() and res_query() functions query the name server for the fully qualified domain name name of specified type and class. The reply is left in the buffer answer of length anslen supplied by the caller.

The res_nsearch() and res_search() functions make a query and waits for the response like res_nquery() and res_query(), but in addition they implement the default and search rules controlled by RES_DEFNAMES and RES_DNSRCH (see description of _res options below).

The res_nquerydomain() and res_querydomain() functions make a query using res_nquery()/res_query() on the concatenation of name and domain.

The following functions are lower-level routines used by res_nquery()/res_query().

The res_nmkquery() and res_mkquery() functions construct a query message in buf of length buflen for the domain name dname. The query type op is one of the following (typically QUERY):

QUERY
Standard query.

IQUERY
Inverse query. This option was removed in glibc 2.26, since it has not been supported by DNS servers for a very long time.

NS_NOTIFY_OP
Notify secondary of SOA (Start of Authority) change.

newrr is currently unused.

The res_nsend() and res_send() function send a preformatted query given in msg of length msglen and returns the answer in answer which is of length anslen. They will call res_ninit()/res_init() if it has not already been called.

The dn_comp() function compresses the domain name exp_dn and stores it in the buffer comp_dn of length length. The compression uses an array of pointers dnptrs to previously compressed names in the current message. The first pointer points to the beginning of the message and the list ends with NULL. The limit of the array is specified by lastdnptr. If dnptr is NULL, domain names are not compressed. If lastdnptr is NULL, the list of labels is not updated.

The dn_expand() function expands the compressed domain name comp_dn to a full domain name, which is placed in the buffer exp_dn of size length. The compressed name is contained in a query or reply message, and msg points to the beginning of the message.

The resolver routines use configuration and state information contained in a __res_state structure (either passed as the statep argument, or in the global variable _res, in the case of the older nonreentrant functions). The only field of this structure that is normally manipulated by the user is the options field. This field can contain the bitwise “OR” of the following options:

RES_INIT
True if res_ninit() or res_init() has been called.

RES_DEBUG
Print debugging messages. This option is available only if glibc was built with debugging enabled, which is not the default.

RES_AAONLY (unimplemented; deprecated in glibc 2.25)
Accept authoritative answers only. res_send() continues until it finds an authoritative answer or returns an error. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEVC
Use TCP connections for queries rather than UDP datagrams.

RES_PRIMARY (unimplemented; deprecated in glibc 2.25)
Query primary domain name server only. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_IGNTC
Ignore truncation errors. Don’t retry with TCP.

RES_RECURSE
Set the recursion desired bit in queries. Recursion is carried out by the domain name server, not by res_send(). [Enabled by default].

RES_DEFNAMES
If set, res_search() will append the default domain name to single component names—that is, those that do not contain a dot. [Enabled by default].

RES_STAYOPEN
Used with RES_USEVC to keep the TCP connection open between queries.

RES_DNSRCH
If set, res_search() will search for hostnames in the current domain and in parent domains. This option is used by gethostbyname(3). [Enabled by default].

RES_INSECURE1
Accept a response from a wrong server. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_INSECURE2
Accept a response which contains a wrong query. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_NOALIASES
Disable usage of HOSTALIASES environment variable.

RES_USE_INET6
Try an AAAA query before an A query inside the gethostbyname(3) function, and map IPv4 responses in IPv6 “tunneled form” if no AAAA records are found but an A record set exists. Since glibc 2.25, this option is deprecated, and its usage produces a warning; applications should use getaddrinfo(3), rather than gethostbyname(3).

RES_ROTATE
Causes round-robin selection of name servers from among those listed. This has the effect of spreading the query load among all listed servers, rather than having all clients try the first listed server first every time.

RES_NOCHECKNAME (unimplemented; deprecated in glibc 2.25)
Disable the modern BIND checking of incoming hostnames and mail names for invalid characters such as underscore (_), non-ASCII, or control characters. This option was present until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_KEEPTSIG (unimplemented; deprecated in glibc 2.25)
Do not strip TSIG records. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_BLAST (unimplemented; deprecated in glibc 2.25)
Send each query simultaneously and recursively to all servers. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEBSTRING (glibc 2.3.4 to glibc 2.24)
Make reverse IPv6 lookups using the bit-label format described in RFC 2673; if this option is not set (which is the default), then nibble format is used. This option was removed in glibc 2.25, since it relied on a backward-incompatible DNS extension that was never deployed on the Internet.

RES_NOIP6DOTINT (glibc 2.24 and earlier)
Use ip6.arpa zone in IPv6 reverse lookup instead of ip6.int, which is deprecated since glibc 2.3.4. This option is present up to and including glibc 2.24, where it is enabled by default. In glibc 2.25, this option was removed.

RES_USE_EDNS0 (since glibc 2.6)
Enables support for the DNS extensions (EDNS0) described in RFC 2671.

RES_SNGLKUP (since glibc 2.10)
By default, glibc performs IPv4 and IPv6 lookups in parallel since glibc 2.9. Some appliance DNS servers cannot handle these queries properly and make the requests time out. This option disables the behavior and makes glibc perform the IPv6 and IPv4 requests sequentially (at the cost of some slowdown of the resolving process).

RES_SNGLKUPREOP
When RES_SNGLKUP option is enabled, opens a new socket for the each request.

RES_USE_DNSSEC
Use DNSSEC with OK bit in OPT record. This option implies RES_USE_EDNS0.

RES_NOTLDQUERY
Do not look up unqualified name as a top-level domain (TLD).

RES_DEFAULT
Default option which implies: RES_RECURSE, RES_DEFNAMES, RES_DNSRCH, and RES_NOIP6DOTINT.

RETURN VALUE

The res_ninit() and res_init() functions return 0 on success, or -1 if an error occurs.

The res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), res_querydomain(), res_nmkquery(), res_mkquery(), res_nsend(), and res_send() functions return the length of the response, or -1 if an error occurs.

The dn_comp() and dn_expand() functions return the length of the compressed name, or -1 if an error occurs.

In the case of an error return from res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), or res_querydomain(), the global variable h_errno (see gethostbyname(3)) can be consulted to determine the cause of the error.

FILES

/etc/resolv.conf
resolver configuration file

/etc/host.conf
resolver configuration file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

res_ninit(), res_nclose(), res_nquery(), res_nsearch(), res_nquerydomain(), res_nsend()

Thread safetyMT-Safe locale

res_nmkquery(), dn_comp(), dn_expand()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

4.3BSD.

SEE ALSO

gethostbyname(3), resolv.conf(5), resolver(5), hostname(7), named(8)

The GNU C library source file resolv/README.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

752 - Linux cli command XtGetConstraintResourceList

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGetConstraintResourceList and provides detailed information about the command XtGetConstraintResourceList, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGetConstraintResourceList.

NAME 🖥️ XtGetConstraintResourceList 🖥️

obtain resource list

SYNTAX

#include <X11/Intrinsic.h>

void XtGetResourceList(WidgetClass class, XtResourceList *resources_return, Cardinal *num_resources_return);

void XtGetConstraintResourceList(WidgetClass class, XtResourceList *resources_return, Cardinal *num_resources_return);

ARGUMENTS

num_resources_return
Specifies a pointer to where to store the number of entries in the resource list.

resources_return
Specifies a pointer to where to store the returned resource list. The caller must free this storage using XtFree when done with it.

widget_class
Specifies the widget class for which you want the list.

DESCRIPTION

If XtGetResourceList is called before the widget class is initialized (that is, before the first widget of that class has been created), XtGetResourceList returns the resource list as specified in the widget class record. If it is called after the widget class has been initialized, XtGetResourceList returns a merged resource list that contains the resources for all superclasses. The list returned by XtGetResourceList should be freed using XtFree when it is no longer needed.

If XtGetConstraintResourceList is called before the widget class is initialized (that is, before the first widget of that class has been created), XtGetConstraintResourceList returns the resource list as specified in the widget class Constraint part record. If it is called after the widget class has been initialized, XtGetConstraintResourceList returns a merged resource list that contains the Constraint resources for all superclasses. If the specified class is not a subclass of constraintWidgetClass, *resources_return is set to NULL and *num_resources_return is set to zero. The list returned by XtGetConstraintResourceList should be freed using XtFree when it is no longer needed.

SEE ALSO

XtGetSubresources(3), XtOffset(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

753 - Linux cli command YAML_Tinypm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command YAML_Tinypm and provides detailed information about the command YAML_Tinypm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the YAML_Tinypm.

NAME 🖥️ YAML_Tinypm 🖥️

Read/Write YAML files with as little code as possible

VERSION

version 1.74

PREAMBLE

The YAML specification is huge. Really, really huge. It contains all the functionality of XML, except with flexibility and choice, which makes it easier to read, but with a formal specification that is more complex than XML.

The original pure-Perl implementation YAML costs just over 4 megabytes of memory to load. Just like with Windows .ini files (3 meg to load) and CSS (3.5 meg to load) the situation is just asking for a YAML::Tiny module, an incomplete but correct and usable subset of the functionality, in as little code as possible.

Like the other ::Tiny modules, YAML::Tiny has no non-core dependencies, does not require a compiler to install, is back-compatible to Perl v5.8.1, and can be inlined into other modules if needed.

In exchange for adding this extreme flexibility, it provides support for only a limited subset of YAML. But the subset supported contains most of the features for the more common uses of YAML.

SYNOPSIS

Assuming file.yml like this:

— rootproperty: blah section: one: two three: four Foo: Bar empty: ~

Read and write file.yml like this:

use YAML::Tiny; # Open the config my $yaml = YAML::Tiny->read( file.yml ); # Get a reference to the first document my $config = $yaml->[0]; # Or read properties directly my $root = $yaml->[0]->{rootproperty}; my $one = $yaml->[0]->{section}->{one}; my $Foo = $yaml->[0]->{section}->{Foo}; # Change data directly $yaml->[0]->{newsection} = { this => that }; # Add a section $yaml->[0]->{section}->{Foo} = Not Bar!; # Change a value delete $yaml->[0]->{section}; # Delete a value # Save the document back to the file $yaml->write( file.yml );

To create a new YAML file from scratch:

# Create a new object with a single hashref document my $yaml = YAML::Tiny->new( { wibble => “wobble” } ); # Add an arrayref document push @$yaml, [ foo, bar, baz ]; # Save both documents to a file $yaml->write( data.yml );

Then data.yml will contain:

— wibble: wobble — - foo - bar - baz

DESCRIPTION

YAML::Tiny is a perl class for reading and writing YAML-style files, written with as little code as possible, reducing load time and memory overhead.

Most of the time it is accepted that Perl applications use a lot of memory and modules. The ::Tiny family of modules is specifically intended to provide an ultralight and zero-dependency alternative to many more-thorough standard modules.

This module is primarily for reading human-written files (like simple config files) and generating very simple human-readable files. Note that I said human-readable and not geek-readable. The sort of files that your average manager or secretary should be able to look at and make sense of.

YAML::Tiny does not generate comments, it won’t necessarily preserve the order of your hashes, and it will normalise if reading in and writing out again.

It only supports a very basic subset of the full YAML specification.

Usage is targeted at files like Perl’s META.yml, for which a small and easily-embeddable module is extremely attractive.

Features will only be added if they are human readable, and can be written in a few lines of code. Please don’t be offended if your request is refused. Someone has to draw the line, and for YAML::Tiny that someone is me.

If you need something with more power move up to YAML (7 megabytes of memory overhead) or YAML::XS (6 megabytes memory overhead and requires a C compiler).

To restate, YAML::Tiny does not preserve your comments, whitespace, or the order of your YAML data. But it should round-trip from Perl structure to file and back again just fine.

METHODS

new

The constructor new creates a YAML::Tiny object as a blessed array reference. Any arguments provided are taken as separate documents to be serialized.

read $filename

The read constructor reads a YAML file from a file name, and returns a new YAML::Tiny object containing the parsed content.

Returns the object on success or throws an error on failure.

read_string $string;

The read_string constructor reads YAML data from a character string, and returns a new YAML::Tiny object containing the parsed content. If you have read the string from a file yourself, be sure that you have correctly decoded it into characters first.

Returns the object on success or throws an error on failure.

write $filename

The write method generates the file content for the properties, and writes it to disk using UTF-8 encoding to the filename specified.

Returns true on success or throws an error on failure.

write_string

Generates the file content for the object and returns it as a character string. This may contain non-ASCII characters and should be encoded before writing it to a file.

Returns true on success or throws an error on failure.

errstr (DEPRECATED)

Prior to version 1.57, some errors were fatal and others were available only via the $YAML::Tiny::errstr variable, which could be accessed via the errstr() method.

Starting with version 1.57, all errors are fatal and throw exceptions.

The $errstr variable is still set when exceptions are thrown, but $errstr and the errstr() method are deprecated and may be removed in a future release. The first use of errstr() will issue a deprecation warning.

FUNCTIONS

YAML::Tiny implements a number of functions to add compatibility with the YAML API. These should be a drop-in replacement.

Dump

my $string = Dump(list-of-Perl-data-structures);

Turn Perl data into YAML. This function works very much like Data::Dumper::Dumper().

It takes a list of Perl data structures and dumps them into a serialized form.

It returns a character string containing the YAML stream. Be sure to encode it as UTF-8 before serializing to a file or socket.

The structures can be references or plain scalars.

Dies on any error.

Load

my @data_structures = Load(string-containing-a-YAML-stream);

Turn YAML into Perl data. This is the opposite of Dump.

Just like Storable’s thaw() function or the eval() function in relation to Data::Dumper.

It parses a character string containing a valid YAML stream into a list of Perl data structures representing the individual YAML documents. Be sure to decode the character string correctly if the string came from a file or socket.

my $last_data_structure = Load(string-containing-a-YAML-stream);

For consistency with YAML.pm, when Load is called in scalar context, it returns the data structure corresponding to the last of the YAML documents found in the input stream.

Dies on any error.

freeze() and thaw()

Aliases to Dump() and Load() for Storable fans. This will also allow YAML::Tiny to be plugged directly into modules like POE.pm, that use the freeze/thaw API for internal serialization.

DumpFile(filepath, list)

Writes the YAML stream to a file with UTF-8 encoding instead of just returning a string.

Dies on any error.

LoadFile(filepath)

Reads the YAML stream from a UTF-8 encoded file instead of a string.

Dies on any error.

YAML TINY SPECIFICATION

This section of the documentation provides a specification for YAML Tiny, a subset of the YAML specification.

It is based on and described comparatively to the YAML 1.1 Working Draft 2004-12-28 specification, located at <http://yaml.org/spec/current.html>.

Terminology and chapter numbers are based on that specification.

1. Introduction and Goals

The purpose of the YAML Tiny specification is to describe a useful subset of the YAML specification that can be used for typical document-oriented use cases such as configuration files and simple data structure dumps.

Many specification elements that add flexibility or extensibility are intentionally removed, as is support for complex data structures, class and object-orientation.

In general, the YAML Tiny language targets only those data structures available in JSON, with the additional limitation that only simple keys are supported.

As a result, all possible YAML Tiny documents should be able to be transformed into an equivalent JSON document, although the reverse is not necessarily true (but will be true in simple cases).

As a result of these simplifications the YAML Tiny specification should be implementable in a (relatively) small amount of code in any language that supports Perl Compatible Regular Expressions (PCRE).

2. Introduction

YAML Tiny supports three data structures. These are scalars (in a variety of forms), block-form sequences and block-form mappings. Flow-style sequences and mappings are not supported, with some minor exceptions detailed later.

The use of three dashes — to indicate the start of a new document is supported, and multiple documents per file/stream is allowed.

Both line and inline comments are supported.

Scalars are supported via the plain style, single quote and double quote, as well as literal-style and folded-style multi-line scalars.

The use of explicit tags is not supported.

The use of null type scalars is supported via the ~ character.

The use of bool type scalars is not supported.

However, serializer implementations should take care to explicitly escape strings that match a bool keyword in the following set to prevent other implementations that do support bool accidentally reading a string as a boolean

y|Y|yes|Yes|YES|n|N|no|No|NO |true|True|TRUE|false|False|FALSE |on|On|ON|off|Off|OFF

The use of anchors and aliases is not supported.

The use of directives is supported only for the %YAML directive.

3. Processing YAML Tiny Information

Processes

The YAML specification dictates three-phase serialization and three-phase deserialization.

The YAML Tiny specification does not mandate any particular methodology or mechanism for parsing.

Any compliant parser is only required to parse a single document at a time. The ability to support streaming documents is optional and most likely non-typical.

Because anchors and aliases are not supported, the resulting representation graph is thus directed but (unlike the main YAML specification) acyclic.

Circular references/pointers are not possible, and any YAML Tiny serializer detecting a circular reference should error with an appropriate message.

Presentation Stream

YAML Tiny reads and write UTF-8 encoded files. Operations on strings expect or produce Unicode characters not UTF-8 encoded bytes.

Loading Failure Points

YAML Tiny parsers and emitters are not expected to recover from, or adapt to, errors. The specific error modality of any implementation is not dictated (return codes, exceptions, etc.) but is expected to be consistent.

4. Syntax

Character Set

YAML Tiny streams are processed in memory as Unicode characters and read/written with UTF-8 encoding.

The escaping and unescaping of the 8-bit YAML escapes is required.

The escaping and unescaping of 16-bit and 32-bit YAML escapes is not required.

Indicator Characters

Support for the ~ null/undefined indicator is required.

Implementations may represent this as appropriate for the underlying language.

Support for the - block sequence indicator is required.

Support for the ? mapping key indicator is not required.

Support for the : mapping value indicator is required.

Support for the , flow collection indicator is not required.

Support for the [ flow sequence indicator is not required, with one exception (detailed below).

Support for the ] flow sequence indicator is not required, with one exception (detailed below).

Support for the { flow mapping indicator is not required, with one exception (detailed below).

Support for the } flow mapping indicator is not required, with one exception (detailed below).

Support for the # comment indicator is required.

Support for the & anchor indicator is not required.

Support for the * alias indicator is not required.

Support for the ! tag indicator is not required.

Support for the | literal block indicator is required.

Support for the > folded block indicator is required.

Support for the ’ single quote indicator is required.

Support for the """ double quote indicator is required.

Support for the % directive indicator is required, but only for the special case of a %YAML version directive before the — document header, or on the same line as the document header.

For example:

%YAML 1.1 — - A sequence with a single element

Special Exception:

To provide the ability to support empty sequences and mappings, support for the constructs [] (empty sequence) and {} (empty mapping) are required.

For example,

%YAML 1.1 # A document consisting of only an empty mapping — {} # A document consisting of only an empty sequence — [] # A document consisting of an empty mapping within a sequence - foo - {} - bar

Syntax Primitives

Other than the empty sequence and mapping cases described above, YAML Tiny supports only the indentation-based block-style group of contexts.

All five scalar contexts are supported.

Indentation spaces work as per the YAML specification in all cases.

Comments work as per the YAML specification in all simple cases. Support for indented multi-line comments is not required.

Separation spaces work as per the YAML specification in all cases.

YAML Tiny Character Stream

The only directive supported by the YAML Tiny specification is the %YAML language/version identifier. Although detected, this directive will have no control over the parsing itself.

The parser must recognise both the YAML 1.0 and YAML 1.1+ formatting of this directive (as well as the commented form, although no explicit code should be needed to deal with this case, being a comment anyway)

That is, all of the following should be supported.

— #YAML:1.0 - foo %YAML:1.0 — - foo % YAML 1.1 — - foo

Support for the %TAG directive is not required.

Support for additional directives is not required.

Support for the document boundary marker — is required.

Support for the document boundary market … is not required.

If necessary, a document boundary should simply be indicated with a — marker, with no preceding … marker.

Support for empty streams (containing no documents) is required.

Support for implicit document starts is required.

That is, the following must be equivalent.

# Full form %YAML 1.1 — foo: bar # Implicit form foo: bar

Nodes

Support for nodes optional anchor and tag properties is not required.

Support for node anchors is not required.

Support for node tags is not required.

Support for alias nodes is not required.

Support for flow nodes is not required.

Support for block nodes is required.

Scalar Styles

Support for all five scalar styles is required as per the YAML specification, although support for quoted scalars spanning more than one line is not required.

Support for multi-line scalar documents starting on the header is not required.

Support for the chomping indicators on multi-line scalar styles is required.

Collection Styles

Support for block-style sequences is required.

Support for flow-style sequences is not required.

Support for block-style mappings is required.

Support for flow-style mappings is not required.

Both sequences and mappings should be able to be arbitrarily nested.

Support for plain-style mapping keys is required.

Support for quoted keys in mappings is not required.

Support for ?-indicated explicit keys is not required.

Here endeth the specification.

Additional Perl-Specific Notes

For some Perl applications, it’s important to know if you really have a number and not a string.

That is, in some contexts is important that 3 the number is distinctive from 3 the string.

Because even Perl itself is not trivially able to understand the difference (certainly without XS-based modules) Perl implementations of the YAML Tiny specification are not required to retain the distinctiveness of 3 vs 3.

SUPPORT

Bugs should be reported via the CPAN bug tracker at

<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=YAML-Tiny>

AUTHOR

Adam Kennedy <[email protected]>

SEE ALSO

  • YAML

  • YAML::Syck

  • Config::Tiny

  • CSS::Tiny

  • <http://use.perl.org/use.perl.org/_Alias/journal/29427.html>

  • <http://ali.as/>

COPYRIGHT

Copyright 2006 - 2013 Adam Kennedy.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

754 - Linux cli command strcpy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strcpy and provides detailed information about the command strcpy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strcpy.

NAME 🖥️ strcpy 🖥️

copy or catenate a string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *stpcpy(char *restrict dst, const char *restrict src);
char *strcpy(char *restrict dst, const char *restrict src);
char *strcat(char *restrict dst, const char *restrict src);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

stpcpy():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

stpcpy()
strcpy()
These functions copy the string pointed to by src, into a string at the buffer pointed to by dst. The programmer is responsible for allocating a destination buffer large enough, that is, strlen(src) + 1. For the difference between the two functions, see RETURN VALUE.

strcat()
This function catenates the string pointed to by src, after the string pointed to by dst (overwriting its terminating null byte). The programmer is responsible for allocating a destination buffer large enough, that is, strlen(dst) + strlen(src) + 1.

An implementation of these functions might be:

char *
stpcpy(char *restrict dst, const char *restrict src)
{
    char  *p;
    p = mempcpy(dst, src, strlen(src));
    *p = '';
    return p;
}
char *
strcpy(char *restrict dst, const char *restrict src)
{
    stpcpy(dst, src);
    return dst;
}
char *
strcat(char *restrict dst, const char *restrict src)
{
    stpcpy(dst + strlen(dst), src);
    return dst;
}

RETURN VALUE

stpcpy()
This function returns a pointer to the terminating null byte of the copied string.

strcpy()
strcat()
These functions return dst.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

stpcpy(), strcpy(), strcat()

Thread safetyMT-Safe

STANDARDS

stpcpy()
POSIX.1-2008.

strcpy()
strcat()
C11, POSIX.1-2008.

STANDARDS

stpcpy()
POSIX.1-2008.

strcpy()
strcat()
POSIX.1-2001, C89, SVr4, 4.3BSD.

CAVEATS

The strings src and dst may not overlap.

If the destination buffer is not large enough, the behavior is undefined. See _FORTIFY_SOURCE in feature_test_macros(7).

strcat() can be very inefficient. Read about Shlemiel the painter.

EXAMPLES

#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int
main(void)
{
    char    *p;
    char    *buf1;
    char    *buf2;
    size_t  len, maxsize;
    maxsize = strlen("Hello ") + strlen("world") + strlen("!") + 1;
    buf1 = malloc(sizeof(*buf1) * maxsize);
    if (buf1 == NULL)
        err(EXIT_FAILURE, "malloc()");
    buf2 = malloc(sizeof(*buf2) * maxsize);
    if (buf2 == NULL)
        err(EXIT_FAILURE, "malloc()");
    p = buf1;
    p = stpcpy(p, "Hello ");
    p = stpcpy(p, "world");
    p = stpcpy(p, "!");
    len = p - buf1;
    printf("[len = %zu]: ", len);
    puts(buf1);  // "Hello world!"
    free(buf1);
    strcpy(buf2, "Hello ");
    strcat(buf2, "world");
    strcat(buf2, "!");
    len = strlen(buf2);
    printf("[len = %zu]: ", len);
    puts(buf2);  // "Hello world!"
    free(buf2);
    exit(EXIT_SUCCESS);
}

SEE ALSO

strdup(3), string(3), wcscpy(3), string_copying(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

755 - Linux cli command XtAppLock

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppLock and provides detailed information about the command XtAppLock, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppLock.

NAME 🖥️ XtAppLock 🖥️

lock and unlock application context

SYNTAX

#include <X11/Intrinsic.h>

void XtAppLock(XtAppContext app_context);

void XtAppUnlock(XtAppContext app_context);

ARGUMENTS

app_context
Specifies the application context.

DESCRIPTION

XtAppLock locks the application context including all its related displays and widgets.

XtAppUnlock unlocks the application context.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

756 - Linux cli command zip_compression_method_supported

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_compression_method_supported and provides detailed information about the command zip_compression_method_supported, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_compression_method_supported.

libzip (-lzip)

The

returns if the compression method

is supported for compression (if

is zero) or decompression (otherwise).

Returns 1 if the method is supported, 0 otherwise.

was added in libzip 1.7.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

757 - Linux cli command Image_ExifTool_FLIRpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_FLIRpm and provides detailed information about the command Image_ExifTool_FLIRpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_FLIRpm.

NAME 🖥️ Image_ExifTool_FLIRpm 🖥️

Read FLIR meta information

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains the definitions to read meta information from FLIR Systems Inc. thermal image files (FFF, FPF and JPEG format).

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<https://exiftool.org/forum/index.php/topic,4898.0.html>

<http://www.nuage.ch/site/flir-i7-some-analysis/>

<http://www.workswell.cz/manuals/flir/hardware/A3xx_and_A6xx_models/Streaming_format_ThermoVision.pdf>

<http://support.flir.com/DocDownload/Assets/62/English/1557488%24A.pdf>

<http://code.google.com/p/dvelib/source/browse/trunk/flirPublicFormat/fpfConverter/Fpfimg.h?spec=svn3&r=3>

<https://exiftool.org/forum/index.php/topic,5538.0.html>

ACKNOWLEDGEMENTS

Thanks to Tomas for his hard work in decoding much of this information, and to Jens Duttke for getting me started on this format.

SEE ALSO

“FLIR Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

758 - Linux cli command makedev

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command makedev and provides detailed information about the command makedev, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the makedev.

NAME 🖥️ makedev 🖥️

manage a device number

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/sysmacros.h>
dev_t makedev(unsigned int maj, unsigned int min);
unsigned int major(dev_t dev);
unsigned int minor(dev_t dev);

DESCRIPTION

A device ID consists of two parts: a major ID, identifying the class of the device, and a minor ID, identifying a specific instance of a device in that class. A device ID is represented using the type dev_t.

Given major and minor device IDs, makedev() combines these to produce a device ID, returned as the function result. This device ID can be given to mknod(2), for example.

The major() and minor() functions perform the converse task: given a device ID, they return, respectively, the major and minor components. These macros can be useful to, for example, decompose the device IDs in the structure returned by stat(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

makedev(), major(), minor()

Thread safetyMT-Safe

VERSIONS

The BSDs expose the definitions for these macros via <sys/types.h>.

STANDARDS

None.

HISTORY

BSD, HP-UX, Solaris, AIX, Irix.

These interfaces are defined as macros. Since glibc 2.3.3, they have been aliases for three GNU-specific functions: gnu_dev_makedev(), gnu_dev_major(), and gnu_dev_minor(). The latter names are exported, but the traditional names are more portable.

Depending on the version, glibc also exposes definitions for these macros from <sys/types.h> if suitable feature test macros are defined. However, this behavior was deprecated in glibc 2.25, and since glibc 2.28, <sys/types.h> no longer provides these definitions.

SEE ALSO

mknod(2), stat(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

759 - Linux cli command XtOpenDisplay

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtOpenDisplay and provides detailed information about the command XtOpenDisplay, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtOpenDisplay.

NAME 🖥️ XtOpenDisplay 🖥️

initialize, open, or close a display

SYNTAX

#include <X11/Intrinsic.h>

void XtDisplayInitialize(XtAppContext app_context, Display *display, const char *application_name, const char *application_class, XrmOptionDescRec *options, Cardinal num_options, int *argc, char **argv);

Display *XtOpenDisplay(XtAppContext app_context, const char *display_string, const char *application_name, const char *application_class, XrmOptionDescRec *options, Cardinal num_options, int *argc, char **argv);

void XtCloseDisplay(Display *display);

XrmDatabase XtDatabase(Display *display);

XrmDatabase XtScreenDatabase(Screen* screen);

ARGUMENTS

argc
Specifies a pointer to the number of command line parameters.

argv
Specifies the command line parameters.

app_context
Specifies the application context.

application_class
Specifies the class name of this application, which usually is the generic name for all instances of this application.

application_name
Specifies the name of the application instance.

display
Specifies the display. Note that a display can be in at most one application context.

num_options
Specifies the number of entries in the options list.

options
Specifies how to parse the command line for any application-specific resources. The options argument is passed as a parameter to XrmParseCommand. For further information, see Xlib - C Language X Interface.

screen
Specifies the screen whose resource database is to be returned.

DESCRIPTION

The XtDisplayInitialize function builds the resource database, calls the Xlib XrmParseCommand function to parse the command line, and performs other per display initialization. After XrmParseCommand has been called, argc and argv contain only those parameters that were not in the standard option table or in the table specified by the options argument. If the modified argc is not zero, most applications simply print out the modified argv along with a message listing the allowable options. On UNIX-based systems, the application name is usually the final component of argv[0]. If the synchronize resource is True for the specified application, XtDisplayInitialize calls the Xlib XSynchronize function to put Xlib into synchronous mode for this display connection. If the reverseVideo resource is True, the Intrinsics exchange XtDefaultForeground and XtDefaultBackground for widgets created on this display. (See Section 9.6.1).

The XtOpenDisplay function calls XOpenDisplay the specified display name. If display_string is NULL, XtOpenDisplay uses the current value of the -display option specified in argv and if no display is specified in argv, uses the user’s default display (on UNIX-based systems, this is the value of the DISPLAY environment variable).

If this succeeds, it then calls XtDisplayInitialize and pass it the opened display and the value of the -name option specified in argv as the application name. If no name option is specified, it uses the application name passed to XtOpenDisplay. If the application name is NULL, it uses the last component of argv[0]. XtOpenDisplay returns the newly opened display or NULL if it failed.

XtOpenDisplay is provided as a convenience to the application programmer.

The XtCloseDisplay function closes the specified display as soon as it is safe to do so. If called from within an event dispatch (for example, a callback procedure), XtCloseDisplay does not close the display until the dispatch is complete. Note that applications need only call XtCloseDisplay if they are to continue executing after closing the display; otherwise, they should call XtDestroyApplicationContext or just exit.

The XtDatabase function returns the fully merged resource database that was built by XtDisplayInitialize associated with the display that was passed in. If this display has not been initialized by XtDisplayInitialize, the results are not defined.

The XtScreenDatabase function returns the fully merged resource database associated with the specified screen. If the screen does not belong to a Display initialized by XtDisplayInitialize, the results are undefined.

SEE ALSO

XtAppCreateShell(3), XtCreateApplicationContext(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

760 - Linux cli command xdr_char

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_char and provides detailed information about the command xdr_char, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_char.

NAME 🖥️ xdr_char 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

761 - Linux cli command fmaf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fmaf and provides detailed information about the command fmaf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fmaf.

NAME 🖥️ fmaf 🖥️

floating-point multiply and add

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double fma(double x, double y, double z);
float fmaf(float x, float y, float z);
long double fmal(long double x, long double y, long double z);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

fma(), fmaf(), fmal():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions compute x * y + z. The result is rounded as one ternary operation according to the current rounding mode (see fenv(3)).

RETURN VALUE

These functions return the value of x * y + z, rounded as one ternary operation.

If x or y is a NaN, a NaN is returned.

If x times y is an exact infinity, and z is an infinity with the opposite sign, a domain error occurs, and a NaN is returned.

If one of x or y is an infinity, the other is 0, and z is not a NaN, a domain error occurs, and a NaN is returned.

If one of x or y is an infinity, and the other is 0, and z is a NaN, a domain error occurs, and a NaN is returned.

If x times y is not an infinity times zero (or vice versa), and z is a NaN, a NaN is returned.

If the result overflows, a range error occurs, and an infinity with the correct sign is returned.

If the result underflows, a range error occurs, and a signed 0 is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x * y + z, or x * y is invalid and z is not a NaN
An invalid floating-point exception (FE_INVALID) is raised.

Range error: result overflow
An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error: result underflow
An underflow floating-point exception (FE_UNDERFLOW) is raised.

These functions do not set errno.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fma(), fmaf(), fmal()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

remainder(3), remquo(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

762 - Linux cli command pcap_snapshotpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_snapshotpcap and provides detailed information about the command pcap_snapshotpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_snapshotpcap.

NAME 🖥️ pcap_snapshotpcap 🖥️

get the snapshot length

SYNOPSIS

#include <pcap/pcap.h>
int pcap_snapshot(pcap_t *p);

DESCRIPTION

pcap_snapshot() returns the snapshot length specified when pcap_set_snaplen(3PCAP) or pcap_open_live(3PCAP) was called, for a live capture, or the snapshot length from the capture file, for a ``savefile’'.

It must not be called on a pcap descriptor created by pcap_create(3PCAP) that has not yet been activated by pcap_activate(3PCAP).

RETURN VALUE

pcap_snapshot() returns the snapshot length on success and PCAP_ERROR_NOT_ACTIVATED if called on a capture handle that has been created but not activated.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

763 - Linux cli command TAILQ_INSERT_HEAD

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command TAILQ_INSERT_HEAD and provides detailed information about the command TAILQ_INSERT_HEAD, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the TAILQ_INSERT_HEAD.

NAME 🖥️ TAILQ_INSERT_HEAD 🖥️

implementation of a doubly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
TAILQ_ENTRY(TYPE);
TAILQ_HEAD(HEADNAME, TYPE);
TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD head);
void TAILQ_INIT(TAILQ_HEAD *head);
int TAILQ_EMPTY(TAILQ_HEAD *head);
void TAILQ_INSERT_HEAD(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_TAIL(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_AFTER(TAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_FIRST(TAILQ_HEAD *head);
struct TYPE *TAILQ_LAST(TAILQ_HEAD *head, HEADNAME);
struct TYPE *TAILQ_PREV(struct TYPE *elm, HEADNAME, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_NEXT(struct TYPE *elm, TAILQ_ENTRY NAME);
TAILQ_FOREACH(struct TYPE *var, TAILQ_HEAD *head,
 TAILQ_ENTRY NAME);
TAILQ_FOREACH_REVERSE(struct TYPE *var, TAILQ_HEAD *head, HEADNAME,
 TAILQ_ENTRY NAME);
void TAILQ_REMOVE(TAILQ_HEAD *head, struct TYPE *elm,
 TAILQ_ENTRY NAME);
void TAILQ_CONCAT(TAILQ_HEAD *head1, TAILQ_HEAD *head2,
 TAILQ_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked tail queues.

In the macro definitions, TYPE is the name of a user defined structure, that must contain a field of type TAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user defined structure that must be declared using the macro TAILQ_HEAD().

Creation

A tail queue is headed by a structure defined by the TAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the queue and the other to the last element in the queue. The elements are doubly linked so that an arbitrary element can be removed without traversing the queue. New elements can be added to the queue after an existing element, before an existing element, at the head of the queue, or at the end of the queue. A TAILQ_HEAD structure is declared as follows:

TAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the queue. A pointer to the head of the queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

TAILQ_ENTRY() declares a structure that connects the elements in the queue.

TAILQ_HEAD_INITIALIZER() evaluates to an initializer for the queue head.

TAILQ_INIT() initializes the queue referenced by

TAILQ_EMPTY() evaluates to true if there are no items on the queue. head.

Insertion

TAILQ_INSERT_HEAD() inserts the new element elm at the head of the queue.

TAILQ_INSERT_TAIL() inserts the new element elm at the end of the queue.

TAILQ_INSERT_BEFORE() inserts the new element elm before the element listelm.

TAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

TAILQ_FIRST() returns the first item on the queue, or NULL if the queue is empty.

TAILQ_LAST() returns the last item on the queue. If the queue is empty the return value is NULL.

TAILQ_PREV() returns the previous item on the queue, or NULL if this item is the first.

TAILQ_NEXT() returns the next item on the queue, or NULL if this item is the last.

TAILQ_FOREACH() traverses the queue referenced by head in the forward direction, assigning each element in turn to var. var is set to NULL if the loop completes normally, or if there were no elements.

TAILQ_FOREACH_REVERSE() traverses the queue referenced by head in the reverse direction, assigning each element in turn to var.

Removal

TAILQ_REMOVE() removes the element elm from the queue.

Other features

TAILQ_CONCAT() concatenates the queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

TAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

TAILQ_FIRST(), TAILQ_LAST(), TAILQ_PREV(), and TAILQ_NEXT() return a pointer to the first, last, previous, or next TYPE structure, respectively.

TAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

STANDARDS

BSD.

HISTORY

4.4BSD.

CAVEATS

TAILQ_FOREACH() and TAILQ_FOREACH_REVERSE() don’t allow var to be removed or freed within the loop, as it would interfere with the traversal. TAILQ_FOREACH_SAFE() and TAILQ_FOREACH_REVERSE_SAFE(), which are present on the BSDs but are not present in glibc, fix this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    TAILQ_ENTRY(entry) entries;             /* Tail queue */
};
TAILQ_HEAD(tailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct tailhead head;                   /* Tail queue head */
    int i;
    TAILQ_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    TAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    TAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    TAILQ_INSERT_AFTER(&head, n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    TAILQ_INSERT_BEFORE(n2, n3, entries);
    TAILQ_REMOVE(&head, n2, entries);       /* Deletion */
    free(n2);
                                            /* Forward traversal */
    i = 0;
    TAILQ_FOREACH(np, &head, entries)
        np->data = i++;
                                            /* Reverse traversal */
    TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = TAILQ_FIRST(&head); while (n1 != NULL) { n2 = TAILQ_NEXT(n1, entries); free(n1); n1 = n2; } TAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

764 - Linux cli command truncl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command truncl and provides detailed information about the command truncl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the truncl.

NAME 🖥️ truncl 🖥️

round to integer, toward zero

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double trunc(double x);
float truncf(float x);
long double truncl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

trunc(), truncf(), truncl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions round x to the nearest integer value that is not larger in magnitude than x.

RETURN VALUE

These functions return the rounded integer value, in floating format.

If x is integral, infinite, or NaN, x itself is returned.

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

trunc(), truncf(), truncl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

NOTES

The integral value returned by these functions may be too large to store in an integer type (int, long, etc.). To avoid an overflow, which will produce undefined results, an application should perform a range check on the returned value before assigning it to an integer type.

SEE ALSO

ceil(3), floor(3), lrint(3), nearbyint(3), rint(3), round(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

765 - Linux cli command XtConfigureWidget

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtConfigureWidget and provides detailed information about the command XtConfigureWidget, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtConfigureWidget.

NAME 🖥️ XtConfigureWidget 🖥️

move and resize widgets

SYNTAX

#include <X11/Intrinsic.h>

void XtConfigureWidget(Widget w, Position x, Position y, Dimension width, Dimension height, Dimension border_width);

void XtMoveWidget(Widget w, Position x, Position y);

void XtResizeWidget(Widget w, Dimension width, Dimension height, Dimension border_width);

void XtResizeWindow(Widget w);

ARGUMENTS

width

height

border_width
Specify the new widget size.

  1. Specifies the widget.

  1. Specify the new widget x and y coordinates.

DESCRIPTION

The XtConfigureWidget function returns immediately if the specified geometry fields are the same as the old values. Otherwise, XtConfigureWidget writes the new x, y, width, height, and border_width values into the widget and, if the widget is realized, makes an Xlib XConfigureWindow call on the widget’s window.

If either the new width or height is different from its old value, XtConfigureWidget calls the widget’s resize procedure to notify it of the size change; otherwise, it simply returns.

The XtMoveWidget function returns immediately if the specified geometry fields are the same as the old values. Otherwise, XtMoveWidget writes the new x and y values into the widget and, if the widget is realized, issues an Xlib XMoveWindow call on the widget’s window.

The XtResizeWidget function returns immediately if the specified geometry fields are the same as the old values. Otherwise, XtResizeWidget writes the new width, height, and border_width values into the widget and, if the widget is realized, issues an XConfigureWindow call on the widget’s window.

If the new width or height are different from the old values, XtResizeWidget calls the widget’s resize procedure to notify it of the size change.

The XtResizeWindow function calls the XConfigureWindow Xlib function to make the window of the specified widget match its width, height, and border width. This request is done unconditionally because there is no way to tell if these values match the current values. Note that the widget’s resize procedure is not called.

There are very few times to use XtResizeWindow; instead, you should use XtResizeWidget.

SEE ALSO

XtMakeGeometryRequest(3), XtQueryGeometry(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

766 - Linux cli command xdr_u_short

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_u_short and provides detailed information about the command xdr_u_short, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_u_short.

NAME 🖥️ xdr_u_short 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

767 - Linux cli command Image_ExifTool_Lang_rupm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Lang_rupm and provides detailed information about the command Image_ExifTool_Lang_rupm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Lang_rupm.

NAME 🖥️ Image_ExifTool_Lang_rupm 🖥️

ExifTool Russian language translations

DESCRIPTION

This file is used by Image::ExifTool to generate localized tag descriptions and values.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

ACKNOWLEDGEMENTS

Thanks to Jens Duttke, Sergey Shemetov, Dmitry Yerokhin, Anton Sukhinov and Alexander for providing this translation.

SEE ALSO

Image::ExifTool (3pm), Image::ExifTool::TagInfoXML (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

768 - Linux cli command Image_ExifTool_Nintendopm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Nintendopm and provides detailed information about the command Image_ExifTool_Nintendopm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Nintendopm.

NAME 🖥️ Image_ExifTool_Nintendopm 🖥️

Nintendo EXIF maker notes tags

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret Nintendo maker notes EXIF meta information.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://3dbrew.org/wiki/MPO>

SEE ALSO

“Nintendo Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

769 - Linux cli command Moose_Manual_MooseXpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Manual_MooseXpm and provides detailed information about the command Moose_Manual_MooseXpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Manual_MooseXpm.

NAME 🖥️ Moose_Manual_MooseXpm 🖥️

Recommended Moose extensions

VERSION

version 2.2207

MooseX?

It’s easy to extend and change Moose, and this is part of what makes Moose so powerful. You can use the MOP API to do things your own way, add new features, and generally customize your Moose.

Writing your own extensions does require a good understanding of the meta-model. You can start learning about this with the Moose::Manual::MOP docs. There are also several extension recipes in the Moose::Cookbook.

Explaining how to write extensions is beyond the scope of this manual. Fortunately, lots of people have already written extensions and put them on CPAN for you.

This document covers a few of the ones we like best.

MooseX::AttributeHelpers

The functionality of this MooseX module has been moved into Moose core. See Moose::Meta::Attribute::Native.

Moose::Autobox

MooseX::AttributeHelpers, but turned inside out, Moose::Autobox provides methods on both arrays/hashes/etc. but also references to them, using Moose roles, allowing you do to things like:

use Moose::Autobox; $somebody_elses_object->orders->push($order);

Lexically scoped and not to everybody’s taste, but very handy for sugaring up other people’s APIs and your own code.

MooseX::StrictConstructor

By default, Moose lets you pass any old junk into a class’s constructor. If you load MooseX::StrictConstructor, your class will throw an error if it sees something it doesn’t recognize;

package User; use Moose; use MooseX::StrictConstructor; has name; has email; User->new( name => Bob, emali => [email protected] );

With MooseX::StrictConstructor, that typo (“emali”) will cause a runtime error. With plain old Moose, the “emali” attribute would be silently ignored.

MooseX::Params::Validate

We have high hopes for the future of MooseX::Method::Signatures and Moops. However, these modules, while used regularly in production by some of the more insane members of the community, are still marked alpha just in case backwards incompatible changes need to be made.

If you don’t want to risk that, for now we recommend the decidedly more clunky (but also faster and simpler) MooseX::Params::Validate. This module lets you apply Moose types and coercions to any method arguments.

package User; use Moose; use MooseX::Params::Validate; sub login { my $self = shift; my ($password) = validated_list( \_, password => { isa => Str, required => 1 } ); … }

MooseX::Getopt

This is a role which adds a new_with_options method to your class. This is a constructor that takes the command line options and uses them to populate attributes.

This makes writing a command-line application as a module trivially simple:

package App::Foo; use Moose; with MooseX::Getopt; has input => ( is => ro, isa => Str, required => 1 ); has output => ( is => ro, isa => Str, required => 1 ); sub run { … }

Then in the script that gets run we have:

use App::Foo; App::Foo->new_with_options->run;

From the command line, someone can execute the script:

foo@example> foo –input /path/to/input –output /path/to/output

MooseX::Singleton

To be honest, using a singleton is just a way to have a magic global variable in languages that don’t actually have global variables.

In perl, you can just as easily use a global. However, if your colleagues are Java-infected, they might prefer a singleton. Also, if you have an existing class that isn’t a singleton but should be, using MooseX::Singleton is the easiest way to convert it.

package Config; use MooseX::Singleton; # instead of Moose has cache_dir => ( … );

It’s that simple.

EXTENSIONS TO CONSIDER

There are literally dozens of other extensions on CPAN. This is a list of extensions that you might find useful, but we’re not quite ready to endorse just yet.

MooseX::Declare

MooseX::Declare is based on Devel::Declare, a giant bag of crack originally implemented by mst with the goal of upsetting the perl core developers so much by its very existence that they implemented proper keyword handling in the core.

As of perl5 version 14, this goal has been achieved, and modules such as Devel::CallParser, Function::Parameters, and Keyword::Simple provide mechanisms to mangle perl syntax that don’t require hallucinogenic drugs to interpret the error messages they produce.

If you want to use declarative syntax in new code, please for the love of kittens get yourself a recent perl and look at Moops instead.

MooseX::Types

This extension helps you build a type library for your application. It also lets you predeclare type names and use them as barewords.

use MooseX::Types -declare => [PositiveInt]; use MooseX::Types::Moose Int; subtype PositiveInt, as Int, where { $_ > 0 }, message { “Int is not larger than 0” };

One nice feature is that those bareword names are actually namespaced in Moose’s type registry, so multiple applications can use the same bareword names, even if the type definitions differ.

MooseX::Types::Structured

This extension builds on top of MooseX::Types to let you declare complex data structure types.

use MooseX::Types -declare => [ qw( Name Color ) ]; use MooseX::Types::Moose qw(Str Int); use MooseX::Types::Structured qw(Dict Tuple Optional); subtype Name => as Dict[ first => Str, middle => Optional[Str], last => Str ]; subtype Color => as Tuple[ Int, Int, Int, Optional[Int] ];

Of course, you could always use objects to represent these sorts of things too.

MooseX::ClassAttribute

This extension provides class attributes for Moose classes. The declared class attributes are introspectable just like regular Moose attributes.

package User; use Moose; use MooseX::ClassAttribute; has name => ( … ); class_has Cache => ( … );

Note however that this class attribute does not inherit like a Class::Data::Inheritable or similar attribute - calling

$subclass->Cache($cache);

will set it for the superclass as well. Additionally, class data is usually The Wrong Thing To Do in a strongly OO program since it makes testing a lot harder - consider carefully whether you’d be better off with an object that’s passed around instead.

MooseX::Daemonize

This is a role that provides a number of methods useful for creating a daemon, including methods for starting and stopping, managing a PID file, and signal handling.

MooseX::Role::Parameterized

If you find yourself wanting a role that customizes itself for each consumer, this is the tool for you. With this module, you can create a role that accepts parameters and generates attributes, methods, etc. on a customized basis for each consumer.

MooseX::POE

This is a small wrapper that ties together a Moose class with POE::Session, and gives you an event sugar function to declare event handlers.

MooseX::FollowPBP

Automatically names all accessors Perl Best Practices-style, “get_size” and “set_size”.

MooseX::SemiAffordanceAccessor

Automatically names all accessors with an explicit set and implicit get, “size” and “set_size”.

MooseX::NonMoose

MooseX::NonMoose allows for easily subclassing non-Moose classes with Moose, taking care of the annoying details connected with doing this, such as setting up proper inheritance from Moose::Object and installing (and inlining, at make_immutable time) a constructor that makes sure things like BUILD methods are called.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

770 - Linux cli command Image_ExifTool_DNGpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_DNGpm and provides detailed information about the command Image_ExifTool_DNGpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_DNGpm.

NAME 🖥️ Image_ExifTool_DNGpm 🖥️

Read DNG-specific information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to process information in DNG (Digital Negative) images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.adobe.com/products/dng/>

SEE ALSO

“DNG Tags” in Image::ExifTool::TagNames, “EXIF Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

771 - Linux cli command open_memstream

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command open_memstream and provides detailed information about the command open_memstream, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the open_memstream.

NAME 🖥️ open_memstream 🖥️

open a dynamic memory buffer stream

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
FILE *open_memstream(char **ptr, size_t *sizeloc);
#include <wchar.h>
FILE *open_wmemstream(wchar_t **ptr, size_t *sizeloc);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

open_memstream(), open_wmemstream():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The open_memstream() function opens a stream for writing to a memory buffer. The function dynamically allocates the buffer, and the buffer automatically grows as needed. Initially, the buffer has a size of zero. After closing the stream, the caller should free(3) this buffer.

The locations pointed to by ptr and sizeloc are used to report, respectively, the current location and the size of the buffer. The locations referred to by these pointers are updated each time the stream is flushed (fflush(3)) and when the stream is closed (fclose(3)). These values remain valid only as long as the caller performs no further output on the stream. If further output is performed, then the stream must again be flushed before trying to access these values.

A null byte is maintained at the end of the buffer. This byte is not included in the size value stored at sizeloc.

The stream maintains the notion of a current position, which is initially zero (the start of the buffer). Each write operation implicitly adjusts the buffer position. The stream’s buffer position can be explicitly changed with fseek(3) or fseeko(3). Moving the buffer position past the end of the data already written fills the intervening space with null characters.

The open_wmemstream() is similar to open_memstream(), but operates on wide characters instead of bytes.

RETURN VALUE

Upon successful completion, open_memstream() and open_wmemstream() return a FILE pointer. Otherwise, NULL is returned and errno is set to indicate the error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

open_memstream(), open_wmemstream()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

open_memstream()
glibc 1.0.x.

open_wmemstream()
glibc 2.4.

NOTES

There is no file descriptor associated with the file stream returned by these functions (i.e., fileno(3) will return an error if called on the returned stream).

BUGS

Before glibc 2.7, seeking past the end of a stream created by open_memstream() does not enlarge the buffer; instead the fseek(3) call fails, returning -1.

EXAMPLES

See fmemopen(3).

SEE ALSO

fmemopen(3), fopen(3), setbuf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

772 - Linux cli command timersub

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command timersub and provides detailed information about the command timersub, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the timersub.

NAME 🖥️ timersub 🖥️

timeval operations

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/time.h>
void timeradd(struct timeval *a, struct timeval *b,
 struct timeval *res);
void timersub(struct timeval *a, struct timeval *b,
 struct timeval *res);
void timerclear(struct timeval *tvp);
int timerisset(struct timeval *tvp);
int timercmp(struct timeval *a, struct timeval *b, CMP);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The macros are provided to operate on timeval structures, defined in <sys/time.h> as:

struct timeval {
    time_t      tv_sec;     /* seconds */
    suseconds_t tv_usec;    /* microseconds */
};

timeradd() adds the time values in a and b, and places the sum in the timeval pointed to by res. The result is normalized such that res->tv_usec has a value in the range 0 to 999,999.

timersub() subtracts the time value in b from the time value in a, and places the result in the timeval pointed to by res. The result is normalized such that res->tv_usec has a value in the range 0 to 999,999.

timerclear() zeros out the timeval structure pointed to by tvp, so that it represents the Epoch: 1970-01-01 00:00:00 +0000 (UTC).

timerisset() returns true (nonzero) if either field of the timeval structure pointed to by tvp contains a nonzero value.

timercmp() compares the timer values in a and b using the comparison operator CMP, and returns true (nonzero) or false (0) depending on the result of the comparison. Some systems (but not Linux/glibc), have a broken timercmp() implementation, in which CMP of >=, <=, and == do not work; portable applications can instead use

!timercmp(..., <)
!timercmp(..., >)
!timercmp(..., !=)

RETURN VALUE

timerisset() and timercmp() return true (nonzero) or false (0).

ERRORS

No errors are defined.

STANDARDS

None.

HISTORY

BSD.

SEE ALSO

gettimeofday(2), time(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

773 - Linux cli command Tk_Labelpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Labelpm and provides detailed information about the command Tk_Labelpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Labelpm.

NAME 🖥️ Tk_Labelpm 🖥️

Create and manipulate Label widgets

SYNOPSIS

$label = $parent->Label(?options?);

STANDARD OPTIONS

-activebackground -activeforeground -anchor -background -bitmap -borderwidth -compound -cursor -disabledforeground -font -foreground -highlightbackground -highlightcolor -highlightthickness -image -justify -padx -pady -relief -takefocus -text -textvariable -underline -wraplength

See Tk::options for details of the standard options.

WIDGET-SPECIFIC OPTIONS

Name: height

Class: Height

Switch: -height

Specifies a desired height for the label. If an image or bitmap is being displayed in the label then the value is in screen units (i.e. any of the forms acceptable to Tk_GetPixels); for text it is in lines of text. If this option isn’t specified, the label’s desired height is computed from the size of the image or bitmap or text being displayed in it.

Name: state

Class: State

Switch: -state

Specifies one of three states for the label: normal, active, or disabled. In normal state the label is displayed using the foreground and background options. In active state the label is displayed using the activeForeground and activeBackground options. In the disabled state the disabledForeground and background options determine how the button is displayed.

Name: width

Class: Width

Switch: -width

Specifies a desired width for the label. If an image or bitmap is being displayed in the label then the value is in screen units (i.e. any of the forms acceptable to Tk_GetPixels); for text it is in characters. If this option isn’t specified, the label’s desired width is computed from the size of the image or bitmap or text being displayed in it.

DESCRIPTION

The Label method creates a new window (given by the $widget argument) and makes it into a label widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the label such as its colors, font, text, and initial relief. The label command returns its $widget argument. At the time this command is invoked, there must not exist a window named $widget, but $widget’s parent must exist.

A label is a widget that displays a textual string, bitmap or image. If text is displayed, it must all be in a single font, but it can occupy multiple lines on the screen (if it contains newlines or if wrapping occurs because of the wrapLength option) and one of the characters may optionally be underlined using the underline option. The label can be manipulated in a few simple ways, such as changing its relief or text, using the commands described below.

WIDGET METHODS

The Label method creates a widget object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class.

BINDINGS

When a new label is created, it has no default event bindings: labels are not intended to be interactive.

KEYWORDS

label, widget

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

774 - Linux cli command Tk_exitpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_exitpm and provides detailed information about the command Tk_exitpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_exitpm.

NAME 🖥️ Tk_exitpm 🖥️

End the application

SYNOPSIS

use Tk qw(exit); … B<exit>?(I<returnCode>)?;

DESCRIPTION

Terminate the process, returning returnCode to the system as the exit status. If returnCode isn’t specified then it defaults to 0.

If calling exit from code invoked via a Tk callback then this Tk version of exit cleans up more reliably than using the perl exit.

CAVEATS

Using exit from a forked process will terminate both the child process and the parent process. As Tk::exit is imported by default one should use CORE::exit in the forked process instead.

KEYWORDS

exit, process

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

775 - Linux cli command zip_strerror

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_strerror and provides detailed information about the command zip_strerror, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_strerror.

libzip (-lzip)

The

function returns a string describing the last error for the zip archive

while the

function does the same for a zip file

(one file in an archive). The returned string must not be modified or freed, and becomes invalid when

or

respectively, is closed or on the next call to

or

respectively, for the same archive.

and

return a pointer to the error string.

and

were added in libzip 0.6.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

776 - Linux cli command ntohl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ntohl and provides detailed information about the command ntohl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ntohl.

NAME 🖥️ ntohl 🖥️

convert values between host and network byte order

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <arpa/inet.h>
uint32_t htonl(uint32_t hostlong);
uint16_t htons(uint16_t hostshort);
uint32_t ntohl(uint32_t netlong);
uint16_t ntohs(uint16_t netshort);

DESCRIPTION

The htonl() function converts the unsigned integer hostlong from host byte order to network byte order.

The htons() function converts the unsigned short integer hostshort from host byte order to network byte order.

The ntohl() function converts the unsigned integer netlong from network byte order to host byte order.

The ntohs() function converts the unsigned short integer netshort from network byte order to host byte order.

On the i386 the host byte order is Least Significant Byte first, whereas the network byte order, as used on the Internet, is Most Significant Byte first.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

htonl(), htons(), ntohl(), ntohs()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

SEE ALSO

bswap(3), endian(3), gethostbyname(3), getservent(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

777 - Linux cli command XtTranslateKeycode

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtTranslateKeycode and provides detailed information about the command XtTranslateKeycode, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtTranslateKeycode.

NAME 🖥️ XtTranslateKeycode 🖥️

convert KeySym to KeyCodes

SYNTAX

#include <X11/Intrinsic.h>

void XtSetKeyTranslator(Display *display, XtKeyProc proc);

void XtTranslateKeycode(Display *display, KeyCode keycode, Modifiers modifiers, Modifiers *modifiers_return, KeySym *keysym_return);

void XtRegisterCaseConverter(Display *display, XtCaseProc proc, KeySym start, KeySym stop);

void XtConvertCase(Display *display, KeySym keysym, KeySym *lower_return, KeySym *upper_return);

ARGUMENTS

display
Specifies the display.

keycode
Specifies the KeyCode to translate.

keysym
Specifies the KeySym to convert.

keysym_return
Returns the resulting KeySym.

lower_return
Returns the lowercase equivalent of the KeySym.

upper_return
Returns the uppercase equivalent of the KeySym.

modifiers
Specifies the modifiers to the KeyCode.

modifiers_return
Returns a mask that indicates the modifiers actually used to generate the KeySym.

proc
Specifies the procedure that is to perform key translations or conversions.

start
Specifies the first KeySym for which this converter is valid.

stop
Specifies the last KeySym for which this converter is valid.

DESCRIPTION

The XtSetKeyTranslator function sets the specified procedure as the current key translator. The default translator is XtTranslateKey, an XtKeyProc that uses Shift and Lock modifiers with the interpretations defined by the core protocol. It is provided so that new translators can call it to get default KeyCode-to-KeySym translations and so that the default translator can be reinstalled.

The XtTranslateKeycode function passes the specified arguments directly to the currently registered KeyCode to KeySym translator.

The XtRegisterCaseConverter registers the specified case converter. The start and stop arguments provide the inclusive range of KeySyms for which this converter is to be called. The new converter overrides any previous converters for KeySyms in that range. No interface exists to remove converters; you need to register an identity converter. When a new converter is registered, the Intrinsics refreshes the keyboard state if necessary. The default converter understands case conversion for all KeySyms defined in the core protocol.

The XtConvertCase function calls the appropriate converter and returns the results. A user-supplied XtKeyProc may need to use this function.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

778 - Linux cli command int32_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command int32_ttype and provides detailed information about the command int32_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the int32_ttype.

NAME 🖥️ int32_ttype 🖥️

fixed-width basic integer types

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <stdint.h>
typedef /* ... */ int8_t;
typedef /* ... */ int16_t;
typedef /* ... */ int32_t;
typedef /* ... */ int64_t;
typedef /* ... */ uint8_t;
typedef /* ... */ uint16_t;
typedef /* ... */ uint32_t;
typedef /* ... */ uint64_t;
#define INT8_WIDTH 8
#define INT16_WIDTH 16
#define INT32_WIDTH 32
#define INT64_WIDTH 64
#define UINT8_WIDTH 8
#define UINT16_WIDTH 16
#define UINT32_WIDTH 32
#define UINT64_WIDTH 64
#define INT8_MAX /* 2**(INT8_WIDTH - 1) - 1 */
#define INT16_MAX /* 2**(INT16_WIDTH - 1) - 1 */
#define INT32_MAX /* 2**(INT32_WIDTH - 1) - 1 */
#define INT64_MAX /* 2**(INT64_WIDTH - 1) - 1 */
#define INT8_MIN /* - 2**(INT8_WIDTH - 1) */
#define INT16_MIN /* - 2**(INT16_WIDTH - 1) */
#define INT32_MIN /* - 2**(INT32_WIDTH - 1) */
#define INT64_MIN /* - 2**(INT64_WIDTH - 1) */
#define UINT8_MAX /* 2**INT8_WIDTH - 1 */
#define UINT16_MAX /* 2**INT16_WIDTH - 1 */
#define UINT32_MAX /* 2**INT32_WIDTH - 1 */
#define UINT64_MAX /* 2**INT64_WIDTH - 1 */
#define INT8_C(c) c ## /* ... */
#define INT16_C(c) c ## /* ... */
#define INT32_C(c) c ## /* ... */
#define INT64_C(c) c ## /* ... */
#define UINT8_C(c) c ## /* ... */
#define UINT16_C(c) c ## /* ... */
#define UINT32_C(c) c ## /* ... */
#define UINT64_C(c) c ## /* ... */

DESCRIPTION

intN*_t* are signed integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are be capable of storing values in the range [INTN**_MIN**, INTN**_MAX**], substituting N by the appropriate number.

uintN*_t* are unsigned integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are capable of storing values in the range [0, UINTN**_MAX**], substituting N by the appropriate number.

According to POSIX, [u]int8_t, [u]int16_t, and [u]int32_t are required; [u]int64_t are only required in implementations that provide integer types with width 64; and all other types of this form are optional.

The macros [U]INTN**_WIDTH** expand to the width in bits of these types (N).

The macros [U]INTN**_MAX** expand to the maximum value that these types can hold.

The macros INTN**_MIN** expand to the minimum value that these types can hold.

The macros [U]INTN**_C**() expand their argument to an integer constant of type [u]intN*_t*.

The length modifiers for the [u]intN*_t* types for the printf(3) family of functions are expanded by macros of the forms PRIdN, PRIiN, PRIuN, and PRIxN (defined in <inttypes.h>); resulting for example in %“PRId64” or %“PRIi64” for printing int64_t values. The length modifiers for the [u]intN*_t* types for the scanf(3) family of functions are expanded by macros of the forms SCNdN, SCNiN, SCNuN, and SCNxN, (defined in <inttypes.h>); resulting for example in %“SCNu8” or %“SCNx8” for scanning uint8_t values.

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The [U]INTN**_WIDTH** macros were added in C23.

NOTES

The following header also provides these types: <inttypes.h>. <arpa/inet.h> also provides uint16_t and uint32_t.

SEE ALSO

intmax_t(3type), intptr_t(3type), printf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

779 - Linux cli command fmin

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fmin and provides detailed information about the command fmin, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fmin.

NAME 🖥️ fmin 🖥️

determine minimum of two floating-point numbers

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double fmin(double x, double y);
float fminf(float x, float y);
long double fminl(long double x, long double y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

fmin(), fminf(), fminl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions return the lesser value of x and y.

RETURN VALUE

These functions return the minimum of x and y.

If one argument is a NaN, the other argument is returned.

If both arguments are NaN, a NaN is returned.

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fmin(), fminf(), fminl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

fdim(3), fmax(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

780 - Linux cli command pthread_mutexattr_settype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_mutexattr_settype and provides detailed information about the command pthread_mutexattr_settype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_mutexattr_settype.

NAME 🖥️ pthread_mutexattr_settype 🖥️

initialize and destroy a mutex attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_mutexattr_init(pthread_mutexattr_t *attr);
int pthread_mutexattr_destroy(pthread_mutexattr_t *attr);

DESCRIPTION

The pthread_mutexattr_init() function initializes the mutex attributes object pointed to by attr with default values for all attributes defined by the implementation.

The results of initializing an already initialized mutex attributes object are undefined.

The pthread_mutexattr_destroy() function destroys a mutex attribute object (making it uninitialized). Once a mutex attributes object has been destroyed, it can be reinitialized with pthread_mutexattr_init().

The results of destroying an uninitialized mutex attributes object are undefined.

RETURN VALUE

On success, these functions return 0. On error, they return a positive error number.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

Subsequent changes to a mutex attributes object do not affect mutex that have already been initialized using that object.

SEE ALSO

pthread_mutex_init(3), pthread_mutexattr_getpshared(3), pthread_mutexattr_getrobust(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

781 - Linux cli command XtIsConstraint

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtIsConstraint and provides detailed information about the command XtIsConstraint, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtIsConstraint.

NAME 🖥️ XtIsConstraint 🖥️

obtain and verify a widget’s class

SYNTAX

#include <X11/Intrinsic.h>

WidgetClass XtClass(Widget w);

WidgetClass XtSuperclass(Widget w);

Boolean XtIsSubclass(Widget w, WidgetClass widget_class);

void XtCheckSubclass(Widget widget, WidgetClass widget_class, String message);

Boolean XtIsObject(Widget w);

Boolean XtIsRectObj(Widget w);

Boolean XtIsWidget(Widget w);

Boolean XtIsComposite(Widget w);

Boolean XtIsConstraint(Widget w);

Boolean XtIsShell(Widget w);

Boolean XtIsOverrideShell(Widget w);

Boolean XtIsWMShell(Widget w);

Boolean XtIsVendorShell(Widget w);

Boolean XtIsTransientShell(Widget w);

Boolean XtIsTopLevelShell(Widget w);

Boolean XtIsApplicationShell(Widget w);

Boolean XtIsSessionShell(Widget w);

ARGUMENTS

  1. Specifies the widget.

widget_class
Specifies the widget class.

message
Specifies the message that is to be used.

DESCRIPTION

The XtClass function returns a pointer to the widget’s class structure.

The XtSuperclass function returns a pointer to the widget’s superclass class structure.

The XtIsSubclass function returns True if the class of the specified widget is equal to or is a subclass of the specified class. The widget’s class can be any number of subclasses down the chain and need not be an immediate subclass of the specified class. Composite widgets that need to restrict the class of the items they contain can use XtIsSubclass to find out if a widget belongs to the desired class of objects.

The XtCheckSubclass macro determines if the class of the specified widget is equal to or is a subclass of the specified widget class. The widget can be any number of subclasses down the chain and need not be an immediate subclass of the specified widget class. If the specified widget is not a subclass, XtCheckSubclass constructs an error message from the supplied message, the widget’s actual class, and the expected class and calls XtErrorMsg. XtCheckSubclass should be used at the entry point of exported routines to ensure that the client has passed in a valid widget class for the exported operation.

XtCheckSubclass is only executed when the widget has been compiled with the compiler symbol DEBUG defined; otherwise, it is defined as the empty string and generates no code.

To test if a given widget belongs to a subclass of an Intrinsics-defined class, the Intrinsics defines macros or functions equivalent to XtIsSubclass for each of the built-in classes. These procedures are XtIsObject, XtIsRectObj, XtIsWidget, XtIsComposite, XtIsConstraint, XtIsShell, XtIsOverrideShell, XtIsWMShell, XtIsVendorShell, XtIsTransientShell, XtIsTopLevelShell, XtIsApplicationShell, and XtIsSessionShell.

The

SEE ALSO

XtAppErrorMsg(3), XtDisplay(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

782 - Linux cli command sigvaltype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigvaltype and provides detailed information about the command sigvaltype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigvaltype.

NAME 🖥️ sigvaltype 🖥️

structure for notification from asynchronous routines

SYNOPSIS

#include <signal.h>
struct sigevent {
 int sigev_notify; /* Notification type */
 int sigev_signo; /* Signal number */
 union sigval sigev_value; /* Data passed with notification */
 void (*sigev_notify_function)(union sigval);
  /* Notification function
  (SIGEV_THREAD) */
 pthread_attr_t *sigev_notify_attributes;
  /* Notification attributes */
 /* Linux only: */
 pid_t sigev_notify_thread_id;
  /* ID of thread to signal
  (SIGEV_THREAD_ID) */
};
union sigval { /* Data passed with notification */
 int sival_int; /* Integer value */
 void *sival_ptr; /* Pointer value */
};

DESCRIPTION

sigevent

The sigevent structure is used by various APIs to describe the way a process is to be notified about an event (e.g., completion of an asynchronous request, expiration of a timer, or the arrival of a message).

The definition shown in the SYNOPSIS is approximate: some of the fields in the sigevent structure may be defined as part of a union. Programs should employ only those fields relevant to the value specified in sigev_notify.

The sigev_notify field specifies how notification is to be performed. This field can have one of the following values:

SIGEV_NONE
A “null” notification: don’t do anything when the event occurs.

SIGEV_SIGNAL
Notify the process by sending the signal specified in sigev_signo.

If the signal is caught with a signal handler that was registered using the sigaction(2) SA_SIGINFO flag, then the following fields are set in the siginfo_t structure that is passed as the second argument of the handler:

si_code
This field is set to a value that depends on the API delivering the notification.

si_signo
This field is set to the signal number (i.e., the same value as in sigev_signo).

si_value
This field is set to the value specified in sigev_value.

Depending on the API, other fields may also be set in the siginfo_t structure.

The same information is also available if the signal is accepted using sigwaitinfo(2).

SIGEV_THREAD
Notify the process by invoking sigev_notify_function “as if” it were the start function of a new thread. (Among the implementation possibilities here are that each timer notification could result in the creation of a new thread, or that a single thread is created to receive all notifications.) The function is invoked with sigev_value as its sole argument. If sigev_notify_attributes is not NULL, it should point to a pthread_attr_t structure that defines attributes for the new thread (see pthread_attr_init(3)).

SIGEV_THREAD_ID (Linux-specific)
Currently used only by POSIX timers; see timer_create(2).

sigval

Data passed with a signal.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

<aio.h> and <time.h> define sigevent since POSIX.1-2008.

NOTES

The following headers also provide sigevent: <aio.h>, <mqueue.h>, and <time.h>.

SEE ALSO

timer_create(2), getaddrinfo_a(3), lio_listio(3), mq_notify(3), pthread_sigqueue(3), sigqueue(3), aiocb(3type), siginfo_t(3type)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

783 - Linux cli command pthread_attr_getscope

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_attr_getscope and provides detailed information about the command pthread_attr_getscope, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_attr_getscope.

NAME 🖥️ pthread_attr_getscope 🖥️

set/get contention scope attribute in thread attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_attr_setscope(pthread_attr_t *attr, int scope);
int pthread_attr_getscope(const pthread_attr_t *restrict attr,
 int *restrict scope);

DESCRIPTION

The pthread_attr_setscope() function sets the contention scope attribute of the thread attributes object referred to by attr to the value specified in scope. The contention scope attribute defines the set of threads against which a thread competes for resources such as the CPU. POSIX.1 specifies two possible values for scope:

PTHREAD_SCOPE_SYSTEM
The thread competes for resources with all other threads in all processes on the system that are in the same scheduling allocation domain (a group of one or more processors). PTHREAD_SCOPE_SYSTEM threads are scheduled relative to one another according to their scheduling policy and priority.

PTHREAD_SCOPE_PROCESS
The thread competes for resources with all other threads in the same process that were also created with the PTHREAD_SCOPE_PROCESS contention scope. PTHREAD_SCOPE_PROCESS threads are scheduled relative to other threads in the process according to their scheduling policy and priority. POSIX.1 leaves it unspecified how these threads contend with other threads in other process on the system or with other threads in the same process that were created with the PTHREAD_SCOPE_SYSTEM contention scope.

POSIX.1 requires that an implementation support at least one of these contention scopes. Linux supports PTHREAD_SCOPE_SYSTEM, but not PTHREAD_SCOPE_PROCESS.

On systems that support multiple contention scopes, then, in order for the parameter setting made by pthread_attr_setscope() to have effect when calling pthread_create(3), the caller must use pthread_attr_setinheritsched(3) to set the inherit-scheduler attribute of the attributes object attr to PTHREAD_EXPLICIT_SCHED.

The pthread_attr_getscope() function returns the contention scope attribute of the thread attributes object referred to by attr in the buffer pointed to by scope.

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

pthread_attr_setscope() can fail with the following errors:

EINVAL
An invalid value was specified in scope.

ENOTSUP
scope specified the value PTHREAD_SCOPE_PROCESS, which is not supported on Linux.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_attr_setscope(), pthread_attr_getscope()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

The PTHREAD_SCOPE_SYSTEM contention scope typically indicates that a user-space thread is bound directly to a single kernel-scheduling entity. This is the case on Linux for the obsolete LinuxThreads implementation and the modern NPTL implementation, which are both 1:1 threading implementations.

POSIX.1 specifies that the default contention scope is implementation-defined.

SEE ALSO

pthread_attr_init(3), pthread_attr_setaffinity_np(3), pthread_attr_setinheritsched(3), pthread_attr_setschedparam(3), pthread_attr_setschedpolicy(3), pthread_create(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

784 - Linux cli command URI_geopm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command URI_geopm and provides detailed information about the command URI_geopm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the URI_geopm.

NAME 🖥️ URI_geopm 🖥️

URI scheme for geo Identifiers

SYNOPSIS

use URI; # Geo URI from textual uri my $guri = URI->new( geo:54.786989,-2.344214 ); # From coordinates my $guri = URI::geo->new( 54.786989, -2.344214 ); # Decode my ( $lat, $lon, $alt ) = $guri->location; my $latitude = $guri->latitude; # Update $guri->location( 55, -1 ); $guri->longitude( -43.23 );

DESCRIPTION

From <http://geouri.org/>:

More and more protocols and data formats are being extended by methods to add geographic information. However, all of those options are tied to that specific protocol or data format. A dedicated Uniform Resource Identifier (URI) scheme for geographic locations would be independent from any protocol, usable by any software/data format that can handle generich URIs. Like a “mailto:” URI launches your favourite mail application today, a “geo:” URI could soon launch your favourite mapping service, or queue that location for a navigation device.

SUBROUTINES/METHODS

“new”

Create a new URI::geo. The arguments should be either

  • latitude, longitude and optionally altitude

  • a reference to an array containing lat, lon, alt

  • a reference to a hash with suitably named keys or

  • a reference to an object with suitably named accessors

To maximize the likelihood that you can pass in some object that represents a geographical location and have URI::geo do the right thing we try a number of different accessor names.

If the object has a latlong method (e.g. Geo::Point) we’ll use that. If there’s a location method we call that. Otherwise we look for accessors called lat, latitude, lon, long, longitude, ele, alt, elevation or altitude and use them.

Often if you have an object or hash reference that represents a point you can pass it directly to new; so for example this will work:

use URI::geo; use Geo::Point; my $pt = Geo::Point->latlong( 48.208333, 16.372778 ); my $guri = URI::geo->new( $pt );

As will this:

my $guri = URI::geo->new( { lat => 55, lon => -1 } );

and this:

my $guri = URI::geo->new( 55, -1 );

Note that you can also create a new URI::geo by passing a Geo URI to URI::new:

use URI; my $guri = URI->new( geo:55,-1 );

“location”

Get or set the location of this geo URI.

my ( $lat, $lon, $alt ) = $guri->location; $guri->location( 55.3, -3.7, 120 );

When setting the location it is possible to pass any of the argument types that can be passed to new.

“latitude”

Get or set the latitude of this geo URI.

“longitude”

Get or set the longitude of this geo URI.

“altitude”

Get or set the altitude <https://en.wikipedia.org/wiki/Geo_URI_scheme#Altitude> of this geo URI. To delete the altitude set it to undef.

“crs”

Get or set the Coordinate Reference System <https://en.wikipedia.org/wiki/Geo_URI_scheme#Coordinate_reference_systems> of this geo URI. To delete the CRS set it to undef.

“uncertainty”

Get or set the uncertainty <https://en.wikipedia.org/wiki/Geo_URI_scheme#Uncertainty> of this geo URI. To delete the uncertainty set it to undef.

“field”

CONFIGURATION AND ENVIRONMENT

URI::geo requires no configuration files or environment variables.

DEPENDENCIES

URI

DIAGNOSTICS

“Too many arguments”
The new method can only accept three parameters; latitude, longitude and altitude.

“Dont know how to convert point”
The new method doesn’t know how to convert the supplied parameters into a URI::geo object.

“Need lat, lon or lat, lon, alt”
The new method needs two (latitude and longitude) or three (latitude, longitude and altitude) parameters in a list. Any less or more than this is an error.

“No such field: %s”
This field is not a known field for the URI::geo object.

“Badly formed geo uri”
The URI cannot be parsed as a URI

“Badly formed geo uri”
The URI cannot be parsed as a URI

“Latitude out of range”
Latitude may only be from -90 to +90

“Longitude out of range”
Longitude may only be from -180 to +180

INCOMPATIBILITIES

None reported.

BUGS AND LIMITATIONS

To report a bug, or view the current list of bugs, please visit <https://github.com/libwww-perl/URI/issues>

AUTHOR

Andy Armstrong <[email protected]>

LICENSE AND COPYRIGHT

Copyright (c) 2009, Andy Armstrong <[email protected]>.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

785 - Linux cli command getservbyname

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getservbyname and provides detailed information about the command getservbyname, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getservbyname.

NAME 🖥️ getservbyname 🖥️

get service entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
struct servent *getservent(void);
struct servent *getservbyname(const char *name, const char *proto);
struct servent *getservbyport(int port, const char *proto);
void setservent(int stayopen);
void endservent(void);

DESCRIPTION

The getservent() function reads the next entry from the services database (see services(5)) and returns a servent structure containing the broken-out fields from the entry. A connection is opened to the database if necessary.

The getservbyname() function returns a servent structure for the entry from the database that matches the service name using protocol proto. If proto is NULL, any protocol will be matched. A connection is opened to the database if necessary.

The getservbyport() function returns a servent structure for the entry from the database that matches the port port (given in network byte order) using protocol proto. If proto is NULL, any protocol will be matched. A connection is opened to the database if necessary.

The setservent() function opens a connection to the database, and sets the next entry to the first entry. If stayopen is nonzero, then the connection to the database will not be closed between calls to one of the getserv*() functions.

The endservent() function closes the connection to the database.

The servent structure is defined in <netdb.h> as follows:

struct servent {
    char  *s_name;       /* official service name */
    char **s_aliases;    /* alias list */
    int    s_port;       /* port number */
    char  *s_proto;      /* protocol to use */
}

The members of the servent structure are:

s_name
The official name of the service.

s_aliases
A NULL-terminated list of alternative names for the service.

s_port
The port number for the service given in network byte order.

s_proto
The name of the protocol to use with this service.

RETURN VALUE

The getservent(), getservbyname(), and getservbyport() functions return a pointer to a statically allocated servent structure, or NULL if an error occurs or the end of the file is reached.

FILES

/etc/services
services database file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getservent()

Thread safety

MT-Unsafe race:servent race:serventbuf locale

getservbyname()

Thread safety

MT-Unsafe race:servbyname locale

getservbyport()

Thread safety

MT-Unsafe race:servbyport locale

setservent(), endservent()

Thread safety

MT-Unsafe race:servent locale

In the above table, servent in race:servent signifies that if any of the functions setservent(), getservent(), or endservent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, 4.3BSD.

SEE ALSO

getnetent(3), getprotoent(3), getservent_r(3), services(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

786 - Linux cli command sethostid

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sethostid and provides detailed information about the command sethostid, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sethostid.

NAME 🖥️ sethostid 🖥️

get or set the unique identifier of the current host

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
long gethostid(void);
int sethostid(long hostid);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

gethostid():

    Since glibc 2.20:
        _DEFAULT_SOURCE || _XOPEN_SOURCE >= 500
    Up to and including glibc 2.19:
        _BSD_SOURCE || _XOPEN_SOURCE >= 500

sethostid():

    Since glibc 2.21:
        _DEFAULT_SOURCE
    In glibc 2.19 and 2.20:
        _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)
    Up to and including glibc 2.19:
        _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)

DESCRIPTION

gethostid() and sethostid() respectively get or set a unique 32-bit identifier for the current machine. The 32-bit identifier was intended to be unique among all UNIX systems in existence. This normally resembles the Internet address for the local machine, as returned by gethostbyname(3), and thus usually never needs to be set.

The sethostid() call is restricted to the superuser.

RETURN VALUE

gethostid() returns the 32-bit identifier for the current host as set by sethostid().

On success, sethostid() returns 0; on error, -1 is returned, and errno is set to indicate the error.

ERRORS

sethostid() can fail with the following errors:

EACCES
The caller did not have permission to write to the file used to store the host ID.

EPERM
The calling process’s effective user or group ID is not the same as its corresponding real ID.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

gethostid()

Thread safety

MT-Safe hostid env locale

sethostid()

Thread safety

MT-Unsafe const:hostid

VERSIONS

In the glibc implementation, the hostid is stored in the file /etc/hostid. (Before glibc 2.2, the file /var/adm/hostid was used.)

In the glibc implementation, if gethostid() cannot open the file containing the host ID, then it obtains the hostname using gethostname(2), passes that hostname to gethostbyname_r(3) in order to obtain the host’s IPv4 address, and returns a value obtained by bit-twiddling the IPv4 address. (This value may not be unique.)

STANDARDS

gethostid()
POSIX.1-2008.

sethostid()
None.

HISTORY

4.2BSD; dropped in 4.4BSD. SVr4 and POSIX.1-2001 include gethostid() but not sethostid().

BUGS

It is impossible to ensure that the identifier is globally unique.

SEE ALSO

hostid(1), gethostbyname(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

787 - Linux cli command XtDisplay

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtDisplay and provides detailed information about the command XtDisplay, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtDisplay.

NAME 🖥️ XtDisplay 🖥️

obtain window information about a widget

SYNTAX

#include <X11/Intrinsic.h>

Display *XtDisplay(Widget w);

Display *XtDisplayOfObject(Widget object);

Screen *XtScreen(Widget w);

Screen *XtScreenOfObject(Widget object);

Window XtWindow(Widget w);

Window XtWindowOfObject(Widget object);

ARGUMENTS

  1. Specifies the widget.

object
Specifies the widget.

DESCRIPTION

XtDisplay returns the display pointer for the specified widget.

XtDisplayOfObject returns the display pointer for the specified object.

XtScreen returns the screen pointer for the specified widget.

XtScreenOfObject returns the screen pointer for the specified object.

XtWindow returns the window of the specified widget.

XtWindowOfObject returns the window of the specified object.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

788 - Linux cli command HTTP_Requestpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTTP_Requestpm and provides detailed information about the command HTTP_Requestpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTTP_Requestpm.

NAME 🖥️ HTTP_Requestpm 🖥️

HTTP style request message

VERSION

version 6.46

SYNOPSIS

require HTTP::Request; $request = HTTP::Request->new(GET => http://www.example.com/);

and usually used like this:

$ua = LWP::UserAgent->new; $response = $ua->request($request);

DESCRIPTION

HTTP::Request is a class encapsulating HTTP style requests, consisting of a request line, some headers, and a content body. Note that the LWP library uses HTTP style requests even for non-HTTP protocols. Instances of this class are usually passed to the request() method of an LWP::UserAgent object.

HTTP::Request is a subclass of HTTP::Message and therefore inherits its methods. The following additional methods are available:

$r = HTTP::Request->new( $method, $uri )

$r = HTTP::Request->new( $method, $uri, $header )

$r = HTTP::Request->new( $method, $uri, $header, $content )

Constructs a new HTTP::Request object describing a request on the object $uri using method $method. The $method argument must be a string. The $uri argument can be either a string, or a reference to a URI object. The optional $header argument should be a reference to an HTTP::Headers object or a plain array reference of key/value pairs. The optional $content argument should be a string of bytes.

$r = HTTP::Request->parse( $str )
This constructs a new request object by parsing the given string.

$r->method

$r->method( $val )

This is used to get/set the method attribute. The method should be a short string like “GET”, “HEAD”, “PUT”, “PATCH” or “POST”.

$r->uri

$r->uri( $val )

This is used to get/set the uri attribute. The $val can be a reference to a URI object or a plain string. If a string is given, then it should be parsable as an absolute URI.

$r->header( $field )

$r->header( $field => $value )

This is used to get/set header values and it is inherited from HTTP::Headers via HTTP::Message. See HTTP::Headers for details and other similar methods that can be used to access the headers.

$r->accept_decodable
This will set the Accept-Encoding header to the list of encodings that decoded_content() can decode.

$r->content

$r->content( $bytes )

This is used to get/set the content and it is inherited from the HTTP::Message base class. See HTTP::Message for details and other methods that can be used to access the content. Note that the content should be a string of bytes. Strings in perl can contain characters outside the range of a byte. The Encode module can be used to turn such strings into a string of bytes.

$r->as_string

$r->as_string( $eol )

Method returning a textual representation of the request.

EXAMPLES

Creating requests to be sent with LWP::UserAgent or others can be easy. Here are a few examples.

Simple POST

Here, we’ll create a simple POST request that could be used to send JSON data to an endpoint.

#!/usr/bin/env perl use strict; use warnings; use HTTP::Request (); use JSON::MaybeXS qw(encode_json); my $url = https://www.example.com/api/user/123; my $header = [Content-Type => application/json; charset=UTF-8]; my $data = {foo => bar, baz => quux}; my $encoded_data = encode_json($data); my $r = HTTP::Request->new(POST, $url, $header, $encoded_data); # at this point, we could send it via LWP::UserAgent # my $ua = LWP::UserAgent->new(); # my $res = $ua->request($r);

Batch POST Request

Some services, like Google, allow multiple requests to be sent in one batch. <https://developers.google.com/drive/v3/web/batch> for example. Using the add_part method from HTTP::Message makes this simple.

#!/usr/bin/env perl use strict; use warnings; use HTTP::Request (); use JSON::MaybeXS qw(encode_json); my $auth_token = auth_token; my $batch_url = https://www.googleapis.com/batch; my $url = https://www.googleapis.com/drive/v3/files/fileId/permissions?fields=id; my $url_no_email = https://www.googleapis.com/drive/v3/files/fileId/permissions?fields=id&sendNotificationEmail=false; # generate a JSON post request for one of the batch entries my $req1 = build_json_request($url, { emailAddress => [email protected], role => “writer”, type => “user”, }); # generate a JSON post request for one of the batch entries my $req2 = build_json_request($url_no_email, { domain => “appsrocks.com”, role => “reader”, type => “domain”, }); # generate a multipart request to send all of the other requests my $r = HTTP::Request->new(POST, $batch_url, [ Accept-Encoding => gzip, # if we dont provide a boundary here, HTTP::Message will generate # one for us. We could use UUID::uuid() here if we wanted. Content-Type => multipart/mixed; boundary=END_OF_PART ]); # add the two POST requests to the main request $r->add_part($req1, $req2); # at this point, we could send it via LWP::UserAgent # my $ua = LWP::UserAgent->new(); # my $res = $ua->request($r); exit(); sub build_json_request { my ($url, $href) = @_; my $header = [Authorization => “Bearer $auth_token”, Content-Type => application/json; charset=UTF-8]; return HTTP::Request->new(POST, $url, $header, encode_json($href)); }

SEE ALSO

HTTP::Headers, HTTP::Message, HTTP::Request::Common, HTTP::Response

AUTHOR

Gisle Aas <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 1994 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

789 - Linux cli command Mail_Field_Datepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Mail_Field_Datepm and provides detailed information about the command Mail_Field_Datepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Mail_Field_Datepm.

NAME 🖥️ Mail_Field_Datepm 🖥️

a date header field

INHERITANCE

Mail::Field::Date is a Mail::Field

SYNOPSIS

use HTTP::Date time2iso; my $field = Mail::Field->new(Date => time2iso());

DESCRIPTION

Represents one “Date” header field.

Extends “DESCRIPTION” in Mail::Field.

METHODS

Extends “METHODS” in Mail::Field.

Constructors

Extends “Constructors” in Mail::Field.

Mail::Field::Date->combine($fields)
Inherited, see “Constructors” in Mail::Field

Mail::Field::Date->extract( $tag, $head [, $index ] )
Inherited, see “Constructors” in Mail::Field

Mail::Field::Date->new( $tag [, STRING | %options] )
Inherited, see “Constructors” in Mail::Field

“Fake” constructors

Extends ““Fake” constructors” in Mail::Field.

$obj->create(%options)
Inherited, see ““Fake” constructors” in Mail::Field

$obj->parse()
Inherited, see ““Fake” constructors” in Mail::Field

Accessors

Extends “Accessors” in Mail::Field.

$obj->set(%options)
-Option –Default Time undef TimeStr undef

Time => SECONDS

TimeStr => STRING

A string acceptable to Date::Parse.

$obj->stringify()
Inherited, see “Accessors” in Mail::Field

$obj->tag()

Mail::Field::Date->tag()

Inherited, see “Accessors” in Mail::Field

Smart accessors

Extends “Smart accessors” in Mail::Field.

$obj->text( [STRING] )
Inherited, see “Smart accessors” in Mail::Field

$obj->time( [$time] )
Query (or change) the $time (as stored in the field) in seconds.

DETAILS

Extends “DETAILS” in Mail::Field.

DIAGNOSTICS

Error: Undefined subroutine <method> called
Mail::Field objects use autoloading to compile new functionality. Apparently, the method called is not implemented for the specific class of the field object.

SEE ALSO

This module is part of the MailTools distribution, http://perl.overmeer.net/mailtools/.

AUTHORS

The MailTools bundle was developed by Graham Barr. Later, Mark Overmeer took over maintenance without commitment to further development.

Mail::Cap by Gisle Aas <[email protected]>. Mail::Field::AddrList by Peter Orbaek <[email protected]>. Mail::Mailer and Mail::Send by Tim Bunce <[email protected]>. For other contributors see ChangeLog.

LICENSE

Copyrights 1995-2000 Graham Barr <[email protected]> and 2001-2017 Mark Overmeer <[email protected]>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

790 - Linux cli command oopm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command oopm and provides detailed information about the command oopm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the oopm.

NAME 🖥️ oopm 🖥️

syntactic sugar for Moo oneliners

SYNOPSIS

perl -Moo=Foo -e has bar => ( is => q[ro], default => q[baz] ); print Foo->new->bar # loads an existing class and re-“opens” the package definition perl -Moo=+My::Class -e print _ _PACKAGE_ _->new->bar

DESCRIPTION

oo.pm is a simple source filter that adds package $name; use Moo; to the beginning of your script, intended for use on the command line via the -M option.

SUPPORT

See Moo for support and contact information.

AUTHORS

See Moo for authors.

COPYRIGHT AND LICENSE

See Moo for the copyright and license.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

791 - Linux cli command pthread_attr_setstack

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_attr_setstack and provides detailed information about the command pthread_attr_setstack, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_attr_setstack.

NAME 🖥️ pthread_attr_setstack 🖥️

set/get stack attributes in thread attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_attr_setstack(pthread_attr_t *attr,
 void stackaddr[.stacksize],
 size_t stacksize);
int pthread_attr_getstack(const pthread_attr_t *restrict attr,
 void **restrict stackaddr,
 size_t *restrict stacksize);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

pthread_attr_getstack(), pthread_attr_setstack():

    _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The pthread_attr_setstack() function sets the stack address and stack size attributes of the thread attributes object referred to by attr to the values specified in stackaddr and stacksize, respectively. These attributes specify the location and size of the stack that should be used by a thread that is created using the thread attributes object attr.

stackaddr should point to the lowest addressable byte of a buffer of stacksize bytes that was allocated by the caller. The pages of the allocated buffer should be both readable and writable.

The pthread_attr_getstack() function returns the stack address and stack size attributes of the thread attributes object referred to by attr in the buffers pointed to by stackaddr and stacksize, respectively.

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

pthread_attr_setstack() can fail with the following error:

EINVAL
stacksize is less than PTHREAD_STACK_MIN (16384) bytes. On some systems, this error may also occur if stackaddr or stackaddr + stacksize is not suitably aligned.

POSIX.1 also documents an EACCES error if the stack area described by stackaddr and stacksize is not both readable and writable by the caller.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_attr_setstack(), pthread_attr_getstack()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.2. POSIX.1-2001.

NOTES

These functions are provided for applications that must ensure that a thread’s stack is placed in a particular location. For most applications, this is not necessary, and the use of these functions should be avoided. (Use pthread_attr_setstacksize(3) if an application simply requires a stack size other than the default.)

When an application employs pthread_attr_setstack(), it takes over the responsibility of allocating the stack. Any guard size value that was set using pthread_attr_setguardsize(3) is ignored. If deemed necessary, it is the application’s responsibility to allocate a guard area (one or more pages protected against reading and writing) to handle the possibility of stack overflow.

The address specified in stackaddr should be suitably aligned: for full portability, align it on a page boundary (sysconf(_SC_PAGESIZE)). posix_memalign(3) may be useful for allocation. Probably, stacksize should also be a multiple of the system page size.

If attr is used to create multiple threads, then the caller must change the stack address attribute between calls to pthread_create(3); otherwise, the threads will attempt to use the same memory area for their stacks, and chaos will ensue.

EXAMPLES

See pthread_attr_init(3).

SEE ALSO

mmap(2), mprotect(2), posix_memalign(3), pthread_attr_init(3), pthread_attr_setguardsize(3), pthread_attr_setstackaddr(3), pthread_attr_setstacksize(3), pthread_create(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

792 - Linux cli command setprotoent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setprotoent and provides detailed information about the command setprotoent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setprotoent.

NAME 🖥️ setprotoent 🖥️

get protocol entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
struct protoent *getprotoent(void);
struct protoent *getprotobyname(const char *name);
struct protoent *getprotobynumber(int proto);
void setprotoent(int stayopen);
void endprotoent(void);

DESCRIPTION

The getprotoent() function reads the next entry from the protocols database (see protocols(5)) and returns a protoent structure containing the broken-out fields from the entry. A connection is opened to the database if necessary.

The getprotobyname() function returns a protoent structure for the entry from the database that matches the protocol name name. A connection is opened to the database if necessary.

The getprotobynumber() function returns a protoent structure for the entry from the database that matches the protocol number number. A connection is opened to the database if necessary.

The setprotoent() function opens a connection to the database, and sets the next entry to the first entry. If stayopen is nonzero, then the connection to the database will not be closed between calls to one of the getproto*() functions.

The endprotoent() function closes the connection to the database.

The protoent structure is defined in <netdb.h> as follows:

struct protoent {
    char  *p_name;       /* official protocol name */
    char **p_aliases;    /* alias list */
    int    p_proto;      /* protocol number */
}

The members of the protoent structure are:

p_name
The official name of the protocol.

p_aliases
A NULL-terminated list of alternative names for the protocol.

p_proto
The protocol number.

RETURN VALUE

The getprotoent(), getprotobyname(), and getprotobynumber() functions return a pointer to a statically allocated protoent structure, or a null pointer if an error occurs or the end of the file is reached.

FILES

/etc/protocols
protocol database file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getprotoent()

Thread safety

MT-Unsafe race:protoent race:protoentbuf locale

getprotobyname()

Thread safety

MT-Unsafe race:protobyname locale

getprotobynumber()

Thread safety

MT-Unsafe race:protobynumber locale

setprotoent(), endprotoent()

Thread safety

MT-Unsafe race:protoent locale

In the above table, protoent in race:protoent signifies that if any of the functions setprotoent(), getprotoent(), or endprotoent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, 4.3BSD.

SEE ALSO

getnetent(3), getprotoent_r(3), getservent(3), protocols(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

793 - Linux cli command makecontext

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command makecontext and provides detailed information about the command makecontext, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the makecontext.

NAME 🖥️ makecontext 🖥️

manipulate user context

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ucontext.h>
void makecontext(ucontext_t *ucp, void (*func)(), int argc",...);"
int swapcontext(ucontext_t *restrict oucp,
 const ucontext_t *restrict ucp);

DESCRIPTION

In a System V-like environment, one has the type ucontext_t (defined in <ucontext.h> and described in getcontext(3)) and the four functions getcontext(3), setcontext(3), makecontext(), and swapcontext() that allow user-level context switching between multiple threads of control within a process.

The makecontext() function modifies the context pointed to by ucp (which was obtained from a call to getcontext(3)). Before invoking makecontext(), the caller must allocate a new stack for this context and assign its address to ucp->uc_stack, and define a successor context and assign its address to ucp->uc_link.

When this context is later activated (using setcontext(3) or swapcontext()) the function func is called, and passed the series of integer (int) arguments that follow argc; the caller must specify the number of these arguments in argc. When this function returns, the successor context is activated. If the successor context pointer is NULL, the thread exits.

The swapcontext() function saves the current context in the structure pointed to by oucp, and then activates the context pointed to by ucp.

RETURN VALUE

When successful, swapcontext() does not return. (But we may return later, in case oucp is activated, in which case it looks like swapcontext() returns 0.) On error, swapcontext() returns -1 and sets errno to indicate the error.

ERRORS

ENOMEM
Insufficient stack space left.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

makecontext()

Thread safety

MT-Safe race:ucp

swapcontext()

Thread safety

MT-Safe race:oucp race:ucp

STANDARDS

None.

HISTORY

glibc 2.1. SUSv2, POSIX.1-2001. Removed in POSIX.1-2008, citing portability issues, and recommending that applications be rewritten to use POSIX threads instead.

NOTES

The interpretation of ucp->uc_stack is just as in sigaltstack(2), namely, this struct contains the start and length of a memory area to be used as the stack, regardless of the direction of growth of the stack. Thus, it is not necessary for the user program to worry about this direction.

On architectures where int and pointer types are the same size (e.g., x86-32, where both types are 32 bits), you may be able to get away with passing pointers as arguments to makecontext() following argc. However, doing this is not guaranteed to be portable, is undefined according to the standards, and won’t work on architectures where pointers are larger than ints. Nevertheless, starting with glibc 2.8, glibc makes some changes to makecontext(), to permit this on some 64-bit architectures (e.g., x86-64).

EXAMPLES

The example program below demonstrates the use of getcontext(3), makecontext(), and swapcontext(). Running the program produces the following output:

$ ./a.out
main: swapcontext(&uctx_main, &uctx_func2)
func2: started
func2: swapcontext(&uctx_func2, &uctx_func1)
func1: started
func1: swapcontext(&uctx_func1, &uctx_func2)
func2: returning
func1: returning
main: exiting

Program source

#include <stdio.h>
#include <stdlib.h>
#include <ucontext.h>
static ucontext_t uctx_main, uctx_func1, uctx_func2;
#define handle_error(msg) \
    do { perror(msg); exit(EXIT_FAILURE); } while (0)
static void
func1(void)
{
    printf("%s: started

“, func); printf("%s: swapcontext(&uctx_func1, &uctx_func2) “, func); if (swapcontext(&uctx_func1, &uctx_func2) == -1) handle_error(“swapcontext”); printf("%s: returning “, func); } static void func2(void) { printf("%s: started “, func); printf("%s: swapcontext(&uctx_func2, &uctx_func1) “, func); if (swapcontext(&uctx_func2, &uctx_func1) == -1) handle_error(“swapcontext”); printf("%s: returning “, func); } int main(int argc, char argv[]) { char func1_stack[16384]; char func2_stack[16384]; if (getcontext(&uctx_func1) == -1) handle_error(“getcontext”); uctx_func1.uc_stack.ss_sp = func1_stack; uctx_func1.uc_stack.ss_size = sizeof(func1_stack); uctx_func1.uc_link = &uctx_main; makecontext(&uctx_func1, func1, 0); if (getcontext(&uctx_func2) == -1) handle_error(“getcontext”); uctx_func2.uc_stack.ss_sp = func2_stack; uctx_func2.uc_stack.ss_size = sizeof(func2_stack); / Successor context is f1(), unless argc > 1 */ uctx_func2.uc_link = (argc > 1) ? NULL : &uctx_func1; makecontext(&uctx_func2, func2, 0); printf("%s: swapcontext(&uctx_main, &uctx_func2) “, func); if (swapcontext(&uctx_main, &uctx_func2) == -1) handle_error(“swapcontext”); printf("%s: exiting “, func); exit(EXIT_SUCCESS); }

SEE ALSO

sigaction(2), sigaltstack(2), sigprocmask(2), getcontext(3), sigsetjmp(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

794 - Linux cli command pcap_open_offlinepcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_open_offlinepcap and provides detailed information about the command pcap_open_offlinepcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_open_offlinepcap.

NAME 🖥️ pcap_open_offlinepcap 🖥️

open a saved capture file for reading

SYNOPSIS

#include <pcap/pcap.h>
char errbuf[PCAP_ERRBUF_SIZE];
pcap_t *pcap_open_offline(const char *fname, char *errbuf);
pcap_t *pcap_open_offline_with_tstamp_precision(const char *fname,
    u_int precision, char *errbuf);
pcap_t *pcap_fopen_offline(FILE *fp, char *errbuf);
pcap_t *pcap_fopen_offline_with_tstamp_precision(FILE *fp,
    u_int precision, char *errbuf);

DESCRIPTION

pcap_open_offline() and pcap_open_offline_with_tstamp_precision() are called to open a ``savefile’’ for reading.

fname specifies the name of the file to open. The file can have the pcap file format as described in pcap-savefile(5), which is the file format used by, among other programs, tcpdump(1) and tcpslice(1), or can have the pcapng file format, although not all pcapng files can be read. The name “-” is a synonym for stdin.

pcap_open_offline_with_tstamp_precision() takes an additional precision argument specifying the time stamp precision desired; if PCAP_TSTAMP_PRECISION_MICRO is specified, packet time stamps will be supplied in seconds and microseconds, and if PCAP_TSTAMP_PRECISION_NANO is specified, packet time stamps will be supplied in seconds and nanoseconds. If the time stamps in the file do not have the same precision as the requested precision, they will be scaled up or down as necessary before being supplied.

Alternatively, you may call pcap_fopen_offline() or pcap_fopen_offline_with_tstamp_precision() to read dumped data from an existing open stream fp. pcap_fopen_offline_with_tstamp_precision() takes an additional precision argument as described above. Note that on Windows, that stream should be opened in binary mode.

RETURN VALUE

pcap_open_offline(), pcap_open_offline_with_tstamp_precision(), pcap_fopen_offline(), and pcap_fopen_offline_with_tstamp_precision() return a pcap_t * on success and NULL on failure. If NULL is returned, errbuf is filled in with an appropriate error message. errbuf is assumed to be able to hold at least PCAP_ERRBUF_SIZE chars.

BACKWARD COMPATIBILITY

pcap_open_offline_with_tstamp_precision() and pcap_fopen_offline_with_tstamp_precision() became available in libpcap release 1.5.1. In previous releases, time stamps from a savefile are always given in seconds and microseconds.

SEE ALSO

pcap(3PCAP), pcap-savefile(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

795 - Linux cli command File_MimeInfo_Magicpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command File_MimeInfo_Magicpm and provides detailed information about the command File_MimeInfo_Magicpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the File_MimeInfo_Magicpm.

NAME 🖥️ File_MimeInfo_Magicpm 🖥️

Determine file type with magic

SYNOPSIS

use File::MimeInfo::Magic; my $mime_type = mimetype($file);

DESCRIPTION

This module inherits from File::MimeInfo, it is transparent to its functions but adds support for the freedesktop magic file.

Magic data is hashed when you need it for the first time. If you want to force hashing earlier use the rehash() function.

EXPORT

The method mimetype is exported by default. The methods magic, inodetype, globs and describe can be exported on demand.

METHODS

See also File::MimeInfo for methods that are inherited.

mimetype($file)
Returns a mime-type string for $file, returns undef on failure. This method bundles inodetype(), globs() and magic(). Magic rules with an priority of 80 and higher are checked before globs() is called, all other magic rules afterwards. If this doesn’t work the file is read and the mime-type defaults to ’text/plain’ or to ‘application/octet-stream’ when the first ten chars of the file match ascii control chars (white spaces excluded). If the file doesn’t exist or isn’t readable undef is returned. If $file is an object reference only magic and the default method are used. See below for details.

magic($file)
Returns a mime-type string for $file based on the magic rules, returns undef on failure. $file can be an object reference, in that case it is supposed to have a seek() and a read() method. This allows you for example to determine the mimetype of data in memory by using IO::Scalar. Be aware that when using a filehandle or an IO:: object you need to set the :utf8 binmode yourself if appropriate.

rehash()
Rehash the data files. Glob and magic information is preparsed when this method is called. If you want to by-pass the XDG basedir system you can specify your database directories by setting @File::MimeInfo::DIRS. But normally it is better to change the XDG basedir environment variables.

“default”

“describe”

“extensions”

“globs”

“inodetype”

These routines are imported from File::MimeInfo.

SEE ALSO

File::MimeInfo

LIMITATIONS

Only word sizes of 1, 2 or 4 are supported. Any other word size is ignored and will cause a warning.

AUTHOR

Jaap Karssenberg <[email protected]> Maintained by Michiel Beijen <[email protected]>

COPYRIGHT

Copyright (c) 2003, 2012 Jaap G Karssenberg. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

796 - Linux cli command pthread_attr_setguardsize

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_attr_setguardsize and provides detailed information about the command pthread_attr_setguardsize, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_attr_setguardsize.

NAME 🖥️ pthread_attr_setguardsize 🖥️

set/get guard size attribute in thread attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_attr_setguardsize(pthread_attr_t *attr",size_t"guardsize);
int pthread_attr_getguardsize(const pthread_attr_t *restrict attr,
 size_t *restrict guardsize);

DESCRIPTION

The pthread_attr_setguardsize() function sets the guard size attribute of the thread attributes object referred to by attr to the value specified in guardsize.

If guardsize is greater than 0, then for each new thread created using attr the system allocates an additional region of at least guardsize bytes at the end of the thread’s stack to act as the guard area for the stack (but see BUGS).

If guardsize is 0, then new threads created with attr will not have a guard area.

The default guard size is the same as the system page size.

If the stack address attribute has been set in attr (using pthread_attr_setstack(3) or pthread_attr_setstackaddr(3)), meaning that the caller is allocating the thread’s stack, then the guard size attribute is ignored (i.e., no guard area is created by the system): it is the application’s responsibility to handle stack overflow (perhaps by using mprotect(2) to manually define a guard area at the end of the stack that it has allocated).

The pthread_attr_getguardsize() function returns the guard size attribute of the thread attributes object referred to by attr in the buffer pointed to by guardsize.

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

POSIX.1 documents an EINVAL error if attr or guardsize is invalid. On Linux these functions always succeed (but portable and future-proof applications should nevertheless handle a possible error return).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_attr_setguardsize(), pthread_attr_getguardsize()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.1. POSIX.1-2001.

NOTES

A guard area consists of virtual memory pages that are protected to prevent read and write access. If a thread overflows its stack into the guard area, then, on most hard architectures, it receives a SIGSEGV signal, thus notifying it of the overflow. Guard areas start on page boundaries, and the guard size is internally rounded up to the system page size when creating a thread. (Nevertheless, pthread_attr_getguardsize() returns the guard size that was set by pthread_attr_setguardsize().)

Setting a guard size of 0 may be useful to save memory in an application that creates many threads and knows that stack overflow can never occur.

Choosing a guard size larger than the default size may be necessary for detecting stack overflows if a thread allocates large data structures on the stack.

BUGS

As at glibc 2.8, the NPTL threading implementation includes the guard area within the stack size allocation, rather than allocating extra space at the end of the stack, as POSIX.1 requires. (This can result in an EINVAL error from pthread_create(3) if the guard size value is too large, leaving no space for the actual stack.)

The obsolete LinuxThreads implementation did the right thing, allocating extra space at the end of the stack for the guard area.

EXAMPLES

See pthread_getattr_np(3).

SEE ALSO

mmap(2), mprotect(2), pthread_attr_init(3), pthread_attr_setstack(3), pthread_attr_setstacksize(3), pthread_create(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

797 - Linux cli command vsyslog

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command vsyslog and provides detailed information about the command vsyslog, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the vsyslog.

NAME 🖥️ vsyslog 🖥️

send messages to the system logger

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <syslog.h>
void openlog(const char *ident, int option, int facility);
void syslog(int priority, const char *format, ...);
void closelog(void);
void vsyslog(int priority, const char *format, va_list ap);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

vsyslog():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

openlog()

openlog() opens a connection to the system logger for a program.

The string pointed to by ident is prepended to every message, and is typically set to the program name. If ident is NULL, the program name is used. (POSIX.1-2008 does not specify the behavior when ident is NULL.)

The option argument specifies flags which control the operation of openlog() and subsequent calls to syslog(). The facility argument establishes a default to be used if none is specified in subsequent calls to syslog(). The values that may be specified for option and facility are described below.

The use of openlog() is optional; it will automatically be called by syslog() if necessary, in which case ident will default to NULL.

syslog() and vsyslog()

syslog() generates a log message, which will be distributed by syslogd(8).

The priority argument is formed by ORing together a facility value and a level value (described below). If no facility value is ORed into priority, then the default value set by openlog() is used, or, if there was no preceding openlog() call, a default of LOG_USER is employed.

The remaining arguments are a format, as in printf(3), and any arguments required by the format, except that the two-character sequence %m will be replaced by the error message string strerror(errno). The format string need not include a terminating newline character.

The function vsyslog() performs the same task as syslog() with the difference that it takes a set of arguments which have been obtained using the stdarg(3) variable argument list macros.

closelog()

closelog() closes the file descriptor being used to write to the system logger. The use of closelog() is optional.

Values for option

The option argument to openlog() is a bit mask constructed by ORing together any of the following values:

LOG_CONS
Write directly to the system console if there is an error while sending to the system logger.

LOG_NDELAY
Open the connection immediately (normally, the connection is opened when the first message is logged). This may be useful, for example, if a subsequent chroot(2) would make the pathname used internally by the logging facility unreachable.

LOG_NOWAIT
Don’t wait for child processes that may have been created while logging the message. (The GNU C library does not create a child process, so this option has no effect on Linux.)

LOG_ODELAY
The converse of LOG_NDELAY; opening of the connection is delayed until syslog() is called. (This is the default, and need not be specified.)

LOG_PERROR
(Not in POSIX.1-2001 or POSIX.1-2008.) Also log the message to stderr.

LOG_PID
Include the caller’s PID with each message.

Values for facility

The facility argument is used to specify what type of program is logging the message. This lets the configuration file specify that messages from different facilities will be handled differently.

LOG_AUTH
security/authorization messages

LOG_AUTHPRIV
security/authorization messages (private)

LOG_CRON
clock daemon (cron and at)

LOG_DAEMON
system daemons without separate facility value

LOG_FTP
ftp daemon

LOG_KERN
kernel messages (these can’t be generated from user processes)

LOG_LOCAL0 through LOG_LOCAL7
reserved for local use

LOG_LPR
line printer subsystem

LOG_MAIL
mail subsystem

LOG_NEWS
USENET news subsystem

LOG_SYSLOG
messages generated internally by syslogd(8)

LOG_USER (default)
generic user-level messages

LOG_UUCP
UUCP subsystem

Values for level

This determines the importance of the message. The levels are, in order of decreasing importance:

LOG_EMERG
system is unusable

LOG_ALERT
action must be taken immediately

LOG_CRIT
critical conditions

LOG_ERR
error conditions

LOG_WARNING
warning conditions

LOG_NOTICE
normal, but significant, condition

LOG_INFO
informational message

LOG_DEBUG
debug-level message

The function setlogmask(3) can be used to restrict logging to specified levels only.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

openlog(), closelog()

Thread safetyMT-Safe

syslog(), vsyslog()

Thread safetyMT-Safe env locale

STANDARDS

syslog()
openlog()
closelog()
POSIX.1-2008.

vsyslog()
None.

HISTORY

syslog()
4.2BSD, SUSv2, POSIX.1-2001.

openlog()
closelog()
4.3BSD, SUSv2, POSIX.1-2001.

vsyslog()
4.3BSD-Reno.

POSIX.1-2001 specifies only the LOG_USER and LOG_LOCAL* values for facility. However, with the exception of LOG_AUTHPRIV and LOG_FTP, the other facility values appear on most UNIX systems.

The LOG_PERROR value for option is not specified by POSIX.1-2001 or POSIX.1-2008, but is available in most versions of UNIX.

NOTES

The argument ident in the call of openlog() is probably stored as-is. Thus, if the string it points to is changed, syslog() may start prepending the changed string, and if the string it points to ceases to exist, the results are undefined. Most portable is to use a string constant.

Never pass a string with user-supplied data as a format, use the following instead:

syslog(priority, "%s", string);

SEE ALSO

journalctl(1), logger(1), setlogmask(3), syslog.conf(5), syslogd(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

798 - Linux cli command ungetwc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ungetwc and provides detailed information about the command ungetwc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ungetwc.

NAME 🖥️ ungetwc 🖥️

push back a wide character onto a FILE stream

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
wint_t ungetwc(wint_t wc, FILE *stream);

DESCRIPTION

The ungetwc() function is the wide-character equivalent of the ungetc(3) function. It pushes back a wide character onto stream and returns it.

If wc is WEOF, it returns WEOF. If wc is an invalid wide character, it sets errno to EILSEQ and returns WEOF.

If wc is a valid wide character, it is pushed back onto the stream and thus becomes available for future wide-character read operations. The file-position indicator is decremented by one or more. The end-of-file indicator is cleared. The backing storage of the file is not affected.

Note: wc need not be the last wide-character read from the stream; it can be any other valid wide character.

If the implementation supports multiple push-back operations in a row, the pushed-back wide characters will be read in reverse order; however, only one level of push-back is guaranteed.

RETURN VALUE

The ungetwc() function returns wc when successful, or WEOF upon failure.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

ungetwc()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of ungetwc() depends on the LC_CTYPE category of the current locale.

SEE ALSO

fgetwc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

799 - Linux cli command fopencookie

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fopencookie and provides detailed information about the command fopencookie, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fopencookie.

NAME 🖥️ fopencookie 🖥️

open a custom stream

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#define _FILE_OFFSET_BITS 64
#include <stdio.h>
FILE *fopencookie(void *restrict cookie, const char *restrict mode,
 cookie_io_functions_t io_funcs);

DESCRIPTION

The fopencookie() function allows the programmer to create a custom implementation for a standard I/O stream. This implementation can store the stream’s data at a location of its own choosing; for example, fopencookie() is used to implement fmemopen(3), which provides a stream interface to data that is stored in a buffer in memory.

In order to create a custom stream the programmer must:

  • Implement four “hook” functions that are used internally by the standard I/O library when performing I/O on the stream.

  • Define a “cookie” data type, a structure that provides bookkeeping information (e.g., where to store data) used by the aforementioned hook functions. The standard I/O package knows nothing about the contents of this cookie (thus it is typed as void * when passed to fopencookie()), but automatically supplies the cookie as the first argument when calling the hook functions.

  • Call fopencookie() to open a new stream and associate the cookie and hook functions with that stream.

The fopencookie() function serves a purpose similar to fopen(3): it opens a new stream and returns a pointer to a FILE object that is used to operate on that stream.

The cookie argument is a pointer to the caller’s cookie structure that is to be associated with the new stream. This pointer is supplied as the first argument when the standard I/O library invokes any of the hook functions described below.

The mode argument serves the same purpose as for fopen(3). The following modes are supported: r, w, a, r+, w+, and a+. See fopen(3) for details.

The io_funcs argument is a structure that contains four fields pointing to the programmer-defined hook functions that are used to implement this stream. The structure is defined as follows

typedef struct {
    cookie_read_function_t  *read;
    cookie_write_function_t *write;
    cookie_seek_function_t  *seek;
    cookie_close_function_t *close;
} cookie_io_functions_t;

The four fields are as follows:

cookie_read_function_t *read
This function implements read operations for the stream. When called, it receives three arguments:

ssize_t read(void *cookie, char *buf, size_t size);

The buf and size arguments are, respectively, a buffer into which input data can be placed and the size of that buffer. As its function result, the read function should return the number of bytes copied into buf, 0 on end of file, or -1 on error. The read function should update the stream offset appropriately.

If *read is a null pointer, then reads from the custom stream always return end of file.

cookie_write_function_t *write
This function implements write operations for the stream. When called, it receives three arguments:

ssize_t write(void *cookie, const char *buf, size_t size);

The buf and size arguments are, respectively, a buffer of data to be output to the stream and the size of that buffer. As its function result, the write function should return the number of bytes copied from buf, or 0 on error. (The function must not return a negative value.) The write function should update the stream offset appropriately.

If *write is a null pointer, then output to the stream is discarded.

cookie_seek_function_t *seek
This function implements seek operations on the stream. When called, it receives three arguments:

int seek(void *cookie, off_t *offset, int whence);

The *offset argument specifies the new file offset depending on which of the following three values is supplied in whence:

SEEK_SET
The stream offset should be set *offset bytes from the start of the stream.

SEEK_CUR
*offset should be added to the current stream offset.

SEEK_END
The stream offset should be set to the size of the stream plus *offset.

Before returning, the seek function should update *offset to indicate the new stream offset.

As its function result, the seek function should return 0 on success, and -1 on error.

If *seek is a null pointer, then it is not possible to perform seek operations on the stream.

cookie_close_function_t *close
This function closes the stream. The hook function can do things such as freeing buffers allocated for the stream. When called, it receives one argument:

int close(void *cookie);

The cookie argument is the cookie that the programmer supplied when calling fopencookie().

As its function result, the close function should return 0 on success, and EOF on error.

If *close is NULL, then no special action is performed when the stream is closed.

RETURN VALUE

On success fopencookie() returns a pointer to the new stream. On error, NULL is returned.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fopencookie()

Thread safetyMT-Safe

STANDARDS

GNU.

EXAMPLES

The program below implements a custom stream whose functionality is similar (but not identical) to that available via fmemopen(3). It implements a stream whose data is stored in a memory buffer. The program writes its command-line arguments to the stream, and then seeks through the stream reading two out of every five characters and writing them to standard output. The following shell session demonstrates the use of the program:

$ ./a.out 'hello world'
/he/
/ w/
/d/
Reached end of file

Note that a more general version of the program below could be improved to more robustly handle various error situations (e.g., opening a stream with a cookie that already has an open stream; closing a stream that has already been closed).

Program source

#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#define INIT_BUF_SIZE 4
struct memfile_cookie {
    char   *buf;        /* Dynamically sized buffer for data */
    size_t  allocated;  /* Size of buf */
    size_t  endpos;     /* Number of characters in buf */
    off_t   offset;     /* Current file offset in buf */
};
ssize_t
memfile_write(void *c, const char *buf, size_t size)
{
    char *new_buff;
    struct memfile_cookie *cookie = c;
    /* Buffer too small? Keep doubling size until big enough. */
    while (size + cookie->offset > cookie->allocated) {
        new_buff = realloc(cookie->buf, cookie->allocated * 2);
        if (new_buff == NULL)
            return -1;
        cookie->allocated *= 2;
        cookie->buf = new_buff;
    }
    memcpy(cookie->buf + cookie->offset, buf, size);
    cookie->offset += size;
    if (cookie->offset > cookie->endpos)
        cookie->endpos = cookie->offset;
    return size;
}
ssize_t
memfile_read(void *c, char *buf, size_t size)
{
    ssize_t xbytes;
    struct memfile_cookie *cookie = c;
    /* Fetch minimum of bytes requested and bytes available. */
    xbytes = size;
    if (cookie->offset + size > cookie->endpos)
        xbytes = cookie->endpos - cookie->offset;
    if (xbytes < 0)     /* offset may be past endpos */
        xbytes = 0;
    memcpy(buf, cookie->buf + cookie->offset, xbytes);
    cookie->offset += xbytes;
    return xbytes;
}
int
memfile_seek(void *c, off_t *offset, int whence)
{
    off_t new_offset;
    struct memfile_cookie *cookie = c;
    if (whence == SEEK_SET)
        new_offset = *offset;
    else if (whence == SEEK_END)
        new_offset = cookie->endpos + *offset;
    else if (whence == SEEK_CUR)
        new_offset = cookie->offset + *offset;
    else
        return -1;
    if (new_offset < 0)
        return -1;
    cookie->offset = new_offset;
    *offset = new_offset;
    return 0;
}
int
memfile_close(void *c)
{
    struct memfile_cookie *cookie = c;
    free(cookie->buf);
    cookie->allocated = 0;
    cookie->buf = NULL;
    return 0;
}
int
main(int argc, char *argv[])
{
    cookie_io_functions_t  memfile_func = {
        .read  = memfile_read,
        .write = memfile_write,
        .seek  = memfile_seek,
        .close = memfile_close
    };
    FILE *stream;
    struct memfile_cookie mycookie;
    size_t nread;
    char buf[1000];
    /* Set up the cookie before calling fopencookie(). */
    mycookie.buf = malloc(INIT_BUF_SIZE);
    if (mycookie.buf == NULL) {
        perror("malloc");
        exit(EXIT_FAILURE);
    }
    mycookie.allocated = INIT_BUF_SIZE;
    mycookie.offset = 0;
    mycookie.endpos = 0;
    stream = fopencookie(&mycookie, "w+", memfile_func);
    if (stream == NULL) {
        perror("fopencookie");
        exit(EXIT_FAILURE);
    }
    /* Write command-line arguments to our file. */
    for (size_t j = 1; j < argc; j++)
        if (fputs(argv[j], stream) == EOF) {
            perror("fputs");
            exit(EXIT_FAILURE);
        }
    /* Read two bytes out of every five, until EOF. */
    for (long p = 0; ; p += 5) {
        if (fseek(stream, p, SEEK_SET) == -1) {
            perror("fseek");
            exit(EXIT_FAILURE);
        }
        nread = fread(buf, 1, 2, stream);
        if (nread == 0) {
            if (ferror(stream) != 0) {
                fprintf(stderr, "fread failed

“); exit(EXIT_FAILURE); } printf(“Reached end of file “); break; } printf(”/%.*s/ “, (int) nread, buf); } free(mycookie.buf); exit(EXIT_SUCCESS); }

NOTES

_FILE_OFFSET_BITS should be defined to be 64 in code that uses non-null seek or that takes the address of fopencookie, if the code is intended to be portable to traditional 32-bit x86 and ARM platforms where off_t’s width defaults to 32 bits.

SEE ALSO

fclose(3), fmemopen(3), fopen(3), fseek(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

800 - Linux cli command IO_Socket_SSL_PublicSuffixpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_Socket_SSL_PublicSuffixpm and provides detailed information about the command IO_Socket_SSL_PublicSuffixpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_Socket_SSL_PublicSuffixpm.

NAME 🖥️ IO_Socket_SSL_PublicSuffixpm 🖥️

provide access to Mozilla’s list of effective TLD names

SYNOPSIS

# use builtin default use IO::Socket::SSL::PublicSuffix; $ps = IO::Socket::SSL::PublicSuffix->default; # load from string $ps = IO::Socket::SSL::PublicSuffix->from_string("*.uk *"); # load from file or file handle $ps = IO::Socket::SSL::PublicSuffix->from_file($filename); $ps = IO::Socket::SSL::PublicSuffix->from_file(\STDIN); # — string in -> string out # $rest -> whatever.host # $tld -> co.uk my ($rest,$tld) = $ps->public_suffix(whatever.host.co.uk); my $tld = $ps->public_suffix(whatever.host.co.uk); # $root_domain -> host.co.uk my $root_domain = $ps->public_suffix(whatever.host.co.uk, 1); # — array in -> array out # $rest -> [qw(whatever host)] # $tld -> [qw(co uk)] my ($rest,$tld) = $ps->public_suffix([qw(whatever host co uk)]); —- # To update this file with the current list: perl -MIO::Socket::SSL::PublicSuffix -e IO::Socket::SSL::PublicSuffix::update_self_from_url()

DESCRIPTION

This module uses the list of effective top level domain names from the mozilla project to determine the public top level domain for a given hostname.

Method

class->default(%args)
Returns object with builtin default. min_suffix can be given in %args to specify the minimal suffix, default is 1.

class->from_string(string,%args)
Returns object with configuration from string. See method default for %args.

class->from_file( file name| file handle, %args )
Returns object with configuration from file or file handle. See method default for %args.

$self->public_suffix( $host|\host, [ $add ] )
In array context the function returns the non-tld part and the tld part of the given hostname, in scalar context only the tld part. It adds $add parts of the non-tld part to the tld, e.g. with $add=1 it will return the root domain. If there were no explicit matches against the public suffix configuration it will fall back to a suffix of length 1. The function accepts a string or an array-ref (e.g. host split by .). In the first case it will return string(s), in the latter case array-ref(s). International hostnames or labels can be in ASCII (IDNA form starting with xn--) or unicode. In the latter case an IDNA handling library needs to be available. URI is preferred, but Net::IDN:::Encode, Net::LibIDN are still supported.

($self|class)->can_idn
Returns true if IDN support is available.

FILES

http://publicsuffix.org/list/effective_tld_names.dat

SEE ALSO

Domain::PublicSuffix, Mozilla::PublicSuffix

BUGS

Q: Why yet another module, we already have L<Domain::PublicSuffix> and L<Mozilla::PublicSuffix>. A: Because the public suffix data change more often than these modules do, IO::Socket::SSL needs this list and it is more easy this way to keep it up-to-date.

AUTHOR

Steffen Ullrich

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

801 - Linux cli command XtRegisterCaseConverter

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtRegisterCaseConverter and provides detailed information about the command XtRegisterCaseConverter, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtRegisterCaseConverter.

NAME 🖥️ XtRegisterCaseConverter 🖥️

convert KeySym to KeyCodes

SYNTAX

#include <X11/Intrinsic.h>

void XtSetKeyTranslator(Display *display, XtKeyProc proc);

void XtTranslateKeycode(Display *display, KeyCode keycode, Modifiers modifiers, Modifiers *modifiers_return, KeySym *keysym_return);

void XtRegisterCaseConverter(Display *display, XtCaseProc proc, KeySym start, KeySym stop);

void XtConvertCase(Display *display, KeySym keysym, KeySym *lower_return, KeySym *upper_return);

ARGUMENTS

display
Specifies the display.

keycode
Specifies the KeyCode to translate.

keysym
Specifies the KeySym to convert.

keysym_return
Returns the resulting KeySym.

lower_return
Returns the lowercase equivalent of the KeySym.

upper_return
Returns the uppercase equivalent of the KeySym.

modifiers
Specifies the modifiers to the KeyCode.

modifiers_return
Returns a mask that indicates the modifiers actually used to generate the KeySym.

proc
Specifies the procedure that is to perform key translations or conversions.

start
Specifies the first KeySym for which this converter is valid.

stop
Specifies the last KeySym for which this converter is valid.

DESCRIPTION

The XtSetKeyTranslator function sets the specified procedure as the current key translator. The default translator is XtTranslateKey, an XtKeyProc that uses Shift and Lock modifiers with the interpretations defined by the core protocol. It is provided so that new translators can call it to get default KeyCode-to-KeySym translations and so that the default translator can be reinstalled.

The XtTranslateKeycode function passes the specified arguments directly to the currently registered KeyCode to KeySym translator.

The XtRegisterCaseConverter registers the specified case converter. The start and stop arguments provide the inclusive range of KeySyms for which this converter is to be called. The new converter overrides any previous converters for KeySyms in that range. No interface exists to remove converters; you need to register an identity converter. When a new converter is registered, the Intrinsics refreshes the keyboard state if necessary. The default converter understands case conversion for all KeySyms defined in the core protocol.

The XtConvertCase function calls the appropriate converter and returns the results. A user-supplied XtKeyProc may need to use this function.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

802 - Linux cli command XtDisplayToApplicationContext

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtDisplayToApplicationContext and provides detailed information about the command XtDisplayToApplicationContext, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtDisplayToApplicationContext.

NAME 🖥️ XtDisplayToApplicationContext 🖥️

obtain an application context

SYNTAX

#include <X11/Intrinsic.h>

XtAppContext XtDisplayToApplicationContext(Display* dpy);

ARGUMENTS

dpy
Specifies the display that you want the application context for.

DESCRIPTION

The XtDisplayToApplicationContext function returns the application context for the specified display.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

803 - Linux cli command XtGetMultiClickTime

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGetMultiClickTime and provides detailed information about the command XtGetMultiClickTime, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGetMultiClickTime.

NAME 🖥️ XtGetMultiClickTime 🖥️

set and get multi-click times

SYNTAX

#include <X11/Intrinsic.h>

void XtSetMultiClickTime(Display* display, int time);

int XtGetMultiClickTime(Display* display);

ARGUMENTS

display
Specifies the display connection.

time
Specifies the multi-click time in milliseconds.

DESCRIPTION

XtSetMultiClickTime sets the time interval used by the translation manager to determine when multiple events are interpreted as a repeated event.

XtGetMultiClickTime returns the time in milliseconds that the translation manager uses to determine if multiple events are to be interpreted as a repeated event for purposes of matching a translation entry containing a repeat count.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

804 - Linux cli command __ppc_set_ppr_med_low

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __ppc_set_ppr_med_low and provides detailed information about the command __ppc_set_ppr_med_low, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __ppc_set_ppr_med_low.

Programmer’s Manual"

NAME 🖥️ __ppc_set_ppr_med_low 🖥️

Set the Program Priority Register

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/platform/ppc.h>
void __ppc_set_ppr_med(void);
void __ppc_set_ppr_very_low(void);
void __ppc_set_ppr_low(void);
void __ppc_set_ppr_med_low(void);
void __ppc_set_ppr_med_high(void);

DESCRIPTION

These functions provide access to the Program Priority Register (PPR) on the Power architecture.

The PPR is a 64-bit register that controls the program’s priority. By adjusting the PPR value the programmer may improve system throughput by causing system resources to be used more efficiently, especially in contention situations. The available unprivileged states are covered by the following functions:

__ppc_set_ppr_med()
sets the Program Priority Register value to medium (default).

__ppc_set_ppr_very_low()
sets the Program Priority Register value to very low.

__ppc_set_ppr_low()
sets the Program Priority Register value to low.

__ppc_set_ppr_med_low()
sets the Program Priority Register value to medium low.

The privileged state medium high may also be set during certain time intervals by problem-state (unprivileged) programs, with the following function:

__ppc_set_ppr_med_high()
sets the Program Priority to medium high.

If the program priority is medium high when the time interval expires or if an attempt is made to set the priority to medium high when it is not allowed, the priority is set to medium.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

__ppc_set_ppr_med(), __ppc_set_ppr_very_low(), __ppc_set_ppr_low(), __ppc_set_ppr_med_low(), __ppc_set_ppr_med_high()

Thread safetyMT-Safe

STANDARDS

GNU.

HISTORY

__ppc_set_ppr_med()
__ppc_set_ppr_low()
__ppc_set_ppr_med_low()
glibc 2.18.

__ppc_set_ppr_very_low()
__ppc_set_ppr_med_high()
glibc 2.23.

NOTES

The functions __ppc_set_ppr_very_low() and __ppc_set_ppr_med_high() will be defined by <sys/platform/ppc.h> if _ARCH_PWR8 is defined. Availability of these functions can be tested using #ifdef _ARCH_PWR8.

SEE ALSO

__ppc_yield(3)

Power ISA, Book II - Section 3.1 (Program Priority Registers)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

805 - Linux cli command mrand48

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mrand48 and provides detailed information about the command mrand48, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mrand48.

NAME 🖥️ mrand48 🖥️

generate uniformly distributed pseudo-random numbers

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
double drand48(void);
double erand48(unsigned short xsubi[3]);
long lrand48(void);
long nrand48(unsigned short xsubi[3]);
long mrand48(void);
long jrand48(unsigned short xsubi[3]);
void srand48(long seedval);
unsigned short *seed48(unsigned short seed16v[3]);
void lcong48(unsigned short param[7]);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

DESCRIPTION

These functions generate pseudo-random numbers using the linear congruential algorithm and 48-bit integer arithmetic.

The drand48() and erand48() functions return nonnegative double-precision floating-point values uniformly distributed over the interval [0.0, 1.0).

The lrand48() and nrand48() functions return nonnegative long integers uniformly distributed over the interval [0, 2^31).

The mrand48() and jrand48() functions return signed long integers uniformly distributed over the interval [-2^31, 2^31).

The srand48(), seed48(), and lcong48() functions are initialization functions, one of which should be called before using drand48(), lrand48(), or mrand48(). The functions erand48(), nrand48(), and jrand48() do not require an initialization function to be called first.

All the functions work by generating a sequence of 48-bit integers, Xi, according to the linear congruential formula:

Xn+1 = (aXn + c) mod m, where n >= 0

The parameter m = 2^48, hence 48-bit integer arithmetic is performed. Unless lcong48() is called, a and c are given by:

a = 0x5DEECE66D
c = 0xB

The value returned by any of the functions drand48(), erand48(), lrand48(), nrand48(), mrand48(), or jrand48() is computed by first generating the next 48-bit Xi in the sequence. Then the appropriate number of bits, according to the type of data item to be returned, is copied from the high-order bits of Xi and transformed into the returned value.

The functions drand48(), lrand48(), and mrand48() store the last 48-bit Xi generated in an internal buffer. The functions erand48(), nrand48(), and jrand48() require the calling program to provide storage for the successive Xi values in the array argument xsubi. The functions are initialized by placing the initial value of Xi into the array before calling the function for the first time.

The initializer function srand48() sets the high order 32-bits of Xi to the argument seedval. The low order 16-bits are set to the arbitrary value 0x330E.

The initializer function seed48() sets the value of Xi to the 48-bit value specified in the array argument seed16v. The previous value of Xi is copied into an internal buffer and a pointer to this buffer is returned by seed48().

The initialization function lcong48() allows the user to specify initial values for Xi, a, and c. Array argument elements param[0-2] specify Xi, param[3-5] specify a, and param[6] specifies c. After lcong48() has been called, a subsequent call to either srand48() or seed48() will restore the standard values of a and c.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

drand48(), erand48(), lrand48(), nrand48(), mrand48(), jrand48(), srand48(), seed48(), lcong48()

Thread safety

MT-Unsafe race:drand48

The above functions record global state information for the random number generator, so they are not thread-safe.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4.

SEE ALSO

rand(3), random(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

806 - Linux cli command XdbeDeallocateBackBufferName

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XdbeDeallocateBackBufferName and provides detailed information about the command XdbeDeallocateBackBufferName, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XdbeDeallocateBackBufferName.

NAME 🖥️ XdbeDeallocateBackBufferName 🖥️

frees a DBE buffer.

SYNOPSIS

#include <X11/extensions/Xdbe.h>

Status XdbeDeallocateBackBufferName( Display *dpy, XdbeBackBuffer buffer)

DESCRIPTION

This function frees a drawable ID, buffer, that was obtained via XdbeAllocateBackBufferName(). The buffer must be a valid name for the back buffer of a window, or a protocol error results.

ERRORS

BadBuffer
The specified buffer is not associated with a window.

SEE ALSO

DBE, XdbeAllocateBackBufferName(), XdbeBeginIdiom(), XdbeEndIdiom(), XdbeFreeVisualInfo(), XdbeGetBackBufferAttributes(), XdbeGetVisualInfo(), XdbeQueryExtension(), XdbeSwapBuffers().

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

807 - Linux cli command zip_source_win32handle

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_win32handle and provides detailed information about the command zip_source_win32handle, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_win32handle.

libzip (-lzip)

The functions

and

create a zip source from a Windows file handle. They open

and read

bytes from offset

from it. If

is 0 or -1, the whole file (starting from

is used.

If the file supports seek, the source can be used to open a zip archive from.

The file is opened and read when the data from the source is used, usually by

or

Upon successful completion, the created source is returned. Otherwise,

is returned and the error code in

or

is set to indicate the error.

and

fail if:

or

are invalid.

Required memory could not be allocated.

Opening

failed.

and

were added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

808 - Linux cli command HTML_Parserpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_Parserpm and provides detailed information about the command HTML_Parserpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_Parserpm.

NAME 🖥️ HTML_Parserpm 🖥️

HTML parser class

SYNOPSIS

use strict; use warnings; use HTML::Parser (); # Create parser object my $p = HTML::Parser->new( api_version => 3, start_h => [\start, “tagname, attr”], end_h => [\end, “tagname”], marked_sections => 1, ); # Parse document text chunk by chunk $p->parse($chunk1); $p->parse($chunk2); # … # signal end of document $p->eof; # Parse directly from file $p->parse_file(“foo.html”); # or open(my $fh, “<:utf8”, “foo.html”) || die; $p->parse_file($fh);

DESCRIPTION

Objects of the HTML::Parser class will recognize markup and separate it from plain text (alias data content) in HTML documents. As different kinds of markup and text are recognized, the corresponding event handlers are invoked.

HTML::Parser is not a generic SGML parser. We have tried to make it able to deal with the HTML that is actually “out there”, and it normally parses as closely as possible to the way the popular web browsers do it instead of strictly following one of the many HTML specifications from W3C. Where there is disagreement, there is often an option that you can enable to get the official behaviour.

The document to be parsed may be supplied in arbitrary chunks. This makes on-the-fly parsing as documents are received from the network possible.

If event driven parsing does not feel right for your application, you might want to use HTML::PullParser. This is an HTML::Parser subclass that allows a more conventional program structure.

METHODS

The following method is used to construct a new HTML::Parser object:

$p = HTML::Parser->new( %options_and_handlers )
This class method creates a new HTML::Parser object and returns it. Key/value argument pairs may be provided to assign event handlers or initialize parser options. The handlers and parser options can also be set or modified later by the method calls described below. If a top level key is in the form “<event>_h” (e.g., “text_h”) then it assigns a handler to that event, otherwise it initializes a parser option. The event handler specification value must be an array reference. Multiple handlers may also be assigned with the ‘handlers => [%handlers]’ option. See examples below. If new() is called without any arguments, it will create a parser that uses callback methods compatible with version 2 of HTML::Parser. See the section on “version 2 compatibility” below for details. The special constructor option ‘api_version => 2’ can be used to initialize version 2 callbacks while still setting other options and handlers. The ‘api_version => 3’ option can be used if you don’t want to set any options and don’t want to fall back to v2 compatible mode. Examples: $p = HTML::Parser->new( api_version => 3, text_h => [ sub {…}, “dtext” ] ); This creates a new parser object with a text event handler subroutine that receives the original text with general entities decoded. $p = HTML::Parser->new( api_version => 3, start_h => [ my_start, “self,tokens” ] ); This creates a new parser object with a start event handler method that receives the $p and the tokens array. $p = HTML::Parser->new( api_version => 3, handlers => { text => [\array, “event,text”], comment => [\array, “event,text”], } ); This creates a new parser object that stores the event type and the original text in @array for text and comment events.

The following methods feed the HTML document to the HTML::Parser object:

$p->parse( $string )
Parse $string as the next chunk of the HTML document. Handlers invoked should not attempt to modify the $string in-place until $p->parse returns. If an invoked event handler aborts parsing by calling $p->eof, then $p->parse() will return a FALSE value. Otherwise the return value is a reference to the parser object ($p).

$p->parse( $code_ref )
If a code reference is passed as the argument to be parsed, then the chunks to be parsed are obtained by invoking this function repeatedly. Parsing continues until the function returns an empty (or undefined) result. When this happens $p->eof is automatically signaled. Parsing will also abort if one of the event handlers calls $p->eof. The effect of this is the same as: while (1) { my $chunk = &$code_ref(); if (!defined($chunk) || !length($chunk)) { $p->eof; return $p; } $p->parse($chunk) || return undef; } But it is more efficient as this loop runs internally in XS code.

$p->parse_file( $file )
Parse text directly from a file. The $file argument can be a filename, an open file handle, or a reference to an open file handle. If $file contains a filename and the file can’t be opened, then the method returns an undefined value and $! tells why it failed. Otherwise the return value is a reference to the parser object. If a file handle is passed as the $file argument, then the file will normally be read until EOF, but not closed. If an invoked event handler aborts parsing by calling $p->eof, then $p->parse_file() may not have read the entire file. On systems with multi-byte line terminators, the values passed for the offset and length argspecs may be too low if parse_file() is called on a file handle that is not in binary mode. If a filename is passed in, then parse_file() will open the file in binary mode.

$p->eof
Signals the end of the HTML document. Calling the $p->eof method outside a handler callback will flush any remaining buffered text (which triggers the text event if there is any remaining text). Calling $p->eof inside a handler will terminate parsing at that point and cause $p->parse to return a FALSE value. This also terminates parsing by $p->parse_file(). After $p->eof has been called, the parse() and parse_file() methods can be invoked to feed new documents with the parser object. The return value from eof() is a reference to the parser object.

Most parser options are controlled by boolean attributes. Each boolean attribute is enabled by calling the corresponding method with a TRUE argument and disabled with a FALSE argument. The attribute value is left unchanged if no argument is given. The return value from each method is the old attribute value.

Methods that can be used to get and/or set parser options are:

$p->attr_encoded

$p->attr_encoded( $bool )

By default, the attr and @attr argspecs will have general entities for attribute values decoded. Enabling this attribute leaves entities alone.

$p->backquote

$p->backquote( $bool )

By default, only ’ and " are recognized as quote characters around attribute values. MSIE also recognizes backquotes for some reason. Enabling this attribute provides compatibility with this behaviour.

$p->boolean_attribute_value( $val )
This method sets the value reported for boolean attributes inside HTML start tags. By default, the name of the attribute is also used as its value. This affects the values reported for tokens and attr argspecs.

$p->case_sensitive

$p->case_sensitive( $bool )

By default, tag names and attribute names are down-cased. Enabling this attribute leaves them as found in the HTML source document.

$p->closing_plaintext

$p->closing_plaintext( $bool )

By default, plaintext element can never be closed. Everything up to the end of the document is parsed in CDATA mode. This historical behaviour is what at least MSIE does. Enabling this attribute makes closing </plaintext > tag effective and the parsing process will resume after seeing this tag. This emulates early gecko-based browsers.

$p->empty_element_tags

$p->empty_element_tags( $bool )

By default, empty element tags are not recognized as such and the “/” before “>” is just treated like a normal name character (unless strict_names is enabled). Enabling this attribute make HTML::Parser recognize these tags. Empty element tags look like start tags, but end with the character sequence “/>” instead of “>”. When recognized by HTML::Parser they cause an artificial end event in addition to the start event. The text for the artificial end event will be empty and the tokenpos array will be undefined even though the token array will have one element containing the tag name.

$p->marked_sections

$p->marked_sections( $bool )

By default, section markings like <![CDATA[…]]> are treated like ordinary text. When this attribute is enabled section markings are honoured. There are currently no events associated with the marked section markup, but the text can be returned as skipped_text.

$p->strict_comment

$p->strict_comment( $bool )

By default, comments are terminated by the first occurrence of “–>”. This is the behaviour of most popular browsers (like Mozilla, Opera and MSIE), but it is not correct according to the official HTML standard. Officially, you need an even number of “–” tokens before the closing “>” is recognized and there may not be anything but whitespace between an even and an odd “–”. The official behaviour is enabled by enabling this attribute. Enabling of ‘strict_comment’ also disables recognizing these forms as comments: </ comment> <! comment>

$p->strict_end

$p->strict_end( $bool )

By default, attributes and other junk are allowed to be present on end tags in a manner that emulates MSIE’s behaviour. The official behaviour is enabled with this attribute. If enabled, only whitespace is allowed between the tagname and the final “>”.

$p->strict_names

$p->strict_names( $bool )

By default, almost anything is allowed in tag and attribute names. This is the behaviour of most popular browsers and allows us to parse some broken tags with invalid attribute values like: <IMG SRC=newprevlstGr.gif ALT=[PREV LIST] BORDER=0> By default, “LIST]” is parsed as a boolean attribute, not as part of the ALT value as was clearly intended. This is also what Mozilla sees. The official behaviour is enabled by enabling this attribute. If enabled, it will cause the tag above to be reported as text since “LIST]” is not a legal attribute name.

$p->unbroken_text

$p->unbroken_text( $bool )

By default, blocks of text are given to the text handler as soon as possible (but the parser takes care always to break text at a boundary between whitespace and non-whitespace so single words and entities can always be decoded safely). This might create breaks that make it hard to do transformations on the text. When this attribute is enabled, blocks of text are always reported in one piece. This will delay the text event until the following (non-text) event has been recognized by the parser. Note that the offset argspec will give you the offset of the first segment of text and length is the combined length of the segments. Since there might be ignored tags in between, these numbers can’t be used to directly index in the original document file.

$p->utf8_mode

$p->utf8_mode( $bool )

Enable this option when parsing raw undecoded UTF-8. This tells the parser that the entities expanded for strings reported by attr, @attr and dtext should be expanded as decoded UTF-8 so they end up compatible with the surrounding text. If utf8_mode is enabled then it is an error to pass strings containing characters with code above 255 to the parse() method, and the parse() method will croak if you try. Example: The Unicode character “\x{2665}” is “♥” when UTF-8 encoded. The character can also be represented by the entity “♥” or “&#x2665”. If we feed the parser: $p->parse("♥♥"); then dtext will be reported as “♥\x{2665}” without utf8_mode enabled, but as “♥♥” when enabled. The later string is what you want. This option is only available with perl-5.8 or better.

$p->xml_mode

$p->xml_mode( $bool )

Enabling this attribute changes the parser to allow some XML constructs. This enables the behaviour controlled by individually by the case_sensitive, empty_element_tags, strict_names and xml_pic attributes and also suppresses special treatment of elements that are parsed as CDATA for HTML.

$p->xml_pic

$p->xml_pic( $bool )

By default, processing instructions are terminated by “>”. When this attribute is enabled, processing instructions are terminated by “?>” instead.

As markup and text is recognized, handlers are invoked. The following method is used to set up handlers for different events:

$p->handler( event => \subroutine, $argspec )

$p->handler( event => $method_name, $argspec )

$p->handler( event => \accum, $argspec )

$p->handler( event => "" );

$p->handler( event => undef );

$p->handler( event );

This method assigns a subroutine, method, or array to handle an event. Event is one of text, start, end, declaration, comment, process, start_document, end_document or default. The \&subroutine is a reference to a subroutine which is called to handle the event. The $method_name is the name of a method of $p which is called to handle the event. The @accum is an array that will hold the event information as sub-arrays. If the second argument is “”, the event is ignored. If it is undef, the default handler is invoked for the event. The $argspec is a string that describes the information to be reported for the event. Any requested information that does not apply to a specific event is passed as undef. If argspec is omitted, then it is left unchanged. The return value from $p->handler is the old callback routine or a reference to the accumulator array. Any return values from handler callback routines/methods are always ignored. A handler callback can request parsing to be aborted by invoking the $p->eof method. A handler callback is not allowed to invoke the $p->parse() or $p->parse_file() method. An exception will be raised if it tries. Examples: $p->handler(start => “start”, self, attr, attrseq, text ); This causes the “start” method of object $p to be called for ‘start’ events. The callback signature is $p->start(\%attr, \@attr_seq, $text). $p->handler(start => \start, attr, attrseq, text ); This causes subroutine start() to be called for ‘start’ events. The callback signature is start(\attr, \attr_seq, $text). $p->handler(start => \accum, “S”, attr, attrseq, text ); This causes ‘start’ event information to be saved in @accum. The array elements will be [‘S’, \attr, \attr_seq, $text]. $p->handler(start => “”); This causes ‘start’ events to be ignored. It also suppresses invocations of any default handler for start events. It is in most cases equivalent to $p->handler(start => sub {}), but is more efficient. It is different from the empty-sub-handler in that skipped_text is not reset by it. $p->handler(start => undef); This causes no handler to be associated with start events. If there is a default handler it will be invoked.

Filters based on tags can be set up to limit the number of events reported. The main bottleneck during parsing is often the huge number of callbacks made from the parser. Applying filters can improve performance significantly.

The following methods control filters:

$p->ignore_elements( @tags )
Both the start event and the end event as well as any events that would be reported in between are suppressed. The ignored elements can contain nested occurrences of itself. Example: $p->ignore_elements(qw(script style)); The script and style tags will always nest properly since their content is parsed in CDATA mode. For most other tags ignore_elements must be used with caution since HTML is often not well formed.

$p->ignore_tags( @tags )
Any start and end events involving any of the tags given are suppressed. To reset the filter (i.e. don’t suppress any start and end events), call ignore_tags without an argument.

$p->report_tags( @tags )
Any start and end events involving any of the tags not given are suppressed. To reset the filter (i.e. report all start and end events), call report_tags without an argument.

Internally, the system has two filter lists, one for report_tags and one for ignore_tags, and both filters are applied. This effectively gives ignore_tags precedence over report_tags.

Examples:

$p->ignore_tags(qw(style)); $p->report_tags(qw(script style));

results in only script events being reported.

Argspec

Argspec is a string containing a comma-separated list that describes the information reported by the event. The following argspec identifier names can be used:

“attr”
Attr causes a reference to a hash of attribute name/value pairs to be passed. Boolean attributes’ values are either the value set by $p->boolean_attribute_value, or the attribute name if no value has been set by $p->boolean_attribute_value. This passes undef except for start events. Unless xml_mode or case_sensitive is enabled, the attribute names are forced to lower case. General entities are decoded in the attribute values and one layer of matching quotes enclosing the attribute values is removed. The Unicode character set is assumed for entity decoding.

  1. Basically the same as attr, but keys and values are passed as individual arguments and the original sequence of the attributes is kept. The parameters passed will be the same as the @attr calculated here: @attr = map { $_ => $attr->{$_} } @$attrseq; assuming $attr and $attrseq here are the hash and array passed as the result of attr and attrseq argspecs. This passes no values for events besides start.

“attrseq”
Attrseq causes a reference to an array of attribute names to be passed. This can be useful if you want to walk the attr hash in the original sequence. This passes undef except for start events. Unless xml_mode or case_sensitive is enabled, the attribute names are forced to lower case.

“column”
Column causes the column number of the start of the event to be passed. The first column on a line is 0.

“dtext”
Dtext causes the decoded text to be passed. General entities are automatically decoded unless the event was inside a CDATA section or was between literal start and end tags (script, style, xmp, iframe, title, textarea and plaintext). The Unicode character set is assumed for entity decoding. With Perl version 5.6 or earlier only the Latin-1 range is supported, and entities for characters outside the range 0..255 are left unchanged. This passes undef except for text events.

“event”
Event causes the event name to be passed. The event name is one of text, start, end, declaration, comment, process, start_document or end_document.

“is_cdata”
Is_cdata causes a TRUE value to be passed if the event is inside a CDATA section or between literal start and end tags (script, style, xmp, iframe, title, textarea and plaintext). if the flag is FALSE for a text event, then you should normally either use dtext or decode the entities yourself before the text is processed further.

“length”
Length causes the number of bytes of the source text of the event to be passed.

“line”
Line causes the line number of the start of the event to be passed. The first line in the document is 1. Line counting doesn’t start until at least one handler requests this value to be reported.

“offset”
Offset causes the byte position in the HTML document of the start of the event to be passed. The first byte in the document has offset 0.

“offset_end”
Offset_end causes the byte position in the HTML document of the end of the event to be passed. This is the same as offset + length.

“self”
Self causes the current object to be passed to the handler. If the handler is a method, this must be the first element in the argspec. An alternative to passing self as an argspec is to register closures that capture $self by themselves as handlers. Unfortunately this creates circular references which prevent the HTML::Parser object from being garbage collected. Using the self argspec avoids this problem.

“skipped_text”
Skipped_text returns the concatenated text of all the events that have been skipped since the last time an event was reported. Events might be skipped because no handler is registered for them or because some filter applies. Skipped text also includes marked section markup, since there are no events that can catch it. If an ""-handler is registered for an event, then the text for this event is not included in skipped_text. Skipped text both before and after the ""-event is included in the next reported skipped_text.

“tag”
Same as tagname, but prefixed with “/” if it belongs to an end event and “!” for a declaration. The tag does not have any prefix for start events, and is in this case identical to tagname.

“tagname”
This is the element name (or generic identifier in SGML jargon) for start and end tags. Since HTML is case insensitive, this name is forced to lower case to ease string matching. Since XML is case sensitive, the tagname case is not changed when xml_mode is enabled. The same happens if the case_sensitive attribute is set. The declaration type of declaration elements is also passed as a tagname, even if that is a bit strange. In fact, in the current implementation tagname is identical to token0 except that the name may be forced to lower case.

“token0”
Token0 causes the original text of the first token string to be passed. This should always be the same as $tokens->[0]. For declaration events, this is the declaration type. For start and end events, this is the tag name. For process and non-strict comment events, this is everything inside the tag. This passes undef if there are no tokens in the event.

“tokenpos”
Tokenpos causes a reference to an array of token positions to be passed. For each string that appears in tokens, this array contains two numbers. The first number is the offset of the start of the token in the original text and the second number is the length of the token. Boolean attributes in a start event will have (0,0) for the attribute value offset and length. This passes undef if there are no tokens in the event (e.g., text) and for artificial end events triggered by empty element tags. If you are using these offsets and lengths to modify text, you should either work from right to left, or be very careful to calculate the changes to the offsets.

“tokens”
Tokens causes a reference to an array of token strings to be passed. The strings are exactly as they were found in the original text, no decoding or case changes are applied. For declaration events, the array contains each word, comment, and delimited string starting with the declaration type. For comment events, this contains each sub-comment. If $p->strict_comments is disabled, there will be only one sub-comment. For start events, this contains the original tag name followed by the attribute name/value pairs. The values of boolean attributes will be either the value set by $p->boolean_attribute_value, or the attribute name if no value has been set by $p->boolean_attribute_value. For end events, this contains the original tag name (always one token). For process events, this contains the process instructions (always one token). This passes undef for text events.

“text”
Text causes the source text (including markup element delimiters) to be passed.

“undef”
Pass an undefined value. Useful as padding where the same handler routine is registered for multiple events.


A literal string of 0 to 255 characters enclosed in single (’) or double (") quotes is passed as entered.

The whole argspec string can be wrapped up in @{...} to signal that the resulting event array should be flattened. This only makes a difference if an array reference is used as the handler target. Consider this example:

$p->handler(text => [], text); $p->handler(text => [], @{text}]);

With two text events; "foo", "bar"; then the first example will end up with [[“foo”], [“bar”]] and the second with [“foo”, “bar”] in the handler target array.

Events

Handlers for the following events can be registered:

“comment”
This event is triggered when a markup comment is recognized. Example: <!– This is a comment – – So is this –>

“declaration”
This event is triggered when a markup declaration is recognized. For typical HTML documents, the only declaration you are likely to find is <!DOCTYPE …>. Example: <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd"> DTDs inside <!DOCTYPE …> will confuse HTML::Parser.

“default”
This event is triggered for events that do not have a specific handler. You can set up a handler for this event to catch stuff you did not want to catch explicitly.

“end”
This event is triggered when an end tag is recognized. Example: </A>

“end_document”
This event is triggered when $p->eof is called and after any remaining text is flushed. There is no document text associated with this event.

“process”
This event is triggered when a processing instructions markup is recognized. The format and content of processing instructions are system and application dependent. Examples: <? HTML processing instructions > <? XML processing instructions ?>

“start”
This event is triggered when a start tag is recognized. Example: <A HREF=“http://www.perl.com/">

“start_document”
This event is triggered before any other events for a new document. A handler for it can be used to initialize stuff. There is no document text associated with this event.

“text”
This event is triggered when plain text (characters) is recognized. The text may contain multiple lines. A sequence of text may be broken between several text events unless $p->unbroken_text is enabled. The parser will make sure that it does not break a word or a sequence of whitespace between two text events.

Unicode

HTML::Parser can parse Unicode strings when running under perl-5.8 or better. If Unicode is passed to $p->parse() then chunks of Unicode will be reported to the handlers. The offset and length argspecs will also report their position in terms of characters.

It is safe to parse raw undecoded UTF-8 if you either avoid decoding entities and make sure to not use argspecs that do, or enable the utf8_mode for the parser. Parsing of undecoded UTF-8 might be useful when parsing from a file where you need the reported offsets and lengths to match the byte offsets in the file.

If a filename is passed to $p->parse_file() then the file will be read in binary mode. This will be fine if the file contains only ASCII or Latin-1 characters. If the file contains UTF-8 encoded text then care must be taken when decoding entities as described in the previous paragraph, but better is to open the file with the UTF-8 layer so that it is decoded properly:

open(my $fh, “<:utf8”, “index.html”) || die “…: $!”; $p->parse_file($fh);

If the file contains text encoded in a charset besides ASCII, Latin-1 or UTF-8 then decoding will always be needed.

VERSION 2 COMPATIBILITY

When an HTML::Parser object is constructed with no arguments, a set of handlers is automatically provided that is compatible with the old HTML::Parser version 2 callback methods.

This is equivalent to the following method calls:

$p->handler(start => “start”, “self, tagname, attr, attrseq, text”); $p->handler(end => “end”, “self, tagname, text”); $p->handler(text => “text”, “self, text, is_cdata”); $p->handler(process => “process”, “self, token0, text”); $p->handler( comment => sub { my ($self, $tokens) = @_; for (@$tokens) { $self->comment($_); } }, “self, tokens” ); $p->handler( declaration => sub { my $self = shift; $self->declaration(substr($_[0], 2, -1)); }, “self, text” );

Setting up these handlers can also be requested with the “api_version => 2” constructor option.

SUBCLASSING

The HTML::Parser class is able to be subclassed. Parser objects are plain hashes and HTML::Parser reserves only hash keys that start with “_hparser”. The parser state can be set up by invoking the init() method, which takes the same arguments as new().

EXAMPLES

The first simple example shows how you might strip out comments from an HTML document. We achieve this by setting up a comment handler that does nothing and a default handler that will print out anything else:

use HTML::Parser (); HTML::Parser->new( default_h => [sub { print shift }, text], comment_h => [””], )->parse_file(shift || die) || die $!;

An alternative implementation is:

use HTML::Parser (); HTML::Parser->new( end_document_h => [sub { print shift }, skipped_text], comment_h => [""], )->parse_file(shift || die) || die $!;

This will in most cases be much more efficient since only a single callback will be made.

The next example prints out the text that is inside the <title> element of an HTML document. Here we start by setting up a start handler. When it sees the title start tag it enables a text handler that prints any text found and an end handler that will terminate parsing as soon as the title end tag is seen:

use HTML::Parser (); sub start_handler { return if shift ne “title”; my $self = shift; $self->handler(text => sub { print shift }, “dtext”); $self->handler( end => sub { shift->eof if shift eq “title”; }, “tagname,self” ); } my $p = HTML::Parser->new(api_version => 3); $p->handler(start => \start_handler, “tagname,self”); $p->parse_file(shift || die) || die $!; print " “;

On a Debian box, more examples can be found in the /usr/share/doc/libhtml-parser-perl/examples directory. The program hrefsub shows how you can edit all links found in a document and htextsub how to edit the text only; the program hstrip shows how you can strip out certain tags/elements and/or attributes; and the program htext show how to obtain the plain text, but not any script/style content.

You can browse the eg/ directory online from the [Browse] link on the http://search.cpan.org/~gaas/HTML-Parser/ page.

BUGS

The <style> and <script> sections do not end with the first “</”, but need the complete corresponding end tag. The standard behaviour is not really practical.

When the strict_comment option is enabled, we still recognize comments where there is something other than whitespace between even and odd “–” markers.

Once $p->boolean_attribute_value has been set, there is no way to restore the default behaviour.

There is currently no way to get both quote characters into the same literal argspec.

Empty tags, e.g. “<>” and “</>”, are not recognized. SGML allows them to repeat the previous start tag or close the previous start tag respectively.

NET tags, e.g. “code/…/” are not recognized. This is SGML shorthand for “<code>…</code>”.

Incomplete start or end tags, e.g. “<tt<b>…</b</tt>” are not recognized.

DIAGNOSTICS

The following messages may be produced by HTML::Parser. The notation in this listing is the same as used in perldiag:

Not a reference to a hash
(F) The object blessed into or subclassed from HTML::Parser is not a hash as required by the HTML::Parser methods.

Bad signature in parser state object at %p
(F) The _hparser_xs_state element does not refer to a valid state structure. Something must have changed the internal value stored in this hash element, or the memory has been overwritten.

_hparser_xs_state element is not a reference
(F) The _hparser_xs_state element has been destroyed.

Can’t find ‘_hparser_xs_state’ element in HTML::Parser hash
(F) The _hparser_xs_state element is missing from the parser hash. It was either deleted, or not created when the object was created.

API version %s not supported by HTML::Parser %s
(F) The constructor option ‘api_version’ with an argument greater than or equal to 4 is reserved for future extensions.

Bad constructor option ‘%s’
(F) An unknown constructor option key was passed to the new() or init() methods.

Parse loop not allowed
(F) A handler invoked the parse() or parse_file() method. This is not permitted.

marked sections not supported
(F) The $p->marked_sections() method was invoked in a HTML::Parser module that was compiled without support for marked sections.

Unknown boolean attribute (%d)
(F) Something is wrong with the internal logic that set up aliases for boolean attributes.

Only code or array references allowed as handler
(F) The second argument for $p->handler must be either a subroutine reference, then name of a subroutine or method, or a reference to an array.

No handler for %s events
(F) The first argument to $p->handler must be a valid event name; i.e. one of “start”, “end”, “text”, “process”, “declaration” or “comment”.

Unrecognized identifier %s in argspec
(F) The identifier is not a known argspec name. Use one of the names mentioned in the argspec section above.

Literal string is longer than 255 chars in argspec
(F) The current implementation limits the length of literals in an argspec to 255 characters. Make the literal shorter.

Backslash reserved for literal string in argspec
(F) The backslash character “\ is not allowed in argspec literals. It is reserved to permit quoting inside a literal in a later version.

Unterminated literal string in argspec
(F) The terminating quote character for a literal was not found.

Bad argspec (%s)
(F) Only identifier names, literals, spaces and commas are allowed in argspecs.

Missing comma separator in argspec
(F) Identifiers in an argspec must be separated with “,”.

Parsing of undecoded UTF-8 will give garbage when decoding entities
(W) The first chunk parsed appears to contain undecoded UTF-8 and one or more argspecs that decode entities are used for the callback handlers. The result of decoding will be a mix of encoded and decoded characters for any entities that expand to characters with code above 127. This is not a good thing. The recommended solution is to apply Encode::decode_utf8() on the data before feeding it to the $p->parse(). For $p->parse_file() pass a file that has been opened in “:utf8” mode. The alternative solution is to enable the utf8_mode and not decode before passing strings to $p->parse(). The parser can process raw undecoded UTF-8 sanely if the utf8_mode is enabled, or if the attr, @attr or dtext argspecs are avoided.

Parsing string decoded with wrong endian selection
(W) The first character in the document is U+FFFE. This is not a legal Unicode character but a byte swapped BOM. The result of parsing will likely be garbage.

Parsing of undecoded UTF-32
(W) The parser found the Unicode UTF-32 BOM signature at the start of the document. The result of parsing will likely be garbage.

Parsing of undecoded UTF-16
(W) The parser found the Unicode UTF-16 BOM signature at the start of the document. The result of parsing will likely be garbage.

SEE ALSO

HTML::Entities, HTML::PullParser, HTML::TokeParser, HTML::HeadParser, HTML::LinkExtor, HTML::Form

HTML::TreeBuilder (part of the HTML-Tree distribution)

<http://www.w3.org/TR/html4/>

More information about marked sections and processing instructions may be found at <http://www.is-thought.co.uk/book/sgml-8.htm>.

COPYRIGHT

Copyright 1996-2016 Gisle Aas. All rights reserved. Copyright 1999-2000 Michael A. Chase. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

809 - Linux cli command xdr_float

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_float and provides detailed information about the command xdr_float, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_float.

NAME 🖥️ xdr_float 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

810 - Linux cli command j1l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command j1l and provides detailed information about the command j1l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the j1l.

NAME 🖥️ j1l 🖥️

Bessel functions of the first kind

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double j0(double x);
double j1(double x);
double jn(int n, double x);
float j0f(float x);
float j1f(float x);
float jnf(int n, float x);
long double j0l(long double x);
long double j1l(long double x);
long double jnl(int n, long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

j0(), j1(), jn():

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

j0f(), j0l(), j1f(), j1l(), jnf(), jnl():

    _XOPEN_SOURCE >= 600
        || (_ISOC99_SOURCE && _XOPEN_SOURCE)
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The j0() and j1() functions return Bessel functions of x of the first kind of orders 0 and 1, respectively. The jn() function returns the Bessel function of x of the first kind of order n.

The j0f(), j1f(), and jnf(), functions are versions that take and return float values. The j0l(), j1l(), and jnl() functions are versions that take and return long double values.

RETURN VALUE

On success, these functions return the appropriate Bessel value of the first kind for x.

If x is a NaN, a NaN is returned.

If x is too large in magnitude, or the result underflows, a range error occurs, and the return value is 0.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error: result underflow, or x is too large in magnitude
errno is set to ERANGE.

These functions do not raise exceptions for fetestexcept(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

j0(), j0f(), j0l()

Thread safetyMT-Safe

j1(), j1f(), j1l()

Thread safetyMT-Safe

jn(), jnf(), jnl()

Thread safetyMT-Safe

STANDARDS

j0()
j1()
jn()
POSIX.1-2008.

Others:
BSD.

HISTORY

j0()
j1()
jn()
SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008.

Others:
BSD.

BUGS

There are errors of up to 2e-16 in the values returned by j0(), j1(), and jn() for values of x between -8 and 8.

SEE ALSO

y0(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

811 - Linux cli command nl_langinfo_l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command nl_langinfo_l and provides detailed information about the command nl_langinfo_l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the nl_langinfo_l.

NAME 🖥️ nl_langinfo_l 🖥️

query language and locale information

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <langinfo.h>
char *nl_langinfo(nl_item item);
char *nl_langinfo_l(nl_item item, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

nl_langinfo_l():

    Since glibc 2.24:
        _POSIX_C_SOURCE >= 200809L
    glibc 2.23 and earlier:
        _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The nl_langinfo() and nl_langinfo_l() functions provide access to locale information in a more flexible way than localeconv(3). nl_langinfo() returns a string which is the value corresponding to item in the program’s current global locale. nl_langinfo_l() returns a string which is the value corresponding to item for the locale identified by the locale object locale, which was previously created by newlocale(3). Individual and additional elements of the locale categories can be queried. setlocale(3) needs to be executed with proper arguments before.

Examples for the locale elements that can be specified in item using the constants defined in <langinfo.h> are:

CODESET (LC_CTYPE)
Return a string with the name of the character encoding used in the selected locale, such as “UTF-8”, “ISO-8859-1”, or “ANSI_X3.4-1968” (better known as US-ASCII). This is the same string that you get with “locale charmap”. For a list of character encoding names, try “locale -m” (see locale(1)).

D_T_FMT (LC_TIME)
Return a string that can be used as a format string for strftime(3) to represent time and date in a locale-specific way (%c conversion specification).

D_FMT (LC_TIME)
Return a string that can be used as a format string for strftime(3) to represent a date in a locale-specific way (%x conversion specification).

T_FMT (LC_TIME)
Return a string that can be used as a format string for strftime(3) to represent a time in a locale-specific way (%X conversion specification).

AM_STR (LC_TIME)
Return a string that represents affix for ante meridiem (before noon, “AM”) time. (Used in %p strftime(3) conversion specification.)

PM_STR (LC_TIME)
Return a string that represents affix for post meridiem (before midnight, “PM”) time. (Used in %p strftime(3) conversion specification.)

T_FMT_AMPM (LC_TIME)
Return a string that can be used as a format string for strftime(3) to represent a time in a.m. or p.m. notation in a locale-specific way (%r conversion specification).

ERA (LC_TIME)
Return era description, which contains information about how years are counted and displayed for each era in a locale. Each era description segment shall have the format:

direction:offset:start_date:end_date:era_name:era_format

according to the definitions below:

direction
Either a “+” or a “-” character. The “+” means that years increase from the start_date towards the end_date, “-” means the opposite.

offset
The epoch year of the start_date.

start_date
A date in the form yyyy/mm/dd, where yyyy, mm, and dd are the year, month, and day numbers respectively of the start of the era.

end_date
The ending date of the era, in the same format as the start_date, or one of the two special values “-*” (minus infinity) or “+*” (plus infinity).

era_name
The name of the era, corresponding to the %EC strftime(3) conversion specification.

era_format
The format of the year in the era, corresponding to the %EY strftime(3) conversion specification.

Era description segments are separated by semicolons. Most locales do not define this value. Examples of locales that do define this value are the Japanese and Thai locales.

ERA_D_T_FMT (LC_TIME)
Return a string that can be used as a format string for strftime(3) for alternative representation of time and date in a locale-specific way (%Ec conversion specification).

ERA_D_FMT (LC_TIME)
Return a string that can be used as a format string for strftime(3) for alternative representation of a date in a locale-specific way (%Ex conversion specification).

ERA_T_FMT (LC_TIME)
Return a string that can be used as a format string for strftime(3) for alternative representation of a time in a locale-specific way (%EX conversion specification).

DAY_{1–7} (LC_TIME)
Return name of the n-th day of the week. [Warning: this follows the US convention DAY_1 = Sunday, not the international convention (ISO 8601) that Monday is the first day of the week.] (Used in %A strftime(3) conversion specification.)

ABDAY_{1–7} (LC_TIME)
Return abbreviated name of the n-th day of the week. (Used in %a strftime(3) conversion specification.)

MON_{1–12} (LC_TIME)
Return name of the n-th month. (Used in %B strftime(3) conversion specification.)

ABMON_{1–12} (LC_TIME)
Return abbreviated name of the n-th month. (Used in %b strftime(3) conversion specification.)

RADIXCHAR (LC_NUMERIC)
Return radix character (decimal dot, decimal comma, etc.).

THOUSEP (LC_NUMERIC)
Return separator character for thousands (groups of three digits).

YESEXPR (LC_MESSAGES)
Return a regular expression that can be used with the regex(3) function to recognize a positive response to a yes/no question.

NOEXPR (LC_MESSAGES)
Return a regular expression that can be used with the regex(3) function to recognize a negative response to a yes/no question.

CRNCYSTR (LC_MONETARY)
Return the currency symbol, preceded by “-” if the symbol should appear before the value, “+” if the symbol should appear after the value, or “.” if the symbol should replace the radix character.

The above list covers just some examples of items that can be requested. For a more detailed list, consult The GNU C Library Reference Manual.

RETURN VALUE

On success, these functions return a pointer to a string which is the value corresponding to item in the specified locale.

If no locale has been selected by setlocale(3) for the appropriate category, nl_langinfo() return a pointer to the corresponding string in the “C” locale. The same is true of nl_langinfo_l() if locale specifies a locale where langinfo data is not defined.

If item is not valid, a pointer to an empty string is returned.

The pointer returned by these functions may point to static data that may be overwritten, or the pointer itself may be invalidated, by a subsequent call to nl_langinfo(), nl_langinfo_l(), or setlocale(3). The same statements apply to nl_langinfo_l() if the locale object referred to by locale is freed or modified by freelocale(3) or newlocale(3).

POSIX specifies that the application may not modify the string returned by these functions.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

nl_langinfo()

Thread safetyMT-Safe locale

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SUSv2.

NOTES

The behavior of nl_langinfo_l() is undefined if locale is the special locale object LC_GLOBAL_LOCALE or is not a valid locale object handle.

EXAMPLES

The following program sets the character type and the numeric locale according to the environment and queries the terminal character set and the radix character.

#include <langinfo.h>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    setlocale(LC_CTYPE, "");
    setlocale(LC_NUMERIC, "");
    printf("%s

“, nl_langinfo(CODESET)); printf("%s “, nl_langinfo(RADIXCHAR)); exit(EXIT_SUCCESS); }

SEE ALSO

locale(1), localeconv(3), setlocale(3), charsets(7), locale(7)

The GNU C Library Reference Manual

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

812 - Linux cli command XtAddWorkProc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAddWorkProc and provides detailed information about the command XtAddWorkProc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAddWorkProc.

NAME 🖥️ XtAddWorkProc 🖥️

register input, timeout, and workprocs

SYNTAX

#include <X11/Intrinsic.h>

XtInputId XtAddInput(int source, XtPointer condition, XtInputCallbackProc proc, XtPointer client_data);

XtIntervalId XtAddTimeOut(unsigned long interval, XtTimerCallbackProc proc, XtPointer client_data);

XtWorkProcId XtAddWorkProc(XtWorkProc proc, XtPointer client_data);

ARGUMENTS

client_data
Specifies the argument that is to be passed to the specified procedure when input is available

condition
Specifies the mask that indicates a read, write, or exception condition or some operating system dependent condition.

proc
Specifies the procedure that is to be called when input is available.

source
Specifies the source file descriptor on a UNIX-based system or other operating system dependent device specification.

DESCRIPTION

XtAddInput has been replaced by XtAppAddInput.

XtAddTimeOut has been replaced by XtAppAddTimeOut.

XtAddWorkProc has been replaced by XtAppAddWorkProc.

SEE ALSO

XtAppAddInput(3), XtAppAddTimeOut(3), XtAppAddWorkProc(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

813 - Linux cli command File_Find_Rule_Extendingpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command File_Find_Rule_Extendingpm and provides detailed information about the command File_Find_Rule_Extendingpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the File_Find_Rule_Extendingpm.

NAME 🖥️ File_Find_Rule_Extendingpm 🖥️

the mini-guide to extending File::Find::Rule

SYNOPSIS

package File::Find::Rule::Random; use strict; # take useful things from File::Find::Rule use base File::Find::Rule; # and force our crack into the main namespace sub File::Find::Rule::random () { my $self = shift()->_force_object; $self->exec( sub { rand > 0.5 } ); } 1;

DESCRIPTION

File::Find::Rule went down so well with the buying public that everyone wanted to add extra features. With the 0.07 release this became a possibility, using the following conventions.

Declare your package

package File::Find::Rule::Random; use strict;

Inherit methods from File::Find::Rule

# take useful things from File::Find::Rule use base File::Find::Rule;

Force your madness into the main package

# and force our crack into the main namespace sub File::Find::Rule::random () { my $self = shift()->_force_object; $self->exec( sub { rand > 0.5 } ); }

Yes, we’re being very cavalier here and defining things into the main File::Find::Rule namespace. This is due to lack of imaginiation on my part - I simply can’t find a way for the functional and oo interface to work without doing this or some kind of inheritance, and inheritance stops you using two File::Find::Rule::Foo modules together.

For this reason try and pick distinct names for your extensions. If this becomes a problem then I may institute a semi-official registry of taken names.

Taking no arguments.

Note the null prototype on random. This is a cheat for the procedural interface to know that your sub takes no arguments, and so allows this to happen:

find( random => in => . );

If you hadn’t declared random with a null prototype it would have consumed in as a parameter to it, then got all confused as it doesn’t know about a . rule.

AUTHOR

Richard Clamp <[email protected]>

COPYRIGHT

Copyright (C) 2002 Richard Clamp. All Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

File::Find::Rule

File::Find::Rule::MMagic was the first extension module, so maybe check that out.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

814 - Linux cli command log1p

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command log1p and provides detailed information about the command log1p, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the log1p.

NAME 🖥️ log1p 🖥️

logarithm of 1 plus argument

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double log1p(double x);
float log1pf(float x);
long double log1pl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

log1p():
    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

log1pf(), log1pl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return a value equivalent to

    log (1 + x)

The result is computed in a way that is accurate even if the value of x is near zero.

RETURN VALUE

On success, these functions return the natural logarithm of (1 + x).

If x is a NaN, a NaN is returned.

If x is positive infinity, positive infinity is returned.

If x is -1, a pole error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.

If x is less than -1 (including negative infinity), a domain error occurs, and a NaN (not a number) is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is less than -1
errno is set to EDOM (but see BUGS). An invalid floating-point exception (FE_INVALID) is raised.

Pole error: x is -1
errno is set to ERANGE (but see BUGS). A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

log1p(), log1pf(), log1pl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

BUGS

Before glibc 2.22, the glibc implementation did not set errno to EDOM when a domain error occurred.

Before glibc 2.22, the glibc implementation did not set errno to ERANGE when a range error occurred.

SEE ALSO

exp(3), expm1(3), log(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

815 - Linux cli command setmntent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setmntent and provides detailed information about the command setmntent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setmntent.

NAME 🖥️ setmntent 🖥️

get filesystem descriptor file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
#include <mntent.h>
FILE *setmntent(const char *filename, const char *type);
struct mntent *getmntent(FILE *stream);
int addmntent(FILE *restrict stream,
 const struct mntent *restrict mnt);
int endmntent(FILE *streamp);
char *hasmntopt(const struct mntent *mnt, const char *opt);
/* GNU extension */
#include <mntent.h>
struct mntent *getmntent_r(FILE *restrict streamp,
 struct mntent *restrict mntbuf,
 char buf[restrict .buflen], int buflen);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getmntent_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These routines are used to access the filesystem description file /etc/fstab and the mounted filesystem description file /etc/mtab.

The setmntent() function opens the filesystem description file filename and returns a file pointer which can be used by getmntent(). The argument type is the type of access required and can take the same values as the mode argument of fopen(3). The returned stream should be closed using endmntent() rather than fclose(3).

The getmntent() function reads the next line of the filesystem description file from stream and returns a pointer to a structure containing the broken out fields from a line in the file. The pointer points to a static area of memory which is overwritten by subsequent calls to getmntent().

The addmntent() function adds the mntent structure mnt to the end of the open stream.

The endmntent() function closes the stream associated with the filesystem description file.

The hasmntopt() function scans the mnt_opts field (see below) of the mntent structure mnt for a substring that matches opt. See <mntent.h> and mount(8) for valid mount options.

The reentrant getmntent_r() function is similar to getmntent(), but stores the mntent structure in the provided *mntbuf, and stores the strings pointed to by the entries in that structure in the provided array buf of size buflen.

The mntent structure is defined in <mntent.h> as follows:

struct mntent {
    char *mnt_fsname;   /* name of mounted filesystem */
    char *mnt_dir;      /* filesystem path prefix */
    char *mnt_type;     /* mount type (see mntent.h) */
    char *mnt_opts;     /* mount options (see mntent.h) */
    int   mnt_freq;     /* dump frequency in days */
    int   mnt_passno;   /* pass number on parallel fsck */
};

Since fields in the mtab and fstab files are separated by whitespace, octal escapes are used to represent the characters space ( ), tab ( ), newline ( ), and backslash () in those files when they occur in one of the four strings in a mntent structure. The routines addmntent() and getmntent() will convert from string representation to escaped representation and back. When converting from escaped representation, the sequence \134 is also converted to a backslash.

RETURN VALUE

The getmntent() and getmntent_r() functions return a pointer to the mntent structure or NULL on failure.

The addmntent() function returns 0 on success and 1 on failure.

The endmntent() function always returns 1.

The hasmntopt() function returns the address of the substring if a match is found and NULL otherwise.

FILES

/etc/fstab
filesystem description file

/etc/mtab
mounted filesystem description file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setmntent(), endmntent(), hasmntopt()

Thread safetyMT-Safe

getmntent()

Thread safety

MT-Unsafe race:mntentbuf locale

addmntent()

Thread safety

MT-Safe race:stream locale

getmntent_r()

Thread safetyMT-Safe locale

STANDARDS

None.

HISTORY

The nonreentrant functions are from SunOS 4.1.3. A routine getmntent_r() was introduced in HP-UX 10, but it returns an int. The prototype shown above is glibc-only.

System V also has a getmntent() function but the calling sequence differs, and the returned structure is different. Under System V /etc/mnttab is used. 4.4BSD and Digital UNIX have a routine getmntinfo(), a wrapper around the system call getfsstat().

SEE ALSO

fopen(3), fstab(5), mount(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

816 - Linux cli command URI_icapspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command URI_icapspm and provides detailed information about the command URI_icapspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the URI_icapspm.

NAME 🖥️ URI_icapspm 🖥️

URI scheme for ICAPS Identifiers

VERSION

Version 5.20

SYNOPSIS

use URI::icaps; my $uri = URI->new(icaps://icap-proxy.example.com/);

DESCRIPTION

This module implements the icaps: URI scheme defined in RFC 3507 <http://tools.ietf.org/html/rfc3507>, for the Internet Content Adaptation Protocol <https://en.wikipedia.org/wiki/Internet_Content_Adaptation_Protocol>.

SUBROUTINES/METHODS

This module inherits the behaviour of URI::icap and overrides the securesecure> method.

secure

returns 1 as icaps is a secure protocol

DIAGNOSTICS

See URI::icap

CONFIGURATION AND ENVIRONMENT

See URI::icap

DEPENDENCIES

None

INCOMPATIBILITIES

None reported

BUGS AND LIMITATIONS

See URI::icap

SEE ALSO

RFC 3507 <http://tools.ietf.org/html/rfc3507>

AUTHOR

David Dick, <ddick at cpan.org>

LICENSE AND COPYRIGHT

Copyright 2016 David Dick.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See <http://dev.perl.org/licenses/> for more information.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

817 - Linux cli command getdate

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getdate and provides detailed information about the command getdate, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getdate.

NAME 🖥️ getdate 🖥️

convert a date-plus-time string to broken-down time

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <time.h>
struct tm *getdate(const char *string);
extern int getdate_err;
int getdate_r(const char *restrict string, struct tm *restrict res);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getdate():

    _XOPEN_SOURCE >= 500

getdate_r():

    _GNU_SOURCE

DESCRIPTION

The function getdate() converts a string representation of a date and time, contained in the buffer pointed to by string, into a broken-down time. The broken-down time is stored in a tm structure, and a pointer to this structure is returned as the function result. This tm structure is allocated in static storage, and consequently it will be overwritten by further calls to getdate().

In contrast to strptime(3), (which has a format argument), getdate() uses the formats found in the file whose full pathname is given in the environment variable DATEMSK. The first line in the file that matches the given input string is used for the conversion.

The matching is done case insensitively. Superfluous whitespace, either in the pattern or in the string to be converted, is ignored.

The conversion specifications that a pattern can contain are those given for strptime(3). One more conversion specification is specified in POSIX.1-2001:

%Z
Timezone name. This is not implemented in glibc.

When %Z is given, the structure containing the broken-down time is initialized with values corresponding to the current time in the given timezone. Otherwise, the structure is initialized to the broken-down time corresponding to the current local time (as by a call to localtime(3)).

When only the day of the week is given, the day is taken to be the first such day on or after today.

When only the month is given (and no year), the month is taken to be the first such month equal to or after the current month. If no day is given, it is the first day of the month.

When no hour, minute, and second are given, the current hour, minute, and second are taken.

If no date is given, but we know the hour, then that hour is taken to be the first such hour equal to or after the current hour.

getdate_r() is a GNU extension that provides a reentrant version of getdate(). Rather than using a global variable to report errors and a static buffer to return the broken down time, it returns errors via the function result value, and returns the resulting broken-down time in the caller-allocated buffer pointed to by the argument res.

RETURN VALUE

When successful, getdate() returns a pointer to a struct tm. Otherwise, it returns NULL and sets the global variable getdate_err to one of the error numbers shown below. Changes to errno are unspecified.

On success getdate_r() returns 0; on error it returns one of the error numbers shown below.

ERRORS

The following errors are returned via getdate_err (for getdate()) or as the function result (for getdate_r()):

1
The DATEMSK environment variable is not defined, or its value is an empty string.

2
The template file specified by DATEMSK cannot be opened for reading.

3
Failed to get file status information.

4
The template file is not a regular file.

5
An error was encountered while reading the template file.

6
Memory allocation failed (not enough memory available).

7
There is no line in the file that matches the input.

8
Invalid input specification.

ENVIRONMENT

DATEMSK
File containing format patterns.

TZ
LC_TIME
Variables used by strptime(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getdate()

Thread safety

MT-Unsafe race:getdate env locale

getdate_r()

Thread safety

MT-Safe env locale

VERSIONS

The POSIX.1 specification for strptime(3) contains conversion specifications using the %E or %O modifier, while such specifications are not given for getdate(). In glibc, getdate() is implemented using strptime(3), so that precisely the same conversions are supported by both.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

EXAMPLES

The program below calls getdate() for each of its command-line arguments, and for each call displays the values in the fields of the returned tm structure. The following shell session demonstrates the operation of the program:

$ TFILE=$PWD/tfile
$ echo '%A' > $TFILE  # Full name of the day of the week
$ echo '%T' >> $TFILE # Time (HH:MM:SS)
$ echo '%F' >> $TFILE # ISO date (YYYY-MM-DD)
$ date
$ export DATEMSK=$TFILE
$ ./a.out Tuesday '2009-12-28' '12:22:33'
Sun Sep  7 06:03:36 CEST 2008
Call 1 ("Tuesday") succeeded:
    tm_sec   = 36
    tm_min   = 3
    tm_hour  = 6
    tm_mday  = 9
    tm_mon   = 8
    tm_year  = 108
    tm_wday  = 2
    tm_yday  = 252
    tm_isdst = 1
Call 2 ("2009-12-28") succeeded:
    tm_sec   = 36
    tm_min   = 3
    tm_hour  = 6
    tm_mday  = 28
    tm_mon   = 11
    tm_year  = 109
    tm_wday  = 1
    tm_yday  = 361
    tm_isdst = 0
Call 3 ("12:22:33") succeeded:
    tm_sec   = 33
    tm_min   = 22
    tm_hour  = 12
    tm_mday  = 7
    tm_mon   = 8
    tm_year  = 108
    tm_wday  = 0
    tm_yday  = 250
    tm_isdst = 1

Program source

#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int
main(int argc, char *argv[])
{
    struct tm *tmp;
    for (size_t j = 1; j < argc; j++) {
        tmp = getdate(argv[j]);
        if (tmp == NULL) {
            printf("Call %zu failed; getdate_err = %d

“, j, getdate_err); continue; } printf(“Call %zu ("%s") succeeded: “, j, argv[j]); printf(” tm_sec = %d “, tmp->tm_sec); printf(” tm_min = %d “, tmp->tm_min); printf(” tm_hour = %d “, tmp->tm_hour); printf(” tm_mday = %d “, tmp->tm_mday); printf(” tm_mon = %d “, tmp->tm_mon); printf(” tm_year = %d “, tmp->tm_year); printf(” tm_wday = %d “, tmp->tm_wday); printf(” tm_yday = %d “, tmp->tm_yday); printf(” tm_isdst = %d “, tmp->tm_isdst); } exit(EXIT_SUCCESS); }

SEE ALSO

time(2), localtime(3), setlocale(3), strftime(3), strptime(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

818 - Linux cli command va_copy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command va_copy and provides detailed information about the command va_copy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the va_copy.

NAME 🖥️ va_copy 🖥️

variable argument lists

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdarg.h>
void va_start(va_list ap, last);
type va_arg(va_list ap, type);
void va_end(va_list ap);
void va_copy(va_list dest, va_list src);

DESCRIPTION

A function may be called with a varying number of arguments of varying types. The include file <stdarg.h> declares a type va_list and defines three macros for stepping through a list of arguments whose number and types are not known to the called function.

The called function must declare an object of type va_list which is used by the macros va_start(), va_arg(), and va_end().

va_start()

The va_start() macro initializes ap for subsequent use by va_arg() and va_end(), and must be called first.

The argument last is the name of the last argument before the variable argument list, that is, the last argument of which the calling function knows the type.

Because the address of this argument may be used in the va_start() macro, it should not be declared as a register variable, or as a function or an array type.

va_arg()

The va_arg() macro expands to an expression that has the type and value of the next argument in the call. The argument ap is the va_list ap initialized by va_start(). Each call to va_arg() modifies ap so that the next call returns the next argument. The argument type is a type name specified so that the type of a pointer to an object that has the specified type can be obtained simply by adding a * to type.

The first use of the va_arg() macro after that of the va_start() macro returns the argument after last. Successive invocations return the values of the remaining arguments.

If there is no next argument, or if type is not compatible with the type of the actual next argument (as promoted according to the default argument promotions), random errors will occur.

If ap is passed to a function that uses va_arg(ap,type), then the value of ap is undefined after the return of that function.

va_end()

Each invocation of va_start() must be matched by a corresponding invocation of va_end() in the same function. After the call va_end(ap) the variable ap is undefined. Multiple traversals of the list, each bracketed by va_start() and va_end() are possible. va_end() may be a macro or a function.

va_copy()

The va_copy() macro copies the (previously initialized) variable argument list src to dest. The behavior is as if va_start() were applied to dest with the same last argument, followed by the same number of va_arg() invocations that was used to reach the current state of src.

An obvious implementation would have a va_list be a pointer to the stack frame of the variadic function. In such a setup (by far the most common) there seems nothing against an assignment

va_list aq = ap;

Unfortunately, there are also systems that make it an array of pointers (of length 1), and there one needs

va_list aq;
*aq = *ap;

Finally, on systems where arguments are passed in registers, it may be necessary for va_start() to allocate memory, store the arguments there, and also an indication of which argument is next, so that va_arg() can step through the list. Now va_end() can free the allocated memory again. To accommodate this situation, C99 adds a macro va_copy(), so that the above assignment can be replaced by

va_list aq;
va_copy(aq, ap);
...
va_end(aq);

Each invocation of va_copy() must be matched by a corresponding invocation of va_end() in the same function. Some systems that do not supply va_copy() have __va_copy instead, since that was the name used in the draft proposal.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

va_start(), va_end(), va_copy()

Thread safetyMT-Safe

va_arg()

Thread safetyMT-Safe race:ap

STANDARDS

C11, POSIX.1-2008.

HISTORY

va_start()
va_arg()
va_end()
C89, POSIX.1-2001.

va_copy()
C99, POSIX.1-2001.

CAVEATS

Unlike the historical varargs macros, the stdarg macros do not permit programmers to code a function with no fixed arguments. This problem generates work mainly when converting varargs code to stdarg code, but it also creates difficulties for variadic functions that wish to pass all of their arguments on to a function that takes a va_list argument, such as vfprintf(3).

EXAMPLES

The function foo takes a string of format characters and prints out the argument associated with each format character based on the type.

#include <stdio.h>
#include <stdarg.h>
void
foo(char *fmt, ...)   /* '...' is C syntax for a variadic function */
{
    va_list ap;
    int d;
    char c;
    char *s;
    va_start(ap, fmt);
    while (*fmt)
        switch (*fmt++) {
        case 's':              /* string */
            s = va_arg(ap, char *);
            printf("string %s

“, s); break; case ’d’: /* int / d = va_arg(ap, int); printf(“int %d “, d); break; case ‘c’: / char / / need a cast here since va_arg only takes fully promoted types */ c = (char) va_arg(ap, int); printf(“char %c “, c); break; } va_end(ap); }

SEE ALSO

vprintf(3), vscanf(3), vsyslog(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

819 - Linux cli command __ppc_set_ppr_med

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __ppc_set_ppr_med and provides detailed information about the command __ppc_set_ppr_med, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __ppc_set_ppr_med.

Programmer’s Manual"

NAME 🖥️ __ppc_set_ppr_med 🖥️

Set the Program Priority Register

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/platform/ppc.h>
void __ppc_set_ppr_med(void);
void __ppc_set_ppr_very_low(void);
void __ppc_set_ppr_low(void);
void __ppc_set_ppr_med_low(void);
void __ppc_set_ppr_med_high(void);

DESCRIPTION

These functions provide access to the Program Priority Register (PPR) on the Power architecture.

The PPR is a 64-bit register that controls the program’s priority. By adjusting the PPR value the programmer may improve system throughput by causing system resources to be used more efficiently, especially in contention situations. The available unprivileged states are covered by the following functions:

__ppc_set_ppr_med()
sets the Program Priority Register value to medium (default).

__ppc_set_ppr_very_low()
sets the Program Priority Register value to very low.

__ppc_set_ppr_low()
sets the Program Priority Register value to low.

__ppc_set_ppr_med_low()
sets the Program Priority Register value to medium low.

The privileged state medium high may also be set during certain time intervals by problem-state (unprivileged) programs, with the following function:

__ppc_set_ppr_med_high()
sets the Program Priority to medium high.

If the program priority is medium high when the time interval expires or if an attempt is made to set the priority to medium high when it is not allowed, the priority is set to medium.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

__ppc_set_ppr_med(), __ppc_set_ppr_very_low(), __ppc_set_ppr_low(), __ppc_set_ppr_med_low(), __ppc_set_ppr_med_high()

Thread safetyMT-Safe

STANDARDS

GNU.

HISTORY

__ppc_set_ppr_med()
__ppc_set_ppr_low()
__ppc_set_ppr_med_low()
glibc 2.18.

__ppc_set_ppr_very_low()
__ppc_set_ppr_med_high()
glibc 2.23.

NOTES

The functions __ppc_set_ppr_very_low() and __ppc_set_ppr_med_high() will be defined by <sys/platform/ppc.h> if _ARCH_PWR8 is defined. Availability of these functions can be tested using #ifdef _ARCH_PWR8.

SEE ALSO

__ppc_yield(3)

Power ISA, Book II - Section 3.1 (Program Priority Registers)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

820 - Linux cli command libmagic

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command libmagic and provides detailed information about the command libmagic, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the libmagic.

These functions operate on the magic database file which is described in

The function

creates a magic cookie pointer and returns it. It returns

if there was an error allocating the magic cookie. The

argument specifies how the other magic functions should behave:

No special handling.

Print debugging messages to stderr.

If the file queried is a symlink, follow it.

If the file is compressed, unpack it and look at the contents.

If the file is a block or character special device, then open the device and try to look in its contents.

Return a MIME type string, instead of a textual description.

Return a MIME encoding, instead of a textual description.

A shorthand for MAGIC_MIME_TYPE | MAGIC_MIME_ENCODING.

Return all matches, not just the first.

Check the magic database for consistency and print warnings to stderr.

On systems that support

or

attempt to preserve the access time of files analysed.

Don’t translate unprintable characters to a \ooo octal representation.

Treat operating system errors while trying to open files and follow symlinks as real errors, instead of printing them in the magic buffer.

Return the Apple creator and type.

Return a slash-separated list of extensions for this file type.

Don’t report on compression, only report about the uncompressed data.

Don’t check for

application type (only on EMX).

Don’t allow decompressors that use fork.

Don’t get extra information on MS Composite Document Files.

Don’t look inside compressed files.

Don’t print ELF details.

Don’t check text encodings.

Don’t consult magic files.

Don’t examine tar files.

Don’t check for various types of text files.

Don’t look for known tokens inside ascii files.

Don’t examine JSON files.

Don’t examine CSV files.

Don’t examine SIMH tape files.

The

function closes the

database and deallocates any resources used.

The

function returns a textual explanation of the last error, or

if there was no error.

The

function returns the last operating system error number

that was encountered by a system call.

The

function returns a textual description of the contents of the

argument, or

if an error occurred. If the

is

then stdin is used.

The

function returns a textual description of the contents of the

argument, or

if an error occurred.

The

function returns a textual description of the contents of the

argument with

bytes size.

The

functions returns a value representing current

set.

The

function sets the

described above. Note that using both MIME flags together can also return extra information on the charset.

The

function can be used to check the validity of entries in the colon separated database files passed in as

or

for the default database. It returns 0 on success and -1 on failure.

The

function can be used to compile the colon separated list of database files passed in as

or

for the default database. It returns 0 on success and -1 on failure. The compiled files created are named from the

of each file argument with

appended to it.

The

function dumps all magic entries in a human readable format, dumping first the entries that are matched against binary files and then the ones that match text files. It takes and optional

argument which is a colon separated list of database files, or

for the default database.

The

function must be used to load the colon separated list of database files passed in as

or

for the default database file before any magic queries can performed.

The default database file is named by the MAGIC environment variable. If that variable is not set, the default database file name is /usr/share/misc/magic.

adds

to the database filename as appropriate.

The

function takes an array of size

of

with a respective size for each in the array of

loaded with the contents of the magic databases from the filesystem. This function can be used in environment where the magic library does not have direct access to the filesystem, but can access the magic database via shared memory or other IPC means.

The

and

allow getting and setting various limits related to the magic library.

The

parameter controls how many levels of recursion will be followed for indirect magic entries.

The

parameter controls how many levels of recursion will be followed for for name/use calls.

The

parameter controls the maximum number of calls for name/use.

The

parameter controls how many ELF notes will be processed.

The

parameter controls how many ELF program sections will be processed.

The

parameter controls how many ELF sections will be processed.

The

command returns the version number of this library which is compiled into the shared library using the constant

from

This can be used by client programs to verify that the version they compile against is the same as the version that they run against.

The

command returns the colon separated list of magic database locations. If the

is non-NULL, then it is returned. Otherwise, if the

environment variable is defined, then it is returned. Otherwise, if

is 0 (meaning “file load”), then any user-specific magic database file is included. Otherwise, only the system default magic database path is included.

The function

returns a magic cookie on success and

on failure setting errno to an appropriate value. It will set errno to

if an unsupported value for flags was given. The

and

functions return 0 on success and -1 on failure. The

and

functions return a string on success and

on failure. The

function returns a textual description of the errors of the above functions, or

if there was no error. The

always returns the version number of the library. Finally,

returns -1 on systems that don’t support

or

when

is set.

The non-compiled default magic database.

The compiled default magic database.

The results from

and

where the buffer and the file contain the same data can produce different results, because in the

case, the program can

and

the file descriptor.

Initial libmagic implementation, and configuration.

API cleanup, error code and allocation handling.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

821 - Linux cli command pcap_can_set_rfmonpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_can_set_rfmonpcap and provides detailed information about the command pcap_can_set_rfmonpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_can_set_rfmonpcap.

NAME 🖥️ pcap_can_set_rfmonpcap 🖥️

check whether monitor mode can be set for a not-yet-activated capture handle

SYNOPSIS

#include <pcap/pcap.h>
int pcap_can_set_rfmon(pcap_t *p);

DESCRIPTION

pcap_can_set_rfmon() checks whether monitor mode could be set on a capture handle when the handle is activated.

RETURN VALUE

pcap_can_set_rfmon() returns 0 if monitor mode could not be set, 1 if monitor mode could be set, and a negative value on error. A negative return value indicates what error condition occurred. The possible error values are:

PCAP_ERROR_NO_SUCH_DEVICE
The capture source specified when the handle was created doesn’t exist.

PCAP_ERROR_PERM_DENIED
The process doesn’t have permission to check whether monitor mode could be supported.

PCAP_ERROR_ACTIVATED
The capture handle has already been activated.

PCAP_ERROR
Another error occurred. pcap_geterr(3PCAP) or pcap_perror(3PCAP) may be called with p as an argument to fetch or display a message describing the error.

Additional error codes may be added in the future; a program should check for 0, 1, and negative, return codes, and treat all negative return codes as errors. pcap_statustostr(3PCAP) can be called, with a warning or error code as an argument, to fetch a message describing the warning or error code.

SEE ALSO

pcap(3PCAP), pcap_create(3PCAP), pcap_activate(3PCAP), pcap_set_rfmon(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

822 - Linux cli command PA_FLAG_LONG_LONGconst

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command PA_FLAG_LONG_LONGconst and provides detailed information about the command PA_FLAG_LONG_LONGconst, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the PA_FLAG_LONG_LONGconst.

NAME 🖥️ PA_FLAG_LONG_LONGconst 🖥️

define custom behavior for printf-like functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <printf.h>
int register_printf_specifier(int spec, printf_function func,
 printf_arginfo_size_function arginfo);
int register_printf_modifier(const wchar_t *str);
int register_printf_type(printf_va_arg_function fct);

Callbacks

typedef int printf_function(FILE *stream, const struct printf_info *info,
 const void *const args[]);
typedef int printf_arginfo_size_function(const struct printf_info *info,
 size_t n, int argtypes[n], int size[n]);
typedef void printf_va_arg_function(void *mem, va_list *ap);

Types

struct printf_info {
 int prec; // Precision
 int width; // Width
 wchar_t spec; // Format letter
 unsigned int is_long_double:1;// L or ll flag
 unsigned int is_short:1; // h flag
 unsigned int is_long:1; // l flag
 unsigned int alt:1; // # flag
 unsigned int space:1; // Space flag
 unsigned int left:1; // - flag
 unsigned int showsign:1; // + flag
 unsigned int group:1; // ' flag
 unsigned int extra:1; // For special use
 unsigned int is_char:1; // hh flag
 unsigned int wide:1; // True for wide character streams
 unsigned int i18n:1; // I flag
 unsigned int is_binary128:1; /* Floating-point argument is
  ABI-compatible with
  IEC 60559 binary128 */
 unsigned short user; // Bits for user-installed modifiers
 wchar_t pad; // Padding character
};

Constants

#define PA_FLAG_LONG_LONG /* ... */
#define PA_FLAG_LONG_DOUBLE /* ... */
#define PA_FLAG_LONG /* ... */
#define PA_FLAG_SHORT /* ... */
#define PA_FLAG_PTR /* ... */

DESCRIPTION

These functions serve to extend and/or modify the behavior of the printf(3) family of functions.

register_printf_specifier()

This function registers a custom conversion specifier for the printf(3) family of functions.

spec
The character which will be used as a conversion specifier in the format string.

func
Callback function that will be executed by the printf(3) family of functions to format the input arguments into the output stream.

stream
Output stream where the formatted output should be printed. This stream transparently represents the output, even in the case of functions that write to a string.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in arginfo.

args
Array of pointers to the arguments to the printf(3) -like function.

arginfo
Callback function that will be executed by the printf(3) family of functions to know how many arguments should be parsed for the custom specifier and also their types.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in func.

n
Number of arguments remaining to be parsed.

argtypes
This array should be set to define the type of each of the arguments that will be parsed. Each element in the array represents one of the arguments to be parsed, in the same order that they are passed to the printf(3) -like function. Each element should be set to a base type (PA_*) from the enum above, or a custom one, and optionally ORed with an appropriate length modifier (PA_FLAG_*).

The type is determined by using one of the following constants:

PA_INT
int.

PA_CHAR
int, cast to char.

PA_WCHAR
wchar_t.

PA_STRING
const char *, a ‘�’-terminated string.

PA_WSTRING
const wchar_t *, a wide character L’�’-terminated string.

PA_POINTER
void *.

PA_FLOAT
float.

PA_DOUBLE
double.

PA_LAST
TODO.

size
For user-defined types, the size of the type (in bytes) should also be specified through this array. Otherwise, leave it unused.

arginfo is called before func, and prepares some information needed to call func.

register_printf_modifier()

TODO

register_printf_type()

TODO

RETURN VALUE

register_printf_specifier(), register_printf_modifier(), and register_printf_type() return zero on success, or -1 on error.

Callbacks

The callback of type printf_function should return the number of characters written, or -1 on error.

The callback of type printf_arginfo_size_function should return the number of arguments to be parsed by this specifier. It also passes information about the type of those arguments to the caller through argtypes. On error, it should return -1.

ERRORS

EINVAL
The specifier was not a valid character.

STANDARDS

GNU.

HISTORY

register_printf_function(3) is an older function similar to register_printf_specifier(), and is now deprecated. That function can’t handle user-defined types.

register_printf_specifier() supersedes register_printf_function(3).

EXAMPLES

The following example program registers the ‘b’ and ‘B’ specifiers to print integers in binary format, mirroring rules for other unsigned conversion specifiers like ‘x’ and ‘u’. This can be used to print in binary prior to C23.

/* This code is in the public domain */
#include <err.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <printf.h>
#define GROUP_SEP  '\''
struct Printf_Pad {
    char    ch;
    size_t  len;
};
static int b_printf(FILE *stream, const struct printf_info *info,
                    const void *const args[]);
static int b_arginf_sz(const struct printf_info *info,
                    size_t n, int argtypes[n], int size[n]);
static uintmax_t b_value(const struct printf_info *info,
                    const void *arg);
static size_t b_bin_repr(char bin[UINTMAX_WIDTH],
                    const struct printf_info *info, const void *arg);
static size_t b_bin_len(const struct printf_info *info,
                    ptrdiff_t min_len);
static size_t b_pad_len(const struct printf_info *info,
                    ptrdiff_t bin_len);
static ssize_t b_print_prefix(FILE *stream,
                    const struct printf_info *info);
static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info,
                    ptrdiff_t min_len);
static ssize_t b_print_number(FILE *stream,
                    const struct printf_info *info,
                    const char bin[UINTMAX_WIDTH],
                    size_t min_len, size_t bin_len);
static char pad_ch(const struct printf_info *info);
static ssize_t pad_spaces(FILE *stream, size_t pad_len);
int
main(void)
{
    if (register_printf_specifier('b', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('b', ...)");
    if (register_printf_specifier('B', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('B', ...)");
    printf("....----....----....----....----

“); printf("%llb; “, 0x5Ellu); printf("%lB; “, 0x5Elu); printf("%b; “, 0x5Eu); printf("%hB; “, 0x5Eu); printf("%hhb; “, 0x5Eu); printf("%jb; “, (uintmax_t)0x5E); printf("%zb; “, (size_t)0x5E); printf(”….—-….—-….—-….—- “); printf(”%#b; “, 0x5Eu); printf(”%#B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf("%10b; “, 0x5Eu); printf("%010b; “, 0x5Eu); printf(”%.10b; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%-10B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%‘B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”….—-….—-….—-….—- “); printf(”%#16.12b; “, 0xAB); printf(”%-#‘20.12b; “, 0xAB); printf(”%#‘020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#020B; “, 0xAB); printf(”%‘020B; “, 0xAB); printf("%020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#021B; “, 0xAB); printf(”%‘021B; “, 0xAB); printf("%021B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#022B; “, 0xAB); printf(”%‘022B; “, 0xAB); printf("%022B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#023B; “, 0xAB); printf(”%‘023B; “, 0xAB); printf("%023B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%-#‘19.11b; “, 0xAB); printf(”%#‘019B; “, 0xAB); printf(”%#019B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%‘019B; “, 0xAB); printf("%019B; “, 0xAB); printf(”%#016b; “, 0xAB); printf(”….—-….—-….—-….—- “); return 0; } static int b_printf(FILE *stream, const struct printf_info *info, const void const args[]) { char bin[UINTMAX_WIDTH]; size_t min_len, bin_len; ssize_t len, tmp; struct Printf_Pad pad = {0}; len = 0; min_len = b_bin_repr(bin, info, args[0]); bin_len = b_bin_len(info, min_len); pad.ch = pad_ch(info); if (pad.ch == ’ ‘) pad.len = b_pad_len(info, bin_len); / Padding with ’ ’ (right aligned) / if ((pad.ch == ’ ‘) && !info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } / “0b”/“0B” prefix / if (info->alt) { tmp = b_print_prefix(stream, info); if (tmp == EOF) return EOF; len += tmp; } / Padding with ‘0’ / if (pad.ch == ‘0’) { tmp = b_pad_zeros(stream, info, min_len); if (tmp == EOF) return EOF; len += tmp; } / Print number (including leading 0s to fill precision) / tmp = b_print_number(stream, info, bin, min_len, bin_len); if (tmp == EOF) return EOF; len += tmp; / Padding with ’ ’ (left aligned) */ if (info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } return len; } static int b_arginf_sz(const struct printf_info *info, size_t n, int argtypes[n], [[maybe_unused]] int size[n]) { if (n < 1) return -1; if (info->is_long_double) argtypes[0] = PA_INT | PA_FLAG_LONG_LONG; else if (info->is_long) argtypes[0] = PA_INT | PA_FLAG_LONG; else argtypes[0] = PA_INT; return 1; } static uintmax_t b_value(const struct printf_info *info, const void *arg) { if (info->is_long_double) return *(const unsigned long long *)arg; if (info->is_long) return *(const unsigned long )arg; / short and char are both promoted to int */ return *(const unsigned int *)arg; } static size_t b_bin_repr(char bin[UINTMAX_WIDTH], const struct printf_info *info, const void *arg) { size_t min_len; uintmax_t val; val = b_value(info, arg); bin[0] = ‘0’; for (min_len = 0; val; min_len++) { bin[min_len] = ‘0’ + (val % 2); val »= 1; } return MAX(min_len, 1); } static size_t b_bin_len(const struct printf_info *info, ptrdiff_t min_len) { return MAX(info->prec, min_len); } static size_t b_pad_len(const struct printf_info *info, ptrdiff_t bin_len) { ptrdiff_t pad_len; pad_len = info->width - bin_len; if (info->alt) pad_len -= 2; if (info->group) pad_len -= (bin_len - 1) / 4; return MAX(pad_len, 0); } static ssize_t b_print_prefix(FILE *stream, const struct printf_info *info) { ssize_t len; len = 0; if (fputc(‘0’, stream) == EOF) return EOF; len++; if (fputc(info->spec, stream) == EOF) return EOF; len++; return len; } static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info, ptrdiff_t min_len) { ssize_t len; ptrdiff_t tmp; len = 0; tmp = info->width - (info->alt * 2); if (info->group) tmp -= tmp / 5 - !(tmp % 5); for (ptrdiff_t i = tmp - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static ssize_t b_print_number(FILE *stream, const struct printf_info info, const char bin[UINTMAX_WIDTH], size_t min_len, size_t bin_len) { ssize_t len; len = 0; / Print leading zeros to fill precision / for (size_t i = bin_len - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } / Print number */ for (size_t i = min_len - 1; i < min_len; i–) { if (fputc(bin[i], stream) == EOF) return EOF; len++; if (!info->group || (i % 4) || !i) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static char pad_ch(const struct printf_info *info) { if ((info->prec != -1) || (info->pad == ’ ‘) || info->left) return ’ ‘; return ‘0’; } static ssize_t pad_spaces(FILE *stream, size_t pad_len) { ssize_t len; len = 0; for (size_t i = pad_len - 1; i < pad_len; i–) { if (fputc(’ ‘, stream) == EOF) return EOF; len++; } return len; }

SEE ALSO

asprintf(3), printf(3), wprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

823 - Linux cli command Tk_WinPhotopm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_WinPhotopm and provides detailed information about the command Tk_WinPhotopm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_WinPhotopm.

NAME 🖥️ Tk_WinPhotopm 🖥️

Load a Photo image from a window

SYNOPSIS

use Tk; use Tk::WinPhoto; my $image = $mw->Photo(-format => Window, -data => oct($mw->id)); $image->write($path_name, -format => BMP|PPM|XPM);

DESCRIPTION

This is an extension for Tk800.* which will load a Photo image from a snapshot of an X window specified by the -data option.

The window must exist and be visible. Because the code allows you to capture windows not owned by Tk it does not attempt to enforce this. If you are capturing one of Tk’s windows then use $w->update.

If window is mapped, but obscured by other windows then what is captured is the rectangle the window would occupy. This can be considered a feature. For Tk-owned windows $w->raise can used to bring window forward.

Once the Photo is loaded it can be saved using $image->write(-format => ...) using any of formats which support writing.

AUTHOR

Nick Ing-Simmons <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

824 - Linux cli command ynl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ynl and provides detailed information about the command ynl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ynl.

NAME 🖥️ ynl 🖥️

Bessel functions of the second kind

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double y0(double x);
double y1(double x);
double yn(int n, double x);
float y0f(float x);
float y1f(float x);
float ynf(int n, float x);
long double y0l(long double x);
long double y1l(long double x);
long double ynl(int n, long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

y0(), y1(), yn():

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

y0f(), y0l(), y1f(), y1l(), ynf(), ynl():

    _XOPEN_SOURCE >= 600
        || (_ISOC99_SOURCE && _XOPEN_SOURCE)
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The y0() and y1() functions return Bessel functions of x of the second kind of orders 0 and 1, respectively. The yn() function returns the Bessel function of x of the second kind of order n.

The value of x must be positive.

The y0f(), y1f(), and ynf() functions are versions that take and return float values. The y0l(), y1l(), and ynl() functions are versions that take and return long double values.

RETURN VALUE

On success, these functions return the appropriate Bessel value of the second kind for x.

If x is a NaN, a NaN is returned.

If x is negative, a domain error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively. (POSIX.1-2001 also allows a NaN return for this case.)

If x is 0.0, a pole error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.

If the result underflows, a range error occurs, and the functions return 0.0

If the result overflows, a range error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively. (POSIX.1-2001 also allows a 0.0 return for this case.)

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is negative
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

Pole error: x is 0.0
errno is set to ERANGE and an FE_DIVBYZERO exception is raised (but see BUGS).

Range error: result underflow
errno is set to ERANGE. No FE_UNDERFLOW exception is returned by fetestexcept(3) for this case.

Range error: result overflow
errno is set to ERANGE (but see BUGS). An overflow floating-point exception (FE_OVERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

y0(), y0f(), y0l()

Thread safetyMT-Safe

y1(), y1f(), y1l()

Thread safetyMT-Safe

yn(), ynf(), ynl()

Thread safetyMT-Safe

STANDARDS

y0()
y1()
yn()
POSIX.1-2008.

Others:
BSD.

HISTORY

y0()
y1()
yn()
SVr4, 4.3BSD, POSIX.1-2001.

Others:
BSD.

BUGS

Before glibc 2.19, these functions misdiagnosed pole errors: errno was set to EDOM, instead of ERANGE and no FE_DIVBYZERO exception was raised.

Before glibc 2.17, did not set errno for “range error: result underflow”.

In glibc 2.3.2 and earlier, these functions do not raise an invalid floating-point exception (FE_INVALID) when a domain error occurs.

SEE ALSO

j0(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

825 - Linux cli command pthread_condattr_destroy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_condattr_destroy and provides detailed information about the command pthread_condattr_destroy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_condattr_destroy.

NAME 🖥️ pthread_condattr_destroy 🖥️

condition creation attributes

SYNOPSIS

#include <pthread.h>

int pthread_condattr_init(pthread_condattr_t *attr); int pthread_condattr_destroy(pthread_condattr_t *attr);

DESCRIPTION

Condition attributes can be specified at condition creation time, by passing a condition attribute object as second argument to pthread_cond_init(3). Passing NULL is equivalent to passing a condition attribute object with all attributes set to their default values.

The LinuxThreads implementation supports no attributes for conditions. The functions on condition attributes are included only for compliance with the POSIX standard.

pthread_condattr_init initializes the condition attribute object attr and fills it with default values for the attributes. pthread_condattr_destroy destroys a condition attribute object, which must not be reused until it is reinitialized. Both functions do nothing in the LinuxThreads implementation.

RETURN VALUE

pthread_condattr_init and pthread_condattr_destroy always return 0.

SEE ALSO

pthread_cond_init(3).

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

826 - Linux cli command Tk_TextUndopm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_TextUndopm and provides detailed information about the command Tk_TextUndopm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_TextUndopm.

NAME 🖥️ Tk_TextUndopm 🖥️

perl/tk text widget with bindings to undo changes.

SYNOPSIS

use Tk::TextUndo;

$testundo = $parent->TextUndo(?-option=>value, …?);

DESCRIPTION

This IS-A text widget with an unlimited ‘undo’ history but without a re’undo’ capability.

Bindings

The TextUndo widget has the same bindings as the Text widget. In addition there are the following bindings:

Event <L4> <<Undo>>
undo the last change. Pressing <L4> several times undo step by step the changes made to the text widget.

Methods

The TextUndo widget has the same methods as Text widget. Additional methods for the TextUndo widget are:

$text->Load($filename);
Loads the contents of the $filename into the text widget. Load() delete the previous contents of the text widget as well as its undo history of the previous file.

$text->Save(?$otherfilename?)
Save contents of the text widget to a file. If the $otherfilename is not specified, the text widget contents writes the file of $filename used in the last Load() call. If no file was previously Load()’ed an error message pops up. The default filename of the last Load() call is not overwriten by $otherfilename.

$text->FileName(?$otherfilename?)
If passed an argument sets the file name associated with the loaded document. Returns the current file name associated with the document.

KEYS

widget, text, undo

SEE ALSO

Tk::Text, Tk::ROText

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

827 - Linux cli command zip_replace

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_replace and provides detailed information about the command zip_replace, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_replace.

libzip (-lzip)

The function

is the obsolete version of

It is the same as calling

with an empty

argument. Similarly, the

function is the obsolete version of

It is the same as calling

with an empty

argument.

was added in libzip 0.6. In libzip 0.10 the return type was changed from

to

It was deprecated in libzip 0.11, use

instead.

was added in libzip 0.6. In libzip 0.10 the type of

was changed from

to

It was deprecated in libzip 0.11, use

instead.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

828 - Linux cli command gethostid

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gethostid and provides detailed information about the command gethostid, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gethostid.

NAME 🖥️ gethostid 🖥️

get or set the unique identifier of the current host

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
long gethostid(void);
int sethostid(long hostid);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

gethostid():

    Since glibc 2.20:
        _DEFAULT_SOURCE || _XOPEN_SOURCE >= 500
    Up to and including glibc 2.19:
        _BSD_SOURCE || _XOPEN_SOURCE >= 500

sethostid():

    Since glibc 2.21:
        _DEFAULT_SOURCE
    In glibc 2.19 and 2.20:
        _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)
    Up to and including glibc 2.19:
        _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)

DESCRIPTION

gethostid() and sethostid() respectively get or set a unique 32-bit identifier for the current machine. The 32-bit identifier was intended to be unique among all UNIX systems in existence. This normally resembles the Internet address for the local machine, as returned by gethostbyname(3), and thus usually never needs to be set.

The sethostid() call is restricted to the superuser.

RETURN VALUE

gethostid() returns the 32-bit identifier for the current host as set by sethostid().

On success, sethostid() returns 0; on error, -1 is returned, and errno is set to indicate the error.

ERRORS

sethostid() can fail with the following errors:

EACCES
The caller did not have permission to write to the file used to store the host ID.

EPERM
The calling process’s effective user or group ID is not the same as its corresponding real ID.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

gethostid()

Thread safety

MT-Safe hostid env locale

sethostid()

Thread safety

MT-Unsafe const:hostid

VERSIONS

In the glibc implementation, the hostid is stored in the file /etc/hostid. (Before glibc 2.2, the file /var/adm/hostid was used.)

In the glibc implementation, if gethostid() cannot open the file containing the host ID, then it obtains the hostname using gethostname(2), passes that hostname to gethostbyname_r(3) in order to obtain the host’s IPv4 address, and returns a value obtained by bit-twiddling the IPv4 address. (This value may not be unique.)

STANDARDS

gethostid()
POSIX.1-2008.

sethostid()
None.

HISTORY

4.2BSD; dropped in 4.4BSD. SVr4 and POSIX.1-2001 include gethostid() but not sethostid().

BUGS

It is impossible to ensure that the identifier is globally unique.

SEE ALSO

hostid(1), gethostbyname(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

829 - Linux cli command XML_Parser_Expatpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_Parser_Expatpm and provides detailed information about the command XML_Parser_Expatpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_Parser_Expatpm.

NAME 🖥️ XML_Parser_Expatpm 🖥️

Lowlevel access to James Clark’s expat XML parser

SYNOPSIS

use XML::Parser::Expat; $parser = XML::Parser::Expat->new; $parser->setHandlers(Start => \sh, End => \eh, Char => \ch); open(my $fh, <, info.xml) or die “Couldnt open”; $parser->parse($fh); close($fh); # $parser->parse(<foo id=“me”> here <em>we</em> go </foo>); sub sh { my ($p, $el, %atts) = @_; $p->setHandlers(Char => \spec) if ($el eq special); … } sub eh { my ($p, $el) = @_; $p->setHandlers(Char => \ch) # Special elements wont contain if ($el eq special); # other special elements … }

DESCRIPTION

This module provides an interface to James Clark’s XML parser, expat. As in expat, a single instance of the parser can only parse one document. Calls to parsestring after the first for a given instance will die.

Expat (and XML::Parser::Expat) are event based. As the parser recognizes parts of the document (say the start or end of an XML element), then any handlers registered for that type of an event are called with suitable parameters.

METHODS

new
This is a class method, the constructor for XML::Parser::Expat. Options are passed as keyword value pairs. The recognized options are:

  • ProtocolEncoding The protocol encoding name. The default is none. The expat built-in encodings are: UTF-8, ISO-8859-1, UTF-16, and US-ASCII. Other encodings may be used if they have encoding maps in one of the directories in the @Encoding_Path list. Setting the protocol encoding overrides any encoding in the XML declaration.

  • Namespaces When this option is given with a true value, then the parser does namespace processing. By default, namespace processing is turned off. When it is turned on, the parser consumes xmlns attributes and strips off prefixes from element and attributes names where those prefixes have a defined namespace. A name’s namespace can be found using the “namespace” method and two names can be checked for absolute equality with the “eq_name” method.

  • NoExpand Normally, the parser will try to expand references to entities defined in the internal subset. If this option is set to a true value, and a default handler is also set, then the default handler will be called when an entity reference is seen in text. This has no effect if a default handler has not been registered, and it has no effect on the expansion of entity references inside attribute values.

  • Stream_Delimiter This option takes a string value. When this string is found alone on a line while parsing from a stream, then the parse is ended as if it saw an end of file. The intended use is with a stream of xml documents in a MIME multipart format. The string should not contain a trailing newline.

  • ErrorContext When this option is defined, errors are reported in context. The value of ErrorContext should be the number of lines to show on either side of the line in which the error occurred.

  • ParseParamEnt Unless standalone is set to “yes” in the XML declaration, setting this to a true value allows the external DTD to be read, and parameter entities to be parsed and expanded.

  • Base The base to use for relative pathnames or URLs. This can also be done by using the base method.

setHandlers(TYPE, HANDLER [, TYPE, HANDLER […]])
This method registers handlers for the various events. If no handlers are registered, then a call to parsestring or parsefile will only determine if the corresponding XML document is well formed (by returning without error.) This may be called from within a handler, after the parse has started. Setting a handler to something that evaluates to false unsets that handler. This method returns a list of type, handler pairs corresponding to the input. The handlers returned are the ones that were in effect before the call to setHandlers. The recognized events and the parameters passed to the corresponding handlers are:

  • Start (Parser, Element [, Attr, Val [,…]]) This event is generated when an XML start tag is recognized. Parser is an XML::Parser::Expat instance. Element is the name of the XML element that is opened with the start tag. The Attr & Val pairs are generated for each attribute in the start tag.

  • End (Parser, Element) This event is generated when an XML end tag is recognized. Note that an XML empty tag (<foo/>) generates both a start and an end event. There is always a lower level start and end handler installed that wrap the corresponding callbacks. This is to handle the context mechanism. A consequence of this is that the default handler (see below) will not see a start tag or end tag unless the default_current method is called.

  • Char (Parser, String) This event is generated when non-markup is recognized. The non-markup sequence of characters is in String. A single non-markup sequence of characters may generate multiple calls to this handler. Whatever the encoding of the string in the original document, this is given to the handler in UTF-8.

  • Proc (Parser, Target, Data) This event is generated when a processing instruction is recognized.

  • Comment (Parser, String) This event is generated when a comment is recognized.

  • CdataStart (Parser) This is called at the start of a CDATA section.

  • CdataEnd (Parser) This is called at the end of a CDATA section.

  • Default (Parser, String) This is called for any characters that don’t have a registered handler. This includes both characters that are part of markup for which no events are generated (markup declarations) and characters that could generate events, but for which no handler has been registered. Whatever the encoding in the original document, the string is returned to the handler in UTF-8.

  • Unparsed (Parser, Entity, Base, Sysid, Pubid, Notation) This is called for a declaration of an unparsed entity. Entity is the name of the entity. Base is the base to be used for resolving a relative URI. Sysid is the system id. Pubid is the public id. Notation is the notation name. Base and Pubid may be undefined.

  • Notation (Parser, Notation, Base, Sysid, Pubid) This is called for a declaration of notation. Notation is the notation name. Base is the base to be used for resolving a relative URI. Sysid is the system id. Pubid is the public id. Base, Sysid, and Pubid may all be undefined.

  • ExternEnt (Parser, Base, Sysid, Pubid) This is called when an external entity is referenced. Base is the base to be used for resolving a relative URI. Sysid is the system id. Pubid is the public id. Base, and Pubid may be undefined. This handler should either return a string, which represents the contents of the external entity, or return an open filehandle that can be read to obtain the contents of the external entity, or return undef, which indicates the external entity couldn’t be found and will generate a parse error. If an open filehandle is returned, it must be returned as either a glob (*FOO) or as a reference to a glob (e.g. an instance of IO::Handle).

  • ExternEntFin (Parser) This is called after an external entity has been parsed. It allows applications to perform cleanup on actions performed in the above ExternEnt handler.

  • Entity (Parser, Name, Val, Sysid, Pubid, Ndata, IsParam) This is called when an entity is declared. For internal entities, the Val parameter will contain the value and the remaining three parameters will be undefined. For external entities, the Val parameter will be undefined, the Sysid parameter will have the system id, the Pubid parameter will have the public id if it was provided (it will be undefined otherwise), the Ndata parameter will contain the notation for unparsed entities. If this is a parameter entity declaration, then the IsParam parameter is true. Note that this handler and the Unparsed handler above overlap. If both are set, then this handler will not be called for unparsed entities.

  • Element (Parser, Name, Model) The element handler is called when an element declaration is found. Name is the element name, and Model is the content model as an XML::Parser::ContentModel object. See “XML::Parser::ContentModel Methods” for methods available for this class.

  • Attlist (Parser, Elname, Attname, Type, Default, Fixed) This handler is called for each attribute in an ATTLIST declaration. So an ATTLIST declaration that has multiple attributes will generate multiple calls to this handler. The Elname parameter is the name of the element with which the attribute is being associated. The Attname parameter is the name of the attribute. Type is the attribute type, given as a string. Default is the default value, which will either be “#REQUIRED”, “#IMPLIED” or a quoted string (i.e. the returned string will begin and end with a quote character). If Fixed is true, then this is a fixed attribute.

  • Doctype (Parser, Name, Sysid, Pubid, Internal) This handler is called for DOCTYPE declarations. Name is the document type name. Sysid is the system id of the document type, if it was provided, otherwise it’s undefined. Pubid is the public id of the document type, which will be undefined if no public id was given. Internal will be true or false, indicating whether or not the doctype declaration contains an internal subset.

  • DoctypeFin (Parser) This handler is called after parsing of the DOCTYPE declaration has finished, including any internal or external DTD declarations.

  • XMLDecl (Parser, Version, Encoding, Standalone) This handler is called for XML declarations. Version is a string containing the version. Encoding is either undefined or contains an encoding string. Standalone is either undefined, or true or false. Undefined indicates that no standalone parameter was given in the XML declaration. True or false indicates “yes” or “no” respectively.

namespace(name)
Return the URI of the namespace that the name belongs to. If the name doesn’t belong to any namespace, an undef is returned. This is only valid on names received through the Start or End handlers from a single document, or through a call to the generate_ns_name method. In other words, don’t use names generated from one instance of XML::Parser::Expat with other instances.

eq_name(name1, name2)
Return true if name1 and name2 are identical (i.e. same name and from the same namespace.) This is only meaningful if both names were obtained through the Start or End handlers from a single document, or through a call to the generate_ns_name method.

generate_ns_name(name, namespace)
Return a name, associated with a given namespace, good for using with the above 2 methods. The namespace argument should be the namespace URI, not a prefix.

new_ns_prefixes
When called from a start tag handler, returns namespace prefixes declared with this start tag. If called elsewhere (or if there were no namespace prefixes declared), it returns an empty list. Setting of the default namespace is indicated with ‘#default’ as a prefix.

expand_ns_prefix(prefix)
Return the uri to which the given prefix is currently bound. Returns undef if the prefix isn’t currently bound. Use ‘#default’ to find the current binding of the default namespace (if any).

current_ns_prefixes
Return a list of currently bound namespace prefixes. The order of the the prefixes in the list has no meaning. If the default namespace is currently bound, ‘#default’ appears in the list.

recognized_string
Returns the string from the document that was recognized in order to call the current handler. For instance, when called from a start handler, it will give us the start-tag string. The string is encoded in UTF-8. This method doesn’t return a meaningful string inside declaration handlers.

original_string
Returns the verbatim string from the document that was recognized in order to call the current handler. The string is in the original document encoding. This method doesn’t return a meaningful string inside declaration handlers.

default_current
When called from a handler, causes the sequence of characters that generated the corresponding event to be sent to the default handler (if one is registered). Use of this method is deprecated in favor the recognized_string method, which you can use without installing a default handler. This method doesn’t deliver a meaningful string to the default handler when called from inside declaration handlers.

xpcroak(message)
Concatenate onto the given message the current line number within the XML document plus the message implied by ErrorContext. Then croak with the formed message.

xpcarp(message)
Concatenate onto the given message the current line number within the XML document plus the message implied by ErrorContext. Then carp with the formed message.

current_line
Returns the line number of the current position of the parse.

current_column
Returns the column number of the current position of the parse.

current_byte
Returns the current position of the parse.

base([NEWBASE]);
Returns the current value of the base for resolving relative URIs. If NEWBASE is supplied, changes the base to that value.

context
Returns a list of element names that represent open elements, with the last one being the innermost. Inside start and end tag handlers, this will be the tag of the parent element.

current_element
Returns the name of the innermost currently opened element. Inside start or end handlers, returns the parent of the element associated with those tags.

in_element(NAME)
Returns true if NAME is equal to the name of the innermost currently opened element. If namespace processing is being used and you want to check against a name that may be in a namespace, then use the generate_ns_name method to create the NAME argument.

within_element(NAME)
Returns the number of times the given name appears in the context list. If namespace processing is being used and you want to check against a name that may be in a namespace, then use the generate_ns_name method to create the NAME argument.

depth
Returns the size of the context list.

element_index
Returns an integer that is the depth-first visit order of the current element. This will be zero outside of the root element. For example, this will return 1 when called from the start handler for the root element start tag.

skip_until(INDEX)
INDEX is an integer that represents an element index. When this method is called, all handlers are suspended until the start tag for an element that has an index number equal to INDEX is seen. If a start handler has been set, then this is the first tag that the start handler will see after skip_until has been called.

position_in_context(LINES)
Returns a string that shows the current parse position. LINES should be an integer >= 0 that represents the number of lines on either side of the current parse line to place into the returned string.

xml_escape(TEXT [, CHAR [, CHAR …]])
Returns TEXT with markup characters turned into character entities. Any additional characters provided as arguments are also turned into character references where found in TEXT.

parse (SOURCE)
The SOURCE parameter should either be a string containing the whole XML document, or it should be an open IO::Handle. Only a single document may be parsed for a given instance of XML::Parser::Expat, so this will croak if it’s been called previously for this instance.

parsestring(XML_DOC_STRING)
Parses the given string as an XML document. Only a single document may be parsed for a given instance of XML::Parser::Expat, so this will die if either parsestring or parsefile has been called for this instance previously. This method is deprecated in favor of the parse method.

parsefile(FILENAME)
Parses the XML document in the given file. Will die if parsestring or parsefile has been called previously for this instance.

is_defaulted(ATTNAME)
NO LONGER WORKS. To find out if an attribute is defaulted please use the specified_attr method.

specified_attr
When the start handler receives lists of attributes and values, the non-defaulted (i.e. explicitly specified) attributes occur in the list first. This method returns the number of specified items in the list. So if this number is equal to the length of the list, there were no defaulted values. Otherwise the number points to the index of the first defaulted attribute name.

finish
Unsets all handlers (including internal ones that set context), but expat continues parsing to the end of the document or until it finds an error. It should finish up a lot faster than with the handlers set.

release
There are data structures used by XML::Parser::Expat that have circular references. This means that these structures will never be garbage collected unless these references are explicitly broken. Calling this method breaks those references (and makes the instance unusable.) Normally, higher level calls handle this for you, but if you are using XML::Parser::Expat directly, then it’s your responsibility to call it.

XML::Parser::ContentModel Methods

The element declaration handlers are passed objects of this class as the content model of the element declaration. They also represent content particles, components of a content model.

When referred to as a string, these objects are automagically converted to a string representation of the model (or content particle).

isempty
This method returns true if the object is “EMPTY”, false otherwise.

isany
This method returns true if the object is “ANY”, false otherwise.

ismixed
This method returns true if the object is “(#PCDATA)” or “(#PCDATA|…)*”, false otherwise.

isname
This method returns if the object is an element name.

ischoice
This method returns true if the object is a choice of content particles.

isseq
This method returns true if the object is a sequence of content particles.

quant
This method returns undef or a string representing the quantifier (’?’, ‘*’, ‘+’) associated with the model or particle.

children
This method returns undef or (for mixed, choice, and sequence types) an array of component content particles. There will always be at least one component for choices and sequences, but for a mixed content model of pure PCDATA, “(#PCDATA)”, then an undef is returned.

XML::Parser::ExpatNB Methods

The class XML::Parser::ExpatNB is a subclass of XML::Parser::Expat used for non-blocking access to the expat library. It does not support the parse, parsestring, or parsefile methods, but it does have these additional methods:

parse_more(DATA)
Feed expat more text to munch on.

parse_done
Tell expat that it’s gotten the whole document.

FUNCTIONS

XML::Parser::Expat::load_encoding(ENCODING)
Load an external encoding. ENCODING is either the name of an encoding or the name of a file. The basename is converted to lowercase and a ‘.enc’ extension is appended unless there’s one already there. Then, unless it’s an absolute pathname (i.e. begins with ‘/’), the first file by that name discovered in the @Encoding_Path path list is used. The encoding in the file is loaded and kept in the %Encoding_Table table. Earlier encodings of the same name are replaced. This function is automatically called by expat when it encounters an encoding it doesn’t know about. Expat shouldn’t call this twice for the same encoding name. The only reason users should use this function is to explicitly load an encoding not contained in the @Encoding_Path list.

AUTHORS

Larry Wall <[email protected]> wrote version 1.0.

Clark Cooper <[email protected]> picked up support, changed the API for this version (2.x), provided documentation, and added some standard package features.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

830 - Linux cli command pthread_setschedprio

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_setschedprio and provides detailed information about the command pthread_setschedprio, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_setschedprio.

NAME 🖥️ pthread_setschedprio 🖥️

set scheduling priority of a thread

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_setschedprio(pthread_t thread, int prio);

DESCRIPTION

The pthread_setschedprio() function sets the scheduling priority of the thread thread to the value specified in prio. (By contrast pthread_setschedparam(3) changes both the scheduling policy and priority of a thread.)

RETURN VALUE

On success, this function returns 0; on error, it returns a nonzero error number. If pthread_setschedprio() fails, the scheduling priority of thread is not changed.

ERRORS

EINVAL
prio is not valid for the scheduling policy of the specified thread.

EPERM
The caller does not have appropriate privileges to set the specified priority.

ESRCH
No thread with the ID thread could be found.

POSIX.1 also documents an ENOTSUP (“attempt was made to set the priority to an unsupported value”) error for pthread_setschedparam(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_setschedprio()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.3.4. POSIX.1-2001.

NOTES

For a description of the permissions required to, and the effect of, changing a thread’s scheduling priority, and details of the permitted ranges for priorities in each scheduling policy, see sched(7).

SEE ALSO

getrlimit(2), sched_get_priority_min(2), pthread_attr_init(3), pthread_attr_setinheritsched(3), pthread_attr_setschedparam(3), pthread_attr_setschedpolicy(3), pthread_create(3), pthread_self(3), pthread_setschedparam(3), pthreads(7), sched(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

831 - Linux cli command Tk_Balloonpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Balloonpm and provides detailed information about the command Tk_Balloonpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Balloonpm.

NAME 🖥️ Tk_Balloonpm 🖥️

pop up help balloons.

SYNOPSIS

use Tk::Balloon; … $b = $top->Balloon(-statusbar => $status_bar_widget); # Normal Balloon: $b->attach($widget, -balloonmsg => “Balloon help message”, -statusmsg => “Status bar message”); # Balloon attached to entries in a menu widget: $b->attach($menu, -state => status, -msg => [first menu entry, second menu entry, … ], ); # Balloon attached to individual items in a canvas widget: $b->attach($canvas, -balloonposition => mouse, -msg => {item1 => msg1, tag2 => msg2, … }, ); # Balloon attached to items in a listbox widget: $b->attach($listbox, -balloonposition => mouse, -msg => [first listbox element, 2nd listbox element, … ], );

DESCRIPTION

Balloon provides the framework to create and attach help balloons to various widgets so that when the mouse pauses over the widget for more than a specified amount of time, a help balloon is popped up.

Balloons and Menus or Listboxes

If the balloon is attached to a Menu or Listbox widget and the message arguments are array references, then each element in the array will be the message corresponding to a menu entry or listbox element. The balloon message will then be shown for the entry which the mouse pauses over. Otherwise it is assumed that the balloon is to be attached to the Menu or Listbox as a whole. You can have separate status and balloon messages just like normal balloons.

Balloons and Canvases

If the balloon is attached to a Canvas widget and the message arguments are hash references, then each hash key should correspond to a canvas item ID or tag and the associated value will correspond to the message for that canvas item. The balloon message will then be shown for the current item (the one at the position of the mouse). Otherwise it is assumed that the balloon is to be attached to the Canvas as a whole. You can have separate status and balloon messages just like normal balloons.

Balloons and HLists

If the balloon is attached to a HList widget and the message arguments are hash references, then each hash key should correspond to a HList path and the associated value will correspond to the message for that HList item. The balloon message will then be shown for the current item (the one at the position of the mouse). Otherwise it is assumed that the balloon is to be attached to the HList as a whole. You can have separate status and balloon messages just like normal balloons.

Balloon Position

By default, the balloon pops up at the lower right side of the client. If it would extend outside the lower screen border, it’s positioned at the upper right side. If it would extend outside the right screen border it’s shown on the lower left side of the client. If it would extend outside both the lower and the right screen border, it’s positioned at the upper left side of the client. Thus, the little arrow always points to the attached client.

OPTIONS

Balloon accepts all of the options that the Frame widget accepts. In addition, the following options are also recognized.

-initwait
Specifies the amount of time to wait without activity before popping up a help balloon. Specified in milliseconds. Defaults to 350 milliseconds. This applies to both the popped up balloon and the status bar message.

-state
Can be one of ‘balloon’, ‘status’, ‘both’ or ’none’ indicating that the help balloon, status bar help, both or none respectively should be activated when the mouse pauses over the client widget. Default is ‘both’.

-statusbar
Specifies the widget used to display the status message. This widget should accept the -text option and is typically a Label. If the widget accepts the -textvariable option and that option is defined then it is used instead of the -text option.

-balloonposition
Can be one of ‘widget’ or ‘mouse’. It controls where the balloon will popup. ‘widget’ makes the balloon appear at the lower right corner of the widget it is attached to (default), and ‘mouse’ makes the balloon appear below and to the right of the current mouse position.

-postcommand
This option takes a CODE reference which will be executed before the balloon and statusbar messages are displayed and should return a true or false value to indicate whether you want the balloon to be displayed or not. This also lets you control where the balloon is positioned by returning a true value that looks like X,Y (matches this regular expression: /^(\d+),(\d+)$/). If the postcommand returns a value that matches that re then those coordinates will be used as the position to post the balloon. Warning: this subroutine should return quickly or the balloon response will appear slow.

-cancelcommand
This option takes a CODE reference which will be executed before the balloon and statusbar messages are canceled and should return a true or false value to indicate whether you want the balloon to be canceled or not. Warning: this subroutine should return quickly or the balloon response will appear slow.

-motioncommand
This option takes a CODE reference which will be executed for any motion event and should return a true or false value to indicate whether the currently displayed balloon should be canceled (deactivated). If it returns true then the balloon will definitely be canceled, if it returns false then it may still be canceled depending the internal rules. Note: a new balloon may be posted after the -initwait time interval, use the -postcommand option to control that behavior. Warning: the subroutine should be extremely fast or the balloon response will appear slow and consume a lot of CPU time (it is executed every time the mouse moves over the widgets the balloon is attached to).

-numscreens
This option accepts an integer 1 or greater. This option should be used to avoid disjointed balloons across multiple screens in single logical sceen (SLS) mode. This only currently works in the horizontal direction. Example: If you are running dual screens in SLS mode then you would set this value to 2. Default value is 1.

METHODS

The Balloon widget supports only three non-standard methods:

attach(widget, options)

Attaches the widget indicated by widget to the help system. The allowed options are:

-statusmsg
The argument is the message to be shown on the status bar when the mouse pauses over this client. If this is not specified, but -msg is specified then the message displayed on the status bar is the same as the argument for -msg. If you give it a scalar reference then it is dereferenced before being displayed. Useful if the postcommand is used to change the message.

-balloonmsg
The argument is the message to be displayed in the balloon that will be popped up when the mouse pauses over this client. As with -statusmsg if this is not specified, then it takes its value from the -msg specification if any. If neither -balloonmsg nor -msg are specified, or they are the empty string then no balloon is popped up instead of an empty balloon. If you give it a scalar reference then it is dereferenced before being displayed. Useful if the postcommand is used to change the message.

-msg
The catch-all for -statusmsg and -balloonmsg. This is a convenient way of specifying the same message to be displayed in both the balloon and the status bar for the client.

-initwait

-state

-statusbar

-balloonposition

-postcommand

-cancelcommand

-motioncommand

These options allow you to override the balloon’s default value for those option for some of the widgets it is attached to. It accepts the same values as above and will default to the Balloon’s value.

detach(widget)

Detaches the specified widget from the help system.

destroy

Destroys the specified balloon.

ADVERTISED SUBWIDGETS

The balloon label is advertised as message.

EXAMPLES

See the balloon demo included with the widget demo script that came with the distribution for examples on various ways to use balloons.

NOTES

Because of the overhead associated with each balloon you create (from tracking the mouse movement to know when to activate and deactivate them) you will see the best performance (low CPU consumption) if you create as few balloons as possible and attach them to as many widgets as you can. In other words, don’t create a balloon for each widget you want to attach one to.

CAVEATS

Pressing any button will deactivate (cancel) the current balloon, if one exists. You can usually make the balloon reappear by moving the mouse a little. Creative use of the 3 command options can help you out also. If the mouse is over the balloon when a menu is unposted then the balloon will remain until you move off of it.

BUGS

If using balloons attached to listbox entries or canvas items in a scrolled widget, then the subwidget have to be used:

$balloon->attach($w->Subwidget(“scrolled”), -msg => …);

AUTHORS

Rajappa Iyer <[email protected]> did the original coding.

Jason A. Smith <[email protected]> added support for menus and made some other enhancements.

Slaven Rezic <[email protected]> added support for canvas items.

Gerhard Petrowitsch <[email protected]> added intelligent positioning

Jack Dunnigan <[email protected]> Made positioning more intelligent and added support for multiple monitors under single logical screen.

HISTORY

The code and documentation was derived from Balloon.tcl from the Tix4.0 distribution by Ioi Lam and modified by the above mentioned authors. This code may be redistributed under the same terms as Perl.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

832 - Linux cli command XtDisownSelection

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtDisownSelection and provides detailed information about the command XtDisownSelection, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtDisownSelection.

NAME 🖥️ XtDisownSelection 🖥️

set selection owner

SYNTAX

#include <X11/Intrinsic.h>

Boolean XtOwnSelection(Widget w, Atom selection, Time time, XtConvertSelectionProc convert_proc, XtLoseSelectionProc lose_selection, XtSelectionDoneProc done_proc);

Boolean XtOwnSelectionIncremental(Widget w, Atom selection, Time time, XtConvertSelectionIncrProc convert_callback, XtLoseSelectionIncrProc lose_callback, XtSelectionDoneIncrProc done_callback, XtCancelConvertSelectionProc cancel_callback, XtPointer client_data);

void XtDisownSelection(Widget w, Atom selection, Time time);

ARGUMENTS

convert_proc
Specifies the procedure that is to be called whenever someone requests the current value of the selection.

done_proc
Specifies the procedure that is called after the requestor has received the selection or NULL if the owner is not interested in being called back.

lose_selection
Specifies the procedure that is to be called whenever the widget has lost selection ownership or NULL if the owner is not interested in being called back.

selection
Specifies an atom that describes the type of the selection (for example, XA_PRIMARY, XA_SECONDARY, or XA_CLIPBOARD).

time
Specifies the timestamp that indicates when the selection ownership should commence or is to be relinquished.

  1. Specifies the widget that wishes to become the owner or to relinquish ownership.

DESCRIPTION

The XtOwnSelection function informs the Intrinsics selection mechanism that a widget believes it owns a selection. It returns True if the widget has successfully become the owner and False otherwise. The widget may fail to become the owner if some other widget has asserted ownership at a time later than this widget. Note that widgets can lose selection ownership either because someone else asserted later ownership of the selection or because the widget voluntarily gave up ownership of the selection. Also note that the lose_selection procedure is not called if the widget fails to obtain selection ownership in the first place.

The XtOwnSelectionIncremental procedure informs the Intrinsics incremental selection mechanism that the specified widget wishes to own the selection. It returns True if the specified widget successfully becomes the selection owner or False otherwise. For more information about selection, target, and time, see Section 2.6 of the Inter-Client Communication Conventions Manual.

A widget that becomes the selection owner using XtOwnSelectionIncremental may use XtDisownSelection to relinquish selection ownership.

The XtDisownSelection function informs the Intrinsics selection mechanism that the specified widget is to lose ownership of the selection. If the widget does not currently own the selection either because it lost the selection or because it never had the selection to begin with, XtDisownSelection does nothing.

After a widget has called XtDisownSelection, its convert procedure is not called even if a request arrives later with a timestamp during the period that this widget owned the selection. However, its done procedure will be called if a conversion that started before the call to XtDisownSelection finishes after the call to XtDisownSelection.

SEE ALSO

XtAppGetSelectionTimeout(3), XtGetSelectionValue(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

833 - Linux cli command mempcpy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mempcpy and provides detailed information about the command mempcpy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mempcpy.

NAME 🖥️ mempcpy 🖥️

copy memory area

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <string.h>
void *mempcpy(void dest[restrict .n], const void src[restrict .n],
 size_t n);
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <wchar.h>
wchar_t *wmempcpy(wchar_t dest[restrict .n],
 const wchar_t src[restrict .n],
 size_t n);

DESCRIPTION

The mempcpy() function is nearly identical to the memcpy(3) function. It copies n bytes from the object beginning at src into the object pointed to by dest. But instead of returning the value of dest it returns a pointer to the byte following the last written byte.

This function is useful in situations where a number of objects shall be copied to consecutive memory positions.

The wmempcpy() function is identical but takes wchar_t type arguments and copies n wide characters.

RETURN VALUE

dest + n.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mempcpy(), wmempcpy()

Thread safetyMT-Safe

STANDARDS

GNU.

HISTORY

glibc 2.1.

EXAMPLES

void *
combine(void *o1, size_t s1, void *o2, size_t s2)
{
    void *result = malloc(s1 + s2);
    if (result != NULL)
        mempcpy(mempcpy(result, o1, s1), o2, s2);
    return result;
}

SEE ALSO

memccpy(3), memcpy(3), memmove(3), wmemcpy(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

834 - Linux cli command XtInitialize

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtInitialize and provides detailed information about the command XtInitialize, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtInitialize.

NAME 🖥️ XtInitialize 🖥️

initialize

SYNTAX

#include <X11/Intrinsic.h>

Widget XtInitialize(const char *shell_name, const char *application_class, XrmOptionDescRec* options, Cardinal num_options, int* argc, char** argv);

ARGUMENTS

shell_name
Specifies the name of the created shell widget.

application_class
Specifies the class name of this application, which usually is the generic name for all instances of this application.

options
Specifies how to parse the command line for any application-specific resources. The options argument is passed as a parameter to XrmParseCommand. For further information, see Xlib - C Language X Interface.

num_options
Specifies the number of entries in the options list.

argc
Specifies a pointer to the number of command line parameters.

argv
Specifies the command line parameters.

DESCRIPTION

XtInitialize calls XtToolkitInitialize followed by XtOpenDisplay with display_string NULL and application_name NULL, and finally calls XtAppCreateShell with application_name NULL, widget_class applicationShellWidgetClass, and the specified args and num_args and returns the created shell. The semantics of calling XtInitialize more than once are undefined. This routine has been replaced by XtAppInitialize.

SEE ALSO

XtAppInitialize(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

835 - Linux cli command Net_DNS_SEC_EdDSApm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_SEC_EdDSApm and provides detailed information about the command Net_DNS_SEC_EdDSApm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_SEC_EdDSApm.

NAME 🖥️ Net_DNS_SEC_EdDSApm 🖥️

DNSSEC EdDSA digital signature algorithm

SYNOPSIS

require Net::DNS::SEC::EdDSA; $signature = Net::DNS::SEC::EdDSA->sign( $sigdata, $private ); $validated = Net::DNS::SEC::EdDSA->verify( $sigdata, $keyrr, $sigbin );

DESCRIPTION

Implementation of EdDSA Edwards curve digital signature generation and verification procedures.

sign

$signature = Net::DNS::SEC::EdDSA->sign( $sigdata, $private );

Generates the wire-format signature from the sigdata octet string and the appropriate private key object.

verify

$validated = Net::DNS::SEC::EdDSA->verify( $sigdata, $keyrr, $signature );

Verifies the signature over the sigdata octet string using the specified public key resource record.

ACKNOWLEDGMENT

Thanks are due to Eric Young and the many developers and contributors to the OpenSSL cryptographic library.

COPYRIGHT

Copyright (c)2014,2018 Dick Franks.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

Net::DNS, Net::DNS::SEC, RFC8032, RFC8080, OpenSSL <http://www.openssl.org/docs>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

836 - Linux cli command Text_LineFoldpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Text_LineFoldpm and provides detailed information about the command Text_LineFoldpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Text_LineFoldpm.

NAME 🖥️ Text_LineFoldpm 🖥️

Line Folding for Plain Text

SYNOPSIS

use Text::LineFold; $lf = Text::LineFold->new(); # Fold lines $folded = $lf->fold($string, PLAIN); $indented = $lf->fold( x 8, x 4, $string); # Unfold lines $unfolded = $lf->unfold($string, FIXED);

DESCRIPTION

Text::LineFold folds or unfolds lines of plain text. As it mainly focuses on plain text e-mail messages, RFC 3676 flowed format is also supported.

Public Interface

new ([KEY => VALUE, …])
Constructor. About KEY => VALUE pairs see config method.

$self->config (KEY)

$self->config ([KEY => VAL, …])

Instance method. Get or update configuration. Following KEY => VALUE pairs may be specified.

Charset => CHARSET
Character set that is used to encode string. It may be string or MIME::Charset object. Default is "UTF-8".

Language => LANGUAGE
Along with Charset option, this may be used to define language/region context. Default is "XX". See also “Context” in Unicode::LineBreak option.

Newline => STRING
String to be used for newline sequence. Default is " ".

OutputCharset => CHARSET
Character set that is used to encode result of fold()/unfold(). It may be string or MIME::Charset object. If a special value "_UNICODE_" is specified, result will be Unicode string. Default is the value of Charset option.

TabSize => NUMBER
Column width of tab stops. When 0 is specified, tab stops are ignored. Default is 8.

BreakIndent

CharMax

ColMax

ColMin

ComplexBreaking

EAWidth

HangulAsAL

LBClass

LegacyCM

Prep

Urgent

See “Options” in Unicode::LineBreak.

$self->fold (STRING, [METHOD])

$self->fold (INITIAL_TAB, SUBSEQUENT_TAB, STRING, …)

Instance method. fold() folds lines of string STRING and returns it. Surplus SPACEs and horizontal tabs at end of line are removed, newline sequences are replaced by that specified by Newline option and newline is appended at end of text if it does not exist. Horizontal tabs are treated as tab stops according to TabSize option. By the first style, following options may be specified for METHOD argument.

“FIXED”
Lines preceded by ">" won’t be folded. Paragraphs are separated by empty line.

“FLOWED”
"Format=Flowed; DelSp=Yes" formatting defined by RFC 3676.

“PLAIN”
Default method. All lines are folded.

Second style is similar to “wrap()” in Text::Wrap. All lines are folded. INITIAL_TAB is inserted at beginning of paragraphs and SUBSEQUENT_TAB at beginning of other broken lines.

$self->unfold (STRING, METHOD)
Conjunct folded paragraphs of string STRING and returns it. Following options may be specified for METHOD argument.

“FIXED”
Default method. Lines preceded by ">" won’t be conjuncted. Treat empty line as paragraph separator.

“FLOWED”
Unfold "Format=Flowed; DelSp=Yes" formatting defined by RFC 3676.

“FLOWEDSP”
Unfold "Format=Flowed; DelSp=No" formatting defined by RFC 3676.

BUGS

Please report bugs or buggy behaviors to developer.

CPAN Request Tracker: <http://rt.cpan.org/Public/Dist/Display.html?Name=Unicode-LineBreak>.

VERSION

Consult $VERSION variable.

SEE ALSO

Unicode::LineBreak, Text::Wrap.

AUTHOR

Copyright (C) 2009-2012 Hatuka*nezumi - IKEDA Soji <hatuka(at)nezumi.nu>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

837 - Linux cli command XmbufChangeWindowAttributes

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XmbufChangeWindowAttributes and provides detailed information about the command XmbufChangeWindowAttributes, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XmbufChangeWindowAttributes.

NAME 🖥️ XmbufChangeWindowAttributes 🖥️

X multibuffering functions

SYNTAX

#include <X11/extensions/multibuf.h>

Bool XmbufQueryExtension(
    Display *dpy,
    Display *dpy,
    int *event_base_return,
    int *error_base_return);

Status XmbufGetVersion(
    Display *dpy,
    int *major_version_return,
    int *minor_version_return);

int XmbufCreateBuffers(
    Display *dpy,
    Window window,
    int count,
    int update_action,
    int update_hint,
    Multibuffer *buffers_update);

void XmbufDestroyBuffers(
    Display *dpy,
    Window window);

void XmbufDisplayBuffers(
    Display *dpy,
    int count,
    Multibuffer *buffers,
    int min_delay,
    int max_delay);

Status XmbufGetWindowAttributes(
    Display *dpy,
    Window window,
    XmbufWindowAttributes *attributes);

void XmbufChangeWindowAttributes(
    Display *dpy,
    Window window,
    unsigned long valuemask,
    XmbufSetWindowAttributes *attributes);

Status XmbufGetBufferAttributes(
    Display *dpy,
    Multibuffer buffer,
    XmbufBufferAttributes *attributes);

void XmbufChangeBufferAttributes(
    Display *dpy,
    Multibuffer buffer,
    unsigned long valuemask,
    XmbufSetBufferAttributes *attributes);

Status XmbufGetScreenInfo(
    Display *dpy,
    Drawable drawable,
    int *nmono_return,
    XmbufBufferInfo **mono_info_return,
    int *nstereo_return,
    XmbufBufferInfo **stereo_info_return);

Window XmbufCreateStereoWindow(
    Display *dpy,
    Window parent,
    int x,
    int y,
    unsigned int width,
    unsigned int height,
    unsigned int border_width,
    int depth,
    unsigned int class,                 /* InputOutput, InputOnly*/
    Visual *visual,
    unsigned long valuemask,
    XSetWindowAttributes *attributes,
    Multibuffer *left_return,
    Multibuffer *right_return);

STRUCTURES

Events:

typedef struct {
    int type;   /* of event */
    unsigned long serial;       /* # of last request processed by server */
    int send_event;     /* true if this came from a SendEvent request */
    Display *display;   /* Display the event was read from */
    Multibuffer buffer; /* buffer of event */
    int state;  /* see Clobbered constants above */
} XmbufClobberNotifyEvent;

typedef struct {
    int type;   /* of event */
    unsigned long serial;       /* # of last request processed by server */
    int send_event;     /* true if this came from a SendEvent request */
    Display *display;   /* Display the event was read from */
    Multibuffer buffer; /* buffer of event */
} XmbufUpdateNotifyEvent;

Per-window attributes that can be got:

typedef struct {
    int displayed_index;	/* which buffer is being displayed */
    int update_action;	/* Undefined, Background, Untouched, Copied */
    int update_hint;	/* Frequent, Intermittent, Static */
    int window_mode;	/* Mono, Stereo */
    int nbuffers;	/* Number of buffers */
    Multibuffer *buffers;	/* Buffers */
} XmbufWindowAttributes;

Per-window attributes that can be set:

typedef struct {
    int update_hint;	/* Frequent, Intermittent, Static */
} XmbufSetWindowAttributes;

Per-buffer attributes that can be got:

typedef struct {
    Window window;	/* which window this belongs to */
    unsigned long event_mask;	/* events that have been selected */
    int buffer_index;	/* which buffer is this */
    int side;	/* Mono, Left, Right */
} XmbufBufferAttributes;

Per-buffer attributes that can be set:

typedef struct {
    unsigned long event_mask;	/* events that have been selected */
} XmbufSetBufferAttributes;

Per-screen buffer info (there will be lists of them):

typedef struct {
    VisualID visualid;	/* visual usable at this depth */
    int max_buffers;	/* most buffers for this visual */
    int depth;	/* depth of buffers to be created */
} XmbufBufferInfo;

DESCRIPTION

The application programming library for the X11 Double-Buffering, Multi-Buffering, and Stereo Extension contains the interfaces described below. With the exception of * XmbufQueryExtension *, if any of these routines are called with a display that does not support the extension, the ExtensionErrorHandler (which can be set with * XSetExtensionErrorHandler * and functions the same way as * XSetErrorHandler *) will be called and the function will then return.

* XmbufQueryExtension * returns * True * if the multibuffering/stereo extension is available on the given display. If the extension exists, the value of the first event code (which should be added to the event type constants * MultibufferClobberNotify * and * MultibufferUpdateNotify * to get the actual values) is stored into event_base_return and the value of the first error code (which should be added to the error type constant * MultibufferBadBuffer * to get the actual value) is stored into error_base_return.

* XmbufGetVersion * gets the major and minor version numbers of the extension. The return value is zero if an error occurs or non-zero if no error happens.

* XmbufCreateBuffers * requests that “count” buffers be created with the given update_action and update_hint and be associated with the indicated window. The number of buffers created is returned (zero if an error occurred) and buffers_update is filled in with that many Multibuffer identifiers.

* XmbufDestroyBuffers * destroys the buffers associated with the given window.

* XmbufDisplayBuffers * displays the indicated buffers their appropriate windows within max_delay milliseconds after min_delay milliseconds have passed. No two buffers may be associated with the same window or else a Match error is generated.

* XmbufGetWindowAttributes * gets the multibuffering attributes that apply to all buffers associated with the given window. The list of buffers returns may be freed with * XFree *. Returns non-zero on success and zero if an error occurs.

* XmbufChangeWindowAttributes * sets the multibuffering attributes that apply to all buffers associated with the given window. This is currently limited to the update_hint.

* XmbufGetBufferAttributes * gets the attributes for the indicated buffer. Returns non-zero on success and zero if an error occurs.

* XmbufChangeBufferAttributes * sets the attributes for the indicated buffer. This is currently limited to the event_mask.

* XmbufGetScreenInfo * gets the parameters controlling how mono and stereo windows may be created on the screen of the given drawable. The numbers of sets of visual and depths are returned in nmono_return and nstereo_return. If nmono_return is greater than zero, then mono_info_return is set to the address of an array of * XmbufBufferInfo * structures describing the various visuals and depths that may be used. Otherwise, mono_info_return is set to NULL. Similarly, stereo_info_return is set according to nstereo_return. The storage returned in mono_info_return and stereo_info_return may be released by * XFree *. If no errors are encounted, non-zero will be returned.

* XmbufCreateStereoWindow * creates a stereo window in the same way that * XCreateWindow * creates a mono window. The buffer ids for the left and right buffers are returned in left_return and right_return, respectively. If an extension error handler that returns is installed, * None * will be returned if the extension is not available on this display.

PREDEFINED VALUES

Update_action field:

 MultibufferUpdateActionUndefined   MultibufferUpdateActionBackground   MultibufferUpdateActionUntouched   MultibufferUpdateActionCopied 

Update_hint field:

 MultibufferUpdateHintFrequent   MultibufferUpdateHintIntermittent   MultibufferUpdateHintStatic 

Valuemask fields:

 MultibufferWindowUpdateHint   MultibufferBufferEventMask 

Mono vs. stereo and left vs. right:

 MultibufferModeMono   MultibufferModeStereo   MultibufferSideMono   MultibufferSideLeft   MultibufferSideRight 

Clobber state:

 MultibufferUnclobbered   MultibufferPartiallyClobbered   MultibufferFullyClobbered 

Event stuff:

 MultibufferClobberNotifyMask   MultibufferUpdateNotifyMask   MultibufferClobberNotify   MultibufferUpdateNotify   MultibufferNumberEvents   MultibufferBadBuffer   MultibufferNumberErrors 

BUGS

This manual page needs more work.

SEE ALSO

Extending X for Double Buffering, Multi-Buffering, and Stereo

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

838 - Linux cli command isupper_l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isupper_l and provides detailed information about the command isupper_l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isupper_l.

NAME 🖥️ isupper_l 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

839 - Linux cli command Net_DNS_RR_APLpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_APLpm and provides detailed information about the command Net_DNS_RR_APLpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_APLpm.

NAME 🖥️ Net_DNS_RR_APLpm 🖥️

DNS APL resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name IN APL aplist);

DESCRIPTION

DNS Address Prefix List (APL) record

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

aplist

@aplist = $rr->aplist; @aplist = $rr->aplist( 1:192.168.32.0/21, !1:192.168.38.0/28 ); @aplist = $rr->aplist( 1:224.0.0.0/4, 2:FF00:0:0:0:0:0:0:0/8 ); @aplist = $rr->aplist( negate => 1, family => 1, address => 192.168.38.0, prefix => 28, );

Ordered, possibly empty, list of address prefix items. Additional items, if present, are appended to the existing list with neither prefix aggregation nor reordering.

Net::DNS::RR::APL::Item

Each element of the prefix list is a Net::DNS::RR::APL::Item object which is inextricably bound to the APL record which created it.

negate

$rr->negate(1); if ( $rr->negate ) { … }

Boolean attribute indicating the prefix to be an address range exclusion.

family

$family = $rr->family; $rr->family( $family );

Address family discriminant.

prefix

$prefix = $rr->prefix; $rr->prefix( $prefix );

Number of bits comprising the address prefix.

address

$address = $object->address;

Address portion of the prefix list item.

string

$string = $object->string;

Returns the prefix list item in the form required in zone files.

COPYRIGHT

Copyright (c)2008 Olaf Kolkman, NLnet Labs.

Portions Copyright (c)2011,2017 Dick Franks.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC3123 <https://tools.ietf.org/html/rfc3123>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

840 - Linux cli command svcerr_noproc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command svcerr_noproc and provides detailed information about the command svcerr_noproc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the svcerr_noproc.

NAME 🖥️ svcerr_noproc 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

841 - Linux cli command Tk_widgetspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_widgetspm and provides detailed information about the command Tk_widgetspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_widgetspm.

NAME 🖥️ Tk_widgetspm 🖥️

preload widget classes

SYNOPSIS

use Tk::widgets qw(Button Label Frame);

DESCRIPTION

Does a ‘require Tk::Foo’ for each ‘Foo’ in the list. May speed startup by avoiding AUTOLOADs.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

842 - Linux cli command XtAddActions

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAddActions and provides detailed information about the command XtAddActions, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAddActions.

NAME 🖥️ XtAddActions 🖥️

register an action table

SYNTAX

#include <X11/Intrinsic.h>

void XtAddActions(XtActionList actions, Cardinal num_actions);

ARGUMENTS

actions
Specifies the action table to register.

num_args
Specifies the number of entries in this action table.

DESCRIPTION

XtAddActions has been replaced by XtAppAddActions.

SEE ALSO

XtAppAddActions(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

843 - Linux cli command Moose_Meta_Role_Method_Conflictingpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Role_Method_Conflictingpm and provides detailed information about the command Moose_Meta_Role_Method_Conflictingpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Role_Method_Conflictingpm.

NAME 🖥️ Moose_Meta_Role_Method_Conflictingpm 🖥️

A Moose metaclass for conflicting methods in Roles

VERSION

version 2.2207

DESCRIPTION

INHERITANCE

Moose::Meta::Role::Method::Conflicting is a subclass of Moose::Meta::Role::Method::Required.

METHODS

Moose::Meta::Role::Method::Conflicting->new(%options)

This creates a new type constraint based on the provided %options:

  • name The method name. This is required.

  • roles The list of role names that generated the conflict. This is required.

$method->name

Returns the conflicting method’s name, as provided to the constructor.

$method->roles

Returns the roles that generated this conflicting method, as provided to the constructor.

$method->roles_as_english_list

Returns the roles that generated this conflicting method as an English list.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

844 - Linux cli command XtIsVendorShell

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtIsVendorShell and provides detailed information about the command XtIsVendorShell, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtIsVendorShell.

NAME 🖥️ XtIsVendorShell 🖥️

obtain and verify a widget’s class

SYNTAX

#include <X11/Intrinsic.h>

WidgetClass XtClass(Widget w);

WidgetClass XtSuperclass(Widget w);

Boolean XtIsSubclass(Widget w, WidgetClass widget_class);

void XtCheckSubclass(Widget widget, WidgetClass widget_class, String message);

Boolean XtIsObject(Widget w);

Boolean XtIsRectObj(Widget w);

Boolean XtIsWidget(Widget w);

Boolean XtIsComposite(Widget w);

Boolean XtIsConstraint(Widget w);

Boolean XtIsShell(Widget w);

Boolean XtIsOverrideShell(Widget w);

Boolean XtIsWMShell(Widget w);

Boolean XtIsVendorShell(Widget w);

Boolean XtIsTransientShell(Widget w);

Boolean XtIsTopLevelShell(Widget w);

Boolean XtIsApplicationShell(Widget w);

Boolean XtIsSessionShell(Widget w);

ARGUMENTS

  1. Specifies the widget.

widget_class
Specifies the widget class.

message
Specifies the message that is to be used.

DESCRIPTION

The XtClass function returns a pointer to the widget’s class structure.

The XtSuperclass function returns a pointer to the widget’s superclass class structure.

The XtIsSubclass function returns True if the class of the specified widget is equal to or is a subclass of the specified class. The widget’s class can be any number of subclasses down the chain and need not be an immediate subclass of the specified class. Composite widgets that need to restrict the class of the items they contain can use XtIsSubclass to find out if a widget belongs to the desired class of objects.

The XtCheckSubclass macro determines if the class of the specified widget is equal to or is a subclass of the specified widget class. The widget can be any number of subclasses down the chain and need not be an immediate subclass of the specified widget class. If the specified widget is not a subclass, XtCheckSubclass constructs an error message from the supplied message, the widget’s actual class, and the expected class and calls XtErrorMsg. XtCheckSubclass should be used at the entry point of exported routines to ensure that the client has passed in a valid widget class for the exported operation.

XtCheckSubclass is only executed when the widget has been compiled with the compiler symbol DEBUG defined; otherwise, it is defined as the empty string and generates no code.

To test if a given widget belongs to a subclass of an Intrinsics-defined class, the Intrinsics defines macros or functions equivalent to XtIsSubclass for each of the built-in classes. These procedures are XtIsObject, XtIsRectObj, XtIsWidget, XtIsComposite, XtIsConstraint, XtIsShell, XtIsOverrideShell, XtIsWMShell, XtIsVendorShell, XtIsTransientShell, XtIsTopLevelShell, XtIsApplicationShell, and XtIsSessionShell.

The

SEE ALSO

XtAppErrorMsg(3), XtDisplay(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

845 - Linux cli command Image_ExifTool_Lang_cspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Lang_cspm and provides detailed information about the command Image_ExifTool_Lang_cspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Lang_cspm.

NAME 🖥️ Image_ExifTool_Lang_cspm 🖥️

ExifTool Czech language translations

DESCRIPTION

This file is used by Image::ExifTool to generate localized tag descriptions and values.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

ACKNOWLEDGEMENTS

Thanks to Jens Duttke and Petr Michálek for providing this translation.

SEE ALSO

Image::ExifTool (3pm), Image::ExifTool::TagInfoXML (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

846 - Linux cli command XtCreateApplicationShell

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtCreateApplicationShell and provides detailed information about the command XtCreateApplicationShell, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtCreateApplicationShell.

NAME 🖥️ XtCreateApplicationShell 🖥️

create top-level widget instance

SYNTAX

#include <X11/Intrinsic.h>

Widget XtCreateApplicationShell(const char *name, WidgetClass widget_class, ArgList args, Cardinal num_args);

ARGUMENTS

name
Specifies the name of the shell.

args
Specifies the argument list to override any other resource specifications.

num_args
Specifies the number of arguments in the argument list.

DESCRIPTION

The procedure XtCreateApplicationShell calls XtAppCreateShell with the application NULL, the application class passed to XtInitialize, and the default application context created by XtInitialize. This routine has been replaced by XtAppCreateShell.

SEE ALSO

XtAppCreateShell(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

847 - Linux cli command XtWarningMsg

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtWarningMsg and provides detailed information about the command XtWarningMsg, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtWarningMsg.

NAME 🖥️ XtWarningMsg 🖥️

high-level error handlers

SYNTAX

#include <X11/Intrinsic.h>

void XtErrorMsg(const char *name, const char *type, const char *class, const char *defaultMsg, String *params, Cardinal *num_params);

void XtSetErrorMsgHandler(XtErrorMsgHandler msg_handler);

void XtSetWarningMsgHandler(XtErrorMsgHandler msg_handler);

void XtWarningMsg(const char *name, const char *type, const char *class, const char *defaultMsg, String *params, Cardinal *num_params);

ARGUMENTS

class
Specifies the resource class of the error message.

default
Specifies the default message to use.

name
Specifies the general kind of error.

type
Specifies the detailed name of the error.

msg_handler
Specifies the new fatal error procedure, which should not return or the nonfatal error procedure, which usually returns.

num_params
Specifies the number of values in the parameter list.

params
Specifies a pointer to a list of values to be stored in the message.

DESCRIPTION

The XtErrorMsg function has been superceded by XtAppErrorMsg.

The XtSetErrorMsgHandler function has been superceded by XtAppSetErrorMsgHandler.

The XtSetWarningMsgHandler function has been superceded by XtAppSetWarningMsgHandler.

The XtWarningMsg function has been superceded by XtAppWarningMsg

SEE ALSO

XtAppErrorMsg(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

848 - Linux cli command fwrite

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fwrite and provides detailed information about the command fwrite, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fwrite.

NAME 🖥️ fwrite 🖥️

binary stream input/output

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
size_t fread(void ptr[restrict .size * .nmemb],
 size_t size, size_t nmemb,
 FILE *restrict stream);
size_t fwrite(const void ptr[restrict .size * .nmemb],
 size_t size, size_t nmemb,
 FILE *restrict stream);

DESCRIPTION

The function fread() reads nmemb items of data, each size bytes long, from the stream pointed to by stream, storing them at the location given by ptr.

The function fwrite() writes nmemb items of data, each size bytes long, to the stream pointed to by stream, obtaining them from the location given by ptr.

For nonlocking counterparts, see unlocked_stdio(3).

RETURN VALUE

On success, fread() and fwrite() return the number of items read or written. This number equals the number of bytes transferred only when size is 1. If an error occurs, or the end of the file is reached, the return value is a short item count (or zero).

The file position indicator for the stream is advanced by the number of bytes successfully read or written.

fread() does not distinguish between end-of-file and error, and callers must use feof(3) and ferror(3) to determine which occurred.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fread(), fwrite()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89.

EXAMPLES

The program below demonstrates the use of fread() by parsing /bin/sh ELF executable in binary mode and printing its magic and class:

$ ./a.out
ELF magic: 0x7f454c46
Class: 0x02

Program source

#include <stdio.h>
#include <stdlib.h>
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
int
main(void)
{
    FILE           *fp;
    size_t         ret;
    unsigned char  buffer[4];
    fp = fopen("/bin/sh", "rb");
    if (!fp) {
        perror("fopen");
        return EXIT_FAILURE;
    }
    ret = fread(buffer, sizeof(*buffer), ARRAY_SIZE(buffer), fp);
    if (ret != ARRAY_SIZE(buffer)) {
        fprintf(stderr, "fread() failed: %zu

“, ret); exit(EXIT_FAILURE); } printf(“ELF magic: %#04x%02x%02x%02x “, buffer[0], buffer[1], buffer[2], buffer[3]); ret = fread(buffer, 1, 1, fp); if (ret != 1) { fprintf(stderr, “fread() failed: %zu “, ret); exit(EXIT_FAILURE); } printf(“Class: %#04x “, buffer[0]); fclose(fp); exit(EXIT_SUCCESS); }

SEE ALSO

read(2), write(2), feof(3), ferror(3), unlocked_stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

849 - Linux cli command Text_Iconvpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Text_Iconvpm and provides detailed information about the command Text_Iconvpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Text_Iconvpm.

NAME 🖥️ Text_Iconvpm 🖥️

Perl interface to iconv() codeset conversion function

SYNOPSIS

use Text::Iconv; $converter = Text::Iconv->new(“fromcode”, “tocode”); $converted = $converter->convert(“Text to convert”);

DESCRIPTION

The Text::Iconv module provides a Perl interface to the iconv() function as defined by the Single UNIX Specification.

The convert() method converts the encoding of characters in the input string from the fromcode codeset to the tocode codeset, and returns the result.

Settings of fromcode and tocode and their permitted combinations are implementation-dependent. Valid values are specified in the system documentation; the iconv (1) utility should also provide a -l option that lists all supported codesets.

Utility methods

Text::Iconv objects also provide the following methods:

retval() returns the return value of the underlying iconv() function for the last conversion; according to the Single UNIX Specification, this value indicates “the number of non-identical conversions performed.” Note, however, that iconv implementations vary widely in the interpretation of this specification.

This method can be called after calling convert(), e.g.:

$result = $converter->convert(“lorem ipsum dolor sit amet”); $retval = $converter->retval;

When called before the first call to convert(), or if an error occured during the conversion, retval() returns undef.

get_attr(): This method is only available with GNU libiconv, otherwise it throws an exception. The get_attr() method allows you to query various attributes which influence the behavior of convert(). The currently supported attributes are trivialp, transliterate, and discard_ilseq, e.g.:

$state = $converter->get_attr(“transliterate”);

See iconvctl (3) for details. To ensure portability to other iconv implementations you should first check for the availability of this method using eval {}, e.g.:

eval { $conv->get_attr(“trivialp”) }; if ($@) { # get_attr() is not available } else { # get_attr() is available }

This method should be considered experimental.

set_attr(): This method is only available with GNU libiconv, otherwise it throws an exception. The set_attr() method allows you to set various attributes which influence the behavior of convert(). The currently supported attributes are transliterate and discard_ilseq, e.g.:

$state = $converter->set_attr(“transliterate”);

See iconvctl (3) for details. To ensure portability to other iconv implementations you should first check for the availability of this method using eval {}, cf. the description of set_attr() above.

This method should be considered experimental.

ERRORS

If the conversion can’t be initialized an exception is raised (using croak()).

Handling of conversion errors

Text::Iconv provides a class attribute raise_error and a corresponding class method for setting and getting its value. The handling of errors during conversion depends on the setting of this attribute. If raise_error is set to a true value, an exception is raised; otherwise, the convert() method only returns undef. By default raise_error is false. Example usage:

Text::Iconv->raise_error(1); # Conversion errors raise exceptions Text::Iconv->raise_error(0); # Conversion errors return undef $a = Text::Iconv->raise_error(); # Get current setting

Per-object handling of conversion errors

As an experimental feature, Text::Iconv also provides an instance attribute raise_error and a corresponding method for setting and getting its value. If raise_error is undef, the class-wide settings apply. If raise_error is 1 or 0 (true or false), the object settings override the class-wide settings.

Consult iconv (3) for details on errors that might occur.

Conversion of undef

Converting undef, e.g.,

$converted = $converter->convert(undef);

always returns undef. This is not considered an error.

NOTES

The supported codesets, their names, the supported conversions, and the quality of the conversions are all system-dependent.

AUTHOR

Michael Piotrowski <[email protected]>

SEE ALSO

iconv (1), iconv (3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

850 - Linux cli command unlockpt

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command unlockpt and provides detailed information about the command unlockpt, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the unlockpt.

NAME 🖥️ unlockpt 🖥️

unlock a pseudoterminal master/slave pair

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _XOPEN_SOURCE
#include <stdlib.h>
int unlockpt(int fd);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

unlockpt():

    Since glibc 2.24:
        _XOPEN_SOURCE >= 500
    glibc 2.23 and earlier:
        _XOPEN_SOURCE

DESCRIPTION

The unlockpt() function unlocks the slave pseudoterminal device corresponding to the master pseudoterminal referred to by the file descriptor fd.

unlockpt() should be called before opening the slave side of a pseudoterminal.

RETURN VALUE

When successful, unlockpt() returns 0. Otherwise, it returns -1 and sets errno to indicate the error.

ERRORS

EBADF
The fd argument is not a file descriptor open for writing.

EINVAL
The fd argument is not associated with a master pseudoterminal.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

unlockpt()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.1. POSIX.1-2001.

SEE ALSO

grantpt(3), posix_openpt(3), ptsname(3), pts(4), pty(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

851 - Linux cli command vsprintf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command vsprintf and provides detailed information about the command vsprintf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the vsprintf.

NAME 🖥️ vsprintf 🖥️

formatted output conversion

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int printf(const char *restrict format, ...);
int fprintf(FILE *restrict stream,
 const char *restrict format, ...);
int dprintf(int fd,
 const char *restrict format, ...);
int sprintf(char *restrict str,
 const char *restrict format, ...);
int snprintf(char str[restrict .size], size_t size,
 const char *restrict format, ...);
int vprintf(const char *restrict format, va_list ap);
int vfprintf(FILE *restrict stream,
 const char *restrict format, va_list ap);
int vdprintf(int fd,
 const char *restrict format, va_list ap);
int vsprintf(char *restrict str,
 const char *restrict format, va_list ap);
int vsnprintf(char str[restrict .size], size_t size,
 const char *restrict format, va_list ap);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

snprintf(), vsnprintf():

    _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE

dprintf(), vdprintf():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The functions in the printf() family produce output according to a format as described below. The functions printf() and vprintf() write output to stdout, the standard output stream; fprintf() and vfprintf() write output to the given output stream; sprintf(), snprintf(), vsprintf(), and vsnprintf() write to the character string str.

The function dprintf() is the same as fprintf() except that it outputs to a file descriptor, fd, instead of to a stdio(3) stream.

The functions snprintf() and vsnprintf() write at most size bytes (including the terminating null byte (‘�’)) to str.

The functions vprintf(), vfprintf(), vdprintf(), vsprintf(), vsnprintf() are equivalent to the functions printf(), fprintf(), dprintf(), sprintf(), snprintf(), respectively, except that they are called with a va_list instead of a variable number of arguments. These functions do not call the va_end macro. Because they invoke the va_arg macro, the value of ap is undefined after the call. See stdarg(3).

All of these functions write the output under the control of a format string that specifies how subsequent arguments (or arguments accessed via the variable-length argument facilities of stdarg(3)) are converted for output.

C99 and POSIX.1-2001 specify that the results are undefined if a call to sprintf(), snprintf(), vsprintf(), or vsnprintf() would cause copying to take place between objects that overlap (e.g., if the target string array and one of the supplied input arguments refer to the same buffer). See CAVEATS.

Format of the format string

The format string is a character string, beginning and ending in its initial shift state, if any. The format string is composed of zero or more directives: ordinary characters (not %), which are copied unchanged to the output stream; and conversion specifications, each of which results in fetching zero or more subsequent arguments. Each conversion specification is introduced by the character %, and ends with a conversion specifier. In between there may be (in this order) zero or more flags, an optional minimum field width, an optional precision and an optional length modifier.

The overall syntax of a conversion specification is:

%[$][flags][width][.precision][length modifier]conversion

The arguments must correspond properly (after type promotion) with the conversion specifier. By default, the arguments are used in the order given, where each ‘*’ (see Field width and Precision below) and each conversion specifier asks for the next argument (and it is an error if insufficiently many arguments are given). One can also specify explicitly which argument is taken, at each place where an argument is required, by writing “%m$” instead of ‘%’ and “*m$” instead of ‘*’, where the decimal integer m denotes the position in the argument list of the desired argument, indexed starting from 1. Thus,

printf("%*d", width, num);

and

printf("%2$*1$d", width, num);

are equivalent. The second style allows repeated references to the same argument. The C99 standard does not include the style using ‘$’, which comes from the Single UNIX Specification. If the style using ‘$’ is used, it must be used throughout for all conversions taking an argument and all width and precision arguments, but it may be mixed with “%%” formats, which do not consume an argument. There may be no gaps in the numbers of arguments specified using ‘$’; for example, if arguments 1 and 3 are specified, argument 2 must also be specified somewhere in the format string.

For some numeric conversions a radix character (“decimal point”) or thousands’ grouping character is used. The actual character used depends on the LC_NUMERIC part of the locale. (See setlocale(3).) The POSIX locale uses ‘.’ as radix character, and does not have a grouping character. Thus,

printf("%'.2f", 1234567.89);

results in “1234567.89” in the POSIX locale, in “1234567,89” in the nl_NL locale, and in “1.234.567,89” in the da_DK locale.

Flag characters

The character % is followed by zero or more of the following flags:

#
The value should be converted to an “alternate form”. For o conversions, the first character of the output string is made zero (by prefixing a 0 if it was not zero already). For x and X conversions, a nonzero result has the string “0x” (or “0X” for X conversions) prepended to it. For a, A, e, E, f, F, g, and G conversions, the result will always contain a decimal point, even if no digits follow it (normally, a decimal point appears in the results of those conversions only if a digit follows). For g and G conversions, trailing zeros are not removed from the result as they would otherwise be. For m, if errno contains a valid error code, the output of strerrorname_np(errno) is printed; otherwise, the value stored in errno is printed as a decimal number. For other conversions, the result is undefined.

0
The value should be zero padded. For d, i, o, u, x, X, a, A, e, E, f, F, g, and G conversions, the converted value is padded on the left with zeros rather than blanks. If the 0 and - flags both appear, the 0 flag is ignored. If a precision is given with an integer conversion (d, i, o, u, x, and X), the 0 flag is ignored. For other conversions, the behavior is undefined.

-
The converted value is to be left adjusted on the field boundary. (The default is right justification.) The converted value is padded on the right with blanks, rather than on the left with blanks or zeros. A - overrides a 0 if both are given.

’ ‘
(a space) A blank should be left before a positive number (or empty string) produced by a signed conversion.

+
A sign (+ or -) should always be placed before a number produced by a signed conversion. By default, a sign is used only for negative numbers. A + overrides a space if both are used.

The five flag characters above are defined in the C99 standard. The Single UNIX Specification specifies one further flag character.


For decimal conversion (i, d, u, f, F, g, G) the output is to be grouped with thousands’ grouping characters if the locale information indicates any. (See setlocale(3).) Note that many versions of gcc(1) cannot parse this option and will issue a warning. (SUSv2 did not include %‘F, but SUSv3 added it.) Note also that the default locale of a C program is “C” whose locale information indicates no thousands’ grouping character. Therefore, without a prior call to setlocale(3), no thousands’ grouping characters will be printed.

glibc 2.2 adds one further flag character.

I
For decimal integer conversion (i, d, u) the output uses the locale’s alternative output digits, if any. For example, since glibc 2.2.3 this will give Arabic-Indic digits in the Persian (“fa_IR”) locale.

Field width

An optional decimal digit string (with nonzero first digit) specifying a minimum field width. If the converted value has fewer characters than the field width, it will be padded with spaces on the left (or right, if the left-adjustment flag has been given). Instead of a decimal digit string one may write “*” or “*m$” (for some decimal integer m) to specify that the field width is given in the next argument, or in the m-th argument, respectively, which must be of type int. A negative field width is taken as a ‘-’ flag followed by a positive field width. In no case does a nonexistent or small field width cause truncation of a field; if the result of a conversion is wider than the field width, the field is expanded to contain the conversion result.

Precision

An optional precision, in the form of a period (’.’) followed by an optional decimal digit string. Instead of a decimal digit string one may write “*” or “*m$” (for some decimal integer m) to specify that the precision is given in the next argument, or in the m-th argument, respectively, which must be of type int. If the precision is given as just ‘.’, the precision is taken to be zero. A negative precision is taken as if the precision were omitted. This gives the minimum number of digits to appear for d, i, o, u, x, and X conversions, the number of digits to appear after the radix character for a, A, e, E, f, and F conversions, the maximum number of significant digits for g and G conversions, or the maximum number of characters to be printed from a string for s and S conversions.

Length modifier

Here, “integer conversion” stands for d, i, o, u, x, or X conversion.

hh
A following integer conversion corresponds to a signed char or unsigned char argument, or a following n conversion corresponds to a pointer to a signed char argument.

h
A following integer conversion corresponds to a short or unsigned short argument, or a following n conversion corresponds to a pointer to a short argument.

l
(ell) A following integer conversion corresponds to a long or unsigned long argument, or a following n conversion corresponds to a pointer to a long argument, or a following c conversion corresponds to a wint_t argument, or a following s conversion corresponds to a pointer to wchar_t argument. On a following a, A, e, E, f, F, g, or G conversion, this length modifier is ignored (C99; not in SUSv2).

ll
(ell-ell). A following integer conversion corresponds to a long long or unsigned long long argument, or a following n conversion corresponds to a pointer to a long long argument.

q
A synonym for ll. This is a nonstandard extension, derived from BSD; avoid its use in new code.

L
A following a, A, e, E, f, F, g, or G conversion corresponds to a long double argument. (C99 allows %LF, but SUSv2 does not.)

j
A following integer conversion corresponds to an intmax_t or uintmax_t argument, or a following n conversion corresponds to a pointer to an intmax_t argument.

z
A following integer conversion corresponds to a size_t or ssize_t argument, or a following n conversion corresponds to a pointer to a size_t argument.

Z
A nonstandard synonym for z that predates the appearance of z. Do not use in new code.

t
A following integer conversion corresponds to a ptrdiff_t argument, or a following n conversion corresponds to a pointer to a ptrdiff_t argument.

SUSv3 specifies all of the above, except for those modifiers explicitly noted as being nonstandard extensions. SUSv2 specified only the length modifiers h (in hd, hi, ho, hx, hX, hn) and l (in ld, li, lo, lx, lX, ln, lc, ls) and L (in Le, LE, Lf, Lg, LG).

As a nonstandard extension, the GNU implementations treats ll and L as synonyms, so that one can, for example, write llg (as a synonym for the standards-compliant Lg) and Ld (as a synonym for the standards compliant lld). Such usage is nonportable.

Conversion specifiers

A character that specifies the type of conversion to be applied. The conversion specifiers and their meanings are:

d, i
The int argument is converted to signed decimal notation. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.

o, u, x, X
The unsigned int argument is converted to unsigned octal (o), unsigned decimal (u), or unsigned hexadecimal (x and X) notation. The letters abcdef are used for x conversions; the letters ABCDEF are used for X conversions. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.

e, E
The double argument is rounded and converted in the style [-]d**.ddde**±dd where there is one digit (which is nonzero if the argument is nonzero) before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero, no decimal-point character appears. An E conversion uses the letter E (rather than e) to introduce the exponent. The exponent always contains at least two digits; if the value is zero, the exponent is 00.

f, F
The double argument is rounded and converted to decimal notation in the style [-]ddd**.**ddd, where the number of digits after the decimal-point character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. If a decimal point appears, at least one digit appears before it.

(SUSv2 does not know about F and says that character string representations for infinity and NaN may be made available. SUSv3 adds a specification for F. The C99 standard specifies “[-]inf” or “[-]infinity” for infinity, and a string starting with “nan” for NaN, in the case of f conversion, and “[-]INF” or “[-]INFINITY” or “NAN” in the case of F conversion.)

g, G
The double argument is converted in style f or e (or F or E for G conversions). The precision specifies the number of significant digits. If the precision is missing, 6 digits are given; if the precision is zero, it is treated as 1. Style e is used if the exponent from its conversion is less than -4 or greater than or equal to the precision. Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit.

a, A
(C99; not in SUSv2, but added in SUSv3) For a conversion, the double argument is converted to hexadecimal notation (using the letters abcdef) in the style [-]0xh**.hhhhp**±d; for A conversion the prefix 0X, the letters ABCDEF, and the exponent separator P is used. There is one hexadecimal digit before the decimal point, and the number of digits after it is equal to the precision. The default precision suffices for an exact representation of the value if an exact representation in base 2 exists and otherwise is sufficiently large to distinguish values of type double. The digit before the decimal point is unspecified for nonnormalized numbers, and nonzero but otherwise unspecified for normalized numbers. The exponent always contains at least one digit; if the value is zero, the exponent is 0.

c
If no l modifier is present, the int argument is converted to an unsigned char, and the resulting character is written. If an l modifier is present, the wint_t (wide character) argument is converted to a multibyte sequence by a call to the wcrtomb(3) function, with a conversion state starting in the initial state, and the resulting multibyte string is written.

s
If no l modifier is present: the const char * argument is expected to be a pointer to an array of character type (pointer to a string). Characters from the array are written up to (but not including) a terminating null byte (‘�’); if a precision is specified, no more than the number specified are written. If a precision is given, no null byte need be present; if the precision is not specified, or is greater than the size of the array, the array must contain a terminating null byte.

If an l modifier is present: the const wchar_t * argument is expected to be a pointer to an array of wide characters. Wide characters from the array are converted to multibyte characters (each by a call to the wcrtomb(3) function, with a conversion state starting in the initial state before the first wide character), up to and including a terminating null wide character. The resulting multibyte characters are written up to (but not including) the terminating null byte. If a precision is specified, no more bytes than the number specified are written, but no partial multibyte characters are written. Note that the precision determines the number of bytes written, not the number of wide characters or screen positions. The array must contain a terminating null wide character, unless a precision is given and it is so small that the number of bytes written exceeds it before the end of the array is reached.

C
(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.) Synonym for lc. Don’t use.

S
(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.) Synonym for ls. Don’t use.

p
The void * pointer argument is printed in hexadecimal (as if by %#x or %#lx).

n
The number of characters written so far is stored into the integer pointed to by the corresponding argument. That argument shall be an int *, or variant whose size matches the (optionally) supplied integer length modifier. No argument is converted. (This specifier is not supported by the bionic C library.) The behavior is undefined if the conversion specification includes any flags, a field width, or a precision.

m
(glibc extension; supported by uClibc and musl.) Print output of strerror(errno) (or strerrorname_np(errno) in the alternate form). No argument is required.

%
A ‘%’ is written. No argument is converted. The complete conversion specification is ‘%%’.

RETURN VALUE

Upon successful return, these functions return the number of bytes printed (excluding the null byte used to end output to strings).

The functions snprintf() and vsnprintf() do not write more than size bytes (including the terminating null byte (‘�’)). If the output was truncated due to this limit, then the return value is the number of characters (excluding the terminating null byte) which would have been written to the final string if enough space had been available. Thus, a return value of size or more means that the output was truncated. (See also below under CAVEATS.)

If an output error is encountered, a negative value is returned.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

printf(), fprintf(), sprintf(), snprintf(), vprintf(), vfprintf(), vsprintf(), vsnprintf()

Thread safetyMT-Safe locale

STANDARDS

fprintf()
printf()
sprintf()
vprintf()
vfprintf()
vsprintf()
snprintf()
vsnprintf()
C11, POSIX.1-2008.

dprintf()
vdprintf()
GNU, POSIX.1-2008.

HISTORY

fprintf()
printf()
sprintf()
vprintf()
vfprintf()
vsprintf()
C89, POSIX.1-2001.

snprintf()
vsnprintf()
SUSv2, C99, POSIX.1-2001.

Concerning the return value of snprintf(), SUSv2 and C99 contradict each other: when snprintf() is called with size=0 then SUSv2 stipulates an unspecified return value less than 1, while C99 allows str to be NULL in this case, and gives the return value (as always) as the number of characters that would have been written in case the output string has been large enough. POSIX.1-2001 and later align their specification of snprintf() with C99.

dprintf()
vdprintf()
GNU, POSIX.1-2008.

glibc 2.1 adds length modifiers hh, j, t, and z and conversion characters a and A.

glibc 2.2 adds the conversion character F with C99 semantics, and the flag character I.

glibc 2.35 gives a meaning to the alternate form (#) of the m conversion specifier, that is %#m.

CAVEATS

Some programs imprudently rely on code such as the following

sprintf(buf, "%s some further text", buf);

to append text to buf. However, the standards explicitly note that the results are undefined if source and destination buffers overlap when calling sprintf(), snprintf(), vsprintf(), and vsnprintf(). Depending on the version of gcc(1) used, and the compiler options employed, calls such as the above will not produce the expected results.

The glibc implementation of the functions snprintf() and vsnprintf() conforms to the C99 standard, that is, behaves as described above, since glibc 2.1. Until glibc 2.0.6, they would return -1 when the output was truncated.

BUGS

Because sprintf() and vsprintf() assume an arbitrarily long string, callers must be careful not to overflow the actual space; this is often impossible to assure. Note that the length of the strings produced is locale-dependent and difficult to predict. Use snprintf() and vsnprintf() instead (or asprintf(3) and vasprintf(3)).

Code such as printf(foo); often indicates a bug, since foo may contain a % character. If foo comes from untrusted user input, it may contain %n, causing the printf() call to write to memory and creating a security hole.

EXAMPLES

To print Pi to five decimal places:

#include <math.h>
#include <stdio.h>
fprintf(stdout, "pi = %.5f

“, 4 * atan(1.0));

To print a date and time in the form “Sunday, July 3, 10:02”, where weekday and month are pointers to strings:

#include <stdio.h>
fprintf(stdout, "%s, %s %d, %.2d:%.2d

“, weekday, month, day, hour, min);

Many countries use the day-month-year order. Hence, an internationalized version must be able to print the arguments in an order specified by the format:

#include <stdio.h>
fprintf(stdout, format,
        weekday, month, day, hour, min);

where format depends on locale, and may permute the arguments. With the value:

"%1$s, %3$d. %2$s, %4$d:%5$.2d

"

one might obtain “Sonntag, 3. Juli, 10:02”.

To allocate a sufficiently large string and print into it (code correct for both glibc 2.0 and glibc 2.1):

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
char *
make_message(const char *fmt, ...)
{
    int n = 0;
    size_t size = 0;
    char *p = NULL;
    va_list ap;
    /* Determine required size. */
    va_start(ap, fmt);
    n = vsnprintf(p, size, fmt, ap);
    va_end(ap);
    if (n < 0)
        return NULL;
    size = (size_t) n + 1;      /* One extra byte for '' */
    p = malloc(size);
    if (p == NULL)
        return NULL;
    va_start(ap, fmt);
    n = vsnprintf(p, size, fmt, ap);
    va_end(ap);
    if (n < 0) {
        free(p);
        return NULL;
    }
    return p;
}

If truncation occurs in glibc versions prior to glibc 2.0.6, this is treated as an error instead of being handled gracefully.

SEE ALSO

printf(1), asprintf(3), puts(3), scanf(3), setlocale(3), strfromd(3), wcrtomb(3), wprintf(3), locale(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

852 - Linux cli command IO_All_Stringpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_All_Stringpm and provides detailed information about the command IO_All_Stringpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_All_Stringpm.

NAME 🖥️ IO_All_Stringpm 🖥️

String Support for IO::All

SYNOPSIS

See IO::All.

DESCRIPTION

<<<cpan-foot>>>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

853 - Linux cli command XeviGetVisualInfo

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XeviGetVisualInfo and provides detailed information about the command XeviGetVisualInfo, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XeviGetVisualInfo.

NAME 🖥️ XeviGetVisualInfo 🖥️

X Extended Visual Information functions

SYNOPSIS

#include <X11/extensions/XEVI.h>

Bool XeviQueryExtension (Display *dpy);

Bool XeviQueryVersion (Display *dpy, int *major_version_return, int *minor_version_return);

int XeviGetVisualInfo (Display *dpy, VisualID *visual, int n_visual, ExtendedVisualInfo ** evi_return, int * n_info_return);

DESCRIPTION

The X11 Extended Visual Information extension (EVI) allows a client to determine information about core X visuals beyond what the core protocol provides.

The EVI application programming library contains the interfaces described below. With the exception of XeviQueryExtension, if any of these routines are called with a display that does not support the extension, the ExtensionErrorHandler (which can be set with XSetExtensionErrorHandler and functions the same way as XSetErrorHandler) will be called and the function will then return.

XeviQueryExtension returns True if the Extended Visual Information extension is available on the given display. A client must call XeviQueryExtension before calling any other EVI function in order to negotiate a compatible protocol version; otherwise the client will get undefined behavior (EVI may or may not work).

XeviQueryVersion returns True if the request succeeded; the values of the major and minor protocol version supported by the server are returned in major_version_return and minor_version_return.

XeviGetVisualInfo returns a list of ExtendedVisualInfo structures that describe visual information beyond that supported by the core protocol. This includes layer information relevant for systems supporting overlays and/or underlay planes, and information that allows applications better to determine the level of hardware support for multiple colormaps. XeviGetVisualInfo returns Success if successful, or an X error otherwise. If the argument visual is NULL, then information for all visuals of all screens is returned. Otherwise, it’s a pointer to a list of visuals for which extended visual information is desired. n_visual is the number of elements in the array visual. evi_return returns a pointer to a list of ExtendedVisualInfo. When done, the client should free the list using XFree. n_info_return returns the number of elements in the array evi_return.

The ExtendedVisualInfo structure has the following fields:

VisualID	core_visual_id
int 	screen
int 	level
unsigned int	transparency_type
unsigned int	transparency_value
unsigned int	min_hw_colormaps
unsigned int	max_hw_colormaps
unsigned int	num_colormap_conflicts
VisualID *  	colormap_conflicts

The combination of core_visual_id and screen number uniquely specify the visual being described.

level returns the level number for the visual, 0 for normal planes, > 0 for overlays, < 0 for underlays.

transparency_type returns the type of transparency supported by the visual. XEVI_TRANSPARENCY_NONE if there are no transparent pixels, XEVI_TRANSPARENCY_PIXEL if the visual supports a transparent pixel, XEVI_TRANSPARENCY_MASK if the visual supports transparent plane(s).

transparency_value returns the pixel/plane value to set for transparency if transparency_type isn’t XEVI_TRANSPARENCY_NONE.

min_hw_colormaps and max_hw_colormaps return the minimum and maximum number of hardware colormaps backing up the visual.

num_colormap_conflicts returns the number of elements in colormap_conflicts. This array returns a list of visuals that may cause conflicts in the use of the hardware colormap. For example, if a 12-bit hardware colormap is overloaded to support 8-bit colormaps, the corresponding 8-bit visuals would conflict with the 12-bit visuals.

ERRORS

XeviGetVisualInfo will return BadValue if passed an illegal visual ID, BadAccess if the X server does not respond, BadAlloc if there is a memory allocation failure.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

854 - Linux cli command Image_ExifTool_Vorbispm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Vorbispm and provides detailed information about the command Image_ExifTool_Vorbispm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Vorbispm.

NAME 🖥️ Image_ExifTool_Vorbispm 🖥️

Read Ogg Vorbis audio meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to extract meta information from Ogg Vorbis audio headers.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.xiph.org/vorbis/doc/>

<http://flac.sourceforge.net/ogg_mapping.html>

<http://www.theora.org/doc/Theora.pdf>

SEE ALSO

“Vorbis Tags” in Image::ExifTool::TagNames, “Ogg Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

855 - Linux cli command Tk_Scalepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Scalepm and provides detailed information about the command Tk_Scalepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Scalepm.

NAME 🖥️ Tk_Scalepm 🖥️

Create and manipulate Scale widgets

SYNOPSIS

$scale = $parent->Scale(?options?);

STANDARD OPTIONS

-activebackground -font -highlightthickness -repeatinterval -background -foreground -orient -takefocus -borderwidth -highlightbackground -relief -troughcolor -cursor -highlightcolor -repeatdelay

See Tk::options for details of the standard options.

WIDGET-SPECIFIC OPTIONS

Name: bigIncrement

Class: BigIncrement

Switch: -bigincrement

Some interactions with the scale cause its value to change by ``large’’ increments; this option specifies the size of the large increments. If specified as 0, the large increments default to 1/10 the range of the scale.

Name: command

Class: Command

Switch: -command

Specifies the prefix of a perl/Tk callback to invoke whenever the scale’s value is changed via a method. The actual command consists of this option followed by a space and a real number indicating the new value of the scale.

Name: digits

Class: Digits

Switch: -digits

An integer specifying how many significant digits should be retained when converting the value of the scale to a string. If the number is less than or equal to zero, then the scale picks the smallest value that guarantees that every possible slider position prints as a different string.

Name: from

Class: From

Switch: -from

A real value corresponding to the left or top end of the scale.

Name: label

Class: Label

Switch: -label

A string to display as a label for the scale. For vertical scales the label is displayed just to the right of the top end of the scale. For horizontal scales the label is displayed just above the left end of the scale. If the option is specified as an empty string, no label is displayed.

Name: length

Class: Length

Switch: -length

Specifies the desired long dimension of the scale in screen units (i.e. any of the forms acceptable to Tk_GetPixels). For vertical scales this is the scale’s height; for horizontal scales it is the scale’s width.

Name: resolution

Class: Resolution

Switch: -resolution

A real value specifying the resolution for the scale. If this value is greater than zero then the scale’s value will always be rounded to an even multiple of this value, as will tick marks and the endpoints of the scale. If the value is less than zero then no rounding occurs. Defaults to 1 (i.e., the value will be integral).

Name: showValue

Class: ShowValue

Switch: -showvalue

Specifies a boolean value indicating whether or not the current value of the scale is to be displayed.

Name: sliderLength

Class: SliderLength

Switch: -sliderlength

Specfies the size of the slider, measured in screen units along the slider’s long dimension. The value may be specified in any of the forms acceptable to Tk_GetPixels.

Name: sliderRelief

Class: SliderRelief

Switch: -sliderrelief

Specifies the relief to use when drawing the slider, such as raised or sunken.

Name: state

Class: State

Switch: -state

Specifies one of three states for the scale: normal, active, or disabled. If the scale is disabled then the value may not be changed and the scale won’t activate. If the scale is active, the slider is displayed using the color specified by the activeBackground option.

Name: tickInterval

Class: TickInterval

Switch: -tickinterval

Must be a real value. Determines the spacing between numerical tick marks displayed below or to the left of the slider. If 0, no tick marks will be displayed.

Name: to

Class: To

Switch: -to

Specifies a real value corresponding to the right or bottom end of the scale. This value may be either less than or greater than the from option.

Name: variable

Class: Variable

Switch: -variable

Specifies the name of a global variable to link to the scale. Whenever the value of the variable changes, the scale will update to reflect this value. Whenever the scale is manipulated interactively, the variable will be modified to reflect the scale’s new value.

Name: width

Class: Width

Switch: -width

Specifies the desired narrow dimension of the trough in screen units (i.e. any of the forms acceptable to Tk_GetPixels). For vertical scales this is the trough’s width; for horizontal scales this is the trough’s height.

DESCRIPTION

The Scale method creates a new window (given by the $widget argument) and makes it into a scale widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the scale such as its colors, orientation, and relief. The scale command returns its $widget argument. At the time this command is invoked, there must not exist a window named $widget, but $widget’s parent must exist.

A scale is a widget that displays a rectangular trough and a small slider. The trough corresponds to a range of real values (determined by the from, to, and resolution options), and the position of the slider selects a particular real value. The slider’s position (and hence the scale’s value) may be adjusted with the mouse or keyboard as described in the “BINDINGS” section below. Whenever the scale’s value is changed, a Tcl command is invoked (using the command option) to notify other interested widgets of the change. In addition, the value of the scale can be linked to a Tcl variable (using the variable option), so that changes in either are reflected in the other.

Three annotations may be displayed in a scale widget: a label appearing at the top right of the widget (top left for horizontal scales), a number displayed just to the left of the slider (just above the slider for horizontal scales), and a collection of numerical tick marks just to the left of the current value (just below the trough for horizontal scales). Each of these three annotations may be enabled or disabled using the configuration options.

WIDGET METHODS

The Scale method creates a widget object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class.

The following additional methods are available for scale widgets:

$scale->coords(?value?)
Returns a list whose elements are the x and y coordinates of the point along the centerline of the trough that corresponds to value. If value is omitted then the scale’s current value is used.

$scale->get(?x, y?)
If x and y are omitted, returns the current value of the scale. If x and y are specified, they give pixel coordinates within the widget; the command returns the scale value corresponding to the given pixel. Only one of x or y is used: for horizontal scales y is ignored, and for vertical scales x is ignored.

$scale->identify(x, y)
Returns a string indicating what part of the scale lies under the coordinates given by x and y. A return value of slider means that the point is over the slider; trough1 means that the point is over the portion of the slider above or to the left of the slider; and trough2 means that the point is over the portion of the slider below or to the right of the slider. If the point isn’t over one of these elements, an empty string is returned.

$scale->set(value)
This command is invoked to change the current value of the scale, and hence the position at which the slider is displayed. Value gives the new value for the scale. The command has no effect if the scale is disabled.

BINDINGS

Tk automatically creates class bindings for scales that give them the following default behavior. Where the behavior is different for vertical and horizontal scales, the horizontal behavior is described in parentheses.

[1]
If button 1 is pressed in the trough, the scale’s value will be incremented or decremented by the value of the resolution option so that the slider moves in the direction of the cursor. If the button is held down, the action auto-repeats.

[2]
If button 1 is pressed over the slider, the slider can be dragged with the mouse.

[3]
If button 1 is pressed in the trough with the Control key down, the slider moves all the way to the end of its range, in the direction towards the mouse cursor.

[4]
If button 2 is pressed, the scale’s value is set to the mouse position. If the mouse is dragged with button 2 down, the scale’s value changes with the drag.

[5]
The Up and Left keys move the slider up (left) by the value of the resolution option.

[6]
The Down and Right keys move the slider down (right) by the value of the resolution option.

[7]
Control-Up and Control-Left move the slider up (left) by the value of the bigIncrement option.

[8]
Control-Down and Control-Right move the slider down (right) by the value of the bigIncrement option.

[9]
Home moves the slider to the top (left) end of its range.

[10]
End moves the slider to the bottom (right) end of its range. If the scale is disabled using the state option then none of the above bindings have any effect. The behavior of scales can be changed by defining new bindings for individual widgets or by redefining the class bindings.

KEYWORDS

scale, slider, trough, widget

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

856 - Linux cli command XShapeQueryExtension

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XShapeQueryExtension and provides detailed information about the command XShapeQueryExtension, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XShapeQueryExtension.

NAME 🖥️ XShapeQueryExtension 🖥️

X nonrectangular shape functions

SYNTAX

#include <X11/extensions/shape.h>
Bool XShapeQueryExtension (
	Display *dpy,
	int *event_basep,
	int *error_basep);
Status XShapeQueryVersion (
	Display *dpy,
	int *major_versionp,
	int *minor_versionp);
void XShapeCombineRegion (
	Display *dpy,
	Window dest,
	int destKind,
	int xOff,
	int yOff,
	struct _XRegion *r,
	int op);
void XShapeCombineRectangles (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	XRectangle *rects,
	int n_rects,
	int op,
	int ordering);
void XShapeCombineMask (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	Pixmap src,
	int op);
void XShapeCombineShape (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	Pixmap src,
	int srcKind,
	int op);
void XShapeOffsetShape (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff);
Status XShapeQueryExtents (
	Display *dpy,
	Window window,
	int *bShaped,
	int *xbs,
	int *ybs,
	unsigned int *wbs,
	unsigned int *hbs,
	int *cShaped,
	int *xcs,
	int *ycs,
	unsigned int *wcs,
	unsigned int *hcs);
void XShapeSelectInput (
	Display *dpy,
	Window window,
	unsigned longmask);
unsigned long XShapeInputSelected (
	Display *dpy,
	Window window);
XRectangle *XShapeGetRectangles (
	Display *dpy,
	Window window,
	int kind,
	int *count,
	int *ordering);

STRUCTURES

typedef struct {
    int type;	/* of event */
    unsigned long serial;	/* # of last request processed by server */
    Bool send_event;	/* true if this came from a SendEvent request */
    Display *display;	/* Display the event was read from */
    Window window;	/* window of event */
    int kind;	/* ShapeBounding or ShapeClip */
    int x, y;	/* extents of new region */
    unsigned width, height;
    Time time;	/* server timestamp when region changed */
    Bool shaped;	/* true if the region exists */
} XShapeEvent;

DESCRIPTION

The X11 Nonrectangular Window Shape Extension adds nonrectangular windows to the X Window System.

PREDEFINED VALUES

Operations:

 ShapeSet   ShapeUnion   ShapeIntersect   ShapeSubtract   ShapeInvert 

Shape Kinds:

 ShapeBounding   ShapeClip 

Event defines:

 ShapeNotifyMask   ShapeNotify 

BUGS

This manual page needs a lot more work.

SEE ALSO

X11 Nonrectangular Window Shape Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

857 - Linux cli command LIST_EMPTY

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LIST_EMPTY and provides detailed information about the command LIST_EMPTY, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LIST_EMPTY.

NAME 🖥️ LIST_EMPTY 🖥️

implementation of a doubly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
LIST_ENTRY(TYPE);
LIST_HEAD(HEADNAME, TYPE);
LIST_HEAD LIST_HEAD_INITIALIZER(LIST_HEAD head);
void LIST_INIT(LIST_HEAD *head);
int LIST_EMPTY(LIST_HEAD *head);
void LIST_INSERT_HEAD(LIST_HEAD *head,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
struct TYPE *LIST_FIRST(LIST_HEAD *head);
struct TYPE *LIST_NEXT(struct TYPE *elm, LIST_ENTRY NAME);
LIST_FOREACH(struct TYPE *var, LIST_HEAD *head, LIST_ENTRY NAME);
void LIST_REMOVE(struct TYPE *elm, LIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type LIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro LIST_HEAD().

Creation

A list is headed by a structure defined by the LIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are doubly linked so that an arbitrary element can be removed without traversing the list. New elements can be added to the list after an existing element, before an existing element, or at the head of the list. A LIST_HEAD structure is declared as follows:

LIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

LIST_ENTRY() declares a structure that connects the elements in the list.

LIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

LIST_INIT() initializes the list referenced by head.

LIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

LIST_INSERT_HEAD() inserts the new element elm at the head of the list.

LIST_INSERT_BEFORE() inserts the new element elm before the element listelm.

LIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

LIST_FIRST() returns the first element in the list, or NULL if the list is empty.

LIST_NEXT() returns the next element in the list, or NULL if this is the last.

LIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

LIST_REMOVE() removes the element elm from the list.

RETURN VALUE

LIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

LIST_FIRST(), and LIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

LIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

LIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. LIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    LIST_ENTRY(entry) entries;              /* List */
};
LIST_HEAD(listhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct listhead head;                   /* List head */
    int i;
    LIST_INIT(&head);                       /* Initialize the list */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    LIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    LIST_INSERT_AFTER(n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    LIST_INSERT_BEFORE(n2, n3, entries);
    i = 0;                                  /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        np->data = i++;
    LIST_REMOVE(n2, entries);               /* Deletion */
    free(n2);
                                            /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* List deletion */ n1 = LIST_FIRST(&head); while (n1 != NULL) { n2 = LIST_NEXT(n1, entries); free(n1); n1 = n2; } LIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

858 - Linux cli command Mail_Mailerpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Mail_Mailerpm and provides detailed information about the command Mail_Mailerpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Mail_Mailerpm.

NAME 🖥️ Mail_Mailerpm 🖥️

send simple emails

INHERITANCE

Mail::Mailer is an IO::Handle

SYNOPSIS

use Mail::Mailer; use Mail::Mailer qw(mail); # specifies default mailer $mailer = Mail::Mailer->new; $mailer = Mail::Mailer->new($type, @args); $mailer->open(\headers); print $mailer $body; $mailer->close or die “couldnt send whole message: $! “;

DESCRIPTION

Sends mail using any of the built-in methods. As TYPE argument to new(), you can specify any of

“sendmail”
Use the sendmail program to deliver the mail.

“smtp”
Use the smtp protocol via Net::SMTP to deliver the mail. The server to use can be specified in @args with $mailer = Mail::Mailer->new(smtp, Server => $server); The smtp mailer does not handle Cc and Bcc lines, neither their Resent-* fellows. The Debug options enables debugging output from Net::SMTP. [added 2.21] You may also use the StartTLS => 1 options to upgrade the connection with STARTTLS. You need libnet version 1.28 (2014) for this to work. You may also use the Auth => [ $user, $password ] option for SASL authentication. To make this work, you have to install the Authen::SASL distribution yourself: it is not automatically installed.

“smtps”
This option is deprecated when you have libnet 1.28 (2014) and above. Use the smtp over ssl protocol via Net::SMTP::SSL to deliver the mail. Usage is identical to smtp. You have to install Authen::SASL as well. $mailer = Mail::Mailer->new(smtps, Server => $server);

“qmail”
Use qmail’s qmail-inject program to deliver the mail.

“testfile”
Used for debugging, this displays the data to the file named in $Mail::Mailer::testfile::config{outfile} which defaults to a file named mailer.testfile. No mail is ever sent.

Mail::Mailer will search for executables in the above order. The default mailer will be the first one found.

METHODS

Constructors

Mail::Mailer->new($type, %options)
The $type is one of the back-end sender implementations, as described in the DESCRIPTION chapter of this manual page. The %options are passed to that back-end.

$obj->open(HASH)
The HASH consists of key and value pairs, the key being the name of the header field (eg, To), and the value being the corresponding contents of the header field. The value can either be a scalar (eg, [email protected]) or a reference to an array of scalars (eg, [[email protected], [email protected]]).

DETAILS

ENVIRONMENT VARIABLES

PERL_MAILERS
Augments/override the build in choice for binary used to send out our mail messages. Format: “type1:mailbinary1;mailbinary2;…:type2:mailbinaryX;…:…” Example: assume you want you use private sendmail binary instead of mailx, one could set PERL_MAILERS to: “mail:/does/not/exists:sendmail:$HOME/test/bin/sendmail” On systems which may include : in file names, use | as separator between type-groups. “mail:c:/does/not/exists|sendmail:$HOME/test/bin/sendmail”

BUGS

Mail::Mailer does not help with folding, and does not protect against various web-script hacker attacks, for instance where a new-line is inserted in the content of the field.

SEE ALSO

This module is part of the MailTools distribution, http://perl.overmeer.net/mailtools/.

AUTHORS

The MailTools bundle was developed by Graham Barr. Later, Mark Overmeer took over maintenance without commitment to further development.

Mail::Cap by Gisle Aas <[email protected]>. Mail::Field::AddrList by Peter Orbaek <[email protected]>. Mail::Mailer and Mail::Send by Tim Bunce <[email protected]>. For other contributors see ChangeLog.

LICENSE

Copyrights 1995-2000 Graham Barr <[email protected]> and 2001-2017 Mark Overmeer <[email protected]>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

859 - Linux cli command Net_DNS_RR_NIDpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_NIDpm and provides detailed information about the command Net_DNS_RR_NIDpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_NIDpm.

NAME 🖥️ Net_DNS_RR_NIDpm 🖥️

DNS NID resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name IN NID preference nodeid); $rr = Net::DNS::RR->new( name => example.com, type => NID, preference => 10, nodeid => 8:800:200C:417A );

DESCRIPTION

Class for DNS Node Identifier (NID) resource records.

The Node Identifier (NID) DNS resource record is used to hold values for Node Identifiers that will be used for ILNP-capable nodes.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

preference

$preference = $rr->preference; $rr->preference( $preference );

A 16 bit unsigned integer in network byte order that indicates the relative preference for this NID record among other NID records associated with this owner name. Lower values are preferred over higher values.

nodeid

$nodeid = $rr->nodeid;

The NodeID field is an unsigned 64-bit value in network byte order. The text representation uses the same syntax (i.e., groups of 4 hexadecimal digits separated by a colons) that is already used for IPv6 interface identifiers.

COPYRIGHT

Copyright (c)2012 Dick Franks.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC6742 <https://tools.ietf.org/html/rfc6742>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

860 - Linux cli command sockaddrtype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sockaddrtype and provides detailed information about the command sockaddrtype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sockaddrtype.

NAME 🖥️ sockaddrtype 🖥️

socket address

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/socket.h>
struct sockaddr {
 sa_family_t sa_family; /* Address family */
 char sa_data[]; /* Socket address */
};
struct sockaddr_storage {
 sa_family_t ss_family; /* Address family */
};
typedef /* ... */ socklen_t;
typedef /* ... */ sa_family_t;

Internet domain sockets

#include <netinet/in.h>
struct sockaddr_in {
 sa_family_t sin_family; /* AF_INET */
 in_port_t sin_port; /* Port number */
 struct in_addr sin_addr; /* IPv4 address */
};
struct sockaddr_in6 {
 sa_family_t sin6_family; /* AF_INET6 */
 in_port_t sin6_port; /* Port number */
 uint32_t sin6_flowinfo; /* IPv6 flow info */
 struct in6_addr sin6_addr; /* IPv6 address */
 uint32_t sin6_scope_id; /* Set of interfaces for a scope */
};
struct in_addr {
 in_addr_t s_addr;
};
struct in6_addr {
 uint8_t s6_addr[16];
};
typedef uint32_t in_addr_t;
typedef uint16_t in_port_t;

UNIX domain sockets

#include <sys/un.h>
struct sockaddr_un {
 sa_family_t sun_family; /* Address family */
 char sun_path[]; /* Socket pathname */
};

DESCRIPTION

sockaddr
Describes a socket address.

sockaddr_storage
A structure at least as large as any other sockaddr_* address structures. It’s aligned so that a pointer to it can be cast as a pointer to other sockaddr_* structures and used to access its fields.

socklen_t
Describes the length of a socket address. This is an integer type of at least 32 bits.

sa_family_t
Describes a socket’s protocol family. This is an unsigned integer type.

Internet domain sockets

sockaddr_in
Describes an IPv4 Internet domain socket address. The sin_port and sin_addr members are stored in network byte order.

sockaddr_in6
Describes an IPv6 Internet domain socket address. The sin6_addr.s6_addr array is used to contain a 128-bit IPv6 address, stored in network byte order.

UNIX domain sockets

sockaddr_un
Describes a UNIX domain socket address.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

socklen_t was invented by POSIX. See also accept(2).

These structures were invented before modern ISO C strict-aliasing rules. If aliasing rules are applied strictly, these structures would be extremely difficult to use without invoking Undefined Behavior. POSIX Issue 8 will fix this by requiring that implementations make sure that these structures can be safely used as they were designed.

NOTES

socklen_t is also defined in <netdb.h>.

sa_family_t is also defined in <netinet/in.h> and <sys/un.h>.

SEE ALSO

accept(2), bind(2), connect(2), getpeername(2), getsockname(2), getsockopt(2), sendto(2), setsockopt(2), socket(2), socketpair(2), getaddrinfo(3), gethostbyaddr(3), getnameinfo(3), htonl(3), ipv6(7), socket(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

861 - Linux cli command XtGetResourceList

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGetResourceList and provides detailed information about the command XtGetResourceList, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGetResourceList.

NAME 🖥️ XtGetResourceList 🖥️

obtain resource list

SYNTAX

#include <X11/Intrinsic.h>

void XtGetResourceList(WidgetClass class, XtResourceList *resources_return, Cardinal *num_resources_return);

void XtGetConstraintResourceList(WidgetClass class, XtResourceList *resources_return, Cardinal *num_resources_return);

ARGUMENTS

num_resources_return
Specifies a pointer to where to store the number of entries in the resource list.

resources_return
Specifies a pointer to where to store the returned resource list. The caller must free this storage using XtFree when done with it.

widget_class
Specifies the widget class for which you want the list.

DESCRIPTION

If XtGetResourceList is called before the widget class is initialized (that is, before the first widget of that class has been created), XtGetResourceList returns the resource list as specified in the widget class record. If it is called after the widget class has been initialized, XtGetResourceList returns a merged resource list that contains the resources for all superclasses. The list returned by XtGetResourceList should be freed using XtFree when it is no longer needed.

If XtGetConstraintResourceList is called before the widget class is initialized (that is, before the first widget of that class has been created), XtGetConstraintResourceList returns the resource list as specified in the widget class Constraint part record. If it is called after the widget class has been initialized, XtGetConstraintResourceList returns a merged resource list that contains the Constraint resources for all superclasses. If the specified class is not a subclass of constraintWidgetClass, *resources_return is set to NULL and *num_resources_return is set to zero. The list returned by XtGetConstraintResourceList should be freed using XtFree when it is no longer needed.

SEE ALSO

XtGetSubresources(3), XtOffset(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

862 - Linux cli command lutimes

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lutimes and provides detailed information about the command lutimes, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lutimes.

NAME 🖥️ lutimes 🖥️

change file timestamps

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/time.h>
int futimes(int fd, const struct timeval tv[2]);
int lutimes(const char *filename, const struct timeval tv[2]);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

futimes(), lutimes():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

futimes() changes the access and modification times of a file in the same way as utimes(2), with the difference that the file whose timestamps are to be changed is specified via a file descriptor, fd, rather than via a pathname.

lutimes() changes the access and modification times of a file in the same way as utimes(2), with the difference that if filename refers to a symbolic link, then the link is not dereferenced: instead, the timestamps of the symbolic link are changed.

RETURN VALUE

On success, zero is returned. On error, -1 is returned, and errno is set to indicate the error.

ERRORS

Errors are as for utimes(2), with the following additions for futimes():

EBADF
fd is not a valid file descriptor.

ENOSYS
The /proc filesystem could not be accessed.

The following additional error may occur for lutimes():

ENOSYS
The kernel does not support this call; Linux 2.6.22 or later is required.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

futimes(), lutimes()

Thread safetyMT-Safe

STANDARDS

Linux, BSD.

HISTORY

futimes()
glibc 2.3.

lutimes()
glibc 2.6.

NOTES

lutimes() is implemented using the utimensat(2) system call.

SEE ALSO

utime(2), utimensat(2), symlink(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

863 - Linux cli command XtGetKeysymTable

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGetKeysymTable and provides detailed information about the command XtGetKeysymTable, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGetKeysymTable.

NAME 🖥️ XtGetKeysymTable 🖥️

query keysyms and keycodes

SYNTAX

#include <X11/Intrinsic.h>

KeySym* XtGetKeysymTable(Display* display, KeyCode* min_keycode_return, int *keysyms_per_keycode_return);

void XtKeysymToKeycodeList(Display* display, KeySym keysym, KeyCode** keycodes_return, Cardinal* keycount_return);

ARGUMENTS

display
Specifies the display whose table is required.

min_keycode_return
Returns the minimum KeyCode valid for the display.

keysyms_per_keycode_return
Returns the number of KeySyms stored for each KeyCode.

keysym
Specifies the KeySym for which to search.

keycodes_return
Returns a list of KeyCodes that have keysym associated with them, or NULL if keycount_return is 0.

keycount_return
Returns the number of KeyCodes in the keycode list.

DESCRIPTION

XtGetKeysymTable returns a pointer to the Intrinsics’ copy of the server’s KeyCode-to-KeySym table. This table must not be modified.

The XtKeysymToKeycodeList procedure returns all the KeyCodes that have keysym in their entry for the keyboard mapping table associated with display. The caller should free the storage pointed to by keycodes_return using XtFree when it is no longer useful.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

864 - Linux cli command Image_ExifTool_Microsoftpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Microsoftpm and provides detailed information about the command Image_ExifTool_Microsoftpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Microsoftpm.

NAME 🖥️ Image_ExifTool_Microsoftpm 🖥️

Definitions for custom Microsoft tags

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret Microsoft-specific EXIF and XMP tags, and routines to read/write Microsoft Xtra tags in videos.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://research.microsoft.com/en-us/um/redmond/groups/ivm/hdview/hdmetadataspec.htm>

SEE ALSO

“Microsoft Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

865 - Linux cli command Mail_Internetpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Mail_Internetpm and provides detailed information about the command Mail_Internetpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Mail_Internetpm.

NAME 🖥️ Mail_Internetpm 🖥️

manipulate email messages

SYNOPSIS

use Mail::Internet; my $msg = Mail::Internet->new(\STDIN);

DESCRIPTION

This package implements reading, creating, manipulating, and writing email messages. Sometimes, the implementation tries to be too smart, but in the general case it works as expected.

If you start writing a new application, you should use the Mail::Box distribution, which has more features and handles messages much better according to the RFCs. See <http://perl.overmeer.net/mailbox/>. You may also chose MIME::Entity, to get at least some multipart support in your application.

METHODS

Constructors

$obj->dup()
Duplicate the message as a whole. Both header and body will be deep-copied: a new Mail::Internet object is returned.

$obj->extract(\lines)
Extract header and body from an ARRAY of message lines. Requires an object already created with new(), which contents will get overwritten.

$obj->new( [$arg], [%options] )

Mail::Internet->new( [$arg], [%options] )

$arg is optional and may be either a file descriptor (reference to a GLOB) or a reference to an array. If given the new object will be initialized with headers and body either from the array of read from the file descriptor. The Mail::Header::new() %options Modify, MailFrom and FoldLength may also be given. -Option–Default Body [] Header undef

Body => ARRAY-of-LINES
The value of this option should be a reference to an array which contains the lines for the body of the message. Each line should be terminated with (LF). If Body is given then Mail::Internet will not attempt to read the body from $arg (even if it is specified).

Header => Mail::Header
The value of this option should be a Mail::Header object. If given then Mail::Internet will not attempt to read a mail header from $arg, if it was specified.

$obj->read($fh)
Read a message from the $fh into an already existing message object. Better use new() with the $fh as first argument.

Accessors

$obj->body( [$body] )
Returns the body of the message. This is a reference to an array. Each entry in the array represents a single line in the message. If $body is given, it can be a reference to an array or an array, then the body will be replaced. If a reference is passed, it is used directly and not copied, so any subsequent changes to the array will change the contents of the body.

$obj->head()
Returns the Mail::Header object which holds the headers for the current message

Processing the message as a whole

$obj->as_mbox_string( [$already_escaped] )
Returns the message as a string in mbox format. $already_escaped, if given and true, indicates that escape_from() has already been called on this object.

$obj->as_string()
Returns the message as a single string.

$obj->print( [$fh] )
Print the header, body or whole message to file descriptor $fh. $fd should be a reference to a GLOB. If $fh is not given the output will be sent to STDOUT. example: $mail->print( \STDOUT ); # Print message to STDOUT

$obj->print_body( [$fh] )
Print only the body to the $fh (default STDOUT).

$obj->print_header( [$fh] )
Print only the header to the $fh (default STDOUT).

Processing the header

Most of these methods are simply wrappers around methods provided by Mail::Header.

$obj->add(PAIRS)
The PAIRS are field-name and field-content. For each PAIR, Mail::Header::add() is called. All fields are added after existing fields. The last addition is returned.

$obj->combine( $tag, [$with] )
See Mail::Header::combine().

$obj->delete( $tag, [$tags] )
Delete all fields with the name $tag. Mail::Header::delete() is doing the work.

$obj->fold( [$length] )
See Mail::Header::fold().

$obj->fold_length( [$tag], [$length] )
See Mail::Header::fold_length().

$obj->get( $tag, [$tags] )
In LIST context, all fields with the name $tag are returned. In SCALAR context, only the first field which matches the earliest $tag is returned. Mail::Header::get() is called to collect the data.

$obj->header(\lines)
See Mail::Header::header().

$obj->replace(PAIRS)
The PAIRS are field-name and field-content. For each PAIR, Mail::Header::replace() is called with index 0. If a $field is already in the header, it will be removed first. Do not specified the same field-name twice.

Processing the body

$obj->remove_sig( [$nlines] )
Attempts to remove a user’s signature from the body of a message. It does this by looking for a line equal to -- within the last $nlines of the message. If found then that line and all lines after it will be removed. If $nlines is not given a default value of 10 will be used. This would be of most use in auto-reply scripts.

$obj->sign(%options)
Add your signature to the body. remove_sig() will strip existing signatures first. -Option –Default File undef Signature []

File => FILEHANDLE
Take from the FILEHANDLE all lines starting from the first --.

Signature => STRING|ARRAY-of-LINES

$obj->tidy_body()

Removes all leading and trailing lines from the body that only contain white spaces.

High-level functionality

$obj->escape_from()
It can cause problems with some applications if a message contains a line starting with `From , in particular when attempting to split a folder. This method inserts a leading `’> on any line that matches the regular expression /^*From/>

$obj->nntppost( [%options] )
Post an article via NNTP. Requires Net::NNTP to be installed. -Option–Default Debug <false> Host <required> Port 119

Debug => BOOLEAN
Debug value to pass to Net::NNTP, see Net::NNTP

Host => HOSTNAME|Net::NNTP object
Name of NNTP server to connect to, or a Net::NNTP object to use.

Port => INTEGER
Port number to connect to on remote host

$obj->reply(%options)
Create a new object with header initialised for a reply to the current object. And the body will be a copy of the current message indented. The .mailhdr file in your home directory (if exists) will be read first, to provide defaults. -Option –Default Exclude [] Indent > Keep [] ReplyAll false

Exclude => ARRAY-of-FIELDS
Remove the listed FIELDS from the produced message.

Indent => STRING
Use as indentation string. The string may contain %% to get a single %, %f to get the first from name, %F is the first character of %f, %l is the last name, %L its first character, %n the whole from string, and %I the first character of each of the names in the from string.

Keep => ARRAY-of-FIELDS
Copy the listed FIELDS from the original message.

ReplyAll => BOOLEAN
Automatically include all To and Cc addresses of the original mail, excluding those mentioned in the Bcc list.

$obj->send( [$type, [$args…]] )
Send a Mail::Internet message using Mail::Mailer. $type and $args are passed on to Mail::Mailer::new().

$obj->smtpsend( [%options] )
Send a Mail::Internet message using direct SMTP to the given ADDRESSES, each can be either a string or a reference to a list of email addresses. If none of To, <Cc> or Bcc are given then the addresses are extracted from the message being sent. The return value will be a list of email addresses that the message was sent to. If the message was not sent the list will be empty. Requires Net::SMTP and Net::Domain to be installed. -Option –Default Bcc undef Cc undef Debug <false> Hello localhost.localdomain Host $ENV{SMTPHOSTS} MailFrom Mail::Util::mailaddress() Port 25 To undef

Bcc => ADDRESSES

Cc => ADDRESSES

Debug => BOOLEAN

Debug value to pass to Net::SMTP, see <Net::SMTP>

Hello => STRING
Send a HELO (or EHLO) command to the server with the given name.

Host => HOSTNAME
Name of the SMTP server to connect to, or a Net::SMTP object to use If Host is not given then the SMTP host is found by attempting connections first to hosts specified in $ENV{SMTPHOSTS}, a colon separated list, then mailhost and localhost.

MailFrom => ADDRESS
The e-mail address which is used as sender. By default, Mail::Util::mailaddress() provides the address of the sender.

Port => INTEGER
Port number to connect to on remote host

To => ADDRESSES

$obj->unescape_from(())

Remove the escaping added by escape_from().

SEE ALSO

This module is part of the MailTools distribution, http://perl.overmeer.net/mailtools/.

AUTHORS

The MailTools bundle was developed by Graham Barr. Later, Mark Overmeer took over maintenance without commitment to further development.

Mail::Cap by Gisle Aas <[email protected]>. Mail::Field::AddrList by Peter Orbaek <[email protected]>. Mail::Mailer and Mail::Send by Tim Bunce <[email protected]>. For other contributors see ChangeLog.

LICENSE

Copyrights 1995-2000 Graham Barr <[email protected]> and 2001-2017 Mark Overmeer <[email protected]>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

866 - Linux cli command pthread_getconcurrency

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_getconcurrency and provides detailed information about the command pthread_getconcurrency, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_getconcurrency.

NAME 🖥️ pthread_getconcurrency 🖥️

set/get the concurrency level

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_setconcurrency(int new_level);
int pthread_getconcurrency(void);

DESCRIPTION

The pthread_setconcurrency() function informs the implementation of the application’s desired concurrency level, specified in new_level. The implementation takes this only as a hint: POSIX.1 does not specify the level of concurrency that should be provided as a result of calling pthread_setconcurrency().

Specifying new_level as 0 instructs the implementation to manage the concurrency level as it deems appropriate.

pthread_getconcurrency() returns the current value of the concurrency level for this process.

RETURN VALUE

On success, pthread_setconcurrency() returns 0; on error, it returns a nonzero error number.

pthread_getconcurrency() always succeeds, returning the concurrency level set by a previous call to pthread_setconcurrency(), or 0, if pthread_setconcurrency() has not previously been called.

ERRORS

pthread_setconcurrency() can fail with the following error:

EINVAL
new_level is negative.

POSIX.1 also documents an EAGAIN error (“the value specified by new_level would cause a system resource to be exceeded”).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_setconcurrency(), pthread_getconcurrency()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.1. POSIX.1-2001.

NOTES

The default concurrency level is 0.

Concurrency levels are meaningful only for M:N threading implementations, where at any moment a subset of a process’s set of user-level threads may be bound to a smaller number of kernel-scheduling entities. Setting the concurrency level allows the application to give the system a hint as to the number of kernel-scheduling entities that should be provided for efficient execution of the application.

Both LinuxThreads and NPTL are 1:1 threading implementations, so setting the concurrency level has no meaning. In other words, on Linux these functions merely exist for compatibility with other systems, and they have no effect on the execution of a program.

SEE ALSO

pthread_attr_setscope(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

867 - Linux cli command strerrorname_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strerrorname_np and provides detailed information about the command strerrorname_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strerrorname_np.

NAME 🖥️ strerrorname_np 🖥️

return string describing error number

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strerror(int errnum);
const char *strerrorname_np(int errnum);
const char *strerrordesc_np(int errnum);
int strerror_r(int errnum, char buf[.buflen], size_t buflen);
               /* XSI-compliant */
char *strerror_r(int errnum, char buf[.buflen], size_t buflen);
               /* GNU-specific */
char *strerror_l(int errnum, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strerrorname_np(), strerrordesc_np():

    _GNU_SOURCE

strerror_r():

    The XSI-compliant version is provided if:
        (_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE
    Otherwise, the GNU-specific version is provided.

DESCRIPTION

The strerror() function returns a pointer to a string that describes the error code passed in the argument errnum, possibly using the LC_MESSAGES part of the current locale to select the appropriate language. (For example, if errnum is EINVAL, the returned description will be “Invalid argument”.) This string must not be modified by the application, and the returned pointer will be invalidated on a subsequent call to strerror() or strerror_l(), or if the thread that obtained the string exits. No other library function, including perror(3), will modify this string.

Like strerror(), the strerrordesc_np() function returns a pointer to a string that describes the error code passed in the argument errnum, with the difference that the returned string is not translated according to the current locale.

The strerrorname_np() function returns a pointer to a string containing the name of the error code passed in the argument errnum. For example, given EPERM as an argument, this function returns a pointer to the string “EPERM”. Given 0 as an argument, this function returns a pointer to the string “0”.

strerror_r()

strerror_r() is like strerror(), but might use the supplied buffer buf instead of allocating one internally. This function is available in two versions: an XSI-compliant version specified in POSIX.1-2001 (available since glibc 2.3.4, but not POSIX-compliant until glibc 2.13), and a GNU-specific version (available since glibc 2.0). The XSI-compliant version is provided with the feature test macros settings shown in the SYNOPSIS; otherwise the GNU-specific version is provided. If no feature test macros are explicitly defined, then (since glibc 2.4) _POSIX_C_SOURCE is defined by default with the value 200112L, so that the XSI-compliant version of strerror_r() is provided by default.

The XSI-compliant strerror_r() is preferred for portable applications. It returns the error string in the user-supplied buffer buf of length buflen.

The GNU-specific strerror_r() returns a pointer to a string containing the error message. This may be either a pointer to a string that the function stores in buf, or a pointer to some (immutable) static string (in which case buf is unused). If the function stores a string in buf, then at most buflen bytes are stored (the string may be truncated if buflen is too small and errnum is unknown). The string always includes a terminating null byte (‘�’).

strerror_l()

strerror_l() is like strerror(), but maps errnum to a locale-dependent error message in the locale specified by locale. The behavior of strerror_l() is undefined if locale is the special locale object LC_GLOBAL_LOCALE or is not a valid locale object handle.

RETURN VALUE

The strerror(), strerror_l(), and the GNU-specific strerror_r() functions return the appropriate error description string, or an “Unknown error nnn” message if the error number is unknown.

On success, strerrorname_np() and strerrordesc_np() return the appropriate error description string. If errnum is an invalid error number, these functions return NULL.

The XSI-compliant strerror_r() function returns 0 on success. On error, a (positive) error number is returned (since glibc 2.13), or -1 is returned and errno is set to indicate the error (before glibc 2.13).

POSIX.1-2001 and POSIX.1-2008 require that a successful call to strerror() or strerror_l() shall leave errno unchanged, and note that, since no function return value is reserved to indicate an error, an application that wishes to check for errors should initialize errno to zero before the call, and then check errno after the call.

ERRORS

EINVAL
The value of errnum is not a valid error number.

ERANGE
Insufficient storage was supplied to contain the error description string.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strerror()

Thread safety

MT-Safe

strerrorname_np(), strerrordesc_np()

Thread safetyMT-Safe

strerror_r(), strerror_l()

Thread safetyMT-Safe

Before glibc 2.32, strerror() is not MT-Safe.

STANDARDS

strerror()
C11, POSIX.1-2008.

strerror_r()
strerror_l()
POSIX.1-2008.

strerrorname_np()
strerrordesc_np()
GNU.

POSIX.1-2001 permits strerror() to set errno if the call encounters an error, but does not specify what value should be returned as the function result in the event of an error. On some systems, strerror() returns NULL if the error number is unknown. On other systems, strerror() returns a string something like “Error nnn occurred” and sets errno to EINVAL if the error number is unknown. C99 and POSIX.1-2008 require the return value to be non-NULL.

HISTORY

strerror()
POSIX.1-2001, C89.

strerror_r()
POSIX.1-2001.

strerror_l()
glibc 2.6. POSIX.1-2008.

strerrorname_np()
strerrordesc_np()
glibc 2.32.

NOTES

strerrorname_np() and strerrordesc_np() are thread-safe and async-signal-safe.

SEE ALSO

err(3), errno(3), error(3), perror(3), strsignal(3), locale(7), signal-safety(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

868 - Linux cli command iswblank

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command iswblank and provides detailed information about the command iswblank, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the iswblank.

NAME 🖥️ iswblank 🖥️

test for whitespace wide character

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wctype.h>
int iswblank(wint_t wc);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

iswblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The iswblank() function is the wide-character equivalent of the isblank(3) function. It tests whether wc is a wide character belonging to the wide-character class “blank”.

The wide-character class “blank” is a subclass of the wide-character class “space”.

Being a subclass of the wide-character class “space”, the wide-character class “blank” is disjoint from the wide-character class “graph” and therefore also disjoint from its subclasses “alnum”, “alpha”, “upper”, “lower”, “digit”, “xdigit”, “punct”.

The wide-character class “blank” always contains at least the space character and the control character ’ ‘.

RETURN VALUE

The iswblank() function returns nonzero if wc is a wide character belonging to the wide-character class “blank”. Otherwise, it returns zero.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

iswblank()

Thread safetyMT-Safe locale

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

The behavior of iswblank() depends on the LC_CTYPE category of the current locale.

SEE ALSO

isblank(3), iswctype(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

869 - Linux cli command Moose_Meta_Object_Traitpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Object_Traitpm and provides detailed information about the command Moose_Meta_Object_Traitpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Object_Traitpm.

NAME 🖥️ Moose_Meta_Object_Traitpm 🖥️

Some overrides for Class::MOP::Object functionality

VERSION

version 2.2207

DESCRIPTION

This module is entirely private, you shouldn’t ever need to interact with it directly.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

870 - Linux cli command Net_DBus_Dumperpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Dumperpm and provides detailed information about the command Net_DBus_Dumperpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Dumperpm.

NAME 🖥️ Net_DBus_Dumperpm 🖥️

Stringify Net::DBus objects suitable for printing

SYNOPSIS

use Net::DBus::Dumper; use Net::DBus; # Dump out info about the bus my $bus = Net::DBus->find; print dbus_dump($bus); # Dump out info about a service my $service = $bus->get_service(“org.freedesktop.DBus”); print dbus_dump($service); # Dump out info about an object my $object = $service->get_object("/org/freedesktop/DBus"); print dbus_dump($object);

DESCRIPTION

This module serves as a debugging aid, providing a means to stringify a DBus related object in a form suitable for printing out. It can stringify any of the Net::DBus:* objects, generating the following information for each

Net::DBus
A list of services registered with the bus

Net::DBus::Service =item Net::DBus::RemoteService
The service name

Net::DBus::Object =item Net::DBus::RemoteObject
The list of all exported methods, and signals, along with their parameter and return types.

METHODS

my @data = dbus_dump($object);
Generates a stringified representation of an object. The object passed in as the parameter must be an instance of one of Net::DBus, Net::DBus::RemoteService, Net::DBus::Service, Net::DBus::RemoteObject, Net::DBus::Object. The stringified representation will be returned as a list of strings, with newlines in appropriate places, such that it can be passed string to the print method.

BUGS

It should print out a list of object paths registered against a service, but this only currently works for service implemented in Perl

AUTHOR

Daniel P. Berrange

COPYRIGHT

Copyright (C) 2005-2011 Daniel P. Berrange

SEE ALSO

Net::DBus, Net::DBus::RemoteService, Net::DBus::Service, Net::DBus::RemoteObject, Net::DBus::Object, Data::Dumper.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

871 - Linux cli command register_printf_modifier

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command register_printf_modifier and provides detailed information about the command register_printf_modifier, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the register_printf_modifier.

NAME 🖥️ register_printf_modifier 🖥️

define custom behavior for printf-like functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <printf.h>
int register_printf_specifier(int spec, printf_function func,
 printf_arginfo_size_function arginfo);
int register_printf_modifier(const wchar_t *str);
int register_printf_type(printf_va_arg_function fct);

Callbacks

typedef int printf_function(FILE *stream, const struct printf_info *info,
 const void *const args[]);
typedef int printf_arginfo_size_function(const struct printf_info *info,
 size_t n, int argtypes[n], int size[n]);
typedef void printf_va_arg_function(void *mem, va_list *ap);

Types

struct printf_info {
 int prec; // Precision
 int width; // Width
 wchar_t spec; // Format letter
 unsigned int is_long_double:1;// L or ll flag
 unsigned int is_short:1; // h flag
 unsigned int is_long:1; // l flag
 unsigned int alt:1; // # flag
 unsigned int space:1; // Space flag
 unsigned int left:1; // - flag
 unsigned int showsign:1; // + flag
 unsigned int group:1; // ' flag
 unsigned int extra:1; // For special use
 unsigned int is_char:1; // hh flag
 unsigned int wide:1; // True for wide character streams
 unsigned int i18n:1; // I flag
 unsigned int is_binary128:1; /* Floating-point argument is
  ABI-compatible with
  IEC 60559 binary128 */
 unsigned short user; // Bits for user-installed modifiers
 wchar_t pad; // Padding character
};

Constants

#define PA_FLAG_LONG_LONG /* ... */
#define PA_FLAG_LONG_DOUBLE /* ... */
#define PA_FLAG_LONG /* ... */
#define PA_FLAG_SHORT /* ... */
#define PA_FLAG_PTR /* ... */

DESCRIPTION

These functions serve to extend and/or modify the behavior of the printf(3) family of functions.

register_printf_specifier()

This function registers a custom conversion specifier for the printf(3) family of functions.

spec
The character which will be used as a conversion specifier in the format string.

func
Callback function that will be executed by the printf(3) family of functions to format the input arguments into the output stream.

stream
Output stream where the formatted output should be printed. This stream transparently represents the output, even in the case of functions that write to a string.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in arginfo.

args
Array of pointers to the arguments to the printf(3) -like function.

arginfo
Callback function that will be executed by the printf(3) family of functions to know how many arguments should be parsed for the custom specifier and also their types.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in func.

n
Number of arguments remaining to be parsed.

argtypes
This array should be set to define the type of each of the arguments that will be parsed. Each element in the array represents one of the arguments to be parsed, in the same order that they are passed to the printf(3) -like function. Each element should be set to a base type (PA_*) from the enum above, or a custom one, and optionally ORed with an appropriate length modifier (PA_FLAG_*).

The type is determined by using one of the following constants:

PA_INT
int.

PA_CHAR
int, cast to char.

PA_WCHAR
wchar_t.

PA_STRING
const char *, a ‘�’-terminated string.

PA_WSTRING
const wchar_t *, a wide character L’�’-terminated string.

PA_POINTER
void *.

PA_FLOAT
float.

PA_DOUBLE
double.

PA_LAST
TODO.

size
For user-defined types, the size of the type (in bytes) should also be specified through this array. Otherwise, leave it unused.

arginfo is called before func, and prepares some information needed to call func.

register_printf_modifier()

TODO

register_printf_type()

TODO

RETURN VALUE

register_printf_specifier(), register_printf_modifier(), and register_printf_type() return zero on success, or -1 on error.

Callbacks

The callback of type printf_function should return the number of characters written, or -1 on error.

The callback of type printf_arginfo_size_function should return the number of arguments to be parsed by this specifier. It also passes information about the type of those arguments to the caller through argtypes. On error, it should return -1.

ERRORS

EINVAL
The specifier was not a valid character.

STANDARDS

GNU.

HISTORY

register_printf_function(3) is an older function similar to register_printf_specifier(), and is now deprecated. That function can’t handle user-defined types.

register_printf_specifier() supersedes register_printf_function(3).

EXAMPLES

The following example program registers the ‘b’ and ‘B’ specifiers to print integers in binary format, mirroring rules for other unsigned conversion specifiers like ‘x’ and ‘u’. This can be used to print in binary prior to C23.

/* This code is in the public domain */
#include <err.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <printf.h>
#define GROUP_SEP  '\''
struct Printf_Pad {
    char    ch;
    size_t  len;
};
static int b_printf(FILE *stream, const struct printf_info *info,
                    const void *const args[]);
static int b_arginf_sz(const struct printf_info *info,
                    size_t n, int argtypes[n], int size[n]);
static uintmax_t b_value(const struct printf_info *info,
                    const void *arg);
static size_t b_bin_repr(char bin[UINTMAX_WIDTH],
                    const struct printf_info *info, const void *arg);
static size_t b_bin_len(const struct printf_info *info,
                    ptrdiff_t min_len);
static size_t b_pad_len(const struct printf_info *info,
                    ptrdiff_t bin_len);
static ssize_t b_print_prefix(FILE *stream,
                    const struct printf_info *info);
static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info,
                    ptrdiff_t min_len);
static ssize_t b_print_number(FILE *stream,
                    const struct printf_info *info,
                    const char bin[UINTMAX_WIDTH],
                    size_t min_len, size_t bin_len);
static char pad_ch(const struct printf_info *info);
static ssize_t pad_spaces(FILE *stream, size_t pad_len);
int
main(void)
{
    if (register_printf_specifier('b', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('b', ...)");
    if (register_printf_specifier('B', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('B', ...)");
    printf("....----....----....----....----

“); printf("%llb; “, 0x5Ellu); printf("%lB; “, 0x5Elu); printf("%b; “, 0x5Eu); printf("%hB; “, 0x5Eu); printf("%hhb; “, 0x5Eu); printf("%jb; “, (uintmax_t)0x5E); printf("%zb; “, (size_t)0x5E); printf(”….—-….—-….—-….—- “); printf(”%#b; “, 0x5Eu); printf(”%#B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf("%10b; “, 0x5Eu); printf("%010b; “, 0x5Eu); printf(”%.10b; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%-10B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%‘B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”….—-….—-….—-….—- “); printf(”%#16.12b; “, 0xAB); printf(”%-#‘20.12b; “, 0xAB); printf(”%#‘020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#020B; “, 0xAB); printf(”%‘020B; “, 0xAB); printf("%020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#021B; “, 0xAB); printf(”%‘021B; “, 0xAB); printf("%021B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#022B; “, 0xAB); printf(”%‘022B; “, 0xAB); printf("%022B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#023B; “, 0xAB); printf(”%‘023B; “, 0xAB); printf("%023B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%-#‘19.11b; “, 0xAB); printf(”%#‘019B; “, 0xAB); printf(”%#019B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%‘019B; “, 0xAB); printf("%019B; “, 0xAB); printf(”%#016b; “, 0xAB); printf(”….—-….—-….—-….—- “); return 0; } static int b_printf(FILE *stream, const struct printf_info *info, const void const args[]) { char bin[UINTMAX_WIDTH]; size_t min_len, bin_len; ssize_t len, tmp; struct Printf_Pad pad = {0}; len = 0; min_len = b_bin_repr(bin, info, args[0]); bin_len = b_bin_len(info, min_len); pad.ch = pad_ch(info); if (pad.ch == ’ ‘) pad.len = b_pad_len(info, bin_len); / Padding with ’ ’ (right aligned) / if ((pad.ch == ’ ‘) && !info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } / “0b”/“0B” prefix / if (info->alt) { tmp = b_print_prefix(stream, info); if (tmp == EOF) return EOF; len += tmp; } / Padding with ‘0’ / if (pad.ch == ‘0’) { tmp = b_pad_zeros(stream, info, min_len); if (tmp == EOF) return EOF; len += tmp; } / Print number (including leading 0s to fill precision) / tmp = b_print_number(stream, info, bin, min_len, bin_len); if (tmp == EOF) return EOF; len += tmp; / Padding with ’ ’ (left aligned) */ if (info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } return len; } static int b_arginf_sz(const struct printf_info *info, size_t n, int argtypes[n], [[maybe_unused]] int size[n]) { if (n < 1) return -1; if (info->is_long_double) argtypes[0] = PA_INT | PA_FLAG_LONG_LONG; else if (info->is_long) argtypes[0] = PA_INT | PA_FLAG_LONG; else argtypes[0] = PA_INT; return 1; } static uintmax_t b_value(const struct printf_info *info, const void *arg) { if (info->is_long_double) return *(const unsigned long long *)arg; if (info->is_long) return *(const unsigned long )arg; / short and char are both promoted to int */ return *(const unsigned int *)arg; } static size_t b_bin_repr(char bin[UINTMAX_WIDTH], const struct printf_info *info, const void *arg) { size_t min_len; uintmax_t val; val = b_value(info, arg); bin[0] = ‘0’; for (min_len = 0; val; min_len++) { bin[min_len] = ‘0’ + (val % 2); val »= 1; } return MAX(min_len, 1); } static size_t b_bin_len(const struct printf_info *info, ptrdiff_t min_len) { return MAX(info->prec, min_len); } static size_t b_pad_len(const struct printf_info *info, ptrdiff_t bin_len) { ptrdiff_t pad_len; pad_len = info->width - bin_len; if (info->alt) pad_len -= 2; if (info->group) pad_len -= (bin_len - 1) / 4; return MAX(pad_len, 0); } static ssize_t b_print_prefix(FILE *stream, const struct printf_info *info) { ssize_t len; len = 0; if (fputc(‘0’, stream) == EOF) return EOF; len++; if (fputc(info->spec, stream) == EOF) return EOF; len++; return len; } static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info, ptrdiff_t min_len) { ssize_t len; ptrdiff_t tmp; len = 0; tmp = info->width - (info->alt * 2); if (info->group) tmp -= tmp / 5 - !(tmp % 5); for (ptrdiff_t i = tmp - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static ssize_t b_print_number(FILE *stream, const struct printf_info info, const char bin[UINTMAX_WIDTH], size_t min_len, size_t bin_len) { ssize_t len; len = 0; / Print leading zeros to fill precision / for (size_t i = bin_len - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } / Print number */ for (size_t i = min_len - 1; i < min_len; i–) { if (fputc(bin[i], stream) == EOF) return EOF; len++; if (!info->group || (i % 4) || !i) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static char pad_ch(const struct printf_info *info) { if ((info->prec != -1) || (info->pad == ’ ‘) || info->left) return ’ ‘; return ‘0’; } static ssize_t pad_spaces(FILE *stream, size_t pad_len) { ssize_t len; len = 0; for (size_t i = pad_len - 1; i < pad_len; i–) { if (fputc(’ ‘, stream) == EOF) return EOF; len++; } return len; }

SEE ALSO

asprintf(3), printf(3), wprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

872 - Linux cli command sysexits.hhead

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sysexits.hhead and provides detailed information about the command sysexits.hhead, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sysexits.hhead.

NAME 🖥️ sysexits.hhead 🖥️

exit codes for programs

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sysexits.h>
#define EX_OK0/*successful termination */
#define EX__BASE64/*base value for error messages */
#define EX_USAGE64/*command line usage error */
#define EX_DATAERR65/*data format error */
#define EX_NOINPUT66/*cannot open input */
#define EX_NOUSER67/*addressee unknown */
#define EX_NOHOST68/*host name unknown */
#define EX_UNAVAILABLE69/*service unavailable */
#define EX_SOFTWARE70/*internal software error */
#define EX_OSERR71/*system error (e.g., can't fork) */
#define EX_OSFILE72/*critical OS file missing */
#define EX_CANTCREAT73/*can't create (user) output file */
#define EX_IOERR74/*input/output error */
#define EX_TEMPFAIL75/*temp failure; user is invited to retry */
#define EX_PROTOCOL76/*remote error in protocol */
#define EX_NOPERM77/*permission denied */
#define EX_CONFIG78/*configuration error */
#define EX__MAX.../*maximum listed value */

DESCRIPTION

A few programs exit with the following error codes.

The successful exit is always indicated by a status of 0, or EX_OK (equivalent to EXIT_SUCCESS from <stdlib.h>). Error numbers begin at EX__BASE to reduce the possibility of clashing with other exit statuses that random programs may already return. The meaning of the code is approximately as follows:

EX_USAGE
The command was used incorrectly, e.g., with the wrong number of arguments, a bad flag, bad syntax in a parameter, or whatever.

EX_DATAERR
The input data was incorrect in some way. This should only be used for user’s data and not system files.

EX_NOINPUT
An input file (not a system file) did not exist or was not readable. This could also include errors like “No message” to a mailer (if it cared to catch it).

EX_NOUSER
The user specified did not exist. This might be used for mail addresses or remote logins.

EX_NOHOST
The host specified did not exist. This is used in mail addresses or network requests.

EX_UNAVAILABLE
A service is unavailable. This can occur if a support program or file does not exist. This can also be used as a catch-all message when something you wanted to do doesn’t work, but you don’t know why.

EX_SOFTWARE
An internal software error has been detected. This should be limited to non-operating system related errors if possible.

EX_OSERR
An operating system error has been detected. This is intended to be used for such things as “cannot fork”, “cannot create pipe”, or the like. It includes things like getuid(2) returning a user that does not exist in the passwd(5) file.

EX_OSFILE
Some system file (e.g., /etc/passwd, /etc/utmp, etc.) does not exist, cannot be opened, or has some sort of error (e.g., syntax error).

EX_CANTCREAT
A (user specified) output file cannot be created.

EX_IOERR
An error occurred while doing I/O on some file.

EX_TEMPFAIL
Temporary failure, indicating something that is not really an error. For example that a mailer could not create a connection, and the request should be reattempted later.

EX_PROTOCOL
The remote system returned something that was “not possible” during a protocol exchange.

EX_OSFILE
You did not have sufficient permission to perform the operation. This is not intended for file system problems, which should use EX_NOINPUT or EX_CANTCREAT, but rather for higher level permissions.

EX_CONFIG
Something was found in an unconfigured or misconfigured state.

The numerical values corresponding to the symbolical ones are given in parenthesis for easy reference.

STANDARDS

BSD.

HISTORY

The <sysexits.h> file appeared in 4.0BSD for use by the deliverymail utility, later renamed to sendmail(8).

CAVEATS

The choice of an appropriate exit value is often ambiguous.

SEE ALSO

err(3), error(3), exit(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

873 - Linux cli command lrintf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lrintf and provides detailed information about the command lrintf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lrintf.

NAME 🖥️ lrintf 🖥️

round to nearest integer

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
long lrint(double x);
long lrintf(float x);
long lrintl(long double x);
long long llrint(double x);
long long llrintf(float x);
long long llrintl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions round their argument to the nearest integer value, using the current rounding direction (see fesetround(3)).

Note that unlike the rint(3) family of functions, the return type of these functions differs from that of their arguments.

RETURN VALUE

These functions return the rounded integer value.

If x is a NaN or an infinity, or the rounded value is too large to be stored in a long (long long in the case of the ll* functions), then a domain error occurs, and the return value is unspecified.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is a NaN or infinite, or the rounded value is too large
An invalid floating-point exception (FE_INVALID) is raised.

These functions do not set errno.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

lrint(), lrintf(), lrintl(), llrint(), llrintf(), llrintl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

ceil(3), floor(3), lround(3), nearbyint(3), rint(3), round(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

874 - Linux cli command mbsnrtowcs

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mbsnrtowcs and provides detailed information about the command mbsnrtowcs, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mbsnrtowcs.

NAME 🖥️ mbsnrtowcs 🖥️

convert a multibyte string to a wide-character string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
size_t mbsnrtowcs(wchar_t dest[restrict .len], const char **restrict src,
 size_t nms, size_t len",mbstate_t*restrict"ps);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

mbsnrtowcs():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The mbsnrtowcs() function is like the mbsrtowcs(3) function, except that the number of bytes to be converted, starting at *src, is limited to at most nms bytes.

If dest is not NULL, the mbsnrtowcs() function converts at most nms bytes from the multibyte string *src to a wide-character string starting at dest. At most len wide characters are written to dest. The shift state *ps is updated. The conversion is effectively performed by repeatedly calling mbrtowc(dest, *src, n, ps) where n is some positive number, as long as this call succeeds, and then incrementing dest by one and *src by the number of bytes consumed. The conversion can stop for three reasons:

  • An invalid multibyte sequence has been encountered. In this case, *src is left pointing to the invalid multibyte sequence, (size_t) -1 is returned, and errno is set to EILSEQ.

  • The nms limit forces a stop, or len non-L’�’ wide characters have been stored at dest. In this case, *src is left pointing to the next multibyte sequence to be converted, and the number of wide characters written to dest is returned.

  • The multibyte string has been completely converted, including the terminating null wide character (‘�’) (which has the side effect of bringing back *ps to the initial state). In this case, *src is set to NULL, and the number of wide characters written to dest, excluding the terminating null wide character, is returned.

According to POSIX.1, if the input buffer ends with an incomplete character, it is unspecified whether conversion stops at the end of the previous character (if any), or at the end of the input buffer. The glibc implementation adopts the former behavior.

If dest is NULL, len is ignored, and the conversion proceeds as above, except that the converted wide characters are not written out to memory, and that no destination length limit exists.

In both of the above cases, if ps is NULL, a static anonymous state known only to the mbsnrtowcs() function is used instead.

The programmer must ensure that there is room for at least len wide characters at dest.

RETURN VALUE

The mbsnrtowcs() function returns the number of wide characters that make up the converted part of the wide-character string, not including the terminating null wide character. If an invalid multibyte sequence was encountered, (size_t) -1 is returned, and errno set to EILSEQ.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mbsnrtowcs()

Thread safety

MT-Unsafe race:mbsnrtowcs/!ps

STANDARDS

POSIX.1-2008.

NOTES

The behavior of mbsnrtowcs() depends on the LC_CTYPE category of the current locale.

Passing NULL as ps is not multithread safe.

SEE ALSO

iconv(3), mbrtowc(3), mbsinit(3), mbsrtowcs(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

875 - Linux cli command iswprint

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command iswprint and provides detailed information about the command iswprint, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the iswprint.

NAME 🖥️ iswprint 🖥️

test for printing wide character

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wctype.h>
int iswprint(wint_t wc);

DESCRIPTION

The iswprint() function is the wide-character equivalent of the isprint(3) function. It tests whether wc is a wide character belonging to the wide-character class “print”.

The wide-character class “print” is disjoint from the wide-character class “cntrl”.

The wide-character class “print” contains the wide-character class “graph”.

RETURN VALUE

The iswprint() function returns nonzero if wc is a wide character belonging to the wide-character class “print”. Otherwise, it returns zero.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

iswprint()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of iswprint() depends on the LC_CTYPE category of the current locale.

SEE ALSO

isprint(3), iswctype(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

876 - Linux cli command isinff

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isinff and provides detailed information about the command isinff, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isinff.

NAME 🖥️ isinff 🖥️

BSD floating-point classification functions

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
int finite(double x);
int finitef(float x);
int finitel(long double x);
int isinf(double x);
int isinff(float x);
int isinfl(long double x);
int isnan(double x);
int isnanf(float x);
int isnanl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

finite(), finitef(), finitel():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
isinf():
    _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isinff(), isinfl():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isnan():

    _XOPEN_SOURCE || _ISOC99_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isnanf(), isnanl():

    _XOPEN_SOURCE >= 600
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The finite(), finitef(), and finitel() functions return a nonzero value if x is neither infinite nor a “not-a-number” (NaN) value, and 0 otherwise.

The isnan(), isnanf(), and isnanl() functions return a nonzero value if x is a NaN value, and 0 otherwise.

The isinf(), isinff(), and isinfl() functions return 1 if x is positive infinity, -1 if x is negative infinity, and 0 otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

finite(), finitef(), finitel(), isinf(), isinff(), isinfl(), isnan(), isnanf(), isnanl()

Thread safetyMT-Safe

NOTES

Note that these functions are obsolete. C99 defines macros isfinite(), isinf(), and isnan() (for all types) replacing them. Further note that the C99 isinf() has weaker guarantees on the return value. See fpclassify(3).

SEE ALSO

fpclassify(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

877 - Linux cli command XtIsTransientShell

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtIsTransientShell and provides detailed information about the command XtIsTransientShell, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtIsTransientShell.

NAME 🖥️ XtIsTransientShell 🖥️

obtain and verify a widget’s class

SYNTAX

#include <X11/Intrinsic.h>

WidgetClass XtClass(Widget w);

WidgetClass XtSuperclass(Widget w);

Boolean XtIsSubclass(Widget w, WidgetClass widget_class);

void XtCheckSubclass(Widget widget, WidgetClass widget_class, String message);

Boolean XtIsObject(Widget w);

Boolean XtIsRectObj(Widget w);

Boolean XtIsWidget(Widget w);

Boolean XtIsComposite(Widget w);

Boolean XtIsConstraint(Widget w);

Boolean XtIsShell(Widget w);

Boolean XtIsOverrideShell(Widget w);

Boolean XtIsWMShell(Widget w);

Boolean XtIsVendorShell(Widget w);

Boolean XtIsTransientShell(Widget w);

Boolean XtIsTopLevelShell(Widget w);

Boolean XtIsApplicationShell(Widget w);

Boolean XtIsSessionShell(Widget w);

ARGUMENTS

  1. Specifies the widget.

widget_class
Specifies the widget class.

message
Specifies the message that is to be used.

DESCRIPTION

The XtClass function returns a pointer to the widget’s class structure.

The XtSuperclass function returns a pointer to the widget’s superclass class structure.

The XtIsSubclass function returns True if the class of the specified widget is equal to or is a subclass of the specified class. The widget’s class can be any number of subclasses down the chain and need not be an immediate subclass of the specified class. Composite widgets that need to restrict the class of the items they contain can use XtIsSubclass to find out if a widget belongs to the desired class of objects.

The XtCheckSubclass macro determines if the class of the specified widget is equal to or is a subclass of the specified widget class. The widget can be any number of subclasses down the chain and need not be an immediate subclass of the specified widget class. If the specified widget is not a subclass, XtCheckSubclass constructs an error message from the supplied message, the widget’s actual class, and the expected class and calls XtErrorMsg. XtCheckSubclass should be used at the entry point of exported routines to ensure that the client has passed in a valid widget class for the exported operation.

XtCheckSubclass is only executed when the widget has been compiled with the compiler symbol DEBUG defined; otherwise, it is defined as the empty string and generates no code.

To test if a given widget belongs to a subclass of an Intrinsics-defined class, the Intrinsics defines macros or functions equivalent to XtIsSubclass for each of the built-in classes. These procedures are XtIsObject, XtIsRectObj, XtIsWidget, XtIsComposite, XtIsConstraint, XtIsShell, XtIsOverrideShell, XtIsWMShell, XtIsVendorShell, XtIsTransientShell, XtIsTopLevelShell, XtIsApplicationShell, and XtIsSessionShell.

The

SEE ALSO

XtAppErrorMsg(3), XtDisplay(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

878 - Linux cli command Moose_Cookbook_Roles_Comparable_CodeReusepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Roles_Comparable_CodeReusepm and provides detailed information about the command Moose_Cookbook_Roles_Comparable_CodeReusepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Roles_Comparable_CodeReusepm.

NAME 🖥️ Moose_Cookbook_Roles_Comparable_CodeReusepm 🖥️

Using roles for code reuse

VERSION

version 2.2207

SYNOPSIS

package Eq; use Moose::Role; requires equal_to; sub not_equal_to { my ( $self, $other ) = @_; not $self->equal_to($other); } package Comparable; use Moose::Role; with Eq; requires compare; sub equal_to { my ( $self, $other ) = @_; $self->compare($other) == 0; } sub greater_than { my ( $self, $other ) = @_; $self->compare($other) == 1; } sub less_than { my ( $self, $other ) = @_; $self->compare($other) == -1; } sub greater_than_or_equal_to { my ( $self, $other ) = @_; $self->greater_than($other) || $self->equal_to($other); } sub less_than_or_equal_to { my ( $self, $other ) = @_; $self->less_than($other) || $self->equal_to($other); } package Printable; use Moose::Role; requires to_string; package US::Currency; use Moose; with Comparable, Printable; has amount => ( is => rw, isa => Num, default => 0 ); sub compare { my ( $self, $other ) = @_; $self->amount <=> $other->amount; } sub to_string { my $self = shift; sprintf $%0.2f USD => $self->amount; }

DESCRIPTION

Roles have two primary purposes: as interfaces, and as a means of code reuse. This recipe demonstrates the latter, with roles that define comparison and display code for objects.

Let’s start with Eq. First, note that we’ve replaced use Moose with use Moose::Role. We also have a new sugar function, requires:

requires equal_to;

This says that any class which consumes this role must provide an equal_to method. It can provide this method directly, or by consuming some other role.

The Eq role defines its not_equal_to method in terms of the required equal_to method. This lets us minimize the methods that consuming classes must provide.

The next role, Comparable, builds on the Eq role. We include Eq in Comparable using with, another new sugar function:

with Eq;

The with function takes a list of roles to consume. In our example, the Comparable role provides the equal_to method required by Eq. However, it could opt not to, in which case a class that consumed Comparable would have to provide its own equal_to. In other words, a role can consume another role without providing any required methods.

The Comparable role requires a method, compare:

requires compare;

The Comparable role also provides a number of other methods, all of which ultimately rely on compare.

sub equal_to { my ( $self, $other ) = @_; $self->compare($other) == 0; } sub greater_than { my ( $self, $other ) = @_; $self->compare($other) == 1; } sub less_than { my ( $self, $other ) = @_; $self->compare($other) == -1; } sub greater_than_or_equal_to { my ( $self, $other ) = @_; $self->greater_than($other) || $self->equal_to($other); } sub less_than_or_equal_to { my ( $self, $other ) = @_; $self->less_than($other) || $self->equal_to($other); }

Finally, we define the Printable role. This role exists solely to provide an interface. It has no methods, just a list of required methods. In this case, it just requires a to_string method.

An interface role is useful because it defines both a method and a name. We know that any class which does this role has a to_string method, but we can also assume that this method has the semantics we want. Presumably, in real code we would define those semantics in the documentation for the Printable role. (1)

Finally, we have the US::Currency class which consumes both the Comparable and Printable roles.

with Comparable, Printable;

It also defines a regular Moose attribute, amount:

has amount => ( is => rw, isa => Num, default => 0 );

Finally we see the implementation of the methods required by our roles. We have a compare method:

sub compare { my ( $self, $other ) = @_; $self->amount <=> $other->amount; }

By consuming the Comparable role and defining this method, we gain the following methods for free: equal_to, greater_than, less_than, greater_than_or_equal_to and less_than_or_equal_to.

Then we have our to_string method:

sub to_string { my $self = shift; sprintf $%0.2f USD => $self->amount; }

CONCLUSION

Roles can be very powerful. They are a great way of encapsulating reusable behavior, as well as communicating (semantic and interface) information about the methods our classes provide.

FOOTNOTES

  1. Consider two classes, Runner and Process, both of which define a run method. If we just require that an object implements a run method, we still aren’t saying anything about what that method actually does. If we require an object that implements the Executable role, we’re saying something about semantics.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

879 - Linux cli command Tk_Wmpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Wmpm and provides detailed information about the command Tk_Wmpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Wmpm.

NAME 🖥️ Tk_Wmpm 🖥️

Communicate with window manager

SYNOPSIS

$toplevel->method(?args?)

DESCRIPTION

The wm methods are used to interact with window managers in order to control such things as the title for a window, its geometry, or the increments in terms of which it may be resized. The wm methods can take any of a number of different forms, depending on the particular method argument. All of the forms expect $toplevel, which must be a top-level window object.

The legal forms for the wm methods are:

$toplevel->aspect(?minNumer minDenom maxNumer maxDenom?)
If minNumer, minDenom, maxNumer, and maxDenom are all specified, then they will be passed to the window manager and the window manager should use them to enforce a range of acceptable aspect ratios for $toplevel. The aspect ratio of $toplevel (width/length) will be constrained to lie between minNumer/minDenom and maxNumer/maxDenom. If minNumer etc. are all specified as empty strings, then any existing aspect ratio restrictions are removed. If minNumer etc. are specified, then the method returns an empty string. Otherwise, it returns a array containing four elements, which are the current values of minNumer, minDenom, maxNumer, and maxDenom (if no aspect restrictions are in effect, then an empty string is returned).

$widget->attributes( ?args? );
This subcommand returns or sets platform specific attributes associated with a window.

$widget->attributes;
Returns a list of the platform specific flags and their values.

$widget->attributes( ?option? );
Returns the value for the specific option.

$widget->attributes( ?option value option value…? );
Sets one or more of the values. The values are as follows: On Windows, -disabled gets or sets whether the window is in a disabled state. -toolwindow gets or sets the style of the window to toolwindow (as defined in the MSDN). -topmost gets or sets whether this is a topmost window (displays above all other windows). On Macintosh, there are currently no special attribute values. On Unix, there are currently no special attribute values.

$toplevel->client(?name?)
If name is specified, this method stores name (which should be the name of the host on which the application is executing) in $toplevel’s WM_CLIENT_MACHINE property for use by the window manager or session manager. The method returns an empty string in this case. If name isn’t specified, the method returns the last name set in a client method for $toplevel. If name is specified as an empty string, the method deletes the WM_CLIENT_MACHINE property from $toplevel.

$toplevel->colormapwindows(?windowList?)
This method is used to manipulate the WM_COLORMAP_WINDOWS property, which provides information to the window managers about windows that have private colormaps. If windowList isn’t specified, the method returns a list whose elements are the names of the windows in the WM_COLORMAP_WINDOWS property. If windowList is specified, it consists of a list of widgets; the method overwrites the WM_COLORMAP_WINDOWS property with the given windows and returns an empty string. The WM_COLORMAP_WINDOWS property should normally contain a list of the internal windows within $toplevel whose colormaps differ from their parents. The order of the windows in the property indicates a priority order: the window manager will attempt to install as many colormaps as possible from the head of this list when $widget gets the colormap focus. If $widget is not included among the windows in windowList, Tk implicitly adds it at the end of the WM_COLORMAP_WINDOWS property, so that its colormap is lowest in priority. If $widget->colormapwindows is not invoked, Tk will automatically set the property for each top-level window to all the internal windows whose colormaps differ from their parents, followed by the top-level itself; the order of the internal windows is undefined. See the ICCCM documentation for more information on the WM_COLORMAP_WINDOWS property.

$toplevel->command(?value?)
If value is specified, this method stores value in $toplevel’s WM_COMMAND property for use by the window manager or session manager and returns an empty string. Value must have proper list structure; the elements should contain the words of the command used to invoke the application. If value isn’t specified then the method returns the last value set in a command method for $toplevel. If value is specified as an empty string, the method deletes the WM_COMMAND property from $toplevel.

$toplevel->deiconify
Arrange for $toplevel to be displayed in normal (non-iconified) form. This is done by mapping the window. If the window has never been mapped then this method will not map the window, but it will ensure that when the window is first mapped it will be displayed in de-iconified form. Returns an empty string.

$toplevel->focusmodel(?active|passive?)
If active or passive is supplied as an optional argument to the method, then it specifies the focus model for $toplevel. In this case the method returns an empty string. If no additional argument is supplied, then the method returns the current focus model for $toplevel. An active focus model means that $toplevel will claim the input focus for itself or its descendants, even at times when the focus is currently in some other application. Passive means that $toplevel will never claim the focus for itself: the window manager should give the focus to $toplevel at appropriate times. However, once the focus has been given to $toplevel or one of its descendants, the application may re-assign the focus among $toplevel’s descendants. The focus model defaults to passive, and Tk’s focus method assumes a passive model of focusing.

$toplevel->frame
If $widget has been reparented by the window manager into a decorative frame, the method returns the platform specific window identifier for the outermost frame that contains $toplevel (the window whose parent is the root or virtual root). If $toplevel hasn’t been reparented by the window manager then the method returns the platform specific window identifier for $toplevel.

$toplevel->geometry(?newGeometry?)
If newGeometry is specified, then the geometry of $toplevel is changed and an empty string is returned. Otherwise the current geometry for $toplevel is returned (this is the most recent geometry specified either by manual resizing or in a geometry method). NewGeometry has the form =widthxheight**+-x+-y, where any of =, widthx**height, or **+-x+-**y may be omitted. Width and height are positive integers specifying the desired dimensions of $toplevel. If $toplevel is gridded (see “GRIDDED GEOMETRY MANAGEMENT” below) then the dimensions are specified in grid units; otherwise they are specified in pixel units. X and y specify the desired location of $toplevel on the screen, in pixels. If x is preceded by +, it specifies the number of pixels between the left edge of the screen and the left edge of $toplevel’s border; if preceded by - then x specifies the number of pixels between the right edge of the screen and the right edge of $toplevel’s border. If y is preceded by + then it specifies the number of pixels between the top of the screen and the top of $toplevel’s border; if y is preceded by - then it specifies the number of pixels between the bottom of $toplevel’s border and the bottom of the screen. If newGeometry is specified as an empty string then any existing user-specified geometry for $toplevel is cancelled, and the window will revert to the size requested internally by its widgets.

$toplevel->wmGrid(?baseWidth,baseHeight,widthInc,heightInc?)
This method indicates that $toplevel is to be managed as a gridded window. It also specifies the relationship between grid units and pixel units. BaseWidth and baseHeight specify the number of grid units corresponding to the pixel dimensions requested internally by $toplevel using Tk_GeometryRequest. WidthInc and heightInc specify the number of pixels in each horizontal and vertical grid unit. These four values determine a range of acceptable sizes for $toplevel, corresponding to grid-based widths and heights that are non-negative integers. Tk will pass this information to the window manager; during manual resizing, the window manager will restrict the window’s size to one of these acceptable sizes. Furthermore, during manual resizing the window manager will display the window’s current size in terms of grid units rather than pixels. If baseWidth etc. are all specified as empty strings, then $toplevel will no longer be managed as a gridded window. If baseWidth etc. are specified then the return value is an empty string. Otherwise the return value is a array containing four elements corresponding to the current baseWidth, baseHeight, widthInc, and heightInc; if $toplevel is not currently gridded, then an empty string is returned. Note: this command should not be needed very often, since the Tk_SetGrid library procedure and the -setgrid option provide easier access to the same functionality.

$toplevel->group(?$widget?)
If $widget is specified, it is the the leader of a group of related windows. The window manager may use this information, for example, to unmap all of the windows in a group when the group’s leader is iconified. $widget may be specified as an empty string to remove $toplevel from any group association. If $widget is specified then the method returns an empty string; otherwise it returns the $toplevel’s current group leader, or an empty string if $toplevel isn’t part of any group.

$toplevel->iconbitmap(?bitmap?)
If bitmap is specified, then it names a bitmap in the standard forms accepted by Tk (see the Tk_GetBitmap documentation for details). This black and white bitmap is passed to the window manager to be displayed in $toplevel’s icon, and the method returns an empty string. If an empty string is specified for bitmap, then any current icon bitmap or image is cancelled for $toplevel. If bitmap is specified then the method returns an empty string. Otherwise it returns the name of the current icon bitmap associated with $toplevel, or an empty string if $toplevel has no icon bitmap.

$toplevel->iconify
Arrange for $toplevel to be iconified. It $toplevel hasn’t yet been mapped for the first time, this method will arrange for it to appear in the iconified state when it is eventually mapped.

$toplevel->iconimage(?image?)
If image is specified, then it names a normal Tk image. This image is rendered into a private coloured bitmap which is passed to the window manager to be displayed in $toplevel’s icon, and the method returns an empty string. If an empty string is specified for image, then any current icon bitmap or image is cancelled for $toplevel. If image is specified then the method returns an empty string. Otherwise it returns the name of the current icon image associated with $toplevel, or an empty string if $toplevel has no icon image. The private pixmap is not pre-cleared so images which are partly “transparent” display rubbish in their transparent parts. The sizes of images that can be used as icons in this manner are platform dependent. On Win32 this sets the “large” icon, which should be 32x32, it will automatically be scaled down to 16x16 for use as a small icon.

$toplevel->iconmask(?bitmap?)
If bitmap is specified, then it names a bitmap in the standard forms accepted by Tk (see the Tk_GetBitmap documentation for details). This bitmap is passed to the window manager to be used as a mask in conjunction with the iconbitmap option: where the mask has zeroes no icon will be displayed; where it has ones, the bits from the icon bitmap will be displayed. If an empty string is specified for bitmap then any current icon mask is cancelled for $toplevel (this is equivalent to specifying a bitmap of all ones). If bitmap is specified then the method returns an empty string. Otherwise it returns the name of the current icon mask associated with $toplevel, or an empty string if no mask is in effect.

$toplevel->iconname(?newName?)
If newName is specified, then it is passed to the window manager; the window manager should display newName inside the icon associated with $toplevel. In this case an empty string is returned as result. If newName isn’t specified then the method returns the current icon name for $toplevel, or an empty string if no icon name has been specified (in this case the window manager will normally display the window’s title, as specified with the title method).

$toplevel->iconphoto(?-default? image1 ?image2 …?)
Sets the titlebar icon for window based on the named photo images. If -default is specified, this is applied to all future created toplevels as well. The data in the images is taken as a snapshot at the time of invocation. If the images are later changed, this is not reflected to the titlebar icons. Multiple images are accepted to allow different images sizes (eg, 16x16 and 32x32) to be provided. The window manager may scale pro- vided icons to an appropriate size. On Windows, the images are packed into a Windows icon structure. This will override an ico specified to wm iconbitmap, and vice versa. [NOTE: This is not implemented yet!] On X, the images are arranged into the _NET_WM_ICON X property, which most modern window managers support. A wm iconbitmap may exist simultaneously. It is recommended to use not more than 2 icons, placing the larger icon first. On Macintosh, this is currently does nothing.

$toplevel->iconposition(?x y?)
If x and y are specified, they are passed to the window manager as a hint about where to position the icon for $toplevel. In this case an empty string is returned. If x and y are specified as empty strings then any existing icon position hint is cancelled. If neither x nor y is specified, then the method returns a array containing two values, which are the current icon position hints (if no hints are in effect then an empty string is returned).

$toplevel->iconwindow(?$widget?)
If $widget is specified, it is a window to use as icon for $toplevel: when $toplevel is iconified then $widget will be mapped to serve as icon, and when $toplevel is de-iconified then $widget will be unmapped again. If $widget is specified as an empty string then any existing icon window association for $toplevel will be cancelled. If the $widget argument is specified then an empty string is returned. Otherwise the method returns the current icon window for $toplevel, or an empty string if there is no icon window currently specified for $toplevel. Button press events are disabled for $toplevel as long as it is an icon window; this is needed in order to allow window managers to ``own’’ those events. Note: not all window managers support the notion of an icon window.

$toplevel->maxsize(?width,height?)
If width and height are specified, they give the maximum permissible dimensions for $toplevel. For gridded windows the dimensions are specified in grid units; otherwise they are specified in pixel units. The window manager will restrict the window’s dimensions to be less than or equal to width and height. If width and height are specified, then the method returns an empty string. Otherwise it returns a array with two elements, which are the maximum width and height currently in effect. The maximum size defaults to the size of the screen. If resizing has been disabled with the resizable method, then this method has no effect. See the sections on geometry management below for more information.

$toplevel->minsize(?width,height?)
If width and height are specified, they give the minimum permissible dimensions for $toplevel. For gridded windows the dimensions are specified in grid units; otherwise they are specified in pixel units. The window manager will restrict the window’s dimensions to be greater than or equal to width and height. If width and height are specified, then the method returns an empty string. Otherwise it returns a array with two elements, which are the minimum width and height currently in effect. The minimum size defaults to one pixel in each dimension. If resizing has been disabled with the resizable method, then this method has no effect. See the sections on geometry management below for more information.

$toplevel->overrideredirect(?boolean?)
If boolean is specified, it must have a proper boolean form and the override-redirect flag for $toplevel is set to that value. If boolean is not specified then 1 or 0 is returned to indicate whether or not the override-redirect flag is currently set for $toplevel. Setting the override-redirect flag for a window causes it to be ignored by the window manager; among other things, this means that the window will not be reparented from the root window into a decorative frame and the user will not be able to manipulate the window using the normal window manager mechanisms.

$toplevel->positionfrom(?who?)
If who is specified, it must be either program or user, or an abbreviation of one of these two. It indicates whether $toplevel’s current position was requested by the program or by the user. Many window managers ignore program-requested initial positions and ask the user to manually position the window; if user is specified then the window manager should position the window at the given place without asking the user for assistance. If who is specified as an empty string, then the current position source is cancelled. If who is specified, then the method returns an empty string. Otherwise it returns user or $widget to indicate the source of the window’s current position, or an empty string if no source has been specified yet. Most window managers interpret ``no source’’ as equivalent to program. Tk will automatically set the position source to user when a geometry method is invoked, unless the source has been set explicitly to program.

$toplevel->protocol(?name?,?callback?)
This method is used to manage window manager protocols such as WM_DELETE_WINDOW. Name is the name of an atom corresponding to a window manager protocol, such as WM_DELETE_WINDOW or WM_SAVE_YOURSELF or WM_TAKE_FOCUS. If both name and callback are specified, then callback is associated with the protocol specified by name. Name will be added to $toplevel’s WM_PROTOCOLS property to tell the window manager that the application has a protocol handler for name, and callback will be invoked in the future whenever the window manager sends a message to the client for that protocol. In this case the method returns an empty string. If name is specified but callback isn’t, then the current callback for name is returned, or an empty string if there is no handler defined for name. If callback is specified as an empty string then the current handler for name is deleted and it is removed from the WM_PROTOCOLS property on $toplevel; an empty string is returned. Lastly, if neither name nor callback is specified, the method returns a list of all the protocols for which handlers are currently defined for $toplevel.

Tk always defines a protocol handler for WM_DELETE_WINDOW, even if you haven’t asked for one with protocol. If a WM_DELETE_WINDOW message arrives when you haven’t defined a handler, then Tk handles the message by destroying the window for which it was received.

$toplevel->resizable(?width,height?)
This method controls whether or not the user may interactively resize a top-level window. If width and height are specified, they are boolean values that determine whether the width and height of $toplevel may be modified by the user. In this case the method returns an empty string. If width and height are omitted then the method returns a list with two 0/1 elements that indicate whether the width and height of $toplevel are currently resizable. By default, windows are resizable in both dimensions. If resizing is disabled, then the window’s size will be the size from the most recent interactive resize or geometry method. If there has been no such operation then the window’s natural size will be used.

$toplevel->sizefrom(?who?)
If who is specified, it must be either program or user, or an abbreviation of one of these two. It indicates whether $toplevel’s current size was requested by the program or by the user. Some window managers ignore program-requested sizes and ask the user to manually size the window; if user is specified then the window manager should give the window its specified size without asking the user for assistance. If who is specified as an empty string, then the current size source is cancelled. If who is specified, then the method returns an empty string. Otherwise it returns user or $widget to indicate the source of the window’s current size, or an empty string if no source has been specified yet. Most window managers interpret ``no source’’ as equivalent to program.

$toplevel->stackorder( ?isabove|isbelow $toplevel? );
The stackorder command returns a list of toplevel windows in stacking order, from lowest to highest. When a single toplevel window is passed, the returned list recursively includes all of the window’s children that are toplevels. Only those toplevels that are currently mapped to the screen are returned. The stackorder command can also be used to determine if one toplevel is positioned above or below a second toplevel. When two window arguments separated by either isabove or isbelow are passed, a boolean result indicates whether or not the first window is currently above or below the second window in the stacking order.

$toplevel->state(?newstate?)
If newstate is specified, the window will be set to the new state, otherwise it returns the current state of $toplevel: either normal, iconic, withdrawn, icon, or (Windows only) zoomed. The difference between iconic and icon is that iconic refers to a window that has been iconified (e.g., with the iconify method) while icon refers to a window whose only purpose is to serve as the icon for some other window (via the iconwindow method). The icon state cannot be set.

$toplevel->title(?string?)
If string is specified, then it will be passed to the window manager for use as the title for $toplevel (the window manager should display this string in $toplevel’s title bar). In this case the method returns an empty string. If string isn’t specified then the method returns the current title for the $toplevel. The title for a window defaults to its name.

$toplevel->transient(?master?)
If master is specified, then the window manager is informed that $toplevel is a transient window (e.g. pull-down menu) working on behalf of master (where master is a top-level window). Some window managers will use this information to manage $toplevel specially. If master is specified as an empty string then $toplevel is marked as not being a transient window any more. If master is specified, then the method returns an empty string. Otherwise the method returns the path name of $toplevel’s current master, or an empty string if $toplevel isn’t currently a transient window.

$toplevel->withdraw
Arranges for $toplevel to be withdrawn from the screen. This causes the window to be unmapped and forgotten about by the window manager. If the window has never been mapped, then this method causes the window to be mapped in the withdrawn state. Not all window managers appear to know how to handle windows that are mapped in the withdrawn state. Note: it sometimes seems to be necessary to withdraw a window and then re-map it (e.g. with deiconify) to get some window managers to pay attention to changes in window attributes such as group.

$toplevel->wrapper
Returns a list of two elements: the window id of the wrapper window in which Tk has placed $toplevel, and the height of the menu bar. The id is the one by which window manager will know $toplevel, and so is appropriate place to add X properties. The menu height is only returned on X. On Windows, this value is always zero.

ICON SIZES

The sizes of bitmaps/images that can be used as icons in this manner are platform and window manager dependent. Unix window managers are typically more tolerant than Win32. It is possible that coloured iconimage icons may cause problems on some X window managers.

  • Win32 iconimage and iconbitmap set the “large” icon, which should be 32x32, it will automatically be scaled down to 16x16 for use as a small icon. Win32 ignores iconwin requests.

  • KDE’s “kwm” Accepts coloured iconimage and black and white iconbitmap but will scale either to a small (14x14?) icon. Kwm ignores iconwin.

  • Sun’s “olwm” or “olvwm” Honours iconwin which will override iconimage or iconbitmap. Coloured images work.

  • Sun’s CDE window manager Coloured images work. …

GEOMETRY MANAGEMENT

By default a top-level window appears on the screen in its natural size, which is the one determined internally by its widgets and geometry managers. If the natural size of a top-level window changes, then the window’s size changes to match. A top-level window can be given a size other than its natural size in two ways. First, the user can resize the window manually using the facilities of the window manager, such as resize handles. Second, the application can request a particular size for a top-level window using the geometry method. These two cases are handled identically by Tk; in either case, the requested size overrides the natural size. You can return the window to its natural by invoking geometry with an empty geometry string.

Normally a top-level window can have any size from one pixel in each dimension up to the size of its screen. However, you can use the minsize and maxsize methods to limit the range of allowable sizes. The range set by minsize and maxsize applies to all forms of resizing, including the window’s natural size as well as manual resizes and the geometry method. You can also use the method resizable to completely disable interactive resizing in one or both dimensions.

GRIDDED GEOMETRY MANAGEMENT

Gridded geometry management occurs when one of the widgets of an application supports a range of useful sizes. This occurs, for example, in a text editor where the scrollbars, menus, and other adornments are fixed in size but the edit widget can support any number of lines of text or characters per line. In this case, it is usually desirable to let the user specify the number of lines or characters-per-line, either with the geometry method or by interactively resizing the window. In the case of text, and in other interesting cases also, only discrete sizes of the window make sense, such as integral numbers of lines and characters-per-line; arbitrary pixel sizes are not useful.

Gridded geometry management provides support for this kind of application. Tk (and the window manager) assume that there is a grid of some sort within the application and that the application should be resized in terms of grid units rather than pixels. Gridded geometry management is typically invoked by turning on the setGrid option for a widget; it can also be invoked with the wmGrid method or by calling Tk_SetGrid. In each of these approaches the particular widget (or sometimes code in the application as a whole) specifies the relationship between integral grid sizes for the window and pixel sizes. To return to non-gridded geometry management, invoke grid with empty argument strings.

When gridded geometry management is enabled then all the dimensions specified in minsize, maxsize, and geometry methods are treated as grid units rather than pixel units. Interactive resizing is also carried out in even numbers of grid units rather than pixels.

BUGS

Most existing window managers appear to have bugs that affect the operation of the wm methods. For example, some changes won’t take effect if the window is already active: the window will have to be withdrawn and de-iconified in order to make the change happen.

SEE ALSO

Tk::Widget Tk::tixWm Tk::Mwm

KEYWORDS

aspect ratio, deiconify, focus model, geometry, grid, group, icon, iconify, increments, position, size, title, top-level window, units, window manager

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

880 - Linux cli command XtAppAddActionHook

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppAddActionHook and provides detailed information about the command XtAppAddActionHook, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppAddActionHook.

NAME 🖥️ XtAppAddActionHook 🖥️

register an action hook procedure

SYNTAX

#include <X11/Intrinsic.h>

XtActionHookId XtAppAddActionHook(XtAppContext app_context, XtActionHookProc proc, XtPointer client_data);

void XtRemoveActionHook(XtActionHookId id);

ARGUMENTS

app_context
Specifies the application context.

proc
Specifies the action hook procedure.

num_args
Specifies the application-specific data to be passed to the action hook.

DESCRIPTION

XtAppAddActionHook adds the specified procedure to the front of a list maintained in the application context. In the future, when an action routine is about to be invoked for any widget in this application context, either through the translation manager or via XtCallActionProc, the action hohok procedures will be called in reverse order of registration jut prior to invoking the action routine.

Action hook procedures are removed automatically and the XtActionHookId s destroyed when the application context in which they were added is destroyed.

XtRemoveActionHook removes the specified action hook procedure from the list in which it was registered.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

881 - Linux cli command log1pf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command log1pf and provides detailed information about the command log1pf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the log1pf.

NAME 🖥️ log1pf 🖥️

logarithm of 1 plus argument

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double log1p(double x);
float log1pf(float x);
long double log1pl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

log1p():
    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

log1pf(), log1pl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return a value equivalent to

    log (1 + x)

The result is computed in a way that is accurate even if the value of x is near zero.

RETURN VALUE

On success, these functions return the natural logarithm of (1 + x).

If x is a NaN, a NaN is returned.

If x is positive infinity, positive infinity is returned.

If x is -1, a pole error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.

If x is less than -1 (including negative infinity), a domain error occurs, and a NaN (not a number) is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is less than -1
errno is set to EDOM (but see BUGS). An invalid floating-point exception (FE_INVALID) is raised.

Pole error: x is -1
errno is set to ERANGE (but see BUGS). A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

log1p(), log1pf(), log1pl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

BUGS

Before glibc 2.22, the glibc implementation did not set errno to EDOM when a domain error occurred.

Before glibc 2.22, the glibc implementation did not set errno to ERANGE when a range error occurred.

SEE ALSO

exp(3), expm1(3), log(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

882 - Linux cli command pcap_statustostrpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_statustostrpcap and provides detailed information about the command pcap_statustostrpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_statustostrpcap.

NAME 🖥️ pcap_statustostrpcap 🖥️

convert a PCAP_ERROR_ or PCAP_WARNING_ value to a string

SYNOPSIS

#include <pcap/pcap.h>
const char *pcap_statustostr(int error);

DESCRIPTION

pcap_statustostr() converts a PCAP_ERROR_ or PCAP_WARNING_ value returned by a libpcap routine to an error string.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

883 - Linux cli command pthread_attr_setaffinity_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_attr_setaffinity_np and provides detailed information about the command pthread_attr_setaffinity_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_attr_setaffinity_np.

NAME 🖥️ pthread_attr_setaffinity_np 🖥️

set/get CPU affinity attribute in thread attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <pthread.h>
int pthread_attr_setaffinity_np(pthread_attr_t *attr,
 size_t cpusetsize, const cpu_set_t *cpuset);
int pthread_attr_getaffinity_np(const pthread_attr_t *attr,
 size_t cpusetsize, cpu_set_t *cpuset);

DESCRIPTION

The pthread_attr_setaffinity_np() function sets the CPU affinity mask attribute of the thread attributes object referred to by attr to the value specified in cpuset. This attribute determines the CPU affinity mask of a thread created using the thread attributes object attr.

The pthread_attr_getaffinity_np() function returns the CPU affinity mask attribute of the thread attributes object referred to by attr in the buffer pointed to by cpuset.

The argument cpusetsize is the length (in bytes) of the buffer pointed to by cpuset. Typically, this argument would be specified as sizeof(cpu_set_t).

For more details on CPU affinity masks, see sched_setaffinity(2). For a description of a set of macros that can be used to manipulate and inspect CPU sets, see CPU_SET(3).

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

EINVAL
(pthread_attr_setaffinity_np()) cpuset specified a CPU that was outside the set supported by the kernel. (The kernel configuration option CONFIG_NR_CPUS defines the range of the set supported by the kernel data type used to represent CPU sets.)

EINVAL
(pthread_attr_getaffinity_np()) A CPU in the affinity mask of the thread attributes object referred to by attr lies outside the range specified by cpusetsize (i.e., cpuset/cpusetsize is too small).

ENOMEM
(pthread_attr_setaffinity_np()) Could not allocate memory.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_attr_setaffinity_np(), pthread_attr_getaffinity_np()

Thread safetyMT-Safe

STANDARDS

GNU; hence the suffix “_np” (nonportable) in the names.

HISTORY

glibc 2.3.4.

NOTES

In glibc 2.3.3 only, versions of these functions were provided that did not have a cpusetsize argument. Instead the CPU set size given to the underlying system calls was always sizeof(cpu_set_t).

SEE ALSO

sched_setaffinity(2), pthread_attr_init(3), pthread_setaffinity_np(3), cpuset(7), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

884 - Linux cli command xdr_u_int

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_u_int and provides detailed information about the command xdr_u_int, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_u_int.

NAME 🖥️ xdr_u_int 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

885 - Linux cli command lcong48_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lcong48_r and provides detailed information about the command lcong48_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lcong48_r.

NAME 🖥️ lcong48_r 🖥️

generate uniformly distributed pseudo-random numbers reentrantly

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int drand48_r(struct drand48_data *restrict buffer,
 double *restrict result);
int erand48_r(unsigned short xsubi[3],
 struct drand48_data *restrict buffer,
 double *restrict result);
int lrand48_r(struct drand48_data *restrict buffer,
 long *restrict result);
int nrand48_r(unsigned short xsubi[3],
 struct drand48_data *restrict buffer,
 long *restrict result);
int mrand48_r(struct drand48_data *restrict buffer,
 long *restrict result);
int jrand48_r(unsigned short xsubi[3],
 struct drand48_data *restrict buffer,
 long *restrict result);
int srand48_r(long int seedval, struct drand48_data *buffer);
int seed48_r(unsigned short seed16v[3], struct drand48_data *buffer);
int lcong48_r(unsigned short param[7], struct drand48_data *buffer);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

These functions are the reentrant analogs of the functions described in drand48(3). Instead of modifying the global random generator state, they use the supplied data buffer.

Before the first use, this struct must be initialized, for example, by filling it with zeros, or by calling one of the functions srand48_r(), seed48_r(), or lcong48_r().

RETURN VALUE

The return value is 0.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

drand48_r(), erand48_r(), lrand48_r(), nrand48_r(), mrand48_r(), jrand48_r(), srand48_r(), seed48_r(), lcong48_r()

Thread safetyMT-Safe race:buffer

STANDARDS

GNU.

SEE ALSO

drand48(3), rand(3), random(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

886 - Linux cli command fputwc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fputwc and provides detailed information about the command fputwc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fputwc.

NAME 🖥️ fputwc 🖥️

write a wide character to a FILE stream

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
#include <wchar.h>
wint_t fputwc(wchar_t wc, FILE *stream);
wint_t putwc(wchar_t wc, FILE *stream);

DESCRIPTION

The fputwc() function is the wide-character equivalent of the fputc(3) function. It writes the wide character wc to stream. If ferror(stream) becomes true, it returns WEOF. If a wide-character conversion error occurs, it sets errno to EILSEQ and returns WEOF. Otherwise, it returns wc.

The putwc() function or macro functions identically to fputwc(). It may be implemented as a macro, and may evaluate its argument more than once. There is no reason ever to use it.

For nonlocking counterparts, see unlocked_stdio(3).

RETURN VALUE

On success, fputwc() function returns wc. Otherwise, WEOF is returned, and errno is set to indicate the error.

ERRORS

Apart from the usual ones, there is

EILSEQ
Conversion of wc to the stream’s encoding fails.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fputwc(), putwc()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

NOTES

The behavior of fputwc() depends on the LC_CTYPE category of the current locale.

In the absence of additional information passed to the fopen(3) call, it is reasonable to expect that fputwc() will actually write the multibyte sequence corresponding to the wide character wc.

SEE ALSO

fgetwc(3), fputws(3), unlocked_stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

887 - Linux cli command Spreadsheet_WriteExcel_Bigpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_WriteExcel_Bigpm and provides detailed information about the command Spreadsheet_WriteExcel_Bigpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_WriteExcel_Bigpm.

NAME 🖥️ Spreadsheet_WriteExcel_Bigpm 🖥️

A class for creating Excel files > 7MB.

SYNOPSIS

Use of this module is deprecated. See below.

DESCRIPTION

The module was a sub-class of Spreadsheet::WriteExcel used for creating Excel files greater than 7MB. However, it is no longer required and is now deprecated.

As of version 2.17 Spreadsheet::WriteExcel can create files larger than 7MB directly if OLE::Storage_Lite is installed.

This module only exists for backwards compatibility. If your programs use ::Big you should convert them to use Spreadsheet::WritExcel directly.

REQUIREMENTS

OLE::Storage_Lite.

AUTHOR

John McNamara [email protected]

COPYRIGHT

Copyright MM-MMX, John McNamara.

All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

888 - Linux cli command TAILQ_LAST

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command TAILQ_LAST and provides detailed information about the command TAILQ_LAST, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the TAILQ_LAST.

NAME 🖥️ TAILQ_LAST 🖥️

implementation of a doubly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
TAILQ_ENTRY(TYPE);
TAILQ_HEAD(HEADNAME, TYPE);
TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD head);
void TAILQ_INIT(TAILQ_HEAD *head);
int TAILQ_EMPTY(TAILQ_HEAD *head);
void TAILQ_INSERT_HEAD(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_TAIL(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_AFTER(TAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_FIRST(TAILQ_HEAD *head);
struct TYPE *TAILQ_LAST(TAILQ_HEAD *head, HEADNAME);
struct TYPE *TAILQ_PREV(struct TYPE *elm, HEADNAME, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_NEXT(struct TYPE *elm, TAILQ_ENTRY NAME);
TAILQ_FOREACH(struct TYPE *var, TAILQ_HEAD *head,
 TAILQ_ENTRY NAME);
TAILQ_FOREACH_REVERSE(struct TYPE *var, TAILQ_HEAD *head, HEADNAME,
 TAILQ_ENTRY NAME);
void TAILQ_REMOVE(TAILQ_HEAD *head, struct TYPE *elm,
 TAILQ_ENTRY NAME);
void TAILQ_CONCAT(TAILQ_HEAD *head1, TAILQ_HEAD *head2,
 TAILQ_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked tail queues.

In the macro definitions, TYPE is the name of a user defined structure, that must contain a field of type TAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user defined structure that must be declared using the macro TAILQ_HEAD().

Creation

A tail queue is headed by a structure defined by the TAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the queue and the other to the last element in the queue. The elements are doubly linked so that an arbitrary element can be removed without traversing the queue. New elements can be added to the queue after an existing element, before an existing element, at the head of the queue, or at the end of the queue. A TAILQ_HEAD structure is declared as follows:

TAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the queue. A pointer to the head of the queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

TAILQ_ENTRY() declares a structure that connects the elements in the queue.

TAILQ_HEAD_INITIALIZER() evaluates to an initializer for the queue head.

TAILQ_INIT() initializes the queue referenced by

TAILQ_EMPTY() evaluates to true if there are no items on the queue. head.

Insertion

TAILQ_INSERT_HEAD() inserts the new element elm at the head of the queue.

TAILQ_INSERT_TAIL() inserts the new element elm at the end of the queue.

TAILQ_INSERT_BEFORE() inserts the new element elm before the element listelm.

TAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

TAILQ_FIRST() returns the first item on the queue, or NULL if the queue is empty.

TAILQ_LAST() returns the last item on the queue. If the queue is empty the return value is NULL.

TAILQ_PREV() returns the previous item on the queue, or NULL if this item is the first.

TAILQ_NEXT() returns the next item on the queue, or NULL if this item is the last.

TAILQ_FOREACH() traverses the queue referenced by head in the forward direction, assigning each element in turn to var. var is set to NULL if the loop completes normally, or if there were no elements.

TAILQ_FOREACH_REVERSE() traverses the queue referenced by head in the reverse direction, assigning each element in turn to var.

Removal

TAILQ_REMOVE() removes the element elm from the queue.

Other features

TAILQ_CONCAT() concatenates the queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

TAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

TAILQ_FIRST(), TAILQ_LAST(), TAILQ_PREV(), and TAILQ_NEXT() return a pointer to the first, last, previous, or next TYPE structure, respectively.

TAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

STANDARDS

BSD.

HISTORY

4.4BSD.

CAVEATS

TAILQ_FOREACH() and TAILQ_FOREACH_REVERSE() don’t allow var to be removed or freed within the loop, as it would interfere with the traversal. TAILQ_FOREACH_SAFE() and TAILQ_FOREACH_REVERSE_SAFE(), which are present on the BSDs but are not present in glibc, fix this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    TAILQ_ENTRY(entry) entries;             /* Tail queue */
};
TAILQ_HEAD(tailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct tailhead head;                   /* Tail queue head */
    int i;
    TAILQ_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    TAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    TAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    TAILQ_INSERT_AFTER(&head, n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    TAILQ_INSERT_BEFORE(n2, n3, entries);
    TAILQ_REMOVE(&head, n2, entries);       /* Deletion */
    free(n2);
                                            /* Forward traversal */
    i = 0;
    TAILQ_FOREACH(np, &head, entries)
        np->data = i++;
                                            /* Reverse traversal */
    TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = TAILQ_FIRST(&head); while (n1 != NULL) { n2 = TAILQ_NEXT(n1, entries); free(n1); n1 = n2; } TAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

889 - Linux cli command pcap_dump_ftellpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_dump_ftellpcap and provides detailed information about the command pcap_dump_ftellpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_dump_ftellpcap.

NAME 🖥️ pcap_dump_ftellpcap 🖥️

get the current file offset for a savefile being written

SYNOPSIS

#include <pcap/pcap.h>
long pcap_dump_ftell(pcap_dumper_t *p);
int64_t pcap_dump_ftell64(pcap_dumper_t *p);

DESCRIPTION

pcap_dump_ftell() returns the current file position for the ``savefile’’, representing the number of bytes written by pcap_dump_open(3PCAP) and pcap_dump(3PCAP). PCAP_ERROR is returned on error. If the current file position does not fit in a long, it will be truncated; this can happen on 32-bit UNIX-like systems with large file support and on Windows. pcap_dump_ftell64() returns the current file position in a int64_t, so if file offsets that don’t fit in a long but that fit in a int64_t are supported, this will return the file offset without truncation. PCAP_ERROR is returned on error.

BACKWARD COMPATIBILITY

The function pcap_dump_ftell64() became available in libpcap release 1.9.0. In previous releases, there was no mechanism to obtain a file offset that is too large to fit in a long.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

890 - Linux cli command SLIST_INSERT_AFTER

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SLIST_INSERT_AFTER and provides detailed information about the command SLIST_INSERT_AFTER, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SLIST_INSERT_AFTER.

NAME 🖥️ SLIST_INSERT_AFTER 🖥️

implementation of a singly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
SLIST_ENTRY(TYPE);
SLIST_HEAD(HEADNAME, TYPE);
SLIST_HEAD SLIST_HEAD_INITIALIZER(SLIST_HEAD head);
void SLIST_INIT(SLIST_HEAD *head);
int SLIST_EMPTY(SLIST_HEAD *head);
void SLIST_INSERT_HEAD(SLIST_HEAD *head,
 struct TYPE *elm, SLIST_ENTRY NAME);
void SLIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, SLIST_ENTRY NAME);
struct TYPE *SLIST_FIRST(SLIST_HEAD *head);
struct TYPE *SLIST_NEXT(struct TYPE *elm, SLIST_ENTRY NAME);
SLIST_FOREACH(struct TYPE *var, SLIST_HEAD *head, SLIST_ENTRY NAME);
void SLIST_REMOVE(SLIST_HEAD *head, struct TYPE *elm,
 SLIST_ENTRY NAME);
void SLIST_REMOVE_HEAD(SLIST_HEAD *head,
 SLIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on singly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type SLIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro SLIST_HEAD().

Creation

A singly linked list is headed by a structure defined by the SLIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the list after an existing element or at the head of the list. An SLIST_HEAD structure is declared as follows:

SLIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

SLIST_ENTRY() declares a structure that connects the elements in the list.

SLIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

SLIST_INIT() initializes the list referenced by head.

SLIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

SLIST_INSERT_HEAD() inserts the new element elm at the head of the list.

SLIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

SLIST_FIRST() returns the first element in the list, or NULL if the list is empty.

SLIST_NEXT() returns the next element in the list.

SLIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

SLIST_REMOVE() removes the element elm from the list.

SLIST_REMOVE_HEAD() removes the element elm from the head of the list. For optimum efficiency, elements being removed from the head of the list should explicitly use this macro instead of the generic SLIST_REMOVE().

RETURN VALUE

SLIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

SLIST_FIRST(), and SLIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

SLIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

SLIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. SLIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    SLIST_ENTRY(entry) entries;             /* Singly linked list */
};
SLIST_HEAD(slisthead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct slisthead head;                  /* Singly linked list
                                               head */
    SLIST_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    SLIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    SLIST_INSERT_AFTER(n1, n2, entries);
    SLIST_REMOVE(&head, n2, entry, entries);/* Deletion */
    free(n2);
    n3 = SLIST_FIRST(&head);
    SLIST_REMOVE_HEAD(&head, entries);      /* Deletion from the head */
    free(n3);
    for (unsigned int i = 0; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        SLIST_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    SLIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); while (!SLIST_EMPTY(&head)) { /* List deletion */ n1 = SLIST_FIRST(&head); SLIST_REMOVE_HEAD(&head, entries); free(n1); } SLIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

891 - Linux cli command sem_open

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sem_open and provides detailed information about the command sem_open, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sem_open.

NAME 🖥️ sem_open 🖥️

initialize and open a named semaphore

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <fcntl.h> /* For O_* constants */
#include <sys/stat.h> /* For mode constants */
#include <semaphore.h>
sem_t *sem_open(const char *name, int oflag);
sem_t *sem_open(const char *name, int oflag,
 mode_t mode, unsigned int value);

DESCRIPTION

sem_open() creates a new POSIX semaphore or opens an existing semaphore. The semaphore is identified by name. For details of the construction of name, see sem_overview(7).

The oflag argument specifies flags that control the operation of the call. (Definitions of the flags values can be obtained by including <fcntl.h>.) If O_CREAT is specified in oflag, then the semaphore is created if it does not already exist. The owner (user ID) of the semaphore is set to the effective user ID of the calling process. The group ownership (group ID) is set to the effective group ID of the calling process. If both O_CREAT and O_EXCL are specified in oflag, then an error is returned if a semaphore with the given name already exists.

If O_CREAT is specified in oflag, then two additional arguments must be supplied. The mode argument specifies the permissions to be placed on the new semaphore, as for open(2). (Symbolic definitions for the permissions bits can be obtained by including <sys/stat.h>.) The permissions settings are masked against the process umask. Both read and write permission should be granted to each class of user that will access the semaphore. The value argument specifies the initial value for the new semaphore. If O_CREAT is specified, and a semaphore with the given name already exists, then mode and value are ignored.

RETURN VALUE

On success, sem_open() returns the address of the new semaphore; this address is used when calling other semaphore-related functions. On error, sem_open() returns SEM_FAILED, with errno set to indicate the error.

ERRORS

EACCES
The semaphore exists, but the caller does not have permission to open it.

EEXIST
Both O_CREAT and O_EXCL were specified in oflag, but a semaphore with this name already exists.

EINVAL
value was greater than SEM_VALUE_MAX.

EINVAL
name consists of just “/”, followed by no other characters.

EMFILE
The per-process limit on the number of open file descriptors has been reached.

ENAMETOOLONG
name was too long.

ENFILE
The system-wide limit on the total number of open files has been reached.

ENOENT
The O_CREAT flag was not specified in oflag and no semaphore with this name exists; or, O_CREAT was specified, but name wasn’t well formed.

ENOMEM
Insufficient memory.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sem_open()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

SEE ALSO

sem_close(3), sem_getvalue(3), sem_post(3), sem_unlink(3), sem_wait(3), sem_overview(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

892 - Linux cli command Sub_Exporter_Progressivepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Sub_Exporter_Progressivepm and provides detailed information about the command Sub_Exporter_Progressivepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Sub_Exporter_Progressivepm.

NAME 🖥️ Sub_Exporter_Progressivepm 🖥️

Only use Sub::Exporter if you need it

VERSION

version 0.001013

SYNOPSIS

package Syntax::Keyword::Gather; use Sub::Exporter::Progressive -setup => { exports => [qw( break gather gathered take )], groups => { default => [qw( break gather gathered take )], }, }; # elsewhere # uses Exporter for speed use Syntax::Keyword::Gather; # somewhere else # uses Sub::Exporter for features use Syntax::Keyword::Gather gather, take => { -as => grab };

DESCRIPTION

Sub::Exporter is an incredibly powerful module, but with that power comes great responsibility, er- as well as some runtime penalties. This module is a Sub::Exporter wrapper that will let your users just use Exporter if all they are doing is picking exports, but use Sub::Exporter if your users try to use Sub::Exporter’s more advanced features, like renaming exports, if they try to use them.

Note that this module will export @EXPORT, @EXPORT_OK and %EXPORT_TAGS package variables for Exporter to work. Additionally, if your package uses advanced Sub::Exporter features like currying, this module will only ever use Sub::Exporter, so you might as well use it directly.

CONTRIBUTORS

ilmari - Dagfinn Ilmari Mannsåker (cpan:ILMARI) <[email protected]>

mst - Matt S. Trout (cpan:MSTROUT) <[email protected]>

leont - Leon Timmermans (cpan:LEONT) <[email protected]>

AUTHOR

Arthur Axel fREW Schmidt <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Arthur Axel fREW Schmidt.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

893 - Linux cli command zip_get_name

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_get_name and provides detailed information about the command zip_get_name, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_get_name.

libzip (-lzip)

The

function returns the name of the file at position

in

The name is in UTF-8 encoding unless

was specified (see below).

If

is set to

the original unchanged filename is returned. The returned string must not be modified or freed, and becomes invalid when

is closed.

Additionally, the following

are supported:

Return the unmodified names as it is in the ZIP archive.

(Default.) Guess the encoding of the name in the ZIP archive and convert it to UTF-8, if necessary.

Follow the ZIP specification and expect CP-437 encoded names in the ZIP archive (except if they are explicitly marked as UTF-8). Convert it to UTF-8.

ASCII is a subset of both CP-437 and UTF-8.

Upon successful completion, a pointer to the name is returned. Otherwise,

and the error code in

is set to indicate the error.

fails if:

refers to a file that has been deleted (see

is not a valid file index in

or

points to an added file and

is set.

Required memory could not be allocated.

was added in libzip 0.6. In libzip 0.10 the type of

was changed from

to

In libzip 0.11 the type of

was changed from

to

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

894 - Linux cli command isfinite

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isfinite and provides detailed information about the command isfinite, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isfinite.

NAME 🖥️ isfinite 🖥️

floating-point classification macros

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
int fpclassify(x);
int isfinite(x);
int isnormal(x);
int isnan(x);
int isinf(x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

fpclassify(), isfinite(), isnormal():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

isnan():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isinf():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

Floating point numbers can have special values, such as infinite or NaN. With the macro fpclassify(x) you can find out what type x is. The macro takes any floating-point expression as argument. The result is one of the following values:

FP_NAN
x is “Not a Number”.

FP_INFINITE
x is either positive infinity or negative infinity.

FP_ZERO
x is zero.

FP_SUBNORMAL
x is too small to be represented in normalized format.

FP_NORMAL
if nothing of the above is correct then it must be a normal floating-point number.

The other macros provide a short answer to some standard questions.

isfinite(x)
returns a nonzero value if
(fpclassify(x) != FP_NAN && fpclassify(x) != FP_INFINITE)

isnormal(x)
returns a nonzero value if (fpclassify(x) == FP_NORMAL)

isnan(x)
returns a nonzero value if (fpclassify(x) == FP_NAN)

isinf(x)
returns 1 if x is positive infinity, and -1 if x is negative infinity.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fpclassify(), isfinite(), isnormal(), isnan(), isinf()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

In glibc 2.01 and earlier, isinf() returns a nonzero value (actually: 1) if x is positive infinity or negative infinity. (This is all that C99 requires.)

NOTES

For isinf(), the standards merely say that the return value is nonzero if and only if the argument has an infinite value.

SEE ALSO

finite(3), INFINITY(3), isgreater(3), signbit(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

895 - Linux cli command openlog

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command openlog and provides detailed information about the command openlog, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the openlog.

NAME 🖥️ openlog 🖥️

send messages to the system logger

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <syslog.h>
void openlog(const char *ident, int option, int facility);
void syslog(int priority, const char *format, ...);
void closelog(void);
void vsyslog(int priority, const char *format, va_list ap);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

vsyslog():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

openlog()

openlog() opens a connection to the system logger for a program.

The string pointed to by ident is prepended to every message, and is typically set to the program name. If ident is NULL, the program name is used. (POSIX.1-2008 does not specify the behavior when ident is NULL.)

The option argument specifies flags which control the operation of openlog() and subsequent calls to syslog(). The facility argument establishes a default to be used if none is specified in subsequent calls to syslog(). The values that may be specified for option and facility are described below.

The use of openlog() is optional; it will automatically be called by syslog() if necessary, in which case ident will default to NULL.

syslog() and vsyslog()

syslog() generates a log message, which will be distributed by syslogd(8).

The priority argument is formed by ORing together a facility value and a level value (described below). If no facility value is ORed into priority, then the default value set by openlog() is used, or, if there was no preceding openlog() call, a default of LOG_USER is employed.

The remaining arguments are a format, as in printf(3), and any arguments required by the format, except that the two-character sequence %m will be replaced by the error message string strerror(errno). The format string need not include a terminating newline character.

The function vsyslog() performs the same task as syslog() with the difference that it takes a set of arguments which have been obtained using the stdarg(3) variable argument list macros.

closelog()

closelog() closes the file descriptor being used to write to the system logger. The use of closelog() is optional.

Values for option

The option argument to openlog() is a bit mask constructed by ORing together any of the following values:

LOG_CONS
Write directly to the system console if there is an error while sending to the system logger.

LOG_NDELAY
Open the connection immediately (normally, the connection is opened when the first message is logged). This may be useful, for example, if a subsequent chroot(2) would make the pathname used internally by the logging facility unreachable.

LOG_NOWAIT
Don’t wait for child processes that may have been created while logging the message. (The GNU C library does not create a child process, so this option has no effect on Linux.)

LOG_ODELAY
The converse of LOG_NDELAY; opening of the connection is delayed until syslog() is called. (This is the default, and need not be specified.)

LOG_PERROR
(Not in POSIX.1-2001 or POSIX.1-2008.) Also log the message to stderr.

LOG_PID
Include the caller’s PID with each message.

Values for facility

The facility argument is used to specify what type of program is logging the message. This lets the configuration file specify that messages from different facilities will be handled differently.

LOG_AUTH
security/authorization messages

LOG_AUTHPRIV
security/authorization messages (private)

LOG_CRON
clock daemon (cron and at)

LOG_DAEMON
system daemons without separate facility value

LOG_FTP
ftp daemon

LOG_KERN
kernel messages (these can’t be generated from user processes)

LOG_LOCAL0 through LOG_LOCAL7
reserved for local use

LOG_LPR
line printer subsystem

LOG_MAIL
mail subsystem

LOG_NEWS
USENET news subsystem

LOG_SYSLOG
messages generated internally by syslogd(8)

LOG_USER (default)
generic user-level messages

LOG_UUCP
UUCP subsystem

Values for level

This determines the importance of the message. The levels are, in order of decreasing importance:

LOG_EMERG
system is unusable

LOG_ALERT
action must be taken immediately

LOG_CRIT
critical conditions

LOG_ERR
error conditions

LOG_WARNING
warning conditions

LOG_NOTICE
normal, but significant, condition

LOG_INFO
informational message

LOG_DEBUG
debug-level message

The function setlogmask(3) can be used to restrict logging to specified levels only.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

openlog(), closelog()

Thread safetyMT-Safe

syslog(), vsyslog()

Thread safetyMT-Safe env locale

STANDARDS

syslog()
openlog()
closelog()
POSIX.1-2008.

vsyslog()
None.

HISTORY

syslog()
4.2BSD, SUSv2, POSIX.1-2001.

openlog()
closelog()
4.3BSD, SUSv2, POSIX.1-2001.

vsyslog()
4.3BSD-Reno.

POSIX.1-2001 specifies only the LOG_USER and LOG_LOCAL* values for facility. However, with the exception of LOG_AUTHPRIV and LOG_FTP, the other facility values appear on most UNIX systems.

The LOG_PERROR value for option is not specified by POSIX.1-2001 or POSIX.1-2008, but is available in most versions of UNIX.

NOTES

The argument ident in the call of openlog() is probably stored as-is. Thus, if the string it points to is changed, syslog() may start prepending the changed string, and if the string it points to ceases to exist, the results are undefined. Most portable is to use a string constant.

Never pass a string with user-supplied data as a format, use the following instead:

syslog(priority, "%s", string);

SEE ALSO

journalctl(1), logger(1), setlogmask(3), syslog.conf(5), syslogd(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

896 - Linux cli command xdr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr and provides detailed information about the command xdr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr.

NAME 🖥️ xdr 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

897 - Linux cli command register_printf_type

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command register_printf_type and provides detailed information about the command register_printf_type, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the register_printf_type.

NAME 🖥️ register_printf_type 🖥️

define custom behavior for printf-like functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <printf.h>
int register_printf_specifier(int spec, printf_function func,
 printf_arginfo_size_function arginfo);
int register_printf_modifier(const wchar_t *str);
int register_printf_type(printf_va_arg_function fct);

Callbacks

typedef int printf_function(FILE *stream, const struct printf_info *info,
 const void *const args[]);
typedef int printf_arginfo_size_function(const struct printf_info *info,
 size_t n, int argtypes[n], int size[n]);
typedef void printf_va_arg_function(void *mem, va_list *ap);

Types

struct printf_info {
 int prec; // Precision
 int width; // Width
 wchar_t spec; // Format letter
 unsigned int is_long_double:1;// L or ll flag
 unsigned int is_short:1; // h flag
 unsigned int is_long:1; // l flag
 unsigned int alt:1; // # flag
 unsigned int space:1; // Space flag
 unsigned int left:1; // - flag
 unsigned int showsign:1; // + flag
 unsigned int group:1; // ' flag
 unsigned int extra:1; // For special use
 unsigned int is_char:1; // hh flag
 unsigned int wide:1; // True for wide character streams
 unsigned int i18n:1; // I flag
 unsigned int is_binary128:1; /* Floating-point argument is
  ABI-compatible with
  IEC 60559 binary128 */
 unsigned short user; // Bits for user-installed modifiers
 wchar_t pad; // Padding character
};

Constants

#define PA_FLAG_LONG_LONG /* ... */
#define PA_FLAG_LONG_DOUBLE /* ... */
#define PA_FLAG_LONG /* ... */
#define PA_FLAG_SHORT /* ... */
#define PA_FLAG_PTR /* ... */

DESCRIPTION

These functions serve to extend and/or modify the behavior of the printf(3) family of functions.

register_printf_specifier()

This function registers a custom conversion specifier for the printf(3) family of functions.

spec
The character which will be used as a conversion specifier in the format string.

func
Callback function that will be executed by the printf(3) family of functions to format the input arguments into the output stream.

stream
Output stream where the formatted output should be printed. This stream transparently represents the output, even in the case of functions that write to a string.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in arginfo.

args
Array of pointers to the arguments to the printf(3) -like function.

arginfo
Callback function that will be executed by the printf(3) family of functions to know how many arguments should be parsed for the custom specifier and also their types.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in func.

n
Number of arguments remaining to be parsed.

argtypes
This array should be set to define the type of each of the arguments that will be parsed. Each element in the array represents one of the arguments to be parsed, in the same order that they are passed to the printf(3) -like function. Each element should be set to a base type (PA_*) from the enum above, or a custom one, and optionally ORed with an appropriate length modifier (PA_FLAG_*).

The type is determined by using one of the following constants:

PA_INT
int.

PA_CHAR
int, cast to char.

PA_WCHAR
wchar_t.

PA_STRING
const char *, a ‘�’-terminated string.

PA_WSTRING
const wchar_t *, a wide character L’�’-terminated string.

PA_POINTER
void *.

PA_FLOAT
float.

PA_DOUBLE
double.

PA_LAST
TODO.

size
For user-defined types, the size of the type (in bytes) should also be specified through this array. Otherwise, leave it unused.

arginfo is called before func, and prepares some information needed to call func.

register_printf_modifier()

TODO

register_printf_type()

TODO

RETURN VALUE

register_printf_specifier(), register_printf_modifier(), and register_printf_type() return zero on success, or -1 on error.

Callbacks

The callback of type printf_function should return the number of characters written, or -1 on error.

The callback of type printf_arginfo_size_function should return the number of arguments to be parsed by this specifier. It also passes information about the type of those arguments to the caller through argtypes. On error, it should return -1.

ERRORS

EINVAL
The specifier was not a valid character.

STANDARDS

GNU.

HISTORY

register_printf_function(3) is an older function similar to register_printf_specifier(), and is now deprecated. That function can’t handle user-defined types.

register_printf_specifier() supersedes register_printf_function(3).

EXAMPLES

The following example program registers the ‘b’ and ‘B’ specifiers to print integers in binary format, mirroring rules for other unsigned conversion specifiers like ‘x’ and ‘u’. This can be used to print in binary prior to C23.

/* This code is in the public domain */
#include <err.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <printf.h>
#define GROUP_SEP  '\''
struct Printf_Pad {
    char    ch;
    size_t  len;
};
static int b_printf(FILE *stream, const struct printf_info *info,
                    const void *const args[]);
static int b_arginf_sz(const struct printf_info *info,
                    size_t n, int argtypes[n], int size[n]);
static uintmax_t b_value(const struct printf_info *info,
                    const void *arg);
static size_t b_bin_repr(char bin[UINTMAX_WIDTH],
                    const struct printf_info *info, const void *arg);
static size_t b_bin_len(const struct printf_info *info,
                    ptrdiff_t min_len);
static size_t b_pad_len(const struct printf_info *info,
                    ptrdiff_t bin_len);
static ssize_t b_print_prefix(FILE *stream,
                    const struct printf_info *info);
static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info,
                    ptrdiff_t min_len);
static ssize_t b_print_number(FILE *stream,
                    const struct printf_info *info,
                    const char bin[UINTMAX_WIDTH],
                    size_t min_len, size_t bin_len);
static char pad_ch(const struct printf_info *info);
static ssize_t pad_spaces(FILE *stream, size_t pad_len);
int
main(void)
{
    if (register_printf_specifier('b', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('b', ...)");
    if (register_printf_specifier('B', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('B', ...)");
    printf("....----....----....----....----

“); printf("%llb; “, 0x5Ellu); printf("%lB; “, 0x5Elu); printf("%b; “, 0x5Eu); printf("%hB; “, 0x5Eu); printf("%hhb; “, 0x5Eu); printf("%jb; “, (uintmax_t)0x5E); printf("%zb; “, (size_t)0x5E); printf(”….—-….—-….—-….—- “); printf(”%#b; “, 0x5Eu); printf(”%#B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf("%10b; “, 0x5Eu); printf("%010b; “, 0x5Eu); printf(”%.10b; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%-10B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%‘B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”….—-….—-….—-….—- “); printf(”%#16.12b; “, 0xAB); printf(”%-#‘20.12b; “, 0xAB); printf(”%#‘020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#020B; “, 0xAB); printf(”%‘020B; “, 0xAB); printf("%020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#021B; “, 0xAB); printf(”%‘021B; “, 0xAB); printf("%021B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#022B; “, 0xAB); printf(”%‘022B; “, 0xAB); printf("%022B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#023B; “, 0xAB); printf(”%‘023B; “, 0xAB); printf("%023B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%-#‘19.11b; “, 0xAB); printf(”%#‘019B; “, 0xAB); printf(”%#019B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%‘019B; “, 0xAB); printf("%019B; “, 0xAB); printf(”%#016b; “, 0xAB); printf(”….—-….—-….—-….—- “); return 0; } static int b_printf(FILE *stream, const struct printf_info *info, const void const args[]) { char bin[UINTMAX_WIDTH]; size_t min_len, bin_len; ssize_t len, tmp; struct Printf_Pad pad = {0}; len = 0; min_len = b_bin_repr(bin, info, args[0]); bin_len = b_bin_len(info, min_len); pad.ch = pad_ch(info); if (pad.ch == ’ ‘) pad.len = b_pad_len(info, bin_len); / Padding with ’ ’ (right aligned) / if ((pad.ch == ’ ‘) && !info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } / “0b”/“0B” prefix / if (info->alt) { tmp = b_print_prefix(stream, info); if (tmp == EOF) return EOF; len += tmp; } / Padding with ‘0’ / if (pad.ch == ‘0’) { tmp = b_pad_zeros(stream, info, min_len); if (tmp == EOF) return EOF; len += tmp; } / Print number (including leading 0s to fill precision) / tmp = b_print_number(stream, info, bin, min_len, bin_len); if (tmp == EOF) return EOF; len += tmp; / Padding with ’ ’ (left aligned) */ if (info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } return len; } static int b_arginf_sz(const struct printf_info *info, size_t n, int argtypes[n], [[maybe_unused]] int size[n]) { if (n < 1) return -1; if (info->is_long_double) argtypes[0] = PA_INT | PA_FLAG_LONG_LONG; else if (info->is_long) argtypes[0] = PA_INT | PA_FLAG_LONG; else argtypes[0] = PA_INT; return 1; } static uintmax_t b_value(const struct printf_info *info, const void *arg) { if (info->is_long_double) return *(const unsigned long long *)arg; if (info->is_long) return *(const unsigned long )arg; / short and char are both promoted to int */ return *(const unsigned int *)arg; } static size_t b_bin_repr(char bin[UINTMAX_WIDTH], const struct printf_info *info, const void *arg) { size_t min_len; uintmax_t val; val = b_value(info, arg); bin[0] = ‘0’; for (min_len = 0; val; min_len++) { bin[min_len] = ‘0’ + (val % 2); val »= 1; } return MAX(min_len, 1); } static size_t b_bin_len(const struct printf_info *info, ptrdiff_t min_len) { return MAX(info->prec, min_len); } static size_t b_pad_len(const struct printf_info *info, ptrdiff_t bin_len) { ptrdiff_t pad_len; pad_len = info->width - bin_len; if (info->alt) pad_len -= 2; if (info->group) pad_len -= (bin_len - 1) / 4; return MAX(pad_len, 0); } static ssize_t b_print_prefix(FILE *stream, const struct printf_info *info) { ssize_t len; len = 0; if (fputc(‘0’, stream) == EOF) return EOF; len++; if (fputc(info->spec, stream) == EOF) return EOF; len++; return len; } static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info, ptrdiff_t min_len) { ssize_t len; ptrdiff_t tmp; len = 0; tmp = info->width - (info->alt * 2); if (info->group) tmp -= tmp / 5 - !(tmp % 5); for (ptrdiff_t i = tmp - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static ssize_t b_print_number(FILE *stream, const struct printf_info info, const char bin[UINTMAX_WIDTH], size_t min_len, size_t bin_len) { ssize_t len; len = 0; / Print leading zeros to fill precision / for (size_t i = bin_len - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } / Print number */ for (size_t i = min_len - 1; i < min_len; i–) { if (fputc(bin[i], stream) == EOF) return EOF; len++; if (!info->group || (i % 4) || !i) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static char pad_ch(const struct printf_info *info) { if ((info->prec != -1) || (info->pad == ’ ‘) || info->left) return ’ ‘; return ‘0’; } static ssize_t pad_spaces(FILE *stream, size_t pad_len) { ssize_t len; len = 0; for (size_t i = pad_len - 1; i < pad_len; i–) { if (fputc(’ ‘, stream) == EOF) return EOF; len++; } return len; }

SEE ALSO

asprintf(3), printf(3), wprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

898 - Linux cli command strncat

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strncat and provides detailed information about the command strncat, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strncat.

NAME 🖥️ strncat 🖥️

append non-null bytes from a source array to a string, and null-terminate the result

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strncat(char *restrict dst, const char src[restrict .ssize],
 size_t ssize);

DESCRIPTION

This function appends at most ssize non-null bytes from the array pointed to by src, followed by a null character, to the end of the string pointed to by dst. dst must point to a string contained in a buffer that is large enough, that is, the buffer size must be at least strlen(dst) + strnlen(src, ssize) + 1.

An implementation of this function might be:

char *
strncat(char *restrict dst, const char *restrict src, size_t ssize)
{
    #define strnul(s)  (s + strlen(s))
    stpcpy(mempcpy(strnul(dst), src, strnlen(src, ssize)), "");
    return dst;
}

RETURN VALUE

strncat() returns dst.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strncat()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89, SVr4, 4.3BSD.

CAVEATS

The name of this function is confusing; it has no relation to strncpy(3).

If the destination buffer does not already contain a string, or is not large enough, the behavior is undefined. See _FORTIFY_SOURCE in feature_test_macros(7).

BUGS

This function can be very inefficient. Read about Shlemiel the painter.

EXAMPLES

#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define nitems(arr)  (sizeof((arr)) / sizeof((arr)[0]))
int
main(void)
{
    size_t  n;
    // Null-padded fixed-size character sequences
    char    pre[4] = "pre.";
    char    new_post[50] = ".foo.bar";
    // Strings
    char    post[] = ".post";
    char    src[] = "some_long_body.post";
    char    *dest;
    n = nitems(pre) + strlen(src) - strlen(post) + nitems(new_post) + 1;
    dest = malloc(sizeof(*dest) * n);
    if (dest == NULL)
        err(EXIT_FAILURE, "malloc()");
    dest[0] = '';  // There's no 'cpy' function to this 'cat'.
    strncat(dest, pre, nitems(pre));
    strncat(dest, src, strlen(src) - strlen(post));
    strncat(dest, new_post, nitems(new_post));
    puts(dest);  // "pre.some_long_body.foo.bar"
    free(dest);
    exit(EXIT_SUCCESS);
}

SEE ALSO

string(3), string_copying(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

899 - Linux cli command XML_DOM_XMLDeclpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_DOM_XMLDeclpm and provides detailed information about the command XML_DOM_XMLDeclpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_DOM_XMLDeclpm.

NAME 🖥️ XML_DOM_XMLDeclpm 🖥️

XML declaration in XML::DOM

DESCRIPTION

XML::DOM::XMLDecl extends XML::DOM::Node, but is not part of the DOM Level 1 specification.

It contains the XML declaration, e.g.

<?xml version=“1.0” encoding=“UTF-16” standalone=“yes”?>

See also XML::DOM::Document::getXMLDecl.

METHODS

getVersion and setVersion (version)
Returns and sets the XML version. At the time of this writing the version should always be 1.0

getEncoding and setEncoding (encoding)
undef may be specified for the encoding value.

getStandalone and setStandalone (standalone)
undef may be specified for the standalone value.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

900 - Linux cli command sys_siglist

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sys_siglist and provides detailed information about the command sys_siglist, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sys_siglist.

NAME 🖥️ sys_siglist 🖥️

return string describing signal

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strsignal(int sig);
const char *sigdescr_np(int sig);
const char *sigabbrev_np(int sig);
[[deprecated]] extern const char *const sys_siglist[];

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sigabbrev_np(), sigdescr_np():

    _GNU_SOURCE

strsignal():

    From glibc 2.10 to glibc 2.31:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

sys_siglist:

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The strsignal() function returns a string describing the signal number passed in the argument sig. The string can be used only until the next call to strsignal(). The string returned by strsignal() is localized according to the LC_MESSAGES category in the current locale.

The sigdescr_np() function returns a string describing the signal number passed in the argument sig. Unlike strsignal() this string is not influenced by the current locale.

The sigabbrev_np() function returns the abbreviated name of the signal, sig. For example, given the value SIGINT, it returns the string “INT”.

The (deprecated) array sys_siglist holds the signal description strings indexed by signal number. The strsignal() or the sigdescr_np() function should be used instead of this array; see also VERSIONS.

RETURN VALUE

The strsignal() function returns the appropriate description string, or an unknown signal message if the signal number is invalid. On some systems (but not on Linux), NULL may instead be returned for an invalid signal number.

The sigdescr_np() and sigabbrev_np() functions return the appropriate description string. The returned string is statically allocated and valid for the lifetime of the program. These functions return NULL for an invalid signal number.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strsignal()

Thread safety

MT-Unsafe race:strsignal locale

sigdescr_np(), sigabbrev_np()

Thread safetyMT-Safe

STANDARDS

strsignal()
POSIX.1-2008.

sigdescr_np()
sigabbrev_np()
GNU.

sys_siglist
None.

HISTORY

strsignal()
POSIX.1-2008. Solaris, BSD.

sigdescr_np()
sigabbrev_np()
glibc 2.32.

sys_siglist
Removed in glibc 2.32.

NOTES

sigdescr_np() and sigabbrev_np() are thread-safe and async-signal-safe.

SEE ALSO

psignal(3), strerror(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

901 - Linux cli command XtStringConversionWarning

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtStringConversionWarning and provides detailed information about the command XtStringConversionWarning, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtStringConversionWarning.

NAME 🖥️ XtStringConversionWarning 🖥️

issue a conversion warning message

SYNTAX

#include <X11/Intrinsic.h>

void XtStringConversionWarning(const char *src, const char *dst_type);

ARGUMENTS

src
Specifies the string that could not be converted.

dst_type
Specifies the name of the type to which the string could not be converted.

DESCRIPTION

The XtStringConversionWarning function issues a warning message with name conversionError, type string, class XtToolkitError, and the default message string Cannot convert “src” to type dst_type.

XtStringConversionWarning has been replaced by XtDisplayStringConversionWarning.

SEE ALSO

XtAppAddConverter(3), XtAppErrorMsg(3t), XtConvert(3), XtDisplayStringConversionWarning(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

902 - Linux cli command gcvt

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gcvt and provides detailed information about the command gcvt, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gcvt.

NAME 🖥️ gcvt 🖥️

convert a floating-point number to a string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
char *gcvt(double number, int ndigit, char *buf);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

gcvt():

    Since glibc 2.17
        (_XOPEN_SOURCE >= 500 && ! (_POSIX_C_SOURCE >= 200809L))
            || /* glibc >= 2.20 */ _DEFAULT_SOURCE
            || /* glibc <= 2.19 */ _SVID_SOURCE
    glibc 2.12 to glibc 2.16:
        (_XOPEN_SOURCE >= 500 && ! (_POSIX_C_SOURCE >= 200112L))
            || _SVID_SOURCE
    Before glibc 2.12:
        _SVID_SOURCE || _XOPEN_SOURCE >= 500

DESCRIPTION

The gcvt() function converts number to a minimal length null-terminated ASCII string and stores the result in buf. It produces ndigit significant digits in either printf(3) F format or E format.

RETURN VALUE

The gcvt() function returns buf.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

gcvt()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

Marked as LEGACY in POSIX.1-2001. POSIX.1-2008 removed it, recommending the use of sprintf(3) instead (though snprintf(3) may be preferable).

SEE ALSO

ecvt(3), fcvt(3), sprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

903 - Linux cli command Net_DNS_RR_HINFOpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_HINFOpm and provides detailed information about the command Net_DNS_RR_HINFOpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_HINFOpm.

NAME 🖥️ Net_DNS_RR_HINFOpm 🖥️

DNS HINFO resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name HINFO cpu os);

DESCRIPTION

Class for DNS Hardware Information (HINFO) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

cpu

$cpu = $rr->cpu; $rr->cpu( $cpu );

Returns the CPU type for this RR.

os

$os = $rr->os; $rr->os( $os );

Returns the operating system type for this RR.

COPYRIGHT

Copyright (c)1997 Michael Fuhr.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC1035(3.3.2) <https://tools.ietf.org/html/rfc1035>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

904 - Linux cli command wmemcpy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wmemcpy and provides detailed information about the command wmemcpy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wmemcpy.

NAME 🖥️ wmemcpy 🖥️

copy an array of wide-characters

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
wchar_t *wmemcpy(wchar_t dest[restrict .n],
 const wchar_t src[restrict .n],
 size_t n);

DESCRIPTION

The wmemcpy() function is the wide-character equivalent of the memcpy(3) function. It copies n wide characters from the array starting at src to the array starting at dest.

The arrays may not overlap; use wmemmove(3) to copy between overlapping arrays.

The programmer must ensure that there is room for at least n wide characters at dest.

RETURN VALUE

wmemcpy() returns dest.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wmemcpy()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

memcpy(3), wcscpy(3), wmemmove(3), wmempcpy(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

905 - Linux cli command imaxdiv

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command imaxdiv and provides detailed information about the command imaxdiv, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the imaxdiv.

NAME 🖥️ imaxdiv 🖥️

compute quotient and remainder of an integer division

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
div_t div(int numerator, int denominator);
ldiv_t ldiv(long numerator, long denominator);
lldiv_t lldiv(long long numerator, long long denominator);
#include <inttypes.h>
imaxdiv_t imaxdiv(intmax_t numerator, intmax_t denominator);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

lldiv():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The div() function computes the value numerator/denominator and returns the quotient and remainder in a structure named div_t that contains two integer members (in unspecified order) named quot and rem. The quotient is rounded toward zero. The result satisfies quot*denominator+rem = numerator.

The ldiv(), lldiv(), and imaxdiv() functions do the same, dividing numbers of the indicated type and returning the result in a structure of the indicated name, in all cases with fields quot and rem of the same type as the function arguments.

RETURN VALUE

The div_t (etc.) structure.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

div(), ldiv(), lldiv(), imaxdiv()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89, C99, SVr4, 4.3BSD.

lldiv() and imaxdiv() were added in C99.

EXAMPLES

After

div_t q = div(-5, 3);

the values q.quot and q.rem are -1 and -2, respectively.

SEE ALSO

abs(3), remainder(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

906 - Linux cli command IO_InnerFilepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_InnerFilepm and provides detailed information about the command IO_InnerFilepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_InnerFilepm.

NAME 🖥️ IO_InnerFilepm 🖥️

define a file inside another file

SYNOPSIS

use strict; use warnings; use IO::InnerFile; # Read a subset of a file: my $fh = _some_file_handle; my $start = 10; my $length = 50; my $inner = IO::InnerFile->new($fh, $start, $length); while (my $line = <$inner>) { # … }

DESCRIPTION

If you have a file handle that can seek and tell, then you can open an IO::InnerFile on a range of the underlying file.

CONSTRUCTORS

IO::InnerFile implements the following constructors.

new

my $inner = IO::InnerFile->new($fh); $inner = IO::InnerFile->new($fh, 10); $inner = IO::InnerFile->new($fh, 10, 50);

Create a new IO::InnerFile opened on the given file handle. The file handle supplied MUST be able to both seek and tell.

The second and third parameters are start and length. Both are defaulted to zero (0). Negative values are silently coerced to zero.

METHODS

IO::InnerFile implements the following methods.

add_length

$inner->add_length(30);

Add to the virtual length of the inner file by the number given in bytes.

add_start

$inner->add_start(30);

Add to the virtual position of the inner file by the number given in bytes.

binmode

$inner->binmode();

This is a NOOP method just to satisfy the normal IO::File interface.

close

fileno

$inner->fileno();

This is a NOOP method just to satisfy the normal IO::File interface.

flush

$inner->flush();

This is a NOOP method just to satisfy the normal IO::File interface.

get_end

my $num_bytes = $inner->get_end();

Get the virtual end position of the inner file in bytes.

get_length

my $num_bytes = $inner->get_length();

Get the virtual length of the inner file in bytes.

get_start

my $num_bytes = $inner->get_start();

Get the virtual position of the inner file in bytes.

getc

getline

printf

read

readline

seek

set_end

$inner->set_end(30);

Set the virtual end of the inner file in bytes (this basically just alters the length).

set_length

$inner->set_length(30);

Set the virtual length of the inner file in bytes.

set_start

$inner->set_start(30);

Set the virtual start position of the inner file in bytes.

tell

write

AUTHOR

Eryq ([email protected]). President, ZeeGee Software Inc (http://www.zeegee.com).

CONTRIBUTORS

Dianne Skoll ([email protected]).

COPYRIGHT & LICENSE

Copyright (c) 1997 Erik (Eryq) Dorfman, ZeeGee Software, Inc. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

907 - Linux cli command Spiffypm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spiffypm and provides detailed information about the command Spiffypm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spiffypm.

NAME 🖥️ Spiffypm 🖥️

Spiffy Perl Interface Framework For You

SYNOPSIS

package Keen; use Spiffy -Base; field mirth; const mood => :-); sub happy { if ($self->mood eq :-() { $self->mirth(-1); print “Cheer up!”; } super; }

DESCRIPTION

Spiffy is a framework and methodology for doing object oriented (OO) programming in Perl. Spiffy combines the best parts of Exporter.pm, base.pm, mixin.pm and SUPER.pm into one magic foundation class. It attempts to fix all the nits and warts of traditional Perl OO, in a clean, straightforward and (perhaps someday) standard way.

Spiffy borrows ideas from other OO languages like Python, Ruby, Java and Perl 6. It also adds a few tricks of its own.

If you take a look on CPAN, there are a ton of OO related modules. When starting a new project, you need to pick the set of modules that makes most sense, and then you need to use those modules in each of your classes. Spiffy, on the other hand, has everything you’ll probably need in one module, and you only need to use it once in one of your classes. If you make Spiffy.pm the base class of the basest class in your project, Spiffy will automatically pass all of its magic to all of your subclasses. You may eventually forget that you’re even using it!

The most striking difference between Spiffy and other Perl object oriented base classes, is that it has the ability to export things. If you create a subclass of Spiffy, all the things that Spiffy exports will automatically be exported by your subclass, in addition to any more things that you want to export. And if someone creates a subclass of your subclass, all of those things will be exported automatically, and so on. Think of it as Inherited Exportation, and it uses the familiar Exporter.pm specification syntax.

To use Spiffy or any subclass of Spiffy as a base class of your class, you specify the -base argument to the use command.

use MySpiffyBaseModule -base;

You can also use the traditional use base MySpiffyBaseModule; syntax and everything will work exactly the same. The only caveat is that Spiffy.pm must already be loaded. That’s because Spiffy rewires base.pm on the fly to do all the Spiffy magics.

Spiffy has support for Ruby-like mixins with Perl6-like roles. Just like base you can use either of the following invocations:

use mixin MySpiffyBaseModule; use MySpiffyBaseModule -mixin;

The second version will only work if the class being mixed in is a subclass of Spiffy. The first version will work in all cases, as long as Spiffy has already been loaded.

To limit the methods that get mixed in, use roles. (Hint: they work just like an Exporter list):

use MySpiffyBaseModule -mixin => qw(:basics x y !foo);

In object oriented Perl almost every subroutine is a method. Each method gets the object passed to it as its first argument. That means practically every subroutine starts with the line:

my $self = shift;

Spiffy provides a simple, optional filter mechanism to insert that line for you, resulting in cleaner code. If you figure an average method has 10 lines of code, that’s 10% of your code! To turn this option on, you just use the - Base option instead of the -base option, or add the -selfless option. If source filtering makes you queazy, don’t use the feature. I personally find it addictive in my quest for writing squeaky clean, maintainable code.

A useful feature of Spiffy is that it exports two functions: field and const that can be used to declare the attributes of your class, and automatically generate accessor methods for them. The only difference between the two functions is that const attributes can not be modified; thus the accessor is much faster.

One interesting aspect of OO programming is when a method calls the same method from a parent class. This is generally known as calling a super method. Perl’s facility for doing this is butt ugly:

sub cleanup { my $self = shift; $self->scrub; $self->SUPER::cleanup(@_); }

Spiffy makes it, er, super easy to call super methods. You just use the super function. You don’t need to pass it any arguments because it automatically passes them on for you. Here’s the same function with Spiffy:

sub cleanup { $self->scrub; super; }

Spiffy has a special method for parsing arguments called parse_arguments, that it also uses for parsing its own arguments. You declare which arguments are boolean (singletons) and which ones are paired, with two special methods called boolean_arguments and paired_arguments. Parse arguments pulls out the booleans and pairs and returns them in an anonymous hash, followed by a list of the unmatched arguments.

Finally, Spiffy can export a few debugging functions WWW, XXX, YYY and ZZZ. Each of them produces a YAML dump of its arguments. WWW warns the output, XXX dies with the output, YYY prints the output, and ZZZ confesses the output. If YAML doesn’t suit your needs, you can switch all the dumps to Data::Dumper format with the -dumper option.

That’s Spiffy!

EXPORTING

Spiffy implements a completely new idea in Perl. Modules that act both as object oriented classes and that also export functions. But it takes the concept of Exporter.pm one step further; it walks the entire @ISA path of a class and honors the export specifications of each module. Since Spiffy calls on the Exporter module to do this, you can use all the fancy interface features that Exporter has, including tags and negation.

Spiffy considers all the arguments that don’t begin with a dash to comprise the export specification.

package Vehicle; use Spiffy -base; our $SERIAL_NUMBER = 0; our @EXPORT = qw($SERIAL_NUMBER); our @EXPORT_BASE = qw(tire horn); package Bicycle; use Vehicle -base, !field; $self->inflate(tire);

In this case, Bicycle->isa(Vehicle) and also all the things that Vehicle and Spiffy export, will go into Bicycle, except field.

Exporting can be very helpful when you’ve designed a system with hundreds of classes, and you want them all to have access to some functions or constants

or variables. Just export them in your main base class and every subclass

will get the functions they need.

You can do almost everything that Exporter does because Spiffy delegates the job to Exporter (after adding some Spiffy magic). Spiffy offers a @EXPORT_BASE variable which is like @EXPORT, but only for usages that use -base.

MIXINS & ROLES

If you’ve done much OO programming in Perl you’ve probably used Multiple Inheritance (MI), and if you’ve done much MI you’ve probably run into weird problems and headaches. Some languages like Ruby, attempt to resolve MI issues using a technique called mixins. Basically, all Ruby classes use only Single Inheritance (SI), and then mixin functionality from other modules if they need to.

Mixins can be thought of at a simplistic level as importing the methods of another class into your subclass. But from an implementation standpoint that’s not the best way to do it. Spiffy does what Ruby does. It creates an empty anonymous class, imports everything into that class, and then chains the new class into your SI ISA path. In other words, if you say:

package AAA; use BBB -base; use CCC -mixin; use DDD -mixin;

You end up with a single inheritance chain of classes like this:

AAA << AAA-DDD << AAA-CCC << BBB;

AAA-DDD and AAA-CCC are the actual package names of the generated classes. The nice thing about this style is that mixing in CCC doesn’t clobber any methods in AAA, and DDD doesn’t conflict with AAA or CCC either. If you mixed in a method in CCC that was also in AAA, you can still get to it by using super.

When Spiffy mixes in CCC, it pulls in all the methods in CCC that do not begin with an underscore. Actually it goes farther than that. If CCC is a subclass it will pull in every method that CCC can do through inheritance. This is very powerful, maybe too powerful.

To limit what you mixin, Spiffy borrows the concept of Roles from Perl6. The term role is used more loosely in Spiffy though. It’s much like an import list that the Exporter module uses, and you can use groups (tags) and negation. If the first element of your list uses negation, Spiffy will start with all the methods that your mixin class can do.

use EEE -mixin => qw(:tools walk !run !:sharp_tools);

In this example, walk and run are methods that EEE can do, and tools and sharp_tools are roles of class EEE. How does class EEE define these roles? It very simply defines methods called _role_tools and _role_sharp_tools which return lists of more methods. (And possibly other roles!) The neat thing here is that since roles are just methods, they too can be inherited. Take that Perl6!

FILTERING

By using the -Base flag instead of -base you never need to write the line:

my $self = shift;

This statement is added to every subroutine in your class by using a source filter. The magic is simple and fast, so there is litte performance penalty for creating clean code on par with Ruby and Python.

package Example; use Spiffy -Base; sub crazy { $self->nuts; } sub wacky { } sub new() { bless [], shift; }

is exactly the same as:

package Example; use Spiffy -base; use strict;use warnings; sub crazy {my $self = shift; $self->nuts; } sub wacky {my $self = shift; } sub new { bless [], shift; } ;1;

Note that the empty parens after the subroutine new keep it from having a $self added. Also note that the extra code is added to existing lines to ensure that line numbers are not altered.

-Base also turns on the strict and warnings pragmas, and adds that annoying ‘1;’ line to your module.

PRIVATE METHODS

Spiffy now has support for private methods when you use the ‘-Base’ filter mechanism. You just declare the subs with the my keyword, and call them with a $ in front. Like this:

package Keen; use SomethingSpiffy -Base; # normal public method sub swell { $self->$stinky; } # private lexical method. uncallable from outside this file. my sub stinky { … }

SPIFFY DEBUGGING

The XXX function is very handy for debugging because you can insert it almost anywhere, and it will dump your data in nice clean YAML. Take the following statement:

my @stuff = grep { /keen/ } $self->find($a, $b);

If you have a problem with this statement, you can debug it in any of the following ways:

XXX my @stuff = grep { /keen/ } $self->find($a, $b); my @stuff = XXX grep { /keen/ } $self->find($a, $b); my @stuff = grep { /keen/ } XXX $self->find($a, $b); my @stuff = grep { /keen/ } $self->find(XXX $a, $b);

XXX is easy to insert and remove. It is also a tradition to mark uncertain areas of code with XXX. This will make the debugging dumpers easy to spot if you forget to take them out.

WWW and YYY are nice because they dump their arguments and then return the arguments. This way you can insert them into many places and still have the code run as before. Use ZZZ when you need to die with both a YAML dump and a full stack trace.

The debugging functions are exported by default if you use the -base option, but only if you have previously used the -XXX option. To export all 4 functions use the export tag:

use SomeSpiffyModule :XXX;

To force the debugging functions to use Data::Dumper instead of YAML:

use SomeSpiffyModule -dumper;

SPIFFY FUNCTIONS

This section describes the functions the Spiffy exports. The field, const, stub and super functions are only exported when you use the -base or -Base options.

field
Defines accessor methods for a field of your class: package Example; use Spiffy -Base; field foo; field bar => []; sub lalala { $self->foo(42); push @{$self->{bar}}, $self->foo; } The first parameter passed to field is the name of the attribute being defined. Accessors can be given an optional default value. This value will be returned if no value for the field has been set in the object.

const
const bar => 42; The const function is similar to <field> except that it is immutable. It also does not store data in the object. You probably always want to give a const a default value, otherwise the generated method will be somewhat useless.

stub
stub cigar; The stub function generates a method that will die with an appropriate message. The idea is that subclasses must implement these methods so that the stub methods don’t get called.

super
If this function is called without any arguments, it will call the same method that it is in, higher up in the ISA tree, passing it all the same arguments. If it is called with arguments, it will use those arguments with $self in the front. In other words, it just works like you’d expect. sub foo { super; # Same as $self->SUPER::foo(@_); super(hello); # Same as $self->SUPER::foo(hello); $self->bar(42); } sub new() { my $self = super; $self->init; return $self; } super will simply do nothing if there is no super method. Finally, super does the right thing in AUTOLOAD subroutines.

METHODS

This section lists all of the methods that any subclass of Spiffy automatically inherits.

mixin
A method to mixin a class at runtime. Takes the same arguments as use mixin …. Makes the target class a mixin of the caller. $self->mixin(SomeClass); $object->mixin(SomeOtherClass => some_method);

parse_arguments
This method takes a list of arguments and groups them into pairs. It allows for boolean arguments which may or may not have a value (defaulting to 1). The method returns a hash reference of all the pairs as keys and values in the hash. Any arguments that cannot be paired, are returned as a list. Here is an example: sub boolean_arguments { qw(-has_spots -is_yummy) } sub paired_arguments { qw(-name -size) } my ($pairs, @others) = $self->parse_arguments( red, white, -name => Ingy, -has_spots => -size => large, black, -is_yummy => 0, ); After this call, $pairs will contain: { -name => Ingy, -has_spots => 1, -size => large, -is_yummy => 0, } and @others will contain ‘red’, ‘white’, and ‘black’.

boolean_arguments
Returns the list of arguments that are recognized as being boolean. Override this method to define your own list.

paired_arguments
Returns the list of arguments that are recognized as being paired. Override this method to define your own list.

ARGUMENTS

When you use the Spiffy module or a subclass of it, you can pass it a list of arguments. These arguments are parsed using the parse_arguments method described above. The special argument -base, is used to make the current package a subclass of the Spiffy module being used.

Any non-paired parameters act like a normal import list; just like those used with the Exporter module.

USING SPIFFY WITH BASE.PM

The proper way to use a Spiffy module as a base class is with the -base parameter to the use statement. This differs from typical modules where you would want to use base.

package Something; use Spiffy::Module -base; use base NonSpiffy::Module;

Now it may be hard to keep track of what’s Spiffy and what is not. Therefore Spiffy has actually been made to work with base.pm. You can say:

package Something; use base Spiffy::Module; use base NonSpiffy::Module;

use base is also very useful when your class is not an actual module (a separate file) but just a package in some file that has already been loaded. base will work whether the class is a module or not, while the -base syntax cannot work that way, since use always tries to load a module.

base.pm Caveats

To make Spiffy work with base.pm, a dirty trick was played. Spiffy swaps base::import with its own version. If the base modules are not Spiffy, Spiffy calls the original base::import. If the base modules are Spiffy, then Spiffy does its own thing.

There are two caveats.

Spiffy must be loaded first.
If Spiffy is not loaded and use base is invoked on a Spiffy module, Spiffy will die with a useful message telling the author to read this documentation. That’s because Spiffy needed to do the import swap beforehand. If you get this error, simply put a statement like this up front in your code: use Spiffy ();

No Mixing
base.pm can take multiple arguments. And this works with Spiffy as long as all the base classes are Spiffy, or they are all non-Spiffy. If they are mixed, Spiffy will die. In this case just use separate use base statements.

SPIFFY TODO LIST

Spiffy is a wonderful way to do OO programming in Perl, but it is still a work in progress. New things will be added, and things that don’t work well, might be removed.

AUTHOR

Ingy döt Net <[email protected]>

COPYRIGHT AND LICENSE

Copyright 2004-2014. Ingy döt Net.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See <http://www.perl.com/perl/misc/Artistic.html>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

908 - Linux cli command zip_fseek

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_fseek and provides detailed information about the command zip_fseek, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_fseek.

libzip (-lzip)

The

function seeks to the specified

relative to

just like

only works on uncompressed (stored) data. When called on compressed data it will return an error.

If successful,

returns 0. Otherwise, -1 is returned.

was added in libzip 1.2.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

909 - Linux cli command IO_Allpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_Allpm and provides detailed information about the command IO_Allpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_Allpm.

NAME 🖥️ IO_Allpm 🖥️

IO::All to Larry Wall!

VERSION

This document describes IO::All version 0.87.

SYNOPSIS

First, some safe examples:

use IO::All; # Some of the many ways to read a whole file into a scalar $contents = io->file(file.txt)->slurp; # Read an entire file @files = io->dir(lib)->all; # Get a list of files $tail = io->pipe(-| tail app.log); # Open a pipe to a command $line = $tail->getline; # Read from the pipe

That said, there are a lot more things that are very convenient and will help you write code very quickly, though they should be used judiciously:

use IO::All; # Let the madness begin… # Some of the many ways to read a whole file into a scalar io(file.txt) > $contents; # Overloaded “arrow” $contents < io file.txt; # Flipped but same operation $io = io file.txt; # Create a new IO::All object $contents = $$io; # Overloaded scalar dereference $contents = $io->all; # A method to read everything $contents = $io->slurp; # Another method for that $contents = join , $io->getlines; # Join the separate lines $contents = join , map “$_ “, @$io; # Same. Overloaded array deref $io->tie; # Tie the object as a handle $contents = join , <$io>; # And use it in builtins # and the list goes on … # Other file operations: @lines = io(file.txt)->slurp; # List context slurp $content > io(file.txt); # Print to a file io(file.txt)->print($content, $more); # (ditto) $content >> io(file.txt); # Append to a file io(file.txt)->append($content); # (ditto) $content << $io; # Append to a string io(copy.txt) < io(file.txt); $ Copy a file io(file.txt) > io(copy.txt); # Invokes File::Copy io(more.txt) >> io(all.txt); # Add on to a file io(dir/) < io(file.txt); $ Copy a file to a directory io(file.txt) > io(dir/); # Invokes File::Copy io(more.txt) >> io(dir/); # Add on to a file in the dir # UTF-8 Support $contents = io(file.txt)->utf8->all; # Turn on utf8 use IO::All -utf8; # Turn on utf8 for all io $contents = io(file.txt)->all; # by default in this package. # General Encoding Support $contents = io(file.txt)->encoding(big5)->all; use IO::All -encoding => big5; # Turn on big5 for all io $contents = io(file.txt)->all; # by default in this package. # Print the path name of a file: print $io->name; # The direct method print “$io”; # Object stringifies to name print $io; # Quotes not needed here print $io->filename; # The file portion only $io->os(win32); # change the object to be a # win32 path print $io->ext; # The file extension only print $io->mimetype; # The mimetype, requires a # working File::MimeType # Read all the files/directories in a directory: $io = io(my/directory/); # Create new directory object @contents = $io->all; # Get all contents of dir @contents = @$io; # Directory as an array @contents = values %$io; # Directory as a hash push @contents, $subdir # One at a time while $subdir = $io->next; # Print the name and file type for all the contents above: print “$_ is a " . $_->type . " " # Each element of @contents for @contents; # is an IO::All object!! # Print first line of each file: print $_->getline # getline gets one line for io(dir)->all_files; # Files only # Print names of all files/dirs three directories deep: print “$_ " for $io->all(3); # Pass in the depth. Default=1 # Print names of all files/dirs recursively: print “$_ " for $io->all(0); # Zero means all the way down print “$_ " for $io->All; # Capitalized shortcut print “$_ " for $io->deep->all; # Another way # There are some special file names: print io(-); # Print STDIN to STDOUT io(-) > io(-); # Do it again io(-) < io(-); # Same. Context sensitive. “Bad puppy” > io(=); # Message to STDERR $string_file = io($); # Create string based filehandle $temp_file = io(?); # Create a temporary file # Socket operations: $server = io(localhost:5555)->fork; # Create a daemon socket $connection = $server->accept; # Get a connection socket $input < $connection; # Get some data from it “Thank you!” > $connection; # Thank the caller $connection->close; # Hang up io(:6666)->accept->slurp > io->devnull; # Take a complaint and file it # DBM database operations: $dbm = io my/database; # Create a database object print $dbm->{grocery_list}; # Hash context makes it a DBM $dbm->{todo} = $new_list; # Write to database $dbm->dbm(GDBM_file); # Demand specific DBM io(mydb)->mldbm->{env} = \ENV; # MLDBM support # Tie::File support: $io = io file.txt; $io->[42] = Line Forty Three; # Change a line print $io->[@$io / 2]; # Print middle line @$io = reverse @$io; # Reverse lines in a file # Stat functions: printf “%s %s %s “, # Print name, uid and size of $_->name, $_->uid, $_->size # contents of current directory for io(.)->all; print “$_ " for sort # Use mtime method to sort all {$b->mtime <=> $a->mtime} # files under current directory io(.)->All_Files; # by recent modification time. # File::Spec support: $contents < io->catfile(qw(dir file.txt)); # Portable IO operation # Miscellaneous: @lines = io(file.txt)->chomp->slurp; # Chomp as you slurp @chunks = io(file.txt)->separator(xxx)->slurp; # Use alternnate record sep $binary = io(file.bin)->binary->all; # Read a binary file io(a-symlink)->readlink->slurp; # Readlink returns an object print io(foo)->absolute->pathname; # Print absolute path of foo # IO::All External Plugin Methods io(“myfile”) > io->(“ftp://store.org”); # Upload a file using ftp $html < io->http(“www.google.com”); # Grab a web page io(mailto:[email protected])->print($spam); # Email a “friend” # This is just the beginning, read on…

DESCRIPTION

IO::All combines all of the best Perl IO modules into a single nifty object oriented interface to greatly simplify your everyday Perl IO idioms. It exports a single function called io, which returns a new IO::All object. And that object can do it all!

The IO::All object is a proxy for IO::File, IO::Dir, IO::Socket, Tie::File, File::Spec, File::Path, File::MimeInfo and File::ReadBackwards; as well as all the DBM and MLDBM modules. You can use most of the methods found in these classes and in IO::Handle (which they inherit from). IO::All adds dozens of other helpful idiomatic methods including file stat and manipulation functions.

IO::All is pluggable, and modules like IO::All::LWP and IO::All::Mailto add even more functionality. Optionally, every IO::All object can be tied to itself. This means that you can use most perl IO builtins on it: readline, <>, getc, print, printf, syswrite, sysread, close.

The distinguishing magic of IO::All is that it will automatically open (and close) files, directories, sockets and other IO things for you. You never need to specify the mode (<, >>, etc), since it is determined by the usage context. That means you can replace this:

open STUFF, <, ./mystuff or die “Cant open ./mystuff for input: $!”; local $/; my $stuff = <STUFF>; close STUFF;

with this:

my $stuff < io ./mystuff;

And that is a good thing!

USAGE

Normally just say:

use IO::All;

and IO::All will export a single function called io, which constructs all IO objects.

Note on “io”

The io function is a magic constructor. It is easy to use and will usually do the right thing, but can also blow up easily.

It takes a single optional argument and determines what type of IO::All subclass object to return. With no arguments it returns an IO::All object, which has no I/O methods, but has methods to construct subclass objects like IO::All::File.

In other words, these 2 statements are usually the same:

$content = io(file.txt)->all; $content = io->file(file.txt)->all;

Use the first form when you are demonstrating your Perl virtues of laziness and impatience, and use the second form when your job is on the line.

METHOD ROLE CALL

Here is an alphabetical list of all the public methods that you can call on an IO::All object.

abs2rel, absolute, accept, All, all, All_Dirs, all_dirs, All_Files, all_files, All_Links, all_links, append, appendf, appendln, assert, atime, autoclose, autoflush, backwards, bcc, binary, binmode, blksize, blocks, block_size, buffer, canonpath, case_tolerant, catdir, catfile, catpath, cc, chdir, chomp, clear, close, confess, content, copy, ctime, curdir, dbm, deep, device, device_id, devnull, dir, domain, empty, ext, encoding, eof, errors, file, filename, fileno, filepath, filter, fork, from, ftp, get, getc, getline, getlines, gid, glob, handle, head, http, https, inode, io_handle, is_absolute, is_dir, is_dbm, is_executable, is_file, is_link, is_mldbm, is_open, is_pipe, is_readable, is_socket, is_stdio, is_string, is_temp, is_writable, join, length, link, lock, mailer, mailto, mimetype, mkdir, mkpath, mldbm, mode, modes, mtime, name, new, next, nlink, open, os password, path, pathname, perms, pipe, port, print, printf, println, put, rdonly, rdwr, read, readdir, readlink, recv, rel2abs, relative, rename, request, response, rmdir, rmtree, rootdir, scalar, seek, send, separator, shutdown, size, slurp, socket, sort, splitdir, splitpath, stat, stdio, stderr, stdin, stdout, string, string_ref, subject, sysread, syswrite, tail, tell, temp, tie, tmpdir, to, touch, truncate, type, user, uid, unlink, unlock, updir, uri, utf8, utime and write.

Each method is documented further below.

OPERATOR OVERLOADING

IO::All objects overload a small set of Perl operators to great effect. The overloads are limited to <, <<, >, >>, dereferencing operations, and stringification.

Even though relatively few operations are overloaded, there is actually a huge matrix of possibilities for magic. That’s because the overloading is sensitive to the types, position and context of the arguments, and an IO::All object can be one of many types.

The most important overload to become familiar with is stringification. IO::All objects stringify to their file or directory name. Here we print the contents of the current directory:

perl -MIO::All -le print for io(”.”)->all

is the same as:

perl -MIO::All -le print $_->name for io(”.”)->all

Stringification is important because it allows IO::All operations to return objects when they might otherwise return file names. Then the recipient can use the result either as an object or a string.

> and < move data between objects in the direction pointed to by the operator.

$content1 < io(file1); $content1 > io(file2); io(file2) > $content3; io(file3) < $content3; io(file3) > io(file4); io(file5) < io(file4);

>> and << do the same thing except the recipient string or file is appended to.

An IO::All file used as an array reference becomes tied using Tie::File:

$file = io “file”; # Print last line of file print $file->[-1]; # Insert new line in middle of file $file->[$#$file / 2] = New line;

An IO::All file used as a hash reference becomes tied to a DBM class:

io(mydbm)->{ingy} = YAML;

An IO::All directory used as an array reference, will expose each file or subdirectory as an element of the array.

print “$_ " for @{io dir};

IO::All directories used as hash references have file names as keys, and IO::All objects as values:

print io(dir)->{foo.txt}->slurp;

Files used as scalar references get slurped:

print ${io(dir)->{foo.txt}};

Not all combinations of operations and object types are supported. Some just haven’t been added yet, and some just don’t make sense. If you use an invalid combination, an error will be thrown.

COOKBOOK

This section describes some various things that you can easily cook up with IO::All.

File Locking

IO::All makes it very easy to lock files. Just use the lock method. Here’s a standalone program that demonstrates locking for both write and read:

use IO::All; my $io1 = io(myfile)->lock; $io1->println(line 1); fork or do { my $io2 = io(myfile)->lock; print $io2->slurp; exit; }; sleep 1; $io1->println(line 2); $io1->println(line 3); $io1->unlock;

There are a lot of subtle things going on here. An exclusive lock is issued for $io1 on the first println. That’s because the file isn’t actually opened until the first IO operation.

When the child process tries to read the file using $io2, there is a shared lock put on it. Since $io1 has the exclusive lock, the slurp blocks.

The parent process sleeps just to make sure the child process gets a chance. The parent needs to call unlock or close to release the lock. If all goes well the child will print 3 lines.

In-place Editing

Because an IO::All object can be used as an array reference, operations on arrays are supported transparently (using Tie::File) so a file can be modified in the same way you would modify an array.

> cat > x.txt The sexy saxophone, got the axe. ^d > perl -MIO::All -e map { s/x/X/g; $_ } @{ io(shift) } x.txt > cat x.txt The seXy saXophone, got the aXe. This one liner uses shift() to grab the file from STDIN and create an io object that is dereferenced using @{ } and fed to map() like any perl array reference.

Round Robin

This simple example will read lines from a file forever. When the last line is read, it will reopen the file and read the first one again.

my $io = io file1.txt; $io->autoclose(1); while (my $line = $io->getline || $io->getline) { print $line; }

Reading Backwards

If you call the backwards method on an IO::All object, the getline and getlines will work in reverse. They will read the lines in the file from the end to the beginning.

my @reversed; my $io = io(file1.txt); $io->backwards; while (my $line = $io->getline) { push @reversed, $line; }

or more simply:

my @reversed = io(file1.txt)->backwards->getlines;

The backwards method returns the IO::All object so that you can chain the calls.

NOTE: This operation requires that you have the File::ReadBackwards module installed.

Client/Server Sockets

IO::All makes it really easy to write a forking socket server and a client to talk to it.

In this example, a server will return 3 lines of text, to every client that calls it. Here is the server code:

use IO::All; my $socket = io(:12345)->fork->accept; $socket->print($_) while <DATA>; $socket->close; _ _DATA_ _ On your mark, Get set, Go!

Here is the client code:

use IO::All; my $io = io(localhost:12345); print while $_ = $io->getline;

You can run the server once, and then run the client repeatedly (in another terminal window). It should print the 3 data lines each time.

Note that it is important to close the socket if the server is forking, or else the socket won’t go out of scope and close.

A Tiny Web Server

Here is how you could write a simplistic web server that works with static and dynamic pages:

perl -MIO::All -e io(":8080”)->fork->accept->(sub { $_[0] < io(-x $1 ? “./$1 |” : $1) if /^GET (.*) / })

There is are a lot of subtle things going on here. First we accept a socket and fork the server. Then we overload the new socket as a code ref. This code ref takes one argument, another code ref, which is used as a callback.

The callback is called once for every line read on the socket. The line is put into $_ and the socket itself is passed in to the callback.

Our callback is scanning the line in $_ for an HTTP GET request. If one is found it parses the file name into $1. Then we use $1 to create an new IO::All file object… with a twist. If the file is executable (-x), then we create a piped command as our IO::All object. This somewhat approximates CGI support.

Whatever the resulting object is, we direct the contents back at our socket which is in $_[0]. Pretty simple, eh?

DBM Files

IO::All file objects used as a hash reference, treat the file as a DBM tied to a hash. Here I write my DB record to STDERR:

io(“names.db”)->{ingy} > io(=);

Since their are several DBM formats available in Perl, IO::All picks the first one of these that is installed on your system:

DB_File GDBM_File NDBM_File ODBM_File SDBM_File

You can override which DBM you want for each IO::All object:

my @keys = keys %{io(mydbm)->dbm(SDBM_File)};

File Subclassing

Subclassing is easy with IO::All. Just create a new module and use IO::All as the base class, like this:

package NewModule; use IO::All -base;

You need to do it this way so that IO::All will export the io function. Here is a simple recipe for subclassing:

IO::Dumper inherits everything from IO::All and adds an extra method called dump, which will dump a data structure to the file we specify in the io function. Since it needs Data::Dumper to do the dumping, we override the open method to require Data::Dumper and then pass control to the real open.

First the code using the module:

use IO::Dumper; io(./mydump)->dump($hash);

And next the IO::Dumper module itself:

package IO::Dumper; use IO::All -base; use Data::Dumper; sub dump { my $self = shift; Dumper(@_) > $self; } 1;

Inline Subclassing

This recipe does the same thing as the previous one, but without needing to write a separate module. The only real difference is the first line. Since you don’t use IO::Dumper, you need to still call its import method manually.

IO::Dumper->import; io(./mydump)->dump($hash); package IO::Dumper; use IO::All -base; use Data::Dumper; sub dump { my $self = shift; Dumper(@_) > $self; }

THE IO::ALL METHODS

This section gives a full description of all of the methods that you can call on IO::All objects. The methods have been grouped into subsections based on object construction, option settings, configuration, action methods and support for specific modules.

Object Construction and Initialization Methods

new
There are three ways to create a new IO::All object. The first is with the special function io which really just calls IO::All->new. The second is by calling new as a class method. The third is calling new as an object instance method. In this final case, the new objects attributes are copied from the instance object. io(file-descriptor); IO::All->new(file-descriptor); $io->new(file-descriptor); All three forms take a single argument, a file descriptor. A file descriptor can be any of the following: - A file name - A file handle - A directory name - A directory handle - A typeglob reference - A piped shell command. eg | ls -al - A socket domain/port. eg perl.com:5678 - - means STDIN or STDOUT (depending on usage) - = means STDERR - $ means an in memory filehandle object - ? means a temporary file - A URI including: http, https, ftp and mailto - An IO::All object If you provide an IO::All object, you will simply get that same object returned from the constructor. If no file descriptor is provided, an object will still be created, but it must be defined by one of the following methods before it can be used for I/O:

file
io->file(“path/to/my/file.txt”); Using the file method sets the type of the object to file and sets the pathname of the file if provided. It might be important to use this method if you had a file whose name was - , or if the name might otherwise be confused with a directory or a socket. In this case, either of these statements would work the same: my $file = io(-)->file; my $file = io->file(-);

dir
io->dir($dir_name); Make the object be of type directory.

socket
io->socket("${domain}:${port}”); Make the object be of type socket.

link
io->link($link_name); Make the object be of type link.

pipe
io->pipe($pipe_command); Make the object be of type pipe. The following three statements are equivalent: my $io = io(ls -l |); my $io = io(ls -l)->pipe; my $io = io->pipe(ls -l);

dbm
This method takes the names of zero or more DBM modules. The first one that is available is used to process the dbm file. io(mydbm)->dbm(NDBM_File, SDBM_File)->{author} = ingy; If no module names are provided, the first available of the following is used: DB_File GDBM_File NDBM_File ODBM_File SDBM_File

mldbm
Similar to the dbm method, except create a Multi Level DBM object using the MLDBM module. This method takes the names of zero or more DBM modules and an optional serialization module. The first DBM module that is available is used to process the MLDBM file. The serialization module can be Data::Dumper, Storable or FreezeThaw. io(mymldbm)->mldbm(GDBM_File, Storable)->{author} = {nickname => ingy};

string
Make the object be an in memory filehandle. These are equivalent: my $io = io($); my $io = io->string;

temp
Make the object represent a temporary file. It will automatically be open for both read and write.

stdio
Make the object represent either STDIN or STDOUT depending on how it is used subsequently. These are equivalent: my $io = io(-); my $io = io->stdin;

stdin
Make the object represent STDIN.

stdout
Make the object represent STDOUT.

stderr
Make the object represent STDERR.

handle
io->handle($io_handle); Forces the object to be created from an pre-existing IO handle. You can chain calls together to indicate the type of handle: my $file_object = io->file->handle($file_handle); my $dir_object = io->dir->handle($dir_handle);

http
Make the object represent an HTTP URI. Requires IO-All-LWP.

https
Make the object represent an HTTPS URI. Requires IO-All-LWP.

ftp
Make the object represent an FTP URI. Requires IO-All-LWP.

mailto
Make the object represent a mailto: URI. Requires IO-All-Mailto.

If you need to use the same options to create a lot of objects, and don’t want to duplicate the code, just create a dummy object with the options you want, and use that object to spawn other objects.

my $lt = io->lock->tie; … my $io1 = $lt->new(file1); my $io2 = $lt->new(file2);

Since the new method copies attributes from the calling object, both $io1 and $io2 will be locked and tied.

Option Setting Methods

The following methods don’t do any actual IO, but they specify options about how the IO should be done.

Each option can take a single argument of 0 or 1. If no argument is given, the value 1 is assumed. Passing 0 turns the option off.

All of these options return the object reference that was used to invoke them. This is so that the option methods can be chained together. For example:

my $io = io(path/file)->tie->assert->chomp->lock;

absolute
Indicates that the pathname for the object should be made absolute. # Print the full path of the current working directory # (like pwd). use IO::All; print io->curdir->absolute;

assert
This method ensures that the path for a file or directory actually exists before the file is open. If the path does not exist, it is created. For example, here is a program called create-cat-to that outputs to a file that it creates. #!/usr/bin/perl # create-cat-to.pl # cat to a file that can be created. use strict; use warnings; use IO::All; my $filename = shift(@ARGV); # Create a file called $filename, including all leading components. io(-) > io->file($filename)->assert; Here’s an example use of it: $ ls -l total 0 $ echo “Hello World” | create-cat-to one/two/three/four.txt $ ls -l total 4 drwxr-xr-x 3 shlomif shlomif 4096 2010-10-14 18:03 one/ $ cat one/two/three/four.txt Hello World $

autoclose
By default, IO::All will close an object opened for input when EOF is reached. By closing the handle early, one can immediately do other operations on the object without first having to close it. This option is on by default, so if you don’t want this behaviour, say so like this: $io->autoclose(0); The object will then be closed when $io goes out of scope, or you manually call $io->close.

autoflush
Proxy for IO::Handle::autoflush

backwards
Sets the object to ‘backwards’ mode. All subsequent getline operations will read backwards from the end of the file. Requires the File::ReadBackwards CPAN module.

binary
Adds :raw to the list of PerlIO layers applied after open, and applies it immediately on an open handle.

chdir
chdir() to the pathname of a directory object. When object goes out of scope, chdir back to starting directory.

chomp
Indicates that all operations that read lines should chomp the lines. If the separator method has been called, chomp will remove that value from the end of each record. Note that chomp may cause the following idiom to halt prematurely (e.g., if separator is (the default) and chomp is in effect, then this command will stop reading at the first blank line): while ( my $line = $io->getline ) {…} Try the following instead: while ( defined(my $line = $io->getline) ) {…}

confess
Errors should be reported with the very detailed Carp::confess function.

deep
Indicates that calls to the all family of methods should search directories as deep as possible.

fork
Indicates that the process should automatically be forked inside the accept socket method.

lock
Indicate that operations on an object should be locked using flock.

rdonly
This option indicates that certain operations like DBM and Tie::File access should be done in read-only mode.

rdwr
This option indicates that DBM and MLDBM files should be opened in read/write mode.

relative
Indicates that the pathname for the object should be made relative. If passed an argument, path will be made relative to passed argument.

sort
Indicates whether objects returned from one of the all methods will be in sorted order by name. True by default.

tie
Indicate that the object should be tied to itself, thus allowing it to be used as a filehandle in any of Perl’s builtin IO operations. my $io = io(foo)->tie; @lines = <$io>;

utf8
Adds :encoding(UTF-8) to the list of PerlIO layers applied after open, and applies it immediately on an open handle.

Configuration Methods

The following methods don’t do any actual I/O, but they set specific values to configure the IO::All object.

If these methods are passed no argument, they will return their current value. If arguments are passed they will be used to set the current value, and the object reference will be returned for potential method chaining.

bcc
Set the Bcc field for a mailto object.

binmode
Adds the specified layer to the list of PerlIO layers applied after open, and applies it immediately on an open handle. Does a bare binmode when called without argument.

block_size
The default length to be used for read and sysread calls. Defaults to 1024.

buffer
Returns a reference to the internal buffer, which is a scalar. You can use this method to set the buffer to a scalar of your choice. (You can just pass in the scalar, rather than a reference to it.) This is the buffer that read and write will use by default. You can easily have IO::All objects use the same buffer: my $input = io(abc); my $output = io(xyz); my $buffer; $output->buffer($input->buffer($buffer)); $output->write while $input->read;

  1. Set the Cc field for a mailto object.

content
Get or set the content for an LWP operation manually.

domain
Set the domain name or ip address that a socket should use.

encoding
Adds the specified encoding to the list of PerlIO layers applied after open, and applies it immediately on an open handle. Requires an argument.

errors
Use this to set a subroutine reference that gets called when an internal error is thrown.

filter
Use this to set a subroutine reference that will be used to grep which objects get returned on a call to one of the all methods. For example: my @odd = io->curdir->filter(sub {$_->size % 2})->All_Files; @odd will contain all the files under the current directory whose size is an odd number of bytes.

from
Indicate the sender for a mailto object.

mailer
Set the mailer program for a mailto transaction. Defaults to ‘sendmail’.

mode
Set the mode for which the file should be opened. Examples: $io->mode(>>)->open; $io->mode(O_RDONLY); my $log_appender = io->file(/var/log/my-application.log) ->mode(>>)->open(); $log_appender->print(“Stardate 5987.6: Mission accomplished.”);

name
Set or get the name of the file or directory represented by the IO::All object.

password
Set the password for an LWP transaction.

perms
Sets the permissions to be used if the file/directory needs to be created.

port
Set the port number that a socket should use.

request
Manually specify the request object for an LWP transaction.

response
Returns the resulting response object from an LWP transaction.

separator
Sets the record (line) separator to whatever value you pass it. Default is . Affects the chomp setting too.

string_ref
Returns a reference to the internal string that is acting like a file.

subject
Set the subject for a mailto transaction.

to
Set the recipient address for a mailto request.

uri
Direct access to the URI used in LWP transactions.

user
Set the user name for an LWP transaction.

IO Action Methods

These are the methods that actually perform I/O operations on an IO::All object. The stat methods and the File::Spec methods are documented in separate sections below.

accept
For sockets. Opens a server socket (LISTEN => 1, REUSE => 1). Returns an IO::All socket object that you are listening on. If the fork method was called on the object, the process will automatically be forked for every connection.

all
Read all contents into a single string. compare(io(file1)->all, io(file2)->all);

all (For directories)
Returns a list of IO::All objects for all files and subdirectories in a directory. ‘.’ and ‘..’ are excluded. Takes an optional argument telling how many directories deep to search. The default is 1. Zero (0) means search as deep as possible. The filter method can be used to limit the results. The items returned are sorted by name unless ->sort(0) is used.

All
Same as all(0).

all_dirs
Same as all, but only return directories.

All_Dirs
Same as all_dirs(0).

all_files
Same as all, but only return files.

All_Files
Same as all_files(0).

all_links
Same as all, but only return links.

All_Links
Same as all_links(0).

append
Same as print, but sets the file mode to ‘>>’.

appendf
Same as printf, but sets the file mode to ‘>>’.

appendln
Same as println, but sets the file mode to ‘>>’.

clear
Clear the internal buffer. This method is called by write after it writes the buffer. Returns the object reference for chaining.

close
Close will basically unopen the object, which has different meanings for different objects. For files and directories it will close and release the handle. For sockets it calls shutdown. For tied things it unties them, and it unlocks locked things.

copy
Copies the object to the path passed. Works on both files and directories, but directories require File::Copy::Recursive to be installed.

empty
Returns true if a file exists but has no size, or if a directory exists but has no contents.

eof
Proxy for IO::Handle::eof

ext
Returns the extension of the file. Can also be spelled as extension

exists
Returns whether or not the file or directory exists.

filename
Return the name portion of the file path in the object. For example: io(my/path/file.txt)->filename; would return file.txt.

fileno
Proxy for IO::Handle::fileno

filepath
Return the path portion of the file path in the object. For example: io(my/path/file.txt)->filepath; would return my/path.

get
Perform an LWP GET request manually.

getc
Proxy for IO::Handle::getc

getline
Calls IO::File::getline. You can pass in an optional record separator.

getlines
Calls IO::File::getlines. You can pass in an optional record separator.

glob
Creates IO::All objects for the files matching the glob in the IO::All::Dir. For example: io->dir($ENV{HOME})->glob(*.txt)

head
Return the first 10 lines of a file. Takes an optional argument which is the number of lines to return. Works as expected in list and scalar context. Is subject to the current line separator.

io_handle
Direct access to the actual IO::Handle object being used on an opened IO::All object.

is_dir
Returns boolean telling whether or not the IO::All object represents a directory.

is_executable
Returns true if file or directory is executable.

is_dbm
Returns boolean telling whether or not the IO::All object represents a dbm file.

is_file
Returns boolean telling whether or not the IO::All object represents a file.

is_link
Returns boolean telling whether or not the IO::All object represents a symlink.

is_mldbm
Returns boolean telling whether or not the IO::All object represents a mldbm file.

is_open
Indicates whether the IO::All is currently open for input/output.

is_pipe
Returns boolean telling whether or not the IO::All object represents a pipe operation.

is_readable
Returns true if file or directory is readable.

is_socket
Returns boolean telling whether or not the IO::All object represents a socket.

is_stdio
Returns boolean telling whether or not the IO::All object represents a STDIO file handle.

is_string
Returns boolean telling whether or not the IO::All object represents an in memory filehandle.

is_temp
Returns boolean telling whether or not the IO::All object represents a temporary file.

is_writable
Returns true if file or directory is writable. Can also be spelled as is_writeable.

length
Return the length of the internal buffer.

mimetype
Return the mimetype of the file. Requires a working installation of the File::MimeInfo CPAN module.

mkdir
Create the directory represented by the object.

mkpath
Create the directory represented by the object, when the path contains more than one directory that doesn’t exist. Proxy for File::Path::mkpath.

next
For a directory, this will return a new IO::All object for each file or subdirectory in the directory. Return undef on EOD.

open
Open the IO::All object. Takes two optional arguments mode and perms, which can also be set ahead of time using the mode and perms methods. NOTE: Normally you won’t need to call open (or mode/perms), since this happens automatically for most operations.

os
Change the object’s os representation. Valid options are: win32, unix, vms, mac, os2.

pathname
Return the absolute or relative pathname for a file or directory, depending on whether object is in absolute or relative mode.

print
Proxy for IO::Handle::print

printf
Proxy for IO::Handle::printf

println
Same as print, but adds newline to each argument unless it already ends with one.

put
Perform an LWP PUT request manually.

read
This method varies depending on its context. Read carefully (no pun intended). For a file, this will proxy IO::File::read. This means you must pass it a buffer, a length to read, and optionally a buffer offset for where to put the data that is read. The function returns the length actually read (which is zero at EOF). If you don’t pass any arguments for a file, IO::All will use its own internal buffer, a default length, and the offset will always point at the end of the buffer. The buffer can be accessed with the buffer method. The length can be set with the block_size method. The default length is 1024 bytes. The clear method can be called to clear the buffer. For a directory, this will proxy IO::Dir::read.

readdir
Similar to the Perl readdir builtin. In scalar context, return the next directory entry (ie file or directory name), or undef on end of directory. In list context, return all directory entries. Note that readdir does not return the special . and .. entries.

readline
Same as getline.

readlink
Calls Perl’s readlink function on the link represented by the object. Instead of returning the file path, it returns a new IO::All object using the file path.

recv
Proxy for IO::Socket::recv

rename
my $new = $io->rename(new-name); Calls Perl’s rename function and returns an IO::All object for the renamed file. Returns false if the rename failed.

rewind
Proxy for IO::Dir::rewind

rmdir
Delete the directory represented by the IO::All object.

rmtree
Delete the directory represented by the IO::All object and all the files and directories beneath it. Proxy for File::Path::rmtree.

scalar
Deprecated. Same as all().

seek
Proxy for IO::Handle::seek. If you use seek on an unopened file, it will be opened for both read and write.

send
Proxy for IO::Socket::send

shutdown
Proxy for IO::Socket::shutdown

slurp
Read all file content in one operation. Returns the file content as a string. In list context returns every line in the file.

stat
Proxy for IO::Handle::stat

sysread
Proxy for IO::Handle::sysread

syswrite
Proxy for IO::Handle::syswrite

tail
Return the last 10 lines of a file. Takes an optional argument which is the number of lines to return. Works as expected in list and scalar context. Is subject to the current line separator.

tell
Proxy for IO::Handle::tell

throw
This is an internal method that gets called whenever there is an error. It could be useful to override it in a subclass, to provide more control in error handling.

touch
Update the atime and mtime values for a file or directory. Creates an empty file if the file does not exist.

truncate
Proxy for IO::Handle::truncate

type
Returns a string indicated the type of io object. Possible values are: file dir link socket string pipe Returns undef if type is not determinable.

unlink
Unlink (delete) the file represented by the IO::All object. NOTE: You can unlink a file after it is open, and continue using it until it is closed.

unlock
Release a lock from an object that used the lock method.

utime
Proxy for the utime Perl function.

write
Opposite of read for file operations only. NOTE: When used with the automatic internal buffer, write will clear the buffer after writing it.

Stat Methods

This methods get individual values from a stat call on the file, directory or handle represented by the IO::All object.

atime
Last access time in seconds since the epoch

blksize
Preferred block size for file system I/O

blocks
Actual number of blocks allocated

ctime
Inode change time in seconds since the epoch

device
Device number of filesystem

device_id
Device identifier for special files only

gid
Numeric group id of file’s owner

inode
Inode number

modes
File mode - type and permissions

mtime
Last modify time in seconds since the epoch

nlink
Number of hard links to the file

size
Total size of file in bytes

uid
Numeric user id of file’s owner

File::Spec Methods

These methods are all adaptations from File::Spec. Each method actually does call the matching File::Spec method, but the arguments and return values differ slightly. Instead of being file and directory names, they are IO::All objects. Since IO::All objects stringify to their names, you can generally use the methods just like File::Spec.

abs2rel
Returns the relative path for the absolute path in the IO::All object. Can take an optional argument indicating the base path.

canonpath
Returns the canonical path for the IO::All object. The canonical path is the fully resolved path if the file exists, so any symlinks will be resolved.

case_tolerant
Returns 0 or 1 indicating whether the file system is case tolerant. Since an active IO::All object is not needed for this function, you can code it like: IO::All->case_tolerant; or more simply: io->case_tolerant;

catdir
Concatenate the directory components together, and return a new IO::All object representing the resulting directory.

catfile
Concatenate the directory and file components together, and return a new IO::All object representing the resulting file. my $contents = io->catfile(qw(dir subdir file))->slurp; This is a very portable way to read dir/subdir/file.

catpath
Concatenate the volume, directory and file components together, and return a new IO::All object representing the resulting file.

curdir
Returns an IO::All object representing the current directory.

devnull
Returns an IO::All object representing the /dev/null file.

is_absolute
Returns 0 or 1 indicating whether the name field of the IO::All object is an absolute path.

join
Same as catfile.

path
Returns a list of IO::All directory objects for each directory in your path.

rel2abs
Returns the absolute path for the relative path in the IO::All object. Can take an optional argument indicating the base path.

rootdir
Returns an IO::All object representing the root directory on your file system.

splitdir
Returns a list of the directory components of a path in an IO::All object.

splitpath
Returns a volume directory and file component of a path in an IO::All object.

tmpdir
Returns an IO::All object representing a temporary directory on your file system.

updir
Returns an IO::All object representing the current parent directory.

OPERATIONAL NOTES

Reblessing
Each IO::All object gets reblessed into an IO::All::* object as soon as IO::All can determine what type of object it should be. Sometimes it gets reblessed more than once: my $io = io(mydbm.db); $io->dbm(DB_File); $io->{foo} = bar; In the first statement, $io has a reference value of ‘IO::All::File’, if mydbm.db exists. In the second statement, the object is reblessed into class ‘IO::All::DBM’.

Auto-Open
An IO::All object will automatically be opened as soon as there is enough contextual information to know what type of object it is, and what mode it should be opened for. This is usually when the first read or write operation is invoked but might be sooner.

Auto-Mode
The mode for an object to be opened with is determined heuristically unless specified explicitly.

Auto-Close
For input, IO::All objects will automatically be closed after EOF (or EOD). For output, the object closes when it goes out of scope. To keep input objects from closing at EOF, do this: $io->autoclose(0);

Explicit open and close
You can always call open and close explicitly, if you need that level of control. To test if an object is currently open, use the is_open method.

Overload
Overloaded operations return the target object, if one exists. This would set $xxx to the IO::All object: my $xxx = $contents > io(file.txt); While this would set $xxx to the content string: my $xxx = $contents < io(file.txt);

STABILITY

The goal of the IO::All project is to continually refine the module to be as simple and consistent to use as possible. Therefore, in the early stages of the project, I will not hesitate to break backwards compatibility with other versions of IO::All if I can find an easier and clearer way to do a particular thing.

IO is tricky stuff. There is definitely more work to be done. On the other hand, this module relies heavily on very stable existing IO modules; so it may work fairly well.

I am sure you will find many unexpected features. Please send all problems, ideas and suggestions to [email protected].

Known Bugs and Deficiencies

Not all possible combinations of objects and methods have been tested. There are many many combinations. All of the examples have been tested. If you find a bug with a particular combination of calls, let me know.

If you call a method that does not make sense for a particular object, the result probably won’t make sense. Little attempt is made to check for improper usage.

CREDITS

A lot of people have sent in suggestions, that have become a part of IO::All. Thank you.

Special thanks to Ian Langworth for continued testing and patching.

Thank you Simon Cozens for tipping me off to the overloading possibilities.

Finally, thanks to Autrijus Tang, for always having one more good idea.

(It seems IO::All of it to a lot of people!)

REPOSITORY AND COMMUNITY

The IO::All module can be found on CPAN and on GitHub: <http://github.com/ingydotnet/io-all-pm>.

Please join the IO::All discussion on #io-all on irc.perl.org.

SEE ALSO

  • File::Spec

  • File::Path

  • File::ReadBackwards

  • File::MimeInfo

  • IO::Handle

  • IO::File

  • IO::Dir

  • IO::Socket

  • Tie::File

AUTHOR

Ingy döt Net <[email protected]>

COPYRIGHT AND LICENSE

Copyright 2004-2017. Ingy döt Net.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See <http://www.perl.com/perl/misc/Artistic.html>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

910 - Linux cli command strftime_l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strftime_l and provides detailed information about the command strftime_l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strftime_l.

NAME 🖥️ strftime_l 🖥️

format date and time

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <time.h>
size_t strftime(char s[restrict .max], size_t max,
 const char *restrict format,
 const struct tm *restrict tm);
size_t strftime_l(char s[restrict .max], size_t max,
 const char *restrict format,
 const struct tm *restrict tm,
 locale_t locale);

DESCRIPTION

The strftime() function formats the broken-down time tm according to the format specification format and places the result in the character array s of size max. The broken-down time structure tm is defined in <time.h>. See also ctime(3).

The format specification is a null-terminated string and may contain special character sequences called conversion specifications, each of which is introduced by a ‘%’ character and terminated by some other character known as a conversion specifier character. All other character sequences are ordinary character sequences.

The characters of ordinary character sequences (including the null byte) are copied verbatim from format to s. However, the characters of conversion specifications are replaced as shown in the list below. In this list, the field(s) employed from the tm structure are also shown.

%a
The abbreviated name of the day of the week according to the current locale. (Calculated from tm_wday.) (The specific names used in the current locale can be obtained by calling nl_langinfo(3) with ABDAY_{17} as an argument.)

%A
The full name of the day of the week according to the current locale. (Calculated from tm_wday.) (The specific names used in the current locale can be obtained by calling nl_langinfo(3) with DAY_{17} as an argument.)

%b
The abbreviated month name according to the current locale. (Calculated from tm_mon.) (The specific names used in the current locale can be obtained by calling nl_langinfo(3) with ABMON_{112} as an argument.)

%B
The full month name according to the current locale. (Calculated from tm_mon.) (The specific names used in the current locale can be obtained by calling nl_langinfo(3) with MON_{112} as an argument.)

%c
The preferred date and time representation for the current locale. (The specific format used in the current locale can be obtained by calling nl_langinfo(3) with D_T_FMT as an argument for the %c conversion specification, and with ERA_D_T_FMT for the %Ec conversion specification.) (In the POSIX locale this is equivalent to %a %b %e %H:%M:%S %Y.)

%C
The century number (year/100) as a 2-digit integer. (SU) (The %EC conversion specification corresponds to the name of the era.) (Calculated from tm_year.)

%d
The day of the month as a decimal number (range 01 to 31). (Calculated from tm_mday.)

%D
Equivalent to %m/%d/%y. (Yecch—for Americans only. Americans should note that in other countries %d/%m/%y is rather common. This means that in international context this format is ambiguous and should not be used.) (SU)

%e
Like %d, the day of the month as a decimal number, but a leading zero is replaced by a space. (SU) (Calculated from tm_mday.)

%E
Modifier: use alternative (“era-based”) format, see below. (SU)

%F
Equivalent to %Y-%m-%d (the ISO 8601 date format). (C99)

%G
The ISO 8601 week-based year (see NOTES) with century as a decimal number. The 4-digit year corresponding to the ISO week number (see %V). This has the same format and value as %Y, except that if the ISO week number belongs to the previous or next year, that year is used instead. (TZ) (Calculated from tm_year, tm_yday, and tm_wday.)

%g
Like %G, but without century, that is, with a 2-digit year (00–99). (TZ) (Calculated from tm_year, tm_yday, and tm_wday.)

%h
Equivalent to %b. (SU)

%H
The hour as a decimal number using a 24-hour clock (range 00 to 23). (Calculated from tm_hour.)

%I
The hour as a decimal number using a 12-hour clock (range 01 to 12). (Calculated from tm_hour.)

%j
The day of the year as a decimal number (range 001 to 366). (Calculated from tm_yday.)

%k
The hour (24-hour clock) as a decimal number (range 0 to 23); single digits are preceded by a blank. (See also %H.) (Calculated from tm_hour.) (TZ)

%l
The hour (12-hour clock) as a decimal number (range 1 to 12); single digits are preceded by a blank. (See also %I.) (Calculated from tm_hour.) (TZ)

%m
The month as a decimal number (range 01 to 12). (Calculated from tm_mon.)

%M
The minute as a decimal number (range 00 to 59). (Calculated from tm_min.)

%n
A newline character. (SU)

%O
Modifier: use alternative numeric symbols, see below. (SU)

%p
Either “AM” or “PM” according to the given time value, or the corresponding strings for the current locale. Noon is treated as “PM” and midnight as “AM”. (Calculated from tm_hour.) (The specific string representations used for “AM” and “PM” in the current locale can be obtained by calling nl_langinfo(3) with AM_STR and PM_STR, respectively.)

%P
Like %p but in lowercase: “am” or “pm” or a corresponding string for the current locale. (Calculated from tm_hour.) (GNU)

%r
The time in a.m. or p.m. notation. (SU) (The specific format used in the current locale can be obtained by calling nl_langinfo(3) with T_FMT_AMPM as an argument.) (In the POSIX locale this is equivalent to %I:%M:%S %p.)

%R
The time in 24-hour notation (%H:%M). (SU) For a version including the seconds, see %T below.

%s
The number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). (TZ) (Calculated from mktime(tm).)

%S
The second as a decimal number (range 00 to 60). (The range is up to 60 to allow for occasional leap seconds.) (Calculated from tm_sec.)

%t
A tab character. (SU)

%T
The time in 24-hour notation (%H:%M:%S). (SU)

%u
The day of the week as a decimal, range 1 to 7, Monday being 1. See also %w. (Calculated from tm_wday.) (SU)

%U
The week number of the current year as a decimal number, range 00 to 53, starting with the first Sunday as the first day of week 01. See also %V and %W. (Calculated from tm_yday and tm_wday.)

%V
The ISO 8601 week number (see NOTES) of the current year as a decimal number, range 01 to 53, where week 1 is the first week that has at least 4 days in the new year. See also %U and %W. (Calculated from tm_year, tm_yday, and tm_wday.) (SU)

%w
The day of the week as a decimal, range 0 to 6, Sunday being 0. See also %u. (Calculated from tm_wday.)

%W
The week number of the current year as a decimal number, range 00 to 53, starting with the first Monday as the first day of week 01. (Calculated from tm_yday and tm_wday.)

%x
The preferred date representation for the current locale without the time. (The specific format used in the current locale can be obtained by calling nl_langinfo(3) with D_FMT as an argument for the %x conversion specification, and with ERA_D_FMT for the %Ex conversion specification.) (In the POSIX locale this is equivalent to %m/%d/%y.)

%X
The preferred time representation for the current locale without the date. (The specific format used in the current locale can be obtained by calling nl_langinfo(3) with T_FMT as an argument for the %X conversion specification, and with ERA_T_FMT for the %EX conversion specification.) (In the POSIX locale this is equivalent to %H:%M:%S.)

%y
The year as a decimal number without a century (range 00 to 99). (The %Ey conversion specification corresponds to the year since the beginning of the era denoted by the %EC conversion specification.) (Calculated from tm_year)

%Y
The year as a decimal number including the century. (The %EY conversion specification corresponds to the full alternative year representation.) (Calculated from tm_year)

%z
The +hhmm or -hhmm numeric timezone (that is, the hour and minute offset from UTC). (SU)

%Z
The timezone name or abbreviation.

%+
The date and time in date(1) format. (TZ) (Not supported in glibc2.)

%%
A literal ‘%’ character.

Some conversion specifications can be modified by preceding the conversion specifier character by the E or O modifier to indicate that an alternative format should be used. If the alternative format or specification does not exist for the current locale, the behavior will be as if the unmodified conversion specification were used. (SU) The Single UNIX Specification mentions %Ec, %EC, %Ex, %EX, %Ey, %EY, %Od, %Oe, %OH, %OI, %Om, %OM, %OS, %Ou, %OU, %OV, %Ow, %OW, %Oy, where the effect of the O modifier is to use alternative numeric symbols (say, roman numerals), and that of the E modifier is to use a locale-dependent alternative representation. The rules governing date representation with the E modifier can be obtained by supplying ERA as an argument to a nl_langinfo(3). One example of such alternative forms is the Japanese era calendar scheme in the ja_JP glibc locale.

strftime_l() is equivalent to strftime(), except it uses the specified locale instead of the current locale. The behaviour is undefined if locale is invalid or LC_GLOBAL_LOCALE.

RETURN VALUE

Provided that the result string, including the terminating null byte, does not exceed max bytes, strftime() returns the number of bytes (excluding the terminating null byte) placed in the array s. If the length of the result string (including the terminating null byte) would exceed max bytes, then strftime() returns 0, and the contents of the array are undefined.

Note that the return value 0 does not necessarily indicate an error. For example, in many locales %p yields an empty string. An empty format string will likewise yield an empty string.

ENVIRONMENT

The environment variables TZ and LC_TIME are used.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strftime(), strftime_l()

Thread safetyMT-Safe env locale

STANDARDS

strftime()
C11, POSIX.1-2008.

strftime_l()
POSIX.1-2008.

HISTORY

strftime()
SVr4, C89.

strftime_l()
POSIX.1-2008.

There are strict inclusions between the set of conversions given in ANSI C (unmarked), those given in the Single UNIX Specification (marked SU), those given in Olson’s timezone package (marked TZ), and those given in glibc (marked GNU), except that %+ is not supported in glibc2. On the other hand glibc2 has several more extensions. POSIX.1 only refers to ANSI C; POSIX.2 describes under date(1) several extensions that could apply to strftime() as well. The %F conversion is in C99 and POSIX.1-2001.

In SUSv2, the %S specifier allowed a range of 00 to 61, to allow for the theoretical possibility of a minute that included a double leap second (there never has been such a minute).

NOTES

ISO 8601 week dates

%G, %g, and %V yield values calculated from the week-based year defined by the ISO 8601 standard. In this system, weeks start on a Monday, and are numbered from 01, for the first week, up to 52 or 53, for the last week. Week 1 is the first week where four or more days fall within the new year (or, synonymously, week 01 is: the first week of the year that contains a Thursday; or, the week that has 4 January in it). When three or fewer days of the first calendar week of the new year fall within that year, then the ISO 8601 week-based system counts those days as part of week 52 or 53 of the preceding year. For example, 1 January 2010 is a Friday, meaning that just three days of that calendar week fall in 2010. Thus, the ISO 8601 week-based system considers these days to be part of week 53 (%V) of the year 2009 (%G); week 01 of ISO 8601 year 2010 starts on Monday, 4 January 2010. Similarly, the first two days of January 2011 are considered to be part of week 52 of the year 2010.

glibc notes

glibc provides some extensions for conversion specifications. (These extensions are not specified in POSIX.1-2001, but a few other systems provide similar features.) Between the ‘%’ character and the conversion specifier character, an optional flag and field width may be specified. (These precede the E or O modifiers, if present.)

The following flag characters are permitted:

_
(underscore) Pad a numeric result string with spaces.

-
(dash) Do not pad a numeric result string.

0
Pad a numeric result string with zeros even if the conversion specifier character uses space-padding by default.

^
Convert alphabetic characters in result string to uppercase.

#
Swap the case of the result string. (This flag works only with certain conversion specifier characters, and of these, it is only really useful with %Z.)

An optional decimal width specifier may follow the (possibly absent) flag. If the natural size of the field is smaller than this width, then the result string is padded (on the left) to the specified width.

BUGS

If the output string would exceed max bytes, errno is not set. This makes it impossible to distinguish this error case from cases where the format string legitimately produces a zero-length output string. POSIX.1-2001 does not specify any errno settings for strftime().

Some buggy versions of gcc(1) complain about the use of %c: warning: `%c’ yields only last 2 digits of year in some locales. Of course programmers are encouraged to use %c, as it gives the preferred date and time representation. One meets all kinds of strange obfuscations to circumvent this gcc(1) problem. A relatively clean one is to add an intermediate function

size_t
my_strftime(char *s, size_t max, const char *fmt,
            const struct tm *tm)
{
    return strftime(s, max, fmt, tm);
}

Nowadays, gcc(1) provides the -Wno-format-y2k option to prevent the warning, so that the above workaround is no longer required.

EXAMPLES

RFC 2822-compliant date format (with an English locale for %a and %b)

"%a, %d %b %Y %T %z"

RFC 822-compliant date format (with an English locale for %a and %b)

"%a, %d %b %y %T %z"

Example program

The program below can be used to experiment with strftime().

Some examples of the result string produced by the glibc implementation of strftime() are as follows:

$ ./a.out '%m'
Result string is "11"
$ ./a.out '%5m'
Result string is "00011"
$ ./a.out '%_5m'
Result string is "   11"

Program source

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int
main(int argc, char *argv[])
{
    char outstr[200];
    time_t t;
    struct tm *tmp;
    t = time(NULL);
    tmp = localtime(&t);
    if (tmp == NULL) {
        perror("localtime");
        exit(EXIT_FAILURE);
    }
    if (strftime(outstr, sizeof(outstr), argv[1], tmp) == 0) {
        fprintf(stderr, "strftime returned 0");
        exit(EXIT_FAILURE);
    }
    printf("Result string is \"%s\"

“, outstr); exit(EXIT_SUCCESS); }

SEE ALSO

date(1), time(2), ctime(3), nl_langinfo(3), setlocale(3), sprintf(3), strptime(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

911 - Linux cli command zip_source_free

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_free and provides detailed information about the command zip_source_free, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_free.

libzip (-lzip)

The function

decrements the reference count of

and frees it if the reference count drops to 0. If

is

it does nothing.

This function should not be called on a

after it was used successfully in a

or

call.

was added in libzip 0.6.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

912 - Linux cli command XtDisplayInitialize

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtDisplayInitialize and provides detailed information about the command XtDisplayInitialize, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtDisplayInitialize.

NAME 🖥️ XtDisplayInitialize 🖥️

initialize, open, or close a display

SYNTAX

#include <X11/Intrinsic.h>

void XtDisplayInitialize(XtAppContext app_context, Display *display, const char *application_name, const char *application_class, XrmOptionDescRec *options, Cardinal num_options, int *argc, char **argv);

Display *XtOpenDisplay(XtAppContext app_context, const char *display_string, const char *application_name, const char *application_class, XrmOptionDescRec *options, Cardinal num_options, int *argc, char **argv);

void XtCloseDisplay(Display *display);

XrmDatabase XtDatabase(Display *display);

XrmDatabase XtScreenDatabase(Screen* screen);

ARGUMENTS

argc
Specifies a pointer to the number of command line parameters.

argv
Specifies the command line parameters.

app_context
Specifies the application context.

application_class
Specifies the class name of this application, which usually is the generic name for all instances of this application.

application_name
Specifies the name of the application instance.

display
Specifies the display. Note that a display can be in at most one application context.

num_options
Specifies the number of entries in the options list.

options
Specifies how to parse the command line for any application-specific resources. The options argument is passed as a parameter to XrmParseCommand. For further information, see Xlib - C Language X Interface.

screen
Specifies the screen whose resource database is to be returned.

DESCRIPTION

The XtDisplayInitialize function builds the resource database, calls the Xlib XrmParseCommand function to parse the command line, and performs other per display initialization. After XrmParseCommand has been called, argc and argv contain only those parameters that were not in the standard option table or in the table specified by the options argument. If the modified argc is not zero, most applications simply print out the modified argv along with a message listing the allowable options. On UNIX-based systems, the application name is usually the final component of argv[0]. If the synchronize resource is True for the specified application, XtDisplayInitialize calls the Xlib XSynchronize function to put Xlib into synchronous mode for this display connection. If the reverseVideo resource is True, the Intrinsics exchange XtDefaultForeground and XtDefaultBackground for widgets created on this display. (See Section 9.6.1).

The XtOpenDisplay function calls XOpenDisplay the specified display name. If display_string is NULL, XtOpenDisplay uses the current value of the -display option specified in argv and if no display is specified in argv, uses the user’s default display (on UNIX-based systems, this is the value of the DISPLAY environment variable).

If this succeeds, it then calls XtDisplayInitialize and pass it the opened display and the value of the -name option specified in argv as the application name. If no name option is specified, it uses the application name passed to XtOpenDisplay. If the application name is NULL, it uses the last component of argv[0]. XtOpenDisplay returns the newly opened display or NULL if it failed.

XtOpenDisplay is provided as a convenience to the application programmer.

The XtCloseDisplay function closes the specified display as soon as it is safe to do so. If called from within an event dispatch (for example, a callback procedure), XtCloseDisplay does not close the display until the dispatch is complete. Note that applications need only call XtCloseDisplay if they are to continue executing after closing the display; otherwise, they should call XtDestroyApplicationContext or just exit.

The XtDatabase function returns the fully merged resource database that was built by XtDisplayInitialize associated with the display that was passed in. If this display has not been initialized by XtDisplayInitialize, the results are not defined.

The XtScreenDatabase function returns the fully merged resource database associated with the specified screen. If the screen does not belong to a Display initialized by XtDisplayInitialize, the results are undefined.

SEE ALSO

XtAppCreateShell(3), XtCreateApplicationContext(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

913 - Linux cli command getfsfile

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getfsfile and provides detailed information about the command getfsfile, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getfsfile.

NAME 🖥️ getfsfile 🖥️

handle fstab entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <fstab.h>
int setfsent(void);
struct fstab *getfsent(void);
void endfsent(void);
struct fstab *getfsfile(const char *mount_point);
struct fstab *getfsspec(const char *special_file);

DESCRIPTION

These functions read from the file /etc/fstab. The struct fstab is defined by:

struct fstab {
    char       *fs_spec;       /* block device name */
    char       *fs_file;       /* mount point */
    char       *fs_vfstype;    /* filesystem type */
    char       *fs_mntops;     /* mount options */
    const char *fs_type;       /* rw/rq/ro/sw/xx option */
    int         fs_freq;       /* dump frequency, in days */
    int         fs_passno;     /* pass number on parallel dump */
};

Here the field fs_type contains (on a *BSD system) one of the five strings “rw”, “rq”, “ro”, “sw”, “xx” (read-write, read-write with quota, read-only, swap, ignore).

The function setfsent() opens the file when required and positions it at the first line.

The function getfsent() parses the next line from the file. (After opening it when required.)

The function endfsent() closes the file when required.

The function getfsspec() searches the file from the start and returns the first entry found for which the fs_spec field matches the special_file argument.

The function getfsfile() searches the file from the start and returns the first entry found for which the fs_file field matches the mount_point argument.

RETURN VALUE

Upon success, the functions getfsent(), getfsfile(), and getfsspec() return a pointer to a struct fstab, while setfsent() returns 1. Upon failure or end-of-file, these functions return NULL and 0, respectively.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

endfsent(), setfsent()

Thread safety

MT-Unsafe race:fsent

getfsent(), getfsspec(), getfsfile()

Thread safety

MT-Unsafe race:fsent locale

VERSIONS

Several operating systems have these functions, for example, *BSD, SunOS, Digital UNIX, AIX (which also has a getfstype()). HP-UX has functions of the same names, that however use a struct checklist instead of a struct fstab, and calls these functions obsolete, superseded by getmntent(3).

STANDARDS

None.

HISTORY

The getfsent() function appeared in 4.0BSD; the other four functions appeared in 4.3BSD.

NOTES

These functions are not thread-safe.

Since Linux allows mounting a block special device in several places, and since several devices can have the same mount point, where the last device with a given mount point is the interesting one, while getfsfile() and getfsspec() only return the first occurrence, these two functions are not suitable for use under Linux.

SEE ALSO

getmntent(3), fstab(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

914 - Linux cli command scalb

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command scalb and provides detailed information about the command scalb, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the scalb.

NAME 🖥️ scalb 🖥️

multiply floating-point number by integral power of radix (OBSOLETE)

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
[[deprecated]] double scalb(double x, double exp);
[[deprecated]] float scalbf(float x, float exp);
[[deprecated]] long double scalbl(long double x, long double exp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

scalb():

    _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

scalbf(), scalbl():

    _XOPEN_SOURCE >= 600
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions multiply their first argument x by FLT_RADIX (probably 2) to the power of exp, that is:

    x * FLT_RADIX ** exp

The definition of FLT_RADIX can be obtained by including <float.h>.

RETURN VALUE

On success, these functions return x * FLT_RADIX ** exp.

If x or exp is a NaN, a NaN is returned.

If x is positive infinity (negative infinity), and exp is not negative infinity, positive infinity (negative infinity) is returned.

If x is +0 (-0), and exp is not positive infinity, +0 (-0) is returned.

If x is zero, and exp is positive infinity, a domain error occurs, and a NaN is returned.

If x is an infinity, and exp is negative infinity, a domain error occurs, and a NaN is returned.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with a sign the same as x.

If the result underflows, a range error occurs, and the functions return zero, with a sign the same as x.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is 0, and exp is positive infinity, or x is positive infinity and exp is negative infinity and the other argument is not a NaN
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

Range error, overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error, underflow
errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

scalb(), scalbf(), scalbl()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

scalb()
4.3BSD. Obsolescent in POSIX.1-2001; Removed in POSIX.1-2008, recommending the use of scalbln(3), scalblnf(3), or scalblnl(3) instead.

BUGS

Before glibc 2.20, these functions did not set errno for domain and range errors.

SEE ALSO

ldexp(3), scalbln(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

915 - Linux cli command XtAppSetWarningHandler

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppSetWarningHandler and provides detailed information about the command XtAppSetWarningHandler, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppSetWarningHandler.

NAME 🖥️ XtAppSetWarningHandler 🖥️

low-level error handlers

SYNTAX

#include <X11/Intrinsic.h>

void XtAppError(XtAppContext app_context, const char *message);

XtErrorHandler XtAppSetErrorHandler(XtAppContext app_context, XtErrorHandler handler);

XtErrorHandler XtAppSetWarningHandler(XtAppContext app_context, XtErrorHandler handler);

void XtAppWarning(XtAppContext app_context, const char *message);

ARGUMENTS

app_context
Specifies the application context.

message
Specifies the nonfatal error message that is to be reported.

handler
Specifies the new fatal error procedure, which should not return, or the nonfatal error procedure, which usually returns.

message
Specifies the message that is to be reported.

DESCRIPTION

The XtAppError function calls the installed error procedure and passes the specified message.

The XtAppSetErrorHandler function registers the specified procedure, which is called when a fatal error condition occurs.

The XtAppSetWarningHandler registers the specified procedure, which is called when a nonfatal error condition occurs.

The XtAppWarning function calls the installed nonfatal error procedure and passes the specified message.

SEE ALSO

XtAppGetErrorDatabase(3), XtAppErrorMsg(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

916 - Linux cli command XtDisplayStringConversionWarning

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtDisplayStringConversionWarning and provides detailed information about the command XtDisplayStringConversionWarning, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtDisplayStringConversionWarning.

NAME 🖥️ XtDisplayStringConversionWarning 🖥️

issue a conversion warning message

SYNTAX

#include <X11/Intrinsic.h>

void XtDisplayStringConversionWarning(Display* display, const char *from_value, const char *to_type);

ARGUMENTS

display
Specifies the display connection with which the conversion is associated.

from_value
Specifies the string that could not be converted.

to_type
Specifies the target representation type requested.

DESCRIPTION

The XtDisplayStringConversionWarning function issues a warning message using XtAppWarningMsg with name conversionError, type string, class XtToolkitError, and the default message string Cannot convert “from_value” to type to_type.

To issue other types of warning or error messages, the type converter should use XtAppWarningMsg or XtAppErrorMsg.

SEE ALSO

XtAppWarningMsg(3t)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

917 - Linux cli command zip_get_num_entries

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_get_num_entries and provides detailed information about the command zip_get_num_entries, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_get_num_entries.

libzip (-lzip)

The

function returns the number of files in

If

is set to

the original number of entries is returned.

returns the number of files in the zip archive, or -1 if

is

was added in libzip 0.10. In libzip 0.11 the return type was changed from

to

In libzip 0.11 the type of

was changed from

to

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

918 - Linux cli command __memalign_hook

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __memalign_hook and provides detailed information about the command __memalign_hook, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __memalign_hook.

NAME 🖥️ __memalign_hook 🖥️

malloc debugging variables (DEPRECATED)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <malloc.h>
void *(*volatile __malloc_hook)(size_t size, const void *caller);
void *(*volatile __realloc_hook)(void *ptr, size_t size,
 const void *caller);
void *(*volatile __memalign_hook)(size_t alignment, size_t size,
 const void *caller);
void (*volatile __free_hook)(void *ptr, const void *caller);
void (*__malloc_initialize_hook)(void);
void (*volatile __after_morecore_hook)(void);

DESCRIPTION

The GNU C library lets you modify the behavior of malloc(3), realloc(3), and free(3) by specifying appropriate hook functions. You can use these hooks to help you debug programs that use dynamic memory allocation, for example.

The variable __malloc_initialize_hook points at a function that is called once when the malloc implementation is initialized. This is a weak variable, so it can be overridden in the application with a definition like the following:

void (*__malloc_initialize_hook)(void) = my_init_hook;

Now the function my_init_hook() can do the initialization of all hooks.

The four functions pointed to by __malloc_hook, __realloc_hook, __memalign_hook, __free_hook have a prototype like the functions malloc(3), realloc(3), memalign(3), free(3), respectively, except that they have a final argument caller that gives the address of the caller of malloc(3), etc.

The variable __after_morecore_hook points at a function that is called each time after sbrk(2) was asked for more memory.

STANDARDS

GNU.

NOTES

The use of these hook functions is not safe in multithreaded programs, and they are now deprecated. From glibc 2.24 onwards, the __malloc_initialize_hook variable has been removed from the API, and from glibc 2.34 onwards, all the hook variables have been removed from the API. Programmers should instead preempt calls to the relevant functions by defining and exporting malloc(), free(), realloc(), and calloc().

EXAMPLES

Here is a short example of how to use these variables.

#include <stdio.h>
#include <malloc.h>
/* Prototypes for our hooks */
static void my_init_hook(void);
static void *my_malloc_hook(size_t, const void *);
/* Variables to save original hooks */
static void *(*old_malloc_hook)(size_t, const void *);
/* Override initializing hook from the C library */
void (*__malloc_initialize_hook)(void) = my_init_hook;
static void
my_init_hook(void)
{
    old_malloc_hook = __malloc_hook;
    __malloc_hook = my_malloc_hook;
}
static void *
my_malloc_hook(size_t size, const void *caller)
{
    void *result;
    /* Restore all old hooks */
    __malloc_hook = old_malloc_hook;
    /* Call recursively */
    result = malloc(size);
    /* Save underlying hooks */
    old_malloc_hook = __malloc_hook;
    /* printf() might call malloc(), so protect it too */
    printf("malloc(%zu) called from %p returns %p

“, size, caller, result); /* Restore our own hooks */ __malloc_hook = my_malloc_hook; return result; }

SEE ALSO

mallinfo(3), malloc(3), mcheck(3), mtrace(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

919 - Linux cli command File_IconThemepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command File_IconThemepm and provides detailed information about the command File_IconThemepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the File_IconThemepm.

NAME 🖥️ File_IconThemepm 🖥️

Find icon directories

VERSION

version 0.09

SYNOPSIS

use File::IconTheme qw(xdg_icon_theme_search_dirs); print join " “, xdg_icon_theme_search_dirs;

DESCRIPTION

This module can be used to find directories as specified by the Freedesktop.org Icon Theme Specification. Currently only a tiny (but most useful) part of the specification is implemented.

In case you want to store an icon theme, use the directory returned by:

use File::BaseDir qw(data_dirs); print scalar data_dirs(icons);

FUNCTIONS

Can be exported on request.

xdg_icon_theme_search_dirs

my @dirs = xdg_icon_theme_search_dir;

Returns a list of the base directories of icon themes.

CONFIGURATION AND ENVIRONMENT

$XDG_DATA_HOME, $XDG_DATA_DIRS

SEE ALSO

<http://standards.freedesktop.org/icon-theme-spec/>

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2003-2021 by Jaap Karssenberg || Pardus [Larus] <[email protected]>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

920 - Linux cli command nrand48_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command nrand48_r and provides detailed information about the command nrand48_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the nrand48_r.

NAME 🖥️ nrand48_r 🖥️

generate uniformly distributed pseudo-random numbers reentrantly

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int drand48_r(struct drand48_data *restrict buffer,
 double *restrict result);
int erand48_r(unsigned short xsubi[3],
 struct drand48_data *restrict buffer,
 double *restrict result);
int lrand48_r(struct drand48_data *restrict buffer,
 long *restrict result);
int nrand48_r(unsigned short xsubi[3],
 struct drand48_data *restrict buffer,
 long *restrict result);
int mrand48_r(struct drand48_data *restrict buffer,
 long *restrict result);
int jrand48_r(unsigned short xsubi[3],
 struct drand48_data *restrict buffer,
 long *restrict result);
int srand48_r(long int seedval, struct drand48_data *buffer);
int seed48_r(unsigned short seed16v[3], struct drand48_data *buffer);
int lcong48_r(unsigned short param[7], struct drand48_data *buffer);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

These functions are the reentrant analogs of the functions described in drand48(3). Instead of modifying the global random generator state, they use the supplied data buffer.

Before the first use, this struct must be initialized, for example, by filling it with zeros, or by calling one of the functions srand48_r(), seed48_r(), or lcong48_r().

RETURN VALUE

The return value is 0.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

drand48_r(), erand48_r(), lrand48_r(), nrand48_r(), mrand48_r(), jrand48_r(), srand48_r(), seed48_r(), lcong48_r()

Thread safetyMT-Safe race:buffer

STANDARDS

GNU.

SEE ALSO

drand48(3), rand(3), random(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

921 - Linux cli command wcrtomb

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcrtomb and provides detailed information about the command wcrtomb, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcrtomb.

NAME 🖥️ wcrtomb 🖥️

convert a wide character to a multibyte sequence

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
size_t wcrtomb(char *restrict s, wchar_t wc",mbstate_t*restrict"ps);

DESCRIPTION

The main case for this function is when s is not NULL and wc is not a null wide character (L’�’). In this case, the wcrtomb() function converts the wide character wc to its multibyte representation and stores it at the beginning of the character array pointed to by s. It updates the shift state *ps, and returns the length of said multibyte representation, that is, the number of bytes written at s.

A different case is when s is not NULL, but wc is a null wide character (L’�’). In this case, the wcrtomb() function stores at the character array pointed to by s the shift sequence needed to bring *ps back to the initial state, followed by a ‘�’ byte. It updates the shift state *ps (i.e., brings it into the initial state), and returns the length of the shift sequence plus one, that is, the number of bytes written at s.

A third case is when s is NULL. In this case, wc is ignored, and the function effectively returns

wcrtomb(buf, L'', ps)

where buf is an internal anonymous buffer.

In all of the above cases, if ps is NULL, a static anonymous state known only to the wcrtomb() function is used instead.

RETURN VALUE

The wcrtomb() function returns the number of bytes that have been or would have been written to the byte array at s. If wc can not be represented as a multibyte sequence (according to the current locale), (size_t) -1 is returned, and errno set to EILSEQ.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcrtomb()

Thread safetyMT-Unsafe race:wcrtomb/!ps

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of wcrtomb() depends on the LC_CTYPE category of the current locale.

Passing NULL as ps is not multithread safe.

SEE ALSO

mbsinit(3), wcsrtombs(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

922 - Linux cli command XmbufGetWindowAttributes

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XmbufGetWindowAttributes and provides detailed information about the command XmbufGetWindowAttributes, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XmbufGetWindowAttributes.

NAME 🖥️ XmbufGetWindowAttributes 🖥️

X multibuffering functions

SYNTAX

#include <X11/extensions/multibuf.h>

Bool XmbufQueryExtension(
    Display *dpy,
    Display *dpy,
    int *event_base_return,
    int *error_base_return);

Status XmbufGetVersion(
    Display *dpy,
    int *major_version_return,
    int *minor_version_return);

int XmbufCreateBuffers(
    Display *dpy,
    Window window,
    int count,
    int update_action,
    int update_hint,
    Multibuffer *buffers_update);

void XmbufDestroyBuffers(
    Display *dpy,
    Window window);

void XmbufDisplayBuffers(
    Display *dpy,
    int count,
    Multibuffer *buffers,
    int min_delay,
    int max_delay);

Status XmbufGetWindowAttributes(
    Display *dpy,
    Window window,
    XmbufWindowAttributes *attributes);

void XmbufChangeWindowAttributes(
    Display *dpy,
    Window window,
    unsigned long valuemask,
    XmbufSetWindowAttributes *attributes);

Status XmbufGetBufferAttributes(
    Display *dpy,
    Multibuffer buffer,
    XmbufBufferAttributes *attributes);

void XmbufChangeBufferAttributes(
    Display *dpy,
    Multibuffer buffer,
    unsigned long valuemask,
    XmbufSetBufferAttributes *attributes);

Status XmbufGetScreenInfo(
    Display *dpy,
    Drawable drawable,
    int *nmono_return,
    XmbufBufferInfo **mono_info_return,
    int *nstereo_return,
    XmbufBufferInfo **stereo_info_return);

Window XmbufCreateStereoWindow(
    Display *dpy,
    Window parent,
    int x,
    int y,
    unsigned int width,
    unsigned int height,
    unsigned int border_width,
    int depth,
    unsigned int class,                 /* InputOutput, InputOnly*/
    Visual *visual,
    unsigned long valuemask,
    XSetWindowAttributes *attributes,
    Multibuffer *left_return,
    Multibuffer *right_return);

STRUCTURES

Events:

typedef struct {
    int type;   /* of event */
    unsigned long serial;       /* # of last request processed by server */
    int send_event;     /* true if this came from a SendEvent request */
    Display *display;   /* Display the event was read from */
    Multibuffer buffer; /* buffer of event */
    int state;  /* see Clobbered constants above */
} XmbufClobberNotifyEvent;

typedef struct {
    int type;   /* of event */
    unsigned long serial;       /* # of last request processed by server */
    int send_event;     /* true if this came from a SendEvent request */
    Display *display;   /* Display the event was read from */
    Multibuffer buffer; /* buffer of event */
} XmbufUpdateNotifyEvent;

Per-window attributes that can be got:

typedef struct {
    int displayed_index;	/* which buffer is being displayed */
    int update_action;	/* Undefined, Background, Untouched, Copied */
    int update_hint;	/* Frequent, Intermittent, Static */
    int window_mode;	/* Mono, Stereo */
    int nbuffers;	/* Number of buffers */
    Multibuffer *buffers;	/* Buffers */
} XmbufWindowAttributes;

Per-window attributes that can be set:

typedef struct {
    int update_hint;	/* Frequent, Intermittent, Static */
} XmbufSetWindowAttributes;

Per-buffer attributes that can be got:

typedef struct {
    Window window;	/* which window this belongs to */
    unsigned long event_mask;	/* events that have been selected */
    int buffer_index;	/* which buffer is this */
    int side;	/* Mono, Left, Right */
} XmbufBufferAttributes;

Per-buffer attributes that can be set:

typedef struct {
    unsigned long event_mask;	/* events that have been selected */
} XmbufSetBufferAttributes;

Per-screen buffer info (there will be lists of them):

typedef struct {
    VisualID visualid;	/* visual usable at this depth */
    int max_buffers;	/* most buffers for this visual */
    int depth;	/* depth of buffers to be created */
} XmbufBufferInfo;

DESCRIPTION

The application programming library for the X11 Double-Buffering, Multi-Buffering, and Stereo Extension contains the interfaces described below. With the exception of * XmbufQueryExtension *, if any of these routines are called with a display that does not support the extension, the ExtensionErrorHandler (which can be set with * XSetExtensionErrorHandler * and functions the same way as * XSetErrorHandler *) will be called and the function will then return.

* XmbufQueryExtension * returns * True * if the multibuffering/stereo extension is available on the given display. If the extension exists, the value of the first event code (which should be added to the event type constants * MultibufferClobberNotify * and * MultibufferUpdateNotify * to get the actual values) is stored into event_base_return and the value of the first error code (which should be added to the error type constant * MultibufferBadBuffer * to get the actual value) is stored into error_base_return.

* XmbufGetVersion * gets the major and minor version numbers of the extension. The return value is zero if an error occurs or non-zero if no error happens.

* XmbufCreateBuffers * requests that “count” buffers be created with the given update_action and update_hint and be associated with the indicated window. The number of buffers created is returned (zero if an error occurred) and buffers_update is filled in with that many Multibuffer identifiers.

* XmbufDestroyBuffers * destroys the buffers associated with the given window.

* XmbufDisplayBuffers * displays the indicated buffers their appropriate windows within max_delay milliseconds after min_delay milliseconds have passed. No two buffers may be associated with the same window or else a Match error is generated.

* XmbufGetWindowAttributes * gets the multibuffering attributes that apply to all buffers associated with the given window. The list of buffers returns may be freed with * XFree *. Returns non-zero on success and zero if an error occurs.

* XmbufChangeWindowAttributes * sets the multibuffering attributes that apply to all buffers associated with the given window. This is currently limited to the update_hint.

* XmbufGetBufferAttributes * gets the attributes for the indicated buffer. Returns non-zero on success and zero if an error occurs.

* XmbufChangeBufferAttributes * sets the attributes for the indicated buffer. This is currently limited to the event_mask.

* XmbufGetScreenInfo * gets the parameters controlling how mono and stereo windows may be created on the screen of the given drawable. The numbers of sets of visual and depths are returned in nmono_return and nstereo_return. If nmono_return is greater than zero, then mono_info_return is set to the address of an array of * XmbufBufferInfo * structures describing the various visuals and depths that may be used. Otherwise, mono_info_return is set to NULL. Similarly, stereo_info_return is set according to nstereo_return. The storage returned in mono_info_return and stereo_info_return may be released by * XFree *. If no errors are encounted, non-zero will be returned.

* XmbufCreateStereoWindow * creates a stereo window in the same way that * XCreateWindow * creates a mono window. The buffer ids for the left and right buffers are returned in left_return and right_return, respectively. If an extension error handler that returns is installed, * None * will be returned if the extension is not available on this display.

PREDEFINED VALUES

Update_action field:

 MultibufferUpdateActionUndefined   MultibufferUpdateActionBackground   MultibufferUpdateActionUntouched   MultibufferUpdateActionCopied 

Update_hint field:

 MultibufferUpdateHintFrequent   MultibufferUpdateHintIntermittent   MultibufferUpdateHintStatic 

Valuemask fields:

 MultibufferWindowUpdateHint   MultibufferBufferEventMask 

Mono vs. stereo and left vs. right:

 MultibufferModeMono   MultibufferModeStereo   MultibufferSideMono   MultibufferSideLeft   MultibufferSideRight 

Clobber state:

 MultibufferUnclobbered   MultibufferPartiallyClobbered   MultibufferFullyClobbered 

Event stuff:

 MultibufferClobberNotifyMask   MultibufferUpdateNotifyMask   MultibufferClobberNotify   MultibufferUpdateNotify   MultibufferNumberEvents   MultibufferBadBuffer   MultibufferNumberErrors 

BUGS

This manual page needs more work.

SEE ALSO

Extending X for Double Buffering, Multi-Buffering, and Stereo

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

923 - Linux cli command Image_ExifTool_Lang_en_gbpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Lang_en_gbpm and provides detailed information about the command Image_ExifTool_Lang_en_gbpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Lang_en_gbpm.

NAME 🖥️ Image_ExifTool_Lang_en_gbpm 🖥️

ExifTool British English language translations

DESCRIPTION

This file is used by Image::ExifTool to generate localized tag descriptions and values.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Image::ExifTool (3pm), Image::ExifTool::TagInfoXML (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

924 - Linux cli command memmove

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command memmove and provides detailed information about the command memmove, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the memmove.

NAME 🖥️ memmove 🖥️

copy memory area

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
void *memmove(void dest[.n], const void src[.n], size_t n);

DESCRIPTION

The memmove() function copies n bytes from memory area src to memory area dest. The memory areas may overlap: copying takes place as though the bytes in src are first copied into a temporary array that does not overlap src or dest, and the bytes are then copied from the temporary array to dest.

RETURN VALUE

The memmove() function returns a pointer to dest.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

memmove()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89, SVr4, 4.3BSD.

SEE ALSO

bcopy(3), bstring(3), memccpy(3), memcpy(3), strcpy(3), strncpy(3), wmemmove(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

925 - Linux cli command getloadavg

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getloadavg and provides detailed information about the command getloadavg, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getloadavg.

NAME 🖥️ getloadavg 🖥️

get system load averages

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int getloadavg(double loadavg[], int nelem);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getloadavg():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    In glibc up to and including 2.19:
        _BSD_SOURCE

DESCRIPTION

The getloadavg() function returns the number of processes in the system run queue averaged over various periods of time. Up to nelem samples are retrieved and assigned to successive elements of loadavg[]. The system imposes a maximum of 3 samples, representing averages over the last 1, 5, and 15 minutes, respectively.

RETURN VALUE

If the load average was unobtainable, -1 is returned; otherwise, the number of samples actually retrieved is returned.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getloadavg()

Thread safetyMT-Safe

STANDARDS

BSD.

HISTORY

4.3BSD-Reno, Solaris. glibc 2.2.

SEE ALSO

uptime(1), proc(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

926 - Linux cli command Net_DNS_RR_PTRpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_PTRpm and provides detailed information about the command Net_DNS_RR_PTRpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_PTRpm.

NAME 🖥️ Net_DNS_RR_PTRpm 🖥️

DNS PTR resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name PTR ptrdname);

DESCRIPTION

Class for DNS Pointer (PTR) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

ptrdname

$ptrdname = $rr->ptrdname; $rr->ptrdname( $ptrdname );

A domain name which points to some location in the domain name space.

COPYRIGHT

Copyright (c)1997 Michael Fuhr.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC1035(3.3.12) <https://iana.org/go/rfc1035#section-3.3.12>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

927 - Linux cli command pcap_sendpacketpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_sendpacketpcap and provides detailed information about the command pcap_sendpacketpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_sendpacketpcap.

NAME 🖥️ pcap_sendpacketpcap 🖥️

transmit a packet

SYNOPSIS

#include <pcap/pcap.h>
int pcap_inject(pcap_t *p, const void *buf, size_t size);
int pcap_sendpacket(pcap_t *p, const u_char *buf, int size);

DESCRIPTION

pcap_inject() sends a raw packet through the network interface; buf points to the data of the packet, including the link-layer header, and size is the number of bytes in the packet.

Note that, even if you successfully open the network interface, you might not have permission to send packets on it, or it might not support sending packets; as pcap_open_live(3PCAP) doesn’t have a flag to indicate whether to open for capturing, sending, or capturing and sending, you cannot request an open that supports sending and be notified at open time whether sending will be possible. Note also that some devices might not support sending packets.

Note that, on some platforms, the link-layer header of the packet that’s sent might not be the same as the link-layer header of the packet supplied to pcap_inject(), as the source link-layer address, if the header contains such an address, might be changed to be the address assigned to the interface on which the packet it sent, if the platform doesn’t support sending completely raw and unchanged packets. Even worse, some drivers on some platforms might change the link-layer type field to whatever value libpcap used when attaching to the device, even on platforms that do nominally support sending completely raw and unchanged packets.

pcap_sendpacket() is like pcap_inject(), but it returns 0 on success, rather than returning the number of bytes written. (pcap_inject() comes from OpenBSD; pcap_sendpacket() comes from WinPcap/Npcap. Both are provided for compatibility.)

RETURN VALUE

pcap_inject() returns the number of bytes written on success, PCAP_ERROR_NOT_ACTIVATED if called on a capture handle that has been created but not activated, and PCAP_ERROR on other errors.

pcap_sendpacket() returns 0 on success, PCAP_ERROR_NOT_ACTIVATED if called on a capture handle that has been created but not activated, and PCAP_ERROR on other errors.

If PCAP_ERROR is returned, pcap_geterr(3PCAP) or pcap_perror(3PCAP) may be called with p as an argument to fetch or display the error text.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

928 - Linux cli command XeviQueryExtension

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XeviQueryExtension and provides detailed information about the command XeviQueryExtension, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XeviQueryExtension.

NAME 🖥️ XeviQueryExtension 🖥️

X Extended Visual Information functions

SYNOPSIS

#include <X11/extensions/XEVI.h>

Bool XeviQueryExtension (Display *dpy);

Bool XeviQueryVersion (Display *dpy, int *major_version_return, int *minor_version_return);

int XeviGetVisualInfo (Display *dpy, VisualID *visual, int n_visual, ExtendedVisualInfo ** evi_return, int * n_info_return);

DESCRIPTION

The X11 Extended Visual Information extension (EVI) allows a client to determine information about core X visuals beyond what the core protocol provides.

The EVI application programming library contains the interfaces described below. With the exception of XeviQueryExtension, if any of these routines are called with a display that does not support the extension, the ExtensionErrorHandler (which can be set with XSetExtensionErrorHandler and functions the same way as XSetErrorHandler) will be called and the function will then return.

XeviQueryExtension returns True if the Extended Visual Information extension is available on the given display. A client must call XeviQueryExtension before calling any other EVI function in order to negotiate a compatible protocol version; otherwise the client will get undefined behavior (EVI may or may not work).

XeviQueryVersion returns True if the request succeeded; the values of the major and minor protocol version supported by the server are returned in major_version_return and minor_version_return.

XeviGetVisualInfo returns a list of ExtendedVisualInfo structures that describe visual information beyond that supported by the core protocol. This includes layer information relevant for systems supporting overlays and/or underlay planes, and information that allows applications better to determine the level of hardware support for multiple colormaps. XeviGetVisualInfo returns Success if successful, or an X error otherwise. If the argument visual is NULL, then information for all visuals of all screens is returned. Otherwise, it’s a pointer to a list of visuals for which extended visual information is desired. n_visual is the number of elements in the array visual. evi_return returns a pointer to a list of ExtendedVisualInfo. When done, the client should free the list using XFree. n_info_return returns the number of elements in the array evi_return.

The ExtendedVisualInfo structure has the following fields:

VisualID	core_visual_id
int 	screen
int 	level
unsigned int	transparency_type
unsigned int	transparency_value
unsigned int	min_hw_colormaps
unsigned int	max_hw_colormaps
unsigned int	num_colormap_conflicts
VisualID *  	colormap_conflicts

The combination of core_visual_id and screen number uniquely specify the visual being described.

level returns the level number for the visual, 0 for normal planes, > 0 for overlays, < 0 for underlays.

transparency_type returns the type of transparency supported by the visual. XEVI_TRANSPARENCY_NONE if there are no transparent pixels, XEVI_TRANSPARENCY_PIXEL if the visual supports a transparent pixel, XEVI_TRANSPARENCY_MASK if the visual supports transparent plane(s).

transparency_value returns the pixel/plane value to set for transparency if transparency_type isn’t XEVI_TRANSPARENCY_NONE.

min_hw_colormaps and max_hw_colormaps return the minimum and maximum number of hardware colormaps backing up the visual.

num_colormap_conflicts returns the number of elements in colormap_conflicts. This array returns a list of visuals that may cause conflicts in the use of the hardware colormap. For example, if a 12-bit hardware colormap is overloaded to support 8-bit colormaps, the corresponding 8-bit visuals would conflict with the 12-bit visuals.

ERRORS

XeviGetVisualInfo will return BadValue if passed an illegal visual ID, BadAccess if the X server does not respond, BadAlloc if there is a memory allocation failure.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

929 - Linux cli command get_nprocs_conf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command get_nprocs_conf and provides detailed information about the command get_nprocs_conf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the get_nprocs_conf.

NAME 🖥️ get_nprocs_conf 🖥️

get number of processors

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/sysinfo.h>
int get_nprocs(void);
int get_nprocs_conf(void);

DESCRIPTION

The function get_nprocs_conf() returns the number of processors configured by the operating system.

The function get_nprocs() returns the number of processors currently available in the system. This may be less than the number returned by get_nprocs_conf() because processors may be offline (e.g., on hotpluggable systems).

RETURN VALUE

As given in DESCRIPTION.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

get_nprocs(), get_nprocs_conf()

Thread safetyMT-Safe

STANDARDS

GNU.

NOTES

The current implementation of these functions is rather expensive, since they open and parse files in the /sys filesystem each time they are called.

The following sysconf(3) calls make use of the functions documented on this page to return the same information.

np = sysconf(_SC_NPROCESSORS_CONF);     /* processors configured */
np = sysconf(_SC_NPROCESSORS_ONLN);     /* processors available */

EXAMPLES

The following example shows how get_nprocs() and get_nprocs_conf() can be used.

#include <stdio.h>
#include <stdlib.h>
#include <sys/sysinfo.h>
int
main(void)
{
    printf("This system has %d processors configured and "
            "%d processors available.

“, get_nprocs_conf(), get_nprocs()); exit(EXIT_SUCCESS); }

SEE ALSO

nproc(1)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

930 - Linux cli command HTML_Formatterpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_Formatterpm and provides detailed information about the command HTML_Formatterpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_Formatterpm.

NAME 🖥️ HTML_Formatterpm 🖥️

Base class for HTML formatters

VERSION

version 2.16

SYNOPSIS

use HTML::FormatSomething; my $infile = “whatever.html”; my $outfile = “whatever.file”; open OUT, “>$outfile” or die “Cant write-open $outfile: $! “; print OUT HTML::FormatSomething->format_file( $infile, option1 => value1, option2 => value2, … ); close(OUT);

DESCRIPTION

HTML::Formatter is a base class for classes that take HTML and format it to some output format. When you take an object of such a base class and call $formatter-format( $tree )> with an HTML::TreeBuilder (or HTML::Element) object, they return the appropriately formatted string for the input HTML.

HTML formatters are able to format a HTML syntax tree into various printable formats. Different formatters produce output for different output media. Common for all formatters are that they will return the formatted output when the format() method is called. The format() method takes a HTML::Element object (usually the HTML::TreeBuilder root object) as parameter.

The distribution name has been changed to HTML-Formatter as detailed in DISTRIBUTION NAME

METHODS

new

my $formatter = FormatterClass->new( option1 => value1, option2 => value2, … );

This creates a new formatter object with the given options.

format_file

format_from_file

$string = FormatterClass->format_file( $html_source, option1 => value1, option2 => value2, … );

Return a string consisting of the result of using the given class to format the given HTML file according to the given (optional) options. Internally it calls SomeClass->new( ... )->format( ... ) on a new HTML::TreeBuilder object based on the given HTML file.

format_string

format_from_string

$string = FormatterClass->format_string( $html_source, option1 => value1, option2 => value2, … );

Return a string consisting of the result of using the given class to format the given HTML source according to the given (optional) options. Internally it calls SomeClass->new( ... )->format( ... ) on a new HTML::TreeBuilder object based on the given source.

format

my $render_string = $formatter->format( $html_tree_object );

This renders the given HTML object according to the options set for $formatter.

After you’ve used a particular formatter object to format a particular HTML tree object, you probably should not use either again.

DISTRIBUTION NAME

This module was originally named HTML-Format despite not containing a HTML::Format module within it. As rules on naming have been taken more seriously, and the PAUSE <https://pause.perl.org/> toolchain adapted so that getting the distribution indexed was more difficult, it became obvious that I should rename the distribution to HTML-Formatter matching the base HTML::Formatter module.

As of release 2.13 this is released as the HTML-Formatter distribution with corresponding changes to the git repository name and associated items.

Due to the way that the module is put together this should have no effect on code using the module. The only issues will be where the distribution name was used within dependancies.

SEE ALSO

The three specific formatters:-

HTML::FormatText
Format HTML into plain text

HTML::FormatPS
Format HTML into postscript

HTML::FormatRTF
Format HTML into Rich Text Format

Also the HTML manipulation libraries used - HTML::TreeBuilder, HTML::Element and HTML::Tree

SUPPORT

Bugs / Feature Requests

Please report any bugs or feature requests through the issue tracker at <http://rt.cpan.org/Public/Dist/Display.html?Name=HTML-Formatter>. You will be notified automatically of any progress on your issue.

Source Code

This is open source software. The code repository is available for public review and contribution under the terms of the license.

<https://github.com/nigelm/html-formatter>

git clone https://github.com/nigelm/html-formatter.git

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Nigel Metheringham, 2002-2005 Sean M Burke, 1999-2002 Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

931 - Linux cli command Image_ExifTool_Applepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Applepm and provides detailed information about the command Image_ExifTool_Applepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Applepm.

NAME 🖥️ Image_ExifTool_Applepm 🖥️

Apple EXIF maker notes tags

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret Apple maker notes in EXIF information.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

“Apple Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

932 - Linux cli command sinhl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sinhl and provides detailed information about the command sinhl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sinhl.

NAME 🖥️ sinhl 🖥️

hyperbolic sine function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double sinh(double x);
float sinhf(float x);
long double sinhl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sinhf(), sinhl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the hyperbolic sine of x, which is defined mathematically as:

    sinh(x) = (exp(x) - exp(-x)) / 2

RETURN VALUE

On success, these functions return the hyperbolic sine of x.

If x is a NaN, a NaN is returned.

If x is +0 (-0), +0 (-0) is returned.

If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the same sign as x.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error: result overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sinh(), sinhf(), sinhl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

SEE ALSO

acosh(3), asinh(3), atanh(3), cosh(3), csinh(3), tanh(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

933 - Linux cli command strtoul

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strtoul and provides detailed information about the command strtoul, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strtoul.

NAME 🖥️ strtoul 🖥️

convert a string to an unsigned long integer

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
unsigned long strtoul(const char *restrict nptr,
 char **restrict endptr, int base);
unsigned long long strtoull(const char *restrict nptr,
 char **restrict endptr, int base);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strtoull():

    _ISOC99_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The strtoul() function converts the initial part of the string in nptr to an unsigned long value according to the given base, which must be between 2 and 36 inclusive, or be the special value 0.

The string may begin with an arbitrary amount of white space (as determined by isspace(3)) followed by a single optional ‘+’ or ‘-’ sign. If base is zero or 16, the string may then include a “0x” prefix, and the number will be read in base 16; otherwise, a zero base is taken as 10 (decimal) unless the next character is ‘0’, in which case it is taken as 8 (octal).

The remainder of the string is converted to an unsigned long value in the obvious manner, stopping at the first character which is not a valid digit in the given base. (In bases above 10, the letter ‘A’ in either uppercase or lowercase represents 10, ‘B’ represents 11, and so forth, with ‘Z’ representing 35.)

If endptr is not NULL, and the base is supported, strtoul() stores the address of the first invalid character in *endptr. If there were no digits at all, strtoul() stores the original value of nptr in *endptr (and returns 0). In particular, if *nptr is not ‘�’ but **endptr is ‘�’ on return, the entire string is valid.

The strtoull() function works just like the strtoul() function but returns an unsigned long long value.

RETURN VALUE

The strtoul() function returns either the result of the conversion or, if there was a leading minus sign, the negation of the result of the conversion represented as an unsigned value, unless the original (nonnegated) value would overflow; in the latter case, strtoul() returns ULONG_MAX and sets errno to ERANGE. Precisely the same holds for strtoull() (with ULLONG_MAX instead of ULONG_MAX).

ERRORS

This function does not modify errno on success.

EINVAL
(not in C99) The given base contains an unsupported value.

ERANGE
The resulting value was out of range.

The implementation may also set errno to EINVAL in case no conversion was performed (no digits seen, and 0 returned).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strtoul(), strtoull(), strtouq()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

strtoul()
POSIX.1-2001, C89, SVr4.

strtoull()
POSIX.1-2001, C99.

NOTES

Since strtoul() can legitimately return 0 or ULONG_MAX (ULLONG_MAX for strtoull()) on both success and failure, the calling program should set errno to 0 before the call, and then determine if an error occurred by checking whether errno has a nonzero value after the call.

In locales other than the “C” locale, other strings may be accepted. (For example, the thousands separator of the current locale may be supported.)

BSD also has

u_quad_t strtouq(const char *nptr, char **endptr, int base);

with completely analogous definition. Depending on the wordsize of the current architecture, this may be equivalent to strtoull() or to strtoul().

Negative values are considered valid input and are silently converted to the equivalent unsigned long value.

EXAMPLES

See the example on the strtol(3) manual page; the use of the functions described in this manual page is similar.

SEE ALSO

a64l(3), atof(3), atoi(3), atol(3), strtod(3), strtol(3), strtoumax(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

934 - Linux cli command Tk_Canvaspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Canvaspm and provides detailed information about the command Tk_Canvaspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Canvaspm.

NAME 🖥️ Tk_Canvaspm 🖥️

Create and manipulate Canvas widgets

SYNOPSIS

$canvas = $parent->Canvas(?options?);

STANDARD OPTIONS

-background -highlightthickness -insertwidth -state -borderwidth -insertbackground -relief -tile -cursor -insertborderwidth -selectbackground -takefocus -highlightbackground -insertofftime -selectborderwidth -xscrollcommand -highlightcolor -insertontime -selectforeground -yscrollcommand

WIDGET-SPECIFIC OPTIONS

Name: closeEnough

Class: CloseEnough

Switch: -closeenough

Specifies a floating-point value indicating how close the mouse cursor must be to an item before it is considered to be ``inside’’ the item. Defaults to 1.0.

Name: confine

Class: Confine

Switch: -confine

Specifies a boolean value that indicates whether or not it should be allowable to set the canvas’s view outside the region defined by the scrollRegion argument. Defaults to true, which means that the view will be constrained within the scroll region.

Name: height

Class: Height

Switch: -height

Specifies a desired window height that the canvas widget should request from its geometry manager. The value may be specified in any of the forms described in the “COORDINATES” section below.

Name: scrollRegion

Class: ScrollRegion

Switch: -scrollregion

Specifies a list with four coordinates describing the left, top, right, and bottom coordinates of a rectangular region. This region is used for scrolling purposes and is considered to be the boundary of the information in the canvas. Each of the coordinates may be specified in any of the forms given in the “COORDINATES” section below.

Name: state

Class: State

Switch: -state

Modifies the default state of the canvas where state may be set to one of: normal, disabled, or hidden. Individual canvas objects all have their own state option, which overrides the default state. Many options can take separate specifications such that the appearance of the item can be different in different situations. The options that start with “active” control the appearance when the mouse pointer is over it, while the option starting with “disabled” controls the appearance when the state is disabled.

Name: width

Class: width

Switch: -width

Specifies a desired window width that the canvas widget should request from its geometry manager. The value may be specified in any of the forms described in the “COORDINATES” section below.

Name: xScrollIncrement

Class: ScrollIncrement

Switch: -xscrollincrement

Specifies an increment for horizontal scrolling, in any of the usual forms permitted for screen distances. If the value of this option is greater than zero, the horizontal view in the window will be constrained so that the canvas x coordinate at the left edge of the window is always an even multiple of xScrollIncrement; furthermore, the units for scrolling (e.g., the change in view when the left and right arrows of a scrollbar are selected) will also be xScrollIncrement. If the value of this option is less than or equal to zero, then horizontal scrolling is unconstrained.

Name: yScrollIncrement

Class: ScrollIncrement

Switch: -yscrollincrement

Specifies an increment for vertical scrolling, in any of the usual forms permitted for screen distances. If the value of this option is greater than zero, the vertical view in the window will be constrained so that the canvas y coordinate at the top edge of the window is always an even multiple of yScrollIncrement; furthermore, the units for scrolling (e.g., the change in view when the top and bottom arrows of a scrollbar are selected) will also be yScrollIncrement. If the value of this option is less than or equal to zero, then vertical scrolling is unconstrained.

DESCRIPTION

The Canvas method creates a new window (given by the $canvas argument) and makes it into a canvas widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the canvas such as its colors and 3-D relief. The canvas command returns its $canvas argument. At the time this command is invoked, there must not exist a window named $canvas, but $canvas’s parent must exist.

Canvas widgets implement structured graphics. A canvas displays any number of items, which may be things like rectangles, circles, lines, and text. Items may be manipulated (e.g. moved or re-colored) and callbacks may be associated with items in much the same way that the bind method allows callbacks to be bound to widgets. For example, a particular callback may be associated with the <Button-1> event so that the callback is invoked whenever button 1 is pressed with the mouse cursor over an item. This means that items in a canvas can have behaviors defined by the Callbacks bound to them.

DISPLAY LIST

The items in a canvas are ordered for purposes of display, with the first item in the display list being displayed first, followed by the next item in the list, and so on. Items later in the display list obscure those that are earlier in the display list and are sometimes referred to as being ``on top’’ of earlier items. When a new item is created it is placed at the end of the display list, on top of everything else. Widget methods may be used to re-arrange the order of the display list.

Window items are an exception to the above rules. The underlying window systems require them always to be drawn on top of other items. In addition, the stacking order of window items is not affected by any of the canvas methods; you must use the raise and lower Tk widget methods instead.

ITEM IDS AND TAGS

Items in a canvas widget may be named in either of two ways: by id or by tag. Each item has a unique identifying number which is assigned to that item when it is created. The id of an item never changes and id numbers are never re-used within the lifetime of a canvas widget.

Each item may also have any number of tags associated with it. A tag is just a string of characters, and it may take any form except that of an integer. For example, ``x123’’ is OK but ``123’’ isn’t. The same tag may be associated with many different items. This is commonly done to group items in various interesting ways; for example, all selected items might be given the tag ``selected’'.

The tag all is implicitly associated with every item in the canvas; it may be used to invoke operations on all the items in the canvas.

The tag current is managed automatically by Tk; it applies to the current item, which is the topmost item whose drawn area covers the position of the mouse cursor. If the mouse is not in the canvas widget or is not over an item, then no item has the current tag.

When specifying items in canvas methods, if the specifier is an integer then it is assumed to refer to the single item with that id. If the specifier is not an integer, then it is assumed to refer to all of the items in the canvas that have a tag matching the specifier. The symbol tagOrId is used below to indicate that an argument specifies either an id that selects a single item or a tag that selects zero or more items.

tagOrId may contain a logical expressions of tags by using operators: ‘&&’, ‘||’, ‘^’ ‘!’, and parenthezised subexpressions. For example:

$c->find(‘withtag’, ‘(a&&!b)|(!a&&b)’);

or equivalently:

$c->find(‘withtag’, ‘a^b’);

will find only those items with either “a” or “b” tags, but not both.

Some methods only operate on a single item at a time; if tagOrId is specified in a way that names multiple items, then the normal behavior is for the methods is to use the first (lowest) of these items in the display list that is suitable for the method. Exceptions are noted in the method descriptions below.

COORDINATES

All coordinates related to canvases are stored as floating-point numbers. Coordinates and distances are specified in screen units, which are floating-point numbers optionally followed by one of several letters. If no letter is supplied then the distance is in pixels. If the letter is m then the distance is in millimeters on the screen; if it is c then the distance is in centimeters; i means inches, and p means printers points (1/72 inch). Larger y-coordinates refer to points lower on the screen; larger x-coordinates refer to points farther to the right.

TRANSFORMATIONS

Normally the origin of the canvas coordinate system is at the upper-left corner of the window containing the canvas. It is possible to adjust the origin of the canvas coordinate system relative to the origin of the window using the xview and yview methods; this is typically used for scrolling. Canvases do not support scaling or rotation of the canvas coordinate system relative to the window coordinate system.

Individual items may be moved or scaled using methods described below, but they may not be rotated.

INDICES

Text items support the notion of an index for identifying particular positions within the item.

Indices are used for methods such as inserting text, deleting a range of characters, and setting the insertion cursor position. An index may be specified in any of a number of ways, and different types of items may support different forms for specifying indices.

In a similar fashion, line and polygon items support index for identifying, inserting and deleting subsets of their coordinates. Indices are used for commands such as inserting or deleting a range of characters or coordinates, and setting the insertion cursor position. An index may be specified in any of a number of ways, and different types of items may support different forms for specifying indices.

Text items support the following forms for an index; if you define new types of text-like items, it would be advisable to support as many of these forms as practical. Note that it is possible to refer to the character just after the last one in the text item; this is necessary for such tasks as inserting new text at the end of the item. Lines and Polygons don’t support the insertion cursor and the selection. Their indices are supposed to be even always, because coordinates always appear in pairs.

number
A decimal number giving the position of the desired character within the text item. 0 refers to the first character, 1 to the next character, and so on. If indexes are odd for lines and polygons, they will be automatically decremented by one. A number less than 0 is treated as if it were zero, and a number greater than the length of the text item is treated as if it were equal to the length of the text item. For polygons, numbers less than 0 or greater then the length of the coordinate list will be adjusted by adding or substracting the length until the result is between zero and the length, inclusive.

end
Refers to the character or coordinate just after the last one in the item (same as the number of characters or coordinates in the item).

insert
Refers to the character just before which the insertion cursor is drawn in this item. Not valid for lines and polygons.

sel.first
Refers to the first selected character in the item. If the selection isn’t in this item then this form is illegal.

sel.last
Refers to the last selected character in the item. If the selection isn’t in this item then this form is illegal.

[x,y]
Refers to the character or coordinate at the point given by x and y, where x and y are specified in the coordinate system of the canvas. If x and y lie outside the coordinates covered by the text item, then they refer to the first or last character in the line that is closest to the given point. The Tcl string form “@x,y” is also allowed.

DASH PATTERNS

Many items support the notion of an dash pattern for outlines.

The first possible syntax is a list of integers. Each element represents the number of pixels of a line segment. Only the odd segments are drawn using the “outline” color. The other segments are drawn transparent.

The second possible syntax is a character list containing only 5 possible characters [.,-_ ], with the first 4 characters producing a segment of length 1 to 4, respectively, followed by a transparent segment of length 2. The space can be used repeatedly to enlarge the space between other line elements by 1, and can not occur as the first position in the string. The main difference of this syntax with the previous one is that it it shape-conserving. This means that all values in the dash list will be multiplied by the line width before display. This assures that “.” will always be displayed as a dot and “-” always as a dash regardless of the line width.

Some examples, for a line width of 2:

-dash . = -dash [2,4] -dash - = -dash [6,4] -dash -. = -dash [6,4,2,4] -dash -.. = -dash [6,4,2,4,2,4] -dash . = -dash [2,8] -dash , = -dash [4,4]

On systems where only a limited set of dash patterns is available, the dash pattern will be displayed as the closest available dash pattern. For example, on Windows only the first 4 of the above examples are available. The last 2 examples will be displayed identically as the first one.

WIDGET METHODS

The Canvas method creates a widget object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class.

The following additional methods are available for canvas widgets:

$canvas->addtag(tag, searchSpec, ?arg, arg, …?)
For each item that meets the constraints specified by searchSpec and the args, add tag to the list of tags associated with the item if it isn’t already present on that list. It is possible that no items will satisfy the constraints given by searchSpec and args, in which case the method has no effect. This command returns an empty string as result. SearchSpec and arg’s may take any of the following forms:

above tagOrId
Selects the item just after (above) the one given by tagOrId in the display list. If tagOrId denotes more than one item, then the last (topmost) of these items in the display list is used.

all
Selects all the items in the canvas.

below tagOrId
Selects the item just before (below) the one given by tagOrId in the display list. If tagOrId denotes more than one item, then the first (lowest) of these items in the display list is used.

closest x y ?halo? ?start?
Selects the item closest to the point given by x and y. If more than one item is at the same closest distance (e.g. two items overlap the point), then the top-most of these items (the last one in the display list) is used. If halo is specified, then it must be a non-negative value. Any item closer than halo to the point is considered to overlap it. The start argument may be used to step circularly through all the closest items. If start is specified, it names an item using a tag or id (if by tag, it selects the first item in the display list with the given tag). Instead of selecting the topmost closest item, this form will select the topmost closest item that is below start in the display list; if no such item exists, then the selection behaves as if the start argument had not been specified.

enclosed x1 y1 x2 y2
Selects all the items completely enclosed within the rectangular region given by x1, y1, x2, and y2. X1 must be no greater then x2 and y1 must be no greater than y2.

overlapping x1 y1 x2 y2
Selects all the items that overlap or are enclosed within the rectangular region given by x1, y1, x2, and y2. X1 must be no greater then x2 and y1 must be no greater than y2.

withtag tagOrId
Selects all the items given by tagOrId.

$canvas->bbox(tagOrId, ?tagOrId, tagOrId, …?)
Returns a list with four elements giving an approximate bounding box for all the items named by the tagOrId arguments. The list has the form ``x1 y1 x2 y2’’ such that the drawn areas of all the named elements are within the region bounded by x1 on the left, x2 on the right, y1 on the top, and y2 on the bottom. The return value may overestimate the actual bounding box by a few pixels. If no items match any of the tagOrId arguments or if the matching items have empty bounding boxes (i.e. they have nothing to display) then an empty string is returned.

$canvas->bind(tagOrId?, sequence? ?,callback?)
This method associates callback with all the items given by tagOrId such that whenever the event sequence given by sequence occurs for one of the items the callback will be invoked. This method is similar to the bind method except that it operates on items in a canvas rather than entire widgets. See Tk::bind for complete details on the syntax of sequence and the substitutions performed on callback before invoking it. If all arguments are specified then a new binding is created, replacing any existing binding for the same sequence and tagOrId (if the first character of command is ``+’’ then command augments an existing binding rather than replacing it). In this case the return value is an empty string. If callback is omitted then the method returns the callback associated with tagOrId and sequence (an error occurs if there is no such binding). If both callback and sequence are omitted then the method returns a list of all the sequences for which bindings have been defined for tagOrId.

The only events for which bindings may be specified are those related to the mouse and keyboard (such as Enter, Leave, ButtonPress, Motion, and KeyPress) or virtual events. The handling of events in canvases uses the current item defined in “ITEM IDS AND TAGS” above. Enter and Leave events trigger for an item when it becomes the current item or ceases to be the current item; note that these events are different than Enter and Leave events for windows. Mouse-related events are directed to the current item, if any. Keyboard-related events are directed to the focus item, if any (see the focus method below for more on this). If a virtual event is used in a binding, that binding can trigger only if the virtual event is defined by an underlying mouse-related or keyboard-related event. It is possible for multiple bindings to match a particular event. This could occur, for example, if one binding is associated with the item’s id and another is associated with one of the item’s tags. When this occurs, all of the matching bindings are invoked. A binding associated with the all tag is invoked first, followed by one binding for each of the item’s tags (in order), followed by a binding associated with the item’s id. If there are multiple matching bindings for a single tag, then only the most specific binding is invoked. A continue in a callback terminates that subroutine, and a break method terminates that subroutine and skips any remaining callbacks for the event, just as for the bind method. If bindings have been created for a canvas window using the CanvasBind method, then they are invoked in addition to bindings created for the canvas’s items using the bind method. The bindings for items will be invoked before any of the bindings for the window as a whole.

$canvas->canvasx(screenx?, gridspacing?)
Given a window x-coordinate in the canvas screenx, this method returns the canvas x-coordinate that is displayed at that location. If gridspacing is specified, then the canvas coordinate is rounded to the nearest multiple of gridspacing units.

$canvas->canvasy(screeny, ?gridspacing?)
Given a window y-coordinate in the canvas screeny this method returns the canvas y-coordinate that is displayed at that location. If gridspacing is specified, then the canvas coordinate is rounded to the nearest multiple of gridspacing units.

$canvas->coords(tagOrId ?x0,y0 …?)
Query or modify the coordinates that define an item. If no coordinates are specified, this method returns a list whose elements are the coordinates of the item named by tagOrId. If coordinates are specified, then they replace the current coordinates for the named item. If tagOrId refers to multiple items, then the first one in the display list is used.

$canvas->create(type, x, y, ?x, y, …?, ?option, value, …?)
Create a new item in $canvas of type type. The exact format of the arguments after type depends on type, but usually they consist of the coordinates for one or more points, followed by specifications for zero or more item options. See the subsections on individual item types below for more on the syntax of this method. This method returns the id for the new item.

$canvas->dchars(tagOrId, first, ?last?)
For each item given by tagOrId, delete the characters, or coordinates, in the range given by first and last, inclusive. If some of the items given by tagOrId don’t support Text items interpret first and last as indices to a character, line and polygon items interpret them indices to a coordinate (an x,y pair). within the item(s) as described in “INDICES” above. If last is omitted, it defaults to first. This method returns an empty string.

$canvas->delete(?tagOrId, tagOrId, …?)
Delete each of the items given by each tagOrId, and return an empty string.

$canvas->dtag(tagOrId, ?tagToDelete?)
For each of the items given by tagOrId, delete the tag given by tagToDelete from the list of those associated with the item. If an item doesn’t have the tag tagToDelete then the item is unaffected by the method. If tagToDelete is omitted then it defaults to tagOrId. This method returns an empty string.

$canvas->find(searchCommand, ?arg, arg, …?)
This method returns a list consisting of all the items that meet the constraints specified by searchCommand and arg’s. SearchCommand and args have any of the forms accepted by the addtag method. The items are returned in stacking order, with the lowest item first.

focus

$canvas->focus(?tagOrId?)

Set the keyboard focus for the canvas widget to the item given by tagOrId. If tagOrId refers to several items, then the focus is set to the first such item in the display list that supports the insertion cursor. If tagOrId doesn’t refer to any items, or if none of them support the insertion cursor, then the focus isn’t changed. If tagOrId is an empty string, then the focus item is reset so that no item has the focus. If tagOrId is not specified then the method returns the id for the item that currently has the focus, or an empty string if no item has the focus.

Once the focus has been set to an item, the item will display the insertion cursor and all keyboard events will be directed to that item. The focus item within a canvas and the focus window on the screen (set with the focus method) are totally independent: a given item doesn’t actually have the input focus unless (a) its canvas is the focus window and (b) the item is the focus item within the canvas. In most cases it is advisable to follow the focus widget method with the CanvasFocus method to set the focus window to the canvas (if it wasn’t there already).

$canvas->gettags(tagOrId)
Return a list whose elements are the tags associated with the item given by tagOrId. If tagOrId refers to more than one item, then the tags are returned from the first such item in the display list. If tagOrId doesn’t refer to any items, or if the item contains no tags, then an empty string is returned.

$canvas->icursor(tagOrId, index)
Set the position of the insertion cursor for the item(s) given by tagOrId to just before the character whose position is given by index. If some or all of the items given by tagOrId don’t support an insertion cursor then this method has no effect on them. See “INDICES” above for a description of the legal forms for index. Note: the insertion cursor is only displayed in an item if that item currently has the keyboard focus (see the widget method focus, below), but the cursor position may be set even when the item doesn’t have the focus. This method returns an empty string.

$canvas->index(tagOrId, index)
This method returns a decimal string giving the numerical index within tagOrId corresponding to index. Index gives a textual description of the desired position as described in “INDICES” above. Text items interpret index as an index to a character, line and polygon items interpret it as an index to a coordinate (an x,y pair). The return value is guaranteed to lie between 0 and the number of characters, or coordinates, within the item, inclusive. If tagOrId refers to multiple items, then the index is processed in the first of these items that supports indexing operations (in display list order).

$canvas->insert(tagOrId, beforeThis, string)
For each of the items given by tagOrId, if the item supports text or coordinate, insertion then string is inserted into the item’s text just before the character, or coordinate, whose index is beforeThis. Text items interpret beforethis as an index to a character, line and polygon items interpret it as an index to a coordinate (an x,y pair). For lines and polygons the string must be a valid coordinate sequence. See “INDICES” above for information about the forms allowed for beforeThis. This method returns an empty string.

$canvas->itemcget(tagOrId, option)
Returns the current value of the configuration option for the item given by tagOrId whose name is option. This method is similar to the cget method except that it applies to a particular item rather than the widget as a whole. Option may have any of the values accepted by the create method when the item was created. If tagOrId is a tag that refers to more than one item, the first (lowest) such item is used.

$canvas->itemconfigure(tagOrId, ?option?, ?value?, ?option, value, …?)
This method is similar to the configure method except that it modifies item-specific options for the items given by tagOrId instead of modifying options for the overall canvas widget. If no option is specified, returns a list describing all of the available options for the first item given by tagOrId (see Tk::options for information on the format of this list). If option is specified with no value, then the method returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the method modifies the given widget option(s) to have the given value(s) in each of the items given by tagOrId; in this case the method returns an empty string. The options and values are the same as those permissible in the create method when the item(s) were created; see the sections describing individual item types below for details on the legal options.

$canvas->lower(tagOrId, ?belowThis?)
Move all of the items given by tagOrId to a new position in the display list just before the item given by belowThis. If tagOrId refers to more than one item then all are moved but the relative order of the moved items will not be changed. BelowThis is a tag or id; if it refers to more than one item then the first (lowest) of these items in the display list is used as the destination location for the moved items. Note: this method has no effect on window items. Window items always obscure other item types, and the stacking order of window items is determined by the raise and lower methods of the widget, not the raise and lower methods for canvases. This method returns an empty string.

$canvas->move(tagOrId, xAmount, yAmount)
Move each of the items given by tagOrId in the canvas coordinate space by adding xAmount to the x-coordinate of each point associated with the item and yAmount to the y-coordinate of each point associated with the item. This method returns an empty string.

$canvas->postscript(?option, value, option, value, …?)
Generate a Postscript representation for part or all of the canvas. If the -file option is specified then the Postscript is written to a file and an empty string is returned; otherwise the Postscript is returned as the result of the method. If the interpreter that owns the canvas is marked as safe, the operation will fail because safe interpreters are not allowed to write files. If the -channel option is specified, the argument denotes the name of a channel already opened for writing. The Postscript is written to that channel, and the channel is left open for further writing at the end of the operation. The Postscript is created in Encapsulated Postscript form using version 3.0 of the Document Structuring Conventions. Note: by default Postscript is only generated for information that appears in the canvas’s window on the screen. If the canvas is freshly created it may still have its initial size of 1x1 pixel so nothing will appear in the Postscript. To get around this problem either invoke the update method to wait for the canvas window to reach its final size, or else use the -width and -height options to specify the area of the canvas to print. The option-value argument pairs provide additional information to control the generation of Postscript. The following options are supported:

-colormap => hashRef
HashRef must be a reference to a hash variable or an anonymous hash that specifies a color mapping to use in the Postscript. Each value of the hash must consist of Postscript code to set a particular color value (e.g. ``1.0 1.0 0.0 setrgbcolor’’). When outputting color information in the Postscript, Tk checks to see if there is a key in the hash with the same name as the color. If so, Tk uses the value of the element as the Postscript method to set the color. If this option hasn’t been specified, or if there isn’t a key in hashRef for a given color, then Tk uses the red, green, and blue intensities from the X color.

-colormode => mode
Specifies how to output color information. Mode must be either color (for full color output), gray (convert all colors to their gray-scale equivalents) or mono (convert all colors to black or white).

-file => fileName
Specifies the name of the file in which to write the Postscript. If this option isn’t specified then the Postscript is returned as the result of the method instead of being written to a file.

-fontmap => hashRef
HashRef must be a reference to a hash variable or an anonymous hash that specifies a font mapping to use in the Postscript. Each value of the hash must consist of an array reference with two elements, which are the name and point size of a Postscript font. When outputting Postscript commands for a particular font, Tk checks to see if hashRef contains a value with the same name as the font. If there is such an element, then the font information contained in that element is used in the Postscript. Otherwise Tk attempts to guess what Postscript font to use. Tk’s guesses generally only work for well-known fonts such as Times and Helvetica and Courier, and only if the X font name does not omit any dashes up through the point size. For example, -*-Courier-Bold-R-Normal–*-120-* will work but *Courier-Bold-R-Normal*120* will not; Tk needs the dashes to parse the font name).

-height => size
Specifies the height of the area of the canvas to print. Defaults to the height of the canvas window.

-pageanchor => anchor
Specifies which point of the printed area of the canvas should appear over the positioning point on the page (which is given by the -pagex and -pagey options). For example, -pageanchor=>n means that the top center of the area of the canvas being printed (as it appears in the canvas window) should be over the positioning point. Defaults to center.

-pageheight => size
Specifies that the Postscript should be scaled in both x and y so that the printed area is size high on the Postscript page. Size consists of a floating-point number followed by c for centimeters, i for inches, m for millimeters, or p or nothing for printer’s points (1/72 inch). Defaults to the height of the printed area on the screen. If both -pageheight and -pagewidth are specified then the scale factor from -pagewidth is used (non-uniform scaling is not implemented).

-pagewidth => size
Specifies that the Postscript should be scaled in both x and y so that the printed area is size wide on the Postscript page. Size has the same form as for -pageheight. Defaults to the width of the printed area on the screen. If both -pageheight and -pagewidth are specified then the scale factor from -pagewidth is used (non-uniform scaling is not implemented).

-pagex => position
Position gives the x-coordinate of the positioning point on the Postscript page, using any of the forms allowed for -pageheight. Used in conjunction with the -pagey and -pageanchor options to determine where the printed area appears on the Postscript page. Defaults to the center of the page.

-pagey => position
Position gives the y-coordinate of the positioning point on the Postscript page, using any of the forms allowed for -pageheight. Used in conjunction with the -pagex and -pageanchor options to determine where the printed area appears on the Postscript page. Defaults to the center of the page.

-rotate => boolean
Boolean specifies whether the printed area is to be rotated 90 degrees. In non-rotated output the x-axis of the printed area runs along the short dimension of the page (``portrait’’ orientation); in rotated output the x-axis runs along the long dimension of the page (``landscape’’ orientation). Defaults to non-rotated.

-width => size
Specifies the width of the area of the canvas to print. Defaults to the width of the canvas window.

-x => position
Specifies the x-coordinate of the left edge of the area of the canvas that is to be printed, in canvas coordinates, not window coordinates. Defaults to the coordinate of the left edge of the window.

-y => position
Specifies the y-coordinate of the top edge of the area of the canvas that is to be printed, in canvas coordinates, not window coordinates. Defaults to the coordinate of the top edge of the window.

$canvas->raise(tagOrId, ?aboveThis?)
Move all of the items given by tagOrId to a new position in the display list just after the item given by aboveThis. If tagOrId refers to more than one item then all are moved but the relative order of the moved items will not be changed. AboveThis is a tag or id; if it refers to more than one item then the last (topmost) of these items in the display list is used as the destination location for the moved items. Note: this method has no effect on window items. Window items always obscure other item types, and the stacking order of window items is determined by the raise and lower widget commands, not the raise and lower methods for canvases. This method returns an empty string.

$canvas->scale(tagOrId, xOrigin, yOrigin, xScale, yScale)
Rescale all of the items given by tagOrId in canvas coordinate space. XOrigin and yOrigin identify the origin for the scaling operation and xScale and yScale identify the scale factors for x- and y-coordinates, respectively (a scale factor of 1.0 implies no change to that coordinate). For each of the points defining each item, the x-coordinate is adjusted to change the distance from xOrigin by a factor of xScale. Similarly, each y-coordinate is adjusted to change the distance from yOrigin by a factor of yScale. This method returns an empty string.

$canvas->scan(option, args)
This method is used to implement scanning on canvases. It has two forms, depending on option:

$canvas->scanMark(x, y)
Records x and y and the canvas’s current view; used in conjunction with later scanDragto method. Typically this method is associated with a mouse button press in the widget and x and y are the coordinates of the mouse. It returns an empty string.

$canvas->scanDragto(x, y, ?gain?.)
This method computes the difference between its x and y arguments (which are typically mouse coordinates) and the x and y arguments to the last scanMark method for the widget. It then adjusts the view by 10 times the difference in coordinates. This method is typically associated It then adjusts the view by gain times the difference in coordinates, where gain defaults to 10. This command is typically associated with mouse motion events in the widget, to produce the effect of dragging the canvas at high speed through its window. The return value is an empty string.

$canvas->select(option, ?tagOrId, arg?)
Manipulates the selection in one of several ways, depending on option. The method may take any of the forms described below. In all of the descriptions below, tagOrId must refer to an item that supports indexing and selection; if it refers to multiple items then the first of these that supports indexing and the selection is used. Index gives a textual description of a position within tagOrId, as described in “INDICES” above.

$canvas->selectAdjust(tagOrId, index)
Locate the end of the selection in tagOrId nearest to the character given by index, and adjust that end of the selection to be at index (i.e. including but not going beyond index). The other end of the selection is made the anchor point for future selectTo method calls. If the selection isn’t currently in tagOrId then this method behaves the same as the selectTo widget method. Returns an empty string.

$canvas->selectClear
Clear the selection if it is in this widget. If the selection isn’t in this widget then the method has no effect. Returns an empty string.

$canvas->selectFrom(tagOrId, index)
Set the selection anchor point for the widget to be just before the character given by index in the item given by tagOrId. This method doesn’t change the selection; it just sets the fixed end of the selection for future selectTo method calls. Returns an empty string.

$canvas->selectItem
Returns the id of the selected item, if the selection is in an item in this canvas. If the selection is not in this canvas then an empty string is returned.

$canvas->selectTo(tagOrId, index)
Set the selection to consist of those characters of tagOrId between the selection anchor point and index. The new selection will include the character given by index; it will include the character given by the anchor point only if index is greater than or equal to the anchor point. The anchor point is determined by the most recent selectAdjust or selectFrom method calls for this widget. If the selection anchor point for the widget isn’t currently in tagOrId, then it is set to the same character given by index. Returns an empty string.

$canvas->type(tagOrId)
Returns the type of the item given by tagOrId, such as rectangle or text. If tagOrId refers to more than one item, then the type of the first item in the display list is returned. If tagOrId doesn’t refer to any items at all then an empty string is returned.

$canvas->xview(?args?)
This method is used to query and change the horizontal position of the information displayed in the canvas’s window. It can take any of the following forms:

$canvas->xview
Returns a list containing two elements. Each element is a real fraction between 0 and 1; together they describe the horizontal span that is visible in the window. For example, if the first element is .2 and the second element is .6, 20% of the canvas’s area (as defined by the -scrollregion option) is off-screen to the left, the middle 40% is visible in the window, and 40% of the canvas is off-screen to the right. These are the same values passed to scrollbars via the -xscrollcommand option.

$canvas->xviewMoveto(fraction)
Adjusts the view in the window so that fraction of the total width of the canvas is off-screen to the left. Fraction must be a fraction between 0 and 1.

$canvas->xviewScroll(number, what)
This method shifts the view in the window left or right according to number and what. Number must be an integer. What must be either units or pages or an abbreviation of one of these. If what is units, the view adjusts left or right in units of the xScrollIncrement option, if it is greater than zero, or in units of one-tenth the window’s width otherwise. If what is pages then the view adjusts in units of nine-tenths the window’s width. If number is negative then information farther to the left becomes visible; if it is positive then information farther to the right becomes visible.

$canvas->yview(?args?)
This method is used to query and change the vertical position of the information displayed in the canvas’s window. It can take any of the following forms:

$canvas->yview
Returns a list containing two elements. Each element is a real fraction between 0 and 1; together they describe the vertical span that is visible in the window. For example, if the first element is .6 and the second element is 1.0, the lowest 40% of the canvas’s area (as defined by the -scrollregion option) is visible in the window. These are the same values passed to scrollbars via the -yscrollcommand option.

$canvas->yviewMoveto(fraction)
Adjusts the view in the window so that fraction of the canvas’s area is off-screen to the top. Fraction is a fraction between 0 and 1.

$canvas->yviewScroll(number, what)
This method adjusts the view in the window up or down according to number and what. Number must be an integer. What must be either units or pages. If what is units, the view adjusts up or down in units of the yScrollIncrement option, if it is greater than zero, or in units of one-tenth the window’s height otherwise. If what is pages then the view adjusts in units of nine-tenths the window’s height. If number is negative then higher information becomes visible; if it is positive then lower information becomes visible.

OVERVIEW OF ITEM TYPES

The sections below describe the various types of items supported by canvas widgets. Each item type is characterized by two things: first, the form of the create method used to create instances of the type; and second, a set of configuration options for items of that type, which may be used in the create and itemconfigure methods. Most items don’t support indexing or selection or the methods related to them, such as index and insert. Where items do support these facilities, it is noted explicitly in the descriptions below. At present, text, line and polygon items provide this support. For lines and polygons the indexing facility is used to manipulate the coordinates of the item.

ARC ITEMS

Items of type arc appear on the display as arc-shaped regions. An arc is a section of an oval delimited by two angles (specified by the -start and -extent options) and displayed in one of several ways (specified by the -style option). Arcs are created with methods of the following form:

$canvas->createArc(x1, y1, x2, y2, ?option, value, option, value, …?)

The arguments x1, y1, x2, and y2 give the coordinates of two diagonally opposite corners of a rectangular region enclosing the oval that defines the arc. After the coordinates there may be any number of option-value pairs, each of which sets one of the configuration options for the item. These same option-value pairs may be used in itemconfigure methods to change the item’s configuration. The following options are supported for arcs:

-dash => pattern

-activedash => pattern

-disableddash => pattern

This option specifies dash patterns for the normal state, the active state, and the disabled state of an arc item. pattern may have any of the forms accepted by Tk_GetDash. If the dash options are omitted then the default is a solid outline.

-dashoffset => offset
The starting offset into the pattern provided by the -dash option. -dashoffset is ignored if there is no -dash pattern.

-extent => degrees
Specifies the size of the angular range occupied by the arc. The arc’s range extends for degrees degrees counter-clockwise from the starting angle given by the -start option. Degrees may be negative. If it is greater than 360 or less than -360, then degrees modulo 360 is used as the extent.

-fill => color

-activefill => color

-disabledfill => color

Specifies the color to be used to fill the arc region in its normal, active, and disabled states, Color may have any of the forms accepted by Tk_GetColor. If color is an empty string (the default), then then the arc will not be filled.

-outline => color

-activeoutline => color

-disabledoutline => color

This option specifies the color that should be used to draw the outline of the arc in its normal, active and disabled states. Color may have any of the forms accepted by Tk_GetColor. This option defaults to black. If color is specified as undef then no outline is drawn for the arc.

-outlinestipple => bitmap

-activeoutlinestipple => bitmap

-disabledoutlinestipple => bitmap

This option specifies stipple patterns that should be used to draw the outline of the arc in its normal, active and disabled states. Indicates that the outline for the arc should be drawn with a stipple pattern; bitmap specifies the stipple pattern to use, in any of the forms accepted by Tk_GetBitmap. If the -outline option hasn’t been specified then this option has no effect. If bitmap is an empty string (the default), then the outline is drawn in a solid fashion.

-start => degrees
Specifies the beginning of the angular range occupied by the arc. Degrees is given in units of degrees measured counter-clockwise from the 3-o’clock position; it may be either positive or negative.

-state => state
Modifies the state of the arc item where state may be set to one of: normal, disabled, hidden or “”. If set to empty, the state of the canvas itself is used. An arc item may also be in the “active” state if the mouse is currently over it. Many options can take separate specifications in normal, active and disabled states such that the appearance of the item can be different in each state.

-stipple => bitmap

-activestipple => bitmap

-disabledstipple => bitmap

This option specifies stipple patterns that should be used to fill the the arc in its normal, active and disabled states. bitmap specifies the stipple pattern to use, in any of the forms accepted by Tk_GetBitmap. If the -fill option hasn’t been specified then this option has no effect. If bitmap is an empty string (the default), then filling is done in a solid fashion.

-style => type
Specifies how to draw the arc. If type is pieslice (the default) then the arc’s region is defined by a section of the oval’s perimeter plus two line segments, one between the center of the oval and each end of the perimeter section. If type is chord then the arc’s region is defined by a section of the oval’s perimeter plus a single line segment connecting the two end points of the perimeter section. If type is arc then the arc’s region consists of a section of the perimeter alone. In this last case the -fill option is ignored.

-tags => tagList
Specifies a set of tags to apply to the item. TagList consists of a list of tag names, which replace any existing tags for the item. TagList may be an empty list.

-updatecommand => command
Specifies a callback that is to be executed every time the arc item is updated on the screen.

-width => outlineWidth

-activewidth => outlineWidth

-disabledwidth => outlineWidth

Specifies the width of the outline to be drawn around the arc’s region, in its normal, active and disabled states. outlineWidth may be in any of the forms described in the “COORDINATES” section above. If the -outline option has been specified as undef then this option has no effect. Wide outlines will be drawn centered on the edges of the arc’s region. This option defaults to 1.0.

BITMAP ITEMS

Items of type bitmap appear on the display as images with two colors, foreground and background. Bitmaps are created with methods of the following form:

$canvas->createBitmap(x, y, ?option, value, option, value, …?)

The arguments x and y specify the coordinates of a point used to position the bitmap on the display (see the -anchor option below for more information on how bitmaps are displayed). After the coordinates there may be any number of option-value pairs, each of which sets one of the configuration options for the item. These same option-value pairs may be used in itemconfigure methods to change the item’s configuration. The following options are supported for bitmaps:

-anchor => anchorPos
AnchorPos tells how to position the bitmap relative to the positioning point for the item; it may have any of the forms accepted by Tk_GetAnchor. For example, if anchorPos is center then the bitmap is centered on the point; if anchorPos is n then the bitmap will be drawn so that its top center point is at the positioning point. This option defaults to center.

-background => color

-activebackground => color

-disabledbackground => color

Specifies the color to use for each of the bitmap’s ‘0’ valued pixels in its normal, active and disabled states. Color may have any of the forms accepted by Tk_GetColor. If this option isn’t specified, or if it is specified as undef, then nothing is displayed where the bitmap pixels are 0; this produces a transparent effect.

-bitmap => bitmap

-activebitmap => bitmap

-disabledbitmap => bitmap

Specifies the bitmaps to display in the item in its normal, active and disabled states. All bitmaps must have the same width and height. Bitmap may have any of the forms accepted by Tk_GetBitmap.

-foreground => color

-activeforeground => color

-disabledforeground => color

Specifies the color to use for each of the bitmap’s ‘1’ valued pixels in its normal, active and disabled states. Color may have any of the forms accepted by Tk_GetColor and defaults to black.

-state => state
Modifies the state of the bitmap item where state may be set to one of: normal, disabled, or hidden. An bitmap item may also be in the “active” state if the mouse is currently over it. Many options can take separate specifications in normal, active and disabled states such that the appearance of the item can be different in each state.

-tags => tagList
Specifies a set of tags to apply to the item. TagList consists of a list of tag names, which replace any existing tags for the item. TagList may be an empty list.

-updatecommand => command
Specifies a callback that is to be executed every time the bitmap item is updated on the screen.

GRID ITEMS

Items of type grid are intended for producing a visual reference for interpreting other items. They can be drawn as either lines (with dash style) or as rectangular “dots” at each grid point.

Items of type grid are unlike other items they always cover the whole of the canvas, but are never enclosed by nor overlap any area and are not near any point. That is they are intended to be always visible but not “pickable”, as such they do support the “active” state. They are like other items in that: multiple grids are permitted, they can be raised and lowered relative to other items, they can be moved and scaled. As yet grids do not appear in PostScript output.

Grids have outline like configure options. Grids are created with methods of the following form:

$canvas->createGrid(x1, y1, x2, y2, ?option, value, option, value, …?)

The arguments x1, y1 give the origin of the grid. x2, and y2 give the coordinates of the next grid point in their respective directions. After the coordinates there may be any number of option-value pairs, each of which sets one of the configuration options for the item. These same option-value pairs may be used in itemconfigure methods to change the item’s configuration.

The following options are supported for grids:

-lines => boolean
If -lines is set to a true value then lines are drawn for both X and Y grids in the style determined by -dash. Otherwise retangular “dots” are drawn at each grid point.

-dash => pattern

-disableddash => pattern

This option specifies dash patterns for the normal state, and the disabled state of a grid item. pattern may have any of the forms accepted by Tk_GetDash. If the dash options are omitted then the default is a solid outline.

-dashoffset => offset
The starting offset into the pattern provided by the -dash option. -dashoffset is ignored if there is no -dash pattern.

-color => color

-disabledcolor => color

This option specifies the color that should be used to draw the outline of the grid in its normal and disabled states. Color may have any of the forms accepted by Tk_GetColor. This option defaults to black. If color is undef then no grid will be drawn.

-stipple => bitmap

-disabledstipple => bitmap

This option specifies stipple patterns that should be used to draw the outline of the rectangle in its normal and disabled states. bitmap specifies the stipple pattern to use, in any of the forms accepted by Tk_GetBitmap. If bitmap is an empty string (the default), then the outline is drawn in a solid fashion.

-state => state
Modifies the state of the rectangle item where state may be set to one of: normal, disabled, or hidden. Many options can take separate specifications in normal and disabled states such that the appearance of the item can be different in each state.

-tags => tagList
Specifies a set of tags to apply to the item. TagList consists of a list of tag names, which replace any existing tags for the item. TagList may be an empty list.

-updatecommand => command
Specifies a callback that is to be executed every time the grid item is updated on the screen.

-width => outlineWidth

-disabledwidth => outlineWidth

Specifies the width of the lines drawn by the grid or the size (in both X and Y) of the dots, in its normal and disabled states. This option defaults to 1.0.

IMAGE ITEMS

Items of type image are used to display images on a canvas. Images are created with methods of the following form:

$canvas->createImage(x, y, ?option, value, option, value, …?)

The arguments x and y specify the coordinates of a point used to position the image on the display (see the -anchor option below for more information). After the coordinates there may be any number of option-value pairs, each of which sets one of the configuration options for the item. These same option-value pairs may be used in itemconfigure methods to change the item’s configuration. The following options are supported for images:

-anchor => anchorPos
AnchorPos tells how to position the image relative to the positioning point for the item; it may have any of the forms accepted by Tk_GetAnchor. For example, if anchorPos is center then the image is centered on the point; if anchorPos is n then the image will be drawn so that its top center point is at the positioning point. This option defaults to center.

-image => name

-activeimage => name

-disabledimage => name

Specifies the name of the images to display in the item in is normal, active and disabled states. This image must have been created previously, see Tk::Image.

-state => state
Modifies the state of the image item where state may be set to one of: normal, disabled, or hidden. An image item may also be in the “active” state if the mouse is currently over it. Many options can take separate specifications in normal, active and disabled states such that the appearance of the item can be different in each state.

-tags => tagList
Specifies a set of tags to apply to the item. TagList consists of a list of tag names, which replace any existing tags for the item; it may be an empty list.

-updatecommand => command
Specifies a callback that is to be executed every time the image item is updated on the screen.

LINE ITEMS

Items of type line appear on the display as one or more connected line segments or curves. Line items support coordinate indexing operations using the canvas methods: dchars, index, insert. Lines are created with methods of the following form:

$canvas->createLine(x1, y1…, xn, yn, ?option, value, option, value, …?)

The arguments x1 through yn give the coordinates for a series of two or more points that describe a series of connected line segments. After the coordinates there may be any number of option-value pairs, each of which sets one of the configuration options for the item. These same option-value pairs may be used in itemconfigure methods to change the item’s configuration. The following options are supported for lines:

-arrow => where
Indicates whether or not arrowheads are to be drawn at one or both ends of the line. Where must have one of the values none (for no arrowheads), first (for an arrowhead at the first point of the line), last (for an arrowhead at the last point of the line), or both (for arrowheads at both ends). This option defaults to none.

-arrowshape => shape
This option indicates how to draw arrowheads. The shape argument must be a list with three elements, each specifying a distance in any of the forms described in the “COORDINATES” section above. The first element of the list gives the distance along the line from the neck of the arrowhead to its tip. The second element gives the distance along the line from the trailing points of the arrowhead to the tip, and the third element gives the distance from the outside edge of the line to the trailing points. If this option isn’t specified then Tk picks a ``reasonable’’ shape.

-capstyle => style
Specifies the ways in which caps are to be drawn at the endpoints of the line. Style may have any of the forms accepted by Tk_GetCapStyle (butt, projecting, or round). If this option isn’t specified then it defaults to butt. Where arrowheads are drawn the cap style is ignored.

-dash => pattern

-activedash => pattern

-disableddash => pattern

This option specifies dash patterns for the normal state, the active state, and the disabled state of a line item. pattern may have any of the forms accepted by Tk_GetDash. If the dash options are omitted then the default is a solid outline.

-dashoffset => offset
The starting offset into the pattern provided by the -dash option. -dashoffset is ignored if there is no -dash pattern.

-fill => color

-activefill => color

-disabledfill => color

Specifies the color to be used to fill the line in its normal, active, and disabled states. Color may have any of the forms acceptable to Tk_GetColor. It may also be undef, in which case the line will be transparent. This option defaults to black.

-joinstyle => style
Specifies the ways in which joints are to be drawn at the vertices of the line. Style may have any of the forms accepted by Tk_GetCapStyle (bevel, miter, or round). If this option isn’t specified then it defaults to miter. If the line only contains two points then this option is irrelevant.

-smooth => boolean
Boolean must have one of the forms accepted by Tk_GetBoolean. It indicates whether or not the line should be drawn as a curve. If so, the line is rendered as a set of parabolic splines: one spline is drawn for the first and second line segments, one for the second and third, and so on. Straight-line segments can be generated within a curve by duplicating the end-points of the desired line segment.

-splinesteps => number
Specifies the degree of smoothness desired for curves: each spline will be approximated with number line segments. This option is ignored unless the -smooth option is true.

-state => state
Modifies the state of the line item where state may be set to one of: normal, disabled, or hidden. A line item may also be in the “active” state if the mouse is currently over it. Many options can take separate specifications in normal, active and disabled states such that the appearance of the item can be different in each state.

-stipple => bitmap

-activestipple => bitmap

-disabledstipple => bitmap

This option specifies stipple patterns that should be used to fill the the line in its normal, active and disabled states. bitmap specifies the stipple pattern to use, in any of the forms accepted by Tk_GetBitmap. If bitmap is an empty string (the default), then filling is done in a solid fashion.

-tags => tagList
Specifies a set of tags to apply to the item. TagList consists of a list of tag names, which replace any existing tags for the item. TagList may be an empty list.

-updatecommand => command
Specifies a callback that is to be executed every time the line item is updated on the screen.

-width => lineWidth

-activewidth => lineWidth

-disabledwidth => lineWidth

Specifies the width of the line in its normal, active and disabled states. lineWidth may be in any of the forms described in the “COORDINATES” section above. Wide lines will be drawn centered on the path specified by the points. If this option isn’t specified then it defaults to 1.0.

OVAL ITEMS

Items of type oval appear as circular or oval regions on the display. Each oval may have an outline, a fill, or both. Ovals are created with methods of the following form:

$canvas->createOval(x1, y1, x2, y2, ?option, value, option, value, …?)

The arguments x1, y1, x2, and y2 give the coordinates of two diagonally opposite corners of a rectangular region enclosing the oval. The oval will include the top and left edges of the rectangle not the lower or right edges. If the region is square then the resulting oval is circular; otherwise it is elongated in shape. After the coordinates there may be any number of option-value pairs, each of which sets one of the configuration options for the item. These same option-value pairs may be used in itemconfigure methods to change the item’s configuration. The following options are supported for ovals:

-dash => pattern

-activedash => pattern

-disableddash => pattern

This option specifies dash patterns for the normal state, the active state, and the disabled state of an oval item. pattern may have any of the forms accepted by Tk_GetDash. If the dash options are omitted then the default is a solid outline.

-dashoffset => offset
The starting offset into the pattern provided by the -dash option. -dashoffset is ignored if there is no -dash pattern.

-fill => color

-activefill => color

-disabledfill => color

Specifies the color to be used to fill the oval in its normal, active, and disabled states. Color may have any of the forms accepted by Tk_GetColor. If color is undef (the default), then then the oval will not be filled.

-outline => color

-activeoutline => color

-disabledoutline => color

This option specifies the color that should be used to draw the outline of the oval in its normal, active and disabled states. Color may have any of the forms accepted by Tk_GetColor. This option defaults to black. If color is undef then no outline will be drawn for the oval.

-outlinestipple => bitmap

-activeoutlinestipple => bitmap

-disabledoutlinestipple => bitmap

This option specifies stipple patterns that should be used to draw the outline of the oval in its normal, active and disabled states. bitmap specifies the stipple pattern to use, in any of the forms accepted by Tk_GetBitmap. If the -outline option hasn’t been specified then this option has no effect. If bitmap is an empty string (the default), then the outline is drawn in a solid fashion.

-state => state
Modifies the state of the oval item where state may be set to one of: normal, disabled, or hidden. An oval item may also be in the “active” state if the mouse is currently over it. Many options can take separate specifications in normal, active and disabled states such that the appearance of the item can be different in each state.

-stipple => bitmap

-activestipple => bitmap

-disabledstipple => bitmap

This option specifies stipple patterns that should be used to fill the the oval in its normal, active and disabled states. bitmap specifies the stipple pattern to use, in any of the forms accepted by Tk_GetBitmap. If the -fill option hasn’t been specified then this option has no effect. If bitmap is an empty string (the default), then filling is done in a solid fashion.

-tags => tagList
Specifies a set of tags to apply to the item. TagList consists of a list of tag names, which replace any existing tags for the item. TagList may be an empty list.

-updatecommand => command
Specifies a callback that is to be executed every time the oval item is updated on the screen.

-width => outlineWidth

-activewidth => outlineWidth

-disabledwidth => outlineWidth

Specifies the width of the outline to be drawn around the oval, in its normal, active and disabled states. outlineWidth specifies the width of the outline to be drawn around the oval, in any of the forms described in the “COORDINATES” section above. If the -outline option hasn’t been specified then this option has no effect. Wide outlines are drawn centered on the oval path defined by x1, y1, x2, and y2. This option defaults to 1.0.

POLYGON ITEMS

Items of type polygon appear as polygonal or curved filled regions on the display. Polygon items support coordinate indexing operations using the canvas methods: dchars, index, insert. Polygons are created with methods of the following form:

$canvas->createPolygon(x1, y1, …, xn, yn, ?option, value, option, value, …?)

The arguments x1 through yn specify the coordinates for three or more points that define a closed polygon. The first and last points may be the same; whether they are or not, Tk will draw the polygon as a closed polygon. After the coordinates there may be any number of option-value pairs, each of which sets one of the configuration options for the item. These same option-value pairs may be used in itemconfigure methods to change the item’s configuration. The following options are supported for polygons:

-dash => pattern

-activedash => pattern

-disableddash => pattern

This option specifies dash patterns for the normal state, the active state, and the disabled state of an polygon item. pattern may have any of the forms accepted by Tk_GetDash. If the dash options are omitted then the default is a solid outline.

-dashoffset => offset
The starting offset into the pattern provided by the -dash option. -dashoffset is ignored if there is no -dash pattern.

-fill => color

-activefill => color

-disabledfill => color

Specifies the color to be used to fill the polygon in its normal, active, and disabled states. Color may have any of the forms acceptable to Tk_GetColor. If color is undef then the polygon will be transparent. This option defaults to black.

-joinstyle => style
Specifies the ways in which joints are to be drawn at the vertices of the outline. Style may have any of the forms accepted by Tk_GetCapStyle (bevel, miter, or round). If this option isn’t specified then it defaults to miter.

-outline => color

-activeoutline => color

-disabledoutline => color

This option specifies the color that should be used to draw the outline of the polygon in its normal, active and disabled states. Color may have any of the forms accepted by Tk_GetColor. If color is undef then no outline will be drawn for the polygon. This option defaults to undef (no outline).

-outlinestipple => bitmap

-activeoutlinestipple => bitmap

-disabledoutlinestipple => bitmap

This option specifies stipple patterns that should be used to draw the outline of the polygon in its normal, active and disabled states. bitmap specifies the stipple pattern to use, in any of the forms accepted by Tk_GetBitmap. If the -outline option hasn’t been specified then this option has no effect. If bitmap is an empty string (the default), then the outline is drawn in a solid fashion.

-smooth => boolean
Boolean must have one of the forms accepted by Tk_GetBoolean It indicates whether or not the polygon should be drawn with a curved perimeter. If so, the outline of the polygon becomes a set of parabolic splines, one spline for the first and second line segments, one for the second and third, and so on. Straight-line segments can be generated in a smoothed polygon by duplicating the end-points of the desired line segment.

-splinesteps => number
Specifies the degree of smoothness desired for curves: each spline will be approximated with number line segments. This option is ignored unless the -smooth option is true.

-state => state
Modifies the state of the polygon item where state may be set to one of: normal, disabled, or hidden. A polygon item may also be in the “active” state if the mouse is currently over it. Many options can take separate specifications in normal, active and disabled states such that the appearance of the item can be different in each state.

-stipple => bitmap

-activestipple => bitmap

-disabledstipple => bitmap

This option specifies stipple patterns that should be used to fill the the polygon in its normal, active and disabled states. bitmap specifies the stipple pattern to use, in any of the forms accepted by Tk_GetBitmap. If bitmap is an empty string (the default), then filling is done in a solid fashion.

-tags => tagList
Specifies a set of tags to apply to the item. TagList consists of a list of tag names, which replace any existing tags for the item. TagList may be an empty list.

-updatecommand => command
Specifies a callback that is to be executed every time the polygon item is updated on the screen.

-width => outlineWidth

-activewidth => outlineWidth

-disabledwidth => outlineWidth

Specifies the width of the outline to be drawn around

the polygon, in its normal, active and disabled states. outlineWidth may be in any of the forms described in the COORDINATES section above. OutlineWidth specifies the width of the outline to be drawn around the polygon, in any of the forms described in the “COORDINATES” section above. If the -outline option hasn’t been specified then this option has no effect. This option defaults to 1.0. Polygon items are different from other items such as rectangles, ovals and arcs in that interior points are considered to be ``inside’’ a polygon (e.g. for purposes of the find closest and find overlapping methods) even if it is not filled. For most other item types, an interior point is considered to be inside the item only if the item is filled or if it has neither a fill nor an outline. If you would like an unfilled polygon whose interior points are not considered to be inside the polygon, use a line item instead.

RECTANGLE ITEMS

Items of type rectangle appear as rectangular regions on the display. Each rectangle may have an outline, a fill, or both. Rectangles are created with methods of the following form:

$canvas->createRectangle(x1, y1, x2, y2, ?option, value, option, value, …?)

The arguments x1, y1, x2, and y2 give the coordinates of two diagonally opposite corners of the rectangle (the rectangle will include its upper and left edges but not its lower or right edges). After the coordinates there may be any number of option-value pairs, each of which sets one of the configuration options for the item. These same option-value pairs may be used in itemconfigure methods to change the item’s configuration. The following options are supported for rectangles:

-dash => pattern

-activedash => pattern

-disableddash => pattern

This option specifies dash patterns for the normal state, the active state, and the disabled state of a rectangle item. pattern may have any of the forms accepted by Tk_GetDash. If the dash options are omitted then the default is a solid outline.

-dashoffset => offset
The starting offset into the pattern provided by the -dash option. -dashoffset is ignored if there is no -dash pattern.

-fill => color

-activefill => color

-disabledfill => color

Specifies the color to be used to fill the rectangle in its normal, active, and disabled states. Color may be specified in any of the forms accepted by Tk_GetColor. If color is undef (the default), then the rectangle will not be filled.

-outline => color

-activeoutline => color

-disabledoutline => color

This option specifies the color that should be used to draw the outline of the rectangle in its normal, active and disabled states. Color may have any of the forms accepted by Tk_GetColor. This option defaults to black. If color is undef then no outline will be drawn for the rectangle.

-outlinestipple => bitmap

-activeoutlinestipple => bitmap

-disabledoutlinestipple => bitmap

This option specifies stipple patterns that should be used to draw the outline of the rectangle in its normal, active and disabled states. bitmap specifies the stipple pattern to use, in any of the forms accepted by Tk_GetBitmap. If the -outline option hasn’t been specified then this option has no effect. If bitmap is an empty string (the default), then the outline is drawn in a solid fashion.

-state => state
Modifies the state of the rectangle item where state may be set to one of: normal, disabled, or hidden. A rectangle item may also be in the “active” state if the mouse is currently over it. Many options can take separate specifications in normal, active and disabled states such that the appearance of the item can be different in each state.

-stipple => bitmap

-activestipple => bitmap

-disabledstipple => bitmap

This option specifies stipple patterns that should be used to fill the the rectangle in its normal, active and disabled states. bitmap specifies the stipple pattern to use, in any of the forms accepted by Tk_GetBitmap. If the -fill option hasn’t been specified then this option has no effect. If bitmap is an empty string (the default), then filling is done in a solid fashion.

-tags => tagList
Specifies a set of tags to apply to the item. TagList consists of a list of tag names, which replace any existing tags for the item. TagList may be an empty list.

-updatecommand => command
Specifies a callback that is to be executed every time the rectangle item is updated on the screen.

-width => outlineWidth

-activewidth => outlineWidth

-disabledwidth => outlineWidth

Specifies the width of the outline to be drawn around the rectangle, in its normal, active and disabled states. OutlineWidth specifies the width of the outline to be drawn around the rectangle, in any of the forms described in the “COORDINATES” section above. If the -outline option hasn’t been specified then this option has no effect. Wide outlines are drawn centered on the rectangular path defined by x1, y1, x2, and y2. This option defaults to 1.0.

TEXT ITEMS

A text item displays a string of characters on the screen in one or more lines. Text items support indexing and selection, along with the following text-related canvas methods: dchars, focus, icursor, index, insert, select. Text items are created with methods of the following form:

$canvas->createText(x, y, ?option, value, option, value, …?)

The arguments x and y specify the coordinates of a point used to position the text on the display (see the options below for more information on how text is displayed). After the coordinates there may be any number of option-value pairs, each of which sets one of the configuration options for the item. These same option-value pairs may be used in itemconfigure methods to change the item’s configuration. The following options are supported for text items:

-anchor => anchorPos
AnchorPos tells how to position the text relative to the positioning point for the text; it may have any of the forms accepted by Tk_GetAnchor. For example, if anchorPos is center then the text is centered on the point; if anchorPos is n then the text will be drawn such that the top center point of the rectangular region occupied by the text will be at the positioning point. This option defaults to center.

-fill => color

-activefill => color

-disabledfill => color

Specifies the color to be used to fill the text in its normal, active, and disabled states. Color may have any of the forms accepted by Tk_GetColor. If color is undef then the text will be transparent. If this option isn’t specified then it defaults to black.

-font => fontName
Specifies the font to use for the text item. FontName may be any string acceptable to Tk_GetFontStruct. If this option isn’t specified, it defaults to a system-dependent font.

-justify => how
Specifies how to justify the text within its bounding region. How must be one of the values left, right, or center. This option will only matter if the text is displayed as multiple lines. If the option is omitted, it defaults to left.

-state => state
Modifies the state of the text item where state may be set to one of: normal, disabled, or hidden. A text item may also be in the “active” state if the mouse is currently over it. Many options can take separate specifications in normal, active and disabled states such that the appearance of the item can be different in each state.

-stipple => bitmap

-activestipple => bitmap

-disabledstipple => bitmap

This option specifies stipple patterns that should be used to fill the the text in its normal, active and disabled states. bitmap specifies the stipple pattern to use, in any of the forms accepted by Tk_GetBitmap. If bitmap is an empty string (the default) then the text is drawn in a solid fashion.

-tags => tagList
Specifies a set of tags to apply to the item. TagList consists of a list of tag names, which replace any existing tags for the item. TagList may be an empty list.

-text => string
String specifies the characters to be displayed in the text item. Newline characters cause line breaks. The characters in the item may also be changed with the insert and delete methods. This option defaults to an empty string.

-updatecommand => command
Specifies a callback that is to be executed every time the text item is updated on the screen.

-width => lineLength
Specifies a maximum line length for the text, in any of the forms described in the “COORDINATES” section above. If this option is zero (the default) the text is broken into lines only at newline characters. However, if this option is non-zero then any line that would be longer than lineLength is broken just before a space character to make the line shorter than lineLength; the space character is treated as if it were a newline character.

WINDOW ITEMS

Items of type window cause a particular window to be displayed at a given position on the canvas. Window items are created with methods of the following form:

$canvas->createWindow(x, y?, -option=>value, -option=>value, …?)

The arguments x and y specify the coordinates of a point used to position the window on the display (see the -anchor option below for more information on how bitmaps are displayed). After the coordinates there may be any number of option-value pairs, each of which sets one of the configuration options for the item. These same option-value pairs may be used in itemconfigure method to change the item’s configuration. The following options are supported for window items:

-anchor => anchorPos
AnchorPos tells how to position the window relative to the positioning point for the item; it may have any of the forms accepted by Tk_GetAnchor. For example, if anchorPos is center then the window is centered on the point; if anchorPos is n then the window will be drawn so that its top center point is at the positioning point. This option defaults to center.

-height => pixels
Specifies the height to assign to the item’s window. Pixels may have any of the forms described in the “COORDINATES” section above. If this option isn’t specified, or if it is specified as an empty string, then the window is given whatever height it requests internally.

-state => state
Modifies the state of the window item where state may be set to one of: normal, disabled, or hidden.

-tags => tagList
Specifies a set of tags to apply to the item. TagList consists of a list of tag names, which replace any existing tags for the item. TagList may be an empty list.

-updatecommand => command
Specifies a callback that is to be executed every time the window item is updated on the screen.

-width => pixels
Specifies the width to assign to the item’s window. Pixels may have any of the forms described in the “COORDINATES” section above. If this option isn’t specified, or if it is specified as an empty string, then the window is given whatever width it requests internally.

-window => $widget
Specifies the window to associate with this item. The window specified by $widget must either be a child of the canvas widget or a child of some ancestor of the canvas widget. PathName may not refer to a top-level window. Note: due to restrictions in the ways that windows are managed, it is not possible to draw other graphical items (such as lines and images) on top of window items. A window item always obscures any graphics that overlap it, regardless of their order in the display list.

APPLICATION-DEFINED ITEM TYPES

It is possible for individual applications to define new item types for canvas widgets using C code. See the documentation for Tk_CreateItemType.

BINDINGS

Canvas has default bindings to allow scrolling if necessary: <Up>, <Down>, <Left> and <Right> (and their <Control-*> counter parts). Further <Proir>, <Next>, <Home> and <End>. These bindings allow you to navigate the same way as in other widgets that can scroll.

Perl/Tk Methods

The following methods are added as perl code:

$canvas->get_corners
Returns the bounding box in Canvas coordinates of the visible portion of the Canvas. (Written by Slaven Rezic.)

CREDITS

Tk’s canvas widget is a blatant ripoff of ideas from Joel Bartlett’s ezd program. Ezd provides structured graphics in a Scheme environment and preceded canvases by a year or two. Its simple mechanisms for placing and animating graphical objects inspired the functions of canvases.

KEYWORDS

canvas, widget

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

935 - Linux cli command Image_ExifTool_GIMPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_GIMPpm and provides detailed information about the command Image_ExifTool_GIMPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_GIMPpm.

NAME 🖥️ Image_ExifTool_GIMPpm 🖥️

Read meta information from GIMP XCF images

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read meta information from GIMP (GNU Image Manipulation Program) XCF (eXperimental Computing Facility) images. This is the native image format used by the GIMP software.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

“GIMP source code”

<http://svn.gnome.org/viewvc/gimp/trunk/devel-docs/xcf.txt?view=markup>

SEE ALSO

“GIMP Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

936 - Linux cli command zlib

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zlib and provides detailed information about the command zlib, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zlib.

NAME 🖥️ zlib 🖥️

compression/decompression library

SYNOPSIS

[see zlib.h for full description]

DESCRIPTION

The zlib library is a general purpose data compression library. The code is thread safe, assuming that the standard library functions used are thread safe, such as memory allocation routines. It provides in-memory compression and decompression functions, including integrity checks of the uncompressed data. This version of the library supports only one compression method (deflation) but other algorithms may be added later with the same stream interface.

Compression can be done in a single step if the buffers are large enough or can be done by repeated calls of the compression function. In the latter case, the application must provide more input and/or consume the output (providing more output space) before each call.

The library also supports reading and writing files in gzip(1) (.gz) format with an interface similar to that of stdio.

The library does not install any signal handler. The decoder checks the consistency of the compressed data, so the library should never crash even in the case of corrupted input.

All functions of the compression library are documented in the file zlib.h. The distribution source includes examples of use of the library in the files test/example.c and test/minigzip.c, as well as other examples in the examples/ directory.

Changes to this version are documented in the file ChangeLog that accompanies the source.

zlib is built in to many languages and operating systems, including but not limited to Java, Python, .NET, PHP, Perl, Ruby, Swift, and Go.

An experimental package to read and write files in the .zip format, written on top of zlib by Gilles Vollant ([email protected]), is available at:

http://www.winimage.com/zLibDll/minizip.html and also in the contrib/minizip directory of the main zlib source distribution.

SEE ALSO

The zlib web site can be found at:

http://zlib.net/

The data format used by the zlib library is described by RFC (Request for Comments) 1950 to 1952 in the files:

http://tools.ietf.org/html/rfc1950 (for the zlib header and trailer format)
http://tools.ietf.org/html/rfc1951 (for the deflate compressed data format)
http://tools.ietf.org/html/rfc1952 (for the gzip header and trailer format)

Mark Nelson wrote an article about zlib for the Jan. 1997 issue of Dr. Dobb’s Journal; a copy of the article is available at:

http://marknelson.us/1997/01/01/zlib-engine/

REPORTING PROBLEMS

Before reporting a problem, please check the zlib web site to verify that you have the latest version of zlib; otherwise, obtain the latest version and see if the problem still exists. Please read the zlib FAQ at:

http://zlib.net/zlib_faq.html

before asking for help. Send questions and/or comments to [email protected], or (for the Windows DLL version) to Gilles Vollant ([email protected]).

AUTHORS AND LICENSE

Version 1.3.1

Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler

This software is provided ‘as-is’, without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

.
The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.

[step].
Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.

[step].
This notice may not be removed or altered from any source distribution.

Jean-loup Gailly Mark Adler
[email protected] [email protected]

The deflate format used by zlib was defined by Phil Katz. The deflate and zlib specifications were written by L. Peter Deutsch. Thanks to all the people who reported problems and suggested various improvements in zlib; who are too numerous to cite here.

UNIX manual page by R. P. C. Rodgers, U.S. National Library of Medicine ([email protected]).

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

937 - Linux cli command Pod_InputObjectspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Pod_InputObjectspm and provides detailed information about the command Pod_InputObjectspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Pod_InputObjectspm.

NAME 🖥️ Pod_InputObjectspm 🖥️

objects representing POD input paragraphs, commands, etc.

SYNOPSIS

use Pod::InputObjects;

REQUIRES

perl5.004, Carp

EXPORTS

Nothing.

DESCRIPTION

NOTE: This module is considered legacy; modern Perl releases (5.31.1 and higher) are going to remove Pod-Parser from core and use Pod::Simple for all things POD.

This module defines some basic input objects used by Pod::Parser when reading and parsing POD text from an input source. The following objects are defined:

package Pod::Paragraph
An object corresponding to a paragraph of POD input text. It may be a plain paragraph, a verbatim paragraph, or a command paragraph (see perlpod).

package Pod::InteriorSequence
An object corresponding to an interior sequence command from the POD input text (see perlpod).

package Pod::ParseTree
An object corresponding to a tree of parsed POD text. Each “node” in a parse-tree (or ptree) is either a text-string or a reference to a Pod::InteriorSequence object. The nodes appear in the parse-tree in the order in which they were parsed from left-to-right.

Each of these input objects are described in further detail in the sections which follow.

Pod::Paragraph

An object representing a paragraph of POD input text. It has the following methods/attributes:

Pod::Paragraph->new()

my $pod_para1 = Pod::Paragraph->new(-text => $text); my $pod_para2 = Pod::Paragraph->new(-name => $cmd, -text => $text); my $pod_para3 = new Pod::Paragraph(-text => $text); my $pod_para4 = new Pod::Paragraph(-name => $cmd, -text => $text); my $pod_para5 = Pod::Paragraph->new(-name => $cmd, -text => $text, -file => $filename, -line => $line_number);

This is a class method that constructs a Pod::Paragraph object and returns a reference to the new paragraph object. It may be given one or two keyword arguments. The -text keyword indicates the corresponding text of the POD paragraph. The -name keyword indicates the name of the corresponding POD command, such as head1 or item (it should not contain the = prefix); this is needed only if the POD paragraph corresponds to a command paragraph. The -file and -line keywords indicate the filename and line number corresponding to the beginning of the paragraph

$pod_para->cmd_name()

my $para_cmd = $pod_para->cmd_name();

If this paragraph is a command paragraph, then this method will return the name of the command (without any leading = prefix).

$pod_para->text()

my $para_text = $pod_para->text();

This method will return the corresponding text of the paragraph.

$pod_para->raw_text()

my $raw_pod_para = $pod_para->raw_text();

This method will return the raw text of the POD paragraph, exactly as it appeared in the input.

$pod_para->cmd_prefix()

my $prefix = $pod_para->cmd_prefix();

If this paragraph is a command paragraph, then this method will return the prefix used to denote the command (which should be the string “=” or “==”).

$pod_para->cmd_separator()

my $separator = $pod_para->cmd_separator();

If this paragraph is a command paragraph, then this method will return the text used to separate the command name from the rest of the paragraph (if any).

$pod_para->parse_tree()

my $ptree = $pod_parser->parse_text( $pod_para->text() ); $pod_para->parse_tree( $ptree ); $ptree = $pod_para->parse_tree();

This method will get/set the corresponding parse-tree of the paragraph’s text.

$pod_para->file_line()

my ($filename, $line_number) = $pod_para->file_line(); my $position = $pod_para->file_line();

Returns the current filename and line number for the paragraph object. If called in a list context, it returns a list of two elements: first the filename, then the line number. If called in a scalar context, it returns a string containing the filename, followed by a colon (’:’), followed by the line number.

Pod::InteriorSequence

An object representing a POD interior sequence command. It has the following methods/attributes:

Pod::InteriorSequence->new()

my $pod_seq1 = Pod::InteriorSequence->new(-name => $cmd -ldelim => $delimiter); my $pod_seq2 = new Pod::InteriorSequence(-name => $cmd, -ldelim => $delimiter); my $pod_seq3 = new Pod::InteriorSequence(-name => $cmd, -ldelim => $delimiter, -file => $filename, -line => $line_number); my $pod_seq4 = new Pod::InteriorSequence(-name => $cmd, $ptree); my $pod_seq5 = new Pod::InteriorSequence($cmd, $ptree);

This is a class method that constructs a Pod::InteriorSequence object and returns a reference to the new interior sequence object. It should be given two keyword arguments. The -ldelim keyword indicates the corresponding left-delimiter of the interior sequence (e.g. ‘<’). The -name keyword indicates the name of the corresponding interior sequence command, such as I or B or C. The -file and -line keywords indicate the filename and line number corresponding to the beginning of the interior sequence. If the $ptree argument is given, it must be the last argument, and it must be either string, or else an array-ref suitable for passing to Pod::ParseTree::new (or it may be a reference to a Pod::ParseTree object).

$pod_seq->cmd_name()

my $seq_cmd = $pod_seq->cmd_name();

The name of the interior sequence command.

$pod_seq->prepend()

$pod_seq->prepend($text); $pod_seq1->prepend($pod_seq2);

Prepends the given string or parse-tree or sequence object to the parse-tree of this interior sequence.

$pod_seq->append()

$pod_seq->append($text); $pod_seq1->append($pod_seq2);

Appends the given string or parse-tree or sequence object to the parse-tree of this interior sequence.

$pod_seq->nested()

$outer_seq = $pod_seq->nested || print “not nested”;

If this interior sequence is nested inside of another interior sequence, then the outer/parent sequence that contains it is returned. Otherwise undef is returned.

$pod_seq->raw_text()

my $seq_raw_text = $pod_seq->raw_text();

This method will return the raw text of the POD interior sequence, exactly as it appeared in the input.

$pod_seq->left_delimiter()

my $ldelim = $pod_seq->left_delimiter();

The leftmost delimiter beginning the argument text to the interior sequence (should be “<”).

$pod_seq->right_delimiter()

The rightmost delimiter beginning the argument text to the interior sequence (should be “>”).

$pod_seq->parse_tree()

my $ptree = $pod_parser->parse_text($paragraph_text); $pod_seq->parse_tree( $ptree ); $ptree = $pod_seq->parse_tree();

This method will get/set the corresponding parse-tree of the interior sequence’s text.

$pod_seq->file_line()

my ($filename, $line_number) = $pod_seq->file_line(); my $position = $pod_seq->file_line();

Returns the current filename and line number for the interior sequence object. If called in a list context, it returns a list of two elements: first the filename, then the line number. If called in a scalar context, it returns a string containing the filename, followed by a colon (’:’), followed by the line number.

Pod::InteriorSequence::DESTROY()

This method performs any necessary cleanup for the interior-sequence. If you override this method then it is imperative that you invoke the parent method from within your own method, otherwise interior-sequence storage will not be reclaimed upon destruction!

Pod::ParseTree

This object corresponds to a tree of parsed POD text. As POD text is scanned from left to right, it is parsed into an ordered list of text-strings and Pod::InteriorSequence objects (in order of appearance). A Pod::ParseTree object corresponds to this list of strings and sequences. Each interior sequence in the parse-tree may itself contain a parse-tree (since interior sequences may be nested).

Pod::ParseTree->new()

my $ptree1 = Pod::ParseTree->new; my $ptree2 = new Pod::ParseTree; my $ptree4 = Pod::ParseTree->new($array_ref); my $ptree3 = new Pod::ParseTree($array_ref);

This is a class method that constructs a Pod::Parse_tree object and returns a reference to the new parse-tree. If a single-argument is given, it must be a reference to an array, and is used to initialize the root (top) of the parse tree.

$ptree->top()

my $top_node = $ptree->top(); $ptree->top( $top_node ); $ptree->top( @children );

This method gets/sets the top node of the parse-tree. If no arguments are given, it returns the topmost node in the tree (the root), which is also a Pod::ParseTree. If it is given a single argument that is a reference, then the reference is assumed to a parse-tree and becomes the new top node. Otherwise, if arguments are given, they are treated as the new list of children for the top node.

$ptree->children()

This method gets/sets the children of the top node in the parse-tree. If no arguments are given, it returns the list (array) of children (each of which should be either a string or a Pod::InteriorSequence. Otherwise, if arguments are given, they are treated as the new list of children for the top node.

$ptree->prepend()

This method prepends the given text or parse-tree to the current parse-tree. If the first item on the parse-tree is text and the argument is also text, then the text is prepended to the first item (not added as a separate string). Otherwise the argument is added as a new string or parse-tree before the current one.

$ptree->append()

This method appends the given text or parse-tree to the current parse-tree. If the last item on the parse-tree is text and the argument is also text, then the text is appended to the last item (not added as a separate string). Otherwise the argument is added as a new string or parse-tree after the current one.

$ptree->raw_text()

my $ptree_raw_text = $ptree->raw_text();

This method will return the raw text of the POD parse-tree exactly as it appeared in the input.

Pod::ParseTree::DESTROY()

This method performs any necessary cleanup for the parse-tree. If you override this method then it is imperative that you invoke the parent method from within your own method, otherwise parse-tree storage will not be reclaimed upon destruction!

SEE ALSO

Pod::InputObjects is part of the Pod::Parser distribution.

See Pod::Parser, Pod::Select

AUTHOR

Please report bugs using <http://rt.cpan.org>.

Brad Appleton <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

938 - Linux cli command strfmon_l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strfmon_l and provides detailed information about the command strfmon_l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strfmon_l.

NAME 🖥️ strfmon_l 🖥️

convert monetary value to a string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <monetary.h>
ssize_t strfmon(char s[restrict .max], size_t max,
 const char *restrict format, ...);
ssize_t strfmon_l(char s[restrict .max], size_t max, locale_t locale,
 const char *restrict format, ...);

DESCRIPTION

The strfmon() function formats the specified monetary amount according to the current locale and format specification format and places the result in the character array s of size max.

The strfmon_l() function performs the same task, but uses the locale specified by locale. The behavior of strfmon_l() is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

Ordinary characters in format are copied to s without conversion. Conversion specifiers are introduced by a ‘%’ character. Immediately following it there can be zero or more of the following flags:

**=**f
The single-byte character f is used as the numeric fill character (to be used with a left precision, see below). When not specified, the space character is used.

^
Do not use any grouping characters that might be defined for the current locale. By default, grouping is enabled.

( or +
The ( flag indicates that negative amounts should be enclosed between parentheses. The + flag indicates that signs should be handled in the default way, that is, amounts are preceded by the locale’s sign indication, for example, nothing for positive, “-” for negative.

!
Omit the currency symbol.

-
Left justify all fields. The default is right justification.

Next, there may be a field width: a decimal digit string specifying a minimum field width in bytes. The default is 0. A result smaller than this width is padded with spaces (on the left, unless the left-justify flag was given).

Next, there may be a left precision of the form “#” followed by a decimal digit string. If the number of digits left of the radix character is smaller than this, the representation is padded on the left with the numeric fill character. Grouping characters are not counted in this field width.

Next, there may be a right precision of the form “.” followed by a decimal digit string. The amount being formatted is rounded to the specified number of digits prior to formatting. The default is specified in the frac_digits and int_frac_digits items of the current locale. If the right precision is 0, no radix character is printed. (The radix character here is determined by LC_MONETARY, and may differ from that specified by LC_NUMERIC.)

Finally, the conversion specification must be ended with a conversion character. The three conversion characters are

%
(In this case, the entire specification must be exactly “%%”.) Put a ‘%’ character in the result string.

i
One argument of type double is converted using the locale’s international currency format.

n
One argument of type double is converted using the locale’s national currency format.

RETURN VALUE

The strfmon() function returns the number of characters placed in the array s, not including the terminating null byte, provided the string, including the terminating null byte, fits. Otherwise, it sets errno to E2BIG, returns -1, and the contents of the array is undefined.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strfmon()

Thread safetyMT-Safe locale

strfmon_l()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

EXAMPLES

The call

strfmon(buf, sizeof(buf), "[%^=*#6n] [%=*#6i]",
        1234.567, 1234.567);

outputs

[€ **1234,57] [EUR **1 234,57]

in the nl_NL locale. The de_DE, de_CH, en_AU, and en_GB locales yield

[ **1234,57 €] [ **1.234,57 EUR]
[ Fr. **1234.57] [ CHF **1'234.57]
[ $**1234.57] [ AUD**1,234.57]
[ £**1234.57] [ GBP**1,234.57]

SEE ALSO

duplocale(3), setlocale(3), sprintf(3), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

939 - Linux cli command Tk_demos_widget_lib_slidepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_demos_widget_lib_slidepm and provides detailed information about the command Tk_demos_widget_lib_slidepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_demos_widget_lib_slidepm.

NAME 🖥️ Tk_demos_widget_lib_slidepm 🖥️

a 2 position horizontal or vertical switch.

SYNOPSIS

use Tk::SlideSwitch; my $sl = $frame1->SlideSwitch( -bg => gray, -orient => horizontal, -command => [$self => on], -llabel => [-text => OFF, -foreground => blue], -rlabel => [-text => ON, -foreground => blue], -troughcolor => tan, )->pack(qw/-side left -expand 1/);

DESCRIPTION

Tk::SlideSwitch is a Frame based composite mega-widget featuring a binary Scale widget surrounded by two Label widgets. The Scale’s value can be either 0 or 1. The Labels are positioned to the left and right of the Scale if its orientation is horizontal, else on the top and bottom of the Scale.

OPTIONS

In addition to all Scale options, the following option/value pairs are also supported:

-llabel
A reference to an array of left (or top) Label configuration options.

-rlabel
A reference to an array of right (or bottom) Label configuration options.

METHODS

There are no special methods.

ADVERTISED WIDGETS

Component subwidgets can be accessed via the Subwidget method. This mega widget has no advertised subwidgets.

EXAMPLE

See Synopsis.

BUGS

This widget uses only the pack geometry manager.

AUTHOR

[email protected]

Copyright (C) 2002 - 2003, Steve Lidie. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

KEYWORDS

SlideSwitch, Scale

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

940 - Linux cli command pcap_set_protocol_linuxpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_set_protocol_linuxpcap and provides detailed information about the command pcap_set_protocol_linuxpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_set_protocol_linuxpcap.

NAME 🖥️ pcap_set_protocol_linuxpcap 🖥️

set capture protocol for a not-yet-activated capture handle

SYNOPSIS

#include <pcap/pcap.h>
int pcap_set_protocol_linux(pcap_t *p, int protocol);

DESCRIPTION

On network interface devices on Linux, pcap_set_protocol_linux() sets the protocol to be used in the socket(2) call to create a capture socket when the handle is activated. The argument is a link-layer protocol value, such as the values in the <linux/if_ether.h> header file, specified in host byte order. If protocol is non-zero, packets of that protocol will be captured when the handle is activated, otherwise, all packets will be captured. This function is only provided on Linux, and, if it is used on any device other than a network interface, it will have no effect.

It should not be used in portable code; instead, a filter should be specified with pcap_setfilter(3PCAP).

If a given network interface provides a standard link-layer header, with a standard packet type, but provides some packet types with a different socket-layer protocol type from the one in the link-layer header, that packet type cannot be filtered with a filter specified with pcap_setfilter() but can be filtered by specifying the socket-layer protocol type using pcap_set_protocol_linux().

RETURN VALUE

pcap_set_protocol_linux() returns 0 on success or PCAP_ERROR_ACTIVATED if called on a capture handle that has been activated.

BACKWARD COMPATIBILITY

This function became available in libpcap release 1.9.0.

SEE ALSO

pcap(3PCAP), pcap_create(3PCAP), pcap_activate(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

941 - Linux cli command XtMergeArgLists

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtMergeArgLists and provides detailed information about the command XtMergeArgLists, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtMergeArgLists.

NAME 🖥️ XtMergeArgLists 🖥️

set and merge ArgLists

SYNTAX

#include <X11/Intrinsic.h>

int XtSetArg(Arg arg, String name, XtArgVal value);

ArgList XtMergeArgLists(ArgList args1, Cardinal num_args1, ArgList args2, Cardinal num_args2);

ARGUMENTS

arg
Specifies the name-value pair to set.

args1
Specifies the first ArgList.

args2
Specifies the second ArgList.

num_args1
Specifies the number of arguments in the first argument list.

num_args2
Specifies the number of arguments in the second argument list.

name
Specifies the name of the resource.

value
Specifies the value of the resource if it will fit in an XtArgVal or the address.

DESCRIPTION

The XtSetArg function is usually used in a highly stylized manner to minimize the probability of making a mistake; for example:

Arg args[20]; int n;

n = 0;
XtSetArg(args[n], XtNheight, 100);      n++;
XtSetArg(args[n], XtNwidth, 200);       n++;
XtSetValues(widget, args, n);

Alternatively, an application can statically declare the argument list and use XtNumber:

static Args args[] = { {XtNheight, (XtArgVal) 100}, {XtNwidth, (XtArgVal) 200}, }; XtSetValues(Widget, args, XtNumber(args));

Note that you should not use auto-increment or auto-decrement within the first argument to XtSetArg. XtSetArg can be implemented as a macro that dereferences the first argument twice.

The XtMergeArgLists function allocates enough storage to hold the combined ArgList structures and copies them into it. Note that it does not check for duplicate entries. When it is no longer needed, free the returned storage by using XtFree.

SEE ALSO

XtOffset(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

942 - Linux cli command pthread_attr_destroy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_attr_destroy and provides detailed information about the command pthread_attr_destroy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_attr_destroy.

NAME 🖥️ pthread_attr_destroy 🖥️

initialize and destroy thread attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_attr_init(pthread_attr_t *attr);
int pthread_attr_destroy(pthread_attr_t *attr);

DESCRIPTION

The pthread_attr_init() function initializes the thread attributes object pointed to by attr with default attribute values. After this call, individual attributes of the object can be set using various related functions (listed under SEE ALSO), and then the object can be used in one or more pthread_create(3) calls that create threads.

Calling pthread_attr_init() on a thread attributes object that has already been initialized results in undefined behavior.

When a thread attributes object is no longer required, it should be destroyed using the pthread_attr_destroy() function. Destroying a thread attributes object has no effect on threads that were created using that object.

Once a thread attributes object has been destroyed, it can be reinitialized using pthread_attr_init(). Any other use of a destroyed thread attributes object has undefined results.

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

POSIX.1 documents an ENOMEM error for pthread_attr_init(); on Linux these functions always succeed (but portable and future-proof applications should nevertheless handle a possible error return).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_attr_init(), pthread_attr_destroy()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

The pthread_attr_t type should be treated as opaque: any access to the object other than via pthreads functions is nonportable and produces undefined results.

EXAMPLES

The program below optionally makes use of pthread_attr_init() and various related functions to initialize a thread attributes object that is used to create a single thread. Once created, the thread uses the pthread_getattr_np(3) function (a nonstandard GNU extension) to retrieve the thread’s attributes, and then displays those attributes.

If the program is run with no command-line argument, then it passes NULL as the attr argument of pthread_create(3), so that the thread is created with default attributes. Running the program on Linux/x86-32 with the NPTL threading implementation, we see the following:

$ ulimit -s # No stack limit ==> default stack size is 2 MB
unlimited
$ ./a.out
Thread attributes:
        Detach state        = PTHREAD_CREATE_JOINABLE
        Scope               = PTHREAD_SCOPE_SYSTEM
        Inherit scheduler   = PTHREAD_INHERIT_SCHED
        Scheduling policy   = SCHED_OTHER
        Scheduling priority = 0
        Guard size          = 4096 bytes
        Stack address       = 0x40196000
        Stack size          = 0x201000 bytes

When we supply a stack size as a command-line argument, the program initializes a thread attributes object, sets various attributes in that object, and passes a pointer to the object in the call to pthread_create(3). Running the program on Linux/x86-32 with the NPTL threading implementation, we see the following:

$ ./a.out 0x3000000
posix_memalign() allocated at 0x40197000
Thread attributes:
        Detach state        = PTHREAD_CREATE_DETACHED
        Scope               = PTHREAD_SCOPE_SYSTEM
        Inherit scheduler   = PTHREAD_EXPLICIT_SCHED
        Scheduling policy   = SCHED_OTHER
        Scheduling priority = 0
        Guard size          = 0 bytes
        Stack address       = 0x40197000
        Stack size          = 0x3000000 bytes

Program source

#define _GNU_SOURCE     /* To get pthread_getattr_np() declaration */
#include <err.h>
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
static void
display_pthread_attr(pthread_attr_t *attr, char *prefix)
{
    int s, i;
    size_t v;
    void *stkaddr;
    struct sched_param sp;
    s = pthread_attr_getdetachstate(attr, &i);
    if (s != 0)
        errc(EXIT_FAILURE, s, "pthread_attr_getdetachstate");
    printf("%sDetach state        = %s

“, prefix, (i == PTHREAD_CREATE_DETACHED) ? “PTHREAD_CREATE_DETACHED” : (i == PTHREAD_CREATE_JOINABLE) ? “PTHREAD_CREATE_JOINABLE” : “???”); s = pthread_attr_getscope(attr, &i); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_getscope”); printf("%sScope = %s “, prefix, (i == PTHREAD_SCOPE_SYSTEM) ? “PTHREAD_SCOPE_SYSTEM” : (i == PTHREAD_SCOPE_PROCESS) ? “PTHREAD_SCOPE_PROCESS” : “???”); s = pthread_attr_getinheritsched(attr, &i); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_getinheritsched”); printf("%sInherit scheduler = %s “, prefix, (i == PTHREAD_INHERIT_SCHED) ? “PTHREAD_INHERIT_SCHED” : (i == PTHREAD_EXPLICIT_SCHED) ? “PTHREAD_EXPLICIT_SCHED” : “???”); s = pthread_attr_getschedpolicy(attr, &i); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_getschedpolicy”); printf("%sScheduling policy = %s “, prefix, (i == SCHED_OTHER) ? “SCHED_OTHER” : (i == SCHED_FIFO) ? “SCHED_FIFO” : (i == SCHED_RR) ? “SCHED_RR” : “???”); s = pthread_attr_getschedparam(attr, &sp); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_getschedparam”); printf("%sScheduling priority = %d “, prefix, sp.sched_priority); s = pthread_attr_getguardsize(attr, &v); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_getguardsize”); printf("%sGuard size = %zu bytes “, prefix, v); s = pthread_attr_getstack(attr, &stkaddr, &v); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_getstack”); printf("%sStack address = %p “, prefix, stkaddr); printf("%sStack size = %#zx bytes “, prefix, v); } static void * thread_start(void arg) { int s; pthread_attr_t gattr; / pthread_getattr_np() is a non-standard GNU extension that retrieves the attributes of the thread specified in its first argument. / s = pthread_getattr_np(pthread_self(), &gattr); if (s != 0) errc(EXIT_FAILURE, s, “pthread_getattr_np”); printf(“Thread attributes: “); display_pthread_attr(&gattr, " “); exit(EXIT_SUCCESS); / Terminate all threads */ } int main(int argc, char *argv[]) { pthread_t thr; pthread_attr_t attr; pthread_attr_t attrp; / NULL or &attr / int s; attrp = NULL; / If a command-line argument was supplied, use it to set the stack-size attribute and set a few other thread attributes, and set attrp pointing to thread attributes object. */ if (argc > 1) { size_t stack_size; void sp; attrp = &attr; s = pthread_attr_init(&attr); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_init”); s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_setdetachstate”); s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_setinheritsched”); stack_size = strtoul(argv[1], NULL, 0); s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size); if (s != 0) errc(EXIT_FAILURE, s, “posix_memalign”); printf(“posix_memalign() allocated at %p “, sp); s = pthread_attr_setstack(&attr, sp, stack_size); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_setstack”); } s = pthread_create(&thr, attrp, &thread_start, NULL); if (s != 0) errc(EXIT_FAILURE, s, “pthread_create”); if (attrp != NULL) { s = pthread_attr_destroy(attrp); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_destroy”); } pause(); / Terminates when other thread calls exit() */ }

SEE ALSO

pthread_attr_setaffinity_np(3), pthread_attr_setdetachstate(3), pthread_attr_setguardsize(3), pthread_attr_setinheritsched(3), pthread_attr_setschedparam(3), pthread_attr_setschedpolicy(3), pthread_attr_setscope(3), pthread_attr_setsigmask_np(3), pthread_attr_setstack(3), pthread_attr_setstackaddr(3), pthread_attr_setstacksize(3), pthread_create(3), pthread_getattr_np(3), pthread_setattr_default_np(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

943 - Linux cli command unlocked_stdio

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command unlocked_stdio and provides detailed information about the command unlocked_stdio, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the unlocked_stdio.

NAME 🖥️ unlocked_stdio 🖥️

nonlocking stdio functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int getc_unlocked(FILE *stream);
int getchar_unlocked(void);
int putc_unlocked(int c, FILE *stream);
int putchar_unlocked(int c);
void clearerr_unlocked(FILE *stream);
int feof_unlocked(FILE *stream);
int ferror_unlocked(FILE *stream);
int fileno_unlocked(FILE *stream);
int fflush_unlocked(FILE *_Nullable stream);
int fgetc_unlocked(FILE *stream);
int fputc_unlocked(int c, FILE *stream);
size_t fread_unlocked(void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
size_t fwrite_unlocked(const void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
char *fgets_unlocked(char s[restrict .n], int n",FILE*restrict"stream);
int fputs_unlocked(const char *restrict s, FILE *restrict stream);
#include <wchar.h>
wint_t getwc_unlocked(FILE *stream);
wint_t getwchar_unlocked(void);
wint_t fgetwc_unlocked(FILE *stream);
wint_t fputwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwchar_unlocked(wchar_t wc);
wchar_t *fgetws_unlocked(wchar_t ws[restrict .n], int n,
 FILE *restrict stream);
int fputws_unlocked(const wchar_t *restrict ws,
 FILE *restrict stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getc_unlocked(), getchar_unlocked(), putc_unlocked(), putchar_unlocked():

    /* glibc >= 2.24: */ _POSIX_C_SOURCE >= 199309L
        || /* glibc <= 2.23: */ _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

clearerr_unlocked(), feof_unlocked(), ferror_unlocked(), fileno_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), getwchar_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwchar_unlocked(), fgetws_unlocked(), fputws_unlocked():

    _GNU_SOURCE

DESCRIPTION

Each of these functions has the same behavior as its counterpart without the “_unlocked” suffix, except that they do not use locking (they do not set locks themselves, and do not test for the presence of locks set by others) and hence are thread-unsafe. See flockfile(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getc_unlocked(), putc_unlocked(), clearerr_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked(), fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwc_unlocked(), fgetws_unlocked(), fputws_unlocked()

Thread safety

MT-Safe race:stream

getchar_unlocked(), getwchar_unlocked()

Thread safety

MT-Unsafe race:stdin

putchar_unlocked(), putwchar_unlocked()

Thread safety

MT-Unsafe race:stdout

feof_unlocked(), ferror_unlocked(), fileno_unlocked()

Thread safetyMT-Safe

STANDARDS

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2008.

Others:
None.

HISTORY

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2001.

SEE ALSO

flockfile(3), stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

944 - Linux cli command Net_DBus_Errorpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Errorpm and provides detailed information about the command Net_DBus_Errorpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Errorpm.

NAME 🖥️ Net_DBus_Errorpm 🖥️

Error details for remote method invocation

SYNOPSIS

package Music::Player::UnknownFormat; use base qw(Net::DBus::Error); # Define an error type for unknown track encoding type # for a music player service sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(name => “org.example.music.UnknownFormat”, message => “Unknown track encoding format”); } package Music::Player::Engine; …snip… # Play either mp3 or ogg music tracks, otherwise # thrown an error sub play { my $self = shift; my $url = shift; if ($url =~ /(mp3|ogg)$/) { …play the track } else { die Music::Player::UnknownFormat->new(); } }

DESCRIPTION

This objects provides for strongly typed error handling. Normally a service would simply call

die “some message text”

When returning the error condition to the calling DBus client, the message is associated with a generic error code or “org.freedesktop.DBus.Failed”. While this suffices for many applications, occasionally it is desirable to be able to catch and handle specific error conditions. For such scenarios the service should create subclasses of the Net::DBus::Error object providing in a custom error name. This error name is then sent back to the client instead of the genreic “org.freedesktop.DBus.Failed” code.

METHODS

my $error = Net::DBus::Error->new(name => $error_name, message => $description);
Creates a new error object whose name is given by the name parameter, and long descriptive text is provided by the message parameter. The name parameter has certain formatting rules which must be adhered to. It must only contain the letters ‘a’-‘Z’, ‘0’-‘9’, ‘-’, ‘_’ and ‘.’. There must be at least two components separated by a ‘.’, For example a valid name is ‘org.example.Music.UnknownFormat’.

$error->name
Returns the DBus error name associated with the object.

$error->message
Returns the descriptive text/message associated with the error condition.

$error->stringify
Formats the error as a string in a manner suitable for printing out / logging / displaying to the user, etc.

AUTHOR

Daniel P. Berrange

COPYRIGHT

Copyright (C) 2005-2011 Daniel P. Berrange

SEE ALSO

Net::DBus, Net::DBus::Object

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

945 - Linux cli command qecvt_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command qecvt_r and provides detailed information about the command qecvt_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the qecvt_r.

NAME 🖥️ qecvt_r 🖥️

convert a floating-point number to a string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
[[deprecated]] int ecvt_r(double number, int ndigits,
 int *restrict decpt, int *restrict sign,
 char *restrict buf, size_t len);
[[deprecated]] int fcvt_r(double number, int ndigits,
 int *restrict decpt, int *restrict sign,
 char *restrict buf, size_t len);
[[deprecated]] int qecvt_r(long double number, int ndigits,
 int *restrict decpt, int *restrict sign,
 char *restrict buf, size_t len);
[[deprecated]] int qfcvt_r(long double number, int ndigits,
 int *restrict decpt, int *restrict sign,
 char *restrict buf, size_t len);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

ecvt_r(), fcvt_r(), qecvt_r(), qfcvt_r():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The functions ecvt_r(), fcvt_r(), qecvt_r(), and qfcvt_r() are identical to ecvt(3), fcvt(3), qecvt(3), and qfcvt(3), respectively, except that they do not return their result in a static buffer, but instead use the supplied buf of size len. See ecvt(3) and qecvt(3).

RETURN VALUE

These functions return 0 on success, and -1 otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

ecvt_r(), fcvt_r(), qecvt_r(), qfcvt_r()

Thread safetyMT-Safe

STANDARDS

GNU.

NOTES

These functions are obsolete. Instead, sprintf(3) is recommended.

SEE ALSO

ecvt(3), qecvt(3), sprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

946 - Linux cli command svc_sendreply

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command svc_sendreply and provides detailed information about the command svc_sendreply, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the svc_sendreply.

NAME 🖥️ svc_sendreply 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

947 - Linux cli command XtToolkitThreadInitialize

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtToolkitThreadInitialize and provides detailed information about the command XtToolkitThreadInitialize, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtToolkitThreadInitialize.

NAME 🖥️ XtToolkitThreadInitialize 🖥️

initialize the toolkit for multiple threads

SYNTAX

#include <X11/Intrinsic.h>

Boolean XtToolkitThreadInitialize(void);

DESCRIPTION

If XtToolkitThreadInitialize was previously called, it returns. The application programmer must ensure that two or more threads do not simultaneously attempt to call XtToolkitThreadInitialize; the effect of this is undefined. XtToolkitThreadInitialize returns True if the host operating system has threads and the Intrinsics are thread safe.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

948 - Linux cli command zip_get_num_files

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_get_num_files and provides detailed information about the command zip_get_num_files, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_get_num_files.

libzip (-lzip)

The

function returns the number of files in

returns the number of files in the zip archive, or -1 if

is

was added in libzip 0.6. It was deprecated in libzip 0.11, use

instead.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

949 - Linux cli command htonl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command htonl and provides detailed information about the command htonl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the htonl.

NAME 🖥️ htonl 🖥️

convert values between host and network byte order

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <arpa/inet.h>
uint32_t htonl(uint32_t hostlong);
uint16_t htons(uint16_t hostshort);
uint32_t ntohl(uint32_t netlong);
uint16_t ntohs(uint16_t netshort);

DESCRIPTION

The htonl() function converts the unsigned integer hostlong from host byte order to network byte order.

The htons() function converts the unsigned short integer hostshort from host byte order to network byte order.

The ntohl() function converts the unsigned integer netlong from network byte order to host byte order.

The ntohs() function converts the unsigned short integer netshort from network byte order to host byte order.

On the i386 the host byte order is Least Significant Byte first, whereas the network byte order, as used on the Internet, is Most Significant Byte first.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

htonl(), htons(), ntohl(), ntohs()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

SEE ALSO

bswap(3), endian(3), gethostbyname(3), getservent(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

950 - Linux cli command IO_All_Filepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_All_Filepm and provides detailed information about the command IO_All_Filepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_All_Filepm.

NAME 🖥️ IO_All_Filepm 🖥️

File Support for IO::All

SYNOPSIS

See IO::All.

DESCRIPTION

<<<cpan-foot>>>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

951 - Linux cli command XtFree

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtFree and provides detailed information about the command XtFree, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtFree.

NAME 🖥️ XtFree 🖥️

memory management functions

SYNTAX

#include <X11/Intrinsic.h>

char *XtMalloc(Cardinal size);

char *XtCalloc(Cardinal num, Cardinal size);

char *XtRealloc(char *ptr, Cardinal num);

void XtFree(char *ptr);

type *XtNew(type);

String XtNewString(String string);

Cardinal XtAsprintf(char **new_string, const char *format, …);

ARGUMENTS

num
Specifies the number of bytes or array elements.

ptr
Specifies a pointer to the old storage or to the block of storage that is to be freed.

size
Specifies the size of an array element (in bytes) or the number of bytes desired.

string
Specifies a previously declared string.

type
Specifies a previously declared data type.

new_string
Specifies a pointer to write a newly allocated string to.

format
Specifies a formatting string as defined by sprintf(3c)

DESCRIPTION

The XtMalloc functions returns a pointer to a block of storage of at least the specified size bytes. If there is insufficient memory to allocate the new block, XtMalloc calls XtErrorMsg.

The XtCalloc function allocates space for the specified number of array elements of the specified size and initializes the space to zero. If there is insufficient memory to allocate the new block, XtCalloc calls XtErrorMsg.

The XtRealloc function changes the size of a block of storage (possibly moving it). Then, it copies the old contents (or as much as will fit) into the new block and frees the old block. If there is insufficient memory to allocate the new block, XtRealloc calls XtErrorMsg. If ptr is NULL, XtRealloc allocates the new storage without copying the old contents; that is, it simply calls XtMalloc.

The XtFree function returns storage and allows it to be reused. If ptr is NULL, XtFree returns immediately.

XtNew returns a pointer to the allocated storage. If there is insufficient memory to allocate the new block, XtNew calls XtErrorMsg. XtNew is a convenience macro that calls XtMalloc with the following arguments specified:

((type *) XtMalloc((unsigned) sizeof(type))

XtNewString returns a pointer to a new string which is a duplicate of string. If there is insufficient memory to allocate the new block, or the argument is NULL XtNewString returns NULL. The memory can be freed with XtFree.

The XtAsprintf function allocates space for a string large enough to hold the string specified by the sprintf(3c) format pattern when used with the remaining arguments, and fills it with the formatted results. The address of the allocated string is placed into the pointer passed as ret. The length of the string (not including the terminating null byte) is returned. If there is insufficient memory to allocate the new block, XtAsprintf calls XtErrorMsg.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

952 - Linux cli command getrpcbyname

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getrpcbyname and provides detailed information about the command getrpcbyname, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getrpcbyname.

NAME 🖥️ getrpcbyname 🖥️

get RPC entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
struct rpcent *getrpcent(void);
struct rpcent *getrpcbyname(const char *name);
struct rpcent *getrpcbynumber(int number);
void setrpcent(int stayopen);
void endrpcent(void);

DESCRIPTION

The getrpcent(), getrpcbyname(), and getrpcbynumber() functions each return a pointer to an object with the following structure containing the broken-out fields of an entry in the RPC program number data base.

struct rpcent {
    char  *r_name;     /* name of server for this RPC program */
    char **r_aliases;  /* alias list */
    long   r_number;   /* RPC program number */
};

The members of this structure are:

r_name
The name of the server for this RPC program.

r_aliases
A NULL-terminated list of alternate names for the RPC program.

r_number
The RPC program number for this service.

The getrpcent() function reads the next entry from the database. A connection is opened to the database if necessary.

The setrpcent() function opens a connection to the database, and sets the next entry to the first entry. If stayopen is nonzero, then the connection to the database will not be closed between calls to one of the getrpc*() functions.

The endrpcent() function closes the connection to the database.

The getrpcbyname() and getrpcbynumber() functions sequentially search from the beginning of the file until a matching RPC program name or program number is found, or until end-of-file is encountered.

RETURN VALUE

On success, getrpcent(), getrpcbyname(), and getrpcbynumber() return a pointer to a statically allocated rpcent structure. NULL is returned on EOF or error.

FILES

/etc/rpc
RPC program number database.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getrpcent(), getrpcbyname(), getrpcbynumber()

Thread safetyMT-Unsafe

setrpcent(), endrpcent()

Thread safetyMT-Safe locale

STANDARDS

BSD.

HISTORY

BSD, Solaris.

BUGS

All information is contained in a static area so it must be copied if it is to be saved.

SEE ALSO

getrpcent_r(3), rpc(5), rpcinfo(8), ypserv(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

953 - Linux cli command Net_DNS_RR_SIGpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_SIGpm and provides detailed information about the command Net_DNS_RR_SIGpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_SIGpm.

NAME 🖥️ Net_DNS_RR_SIGpm 🖥️

DNS SIG resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name SIG typecovered algorithm labels orgttl sigexpiration siginception keytag signame signature); use Net::DNS::SEC; $sigrr = Net::DNS::RR::SIG->create( $string, $keypath, sigval => 10 # minutes ); $sigrr->verify( $string, $keyrr ) || die $sigrr->vrfyerrstr; $sigrr->verify( $packet, $keyrr ) || die $sigrr->vrfyerrstr;

DESCRIPTION

Class for DNS digital signature (SIG) resource records.

In addition to the regular methods inherited from Net::DNS::RR the class contains a method to sign packets and scalar data strings using private keys (create) and a method for verifying signatures.

The SIG RR is an implementation of RFC2931. See Net::DNS::RR::RRSIG for an implementation of RFC4034.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

algorithm

$algorithm = $rr->algorithm;

The algorithm number field identifies the cryptographic algorithm used to create the signature.

algorithm() may also be invoked as a class method or simple function to perform mnemonic and numeric code translation.

sigexpiration and siginception times

sigex sigin sigval

$expiration = $rr->sigexpiration; $expiration = $rr->sigexpiration( $value ); $inception = $rr->siginception; $inception = $rr->siginception( $value );

The signature expiration and inception fields specify a validity time interval for the signature.

The value may be specified by a string with format ‘yyyymmddhhmmss’ or a Perl time() value.

Return values are dual-valued, providing either a string value or numerical Perl time() value.

keytag

$keytag = $rr->keytag; $rr->keytag( $keytag );

The keytag field contains the key tag value of the KEY RR that validates this signature.

signame

$signame = $rr->signame; $rr->signame( $signame );

The signer name field value identifies the owner name of the KEY RR that a validator is supposed to use to validate this signature.

signature

sig

$sig = $rr->sig; $rr->sig( $sig );

The Signature field contains the cryptographic signature that covers the SIG RDATA (excluding the Signature field) and the subject data.

sigbin

$sigbin = $rr->sigbin; $rr->sigbin( $sigbin );

Binary representation of the cryptographic signature.

create

Create a signature over scalar data.

use Net::DNS::SEC; $keypath = /home/olaf/keys/Kbla.foo.+001+60114.private; $sigrr = Net::DNS::RR::SIG->create( $data, $keypath ); $sigrr = Net::DNS::RR::SIG->create( $data, $keypath, sigval => 10 ); $sigrr->print; # Alternatively use Net::DNS::SEC::Private $private = Net::DNS::SEC::Private->new($keypath); $sigrr= Net::DNS::RR::SIG->create( $data, $private );

create() is an alternative constructor for a SIG RR object.

This method returns a SIG with the signature over the data made with the private key stored in the key file.

The first argument is a scalar that contains the data to be signed.

The second argument is a string which specifies the path to a file containing the private key as generated using dnssec-keygen, a program that comes with the ISC BIND distribution.

The optional remaining arguments consist of ( name => value ) pairs as follows:

sigin => 20241201010101, # signature inception sigex => 20241201011101, # signature expiration sigval => 10, # validity window (minutes)

The sigin and sigex values may be specified as Perl time values or as a string with the format ‘yyyymmddhhmmss’. The default for sigin is the time of signing.

The sigval argument specifies the signature validity window in minutes ( sigex = sigin + sigval ).

By default the signature is valid for 10 minutes.

  • Do not change the name of the private key file. The create method uses the filename as generated by dnssec-keygen to determine the keyowner, algorithm, and the keyid (keytag).

verify

$verify = $sigrr->verify( $data, $keyrr ); $verify = $sigrr->verify( $data, [$keyrr, $keyrr2, $keyrr3] );

The verify() method performs SIG0 verification of the specified data against the signature contained in the $sigrr object itself using the public key in $keyrr.

If a reference to a Net::DNS::Packet is supplied, the method performs a SIG0 verification on the packet data.

The second argument can either be a Net::DNS::RR::KEYRR object or a reference to an array of such objects. Verification will return successful as soon as one of the keys in the array leads to positive validation.

Returns false on error and sets $sig->vrfyerrstr

vrfyerrstr

$sig0 = $packet->sigrr || die not signed; print $sig0->vrfyerrstr unless $sig0->verify( $packet, $keyrr ); $sigrr->verify( $packet, $keyrr ) || die $sigrr->vrfyerrstr;

REMARKS

The code is not optimised for speed.

If this code is still around in 2100 (not a leap year) you will need to check for proper handling of times after 28th February.

ACKNOWLEDGMENTS

Although their original code may have disappeared following redesign of Net::DNS, Net::DNS::SEC and the OpenSSL API, the following individual contributors deserve to be recognised for their significant influence on the development of the SIG package.

Andy Vaskys (Network Associates Laboratories) supplied code for RSA.

T.J. Mather provided support for the DSA algorithm.

COPYRIGHT

Copyright (c)2001-2005 RIPE NCC, Olaf M. Kolkman

Copyright (c)2007-2008 NLnet Labs, Olaf M. Kolkman

Portions Copyright (c)2014 Dick Franks

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR Net::DNS::SEC RFC2535 (4) <https://iana.org/go/rfc2535#section-4> RFC2936 <https://iana.org/go/rfc2936> RFC2931 <https://iana.org/go/rfc2931> RFC3110 <https://iana.org/go/rfc3110> RFC4034 <https://iana.org/go/rfc4034>

Algorithm Numbers <https://iana.org/assignments/dns-sec-alg-numbers>

BIND Administrator Reference Manual <https://bind.isc.org/>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

954 - Linux cli command sem_timedwait

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sem_timedwait and provides detailed information about the command sem_timedwait, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sem_timedwait.

NAME 🖥️ sem_timedwait 🖥️

lock a semaphore

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <semaphore.h>
int sem_wait(sem_t *sem);
int sem_trywait(sem_t *sem);
int sem_timedwait(sem_t *restrict sem,
 const struct timespec *restrict abs_timeout);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sem_timedwait():

    _POSIX_C_SOURCE >= 200112L

DESCRIPTION

sem_wait() decrements (locks) the semaphore pointed to by sem. If the semaphore’s value is greater than zero, then the decrement proceeds, and the function returns, immediately. If the semaphore currently has the value zero, then the call blocks until either it becomes possible to perform the decrement (i.e., the semaphore value rises above zero), or a signal handler interrupts the call.

sem_trywait() is the same as sem_wait(), except that if the decrement cannot be immediately performed, then call returns an error (errno set to EAGAIN) instead of blocking.

sem_timedwait() is the same as sem_wait(), except that abs_timeout specifies a limit on the amount of time that the call should block if the decrement cannot be immediately performed. The abs_timeout argument points to a timespec(3) structure that specifies an absolute timeout in seconds and nanoseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).

If the timeout has already expired by the time of the call, and the semaphore could not be locked immediately, then sem_timedwait() fails with a timeout error (errno set to ETIMEDOUT).

If the operation can be performed immediately, then sem_timedwait() never fails with a timeout error, regardless of the value of abs_timeout. Furthermore, the validity of abs_timeout is not checked in this case.

RETURN VALUE

All of these functions return 0 on success; on error, the value of the semaphore is left unchanged, -1 is returned, and errno is set to indicate the error.

ERRORS

EAGAIN
(sem_trywait()) The operation could not be performed without blocking (i.e., the semaphore currently has the value zero).

EINTR
The call was interrupted by a signal handler; see signal(7).

EINVAL
sem is not a valid semaphore.

EINVAL
(sem_timedwait()) The value of abs_timeout.tv_nsecs is less than 0, or greater than or equal to 1000 million.

ETIMEDOUT
(sem_timedwait()) The call timed out before the semaphore could be locked.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sem_wait(), sem_trywait(), sem_timedwait()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

EXAMPLES

The (somewhat trivial) program shown below operates on an unnamed semaphore. The program expects two command-line arguments. The first argument specifies a seconds value that is used to set an alarm timer to generate a SIGALRM signal. This handler performs a sem_post(3) to increment the semaphore that is being waited on in main() using sem_timedwait(). The second command-line argument specifies the length of the timeout, in seconds, for sem_timedwait(). The following shows what happens on two different runs of the program:

$ ./a.out 2 3
About to call sem_timedwait()
sem_post() from handler
sem_timedwait() succeeded
$ ./a.out 2 1
About to call sem_timedwait()
sem_timedwait() timed out

Program source

#include <errno.h>
#include <semaphore.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include <assert.h>
sem_t sem;
#define handle_error(msg) \
    do { perror(msg); exit(EXIT_FAILURE); } while (0)
static void
handler(int sig)
{
    write(STDOUT_FILENO, "sem_post() from handler

“, 24); if (sem_post(&sem) == -1) { write(STDERR_FILENO, “sem_post() failed “, 18); _exit(EXIT_FAILURE); } } int main(int argc, char argv[]) { struct sigaction sa; struct timespec ts; int s; if (argc != 3) { fprintf(stderr, “Usage: %s “, argv[0]); exit(EXIT_FAILURE); } if (sem_init(&sem, 0, 0) == -1) handle_error(“sem_init”); / Establish SIGALRM handler; set alarm timer using argv[1]. / sa.sa_handler = handler; sigemptyset(&sa.sa_mask); sa.sa_flags = 0; if (sigaction(SIGALRM, &sa, NULL) == -1) handle_error(“sigaction”); alarm(atoi(argv[1])); / Calculate relative interval as current time plus number of seconds given argv[2]. / if (clock_gettime(CLOCK_REALTIME, &ts) == -1) handle_error(“clock_gettime”); ts.tv_sec += atoi(argv[2]); printf("%s() about to call sem_timedwait() “, func); while ((s = sem_timedwait(&sem, &ts)) == -1 && errno == EINTR) continue; / Restart if interrupted by handler. / / Check what happened. */ if (s == -1) { if (errno == ETIMEDOUT) printf(“sem_timedwait() timed out “); else perror(“sem_timedwait”); } else printf(“sem_timedwait() succeeded “); exit((s == 0) ? EXIT_SUCCESS : EXIT_FAILURE); }

SEE ALSO

clock_gettime(2), sem_getvalue(3), sem_post(3), timespec(3), sem_overview(7), time(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

955 - Linux cli command Image_ExifTool_Nikonpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Nikonpm and provides detailed information about the command Image_ExifTool_Nikonpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Nikonpm.

NAME 🖥️ Image_ExifTool_Nikonpm 🖥️

Nikon EXIF maker notes tags

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret Nikon maker notes in EXIF information.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html>

<http://www.cybercom.net/~dcoffin/dcraw/>

<http://members.aol.com/khancock/pilot/nbuddy/>

<http://www.rottmerhusen.com/objektives/lensid/thirdparty.html>

<http://homepage3.nifty.com/kamisaka/makernote/makernote_nikon.htm>

<http://www.wohlberg.net/public/software/photo/nstiffexif/>

(…plus lots of testing with Best Buy store demos!)

ACKNOWLEDGEMENTS

Thanks to Joseph Heled, Thomas Walter, Brian Ristuccia, Danek Duvall, Tom Christiansen, Robert Rottmerhusen, Werner Kober, Roger Larsson, Jens Duttke, Gregor Dorlars, Neil Nappe, Alexandre Naaman, Brendt Wohlberg and Warren Hatch for their help figuring out some Nikon tags, and to everyone who helped contribute to the LensID list.

SEE ALSO

“Nikon Tags” in Image::ExifTool::TagNames, “NikonCapture Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

956 - Linux cli command HTML_Template_FAQpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_Template_FAQpm and provides detailed information about the command HTML_Template_FAQpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_Template_FAQpm.

NAME 🖥️ HTML_Template_FAQpm 🖥️

Frequently Asked Questions about HTML::Template

SYNOPSIS

In the interest of greater understanding I’ve started a FAQ section of the perldocs. Please look in here before you send me email.

FREQUENTLY ASKED QUESTIONS

Is there a place to go to discuss HTML::Template and/or get help?

There’s a mailing-list for discussing HTML::Template at [email protected]. Join at:

http://lists.sourceforge.net/lists/listinfo/html-template-users

If you just want to get email when new releases are available you can join the announcements mailing-list here:

http://lists.sourceforge.net/lists/listinfo/html-template-announce

Is there a searchable archive for the mailing-list?

Yes, you can find an archive of the SourceForge list here:

http://dir.gmane.org/gmane.comp.lang.perl.modules.html-template

I want support for <TMPL_XXX>! How about it?

Maybe. I definitely encourage people to discuss their ideas for HTML::Template on the mailing list. Please be ready to explain to me how the new tag fits in with HTML::Template’s mission to provide a fast, lightweight system for using HTML templates.

NOTE: Offering to program said addition and provide it in the form of a patch to the most recent version of HTML::Template will definitely have a softening effect on potential opponents!

I found a bug, can you fix it?

That depends. Did you send me the VERSION of HTML::Template, a test script and a test template? If so, then almost certainly.

If you’re feeling really adventurous, HTML::Template is publicly available on GitHub (https://github.com/mpeters/html-template). Please feel free to fork it and send me a pull request with any changes you have.

<TMPL_VAR>s from the main template aren’t working inside a <TMPL_LOOP>! Why?

This is the intended behavior. <TMPL_LOOP> introduces a separate scope for <TMPL_VAR>s much like a subroutine call in Perl introduces a separate scope for my variables.

If you want your <TMPL_VAR>s to be global you can set the global_vars option when you call new(). See above for documentation of the global_vars new() option.

How can I pre-load my templates using cache-mode and mod_perl?

Add something like this to your startup.pl:

use HTML::Template; use File::Find; print STDERR “Pre-loading HTML Templates… “; find( sub { return unless /\tmpl$/; HTML::Template->new( filename => “$File::Find::dir/$_”, cache => 1, ); }, /path/to/templates, /another/path/to/templates/ );

Note that you’ll need to modify the return unless line to specify the extension you use for your template files - I use .tmpl, as you can see. You’ll also need to specify the path to your template files.

One potential problem: the /path/to/templates/ must be EXACTLY the same path you use when you call HTML::Template->new(). Otherwise the cache won’t know they’re the same file and will load a new copy - instead getting a speed increase, you’ll double your memory usage. To find out if this is happening set cache_debug = 1> in your application code and look for CACHE MISS messages in the logs.

What characters are allowed in TMPL_* names?

Numbers, letters, ‘.’, ‘/’, ‘+’, ‘-’ and ‘_’.

How can I execute a program from inside my template?

Short answer: you can’t. Longer answer: you shouldn’t since this violates the fundamental concept behind HTML::Template - that design and code should be separate.

But, inevitably some people still want to do it. If that describes you then you should take a look at HTML::Template::Expr. Using HTML::Template::Expr it should be easy to write a run_program() function. Then you can do awful stuff like:

<tmpl_var expr=“run_program(foo.pl)">

Just, please, don’t tell me about it. I’m feeling guilty enough just for writing HTML::Template::Expr in the first place.

What’s the best way to create a <select> form element using HTML::Template?

There is much disagreement on this issue. My personal preference is to use CGI.pm’s excellent popup_menu() and scrolling_list() functions to fill in a single <tmpl_var select_foo> variable.

To some people this smacks of mixing HTML and code in a way that they hoped HTML::Template would help them avoid. To them I’d say that HTML is a violation of the principle of separating design from programming. There’s no clear separation between the programmatic elements of the <form> tags and the layout of the <form> tags. You’ll have to draw the line somewhere - clearly the designer can’t be entirely in charge of form creation.

It’s a balancing act and you have to weigh the pros and cons on each side. It is certainly possible to produce a <select> element entirely inside the template. What you end up with is a rat’s nest of loops and conditionals. Alternately you can give up a certain amount of flexibility in return for vastly simplifying your templates. I generally choose the latter.

Another option is to investigate HTML::FillInForm which some have reported success using to solve this problem.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

957 - Linux cli command Image_ExifTool_ASFpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_ASFpm and provides detailed information about the command Image_ExifTool_ASFpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_ASFpm.

NAME 🖥️ Image_ExifTool_ASFpm 🖥️

Read ASF/WMA/WMV meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to extract information from Microsoft Advanced Systems Format (ASF) files, including Windows Media Audio (WMA) and Windows Media Video (WMV) files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.microsoft.com/windows/windowsmedia/format/asfspec.aspx>

SEE ALSO

“ASF Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

958 - Linux cli command iscntrl_l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command iscntrl_l and provides detailed information about the command iscntrl_l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the iscntrl_l.

NAME 🖥️ iscntrl_l 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

959 - Linux cli command Tk_ConfigSpecspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_ConfigSpecspm and provides detailed information about the command Tk_ConfigSpecspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_ConfigSpecspm.

NAME 🖥️ Tk_ConfigSpecspm 🖥️

Defining behaviour of ‘configure’ for composite widgets.

SYNOPSIS

sub Populate { my ($composite,$args) = @_; … $composite->ConfigSpecs(-attribute => [ where,dbName,dbClass,default ]); $composite->ConfigSpecs(-alias => -otherattribute); $composite->ConfigSpecs(DEFAULT => [ where ]); $composite->ConfigSpecs($subwidget->ConfigSpecs); … } $composite->configure(-attribute => value);

DESCRIPTION

The aim is to make the composite widget configure method look as much like a regular Tk widget’s configure as possible. (See Tk::options for a description of this behaviour.) To enable this the attributes that the composite as a whole accepts needs to be defined.

Defining the ConfigSpecs for a class.

Typically a widget will have one or more calls like the following

$composite->ConfigSpecs(-attribute => [where,dbName,dbClass,default]);

in its Populate method. When ConfigSpecs is called this way (with arguments) the arguments are used to construct or augment/replace a hash table for the widget. (More than one -option=>value pair can be specified to a single call.)

dbName, dbClass and default are only used by ConfigDefault described below, or to respond to ‘inquiry’ configure commands.

It may be either one of the values below, or a list of such values enclosed in [].

The currently permitted values of where are:

‘ADVERTISED’
Apply configure to advertised subwidgets.

‘DESCENDANTS’
Apply configure recursively to all descendants.

‘CALLBACK’
Setting the attribute does Tk::Callback->new($value) before storing in $composite->{Configure}{-attribute}. This is appropriate for -command => ... attributes that are handled by the composite and not forwarded to a subwidget. (E.g. Tk::Tiler has -yscrollcommand to allow it to have scrollbar attached.) This may be the first of several ‘validating’ keywords (e.g. font, cursor, anchor etc.) that core Tk makes special for C code.

‘CHILDREN’
Apply configure to all children. (Children are the immediate descendants of a widget.)

‘METHOD’
Call $cw->attribute(value) This is the most general case. Simply have a method of the composite class with the same name as the attribute. The method may do any validation and have whatever side-effects you like. (It is probably worth ‘queueing’ using afterIdle for more complex side-effects.)

‘PASSIVE’
Simply store value in $composite->{Configure}{-attribute}. This form is also a useful placeholder for attributes which you currently only handle at create time.

‘SELF’
Apply configure to the core widget (e.g. Frame) that is the basis of the composite. (This is the default behaviour for most attributes which makes a simple Frame behave the way you would expect.) Note that once you have specified ConfigSpecs for an attribute you must explicitly include SELF in the list if you want the attribute to apply to the composite itself (this avoids nasty infinite recursion problems).

$reference (blessed)
Call $reference->configure(-attribute => value) A common case is where $reference is a subwidget. $reference may also be result of Tk::Config->new(setmethod,getmethod,args,…); Tk::Config class is used to implement all the above keyword types. The class has configure and cget methods so allows higher level code to always just call one of those methods on an object of some kind.

hash reference
Defining: $cw->ConfigSpecs( … -option => [ { -optionX=>$w1, -optionY=>[$w2, $w3] }, dbname dbclass default ], … ); So $cw->configure(-option => value) actually does $w1->configure(-optionX => value); $w2->configure(-optionY => value); $w3->configure(-optionY => value);

‘otherstring’
Call $composite->Subwidget(otherstring)->configure( -attribute => value ); While this is here for backward compatibility with Tk-b5, it is probably better just to use the subwidget reference directly. The only case for retaining this form is to allow an additional layer of abstraction - perhaps having a ‘current’ subwidget - this is unproven.

Aliases
ConfigSpecs( -alias => -otherattribute ) is used to make -alias equivalent to -otherattribute. For example the aliases -fg => -foreground, -bg => -background are provided automatically (if not already specified).

Delegating all options of a widget class to a subwidget

$composite->ConfigSpecs($subwidget->ConfigSpecs);

The above generates a list of composite ConfigSpecs arguments, one for each valid option in $subwidget’s class, and delegates said option to $subwidget. See Tk::Widget and the widget method ConfigSpecs. Duplicating composite ConfigSpecs and widget ConfigSpecs keys will yield undefined results.

Default values

When the Populate method returns ConfigDefault is called. This calls

$composite->ConfigSpecs;

(with no arguments) to return a reference to a hash. Entries in the hash take the form:

-attribute => [ where, dbName, dbClass, default ]

ConfigDefault ignores ‘where’ completely (and also the DEFAULT entry) and checks the ‘options’ database on the widget’s behalf, and if an entry is present matching dbName/dbClass

-attribute => value

is added to the list of options that new will eventually apply to the widget. Likewise if there is not a match and default is defined this default value will be added.

Alias entries in the hash are used to convert user-specified values for the alias into values for the real attribute.

New()-time configure

Once control returns to new, the list of user-supplied options augmented by those from ConfigDefault are applied to the widget using the configure method below.

Widgets are most flexible and most Tk-like if they handle the majority of their attributes this way.

Configuring composites

Once the above have occurred calls of the form:

$composite->configure( -attribute => value );

should behave like any other widget as far as end-user code is concerned. configure will be handled by Tk::Derived::configure as follows:

$composite->ConfigSpecs;

is called (with no arguments) to return a reference to a hash -attribute is looked up in this hash, if -attribute is not present in the hash then ‘DEFAULT’ is looked for instead. (Aliases are tried as well and cause redirection to the aliased attribute). The result should be a reference to a list like:

[ where, dbName, dbClass, default ]

at this stage only where is of interest, it maps to a list of object references (maybe only one) foreach one

$object->configure( -attribute => value );

is evaled.

Inquiring attributes of composites

$composite->cget( -attribute );

This is handled by Tk::Derived::cget in a similar manner to configure. At present if where is a list of more than one object it is ignored completely and the “cached” value in

$composite->{Configure}{-attribute}.

is returned.

CAVEATS

The -background and -foreground option values are automatically propagated down to all composite widget’s children. This may be sometimes not desirable, especially if some subwidgets should use own color schemes, either by using explicit options or by option database definitions. If this is the case, then just add

-foreground => SELF, -background => SELF,

to ConfigSpecs.

It is the author’s intention to port as many of the “Tix” composite widgets as make sense. The mechanism described above may have to evolve in order to make this possible, although now aliases are handled I think the above is sufficient.

SEE ALSO

Tk::composite, Tk::options, Tk::Widget

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

960 - Linux cli command wcsrtombs

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcsrtombs and provides detailed information about the command wcsrtombs, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcsrtombs.

NAME 🖥️ wcsrtombs 🖥️

convert a wide-character string to a multibyte string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
size_t wcsrtombs(char dest[restrict .len], const wchar_t **restrict src,
 size_t len, mbstate_t *restrict ps);

DESCRIPTION

If dest is not NULL, the wcsrtombs() function converts the wide-character string *src to a multibyte string starting at dest. At most len bytes are written to dest. The shift state *ps is updated. The conversion is effectively performed by repeatedly calling wcrtomb(dest, *src, ps), as long as this call succeeds, and then incrementing dest by the number of bytes written and *src by one. The conversion can stop for three reasons:

  • A wide character has been encountered that can not be represented as a multibyte sequence (according to the current locale). In this case, *src is left pointing to the invalid wide character, (size_t) -1 is returned, and errno is set to EILSEQ.

  • The length limit forces a stop. In this case, *src is left pointing to the next wide character to be converted, and the number of bytes written to dest is returned.

  • The wide-character string has been completely converted, including the terminating null wide character (L’�’), which has the side effect of bringing back *ps to the initial state. In this case, *src is set to NULL, and the number of bytes written to dest, excluding the terminating null byte (‘�’), is returned.

If dest is NULL, len is ignored, and the conversion proceeds as above, except that the converted bytes are not written out to memory, and that no length limit exists.

In both of the above cases, if ps is NULL, a static anonymous state known only to the wcsrtombs() function is used instead.

The programmer must ensure that there is room for at least len bytes at dest.

RETURN VALUE

The wcsrtombs() function returns the number of bytes that make up the converted part of multibyte sequence, not including the terminating null byte. If a wide character was encountered which could not be converted, (size_t) -1 is returned, and errno set to EILSEQ.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcsrtombs()

Thread safety

MT-Unsafe race:wcsrtombs/!ps

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of wcsrtombs() depends on the LC_CTYPE category of the current locale.

Passing NULL as ps is not multithread safe.

SEE ALSO

iconv(3), mbsinit(3), wcrtomb(3), wcsnrtombs(3), wcstombs(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

961 - Linux cli command LWP_MemberMixinpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LWP_MemberMixinpm and provides detailed information about the command LWP_MemberMixinpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LWP_MemberMixinpm.

NAME 🖥️ LWP_MemberMixinpm 🖥️

Member access mixin class

SYNOPSIS

package Foo; use parent qw(LWP::MemberMixin);

DESCRIPTION

A mixin class to get methods that provide easy access to member variables in the %$self. Ideally there should be better Perl language support for this.

METHODS

There is only one method provided:

_elem

_elem($elem [, $val])

Internal method to get/set the value of member variable $elem. If $val is present it is used as the new value for the member variable. If it is not present the current value is not touched. In both cases the previous value of the member variable is returned.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

962 - Linux cli command xdr_vector

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_vector and provides detailed information about the command xdr_vector, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_vector.

NAME 🖥️ xdr_vector 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

963 - Linux cli command wcscpy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcscpy and provides detailed information about the command wcscpy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcscpy.

NAME 🖥️ wcscpy 🖥️

copy a wide-character string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
wchar_t *wcscpy(wchar_t *restrict dest",constwchar_t*restrict"src);

DESCRIPTION

The wcscpy() function is the wide-character equivalent of the strcpy(3) function. It copies the wide-character string pointed to by src, including the terminating null wide character (L’�’), to the array pointed to by dest.

The strings may not overlap.

The programmer must ensure that there is room for at least wcslen(src)+1 wide characters at dest.

RETURN VALUE

wcscpy() returns dest.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcscpy()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

strcpy(3), wcpcpy(3), wcscat(3), wcsdup(3), wmemcpy(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

964 - Linux cli command fts_read

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fts_read and provides detailed information about the command fts_read, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fts_read.

NAME 🖥️ fts_read 🖥️

traverse a file hierarchy

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <sys/stat.h>
#include <fts.h>
FTS *fts_open(char *const *path_argv, int options,
 int (*_Nullable compar)(const FTSENT **, const FTSENT **));
FTSENT *fts_read(FTS *ftsp);
FTSENT *fts_children(FTS *ftsp, int instr);
int fts_set(FTS *ftsp, FTSENT *f, int instr);
int fts_close(FTS *ftsp);

DESCRIPTION

The fts functions are provided for traversing file hierarchies. A simple overview is that the fts_open() function returns a “handle” (of type FTS *) that refers to a file hierarchy “stream”. This handle is then supplied to the other fts functions. The function fts_read() returns a pointer to a structure describing one of the files in the file hierarchy. The function fts_children() returns a pointer to a linked list of structures, each of which describes one of the files contained in a directory in the hierarchy.

In general, directories are visited two distinguishable times; in preorder (before any of their descendants are visited) and in postorder (after all of their descendants have been visited). Files are visited once. It is possible to walk the hierarchy “logically” (visiting the files that symbolic links point to) or physically (visiting the symbolic links themselves), order the walk of the hierarchy or prune and/or revisit portions of the hierarchy.

Two structures (and associated types) are defined in the include file <fts.h>. The first type is FTS, the structure that represents the file hierarchy itself. The second type is FTSENT, the structure that represents a file in the file hierarchy. Normally, an FTSENT structure is returned for every file in the file hierarchy. In this manual page, “file” and “FTSENT structure” are generally interchangeable.

The FTSENT structure contains fields describing a file. The structure contains at least the following fields (there are additional fields that should be considered private to the implementation):

typedef struct _ftsent {
    unsigned short  fts_info;     /* flags for FTSENT structure */
    char           *fts_accpath;  /* access path */
    char           *fts_path;     /* root path */
    short           fts_pathlen;  /* strlen(fts_path) +
                                     strlen(fts_name) */
    char           *fts_name;     /* filename */
    short           fts_namelen;  /* strlen(fts_name) */
    short           fts_level;    /* depth (-1 to N) */
    int             fts_errno;    /* file errno */
    long            fts_number;   /* local numeric value */
    void           *fts_pointer;  /* local address value */
    struct _ftsent *fts_parent;   /* parent directory */
    struct _ftsent *fts_link;     /* next file structure */
    struct _ftsent *fts_cycle;    /* cycle structure */
    struct stat    *fts_statp;    /* [l]stat(2) information */
} FTSENT;

These fields are defined as follows:

fts_info
One of the following values describing the returned FTSENT structure and the file it represents. With the exception of directories without errors (FTS_D), all of these entries are terminal, that is, they will not be revisited, nor will any of their descendants be visited.

FTS_D
A directory being visited in preorder.

FTS_DC
A directory that causes a cycle in the tree. (The fts_cycle field of the FTSENT structure will be filled in as well.)

FTS_DEFAULT
Any FTSENT structure that represents a file type not explicitly described by one of the other fts_info values.

FTS_DNR
A directory which cannot be read. This is an error return, and the fts_errno field will be set to indicate what caused the error.

FTS_DOT
A file named “.” or “..” which was not specified as a filename to fts_open() (see FTS_SEEDOT).

FTS_DP
A directory being visited in postorder. The contents of the FTSENT structure will be unchanged from when it was returned in preorder, that is, with the fts_info field set to FTS_D.

FTS_ERR
This is an error return, and the fts_errno field will be set to indicate what caused the error.

FTS_F
A regular file.

FTS_NS
A file for which no [l] stat(2) information was available. The contents of the fts_statp field are undefined. This is an error return, and the fts_errno field will be set to indicate what caused the error.

FTS_NSOK
A file for which no [l] stat(2) information was requested. The contents of the fts_statp field are undefined.

FTS_SL
A symbolic link.

FTS_SLNONE
A symbolic link with a nonexistent target. The contents of the fts_statp field reference the file characteristic information for the symbolic link itself.

fts_accpath
A path for accessing the file from the current directory.

fts_path
The path for the file relative to the root of the traversal. This path contains the path specified to fts_open() as a prefix.

fts_pathlen
The sum of the lengths of the strings referenced by fts_path and fts_name.

fts_name
The name of the file.

fts_namelen
The length of the string referenced by fts_name.

fts_level
The depth of the traversal, numbered from -1 to N, where this file was found. The FTSENT structure representing the parent of the starting point (or root) of the traversal is numbered -1, and the FTSENT structure for the root itself is numbered 0.

fts_errno
If fts_children() or fts_read() returns an FTSENT structure whose fts_info field is set to FTS_DNR, FTS_ERR, or FTS_NS, the fts_errno field contains the error number (i.e., the errno value) specifying the cause of the error. Otherwise, the contents of the fts_errno field are undefined.

fts_number
This field is provided for the use of the application program and is not modified by the fts functions. It is initialized to 0.

fts_pointer
This field is provided for the use of the application program and is not modified by the fts functions. It is initialized to NULL.

fts_parent
A pointer to the FTSENT structure referencing the file in the hierarchy immediately above the current file, that is, the directory of which this file is a member. A parent structure for the initial entry point is provided as well, however, only the fts_level, fts_number, and fts_pointer fields are guaranteed to be initialized.

fts_link
Upon return from the fts_children() function, the fts_link field points to the next structure in the NULL-terminated linked list of directory members. Otherwise, the contents of the fts_link field are undefined.

fts_cycle
If a directory causes a cycle in the hierarchy (see FTS_DC), either because of a hard link between two directories, or a symbolic link pointing to a directory, the fts_cycle field of the structure will point to the FTSENT structure in the hierarchy that references the same file as the current FTSENT structure. Otherwise, the contents of the fts_cycle field are undefined.

fts_statp
A pointer to [l] stat(2) information for the file.

A single buffer is used for all of the paths of all of the files in the file hierarchy. Therefore, the fts_path and fts_accpath fields are guaranteed to be null-terminated only for the file most recently returned by fts_read(). To use these fields to reference any files represented by other FTSENT structures will require that the path buffer be modified using the information contained in that FTSENT structure’s fts_pathlen field. Any such modifications should be undone before further calls to fts_read() are attempted. The fts_name field is always null-terminated.

fts_open()

The fts_open() function takes a pointer to an array of character pointers naming one or more paths which make up a logical file hierarchy to be traversed. The array must be terminated by a null pointer.

There are a number of options, at least one of which (either FTS_LOGICAL or FTS_PHYSICAL) must be specified. The options are selected by ORing the following values:

FTS_LOGICAL
This option causes the fts routines to return FTSENT structures for the targets of symbolic links instead of the symbolic links themselves. If this option is set, the only symbolic links for which FTSENT structures are returned to the application are those referencing nonexistent files: the fts_statp field is obtained via stat(2) with a fallback to lstat(2).

FTS_PHYSICAL
This option causes the fts routines to return FTSENT structures for symbolic links themselves instead of the target files they point to. If this option is set, FTSENT structures for all symbolic links in the hierarchy are returned to the application: the fts_statp field is obtained via lstat(2).

FTS_COMFOLLOW
This option causes any symbolic link specified as a root path to be followed immediately, as if via FTS_LOGICAL, regardless of the primary mode.

FTS_NOCHDIR
As a performance optimization, the fts functions change directories as they walk the file hierarchy. This has the side-effect that an application cannot rely on being in any particular directory during the traversal. This option turns off this optimization, and the fts functions will not change the current directory. Note that applications should not themselves change their current directory and try to access files unless FTS_NOCHDIR is specified and absolute pathnames were provided as arguments to fts_open().

FTS_NOSTAT
By default, returned FTSENT structures reference file characteristic information (the fts_statp field) for each file visited. This option relaxes that requirement as a performance optimization, allowing the fts functions to set the fts_info field to FTS_NSOK and leave the contents of the fts_statp field undefined.

FTS_SEEDOT
By default, unless they are specified as path arguments to fts_open(), any files named “.” or “..” encountered in the file hierarchy are ignored. This option causes the fts routines to return FTSENT structures for them.

FTS_XDEV
This option prevents fts from descending into directories that have a different device number than the file from which the descent began.

The argument compar() specifies a user-defined function which may be used to order the traversal of the hierarchy. It takes two pointers to pointers to FTSENT structures as arguments and should return a negative value, zero, or a positive value to indicate if the file referenced by its first argument comes before, in any order with respect to, or after, the file referenced by its second argument. The fts_accpath, fts_path, and fts_pathlen fields of the FTSENT structures may never be used in this comparison. If the fts_info field is set to FTS_NS or FTS_NSOK, the fts_statp field may not either. If the compar() argument is NULL, the directory traversal order is in the order listed in path_argv for the root paths, and in the order listed in the directory for everything else.

fts_read()

The fts_read() function returns a pointer to an FTSENT structure describing a file in the hierarchy. Directories (that are readable and do not cause cycles) are visited at least twice, once in preorder and once in postorder. All other files are visited at least once. (Hard links between directories that do not cause cycles or symbolic links to symbolic links may cause files to be visited more than once, or directories more than twice.)

If all the members of the hierarchy have been returned, fts_read() returns NULL and sets errno to 0. If an error unrelated to a file in the hierarchy occurs, fts_read() returns NULL and sets errno to indicate the error. If an error related to a returned file occurs, a pointer to an FTSENT structure is returned, and errno may or may not have been set (see fts_info).

The FTSENT structures returned by fts_read() may be overwritten after a call to fts_close() on the same file hierarchy stream, or, after a call to fts_read() on the same file hierarchy stream unless they represent a file of type directory, in which case they will not be overwritten until after a call to fts_read() after the FTSENT structure has been returned by the function fts_read() in postorder.

fts_children()

The fts_children() function returns a pointer to an FTSENT structure describing the first entry in a NULL-terminated linked list of the files in the directory represented by the FTSENT structure most recently returned by fts_read(). The list is linked through the fts_link field of the FTSENT structure, and is ordered by the user-specified comparison function, if any. Repeated calls to fts_children() will re-create this linked list.

As a special case, if fts_read() has not yet been called for a hierarchy, fts_children() will return a pointer to the files in the logical directory specified to fts_open(), that is, the arguments specified to fts_open(). Otherwise, if the FTSENT structure most recently returned by fts_read() is not a directory being visited in preorder, or the directory does not contain any files, fts_children() returns NULL and sets errno to zero. If an error occurs, fts_children() returns NULL and sets errno to indicate the error.

The FTSENT structures returned by fts_children() may be overwritten after a call to fts_children(), fts_close(), or fts_read() on the same file hierarchy stream.

The instr argument is either zero or the following value:

FTS_NAMEONLY
Only the names of the files are needed. The contents of all the fields in the returned linked list of structures are undefined with the exception of the fts_name and fts_namelen fields.

fts_set()

The function fts_set() allows the user application to determine further processing for the file f of the stream ftsp. The fts_set() function returns 0 on success, and -1 if an error occurs.

The instr argument is either 0 (meaning “do nothing”) or one of the following values:

FTS_AGAIN
Revisit the file; any file type may be revisited. The next call to fts_read() will return the referenced file. The fts_stat and fts_info fields of the structure will be reinitialized at that time, but no other fields will have been changed. This option is meaningful only for the most recently returned file from fts_read(). Normal use is for postorder directory visits, where it causes the directory to be revisited (in both preorder and postorder) as well as all of its descendants.

FTS_FOLLOW
The referenced file must be a symbolic link. If the referenced file is the one most recently returned by fts_read(), the next call to fts_read() returns the file with the fts_info and fts_statp fields reinitialized to reflect the target of the symbolic link instead of the symbolic link itself. If the file is one of those most recently returned by fts_children(), the fts_info and fts_statp fields of the structure, when returned by fts_read(), will reflect the target of the symbolic link instead of the symbolic link itself. In either case, if the target of the symbolic link does not exist, the fields of the returned structure will be unchanged and the fts_info field will be set to FTS_SLNONE.

If the target of the link is a directory, the preorder return, followed by the return of all of its descendants, followed by a postorder return, is done.

FTS_SKIP
No descendants of this file are visited. The file may be one of those most recently returned by either fts_children() or fts_read().

fts_close()

The fts_close() function closes the file hierarchy stream referred to by ftsp and restores the current directory to the directory from which fts_open() was called to open ftsp. The fts_close() function returns 0 on success, and -1 if an error occurs.

ERRORS

The function fts_open() may fail and set errno for any of the errors specified for open(2) and malloc(3).

In addition, fts_open() may fail and set errno as follows:

ENOENT
Any element of path_argv was an empty string.

The function fts_close() may fail and set errno for any of the errors specified for chdir(2) and close(2).

The functions fts_read() and fts_children() may fail and set errno for any of the errors specified for chdir(2), malloc(3), opendir(3), readdir(3), and [l] stat(2).

In addition, fts_children(), fts_open(), and fts_set() may fail and set errno as follows:

EINVAL
options or instr was invalid.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fts_open(), fts_set(), fts_close()

Thread safetyMT-Safe

fts_read(), fts_children()

Thread safetyMT-Unsafe

STANDARDS

None.

HISTORY

glibc 2. 4.4BSD.

BUGS

Before glibc 2.23, all of the APIs described in this man page are not safe when compiling a program using the LFS APIs (e.g., when compiling with -D_FILE_OFFSET_BITS=64).

SEE ALSO

find(1), chdir(2), lstat(2), stat(2), ftw(3), qsort(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

965 - Linux cli command pmap_getport

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pmap_getport and provides detailed information about the command pmap_getport, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pmap_getport.

NAME 🖥️ pmap_getport 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

966 - Linux cli command sigorset

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigorset and provides detailed information about the command sigorset, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigorset.

NAME 🖥️ sigorset 🖥️

POSIX signal set operations

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
int sigemptyset(sigset_t *set);
int sigfillset(sigset_t *set);
int sigaddset(sigset_t *set, int signum);
int sigdelset(sigset_t *set, int signum);
int sigismember(const sigset_t *set, int signum);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sigemptyset(), sigfillset(), sigaddset(), sigdelset(), sigismember():

    _POSIX_C_SOURCE

DESCRIPTION

These functions allow the manipulation of POSIX signal sets.

sigemptyset() initializes the signal set given by set to empty, with all signals excluded from the set.

sigfillset() initializes set to full, including all signals.

sigaddset() and sigdelset() add and delete respectively signal signum from set.

sigismember() tests whether signum is a member of set.

Objects of type sigset_t must be initialized by a call to either sigemptyset() or sigfillset() before being passed to the functions sigaddset(), sigdelset(), and sigismember() or the additional glibc functions described below (sigisemptyset(), sigandset(), and sigorset()). The results are undefined if this is not done.

RETURN VALUE

sigemptyset(), sigfillset(), sigaddset(), and sigdelset() return 0 on success and -1 on error.

sigismember() returns 1 if signum is a member of set, 0 if signum is not a member, and -1 on error.

On error, these functions set errno to indicate the error.

ERRORS

EINVAL
signum is not a valid signal.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sigemptyset(), sigfillset(), sigaddset(), sigdelset(), sigismember(), sigisemptyset(), sigorset(), sigandset()

Thread safetyMT-Safe

VERSIONS

GNU

If the _GNU_SOURCE feature test macro is defined, then <signal.h> exposes three other functions for manipulating signal sets:

int sigisemptyset(const sigset_t *set);
int sigorset(sigset_t *dest, const sigset_t *left,
 const sigset_t *right);
int sigandset(sigset_t *dest, const sigset_t *left,
 const sigset_t *right);

sigisemptyset() returns 1 if set contains no signals, and 0 otherwise.

sigorset() places the union of the sets left and right in dest. sigandset() places the intersection of the sets left and right in dest. Both functions return 0 on success, and -1 on failure.

These functions are nonstandard (a few other systems provide similar functions) and their use should be avoided in portable applications.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

When creating a filled signal set, the glibc sigfillset() function does not include the two real-time signals used internally by the NPTL threading implementation. See nptl(7) for details.

SEE ALSO

sigaction(2), sigpending(2), sigprocmask(2), sigsuspend(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

967 - Linux cli command Net_DNS_RR_SRVpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_SRVpm and provides detailed information about the command Net_DNS_RR_SRVpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_SRVpm.

NAME 🖥️ Net_DNS_RR_SRVpm 🖥️

DNS SRV resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name SRV priority weight port target);

DESCRIPTION

Class for DNS Service (SRV) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

priority

$priority = $rr->priority; $rr->priority( $priority );

Returns the priority for this target host.

weight

$weight = $rr->weight; $rr->weight( $weight );

Returns the weight for this target host.

port

$port = $rr->port; $rr->port( $port );

Returns the port number for the service on this target host.

target

$target = $rr->target; $rr->target( $target );

Returns the domain name of the target host.

Sorting of SRV Records

By default, rrsort() returns the SRV records sorted from lowest to highest priority and for equal priorities from highest to lowest weight.

Note: This is NOT the order in which connections should be attempted.

COPYRIGHT

Copyright (c)1997 Michael Fuhr.

Portions Copyright (c)2005 Olaf Kolkman, NLnet Labs.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC2782 <https://tools.ietf.org/html/rfc2782>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

968 - Linux cli command PA_WSTRINGconst

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command PA_WSTRINGconst and provides detailed information about the command PA_WSTRINGconst, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the PA_WSTRINGconst.

NAME 🖥️ PA_WSTRINGconst 🖥️

define custom behavior for printf-like functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <printf.h>
int register_printf_specifier(int spec, printf_function func,
 printf_arginfo_size_function arginfo);
int register_printf_modifier(const wchar_t *str);
int register_printf_type(printf_va_arg_function fct);

Callbacks

typedef int printf_function(FILE *stream, const struct printf_info *info,
 const void *const args[]);
typedef int printf_arginfo_size_function(const struct printf_info *info,
 size_t n, int argtypes[n], int size[n]);
typedef void printf_va_arg_function(void *mem, va_list *ap);

Types

struct printf_info {
 int prec; // Precision
 int width; // Width
 wchar_t spec; // Format letter
 unsigned int is_long_double:1;// L or ll flag
 unsigned int is_short:1; // h flag
 unsigned int is_long:1; // l flag
 unsigned int alt:1; // # flag
 unsigned int space:1; // Space flag
 unsigned int left:1; // - flag
 unsigned int showsign:1; // + flag
 unsigned int group:1; // ' flag
 unsigned int extra:1; // For special use
 unsigned int is_char:1; // hh flag
 unsigned int wide:1; // True for wide character streams
 unsigned int i18n:1; // I flag
 unsigned int is_binary128:1; /* Floating-point argument is
  ABI-compatible with
  IEC 60559 binary128 */
 unsigned short user; // Bits for user-installed modifiers
 wchar_t pad; // Padding character
};

Constants

#define PA_FLAG_LONG_LONG /* ... */
#define PA_FLAG_LONG_DOUBLE /* ... */
#define PA_FLAG_LONG /* ... */
#define PA_FLAG_SHORT /* ... */
#define PA_FLAG_PTR /* ... */

DESCRIPTION

These functions serve to extend and/or modify the behavior of the printf(3) family of functions.

register_printf_specifier()

This function registers a custom conversion specifier for the printf(3) family of functions.

spec
The character which will be used as a conversion specifier in the format string.

func
Callback function that will be executed by the printf(3) family of functions to format the input arguments into the output stream.

stream
Output stream where the formatted output should be printed. This stream transparently represents the output, even in the case of functions that write to a string.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in arginfo.

args
Array of pointers to the arguments to the printf(3) -like function.

arginfo
Callback function that will be executed by the printf(3) family of functions to know how many arguments should be parsed for the custom specifier and also their types.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in func.

n
Number of arguments remaining to be parsed.

argtypes
This array should be set to define the type of each of the arguments that will be parsed. Each element in the array represents one of the arguments to be parsed, in the same order that they are passed to the printf(3) -like function. Each element should be set to a base type (PA_*) from the enum above, or a custom one, and optionally ORed with an appropriate length modifier (PA_FLAG_*).

The type is determined by using one of the following constants:

PA_INT
int.

PA_CHAR
int, cast to char.

PA_WCHAR
wchar_t.

PA_STRING
const char *, a ‘�’-terminated string.

PA_WSTRING
const wchar_t *, a wide character L’�’-terminated string.

PA_POINTER
void *.

PA_FLOAT
float.

PA_DOUBLE
double.

PA_LAST
TODO.

size
For user-defined types, the size of the type (in bytes) should also be specified through this array. Otherwise, leave it unused.

arginfo is called before func, and prepares some information needed to call func.

register_printf_modifier()

TODO

register_printf_type()

TODO

RETURN VALUE

register_printf_specifier(), register_printf_modifier(), and register_printf_type() return zero on success, or -1 on error.

Callbacks

The callback of type printf_function should return the number of characters written, or -1 on error.

The callback of type printf_arginfo_size_function should return the number of arguments to be parsed by this specifier. It also passes information about the type of those arguments to the caller through argtypes. On error, it should return -1.

ERRORS

EINVAL
The specifier was not a valid character.

STANDARDS

GNU.

HISTORY

register_printf_function(3) is an older function similar to register_printf_specifier(), and is now deprecated. That function can’t handle user-defined types.

register_printf_specifier() supersedes register_printf_function(3).

EXAMPLES

The following example program registers the ‘b’ and ‘B’ specifiers to print integers in binary format, mirroring rules for other unsigned conversion specifiers like ‘x’ and ‘u’. This can be used to print in binary prior to C23.

/* This code is in the public domain */
#include <err.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <printf.h>
#define GROUP_SEP  '\''
struct Printf_Pad {
    char    ch;
    size_t  len;
};
static int b_printf(FILE *stream, const struct printf_info *info,
                    const void *const args[]);
static int b_arginf_sz(const struct printf_info *info,
                    size_t n, int argtypes[n], int size[n]);
static uintmax_t b_value(const struct printf_info *info,
                    const void *arg);
static size_t b_bin_repr(char bin[UINTMAX_WIDTH],
                    const struct printf_info *info, const void *arg);
static size_t b_bin_len(const struct printf_info *info,
                    ptrdiff_t min_len);
static size_t b_pad_len(const struct printf_info *info,
                    ptrdiff_t bin_len);
static ssize_t b_print_prefix(FILE *stream,
                    const struct printf_info *info);
static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info,
                    ptrdiff_t min_len);
static ssize_t b_print_number(FILE *stream,
                    const struct printf_info *info,
                    const char bin[UINTMAX_WIDTH],
                    size_t min_len, size_t bin_len);
static char pad_ch(const struct printf_info *info);
static ssize_t pad_spaces(FILE *stream, size_t pad_len);
int
main(void)
{
    if (register_printf_specifier('b', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('b', ...)");
    if (register_printf_specifier('B', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('B', ...)");
    printf("....----....----....----....----

“); printf("%llb; “, 0x5Ellu); printf("%lB; “, 0x5Elu); printf("%b; “, 0x5Eu); printf("%hB; “, 0x5Eu); printf("%hhb; “, 0x5Eu); printf("%jb; “, (uintmax_t)0x5E); printf("%zb; “, (size_t)0x5E); printf(”….—-….—-….—-….—- “); printf(”%#b; “, 0x5Eu); printf(”%#B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf("%10b; “, 0x5Eu); printf("%010b; “, 0x5Eu); printf(”%.10b; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%-10B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%‘B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”….—-….—-….—-….—- “); printf(”%#16.12b; “, 0xAB); printf(”%-#‘20.12b; “, 0xAB); printf(”%#‘020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#020B; “, 0xAB); printf(”%‘020B; “, 0xAB); printf("%020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#021B; “, 0xAB); printf(”%‘021B; “, 0xAB); printf("%021B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#022B; “, 0xAB); printf(”%‘022B; “, 0xAB); printf("%022B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#023B; “, 0xAB); printf(”%‘023B; “, 0xAB); printf("%023B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%-#‘19.11b; “, 0xAB); printf(”%#‘019B; “, 0xAB); printf(”%#019B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%‘019B; “, 0xAB); printf("%019B; “, 0xAB); printf(”%#016b; “, 0xAB); printf(”….—-….—-….—-….—- “); return 0; } static int b_printf(FILE *stream, const struct printf_info *info, const void const args[]) { char bin[UINTMAX_WIDTH]; size_t min_len, bin_len; ssize_t len, tmp; struct Printf_Pad pad = {0}; len = 0; min_len = b_bin_repr(bin, info, args[0]); bin_len = b_bin_len(info, min_len); pad.ch = pad_ch(info); if (pad.ch == ’ ‘) pad.len = b_pad_len(info, bin_len); / Padding with ’ ’ (right aligned) / if ((pad.ch == ’ ‘) && !info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } / “0b”/“0B” prefix / if (info->alt) { tmp = b_print_prefix(stream, info); if (tmp == EOF) return EOF; len += tmp; } / Padding with ‘0’ / if (pad.ch == ‘0’) { tmp = b_pad_zeros(stream, info, min_len); if (tmp == EOF) return EOF; len += tmp; } / Print number (including leading 0s to fill precision) / tmp = b_print_number(stream, info, bin, min_len, bin_len); if (tmp == EOF) return EOF; len += tmp; / Padding with ’ ’ (left aligned) */ if (info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } return len; } static int b_arginf_sz(const struct printf_info *info, size_t n, int argtypes[n], [[maybe_unused]] int size[n]) { if (n < 1) return -1; if (info->is_long_double) argtypes[0] = PA_INT | PA_FLAG_LONG_LONG; else if (info->is_long) argtypes[0] = PA_INT | PA_FLAG_LONG; else argtypes[0] = PA_INT; return 1; } static uintmax_t b_value(const struct printf_info *info, const void *arg) { if (info->is_long_double) return *(const unsigned long long *)arg; if (info->is_long) return *(const unsigned long )arg; / short and char are both promoted to int */ return *(const unsigned int *)arg; } static size_t b_bin_repr(char bin[UINTMAX_WIDTH], const struct printf_info *info, const void *arg) { size_t min_len; uintmax_t val; val = b_value(info, arg); bin[0] = ‘0’; for (min_len = 0; val; min_len++) { bin[min_len] = ‘0’ + (val % 2); val »= 1; } return MAX(min_len, 1); } static size_t b_bin_len(const struct printf_info *info, ptrdiff_t min_len) { return MAX(info->prec, min_len); } static size_t b_pad_len(const struct printf_info *info, ptrdiff_t bin_len) { ptrdiff_t pad_len; pad_len = info->width - bin_len; if (info->alt) pad_len -= 2; if (info->group) pad_len -= (bin_len - 1) / 4; return MAX(pad_len, 0); } static ssize_t b_print_prefix(FILE *stream, const struct printf_info *info) { ssize_t len; len = 0; if (fputc(‘0’, stream) == EOF) return EOF; len++; if (fputc(info->spec, stream) == EOF) return EOF; len++; return len; } static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info, ptrdiff_t min_len) { ssize_t len; ptrdiff_t tmp; len = 0; tmp = info->width - (info->alt * 2); if (info->group) tmp -= tmp / 5 - !(tmp % 5); for (ptrdiff_t i = tmp - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static ssize_t b_print_number(FILE *stream, const struct printf_info info, const char bin[UINTMAX_WIDTH], size_t min_len, size_t bin_len) { ssize_t len; len = 0; / Print leading zeros to fill precision / for (size_t i = bin_len - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } / Print number */ for (size_t i = min_len - 1; i < min_len; i–) { if (fputc(bin[i], stream) == EOF) return EOF; len++; if (!info->group || (i % 4) || !i) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static char pad_ch(const struct printf_info *info) { if ((info->prec != -1) || (info->pad == ’ ‘) || info->left) return ’ ‘; return ‘0’; } static ssize_t pad_spaces(FILE *stream, size_t pad_len) { ssize_t len; len = 0; for (size_t i = pad_len - 1; i < pad_len; i–) { if (fputc(’ ‘, stream) == EOF) return EOF; len++; } return len; }

SEE ALSO

asprintf(3), printf(3), wprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

969 - Linux cli command Image_ExifTool_PhotoCDpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_PhotoCDpm and provides detailed information about the command Image_ExifTool_PhotoCDpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_PhotoCDpm.

NAME 🖥️ Image_ExifTool_PhotoCDpm 🖥️

Read Kodak Photo CD Image Pac (PCD) metadata

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to extract information from Kodak Photo CD Image Pac (PCD) files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://pcdtojpeg.sourceforge.net/>

SEE ALSO

“PhotoCD Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

970 - Linux cli command j0f

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command j0f and provides detailed information about the command j0f, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the j0f.

NAME 🖥️ j0f 🖥️

Bessel functions of the first kind

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double j0(double x);
double j1(double x);
double jn(int n, double x);
float j0f(float x);
float j1f(float x);
float jnf(int n, float x);
long double j0l(long double x);
long double j1l(long double x);
long double jnl(int n, long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

j0(), j1(), jn():

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

j0f(), j0l(), j1f(), j1l(), jnf(), jnl():

    _XOPEN_SOURCE >= 600
        || (_ISOC99_SOURCE && _XOPEN_SOURCE)
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The j0() and j1() functions return Bessel functions of x of the first kind of orders 0 and 1, respectively. The jn() function returns the Bessel function of x of the first kind of order n.

The j0f(), j1f(), and jnf(), functions are versions that take and return float values. The j0l(), j1l(), and jnl() functions are versions that take and return long double values.

RETURN VALUE

On success, these functions return the appropriate Bessel value of the first kind for x.

If x is a NaN, a NaN is returned.

If x is too large in magnitude, or the result underflows, a range error occurs, and the return value is 0.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error: result underflow, or x is too large in magnitude
errno is set to ERANGE.

These functions do not raise exceptions for fetestexcept(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

j0(), j0f(), j0l()

Thread safetyMT-Safe

j1(), j1f(), j1l()

Thread safetyMT-Safe

jn(), jnf(), jnl()

Thread safetyMT-Safe

STANDARDS

j0()
j1()
jn()
POSIX.1-2008.

Others:
BSD.

HISTORY

j0()
j1()
jn()
SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008.

Others:
BSD.

BUGS

There are errors of up to 2e-16 in the values returned by j0(), j1(), and jn() for values of x between -8 and 8.

SEE ALSO

y0(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

971 - Linux cli command Net_SSLpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_SSLpm and provides detailed information about the command Net_SSLpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_SSLpm.

NAME 🖥️ Net_SSLpm 🖥️

support for Secure Sockets Layer

METHODS

new
Creates a new Net::SSL object.

configure
Configures a Net::SSL socket for operation.

configure_certs
Sets up a certificate file to use for communicating with on the socket.

connect

die_with_error

get_cipher

get_lwp_object

Walks up the caller stack and looks for something blessed into the LWP::UserAgent namespace and returns it. Vaguely deprecated.

get_peer_certificate
Gets the peer certificate from the underlying Crypt::SSLeay::Conn object.

get_peer_verify

get_shared_ciphers

getchunk

Attempts to read up to 32KiB of data from the socket. Returns undef if nothing was read, otherwise returns the data as a scalar.

pending
Provides access to OpenSSL’s pending attribute on the SSL connection object.

getline
Reads one character at a time until a newline is encountered, and returns the line, including the newline. Grossly inefficient.

print
Concatenates the input parameters and writes them to the socket. Does not honour $, nor $/. Returns the number of bytes written.

printf
Performs a sprintf of the input parameters (thus, the first parameter must be the format), and writes the result to the socket. Returns the number of bytes written.

proxy
Returns the hostname of an https proxy server, as specified by the HTTPS_PROXY environment variable.

proxy_connect_helper
Helps set up a connection through a proxy.

read
Performs a read on the socket and returns the result.

ssl_context

sysread

Is an alias of read.

timeout
Returns the timeout value of the socket as defined by the implementing class or 60 seconds by default.

blocking
Returns a boolean indicating whether the underlying socket is in blocking mode. By default, Net::SSL sockets are in blocking mode. $sock->blocking(0); # set to non-blocking mode This method simply calls the underlying blocking method of the IO::Socket object.

write
Writes the parameters passed in (thus, a list) to the socket. Returns the number of bytes written.

syswrite
Is an alias of write.

accept
Not yet implemented. Will die if called.

getc
Not yet implemented. Will die if called.

getlines
Not yet implemented. Will die if called.

ungetc
Not yet implemented. Will die if called.

send_useragent_to_proxy
By default (as of version 2.80 of Net::SSL in the 0.54 distribution of Crypt::SSLeay), the user agent string is no longer sent to the proxy (but will continue to be sent to the remote host). The previous behaviour was of marginal benefit, and could cause fatal errors in certain scenarios (see CPAN bug #4759) and so no longer happens by default. To reinstate the old behaviour, call Net::SSL::send_useragent_to_proxy with a true value (usually 1).

DIAGNOSTICS

“no port given for proxy server <proxy>”

A proxy was specified for configuring a socket, but no port number was given. Ensure that the proxy is specified as a host:port pair, such as proxy.example.com:8086.

“configure certs failed: <contents of $@>; <contents of $!>” “proxy connect failed: <contents of $@>; <contents of $!>” “Connect failed: <contents of $@>; <contents of $!>”

During connect().

SEE ALSO

IO::Socket::INET
Net::SSL is implemented by subclassing IO::Socket::INET, hence methods not specifically overridden are defined by that package.

Net::SSLeay
A package that provides a Perl-level interface to the openssl secure sockets layer library.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

972 - Linux cli command putwc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command putwc and provides detailed information about the command putwc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the putwc.

NAME 🖥️ putwc 🖥️

write a wide character to a FILE stream

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
#include <wchar.h>
wint_t fputwc(wchar_t wc, FILE *stream);
wint_t putwc(wchar_t wc, FILE *stream);

DESCRIPTION

The fputwc() function is the wide-character equivalent of the fputc(3) function. It writes the wide character wc to stream. If ferror(stream) becomes true, it returns WEOF. If a wide-character conversion error occurs, it sets errno to EILSEQ and returns WEOF. Otherwise, it returns wc.

The putwc() function or macro functions identically to fputwc(). It may be implemented as a macro, and may evaluate its argument more than once. There is no reason ever to use it.

For nonlocking counterparts, see unlocked_stdio(3).

RETURN VALUE

On success, fputwc() function returns wc. Otherwise, WEOF is returned, and errno is set to indicate the error.

ERRORS

Apart from the usual ones, there is

EILSEQ
Conversion of wc to the stream’s encoding fails.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fputwc(), putwc()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

NOTES

The behavior of fputwc() depends on the LC_CTYPE category of the current locale.

In the absence of additional information passed to the fopen(3) call, it is reasonable to expect that fputwc() will actually write the multibyte sequence corresponding to the wide character wc.

SEE ALSO

fgetwc(3), fputws(3), unlocked_stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

973 - Linux cli command XtUngrabPointer

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtUngrabPointer and provides detailed information about the command XtUngrabPointer, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtUngrabPointer.

NAME 🖥️ XtUngrabPointer 🖥️

manage grabs

SYNTAX

#include <X11/Intrinsic.h>

void XtGrabKey(Widget widget, KeyCode keycode, Modifiers modifiers, Boolean owner_events, int pointer_mode, int keyboard_mode);

void XtUngrabKey(Widget widget, KeyCode keycode, Modifiers modifiers);

int XtGrabKeyboard(Widget widget, Boolean owner_events, int pointer_mode, int keyboard_mode, Time time);

void XtUngrabKeyboard(Widget widget, Time time);

void XtGrabButton(Widget widget, int button, Modifiers modifiers, Boolean owner_events, unsigned int event_mask, int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor);

void XtUngrabButton(Widget widget, unsigned button, Modifiers modifiers);

int XtGrabPointer(Widget widget, Boolean owner_events, unsigned int event_mask, int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor, Time time);

void XtUngrabPointer(Widget widget, Time time);

ARGUMENTS

widget
Specifies the widget in whose window the grab will occur. Must be of class Core or a subclass thereof.

keycode

modifiers

owner_events

pointer_mode

keyboard_mode

time

button

confine_to

cursor
Specifies arguments to the associated Xlib function call.

DESCRIPTION

XtGrabKey calls XGrabKey specifying the widget’s window as the grab window if the widget is realized. The remaining arguments are exactly as for XGrabKey. If the widget is not realized, or is later unrealized, the call to XGrabKey will be performed (again) when the widget is realized and its window becomes mapped. In the future, if XtDispatchEvent is called with a KeyPress event matching the specified keycode and modifiers (which may be AnyKey or AnyModifier, respectively) for the widget’s window, the Intrinsics will call XtUngrabKeyboard with the timestamp from the KeyPress event if either of the following conditions is true:

  • There is a modal cascade and the widget is not in the active subset of the cascade and the keyboard was not previously grabbed, or

  • XFilterEvent returns True.

XtUngrabKey calls XUngrabKey specifying the widget’s window as the ungrab window if the widget is realized. The remaining arguments are exactly as for XUngrabKey. If the widget is not realized, XtUngrabKey removes a deferred XtGrabKey request, if any, for the specified widget, keycode, and modifiers.

If the specified widget is realized XtGrabKeyboard calls XGrabKeyboard specifying the widget’s window as the grab window. The remaining arguments and return value are exactly as for XGrabKeyboard. If the widget is not realized, XtGrabKeyboard immediately returns GrabNotViewable. No future ungrab is implied by XtGrabKeyboard.

XtUngrabKeyboard calls XUngrabKeyboard with the specified time.

XtGrabButton calls XGrabButton specifying the widget’s window as the grab window if the widget is realized. The remaining arguments are exactly as for XGrabButton. If the widget is not realized, or is later unrealized, the call to XGrabButton will be performed (again) when the widget is realized and its window becomes mapped. In the future, if XtDispatchEvent is called with a ButtonPress event matching the specified button and modifiers (which may be AnyButton or AnyModifier, respectively) for the widget’s window, the Intrinsics will call XtUngrabPointer with the timestamp from the ButtonPress event if either of the following conditions is true:

  • There is a modal cascade and the widget is not in the active subset of the cascade and the pointer was not previously grabbed, or

  • XFilterEvent returns True.

XtUngrabButton calls XUngrabButton specifying the widget’s window as the ungrab window if the widget is realized. The remaining arguments are exactly as for XUngrabButton. If the widget is not realized, XtUngrabButton removes a deferred XtGrabButton request, if any, for the specified widget, button, and modifiers.

XtGrabPointer calls XGrabPointer specifying the widget’s window as the grab window. The remaining arguments and return value are exactly as for XGrabPointer. If the widget is not realized, XtGrabPointer immediately returns GrabNotViewable. No future ungrab is implied by XtGrabPointer.

XtUngrabPointer calls XUngrabPointer with the specified time.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

974 - Linux cli command zip_set_default_password

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_set_default_password and provides detailed information about the command zip_set_default_password, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_set_default_password.

libzip (-lzip)

The

function sets the default password used when accessing encrypted files. If

is

the default password is unset.

If you prefer a different password for single files, use

instead of

Usually, however, the same password is used for every file in an zip archive.

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

fails if:

Required memory could not be allocated.

was added in libzip 0.10.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

975 - Linux cli command pthread_attr_setsigmask_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_attr_setsigmask_np and provides detailed information about the command pthread_attr_setsigmask_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_attr_setsigmask_np.

NAME 🖥️ pthread_attr_setsigmask_np 🖥️

set/get signal mask attribute in thread attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <pthread.h>
int pthread_attr_setsigmask_np(pthread_attr_t *attr,
 const sigset_t *sigmask);
int pthread_attr_getsigmask_np(const pthread_attr_t *attr,
 sigset_t *sigmask);

DESCRIPTION

The pthread_attr_setsigmask_np() function sets the signal mask attribute of the thread attributes object referred to by attr to the value specified in *sigmask. If sigmask is specified as NULL, then any existing signal mask attribute in attr is unset.

The pthread_attr_getsigmask_np() function returns the signal mask attribute of the thread attributes object referred to by attr in the buffer pointed to by sigmask. If the signal mask attribute is currently unset, then this function returns the special value PTHREAD_ATTR_NO_SIGMASK_NP as its result.

RETURN VALUE

The pthread_attr_setsigmask_np() function returns 0 on success, or a nonzero error number on failure.

the pthread_attr_getsigmask_np() function returns either 0 or PTHREAD_ATTR_NO_SIGMASK_NP. When 0 is returned, the signal mask attribute is returned via sigmask. A return value of PTHREAD_ATTR_NO_SIGMASK_NP indicates that the signal mask attribute is not set in attr.

On error, these functions return a positive error number.

ERRORS

ENOMEM
(pthread_attr_setsigmask_np()) Could not allocate memory.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_attr_setsigmask_np(), pthread_attr_getsigmask_np()

Thread safetyMT-Safe

STANDARDS

GNU; hence the suffix “_np” (nonportable) in the names.

HISTORY

glibc 2.32.

NOTES

The signal mask attribute determines the signal mask that will be assigned to a thread created using the thread attributes object attr. If this attribute is not set, then a thread created using attr will inherit a copy of the creating thread’s signal mask.

For more details on signal masks, see sigprocmask(2). For a description of a set of macros that can be used to manipulate and inspect signal sets, see sigsetops(3).

In the absence of pthread_attr_setsigmask_np() it is possible to create a thread with a desired signal mask as follows:

  • The creating thread uses pthread_sigmask(3) to save its current signal mask and set its mask to block all signals.

  • The new thread is then created using pthread_create(); the new thread will inherit the creating thread’s signal mask.

  • The new thread sets its signal mask to the desired value using pthread_sigmask(3).

  • The creating thread restores its signal mask to the original value.

Following the above steps, there is no possibility for the new thread to receive a signal before it has adjusted its signal mask to the desired value.

SEE ALSO

sigprocmask(2), pthread_attr_init(3), pthread_sigmask(3), pthreads(7), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

976 - Linux cli command XShmPixmapFormat

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XShmPixmapFormat and provides detailed information about the command XShmPixmapFormat, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XShmPixmapFormat.

NAME 🖥️ XShmPixmapFormat 🖥️

X Shared Memory extension functions

SYNTAX

#include <X11/Xlib.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
Bool	XShmQueryExtension(
	Display *display);
Bool XShmQueryVersion(
	Display *display;
	int *major, *minor;
	Bool *pixmaps);
int XShmPixmapFormat(
	Display *display);
Bool XShmAttach(
	Display *display;
	XShmSegmentInfo *shminfo);
Bool XShmDetach(
	Display *display;
	XShmSegmentInfo *shminfo);

XImage *XShmCreateImage (
	Display *display;
	Visual *visual;
	unsigned int depth;
	int format;
	char *data;
	XShmSegmentInfo *shminfo;
	unsigned int width, height);
Bool XShmPutImage(
	Display *display;
	Drawable d;
	GC gc;
	XImage *image;
	int src_x, src_y, dest_x, dest_y;
	unsigned int width, height;
	bool send_event);
Bool XShmGetImage (
	Display *display;
	Drawable d;
	XImage *image;
	int x, y;
	unsigned long plane_mask);
Pixmap XShmCreatePixmap(
        Display *display;
        Drawable d;
        char *data;
	XShmSegmentInfo *shminfo;
	unsigned int width, height, depth);
Status XShmGetEventBase(
	Display *display);

STRUCTURES

Events:
typedef struct {
    int type;               /* of event */
    unsigned long serial;   /* # of last request processed by server*/
    Bool send_event;        /* true if this came from a SendEvent request*/
    Display *display;       /* Display the event was read from */
    Drawable drawable;      /* drawable of request */
    int major_code;         /* ShmReqCode */
    int minor_code;         /* X_ShmPutImage */
    ShmSeg shmseg;          /* the ShmSeg used in the request*/
    unsigned long offset;   /* the offset into ShmSeg used in the request*/
} XShmCompletionEvent;
a structure of type XShmSegmentInfo :

typedef struct {
    ShmSeg shmseg;      /* resource id */
    int shmid;          /* kernel id */
    char *shmaddr;      /* address in client */
    Bool readOnly;      /* how the server should attach it */
} XShmSegmentInfo;

DESCRIPTION

* XShmQueryExtension * checks to see if the shared memory extensions are available for the specified display.

* XShmQueryVersion * returns the version numbers of the extension implementation. Shared memory pixmaps are supported if the pixmaps argument returns true.

* XShmAttach * tells the server to attach to your shared memory segment. If all goes well, you will get a non-zero status, back and your XImage is ready for use.

* XShmDetach * tells the server to detach from your shared memory segment.

* XShmPutImage * combines an image in memory with a shape of the specified drawable. If XYBitmap format is used, the depth must be one, or a ``BadMatch’’ error results. The foreground pixel in the GC defines the source for the one bits in the image, and the background pixel defines the source for the zero bits. For XYPixmap and ZPixmap, the depth must match the depth of the drawable, or a ``BadMatch’’ error results.

* XShmGetImage * reads image data into a shared memory XImage where display is the display of interest, drawable is the source drawable, image is the destination XImage, x and y are offsets within the drawable, and plane_mask defines which planes are to be read.

* XShmCreateImage * allocates the memory needed for an XImage structure for the specified display but does not allocate space for the image itself.

* XShmPixmapFormat * gets the format for the server. If your application can deal with the server pixmap data format, a shared memory segment and shminfo structure are created.

* XShmCreatePixmap * points to a pixmap which you can manipulate in all of the usual ways, with the added bonus of being able to edit its contents directly through the shared memory segment.

* XShmGetEventBase * gets the completion event value.

SEE ALSO

MIT-SHM - The MIT Shared Memory Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

977 - Linux cli command Net_DNS_RR_MGpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_MGpm and provides detailed information about the command Net_DNS_RR_MGpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_MGpm.

NAME 🖥️ Net_DNS_RR_MGpm 🖥️

DNS MG resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name MG mgmname);

DESCRIPTION

Class for DNS Mail Group (MG) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

mgmname

$mgmname = $rr->mgmname; $rr->mgmname( $mgmname );

A domain name which specifies a mailbox which is a member of the mail group specified by the owner name.

COPYRIGHT

Copyright (c)1997 Michael Fuhr.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC1035(3.3.6) <https://iana.org/go/rfc1035#section-3.3.6>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

978 - Linux cli command key_decryptsession

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command key_decryptsession and provides detailed information about the command key_decryptsession, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the key_decryptsession.

NAME 🖥️ key_decryptsession 🖥️

interfaces to rpc keyserver daemon

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <rpc/rpc.h>
int key_decryptsession(char *remotename, des_block *deskey);
int key_encryptsession(char *remotename, des_block *deskey);
int key_gendes(des_block *deskey);
int key_setsecret(char *key);
int key_secretkey_is_set(void);

DESCRIPTION

The functions here are used within the RPC’s secure authentication mechanism (AUTH_DES). There should be no need for user programs to use this functions.

The function key_decryptsession() uses the (remote) server netname and takes the DES key for decrypting. It uses the public key of the server and the secret key associated with the effective UID of the calling process.

The function key_encryptsession() is the inverse of key_decryptsession(). It encrypts the DES keys with the public key of the server and the secret key associated with the effective UID of the calling process.

The function key_gendes() is used to ask the keyserver for a secure conversation key.

The function key_setsecret() is used to set the key for the effective UID of the calling process.

The function key_secretkey_is_set() can be used to determine whether a key has been set for the effective UID of the calling process.

RETURN VALUE

These functions return 1 on success and 0 on failure.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

key_decryptsession(), key_encryptsession(), key_gendes(), key_setsecret(), key_secretkey_is_set()

Thread safetyMT-Safe

NOTES

Note that we talk about two types of encryption here. One is asymmetric using a public and secret key. The other is symmetric, the 64-bit DES.

These routines were part of the Linux/Doors-project, abandoned by now.

SEE ALSO

crypt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

979 - Linux cli command XtSetSubvalues

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtSetSubvalues and provides detailed information about the command XtSetSubvalues, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtSetSubvalues.

NAME 🖥️ XtSetSubvalues 🖥️

obtain and set widget resources

SYNTAX

#include <X11/Intrinsic.h>

void XtSetValues(Widget w, ArgList args, Cardinal num_args);

void XtVaSetValues(Widget w, … );

void XtSetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);

void XtVaSetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, … );

void XtGetValues(Widget w, ArgList args, Cardinal num_args);

void XtVaGetValues(Widget w, … );

void XtGetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);

void XtVaGetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, … );

ARGUMENTS

args
Specifies the argument list of name/address pairs that contain the resource name and either the address into which the resource value is to be stored or their new values.

base
Specifies the base address of the subpart data structure where the resources should be retrieved or written.

num_args
Specifies the number of arguments in the argument list.

resources
Specifies the nonwidget resource list or values.

num_resources
Specifies the number of resources in the resource list.

  1. Specifies the widget.


Specifies the variable argument list of name/address pairs that contain the resource name and either the address into which the resource value is to be stored or their new values.

DESCRIPTION

The XtSetValues function starts with the resources specified for the Core widget fields and proceeds down the subclass chain to the widget. At each stage, it writes the new value (if specified by one of the arguments) or the existing value (if no new value is specified) to a new widget data record. XtSetValues then calls the set_values procedures for the widget in superclass-to-subclass order. If the widget has any non-NULL set_values_hook fields, these are called immediately after the corresponding set_values procedure. This procedure permits subclasses to set nonwidget data for XtSetValues.

If the widget’s parent is a subclass of constraintWidgetClass, XtSetValues also updates the widget’s constraints. It starts with the constraint resources specified for constraintWidgetClass and proceeds down the subclass chain to the parent’s class. At each stage, it writes the new value or the existing value to a new constraint record. It then calls the constraint set_values procedures from constraintWidgetClass down to the parent’s class. The constraint set_values procedures are called with widget arguments, as for all set_values procedures, not just the constraint record arguments, so that they can make adjustments to the desired values based on full information about the widget.

XtSetValues determines if a geometry request is needed by comparing the current widget to the new widget. If any geometry changes are required, it makes the request, and the geometry manager returns XtGeometryYes, XtGeometryAlmost, or XtGeometryNo. If XtGeometryYes, XtSetValues calls the widget’s resize procedure. If XtGeometryNo, XtSetValues resets the geometry fields to their original values. If XtGeometryAlmost, XtSetValues calls the set_values_almost procedure, which determines what should be done and writes new values for the geometry fields into the new widget. XtSetValues then repeats this process, deciding once more whether the geometry manager should be called.

Finally, if any of the set_values procedures returned True, XtSetValues causes the widget’s expose procedure to be invoked by calling the Xlib XClearArea function on the widget’s window.

The XtSetSubvalues function stores resources into the structure identified by base.

The XtGetValues function starts with the resources specified for the core widget fields and proceeds down the subclass chain to the widget. The value field of a passed argument list should contain the address into which to store the corresponding resource value. It is the caller’s responsibility to allocate and deallocate this storage according to the size of the resource representation type used within the widget.

If the widget’s parent is a subclass of constraintWidgetClass, XtGetValues then fetches the values for any constraint resources requested. It starts with the constraint resources specified for constraintWidgetClass and proceeds down to the subclass chain to the parent’s constraint resources. If the argument list contains a resource name that is not found in any of the resource lists searched, the value at the corresponding address is not modified. Finally, if the get_values_hook procedures are non-NULL, they are called in superclass-to-subclass order after all the resource values have been fetched by XtGetValues. This permits a subclass to provide nonwidget resource data to XtGetValues.

The XtGetSubvalues function obtains resource values from the structure identified by base.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

980 - Linux cli command getspnam

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getspnam and provides detailed information about the command getspnam, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getspnam.

NAME 🖥️ getspnam 🖥️

get shadow password file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

/* General shadow password file API */
#include <shadow.h>
struct spwd *getspnam(const char *name);
struct spwd *getspent(void);
void setspent(void);
void endspent(void);
struct spwd *fgetspent(FILE *stream);
struct spwd *sgetspent(const char *s);
int putspent(const struct spwd *p, FILE *stream);
int lckpwdf(void);
int ulckpwdf(void);
/* GNU extension */
#include <shadow.h>
int getspent_r(struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int getspnam_r(const char *name, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int fgetspent_r(FILE *stream, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int sgetspent_r(const char *s, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getspent_r(), getspnam_r(), fgetspent_r(), sgetspent_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

Long ago it was considered safe to have encrypted passwords openly visible in the password file. When computers got faster and people got more security-conscious, this was no longer acceptable. Julianne Frances Haugh implemented the shadow password suite that keeps the encrypted passwords in the shadow password database (e.g., the local shadow password file /etc/shadow, NIS, and LDAP), readable only by root.

The functions described below resemble those for the traditional password database (e.g., see getpwnam(3) and getpwent(3)).

The getspnam() function returns a pointer to a structure containing the broken-out fields of the record in the shadow password database that matches the username name.

The getspent() function returns a pointer to the next entry in the shadow password database. The position in the input stream is initialized by setspent(). When done reading, the program may call endspent() so that resources can be deallocated.

The fgetspent() function is similar to getspent() but uses the supplied stream instead of the one implicitly opened by setspent().

The sgetspent() function parses the supplied string s into a struct spwd.

The putspent() function writes the contents of the supplied struct spwd *p as a text line in the shadow password file format to stream. String entries with value NULL and numerical entries with value -1 are written as an empty string.

The lckpwdf() function is intended to protect against multiple simultaneous accesses of the shadow password database. It tries to acquire a lock, and returns 0 on success, or -1 on failure (lock not obtained within 15 seconds). The ulckpwdf() function releases the lock again. Note that there is no protection against direct access of the shadow password file. Only programs that use lckpwdf() will notice the lock.

These were the functions that formed the original shadow API. They are widely available.

Reentrant versions

Analogous to the reentrant functions for the password database, glibc also has reentrant functions for the shadow password database. The getspnam_r() function is like getspnam() but stores the retrieved shadow password structure in the space pointed to by spbuf. This shadow password structure contains pointers to strings, and these strings are stored in the buffer buf of size buflen. A pointer to the result (in case of success) or NULL (in case no entry was found or an error occurred) is stored in *spbufp.

The functions getspent_r(), fgetspent_r(), and sgetspent_r() are similarly analogous to their nonreentrant counterparts.

Some non-glibc systems also have functions with these names, often with different prototypes.

Structure

The shadow password structure is defined in <shadow.h> as follows:

struct spwd {
    char *sp_namp;     /* Login name */
    char *sp_pwdp;     /* Encrypted password */
    long  sp_lstchg;   /* Date of last change
                          (measured in days since
                          1970-01-01 00:00:00 +0000 (UTC)) */
    long  sp_min;      /* Min # of days between changes */
    long  sp_max;      /* Max # of days between changes */
    long  sp_warn;     /* # of days before password expires
                          to warn user to change it */
    long  sp_inact;    /* # of days after password expires
                          until account is disabled */
    long  sp_expire;   /* Date when account expires
                          (measured in days since
                          1970-01-01 00:00:00 +0000 (UTC)) */
    unsigned long sp_flag;  /* Reserved */
};

RETURN VALUE

The functions that return a pointer return NULL if no more entries are available or if an error occurs during processing. The functions which have int as the return value return 0 for success and -1 for failure, with errno set to indicate the error.

For the nonreentrant functions, the return value may point to static area, and may be overwritten by subsequent calls to these functions.

The reentrant functions return zero on success. In case of error, an error number is returned.

ERRORS

EACCES
The caller does not have permission to access the shadow password file.

ERANGE
Supplied buffer is too small.

FILES

/etc/shadow
local shadow password database file

/etc/.pwd.lock
lock file

The include file <paths.h> defines the constant _PATH_SHADOW to the pathname of the shadow password file.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getspnam()

Thread safety

MT-Unsafe race:getspnam locale

getspent()

Thread safety

MT-Unsafe race:getspent race:spentbuf locale

setspent(), endspent(), getspent_r()

Thread safety

MT-Unsafe race:getspent locale

fgetspent()

Thread safety

MT-Unsafe race:fgetspent

sgetspent()

Thread safety

MT-Unsafe race:sgetspent

putspent(), getspnam_r(), sgetspent_r()

Thread safety

MT-Safe locale

lckpwdf(), ulckpwdf(), fgetspent_r()

Thread safety

MT-Safe

In the above table, getspent in race:getspent signifies that if any of the functions setspent(), getspent(), getspent_r(), or endspent() are used in parallel in different threads of a program, then data races could occur.

VERSIONS

Many other systems provide a similar API.

STANDARDS

None.

SEE ALSO

getgrnam(3), getpwnam(3), getpwnam_r(3), shadow(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

981 - Linux cli command __fsetlocking

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __fsetlocking and provides detailed information about the command __fsetlocking, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __fsetlocking.

NAME 🖥️ __fsetlocking 🖥️

interfaces to stdio FILE structure

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
#include <stdio_ext.h>
size_t __fbufsize(FILE *stream);
size_t __fpending(FILE *stream);
int __flbf(FILE *stream);
int __freadable(FILE *stream);
int __fwritable(FILE *stream);
int __freading(FILE *stream);
int __fwriting(FILE *stream);
int __fsetlocking(FILE *stream, int type);
void _flushlbf(void);
void __fpurge(FILE *stream);

DESCRIPTION

Solaris introduced routines to allow portable access to the internals of the FILE structure, and glibc also implemented these.

The __fbufsize() function returns the size of the buffer currently used by the given stream.

The __fpending() function returns the number of bytes in the output buffer. For wide-oriented streams the unit is wide characters. This function is undefined on buffers in reading mode, or opened read-only.

The __flbf() function returns a nonzero value if the stream is line-buffered, and zero otherwise.

The __freadable() function returns a nonzero value if the stream allows reading, and zero otherwise.

The __fwritable() function returns a nonzero value if the stream allows writing, and zero otherwise.

The __freading() function returns a nonzero value if the stream is read-only, or if the last operation on the stream was a read operation, and zero otherwise.

The __fwriting() function returns a nonzero value if the stream is write-only (or append-only), or if the last operation on the stream was a write operation, and zero otherwise.

The __fsetlocking() function can be used to select the desired type of locking on the stream. It returns the current type. The type argument can take the following three values:

FSETLOCKING_INTERNAL
Perform implicit locking around every operation on the given stream (except for the *_unlocked ones). This is the default.

FSETLOCKING_BYCALLER
The caller will take care of the locking (possibly using flockfile(3) in case there is more than one thread), and the stdio routines will not do locking until the state is reset to FSETLOCKING_INTERNAL.

FSETLOCKING_QUERY
Don’t change the type of locking. (Only return it.)

The _flushlbf() function flushes all line-buffered streams. (Presumably so that output to a terminal is forced out, say before reading keyboard input.)

The __fpurge() function discards the contents of the stream’s buffer.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

__fbufsize(), __fpending(), __fpurge(), __fsetlocking()

Thread safetyMT-Safe race:stream

__flbf(), __freadable(), __freading(), __fwritable(), __fwriting(), _flushlbf()

Thread safetyMT-Safe

SEE ALSO

flockfile(3), fpurge(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

982 - Linux cli command XtMakeGeometryRequest

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtMakeGeometryRequest and provides detailed information about the command XtMakeGeometryRequest, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtMakeGeometryRequest.

NAME 🖥️ XtMakeGeometryRequest 🖥️

make geometry manager request

SYNTAX

#include <X11/Intrinsic.h>

XtGeometryResult XtMakeGeometryRequest(Widget w, XtWidgetGeometry *request, XtWidgetGeometry *reply_return);

XtGeometryResult XtMakeResizeRequest(Widget w, Dimension width, Dimension height, Dimension *width_return, Dimension *height_return);

ARGUMENTS

reply_return
Returns the allowed widget size or may be NULL if the requesting widget is not interested in handling XtGeometryAlmost.

request
Specifies the desired widget geometry (size, position, border width, and stacking order).

  1. Specifies the widget that is making the request.

width_return

height_return
Return the allowed widget width and height.

DESCRIPTION

Depending on the condition, XtMakeGeometryRequest performs the following:

  • If the widget is unmanaged or the widget’s parent is not realized, it makes the changes and returns XtGeometryYes.

  • If the parent is not a subclass of compositeWidgetClass or the parent’s geometry_manager is NULL, it issues an error.

  • If the widget’s being_destroyed field is True, it returns XtGeometryNo.

  • If the widget x, y, width, height and border_width fields are all equal to the requested values, it returns XtGeometryYes; otherwise, it calls the parent’s geometry_manager procedure with the given parameters.

  • If the parent’s geometry manager returns XtGeometryYes and if XtCWQueryOnly is not set in the request_mode and if the widget is realized, XtMakeGeometryRequest calls the XConfigureWindow Xlib function to reconfigure the widget’s window (set its size, location, and stacking order as appropriate).

  • If the geometry manager returns XtGeometryDone, the change has been approved and actually has been done. In this case, XtMakeGeometryRequest does no configuring and returns XtGeometryYes. XtMakeGeometryRequest never returns XtGeometryDone.

Otherwise, XtMakeGeometryRequest returns the resulting value from the parent’s geometry manager.

Children of primitive widgets are always unmanaged; thus, XtMakeGeometryRequest always returns XtGeometryYes when called by a child of a primitive widget.

The XtMakeResizeRequest function, a simple interface to XtMakeGeometryRequest, creates a XtWidgetGeometry structure and specifies that width and height should change. The geometry manager is free to modify any of the other window attributes (position or stacking order) to satisfy the resize request. If the return value is XtGeometryAlmost, width_return and height_return contain a compromise width and height. If these are acceptable, the widget should immediately make an XtMakeResizeRequest and request that the compromise width and height be applied. If the widget is not interested in XtGeometryAlmost replies, it can pass NULL for width_return and height_return.

SEE ALSO

XtConfigureWidget(3), XtQueryGeometery(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

983 - Linux cli command Moose_Cookbook_Basics_Document_AugmentAndInnerpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Basics_Document_AugmentAndInnerpm and provides detailed information about the command Moose_Cookbook_Basics_Document_AugmentAndInnerpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Basics_Document_AugmentAndInnerpm.

NAME 🖥️ Moose_Cookbook_Basics_Document_AugmentAndInnerpm 🖥️

The augment modifier, which turns normal method overriding “inside-out”

VERSION

version 2.2207

SYNOPSIS

package Document::Page; use Moose; has body => ( is => rw, isa => Str, default => sub {} ); sub create { my $self = shift; $self->open_page; inner(); $self->close_page; } sub append_body { my ( $self, $appendage ) = @_; $self->body( $self->body . $appendage ); } sub open_page { (shift)->append_body(<page>) } sub close_page { (shift)->append_body(</page>) } package Document::PageWithHeadersAndFooters; use Moose; extends Document::Page; augment create => sub { my $self = shift; $self->create_header; inner(); $self->create_footer; }; sub create_header { (shift)->append_body(<header/>) } sub create_footer { (shift)->append_body(<footer/>) } package TPSReport; use Moose; extends Document::PageWithHeadersAndFooters; augment create => sub { my $self = shift; $self->create_tps_report; inner(); }; sub create_tps_report { (shift)->append_body(<report type=“tps”/>); } # <page><header/><report type=“tps”/><footer/></page> my $report_xml = TPSReport->new->create;

DESCRIPTION

This recipe shows how the augment method modifier works. This modifier reverses the normal subclass to parent method resolution order. With an augment modifier the least specific method is called first. Each successive call to inner descends the inheritance tree, ending at the most specific subclass.

The augment modifier lets you design a parent class that can be extended in a specific way. The parent provides generic wrapper functionality, and the subclasses fill in the details.

In the example above, we’ve created a set of document classes, with the most specific being the TPSReport class.

We start with the least specific class, Document::Page. Its create method contains a call to inner():

sub create { my $self = shift; $self->open_page; inner(); $self->close_page; }

The inner function is exported by Moose, and is like super for augmented methods. When inner is called, Moose finds the next method in the chain, which is the augment modifier in Document::PageWithHeadersAndFooters. You’ll note that we can call inner in our modifier:

augment create => sub { my $self = shift; $self->create_header; inner(); $self->create_footer; };

This finds the next most specific modifier, in the TPSReport class.

Finally, in the TPSReport class, the chain comes to an end:

augment create => sub { my $self = shift; $self->create_tps_report; inner(); };

We do call the inner function one more time, but since there is no more specific subclass, this is a no-op. Making this call means we can easily subclass TPSReport in the future.

CONCLUSION

The augment modifier is a powerful tool for creating a set of nested wrappers. It’s not something you will need often, but when you do, it is very handy.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

984 - Linux cli command XauFileName

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XauFileName and provides detailed information about the command XauFileName, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XauFileName.

NAME 🖥️ XauFileName 🖥️

X authority database routines

SYNOPSIS

#include <X11/Xauth.h>

typedef struct xauth {
        unsigned short  family;
        unsigned short  address_length;
        char    *address;
        unsigned short  number_length;
        char    *number;
        unsigned short  name_length;
        char    *name;
        unsigned short  data_length;
        char    *data;
} Xauth;
char *XauFileName (void);
Xauth *XauReadAuth (FILE *auth_file );
int XauWriteAuth (FILE *auth_file, Xauth *auth );
Xauth *XauGetAuthByAddr (unsigned short family , unsigned short
address_length , const char *address , unsigned short
number_length , const char *number , unsigned short
name_length , const char *name );
Xauth *XauGetBestAuthByAddr (unsigned short family , unsigned short
address_length , const char *address , unsigned short
number_length , const char *number , int types_length ,
char **types , const int *type_lengths );
int XauLockAuth (const char *file_name , int retries , int
timeout , long dead );
int XauUnlockAuth (const char *file_name );
int XauDisposeAuth (Xauth *auth );

DESCRIPTION

XauFileName generates the default authorization file name by first checking the XAUTHORITY environment variable if set, else it returns $HOME/.Xauthority. This name is statically allocated and should not be freed.

XauReadAuth reads the next entry from auth_file. The entry is not statically allocated and should be freed by calling XauDisposeAuth.

XauWriteAuth writes an authorization entry to auth_file. It returns 1 on success, 0 on failure.

XauGetAuthByAddr searches for an entry which matches the given network address/display number pair. The entry is not statically allocated and should be freed by calling XauDisposeAuth.

XauGetBestAuthByAddr is similar to XauGetAuthByAddr, except that a list of acceptable authentication methods is specified. Xau will choose the file entry which matches the earliest entry in this list (e.g., the most secure authentication method). The types argument is an array of strings, one string for each authentication method. types_length specifies how many elements are in the types array. types_lengths is an array of integers representing the length of each string.

XauLockAuth does the work necessary to synchronously update an authorization file. First it makes two file names, one with ``-c’’ appended to file_name, the other with ``-l’’ appended. If the ``-c’’ file already exists and is more than dead seconds old, XauLockAuth removes it and the associated ``-l’’ file. To prevent possible synchronization troubles with NFS, a dead value of zero forces the files to be removed. XauLockAuth makes retries attempts to create and link the file names, pausing timeout seconds between each attempt. XauLockAuth returns a collection of values depending on the results:

LOCK_ERROR
A system error occurred, either a file_name which is too long, or an unexpected failure from a system call. errno may prove useful.

LOCK_TIMEOUT
retries attempts failed

LOCK_SUCCESS
The lock succeeded.

XauUnlockAuth undoes the work of XauLockAuth by unlinking both the ``-c’’ and ``-l’’ file names.

XauDisposeAuth frees storage allocated to hold an authorization entry.

SEE ALSO

xauth(1), xdm(1)

AUTHOR

Keith Packard, MIT X Consortium

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

985 - Linux cli command XmbufChangeBufferAttributes

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XmbufChangeBufferAttributes and provides detailed information about the command XmbufChangeBufferAttributes, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XmbufChangeBufferAttributes.

NAME 🖥️ XmbufChangeBufferAttributes 🖥️

X multibuffering functions

SYNTAX

#include <X11/extensions/multibuf.h>

Bool XmbufQueryExtension(
    Display *dpy,
    Display *dpy,
    int *event_base_return,
    int *error_base_return);

Status XmbufGetVersion(
    Display *dpy,
    int *major_version_return,
    int *minor_version_return);

int XmbufCreateBuffers(
    Display *dpy,
    Window window,
    int count,
    int update_action,
    int update_hint,
    Multibuffer *buffers_update);

void XmbufDestroyBuffers(
    Display *dpy,
    Window window);

void XmbufDisplayBuffers(
    Display *dpy,
    int count,
    Multibuffer *buffers,
    int min_delay,
    int max_delay);

Status XmbufGetWindowAttributes(
    Display *dpy,
    Window window,
    XmbufWindowAttributes *attributes);

void XmbufChangeWindowAttributes(
    Display *dpy,
    Window window,
    unsigned long valuemask,
    XmbufSetWindowAttributes *attributes);

Status XmbufGetBufferAttributes(
    Display *dpy,
    Multibuffer buffer,
    XmbufBufferAttributes *attributes);

void XmbufChangeBufferAttributes(
    Display *dpy,
    Multibuffer buffer,
    unsigned long valuemask,
    XmbufSetBufferAttributes *attributes);

Status XmbufGetScreenInfo(
    Display *dpy,
    Drawable drawable,
    int *nmono_return,
    XmbufBufferInfo **mono_info_return,
    int *nstereo_return,
    XmbufBufferInfo **stereo_info_return);

Window XmbufCreateStereoWindow(
    Display *dpy,
    Window parent,
    int x,
    int y,
    unsigned int width,
    unsigned int height,
    unsigned int border_width,
    int depth,
    unsigned int class,                 /* InputOutput, InputOnly*/
    Visual *visual,
    unsigned long valuemask,
    XSetWindowAttributes *attributes,
    Multibuffer *left_return,
    Multibuffer *right_return);

STRUCTURES

Events:

typedef struct {
    int type;   /* of event */
    unsigned long serial;       /* # of last request processed by server */
    int send_event;     /* true if this came from a SendEvent request */
    Display *display;   /* Display the event was read from */
    Multibuffer buffer; /* buffer of event */
    int state;  /* see Clobbered constants above */
} XmbufClobberNotifyEvent;

typedef struct {
    int type;   /* of event */
    unsigned long serial;       /* # of last request processed by server */
    int send_event;     /* true if this came from a SendEvent request */
    Display *display;   /* Display the event was read from */
    Multibuffer buffer; /* buffer of event */
} XmbufUpdateNotifyEvent;

Per-window attributes that can be got:

typedef struct {
    int displayed_index;	/* which buffer is being displayed */
    int update_action;	/* Undefined, Background, Untouched, Copied */
    int update_hint;	/* Frequent, Intermittent, Static */
    int window_mode;	/* Mono, Stereo */
    int nbuffers;	/* Number of buffers */
    Multibuffer *buffers;	/* Buffers */
} XmbufWindowAttributes;

Per-window attributes that can be set:

typedef struct {
    int update_hint;	/* Frequent, Intermittent, Static */
} XmbufSetWindowAttributes;

Per-buffer attributes that can be got:

typedef struct {
    Window window;	/* which window this belongs to */
    unsigned long event_mask;	/* events that have been selected */
    int buffer_index;	/* which buffer is this */
    int side;	/* Mono, Left, Right */
} XmbufBufferAttributes;

Per-buffer attributes that can be set:

typedef struct {
    unsigned long event_mask;	/* events that have been selected */
} XmbufSetBufferAttributes;

Per-screen buffer info (there will be lists of them):

typedef struct {
    VisualID visualid;	/* visual usable at this depth */
    int max_buffers;	/* most buffers for this visual */
    int depth;	/* depth of buffers to be created */
} XmbufBufferInfo;

DESCRIPTION

The application programming library for the X11 Double-Buffering, Multi-Buffering, and Stereo Extension contains the interfaces described below. With the exception of * XmbufQueryExtension *, if any of these routines are called with a display that does not support the extension, the ExtensionErrorHandler (which can be set with * XSetExtensionErrorHandler * and functions the same way as * XSetErrorHandler *) will be called and the function will then return.

* XmbufQueryExtension * returns * True * if the multibuffering/stereo extension is available on the given display. If the extension exists, the value of the first event code (which should be added to the event type constants * MultibufferClobberNotify * and * MultibufferUpdateNotify * to get the actual values) is stored into event_base_return and the value of the first error code (which should be added to the error type constant * MultibufferBadBuffer * to get the actual value) is stored into error_base_return.

* XmbufGetVersion * gets the major and minor version numbers of the extension. The return value is zero if an error occurs or non-zero if no error happens.

* XmbufCreateBuffers * requests that “count” buffers be created with the given update_action and update_hint and be associated with the indicated window. The number of buffers created is returned (zero if an error occurred) and buffers_update is filled in with that many Multibuffer identifiers.

* XmbufDestroyBuffers * destroys the buffers associated with the given window.

* XmbufDisplayBuffers * displays the indicated buffers their appropriate windows within max_delay milliseconds after min_delay milliseconds have passed. No two buffers may be associated with the same window or else a Match error is generated.

* XmbufGetWindowAttributes * gets the multibuffering attributes that apply to all buffers associated with the given window. The list of buffers returns may be freed with * XFree *. Returns non-zero on success and zero if an error occurs.

* XmbufChangeWindowAttributes * sets the multibuffering attributes that apply to all buffers associated with the given window. This is currently limited to the update_hint.

* XmbufGetBufferAttributes * gets the attributes for the indicated buffer. Returns non-zero on success and zero if an error occurs.

* XmbufChangeBufferAttributes * sets the attributes for the indicated buffer. This is currently limited to the event_mask.

* XmbufGetScreenInfo * gets the parameters controlling how mono and stereo windows may be created on the screen of the given drawable. The numbers of sets of visual and depths are returned in nmono_return and nstereo_return. If nmono_return is greater than zero, then mono_info_return is set to the address of an array of * XmbufBufferInfo * structures describing the various visuals and depths that may be used. Otherwise, mono_info_return is set to NULL. Similarly, stereo_info_return is set according to nstereo_return. The storage returned in mono_info_return and stereo_info_return may be released by * XFree *. If no errors are encounted, non-zero will be returned.

* XmbufCreateStereoWindow * creates a stereo window in the same way that * XCreateWindow * creates a mono window. The buffer ids for the left and right buffers are returned in left_return and right_return, respectively. If an extension error handler that returns is installed, * None * will be returned if the extension is not available on this display.

PREDEFINED VALUES

Update_action field:

 MultibufferUpdateActionUndefined   MultibufferUpdateActionBackground   MultibufferUpdateActionUntouched   MultibufferUpdateActionCopied 

Update_hint field:

 MultibufferUpdateHintFrequent   MultibufferUpdateHintIntermittent   MultibufferUpdateHintStatic 

Valuemask fields:

 MultibufferWindowUpdateHint   MultibufferBufferEventMask 

Mono vs. stereo and left vs. right:

 MultibufferModeMono   MultibufferModeStereo   MultibufferSideMono   MultibufferSideLeft   MultibufferSideRight 

Clobber state:

 MultibufferUnclobbered   MultibufferPartiallyClobbered   MultibufferFullyClobbered 

Event stuff:

 MultibufferClobberNotifyMask   MultibufferUpdateNotifyMask   MultibufferClobberNotify   MultibufferUpdateNotify   MultibufferNumberEvents   MultibufferBadBuffer   MultibufferNumberErrors 

BUGS

This manual page needs more work.

SEE ALSO

Extending X for Double Buffering, Multi-Buffering, and Stereo

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

986 - Linux cli command zip_file_get_external_attributes

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_file_get_external_attributes and provides detailed information about the command zip_file_get_external_attributes, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_file_get_external_attributes.

libzip (-lzip)

The

function returns the operating system and external attributes for the file at position

in the zip archive. The external attributes usually contain the operating system-specific file permissions. If

is set to

the original unchanged values are returned. If

or

are

they are not filled in.

The following operating systems are defined by the zip specification:

(uncommon, use

instead)

The defines above follow the PKWARE Inc. Appnote; please note that the InfoZIP Appnote has a slightly different mapping.

Upon successful completion, 0 is returned. In case of an error,

is returned and the error code in

is set to indicate the error.

The following code can be used to expand

if the operating system is

#include <sys/stat.h>

#define FA_RDONLY 0x01 // FILE_ATTRIBUTE_READONLY #define FA_DIREC 0x10 // FILE_ATTRIBUTE_DIRECTORY

static mode_t _zip_dos_attr2mode(zip_uint32_t attr) { mode_t m = S_IRUSR | S_IRGRP | S_IROTH; if (0 == (attr & FA_RDONLY)) m |= S_IWUSR | S_IWGRP | S_IWOTH;

if (attr & FA_DIREC) m = (S_IFDIR | (m & ~S_IFMT)) | S_IXUSR | S_IXGRP | S_IXOTH;

return m; }

fails if:

is not a valid file index in

was added in libzip 0.11.2.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

987 - Linux cli command XtAppAddWorkProc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppAddWorkProc and provides detailed information about the command XtAppAddWorkProc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppAddWorkProc.

NAME 🖥️ XtAppAddWorkProc 🖥️

Add and remove background processing procedures

SYNTAX

#include <X11/Intrinsic.h>

XtWorkProcId XtAppAddWorkProc(XtAppContext app_context, XtWorkProc proc, XtPointer client_data);

void XtRemoveWorkProc(XtWorkProcId id);

ARGUMENTS

app_context
Specifies the application context that identifies the application.

client_data
Specifies the argument that is to be passed to the specified procedure when it is called.

proc
Specifies the procedure that is to be called.

id
Specifies which work procedure to remove.

DESCRIPTION

The XtAppAddWorkProc function adds the specified work procedure for the application identified by app_context.

The XtRemoveWorkProc function explicitly removes the specified background work procedure.

SEE ALSO

XtAppNextEvent(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

988 - Linux cli command ldiv

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ldiv and provides detailed information about the command ldiv, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ldiv.

NAME 🖥️ ldiv 🖥️

compute quotient and remainder of an integer division

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
div_t div(int numerator, int denominator);
ldiv_t ldiv(long numerator, long denominator);
lldiv_t lldiv(long long numerator, long long denominator);
#include <inttypes.h>
imaxdiv_t imaxdiv(intmax_t numerator, intmax_t denominator);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

lldiv():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The div() function computes the value numerator/denominator and returns the quotient and remainder in a structure named div_t that contains two integer members (in unspecified order) named quot and rem. The quotient is rounded toward zero. The result satisfies quot*denominator+rem = numerator.

The ldiv(), lldiv(), and imaxdiv() functions do the same, dividing numbers of the indicated type and returning the result in a structure of the indicated name, in all cases with fields quot and rem of the same type as the function arguments.

RETURN VALUE

The div_t (etc.) structure.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

div(), ldiv(), lldiv(), imaxdiv()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89, C99, SVr4, 4.3BSD.

lldiv() and imaxdiv() were added in C99.

EXAMPLES

After

div_t q = div(-5, 3);

the values q.quot and q.rem are -1 and -2, respectively.

SEE ALSO

abs(3), remainder(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

989 - Linux cli command lio_listio

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lio_listio and provides detailed information about the command lio_listio, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lio_listio.

NAME 🖥️ lio_listio 🖥️

initiate a list of I/O requests

LIBRARY

Real-time library (librt, -lrt)

SYNOPSIS

#include <aio.h>
int lio_listio(int mode,
 struct aiocb *restrict const aiocb_list[restrict],
 int nitems, struct sigevent *restrict sevp);

DESCRIPTION

The lio_listio() function initiates the list of I/O operations described by the array aiocb_list.

The mode operation has one of the following values:

LIO_WAIT
The call blocks until all operations are complete. The sevp argument is ignored.

LIO_NOWAIT
The I/O operations are queued for processing and the call returns immediately. When all of the I/O operations complete, asynchronous notification occurs, as specified by the sevp argument; see sigevent(3type) for details. If sevp is NULL, no asynchronous notification occurs.

The aiocb_list argument is an array of pointers to aiocb structures that describe I/O operations. These operations are executed in an unspecified order. The nitems argument specifies the size of the array aiocb_list. Null pointers in aiocb_list are ignored.

In each control block in aiocb_list, the aio_lio_opcode field specifies the I/O operation to be initiated, as follows:

LIO_READ
Initiate a read operation. The operation is queued as for a call to aio_read(3) specifying this control block.

LIO_WRITE
Initiate a write operation. The operation is queued as for a call to aio_write(3) specifying this control block.

LIO_NOP
Ignore this control block.

The remaining fields in each control block have the same meanings as for aio_read(3) and aio_write(3). The aio_sigevent fields of each control block can be used to specify notifications for the individual I/O operations (see sigevent(7)).

RETURN VALUE

If mode is LIO_NOWAIT, lio_listio() returns 0 if all I/O operations are successfully queued. Otherwise, -1 is returned, and errno is set to indicate the error.

If mode is LIO_WAIT, lio_listio() returns 0 when all of the I/O operations have completed successfully. Otherwise, -1 is returned, and errno is set to indicate the error.

The return status from lio_listio() provides information only about the call itself, not about the individual I/O operations. One or more of the I/O operations may fail, but this does not prevent other operations completing. The status of individual I/O operations in aiocb_list can be determined using aio_error(3). When an operation has completed, its return status can be obtained using aio_return(3). Individual I/O operations can fail for the reasons described in aio_read(3) and aio_write(3).

ERRORS

The lio_listio() function may fail for the following reasons:

EAGAIN
Out of resources.

EAGAIN
The number of I/O operations specified by nitems would cause the limit AIO_MAX to be exceeded.

EINTR
mode was LIO_WAIT and a signal was caught before all I/O operations completed; see signal(7). (This may even be one of the signals used for asynchronous I/O completion notification.)

EINVAL
mode is invalid, or nitems exceeds the limit AIO_LISTIO_MAX.

EIO
One of more of the operations specified by aiocb_list failed. The application can check the status of each operation using aio_return(3).

If lio_listio() fails with the error EAGAIN, EINTR, or EIO, then some of the operations in aiocb_list may have been initiated. If lio_listio() fails for any other reason, then none of the I/O operations has been initiated.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

lio_listio()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.1. POSIX.1-2001.

NOTES

It is a good idea to zero out the control blocks before use. The control blocks must not be changed while the I/O operations are in progress. The buffer areas being read into or written from must not be accessed during the operations or undefined results may occur. The memory areas involved must remain valid.

Simultaneous I/O operations specifying the same aiocb structure produce undefined results.

SEE ALSO

aio_cancel(3), aio_error(3), aio_fsync(3), aio_return(3), aio_suspend(3), aio_write(3), aio(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

990 - Linux cli command URI_datapm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command URI_datapm and provides detailed information about the command URI_datapm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the URI_datapm.

NAME 🖥️ URI_datapm 🖥️

URI that contains immediate data

SYNOPSIS

use URI; $u = URI->new(“data:”); $u->media_type(“image/gif”); $u->data(scalar(`cat camel.gif`)); print “$u “; open(XV, “|xv -”) and print XV $u->data;

DESCRIPTION

The URI::data class supports URI objects belonging to the data URI scheme. The data URI scheme is specified in RFC 2397. It allows inclusion of small data items as “immediate” data, as if it had been included externally. Examples:

data:,Perl%20is%20good data:image/gif;base64,R0lGODdhIAAgAIAAAAAAAPj8+CwAAAAAI AAgAAAClYyPqcu9AJyCjtIKc5w5xP14xgeO2tlY3nWcajmZZdeJcG Kxrmimms1KMTa1Wg8UROx4MNUq1HrycMjHT9b6xKxaFLM6VRKzI+p KS9XtXpcbdun6uWVxJXA8pNPkdkkxhxc21LZHFOgD2KMoQXa2KMWI JtnE2KizVUkYJVZZ1nczBxXlFopZBtoJ2diXGdNUymmJdFMAADs=

URI objects belonging to the data scheme support the common methods (described in URI) and the following two scheme-specific methods:

$uri->media_type( [$new_media_type] )
Can be used to get or set the media type specified in the URI. If no media type is specified, then the default "text/plain;charset=US-ASCII" is returned.

$uri->data( [$new_data] )
Can be used to get or set the data contained in the URI. The data is passed unescaped (in binary form). The decision about whether to base64 encode the data in the URI is taken automatically, based on the encoding that produces the shorter URI string.

SEE ALSO

URI

COPYRIGHT

Copyright 1995-1998 Gisle Aas.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

991 - Linux cli command qfcvt

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command qfcvt and provides detailed information about the command qfcvt, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the qfcvt.

NAME 🖥️ qfcvt 🖥️

convert a floating-point number to a string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
[[deprecated]] char *qecvt(long double number, int ndigits,
 int *restrict decpt, int *restrict sign);
[[deprecated]] char *qfcvt(long double number, int ndigits,
 int *restrict decpt, int *restrict sign);
[[deprecated]] char *qgcvt(long double number, int ndigit, char *buf);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

qecvt(), qfcvt(), qgcvt():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    In glibc up to and including 2.19:
        _SVID_SOURCE

DESCRIPTION

The functions qecvt(), qfcvt(), and qgcvt() are identical to ecvt(3), fcvt(3), and gcvt(3) respectively, except that they use a long double argument number. See ecvt(3) and gcvt(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

qecvt()

Thread safetyMT-Unsafe race:qecvt

qfcvt()

Thread safetyMT-Unsafe race:qfcvt

qgcvt()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

SVr4, SunOS, GNU.

These functions are obsolete. Instead, snprintf(3) is recommended.

SEE ALSO

ecvt(3), ecvt_r(3), gcvt(3), sprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

992 - Linux cli command SLIST_NEXT

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SLIST_NEXT and provides detailed information about the command SLIST_NEXT, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SLIST_NEXT.

NAME 🖥️ SLIST_NEXT 🖥️

implementation of a singly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
SLIST_ENTRY(TYPE);
SLIST_HEAD(HEADNAME, TYPE);
SLIST_HEAD SLIST_HEAD_INITIALIZER(SLIST_HEAD head);
void SLIST_INIT(SLIST_HEAD *head);
int SLIST_EMPTY(SLIST_HEAD *head);
void SLIST_INSERT_HEAD(SLIST_HEAD *head,
 struct TYPE *elm, SLIST_ENTRY NAME);
void SLIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, SLIST_ENTRY NAME);
struct TYPE *SLIST_FIRST(SLIST_HEAD *head);
struct TYPE *SLIST_NEXT(struct TYPE *elm, SLIST_ENTRY NAME);
SLIST_FOREACH(struct TYPE *var, SLIST_HEAD *head, SLIST_ENTRY NAME);
void SLIST_REMOVE(SLIST_HEAD *head, struct TYPE *elm,
 SLIST_ENTRY NAME);
void SLIST_REMOVE_HEAD(SLIST_HEAD *head,
 SLIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on singly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type SLIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro SLIST_HEAD().

Creation

A singly linked list is headed by a structure defined by the SLIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the list after an existing element or at the head of the list. An SLIST_HEAD structure is declared as follows:

SLIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

SLIST_ENTRY() declares a structure that connects the elements in the list.

SLIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

SLIST_INIT() initializes the list referenced by head.

SLIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

SLIST_INSERT_HEAD() inserts the new element elm at the head of the list.

SLIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

SLIST_FIRST() returns the first element in the list, or NULL if the list is empty.

SLIST_NEXT() returns the next element in the list.

SLIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

SLIST_REMOVE() removes the element elm from the list.

SLIST_REMOVE_HEAD() removes the element elm from the head of the list. For optimum efficiency, elements being removed from the head of the list should explicitly use this macro instead of the generic SLIST_REMOVE().

RETURN VALUE

SLIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

SLIST_FIRST(), and SLIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

SLIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

SLIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. SLIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    SLIST_ENTRY(entry) entries;             /* Singly linked list */
};
SLIST_HEAD(slisthead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct slisthead head;                  /* Singly linked list
                                               head */
    SLIST_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    SLIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    SLIST_INSERT_AFTER(n1, n2, entries);
    SLIST_REMOVE(&head, n2, entry, entries);/* Deletion */
    free(n2);
    n3 = SLIST_FIRST(&head);
    SLIST_REMOVE_HEAD(&head, entries);      /* Deletion from the head */
    free(n3);
    for (unsigned int i = 0; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        SLIST_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    SLIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); while (!SLIST_EMPTY(&head)) { /* List deletion */ n1 = SLIST_FIRST(&head); SLIST_REMOVE_HEAD(&head, entries); free(n1); } SLIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

993 - Linux cli command Mail_Sendpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Mail_Sendpm and provides detailed information about the command Mail_Sendpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Mail_Sendpm.

NAME 🖥️ Mail_Sendpm 🖥️

Simple electronic mail interface

SYNOPSIS

require Mail::Send; $msg = Mail::Send->new; $msg = Mail::Send->new(Subject => example, To => timbo); $msg->to(user@host); $msg->to(user@host, [email protected]); $msg->subject(example subject); $msg->cc(user@host); $msg->bcc(someone@else); $msg->set($header, @values); $msg->add($header, @values); $msg->delete($header); # Launch mailer and set headers. The filehandle returned # by open() is an instance of the Mail::Mailer class. # Arguments to the open() method are passed to the Mail::Mailer # constructor. $fh = $msg->open; # some default mailer $fh = $msg->open(sendmail); # explicit print $fh “Body of message”; $fh->close # complete the message and send it or die “couldnt send whole message: $! “;

DESCRIPTION

Mail::Send creates e-mail messages without using the Mail::Header knowledge, which means that all escaping and folding must be done by you! Also: do not forget to escape leading dots. Simplicity has its price.

When you have time, take a look at Mail::Transport which is part of the MailBox suite.

METHODS

Constructors

Mail::Send->new(PAIRS)
A list of header fields (provided as key-value PAIRS) can be used to initialize the object, limited to the few provided as method: to, subject, cc, and bcc. For other header fields, use add().

Header fields

$obj->add($fieldname, @values)
Add values to the list of defined values for the $fieldname.

$obj->bcc(@values)

$obj->cc(@values)

$obj->delete($fieldname)

$obj->set($fieldname, @values)

The @values will replace the old values for the $fieldname. Returned is the LIST of values after modification.

$obj->subject(@values)

$obj->to(@values)

Sending

$obj->open(%options)
The %options are used to initiate a mailer object via Mail::Mailer::new(). Then Mail::Mailer::open() is called with the knowledge collected in this Mail::Send object. Be warned: this module implements raw smtp, which means that you have to escape lines which start with a dot, by adding one in front.

SEE ALSO

This module is part of the MailTools distribution, http://perl.overmeer.net/mailtools/.

AUTHORS

The MailTools bundle was developed by Graham Barr. Later, Mark Overmeer took over maintenance without commitment to further development.

Mail::Cap by Gisle Aas <[email protected]>. Mail::Field::AddrList by Peter Orbaek <[email protected]>. Mail::Mailer and Mail::Send by Tim Bunce <[email protected]>. For other contributors see ChangeLog.

LICENSE

Copyrights 1995-2000 Graham Barr <[email protected]> and 2001-2017 Mark Overmeer <[email protected]>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

994 - Linux cli command Spreadsheet_WriteExcel_Examplespm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_WriteExcel_Examplespm and provides detailed information about the command Spreadsheet_WriteExcel_Examplespm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_WriteExcel_Examplespm.

NAME 🖥️ Spreadsheet_WriteExcel_Examplespm 🖥️

Spreadsheet::WriteExcel example programs.

DESCRIPTION

This is a documentation only module showing the examples that are included in the Spreadsheet::WriteExcel distribution.

This file was auto-generated via the gen_examples_pod.pl program that is also included in the examples directory.

Example programs

The following is a list of the 85 example programs that are included in the Spreadsheet::WriteExcel distribution.

  • Example: a_simple.pl A get started example with some basic features.

  • Example: demo.pl A demo of some of the available features.

  • Example: regions.pl A simple example of multiple worksheets.

  • Example: stats.pl Basic formulas and functions.

  • Example: formats.pl All the available formatting on several worksheets.

  • Example: bug_report.pl A template for submitting bug reports.

  • Example: autofilter.pl Examples of worksheet autofilters.

  • Example: autofit.pl Simulate Excel’s autofit for column widths.

  • Example: bigfile.pl Write past the 7MB limit with OLE::Storage_Lite.

  • Example: cgi.pl A simple CGI program.

  • Example: chart_area.pl A demo of area style charts.

  • Example: chart_bar.pl A demo of bar (vertical histogram) style charts.

  • Example: chart_column.pl A demo of column (histogram) style charts.

  • Example: chart_line.pl A demo of line style charts.

  • Example: chart_pie.pl A demo of pie style charts.

  • Example: chart_scatter.pl A demo of scatter style charts.

  • Example: chart_stock.pl A demo of stock style charts.

  • Example: chess.pl An example of reusing formatting via properties.

  • Example: colors.pl A demo of the colour palette and named colours.

  • Example: comments1.pl Add comments to worksheet cells.

  • Example: comments2.pl Add comments with advanced options.

  • Example: copyformat.pl Example of copying a cell format.

  • Example: data_validate.pl An example of data validation and dropdown lists.

  • Example: date_time.pl Write dates and times with write_date_time().

  • Example: defined_name.pl Example of how to create defined names.

  • Example: diag_border.pl A simple example of diagonal cell borders.

  • Example: easter_egg.pl Expose the Excel97 flight simulator.

  • Example: filehandle.pl Examples of working with filehandles.

  • Example: formula_result.pl Formulas with user specified results.

  • Example: headers.pl Examples of worksheet headers and footers.

  • Example: hide_sheet.pl Simple example of hiding a worksheet.

  • Example: hyperlink1.pl Shows how to create web hyperlinks.

  • Example: hyperlink2.pl Examples of internal and external hyperlinks.

  • Example: images.pl Adding images to worksheets.

  • Example: indent.pl An example of cell indentation.

  • Example: merge1.pl A simple example of cell merging.

  • Example: merge2.pl A simple example of cell merging with formatting.

  • Example: merge3.pl Add hyperlinks to merged cells.

  • Example: merge4.pl An advanced example of merging with formatting.

  • Example: merge5.pl An advanced example of merging with formatting.

  • Example: merge6.pl An example of merging with Unicode strings.

  • Example: mod_perl1.pl A simple mod_perl 1 program.

  • Example: mod_perl2.pl A simple mod_perl 2 program.

  • Example: outline.pl An example of outlines and grouping.

  • Example: outline_collapsed.pl An example of collapsed outlines.

  • Example: panes.pl An examples of how to create panes.

  • Example: properties.pl Add document properties to a workbook.

  • Example: protection.pl Example of cell locking and formula hiding.

  • Example: repeat.pl Example of writing repeated formulas.

  • Example: right_to_left.pl Change default sheet direction to right to left.

  • Example: row_wrap.pl How to wrap data from one worksheet onto another.

  • Example: sales.pl An example of a simple sales spreadsheet.

  • Example: sendmail.pl Send an Excel email attachment using Mail::Sender.

  • Example: stats_ext.pl Same as stats.pl with external references.

  • Example: stocks.pl Demonstrates conditional formatting.

  • Example: tab_colors.pl Example of how to set worksheet tab colours.

  • Example: textwrap.pl Demonstrates text wrapping options.

  • Example: win32ole.pl A sample Win32::OLE example for comparison.

  • Example: write_arrays.pl Example of writing 1D or 2D arrays of data.

  • Example: write_handler1.pl Example of extending the write() method. Step 1.

  • Example: write_handler2.pl Example of extending the write() method. Step 2.

  • Example: write_handler3.pl Example of extending the write() method. Step 3.

  • Example: write_handler4.pl Example of extending the write() method. Step 4.

  • Example: write_to_scalar.pl Example of writing an Excel file to a Perl scalar.

  • Example: unicode_utf16.pl Simple example of using Unicode UTF16 strings.

  • Example: unicode_utf16_japan.pl Write Japanese Unicode strings using UTF-16.

  • Example: unicode_cyrillic.pl Write Russian Cyrillic strings using UTF-8.

  • Example: unicode_list.pl List the chars in a Unicode font.

  • Example: unicode_2022_jp.pl Japanese: ISO-2022-JP to utf8 in perl 5.8.

  • Example: unicode_8859_11.pl Thai: ISO-8859_11 to utf8 in perl 5.8.

  • Example: unicode_8859_7.pl Greek: ISO-8859_7 to utf8 in perl 5.8.

  • Example: unicode_big5.pl Chinese: BIG5 to utf8 in perl 5.8.

  • Example: unicode_cp1251.pl Russian: CP1251 to utf8 in perl 5.8.

  • Example: unicode_cp1256.pl Arabic: CP1256 to utf8 in perl 5.8.

  • Example: unicode_koi8r.pl Russian: KOI8-R to utf8 in perl 5.8.

  • Example: unicode_polish_utf8.pl Polish : UTF8 to utf8 in perl 5.8.

  • Example: unicode_shift_jis.pl Japanese: Shift JIS to utf8 in perl 5.8.

  • Example: csv2xls.pl Program to convert a CSV file to an Excel file.

  • Example: tab2xls.pl Program to convert a tab separated file to xls.

  • Example: datecalc1.pl Convert Unix/Perl time to Excel time.

  • Example: datecalc2.pl Calculate an Excel date using Date::Calc.

  • Example: lecxe.pl Convert Excel to WriteExcel using Win32::OLE.

  • Example: convertA1.pl Helper functions for dealing with A1 notation.

  • Example: function_locale.pl Add non-English function names to Formula.pm.

  • Example: writeA1.pl Example of how to extend the module.

Example: a_simple.pl

A simple example of how to use the Spreadsheet::WriteExcel module to write some text and numbers to an Excel binary file.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # A simple example of how to use the Spreadsheet::WriteExcel module to write # some text and numbers to an Excel binary file. # # reverse((c)), March 2001, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; # Create a new workbook called simple.xls and add a worksheet my $workbook = Spreadsheet::WriteExcel->new(a_simple.xls); my $worksheet = $workbook->add_worksheet(); # The general syntax is write($row, $column, $token). Note that row and # column are zero indexed # # Write some text $worksheet->write(0, 0, “Hi Excel!”); # Write some numbers $worksheet->write(2, 0, 3); # Writes 3 $worksheet->write(3, 0, 3.00000); # Writes 3 $worksheet->write(4, 0, 3.00001); # Writes 3.00001 $worksheet->write(5, 0, 3.14159); # TeX revision no.? # Write some formulas $worksheet->write(7, 0, =A3 + A6); $worksheet->write(8, 0, =IF(A5>3,“Yes”, “No”)); # Write a hyperlink $worksheet->write(10, 0, http://www.perl.com/); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/a_simple.pl>

Example: demo.pl

A simple demo of some of the features of Spreadsheet::WriteExcel.

This program is used to create the project screenshot for Freshmeat: <http://freshmeat.net/projects/writeexcel/>

Source code for this example:

#!/usr/bin/perl -w ####################################################################### # # A simple demo of some of the features of Spreadsheet::WriteExcel. # # This program is used to create the project screenshot for Freshmeat: # L<http://freshmeat.net/projects/writeexcel/> # # reverse((c)), October 2001, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“demo.xls”); my $worksheet = $workbook->add_worksheet(Demo); my $worksheet2 = $workbook->add_worksheet(Another sheet); my $worksheet3 = $workbook->add_worksheet(And another); my $bold = $workbook->add_format(bold => 1); ####################################################################### # # Write a general heading # $worksheet->set_column(A:A, 36, $bold); $worksheet->set_column(B:B, 20 ); $worksheet->set_row (0, 40 ); my $heading = $workbook->add_format( bold => 1, color => blue, size => 16, merge => 1, align => vcenter, ); my @headings = (Features of Spreadsheet::WriteExcel, ); $worksheet->write_row(A1, \headings, $heading); ####################################################################### # # Some text examples # my $text_format = $workbook->add_format( bold => 1, italic => 1, color => red, size => 18, font =>Lucida Calligraphy ); # A phrase in Cyrillic my $unicode = pack “H*”, “042d0442043e002004440440043004370430002004”. “3d043000200440044304410441043a043e043c0021”; $worksheet->write(A2, “Text”); $worksheet->write(B2, “Hello Excel”); $worksheet->write(A3, “Formatted text”); $worksheet->write(B3, “Hello Excel”, $text_format); $worksheet->write(A4, “Unicode text”); $worksheet->write_utf16be_string(B4, $unicode); ####################################################################### # # Some numeric examples # my $num1_format = $workbook->add_format(num_format => $#,##0.00); my $num2_format = $workbook->add_format(num_format => d mmmm yyy); $worksheet->write(A5, “Numbers”); $worksheet->write(B5, 1234.56); $worksheet->write(A6, “Formatted numbers”); $worksheet->write(B6, 1234.56, $num1_format); $worksheet->write(A7, “Formatted numbers”); $worksheet->write(B7, 37257, $num2_format); ####################################################################### # # Formulae # $worksheet->set_selection(B8); $worksheet->write(A8, Formulas and functions, “=SIN(PI()/4)”); $worksheet->write(B8, =SIN(PI()/4)); ####################################################################### # # Hyperlinks # $worksheet->write(A9, “Hyperlinks”); $worksheet->write(B9, http://www.perl.com/ ); ####################################################################### # # Images # $worksheet->write(A10, “Images”); $worksheet->insert_image(B10, republic.png, 16, 8); ####################################################################### # # Misc # $worksheet->write(A18, “Page/printer setup”); $worksheet->write(A19, “Multiple worksheets”); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/demo.pl>

Example: regions.pl

An example of how to use the Spreadsheet:WriteExcel module to write a basic Excel workbook with multiple worksheets.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # An example of how to use the Spreadsheet:WriteExcel module to write a basic # Excel workbook with multiple worksheets. # # reverse((c)), March 2001, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; # Create a new Excel workbook my $workbook = Spreadsheet::WriteExcel->new(“regions.xls”); # Add some worksheets my $north = $workbook->add_worksheet(“North”); my $south = $workbook->add_worksheet(“South”); my $east = $workbook->add_worksheet(“East”); my $west = $workbook->add_worksheet(“West”); # Add a Format my $format = $workbook->add_format(); $format->set_bold(); $format->set_color(blue); # Add a caption to each worksheet foreach my $worksheet ($workbook->sheets()) { $worksheet->write(0, 0, “Sales”, $format); } # Write some data $north->write(0, 1, 200000); $south->write(0, 1, 100000); $east->write (0, 1, 150000); $west->write (0, 1, 100000); # Set the active worksheet $south->activate(); # Set the width of the first column $south->set_column(0, 0, 20); # Set the active cell $south->set_selection(0, 1);

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/regions.pl>

Example: stats.pl

A simple example of how to use functions with the Spreadsheet::WriteExcel module.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # A simple example of how to use functions with the Spreadsheet::WriteExcel # module. # # reverse((c)), March 2001, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; # Create a new workbook and add a worksheet my $workbook = Spreadsheet::WriteExcel->new(“stats.xls”); my $worksheet = $workbook->add_worksheet(Test data); # Set the column width for columns 1 $worksheet->set_column(0, 0, 20); # Create a format for the headings my $format = $workbook->add_format(); $format->set_bold(); # Write the sample data $worksheet->write(0, 0, Sample, $format); $worksheet->write(0, 1, 1); $worksheet->write(0, 2, 2); $worksheet->write(0, 3, 3); $worksheet->write(0, 4, 4); $worksheet->write(0, 5, 5); $worksheet->write(0, 6, 6); $worksheet->write(0, 7, 7); $worksheet->write(0, 8, 8); $worksheet->write(1, 0, Length, $format); $worksheet->write(1, 1, 25.4); $worksheet->write(1, 2, 25.4); $worksheet->write(1, 3, 24.8); $worksheet->write(1, 4, 25.0); $worksheet->write(1, 5, 25.3); $worksheet->write(1, 6, 24.9); $worksheet->write(1, 7, 25.2); $worksheet->write(1, 8, 24.8); # Write some statistical functions $worksheet->write(4, 0, Count, $format); $worksheet->write(4, 1, =COUNT(B1:I1)); $worksheet->write(5, 0, Sum, $format); $worksheet->write(5, 1, =SUM(B2:I2)); $worksheet->write(6, 0, Average, $format); $worksheet->write(6, 1, =AVERAGE(B2:I2)); $worksheet->write(7, 0, Min, $format); $worksheet->write(7, 1, =MIN(B2:I2)); $worksheet->write(8, 0, Max, $format); $worksheet->write(8, 1, =MAX(B2:I2)); $worksheet->write(9, 0, Standard Deviation, $format); $worksheet->write(9, 1, =STDEV(B2:I2)); $worksheet->write(10, 0, Kurtosis, $format); $worksheet->write(10, 1, =KURT(B2:I2)); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/stats.pl>

Example: formats.pl

Examples of formatting using the Spreadsheet::WriteExcel module.

This program demonstrates almost all possible formatting options. It is worth running this program and viewing the output Excel file if you are interested in the various formatting possibilities.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # Examples of formatting using the Spreadsheet::WriteExcel module. # # This program demonstrates almost all possible formatting options. It is worth # running this program and viewing the output Excel file if you are interested # in the various formatting possibilities. # # reverse((c)), September 2002, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(formats.xls); # Some common formats my $center = $workbook->add_format(align => center); my $heading = $workbook->add_format(align => center, bold => 1); # The named colors my %colors = ( 0x08, black, 0x0C, blue, 0x10, brown, 0x0F, cyan, 0x17, gray, 0x11, green, 0x0B, lime, 0x0E, magenta, 0x12, navy, 0x35, orange, 0x21, pink, 0x14, purple, 0x0A, red, 0x16, silver, 0x09, white, 0x0D, yellow, ); # Call these subroutines to demonstrate different formatting options intro(); fonts(); named_colors(); standard_colors(); numeric_formats(); borders(); patterns(); alignment(); misc(); # Note: this is required $workbook->close(); ###################################################################### # # Intro. # sub intro { my $worksheet = $workbook->add_worksheet(Introduction); $worksheet->set_column(0, 0, 60); my $format = $workbook->add_format(); $format->set_bold(); $format->set_size(14); $format->set_color(blue); $format->set_align(center); my $format2 = $workbook->add_format(); $format2->set_bold(); $format2->set_color(blue); $worksheet->write(2, 0, This workbook demonstrates some of, $format); $worksheet->write(3, 0, the formatting options provided by, $format); $worksheet->write(4, 0, the Spreadsheet::WriteExcel module., $format); $worksheet->write(A7, Sections:, $format2); $worksheet->write(A8, “internal:Fonts!A1”, Fonts ); $worksheet->write(A9, “internal:Named colors!A1”, Named colors ); $worksheet->write(A10, “internal:Standard colors!A1”, Standard colors); $worksheet->write(A11, “internal:Numeric formats!A1”, Numeric formats); $worksheet->write(A12, “internal:Borders!A1”, Borders ); $worksheet->write(A13, “internal:Patterns!A1”, Patterns ); $worksheet->write(A14, “internal:Alignment!A1”, Alignment ); $worksheet->write(A15, “internal:Miscellaneous!A1”, Miscellaneous ); } ###################################################################### # # Demonstrate the named colors. # sub named_colors { my $worksheet = $workbook->add_worksheet(Named colors); $worksheet->set_column(0, 3, 15); $worksheet->write(0, 0, “Index”, $heading); $worksheet->write(0, 1, “Index”, $heading); $worksheet->write(0, 2, “Name”, $heading); $worksheet->write(0, 3, “Color”, $heading); my $i = 1; while (my($index, $color) = each %colors) { my $format = $workbook->add_format( bg_color => $color, pattern => 1, border => 1 ); $worksheet->write($i+1, 0, $index, $center); $worksheet->write($i+1, 1, sprintf(“0x%02X”, $index), $center); $worksheet->write($i+1, 2, $color, $center); $worksheet->write($i+1, 3, , $format); $i++; } } ###################################################################### # # Demonstrate the standard Excel colors in the range 8..63. # sub standard_colors { my $worksheet = $workbook->add_worksheet(Standard colors); $worksheet->set_column(0, 3, 15); $worksheet->write(0, 0, “Index”, $heading); $worksheet->write(0, 1, “Index”, $heading); $worksheet->write(0, 2, “Color”, $heading); $worksheet->write(0, 3, “Name”, $heading); for my $i (8..63) { my $format = $workbook->add_format( bg_color => $i, pattern => 1, border => 1 ); $worksheet->write(($i -7), 0, $i, $center); $worksheet->write(($i -7), 1, sprintf(“0x%02X”, $i), $center); $worksheet->write(($i -7), 2, , $format); # Add the color names if (exists $colors{$i}) { $worksheet->write(($i -7), 3, $colors{$i}, $center); } } } ###################################################################### # # Demonstrate the standard numeric formats. # sub numeric_formats { my $worksheet = $workbook->add_worksheet(Numeric formats); $worksheet->set_column(0, 4, 15); $worksheet->set_column(5, 5, 45); $worksheet->write(0, 0, “Index”, $heading); $worksheet->write(0, 1, “Index”, $heading); $worksheet->write(0, 2, “Unformatted”, $heading); $worksheet->write(0, 3, “Formatted”, $heading); $worksheet->write(0, 4, “Negative”, $heading); $worksheet->write(0, 5, “Format”, $heading); my @formats; push @formats, [ 0x00, 1234.567, 0, General ]; push @formats, [ 0x01, 1234.567, 0, 0 ]; push @formats, [ 0x02, 1234.567, 0, 0.00 ]; push @formats, [ 0x03, 1234.567, 0, #,##0 ]; push @formats, [ 0x04, 1234.567, 0, #,##0.00 ]; push @formats, [ 0x05, 1234.567, -1234.567, ($#,##0_);($#,##0) ]; push @formats, [ 0x06, 1234.567, -1234.567, ($#,##0_);[Red]($#,##0) ]; push @formats, [ 0x07, 1234.567, -1234.567, ($#,##0.00_);($#,##0.00) ]; push @formats, [ 0x08, 1234.567, -1234.567, ($#,##0.00_);[Red]($#,##0.00) ]; push @formats, [ 0x09, 0.567, 0, 0% ]; push @formats, [ 0x0a, 0.567, 0, 0.00% ]; push @formats, [ 0x0b, 1234.567, 0, 0.00E+00 ]; push @formats, [ 0x0c, 0.75, 0, # ?/? ]; push @formats, [ 0x0d, 0.3125, 0, # ??/?? ]; push @formats, [ 0x0e, 36892.521, 0, m/d/yy ]; push @formats, [ 0x0f, 36892.521, 0, d-mmm-yy ]; push @formats, [ 0x10, 36892.521, 0, d-mmm ]; push @formats, [ 0x11, 36892.521, 0, mmm-yy ]; push @formats, [ 0x12, 36892.521, 0, h:mm AM/PM ]; push @formats, [ 0x13, 36892.521, 0, h:mm:ss AM/PM ]; push @formats, [ 0x14, 36892.521, 0, h:mm ]; push @formats, [ 0x15, 36892.521, 0, h:mm:ss ]; push @formats, [ 0x16, 36892.521, 0, m/d/yy h:mm ]; push @formats, [ 0x25, 1234.567, -1234.567, (#,##0_);(#,##0) ]; push @formats, [ 0x26, 1234.567, -1234.567, (#,##0_);[Red](#,##0) ]; push @formats, [ 0x27, 1234.567, -1234.567, (#,##0.00_);(#,##0.00) ]; push @formats, [ 0x28, 1234.567, -1234.567, (#,##0.00_);[Red](#,##0.00) ]; push @formats, [ 0x29, 1234.567, -1234.567, _(* #,##0_);_(* (#,##0);_(* “-”_);_(@_) ]; push @formats, [ 0x2a, 1234.567, -1234.567, _($* #,##0_);_($* (#,##0);_($* “-”_);_(@_) ]; push @formats, [ 0x2b, 1234.567, -1234.567, _(* #,##0.00_);_(* (#,##0.00);_(* “-”??_);_(@_) ]; push @formats, [ 0x2c, 1234.567, -1234.567, _($* #,##0.00_);_($* (#,##0.00);_($* “-”??_);_(@_) ]; push @formats, [ 0x2d, 36892.521, 0, mm:ss ]; push @formats, [ 0x2e, 3.0153, 0, [h]:mm:ss ]; push @formats, [ 0x2f, 36892.521, 0, mm:ss.0 ]; push @formats, [ 0x30, 1234.567, 0, ##0.0E+0 ]; push @formats, [ 0x31, 1234.567, 0, @ ]; my $i; foreach my $format (@formats){ my $style = $workbook->add_format(); $style->set_num_format($format->[0]); $i++; $worksheet->write($i, 0, $format->[0], $center); $worksheet->write($i, 1, sprintf(“0x%02X”, $format->[0]), $center); $worksheet->write($i, 2, $format->[1], $center); $worksheet->write($i, 3, $format->[1], $style); if ($format->[2]) { $worksheet->write($i, 4, $format->[2], $style); } $worksheet->write_string($i, 5, $format->[3]); } } ###################################################################### # # Demonstrate the font options. # sub fonts { my $worksheet = $workbook->add_worksheet(Fonts); $worksheet->set_column(0, 0, 30); $worksheet->set_column(1, 1, 10); $worksheet->write(0, 0, “Font name”, $heading); $worksheet->write(0, 1, “Font size”, $heading); my @fonts; push @fonts, [ 10, Arial ]; push @fonts, [ 12, Arial ]; push @fonts, [ 14, Arial ]; push @fonts, [ 12, Arial Black ]; push @fonts, [ 12, Arial Narrow ]; push @fonts, [ 12, Century Schoolbook ]; push @fonts, [ 12, Courier ]; push @fonts, [ 12, Courier New ]; push @fonts, [ 12, Garamond ]; push @fonts, [ 12, Impact ]; push @fonts, [ 12, Lucida Handwriting] ; push @fonts, [ 12, Times New Roman ]; push @fonts, [ 12, Symbol ]; push @fonts, [ 12, Wingdings ]; push @fonts, [ 12, A font that doesn exist ]; my $i; foreach my $font (@fonts){ my $format = $workbook->add_format(); $format->set_size($font->[0]); $format->set_font($font->[1]); $i++; $worksheet->write($i, 0, $font->[1], $format); $worksheet->write($i, 1, $font->[0], $format); } } ###################################################################### # # Demonstrate the standard Excel border styles. # sub borders { my $worksheet = $workbook->add_worksheet(Borders); $worksheet->set_column(0, 4, 10); $worksheet->set_column(5, 5, 40); $worksheet->write(0, 0, “Index”, $heading); $worksheet->write(0, 1, “Index”, $heading); $worksheet->write(0, 3, “Style”, $heading); $worksheet->write(0, 5, “The style is highlighted in red for “, $heading); $worksheet->write(1, 5, “emphasis, the default color is black.”, $heading); for my $i (0..13){ my $format = $workbook->add_format(); $format->set_border($i); $format->set_border_color(red); $format->set_align(center); $worksheet->write((2*($i+1)), 0, $i, $center); $worksheet->write((2*($i+1)), 1, sprintf(“0x%02X”, $i), $center); $worksheet->write((2*($i+1)), 3, “Border”, $format); } $worksheet->write(30, 0, “Diag type”, $heading); $worksheet->write(30, 1, “Index”, $heading); $worksheet->write(30, 3, “Style”, $heading); $worksheet->write(30, 5, “Diagonal Boder styles”, $heading); for my $i (1..3){ my $format = $workbook->add_format(); $format->set_diag_type($i); $format->set_diag_border(1); $format->set_diag_color(red); $format->set_align(center); $worksheet->write((2*($i+15)), 0, $i, $center); $worksheet->write((2*($i+15)), 1, sprintf(“0x%02X”, $i), $center); $worksheet->write((2*($i+15)), 3, “Border”, $format); } } ###################################################################### # # Demonstrate the standard Excel cell patterns. # sub patterns { my $worksheet = $workbook->add_worksheet(Patterns); $worksheet->set_column(0, 4, 10); $worksheet->set_column(5, 5, 50); $worksheet->write(0, 0, “Index”, $heading); $worksheet->write(0, 1, “Index”, $heading); $worksheet->write(0, 3, “Pattern”, $heading); $worksheet->write(0, 5, “The background colour has been set to silver.”, $heading); $worksheet->write(1, 5, “The foreground colour has been set to green.”, $heading); for my $i (0..18){ my $format = $workbook->add_format(); $format->set_pattern($i); $format->set_bg_color(silver); $format->set_fg_color(green); $format->set_align(center); $worksheet->write((2*($i+1)), 0, $i, $center); $worksheet->write((2*($i+1)), 1, sprintf(“0x%02X”, $i), $center); $worksheet->write((2*($i+1)), 3, “Pattern”, $format); if ($i == 1) { $worksheet->write((2*($i+1)), 5, “This is solid colour, the most useful pattern.”, $heading); } } } ###################################################################### # # Demonstrate the standard Excel cell alignments. # sub alignment { my $worksheet = $workbook->add_worksheet(Alignment); $worksheet->set_column(0, 7, 12); $worksheet->set_row(0, 40); $worksheet->set_selection(7, 0); my $format01 = $workbook->add_format(); my $format02 = $workbook->add_format(); my $format03 = $workbook->add_format(); my $format04 = $workbook->add_format(); my $format05 = $workbook->add_format(); my $format06 = $workbook->add_format(); my $format07 = $workbook->add_format(); my $format08 = $workbook->add_format(); my $format09 = $workbook->add_format(); my $format10 = $workbook->add_format(); my $format11 = $workbook->add_format(); my $format12 = $workbook->add_format(); my $format13 = $workbook->add_format(); my $format14 = $workbook->add_format(); my $format15 = $workbook->add_format(); my $format16 = $workbook->add_format(); my $format17 = $workbook->add_format(); $format02->set_align(top); $format03->set_align(bottom); $format04->set_align(vcenter); $format05->set_align(vjustify); $format06->set_text_wrap(); $format07->set_align(left); $format08->set_align(right); $format09->set_align(center); $format10->set_align(fill); $format11->set_align(justify); $format12->set_merge(); $format13->set_rotation(45); $format14->set_rotation(-45); $format15->set_rotation(270); $format16->set_shrink(); $format17->set_indent(1); $worksheet->write(0, 0, Vertical, $heading); $worksheet->write(0, 1, top, $format02); $worksheet->write(0, 2, bottom, $format03); $worksheet->write(0, 3, vcenter, $format04); $worksheet->write(0, 4, vjustify, $format05); $worksheet->write(0, 5, “text wrap”, $format06); $worksheet->write(2, 0, Horizontal, $heading); $worksheet->write(2, 1, left, $format07); $worksheet->write(2, 2, right, $format08); $worksheet->write(2, 3, center, $format09); $worksheet->write(2, 4, fill, $format10); $worksheet->write(2, 5, justify, $format11); $worksheet->write(3, 1, merge, $format12); $worksheet->write(3, 2, , $format12); $worksheet->write(3, 3, Shrink x 3, $format16); $worksheet->write(3, 4, Indent, $format17); $worksheet->write(5, 0, Rotation, $heading); $worksheet->write(5, 1, Rotate 45, $format13); $worksheet->write(6, 1, Rotate -45, $format14); $worksheet->write(7, 1, Rotate 270, $format15); } ###################################################################### # # Demonstrate other miscellaneous features. # sub misc { my $worksheet = $workbook->add_worksheet(Miscellaneous); $worksheet->set_column(2, 2, 25); my $format01 = $workbook->add_format(); my $format02 = $workbook->add_format(); my $format03 = $workbook->add_format(); my $format04 = $workbook->add_format(); my $format05 = $workbook->add_format(); my $format06 = $workbook->add_format(); my $format07 = $workbook->add_format(); $format01->set_underline(0x01); $format02->set_underline(0x02); $format03->set_underline(0x21); $format04->set_underline(0x22); $format05->set_font_strikeout(); $format06->set_font_outline(); $format07->set_font_shadow(); $worksheet->write(1, 2, Underline 0x01, $format01); $worksheet->write(3, 2, Underline 0x02, $format02); $worksheet->write(5, 2, Underline 0x21, $format03); $worksheet->write(7, 2, Underline 0x22, $format04); $worksheet->write(9, 2, Strikeout, $format05); $worksheet->write(11, 2, Outline (Macintosh only), $format06); $worksheet->write(13, 2, Shadow (Macintosh only), $format07); } _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/formats.pl>

Example: bug_report.pl

A template for submitting a bug report.

Run this program and read the output from the command line.

#!/usr/bin/perl -w ############################################################################### # # A template for submitting a bug report. # # Run this program and read the output from the command line. # # reverse((c)), March 2004, John McNamara, [email protected] # use strict; print << HINTS_1; REPORTING A BUG OR ASKING A QUESTION Feel free to report bugs or ask questions. However, to save time consider the following steps first: Read the documentation: The Spreadsheet::WriteExcel documentation has been refined in response to user questions. Therefore, if you have a question it is possible that someone else has asked it before you and that it is already addressed in the documentation. Since there is a lot of documentation to get through you should at least read the table of contents and search for keywords that you are interested in. Look at the example programs: There are over 70 example programs shipped with the standard Spreadsheet::WriteExcel distribution. Many of these were created in response to user questions. Try to identify an example program that corresponds to your query and adapt it to your needs. HINTS_1 print “Press enter …”; <STDIN>; print << HINTS_2; If you submit a bug report here are some pointers. 1. Put “WriteExcel:” at the beginning of the subject line. This helps to filter genuine messages from spam. 2. Describe the problems as clearly and as concisely as possible. 3. Send a sample program. It is often easier to describe a problem in code than in written prose. 4. The sample program should be as small as possible to demonstrate the problem. Dont copy and past large sections of your program. The program should also be self contained and working. A sample bug report is generated below. If you use this format then it will help to analyse your question and respond to it more quickly. Please dont send patches without contacting the author first. HINTS_2 print “Press enter …”; <STDIN>; print << EMAIL; ======================================================================= To: John McNamara <[email protected]> Subject: WriteExcel: Problem with something. Hi John, I am using Spreadsheet::WriteExcel and I have encountered a problem. I want it to do SOMETHING but the module appears to do SOMETHING_ELSE. Here is some code that demonstrates the problem. #!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“reload.xls”); my $worksheet = $workbook->add_worksheet(); $worksheet->write(0, 0, “Hi Excel!”); _ _END_ _ I tested using Excel XX (or Gnumeric or OpenOffice.org). My automatically generated system details are as follows: EMAIL print " Perl version : $]”; print " OS name : $^O”; print " Module versions: (not all are required) “; my @modules = qw( Spreadsheet::WriteExcel Spreadsheet::ParseExcel OLE::Storage_Lite Parse::RecDescent File::Temp Digest::MD4 Digest::Perl::MD4 Digest::MD5 ); for my $module (@modules) { my $version; eval “require $module”; if (not $@) { $version = $module->VERSION; $version = (unknown) if not defined $version; } else { $version = (not installed); } printf “%21s%-24s %s “, “”, $module, $version; } print << “BYE”; Yours etc., A. Person – BYE _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/bug_report.pl>

Example: autofilter.pl

An example of how to create autofilters with Spreadsheet::WriteExcel.

An autofilter is a way of adding drop down lists to the headers of a 2D range of worksheet data. This is turn allow users to filter the data based on simple criteria so that some data is shown and some is hidden.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # An example of how to create autofilters with Spreadsheet::WriteExcel. # # An autofilter is a way of adding drop down lists to the headers of a 2D range # of worksheet data. This is turn allow users to filter the data based on # simple criteria so that some data is shown and some is hidden. # # reverse((c)), September 2007, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(autofilter.xls); die “Couldnt create new Excel file: $!. " unless defined $workbook; my $worksheet1 = $workbook->add_worksheet(); my $worksheet2 = $workbook->add_worksheet(); my $worksheet3 = $workbook->add_worksheet(); my $worksheet4 = $workbook->add_worksheet(); my $worksheet5 = $workbook->add_worksheet(); my $worksheet6 = $workbook->add_worksheet(); my $bold = $workbook->add_format(bold => 1); # Extract the data embedded at the end of this file. my @headings = split , <DATA>; my @data; push @data, [split] while <DATA>; # Set up several sheets with the same data. for my $worksheet ($workbook->sheets()) { $worksheet->set_column(A:D, 12); $worksheet->set_row(0, 20, $bold); $worksheet->write(A1, \headings); } ############################################################################### # # Example 1. Autofilter without conditions. # $worksheet1->autofilter(A1:D51); $worksheet1->write(A2, [[@data]]); ############################################################################### # # # Example 2. Autofilter with a filter condition in the first column. # # The range in this example is the same as above but in row-column notation. $worksheet2->autofilter(0, 0, 50, 3); # The placeholder “Region” in the filter is ignored and can be any string # that adds clarity to the expression. # $worksheet2->filter_column(0, Region eq East); # # Hide the rows that dont match the filter criteria. # my $row = 1; for my $row_data (@data) { my $region = $row_data->[0]; if ($region eq East) { # Row is visible. } else { # Hide row. $worksheet2->set_row($row, undef, undef, 1); } $worksheet2->write($row++, 0, $row_data); } ############################################################################### # # # Example 3. Autofilter with a dual filter condition in one of the columns. # $worksheet3->autofilter(A1:D51); $worksheet3->filter_column(A, x eq East or x eq South); # # Hide the rows that dont match the filter criteria. # $row = 1; for my $row_data (@data) { my $region = $row_data->[0]; if ($region eq East or $region eq South) { # Row is visible. } else { # Hide row. $worksheet3->set_row($row, undef, undef, 1); } $worksheet3->write($row++, 0, $row_data); } ############################################################################### # # # Example 4. Autofilter with filter conditions in two columns. # $worksheet4->autofilter(A1:D51); $worksheet4->filter_column(A, x eq East); $worksheet4->filter_column(C, x > 3000 and x < 8000 ); # # Hide the rows that dont match the filter criteria. # $row = 1; for my $row_data (@data) { my $region = $row_data->[0]; my $volume = $row_data->[2]; if ($region eq East and $volume > 3000 and $volume < 8000 ) { # Row is visible. } else { # Hide row. $worksheet4->set_row($row, undef, undef, 1); } $worksheet4->write($row++, 0, $row_data); } ############################################################################### # # # Example 5. Autofilter with filter for blanks. # # Create a blank cell in our test data. $data[5]->[0] = ; $worksheet5->autofilter(A1:D51); $worksheet5->filter_column(A, x == Blanks); # # Hide the rows that dont match the filter criteria. # $row = 1; for my $row_data (@data) { my $region = $row_data->[0]; if ($region eq ) { # Row is visible. } else { # Hide row. $worksheet5->set_row($row, undef, undef, 1); } $worksheet5->write($row++, 0, $row_data); } ############################################################################### # # # Example 6. Autofilter with filter for non-blanks. # $worksheet6->autofilter(A1:D51); $worksheet6->filter_column(A, x == NonBlanks); # # Hide the rows that dont match the filter criteria. # $row = 1; for my $row_data (@data) { my $region = $row_data->[0]; if ($region ne ) { # Row is visible. } else { # Hide row. $worksheet6->set_row($row, undef, undef, 1); } $worksheet6->write($row++, 0, $row_data); } _ _DATA_ _ Region Item Volume Month East Apple 9000 July East Apple 5000 July South Orange 9000 September North Apple 2000 November West Apple 9000 November South Pear 7000 October North Pear 9000 August West Orange 1000 December West Grape 1000 November South Pear 10000 April West Grape 6000 January South Orange 3000 May North Apple 3000 December South Apple 7000 February West Grape 1000 December East Grape 8000 February South Grape 10000 June West Pear 7000 December South Apple 2000 October East Grape 7000 December North Grape 6000 April East Pear 8000 February North Apple 7000 August North Orange 7000 July North Apple 6000 June South Grape 8000 September West Apple 3000 October South Orange 10000 November West Grape 4000 July North Orange 5000 August East Orange 1000 November East Orange 4000 October North Grape 5000 August East Apple 1000 December South Apple 10000 March East Grape 7000 October West Grape 1000 September East Grape 10000 October South Orange 8000 March North Apple 4000 July South Orange 5000 July West Apple 4000 June East Apple 5000 April North Pear 3000 August East Grape 9000 November North Orange 8000 October East Apple 10000 June South Pear 1000 December North Grape 10000 July East Grape 6000 February

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/autofilter.pl>

Example: autofit.pl

Simulate Excel’s autofit for column widths.

Excel provides a function called Autofit (Format->Columns->Autofit) that adjusts column widths to match the length of the longest string in a column. Excel calculates these widths at run time when it has access to information about string lengths and font information. This function is *not* a feature of the file format and thus cannot be implemented by Spreadsheet::WriteExcel.

However, we can make an attempt to simulate it by keeping track of the longest string written to each column and then adjusting the column widths prior to closing the file.

We keep track of the longest strings by adding a handler to the write() function. See add_handler() in the S::WE docs for more information.

The main problem with trying to simulate Autofit lies in defining a relationship between a string length and its width in a arbitrary font and size. We use two approaches below. The first is a simple direct relationship obtained by trial and error. The second is a slightly more sophisticated method using an external module. For more complicated applications you will probably have to work out your own methods.

Source code for this example:

#!/usr/bin/perl -w ############################################################################## # # Simulate Excels autofit for column widths. # # Excel provides a function called Autofit (Format->Columns->Autofit) that # adjusts column widths to match the length of the longest string in a column. # Excel calculates these widths at run time when it has access to information # about string lengths and font information. This function is *not* a feature # of the file format and thus cannot be implemented by Spreadsheet::WriteExcel. # # However, we can make an attempt to simulate it by keeping track of the # longest string written to each column and then adjusting the column widths # prior to closing the file. # # We keep track of the longest strings by adding a handler to the write() # function. See add_handler() in the S::WE docs for more information. # # The main problem with trying to simulate Autofit lies in defining a # relationship between a string length and its width in a arbitrary font and # size. We use two approaches below. The first is a simple direct relationship # obtained by trial and error. The second is a slightly more sophisticated # method using an external module. For more complicated applications you will # probably have to work out your own methods. # # reverse((c)), May 2006, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(autofit.xls); my $worksheet = $workbook->add_worksheet(); ############################################################################### # # Add a handler to store the width of the longest string written to a column. # We use the stored width to simulate an autofit of the column widths. # # You should do this for every worksheet you want to autofit. # $worksheet->add_write_handler(qr[\w], \store_string_widths); $worksheet->write(A1, Hello); $worksheet->write(B1, Hello World); $worksheet->write(D1, Hello); $worksheet->write(F1, This is a long string as an example.); # Run the autofit after you have finished writing strings to the workbook. autofit_columns($worksheet); ############################################################################### # # Functions used for Autofit. # ############################################################################### ############################################################################### # # Adjust the column widths to fit the longest string in the column. # sub autofit_columns { my $worksheet = shift; my $col = 0; for my $width (@{$worksheet->{_ _col_widths}}) { $worksheet->set_column($col, $col, $width) if $width; $col++; } } ############################################################################### # # The following function is a callback that was added via add_write_handler() # above. It modifies the write() function so that it stores the maximum # unwrapped width of a string in a column. # sub store_string_widths { my $worksheet = shift; my $col = $_[1]; my $token = $_[2]; # Ignore some tokens that we arent interested in. return if not defined $token; # Ignore undefs. return if $token eq ; # Ignore blank cells. return if ref $token eq ARRAY; # Ignore array refs. return if $token =~ /^=/; # Ignore formula # Ignore numbers return if $token =~ /^([+-]?)(?=\d|\d)\d*(\d*)?([Ee]([+-]?\d+))?$/; # Ignore various internal and external hyperlinks. In a real scenario # you may wish to track the length of the optional strings used with # urls. return if $token =~ m{^[fh]tt?ps?://}; return if $token =~ m{^mailto:}; return if $token =~ m{^(?:in|ex)ternal:}; # We store the string width as data in the Worksheet object. We use # a double underscore key name to avoid conflicts with future names. # my $old_width = $worksheet->{_ _col_widths}->[$col]; my $string_width = string_width($token); if (not defined $old_width or $string_width > $old_width) { # You may wish to set a minimum column width as follows. #return undef if $string_width < 10; $worksheet->{_ _col_widths}->[$col] = $string_width; } # Return control to write(); return undef; } ############################################################################### # # Very simple conversion between string length and string width for Arial 10. # See below for a more sophisticated method. # sub string_width { return 0.9 * length $_[0]; } _ _END_ _ ############################################################################### # # This function uses an external module to get a more accurate width for a # string. Note that in a real program you could “use” the module instead of # “require”-ing it and you could make the Font object global to avoid repeated # initialisation. # # Note also that the $pixel_width to $cell_width is specific to Arial. For # other fonts you should calculate appropriate relationships. A future version # of S::WE will provide a way of specifying column widths in pixels instead of # cell units in order to simplify this conversion. # sub string_width { require Font::TTFMetrics; my $arial = Font::TTFMetrics->new(c:\windows ontsrial.ttf); my $font_size = 10; my $dpi = 96; my $units_per_em = $arial->get_units_per_em(); my $font_width = $arial->string_width($_[0]); # Convert to pixels as per TTFMetrics docs. my $pixel_width = 6 + $font_width *$font_size *$dpi /(72 *$units_per_em); # Add extra pixels for border around text. $pixel_width += 6; # Convert to cell width (for Arial) and for cell widths > 1. my $cell_width = ($pixel_width -5) /7; return $cell_width; } _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/autofit.pl>

Example: bigfile.pl

Example of creating a Spreadsheet::WriteExcel that is larger than the default 7MB limit.

This is exactly that same as any other Spreadsheet::WriteExcel program except that is requires that the OLE::Storage module is installed.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # Example of creating a Spreadsheet::WriteExcel that is larger than the # default 7MB limit. # # This is exactly that same as any other Spreadsheet::WriteExcel program except # that is requires that the OLE::Storage module is installed. # # reverse((c)), Jan 2007, John McNamara, [email protected] use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(bigfile.xls); my $worksheet = $workbook->add_worksheet(); $worksheet->set_column(0, 50, 18); for my $col (0 .. 50) { for my $row (0 .. 6000) { $worksheet->write($row, $col, “Row: $row Col: $col”); } } _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/bigfile.pl>

Example: cgi.pl

Example of how to use the Spreadsheet::WriteExcel module to send an Excel file to a browser in a CGI program.

On Windows the hash-bang line should be something like:

#!C:\Perlin\perl.exe

The Content-Disposition line will cause a prompt to be generated to save the file. If you want to stream the file to the browser instead, comment out that line as shown below.

#!/usr/bin/perl -w ############################################################################### # # Example of how to use the Spreadsheet::WriteExcel module to send an Excel # file to a browser in a CGI program. # # On Windows the hash-bang line should be something like: # # #!C:\Perlin\perl.exe # # The “Content-Disposition” line will cause a prompt to be generated to save # the file. If you want to stream the file to the browser instead, comment out # that line as shown below. # # reverse((c)), March 2001, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; # Set the filename and send the content type my $filename =“cgitest.xls”; print “Content-type: application/vnd.ms-excel “; # The Content-Disposition will generate a prompt to save the file. If you want # to stream the file to the browser, comment out the following line. print “Content-Disposition: attachment; filename=$filename “; print " “; # Create a new workbook and add a worksheet. The special Perl filehandle - will # redirect the output to STDOUT # my $workbook = Spreadsheet::WriteExcel->new(\STDOUT); my $worksheet = $workbook->add_worksheet(); # Set the column width for column 1 $worksheet->set_column(0, 0, 20); # Create a format my $format = $workbook->add_format(); $format->set_bold(); $format->set_size(15); $format->set_color(blue); # Write to the workbook $worksheet->write(0, 0, “Hi Excel!”, $format); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/cgi.pl>

Example: chart_area.pl

A simple demo of Area charts in Spreadsheet::WriteExcel.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # A simple demo of Area charts in Spreadsheet::WriteExcel. # # reverse((c)), December 2009, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( chart_area.xls ); my $worksheet = $workbook->add_worksheet(); my $bold = $workbook->add_format( bold => 1 ); # Add the worksheet data that the charts will refer to. my $headings = [ Category, Values 1, Values 2 ]; my $data = [ [ 2, 3, 4, 5, 6, 7 ], [ 1, 4, 5, 2, 1, 5 ], [ 3, 6, 7, 5, 4, 3 ], ]; $worksheet->write( A1, $headings, $bold ); $worksheet->write( A2, $data ); ############################################################################### # # Example 1. A minimal chart. # my $chart1 = $workbook->add_chart( type => area ); # Add values only. Use the default categories. $chart1->add_series( values => =Sheet1!$B$2:$B$7 ); ############################################################################### # # Example 2. A minimal chart with user specified categories (X axis) # and a series name. # my $chart2 = $workbook->add_chart( type => area ); # Configure the series. $chart2->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, name => Test data series 1, ); ############################################################################### # # Example 3. Same as previous chart but with added title and axes labels. # my $chart3 = $workbook->add_chart( type => area ); # Configure the series. $chart3->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, name => Test data series 1, ); # Add some labels. $chart3->set_title( name => Results of sample analysis ); $chart3->set_x_axis( name => Sample number ); $chart3->set_y_axis( name => Sample length (cm) ); ############################################################################### # # Example 4. Same as previous chart but with an added series and with a # user specified chart sheet name. # my $chart4 = $workbook->add_chart( name => Results Chart, type => area ); # Configure the series. $chart4->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, name => Test data series 1, ); # Add another series. $chart4->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$C$2:$C$7, name => Test data series 2, ); # Add some labels. $chart4->set_title( name => Results of sample analysis ); $chart4->set_x_axis( name => Sample number ); $chart4->set_y_axis( name => Sample length (cm) ); ############################################################################### # # Example 5. Same as Example 3 but as an embedded chart. # my $chart5 = $workbook->add_chart( type => area, embedded => 1 ); # Configure the series. $chart5->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, name => Test data series 1, ); # Add some labels. $chart5->set_title( name => Results of sample analysis ); $chart5->set_x_axis( name => Sample number ); $chart5->set_y_axis( name => Sample length (cm) ); # Insert the chart into the main worksheet. $worksheet->insert_chart( E2, $chart5 ); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/chart_area.pl>

Example: chart_bar.pl

A simple demo of Bar charts in Spreadsheet::WriteExcel.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # A simple demo of Bar charts in Spreadsheet::WriteExcel. # # reverse((c)), December 2009, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( chart_bar.xls ); my $worksheet = $workbook->add_worksheet(); my $bold = $workbook->add_format( bold => 1 ); # Add the worksheet data that the charts will refer to. my $headings = [ Category, Values 1, Values 2 ]; my $data = [ [ 2, 3, 4, 5, 6, 7 ], [ 1, 4, 5, 2, 1, 5 ], [ 3, 6, 7, 5, 4, 3 ], ]; $worksheet->write( A1, $headings, $bold ); $worksheet->write( A2, $data ); ############################################################################### # # Example 1. A minimal chart. # my $chart1 = $workbook->add_chart( type => bar ); # Add values only. Use the default categories. $chart1->add_series( values => =Sheet1!$B$2:$B$7 ); ############################################################################### # # Example 2. A minimal chart with user specified categories (X axis) # and a series name. # my $chart2 = $workbook->add_chart( type => bar ); # Configure the series. $chart2->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, name => Test data series 1, ); ############################################################################### # # Example 3. Same as previous chart but with added title and axes labels. # my $chart3 = $workbook->add_chart( type => bar ); # Configure the series. $chart3->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, name => Test data series 1, ); # Add some labels. $chart3->set_title( name => Results of sample analysis ); $chart3->set_x_axis( name => Sample number ); $chart3->set_y_axis( name => Sample length (cm) ); ############################################################################### # # Example 4. Same as previous chart but with an added series and with a # user specified chart sheet name. # my $chart4 = $workbook->add_chart( name => Results Chart, type => bar ); # Configure the series. $chart4->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, name => Test data series 1, ); # Add another series. $chart4->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$C$2:$C$7, name => Test data series 2, ); # Add some labels. $chart4->set_title( name => Results of sample analysis ); $chart4->set_x_axis( name => Sample number ); $chart4->set_y_axis( name => Sample length (cm) ); ############################################################################### # # Example 5. Same as Example 3 but as an embedded chart. # my $chart5 = $workbook->add_chart( type => bar, embedded => 1 ); # Configure the series. $chart5->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, name => Test data series 1, ); # Add some labels. $chart5->set_title( name => Results of sample analysis ); $chart5->set_x_axis( name => Sample number ); $chart5->set_y_axis( name => Sample length (cm) ); # Insert the chart into the main worksheet. $worksheet->insert_chart( E2, $chart5 ); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/chart_bar.pl>

Example: chart_column.pl

A simple demo of Column charts in Spreadsheet::WriteExcel.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # A simple demo of Column charts in Spreadsheet::WriteExcel. # # reverse((c)), December 2009, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( chart_column.xls ); my $worksheet = $workbook->add_worksheet(); my $bold = $workbook->add_format( bold => 1 ); # Add the worksheet data that the charts will refer to. my $headings = [ Category, Values 1, Values 2 ]; my $data = [ [ 2, 3, 4, 5, 6, 7 ], [ 1, 4, 5, 2, 1, 5 ], [ 3, 6, 7, 5, 4, 3 ], ]; $worksheet->write( A1, $headings, $bold ); $worksheet->write( A2, $data ); ############################################################################### # # Example 1. A minimal chart. # my $chart1 = $workbook->add_chart( type => column ); # Add values only. Use the default categories. $chart1->add_series( values => =Sheet1!$B$2:$B$7 ); ############################################################################### # # Example 2. A minimal chart with user specified categories (X axis) # and a series name. # my $chart2 = $workbook->add_chart( type => column ); # Configure the series. $chart2->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, name => Test data series 1, ); ############################################################################### # # Example 3. Same as previous chart but with added title and axes labels. # my $chart3 = $workbook->add_chart( type => column ); # Configure the series. $chart3->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, name => Test data series 1, ); # Add some labels. $chart3->set_title( name => Results of sample analysis ); $chart3->set_x_axis( name => Sample number ); $chart3->set_y_axis( name => Sample length (cm) ); ############################################################################### # # Example 4. Same as previous chart but with an added series and with a # user specified chart sheet name. # my $chart4 = $workbook->add_chart( name => Results Chart, type => column ); # Configure the series. $chart4->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, name => Test data series 1, ); # Add another series. $chart4->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$C$2:$C$7, name => Test data series 2, ); # Add some labels. $chart4->set_title( name => Results of sample analysis ); $chart4->set_x_axis( name => Sample number ); $chart4->set_y_axis( name => Sample length (cm) ); ############################################################################### # # Example 5. Same as Example 3 but as an embedded chart. # my $chart5 = $workbook->add_chart( type => column, embedded => 1 ); # Configure the series. $chart5->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, name => Test data series 1, ); # Add some labels. $chart5->set_title( name => Results of sample analysis ); $chart5->set_x_axis( name => Sample number ); $chart5->set_y_axis( name => Sample length (cm) ); # Insert the chart into the main worksheet. $worksheet->insert_chart( E2, $chart5 ); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/chart_column.pl>

Example: chart_line.pl

A simple demo of Line charts in Spreadsheet::WriteExcel.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # A simple demo of Line charts in Spreadsheet::WriteExcel. # # reverse((c)), December 2009, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( chart_line.xls ); my $worksheet = $workbook->add_worksheet(); my $bold = $workbook->add_format( bold => 1 ); # Add the worksheet data that the charts will refer to. my $headings = [ Category, Values 1, Values 2 ]; my $data = [ [ 2, 3, 4, 5, 6, 7 ], [ 1, 4, 5, 2, 1, 5 ], [ 3, 6, 7, 5, 4, 3 ], ]; $worksheet->write( A1, $headings, $bold ); $worksheet->write( A2, $data ); ############################################################################### # # Example 1. A minimal chart. # my $chart1 = $workbook->add_chart( type => line ); # Add values only. Use the default categories. $chart1->add_series( values => =Sheet1!$B$2:$B$7 ); ############################################################################### # # Example 2. A minimal chart with user specified categories (X axis) # and a series name. # my $chart2 = $workbook->add_chart( type => line ); # Configure the series. $chart2->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, name => Test data series 1, ); ############################################################################### # # Example 3. Same as previous chart but with added title and axes labels. # my $chart3 = $workbook->add_chart( type => line ); # Configure the series. $chart3->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, name => Test data series 1, ); # Add some labels. $chart3->set_title( name => Results of sample analysis ); $chart3->set_x_axis( name => Sample number ); $chart3->set_y_axis( name => Sample length (cm) ); ############################################################################### # # Example 4. Same as previous chart but with an added series and with a # user specified chart sheet name. # my $chart4 = $workbook->add_chart( name => Results Chart, type => line ); # Configure the series. $chart4->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, name => Test data series 1, ); # Add another series. $chart4->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$C$2:$C$7, name => Test data series 2, ); # Add some labels. $chart4->set_title( name => Results of sample analysis ); $chart4->set_x_axis( name => Sample number ); $chart4->set_y_axis( name => Sample length (cm) ); ############################################################################### # # Example 5. Same as Example 3 but as an embedded chart. # my $chart5 = $workbook->add_chart( type => line, embedded => 1 ); # Configure the series. $chart5->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, name => Test data series 1, ); # Add some labels. $chart5->set_title( name => Results of sample analysis ); $chart5->set_x_axis( name => Sample number ); $chart5->set_y_axis( name => Sample length (cm) ); # Insert the chart into the main worksheet. $worksheet->insert_chart( E2, $chart5 ); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/chart_line.pl>

Example: chart_pie.pl

A simple demo of Pie charts in Spreadsheet::WriteExcel.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # A simple demo of Pie charts in Spreadsheet::WriteExcel. # # reverse((c)), December 2009, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( chart_pie.xls ); my $worksheet = $workbook->add_worksheet(); my $bold = $workbook->add_format( bold => 1 ); # Add the worksheet data that the charts will refer to. my $headings = [ Category, Values ]; my $data = [ [ Apple, Cherry, Pecan ], [ 60, 30, 10 ], ]; $worksheet->write( A1, $headings, $bold ); $worksheet->write( A2, $data ); ############################################################################### # # Example 1. A minimal chart. # my $chart1 = $workbook->add_chart( type => pie ); # Add values only. Use the default categories. $chart1->add_series( values => =Sheet1!$B$2:$B$4 ); ############################################################################### # # Example 2. A minimal chart with user specified categories and a series name. # my $chart2 = $workbook->add_chart( type => pie ); # Configure the series. $chart2->add_series( categories => =Sheet1!$A$2:$A$4, values => =Sheet1!$B$2:$B$4, name => Pie sales data, ); ############################################################################### # # Example 3. Same as previous chart but with an added title. # my $chart3 = $workbook->add_chart( type => pie ); # Configure the series. $chart3->add_series( categories => =Sheet1!$A$2:$A$4, values => =Sheet1!$B$2:$B$4, name => Pie sales data, ); # Add a title. $chart3->set_title( name => Popular Pie Types ); ############################################################################### # # Example 4. Same as previous chart with a user specified chart sheet name. # my $chart4 = $workbook->add_chart( name => Results Chart, type => pie ); # Configure the series. $chart4->add_series( categories => =Sheet1!$A$2:$A$4, values => =Sheet1!$B$2:$B$4, name => Pie sales data, ); # The other chart_*.pl examples add a second series in example 4 but additional # series arent plotted in a pie chart. # Add a title. $chart4->set_title( name => Popular Pie Types ); ############################################################################### # # Example 5. Same as Example 3 but as an embedded chart. # my $chart5 = $workbook->add_chart( type => pie, embedded => 1 ); # Configure the series. $chart5->add_series( categories => =Sheet1!$A$2:$A$4, values => =Sheet1!$B$2:$B$4, name => Pie sales data, ); # Add a title. $chart5->set_title( name => Popular Pie Types ); # Insert the chart into the main worksheet. $worksheet->insert_chart( D2, $chart5 ); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/chart_pie.pl>

Example: chart_scatter.pl

A simple demo of Scatter charts in Spreadsheet::WriteExcel.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # A simple demo of Scatter charts in Spreadsheet::WriteExcel. # # reverse((c)), December 2009, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( chart_scatter.xls ); my $worksheet = $workbook->add_worksheet(); my $bold = $workbook->add_format( bold => 1 ); # Add the worksheet data that the charts will refer to. my $headings = [ Category, Values 1, Values 2 ]; my $data = [ [ 2, 3, 4, 5, 6, 7 ], [ 1, 4, 5, 2, 1, 5 ], [ 3, 6, 7, 5, 4, 3 ], ]; $worksheet->write( A1, $headings, $bold ); $worksheet->write( A2, $data ); ############################################################################### # # Example 1. A minimal chart. # my $chart1 = $workbook->add_chart( type => scatter ); # Add values only. Use the default categories. $chart1->add_series( values => =Sheet1!$B$2:$B$7 ); ############################################################################### # # Example 2. A minimal chart with user specified categories (X axis) # and a series name. # my $chart2 = $workbook->add_chart( type => scatter ); # Configure the series. $chart2->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, name => Test data series 1, ); ############################################################################### # # Example 3. Same as previous chart but with added title and axes labels. # my $chart3 = $workbook->add_chart( type => scatter ); # Configure the series. $chart3->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, name => Test data series 1, ); # Add some labels. $chart3->set_title( name => Results of sample analysis ); $chart3->set_x_axis( name => Sample number ); $chart3->set_y_axis( name => Sample length (cm) ); ############################################################################### # # Example 4. Same as previous chart but with an added series and with a # user specified chart sheet name. # my $chart4 = $workbook->add_chart( name => Results Chart, type => scatter ); # Configure the series. $chart4->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, name => Test data series 1, ); # Add another series. $chart4->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$C$2:$C$7, name => Test data series 2, ); # Add some labels. $chart4->set_title( name => Results of sample analysis ); $chart4->set_x_axis( name => Sample number ); $chart4->set_y_axis( name => Sample length (cm) ); ############################################################################### # # Example 5. Same as Example 3 but as an embedded chart. # my $chart5 = $workbook->add_chart( type => scatter, embedded => 1 ); # Configure the series. $chart5->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, name => Test data series 1, ); # Add some labels. $chart5->set_title( name => Results of sample analysis ); $chart5->set_x_axis( name => Sample number ); $chart5->set_y_axis( name => Sample length (cm) ); # Insert the chart into the main worksheet. $worksheet->insert_chart( E2, $chart5 ); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/chart_scatter.pl>

Example: chart_stock.pl

A simple demo of Stock charts in Spreadsheet::WriteExcel.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # A simple demo of Stock charts in Spreadsheet::WriteExcel. # # reverse((c)), January 2010, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( chart_stock.xls ); my $worksheet = $workbook->add_worksheet(); ############################################################################### # # Set up the data worksheet that the charts will refer to. We read the example # data from the _ _DATA_ _ section at the end of the file. This simulates # reading the data from a database or other source. # # The default Excel Stock chart is an Open-High-Low-Close chart. Therefore # we will need data for each of those series. # # The layout of the _ _DATA_ _ section is similar to the layout of the worksheet. # # Add some formats. my $bold = $workbook->add_format( bold => 1 ); my $date_format = $workbook->add_format( num_format => dd/mm/yyyy ); # Increase the width of the column used for date to make it clearer. $worksheet->set_column( A:A, 12 ); # Read the data from the _ _DATA_ _ section at the end. In a real example this # would probably be a database query. my @stock_data; while ( <DATA> ) { next unless /\S/; # Skip blank lines. next if /^#/; # Skip comments. push @stock_data, [split]; } # Write the data to the worksheet. my $row = 0; my $col = 0; my $headers = shift @stock_data; $worksheet->write( $row++, $col, $headers, $bold ); for my $stock_data ( @stock_data ) { my @data = @$stock_data; my $date = shift @data; $worksheet->write( $row, $col, $date, $date_format ); $worksheet->write( $row, $col + 1, \data ); $row++; } ############################################################################### # # Example 1. A default Open-High-Low-Close chart with series names, axes labels # and a title. # my $chart1 = $workbook->add_chart( type => stock ); # Add a series for each of the Open-High-Low-Close columns. The categories are # the dates in the first column. $chart1->add_series( categories => =Sheet1!$A$2:$A$10, values => =Sheet1!$B$2:$B$10, name => Open, ); $chart1->add_series( categories => =Sheet1!$A$2:$A$10, values => =Sheet1!$C$2:$C$10, name => High, ); $chart1->add_series( categories => =Sheet1!$A$2:$A$10, values => =Sheet1!$D$2:$D$10, name => Low, ); $chart1->add_series( categories => =Sheet1!$A$2:$A$10, values => =Sheet1!$E$2:$E$10, name => Close, ); # Add a chart title and axes labels. $chart1->set_title( name => Open-High-Low-Close, ); $chart1->set_x_axis( name => Date, ); $chart1->set_y_axis( name => Share price, ); ############################################################################### # # Example 2. Same as the previous as an embedded chart. # my $chart2 = $workbook->add_chart( type => stock, embedded => 1 ); # Add a series for each of the Open-High-Low-Close columns. The categories are # the dates in the first column. $chart2->add_series( categories => =Sheet1!$A$2:$A$10, values => =Sheet1!$B$2:$B$10, name => Open, ); $chart2->add_series( categories => =Sheet1!$A$2:$A$10, values => =Sheet1!$C$2:$C$10, name => High, ); $chart2->add_series( categories => =Sheet1!$A$2:$A$10, values => =Sheet1!$D$2:$D$10, name => Low, ); $chart2->add_series( categories => =Sheet1!$A$2:$A$10, values => =Sheet1!$E$2:$E$10, name => Close, ); # Add a chart title and axes labels. $chart2->set_title( name => Open-High-Low-Close, ); $chart2->set_x_axis( name => Date, ); $chart2->set_y_axis( name => Share price, ); # Insert the chart into the main worksheet. $worksheet->insert_chart( G2, $chart2 ); _ _DATA_ _ # Some sample stock data used for charting. Date Open High Low Close 2009-08-19 100.00 104.06 95.96 100.34 2009-08-20 101.01 109.08 100.50 108.31 2009-08-23 110.75 113.48 109.05 109.40 2009-08-24 111.24 111.60 103.57 104.87 2009-08-25 104.96 108.00 103.88 106.00 2009-08-26 104.95 107.95 104.66 107.91 2009-08-27 108.10 108.62 105.69 106.15 2009-08-30 105.28 105.49 102.01 102.01 2009-08-31 102.30 103.71 102.16 102.37

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/chart_stock.pl>

Example: chess.pl

Example of formatting using the Spreadsheet::WriteExcel module via property hashes.

Setting format properties via hashes of values is useful when you have to deal with a large number of similar formats. Consider for example a chess board pattern with black squares, white unformatted squares and a border.

This relatively simple example requires 14 separate Format objects although there are only 5 different properties: black background, top border, bottom border, left border and right border.

Using property hashes it is possible to define these 5 sets of properties and then add them together to create the 14 Format configurations.

Source code for this example:

#!/usr/bin/perl -w ######################################################################## # # Example of formatting using the Spreadsheet::WriteExcel module via # property hashes. # # Setting format properties via hashes of values is useful when you have # to deal with a large number of similar formats. Consider for example a # chess board pattern with black squares, white unformatted squares and # a border. # # This relatively simple example requires 14 separate Format # objects although there are only 5 different properties: black # background, top border, bottom border, left border and right border. # # Using property hashes it is possible to define these 5 sets of # properties and then add them together to create the 14 Format # configurations. # # reverse((c)), July 2001, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“chess.xls”); my $worksheet = $workbook->add_worksheet(); # Some row and column formatting $worksheet->set_column(B:I, 10); for my $i (1..8) { $worksheet->set_row($i, 50); } # Define the property hashes # my %black = ( fg_color => black, pattern => 1, ); my %top = ( top => 6 ); my %bottom = ( bottom => 6 ); my %left = ( left => 6 ); my %right = ( right => 6 ); # Define the formats # my $format01 = $workbook->add_format(%top, %left ); my $format02 = $workbook->add_format(%top, %black ); my $format03 = $workbook->add_format(%top, ); my $format04 = $workbook->add_format(%top, %right, %black ); my $format05 = $workbook->add_format(%left ); my $format06 = $workbook->add_format(%black ); my $format07 = $workbook->add_format( ); my $format08 = $workbook->add_format(%right, %black ); my $format09 = $workbook->add_format(%right ); my $format10 = $workbook->add_format(%left, %black ); my $format11 = $workbook->add_format(%bottom, %left, %black ); my $format12 = $workbook->add_format(%bottom ); my $format13 = $workbook->add_format(%bottom, %black ); my $format14 = $workbook->add_format(%bottom, %right ); # Draw the pattern $worksheet->write(B2, , $format01); $worksheet->write(C2, , $format02); $worksheet->write(D2, , $format03); $worksheet->write(E2, , $format02); $worksheet->write(F2, , $format03); $worksheet->write(G2, , $format02); $worksheet->write(H2, , $format03); $worksheet->write(I2, , $format04); $worksheet->write(B3, , $format10); $worksheet->write(C3, , $format07); $worksheet->write(D3, , $format06); $worksheet->write(E3, , $format07); $worksheet->write(F3, , $format06); $worksheet->write(G3, , $format07); $worksheet->write(H3, , $format06); $worksheet->write(I3, , $format09); $worksheet->write(B4, , $format05); $worksheet->write(C4, , $format06); $worksheet->write(D4, , $format07); $worksheet->write(E4, , $format06); $worksheet->write(F4, , $format07); $worksheet->write(G4, , $format06); $worksheet->write(H4, , $format07); $worksheet->write(I4, , $format08); $worksheet->write(B5, , $format10); $worksheet->write(C5, , $format07); $worksheet->write(D5, , $format06); $worksheet->write(E5, , $format07); $worksheet->write(F5, , $format06); $worksheet->write(G5, , $format07); $worksheet->write(H5, , $format06); $worksheet->write(I5, , $format09); $worksheet->write(B6, , $format05); $worksheet->write(C6, , $format06); $worksheet->write(D6, , $format07); $worksheet->write(E6, , $format06); $worksheet->write(F6, , $format07); $worksheet->write(G6, , $format06); $worksheet->write(H6, , $format07); $worksheet->write(I6, , $format08); $worksheet->write(B7, , $format10); $worksheet->write(C7, , $format07); $worksheet->write(D7, , $format06); $worksheet->write(E7, , $format07); $worksheet->write(F7, , $format06); $worksheet->write(G7, , $format07); $worksheet->write(H7, , $format06); $worksheet->write(I7, , $format09); $worksheet->write(B8, , $format05); $worksheet->write(C8, , $format06); $worksheet->write(D8, , $format07); $worksheet->write(E8, , $format06); $worksheet->write(F8, , $format07); $worksheet->write(G8, , $format06); $worksheet->write(H8, , $format07); $worksheet->write(I8, , $format08); $worksheet->write(B9, , $format11); $worksheet->write(C9, , $format12); $worksheet->write(D9, , $format13); $worksheet->write(E9, , $format12); $worksheet->write(F9, , $format13); $worksheet->write(G9, , $format12); $worksheet->write(H9, , $format13); $worksheet->write(I9, , $format14);

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/chess.pl>

Example: colors.pl

Demonstrates Spreadsheet::WriteExcel’s named colors and the Excel color palette.

The set_custom_color() Worksheet method can be used to override one of the built-in palette values with a more suitable colour. See the main docs.

Source code for this example:

#!/usr/bin/perl -w ################################################################################ # # Demonstrates Spreadsheet::WriteExcels named colors and the Excel color # palette. # # The set_custom_color() Worksheet method can be used to override one of the # built-in palette values with a more suitable colour. See the main docs. # # reverse((c)), March 2002, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“colors.xls”); # Some common formats my $center = $workbook->add_format(align => center); my $heading = $workbook->add_format(align => center, bold => 1); ###################################################################### # # Demonstrate the named colors. # my %colors = ( 0x08, black, 0x0C, blue, 0x10, brown, 0x0F, cyan, 0x17, gray, 0x11, green, 0x0B, lime, 0x0E, magenta, 0x12, navy, 0x35, orange, 0x21, pink, 0x14, purple, 0x0A, red, 0x16, silver, 0x09, white, 0x0D, yellow, ); my $worksheet1 = $workbook->add_worksheet(Named colors); $worksheet1->set_column(0, 3, 15); $worksheet1->write(0, 0, “Index”, $heading); $worksheet1->write(0, 1, “Index”, $heading); $worksheet1->write(0, 2, “Name”, $heading); $worksheet1->write(0, 3, “Color”, $heading); my $i = 1; while (my($index, $color) = each %colors) { my $format = $workbook->add_format( fg_color => $color, pattern => 1, border => 1 ); $worksheet1->write($i+1, 0, $index, $center); $worksheet1->write($i+1, 1, sprintf(“0x%02X”, $index), $center); $worksheet1->write($i+1, 2, $color, $center); $worksheet1->write($i+1, 3, , $format); $i++; } ###################################################################### # # Demonstrate the standard Excel colors in the range 8..63. # my $worksheet2 = $workbook->add_worksheet(Standard colors); $worksheet2->set_column(0, 3, 15); $worksheet2->write(0, 0, “Index”, $heading); $worksheet2->write(0, 1, “Index”, $heading); $worksheet2->write(0, 2, “Color”, $heading); $worksheet2->write(0, 3, “Name”, $heading); for my $i (8..63) { my $format = $workbook->add_format( fg_color => $i, pattern => 1, border => 1 ); $worksheet2->write(($i -7), 0, $i, $center); $worksheet2->write(($i -7), 1, sprintf(“0x%02X”, $i), $center); $worksheet2->write(($i -7), 2, , $format); # Add the color names if (exists $colors{$i}) { $worksheet2->write(($i -7), 3, $colors{$i}, $center); } } _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/colors.pl>

Example: comments1.pl

This example demonstrates writing cell comments.

A cell comment is indicated in Excel by a small red triangle in the upper right-hand corner of the cell.

For more advanced comment options see comments2.pl.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # This example demonstrates writing cell comments. # # A cell comment is indicated in Excel by a small red triangle in the upper # right-hand corner of the cell. # # For more advanced comment options see comments2.pl. # # reverse((c)), November 2005, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“comments1.xls”); my $worksheet = $workbook->add_worksheet(); $worksheet->write (A1, Hello ); $worksheet->write_comment(A1, This is a comment); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/comments1.pl>

Example: comments2.pl

This example demonstrates writing cell comments.

A cell comment is indicated in Excel by a small red triangle in the upper right-hand corner of the cell.

Each of the worksheets demonstrates different features of cell comments.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # This example demonstrates writing cell comments. # # A cell comment is indicated in Excel by a small red triangle in the upper # right-hand corner of the cell. # # Each of the worksheets demonstrates different features of cell comments. # # reverse((c)), November 2005, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“comments2.xls”); my $text_wrap = $workbook->add_format(text_wrap => 1, valign => top); my $worksheet1 = $workbook->add_worksheet(); my $worksheet2 = $workbook->add_worksheet(); my $worksheet3 = $workbook->add_worksheet(); my $worksheet4 = $workbook->add_worksheet(); my $worksheet5 = $workbook->add_worksheet(); my $worksheet6 = $workbook->add_worksheet(); my $worksheet7 = $workbook->add_worksheet(); my $worksheet8 = $workbook->add_worksheet(); # Variables that we will use in each example. my $cell_text = ; my $comment = ; ############################################################################### # # Example 1. Demonstrates a simple cell comment without formatting and Unicode # comments encoded as UTF-16 and as UTF-8. # # Set up some formatting. $worksheet1->set_column(C:C, 25); $worksheet1->set_row(2, 50); $worksheet1->set_row(5, 50); # Simple ascii string. $cell_text = Hold the mouse over this cell to see the comment.; $comment = This is a comment.; $worksheet1->write (C3, $cell_text, $text_wrap); $worksheet1->write_comment(C3, $comment); # UTF-16 string. $cell_text = This is a UTF-16 comment.; $comment = pack “n”, 0x263a; $worksheet1->write (C6, $cell_text, $text_wrap); $worksheet1->write_comment(C6, $comment, encoding => 1); # UTF-8 string in perl 5.8. if ($] >= 5.008) { $worksheet1->set_row(8, 50); $cell_text = This is a UTF-8 string.; $comment = chr 0x263a; $worksheet1->write (C9, $cell_text, $text_wrap); $worksheet1->write_comment(C9, $comment); } ############################################################################### # # Example 2. Demonstrates visible and hidden comments. # # Set up some formatting. $worksheet2->set_column(C:C, 25); $worksheet2->set_row(2, 50); $worksheet2->set_row(5, 50); $cell_text = This cell comment is visible.; $comment = Hello.; $worksheet2->write (C3, $cell_text, $text_wrap); $worksheet2->write_comment(C3, $comment, visible => 1); $cell_text = “This cell comment isnt visible (the default).”; $comment = Hello.; $worksheet2->write (C6, $cell_text, $text_wrap); $worksheet2->write_comment(C6, $comment); ############################################################################### # # Example 3. Demonstrates visible and hidden comments set at the worksheet # level. # # Set up some formatting. $worksheet3->set_column(C:C, 25); $worksheet3->set_row(2, 50); $worksheet3->set_row(5, 50); $worksheet3->set_row(8, 50); # Make all comments on the worksheet visible. $worksheet3->show_comments(); $cell_text = This cell comment is visible, explicitly.; $comment = Hello.; $worksheet3->write (C3, $cell_text, $text_wrap); $worksheet3->write_comment(C3, $comment, visible => 1); $cell_text = This cell comment is also visible because . we used show_comments().; $comment = Hello.; $worksheet3->write (C6, $cell_text, $text_wrap); $worksheet3->write_comment(C6, $comment); $cell_text = However, we can still override it locally.; $comment = Hello.; $worksheet3->write (C9, $cell_text, $text_wrap); $worksheet3->write_comment(C9, $comment, visible => 0); ############################################################################### # # Example 4. Demonstrates changes to the comment box dimensions. # # Set up some formatting. $worksheet4->set_column(C:C, 25); $worksheet4->set_row(2, 50); $worksheet4->set_row(5, 50); $worksheet4->set_row(8, 50); $worksheet4->set_row(15, 50); $worksheet4->show_comments(); $cell_text = This cell comment is default size.; $comment = Hello.; $worksheet4->write (C3, $cell_text, $text_wrap); $worksheet4->write_comment(C3, $comment); $cell_text = This cell comment is twice as wide.; $comment = Hello.; $worksheet4->write (C6, $cell_text, $text_wrap); $worksheet4->write_comment(C6, $comment, x_scale => 2); $cell_text = This cell comment is twice as high.; $comment = Hello.; $worksheet4->write (C9, $cell_text, $text_wrap); $worksheet4->write_comment(C9, $comment, y_scale => 2); $cell_text = This cell comment is scaled in both directions.; $comment = Hello.; $worksheet4->write (C16, $cell_text, $text_wrap); $worksheet4->write_comment(C16, $comment, x_scale => 1.2, y_scale => 0.8); $cell_text = This cell comment has width and height specified in pixels.; $comment = Hello.; $worksheet4->write (C19, $cell_text, $text_wrap); $worksheet4->write_comment(C19, $comment, width => 200, height => 20); ############################################################################### # # Example 5. Demonstrates changes to the cell comment position. # $worksheet5->set_column(C:C, 25); $worksheet5->set_row(2, 50); $worksheet5->set_row(5, 50); $worksheet5->set_row(8, 50); $worksheet5->set_row(11, 50); $worksheet5->show_comments(); $cell_text = This cell comment is in the default position.; $comment = Hello.; $worksheet5->write (C3, $cell_text, $text_wrap); $worksheet5->write_comment(C3, $comment); $cell_text = This cell comment has been moved to another cell.; $comment = Hello.; $worksheet5->write (C6, $cell_text, $text_wrap); $worksheet5->write_comment(C6, $comment, start_cell => E4); $cell_text = This cell comment has been moved to another cell.; $comment = Hello.; $worksheet5->write (C9, $cell_text, $text_wrap); $worksheet5->write_comment(C9, $comment, start_row => 8, start_col => 4); $cell_text = This cell comment has been shifted within its default cell.; $comment = Hello.; $worksheet5->write (C12, $cell_text, $text_wrap); $worksheet5->write_comment(C12, $comment, x_offset => 30, y_offset => 12); ############################################################################### # # Example 6. Demonstrates changes to the comment background colour. # $worksheet6->set_column(C:C, 25); $worksheet6->set_row(2, 50); $worksheet6->set_row(5, 50); $worksheet6->set_row(8, 50); $worksheet6->show_comments(); $cell_text = This cell comment has a different colour.; $comment = Hello.; $worksheet6->write (C3, $cell_text, $text_wrap); $worksheet6->write_comment(C3, $comment, color => green); $cell_text = This cell comment has the default colour.; $comment = Hello.; $worksheet6->write (C6, $cell_text, $text_wrap); $worksheet6->write_comment(C6, $comment); $cell_text = This cell comment has a different colour.; $comment = Hello.; $worksheet6->write (C9, $cell_text, $text_wrap); $worksheet6->write_comment(C9, $comment, color => 0x35); ############################################################################### # # Example 7. Demonstrates how to set the cell comment author. # $worksheet7->set_column(C:C, 30); $worksheet7->set_row(2, 50); $worksheet7->set_row(5, 50); $worksheet7->set_row(8, 50); $worksheet7->set_row(11, 50); my $author = ; my $cell = C3; $cell_text = “Move the mouse over this cell and you will see Cell commented “. “by $author (blank) in the status bar at the bottom”; $comment = Hello.; $worksheet7->write ($cell, $cell_text, $text_wrap); $worksheet7->write_comment($cell, $comment); $author = Perl; $cell = C6; $cell_text = “Move the mouse over this cell and you will see Cell commented “. “by $author in the status bar at the bottom”; $comment = Hello.; $worksheet7->write ($cell, $cell_text, $text_wrap); $worksheet7->write_comment($cell, $comment, author => $author); $author = pack “n”, 0x20AC; # UTF-16 Euro $cell = C9; $cell_text = “Move the mouse over this cell and you will see Cell commented “. “by Euro in the status bar at the bottom”; $comment = Hello.; $worksheet7->write ($cell, $cell_text, $text_wrap); $worksheet7->write_comment($cell, $comment, author => $author, author_encoding => 1 ); # UTF-8 string in perl 5.8. if ($] >= 5.008) { $author = chr 0x20AC; $cell = C12; $cell_text = “Move the mouse over this cell and you will see Cell commented “. “by $author in the status bar at the bottom”; $comment = Hello.; $worksheet7->write ($cell, $cell_text, $text_wrap); $worksheet7->write_comment($cell, $comment, author => $author); } ############################################################################### # # Example 8. Demonstrates the need to explicitly set the row height. # # Set up some formatting. $worksheet8->set_column(C:C, 25); $worksheet8->set_row(2, 80); $worksheet8->show_comments(); $cell_text = The height of this row has been adjusted explicitly using . set_row(). The size of the comment box is adjusted . accordingly by WriteExcel.; $comment = Hello.; $worksheet8->write (C3, $cell_text, $text_wrap); $worksheet8->write_comment(C3, $comment); $cell_text = The height of this row has been adjusted by Excel due to the . text wrap property being set. Unfortunately this means that . the height of the row is unknown to WriteExcel at run time . “and thus the comment box is stretched as well.

" . Use set_row() to specify the row height explicitly to avoid . this problem.; $comment = Hello.; $worksheet8->write (C6, $cell_text, $text_wrap); $worksheet8->write_comment(C6, $comment); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/comments2.pl>

Example: copyformat.pl

Example of how to use the format copying method with Spreadsheet::WriteExcel.

This feature isn’t required very often.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # Example of how to use the format copying method with Spreadsheet::WriteExcel. # # This feature isnt required very often. # # reverse((c)), March 2001, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; # Create workbook1 my $workbook1 = Spreadsheet::WriteExcel->new(“workbook1.xls”); my $worksheet1 = $workbook1->add_worksheet(); my $format1a = $workbook1->add_format(); my $format1b = $workbook1->add_format(); # Create workbook2 my $workbook2 = Spreadsheet::WriteExcel->new(“workbook2.xls”); my $worksheet2 = $workbook2->add_worksheet(); my $format2a = $workbook2->add_format(); my $format2b = $workbook2->add_format(); # Create a global format object that isnt tied to a workbook my $global_format = Spreadsheet::WriteExcel::Format->new(); # Set the formatting $global_format->set_color(blue); $global_format->set_bold(); $global_format->set_italic(); # Create another example format $format1b->set_color(red); # Copy the global format properties to the worksheet formats $format1a->copy($global_format); $format2a->copy($global_format); # Copy a format from worksheet1 to worksheet2 $format2b->copy($format1b); # Write some output $worksheet1->write(0, 0, “Ciao”, $format1a); $worksheet1->write(1, 0, “Ciao”, $format1b); $worksheet2->write(0, 0, “Hello”, $format2a); $worksheet2->write(1, 0, “Hello”, $format2b);

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/copyformat.pl>

Example: data_validate.pl

Example of how to add data validation and dropdown lists to a Spreadsheet::WriteExcel file.

Data validation is a feature of Excel which allows you to restrict the data that a users enters in a cell and to display help and warning messages. It also allows you to restrict input to values in a drop down list.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # Example of how to add data validation and dropdown lists to a # Spreadsheet::WriteExcel file. # # Data validation is a feature of Excel which allows you to restrict the data # that a users enters in a cell and to display help and warning messages. It # also allows you to restrict input to values in a drop down list. # # reverse((c)), August 2008, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(data_validate.xls); my $worksheet = $workbook->add_worksheet(); # Add a format for the header cells. my $header_format = $workbook->add_format( border => 1, bg_color => 43, bold => 1, text_wrap => 1, valign => vcenter, indent => 1, ); # Set up layout of the worksheet. $worksheet->set_column(A:A, 64); $worksheet->set_column(B:B, 15); $worksheet->set_column(D:D, 15); $worksheet->set_row(0, 36); $worksheet->set_selection(B3); # Write the header cells and some data that will be used in the examples. my $row = 0; my $txt; my $heading1 = Some examples of data validation in Spreadsheet::WriteExcel; my $heading2 = Enter values in this column; my $heading3 = Sample Data; $worksheet->write(A1, $heading1, $header_format); $worksheet->write(B1, $heading2, $header_format); $worksheet->write(D1, $heading3, $header_format); $worksheet->write(D3, [Integers, 1, 10]); $worksheet->write(D4, [List data, open, high, close]); $worksheet->write(D5, [Formula, =AND(F5=50,G5=60), 50, 60]); # # Example 1. Limiting input to an integer in a fixed range. # $txt = Enter an integer between 1 and 10; $row += 2; $worksheet->write($row, 0, $txt); $worksheet->data_validation($row, 1, { validate => integer, criteria => between, minimum => 1, maximum => 10, }); # # Example 2. Limiting input to an integer outside a fixed range. # $txt = Enter an integer that is not between 1 and 10 (using cell references); $row += 2; $worksheet->write($row, 0, $txt); $worksheet->data_validation($row, 1, { validate => integer, criteria => not between, minimum => =E3, maximum => =F3, }); # # Example 3. Limiting input to an integer greater than a fixed value. # $txt = Enter an integer greater than 0; $row += 2; $worksheet->write($row, 0, $txt); $worksheet->data_validation($row, 1, { validate => integer, criteria => >, value => 0, }); # # Example 4. Limiting input to an integer less than a fixed value. # $txt = Enter an integer less than 10; $row += 2; $worksheet->write($row, 0, $txt); $worksheet->data_validation($row, 1, { validate => integer, criteria => <, value => 10, }); # # Example 5. Limiting input to a decimal in a fixed range. # $txt = Enter a decimal between 0.1 and 0.5; $row += 2; $worksheet->write($row, 0, $txt); $worksheet->data_validation($row, 1, { validate => decimal, criteria => between, minimum => 0.1, maximum => 0.5, }); # # Example 6. Limiting input to a value in a dropdown list. # $txt = Select a value from a drop down list; $row += 2; $worksheet->write($row, 0, $txt); $worksheet->data_validation($row, 1, { validate => list, source => [open, high, close], }); # # Example 6. Limiting input to a value in a dropdown list. # $txt = Select a value from a drop down list (using a cell range); $row += 2; $worksheet->write($row, 0, $txt); $worksheet->data_validation($row, 1, { validate => list, source => =E4:G4, }); # # Example 7. Limiting input to a date in a fixed range. # $txt = Enter a date between 1/1/2008 and 12/12/2008; $row += 2; $worksheet->write($row, 0, $txt); $worksheet->data_validation($row, 1, { validate => date, criteria => between, minimum => 2008-01-01T, maximum => 2008-12-12T, }); # # Example 8. Limiting input to a time in a fixed range. # $txt = Enter a time between 6:00 and 12:00; $row += 2; $worksheet->write($row, 0, $txt); $worksheet->data_validation($row, 1, { validate => time, criteria => between, minimum => T06:00, maximum => T12:00, }); # # Example 9. Limiting input to a string greater than a fixed length. # $txt = Enter a string longer than 3 characters; $row += 2; $worksheet->write($row, 0, $txt); $worksheet->data_validation($row, 1, { validate => length, criteria => >, value => 3, }); # # Example 10. Limiting input based on a formula. # $txt = Enter a value if the following is true “=AND(F5=50,G5=60)”; $row += 2; $worksheet->write($row, 0, $txt); $worksheet->data_validation($row, 1, { validate => custom, value => =AND(F5=50,G5=60), }); # # Example 11. Displaying and modify data validation messages. # $txt = Displays a message when you select the cell; $row += 2; $worksheet->write($row, 0, $txt); $worksheet->data_validation($row, 1, { validate => integer, criteria => between, minimum => 1, maximum => 100, input_title => Enter an integer:, input_message => between 1 and 100, }); # # Example 12. Displaying and modify data validation messages. # $txt = Display a custom error message when integer isn between 1 and 100; $row += 2; $worksheet->write($row, 0, $txt); $worksheet->data_validation($row, 1, { validate => integer, criteria => between, minimum => 1, maximum => 100, input_title => Enter an integer:, input_message => between 1 and 100, error_title => Input value is not valid!, error_message => It should be an integer between 1 and 100, }); # # Example 13. Displaying and modify data validation messages. # $txt = Display a custom information message when integer isn between 1 and 100; $row += 2; $worksheet->write($row, 0, $txt); $worksheet->data_validation($row, 1, { validate => integer, criteria => between, minimum => 1, maximum => 100, input_title => Enter an integer:, input_message => between 1 and 100, error_title => Input value is not valid!, error_message => It should be an integer between 1 and 100, error_type => information, }); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/data_validate.pl>

Example: date_time.pl

Spreadsheet::WriteExcel example of writing dates and times using the write_date_time() Worksheet method.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # Spreadsheet::WriteExcel example of writing dates and times using the # write_date_time() Worksheet method. # # reverse((c)), August 2004, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; # Create a new workbook and add a worksheet my $workbook = Spreadsheet::WriteExcel->new(“date_time.xls”); my $worksheet = $workbook->add_worksheet(); my $bold = $workbook->add_format(bold => 1); my $row = 0; # Expand the first column so that the date is visible. $worksheet->set_column(“A:B”, 30); # Write the column headers $worksheet->write(A1, Formatted date, $bold); $worksheet->write(B1, Format, $bold); # Examples date and time formats. In the output file compare how changing # the format codes change the appearance of the date. # my @date_formats = ( dd/mm/yy, mm/dd/yy, , d mm yy, dd mm yy, , dd m yy, dd mm yy, dd mmm yy, dd mmmm yy, , dd mm y, dd mm yyy, dd mm yyyy, , d mmmm yyyy, , dd/mm/yy, dd/mm/yy hh:mm, dd/mm/yy hh:mm:ss, dd/mm/yy hh:mm:ss.000, , hh:mm, hh:mm:ss, hh:mm:ss.000, ); # Write the same date and time using each of the above formats. The empty # string formats create a blank line to make the example clearer. # for my $date_format (@date_formats) { $row++; next if $date_format eq ; # Create a format for the date or time. my $format = $workbook->add_format( num_format => $date_format, align => left ); # Write the same date using different formats. $worksheet->write_date_time($row, 0, 2004-08-01T12:30:45.123, $format); $worksheet->write ($row, 1, $date_format); } # The following is an example of an invalid date. It is written as a string # instead of a number. This is also Excels default behaviour. # $row += 2; $worksheet->write_date_time($row, 0, 2004-13-01T12:30:45.123); $worksheet->write ($row, 1, Invalid date. Written as string., $bold); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/date_time.pl>

Example: defined_name.pl

Example of how to create defined names in a Spreadsheet::WriteExcel file.

This method is used to defined a name that can be used to represent a value, a single cell or a range of cells in a workbook.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # Example of how to create defined names in a Spreadsheet::WriteExcel file. # # This method is used to defined a name that can be used to represent a value, # a single cell or a range of cells in a workbook. # # reverse((c)), September 2008, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(defined_name.xls); my $worksheet1 = $workbook->add_worksheet(); my $worksheet2 = $workbook->add_worksheet(); $workbook->define_name(Exchange_rate, =0.96); $workbook->define_name(Sales, =Sheet1!$G$1:$H$10); $workbook->define_name(Sheet2!Sales, =Sheet2!$G$1:$G$10); for my $worksheet ($workbook->sheets()) { $worksheet->set_column(A:A, 45); $worksheet->write(A2, This worksheet contains some defined names,); $worksheet->write(A3, See the Insert -> Name -> Define dialog.); } $worksheet1->write(A4, =Exchange_rate); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/defined_name.pl>

Example: diag_border.pl

A simple formatting example that demonstrates how to add a diagonal cell border with Spreadsheet::WriteExcel

Source code for this example:

#!/usr/bin/perl -w ############################################################################## # # A simple formatting example that demonstrates how to add a diagonal cell # border with Spreadsheet::WriteExcel # # reverse((c)), May 2004, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(diag_border.xls); my $worksheet = $workbook->add_worksheet(); my $format1 = $workbook->add_format(diag_type => 1); my $format2 = $workbook->add_format(diag_type => 2); my $format3 = $workbook->add_format(diag_type => 3); my $format4 = $workbook->add_format( diag_type => 3, diag_border => 7, diag_color => red, ); $worksheet->write(B3, Text, $format1); $worksheet->write(B6, Text, $format2); $worksheet->write(B9, Text, $format3); $worksheet->write(B12, Text, $format4); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/diag_border.pl>

Example: easter_egg.pl

This uses the Win32::OLE module to expose the Flight Simulator easter egg in Excel 97 SR2.

#!/usr/bin/perl -w ############################################################################### # # This uses the Win32::OLE module to expose the Flight Simulator easter egg # in Excel 97 SR2. # # reverse((c)), March 2001, John McNamara, [email protected] # use strict; use Win32::OLE; my $application = Win32::OLE->new(“Excel.Application”); my $workbook = $application->Workbooks->Add; my $worksheet = $workbook->Worksheets(1); $application->{Visible} = 1; $worksheet->Range(“L97:X97”)->Select; $worksheet->Range(“M97”)->Activate; my $message = “Hold down Shift and Ctrl and click the “. “Chart Wizard icon on the toolbar.

“. “Use the mouse motion and buttons to control “. “movement. Try to find the monolith. “. “Close this dialog first.”; $application->InputBox($message);

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/easter_egg.pl>

Example: filehandle.pl

Example of using Spreadsheet::WriteExcel to write Excel files to different filehandles.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # Example of using Spreadsheet::WriteExcel to write Excel files to # different filehandles. # # reverse((c)), April 2003, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; use IO::Scalar; ############################################################################### # # Example 1. This demonstrates the standard way of creating an Excel file by # specifying a file name. # my $workbook1 = Spreadsheet::WriteExcel->new(fh_01.xls); my $worksheet1 = $workbook1->add_worksheet(); $worksheet1->write(0, 0, “Hi Excel!”); ############################################################################### # # Example 2. Write an Excel file to an existing filehandle. # open TEST, “> fh_02.xls” or die “Couldnt open file: $!”; binmode TEST; # Always do this regardless of whether the platform requires it. my $workbook2 = Spreadsheet::WriteExcel->new(\TEST); my $worksheet2 = $workbook2->add_worksheet(); $worksheet2->write(0, 0, “Hi Excel!”); ############################################################################### # # Example 3. Write an Excel file to an existing OO style filehandle. # my $fh = FileHandle->new("> fh_03.xls”) or die “Couldnt open file: $!”; binmode($fh); my $workbook3 = Spreadsheet::WriteExcel->new($fh); my $worksheet3 = $workbook3->add_worksheet(); $worksheet3->write(0, 0, “Hi Excel!”); ############################################################################### # # Example 4. Write an Excel file to a string via IO::Scalar. Please refer to # the IO::Scalar documentation for further details. # my $xls_str; tie *XLS, IO::Scalar, \xls_str; my $workbook4 = Spreadsheet::WriteExcel->new(\XLS); my $worksheet4 = $workbook4->add_worksheet(); $worksheet4->write(0, 0, “Hi Excel 4”); $workbook4->close(); # This is required before we use the scalar # The Excel file is now in $xls_str. As a demonstration, print it to a file. open TMP, “> fh_04.xls” or die “Couldnt open file: $!”; binmode TMP; print TMP $xls_str; close TMP; ############################################################################### # # Example 5. Write an Excel file to a string via IO::Scalars newer interface. # Please refer to the IO::Scalar documentation for further details. # my $xls_str2; my $fh5 = IO::Scalar->new(\xls_str2); my $workbook5 = Spreadsheet::WriteExcel->new($fh5); my $worksheet5 = $workbook5->add_worksheet(); $worksheet5->write(0, 0, “Hi Excel 5”); $workbook5->close(); # This is required before we use the scalar # The Excel file is now in $xls_str. As a demonstration, print it to a file. open TMP, “> fh_05.xls” or die “Couldnt open file: $!”; binmode TMP; print TMP $xls_str2; close TMP;

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/filehandle.pl>

Example: formula_result.pl

Example of how to write Spreadsheet::WriteExcel formulas with a user specified result.

This is generally only required when writing a spreadsheet for an application other than Excel where the formula isn’t evaluated.

Source code for this example:

#!/usr/bin/perl -w ####################################################################### # # Example of how to write Spreadsheet::WriteExcel formulas with a user # specified result. # # This is generally only required when writing a spreadsheet for an # application other than Excel where the formula isnt evaluated. # # reverse((c)), August 2005, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(formula_result.xls); my $worksheet = $workbook->add_worksheet(); my $format = $workbook->add_format(color => blue); $worksheet->write(A1, =1+2); $worksheet->write(A2, =1+2, $format, 4); $worksheet->write(A3, =“ABC”, undef, DEF); $worksheet->write(A4, =IF(A1 > 1, TRUE, FALSE), undef, TRUE); $worksheet->write(A5, =1/0, undef, #DIV/0!); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/formula_result.pl>

Example: headers.pl

This program shows several examples of how to set up headers and footers with Spreadsheet::WriteExcel.

The control characters used in the header/footer strings are:

Control Category Description ======= ======== =========== &L Justification Left &C Center &R Right &P Information Page number &N Total number of pages &D Date &T Time &F File name &A Worksheet name &fontsize Font Font size &“font,style” Font name and style &U Single underline &E Double underline &S Strikethrough &X Superscript &Y Subscript && Miscellaneous Literal ampersand &

See the main Spreadsheet::WriteExcel documentation for more information.

Source code for this example:

#!/usr/bin/perl -w ###################################################################### # # This program shows several examples of how to set up headers and # footers with Spreadsheet::WriteExcel. # # The control characters used in the header/footer strings are: # # Control Category Description # ======= ======== =========== # &L Justification Left # &C Center # &R Right # # &P Information Page number # &N Total number of pages # &D Date # &T Time # &F File name # &A Worksheet name # # &fontsize Font Font size # &“font,style” Font name and style # &U Single underline # &E Double underline # &S Strikethrough # &X Superscript # &Y Subscript # # && Miscellaneous Literal ampersand & # # See the main Spreadsheet::WriteExcel documentation for more information. # # reverse((c)), March 2002, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“headers.xls”); my $preview = “Select Print Preview to see the header and footer”; ###################################################################### # # A simple example to start # my $worksheet1 = $workbook->add_worksheet(Simple); my $header1 = &CHere is some centred text.; my $footer1 = &LHere is some left aligned text.; $worksheet1->set_header($header1); $worksheet1->set_footer($footer1); $worksheet1->set_column(A:A, 50); $worksheet1->write(A1, $preview); ###################################################################### # # This is an example of some of the header/footer variables. # my $worksheet2 = $workbook->add_worksheet(Variables); my $header2 = &LPage &P of &N. &CFilename: &F . &RSheetname: &A; my $footer2 = &LCurrent date: &D. &RCurrent time: &T; $worksheet2->set_header($header2); $worksheet2->set_footer($footer2); $worksheet2->set_column(A:A, 50); $worksheet2->write(A1, $preview); $worksheet2->write(A21, “Next sheet”); $worksheet2->set_h_pagebreaks(20); ###################################################################### # # This example shows how to use more than one font # my $worksheet3 = $workbook->add_worksheet(Mixed fonts); my $header3 = &C . &“Courier New,Bold"Hello . &“Arial,Italic"World; my $footer3 = &C . &“Symbol"e . &“Arial” = mc&X2; $worksheet3->set_header($header3); $worksheet3->set_footer($footer3); $worksheet3->set_column(A:A, 50); $worksheet3->write(A1, $preview); ###################################################################### # # Example of line wrapping # my $worksheet4 = $workbook->add_worksheet(Word wrap); my $header4 = “&CHeading 1 Heading 2 Heading 3”; $worksheet4->set_header($header4); $worksheet4->set_column(A:A, 50); $worksheet4->write(A1, $preview); ###################################################################### # # Example of inserting a literal ampersand & # my $worksheet5 = $workbook->add_worksheet(Ampersand); my $header5 = “&CCuriouser && Curiouser - Attorneys at Law”; $worksheet5->set_header($header5); $worksheet5->set_column(A:A, 50); $worksheet5->write(A1, $preview);

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/headers.pl>

Example: hide_sheet.pl

Example of how to hide a worksheet with Spreadsheet::WriteExcel.

Source code for this example:

#!/usr/bin/perl -w ####################################################################### # # Example of how to hide a worksheet with Spreadsheet::WriteExcel. # # reverse((c)), April 2005, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(hidden.xls); my $worksheet1 = $workbook->add_worksheet(); my $worksheet2 = $workbook->add_worksheet(); my $worksheet3 = $workbook->add_worksheet(); # Sheet2 wont be visible until it is unhidden in Excel. $worksheet2->hide(); $worksheet1->write(0, 0, Sheet2 is hidden); $worksheet2->write(0, 0, How did you find me?); $worksheet3->write(0, 0, Sheet2 is hidden); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/hide_sheet.pl>

Example: hyperlink1.pl

Example of how to use the WriteExcel module to write hyperlinks.

See also hyperlink2.pl for worksheet URL examples.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # Example of how to use the WriteExcel module to write hyperlinks. # # See also hyperlink2.pl for worksheet URL examples. # # reverse((c)), March 2001, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; # Create a new workbook and add a worksheet my $workbook = Spreadsheet::WriteExcel->new(“hyperlink.xls”); my $worksheet = $workbook->add_worksheet(Hyperlinks); # Format the first column $worksheet->set_column(A:A, 30); $worksheet->set_selection(B1); # Add a sample format my $format = $workbook->add_format(); $format->set_size(12); $format->set_bold(); $format->set_color(red); $format->set_underline(); # Write some hyperlinks $worksheet->write(A1, http://www.perl.com/ ); $worksheet->write(A3, http://www.perl.com/, Perl home ); $worksheet->write(A5, http://www.perl.com/, undef, $format); $worksheet->write(A7, mailto:[email protected], Mail me); # Write a URL that isnt a hyperlink $worksheet->write_string(A9, http://www.perl.com/);

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/hyperlink1.pl>

Example: hyperlink2.pl

Example of how to use the WriteExcel module to write internal and internal hyperlinks.

If you wish to run this program and follow the hyperlinks you should create the following directory structure:

C:\ – Temp –+– Europe | - Asia

See also hyperlink1.pl for web URL examples.

#!/usr/bin/perl -w ############################################################################### # # Example of how to use the WriteExcel module to write internal and internal # hyperlinks. # # If you wish to run this program and follow the hyperlinks you should create # the following directory structure: # # C:\ – Temp –+– Europe # | # - Asia # # # See also hyperlink1.pl for web URL examples. # # reverse((c)), February 2002, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; # Create three workbooks: # C:\Tempurope\Ireland.xls # C:\Tempurope\Italy.xls # C:\Temp\Asia\China.xls # my $ireland = Spreadsheet::WriteExcel->new(C:\Tempurope\Ireland.xls); my $ire_links = $ireland->add_worksheet(Links); my $ire_sales = $ireland->add_worksheet(Sales); my $ire_data = $ireland->add_worksheet(Product Data); my $italy = Spreadsheet::WriteExcel->new(C:\Tempurope\Italy.xls); my $ita_links = $italy->add_worksheet(Links); my $ita_sales = $italy->add_worksheet(Sales); my $ita_data = $italy->add_worksheet(Product Data); my $china = Spreadsheet::WriteExcel->new(C:\Temp\Asia\China.xls); my $cha_links = $china->add_worksheet(Links); my $cha_sales = $china->add_worksheet(Sales); my $cha_data = $china->add_worksheet(Product Data); # Add a format my $format = $ireland->add_format(color => green, bold => 1); $ire_links->set_column(A:B, 25); ############################################################################### # # Examples of internal links # $ire_links->write(A1, Internal links, $format); # Internal link $ire_links->write(A2, internal:Sales!A2); # Internal link to a range $ire_links->write(A3, internal:Sales!A3:D3); # Internal link with an alternative string $ire_links->write(A4, internal:Sales!A4, Link); # Internal link with a format $ire_links->write(A5, internal:Sales!A5, $format); # Internal link with an alternative string and format $ire_links->write(A6, internal:Sales!A6, Link, $format); # Internal link (spaces in worksheet name) $ire_links->write(A7, q{internal:Product Data!A7}); ############################################################################### # # Examples of external links # $ire_links->write(B1, External links, $format); # External link to a local file $ire_links->write(B2, external:Italy.xls); # External link to a local file with worksheet $ire_links->write(B3, external:Italy.xls#Sales!B3); # External link to a local file with worksheet and alternative string $ire_links->write(B4, external:Italy.xls#Sales!B4, Link); # External link to a local file with worksheet and format $ire_links->write(B5, external:Italy.xls#Sales!B5, $format); # External link to a remote file, absolute path $ire_links->write(B6, external:c:/Temp/Asia/China.xls); # External link to a remote file, relative path $ire_links->write(B7, external:../Asia/China.xls); # External link to a remote file with worksheet $ire_links->write(B8, external:c:/Temp/Asia/China.xls#Sales!B8); # External link to a remote file with worksheet (with spaces in the name) $ire_links->write(B9, q{external:c:/Temp/Asia/China.xls#Product Data!B9}); ############################################################################### # # Some utility links to return to the main sheet # $ire_sales->write(A2, internal:Links!A2, Back); $ire_sales->write(A3, internal:Links!A3, Back); $ire_sales->write(A4, internal:Links!A4, Back); $ire_sales->write(A5, internal:Links!A5, Back); $ire_sales->write(A6, internal:Links!A6, Back); $ire_data-> write(A7, internal:Links!A7, Back); $ita_links->write(A1, external:Ireland.xls#Links!B2, Back); $ita_sales->write(B3, external:Ireland.xls#Links!B3, Back); $ita_sales->write(B4, external:Ireland.xls#Links!B4, Back); $ita_sales->write(B5, external:Ireland.xls#Links!B5, Back); $cha_links->write(A1, external:../Europe/Ireland.xls#Links!B6, Back); $cha_sales->write(B8, external:../Europe/Ireland.xls#Links!B8, Back); $cha_data-> write(B9, external:../Europe/Ireland.xls#Links!B9, Back);

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/hyperlink2.pl>

Example: images.pl

Example of how to insert images into an Excel worksheet using the Spreadsheet::WriteExcel insert_image() method.

Source code for this example:

#!/usr/bin/perl -w ####################################################################### # # Example of how to insert images into an Excel worksheet using the # Spreadsheet::WriteExcel insert_image() method. # # reverse((c)), October 2001, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; # Create a new workbook called simple.xls and add a worksheet my $workbook = Spreadsheet::WriteExcel->new(“images.xls”); my $worksheet1 = $workbook->add_worksheet(Image 1); my $worksheet2 = $workbook->add_worksheet(Image 2); my $worksheet3 = $workbook->add_worksheet(Image 3); my $worksheet4 = $workbook->add_worksheet(Image 4); # Insert a basic image $worksheet1->write(A10, “Image inserted into worksheet.”); $worksheet1->insert_image(A1, republic.png); # Insert an image with an offset $worksheet2->write(A10, “Image inserted with an offset.”); $worksheet2->insert_image(A1, republic.png, 32, 10); # Insert a scaled image $worksheet3->write(A10, “Image scaled: width x 2, height x 0.8.”); $worksheet3->insert_image(A1, republic.png, 0, 0, 2, 0.8); # Insert an image over varied column and row sizes. $worksheet4->set_column(A:A, 5); $worksheet4->set_column(B:B, undef, undef, 1); # Hidden $worksheet4->set_column(C:D, 10); $worksheet4->set_row(0, 30); $worksheet4->set_row(3, 5); $worksheet4->write(A10, “Image inserted over scaled rows and columns.”); $worksheet4->insert_image(A1, republic.png);

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/images.pl>

Example: indent.pl

A simple formatting example using Spreadsheet::WriteExcel.

This program demonstrates the indentation cell format.

Source code for this example:

#!/usr/bin/perl -w ############################################################################## # # A simple formatting example using Spreadsheet::WriteExcel. # # This program demonstrates the indentation cell format. # # reverse((c)), May 2004, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(indent.xls); my $worksheet = $workbook->add_worksheet(); my $indent1 = $workbook->add_format(indent => 1); my $indent2 = $workbook->add_format(indent => 2); $worksheet->set_column(A:A, 40); $worksheet->write(A1, “This text is indented 1 level”, $indent1); $worksheet->write(A2, “This text is indented 2 levels”, $indent2); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/indent.pl>

Example: merge1.pl

Simple example of merging cells using the Spreadsheet::WriteExcel module.

This example merges three cells using the Centre Across Selection alignment which was the Excel 5 method of achieving a merge. For a more modern approach use the merge_range() worksheet method instead. See the merge3.pl - merge6.pl programs.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # Simple example of merging cells using the Spreadsheet::WriteExcel module. # # This example merges three cells using the “Centre Across Selection” # alignment which was the Excel 5 method of achieving a merge. For a more # modern approach use the merge_range() worksheet method instead. # See the merge3.pl - merge6.pl programs. # # reverse((c)), August 2002, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; # Create a new workbook and add a worksheet my $workbook = Spreadsheet::WriteExcel->new(“merge1.xls”); my $worksheet = $workbook->add_worksheet(); # Increase the cell size of the merged cells to highlight the formatting. $worksheet->set_column(B:D, 20); $worksheet->set_row(2, 30); # Create a merge format my $format = $workbook->add_format(center_across => 1); # Only one cell should contain text, the others should be blank. $worksheet->write (2, 1, “Center across selection”, $format); $worksheet->write_blank(2, 2, $format); $worksheet->write_blank(2, 3, $format);

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/merge1.pl>

Example: merge2.pl

Simple example of merging cells using the Spreadsheet::WriteExcel module

This example merges three cells using the Centre Across Selection alignment which was the Excel 5 method of achieving a merge. For a more modern approach use the merge_range() worksheet method instead. See the merge3.pl - merge6.pl programs.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # Simple example of merging cells using the Spreadsheet::WriteExcel module # # This example merges three cells using the “Centre Across Selection” # alignment which was the Excel 5 method of achieving a merge. For a more # modern approach use the merge_range() worksheet method instead. # See the merge3.pl - merge6.pl programs. # # reverse((c)), August 2002, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; # Create a new workbook and add a worksheet my $workbook = Spreadsheet::WriteExcel->new(“merge2.xls”); my $worksheet = $workbook->add_worksheet(); # Increase the cell size of the merged cells to highlight the formatting. $worksheet->set_column(1, 2, 30); $worksheet->set_row(2, 40); # Create a merged format my $format = $workbook->add_format( center_across => 1, bold => 1, size => 15, pattern => 1, border => 6, color => white, fg_color => green, border_color => yellow, align => vcenter, ); # Only one cell should contain text, the others should be blank. $worksheet->write (2, 1, “Center across selection”, $format); $worksheet->write_blank(2, 2, $format);

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/merge2.pl>

Example: merge3.pl

Example of how to use Spreadsheet::WriteExcel to write a hyperlink in a merged cell. There are two options write_url_range() with a standard merge format or merge_range().

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # Example of how to use Spreadsheet::WriteExcel to write a hyperlink in a # merged cell. There are two options write_url_range() with a standard merge # format or merge_range(). # # reverse((c)), September 2002, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; # Create a new workbook and add a worksheet my $workbook = Spreadsheet::WriteExcel->new(merge3.xls); my $worksheet = $workbook->add_worksheet(); # Increase the cell size of the merged cells to highlight the formatting. $worksheet->set_row($_, 30) for (1, 3, 6, 7); $worksheet->set_column(B:D, 20); ############################################################################### # # Example 1: Merge cells containing a hyperlink using write_url_range() # and the standard Excel 5+ merge property. # my $format1 = $workbook->add_format( center_across => 1, border => 1, underline => 1, color => blue, ); # Write the cells to be merged $worksheet->write_url_range(B2:D2, http://www.perl.com, $format1); $worksheet->write_blank(C2, $format1); $worksheet->write_blank(D2, $format1); ############################################################################### # # Example 2: Merge cells containing a hyperlink using merge_range(). # my $format2 = $workbook->add_format( border => 1, underline => 1, color => blue, align => center, valign => vcenter, ); # Merge 3 cells $worksheet->merge_range(B4:D4, http://www.perl.com, $format2); # Merge 3 cells over two rows $worksheet->merge_range(B7:D8, http://www.perl.com, $format2);

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/merge3.pl>

Example: merge4.pl

Example of how to use the Spreadsheet::WriteExcel merge_range() workbook method with complex formatting.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # Example of how to use the Spreadsheet::WriteExcel merge_range() workbook # method with complex formatting. # # reverse((c)), September 2002, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; # Create a new workbook and add a worksheet my $workbook = Spreadsheet::WriteExcel->new(merge4.xls); my $worksheet = $workbook->add_worksheet(); # Increase the cell size of the merged cells to highlight the formatting. $worksheet->set_row($_, 30) for (1..11); $worksheet->set_column(B:D, 20); ############################################################################### # # Example 1: Text centered vertically and horizontally # my $format1 = $workbook->add_format( border => 6, bold => 1, color => red, valign => vcenter, align => center, ); $worksheet->merge_range(B2:D3, Vertical and horizontal, $format1); ############################################################################### # # Example 2: Text aligned to the top and left # my $format2 = $workbook->add_format( border => 6, bold => 1, color => red, valign => top, align => left, ); $worksheet->merge_range(B5:D6, Aligned to the top and left, $format2); ############################################################################### # # Example 3: Text aligned to the bottom and right # my $format3 = $workbook->add_format( border => 6, bold => 1, color => red, valign => bottom, align => right, ); $worksheet->merge_range(B8:D9, Aligned to the bottom and right, $format3); ############################################################################### # # Example 4: Text justified (i.e. wrapped) in the cell # my $format4 = $workbook->add_format( border => 6, bold => 1, color => red, valign => top, align => justify, ); $worksheet->merge_range(B11:D12, Justified: .so on and x18, $format4);

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/merge4.pl>

Example: merge5.pl

Example of how to use the Spreadsheet::WriteExcel merge_cells() workbook method with complex formatting and rotation.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # Example of how to use the Spreadsheet::WriteExcel merge_cells() workbook # method with complex formatting and rotation. # # # reverse((c)), September 2002, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; # Create a new workbook and add a worksheet my $workbook = Spreadsheet::WriteExcel->new(merge5.xls); my $worksheet = $workbook->add_worksheet(); # Increase the cell size of the merged cells to highlight the formatting. $worksheet->set_row($_, 36) for (3..8); $worksheet->set_column($_, $_ , 15) for (1,3,5); ############################################################################### # # Rotation 1, letters run from top to bottom # my $format1 = $workbook->add_format( border => 6, bold => 1, color => red, valign => vcentre, align => centre, rotation => 270, ); $worksheet->merge_range(B4:B9, Rotation 270, $format1); ############################################################################### # # Rotation 2, 90 deg anticlockwise # my $format2 = $workbook->add_format( border => 6, bold => 1, color => red, valign => vcentre, align => centre, rotation => 90, ); $worksheet->merge_range(D4:D9, Rotation 90 deg, $format2); ############################################################################### # # Rotation 3, 90 deg clockwise # my $format3 = $workbook->add_format( border => 6, bold => 1, color => red, valign => vcentre, align => centre, rotation => -90, ); $worksheet->merge_range(F4:F9, Rotation -90 deg, $format3);

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/merge5.pl>

Example: merge6.pl

Example of how to use the Spreadsheet::WriteExcel merge_cells() workbook method with Unicode strings.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # Example of how to use the Spreadsheet::WriteExcel merge_cells() workbook # method with Unicode strings. # # # reverse((c)), December 2005, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; # Create a new workbook and add a worksheet my $workbook = Spreadsheet::WriteExcel->new(merge6.xls); my $worksheet = $workbook->add_worksheet(); # Increase the cell size of the merged cells to highlight the formatting. $worksheet->set_row($_, 36) for 2..9; $worksheet->set_column(B:D, 25); # Format for the merged cells. my $format = $workbook->add_format( border => 6, bold => 1, color => red, size => 20, valign => vcentre, align => left, indent => 1, ); ############################################################################### # # Write an Ascii string. # $worksheet->merge_range(B3:D4, ASCII: A simple string, $format); ############################################################################### # # Write a UTF-16 Unicode string. # # A phrase in Cyrillic encoded as UTF-16BE. my $utf16_str = pack “H*”, 005500540046002d00310036003a0020. 042d0442043e002004440440043004370430002004. 3d043000200440044304410441043a043e043c0021; # Note the extra parameter at the end to indicate UTF-16 encoding. $worksheet->merge_range(B6:D7, $utf16_str, $format, 1); ############################################################################### # # Write a UTF-8 Unicode string. # if ($] >= 5.008) { my $smiley = chr 0x263a; $worksheet->merge_range(B9:D10, “UTF-8: A Unicode smiley $smiley”, $format); } else { $worksheet->merge_range(B9:D10, “UTF-8: Requires Perl 5.8”, $format); } _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/merge6.pl>

Example: mod_perl1.pl

Example of how to use the Spreadsheet::WriteExcel module to send an Excel file to a browser using mod_perl 1 and Apache

This module ties *XLS directly to Apache, and with the correct content-disposition/types it will prompt the user to save the file, or open it at this location.

This script is a modification of the Spreadsheet::WriteExcel cgi.pl example.

Change the name of this file to Cgi.pm. Change the package location to where ever you locate this package. In the example below it is located in the WriteExcel directory.

Your httpd.conf entry for this module, should you choose to use it as a stand alone app, should look similar to the following:

<Location /spreadsheet-test> SetHandler perl-script PerlHandler Spreadsheet::WriteExcel::Cgi PerlSendHeader On </Location>

The PerlHandler name above and the package name below *have* to match.

############################################################################### # # Example of how to use the Spreadsheet::WriteExcel module to send an Excel # file to a browser using mod_perl 1 and Apache # # This module ties *XLS directly to Apache, and with the correct # content-disposition/types it will prompt the user to save # the file, or open it at this location. # # This script is a modification of the Spreadsheet::WriteExcel cgi.pl example. # # Change the name of this file to Cgi.pm. # Change the package location to where ever you locate this package. # In the example below it is located in the WriteExcel directory. # # Your httpd.conf entry for this module, should you choose to use it # as a stand alone app, should look similar to the following: # # <Location /spreadsheet-test> # SetHandler perl-script # PerlHandler Spreadsheet::WriteExcel::Cgi # PerlSendHeader On # </Location> # # The PerlHandler name above and the package name below *have* to match. # Apr 2001, Thomas Sullivan, [email protected] # Feb 2001, John McNamara, [email protected] package Spreadsheet::WriteExcel::Cgi; ########################################## # Pragma Definitions ########################################## use strict; ########################################## # Required Modules ########################################## use Apache::Constants qw(:common); use Apache::Request; use Apache::URI; # This may not be needed use Spreadsheet::WriteExcel; ########################################## # Main App Body ########################################## sub handler { # New apache object # Should you decide to use it. my $r = Apache::Request->new(shift); # Set the filename and send the content type # This will appear when they save the spreadsheet my $filename =“cgitest.xls”; #################################################### ## Send the content type headers #################################################### print “Content-disposition: attachment;filename=$filename “; print “Content-type: application/vnd.ms-excel

“; #################################################### # Tie a filehandle to Apaches STDOUT. # Create a new workbook and add a worksheet. #################################################### tie *XLS => Apache; binmode(*XLS); my $workbook = Spreadsheet::WriteExcel->new(\XLS); my $worksheet = $workbook->add_worksheet(); # Set the column width for column 1 $worksheet->set_column(0, 0, 20); # Create a format my $format = $workbook->add_format(); $format->set_bold(); $format->set_size(15); $format->set_color(blue); # Write to the workbook $worksheet->write(0, 0, “Hi Excel!”, $format); # You must close the workbook for Content-disposition $workbook->close(); } 1;

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/mod_perl1.pl>

Example: mod_perl2.pl

Example of how to use the Spreadsheet::WriteExcel module to send an Excel file to a browser using mod_perl 2 and Apache.

This module ties *XLS directly to Apache, and with the correct content-disposition/types it will prompt the user to save the file, or open it at this location.

This script is a modification of the Spreadsheet::WriteExcel cgi.pl example.

Change the name of this file to MP2Test.pm. Change the package location to where ever you locate this package. In the example below it is located in the WriteExcel directory.

Your httpd.conf entry for this module, should you choose to use it as a stand alone app, should look similar to the following:

PerlModule Apache2::RequestRec PerlModule APR::Table PerlModule Apache2::RequestIO <Location /spreadsheet-test> SetHandler perl-script PerlResponseHandler Spreadsheet::WriteExcel::MP2Test </Location>

The PerlResponseHandler must match the package name below.

############################################################################### # # Example of how to use the Spreadsheet::WriteExcel module to send an Excel # file to a browser using mod_perl 2 and Apache. # # This module ties *XLS directly to Apache, and with the correct # content-disposition/types it will prompt the user to save # the file, or open it at this location. # # This script is a modification of the Spreadsheet::WriteExcel cgi.pl example. # # Change the name of this file to MP2Test.pm. # Change the package location to where ever you locate this package. # In the example below it is located in the WriteExcel directory. # # Your httpd.conf entry for this module, should you choose to use it # as a stand alone app, should look similar to the following: # # PerlModule Apache2::RequestRec # PerlModule APR::Table # PerlModule Apache2::RequestIO # # <Location /spreadsheet-test> # SetHandler perl-script # PerlResponseHandler Spreadsheet::WriteExcel::MP2Test # </Location> # # The PerlResponseHandler must match the package name below. # Jun 2004, Matisse Enzer, [email protected] (mod_perl 2 version) # Apr 2001, Thomas Sullivan, [email protected] # Feb 2001, John McNamara, [email protected] package Spreadsheet::WriteExcel::MP2Test; ########################################## # Pragma Definitions ########################################## use strict; ########################################## # Required Modules ########################################## use Apache2::Const -compile => qw( :common ); use Spreadsheet::WriteExcel; ########################################## # Main App Body ########################################## sub handler { my($r) = @_; # Apache request object is passed to handler in mod_perl 2 # Set the filename and send the content type # This will appear when they save the spreadsheet my $filename =“mod_perl2_test.xls”; #################################################### ## Send the content type headers the mod_perl 2 way #################################################### $r->headers_out->{Content-Disposition} = “attachment;filename=$filename”; $r->content_type(application/vnd.ms-excel); #################################################### # Tie a filehandle to Apaches STDOUT. # Create a new workbook and add a worksheet. #################################################### tie *XLS => $r; # The mod_perl 2 way. Tie to the Apache::RequestRec object binmode(*XLS); my $workbook = Spreadsheet::WriteExcel->new(\XLS); my $worksheet = $workbook->add_worksheet(); # Set the column width for column 1 $worksheet->set_column(0, 0, 20); # Create a format my $format = $workbook->add_format(); $format->set_bold(); $format->set_size(15); $format->set_color(blue); # Write to the workbook $worksheet->write(0, 0, Hi Excel! from . $r->hostname , $format); # You must close the workbook for Content-disposition $workbook->close(); return Apache2::Const::OK; } 1;

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/mod_perl2.pl>

Example: outline.pl

Example of how use Spreadsheet::WriteExcel to generate Excel outlines and grouping.

Excel allows you to group rows or columns so that they can be hidden or displayed with a single mouse click. This feature is referred to as outlines.

Outlines can reduce complex data down to a few salient sub-totals or summaries.

This feature is best viewed in Excel but the following is an ASCII representation of what a worksheet with three outlines might look like. Rows 3-4 and rows 7-8 are grouped at level 2. Rows 2-9 are grouped at level 1. The lines at the left hand side are called outline level bars.

—————————————— 1 2 3 | | A | B | C | D | … —————————————— _ | 1 | A | | | | … | _ | 2 | B | | | | … | | | 3 | (C) | | | | … | | | 4 | (D) | | | | … | - | 5 | E | | | | … | _ | 6 | F | | | | … | | | 7 | (G) | | | | … | | | 8 | (H) | | | | … | - | 9 | I | | | | … - | . | … | … | … | … | …

Clicking the minus sign on each of the level 2 outlines will collapse and hide the data as shown in the next figure. The minus sign changes to a plus sign to indicate that the data in the outline is hidden.

—————————————— 1 2 3 | | A | B | C | D | … —————————————— _ | 1 | A | | | | … | | 2 | B | | | | … | + | 5 | E | | | | … | | 6 | F | | | | … | + | 9 | I | | | | … - | . | … | … | … | … | …

Clicking on the minus sign on the level 1 outline will collapse the remaining rows as follows:

—————————————— 1 2 3 | | A | B | C | D | … —————————————— | 1 | A | | | | … + | . | … | … | … | … | …

See the main Spreadsheet::WriteExcel documentation for more information.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # Example of how use Spreadsheet::WriteExcel to generate Excel outlines and # grouping. # # # Excel allows you to group rows or columns so that they can be hidden or # displayed with a single mouse click. This feature is referred to as outlines. # # Outlines can reduce complex data down to a few salient sub-totals or # summaries. # # This feature is best viewed in Excel but the following is an ASCII # representation of what a worksheet with three outlines might look like. # Rows 3-4 and rows 7-8 are grouped at level 2. Rows 2-9 are grouped at # level 1. The lines at the left hand side are called outline level bars. # # # —————————————— # 1 2 3 | | A | B | C | D | … # —————————————— # _ | 1 | A | | | | … # | _ | 2 | B | | | | … # | | | 3 | (C) | | | | … # | | | 4 | (D) | | | | … # | - | 5 | E | | | | … # | _ | 6 | F | | | | … # | | | 7 | (G) | | | | … # | | | 8 | (H) | | | | … # | - | 9 | I | | | | … # - | . | … | … | … | … | … # # # Clicking the minus sign on each of the level 2 outlines will collapse and # hide the data as shown in the next figure. The minus sign changes to a plus # sign to indicate that the data in the outline is hidden. # # —————————————— # 1 2 3 | | A | B | C | D | … # —————————————— # _ | 1 | A | | | | … # | | 2 | B | | | | … # | + | 5 | E | | | | … # | | 6 | F | | | | … # | + | 9 | I | | | | … # - | . | … | … | … | … | … # # # Clicking on the minus sign on the level 1 outline will collapse the remaining # rows as follows: # # —————————————— # 1 2 3 | | A | B | C | D | … # —————————————— # | 1 | A | | | | … # + | . | … | … | … | … | … # # See the main Spreadsheet::WriteExcel documentation for more information. # # reverse((c)), April 2003, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; # Create a new workbook and add some worksheets my $workbook = Spreadsheet::WriteExcel->new(outline.xls); my $worksheet1 = $workbook->add_worksheet(Outlined Rows); my $worksheet2 = $workbook->add_worksheet(Collapsed Rows); my $worksheet3 = $workbook->add_worksheet(Outline Columns); my $worksheet4 = $workbook->add_worksheet(Outline levels); # Add a general format my $bold = $workbook->add_format(bold => 1); ############################################################################### # # Example 1: Create a worksheet with outlined rows. It also includes SUBTOTAL() # functions so that it looks like the type of automatic outlines that are # generated when you use the Excel Data->SubTotals menu item. # # For outlines the important parameters are $hidden and $level. Rows with the # same $level are grouped together. The group will be collapsed if $hidden is # non-zero. $height and $XF are assigned default values if they are undef. # # The syntax is: set_row($row, $height, $XF, $hidden, $level, $collapsed) # $worksheet1->set_row(1, undef, undef, 0, 2); $worksheet1->set_row(2, undef, undef, 0, 2); $worksheet1->set_row(3, undef, undef, 0, 2); $worksheet1->set_row(4, undef, undef, 0, 2); $worksheet1->set_row(5, undef, undef, 0, 1); $worksheet1->set_row(6, undef, undef, 0, 2); $worksheet1->set_row(7, undef, undef, 0, 2); $worksheet1->set_row(8, undef, undef, 0, 2); $worksheet1->set_row(9, undef, undef, 0, 2); $worksheet1->set_row(10, undef, undef, 0, 1); # Add a column format for clarity $worksheet1->set_column(A:A, 20); # Add the data, labels and formulas $worksheet1->write(A1, Region, $bold); $worksheet1->write(A2, North); $worksheet1->write(A3, North); $worksheet1->write(A4, North); $worksheet1->write(A5, North); $worksheet1->write(A6, North Total, $bold); $worksheet1->write(B1, Sales, $bold); $worksheet1->write(B2, 1000); $worksheet1->write(B3, 1200); $worksheet1->write(B4, 900); $worksheet1->write(B5, 1200); $worksheet1->write(B6, =SUBTOTAL(9,B2:B5), $bold); $worksheet1->write(A7, South); $worksheet1->write(A8, South); $worksheet1->write(A9, South); $worksheet1->write(A10, South); $worksheet1->write(A11, South Total, $bold); $worksheet1->write(B7, 400); $worksheet1->write(B8, 600); $worksheet1->write(B9, 500); $worksheet1->write(B10, 600); $worksheet1->write(B11, =SUBTOTAL(9,B7:B10), $bold); $worksheet1->write(A12, Grand Total, $bold); $worksheet1->write(B12, =SUBTOTAL(9,B2:B10), $bold); ############################################################################### # # Example 2: Create a worksheet with outlined rows. This is the same as the # previous example except that the rows are collapsed. # Note: We need to indicate the row that contains the collapsed symbol + # with the optional parameter, $collapsed. # The group will be collapsed if $hidden is non-zero. # The syntax is: set_row($row, $height, $XF, $hidden, $level, $collapsed) # $worksheet2->set_row(1, undef, undef, 1, 2); $worksheet2->set_row(2, undef, undef, 1, 2); $worksheet2->set_row(3, undef, undef, 1, 2); $worksheet2->set_row(4, undef, undef, 1, 2); $worksheet2->set_row(5, undef, undef, 1, 1); $worksheet2->set_row(6, undef, undef, 1, 2); $worksheet2->set_row(7, undef, undef, 1, 2); $worksheet2->set_row(8, undef, undef, 1, 2); $worksheet2->set_row(9, undef, undef, 1, 2); $worksheet2->set_row(10, undef, undef, 1, 1); $worksheet2->set_row(11, undef, undef, 0, 0, 1); # Add a column format for clarity $worksheet2->set_column(A:A, 20); # Add the data, labels and formulas $worksheet2->write(A1, Region, $bold); $worksheet2->write(A2, North); $worksheet2->write(A3, North); $worksheet2->write(A4, North); $worksheet2->write(A5, North); $worksheet2->write(A6, North Total, $bold); $worksheet2->write(B1, Sales, $bold); $worksheet2->write(B2, 1000); $worksheet2->write(B3, 1200); $worksheet2->write(B4, 900); $worksheet2->write(B5, 1200); $worksheet2->write(B6, =SUBTOTAL(9,B2:B5), $bold); $worksheet2->write(A7, South); $worksheet2->write(A8, South); $worksheet2->write(A9, South); $worksheet2->write(A10, South); $worksheet2->write(A11, South Total, $bold); $worksheet2->write(B7, 400); $worksheet2->write(B8, 600); $worksheet2->write(B9, 500); $worksheet2->write(B10, 600); $worksheet2->write(B11, =SUBTOTAL(9,B7:B10), $bold); $worksheet2->write(A12, Grand Total, $bold); $worksheet2->write(B12, =SUBTOTAL(9,B2:B10), $bold); ############################################################################### # # Example 3: Create a worksheet with outlined columns. # my $data = [ [Month, Jan, Feb, Mar, Apr, May, Jun, Total], [North, 50, 20, 15, 25, 65, 80, ,=SUM(B2:G2)], [South, 10, 20, 30, 50, 50, 50, ,=SUM(B3:G3)], [East, 45, 75, 50, 15, 75, 100, ,=SUM(B4:G4)], [West, 15, 15, 55, 35, 20, 50, ,=SUM(B5:G6)], ]; # Add bold format to the first row $worksheet3->set_row(0, undef, $bold); # Syntax: set_column($col1, $col2, $width, $XF, $hidden, $level, $collapsed) $worksheet3->set_column(A:A, 10, $bold ); $worksheet3->set_column(B:G, 5, undef, 0, 1); $worksheet3->set_column(H:H, 10); # Write the data and a formula $worksheet3->write_col(A1, $data); $worksheet3->write(H6, =SUM(H2:H5), $bold); ############################################################################### # # Example 4: Show all possible outline levels. # my $levels = [“Level 1”, “Level 2”, “Level 3”, “Level 4”, “Level 5”, “Level 6”, “Level 7”, “Level 6”, “Level 5”, “Level 4”, “Level 3”, “Level 2”, “Level 1”]; $worksheet4->write_col(A1, $levels); $worksheet4->set_row(0, undef, undef, undef, 1); $worksheet4->set_row(1, undef, undef, undef, 2); $worksheet4->set_row(2, undef, undef, undef, 3); $worksheet4->set_row(3, undef, undef, undef, 4); $worksheet4->set_row(4, undef, undef, undef, 5); $worksheet4->set_row(5, undef, undef, undef, 6); $worksheet4->set_row(6, undef, undef, undef, 7); $worksheet4->set_row(7, undef, undef, undef, 6); $worksheet4->set_row(8, undef, undef, undef, 5); $worksheet4->set_row(9, undef, undef, undef, 4); $worksheet4->set_row(10, undef, undef, undef, 3); $worksheet4->set_row(11, undef, undef, undef, 2); $worksheet4->set_row(12, undef, undef, undef, 1); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/outline.pl>

Example: outline_collapsed.pl

Example of how use Spreadsheet::WriteExcel to generate Excel outlines and grouping.

These example focus mainly on collapsed outlines. See also the outlines.pl example program for more general examples.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # Example of how use Spreadsheet::WriteExcel to generate Excel outlines and # grouping. # # These example focus mainly on collapsed outlines. See also the # outlines.pl example program for more general examples. # # reverse((c)), March 2008, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; # Create a new workbook and add some worksheets my $workbook = Spreadsheet::WriteExcel->new(outline_collapsed.xls); my $worksheet1 = $workbook->add_worksheet(Outlined Rows); my $worksheet2 = $workbook->add_worksheet(Collapsed Rows 1); my $worksheet3 = $workbook->add_worksheet(Collapsed Rows 2); my $worksheet4 = $workbook->add_worksheet(Collapsed Rows 3); my $worksheet5 = $workbook->add_worksheet(Outline Columns); my $worksheet6 = $workbook->add_worksheet(Collapsed Columns); # Add a general format my $bold = $workbook->add_format(bold => 1); # # This function will generate the same data and sub-totals on each worksheet. # sub create_sub_totals { my $worksheet = $_[0]; # Add a column format for clarity $worksheet->set_column(A:A, 20); # Add the data, labels and formulas $worksheet->write(A1, Region, $bold); $worksheet->write(A2, North); $worksheet->write(A3, North); $worksheet->write(A4, North); $worksheet->write(A5, North); $worksheet->write(A6, North Total, $bold); $worksheet->write(B1, Sales, $bold); $worksheet->write(B2, 1000); $worksheet->write(B3, 1200); $worksheet->write(B4, 900); $worksheet->write(B5, 1200); $worksheet->write(B6, =SUBTOTAL(9,B2:B5), $bold); $worksheet->write(A7, South); $worksheet->write(A8, South); $worksheet->write(A9, South); $worksheet->write(A10, South); $worksheet->write(A11, South Total, $bold); $worksheet->write(B7, 400); $worksheet->write(B8, 600); $worksheet->write(B9, 500); $worksheet->write(B10, 600); $worksheet->write(B11, =SUBTOTAL(9,B7:B10), $bold); $worksheet->write(A12, Grand Total, $bold); $worksheet->write(B12, =SUBTOTAL(9,B2:B10), $bold); } ############################################################################### # # Example 1: Create a worksheet with outlined rows. It also includes SUBTOTAL() # functions so that it looks like the type of automatic outlines that are # generated when you use the Excel Data->SubTotals menu item. # # The syntax is: set_row($row, $height, $XF, $hidden, $level, $collapsed) $worksheet1->set_row(1, undef, undef, 0, 2); $worksheet1->set_row(2, undef, undef, 0, 2); $worksheet1->set_row(3, undef, undef, 0, 2); $worksheet1->set_row(4, undef, undef, 0, 2); $worksheet1->set_row(5, undef, undef, 0, 1); $worksheet1->set_row(6, undef, undef, 0, 2); $worksheet1->set_row(7, undef, undef, 0, 2); $worksheet1->set_row(8, undef, undef, 0, 2); $worksheet1->set_row(9, undef, undef, 0, 2); $worksheet1->set_row(10, undef, undef, 0, 1); # Write the sub-total data that is common to the row examples. create_sub_totals($worksheet1); ############################################################################### # # Example 2: Create a worksheet with collapsed outlined rows. # This is the same as the example 1 except that the all rows are collapsed. # Note: We need to indicate the row that contains the collapsed symbol + with # the optional parameter, $collapsed. $worksheet2->set_row(1, undef, undef, 1, 2); $worksheet2->set_row(2, undef, undef, 1, 2); $worksheet2->set_row(3, undef, undef, 1, 2); $worksheet2->set_row(4, undef, undef, 1, 2); $worksheet2->set_row(5, undef, undef, 1, 1); $worksheet2->set_row(6, undef, undef, 1, 2); $worksheet2->set_row(7, undef, undef, 1, 2); $worksheet2->set_row(8, undef, undef, 1, 2); $worksheet2->set_row(9, undef, undef, 1, 2); $worksheet2->set_row(10, undef, undef, 1, 1); $worksheet2->set_row(11, undef, undef, 0, 0, 1); # Write the sub-total data that is common to the row examples. create_sub_totals($worksheet2); ############################################################################### # # Example 3: Create a worksheet with collapsed outlined rows. # Same as the example 1 except that the two sub-totals are collapsed. $worksheet3->set_row(1, undef, undef, 1, 2); $worksheet3->set_row(2, undef, undef, 1, 2); $worksheet3->set_row(3, undef, undef, 1, 2); $worksheet3->set_row(4, undef, undef, 1, 2); $worksheet3->set_row(5, undef, undef, 0, 1, 1); $worksheet3->set_row(6, undef, undef, 1, 2); $worksheet3->set_row(7, undef, undef, 1, 2); $worksheet3->set_row(8, undef, undef, 1, 2); $worksheet3->set_row(9, undef, undef, 1, 2); $worksheet3->set_row(10, undef, undef, 0, 1, 1); # Write the sub-total data that is common to the row examples. create_sub_totals($worksheet3); ############################################################################### # # Example 4: Create a worksheet with outlined rows. # Same as the example 1 except that the two sub-totals are collapsed. $worksheet4->set_row(1, undef, undef, 1, 2); $worksheet4->set_row(2, undef, undef, 1, 2); $worksheet4->set_row(3, undef, undef, 1, 2); $worksheet4->set_row(4, undef, undef, 1, 2); $worksheet4->set_row(5, undef, undef, 1, 1, 1); $worksheet4->set_row(6, undef, undef, 1, 2); $worksheet4->set_row(7, undef, undef, 1, 2); $worksheet4->set_row(8, undef, undef, 1, 2); $worksheet4->set_row(9, undef, undef, 1, 2); $worksheet4->set_row(10, undef, undef, 1, 1, 1); $worksheet4->set_row(11, undef, undef, 0, 0, 1); # Write the sub-total data that is common to the row examples. create_sub_totals($worksheet4); ############################################################################### # # Example 5: Create a worksheet with outlined columns. # my $data = [ [Month, Jan, Feb, Mar, Apr, May, Jun, Total], [North, 50, 20, 15, 25, 65, 80, ,=SUM(B2:G2)], [South, 10, 20, 30, 50, 50, 50, ,=SUM(B3:G3)], [East, 45, 75, 50, 15, 75, 100, ,=SUM(B4:G4)], [West, 15, 15, 55, 35, 20, 50, ,=SUM(B5:G6)], ]; # Add bold format to the first row $worksheet5->set_row(0, undef, $bold); # Syntax: set_column($col1, $col2, $width, $XF, $hidden, $level, $collapsed) $worksheet5->set_column(A:A, 10, $bold ); $worksheet5->set_column(B:G, 5, undef, 0, 1); $worksheet5->set_column(H:H, 10 ); # Write the data and a formula $worksheet5->write_col(A1, $data); $worksheet5->write(H6, =SUM(H2:H5), $bold); ############################################################################### # # Example 6: Create a worksheet with collapsed outlined columns. # This is the same as the previous example except collapsed columns. # Add bold format to the first row $worksheet6->set_row(0, undef, $bold); # Syntax: set_column($col1, $col2, $width, $XF, $hidden, $level, $collapsed) $worksheet6->set_column(A:A, 10, $bold ); $worksheet6->set_column(B:G, 5, undef, 1, 1 ); $worksheet6->set_column(H:H, 10, undef, 0, 0, 1); # Write the data and a formula $worksheet6->write_col(A1, $data); $worksheet6->write(H6, =SUM(H2:H5), $bold); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/outline_collapsed.pl>

Example: panes.pl

Example of using the WriteExcel module to create worksheet panes.

Source code for this example:

#!/usr/bin/perl -w ####################################################################### # # Example of using the WriteExcel module to create worksheet panes. # # reverse((c)), May 2001, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“panes.xls”); my $worksheet1 = $workbook->add_worksheet(Panes 1); my $worksheet2 = $workbook->add_worksheet(Panes 2); my $worksheet3 = $workbook->add_worksheet(Panes 3); my $worksheet4 = $workbook->add_worksheet(Panes 4); # Freeze panes $worksheet1->freeze_panes(1, 0); # 1 row $worksheet2->freeze_panes(0, 1); # 1 column $worksheet3->freeze_panes(1, 1); # 1 row and column # Split panes. # The divisions must be specified in terms of row and column dimensions. # The default row height is 12.75 and the default column width is 8.43 # $worksheet4->split_panes(12.75, 8.43, 1, 1); # 1 row and column ####################################################################### # # Set up some formatting and text to highlight the panes # my $header = $workbook->add_format(); $header->set_color(white); $header->set_align(center); $header->set_align(vcenter); $header->set_pattern(); $header->set_fg_color(green); my $center = $workbook->add_format(); $center->set_align(center); ####################################################################### # # Sheet 1 # $worksheet1->set_column(A:I, 16); $worksheet1->set_row(0, 20); $worksheet1->set_selection(C3); for my $i (0..8){ $worksheet1->write(0, $i, Scroll down, $header); } for my $i (1..100){ for my $j (0..8){ $worksheet1->write($i, $j, $i+1, $center); } } ####################################################################### # # Sheet 2 # $worksheet2->set_column(A:A, 16); $worksheet2->set_selection(C3); for my $i (0..49){ $worksheet2->set_row($i, 15); $worksheet2->write($i, 0, Scroll right, $header); } for my $i (0..49){ for my $j (1..25){ $worksheet2->write($i, $j, $j, $center); } } ####################################################################### # # Sheet 3 # $worksheet3->set_column(A:Z, 16); $worksheet3->set_selection(C3); for my $i (1..25){ $worksheet3->write(0, $i, Scroll down, $header); } for my $i (1..49){ $worksheet3->write($i, 0, Scroll right, $header); } for my $i (1..49){ for my $j (1..25){ $worksheet3->write($i, $j, $j, $center); } } ####################################################################### # # Sheet 4 # $worksheet4->set_selection(C3); for my $i (1..25){ $worksheet4->write(0, $i, Scroll, $center); } for my $i (1..49){ $worksheet4->write($i, 0, Scroll, $center); } for my $i (1..49){ for my $j (1..25){ $worksheet4->write($i, $j, $j, $center); } }

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/panes.pl>

Example: properties.pl

An example of adding document properties to a Spreadsheet::WriteExcel file.

Source code for this example:

#!/usr/bin/perl -w ############################################################################## # # An example of adding document properties to a Spreadsheet::WriteExcel file. # # reverse((c)), August 2008, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(properties.xls); my $worksheet = $workbook->add_worksheet(); $workbook->set_properties( title => This is an example spreadsheet, subject => With document properties, author => John McNamara, manager => Dr. Heinz Doofenshmirtz , company => of Wolves, category => Example spreadsheets, keywords => Sample, Example, Properties, comments => Created with Perl and Spreadsheet::WriteExcel, ); $worksheet->set_column(A:A, 50); $worksheet->write(A1, Select File->Properties to see the file properties); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/properties.pl>

Example: protection.pl

Example of cell locking and formula hiding in an Excel worksheet via the Spreadsheet::WriteExcel module.

Source code for this example:

#!/usr/bin/perl -w ######################################################################## # # Example of cell locking and formula hiding in an Excel worksheet via # the Spreadsheet::WriteExcel module. # # reverse((c)), August 2001, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“protection.xls”); my $worksheet = $workbook->add_worksheet(); # Create some format objects my $locked = $workbook->add_format(locked => 1); my $unlocked = $workbook->add_format(locked => 0); my $hidden = $workbook->add_format(hidden => 1); # Format the columns $worksheet->set_column(A:A, 42); $worksheet->set_selection(B3:B3); # Protect the worksheet $worksheet->protect(); # Examples of cell locking and hiding $worksheet->write(A1, Cell B1 is locked. It cannot be edited.); $worksheet->write(B1, =1+2, $locked); $worksheet->write(A2, Cell B2 is unlocked. It can be edited.); $worksheet->write(B2, =1+2, $unlocked); $worksheet->write(A3, “Cell B3 is hidden. The formula isnt visible.”); $worksheet->write(B3, =1+2, $hidden); $worksheet->write(A5, Use Menu->Tools->Protection->Unprotect Sheet); $worksheet->write(A6, to remove the worksheet protection. );

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/protection.pl>

Example: repeat.pl

Example of writing repeated formulas.

Source code for this example:

#!/usr/bin/perl -w ###################################################################### # # Example of writing repeated formulas. # # reverse((c)), August 2002, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“repeat.xls”); my $worksheet = $workbook->add_worksheet(); my $limit = 1000; # Write a column of numbers for my $row (0..$limit) { $worksheet->write($row, 0, $row); } # Store a formula my $formula = $worksheet->store_formula(=A1*5+4); # Write a column of formulas based on the stored formula for my $row (0..$limit) { $worksheet->repeat_formula($row, 1, $formula, undef, qr/^A1$/, A.($row+1)); } # Direct formula writing. As a speed comparison uncomment the # following and run the program again #for my $row (0..$limit) { # $worksheet->write_formula($row, 2, =A.($row+1).*5+4); #} _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/repeat.pl>

Example: right_to_left.pl

Example of how to change the default worksheet direction from left-to-right to right-to-left as required by some eastern verions of Excel.

Source code for this example:

#!/usr/bin/perl -w ####################################################################### # # Example of how to change the default worksheet direction from # left-to-right to right-to-left as required by some eastern verions # of Excel. # # reverse((c)), January 2006, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“right_to_left.xls”); my $worksheet1 = $workbook->add_worksheet(); my $worksheet2 = $workbook->add_worksheet(); $worksheet2->right_to_left(); $worksheet1->write(0, 0, Hello); # A1, B1, C1, … $worksheet2->write(0, 0, Hello); # …, C1, B1, A1

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/right_to_left.pl>

Example: row_wrap.pl

Demonstrates how to wrap data from one worksheet onto another.

Excel has a row limit of 65536 rows. Sometimes the amount of row data to be written to a file is greater than this limit. In this case it is a useful technique to wrap the data from one worksheet onto the next so that we get something like the following:

Sheet1 Row 1 - 65536 Sheet2 Row 65537 - 131072 Sheet3 Row 131073 - …

In order to achieve this we use a single worksheet reference and reinitialise it to point to a new worksheet when required.

Source code for this example:

#!/usr/bin/perl -w ############################################################################## # # Demonstrates how to wrap data from one worksheet onto another. # # Excel has a row limit of 65536 rows. Sometimes the amount of row data to be # written to a file is greater than this limit. In this case it is a useful # technique to wrap the data from one worksheet onto the next so that we get # something like the following: # # Sheet1 Row 1 - 65536 # Sheet2 Row 65537 - 131072 # Sheet3 Row 131073 - … # # In order to achieve this we use a single worksheet reference and # reinitialise it to point to a new worksheet when required. # # reverse((c)), May 2006, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(row_wrap.xls); my $worksheet = $workbook->add_worksheet(); # Worksheet formatting. $worksheet->set_column(A:A, 20); # For the sake of this example we will use a small row limit. In order to use # the entire row range set the $row_limit to 65536. my $row_limit = 10; my $row = 0; for my $count (1 .. 2 * $row_limit +10) { # When we hit the row limit we redirect the output # to a new worksheet and reset the row number. if ($row == $row_limit) { $worksheet = $workbook->add_worksheet(); $row = 0; # Repeat any worksheet formatting. $worksheet->set_column(A:A, 20); } $worksheet->write($row, 0, “This is row $count”); $row++; }

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/row_wrap.pl>

Example: sales.pl

Example of a sales worksheet to demonstrate several different features. Also uses functions from the Spreadsheet::WriteExcel::Utility module.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # Example of a sales worksheet to demonstrate several different features. # Also uses functions from the L<Spreadsheet::WriteExcel::Utility> module. # # reverse((c)), October 2001, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; use Spreadsheet::WriteExcel::Utility; # Create a new workbook and add a worksheet my $workbook = Spreadsheet::WriteExcel->new(“sales.xls”); my $worksheet = $workbook->add_worksheet(May Sales); # Set up some formats my %heading = ( bold => 1, pattern => 1, fg_color => 19, border => 1, align => center, ); my %total = ( bold => 1, top => 1, num_format => $#,##0.00 ); my $heading = $workbook->add_format(%heading); my $total_format = $workbook->add_format(%total); my $price_format = $workbook->add_format(num_format => $#,##0.00); my $date_format = $workbook->add_format(num_format => mmm d yyy); # Write the main headings $worksheet->freeze_panes(1); # Freeze the first row $worksheet->write(A1, Item, $heading); $worksheet->write(B1, Quantity, $heading); $worksheet->write(C1, Price, $heading); $worksheet->write(D1, Total, $heading); $worksheet->write(E1, Date, $heading); # Set the column widths $worksheet->set_column(A:A, 25); $worksheet->set_column(B:B, 10); $worksheet->set_column(C:E, 16); # Extract the sales data from the _ _DATA_ _ section at the end of the file. # In reality this information would probably come from a database my @sales; foreach my $line (<DATA>) { chomp $line; next if $line eq ; # Simple-minded processing of CSV data. Refer to the Text::CSV_XS # and Text::xSV modules for a more complete CSV handling. my @items = split /,/, $line; push @sales, \items; } # Write out the items from each row my $row = 1; foreach my $sale (@sales) { $worksheet->write($row, 0, @$sale[0]); $worksheet->write($row, 1, @$sale[1]); $worksheet->write($row, 2, @$sale[2], $price_format); # Create a formula like =B2*C2 my $formula = = . xl_rowcol_to_cell($row, 1) . “*” . xl_rowcol_to_cell($row, 2); $worksheet->write($row, 3, $formula, $price_format); # Parse the date my $date = xl_decode_date_US(@$sale[3]); $worksheet->write($row, 4, $date, $date_format); $row++; } # Create a formula to sum the totals, like =SUM(D2:D6) my $total = =SUM(D2: . xl_rowcol_to_cell($row-1, 3) . “)”; $worksheet->write($row, 3, $total, $total_format); _ _DATA_ _ 586 card,20,125.50,5/12/01 Flat Screen Monitor,1,1300.00,5/12/01 64 MB dimms,45,49.99,5/13/01 15 GB HD,12,300.00,5/13/01 Speakers (pair),5,15.50,5/14/01

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/sales.pl>

Example: sendmail.pl

Example of how to use Mail::Sender to send a Spreadsheet::WriteExcel Excel file as an attachment.

The main thing is to ensure that you close() the Worbook before you send it.

See the Mail::Sender module for further details.

#!/usr/bin/perl -w ############################################################################### # # Example of how to use Mail::Sender to send a Spreadsheet::WriteExcel Excel # file as an attachment. # # The main thing is to ensure that you close() the Worbook before you send it. # # See the L<Mail::Sender> module for further details. # # reverse((c)), August 2002, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; use Mail::Sender; # Create an Excel file my $workbook = Spreadsheet::WriteExcel->new(“sendmail.xls”); my $worksheet = $workbook->add_worksheet; $worksheet->write(A1, “Hello World!”); $workbook->close(); # Must close before sending # Send the file. Change all variables to suit my $sender = new Mail::Sender { smtp => 123.123.123.123, from => Someone }; $sender->MailFile( { to => [email protected], subject => Excel file, msg => “Here is the data. “, file => mail.xls, });

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/sendmail.pl>

Example: stats_ext.pl

Example of formatting using the Spreadsheet::WriteExcel module

This is a simple example of how to use functions that reference cells in other worksheets within the same workbook.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # Example of formatting using the Spreadsheet::WriteExcel module # # This is a simple example of how to use functions that reference cells in # other worksheets within the same workbook. # # reverse((c)), March 2001, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; # Create a new workbook and add a worksheet my $workbook = Spreadsheet::WriteExcel->new(“stats_ext.xls”); my $worksheet1 = $workbook->add_worksheet(Test results); my $worksheet2 = $workbook->add_worksheet(Data); # Set the column width for columns 1 $worksheet1->set_column(A:A, 20); # Create a format for the headings my $heading = $workbook->add_format(); $heading->set_bold(); # Create a numerical format my $numformat = $workbook->add_format(); $numformat->set_num_format(0.00); # Write some statistical functions $worksheet1->write(A1, Count, $heading); $worksheet1->write(B1, =COUNT(Data!B2:B9)); $worksheet1->write(A2, Sum, $heading); $worksheet1->write(B2, =SUM(Data!B2:B9)); $worksheet1->write(A3, Average, $heading); $worksheet1->write(B3, =AVERAGE(Data!B2:B9)); $worksheet1->write(A4, Min, $heading); $worksheet1->write(B4, =MIN(Data!B2:B9)); $worksheet1->write(A5, Max, $heading); $worksheet1->write(B5, =MAX(Data!B2:B9)); $worksheet1->write(A6, Standard Deviation, $heading); $worksheet1->write(B6, =STDEV(Data!B2:B9)); $worksheet1->write(A7, Kurtosis, $heading); $worksheet1->write(B7, =KURT(Data!B2:B9)); # Write the sample data $worksheet2->write(A1, Sample, $heading); $worksheet2->write(A2, 1); $worksheet2->write(A3, 2); $worksheet2->write(A4, 3); $worksheet2->write(A5, 4); $worksheet2->write(A6, 5); $worksheet2->write(A7, 6); $worksheet2->write(A8, 7); $worksheet2->write(A9, 8); $worksheet2->write(B1, Length, $heading); $worksheet2->write(B2, 25.4, $numformat); $worksheet2->write(B3, 25.4, $numformat); $worksheet2->write(B4, 24.8, $numformat); $worksheet2->write(B5, 25.0, $numformat); $worksheet2->write(B6, 25.3, $numformat); $worksheet2->write(B7, 24.9, $numformat); $worksheet2->write(B8, 25.2, $numformat); $worksheet2->write(B9, 24.8, $numformat);

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/stats_ext.pl>

Example: stocks.pl

Example of formatting using the Spreadsheet::WriteExcel module

This example shows how to use a conditional numerical format with colours to indicate if a share price has gone up or down.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # Example of formatting using the Spreadsheet::WriteExcel module # # This example shows how to use a conditional numerical format # with colours to indicate if a share price has gone up or down. # # reverse((c)), March 2001, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; # Create a new workbook and add a worksheet my $workbook = Spreadsheet::WriteExcel->new(“stocks.xls”); my $worksheet = $workbook->add_worksheet(); # Set the column width for columns 1, 2, 3 and 4 $worksheet->set_column(0, 3, 15); # Create a format for the column headings my $header = $workbook->add_format(); $header->set_bold(); $header->set_size(12); $header->set_color(blue); # Create a format for the stock price my $f_price = $workbook->add_format(); $f_price->set_align(left); $f_price->set_num_format($0.00); # Create a format for the stock volume my $f_volume = $workbook->add_format(); $f_volume->set_align(left); $f_volume->set_num_format(#,##0); # Create a format for the price change. This is an example of a conditional # format. The number is formatted as a percentage. If it is positive it is # formatted in green, if it is negative it is formatted in red and if it is # zero it is formatted as the default font colour (in this case black). # Note: the [Green] format produces an unappealing lime green. Try # [Color 10] instead for a dark green. # my $f_change = $workbook->add_format(); $f_change->set_align(left); $f_change->set_num_format([Green]0.0%;[Red]-0.0%;0.0%); # Write out the data $worksheet->write(0, 0, Company, $header); $worksheet->write(0, 1, Price, $header); $worksheet->write(0, 2, Volume, $header); $worksheet->write(0, 3, Change, $header); $worksheet->write(1, 0, Damage Inc. ); $worksheet->write(1, 1, 30.25, $f_price); # $30.25 $worksheet->write(1, 2, 1234567, $f_volume); # 1,234,567 $worksheet->write(1, 3, 0.085, $f_change); # 8.5% in green $worksheet->write(2, 0, Dump Corp. ); $worksheet->write(2, 1, 1.56, $f_price); # $1.56 $worksheet->write(2, 2, 7564, $f_volume); # 7,564 $worksheet->write(2, 3, -0.015, $f_change); # -1.5% in red $worksheet->write(3, 0, Rev Ltd. ); $worksheet->write(3, 1, 0.13, $f_price); # $0.13 $worksheet->write(3, 2, 321, $f_volume); # 321 $worksheet->write(3, 3, 0, $f_change); # 0 in the font color (black)

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/stocks.pl>

Example: tab_colors.pl

Example of how to set Excel worksheet tab colours.

Source code for this example:

#!/usr/bin/perl -w ####################################################################### # # Example of how to set Excel worksheet tab colours. # # reverse((c)), May 2006, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(tab_colors.xls); my $worksheet1 = $workbook->add_worksheet(); my $worksheet2 = $workbook->add_worksheet(); my $worksheet3 = $workbook->add_worksheet(); my $worksheet4 = $workbook->add_worksheet(); # Worksheet1 will have the default tab colour. $worksheet2->set_tab_color(red); $worksheet3->set_tab_color(green); $worksheet4->set_tab_color(0x35); # Orange

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/tab_colors.pl>

Example: textwrap.pl

Example of formatting using the Spreadsheet::WriteExcel module

This example shows how to wrap text in a cell. There are two alternatives, vertical justification and text wrap.

With vertical justification the text is wrapped automatically to fit the column width. With text wrap you must specify a newline with an embedded .

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # Example of formatting using the Spreadsheet::WriteExcel module # # This example shows how to wrap text in a cell. There are two alternatives, # vertical justification and text wrap. # # With vertical justification the text is wrapped automatically to fit the # column width. With text wrap you must specify a newline with an embedded . # # reverse((c)), March 2001, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; # Create a new workbook and add a worksheet my $workbook = Spreadsheet::WriteExcel->new(“textwrap.xls”); my $worksheet = $workbook->add_worksheet(); # Set the column width for columns 1, 2 and 3 $worksheet->set_column(1, 1, 24); $worksheet->set_column(2, 2, 34); $worksheet->set_column(3, 3, 34); # Set the row height for rows 1, 4, and 6. The height of row 2 will adjust # automatically to fit the text. # $worksheet->set_row(0, 30); $worksheet->set_row(3, 40); $worksheet->set_row(5, 80); # No newlines my $str1 = “For whatever we lose (like a you or a me) “; $str1 .= “its always ourselves we find in the sea”; # Embedded newlines my $str2 = “For whatever we lose (like a you or a me) “; $str2 .= “its always ourselves we find in the sea”; # Create a format for the column headings my $header = $workbook->add_format(); $header->set_bold(); $header->set_font(“Courier New”); $header->set_align(center); $header->set_align(vcenter); # Create a “vertical justification” format my $format1 = $workbook->add_format(); $format1->set_align(vjustify); # Create a “text wrap” format my $format2 = $workbook->add_format(); $format2->set_text_wrap(); # Write the headers $worksheet->write(0, 1, “set_align(vjustify)”, $header); $worksheet->write(0, 2, “set_align(vjustify)”, $header); $worksheet->write(0, 3, “set_text_wrap()”, $header); # Write some examples $worksheet->write(1, 1, $str1, $format1); $worksheet->write(1, 2, $str1, $format1); $worksheet->write(1, 3, $str2, $format2); $worksheet->write(3, 1, $str1, $format1); $worksheet->write(3, 2, $str1, $format1); $worksheet->write(3, 3, $str2, $format2); $worksheet->write(5, 1, $str1, $format1); $worksheet->write(5, 2, $str1, $format1); $worksheet->write(5, 3, $str2, $format2);

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/textwrap.pl>

Example: win32ole.pl

This is a simple example of how to create an Excel file using the Win32::OLE module for the sake of comparison.

#!/usr/bin/perl -w ############################################################################### # # This is a simple example of how to create an Excel file using the # Win32::OLE module for the sake of comparison. # # reverse((c)), March 2001, John McNamara, [email protected] # use strict; use Cwd; use Win32::OLE; use Win32::OLE::Const Microsoft Excel; my $application = Win32::OLE->new(“Excel.Application”); my $workbook = $application->Workbooks->Add; my $worksheet = $workbook->Worksheets(1); $worksheet->Cells(1,1)->{Value} = “Hello World”; $worksheet->Cells(2,1)->{Value} = “One”; $worksheet->Cells(3,1)->{Value} = “Two”; $worksheet->Cells(4,1)->{Value} = 3; $worksheet->Cells(5,1)->{Value} = 4.0000001; # Add some formatting $worksheet->Cells(1,1)->Font->{Bold} = “True”; $worksheet->Cells(1,1)->Font->{Size} = 16; $worksheet->Cells(1,1)->Font->{ColorIndex} = 3; $worksheet->Columns(“A:A”)->{ColumnWidth} = 25; # Write a hyperlink my $range = $worksheet->Range(“A7:A7”); $worksheet->Hyperlinks->Add({ Anchor => $range, Address => “http://www.perl.com/"}); # Get current directory using Cwd.pm my $dir = cwd(); $workbook->SaveAs({ FileName => $dir . /win32ole.xls, FileFormat => xlNormal, }); $workbook->Close;

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/win32ole.pl>

Example: write_arrays.pl

Example of how to use the Spreadsheet::WriteExcel module to write 1D and 2D arrays of data.

To find out more about array references refer(!!) to the perlref and perlreftut manpages. To find out more about 2D arrays or list of lists refer to the perllol manpage.

Source code for this example:

#!/usr/bin/perl -w ####################################################################### # # Example of how to use the Spreadsheet::WriteExcel module to # write 1D and 2D arrays of data. # # To find out more about array references refer(!!) to the perlref and # perlreftut manpages. To find out more about 2D arrays or “list of # lists” refer to the perllol manpage. # # reverse((c)), March 2002, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“write_arrays.xls”); my $worksheet1 = $workbook->add_worksheet(Example 1); my $worksheet2 = $workbook->add_worksheet(Example 2); my $worksheet3 = $workbook->add_worksheet(Example 3); my $worksheet4 = $workbook->add_worksheet(Example 4); my $worksheet5 = $workbook->add_worksheet(Example 5); my $worksheet6 = $workbook->add_worksheet(Example 6); my $worksheet7 = $workbook->add_worksheet(Example 7); my $worksheet8 = $workbook->add_worksheet(Example 8); my $format = $workbook->add_format(color => red, bold => 1); # Data arrays used in the following examples. # undef values are written as blank cells (with format if specified). # my @array = ( one, two, undef, four ); my @array2d = ( [maggie, milly, molly, may ], [13, 14, 15, 16 ], [shell, star, crab, stone], ); # 1. Write a row of data using an array reference. $worksheet1->write(A1, \array); # 2. Same as 1. above using an anonymous array ref. $worksheet2->write(A1, [ @array ]); # 3. Write a row of data using an explicit write_row() method call. # This is the same as calling write() in Ex. 1 above. # $worksheet3->write_row(A1, \array); # 4. Write a column of data using the write_col() method call. $worksheet4->write_col(A1, \array); # 5. Write a column of data using a ref to an array ref, i.e. a 2D array. $worksheet5->write(A1, [ \array ]); # 6. Write a 2D array in col-row order. $worksheet6->write(A1, \array2d); # 7. Write a 2D array in row-col order. $worksheet7->write_col(A1, \array2d); # 8. Write a row of data with formatting. The blank cell is also formatted. $worksheet8->write(A1, \array, $format);

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/write_arrays.pl>

Example: write_handler1.pl

Example of how to add a user defined data handler to the Spreadsheet:: WriteExcel write() method.

The following example shows how to add a handler for a 7 digit ID number.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # Example of how to add a user defined data handler to the Spreadsheet:: # WriteExcel write() method. # # The following example shows how to add a handler for a 7 digit ID number. # # # reverse((c)), September 2004, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“write_handler1.xls”); my $worksheet = $workbook->add_worksheet(); ############################################################################### # # Add a handler for 7 digit id numbers. This is useful when you want a string # such as 0000001 written as a string instead of a number and thus preserve # the leading zeroes. # # Note: you can get the same effect using the keep_leading_zeros() method but # this serves as a simple example. # $worksheet->add_write_handler(qr[^\d{7}$], \write_my_id); ############################################################################### # # The following function processes the data when a match is found. # sub write_my_id { my $worksheet = shift; return $worksheet->write_string(@_); } # This format maintains the cell as text even if it is edited. my $id_format = $workbook->add_format(num_format => @); # Write some numbers in the user defined format $worksheet->write(A1, 0000000, $id_format); $worksheet->write(A2, 0000001, $id_format); $worksheet->write(A3, 0004000, $id_format); $worksheet->write(A4, 1234567, $id_format); # Write some numbers that dont match the defined format $worksheet->write(A6, 000000, $id_format); $worksheet->write(A7, 000001, $id_format); $worksheet->write(A8, 004000, $id_format); $worksheet->write(A9, 123456, $id_format); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/write_handler1.pl>

Example: write_handler2.pl

Example of how to add a user defined data handler to the Spreadsheet:: WriteExcel write() method.

The following example shows how to add a handler for a 7 digit ID number. It adds an additional constraint to the write_handler1.pl in that it only filters data that isn’t in the third column.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # Example of how to add a user defined data handler to the Spreadsheet:: # WriteExcel write() method. # # The following example shows how to add a handler for a 7 digit ID number. # It adds an additional constraint to the write_handler1.pl in that it only # filters data that isnt in the third column. # # # reverse((c)), September 2004, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“write_handler2.xls”); my $worksheet = $workbook->add_worksheet(); ############################################################################### # # Add a handler for 7 digit id numbers. This is useful when you want a string # such as 0000001 written as a string instead of a number and thus preserve # the leading zeroes. # # Note: you can get the same effect using the keep_leading_zeros() method but # this serves as a simple example. # $worksheet->add_write_handler(qr[^\d{7}$], \write_my_id); ############################################################################### # # The following function processes the data when a match is found. The handler # is set up so that it only filters data if it is in the third column. # sub write_my_id { my $worksheet = shift; my $col = $_[1]; # col is zero based if ($col != 2) { return $worksheet->write_string(@_); } else { # Reject the match and return control to write() return undef; } } # This format maintains the cell as text even if it is edited. my $id_format = $workbook->add_format(num_format => @); # Write some numbers in the user defined format $worksheet->write(A1, 0000000, $id_format); $worksheet->write(B1, 0000001, $id_format); $worksheet->write(C1, 0000002, $id_format); $worksheet->write(D1, 0000003, $id_format); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/write_handler2.pl>

Example: write_handler3.pl

Example of how to add a user defined data handler to the Spreadsheet:: WriteExcel write() method.

The following example shows how to add a handler for dates in a specific format.

See write_handler4.pl for a more rigorous example with error handling.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # Example of how to add a user defined data handler to the Spreadsheet:: # WriteExcel write() method. # # The following example shows how to add a handler for dates in a specific # format. # # See write_handler4.pl for a more rigorous example with error handling. # # reverse((c)), September 2004, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“write_handler3.xls”); my $worksheet = $workbook->add_worksheet(); my $date_format = $workbook->add_format(num_format => dd/mm/yy); ############################################################################### # # Add a handler to match dates in the following format: d/m/yyyy # # The day and month can be single or double digits. # $worksheet->add_write_handler(qr[^\d{1,2}/\d{1,2}/\d{4}$], \write_my_date); ############################################################################### # # The following function processes the data when a match is found. # See write_handler4.pl for a more rigorous example with error handling. # sub write_my_date { my $worksheet = shift; my @args = @_; my $token = $args[2]; $token =~ qr[^(\d{1,2})/(\d{1,2})/(\d{4})$]; # Change to the date format required by write_date_time(). my $date = sprintf “%4d-%02d-%02dT”, $3, $2, $1; $args[2] = $date; return $worksheet->write_date_time(@args); } # Write some dates in the user defined format $worksheet->write(A1, 22/12/2004, $date_format); $worksheet->write(A2, 1/1/1995, $date_format); $worksheet->write(A3, 01/01/1995, $date_format); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/write_handler3.pl>

Example: write_handler4.pl

Example of how to add a user defined data handler to the Spreadsheet:: WriteExcel write() method.

The following example shows how to add a handler for dates in a specific format.

This is a more rigorous version of write_handler3.pl.

Source code for this example:

#!/usr/bin/perl -w ############################################################################### # # Example of how to add a user defined data handler to the Spreadsheet:: # WriteExcel write() method. # # The following example shows how to add a handler for dates in a specific # format. # # This is a more rigorous version of write_handler3.pl. # # reverse((c)), September 2004, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“write_handler4.xls”); my $worksheet = $workbook->add_worksheet(); my $date_format = $workbook->add_format(num_format => dd/mm/yy); ############################################################################### # # Add a handler to match dates in the following formats: d/m/yy, d/m/yyyy # # The day and month can be single or double digits and the year can be 2 or 4 # digits. # $worksheet->add_write_handler(qr[^\d{1,2}/\d{1,2}/\d{2,4}$], \write_my_date); ############################################################################### # # The following function processes the data when a match is found. # sub write_my_date { my $worksheet = shift; my @args = @_; my $token = $args[2]; if ($token =~ qr[^(\d{1,2})/(\d{1,2})/(\d{2,4})$]) { my $day = $1; my $mon = $2; my $year = $3; # Use a window for 2 digit dates. This will keep some ragged Perl # programmer employed in thirty years time. :-) if (length $year == 2) { if ($year < 50) { $year += 2000; } else { $year += 1900; } } my $date = sprintf “%4d-%02d-%02dT”, $year, $mon, $day; # Convert the ISO ISO8601 style string to an Excel date $date = $worksheet->convert_date_time($date); if (defined $date) { # Date was valid $args[2] = $date; return $worksheet->write_number(@args); } else { # Not a valid date therefore write as a string return $worksheet->write_string(@args); } } else { # Shouldnt happen if the same match is used in the re and sub. return undef; } } # Write some dates in the user defined format $worksheet->write(A1, 22/12/2004, $date_format); $worksheet->write(A2, 22/12/04, $date_format); $worksheet->write(A3, 2/12/04, $date_format); $worksheet->write(A4, 2/5/04, $date_format); $worksheet->write(A5, 2/5/95, $date_format); $worksheet->write(A6, 2/5/1995, $date_format); # Some erroneous dates $worksheet->write(A8, 2/5/1895, $date_format); # Date out of Excel range $worksheet->write(A9, 29/2/2003, $date_format); # Invalid leap day $worksheet->write(A10,50/50/50, $date_format); # Matches but isnt a date _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/write_handler4.pl>

Example: write_to_scalar.pl

An example of writing an Excel file to a Perl scalar using Spreadsheet:: WriteExcel and the new features of perl 5.8.

For an examples of how to write to a scalar in versions prior to perl 5.8 see the filehandle.pl program and IO:Scalar.

#!/usr/bin/perl -w ############################################################################## # # An example of writing an Excel file to a Perl scalar using Spreadsheet:: # WriteExcel and the new features of perl 5.8. # # For an examples of how to write to a scalar in versions prior to perl 5.8 # see the filehandle.pl program and IO:Scalar. # # reverse((c)), September 2004, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; require 5.008; # Use perl 5.8s feature of using a scalar as a filehandle. my $fh; my $str = ; open $fh, >, \str or die “Failed to open filehandle: $!”; # Or replace the previous three lines with this: # open my $fh, >, \my $str or die “Failed to open filehandle: $!”; # Spreadsheet::WriteExce accepts filehandle as well as file names. my $workbook = Spreadsheet::WriteExcel->new($fh); my $worksheet = $workbook->add_worksheet(); $worksheet->write(0, 0, “Hi Excel!”); $workbook->close(); # The Excel file in now in $str. Remember to binmode() the output # filehandle before printing it. binmode STDOUT; print $str; _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/write_to_scalar.pl>

Example: unicode_utf16.pl

A simple example of writing some Unicode text with Spreadsheet::WriteExcel.

This example shows UTF16 encoding. With perl 5.8 it is also possible to use utf8 without modification.

Source code for this example:

#!/usr/bin/perl -w ############################################################################## # # A simple example of writing some Unicode text with Spreadsheet::WriteExcel. # # This example shows UTF16 encoding. With perl 5.8 it is also possible to use # utf8 without modification. # # reverse((c)), May 2004, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(unicode_utf16.xls); my $worksheet = $workbook->add_worksheet(); # Write the Unicode smiley face (with increased font for legibility) my $smiley = pack “n”, 0x263a; my $big_font = $workbook->add_format(size => 40); $worksheet->write_utf16be_string(A3, $smiley, $big_font); # Write a phrase in Cyrillic my $uni_str = pack “H*”, “042d0442043e002004440440043004370430002004”. “3d043000200440044304410441043a043e043c0021”; $worksheet->write_utf16be_string(A5, $uni_str); $worksheet->write_utf16be_string(A7, pack “H*”, “0074006500730074”); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/unicode_utf16.pl>

Example: unicode_utf16_japan.pl

A simple example of writing some Unicode text with Spreadsheet::WriteExcel.

This creates an Excel file with the word Nippon in 3 character sets.

This example shows UTF16 encoding. With perl 5.8 it is also possible to use utf8 without modification.

See also the unicode_2022_jp.pl and unicode_shift_jis.pl examples.

Source code for this example:

#!/usr/bin/perl -w ############################################################################## # # A simple example of writing some Unicode text with Spreadsheet::WriteExcel. # # This creates an Excel file with the word Nippon in 3 character sets. # # This example shows UTF16 encoding. With perl 5.8 it is also possible to use # utf8 without modification. # # See also the unicode_2022_jp.pl and unicode_shift_jis.pl examples. # # reverse((c)), May 2004, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(unicode_utf16_japan.xls); my $worksheet = $workbook->add_worksheet(); # Set a Unicode font. my $uni_font = $workbook->add_format(font => Arial Unicode MS); # Create some UTF-16BE Unicode text. my $kanji = pack n*, 0x65e5, 0x672c; my $katakana = pack n*, 0xff86, 0xff8e, 0xff9d; my $hiragana = pack n*, 0x306b, 0x307b, 0x3093; $worksheet->write_utf16be_string(A1, $kanji, $uni_font); $worksheet->write_utf16be_string(A2, $katakana, $uni_font); $worksheet->write_utf16be_string(A3, $hiragana, $uni_font); $worksheet->write(B1, Kanji); $worksheet->write(B2, Katakana); $worksheet->write(B3, Hiragana); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/unicode_utf16_japan.pl>

Example: unicode_cyrillic.pl

A simple example of writing some Russian cyrillic text using Spreadsheet::WriteExcel and perl 5.8.

Source code for this example:

#!/usr/bin/perl -w ############################################################################## # # A simple example of writing some Russian cyrillic text using # Spreadsheet::WriteExcel and perl 5.8. # # reverse((c)), March 2005, John McNamara, [email protected] # # Perl 5.8 or later is required for proper utf8 handling. For older perl # versions you should use UTF16 and the write_utf16be_string() method. # See the write_utf16be_string section of the Spreadsheet::WriteExcel docs. # require 5.008; use strict; use Spreadsheet::WriteExcel; # In this example we generate utf8 strings from character data but in a # real application we would expect them to come from an external source. # # Create a Russian worksheet name in utf8. my $sheet = pack “U*”, 0x0421, 0x0442, 0x0440, 0x0430, 0x043D, 0x0438, 0x0446, 0x0430; # Create a Russian string. my $str = pack “U*”, 0x0417, 0x0434, 0x0440, 0x0430, 0x0432, 0x0441, 0x0442, 0x0432, 0x0443, 0x0439, 0x0020, 0x041C, 0x0438, 0x0440, 0x0021; my $workbook = Spreadsheet::WriteExcel->new(“unicode_cyrillic.xls”); my $worksheet = $workbook->add_worksheet($sheet . 1); $worksheet->set_column(A:A, 18); $worksheet->write(A1, $str); _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/unicode_cyrillic.pl>

Example: unicode_list.pl

A simple example using Spreadsheet::WriteExcel to display all available Unicode characters in a font.

Source code for this example:

#!/usr/bin/perl -w ############################################################################## # # A simple example using Spreadsheet::WriteExcel to display all available # Unicode characters in a font. # # reverse((c)), May 2004, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(unicode_list.xls); my $worksheet = $workbook->add_worksheet(); # Set a Unicode font. my $uni_font = $workbook->add_format(font => Arial Unicode MS); # Ascii font for labels. my $courier = $workbook->add_format(font => Courier New); my $char = 0; # Loop through all 32768 UTF-16BE characters. # for my $row (0 .. 2 ** 12 -1) { for my $col (0 .. 31) { last if $char == 0xffff; if ($col % 2 == 0){ $worksheet->write_string($row, $col, sprintf(0x%04X, $char), $courier); } else { $worksheet->write_utf16be_string($row, $col, pack(n, $char++), $uni_font); } } } _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/unicode_list.pl>

Example: unicode_2022_jp.pl

A simple example of converting some Unicode text to an Excel file using Spreadsheet::WriteExcel and perl 5.8.

This example generates some Japanese from a file with ISO-2022-JP encoded text.

Source code for this example:

#!/usr/bin/perl -w ############################################################################## # # A simple example of converting some Unicode text to an Excel file using # Spreadsheet::WriteExcel and perl 5.8. # # This example generates some Japanese from a file with ISO-2022-JP # encoded text. # # reverse((c)), September 2004, John McNamara, [email protected] # # Perl 5.8 or later is required for proper utf8 handling. For older perl # versions you should use UTF16 and the write_utf16be_string() method. # See the write_utf16be_string section of the Spreadsheet::WriteExcel docs. # require 5.008; use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“unicode_2022_jp.xls”); my $worksheet = $workbook->add_worksheet(); $worksheet->set_column(A:A, 50); my $file = unicode_2022_jp.txt; open FH, <:encoding(iso-2022-jp), $file or die “Couldnt open $file: $! “; my $row = 0; while (<FH>) { next if /^#/; # Ignore the comments in the sample file. chomp; $worksheet->write($row++, 0, $_); } _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/unicode_2022_jp.pl>

Example: unicode_8859_11.pl

A simple example of converting some Unicode text to an Excel file using Spreadsheet::WriteExcel and perl 5.8.

This example generates some Thai from a file with ISO-8859-11 encoded text.

Source code for this example:

#!/usr/bin/perl -w ############################################################################## # # A simple example of converting some Unicode text to an Excel file using # Spreadsheet::WriteExcel and perl 5.8. # # This example generates some Thai from a file with ISO-8859-11 encoded text. # # # reverse((c)), September 2004, John McNamara, [email protected] # # Perl 5.8 or later is required for proper utf8 handling. For older perl # versions you should use UTF16 and the write_utf16be_string() method. # See the write_utf16be_string section of the Spreadsheet::WriteExcel docs. # require 5.008; use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“unicode_8859_11.xls”); my $worksheet = $workbook->add_worksheet(); $worksheet->set_column(A:A, 50); my $file = unicode_8859_11.txt; open FH, <:encoding(iso-8859-11), $file or die “Couldnt open $file: $! “; my $row = 0; while (<FH>) { next if /^#/; # Ignore the comments in the sample file. chomp; $worksheet->write($row++, 0, $_); } _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/unicode_8859_11.pl>

Example: unicode_8859_7.pl

A simple example of converting some Unicode text to an Excel file using Spreadsheet::WriteExcel and perl 5.8.

This example generates some Greek from a file with ISO-8859-7 encoded text.

Source code for this example:

#!/usr/bin/perl -w ############################################################################## # # A simple example of converting some Unicode text to an Excel file using # Spreadsheet::WriteExcel and perl 5.8. # # This example generates some Greek from a file with ISO-8859-7 encoded text. # # # reverse((c)), September 2004, John McNamara, [email protected] # # Perl 5.8 or later is required for proper utf8 handling. For older perl # versions you should use UTF16 and the write_utf16be_string() method. # See the write_utf16be_string section of the Spreadsheet::WriteExcel docs. # require 5.008; use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“unicode_8859_7.xls”); my $worksheet = $workbook->add_worksheet(); $worksheet->set_column(A:A, 50); my $file = unicode_8859_7.txt; open FH, <:encoding(iso-8859-7), $file or die “Couldnt open $file: $! “; my $row = 0; while (<FH>) { next if /^#/; # Ignore the comments in the sample file. chomp; $worksheet->write($row++, 0, $_); } _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/unicode_8859_7.pl>

Example: unicode_big5.pl

A simple example of converting some Unicode text to an Excel file using Spreadsheet::WriteExcel and perl 5.8.

This example generates some Chinese from a file with BIG5 encoded text.

Source code for this example:

#!/usr/bin/perl -w ############################################################################## # # A simple example of converting some Unicode text to an Excel file using # Spreadsheet::WriteExcel and perl 5.8. # # This example generates some Chinese from a file with BIG5 encoded text. # # # reverse((c)), September 2004, John McNamara, [email protected] # # Perl 5.8 or later is required for proper utf8 handling. For older perl # versions you should use UTF16 and the write_utf16be_string() method. # See the write_utf16be_string section of the Spreadsheet::WriteExcel docs. # require 5.008; use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“unicode_big5.xls”); my $worksheet = $workbook->add_worksheet(); $worksheet->set_column(A:A, 80); my $file = unicode_big5.txt; open FH, <:encoding(big5), $file or die “Couldnt open $file: $! “; my $row = 0; while (<FH>) { next if /^#/; # Ignore the comments in the sample file. chomp; $worksheet->write($row++, 0, $_); } _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/unicode_big5.pl>

Example: unicode_cp1251.pl

A simple example of converting some Unicode text to an Excel file using Spreadsheet::WriteExcel and perl 5.8.

This example generates some Russian from a file with CP1251 encoded text.

Source code for this example:

#!/usr/bin/perl -w ############################################################################## # # A simple example of converting some Unicode text to an Excel file using # Spreadsheet::WriteExcel and perl 5.8. # # This example generates some Russian from a file with CP1251 encoded text. # # # reverse((c)), September 2004, John McNamara, [email protected] # # Perl 5.8 or later is required for proper utf8 handling. For older perl # versions you should use UTF16 and the write_utf16be_string() method. # See the write_utf16be_string section of the Spreadsheet::WriteExcel docs. # require 5.008; use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“unicode_cp1251.xls”); my $worksheet = $workbook->add_worksheet(); $worksheet->set_column(A:A, 50); my $file = unicode_cp1251.txt; open FH, <:encoding(cp1251), $file or die “Couldnt open $file: $! “; my $row = 0; while (<FH>) { next if /^#/; # Ignore the comments in the sample file. chomp; $worksheet->write($row++, 0, $_); } _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/unicode_cp1251.pl>

Example: unicode_cp1256.pl

A simple example of converting some Unicode text to an Excel file using Spreadsheet::WriteExcel and perl 5.8.

This example generates some Arabic text from a CP-1256 encoded file.

Source code for this example:

#!/usr/bin/perl -w ############################################################################## # # A simple example of converting some Unicode text to an Excel file using # Spreadsheet::WriteExcel and perl 5.8. # # This example generates some Arabic text from a CP-1256 encoded file. # # # reverse((c)), September 2004, John McNamara, [email protected] # # Perl 5.8 or later is required for proper utf8 handling. For older perl # versions you should use UTF16 and the write_utf16be_string() method. # See the write_utf16be_string section of the Spreadsheet::WriteExcel docs. # require 5.008; use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“unicode_cp1256.xls”); my $worksheet = $workbook->add_worksheet(); $worksheet->set_column(A:A, 50); my $file = unicode_cp1256.txt; open FH, <:encoding(cp1256), $file or die “Couldnt open $file: $! “; my $row = 0; while (<FH>) { next if /^#/; # Ignore the comments in the sample file. chomp; $worksheet->write($row++, 0, $_); } _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/unicode_cp1256.pl>

Example: unicode_koi8r.pl

A simple example of converting some Unicode text to an Excel file using Spreadsheet::WriteExcel and perl 5.8.

This example generates some Russian from a file with KOI8-R encoded text.

Source code for this example:

#!/usr/bin/perl -w ############################################################################## # # A simple example of converting some Unicode text to an Excel file using # Spreadsheet::WriteExcel and perl 5.8. # # This example generates some Russian from a file with KOI8-R encoded text. # # # reverse((c)), September 2004, John McNamara, [email protected] # # Perl 5.8 or later is required for proper utf8 handling. For older perl # versions you should use UTF16 and the write_utf16be_string() method. # See the write_utf16be_string section of the Spreadsheet::WriteExcel docs. # require 5.008; use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“unicode_koi8r.xls”); my $worksheet = $workbook->add_worksheet(); $worksheet->set_column(A:A, 50); my $file = unicode_koi8r.txt; open FH, <:encoding(koi8-r), $file or die “Couldnt open $file: $! “; my $row = 0; while (<FH>) { next if /^#/; # Ignore the comments in the sample file. chomp; $worksheet->write($row++, 0, $_); } _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/unicode_koi8r.pl>

Example: unicode_polish_utf8.pl

A simple example of converting some Unicode text to an Excel file using Spreadsheet::WriteExcel and perl 5.8.

This example generates some Polish from a file with UTF8 encoded text.

Source code for this example:

#!/usr/bin/perl -w ############################################################################## # # A simple example of converting some Unicode text to an Excel file using # Spreadsheet::WriteExcel and perl 5.8. # # This example generates some Polish from a file with UTF8 encoded text. # # # reverse((c)), September 2004, John McNamara, [email protected] # # Perl 5.8 or later is required for proper utf8 handling. For older perl # versions you should use UTF16 and the write_utf16be_string() method. # See the write_utf16be_string section of the Spreadsheet::WriteExcel docs. # require 5.008; use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“unicode_polish_utf8.xls”); my $worksheet = $workbook->add_worksheet(); $worksheet->set_column(A:A, 50); my $file = unicode_polish_utf8.txt; open FH, <:encoding(utf8), $file or die “Couldnt open $file: $! “; my $row = 0; while (<FH>) { next if /^#/; # Ignore the comments in the sample file. chomp; $worksheet->write($row++, 0, $_); } _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/unicode_polish_utf8.pl>

Example: unicode_shift_jis.pl

A simple example of converting some Unicode text to an Excel file using Spreadsheet::WriteExcel and perl 5.8.

This example generates some Japenese text from a file with Shift-JIS encoded text.

Source code for this example:

#!/usr/bin/perl -w ############################################################################## # # A simple example of converting some Unicode text to an Excel file using # Spreadsheet::WriteExcel and perl 5.8. # # This example generates some Japenese text from a file with Shift-JIS # encoded text. # # reverse((c)), September 2004, John McNamara, [email protected] # # Perl 5.8 or later is required for proper utf8 handling. For older perl # versions you should use UTF16 and the write_utf16be_string() method. # See the write_utf16be_string section of the Spreadsheet::WriteExcel docs. # require 5.008; use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(“unicode_shift_jis.xls”); my $worksheet = $workbook->add_worksheet(); $worksheet->set_column(A:A, 50); my $file = unicode_shift_jis.txt; open FH, <:encoding(shiftjis), $file or die “Couldnt open $file: $! “; my $row = 0; while (<FH>) { next if /^#/; # Ignore the comments in the sample file. chomp; $worksheet->write($row++, 0, $_); } _ _END_ _

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/unicode_shift_jis.pl>

Example: csv2xls.pl

Example of how to use the WriteExcel module

Simple program to convert a CSV comma-separated value file to an Excel file. This is more or less an non-op since Excel can read CSV files. The program uses Text::CSV_XS to parse the CSV.

Usage: csv2xls.pl file.csv newfile.xls

NOTE: This is only a simple conversion utility for illustrative purposes. For converting a CSV or Tab separated or any other type of delimited text file to Excel I recommend the more rigorous csv2xls program that is part of H.Merijn Brand’s Text::CSV_XS module distro.

See the examples/csv2xls link here: <http://search.cpan.org/~hmbrand/Text-CSV_XS/MANIFEST>

#!/usr/bin/perl -w ############################################################################### # # Example of how to use the WriteExcel module # # Simple program to convert a CSV comma-separated value file to an Excel file. # This is more or less an non-op since Excel can read CSV files. # The program uses Text::CSV_XS to parse the CSV. # # Usage: csv2xls.pl file.csv newfile.xls # # # NOTE: This is only a simple conversion utility for illustrative purposes. # For converting a CSV or Tab separated or any other type of delimited # text file to Excel I recommend the more rigorous csv2xls program that is # part of H.Merijn Brands Text::CSV_XS module distro. # # See the examples/csv2xls link here: # L<http://search.cpan.org/~hmbrand/Text-CSV_XS/MANIFEST> # # reverse((c)), March 2001, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; use Text::CSV_XS; # Check for valid number of arguments if (($#ARGV < 1) || ($#ARGV > 2)) { die(“Usage: csv2xls csvfile.txt newfile.xls “); }; # Open the Comma Separated Variable file open (CSVFILE, $ARGV[0]) or die “$ARGV[0]: $!”; # Create a new Excel workbook my $workbook = Spreadsheet::WriteExcel->new($ARGV[1]); my $worksheet = $workbook->add_worksheet(); # Create a new CSV parsing object my $csv = Text::CSV_XS->new; # Row and column are zero indexed my $row = 0; while (<CSVFILE>) { if ($csv->parse($_)) { my @Fld = $csv->fields; my $col = 0; foreach my $token (@Fld) { $worksheet->write($row, $col, $token); $col++; } $row++; } else { my $err = $csv->error_input; print “Text::CSV_XS parse() failed on argument: “, $err, " “; } }

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/csv2xls.pl>

Example: tab2xls.pl

Example of how to use the WriteExcel module

The following converts a tab separated file into an Excel file

Usage: tab2xls.pl tabfile.txt newfile.xls

NOTE: This is only a simple conversion utility for illustrative purposes. For converting a CSV or Tab separated or any other type of delimited text file to Excel I recommend the more rigorous csv2xls program that is part of H.Merijn Brand’s Text::CSV_XS module distro.

See the examples/csv2xls link here: <http://search.cpan.org/~hmbrand/Text-CSV_XS/MANIFEST>

#!/usr/bin/perl -w ############################################################################### # # Example of how to use the WriteExcel module # # The following converts a tab separated file into an Excel file # # Usage: tab2xls.pl tabfile.txt newfile.xls # # # NOTE: This is only a simple conversion utility for illustrative purposes. # For converting a CSV or Tab separated or any other type of delimited # text file to Excel I recommend the more rigorous csv2xls program that is # part of H.Merijn Brands Text::CSV_XS module distro. # # See the examples/csv2xls link here: # L<http://search.cpan.org/~hmbrand/Text-CSV_XS/MANIFEST> # # reverse((c)), March 2001, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; # Check for valid number of arguments if (($#ARGV < 1) || ($#ARGV > 2)) { die(“Usage: tab2xls tabfile.txt newfile.xls “); }; # Open the tab delimited file open (TABFILE, $ARGV[0]) or die “$ARGV[0]: $!”; # Create a new Excel workbook my $workbook = Spreadsheet::WriteExcel->new($ARGV[1]); my $worksheet = $workbook->add_worksheet(); # Row and column are zero indexed my $row = 0; while (<TABFILE>) { chomp; # Split on single tab my @Fld = split( , $_); my $col = 0; foreach my $token (@Fld) { $worksheet->write($row, $col, $token); $col++; } $row++; }

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/tab2xls.pl>

Example: datecalc1.pl

NOTE: An easier way of writing dates and times is to use the newer write_date_time() Worksheet method. See the date_time.pl example.

Demonstration of writing date/time cells to Excel spreadsheets, using UNIX/Perl time as source of date/time.

UNIX/Perl time is the time since the Epoch (00:00:00 GMT, 1 Jan 1970) measured in seconds.

An Excel file can use exactly one of two different date/time systems. In these systems, a floating point number represents the number of days (and fractional parts of the day) since a start point. The floating point number is referred to as a ‘serial’.

The two systems (‘1900’ and ‘1904’) use different starting points:

1900; 1.00 is 1 Jan 1900 BUT 1900 is erroneously regarded as a leap year - see: http://support.microsoft.com/support/kb/articles/Q181/3/70.asp for the excuse^H^H^H^H^H^Hreason. 1904; 1.00 is 2 Jan 1904.

The ‘1904’ system is the default for Apple Macs. Windows versions of Excel have the option to use the ‘1904’ system.

Note that Visual Basic’s DateSerial function does NOT erroneously regard 1900 as a leap year, and thus its serials do not agree with the 1900 serials of Excel for dates before 1 Mar 1900.

Note that StarOffice (at least at version 5.2) does NOT erroneously regard 1900 as a leap year, and thus its serials do not agree with the 1900 serials of Excel for dates before 1 Mar 1900.

#!/usr/bin/perl -w ###################################################################### # # NOTE: An easier way of writing dates and times is to use the newer # write_date_time() Worksheet method. See the date_time.pl example. # ###################################################################### # # Demonstration of writing date/time cells to Excel spreadsheets, # using UNIX/Perl time as source of date/time. # ###################################################################### # # UNIX/Perl time is the time since the Epoch (00:00:00 GMT, 1 Jan 1970) # measured in seconds. # # An Excel file can use exactly one of two different date/time systems. # In these systems, a floating point number represents the number of days # (and fractional parts of the day) since a start point. The floating point # number is referred to as a serial. # # The two systems (1900 and 1904) use different starting points: # # 1900; 1.00 is 1 Jan 1900 BUT 1900 is erroneously regarded as # a leap year - see: # http://support.microsoft.com/support/kb/articles/Q181/3/70.asp # for the excuse^H^H^H^H^H^Hreason. # 1904; 1.00 is 2 Jan 1904. # # The 1904 system is the default for Apple Macs. Windows versions of # Excel have the option to use the 1904 system. # # Note that Visual Basics “DateSerial” function does NOT erroneously # regard 1900 as a leap year, and thus its serials do not agree with # the 1900 serials of Excel for dates before 1 Mar 1900. # # Note that StarOffice (at least at version 5.2) does NOT erroneously # regard 1900 as a leap year, and thus its serials do not agree with # the 1900 serials of Excel for dates before 1 Mar 1900. # # Copyright 2000, Andrew Benham, [email protected] # ###################################################################### # # Calculation description # ======================= # # 1900 system # ———– # Unix time is 0 at 00:00:00 GMT 1 Jan 1970, i.e. 70 years after 1 Jan 1900. # Of those 70 years, 17 (1904,08,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68) # were leap years with an extra day. # Thus there were 17 + 70*365 days = 25567 days between 1 Jan 1900 and # 1 Jan 1970. # In the 1900 system, 1 is 1 Jan 1900, but as 1900 was not a leap year # 1 Jan 1900 should really be 2, so 1 Jan 1970 is 25569. # # 1904 system # ———– # Unix time is 0 at 00:00:00 GMT 1 Jan 1970, i.e. 66 years after 1 Jan 1904. # Of those 66 years, 17 (1904,08,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68) # were leap years with an extra day. # Thus there were 17 + 66*365 days = 24107 days between 1 Jan 1904 and # 1 Jan 1970. # In the 1904 system, 2 Jan 1904 being 1, 1 Jan 1970 is 24107. # ###################################################################### # # Copyright (c) 2000, Andrew Benham. # This program is free software. It may be used, redistributed and/or # modified under the same terms as Perl itself. # # Andrew Benham, [email protected] # London, United Kingdom # 11 Nov 2000 # ###################################################################### use strict; use Spreadsheet::WriteExcel; use Time::Local; use vars qw/$DATE_SYSTEM/; # Use 1900 date system on all platforms other than Apple Mac (for which # use 1904 date system). $DATE_SYSTEM = ($^O eq MacOS) ? 1 : 0; my $workbook = Spreadsheet::WriteExcel->new(“dates.xls”); my $worksheet = $workbook->add_worksheet(); my $format_date = $workbook->add_format(); $format_date->set_num_format(d mmmm yyy); $worksheet->set_column(0,1,21); $worksheet->write_string (0,0,“The epoch (GMT)”); $worksheet->write_number (0,1,&calc_serial(0,1),0x16); $worksheet->write_string (1,0,“The epoch (localtime)”); $worksheet->write_number (1,1,&calc_serial(0,0),0x16); $worksheet->write_string (2,0,“Today”); $worksheet->write_number (2,1,&calc_serial(),$format_date); my $christmas2000 = timelocal(0,0,0,25,11,100); $worksheet->write_string (3,0,“Christmas 2000”); $worksheet->write_number (3,1,&calc_serial($christmas2000),$format_date); $workbook->close(); #———————————————————– # calc_serial() # # Called with (up to) 2 parameters. # 1. Unix timestamp. If omitted, uses current time. # 2. GMT flag. Set to 1 to return serial in GMT. # If omitted, returns serial in appropriate timezone. # # Returns date/time serial according to $DATE_SYSTEM selected #———————————————————– sub calc_serial { my $time = (defined $_[0]) ? $_[0] : time(); my $gmtflag = (defined $_[1]) ? $_[1] : 0; # Divide timestamp by number of seconds in a day. # This gives a date serial with 0 on 1 Jan 1970. my $serial = $time / 86400; # Adjust the date serial by the offset appropriate to the # currently selected system (1900/1904). if ($DATE_SYSTEM == 0) { # use 1900 system $serial += 25569; } else { # use 1904 system $serial += 24107; } unless ($gmtflag) { # Now have a raw serial with the right offset. But this # gives a serial in GMT, which is false unless the timezone # is GMT. We need to adjust the serial by the appropriate # timezone offset. # Calculate the appropriate timezone offset by seeing what # the differences between localtime and gmtime for the given # time are. my @gmtime = gmtime($time); my @ltime = localtime($time); # For the first 7 elements of the two arrays, adjust the # date serial where the elements differ. for (0 .. 6) { my $diff = $ltime[$_] - $gmtime[$_]; if ($diff) { $serial += _adjustment($diff,$_); } } } # Perpetuate the error that 1900 was a leap year by decrementing # the serial if were using the 1900 system and the date is prior to # 1 Mar 1900. This has the effect of making serial value 60 # 29 Feb 1900. # This fix only has any effect if UNIX/Perl time on the platform # can represent 1900. Many cant. unless ($DATE_SYSTEM) { $serial– if ($serial < 61); # 61 is 1 Mar 1900 } return $serial; } sub _adjustment { # Based on the difference in the localtime/gmtime array elements # number, return the adjustment required to the serial. # We only look at some elements of the localtime/gmtime arrays: # seconds unlikely to be different as all known timezones # have an offset of integral multiples of 15 minutes, # but its easy to do. # minutes will be different for timezone offsets which are # not an exact number of hours. # hours very likely to be different. # weekday will differ when localtime/gmtime difference # straddles midnight. # # Assume that difference between localtime and gmtime is less than # 5 days, then dont have to do maths for day of month, month number, # year number, etc… my ($delta,$element) = @_; my $adjust = 0; if ($element == 0) { # Seconds $adjust = $delta/86400; # 60 * 60 * 24 } elsif ($element == 1) { # Minutes $adjust = $delta/1440; # 60 * 24 } elsif ($element == 2) { # Hours $adjust = $delta/24; # 24 } elsif ($element == 6) { # Day of week number # Catch difference straddling Sat/Sun in either direction $delta += 7 if ($delta < -4); $delta -= 7 if ($delta > 4); $adjust = $delta; } return $adjust; }

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/datecalc1.pl>

Example: datecalc2.pl

Example of how to using the Date::Calc module to calculate Excel dates.

NOTE: An easier way of writing dates and times is to use the newer write_date_time() Worksheet method. See the date_time.pl example.

#!/usr/bin/perl -w ############################################################################### # # Example of how to using the Date::Calc module to calculate Excel dates. # # NOTE: An easier way of writing dates and times is to use the newer # write_date_time() Worksheet method. See the date_time.pl example. # # reverse((c)), June 2001, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; use Date::Calc qw(Delta_DHMS); # You may need to install this module. # Create a new workbook and add a worksheet my $workbook = Spreadsheet::WriteExcel->new(“excel_date2.xls”); my $worksheet = $workbook->add_worksheet(); # Expand the first column so that the date is visible. $worksheet->set_column(“A:A”, 25); # Add a format for the date my $format = $workbook->add_format(); $format->set_num_format(d mmmm yyy HH:MM:SS); my $date; # Write some dates and times $date = excel_date(1900, 1, 1); $worksheet->write(“A1”, $date, $format); $date = excel_date(2000, 1, 1); $worksheet->write(“A2”, $date, $format); $date = excel_date(2000, 4, 17, 14, 33, 15); $worksheet->write(“A3”, $date, $format); ############################################################################### # # excel_date($years, $months, $days, $hours, $minutes, $seconds) # # Create an Excel date in the 1900 format. All of the arguments are optional # but you should at least add $years. # # Corrects for Excels missing leap day in 1900. See excel_time1.pl for an # explanation. # sub excel_date { my $years = $_[0] || 1900; my $months = $_[1] || 1; my $days = $_[2] || 1; my $hours = $_[3] || 0; my $minutes = $_[4] || 0; my $seconds = $_[5] || 0; my @date = ($years, $months, $days, $hours, $minutes, $seconds); my @epoch = (1899, 12, 31, 0, 0, 0); ($days, $hours, $minutes, $seconds) = Delta_DHMS(@epoch, @date); my $date = $days + ($hours*3600 +$minutes*60 +$seconds)/(24*60*60); # Add a day for Excels missing leap day in 1900 $date++ if ($date > 59); return $date; } ############################################################################### # # excel_date($years, $months, $days, $hours, $minutes, $seconds) # # Create an Excel date in the 1904 format. All of the arguments are optional # but you should at least add $years. # # You will also need to call $workbook->set_1904() for this format to be valid. # sub excel_date_1904 { my $years = $_[0] || 1900; my $months = $_[1] || 1; my $days = $_[2] || 1; my $hours = $_[3] || 0; my $minutes = $_[4] || 0; my $seconds = $_[5] || 0; my @date = ($years, $months, $days, $hours, $minutes, $seconds); my @epoch = (1904, 1, 1, 0, 0, 0); ($days, $hours, $minutes, $seconds) = Delta_DHMS(@epoch, @date); my $date = $days + ($hours*3600 +$minutes*60 +$seconds)/(24*60*60); return $date; }

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/datecalc2.pl>

Example: lecxe.pl

Utility program to convert an Excel file into a Spreadsheet::WriteExcel program using Win32::OLE

#!/usr/bin/perl -w # # Utility program to convert an Excel file into a Spreadsheet::WriteExcel # program using Win32::OLE # # # lecxe program # by [email protected] # # Version 0.01a Initial release (alpha) # Modules use strict; use Win32::OLE; use Win32::OLE::Const; use Getopt::Std; # Vars use vars qw(%opts); # Get options getopts(i:o:v,\opts); # Not enough options exit &usage unless ($opts{i} && $opts{o}); # Create Excel object my $Excel = new Win32::OLE(“Excel.Application”,“Quit”) or die “Cant start excel: $!”; # Get constants my $ExcelConst=Win32::OLE::Const->Load(“Microsoft Excel”); # Show Excel $Excel->{Visible} = 1 if ($opts{v}); # Open infile my $Workbook = $Excel->Workbooks->Open({Filename=>$opts{i}}); # Open outfile open (OUTFILE,">$opts{o}”) or die “Cant open outfile $opts{o}: $!”; # Print header for outfile print OUTFILE <<EOH; #!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; use vars qw($workbook %worksheets %formats); $workbook = Spreadsheet::WriteExcel->new(”_change_me_.xls”); EOH # Loop all sheets foreach my $sheetnum (1..$Excel->Workbooks(1)->Worksheets->Count) { # Format sheet my $name=$Excel->Workbooks(1)->Worksheets($sheetnum)->Name; print “Sheet $name " if ($opts{v}); print OUTFILE “# Sheet $name “; print OUTFILE “\worksheets{$name} = \workbook->add_worksheet($name); “; # Get usedrange of cells in worksheet my $usedrange=$Excel->Workbooks(1)->Worksheets($sheetnum)->UsedRange; # Loop all columns in used range foreach my $j (1..$usedrange->Columns->Count){ # Format column print “Col $j " if ($opts{v}); my ($colwidth); $colwidth=$usedrange->Columns($j)->ColumnWidth; print OUTFILE “# Column $j “; print OUTFILE “\worksheets{$name}->set_column(”.($j-1).”,”.($j-1). “, $colwidth); “; # Loop all rows in used range foreach my $i (1..$usedrange->Rows->Count){ # Format row print “Row $i " if ($opts{v}); print OUTFILE “# Row $i “; do { my ($rowheight); $rowheight=$usedrange->Rows($i)->RowHeight; print OUTFILE “\worksheets{$name}->set_row(”.($i-1). “, $rowheight); “; } if ($j==1); # Start creating cell format my $fname="\formats{”.$name.R.$i.C.$j.”}”; my $format="$fname=\workbook->add_format(); “; my $print_format=0; # Check for borders my @bfnames=qw(left right top bottom); foreach my $k (1..$usedrange->Cells($i,$j)->Borders->Count) { my $lstyle=$usedrange->Cells($i,$j)->Borders($k)->LineStyle; if ($lstyle > 0) { $format.=$fname.”->set_”.$bfnames[$k-1].”($lstyle); “; $print_format=1; } } # Check for font my ($fontattr,$prop,$func,%fontsets,$fontColor); %fontsets=(Name=>set_font, Size=>set_size); while (($prop,$func) = each %fontsets) { $fontattr=$usedrange->Cells($i,$j)->Font->$prop; if ($fontattr ne “”) { $format.=$fname.”->$func($fontattr); “; $print_format=1; } } %fontsets=(Bold=>set_bold(1), Italic=>set_italic(1), Underline=>set_underline(1), Strikethrough=>set_strikeout(1), Superscript=>set_script(1), Subscript=>set_script(2), OutlineFont=>set_outline(1), Shadow=>set_shadow(1)); while (($prop,$func) = each %fontsets) { $fontattr=$usedrange->Cells($i,$j)->Font->$prop; if ($fontattr==1) { $format.=$fname.”->$func; " ; $print_format=1; } } $fontColor=$usedrange->Cells($i,$j)->Font->ColorIndex(); if ($fontColor>0&&$fontColor!=$ExcelConst->{xlColorIndexAutomatic}) { $format.=$fname.”->set_color(”.($fontColor+7).”); " ; $print_format=1; } # Check text alignment, merging and wrapping my ($halign,$valign,$merge,$wrap); $halign=$usedrange->Cells($i,$j)->HorizontalAlignment; my %hAligns=($ExcelConst->{xlHAlignCenter}=>“center”, $ExcelConst->{xlHAlignJustify}=>“justify”, $ExcelConst->{xlHAlignLeft}=>“left”, $ExcelConst->{xlHAlignRight}=>“right”, $ExcelConst->{xlHAlignFill}=>“fill”, $ExcelConst->{xlHAlignCenterAcrossSelection}=>“merge”); if ($halign!=$ExcelConst->{xlHAlignGeneral}) { $format.=$fname.”->set_align($hAligns{$halign}); “; $print_format=1; } $valign=$usedrange->Cells($i,$j)->VerticalAlignment; my %vAligns=($ExcelConst->{xlVAlignBottom}=>“bottom”, $ExcelConst->{xlVAlignCenter}=>“vcenter”, $ExcelConst->{xlVAlignJustify}=>“vjustify”, $ExcelConst->{xlVAlignTop}=>“top”); if ($valign) { $format.=$fname.”->set_align($vAligns{$valign}); “; $print_format=1; } $merge=$usedrange->Cells($i,$j)->MergeCells; if ($merge==1) { $format.=$fname.”->set_merge(); “; $print_format=1; } $wrap=$usedrange->Cells($i,$j)->WrapText; if ($wrap==1) { $format.=$fname.”->set_text_wrap(1); “; $print_format=1; } # Check patterns my ($pattern,%pats); %pats=(-4142=>0,-4125=>2,-4126=>3,-4124=>4,-4128=>5,-4166=>6, -4121=>7,-4162=>8); $pattern=$usedrange->Cells($i,$j)->Interior->Pattern; if ($pattern&&$pattern!=$ExcelConst->{xlPatternAutomatic}) { $pattern=$pats{$pattern} if ($pattern<0 && defined $pats{$pattern}); $format.=$fname.”->set_pattern($pattern); “; # Colors fg/bg my ($cIndex); $cIndex=$usedrange->Cells($i,$j)->Interior->PatternColorIndex; if ($cIndex>0&&$cIndex!=$ExcelConst->{xlColorIndexAutomatic}) { $format.=$fname.”->set_bg_color(”.($cIndex+7).”); “; } $cIndex=$usedrange->Cells($i,$j)->Interior->ColorIndex; if ($cIndex>0&&$cIndex!=$ExcelConst->{xlColorIndexAutomatic}) { $format.=$fname.”->set_fg_color(”.($cIndex+7).”); “; } $print_format=1; } # Check for number format my ($num_format); $num_format=$usedrange->Cells($i,$j)->NumberFormat; if ($num_format ne “”) { $format.=$fname.”->set_num_format($num_format); “; $print_format=1; } # Check for contents (text or formula) my ($contents); $contents=$usedrange->Cells($i,$j)->Formula; $contents=$usedrange->Cells($i,$j)->Text if ($contents eq “”); # Print cell if ($contents ne "” or $print_format) { print OUTFILE “# Cell($i,$j) “; print OUTFILE $format if ($print_format); print OUTFILE “\worksheets{$name}->write(”.($i-1).”,”.($j-1). “,$contents”; print OUTFILE “,$fname” if ($print_format); print OUTFILE “); “; } } } } # Famous last words… print OUTFILE “\workbook->close(); “; # Close outfile close (OUTFILE) or die “Cant close outfile $opts{o}: $!”; #################################################################### sub usage { printf STDERR “usage: $0 [options] “. " Options: “. " -v verbose mode " . " -i <name> name of input file " . " -o <name> name of output file “; } #################################################################### sub END { # Quit excel do { $Excel->{DisplayAlerts} = 0; $Excel->Quit; } if (defined $Excel); } _ _END_ _ =head1 NAME lecxe - A Excel file to Spreadsheet::WriteExcel code converter =head1 DESCRIPTION This program takes an MS Excel workbook file as input and from that file, produces an output file with Perl code that uses the Spreadsheet::WriteExcel module to reproduce the original file. =head1 STUFF Additional hands-on editing of the output file might be neccecary as: * This program always names the file produced by output script _change_me_.xls * Users of international Excel versions will have som work to do on list separators and numeric punctation characters. =head1 SEE ALSO L<Win32::OLE>, L<Win32::OLE::Variant>, L<Spreadsheet::WriteExcel> =head1 BUGS * Picks wrong color on cells sometimes. * Probably a few other… =head1 DISCLAIMER I do not guarantee B<ANYTHING> with this program. If you use it you are doing so B<AT YOUR OWN RISK>! I may or may not support this depending on my time schedule… =head1 AUTHOR [email protected] =head1 COPYRIGHT Copyright 2001, [email protected] This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/lecxe.pl>

Example: convertA1.pl

This program contains helper functions to deal with the Excel A1 cell reference notation.

These functions have been superseded by Spreadsheet::WriteExcel::Utility.

#!/usr/bin/perl -w ############################################################################### # # This program contains helper functions to deal with the Excel A1 cell # reference notation. # # These functions have been superseded by L<Spreadsheet::WriteExcel::Utility>. # # reverse((c)), March 2001, John McNamara, [email protected] # use strict; print " “; print “Cell B7 is equivalent to (”; print join " “, cell_to_rowcol(B7); print “) in row column notation. “; print “Cell \B7 is equivalent to (”; print join " “, cell_to_rowcol($B7); print “) in row column notation. “; print “Cell B\7 is equivalent to (”; print join " “, cell_to_rowcol(B$7); print “) in row column notation. “; print “Cell \B\7 is equivalent to (”; print join " “, cell_to_rowcol($B$7); print “) in row column notation.

“; print “Row and column (1999, 29) are equivalent to “; print rowcol_to_cell(1999, 29), “. “; print “Row and column (1999, 29, 0, 1) are equivalent to “; print rowcol_to_cell(1999, 29, 0, 1), “.

“; print “The base cell is: Z7 “; print “Increment the row: “, inc_cell_row(Z7), " “; print “Decrement the row: “, dec_cell_row(Z7), " “; print “Increment the column: “, inc_cell_col(Z7), " “; print “Decrement the column: “, dec_cell_col(Z7), "

“; ############################################################################### # # rowcol_to_cell($row, $col, $row_absolute, $col_absolute) # # Convert a zero based row and column reference to a A1 reference. For example # (0, 2) to C1. $row_absolute, $col_absolute are optional. They are boolean # values used to indicate if the row or column value is absolute, i.e. if it is # prefixed by a $ sign: eg. (0, 2, 0, 1) converts to $C1. # # Returns: a cell reference string. # sub rowcol_to_cell { my $row = $_[0]; my $col = $_[1]; my $row_abs = $_[2] || 0; my $col_abs = $_[3] || 0; if ($row_abs) { $row_abs = $ } else { $row_abs = } if ($col_abs) { $col_abs = $ } else { $col_abs = } my $int = int ($col / 26); my $frac = $col % 26 +1; my $chr1 =; my $chr2 =; if ($frac != 0) { $chr2 = chr (ord(A) + $frac -1); } if ($int > 0) { $chr1 = chr (ord(A) + $int -1); } $row++; # Zero index to 1-index return $col_abs . $chr1 . $chr2 . $row_abs. $row; } ############################################################################### # # cell_to_rowcol($cell_ref) # # Convert an Excel cell reference in A1 notation to a zero based row and column # reference; converts C1 to (0, 2, 0, 0). # # Returns: row, column, row_is_absolute, column_is_absolute # # sub cell_to_rowcol { my $cell = shift; $cell =~ /(?)([A-I]?[A-Z])(?)(\d+)/; my $col_abs = $1 eq "” ? 0 : 1; my $col = $2; my $row_abs = $3 eq "” ? 0 : 1; my $row = $4; # Convert base26 column string to number # All your Base are belong to us. my @chars = split //, $col; my $expn = 0; $col = 0; while (@chars) { my $char = pop(@chars); # LS char first $col += (ord($char) -ord(A) +1) * (26**$expn); $expn++; } # Convert 1-index to zero-index $row–; $col–; return $row, $col, $row_abs, $col_abs; } ############################################################################### # # inc_cell_row($cell_ref) # # Increments the row number of an Excel cell reference in A1 notation. # For example C3 to C4 # # Returns: a cell reference string. # sub inc_cell_row { my $cell = shift; my ($row, $col, $row_abs, $col_abs) = cell_to_rowcol($cell); $row++; return rowcol_to_cell($row, $col, $row_abs, $col_abs); } ############################################################################### # # dec_cell_row($cell_ref) # # Decrements the row number of an Excel cell reference in A1 notation. # For example C4 to C3 # # Returns: a cell reference string. # sub dec_cell_row { my $cell = shift; my ($row, $col, $row_abs, $col_abs) = cell_to_rowcol($cell); $row–; return rowcol_to_cell($row, $col, $row_abs, $col_abs); } ############################################################################### # # inc_cell_col($cell_ref) # # Increments the column number of an Excel cell reference in A1 notation. # For example C3 to D3 # # Returns: a cell reference string. # sub inc_cell_col { my $cell = shift; my ($row, $col, $row_abs, $col_abs) = cell_to_rowcol($cell); $col++; return rowcol_to_cell($row, $col, $row_abs, $col_abs); } ############################################################################### # # dec_cell_col($cell_ref) # # Decrements the column number of an Excel cell reference in A1 notation. # For example D3 to C3 # # Returns: a cell reference string. # sub dec_cell_col { my $cell = shift; my ($row, $col, $row_abs, $col_abs) = cell_to_rowcol($cell); $col–; return rowcol_to_cell($row, $col, $row_abs, $col_abs); }

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/convertA1.pl>

Example: writeA1.pl

This is an example of how to extend the Spreadsheet::WriteExcel module.

Code is appended to the Spreadsheet::WriteExcel::Worksheet module by reusing the package name. The new code provides a write() method that allows you to use Excels A1 style cell references. This is not particularly useful but it serves as an example of how the module can be extended without modifying the code directly.

#!/usr/bin/perl -w ############################################################################### # # This is an example of how to extend the Spreadsheet::WriteExcel module. # # Code is appended to the Spreadsheet::WriteExcel::Worksheet module by reusing # the package name. The new code provides a write() method that allows you to # use Excels A1 style cell references. This is not particularly useful but it # serves as an example of how the module can be extended without modifying the # code directly. # # reverse((c)), March 2001, John McNamara, [email protected] # use strict; use Spreadsheet::WriteExcel; # Create a new workbook called simple.xls and add a worksheet my $workbook = Spreadsheet::WriteExcel->new(“writeA1.xls”); my $worksheet = $workbook->add_worksheet(); # Write numbers or text $worksheet->write (0, 0, “Hello”); $worksheet->writeA1(“A3”, “A3” ); $worksheet->writeA1(“A5”, 1.2345 ); ############################################################################### # # The following will be appended to the Spreadsheet::WriteExcel::Worksheet # package. # package Spreadsheet::WriteExcel::Worksheet; ############################################################################### # # writeA1($cell, $token, $format) # # Convert $cell from Excel A1 notation to $row, $col notation and # call write() on $token. # # Returns: return value of called subroutine or -4 for invalid cell # reference. # sub writeA1 { my $self = shift; my $cell = shift; my $col; my $row; if ($cell =~ /([A-z]+)(\d+)/) { ($row, $col) = _convertA1($2, $1); $self->write($row, $col, @_); } else { return -4; } } ############################################################################### # # _convertA1($row, $col) # # Convert Excel A1 notation to $row, $col notation. Convert base26 column # string to a number. # sub _convertA1 { my $row = $_[0]; my $col = $_[1]; # String in AA notation my @chars = split //, $col; my $expn = 0; $col = 0; while (@chars) { my $char = uc(pop(@chars)); # LS char first $col += (ord($char) -ord(A) +1) * (26**$expn); $expn++; } # Convert 1 index to 0 index $row–; $col–; return($row, $col); }

Download this example: <http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/writeA1.pl>

AUTHOR

John McNamara [email protected]

Contributed examples contain the original author’s name.

COPYRIGHT

Copyright MM-MMX, John McNamara.

All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

995 - Linux cli command vtimes

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command vtimes and provides detailed information about the command vtimes, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the vtimes.

NAME 🖥️ vtimes 🖥️

get resource usage

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/resource.h>
int getrusage(int who, struct rusage *usage);

DESCRIPTION

getrusage() returns resource usage measures for who, which can be one of the following:

RUSAGE_SELF
Return resource usage statistics for the calling process, which is the sum of resources used by all threads in the process.

RUSAGE_CHILDREN
Return resource usage statistics for all children of the calling process that have terminated and been waited for. These statistics will include the resources used by grandchildren, and further removed descendants, if all of the intervening descendants waited on their terminated children.

RUSAGE_THREAD (since Linux 2.6.26)
Return resource usage statistics for the calling thread. The _GNU_SOURCE feature test macro must be defined (before including any header file) in order to obtain the definition of this constant from <sys/resource.h>.

The resource usages are returned in the structure pointed to by usage, which has the following form:

struct rusage {
    struct timeval ru_utime; /* user CPU time used */
    struct timeval ru_stime; /* system CPU time used */
    long   ru_maxrss;        /* maximum resident set size */
    long   ru_ixrss;         /* integral shared memory size */
    long   ru_idrss;         /* integral unshared data size */
    long   ru_isrss;         /* integral unshared stack size */
    long   ru_minflt;        /* page reclaims (soft page faults) */
    long   ru_majflt;        /* page faults (hard page faults) */
    long   ru_nswap;         /* swaps */
    long   ru_inblock;       /* block input operations */
    long   ru_oublock;       /* block output operations */
    long   ru_msgsnd;        /* IPC messages sent */
    long   ru_msgrcv;        /* IPC messages received */
    long   ru_nsignals;      /* signals received */
    long   ru_nvcsw;         /* voluntary context switches */
    long   ru_nivcsw;        /* involuntary context switches */
};

Not all fields are completed; unmaintained fields are set to zero by the kernel. (The unmaintained fields are provided for compatibility with other systems, and because they may one day be supported on Linux.) The fields are interpreted as follows:

ru_utime
This is the total amount of time spent executing in user mode, expressed in a timeval structure (seconds plus microseconds).

ru_stime
This is the total amount of time spent executing in kernel mode, expressed in a timeval structure (seconds plus microseconds).

ru_maxrss (since Linux 2.6.32)
This is the maximum resident set size used (in kilobytes). For RUSAGE_CHILDREN, this is the resident set size of the largest child, not the maximum resident set size of the process tree.

ru_ixrss (unmaintained)
This field is currently unused on Linux.

ru_idrss (unmaintained)
This field is currently unused on Linux.

ru_isrss (unmaintained)
This field is currently unused on Linux.

ru_minflt
The number of page faults serviced without any I/O activity; here I/O activity is avoided by “reclaiming” a page frame from the list of pages awaiting reallocation.

ru_majflt
The number of page faults serviced that required I/O activity.

ru_nswap (unmaintained)
This field is currently unused on Linux.

ru_inblock (since Linux 2.6.22)
The number of times the filesystem had to perform input.

ru_oublock (since Linux 2.6.22)
The number of times the filesystem had to perform output.

ru_msgsnd (unmaintained)
This field is currently unused on Linux.

ru_msgrcv (unmaintained)
This field is currently unused on Linux.

ru_nsignals (unmaintained)
This field is currently unused on Linux.

ru_nvcsw (since Linux 2.6)
The number of times a context switch resulted due to a process voluntarily giving up the processor before its time slice was completed (usually to await availability of a resource).

ru_nivcsw (since Linux 2.6)
The number of times a context switch resulted due to a higher priority process becoming runnable or because the current process exceeded its time slice.

RETURN VALUE

On success, zero is returned. On error, -1 is returned, and errno is set to indicate the error.

ERRORS

EFAULT
usage points outside the accessible address space.

EINVAL
who is invalid.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getrusage()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

POSIX.1 specifies getrusage(), but specifies only the fields ru_utime and ru_stime.

RUSAGE_THREAD is Linux-specific.

HISTORY

POSIX.1-2001, SVr4, 4.3BSD.

Before Linux 2.6.9, if the disposition of SIGCHLD is set to SIG_IGN then the resource usages of child processes are automatically included in the value returned by RUSAGE_CHILDREN, although POSIX.1-2001 explicitly prohibits this. This nonconformance is rectified in Linux 2.6.9 and later.

The structure definition shown at the start of this page was taken from 4.3BSD Reno.

Ancient systems provided a vtimes() function with a similar purpose to getrusage(). For backward compatibility, glibc (up until Linux 2.32) also provides vtimes(). All new applications should be written using getrusage(). (Since Linux 2.33, glibc no longer provides an vtimes() implementation.)

NOTES

Resource usage metrics are preserved across an execve(2).

SEE ALSO

clock_gettime(2), getrlimit(2), times(2), wait(2), wait4(2), clock(3), proc_pid_stat(5), proc_pid_io(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

996 - Linux cli command in_port_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command in_port_ttype and provides detailed information about the command in_port_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the in_port_ttype.

NAME 🖥️ in_port_ttype 🖥️

socket address

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/socket.h>
struct sockaddr {
 sa_family_t sa_family; /* Address family */
 char sa_data[]; /* Socket address */
};
struct sockaddr_storage {
 sa_family_t ss_family; /* Address family */
};
typedef /* ... */ socklen_t;
typedef /* ... */ sa_family_t;

Internet domain sockets

#include <netinet/in.h>
struct sockaddr_in {
 sa_family_t sin_family; /* AF_INET */
 in_port_t sin_port; /* Port number */
 struct in_addr sin_addr; /* IPv4 address */
};
struct sockaddr_in6 {
 sa_family_t sin6_family; /* AF_INET6 */
 in_port_t sin6_port; /* Port number */
 uint32_t sin6_flowinfo; /* IPv6 flow info */
 struct in6_addr sin6_addr; /* IPv6 address */
 uint32_t sin6_scope_id; /* Set of interfaces for a scope */
};
struct in_addr {
 in_addr_t s_addr;
};
struct in6_addr {
 uint8_t s6_addr[16];
};
typedef uint32_t in_addr_t;
typedef uint16_t in_port_t;

UNIX domain sockets

#include <sys/un.h>
struct sockaddr_un {
 sa_family_t sun_family; /* Address family */
 char sun_path[]; /* Socket pathname */
};

DESCRIPTION

sockaddr
Describes a socket address.

sockaddr_storage
A structure at least as large as any other sockaddr_* address structures. It’s aligned so that a pointer to it can be cast as a pointer to other sockaddr_* structures and used to access its fields.

socklen_t
Describes the length of a socket address. This is an integer type of at least 32 bits.

sa_family_t
Describes a socket’s protocol family. This is an unsigned integer type.

Internet domain sockets

sockaddr_in
Describes an IPv4 Internet domain socket address. The sin_port and sin_addr members are stored in network byte order.

sockaddr_in6
Describes an IPv6 Internet domain socket address. The sin6_addr.s6_addr array is used to contain a 128-bit IPv6 address, stored in network byte order.

UNIX domain sockets

sockaddr_un
Describes a UNIX domain socket address.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

socklen_t was invented by POSIX. See also accept(2).

These structures were invented before modern ISO C strict-aliasing rules. If aliasing rules are applied strictly, these structures would be extremely difficult to use without invoking Undefined Behavior. POSIX Issue 8 will fix this by requiring that implementations make sure that these structures can be safely used as they were designed.

NOTES

socklen_t is also defined in <netdb.h>.

sa_family_t is also defined in <netinet/in.h> and <sys/un.h>.

SEE ALSO

accept(2), bind(2), connect(2), getpeername(2), getsockname(2), getsockopt(2), sendto(2), setsockopt(2), socket(2), socketpair(2), getaddrinfo(3), gethostbyaddr(3), getnameinfo(3), htonl(3), ipv6(7), socket(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

997 - Linux cli command inet_net_pton

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command inet_net_pton and provides detailed information about the command inet_net_pton, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the inet_net_pton.

NAME 🖥️ inet_net_pton 🖥️

Internet network number conversion

LIBRARY

Resolver library (libresolv, -lresolv)

SYNOPSIS

#include <arpa/inet.h>
int inet_net_pton(int af, const char *pres,
 void netp[.nsize], size_t nsize);
char *inet_net_ntop(int af,
 const void netp[(.bits - CHAR_BIT + 1) / CHAR_BIT],
 int bits,
 char pres[.psize], size_t psize);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

inet_net_pton(), inet_net_ntop():

    Since glibc 2.20:
        _DEFAULT_SOURCE
    Before glibc 2.20:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions convert network numbers between presentation (i.e., printable) format and network (i.e., binary) format.

For both functions, af specifies the address family for the conversion; the only supported value is AF_INET.

inet_net_pton()

The inet_net_pton() function converts pres, a null-terminated string containing an Internet network number in presentation format to network format. The result of the conversion, which is in network byte order, is placed in the buffer pointed to by netp. (The netp argument typically points to an in_addr structure.) The nsize argument specifies the number of bytes available in netp.

On success, inet_net_pton() returns the number of bits in the network number field of the result placed in netp. For a discussion of the input presentation format and the return value, see NOTES.

Note: the buffer pointed to by netp should be zeroed out before calling inet_net_pton(), since the call writes only as many bytes as are required for the network number (or as are explicitly specified by pres), which may be less than the number of bytes in a complete network address.

inet_net_ntop()

The inet_net_ntop() function converts the network number in the buffer pointed to by netp to presentation format; *netp is interpreted as a value in network byte order. The bits argument specifies the number of bits in the network number in *netp.

The null-terminated presentation-format string is placed in the buffer pointed to by pres. The psize argument specifies the number of bytes available in pres. The presentation string is in CIDR format: a dotted-decimal number representing the network address, followed by a slash, and the size of the network number in bits.

RETURN VALUE

On success, inet_net_pton() returns the number of bits in the network number. On error, it returns -1, and errno is set to indicate the error.

On success, inet_net_ntop() returns pres. On error, it returns NULL, and errno is set to indicate the error.

ERRORS

EAFNOSUPPORT
af specified a value other than AF_INET.

EMSGSIZE
The size of the output buffer was insufficient.

ENOENT
(inet_net_pton()) pres was not in correct presentation format.

STANDARDS

None.

NOTES

Input presentation format for inet_net_pton()

The network number may be specified either as a hexadecimal value or in dotted-decimal notation.

Hexadecimal values are indicated by an initial “0x” or “0X”. The hexadecimal digits populate the nibbles (half octets) of the network number from left to right in network byte order.

In dotted-decimal notation, up to four octets are specified, as decimal numbers separated by dots. Thus, any of the following forms are accepted:

a.b.c.d
a.b.c
a.b
a

Each part is a number in the range 0 to 255 that populates one byte of the resulting network number, going from left to right, in network-byte (big endian) order. Where a part is omitted, the resulting byte in the network number is zero.

For either hexadecimal or dotted-decimal format, the network number can optionally be followed by a slash and a number in the range 0 to 32, which specifies the size of the network number in bits.

Return value of inet_net_pton()

The return value of inet_net_pton() is the number of bits in the network number field. If the input presentation string terminates with a slash and an explicit size value, then that size becomes the return value of inet_net_pton(). Otherwise, the return value, bits, is inferred as follows:

  • If the most significant byte of the network number is greater than or equal to 240, then bits is 32.

  • Otherwise, if the most significant byte of the network number is greater than or equal to 224, then bits is 4.

  • Otherwise, if the most significant byte of the network number is greater than or equal to 192, then bits is 24.

  • Otherwise, if the most significant byte of the network number is greater than or equal to 128, then bits is 16.

  • Otherwise, bits is 8.

If the resulting bits value from the above steps is greater than or equal to 8, but the number of octets specified in the network number exceed bits/8, then bits is set to 8 times the number of octets actually specified.

EXAMPLES

The program below demonstrates the use of inet_net_pton() and inet_net_ntop(). It uses inet_net_pton() to convert the presentation format network address provided in its first command-line argument to binary form, displays the return value from inet_net_pton(). It then uses inet_net_ntop() to convert the binary form back to presentation format, and displays the resulting string.

In order to demonstrate that inet_net_pton() may not write to all bytes of its netp argument, the program allows an optional second command-line argument, a number used to initialize the buffer before inet_net_pton() is called. As its final line of output, the program displays all of the bytes of the buffer returned by inet_net_pton() allowing the user to see which bytes have not been touched by inet_net_pton().

An example run, showing that inet_net_pton() infers the number of bits in the network number:

$ ./a.out 193.168
inet_net_pton() returned: 24
inet_net_ntop() yielded:  193.168.0/24
Raw address:              c1a80000

Demonstrate that inet_net_pton() does not zero out unused bytes in its result buffer:

$ ./a.out 193.168 0xffffffff
inet_net_pton() returned: 24
inet_net_ntop() yielded:  193.168.0/24
Raw address:              c1a800ff

Demonstrate that inet_net_pton() will widen the inferred size of the network number, if the supplied number of bytes in the presentation string exceeds the inferred value:

$ ./a.out 193.168.1.128
inet_net_pton() returned: 32
inet_net_ntop() yielded:  193.168.1.128/32
Raw address:              c1a80180

Explicitly specifying the size of the network number overrides any inference about its size (but any extra bytes that are explicitly specified will still be used by inet_net_pton(): to populate the result buffer):

$ ./a.out 193.168.1.128/24
inet_net_pton() returned: 24
inet_net_ntop() yielded:  193.168.1/24
Raw address:              c1a80180

Program source

/* Link with "-lresolv" */
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \
                        } while (0)
int
main(int argc, char *argv[])
{
    char buf[100];
    struct in_addr addr;
    int bits;
    if (argc < 2) {
        fprintf(stderr,
                "Usage: %s presentation-form [addr-init-value]

“, argv[0]); exit(EXIT_FAILURE); } /* If argv[2] is supplied (a numeric value), use it to initialize the output buffer given to inet_net_pton(), so that we can see that inet_net_pton() initializes only those bytes needed for the network number. If argv[2] is not supplied, then initialize the buffer to zero (as is recommended practice). / addr.s_addr = (argc > 2) ? strtod(argv[2], NULL) : 0; / Convert presentation network number in argv[1] to binary. / bits = inet_net_pton(AF_INET, argv[1], &addr, sizeof(addr)); if (bits == -1) errExit(“inet_net_ntop”); printf(“inet_net_pton() returned: %d “, bits); / Convert binary format back to presentation, using ‘bits’ returned by inet_net_pton(). / if (inet_net_ntop(AF_INET, &addr, bits, buf, sizeof(buf)) == NULL) errExit(“inet_net_ntop”); printf(“inet_net_ntop() yielded: %s “, buf); / Display ‘addr’ in raw form (in network byte order), so we can see bytes not displayed by inet_net_ntop(); some of those bytes may not have been touched by inet_net_ntop(), and so will still have any initial value that was specified in argv[2]. */ printf(“Raw address: %x “, htonl(addr.s_addr)); exit(EXIT_SUCCESS); }

SEE ALSO

inet(3), networks(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

998 - Linux cli command Net_SSH2_Dirpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_SSH2_Dirpm and provides detailed information about the command Net_SSH2_Dirpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_SSH2_Dirpm.

NAME 🖥️ Net_SSH2_Dirpm 🖥️

SSH 2 SFTP directory object

DESCRIPTION

An SFTP file object is created by the Net::SSH2::SFTP opendir method.

read

Returns a hash (hashref in scalar context); keys are name and those returned by Net::SSH2::SFTP::stat; returns empty list or undef if no more files.

SEE ALSO

Net::SSH2::SFTP.

AUTHOR

David B. Robins, <[email protected]>

COPYRIGHT AND LICENSE

Copyright (C) 2005, 2006 by David B. Robins; all rights reserved.

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

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

999 - Linux cli command pcap_dumppcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_dumppcap and provides detailed information about the command pcap_dumppcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_dumppcap.

NAME 🖥️ pcap_dumppcap 🖥️

write a packet to a capture file

SYNOPSIS

#include <pcap/pcap.h>
void pcap_dump(u_char *user, struct pcap_pkthdr *h,
u_char *sp);

DESCRIPTION

pcap_dump() outputs a packet to the ``savefile’’ opened with pcap_dump_open(3PCAP). Note that its calling arguments are suitable for use with pcap_dispatch(3PCAP) or pcap_loop(3PCAP). If called directly, the user parameter is of type pcap_dumper_t as returned by pcap_dump_open().

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1000 - Linux cli command xdr_opaque_auth

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_opaque_auth and provides detailed information about the command xdr_opaque_auth, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_opaque_auth.

NAME 🖥️ xdr_opaque_auth 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1001 - Linux cli command getrpcbyname_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getrpcbyname_r and provides detailed information about the command getrpcbyname_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getrpcbyname_r.

NAME 🖥️ getrpcbyname_r 🖥️

get RPC entry (reentrant)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
int getrpcent_r(struct rpcent *result_buf, char buf[.buflen],
 size_t buflen, struct rpcent **result);
int getrpcbyname_r(const char *name,
 struct rpcent *result_buf, char buf[.buflen],
 size_t buflen, struct rpcent **result);
int getrpcbynumber_r(int number,
 struct rpcent *result_buf, char buf[.buflen],
 size_t buflen, struct rpcent **result);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getrpcent_r(), getrpcbyname_r(), getrpcbynumber_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The getrpcent_r(), getrpcbyname_r(), and getrpcbynumber_r() functions are the reentrant equivalents of, respectively, getrpcent(3), getrpcbyname(3), and getrpcbynumber(3). They differ in the way that the rpcent structure is returned, and in the function calling signature and return value. This manual page describes just the differences from the nonreentrant functions.

Instead of returning a pointer to a statically allocated rpcent structure as the function result, these functions copy the structure into the location pointed to by result_buf.

The buf array is used to store the string fields pointed to by the returned rpcent structure. (The nonreentrant functions allocate these strings in static storage.) The size of this array is specified in buflen. If buf is too small, the call fails with the error ERANGE, and the caller must try again with a larger buffer. (A buffer of length 1024 bytes should be sufficient for most applications.)

If the function call successfully obtains an RPC record, then *result is set pointing to result_buf; otherwise, *result is set to NULL.

RETURN VALUE

On success, these functions return 0. On error, they return one of the positive error numbers listed in ERRORS.

On error, record not found (getrpcbyname_r(), getrpcbynumber_r()), or end of input (getrpcent_r()) result is set to NULL.

ERRORS

ENOENT
(getrpcent_r()) No more records in database.

ERANGE
buf is too small. Try again with a larger buffer (and increased buflen).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getrpcent_r(), getrpcbyname_r(), getrpcbynumber_r()

Thread safetyMT-Safe locale

VERSIONS

Functions with similar names exist on some other systems, though typically with different calling signatures.

STANDARDS

GNU.

SEE ALSO

getrpcent(3), rpc(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1002 - Linux cli command SLIST_HEAD_INITIALIZER

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SLIST_HEAD_INITIALIZER and provides detailed information about the command SLIST_HEAD_INITIALIZER, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SLIST_HEAD_INITIALIZER.

NAME 🖥️ SLIST_HEAD_INITIALIZER 🖥️

implementation of a singly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
SLIST_ENTRY(TYPE);
SLIST_HEAD(HEADNAME, TYPE);
SLIST_HEAD SLIST_HEAD_INITIALIZER(SLIST_HEAD head);
void SLIST_INIT(SLIST_HEAD *head);
int SLIST_EMPTY(SLIST_HEAD *head);
void SLIST_INSERT_HEAD(SLIST_HEAD *head,
 struct TYPE *elm, SLIST_ENTRY NAME);
void SLIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, SLIST_ENTRY NAME);
struct TYPE *SLIST_FIRST(SLIST_HEAD *head);
struct TYPE *SLIST_NEXT(struct TYPE *elm, SLIST_ENTRY NAME);
SLIST_FOREACH(struct TYPE *var, SLIST_HEAD *head, SLIST_ENTRY NAME);
void SLIST_REMOVE(SLIST_HEAD *head, struct TYPE *elm,
 SLIST_ENTRY NAME);
void SLIST_REMOVE_HEAD(SLIST_HEAD *head,
 SLIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on singly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type SLIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro SLIST_HEAD().

Creation

A singly linked list is headed by a structure defined by the SLIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the list after an existing element or at the head of the list. An SLIST_HEAD structure is declared as follows:

SLIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

SLIST_ENTRY() declares a structure that connects the elements in the list.

SLIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

SLIST_INIT() initializes the list referenced by head.

SLIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

SLIST_INSERT_HEAD() inserts the new element elm at the head of the list.

SLIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

SLIST_FIRST() returns the first element in the list, or NULL if the list is empty.

SLIST_NEXT() returns the next element in the list.

SLIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

SLIST_REMOVE() removes the element elm from the list.

SLIST_REMOVE_HEAD() removes the element elm from the head of the list. For optimum efficiency, elements being removed from the head of the list should explicitly use this macro instead of the generic SLIST_REMOVE().

RETURN VALUE

SLIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

SLIST_FIRST(), and SLIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

SLIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

SLIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. SLIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    SLIST_ENTRY(entry) entries;             /* Singly linked list */
};
SLIST_HEAD(slisthead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct slisthead head;                  /* Singly linked list
                                               head */
    SLIST_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    SLIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    SLIST_INSERT_AFTER(n1, n2, entries);
    SLIST_REMOVE(&head, n2, entry, entries);/* Deletion */
    free(n2);
    n3 = SLIST_FIRST(&head);
    SLIST_REMOVE_HEAD(&head, entries);      /* Deletion from the head */
    free(n3);
    for (unsigned int i = 0; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        SLIST_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    SLIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); while (!SLIST_EMPTY(&head)) { /* List deletion */ n1 = SLIST_FIRST(&head); SLIST_REMOVE_HEAD(&head, entries); free(n1); } SLIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1003 - Linux cli command getpwuid_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getpwuid_r and provides detailed information about the command getpwuid_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getpwuid_r.

NAME 🖥️ getpwuid_r 🖥️

get password file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <pwd.h>
struct passwd *getpwnam(const char *name);
struct passwd *getpwuid(uid_t uid);
int getpwnam_r(const char *restrict name, struct passwd *restrict pwd,
 char buf[restrict .buflen], size_t buflen,
 struct passwd **restrict result);
int getpwuid_r(uid_t uid, struct passwd *restrict pwd,
 char buf[restrict .buflen], size_t buflen,
 struct passwd **restrict result);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getpwnam_r(), getpwuid_r():

    _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The getpwnam() function returns a pointer to a structure containing the broken-out fields of the record in the password database (e.g., the local password file /etc/passwd, NIS, and LDAP) that matches the username name.

The getpwuid() function returns a pointer to a structure containing the broken-out fields of the record in the password database that matches the user ID uid.

The passwd structure is defined in <pwd.h> as follows:

struct passwd {
    char   *pw_name;       /* username */
    char   *pw_passwd;     /* user password */
    uid_t   pw_uid;        /* user ID */
    gid_t   pw_gid;        /* group ID */
    char   *pw_gecos;      /* user information */
    char   *pw_dir;        /* home directory */
    char   *pw_shell;      /* shell program */
};

See passwd(5) for more information about these fields.

The getpwnam_r() and getpwuid_r() functions obtain the same information as getpwnam() and getpwuid(), but store the retrieved passwd structure in the space pointed to by pwd. The string fields pointed to by the members of the passwd structure are stored in the buffer buf of size buflen. A pointer to the result (in case of success) or NULL (in case no entry was found or an error occurred) is stored in *result.

The call

sysconf(_SC_GETPW_R_SIZE_MAX)

returns either -1, without changing errno, or an initial suggested size for buf. (If this size is too small, the call fails with ERANGE, in which case the caller can retry with a larger buffer.)

RETURN VALUE

The getpwnam() and getpwuid() functions return a pointer to a passwd structure, or NULL if the matching entry is not found or an error occurs. If an error occurs, errno is set to indicate the error. If one wants to check errno after the call, it should be set to zero before the call.

The return value may point to a static area, and may be overwritten by subsequent calls to getpwent(3), getpwnam(), or getpwuid(). (Do not pass the returned pointer to free(3).)

On success, getpwnam_r() and getpwuid_r() return zero, and set *result to pwd. If no matching password record was found, these functions return 0 and store NULL in *result. In case of error, an error number is returned, and NULL is stored in *result.

ERRORS

0 or ENOENT or ESRCH or EBADF or EPERM or …
The given name or uid was not found.

EINTR
A signal was caught; see signal(7).

EIO
I/O error.

EMFILE
The per-process limit on the number of open file descriptors has been reached.

ENFILE
The system-wide limit on the total number of open files has been reached.

ENOMEM
Insufficient memory to allocate passwd structure.

ERANGE
Insufficient buffer space supplied.

NOTE

The user password database mostly refers to /etc/passwd. However, with recent systems it also refers to network wide databases using NIS, LDAP and other local files as configured in /etc/nsswitch.conf.

FILES

/etc/passwd
local password database file

/etc/nsswitch.conf
System Databases and Name Service Switch configuration file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getpwnam()

Thread safety

MT-Unsafe race:pwnam locale

getpwuid()

Thread safety

MT-Unsafe race:pwuid locale

getpwnam_r(), getpwuid_r()

Thread safety

MT-Safe locale

VERSIONS

The pw_gecos field is not specified in POSIX, but is present on most implementations.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4, 4.3BSD.

NOTES

The formulation given above under “RETURN VALUE” is from POSIX.1-2001. It does not call “not found” an error, and hence does not specify what value errno might have in this situation. But that makes it impossible to recognize errors. One might argue that according to POSIX errno should be left unchanged if an entry is not found. Experiments on various UNIX-like systems show that lots of different values occur in this situation: 0, ENOENT, EBADF, ESRCH, EWOULDBLOCK, EPERM, and probably others.

The pw_dir field contains the name of the initial working directory of the user. Login programs use the value of this field to initialize the HOME environment variable for the login shell. An application that wants to determine its user’s home directory should inspect the value of HOME (rather than the value getpwuid(getuid())->pw_dir) since this allows the user to modify their notion of “the home directory” during a login session. To determine the (initial) home directory of another user, it is necessary to use getpwnam(“username”)->pw_dir or similar.

EXAMPLES

The program below demonstrates the use of getpwnam_r() to find the full username and user ID for the username supplied as a command-line argument.

#include <errno.h>
#include <pwd.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int
main(int argc, char *argv[])
{
    struct passwd pwd;
    struct passwd *result;
    char *buf;
    long bufsize;
    int s;
    if (argc != 2) {
        fprintf(stderr, "Usage: %s username

“, argv[0]); exit(EXIT_FAILURE); } bufsize = sysconf(_SC_GETPW_R_SIZE_MAX); if (bufsize == -1) /* Value was indeterminate / bufsize = 16384; / Should be more than enough */ buf = malloc(bufsize); if (buf == NULL) { perror(“malloc”); exit(EXIT_FAILURE); } s = getpwnam_r(argv[1], &pwd, buf, bufsize, &result); if (result == NULL) { if (s == 0) printf(“Not found “); else { errno = s; perror(“getpwnam_r”); } exit(EXIT_FAILURE); } printf(“Name: %s; UID: %jd “, pwd.pw_gecos, (intmax_t) pwd.pw_uid); exit(EXIT_SUCCESS); }

SEE ALSO

endpwent(3), fgetpwent(3), getgrnam(3), getpw(3), getpwent(3), getspnam(3), putpwent(3), setpwent(3), nsswitch.conf(5), passwd(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1004 - Linux cli command raise

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command raise and provides detailed information about the command raise, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the raise.

NAME 🖥️ raise 🖥️

send a signal to the caller

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
int raise(int sig);

DESCRIPTION

The raise() function sends a signal to the calling process or thread. In a single-threaded program it is equivalent to

kill(getpid(), sig);

In a multithreaded program it is equivalent to

pthread_kill(pthread_self(), sig);

If the signal causes a handler to be called, raise() will return only after the signal handler has returned.

RETURN VALUE

raise() returns 0 on success, and nonzero for failure.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

raise()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89.

Since glibc 2.3.3, raise() is implemented by calling tgkill(2), if the kernel supports that system call. Older glibc versions implemented raise() using kill(2).

SEE ALSO

getpid(2), kill(2), sigaction(2), signal(2), pthread_kill(3), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1005 - Linux cli command xdrstdio_create

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdrstdio_create and provides detailed information about the command xdrstdio_create, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdrstdio_create.

NAME 🖥️ xdrstdio_create 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1006 - Linux cli command XML_DOM_ProcessingInstructionpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_DOM_ProcessingInstructionpm and provides detailed information about the command XML_DOM_ProcessingInstructionpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_DOM_ProcessingInstructionpm.

NAME 🖥️ XML_DOM_ProcessingInstructionpm 🖥️

An XML processing instruction in XML::DOM

DESCRIPTION

XML::DOM::ProcessingInstruction extends XML::DOM::Node.

It represents a processing instruction, used in XML as a way to keep processor-specific information in the text of the document. An example:

<?PI processing instruction?>

Here, PI is the target and processing instruction is the data.

METHODS

getTarget
The target of this processing instruction. XML defines this as being the first token following the markup that begins the processing instruction.

getData and setData (data)
The content of this processing instruction. This is from the first non white space character after the target to the character immediately preceding the ?>.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1007 - Linux cli command XtAppSetTypeConverter

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppSetTypeConverter and provides detailed information about the command XtAppSetTypeConverter, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppSetTypeConverter.

NAME 🖥️ XtAppSetTypeConverter 🖥️

register resource converter

SYNTAX

#include <X11/Intrinsic.h>

void XtAppSetTypeConverter(XtAppContext app_context, const char *from_type, const char * to_type, XtTypeConverter converter, XtConvertArgList convert_args, Cardinal num_args, XtCacheType cache_type, XtDestructor destructor);

void XtSetTypeConverter(const char *from_type, const char *to_type, XtTypeConverter converter, XtConvertArgList convert_args, Cardinal num_args, XtCacheType cache_type, XtDestructor destructor);

ARGUMENTS

app_context
Specifies the application context.

converter
Specifies the type converter procedure.

convert_args
Specifies how to compute the additional arguments to the converter or NULL.

from_type
Specifies the source type.

num_args
Specifies the number of additional arguments to the converter or zero.

to_type
Specifies the destination type.

cache_type
Specifies whether or not resources produced by this converter are sharable or display-specific and when they should be freed.

destructor
Specifies a destroy procedure for resources produced by this conversion, or NULL if no additional action is required to deallocate resources produced by the converter.

DESCRIPTION

XtSetTypeConverter registers the specified type converter and destructor in all application contexts created by the calling process, including any future application contexts that may be created. XtAppSetTypeConverter registers the specified type converter in the single application context specified. If the same from_type and to_type are specified in multiple calls to either function, the most recent overrides the previous ones.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1008 - Linux cli command isspace_l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isspace_l and provides detailed information about the command isspace_l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isspace_l.

NAME 🖥️ isspace_l 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1009 - Linux cli command XtSetErrorHandler

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtSetErrorHandler and provides detailed information about the command XtSetErrorHandler, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtSetErrorHandler.

NAME 🖥️ XtSetErrorHandler 🖥️

low-level error handlers

SYNTAX

#include <X11/Intrinsic.h>

void XtError(const char *message);

void XtSetErrorHandler(XtErrorHandler handler);

void XtSetWarningHandler(XtErrorHandler handler);

void XtWarning(const char *message);

ARGUMENTS

message
Specifies the nonfatal error message that is to be reported.

handler
Specifies the new fatal error procedure, which should not return, or the nonfatal error procedure, which usually returns.

message
Specifies the message that is to be reported.

DESCRIPTION

The XtError function has been superceded by XtAppError.

The XtSetErrorHandler function has been superceded by XtAppSetErrorHandler.

The XtSetWarningHandler function has been superceded by XtAppSetWarningHandler.

The XtWarning function has been superceded by XtAppWarning.

SEE ALSO

XtAppError(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1010 - Linux cli command XtSetTypeConverter

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtSetTypeConverter and provides detailed information about the command XtSetTypeConverter, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtSetTypeConverter.

NAME 🖥️ XtSetTypeConverter 🖥️

register resource converter

SYNTAX

#include <X11/Intrinsic.h>

void XtAppSetTypeConverter(XtAppContext app_context, const char *from_type, const char * to_type, XtTypeConverter converter, XtConvertArgList convert_args, Cardinal num_args, XtCacheType cache_type, XtDestructor destructor);

void XtSetTypeConverter(const char *from_type, const char *to_type, XtTypeConverter converter, XtConvertArgList convert_args, Cardinal num_args, XtCacheType cache_type, XtDestructor destructor);

ARGUMENTS

app_context
Specifies the application context.

converter
Specifies the type converter procedure.

convert_args
Specifies how to compute the additional arguments to the converter or NULL.

from_type
Specifies the source type.

num_args
Specifies the number of additional arguments to the converter or zero.

to_type
Specifies the destination type.

cache_type
Specifies whether or not resources produced by this converter are sharable or display-specific and when they should be freed.

destructor
Specifies a destroy procedure for resources produced by this conversion, or NULL if no additional action is required to deallocate resources produced by the converter.

DESCRIPTION

XtSetTypeConverter registers the specified type converter and destructor in all application contexts created by the calling process, including any future application contexts that may be created. XtAppSetTypeConverter registers the specified type converter in the single application context specified. If the same from_type and to_type are specified in multiple calls to either function, the most recent overrides the previous ones.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1011 - Linux cli command LIST_REMOVE

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LIST_REMOVE and provides detailed information about the command LIST_REMOVE, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LIST_REMOVE.

NAME 🖥️ LIST_REMOVE 🖥️

implementation of a doubly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
LIST_ENTRY(TYPE);
LIST_HEAD(HEADNAME, TYPE);
LIST_HEAD LIST_HEAD_INITIALIZER(LIST_HEAD head);
void LIST_INIT(LIST_HEAD *head);
int LIST_EMPTY(LIST_HEAD *head);
void LIST_INSERT_HEAD(LIST_HEAD *head,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
struct TYPE *LIST_FIRST(LIST_HEAD *head);
struct TYPE *LIST_NEXT(struct TYPE *elm, LIST_ENTRY NAME);
LIST_FOREACH(struct TYPE *var, LIST_HEAD *head, LIST_ENTRY NAME);
void LIST_REMOVE(struct TYPE *elm, LIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type LIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro LIST_HEAD().

Creation

A list is headed by a structure defined by the LIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are doubly linked so that an arbitrary element can be removed without traversing the list. New elements can be added to the list after an existing element, before an existing element, or at the head of the list. A LIST_HEAD structure is declared as follows:

LIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

LIST_ENTRY() declares a structure that connects the elements in the list.

LIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

LIST_INIT() initializes the list referenced by head.

LIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

LIST_INSERT_HEAD() inserts the new element elm at the head of the list.

LIST_INSERT_BEFORE() inserts the new element elm before the element listelm.

LIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

LIST_FIRST() returns the first element in the list, or NULL if the list is empty.

LIST_NEXT() returns the next element in the list, or NULL if this is the last.

LIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

LIST_REMOVE() removes the element elm from the list.

RETURN VALUE

LIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

LIST_FIRST(), and LIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

LIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

LIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. LIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    LIST_ENTRY(entry) entries;              /* List */
};
LIST_HEAD(listhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct listhead head;                   /* List head */
    int i;
    LIST_INIT(&head);                       /* Initialize the list */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    LIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    LIST_INSERT_AFTER(n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    LIST_INSERT_BEFORE(n2, n3, entries);
    i = 0;                                  /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        np->data = i++;
    LIST_REMOVE(n2, entries);               /* Deletion */
    free(n2);
                                            /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* List deletion */ n1 = LIST_FIRST(&head); while (n1 != NULL) { n2 = LIST_NEXT(n1, entries); free(n1); n1 = n2; } LIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1012 - Linux cli command XtAddEventHandler

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAddEventHandler and provides detailed information about the command XtAddEventHandler, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAddEventHandler.

NAME 🖥️ XtAddEventHandler 🖥️

add and remove event handlers

SYNTAX

#include <X11/Intrinsic.h>

void XtAddEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data);

void XtAddRawEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data);

void XtRemoveEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data);

void XtRemoveRawEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data);

void XtInsertEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data, XtListPosition position);

void XtInsertRawEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data, XtListPosition position);

typedef enum { XtListHead, XtListTail } XtListPosition;

ARGUMENTS

client_data
Specifies additional data to be passed to the client’s event handler.

event_mask
Specifies the event mask for which to call or unregister this procedure.

nonmaskable
Specifies a Boolean value that indicates whether this procedure should be called or removed on the nonmaskable events ( GraphicsExpose, NoExpose, SelectionClear, SelectionRequest, SelectionNotify, ClientMessage, and MappingNotify).

proc
Specifies the procedure that is to be added or removed.

  1. Specifies the widget for which this event handler is being registered.

position
Specifies when the event handler is to be called relative to other previously registered handlers.

DESCRIPTION

The XtAddEventHandler function registers a procedure with the dispatch mechanism that is to be called when an event that matches the mask occurs on the specified widget. If the procedure is already registered with the same client_data, the specified mask is ORed into the existing mask. If the widget is realized, XtAddEventHandler calls XSelectInput, if necessary.

The XtAddRawEventHandler function is similar to XtAddEventHandler except that it does not affect the widget’s mask and never causes an XSelectInput for its events. Note that the widget might already have those mask bits set because of other nonraw event handlers registered on it.

The XtRemoveRawEventHandler function stops the specified procedure from receiving the specified events. Because the procedure is a raw event handler, this does not affect the widget’s mask and never causes a call on XSelectInput.

XtInsertEventHandler is identical to XtAddEventHandler with the additional position argument. If position is XtListHead, the event handler is registered to that it will be called before any event handlers that were previously registered for the same widget. If position is XtListTail, the event handler is registered to be called after any previously registered event handlers. If the procedure is already registered with the same client_data value, the specified mask augments the existing mask and the procedure is repositioned in the list.

XtInsertRawEventHandler is similar to XtInsertEventHandler except that it does not modify the widget’s event mask and never causes an XSelectInput for the specified events. If the procedure is already registered with the same client_data value, the specified mask augments the existing mask and the procedure is repositioned in the list.

SEE ALSO

XtAppNextEvent(3), XtBuildEventMask(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1013 - Linux cli command __flbf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __flbf and provides detailed information about the command __flbf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __flbf.

NAME 🖥️ __flbf 🖥️

interfaces to stdio FILE structure

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
#include <stdio_ext.h>
size_t __fbufsize(FILE *stream);
size_t __fpending(FILE *stream);
int __flbf(FILE *stream);
int __freadable(FILE *stream);
int __fwritable(FILE *stream);
int __freading(FILE *stream);
int __fwriting(FILE *stream);
int __fsetlocking(FILE *stream, int type);
void _flushlbf(void);
void __fpurge(FILE *stream);

DESCRIPTION

Solaris introduced routines to allow portable access to the internals of the FILE structure, and glibc also implemented these.

The __fbufsize() function returns the size of the buffer currently used by the given stream.

The __fpending() function returns the number of bytes in the output buffer. For wide-oriented streams the unit is wide characters. This function is undefined on buffers in reading mode, or opened read-only.

The __flbf() function returns a nonzero value if the stream is line-buffered, and zero otherwise.

The __freadable() function returns a nonzero value if the stream allows reading, and zero otherwise.

The __fwritable() function returns a nonzero value if the stream allows writing, and zero otherwise.

The __freading() function returns a nonzero value if the stream is read-only, or if the last operation on the stream was a read operation, and zero otherwise.

The __fwriting() function returns a nonzero value if the stream is write-only (or append-only), or if the last operation on the stream was a write operation, and zero otherwise.

The __fsetlocking() function can be used to select the desired type of locking on the stream. It returns the current type. The type argument can take the following three values:

FSETLOCKING_INTERNAL
Perform implicit locking around every operation on the given stream (except for the *_unlocked ones). This is the default.

FSETLOCKING_BYCALLER
The caller will take care of the locking (possibly using flockfile(3) in case there is more than one thread), and the stdio routines will not do locking until the state is reset to FSETLOCKING_INTERNAL.

FSETLOCKING_QUERY
Don’t change the type of locking. (Only return it.)

The _flushlbf() function flushes all line-buffered streams. (Presumably so that output to a terminal is forced out, say before reading keyboard input.)

The __fpurge() function discards the contents of the stream’s buffer.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

__fbufsize(), __fpending(), __fpurge(), __fsetlocking()

Thread safetyMT-Safe race:stream

__flbf(), __freadable(), __freading(), __fwritable(), __fwriting(), _flushlbf()

Thread safetyMT-Safe

SEE ALSO

flockfile(3), fpurge(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1014 - Linux cli command HTTP_Cookiespm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTTP_Cookiespm and provides detailed information about the command HTTP_Cookiespm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTTP_Cookiespm.

NAME 🖥️ HTTP_Cookiespm 🖥️

HTTP cookie jars

VERSION

version 6.11

SYNOPSIS

use HTTP::Cookies; $cookie_jar = HTTP::Cookies->new( file => “$ENV{HOME}/lwp_cookies.dat”, autosave => 1, ); use LWP; my $browser = LWP::UserAgent->new; $browser->cookie_jar($cookie_jar);

Or for an empty and temporary cookie jar:

use LWP; my $browser = LWP::UserAgent->new; $browser->cookie_jar( {} );

DESCRIPTION

This class is for objects that represent a cookie jar Ω- that is, a database of all the HTTP cookies that a given LWP::UserAgent object knows about.

Cookies are a general mechanism which server side connections can use to both store and retrieve information on the client side of the connection. For more information about cookies refer to Cookie Spec <http://curl.haxx.se/rfc/cookie_spec.html> and Cookie Central <http://www.cookiecentral.com>. This module also implements the new style cookies described in RFC 2965 <https://tools.ietf.org/html/rfc2965>. The two variants of cookies are supposed to be able to coexist happily.

Instances of the class HTTP::Cookies are able to store a collection of Set-Cookie2: and Set-Cookie: headers and are able to use this information to initialize Cookie-headers in HTTP::Request objects. The state of a HTTP::Cookies object can be saved in and restored from files.

LIMITATIONS

This module does not support Public Suffix <https://publicsuffix.org/> encouraged by a more recent standard, RFC 6265 <https://tools.ietf.org/html/rfc6265>.

This module’s shortcomings mean that a malicious Web site can set cookies to track your user agent across all sites under a top level domain. See t/publicsuffix.t in this module’s distribution for details.

HTTP::CookieJar::LWP supports Public Suffix, but only provides a limited subset of this module’s functionality and does not support standards older than RFC 6265.

METHODS

The following methods are provided:

$cookie_jar = HTTP::Cookies->new
The constructor takes hash style parameters. The following parameters are recognized: file: name of the file to restore cookies from and save cookies to autosave: save during destruction (bool) ignore_discard: save even cookies that are requested to be discarded (bool) hide_cookie2: do not add Cookie2 header to requests Future parameters might include (not yet implemented): max_cookies 300 max_cookies_per_domain 20 max_cookie_size 4096 no_cookies list of domain names that we never return cookies to

$cookie_jar->get_cookies( $url_or_domain )

$cookie_jar->get_cookies( $url_or_domain, $cookie_key,… )

Returns a hash of the cookies that applies to the given URL. If a domainname is given as argument, then a prefix of https:// is assumed. If one or more $cookie_key parameters are provided return the given values, or undef if the cookie isn’t available.

$cookie_jar->add_cookie_header( $request )
The add_cookie_header() method will set the appropriate Cookie:-header for the HTTP::Request object given as argument. The $request must have a valid url attribute before this method is called.

$cookie_jar->extract_cookies( $response )
The extract_cookies() method will look for Set-Cookie: and Set-Cookie2: headers in the HTTP::Response object passed as argument. Any of these headers that are found are used to update the state of the $cookie_jar.

$cookie_jar->set_cookie( $version, $key, $val, $path, $domain, $port, $path_spec, $secure, $maxage, $discard, \rest )
The set_cookie() method updates the state of the $cookie_jar. The $key, $val, $domain, $port and $path arguments are strings. The $path_spec, $secure, $discard arguments are boolean values. The $maxage value is a number indicating number of seconds that this cookie will live. A value of $maxage <= 0 will delete this cookie. The $version argument sets the version of the cookie; the default value is 0 ( original Netscape spec ). Setting $version to another value indicates the RFC to which the cookie conforms (e.g. version 1 for RFC 2109). %rest defines various other attributes like Comment and CommentURL.

$cookie_jar->save

$cookie_jar->save( $file )

$cookie_jar->save( file => $file, ignore_discard => $ignore_discard )

This method saves the state of the $cookie_jar to a file. The state can then be restored later using the load() method. If a filename is not specified we will use the name specified during construction. If the $ignore_discard value is true (or not specified, but attribute ignore_discard was set at cookie jar construction), then we will even save cookies that are marked to be discarded. The default is to save a sequence of Set-Cookie3 lines. Set-Cookie3 is a proprietary LWP format, not known to be compatible with any browser. The HTTP::Cookies::Netscape sub-class can be used to save in a format compatible with Netscape.

$cookie_jar->load

$cookie_jar->load( $file )

This method reads the cookies from the file and adds them to the $cookie_jar. The file must be in the format written by the save() method.

$cookie_jar->revert
This method empties the $cookie_jar and re-loads the $cookie_jar from the last save file.

$cookie_jar->clear

$cookie_jar->clear( $domain )

$cookie_jar->clear( $domain, $path )

$cookie_jar->clear( $domain, $path, $key )

Invoking this method without arguments will empty the whole $cookie_jar. If given a single argument only cookies belonging to that domain will be removed. If given two arguments, cookies belonging to the specified path within that domain are removed. If given three arguments, then the cookie with the specified key, path and domain is removed.

$cookie_jar->clear_temporary_cookies
Discard all temporary cookies. Scans for all cookies in the jar with either no expire field or a true discard flag. To be called when the user agent shuts down according to RFC 2965.

$cookie_jar->scan( \callback )
The argument is a subroutine that will be invoked for each cookie stored in the $cookie_jar. The subroutine will be invoked with the following arguments: 0 version 1 key 2 val 3 path 4 domain 5 port 6 path_spec 7 secure 8 expires 9 discard 10 hash

$cookie_jar->as_string

$cookie_jar->as_string( $skip_discardables )

The as_string() method will return the state of the $cookie_jar represented as a sequence of Set-Cookie3 header lines separated by . If $skip_discardables is TRUE, it will not return lines for cookies with the Discard attribute.

SEE ALSO

HTTP::Cookies::Netscape, HTTP::Cookies::Microsoft

AUTHOR

Gisle Aas <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 2002 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1015 - Linux cli command sigwait

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigwait and provides detailed information about the command sigwait, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigwait.

NAME 🖥️ sigwait 🖥️

wait for a signal

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
int sigwait(const sigset_t *restrict set, int *restrict sig);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sigwait():

    Since glibc 2.26:
        _POSIX_C_SOURCE >= 199506L
    glibc 2.25 and earlier:
        _POSIX_C_SOURCE

DESCRIPTION

The sigwait() function suspends execution of the calling thread until one of the signals specified in the signal set set becomes pending. For a signal to become pending, it must first be blocked with sigprocmask(2). The function accepts the signal (removes it from the pending list of signals), and returns the signal number in sig.

The operation of sigwait() is the same as sigwaitinfo(2), except that:

  • sigwait() returns only the signal number, rather than a siginfo_t structure describing the signal.

  • The return values of the two functions are different.

RETURN VALUE

On success, sigwait() returns 0. On error, it returns a positive error number (listed in ERRORS).

ERRORS

EINVAL
set contains an invalid signal number.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sigwait()

Thread safetyMT-Safe

VERSIONS

sigwait() is implemented using sigtimedwait(2); consult its NOTES.

The glibc implementation of sigwait() silently ignores attempts to wait for the two real-time signals that are used internally by the NPTL threading implementation. See nptl(7) for details.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

EXAMPLES

See pthread_sigmask(3).

SEE ALSO

sigaction(2), signalfd(2), sigpending(2), sigsuspend(2), sigwaitinfo(2), sigsetops(3), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1016 - Linux cli command Image_ExifTool_MPEGpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_MPEGpm and provides detailed information about the command Image_ExifTool_MPEGpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_MPEGpm.

NAME 🖥️ Image_ExifTool_MPEGpm 🖥️

Read MPEG-1 and MPEG-2 meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read MPEG-1 and MPEG-2 audio/video files.

NOTES

Since ISO charges money for the official MPEG specification, this module is based on unofficial sources which may be incomplete, inaccurate or outdated.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.mp3-tech.org/>

<http://www.getid3.org/>

<http://dvd.sourceforge.net/dvdinfo/dvdmpeg.html>

<http://ffmpeg.org/>

<http://sourceforge.net/projects/mediainfo/>

SEE ALSO

“MPEG Tags” in Image::ExifTool::TagNames, MP3::Info (3pm), Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1017 - Linux cli command iswdigit

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command iswdigit and provides detailed information about the command iswdigit, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the iswdigit.

NAME 🖥️ iswdigit 🖥️

test for decimal digit wide character

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wctype.h>
int iswdigit(wint_t wc);

DESCRIPTION

The iswdigit() function is the wide-character equivalent of the isdigit(3) function. It tests whether wc is a wide character belonging to the wide-character class “digit”.

The wide-character class “digit” is a subclass of the wide-character class “xdigit”, and therefore also a subclass of the wide-character class “alnum”, of the wide-character class “graph” and of the wide-character class “print”.

Being a subclass of the wide character class “print”, the wide-character class “digit” is disjoint from the wide-character class “cntrl”.

Being a subclass of the wide-character class “graph”, the wide-character class “digit” is disjoint from the wide-character class “space” and its subclass “blank”.

Being a subclass of the wide-character class “alnum”, the wide-character class “digit” is disjoint from the wide-character class “punct”.

The wide-character class “digit” is disjoint from the wide-character class “alpha” and therefore also disjoint from its subclasses “lower”, “upper”.

The wide-character class “digit” always contains exactly the digits ‘0’ to ‘9’.

RETURN VALUE

The iswdigit() function returns nonzero if wc is a wide character belonging to the wide-character class “digit”. Otherwise, it returns zero.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

iswdigit()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of iswdigit() depends on the LC_CTYPE category of the current locale.

SEE ALSO

isdigit(3), iswctype(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1018 - Linux cli command XML_XPathEngine_Literalpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_XPathEngine_Literalpm and provides detailed information about the command XML_XPathEngine_Literalpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_XPathEngine_Literalpm.

NAME 🖥️ XML_XPathEngine_Literalpm 🖥️

Simple string values.

DESCRIPTION

In XPath terms a Literal is what we know as a string.

API

new($string)

Create a new Literal object with the value in $string. Note that " and ' will be converted to " and ’ respectively. That is not part of the XPath specification, but I consider it useful. Note though that you have to go to extraordinary lengths in an XML template file (be it XSLT or whatever) to make use of this:

<xsl:value-of select=""Im feeling &quot;sad&quot;""/>

Which produces a Literal of:

Im feeling “sad”

value()

Also overloaded as stringification, simply returns the literal string value.

cmp($literal)

Returns the equivalent of perl’s cmp operator against the given $literal.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1019 - Linux cli command MenuPopup

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command MenuPopup and provides detailed information about the command MenuPopup, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the MenuPopup.

NAME 🖥️ MenuPopup 🖥️

map a pop-up

SYNTAX

#include <X11/Intrinsic.h>

void XtPopup(Widget popup_shell, XtGrabKind grab_kind);

void XtPopupSpringLoaded(Widget popup_shell);

void XtCallbackNone(Widget w, XtPointer client_data, XtPointer call_data);

void XtCallbackNonexclusive(Widget w, XtPointer client_data, XtPointer call_data);

void XtCallbackExclusive(Widget w, XtPointer client_data, XtPointer call_data);

ACTIONS

void XtMenuPopup(String shell_name);

ARGUMENTS

call_data
Specifies the callback data, which is not used by this procedure.

client_data
Specifies the pop-up shell.

grab_kind
Specifies the way in which user events should be constrained.

popup_shell
Specifies the widget shell.

  1. Specifies the widget.

DESCRIPTION

The XtPopup function performs the following:

  • Calls XtCheckSubclass to ensure popup_shell is a subclass of Shell.

  • Generates an error if the shell’s popped_up field is already True.

  • Calls the callback procedures on the shell’s popup_callback list.

  • Sets the shell popped_up field to True, the shell spring_loaded field to False, and the shell grab_kind field from grab_kind.

  • If the shell’s create_popup_child field is non-NULL, XtPopup calls it with popup_shell as the parameter.

  • If grab_kind is either XtGrabNonexclusive or XtGrabExclusive, it calls:

XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), False)

  • Calls XtRealizeWidget with popup_shell specified.

  • Calls XMapWindow with popup_shell specified.

The XtPopupSpringLoaded function performs exactly as XtPopup except that it sets the shell spring_loaded field to True and always calls XtAddGrab with exclusive True and spring_loaded True.

The XtCallbackNone, XtCallbackNonexclusive, and XtCallbackExclusive functions call XtPopup with the shell specified by the client data argument and grab_kind set as the name specifies. XtCallbackNone, XtCallbackNonexclusive, and XtCallbackExclusive specify XtGrabNone, XtGrabNonexclusive, and XtGrabExclusive, respectively. Each function then sets the widget that executed the callback list to be insensitive by using XtSetSensitive. Using these functions in callbacks is not required. In particular, an application must provide customized code for callbacks that create pop-up shells dynamically or that must do more than desensitizing the button.

XtMenuPopup is known to the translation manager, which must perform special actions for spring-loaded pop-ups. Calls to XtMenuPopup in a translation specification are mapped into calls to a nonexported action procedure, and the translation manager fills in parameters based on the event specified on the left-hand side of a translation.

If XtMenuPopup is invoked on ButtonPress (possibly with modifiers), the translation manager pops up the shell with grab_kind set to XtGrabExclusive and spring_loaded set to True. If XtMenuPopup is invoked on EnterWindow (possibly with modifiers), the translation manager pops up the shell with grab_kind set to XtGrabNonexclusive and spring_loaded set to False. Otherwise, the translation manager generates an error. When the widget is popped up, the following actions occur:

  • Calls XtCheckSubclass to ensure popup_shell is a subclass of Shell.

  • Generates an error if the shell’s popped_up field is already True.

  • Calls the callback procedures on the shell’s popup_callback list.

  • Sets the shell popped_up field to True and the shell grab_kind and spring_loaded fields appropriately.

  • If the shell’s create_popup_child field is non-NULL, it is called with popup_shell as the parameter.

  • Calls:

XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), spring_loaded)

  • Calls XtRealizeWidget with popup_shell specified.

  • Calls XMapWindow with popup_shell specified.

(Note that these actions are the same as those for XtPopup.) XtMenuPopup tries to find the shell by searching the widget tree starting at the parent of the widget in which it is invoked. If it finds a shell with the specified name in the pop-up children of that parent, it pops up the shell with the appropriate parameters. Otherwise, it moves up the parent chain as needed. If XtMenuPopup gets to the application widget and cannot find a matching shell, it generates an error.

SEE ALSO

XtCreatePopupShell(3), XtPopdown(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1020 - Linux cli command XtSendSelectionRequest

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtSendSelectionRequest and provides detailed information about the command XtSendSelectionRequest, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtSendSelectionRequest.

NAME 🖥️ XtSendSelectionRequest 🖥️

bundle multiple selection conversion requests into a single request using MULTIPLE target

SYNTAX

#include <X11/Intrinsic.h>

void XtCreateSelectionRequest(Widget requestor, Atom selection);

void XtSendSelectionRequest(Widget requestor, Atom selection, Time time);

void XtCancelSelectionRequest(Widget requestor, Atom selection);

ARGUMENTS

requestor
Specifies the widget making the request. Must be of class Core or a subclass thereof.

selection
Specifies the particular selection desired.

time
Specifies the timestamp to be used in making the request.

DESCRIPTION

When XtCreateSelectionRequest is called, subsequent calls to XtGetSelectionValue and XtGetSelectionValueIncremental with the requestor and selection as specified to XtCreateSelectionRequest will be bundled into a single selection conversion request with multiple targets. The request is actually initiated by calling XtSendSelectionRequest.

When XtSendSelectionRequest is called with a value of requestor and selection matching a previous call to XtCreateSelectionRequest, a selection conversion request is actually sent to the selection owner. If a single target request is queued, that request is made. If multiple targets are queued they are bundled into a single request with the target MULTIPLE using the specified timestamp. As the conversions are made, the callbacks associated with each XtGetSelectionValue and XtGetSelectionValueIncremental are invoked in turn.

Multi-threaded applications should lock the application context before calling XtCreateSelectionRequest and release the lock after calling XtSendSelectionRequest to ensure that the thread assembling the request is safe from interference by another thread assembling a different request naming the same widget and selection.

When XtCancelSelectionRequest is called, any requests queued since the last call to XtCreateSelectionRequest are cleaned up. Subsequent calls to XtGetSelectionValue, XtGetSelectionValues, XtGetSelectionValueIncremental, and XtGetSelectionValuesIncremental will not be deferred.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1021 - Linux cli command tcdrain

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tcdrain and provides detailed information about the command tcdrain, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tcdrain.

NAME 🖥️ tcdrain 🖥️

get and set terminal attributes, line control, get and set baud rate

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <termios.h>
#include <unistd.h>
int tcgetattr(int fd, struct termios *termios_p);
int tcsetattr(int fd, int optional_actions,
 const struct termios *termios_p);
int tcsendbreak(int fd, int duration);
int tcdrain(int fd);
int tcflush(int fd, int queue_selector);
int tcflow(int fd, int action);
void cfmakeraw(struct termios *termios_p);
speed_t cfgetispeed(const struct termios *termios_p);
speed_t cfgetospeed(const struct termios *termios_p);
int cfsetispeed(struct termios *termios_p, speed_t speed);
int cfsetospeed(struct termios *termios_p, speed_t speed);
int cfsetspeed(struct termios *termios_p, speed_t speed);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

cfsetspeed(), cfmakeraw():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The termios functions describe a general terminal interface that is provided to control asynchronous communications ports.

The termios structure

Many of the functions described here have a termios_p argument that is a pointer to a termios structure. This structure contains at least the following members:

tcflag_t c_iflag;      /* input modes */
tcflag_t c_oflag;      /* output modes */
tcflag_t c_cflag;      /* control modes */
tcflag_t c_lflag;      /* local modes */
cc_t     c_cc[NCCS];   /* special characters */

The values that may be assigned to these fields are described below. In the case of the first four bit-mask fields, the definitions of some of the associated flags that may be set are exposed only if a specific feature test macro (see feature_test_macros(7)) is defined, as noted in brackets ("[]").

In the descriptions below, “not in POSIX” means that the value is not specified in POSIX.1-2001, and “XSI” means that the value is specified in POSIX.1-2001 as part of the XSI extension.

c_iflag flag constants:

IGNBRK
Ignore BREAK condition on input.

BRKINT
If IGNBRK is set, a BREAK is ignored. If it is not set but BRKINT is set, then a BREAK causes the input and output queues to be flushed, and if the terminal is the controlling terminal of a foreground process group, it will cause a SIGINT to be sent to this foreground process group. When neither IGNBRK nor BRKINT are set, a BREAK reads as a null byte (‘�’), except when PARMRK is set, in which case it reads as the sequence \377 � �.

IGNPAR
Ignore framing errors and parity errors.

PARMRK
If this bit is set, input bytes with parity or framing errors are marked when passed to the program. This bit is meaningful only when INPCK is set and IGNPAR is not set. The way erroneous bytes are marked is with two preceding bytes, \377 and �. Thus, the program actually reads three bytes for one erroneous byte received from the terminal. If a valid byte has the value \377, and ISTRIP (see below) is not set, the program might confuse it with the prefix that marks a parity error. Therefore, a valid byte \377 is passed to the program as two bytes, \377 \377, in this case.

If neither IGNPAR nor PARMRK is set, read a character with a parity error or framing error as �.

INPCK
Enable input parity checking.

ISTRIP
Strip off eighth bit.

INLCR
Translate NL to CR on input.

IGNCR
Ignore carriage return on input.

ICRNL
Translate carriage return to newline on input (unless IGNCR is set).

IUCLC
(not in POSIX) Map uppercase characters to lowercase on input.

IXON
Enable XON/XOFF flow control on output.

IXANY
(XSI) Typing any character will restart stopped output. (The default is to allow just the START character to restart output.)

IXOFF
Enable XON/XOFF flow control on input.

IMAXBEL
(not in POSIX) Ring bell when input queue is full. Linux does not implement this bit, and acts as if it is always set.

IUTF8 (since Linux 2.6.4)
(not in POSIX) Input is UTF8; this allows character-erase to be correctly performed in cooked mode.

c_oflag flag constants:

OPOST
Enable implementation-defined output processing.

OLCUC
(not in POSIX) Map lowercase characters to uppercase on output.

ONLCR
(XSI) Map NL to CR-NL on output.

OCRNL
Map CR to NL on output.

ONOCR
Don’t output CR at column 0.

ONLRET
The NL character is assumed to do the carriage-return function; the kernel’s idea of the current column is set to 0 after both NL and CR.

OFILL
Send fill characters for a delay, rather than using a timed delay.

OFDEL
Fill character is ASCII DEL (0177). If unset, fill character is ASCII NUL (‘�’). (Not implemented on Linux.)

NLDLY
Newline delay mask. Values are NL0 and NL1. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

CRDLY
Carriage return delay mask. Values are CR0, CR1, CR2, or CR3. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

TABDLY
Horizontal tab delay mask. Values are TAB0, TAB1, TAB2, TAB3 (or XTABS, but see the BUGS section). A value of TAB3, that is, XTABS, expands tabs to spaces (with tab stops every eight columns). [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

BSDLY
Backspace delay mask. Values are BS0 or BS1. (Has never been implemented.) [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

VTDLY
Vertical tab delay mask. Values are VT0 or VT1.

FFDLY
Form feed delay mask. Values are FF0 or FF1. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

c_cflag flag constants:

CBAUD
(not in POSIX) Baud speed mask (4+1 bits). [requires _BSD_SOURCE or _SVID_SOURCE]

CBAUDEX
(not in POSIX) Extra baud speed mask (1 bit), included in CBAUD. [requires _BSD_SOURCE or _SVID_SOURCE]

(POSIX says that the baud speed is stored in the termios structure without specifying where precisely, and provides cfgetispeed() and cfsetispeed() for getting at it. Some systems use bits selected by CBAUD in c_cflag, other systems use separate fields, for example, sg_ispeed and sg_ospeed.)

CSIZE
Character size mask. Values are CS5, CS6, CS7, or CS8.

CSTOPB
Set two stop bits, rather than one.

CREAD
Enable receiver.

PARENB
Enable parity generation on output and parity checking for input.

PARODD
If set, then parity for input and output is odd; otherwise even parity is used.

HUPCL
Lower modem control lines after last process closes the device (hang up).

CLOCAL
Ignore modem control lines.

LOBLK
(not in POSIX) Block output from a noncurrent shell layer. For use by shl (shell layers). (Not implemented on Linux.)

CIBAUD
(not in POSIX) Mask for input speeds. The values for the CIBAUD bits are the same as the values for the CBAUD bits, shifted left IBSHIFT bits. [requires _BSD_SOURCE or _SVID_SOURCE] (Not implemented in glibc, supported on Linux via TCGET* and TCSET* ioctls; see ioctl_tty(2))

CMSPAR
(not in POSIX) Use “stick” (mark/space) parity (supported on certain serial devices): if PARODD is set, the parity bit is always 1; if PARODD is not set, then the parity bit is always 0. [requires _BSD_SOURCE or _SVID_SOURCE]

CRTSCTS
(not in POSIX) Enable RTS/CTS (hardware) flow control. [requires _BSD_SOURCE or _SVID_SOURCE]

c_lflag flag constants:

ISIG
When any of the characters INTR, QUIT, SUSP, or DSUSP are received, generate the corresponding signal.

ICANON
Enable canonical mode (described below).

XCASE
(not in POSIX; not supported under Linux) If ICANON is also set, terminal is uppercase only. Input is converted to lowercase, except for characters preceded by \ On output, uppercase characters are preceded by \ and lowercase characters are converted to uppercase. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

ECHO
Echo input characters.

ECHOE
If ICANON is also set, the ERASE character erases the preceding input character, and WERASE erases the preceding word.

ECHOK
If ICANON is also set, the KILL character erases the current line.

ECHONL
If ICANON is also set, echo the NL character even if ECHO is not set.

ECHOCTL
(not in POSIX) If ECHO is also set, terminal special characters other than TAB, NL, START, and STOP are echoed as ^X, where X is the character with ASCII code 0x40 greater than the special character. For example, character 0x08 (BS) is echoed as ^H. [requires _BSD_SOURCE or _SVID_SOURCE]

ECHOPRT
(not in POSIX) If ICANON and ECHO are also set, characters are printed as they are being erased. [requires _BSD_SOURCE or _SVID_SOURCE]

ECHOKE
(not in POSIX) If ICANON is also set, KILL is echoed by erasing each character on the line, as specified by ECHOE and ECHOPRT. [requires _BSD_SOURCE or _SVID_SOURCE]

DEFECHO
(not in POSIX) Echo only when a process is reading. (Not implemented on Linux.)

FLUSHO
(not in POSIX; not supported under Linux) Output is being flushed. This flag is toggled by typing the DISCARD character. [requires _BSD_SOURCE or _SVID_SOURCE]

NOFLSH
Disable flushing the input and output queues when generating signals for the INT, QUIT, and SUSP characters.

TOSTOP
Send the SIGTTOU signal to the process group of a background process which tries to write to its controlling terminal.

PENDIN
(not in POSIX; not supported under Linux) All characters in the input queue are reprinted when the next character is read. (bash(1) handles typeahead this way.) [requires _BSD_SOURCE or _SVID_SOURCE]

IEXTEN
Enable implementation-defined input processing. This flag, as well as ICANON must be enabled for the special characters EOL2, LNEXT, REPRINT, WERASE to be interpreted, and for the IUCLC flag to be effective.

The c_cc array defines the terminal special characters. The symbolic indices (initial values) and meaning are:

VDISCARD
(not in POSIX; not supported under Linux; 017, SI, Ctrl-O) Toggle: start/stop discarding pending output. Recognized when IEXTEN is set, and then not passed as input.

VDSUSP
(not in POSIX; not supported under Linux; 031, EM, Ctrl-Y) Delayed suspend character (DSUSP): send SIGTSTP signal when the character is read by the user program. Recognized when IEXTEN and ISIG are set, and the system supports job control, and then not passed as input.

VEOF
(004, EOT, Ctrl-D) End-of-file character (EOF). More precisely: this character causes the pending tty buffer to be sent to the waiting user program without waiting for end-of-line. If it is the first character of the line, the read(2) in the user program returns 0, which signifies end-of-file. Recognized when ICANON is set, and then not passed as input.

VEOL
(0, NUL) Additional end-of-line character (EOL). Recognized when ICANON is set.

VEOL2
(not in POSIX; 0, NUL) Yet another end-of-line character (EOL2). Recognized when ICANON is set.

VERASE
(0177, DEL, rubout, or 010, BS, Ctrl-H, or also #) Erase character (ERASE). This erases the previous not-yet-erased character, but does not erase past EOF or beginning-of-line. Recognized when ICANON is set, and then not passed as input.

VINTR
(003, ETX, Ctrl-C, or also 0177, DEL, rubout) Interrupt character (INTR). Send a SIGINT signal. Recognized when ISIG is set, and then not passed as input.

VKILL
(025, NAK, Ctrl-U, or Ctrl-X, or also @) Kill character (KILL). This erases the input since the last EOF or beginning-of-line. Recognized when ICANON is set, and then not passed as input.

VLNEXT
(not in POSIX; 026, SYN, Ctrl-V) Literal next (LNEXT). Quotes the next input character, depriving it of a possible special meaning. Recognized when IEXTEN is set, and then not passed as input.

VMIN
Minimum number of characters for noncanonical read (MIN).

VQUIT
(034, FS, Ctrl-\ Quit character (QUIT). Send SIGQUIT signal. Recognized when ISIG is set, and then not passed as input.

VREPRINT
(not in POSIX; 022, DC2, Ctrl-R) Reprint unread characters (REPRINT). Recognized when ICANON and IEXTEN are set, and then not passed as input.

VSTART
(021, DC1, Ctrl-Q) Start character (START). Restarts output stopped by the Stop character. Recognized when IXON is set, and then not passed as input.

VSTATUS
(not in POSIX; not supported under Linux; status request: 024, DC4, Ctrl-T). Status character (STATUS). Display status information at terminal, including state of foreground process and amount of CPU time it has consumed. Also sends a SIGINFO signal (not supported on Linux) to the foreground process group.

VSTOP
(023, DC3, Ctrl-S) Stop character (STOP). Stop output until Start character typed. Recognized when IXON is set, and then not passed as input.

VSUSP
(032, SUB, Ctrl-Z) Suspend character (SUSP). Send SIGTSTP signal. Recognized when ISIG is set, and then not passed as input.

VSWTCH
(not in POSIX; not supported under Linux; 0, NUL) Switch character (SWTCH). Used in System V to switch shells in shell layers, a predecessor to shell job control.

VTIME
Timeout in deciseconds for noncanonical read (TIME).

VWERASE
(not in POSIX; 027, ETB, Ctrl-W) Word erase (WERASE). Recognized when ICANON and IEXTEN are set, and then not passed as input.

An individual terminal special character can be disabled by setting the value of the corresponding c_cc element to _POSIX_VDISABLE.

The above symbolic subscript values are all different, except that VTIME, VMIN may have the same value as VEOL, VEOF, respectively. In noncanonical mode the special character meaning is replaced by the timeout meaning. For an explanation of VMIN and VTIME, see the description of noncanonical mode below.

Retrieving and changing terminal settings

tcgetattr() gets the parameters associated with the object referred by fd and stores them in the termios structure referenced by termios_p. This function may be invoked from a background process; however, the terminal attributes may be subsequently changed by a foreground process.

tcsetattr() sets the parameters associated with the terminal (unless support is required from the underlying hardware that is not available) from the termios structure referred to by termios_p. optional_actions specifies when the changes take effect:

TCSANOW
the change occurs immediately.

TCSADRAIN
the change occurs after all output written to fd has been transmitted. This option should be used when changing parameters that affect output.

TCSAFLUSH
the change occurs after all output written to the object referred by fd has been transmitted, and all input that has been received but not read will be discarded before the change is made.

Canonical and noncanonical mode

The setting of the ICANON canon flag in c_lflag determines whether the terminal is operating in canonical mode (ICANON set) or noncanonical mode (ICANON unset). By default, ICANON is set.

In canonical mode:

  • Input is made available line by line. An input line is available when one of the line delimiters is typed (NL, EOL, EOL2; or EOF at the start of line). Except in the case of EOF, the line delimiter is included in the buffer returned by read(2).

  • Line editing is enabled (ERASE, KILL; and if the IEXTEN flag is set: WERASE, REPRINT, LNEXT). A read(2) returns at most one line of input; if the read(2) requested fewer bytes than are available in the current line of input, then only as many bytes as requested are read, and the remaining characters will be available for a future read(2).

  • The maximum line length is 4096 chars (including the terminating newline character); lines longer than 4096 chars are truncated. After 4095 characters, input processing (e.g., ISIG and ECHO* processing) continues, but any input data after 4095 characters up to (but not including) any terminating newline is discarded. This ensures that the terminal can always receive more input until at least one line can be read.

In noncanonical mode input is available immediately (without the user having to type a line-delimiter character), no input processing is performed, and line editing is disabled. The read buffer will only accept 4095 chars; this provides the necessary space for a newline char if the input mode is switched to canonical. The settings of MIN (c_cc[VMIN]) and TIME (c_cc[VTIME]) determine the circumstances in which a read(2) completes; there are four distinct cases:

MIN == 0, TIME == 0 (polling read)
If data is available, read(2) returns immediately, with the lesser of the number of bytes available, or the number of bytes requested. If no data is available, read(2) returns 0.

MIN > 0, TIME == 0 (blocking read)
read(2) blocks until MIN bytes are available, and returns up to the number of bytes requested.

MIN == 0, TIME > 0 (read with timeout)
TIME specifies the limit for a timer in tenths of a second. The timer is started when read(2) is called. read(2) returns either when at least one byte of data is available, or when the timer expires. If the timer expires without any input becoming available, read(2) returns 0. If data is already available at the time of the call to read(2), the call behaves as though the data was received immediately after the call.

MIN > 0, TIME > 0 (read with interbyte timeout)
TIME specifies the limit for a timer in tenths of a second. Once an initial byte of input becomes available, the timer is restarted after each further byte is received. read(2) returns when any of the following conditions is met:

  • MIN bytes have been received.

  • The interbyte timer expires.

  • The number of bytes requested by read(2) has been received. (POSIX does not specify this termination condition, and on some other implementations read(2) does not return in this case.)

Because the timer is started only after the initial byte becomes available, at least one byte will be read. If data is already available at the time of the call to read(2), the call behaves as though the data was received immediately after the call.

POSIX does not specify whether the setting of the O_NONBLOCK file status flag takes precedence over the MIN and TIME settings. If O_NONBLOCK is set, a read(2) in noncanonical mode may return immediately, regardless of the setting of MIN or TIME. Furthermore, if no data is available, POSIX permits a read(2) in noncanonical mode to return either 0, or -1 with errno set to EAGAIN.

Raw mode

cfmakeraw() sets the terminal to something like the “raw” mode of the old Version 7 terminal driver: input is available character by character, echoing is disabled, and all special processing of terminal input and output characters is disabled. The terminal attributes are set as follows:

termios_p->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
                | INLCR | IGNCR | ICRNL | IXON);
termios_p->c_oflag &= ~OPOST;
termios_p->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
termios_p->c_cflag &= ~(CSIZE | PARENB);
termios_p->c_cflag |= CS8;

Line control

tcsendbreak() transmits a continuous stream of zero-valued bits for a specific duration, if the terminal is using asynchronous serial data transmission. If duration is zero, it transmits zero-valued bits for at least 0.25 seconds, and not more than 0.5 seconds. If duration is not zero, it sends zero-valued bits for some implementation-defined length of time.

If the terminal is not using asynchronous serial data transmission, tcsendbreak() returns without taking any action.

tcdrain() waits until all output written to the object referred to by fd has been transmitted.

tcflush() discards data written to the object referred to by fd but not transmitted, or data received but not read, depending on the value of queue_selector:

TCIFLUSH
flushes data received but not read.

TCOFLUSH
flushes data written but not transmitted.

TCIOFLUSH
flushes both data received but not read, and data written but not transmitted.

tcflow() suspends transmission or reception of data on the object referred to by fd, depending on the value of action:

TCOOFF
suspends output.

TCOON
restarts suspended output.

TCIOFF
transmits a STOP character, which stops the terminal device from transmitting data to the system.

TCION
transmits a START character, which starts the terminal device transmitting data to the system.

The default on open of a terminal file is that neither its input nor its output is suspended.

Line speed

The baud rate functions are provided for getting and setting the values of the input and output baud rates in the termios structure. The new values do not take effect until tcsetattr() is successfully called.

Setting the speed to B0 instructs the modem to “hang up”. The actual bit rate corresponding to B38400 may be altered with setserial(8).

The input and output baud rates are stored in the termios structure.

cfgetospeed() returns the output baud rate stored in the termios structure pointed to by termios_p.

cfsetospeed() sets the output baud rate stored in the termios structure pointed to by termios_p to speed, which must be one of these constants:

B0
B50
B75
B110
B134
B150
B200
B300
B600
B1200
B1800
B2400
B4800
B9600
B19200
B38400
B57600
B115200
B230400
B460800
B500000
B576000
B921600
B1000000
B1152000
B1500000
B2000000

These constants are additionally supported on the SPARC architecture:

B76800
B153600
B307200
B614400

These constants are additionally supported on non-SPARC architectures:

B2500000
B3000000
B3500000
B4000000

Due to differences between architectures, portable applications should check if a particular Bnnn constant is defined prior to using it.

The zero baud rate, B0, is used to terminate the connection. If B0 is specified, the modem control lines shall no longer be asserted. Normally, this will disconnect the line. CBAUDEX is a mask for the speeds beyond those defined in POSIX.1 (57600 and above). Thus, B57600 & CBAUDEX is nonzero.

Setting the baud rate to a value other than those defined by Bnnn constants is possible via the TCSETS2 ioctl; see ioctl_tty(2).

cfgetispeed() returns the input baud rate stored in the termios structure.

cfsetispeed() sets the input baud rate stored in the termios structure to speed, which must be specified as one of the Bnnn constants listed above for cfsetospeed(). If the input baud rate is set to the literal constant 0 (not the symbolic constant B0), the input baud rate will be equal to the output baud rate.

cfsetspeed() is a 4.4BSD extension. It takes the same arguments as cfsetispeed(), and sets both input and output speed.

RETURN VALUE

cfgetispeed() returns the input baud rate stored in the termios structure.

cfgetospeed() returns the output baud rate stored in the termios structure.

All other functions return:

0
on success.

-1
on failure and set errno to indicate the error.

Note that tcsetattr() returns success if any of the requested changes could be successfully carried out. Therefore, when making multiple changes it may be necessary to follow this call with a further call to tcgetattr() to check that all changes have been performed successfully.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tcgetattr(), tcsetattr(), tcdrain(), tcflush(), tcflow(), tcsendbreak(), cfmakeraw(), cfgetispeed(), cfgetospeed(), cfsetispeed(), cfsetospeed(), cfsetspeed()

Thread safetyMT-Safe

STANDARDS

tcgetattr()
tcsetattr()
tcsendbreak()
tcdrain()
tcflush()
tcflow()
cfgetispeed()
cfgetospeed()
cfsetispeed()
cfsetospeed()
POSIX.1-2008.

cfmakeraw()
cfsetspeed()
BSD.

HISTORY

tcgetattr()
tcsetattr()
tcsendbreak()
tcdrain()
tcflush()
tcflow()
cfgetispeed()
cfgetospeed()
cfsetispeed()
cfsetospeed()
POSIX.1-2001.

cfmakeraw()
cfsetspeed()
BSD.

NOTES

UNIX V7 and several later systems have a list of baud rates where after the values B0 through B9600 one finds the two constants EXTA, EXTB (“External A” and “External B”). Many systems extend the list with much higher baud rates.

The effect of a nonzero duration with tcsendbreak() varies. SunOS specifies a break of duration * N seconds, where N is at least 0.25, and not more than 0.5. Linux, AIX, DU, Tru64 send a break of duration milliseconds. FreeBSD and NetBSD and HP-UX and MacOS ignore the value of duration. Under Solaris and UnixWare, tcsendbreak() with nonzero duration behaves like tcdrain().

BUGS

On the Alpha architecture before Linux 4.16 (and glibc before glibc 2.28), the XTABS value was different from TAB3 and it was ignored by the N_TTY line discipline code of the terminal driver as a result (because as it wasn’t part of the TABDLY mask).

SEE ALSO

reset(1), setterm(1), stty(1), tput(1), tset(1), tty(1), ioctl_console(2), ioctl_tty(2), cc_t(3type), speed_t(3type), tcflag_t(3type), setserial(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1022 - Linux cli command XML_DOM_CDATASectionpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_DOM_CDATASectionpm and provides detailed information about the command XML_DOM_CDATASectionpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_DOM_CDATASectionpm.

NAME 🖥️ XML_DOM_CDATASectionpm 🖥️

Escaping XML text blocks in XML::DOM

DESCRIPTION

XML::DOM::CDATASection extends XML::DOM::CharacterData which extends XML::DOM::Node.

CDATA sections are used to escape blocks of text containing characters that would otherwise be regarded as markup. The only delimiter that is recognized in a CDATA section is the ]]> string that ends the CDATA section. CDATA sections can not be nested. The primary purpose is for including material such as XML fragments, without needing to escape all the delimiters.

The DOMString attribute of the Text node holds the text that is contained by the CDATA section. Note that this may contain characters that need to be escaped outside of CDATA sections and that, depending on the character encoding (charset) chosen for serialization, it may be impossible to write out some characters as part of a CDATA section.

The CDATASection interface inherits the CharacterData interface through the Text interface. Adjacent CDATASections nodes are not merged by use of the Element.normalize() method.

NOTE: XML::DOM::Parser and XML::DOM::ValParser convert all CDATASections to regular text by default. To preserve CDATASections, set the parser option KeepCDATA to 1.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1023 - Linux cli command Image_ExifTool_BMPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_BMPpm and provides detailed information about the command Image_ExifTool_BMPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_BMPpm.

NAME 🖥️ Image_ExifTool_BMPpm 🖥️

Read BMP meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read BMP (Windows Bitmap) images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.fortunecity.com/skyscraper/windows/364/bmpffrmt.html>

<http://www.fourcc.org/rgb.php>

<https://msdn.microsoft.com/en-us/library/dd183381(v=vs.85).aspx>

SEE ALSO

“BMP Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1024 - Linux cli command queue

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command queue and provides detailed information about the command queue, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the queue.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1025 - Linux cli command wcsncat

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcsncat and provides detailed information about the command wcsncat, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcsncat.

NAME 🖥️ wcsncat 🖥️

concatenate two wide-character strings

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
wchar_t *wcsncat(wchar_t dest[restrict .n],
 const wchar_t src[restrict .n],
 size_t n);

DESCRIPTION

The wcsncat() function is the wide-character equivalent of the strncat(3) function. It copies at most n wide characters from the wide-character string pointed to by src to the end of the wide-character string pointed to by dest, and adds a terminating null wide character (L’�’).

The strings may not overlap.

The programmer must ensure that there is room for at least wcslen(dest)+n+1 wide characters at dest.

RETURN VALUE

wcsncat() returns dest.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcsncat()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

strncat(3), wcscat(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1026 - Linux cli command Moose_Meta_Mixin_AttributeCorepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Mixin_AttributeCorepm and provides detailed information about the command Moose_Meta_Mixin_AttributeCorepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Mixin_AttributeCorepm.

NAME 🖥️ Moose_Meta_Mixin_AttributeCorepm 🖥️

Core attributes shared by attribute metaclasses

VERSION

version 2.2207

DESCRIPTION

This class implements the core attributes (aka properties) shared by all Moose attributes. See the Moose::Meta::Attribute documentation for API details.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1027 - Linux cli command NetPacketpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command NetPacketpm and provides detailed information about the command NetPacketpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the NetPacketpm.

NAME 🖥️ NetPacketpm 🖥️

assemble/disassemble network packets at the protocol level

VERSION

version 1.7.2

SYNOPSIS

# NetPacket is a base class only

DESCRIPTION

NetPacket provides a base class for a cluster of modules related to decoding and encoding of network protocols. Each NetPacket descendent module knows how to encode and decode packets for the network protocol it implements. Consult the documentation for the module in question for protocol-specific implementation.

Note that there is no inheritance in the NetPacket:: cluster of modules other than each protocol module being a NetPacket. This was seen to be too restrictive as imposing inheritance relationships (for example between the IP, UDP and TCP protocols) would make things like tunneling or other unusual situations difficult.

WRITING YOUR OWN “NetPacket::” MODULE

You are encouraged to write additional NetPacket:: modules as well as improve existing ones. Contact the maintainer of the module in question with your suggestions or changes.

The following sections are a list of suggestions and conventions for writing a NetPacket:: module.

Naming Conventions

When creating a module in the NetPacket:: namespace, it is suggested that you stick to a couple of conventions when naming packet contents. This will hopefully lead to a consistent namespace making the NetPacket:: easier to use.

Content names are all lowercase, with underscores separating multiple words. The following abbreviations are recommended:

Word Abbreviation ——————————– source src destination dest checksum cksum identifier id version ver protocol proto

Required Methods

encode(), decode(), strip()

Required Fields

Every NetPacket:: object should have the following fields.

_parent
A link to the parent NetPacket:: object in which this NetPacket:: object is encaulated. This field is undefined if there is no parent object.

_frame
A copy of the raw data of the packet.

data
This field should contain the data encapsulated in the packet (i.e any headers or trailers stripped off) or undef if the packet contains no data. Note that in this sense, data is taken to mean information not relevant to the particular protocol being decoded. For example, an ARP packet contains many header fields but no data. A UDP datagram, however contains header fields and a payload.

SEE ALSO

Joel Knight has a patch for NetPacket for IPv6 support available at http://www.packetmischief.ca/code/netpacket/.

COPYRIGHT AND LICENSE

Copyright (c) 2001 Tim Potter and Stephanie Wehner.

Copyright (c) 1995,1996,1997,1998,1999 ANU and CSIRO on behalf of the participants in the CRC for Advanced Computational Systems (‘ACSys’).

This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

AUTHORS

Tim Potter <[email protected]>

Stephanie Wehner <[email protected]>

Yanick Champoux <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1028 - Linux cli command pthread_cleanup_push

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_cleanup_push and provides detailed information about the command pthread_cleanup_push, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_cleanup_push.

NAME 🖥️ pthread_cleanup_push 🖥️

push and pop thread cancelation clean-up handlers

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
void pthread_cleanup_push(void (*routine)(void *), void *arg);
void pthread_cleanup_pop(int execute);

DESCRIPTION

These functions manipulate the calling thread’s stack of thread-cancelation clean-up handlers. A clean-up handler is a function that is automatically executed when a thread is canceled (or in various other circumstances described below); it might, for example, unlock a mutex so that it becomes available to other threads in the process.

The pthread_cleanup_push() function pushes routine onto the top of the stack of clean-up handlers. When routine is later invoked, it will be given arg as its argument.

The pthread_cleanup_pop() function removes the routine at the top of the stack of clean-up handlers, and optionally executes it if execute is nonzero.

A cancelation clean-up handler is popped from the stack and executed in the following circumstances:

  • When a thread is canceled, all of the stacked clean-up handlers are popped and executed in the reverse of the order in which they were pushed onto the stack.

  • When a thread terminates by calling pthread_exit(3), all clean-up handlers are executed as described in the preceding point. (Clean-up handlers are not called if the thread terminates by performing a return from the thread start function.)

  • When a thread calls pthread_cleanup_pop() with a nonzero execute argument, the top-most clean-up handler is popped and executed.

POSIX.1 permits pthread_cleanup_push() and pthread_cleanup_pop() to be implemented as macros that expand to text containing ‘{’ and ‘}’, respectively. For this reason, the caller must ensure that calls to these functions are paired within the same function, and at the same lexical nesting level. (In other words, a clean-up handler is established only during the execution of a specified section of code.)

Calling longjmp(3) (siglongjmp(3)) produces undefined results if any call has been made to pthread_cleanup_push() or pthread_cleanup_pop() without the matching call of the pair since the jump buffer was filled by setjmp(3) (sigsetjmp(3)). Likewise, calling longjmp(3) (siglongjmp(3)) from inside a clean-up handler produces undefined results unless the jump buffer was also filled by setjmp(3) (sigsetjmp(3)) inside the handler.

RETURN VALUE

These functions do not return a value.

ERRORS

There are no errors.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_cleanup_push(), pthread_cleanup_pop()

Thread safetyMT-Safe

VERSIONS

On glibc, the pthread_cleanup_push() and pthread_cleanup_pop() functions are implemented as macros that expand to text containing ‘{’ and ‘}’, respectively. This means that variables declared within the scope of paired calls to these functions will be visible within only that scope.

POSIX.1 says that the effect of using return, break, continue, or goto to prematurely leave a block bracketed pthread_cleanup_push() and pthread_cleanup_pop() is undefined. Portable applications should avoid doing this.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001. glibc 2.0.

EXAMPLES

The program below provides a simple example of the use of the functions described in this page. The program creates a thread that executes a loop bracketed by pthread_cleanup_push() and pthread_cleanup_pop(). This loop increments a global variable, cnt, once each second. Depending on what command-line arguments are supplied, the main thread sends the other thread a cancelation request, or sets a global variable that causes the other thread to exit its loop and terminate normally (by doing a return).

In the following shell session, the main thread sends a cancelation request to the other thread:

$ ./a.out
New thread started
cnt = 0
cnt = 1
Canceling thread
Called clean-up handler
Thread was canceled; cnt = 0

From the above, we see that the thread was canceled, and that the cancelation clean-up handler was called and it reset the value of the global variable cnt to 0.

In the next run, the main program sets a global variable that causes other thread to terminate normally:

$ ./a.out x
New thread started
cnt = 0
cnt = 1
Thread terminated normally; cnt = 2

From the above, we see that the clean-up handler was not executed (because cleanup_pop_arg was 0), and therefore the value of cnt was not reset.

In the next run, the main program sets a global variable that causes the other thread to terminate normally, and supplies a nonzero value for cleanup_pop_arg:

$ ./a.out x 1
New thread started
cnt = 0
cnt = 1
Called clean-up handler
Thread terminated normally; cnt = 0

In the above, we see that although the thread was not canceled, the clean-up handler was executed, because the argument given to pthread_cleanup_pop() was nonzero.

Program source

#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#define handle_error_en(en, msg) \
        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
static int done = 0;
static int cleanup_pop_arg = 0;
static int cnt = 0;
static void
cleanup_handler(void *arg)
{
    printf("Called clean-up handler

“); cnt = 0; } static void * thread_start(void arg) { time_t curr; printf(“New thread started “); pthread_cleanup_push(cleanup_handler, NULL); curr = time(NULL); while (!done) { pthread_testcancel(); / A cancelation point / if (curr < time(NULL)) { curr = time(NULL); printf(“cnt = %d “, cnt); / A cancelation point */ cnt++; } } pthread_cleanup_pop(cleanup_pop_arg); return NULL; } int main(int argc, char *argv[]) { pthread_t thr; int s; void res; s = pthread_create(&thr, NULL, thread_start, NULL); if (s != 0) handle_error_en(s, “pthread_create”); sleep(2); / Allow new thread to run a while */ if (argc > 1) { if (argc > 2) cleanup_pop_arg = atoi(argv[2]); done = 1; } else { printf(“Canceling thread “); s = pthread_cancel(thr); if (s != 0) handle_error_en(s, “pthread_cancel”); } s = pthread_join(thr, &res); if (s != 0) handle_error_en(s, “pthread_join”); if (res == PTHREAD_CANCELED) printf(“Thread was canceled; cnt = %d “, cnt); else printf(“Thread terminated normally; cnt = %d “, cnt); exit(EXIT_SUCCESS); }

SEE ALSO

pthread_cancel(3), pthread_cleanup_push_defer_np(3), pthread_setcancelstate(3), pthread_testcancel(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1029 - Linux cli command xprt_unregister

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xprt_unregister and provides detailed information about the command xprt_unregister, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xprt_unregister.

NAME 🖥️ xprt_unregister 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1030 - Linux cli command ilogbf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ilogbf and provides detailed information about the command ilogbf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ilogbf.

NAME 🖥️ ilogbf 🖥️

get integer exponent of a floating-point value

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
int ilogb(double x);
int ilogbf(float x);
int ilogbl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

ilogb():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

ilogbf(), ilogbl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the exponent part of their argument as a signed integer. When no error occurs, these functions are equivalent to the corresponding logb(3) functions, cast to int.

RETURN VALUE

On success, these functions return the exponent of x, as a signed integer.

If x is zero, then a domain error occurs, and the functions return FP_ILOGB0.

If x is a NaN, then a domain error occurs, and the functions return FP_ILOGBNAN.

If x is negative infinity or positive infinity, then a domain error occurs, and the functions return INT_MAX.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is 0 or a NaN
An invalid floating-point exception (FE_INVALID) is raised, and errno is set to EDOM (but see BUGS).

Domain error: x is an infinity
An invalid floating-point exception (FE_INVALID) is raised, and errno is set to EDOM (but see BUGS).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

ilogb(), ilogbf(), ilogbl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

BUGS

Before glibc 2.16, the following bugs existed in the glibc implementation of these functions:

  • The domain error case where x is 0 or a NaN did not cause errno to be set or (on some architectures) raise a floating-point exception.

  • The domain error case where x is an infinity did not cause errno to be set or raise a floating-point exception.

SEE ALSO

log(3), logb(3), significand(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1031 - Linux cli command XML_DOM_Entitypm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_DOM_Entitypm and provides detailed information about the command XML_DOM_Entitypm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_DOM_Entitypm.

NAME 🖥️ XML_DOM_Entitypm 🖥️

An XML ENTITY in XML::DOM

DESCRIPTION

XML::DOM::Entity extends XML::DOM::Node.

This node represents an Entity declaration, e.g.

<!ENTITY % draft INCLUDE> <!ENTITY hatch-pic SYSTEM “../grafix/OpenHatch.gif” NDATA gif>

The first one is called a parameter entity and is referenced like this: %draft; The 2nd is a (regular) entity and is referenced like this: &hatch-pic;

METHODS

getNotationName
Returns the name of the notation for the entity. Not Implemented The DOM Spec says: For unparsed entities, the name of the notation for the entity. For parsed entities, this is null. (This implementation does not support unparsed entities.)

getSysId
Returns the system id, or undef.

getPubId
Returns the public id, or undef.

Additional methods not in the DOM Spec

isParameterEntity
Whether it is a parameter entity (%ent;) or not (&ent;)

getValue
Returns the entity value.

getNdata
Returns the NDATA declaration (for general unparsed entities), or undef.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1032 - Linux cli command Image_ExifTool_MOIpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_MOIpm and provides detailed information about the command Image_ExifTool_MOIpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_MOIpm.

NAME 🖥️ Image_ExifTool_MOIpm 🖥️

Read MOI meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read meta information from MOI files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<https://en.wikipedia.org/wiki/MOI_(file_format)>

SEE ALSO

“MOI Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1033 - Linux cli command Moose_Meta_Role_Application_ToRolepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Role_Application_ToRolepm and provides detailed information about the command Moose_Meta_Role_Application_ToRolepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Role_Application_ToRolepm.

NAME 🖥️ Moose_Meta_Role_Application_ToRolepm 🖥️

Compose a role into another role

VERSION

version 2.2207

DESCRIPTION

METHODS

new

meta

apply

check_role_exclusions

check_required_methods

check_required_attributes

apply_attributes

apply_methods

apply_method_modifiers

apply_override_method_modifiers

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1034 - Linux cli command HTML_Form_KeygenInputpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_Form_KeygenInputpm and provides detailed information about the command HTML_Form_KeygenInputpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_Form_KeygenInputpm.

NAME 🖥️ HTML_Form_KeygenInputpm 🖥️

An HTML form keygen input element for use with HTML::Form

VERSION

version 6.11

AUTHOR

Gisle Aas <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 1998 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1035 - Linux cli command Tk_TixGridpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_TixGridpm and provides detailed information about the command Tk_TixGridpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_TixGridpm.

NAME 🖥️ Tk_TixGridpm 🖥️

Create and manipulate Tix Grid widgets

SYNOPSIS

$tixgrid = $parent->TixGrid?(options)?;

DESCRIPTION

This widget is intended as the basis of “spread sheet” like interfaces. The widget displays its contents in a two dimensional “grid” of cells. Each cell may contain one Tix display item, which may be in text, graphics or other formats. See Tk::DItem for more information about Tix display items. Because these “items” need not be “windows” large grids can be handled without consuming excessive display system resources.

Individual cells, or groups of cells, can be formatted with a wide range of attributes, such as its color, relief and border. However because the widget is intended to handle large grids the mechanisms to achieve these are lower level, and more callback oriented than for other widgets. The assumption is that to avoid storing display details of a large number of cells, the data will be re-computed as needed.

The port of Tix C code and some of the bindings to perl/Tk is done but still need further work. In several places the intent of the Tix code is not yet understood. For example the ’edit’ interface is clearly intended for spread-sheet like cell content editing in an auxillary “entry” widget or similar, but how that should work is not yet clear.

The TixGrid method creates a new TixGrid window and returns a blessed reference of this TixGrid widget. Additional options, described below, may be specified on the command line or in the option database to configure aspects of the TixGrid widget.

STANDARD OPTIONS

-background -borderwidth -cursor -font -foreground -height -highlightbackground -highlightcolor -highlightthickness -padx -pady -relief -selectbackground -selectborderwidth -selectforeground -state -takefocus -width -xscrollcommand -yscrollcommand

See Tk::options for details of the standard options.

WIDGET-SPECIFIC OPTIONS

Name: browseCmd

Class: BrowseCmd

Switch: -browsecmd

If defined, gives a perl/Tk callback to be executed when the user browses a grid cell (This is normally the case when the user clicks on an entry). When this callback is called, it is passed with two additional parameters: x y, where (x,y) is the location of the cell that has just been clicked.

Name: Command

Class: Command

Switch: -command

If defined, gives a perl/Tk callback to be executed when the user double-clicks a grid cell. When this callback is called, it is passed with two additional parameters: x y, where (x,y) is the location of the cell that has just been clicked.

Name: editDoneCmd

Class: EditDoneCmd

Switch: -editdonecmd

If defined, gives a perl/Tk callback to be executed when the user has edited grid cell. When this callback is called, it is passed with two additional parameters: x y, where (x,y) is the location of the cell that has just been edited.

Name: editNotifyCmd

Class: EditNotifyCmd

Switch: -editnotifycmd

If defined gives a perl/Tk callback to be executed when the user tries to edit a grid cell. When this callback is called, it is passed with two additional parameters: x y, where (x,y,) is the location of the cell. This callback should return a boolean value: true indicates that the cell is editable and false otherwise.

Name: FloatingCols

Class: floatingCols

Switch: -floatingcols

Defines the number of extra columns beyond the existing grid that can be brought into view by scrolling.

Name: FloatingRows

Class: floatingRows

Switch: -floatingrows

Defines the number of extra rows beyond the the existing grid that can be brought into view by scrolling.

Name: formatCmd

Class: FormatCmd

Switch: -formatcmd

If defined, gives a perl/Tk callback to be executed when the grid cells need to be displayed on the screen. Its primary purpose is to draw the background of the region before the cells are rendered on top. This is normally achieved by calling formatGrid or formatBorder (see below). However other uses can be made of this low-level callback. For example it can be used to “lazily” populate the grid by calling the set method only as cells come into view. When this callback is called, it is passed with five additional parameters: type x1 y1 x2 y2. x1 y1 x2 y2 gives the extent of the region that needs formatting. type gives the logical type of the region in the grid. It may be one of the following.

x_margin
The horizontal margin.

y_margin
The vertical margin.

s_margin
The area in the top left corner where the horizontal and vertical margins are joined.

main
The main body i.e. all the cells that do not fall into the above three types.

Name: leftMargin

Class: LeftMargin

Switch: -leftmargin

Gives the width of vertical margin in cells (columns). A zero indicates that no vertical margin exists. A positive value N indicates that first N columns are “labels” and are always displayed and not scrolled.

Name: itemType

Class: ItemType

Switch: -itemtype

Default item type for cells.

Name: selectMode

Class: SelectMode

Switch: -selectmode

Specifies one of several styles for manipulating the selection. The value of the option may be arbitrary, but the default bindings expect it to be either single, browse, multiple, or extended; the default value is single.

Name: selectUnit

Class: SelectUnit

Switch: -selectunit

Specifies the selection unit. Valid values are cell, column or row.

Name: sizeCmd

Class: SizeCmd

Switch: -sizecmd

Callback is called (with no extra arguments) when grid sizes are re-computed. For example if window changes size, a different font is specified etc. It is called just after scrollbars (if present) are updated.

Name: topMargin

Class: TopMargin

Switch: -topmargin

Gives the width of horizontal margin in cells (rows). A zero indicates that no horizontal margin exists. A positive value N indicates that first N rows are “labels” and are always displayed and not scrolled.

WIDGET METHODS

The TixGrid method creates a TixGrid widget and returns a blessed reference of this TixGrid widget. This reference may be used to invoke various operations on the widget. It has the following general form:

$tixgrid->method?(arg, arg, …)?

args determine the exact behavior of the method.

This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class.

The following additional methods are possible for TixGrid widgets:

$tixgrid->anchorGet(x, y)

$tixgrid->anchorSet(x, y)

$tixgrid->anchorClear

Manipulates the anchor cell of the TixGrid widget. The anchor cell is the end of the selection that is fixed while the user is dragging out a selection with the mouse.

($bd,$col,$row) = $tixgrid->bdtype(x,y ?,xDelta,yDelta?)
Determines if the the screen (pixel) position x,y is in a border. This is useful for changing the mouse cursor when the user points at a border - e.g. to indicate that the border can be adjusted interactively. If in a border returns a list of three elements. First element is ‘xy’, ‘x’ or ‘y’, second two elements are integers. (Value of these are not understood, seem to indicate which column and row of the border the screen position corresponds to?) If not in a border returns an empty list.

$tixgrid->delete(dim, from?, to?)

$tixgrid->deleteColumn(from?, to?)

$tixgrid->deleteRow(from?, to?)

Dim may be row or column. If to is not given, deletes a single row (or column) at the position from. If to is given, deletes the range of rows (or columns) from position from through to.

$tixgrid->dragsite(option, x, y)

$tixgrid->dropsite(option, x, y)

Tcl/Tix has (or was going to have) Drag&Drop support. Meaning for perl/Tk is not clear yet.

$tixgrid->editApply
If any cell is being edited, de-highlight the cell and applies the changes.

$tixgrid->editSet(x, y)
Highlights the cell at (x,y) for editing, if the -editnotify callback returns true for this cell.

$tixgrid->entrycget(x, y, ‘-option’)

$tixgrid->entryconfigure(x, y?, -option??=>value, -option=>value, …?)

Provide a configue interface to cells in the grid. The -options depend on the item type of the cell.

$tixgrid->formatBorder(x1,y1, x2,y2, options);

$tixgrid->formatGrid(x1,y1, x2,y2, options);

The formatBorder and formatBorder methods can only be called by the -formatcmd callback of the tixGrid widget. They draw the background of the region described by x1,y1, x2,y2 according the the supplied options. One call to -formatcmd callback can make multiple calls to formatBorder and/or formatBorder for different sub-regions. formatBorder draws the background using Tk relief style, formatGrid also draws grid lines between the cells. It only makes sense to call one or the other for a particular sub-region as one will over-write the other. The options allowed are:

-background / -bg

-borderwidth / -bd

-filled

-relief

-selectbackground

-xoff

-xon

-yoff

-yon

The -xon/-xoff and -yon/-yoff options are obscure. If anyone can figure out how to do something interesting given what pTk/tixGrFmt.c is doing with them please let Nick know!.

$tixgrid->geometryinfo(?width, height?)
Returns list of four values - two sets of two floating point numbers. First set is the scrollbar fractions for x direction, second set is scrollbar fractions for y direction. If width and height are specified then fractions are based on as if window size was of specified size (in pixels, but not allowing normal GetPixels units). Otherwise fractions are based on current size of the window. Usage obscure.

$tixgrid->index(xcoord, ycoord)
Retuns (x, y) of entry at position ($coordx, $coordy). Either coordinate may be ‘max’ which is largest existing entry in that direction, ’end’ which is one beyond largest existing entry, or a number. (This is how you find out how big the grid is.)

$tixgrid->infoBbox(x,y)
Return the pixel bounding box of the cell at x,y.

$tixgrid->infoExists(x,y)
Returns true if there is an item in the cell at x,y. Throws an exception (dies) if x,y is outside the grid - this may change (Nick doesn’t like it).

$tixgrid->move(dim, from, to, offset)

$tixgrid->moveColumn(from, to, offset)

$tixgrid->moveRow(from, to, offset)

Dim may be row or column. Moves the range of rows (or columns) from position from through to by the distance indicated by offset. For example, $tixgrid->moveRow(2, 4, 1) moves the rows 2,3,4 to rows 3,4,5.

$tixgrid->nearest(x, y)
Screen pos (pixels) to entry (nx,ny) translation.

$tixgrid->selectionAdjust(x1, y1 ?,x2, y2?)

$tixgrid->selectionClear(x1, y1 ?,x2, y2?)

$tixgrid->selectionIncludes(x1, y1 ?,x2, y2?)

$tixgrid->selectionSet(x1, y1 ?,x2, y2?)

$tixgrid->selectionToggle(x1, y1 ?,x2, y2?)

Selection support methods - probably buggy. x1 (y1) has not to be greater than x2 (y2), but only x2 and y2 can be ‘max’. BUG: selectionIncludes: has no visible effect (as in Tix). Eh??? BUG: selectionClear: only works for 0, 0, max, max (as in Tix). Eh??? When x2, y2 are not given they default to x1, y1, respectively.

$tixgrid->set(x, y?, -itemtype=>type??, -option=>value, …?)
Creates a new display item at the cell at (x,y). The optional -itemtype parameter gives the type of the display item. An additional list of option-value pairs specify options of the display item. If a display item already exists at this cell, the old item will be deleted automatically.

$tixgrid->size(dim, index?, -option??=>value, …?)

$tixgrid->sizeColumn(index?, -option??=>value, …?)

$tixgrid->sizeRow(index?, -option??=>value, …?)

Queries or sets the size of the row or column given by dim and index. Dim may be row or column. Index may be any non-negative integer that gives the position of a given row (or column). Index can also be the string default; in this case, this method queries or sets the default size of all rows (or columns). When no option-value pair is given, this method returns a list containing the current size setting of the given row (or column). When option-value pairs are given, the corresponding options of the size setting of the given row are changed. -option may be one of the following:

-pad0 => pixels
Specifies the paddings to the left of a column or the top of a row.

-pad1 => pixels
Specifies the paddings to the right of a column or the bottom of a row.

-size => val
Specifies the width of a column or the height of a row. Val may be: auto – the width of the column is set the widest cell in the column; a valid Tk screen distance unit (see Tk_GetPixels); or a real number following by the word chars (e.g. 3.4chars) that sets the width of the column to the given number of characters.

$tixgrid->sort(dimension, start, end, ?args …?)
?docu here? (not supported on Win* OSs up to now)

$tixgrid->unset(x, y)
Clears the cell at (x,y) by removing its display item.

$tixgrid->xview
Normal horizontal scrollbar method.

$tixgrid->yview
Normal vertical scrollbar method.

BINDINGS

To be done - only most obvious basic bindings work. The Tcl/Tix code was coded as a “state machine” which is not easy to follow.

SEE ALSO

Tk::DItem Tk::callbacks Tk::FloatEntry

BUGS

Tcl/Tix was/is not finished and both C code and bindings of TixGrid have some bugs.

KEYWORDS

tix, tixgrid, table, display item, spreadsheet

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1036 - Linux cli command NetPacket_ICMPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command NetPacket_ICMPpm and provides detailed information about the command NetPacket_ICMPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the NetPacket_ICMPpm.

NAME 🖥️ NetPacket_ICMPpm 🖥️

Assemble and disassemble ICMP (Internet Control Message Protocol) packets.

VERSION

version 1.7.2

SYNOPSIS

use NetPacket::ICMP; $icmp_obj = NetPacket::ICMP->decode($raw_pkt); $icmp_pkt = NetPacket::ICMP->encode(); $icmp_data = NetPacket::ICMP::strip($raw_pkt);

DESCRIPTION

NetPacket::ICMP provides a set of routines for assembling and disassembling packets using ICMP (Internet Control Message Protocol).

Methods

“NetPacket::ICMP->decode([RAW PACKET])”
Decode the raw packet data given and return an object containing instance data. This method will quite happily decode garbage input. It is the responsibility of the programmer to ensure valid packet data is passed to this method.

“NetPacket::ICMP->encode()”
Return an ICMP packet encoded with the instance data specified.

Functions

“NetPacket::ICMP::strip([RAW PACKET])”
Return the encapsulated data (or payload) contained in the ICMP packet.

Instance data

The instance data for the NetPacket::ICMP object consists of the following fields.

type
The ICMP message type of this packet.

code
The ICMP message code of this packet.

cksum
The checksum for this packet.

data
The encapsulated data (payload) for this packet.

Exports

default
none

exportable
ICMP message types: ICMP_ECHOREPLY ICMP_UNREACH ICMP_SOURCEQUENCH ICMP_REDIRECT ICMP_ECHO ICMP_ROUTERADVERT ICMP_ROUTERSOLICIT ICMP_TIMXCEED ICMP_PARAMPROB ICMP_TSTAMP ICMP_TSTAMPREPLY ICMP_IREQ ICMP_IREQREPLY ICMP_MASKREQ ICMP_MASKREPLY

tags
The following tags group together related exportable items.

“:types”
ICMP_ECHOREPLY ICMP_UNREACH ICMP_SOURCEQUENCH ICMP_REDIRECT ICMP_ECHO ICMP_ROUTERADVERT ICMP_ROUTERSOLICIT ICMP_TIMXCEED ICMP_PARAMPROB ICMP_TSTAMP ICMP_TSTAMPREPLY ICMP_IREQ ICMP_IREQREPLY ICMP_MASKREQ ICMP_MASKREPLY

“:strip”
Import the strip function icmp_strip.

“:ALL”
All the above exportable items.

EXAMPLE

The following example prints the ICMP type, code, and checksum fields.

#!/usr/bin/perl -w use strict; use Net::PcapUtils; use NetPacket::Ethernet qw(:strip); use NetPacket::IP qw(:strip); use NetPacket::ICMP; sub process_pkt { my ($user, $hdr, $pkt) = @_; my $ip_obj = NetPacket::IP->decode(eth_strip($pkt)); my $icmp_obj = NetPacket::ICMP->decode(ip_strip($ip_obj)); print(“Type: $icmp_obj->{type} “); print(“Code: $icmp_obj->{code} “); print(“Checksum: $icmp_obj->{cksum}

“); } Net::PcapUtils::loop(\process_pkt, FILTER => icmp);

TODO

Create constants

COPYRIGHT

Copyright (c) 2001 Tim Potter and Stephanie Wehner.

Copyright (c) 1995,1996,1997,1998,1999 ANU and CSIRO on behalf of the participants in the CRC for Advanced Computational Systems (‘ACSys’).

This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

AUTHOR

Tim Potter <[email protected]>

Stephanie Wehner <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1037 - Linux cli command re_comp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command re_comp and provides detailed information about the command re_comp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the re_comp.

NAME 🖥️ re_comp 🖥️

BSD regex functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _REGEX_RE_COMP
#include <sys/types.h>
#include <regex.h>
[[deprecated]] char *re_comp(const char *regex);
[[deprecated]] int re_exec(const char *string);

DESCRIPTION

re_comp() is used to compile the null-terminated regular expression pointed to by regex. The compiled pattern occupies a static area, the pattern buffer, which is overwritten by subsequent use of re_comp(). If regex is NULL, no operation is performed and the pattern buffer’s contents are not altered.

re_exec() is used to assess whether the null-terminated string pointed to by string matches the previously compiled regex.

RETURN VALUE

re_comp() returns NULL on successful compilation of regex otherwise it returns a pointer to an appropriate error message.

re_exec() returns 1 for a successful match, zero for failure.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

re_comp(), re_exec()

Thread safetyMT-Unsafe

STANDARDS

None.

HISTORY

4.3BSD.

These functions are obsolete; the functions documented in regcomp(3) should be used instead.

SEE ALSO

regcomp(3), regex(7), GNU regex manual

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1038 - Linux cli command Tk_MsgBoxpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_MsgBoxpm and provides detailed information about the command Tk_MsgBoxpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_MsgBoxpm.

NAME 🖥️ Tk_MsgBoxpm 🖥️

create and manipulate a message dialog

SYNOPSIS

use Tk::MsgBox … $d = $top->MsgBox(-title => “Title”, -type => “okcancel”); … $button = $d->Show;

DESCRIPTION

MsgBox is a simple dialog with predefined buttons.

OPTIONS

The options recognized by MsgBox are as follows:

-icon
Specify the icon of the MsgBox. Valid values are error, info, question, or warning.

-type
Specify the type of the MsgBox. Valid values are abortretryignore, ok, okcancel, retrycancel, yesno, or yesnocancel. The type determines the buttons to be shown.

-default
Specify the default button. This must be one of abort, retry, ignore, ok, cancel, yes, or no, depending on the type of the MsgBox previously specified.

-detail
Specify text for the detail region of the MsgBox.

-message
Specify the message text of the MsgBox.

-title: Specify the title of the MsgBox.

METHODS

MsgBox supports only one method as of now:

Show()
Displays the MsgBox until the user invokes one of the buttons. Returns the name of the button invoked.

AUTHOR

Translated from Tcl/Tk by Slaven Rezic [email protected]

This code is distributed under the same terms as Perl.

SEE ALSO

Tk::messageBox, Tk::DialogBox, Tk::Dialog.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1039 - Linux cli command zip_source_commit_write

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_commit_write and provides detailed information about the command zip_source_commit_write, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_commit_write.

libzip (-lzip)

The function

finishes writing data to

and replaces the original with the newly written data.

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1040 - Linux cli command islower_l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command islower_l and provides detailed information about the command islower_l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the islower_l.

NAME 🖥️ islower_l 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1041 - Linux cli command IO_All_HTTPSpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_All_HTTPSpm and provides detailed information about the command IO_All_HTTPSpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_All_HTTPSpm.

NAME 🖥️ IO_All_HTTPSpm 🖥️

Extends IO::All for HTTPS URLs

SYNOPSIS

use IO::All; $content < io(https://example.org); # GET webpage # two ways of getting a page with a password: $content < io(https://me:[email protected]); $content < io(https://example.org)->user(me)->password(secret);

DESCRIPTION

This module extends IO::All for dealing with HTTPS URLs. Note that you don’t need to use it explicitly, as it is autoloaded by IO::All whenever it sees something that looks like an HTTPS URL.

The SYNOPSIS shows some simple typical examples, but there are many other interesting combinations with other IO::All features! For example, you can get an HTTPS URL and write the content to a socket, or to an FTP URL, of to a DBM file.

METHODS

This is a subclass of IO::All::LWP. The only new method is https, which can be used to create a blank IO::All::HTTPS object; or it can also take an HTTPS URL as a parameter. Note that in most cases it is simpler just to call io(‘https://example.com’), which calls the https method automatically.

OPERATOR OVERLOADING

The same operators from IO::All may be used. < GETs an HTTPS URL; > PUTs to an HTTPS URL.

SEE ALSO

IO::All, IO::All::LWP, LWP.

AUTHORS

Ivan Tubert-Brohman <[email protected]> and Brian Ingerson <[email protected]>

COPYRIGHT

Copyright (c) 2007. Ivan Tubert-Brohman and Brian Ingerson. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See <http://www.perl.com/perl/misc/Artistic.html>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1042 - Linux cli command mktime

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mktime and provides detailed information about the command mktime, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mktime.

NAME 🖥️ mktime 🖥️

transform date and time to broken-down time or ASCII

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <time.h>
char *asctime(const struct tm *tm);
char *asctime_r(const struct tm *restrict tm,
 char buf[restrict 26]);
char *ctime(const time_t *timep);
char *ctime_r(const time_t *restrict timep,
 char buf[restrict 26]);
struct tm *gmtime(const time_t *timep);
struct tm *gmtime_r(const time_t *restrict timep,
 struct tm *restrict result);
struct tm *localtime(const time_t *timep);
struct tm *localtime_r(const time_t *restrict timep,
 struct tm *restrict result);
time_t mktime(struct tm *tm);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

asctime_r(), ctime_r(), gmtime_r(), localtime_r():

    _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The ctime(), gmtime(), and localtime() functions all take an argument of data type time_t, which represents calendar time. When interpreted as an absolute time value, it represents the number of seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).

The asctime() and mktime() functions both take an argument representing broken-down time, which is a representation separated into year, month, day, and so on.

Broken-down time is stored in the structure tm, described in tm(3type).

The call ctime(t) is equivalent to asctime(localtime(t)). It converts the calendar time t into a null-terminated string of the form

"Wed Jun 30 21:49:08 1993

"

The abbreviations for the days of the week are “Sun”, “Mon”, “Tue”, “Wed”, “Thu”, “Fri”, and “Sat”. The abbreviations for the months are “Jan”, “Feb”, “Mar”, “Apr”, “May”, “Jun”, “Jul”, “Aug”, “Sep”, “Oct”, “Nov”, and “Dec”. The return value points to a statically allocated string which might be overwritten by subsequent calls to any of the date and time functions. The function also sets the external variables tzname, timezone, and daylight (see tzset(3)) with information about the current timezone. The reentrant version ctime_r() does the same, but stores the string in a user-supplied buffer which should have room for at least 26 bytes. It need not set tzname, timezone, and daylight.

The gmtime() function converts the calendar time timep to broken-down time representation, expressed in Coordinated Universal Time (UTC). It may return NULL when the year does not fit into an integer. The return value points to a statically allocated struct which might be overwritten by subsequent calls to any of the date and time functions. The gmtime_r() function does the same, but stores the data in a user-supplied struct.

The localtime() function converts the calendar time timep to broken-down time representation, expressed relative to the user’s specified timezone. The function acts as if it called tzset(3) and sets the external variables tzname with information about the current timezone, timezone with the difference between Coordinated Universal Time (UTC) and local standard time in seconds, and daylight to a nonzero value if daylight savings time rules apply during some part of the year. The return value points to a statically allocated struct which might be overwritten by subsequent calls to any of the date and time functions. The localtime_r() function does the same, but stores the data in a user-supplied struct. It need not set tzname, timezone, and daylight.

The asctime() function converts the broken-down time value tm into a null-terminated string with the same format as ctime(). The return value points to a statically allocated string which might be overwritten by subsequent calls to any of the date and time functions. The asctime_r() function does the same, but stores the string in a user-supplied buffer which should have room for at least 26 bytes.

The mktime() function converts a broken-down time structure, expressed as local time, to calendar time representation. The function ignores the values supplied by the caller in the tm_wday and tm_yday fields. The value specified in the tm_isdst field informs mktime() whether or not daylight saving time (DST) is in effect for the time supplied in the tm structure: a positive value means DST is in effect; zero means that DST is not in effect; and a negative value means that mktime() should (use timezone information and system databases to) attempt to determine whether DST is in effect at the specified time.

The mktime() function modifies the fields of the tm structure as follows: tm_wday and tm_yday are set to values determined from the contents of the other fields; if structure members are outside their valid interval, they will be normalized (so that, for example, 40 October is changed into 9 November); tm_isdst is set (regardless of its initial value) to a positive value or to 0, respectively, to indicate whether DST is or is not in effect at the specified time. Calling mktime() also sets the external variable tzname with information about the current timezone.

If the specified broken-down time cannot be represented as calendar time (seconds since the Epoch), mktime() returns (time_t) -1 and does not alter the members of the broken-down time structure.

RETURN VALUE

On success, gmtime() and localtime() return a pointer to a struct tm.

On success, gmtime_r() and localtime_r() return the address of the structure pointed to by result.

On success, asctime() and ctime() return a pointer to a string.

On success, asctime_r() and ctime_r() return a pointer to the string pointed to by buf.

On success, mktime() returns the calendar time (seconds since the Epoch), expressed as a value of type time_t.

On error, mktime() returns the value (time_t) -1. The remaining functions return NULL on error. On error, errno is set to indicate the error.

ERRORS

EOVERFLOW
The result cannot be represented.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

asctime()

Thread safety

MT-Unsafe race:asctime locale

asctime_r()

Thread safety

MT-Safe locale

ctime()

Thread safety

MT-Unsafe race:tmbuf race:asctime env locale

ctime_r(), gmtime_r(), localtime_r(), mktime()

Thread safety

MT-Safe env locale

gmtime(), localtime()

Thread safety

MT-Unsafe race:tmbuf env locale

VERSIONS

POSIX doesn’t specify the parameters of ctime_r() to be restrict; that is specific to glibc.

In many implementations, including glibc, a 0 in tm_mday is interpreted as meaning the last day of the preceding month.

According to POSIX.1-2001, localtime() is required to behave as though tzset(3) was called, while localtime_r() does not have this requirement. For portable code, tzset(3) should be called before localtime_r().

STANDARDS

asctime()
ctime()
gmtime()
localtime()
mktime()
C11, POSIX.1-2008.

asctime_r()
ctime_r()
gmtime_r()
localtime_r()
POSIX.1-2008.

HISTORY

gmtime()
localtime()
mktime()
C89, POSIX.1-2001.

asctime()
ctime()
C89, POSIX.1-2001. Marked obsolete in POSIX.1-2008 (recommending strftime(3)).

gmtime_r()
localtime_r()
POSIX.1-2001.

asctime_r()
ctime_r()
POSIX.1-2001. Marked obsolete in POSIX.1-2008 (recommending strftime(3)).

NOTES

The four functions asctime(), ctime(), gmtime(), and localtime() return a pointer to static data and hence are not thread-safe. The thread-safe versions, asctime_r(), ctime_r(), gmtime_r(), and localtime_r(), are specified by SUSv2.

POSIX.1-2001 says: “The asctime(), ctime(), gmtime(), and localtime() functions shall return values in one of two static objects: a broken-down time structure and an array of type char. Execution of any of the functions may overwrite the information returned in either of these objects by any of the other functions.” This can occur in the glibc implementation.

SEE ALSO

date(1), gettimeofday(2), time(2), utime(2), clock(3), difftime(3), strftime(3), strptime(3), timegm(3), tzset(3), time(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1043 - Linux cli command wprintf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wprintf and provides detailed information about the command wprintf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wprintf.

NAME 🖥️ wprintf 🖥️

formatted wide-character output conversion

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
#include <wchar.h>
int wprintf(const wchar_t *restrict format, ...);
int fwprintf(FILE *restrict stream,
 const wchar_t *restrict format, ...);
int swprintf(wchar_t wcs[restrict .maxlen], size_t maxlen,
 const wchar_t *restrict format, ...);
int vwprintf(const wchar_t *restrict format, va_list args);
int vfwprintf(FILE *restrict stream,
 const wchar_t *restrict format, va_list args);
int vswprintf(wchar_t wcs[restrict .maxlen], size_t maxlen,
 const wchar_t *restrict format, va_list args);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE
        || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The wprintf() family of functions is the wide-character equivalent of the printf(3) family of functions. It performs formatted output of wide characters.

The wprintf() and vwprintf() functions perform wide-character output to stdout. stdout must not be byte oriented; see fwide(3) for more information.

The fwprintf() and vfwprintf() functions perform wide-character output to stream. stream must not be byte oriented; see fwide(3) for more information.

The swprintf() and vswprintf() functions perform wide-character output to an array of wide characters. The programmer must ensure that there is room for at least maxlen wide characters at wcs.

These functions are like the printf(3), vprintf(3), fprintf(3), vfprintf(3), sprintf(3), vsprintf(3) functions except for the following differences:

·
The format string is a wide-character string.

·
The output consists of wide characters, not bytes.

·
swprintf() and vswprintf() take a maxlen argument, sprintf(3) and vsprintf(3) do not. (snprintf(3) and vsnprintf(3) take a maxlen argument, but these functions do not return -1 upon buffer overflow on Linux.)

The treatment of the conversion characters c and s is different:

c
If no l modifier is present, the int argument is converted to a wide character by a call to the btowc(3) function, and the resulting wide character is written. If an l modifier is present, the wint_t (wide character) argument is written.

s
If no l modifier is present: the const char * argument is expected to be a pointer to an array of character type (pointer to a string) containing a multibyte character sequence beginning in the initial shift state. Characters from the array are converted to wide characters (each by a call to the mbrtowc(3) function with a conversion state starting in the initial state before the first byte). The resulting wide characters are written up to (but not including) the terminating null wide character (L’�’). If a precision is specified, no more wide characters than the number specified are written. Note that the precision determines the number of wide characters written, not the number of bytes or screen positions. The array must contain a terminating null byte (‘�’), unless a precision is given and it is so small that the number of converted wide characters reaches it before the end of the array is reached. If an l modifier is present: the const wchar_t * argument is expected to be a pointer to an array of wide characters. Wide characters from the array are written up to (but not including) a terminating null wide character. If a precision is specified, no more than the number specified are written. The array must contain a terminating null wide character, unless a precision is given and it is smaller than or equal to the number of wide characters in the array.

RETURN VALUE

The functions return the number of wide characters written, excluding the terminating null wide character in case of the functions swprintf() and vswprintf(). They return -1 when an error occurs.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wprintf(), fwprintf(), swprintf(), vwprintf(), vfwprintf(), vswprintf()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of wprintf() et al. depends on the LC_CTYPE category of the current locale.

If the format string contains non-ASCII wide characters, the program will work correctly only if the LC_CTYPE category of the current locale at run time is the same as the LC_CTYPE category of the current locale at compile time. This is because the wchar_t representation is platform- and locale-dependent. (The glibc represents wide characters using their Unicode (ISO/IEC 10646) code point, but other platforms don’t do this. Also, the use of C99 universal character names of the form \unnnn does not solve this problem.) Therefore, in internationalized programs, the format string should consist of ASCII wide characters only, or should be constructed at run time in an internationalized way (e.g., using gettext(3) or iconv(3), followed by mbstowcs(3)).

SEE ALSO

fprintf(3), fputwc(3), fwide(3), printf(3), snprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1044 - Linux cli command _Generic

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command _Generic and provides detailed information about the command _Generic, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the _Generic.

NAME 🖥️ _Generic 🖥️

type-generic selection

SYNOPSIS

_Generic(expression, type1: e1, ... /*",default: e*/");

DESCRIPTION

_Generic() evaluates the path of code under the type selector that is compatible with the type of the controlling expression, or default: if no type is compatible.

expression is not evaluated.

This is especially useful for writing type-generic macros, that will behave differently depending on the type of the argument.

STANDARDS

C11.

HISTORY

C11.

EXAMPLES

The following program demonstrates how to write a replacement for the standard imaxabs(3) function, which being a function can’t really provide what it promises: seamlessly upgrading to the widest available type.

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#define my_imaxabs  _Generic(INTMAX_C(0),  \
    long:           labs,                  \
    long long:      llabs                  \
/*  long long long: lllabs */              \
)
int
main(void)
{
    off_t  a;
    a = -42;
    printf("imaxabs(%jd) == %jd

“, (intmax_t) a, my_imaxabs(a)); printf("&imaxabs == %p “, &my_imaxabs); printf("&labs == %p “, &labs); printf("&llabs == %p “, &llabs); exit(EXIT_SUCCESS); }

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1045 - Linux cli command Net_DNS_RR_MRpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_MRpm and provides detailed information about the command Net_DNS_RR_MRpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_MRpm.

NAME 🖥️ Net_DNS_RR_MRpm 🖥️

DNS MR resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR(name MR newname);

DESCRIPTION

Class for DNS Mail Rename (MR) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

newname

$newname = $rr->newname; $rr->newname( $newname );

A domain name which specifies a mailbox which is the proper rename of the specified mailbox.

COPYRIGHT

Copyright (c)1997 Michael Fuhr.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC1035(3.3.8) <https://iana.org/go/rfc1035#section-3.3.8>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1046 - Linux cli command Tk_Menubuttonpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Menubuttonpm and provides detailed information about the command Tk_Menubuttonpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Menubuttonpm.

NAME 🖥️ Tk_Menubuttonpm 🖥️

Create and manipulate Menubutton widgets

SYNOPSIS

$menubutton = $parent->Menubutton(?options?);

STANDARD OPTIONS

-activebackground -cursor -highlightthickness -takefocus -activeforeground -disabledforeground -image -text -anchor -font -justify -textvariable -background -foreground -padx -underline -bitmap -highlightbackground -pady -wraplength -borderwidth -highlightcolor -relief

See Tk::options for details of the standard options.

WIDGET-SPECIFIC OPTIONS

Command-Line Name: -compound

Database Name: compound

Database Class: Compound

Specifies whether the button should display both an image and text, and if so, where the image should be placed relative to the text. Valid values for this option are bottom, center, left, none, right and top. The default value is none, meaning that the button will display either an image or text, depending on the values of the -image and -bitmap options.

Name: direction

Class: Height

Switch: -direction

Specifies where the menu is going to be popup up. above tries to pop the menu above the menubutton. below tries to pop the menu below the menubutton. left tries to pop the menu to the left of the menubutton. right tries to pop the menu to the right of the menu button. flush pops the menu directly over the menubutton.

Name: height

Class: Height

Switch: -height

Specifies a desired height for the menubutton. If an image or bitmap is being displayed in the menubutton then the value is in screen units (i.e. any of the forms acceptable to Tk_GetPixels); for text it is in lines of text. If this option isn’t specified, the menubutton’s desired height is computed from the size of the image or bitmap or text being displayed in it.

Name: indicatorOn

Class: IndicatorOn

Switch: -indicatoron

The value must be a proper boolean value. If it is true then a small indicator rectangle will be displayed on the right side of the menubutton and the default menu bindings will treat this as an option menubutton. If false then no indicator will be displayed.

Name: menu

Class: MenuName

Switch: -menu

Specifies the path name of the menu associated with this menubutton. The menu must be a child of the menubutton.

Name: state

Class: State

Switch: -state

Specifies one of three states for the menubutton: normal, active, or disabled. In normal state the menubutton is displayed using the foreground and background options. The active state is typically used when the pointer is over the menubutton. In active state the menubutton is displayed using the activeForeground and activeBackground options. Disabled state means that the menubutton should be insensitive: the default bindings will refuse to activate the widget and will ignore mouse button presses. In this state the disabledForeground and background options determine how the button is displayed.

Name: width

Class: Width

Switch: -width

Specifies a desired width for the menubutton. If an image or bitmap is being displayed in the menubutton then the value is in screen units (i.e. any of the forms acceptable to Tk_GetPixels); for text it is in characters. If this option isn’t specified, the menubutton’s desired width is computed from the size of the image or bitmap or text being displayed in it.

DESCRIPTION

The Menubutton method creates a new window (given by the $widget argument) and makes it into a menubutton widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the menubutton such as its colors, font, text, and initial relief. The menubutton command returns its $widget argument. At the time this command is invoked, there must not exist a window named $widget, but $widget’s parent must exist.

A menubutton is a widget that displays a textual string, bitmap, or image and is associated with a menu widget. If text is displayed, it must all be in a single font, but it can occupy multiple lines on the screen (if it contains newlines or if wrapping occurs because of the wrapLength option) and one of the characters may optionally be underlined using the underline option. In normal usage, pressing mouse button 1 over the menubutton causes the associated menu to be posted just underneath the menubutton. If the mouse is moved over the menu before releasing the mouse button, the button release causes the underlying menu entry to be invoked. When the button is released, the menu is unposted.

Menubuttons are typically organized into groups called menu bars that allow scanning: if the mouse button is pressed over one menubutton (causing it to post its menu) and the mouse is moved over another menubutton in the same menu bar without releasing the mouse button, then the menu of the first menubutton is unposted and the menu of the new menubutton is posted instead.

There are several interactions between menubuttons and menus; see the menu manual entry for information on various menu configurations, such as pulldown menus and option menus.

WIDGET METHODS

The Menubutton method creates a widget object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The menu method returns the menu associated with the widget. The widget also inherits all the methods provided by the generic Tk::Widget class.

DEFAULT BINDINGS

Tk automatically creates class bindings for menubuttons that give them the following default behavior:

[1]
A menubutton activates whenever the mouse passes over it and deactivates whenever the mouse leaves it.

[2]
Pressing mouse button 1 over a menubutton posts the menubutton: its relief changes to raised and its associated menu is posted under the menubutton. If the mouse is dragged down into the menu with the button still down, and if the mouse button is then released over an entry in the menu, the menubutton is unposted and the menu entry is invoked.

[3]
If button 1 is pressed over a menubutton and then released over that menubutton, the menubutton stays posted: you can still move the mouse over the menu and click button 1 on an entry to invoke it. Once a menu entry has been invoked, the menubutton unposts itself.

[4]
If button 1 is pressed over a menubutton and then dragged over some other menubutton, the original menubutton unposts itself and the new menubutton posts.

[5]
If button 1 is pressed over a menubutton and released outside any menubutton or menu, the menubutton unposts without invoking any menu entry.

[6]
When a menubutton is posted, its associated menu claims the input focus to allow keyboard traversal of the menu and its submenus. See the menu documentation for details on these bindings.

[7]
If the underline option has been specified for a menubutton then keyboard traversal may be used to post the menubutton: Alt+x, where x is the underlined character (or its lower-case or upper-case equivalent), may be typed in any window under the menubutton’s toplevel to post the menubutton.

[8]
The F10 key may be typed in any window to post the first menubutton under its toplevel window that isn’t disabled.

[9]
If a menubutton has the input focus, the space and return keys post the menubutton. If the menubutton’s state is disabled then none of the above actions occur: the menubutton is completely non-responsive. The behavior of menubuttons can be changed by defining new bindings for individual widgets or by redefining the class bindings.

KEYWORDS

menubutton, widget

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1047 - Linux cli command XtGetErrorDatabase

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGetErrorDatabase and provides detailed information about the command XtGetErrorDatabase, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGetErrorDatabase.

NAME 🖥️ XtGetErrorDatabase 🖥️

obtain error database

SYNTAX

#include <X11/Intrinsic.h>

XrmDatabase *XtGetErrorDatabase(void);

void XtGetErrorDatabaseText(const char *name, const char *type, const char *class, const char *defaultMsg, char *buffer_return, int nbytes);

ARGUMENTS

buffer_return
Specifies the buffer into which the error message is to be returned.

class
Specifies the resource class of the error message.

default
Specifies the default message to use.

name

type
Specifies the name and type that are concatenated to form the resource name of the error message.

nbytes
Specifies the size of the buffer in bytes.

DESCRIPTION

The XtGetErrorDatabase function has been superceded by XtAppGetErrorDatabase.

The XtGetErrorDatabaseText function has been superceded by XtAppGetErrorDatabaseText.

SEE ALSO

XtAppGetErrorDatabase(3) XtAppGetErrorDatabaseText(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1048 - Linux cli command memfrob

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command memfrob and provides detailed information about the command memfrob, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the memfrob.

NAME 🖥️ memfrob 🖥️

frobnicate (obfuscate) a memory area

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <string.h>
void *memfrob(void s[.n], size_t n);

DESCRIPTION

The memfrob() function obfuscates the first n bytes of the memory area s by exclusive-ORing each character with the number 42. The effect can be reversed by using memfrob() on the obfuscated memory area.

Note that this function is not a proper encryption routine as the XOR constant is fixed, and is suitable only for hiding strings.

RETURN VALUE

The memfrob() function returns a pointer to the obfuscated memory area.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

memfrob()

Thread safetyMT-Safe

STANDARDS

GNU.

SEE ALSO

bstring(3), strfry(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1049 - Linux cli command URI_QueryParampm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command URI_QueryParampm and provides detailed information about the command URI_QueryParampm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the URI_QueryParampm.

NAME 🖥️ URI_QueryParampm 🖥️

Additional query methods for URIs

SYNOPSIS

use URI;

DESCRIPTION

URI::QueryParam used to provide the query_form_hash, query_param query_param_append, and query_param_delete methods on URI objects. These methods have been merged into URI itself, so this module is now a no-op.

COPYRIGHT

Copyright 2002 Gisle Aas.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1050 - Linux cli command stattype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command stattype and provides detailed information about the command stattype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the stattype.

NAME 🖥️ stattype 🖥️

file status

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/stat.h>
struct stat {
 dev_t st_dev; /* ID of device containing file */
 ino_t st_ino; /* Inode number */
 mode_t st_mode; /* File type and mode */
 nlink_t st_nlink; /* Number of hard links */
 uid_t st_uid; /* User ID of owner */
 gid_t st_gid; /* Group ID of owner */
 dev_t st_rdev; /* Device ID (if special file) */
 off_t st_size; /* Total size, in bytes */
 blksize_t st_blksize; /* Block size for filesystem I/O */
 blkcnt_t st_blocks; /* Number of 512 B blocks allocated */
    /* Since POSIX.1-2008, this structure supports nanosecond
       precision for the following timestamp fields.
       For the details before POSIX.1-2008, see VERSIONS. */
 struct timespec st_atim; /* Time of last access */
 struct timespec st_mtim; /* Time of last modification */
 struct timespec st_ctim; /* Time of last status change */
#define st_atime st_atim.tv_sec /* Backward compatibility */
#define st_mtime st_mtim.tv_sec
#define st_ctime st_ctim.tv_sec
};

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

st_atim, st_mtim, st_ctim:

    Since glibc 2.12:
        _POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

Describes information about a file.

The fields are as follows:

st_dev
This field describes the device on which this file resides. (The major(3) and minor(3) macros may be useful to decompose the device ID in this field.)

st_ino
This field contains the file’s inode number.

st_mode
This field contains the file type and mode. See inode(7) for further information.

st_nlink
This field contains the number of hard links to the file.

st_uid
This field contains the user ID of the owner of the file.

st_gid
This field contains the ID of the group owner of the file.

st_rdev
This field describes the device that this file (inode) represents.

st_size
This field gives the size of the file (if it is a regular file or a symbolic link) in bytes. The size of a symbolic link is the length of the pathname it contains, without a terminating null byte.

st_blksize
This field gives the “preferred” block size for efficient filesystem I/O.

st_blocks
This field indicates the number of blocks allocated to the file, in 512-byte units. (This may be smaller than st_size/512 when the file has holes.)

st_atime
This is the time of the last access of file data.

st_mtime
This is the time of last modification of file data.

st_ctime
This is the file’s last status change timestamp (time of last change to the inode).

For further information on the above fields, see inode(7).

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

Old kernels and old standards did not support nanosecond timestamp fields. Instead, there were three timestamp fields—st_atime, st_mtime, and st_ctime—typed as time_t that recorded timestamps with one-second precision.

Since Linux 2.5.48, the stat structure supports nanosecond resolution for the three file timestamp fields. The nanosecond components of each timestamp are available via names of the form st_atim.tv_nsec, if suitable test macros are defined. Nanosecond timestamps were standardized in POSIX.1-2008, and, starting with glibc 2.12, glibc exposes the nanosecond component names if _POSIX_C_SOURCE is defined with the value 200809L or greater, or _XOPEN_SOURCE is defined with the value 700 or greater. Up to and including glibc 2.19, the definitions of the nanoseconds components are also defined if _BSD_SOURCE or _SVID_SOURCE is defined. If none of the aforementioned macros are defined, then the nanosecond values are exposed with names of the form st_atimensec.

NOTES

The following header also provides this type: <ftw.h>.

SEE ALSO

stat(2), inode(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1051 - Linux cli command XtAppReleaseCacheRefs

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppReleaseCacheRefs and provides detailed information about the command XtAppReleaseCacheRefs, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppReleaseCacheRefs.

NAME 🖥️ XtAppReleaseCacheRefs 🖥️

decrement reference counts for resources

SYNTAX

#include <X11/Intrinsic.h>

void XtAppReleaseCacheRefs(XtAppContext app_context, XtCacheRef* refs);

ARGUMENTS

app_context
Specifies the application context.

refs
Specifies the list of cache references to be released.

DESCRIPTION

XtAppReleaseCacheRefs decrements the reference count for the conversion entries identified by the refs argument. This argument is a pointer to a NULL-terminated list of XtCacheRef values. If any reference count reaches zero, the destructor, if any, will be called and the resource removed from the conversion cache.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1052 - Linux cli command Parse_RecDescentpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Parse_RecDescentpm and provides detailed information about the command Parse_RecDescentpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Parse_RecDescentpm.

NAME 🖥️ Parse_RecDescentpm 🖥️

Generate Recursive-Descent Parsers

VERSION

This document describes version 1.967015 of Parse::RecDescent released April 4th, 2017.

SYNOPSIS

use Parse::RecDescent; # Generate a parser from the specification in $grammar: $parser = new Parse::RecDescent ($grammar); # Generate a parser from the specification in $othergrammar $anotherparser = new Parse::RecDescent ($othergrammar); # Parse $text using rule startrule (which must be # defined in $grammar): $parser->startrule($text); # Parse $text using rule otherrule (which must also # be defined in $grammar): $parser->otherrule($text); # Change the universal token prefix pattern # before building a grammar # (the default is: \s*): $Parse::RecDescent::skip = [ ]+; # Replace productions of existing rules (or create new ones) # with the productions defined in $newgrammar: $parser->Replace($newgrammar); # Extend existing rules (or create new ones) # by adding extra productions defined in $moregrammar: $parser->Extend($moregrammar); # Global flags (useful as command line arguments under -s): $::RD_ERRORS # unless undefined, report fatal errors $::RD_WARN # unless undefined, also report non-fatal problems $::RD_HINT # if defined, also suggestion remedies $::RD_TRACE # if defined, also trace parsers behaviour $::RD_AUTOSTUB # if defined, generates “stubs” for undefined rules $::RD_AUTOACTION # if defined, appends specified action to productions

DESCRIPTION

Overview

Parse::RecDescent incrementally generates top-down recursive-descent text parsers from simple yacc-like grammar specifications. It provides:

  • Regular expressions or literal strings as terminals (tokens),

  • Multiple (non-contiguous) productions for any rule,

  • Repeated and optional subrules within productions,

  • Full access to Perl within actions specified as part of the grammar,

  • Simple automated error reporting during parser generation and parsing,

  • The ability to commit to, uncommit to, or reject particular productions during a parse,

  • The ability to pass data up and down the parse tree (down via subrule argument lists, up via subrule return values)

  • Incremental extension of the parsing grammar (even during a parse),

  • Precompilation of parser objects,

  • User-definable reduce-reduce conflict resolution via scoring of matching productions.

Using “Parse::RecDescent”

Parser objects are created by calling Parse::RecDescent::new, passing in a grammar specification (see the following subsections). If the grammar is correct, new returns a blessed reference which can then be used to initiate parsing through any rule specified in the original grammar. A typical sequence looks like this:

$grammar = q { # GRAMMAR SPECIFICATION HERE }; $parser = new Parse::RecDescent ($grammar) or die “Bad grammar! “; # acquire $text defined $parser->startrule($text) or print “Bad text! “;

The rule through which parsing is initiated must be explicitly defined in the grammar (i.e. for the above example, the grammar must include a rule of the form: startrule: <subrules>.

If the starting rule succeeds, its value (see below) is returned. Failure to generate the original parser or failure to match a text is indicated by returning undef. Note that it’s easy to set up grammars that can succeed, but which return a value of 0, 0, or “”. So don’t be tempted to write:

$parser->startrule($text) or print “Bad text! “;

Normally, the parser has no effect on the original text. So in the previous example the value of $text would be unchanged after having been parsed.

If, however, the text to be matched is passed by reference:

$parser->startrule(\text)

then any text which was consumed during the match will be removed from the start of $text.

Rules

In the grammar from which the parser is built, rules are specified by giving an identifier (which must satisfy /[A-Za-z]\w*/), followed by a colon on the same line, followed by one or more productions, separated by single vertical bars. The layout of the productions is entirely free-format:

rule1: production1 | production2 | production3 | production4

At any point in the grammar previously defined rules may be extended with additional productions. This is achieved by redeclaring the rule with the new productions. Thus:

rule1: a | b | c rule2: d | e | f rule1: g | h

is exactly equivalent to:

rule1: a | b | c | g | h rule2: d | e | f

Each production in a rule consists of zero or more items, each of which may be either: the name of another rule to be matched (a subrule), a pattern or string literal to be matched directly (a token), a block of Perl code to be executed (an action), a special instruction to the parser (a directive), or a standard Perl comment (which is ignored).

A rule matches a text if one of its productions matches. A production matches if each of its items match consecutive substrings of the text. The productions of a rule being matched are tried in the same order that they appear in the original grammar, and the first matching production terminates the match attempt (successfully). If all productions are tried and none matches, the match attempt fails.

Note that this behaviour is quite different from the prefer the longer match behaviour of yacc. For example, if yacc were parsing the rule:

seq : A B | A B C

upon matching AB it would look ahead to see if a ‘C’ is next and, if so, will match the second production in preference to the first. In other words, yacc effectively tries all the productions of a rule breadth-first in parallel, and selects the best match, where best means longest (note that this is a gross simplification of the true behaviour of yacc but it will do for our purposes).

In contrast, Parse::RecDescent tries each production depth-first in sequence, and selects the best match, where best means first. This is the fundamental difference between bottom-up and recursive descent parsing.

Each successfully matched item in a production is assigned a value, which can be accessed in subsequent actions within the same production (or, in some cases, as the return value of a successful subrule call). Unsuccessful items don’t have an associated value, since the failure of an item causes the entire surrounding production to immediately fail. The following sections describe the various types of items and their success values.

Subrules

A subrule which appears in a production is an instruction to the parser to attempt to match the named rule at that point in the text being parsed. If the named subrule is not defined when requested the production containing it immediately fails (unless it was autostubbed - see Autostubbing).

A rule may (recursively) call itself as a subrule, but not as the left-most item in any of its productions (since such recursions are usually non-terminating).

The value associated with a subrule is the value associated with its $return variable (see Actions below), or with the last successfully matched item in the subrule match.

Subrules may also be specified with a trailing repetition specifier, indicating that they are to be (greedily) matched the specified number of times. The available specifiers are:

subrule(?) # Match one-or-zero times subrule(s) # Match one-or-more times subrule(s?) # Match zero-or-more times subrule(N) # Match exactly N times for integer N > 0 subrule(N..M) # Match between N and M times subrule(..M) # Match between 1 and M times subrule(N..) # Match at least N times

Repeated subrules keep matching until either the subrule fails to match, or it has matched the minimal number of times but fails to consume any of the parsed text (this second condition prevents the subrule matching forever in some cases).

Since a repeated subrule may match many instances of the subrule itself, the value associated with it is not a simple scalar, but rather a reference to a list of scalars, each of which is the value associated with one of the individual subrule matches. In other words in the rule:

program: statement(s)

the value associated with the repeated subrule statement(s) is a reference to an array containing the values matched by each call to the individual subrule statement.

Repetition modifiers may include a separator pattern:

program: statement(s /;/)

specifying some sequence of characters to be skipped between each repetition. This is really just a shorthand for the <leftop:…> directive (see below).

Tokens

If a quote-delimited string or a Perl regex appears in a production, the parser attempts to match that string or pattern at that point in the text. For example:

typedef: “typedef” typename identifier ; identifier: /[A-Za-z_][A-Za-z0-9_]*/

As in regular Perl, a single quoted string is uninterpolated, whilst a double-quoted string or a pattern is interpolated (at the time of matching, not when the parser is constructed). Hence, it is possible to define rules in which tokens can be set at run-time:

typedef: “$::typedefkeyword” typename identifier ; identifier: /$::identpat/

Note that, since each rule is implemented inside a special namespace belonging to its parser, it is necessary to explicitly quantify variables from the main package.

Regex tokens can be specified using just slashes as delimiters or with the explicit m<delimiter>......<delimiter> syntax:

typedef: “typedef” typename identifier ; typename: /[A-Za-z_][A-Za-z0-9_]*/ identifier: m{[A-Za-z_][A-Za-z0-9_]*}

A regex of either type can also have any valid trailing parameter(s) (that is, any of [cgimsox]):

typedef: “typedef” typename identifier ; identifier: / [a-z_] # LEADING ALPHA OR UNDERSCORE [a-z0-9_]* # THEN DIGITS ALSO ALLOWED /ix # CASE/SPACE/COMMENT INSENSITIVE

The value associated with any successfully matched token is a string containing the actual text which was matched by the token.

It is important to remember that, since each grammar is specified in a Perl string, all instances of the universal escape character ‘\ within a grammar must be doubled, so that they interpolate to single ‘\s when the string is compiled. For example, to use the grammar:

word: /\S+/ | backslash line: prefix word(s) " " backslash: \

the following code is required:

$parser = new Parse::RecDescent (q{ word: /\S+/ | backslash line: prefix word(s) “\n” backslash: \ });

Anonymous subrules

Parentheses introduce a nested scope that is very like a call to an anonymous subrule. Hence they are useful for in-lining subroutine calls, and other kinds of grouping behaviour. For example, instead of:

word: /\S+/ | backslash line: prefix word(s) " "

you could write:

line: prefix ( /\S+/ | backslash )(s) " "

and get exactly the same effects.

Parentheses are also use for collecting unrepeated alternations within a single production.

secret_identity: “Mr” (“Incredible”|“Fantastic”|“Sheen”) “, Esq.”

Terminal Separators

For the purpose of matching, each terminal in a production is considered to be preceded by a prefix - a pattern which must be matched before a token match is attempted. By default, the prefix is optional whitespace (which always matches, at least trivially), but this default may be reset in any production.

The variable $Parse::RecDescent::skip stores the universal prefix, which is the default for all terminal matches in all parsers built with Parse::RecDescent.

If you want to change the universal prefix using $Parse::RecDescent::skip, be careful to set it before creating the grammar object, because it is applied statically (when a grammar is built) rather than dynamically (when the grammar is used). Alternatively you can provide a global <skip:...> directive in your grammar before any rules (described later).

The prefix for an individual production can be altered by using the <skip:...> directive (described later). Setting this directive in the top-level rule is an alternative approach to setting $Parse::RecDescent::skip before creating the object, but in this case you don’t get the intended skipping behaviour if you directly invoke methods different from the top-level rule.

Actions

An action is a block of Perl code which is to be executed (as the block of a do statement) when the parser reaches that point in a production. The action executes within a special namespace belonging to the active parser, so care must be taken in correctly qualifying variable names (see also Start-up Actions below).

The action is considered to succeed if the final value of the block is defined (that is, if the implied do statement evaluates to a defined value - even one which would be treated as false). Note that the value associated with a successful action is also the final value in the block.

An action will fail if its last evaluated value is undef. This is surprisingly easy to accomplish by accident. For instance, here’s an infuriating case of an action that makes its production fail, but only when debugging isn’t activated:

description: name rank serial_number { print “Got $item[2] $item[1] ($item[3]) " if $::debugging }

If $debugging is false, no statement in the block is executed, so the final value is undef, and the entire production fails. The solution is:

description: name rank serial_number { print “Got $item[2] $item[1] ($item[3]) " if $::debugging; 1; }

Within an action, a number of useful parse-time variables are available in the special parser namespace (there are other variables also accessible, but meddling with them will probably just break your parser. As a general rule, if you avoid referring to unqualified variables - especially those starting with an underscore - inside an action, things should be okay):

@item and %item
The array slice @item[1..$#item] stores the value associated with each item (that is, each subrule, token, or action) in the current production. The analogy is to $1, $2, etc. in a yacc grammar. Note that, for obvious reasons, @item only contains the values of items before the current point in the production. The first element ($item[0]) stores the name of the current rule being matched. @item is a standard Perl array, so it can also be indexed with negative numbers, representing the number of items back from the current position in the parse: stuff: /various/ bits and pieces “then” data end { print $item[-2] } # PRINTS data # (EASIER THAN: $item[6]) The %item hash complements the <@item> array, providing named access to the same item values: stuff: /various/ bits and pieces “then” data end { print $item{data} # PRINTS data # (EVEN EASIER THAN USING @item) The results of named subrules are stored in the hash under each subrule’s name (including the repetition specifier, if any), whilst all other items are stored under a named positional key that indicates their ordinal position within their item type: _ _STRINGn_ _, _ _PATTERNn_ _, _ _DIRECTIVEn_ _, _ _ACTIONn_ _: stuff: /various/ bits and pieces “then” data end { save } { print $item{_ _PATTERN1_ _}, # PRINTS various $item{_ _STRING2_ _}, # PRINTS then $item{_ _ACTION1_ _}, # PRINTS RETURN # VALUE OF save } If you want proper named access to patterns or literals, you need to turn them into separate rules: stuff: various bits and pieces “then” data end { print $item{various} # PRINTS various } various: /various/ The special entry $item{_ _RULE_ _} stores the name of the current rule (i.e. the same value as $item[0]. The advantage of using %item, instead of @items is that it removes the need to track items positions that may change as a grammar evolves. For example, adding an interim <skip> directive of action can silently ruin a trailing action, by moving an @item element down the array one place. In contrast, the named entry of %item is unaffected by such an insertion. A limitation of the %item hash is that it only records the last value of a particular subrule. For example: range: ( number .. number ) { $return = $item{number} } will return only the value corresponding to the second match of the number subrule. In other words, successive calls to a subrule overwrite the corresponding entry in %item. Once again, the solution is to rename each subrule in its own rule: range: ( from_num .. to_num ) { $return = $item{from_num} } from_num: number to_num: number

@arg and %arg
The array @arg and the hash %arg store any arguments passed to the rule from some other rule (see Subrule argument lists). Changes to the elements of either variable do not propagate back to the calling rule (data can be passed back from a subrule via the $return variable - see next item).

$return
If a value is assigned to $return within an action, that value is returned if the production containing the action eventually matches successfully. Note that setting $return doesn’t cause the current production to succeed. It merely tells it what to return if it does succeed. Hence $return is analogous to $$ in a yacc grammar. If $return is not assigned within a production, the value of the last component of the production (namely: $item[$#item]) is returned if the production succeeds.

$commit
The current state of commitment to the current production (see Directives below).

$skip
The current terminal prefix (see Directives below).

$text
The remaining (unparsed) text. Changes to $text do not propagate out of unsuccessful productions, but do survive successful productions. Hence it is possible to dynamically alter the text being parsed - for example, to provide a #include-like facility: hash_include: #include filename { $text = ::loadfile($item[2]) . $text } filename: < /[a-z0-9._-]+/i > { $return = $item[2] } | " /[a-z0-9._-]+/i " { $return = $item[2] }

$thisline and $prevline
$thisline stores the current line number within the current parse (starting from 1). $prevline stores the line number for the last character which was already successfully parsed (this will be different from $thisline at the end of each line). For efficiency, $thisline and $prevline are actually tied hashes, and only recompute the required line number when the variable’s value is used. Assignment to $thisline adjusts the line number calculator, so that it believes that the current line number is the value being assigned. Note that this adjustment will be reflected in all subsequent line numbers calculations. Modifying the value of the variable $text (as in the previous hash_include example, for instance) will confuse the line counting mechanism. To prevent this, you should call Parse::RecDescent::LineCounter::resync($thisline) immediately after any assignment to the variable $text (or, at least, before the next attempt to use $thisline). Note that if a production fails after assigning to or resync’ing $thisline, the parser’s line counter mechanism will usually be corrupted. Also see the entry for @itempos. The line number can be set to values other than 1, by calling the start rule with a second argument. For example: $parser = new Parse::RecDescent ($grammar); $parser->input($text, 10); # START LINE NUMBERS AT 10

$thiscolumn and $prevcolumn
$thiscolumn stores the current column number within the current line being parsed (starting from 1). $prevcolumn stores the column number of the last character which was actually successfully parsed. Usually $prevcolumn == $thiscolumn-1, but not at the end of lines. For efficiency, $thiscolumn and $prevcolumn are actually tied hashes, and only recompute the required column number when the variable’s value is used. Assignment to $thiscolumn or $prevcolumn is a fatal error. Modifying the value of the variable $text (as in the previous hash_include example, for instance) may confuse the column counting mechanism. Note that $thiscolumn reports the column number before any whitespace that might be skipped before reading a token. Hence if you wish to know where a token started (and ended) use something like this: rule: token1 token2 startcol token3 endcol token4 { print “token3: columns $item[3] to $item[5]”; } startcol: { $thiscolumn } # NEED THE TO STEP PAST TOKEN SEP endcol: { $prevcolumn } Also see the entry for @itempos.

$thisoffset and $prevoffset
$thisoffset stores the offset of the current parsing position within the complete text being parsed (starting from 0). $prevoffset stores the offset of the last character which was actually successfully parsed. In all cases $prevoffset == $thisoffset-1. For efficiency, $thisoffset and $prevoffset are actually tied hashes, and only recompute the required offset when the variable’s value is used. Assignment to $thisoffset or <$prevoffset> is a fatal error. Modifying the value of the variable $text will not affect the offset counting mechanism. Also see the entry for @itempos.

  1. The array @itempos stores a hash reference corresponding to each element of @item. The elements of the hash provide the following: $itempos[$n]{offset}{from} # VALUE OF $thisoffset BEFORE $item[$n] $itempos[$n]{offset}{to} # VALUE OF $prevoffset AFTER $item[$n] $itempos[$n]{line}{from} # VALUE OF $thisline BEFORE $item[$n] $itempos[$n]{line}{to} # VALUE OF $prevline AFTER $item[$n] $itempos[$n]{column}{from} # VALUE OF $thiscolumn BEFORE $item[$n] $itempos[$n]{column}{to} # VALUE OF $prevcolumn AFTER $item[$n] Note that the various $itempos[$n]...{from} values record the appropriate value after any token prefix has been skipped. Hence, instead of the somewhat tedious and error-prone: rule: startcol token1 endcol startcol token2 endcol startcol token3 endcol { print “token1: columns $item[1] to $item[3] token2: columns $item[4] to $item[6] token3: columns $item[7] to $item[9]” } startcol: { $thiscolumn } # NEED THE TO STEP PAST TOKEN SEP endcol: { $prevcolumn } it is possible to write: rule: token1 token2 token3 { print “token1: columns $itempos[1]{column}{from} to $itempos[1]{column}{to} token2: columns $itempos[2]{column}{from} to $itempos[2]{column}{to} token3: columns $itempos[3]{column}{from} to $itempos[3]{column}{to}” } Note however that (in the current implementation) the use of @itempos anywhere in a grammar implies that item positioning information is collected everywhere during the parse. Depending on the grammar and the size of the text to be parsed, this may be prohibitively expensive and the explicit use of $thisline, $thiscolumn, etc. may be a better choice.

$thisparser
A reference to the Parse::RecDescent object through which parsing was initiated. The value of $thisparser propagates down the subrules of a parse but not back up. Hence, you can invoke subrules from another parser for the scope of the current rule as follows: rule: subrule1 subrule2 | { $thisparser = $::otherparser } <reject> | subrule3 subrule4 | subrule5 The result is that the production calls subrule1 and subrule2 of the current parser, and the remaining productions call the named subrules from $::otherparser. Note, however that Bad Things will happen if ::otherparser isn’t a blessed reference and/or doesn’t have methods with the same names as the required subrules!

$thisrule
A reference to the Parse::RecDescent::Rule object corresponding to the rule currently being matched.

$thisprod
A reference to the Parse::RecDescent::Production object corresponding to the production currently being matched.

$score and $score_return
$score stores the best production score to date, as specified by an earlier <score:...> directive. $score_return stores the corresponding return value for the successful production. See Scored productions.

Warning: the parser relies on the information in the various this... objects in some non-obvious ways. Tinkering with the other members of these objects will probably cause Bad Things to happen, unless you really know what you’re doing. The only exception to this advice is that the use of $this...->{local} is always safe.

Start-up Actions

Any actions which appear before the first rule definition in a grammar are treated as start-up actions. Each such action is stripped of its outermost brackets and then evaluated (in the parser’s special namespace) just before the rules of the grammar are first compiled.

The main use of start-up actions is to declare local variables within the parser’s special namespace:

{ my $lastitem = ???; } list: item(s) { $return = $lastitem } item: book { $lastitem = book; } bell { $lastitem = bell; } candle { $lastitem = candle; }

but start-up actions can be used to execute any valid Perl code within a parser’s special namespace.

Start-up actions can appear within a grammar extension or replacement (that is, a partial grammar installed via Parse::RecDescent::Extend() or Parse::RecDescent::Replace() - see Incremental Parsing), and will be executed before the new grammar is installed. Note, however, that a particular start-up action is only ever executed once.

Autoactions

It is sometimes desirable to be able to specify a default action to be taken at the end of every production (for example, in order to easily build a parse tree). If the variable $::RD_AUTOACTION is defined when Parse::RecDescent::new() is called, the contents of that variable are treated as a specification of an action which is to appended to each production in the corresponding grammar.

Alternatively, you can hard-code the autoaction within a grammar, using the <autoaction:...> directive.

So, for example, to construct a simple parse tree you could write:

$::RD_AUTOACTION = q { [@item] }; parser = Parse::RecDescent->new(q{ expression: and_expr || expression | and_expr and_expr: not_expr && and_expr | not_expr not_expr: ! brack_expr | brack_expr brack_expr: ( expression ) | identifier identifier: /[a-z]+/i });

or:

parser = Parse::RecDescent->new(q{ <autoaction: { [@item] } > expression: and_expr || expression | and_expr and_expr: not_expr && and_expr | not_expr not_expr: ! brack_expr | brack_expr brack_expr: ( expression ) | identifier identifier: /[a-z]+/i });

Either of these is equivalent to:

parser = new Parse::RecDescent (q{ expression: and_expr || expression { [@item] } | and_expr { [@item] } and_expr: not_expr && and_expr { [@item] } | not_expr { [@item] } not_expr: ! brack_expr { [@item] } | brack_expr { [@item] } brack_expr: ( expression ) { [@item] } | identifier { [@item] } identifier: /[a-z]+/i { [@item] } });

Alternatively, we could take an object-oriented approach, use different classes for each node (and also eliminating redundant intermediate nodes):

$::RD_AUTOACTION = q { $#item==1 ? $item[1] : “$item[0]_node”->new(@item[1..$#item]) }; parser = Parse::RecDescent->new(q{ expression: and_expr || expression | and_expr and_expr: not_expr && and_expr | not_expr not_expr: ! brack_expr | brack_expr brack_expr: ( expression ) | identifier identifier: /[a-z]+/i });

or:

parser = Parse::RecDescent->new(q{ <autoaction: $#item==1 ? $item[1] : “$item[0]_node”->new(@item[1..$#item]) > expression: and_expr || expression | and_expr and_expr: not_expr && and_expr | not_expr not_expr: ! brack_expr | brack_expr brack_expr: ( expression ) | identifier identifier: /[a-z]+/i });

which are equivalent to:

parser = Parse::RecDescent->new(q{ expression: and_expr || expression { “expression_node”->new(@item[1..3]) } | and_expr and_expr: not_expr && and_expr { “and_expr_node”->new(@item[1..3]) } | not_expr not_expr: ! brack_expr { “not_expr_node”->new(@item[1..2]) } | brack_expr brack_expr: ( expression ) { “brack_expr_node”->new(@item[1..3]) } | identifier identifier: /[a-z]+/i { “identifer_node”->new(@item[1]) } });

Note that, if a production already ends in an action, no autoaction is appended to it. For example, in this version:

$::RD_AUTOACTION = q { $#item==1 ? $item[1] : “$item[0]_node”->new(@item[1..$#item]) }; parser = Parse::RecDescent->new(q{ expression: and_expr && expression | and_expr and_expr: not_expr && and_expr | not_expr not_expr: ! brack_expr | brack_expr brack_expr: ( expression ) | identifier identifier: /[a-z]+/i { terminal_node->new($item[1]) } });

each identifier match produces a terminal_node object, not an identifier_node object.

A level 1 warning is issued each time an autoaction is added to some production.

Autotrees

A commonly needed autoaction is one that builds a parse-tree. It is moderately tricky to set up such an action (which must treat terminals differently from non-terminals), so Parse::RecDescent simplifies the process by providing the <autotree> directive.

If this directive appears at the start of grammar, it causes Parse::RecDescent to insert autoactions at the end of any rule except those which already end in an action. The action inserted depends on whether the production is an intermediate rule (two or more items), or a terminal of the grammar (i.e. a single pattern or string item).

So, for example, the following grammar:

<autotree> file : command(s) command : get | set | vet get : get ident ; set : set ident to value ; vet : check ident is value ; ident : /\w+/ value : /\d+/

is equivalent to:

file : command(s) { bless \item, $item[0] } command : get { bless \item, $item[0] } | set { bless \item, $item[0] } | vet { bless \item, $item[0] } get : get ident ; { bless \item, $item[0] } set : set ident to value ; { bless \item, $item[0] } vet : check ident is value ; { bless \item, $item[0] } ident : /\w+/ { bless {_ _VALUE_ _=>$item[1]}, $item[0] } value : /\d+/ { bless {_ _VALUE_ _=>$item[1]}, $item[0] }

Note that each node in the tree is blessed into a class of the same name as the rule itself. This makes it easy to build object-oriented processors for the parse-trees that the grammar produces. Note too that the last two rules produce special objects with the single attribute ‘_ _VALUE_ _’. This is because they consist solely of a single terminal.

This autoaction-ed grammar would then produce a parse tree in a data structure like this:

{ file => { command => { [ get => { identifier => { _ _VALUE_ _ => a }, }, set => { identifier => { _ _VALUE_ _ => b }, value => { _ _VALUE_ _ => 7 }, }, vet => { identifier => { _ _VALUE_ _ => b }, value => { _ _VALUE_ _ => 7 }, }, ], }, } }

(except, of course, that each nested hash would also be blessed into the appropriate class).

You can also specify a base class for the <autotree> directive. The supplied prefix will be prepended to the rule names when creating tree nodes. The following are equivalent:

<autotree:MyBase::Class> <autotree:MyBase::Class::>

And will produce a root node blessed into the MyBase::Class::file package in the example above.

Autostubbing

Normally, if a subrule appears in some production, but no rule of that name is ever defined in the grammar, the production which refers to the non-existent subrule fails immediately. This typically occurs as a result of misspellings, and is a sufficiently common occurrence that a warning is generated for such situations.

However, when prototyping a grammar it is sometimes useful to be able to use subrules before a proper specification of them is really possible. For example, a grammar might include a section like:

function_call: identifier ( arg(s?) ) identifier: /[a-z]\w*/i

where the possible format of an argument is sufficiently complex that it is not worth specifying in full until the general function call syntax has been debugged. In this situation it is convenient to leave the real rule arg undefined and just slip in a placeholder (or stub):

arg: arg

so that the function call syntax can be tested with dummy input such as:

f0() f1(arg) f2(arg arg) f3(arg arg arg)

et cetera.

Early in prototyping, many such stubs may be required, so Parse::RecDescent provides a means of automating their definition. If the variable $::RD_AUTOSTUB is defined when a parser is built, a subrule reference to any non-existent rule (say, subrule), will cause a stub rule to be automatically defined in the generated parser. If $::RD_AUTOSTUB eq 1 or is false, a stub rule of the form:

subrule: subrule

will be generated. The special-case for a value of 1 is to allow the use of the perl -s with -RD_AUTOSTUB without generating subrule: 1 per below. If $::RD_AUTOSTUB is true, a stub rule of the form:

subrule: $::RD_AUTOSTUB

will be generated. $::RD_AUTOSTUB must contain a valid production item, no checking is performed. No lazy evaluation of $::RD_AUTOSTUB is performed, it is evaluated at the time the Parser is generated.

Hence, with $::RD_AUTOSTUB defined, it is possible to only partially specify a grammar, and then fake matches of the unspecified (sub)rules by just typing in their name, or a literal value that was assigned to $::RD_AUTOSTUB.

Look-ahead

If a subrule, token, or action is prefixed by …, then it is treated as a look-ahead request. That means that the current production can (as usual) only succeed if the specified item is matched, but that the matching does not consume any of the text being parsed. This is very similar to the /(?=...)/ look-ahead construct in Perl patterns. Thus, the rule:

inner_word: word …word

will match whatever the subrule word matches, provided that match is followed by some more text which subrule word would also match (although this second substring is not actually consumed by inner_word)

Likewise, a …! prefix, causes the following item to succeed (without consuming any text) if and only if it would normally fail. Hence, a rule such as:

identifier: …!keyword …!_ /[A-Za-z_]\w*/

matches a string of characters which satisfies the pattern /[A-Za-z_]\w*/, but only if the same sequence of characters would not match either subrule keyword or the literal token ‘_’.

Sequences of look-ahead prefixes accumulate, multiplying their positive and/or negative senses. Hence:

inner_word: word …!……!word

is exactly equivalent to the original example above (a warning is issued in cases like these, since they often indicate something left out, or misunderstood).

Note that actions can also be treated as look-aheads. In such cases, the state of the parser text (in the local variable $text) after the look-ahead action is guaranteed to be identical to its state before the action, regardless of how it’s changed within the action (unless you actually undefine $text, in which case you get the disaster you deserve :-).

Directives

Directives are special pre-defined actions which may be used to alter the behaviour of the parser. There are currently twenty-three directives: <commit>, <uncommit>, <reject>, <score>, <autoscore>, <skip>, <resync>, <error>, <warn>, <hint>, <trace_build>, <trace_parse>, <nocheck>, <rulevar>, <matchrule>, <leftop>, <rightop>, <defer>, <nocheck>, <perl_quotelike>, <perl_codeblock>, <perl_variable>, and <token>.

Committing and uncommitting
The <commit> and <uncommit> directives permit the recursive descent of the parse tree to be pruned (or cut) for efficiency. Within a rule, a <commit> directive instructs the rule to ignore subsequent productions if the current production fails. For example: command: find <commit> filename | open <commit> filename | move filename filename Clearly, if the leading token ‘find’ is matched in the first production but that production fails for some other reason, then the remaining productions cannot possibly match. The presence of the <commit> causes the command rule to fail immediately if an invalid find command is found, and likewise if an invalid open command is encountered. It is also possible to revoke a previous commitment. For example: if_statement: if <commit> condition then block <uncommit> else block | if <commit> condition then block In this case, a failure to find an else block in the first production shouldn’t preclude trying the second production, but a failure to find a condition certainly should. As a special case, any production in which the first item is an <uncommit> immediately revokes a preceding <commit> (even though the production would not otherwise have been tried). For example, in the rule: request: explain expression | explain <commit> keyword | save | quit | <uncommit> term ? if the text being matched was explain?, and the first two productions failed, then the <commit> in production two would cause productions three and four to be skipped, but the leading <uncommit> in the production five would allow that production to attempt a match. Note in the preceding example, that the <commit> was only placed in production two. If production one had been: request: explain <commit> expression then production two would be (inappropriately) skipped if a leading explain… was encountered. Both <commit> and <uncommit> directives always succeed, and their value is always 1.

Rejecting a production
The <reject> directive immediately causes the current production to fail (it is exactly equivalent to, but more obvious than, the action {undef}). A <reject> is useful when it is desirable to get the side effects of the actions in one production, without prejudicing a match by some other production later in the rule. For example, to insert tracing code into the parse: complex_rule: { print “In complex rule… “; } <reject> complex_rule: simple_rule + i * simple_rule | i * simple_rule | simple_rule It is also possible to specify a conditional rejection, using the form <reject:condition>, which only rejects if the specified condition is true. This form of rejection is exactly equivalent to the action {(condition)?undef:1}>. For example: command: save_command | restore_command | <reject: defined $::tolerant> { exit } | <error: Unknown command. Ignored.> A <reject> directive never succeeds (and hence has no associated value). A conditional rejection may succeed (if its condition is not satisfied), in which case its value is 1. As an extra optimization, Parse::RecDescent ignores any production which begins with an unconditional <reject> directive, since any such production can never successfully match or have any useful side-effects. A level 1 warning is issued in all such cases. Note that productions beginning with conditional <reject:...> directives are never optimized away in this manner, even if they are always guaranteed to fail (for example: <reject:1>) Due to the way grammars are parsed, there is a minor restriction on the condition of a conditional <reject:...>: it cannot contain any raw ‘<’ or ‘>’ characters. For example: line: cmd <reject: $thiscolumn > max> data results in an error when a parser is built from this grammar (since the grammar parser has no way of knowing whether the first > is a less than or the end of the <reject:...>. To overcome this problem, put the condition inside a do{} block: line: cmd <reject: do{$thiscolumn > max}> data Note that the same problem may occur in other directives that take arguments. The same solution will work in all cases.

Skipping between terminals
The <skip> directive enables the terminal prefix used in a production to be changed. For example: OneLiner: Command <skip:[ ]*> Arg(s) /;/ causes only blanks and tabs to be skipped before terminals in the Arg subrule (and any of its subrules>, and also before the final /;/ terminal. Once the production is complete, the previous terminal prefix is reinstated. Note that this implies that distinct productions of a rule must reset their terminal prefixes individually. The <skip> directive evaluates to the previous terminal prefix, so it’s easy to reinstate a prefix later in a production: Command: <skip:”,"> CSV(s) <skip:$item[1]> Modifier The value specified after the colon is interpolated into a pattern, so all of the following are equivalent (though their efficiency increases down the list): <skip: “$colon|$comma”> # ASSUMING THE VARS HOLD THE OBVIOUS VALUES <skip: :|,> <skip: q{[:,]}> <skip: qr/[:,]/> There is no way of directly setting the prefix for an entire rule, except as follows: Rule: <skip: [ ]*> Prod1 | <skip: [ ]*> Prod2a Prod2b | <skip: [ ]*> Prod3 or, better: Rule: <skip: [ ]*> ( Prod1 | Prod2a Prod2b | Prod3 ) The skip pattern is passed down to subrules, so setting the skip for the top-level rule as described above actually sets the prefix for the entire grammar (provided that you only call the method corresponding to the top-level rule itself). Alternatively, or if you have more than one top-level rule in your grammar, you can provide a global <skip> directive prior to defining any rules in the grammar. These are the preferred alternatives to setting $Parse::RecDescent::skip. Additionally, using <skip> actually allows you to have a completely dynamic skipping behaviour. For example: Rule_with_dynamic_skip: <skip: $::skip_pattern> Rule Then you can set $::skip_pattern before invoking Rule_with_dynamic_skip and have it skip whatever you specified. Note: Up to release 1.51 of Parse::RecDescent, an entirely different mechanism was used for specifying terminal prefixes. The current method is not backwards-compatible with that early approach. The current approach is stable and will not change again. Note: the global <skip> directive added in 1.967_004 did not interpolate the pattern argument, instead the pattern was placed inside of single quotes and then interpolated. This behavior was changed in 1.967_010 so that all <skip> directives behavior similarly.

Resynchronization
The <resync> directive provides a visually distinctive means of consuming some of the text being parsed, usually to skip an erroneous input. In its simplest form <resync> simply consumes text up to and including the next newline (" ") character, succeeding only if the newline is found, in which case it causes its surrounding rule to return zero on success. In other words, a <resync> is exactly equivalent to the token /[^ ]* / followed by the action { $return = 0 } (except that productions beginning with a <resync> are ignored when generating error messages). A typical use might be: script : command(s) command: save_command | restore_command | <resync> # TRY NEXT LINE, IF POSSIBLE It is also possible to explicitly specify a resynchronization pattern, using the <resync:pattern> variant. This version succeeds only if the specified pattern matches (and consumes) the parsed text. In other words, <resync:pattern> is exactly equivalent to the token /pattern/ (followed by a { $return = 0 } action). For example, if commands were terminated by newlines or semi-colons: command: save_command | restore_command | <resync:[^; ]*[; ]> The value of a successfully matched <resync> directive (of either type) is the text that it consumed. Note, however, that since the directive also sets $return, a production consisting of a lone <resync> succeeds but returns the value zero (which a calling rule may find useful to distinguish between true matches and tolerant matches). Remember that returning a zero value indicates that the rule succeeded (since only an undef denotes failure within Parse::RecDescent parsers.

Error handling
The <error> directive provides automatic or user-defined generation of error messages during a parse. In its simplest form <error> prepares an error message based on the mismatch between the last item expected and the text which cause it to fail. For example, given the rule: McCoy: curse , name , Im a doctor, not a a_profession ! | pronoun dead, name ! | <error> the following strings would produce the following messages:

“Amen, Jim!”
ERROR (line 1): Invalid McCoy: Expected curse or pronoun not found

“Dammit, Jim, I’m a doctor!”
ERROR (line 1): Invalid McCoy: Expected “, Im a doctor, not a” but found “, Im a doctor!” instead

“He’s dead, "
ERROR (line 2): Invalid McCoy: Expected name not found

“He’s alive!”
ERROR (line 1): Invalid McCoy: Expected dead, but found “alive!” instead

“Dammit, Jim, I’m a doctor, not a pointy-eared Vulcan!”
ERROR (line 1): Invalid McCoy: Expected a profession but found “pointy-eared Vulcan!” instead

Note that, when autogenerating error messages, all underscores in any rule name used in a message are replaced by single spaces (for example a_production becomes a production). Judicious choice of rule names can therefore considerably improve the readability of automatic error messages (as well as the maintainability of the original grammar). If the automatically generated error is not sufficient, it is possible to provide an explicit message as part of the error directive. For example: Spock: “Fascinating , (name | Captain) . | “Highly illogical, doctor.” | <error: He never said that!> which would result in all failures to parse a Spock subrule printing the following message: ERROR (line <N>): Invalid Spock: He never said that! The error message is treated as a qq{…} string and interpolated when the error is generated (not when the directive is specified!). Hence: <error: Mystical error near “$text”> would correctly insert the ambient text string which caused the error. There are two other forms of error directive: <error?> and <error?: msg>. These behave just like <error> and <error: msg> respectively, except that they are only triggered if the rule is committed at the time they are encountered. For example: Scotty: “Ya kenna change the Laws of Phusics,” <commit> name | name <commit> , shes goanta blaw! | <error?> will only generate an error for a string beginning with Ya kenna change the Laws o’ Phusics, or a valid name, but which still fails to match the corresponding production. That is, $parser->Scotty("Aye, Capain") will fail silently (since neither production will commit the rule on that input), whereas $parser->Scotty("Mr Spock, ah jest kenna dout!") will fail with the error message: ERROR (line 1): Invalid Scotty: expected shes goanta blaw! but found I jest kenna dout! instead. since in that case the second production would commit after matching the leading name. Note that to allow this behaviour, all <error> directives which are the first item in a production automatically uncommit the rule just long enough to allow their production to be attempted (that is, when their production fails, the commitment is reinstated so that subsequent productions are skipped). In order to permanently uncommit the rule before an error message, it is necessary to put an explicit <uncommit> before the <error>. For example: line: Kirk: <commit> Kirk | Spock: <commit> Spock | McCoy: <commit> McCoy | <uncommit> <error?> <reject> | <resync> Error messages generated by the various <error...> directives are not displayed immediately. Instead, they are queued in a buffer and are only displayed once parsing ultimately fails. Moreover, <error...> directives that cause one production of a rule to fail are automatically removed from the message queue if another production subsequently causes the entire rule to succeed. This means that you can put <error...> directives wherever useful diagnosis can be done, and only those associated with actual parser failure will ever be displayed. Also see GOTCHAS. As a general rule, the most useful diagnostics are usually generated either at the very lowest level within the grammar, or at the very highest. A good rule of thumb is to identify those subrules which consist mainly (or entirely) of terminals, and then put an <error...> directive at the end of any other rule which calls one or more of those subrules. There is one other situation in which the output of the various types of error directive is suppressed; namely, when the rule containing them is being parsed as part of a look-ahead (see Look-ahead). In this case, the error directive will still cause the rule to fail, but will do so silently. An unconditional <error> directive always fails (and hence has no associated value). This means that encountering such a directive always causes the production containing it to fail. Hence an <error> directive will inevitably be the last (useful) item of a rule (a level 3 warning is issued if a production contains items after an unconditional <error> directive). An <error?> directive will succeed (that is: fail to fail :-), if the current rule is uncommitted when the directive is encountered. In that case the directive’s associated value is zero. Hence, this type of error directive can be used before the end of a production. For example: command: do <commit> something | report <commit> something | <error?: Syntax error> <error: Unknown command> Warning: The <error?> directive does not mean always fail (but do so silently unless committed). It actually means “only fail (and report) if committed, otherwise succeed. To achieve the fail silently if uncommitted” semantics, it is necessary to use: rule: item <commit> item(s) | <error?> <reject> # FAIL SILENTLY UNLESS COMMITTED However, because people seem to expect a lone <error?> directive to work like this: rule: item <commit> item(s) | <error?: Error message if committed> | <error: Error message if uncommitted> Parse::RecDescent automatically appends a <reject> directive if the <error?> directive is the only item in a production. A level 2 warning (see below) is issued when this happens. The level of error reporting during both parser construction and parsing is controlled by the presence or absence of four global variables: $::RD_ERRORS, $::RD_WARN, $::RD_HINT, and <$::RD_TRACE>. If $::RD_ERRORS is defined (and, by default, it is) then fatal errors are reported. Whenever $::RD_WARN is defined, certain non-fatal problems are also reported. Warnings have an associated level: 1, 2, or 3. The higher the level, the more serious the warning. The value of the corresponding global variable ($::RD_WARN) determines the lowest level of warning to be displayed. Hence, to see all warnings, set $::RD_WARN to 1. To see only the most serious warnings set $::RD_WARN to 3. By default $::RD_WARN is initialized to 3, ensuring that serious but non-fatal errors are automatically reported. There is also a grammar directive to turn on warnings from within the grammar: <warn>. It takes an optional argument, which specifies the warning level: <warn: 2>. See DIAGNOSTICS for a list of the various error and warning messages that Parse::RecDescent generates when these two variables are defined. Defining any of the remaining variables (which are not defined by default) further increases the amount of information reported. Defining $::RD_HINT causes the parser generator to offer more detailed analyses and hints on both errors and warnings. Note that setting $::RD_HINT at any point automagically sets $::RD_WARN to 1. There is also a <hint> directive, which can be hard-coded into a grammar. Defining $::RD_TRACE causes the parser generator and the parser to report their progress to STDERR in excruciating detail (although, without hints unless $::RD_HINT is separately defined). This detail can be moderated in only one respect: if $::RD_TRACE has an integer value (N) greater than 1, only the N characters of the current parsing context (that is, where in the input string we are at any point in the parse) is reported at any time. $::RD_TRACE is mainly useful for debugging a grammar that isn’t behaving as you expected it to. To this end, if $::RD_TRACE is defined when a parser is built, any actual parser code which is generated is also written to a file named RD_TRACE in the local directory. There are two directives associated with the $::RD_TRACE variable. If a grammar contains a <trace_build> directive anywhere in its specification, $::RD_TRACE is turned on during the parser construction phase. If a grammar contains a <trace_parse> directive anywhere in its specification, $::RD_TRACE is turned on during any parse the parser performs. Note that the four variables belong to the main package, which makes them easier to refer to in the code controlling the parser, and also makes it easy to turn them into command line flags (-RD_ERRORS, -RD_WARN, -RD_HINT, -RD_TRACE) under perl -s. The corresponding directives are useful to hardwire the various debugging features into a particular grammar (rather than having to set and reset external variables).

Redirecting diagnostics
The diagnostics provided by the tracing mechanism always go to STDERR. If you need them to go elsewhere, localize and reopen STDERR prior to the parse. For example: { local *STDERR = IO::File->new(">$filename”) or die $!; my $result = $parser->startrule($text); }

Consistency checks
Whenever a parser is build, Parse::RecDescent carries out a number of (potentially expensive) consistency checks. These include: verifying that the grammar is not left-recursive and that no rules have been left undefined. These checks are important safeguards during development, but unnecessary overheads when the grammar is stable and ready to be deployed. So Parse::RecDescent provides a directive to disable them: <nocheck>. If a grammar contains a <nocheck> directive anywhere in its specification, the extra compile-time checks are by-passed.

Specifying local variables
It is occasionally convenient to specify variables which are local to a single rule. This may be achieved by including a <rulevar:...> directive anywhere in the rule. For example: markup: <rulevar: $tag> markup: tag {($tag=$item[1]) =~ s/^<|>$//g} body[$tag] The example <rulevar: $tag> directive causes a my variable named $tag to be declared at the start of the subroutine implementing the markup rule (that is, before the first production, regardless of where in the rule it is specified). Specifically, any directive of the form: <rulevar:text> causes a line of the form my text; to be added at the beginning of the rule subroutine, immediately after the definitions of the following local variables: $thisparser $commit $thisrule @item $thisline @arg $text %arg This means that the following <rulevar> directives work as expected: <rulevar: $count = 0 > <rulevar: $firstarg = $arg[0] || > <rulevar: $myItems = \item > <rulevar: @context = ( $thisline, $text, @arg ) > <rulevar: ($name,$age) = $arg{“name”,“age”} > If a variable that is also visible to subrules is required, it needs to be local’d, not my’d. rulevar defaults to my, but if local is explicitly specified: <rulevar: local $count = 0 > then a local-ized variable is declared instead, and will be available within subrules. Note however that, because all such variables are my variables, their values do not persist between match attempts on a given rule. To preserve values between match attempts, values can be stored within the local member of the $thisrule object: countedrule: { $thisrule->{“local”}{“count”}++ } <reject> | subrule1 | subrule2 | <reject: $thisrule->{“local”}{“count”} == 1> subrule3 When matching a rule, each <rulevar> directive is matched as if it were an unconditional <reject> directive (that is, it causes any production in which it appears to immediately fail to match). For this reason (and to improve readability) it is usual to specify any <rulevar> directive in a separate production at the start of the rule (this has the added advantage that it enables Parse::RecDescent to optimize away such productions, just as it does for the <reject> directive).

Dynamically matched rules
Because regexes and double-quoted strings are interpolated, it is relatively easy to specify productions with context sensitive tokens. For example: command: keyword body “end $item[1]” which ensures that a command block is bounded by a “<keyword>…end <same keyword>” pair. Building productions in which subrules are context sensitive is also possible, via the <matchrule:...> directive. This directive behaves identically to a subrule item, except that the rule which is invoked to match it is determined by the string specified after the colon. For example, we could rewrite the command rule like this: command: keyword <matchrule:body> “end $item[1]” Whatever appears after the colon in the directive is treated as an interpolated string (that is, as if it appeared in qq{...} operator) and the value of that interpolated string is the name of the subrule to be matched. Of course, just putting a constant string like body in a <matchrule:...> directive is of little interest or benefit. The power of directive is seen when we use a string that interpolates to something interesting. For example: command: keyword <matchrule:$item[1]_body> “end $item[1]” keyword: while | if | function while_body: condition block if_body: condition block (else block)(?) function_body: arglist block Now the command rule selects how to proceed on the basis of the keyword that is found. It is as if command were declared: command: while while_body “end while” | if if_body “end if” | function function_body “end function” When a <matchrule:...> directive is used as a repeated subrule, the rule name expression is late-bound. That is, the name of the rule to be called is re-evaluated each time a match attempt is made. Hence, the following grammar: { $::species = dogs } pair: two <matchrule:$::species>(s) dogs: /dogs/ { $::species = cats } cats: /cats/ will match the string two dogs cats cats completely, whereas it will only match the string two dogs dogs dogs up to the eighth letter. If the rule name were early bound (that is, evaluated only the first time the directive is encountered in a production), the reverse behaviour would be expected. Note that the matchrule directive takes a string that is to be treated as a rule name, not as a rule invocation. That is, it’s like a Perl symbolic reference, not an eval. Just as you can say: $subname = foo; # and later… &{$foo}(@args); but not: $subname = foo(@args); # and later… &{$foo}; likewise you can say: $rulename = foo; # and in the grammar… <matchrule:$rulename>[@args] but not: $rulename = foo[@args]; # and in the grammar… <matchrule:$rulename>

Deferred actions
The <defer:...> directive is used to specify an action to be performed when (and only if!) the current production ultimately succeeds. Whenever a <defer:...> directive appears, the code it specifies is converted to a closure (an anonymous subroutine reference) which is queued within the active parser object. Note that, because the deferred code is converted to a closure, the values of any local variable (such as $text, <@item>, etc.) are preserved until the deferred code is actually executed. If the parse ultimately succeeds and the production in which the <defer:...> directive was evaluated formed part of the successful parse, then the deferred code is executed immediately before the parse returns. If however the production which queued a deferred action fails, or one of the higher-level rules which called that production fails, then the deferred action is removed from the queue, and hence is never executed. For example, given the grammar: sentence: noun trans noun | noun intrans noun: the dog { print “$item[1] (noun) " } | the meat { print “$item[1] (noun) " } trans: ate { print “$item[1] (transitive) " } intrans: ate { print “$item[1] (intransitive) " } | barked { print “$item[1] (intransitive) " } then parsing the sentence "the dog ate" would produce the output: the dog (noun) ate (transitive) the dog (noun) ate (intransitive) This is because, even though the first production of sentence ultimately fails, its initial subrules noun and trans do match, and hence they execute their associated actions. Then the second production of sentence succeeds, causing the actions of the subrules noun and intrans to be executed as well. On the other hand, if the actions were replaced by <defer:...> directives: sentence: noun trans noun | noun intrans noun: the dog <defer: print “$item[1] (noun) " > | the meat <defer: print “$item[1] (noun) " > trans: ate <defer: print “$item[1] (transitive) " > intrans: ate <defer: print “$item[1] (intransitive) " > | barked <defer: print “$item[1] (intransitive) " > the output would be: the dog (noun) ate (intransitive) since deferred actions are only executed if they were evaluated in a production which ultimately contributes to the successful parse. In this case, even though the first production of sentence caused the subrules noun and trans to match, that production ultimately failed and so the deferred actions queued by those subrules were subsequently discarded. The second production then succeeded, causing the entire parse to succeed, and so the deferred actions queued by the (second) match of the noun subrule and the subsequent match of intrans are preserved and eventually executed. Deferred actions provide a means of improving the performance of a parser, by only executing those actions which are part of the final parse-tree for the input data. Alternatively, deferred actions can be viewed as a mechanism for building (and executing) a customized subroutine corresponding to the given input data, much in the same way that autoactions (see Autoactions) can be used to build a customized data structure for specific input. Whether or not the action it specifies is ever executed, a <defer:...> directive always succeeds, returning the number of deferred actions currently queued at that point.

Parsing Perl
Parse::RecDescent provides limited support for parsing subsets of Perl, namely: quote-like operators, Perl variables, and complete code blocks. The <perl_quotelike> directive can be used to parse any Perl quote-like operator: a string, m/a pattern/, tr{ans}{lation}, etc. It does this by calling Text::Balanced::quotelike(). If a quote-like operator is found, a reference to an array of eight elements is returned. Those elements are identical to the last eight elements returned by Text::Balanced::extract_quotelike() in an array context, namely:

[0]
the name of the quotelike operator Ω- ‘q’, ‘qq’, ’m’, ’s’, ’tr’ Ω- if the operator was named; otherwise undef,

[1]
the left delimiter of the first block of the operation,

[2]
the text of the first block of the operation (that is, the contents of a quote, the regex of a match, or substitution or the target list of a translation),

[3]
the right delimiter of the first block of the operation,

[4]
the left delimiter of the second block of the operation if there is one (that is, if it is a s, tr, or y); otherwise undef,

[5]
the text of the second block of the operation if there is one (that is, the replacement of a substitution or the translation list of a translation); otherwise undef,

[6]
the right delimiter of the second block of the operation (if any); otherwise undef,

[7]
the trailing modifiers on the operation (if any); otherwise undef.

If a quote-like expression is not found, the directive fails with the usual undef value. The <perl_variable> directive can be used to parse any Perl variable: $scalar, @array, %hash, $ref->{field}[$index], etc. It does this by calling Text::Balanced::extract_variable(). If the directive matches text representing a valid Perl variable specification, it returns that text. Otherwise it fails with the usual undef value. The <perl_codeblock> directive can be used to parse curly-brace-delimited block of Perl code, such as: { $a = 1; f() =~ m/pat/; }. It does this by calling Text::Balanced::extract_codeblock(). If the directive matches text representing a valid Perl code block, it returns that text. Otherwise it fails with the usual undef value. You can also tell it what kind of brackets to use as the outermost delimiters. For example: arglist: <perl_codeblock ()> causes an arglist to match a perl code block whose outermost delimiters are (...) (rather than the default {...}).

Constructing tokens
Eventually, Parse::RecDescent will be able to parse tokenized input, as well as ordinary strings. In preparation for this joyous day, the <token:...> directive has been provided. This directive creates a token which will be suitable for input to a Parse::RecDescent parser (when it eventually supports tokenized input). The text of the token is the value of the immediately preceding item in the production. A <token:...> directive always succeeds with a return value which is the hash reference that is the new token. It also sets the return value for the production to that hash ref. The <token:...> directive makes it easy to build a Parse::RecDescent-compatible lexer in Parse::RecDescent: my $lexer = new Parse::RecDescent q { lex: token(s) token: /a/ <token:INDEF> | /the/ <token:DEF> | /fly/ <token:NOUN,VERB> | /[a-z]+/i { lc $item[1] } <token:ALPHA> | <error: Unknown token> }; which will eventually be able to be used with a regular Parse::RecDescent grammar: my $parser = new Parse::RecDescent q { startrule: subrule1 subrule 2 # ETC… }; either with a pre-lexing phase: $parser->startrule( $lexer->lex($data) ); or with a lex-on-demand approach: $parser->startrule( sub{$lexer->token(\data)} ); But at present, only the <token:...> directive is actually implemented. The rest is vapourware.

Specifying operations
One of the commonest requirements when building a parser is to specify binary operators. Unfortunately, in a normal grammar, the rules for such things are awkward: disjunction: conjunction (or conjunction)(s?) { $return = [ $item[1], @{$item[2]} ] } conjunction: atom (and atom)(s?) { $return = [ $item[1], @{$item[2]} ] } or inefficient: disjunction: conjunction or disjunction { $return = [ $item[1], @{$item[2]} ] } | conjunction { $return = [ $item[1] ] } conjunction: atom and conjunction { $return = [ $item[1], @{$item[2]} ] } | atom { $return = [ $item[1] ] } and either way is ugly and hard to get right. The <leftop:...> and <rightop:...> directives provide an easier way of specifying such operations. Using <leftop:...> the above examples become: disjunction: <leftop: conjunction or conjunction> conjunction: <leftop: atom and atom> The <leftop:...> directive specifies a left-associative binary operator. It is specified around three other grammar elements (typically subrules or terminals), which match the left operand, the operator itself, and the right operand respectively. A <leftop:...> directive such as: disjunction: <leftop: conjunction or conjunction> is converted to the following: disjunction: ( conjunction (or conjunction)(s?) { $return = [ $item[1], @{$item[2]} ] } ) In other words, a <leftop:...> directive matches the left operand followed by zero or more repetitions of both the operator and the right operand. It then flattens the matched items into an anonymous array which becomes the (single) value of the entire <leftop:...> directive. For example, an <leftop:...> directive such as: output: <leftop: ident << expr > when given a string such as: cout << var << “str” << 3 would match, and $item[1] would be set to: [ cout, var, “str”, 3 ] In other words: output: <leftop: ident << expr > is equivalent to a left-associative operator: output: ident { $return = [$item[1]] } | ident << expr { $return = [@item[1,3]] } | ident << expr << expr { $return = [@item[1,3,5]] } | ident << expr << expr << expr { $return = [@item[1,3,5,7]] } # …etc… Similarly, the <rightop:...> directive takes a left operand, an operator, and a right operand: assign: <rightop: var = expr > and converts them to: assign: ( (var = {$return=$item[1]})(s?) expr { $return = [ @{$item[1]}, $item[2] ] } ) which is equivalent to a right-associative operator: assign: expr { $return = [$item[1]] } | var = expr { $return = [@item[1,3]] } | var = var = expr { $return = [@item[1,3,5]] } | var = var = var = expr { $return = [@item[1,3,5,7]] } # …etc… Note that for both the <leftop:...> and <rightop:...> directives, the directive does not normally return the operator itself, just a list of the operands involved. This is particularly handy for specifying lists: list: ( <leftop: list_item , list_item> ) { $return = $item[2] } There is, however, a problem: sometimes the operator is itself significant. For example, in a Perl list a comma and a => are both valid separators, but the => has additional stringification semantics. Hence it’s important to know which was used in each case. To solve this problem the <leftop:...> and <rightop:...> directives do return the operator(s) as well, under two circumstances. The first case is where the operator is specified as a subrule. In that instance, whatever the operator matches is returned (on the assumption that if the operator is important enough to have its own subrule, then it’s important enough to return). The second case is where the operator is specified as a regular expression. In that case, if the first bracketed subpattern of the regular expression matches, that matching value is returned (this is analogous to the behaviour of the Perl split function, except that only the first subpattern is returned). In other words, given the input: ( a=>1, b=>2 ) the specifications: list: ( <leftop: list_item separator list_item> ) separator: , | => or: list: ( <leftop: list_item /(,|=>)/ list_item> ) cause the list separators to be interleaved with the operands in the anonymous array in $item[2]: [ a, =>, 1, ,, b, =>, 2 ] But the following version: list: ( <leftop: list_item /,|=>/ list_item> ) returns only the operators: [ a, 1, b, 2 ] Of course, none of the above specifications handle the case of an empty list, since the <leftop:...> and <rightop:...> directives require at least a single right or left operand to match. To specify that the operator can match trivially, it’s necessary to add a (s?) qualifier to the directive: list: ( <leftop: list_item /(,|=>)/ list_item>(s?) ) Note that in almost all the above examples, the first and third arguments of the <leftop:...> directive were the same subrule. That is because <leftop:...>’s are frequently used to specify separated lists of the same type of item. To make such lists easier to specify, the following syntax: list: element(s /,/) is exactly equivalent to: list: <leftop: element /,/ element> Note that the separator must be specified as a raw pattern (i.e. not a string or subrule).

Scored productions
By default, Parse::RecDescent grammar rules always accept the first production that matches the input. But if two or more productions may potentially match the same input, choosing the first that does so may not be optimal. For example, if you were parsing the sentence time flies like an arrow, you might use a rule like this: sentence: verb noun preposition article noun { [@item] } | adjective noun verb article noun { [@item] } | noun verb preposition article noun { [@item] } Each of these productions matches the sentence, but the third one is the most likely interpretation. However, if the sentence had been fruit flies like a banana, then the second production is probably the right match. To cater for such situations, the <score:...> can be used. The directive is equivalent to an unconditional <reject>, except that it allows you to specify a score for the current production. If that score is numerically greater than the best score of any preceding production, the current production is cached for later consideration. If no later production matches, then the cached production is treated as having matched, and the value of the item immediately before its <score:...> directive is returned as the result. In other words, by putting a <score:...> directive at the end of each production, you can select which production matches using criteria other than specification order. For example: sentence: verb noun preposition article noun { [@item] } <score: sensible(@item)> | adjective noun verb article noun { [@item] } <score: sensible(@item)> | noun verb preposition article noun { [@item] } <score: sensible(@item)> Now, when each production reaches its respective <score:...> directive, the subroutine sensible will be called to evaluate the matched items (somehow). Once all productions have been tried, the one which sensible scored most highly will be the one that is accepted as a match for the rule. The variable $score always holds the current best score of any production, and the variable $score_return holds the corresponding return value. As another example, the following grammar matches lines that may be separated by commas, colons, or semi-colons. This can be tricky if a colon-separated line also contains commas, or vice versa. The grammar resolves the ambiguity by selecting the rule that results in the fewest fields: line: seplist[sep=>,] <score: -@{$item[1]}> | seplist[sep=>:] <score: -@{$item[1]}> | seplist[sep=>” “] <score: -@{$item[1]}> seplist: <skip:”"> <leftop: /[^$arg{sep}]*/ “$arg{sep}” /[^$arg{sep}]*/> Note the use of negation within the <score:...> directive to ensure that the seplist with the most items gets the lowest score. As the above examples indicate, it is often the case that all productions in a rule use exactly the same <score:...> directive. It is tedious to have to repeat this identical directive in every production, so Parse::RecDescent also provides the <autoscore:...> directive. If an <autoscore:...> directive appears in any production of a rule, the code it specifies is used as the scoring code for every production of that rule, except productions that already end with an explicit <score:...> directive. Thus the rules above could be rewritten: line: <autoscore: -@{$item[1]}> line: seplist[sep=>,] | seplist[sep=>:] | seplist[sep=>” “] sentence: <autoscore: sensible(@item)> | verb noun preposition article noun { [@item] } | adjective noun verb article noun { [@item] } | noun verb preposition article noun { [@item] } Note that the <autoscore:...> directive itself acts as an unconditional <reject>, and (like the <rulevar:...> directive) is pruned at compile-time wherever possible.

Dispensing with grammar checks
During the compilation phase of parser construction, Parse::RecDescent performs a small number of checks on the grammar it’s given. Specifically it checks that the grammar is not left-recursive, that there are no insatiable constructs of the form: rule: subrule(s) subrule and that there are no rules missing (i.e. referred to, but never defined). These checks are important during development, but can slow down parser construction in stable code. So Parse::RecDescent provides the <nocheck> directive to turn them off. The directive can only appear before the first rule definition, and switches off checking throughout the rest of the current grammar. Typically, this directive would be added when a parser has been thoroughly tested and is ready for release.

Subrule argument lists

It is occasionally useful to pass data to a subrule which is being invoked. For example, consider the following grammar fragment:

classdecl: keyword decl keyword: struct | class; decl: # WHATEVER

The decl rule might wish to know which of the two keywords was used (since it may affect some aspect of the way the subsequent declaration is interpreted). Parse::RecDescent allows the grammar designer to pass data into a rule, by placing that data in an argument list (that is, in square brackets) immediately after any subrule item in a production. Hence, we could pass the keyword to decl as follows:

classdecl: keyword decl[ $item[1] ] keyword: struct | class; decl: # WHATEVER

The argument list can consist of any number (including zero!) of comma-separated Perl expressions. In other words, it looks exactly like a Perl anonymous array reference. For example, we could pass the keyword, the name of the surrounding rule, and the literal ‘keyword’ to decl like so:

classdecl: keyword decl[$item[1],$item[0],keyword] keyword: struct | class; decl: # WHATEVER

Within the rule to which the data is passed (decl in the above examples) that data is available as the elements of a local variable @arg. Hence decl might report its intentions as follows:

classdecl: keyword decl[$item[1],$item[0],keyword] keyword: struct | class; decl: { print “Declaring $arg[0] (a $arg[2]) “; print “(this rule called by $arg[1])” }

Subrule argument lists can also be interpreted as hashes, simply by using the local variable %arg instead of @arg. Hence we could rewrite the previous example:

classdecl: keyword decl[keyword => $item[1], caller => $item[0], type => keyword] keyword: struct | class; decl: { print “Declaring $arg{keyword} (a $arg{type}) “; print “(this rule called by $arg{caller})” }

Both @arg and %arg are always available, so the grammar designer may choose whichever convention (or combination of conventions) suits best.

Subrule argument lists are also useful for creating rule templates (especially when used in conjunction with the <matchrule:...> directive). For example, the subrule:

list: <matchrule:$arg{rule}> /$arg{sep}/ list[%arg] { $return = [ $item[1], @{$item[3]} ] } | <matchrule:$arg{rule}> { $return = [ $item[1]] }

is a handy template for the common problem of matching a separated list. For example:

function: func name ( list[rule=>param,sep=>;] ) param: list[rule=>name,sep=>,] : typename name: /\w+/ typename: name

When a subrule argument list is used with a repeated subrule, the argument list goes before the repetition specifier:

list: /some|many/ thing[ $item[1] ](s)

The argument list is late bound. That is, it is re-evaluated for every repetition of the repeated subrule. This means that each repeated attempt to match the subrule may be passed a completely different set of arguments if the value of the expression in the argument list changes between attempts. So, for example, the grammar:

{ $::species = dogs } pair: two animal[$::species](s) animal: /$arg[0]/ { $::species = cats }

will match the string two dogs cats cats completely, whereas it will only match the string two dogs dogs dogs up to the eighth letter. If the value of the argument list were early bound (that is, evaluated only the first time a repeated subrule match is attempted), one would expect the matching behaviours to be reversed.

Of course, it is possible to effectively early bind such argument lists by passing them a value which does not change on each repetition. For example:

{ $::species = dogs } pair: two { $::species } animal[$item[2]](s) animal: /$arg[0]/ { $::species = cats }

Arguments can also be passed to the start rule, simply by appending them to the argument list with which the start rule is called (after the line number parameter). For example, given:

$parser = new Parse::RecDescent ( $grammar ); $parser->data($text, 1, “str”, 2, \arr); # ^^^^^ ^ ^^^^^^^^^^^^^^^ # | | | # TEXT TO BE PARSED | | # STARTING LINE NUMBER | # ELEMENTS OF @arg WHICH IS PASSED TO RULE data

then within the productions of the rule data, the array @arg will contain ("str", 2, \@arr).

Alternations

Alternations are implicit (unnamed) rules defined as part of a production. An alternation is defined as a series of ‘|’-separated productions inside a pair of round brackets. For example:

character: the ( good | bad | ugly ) /dude/

Every alternation implicitly defines a new subrule, whose automatically-generated name indicates its origin: _alternation_<I>_of_production_<P>_of_rule<R> for the appropriate values of <I>, <P>, and <R>. A call to this implicit subrule is then inserted in place of the brackets. Hence the above example is merely a convenient short-hand for:

character: the _alternation_1_of_production_1_of_rule_character /dude/ _alternation_1_of_production_1_of_rule_character: good | bad | ugly

Since alternations are parsed by recursively calling the parser generator, any type(s) of item can appear in an alternation. For example:

character: the ( high “plains” # Silent, with poncho | /no[- ]name/ # Silent, no poncho | vengeance_seeking # Poncho-optional | <error> ) drifter

In this case, if an error occurred, the automatically generated message would be:

ERROR (line <N>): Invalid implicit subrule: Expected high or /no[- ]name/ or generic, but found “pacifist” instead

Since every alternation actually has a name, it’s even possible to extend or replace them:

parser->Replace( “_alternation_1_of_production_1_of_rule_character: generic Eastwood” );

More importantly, since alternations are a form of subrule, they can be given repetition specifiers:

character: the ( good | bad | ugly )(?) /dude/

Incremental Parsing

Parse::RecDescent provides two methods - Extend and Replace - which can be used to alter the grammar matched by a parser. Both methods take the same argument as Parse::RecDescent::new, namely a grammar specification string

Parse::RecDescent::Extend interprets the grammar specification and adds any productions it finds to the end of the rules for which they are specified. For example:

$add = “name: Jimmy-Bob | Bobby-Jim desc: colour /necks?/”; parser->Extend($add);

adds two productions to the rule name (creating it if necessary) and one production to the rule desc.

Parse::RecDescent::Replace is identical, except that it first resets are rule specified in the additional grammar, removing any existing productions. Hence after:

$add = “name: Jimmy-Bob | Bobby-Jim desc: colour /necks?/”; parser->Replace($add);

there are only valid names and the one possible description.

A more interesting use of the Extend and Replace methods is to call them inside the action of an executing parser. For example:

typedef: typedef type_name identifier ; { $thisparser->Extend(“type_name: $item[3]”) } | <error> identifier: …!type_name /[A-Za-z_]w*/

which automatically prevents type names from being typedef’d, or:

command: map key_name to abort_key { $thisparser->Replace(“abort_key: $item[2]”) } | map key_name to key_name { map_key($item[2],$item[4]) } | abort_key { exit if confirm(“abort?”) } abort_key: q key_name: …!abort_key /[A-Za-z]/

which allows the user to change the abort key binding, but not to unbind it.

The careful use of such constructs makes it possible to reconfigure a a running parser, eliminating the need for semantic feedback by providing syntactic feedback instead. However, as currently implemented, Replace() and Extend() have to regenerate and re-eval the entire parser whenever they are called. This makes them quite slow for large grammars.

In such cases, the judicious use of an interpolated regex is likely to be far more efficient:

typedef: typedef type_name/ identifier ; { $thisparser->{local}{type_name} .= “|$item[3]” } | <error> identifier: …!type_name /[A-Za-z_]w*/ type_name: /$thisparser->{local}{type_name}/

Precompiling parsers

Normally Parse::RecDescent builds a parser from a grammar at run-time. That approach simplifies the design and implementation of parsing code, but has the disadvantage that it slows the parsing process down - you have to wait for Parse::RecDescent to build the parser every time the program runs. Long or complex grammars can be particularly slow to build, leading to unacceptable delays at start-up.

To overcome this, the module provides a way of pre-building a parser object and saving it in a separate module. That module can then be used to create clones of the original parser.

A grammar may be precompiled using the Precompile class method. For example, to precompile a grammar stored in the scalar $grammar, and produce a class named PreGrammar in a module file named PreGrammar.pm, you could use:

use Parse::RecDescent; Parse::RecDescent->Precompile([$options_hashref], $grammar, “PreGrammar”, [“RuntimeClass”]);

The first required argument is the grammar string, the second is the name of the class to be built. The name of the module file is generated automatically by appending .pm to the last element of the class name. Thus

Parse::RecDescent->Precompile($grammar, “My::New::Parser”);

would produce a module file named Parser.pm.

After the class name, you may specify the name of the runtime_class called by the Precompiled parser. See Precompiled runtimes for more details.

An optional hash reference may be supplied as the first argument to Precompile. This argument is currently EXPERIMENTAL, and may change in a future release of Parse::RecDescent. The only supported option is currently -standalone, see Standalone precompiled parsers.

It is somewhat tedious to have to write a small Perl program just to generate a precompiled grammar class, so Parse::RecDescent has some special magic that allows you to do the job directly from the command-line.

If your grammar is specified in a file named grammar, you can generate a class named Yet::Another::Grammar like so:

> perl -MParse::RecDescent - grammar Yet::Another::Grammar [Runtime::Class]

This would produce a file named Grammar.pm containing the full definition of a class called Yet::Another::Grammar. Of course, to use that class, you would need to put the Grammar.pm file in a directory named Yet/Another, somewhere in your Perl include path.

Having created the new class, it’s very easy to use it to build a parser. You simply use the new module, and then call its new method to create a parser object. For example:

use Yet::Another::Grammar; my $parser = Yet::Another::Grammar->new();

The effect of these two lines is exactly the same as:

use Parse::RecDescent; open GRAMMAR_FILE, “grammar” or die; local $/; my $grammar = <GRAMMAR_FILE>; my $parser = Parse::RecDescent->new($grammar);

only considerably faster.

Note however that the parsers produced by either approach are exactly the same, so whilst precompilation has an effect on set-up speed, it has no effect on parsing speed. RecDescent 2.0 will address that problem.

Standalone precompiled parsers

Until version 1.967003 of Parse::RecDescent, parser modules built with Precompile were dependent on Parse::RecDescent. Future Parse::RecDescent releases with different internal implementations would break pre-existing precompiled parsers.

Version 1.967_005 added the ability for Parse::RecDescent to include itself in the resulting .pm file if you pass the boolean option -standalone to Precompile:

Parse::RecDescent->Precompile({ -standalone => 1, }, $grammar, “My::New::Parser”);

Parse::RecDescent is included as $class::_Runtime in order to avoid conflicts between an installed version of Parse::RecDescent and other precompiled, standalone parser made with Parse::RecDescent. The name of this class may be changed with the -runtime_class option to Precompile. This renaming is experimental, and is subject to change in future versions.

Precompiled parsers remain dependent on Parse::RecDescent by default, as this feature is still considered experimental. In the future, standalone parsers will become the default.

Precompiled runtimes

Standalone precompiled parsers each include a copy of Parse::RecDescent. For users who have a family of related precompiled parsers, this is very inefficient. Precompile now supports an experimental -runtime_class option. To build a precompiled parser with a different runtime name, call:

Parse::RecDescent->Precompile({ -standalone => 1, -runtime_class => “My::Runtime”, }, $grammar, “My::New::Parser”);

The resulting standalone parser will contain a copy of Parse::RecDescent, renamed to My::Runtime.

To build a set of parsers that use a custom-named runtime, without including that runtime in the output, simply build those parsers with -runtime_class and without -standalone:

Parse::RecDescent->Precompile({ -runtime_class => “My::Runtime”, }, $grammar, “My::New::Parser”);

The runtime itself must be generated as well, so that it may be used by My::New::Parser. To generate the runtime file, use one of the two folling calls:

Parse::RecDescent->PrecompiledRuntime(“My::Runtime”); Parse::RecDescent->Precompile({ -standalone => 1, -runtime_class => “My::Runtime”, }, , # empty grammar “My::Runtime”);

GOTCHAS

This section describes common mistakes that grammar writers seem to make on a regular basis.

1. Expecting an error to always invalidate a parse

A common mistake when using error messages is to write the grammar like this:

file: line(s) line: line_type_1 | line_type_2 | line_type_3 | <error>

The expectation seems to be that any line that is not of type 1, 2 or 3 will invoke the <error> directive and thereby cause the parse to fail.

Unfortunately, that only happens if the error occurs in the very first line. The first rule states that a file is matched by one or more lines, so if even a single line succeeds, the first rule is completely satisfied and the parse as a whole succeeds. That means that any error messages generated by subsequent failures in the line rule are quietly ignored.

Typically what’s really needed is this:

file: line(s) eofile { $return = $item[1] } line: line_type_1 | line_type_2 | line_type_3 | <error> eofile: /^\Z/

The addition of the eofile subrule to the first production means that a file only matches a series of successful line matches that consume the complete input text. If any input text remains after the lines are matched, there must have been an error in the last line. In that case the eofile rule will fail, causing the entire file rule to fail too.

Note too that eofile must match /^\Z/ (end-of-text), not `/^

1053 - Linux cli command putwc_unlocked

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command putwc_unlocked and provides detailed information about the command putwc_unlocked, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the putwc_unlocked.

NAME 🖥️ putwc_unlocked 🖥️

nonlocking stdio functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int getc_unlocked(FILE *stream);
int getchar_unlocked(void);
int putc_unlocked(int c, FILE *stream);
int putchar_unlocked(int c);
void clearerr_unlocked(FILE *stream);
int feof_unlocked(FILE *stream);
int ferror_unlocked(FILE *stream);
int fileno_unlocked(FILE *stream);
int fflush_unlocked(FILE *_Nullable stream);
int fgetc_unlocked(FILE *stream);
int fputc_unlocked(int c, FILE *stream);
size_t fread_unlocked(void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
size_t fwrite_unlocked(const void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
char *fgets_unlocked(char s[restrict .n], int n",FILE*restrict"stream);
int fputs_unlocked(const char *restrict s, FILE *restrict stream);
#include <wchar.h>
wint_t getwc_unlocked(FILE *stream);
wint_t getwchar_unlocked(void);
wint_t fgetwc_unlocked(FILE *stream);
wint_t fputwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwchar_unlocked(wchar_t wc);
wchar_t *fgetws_unlocked(wchar_t ws[restrict .n], int n,
 FILE *restrict stream);
int fputws_unlocked(const wchar_t *restrict ws,
 FILE *restrict stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getc_unlocked(), getchar_unlocked(), putc_unlocked(), putchar_unlocked():

    /* glibc >= 2.24: */ _POSIX_C_SOURCE >= 199309L
        || /* glibc <= 2.23: */ _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

clearerr_unlocked(), feof_unlocked(), ferror_unlocked(), fileno_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), getwchar_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwchar_unlocked(), fgetws_unlocked(), fputws_unlocked():

    _GNU_SOURCE

DESCRIPTION

Each of these functions has the same behavior as its counterpart without the “_unlocked” suffix, except that they do not use locking (they do not set locks themselves, and do not test for the presence of locks set by others) and hence are thread-unsafe. See flockfile(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getc_unlocked(), putc_unlocked(), clearerr_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked(), fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwc_unlocked(), fgetws_unlocked(), fputws_unlocked()

Thread safety

MT-Safe race:stream

getchar_unlocked(), getwchar_unlocked()

Thread safety

MT-Unsafe race:stdin

putchar_unlocked(), putwchar_unlocked()

Thread safety

MT-Unsafe race:stdout

feof_unlocked(), ferror_unlocked(), fileno_unlocked()

Thread safetyMT-Safe

STANDARDS

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2008.

Others:
None.

HISTORY

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2001.

SEE ALSO

flockfile(3), stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1054 - Linux cli command Image_ExifTool_Qualcommpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Qualcommpm and provides detailed information about the command Image_ExifTool_Qualcommpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Qualcommpm.

NAME 🖥️ Image_ExifTool_Qualcommpm 🖥️

Read Qualcomm APP7 meta information

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to read information from the APP7 Qualcomm segment in JPEG images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

“Qualcomm Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1055 - Linux cli command putspent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command putspent and provides detailed information about the command putspent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the putspent.

NAME 🖥️ putspent 🖥️

get shadow password file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

/* General shadow password file API */
#include <shadow.h>
struct spwd *getspnam(const char *name);
struct spwd *getspent(void);
void setspent(void);
void endspent(void);
struct spwd *fgetspent(FILE *stream);
struct spwd *sgetspent(const char *s);
int putspent(const struct spwd *p, FILE *stream);
int lckpwdf(void);
int ulckpwdf(void);
/* GNU extension */
#include <shadow.h>
int getspent_r(struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int getspnam_r(const char *name, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int fgetspent_r(FILE *stream, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int sgetspent_r(const char *s, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getspent_r(), getspnam_r(), fgetspent_r(), sgetspent_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

Long ago it was considered safe to have encrypted passwords openly visible in the password file. When computers got faster and people got more security-conscious, this was no longer acceptable. Julianne Frances Haugh implemented the shadow password suite that keeps the encrypted passwords in the shadow password database (e.g., the local shadow password file /etc/shadow, NIS, and LDAP), readable only by root.

The functions described below resemble those for the traditional password database (e.g., see getpwnam(3) and getpwent(3)).

The getspnam() function returns a pointer to a structure containing the broken-out fields of the record in the shadow password database that matches the username name.

The getspent() function returns a pointer to the next entry in the shadow password database. The position in the input stream is initialized by setspent(). When done reading, the program may call endspent() so that resources can be deallocated.

The fgetspent() function is similar to getspent() but uses the supplied stream instead of the one implicitly opened by setspent().

The sgetspent() function parses the supplied string s into a struct spwd.

The putspent() function writes the contents of the supplied struct spwd *p as a text line in the shadow password file format to stream. String entries with value NULL and numerical entries with value -1 are written as an empty string.

The lckpwdf() function is intended to protect against multiple simultaneous accesses of the shadow password database. It tries to acquire a lock, and returns 0 on success, or -1 on failure (lock not obtained within 15 seconds). The ulckpwdf() function releases the lock again. Note that there is no protection against direct access of the shadow password file. Only programs that use lckpwdf() will notice the lock.

These were the functions that formed the original shadow API. They are widely available.

Reentrant versions

Analogous to the reentrant functions for the password database, glibc also has reentrant functions for the shadow password database. The getspnam_r() function is like getspnam() but stores the retrieved shadow password structure in the space pointed to by spbuf. This shadow password structure contains pointers to strings, and these strings are stored in the buffer buf of size buflen. A pointer to the result (in case of success) or NULL (in case no entry was found or an error occurred) is stored in *spbufp.

The functions getspent_r(), fgetspent_r(), and sgetspent_r() are similarly analogous to their nonreentrant counterparts.

Some non-glibc systems also have functions with these names, often with different prototypes.

Structure

The shadow password structure is defined in <shadow.h> as follows:

struct spwd {
    char *sp_namp;     /* Login name */
    char *sp_pwdp;     /* Encrypted password */
    long  sp_lstchg;   /* Date of last change
                          (measured in days since
                          1970-01-01 00:00:00 +0000 (UTC)) */
    long  sp_min;      /* Min # of days between changes */
    long  sp_max;      /* Max # of days between changes */
    long  sp_warn;     /* # of days before password expires
                          to warn user to change it */
    long  sp_inact;    /* # of days after password expires
                          until account is disabled */
    long  sp_expire;   /* Date when account expires
                          (measured in days since
                          1970-01-01 00:00:00 +0000 (UTC)) */
    unsigned long sp_flag;  /* Reserved */
};

RETURN VALUE

The functions that return a pointer return NULL if no more entries are available or if an error occurs during processing. The functions which have int as the return value return 0 for success and -1 for failure, with errno set to indicate the error.

For the nonreentrant functions, the return value may point to static area, and may be overwritten by subsequent calls to these functions.

The reentrant functions return zero on success. In case of error, an error number is returned.

ERRORS

EACCES
The caller does not have permission to access the shadow password file.

ERANGE
Supplied buffer is too small.

FILES

/etc/shadow
local shadow password database file

/etc/.pwd.lock
lock file

The include file <paths.h> defines the constant _PATH_SHADOW to the pathname of the shadow password file.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getspnam()

Thread safety

MT-Unsafe race:getspnam locale

getspent()

Thread safety

MT-Unsafe race:getspent race:spentbuf locale

setspent(), endspent(), getspent_r()

Thread safety

MT-Unsafe race:getspent locale

fgetspent()

Thread safety

MT-Unsafe race:fgetspent

sgetspent()

Thread safety

MT-Unsafe race:sgetspent

putspent(), getspnam_r(), sgetspent_r()

Thread safety

MT-Safe locale

lckpwdf(), ulckpwdf(), fgetspent_r()

Thread safety

MT-Safe

In the above table, getspent in race:getspent signifies that if any of the functions setspent(), getspent(), getspent_r(), or endspent() are used in parallel in different threads of a program, then data races could occur.

VERSIONS

Many other systems provide a similar API.

STANDARDS

None.

SEE ALSO

getgrnam(3), getpwnam(3), getpwnam_r(3), shadow(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1056 - Linux cli command Tk_Animationpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Animationpm and provides detailed information about the command Tk_Animationpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Animationpm.

NAME 🖥️ Tk_Animationpm 🖥️

Display sequence of Tk::Photo images

SYNOPSIS

use Tk::Animation my $img = $widget->Animation(-format => gif, -file => somefile.gif); $img->add_frame(@images); $img->start_animation; $img->start_animation( $period ); $img->next_image; $img->prev_image; $img->set_image( 0 .. $#frames ); $img->pause_animation; $img->resume_animation( $period ); $img->fast_forward( $multiplier ); $img->fast_reverse( $multiplier ); $img->stop_animation; $img->set_disposal_method( $boolean );

DESCRIPTION

In the simple case when Animation is passed a GIF89 style GIF with multiple ‘frames’, it will build an internal array of Photo images.

The add_frame method adds images to the sequence. It is provided to allow animations to be constructed from separate images. All images must be Photos and should all be the same size.

start_animation($period) then initiates a repeat with specified $period to sequence through these images. As for raw repeat $period is in milliseconds, for a 50Hz monitor it should be at least 20ms. If $period is omitted it is determined from the GIF metadata (see below), or if this is not possible it defaults to 100 milliseconds.

stop_animation cancels the repeat and resets the image to the first image in the sequence.

For fine-grained control next_image and prev_image move one frame forward or backward. set_image randomly positions the animation to a particular frame.

pause_animation pauses the movie and resume_animation continues from the pause point.

fast_forward and fast_reverse speed through the movie either forwards or backwards. $multiplier specifies how much faster the animation moves.

If Image::Info is installed, then the repeat period time and disposal method of GIF animations are determined from the GIF metadata directly. Otherwise the disposal method must be set manually by using set_disposal_method (1 for blanking the previous images, 0 for leaving the previous images as is). The repeat period time may be given in the start_animation method.

NOTES

set_disposal_method was formerly known as blank method, but the naming of this method was a mistake.

If the disposal method is not set correctly, either by set_disposal_method or by determining from the GIF metadata, then the following may happen: By default Animation leaves the previous movie frame in the animation photo. Many times overlaying subsequent frames produces a composite that looks blurred.

BUGS

This module should not depend on a module which is not declared as a dependency (Image::Info).

The delays between images may vary in a GIF animation. This cannot be handled by this module yet.

The handling of the various disposal methods is not correct.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1057 - Linux cli command XtCreateManagedWidget

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtCreateManagedWidget and provides detailed information about the command XtCreateManagedWidget, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtCreateManagedWidget.

NAME 🖥️ XtCreateManagedWidget 🖥️

create and destroy widgets

SYNTAX

#include <X11/Intrinsic.h>

Widget XtCreateWidget(const char *name, WidgetClass widget_class, Widget parent, ArgList args, Cardinal num_args);

Widget XtVaCreateWidget(const char *name, WidgetClass widget_class, Widget parent, … );

Widget XtCreateManagedWidget(const char *name, WidgetClass widget_class, Widget parent, ArgList args, Cardinal num_args);

Widget XtVaCreateManagedWidget(const char *name, WidgetClass widget_class, Widget parent, … );

void XtDestroyWidget(Widget w);

ARGUMENTS

args
Specifies the argument list to override the resource defaults.

name
Specifies the resource name for the created widget, which is used for retrieving resources and, for that reason, should not be the same as any other widget that is a child of same parent.

num_args
Specifies the number of arguments in the argument list.

parent
Specifies the parent widget.

  1. Specifies the widget.

widget_class
Specifies the widget class pointer for the created widget.


Specifies the variable argument list to override the resource defaults.

DESCRIPTION

The XtCreateWidget function performs much of the boilerplate operations of widget creation:

  • Checks to see if the class_initialize procedure has been called for this class and for all superclasses and, if not, calls those necessary in a superclass-to-subclass order.

  • Allocates memory for the widget instance.

  • If the parent is a subclass of constraintWidgetClass, it allocates memory for the parent’s constraints and stores the address of this memory into the constraints field.

  • Initializes the core nonresource data fields (for example, parent and visible).

  • Initializes the resource fields (for example, background_pixel) by using the resource lists specified for this class and all superclasses.

  • If the parent is a subclass of constraintWidgetClass, it initializes the resource fields of the constraints record by using the constraint resource list specified for the parent’s class and all superclasses up to constraintWidgetClass.

  • Calls the initialize procedures for the widget by starting at the Core initialize procedure on down to the widget’s initialize procedure.

  • If the parent is a subclass of compositeWidgetClass, it puts the widget into its parent’s children list by calling its parent’s insert_child procedure. For further information, see Section 3.5.

  • If the parent is a subclass of constraintWidgetClass, it calls the constraint initialize procedures, starting at constraintWidgetClass on down to the parent’s constraint initialize procedure.

Note that you can determine the number of arguments in an argument list by using the XtNumber macro. For further information, see Section 11.1.

The XtCreateManagedWidget function is a convenience routine that calls XtCreateWidget and XtManageChild.

The XtDestroyWidget function provides the only method of destroying a widget, including widgets that need to destroy themselves. It can be called at any time, including from an application callback routine of the widget being destroyed. This requires a two-phase destroy process in order to avoid dangling references to destroyed widgets.

In phase one, XtDestroyWidget performs the following:

  • If the being_destroyed field of the widget is True, it returns immediately.

  • Recursively descends the widget tree and sets the being_destroyed field to True for the widget and all children.

  • Adds the widget to a list of widgets (the destroy list) that should be destroyed when it is safe to do so.

Entries on the destroy list satisfy the invariant that if w2 occurs after w1 on the destroy list then w2 is not a descendent of w1. (A descendant refers to both normal and pop-up children.)

Phase two occurs when all procedures that should execute as a result of the current event have been called (including all procedures registered with the event and translation managers), that is, when the current invocation of XtDispatchEvent is about to return or immediately if not in XtDispatchEvent.

In phase two, XtDestroyWidget performs the following on each entry in the destroy list:

  • Calls the destroy callback procedures registered on the widget (and all descendants) in post-order (it calls children callbacks before parent callbacks).

  • If the widget’s parent is a subclass of compositeWidgetClass and if the parent is not being destroyed, it calls XtUnmanageChild on the widget and then calls the widget’s parent’s delete_child procedure (see Section 3.4).

  • If the widget’s parent is a subclass of constraintWidgetClass, it calls the constraint destroy procedure for the parent, then the parent’s superclass, until finally it calls the constraint destroy procedure for constraintWidgetClass.

  • Calls the destroy methods for the widget (and all descendants) in post-order. For each such widget, it calls the destroy procedure declared in the widget class, then the destroy procedure declared in its superclass, until finally it calls the destroy procedure declared in the Core class record.

  • Calls XDestroyWindow if the widget is realized (that is, has an X window). The server recursively destroys all descendant windows.

  • Recursively descends the tree and deallocates all pop-up widgets, constraint records, callback lists and, if the widget is a subclass of compositeWidgetClass, children.

SEE ALSO

XtAppCreateShell(3), XtCreatePopupShell(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1058 - Linux cli command Image_ExifTool_Sonypm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Sonypm and provides detailed information about the command Image_ExifTool_Sonypm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Sonypm.

NAME 🖥️ Image_ExifTool_Sonypm 🖥️

Sony EXIF maker notes tags

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret Sony maker notes EXIF meta information.

NOTES

Also see Minolta.pm since Sony DSLR models use structures originating from Minolta.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.cybercom.net/~dcoffin/dcraw/>

<http://homepage3.nifty.com/kamisaka/makernote/makernote_sony.htm>

<http://www.klingebiel.com/tempest/hd/pmp.html>

(…plus lots of testing with my RX100!)

ACKNOWLEDGEMENTS

Thanks to Thomas Bodenmann, Philippe Devaux, Jens Duttke, Marcus Holland-Moritz, Andrey Tverdokhleb, Rudiger Lange, Igal Milchtaich, Michael Reitinger and Jos Roost for help decoding some tags.

SEE ALSO

“Sony Tags” in Image::ExifTool::TagNames, “Minolta Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1059 - Linux cli command pcap_tstamp_type_val_to_namepcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_tstamp_type_val_to_namepcap and provides detailed information about the command pcap_tstamp_type_val_to_namepcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_tstamp_type_val_to_namepcap.

NAME 🖥️ pcap_tstamp_type_val_to_namepcap 🖥️

get a name or description for a time stamp type value

SYNOPSIS

#include <pcap.h>
const char *pcap_tstamp_type_val_to_name(int tstamp_type);
const char *pcap_tstamp_type_val_to_description(int tstamp_type);

DESCRIPTION

pcap_tstamp_type_val_to_name() translates a time stamp type value to the corresponding time stamp type name. NULL is returned on failure.

pcap_tstamp_type_val_to_description() translates a time stamp type value to a short description of that time stamp type. NULL is returned on failure.

BACKWARD COMPATIBILITY

These functions became available in libpcap release 1.2.1.

SEE ALSO

pcap(3PCAP), pcap_tstamp_type_name_to_val(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1060 - Linux cli command tanl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tanl and provides detailed information about the command tanl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tanl.

NAME 🖥️ tanl 🖥️

tangent function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double tan(double x);
float tanf(float x);
long double tanl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

tanf(), tanl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the tangent of x, where x is given in radians.

RETURN VALUE

On success, these functions return the tangent of x.

If x is a NaN, a NaN is returned.

If x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned.

If the correct result would overflow, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the mathematically correct sign.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is an infinity
errno is set to EDOM (but see BUGS). An invalid floating-point exception (FE_INVALID) is raised.

Range error: result overflow
An overflow floating-point exception (FE_OVERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tan(), tanf(), tanl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

BUGS

Before glibc 2.10, the glibc implementation did not set errno to EDOM when a domain error occurred.

SEE ALSO

acos(3), asin(3), atan(3), atan2(3), cos(3), ctan(3), sin(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1061 - Linux cli command getc_unlocked

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getc_unlocked and provides detailed information about the command getc_unlocked, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getc_unlocked.

NAME 🖥️ getc_unlocked 🖥️

nonlocking stdio functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int getc_unlocked(FILE *stream);
int getchar_unlocked(void);
int putc_unlocked(int c, FILE *stream);
int putchar_unlocked(int c);
void clearerr_unlocked(FILE *stream);
int feof_unlocked(FILE *stream);
int ferror_unlocked(FILE *stream);
int fileno_unlocked(FILE *stream);
int fflush_unlocked(FILE *_Nullable stream);
int fgetc_unlocked(FILE *stream);
int fputc_unlocked(int c, FILE *stream);
size_t fread_unlocked(void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
size_t fwrite_unlocked(const void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
char *fgets_unlocked(char s[restrict .n], int n",FILE*restrict"stream);
int fputs_unlocked(const char *restrict s, FILE *restrict stream);
#include <wchar.h>
wint_t getwc_unlocked(FILE *stream);
wint_t getwchar_unlocked(void);
wint_t fgetwc_unlocked(FILE *stream);
wint_t fputwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwchar_unlocked(wchar_t wc);
wchar_t *fgetws_unlocked(wchar_t ws[restrict .n], int n,
 FILE *restrict stream);
int fputws_unlocked(const wchar_t *restrict ws,
 FILE *restrict stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getc_unlocked(), getchar_unlocked(), putc_unlocked(), putchar_unlocked():

    /* glibc >= 2.24: */ _POSIX_C_SOURCE >= 199309L
        || /* glibc <= 2.23: */ _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

clearerr_unlocked(), feof_unlocked(), ferror_unlocked(), fileno_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), getwchar_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwchar_unlocked(), fgetws_unlocked(), fputws_unlocked():

    _GNU_SOURCE

DESCRIPTION

Each of these functions has the same behavior as its counterpart without the “_unlocked” suffix, except that they do not use locking (they do not set locks themselves, and do not test for the presence of locks set by others) and hence are thread-unsafe. See flockfile(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getc_unlocked(), putc_unlocked(), clearerr_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked(), fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwc_unlocked(), fgetws_unlocked(), fputws_unlocked()

Thread safety

MT-Safe race:stream

getchar_unlocked(), getwchar_unlocked()

Thread safety

MT-Unsafe race:stdin

putchar_unlocked(), putwchar_unlocked()

Thread safety

MT-Unsafe race:stdout

feof_unlocked(), ferror_unlocked(), fileno_unlocked()

Thread safetyMT-Safe

STANDARDS

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2008.

Others:
None.

HISTORY

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2001.

SEE ALSO

flockfile(3), stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1062 - Linux cli command tcgetsid

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tcgetsid and provides detailed information about the command tcgetsid, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tcgetsid.

NAME 🖥️ tcgetsid 🖥️

get session ID

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _XOPEN_SOURCE 500 /* See feature_test_macros(7) */
#include <termios.h>
pid_t tcgetsid(int fd);

DESCRIPTION

The function tcgetsid() returns the session ID of the current session that has the terminal associated to fd as controlling terminal. This terminal must be the controlling terminal of the calling process.

RETURN VALUE

When fd refers to the controlling terminal of our session, the function tcgetsid() will return the session ID of this session. Otherwise, -1 is returned, and errno is set to indicate the error.

ERRORS

EBADF
fd is not a valid file descriptor.

ENOTTY
The calling process does not have a controlling terminal, or it has one but it is not described by fd.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tcgetsid()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.1. POSIX.1-2001.

This function is implemented via the TIOCGSID ioctl(2), present since Linux 2.1.71.

SEE ALSO

getsid(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1063 - Linux cli command xdr_union

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_union and provides detailed information about the command xdr_union, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_union.

NAME 🖥️ xdr_union 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1064 - Linux cli command gethostbyname_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gethostbyname_r and provides detailed information about the command gethostbyname_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gethostbyname_r.

NAME 🖥️ gethostbyname_r 🖥️

get network host entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
void sethostent(int stayopen);
void endhostent(void);
[[deprecated]] extern int h_errno;
[[deprecated]] struct hostent *gethostbyname(const char *name);
[[deprecated]] struct hostent *gethostbyaddr(const void addr[.len],
 socklen_t len, int type);
[[deprecated]] void herror(const char *s);
[[deprecated]] const char *hstrerror(int err);
/* System V/POSIX extension */
struct hostent *gethostent(void);
/* GNU extensions */
[[deprecated]]
struct hostent *gethostbyname2(const char *name, int af);
int gethostent_r(struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyaddr_r(const void addr[restrict .len], socklen_t len,
 int type,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyname_r(const char *restrict name,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyname2_r(const char *restrict name, int af,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

gethostbyname2(), gethostent_r(), gethostbyaddr_r(), gethostbyname_r(), gethostbyname2_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc up to and including 2.19:
        _BSD_SOURCE || _SVID_SOURCE

herror(), hstrerror():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.8 to glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE
    Before glibc 2.8:
        none

h_errno:

    Since glibc 2.19
        _DEFAULT_SOURCE || _POSIX_C_SOURCE < 200809L
    glibc 2.12 to glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE || _POSIX_C_SOURCE < 200809L
    Before glibc 2.12:
        none

DESCRIPTION

The gethostbyname*(), gethostbyaddr*(), herror(), and hstrerror() functions are obsolete. Applications should use getaddrinfo(3), getnameinfo(3), and gai_strerror(3) instead.

The sethostent() function specifies, if stayopen is true (1), that a connected TCP socket should be used for the name server queries and that the connection should remain open during successive queries. Otherwise, name server queries will use UDP datagrams.

The endhostent() function ends the use of a TCP connection for name server queries.

The gethostbyname() function returns a structure of type hostent for the given host name. Here name is either a hostname or an IPv4 address in standard dot notation (as for inet_addr(3)). If name is an IPv4 address, no lookup is performed and gethostbyname() simply copies name into the h_name field and its struct in_addr equivalent into the h_addr_list[0] field of the returned hostent structure. If name doesn’t end in a dot and the environment variable HOSTALIASES is set, the alias file pointed to by HOSTALIASES will first be searched for name (see hostname(7) for the file format). The current domain and its parents are searched unless name ends in a dot.

The gethostbyaddr() function returns a structure of type hostent for the given host address addr of length len and address type type. Valid address types are AF_INET and AF_INET6 (defined in <sys/socket.h>). The host address argument is a pointer to a struct of a type depending on the address type, for example a struct in_addr * (probably obtained via a call to inet_addr(3)) for address type AF_INET.

The (obsolete) herror() function prints the error message associated with the current value of h_errno on stderr.

The (obsolete) hstrerror() function takes an error number (typically h_errno) and returns the corresponding message string.

The domain name queries carried out by gethostbyname() and gethostbyaddr() rely on the Name Service Switch (nsswitch.conf(5)) configured sources or a local name server (named(8)). The default action is to query the Name Service Switch (nsswitch.conf(5)) configured sources, failing that, a local name server (named(8)).

Historical

The nsswitch.conf(5) file is the modern way of controlling the order of host lookups.

In glibc 2.4 and earlier, the order keyword was used to control the order of host lookups as defined in /etc/host.conf (host.conf(5)).

The hostent structure is defined in <netdb.h> as follows:

struct hostent {
    char  *h_name;            /* official name of host */
    char **h_aliases;         /* alias list */
    int    h_addrtype;        /* host address type */
    int    h_length;          /* length of address */
    char **h_addr_list;       /* list of addresses */
}
#define h_addr h_addr_list[0] /* for backward compatibility */

The members of the hostent structure are:

h_name
The official name of the host.

h_aliases
An array of alternative names for the host, terminated by a null pointer.

h_addrtype
The type of address; always AF_INET or AF_INET6 at present.

h_length
The length of the address in bytes.

h_addr_list
An array of pointers to network addresses for the host (in network byte order), terminated by a null pointer.

h_addr
The first address in h_addr_list for backward compatibility.

RETURN VALUE

The gethostbyname() and gethostbyaddr() functions return the hostent structure or a null pointer if an error occurs. On error, the h_errno variable holds an error number. When non-NULL, the return value may point at static data, see the notes below.

ERRORS

The variable h_errno can have the following values:

HOST_NOT_FOUND
The specified host is unknown.

NO_DATA
The requested name is valid but does not have an IP address. Another type of request to the name server for this domain may return an answer. The constant NO_ADDRESS is a synonym for NO_DATA.

NO_RECOVERY
A nonrecoverable name server error occurred.

TRY_AGAIN
A temporary error occurred on an authoritative name server. Try again later.

FILES

/etc/host.conf
resolver configuration file

/etc/hosts
host database file

/etc/nsswitch.conf
name service switch configuration

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

gethostbyname()

Thread safety

MT-Unsafe race:hostbyname env locale

gethostbyaddr()

Thread safety

MT-Unsafe race:hostbyaddr env locale

sethostent(), endhostent(), gethostent_r()

Thread safety

MT-Unsafe race:hostent env locale

herror(), hstrerror()

Thread safetyMT-Safe

gethostent()

Thread safety

MT-Unsafe race:hostent race:hostentbuf env locale

gethostbyname2()

Thread safety

MT-Unsafe race:hostbyname2 env locale

gethostbyaddr_r(), gethostbyname_r(), gethostbyname2_r()

Thread safetyMT-Safe env locale

In the above table, hostent in race:hostent signifies that if any of the functions sethostent(), gethostent(), gethostent_r(), or endhostent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

sethostent()
endhostent()
gethostent()
POSIX.1-2008.

gethostent_r()
GNU.

Others:
None.

HISTORY

sethostent()
endhostent()
gethostent()
POSIX.1-2001.

gethostbyname()
gethostbyaddr()
h_errno
Marked obsolescent in POSIX.1-2001. Removed in POSIX.1-2008, recommending the use of getaddrinfo(3) and getnameinfo(3) instead.

NOTES

The functions gethostbyname() and gethostbyaddr() may return pointers to static data, which may be overwritten by later calls. Copying the struct hostent does not suffice, since it contains pointers; a deep copy is required.

In the original BSD implementation the len argument of gethostbyname() was an int. The SUSv2 standard is buggy and declares the len argument of gethostbyaddr() to be of type size_t. (That is wrong, because it has to be int, and size_t is not. POSIX.1-2001 makes it socklen_t, which is OK.) See also accept(2).

The BSD prototype for gethostbyaddr() uses const char * for the first argument.

System V/POSIX extension

POSIX requires the gethostent() call, which should return the next entry in the host data base. When using DNS/BIND this does not make much sense, but it may be reasonable if the host data base is a file that can be read line by line. On many systems, a routine of this name reads from the file /etc/hosts. It may be available only when the library was built without DNS support. The glibc version will ignore ipv6 entries. This function is not reentrant, and glibc adds a reentrant version gethostent_r().

GNU extensions

glibc2 also has a gethostbyname2() that works like gethostbyname(), but permits to specify the address family to which the address must belong.

glibc2 also has reentrant versions gethostent_r(), gethostbyaddr_r(), gethostbyname_r(), and gethostbyname2_r(). The caller supplies a hostent structure ret which will be filled in on success, and a temporary work buffer buf of size buflen. After the call, result will point to the result on success. In case of an error or if no entry is found result will be NULL. The functions return 0 on success and a nonzero error number on failure. In addition to the errors returned by the nonreentrant versions of these functions, if buf is too small, the functions will return ERANGE, and the call should be retried with a larger buffer. The global variable h_errno is not modified, but the address of a variable in which to store error numbers is passed in h_errnop.

BUGS

gethostbyname() does not recognize components of a dotted IPv4 address string that are expressed in hexadecimal.

SEE ALSO

getaddrinfo(3), getnameinfo(3), inet(3), inet_ntop(3), inet_pton(3), resolver(3), hosts(5), nsswitch.conf(5), hostname(7), named(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1065 - Linux cli command XtGetSubresources

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGetSubresources and provides detailed information about the command XtGetSubresources, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGetSubresources.

NAME 🖥️ XtGetSubresources 🖥️

obtain subresources

SYNTAX

#include <X11/Intrinsic.h>

void XtGetSubresources(Widget w, XtPointer base, const char *name, const char * class, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);

void XtVaGetSubresources(Widget w, XtPointer base, const char *name, const char *class, XtResourceList resources, Cardinal num_resources, …);

ARGUMENTS

args
Specifies the argument list to override resources obtained from the resource database.

base
Specifies the base address of the subpart data structure where the resources should be written.

class
Specifies the class of the subpart.

name
Specifies the name of the subpart.

num_args
Specifies the number of arguments in the argument list.

num_resources
Specifies the number of resources in the resource list.

resources
Specifies the resource list for the subpart.

  1. Specifies the widget that wants resources for a subpart or that identifies the resource database to search.


Specifies the variable arguments to override resources obtained from the resource database.

DESCRIPTION

The XtGetSubresources function constructs a name/class list from the application name/class, the name/classes of all its ancestors, and the widget itself. Then, it appends to this list the name/class pair passed in. The resources are fetched from the argument list, the resource database, or the default values in the resource list. Then, they are copied into the subpart record. If args is NULL, num_args must be zero. However, if num_args is zero, the argument list is not referenced.

SEE ALSO

XtGetApplicationResources, XtVaGetApplicationResources
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1066 - Linux cli command IO_Socket_SSL_Utilspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_Socket_SSL_Utilspm and provides detailed information about the command IO_Socket_SSL_Utilspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_Socket_SSL_Utilspm.

NAME 🖥️ IO_Socket_SSL_Utilspm 🖥️

  • loading, storing, creating certificates and keys

SYNOPSIS

use IO::Socket::SSL::Utils; $cert = PEM_file2cert(cert.pem); # load certificate from file my $hash = CERT_asHash($cert); # get details from certificate PEM_cert2file($cert,cert.pem); # write certificate to file CERT_free($cert); # free memory within OpenSSL @certs = PEM_file2certs(chain.pem); # load multiple certificates from file PEM_certs2file(chain.pem, @certs); # write multiple certificates to file CERT_free(@certs); # free memory for all within OpenSSL my $cert = PEM_string2cert($pem); # load certificate from PEM string $pem = PEM_cert2string($cert); # convert certificate to PEM string $key = KEY_create_rsa(2048); # create new 2048-bit RSA key PEM_key2file($key,“key.pem”); # and write it to file KEY_free($key); # free memory within OpenSSL

DESCRIPTION

This module provides various utility functions to work with certificates and private keys, shielding some of the complexity of the underlying Net::SSLeay and OpenSSL.

FUNCTIONS

  • Functions converting between string or file and certificates and keys. They croak if the operation cannot be completed.

    PEM_file2cert(file) -> cert

    PEM_cert2file(cert,file)

    PEM_file2certs(file) -> @certs

    PEM_certs2file(file,@certs)

    PEM_string2cert(string) -> cert

    PEM_cert2string(cert) -> string

    PEM_file2key(file) -> key

    PEM_key2file(key,file)

    PEM_string2key(string) -> key

    PEM_key2string(key) -> string

Functions for cleaning up. Each loaded or created cert and key must be freed to not leak memory.

CERT_free(@certs)

KEY_free(@keys)

KEY_create_rsa(bits) -> key Creates an RSA key pair, bits defaults to 2048.

  • KEY_create_ec(curve) -> key Creates an EC key, curve defaults to prime256v1.

  • CERT_asHash(cert,[digest_algo]) -> hash Extracts the information from the certificate into a hash and uses the given digest_algo (default: SHA-256) to determine digest of pubkey and cert. The resulting hash contains:

    subject
    Hash with the parts of the subject, e.g. commonName, countryName, organizationName, stateOrProvinceName, localityName. If there are multiple values for any of these parts the hash value will be an array ref with the values in order instead of just a scalar.

    subjectAltNames
    Array with list of alternative names. Each entry in the list is of [type,value], where type can be OTHERNAME, EMAIL, DNS, X400, DIRNAME, EDIPARTY, URI, IP or RID.

    issuer
    Hash with the parts of the issuer, e.g. commonName, countryName, organizationName, stateOrProvinceName, localityName. If there are multiple values for any of these parts the hash value will be an array ref with the values in order instead of just a scalar.

    not_before, not_after
    The time frame, where the certificate is valid, as time_t, e.g. can be converted with localtime or similar functions.

    serial
    The serial number

    crl_uri
    List of URIs for CRL distribution.

    ocsp_uri
    List of URIs for revocation checking using OCSP.

    keyusage
    List of keyUsage information in the certificate.

    extkeyusage
    List of extended key usage information from the certificate. Each entry in this list consists of a hash with oid, nid, ln and sn.

    pubkey_digest_xxx
    Binary digest of the pubkey using the given digest algorithm, e.g. pubkey_digest_sha256 if (the default) SHA-256 was used.

    x509_digest_xxx
    Binary digest of the X.509 certificate using the given digest algorithm, e.g. x509_digest_sha256 if (the default) SHA-256 was used.

    fingerprint_xxx
    Fingerprint of the certificate using the given digest algorithm, e.g. fingerprint_sha256 if (the default) SHA-256 was used. Contrary to digest_* this is an ASCII string with a list if hexadecimal numbers, e.g. “73:59:75:5C:6D…”.

    signature_alg
    Algorithm used to sign certificate, e.g. sha256WithRSAEncryption.

    ext
    List of extensions. Each entry in the list is a hash with oid, nid, sn, critical flag (boolean) and data (string representation given by X509V3_EXT_print).

    version
    Certificate version, usually 2 (x509v3)

  • CERT_create(hash) -> (cert,key) Creates a certificate based on the given hash. If the issuer is not specified the certificate will be self-signed. The following keys can be given:

    subject
    Hash with the parts of the subject, e.g. commonName, countryName, … as described in CERT_asHash. Default points to IO::Socket::SSL.

    not_before
    A time_t value when the certificate starts to be valid. Defaults to current time.

    not_after
    A time_t value when the certificate ends to be valid. Defaults to current time plus one 365 days.

    serial
    The serial number. If not given a random number will be used.

    version
    The version of the certificate, default 2 (x509v3).

    CA true|false
    If true declare certificate as CA, defaults to false.

    purpose string|array|hash
    Set the purpose of the certificate. The different purposes can be given as a string separated by non-word character, as array or hash. With string or array each purpose can be prefixed with ‘+’ (enable) or ‘-’ (disable) and same can be done with the value when given as a hash. By default enabling the purpose is assumed. If the CA option is given and true the defaults “ca,sslca,emailca,objca” are assumed, but can be overridden with explicit purpose. If the CA option is given and false the defaults “server,client” are assumed. If no CA option and no purpose is given it defaults to “server,client”. Purpose affects basicConstraints, keyUsage, extKeyUsage and netscapeCertType. The following purposes are defined (case is not important): client server email objsign CA sslCA emailCA objCA emailProtection codeSigning timeStamping digitalSignature nonRepudiation keyEncipherment dataEncipherment keyAgreement keyCertSign cRLSign encipherOnly decipherOnly Examples: # root-CA for SSL certificates purpose => sslCA # or CA => 1 # server certificate and CA (typically self-signed) purpose => sslCA,server # client certificate purpose => client,

    ext [{ sn => .., data => … }, … ]
    List of extensions. The type of the extension can be specified as name with sn or as NID with nid and the data with data. These data must be in the same syntax as expected within openssl.cnf, e.g. something like OCSP;URI=http://.... Additionally the critical flag can be set with critical = 1>.

    key key
    use given key as key for certificate, otherwise a new one will be generated and returned

    issuer_cert cert
    set issuer for new certificate

    issuer_key key
    sign new certificate with given key

    issuer [ cert, key ]
    Instead of giving issuer_key and issuer_cert as separate arguments they can be given both together.

    digest algorithm
    specify the algorithm used to sign the certificate, default SHA-256.

    ignore_invalid_args
    ignore any unknown arguments which might be in the argument list (which might be in the arguments for example as result from CERT_asHash)

AUTHOR

Steffen Ullrich

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1067 - Linux cli command sleep

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sleep and provides detailed information about the command sleep, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sleep.

NAME 🖥️ sleep 🖥️

sleep for a specified number of seconds

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
unsigned int sleep(unsigned int seconds);

DESCRIPTION

sleep() causes the calling thread to sleep either until the number of real-time seconds specified in seconds have elapsed or until a signal arrives which is not ignored.

RETURN VALUE

Zero if the requested time has elapsed, or the number of seconds left to sleep, if the call was interrupted by a signal handler.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sleep()

Thread safetyMT-Unsafe sig:SIGCHLD/linux

VERSIONS

On Linux, sleep() is implemented via nanosleep(2). See the nanosleep(2) man page for a discussion of the clock used.

On some systems, sleep() may be implemented using alarm(2) and SIGALRM (POSIX.1 permits this); mixing calls to alarm(2) and sleep() is a bad idea.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

CAVEATS

Using longjmp(3) from a signal handler or modifying the handling of SIGALRM while sleeping will cause undefined results.

SEE ALSO

sleep(1), alarm(2), nanosleep(2), signal(2), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1068 - Linux cli command termios

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command termios and provides detailed information about the command termios, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the termios.

NAME 🖥️ termios 🖥️

get and set terminal attributes, line control, get and set baud rate

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <termios.h>
#include <unistd.h>
int tcgetattr(int fd, struct termios *termios_p);
int tcsetattr(int fd, int optional_actions,
 const struct termios *termios_p);
int tcsendbreak(int fd, int duration);
int tcdrain(int fd);
int tcflush(int fd, int queue_selector);
int tcflow(int fd, int action);
void cfmakeraw(struct termios *termios_p);
speed_t cfgetispeed(const struct termios *termios_p);
speed_t cfgetospeed(const struct termios *termios_p);
int cfsetispeed(struct termios *termios_p, speed_t speed);
int cfsetospeed(struct termios *termios_p, speed_t speed);
int cfsetspeed(struct termios *termios_p, speed_t speed);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

cfsetspeed(), cfmakeraw():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The termios functions describe a general terminal interface that is provided to control asynchronous communications ports.

The termios structure

Many of the functions described here have a termios_p argument that is a pointer to a termios structure. This structure contains at least the following members:

tcflag_t c_iflag;      /* input modes */
tcflag_t c_oflag;      /* output modes */
tcflag_t c_cflag;      /* control modes */
tcflag_t c_lflag;      /* local modes */
cc_t     c_cc[NCCS];   /* special characters */

The values that may be assigned to these fields are described below. In the case of the first four bit-mask fields, the definitions of some of the associated flags that may be set are exposed only if a specific feature test macro (see feature_test_macros(7)) is defined, as noted in brackets ("[]").

In the descriptions below, “not in POSIX” means that the value is not specified in POSIX.1-2001, and “XSI” means that the value is specified in POSIX.1-2001 as part of the XSI extension.

c_iflag flag constants:

IGNBRK
Ignore BREAK condition on input.

BRKINT
If IGNBRK is set, a BREAK is ignored. If it is not set but BRKINT is set, then a BREAK causes the input and output queues to be flushed, and if the terminal is the controlling terminal of a foreground process group, it will cause a SIGINT to be sent to this foreground process group. When neither IGNBRK nor BRKINT are set, a BREAK reads as a null byte (‘�’), except when PARMRK is set, in which case it reads as the sequence \377 � �.

IGNPAR
Ignore framing errors and parity errors.

PARMRK
If this bit is set, input bytes with parity or framing errors are marked when passed to the program. This bit is meaningful only when INPCK is set and IGNPAR is not set. The way erroneous bytes are marked is with two preceding bytes, \377 and �. Thus, the program actually reads three bytes for one erroneous byte received from the terminal. If a valid byte has the value \377, and ISTRIP (see below) is not set, the program might confuse it with the prefix that marks a parity error. Therefore, a valid byte \377 is passed to the program as two bytes, \377 \377, in this case.

If neither IGNPAR nor PARMRK is set, read a character with a parity error or framing error as �.

INPCK
Enable input parity checking.

ISTRIP
Strip off eighth bit.

INLCR
Translate NL to CR on input.

IGNCR
Ignore carriage return on input.

ICRNL
Translate carriage return to newline on input (unless IGNCR is set).

IUCLC
(not in POSIX) Map uppercase characters to lowercase on input.

IXON
Enable XON/XOFF flow control on output.

IXANY
(XSI) Typing any character will restart stopped output. (The default is to allow just the START character to restart output.)

IXOFF
Enable XON/XOFF flow control on input.

IMAXBEL
(not in POSIX) Ring bell when input queue is full. Linux does not implement this bit, and acts as if it is always set.

IUTF8 (since Linux 2.6.4)
(not in POSIX) Input is UTF8; this allows character-erase to be correctly performed in cooked mode.

c_oflag flag constants:

OPOST
Enable implementation-defined output processing.

OLCUC
(not in POSIX) Map lowercase characters to uppercase on output.

ONLCR
(XSI) Map NL to CR-NL on output.

OCRNL
Map CR to NL on output.

ONOCR
Don’t output CR at column 0.

ONLRET
The NL character is assumed to do the carriage-return function; the kernel’s idea of the current column is set to 0 after both NL and CR.

OFILL
Send fill characters for a delay, rather than using a timed delay.

OFDEL
Fill character is ASCII DEL (0177). If unset, fill character is ASCII NUL (‘�’). (Not implemented on Linux.)

NLDLY
Newline delay mask. Values are NL0 and NL1. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

CRDLY
Carriage return delay mask. Values are CR0, CR1, CR2, or CR3. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

TABDLY
Horizontal tab delay mask. Values are TAB0, TAB1, TAB2, TAB3 (or XTABS, but see the BUGS section). A value of TAB3, that is, XTABS, expands tabs to spaces (with tab stops every eight columns). [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

BSDLY
Backspace delay mask. Values are BS0 or BS1. (Has never been implemented.) [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

VTDLY
Vertical tab delay mask. Values are VT0 or VT1.

FFDLY
Form feed delay mask. Values are FF0 or FF1. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

c_cflag flag constants:

CBAUD
(not in POSIX) Baud speed mask (4+1 bits). [requires _BSD_SOURCE or _SVID_SOURCE]

CBAUDEX
(not in POSIX) Extra baud speed mask (1 bit), included in CBAUD. [requires _BSD_SOURCE or _SVID_SOURCE]

(POSIX says that the baud speed is stored in the termios structure without specifying where precisely, and provides cfgetispeed() and cfsetispeed() for getting at it. Some systems use bits selected by CBAUD in c_cflag, other systems use separate fields, for example, sg_ispeed and sg_ospeed.)

CSIZE
Character size mask. Values are CS5, CS6, CS7, or CS8.

CSTOPB
Set two stop bits, rather than one.

CREAD
Enable receiver.

PARENB
Enable parity generation on output and parity checking for input.

PARODD
If set, then parity for input and output is odd; otherwise even parity is used.

HUPCL
Lower modem control lines after last process closes the device (hang up).

CLOCAL
Ignore modem control lines.

LOBLK
(not in POSIX) Block output from a noncurrent shell layer. For use by shl (shell layers). (Not implemented on Linux.)

CIBAUD
(not in POSIX) Mask for input speeds. The values for the CIBAUD bits are the same as the values for the CBAUD bits, shifted left IBSHIFT bits. [requires _BSD_SOURCE or _SVID_SOURCE] (Not implemented in glibc, supported on Linux via TCGET* and TCSET* ioctls; see ioctl_tty(2))

CMSPAR
(not in POSIX) Use “stick” (mark/space) parity (supported on certain serial devices): if PARODD is set, the parity bit is always 1; if PARODD is not set, then the parity bit is always 0. [requires _BSD_SOURCE or _SVID_SOURCE]

CRTSCTS
(not in POSIX) Enable RTS/CTS (hardware) flow control. [requires _BSD_SOURCE or _SVID_SOURCE]

c_lflag flag constants:

ISIG
When any of the characters INTR, QUIT, SUSP, or DSUSP are received, generate the corresponding signal.

ICANON
Enable canonical mode (described below).

XCASE
(not in POSIX; not supported under Linux) If ICANON is also set, terminal is uppercase only. Input is converted to lowercase, except for characters preceded by \ On output, uppercase characters are preceded by \ and lowercase characters are converted to uppercase. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

ECHO
Echo input characters.

ECHOE
If ICANON is also set, the ERASE character erases the preceding input character, and WERASE erases the preceding word.

ECHOK
If ICANON is also set, the KILL character erases the current line.

ECHONL
If ICANON is also set, echo the NL character even if ECHO is not set.

ECHOCTL
(not in POSIX) If ECHO is also set, terminal special characters other than TAB, NL, START, and STOP are echoed as ^X, where X is the character with ASCII code 0x40 greater than the special character. For example, character 0x08 (BS) is echoed as ^H. [requires _BSD_SOURCE or _SVID_SOURCE]

ECHOPRT
(not in POSIX) If ICANON and ECHO are also set, characters are printed as they are being erased. [requires _BSD_SOURCE or _SVID_SOURCE]

ECHOKE
(not in POSIX) If ICANON is also set, KILL is echoed by erasing each character on the line, as specified by ECHOE and ECHOPRT. [requires _BSD_SOURCE or _SVID_SOURCE]

DEFECHO
(not in POSIX) Echo only when a process is reading. (Not implemented on Linux.)

FLUSHO
(not in POSIX; not supported under Linux) Output is being flushed. This flag is toggled by typing the DISCARD character. [requires _BSD_SOURCE or _SVID_SOURCE]

NOFLSH
Disable flushing the input and output queues when generating signals for the INT, QUIT, and SUSP characters.

TOSTOP
Send the SIGTTOU signal to the process group of a background process which tries to write to its controlling terminal.

PENDIN
(not in POSIX; not supported under Linux) All characters in the input queue are reprinted when the next character is read. (bash(1) handles typeahead this way.) [requires _BSD_SOURCE or _SVID_SOURCE]

IEXTEN
Enable implementation-defined input processing. This flag, as well as ICANON must be enabled for the special characters EOL2, LNEXT, REPRINT, WERASE to be interpreted, and for the IUCLC flag to be effective.

The c_cc array defines the terminal special characters. The symbolic indices (initial values) and meaning are:

VDISCARD
(not in POSIX; not supported under Linux; 017, SI, Ctrl-O) Toggle: start/stop discarding pending output. Recognized when IEXTEN is set, and then not passed as input.

VDSUSP
(not in POSIX; not supported under Linux; 031, EM, Ctrl-Y) Delayed suspend character (DSUSP): send SIGTSTP signal when the character is read by the user program. Recognized when IEXTEN and ISIG are set, and the system supports job control, and then not passed as input.

VEOF
(004, EOT, Ctrl-D) End-of-file character (EOF). More precisely: this character causes the pending tty buffer to be sent to the waiting user program without waiting for end-of-line. If it is the first character of the line, the read(2) in the user program returns 0, which signifies end-of-file. Recognized when ICANON is set, and then not passed as input.

VEOL
(0, NUL) Additional end-of-line character (EOL). Recognized when ICANON is set.

VEOL2
(not in POSIX; 0, NUL) Yet another end-of-line character (EOL2). Recognized when ICANON is set.

VERASE
(0177, DEL, rubout, or 010, BS, Ctrl-H, or also #) Erase character (ERASE). This erases the previous not-yet-erased character, but does not erase past EOF or beginning-of-line. Recognized when ICANON is set, and then not passed as input.

VINTR
(003, ETX, Ctrl-C, or also 0177, DEL, rubout) Interrupt character (INTR). Send a SIGINT signal. Recognized when ISIG is set, and then not passed as input.

VKILL
(025, NAK, Ctrl-U, or Ctrl-X, or also @) Kill character (KILL). This erases the input since the last EOF or beginning-of-line. Recognized when ICANON is set, and then not passed as input.

VLNEXT
(not in POSIX; 026, SYN, Ctrl-V) Literal next (LNEXT). Quotes the next input character, depriving it of a possible special meaning. Recognized when IEXTEN is set, and then not passed as input.

VMIN
Minimum number of characters for noncanonical read (MIN).

VQUIT
(034, FS, Ctrl-\ Quit character (QUIT). Send SIGQUIT signal. Recognized when ISIG is set, and then not passed as input.

VREPRINT
(not in POSIX; 022, DC2, Ctrl-R) Reprint unread characters (REPRINT). Recognized when ICANON and IEXTEN are set, and then not passed as input.

VSTART
(021, DC1, Ctrl-Q) Start character (START). Restarts output stopped by the Stop character. Recognized when IXON is set, and then not passed as input.

VSTATUS
(not in POSIX; not supported under Linux; status request: 024, DC4, Ctrl-T). Status character (STATUS). Display status information at terminal, including state of foreground process and amount of CPU time it has consumed. Also sends a SIGINFO signal (not supported on Linux) to the foreground process group.

VSTOP
(023, DC3, Ctrl-S) Stop character (STOP). Stop output until Start character typed. Recognized when IXON is set, and then not passed as input.

VSUSP
(032, SUB, Ctrl-Z) Suspend character (SUSP). Send SIGTSTP signal. Recognized when ISIG is set, and then not passed as input.

VSWTCH
(not in POSIX; not supported under Linux; 0, NUL) Switch character (SWTCH). Used in System V to switch shells in shell layers, a predecessor to shell job control.

VTIME
Timeout in deciseconds for noncanonical read (TIME).

VWERASE
(not in POSIX; 027, ETB, Ctrl-W) Word erase (WERASE). Recognized when ICANON and IEXTEN are set, and then not passed as input.

An individual terminal special character can be disabled by setting the value of the corresponding c_cc element to _POSIX_VDISABLE.

The above symbolic subscript values are all different, except that VTIME, VMIN may have the same value as VEOL, VEOF, respectively. In noncanonical mode the special character meaning is replaced by the timeout meaning. For an explanation of VMIN and VTIME, see the description of noncanonical mode below.

Retrieving and changing terminal settings

tcgetattr() gets the parameters associated with the object referred by fd and stores them in the termios structure referenced by termios_p. This function may be invoked from a background process; however, the terminal attributes may be subsequently changed by a foreground process.

tcsetattr() sets the parameters associated with the terminal (unless support is required from the underlying hardware that is not available) from the termios structure referred to by termios_p. optional_actions specifies when the changes take effect:

TCSANOW
the change occurs immediately.

TCSADRAIN
the change occurs after all output written to fd has been transmitted. This option should be used when changing parameters that affect output.

TCSAFLUSH
the change occurs after all output written to the object referred by fd has been transmitted, and all input that has been received but not read will be discarded before the change is made.

Canonical and noncanonical mode

The setting of the ICANON canon flag in c_lflag determines whether the terminal is operating in canonical mode (ICANON set) or noncanonical mode (ICANON unset). By default, ICANON is set.

In canonical mode:

  • Input is made available line by line. An input line is available when one of the line delimiters is typed (NL, EOL, EOL2; or EOF at the start of line). Except in the case of EOF, the line delimiter is included in the buffer returned by read(2).

  • Line editing is enabled (ERASE, KILL; and if the IEXTEN flag is set: WERASE, REPRINT, LNEXT). A read(2) returns at most one line of input; if the read(2) requested fewer bytes than are available in the current line of input, then only as many bytes as requested are read, and the remaining characters will be available for a future read(2).

  • The maximum line length is 4096 chars (including the terminating newline character); lines longer than 4096 chars are truncated. After 4095 characters, input processing (e.g., ISIG and ECHO* processing) continues, but any input data after 4095 characters up to (but not including) any terminating newline is discarded. This ensures that the terminal can always receive more input until at least one line can be read.

In noncanonical mode input is available immediately (without the user having to type a line-delimiter character), no input processing is performed, and line editing is disabled. The read buffer will only accept 4095 chars; this provides the necessary space for a newline char if the input mode is switched to canonical. The settings of MIN (c_cc[VMIN]) and TIME (c_cc[VTIME]) determine the circumstances in which a read(2) completes; there are four distinct cases:

MIN == 0, TIME == 0 (polling read)
If data is available, read(2) returns immediately, with the lesser of the number of bytes available, or the number of bytes requested. If no data is available, read(2) returns 0.

MIN > 0, TIME == 0 (blocking read)
read(2) blocks until MIN bytes are available, and returns up to the number of bytes requested.

MIN == 0, TIME > 0 (read with timeout)
TIME specifies the limit for a timer in tenths of a second. The timer is started when read(2) is called. read(2) returns either when at least one byte of data is available, or when the timer expires. If the timer expires without any input becoming available, read(2) returns 0. If data is already available at the time of the call to read(2), the call behaves as though the data was received immediately after the call.

MIN > 0, TIME > 0 (read with interbyte timeout)
TIME specifies the limit for a timer in tenths of a second. Once an initial byte of input becomes available, the timer is restarted after each further byte is received. read(2) returns when any of the following conditions is met:

  • MIN bytes have been received.

  • The interbyte timer expires.

  • The number of bytes requested by read(2) has been received. (POSIX does not specify this termination condition, and on some other implementations read(2) does not return in this case.)

Because the timer is started only after the initial byte becomes available, at least one byte will be read. If data is already available at the time of the call to read(2), the call behaves as though the data was received immediately after the call.

POSIX does not specify whether the setting of the O_NONBLOCK file status flag takes precedence over the MIN and TIME settings. If O_NONBLOCK is set, a read(2) in noncanonical mode may return immediately, regardless of the setting of MIN or TIME. Furthermore, if no data is available, POSIX permits a read(2) in noncanonical mode to return either 0, or -1 with errno set to EAGAIN.

Raw mode

cfmakeraw() sets the terminal to something like the “raw” mode of the old Version 7 terminal driver: input is available character by character, echoing is disabled, and all special processing of terminal input and output characters is disabled. The terminal attributes are set as follows:

termios_p->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
                | INLCR | IGNCR | ICRNL | IXON);
termios_p->c_oflag &= ~OPOST;
termios_p->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
termios_p->c_cflag &= ~(CSIZE | PARENB);
termios_p->c_cflag |= CS8;

Line control

tcsendbreak() transmits a continuous stream of zero-valued bits for a specific duration, if the terminal is using asynchronous serial data transmission. If duration is zero, it transmits zero-valued bits for at least 0.25 seconds, and not more than 0.5 seconds. If duration is not zero, it sends zero-valued bits for some implementation-defined length of time.

If the terminal is not using asynchronous serial data transmission, tcsendbreak() returns without taking any action.

tcdrain() waits until all output written to the object referred to by fd has been transmitted.

tcflush() discards data written to the object referred to by fd but not transmitted, or data received but not read, depending on the value of queue_selector:

TCIFLUSH
flushes data received but not read.

TCOFLUSH
flushes data written but not transmitted.

TCIOFLUSH
flushes both data received but not read, and data written but not transmitted.

tcflow() suspends transmission or reception of data on the object referred to by fd, depending on the value of action:

TCOOFF
suspends output.

TCOON
restarts suspended output.

TCIOFF
transmits a STOP character, which stops the terminal device from transmitting data to the system.

TCION
transmits a START character, which starts the terminal device transmitting data to the system.

The default on open of a terminal file is that neither its input nor its output is suspended.

Line speed

The baud rate functions are provided for getting and setting the values of the input and output baud rates in the termios structure. The new values do not take effect until tcsetattr() is successfully called.

Setting the speed to B0 instructs the modem to “hang up”. The actual bit rate corresponding to B38400 may be altered with setserial(8).

The input and output baud rates are stored in the termios structure.

cfgetospeed() returns the output baud rate stored in the termios structure pointed to by termios_p.

cfsetospeed() sets the output baud rate stored in the termios structure pointed to by termios_p to speed, which must be one of these constants:

B0
B50
B75
B110
B134
B150
B200
B300
B600
B1200
B1800
B2400
B4800
B9600
B19200
B38400
B57600
B115200
B230400
B460800
B500000
B576000
B921600
B1000000
B1152000
B1500000
B2000000

These constants are additionally supported on the SPARC architecture:

B76800
B153600
B307200
B614400

These constants are additionally supported on non-SPARC architectures:

B2500000
B3000000
B3500000
B4000000

Due to differences between architectures, portable applications should check if a particular Bnnn constant is defined prior to using it.

The zero baud rate, B0, is used to terminate the connection. If B0 is specified, the modem control lines shall no longer be asserted. Normally, this will disconnect the line. CBAUDEX is a mask for the speeds beyond those defined in POSIX.1 (57600 and above). Thus, B57600 & CBAUDEX is nonzero.

Setting the baud rate to a value other than those defined by Bnnn constants is possible via the TCSETS2 ioctl; see ioctl_tty(2).

cfgetispeed() returns the input baud rate stored in the termios structure.

cfsetispeed() sets the input baud rate stored in the termios structure to speed, which must be specified as one of the Bnnn constants listed above for cfsetospeed(). If the input baud rate is set to the literal constant 0 (not the symbolic constant B0), the input baud rate will be equal to the output baud rate.

cfsetspeed() is a 4.4BSD extension. It takes the same arguments as cfsetispeed(), and sets both input and output speed.

RETURN VALUE

cfgetispeed() returns the input baud rate stored in the termios structure.

cfgetospeed() returns the output baud rate stored in the termios structure.

All other functions return:

0
on success.

-1
on failure and set errno to indicate the error.

Note that tcsetattr() returns success if any of the requested changes could be successfully carried out. Therefore, when making multiple changes it may be necessary to follow this call with a further call to tcgetattr() to check that all changes have been performed successfully.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tcgetattr(), tcsetattr(), tcdrain(), tcflush(), tcflow(), tcsendbreak(), cfmakeraw(), cfgetispeed(), cfgetospeed(), cfsetispeed(), cfsetospeed(), cfsetspeed()

Thread safetyMT-Safe

STANDARDS

tcgetattr()
tcsetattr()
tcsendbreak()
tcdrain()
tcflush()
tcflow()
cfgetispeed()
cfgetospeed()
cfsetispeed()
cfsetospeed()
POSIX.1-2008.

cfmakeraw()
cfsetspeed()
BSD.

HISTORY

tcgetattr()
tcsetattr()
tcsendbreak()
tcdrain()
tcflush()
tcflow()
cfgetispeed()
cfgetospeed()
cfsetispeed()
cfsetospeed()
POSIX.1-2001.

cfmakeraw()
cfsetspeed()
BSD.

NOTES

UNIX V7 and several later systems have a list of baud rates where after the values B0 through B9600 one finds the two constants EXTA, EXTB (“External A” and “External B”). Many systems extend the list with much higher baud rates.

The effect of a nonzero duration with tcsendbreak() varies. SunOS specifies a break of duration * N seconds, where N is at least 0.25, and not more than 0.5. Linux, AIX, DU, Tru64 send a break of duration milliseconds. FreeBSD and NetBSD and HP-UX and MacOS ignore the value of duration. Under Solaris and UnixWare, tcsendbreak() with nonzero duration behaves like tcdrain().

BUGS

On the Alpha architecture before Linux 4.16 (and glibc before glibc 2.28), the XTABS value was different from TAB3 and it was ignored by the N_TTY line discipline code of the terminal driver as a result (because as it wasn’t part of the TABDLY mask).

SEE ALSO

reset(1), setterm(1), stty(1), tput(1), tset(1), tty(1), ioctl_console(2), ioctl_tty(2), cc_t(3type), speed_t(3type), tcflag_t(3type), setserial(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1069 - Linux cli command sem_close

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sem_close and provides detailed information about the command sem_close, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sem_close.

NAME 🖥️ sem_close 🖥️

close a named semaphore

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <semaphore.h>
int sem_close(sem_t *sem);

DESCRIPTION

sem_close() closes the named semaphore referred to by sem, allowing any resources that the system has allocated to the calling process for this semaphore to be freed.

RETURN VALUE

On success sem_close() returns 0; on error, -1 is returned, with errno set to indicate the error.

ERRORS

EINVAL
sem is not a valid semaphore.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sem_close()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

All open named semaphores are automatically closed on process termination, or upon execve(2).

SEE ALSO

sem_getvalue(3), sem_open(3), sem_post(3), sem_unlink(3), sem_wait(3), sem_overview(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1070 - Linux cli command Spreadsheet_WriteExcel_Chart_Barpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_WriteExcel_Chart_Barpm and provides detailed information about the command Spreadsheet_WriteExcel_Chart_Barpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_WriteExcel_Chart_Barpm.

NAME 🖥️ Spreadsheet_WriteExcel_Chart_Barpm 🖥️

A writer class for Excel Bar charts.

SYNOPSIS

To create a simple Excel file with a Bar chart using Spreadsheet::WriteExcel:

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( chart.xls ); my $worksheet = $workbook->add_worksheet(); my $chart = $workbook->add_chart( type => bar ); # Configure the chart. $chart->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, ); # Add the worksheet data the chart refers to. my $data = [ [ Category, 2, 3, 4, 5, 6, 7 ], [ Value, 1, 4, 5, 2, 1, 5 ], ]; $worksheet->write( A1, $data ); _ _END_ _

DESCRIPTION

This module implements Bar charts for Spreadsheet::WriteExcel. The chart object is created via the Workbook add_chart() method:

my $chart = $workbook->add_chart( type => bar );

Once the object is created it can be configured via the following methods that are common to all chart classes:

$chart->add_series(); $chart->set_x_axis(); $chart->set_y_axis(); $chart->set_title();

These methods are explained in detail in Spreadsheet::WriteExcel::Chart. Class specific methods or settings, if any, are explained below.

Bar Chart Methods

There aren’t currently any bar chart specific methods. See the TODO section of Spreadsheet::WriteExcel::Chart.

EXAMPLE

Here is a complete example that demonstrates most of the available features when creating a chart.

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( chart_bar.xls ); my $worksheet = $workbook->add_worksheet(); my $bold = $workbook->add_format( bold => 1 ); # Add the worksheet data that the charts will refer to. my $headings = [ Number, Sample 1, Sample 2 ]; my $data = [ [ 2, 3, 4, 5, 6, 7 ], [ 1, 4, 5, 2, 1, 5 ], [ 3, 6, 7, 5, 4, 3 ], ]; $worksheet->write( A1, $headings, $bold ); $worksheet->write( A2, $data ); # Create a new chart object. In this case an embedded chart. my $chart = $workbook->add_chart( type => bar, embedded => 1 ); # Configure the first series. (Sample 1) $chart->add_series( name => Sample 1, categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, ); # Configure the second series. (Sample 2) $chart->add_series( name => Sample 2, categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$C$2:$C$7, ); # Add a chart title and some axis labels. $chart->set_title ( name => Results of sample analysis ); $chart->set_x_axis( name => Test number ); $chart->set_y_axis( name => Sample length (cm) ); # Insert the chart into the worksheet (with an offset). $worksheet->insert_chart( D2, $chart, 25, 10 ); _ _END_ _

AUTHOR

John McNamara [email protected]

COPYRIGHT

Copyright MM-MMX, John McNamara.

All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1071 - Linux cli command getifaddrs

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getifaddrs and provides detailed information about the command getifaddrs, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getifaddrs.

NAME 🖥️ getifaddrs 🖥️

get interface addresses

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <ifaddrs.h>
int getifaddrs(struct ifaddrs **ifap);
void freeifaddrs(struct ifaddrs *ifa);

DESCRIPTION

The getifaddrs() function creates a linked list of structures describing the network interfaces of the local system, and stores the address of the first item of the list in *ifap. The list consists of ifaddrs structures, defined as follows:

struct ifaddrs {
    struct ifaddrs  *ifa_next;    /* Next item in list */
    char            *ifa_name;    /* Name of interface */
    unsigned int     ifa_flags;   /* Flags from SIOCGIFFLAGS */
    struct sockaddr *ifa_addr;    /* Address of interface */
    struct sockaddr *ifa_netmask; /* Netmask of interface */
    union {
        struct sockaddr *ifu_broadaddr;
                         /* Broadcast address of interface */
        struct sockaddr *ifu_dstaddr;
                         /* Point-to-point destination address */
    } ifa_ifu;
#define              ifa_broadaddr ifa_ifu.ifu_broadaddr
#define              ifa_dstaddr   ifa_ifu.ifu_dstaddr
    void            *ifa_data;    /* Address-specific data */
};

The ifa_next field contains a pointer to the next structure on the list, or NULL if this is the last item of the list.

The ifa_name points to the null-terminated interface name.

The ifa_flags field contains the interface flags, as returned by the SIOCGIFFLAGS ioctl(2) operation (see netdevice(7) for a list of these flags).

The ifa_addr field points to a structure containing the interface address. (The sa_family subfield should be consulted to determine the format of the address structure.) This field may contain a null pointer.

The ifa_netmask field points to a structure containing the netmask associated with ifa_addr, if applicable for the address family. This field may contain a null pointer.

Depending on whether the bit IFF_BROADCAST or IFF_POINTOPOINT is set in ifa_flags (only one can be set at a time), either ifa_broadaddr will contain the broadcast address associated with ifa_addr (if applicable for the address family) or ifa_dstaddr will contain the destination address of the point-to-point interface.

The ifa_data field points to a buffer containing address-family-specific data; this field may be NULL if there is no such data for this interface.

The data returned by getifaddrs() is dynamically allocated and should be freed using freeifaddrs() when no longer needed.

RETURN VALUE

On success, getifaddrs() returns zero; on error, -1 is returned, and errno is set to indicate the error.

ERRORS

getifaddrs() may fail and set errno for any of the errors specified for socket(2), bind(2), getsockname(2), recvmsg(2), sendto(2), malloc(3), or realloc(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getifaddrs(), freeifaddrs()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

This function first appeared in BSDi and is present on the BSD systems, but with slightly different semantics documented—returning one entry per interface, not per address. This means ifa_addr and other fields can actually be NULL if the interface has no address, and no link-level address is returned if the interface has an IP address assigned. Also, the way of choosing either ifa_broadaddr or ifa_dstaddr differs on various systems.

getifaddrs() first appeared in glibc 2.3, but before glibc 2.3.3, the implementation supported only IPv4 addresses; IPv6 support was added in glibc 2.3.3. Support of address families other than IPv4 is available only on kernels that support netlink.

NOTES

The addresses returned on Linux will usually be the IPv4 and IPv6 addresses assigned to the interface, but also one AF_PACKET address per interface containing lower-level details about the interface and its physical layer. In this case, the ifa_data field may contain a pointer to a struct rtnl_link_stats, defined in <linux/if_link.h> (in Linux 2.4 and earlier, struct net_device_stats, defined in <linux/netdevice.h>), which contains various interface attributes and statistics.

EXAMPLES

The program below demonstrates the use of getifaddrs(), freeifaddrs(), and getnameinfo(3). Here is what we see when running this program on one system:

$ ./a.out
lo       AF_PACKET (17)
                tx_packets =        524; rx_packets =        524
                tx_bytes   =      38788; rx_bytes   =      38788
wlp3s0   AF_PACKET (17)
                tx_packets =     108391; rx_packets =     130245
                tx_bytes   =   30420659; rx_bytes   =   94230014
em1      AF_PACKET (17)
                tx_packets =          0; rx_packets =          0
                tx_bytes   =          0; rx_bytes   =          0
lo       AF_INET (2)
                address: <127.0.0.1>
wlp3s0   AF_INET (2)
                address: <192.168.235.137>
lo       AF_INET6 (10)
                address: <::1>
wlp3s0   AF_INET6 (10)
                address: <fe80::7ee9:d3ff:fef5:1a91%wlp3s0>

Program source

#define _GNU_SOURCE     /* To get defns of NI_MAXSERV and NI_MAXHOST */
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netdb.h>
#include <ifaddrs.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <linux/if_link.h>
int main(int argc, char *argv[])
{
    struct ifaddrs *ifaddr;
    int family, s;
    char host[NI_MAXHOST];
    if (getifaddrs(&ifaddr) == -1) {
        perror("getifaddrs");
        exit(EXIT_FAILURE);
    }
    /* Walk through linked list, maintaining head pointer so we
       can free list later. */
    for (struct ifaddrs *ifa = ifaddr; ifa != NULL;
             ifa = ifa->ifa_next) {
        if (ifa->ifa_addr == NULL)
            continue;
        family = ifa->ifa_addr->sa_family;
        /* Display interface name and family (including symbolic
           form of the latter for the common families). */
        printf("%-8s %s (%d)

“, ifa->ifa_name, (family == AF_PACKET) ? “AF_PACKET” : (family == AF_INET) ? “AF_INET” : (family == AF_INET6) ? “AF_INET6” : “???”, family); /* For an AF_INET* interface address, display the address. */ if (family == AF_INET || family == AF_INET6) { s = getnameinfo(ifa->ifa_addr, (family == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6), host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST); if (s != 0) { printf(“getnameinfo() failed: %s “, gai_strerror(s)); exit(EXIT_FAILURE); } printf(” address: <%s> “, host); } else if (family == AF_PACKET && ifa->ifa_data != NULL) { struct rtnl_link_stats *stats = ifa->ifa_data; printf(” tx_packets = %10u; rx_packets = %10u " " tx_bytes = %10u; rx_bytes = %10u “, stats->tx_packets, stats->rx_packets, stats->tx_bytes, stats->rx_bytes); } } freeifaddrs(ifaddr); exit(EXIT_SUCCESS); }

SEE ALSO

bind(2), getsockname(2), socket(2), packet(7), ifconfig(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1072 - Linux cli command pthread_mutexattr_getrobust_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_mutexattr_getrobust_np and provides detailed information about the command pthread_mutexattr_getrobust_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_mutexattr_getrobust_np.

NAME 🖥️ pthread_mutexattr_getrobust_np 🖥️

get and set the robustness attribute of a mutex attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_mutexattr_getrobust(const pthread_mutexattr_t *attr,
 int *robustness);
int pthread_mutexattr_setrobust(pthread_mutexattr_t *attr,
 int robustness);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

pthread_mutexattr_getrobust(), pthread_mutexattr_setrobust():

    _POSIX_C_SOURCE >= 200809L

DESCRIPTION

The pthread_mutexattr_getrobust() function places the value of the robustness attribute of the mutex attributes object referred to by attr in *robustness. The pthread_mutexattr_setrobust() function sets the value of the robustness attribute of the mutex attributes object referred to by attr to the value specified in *robustness.

The robustness attribute specifies the behavior of the mutex when the owning thread dies without unlocking the mutex. The following values are valid for robustness:

PTHREAD_MUTEX_STALLED
This is the default value for a mutex attributes object. If a mutex is initialized with the PTHREAD_MUTEX_STALLED attribute and its owner dies without unlocking it, the mutex remains locked afterwards and any future attempts to call pthread_mutex_lock(3) on the mutex will block indefinitely.

PTHREAD_MUTEX_ROBUST
If a mutex is initialized with the PTHREAD_MUTEX_ROBUST attribute and its owner dies without unlocking it, any future attempts to call pthread_mutex_lock(3) on this mutex will succeed and return EOWNERDEAD to indicate that the original owner no longer exists and the mutex is in an inconsistent state. Usually after EOWNERDEAD is returned, the next owner should call pthread_mutex_consistent(3) on the acquired mutex to make it consistent again before using it any further.

If the next owner unlocks the mutex using pthread_mutex_unlock(3) before making it consistent, the mutex will be permanently unusable and any subsequent attempts to lock it using pthread_mutex_lock(3) will fail with the error ENOTRECOVERABLE. The only permitted operation on such a mutex is pthread_mutex_destroy(3).

If the next owner terminates before calling pthread_mutex_consistent(3), further pthread_mutex_lock(3) operations on this mutex will still return EOWNERDEAD.

Note that the attr argument of pthread_mutexattr_getrobust() and pthread_mutexattr_setrobust() should refer to a mutex attributes object that was initialized by pthread_mutexattr_init(3), otherwise the behavior is undefined.

RETURN VALUE

On success, these functions return 0. On error, they return a positive error number.

In the glibc implementation, pthread_mutexattr_getrobust() always return zero.

ERRORS

EINVAL
A value other than PTHREAD_MUTEX_STALLED or PTHREAD_MUTEX_ROBUST was passed to pthread_mutexattr_setrobust().

VERSIONS

In the Linux implementation, when using process-shared robust mutexes, a waiting thread also receives the EOWNERDEAD notification if the owner of a robust mutex performs an execve(2) without first unlocking the mutex. POSIX.1 does not specify this detail, but the same behavior also occurs in at least some other implementations.

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.12. POSIX.1-2008.

Before the addition of pthread_mutexattr_getrobust() and pthread_mutexattr_setrobust() to POSIX, glibc defined the following equivalent nonstandard functions if _GNU_SOURCE was defined:

[[deprecated]]
int pthread_mutexattr_getrobust_np(const pthread_mutexattr_t *attr,
 int *robustness);
[[deprecated]]
int pthread_mutexattr_setrobust_np(const pthread_mutexattr_t *attr,
 int robustness);

Correspondingly, the constants PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP were also defined.

These GNU-specific APIs, which first appeared in glibc 2.4, are nowadays obsolete and should not be used in new programs; since glibc 2.34 these APIs are marked as deprecated.

EXAMPLES

The program below demonstrates the use of the robustness attribute of a mutex attributes object. In this program, a thread holding the mutex dies prematurely without unlocking the mutex. The main thread subsequently acquires the mutex successfully and gets the error EOWNERDEAD, after which it makes the mutex consistent.

The following shell session shows what we see when running this program:

$ ./a.out
[original owner] Setting lock...
[original owner] Locked. Now exiting without unlocking.
[main] Attempting to lock the robust mutex.
[main] pthread_mutex_lock() returned EOWNERDEAD
[main] Now make the mutex consistent
[main] Mutex is now consistent; unlocking

Program source

#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define handle_error_en(en, msg) \
        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
static pthread_mutex_t mtx;
static void *
original_owner_thread(void *ptr)
{
    printf("[original owner] Setting lock...

“); pthread_mutex_lock(&mtx); printf("[original owner] Locked. Now exiting without unlocking. “); pthread_exit(NULL); } int main(void) { pthread_t thr; pthread_mutexattr_t attr; int s; pthread_mutexattr_init(&attr); pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST); pthread_mutex_init(&mtx, &attr); pthread_create(&thr, NULL, original_owner_thread, NULL); sleep(2); /* “original_owner_thread” should have exited by now. */ printf("[main] Attempting to lock the robust mutex. “); s = pthread_mutex_lock(&mtx); if (s == EOWNERDEAD) { printf("[main] pthread_mutex_lock() returned EOWNERDEAD “); printf("[main] Now make the mutex consistent “); s = pthread_mutex_consistent(&mtx); if (s != 0) handle_error_en(s, “pthread_mutex_consistent”); printf("[main] Mutex is now consistent; unlocking “); s = pthread_mutex_unlock(&mtx); if (s != 0) handle_error_en(s, “pthread_mutex_unlock”); exit(EXIT_SUCCESS); } else if (s == 0) { printf("[main] pthread_mutex_lock() unexpectedly succeeded “); exit(EXIT_FAILURE); } else { printf("[main] pthread_mutex_lock() unexpectedly failed “); handle_error_en(s, “pthread_mutex_lock”); } }

SEE ALSO

get_robust_list(2), set_robust_list(2), pthread_mutex_consistent(3), pthread_mutex_init(3), pthread_mutex_lock(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1073 - Linux cli command xdr_getpos

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_getpos and provides detailed information about the command xdr_getpos, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_getpos.

NAME 🖥️ xdr_getpos 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1074 - Linux cli command __after_morecore_hook

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __after_morecore_hook and provides detailed information about the command __after_morecore_hook, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __after_morecore_hook.

NAME 🖥️ __after_morecore_hook 🖥️

malloc debugging variables (DEPRECATED)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <malloc.h>
void *(*volatile __malloc_hook)(size_t size, const void *caller);
void *(*volatile __realloc_hook)(void *ptr, size_t size,
 const void *caller);
void *(*volatile __memalign_hook)(size_t alignment, size_t size,
 const void *caller);
void (*volatile __free_hook)(void *ptr, const void *caller);
void (*__malloc_initialize_hook)(void);
void (*volatile __after_morecore_hook)(void);

DESCRIPTION

The GNU C library lets you modify the behavior of malloc(3), realloc(3), and free(3) by specifying appropriate hook functions. You can use these hooks to help you debug programs that use dynamic memory allocation, for example.

The variable __malloc_initialize_hook points at a function that is called once when the malloc implementation is initialized. This is a weak variable, so it can be overridden in the application with a definition like the following:

void (*__malloc_initialize_hook)(void) = my_init_hook;

Now the function my_init_hook() can do the initialization of all hooks.

The four functions pointed to by __malloc_hook, __realloc_hook, __memalign_hook, __free_hook have a prototype like the functions malloc(3), realloc(3), memalign(3), free(3), respectively, except that they have a final argument caller that gives the address of the caller of malloc(3), etc.

The variable __after_morecore_hook points at a function that is called each time after sbrk(2) was asked for more memory.

STANDARDS

GNU.

NOTES

The use of these hook functions is not safe in multithreaded programs, and they are now deprecated. From glibc 2.24 onwards, the __malloc_initialize_hook variable has been removed from the API, and from glibc 2.34 onwards, all the hook variables have been removed from the API. Programmers should instead preempt calls to the relevant functions by defining and exporting malloc(), free(), realloc(), and calloc().

EXAMPLES

Here is a short example of how to use these variables.

#include <stdio.h>
#include <malloc.h>
/* Prototypes for our hooks */
static void my_init_hook(void);
static void *my_malloc_hook(size_t, const void *);
/* Variables to save original hooks */
static void *(*old_malloc_hook)(size_t, const void *);
/* Override initializing hook from the C library */
void (*__malloc_initialize_hook)(void) = my_init_hook;
static void
my_init_hook(void)
{
    old_malloc_hook = __malloc_hook;
    __malloc_hook = my_malloc_hook;
}
static void *
my_malloc_hook(size_t size, const void *caller)
{
    void *result;
    /* Restore all old hooks */
    __malloc_hook = old_malloc_hook;
    /* Call recursively */
    result = malloc(size);
    /* Save underlying hooks */
    old_malloc_hook = __malloc_hook;
    /* printf() might call malloc(), so protect it too */
    printf("malloc(%zu) called from %p returns %p

“, size, caller, result); /* Restore our own hooks */ __malloc_hook = my_malloc_hook; return result; }

SEE ALSO

mallinfo(3), malloc(3), mcheck(3), mtrace(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1075 - Linux cli command pmap_unset

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pmap_unset and provides detailed information about the command pmap_unset, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pmap_unset.

NAME 🖥️ pmap_unset 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1076 - Linux cli command Tie_Watchpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tie_Watchpm and provides detailed information about the command Tie_Watchpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tie_Watchpm.

NAME 🖥️ Tie_Watchpm 🖥️

place watchpoints on Perl variables.

SYNOPSIS

use Tie::Watch; $watch = Tie::Watch->new( -variable => \frog, -debug => 1, -shadow => 0, -fetch => [\fetch, arg1, arg2, …, argn], -store => \store, -destroy => sub {print “Final value=$frog. “}, } %vinfo = $watch->Info; $args = $watch->Args(-fetch); $val = $watch->Fetch; print “val=”, $watch->Say($val), “. “; $watch->Store(Hello); $watch->Unwatch;

DESCRIPTION

This class module binds one or more subroutines of your devising to a Perl variable. All variables can have FETCH, STORE and DESTROY callbacks. Additionally, arrays can define CLEAR, DELETE, EXISTS, EXTEND, FETCHSIZE, POP, PUSH, SHIFT, SPLICE, STORESIZE and UNSHIFT callbacks, and hashes can define CLEAR, DELETE, EXISTS, FIRSTKEY and NEXTKEY callbacks. If these term are unfamiliar to you, I really suggest you read perltie.

With Tie::Watch you can:

. alter a variables value . prevent a variables value from being changed . invoke a Perl/Tk callback when a variable changes . trace references to a variable

Callback format is patterned after the Perl/Tk scheme: supply either a code reference, or, supply an array reference and pass the callback code reference in the first element of the array, followed by callback arguments. (See examples in the Synopsis, above.)

Tie::Watch provides default callbacks for any that you fail to specify. Other than negatively impacting performance, they perform the standard action that you’d expect, so the variable behaves “normally”. Once you override a default callback, perhaps to insert debug code like print statements, your callback normally finishes by calling the underlying (overridden) method. But you don’t have to!

To map a tied method name to a default callback name simply lowercase the tied method name and uppercase its first character. So FETCH becomes Fetch, NEXTKEY becomes Nextkey, etcetera.

Here are two callbacks for a scalar. The FETCH (read) callback does nothing other than illustrate the fact that it returns the value to assign the variable. The STORE (write) callback uppercases the variable and returns it. In all cases the callback must return the correct read or write value - typically, it does this by invoking the underlying method.

my $fetch_scalar = sub { my($self) = @_; $self->Fetch; }; my $store_scalar = sub { my($self, $new_val) = @_; $self->Store(uc $new_val); };

Here are FETCH and STORE callbacks for either an array or hash. They do essentially the same thing as the scalar callbacks, but provide a little more information.

my $fetch = sub { my($self, $key) = @_; my $val = $self->Fetch($key); print “In fetch callback, key=$key, val=”, $self->Say($val); my $args = $self->Args(-fetch); print “, args=(”, join(”, “, @$args), “)” if $args; print “. “; $val; }; my $store = sub { my($self, $key, $new_val) = @_; my $val = $self->Fetch($key); $new_val = uc $new_val; $self->Store($key, $new_val); print “In store callback, key=$key, val=”, $self->Say($val), “, new_val=”, $self->Say($new_val); my $args = $self->Args(-store); print “, args=(”, join(”, “, @$args), “)” if $args; print “. “; $new_val; };

In all cases, the first parameter is a reference to the Watch object, used to invoke the following class methods.

METHODS

$watch = Tie::Watch->new(-options => values);
The watchpoint constructor method that accepts option/value pairs to create and configure the Watch object. The only required option is -variable. -variable is a reference to a scalar, array or hash variable. -debug (default 0) is 1 to activate debug print statements internal to Tie::Watch. -shadow (default 1) is 0 to disable array and hash shadowing. To prevent infinite recursion Tie::Watch maintains parallel variables for arrays and hashes. When the watchpoint is created the parallel shadow variable is initialized with the watched variable’s contents, and when the watchpoint is deleted the shadow variable is copied to the original variable. Thus, changes made during the watch process are not lost. Shadowing is on my default. If you disable shadowing any changes made to an array or hash are lost when the watchpoint is deleted. Specify any of the following relevant callback parameters, in the format described above: -fetch, -store, -destroy. Additionally for arrays: -clear, -extend, -fetchsize, -pop, -push, -shift, -splice, -storesize and -unshift. Additionally for hashes: -clear, -delete, -exists, -firstkey and -nextkey.

$args = $watch->Args(-fetch);
Returns a reference to a list of arguments for the specified callback, or undefined if none.

$watch->Fetch(); $watch->Fetch($key);
Returns a variable’s current value. $key is required for an array or hash.

%vinfo = $watch->Info();
Returns a hash detailing the internals of the Watch object, with these keys: %vinfo = { -variable => SCALAR(0x200737f8) -debug => 0 -shadow => 1 -value => HELLO SCALAR -destroy => ARRAY(0x200f86cc) -fetch => ARRAY(0x200f8558) -store => ARRAY(0x200f85a0) -legible => above data formatted as a list of string, for printing } For array and hash Watch objects, the -value key is replaced with a -ptr key which is a reference to the parallel array or hash. Additionally, for an array or hash, there are key/value pairs for all the variable specific callbacks.

$watch->Say($val);
Used mainly for debugging, it returns $val in quotes if required, or the string “undefined” for undefined values.

$watch->Store($new_val); $watch->Store($key, $new_val);
Store a variable’s new value. $key is required for an array or hash.

$watch->Unwatch();
Stop watching the variable.

EFFICIENCY CONSIDERATIONS

If you can live using the class methods provided, please do so. You can meddle with the object hash directly and improved watch performance, at the risk of your code breaking in the future.

AUTHOR

Stephen O. Lidie

HISTORY

[email protected], LUCC, 96/05/30 . Original version 0.92 release, based on the Trace module from Hans Mulder, and ideas from Tim Bunce. [email protected], LUCC, 96/12/25 . Version 0.96, release two inner references detected by Perl 5.004. [email protected], LUCC, 97/01/11 . Version 0.97, fix Makefile.PL and MANIFEST (thanks Andreas Koenig). Make sure test.pl doesnt fail if Tk isnt installed. [email protected], Lehigh University Computing Center, 97/10/03 . Version 0.98, implement -shadow option for arrays and hashes. [email protected], Lehigh University Computing Center, 98/02/11 . Version 0.99, finally, with Perl 5.004_57, we can completely watch arrays. With tied array support this module is essentially complete, so its been optimized for speed at the expense of clarity - sorry about that. The Delete() method has been renamed Unwatch() because it conflicts with the builtin delete(). [email protected], Lehigh University Computing Center, 99/04/04 . Version 1.0, for Perl 5.005_03, update Makefile.PL for ActiveState, and add two examples (one for Perl/Tk). [email protected], Lehigh University Computing Center, 2003/06/07 . Version 1.1, for Perl 5.8, can trace a reference now, patch from Slaven Rezic. [email protected], Lehigh University Computing Center, 2005/05/17 . Version 1.2, for Perl 5.8, per Rob Seegels suggestion, support array DELETE and EXISTS.

COPYRIGHT

Copyright (C) 1996 - 2005 Stephen O. Lidie. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1077 - Linux cli command ptrdiff_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ptrdiff_ttype and provides detailed information about the command ptrdiff_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ptrdiff_ttype.

NAME 🖥️ ptrdiff_ttype 🖥️

count of elements or array index

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <stddef.h>
typedef /* ... */ ptrdiff_t;

DESCRIPTION

Used for a count of elements, or an array index. It is the result of subtracting two pointers. It is a signed integer type capable of storing values in the range [PTRDIFF_MIN, PTRDIFF_MAX].

The length modifier for ptrdiff_t for the printf(3) and the scanf(3) families of functions is t, resulting commonly in %td or %ti for printing ptrdiff_t values.

STANDARDS

C11, POSIX.1-2008.

HISTORY

C89, POSIX.1-2001.

SEE ALSO

size_t(3type)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1078 - Linux cli command tsearch

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tsearch and provides detailed information about the command tsearch, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tsearch.

NAME 🖥️ tsearch 🖥️

manage a binary search tree

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <search.h>
typedef enum { preorder, postorder, endorder, leaf } VISIT;
void *tsearch(const void *key, void **rootp,
 int (*compar)(const void *, const void *));
void *tfind(const void *key, void *const *rootp,
 int (*compar)(const void *, const void *));
void *tdelete(const void *restrict key, void **restrict rootp,
 int (*compar)(const void *, const void *));
void twalk(const void *root,
 void (*action)(const void *nodep, VISIT which,
 int depth));
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <search.h>
void twalk_r(const void *root,
 void (*action)(const void *nodep, VISIT which,
 void *closure),
 void *closure);
void tdestroy(void *root, void (*free_node)(void *nodep));

DESCRIPTION

tsearch(), tfind(), twalk(), and tdelete() manage a binary search tree. They are generalized from Knuth (6.2.2) Algorithm T. The first field in each node of the tree is a pointer to the corresponding data item. (The calling program must store the actual data.) compar points to a comparison routine, which takes pointers to two items. It should return an integer which is negative, zero, or positive, depending on whether the first item is less than, equal to, or greater than the second.

tsearch() searches the tree for an item. key points to the item to be searched for. rootp points to a variable which points to the root of the tree. If the tree is empty, then the variable that rootp points to should be set to NULL. If the item is found in the tree, then tsearch() returns a pointer to the corresponding tree node. (In other words, tsearch() returns a pointer to a pointer to the data item.) If the item is not found, then tsearch() adds it, and returns a pointer to the corresponding tree node.

tfind() is like tsearch(), except that if the item is not found, then tfind() returns NULL.

tdelete() deletes an item from the tree. Its arguments are the same as for tsearch().

twalk() performs depth-first, left-to-right traversal of a binary tree. root points to the starting node for the traversal. If that node is not the root, then only part of the tree will be visited. twalk() calls the user function action each time a node is visited (that is, three times for an internal node, and once for a leaf). action, in turn, takes three arguments. The first argument is a pointer to the node being visited. The structure of the node is unspecified, but it is possible to cast the pointer to a pointer-to-pointer-to-element in order to access the element stored within the node. The application must not modify the structure pointed to by this argument. The second argument is an integer which takes one of the values preorder, postorder, or endorder depending on whether this is the first, second, or third visit to the internal node, or the value leaf if this is the single visit to a leaf node. (These symbols are defined in <search.h>.) The third argument is the depth of the node; the root node has depth zero.

(More commonly, preorder, postorder, and endorder are known as preorder, inorder, and postorder: before visiting the children, after the first and before the second, and after visiting the children. Thus, the choice of name postorder is rather confusing.)

twalk_r() is similar to twalk(), but instead of the depth argument, the closure argument pointer is passed to each invocation of the action callback, unchanged. This pointer can be used to pass information to and from the callback function in a thread-safe fashion, without resorting to global variables.

tdestroy() removes the whole tree pointed to by root, freeing all resources allocated by the tsearch() function. For the data in each tree node the function free_node is called. The pointer to the data is passed as the argument to the function. If no such work is necessary, free_node must point to a function doing nothing.

RETURN VALUE

tsearch() returns a pointer to a matching node in the tree, or to the newly added node, or NULL if there was insufficient memory to add the item. tfind() returns a pointer to the node, or NULL if no match is found. If there are multiple items that match the key, the item whose node is returned is unspecified.

tdelete() returns a pointer to the parent of the node deleted, or NULL if the item was not found. If the deleted node was the root node, tdelete() returns a dangling pointer that must not be accessed.

tsearch(), tfind(), and tdelete() also return NULL if rootp was NULL on entry.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tsearch(), tfind(), tdelete()

Thread safetyMT-Safe race:rootp

twalk()

Thread safetyMT-Safe race:root

twalk_r()

Thread safetyMT-Safe race:root

tdestroy()

Thread safetyMT-Safe

STANDARDS

tsearch()
tfind()
tdelete()
twalk()
POSIX.1-2008.

tdestroy()
twalk_r()
GNU.

HISTORY

tsearch()
tfind()
tdelete()
twalk()
POSIX.1-2001, POSIX.1-2008, SVr4.

twalk_r()
glibc 2.30.

NOTES

twalk() takes a pointer to the root, while the other functions take a pointer to a variable which points to the root.

tdelete() frees the memory required for the node in the tree. The user is responsible for freeing the memory for the corresponding data.

The example program depends on the fact that twalk() makes no further reference to a node after calling the user function with argument “endorder” or “leaf”. This works with the GNU library implementation, but is not in the System V documentation.

EXAMPLES

The following program inserts twelve random numbers into a binary tree, where duplicate numbers are collapsed, then prints the numbers in order.

#define _GNU_SOURCE     /* Expose declaration of tdestroy() */
#include <search.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
static void *root = NULL;
static void *
xmalloc(size_t n)
{
    void *p;
    p = malloc(n);
    if (p)
        return p;
    fprintf(stderr, "insufficient memory

“); exit(EXIT_FAILURE); } static int compare(const void *pa, const void pb) { if ((int *) pa < *(int ) pb) return -1; if ((int *) pa > *(int *) pb) return 1; return 0; } static void action(const void *nodep, VISIT which, int depth) { int *datap; switch (which) { case preorder: break; case postorder: datap = *(int **) nodep; printf("%6d “, *datap); break; case endorder: break; case leaf: datap = *(int **) nodep; printf("%6d “, *datap); break; } } int main(void) { int *ptr; int **val; srand(time(NULL)); for (unsigned int i = 0; i < 12; i++) { ptr = xmalloc(sizeof(*ptr)); *ptr = rand() & 0xff; val = tsearch(ptr, &root, compare); if (val == NULL) exit(EXIT_FAILURE); if (*val != ptr) free(ptr); } twalk(root, action); tdestroy(root, free); exit(EXIT_SUCCESS); }

SEE ALSO

bsearch(3), hsearch(3), lsearch(3), qsort(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1079 - Linux cli command fputwc_unlocked

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fputwc_unlocked and provides detailed information about the command fputwc_unlocked, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fputwc_unlocked.

NAME 🖥️ fputwc_unlocked 🖥️

nonlocking stdio functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int getc_unlocked(FILE *stream);
int getchar_unlocked(void);
int putc_unlocked(int c, FILE *stream);
int putchar_unlocked(int c);
void clearerr_unlocked(FILE *stream);
int feof_unlocked(FILE *stream);
int ferror_unlocked(FILE *stream);
int fileno_unlocked(FILE *stream);
int fflush_unlocked(FILE *_Nullable stream);
int fgetc_unlocked(FILE *stream);
int fputc_unlocked(int c, FILE *stream);
size_t fread_unlocked(void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
size_t fwrite_unlocked(const void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
char *fgets_unlocked(char s[restrict .n], int n",FILE*restrict"stream);
int fputs_unlocked(const char *restrict s, FILE *restrict stream);
#include <wchar.h>
wint_t getwc_unlocked(FILE *stream);
wint_t getwchar_unlocked(void);
wint_t fgetwc_unlocked(FILE *stream);
wint_t fputwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwchar_unlocked(wchar_t wc);
wchar_t *fgetws_unlocked(wchar_t ws[restrict .n], int n,
 FILE *restrict stream);
int fputws_unlocked(const wchar_t *restrict ws,
 FILE *restrict stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getc_unlocked(), getchar_unlocked(), putc_unlocked(), putchar_unlocked():

    /* glibc >= 2.24: */ _POSIX_C_SOURCE >= 199309L
        || /* glibc <= 2.23: */ _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

clearerr_unlocked(), feof_unlocked(), ferror_unlocked(), fileno_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), getwchar_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwchar_unlocked(), fgetws_unlocked(), fputws_unlocked():

    _GNU_SOURCE

DESCRIPTION

Each of these functions has the same behavior as its counterpart without the “_unlocked” suffix, except that they do not use locking (they do not set locks themselves, and do not test for the presence of locks set by others) and hence are thread-unsafe. See flockfile(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getc_unlocked(), putc_unlocked(), clearerr_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked(), fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwc_unlocked(), fgetws_unlocked(), fputws_unlocked()

Thread safety

MT-Safe race:stream

getchar_unlocked(), getwchar_unlocked()

Thread safety

MT-Unsafe race:stdin

putchar_unlocked(), putwchar_unlocked()

Thread safety

MT-Unsafe race:stdout

feof_unlocked(), ferror_unlocked(), fileno_unlocked()

Thread safetyMT-Safe

STANDARDS

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2008.

Others:
None.

HISTORY

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2001.

SEE ALSO

flockfile(3), stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1080 - Linux cli command Net_DNS_RR_MINFOpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_MINFOpm and provides detailed information about the command Net_DNS_RR_MINFOpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_MINFOpm.

NAME 🖥️ Net_DNS_RR_MINFOpm 🖥️

DNS MINFO resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR(name MINFO rmailbx emailbx);

DESCRIPTION

Class for DNS Mailbox Information (MINFO) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

rmailbx

$rmailbx = $rr->rmailbx; $rr->rmailbx( $rmailbx );

A domain name which specifies a mailbox which is responsible for the mailing list or mailbox. If this domain name names the root, the owner of the MINFO RR is responsible for itself. Note that many existing mailing lists use a mailbox X-request to identify the maintainer of mailing list X, e.g., Msgroup-request for Msgroup. This field provides a more general mechanism.

emailbx

$emailbx = $rr->emailbx; $rr->emailbx( $emailbx );

A domain name which specifies a mailbox which is to receive error messages related to the mailing list or mailbox specified by the owner of the MINFO RR (similar to the ERRORS-TO: field which has been proposed). If this domain name names the root, errors should be returned to the sender of the message.

COPYRIGHT

Copyright (c)1997 Michael Fuhr.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC1035(3.3.7) <https://iana.org/go/rfc1035#section-3.3.7>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1081 - Linux cli command NetPacket_ARPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command NetPacket_ARPpm and provides detailed information about the command NetPacket_ARPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the NetPacket_ARPpm.

NAME 🖥️ NetPacket_ARPpm 🖥️

Assemble and disassemble ARP (Address Resolution Protocol) packets.

VERSION

version 1.7.2

SYNOPSIS

use NetPacket::ARP; $tcp_obj = NetPacket::ARP->decode($raw_pkt); $tcp_pkt = NetPacket::ARP->encode(params…); # Not implemented

DESCRIPTION

NetPacket::ARP provides a set of routines for assembling and disassembling packets using ARP (Address Resolution Protocol).

Methods

“NetPacket::ARP->decode([RAW PACKET])”
Decode the raw packet data given and return an object containing instance data. This method will quite happily decode garbage input. It is the responsibility of the programmer to ensure valid packet data is passed to this method.

“NetPacket::ARP->encode(param => value)”
Return a ARP packet encoded with the instance data specified. Not implemented.

Functions

“NetPacket::ARP::strip([RAW PACKET])”
Return the encapsulated data (or payload) contained in the TCP packet. Since no payload data is encapulated in an ARP packet (only instance data), this function returns undef.

Instance data

The instance data for the NetPacket::ARP object consists of the following fields.

htype
Hardware type.

proto
Protocol type.

hlen
Header length.

plen
Protocol length.

opcode
One of the following constants:

  • ARP_OPCODE_REQUEST

  • ARP_OPCODE_REPLY

  • RARP_OPCODE_REQUEST

  • RARP_OPCODE_REPLY

sha
Source hardware address.

spa
Source protocol address.

tha
Target hardware address.

tpa
Target protocol address.

Exports

default
none

exportable
none

tags
The following tags group together related exportable items.

“:ALL”
All the above exportable items.

EXAMPLE

Print out arp requests on the local network.

#!/usr/bin/perl -w use Net::PcapUtils; use NetPacket::Ethernet qw(:types); use NetPacket::ARP; sub process_pkt { my ($arg, $hdr, $pkt) = @_; my $eth_obj = NetPacket::Ethernet->decode($pkt); if ($eth_obj->{type} == ETH_TYPE_ARP) { my $arp_obj = NetPacket::ARP->decode($eth_obj->{data}, $eth_obj); print(“source hw addr=$arp_obj->{sha}, " . “dest hw addr=$arp_obj->{tha} “); } }

Net::PcapUtils::loop(\process_pkt);

TODO

Implement encode() function

Does this work for protocols other than IP? Need to read RFC.

Example is a bit silly

COPYRIGHT

Copyright (c) 2001 Tim Potter.

Copyright (c) 1995,1996,1997,1998,1999 ANU and CSIRO on behalf of the participants in the CRC for Advanced Computational Systems (‘ACSys’).

This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

AUTHOR

Tim Potter <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1082 - Linux cli command setvbuf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setvbuf and provides detailed information about the command setvbuf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setvbuf.

NAME 🖥️ setvbuf 🖥️

stream buffering operations

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int setvbuf(FILE *restrict stream, char buf[restrict .size],
 int mode, size_t size);
void setbuf(FILE *restrict stream, char *restrict buf);
void setbuffer(FILE *restrict stream, char buf[restrict .size],
 size_t size);
void setlinebuf(FILE *stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

setbuffer(), setlinebuf():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The three types of buffering available are unbuffered, block buffered, and line buffered. When an output stream is unbuffered, information appears on the destination file or terminal as soon as written; when it is block buffered, many characters are saved up and written as a block; when it is line buffered, characters are saved up until a newline is output or input is read from any stream attached to a terminal device (typically stdin). The function fflush(3) may be used to force the block out early. (See fclose(3).)

Normally all files are block buffered. If a stream refers to a terminal (as stdout normally does), it is line buffered. The standard error stream stderr is always unbuffered by default.

The setvbuf() function may be used on any open stream to change its buffer. The mode argument must be one of the following three macros:

_IONBF
unbuffered

_IOLBF
line buffered

_IOFBF
fully buffered

Except for unbuffered files, the buf argument should point to a buffer at least size bytes long; this buffer will be used instead of the current buffer. If the argument buf is NULL, only the mode is affected; a new buffer will be allocated on the next read or write operation. The setvbuf() function may be used only after opening a stream and before any other operations have been performed on it.

The other three calls are, in effect, simply aliases for calls to setvbuf(). The setbuf() function is exactly equivalent to the call

setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);

The setbuffer() function is the same, except that the size of the buffer is up to the caller, rather than being determined by the default BUFSIZ. The setlinebuf() function is exactly equivalent to the call:

setvbuf(stream, NULL, _IOLBF, 0);

RETURN VALUE

The function setvbuf() returns 0 on success. It returns nonzero on failure (mode is invalid or the request cannot be honored). It may set errno on failure.

The other functions do not return a value.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setbuf(), setbuffer(), setlinebuf(), setvbuf()

Thread safetyMT-Safe

STANDARDS

setbuf()
setvbuf()
C11, POSIX.1-2008.

HISTORY

setbuf()
setvbuf()
C89, POSIX.1-2001.

CAVEATS

POSIX notes that the value of errno is unspecified after a call to setbuf() and further notes that, since the value of errno is not required to be unchanged after a successful call to setbuf(), applications should instead use setvbuf() in order to detect errors.

BUGS

You must make sure that the space that buf points to still exists by the time stream is closed, which also happens at program termination. For example, the following is invalid:

#include <stdio.h>
int
main(void)
{
    char buf[BUFSIZ];
    setbuf(stdout, buf);
    printf("Hello, world!

“); return 0; }

SEE ALSO

stdbuf(1), fclose(3), fflush(3), fopen(3), fread(3), malloc(3), printf(3), puts(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1083 - Linux cli command jnf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command jnf and provides detailed information about the command jnf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the jnf.

NAME 🖥️ jnf 🖥️

Bessel functions of the first kind

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double j0(double x);
double j1(double x);
double jn(int n, double x);
float j0f(float x);
float j1f(float x);
float jnf(int n, float x);
long double j0l(long double x);
long double j1l(long double x);
long double jnl(int n, long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

j0(), j1(), jn():

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

j0f(), j0l(), j1f(), j1l(), jnf(), jnl():

    _XOPEN_SOURCE >= 600
        || (_ISOC99_SOURCE && _XOPEN_SOURCE)
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The j0() and j1() functions return Bessel functions of x of the first kind of orders 0 and 1, respectively. The jn() function returns the Bessel function of x of the first kind of order n.

The j0f(), j1f(), and jnf(), functions are versions that take and return float values. The j0l(), j1l(), and jnl() functions are versions that take and return long double values.

RETURN VALUE

On success, these functions return the appropriate Bessel value of the first kind for x.

If x is a NaN, a NaN is returned.

If x is too large in magnitude, or the result underflows, a range error occurs, and the return value is 0.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error: result underflow, or x is too large in magnitude
errno is set to ERANGE.

These functions do not raise exceptions for fetestexcept(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

j0(), j0f(), j0l()

Thread safetyMT-Safe

j1(), j1f(), j1l()

Thread safetyMT-Safe

jn(), jnf(), jnl()

Thread safetyMT-Safe

STANDARDS

j0()
j1()
jn()
POSIX.1-2008.

Others:
BSD.

HISTORY

j0()
j1()
jn()
SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008.

Others:
BSD.

BUGS

There are errors of up to 2e-16 in the values returned by j0(), j1(), and jn() for values of x between -8 and 8.

SEE ALSO

y0(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1084 - Linux cli command memmem

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command memmem and provides detailed information about the command memmem, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the memmem.

NAME 🖥️ memmem 🖥️

locate a substring

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <string.h>
void *memmem(const void haystack[.haystacklen], size_t haystacklen,
 const void needle[.needlelen], size_t needlelen);

DESCRIPTION

The memmem() function finds the start of the first occurrence of the substring needle of length needlelen in the memory area haystack of length haystacklen.

RETURN VALUE

The memmem() function returns a pointer to the beginning of the substring, or NULL if the substring is not found.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

memmem()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

musl libc 0.9.7; FreeBSD 6.0, OpenBSD 5.4, NetBSD, Illumos.

BUGS

In glibc 2.0, if needle is empty, memmem() returns a pointer to the last byte of haystack. This is fixed in glibc 2.1.

SEE ALSO

bstring(3), strstr(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1085 - Linux cli command Tk_Imagepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Imagepm and provides detailed information about the command Tk_Imagepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Imagepm.

NAME 🖥️ Tk_Imagepm 🖥️

Create and manipulate images

SYNOPSIS

$image = $widget->type(?arg arg …?)

$image->method(?arg arg …?)

DESCRIPTION

The image constructors and methods are used to create, delete, and query images. It can take several different forms, depending on the type.

The constructors require a $widget to invoke them, this is used to locate a MainWindow. (This is because the underlying Tk code registers the images in the data structure for the MainWindow.)

The legal forms are:

$widget->type?(?name?,?option=>value …)?
Creates a new image and returns an object. type specifies the type of the image, which must be one of the types currently defined (e.g., Bitmap). name specifies the name for the image; if it is omitted then Tk picks a name of the form imagex, where x is an integer. There may be any number of option=>value pairs, which provide configuration options for the new image. The legal set of options is defined separately for each image type; see below for details on the options for built-in image types. If an image already exists by the given name then it is replaced with the new image and any instances of that image will redisplay with the new contents.

$image->delete
Deletes the image $image and returns an empty string. If there are instances of the image displayed in widgets, the image won’t actually be deleted until all of the instances are released. However, the association between the instances and the image manager will be dropped. Existing instances will retain their sizes but redisplay as empty areas. If a deleted image is recreated (with the same name) the existing instances will use the new image.

$image->height
Returns a decimal string giving the height of image name in pixels.

$image->inuse
Returns a boolean value indicating whether or not the image is in use by any widgets.

$widget->imageNames
Returns a list containing all existing images for $widget’s MainWindow.

$image->type
Returns the type of $image (the value of the type method when the image was created).

$widget->imageTypes
Returns a list whose elements are all of the valid image types (i.e., all of the values that may be supplied for the type to create an image).

$image->width
Returns a decimal string giving the width of image name in pixels.

BUILT-IN IMAGE TYPES

The following image types are defined by Tk so they will be available in any Tk application. Individual applications or extensions may define additional types.

Bitmap
Each pixel in the image displays a foreground color, a background color, or nothing. See Tk::Bitmap for more information.

Pixmap
Pixmap is slightly more general than Bitmap, each pixel can be any available color or “transparent” (rendered as background color of the widget image is displayed in). Pixmap is best used for icons and other simple graphics with only a few colors. Pixmap is derived from Tix. See Tk::Pixmap for more information.

Photo
Displays a variety of full-color images, using dithering to approximate colors on displays with limited color capabilities. See Tk::Photo documentation for more information.

CAVEATS

It’s necessary to use the “delete” method to delete an image object and free memory associated with it. Just using a lexical variable for storing the image object and letting the variable to go out of scope or setting to undef is not sufficient.

SEE ALSO

Tk::Bitmap Tk::Pixmap Tk::Photo

KEYWORDS

height, image, types of images, width

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1086 - Linux cli command Image_ExifTool_ZIPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_ZIPpm and provides detailed information about the command Image_ExifTool_ZIPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_ZIPpm.

NAME 🖥️ Image_ExifTool_ZIPpm 🖥️

Read ZIP archive meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to extract meta information from ZIP, GZIP and RAR archives. This includes ZIP-based file types like Office Open XML (DOCX, PPTX and XLSX), Open Document (ODB, ODC, ODF, ODG, ODI, ODP, ODS and ODT), iWork (KEY, PAGES, NUMBERS), Capture One Enhanced Image Package (EIP), Adobe InDesign Markup Language (IDML), Electronic Publication (EPUB), and Sketch design files (SKETCH).

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.pkware.com/documents/casestudies/APPNOTE.TXT>

<http://www.gzip.org/zlib/rfc-gzip.html>

<http://DataCompression.info/ArchiveFormats/RAR202.txt>

<https://www.rarlab.com/technote.htm>

SEE ALSO

“ZIP Tags” in Image::ExifTool::TagNames, “OOXML Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1087 - Linux cli command strstr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strstr and provides detailed information about the command strstr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strstr.

NAME 🖥️ strstr 🖥️

locate a substring

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strstr(const char *haystack, const char *needle);
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <string.h>
char *strcasestr(const char *haystack, const char *needle);

DESCRIPTION

The strstr() function finds the first occurrence of the substring needle in the string haystack. The terminating null bytes (‘�’) are not compared.

The strcasestr() function is like strstr(), but ignores the case of both arguments.

RETURN VALUE

These functions return a pointer to the beginning of the located substring, or NULL if the substring is not found.

If needle is the empty string, the return value is always haystack itself.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strstr()

Thread safetyMT-Safe

strcasestr()

Thread safetyMT-Safe locale

STANDARDS

strstr()
C11, POSIX.1-2008.

strcasestr()
GNU.

HISTORY

strstr()
POSIX.1-2001, C89.

strcasestr()
GNU.

SEE ALSO

memchr(3), memmem(3), strcasecmp(3), strchr(3), string(3), strpbrk(3), strsep(3), strspn(3), strtok(3), wcsstr(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1088 - Linux cli command Tk_megapm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_megapm and provides detailed information about the command Tk_megapm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_megapm.

NAME 🖥️ Tk_megapm 🖥️

Perl/Tk support for writing widgets in pure Perl

SYNOPSIS

Define the widget’s new class name:

**package Tk::**MyNewWidget;

For composite widget classes:

use base qw/ Tk::container /; # where container is Frame or Toplevel

For derived widget classes:

use base qw/ Tk::Derived Tk::DerivedWidget /;

Install the new widget in Tk’s namespace and establish class and instance constructors.

**Construct Tk::**Widget ‘MyNewWidget’;

sub ClassInit { my ($self, $args) = @_; … }

sub Populate { my ($self, $args) = @_; … }

DESCRIPTION

The goal of the mega-widget support of Perl/Tk is to make it easy to write mega-widgets that obey the same protocol and interface that the Tk core widgets support. For mega-widget sample code please run the widget demonstration program and go to the section Sample Perl Mega-Widgets.

There are two kinds of mega-widgets:

  • Composite Widgets A composite widget is composed with one or more existing widgets. The composite widget looks to the user like a simple single widget. A well known example is the file selection box.

  • Derived Widgets A derived widget adds/modifies/removes properties and methods from a single widget (this widget may itself be a mega-widget).

MEGA-WIDGET SUPPORT

Give a subwidget a symbolic name.

Usage:

$self->Advertise(name=>$widget);

Gives a subwidget $widget of the mega-widget $self the name name. One can retrieve the reference of an advertised subwidget with the Subwidget method.

Comment: Mega-Widget Writers: Please make sure to document the advertised widgets that are intended for public use. If there are none, document this fact, e.g.:

=head1 ADVERTISED WIDGETS None.

Callback

Invoke a callback specified with an option.

Usage:

$self->Callback(-option ?,args …?);

Callback executes the callback defined with $self->ConfigSpecs(-option, [CALLBACK, …]); If args are given they are passed to the callback. If -option is not defined it does nothing.

ClassInit

Initialization of the mega-widget class.

Usage:

sub ClassInit { my ($class, $mw) = @_; … }

ClassInit is called once for each MainWindow just before the first widget instance of a class is created in the widget tree of MainWindow.

ClassInit is often used to define bindings and/or other resources shared by all instances, e.g., images.

Examples:

$mw->bind($class,"<Tab>", sub { my $w = shift; $w->Insert(" “); $w->focus; $w->break}); $mw->bind($class,"<Return>”, [Insert," “]); $mw->bind($class,"<Delete>",Delete);

Notice that $class is the class name (e.g. Tk::MyText) and $mw is the mainwindow.

Don’t forget to call $class->SUPER::ClassInit($mw) in ClassInit.

Component

Convenience function to create subwidgets.

Usage:

$cw->Component(Whatever, AdvertisedName, -delegate => [method1, method2, …], … more widget options …, );

Component does several things for you with one call:

o Creates the widget o Advertises it with a given name (overridden by ‘Name’ option) o Delegates a set of methods to this widget (optional)

Example:

$cw->Component(Button, quitButton, -command => sub{$mw->destroy});

ConfigSpecs

Defines options and their treatment

Usage:

$cw->ConfigSpecs( -option => [ where, dbname, dbclass, default], …, DEFAULT => [where], );

Defines the options of a mega-widget and what actions are triggered by configure/cget of an option (see Tk::ConfigSpecs and Tk::Derived for details).

Construct

Make the new mega-widget known to Tk.

Usage:

Construct baseclass ‘Name’;

Construct declares the new widget class so that your mega-widget works like normal Perl/Tk widgets.

Examples:

Construct Tk::Widget ‘Whatever’; Construct Tk::Menu ‘MyItem’;

First example lets one use $widget->Whatever to create new Whatever widget.

The second example restricts the usage of the MyItem constructor method to widgets that are derived from Menu: $isamenu->MyItem.

CreateArgs

Process options before any widget is created:

sub CreateArgs { my ($package, $parent, $args) = @_; …; return @newargs; }

$package is the package of the mega-widget (e.g., Tk::MyText, $parent the parent of the widget to be created and $args the hash reference to the options specified in the widget constructor call.

Don’t forget to call $package->SUPER::CreateArgs($parent, $args) in CreateArgs.

Delegates

Redirect a method of the mega-widget to a subwidget of the composite widget

Usage:

$cw->Delegates( method1 => $subwidget1, method2 => advertived_name, …, Construct => $subwidget2, DEFAULT => $subwidget3, );

The ‘Construct’ delegation has a special meaning. After ‘Construct’ is delegated all Widget constructors are redirected. E.g. after

$self->Delegates(‘Construct’=>$subframe);

a $self->Button does really a $subframe->Button so the created button is a child of $subframe and not $self.

Comment: Delegates works only with methods that $cw does not have itself.

InitObject

Note: this method should not, in general, be used, as it has been superceeded by Populate and specifying Tk::Derived as one of the base classes.

Defines construction and interface of derived widgets.

Usage:

sub InitObject { my ($derived, $args) = @_; … }

where $derived is the widget reference of the already created baseclass widget and $args is the reference to a hash of -option-value pairs.

InitObject is almost identical to Populate method. Populate does some more ‘magic’ things useful for mega-widgets with several widgets.

Don’t forget to call $derived->SUPER::InitObject($args) in InitObject.

OnDestroy

Define a callback invoked when the mega-widget is destroyed.

Usage:

$widget->OnDestroy(callback);

OnDestroy installs a callback that’s called when a widget is going to to be destroyed. Useful for special cleanup actions. It differs from a normal destroy in that all the widget’s data structures are still intact.

Comment: This method could be used with any widgets not just for mega-widgets. It’s listed here because of its usefulness.

Populate

Defines construction and interface of the composite widget.

Usage:

sub Populate { my ($self, $args) = @_; … }

where $self is the widget reference of the already created baseclass widget and $args is the reference to a hash of -option-value pairs.

Most the other support function are normally used inside the Populate subroutine.

Don’t forget to call $cw->SUPER::Populate($args) in Populate.

privateData

Set/get a private hash of a widget to storage composite internal data

Usage:

$hashref = $self->privateData();

$another = $self->privateData(unique_key|package);

Subwidget

Get the widget reference of an advertised subwidget.

@subwidget = $cw->Subwidget();

$subwidget = $cw->Subwidget(name);

@subwidget = $cw->Subwidget(name ?,…?);

Returns the widget reference(s) of the subwidget known under the given name(s). Without arguments, return all known subwidgets of $cw. See Advertise method how to define name for a subwidget.

Comment: Mega-Widget Users: Use Subwidget to get only documented subwidgets.

PITFALLS

  • Resource DB class name Some of the standard options use a resource date base class that is not equal to the resource database name. E.g., Switch: Name: Class: -padx padX Pad -activerelief activeRelief Relief -activebackground activeBackground Foreground -status undef undef One should do the same when one defines one of these options via ConfigSpecs.

  • Method delegation Redirecting methods to a subwidget with Delegate can only work if the base widget itself does have a method with this name. Therefore one can’t ``delegate’’ any of the methods listed in Tk::Widget. A common problematic method is bind. In this case one as to explicitly redirect the method. sub bind { my $self = shift; my $to = $self->privateData->{my_bind_target}; $to->bind(@_); }

  • privateData Graham Barr wrote: … It is probably more private than most people think. Not all calls to privateData will return that same HASH reference. The HASH reference that is returned depends on the package it was called from, a different HASH is returned for each package. This allows a widget to hold private data, but then if it is sub-classed the sub-class will get a different HASH and so not cause duplicate name clashes. But privateData does take an optional argument if you want to force which HASH is returned.

  • Scrolled and Composite Scrolled(Kind,…) constructor can not be used with Composite. One has to use $cw->Composite(ScrlKind => ’name’, …);

MISSING

Of course Perl/Tk does not define support function for all necessities. Here’s a short list of things you have to handle yourself:

  • No support to define construction-time only options.

  • No support to remove an option that is known to the base widget.

  • It’s hard to define undef as fallback for an widget option that is not already undef.

  • Frame in Perl/Tk carries magic and overhead not needed for composite widget class definition.

  • No support methods for bindings that are shared between all widgets of a composite widget (makes sense at all?)

KEYWORDS

mega, composite, derived, widget

SEE ALSO

Tk::composite Tk::ConfigSpecs Tk::option Tk::callbacks Tk::bind

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1089 - Linux cli command XtUnmanageChild

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtUnmanageChild and provides detailed information about the command XtUnmanageChild, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtUnmanageChild.

NAME 🖥️ XtUnmanageChild 🖥️

manage and unmanage children

SYNTAX

#include <X11/Intrinsic.h>

typedef Widget *WidgetList;

void XtManageChildren(WidgetList children, Cardinal num_children);

void XtManageChild(Widget child);

void XtUnmanageChildren(WidgetList children, Cardinal num_children);

void XtUnmanageChild(Widget child);

void XtChangeManagedSet(WidgetList unmanage_children, Cardinal num_unmanage_children, XtDoChangeProc do_change_proc, XtPointer client_data, WidgetList manage_children, Cardinal num_manage_children);

Boolean XtIsManaged(Widget widget);

ARGUMENTS

child
Specifies the child.

children
Specifies a list of child widgets.

num_children
Specifies the number of children.

widget
Specifies the widget.

manage_children
Specifies the list of widget children to add to the managed set.

num_manage_children
Specifies the number of entries in the manage_children list.

unmanage_children
Specifies the list of widget children to remove from the managed set.

num_unmanage_children
Specifies the number of entries in the unmanage_children list.

do_change_proc
Specifies the post unmanage, pre manage hook procedure to invoke.

client_data
Specifies the client data to be passed to the hook procedure.

DESCRIPTION

The XtManageChildren function performs the following:

  • Issues an error if the children do not all have the same parent or if the parent is not a subclass of compositeWidgetClass.

  • Returns immediately if the common parent is being destroyed; otherwise, for each unique child on the list, XtManageChildren ignores the child if it already is managed or is being destroyed and marks it if not.

  • If the parent is realized and after all children have been marked, it makes some of the newly managed children viewable:

    • Calls the change_managed routine of the widgets’ parent.

    • Calls XtRealizeWidget on each previously unmanaged child that is unrealized.

    • Maps each previously unmanaged child that has map_when_managed True.

Managing children is independent of the ordering of children and independent of creating and deleting children. The layout routine of the parent should consider children whose managed field is True and should ignore all other children. Note that some composite widgets, especially fixed boxes, call XtManageChild from their insert_child procedure.

If the parent widget is realized, its change_managed procedure is called to notify it that its set of managed children has changed. The parent can reposition and resize any of its children. It moves each child as needed by calling XtMoveWidget, which first updates the x and y fields and then calls XMoveWindow if the widget is realized.

The XtManageChild function constructs a WidgetList of length one and calls XtManageChildren.

The XtUnmanageChildren function performs the following:

  • Issues an error if the children do not all have the same parent or if the parent is not a subclass of compositeWidgetClass.

  • Returns immediately if the common parent is being destroyed; otherwise, for each unique child on the list, XtUnmanageChildren performs the following:

    • Ignores the child if it already is unmanaged or is being destroyed and marks it if not.

    • If the child is realized, it makes it nonvisible by unmapping it.

  • Calls the change_managed routine of the widgets’ parent after all children have been marked if the parent is realized.

XtUnmanageChildren does not destroy the children widgets. Removing widgets from a parent’s managed set is often a temporary banishment, and, some time later, you may manage the children again.

The XtUnmanageChild function constructs a widget list of length one and calls XtUnmanageChildren.

The XtChangeManagedSet function performs the following:

  • Issues an error if the widgets specified in the manage_children and the unmanage_children lists to no all have the same parent, or if that parent is not a subclass of compositeWidgetClass.

  • Returns immediately if the common parent is being destroyed.

  • If no CompositeClassExtension is defined, or a CompositeClassExtension is defined but with an allows_change_managed_set field with a value of False, and XtChangeManagedSet was invoked with a non-NULL do_change_proc procedure then XtChangeManagedSet performs the following:

    • Calls XtUnmanageChildren (unmanage_children, num_unmanage_children).

    • Calls the do_change_proc specified.

    • Calls XtManageChildren (manage_children, num_manage_children) and then returns immediately.

  • Otherwise, if a CompositeClassExtension is defined with an allows_change_managed_set field with a value of True, or if no CompositeClassExtension is defined, and XtChangeManagedSet was invoked with a NULL do_change_proc procedure, then the following is performed:

    • For each child on the unmanage_children list; if the child is already unmanaged or is being destroyed it is ignored, otherwise it is marked as being unmanaged and if it is realized it is made nonvisible by being unmapped.

    • If the do_change_proc procedure is non-NULL then it is invoked as specified.

    • For each child on the manage_children list; if the child is already managed or it is being destroyed it is ignored, otherwise it is marked as managed

  • If the parent is realized and after all children have been marked, the change_managed method of the parent is invoked and subsequently some of the newly managed children are made viewable by:

    • Calling XtRealizeWidget on each of the previously unmanaged child that is unrealized.

    • Mapping each previously unmanaged child that has map_when_managed True.

The XtIsManaged function returns True if the specified widget is of class RectObj or any subclass thereof and is managed, or False otherwise.

SEE ALSO

XtMapWidget(3), XtRealizeWidget(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1090 - Linux cli command mprobe

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mprobe and provides detailed information about the command mprobe, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mprobe.

NAME 🖥️ mprobe 🖥️

heap consistency checking

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <mcheck.h>
int mcheck(void (*abortfunc)(enum mcheck_status mstatus));
int mcheck_pedantic(void (*abortfunc)(enum mcheck_status mstatus));
void mcheck_check_all(void);
enum mcheck_status mprobe(void *ptr);

DESCRIPTION

The mcheck() function installs a set of debugging hooks for the malloc(3) family of memory-allocation functions. These hooks cause certain consistency checks to be performed on the state of the heap. The checks can detect application errors such as freeing a block of memory more than once or corrupting the bookkeeping data structures that immediately precede a block of allocated memory.

To be effective, the mcheck() function must be called before the first call to malloc(3) or a related function. In cases where this is difficult to ensure, linking the program with -lmcheck inserts an implicit call to mcheck() (with a NULL argument) before the first call to a memory-allocation function.

The mcheck_pedantic() function is similar to mcheck(), but performs checks on all allocated blocks whenever one of the memory-allocation functions is called. This can be very slow!

The mcheck_check_all() function causes an immediate check on all allocated blocks. This call is effective only if mcheck() is called beforehand.

If the system detects an inconsistency in the heap, the caller-supplied function pointed to by abortfunc is invoked with a single argument, mstatus, that indicates what type of inconsistency was detected. If abortfunc is NULL, a default function prints an error message on stderr and calls abort(3).

The mprobe() function performs a consistency check on the block of allocated memory pointed to by ptr. The mcheck() function should be called beforehand (otherwise mprobe() returns MCHECK_DISABLED).

The following list describes the values returned by mprobe() or passed as the mstatus argument when abortfunc is invoked:

MCHECK_DISABLED (mprobe() only)
mcheck() was not called before the first memory allocation function was called. Consistency checking is not possible.

MCHECK_OK (mprobe() only)
No inconsistency detected.

MCHECK_HEAD
Memory preceding an allocated block was clobbered.

MCHECK_TAIL
Memory following an allocated block was clobbered.

MCHECK_FREE
A block of memory was freed twice.

RETURN VALUE

mcheck() and mcheck_pedantic() return 0 on success, or -1 on error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mcheck(), mcheck_pedantic(), mcheck_check_all(), mprobe()

Thread safety

MT-Unsafe race:mcheck const:malloc_hooks

STANDARDS

GNU.

HISTORY

mcheck_pedantic()
mcheck_check_all()
glibc 2.2.

mcheck()
mprobe()
glibc 2.0.

NOTES

Linking a program with -lmcheck and using the MALLOC_CHECK_ environment variable (described in mallopt(3)) cause the same kinds of errors to be detected. But, using MALLOC_CHECK_ does not require the application to be relinked.

EXAMPLES

The program below calls mcheck() with a NULL argument and then frees the same block of memory twice. The following shell session demonstrates what happens when running the program:

$ ./a.out
About to free
About to free a second time
block freed twice
Aborted (core dumped)

Program source

#include <mcheck.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    char *p;
    if (mcheck(NULL) != 0) {
        fprintf(stderr, "mcheck() failed

“); exit(EXIT_FAILURE); } p = malloc(1000); fprintf(stderr, “About to free “); free(p); fprintf(stderr, " About to free a second time “); free(p); exit(EXIT_SUCCESS); }

SEE ALSO

malloc(3), mallopt(3), mtrace(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1091 - Linux cli command posix_openpt

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command posix_openpt and provides detailed information about the command posix_openpt, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the posix_openpt.

NAME 🖥️ posix_openpt 🖥️

open a pseudoterminal device

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
#include <fcntl.h>
int posix_openpt(int flags);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

posix_openpt():

    _XOPEN_SOURCE >= 600

DESCRIPTION

The posix_openpt() function opens an unused pseudoterminal master device, returning a file descriptor that can be used to refer to that device.

The flags argument is a bit mask that ORs together zero or more of the following flags:

O_RDWR
Open the device for both reading and writing. It is usual to specify this flag.

O_NOCTTY
Do not make this device the controlling terminal for the process.

RETURN VALUE

On success, posix_openpt() returns a file descriptor (a nonnegative integer) which is the lowest numbered unused file descriptor. On failure, -1 is returned, and errno is set to indicate the error.

ERRORS

See open(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

posix_openpt()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.2.1. POSIX.1-2001.

It is part of the UNIX 98 pseudoterminal support (see pts(4)).

NOTES

Some older UNIX implementations that support System V (aka UNIX 98) pseudoterminals don’t have this function, but it can be easily implemented by opening the pseudoterminal multiplexor device:

int
posix_openpt(int flags)
{
    return open("/dev/ptmx", flags);
}

Calling posix_openpt() creates a pathname for the corresponding pseudoterminal slave device. The pathname of the slave device can be obtained using ptsname(3). The slave device pathname exists only as long as the master device is open.

SEE ALSO

open(2), getpt(3), grantpt(3), ptsname(3), unlockpt(3), pts(4), pty(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1092 - Linux cli command ptsname_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ptsname_r and provides detailed information about the command ptsname_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ptsname_r.

NAME 🖥️ ptsname_r 🖥️

get the name of the slave pseudoterminal

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
char *ptsname(int fd);
int ptsname_r(int fd, char buf[.buflen], size_t buflen);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

ptsname():

    Since glibc 2.24:
        _XOPEN_SOURCE >= 500
    glibc 2.23 and earlier:
        _XOPEN_SOURCE

ptsname_r():

    _GNU_SOURCE

DESCRIPTION

The ptsname() function returns the name of the slave pseudoterminal device corresponding to the master referred to by the file descriptor fd.

The ptsname_r() function is the reentrant equivalent of ptsname(). It returns the name of the slave pseudoterminal device as a null-terminated string in the buffer pointed to by buf. The buflen argument specifies the number of bytes available in buf.

RETURN VALUE

On success, ptsname() returns a pointer to a string in static storage which will be overwritten by subsequent calls. This pointer must not be freed. On failure, NULL is returned.

On success, ptsname_r() returns 0. On failure, an error number is returned to indicate the error.

ERRORS

EINVAL
(ptsname_r() only) buf is NULL. (This error is returned only for glibc 2.25 and earlier.)

ENOTTY
fd does not refer to a pseudoterminal master device.

ERANGE
(ptsname_r() only) buf is too small.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

ptsname()

Thread safetyMT-Unsafe race:ptsname

ptsname_r()

Thread safetyMT-Safe

VERSIONS

A version of ptsname_r() is documented on Tru64 and HP-UX, but on those implementations, -1 is returned on error, with errno set to indicate the error. Avoid using this function in portable programs.

STANDARDS

ptsname():
POSIX.1-2008.

ptsname_r() is a Linux extension, that is proposed for inclusion in the next major revision of POSIX.1 (Issue 8).

HISTORY

ptsname():
POSIX.1-2001. glibc 2.1.

ptsname() is part of the UNIX 98 pseudoterminal support (see pts(4)).

SEE ALSO

grantpt(3), posix_openpt(3), ttyname(3), unlockpt(3), pts(4), pty(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1093 - Linux cli command hdestroy_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command hdestroy_r and provides detailed information about the command hdestroy_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the hdestroy_r.

NAME 🖥️ hdestroy_r 🖥️

hash table management

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <search.h>
int hcreate(size_t nel);
void hdestroy(void);
ENTRY *hsearch(ENTRY item, ACTION action);
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <search.h>
int hcreate_r(size_t nel, struct hsearch_data *htab);
void hdestroy_r(struct hsearch_data *htab);
int hsearch_r(ENTRY item, ACTION action, ENTRY **retval,
 struct hsearch_data *htab);

DESCRIPTION

The three functions hcreate(), hsearch(), and hdestroy() allow the caller to create and manage a hash search table containing entries consisting of a key (a string) and associated data. Using these functions, only one hash table can be used at a time.

The three functions hcreate_r(), hsearch_r(), hdestroy_r() are reentrant versions that allow a program to use more than one hash search table at the same time. The last argument, htab, points to a structure that describes the table on which the function is to operate. The programmer should treat this structure as opaque (i.e., do not attempt to directly access or modify the fields in this structure).

First a hash table must be created using hcreate(). The argument nel specifies the maximum number of entries in the table. (This maximum cannot be changed later, so choose it wisely.) The implementation may adjust this value upward to improve the performance of the resulting hash table.

The hcreate_r() function performs the same task as hcreate(), but for the table described by the structure *htab. The structure pointed to by htab must be zeroed before the first call to hcreate_r().

The function hdestroy() frees the memory occupied by the hash table that was created by hcreate(). After calling hdestroy(), a new hash table can be created using hcreate(). The hdestroy_r() function performs the analogous task for a hash table described by *htab, which was previously created using hcreate_r().

The hsearch() function searches the hash table for an item with the same key as item (where “the same” is determined using strcmp(3)), and if successful returns a pointer to it.

The argument item is of type ENTRY, which is defined in <search.h> as follows:

typedef struct entry {
    char *key;
    void *data;
} ENTRY;

The field key points to a null-terminated string which is the search key. The field data points to data that is associated with that key.

The argument action determines what hsearch() does after an unsuccessful search. This argument must either have the value ENTER, meaning insert a copy of item (and return a pointer to the new hash table entry as the function result), or the value FIND, meaning that NULL should be returned. (If action is FIND, then data is ignored.)

The hsearch_r() function is like hsearch() but operates on the hash table described by *htab. The hsearch_r() function differs from hsearch() in that a pointer to the found item is returned in *retval, rather than as the function result.

RETURN VALUE

hcreate() and hcreate_r() return nonzero on success. They return 0 on error, with errno set to indicate the error.

On success, hsearch() returns a pointer to an entry in the hash table. hsearch() returns NULL on error, that is, if action is ENTER and the hash table is full, or action is FIND and item cannot be found in the hash table. hsearch_r() returns nonzero on success, and 0 on error. In the event of an error, these two functions set errno to indicate the error.

ERRORS

hcreate_r() and hdestroy_r() can fail for the following reasons:

EINVAL
htab is NULL.

hsearch() and hsearch_r() can fail for the following reasons:

ENOMEM
action was ENTER, key was not found in the table, and there was no room in the table to add a new entry.

ESRCH
action was FIND, and key was not found in the table.

POSIX.1 specifies only the ENOMEM error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

hcreate(), hsearch(), hdestroy()

Thread safetyMT-Unsafe race:hsearch

hcreate_r(), hsearch_r(), hdestroy_r()

Thread safetyMT-Safe race:htab

STANDARDS

hcreate()
hsearch()
hdestroy()
POSIX.1-2008.

hcreate_r()
hsearch_r()
hdestroy_r()
GNU.

HISTORY

hcreate()
hsearch()
hdestroy()
SVr4, POSIX.1-2001.

hcreate_r()
hsearch_r()
hdestroy_r()
GNU.

NOTES

Hash table implementations are usually more efficient when the table contains enough free space to minimize collisions. Typically, this means that nel should be at least 25% larger than the maximum number of elements that the caller expects to store in the table.

The hdestroy() and hdestroy_r() functions do not free the buffers pointed to by the key and data elements of the hash table entries. (It can’t do this because it doesn’t know whether these buffers were allocated dynamically.) If these buffers need to be freed (perhaps because the program is repeatedly creating and destroying hash tables, rather than creating a single table whose lifetime matches that of the program), then the program must maintain bookkeeping data structures that allow it to free them.

BUGS

SVr4 and POSIX.1-2001 specify that action is significant only for unsuccessful searches, so that an ENTER should not do anything for a successful search. In libc and glibc (before glibc 2.3), the implementation violates the specification, updating the data for the given key in this case.

Individual hash table entries can be added, but not deleted.

EXAMPLES

The following program inserts 24 items into a hash table, then prints some of them.

#include <search.h>
#include <stdio.h>
#include <stdlib.h>
static char *data[] = { "alpha", "bravo", "charlie", "delta",
     "echo", "foxtrot", "golf", "hotel", "india", "juliet",
     "kilo", "lima", "mike", "november", "oscar", "papa",
     "quebec", "romeo", "sierra", "tango", "uniform",
     "victor", "whisky", "x-ray", "yankee", "zulu"
};
int
main(void)
{
    ENTRY e;
    ENTRY *ep;
    hcreate(30);
    for (size_t i = 0; i < 24; i++) {
        e.key = data[i];
        /* data is just an integer, instead of a
           pointer to something */
        e.data = (void *) i;
        ep = hsearch(e, ENTER);
        /* there should be no failures */
        if (ep == NULL) {
            fprintf(stderr, "entry failed

“); exit(EXIT_FAILURE); } } for (size_t i = 22; i < 26; i++) { /* print two entries from the table, and show that two are not in the table */ e.key = data[i]; ep = hsearch(e, FIND); printf("%9.9s -> %9.9s:%d “, e.key, ep ? ep->key : “NULL”, ep ? (int)(ep->data) : 0); } hdestroy(); exit(EXIT_SUCCESS); }

SEE ALSO

bsearch(3), lsearch(3), malloc(3), tsearch(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1094 - Linux cli command Net_DNS_RR_HIPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_HIPpm and provides detailed information about the command Net_DNS_RR_HIPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_HIPpm.

NAME 🖥️ Net_DNS_RR_HIPpm 🖥️

DNS HIP resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name IN HIP algorithm hit key servers);

DESCRIPTION

Class for DNS Host Identity Protocol (HIP) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

algorithm

$algorithm = $rr->algorithm; $rr->algorithm( $algorithm );

The PK algorithm field indicates the public key cryptographic algorithm and the implied public key field format. The values are those defined for the IPSECKEY algorithm type [RFC4025].

hit

$hit = $rr->hit; $rr->hit( $hit );

The hexadecimal representation of the host identity tag.

hitbin

$hitbin = $rr->hitbin; $rr->hitbin( $hitbin );

The binary representation of the host identity tag.

key

$key = $rr->key; $rr->key( $key );

The hexadecimal representation of the public key.

keybin

$keybin = $rr->keybin; $rr->keybin( $keybin );

The binary representation of the public key.

servers

@servers = $rr->servers;

Optional list of domain names of rendezvous servers.

COPYRIGHT

Copyright (c)2009 Olaf Kolkman, NLnet Labs

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC8005 <https://tools.ietf.org/html/rfc8005>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1095 - Linux cli command getnameinfo

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getnameinfo and provides detailed information about the command getnameinfo, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getnameinfo.

NAME 🖥️ getnameinfo 🖥️

address-to-name translation in protocol-independent manner

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/socket.h>
#include <netdb.h>
int getnameinfo(const struct sockaddr *restrict addr",socklen_t"addrlen,
 char host[_Nullable restrict .hostlen],
 socklen_t hostlen,
 char serv[_Nullable restrict .servlen],
 socklen_t servlen,
 int flags);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getnameinfo():

    Since glibc 2.22:
        _POSIX_C_SOURCE >= 200112L
    glibc 2.21 and earlier:
        _POSIX_C_SOURCE

DESCRIPTION

The getnameinfo() function is the inverse of getaddrinfo(3): it converts a socket address to a corresponding host and service, in a protocol-independent manner. It combines the functionality of gethostbyaddr(3) and getservbyport(3), but unlike those functions, getnameinfo() is reentrant and allows programs to eliminate IPv4-versus-IPv6 dependencies.

The addr argument is a pointer to a generic socket address structure (of type sockaddr_in or sockaddr_in6) of size addrlen that holds the input IP address and port number. The arguments host and serv are pointers to caller-allocated buffers (of size hostlen and servlen respectively) into which getnameinfo() places null-terminated strings containing the host and service names respectively.

The caller can specify that no hostname (or no service name) is required by providing a NULL host (or serv) argument or a zero hostlen (or servlen) argument. However, at least one of hostname or service name must be requested.

The flags argument modifies the behavior of getnameinfo() as follows:

NI_NAMEREQD
If set, then an error is returned if the hostname cannot be determined.

NI_DGRAM
If set, then the service is datagram (UDP) based rather than stream (TCP) based. This is required for the few ports (512–514) that have different services for UDP and TCP.

NI_NOFQDN
If set, return only the hostname part of the fully qualified domain name for local hosts.

NI_NUMERICHOST
If set, then the numeric form of the hostname is returned. (When not set, this will still happen in case the node’s name cannot be determined.)

NI_NUMERICSERV
If set, then the numeric form of the service address is returned. (When not set, this will still happen in case the service’s name cannot be determined.)

Extensions to getnameinfo() for Internationalized Domain Names

Starting with glibc 2.3.4, getnameinfo() has been extended to selectively allow hostnames to be transparently converted to and from the Internationalized Domain Name (IDN) format (see RFC 3490, Internationalizing Domain Names in Applications (IDNA)). Three new flags are defined:

NI_IDN
If this flag is used, then the name found in the lookup process is converted from IDN format to the locale’s encoding if necessary. ASCII-only names are not affected by the conversion, which makes this flag usable in existing programs and environments.

NI_IDN_ALLOW_UNASSIGNED
NI_IDN_USE_STD3_ASCII_RULES
Setting these flags will enable the IDNA_ALLOW_UNASSIGNED (allow unassigned Unicode code points) and IDNA_USE_STD3_ASCII_RULES (check output to make sure it is a STD3 conforming hostname) flags respectively to be used in the IDNA handling.

RETURN VALUE

On success, 0 is returned, and node and service names, if requested, are filled with null-terminated strings, possibly truncated to fit the specified buffer lengths. On error, one of the following nonzero error codes is returned:

EAI_AGAIN
The name could not be resolved at this time. Try again later.

EAI_BADFLAGS
The flags argument has an invalid value.

EAI_FAIL
A nonrecoverable error occurred.

EAI_FAMILY
The address family was not recognized, or the address length was invalid for the specified family.

EAI_MEMORY
Out of memory.

EAI_NONAME
The name does not resolve for the supplied arguments. NI_NAMEREQD is set and the host’s name cannot be located, or neither hostname nor service name were requested.

EAI_OVERFLOW
The buffer pointed to by host or serv was too small.

EAI_SYSTEM
A system error occurred. The error code can be found in errno.

The gai_strerror(3) function translates these error codes to a human readable string, suitable for error reporting.

FILES

/etc/hosts
/etc/nsswitch.conf
/etc/resolv.conf

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getnameinfo()

Thread safetyMT-Safe env locale

STANDARDS

POSIX.1-2008. RFC 2553.

HISTORY

glibc 2.1. POSIX.1-2001.

Before glibc 2.2, the hostlen and servlen arguments were typed as size_t.

NOTES

In order to assist the programmer in choosing reasonable sizes for the supplied buffers, <netdb.h> defines the constants

#define NI_MAXHOST      1025
#define NI_MAXSERV      32

Since glibc 2.8, these definitions are exposed only if suitable feature test macros are defined, namely: _GNU_SOURCE, _DEFAULT_SOURCE (since glibc 2.19), or (in glibc versions up to and including 2.19) _BSD_SOURCE or _SVID_SOURCE.

The former is the constant MAXDNAME in recent versions of BIND’s <arpa/nameser.h> header file. The latter is a guess based on the services listed in the current Assigned Numbers RFC.

EXAMPLES

The following code tries to get the numeric hostname and service name, for a given socket address. Note that there is no hardcoded reference to a particular address family.

struct sockaddr *addr;     /* input */
socklen_t addrlen;         /* input */
char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV];
if (getnameinfo(addr, addrlen, hbuf, sizeof(hbuf), sbuf,
            sizeof(sbuf), NI_NUMERICHOST | NI_NUMERICSERV) == 0)
    printf("host=%s, serv=%s

“, hbuf, sbuf);

The following version checks if the socket address has a reverse address mapping.

struct sockaddr *addr;     /* input */
socklen_t addrlen;         /* input */
char hbuf[NI_MAXHOST];
if (getnameinfo(addr, addrlen, hbuf, sizeof(hbuf),
            NULL, 0, NI_NAMEREQD))
    printf("could not resolve hostname");
else
    printf("host=%s

“, hbuf);

An example program using getnameinfo() can be found in getaddrinfo(3).

SEE ALSO

accept(2), getpeername(2), getsockname(2), recvfrom(2), socket(2), getaddrinfo(3), gethostbyaddr(3), getservbyname(3), getservbyport(3), inet_ntop(3), hosts(5), services(5), hostname(7), named(8)

R. Gilligan, S. Thomson, J. Bound and W. Stevens, Basic Socket Interface Extensions for IPv6, RFC 2553, March 1999.

Tatsuya Jinmei and Atsushi Onoe, An Extension of Format for IPv6 Scoped Addresses, internet draft, work in progress .

Craig Metz, Protocol Independence Using the Sockets API, Proceedings of the freenix track: 2000 USENIX annual technical conference, June 2000

.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1096 - Linux cli command Image_ExifTool_WritePDFpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_WritePDFpm and provides detailed information about the command Image_ExifTool_WritePDFpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_WritePDFpm.

NAME 🖥️ Image_ExifTool_WritePDFpm 🖥️

Write PDF meta information

SYNOPSIS

These routines are autoloaded by Image::ExifTool::PDF.

DESCRIPTION

This file contains routines to write PDF metadata.

NOTES

When writing a PDF, exiftool does not modify the existing data. Instead, the PDF file is appended with an incremental update which can easily be removed to revert the file (by using ExifTool to delete the special PDF-update pseudo group).

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://partners.adobe.com/public/developer/pdf/index_reference.html>

SEE ALSO

Image::ExifTool::PDF (3pm), Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1097 - Linux cli command Net_SSLeay_Handlepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_SSLeay_Handlepm and provides detailed information about the command Net_SSLeay_Handlepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_SSLeay_Handlepm.

NAME 🖥️ Net_SSLeay_Handlepm 🖥️

Perl module that lets SSL (HTTPS) sockets be handled as standard file handles.

SYNOPSIS

use Net::SSLeay::Handle qw/shutdown/; my ($host, $port) = (“localhost”, 443); tie(*SSL, “Net::SSLeay::Handle”, $host, $port); print SSL “GET / HTTP/1.0 “; shutdown(\SSL, 1); print while (<SSL>); close SSL;

DESCRIPTION

Net::SSLeay::Handle allows you to request and receive HTTPS web pages using “old-fashion” file handles as in:

print SSL “GET / HTTP/1.0 “;

and

print while (<SSL>);

If you export the shutdown routine, then the only extra code that you need to add to your program is the tie function as in:

my $socket; if ($scheme eq “https”) { tie(*S2, “Net::SSLeay::Handle”, $host, $port); $socket = \S2; else { $socket = Net::SSLeay::Handle->make_socket($host, $port); } print $socket $request_headers; …

FUNCTIONS

shutdown
shutdown(\SOCKET, $mode) Calls to the main shutdown() don’t work with tied sockets created with this module. This shutdown should be able to distinquish between tied and untied sockets and do the right thing.

debug
my $debug = Net::SSLeay::Handle->debug() Net::SSLeay::Handle->debug(1) Get/set debugging mode. Always returns the debug value before the function call. if an additional argument is given the debug option will be set to this value.

make_socket
my $sock = Net::SSLeay::Handle->make_socket($host, $port); Creates a socket that is connected to $post using $port. It uses $Net::SSLeay::proxyhost and proxyport if set and authentificates itself against this proxy depending on $Net::SSLeay::proxyauth. It also turns autoflush on for the created socket.

USING EXISTING SOCKETS

One of the motivations for writing this module was to avoid duplicating socket creation code (which is mostly error handling). The calls to tie() above where it is passed a $host and $port is provided for convenience testing. If you already have a socket connected to the right host and port, S1, then you can do something like:

my $socket \S1; if ($scheme eq “https”) { tie(*S2, “Net::SSLeay::Handle”, $socket); $socket = \S2; } my $last_sel = select($socket); $| = 1; select($last_sel); print $socket $request_headers; …

Note: As far as I know you must be careful with the globs in the tie() function. The first parameter must be a glob (*SOMETHING) and the last parameter must be a reference to a glob (\SOMETHING_ELSE) or a scaler that was assigned to a reference to a glob (as in the example above)

Also, the two globs must be different. When I tried to use the same glob, I got a core dump.

EXPORT

None by default.

You can export the shutdown() function.

It is suggested that you do export shutdown() or use the fully qualified Net::SSLeay::Handle::shutdown() function to shutdown SSL sockets. It should be smart enough to distinguish between SSL and non-SSL sockets and do the right thing.

EXAMPLES

use Net::SSLeay::Handle qw/shutdown/; my ($host, $port) = (“localhost”, 443); tie(*SSL, “Net::SSLeay::Handle”, $host, $port); print SSL “GET / HTTP/1.0 “; shutdown(\SSL, 1); print while (<SSL>); close SSL;

TODO

Better error handling. Callback routine?

CAVEATS

Tying to a file handle is a little tricky (for me at least).

The first parameter to tie() must be a glob (*SOMETHING) and the last parameter must be a reference to a glob (\SOMETHING_ELSE) or a scaler that was assigned to a reference to a glob ($s = \SOMETHING_ELSE). Also, the two globs must be different. When I tried to use the same glob, I got a core dump.

I was able to associate attributes to globs created by this module (like *SSL above) by making a hash of hashes keyed by the file head1.

CHANGES

Please see Net-SSLeay-Handle-0.50/Changes file.

BUGS

If you encounter a problem with this module that you believe is a bug, please create a new issue <https://github.com/radiator-software/p5-net-ssleay/issues/new> in the Net-SSLeay GitHub repository. Please make sure your bug report includes the following information:

  • the code you are trying to run;

  • your operating system name and version;

  • the output of perl -V;

  • the version of OpenSSL or LibreSSL you are using.

AUTHOR

Originally written by Jim Bowlin.

Maintained by Sampo Kellomäki between July 2001 and August 2003.

Maintained by Florian Ragwitz between November 2005 and January 2010.

Maintained by Mike McCauley between November 2005 and June 2018.

Maintained by Tuure Vartiainen between June 2018 and July 2018.

Maintained by Chris Novakovic and Heikki Vatiainen since June 2018.

COPYRIGHT

Copyright (c) 2001 Jim Bowlin <[email protected]>

Copyright (c) 2001-2003 Sampo Kellomäki <[email protected]>

Copyright (c) 2005-2010 Florian Ragwitz <[email protected]>

Copyright (c) 2005-2018 Mike McCauley <[email protected]>

Copyright (c) 2018 Tuure Vartiainen <[email protected]>

Copyright (c) 2018- Chris Novakovic <[email protected]>

Copyright (c) 2018- Heikki Vatiainen <[email protected]>

All rights reserved.

LICENSE

This module is released under the terms of the Artistic License 2.0. For details, see the LICENSE file distributed with Net-SSLeay’s source code.

SEE ALSO

Net::SSLeay, perl (1), http://openssl.org/

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1098 - Linux cli command pthread_mutexattr_getrobust

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_mutexattr_getrobust and provides detailed information about the command pthread_mutexattr_getrobust, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_mutexattr_getrobust.

NAME 🖥️ pthread_mutexattr_getrobust 🖥️

get and set the robustness attribute of a mutex attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_mutexattr_getrobust(const pthread_mutexattr_t *attr,
 int *robustness);
int pthread_mutexattr_setrobust(pthread_mutexattr_t *attr,
 int robustness);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

pthread_mutexattr_getrobust(), pthread_mutexattr_setrobust():

    _POSIX_C_SOURCE >= 200809L

DESCRIPTION

The pthread_mutexattr_getrobust() function places the value of the robustness attribute of the mutex attributes object referred to by attr in *robustness. The pthread_mutexattr_setrobust() function sets the value of the robustness attribute of the mutex attributes object referred to by attr to the value specified in *robustness.

The robustness attribute specifies the behavior of the mutex when the owning thread dies without unlocking the mutex. The following values are valid for robustness:

PTHREAD_MUTEX_STALLED
This is the default value for a mutex attributes object. If a mutex is initialized with the PTHREAD_MUTEX_STALLED attribute and its owner dies without unlocking it, the mutex remains locked afterwards and any future attempts to call pthread_mutex_lock(3) on the mutex will block indefinitely.

PTHREAD_MUTEX_ROBUST
If a mutex is initialized with the PTHREAD_MUTEX_ROBUST attribute and its owner dies without unlocking it, any future attempts to call pthread_mutex_lock(3) on this mutex will succeed and return EOWNERDEAD to indicate that the original owner no longer exists and the mutex is in an inconsistent state. Usually after EOWNERDEAD is returned, the next owner should call pthread_mutex_consistent(3) on the acquired mutex to make it consistent again before using it any further.

If the next owner unlocks the mutex using pthread_mutex_unlock(3) before making it consistent, the mutex will be permanently unusable and any subsequent attempts to lock it using pthread_mutex_lock(3) will fail with the error ENOTRECOVERABLE. The only permitted operation on such a mutex is pthread_mutex_destroy(3).

If the next owner terminates before calling pthread_mutex_consistent(3), further pthread_mutex_lock(3) operations on this mutex will still return EOWNERDEAD.

Note that the attr argument of pthread_mutexattr_getrobust() and pthread_mutexattr_setrobust() should refer to a mutex attributes object that was initialized by pthread_mutexattr_init(3), otherwise the behavior is undefined.

RETURN VALUE

On success, these functions return 0. On error, they return a positive error number.

In the glibc implementation, pthread_mutexattr_getrobust() always return zero.

ERRORS

EINVAL
A value other than PTHREAD_MUTEX_STALLED or PTHREAD_MUTEX_ROBUST was passed to pthread_mutexattr_setrobust().

VERSIONS

In the Linux implementation, when using process-shared robust mutexes, a waiting thread also receives the EOWNERDEAD notification if the owner of a robust mutex performs an execve(2) without first unlocking the mutex. POSIX.1 does not specify this detail, but the same behavior also occurs in at least some other implementations.

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.12. POSIX.1-2008.

Before the addition of pthread_mutexattr_getrobust() and pthread_mutexattr_setrobust() to POSIX, glibc defined the following equivalent nonstandard functions if _GNU_SOURCE was defined:

[[deprecated]]
int pthread_mutexattr_getrobust_np(const pthread_mutexattr_t *attr,
 int *robustness);
[[deprecated]]
int pthread_mutexattr_setrobust_np(const pthread_mutexattr_t *attr,
 int robustness);

Correspondingly, the constants PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP were also defined.

These GNU-specific APIs, which first appeared in glibc 2.4, are nowadays obsolete and should not be used in new programs; since glibc 2.34 these APIs are marked as deprecated.

EXAMPLES

The program below demonstrates the use of the robustness attribute of a mutex attributes object. In this program, a thread holding the mutex dies prematurely without unlocking the mutex. The main thread subsequently acquires the mutex successfully and gets the error EOWNERDEAD, after which it makes the mutex consistent.

The following shell session shows what we see when running this program:

$ ./a.out
[original owner] Setting lock...
[original owner] Locked. Now exiting without unlocking.
[main] Attempting to lock the robust mutex.
[main] pthread_mutex_lock() returned EOWNERDEAD
[main] Now make the mutex consistent
[main] Mutex is now consistent; unlocking

Program source

#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define handle_error_en(en, msg) \
        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
static pthread_mutex_t mtx;
static void *
original_owner_thread(void *ptr)
{
    printf("[original owner] Setting lock...

“); pthread_mutex_lock(&mtx); printf("[original owner] Locked. Now exiting without unlocking. “); pthread_exit(NULL); } int main(void) { pthread_t thr; pthread_mutexattr_t attr; int s; pthread_mutexattr_init(&attr); pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST); pthread_mutex_init(&mtx, &attr); pthread_create(&thr, NULL, original_owner_thread, NULL); sleep(2); /* “original_owner_thread” should have exited by now. */ printf("[main] Attempting to lock the robust mutex. “); s = pthread_mutex_lock(&mtx); if (s == EOWNERDEAD) { printf("[main] pthread_mutex_lock() returned EOWNERDEAD “); printf("[main] Now make the mutex consistent “); s = pthread_mutex_consistent(&mtx); if (s != 0) handle_error_en(s, “pthread_mutex_consistent”); printf("[main] Mutex is now consistent; unlocking “); s = pthread_mutex_unlock(&mtx); if (s != 0) handle_error_en(s, “pthread_mutex_unlock”); exit(EXIT_SUCCESS); } else if (s == 0) { printf("[main] pthread_mutex_lock() unexpectedly succeeded “); exit(EXIT_FAILURE); } else { printf("[main] pthread_mutex_lock() unexpectedly failed “); handle_error_en(s, “pthread_mutex_lock”); } }

SEE ALSO

get_robust_list(2), set_robust_list(2), pthread_mutex_consistent(3), pthread_mutex_init(3), pthread_mutex_lock(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1099 - Linux cli command wcsdup

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcsdup and provides detailed information about the command wcsdup, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcsdup.

NAME 🖥️ wcsdup 🖥️

duplicate a wide-character string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
wchar_t *wcsdup(const wchar_t *s);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

wcsdup():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The wcsdup() function is the wide-character equivalent of the strdup(3) function. It allocates and returns a new wide-character string whose initial contents is a duplicate of the wide-character string pointed to by s.

Memory for the new wide-character string is obtained with malloc(3), and should be freed with free(3).

RETURN VALUE

On success, wcsdup() returns a pointer to the new wide-character string. On error, it returns NULL, with errno set to indicate the error.

ERRORS

ENOMEM
Insufficient memory available to allocate duplicate string.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcsdup()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

libc5, glibc 2.0.

SEE ALSO

strdup(3), wcscpy(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1100 - Linux cli command XML_XPathEnginepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_XPathEnginepm and provides detailed information about the command XML_XPathEnginepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_XPathEnginepm.

NAME 🖥️ XML_XPathEnginepm 🖥️

a re-usable XPath engine for DOM-like trees

DESCRIPTION

This module provides an XPath engine, that can be re-used by other module/classes that implement trees.

In order to use the XPath engine, nodes in the user module need to mimic DOM nodes. The degree of similitude between the user tree and a DOM dictates how much of the XPath features can be used. A module implementing all of the DOM should be able to use this module very easily (you might need to add the cmp method on nodes in order to get ordered result sets).

This code is a more or less direct copy of the XML::XPath module by Matt Sergeant. I only removed the XML processing part to remove the dependency on XML::Parser, applied a couple of patches, renamed a whole lot of methods to make Pod::Coverage happy, and changed the docs.

The article eXtending XML XPath, http://www.xmltwig.com/article/extending_xml_xpath/ should give authors who want to use this module enough background to do so.

Otherwise, my email is below ;–)

WARNING: while the underlying code is rather solid, this module mostly lacks docs. As they say, patches welcome…

SYNOPSIS

use XML::XPathEngine; my $tree= my_tree->new( …); my $xp = XML::XPathEngine->new(); my @nodeset = $xp->find(/root/kid/grandkid[1], $tree); # find all first grankids package XML::MyTree; # needs to provide DOM methods

DETAILS

API

XML::XPathEngine will provide the following methods:

new

findnodes ($path, $context)

Returns a list of nodes found by $path, optionally in context $context. In scalar context returns an XML::XPathEngine::NodeSet object.

findnodes_as_string ($path, $context)

Returns the nodes found as a single string. The result is not guaranteed to be valid XML though (it could for example be just text if the query returns attribute values).

findnodes_as_strings ($path, $context)

Returns the nodes found as a list of strings, one per node found.

findvalue ($path, $context)

Returns the result as a string (the concatenation of the values of the result nodes).

findvalues($path, $context)

Returns the values of the result nodes as a list of strings.

exists ($path, $context)

Returns true if the given path exists.

matches($node, $path, $context)

Returns true if the node matches the path.

find ($path, $context)

The find function takes an XPath expression (a string) and returns either a XML::XPathEngine::NodeSet object containing the nodes it found (or empty if no nodes matched the path), or one of XML::XPathEngine::Literal (a string), XML::XPathEngine::Number, or XML::XPathEngine::Boolean. It should always return something - and you can use ->isa() to find out what it returned. If you need to check how many nodes it found you should check $nodeset->size. See XML::XPathEngine::NodeSet.

getNodeText ($path)

Returns the text string for a particular node. Returns a string, or undef if the node doesn’t exist.

set_namespace ($prefix, $uri)

Sets the namespace prefix mapping to the uri.

Normally in XML::XPathEngine the prefixes in XPath node tests take their context from the current node. This means that foo:bar will always match an element <foo:bar> regardless of the namespace that the prefix foo is mapped to (which might even change within the document, resulting in unexpected results). In order to make prefixes in XPath node tests actually map to a real URI, you need to enable that via a call to the set_namespace method of your XML::XPathEngine object.

clear_namespaces ()

Clears all previously set namespace mappings.

get_namespace ($prefix, $node)

Returns the uri associated to the prefix for the node (mostly for internal usage)

set_strict_namespaces ($strict)

By default, for historical as well as convenience reasons, XML::XPathEngine has a slightly non-standard way of dealing with the default namespace.

If you search for //tag it will return elements tag. As far as I understand it, if the document has a default namespace, this should not return anything. You would have to first do a set_namespace, and then search using the namespace.

Passing a true value to set_strict_namespaces will activate this behaviour, passing a false value will return it to its default behaviour.

set_var ($var. $val)

Sets an XPath variable (that can be used in queries as $var)

get_var ($var)

Returns the value of the XPath variable (mostly for internal usage)

$XML::XPathEngine::Namespaces

Set this to 0 if you don’t want namespace processing to occur. This will make everything a little (tiny) bit faster, but you’ll suffer for it, probably.

Node Object Model

Nodes need to provide the same API as nodes in XML::XPath (at least the access API, not the tree manipulation one).

Example

Please see the test files in t/ for examples on how to use XPath.

XPath extension

The module supports the XPath recommendation to the same extend as XML::XPath (that is, rather completely).

It includes a perl-specific extension: direct support for regular expressions.

You can use the usual (in Perl!) =~ and !~ operators. Regular expressions are / delimited (no other delimiter is accepted, \ inside regexp must be backslashed), the imsx modifiers can be used.

$xp->findnodes( //@att[.=~ /^v.$/]); # returns the list of attributes att # whose value matches ^v.$

SEE ALSO

XML::XPath

HTML::TreeBuilder::XPath, XML::Twig::XPath for examples of using this module

Tree::XPathEngine for a similar module for non-XML trees.

<http://www.xmltwig.com/article/extending_xml_xpath/> for background information. The last section of the article summarizes how to reuse XML::XPath. As XML::XPathEngine offers the same API it should help you

AUTHOR

Michel Rodriguez, <[email protected]> Most code comes directly from XML::XPath, by Matt Sergeant.

BUGS

Please report any bugs or feature requests to [email protected], or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=XML-XPathEngine>. I will be notified, and then you’ll automatically be notified of progress on your bug as I make changes.

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

XML::XPath Copyright 2000 AxKit.com Ltd. Copyright 2006 Michel Rodriguez, All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1101 - Linux cli command zip_rename

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_rename and provides detailed information about the command zip_rename, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_rename.

libzip (-lzip)

is the obsolete version of

It is the same as calling

with an empty flags argument.

was added in libzip 0.6. In libzip 0.10 the type of

was changed from

to

It was deprecated in libzip 0.11, use

instead.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1102 - Linux cli command group_member

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command group_member and provides detailed information about the command group_member, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the group_member.

NAME 🖥️ group_member 🖥️

test whether a process is in a group

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
int group_member(gid_t gid);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

group_member():

    _GNU_SOURCE

DESCRIPTION

The group_member() function tests whether any of the caller’s supplementary group IDs (as returned by getgroups(2)) matches gid.

RETURN VALUE

The group_member() function returns nonzero if any of the caller’s supplementary group IDs matches gid, and zero otherwise.

STANDARDS

GNU.

SEE ALSO

getgid(2), getgroups(2), getgrouplist(3), group(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1103 - Linux cli command off_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command off_ttype and provides detailed information about the command off_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the off_ttype.

NAME 🖥️ off_ttype 🖥️

file sizes

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/types.h>
typedef /* ... */ off_t;
#define _LARGEFILE64_SOURCE
#include <sys/types.h>
typedef /* ... */ off64_t;
#define _GNU_SOURCE
#include <sys/types.h>
typedef /* ... */ loff_t;

DESCRIPTION

off_t is used for describing file sizes. It is a signed integer type.

off64_t is a 64-bit version of the type, used in glibc.

loff_t is a 64-bit version of the type, introduced by the Linux kernel.

STANDARDS

off_t
POSIX.1-2008.

off64_t
GNU and some BSDs.

loff_t
Linux.

VERSIONS

off_t
POSIX.1-2001.

<aio.h> and <stdio.h> define off_t since POSIX.1-2008.

NOTES

On some architectures, the width of off_t can be controlled with the feature test macro _FILE_OFFSET_BITS.

The following headers also provide off_t: <aio.h>, <fcntl.h>, <stdio.h>, <sys/mman.h>, <sys/stat.h>, and <unistd.h>.

SEE ALSO

copy_file_range(2), llseek(2), lseek(2), mmap(2), posix_fadvise(2), pread(2), readahead(2), sync_file_range(2), truncate(2), fseeko(3), lockf(3), lseek64(3), posix_fallocate(3), feature_test_macros(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1104 - Linux cli command printf_infotype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command printf_infotype and provides detailed information about the command printf_infotype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the printf_infotype.

NAME 🖥️ printf_infotype 🖥️

define custom behavior for printf-like functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <printf.h>
int register_printf_specifier(int spec, printf_function func,
 printf_arginfo_size_function arginfo);
int register_printf_modifier(const wchar_t *str);
int register_printf_type(printf_va_arg_function fct);

Callbacks

typedef int printf_function(FILE *stream, const struct printf_info *info,
 const void *const args[]);
typedef int printf_arginfo_size_function(const struct printf_info *info,
 size_t n, int argtypes[n], int size[n]);
typedef void printf_va_arg_function(void *mem, va_list *ap);

Types

struct printf_info {
 int prec; // Precision
 int width; // Width
 wchar_t spec; // Format letter
 unsigned int is_long_double:1;// L or ll flag
 unsigned int is_short:1; // h flag
 unsigned int is_long:1; // l flag
 unsigned int alt:1; // # flag
 unsigned int space:1; // Space flag
 unsigned int left:1; // - flag
 unsigned int showsign:1; // + flag
 unsigned int group:1; // ' flag
 unsigned int extra:1; // For special use
 unsigned int is_char:1; // hh flag
 unsigned int wide:1; // True for wide character streams
 unsigned int i18n:1; // I flag
 unsigned int is_binary128:1; /* Floating-point argument is
  ABI-compatible with
  IEC 60559 binary128 */
 unsigned short user; // Bits for user-installed modifiers
 wchar_t pad; // Padding character
};

Constants

#define PA_FLAG_LONG_LONG /* ... */
#define PA_FLAG_LONG_DOUBLE /* ... */
#define PA_FLAG_LONG /* ... */
#define PA_FLAG_SHORT /* ... */
#define PA_FLAG_PTR /* ... */

DESCRIPTION

These functions serve to extend and/or modify the behavior of the printf(3) family of functions.

register_printf_specifier()

This function registers a custom conversion specifier for the printf(3) family of functions.

spec
The character which will be used as a conversion specifier in the format string.

func
Callback function that will be executed by the printf(3) family of functions to format the input arguments into the output stream.

stream
Output stream where the formatted output should be printed. This stream transparently represents the output, even in the case of functions that write to a string.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in arginfo.

args
Array of pointers to the arguments to the printf(3) -like function.

arginfo
Callback function that will be executed by the printf(3) family of functions to know how many arguments should be parsed for the custom specifier and also their types.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in func.

n
Number of arguments remaining to be parsed.

argtypes
This array should be set to define the type of each of the arguments that will be parsed. Each element in the array represents one of the arguments to be parsed, in the same order that they are passed to the printf(3) -like function. Each element should be set to a base type (PA_*) from the enum above, or a custom one, and optionally ORed with an appropriate length modifier (PA_FLAG_*).

The type is determined by using one of the following constants:

PA_INT
int.

PA_CHAR
int, cast to char.

PA_WCHAR
wchar_t.

PA_STRING
const char *, a ‘�’-terminated string.

PA_WSTRING
const wchar_t *, a wide character L’�’-terminated string.

PA_POINTER
void *.

PA_FLOAT
float.

PA_DOUBLE
double.

PA_LAST
TODO.

size
For user-defined types, the size of the type (in bytes) should also be specified through this array. Otherwise, leave it unused.

arginfo is called before func, and prepares some information needed to call func.

register_printf_modifier()

TODO

register_printf_type()

TODO

RETURN VALUE

register_printf_specifier(), register_printf_modifier(), and register_printf_type() return zero on success, or -1 on error.

Callbacks

The callback of type printf_function should return the number of characters written, or -1 on error.

The callback of type printf_arginfo_size_function should return the number of arguments to be parsed by this specifier. It also passes information about the type of those arguments to the caller through argtypes. On error, it should return -1.

ERRORS

EINVAL
The specifier was not a valid character.

STANDARDS

GNU.

HISTORY

register_printf_function(3) is an older function similar to register_printf_specifier(), and is now deprecated. That function can’t handle user-defined types.

register_printf_specifier() supersedes register_printf_function(3).

EXAMPLES

The following example program registers the ‘b’ and ‘B’ specifiers to print integers in binary format, mirroring rules for other unsigned conversion specifiers like ‘x’ and ‘u’. This can be used to print in binary prior to C23.

/* This code is in the public domain */
#include <err.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <printf.h>
#define GROUP_SEP  '\''
struct Printf_Pad {
    char    ch;
    size_t  len;
};
static int b_printf(FILE *stream, const struct printf_info *info,
                    const void *const args[]);
static int b_arginf_sz(const struct printf_info *info,
                    size_t n, int argtypes[n], int size[n]);
static uintmax_t b_value(const struct printf_info *info,
                    const void *arg);
static size_t b_bin_repr(char bin[UINTMAX_WIDTH],
                    const struct printf_info *info, const void *arg);
static size_t b_bin_len(const struct printf_info *info,
                    ptrdiff_t min_len);
static size_t b_pad_len(const struct printf_info *info,
                    ptrdiff_t bin_len);
static ssize_t b_print_prefix(FILE *stream,
                    const struct printf_info *info);
static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info,
                    ptrdiff_t min_len);
static ssize_t b_print_number(FILE *stream,
                    const struct printf_info *info,
                    const char bin[UINTMAX_WIDTH],
                    size_t min_len, size_t bin_len);
static char pad_ch(const struct printf_info *info);
static ssize_t pad_spaces(FILE *stream, size_t pad_len);
int
main(void)
{
    if (register_printf_specifier('b', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('b', ...)");
    if (register_printf_specifier('B', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('B', ...)");
    printf("....----....----....----....----

“); printf("%llb; “, 0x5Ellu); printf("%lB; “, 0x5Elu); printf("%b; “, 0x5Eu); printf("%hB; “, 0x5Eu); printf("%hhb; “, 0x5Eu); printf("%jb; “, (uintmax_t)0x5E); printf("%zb; “, (size_t)0x5E); printf(”….—-….—-….—-….—- “); printf(”%#b; “, 0x5Eu); printf(”%#B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf("%10b; “, 0x5Eu); printf("%010b; “, 0x5Eu); printf(”%.10b; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%-10B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%‘B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”….—-….—-….—-….—- “); printf(”%#16.12b; “, 0xAB); printf(”%-#‘20.12b; “, 0xAB); printf(”%#‘020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#020B; “, 0xAB); printf(”%‘020B; “, 0xAB); printf("%020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#021B; “, 0xAB); printf(”%‘021B; “, 0xAB); printf("%021B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#022B; “, 0xAB); printf(”%‘022B; “, 0xAB); printf("%022B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#023B; “, 0xAB); printf(”%‘023B; “, 0xAB); printf("%023B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%-#‘19.11b; “, 0xAB); printf(”%#‘019B; “, 0xAB); printf(”%#019B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%‘019B; “, 0xAB); printf("%019B; “, 0xAB); printf(”%#016b; “, 0xAB); printf(”….—-….—-….—-….—- “); return 0; } static int b_printf(FILE *stream, const struct printf_info *info, const void const args[]) { char bin[UINTMAX_WIDTH]; size_t min_len, bin_len; ssize_t len, tmp; struct Printf_Pad pad = {0}; len = 0; min_len = b_bin_repr(bin, info, args[0]); bin_len = b_bin_len(info, min_len); pad.ch = pad_ch(info); if (pad.ch == ’ ‘) pad.len = b_pad_len(info, bin_len); / Padding with ’ ’ (right aligned) / if ((pad.ch == ’ ‘) && !info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } / “0b”/“0B” prefix / if (info->alt) { tmp = b_print_prefix(stream, info); if (tmp == EOF) return EOF; len += tmp; } / Padding with ‘0’ / if (pad.ch == ‘0’) { tmp = b_pad_zeros(stream, info, min_len); if (tmp == EOF) return EOF; len += tmp; } / Print number (including leading 0s to fill precision) / tmp = b_print_number(stream, info, bin, min_len, bin_len); if (tmp == EOF) return EOF; len += tmp; / Padding with ’ ’ (left aligned) */ if (info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } return len; } static int b_arginf_sz(const struct printf_info *info, size_t n, int argtypes[n], [[maybe_unused]] int size[n]) { if (n < 1) return -1; if (info->is_long_double) argtypes[0] = PA_INT | PA_FLAG_LONG_LONG; else if (info->is_long) argtypes[0] = PA_INT | PA_FLAG_LONG; else argtypes[0] = PA_INT; return 1; } static uintmax_t b_value(const struct printf_info *info, const void *arg) { if (info->is_long_double) return *(const unsigned long long *)arg; if (info->is_long) return *(const unsigned long )arg; / short and char are both promoted to int */ return *(const unsigned int *)arg; } static size_t b_bin_repr(char bin[UINTMAX_WIDTH], const struct printf_info *info, const void *arg) { size_t min_len; uintmax_t val; val = b_value(info, arg); bin[0] = ‘0’; for (min_len = 0; val; min_len++) { bin[min_len] = ‘0’ + (val % 2); val »= 1; } return MAX(min_len, 1); } static size_t b_bin_len(const struct printf_info *info, ptrdiff_t min_len) { return MAX(info->prec, min_len); } static size_t b_pad_len(const struct printf_info *info, ptrdiff_t bin_len) { ptrdiff_t pad_len; pad_len = info->width - bin_len; if (info->alt) pad_len -= 2; if (info->group) pad_len -= (bin_len - 1) / 4; return MAX(pad_len, 0); } static ssize_t b_print_prefix(FILE *stream, const struct printf_info *info) { ssize_t len; len = 0; if (fputc(‘0’, stream) == EOF) return EOF; len++; if (fputc(info->spec, stream) == EOF) return EOF; len++; return len; } static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info, ptrdiff_t min_len) { ssize_t len; ptrdiff_t tmp; len = 0; tmp = info->width - (info->alt * 2); if (info->group) tmp -= tmp / 5 - !(tmp % 5); for (ptrdiff_t i = tmp - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static ssize_t b_print_number(FILE *stream, const struct printf_info info, const char bin[UINTMAX_WIDTH], size_t min_len, size_t bin_len) { ssize_t len; len = 0; / Print leading zeros to fill precision / for (size_t i = bin_len - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } / Print number */ for (size_t i = min_len - 1; i < min_len; i–) { if (fputc(bin[i], stream) == EOF) return EOF; len++; if (!info->group || (i % 4) || !i) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static char pad_ch(const struct printf_info *info) { if ((info->prec != -1) || (info->pad == ’ ‘) || info->left) return ’ ‘; return ‘0’; } static ssize_t pad_spaces(FILE *stream, size_t pad_len) { ssize_t len; len = 0; for (size_t i = pad_len - 1; i < pad_len; i–) { if (fputc(’ ‘, stream) == EOF) return EOF; len++; } return len; }

SEE ALSO

asprintf(3), printf(3), wprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1105 - Linux cli command sqrtl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sqrtl and provides detailed information about the command sqrtl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sqrtl.

NAME 🖥️ sqrtl 🖥️

square root function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double sqrt(double x);
float sqrtf(float x);
long double sqrtl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sqrtf(), sqrtl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the nonnegative square root of x.

RETURN VALUE

On success, these functions return the square root of x.

If x is a NaN, a NaN is returned.

If x is +0 (-0), +0 (-0) is returned.

If x is positive infinity, positive infinity is returned.

If x is less than -0, a domain error occurs, and a NaN is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x less than -0
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sqrt(), sqrtf(), sqrtl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

SEE ALSO

cbrt(3), csqrt(3), hypot(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1106 - Linux cli command XdbeEndIdiom

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XdbeEndIdiom and provides detailed information about the command XdbeEndIdiom, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XdbeEndIdiom.

NAME 🖥️ XdbeEndIdiom 🖥️

marks the end of a DBE idiom sequence.

SYNOPSIS

#include <X11/extensions/Xdbe.h>

Status XdbeEndIdiom( Display *dpy)

DESCRIPTION

This function marks the end of an idiom sequence.

SEE ALSO

DBE, XdbeAllocateBackBufferName(), XdbeBeginIdiom(), XdbeDeallocateBackBufferName(), XdbeFreeVisualInfo(), XdbeGetBackBufferAttributes(), XdbeGetVisualInfo(), XdbeQueryExtension(), XdbeSwapBuffers().

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1107 - Linux cli command ftell

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ftell and provides detailed information about the command ftell, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ftell.

NAME 🖥️ ftell 🖥️

reposition a stream

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int fseek(FILE *stream, long offset, int whence);
long ftell(FILE *stream);
void rewind(FILE *stream);
int fgetpos(FILE *restrict stream, fpos_t *restrict pos);
int fsetpos(FILE *stream, const fpos_t *pos);

DESCRIPTION

The fseek() function sets the file position indicator for the stream pointed to by stream. The new position, measured in bytes, is obtained by adding offset bytes to the position specified by whence. If whence is set to SEEK_SET, SEEK_CUR, or SEEK_END, the offset is relative to the start of the file, the current position indicator, or end-of-file, respectively. A successful call to the fseek() function clears the end-of-file indicator for the stream and undoes any effects of the ungetc(3) function on the same stream.

The ftell() function obtains the current value of the file position indicator for the stream pointed to by stream.

The rewind() function sets the file position indicator for the stream pointed to by stream to the beginning of the file. It is equivalent to:

(void) fseek(stream, 0L, SEEK_SET)

except that the error indicator for the stream is also cleared (see clearerr(3)).

The fgetpos() and fsetpos() functions are alternate interfaces equivalent to ftell() and fseek() (with whence set to SEEK_SET), setting and storing the current value of the file offset into or from the object referenced by pos. On some non-UNIX systems, an fpos_t object may be a complex object and these routines may be the only way to portably reposition a text stream.

If the stream refers to a regular file and the resulting stream offset is beyond the size of the file, subsequent writes will extend the file with a hole, up to the offset, before committing any data. See lseek(2) for details on file seeking semantics.

RETURN VALUE

The rewind() function returns no value. Upon successful completion, fgetpos(), fseek(), fsetpos() return 0, and ftell() returns the current offset. Otherwise, -1 is returned and errno is set to indicate the error.

ERRORS

EINVAL
The whence argument to fseek() was not SEEK_SET, SEEK_END, or SEEK_CUR. Or: the resulting file offset would be negative.

ESPIPE
The file descriptor underlying stream is not seekable (e.g., it refers to a pipe, FIFO, or socket).

The functions fgetpos(), fseek(), fsetpos(), and ftell() may also fail and set errno for any of the errors specified for the routines fflush(3), fstat(2), lseek(2), and malloc(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fseek(), ftell(), rewind(), fgetpos(), fsetpos()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89.

SEE ALSO

lseek(2), fseeko(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1108 - Linux cli command getutline_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getutline_r and provides detailed information about the command getutline_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getutline_r.

NAME 🖥️ getutline_r 🖥️

access utmp file entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <utmp.h>
struct utmp *getutent(void);
struct utmp *getutid(const struct utmp *ut);
struct utmp *getutline(const struct utmp *ut);
struct utmp *pututline(const struct utmp *ut);
void setutent(void);
void endutent(void);
int utmpname(const char *file);

DESCRIPTION

New applications should use the POSIX.1-specified “utmpx” versions of these functions; see STANDARDS.

utmpname() sets the name of the utmp-format file for the other utmp functions to access. If utmpname() is not used to set the filename before the other functions are used, they assume _PATH_UTMP, as defined in <paths.h>.

setutent() rewinds the file pointer to the beginning of the utmp file. It is generally a good idea to call it before any of the other functions.

endutent() closes the utmp file. It should be called when the user code is done accessing the file with the other functions.

getutent() reads a line from the current file position in the utmp file. It returns a pointer to a structure containing the fields of the line. The definition of this structure is shown in utmp(5).

getutid() searches forward from the current file position in the utmp file based upon ut. If ut->ut_type is one of RUN_LVL, BOOT_TIME, NEW_TIME, or OLD_TIME, getutid() will find the first entry whose ut_type field matches ut->ut_type. If ut->ut_type is one of INIT_PROCESS, LOGIN_PROCESS, USER_PROCESS, or DEAD_PROCESS, getutid() will find the first entry whose ut_id field matches ut->ut_id.

getutline() searches forward from the current file position in the utmp file. It scans entries whose ut_type is USER_PROCESS or LOGIN_PROCESS and returns the first one whose ut_line field matches ut->ut_line.

pututline() writes the utmp structure ut into the utmp file. It uses getutid() to search for the proper place in the file to insert the new entry. If it cannot find an appropriate slot for ut, pututline() will append the new entry to the end of the file.

RETURN VALUE

getutent(), getutid(), and getutline() return a pointer to a struct utmp on success, and NULL on failure (which includes the “record not found” case). This struct utmp is allocated in static storage, and may be overwritten by subsequent calls.

On success pututline() returns ut; on failure, it returns NULL.

utmpname() returns 0 if the new name was successfully stored, or -1 on failure.

On failure, these functions errno set to indicate the error.

ERRORS

ENOMEM
Out of memory.

ESRCH
Record not found.

setutent(), pututline(), and the getut*() functions can also fail for the reasons described in open(2).

FILES

/var/run/utmp
database of currently logged-in users

/var/log/wtmp
database of past user logins

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getutent()

Thread safety

MT-Unsafe init race:utent race:utentbuf sig:ALRM timer

getutid(), getutline()

Thread safety

MT-Unsafe init race:utent sig:ALRM timer

pututline()

Thread safety

MT-Unsafe race:utent sig:ALRM timer

setutent(), endutent(), utmpname()

Thread safetyMT-Unsafe race:utent

In the above table, utent in race:utent signifies that if any of the functions setutent(), getutent(), getutid(), getutline(), pututline(), utmpname(), or endutent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

None.

HISTORY

XPG2, SVr4.

In XPG2 and SVID 2 the function pututline() is documented to return void, and that is what it does on many systems (AIX, HP-UX). HP-UX introduces a new function _pututline() with the prototype given above for pututline().

All these functions are obsolete now on non-Linux systems. POSIX.1-2001 and POSIX.1-2008, following SUSv1, does not have any of these functions, but instead uses

#include <utmpx.h> struct utmpx *getutxent(void); struct utmpx *getutxid(const struct utmpx *); struct utmpx *getutxline(const struct utmpx *); struct utmpx *pututxline(const struct utmpx *); void setutxent(void); void endutxent(void);

These functions are provided by glibc, and perform the same task as their equivalents without the “x”, but use struct utmpx, defined on Linux to be the same as struct utmp. For completeness, glibc also provides utmpxname(), although this function is not specified by POSIX.1.

On some other systems, the utmpx structure is a superset of the utmp structure, with additional fields, and larger versions of the existing fields, and parallel files are maintained, often /var/*/utmpx and /var/*/wtmpx.

Linux glibc on the other hand does not use a parallel utmpx file since its utmp structure is already large enough. The “x” functions listed above are just aliases for their counterparts without the “x” (e.g., getutxent() is an alias for getutent()).

NOTES

glibc notes

The above functions are not thread-safe. glibc adds reentrant versions

#include <utmp.h>
int getutent_r(struct utmp *ubuf, struct utmp **ubufp);
int getutid_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);
int getutline_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getutent_r(), getutid_r(), getutline_r():

    _GNU_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */    _SVID_SOURCE || _BSD_SOURCE

These functions are GNU extensions, analogs of the functions of the same name without the _r suffix. The ubuf argument gives these functions a place to store their result. On success, they return 0, and a pointer to the result is written in *ubufp. On error, these functions return -1. There are no utmpx equivalents of the above functions. (POSIX.1 does not specify such functions.)

EXAMPLES

The following example adds and removes a utmp record, assuming it is run from within a pseudo terminal. For usage in a real application, you should check the return values of getpwuid(3) and ttyname(3).

#include <pwd.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <utmp.h>
int
main(void)
{
    struct utmp entry;
    system("echo before adding entry:;who");
    entry.ut_type = USER_PROCESS;
    entry.ut_pid = getpid();
    strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen("/dev/"));
    /* only correct for ptys named /dev/tty[pqr][0-9a-z] */
    strcpy(entry.ut_id, ttyname(STDIN_FILENO) + strlen("/dev/tty"));
    entry.ut_time = time(NULL);
    strcpy(entry.ut_user, getpwuid(getuid())->pw_name);
    memset(entry.ut_host, 0, UT_HOSTSIZE);
    entry.ut_addr = 0;
    setutent();
    pututline(&entry);
    system("echo after adding entry:;who");
    entry.ut_type = DEAD_PROCESS;
    memset(entry.ut_line, 0, UT_LINESIZE);
    entry.ut_time = 0;
    memset(entry.ut_user, 0, UT_NAMESIZE);
    setutent();
    pututline(&entry);
    system("echo after removing entry:;who");
    endutent();
    exit(EXIT_SUCCESS);
}

SEE ALSO

getutmp(3), utmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1109 - Linux cli command XtAppGetErrorDatabaseText

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppGetErrorDatabaseText and provides detailed information about the command XtAppGetErrorDatabaseText, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppGetErrorDatabaseText.

NAME 🖥️ XtAppGetErrorDatabaseText 🖥️

obtain error database

SYNTAX

#include <X11/Intrinsic.h>

XrmDatabase *XtAppGetErrorDatabase( XtAppContext app_context);

void XtAppGetErrorDatabaseText(XtAppContext app_context, const char *name, const char *type, const char *class, const char *defaultMsg, char *buffer_return, int nbytes, XrmDatabase database);

ARGUMENTS

app_context
Specifies the application context.

buffer_return
Specifies the buffer into which the error message is to be returned.

class
Specifies the resource class of the error message.

database
Specifies the name of the alternative database that is to be used or NULL if the application’s database is to be used.

defaultMsg
Specifies the default message to use.

name

type
Specifies the name and type that are concatenated to form the resource name of the error message.

nbytes
Specifies the size of the buffer in bytes.

DESCRIPTION

The XtAppGetErrorDatabase function returns the address of the error database. The Intrinsics do a lazy binding of the error database and do not merge in the database file until the first call to XtAppGetErrorDatbaseText.

The XtAppGetErrorDatabaseText returns the appropriate message from the error database or returns the specified default message if one is not found in the error database.

SEE ALSO

XtAppError(3), XtAppErrorMsg(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1110 - Linux cli command nextdownl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command nextdownl and provides detailed information about the command nextdownl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the nextdownl.

NAME 🖥️ nextdownl 🖥️

return next floating-point number toward positive/negative infinity

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <math.h>
double nextup(double x);
float nextupf(float x);
long double nextupl(long double x);
double nextdown(double x);
float nextdownf(float x);
long double nextdownl(long double x);

DESCRIPTION

The nextup(), nextupf(), and nextupl() functions return the next representable floating-point number greater than x.

If x is the smallest representable negative number in the corresponding type, these functions return -0. If x is 0, the returned value is the smallest representable positive number of the corresponding type.

If x is positive infinity, the returned value is positive infinity. If x is negative infinity, the returned value is the largest representable finite negative number of the corresponding type.

If x is Nan, the returned value is NaN.

The value returned by nextdown(x) is -nextup(-x), and similarly for the other types.

RETURN VALUE

See DESCRIPTION.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

nextup(), nextupf(), nextupl(), nextdown(), nextdownf(), nextdownl()

Thread safetyMT-Safe

STANDARDS

These functions are described in IEEE Std 754-2008 - Standard for Floating-Point Arithmetic and ISO/IEC TS 18661.

HISTORY

glibc 2.24.

SEE ALSO

nearbyint(3), nextafter(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1111 - Linux cli command pcap_set_promiscpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_set_promiscpcap and provides detailed information about the command pcap_set_promiscpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_set_promiscpcap.

NAME 🖥️ pcap_set_promiscpcap 🖥️

set promiscuous mode for a not-yet-activated capture handle

SYNOPSIS

#include <pcap/pcap.h>
int pcap_set_promisc(pcap_t *p, int promisc);

DESCRIPTION

pcap_set_promisc() sets whether promiscuous mode should be set on a capture handle when the handle is activated. If promisc is non-zero, promiscuous mode will be set, otherwise it will not be set.

RETURN VALUE

pcap_set_promisc() returns 0 on success or PCAP_ERROR_ACTIVATED if called on a capture handle that has been activated.

SEE ALSO

pcap(3PCAP), pcap_create(3PCAP), pcap_activate(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1112 - Linux cli command XtGetSelectionTimeout

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGetSelectionTimeout and provides detailed information about the command XtGetSelectionTimeout, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGetSelectionTimeout.

NAME 🖥️ XtGetSelectionTimeout 🖥️

set and obtain selection timeout values

SYNTAX

#include <X11/Intrinsic.h>

unsigned long XtGetSelectionTimeout(void);

void XtSetSelectionTimeout(unsigned long timeout);

ARGUMENTS

timeout
Specifies the selection timeout in milliseconds.

DESCRIPTION

The XtGetSelectionTimeout function has been superceded by XtAppGetSelectionTimeout.

The XtSetSelectionTimeout function has been superceded by XtAppSetSelectionTimeout.

SEE ALSO

XtAppGetSelectionTimeout(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1113 - Linux cli command HTML_LinkExtractorpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_LinkExtractorpm and provides detailed information about the command HTML_LinkExtractorpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_LinkExtractorpm.

NAME 🖥️ HTML_LinkExtractorpm 🖥️

Extract links from an HTML document

DESCRIPTION

HTML::LinkExtractor is used for extracting links from HTML. It is very similar to HTML::LinkExtor, except that besides getting the URL, you also get the link-text.

Example ( please run the examples ):

use HTML::LinkExtractor; use Data::Dumper; my $input = q{If <a href=“http://perl.com/"> I am a LINK!!! </a>}; my $LX = new HTML::LinkExtractor(); $LX->parse(\input); print Dumper($LX->links); _ _END_ _ # the above example will yield $VAR1 = [ { _TEXT => <a href=“http://perl.com/"> I am a LINK!!! </a>, href => bless(do{\my $o = http://perl.com/)}, URI::http), tag => a } ];

HTML::LinkExtractor will also correctly extract nested link-type tags.

SYNOPSIS

## the demo perl LinkExtractor.pm perl LinkExtractor.pm file.html othefile.html ## or if the module is installed, but you dont know where perl -MHTML::LinkExtractor -e” system $^X, $INC{q{HTML/LinkExtractor.pm}} " perl -MHTML::LinkExtractor -e system $^X, $INC{q{HTML/LinkExtractor.pm}} ## or use HTML::LinkExtractor; use LWP qw( get ); # use LWP::Simple qw( get ); my $base = http://search.cpan.org; my $html = get($base./recent); my $LX = new HTML::LinkExtractor(); $LX->parse(\html); print qq{<base href="$base”> }; for my $Link( @{ $LX->links } ) { ## new modules are linked by /author/NAME/Dist if( $$Link{href}=~ m{^\author\w+} ) { print $$Link{_TEXT}." “; } } undef $LX; _ _END_ _ ## or use HTML::LinkExtractor; use Data::Dumper; my $input = q{If <a href=“http://perl.com/"> I am a LINK!!! </a>}; my $LX = new HTML::LinkExtractor( sub { print Data::Dumper::Dumper(@_); }, http://perlFox.org/, ); $LX->parse(\input); $LX->strip(1); $LX->parse(\input); _ _END_ _ #### Calculate to total size of a web-page #### adds up the sizes of all the images and stylesheets and stuff use strict; use LWP; # use LWP::Simple; use HTML::LinkExtractor; # my $url = shift || http://www.google.com; my $html = get($url); my $Total = length $html; # print “initial size $Total “; # my $LX = new HTML::LinkExtractor( sub { my( $X, $tag ) = @_; # unless( grep {$_ eq $tag->{tag} } @HTML::LinkExtractor::TAGS_IN_NEED ) { # print “$$tag{tag} “; # for my $urlAttr ( @{$HTML::LinkExtractor::TAGS{$$tag{tag}}} ) { if( exists $$tag{$urlAttr} ) { my $size = (head( $$tag{$urlAttr} ))[1]; $Total += $size if $size; print “adding $size " if $size; } } } }, $url, 0 ); # $LX->parse(\html); # print “The total size of $url is $Total bytes “; _ _END_ _

METHODS

“$LX->new([\callback, [$baseUrl, [1]]])”

Accepts 3 arguments, all of which are optional. If for example you want to pass a $baseUrl, but don’t want to have a callback invoked, just put undef in place of a subref.

This is the only class method.

  1. a callback ( a sub reference, as in sub{}, or \&sub) which is to be called each time a new LINK is encountered ( for @HTML::LinkExtractor::TAGS_IN_NEED this means after the closing tag is encountered ) The callback receives an object reference($LX) and a link hashref.

  2. and a base URL ( URI->new, so its up to you to make sure it’s valid which is used to convert all relative URI’s to absolute ones. $ALinkP{href} = URI->new_abs( $ALink{href}, $base );

  3. A boolean (just stick with 1). See the example in DESCRIPTION. Normally, you’d get back _TEXT that looks like _TEXT => <a href=“http://perl.com/"> I am a LINK!!! </a>, If you turn this option on, you’ll get the following instead _TEXT => I am a LINK!!! , The private utility function _stripHTML does this by using HTML::TokeParsers method get_trimmed_text. You can turn this feature on an off by using $LX->strip(undef || 0 || 1)

“$LX->parse( $filename || *FILEHANDLE || \FileContent )”

Each time you call parse, you should pass it a $filename a *FILEHANDLE or a \$FileContent

Each time you call parse a new HTML::TokeParser object is created and stored in $this->{_tp}.

You shouldn’t need to mess with the TokeParser object.

Only after you call parse will this method return anything. This method returns a reference to an ArrayOfHashes, which basically looks like (Data::Dumper output)

$VAR1 = [ { tag => img, src => image.png }, ];

Please note that if yo provide a callback this array will be empty.

“$LX->strip( [ 0 || 1 ])”

If you pass in undef (or nothing), returns the state of the option. Passing in a true or false value sets the option.

If you wanna know what the option does see $LX->new([\&callback, [$baseUrl, [1]]])

WHAT’S A LINK-type tag

Take a look at %HTML::LinkExtractor::TAGS to see what I consider to be link-type-tag.

Take a look at @HTML::LinkExtractor::VALID_URL_ATTRIBUTES to see all the possible tag attributes which can contain URI’s (the links!!)

Take a look at @HTML::LinkExtractor::TAGS_IN_NEED to see the tags for which the _TEXT attribute is provided, like <a href="#"> TEST </a>

How can that be?!?!

I took at look at %HTML::Tagset::linkElements and the following URL’s

http://www.blooberry.com/indexdot/html/tagindex/all.htm http://www.blooberry.com/indexdot/html/tagpages/a/a-hyperlink.htm http://www.blooberry.com/indexdot/html/tagpages/a/applet.htm http://www.blooberry.com/indexdot/html/tagpages/a/area.htm http://www.blooberry.com/indexdot/html/tagpages/b/base.htm http://www.blooberry.com/indexdot/html/tagpages/b/bgsound.htm http://www.blooberry.com/indexdot/html/tagpages/d/del.htm http://www.blooberry.com/indexdot/html/tagpages/d/div.htm http://www.blooberry.com/indexdot/html/tagpages/e/embed.htm http://www.blooberry.com/indexdot/html/tagpages/f/frame.htm http://www.blooberry.com/indexdot/html/tagpages/i/ins.htm http://www.blooberry.com/indexdot/html/tagpages/i/image.htm http://www.blooberry.com/indexdot/html/tagpages/i/iframe.htm http://www.blooberry.com/indexdot/html/tagpages/i/ilayer.htm http://www.blooberry.com/indexdot/html/tagpages/i/inputimage.htm http://www.blooberry.com/indexdot/html/tagpages/l/layer.htm http://www.blooberry.com/indexdot/html/tagpages/l/link.htm http://www.blooberry.com/indexdot/html/tagpages/o/object.htm http://www.blooberry.com/indexdot/html/tagpages/q/q.htm http://www.blooberry.com/indexdot/html/tagpages/s/script.htm http://www.blooberry.com/indexdot/html/tagpages/s/sound.htm And the special cases <!DOCTYPE HTML SYSTEM “http://www.w3.org/DTD/HTML4-strict.dtd"> http://www.blooberry.com/indexdot/html/tagpages/d/doctype.htm !doctype is really a process instruction, but is still listed in %TAGS with url as the attribute and <meta HTTP-EQUIV=“Refresh” CONTENT=“5; URL=http://www.foo.com/foo.html”> http://www.blooberry.com/indexdot/html/tagpages/m/meta.htm If there is a valid url, url is set as the attribute. The meta tag has no attributes listed in %TAGS.

SEE ALSO

HTML::LinkExtor, HTML::TokeParser, HTML::Tagset.

AUTHOR

D.H (PodMaster)

Please use http://rt.cpan.org/ to report bugs.

Just go to http://rt.cpan.org/NoAuth/Bugs.html?Dist=HTML-Scrubber to see a bug list and/or repot new ones.

LICENSE

Copyright (c) 2003, 2004 by D.H. (PodMaster). All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the full text of the license.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1114 - Linux cli command intro

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command intro and provides detailed information about the command intro, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the intro.

NAME 🖥️ intro 🖥️

introduction to library functions

DESCRIPTION

Section 3 of the manual describes all library functions excluding the library functions (system call wrappers) described in Section 2, which implement system calls.

Many of the functions described in the section are part of the Standard C Library (libc). Some functions are part of other libraries (e.g., the math library, libm, or the real-time library, librt) in which case the manual page will indicate the linker option needed to link against the required library (e.g., -lm and -lrt, respectively, for the aforementioned libraries).

In some cases, the programmer must define a feature test macro in order to obtain the declaration of a function from the header file specified in the man page SYNOPSIS section. (Where required, these feature test macros must be defined before including any header files.) In such cases, the required macro is described in the man page. For further information on feature test macros, see feature_test_macros(7).

Subsections

Section 3 of this manual is organized into subsections that reflect the complex structure of the standard C library and its many implementations:

  • 3const

  • 3head

  • 3type

This difficult history frequently makes it a poor example to follow in design, implementation, and presentation.

Ideally, a library for the C language is designed such that each header file presents the interface to a coherent software module. It provides a small number of function declarations and exposes only data types and constants that are required for use of those functions. Together, these are termed an API or application program interface. Types and constants to be shared among multiple APIs should be placed in header files that declare no functions. This organization permits a C library module to be documented concisely with one header file per manual page. Such an approach improves the readability and accessibility of library documentation, and thereby the usability of the software.

STANDARDS

Certain terms and abbreviations are used to indicate UNIX variants and standards to which calls in this section conform. See standards(7).

NOTES

Look at the header of the manual page source for the author(s) and copyright conditions. Note that these can be different from page to page!

SEE ALSO

intro(2), errno(3), capabilities(7), credentials(7), environ(7), feature_test_macros(7), libc(7), math_error(7), path_resolution(7), pthreads(7), signal(7), standards(7), system_data_types(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1115 - Linux cli command sched_getcpu

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sched_getcpu and provides detailed information about the command sched_getcpu, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sched_getcpu.

NAME 🖥️ sched_getcpu 🖥️

determine CPU on which the calling thread is running

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sched.h>
int sched_getcpu(void);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sched_getcpu():

    Since glibc 2.14:
        _GNU_SOURCE
    Before glibc 2.14:
        _BSD_SOURCE || _SVID_SOURCE
            /* _GNU_SOURCE also suffices */

DESCRIPTION

sched_getcpu() returns the number of the CPU on which the calling thread is currently executing.

RETURN VALUE

On success, sched_getcpu() returns a nonnegative CPU number. On error, -1 is returned and errno is set to indicate the error.

ERRORS

ENOSYS
This kernel does not implement getcpu(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sched_getcpu()

Thread safetyMT-Safe

STANDARDS

GNU.

HISTORY

glibc 2.6.

NOTES

The call

cpu = sched_getcpu();

is equivalent to the following getcpu(2) call:

int c, s;
s = getcpu(&c, NULL);
cpu = (s == -1) ? s : c;

SEE ALSO

getcpu(2), sched(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1116 - Linux cli command isprint

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isprint and provides detailed information about the command isprint, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isprint.

NAME 🖥️ isprint 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1117 - Linux cli command LWP_Protocolpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LWP_Protocolpm and provides detailed information about the command LWP_Protocolpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LWP_Protocolpm.

NAME 🖥️ LWP_Protocolpm 🖥️

Base class for LWP protocols

SYNOPSIS

package LWP::Protocol::foo; use parent qw(LWP::Protocol);

DESCRIPTION

This class is used as the base class for all protocol implementations supported by the LWP library.

When creating an instance of this class using LWP::Protocol::create($url), and you get an initialized subclass appropriate for that access method. In other words, the “create” in LWP::Protocol function calls the constructor for one of its subclasses.

All derived LWP::Protocol classes need to override the request() method which is used to service a request. The overridden method can make use of the collect() method to collect together chunks of data as it is received.

METHODS

The following methods and functions are provided:

new

my $prot = LWP::Protocol->new();

The LWP::Protocol constructor is inherited by subclasses. As this is a virtual base class this method should not be called directly.

create

my $prot = LWP::Protocol::create($scheme)

Create an object of the class implementing the protocol to handle the given scheme. This is a function, not a method. It is more an object factory than a constructor. This is the function user agents should use to access protocols.

implementor

my $class = LWP::Protocol::implementor($scheme, [$class])

Get and/or set implementor class for a scheme. Returns if the specified scheme is not supported.

request

$response = $protocol->request($request, $proxy, undef); $response = $protocol->request($request, $proxy, /tmp/sss); $response = $protocol->request($request, $proxy, \callback, 1024); $response = $protocol->request($request, $proxy, $fh);

Dispatches a request over the protocol, and returns a response object. This method needs to be overridden in subclasses. Refer to LWP::UserAgent for description of the arguments.

collect

my $res = $prot->collect(undef, $response, $collector); # stored in $response my $res = $prot->collect($filename, $response, $collector); my $res = $prot->collect(sub { … }, $response, $collector);

Collect the content of a request, and process it appropriately into a scalar, file, or by calling a callback. If the first parameter is undefined, then the content is stored within the $response. If it’s a simple scalar, then it’s interpreted as a file name and the content is written to this file. If it’s a code reference, then content is passed to this routine. If it is a filehandle, or similar, such as a File::Temp object, content will be written to it.

The collector is a routine that will be called and which is responsible for returning pieces (as ref to scalar) of the content to process. The $collector signals EOF by returning a reference to an empty string.

The return value is the HTTP::Response object reference.

Note: We will only use the callback or file argument if $response->is_success(). This avoids sending content data for redirects and authentication responses to the callback which would be confusing.

collect_once

$prot->collect_once($arg, $response, $content)

Can be called when the whole response content is available as content. This will invoke “collect” in LWP::Protocol with a collector callback that returns a reference to $content the first time and an empty string the next.

SEE ALSO

Inspect the LWP/Protocol/file.pm and LWP/Protocol/http.pm files for examples of usage.

COPYRIGHT

Copyright 1995-2001 Gisle Aas.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1118 - Linux cli command tzname

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tzname and provides detailed information about the command tzname, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tzname.

NAME 🖥️ tzname 🖥️

initialize time conversion information

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <time.h>
void tzset(void);
extern char *tzname[2];
extern long timezone;
extern int daylight;

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

tzset():

    _POSIX_C_SOURCE

tzname:

    _POSIX_C_SOURCE

timezone, daylight:

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

DESCRIPTION

The tzset() function initializes the tzname variable from the TZ environment variable. This function is automatically called by the other time conversion functions that depend on the timezone. In a System-V-like environment, it will also set the variables timezone (seconds West of UTC) and daylight (to 0 if this timezone does not have any daylight saving time rules, or to nonzero if there is a time, past, present, or future when daylight saving time applies).

If the TZ variable does not appear in the environment, the system timezone is used. The system timezone is configured by copying, or linking, a file in the tzfile(5) format to /etc/localtime. A timezone database of these files may be located in the system timezone directory (see the FILES section below).

If the TZ variable does appear in the environment, but its value is empty, or its value cannot be interpreted using any of the formats specified below, then Coordinated Universal Time (UTC) is used.

The value of TZ can be one of two formats. The first format is a string of characters that directly represent the timezone to be used:

std offset[dst[offset][,start[/time],end[/time]]]

There are no spaces in the specification. The std string specifies an abbreviation for the timezone and must be three or more alphabetic characters. When enclosed between the less-than (<) and greater-than (>) signs, the character set is expanded to include the plus (+) sign, the minus (-) sign, and digits. The offset string immediately follows std and specifies the time value to be added to the local time to get Coordinated Universal Time (UTC). The offset is positive if the local timezone is west of the Prime Meridian and negative if it is east. The hour must be between 0 and 24, and the minutes and seconds 00 and 59:

[+|-]hh[:mm[:ss]]

The dst string and offset specify the name and offset for the corresponding daylight saving timezone. If the offset is omitted, it defaults to one hour ahead of standard time.

The start field specifies when daylight saving time goes into effect and the end field specifies when the change is made back to standard time. These fields may have the following formats:

Jn
This specifies the Julian day with n between 1 and 365. Leap days are not counted. In this format, February 29 can’t be represented; February 28 is day 59, and March 1 is always day 60.

n
This specifies the zero-based Julian day with n between 0 and 365. February 29 is counted in leap years.

Mm.w.d
This specifies day d (0 <= d <= 6) of week w (1 <= w <= 5) of month m (1 <= m <= 12). Week 1 is the first week in which day d occurs and week 5 is the last week in which day d occurs. Day 0 is a Sunday.

The time fields specify when, in the local time currently in effect, the change to the other time occurs. If omitted, the default is 02:00:00.

Here is an example for New Zealand, where the standard time (NZST) is 12 hours ahead of UTC, and daylight saving time (NZDT), 13 hours ahead of UTC, runs from the first Sunday in October to the third Sunday in March, and the changeovers happen at the default time of 02:00:00:

TZ="NZST-12:00:00NZDT-13:00:00,M10.1.0,M3.3.0"

The second format specifies that the timezone information should be read from a file:

:[filespec]

If the file specification filespec is omitted, or its value cannot be interpreted, then Coordinated Universal Time (UTC) is used. If filespec is given, it specifies another tzfile(5)-format file to read the timezone information from. If filespec does not begin with a ‘/’, the file specification is relative to the system timezone directory. If the colon is omitted each of the above TZ formats will be tried.

Here’s an example, once more for New Zealand:

TZ=":Pacific/Auckland"

ENVIRONMENT

TZ
If this variable is set its value takes precedence over the system configured timezone.

TZDIR
If this variable is set its value takes precedence over the system configured timezone database directory path.

FILES

/etc/localtime
The system timezone file.

/usr/share/zoneinfo/
The system timezone database directory.

/usr/share/zoneinfo/posixrules
When a TZ string includes a dst timezone without anything following it, then this file is used for the start/end rules. It is in the tzfile(5) format. By default, the zoneinfo Makefile hard links it to the America/New_York tzfile.

Above are the current standard file locations, but they are configurable when glibc is compiled.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tzset()

Thread safetyMT-Safe env locale

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4, 4.3BSD.

4.3BSD had a function char *timezone(zone, dst) that returned the name of the timezone corresponding to its first argument (minutes West of UTC). If the second argument was 0, the standard name was used, otherwise the daylight saving time version.

SEE ALSO

date(1), gettimeofday(2), time(2), ctime(3), getenv(3), tzfile(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1119 - Linux cli command res_send

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command res_send and provides detailed information about the command res_send, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the res_send.

NAME 🖥️ res_send 🖥️

resolver routines

LIBRARY

Resolver library (libresolv, -lresolv)

SYNOPSIS

#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
struct __res_state;
typedef struct __res_state *res_state;
int res_ninit(res_state statep);
void res_nclose(res_state statep);
int res_nquery(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nsearch(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nquerydomain(res_state statep,
 const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
int res_nmkquery(res_state statep,
 int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
int res_nsend(res_state statep,
 const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);
int dn_comp(const char *exp_dn, unsigned char comp_dn[.length],
 int length, unsigned char **dnptrs,
 unsigned char **lastdnptr);
int dn_expand(const unsigned char *msg,
 const unsigned char *eomorig,
 const unsigned char *comp_dn, char exp_dn[.length],
 int length);
[[deprecated]] extern struct __res_state _res;
[[deprecated]] int res_init(void);
[[deprecated]]
int res_query(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_search(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_querydomain(const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
[[deprecated]]
int res_mkquery(int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
[[deprecated]]
int res_send(const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);

DESCRIPTION

Note: This page is incomplete (various resolver functions provided by glibc are not described) and likely out of date.

The functions described below make queries to and interpret the responses from Internet domain name servers.

The API consists of a set of more modern, reentrant functions and an older set of nonreentrant functions that have been superseded. The traditional resolver interfaces such as res_init() and res_query() use some static (global) state stored in the _res structure, rendering these functions non-thread-safe. BIND 8.2 introduced a set of new interfaces res_ninit(), res_nquery(), and so on, which take a res_state as their first argument, so you can use a per-thread resolver state.

The res_ninit() and res_init() functions read the configuration files (see resolv.conf(5)) to get the default domain name and name server address(es). If no server is given, the local host is tried. If no domain is given, that associated with the local host is used. It can be overridden with the environment variable LOCALDOMAIN. res_ninit() or res_init() is normally executed by the first call to one of the other functions. Every call to res_ninit() requires a corresponding call to res_nclose() to free memory allocated by res_ninit() and subsequent calls to res_nquery().

The res_nquery() and res_query() functions query the name server for the fully qualified domain name name of specified type and class. The reply is left in the buffer answer of length anslen supplied by the caller.

The res_nsearch() and res_search() functions make a query and waits for the response like res_nquery() and res_query(), but in addition they implement the default and search rules controlled by RES_DEFNAMES and RES_DNSRCH (see description of _res options below).

The res_nquerydomain() and res_querydomain() functions make a query using res_nquery()/res_query() on the concatenation of name and domain.

The following functions are lower-level routines used by res_nquery()/res_query().

The res_nmkquery() and res_mkquery() functions construct a query message in buf of length buflen for the domain name dname. The query type op is one of the following (typically QUERY):

QUERY
Standard query.

IQUERY
Inverse query. This option was removed in glibc 2.26, since it has not been supported by DNS servers for a very long time.

NS_NOTIFY_OP
Notify secondary of SOA (Start of Authority) change.

newrr is currently unused.

The res_nsend() and res_send() function send a preformatted query given in msg of length msglen and returns the answer in answer which is of length anslen. They will call res_ninit()/res_init() if it has not already been called.

The dn_comp() function compresses the domain name exp_dn and stores it in the buffer comp_dn of length length. The compression uses an array of pointers dnptrs to previously compressed names in the current message. The first pointer points to the beginning of the message and the list ends with NULL. The limit of the array is specified by lastdnptr. If dnptr is NULL, domain names are not compressed. If lastdnptr is NULL, the list of labels is not updated.

The dn_expand() function expands the compressed domain name comp_dn to a full domain name, which is placed in the buffer exp_dn of size length. The compressed name is contained in a query or reply message, and msg points to the beginning of the message.

The resolver routines use configuration and state information contained in a __res_state structure (either passed as the statep argument, or in the global variable _res, in the case of the older nonreentrant functions). The only field of this structure that is normally manipulated by the user is the options field. This field can contain the bitwise “OR” of the following options:

RES_INIT
True if res_ninit() or res_init() has been called.

RES_DEBUG
Print debugging messages. This option is available only if glibc was built with debugging enabled, which is not the default.

RES_AAONLY (unimplemented; deprecated in glibc 2.25)
Accept authoritative answers only. res_send() continues until it finds an authoritative answer or returns an error. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEVC
Use TCP connections for queries rather than UDP datagrams.

RES_PRIMARY (unimplemented; deprecated in glibc 2.25)
Query primary domain name server only. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_IGNTC
Ignore truncation errors. Don’t retry with TCP.

RES_RECURSE
Set the recursion desired bit in queries. Recursion is carried out by the domain name server, not by res_send(). [Enabled by default].

RES_DEFNAMES
If set, res_search() will append the default domain name to single component names—that is, those that do not contain a dot. [Enabled by default].

RES_STAYOPEN
Used with RES_USEVC to keep the TCP connection open between queries.

RES_DNSRCH
If set, res_search() will search for hostnames in the current domain and in parent domains. This option is used by gethostbyname(3). [Enabled by default].

RES_INSECURE1
Accept a response from a wrong server. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_INSECURE2
Accept a response which contains a wrong query. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_NOALIASES
Disable usage of HOSTALIASES environment variable.

RES_USE_INET6
Try an AAAA query before an A query inside the gethostbyname(3) function, and map IPv4 responses in IPv6 “tunneled form” if no AAAA records are found but an A record set exists. Since glibc 2.25, this option is deprecated, and its usage produces a warning; applications should use getaddrinfo(3), rather than gethostbyname(3).

RES_ROTATE
Causes round-robin selection of name servers from among those listed. This has the effect of spreading the query load among all listed servers, rather than having all clients try the first listed server first every time.

RES_NOCHECKNAME (unimplemented; deprecated in glibc 2.25)
Disable the modern BIND checking of incoming hostnames and mail names for invalid characters such as underscore (_), non-ASCII, or control characters. This option was present until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_KEEPTSIG (unimplemented; deprecated in glibc 2.25)
Do not strip TSIG records. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_BLAST (unimplemented; deprecated in glibc 2.25)
Send each query simultaneously and recursively to all servers. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEBSTRING (glibc 2.3.4 to glibc 2.24)
Make reverse IPv6 lookups using the bit-label format described in RFC 2673; if this option is not set (which is the default), then nibble format is used. This option was removed in glibc 2.25, since it relied on a backward-incompatible DNS extension that was never deployed on the Internet.

RES_NOIP6DOTINT (glibc 2.24 and earlier)
Use ip6.arpa zone in IPv6 reverse lookup instead of ip6.int, which is deprecated since glibc 2.3.4. This option is present up to and including glibc 2.24, where it is enabled by default. In glibc 2.25, this option was removed.

RES_USE_EDNS0 (since glibc 2.6)
Enables support for the DNS extensions (EDNS0) described in RFC 2671.

RES_SNGLKUP (since glibc 2.10)
By default, glibc performs IPv4 and IPv6 lookups in parallel since glibc 2.9. Some appliance DNS servers cannot handle these queries properly and make the requests time out. This option disables the behavior and makes glibc perform the IPv6 and IPv4 requests sequentially (at the cost of some slowdown of the resolving process).

RES_SNGLKUPREOP
When RES_SNGLKUP option is enabled, opens a new socket for the each request.

RES_USE_DNSSEC
Use DNSSEC with OK bit in OPT record. This option implies RES_USE_EDNS0.

RES_NOTLDQUERY
Do not look up unqualified name as a top-level domain (TLD).

RES_DEFAULT
Default option which implies: RES_RECURSE, RES_DEFNAMES, RES_DNSRCH, and RES_NOIP6DOTINT.

RETURN VALUE

The res_ninit() and res_init() functions return 0 on success, or -1 if an error occurs.

The res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), res_querydomain(), res_nmkquery(), res_mkquery(), res_nsend(), and res_send() functions return the length of the response, or -1 if an error occurs.

The dn_comp() and dn_expand() functions return the length of the compressed name, or -1 if an error occurs.

In the case of an error return from res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), or res_querydomain(), the global variable h_errno (see gethostbyname(3)) can be consulted to determine the cause of the error.

FILES

/etc/resolv.conf
resolver configuration file

/etc/host.conf
resolver configuration file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

res_ninit(), res_nclose(), res_nquery(), res_nsearch(), res_nquerydomain(), res_nsend()

Thread safetyMT-Safe locale

res_nmkquery(), dn_comp(), dn_expand()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

4.3BSD.

SEE ALSO

gethostbyname(3), resolv.conf(5), resolver(5), hostname(7), named(8)

The GNU C library source file resolv/README.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1120 - Linux cli command y0l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command y0l and provides detailed information about the command y0l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the y0l.

NAME 🖥️ y0l 🖥️

Bessel functions of the second kind

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double y0(double x);
double y1(double x);
double yn(int n, double x);
float y0f(float x);
float y1f(float x);
float ynf(int n, float x);
long double y0l(long double x);
long double y1l(long double x);
long double ynl(int n, long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

y0(), y1(), yn():

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

y0f(), y0l(), y1f(), y1l(), ynf(), ynl():

    _XOPEN_SOURCE >= 600
        || (_ISOC99_SOURCE && _XOPEN_SOURCE)
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The y0() and y1() functions return Bessel functions of x of the second kind of orders 0 and 1, respectively. The yn() function returns the Bessel function of x of the second kind of order n.

The value of x must be positive.

The y0f(), y1f(), and ynf() functions are versions that take and return float values. The y0l(), y1l(), and ynl() functions are versions that take and return long double values.

RETURN VALUE

On success, these functions return the appropriate Bessel value of the second kind for x.

If x is a NaN, a NaN is returned.

If x is negative, a domain error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively. (POSIX.1-2001 also allows a NaN return for this case.)

If x is 0.0, a pole error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.

If the result underflows, a range error occurs, and the functions return 0.0

If the result overflows, a range error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively. (POSIX.1-2001 also allows a 0.0 return for this case.)

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is negative
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

Pole error: x is 0.0
errno is set to ERANGE and an FE_DIVBYZERO exception is raised (but see BUGS).

Range error: result underflow
errno is set to ERANGE. No FE_UNDERFLOW exception is returned by fetestexcept(3) for this case.

Range error: result overflow
errno is set to ERANGE (but see BUGS). An overflow floating-point exception (FE_OVERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

y0(), y0f(), y0l()

Thread safetyMT-Safe

y1(), y1f(), y1l()

Thread safetyMT-Safe

yn(), ynf(), ynl()

Thread safetyMT-Safe

STANDARDS

y0()
y1()
yn()
POSIX.1-2008.

Others:
BSD.

HISTORY

y0()
y1()
yn()
SVr4, 4.3BSD, POSIX.1-2001.

Others:
BSD.

BUGS

Before glibc 2.19, these functions misdiagnosed pole errors: errno was set to EDOM, instead of ERANGE and no FE_DIVBYZERO exception was raised.

Before glibc 2.17, did not set errno for “range error: result underflow”.

In glibc 2.3.2 and earlier, these functions do not raise an invalid floating-point exception (FE_INVALID) when a domain error occurs.

SEE ALSO

j0(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1121 - Linux cli command _flushlbf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command _flushlbf and provides detailed information about the command _flushlbf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the _flushlbf.

NAME 🖥️ _flushlbf 🖥️

interfaces to stdio FILE structure

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
#include <stdio_ext.h>
size_t __fbufsize(FILE *stream);
size_t __fpending(FILE *stream);
int __flbf(FILE *stream);
int __freadable(FILE *stream);
int __fwritable(FILE *stream);
int __freading(FILE *stream);
int __fwriting(FILE *stream);
int __fsetlocking(FILE *stream, int type);
void _flushlbf(void);
void __fpurge(FILE *stream);

DESCRIPTION

Solaris introduced routines to allow portable access to the internals of the FILE structure, and glibc also implemented these.

The __fbufsize() function returns the size of the buffer currently used by the given stream.

The __fpending() function returns the number of bytes in the output buffer. For wide-oriented streams the unit is wide characters. This function is undefined on buffers in reading mode, or opened read-only.

The __flbf() function returns a nonzero value if the stream is line-buffered, and zero otherwise.

The __freadable() function returns a nonzero value if the stream allows reading, and zero otherwise.

The __fwritable() function returns a nonzero value if the stream allows writing, and zero otherwise.

The __freading() function returns a nonzero value if the stream is read-only, or if the last operation on the stream was a read operation, and zero otherwise.

The __fwriting() function returns a nonzero value if the stream is write-only (or append-only), or if the last operation on the stream was a write operation, and zero otherwise.

The __fsetlocking() function can be used to select the desired type of locking on the stream. It returns the current type. The type argument can take the following three values:

FSETLOCKING_INTERNAL
Perform implicit locking around every operation on the given stream (except for the *_unlocked ones). This is the default.

FSETLOCKING_BYCALLER
The caller will take care of the locking (possibly using flockfile(3) in case there is more than one thread), and the stdio routines will not do locking until the state is reset to FSETLOCKING_INTERNAL.

FSETLOCKING_QUERY
Don’t change the type of locking. (Only return it.)

The _flushlbf() function flushes all line-buffered streams. (Presumably so that output to a terminal is forced out, say before reading keyboard input.)

The __fpurge() function discards the contents of the stream’s buffer.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

__fbufsize(), __fpending(), __fpurge(), __fsetlocking()

Thread safetyMT-Safe race:stream

__flbf(), __freadable(), __freading(), __fwritable(), __fwriting(), _flushlbf()

Thread safetyMT-Safe

SEE ALSO

flockfile(3), fpurge(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1122 - Linux cli command Image_ExifTool_XMPStructpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_XMPStructpm and provides detailed information about the command Image_ExifTool_XMPStructpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_XMPStructpm.

NAME 🖥️ Image_ExifTool_XMPStructpm 🖥️

XMP structure support

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This file contains routines to provide read/write support of structured XMP information.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

“XMP Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1123 - Linux cli command pthread_kill

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_kill and provides detailed information about the command pthread_kill, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_kill.

NAME 🖥️ pthread_kill 🖥️

send a signal to a thread

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <signal.h>
int pthread_kill(pthread_t thread, int sig);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

pthread_kill():

    _POSIX_C_SOURCE >= 199506L || _XOPEN_SOURCE >= 500

DESCRIPTION

The pthread_kill() function sends the signal sig to thread, a thread in the same process as the caller. The signal is asynchronously directed to thread.

If sig is 0, then no signal is sent, but error checking is still performed.

RETURN VALUE

On success, pthread_kill() returns 0; on error, it returns an error number, and no signal is sent.

ERRORS

EINVAL
An invalid signal was specified.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_kill()

Thread safetyMT-Safe

VERSIONS

The glibc implementation of pthread_kill() gives an error (EINVAL) on attempts to send either of the real-time signals used internally by the NPTL threading implementation. See nptl(7) for details.

POSIX.1-2008 recommends that if an implementation detects the use of a thread ID after the end of its lifetime, pthread_kill() should return the error ESRCH. The glibc implementation returns this error in the cases where an invalid thread ID can be detected. But note also that POSIX says that an attempt to use a thread ID whose lifetime has ended produces undefined behavior, and an attempt to use an invalid thread ID in a call to pthread_kill() can, for example, cause a segmentation fault.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

Signal dispositions are process-wide: if a signal handler is installed, the handler will be invoked in the thread thread, but if the disposition of the signal is “stop”, “continue”, or “terminate”, this action will affect the whole process.

SEE ALSO

kill(2), sigaction(2), sigpending(2), pthread_self(3), pthread_sigmask(3), raise(3), pthreads(7), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1124 - Linux cli command sem_unlink

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sem_unlink and provides detailed information about the command sem_unlink, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sem_unlink.

NAME 🖥️ sem_unlink 🖥️

remove a named semaphore

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <semaphore.h>
int sem_unlink(const char *name);

DESCRIPTION

sem_unlink() removes the named semaphore referred to by name. The semaphore name is removed immediately. The semaphore is destroyed once all other processes that have the semaphore open close it.

RETURN VALUE

On success sem_unlink() returns 0; on error, -1 is returned, with errno set to indicate the error.

ERRORS

EACCES
The caller does not have permission to unlink this semaphore.

ENAMETOOLONG
name was too long.

ENOENT
There is no semaphore with the given name.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sem_unlink()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

SEE ALSO

sem_getvalue(3), sem_open(3), sem_post(3), sem_wait(3), sem_overview(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1125 - Linux cli command strsep

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strsep and provides detailed information about the command strsep, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strsep.

NAME 🖥️ strsep 🖥️

extract token from string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strsep(char **restrict stringp, const char *restrict delim);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strsep():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

If *stringp is NULL, the strsep() function returns NULL and does nothing else. Otherwise, this function finds the first token in the string *stringp that is delimited by one of the bytes in the string delim. This token is terminated by overwriting the delimiter with a null byte (‘�’), and *stringp is updated to point past the token. In case no delimiter was found, the token is taken to be the entire string *stringp, and *stringp is made NULL.

RETURN VALUE

The strsep() function returns a pointer to the token, that is, it returns the original value of *stringp.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strsep()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

4.4BSD.

The strsep() function was introduced as a replacement for strtok(3), since the latter cannot handle empty fields. However, strtok(3) conforms to C89/C99 and hence is more portable.

BUGS

Be cautious when using this function. If you do use it, note that:

  • This function modifies its first argument.

  • This function cannot be used on constant strings.

  • The identity of the delimiting character is lost.

EXAMPLES

The program below is a port of the one found in strtok(3), which, however, doesn’t discard multiple delimiters or empty tokens:

$ ./a.out 'a/bbb///cc;xxx:yyy:' ':;' '/'
1: a/bbb///cc
         --> a
         --> bbb
         -->
         -->
         --> cc
2: xxx
         --> xxx
3: yyy
         --> yyy
4:
         -->

Program source

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int
main(int argc, char *argv[])
{
    char *token, *subtoken;
    if (argc != 4) {
        fprintf(stderr, "Usage: %s string delim subdelim

“, argv[0]); exit(EXIT_FAILURE); } for (unsigned int j = 1; (token = strsep(&argv[1], argv[2])); j++) { printf("%u: %s “, j, token); while ((subtoken = strsep(&token, argv[3]))) printf(” –> %s “, subtoken); } exit(EXIT_SUCCESS); }

SEE ALSO

memchr(3), strchr(3), string(3), strpbrk(3), strspn(3), strstr(3), strtok(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1126 - Linux cli command towupper_l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command towupper_l and provides detailed information about the command towupper_l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the towupper_l.

NAME 🖥️ towupper_l 🖥️

convert a wide character to uppercase

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wctype.h>
wint_t towupper(wint_t wc);
wint_t towupper_l(wint_t wc, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

towupper_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The towupper() function is the wide-character equivalent of the toupper(3) function. If wc is a lowercase wide character, and there exists an uppercase equivalent in the current locale, it returns the uppercase equivalent of wc. In all other cases, wc is returned unchanged.

The towupper_l() function performs the same task, but performs the conversion based on the character type information in the locale specified by locale. The behavior of towupper_l() is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The argument wc must be representable as a wchar_t and be a valid character in the locale or be the value WEOF.

RETURN VALUE

If wc was convertible to uppercase, towupper() returns its uppercase equivalent; otherwise it returns wc.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

towupper()

Thread safetyMT-Safe locale

towupper_l()

Thread safetyMT-Safe

STANDARDS

towupper()
C11, POSIX.1-2008 (XSI).

towupper_l()
POSIX.1-2008.

HISTORY

towupper()
C99, POSIX.1-2001 (XSI). Obsolete in POSIX.1-2008 (XSI).

towupper_l()
POSIX.1-2008. glibc 2.3.

NOTES

The behavior of these functions depends on the LC_CTYPE category of the locale.

These functions are not very appropriate for dealing with Unicode characters, because Unicode knows about three cases: upper, lower, and title case.

SEE ALSO

iswupper(3), towctrans(3), towlower(3), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1127 - Linux cli command Image_ExifTool_Lang_depm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Lang_depm and provides detailed information about the command Image_ExifTool_Lang_depm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Lang_depm.

NAME 🖥️ Image_ExifTool_Lang_depm 🖥️

ExifTool German language translations

DESCRIPTION

This file is used by Image::ExifTool to generate localized tag descriptions and values.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

ACKNOWLEDGEMENTS

Thanks to Jens Duttke, Herbert Kauer and Jobi for providing this translation.

SEE ALSO

Image::ExifTool (3pm), Image::ExifTool::TagInfoXML (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1128 - Linux cli command program_invocation_short_name

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command program_invocation_short_name and provides detailed information about the command program_invocation_short_name, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the program_invocation_short_name.

NAME 🖥️ program_invocation_short_name 🖥️

obtain name used to invoke calling program

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <errno.h>
extern char *program_invocation_name;
extern char *program_invocation_short_name;

DESCRIPTION

program_invocation_name contains the name that was used to invoke the calling program. This is the same as the value of argv[0] in main(), with the difference that the scope of program_invocation_name is global.

program_invocation_short_name contains the basename component of name that was used to invoke the calling program. That is, it is the same value as program_invocation_name, with all text up to and including the final slash (/), if any, removed.

These variables are automatically initialized by the glibc run-time startup code.

VERSIONS

The Linux-specific /proc/pid/cmdline file provides access to similar information.

STANDARDS

GNU.

SEE ALSO

proc(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1129 - Linux cli command readfileam

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command readfileam and provides detailed information about the command readfileam, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the readfileam.

NAME 🖥️ readfileam 🖥️

return the entire contents of a file as a string

SYNOPSIS

@load “readfile”

result = readfile("/some/path")

For making whole files be single records:

@load “readfile”
BEGIN { PROCINFO[“readfile”] = 1 }

DESCRIPTION

The readfile extension adds a single function named readfile(). The argument is the name of the file to read. The return value is a string containing the entire contents of the requested file.

Upon error, the function returns the empty string and sets ERRNO.

In addition, it adds an input parser that is activated if

PROCINFO[“readfile”]

exists. When activated, each input file is returned in its entirety as $0. RT is set to the null string.

EXAMPLE

@load "readfile"
...
contents = readfile("/path/to/file");
if (contents == "" && ERRNO != "") {
    print("problem reading file", ERRNO) > "/dev/stderr"
    ...
}

SEE ALSO

GAWK: Effective AWK Programming, filefuncs(3am), fnmatch(3am), fork(3am), inplace(3am), ordchr(3am), readdir(3am), revoutput(3am), rwarray(3am), time(3am).

AUTHOR

Arnold Robbins, [email protected].

COPYING PERMISSIONS

Copyright © 2012, 2013, 2014, 2018, Free Software Foundation, Inc.

Permission is granted to make and distribute verbatim copies of this manual page provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to process this file through troff and print the results, provided the printed document carries copying permission notice identical to this one except for the removal of this paragraph (this paragraph not being relevant to the printed manual page).

Permission is granted to copy and distribute modified versions of this manual page under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual page into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1130 - Linux cli command setlogmask

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setlogmask and provides detailed information about the command setlogmask, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setlogmask.

NAME 🖥️ setlogmask 🖥️

set log priority mask

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <syslog.h>
int setlogmask(int mask);

DESCRIPTION

A process has a log priority mask that determines which calls to syslog(3) may be logged. All other calls will be ignored. Logging is enabled for the priorities that have the corresponding bit set in mask. The initial mask is such that logging is enabled for all priorities.

The setlogmask() function sets this logmask for the calling process, and returns the previous mask. If the mask argument is 0, the current logmask is not modified.

The eight priorities are LOG_EMERG, LOG_ALERT, LOG_CRIT, LOG_ERR, LOG_WARNING, LOG_NOTICE, LOG_INFO, and LOG_DEBUG. The bit corresponding to a priority p is LOG_MASK(p). Some systems also provide a macro LOG_UPTO(p) for the mask of all priorities in the above list up to and including p.

RETURN VALUE

This function returns the previous log priority mask.

ERRORS

None.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setlogmask()

Thread safetyMT-Unsafe race:LogMask

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

LOG_UPTO() will be included in the next release of the POSIX specification (Issue 8).

SEE ALSO

closelog(3), openlog(3), syslog(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1131 - Linux cli command Tk_PNGpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_PNGpm and provides detailed information about the command Tk_PNGpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_PNGpm.

NAME 🖥️ Tk_PNGpm 🖥️

PNG loader for Tk::Photo

SYNOPSIS

use Tk; use Tk::PNG; my $image = $widget->Photo(-format => png, -file => something.png);

DESCRIPTION

This is an extension for Tk which supplies PNG format loader for Photo image type.

HISTORY

This extension is by default bundled with Perl/Tk since Tk804.

AUTHOR

Nick Ing-Simmons <[email protected]>

SEE ALSO

Tk::Photo.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1132 - Linux cli command hsearch_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command hsearch_r and provides detailed information about the command hsearch_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the hsearch_r.

NAME 🖥️ hsearch_r 🖥️

hash table management

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <search.h>
int hcreate(size_t nel);
void hdestroy(void);
ENTRY *hsearch(ENTRY item, ACTION action);
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <search.h>
int hcreate_r(size_t nel, struct hsearch_data *htab);
void hdestroy_r(struct hsearch_data *htab);
int hsearch_r(ENTRY item, ACTION action, ENTRY **retval,
 struct hsearch_data *htab);

DESCRIPTION

The three functions hcreate(), hsearch(), and hdestroy() allow the caller to create and manage a hash search table containing entries consisting of a key (a string) and associated data. Using these functions, only one hash table can be used at a time.

The three functions hcreate_r(), hsearch_r(), hdestroy_r() are reentrant versions that allow a program to use more than one hash search table at the same time. The last argument, htab, points to a structure that describes the table on which the function is to operate. The programmer should treat this structure as opaque (i.e., do not attempt to directly access or modify the fields in this structure).

First a hash table must be created using hcreate(). The argument nel specifies the maximum number of entries in the table. (This maximum cannot be changed later, so choose it wisely.) The implementation may adjust this value upward to improve the performance of the resulting hash table.

The hcreate_r() function performs the same task as hcreate(), but for the table described by the structure *htab. The structure pointed to by htab must be zeroed before the first call to hcreate_r().

The function hdestroy() frees the memory occupied by the hash table that was created by hcreate(). After calling hdestroy(), a new hash table can be created using hcreate(). The hdestroy_r() function performs the analogous task for a hash table described by *htab, which was previously created using hcreate_r().

The hsearch() function searches the hash table for an item with the same key as item (where “the same” is determined using strcmp(3)), and if successful returns a pointer to it.

The argument item is of type ENTRY, which is defined in <search.h> as follows:

typedef struct entry {
    char *key;
    void *data;
} ENTRY;

The field key points to a null-terminated string which is the search key. The field data points to data that is associated with that key.

The argument action determines what hsearch() does after an unsuccessful search. This argument must either have the value ENTER, meaning insert a copy of item (and return a pointer to the new hash table entry as the function result), or the value FIND, meaning that NULL should be returned. (If action is FIND, then data is ignored.)

The hsearch_r() function is like hsearch() but operates on the hash table described by *htab. The hsearch_r() function differs from hsearch() in that a pointer to the found item is returned in *retval, rather than as the function result.

RETURN VALUE

hcreate() and hcreate_r() return nonzero on success. They return 0 on error, with errno set to indicate the error.

On success, hsearch() returns a pointer to an entry in the hash table. hsearch() returns NULL on error, that is, if action is ENTER and the hash table is full, or action is FIND and item cannot be found in the hash table. hsearch_r() returns nonzero on success, and 0 on error. In the event of an error, these two functions set errno to indicate the error.

ERRORS

hcreate_r() and hdestroy_r() can fail for the following reasons:

EINVAL
htab is NULL.

hsearch() and hsearch_r() can fail for the following reasons:

ENOMEM
action was ENTER, key was not found in the table, and there was no room in the table to add a new entry.

ESRCH
action was FIND, and key was not found in the table.

POSIX.1 specifies only the ENOMEM error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

hcreate(), hsearch(), hdestroy()

Thread safetyMT-Unsafe race:hsearch

hcreate_r(), hsearch_r(), hdestroy_r()

Thread safetyMT-Safe race:htab

STANDARDS

hcreate()
hsearch()
hdestroy()
POSIX.1-2008.

hcreate_r()
hsearch_r()
hdestroy_r()
GNU.

HISTORY

hcreate()
hsearch()
hdestroy()
SVr4, POSIX.1-2001.

hcreate_r()
hsearch_r()
hdestroy_r()
GNU.

NOTES

Hash table implementations are usually more efficient when the table contains enough free space to minimize collisions. Typically, this means that nel should be at least 25% larger than the maximum number of elements that the caller expects to store in the table.

The hdestroy() and hdestroy_r() functions do not free the buffers pointed to by the key and data elements of the hash table entries. (It can’t do this because it doesn’t know whether these buffers were allocated dynamically.) If these buffers need to be freed (perhaps because the program is repeatedly creating and destroying hash tables, rather than creating a single table whose lifetime matches that of the program), then the program must maintain bookkeeping data structures that allow it to free them.

BUGS

SVr4 and POSIX.1-2001 specify that action is significant only for unsuccessful searches, so that an ENTER should not do anything for a successful search. In libc and glibc (before glibc 2.3), the implementation violates the specification, updating the data for the given key in this case.

Individual hash table entries can be added, but not deleted.

EXAMPLES

The following program inserts 24 items into a hash table, then prints some of them.

#include <search.h>
#include <stdio.h>
#include <stdlib.h>
static char *data[] = { "alpha", "bravo", "charlie", "delta",
     "echo", "foxtrot", "golf", "hotel", "india", "juliet",
     "kilo", "lima", "mike", "november", "oscar", "papa",
     "quebec", "romeo", "sierra", "tango", "uniform",
     "victor", "whisky", "x-ray", "yankee", "zulu"
};
int
main(void)
{
    ENTRY e;
    ENTRY *ep;
    hcreate(30);
    for (size_t i = 0; i < 24; i++) {
        e.key = data[i];
        /* data is just an integer, instead of a
           pointer to something */
        e.data = (void *) i;
        ep = hsearch(e, ENTER);
        /* there should be no failures */
        if (ep == NULL) {
            fprintf(stderr, "entry failed

“); exit(EXIT_FAILURE); } } for (size_t i = 22; i < 26; i++) { /* print two entries from the table, and show that two are not in the table */ e.key = data[i]; ep = hsearch(e, FIND); printf("%9.9s -> %9.9s:%d “, e.key, ep ? ep->key : “NULL”, ep ? (int)(ep->data) : 0); } hdestroy(); exit(EXIT_SUCCESS); }

SEE ALSO

bsearch(3), lsearch(3), malloc(3), tsearch(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1133 - Linux cli command fpathconf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fpathconf and provides detailed information about the command fpathconf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fpathconf.

NAME 🖥️ fpathconf 🖥️

get configuration values for files

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
long fpathconf(int fd, int name);
long pathconf(const char *path, int name);

DESCRIPTION

fpathconf() gets a value for the configuration option name for the open file descriptor fd.

pathconf() gets a value for configuration option name for the filename path.

The corresponding macros defined in <unistd.h> are minimum values; if an application wants to take advantage of values which may change, a call to fpathconf() or pathconf() can be made, which may yield more liberal results.

Setting name equal to one of the following constants returns the following configuration options:

_PC_LINK_MAX
The maximum number of links to the file. If fd or path refer to a directory, then the value applies to the whole directory. The corresponding macro is _POSIX_LINK_MAX.

_PC_MAX_CANON
The maximum length of a formatted input line, where fd or path must refer to a terminal. The corresponding macro is _POSIX_MAX_CANON.

_PC_MAX_INPUT
The maximum length of an input line, where fd or path must refer to a terminal. The corresponding macro is _POSIX_MAX_INPUT.

_PC_NAME_MAX
The maximum length of a filename in the directory path or fd that the process is allowed to create. The corresponding macro is _POSIX_NAME_MAX.

_PC_PATH_MAX
The maximum length of a relative pathname when path or fd is the current working directory. The corresponding macro is _POSIX_PATH_MAX.

_PC_PIPE_BUF
The maximum number of bytes that can be written atomically to a pipe of FIFO. For fpathconf(), fd should refer to a pipe or FIFO. For fpathconf(), path should refer to a FIFO or a directory; in the latter case, the returned value corresponds to FIFOs created in that directory. The corresponding macro is _POSIX_PIPE_BUF.

_PC_CHOWN_RESTRICTED
This returns a positive value if the use of chown(2) and fchown(2) for changing a file’s user ID is restricted to a process with appropriate privileges, and changing a file’s group ID to a value other than the process’s effective group ID or one of its supplementary group IDs is restricted to a process with appropriate privileges. According to POSIX.1, this variable shall always be defined with a value other than -1. The corresponding macro is _POSIX_CHOWN_RESTRICTED.

If fd or path refers to a directory, then the return value applies to all files in that directory.

_PC_NO_TRUNC
This returns nonzero if accessing filenames longer than _POSIX_NAME_MAX generates an error. The corresponding macro is _POSIX_NO_TRUNC.

_PC_VDISABLE
This returns nonzero if special character processing can be disabled, where fd or path must refer to a terminal.

RETURN VALUE

The return value of these functions is one of the following:

  • On error, -1 is returned and errno is set to indicate the error (for example, EINVAL, indicating that name is invalid).

  • If name corresponds to a maximum or minimum limit, and that limit is indeterminate, -1 is returned and errno is not changed. (To distinguish an indeterminate limit from an error, set errno to zero before the call, and then check whether errno is nonzero when -1 is returned.)

  • If name corresponds to an option, a positive value is returned if the option is supported, and -1 is returned if the option is not supported.

  • Otherwise, the current value of the option or limit is returned. This value will not be more restrictive than the corresponding value that was described to the application in <unistd.h> or <limits.h> when the application was compiled.

ERRORS

EACCES
(pathconf()) Search permission is denied for one of the directories in the path prefix of path.

EBADF
(fpathconf()) fd is not a valid file descriptor.

EINVAL
name is invalid.

EINVAL
The implementation does not support an association of name with the specified file.

ELOOP
(pathconf()) Too many symbolic links were encountered while resolving path.

ENAMETOOLONG
(pathconf()) path is too long.

ENOENT
(pathconf()) A component of path does not exist, or path is an empty string.

ENOTDIR
(pathconf()) A component used as a directory in path is not in fact a directory.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fpathconf(), pathconf()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

Files with name lengths longer than the value returned for name equal to _PC_NAME_MAX may exist in the given directory.

Some returned values may be huge; they are not suitable for allocating memory.

SEE ALSO

getconf(1), open(2), statfs(2), confstr(3), sysconf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1134 - Linux cli command getnetbyaddr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getnetbyaddr and provides detailed information about the command getnetbyaddr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getnetbyaddr.

NAME 🖥️ getnetbyaddr 🖥️

get network entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
struct netent *getnetent(void);
struct netent *getnetbyname(const char *name);
struct netent *getnetbyaddr(uint32_t net, int type);
void setnetent(int stayopen);
void endnetent(void);

DESCRIPTION

The getnetent() function reads the next entry from the networks database and returns a netent structure containing the broken-out fields from the entry. A connection is opened to the database if necessary.

The getnetbyname() function returns a netent structure for the entry from the database that matches the network name.

The getnetbyaddr() function returns a netent structure for the entry from the database that matches the network number net of type type. The net argument must be in host byte order.

The setnetent() function opens a connection to the database, and sets the next entry to the first entry. If stayopen is nonzero, then the connection to the database will not be closed between calls to one of the getnet*() functions.

The endnetent() function closes the connection to the database.

The netent structure is defined in <netdb.h> as follows:

struct netent {
    char      *n_name;     /* official network name */
    char     **n_aliases;  /* alias list */
    int        n_addrtype; /* net address type */
    uint32_t   n_net;      /* network number */
}

The members of the netent structure are:

n_name
The official name of the network.

n_aliases
A NULL-terminated list of alternative names for the network.

n_addrtype
The type of the network number; always AF_INET.

n_net
The network number in host byte order.

RETURN VALUE

The getnetent(), getnetbyname(), and getnetbyaddr() functions return a pointer to a statically allocated netent structure, or a null pointer if an error occurs or the end of the file is reached.

FILES

/etc/networks
networks database file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getnetent()

Thread safety

MT-Unsafe race:netent race:netentbuf env locale

getnetbyname()

Thread safety

MT-Unsafe race:netbyname env locale

getnetbyaddr()

Thread safety

MT-Unsafe race:netbyaddr locale

setnetent(), endnetent()

Thread safety

MT-Unsafe race:netent env locale

In the above table, netent in race:netent signifies that if any of the functions setnetent(), getnetent(), or endnetent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, 4.3BSD.

Before glibc 2.2, the net argument of getnetbyaddr() was of type long.

SEE ALSO

getnetent_r(3), getprotoent(3), getservent(3)
RFC 1101

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1135 - Linux cli command HTTP_DAVpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTTP_DAVpm and provides detailed information about the command HTTP_DAVpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTTP_DAVpm.

NAME 🖥️ HTTP_DAVpm 🖥️

A WebDAV client library for Perl5

SYNOPSIS

# DAV script that connects to a webserver, safely makes # a new directory and uploads all html files in # the /tmp directory. use HTTP::DAV; $d = HTTP::DAV->new(); $url = “http://host.org:8080/dav/"; $d->credentials( -user => “pcollins”, -pass => “mypass”, -url => $url, -realm => “DAV Realm” ); $d->open( -url => $url ) or die(“Couldnt open $url: " .$d->message . " “); # Make a null lock on newdir $d->lock( -url => “$url/newdir”, -timeout => “10m” ) or die “Wont put unless I can lock for 10 minutes “; # Make a new directory $d->mkcol( -url => “$url/newdir” ) or die “Couldnt make newdir at $url “; # Upload multiple files to newdir. if ( $d->put( -local => “/tmp/*.html”, -url => $url ) ) { print “successfully uploaded multiple files to $url “; } else { print “put failed: " . $d->message . " “; } $d->unlock( -url => $url );

DESCRIPTION

HTTP::DAV is a Perl API for interacting with and modifying content on webservers using the WebDAV protocol. Now you can LOCK, DELETE and PUT files and much more on a DAV-enabled webserver.

HTTP::DAV is part of the PerlDAV project hosted at http://www.webdav.org/perldav/ and has the following features:

  • Full RFC2518 method support. OPTIONS, TRACE, GET, HEAD, DELETE, PUT, COPY, MOVE, PROPFIND, PROPPATCH, LOCK, UNLOCK.

  • A fully object-oriented API.

  • Recursive GET and PUT for site backups and other scripted transfers.

  • Transparent lock handling when performing LOCK/COPY/UNLOCK sequences.

  • http and https support (https requires the Crypt::SSLeay library). See INSTALLATION.

  • Basic AND Digest authentication support (Digest auth requires the MD5 library). See INSTALLATION.

  • dave, a fully-functional ftp-style interface written on top of the HTTP::DAV API and bundled by default with the HTTP::DAV library. (If you’ve already installed HTTP::DAV, then dave will also have been installed (probably into /usr/local/bin). You can see it’s man page by typing perldoc dave or going to http://www.webdav.org/perldav/dave/.

  • It is built on top of the popular LWP (Library for WWW access in Perl). This means that HTTP::DAV inherits proxy support, redirect handling, basic (and digest) authorization and many other HTTP operations. See LWP for more information.

  • Popular server support. HTTP::DAV has been tested against the following servers: mod_dav, IIS5, Xythos webfile server and mydocsonline. The library is growing an impressive interoperability suite which also serves as useful sample scripts. See make test and t/*.

HTTP::DAV essentially has two API’s, one which is accessed through this module directly (HTTP::DAV) and is a simple abstraction to the rest of the HTTP::DAV::* Classes. The other interface consists of the HTTP::DAV::* classes which if required allow you to get down and dirty with your DAV and HTTP interactions.

The methods provided in HTTP::DAV should do most of what you want. If, however, you need more control over the client’s operations or need more info about the server’s responses then you will need to understand the rest of the HTTP::DAV::* interfaces. A good place to start is with the HTTP::DAV::Resource and HTTP::DAV::Response documentation.

METHODS

METHOD CALLING: Named vs Unnamed parameters

You can pass parameters to HTTP::DAV methods in one of two ways: named or unnamed.

Named parameters provides for a simpler/easier to use interface. A named interface affords more readability and allows the developer to ignore a specific order on the parameters. (named parameters are also case insensitive)

Each argument name is preceded by a dash. Neither case nor order matters in the argument list. -url, -Url, and -URL are all acceptable. In fact, only the first argument needs to begin with a dash. If a dash is present in the first argument, HTTP::DAV assumes dashes for the subsequent ones.

Each method can also be called with unnamed parameters which often makes sense for methods with only one parameter. But the developer will need to ensure that the parameters are passed in the correct order (as listed in the docs).

Doc: method( -url=>$url, [-depth=>$depth] ) Named: $d->method( -url=>$url, -depth=>$d ); # VALID Named: $d->method( -Depth=>$d, -Url=>$url ); # VALID Named: $d->method( Depth=>$d, Url=>$url ); # INVALID (needs -) Named: $d->method( -Arg2=>$val2 ); # INVALID, ARG1 is not optional Unnamed: $d->method( $val1 ); # VALID Unnamed: $d->method( $val2,$val1 ); # INVALID, ARG1 must come first.

IMPORTANT POINT!!!! If you specify a named parameter first but then forget for the second and third parameters, you WILL get weird things happen. E.g. this is bad:

$d->method( -url=>$url, $arg2, $arg3 ); # BAD BAD BAD

THINGS YOU NEED TO KNOW

In all of the methods specified in PUBLIC METHODS there are some common concepts you’ll need to understand:

  • URLs represent an absolute or relative URI. -url=>“host.org/dav_dir/” # Absolute -url=>"/dav_dir/” # Relative -url=>“file.txt” # Relative You can only use a relative URL if you have already opened an absolute URL. The HTTP::DAV module now consistently uses the named parameter: URL. The lower-level HTTP::DAV::Resource interface inconsistently interchanges URL and URI. I’m working to resolve this, in the meantime, you’ll just need to remember to use the right one by checking the documentation if you need to mix up your use of both interfaces.

  • GLOBS Some methods accept wildcards in the URL. A wildcard can be used to indicate that the command should perform the command on all Resources that match the wildcard. These wildcards are called GLOBS. The glob may contain the characters *, ? and the set operator […] where … contains multiple characters ([1t2]) or a range such ([1-5]). For the curious, the glob is converted to a regex and then matched: * to .*, ? to ., and the [] is left untouched. It is important to note that globs only operate at the leaf-level. For instance /my_dir/*/file.txt is not a valid glob. If a glob matches no URL’s the command will fail (which normally means returns 0). Globs are useful in conjunction with CALLBACKS to provide feedback as each operation completes. See the documentation for each method to determine whether it supports globbing. Globs are useful for interactive style applications (see the source code for dave as an example). Example globs: $dav1->delete(-url=>"/my_dir/file[1-3]”); # Matches file1, file2, file3 $dav1->delete(-url=>"/my_dir/file[1-3]*.txt”);# Matches file1*.txt,file2*.txt,file3*.txt $dav1->delete(-url=>"/my_dir/*/file.txt”); # Invalid. Can only match at leaf-level

  • CALLBACKS Callbacks are used by some methods (primarily get and put) to give the caller some insight as to how the operation is progressing. A callback allows you to define a subroutine as defined below and pass a reference (\ref) to the method. The rationale behind the callback is that a recursive get/put or an operation against many files (using a glob) can actually take a long time to complete. Example callback: $d->get( -url=>$url, -to=>$to, -callback=>\mycallback ); Your callback function MUST accept arguments as follows: sub cat_callback { my($status,$mesg,$url,$so_far,$length,$data) = @_; … } The status argument specifies whether the operation has succeeded (1), failed (0), or is in progress (-1). The mesg argument is a status message. The status message could contain any string and often contains useful error messages or success messages. The url the remote URL. The so_far, length - these parameters indicate how many bytes have been downloaded and how many we should expect. This is useful for doing 56% to go style-gauges. The data parameter - is the actual data transferred. The cat command uses this to print the data to the screen. This value will be empty for put. See the source code of dave for a useful sample of how to setup a callback. Note that these arguments are NOT named parameters. All error messages set during a multi-operation request (for instance a recursive get/put) are also retrievable via the errors() function once the operation has completed. See ERROR HANDLING for more information.

PUBLIC METHODS

new(USERAGENT)

new(USERAGENT, HEADERS)

Creates a new HTTP::DAV client $d = HTTP::DAV->new(); The -useragent parameter allows you to pass your own user agent object and expects an HTTP::DAV::UserAgent object. See the dave program for an advanced example of a custom UserAgent that interactively prompts the user for their username and password. The -headers parameter allows you to specify a list of headers to be sent along with all requests. This can be either a hashref like: { “X-My-Header” => “value”, … } or a HTTP::Headers object.

credentials(USER,PASS,[URL],[REALM])
sets authorization credentials for a URL and/or REALM. When the client hits a protected resource it will check these credentials to see if either the URL or REALM match the authorization response. Either URL or REALM must be provided. returns no value Example: $d->credentials( -url=>myhost.org:8080/test/, -user=>pcollins, -pass=>mypass);

DebugLevel($val)
sets the debug level to $val. 0=off 3=noisy. $val default is 0. returns no value. When the value is greater than 1, the HTTP::DAV::Comms module will log all of the client<=>server interactions into /tmp/perldav_debug.txt.

DAV OPERATIONS

For all of the following operations, URL can be absolute (http://host.org/dav/) or relative (../dir2/). The only operation that requires an absolute URL is open.

copy(URL,DEST,[OVERWRITE],[DEPTH])
copies one remote resource to another

“-url”
is the remote resource you’d like to copy. Mandatory

“-dest”
is the remote target for the copy command. Mandatory

“-overwrite”
optionally indicates whether the server should fail if the target exists. Valid values are T and F (1 and 0 are synonymous). Default is T.

“-depth”
optionally indicates whether the server should do a recursive copy or not. Valid values are 0 and (1 or infinity). Default is infinity (1).

The return value is always 1 or 0 indicating success or failure. Requires a working resource to be set before being called. See open. Note: if either URL or DEST are locked by this dav client, then the lock headers will be taken care of automatically. If the either of the two URL’s are locked by someone else, the server should reject the request. copy examples: $d->open(-url=>“host.org/dav_dir/”); Recursively copy dir1/ to dir2/ $d->copy(-url=>“dir1/”, -dest=>“dir2/”); Non-recursively and non-forcefully copy dir1/ to dir2/ $d->copy(-url=>“dir1/”, -dest=>“dir2/”,-overwrite=>0,-depth=>0); Create a copy of dir1/file.txt as dir2/file.txt $d->cwd(-url=>“dir1/”); $d->copy(“file.txt”,”../dir2”); Create a copy of file.txt as dir2/new_file.txt $d->copy(“file.txt”,"/dav_dir/dir2/new_file.txt”)

cwd(URL)
changes the remote working directory. This is synonymous to open except that the URL can be relative and may contain a glob (the first match in a glob will be used). $d->open(“host.org/dav_dir/dir1/”); $d->cwd(”../dir2”); $d->cwd(-url=>”../dir1”); The return value is always 1 or 0 indicating success or failure. Requires a working resource to be set before being called. See open. You can not cwd to files, only collections (directories).

delete(URL)
deletes a remote resource. $d->open(“host.org/dav_dir/”); $d->delete(“index.html”); $d->delete("./dir1"); $d->delete(-url=>"/dav_dir/dir2/file*",-callback=>\mycallback);

“-url”
is the remote resource(s) you’d like to delete. It can be a file, directory or glob.

“-callback” is a reference to a callback function which will be called everytime a file is deleted. This is mainly useful when used in conjunction with GLOBS deletes. See callbacks
The return value is always 1 or 0 indicating success or failure. Requires a working resource to be set before being called. See open. This command will recursively delete directories. BE CAREFUL of uninitialised file variables in situation like this: $d->delete($dir/$file). This will trash your $dir if $file is not set.

get(URL,[TO],[CALLBACK])
downloads the file or directory at URL to the local location indicated by TO.

“-url”
is the remote resource you’d like to get. It can be a file or directory or a glob.

“-to”
is where you’d like to put the remote resource. The -to parameter can be: - a B<filename> indicating where to save the contents. - a B<FileHandle reference>. - a reference to a B<scalar object> into which the contents will be saved. If the -url matches multiple files (via a glob or a directory download), then the get routine will return an error if you try to use a FileHandle reference or a scalar reference.

“-callback”
is a reference to a callback function which will be called everytime a file is completed downloading. The idea of the callback function is that some recursive get’s can take a very long time and the user may require some visual feedback. See CALLBACKS for an examples and how to use a callback.

The return value of get is always 1 or 0 indicating whether the entire get sequence was a success or if there was ANY failures. For instance, in a recursive get, if the server couldn’t open 1 of the 10 remote files, for whatever reason, then the return value will be 0. This is so that you can have your script call the errors() routine to handle error conditions. Previous versions of HTTP::DAV allowed the return value to be the file contents if no -to attribute was supplied. This functionality is deprecated. Requires a working resource to be set before being called. See open. get examples: $d->open(“host.org/dav_dir/”); Recursively get remote my_dir/ to . $d->get(“my_dir/”,"."); Recursively get remote my_dir/ to /tmp/my_dir/ calling &mycallback($success,$mesg) everytime a file operation is completed. $d->get(“my_dir”,"/tmp",\mycallback); Get remote my_dir/index.html to /tmp/index.html $d->get(-url=>"/dav_dir/my_dir/index.html",-to=>"/tmp"); Get remote index.html to /tmp/index1.html $d->get(“index.html”,"/tmp/index1.html"); Get remote index.html to a filehandle my $fh = new FileHandle; $fh->open(">/tmp/index1.html"); $d->get(“index.html”,\fh); Get remote index.html as a scalar (into the string $file_contents): my $file_contents; $d->get(“index.html”,\file_contents); Get all of the files matching the globs file1* and file2*: $d->get(“file[12]*”,"/tmp"); Get all of the files matching the glob file?.html: $d->get(“file?.html”,"/tmp"); # downloads file1.html and file2.html but not file3.html or file1.txt Invalid glob: $d->get("/dav_dir/*/index.html","/tmp"); # Can not glob like this.

lock([URL],[OWNER],[DEPTH],[TIMEOUT],[SCOPE],[TYPE])
locks a resource. If URL is not specified, it will lock the current working resource (opened resource). $d->lock( -url => “index.html”, -owner => “Patrick Collins”, -depth => “infinity”, -scope => “exclusive”, -type => “write”, -timeout => “10h” ) See HTTP::DAV::Resource lock() for details of the above parameters. The return value is always 1 or 0 indicating success or failure. Requires a working resource to be set before being called. See open. When you lock a resource, the lock is held against the current HTTP::DAV object. In fact, the locks are held in a HTTP::DAV::ResourceList object. You can operate against all of the locks that you have created as follows: ## Print and unlock all locks that we own. my $rl_obj = $d->get_lockedresourcelist(); foreach $resource ( $rl_obj->get_resources() ) { @locks = $resource->get_locks(-owned=>1); foreach $lock ( @locks ) { print $resource->get_uri . " “; print $lock->as_string . " “; } ## Unlock them? $resource->unlock; } Typically, a simple $d->unlock($uri) will suffice. lock example $d->lock($uri, -timeout=>“1d”); … $d->put("/tmp/index.html”,$uri); $d->unlock($uri);

mkcol(URL)
make a remote collection (directory) The return value is always 1 or 0 indicating success or failure. Requires a working resource to be set before being called. See open. $d->open(“host.org/dav_dir/”); $d->mkcol(“new_dir”); # Should succeed $d->mkcol("/dav_dir/new_dir”); # Should succeed $d->mkcol("/dav_dir/new_dir/xxx/yyy"); # Should fail

move(URL,DEST,[OVERWRITE],[DEPTH])
moves one remote resource to another

“-url”
is the remote resource you’d like to move. Mandatory

“-dest”
is the remote target for the move command. Mandatory

“-overwrite”
optionally indicates whether the server should fail if the target exists. Valid values are T and F (1 and 0 are synonymous). Default is T.

Requires a working resource to be set before being called. See open. The return value is always 1 or 0 indicating success or failure. Note: if either URL or DEST are locked by this dav client, then the lock headers will be taken care of automatically. If either of the two URL’s are locked by someone else, the server should reject the request. move examples: $d->open(-url=>“host.org/dav_dir/”); move dir1/ to dir2/ $d->move(-url=>“dir1/”, -dest=>“dir2/”); non-forcefully move dir1/ to dir2/ $d->move(-url=>“dir1/”, -dest=>“dir2/”,-overwrite=>0); Move dir1/file.txt to dir2/file.txt $d->cwd(-url=>“dir1/”); $d->move(“file.txt”,"../dir2"); move file.txt to dir2/new_file.txt $d->move(“file.txt”,"/dav_dir/dir2/new_file.txt")

open(URL)
opens the directory (collection resource) at URL. open will perform a propfind against URL. If the server does not understand the request then the open will fail. Similarly, if the server indicates that the resource at URL is NOT a collection, the open command will fail.

options([URL])
Performs an OPTIONS request against the URL or the working resource if URL is not supplied. Requires a working resource to be set before being called. See open. The return value is a string of comma separated OPTIONS that the server states are legal for URL or undef otherwise. A fully compliant DAV server may offer as many methods as: OPTIONS, TRACE, GET, HEAD, DELETE, PUT, COPY, MOVE, PROPFIND, PROPPATCH, LOCK, UNLOCK Note: IIS5 does not support PROPPATCH or LOCK on collections. Example: $options = $d->options($url); print $options . " “; if ($options=~ /PROPPATCH/) { print “OK to proppatch “; } Or, put more simply: if ( $d->options($url) =~ /PROPPATCH/ ) { print “OK to proppatch “; }

propfind([URL],[DEPTH])
Perform a propfind against URL at DEPTH depth. -depth can be used to specify how deep the propfind goes. 0 is collection only. 1 is collection and it’s immediate members (This is the default value). infinity is the entire directory tree. Note that most DAV compliant servers deny infinity depth propfinds for security reasons. Requires a working resource to be set before being called. See open. The return value is an HTTP::DAV::Resource object on success or 0 on failure. The Resource object can be used for interrogating properties or performing other operations. ## Print collection or content length if ( $r=$d->propfind( -url=>"/my_dir”, -depth=>1) ) { if ( $r->is_collection ) { print “Collection " print $r->get_resourcelist->as_string . " " } else { print $r->get_property(“getcontentlength”) .” “; } } Please note that although you may set a different namespace for a property of a resource during a set_prop, HTTP::DAV currently ignores all XML namespaces so you will get clashes if two properties have the same name but in different namespaces. Currently this is unavoidable but I’m working on the solution.

proppatch([URL],[NAMESPACE],PROPNAME,PROPVALUE,ACTION,[NSABBR])
If -action equals set then we set a property named -propname to -propvalue in the namespace -namespace for -url. If -action equals remove then we unset a property named -propname in the namespace -namespace for -url. If no action is supplied then the default action is set. The return value is an HTTP::DAV::Resource object on success or 0 on failure. The Resource object can be used for interrogating properties or performing other operations. To explicitly set a namespace in which to set the propname then you can use the -namespace and -nsabbr (namespace abbreviation) parameters. But you’re welcome to play around with DAV namespaces. Requires a working resource to be set before being called. See open. It is recommended that you use set_prop and unset_prop instead of proppatch for readability. set_prop simply calls proppatch(-action=set)> and unset_prop calls proppatch(-action=remove)> See set_prop and unset_prop for examples.

put(LOCAL,[URL],[CALLBACK],[HEADERS])
uploads the files or directories at -local to the remote destination at -url. -local points to a file, directory or series of files or directories (indicated by a glob). If the filename contains any of the characters `*’, `?’ or `[’ it is a candidate for filename substitution, also known as ``globbing’’. This word is then regarded as a pattern (``glob-pattern’’), and replaced with an alphabetically sorted list of file names which match the pattern. One can upload/put a string by passing a reference to a scalar in the -local parameter. See example below. put requires a working resource to be set before being called. See open. The return value is always 1 or 0 indicating success or failure. See get() for a description of what the optional callback parameter does. You can also pass a -headers argument. That allows one to specify custom HTTP headers. It can be either a hashref with header names and values, or a HTTP::Headers object. put examples: Put a string to the server: my $myfile = “This is the contents of a file to be uploaded “; $d->put(-local=>\myfile,-url=>“http://www.host.org/dav_dir/file.txt”); Put a local file to the server: $d->put(-local=>"/tmp/index.html”,-url=>“http://www.host.org/dav_dir/”); Put a series of local files to the server: In these examples, /tmp contains file1.html, file1, file2.html, file2.txt, file3.html, file2/ $d->put(-local=>"/tmp/file[12]*”,-url=>“http://www.host.org/dav_dir/”); uploads file1.html, file1, file2.html, file2.txt and the directory file2/ to dav_dir/.

set_prop([URL],[NAMESPACE],PROPNAME,PROPVALUE)
Sets a property named -propname to -propvalue in the namespace -namespace for -url. Requires a working resource to be set before being called. See open. The return value is an HTTP::DAV::Resource object on success or 0 on failure. The Resource object can be used for interrogating properties or performing other operations. Example: if ( $r = $d->set_prop(-url=>$url, -namespace=>“dave”, -propname=>“author”, -propvalue=>“Patrick Collins” ) ) { print “Author property set “; } else { print “set_prop failed:” . $d->message . " “; } See the note in propfind about namespace support in HTTP::DAV. They’re settable, but not readable.

steal([URL])
forcefully steals any locks held against URL. steal will perform a propfind against URL and then, any locks that are found will be unlocked one by one regardless of whether we own them or not. Requires a working resource to be set before being called. See open. The return value is always 1 or 0 indicating success or failure. If multiple locks are found and unlocking one of them fails then the operation will be aborted. if ($d->steal()) { print “Steal succeeded “; } else { print “Steal failed: “. $d->message() . " “; }

unlock([URL])
unlocks any of our locks on URL. Requires a working resource to be set before being called. See open. The return value is always 1 or 0 indicating success or failure. if ($d->unlock()) { print “Unlock succeeded “; } else { print “Unlock failed: “. $d->message() . " “; }

unset_prop([URL],[NAMESPACE],PROPNAME)
Unsets a property named -propname in the namespace -namespace for -url. Requires a working resource to be set before being called. See open. The return value is an HTTP::DAV::Resource object on success or 0 on failure. The Resource object can be used for interrogating properties or performing other operations. Example: if ( $r = $d->unset_prop(-url=>$url, -namespace=>“dave”, -propname=>“author”, ) ) { print “Author property was unset “; } else { print “set_prop failed:” . $d->message . " “; } See the note in propfind about namespace support in HTTP::DAV. They’re settable, but not readable.

ACCESSOR METHODS

get_user_agent
Returns the clients’ working HTTP::DAV::UserAgent object. You may want to interact with the HTTP::DAV::UserAgent object to modify request headers or provide advanced authentication procedures. See dave for an advanced authentication procedure.

get_last_request
Takes no arguments and returns the clients’ last outgoing HTTP::Request object. You would only use this to inspect a request that has already occurred. If you would like to modify the HTTP::Request BEFORE the HTTP request takes place (for instance to add another header), you will need to get the HTTP::DAV::UserAgent using get_user_agent and interact with that.

get_workingresource
Returns the currently opened or working resource (HTTP::DAV::Resource). The working resource is changed whenever you open a url or use the cwd command. e.g. $r = $d->get_workingresource print pwd: . $r->get_uri . ;

get_workingurl
Returns the currently opened or working URL. The working resource is changed whenever you open a url or use the cwd command. print “pwd: " . $d->get_workingurl . " “;

get_lockedresourcelist
Returns an HTTP::DAV::ResourceList object that represents all of the locks we’ve created using THIS dav client. print “pwd: " . $d->get_workingurl . " “;

get_absolute_uri(REL_URI,[BASE_URI])
This is a useful utility function which joins BASE_URI and REL_URI and returns a new URI. If BASE_URI is not supplied then the current working resource (as indicated by get_workingurl) is used. If BASE_URI is not set and there is no current working resource the REL_URI will be returned. For instance: $d->open(http://host.org/webdav/dir1/); # Returns “http://host.org/webdav/dir2/" $d->get_absolute_uri(-rel_uri=>”../dir2”); # Returns “http://x.org/dav/dir2/file.txt" $d->get_absolute_uri(-rel_uri =>“dir2/file.txt”, ->base_uri=>“http://x.org/dav/"); Note that it subtly takes care of trailing slashes.

ERROR HANDLING METHODS

message
message gets the last success or error message. The return value is always a scalar (string) and will change everytime a dav operation is invoked (lock, cwd, put, etc). See also errors for operations which contain multiple error messages.

errors
Returns an @array of error messages that had been set during a multi-request operation. Some of HTTP::DAV’s operations perform multiple request to the server. At the time of writing only put and get are considered multi-request since they can operate recursively requiring many HTTP requests. In these situations you should check the errors array if to determine if any of the requests failed. The errors function is used for multi-request operations and not to be confused with a multi-status server response. A multi-status server response is when the server responds with multiple error messages for a SINGLE request. To deal with multi-status responses, see HTTP::DAV::Response. # Recursive put if (!$d->put( “/tmp/my_dir”, $url ) ) { # Get the overall message print $d->message; # Get the individual messages foreach $err ( $d->errors ) { print " Error:$err " } }

is_success
Returns the status of the last DAV operation performed through the HTTP::DAV interface. This value will always be the same as the value returned from an HTTP::DAV::method. For instance: # This will always evaluate to true ($d->lock($url) eq $d->is_success) ? You may want to use the is_success method if you didn’t capture the return value immediately. But in most circumstances you’re better off just evaluating as follows: if($d->lock($url)) { … }

get_last_response
Takes no arguments and returns the last seen HTTP::DAV::Response object. You may want to use this if you have just called a propfind and need the individual error messages returned in a MultiStatus. If you find that you’re using get_last_response() method a lot, you may be better off using the more advanced HTTP::DAV interface and interacting with the HTTP::DAV::* interfaces directly as discussed in the intro. For instance, if you find that you’re always wanting a detailed understanding of the server’s response headers or messages, then you’re probably better off using the HTTP::DAV::Resource methods and interpreting the HTTP::DAV::Response directly. To perform detailed analysis of the server’s response (if for instance you got back a multistatus response) you can call get_last_response() which will return to you the most recent response object (always the result of the last operation, PUT, PROPFIND, etc). With the returned HTTP::DAV::Response object you can handle multi-status responses. For example: # Print all of the messages in a multistatus response if (! $d->unlock($url) ) { $response = $d->get_last_response(); if ($response->is_multistatus() ) { foreach $num ( 0 .. $response->response_count() ) { ($err_code,$mesg,$url,$desc) = $response->response_bynum($num); print “$mesg ($err_code) for $url “; } } }

ADVANCED METHODS

new_resource
Creates a new resource object with which to play. This is the preferred way of creating an HTTP::DAV::Resource object if required. Why? Because each Resource object needs to sit within a global HTTP::DAV client. Also, because the new_resource routine checks the HTTP::DAV locked resource list before creating a new object. $dav->new_resource( -uri => “http://…” );

set_workingresource(URL)
Sets the current working resource to URL. You shouldn’t need this method. Call open or cwd to set the working resource. You CAN call set_workingresource() but you will need to perform a propfind immediately following it to ensure that the working resource is valid.

INSTALLATION, TODO, MAILING LISTS and REVISION HISTORY

[OUTDATED]

Please see the primary HTTP::DAV webpage at (http://www.webdav.org/perldav/http-dav/) or the README file in this library.

SEE ALSO

You’ll want to also read:

“HTTP::DAV::Response”

“HTTP::DAV::Resource”

“dave”

and maybe if you’re more inquisitive:

“LWP::UserAgent”

“HTTP::Request”

“HTTP::DAV::Comms”

“HTTP::DAV::Lock”

“HTTP::DAV::ResourceList”

“HTTP::DAV::Utils”

AUTHOR AND COPYRIGHT

This module is Copyright (C) 2001-2008 by

Patrick Collins G03 Gloucester Place, Kensington Sydney, Australia Email: [email protected] Phone: +61 2 9663 4916

All rights reserved.

Current co-maintainer of the module is Cosimo Streppone for Opera Software ASA, [email protected].

You may distribute this module under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1136 - Linux cli command Text_CharWidthpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Text_CharWidthpm and provides detailed information about the command Text_CharWidthpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Text_CharWidthpm.

NAME 🖥️ Text_CharWidthpm 🖥️

Get number of occupied columns of a string on terminal

SYNOPSIS

use Text::CharWidth qw(mbwidth mbswidth mblen); mbwidth(string); mbswidth(string); mblen(string);

DESCRIPTION

This module supplies features similar as wcwidth (3) and wcswidth (3) in C language.

Characters have its own width on terminal depending on locale. For example, ASCII characters occupy one column per character, east Asian fullwidth characters (like Hiragana or Han Ideograph) occupy two columns per character, and combining characters (apperaring in ISO-8859-11 Thai, Unicode, and so on) occupy zero columns per character. mbwidth() gives the width of the first character of the given string and mbswidth() gives the width of the whole given string.

The names of mbwidth and mbswidth came from “multibyte” versions of wcwidth and wcswidth which are “wide character” versions.

mblen(string) returns number of bytes of the first character of the string. Please note that a character may consist of multiple bytes in multibyte encodings such as UTF-8, EUC-JP, EUC-KR, GB2312, or Big5.

mbwidth(string) returns the width of the first character of the string. mbswidth(string) returns the width of the whole string.

Parameters are to be given in locale encodings, not always in UTF-8.

SEE ALSO

locale (5), wcwidth (3), wcswidth (3)

AUTHOR

Tomohiro KUBOTA, <[email protected]>

COPYRIGHT AND LICENSE

Copyright 2003 by Tomohiro KUBOTA

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1137 - Linux cli command getlogin_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getlogin_r and provides detailed information about the command getlogin_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getlogin_r.

NAME 🖥️ getlogin_r 🖥️

get username

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
char *getlogin(void);
int getlogin_r(char buf[.bufsize], size_t bufsize);
#include <stdio.h>
char *cuserid(char *string);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getlogin_r():

    _POSIX_C_SOURCE >= 199506L

cuserid():

    Since glibc 2.24:
        (_XOPEN_SOURCE && ! (_POSIX_C_SOURCE >= 200112L)
            || _GNU_SOURCE
    Up to and including glibc 2.23:
        _XOPEN_SOURCE

DESCRIPTION

getlogin() returns a pointer to a string containing the name of the user logged in on the controlling terminal of the process, or a null pointer if this information cannot be determined. The string is statically allocated and might be overwritten on subsequent calls to this function or to cuserid().

getlogin_r() returns this same username in the array buf of size bufsize.

cuserid() returns a pointer to a string containing a username associated with the effective user ID of the process. If string is not a null pointer, it should be an array that can hold at least L_cuserid characters; the string is returned in this array. Otherwise, a pointer to a string in a static area is returned. This string is statically allocated and might be overwritten on subsequent calls to this function or to getlogin().

The macro L_cuserid is an integer constant that indicates how long an array you might need to store a username. L_cuserid is declared in <stdio.h>.

These functions let your program identify positively the user who is running (cuserid()) or the user who logged in this session (getlogin()). (These can differ when set-user-ID programs are involved.)

For most purposes, it is more useful to use the environment variable LOGNAME to find out who the user is. This is more flexible precisely because the user can set LOGNAME arbitrarily.

RETURN VALUE

getlogin() returns a pointer to the username when successful, and NULL on failure, with errno set to indicate the error. getlogin_r() returns 0 when successful, and nonzero on failure.

ERRORS

POSIX specifies:

EMFILE
The per-process limit on the number of open file descriptors has been reached.

ENFILE
The system-wide limit on the total number of open files has been reached.

ENXIO
The calling process has no controlling terminal.

ERANGE
(getlogin_r) The length of the username, including the terminating null byte (‘�’), is larger than bufsize.

Linux/glibc also has:

ENOENT
There was no corresponding entry in the utmp-file.

ENOMEM
Insufficient memory to allocate passwd structure.

ENOTTY
Standard input didn’t refer to a terminal. (See BUGS.)

FILES

/etc/passwd
password database file

/var/run/utmp
(traditionally /etc/utmp; some libc versions used /var/adm/utmp)

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getlogin()

Thread safety

MT-Unsafe race:getlogin race:utent sig:ALRM timer locale

getlogin_r()

Thread safety

MT-Unsafe race:utent sig:ALRM timer locale

cuserid()

Thread safety

MT-Unsafe race:cuserid/!string locale

In the above table, utent in race:utent signifies that if any of the functions setutent(3), getutent(3), or endutent(3) are used in parallel in different threads of a program, then data races could occur. getlogin() and getlogin_r() call those functions, so we use race:utent to remind users.

VERSIONS

OpenBSD has getlogin() and setlogin(), and a username associated with a session, even if it has no controlling terminal.

STANDARDS

getlogin()
getlogin_r()
POSIX.1-2008.

cuserid()
None.

STANDARDS

getlogin()
getlogin_r():
POSIX.1-2001. OpenBSD.

cuserid()
System V, POSIX.1-1988. Removed in POSIX.1-1990. SUSv2. Removed in POSIX.1-2001.

System V has a cuserid() function which uses the real user ID rather than the effective user ID.

BUGS

Unfortunately, it is often rather easy to fool getlogin(). Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling terminal of our program need not be the user who started it. Avoid getlogin() for security-related purposes.

Note that glibc does not follow the POSIX specification and uses stdin instead of /dev/tty. A bug. (Other recent systems, like SunOS 5.8 and HP-UX 11.11 and FreeBSD 4.8 all return the login name also when stdin is redirected.)

Nobody knows precisely what cuserid() does; avoid it in portable programs. Or avoid it altogether: use getpwuid(geteuid()) instead, if that is what you meant. Do not use cuserid().

SEE ALSO

logname(1), geteuid(2), getuid(2), utmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1138 - Linux cli command Moose_Meta_Role_Applicationpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Role_Applicationpm and provides detailed information about the command Moose_Meta_Role_Applicationpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Role_Applicationpm.

NAME 🖥️ Moose_Meta_Role_Applicationpm 🖥️

A base class for role application

VERSION

version 2.2207

DESCRIPTION

This is the abstract base class for role applications.

The API for this class and its subclasses still needs some consideration, and is intentionally not yet documented.

METHODS

new

meta

get_method_exclusions

is_method_excluded

get_method_aliases

is_aliased_method

is_method_aliased

apply

check_role_exclusions

check_required_methods

check_required_attributes

apply_attributes

apply_methods

apply_overloading

apply_method_modifiers

apply_before_method_modifiers

apply_after_method_modifiers

apply_around_method_modifiers

apply_override_method_modifiers

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1139 - Linux cli command HTTP_Messagepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTTP_Messagepm and provides detailed information about the command HTTP_Messagepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTTP_Messagepm.

NAME 🖥️ HTTP_Messagepm 🖥️

HTTP style message (base class)

VERSION

version 6.46

SYNOPSIS

use parent HTTP::Message;

DESCRIPTION

An HTTP::Message object contains some headers and a content body. The following methods are available:

$mess = HTTP::Message->new

$mess = HTTP::Message->new( $headers )

$mess = HTTP::Message->new( $headers, $content )

This constructs a new message object. Normally you would want construct HTTP::Request or HTTP::Response objects instead. The optional $header argument should be a reference to an HTTP::Headers object or a plain array reference of key/value pairs. If an HTTP::Headers object is provided then a copy of it will be embedded into the constructed message, i.e. it will not be owned and can be modified afterwards without affecting the message. The optional $content argument should be a string of bytes.

$mess = HTTP::Message->parse( $str )
This constructs a new message object by parsing the given string.

$mess->headers
Returns the embedded HTTP::Headers object.

$mess->headers_as_string

$mess->headers_as_string( $eol )

Call the as_string() method for the headers in the message. This will be the same as $mess->headers->as_string but it will make your program a whole character shorter :-)

$mess->content

$mess->content( $bytes )

The content() method sets the raw content if an argument is given. If no argument is given the content is not touched. In either case the original raw content is returned. If the undef argument is given, the content is reset to its default value, which is an empty string. Note that the content should be a string of bytes. Strings in perl can contain characters outside the range of a byte. The Encode module can be used to turn such strings into a string of bytes.

$mess->add_content( $bytes )
The add_content() methods appends more data bytes to the end of the current content buffer.

$mess->add_content_utf8( $string )
The add_content_utf8() method appends the UTF-8 bytes representing the string to the end of the current content buffer.

$mess->content_ref

$mess->content_ref( \bytes )

The content_ref() method will return a reference to content buffer string. It can be more efficient to access the content this way if the content is huge, and it can even be used for direct manipulation of the content, for instance: ${$res->content_ref} =~ s/foo/bar/g; This example would modify the content buffer in-place. If an argument is passed it will setup the content to reference some external source. The content() and add_content() methods will automatically dereference scalar references passed this way. For other references content() will return the reference itself and add_content() will refuse to do anything.

$mess->content_charset
This returns the charset used by the content in the message. The charset is either found as the charset attribute of the Content-Type header or by guessing. See <http://www.w3.org/TR/REC-html40/charset.html#spec-char-encoding> for details about how charset is determined.

$mess->decoded_content( %options )
Returns the content with any Content-Encoding undone and, for textual content (Content-Type values starting with text/, exactly matching application/xml, or ending with +xml), the raw content’s character set decoded into Perl’s Unicode string format. Note that this does not currently <https://github.com/libwww-perl/HTTP-Message/pull/99> attempt to decode declared character sets for any other content types like application/json or application/javascript. If the Content-Encoding or charset of the message is unknown, this method will fail by returning undef. The following options can be specified.

“charset”
This overrides the charset parameter for text content. The value none can used to suppress decoding of the charset.

“default_charset”
This overrides the default charset guessed by content_charset() or if that fails “ISO-8859-1”.

“alt_charset”
If decoding fails because the charset specified in the Content-Type header isn’t recognized by Perl’s Encode module, then try decoding using this charset instead of failing. The alt_charset might be specified as none to simply return the string without any decoding of charset as alternative.

“charset_strict”
Abort decoding if malformed characters is found in the content. By default you get the substitution character ("\x{FFFD}") in place of malformed characters.

“raise_error”
If TRUE then raise an exception if not able to decode content. Reason might be that the specified Content-Encoding or charset is not supported. If this option is FALSE, then decoded_content() will return undef on errors, but will still set $@.

“ref”
If TRUE then a reference to decoded content is returned. This might be more efficient in cases where the decoded content is identical to the raw content as no data copying is required in this case.

$mess->decodable

HTTP::Message::decodable()

This returns the encoding identifiers that decoded_content() can process. In scalar context returns a comma separated string of identifiers. This value is suitable for initializing the Accept-Encoding request header field.

$mess->decode
This method tries to replace the content of the message with the decoded version and removes the Content-Encoding header. Returns TRUE if successful and FALSE if not. If the message does not have a Content-Encoding header this method does nothing and returns TRUE. Note that the content of the message is still bytes after this method has been called and you still need to call decoded_content() if you want to process its content as a string.

$mess->encode( $encoding, … )
Apply the given encodings to the content of the message. Returns TRUE if successful. The “identity” (non-)encoding is always supported; other currently supported encodings, subject to availability of required additional modules, are “gzip”, “deflate”, “x-bzip2”, “base64” and “br”. A successful call to this function will set the Content-Encoding header. Note that multipart/* or message/* messages can’t be encoded and this method will croak if you try.

$mess->parts

$mess->parts( @parts )

$mess->parts( \parts )

Messages can be composite, i.e. contain other messages. The composite messages have a content type of multipart/* or message/*. This method give access to the contained messages. The argumentless form will return a list of HTTP::Message objects. If the content type of $msg is not multipart/* or message/* then this will return the empty list. In scalar context only the first object is returned. The returned message parts should be regarded as read-only (future versions of this library might make it possible to modify the parent by modifying the parts). If the content type of $msg is message/* then there will only be one part returned. If the content type is message/http, then the return value will be either an HTTP::Request or an HTTP::Response object. If a @parts argument is given, then the content of the message will be modified. The array reference form is provided so that an empty list can be provided. The @parts array should contain HTTP::Message objects. The @parts objects are owned by $mess after this call and should not be modified or made part of other messages. When updating the message with this method and the old content type of $mess is not multipart/* or message/*, then the content type is set to multipart/mixed and all other content headers are cleared. This method will croak if the content type is message/* and more than one part is provided.

$mess->add_part( $part )
This will add a part to a message. The $part argument should be another HTTP::Message object. If the previous content type of $mess is not multipart/* then the old content (together with all content headers) will be made part #1 and the content type made multipart/mixed before the new part is added. The $part object is owned by $mess after this call and should not be modified or made part of other messages. There is no return value.

$mess->clear
Will clear the headers and set the content to the empty string. There is no return value

$mess->protocol

$mess->protocol( $proto )

Sets the HTTP protocol used for the message. The protocol() is a string like HTTP/1.0 or HTTP/1.1.

$mess->clone
Returns a copy of the message object.

$mess->as_string

$mess->as_string( $eol )

Returns the message formatted as a single string. The optional $eol parameter specifies the line ending sequence to use. The default is " “. If no $eol is given then as_string will ensure that the returned string is newline terminated (even when the message content is not). No extra newline is appended if an explicit $eol is passed.

$mess->dump( %opt )
Returns the message formatted as a string. In void context print the string. This differs from $mess->as_string in that it escapes the bytes of the content so that it’s safe to print them and it limits how much content to print. The escapes syntax used is the same as for Perl’s double quoted strings. If there is no content the string “(no content)” is shown in its place. Options to influence the output can be passed as key/value pairs. The following options are recognized:

maxlength => $num
How much of the content to show. The default is 512. Set this to 0 for unlimited. If the content is longer then the string is chopped at the limit and the string “… (### more bytes not shown)” appended.

no_content => $str
Replaces the “(no content)” marker.

prefix => $str
A string that will be prefixed to each line of the dump.

All methods unknown to HTTP::Message itself are delegated to the HTTP::Headers object that is part of every message. This allows convenient access to these methods. Refer to HTTP::Headers for details of these methods:

$mess->header( $field => $val ) $mess->push_header( $field => $val ) $mess->init_header( $field => $val ) $mess->remove_header( $field ) $mess->remove_content_headers $mess->header_field_names $mess->scan( \doit ) $mess->date $mess->expires $mess->if_modified_since $mess->if_unmodified_since $mess->last_modified $mess->content_type $mess->content_encoding $mess->content_length $mess->content_language $mess->title $mess->user_agent $mess->server $mess->from $mess->referer $mess->www_authenticate $mess->authorization $mess->proxy_authorization $mess->authorization_basic $mess->proxy_authorization_basic

AUTHOR

Gisle Aas <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 1994 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1140 - Linux cli command Image_ExifTool_WritePhotoshoppm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_WritePhotoshoppm and provides detailed information about the command Image_ExifTool_WritePhotoshoppm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_WritePhotoshoppm.

NAME 🖥️ Image_ExifTool_WritePhotoshoppm 🖥️

Write Photoshop IRB meta information

SYNOPSIS

This file is autoloaded by Image::ExifTool::Photoshop.

DESCRIPTION

This file contains routines to write Photoshop metadata.

NOTES

Photoshop IRB blocks may have an associated resource name. By default, the existing name is preserved when rewriting a resource, and an empty name is used when creating a new resource. However, a different resource name may be specified by defining a SetResourceName entry in the tag information hash. With this defined, a new resource name may be appended to the value in the form “VALUE/#NAME#/” (the slashes and hashes are literal). If SetResourceName is anything other than ‘1’, the value is used as a default resource name, and applied if no appended name is provided.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Image::ExifTool::Photoshop (3pm), Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1141 - Linux cli command S_ISBLK

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command S_ISBLK and provides detailed information about the command S_ISBLK, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the S_ISBLK.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1142 - Linux cli command pthread_mutex_consistent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_mutex_consistent and provides detailed information about the command pthread_mutex_consistent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_mutex_consistent.

NAME 🖥️ pthread_mutex_consistent 🖥️

make a robust mutex consistent

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_mutex_consistent(pthread_mutex_t *mutex);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

pthread_mutex_consistent():

    _POSIX_C_SOURCE >= 200809L

DESCRIPTION

This function makes a robust mutex consistent if it is in an inconsistent state. A mutex can be left in an inconsistent state if its owner terminates while holding the mutex, in which case the next owner who acquires the mutex will succeed and be notified by a return value of EOWNERDEAD from a call to pthread_mutex_lock().

RETURN VALUE

On success, pthread_mutex_consistent() returns 0. Otherwise, it returns a positive error number to indicate the error.

ERRORS

EINVAL
The mutex is either not robust or is not in an inconsistent state.

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.12. POSIX.1-2008.

Before the addition of pthread_mutex_consistent() to POSIX, glibc defined the following equivalent nonstandard function if _GNU_SOURCE was defined:

[[deprecated]]
int pthread_mutex_consistent_np(const pthread_mutex_t *mutex);

This GNU-specific API, which first appeared in glibc 2.4, is nowadays obsolete and should not be used in new programs; since glibc 2.34 it has been marked as deprecated.

NOTES

pthread_mutex_consistent() simply informs the implementation that the state (shared data) guarded by the mutex has been restored to a consistent state and that normal operations can now be performed with the mutex. It is the application’s responsibility to ensure that the shared data has been restored to a consistent state before calling pthread_mutex_consistent().

EXAMPLES

See pthread_mutexattr_setrobust(3).

SEE ALSO

pthread_mutex_lock(3), pthread_mutexattr_getrobust(3), pthread_mutexattr_init(3), pthread_mutexattr_setrobust(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1143 - Linux cli command Image_ExifTool_GoPropm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_GoPropm and provides detailed information about the command Image_ExifTool_GoPropm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_GoPropm.

NAME 🖥️ Image_ExifTool_GoPropm 🖥️

Read information from GoPro videos

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to decode metadata from GoPro MP4 videos.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<https://github.com/gopro/gpmf-parser>

<https://github.com/stilldavid/gopro-utils>

SEE ALSO

“GoPro Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1144 - Linux cli command LIST_ENTRY

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LIST_ENTRY and provides detailed information about the command LIST_ENTRY, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LIST_ENTRY.

NAME 🖥️ LIST_ENTRY 🖥️

implementation of a doubly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
LIST_ENTRY(TYPE);
LIST_HEAD(HEADNAME, TYPE);
LIST_HEAD LIST_HEAD_INITIALIZER(LIST_HEAD head);
void LIST_INIT(LIST_HEAD *head);
int LIST_EMPTY(LIST_HEAD *head);
void LIST_INSERT_HEAD(LIST_HEAD *head,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
struct TYPE *LIST_FIRST(LIST_HEAD *head);
struct TYPE *LIST_NEXT(struct TYPE *elm, LIST_ENTRY NAME);
LIST_FOREACH(struct TYPE *var, LIST_HEAD *head, LIST_ENTRY NAME);
void LIST_REMOVE(struct TYPE *elm, LIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type LIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro LIST_HEAD().

Creation

A list is headed by a structure defined by the LIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are doubly linked so that an arbitrary element can be removed without traversing the list. New elements can be added to the list after an existing element, before an existing element, or at the head of the list. A LIST_HEAD structure is declared as follows:

LIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

LIST_ENTRY() declares a structure that connects the elements in the list.

LIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

LIST_INIT() initializes the list referenced by head.

LIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

LIST_INSERT_HEAD() inserts the new element elm at the head of the list.

LIST_INSERT_BEFORE() inserts the new element elm before the element listelm.

LIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

LIST_FIRST() returns the first element in the list, or NULL if the list is empty.

LIST_NEXT() returns the next element in the list, or NULL if this is the last.

LIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

LIST_REMOVE() removes the element elm from the list.

RETURN VALUE

LIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

LIST_FIRST(), and LIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

LIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

LIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. LIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    LIST_ENTRY(entry) entries;              /* List */
};
LIST_HEAD(listhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct listhead head;                   /* List head */
    int i;
    LIST_INIT(&head);                       /* Initialize the list */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    LIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    LIST_INSERT_AFTER(n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    LIST_INSERT_BEFORE(n2, n3, entries);
    i = 0;                                  /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        np->data = i++;
    LIST_REMOVE(n2, entries);               /* Deletion */
    free(n2);
                                            /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* List deletion */ n1 = LIST_FIRST(&head); while (n1 != NULL) { n2 = LIST_NEXT(n1, entries); free(n1); n1 = n2; } LIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1145 - Linux cli command IO_All_Temppm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_All_Temppm and provides detailed information about the command IO_All_Temppm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_All_Temppm.

NAME 🖥️ IO_All_Temppm 🖥️

Temporary File Support for IO::All

SYNOPSIS

See IO::All.

DESCRIPTION

<<<cpan-foot>>>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1146 - Linux cli command size_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command size_ttype and provides detailed information about the command size_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the size_ttype.

NAME 🖥️ size_ttype 🖥️

count of bytes

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <stddef.h>
typedef /* ... */ size_t;
#include <sys/types.h>
typedef /* ... */ ssize_t;

DESCRIPTION

size_t
Used for a count of bytes. It is the result of the sizeof() operator. It is an unsigned integer type capable of storing values in the range [0, SIZE_MAX].

ssize_t
Used for a count of bytes or an error indication. It is a signed integer type capable of storing values at least in the range [-1, SSIZE_MAX].

Use with printf(3) and scanf(3)

size_t
The length modifier for size_t for the printf(3) and the scanf(3) families of functions is z, resulting commonly in %zu or %zx for printing size_t values.

ssize_t
glibc and most other implementations provide a length modifier for ssize_t for the printf(3) and the scanf(3) families of functions, which is z; resulting commonly in %zd or %zi for printing ssize_t values. Although z works for ssize_t on most implementations, portable POSIX programs should avoid using it—for example, by converting the value to intmax_t and using its length modifier (j).

STANDARDS

size_t
C11, POSIX.1-2008.

ssize_t
POSIX.1-2008.

HISTORY

size_t
C89, POSIX.1-2001.

ssize_t
POSIX.1-2001.

<aio.h>, <glob.h>, <grp.h>, <iconv.h>, <mqueue.h>, <pwd.h>, <signal.h>, and <sys/socket.h> define size_t since POSIX.1-2008.

<aio.h>, <mqueue.h>, and <sys/socket.h> define ssize_t since POSIX.1-2008.

NOTES

size_t
The following headers also provide size_t: <aio.h>, <glob.h>, <grp.h>, <iconv.h>, <monetary.h>, <mqueue.h>, <ndbm.h>, <pwd.h>, <regex.h>, <search.h>, <signal.h>, <stdio.h>, <stdlib.h>, <string.h>, <strings.h>, <sys/mman.h>, <sys/msg.h>, <sys/sem.h>, <sys/shm.h>, <sys/socket.h>, <sys/types.h>, <sys/uio.h>, <time.h>, <unistd.h>, <wchar.h>, and <wordexp.h>.

ssize_t
The following headers also provide ssize_t: <aio.h>, <monetary.h>, <mqueue.h>, <stdio.h>, <sys/msg.h>, <sys/socket.h>, <sys/uio.h>, and <unistd.h>.

SEE ALSO

read(2), readlink(2), readv(2), recv(2), send(2), write(2), fread(3), fwrite(3), memcmp(3), memcpy(3), memset(3), offsetof(3), ptrdiff_t(3type)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1147 - Linux cli command getgrgid

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getgrgid and provides detailed information about the command getgrgid, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getgrgid.

NAME 🖥️ getgrgid 🖥️

get group file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <grp.h>
struct group *getgrnam(const char *name);
struct group *getgrgid(gid_t gid);
int getgrnam_r(const char *restrict name",structgroup*restrict"grp,
 char buf[restrict .buflen], size_t buflen,
 struct group **restrict result);
int getgrgid_r(gid_t gid, struct group *restrict grp,
 char buf[restrict .buflen], size_t buflen,
 struct group **restrict result);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getgrnam_r(), getgrgid_r():

    _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The getgrnam() function returns a pointer to a structure containing the broken-out fields of the record in the group database (e.g., the local group file /etc/group, NIS, and LDAP) that matches the group name name.

The getgrgid() function returns a pointer to a structure containing the broken-out fields of the record in the group database that matches the group ID gid.

The group structure is defined in <grp.h> as follows:

struct group {
    char   *gr_name;        /* group name */
    char   *gr_passwd;      /* group password */
    gid_t   gr_gid;         /* group ID */
    char  **gr_mem;         /* NULL-terminated array of pointers
                               to names of group members */
};

For more information about the fields of this structure, see group(5).

The getgrnam_r() and getgrgid_r() functions obtain the same information as getgrnam() and getgrgid(), but store the retrieved group structure in the space pointed to by grp. The string fields pointed to by the members of the group structure are stored in the buffer buf of size buflen. A pointer to the result (in case of success) or NULL (in case no entry was found or an error occurred) is stored in *result.

The call

sysconf(_SC_GETGR_R_SIZE_MAX)

returns either -1, without changing errno, or an initial suggested size for buf. (If this size is too small, the call fails with ERANGE, in which case the caller can retry with a larger buffer.)

RETURN VALUE

The getgrnam() and getgrgid() functions return a pointer to a group structure, or NULL if the matching entry is not found or an error occurs. If an error occurs, errno is set to indicate the error. If one wants to check errno after the call, it should be set to zero before the call.

The return value may point to a static area, and may be overwritten by subsequent calls to getgrent(3), getgrgid(), or getgrnam(). (Do not pass the returned pointer to free(3).)

On success, getgrnam_r() and getgrgid_r() return zero, and set *result to grp. If no matching group record was found, these functions return 0 and store NULL in *result. In case of error, an error number is returned, and NULL is stored in *result.

ERRORS

0 or ENOENT or ESRCH or EBADF or EPERM or …
The given name or gid was not found.

EINTR
A signal was caught; see signal(7).

EIO
I/O error.

EMFILE
The per-process limit on the number of open file descriptors has been reached.

ENFILE
The system-wide limit on the total number of open files has been reached.

ENOMEM
Insufficient memory to allocate group structure.

ERANGE
Insufficient buffer space supplied.

FILES

/etc/group
local group database file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getgrnam()

Thread safety

MT-Unsafe race:grnam locale

getgrgid()

Thread safety

MT-Unsafe race:grgid locale

getgrnam_r(), getgrgid_r()

Thread safetyMT-Safe locale

VERSIONS

The formulation given above under “RETURN VALUE” is from POSIX.1. It does not call “not found” an error, hence does not specify what value errno might have in this situation. But that makes it impossible to recognize errors. One might argue that according to POSIX errno should be left unchanged if an entry is not found. Experiments on various UNIX-like systems show that lots of different values occur in this situation: 0, ENOENT, EBADF, ESRCH, EWOULDBLOCK, EPERM, and probably others.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4, 4.3BSD.

SEE ALSO

endgrent(3), fgetgrent(3), getgrent(3), getpwnam(3), setgrent(3), group(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1148 - Linux cli command Image_ExifTool_Lang_espm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Lang_espm and provides detailed information about the command Image_ExifTool_Lang_espm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Lang_espm.

NAME 🖥️ Image_ExifTool_Lang_espm 🖥️

ExifTool Spanish language translations

DESCRIPTION

This file is used by Image::ExifTool to generate localized tag descriptions and values.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

ACKNOWLEDGEMENTS

Thanks to Jens Duttke, Santiago del Brío González and Emilio Sancha for providing this translation.

SEE ALSO

Image::ExifTool (3pm), Image::ExifTool::TagInfoXML (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1149 - Linux cli command llrint

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command llrint and provides detailed information about the command llrint, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the llrint.

NAME 🖥️ llrint 🖥️

round to nearest integer

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
long lrint(double x);
long lrintf(float x);
long lrintl(long double x);
long long llrint(double x);
long long llrintf(float x);
long long llrintl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions round their argument to the nearest integer value, using the current rounding direction (see fesetround(3)).

Note that unlike the rint(3) family of functions, the return type of these functions differs from that of their arguments.

RETURN VALUE

These functions return the rounded integer value.

If x is a NaN or an infinity, or the rounded value is too large to be stored in a long (long long in the case of the ll* functions), then a domain error occurs, and the return value is unspecified.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is a NaN or infinite, or the rounded value is too large
An invalid floating-point exception (FE_INVALID) is raised.

These functions do not set errno.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

lrint(), lrintf(), lrintl(), llrint(), llrintf(), llrintl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

ceil(3), floor(3), lround(3), nearbyint(3), rint(3), round(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1150 - Linux cli command towctrans

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command towctrans and provides detailed information about the command towctrans, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the towctrans.

NAME 🖥️ towctrans 🖥️

wide-character transliteration

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wctype.h>
wint_t towctrans(wint_t wc, wctrans_t desc);

DESCRIPTION

If wc is a wide character, then the towctrans() function translates it according to the transliteration descriptor desc. If wc is WEOF, WEOF is returned.

desc must be a transliteration descriptor returned by the wctrans(3) function.

RETURN VALUE

The towctrans() function returns the translated wide character, or WEOF if wc is WEOF.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

towctrans()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of towctrans() depends on the LC_CTYPE category of the current locale.

SEE ALSO

towlower(3), towupper(3), wctrans(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1151 - Linux cli command xdr_long

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_long and provides detailed information about the command xdr_long, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_long.

NAME 🖥️ xdr_long 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1152 - Linux cli command ispunct_l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ispunct_l and provides detailed information about the command ispunct_l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ispunct_l.

NAME 🖥️ ispunct_l 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1153 - Linux cli command Moose_Deprecatedpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Deprecatedpm and provides detailed information about the command Moose_Deprecatedpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Deprecatedpm.

NAME 🖥️ Moose_Deprecatedpm 🖥️

Manages deprecation warnings for Moose

VERSION

version 2.2207

DESCRIPTION

use Moose::Deprecated -api_version => $version;

FUNCTIONS

This module manages deprecation warnings for features that have been deprecated in Moose.

If you specify -api_version => $version, you can use deprecated features without warnings. Note that this special treatment is limited to the package that loads Moose::Deprecated.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1154 - Linux cli command XtPending

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtPending and provides detailed information about the command XtPending, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtPending.

NAME 🖥️ XtPending 🖥️

query and process events and input

SYNTAX

#include <X11/Intrinsic.h>

void XtNextEvent(XEvent *event_return);

Boolean XtPeekEvent(XEvent *event_return);

Boolean XtPending(void);

void XtProcessEvent(XtInputMask mask);

void XtMainLoop(void);

ARGUMENTS

event
Specifies a pointer to the event structure that is to be dispatched to the appropriate event handler.

event_return
Returns the event information to the specified event structure.

mask
Specifies what types of events to process. The mask is the bitwise inclusive OR of any combination of XtIMXEvent, XtIMTimer, XtIMAlternateInput, and XtIMSignal. As a convenience, the X Toolkit defines the symbolic name XtIMAll to be the bitwise inclusive OR of all event types.

DESCRIPTION

XtNextEvent has been replaced by XtAppNextEvent.

XtPeekEvent has been replaced by XtAppPeekEvent.

XtPending has been replaced by XtAppPending.

XtProcessEvent has been replaced by XtAppProcessEvent.

XtMainLoop has been replaced by XtAppMainLoop.

SEE ALSO

XtAppNextEvent(3xt), XtAppPending(3), XtAppPeekEvent(3), XtAppProcessEvent(3), XtAppMainLoop(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1155 - Linux cli command Image_ExifTool_ICOpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_ICOpm and provides detailed information about the command Image_ExifTool_ICOpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_ICOpm.

NAME 🖥️ Image_ExifTool_ICOpm 🖥️

Read ICO meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read information from Windows ICO (icon) and CUR (cursor) files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<https://docs.fileformat.com/image/ico/>

SEE ALSO

“ICO Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1156 - Linux cli command Tk_CmdLinepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_CmdLinepm and provides detailed information about the command Tk_CmdLinepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_CmdLinepm.

NAME 🖥️ Tk_CmdLinepm 🖥️

Process standard X11 command line options and set initial resources

SYNOPSIS

Tk::CmdLine::SetArguments([@argument]); my $value = Tk::CmdLine::cget([$option]); Tk::CmdLine::SetResources((\resource | $resource) [, $priority]); Tk::CmdLine::LoadResources( [ -symbol => $symbol ] [ -file => $fileSpec ] [ -priority => $priority ] [ -echo => $fileHandle ] );

DESCRIPTION

Process standard X11 command line options and set initial resources.

The X11R5 man page for X11 says: “Most X programs attempt to use the same names for command line options and arguments. All applications written with the X Toolkit Intrinsics automatically accept the following options: …”. This module processes these command line options for perl/Tk applications using the SetArguments() function.

This module can optionally be used to load initial resources explicitly via function SetResources(), or from specified files (default: the standard X11 application-specific resource files) via function LoadResources().

Command Line Options

-background Color | -bg Color
Specifies the color to be used for the window background.

-class Class
Specifies the class under which resources for the application should be found. This option is useful in shell aliases to distinguish between invocations of an application, without resorting to creating links to alter the executable file name.

-display Display | -screen Display
Specifies the name of the X server to be used.

-font Font | -fn Font
Specifies the font to be used for displaying text.

-foreground Color | -fg Color
Specifies the color to be used for text or graphics.

-geometry Geometry
Specifies the initial size and location of the first MainWindow.

-iconic
Indicates that the user would prefer that the application’s windows initially not be visible as if the windows had been immediately iconified by the user. Window managers may choose not to honor the application’s request.

-motif
Specifies that the application should adhere as closely as possible to Motif look-and-feel standards. For example, active elements such as buttons and scrollbar sliders will not change color when the pointer passes over them.

-name Name
Specifies the name under which resources for the application should be found. This option is useful in shell aliases to distinguish between invocations of an application, without resorting to creating links to alter the executable file name.

-synchronous
Indicates that requests to the X server should be sent synchronously, instead of asynchronously. Since Xlib normally buffers requests to the server, errors do do not necessarily get reported immediately after they occur. This option turns off the buffering so that the application can be debugged. It should never be used with a working program.

-title TitleString
This option specifies the title to be used for this window. This information is sometimes used by a window manager to provide some sort of header identifying the window.

-xrm ResourceString
Specifies a resource pattern and value to override any defaults. It is also very useful for setting resources that do not have explicit command line arguments. The ResourceString is of the form <pattern>:<value>, that is (the first) ‘:’ is used to determine which part is pattern and which part is value. The (<pattern>, <value>) pair is entered into the options database with optionAdd (for each MainWindow configured), with interactive priority.

Initial Resources

There are several mechanism for initializing the resource database to be used by an X11 application. Resources may be defined in a $HOME/.Xdefaults file, a system application defaults file (e.g. /usr/lib/X11/app-defaults/<CLASS>), or a user application defaults file (e.g. $HOME/<CLASS>). The Tk::CmdLine functionality for setting initial resources concerns itself with the latter two.

Resource files contain data lines of the form <pattern>:<value>. They may also contain blank lines and comment lines (denoted by a ! character as the first non-blank character). Refer to option for a description of <pattern>:<value>.

System Application Defaults Files
System application defaults files may be specified via environment variable $XFILESEARCHPATH which, if set, contains a list of file patterns (joined using the OS-dependent path delimiter, e.g. colon on UNIX).

User Application Defaults Files
User application defaults files may be specified via environment variables $XUSERFILESEARCHPATH, $XAPPLRESDIR or $HOME.

METHODS

SetArguments - Tk::CmdLine::SetArguments([@argument])
Extract the X11 options contained in a specified array (@ARGV by default). Tk::CmdLine::SetArguments([@argument]) The X11 options may be specified using a single dash - as per the X11 convention, or using two dashes as per the POSIX standard (e.g. -geometry 100x100, -geometry 100x100 or **-geometry=**100x100). The options may be interspersed with other options or arguments. A by itself terminates option processing. By default, command line options are extracted from @ARGV the first time a MainWindow is created. The Tk::MainWindow constructor indirectly invokes SetArguments() to do this.

GetArguments - Tk::CmdLine::GetArguments()
Get a list of the X11 options that have been processed by SetArguments(). (GetArguments() first invokes SetArguments() if it has not already been invoked.)

cget - Tk::CmdLine::cget([$option])
Get the value of a configuration option specified via SetArguments(). (cget() first invokes SetArguments() if it has not already been invoked.) Tk::CmdLine::cget([$option]) The valid options are: -class, -name, -screen and -title. If no option is specified, -class is implied. A typical use of cget() might be to obtain the application class in order to define the name of a resource file to be loaded in via LoadResources(). my $class = Tk::CmdLine::cget(); # process command line and return class

SetResources - Tk::CmdLine::SetResources((\resource | $resource) [, $priority])
Set the initial resources. Tk::CmdLine::SetResources((\resource | $resource) [, $priority]) A single resource may be specified using a string of the form ‘<pattern>:<value>’. Multiple resources may be specified by passing an array reference whose elements are either strings of the above form, and/or anonymous arrays of the form [ <pattern>, <value> ]. The optional second argument specifies the priority, as defined in option, to be associated with the resources (default: userDefault). Note that SetResources() first invokes SetArguments() if it has not already been invoked.

LoadResources - Tk::CmdLine::LoadResources([%options])
Load initial resources from one or more files. Tk::CmdLine::LoadResources( [ -symbol => $symbol ] [ -file => $fileSpec ] [ -priority => $priority ] [ -echo => $fileHandle ] ); [ -symbol => $symbol ] specifies the name of an environment variable that, if set, defines a list of one or more directories and/or file patterns (joined using the OS-dependent path delimiter, e.g. colon on UNIX). $XUSERFILESEARCHPATH is a special case. If $XUSERFILESEARCHPATH is not set, $XAPPLRESDIR is checked instead. If $XAPPLRESDIR is not set, $HOME is checked instead. An item is identified as a file pattern if it contains one or more /%[A-Za-z]/ patterns. Only patterns %L, %T and %N are currently recognized. All others are replaced with the null string. Pattern %L is translated into $LANG. Pattern %T is translated into app-defaults. Pattern %N is translated into the application class name. Each file pattern, after substitutions are applied, is assumed to define a FileSpec to be examined. When a directory is specified, FileSpecs <DIRECTORY>/<LANG>/<CLASS> and <DIRECTORY>/<CLASS> are defined, in that order. [ -file => $fileSpec ] specifies a resource file to be loaded in. The file is silently skipped if if does not exist, or if it is not readable. [ -priority => $priority ] specifies the priority, as defined in option, to be associated with the resources (default: userDefault). [ -echo => $fileHandle ] may be used to specify that a line should be printed to the corresponding FileHandle (default: \STDOUT) everytime a file is examined / loaded. If no -symbol or -file options are specified, LoadResources() processes symbol $XFILESEARCHPATH with priority startupFile and $XUSERFILESEARCHPATH with priority userDefault. (Note that $XFILESEARCHPATH and $XUSERFILESEARCHPATH are supposed to contain only patterns. $XAPPLRESDIR and $HOME are supposed to be a single directory. LoadResources() does not check/care whether this is the case.) For each set of FileSpecs, LoadResources() examines each FileSpec to determine if the file exists and is readable. The first file that meets this criteria is read in and SetResources() is invoked. Note that LoadResources() first invokes SetArguments() if it has not already been invoked.

NOTES

This module is an object-oriented module whose methods can be invoked as object methods, class methods or regular functions. This is accomplished via an internally-maintained object reference which is created as necessary, and which always points to the last object used. SetArguments(), SetResources() and LoadResources() return the object reference.

EXAMPLES

  1. @ARGV is processed by Tk::CmdLine at MainWindow creation. use Tk; # <Process @ARGV - ignoring all X11-specific options> my $mw = MainWindow->new(); MainLoop();

  2. @ARGV is processed by Tk::CmdLine before MainWindow creation. An @ARGV of (–geometry=100x100 -opt1 a b c -bg red) is equal to (-opt1 a b c) after SetArguments() is invoked. use Tk; Tk::CmdLine::SetArguments(); # Tk::CmdLine->SetArguments() works too # <Process @ARGV - not worrying about X11-specific options> my $mw = MainWindow->new(); MainLoop();

  3. Just like 2) except that default arguments are loaded first. use Tk; Tk::CmdLine::SetArguments(qw(-name test -iconic)); Tk::CmdLine::SetArguments(); # <Process @ARGV - not worrying about X11-specific options> my $mw = MainWindow->new(); MainLoop();

  4. @ARGV is processed by Tk::CmdLine before MainWindow creation. Standard resource files are loaded in before MainWindow creation. use Tk; Tk::CmdLine::SetArguments(); # <Process @ARGV - not worrying about X11-specific options> Tk::CmdLine::LoadResources(); my $mw = MainWindow->new(); MainLoop();

  5. @ARGV is processed by Tk::CmdLine before MainWindow creation. Standard resource files are loaded in before MainWindow creation using non-default priorities. use Tk; Tk::CmdLine::SetArguments(); # <Process @ARGV - not worrying about X11-specific options> Tk::CmdLine::LoadResources(-echo => \STDOUT, -priority => 65, -symbol => XFILESEARCHPATH ); Tk::CmdLine::LoadResources(-echo => \STDOUT, -priority => 75, -symbol => XUSERFILESEARCHPATH ); my $mw = MainWindow->new(); MainLoop();

  6. @ARGV is processed by Tk::CmdLine before MainWindow creation. Standard resource files are loaded in before MainWindow creation. Individual resources are also loaded in before MainWindow creation. use Tk; Tk::CmdLine::SetArguments(); # <Process @ARGV - not worrying about X11-specific options> Tk::CmdLine::LoadResources(); Tk::CmdLine::SetResources( # set a single resource *Button*background: red, widgetDefault ); Tk::CmdLine::SetResources( # set multiple resources [ *Button*background: red, *Button*foreground: blue ], widgetDefault ); my $mw = MainWindow->new(); MainLoop();

ENVIRONMENT

HOME (optional)
Home directory which may contain user application defaults files as $HOME/$LANG/<CLASS> or $HOME/<CLASS>.

LANG (optional)
The current language (default: C).

XFILESEARCHPATH (optional)
List of FileSpec patterns (joined using the OS-dependent path delimiter, e.g. colon on UNIX) used in defining system application defaults files.

XUSERFILESEARCHPATH (optional)
List of FileSpec patterns (joined using the OS-dependent path delimiter, e.g. colon on UNIX) used in defining user application defaults files.

XAPPLRESDIR (optional)
Directory containing user application defaults files as $XAPPLRESDIR/$LANG/<CLASS> or $XAPPLRESDIR/<CLASS>.

SEE ALSO

MainWindow option

HISTORY

  • 1999.03.04 Ben Pavon <[email protected]> Rewritten as an object-oriented module. Allow one to process command line options in a specified array (@ARGV by default). Eliminate restrictions on the format and location of the options within the array (previously the X11 options could not be specified in POSIX format and had to be at the beginning of the array). Added the SetResources() and LoadResources() functions to allow the definition of resources prior to MainWindow creation.

  • 2000.08.31 Ben Pavon <[email protected]> Added the GetArguments() method which returns the list of arguments that have been processed by SetArguments(). Modified LoadResources() to split the symbols using the OS-dependent path delimiter defined in the Config module. Modified LoadResources() to eliminate a warning message when processing patterns %l, %C, %S.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1157 - Linux cli command Net_DNS_RR_MXpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_MXpm and provides detailed information about the command Net_DNS_RR_MXpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_MXpm.

NAME 🖥️ Net_DNS_RR_MXpm 🖥️

DNS MX resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name MX preference exchange);

DESCRIPTION

DNS Mail Exchanger (MX) resource record

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

preference

$preference = $rr->preference; $rr->preference( $preference );

A 16 bit integer which specifies the preference given to this RR among others at the same owner. Lower values are preferred.

exchange

$exchange = $rr->exchange; $rr->exchange( $exchange );

A domain name which specifies a host willing to act as a mail exchange for the owner name.

COPYRIGHT

Copyright (c)1997 Michael Fuhr.

Portions Copyright (c)2005 Olaf Kolkman, NLnet Labs.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC1035(3.3.9) <https://iana.org/go/rfc1035#section-3.3.9>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1158 - Linux cli command ZIP_SOURCE_GET_ARGS

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ZIP_SOURCE_GET_ARGS and provides detailed information about the command ZIP_SOURCE_GET_ARGS, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ZIP_SOURCE_GET_ARGS.

libzip (-lzip)

The

macro casts

to a pointer to

On success,

returns

In case of error, it returns

and sets

fails if:

is less than the size of

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1159 - Linux cli command Image_ExifTool_Writerpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Writerpm and provides detailed information about the command Image_ExifTool_Writerpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Writerpm.

NAME 🖥️ Image_ExifTool_Writerpm 🖥️

ExifTool routines for writing meta information

SYNOPSIS

These routines are autoloaded by Image::ExifTool when required.

DESCRIPTION

This module contains ExifTool write routines and other infrequently used routines.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1160 - Linux cli command libnetlink

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command libnetlink and provides detailed information about the command libnetlink, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the libnetlink.

NAME 🖥️ libnetlink 🖥️

A library for accessing the netlink service

SYNOPSIS

#include <asm/types.h>


#include <libnetlink.h>


#include <linux/netlink.h>


#include <linux/rtnetlink.h>

int rtnl_open(struct rtnl_handle *rth, unsigned subscriptions)

int rtnl_wilddump_request(struct rtnl_handle *rth, int family, int type)

int rtnl_send(struct rtnl_handle *rth, char *buf, int len)

int rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, int len)

int rtnl_dump_filter(struct rtnl_handle *rth,
		     int (*filter)(struct sockaddr_nl *, struct nlmsghdr *n, void *),
		     void *arg1,
		     int (*junk)(struct sockaddr_nl *,struct nlmsghdr *n, void *),
		     void *arg2)

int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, pid_t peer,
	      unsigned groups, struct nlmsghdr *answer,


	      int (*junk)(struct sockaddr_nl *,struct nlmsghdr *n, void *),


	      void *jarg)

int rtnl_listen(struct rtnl_handle *rtnl,
	      int (*handler)(struct sockaddr_nl *, struct rtnl_ctrl_data *,
			     struct nlmsghdr *n, void *),
	      void *jarg)

int rtnl_from_file(FILE *rtnl,
	      int (*handler)(struct sockaddr_nl *,struct nlmsghdr *n, void *),
	      void *jarg)

int addattr32(struct nlmsghdr *n, int maxlen, int type, __u32 data)

int addattr_l(struct nlmsghdr *n, int maxlen, int type, void *data, int alen)

int rta_addattr32(struct rtattr *rta, int maxlen, int type, __u32 data)

int rta_addattr_l(struct rtattr *rta, int maxlen, int type, void *data, int alen)

DESCRIPTION

libnetlink provides a higher level interface to rtnetlink(7). The read functions return 0 on success and a negative errno on failure. The send functions return the amount of data sent, or -1 on error.

rtnl_open
Open a rtnetlink socket and save the state into the rth handle. This handle is passed to all subsequent calls. subscriptions is a bitmap of the rtnetlink multicast groups the socket will be a member of.

rtnl_wilddump_request
Request a full dump of the type database for family addresses. type is a rtnetlink message type.

rtnl_dump_request
Request a full dump of the type data buffer into buf with maximum length of len. type is a rtnetlink message type.

rtnl_dump_filter
Receive netlink data after a request and filter it. The filter callback checks if the received message is wanted. It gets the source address of the message, the message itself and arg1 as arguments. 0 as return means that the filter passed, a negative value is returned by rtnl_dump_filter in case of error. NULL for filter means to not use a filter. junk is used to filter messages not destined to the local socket. Only one message bundle is received. If there is a message pending, this function does not block.

rtnl_listen
Receive netlink data after a request and pass it to handler. handler is a callback that gets the message source address, anscillary data, the message itself, and the jarg cookie as arguments. It will get called for all received messages. Only one message bundle is received. If there is a message pending this function does not block.

rtnl_from_file
Works like rtnl_listen, but reads a netlink message bundle from the file file and passes the messages to handler for parsing. The file should contain raw data as received from a rtnetlink socket.

The following functions are useful to construct custom rtnetlink messages. For simple database dumping with filtering it is better to use the higher level functions above. See rtnetlink(3) and netlink(3) on how to generate a rtnetlink message. The following utility functions require a continuous buffer that already contains a netlink message header and a rtnetlink request.

rtnl_send
Send the rtnetlink message in buf of length len to handle rth.

addattr32
Add a __u32 attribute of type type and with value data to netlink message n, which is part of a buffer of length maxlen.

addattr_l
Add a variable length attribute of type type and with value data and alen length to netlink message n, which is part of a buffer of length maxlen. data is copied.

rta_addattr32
Initialize the rtnetlink attribute rta with a __u32 data value.

rta_addattr32
Initialize the rtnetlink attribute rta with a variable length data value.

BUGS

This library is meant for internal use, use libmnl for new programs.

The functions sometimes use fprintf and exit when a fatal error occurs. This library should be named librtnetlink.

AUTHORS

netlink/rtnetlink was designed and written by Alexey Kuznetsov. Andi Kleen wrote the man page.

SEE ALSO

netlink(7), rtnetlink(7)
/usr/include/linux/rtnetlink.h

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1161 - Linux cli command Image_ExifTool_WriteRIFFpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_WriteRIFFpm and provides detailed information about the command Image_ExifTool_WriteRIFFpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_WriteRIFFpm.

NAME 🖥️ Image_ExifTool_WriteRIFFpm 🖥️

Write RIFF-format files

SYNOPSIS

This file is autoloaded by Image::ExifTool::RIFF.

DESCRIPTION

This file contains routines to write metadata to RIFF-format files.

NOTES

Currently writes only WebP files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<https://developers.google.com/speed/webp/docs/riff_container>

SEE ALSO

Image::ExifTool::Photoshop (3pm), Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1162 - Linux cli command lround

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lround and provides detailed information about the command lround, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lround.

NAME 🖥️ lround 🖥️

round to nearest integer

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
long lround(double x);
long lroundf(float x);
long lroundl(long double x);
long long llround(double x);
long long llroundf(float x);
long long llroundl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions round their argument to the nearest integer value, rounding halfway cases away from zero, regardless of the current rounding direction (see fenv(3)).

Note that unlike the round(3) and ceil(3), functions, the return type of these functions differs from that of their arguments.

RETURN VALUE

These functions return the rounded integer value.

If x is a NaN or an infinity, or the rounded value is too large to be stored in a long (long long in the case of the ll* functions), then a domain error occurs, and the return value is unspecified.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is a NaN or infinite, or the rounded value is too large
An invalid floating-point exception (FE_INVALID) is raised.

These functions do not set errno.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

lround(), lroundf(), lroundl(), llround(), llroundf(), llroundl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

ceil(3), floor(3), lrint(3), nearbyint(3), rint(3), round(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1163 - Linux cli command Term_ReadLine_Gnupm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Term_ReadLine_Gnupm and provides detailed information about the command Term_ReadLine_Gnupm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Term_ReadLine_Gnupm.

NAME 🖥️ Term_ReadLine_Gnupm 🖥️

Perl extension for the GNU Readline/History Library

SYNOPSIS

use Term::ReadLine; # Do not “use Term::ReadLine::Gnu;” $term = new Term::ReadLine ProgramName; while ( defined ($_ = $term->readline(prompt>)) ) { … }

DESCRIPTION

Overview

This is an implementation of Term::ReadLine <http://search.cpan.org/dist/Term-ReadLine/> using the GNU Readline/History Library <https://tiswww.cwru.edu/php/chet/readline/rltop.html>.

For basic functions object oriented interface is provided. These are described in the section “Standard Methods” and “Term::ReadLine::Gnu Functions”.

This package also has the interface with the almost all functions and variables which are documented in the GNU Readline/History Library Manual. They are documented in the section “Term::ReadLine::Gnu Functions” and “Term::ReadLine::Gnu Variables” briefly. For further details of the GNU Readline/History Library, see GNU Readline Library Manual <https://tiswww.cwru.edu/php/chet/readline/readline.html> and GNU History Library Manual <https://tiswww.cwru.edu/php/chet/readline/history.html>.

There are some Term::ReadLine::Gnu original features. They are described in the section “Term::ReadLine::Gnu Specific Features”

The sample programs under eg/ directory and test programs under t/ directory in the Term::ReadLine::Gnu distribution <http://search.cpan.org/dist/Term-ReadLine-Gnu/> include many examples of this module.

Standard Methods

These are standard methods defined by Term::ReadLine <http://search.cpan.org/dist/Term-ReadLine/>.

“ReadLine”
returns the actual package that executes the commands. If this package is being used, Term::ReadLine::Gnu is returned.

“new(NAME,[IN,OUT])”
returns the handle for subsequent calls to following functions. Argument is the name of the application. Optionally can be followed by two arguments for IN and OUT file handles. These arguments should be globs.

“readline(PROMPT[,PREPUT])”
gets an input line, with actual GNU Readline support. Trailing newline is removed. Returns undef on EOF. PREPUT is an optional argument meaning the initial value of input. The optional argument PREPUT is granted only if the value preput is in Features. PROMPT may include some escape sequences. Use RL_PROMPT_START_IGNORE to begin a sequence of non-printing characters, and RL_PROMPT_END_IGNORE to end the sequence.

“AddHistory(LINE1, LINE2, …)”
adds the lines to the history of input, from where it can be used if the actual readline is present.

“IN”, “OUT”
return the file handles for input and output or undef if readline input and output cannot be used for Perl.

MinLine([MAX])
If argument MAX is specified, it is an advice on minimal size of line to be included into history. undef means do not include anything into history. Returns the old value.

“findConsole”
returns an array with two strings that give most appropriate names for files for input and output using conventions "<$in", ">$out".

“Attribs”
returns a reference to a hash which describes internal configuration (variables) of the package. Names of keys in this hash conform to standard conventions with the leading rl_ stripped. See section “Term::ReadLine::Gnu Variables” for supported variables.

“Features”
Returns a reference to a hash with keys being features present in current implementation. Several optional features are used in the minimal interface: appname should be present if the first argument to new is recognized, and minline should be present if MinLine method is not dummy. autohistory should be present if lines are put into history automatically (maybe subject to MinLine), and addHistory if AddHistory method is not dummy. preput means the second argument to readline method is processed. getHistory and setHistory denote that the corresponding methods are present. tkRunning denotes that a Tk application may run while ReadLine is getting input.

“tkRunning”
makes Tk event loop run when waiting for user input (i.e., during readline method).

“event_loop”
See the description of event_loop on Term::ReadLine <http://search.cpan.org/dist/Term-ReadLine/>.

“ornaments”
makes the command line stand out by using termcap data. The argument to ornaments should be 0, 1, or a string of a form "aa,bb,cc,dd". Four components of this string should be names of terminal capacities, first two will be issued to make the prompt standout, last two to make the input line standout.

“newTTY”
takes two arguments which are input filehandle and output filehandle. Switches to use these filehandles.

“enableUTF8”
Enables UTF-8 support. If STDIN is in UTF-8 by the -C command-line switch or PERL_UNICODE environment variable, or IN file handle has utf8 IO layer, then UTF-8 support is also enabled. In other cases you need this enableUTF8 method. This is an original method of Term::ReadLine:Gnu.

“Term::ReadLine::Gnu” Functions

All these GNU Readline/History Library functions supported are callable via method interface and have names which conform to standard conventions with the leading rl_ stripped. For example rl_foo() function is called as $term->foo().

The titles of the following sections are same as the titles of the corresponding sections in the “Programming with GNU Readline” section in the GNU Readline Library Manual <https://tiswww.cwru.edu/php/chet/readline/readline.html>. Refer them for further details.

Although it is preferred to use method interface, most methods have lower level functions in Term::ReadLine::Gnu::XS package. To use them a full qualified name is required.

Basic Behavior

The function readline() prints a prompt and then reads and returns a single line of text from the user.

$_ = $term->readline(Enter a line: );

You can change key-bindings using bind_key(KEY, FUNCTION [,MAP]) function. The first argument, KEY, is the character that you want bind. The second argument, FUNCTION, is the function to call when KEY is pressed. The FUNCTION can be a reference to a Perl function (see “Custom Functions”) or a “named function” named by add_defun() function or commands described in the “Bindable Readline Commands” section in the GNU Readline Library Manual <https://tiswww.cwru.edu/php/chet/readline/readline.html>.

$term->bind_key(ord "

1164 - Linux cli command SLIST_INSERT_HEAD

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SLIST_INSERT_HEAD and provides detailed information about the command SLIST_INSERT_HEAD, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SLIST_INSERT_HEAD.

NAME 🖥️ SLIST_INSERT_HEAD 🖥️

implementation of a singly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
SLIST_ENTRY(TYPE);
SLIST_HEAD(HEADNAME, TYPE);
SLIST_HEAD SLIST_HEAD_INITIALIZER(SLIST_HEAD head);
void SLIST_INIT(SLIST_HEAD *head);
int SLIST_EMPTY(SLIST_HEAD *head);
void SLIST_INSERT_HEAD(SLIST_HEAD *head,
 struct TYPE *elm, SLIST_ENTRY NAME);
void SLIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, SLIST_ENTRY NAME);
struct TYPE *SLIST_FIRST(SLIST_HEAD *head);
struct TYPE *SLIST_NEXT(struct TYPE *elm, SLIST_ENTRY NAME);
SLIST_FOREACH(struct TYPE *var, SLIST_HEAD *head, SLIST_ENTRY NAME);
void SLIST_REMOVE(SLIST_HEAD *head, struct TYPE *elm,
 SLIST_ENTRY NAME);
void SLIST_REMOVE_HEAD(SLIST_HEAD *head,
 SLIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on singly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type SLIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro SLIST_HEAD().

Creation

A singly linked list is headed by a structure defined by the SLIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the list after an existing element or at the head of the list. An SLIST_HEAD structure is declared as follows:

SLIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

SLIST_ENTRY() declares a structure that connects the elements in the list.

SLIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

SLIST_INIT() initializes the list referenced by head.

SLIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

SLIST_INSERT_HEAD() inserts the new element elm at the head of the list.

SLIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

SLIST_FIRST() returns the first element in the list, or NULL if the list is empty.

SLIST_NEXT() returns the next element in the list.

SLIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

SLIST_REMOVE() removes the element elm from the list.

SLIST_REMOVE_HEAD() removes the element elm from the head of the list. For optimum efficiency, elements being removed from the head of the list should explicitly use this macro instead of the generic SLIST_REMOVE().

RETURN VALUE

SLIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

SLIST_FIRST(), and SLIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

SLIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

SLIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. SLIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    SLIST_ENTRY(entry) entries;             /* Singly linked list */
};
SLIST_HEAD(slisthead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct slisthead head;                  /* Singly linked list
                                               head */
    SLIST_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    SLIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    SLIST_INSERT_AFTER(n1, n2, entries);
    SLIST_REMOVE(&head, n2, entry, entries);/* Deletion */
    free(n2);
    n3 = SLIST_FIRST(&head);
    SLIST_REMOVE_HEAD(&head, entries);      /* Deletion from the head */
    free(n3);
    for (unsigned int i = 0; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        SLIST_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    SLIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); while (!SLIST_EMPTY(&head)) { /* List deletion */ n1 = SLIST_FIRST(&head); SLIST_REMOVE_HEAD(&head, entries); free(n1); } SLIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1165 - Linux cli command getnetbyname_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getnetbyname_r and provides detailed information about the command getnetbyname_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getnetbyname_r.

NAME 🖥️ getnetbyname_r 🖥️

get network entry (reentrant)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
int getnetent_r(struct netent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct netent **restrict result,
 int *restrict h_errnop);
int getnetbyname_r(const char *restrict name,
 struct netent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct netent **restrict result,
 int *restrict h_errnop);
int getnetbyaddr_r(uint32_t net, int type,
 struct netent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct netent **restrict result,
 int *restrict h_errnop);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getnetent_r(), getnetbyname_r(), getnetbyaddr_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The getnetent_r(), getnetbyname_r(), and getnetbyaddr_r() functions are the reentrant equivalents of, respectively, getnetent(3), getnetbyname(3), and getnetbynumber(3). They differ in the way that the netent structure is returned, and in the function calling signature and return value. This manual page describes just the differences from the nonreentrant functions.

Instead of returning a pointer to a statically allocated netent structure as the function result, these functions copy the structure into the location pointed to by result_buf.

The buf array is used to store the string fields pointed to by the returned netent structure. (The nonreentrant functions allocate these strings in static storage.) The size of this array is specified in buflen. If buf is too small, the call fails with the error ERANGE, and the caller must try again with a larger buffer. (A buffer of length 1024 bytes should be sufficient for most applications.)

If the function call successfully obtains a network record, then *result is set pointing to result_buf; otherwise, *result is set to NULL.

The buffer pointed to by h_errnop is used to return the value that would be stored in the global variable h_errno by the nonreentrant versions of these functions.

RETURN VALUE

On success, these functions return 0. On error, they return one of the positive error numbers listed in ERRORS.

On error, record not found (getnetbyname_r(), getnetbyaddr_r()), or end of input (getnetent_r()) result is set to NULL.

ERRORS

ENOENT
(getnetent_r()) No more records in database.

ERANGE
buf is too small. Try again with a larger buffer (and increased buflen).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getnetent_r(), getnetbyname_r(), getnetbyaddr_r()

Thread safetyMT-Safe locale

VERSIONS

Functions with similar names exist on some other systems, though typically with different calling signatures.

STANDARDS

GNU.

SEE ALSO

getnetent(3), networks(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1166 - Linux cli command lgammaf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lgammaf and provides detailed information about the command lgammaf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lgammaf.

NAME 🖥️ lgammaf 🖥️

log gamma function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double lgamma(double x);
float lgammaf(float x);
long double lgammal(long double x);
double lgamma_r(double x, int *signp);
float lgammaf_r(float x, int *signp);
long double lgammal_r(long double x, int *signp);
extern int signgam;

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

lgamma():
    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

lgammaf(), lgammal():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

lgamma_r(), lgammaf_r(), lgammal_r():

    /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

signgam:

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

For the definition of the Gamma function, see tgamma(3).

The lgamma(), lgammaf(), and lgammal() functions return the natural logarithm of the absolute value of the Gamma function. The sign of the Gamma function is returned in the external integer signgam declared in <math.h>. It is 1 when the Gamma function is positive or zero, -1 when it is negative.

Since using a constant location signgam is not thread-safe, the functions lgamma_r(), lgammaf_r(), and lgammal_r() have been introduced; they return the sign via the argument signp.

RETURN VALUE

On success, these functions return the natural logarithm of Gamma(x).

If x is a NaN, a NaN is returned.

If x is 1 or 2, +0 is returned.

If x is positive infinity or negative infinity, positive infinity is returned.

If x is a nonpositive integer, a pole error occurs, and the functions return +HUGE_VAL, +HUGE_VALF, or +HUGE_VALL, respectively.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the correct mathematical sign.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Pole error: x is a nonpositive integer
errno is set to ERANGE (but see BUGS). A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised.

Range error: result overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

STANDARDS

lgamma()
lgammaf()
lgammal()
C11, POSIX.1-2008.

signgam
POSIX.1-2008.

lgamma_r()
lgammaf_r()
lgammal_r()
None.

HISTORY

lgamma()
lgammaf()
lgammal()
C99, POSIX.1-2001.

signgam
POSIX.1-2001.

lgamma_r()
lgammaf_r()
lgammal_r()
None.

BUGS

In glibc 2.9 and earlier, when a pole error occurs, errno is set to EDOM; instead of the POSIX-mandated ERANGE. Since glibc 2.10, glibc does the right thing.

SEE ALSO

tgamma(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1167 - Linux cli command Net_DNS_RR_NSECpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_NSECpm and provides detailed information about the command Net_DNS_RR_NSECpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_NSECpm.

NAME 🖥️ Net_DNS_RR_NSECpm 🖥️

DNS NSEC resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new( name NSEC nxtdname typelist );

DESCRIPTION

Class for DNSSEC NSEC resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

nxtdname

$nxtdname = $rr->nxtdname; $rr->nxtdname( $nxtdname );

The Next Domain field contains the next owner name (in the canonical ordering of the zone) that has authoritative data or contains a delegation point NS RRset.

typelist

@typelist = $rr->typelist; $typelist = $rr->typelist;

typelist() identifies the RRset types that exist at the NSEC RR owner name. When called in scalar context, the list is interpolated into a string.

typemap

$exists = $rr->typemap($rrtype);

typemap() returns a Boolean true value if the specified RRtype occurs in the type bitmap of the NSEC record.

match

$matched = $rr->match( example.foo );

match() returns a Boolean true value if the canonical form of the name argument matches the canonical owner name of the NSEC RR.

covers

$covered = $rr->covers( example.foo );

covers() returns a Boolean true value if the canonical form of the name, or one of its ancestors, falls between the owner name and the nxtdname field of the NSEC record.

encloser, nextcloser, wildcard

$encloser = $rr->encloser( example.foo ); print “encloser: $encloser " if $encloser;

encloser() returns the name of a provable encloser of the query name argument obtained from the NSEC RR.

nextcloser() returns the next closer name, which is one label longer than the closest encloser. This is only valid after encloser() has returned a valid domain name.

wildcard() returns the unexpanded wildcard name from which the next closer name was possibly synthesised. This is only valid after encloser() has returned a valid domain name.

COPYRIGHT

Copyright (c)2001-2005 RIPE NCC. Author Olaf M. Kolkman

Portions Copyright (c)2018-2019 Dick Franks

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC4034 (4) <https://iana.org/go/rfc4034#section-4> RFC9077 <https://iana.org/go/rfc9077>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1168 - Linux cli command XmbufQueryExtension

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XmbufQueryExtension and provides detailed information about the command XmbufQueryExtension, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XmbufQueryExtension.

NAME 🖥️ XmbufQueryExtension 🖥️

X multibuffering functions

SYNTAX

#include <X11/extensions/multibuf.h>

Bool XmbufQueryExtension(
    Display *dpy,
    Display *dpy,
    int *event_base_return,
    int *error_base_return);

Status XmbufGetVersion(
    Display *dpy,
    int *major_version_return,
    int *minor_version_return);

int XmbufCreateBuffers(
    Display *dpy,
    Window window,
    int count,
    int update_action,
    int update_hint,
    Multibuffer *buffers_update);

void XmbufDestroyBuffers(
    Display *dpy,
    Window window);

void XmbufDisplayBuffers(
    Display *dpy,
    int count,
    Multibuffer *buffers,
    int min_delay,
    int max_delay);

Status XmbufGetWindowAttributes(
    Display *dpy,
    Window window,
    XmbufWindowAttributes *attributes);

void XmbufChangeWindowAttributes(
    Display *dpy,
    Window window,
    unsigned long valuemask,
    XmbufSetWindowAttributes *attributes);

Status XmbufGetBufferAttributes(
    Display *dpy,
    Multibuffer buffer,
    XmbufBufferAttributes *attributes);

void XmbufChangeBufferAttributes(
    Display *dpy,
    Multibuffer buffer,
    unsigned long valuemask,
    XmbufSetBufferAttributes *attributes);

Status XmbufGetScreenInfo(
    Display *dpy,
    Drawable drawable,
    int *nmono_return,
    XmbufBufferInfo **mono_info_return,
    int *nstereo_return,
    XmbufBufferInfo **stereo_info_return);

Window XmbufCreateStereoWindow(
    Display *dpy,
    Window parent,
    int x,
    int y,
    unsigned int width,
    unsigned int height,
    unsigned int border_width,
    int depth,
    unsigned int class,                 /* InputOutput, InputOnly*/
    Visual *visual,
    unsigned long valuemask,
    XSetWindowAttributes *attributes,
    Multibuffer *left_return,
    Multibuffer *right_return);

STRUCTURES

Events:

typedef struct {
    int type;   /* of event */
    unsigned long serial;       /* # of last request processed by server */
    int send_event;     /* true if this came from a SendEvent request */
    Display *display;   /* Display the event was read from */
    Multibuffer buffer; /* buffer of event */
    int state;  /* see Clobbered constants above */
} XmbufClobberNotifyEvent;

typedef struct {
    int type;   /* of event */
    unsigned long serial;       /* # of last request processed by server */
    int send_event;     /* true if this came from a SendEvent request */
    Display *display;   /* Display the event was read from */
    Multibuffer buffer; /* buffer of event */
} XmbufUpdateNotifyEvent;

Per-window attributes that can be got:

typedef struct {
    int displayed_index;	/* which buffer is being displayed */
    int update_action;	/* Undefined, Background, Untouched, Copied */
    int update_hint;	/* Frequent, Intermittent, Static */
    int window_mode;	/* Mono, Stereo */
    int nbuffers;	/* Number of buffers */
    Multibuffer *buffers;	/* Buffers */
} XmbufWindowAttributes;

Per-window attributes that can be set:

typedef struct {
    int update_hint;	/* Frequent, Intermittent, Static */
} XmbufSetWindowAttributes;

Per-buffer attributes that can be got:

typedef struct {
    Window window;	/* which window this belongs to */
    unsigned long event_mask;	/* events that have been selected */
    int buffer_index;	/* which buffer is this */
    int side;	/* Mono, Left, Right */
} XmbufBufferAttributes;

Per-buffer attributes that can be set:

typedef struct {
    unsigned long event_mask;	/* events that have been selected */
} XmbufSetBufferAttributes;

Per-screen buffer info (there will be lists of them):

typedef struct {
    VisualID visualid;	/* visual usable at this depth */
    int max_buffers;	/* most buffers for this visual */
    int depth;	/* depth of buffers to be created */
} XmbufBufferInfo;

DESCRIPTION

The application programming library for the X11 Double-Buffering, Multi-Buffering, and Stereo Extension contains the interfaces described below. With the exception of * XmbufQueryExtension *, if any of these routines are called with a display that does not support the extension, the ExtensionErrorHandler (which can be set with * XSetExtensionErrorHandler * and functions the same way as * XSetErrorHandler *) will be called and the function will then return.

* XmbufQueryExtension * returns * True * if the multibuffering/stereo extension is available on the given display. If the extension exists, the value of the first event code (which should be added to the event type constants * MultibufferClobberNotify * and * MultibufferUpdateNotify * to get the actual values) is stored into event_base_return and the value of the first error code (which should be added to the error type constant * MultibufferBadBuffer * to get the actual value) is stored into error_base_return.

* XmbufGetVersion * gets the major and minor version numbers of the extension. The return value is zero if an error occurs or non-zero if no error happens.

* XmbufCreateBuffers * requests that “count” buffers be created with the given update_action and update_hint and be associated with the indicated window. The number of buffers created is returned (zero if an error occurred) and buffers_update is filled in with that many Multibuffer identifiers.

* XmbufDestroyBuffers * destroys the buffers associated with the given window.

* XmbufDisplayBuffers * displays the indicated buffers their appropriate windows within max_delay milliseconds after min_delay milliseconds have passed. No two buffers may be associated with the same window or else a Match error is generated.

* XmbufGetWindowAttributes * gets the multibuffering attributes that apply to all buffers associated with the given window. The list of buffers returns may be freed with * XFree *. Returns non-zero on success and zero if an error occurs.

* XmbufChangeWindowAttributes * sets the multibuffering attributes that apply to all buffers associated with the given window. This is currently limited to the update_hint.

* XmbufGetBufferAttributes * gets the attributes for the indicated buffer. Returns non-zero on success and zero if an error occurs.

* XmbufChangeBufferAttributes * sets the attributes for the indicated buffer. This is currently limited to the event_mask.

* XmbufGetScreenInfo * gets the parameters controlling how mono and stereo windows may be created on the screen of the given drawable. The numbers of sets of visual and depths are returned in nmono_return and nstereo_return. If nmono_return is greater than zero, then mono_info_return is set to the address of an array of * XmbufBufferInfo * structures describing the various visuals and depths that may be used. Otherwise, mono_info_return is set to NULL. Similarly, stereo_info_return is set according to nstereo_return. The storage returned in mono_info_return and stereo_info_return may be released by * XFree *. If no errors are encounted, non-zero will be returned.

* XmbufCreateStereoWindow * creates a stereo window in the same way that * XCreateWindow * creates a mono window. The buffer ids for the left and right buffers are returned in left_return and right_return, respectively. If an extension error handler that returns is installed, * None * will be returned if the extension is not available on this display.

PREDEFINED VALUES

Update_action field:

 MultibufferUpdateActionUndefined   MultibufferUpdateActionBackground   MultibufferUpdateActionUntouched   MultibufferUpdateActionCopied 

Update_hint field:

 MultibufferUpdateHintFrequent   MultibufferUpdateHintIntermittent   MultibufferUpdateHintStatic 

Valuemask fields:

 MultibufferWindowUpdateHint   MultibufferBufferEventMask 

Mono vs. stereo and left vs. right:

 MultibufferModeMono   MultibufferModeStereo   MultibufferSideMono   MultibufferSideLeft   MultibufferSideRight 

Clobber state:

 MultibufferUnclobbered   MultibufferPartiallyClobbered   MultibufferFullyClobbered 

Event stuff:

 MultibufferClobberNotifyMask   MultibufferUpdateNotifyMask   MultibufferClobberNotify   MultibufferUpdateNotify   MultibufferNumberEvents   MultibufferBadBuffer   MultibufferNumberErrors 

BUGS

This manual page needs more work.

SEE ALSO

Extending X for Double Buffering, Multi-Buffering, and Stereo

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1169 - Linux cli command XML_DOM_AttlistDeclpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_DOM_AttlistDeclpm and provides detailed information about the command XML_DOM_AttlistDeclpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_DOM_AttlistDeclpm.

NAME 🖥️ XML_DOM_AttlistDeclpm 🖥️

An XML ATTLIST declaration in XML::DOM

DESCRIPTION

XML::DOM::AttlistDecl extends XML::DOM::Node but is not part of the DOM Level 1 specification.

This node represents an ATTLIST declaration, e.g.

<!ATTLIST person sex (male|female) #REQUIRED hair CDATA “bold” eyes (none|one|two) “two” species (human) #FIXED “human”>

Each attribute definition is stored a separate AttDef node. The AttDef nodes can be retrieved with getAttDef and added with addAttDef. (The AttDef nodes are stored in a NamedNodeMap internally.)

METHODS

getName
Returns the Element tagName.

getAttDef (attrName)
Returns the AttDef node for the attribute with the specified name.

addAttDef (attrName, type, default, [ fixed ])
Adds a AttDef node for the attribute with the specified name. Parameters: attrName the attribute name. type the attribute type (e.g. CDATA or (male|female).) default the default value enclosed in quotes (!), the string #IMPLIED or the string #REQUIRED. fixed whether the attribute is ‘#FIXED’ (default is 0.)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1170 - Linux cli command Image_ExifTool_MISBpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_MISBpm and provides detailed information about the command Image_ExifTool_MISBpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_MISBpm.

NAME 🖥️ Image_ExifTool_MISBpm 🖥️

Read Motion Industry Standards Board metadata

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains code to extract STANAG-4609 Motion Industry Standards Board (MISB) KLV-format metadata from M2TS videos.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<https://dokumen.tips/documents/nato-standardization-agreement-stanag-4609-ed-3.html>

<https://upload.wikimedia.org/wikipedia/commons/1/19/MISB_Standard_0601.pdf>

<https://dokumen.tips/documents/misb-st-010211-standard-security-metadata-universal-standard-describes-the-use.html>

SEE ALSO

“MISB Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1171 - Linux cli command Net_DBus_Binding_Serverpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Binding_Serverpm and provides detailed information about the command Net_DBus_Binding_Serverpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Binding_Serverpm.

NAME 🖥️ Net_DBus_Binding_Serverpm 🖥️

A server to accept incoming connections

SYNOPSIS

Creating a new server and accepting client connections

use Net::DBus::Binding::Server; my $server = Net::DBus::Binding::Server->new(address => “unix:path=/path/to/socket”); $server->connection_callback(\new_connection); sub new_connection { my $connection = shift; .. work with new connection… }

Managing the server and new connections in an event loop

my $reactor = Net::DBus::Binding::Reactor->new(); $reactor->manage($server); $reactor->run(); sub new_connection { my $connection = shift; $reactor->manage($connection); }

DESCRIPTION

A server for receiving connection from client programs. The methods defined on this module have a close correspondence to the dbus_server_XXX methods in the C API, so for further details on their behaviour, the C API documentation may be of use.

METHODS

my $server = Net::DBus::Binding::Server->new(address => “unix:path=/path/to/socket”);
Creates a new server binding it to the socket specified by the address parameter.

$status = $server->is_connected();
Returns zero if the server has been disconnected, otherwise a positive value is returned.

$server->disconnect()
Closes this server to the remote host. This method is called automatically during garbage collection (ie in the DESTROY method) if the programmer forgets to explicitly disconnect.

$server->set_watch_callbacks(\add_watch, \remove_watch, \toggle_watch);
Register a set of callbacks for adding, removing & updating watches in the application’s event loop. Each parameter should be a code reference, which on each invocation, will be supplied with two parameters, the server object and the watch object. If you are using a Net::DBus::Binding::Reactor object as the application event loop, then the ‘manage’ method on that object will call this on your behalf.

$server->set_timeout_callbacks(\add_timeout, \remove_timeout, \toggle_timeout);
Register a set of callbacks for adding, removing & updating timeouts in the application’s event loop. Each parameter should be a code reference, which on each invocation, will be supplied with two parameters, the server object and the timeout object. If you are using a Net::DBus::Binding::Reactor object as the application event loop, then the ‘manage’ method on that object will call this on your behalf.

$server->set_connection_callback(\handler)
Registers the handler to use for dealing with new incoming connections from clients. The code reference will be invoked each time a new client connects and supplied with a single parameter which is the Net::DBus::Binding::Connection object representing the client.

AUTHOR

Daniel P. Berrange

COPYRIGHT

Copyright (C) 2004-2011 Daniel P. Berrange

SEE ALSO

Net::DBus::Binding::Connection, Net::DBus::Binding::Bus, Net::DBus::Binding::Message::Signal, Net::DBus::Binding::Message::MethodCall, Net::DBus::Binding::Message::MethodReturn, Net::DBus::Binding::Message::Error

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1172 - Linux cli command rpmatch

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command rpmatch and provides detailed information about the command rpmatch, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the rpmatch.

NAME 🖥️ rpmatch 🖥️

determine if the answer to a question is affirmative or negative

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int rpmatch(const char *response);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

rpmatch():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _SVID_SOURCE

DESCRIPTION

rpmatch() handles a user response to yes or no questions, with support for internationalization.

response should be a null-terminated string containing a user-supplied response, perhaps obtained with fgets(3) or getline(3).

The user’s language preference is taken into account per the environment variables LANG, LC_MESSAGES, and LC_ALL, if the program has called setlocale(3) to effect their changes.

Regardless of the locale, responses matching ^[Yy] are always accepted as affirmative, and those matching ^[Nn] are always accepted as negative.

RETURN VALUE

After examining response, rpmatch() returns 0 for a recognized negative response (“no”), 1 for a recognized positive response (“yes”), and -1 when the value of response is unrecognized.

ERRORS

A return value of -1 may indicate either an invalid input, or some other error. It is incorrect to only test if the return value is nonzero.

rpmatch() can fail for any of the reasons that regcomp(3) or regexec(3) can fail; the cause of the error is not available from errno or anywhere else, but indicates a failure of the regex engine (but this case is indistinguishable from that of an unrecognized value of response).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

rpmatch()

Thread safetyMT-Safe locale

STANDARDS

None.

HISTORY

GNU, FreeBSD, AIX.

BUGS

The YESEXPR and NOEXPR of some locales (including “C”) only inspect the first character of the response. This can mean that “yno” et al. resolve to 1. This is an unfortunate historical side-effect which should be fixed in time with proper localisation, and should not deter from rpmatch() being the proper way to distinguish between binary answers.

EXAMPLES

The following program displays the results when rpmatch() is applied to the string given in the program’s command-line argument.

#define _DEFAULT_SOURCE
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int
main(int argc, char *argv[])
{
    if (argc != 2 || strcmp(argv[1], "--help") == 0) {
        fprintf(stderr, "%s response

“, argv[0]); exit(EXIT_FAILURE); } setlocale(LC_ALL, “”); printf(“rpmatch() returns: %d “, rpmatch(argv[1])); exit(EXIT_SUCCESS); }

SEE ALSO

fgets(3), getline(3), nl_langinfo(3), regcomp(3), setlocale(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1173 - Linux cli command XShape

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XShape and provides detailed information about the command XShape, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XShape.

NAME 🖥️ XShape 🖥️

X nonrectangular shape functions

SYNTAX

#include <X11/extensions/shape.h>
Bool XShapeQueryExtension (
	Display *dpy,
	int *event_basep,
	int *error_basep);
Status XShapeQueryVersion (
	Display *dpy,
	int *major_versionp,
	int *minor_versionp);
void XShapeCombineRegion (
	Display *dpy,
	Window dest,
	int destKind,
	int xOff,
	int yOff,
	struct _XRegion *r,
	int op);
void XShapeCombineRectangles (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	XRectangle *rects,
	int n_rects,
	int op,
	int ordering);
void XShapeCombineMask (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	Pixmap src,
	int op);
void XShapeCombineShape (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	Pixmap src,
	int srcKind,
	int op);
void XShapeOffsetShape (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff);
Status XShapeQueryExtents (
	Display *dpy,
	Window window,
	int *bShaped,
	int *xbs,
	int *ybs,
	unsigned int *wbs,
	unsigned int *hbs,
	int *cShaped,
	int *xcs,
	int *ycs,
	unsigned int *wcs,
	unsigned int *hcs);
void XShapeSelectInput (
	Display *dpy,
	Window window,
	unsigned longmask);
unsigned long XShapeInputSelected (
	Display *dpy,
	Window window);
XRectangle *XShapeGetRectangles (
	Display *dpy,
	Window window,
	int kind,
	int *count,
	int *ordering);

STRUCTURES

typedef struct {
    int type;	/* of event */
    unsigned long serial;	/* # of last request processed by server */
    Bool send_event;	/* true if this came from a SendEvent request */
    Display *display;	/* Display the event was read from */
    Window window;	/* window of event */
    int kind;	/* ShapeBounding or ShapeClip */
    int x, y;	/* extents of new region */
    unsigned width, height;
    Time time;	/* server timestamp when region changed */
    Bool shaped;	/* true if the region exists */
} XShapeEvent;

DESCRIPTION

The X11 Nonrectangular Window Shape Extension adds nonrectangular windows to the X Window System.

PREDEFINED VALUES

Operations:

 ShapeSet   ShapeUnion   ShapeIntersect   ShapeSubtract   ShapeInvert 

Shape Kinds:

 ShapeBounding   ShapeClip 

Event defines:

 ShapeNotifyMask   ShapeNotify 

BUGS

This manual page needs a lot more work.

SEE ALSO

X11 Nonrectangular Window Shape Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1174 - Linux cli command Moose_Manual_Rolespm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Manual_Rolespm and provides detailed information about the command Moose_Manual_Rolespm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Manual_Rolespm.

NAME 🖥️ Moose_Manual_Rolespm 🖥️

Roles, an alternative to deep hierarchies and base classes

VERSION

version 2.2207

WHAT IS A ROLE?

A role encapsulates some piece of behavior or state that can be shared between classes. It is something that classes do. It is important to understand that roles are not classes. You cannot inherit from a role, and a role cannot be instantiated. We sometimes say that roles are consumed, either by classes or other roles.

Instead, a role is composed into a class. In practical terms, this means that all of the methods, method modifiers, and attributes defined in a role are added directly to (we sometimes say “flattened into”) the class that consumes the role. These attributes and methods then appear as if they were defined in the class itself. A subclass of the consuming class will inherit all of these methods and attributes.

Moose roles are similar to mixins or interfaces in other languages and are based on the original concept of Traits <http://scg.unibe.ch/research/traits/> for the Smalltalk-80 dialect Squeak.

Besides defining their own methods and attributes, roles can also require that the consuming class define certain methods of its own. You could have a role that consisted only of a list of required methods, in which case the role would be very much like a Java interface.

Note that attribute accessors also count as methods for the purposes of satisfying the requirements of a role.

A SIMPLE ROLE

Creating a role looks a lot like creating a Moose class:

package Breakable; use Moose::Role; has is_broken => ( is => rw, isa => Bool, ); sub break { my $self = shift; print “I broke “; $self->is_broken(1); }

Except for our use of Moose::Role, this looks just like a class definition with Moose. However, this is not a class, and it cannot be instantiated.

Instead, its attributes and methods will be composed into classes which use the role:

package Car; use Moose; with Breakable; has engine => ( is => ro, isa => Engine, );

The with function composes roles into a class. Once that is done, the Car class has an is_broken attribute and a break method. The Car class also does(Breakable):

my $car = Car->new( engine => Engine->new ); print $car->is_broken ? Busted : Still working; $car->break; print $car->is_broken ? Busted : Still working; $car->does(Breakable); # true

This prints:

Still working I broke Busted

We could use this same role in a Bone class:

package Bone; use Moose; with Breakable; has marrow => ( is => ro, isa => Marrow, );

See also Moose::Cookbook::Roles::Comparable_CodeReuse for an example.

It’s possible to compose existing roles into new roles. For example, we can have a HandleWithCare class which applies both the Breakable and Package roles to any class which consumes it:

package HandleWithCare; use Moose::Role; with Breakable, Package;

REQUIRED METHODS

As mentioned previously, a role can require that consuming classes provide one or more methods. Using our Breakable example, let’s make it require that consuming classes implement their own break methods:

package Breakable; use Moose::Role; requires break; has is_broken => ( is => rw, isa => Bool, ); after break => sub { my $self = shift; $self->is_broken(1); };

If we try to consume this role in a class that does not have a break method, we will get an exception.

You can see that we added a method modifier on break. We want classes that consume this role to implement their own logic for breaking, but we make sure that the is_broken attribute is always set to true when break is called.

package Car use Moose; with Breakable; has engine => ( is => ro, isa => Engine, ); sub break { my $self = shift; if ( $self->is_moving ) { $self->stop; } }

Roles Versus Abstract Base Classes

If you are familiar with the concept of abstract base classes in other languages, you may be tempted to use roles in the same way.

You can define an “interface-only” role, one that contains just a list of required methods.

However, any class which consumes this role must implement all of the required methods, either directly or through inheritance from a parent. You cannot delay the method requirement check so that they can be implemented by future subclasses.

Because the role defines the required methods directly, adding a base class to the mix would not achieve anything. We recommend that you simply consume the interface role in each class which implements that interface.

CONSUMING ROLES

Roles are consumed using the with function.

Most of the time, you should only use one with, even if you are consuming multiple roles. If you consume roles using multiple with statements Moose cannot detect method conflicts between those roles.

Roles can be consumed by classes or by other roles. When a class consumes a role which in turn consumes other roles, the class gets all of the roles applied at once.

Required Methods Provided by Attributes

As mentioned before, a role’s required method may also be satisfied by an attribute accessor. However, the call to has which defines an attribute happens at runtime. This means that you must define the attribute before consuming the role, or else the role will not see the generated accessor. These attributes are Moose Attributes.

package Breakable; use Moose::Role; requires stress; ######## package Car; use Moose; has stress => ( is => ro, isa => Int, ); with Breakable;

In general, we recommend that you always consume roles after declaring all your attributes.

It may also be the case that a class wants to consume two roles where one role has an attribute providing a required method for another. For example:

package Breakable; use Moose::Role; requires stress; ######## package Stressable; use Moose::Role; has stress => ( is => ro, isa => Int, ); ######## package Car; use Moose; # XXX - this will not work with Breakable, Stressable;

However, this won’t work. The problem is that the accessor methods created for the stress attribute won’t be present in the class when the required method checks are done.

There are two possible workarounds. The recommended one is to use “stub” subroutine(s) in the role providing the accessor(s):

package Stressable; use Moose::Role; sub stress; has stress => ( is => ro, isa => Int, );

The sub stress; line is called a “forward” declaration in the Perl documentation. It creates what is called a “stub” subroutine, a declaration without a body. This is good enough to satisfy the required method checks done by Moose. The stub will not interfere with the creation of a real subroutine later.

The other alternative is to use two separate calls to with in the consuming class:

package Car; use Moose; # Not recommended with Stressable; with Breakable;

Each with is run as it is seen. The first call will consume just the Stressable role, which will add the stress attribute to the Car package, which in turn will create an accessor method named stress. Then when the Breakable role is consumed, the method it requires already exists.

However, as mentioned earlier, multiple with declarations are not recommended, because method conflicts between the roles cannot be seen. In the example above, if both Stressable and Breakable contained methods of the same name, what would happen is that the version in Stressable would silently override the one in Breakable.

USING METHOD MODIFIERS

Method modifiers and roles are a very powerful combination. Often, a role will combine method modifiers and required methods. We already saw one example with our Breakable example.

Method modifiers increase the complexity of roles, because they make the role application order relevant. If a class uses multiple roles, each of which modify the same method, those modifiers will be applied in the same order as the roles are used:

package MovieCar; use Moose; extends Car; with Breakable, ExplodesOnBreakage;

Assuming that the new ExplodesOnBreakage role also has an after modifier on break, the after modifiers will run one after the other. The modifier from Breakable will run first, then the one from ExplodesOnBreakage.

METHOD CONFLICTS

If a class composes multiple roles, and those roles have methods of the same name, we will have a conflict. In that case, the composing class is required to provide its own method of the same name.

package Breakdancer; use Moose::Role; sub break { }

If we compose both Breakable and Breakdancer in a class, we must provide our own break method:

package FragileDancer; use Moose; with Breakable, Breakdancer; sub break { … }

A role can be a collection of other roles:

package Break::Bundle; use Moose::Role; with (Breakable, Breakdancer);

When a role consumes another a role, the consuming role’s methods silently win in any conflict, and the consumed role’s methods are simply ignored.

METHOD EXCLUSION AND ALIASING

If we want our FragileDancer class to be able to call the methods from both its roles, we can alias the methods:

package FragileDancer; use Moose; with Breakable => { -alias => { break => break_bone } }, Breakdancer => { -alias => { break => break_dance } };

However, aliasing a method simply makes a copy of the method with the new name. We also need to exclude the original name:

with Breakable => { -alias => { break => break_bone }, -excludes => break, }, Breakdancer => { -alias => { break => break_dance }, -excludes => break, };

The excludes parameter prevents the break method from being composed into the FragileDancer class, so we don’t have a conflict. This means that FragileDancer does not need to implement its own break method.

This is useful, but it’s worth noting that this breaks the contract implicit in consuming a role. Our FragileDancer class does both the Breakable and BreakDancer, but does not provide a break method. If some API expects an object that does one of those roles, it probably expects it to implement that method.

In some use cases we might alias and exclude methods from roles, but then provide a method of the same name in the class itself.

Also see Moose::Cookbook::Roles::Restartable_AdvancedComposition for an example.

OVERLOADING

When a Moose role uses overloading, that overloading is composed into any classes that consume the role. This includes the setting of the fallback value for that role’s overloading. Just as with methods and attributes, when a role consumes another role, that other role’s overloading settings are applied to the role.

Just as with methods, there can be conflicts with overloading implementations between multiple roles when they are all consumed by a class. If two roles both provide different overloading implementations for a given operator, that is a conflict. If two roles both implement overloading and have different fallback values, that is also considered a conflict. These conflicts are detected when multiple roles are being composed into a class together.

When a role consumes another role, the consuming role’s overloading fallback and operator implementations silently “win” the conflict.

ROLE EXCLUSION

A role can say that it cannot be combined with some other role. This should be used with great caution, since it limits the re-usability of the role.

package Breakable; use Moose::Role; excludes BreakDancer;

ADDING A ROLE TO AN OBJECT INSTANCE

You may want to add a role to an object instance, rather than to a class. For example, you may want to add debug tracing to one instance of an object while debugging a particular bug. Another use case might be to dynamically change objects based on a user’s configuration, as a plugin system.

The best way to do this is to use the apply_all_roles() function from Moose::Util:

use Moose::Util qw( apply_all_roles ); my $car = Car->new; apply_all_roles( $car, Breakable );

This function can apply more than one role at a time, and will do so using the normal Moose role combination system. We recommend using this function to apply roles to an object. This is what Moose uses internally when you call with.

Handling required attributes for roles.

Application of some roles will require additional parameters being specified to satisfy them, for example:

{ package Car; use Moose; } { package Breakable; use Moose::Role; has breakable_parts => ( is => ro, required => 1 ); } my $car = Car->new; # next line dies with: Attribute (breakable_parts) is required apply_all_roles( $car, Breakable );

This will require passing the additional parameters at application time as follows:

apply_all_roles( $car, Breakable => { rebless_params => { # Parameters to Breakable breakable_parts => [qw( tires wheels windscreen )], } });

Obviously, this interface is better simplified as a method on Car:

sub make_breakable { my ( $self, %params ) = @_; apply_all_roles($self, Breakable, { rebless_params => \params }); } my $car = Car->new(); $car->make_breakable( breakable_parts => [qw( tires wheels windscreen )] );

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1175 - Linux cli command Unicode_Mappm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Unicode_Mappm and provides detailed information about the command Unicode_Mappm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Unicode_Mappm.

NAME 🖥️ Unicode_Mappm 🖥️

maps charsets from and to utf16 unicode

SYNOPSIS

use Unicode::Map(); $Map = new Unicode::Map(“ISO-8859-1”); $utf16 = $Map -> to_unicode (“Hello world!”); => $utf16 == “�H�e�l�l�o� �w�o�r�l�d�!” $locale = $Map -> from_unicode ($utf16); => $locale == “Hello world!”

A more detailed description below.

2do: short note about perl’s Unicode perspectives.

DESCRIPTION

This module converts strings from and to 2-byte Unicode UCS2 format. All mappings happen via 2 byte UTF16 encodings, not via 1 byte UTF8 encoding. To transform these use Unicode::String.

For historical reasons this module coexists with Unicode::Map8. Please use Unicode::Map8 unless you need to care for two byte character sets, e.g. chinese GB2312. Anyway, if you stick to the basic functionality (see documentation) you can use both modules equivalently.

Practically this module will disappear from earth sooner or later as Unicode mapping support needs somehow to get into perl’s core. If you like to work on this field please don’t hesitate contacting Gisle Aas!

This module can’t deal directly with utf8. Use Unicode::String to convert utf8 to utf16 and vice versa.

Character mapping is according to the data of binary mapfiles in Unicode::Map hierarchy. Binary mapfiles can also be created with this module, enabling you to install own specific character sets. Refer to mkmapfile or file REGISTRY in the Unicode::Map hierarchy.

CONVERSION METHODS

Probably these are the only methods you will need from this module. Their usage is compatible with Unicode::Map8.

new
$Map = new Unicode::Map(“GB2312-80”) Returns a new Map object for GB2312-80 encoding.

from_unicode
$dest = $Map -> from_unicode ($src) Creates a string in locale charset representation from utf16 encoded string $src.

to_unicode
$dest = $Map -> to_unicode ($src) Creates a string in utf16 representation from $src.

to8
Alias for from_unicode. For compatibility with Unicode::Map8

to16
Alias for to_unicode. For compatibility with Unicode::Map8

WARNINGS

You can demand Unicode::Map to issue warnings at deprecated or incompatible usage with the constants WARN_DEFAULT, WARN_DEPRECATION or WARN_COMPATIBILITY. The latter both can be ored together.

No special warnings:
$Unicode::Map::WARNINGS = Unicode::Map::WARN_DEFAULT

Warnings for deprecated usage:
$Unicode::Map::WARNINGS = Unicode::Map::WARN_DEPRECATION

Warnings for incompatible usage:
$Unicode::Map::WARNINGS = Unicode::Map::WARN_COMPATIBILITY

MAINTAINANCE METHODS

Note: These methods are solely for the maintainance of Unicode::Map. Using any of these methods will lead to programs incompatible with Unicode::Map8.

alias
@list = $Map -> alias ($csid) Returns a list of alias names of character set $csid.

mapping
$path = $Map -> mapping ($csid) Returns the absolute path of binary character mapping for character set $csid according to REGISTRY file of Unicode::Map.

id
$real_id||"" = $Map -> id ($test_id) Returns a valid character set identifier $real_id, if $test_id is a valid character set name or alias name according to REGISTRY file of Unicode::Map.

ids
@ids = $Map -> ids() Returns a list of all character set names defined in REGISTRY file.

read_text_mapping
1||0 = $Map -> read_text_mapping ($csid, $path, $style) Read a text mapping of style $style named $csid from filename $path. The mapping then can be saved to a file with method: write_binary_mapping. <$style> can be: style description “unicode” A text mapping as of ftp://ftp.unicode.org/MAPPINGS/ "" Same as “unicode” “reverse” Similar to unicode, but both columns are switched “keld” A text mapping as of ftp://dkuug.dk/i18n/charmaps/

src
$path = $Map -> src ($csid) Returns the path of textual character mapping for character set $csid according to REGISTRY file of Unicode::Map.

style
$path = $Map -> style ($csid) Returns the style of textual character mapping for character set $csid according to REGISTRY file of Unicode::Map.

write_binary_mapping
1||0 = $Map -> write_binary_mapping ($csid, $path) Stores a mapping that has been loaded via method read_text_mapping in file $path.

DEPRECATED METHODS

Some functionality is no longer promoted.

noise
Deprecated! Don’t use any longer.

reverse_unicode
Deprecated! Use Unicode::String::byteswap instead.

BINARY MAPPINGS

Structure of binary Mapfiles

Unicode character mapping tables have sequences of sequential key and sequential value codes. This property is used to crunch the maps easily. n (0<n<256) sequential characters are represented as a bytecount n and the first character code key_start. For these subsequences the according value sequences are crunched together, also. The value 0 is used to start an extended information block (that is just partially implemented, though).

One could think of two ways to make a binary mapfile. First method would be first to write a list of all key codes, and then to write a list of all value codes. Second method, used here, appends to all partial key code lists the according crunched value code lists. This makes value codes a little bit closer to key codes.

Note: the file format is still in a very liquid state. Neither rely on that it will stay as this, nor that the description is bugless, nor that all features are implemented.

STRUCTURE:

<main>:
offset structure value 0x00 word 0x27b8 (magic) 0x02 @(<extended> || <submapping>) The mapfile ends with extended mode <end> in main stream.

<submapping>:
0x00 byte != 0 charsize1 (bits) 0x01 byte n1 number of chars for one entry 0x02 byte charsize2 (bits) 0x03 byte n2 number of chars for one entry 0x04 @(<extended> || <key_seq> || <key_val_seq) bs1=int((charsize1+7)/8), bs2=int((charsize2+7)/8) One submapping ends when <mapend> entry occurs.

<key_val_seq>:
0x00 size=0|1|2|4 n, number of sequential characters size bs1 key1 +bs1 bs2 value1 +bs2 bs1 key2 +bs1 bs2 value2 … key_val_seq ends, if either file ends (n = infinite mode) or n pairs are read.

<key_seq>:
0x00 byte n, number of sequential characters 0x01 bs1 key_start, first character of sequence 1+bs1 @(<extended> || <val_seq>) A key sequence starts with a byte count telling how long the sequence is. It is followed by the key start code. After this comes a list of value sequences. The list of value sequences ends, if sum(m) equals n.

<val_seq>:
0x00 byte m, number of sequential characters 0x01 bs2 val_start, first character of sequence

<extended>:
0x00 byte 0 0x01 byte ftype 0x02 byte fsize, size of following structure 0x03 fsize bytes something For future extensions or private use one can insert here 1..255 byte long streams. ftype can have values 30..255, values 0..29 are reserved. Modi are not fully defined now and could change. They will be explained later.

TO BE DONE

  • Something clever, when a character has no translation.

  • Direct charset -> charset mapping.

  • Better performance.

  • Support for mappings according to RFC 1345.

SEE ALSO

  • File REGISTRY and binary mappings in directory Unicode/Map of your perl library path

  • recode (1), map (1), mkmapfile (1), Unicode::Map (3), Unicode::Map8 (3), Unicode::String (3), Unicode::CharName (3), mirrorMappings (1)

  • RFC 1345

  • Mappings at Unicode consortium ftp://ftp.unicode.org/MAPPINGS/

  • Registrated Internet character sets ftp://dkuug.dk/i18n/charmaps/

  • 2do: more references

AUTHOR

Martin Schwartz <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1176 - Linux cli command zip_set_file_compression

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_set_file_compression and provides detailed information about the command zip_set_file_compression, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_set_file_compression.

libzip (-lzip)

The

function sets the compression method for the file at position

in the zip archive to

with the compression method specific

The

is the same as returned by

For the

argument, currently only the following values are supported:

default compression; currently the same as

but

are ignored.

Store the file uncompressed.

Compress the file using the

algorithm.

Deflate the file with the

algorithm and default options.

Only the deflate and store methods can be assumed to be universally supported.

The

argument defines the compression level, 1 being fastest compression and 9 highest. Allowed values are 0 (which uses the default compression for the algorithm) and 1-9, other values are undefined. Further compression method specific flags might be added over time.

The current compression method for a file in a zip archive can be determined using

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

fails if:

Unsupported compression method requested.

is not a valid file index in

or the argument combination is invalid.

Read-only zip file, no changes allowed.

was added in libzip 0.11.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1177 - Linux cli command HTML_Form_ImageInputpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_Form_ImageInputpm and provides detailed information about the command HTML_Form_ImageInputpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_Form_ImageInputpm.

NAME 🖥️ HTML_Form_ImageInputpm 🖥️

An HTML form image input element for use with HTML::Form

VERSION

version 6.11

AUTHOR

Gisle Aas <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 1998 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1178 - Linux cli command Moose_Cookbook_Extending_Mooseish_MooseSugarpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Extending_Mooseish_MooseSugarpm and provides detailed information about the command Moose_Cookbook_Extending_Mooseish_MooseSugarpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Extending_Mooseish_MooseSugarpm.

NAME 🖥️ Moose_Cookbook_Extending_Mooseish_MooseSugarpm 🖥️

Acting like Moose.pm and providing sugar Moose-style

VERSION

version 2.2207

SYNOPSIS

package MyApp::Mooseish; use Moose::Exporter; Moose::Exporter->setup_import_methods( with_meta => [has_table], class_metaroles => { class => [MyApp::Meta::Class::Trait::HasTable], }, ); sub has_table { my $meta = shift; $meta->table(shift); } package MyApp::Meta::Class::Trait::HasTable; use Moose::Role; has table => ( is => rw, isa => Str, );

DESCRIPTION

This recipe expands on the use of Moose::Exporter we saw in Moose::Cookbook::Extending::ExtensionOverview and the class metaclass trait we saw in Moose::Cookbook::Meta::Table_MetaclassTrait. In this example we provide our own metaclass trait, and we also export a has_table sugar function.

The with_meta parameter specifies a list of functions that should be wrapped before exporting. The wrapper simply ensures that the importing package’s appropriate metaclass object is the first argument to the function, so we can do my $meta = shift;.

See the Moose::Exporter docs for more details on its API.

USING MyApp::Mooseish

The purpose of all this code is to provide a Moose-like interface. Here’s what it would look like in actual use:

package MyApp::User; use namespace::autoclean; use Moose; use MyApp::Mooseish; has_table User; has username => ( is => ro ); has password => ( is => ro ); sub login { … }

CONCLUSION

Providing sugar functions can make your extension look much more Moose-ish. See Fey::ORM for a more extensive example.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1179 - Linux cli command XtIsShell

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtIsShell and provides detailed information about the command XtIsShell, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtIsShell.

NAME 🖥️ XtIsShell 🖥️

obtain and verify a widget’s class

SYNTAX

#include <X11/Intrinsic.h>

WidgetClass XtClass(Widget w);

WidgetClass XtSuperclass(Widget w);

Boolean XtIsSubclass(Widget w, WidgetClass widget_class);

void XtCheckSubclass(Widget widget, WidgetClass widget_class, String message);

Boolean XtIsObject(Widget w);

Boolean XtIsRectObj(Widget w);

Boolean XtIsWidget(Widget w);

Boolean XtIsComposite(Widget w);

Boolean XtIsConstraint(Widget w);

Boolean XtIsShell(Widget w);

Boolean XtIsOverrideShell(Widget w);

Boolean XtIsWMShell(Widget w);

Boolean XtIsVendorShell(Widget w);

Boolean XtIsTransientShell(Widget w);

Boolean XtIsTopLevelShell(Widget w);

Boolean XtIsApplicationShell(Widget w);

Boolean XtIsSessionShell(Widget w);

ARGUMENTS

  1. Specifies the widget.

widget_class
Specifies the widget class.

message
Specifies the message that is to be used.

DESCRIPTION

The XtClass function returns a pointer to the widget’s class structure.

The XtSuperclass function returns a pointer to the widget’s superclass class structure.

The XtIsSubclass function returns True if the class of the specified widget is equal to or is a subclass of the specified class. The widget’s class can be any number of subclasses down the chain and need not be an immediate subclass of the specified class. Composite widgets that need to restrict the class of the items they contain can use XtIsSubclass to find out if a widget belongs to the desired class of objects.

The XtCheckSubclass macro determines if the class of the specified widget is equal to or is a subclass of the specified widget class. The widget can be any number of subclasses down the chain and need not be an immediate subclass of the specified widget class. If the specified widget is not a subclass, XtCheckSubclass constructs an error message from the supplied message, the widget’s actual class, and the expected class and calls XtErrorMsg. XtCheckSubclass should be used at the entry point of exported routines to ensure that the client has passed in a valid widget class for the exported operation.

XtCheckSubclass is only executed when the widget has been compiled with the compiler symbol DEBUG defined; otherwise, it is defined as the empty string and generates no code.

To test if a given widget belongs to a subclass of an Intrinsics-defined class, the Intrinsics defines macros or functions equivalent to XtIsSubclass for each of the built-in classes. These procedures are XtIsObject, XtIsRectObj, XtIsWidget, XtIsComposite, XtIsConstraint, XtIsShell, XtIsOverrideShell, XtIsWMShell, XtIsVendorShell, XtIsTransientShell, XtIsTopLevelShell, XtIsApplicationShell, and XtIsSessionShell.

The

SEE ALSO

XtAppErrorMsg(3), XtDisplay(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1180 - Linux cli command getusershell

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getusershell and provides detailed information about the command getusershell, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getusershell.

NAME 🖥️ getusershell 🖥️

get permitted user shells

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
char *getusershell(void);
void setusershell(void);
void endusershell(void);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getusershell(), setusershell(), endusershell():

    Since glibc 2.21:
        _DEFAULT_SOURCE
    In glibc 2.19 and 2.20:
        _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)
    Up to and including glibc 2.19:
        _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)

DESCRIPTION

The getusershell() function returns the next line from the file /etc/shells, opening the file if necessary. The line should contain the pathname of a valid user shell. If /etc/shells does not exist or is unreadable, getusershell() behaves as if /bin/sh and /bin/csh were listed in the file.

The setusershell() function rewinds /etc/shells.

The endusershell() function closes /etc/shells.

RETURN VALUE

The getusershell() function returns NULL on end-of-file.

FILES

/etc/shells

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getusershell(), setusershell(), endusershell()

Thread safetyMT-Unsafe

STANDARDS

None.

HISTORY

4.3BSD.

SEE ALSO

shells(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1181 - Linux cli command res_ninit

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command res_ninit and provides detailed information about the command res_ninit, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the res_ninit.

NAME 🖥️ res_ninit 🖥️

resolver routines

LIBRARY

Resolver library (libresolv, -lresolv)

SYNOPSIS

#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
struct __res_state;
typedef struct __res_state *res_state;
int res_ninit(res_state statep);
void res_nclose(res_state statep);
int res_nquery(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nsearch(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nquerydomain(res_state statep,
 const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
int res_nmkquery(res_state statep,
 int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
int res_nsend(res_state statep,
 const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);
int dn_comp(const char *exp_dn, unsigned char comp_dn[.length],
 int length, unsigned char **dnptrs,
 unsigned char **lastdnptr);
int dn_expand(const unsigned char *msg,
 const unsigned char *eomorig,
 const unsigned char *comp_dn, char exp_dn[.length],
 int length);
[[deprecated]] extern struct __res_state _res;
[[deprecated]] int res_init(void);
[[deprecated]]
int res_query(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_search(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_querydomain(const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
[[deprecated]]
int res_mkquery(int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
[[deprecated]]
int res_send(const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);

DESCRIPTION

Note: This page is incomplete (various resolver functions provided by glibc are not described) and likely out of date.

The functions described below make queries to and interpret the responses from Internet domain name servers.

The API consists of a set of more modern, reentrant functions and an older set of nonreentrant functions that have been superseded. The traditional resolver interfaces such as res_init() and res_query() use some static (global) state stored in the _res structure, rendering these functions non-thread-safe. BIND 8.2 introduced a set of new interfaces res_ninit(), res_nquery(), and so on, which take a res_state as their first argument, so you can use a per-thread resolver state.

The res_ninit() and res_init() functions read the configuration files (see resolv.conf(5)) to get the default domain name and name server address(es). If no server is given, the local host is tried. If no domain is given, that associated with the local host is used. It can be overridden with the environment variable LOCALDOMAIN. res_ninit() or res_init() is normally executed by the first call to one of the other functions. Every call to res_ninit() requires a corresponding call to res_nclose() to free memory allocated by res_ninit() and subsequent calls to res_nquery().

The res_nquery() and res_query() functions query the name server for the fully qualified domain name name of specified type and class. The reply is left in the buffer answer of length anslen supplied by the caller.

The res_nsearch() and res_search() functions make a query and waits for the response like res_nquery() and res_query(), but in addition they implement the default and search rules controlled by RES_DEFNAMES and RES_DNSRCH (see description of _res options below).

The res_nquerydomain() and res_querydomain() functions make a query using res_nquery()/res_query() on the concatenation of name and domain.

The following functions are lower-level routines used by res_nquery()/res_query().

The res_nmkquery() and res_mkquery() functions construct a query message in buf of length buflen for the domain name dname. The query type op is one of the following (typically QUERY):

QUERY
Standard query.

IQUERY
Inverse query. This option was removed in glibc 2.26, since it has not been supported by DNS servers for a very long time.

NS_NOTIFY_OP
Notify secondary of SOA (Start of Authority) change.

newrr is currently unused.

The res_nsend() and res_send() function send a preformatted query given in msg of length msglen and returns the answer in answer which is of length anslen. They will call res_ninit()/res_init() if it has not already been called.

The dn_comp() function compresses the domain name exp_dn and stores it in the buffer comp_dn of length length. The compression uses an array of pointers dnptrs to previously compressed names in the current message. The first pointer points to the beginning of the message and the list ends with NULL. The limit of the array is specified by lastdnptr. If dnptr is NULL, domain names are not compressed. If lastdnptr is NULL, the list of labels is not updated.

The dn_expand() function expands the compressed domain name comp_dn to a full domain name, which is placed in the buffer exp_dn of size length. The compressed name is contained in a query or reply message, and msg points to the beginning of the message.

The resolver routines use configuration and state information contained in a __res_state structure (either passed as the statep argument, or in the global variable _res, in the case of the older nonreentrant functions). The only field of this structure that is normally manipulated by the user is the options field. This field can contain the bitwise “OR” of the following options:

RES_INIT
True if res_ninit() or res_init() has been called.

RES_DEBUG
Print debugging messages. This option is available only if glibc was built with debugging enabled, which is not the default.

RES_AAONLY (unimplemented; deprecated in glibc 2.25)
Accept authoritative answers only. res_send() continues until it finds an authoritative answer or returns an error. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEVC
Use TCP connections for queries rather than UDP datagrams.

RES_PRIMARY (unimplemented; deprecated in glibc 2.25)
Query primary domain name server only. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_IGNTC
Ignore truncation errors. Don’t retry with TCP.

RES_RECURSE
Set the recursion desired bit in queries. Recursion is carried out by the domain name server, not by res_send(). [Enabled by default].

RES_DEFNAMES
If set, res_search() will append the default domain name to single component names—that is, those that do not contain a dot. [Enabled by default].

RES_STAYOPEN
Used with RES_USEVC to keep the TCP connection open between queries.

RES_DNSRCH
If set, res_search() will search for hostnames in the current domain and in parent domains. This option is used by gethostbyname(3). [Enabled by default].

RES_INSECURE1
Accept a response from a wrong server. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_INSECURE2
Accept a response which contains a wrong query. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_NOALIASES
Disable usage of HOSTALIASES environment variable.

RES_USE_INET6
Try an AAAA query before an A query inside the gethostbyname(3) function, and map IPv4 responses in IPv6 “tunneled form” if no AAAA records are found but an A record set exists. Since glibc 2.25, this option is deprecated, and its usage produces a warning; applications should use getaddrinfo(3), rather than gethostbyname(3).

RES_ROTATE
Causes round-robin selection of name servers from among those listed. This has the effect of spreading the query load among all listed servers, rather than having all clients try the first listed server first every time.

RES_NOCHECKNAME (unimplemented; deprecated in glibc 2.25)
Disable the modern BIND checking of incoming hostnames and mail names for invalid characters such as underscore (_), non-ASCII, or control characters. This option was present until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_KEEPTSIG (unimplemented; deprecated in glibc 2.25)
Do not strip TSIG records. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_BLAST (unimplemented; deprecated in glibc 2.25)
Send each query simultaneously and recursively to all servers. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEBSTRING (glibc 2.3.4 to glibc 2.24)
Make reverse IPv6 lookups using the bit-label format described in RFC 2673; if this option is not set (which is the default), then nibble format is used. This option was removed in glibc 2.25, since it relied on a backward-incompatible DNS extension that was never deployed on the Internet.

RES_NOIP6DOTINT (glibc 2.24 and earlier)
Use ip6.arpa zone in IPv6 reverse lookup instead of ip6.int, which is deprecated since glibc 2.3.4. This option is present up to and including glibc 2.24, where it is enabled by default. In glibc 2.25, this option was removed.

RES_USE_EDNS0 (since glibc 2.6)
Enables support for the DNS extensions (EDNS0) described in RFC 2671.

RES_SNGLKUP (since glibc 2.10)
By default, glibc performs IPv4 and IPv6 lookups in parallel since glibc 2.9. Some appliance DNS servers cannot handle these queries properly and make the requests time out. This option disables the behavior and makes glibc perform the IPv6 and IPv4 requests sequentially (at the cost of some slowdown of the resolving process).

RES_SNGLKUPREOP
When RES_SNGLKUP option is enabled, opens a new socket for the each request.

RES_USE_DNSSEC
Use DNSSEC with OK bit in OPT record. This option implies RES_USE_EDNS0.

RES_NOTLDQUERY
Do not look up unqualified name as a top-level domain (TLD).

RES_DEFAULT
Default option which implies: RES_RECURSE, RES_DEFNAMES, RES_DNSRCH, and RES_NOIP6DOTINT.

RETURN VALUE

The res_ninit() and res_init() functions return 0 on success, or -1 if an error occurs.

The res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), res_querydomain(), res_nmkquery(), res_mkquery(), res_nsend(), and res_send() functions return the length of the response, or -1 if an error occurs.

The dn_comp() and dn_expand() functions return the length of the compressed name, or -1 if an error occurs.

In the case of an error return from res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), or res_querydomain(), the global variable h_errno (see gethostbyname(3)) can be consulted to determine the cause of the error.

FILES

/etc/resolv.conf
resolver configuration file

/etc/host.conf
resolver configuration file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

res_ninit(), res_nclose(), res_nquery(), res_nsearch(), res_nquerydomain(), res_nsend()

Thread safetyMT-Safe locale

res_nmkquery(), dn_comp(), dn_expand()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

4.3BSD.

SEE ALSO

gethostbyname(3), resolv.conf(5), resolver(5), hostname(7), named(8)

The GNU C library source file resolv/README.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1182 - Linux cli command XtAppAddBlockHook

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppAddBlockHook and provides detailed information about the command XtAppAddBlockHook, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppAddBlockHook.

NAME 🖥️ XtAppAddBlockHook 🖥️

register a block hook procedure

SYNTAX

#include <X11/Intrinsic.h>

XtBlockHookId XtAppAddBlockHook(XtAppContext app_context, XtBlockHookProc proc, XtPointer client_data);

void XtRemoveBlockHook(XtBlockHookId id);

ARGUMENTS

app_context
Specifies the application context.

proc
Specifies the block hook procedure.

num_args
Specifies the application-specific data to be passed to the block hook.

DESCRIPTION

XtAppAddBlockHook registers the specified procedure and returns an identifier for it. The hook is called at any time in the future when the Intrinsics are about to block pending some input.

Block hook procedures are removed automatically and the XtBlockHookId is destroyed when the application context in which they were added is destroyed.

XtRemoveBlockHook removes the specified block hook procedure from the list in which it was registered.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1183 - Linux cli command LWP_Authen_Ntlmpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LWP_Authen_Ntlmpm and provides detailed information about the command LWP_Authen_Ntlmpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LWP_Authen_Ntlmpm.

NAME 🖥️ LWP_Authen_Ntlmpm 🖥️

Library for enabling NTLM authentication (Microsoft) in LWP

SYNOPSIS

use LWP::UserAgent; use HTTP::Request::Common; my $url = http://www.company.com/protected_page.html; # Set up the ntlm client and then the base64 encoded ntlm handshake message my $ua = LWP::UserAgent->new(keep_alive=>1); $ua->credentials(www.company.com:80, , “MyDomain\MyUserCode”, MyPassword); $request = GET $url; print “–Performing request now…———– “; $response = $ua->request($request); print “–Done with request——————- “; if ($response->is_success) {print “It worked!->” . $response->code . " “} else {print “It didnt work!->” . $response->code . " “}

DESCRIPTION

LWP::Authen::Ntlm allows LWP to authenticate against servers that are using the NTLM authentication scheme popularized by Microsoft. This type of authentication is common on intranets of Microsoft-centric organizations.

The module takes advantage of the Authen::NTLM module by Mark Bush. Since there is also another Authen::NTLM module available from CPAN by Yee Man Chan with an entirely different interface, it is necessary to ensure that you have the correct NTLM module.

In addition, there have been problems with incompatibilities between different versions of Mime::Base64, which Bush’s Authen::NTLM makes use of. Therefore, it is necessary to ensure that your Mime::Base64 module supports exporting of the encode_base64 and decode_base64 functions.

USAGE

The module is used indirectly through LWP, rather than including it directly in your code. The LWP system will invoke the NTLM authentication when it encounters the authentication scheme while attempting to retrieve a URL from a server. In order for the NTLM authentication to work, you must have a few things set up in your code prior to attempting to retrieve the URL:

  • Enable persistent HTTP connections To do this, pass the "keep_alive=>1" option to the LWP::UserAgent when creating it, like this: my $ua = LWP::UserAgent->new(keep_alive=>1);

  • Set the credentials on the UserAgent object The credentials must be set like this: $ua->credentials(www.company.com:80, , “MyDomain\MyUserCode”, MyPassword); Note that you cannot use the HTTP::Request object’s authorization_basic() method to set the credentials. Note, too, that the www.company.com:80 portion only sets credentials on the specified port AND it is case-sensitive (this is due to the way LWP is coded, and has nothing to do with LWP::Authen::Ntlm)

AVAILABILITY

General queries regarding LWP should be made to the LWP Mailing List.

Questions specific to LWP::Authen::Ntlm can be forwarded to [email protected]

COPYRIGHT

Copyright (c) 2002 James Tillman. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

LWP, LWP::UserAgent, lwpcook.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1184 - Linux cli command Mail_Filterpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Mail_Filterpm and provides detailed information about the command Mail_Filterpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Mail_Filterpm.

NAME 🖥️ Mail_Filterpm 🖥️

filter mail through multiple subroutines

SYNOPSIS

use Mail::Filter; my $filter = Mail::Filter->new( \filter1, \filter2 ); my $mail = Mail::Internet->new( [<>] ); my $mail = $filter->filter($mail); my $folder = Mail::Folder->new( …. ); my $filter->filter($folder);

DESCRIPTION

Mail::Filter provides an interface to filtering Email through multiple subroutines.

Mail::Filter filters mail by calling each filter subroutine in turn. Each filter subroutine is called with two arguments, the first is the filter object and the second is the mail or folder object being filtered.

The result from each filter sub is passed to the next filter as the mail object. If a filter subroutine returns undef, then Mail::Filter will abort and return immediately.

The function returns the result from the last subroutine to operate on the mail object.

METHODS

Constructors

Mail::Filter->new(@filters)
Create a new Mail::Filter object with the given filter subroutines. Each filter may be either a code reference or the name of a method to call on the <Mail::Filter> object.

Accessors

$obj->add(@filters)
Add the given @filters to the end of the filter list.

Processing

$obj->filter($mail|$folder)
If the first argument is a Mail::Internet object, then this object will be passed through the filter list. If the first argument is a Mail::Folder object, then each message in turn will be passed through the filter list.

$obj->folder()
While the filter() method is called with a Mail::Folder object, these filter subroutines can call this method to obtain the folder object that is being processed.

$obj->msgnum()
If the filter() method is called with a Mail::Folder object, then the filter subroutines may call this method to obtain the message number of the message that is being processed.

SEE ALSO

This module is part of the MailTools distribution, http://perl.overmeer.net/mailtools/.

AUTHORS

The MailTools bundle was developed by Graham Barr. Later, Mark Overmeer took over maintenance without commitment to further development.

Mail::Cap by Gisle Aas <[email protected]>. Mail::Field::AddrList by Peter Orbaek <[email protected]>. Mail::Mailer and Mail::Send by Tim Bunce <[email protected]>. For other contributors see ChangeLog.

LICENSE

Copyrights 1995-2000 Graham Barr <[email protected]> and 2001-2017 Mark Overmeer <[email protected]>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1185 - Linux cli command sincosf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sincosf and provides detailed information about the command sincosf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sincosf.

NAME 🖥️ sincosf 🖥️

calculate sin and cos simultaneously

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <math.h>
void sincos(double x, double *sin, double *cos);
void sincosf(float x, float *sin, float *cos);
void sincosl(long double x, long double *sin, long double *cos);

DESCRIPTION

Several applications need sine and cosine of the same angle x. These functions compute both at the same time, and store the results in *sin and *cos. Using this function can be more efficient than two separate calls to sin(3) and cos(3).

If x is a NaN, a NaN is returned in *sin and *cos.

If x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned in *sin and *cos.

RETURN VALUE

These functions return void.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is an infinity
errno is set to EDOM (but see BUGS). An invalid floating-point exception (FE_INVALID) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sincos(), sincosf(), sincosl()

Thread safetyMT-Safe

STANDARDS

GNU.

HISTORY

glibc 2.1.

NOTES

To see the performance advantage of sincos(), it may be necessary to disable gcc(1) built-in optimizations, using flags such as:

cc -O -lm -fno-builtin prog.c

BUGS

Before glibc 2.22, the glibc implementation did not set errno to EDOM when a domain error occurred.

SEE ALSO

cos(3), sin(3), tan(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1186 - Linux cli command Spreadsheet_WriteExcel_Chart_Columnpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_WriteExcel_Chart_Columnpm and provides detailed information about the command Spreadsheet_WriteExcel_Chart_Columnpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_WriteExcel_Chart_Columnpm.

NAME 🖥️ Spreadsheet_WriteExcel_Chart_Columnpm 🖥️

A writer class for Excel Column charts.

SYNOPSIS

To create a simple Excel file with a Column chart using Spreadsheet::WriteExcel:

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( chart.xls ); my $worksheet = $workbook->add_worksheet(); my $chart = $workbook->add_chart( type => column ); # Configure the chart. $chart->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, ); # Add the worksheet data the chart refers to. my $data = [ [ Category, 2, 3, 4, 5, 6, 7 ], [ Value, 1, 4, 5, 2, 1, 5 ], ]; $worksheet->write( A1, $data ); _ _END_ _

DESCRIPTION

This module implements Column charts for Spreadsheet::WriteExcel. The chart object is created via the Workbook add_chart() method:

my $chart = $workbook->add_chart( type => column );

Once the object is created it can be configured via the following methods that are common to all chart classes:

$chart->add_series(); $chart->set_x_axis(); $chart->set_y_axis(); $chart->set_title();

These methods are explained in detail in Spreadsheet::WriteExcel::Chart. Class specific methods or settings, if any, are explained below.

Column Chart Methods

There aren’t currently any column chart specific methods. See the TODO section of Spreadsheet::WriteExcel::Chart.

EXAMPLE

Here is a complete example that demonstrates most of the available features when creating a chart.

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( chart_column.xls ); my $worksheet = $workbook->add_worksheet(); my $bold = $workbook->add_format( bold => 1 ); # Add the worksheet data that the charts will refer to. my $headings = [ Number, Sample 1, Sample 2 ]; my $data = [ [ 2, 3, 4, 5, 6, 7 ], [ 1, 4, 5, 2, 1, 5 ], [ 3, 6, 7, 5, 4, 3 ], ]; $worksheet->write( A1, $headings, $bold ); $worksheet->write( A2, $data ); # Create a new chart object. In this case an embedded chart. my $chart = $workbook->add_chart( type => column, embedded => 1 ); # Configure the first series. (Sample 1) $chart->add_series( name => Sample 1, categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, ); # Configure the second series. (Sample 2) $chart->add_series( name => Sample 2, categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$C$2:$C$7, ); # Add a chart title and some axis labels. $chart->set_title ( name => Results of sample analysis ); $chart->set_x_axis( name => Test number ); $chart->set_y_axis( name => Sample length (cm) ); # Insert the chart into the worksheet (with an offset). $worksheet->insert_chart( D2, $chart, 25, 10 ); _ _END_ _

AUTHOR

John McNamara [email protected]

COPYRIGHT

Copyright MM-MMX, John McNamara.

All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1187 - Linux cli command Tk_Tracepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Tracepm and provides detailed information about the command Tk_Tracepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Tracepm.

NAME 🖥️ Tk_Tracepm 🖥️

emulate Tcl/Tk trace functions.

SYNOPSIS

use Tk::Trace $mw->traceVariable(\v, wru => [\update_meter, $scale]); %vinfo = $mw->traceVinfo(\v); print “Trace info : “, join(” “, @{$vinfo{-legible}}), " “; $mw->traceVdelete(\v);

DESCRIPTION

This class module emulates the Tcl/Tk trace family of commands by binding subroutines of your devising to Perl variables using simple Tie::Watch features.

Callback format is patterned after the Perl/Tk scheme: supply either a code reference, or, supply an array reference and pass the callback code reference in the first element of the array, followed by callback arguments.

User callbacks are passed these arguments:

$_[0] = undef for a scalar, index/key for array/hash $_[1] = variables current (read), new (write), final (undef) value $_[2] = operation (r, w, or u) $_[3 .. $#_] = optional user callback arguments

As a Trace user, you have an important responsibility when writing your callback, since you control the final value assigned to the variable. A typical callback might look like:

sub callback { my($index, $value, $op, @args) = @_; return if $op eq u; # …. code which uses $value … return $value; # variables final value }

Note that the callback’s return value becomes the variable’s final value, for either read or write traces.

For write operations, the variable is updated with its new value before the callback is invoked.

Multiple read, write and undef callbacks can be attached to a variable, which are invoked in reverse order of creation.

METHODS

$mw->traceVariable(varRef, op => callback);
varRef is a reference to the scalar, array or hash variable you wish to trace. op is the trace operation, and can be any combination of r for read, w for write, and u for undef. callback is a standard Perl/Tk callback, and is invoked, depending upon the value of op, whenever the variable is read, written, or destroyed.

%vinfo = $mw->traceVinfo(varRef);
Returns a hash detailing the internals of the Trace object, with these keys: %vinfo = ( -variable => varRef -debug => 0 -shadow => 1 -value => HELLO SCALAR -destroy => callback -fetch => callback -store => callback -legible => above data formatted as a list of string, for printing ); For array and hash Trace objects, the -value key is replaced with a -ptr key which is a reference to the parallel array or hash. Additionally, for an array or hash, there are key/value pairs for all the variable specific callbacks.

$mw->traceVdelete(\v);
Stop tracing the variable.

EXAMPLES

# Trace a Scales variable and move a meter in unison. use Tk; use Tk::widgets qw/Trace/; $pi = 3.1415926; $mw = MainWindow->new; $c = $mw->Canvas( qw/-width 200 -height 110 -bd 2 -relief sunken/ )->grid; $c->createLine( qw/100 100 10 100 -tag meter -arrow last -width 5/ ); $s = $mw->Scale( qw/-orient h -from 0 -to 100 -variable/ => \v )->grid; $mw->Label( -text => Slide Me for 5 Seconds )->grid; $mw->traceVariable( \v, w => [ \update_meter, $s ] ); $mw->after( 5000 => sub { print “Untrace time … “; %vinfo = $s->traceVinfo( \v ); print “Watch info : “, join(” “, @{$vinfo{-legible}}), " “; $c->traceVdelete( \v ); }); MainLoop; sub update_meter { my( $index, $value, $op, @args ) = @_; return if $op eq u; $min = $s->cget( -from ); $max = $s->cget( -to ); $pos = $value / abs( $max - $min ); $x = 100.0 - 90.0 * ( cos( $pos * $pi ) ); $y = 100.0 - 90.0 * ( sin( $pos * $pi ) ); $c->coords( qw/meter 100 100/, $x, $y ); return $value; } # Predictive text entry. use Tk; use Tk::widgets qw/ LabEntry Trace /; use strict; my @words = qw/radio television telephone turntable microphone/; my $mw = MainWindow->new; my $e = $mw->LabEntry( qw/ -label Thing -width 40 /, -labelPack => [ qw/ -side left / ], -textvariable => \my $thing, ); my $t = $mw->Text( qw/ -height 10 -width 50 / );; $t->pack( $e, qw/ -side top / ); $e->focus; $e->traceVariable( \thing, w, [ \trace_thing, $e, $t ] ); foreach my $k ( 1 .. 12 ) { $e->bind( “<F${k}>” => [ \ins, $t, Ev(K) ] ); } $e->bind( <Return> => sub { print “$thing “; $_[0]->delete( 0, end ); } ); MainLoop; sub trace_thing { my( $index, $value, $op, $e, $t ) = @_; return unless $value; $t->delete( qw/ 1.0 end / ); foreach my $w ( @words ) { if ( $w =~ /^$value/ ) { $t->insert( end, “$w " ); } } return $value; } # end trace_thing sub ins { my( $e, $t, $K ) = @_; my( $index ) = $K =~ /^F(\d+)$/; $e->delete( 0, end ); $e->insert( end, $t->get( “$index.0”, “$index.0 lineend” ) ); $t->delete( qw/ 1.0 end / ); } # end ins

HISTORY

[email protected], Lehigh University Computing Center, 2000/08/01 . Version 1.0, for Tk800.022. [email protected], Lehigh University Computing Center, 2003/09/22 . Version 1.1, for Tk804.025, add support for multiple traces of the same type on the same variable.

COPYRIGHT

Copyright (C) 2000 - 2003 Stephen O. Lidie. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1188 - Linux cli command XtChangeManagedSet

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtChangeManagedSet and provides detailed information about the command XtChangeManagedSet, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtChangeManagedSet.

NAME 🖥️ XtChangeManagedSet 🖥️

manage and unmanage children

SYNTAX

#include <X11/Intrinsic.h>

typedef Widget *WidgetList;

void XtManageChildren(WidgetList children, Cardinal num_children);

void XtManageChild(Widget child);

void XtUnmanageChildren(WidgetList children, Cardinal num_children);

void XtUnmanageChild(Widget child);

void XtChangeManagedSet(WidgetList unmanage_children, Cardinal num_unmanage_children, XtDoChangeProc do_change_proc, XtPointer client_data, WidgetList manage_children, Cardinal num_manage_children);

Boolean XtIsManaged(Widget widget);

ARGUMENTS

child
Specifies the child.

children
Specifies a list of child widgets.

num_children
Specifies the number of children.

widget
Specifies the widget.

manage_children
Specifies the list of widget children to add to the managed set.

num_manage_children
Specifies the number of entries in the manage_children list.

unmanage_children
Specifies the list of widget children to remove from the managed set.

num_unmanage_children
Specifies the number of entries in the unmanage_children list.

do_change_proc
Specifies the post unmanage, pre manage hook procedure to invoke.

client_data
Specifies the client data to be passed to the hook procedure.

DESCRIPTION

The XtManageChildren function performs the following:

  • Issues an error if the children do not all have the same parent or if the parent is not a subclass of compositeWidgetClass.

  • Returns immediately if the common parent is being destroyed; otherwise, for each unique child on the list, XtManageChildren ignores the child if it already is managed or is being destroyed and marks it if not.

  • If the parent is realized and after all children have been marked, it makes some of the newly managed children viewable:

    • Calls the change_managed routine of the widgets’ parent.

    • Calls XtRealizeWidget on each previously unmanaged child that is unrealized.

    • Maps each previously unmanaged child that has map_when_managed True.

Managing children is independent of the ordering of children and independent of creating and deleting children. The layout routine of the parent should consider children whose managed field is True and should ignore all other children. Note that some composite widgets, especially fixed boxes, call XtManageChild from their insert_child procedure.

If the parent widget is realized, its change_managed procedure is called to notify it that its set of managed children has changed. The parent can reposition and resize any of its children. It moves each child as needed by calling XtMoveWidget, which first updates the x and y fields and then calls XMoveWindow if the widget is realized.

The XtManageChild function constructs a WidgetList of length one and calls XtManageChildren.

The XtUnmanageChildren function performs the following:

  • Issues an error if the children do not all have the same parent or if the parent is not a subclass of compositeWidgetClass.

  • Returns immediately if the common parent is being destroyed; otherwise, for each unique child on the list, XtUnmanageChildren performs the following:

    • Ignores the child if it already is unmanaged or is being destroyed and marks it if not.

    • If the child is realized, it makes it nonvisible by unmapping it.

  • Calls the change_managed routine of the widgets’ parent after all children have been marked if the parent is realized.

XtUnmanageChildren does not destroy the children widgets. Removing widgets from a parent’s managed set is often a temporary banishment, and, some time later, you may manage the children again.

The XtUnmanageChild function constructs a widget list of length one and calls XtUnmanageChildren.

The XtChangeManagedSet function performs the following:

  • Issues an error if the widgets specified in the manage_children and the unmanage_children lists to no all have the same parent, or if that parent is not a subclass of compositeWidgetClass.

  • Returns immediately if the common parent is being destroyed.

  • If no CompositeClassExtension is defined, or a CompositeClassExtension is defined but with an allows_change_managed_set field with a value of False, and XtChangeManagedSet was invoked with a non-NULL do_change_proc procedure then XtChangeManagedSet performs the following:

    • Calls XtUnmanageChildren (unmanage_children, num_unmanage_children).

    • Calls the do_change_proc specified.

    • Calls XtManageChildren (manage_children, num_manage_children) and then returns immediately.

  • Otherwise, if a CompositeClassExtension is defined with an allows_change_managed_set field with a value of True, or if no CompositeClassExtension is defined, and XtChangeManagedSet was invoked with a NULL do_change_proc procedure, then the following is performed:

    • For each child on the unmanage_children list; if the child is already unmanaged or is being destroyed it is ignored, otherwise it is marked as being unmanaged and if it is realized it is made nonvisible by being unmapped.

    • If the do_change_proc procedure is non-NULL then it is invoked as specified.

    • For each child on the manage_children list; if the child is already managed or it is being destroyed it is ignored, otherwise it is marked as managed

  • If the parent is realized and after all children have been marked, the change_managed method of the parent is invoked and subsequently some of the newly managed children are made viewable by:

    • Calling XtRealizeWidget on each of the previously unmanaged child that is unrealized.

    • Mapping each previously unmanaged child that has map_when_managed True.

The XtIsManaged function returns True if the specified widget is of class RectObj or any subclass thereof and is managed, or False otherwise.

SEE ALSO

XtMapWidget(3), XtRealizeWidget(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1189 - Linux cli command j1

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command j1 and provides detailed information about the command j1, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the j1.

NAME 🖥️ j1 🖥️

Bessel functions of the first kind

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double j0(double x);
double j1(double x);
double jn(int n, double x);
float j0f(float x);
float j1f(float x);
float jnf(int n, float x);
long double j0l(long double x);
long double j1l(long double x);
long double jnl(int n, long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

j0(), j1(), jn():

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

j0f(), j0l(), j1f(), j1l(), jnf(), jnl():

    _XOPEN_SOURCE >= 600
        || (_ISOC99_SOURCE && _XOPEN_SOURCE)
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The j0() and j1() functions return Bessel functions of x of the first kind of orders 0 and 1, respectively. The jn() function returns the Bessel function of x of the first kind of order n.

The j0f(), j1f(), and jnf(), functions are versions that take and return float values. The j0l(), j1l(), and jnl() functions are versions that take and return long double values.

RETURN VALUE

On success, these functions return the appropriate Bessel value of the first kind for x.

If x is a NaN, a NaN is returned.

If x is too large in magnitude, or the result underflows, a range error occurs, and the return value is 0.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error: result underflow, or x is too large in magnitude
errno is set to ERANGE.

These functions do not raise exceptions for fetestexcept(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

j0(), j0f(), j0l()

Thread safetyMT-Safe

j1(), j1f(), j1l()

Thread safetyMT-Safe

jn(), jnf(), jnl()

Thread safetyMT-Safe

STANDARDS

j0()
j1()
jn()
POSIX.1-2008.

Others:
BSD.

HISTORY

j0()
j1()
jn()
SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008.

Others:
BSD.

BUGS

There are errors of up to 2e-16 in the values returned by j0(), j1(), and jn() for values of x between -8 and 8.

SEE ALSO

y0(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1190 - Linux cli command Moose_Spec_Rolepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Spec_Rolepm and provides detailed information about the command Moose_Spec_Rolepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Spec_Rolepm.

NAME 🖥️ Moose_Spec_Rolepm 🖥️

Formal spec for Role behavior

VERSION

version 2.2207

DESCRIPTION

NOTE: This document is currently incomplete.

Components of a Role

Excluded Roles
A role can have a list of excluded roles, these are basically roles that they shouldn’t be composed with. This is not just direct composition either, but also “inherited” composition. This feature was taken from the Fortress language and is really of most use when building a large set of role “building blocks” some of which should never be used together.

Attributes
A roles attributes are similar to those of a class, except that they are not actually applied. This means that methods that are generated by an attributes accessor will not be generated in the role, but only created once the role is applied to a class.

Methods
These are the methods defined within the role. Simple as that.

Required Methods
A role can require a consuming class (or role) to provide a given method. Failure to do so for classes is a fatal error, while for roles it simply passes on the method requirement to the consuming role.

Required Attributes
Just as a role can require methods, it can also require attributes. The requirement fulfilling attribute must implement at least as much as is required. That means, for instance, that if the role requires that the attribute be read-only, then it must at least have a reader and can also have a writer. It means that if the role requires that the attribute be an ArrayRef, then it must either be an ArrayRef or a subtype of an ArrayRef.

Overridden Methods
The override and super keywords are allowed in roles, but their behavior is different from that of its class counterparts. The super in a class refers directly to that class’s superclass, while the super in a role is deferred and only has meaning once the role is composed into a class. Once that composition occurs, super then refers to that class’s superclass. It is key to remember that roles do not have hierarchy, so they can never have a super role.

Method Modifiers
These are the before, around and after modifiers provided in Moose classes. The difference here is that the modifiers are not actually applied until the role is composed into a class (this is just like attributes and the override keyword).

Role Composition

Composing into a Class

Excluded Roles

Required Methods

Required Attributes

Attributes

Methods

Overridden methods

Method Modifiers (before, around, after)

Composing into a Instance

Composing into a Role

Excluded Roles

Required Methods

Required Attributes

Attributes

Methods

Overridden methods

Method Modifiers (before, around, after)

Role Summation

When multiple roles are added to another role (using the with @roles keyword) the roles are composed symmetrically. The product of the composition is a composite role (Moose::Meta::Role::Composite).

Excluded Roles

Required Methods

Required Attributes

Attributes

Attributes with the same name will conflict and are considered a unrecoverable error. No other aspect of the attribute is examined, it is enough that just the attribute names conflict. The reason for such early and harsh conflicts with attributes is because there is so much room for variance between two attributes that the problem quickly explodes and rules get very complex. It is my opinion that this complexity is not worth the trouble.

Methods
Methods with the same name will conflict, but no error is thrown, instead the method name is added to the list of required methods for the new composite role. To look at this in terms of set theory, each role can be said to have a set of methods. The symmetric difference of these two sets is the new set of methods for the composite role, while the intersection of these two sets are the conflicts. This can be illustrated like so: Role A has method set { a, b, c } Role B has method set { c, d, e } The composite role (A,B) has method set { a, b, d, e } conflict set { c }

Overridden methods
An overridden method can conflict in one of two ways. The first way is with another overridden method of the same name, and this is considered an unrecoverable error. This is an obvious error since you cannot override a method twice in the same class. The second way for conflict is for an overridden method and a regular method to have the same name. This is also an unrecoverable error since there is no way to combine these two, nor is it okay for both items to be composed into a single class at some point. The use of override in roles can be tricky, but if used carefully they can be a very powerful tool.

Method Modifiers (before, around, after)
Method modifiers are the only place where the ordering of role composition matters. This is due to the nature of method modifiers themselves. Since a method can have multiple method modifiers, these are just collected in order to be later applied to the class in that same order. In general, great care should be taken in using method modifiers in roles. The order sensitivity can possibly lead to subtle and difficult to find bugs if they are overused. As with all good things in life, moderation is the key.

Composition Edge Cases

This is a just a set of complex edge cases which can easily get confused. This attempts to clarify those cases and provide an explanation of what is going on in them.

Role Method Overriding
Many people want to “override” methods in roles they are consuming. This works fine for classes, since the local class method is favored over the role method. However in roles it is trickier, this is because conflicts result in neither method being chosen and the method being “required” instead. Here is an example of this (incorrect) type of overriding. package Role::Foo; use Moose::Role; sub foo { … } package Role::FooBar; use Moose::Role; with Role::Foo; sub foo { … } sub bar { … } Here the foo methods conflict and the Role::FooBar now requires a class or role consuming it to implement foo. This is very often not what the user wants. Now here is an example of the (correct) type of overriding, only it is not overriding at all, as is explained in the text below. package Role::Foo; use Moose::Role; sub foo { … } package Role::Bar; use Moose::Role; sub foo { … } sub bar { … } package Role::FooBar; use Moose::Role; with Role::Foo, Role::Bar; sub foo { … } This works because the combination of Role::Foo and Role::Bar produce a conflict with the foo method. This conflict results in the composite role (that was created by the combination of Role::Foo and Role::Bar using the with keyword) having a method requirement of foo. The Role::FooBar then fulfills this requirement. It is important to note that Role::FooBar is simply fulfilling the required foo method, and **NOT** overriding foo. This is an important distinction to make. Now here is another example of a (correct) type of overriding, this time using the excludes option. package Role::Foo; use Moose::Role; sub foo { … } package Role::FooBar; use Moose::Role; with Role::Foo => { -excludes => foo }; sub foo { … } sub bar { … } By specifically excluding the foo method during composition, we allow Role::FooBar to define its own version of foo.

SEE ALSO

Traits
Roles are based on Traits, which originated in the Smalltalk community.

<http://www.iam.unibe.ch/~scg/Research/Traits/>
This is the main site for the original Traits papers.

Class::Trait
I created this implementation of traits several years ago, after reading the papers linked above. (This module is now maintained by Ovid and I am no longer involved with it).

Roles
Since they are relatively new, and the Moose implementation is probably the most mature out there, roles don’t have much to link to. However, here is some bits worth looking at (mostly related to Perl 6)

<http://www.oreillynet.com/onlamp/blog/2006/08/roles_composable_units_of_obje.html>
This is chromatic’s take on roles, which is worth reading since he was/is one of the big proponents of them.

<http://svn.perl.org/perl6/doc/trunk/design/syn/S12.pod>
This is Synopsis 12, which is all about the Perl 6 Object System. Which, of course, includes roles.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1191 - Linux cli command wordexp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wordexp and provides detailed information about the command wordexp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wordexp.

NAME 🖥️ wordexp 🖥️

perform word expansion like a posix-shell

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wordexp.h>
int wordexp(const char *restrict s, wordexp_t *restrict p",int"flags);
void wordfree(wordexp_t *p);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

wordexp(), wordfree():

    _XOPEN_SOURCE

DESCRIPTION

The function wordexp() performs a shell-like expansion of the string s and returns the result in the structure pointed to by p. The data type wordexp_t is a structure that at least has the fields we_wordc, we_wordv, and we_offs. The field we_wordc is a size_t that gives the number of words in the expansion of s. The field we_wordv is a char ** that points to the array of words found. The field we_offs of type size_t is sometimes (depending on flags, see below) used to indicate the number of initial elements in the we_wordv array that should be filled with NULLs.

The function wordfree() frees the allocated memory again. More precisely, it does not free its argument, but it frees the array we_wordv and the strings that points to.

The string argument

Since the expansion is the same as the expansion by the shell (see sh(1)) of the parameters to a command, the string s must not contain characters that would be illegal in shell command parameters. In particular, there must not be any unescaped newline or |, &, ;, <, >, (, ), {, } characters outside a command substitution or parameter substitution context.

If the argument s contains a word that starts with an unquoted comment character #, then it is unspecified whether that word and all following words are ignored, or the # is treated as a non-comment character.

The expansion

The expansion done consists of the following stages: tilde expansion (replacing ~user by user’s home directory), variable substitution (replacing $FOO by the value of the environment variable FOO), command substitution (replacing $(command) or `command` by the output of command), arithmetic expansion, field splitting, wildcard expansion, quote removal.

The result of expansion of special parameters ($@, $*, $#, $?, $-, $$, $!, $0) is unspecified.

Field splitting is done using the environment variable $IFS. If it is not set, the field separators are space, tab, and newline.

The output array

The array we_wordv contains the words found, followed by a NULL.

The flags argument

The flag argument is a bitwise inclusive OR of the following values:

WRDE_APPEND
Append the words found to the array resulting from a previous call.

WRDE_DOOFFS
Insert we_offs initial NULLs in the array we_wordv. (These are not counted in the returned we_wordc.)

WRDE_NOCMD
Don’t do command substitution.

WRDE_REUSE
The argument p resulted from a previous call to wordexp(), and wordfree() was not called. Reuse the allocated storage.

WRDE_SHOWERR
Normally during command substitution stderr is redirected to /dev/null. This flag specifies that stderr is not to be redirected.

WRDE_UNDEF
Consider it an error if an undefined shell variable is expanded.

RETURN VALUE

On success, wordexp() returns 0. On failure, wordexp() returns one of the following nonzero values:

WRDE_BADCHAR
Illegal occurrence of newline or one of |, &, ;, <, >, (, ), {, }.

WRDE_BADVAL
An undefined shell variable was referenced, and the WRDE_UNDEF flag told us to consider this an error.

WRDE_CMDSUB
Command substitution requested, but the WRDE_NOCMD flag told us to consider this an error.

WRDE_NOSPACE
Out of memory.

WRDE_SYNTAX
Shell syntax error, such as unbalanced parentheses or unmatched quotes.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wordexp()

Thread safety

MT-Unsafe race:utent const:env env sig:ALRM timer locale

wordfree()

Thread safetyMT-Safe

In the above table, utent in race:utent signifies that if any of the functions setutent(3), getutent(3), or endutent(3) are used in parallel in different threads of a program, then data races could occur. wordexp() calls those functions, so we use race:utent to remind users.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001. glibc 2.1.

EXAMPLES

The output of the following example program is approximately that of “ls [a-c]*.c”.

#include <stdio.h>
#include <stdlib.h>
#include <wordexp.h>
int
main(void)
{
    wordexp_t p;
    char **w;
    wordexp("[a-c]*.c", &p, 0);
    w = p.we_wordv;
    for (size_t i = 0; i < p.we_wordc; i++)
        printf("%s

“, w[i]); wordfree(&p); exit(EXIT_SUCCESS); }

SEE ALSO

fnmatch(3), glob(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1192 - Linux cli command Image_ExifTool_WriteCanonRawpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_WriteCanonRawpm and provides detailed information about the command Image_ExifTool_WriteCanonRawpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_WriteCanonRawpm.

NAME 🖥️ Image_ExifTool_WriteCanonRawpm 🖥️

Write Canon RAW (CRW and CR2) information

SYNOPSIS

These routines are autoloaded by Image::ExifTool::CanonRaw.

DESCRIPTION

This file contains routines used by ExifTool to write Canon CRW and CR2 files and metadata.

NOTES

The CRW format is a pleasure to work with. All pointer offsets are relative to the start of the data for each directory. If EXIF/TIFF had implemented pointers in this way, it would be MUCH easier to read and write TIFF and JPEG files, and would lead to far fewer problems with corrupted metadata.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Image::ExifTool::CanonRaw (3pm), Image::ExifTool (3pm), <https://exiftool.org/canon_raw.html>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1193 - Linux cli command Text_CSV_XSpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Text_CSV_XSpm and provides detailed information about the command Text_CSV_XSpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Text_CSV_XSpm.

NAME 🖥️ Text_CSV_XSpm 🖥️

comma-separated values manipulation routines

SYNOPSIS

# Functional interface use Text::CSV_XS qw( csv ); # Read whole file in memory my $aoa = csv (in => “data.csv”); # as array of array my $aoh = csv (in => “data.csv”, headers => “auto”); # as array of hash # Write array of arrays as csv file csv (in => $aoa, out => “file.csv”, sep_char => “;”); # Only show lines where “code” is odd csv (in => “data.csv”, filter => { code => sub { $_ % 2 }}); # Object interface use Text::CSV_XS; my @rows; # Read/parse CSV my $csv = Text::CSV_XS->new ({ binary => 1, auto_diag => 1 }); open my $fh, “<:encoding(utf8)”, “test.csv” or die “test.csv: $!”; while (my $row = $csv->getline ($fh)) { $row->[2] =~ m/pattern/ or next; # 3rd field should match push @rows, $row; } close $fh; # and write as CSV open $fh, “>:encoding(utf8)”, “new.csv” or die “new.csv: $!”; $csv->say ($fh, $_) for @rows; close $fh or die “new.csv: $!”;

DESCRIPTION

Text::CSV_XS provides facilities for the composition and decomposition of comma-separated values. An instance of the Text::CSV_XS class will combine fields into a CSV string and parse a CSV string into fields.

The module accepts either strings or files as input and support the use of user-specified characters for delimiters, separators, and escapes.

Embedded newlines

Important Note: The default behavior is to accept only ASCII characters in the range from 0x20 (space) to 0x7E (tilde). This means that the fields can not contain newlines. If your data contains newlines embedded in fields, or characters above 0x7E (tilde), or binary data, you must set binary => 1 in the call to “new”. To cover the widest range of parsing options, you will always want to set binary.

But you still have the problem that you have to pass a correct line to the “parse” method, which is more complicated from the usual point of usage:

my $csv = Text::CSV_XS->new ({ binary => 1, eol => $/ }); while (<>) { # WRONG! $csv->parse ($_); my @fields = $csv->fields (); }

this will break, as the while might read broken lines: it does not care about the quoting. If you need to support embedded newlines, the way to go is to not pass eol in the parser (it accepts , , and by default) and then

my $csv = Text::CSV_XS->new ({ binary => 1 }); open my $fh, “<”, $file or die “$file: $!”; while (my $row = $csv->getline ($fh)) { my @fields = @$row; }

The old(er) way of using global file handles is still supported

while (my $row = $csv->getline (*ARGV)) { … }

Unicode

Unicode is only tested to work with perl-5.8.2 and up.

See also “BOM”.

The simplest way to ensure the correct encoding is used for in- and output is by either setting layers on the filehandles, or setting the “encoding” argument for “csv”.

open my $fh, “<:encoding(UTF-8)”, “in.csv” or die “in.csv: $!”; or my $aoa = csv (in => “in.csv”, encoding => “UTF-8”); open my $fh, “>:encoding(UTF-8)”, “out.csv” or die “out.csv: $!”; or csv (in => $aoa, out => “out.csv”, encoding => “UTF-8”);

On parsing (both for “getline” and “parse”), if the source is marked being UTF8, then all fields that are marked binary will also be marked UTF8.

On combining (“print” and “combine”): if any of the combining fields was marked UTF8, the resulting string will be marked as UTF8. Note however that all fields before the first field marked UTF8 and contained 8-bit characters that were not upgraded to UTF8, these will be bytes in the resulting string too, possibly causing unexpected errors. If you pass data of different encoding, or you don’t know if there is different encoding, force it to be upgraded before you pass them on:

$csv->print ($fh, [ map { utf8::upgrade (my $x = $_); $x } @data ]);

For complete control over encoding, please use Text::CSV::Encoded:

use Text::CSV::Encoded; my $csv = Text::CSV::Encoded->new ({ encoding_in => “iso-8859-1”, # the encoding comes into Perl encoding_out => “cp1252”, # the encoding comes out of Perl }); $csv = Text::CSV::Encoded->new ({ encoding => “utf8” }); # combine () and print () accept *literally* utf8 encoded data # parse () and getline () return *literally* utf8 encoded data $csv = Text::CSV::Encoded->new ({ encoding => undef }); # default # combine () and print () accept UTF8 marked data # parse () and getline () return UTF8 marked data

BOM

BOM (or Byte Order Mark) handling is available only inside the “header” method. This method supports the following encodings: utf-8, utf-1, utf-32be, utf-32le, utf-16be, utf-16le, utf-ebcdic, scsu, bocu-1, and gb-18030. See Wikipedia <https://en.wikipedia.org/wiki/Byte_order_mark>.

If a file has a BOM, the easiest way to deal with that is

my $aoh = csv (in => $file, detect_bom => 1);

All records will be encoded based on the detected BOM.

This implies a call to the “header” method, which defaults to also set the “column_names”. So this is not the same as

my $aoh = csv (in => $file, headers => “auto”);

which only reads the first record to set “column_names” but ignores any meaning of possible present BOM.

SPECIFICATION

While no formal specification for CSV exists, RFC 4180 <https://datatracker.ietf.org/doc/html/rfc4180> (1) describes the common format and establishes text/csv as the MIME type registered with the IANA. RFC 7111 <https://datatracker.ietf.org/doc/html/rfc7111> (2) adds fragments to CSV.

Many informal documents exist that describe the CSV format. “How To: The Comma Separated Value (CSV) File Format” <http://creativyst.com/Doc/Articles/CSV/CSV01.shtml> (3) provides an overview of the CSV format in the most widely used applications and explains how it can best be used and supported.

1) https://datatracker.ietf.org/doc/html/rfc4180 2) https://datatracker.ietf.org/doc/html/rfc7111 3) http://creativyst.com/Doc/Articles/CSV/CSV01.shtml

The basic rules are as follows:

CSV is a delimited data format that has fields/columns separated by the comma character and records/rows separated by newlines. Fields that contain a special character (comma, newline, or double quote), must be enclosed in double quotes. However, if a line contains a single entry that is the empty string, it may be enclosed in double quotes. If a field’s value contains a double quote character it is escaped by placing another double quote character next to it. The CSV file format does not require a specific character encoding, byte order, or line terminator format.

  • Each record is a single line ended by a line feed (ASCII/LF=0x0A) or a carriage return and line feed pair (ASCII/CRLF=0x0D 0x0A), however, line-breaks may be embedded.

  • Fields are separated by commas.

  • Allowable characters within a CSV field include 0x09 (TAB) and the inclusive range of 0x20 (space) through 0x7E (tilde). In binary mode all characters are accepted, at least in quoted fields.

  • A field within CSV must be surrounded by double-quotes to contain a separator character (comma).

Though this is the most clear and restrictive definition, Text::CSV_XS is way more liberal than this, and allows extension:

  • Line termination by a single carriage return is accepted by default

  • The separation-, quote-, and escape character(s) can be any ASCII character in the range from 0x20 (space) to 0x7E (tilde). Characters outside this range may or may not work as expected. Multibyte characters, like UTF U+060C (ARABIC COMMA), U+FF0C (FULLWIDTH COMMA), U+241B (SYMBOL FOR ESCAPE), U+2424 (SYMBOL FOR NEWLINE), U+FF02 (FULLWIDTH QUOTATION MARK), and U+201C (LEFT DOUBLE QUOTATION MARK) (to give some examples of what might look promising) work for newer versions of perl for sep_char, and quote_char but not for escape_char. If you use perl-5.8.2 or higher these three attributes are utf8-decoded, to increase the likelihood of success. This way U+00FE will be allowed as a quote character.

  • A field in CSV must be surrounded by double-quotes to make an embedded double-quote, represented by a pair of consecutive double-quotes, valid. In binary mode you may additionally use the sequence "0 for representation of a NULL byte. Using 0x00 in binary mode is just as valid.

  • Several violations of the above specification may be lifted by passing some options as attributes to the object constructor.

METHODS

version

(Class method) Returns the current module version.

new

(Class method) Returns a new instance of class Text::CSV_XS. The attributes are described by the (optional) hash ref \%attr.

my $csv = Text::CSV_XS->new ({ attributes … });

The following attributes are available:

eol

my $csv = Text::CSV_XS->new ({ eol => $/ }); $csv->eol (undef); my $eol = $csv->eol;

The end-of-line string to add to rows for “print” or the record separator for “getline”.

When not passed in a parser instance, the default behavior is to accept , , and , so it is probably safer to not specify eol at all. Passing undef or the empty string behave the same.

When not passed in a generating instance, records are not terminated at all, so it is probably wise to pass something you expect. A safe choice for eol on output is either $/ or .

Common values for eol are " " ( or Line Feed), " " ( or Carriage Return, Line Feed), and " " ( or Carriage Return). The eol attribute cannot exceed 7 (ASCII) characters.

If both $/ and eol equal " ", parsing lines that end on only a Carriage Return without Line Feed, will be “parse"d correct.

sep_char

my $csv = Text::CSV_XS->new ({ sep_char => “;” }); $csv->sep_char (”;"); my $c = $csv->sep_char;

The char used to separate fields, by default a comma. (,). Limited to a single-byte character, usually in the range from 0x20 (space) to 0x7E (tilde). When longer sequences are required, use sep.

The separation character can not be equal to the quote character or to the escape character.

See also “CAVEATS”

sep

my $csv = Text::CSV_XS->new ({ sep => “\N{FULLWIDTH COMMA}” }); $csv->sep (";"); my $sep = $csv->sep;

The chars used to separate fields, by default undefined. Limited to 8 bytes.

When set, overrules sep_char. If its length is one byte it acts as an alias to sep_char.

See also “CAVEATS”

quote_char

my $csv = Text::CSV_XS->new ({ quote_char => "" }); $csv->quote_char (undef); my $c = $csv->quote_char;

The character to quote fields containing blanks or binary data, by default the double quote character ("). A value of undef suppresses quote chars (for simple cases only). Limited to a single-byte character, usually in the range from 0x20 (space) to 0x7E (tilde). When longer sequences are required, use quote.

quote_char can not be equal to sep_char.

quote

my $csv = Text::CSV_XS->new ({ quote => “\N{FULLWIDTH QUOTATION MARK}” }); $csv->quote (""); my $quote = $csv->quote;

The chars used to quote fields, by default undefined. Limited to 8 bytes.

When set, overrules quote_char. If its length is one byte it acts as an alias to quote_char.

This method does not support undef. Use quote_char to disable quotation.

See also “CAVEATS”

escape_char

my $csv = Text::CSV_XS->new ({ escape_char => “" }); $csv->escape_char (”:"); my $c = $csv->escape_char;

The character to escape certain characters inside quoted fields. This is limited to a single-byte character, usually in the range from 0x20 (space) to 0x7E (tilde).

The escape_char defaults to being the double-quote mark ("). In other words the same as the default quote_char. This means that doubling the quote mark in a field escapes it:

“foo”,“bar”,“Escape ““quote mark”” with two ““quote marks”””,“baz”

If you change the quote_char without changing the escape_char, the escape_char will still be the double-quote ("). If instead you want to escape the quote_char by doubling it you will need to also change the escape_char to be the same as what you have changed the quote_char to.

Setting escape_char to undef or "" will completely disable escapes and is greatly discouraged. This will also disable escape_null.

The escape character can not be equal to the separation character.

binary

my $csv = Text::CSV_XS->new ({ binary => 1 }); $csv->binary (0); my $f = $csv->binary;

If this attribute is 1, you may use binary characters in quoted fields, including line feeds, carriage returns and NULL bytes. (The latter could be escaped as "0.) By default this feature is off.

If a string is marked UTF8, binary will be turned on automatically when binary characters other than CR and NL are encountered. Note that a simple string like "\x{00a0}" might still be binary, but not marked UTF8, so setting { binary => 1 } is still a wise option.

strict

my $csv = Text::CSV_XS->new ({ strict => 1 }); $csv->strict (0); my $f = $csv->strict;

If this attribute is set to 1, any row that parses to a different number of fields than the previous row will cause the parser to throw error 2014.

Empty rows or rows that result in no fields (like comment lines) are exempt from these checks.

skip_empty_rows

my $csv = Text::CSV_XS->new ({ skip_empty_rows => 1 }); $csv->skip_empty_rows (“eof”); my $f = $csv->skip_empty_rows;

This attribute defines the behavior for empty rows: an “eol” immediately following the start of line. Default behavior is to return one single empty field.

This attribute is only used in parsing. This attribute is ineffective when using “parse” and “fields”.

Possible values for this attribute are

0 | undef
my $csv = Text::CSV_XS->new ({ skip_empty_rows => 0 }); $csv->skip_empty_rows (undef); No special action is taken. The result will be one single empty field.

1 | “skip”
my $csv = Text::CSV_XS->new ({ skip_empty_rows => 1 }); $csv->skip_empty_rows (“skip”); The row will be skipped.

2 | “eof” | “stop”
my $csv = Text::CSV_XS->new ({ skip_empty_rows => 2 }); $csv->skip_empty_rows (“eof”); The parsing will stop as if an “eof” was detected.

3 | “die”
my $csv = Text::CSV_XS->new ({ skip_empty_rows => 3 }); $csv->skip_empty_rows (“die”); The parsing will stop. The internal error code will be set to 2015 and the parser will die.

4 | “croak”
my $csv = Text::CSV_XS->new ({ skip_empty_rows => 4 }); $csv->skip_empty_rows (“croak”); The parsing will stop. The internal error code will be set to 2015 and the parser will croak.

5 | “error”
my $csv = Text::CSV_XS->new ({ skip_empty_rows => 5 }); $csv->skip_empty_rows (“error”); The parsing will fail. The internal error code will be set to 2015.

callback
my $csv = Text::CSV_XS->new ({ skip_empty_rows => sub { [] } }); $csv->skip_empty_rows (sub { [ 42, $., undef, “empty” ] }); The callback is invoked and its result used instead. If you want the parse to stop after the callback, make sure to return a false value. The returned value from the callback should be an array-ref. Any other type will cause the parse to stop, so these are equivalent in behavior: csv (in => $fh, skip_empty_rows => “stop”); csv (in => $fh. skip_empty_rows => sub { 0; });

Without arguments, the current value is returned: 0, 1, eof, die, croak or the callback.

formula_handling

Alias for “formula”

formula

my $csv = Text::CSV_XS->new ({ formula => “none” }); $csv->formula (“none”); my $f = $csv->formula;

This defines the behavior of fields containing formulas. As formulas are considered dangerous in spreadsheets, this attribute can define an optional action to be taken if a field starts with an equal sign (=).

For purpose of code-readability, this can also be written as

my $csv = Text::CSV_XS->new ({ formula_handling => “none” }); $csv->formula_handling (“none”); my $f = $csv->formula_handling;

Possible values for this attribute are

none
Take no specific action. This is the default. $csv->formula (“none”);

die
Cause the process to die whenever a leading = is encountered. $csv->formula (“die”);

croak
Cause the process to croak whenever a leading = is encountered. (See Carp) $csv->formula (“croak”);

diag
Report position and content of the field whenever a leading = is found. The value of the field is unchanged. $csv->formula (“diag”);

empty
Replace the content of fields that start with a = with the empty string. $csv->formula (“empty”); $csv->formula ("");

undef
Replace the content of fields that start with a = with undef. $csv->formula (“undef”); $csv->formula (undef);

a callback
Modify the content of fields that start with a = with the return-value of the callback. The original content of the field is available inside the callback as $_; # Replace all formulas with 42 $csv->formula (sub { 42; }); # same as $csv->formula (“empty”) but slower $csv->formula (sub { "" }); # Allow =4+12 $csv->formula (sub { s/^=(\d+\d+)$/$1/eer }); # Allow more complex calculations $csv->formula (sub { eval { s{^=([-+*/0-9()]+)$}{$1}ee }; $_ });

All other values will give a warning and then fallback to diag.

decode_utf8

my $csv = Text::CSV_XS->new ({ decode_utf8 => 1 }); $csv->decode_utf8 (0); my $f = $csv->decode_utf8;

This attributes defaults to TRUE.

While parsing, fields that are valid UTF-8, are automatically set to be UTF-8, so that

$csv->parse (“Ĩ “);

results in

PV("\304\250"�) [UTF8 “\x{128}”]

Sometimes it might not be a desired action. To prevent those upgrades, set this attribute to false, and the result will be

PV("\304\250"�)

auto_diag

my $csv = Text::CSV_XS->new ({ auto_diag => 1 }); $csv->auto_diag (2); my $l = $csv->auto_diag;

Set this attribute to a number between 1 and 9 causes “error_diag” to be automatically called in void context upon errors.

In case of error 2012 - EOF, this call will be void.

If auto_diag is set to a numeric value greater than 1, it will die on errors instead of warn. If set to anything unrecognized, it will be silently ignored.

Future extensions to this feature will include more reliable auto-detection of autodie being active in the scope of which the error occurred which will increment the value of auto_diag with 1 the moment the error is detected.

diag_verbose

my $csv = Text::CSV_XS->new ({ diag_verbose => 1 }); $csv->diag_verbose (2); my $l = $csv->diag_verbose;

Set the verbosity of the output triggered by auto_diag. Currently only adds the current input-record-number (if known) to the diagnostic output with an indication of the position of the error.

blank_is_undef

my $csv = Text::CSV_XS->new ({ blank_is_undef => 1 }); $csv->blank_is_undef (0); my $f = $csv->blank_is_undef;

Under normal circumstances, CSV data makes no distinction between quoted- and unquoted empty fields. These both end up in an empty string field once read, thus

1,””,," “,2

is read as

(“1”, “”, “”, " “, “2”)

When writing CSV files with either always_quote or quote_empty set, the unquoted empty field is the result of an undefined value. To enable this distinction when reading CSV data, the blank_is_undef attribute will cause unquoted empty fields to be set to undef, causing the above to be parsed as

(“1”, “”, undef, " “, “2”)

Note that this is specifically important when loading CSV fields into a database that allows NULL values, as the perl equivalent for NULL is undef in DBI land.

empty_is_undef

my $csv = Text::CSV_XS->new ({ empty_is_undef => 1 }); $csv->empty_is_undef (0); my $f = $csv->empty_is_undef;

Going one step further than blank_is_undef, this attribute converts all empty fields to undef, so

1,””,,” “,2

is read as

(1, undef, undef, " “, 2)

Note that this affects only fields that are originally empty, not fields that are empty after stripping allowed whitespace. YMMV.

allow_whitespace

my $csv = Text::CSV_XS->new ({ allow_whitespace => 1 }); $csv->allow_whitespace (0); my $f = $csv->allow_whitespace;

When this option is set to true, the whitespace (TAB’s and SPACE’s) surrounding the separation character is removed when parsing. If either TAB or SPACE is one of the three characters sep_char, quote_char, or escape_char it will not be considered whitespace.

Now lines like:

1 , “foo” , bar , 3 , zapp

are parsed as valid CSV, even though it violates the CSV specs.

Note that all whitespace is stripped from both start and end of each field. That would make it more than a feature to enable parsing bad CSV lines, as

1, 2.0, 3, ape , monkey

will now be parsed as

(“1”, “2.0”, “3”, “ape”, “monkey”)

even if the original line was perfectly acceptable CSV.

allow_loose_quotes

my $csv = Text::CSV_XS->new ({ allow_loose_quotes => 1 }); $csv->allow_loose_quotes (0); my $f = $csv->allow_loose_quotes;

By default, parsing unquoted fields containing quote_char characters like

1,foo “bar” baz,42

would result in parse error 2034. Though it is still bad practice to allow this format, we cannot help the fact that some vendors make their applications spit out lines styled this way.

If there is really bad CSV data, like

1,“foo “bar” baz”,42

or

1,““foo bar baz”",42

there is a way to get this data-line parsed and leave the quotes inside the quoted field as-is. This can be achieved by setting allow_loose_quotes AND making sure that the escape_char is not equal to quote_char.

allow_loose_escapes

my $csv = Text::CSV_XS->new ({ allow_loose_escapes => 1 }); $csv->allow_loose_escapes (0); my $f = $csv->allow_loose_escapes;

Parsing fields that have escape_char characters that escape characters that do not need to be escaped, like:

my $csv = Text::CSV_XS->new ({ escape_char => “" }); $csv->parse (qq{1,“my bar\s”,baz,42});

would result in parse error 2025. Though it is bad practice to allow this format, this attribute enables you to treat all escape character sequences equal.

allow_unquoted_escape

my $csv = Text::CSV_XS->new ({ allow_unquoted_escape => 1 }); $csv->allow_unquoted_escape (0); my $f = $csv->allow_unquoted_escape;

A backward compatibility issue where escape_char differs from quote_char prevents escape_char to be in the first position of a field. If quote_char is equal to the default " and escape_char is set to \, this would be illegal:

1,�,2

Setting this attribute to 1 might help to overcome issues with backward compatibility and allow this style.

always_quote

my $csv = Text::CSV_XS->new ({ always_quote => 1 }); $csv->always_quote (0); my $f = $csv->always_quote;

By default the generated fields are quoted only if they need to be. For example, if they contain the separator character. If you set this attribute to 1 then all defined fields will be quoted. (undef fields are not quoted, see “blank_is_undef”). This makes it quite often easier to handle exported data in external applications. (Poor creatures who are better to use Text::CSV_XS. :)

quote_space

my $csv = Text::CSV_XS->new ({ quote_space => 1 }); $csv->quote_space (0); my $f = $csv->quote_space;

By default, a space in a field would trigger quotation. As no rule exists this to be forced in CSV, nor any for the opposite, the default is true for safety. You can exclude the space from this trigger by setting this attribute to 0.

quote_empty

my $csv = Text::CSV_XS->new ({ quote_empty => 1 }); $csv->quote_empty (0); my $f = $csv->quote_empty;

By default the generated fields are quoted only if they need to be. An empty (defined) field does not need quotation. If you set this attribute to 1 then empty defined fields will be quoted. (undef fields are not quoted, see “blank_is_undef”). See also always_quote.

quote_binary

my $csv = Text::CSV_XS->new ({ quote_binary => 1 }); $csv->quote_binary (0); my $f = $csv->quote_binary;

By default, all “unsafe” bytes inside a string cause the combined field to be quoted. By setting this attribute to 0, you can disable that trigger for bytes >= 0x7F.

escape_null

my $csv = Text::CSV_XS->new ({ escape_null => 1 }); $csv->escape_null (0); my $f = $csv->escape_null;

By default, a NULL byte in a field would be escaped. This option enables you to treat the NULL byte as a simple binary character in binary mode (the { binary => 1 } is set). The default is true. You can prevent NULL escapes by setting this attribute to 0.

When the escape_char attribute is set to undefined, this attribute will be set to false.

The default setting will encode “=�=” as

“=“0=”

With escape_null set, this will result in

“=�=”

The default when using the csv function is false.

For backward compatibility reasons, the deprecated old name quote_null is still recognized.

keep_meta_info

my $csv = Text::CSV_XS->new ({ keep_meta_info => 1 }); $csv->keep_meta_info (0); my $f = $csv->keep_meta_info;

By default, the parsing of input records is as simple and fast as possible. However, some parsing information - like quotation of the original field - is lost in that process. Setting this flag to true enables retrieving that information after parsing with the methods “meta_info”, “is_quoted”, and “is_binary” described below. Default is false for performance.

If you set this attribute to a value greater than 9, then you can control output quotation style like it was used in the input of the the last parsed record (unless quotation was added because of other reasons).

my $csv = Text::CSV_XS->new ({ binary => 1, keep_meta_info => 1, quote_space => 0, }); my $row = $csv->parse (q{1,,””, ,” “,f,“g”,“h"“h”,help,“help”}); $csv->print (*STDOUT, \row); # 1,,, , ,f,g,“h"“h”,help,help $csv->keep_meta_info (11); $csv->print (*STDOUT, \row); # 1,,””, ,” “,f,“g”,“h"“h”,help,“help”

undef_str

my $csv = Text::CSV_XS->new ({ undef_str => “\N” }); $csv->undef_str (undef); my $s = $csv->undef_str;

This attribute optionally defines the output of undefined fields. The value passed is not changed at all, so if it needs quotation, the quotation needs to be included in the value of the attribute. Use with caution, as passing a value like ",",,,,""" will for sure mess up your output. The default for this attribute is undef, meaning no special treatment.

This attribute is useful when exporting CSV data to be imported in custom loaders, like for MySQL, that recognize special sequences for NULL data.

This attribute has no meaning when parsing CSV data.

comment_str

my $csv = Text::CSV_XS->new ({ comment_str => “#” }); $csv->comment_str (undef); my $s = $csv->comment_str;

This attribute optionally defines a string to be recognized as comment. If this attribute is defined, all lines starting with this sequence will not be parsed as CSV but skipped as comment.

This attribute has no meaning when generating CSV.

Comment strings that start with any of the special characters/sequences are not supported (so it cannot start with any of “sep_char”, “quote_char”, “escape_char”, “sep”, “quote”, or “eol”).

For convenience, comment is an alias for comment_str.

verbatim

my $csv = Text::CSV_XS->new ({ verbatim => 1 }); $csv->verbatim (0); my $f = $csv->verbatim;

This is a quite controversial attribute to set, but makes some hard things possible.

The rationale behind this attribute is to tell the parser that the normally special characters newline (NL) and Carriage Return (CR) will not be special when this flag is set, and be dealt with as being ordinary binary characters. This will ease working with data with embedded newlines.

When verbatim is used with “getline”, “getline” auto-chomp’s every line.

Imagine a file format like

M^^Hans^Janssen^Klas 2 2A^Ja^11-06-2007#

where, the line ending is a very specific "# ", and the sep_char is a ^ (caret). None of the fields is quoted, but embedded binary data is likely to be present. With the specific line ending, this should not be too hard to detect.

By default, Text::CSV_XS’ parse function is instructed to only know about " " and " " to be legal line endings, and so has to deal with the embedded newline as a real end-of-line, so it can scan the next line if binary is true, and the newline is inside a quoted field. With this option, we tell “parse” to parse the line as if " " is just nothing more than a binary character.

For “parse” this means that the parser has no more idea about line ending and “getline” chomps line endings on reading.

types

A set of column types; the attribute is immediately passed to the “types” method.

callbacks

See the “Callbacks” section below.

accessors

To sum it up,

$csv = Text::CSV_XS->new ();

is equivalent to

$csv = Text::CSV_XS->new ({ eol => undef, # , , or sep_char => ,, sep => undef, quote_char => “, quote => undef, escape_char => “, binary => 0, decode_utf8 => 1, auto_diag => 0, diag_verbose => 0, blank_is_undef => 0, empty_is_undef => 0, allow_whitespace => 0, allow_loose_quotes => 0, allow_loose_escapes => 0, allow_unquoted_escape => 0, always_quote => 0, quote_empty => 0, quote_space => 1, escape_null => 1, quote_binary => 1, keep_meta_info => 0, strict => 0, skip_empty_rows => 0, formula => 0, verbatim => 0, undef_str => undef, comment_str => undef, types => undef, callbacks => undef, });

For all of the above mentioned flags, an accessor method is available where you can inquire the current value, or change the value

my $quote = $csv->quote_char; $csv->binary (1);

It is not wise to change these settings halfway through writing CSV data to a stream. If however you want to create a new stream using the available CSV object, there is no harm in changing them.

If the “new” constructor call fails, it returns undef, and makes the fail reason available through the “error_diag” method.

$csv = Text::CSV_XS->new ({ ecs_char => 1 }) or die “".Text::CSV_XS->error_diag ();

“error_diag” will return a string like

“INI - Unknown attribute ecs_char”

known_attributes

@attr = Text::CSV_XS->known_attributes; @attr = Text::CSV_XS::known_attributes; @attr = $csv->known_attributes;

This method will return an ordered list of all the supported attributes as described above. This can be useful for knowing what attributes are valid in classes that use or extend Text::CSV_XS.

print

$status = $csv->print ($fh, $colref);

Similar to “combine” + “string” + “print”, but much more efficient. It expects an array ref as input (not an array!) and the resulting string is not really created, but immediately written to the $fh object, typically an IO handle or any other object that offers a “print” method.

For performance reasons print does not create a result string, so all “string”, “status”, “fields”, and “error_input” methods will return undefined information after executing this method.

If $colref is undef (explicit, not through a variable argument) and “bind_columns” was used to specify fields to be printed, it is possible to make performance improvements, as otherwise data would have to be copied as arguments to the method call:

$csv->bind_columns ($foo, $bar)); $status = $csv->print ($fh, undef);

A short benchmark

my @data = (“aa” .. “zz”); $csv->bind_columns (@data)); $csv->print ($fh, [ @data ]); # 11800 recs/sec $csv->print ($fh, \data ); # 57600 recs/sec $csv->print ($fh, undef ); # 48500 recs/sec

say

$status = $csv->say ($fh, $colref);

Like print, but eol defaults to $\.

$csv->print_hr ($fh, $ref);

Provides an easy way to print a $ref (as fetched with “getline_hr”) provided the column names are set with “column_names”.

It is just a wrapper method with basic parameter checks over

$csv->print ($fh, [ map { $ref->{$_} } $csv->column_names ]);

combine

$status = $csv->combine (@fields);

This method constructs a CSV record from @fields, returning success or failure. Failure can result from lack of arguments or an argument that contains an invalid character. Upon success, “string” can be called to retrieve the resultant CSV string. Upon failure, the value returned by “string” is undefined and “error_input” could be called to retrieve the invalid argument.

string

$line = $csv->string ();

This method returns the input to “parse” or the resultant CSV string of “combine”, whichever was called more recently.

getline

$colref = $csv->getline ($fh);

This is the counterpart to “print”, as “parse” is the counterpart to “combine”: it parses a row from the $fh handle using the “getline” method associated with $fh and parses this row into an array ref. This array ref is returned by the function or undef for failure. When $fh does not support getline, you are likely to hit errors.

When fields are bound with “bind_columns” the return value is a reference to an empty list.

The “string”, “fields”, and “status” methods are meaningless again.

getline_all

$arrayref = $csv->getline_all ($fh); $arrayref = $csv->getline_all ($fh, $offset); $arrayref = $csv->getline_all ($fh, $offset, $length);

This will return a reference to a list of getline ($fh) results. In this call, keep_meta_info is disabled. If $offset is negative, as with splice, only the last abs ($offset) records of $fh are taken into consideration. Parameters $offset and $length are expected to be integers. Non-integer values are interpreted as integer without check.

Given a CSV file with 10 lines:

lines call —– ——————————————————— 0..9 $csv->getline_all ($fh) # all 0..9 $csv->getline_all ($fh, 0) # all 8..9 $csv->getline_all ($fh, 8) # start at 8 - $csv->getline_all ($fh, 0, 0) # start at 0 first 0 rows 0..4 $csv->getline_all ($fh, 0, 5) # start at 0 first 5 rows 4..5 $csv->getline_all ($fh, 4, 2) # start at 4 first 2 rows 8..9 $csv->getline_all ($fh, -2) # last 2 rows 6..7 $csv->getline_all ($fh, -4, 2) # first 2 of last 4 rows

getline_hr

The “getline_hr” and “column_names” methods work together to allow you to have rows returned as hashrefs. You must call “column_names” first to declare your column names.

$csv->column_names (qw( code name price description )); $hr = $csv->getline_hr ($fh); print “Price for $hr->{name} is $hr->{price} EUR “;

“getline_hr” will croak if called before “column_names”.

Note that “getline_hr” creates a hashref for every row and will be much slower than the combined use of “bind_columns” and “getline” but still offering the same easy to use hashref inside the loop:

my @cols = @{$csv->getline ($fh)}; $csv->column_names (@cols); while (my $row = $csv->getline_hr ($fh)) { print $row->{price}; }

Could easily be rewritten to the much faster:

my @cols = @{$csv->getline ($fh)}; my $row = {}; $csv->bind_columns ({$row}{@cols}); while ($csv->getline ($fh)) { print $row->{price}; }

Your mileage may vary for the size of the data and the number of rows. With perl-5.14.2 the comparison for a 100_000 line file with 14 columns:

Rate hashrefs getlines hashrefs 1.00/s – -76% getlines 4.15/s 313% –

getline_hr_all

$arrayref = $csv->getline_hr_all ($fh); $arrayref = $csv->getline_hr_all ($fh, $offset); $arrayref = $csv->getline_hr_all ($fh, $offset, $length);

This will return a reference to a list of getline_hr ($fh) results. In this call, keep_meta_info is disabled.

parse

$status = $csv->parse ($line);

This method decomposes a CSV string into fields, returning success or failure. Failure can result from a lack of argument or the given CSV string is improperly formatted. Upon success, “fields” can be called to retrieve the decomposed fields. Upon failure calling “fields” will return undefined data and “error_input” can be called to retrieve the invalid argument.

You may use the “types” method for setting column types. See “types”’ description below.

The $line argument is supposed to be a simple scalar. Everything else is supposed to croak and set error 1500.

fragment

This function tries to implement RFC7111 (URI Fragment Identifiers for the text/csv Media Type) - https://datatracker.ietf.org/doc/html/rfc7111

my $AoA = $csv->fragment ($fh, $spec);

In specifications, * is used to specify the last item, a dash (-) to indicate a range. All indices are 1-based: the first row or column has index 1. Selections can be combined with the semi-colon (;).

When using this method in combination with “column_names”, the returned reference will point to a list of hashes instead of a list of lists. A disjointed cell-based combined selection might return rows with different number of columns making the use of hashes unpredictable.

$csv->column_names (“Name”, “Age”); my $AoH = $csv->fragment ($fh, “col=3;8”);

If the “after_parse” callback is active, it is also called on every line parsed and skipped before the fragment.

row
row=4 row=5-7 row=6-* row=1-2;4;6-*

col
col=2 col=1-3 col=4-* col=1-2;4;7-*

cell
In cell-based selection, the comma (,) is used to pair row and column cell=4,1 The range operator (-) using cells can be used to define top-left and bottom-right cell location cell=3,1-4,6 The * is only allowed in the second part of a pair cell=3,2-*,2 # row 3 till end, only column 2 cell=3,2-3,* # column 2 till end, only row 3 cell=3,2-*,* # strip row 1 and 2, and column 1 Cells and cell ranges may be combined with ;, possibly resulting in rows with different numbers of columns cell=1,1-2,2;3,3-4,4;1,4;4,1 Disjointed selections will only return selected cells. The cells that are not specified will not be included in the returned set, not even as undef. As an example given a CSV like 11,12,13,…19 21,22,…28,29 : : 91,…97,98,99 with cell=1,1-2,2;3,3-4,4;1,4;4,1 will return: 11,12,14 21,22 33,34 41,43,44 Overlapping cell-specs will return those cells only once, So cell=1,1-3,3;2,2-4,4;2,3;4,2 will return: 11,12,13 21,22,23,24 31,32,33,34 42,43,44

RFC7111 <https://datatracker.ietf.org/doc/html/rfc7111> does not allow different types of specs to be combined (either row or col or cell). Passing an invalid fragment specification will croak and set error 2013.

column_names

Set the “keys” that will be used in the “getline_hr” calls. If no keys (column names) are passed, it will return the current setting as a list.

“column_names” accepts a list of scalars (the column names) or a single array_ref, so you can pass the return value from “getline” too:

$csv->column_names ($csv->getline ($fh));

“column_names” does no checking on duplicates at all, which might lead to unexpected results. Undefined entries will be replaced with the string `”

1194 - Linux cli command Net_DNS_FAQpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_FAQpm and provides detailed information about the command Net_DNS_FAQpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_FAQpm.

NAME 🖥️ Net_DNS_FAQpm 🖥️

Frequently Asked Net::DNS Questions

SYNOPSIS

perldoc Net::DNS::FAQ

DESCRIPTION

This document serves to answer the most frequently asked questions on both the Net::DNS Mailing List and those sent to the author.

The latest version of this FAQ can be found at <http://www.net-dns.org/docs/FAQ.html>

GENERAL

What is Net::DNS?

Net::DNS is a perl implementation of a DNS resolver.

INSTALLATION

Where can I find Test::More?

Test::More is part of the Test-Simple package, by Michael G Schwern. You should be able to find the distribution at <http://search.cpan.org/dist/Test-Simple/>

USAGE

Why does $resolver->query() return undef when the answer section is empty?

The short answer is, do not use query(). $resolver->send() will always return the response packet, as long as a response was received.

The longer answer is that query() is modeled after the res_query() function from the libresolv C library, which has similar behavior.

VERSION

$Id: FAQ.pod 1709 2018-09-07 08:03:09Z willem $

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1195 - Linux cli command XML_PatAct_ActionTemplpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_PatAct_ActionTemplpm and provides detailed information about the command XML_PatAct_ActionTemplpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_PatAct_ActionTemplpm.

NAME 🖥️ XML_PatAct_ActionTemplpm 🖥️

An action module for

SYNOPSIS

use XML::PatAct::ACTION; my $patterns = [ PATTERN => ACTION, … ]; my $matcher = XML::PatAct::ACTION->new(Patterns => $patterns, Matcher => $matcher );

DESCRIPTION

XML::PatAct::ACTION is a PerlSAX handler for applying pattern-action lists to XML parses or trees. XML::PatAct::ACTION …

New XML::PatAct::ACTION instances are creating by calling `new()’. A Parameters can be passed as a list of key, value pairs or a hash. Patterns and Matcher options are required. Patterns is the pattern-action list to apply. Matcher is an instance of the pattern or query matching module.

DESCRIBE THE FORMAT OF YOUR ACTIONS HERE

AUTHOR

This template file was written by Ken MacLeod, [email protected]

SEE ALSO

perl (1)

``Using PatAct Modules’’ and ``Creating PatAct Modules’’ in libxml-perl.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1196 - Linux cli command zip_error_fini

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_error_fini and provides detailed information about the command zip_error_fini, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_error_fini.

libzip (-lzip)

The

function cleans up and frees internally allocated memory of the zip_error pointed to by

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1197 - Linux cli command zip_set_archive_flag

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_set_archive_flag and provides detailed information about the command zip_set_archive_flag, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_set_archive_flag.

libzip (-lzip)

The

function sets the flag

for the archive

to the value

Currently there are no supported flags.

Upon successful completion 0 is returned, and -1 if an error occurred.

was added in libzip 0.9. In libzip 0.11 the type of

was changed from

to

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1198 - Linux cli command pthread_attr_setscope

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_attr_setscope and provides detailed information about the command pthread_attr_setscope, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_attr_setscope.

NAME 🖥️ pthread_attr_setscope 🖥️

set/get contention scope attribute in thread attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_attr_setscope(pthread_attr_t *attr, int scope);
int pthread_attr_getscope(const pthread_attr_t *restrict attr,
 int *restrict scope);

DESCRIPTION

The pthread_attr_setscope() function sets the contention scope attribute of the thread attributes object referred to by attr to the value specified in scope. The contention scope attribute defines the set of threads against which a thread competes for resources such as the CPU. POSIX.1 specifies two possible values for scope:

PTHREAD_SCOPE_SYSTEM
The thread competes for resources with all other threads in all processes on the system that are in the same scheduling allocation domain (a group of one or more processors). PTHREAD_SCOPE_SYSTEM threads are scheduled relative to one another according to their scheduling policy and priority.

PTHREAD_SCOPE_PROCESS
The thread competes for resources with all other threads in the same process that were also created with the PTHREAD_SCOPE_PROCESS contention scope. PTHREAD_SCOPE_PROCESS threads are scheduled relative to other threads in the process according to their scheduling policy and priority. POSIX.1 leaves it unspecified how these threads contend with other threads in other process on the system or with other threads in the same process that were created with the PTHREAD_SCOPE_SYSTEM contention scope.

POSIX.1 requires that an implementation support at least one of these contention scopes. Linux supports PTHREAD_SCOPE_SYSTEM, but not PTHREAD_SCOPE_PROCESS.

On systems that support multiple contention scopes, then, in order for the parameter setting made by pthread_attr_setscope() to have effect when calling pthread_create(3), the caller must use pthread_attr_setinheritsched(3) to set the inherit-scheduler attribute of the attributes object attr to PTHREAD_EXPLICIT_SCHED.

The pthread_attr_getscope() function returns the contention scope attribute of the thread attributes object referred to by attr in the buffer pointed to by scope.

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

pthread_attr_setscope() can fail with the following errors:

EINVAL
An invalid value was specified in scope.

ENOTSUP
scope specified the value PTHREAD_SCOPE_PROCESS, which is not supported on Linux.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_attr_setscope(), pthread_attr_getscope()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

The PTHREAD_SCOPE_SYSTEM contention scope typically indicates that a user-space thread is bound directly to a single kernel-scheduling entity. This is the case on Linux for the obsolete LinuxThreads implementation and the modern NPTL implementation, which are both 1:1 threading implementations.

POSIX.1 specifies that the default contention scope is implementation-defined.

SEE ALSO

pthread_attr_init(3), pthread_attr_setaffinity_np(3), pthread_attr_setinheritsched(3), pthread_attr_setschedparam(3), pthread_attr_setschedpolicy(3), pthread_create(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1199 - Linux cli command Moose_Utilpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Utilpm and provides detailed information about the command Moose_Utilpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Utilpm.

NAME 🖥️ Moose_Utilpm 🖥️

Utilities for working with Moose classes

VERSION

version 2.2207

SYNOPSIS

use Moose::Util qw/find_meta does_role search_class_by_role/; my $meta = find_meta($object) || die “No metaclass found”; if (does_role($object, $role)) { print “The object can do $role! “; } my $class = search_class_by_role($object, FooRole); print “Nearest class with FooRole is $class “;

DESCRIPTION

This module provides a set of utility functions. Many of these functions are intended for use in Moose itself or MooseX modules, but some of them may be useful for use in your own code.

EXPORTED FUNCTIONS

find_meta($class_or_obj)

This method takes a class name or object and attempts to find a metaclass for the class, if one exists. It will not create one if it does not yet exist.

is_role($package_or_obj)

Returns true if the provided package name or object is a Moose::Role.

does_role($class_or_obj, $role_or_obj)

Returns true if $class_or_obj does the given $role_or_obj. The role can be provided as a name or a Moose::Meta::Role object.

The class must already have a metaclass for this to work. If it doesn’t, this function simply returns false.

search_class_by_role($class_or_obj, $role_or_obj)

Returns the first class in the class’s precedence list that does $role_or_obj, if any. The role can be either a name or a Moose::Meta::Role object.

The class must already have a metaclass for this to work.

apply_all_roles($applicant, @roles)

This function applies one or more roles to the given $applicant. The applicant can be a role name, class name, or object.

The $applicant must already have a metaclass object.

The list of @roles should a list of names or Moose::Meta::Role objects, each of which can be followed by an optional hash reference of options (-excludes and -alias).

ensure_all_roles($applicant, @roles)

This function is similar to apply_all_roles, but only applies roles that $applicant does not already consume.

with_traits($class_name, @role_names)

This function creates a new class from $class_name with each of @role_names applied. It returns the name of the new class.

get_all_attribute_values($meta, $instance)

Returns a hash reference containing all of the $instance’s attributes. The keys are attribute names.

get_all_init_args($meta, $instance)

Returns a hash reference containing all of the init_arg values for the instance’s attributes. The values are the associated attribute values. If an attribute does not have a defined init_arg, it is skipped.

This could be useful in cloning an object.

resolve_metaclass_alias($category, $name, %options)

resolve_metatrait_alias($category, $name, %options)

Resolves a short name to a full class name. Short names are often used when specifying the metaclass or traits option for an attribute:

has foo => ( metaclass => “Bar”, );

The name resolution mechanism is covered in “Metaclass and Trait Name Resolution” in Moose.

meta_class_alias($to[, $from])

meta_attribute_alias($to[, $from])

Create an alias from the class $from (or the current package, if $from is unspecified), so that “Metaclass and Trait Name Resolution” in Moose works properly.

english_list(@items)

Given a list of scalars, turns them into a proper list in English (“one and two”, “one, two, three, and four”). This is used to help us make nicer error messages.

throw_exception( $class_name, %arguments_to_exception)

Calls die with an object of Moose::Exception::$class_name, with %arguments_to_exception passed as arguments.

TODO

Here is a list of possible functions to write

discovering original method from modified method

search for origin class of a method or attribute

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1200 - Linux cli command URIpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command URIpm and provides detailed information about the command URIpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the URIpm.

NAME 🖥️ URIpm 🖥️

Uniform Resource Identifiers (absolute and relative)

SYNOPSIS

use URI (); $u1 = URI->new(“http://www.example.com”); $u2 = URI->new(“foo”, “http”); $u3 = $u2->abs($u1); $u4 = $u3->clone; $u5 = URI->new(“HTTP://WWW.example.com:80”)->canonical; $str = $u->as_string; $str = “$u”; $scheme = $u->scheme; $opaque = $u->opaque; $path = $u->path; $frag = $u->fragment; $u->scheme(“ftp”); $u->host(“ftp.example.com”); $u->path(“cpan/”);

DESCRIPTION

This module implements the URI class. Objects of this class represent “Uniform Resource Identifier references” as specified in RFC 2396 (and updated by RFC 2732).

A Uniform Resource Identifier is a compact string of characters that identifies an abstract or physical resource. A Uniform Resource Identifier can be further classified as either a Uniform Resource Locator (URL) or a Uniform Resource Name (URN). The distinction between URL and URN does not matter to the URI class interface. A “URI-reference” is a URI that may have additional information attached in the form of a fragment identifier.

An absolute URI reference consists of three parts: a scheme, a scheme-specific part and a fragment identifier. A subset of URI references share a common syntax for hierarchical namespaces. For these, the scheme-specific part is further broken down into authority, path and query components. These URIs can also take the form of relative URI references, where the scheme (and usually also the authority) component is missing, but implied by the context of the URI reference. The three forms of URI reference syntax are summarized as follows:

<scheme>:<scheme-specific-part>#<fragment> <scheme>://<authority><path>?<query>#<fragment> <path>?<query>#<fragment>

The components into which a URI reference can be divided depend on the scheme. The URI class provides methods to get and set the individual components. The methods available for a specific URI object depend on the scheme.

CONSTRUCTORS

The following methods construct new URI objects:

$uri = URI->new( $str )

$uri = URI->new( $str, $scheme )

Constructs a new URI object. The string representation of a URI is given as argument, together with an optional scheme specification. Common URI wrappers like "" and <>, as well as leading and trailing white space, are automatically removed from the $str argument before it is processed further. The constructor determines the scheme, maps this to an appropriate URI subclass, constructs a new object of that class and returns it. If the scheme isn’t one of those that URI recognizes, you still get an URI object back that you can access the generic methods on. The $uri->has_recognized_scheme method can be used to test for this. The $scheme argument is only used when $str is a relative URI. It can be either a simple string that denotes the scheme, a string containing an absolute URI reference, or an absolute URI object. If no $scheme is specified for a relative URI $str, then $str is simply treated as a generic URI (no scheme-specific methods available). The set of characters available for building URI references is restricted (see URI::Escape). Characters outside this set are automatically escaped by the URI constructor.

$uri = URI->new_abs( $str, $base_uri )
Constructs a new absolute URI object. The $str argument can denote a relative or absolute URI. If relative, then it is absolutized using $base_uri as base. The $base_uri must be an absolute URI.

$uri = URI::file->new( $filename )

$uri = URI::file->new( $filename, $os )

Constructs a new file URI from a file name. See URI::file.

$uri = URI::file->new_abs( $filename )

$uri = URI::file->new_abs( $filename, $os )

Constructs a new absolute file URI from a file name. See URI::file.

$uri = URI::file->cwd
Returns the current working directory as a file URI. See URI::file.

$uri->clone
Returns a copy of the $uri.

COMMON METHODS

The methods described in this section are available for all URI objects.

Methods that give access to components of a URI always return the old value of the component. The value returned is undef if the component was not present. There is generally a difference between a component that is empty (represented as "") and a component that is missing (represented as undef). If an accessor method is given an argument, it updates the corresponding component in addition to returning the old value of the component. Passing an undefined argument removes the component (if possible). The description of each accessor method indicates whether the component is passed as an escaped (percent-encoded) or an unescaped string. A component that can be further divided into sub-parts are usually passed escaped, as unescaping might change its semantics.

The common methods available for all URI are:

$uri->scheme

$uri->scheme( $new_scheme )

Sets and returns the scheme part of the $uri. If the $uri is relative, then $uri->scheme returns undef. If called with an argument, it updates the scheme of $uri, possibly changing the class of $uri, and returns the old scheme value. The method croaks if the new scheme name is illegal; a scheme name must begin with a letter and must consist of only US-ASCII letters, numbers, and a few special marks: “.”, “+”, “-”. This restriction effectively means that the scheme must be passed unescaped. Passing an undefined argument to the scheme method makes the URI relative (if possible). Letter case does not matter for scheme names. The string returned by $uri->scheme is always lowercase. If you want the scheme just as it was written in the URI in its original case, you can use the $uri->_scheme method instead.

$uri->has_recognized_scheme
Returns TRUE if the URI scheme is one that URI recognizes. It will also be TRUE for relative URLs where a recognized scheme was provided to the constructor, even if $uri->scheme returns undef for these.

$uri->opaque

$uri->opaque( $new_opaque )

Sets and returns the scheme-specific part of the $uri (everything between the scheme and the fragment) as an escaped string.

$uri->path

$uri->path( $new_path )

Sets and returns the same value as $uri->opaque unless the URI supports the generic syntax for hierarchical namespaces. In that case the generic method is overridden to set and return the part of the URI between the host name and the fragment.

$uri->fragment

$uri->fragment( $new_frag )

Returns the fragment identifier of a URI reference as an escaped string.

$uri->as_string
Returns a URI object to a plain ASCII string. URI objects are also converted to plain strings automatically by overloading. This means that $uri objects can be used as plain strings in most Perl constructs.

$uri->as_iri
Returns a Unicode string representing the URI. Escaped UTF-8 sequences representing non-ASCII characters are turned into their corresponding Unicode code point.

$uri->canonical
Returns a normalized version of the URI. The rules for normalization are scheme-dependent. They usually involve lowercasing the scheme and Internet host name components, removing the explicit port specification if it matches the default port, uppercasing all escape sequences, and unescaping octets that can be better represented as plain characters. For efficiency reasons, if the $uri is already in normalized form, then a reference to it is returned instead of a copy.

$uri->eq( $other_uri )

URI::eq( $first_uri, $other_uri )

Tests whether two URI references are equal. URI references that normalize to the same string are considered equal. The method can also be used as a plain function which can also test two string arguments. If you need to test whether two URI object references denote the same object, use the ‘==’ operator.

$uri->abs( $base_uri )
Returns an absolute URI reference. If $uri is already absolute, then a reference to it is simply returned. If the $uri is relative, then a new absolute URI is constructed by combining the $uri and the $base_uri, and returned.

$uri->rel( $base_uri )
Returns a relative URI reference if it is possible to make one that denotes the same resource relative to $base_uri. If not, then $uri is simply returned.

$uri->secure
Returns a TRUE value if the URI is considered to point to a resource on a secure channel, such as an SSL or TLS encrypted one.

GENERIC METHODS

The following methods are available to schemes that use the common/generic syntax for hierarchical namespaces. The descriptions of schemes below indicate which these are. Unrecognized schemes are assumed to support the generic syntax, and therefore the following methods:

$uri->authority

$uri->authority( $new_authority )

Sets and returns the escaped authority component of the $uri.

$uri->path

$uri->path( $new_path )

Sets and returns the escaped path component of the $uri (the part between the host name and the query or fragment). The path can never be undefined, but it can be the empty string.

$uri->path_query

$uri->path_query( $new_path_query )

Sets and returns the escaped path and query components as a single entity. The path and the query are separated by a “?” character, but the query can itself contain “?”.

$uri->path_segments

$uri->path_segments( $segment, … )

Sets and returns the path. In a scalar context, it returns the same value as $uri->path. In a list context, it returns the unescaped path segments that make up the path. Path segments that have parameters are returned as an anonymous array. The first element is the unescaped path segment proper; subsequent elements are escaped parameter strings. Such an anonymous array uses overloading so it can be treated as a string too, but this string does not include the parameters. Note that absolute paths have the empty string as their first path_segment, i.e. the path /foo/bar have 3 path_segments; “”, “foo” and “bar”.

$uri->query

$uri->query( $new_query )

Sets and returns the escaped query component of the $uri.

$uri->query_form

$uri->query_form( $key1 => $val1, $key2 => $val2, … )

$uri->query_form( $key1 => $val1, $key2 => $val2, …, $delim )

$uri->query_form( \key_value_pairs )

$uri->query_form( \key_value_pairs, $delim )

$uri->query_form( \hash )

$uri->query_form( \hash, $delim )

Sets and returns query components that use the application/x-www-form-urlencoded format. Key/value pairs are separated by “&”, and the key is separated from the value by a “=” character. The form can be set either by passing separate key/value pairs, or via an array or hash reference. Passing an empty array or an empty hash removes the query component, whereas passing no arguments at all leaves the component unchanged. The order of keys is undefined if a hash reference is passed. The old value is always returned as a list of separate key/value pairs. Assigning this list to a hash is unwise as the keys returned might repeat. The values passed when setting the form can be plain strings or references to arrays of strings. Passing an array of values has the same effect as passing the key repeatedly with one value at a time. All the following statements have the same effect: $uri->query_form(foo => 1, foo => 2); $uri->query_form(foo => [1, 2]); $uri->query_form([ foo => 1, foo => 2 ]); $uri->query_form([ foo => [1, 2] ]); $uri->query_form({ foo => [1, 2] }); The $delim parameter can be passed as “;” to force the key/value pairs to be delimited by “;” instead of “&” in the query string. This practice is often recommended for URLs embedded in HTML or XML documents as this avoids the trouble of escaping the “&” character. You might also set the $URI::DEFAULT_QUERY_FORM_DELIMITER variable to “;” for the same global effect.

@keys = $u->query_param

@values = $u->query_param( $key )

$first_value = $u->query_param( $key )

$u->query_param( $key, $value,… )

If $u->query_param is called with no arguments, it returns all the distinct parameter keys of the URI. In a scalar context it returns the number of distinct keys. When a $key argument is given, the method returns the parameter values with the given key. In a scalar context, only the first parameter value is returned. If additional arguments are given, they are used to update successive parameters with the given key. If any of the values provided are array references, then the array is dereferenced to get the actual values. Please note that you can supply multiple values to this method, but you cannot supply multiple keys. Do this: $uri->query_param( widget_id => 1, 5, 9 ); Do NOT do this: $uri->query_param( widget_id => 1, frobnicator_id => 99 );

$u->query_param_append($key, $value,…)
Adds new parameters with the given key without touching any old parameters with the same key. It can be explained as a more efficient version of: $u->query_param($key, $u->query_param($key), $value,…); One difference is that this expression would return the old values of $key, whereas the query_param_append() method does not.

@values = $u->query_param_delete($key)

$first_value = $u->query_param_delete($key)

Deletes all key/value pairs with the given key. The old values are returned. In a scalar context, only the first value is returned. Using the query_param_delete() method is slightly more efficient than the equivalent: $u->query_param($key, []);

$hashref = $u->query_form_hash

$u->query_form_hash( \new_form )

Returns a reference to a hash that represents the query form’s key/value pairs. If a key occurs multiple times, then the hash value becomes an array reference. Note that sequence information is lost. This means that: $u->query_form_hash($u->query_form_hash); is not necessarily a no-op, as it may reorder the key/value pairs. The values returned by the query_param() method should stay the same though.

$uri->query_keywords

$uri->query_keywords( $keywords, … )

$uri->query_keywords( \keywords )

Sets and returns query components that use the keywords separated by “+” format. The keywords can be set either by passing separate keywords directly or by passing a reference to an array of keywords. Passing an empty array removes the query component, whereas passing no arguments at all leaves the component unchanged. The old value is always returned as a list of separate words.

SERVER METHODS

For schemes where the authority component denotes an Internet host, the following methods are available in addition to the generic methods.

$uri->userinfo

$uri->userinfo( $new_userinfo )

Sets and returns the escaped userinfo part of the authority component. For some schemes this is a user name and a password separated by a colon. This practice is not recommended. Embedding passwords in clear text (such as URI) has proven to be a security risk in almost every case where it has been used.

$uri->host

$uri->host( $new_host )

Sets and returns the unescaped hostname. If the $new_host string ends with a colon and a number, then this number also sets the port. For IPv6 addresses the brackets around the raw address is removed in the return value from $uri->host. When setting the host attribute to an IPv6 address you can use a raw address or one enclosed in brackets. The address needs to be enclosed in brackets if you want to pass in a new port value as well. my $uri = URI->new(“http://www.üri-sample/foo/bar.html”); print $u->host; # www.xn–ri-sample-fra0f

$uri->ihost
Returns the host in Unicode form. Any IDNA A-labels (encoded unicode chars with xn– prefix) are turned into U-labels (unicode chars). my $uri = URI->new(“http://www.üri-sample/foo/bar.html”); print $u->ihost; # www.üri-sample

$uri->port

$uri->port( $new_port )

Sets and returns the port. The port is a simple integer that should be greater than 0. If a port is not specified explicitly in the URI, then the URI scheme’s default port is returned. If you don’t want the default port substituted, then you can use the $uri->_port method instead.

$uri->host_port

$uri->host_port( $new_host_port )

Sets and returns the host and port as a single unit. The returned value includes a port, even if it matches the default port. The host part and the port part are separated by a colon: “:”. For IPv6 addresses the bracketing is preserved; thus URI->new(“http://[::1]/”)->host_port returns “[::1]:80”. Contrast this with $uri->host which will remove the brackets.

$uri->default_port
Returns the default port of the URI scheme to which $uri belongs. For http this is the number 80, for ftp this is the number 21, etc. The default port for a scheme can not be changed.

SCHEME-SPECIFIC SUPPORT

Scheme-specific support is provided for the following URI schemes. For URI objects that do not belong to one of these, you can only use the common and generic methods.

data:
The data URI scheme is specified in RFC 2397. It allows inclusion of small data items as “immediate” data, as if it had been included externally. URI objects belonging to the data scheme support the common methods and two new methods to access their scheme-specific components: $uri->media_type and $uri->data. See URI::data for details.

file:
An old specification of the file URI scheme is found in RFC 1738. A new RFC 2396 based specification in not available yet, but file URI references are in common use. URI objects belonging to the file scheme support the common and generic methods. In addition, they provide two methods for mapping file URIs back to local file names; $uri->file and $uri->dir. See URI::file for details.

ftp:
An old specification of the ftp URI scheme is found in RFC 1738. A new RFC 2396 based specification in not available yet, but ftp URI references are in common use. URI objects belonging to the ftp scheme support the common, generic and server methods. In addition, they provide two methods for accessing the userinfo sub-components: $uri->user and $uri->password.

gopher:
The gopher URI scheme is specified in <draft-murali-url-gopher-1996-12-04> and will hopefully be available as a RFC 2396 based specification. URI objects belonging to the gopher scheme support the common, generic and server methods. In addition, they support some methods for accessing gopher-specific path components: $uri->gopher_type, $uri->selector, $uri->search, $uri->string.

http:
The http URI scheme is specified in RFC 2616. The scheme is used to reference resources hosted by HTTP servers. URI objects belonging to the http scheme support the common, generic and server methods.

https:
The https URI scheme is a Netscape invention which is commonly implemented. The scheme is used to reference HTTP servers through SSL connections. Its syntax is the same as http, but the default port is different.

geo:
The geo URI scheme is specified in RFC 5870 <http://tools.ietf.org/html/rfc5870>. The scheme is used to reference physical location in a two- or three-dimensional coordinate reference system in a compact, simple, human-readable, and protocol-independent way. URI objects belonging to the geo scheme support the common methods.

icap:
The icap URI scheme is specified in RFC 3507 <http://tools.ietf.org/html/rfc3507>. The scheme is used to reference resources hosted by ICAP servers. URI objects belonging to the icap scheme support the common, generic and server methods.

icaps:
The icaps URI scheme is specified in RFC 3507 <http://tools.ietf.org/html/rfc3507> as well. The scheme is used to reference ICAP servers through SSL connections. Its syntax is the same as icap, including the same default port.

ldap:
The ldap URI scheme is specified in RFC 2255. LDAP is the Lightweight Directory Access Protocol. An ldap URI describes an LDAP search operation to perform to retrieve information from an LDAP directory. URI objects belonging to the ldap scheme support the common, generic and server methods as well as ldap-specific methods: $uri->dn, $uri->attributes, $uri->scope, $uri->filter, $uri->extensions. See URI::ldap for details.

ldapi:
Like the ldap URI scheme, but uses a UNIX domain socket. The server methods are not supported, and the local socket path is available as $uri->un_path. The ldapi scheme is used by the OpenLDAP package. There is no real specification for it, but it is mentioned in various OpenLDAP manual pages.

ldaps:
Like the ldap URI scheme, but uses an SSL connection. This scheme is deprecated, as the preferred way is to use the start_tls mechanism.

mailto:
The mailto URI scheme is specified in RFC 2368. The scheme was originally used to designate the Internet mailing address of an individual or service. It has (in RFC 2368) been extended to allow setting of other mail header fields and the message body. URI objects belonging to the mailto scheme support the common methods and the generic query methods. In addition, they support the following mailto-specific methods: $uri->to, $uri->headers. Note that the “[email protected]” part of a mailto is not the userinfo and host but instead the path. This allows a mailto URI to contain multiple comma separated email addresses.

mms:
The mms URL specification can be found at <http://sdp.ppona.com/>. URI objects belonging to the mms scheme support the common, generic, and server methods, with the exception of userinfo and query-related sub-components.

news:
The news, nntp and snews URI schemes are specified in <draft-gilman-news-url-01> and will hopefully be available as an RFC 2396 based specification soon. (Update: as of April 2010, they are in RFC 5538 <https://tools.ietf.org/html/rfc5538>. URI objects belonging to the news scheme support the common, generic and server methods. In addition, they provide some methods to access the path: $uri->group and $uri->message.

nntp:
See news scheme.

nntps:
See news scheme and RFC 5538 <https://tools.ietf.org/html/rfc5538>.

pop:
The pop URI scheme is specified in RFC 2384. The scheme is used to reference a POP3 mailbox. URI objects belonging to the pop scheme support the common, generic and server methods. In addition, they provide two methods to access the userinfo components: $uri->user and $uri->auth

rlogin:
An old specification of the rlogin URI scheme is found in RFC 1738. URI objects belonging to the rlogin scheme support the common, generic and server methods.

rtsp:
The rtsp URL specification can be found in section 3.2 of RFC 2326. URI objects belonging to the rtsp scheme support the common, generic, and server methods, with the exception of userinfo and query-related sub-components.

rtspu:
The rtspu URI scheme is used to talk to RTSP servers over UDP instead of TCP. The syntax is the same as rtsp.

rsync:
Information about rsync is available from <http://rsync.samba.org/>. URI objects belonging to the rsync scheme support the common, generic and server methods. In addition, they provide methods to access the userinfo sub-components: $uri->user and $uri->password.

sip:
The sip URI specification is described in sections 19.1 and 25 of RFC 3261. URI objects belonging to the sip scheme support the common, generic, and server methods with the exception of path related sub-components. In addition, they provide two methods to get and set sip parameters: $uri->params_form and $uri->params.

sips:
See sip scheme. Its syntax is the same as sip, but the default port is different.

snews:
See news scheme. Its syntax is the same as news, but the default port is different.

telnet:
An old specification of the telnet URI scheme is found in RFC 1738. URI objects belonging to the telnet scheme support the common, generic and server methods.

tn3270:
These URIs are used like telnet URIs but for connections to IBM mainframes. URI objects belonging to the tn3270 scheme support the common, generic and server methods.

ssh:
Information about ssh is available at <http://www.openssh.com/>. URI objects belonging to the ssh scheme support the common, generic and server methods. In addition, they provide methods to access the userinfo sub-components: $uri->user and $uri->password.

sftp:
URI objects belonging to the sftp scheme support the common, generic and server methods. In addition, they provide methods to access the userinfo sub-components: $uri->user and $uri->password.

urn:
The syntax of Uniform Resource Names is specified in RFC 2141. URI objects belonging to the urn scheme provide the common methods, and also the methods $uri->nid and $uri->nss, which return the Namespace Identifier and the Namespace-Specific String respectively. The Namespace Identifier basically works like the Scheme identifier of URIs, and further divides the URN namespace. Namespace Identifier assignments are maintained at <http://www.iana.org/assignments/urn-namespaces>. Letter case is not significant for the Namespace Identifier. It is always returned in lower case by the $uri->nid method. The $uri->_nid method can be used if you want it in its original case.

urn:isbn:
The urn:isbn: namespace contains International Standard Book Numbers (ISBNs) and is described in RFC 3187. A URI object belonging to this namespace has the following extra methods (if the Business::ISBN module is available): $uri->isbn, $uri->isbn_publisher_code, $uri->isbn_group_code (formerly isbn_country_code, which is still supported by issues a deprecation warning), $uri->isbn_as_ean.

urn:oid:
The urn:oid: namespace contains Object Identifiers (OIDs) and is described in RFC 3061. An object identifier consists of sequences of digits separated by dots. A URI object belonging to this namespace has an additional method called $uri->oid that can be used to get/set the oid value. In a list context, oid numbers are returned as separate elements.

CONFIGURATION VARIABLES

The following configuration variables influence how the class and its methods behave:

$URI::ABS_ALLOW_RELATIVE_SCHEME
Some older parsers used to allow the scheme name to be present in the relative URL if it was the same as the base URL scheme. RFC 2396 says that this should be avoided, but you can enable this old behaviour by setting the $URI::ABS_ALLOW_RELATIVE_SCHEME variable to a TRUE value. The difference is demonstrated by the following examples: URI->new(“http:foo”)->abs(“http://host/a/b”) ==> “http:foo” local $URI::ABS_ALLOW_RELATIVE_SCHEME = 1; URI->new(“http:foo”)->abs(“http://host/a/b”) ==> “http:/host/a/foo”

$URI::ABS_REMOTE_LEADING_DOTS
You can also have the abs() method ignore excess “..” segments in the relative URI by setting $URI::ABS_REMOTE_LEADING_DOTS to a TRUE value. The difference is demonstrated by the following examples: URI->new("../../../foo")->abs(“http://host/a/b”) ==> “http://host/../../foo” local $URI::ABS_REMOTE_LEADING_DOTS = 1; URI->new("../../../foo")->abs(“http://host/a/b”) ==> “http://host/foo”

$URI::DEFAULT_QUERY_FORM_DELIMITER
This value can be set to “;” to have the query form key=value pairs delimited by “;” instead of “&” which is the default.

ENVIRONMENT VARIABLES

URI_HAS_RESERVED_SQUARE_BRACKETS
Before version 5.11, URI treated square brackets as reserved characters throughout the whole URI string. However, these brackets are reserved only within the authority/host part of the URI and nowhere else (RFC 3986). Starting with version 5.11, URI takes this distinction into account. Setting the environment variable URI_HAS_RESERVED_SQUARE_BRACKETS (programmatically or via the shell), restores the old behavior. #– restore 5.10 behavior programmatically BEGIN { $ENV{URI_HAS_RESERVED_SQUARE_BRACKETS} = 1; } use URI (); Note: This environment variable is just used during initialization and has to be set before module URI is used/required. Changing it at run time has no effect. Its value can be checked programmatically by accessing the constant URI::HAS_RESERVED_SQUARE_BRACKETS.

BUGS

There are some things that are not quite right:

  • Using regexp variables like $1 directly as arguments to the URI accessor methods does not work too well with current perl implementations. I would argue that this is actually a bug in perl. The workaround is to quote them. Example: /(…)/ || die; $u->query("$1");

  • The escaping (percent encoding) of chars in the 128 .. 255 range passed to the URI constructor or when setting URI parts using the accessor methods depend on the state of the internal UTF8 flag (see utf8::is_utf8) of the string passed. If the UTF8 flag is set the UTF-8 encoded version of the character is percent encoded. If the UTF8 flag isn’t set the Latin-1 version (byte) of the character is percent encoded. This basically exposes the internal encoding of Perl strings.

PARSING URIs WITH REGEXP

As an alternative to this module, the following (official) regular expression can be used to decode a URI:

my($scheme, $authority, $path, $query, $fragment) = $uri =~ m|(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:([^#]*))?(?:#(.*))?|;

The URI::Split module provides the function uri_split() as a readable alternative.

SEE ALSO

URI::file, URI::WithBase, URI::Escape, URI::Split, URI::Heuristic

RFC 2396: “Uniform Resource Identifiers (URI): Generic Syntax”, Berners-Lee, Fielding, Masinter, August 1998.

<http://www.iana.org/assignments/uri-schemes>

<http://www.iana.org/assignments/urn-namespaces>

<http://www.w3.org/Addressing/>

COPYRIGHT

Copyright 1995-2009 Gisle Aas.

Copyright 1995 Martijn Koster.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHORS / ACKNOWLEDGMENTS

This module is based on the URI::URL module, which in turn was (distantly) based on the wwwurl.pl code in the libwww-perl for perl4 developed by Roy Fielding, as part of the Arcadia project at the University of California, Irvine, with contributions from Brooks Cutter.

URI::URL was developed by Gisle Aas, Tim Bunce, Roy Fielding and Martijn Koster with input from other people on the libwww-perl mailing list.

URI and related subclasses was developed by Gisle Aas.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1201 - Linux cli command verr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command verr and provides detailed information about the command verr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the verr.

NAME 🖥️ verr 🖥️

formatted error messages

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <err.h>
[[noreturn]] void err(int eval, const char *fmt, ...);
[[noreturn]] void errx(int eval, const char *fmt, ...);
void warn(const char *fmt, ...);
void warnx(const char *fmt, ...);
#include <stdarg.h>
[[noreturn]] void verr(int eval, const char *fmt, va_list args);
[[noreturn]] void verrx(int eval, const char *fmt, va_list args);
void vwarn(const char *fmt, va_list args);
void vwarnx(const char *fmt, va_list args);

DESCRIPTION

The err() and warn() family of functions display a formatted error message on the standard error output. In all cases, the last component of the program name, a colon character, and a space are output. If the fmt argument is not NULL, the printf(3)-like formatted error message is output. The output is terminated by a newline character.

The err(), verr(), warn(), and vwarn() functions append an error message obtained from strerror(3) based on the global variable errno, preceded by another colon and space unless the fmt argument is NULL.

The errx() and warnx() functions do not append an error message.

The err(), verr(), errx(), and verrx() functions do not return, but exit with the value of the argument eval.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

err(), errx(), warn(), warnx(), verr(), verrx(), vwarn(), vwarnx()

Thread safetyMT-Safe locale

STANDARDS

BSD.

HISTORY

err()
warn()
4.4BSD.

EXAMPLES

Display the current errno information string and exit:

p = malloc(size);
if (p == NULL)
    err(EXIT_FAILURE, NULL);
fd = open(file_name, O_RDONLY, 0);
if (fd == -1)
    err(EXIT_FAILURE, "%s", file_name);

Display an error message and exit:

if (tm.tm_hour < START_TIME)
    errx(EXIT_FAILURE, "too early, wait until %s",
            start_time_string);

Warn of an error:

fd = open(raw_device, O_RDONLY, 0);
if (fd == -1)
    warnx("%s: %s: trying the block device",
            raw_device, strerror(errno));
fd = open(block_device, O_RDONLY, 0);
if (fd == -1)
    err(EXIT_FAILURE, "%s", block_device);

SEE ALSO

error(3), exit(3), perror(3), printf(3), strerror(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1202 - Linux cli command XdbeGetVisualInfo

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XdbeGetVisualInfo and provides detailed information about the command XdbeGetVisualInfo, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XdbeGetVisualInfo.

NAME 🖥️ XdbeGetVisualInfo 🖥️

Get dbe Visual Informations

SYNOPSIS

#include <X11/extensions/Xdbe.h>

XdbeScreenVisualInfo *XdbeGetVisualInfo( Display *dpy, Drawable *screen_specifiers, int *num_screens)

DESCRIPTION

This function returns information about which visuals support double buffering. The argument num_screens specifies how many elements there are in the screen_specifiers list. Each drawable in screen_specifiers designates a screen for which the supported visuals are being requested. If num_screens is zero, information for all screens is requested. In this case, upon return from this function, num_screens will be set to the number of screens that were found. If an error occurs, this function returns NULL, else it returns a pointer to a list of XdbeScreenVisualInfo structures of length num_screens. The nth element in the returned list corresponds to the nth drawable in the screen_specifiers list, unless num_screens was passed in with the value zero, in which case the nth element in the returned list corresponds to the nth screen of the server, starting with screen zero. The XdbeScreenVisualInfo structure has the following fields:

int count XdbeVisualInfo *visinfo

count specifies the number of items in visinfo. visinfo specifies a list of visuals, depths, and performance hints for this screen.

The XdbeVisualInfo structure has the following fields:

VisualID visual int depth int perflevel

visual specifies one visual ID that supports double-buffering. depth specifies the depth of the visual. perflevel is a performance hint.

The only operation defined on a perflevel is comparison to a perflevel of another visual on the same screen. The visual having the higher perflevel is likely to have better double-buffering graphics performance than the visual having the lower perflevel. Nothing can be deduced from the following: the magnitude of the difference of two perflevels, a perflevel value in isolation, or comparing perflevels from different servers.

ERRORS

BadDrawable
One or more values passed in screen_specifiers is not a valid drawable.

SEE ALSO

DBE, XdbeAllocateBackBufferName(), XdbeBeginIdiom(), XdbeDeallocateBackBufferName(), XdbeEndIdiom(), XdbeFreeVisualInfo(), XdbeGetBackBufferAttributes(), XdbeQueryExtension(), XdbeSwapBuffers().

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1203 - Linux cli command zip_error_get

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_error_get and provides detailed information about the command zip_error_get, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_error_get.

libzip (-lzip)

The functions

and

are deprecated. Use

and

instead.

For

replace

int ze, se; zip_error_get(za, &ze, &se);

with

int ze, se; zip_error_t *error = zip_get_error(za); ze = zip_error_code_zip(error); se = zip_error_code_system(error);

For

replace

int ze, se; zip_file_error_get(zf, &ze, &se);

with

int ze, se; zip_error_t *error = zip_file_get_error(zf); ze = zip_error_code_zip(error); se = zip_error_code_system(error);

was added in libzip 0.6. It was deprecated in libzip 1.0, use

/

instead.

was added in libzip 0.6. It was deprecated in libzip 1.0, use

/

instead.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1204 - Linux cli command hypotl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command hypotl and provides detailed information about the command hypotl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the hypotl.

NAME 🖥️ hypotl 🖥️

Euclidean distance function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double hypot(double x, double y);
float hypotf(float x, float y);
long double hypotl(long double x, long double y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

hypot():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

hypotf(), hypotl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return sqrt(x*x+y*y). This is the length of the hypotenuse of a right-angled triangle with sides of length x and y, or the distance of the point (x,y) from the origin.

The calculation is performed without undue overflow or underflow during the intermediate steps of the calculation.

RETURN VALUE

On success, these functions return the length of the hypotenuse of a right-angled triangle with sides of length x and y.

If x or y is an infinity, positive infinity is returned.

If x or y is a NaN, and the other argument is not an infinity, a NaN is returned.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively.

If both arguments are subnormal, and the result is subnormal, a range error occurs, and the correct result is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error: result overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error: result underflow
An underflow floating-point exception (FE_UNDERFLOW) is raised.

These functions do not set errno for this case.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

hypot(), hypotf(), hypotl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD.

SEE ALSO

cabs(3), sqrt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1205 - Linux cli command XML_DOM_Commentpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_DOM_Commentpm and provides detailed information about the command XML_DOM_Commentpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_DOM_Commentpm.

NAME 🖥️ XML_DOM_Commentpm 🖥️

An XML comment in XML::DOM

DESCRIPTION

XML::DOM::Comment extends XML::DOM::CharacterData which extends XML::DOM::Node.

This node represents the content of a comment, i.e., all the characters between the starting ‘<!–’ and ending ‘–>’. Note that this is the definition of a comment in XML, and, in practice, HTML, although some HTML tools may implement the full SGML comment structure.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1206 - Linux cli command isnan

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isnan and provides detailed information about the command isnan, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isnan.

NAME 🖥️ isnan 🖥️

floating-point classification macros

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
int fpclassify(x);
int isfinite(x);
int isnormal(x);
int isnan(x);
int isinf(x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

fpclassify(), isfinite(), isnormal():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

isnan():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isinf():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

Floating point numbers can have special values, such as infinite or NaN. With the macro fpclassify(x) you can find out what type x is. The macro takes any floating-point expression as argument. The result is one of the following values:

FP_NAN
x is “Not a Number”.

FP_INFINITE
x is either positive infinity or negative infinity.

FP_ZERO
x is zero.

FP_SUBNORMAL
x is too small to be represented in normalized format.

FP_NORMAL
if nothing of the above is correct then it must be a normal floating-point number.

The other macros provide a short answer to some standard questions.

isfinite(x)
returns a nonzero value if
(fpclassify(x) != FP_NAN && fpclassify(x) != FP_INFINITE)

isnormal(x)
returns a nonzero value if (fpclassify(x) == FP_NORMAL)

isnan(x)
returns a nonzero value if (fpclassify(x) == FP_NAN)

isinf(x)
returns 1 if x is positive infinity, and -1 if x is negative infinity.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fpclassify(), isfinite(), isnormal(), isnan(), isinf()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

In glibc 2.01 and earlier, isinf() returns a nonzero value (actually: 1) if x is positive infinity or negative infinity. (This is all that C99 requires.)

NOTES

For isinf(), the standards merely say that the return value is nonzero if and only if the argument has an infinite value.

SEE ALSO

finite(3), INFINITY(3), isgreater(3), signbit(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1207 - Linux cli command Net_DNS_RR_TXTpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_TXTpm and provides detailed information about the command Net_DNS_RR_TXTpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_TXTpm.

NAME 🖥️ Net_DNS_RR_TXTpm 🖥️

DNS TXT resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new( name TXT txtdata … ); $rr = Net::DNS::RR->new( name => name, type => TXT, txtdata => single text string ); $rr = Net::DNS::RR->new( name => name, type => TXT, txtdata => [ multiple, strings, … ] ); use utf8; $rr = Net::DNS::RR->new( jp TXT 古池や 蛙飛込む 水の音 );

DESCRIPTION

Class for DNS Text (TXT) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

txtdata

$string = $rr->txtdata; @list = $rr->txtdata; $rr->txtdata( @list );

When invoked in scalar context, txtdata() returns a concatenation of the descriptive text elements each separated by a single space character.

In a list context, txtdata() returns a list of the text elements.

COPYRIGHT

Copyright (c)2011 Dick Franks.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC1035(3.3.14) <https://iana.org/go/rfc1035#section-3.3.14> RFC3629 <https://iana.org/go/rfc3629>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1208 - Linux cli command fts_set

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fts_set and provides detailed information about the command fts_set, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fts_set.

NAME 🖥️ fts_set 🖥️

traverse a file hierarchy

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <sys/stat.h>
#include <fts.h>
FTS *fts_open(char *const *path_argv, int options,
 int (*_Nullable compar)(const FTSENT **, const FTSENT **));
FTSENT *fts_read(FTS *ftsp);
FTSENT *fts_children(FTS *ftsp, int instr);
int fts_set(FTS *ftsp, FTSENT *f, int instr);
int fts_close(FTS *ftsp);

DESCRIPTION

The fts functions are provided for traversing file hierarchies. A simple overview is that the fts_open() function returns a “handle” (of type FTS *) that refers to a file hierarchy “stream”. This handle is then supplied to the other fts functions. The function fts_read() returns a pointer to a structure describing one of the files in the file hierarchy. The function fts_children() returns a pointer to a linked list of structures, each of which describes one of the files contained in a directory in the hierarchy.

In general, directories are visited two distinguishable times; in preorder (before any of their descendants are visited) and in postorder (after all of their descendants have been visited). Files are visited once. It is possible to walk the hierarchy “logically” (visiting the files that symbolic links point to) or physically (visiting the symbolic links themselves), order the walk of the hierarchy or prune and/or revisit portions of the hierarchy.

Two structures (and associated types) are defined in the include file <fts.h>. The first type is FTS, the structure that represents the file hierarchy itself. The second type is FTSENT, the structure that represents a file in the file hierarchy. Normally, an FTSENT structure is returned for every file in the file hierarchy. In this manual page, “file” and “FTSENT structure” are generally interchangeable.

The FTSENT structure contains fields describing a file. The structure contains at least the following fields (there are additional fields that should be considered private to the implementation):

typedef struct _ftsent {
    unsigned short  fts_info;     /* flags for FTSENT structure */
    char           *fts_accpath;  /* access path */
    char           *fts_path;     /* root path */
    short           fts_pathlen;  /* strlen(fts_path) +
                                     strlen(fts_name) */
    char           *fts_name;     /* filename */
    short           fts_namelen;  /* strlen(fts_name) */
    short           fts_level;    /* depth (-1 to N) */
    int             fts_errno;    /* file errno */
    long            fts_number;   /* local numeric value */
    void           *fts_pointer;  /* local address value */
    struct _ftsent *fts_parent;   /* parent directory */
    struct _ftsent *fts_link;     /* next file structure */
    struct _ftsent *fts_cycle;    /* cycle structure */
    struct stat    *fts_statp;    /* [l]stat(2) information */
} FTSENT;

These fields are defined as follows:

fts_info
One of the following values describing the returned FTSENT structure and the file it represents. With the exception of directories without errors (FTS_D), all of these entries are terminal, that is, they will not be revisited, nor will any of their descendants be visited.

FTS_D
A directory being visited in preorder.

FTS_DC
A directory that causes a cycle in the tree. (The fts_cycle field of the FTSENT structure will be filled in as well.)

FTS_DEFAULT
Any FTSENT structure that represents a file type not explicitly described by one of the other fts_info values.

FTS_DNR
A directory which cannot be read. This is an error return, and the fts_errno field will be set to indicate what caused the error.

FTS_DOT
A file named “.” or “..” which was not specified as a filename to fts_open() (see FTS_SEEDOT).

FTS_DP
A directory being visited in postorder. The contents of the FTSENT structure will be unchanged from when it was returned in preorder, that is, with the fts_info field set to FTS_D.

FTS_ERR
This is an error return, and the fts_errno field will be set to indicate what caused the error.

FTS_F
A regular file.

FTS_NS
A file for which no [l] stat(2) information was available. The contents of the fts_statp field are undefined. This is an error return, and the fts_errno field will be set to indicate what caused the error.

FTS_NSOK
A file for which no [l] stat(2) information was requested. The contents of the fts_statp field are undefined.

FTS_SL
A symbolic link.

FTS_SLNONE
A symbolic link with a nonexistent target. The contents of the fts_statp field reference the file characteristic information for the symbolic link itself.

fts_accpath
A path for accessing the file from the current directory.

fts_path
The path for the file relative to the root of the traversal. This path contains the path specified to fts_open() as a prefix.

fts_pathlen
The sum of the lengths of the strings referenced by fts_path and fts_name.

fts_name
The name of the file.

fts_namelen
The length of the string referenced by fts_name.

fts_level
The depth of the traversal, numbered from -1 to N, where this file was found. The FTSENT structure representing the parent of the starting point (or root) of the traversal is numbered -1, and the FTSENT structure for the root itself is numbered 0.

fts_errno
If fts_children() or fts_read() returns an FTSENT structure whose fts_info field is set to FTS_DNR, FTS_ERR, or FTS_NS, the fts_errno field contains the error number (i.e., the errno value) specifying the cause of the error. Otherwise, the contents of the fts_errno field are undefined.

fts_number
This field is provided for the use of the application program and is not modified by the fts functions. It is initialized to 0.

fts_pointer
This field is provided for the use of the application program and is not modified by the fts functions. It is initialized to NULL.

fts_parent
A pointer to the FTSENT structure referencing the file in the hierarchy immediately above the current file, that is, the directory of which this file is a member. A parent structure for the initial entry point is provided as well, however, only the fts_level, fts_number, and fts_pointer fields are guaranteed to be initialized.

fts_link
Upon return from the fts_children() function, the fts_link field points to the next structure in the NULL-terminated linked list of directory members. Otherwise, the contents of the fts_link field are undefined.

fts_cycle
If a directory causes a cycle in the hierarchy (see FTS_DC), either because of a hard link between two directories, or a symbolic link pointing to a directory, the fts_cycle field of the structure will point to the FTSENT structure in the hierarchy that references the same file as the current FTSENT structure. Otherwise, the contents of the fts_cycle field are undefined.

fts_statp
A pointer to [l] stat(2) information for the file.

A single buffer is used for all of the paths of all of the files in the file hierarchy. Therefore, the fts_path and fts_accpath fields are guaranteed to be null-terminated only for the file most recently returned by fts_read(). To use these fields to reference any files represented by other FTSENT structures will require that the path buffer be modified using the information contained in that FTSENT structure’s fts_pathlen field. Any such modifications should be undone before further calls to fts_read() are attempted. The fts_name field is always null-terminated.

fts_open()

The fts_open() function takes a pointer to an array of character pointers naming one or more paths which make up a logical file hierarchy to be traversed. The array must be terminated by a null pointer.

There are a number of options, at least one of which (either FTS_LOGICAL or FTS_PHYSICAL) must be specified. The options are selected by ORing the following values:

FTS_LOGICAL
This option causes the fts routines to return FTSENT structures for the targets of symbolic links instead of the symbolic links themselves. If this option is set, the only symbolic links for which FTSENT structures are returned to the application are those referencing nonexistent files: the fts_statp field is obtained via stat(2) with a fallback to lstat(2).

FTS_PHYSICAL
This option causes the fts routines to return FTSENT structures for symbolic links themselves instead of the target files they point to. If this option is set, FTSENT structures for all symbolic links in the hierarchy are returned to the application: the fts_statp field is obtained via lstat(2).

FTS_COMFOLLOW
This option causes any symbolic link specified as a root path to be followed immediately, as if via FTS_LOGICAL, regardless of the primary mode.

FTS_NOCHDIR
As a performance optimization, the fts functions change directories as they walk the file hierarchy. This has the side-effect that an application cannot rely on being in any particular directory during the traversal. This option turns off this optimization, and the fts functions will not change the current directory. Note that applications should not themselves change their current directory and try to access files unless FTS_NOCHDIR is specified and absolute pathnames were provided as arguments to fts_open().

FTS_NOSTAT
By default, returned FTSENT structures reference file characteristic information (the fts_statp field) for each file visited. This option relaxes that requirement as a performance optimization, allowing the fts functions to set the fts_info field to FTS_NSOK and leave the contents of the fts_statp field undefined.

FTS_SEEDOT
By default, unless they are specified as path arguments to fts_open(), any files named “.” or “..” encountered in the file hierarchy are ignored. This option causes the fts routines to return FTSENT structures for them.

FTS_XDEV
This option prevents fts from descending into directories that have a different device number than the file from which the descent began.

The argument compar() specifies a user-defined function which may be used to order the traversal of the hierarchy. It takes two pointers to pointers to FTSENT structures as arguments and should return a negative value, zero, or a positive value to indicate if the file referenced by its first argument comes before, in any order with respect to, or after, the file referenced by its second argument. The fts_accpath, fts_path, and fts_pathlen fields of the FTSENT structures may never be used in this comparison. If the fts_info field is set to FTS_NS or FTS_NSOK, the fts_statp field may not either. If the compar() argument is NULL, the directory traversal order is in the order listed in path_argv for the root paths, and in the order listed in the directory for everything else.

fts_read()

The fts_read() function returns a pointer to an FTSENT structure describing a file in the hierarchy. Directories (that are readable and do not cause cycles) are visited at least twice, once in preorder and once in postorder. All other files are visited at least once. (Hard links between directories that do not cause cycles or symbolic links to symbolic links may cause files to be visited more than once, or directories more than twice.)

If all the members of the hierarchy have been returned, fts_read() returns NULL and sets errno to 0. If an error unrelated to a file in the hierarchy occurs, fts_read() returns NULL and sets errno to indicate the error. If an error related to a returned file occurs, a pointer to an FTSENT structure is returned, and errno may or may not have been set (see fts_info).

The FTSENT structures returned by fts_read() may be overwritten after a call to fts_close() on the same file hierarchy stream, or, after a call to fts_read() on the same file hierarchy stream unless they represent a file of type directory, in which case they will not be overwritten until after a call to fts_read() after the FTSENT structure has been returned by the function fts_read() in postorder.

fts_children()

The fts_children() function returns a pointer to an FTSENT structure describing the first entry in a NULL-terminated linked list of the files in the directory represented by the FTSENT structure most recently returned by fts_read(). The list is linked through the fts_link field of the FTSENT structure, and is ordered by the user-specified comparison function, if any. Repeated calls to fts_children() will re-create this linked list.

As a special case, if fts_read() has not yet been called for a hierarchy, fts_children() will return a pointer to the files in the logical directory specified to fts_open(), that is, the arguments specified to fts_open(). Otherwise, if the FTSENT structure most recently returned by fts_read() is not a directory being visited in preorder, or the directory does not contain any files, fts_children() returns NULL and sets errno to zero. If an error occurs, fts_children() returns NULL and sets errno to indicate the error.

The FTSENT structures returned by fts_children() may be overwritten after a call to fts_children(), fts_close(), or fts_read() on the same file hierarchy stream.

The instr argument is either zero or the following value:

FTS_NAMEONLY
Only the names of the files are needed. The contents of all the fields in the returned linked list of structures are undefined with the exception of the fts_name and fts_namelen fields.

fts_set()

The function fts_set() allows the user application to determine further processing for the file f of the stream ftsp. The fts_set() function returns 0 on success, and -1 if an error occurs.

The instr argument is either 0 (meaning “do nothing”) or one of the following values:

FTS_AGAIN
Revisit the file; any file type may be revisited. The next call to fts_read() will return the referenced file. The fts_stat and fts_info fields of the structure will be reinitialized at that time, but no other fields will have been changed. This option is meaningful only for the most recently returned file from fts_read(). Normal use is for postorder directory visits, where it causes the directory to be revisited (in both preorder and postorder) as well as all of its descendants.

FTS_FOLLOW
The referenced file must be a symbolic link. If the referenced file is the one most recently returned by fts_read(), the next call to fts_read() returns the file with the fts_info and fts_statp fields reinitialized to reflect the target of the symbolic link instead of the symbolic link itself. If the file is one of those most recently returned by fts_children(), the fts_info and fts_statp fields of the structure, when returned by fts_read(), will reflect the target of the symbolic link instead of the symbolic link itself. In either case, if the target of the symbolic link does not exist, the fields of the returned structure will be unchanged and the fts_info field will be set to FTS_SLNONE.

If the target of the link is a directory, the preorder return, followed by the return of all of its descendants, followed by a postorder return, is done.

FTS_SKIP
No descendants of this file are visited. The file may be one of those most recently returned by either fts_children() or fts_read().

fts_close()

The fts_close() function closes the file hierarchy stream referred to by ftsp and restores the current directory to the directory from which fts_open() was called to open ftsp. The fts_close() function returns 0 on success, and -1 if an error occurs.

ERRORS

The function fts_open() may fail and set errno for any of the errors specified for open(2) and malloc(3).

In addition, fts_open() may fail and set errno as follows:

ENOENT
Any element of path_argv was an empty string.

The function fts_close() may fail and set errno for any of the errors specified for chdir(2) and close(2).

The functions fts_read() and fts_children() may fail and set errno for any of the errors specified for chdir(2), malloc(3), opendir(3), readdir(3), and [l] stat(2).

In addition, fts_children(), fts_open(), and fts_set() may fail and set errno as follows:

EINVAL
options or instr was invalid.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fts_open(), fts_set(), fts_close()

Thread safetyMT-Safe

fts_read(), fts_children()

Thread safetyMT-Unsafe

STANDARDS

None.

HISTORY

glibc 2. 4.4BSD.

BUGS

Before glibc 2.23, all of the APIs described in this man page are not safe when compiling a program using the LFS APIs (e.g., when compiling with -D_FILE_OFFSET_BITS=64).

SEE ALSO

find(1), chdir(2), lstat(2), stat(2), ftw(3), qsort(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1209 - Linux cli command ilogb

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ilogb and provides detailed information about the command ilogb, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ilogb.

NAME 🖥️ ilogb 🖥️

get integer exponent of a floating-point value

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
int ilogb(double x);
int ilogbf(float x);
int ilogbl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

ilogb():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

ilogbf(), ilogbl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the exponent part of their argument as a signed integer. When no error occurs, these functions are equivalent to the corresponding logb(3) functions, cast to int.

RETURN VALUE

On success, these functions return the exponent of x, as a signed integer.

If x is zero, then a domain error occurs, and the functions return FP_ILOGB0.

If x is a NaN, then a domain error occurs, and the functions return FP_ILOGBNAN.

If x is negative infinity or positive infinity, then a domain error occurs, and the functions return INT_MAX.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is 0 or a NaN
An invalid floating-point exception (FE_INVALID) is raised, and errno is set to EDOM (but see BUGS).

Domain error: x is an infinity
An invalid floating-point exception (FE_INVALID) is raised, and errno is set to EDOM (but see BUGS).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

ilogb(), ilogbf(), ilogbl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

BUGS

Before glibc 2.16, the following bugs existed in the glibc implementation of these functions:

  • The domain error case where x is 0 or a NaN did not cause errno to be set or (on some architectures) raise a floating-point exception.

  • The domain error case where x is an infinity did not cause errno to be set or raise a floating-point exception.

SEE ALSO

log(3), logb(3), significand(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1210 - Linux cli command Image_ExifTool_HtmlDumppm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_HtmlDumppm and provides detailed information about the command Image_ExifTool_HtmlDumppm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_HtmlDumppm.

NAME 🖥️ Image_ExifTool_HtmlDumppm 🖥️

Dump information in hex to HTML page

SYNOPSIS

use Image::ExifTool::HtmlDump; my $dump = Image::ExifTool::HtmlDump->new; $dump->Add($start, $size, $comment); $dump->Print($dumpInfo, $raf, $dataPt, $dataPos, $outfile);

DESCRIPTION

This module contains code used to generate an HTML-based hex dump of information for debugging purposes. This is code is called when the ExifTool ‘HtmlDump’ option is used.

Currently, only EXIF/TIFF and JPEG information is dumped.

BUGS

Due to a memory allocation bug in ActivePerl 5.8.x for Windows, this code may run extremely slowly when processing large files with this version of Perl.

An HTML 4 compliant browser is needed to properly display the generated HTML page.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1211 - Linux cli command X11_Protocol_Connection_UNIXSocketpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command X11_Protocol_Connection_UNIXSocketpm and provides detailed information about the command X11_Protocol_Connection_UNIXSocketpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the X11_Protocol_Connection_UNIXSocketpm.

NAME 🖥️ X11_Protocol_Connection_UNIXSocketpm 🖥️

Perl module for IO::Socket::UNIX-based X11 connections

SYNOPSIS

use X11::Protocol; use X11::Protocol::Connection::UNIXSocket; $conn = X11::Protocol::Connection::UNIXSocket ->open($host, $display_number); $x = X11::Protocol->new($conn);

DESCRIPTION

This module is used by X11::Protocol to establish a connection and communicate with a server over a local Unix-domain socket connection, using the IO::Socket::UNIX module. The host argument is ignored.

AUTHOR

Stephen McCamant <[email protected]>.

SEE ALSO

perl (1), X11::Protocol, X11::Protocol::Connection::INETSocket, X11::Protocol::Connection::Socket, IO::Socket.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1212 - Linux cli command fputws_unlocked

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fputws_unlocked and provides detailed information about the command fputws_unlocked, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fputws_unlocked.

NAME 🖥️ fputws_unlocked 🖥️

nonlocking stdio functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int getc_unlocked(FILE *stream);
int getchar_unlocked(void);
int putc_unlocked(int c, FILE *stream);
int putchar_unlocked(int c);
void clearerr_unlocked(FILE *stream);
int feof_unlocked(FILE *stream);
int ferror_unlocked(FILE *stream);
int fileno_unlocked(FILE *stream);
int fflush_unlocked(FILE *_Nullable stream);
int fgetc_unlocked(FILE *stream);
int fputc_unlocked(int c, FILE *stream);
size_t fread_unlocked(void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
size_t fwrite_unlocked(const void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
char *fgets_unlocked(char s[restrict .n], int n",FILE*restrict"stream);
int fputs_unlocked(const char *restrict s, FILE *restrict stream);
#include <wchar.h>
wint_t getwc_unlocked(FILE *stream);
wint_t getwchar_unlocked(void);
wint_t fgetwc_unlocked(FILE *stream);
wint_t fputwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwchar_unlocked(wchar_t wc);
wchar_t *fgetws_unlocked(wchar_t ws[restrict .n], int n,
 FILE *restrict stream);
int fputws_unlocked(const wchar_t *restrict ws,
 FILE *restrict stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getc_unlocked(), getchar_unlocked(), putc_unlocked(), putchar_unlocked():

    /* glibc >= 2.24: */ _POSIX_C_SOURCE >= 199309L
        || /* glibc <= 2.23: */ _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

clearerr_unlocked(), feof_unlocked(), ferror_unlocked(), fileno_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), getwchar_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwchar_unlocked(), fgetws_unlocked(), fputws_unlocked():

    _GNU_SOURCE

DESCRIPTION

Each of these functions has the same behavior as its counterpart without the “_unlocked” suffix, except that they do not use locking (they do not set locks themselves, and do not test for the presence of locks set by others) and hence are thread-unsafe. See flockfile(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getc_unlocked(), putc_unlocked(), clearerr_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked(), fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwc_unlocked(), fgetws_unlocked(), fputws_unlocked()

Thread safety

MT-Safe race:stream

getchar_unlocked(), getwchar_unlocked()

Thread safety

MT-Unsafe race:stdin

putchar_unlocked(), putwchar_unlocked()

Thread safety

MT-Unsafe race:stdout

feof_unlocked(), ferror_unlocked(), fileno_unlocked()

Thread safetyMT-Safe

STANDARDS

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2008.

Others:
None.

HISTORY

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2001.

SEE ALSO

flockfile(3), stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1213 - Linux cli command modf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command modf and provides detailed information about the command modf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the modf.

NAME 🖥️ modf 🖥️

extract signed integral and fractional values from floating-point number

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double modf(double x, double *iptr);
float modff(float x, float *iptr);
long double modfl(long double x, long double *iptr);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

modff(), modfl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions break the argument x into an integral part and a fractional part, each of which has the same sign as x. The integral part is stored in the location pointed to by iptr.

RETURN VALUE

These functions return the fractional part of x.

If x is a NaN, a NaN is returned, and *iptr is set to a NaN.

If x is positive infinity (negative infinity), +0 (-0) is returned, and *iptr is set to positive infinity (negative infinity).

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

modf(), modff(), modfl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

SEE ALSO

frexp(3), ldexp(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1214 - Linux cli command xdrrec_create

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdrrec_create and provides detailed information about the command xdrrec_create, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdrrec_create.

NAME 🖥️ xdrrec_create 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1215 - Linux cli command mkstemp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mkstemp and provides detailed information about the command mkstemp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mkstemp.

NAME 🖥️ mkstemp 🖥️

create a unique temporary file

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int mkstemp(char *template);
int mkostemp(char *template, int flags);
int mkstemps(char *template, int suffixlen);
int mkostemps(char *template, int suffixlen, int flags);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

mkstemp():

    _XOPEN_SOURCE >= 500
        || /* glibc >= 2.12: */ _POSIX_C_SOURCE >= 200809L
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

mkostemp():

    _GNU_SOURCE

mkstemps():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

mkostemps():

    _GNU_SOURCE

DESCRIPTION

The mkstemp() function generates a unique temporary filename from template, creates and opens the file, and returns an open file descriptor for the file.

The last six characters of template must be “XXXXXX” and these are replaced with a string that makes the filename unique. Since it will be modified, template must not be a string constant, but should be declared as a character array.

The file is created with permissions 0600, that is, read plus write for owner only. The returned file descriptor provides both read and write access to the file. The file is opened with the open(2) O_EXCL flag, guaranteeing that the caller is the process that creates the file.

The mkostemp() function is like mkstemp(), with the difference that the following bits—with the same meaning as for open(2)—may be specified in flags: O_APPEND, O_CLOEXEC, and O_SYNC. Note that when creating the file, mkostemp() includes the values O_RDWR, O_CREAT, and O_EXCL in the flags argument given to open(2); including these values in the flags argument given to mkostemp() is unnecessary, and produces errors on some systems.

The mkstemps() function is like mkstemp(), except that the string in template contains a suffix of suffixlen characters. Thus, template is of the form prefixXXXXXXsuffix, and the string XXXXXX is modified as for mkstemp().

The mkostemps() function is to mkstemps() as mkostemp() is to mkstemp().

RETURN VALUE

On success, these functions return the file descriptor of the temporary file. On error, -1 is returned, and errno is set to indicate the error.

ERRORS

EEXIST
Could not create a unique temporary filename. Now the contents of template are undefined.

EINVAL
For mkstemp() and mkostemp(): The last six characters of template were not XXXXXX; now template is unchanged.

For mkstemps() and mkostemps(): template is less than (6 + suffixlen) characters long, or the last 6 characters before the suffix in template were not XXXXXX.

These functions may also fail with any of the errors described for open(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mkstemp(), mkostemp(), mkstemps(), mkostemps()

Thread safetyMT-Safe

STANDARDS

mkstemp()
POSIX.1-2001.

mkstemps()
BSD.

mkostemp()
mkostemps()
GNU.

HISTORY

mkstemp()
4.3BSD, POSIX.1-2001.

mkstemps()
glibc 2.11. BSD, Mac OS X, Solaris, Tru64.

mkostemp()
glibc 2.7.

mkostemps()
glibc 2.11.

In glibc versions 2.06 and earlier, the file is created with permissions 0666, that is, read and write for all users. This old behavior may be a security risk, especially since other UNIX flavors use 0600, and somebody might overlook this detail when porting programs. POSIX.1-2008 adds a requirement that the file be created with mode 0600.

More generally, the POSIX specification of mkstemp() does not say anything about file modes, so the application should make sure its file mode creation mask (see umask(2)) is set appropriately before calling mkstemp() (and mkostemp()).

SEE ALSO

mkdtemp(3), mktemp(3), tempnam(3), tmpfile(3), tmpnam(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1216 - Linux cli command Net_DNS_RR_LOCpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_LOCpm and provides detailed information about the command Net_DNS_RR_LOCpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_LOCpm.

NAME 🖥️ Net_DNS_RR_LOCpm 🖥️

DNS LOC resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name LOC latitude longitude altitude size hp vp);

DESCRIPTION

DNS geographical location (LOC) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

latitude

$latitude = $rr->latitude; ($deg, $min, $sec, $ns ) = $rr->latitude; $rr->latitude( 42.357990 ); $rr->latitude( 42, 21, 28.764, N ); $rr->latitude( 42 21 28.764 N );

When invoked in scalar context, latitude is returned in degrees, a negative ordinate being south of the equator.

When invoked in list context, latitude is returned as a list of separate degree, minute, and second values followed by N or S as appropriate.

Optional replacement values may be represented as single value, list or formatted string. Trailing zero values are optional.

longitude

$longitude = $rr->longitude; ($deg, $min, $sec, $ew ) = $rr->longitude; $rr->longitude( -71.014338 ); $rr->longitude( 71, 0, 51.617, W ); $rr->longitude( 71 0 51.617 W );

When invoked in scalar context, longitude is returned in degrees, a negative ordinate being west of the prime meridian.

When invoked in list context, longitude is returned as a list of separate degree, minute, and second values followed by E or W as appropriate.

altitude

$altitude = $rr->altitude;

Represents altitude, in metres, relative to the WGS 84 reference spheroid used by GPS.

size

$size = $rr->size;

Represents the diameter, in metres, of a sphere enclosing the described entity.

hp

$hp = $rr->hp;

Represents the horizontal precision of the data expressed as the diameter, in metres, of the circle of error.

vp

$vp = $rr->vp;

Represents the vertical precision of the data expressed as the total spread, in metres, of the distribution of possible values.

latlon

($lat, $lon) = $rr->latlon; $rr->latlon($lat, $lon);

Representation of the latitude and longitude coordinate pair as signed floating-point degrees.

version

$version = $rr->version;

Version of LOC protocol.

COPYRIGHT

Copyright (c)1997 Michael Fuhr.

Portions Copyright (c)2011 Dick Franks.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC1876 <https://tools.ietf.org/html/rfc1876>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1217 - Linux cli command res_mkquery

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command res_mkquery and provides detailed information about the command res_mkquery, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the res_mkquery.

NAME 🖥️ res_mkquery 🖥️

resolver routines

LIBRARY

Resolver library (libresolv, -lresolv)

SYNOPSIS

#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
struct __res_state;
typedef struct __res_state *res_state;
int res_ninit(res_state statep);
void res_nclose(res_state statep);
int res_nquery(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nsearch(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nquerydomain(res_state statep,
 const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
int res_nmkquery(res_state statep,
 int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
int res_nsend(res_state statep,
 const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);
int dn_comp(const char *exp_dn, unsigned char comp_dn[.length],
 int length, unsigned char **dnptrs,
 unsigned char **lastdnptr);
int dn_expand(const unsigned char *msg,
 const unsigned char *eomorig,
 const unsigned char *comp_dn, char exp_dn[.length],
 int length);
[[deprecated]] extern struct __res_state _res;
[[deprecated]] int res_init(void);
[[deprecated]]
int res_query(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_search(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_querydomain(const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
[[deprecated]]
int res_mkquery(int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
[[deprecated]]
int res_send(const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);

DESCRIPTION

Note: This page is incomplete (various resolver functions provided by glibc are not described) and likely out of date.

The functions described below make queries to and interpret the responses from Internet domain name servers.

The API consists of a set of more modern, reentrant functions and an older set of nonreentrant functions that have been superseded. The traditional resolver interfaces such as res_init() and res_query() use some static (global) state stored in the _res structure, rendering these functions non-thread-safe. BIND 8.2 introduced a set of new interfaces res_ninit(), res_nquery(), and so on, which take a res_state as their first argument, so you can use a per-thread resolver state.

The res_ninit() and res_init() functions read the configuration files (see resolv.conf(5)) to get the default domain name and name server address(es). If no server is given, the local host is tried. If no domain is given, that associated with the local host is used. It can be overridden with the environment variable LOCALDOMAIN. res_ninit() or res_init() is normally executed by the first call to one of the other functions. Every call to res_ninit() requires a corresponding call to res_nclose() to free memory allocated by res_ninit() and subsequent calls to res_nquery().

The res_nquery() and res_query() functions query the name server for the fully qualified domain name name of specified type and class. The reply is left in the buffer answer of length anslen supplied by the caller.

The res_nsearch() and res_search() functions make a query and waits for the response like res_nquery() and res_query(), but in addition they implement the default and search rules controlled by RES_DEFNAMES and RES_DNSRCH (see description of _res options below).

The res_nquerydomain() and res_querydomain() functions make a query using res_nquery()/res_query() on the concatenation of name and domain.

The following functions are lower-level routines used by res_nquery()/res_query().

The res_nmkquery() and res_mkquery() functions construct a query message in buf of length buflen for the domain name dname. The query type op is one of the following (typically QUERY):

QUERY
Standard query.

IQUERY
Inverse query. This option was removed in glibc 2.26, since it has not been supported by DNS servers for a very long time.

NS_NOTIFY_OP
Notify secondary of SOA (Start of Authority) change.

newrr is currently unused.

The res_nsend() and res_send() function send a preformatted query given in msg of length msglen and returns the answer in answer which is of length anslen. They will call res_ninit()/res_init() if it has not already been called.

The dn_comp() function compresses the domain name exp_dn and stores it in the buffer comp_dn of length length. The compression uses an array of pointers dnptrs to previously compressed names in the current message. The first pointer points to the beginning of the message and the list ends with NULL. The limit of the array is specified by lastdnptr. If dnptr is NULL, domain names are not compressed. If lastdnptr is NULL, the list of labels is not updated.

The dn_expand() function expands the compressed domain name comp_dn to a full domain name, which is placed in the buffer exp_dn of size length. The compressed name is contained in a query or reply message, and msg points to the beginning of the message.

The resolver routines use configuration and state information contained in a __res_state structure (either passed as the statep argument, or in the global variable _res, in the case of the older nonreentrant functions). The only field of this structure that is normally manipulated by the user is the options field. This field can contain the bitwise “OR” of the following options:

RES_INIT
True if res_ninit() or res_init() has been called.

RES_DEBUG
Print debugging messages. This option is available only if glibc was built with debugging enabled, which is not the default.

RES_AAONLY (unimplemented; deprecated in glibc 2.25)
Accept authoritative answers only. res_send() continues until it finds an authoritative answer or returns an error. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEVC
Use TCP connections for queries rather than UDP datagrams.

RES_PRIMARY (unimplemented; deprecated in glibc 2.25)
Query primary domain name server only. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_IGNTC
Ignore truncation errors. Don’t retry with TCP.

RES_RECURSE
Set the recursion desired bit in queries. Recursion is carried out by the domain name server, not by res_send(). [Enabled by default].

RES_DEFNAMES
If set, res_search() will append the default domain name to single component names—that is, those that do not contain a dot. [Enabled by default].

RES_STAYOPEN
Used with RES_USEVC to keep the TCP connection open between queries.

RES_DNSRCH
If set, res_search() will search for hostnames in the current domain and in parent domains. This option is used by gethostbyname(3). [Enabled by default].

RES_INSECURE1
Accept a response from a wrong server. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_INSECURE2
Accept a response which contains a wrong query. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_NOALIASES
Disable usage of HOSTALIASES environment variable.

RES_USE_INET6
Try an AAAA query before an A query inside the gethostbyname(3) function, and map IPv4 responses in IPv6 “tunneled form” if no AAAA records are found but an A record set exists. Since glibc 2.25, this option is deprecated, and its usage produces a warning; applications should use getaddrinfo(3), rather than gethostbyname(3).

RES_ROTATE
Causes round-robin selection of name servers from among those listed. This has the effect of spreading the query load among all listed servers, rather than having all clients try the first listed server first every time.

RES_NOCHECKNAME (unimplemented; deprecated in glibc 2.25)
Disable the modern BIND checking of incoming hostnames and mail names for invalid characters such as underscore (_), non-ASCII, or control characters. This option was present until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_KEEPTSIG (unimplemented; deprecated in glibc 2.25)
Do not strip TSIG records. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_BLAST (unimplemented; deprecated in glibc 2.25)
Send each query simultaneously and recursively to all servers. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEBSTRING (glibc 2.3.4 to glibc 2.24)
Make reverse IPv6 lookups using the bit-label format described in RFC 2673; if this option is not set (which is the default), then nibble format is used. This option was removed in glibc 2.25, since it relied on a backward-incompatible DNS extension that was never deployed on the Internet.

RES_NOIP6DOTINT (glibc 2.24 and earlier)
Use ip6.arpa zone in IPv6 reverse lookup instead of ip6.int, which is deprecated since glibc 2.3.4. This option is present up to and including glibc 2.24, where it is enabled by default. In glibc 2.25, this option was removed.

RES_USE_EDNS0 (since glibc 2.6)
Enables support for the DNS extensions (EDNS0) described in RFC 2671.

RES_SNGLKUP (since glibc 2.10)
By default, glibc performs IPv4 and IPv6 lookups in parallel since glibc 2.9. Some appliance DNS servers cannot handle these queries properly and make the requests time out. This option disables the behavior and makes glibc perform the IPv6 and IPv4 requests sequentially (at the cost of some slowdown of the resolving process).

RES_SNGLKUPREOP
When RES_SNGLKUP option is enabled, opens a new socket for the each request.

RES_USE_DNSSEC
Use DNSSEC with OK bit in OPT record. This option implies RES_USE_EDNS0.

RES_NOTLDQUERY
Do not look up unqualified name as a top-level domain (TLD).

RES_DEFAULT
Default option which implies: RES_RECURSE, RES_DEFNAMES, RES_DNSRCH, and RES_NOIP6DOTINT.

RETURN VALUE

The res_ninit() and res_init() functions return 0 on success, or -1 if an error occurs.

The res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), res_querydomain(), res_nmkquery(), res_mkquery(), res_nsend(), and res_send() functions return the length of the response, or -1 if an error occurs.

The dn_comp() and dn_expand() functions return the length of the compressed name, or -1 if an error occurs.

In the case of an error return from res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), or res_querydomain(), the global variable h_errno (see gethostbyname(3)) can be consulted to determine the cause of the error.

FILES

/etc/resolv.conf
resolver configuration file

/etc/host.conf
resolver configuration file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

res_ninit(), res_nclose(), res_nquery(), res_nsearch(), res_nquerydomain(), res_nsend()

Thread safetyMT-Safe locale

res_nmkquery(), dn_comp(), dn_expand()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

4.3BSD.

SEE ALSO

gethostbyname(3), resolv.conf(5), resolver(5), hostname(7), named(8)

The GNU C library source file resolv/README.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1218 - Linux cli command resolver

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command resolver and provides detailed information about the command resolver, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the resolver.

NAME 🖥️ resolver 🖥️

resolver routines

LIBRARY

Resolver library (libresolv, -lresolv)

SYNOPSIS

#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
struct __res_state;
typedef struct __res_state *res_state;
int res_ninit(res_state statep);
void res_nclose(res_state statep);
int res_nquery(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nsearch(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nquerydomain(res_state statep,
 const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
int res_nmkquery(res_state statep,
 int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
int res_nsend(res_state statep,
 const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);
int dn_comp(const char *exp_dn, unsigned char comp_dn[.length],
 int length, unsigned char **dnptrs,
 unsigned char **lastdnptr);
int dn_expand(const unsigned char *msg,
 const unsigned char *eomorig,
 const unsigned char *comp_dn, char exp_dn[.length],
 int length);
[[deprecated]] extern struct __res_state _res;
[[deprecated]] int res_init(void);
[[deprecated]]
int res_query(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_search(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_querydomain(const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
[[deprecated]]
int res_mkquery(int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
[[deprecated]]
int res_send(const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);

DESCRIPTION

Note: This page is incomplete (various resolver functions provided by glibc are not described) and likely out of date.

The functions described below make queries to and interpret the responses from Internet domain name servers.

The API consists of a set of more modern, reentrant functions and an older set of nonreentrant functions that have been superseded. The traditional resolver interfaces such as res_init() and res_query() use some static (global) state stored in the _res structure, rendering these functions non-thread-safe. BIND 8.2 introduced a set of new interfaces res_ninit(), res_nquery(), and so on, which take a res_state as their first argument, so you can use a per-thread resolver state.

The res_ninit() and res_init() functions read the configuration files (see resolv.conf(5)) to get the default domain name and name server address(es). If no server is given, the local host is tried. If no domain is given, that associated with the local host is used. It can be overridden with the environment variable LOCALDOMAIN. res_ninit() or res_init() is normally executed by the first call to one of the other functions. Every call to res_ninit() requires a corresponding call to res_nclose() to free memory allocated by res_ninit() and subsequent calls to res_nquery().

The res_nquery() and res_query() functions query the name server for the fully qualified domain name name of specified type and class. The reply is left in the buffer answer of length anslen supplied by the caller.

The res_nsearch() and res_search() functions make a query and waits for the response like res_nquery() and res_query(), but in addition they implement the default and search rules controlled by RES_DEFNAMES and RES_DNSRCH (see description of _res options below).

The res_nquerydomain() and res_querydomain() functions make a query using res_nquery()/res_query() on the concatenation of name and domain.

The following functions are lower-level routines used by res_nquery()/res_query().

The res_nmkquery() and res_mkquery() functions construct a query message in buf of length buflen for the domain name dname. The query type op is one of the following (typically QUERY):

QUERY
Standard query.

IQUERY
Inverse query. This option was removed in glibc 2.26, since it has not been supported by DNS servers for a very long time.

NS_NOTIFY_OP
Notify secondary of SOA (Start of Authority) change.

newrr is currently unused.

The res_nsend() and res_send() function send a preformatted query given in msg of length msglen and returns the answer in answer which is of length anslen. They will call res_ninit()/res_init() if it has not already been called.

The dn_comp() function compresses the domain name exp_dn and stores it in the buffer comp_dn of length length. The compression uses an array of pointers dnptrs to previously compressed names in the current message. The first pointer points to the beginning of the message and the list ends with NULL. The limit of the array is specified by lastdnptr. If dnptr is NULL, domain names are not compressed. If lastdnptr is NULL, the list of labels is not updated.

The dn_expand() function expands the compressed domain name comp_dn to a full domain name, which is placed in the buffer exp_dn of size length. The compressed name is contained in a query or reply message, and msg points to the beginning of the message.

The resolver routines use configuration and state information contained in a __res_state structure (either passed as the statep argument, or in the global variable _res, in the case of the older nonreentrant functions). The only field of this structure that is normally manipulated by the user is the options field. This field can contain the bitwise “OR” of the following options:

RES_INIT
True if res_ninit() or res_init() has been called.

RES_DEBUG
Print debugging messages. This option is available only if glibc was built with debugging enabled, which is not the default.

RES_AAONLY (unimplemented; deprecated in glibc 2.25)
Accept authoritative answers only. res_send() continues until it finds an authoritative answer or returns an error. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEVC
Use TCP connections for queries rather than UDP datagrams.

RES_PRIMARY (unimplemented; deprecated in glibc 2.25)
Query primary domain name server only. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_IGNTC
Ignore truncation errors. Don’t retry with TCP.

RES_RECURSE
Set the recursion desired bit in queries. Recursion is carried out by the domain name server, not by res_send(). [Enabled by default].

RES_DEFNAMES
If set, res_search() will append the default domain name to single component names—that is, those that do not contain a dot. [Enabled by default].

RES_STAYOPEN
Used with RES_USEVC to keep the TCP connection open between queries.

RES_DNSRCH
If set, res_search() will search for hostnames in the current domain and in parent domains. This option is used by gethostbyname(3). [Enabled by default].

RES_INSECURE1
Accept a response from a wrong server. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_INSECURE2
Accept a response which contains a wrong query. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_NOALIASES
Disable usage of HOSTALIASES environment variable.

RES_USE_INET6
Try an AAAA query before an A query inside the gethostbyname(3) function, and map IPv4 responses in IPv6 “tunneled form” if no AAAA records are found but an A record set exists. Since glibc 2.25, this option is deprecated, and its usage produces a warning; applications should use getaddrinfo(3), rather than gethostbyname(3).

RES_ROTATE
Causes round-robin selection of name servers from among those listed. This has the effect of spreading the query load among all listed servers, rather than having all clients try the first listed server first every time.

RES_NOCHECKNAME (unimplemented; deprecated in glibc 2.25)
Disable the modern BIND checking of incoming hostnames and mail names for invalid characters such as underscore (_), non-ASCII, or control characters. This option was present until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_KEEPTSIG (unimplemented; deprecated in glibc 2.25)
Do not strip TSIG records. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_BLAST (unimplemented; deprecated in glibc 2.25)
Send each query simultaneously and recursively to all servers. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEBSTRING (glibc 2.3.4 to glibc 2.24)
Make reverse IPv6 lookups using the bit-label format described in RFC 2673; if this option is not set (which is the default), then nibble format is used. This option was removed in glibc 2.25, since it relied on a backward-incompatible DNS extension that was never deployed on the Internet.

RES_NOIP6DOTINT (glibc 2.24 and earlier)
Use ip6.arpa zone in IPv6 reverse lookup instead of ip6.int, which is deprecated since glibc 2.3.4. This option is present up to and including glibc 2.24, where it is enabled by default. In glibc 2.25, this option was removed.

RES_USE_EDNS0 (since glibc 2.6)
Enables support for the DNS extensions (EDNS0) described in RFC 2671.

RES_SNGLKUP (since glibc 2.10)
By default, glibc performs IPv4 and IPv6 lookups in parallel since glibc 2.9. Some appliance DNS servers cannot handle these queries properly and make the requests time out. This option disables the behavior and makes glibc perform the IPv6 and IPv4 requests sequentially (at the cost of some slowdown of the resolving process).

RES_SNGLKUPREOP
When RES_SNGLKUP option is enabled, opens a new socket for the each request.

RES_USE_DNSSEC
Use DNSSEC with OK bit in OPT record. This option implies RES_USE_EDNS0.

RES_NOTLDQUERY
Do not look up unqualified name as a top-level domain (TLD).

RES_DEFAULT
Default option which implies: RES_RECURSE, RES_DEFNAMES, RES_DNSRCH, and RES_NOIP6DOTINT.

RETURN VALUE

The res_ninit() and res_init() functions return 0 on success, or -1 if an error occurs.

The res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), res_querydomain(), res_nmkquery(), res_mkquery(), res_nsend(), and res_send() functions return the length of the response, or -1 if an error occurs.

The dn_comp() and dn_expand() functions return the length of the compressed name, or -1 if an error occurs.

In the case of an error return from res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), or res_querydomain(), the global variable h_errno (see gethostbyname(3)) can be consulted to determine the cause of the error.

FILES

/etc/resolv.conf
resolver configuration file

/etc/host.conf
resolver configuration file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

res_ninit(), res_nclose(), res_nquery(), res_nsearch(), res_nquerydomain(), res_nsend()

Thread safetyMT-Safe locale

res_nmkquery(), dn_comp(), dn_expand()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

4.3BSD.

SEE ALSO

gethostbyname(3), resolv.conf(5), resolver(5), hostname(7), named(8)

The GNU C library source file resolv/README.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1219 - Linux cli command y1l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command y1l and provides detailed information about the command y1l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the y1l.

NAME 🖥️ y1l 🖥️

Bessel functions of the second kind

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double y0(double x);
double y1(double x);
double yn(int n, double x);
float y0f(float x);
float y1f(float x);
float ynf(int n, float x);
long double y0l(long double x);
long double y1l(long double x);
long double ynl(int n, long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

y0(), y1(), yn():

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

y0f(), y0l(), y1f(), y1l(), ynf(), ynl():

    _XOPEN_SOURCE >= 600
        || (_ISOC99_SOURCE && _XOPEN_SOURCE)
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The y0() and y1() functions return Bessel functions of x of the second kind of orders 0 and 1, respectively. The yn() function returns the Bessel function of x of the second kind of order n.

The value of x must be positive.

The y0f(), y1f(), and ynf() functions are versions that take and return float values. The y0l(), y1l(), and ynl() functions are versions that take and return long double values.

RETURN VALUE

On success, these functions return the appropriate Bessel value of the second kind for x.

If x is a NaN, a NaN is returned.

If x is negative, a domain error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively. (POSIX.1-2001 also allows a NaN return for this case.)

If x is 0.0, a pole error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.

If the result underflows, a range error occurs, and the functions return 0.0

If the result overflows, a range error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively. (POSIX.1-2001 also allows a 0.0 return for this case.)

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is negative
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

Pole error: x is 0.0
errno is set to ERANGE and an FE_DIVBYZERO exception is raised (but see BUGS).

Range error: result underflow
errno is set to ERANGE. No FE_UNDERFLOW exception is returned by fetestexcept(3) for this case.

Range error: result overflow
errno is set to ERANGE (but see BUGS). An overflow floating-point exception (FE_OVERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

y0(), y0f(), y0l()

Thread safetyMT-Safe

y1(), y1f(), y1l()

Thread safetyMT-Safe

yn(), ynf(), ynl()

Thread safetyMT-Safe

STANDARDS

y0()
y1()
yn()
POSIX.1-2008.

Others:
BSD.

HISTORY

y0()
y1()
yn()
SVr4, 4.3BSD, POSIX.1-2001.

Others:
BSD.

BUGS

Before glibc 2.19, these functions misdiagnosed pole errors: errno was set to EDOM, instead of ERANGE and no FE_DIVBYZERO exception was raised.

Before glibc 2.17, did not set errno for “range error: result underflow”.

In glibc 2.3.2 and earlier, these functions do not raise an invalid floating-point exception (FE_INVALID) when a domain error occurs.

SEE ALSO

j0(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1220 - Linux cli command get_phys_pages

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command get_phys_pages and provides detailed information about the command get_phys_pages, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the get_phys_pages.

NAME 🖥️ get_phys_pages 🖥️

get total and available physical page counts

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/sysinfo.h>
long get_phys_pages(void);
long get_avphys_pages(void);

DESCRIPTION

The function get_phys_pages() returns the total number of physical pages of memory available on the system.

The function get_avphys_pages() returns the number of currently available physical pages of memory on the system.

RETURN VALUE

On success, these functions return a nonnegative value as given in DESCRIPTION. On failure, they return -1 and set errno to indicate the error.

ERRORS

ENOSYS
The system could not provide the required information (possibly because the /proc filesystem was not mounted).

STANDARDS

GNU.

HISTORY

Before glibc 2.23, these functions obtained the required information by scanning the MemTotal and MemFree fields of /proc/meminfo. Since glibc 2.23, these functions obtain the required information by calling sysinfo(2).

NOTES

The following sysconf(3) calls provide a portable means of obtaining the same information as the functions described on this page.

total_pages = sysconf(_SC_PHYS_PAGES);    /* total pages */
avl_pages = sysconf(_SC_AVPHYS_PAGES);    /* available pages */

EXAMPLES

The following example shows how get_phys_pages() and get_avphys_pages() can be used.

#include <stdio.h>
#include <stdlib.h>
#include <sys/sysinfo.h>
int
main(void)
{
    printf("This system has %ld pages of physical memory and "
            "%ld pages of physical memory available.

“, get_phys_pages(), get_avphys_pages()); exit(EXIT_SUCCESS); }

SEE ALSO

sysconf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1221 - Linux cli command tolower

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tolower and provides detailed information about the command tolower, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tolower.

NAME 🖥️ tolower 🖥️

convert uppercase or lowercase

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int toupper(int c);
int tolower(int c);
int toupper_l(int c, locale_t locale);
int tolower_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

toupper_l(), tolower_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions convert lowercase letters to uppercase, and vice versa.

If c is a lowercase letter, toupper() returns its uppercase equivalent, if an uppercase representation exists in the current locale. Otherwise, it returns c. The toupper_l() function performs the same task, but uses the locale referred to by the locale handle locale.

If c is an uppercase letter, tolower() returns its lowercase equivalent, if a lowercase representation exists in the current locale. Otherwise, it returns c. The tolower_l() function performs the same task, but uses the locale referred to by the locale handle locale.

If c is neither an unsigned char value nor EOF, the behavior of these functions is undefined.

The behavior of toupper_l() and tolower_l() is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

RETURN VALUE

The value returned is that of the converted letter, or c if the conversion was not possible.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

toupper(), tolower(), toupper_l(), tolower_l()

Thread safetyMT-Safe

STANDARDS

toupper()
tolower()
C11, POSIX.1-2008.

toupper_l()
tolower_l()
POSIX.1-2008.

HISTORY

toupper()
tolower()
C89, 4.3BSD, POSIX.1-2001.

toupper_l()
tolower_l()
POSIX.1-2008.

NOTES

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what constitutes an uppercase or lowercase letter depend on the locale. For example, the default “C” locale does not know about umlauts, so no conversion is done for them.

In some non-English locales, there are lowercase letters with no corresponding uppercase equivalent; the German sharp s is one example.

SEE ALSO

isalpha(3), newlocale(3), setlocale(3), towlower(3), towupper(3), uselocale(3), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1222 - Linux cli command getopt_long

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getopt_long and provides detailed information about the command getopt_long, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getopt_long.

NAME 🖥️ getopt_long 🖥️

Parse command-line options

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
int getopt(int argc, char *argv[],
 const char *optstring);
extern char *optarg;
extern int optind, opterr, optopt;
#include <getopt.h>
int getopt_long(int argc, char *argv[],
 const char *optstring,
 const struct option *longopts, int *longindex);
int getopt_long_only(int argc, char *argv[],
 const char *optstring,
 const struct option *longopts, int *longindex);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getopt():

    _POSIX_C_SOURCE >= 2 || _XOPEN_SOURCE

getopt_long(), getopt_long_only():

    _GNU_SOURCE

DESCRIPTION

The getopt() function parses the command-line arguments. Its arguments argc and argv are the argument count and array as passed to the main() function on program invocation. An element of argv that starts with ‘-’ (and is not exactly “-” or “–”) is an option element. The characters of this element (aside from the initial ‘-’) are option characters. If getopt() is called repeatedly, it returns successively each of the option characters from each of the option elements.

The variable optind is the index of the next element to be processed in argv. The system initializes this value to 1. The caller can reset it to 1 to restart scanning of the same argv, or when scanning a new argument vector.

If getopt() finds another option character, it returns that character, updating the external variable optind and a static variable nextchar so that the next call to getopt() can resume the scan with the following option character or argv-element.

If there are no more option characters, getopt() returns -1. Then optind is the index in argv of the first argv-element that is not an option.

optstring is a string containing the legitimate option characters. A legitimate option character is any visible one byte ascii(7) character (for which isgraph(3) would return nonzero) that is not ‘-’, ‘:’, or ‘;’. If such a character is followed by a colon, the option requires an argument, so getopt() places a pointer to the following text in the same argv-element, or the text of the following argv-element, in optarg. Two colons mean an option takes an optional arg; if there is text in the current argv-element (i.e., in the same word as the option name itself, for example, “-oarg”), then it is returned in optarg, otherwise optarg is set to zero. This is a GNU extension. If optstring contains W followed by a semicolon, then -W foo is treated as the long option –foo. (The -W option is reserved by POSIX.2 for implementation extensions.) This behavior is a GNU extension, not available with libraries before glibc 2.

By default, getopt() permutes the contents of argv as it scans, so that eventually all the nonoptions are at the end. Two other scanning modes are also implemented. If the first character of optstring is ‘+’ or the environment variable POSIXLY_CORRECT is set, then option processing stops as soon as a nonoption argument is encountered. If ‘+’ is not the first character of optstring, it is treated as a normal option. If POSIXLY_CORRECT behaviour is required in this case optstring will contain two ‘+’ symbols. If the first character of optstring is ‘-’, then each nonoption argv-element is handled as if it were the argument of an option with character code 1. (This is used by programs that were written to expect options and other argv-elements in any order and that care about the ordering of the two.) The special argument “–” forces an end of option-scanning regardless of the scanning mode.

While processing the option list, getopt() can detect two kinds of errors: (1) an option character that was not specified in optstring and (2) a missing option argument (i.e., an option at the end of the command line without an expected argument). Such errors are handled and reported as follows:

  • By default, getopt() prints an error message on standard error, places the erroneous option character in optopt, and returns ‘?’ as the function result.

  • If the caller has set the global variable opterr to zero, then getopt() does not print an error message. The caller can determine that there was an error by testing whether the function return value is ‘?’. (By default, opterr has a nonzero value.)

  • If the first character (following any optional ‘+’ or ‘-’ described above) of optstring is a colon (’:’), then getopt() likewise does not print an error message. In addition, it returns ‘:’ instead of ‘?’ to indicate a missing option argument. This allows the caller to distinguish the two different types of errors.

getopt_long() and getopt_long_only()

The getopt_long() function works like getopt() except that it also accepts long options, started with two dashes. (If the program accepts only long options, then optstring should be specified as an empty string (""), not NULL.) Long option names may be abbreviated if the abbreviation is unique or is an exact match for some defined option. A long option may take a parameter, of the form –arg=param or –arg param.

longopts is a pointer to the first element of an array of struct option declared in <getopt.h> as

struct option {
    const char *name;
    int         has_arg;
    int        *flag;
    int         val;
};

The meanings of the different fields are:

name
is the name of the long option.

has_arg
is: no_argument (or 0) if the option does not take an argument; required_argument (or 1) if the option requires an argument; or optional_argument (or 2) if the option takes an optional argument.

flag
specifies how results are returned for a long option. If flag is NULL, then getopt_long() returns val. (For example, the calling program may set val to the equivalent short option character.) Otherwise, getopt_long() returns 0, and flag points to a variable which is set to val if the option is found, but left unchanged if the option is not found.

val
is the value to return, or to load into the variable pointed to by flag.

The last element of the array has to be filled with zeros.

If longindex is not NULL, it points to a variable which is set to the index of the long option relative to longopts.

getopt_long_only() is like getopt_long(), but ‘-’ as well as “–” can indicate a long option. If an option that starts with ‘-’ (not “–”) doesn’t match a long option, but does match a short option, it is parsed as a short option instead.

RETURN VALUE

If an option was successfully found, then getopt() returns the option character. If all command-line options have been parsed, then getopt() returns -1. If getopt() encounters an option character that was not in optstring, then ‘?’ is returned. If getopt() encounters an option with a missing argument, then the return value depends on the first character in optstring: if it is ‘:’, then ‘:’ is returned; otherwise ‘?’ is returned.

getopt_long() and getopt_long_only() also return the option character when a short option is recognized. For a long option, they return val if flag is NULL, and 0 otherwise. Error and -1 returns are the same as for getopt(), plus ‘?’ for an ambiguous match or an extraneous parameter.

ENVIRONMENT

POSIXLY_CORRECT
If this is set, then option processing stops as soon as a nonoption argument is encountered.

_<PID>_GNU_nonoption_argv_flags_
This variable was used by bash(1) 2.0 to communicate to glibc which arguments are the results of wildcard expansion and so should not be considered as options. This behavior was removed in bash(1) 2.01, but the support remains in glibc.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getopt(), getopt_long(), getopt_long_only()

Thread safety

MT-Unsafe race:getopt env

VERSIONS

POSIX specifies that the argv array argument should be const, but these functions permute its elements unless the environment variable POSIXLY_CORRECT is set. const is used in the actual prototype to be compatible with other systems; however, this page doesn’t show the qualifier, to avoid confusing readers.

STANDARDS

getopt()
POSIX.1-2008.

getopt_long()
getopt_long_only()
GNU.

The use of ‘+’ and ‘-’ in optstring is a GNU extension.

HISTORY

getopt()
POSIX.1-2001, and POSIX.2.

On some older implementations, getopt() was declared in <stdio.h>. SUSv1 permitted the declaration to appear in either <unistd.h> or <stdio.h>. POSIX.1-1996 marked the use of <stdio.h> for this purpose as LEGACY. POSIX.1-2001 does not require the declaration to appear in <stdio.h>.

NOTES

A program that scans multiple argument vectors, or rescans the same vector more than once, and wants to make use of GNU extensions such as ‘+’ and ‘-’ at the start of optstring, or changes the value of POSIXLY_CORRECT between scans, must reinitialize getopt() by resetting optind to 0, rather than the traditional value of 1. (Resetting to 0 forces the invocation of an internal initialization routine that rechecks POSIXLY_CORRECT and checks for GNU extensions in optstring.)

Command-line arguments are parsed in strict order meaning that an option requiring an argument will consume the next argument, regardless of whether that argument is the correctly specified option argument or simply the next option (in the scenario the user mis-specifies the command line). For example, if optstring is specified as “1n:” and the user specifies the command line arguments incorrectly as prog -n -1, the -n option will be given the optarg value “-1”, and the -1 option will be considered to have not been specified.

EXAMPLES

getopt()

The following trivial example program uses getopt() to handle two program options: -n, with no associated value; and -t val, which expects an associated value.

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int
main(int argc, char *argv[])
{
    int flags, opt;
    int nsecs, tfnd;
    nsecs = 0;
    tfnd = 0;
    flags = 0;
    while ((opt = getopt(argc, argv, "nt:")) != -1) {
        switch (opt) {
        case 'n':
            flags = 1;
            break;
        case 't':
            nsecs = atoi(optarg);
            tfnd = 1;
            break;
        default: /* '?' */
            fprintf(stderr, "Usage: %s [-t nsecs] [-n] name

“, argv[0]); exit(EXIT_FAILURE); } } printf(“flags=%d; tfnd=%d; nsecs=%d; optind=%d “, flags, tfnd, nsecs, optind); if (optind >= argc) { fprintf(stderr, “Expected argument after options “); exit(EXIT_FAILURE); } printf(“name argument = %s “, argv[optind]); /* Other code omitted */ exit(EXIT_SUCCESS); }

getopt_long()

The following example program illustrates the use of getopt_long() with most of its features.

#include <getopt.h>
#include <stdio.h>     /* for printf */
#include <stdlib.h>    /* for exit */
int
main(int argc, char *argv[])
{
    int c;
    int digit_optind = 0;
    while (1) {
        int this_option_optind = optind ? optind : 1;
        int option_index = 0;
        static struct option long_options[] = {
            {"add",     required_argument, 0,  0 },
            {"append",  no_argument,       0,  0 },
            {"delete",  required_argument, 0,  0 },
            {"verbose", no_argument,       0,  0 },
            {"create",  required_argument, 0, 'c'},
            {"file",    required_argument, 0,  0 },
            {0,         0,                 0,  0 }
        };
        c = getopt_long(argc, argv, "abc:d:012",
                        long_options, &option_index);
        if (c == -1)
            break;
        switch (c) {
        case 0:
            printf("option %s", long_options[option_index].name);
            if (optarg)
                printf(" with arg %s", optarg);
            printf("

“); break; case ‘0’: case ‘1’: case ‘2’: if (digit_optind != 0 && digit_optind != this_option_optind) printf(“digits occur in two different argv-elements. “); digit_optind = this_option_optind; printf(“option %c “, c); break; case ‘a’: printf(“option a “); break; case ‘b’: printf(“option b “); break; case ‘c’: printf(“option c with value ‘%s’ “, optarg); break; case ’d’: printf(“option d with value ‘%s’ “, optarg); break; case ‘?’: break; default: printf(”?? getopt returned character code 0%o ?? “, c); } } if (optind < argc) { printf(“non-option ARGV-elements: “); while (optind < argc) printf("%s “, argv[optind++]); printf(” “); } exit(EXIT_SUCCESS); }

SEE ALSO

getopt(1), getsubopt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1223 - Linux cli command putchar_unlocked

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command putchar_unlocked and provides detailed information about the command putchar_unlocked, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the putchar_unlocked.

NAME 🖥️ putchar_unlocked 🖥️

nonlocking stdio functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int getc_unlocked(FILE *stream);
int getchar_unlocked(void);
int putc_unlocked(int c, FILE *stream);
int putchar_unlocked(int c);
void clearerr_unlocked(FILE *stream);
int feof_unlocked(FILE *stream);
int ferror_unlocked(FILE *stream);
int fileno_unlocked(FILE *stream);
int fflush_unlocked(FILE *_Nullable stream);
int fgetc_unlocked(FILE *stream);
int fputc_unlocked(int c, FILE *stream);
size_t fread_unlocked(void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
size_t fwrite_unlocked(const void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
char *fgets_unlocked(char s[restrict .n], int n",FILE*restrict"stream);
int fputs_unlocked(const char *restrict s, FILE *restrict stream);
#include <wchar.h>
wint_t getwc_unlocked(FILE *stream);
wint_t getwchar_unlocked(void);
wint_t fgetwc_unlocked(FILE *stream);
wint_t fputwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwchar_unlocked(wchar_t wc);
wchar_t *fgetws_unlocked(wchar_t ws[restrict .n], int n,
 FILE *restrict stream);
int fputws_unlocked(const wchar_t *restrict ws,
 FILE *restrict stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getc_unlocked(), getchar_unlocked(), putc_unlocked(), putchar_unlocked():

    /* glibc >= 2.24: */ _POSIX_C_SOURCE >= 199309L
        || /* glibc <= 2.23: */ _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

clearerr_unlocked(), feof_unlocked(), ferror_unlocked(), fileno_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), getwchar_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwchar_unlocked(), fgetws_unlocked(), fputws_unlocked():

    _GNU_SOURCE

DESCRIPTION

Each of these functions has the same behavior as its counterpart without the “_unlocked” suffix, except that they do not use locking (they do not set locks themselves, and do not test for the presence of locks set by others) and hence are thread-unsafe. See flockfile(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getc_unlocked(), putc_unlocked(), clearerr_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked(), fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwc_unlocked(), fgetws_unlocked(), fputws_unlocked()

Thread safety

MT-Safe race:stream

getchar_unlocked(), getwchar_unlocked()

Thread safety

MT-Unsafe race:stdin

putchar_unlocked(), putwchar_unlocked()

Thread safety

MT-Unsafe race:stdout

feof_unlocked(), ferror_unlocked(), fileno_unlocked()

Thread safetyMT-Safe

STANDARDS

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2008.

Others:
None.

HISTORY

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2001.

SEE ALSO

flockfile(3), stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1224 - Linux cli command regex_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command regex_ttype and provides detailed information about the command regex_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the regex_ttype.

NAME 🖥️ regex_ttype 🖥️

POSIX regex functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <regex.h>
int regcomp(regex_t *restrict preg, const char *restrict regex,
 int cflags);
int regexec(const regex_t *restrict preg",constchar*restrict"string,
 size_t nmatch, regmatch_t pmatch[_Nullable restrict .nmatch],
 int eflags);
size_t regerror(int errcode, const regex_t *_Nullable restrict preg,
 char errbuf[_Nullable restrict .errbuf_size],
 size_t errbuf_size);
void regfree(regex_t *preg);
typedef struct {
 size_t re_nsub;
} regex_t;
typedef struct {
 regoff_t rm_so;
 regoff_t rm_eo;
} regmatch_t;
typedef /* ... */ regoff_t;

DESCRIPTION

Compilation

regcomp() is used to compile a regular expression into a form that is suitable for subsequent regexec() searches.

On success, the pattern buffer at *preg is initialized. regex is a null-terminated string. The locale must be the same when running regexec().

After regcomp() succeeds, preg->re_nsub holds the number of subexpressions in regex. Thus, a value of preg->re_nsub + 1 passed as nmatch to regexec() is sufficient to capture all matches.

cflags is the bitwise OR of zero or more of the following:

REG_EXTENDED
Use POSIX Extended Regular Expression syntax when interpreting regex. If not set, POSIX Basic Regular Expression syntax is used.

REG_ICASE
Do not differentiate case. Subsequent regexec() searches using this pattern buffer will be case insensitive.

REG_NOSUB
Report only overall success. regexec() will use only pmatch for REG_STARTEND, ignoring nmatch.

REG_NEWLINE
Match-any-character operators don’t match a newline.

A nonmatching list ([^…]) not containing a newline does not match a newline.

Match-beginning-of-line operator (^) matches the empty string immediately after a newline, regardless of whether eflags, the execution flags of regexec(), contains REG_NOTBOL.

Match-end-of-line operator ($) matches the empty string immediately before a newline, regardless of whether eflags contains REG_NOTEOL.

Matching

regexec() is used to match a null-terminated string against the compiled pattern buffer in *preg, which must have been initialised with regexec(). eflags is the bitwise OR of zero or more of the following flags:

REG_NOTBOL
The match-beginning-of-line operator always fails to match (but see the compilation flag REG_NEWLINE above). This flag may be used when different portions of a string are passed to regexec() and the beginning of the string should not be interpreted as the beginning of the line.

REG_NOTEOL
The match-end-of-line operator always fails to match (but see the compilation flag REG_NEWLINE above).

REG_STARTEND
Match [string + pmatch[0].rm_so,* string + pmatch[0].rm_eo*) instead of [string,* string + strlen(string)*). This allows matching embedded NUL bytes and avoids a strlen(3) on known-length strings. If any matches are returned (REG_NOSUB wasn’t passed to regcomp(), the match succeeded, and nmatch > 0), they overwrite pmatch as usual, and the match offsets remain relative to string (not string + pmatch[0].rm_so). This flag is a BSD extension, not present in POSIX.

Match offsets

Unless REG_NOSUB was passed to regcomp(), it is possible to obtain the locations of matches within string: regexec() fills nmatch elements of pmatch with results: pmatch[0] corresponds to the entire match, pmatch[1] to the first subexpression, etc. If there were more matches than nmatch, they are discarded; if fewer, unused elements of pmatch are filled with -1s.

Each returned valid (non--1) match corresponds to the range [string + rm_so,* string + rm_eo*).

regoff_t is a signed integer type capable of storing the largest value that can be stored in either an ptrdiff_t type or a ssize_t type.

Error reporting

regerror() is used to turn the error codes that can be returned by both regcomp() and regexec() into error message strings.

If preg isn’t a null pointer, errcode must be the latest error returned from an operation on preg.

If errbuf_size isn’t 0, up to errbuf_size bytes are copied to errbuf; the error string is always null-terminated, and truncated to fit.

Freeing

regfree() deinitializes the pattern buffer at *preg, freeing any associated memory; *preg must have been initialized via regcomp().

RETURN VALUE

regcomp() returns zero for a successful compilation or an error code for failure.

regexec() returns zero for a successful match or REG_NOMATCH for failure.

regerror() returns the size of the buffer required to hold the string.

ERRORS

The following errors can be returned by regcomp():

REG_BADBR
Invalid use of back reference operator.

REG_BADPAT
Invalid use of pattern operators such as group or list.

REG_BADRPT
Invalid use of repetition operators such as using ‘*’ as the first character.

REG_EBRACE
Un-matched brace interval operators.

REG_EBRACK
Un-matched bracket list operators.

REG_ECOLLATE
Invalid collating element.

REG_ECTYPE
Unknown character class name.

REG_EEND
Nonspecific error. This is not defined by POSIX.

REG_EESCAPE
Trailing backslash.

REG_EPAREN
Un-matched parenthesis group operators.

REG_ERANGE
Invalid use of the range operator; for example, the ending point of the range occurs prior to the starting point.

REG_ESIZE
Compiled regular expression requires a pattern buffer larger than 64 kB. This is not defined by POSIX.

REG_ESPACE
The regex routines ran out of memory.

REG_ESUBREG
Invalid back reference to a subexpression.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

regcomp(), regexec()

Thread safetyMT-Safe locale

regerror()

Thread safetyMT-Safe env

regfree()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

Prior to POSIX.1-2008, regoff_t was required to be capable of storing the largest value that can be stored in either an off_t type or a ssize_t type.

CAVEATS

re_nsub is only required to be initialized if REG_NOSUB wasn’t specified, but all known implementations initialize it regardless.

Both regex_t and regmatch_t may (and do) have more members, in any order. Always reference them by name.

EXAMPLES

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <regex.h>
#define ARRAY_SIZE(arr) (sizeof((arr)) / sizeof((arr)[0]))
static const char *const str =
        "1) John Driverhacker;
  1. John Doe;
  2. John Foo; “; static const char *const re = “John.*o”; int main(void) { static const char *s = str; regex_t regex; regmatch_t pmatch[1]; regoff_t off, len; if (regcomp(&regex, re, REG_NEWLINE)) exit(EXIT_FAILURE); printf(“String = "%s" “, str); printf(“Matches: “); for (unsigned int i = 0; ; i++) { if (regexec(&regex, s, ARRAY_SIZE(pmatch), pmatch, 0)) break; off = pmatch[0].rm_so + (s - str); len = pmatch[0].rm_eo - pmatch[0].rm_so; printf(”#%zu: “, i); printf(“offset = %jd; length = %jd “, (intmax_t) off, (intmax_t) len); printf(“substring = "%.*s" “, len, s + pmatch[0].rm_so); s += pmatch[0].rm_eo; } exit(EXIT_SUCCESS); }

SEE ALSO

grep(1), regex(7)

The glibc manual section, Regular Expressions

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1225 - Linux cli command matherr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command matherr and provides detailed information about the command matherr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the matherr.

NAME 🖥️ matherr 🖥️

SVID math library exception handling

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
[[deprecated]] int matherr(struct exception *exc);
[[deprecated]] extern _LIB_VERSION_TYPE _LIB_VERSION;

DESCRIPTION

Note: the mechanism described in this page is no longer supported by glibc. Before glibc 2.27, it had been marked as obsolete. Since glibc 2.27, the mechanism has been removed altogether. New applications should use the techniques described in math_error(7) and fenv(3). This page documents the matherr() mechanism as an aid for maintaining and porting older applications.

The System V Interface Definition (SVID) specifies that various math functions should invoke a function called matherr() if a math exception is detected. This function is called before the math function returns; after matherr() returns, the system then returns to the math function, which in turn returns to the caller.

To employ matherr(), the programmer must define the _SVID_SOURCE feature test macro (before including any header files), and assign the value _SVID_ to the external variable _LIB_VERSION.

The system provides a default version of matherr(). This version does nothing, and returns zero (see below for the significance of this). The default matherr() can be overridden by a programmer-defined version, which will be invoked when an exception occurs. The function is invoked with one argument, a pointer to an exception structure, defined as follows:

struct exception {
    int    type;      /* Exception type */
    char  *name;      /* Name of function causing exception */
    double arg1;      /* 1st argument to function */
    double arg2;      /* 2nd argument to function */
    double retval;    /* Function return value */
}

The type field has one of the following values:

DOMAIN
A domain error occurred (the function argument was outside the range for which the function is defined). The return value depends on the function; errno is set to EDOM.

SING
A pole error occurred (the function result is an infinity). The return value in most cases is HUGE (the largest single precision floating-point number), appropriately signed. In most cases, errno is set to EDOM.

OVERFLOW
An overflow occurred. In most cases, the value HUGE is returned, and errno is set to ERANGE.

UNDERFLOW
An underflow occurred. 0.0 is returned, and errno is set to ERANGE.

TLOSS
Total loss of significance. 0.0 is returned, and errno is set to ERANGE.

PLOSS
Partial loss of significance. This value is unused on glibc (and many other systems).

The arg1 and arg2 fields are the arguments supplied to the function (arg2 is undefined for functions that take only one argument).

The retval field specifies the return value that the math function will return to its caller. The programmer-defined matherr() can modify this field to change the return value of the math function.

If the matherr() function returns zero, then the system sets errno as described above, and may print an error message on standard error (see below).

If the matherr() function returns a nonzero value, then the system does not set errno, and doesn’t print an error message.

Math functions that employ matherr()

The table below lists the functions and circumstances in which matherr() is called. The “Type” column indicates the value assigned to exc->type when calling matherr(). The “Result” column is the default return value assigned to exc->retval.

The “Msg?” and “errno” columns describe the default behavior if matherr() returns zero. If the “Msg?” columns contains “y”, then the system prints an error message on standard error.

The table uses the following notations and abbreviations:

x first argument to function
y second argument to function
fin finite value for argument
neg negative value for argument
int integral value for argument
o/f result overflowed
u/f result underflowed
|x| absolute value of x
X_TLOSS is a constant defined in <math.h>
FunctionTypeResultMsg?errno
acos(|x|>1)DOMAINHUGEyEDOM
asin(|x|>1)DOMAINHUGEyEDOM
atan2(0,0)DOMAINHUGEyEDOM
acosh(x<1)DOMAINNANyEDOM
atanh(|x|>1)DOMAINNANyEDOM
atanh(|x|==1)SING(x>0.0)?yEDOM
HUGE_VAL :
-HUGE_VAL
cosh(fin) o/fOVERFLOWHUGEnERANGE
sinh(fin) o/fOVERFLOW(x>0.0) ?nERANGE
HUGE : -HUGE
sqrt(x<0)DOMAIN0.0yEDOM
hypot(fin,fin) o/fOVERFLOWHUGEnERANGE
exp(fin) o/fOVERFLOWHUGEnERANGE
exp(fin) u/fUNDERFLOW0.0nERANGE
exp2(fin) o/fOVERFLOWHUGEnERANGE
exp2(fin) u/fUNDERFLOW0.0nERANGE
exp10(fin) o/fOVERFLOWHUGEnERANGE
exp10(fin) u/fUNDERFLOW0.0nERANGE
j0(|x|>X_TLOSS)TLOSS0.0yERANGE
j1(|x|>X_TLOSS)TLOSS0.0yERANGE
jn(|x|>X_TLOSS)TLOSS0.0yERANGE
y0(x>X_TLOSS)TLOSS0.0yERANGE
y1(x>X_TLOSS)TLOSS0.0yERANGE
yn(x>X_TLOSS)TLOSS0.0yERANGE
y0(0)DOMAIN-HUGEyEDOM
y0(x<0)DOMAIN-HUGEyEDOM
y1(0)DOMAIN-HUGEyEDOM
y1(x<0)DOMAIN-HUGEyEDOM
yn(n,0)DOMAIN-HUGEyEDOM
yn(x<0)DOMAIN-HUGEyEDOM
lgamma(fin) o/fOVERFLOWHUGEnERANGE
lgamma(-int) orSINGHUGEyEDOM
lgamma(0)
tgamma(fin) o/fOVERFLOWHUGE_VALnERANGE
tgamma(-int)SINGNANyEDOM
tgamma(0)SINGcopysign(yERANGE
HUGE_VAL,x)
log(0)SING-HUGEyEDOM
log(x<0)DOMAIN-HUGEyEDOM
log2(0)SING-HUGEnEDOM
log2(x<0)DOMAIN-HUGEnEDOM
log10(0)SING-HUGEyEDOM
log10(x<0)DOMAIN-HUGEyEDOM
pow(0.0,0.0)DOMAIN0.0yEDOM
pow(x,y) o/fOVERFLOWHUGEnERANGE
pow(x,y) u/fUNDERFLOW0.0nERANGE
pow(NaN,0.0)DOMAINxnEDOM
0**negDOMAIN0.0yEDOM
neg**non-intDOMAIN0.0yEDOM
scalb() o/fOVERFLOW(x>0.0) ?nERANGE
HUGE_VAL :
-HUGE_VAL
scalb() u/fUNDERFLOWcopysign(nERANGE
0.0,x)
fmod(x,0)DOMAINxyEDOM
remainder(x,0)DOMAINNANyEDOM

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

matherr()

Thread safetyMT-Safe

EXAMPLES

The example program demonstrates the use of matherr() when calling log(3). The program takes up to three command-line arguments. The first argument is the floating-point number to be given to log(3). If the optional second argument is provided, then _LIB_VERSION is set to _SVID_ so that matherr() is called, and the integer supplied in the command-line argument is used as the return value from matherr(). If the optional third command-line argument is supplied, then it specifies an alternative return value that matherr() should assign as the return value of the math function.

The following example run, where log(3) is given an argument of 0.0, does not use matherr():

$ ./a.out 0.0
errno: Numerical result out of range
x=-inf

In the following run, matherr() is called, and returns 0:

$ ./a.out 0.0 0
matherr SING exception in log() function
        args:   0.000000, 0.000000
        retval: -340282346638528859811704183484516925440.000000
log: SING error
errno: Numerical argument out of domain
x=-340282346638528859811704183484516925440.000000

The message “log: SING error” was printed by the C library.

In the following run, matherr() is called, and returns a nonzero value:

$ ./a.out 0.0 1
matherr SING exception in log() function
        args:   0.000000, 0.000000
        retval: -340282346638528859811704183484516925440.000000
x=-340282346638528859811704183484516925440.000000

In this case, the C library did not print a message, and errno was not set.

In the following run, matherr() is called, changes the return value of the math function, and returns a nonzero value:

$ ./a.out 0.0 1 12345.0
matherr SING exception in log() function
        args:   0.000000, 0.000000
        retval: -340282346638528859811704183484516925440.000000
x=12345.000000

Program source

#define _SVID_SOURCE
#include <errno.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
static int matherr_ret = 0;     /* Value that matherr()
                                   should return */
static int change_retval = 0;   /* Should matherr() change
                                   function's return value? */
static double new_retval;       /* New function return value */
int
matherr(struct exception *exc)
{
    fprintf(stderr, "matherr %s exception in %s() function

“, (exc->type == DOMAIN) ? “DOMAIN” : (exc->type == OVERFLOW) ? “OVERFLOW” : (exc->type == UNDERFLOW) ? “UNDERFLOW” : (exc->type == SING) ? “SING” : (exc->type == TLOSS) ? “TLOSS” : (exc->type == PLOSS) ? “PLOSS” : “???”, exc->name); fprintf(stderr, " args: %f, %f “, exc->arg1, exc->arg2); fprintf(stderr, " retval: %f “, exc->retval); if (change_retval) exc->retval = new_retval; return matherr_ret; } int main(int argc, char *argv[]) { double x; if (argc < 2) { fprintf(stderr, “Usage: %s ” " [ []] “, argv[0]); exit(EXIT_FAILURE); } if (argc > 2) { _LIB_VERSION = SVID; matherr_ret = atoi(argv[2]); } if (argc > 3) { change_retval = 1; new_retval = atof(argv[3]); } x = log(atof(argv[1])); if (errno != 0) perror(“errno”); printf(“x=%f “, x); exit(EXIT_SUCCESS); }

SEE ALSO

fenv(3), math_error(7), standards(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1226 - Linux cli command nearbyintf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command nearbyintf and provides detailed information about the command nearbyintf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the nearbyintf.

NAME 🖥️ nearbyintf 🖥️

round to nearest integer

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double nearbyint(double x);
float nearbyintf(float x);
long double nearbyintl(long double x);
double rint(double x);
float rintf(float x);
long double rintl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

nearbyint(), nearbyintf(), nearbyintl():

    _POSIX_C_SOURCE >= 200112L || _ISOC99_SOURCE

rint():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

rintf(), rintl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The nearbyint(), nearbyintf(), and nearbyintl() functions round their argument to an integer value in floating-point format, using the current rounding direction (see fesetround(3)) and without raising the inexact exception. When the current rounding direction is to nearest, these functions round halfway cases to the even integer in accordance with IEEE-754.

The rint(), rintf(), and rintl() functions do the same, but will raise the inexact exception (FE_INEXACT, checkable via fetestexcept(3)) when the result differs in value from the argument.

RETURN VALUE

These functions return the rounded integer value.

If x is integral, +0, -0, NaN, or infinite, x itself is returned.

ERRORS

No errors occur. POSIX.1-2001 documents a range error for overflows, but see NOTES.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

nearbyint(), nearbyintf(), nearbyintl(), rint(), rintf(), rintl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

NOTES

SUSv2 and POSIX.1-2001 contain text about overflow (which might set errno to ERANGE, or raise an FE_OVERFLOW exception). In practice, the result cannot overflow on any current machine, so this error-handling stuff is just nonsense. (More precisely, overflow can happen only when the maximum value of the exponent is smaller than the number of mantissa bits. For the IEEE-754 standard 32-bit and 64-bit floating-point numbers the maximum value of the exponent is 127 (respectively, 1023), and the number of mantissa bits including the implicit bit is 24 (respectively, 53).)

If you want to store the rounded value in an integer type, you probably want to use one of the functions described in lrint(3) instead.

SEE ALSO

ceil(3), floor(3), lrint(3), round(3), trunc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1227 - Linux cli command sigandset

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigandset and provides detailed information about the command sigandset, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigandset.

NAME 🖥️ sigandset 🖥️

POSIX signal set operations

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
int sigemptyset(sigset_t *set);
int sigfillset(sigset_t *set);
int sigaddset(sigset_t *set, int signum);
int sigdelset(sigset_t *set, int signum);
int sigismember(const sigset_t *set, int signum);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sigemptyset(), sigfillset(), sigaddset(), sigdelset(), sigismember():

    _POSIX_C_SOURCE

DESCRIPTION

These functions allow the manipulation of POSIX signal sets.

sigemptyset() initializes the signal set given by set to empty, with all signals excluded from the set.

sigfillset() initializes set to full, including all signals.

sigaddset() and sigdelset() add and delete respectively signal signum from set.

sigismember() tests whether signum is a member of set.

Objects of type sigset_t must be initialized by a call to either sigemptyset() or sigfillset() before being passed to the functions sigaddset(), sigdelset(), and sigismember() or the additional glibc functions described below (sigisemptyset(), sigandset(), and sigorset()). The results are undefined if this is not done.

RETURN VALUE

sigemptyset(), sigfillset(), sigaddset(), and sigdelset() return 0 on success and -1 on error.

sigismember() returns 1 if signum is a member of set, 0 if signum is not a member, and -1 on error.

On error, these functions set errno to indicate the error.

ERRORS

EINVAL
signum is not a valid signal.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sigemptyset(), sigfillset(), sigaddset(), sigdelset(), sigismember(), sigisemptyset(), sigorset(), sigandset()

Thread safetyMT-Safe

VERSIONS

GNU

If the _GNU_SOURCE feature test macro is defined, then <signal.h> exposes three other functions for manipulating signal sets:

int sigisemptyset(const sigset_t *set);
int sigorset(sigset_t *dest, const sigset_t *left,
 const sigset_t *right);
int sigandset(sigset_t *dest, const sigset_t *left,
 const sigset_t *right);

sigisemptyset() returns 1 if set contains no signals, and 0 otherwise.

sigorset() places the union of the sets left and right in dest. sigandset() places the intersection of the sets left and right in dest. Both functions return 0 on success, and -1 on failure.

These functions are nonstandard (a few other systems provide similar functions) and their use should be avoided in portable applications.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

When creating a filled signal set, the glibc sigfillset() function does not include the two real-time signals used internally by the NPTL threading implementation. See nptl(7) for details.

SEE ALSO

sigaction(2), sigpending(2), sigprocmask(2), sigsuspend(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1228 - Linux cli command HTML_Form_IgnoreInputpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_Form_IgnoreInputpm and provides detailed information about the command HTML_Form_IgnoreInputpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_Form_IgnoreInputpm.

NAME 🖥️ HTML_Form_IgnoreInputpm 🖥️

An HTML form ignored input element for use with HTML::Form

VERSION

version 6.11

AUTHOR

Gisle Aas <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 1998 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1229 - Linux cli command getaliasbyname

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getaliasbyname and provides detailed information about the command getaliasbyname, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getaliasbyname.

NAME 🖥️ getaliasbyname 🖥️

read an alias entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <aliases.h>
void setaliasent(void);
void endaliasent(void);
struct aliasent *getaliasent(void);
int getaliasent_r(struct aliasent *restrict result,
 char buffer[restrict .buflen], size_t buflen,
 struct aliasent **restrict res);
struct aliasent *getaliasbyname(const char *name);
int getaliasbyname_r(const char *restrict name,
 struct aliasent *restrict result,
 char buffer[restrict .buflen], size_t buflen,
 struct aliasent **restrict res);

DESCRIPTION

One of the databases available with the Name Service Switch (NSS) is the aliases database, that contains mail aliases. (To find out which databases are supported, try getent –help.) Six functions are provided to access the aliases database.

The getaliasent() function returns a pointer to a structure containing the group information from the aliases database. The first time it is called it returns the first entry; thereafter, it returns successive entries.

The setaliasent() function rewinds the file pointer to the beginning of the aliases database.

The endaliasent() function closes the aliases database.

getaliasent_r() is the reentrant version of the previous function. The requested structure is stored via the first argument but the programmer needs to fill the other arguments also. Not providing enough space causes the function to fail.

The function getaliasbyname() takes the name argument and searches the aliases database. The entry is returned as a pointer to a struct aliasent.

getaliasbyname_r() is the reentrant version of the previous function. The requested structure is stored via the second argument but the programmer needs to fill the other arguments also. Not providing enough space causes the function to fail.

The struct aliasent is defined in <aliases.h>:

struct aliasent {
    char    *alias_name;             /* alias name */
    size_t   alias_members_len;
    char   **alias_members;          /* alias name list */
    int      alias_local;
};

RETURN VALUE

The functions getaliasent_r() and getaliasbyname_r() return a nonzero value on error.

FILES

The default alias database is the file /etc/aliases. This can be changed in the /etc/nsswitch.conf file.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setaliasent(), endaliasent(), getaliasent_r(), getaliasbyname_r()

Thread safetyMT-Safe locale

getaliasent(), getaliasbyname()

Thread safetyMT-Unsafe

STANDARDS

GNU.

HISTORY

The NeXT system has similar routines:

#include <aliasdb.h>
void alias_setent(void);
void alias_endent(void);
alias_ent *alias_getent(void);
alias_ent *alias_getbyname(char *name);

EXAMPLES

The following example compiles with gcc example.c -o example. It will dump all names in the alias database.

#include <aliases.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    struct aliasent *al;
    setaliasent();
    for (;;) {
        al = getaliasent();
        if (al == NULL)
            break;
        printf("Name: %s

“, al->alias_name); } if (errno) { perror(“reading alias”); exit(EXIT_FAILURE); } endaliasent(); exit(EXIT_SUCCESS); }

SEE ALSO

getgrent(3), getpwent(3), getspent(3), aliases(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1230 - Linux cli command globfree

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command globfree and provides detailed information about the command globfree, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the globfree.

NAME 🖥️ globfree 🖥️

find pathnames matching a pattern, free memory from glob()

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <glob.h>
int glob(const char *restrict pattern, int flags,
 int (*errfunc)(const char *epath, int eerrno),
 glob_t *restrict pglob);
void globfree(glob_t *pglob);

DESCRIPTION

The glob() function searches for all the pathnames matching pattern according to the rules used by the shell (see glob(7)). No tilde expansion or parameter substitution is done; if you want these, use wordexp(3).

The globfree() function frees the dynamically allocated storage from an earlier call to glob().

The results of a glob() call are stored in the structure pointed to by pglob. This structure is of type glob_t (declared in <glob.h>) and includes the following elements defined by POSIX.2 (more may be present as an extension):

typedef struct {
    size_t   gl_pathc;    /* Count of paths matched so far  */
    char   **gl_pathv;    /* List of matched pathnames.  */
    size_t   gl_offs;     /* Slots to reserve in gl_pathv.  */
} glob_t;

Results are stored in dynamically allocated storage.

The argument flags is made up of the bitwise OR of zero or more the following symbolic constants, which modify the behavior of glob():

GLOB_ERR
Return upon a read error (because a directory does not have read permission, for example). By default, glob() attempts carry on despite errors, reading all of the directories that it can.

GLOB_MARK
Append a slash to each path which corresponds to a directory.

GLOB_NOSORT
Don’t sort the returned pathnames. The only reason to do this is to save processing time. By default, the returned pathnames are sorted.

GLOB_DOOFFS
Reserve pglob->gl_offs slots at the beginning of the list of strings in pglob->pathv. The reserved slots contain null pointers.

GLOB_NOCHECK
If no pattern matches, return the original pattern. By default, glob() returns GLOB_NOMATCH if there are no matches.

GLOB_APPEND
Append the results of this call to the vector of results returned by a previous call to glob(). Do not set this flag on the first invocation of glob().

GLOB_NOESCAPE
Don’t allow backslash (’) to be used as an escape character. Normally, a backslash can be used to quote the following character, providing a mechanism to turn off the special meaning metacharacters.

flags may also include any of the following, which are GNU extensions and not defined by POSIX.2:

GLOB_PERIOD
Allow a leading period to be matched by metacharacters. By default, metacharacters can’t match a leading period.

GLOB_ALTDIRFUNC
Use alternative functions pglob->gl_closedir, pglob->gl_readdir, pglob->gl_opendir, pglob->gl_lstat, and pglob->gl_stat for filesystem access instead of the normal library functions.

GLOB_BRACE
Expand csh(1) style brace expressions of the form {a,b}. Brace expressions can be nested. Thus, for example, specifying the pattern “{foo/{,cat,dog},bar}” would return the same results as four separate glob() calls using the strings: “foo/”, “foo/cat”, “foo/dog”, and “bar”.

GLOB_NOMAGIC
If the pattern contains no metacharacters, then it should be returned as the sole matching word, even if there is no file with that name.

GLOB_TILDE
Carry out tilde expansion. If a tilde (’~’) is the only character in the pattern, or an initial tilde is followed immediately by a slash (’/’), then the home directory of the caller is substituted for the tilde. If an initial tilde is followed by a username (e.g., “~andrea/bin”), then the tilde and username are substituted by the home directory of that user. If the username is invalid, or the home directory cannot be determined, then no substitution is performed.

GLOB_TILDE_CHECK
This provides behavior similar to that of GLOB_TILDE. The difference is that if the username is invalid, or the home directory cannot be determined, then instead of using the pattern itself as the name, glob() returns GLOB_NOMATCH to indicate an error.

GLOB_ONLYDIR
This is a hint to glob() that the caller is interested only in directories that match the pattern. If the implementation can easily determine file-type information, then nondirectory files are not returned to the caller. However, the caller must still check that returned files are directories. (The purpose of this flag is merely to optimize performance when the caller is interested only in directories.)

If errfunc is not NULL, it will be called in case of an error with the arguments epath, a pointer to the path which failed, and eerrno, the value of errno as returned from one of the calls to opendir(3), readdir(3), or stat(2). If errfunc returns nonzero, or if GLOB_ERR is set, glob() will terminate after the call to errfunc.

Upon successful return, pglob->gl_pathc contains the number of matched pathnames and pglob->gl_pathv contains a pointer to the list of pointers to matched pathnames. The list of pointers is terminated by a null pointer.

It is possible to call glob() several times. In that case, the GLOB_APPEND flag has to be set in flags on the second and later invocations.

As a GNU extension, pglob->gl_flags is set to the flags specified, ored with GLOB_MAGCHAR if any metacharacters were found.

RETURN VALUE

On successful completion, glob() returns zero. Other possible returns are:

GLOB_NOSPACE
for running out of memory,

GLOB_ABORTED
for a read error, and

GLOB_NOMATCH
for no found matches.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

glob()

Thread safety

MT-Unsafe race:utent env sig:ALRM timer locale

globfree()

Thread safetyMT-Safe

In the above table, utent in race:utent signifies that if any of the functions setutent(3), getutent(3), or endutent(3) are used in parallel in different threads of a program, then data races could occur. glob() calls those functions, so we use race:utent to remind users.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, POSIX.2.

NOTES

The structure elements gl_pathc and gl_offs are declared as size_t in glibc 2.1, as they should be according to POSIX.2, but are declared as int in glibc 2.0.

BUGS

The glob() function may fail due to failure of underlying function calls, such as malloc(3) or opendir(3). These will store their error code in errno.

EXAMPLES

One example of use is the following code, which simulates typing

ls -l *.c ../*.c

in the shell:

glob_t globbuf;
globbuf.gl_offs = 2;
glob("*.c", GLOB_DOOFFS, NULL, &globbuf);
glob("../*.c", GLOB_DOOFFS | GLOB_APPEND, NULL, &globbuf);
globbuf.gl_pathv[0] = "ls";
globbuf.gl_pathv[1] = "-l";
execvp("ls", &globbuf.gl_pathv[0]);

SEE ALSO

ls(1), sh(1), stat(2), exec(3), fnmatch(3), malloc(3), opendir(3), readdir(3), wordexp(3), glob(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1231 - Linux cli command wint_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wint_ttype and provides detailed information about the command wint_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wint_ttype.

NAME 🖥️ wint_ttype 🖥️

integer type capable of storing any wchar_t of WEOF

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <wchar.h>
typedef /* ... */ wint_t;
#define WEOF /* ... */
#include <stdint.h>
#define WINT_WIDTH /* ... */
#define WINT_MAX /* ... */
#define WINT_MIN /* ... */

DESCRIPTION

wint_t is a type used in functions that work with wide characters. It is capable of storing any valid wchar_t or WEOF. It is an integer type.

WEOF is used by wide-character functions to indicate the end of an input file or an error. It is of type wint_t.

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The WINT_WIDTH macro was added in C23.

NOTES

The following header also provides wint_t and WEOF: <wctype.h>.

SEE ALSO

wchar_t(3type), fputwc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1232 - Linux cli command XtRemoveEventHandler

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtRemoveEventHandler and provides detailed information about the command XtRemoveEventHandler, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtRemoveEventHandler.

NAME 🖥️ XtRemoveEventHandler 🖥️

add and remove event handlers

SYNTAX

#include <X11/Intrinsic.h>

void XtAddEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data);

void XtAddRawEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data);

void XtRemoveEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data);

void XtRemoveRawEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data);

void XtInsertEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data, XtListPosition position);

void XtInsertRawEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data, XtListPosition position);

typedef enum { XtListHead, XtListTail } XtListPosition;

ARGUMENTS

client_data
Specifies additional data to be passed to the client’s event handler.

event_mask
Specifies the event mask for which to call or unregister this procedure.

nonmaskable
Specifies a Boolean value that indicates whether this procedure should be called or removed on the nonmaskable events ( GraphicsExpose, NoExpose, SelectionClear, SelectionRequest, SelectionNotify, ClientMessage, and MappingNotify).

proc
Specifies the procedure that is to be added or removed.

  1. Specifies the widget for which this event handler is being registered.

position
Specifies when the event handler is to be called relative to other previously registered handlers.

DESCRIPTION

The XtAddEventHandler function registers a procedure with the dispatch mechanism that is to be called when an event that matches the mask occurs on the specified widget. If the procedure is already registered with the same client_data, the specified mask is ORed into the existing mask. If the widget is realized, XtAddEventHandler calls XSelectInput, if necessary.

The XtAddRawEventHandler function is similar to XtAddEventHandler except that it does not affect the widget’s mask and never causes an XSelectInput for its events. Note that the widget might already have those mask bits set because of other nonraw event handlers registered on it.

The XtRemoveRawEventHandler function stops the specified procedure from receiving the specified events. Because the procedure is a raw event handler, this does not affect the widget’s mask and never causes a call on XSelectInput.

XtInsertEventHandler is identical to XtAddEventHandler with the additional position argument. If position is XtListHead, the event handler is registered to that it will be called before any event handlers that were previously registered for the same widget. If position is XtListTail, the event handler is registered to be called after any previously registered event handlers. If the procedure is already registered with the same client_data value, the specified mask augments the existing mask and the procedure is repositioned in the list.

XtInsertRawEventHandler is similar to XtInsertEventHandler except that it does not modify the widget’s event mask and never causes an XSelectInput for the specified events. If the procedure is already registered with the same client_data value, the specified mask augments the existing mask and the procedure is repositioned in the list.

SEE ALSO

XtAppNextEvent(3), XtBuildEventMask(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1233 - Linux cli command getservent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getservent and provides detailed information about the command getservent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getservent.

NAME 🖥️ getservent 🖥️

get service entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
struct servent *getservent(void);
struct servent *getservbyname(const char *name, const char *proto);
struct servent *getservbyport(int port, const char *proto);
void setservent(int stayopen);
void endservent(void);

DESCRIPTION

The getservent() function reads the next entry from the services database (see services(5)) and returns a servent structure containing the broken-out fields from the entry. A connection is opened to the database if necessary.

The getservbyname() function returns a servent structure for the entry from the database that matches the service name using protocol proto. If proto is NULL, any protocol will be matched. A connection is opened to the database if necessary.

The getservbyport() function returns a servent structure for the entry from the database that matches the port port (given in network byte order) using protocol proto. If proto is NULL, any protocol will be matched. A connection is opened to the database if necessary.

The setservent() function opens a connection to the database, and sets the next entry to the first entry. If stayopen is nonzero, then the connection to the database will not be closed between calls to one of the getserv*() functions.

The endservent() function closes the connection to the database.

The servent structure is defined in <netdb.h> as follows:

struct servent {
    char  *s_name;       /* official service name */
    char **s_aliases;    /* alias list */
    int    s_port;       /* port number */
    char  *s_proto;      /* protocol to use */
}

The members of the servent structure are:

s_name
The official name of the service.

s_aliases
A NULL-terminated list of alternative names for the service.

s_port
The port number for the service given in network byte order.

s_proto
The name of the protocol to use with this service.

RETURN VALUE

The getservent(), getservbyname(), and getservbyport() functions return a pointer to a statically allocated servent structure, or NULL if an error occurs or the end of the file is reached.

FILES

/etc/services
services database file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getservent()

Thread safety

MT-Unsafe race:servent race:serventbuf locale

getservbyname()

Thread safety

MT-Unsafe race:servbyname locale

getservbyport()

Thread safety

MT-Unsafe race:servbyport locale

setservent(), endservent()

Thread safety

MT-Unsafe race:servent locale

In the above table, servent in race:servent signifies that if any of the functions setservent(), getservent(), or endservent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, 4.3BSD.

SEE ALSO

getnetent(3), getprotoent(3), getservent_r(3), services(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1234 - Linux cli command XmbufDestroyBuffers

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XmbufDestroyBuffers and provides detailed information about the command XmbufDestroyBuffers, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XmbufDestroyBuffers.

NAME 🖥️ XmbufDestroyBuffers 🖥️

X multibuffering functions

SYNTAX

#include <X11/extensions/multibuf.h>

Bool XmbufQueryExtension(
    Display *dpy,
    Display *dpy,
    int *event_base_return,
    int *error_base_return);

Status XmbufGetVersion(
    Display *dpy,
    int *major_version_return,
    int *minor_version_return);

int XmbufCreateBuffers(
    Display *dpy,
    Window window,
    int count,
    int update_action,
    int update_hint,
    Multibuffer *buffers_update);

void XmbufDestroyBuffers(
    Display *dpy,
    Window window);

void XmbufDisplayBuffers(
    Display *dpy,
    int count,
    Multibuffer *buffers,
    int min_delay,
    int max_delay);

Status XmbufGetWindowAttributes(
    Display *dpy,
    Window window,
    XmbufWindowAttributes *attributes);

void XmbufChangeWindowAttributes(
    Display *dpy,
    Window window,
    unsigned long valuemask,
    XmbufSetWindowAttributes *attributes);

Status XmbufGetBufferAttributes(
    Display *dpy,
    Multibuffer buffer,
    XmbufBufferAttributes *attributes);

void XmbufChangeBufferAttributes(
    Display *dpy,
    Multibuffer buffer,
    unsigned long valuemask,
    XmbufSetBufferAttributes *attributes);

Status XmbufGetScreenInfo(
    Display *dpy,
    Drawable drawable,
    int *nmono_return,
    XmbufBufferInfo **mono_info_return,
    int *nstereo_return,
    XmbufBufferInfo **stereo_info_return);

Window XmbufCreateStereoWindow(
    Display *dpy,
    Window parent,
    int x,
    int y,
    unsigned int width,
    unsigned int height,
    unsigned int border_width,
    int depth,
    unsigned int class,                 /* InputOutput, InputOnly*/
    Visual *visual,
    unsigned long valuemask,
    XSetWindowAttributes *attributes,
    Multibuffer *left_return,
    Multibuffer *right_return);

STRUCTURES

Events:

typedef struct {
    int type;   /* of event */
    unsigned long serial;       /* # of last request processed by server */
    int send_event;     /* true if this came from a SendEvent request */
    Display *display;   /* Display the event was read from */
    Multibuffer buffer; /* buffer of event */
    int state;  /* see Clobbered constants above */
} XmbufClobberNotifyEvent;

typedef struct {
    int type;   /* of event */
    unsigned long serial;       /* # of last request processed by server */
    int send_event;     /* true if this came from a SendEvent request */
    Display *display;   /* Display the event was read from */
    Multibuffer buffer; /* buffer of event */
} XmbufUpdateNotifyEvent;

Per-window attributes that can be got:

typedef struct {
    int displayed_index;	/* which buffer is being displayed */
    int update_action;	/* Undefined, Background, Untouched, Copied */
    int update_hint;	/* Frequent, Intermittent, Static */
    int window_mode;	/* Mono, Stereo */
    int nbuffers;	/* Number of buffers */
    Multibuffer *buffers;	/* Buffers */
} XmbufWindowAttributes;

Per-window attributes that can be set:

typedef struct {
    int update_hint;	/* Frequent, Intermittent, Static */
} XmbufSetWindowAttributes;

Per-buffer attributes that can be got:

typedef struct {
    Window window;	/* which window this belongs to */
    unsigned long event_mask;	/* events that have been selected */
    int buffer_index;	/* which buffer is this */
    int side;	/* Mono, Left, Right */
} XmbufBufferAttributes;

Per-buffer attributes that can be set:

typedef struct {
    unsigned long event_mask;	/* events that have been selected */
} XmbufSetBufferAttributes;

Per-screen buffer info (there will be lists of them):

typedef struct {
    VisualID visualid;	/* visual usable at this depth */
    int max_buffers;	/* most buffers for this visual */
    int depth;	/* depth of buffers to be created */
} XmbufBufferInfo;

DESCRIPTION

The application programming library for the X11 Double-Buffering, Multi-Buffering, and Stereo Extension contains the interfaces described below. With the exception of * XmbufQueryExtension *, if any of these routines are called with a display that does not support the extension, the ExtensionErrorHandler (which can be set with * XSetExtensionErrorHandler * and functions the same way as * XSetErrorHandler *) will be called and the function will then return.

* XmbufQueryExtension * returns * True * if the multibuffering/stereo extension is available on the given display. If the extension exists, the value of the first event code (which should be added to the event type constants * MultibufferClobberNotify * and * MultibufferUpdateNotify * to get the actual values) is stored into event_base_return and the value of the first error code (which should be added to the error type constant * MultibufferBadBuffer * to get the actual value) is stored into error_base_return.

* XmbufGetVersion * gets the major and minor version numbers of the extension. The return value is zero if an error occurs or non-zero if no error happens.

* XmbufCreateBuffers * requests that “count” buffers be created with the given update_action and update_hint and be associated with the indicated window. The number of buffers created is returned (zero if an error occurred) and buffers_update is filled in with that many Multibuffer identifiers.

* XmbufDestroyBuffers * destroys the buffers associated with the given window.

* XmbufDisplayBuffers * displays the indicated buffers their appropriate windows within max_delay milliseconds after min_delay milliseconds have passed. No two buffers may be associated with the same window or else a Match error is generated.

* XmbufGetWindowAttributes * gets the multibuffering attributes that apply to all buffers associated with the given window. The list of buffers returns may be freed with * XFree *. Returns non-zero on success and zero if an error occurs.

* XmbufChangeWindowAttributes * sets the multibuffering attributes that apply to all buffers associated with the given window. This is currently limited to the update_hint.

* XmbufGetBufferAttributes * gets the attributes for the indicated buffer. Returns non-zero on success and zero if an error occurs.

* XmbufChangeBufferAttributes * sets the attributes for the indicated buffer. This is currently limited to the event_mask.

* XmbufGetScreenInfo * gets the parameters controlling how mono and stereo windows may be created on the screen of the given drawable. The numbers of sets of visual and depths are returned in nmono_return and nstereo_return. If nmono_return is greater than zero, then mono_info_return is set to the address of an array of * XmbufBufferInfo * structures describing the various visuals and depths that may be used. Otherwise, mono_info_return is set to NULL. Similarly, stereo_info_return is set according to nstereo_return. The storage returned in mono_info_return and stereo_info_return may be released by * XFree *. If no errors are encounted, non-zero will be returned.

* XmbufCreateStereoWindow * creates a stereo window in the same way that * XCreateWindow * creates a mono window. The buffer ids for the left and right buffers are returned in left_return and right_return, respectively. If an extension error handler that returns is installed, * None * will be returned if the extension is not available on this display.

PREDEFINED VALUES

Update_action field:

 MultibufferUpdateActionUndefined   MultibufferUpdateActionBackground   MultibufferUpdateActionUntouched   MultibufferUpdateActionCopied 

Update_hint field:

 MultibufferUpdateHintFrequent   MultibufferUpdateHintIntermittent   MultibufferUpdateHintStatic 

Valuemask fields:

 MultibufferWindowUpdateHint   MultibufferBufferEventMask 

Mono vs. stereo and left vs. right:

 MultibufferModeMono   MultibufferModeStereo   MultibufferSideMono   MultibufferSideLeft   MultibufferSideRight 

Clobber state:

 MultibufferUnclobbered   MultibufferPartiallyClobbered   MultibufferFullyClobbered 

Event stuff:

 MultibufferClobberNotifyMask   MultibufferUpdateNotifyMask   MultibufferClobberNotify   MultibufferUpdateNotify   MultibufferNumberEvents   MultibufferBadBuffer   MultibufferNumberErrors 

BUGS

This manual page needs more work.

SEE ALSO

Extending X for Double Buffering, Multi-Buffering, and Stereo

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1235 - Linux cli command Net_DNS_Textpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_Textpm and provides detailed information about the command Net_DNS_Textpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_Textpm.

NAME 🖥️ Net_DNS_Textpm 🖥️

DNS text representation

SYNOPSIS

use Net::DNS::Text; $object = Net::DNS::Text->new(example); $string = $object->string; $object = Net::DNS::Text->decode( \data, $offset ); ( $object, $next ) = Net::DNS::Text->decode( \data, $offset ); $data = $object->encode; $text = $object->value;

DESCRIPTION

The Net::DNS::Text module implements a class of text objects with associated class and instance methods.

Each text object instance has a fixed identity throughout its lifetime.

METHODS

new

$object = Net::DNS::Text->new(example);

Creates a text object which encapsulates a single character string component of a resource record.

Arbitrary single-byte characters can be represented by \ followed by exactly three decimal digits. Such characters are devoid of any special meaning.

A character preceded by \ represents itself, without any special interpretation.

decode

$object = Net::DNS::Text->decode( \buffer, $offset ); ( $object, $next ) = Net::DNS::Text->decode( \buffer, $offset );

Creates a text object which represents the decoded data at the indicated offset within the data buffer.

The argument list consists of a reference to a scalar containing the wire-format data and offset of the text data.

The returned offset value indicates the start of the next item in the data buffer.

encode

$data = $object->encode;

Returns the wire-format encoded representation of the text object suitable for inclusion in a DNS packet buffer.

raw

$data = $object->raw;

Returns the wire-format encoded representation of the text object without the explicit length field.

value

$value = $text->value;

Character string representation of the text object.

string

$string = $text->string;

Conditionally quoted RFC1035 zone file representation of the text object.

unicode

$string = $text->unicode;

Conditionally quoted Unicode representation of the text object.

BUGS

Coding strategy is intended to avoid creating unnecessary argument lists and stack frames. This improves efficiency at the expense of code readability.

Platform specific character coding features are conditionally compiled into the code.

COPYRIGHT

Copyright (c)2009-2011 Dick Franks.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS RFC1035 <https://tools.ietf.org/html/rfc1035> RFC3629 <https://tools.ietf.org/html/rfc3629>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1236 - Linux cli command lfind

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lfind and provides detailed information about the command lfind, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lfind.

NAME 🖥️ lfind 🖥️

linear search of an array

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <search.h>
void *lfind(const void key[.size], const void base[.size * .nmemb],
 size_t *nmemb, size_t size,
 int(*compar)(const void [.size], const void [.size]));
void *lsearch(const void key[.size], void base[.size * .nmemb],
 size_t *nmemb, size_t size,
 int(*compar)(const void [.size], const void [.size]));

DESCRIPTION

lfind() and lsearch() perform a linear search for key in the array base which has *nmemb elements of size bytes each. The comparison function referenced by compar is expected to have two arguments which point to the key object and to an array member, in that order, and which returns zero if the key object matches the array member, and nonzero otherwise.

If lsearch() does not find a matching element, then the key object is inserted at the end of the table, and *nmemb is incremented. In particular, one should know that a matching element exists, or that more room is available.

RETURN VALUE

lfind() returns a pointer to a matching member of the array, or NULL if no match is found. lsearch() returns a pointer to a matching member of the array, or to the newly added member if no match is found.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

lfind(), lsearch()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4, 4.3BSD. libc-4.6.27.

BUGS

The naming is unfortunate.

SEE ALSO

bsearch(3), hsearch(3), tsearch(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1237 - Linux cli command Net_DBus_Exporterpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Exporterpm and provides detailed information about the command Net_DBus_Exporterpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Exporterpm.

NAME 🖥️ Net_DBus_Exporterpm 🖥️

Export object methods and signals to the bus

SYNOPSIS

# Define a new package for the object were going # to export package Demo::HelloWorld; # Specify the main interface provided by our object use Net::DBus::Exporter qw(org.example.demo.Greeter); # Were going to be a DBus object use base qw(Net::DBus::Object); # Ensure only explicitly exported methods can be invoked dbus_strict_exports; # Export a Greeting signal taking a stringl string parameter dbus_signal(“Greeting”, [“string”]); # Export Hello as a method accepting a single string # parameter, and returning a single string value dbus_method(“Hello”, [“string”], [“string”]); # Export Goodbye as a method accepting a single string # parameter, and returning a single string, but put it # in the org.exaple.demo.Farewell interface dbus_method(“Goodbye”, [“string”], [“string”], “org.example.demo.Farewell”);

DESCRIPTION

The Net::DBus::Exporter module is used to export methods and signals defined in an object to the message bus. Since Perl is a loosely typed language it is not possible to automatically determine correct type information for methods to be exported. Thus when sub-classing Net::DBus::Object, this package will provide the type information for methods and signals.

When importing this package, an optional argument can be supplied to specify the default interface name to associate with methods and signals, for which an explicit interface is not specified. Thus in the common case of objects only providing a single interface, this removes the need to repeat the interface name against each method exported.

SCALAR TYPES

When specifying scalar data types for parameters and return values, the following string constants must be used to denote the data type. When values corresponding to these types are (un)marshalled they are represented as the Perl SCALAR data type (see perldata).

“string”
A UTF-8 string of characters

“int16”
A 16-bit signed integer

“uint16”
A 16-bit unsigned integer

“int32”
A 32-bit signed integer

“uint32”
A 32-bit unsigned integer

“int64”
A 64-bit signed integer. NB, this type is not supported by many builds of Perl on 32-bit platforms, so if used, your data is liable to be truncated at 32-bits.

“uint64”
A 64-bit unsigned integer. NB, this type is not supported by many builds of Perl on 32-bit platforms, so if used, your data is liable to be truncated at 32-bits.

“byte”
A single 8-bit byte

“bool”
A boolean value

“double”
An IEEE double-precision floating point

COMPOUND TYPES

When specifying compound data types for parameters and return values, an array reference must be used, with the first element being the name of the compound type.

[“array”, ARRAY-TYPE]
An array of values, whose type os ARRAY-TYPE. The ARRAY-TYPE can be either a scalar type name, or a nested compound type. When values corresponding to the array type are (un)marshalled, they are represented as the Perl ARRAY data type (see perldata). If, for example, a method was declared to have a single parameter with the type, [“array”, “string”], then when calling the method one would provide a array reference of strings: $object->hello([“John”, “Doe”])

[“dict”, KEY-TYPE, VALUE-TYPE]
A dictionary of values, more commonly known as a hash table. The KEY-TYPE is the name of the scalar data type used for the dictionary keys. The VALUE-TYPE is the name of the scalar, or compound data type used for the dictionary values. When values corresponding to the dict type are (un)marshalled, they are represented as the Perl HASH data type (see perldata). If, for example, a method was declared to have a single parameter with the type [“dict”, “string”, “string”], then when calling the method one would provide a hash reference of strings, $object->hello({forename => “John”, surname => “Doe”});

[“struct”, VALUE-TYPE-1, VALUE-TYPE-2]
A structure of values, best thought of as a variation on the array type where the elements can vary. Many languages have an explicit name associated with each value, but since Perl does not have a native representation of structures, they are represented by the LIST data type. If, for exaple, a method was declared to have a single parameter with the type [“struct”, “string”, “string”], corresponding to the C structure struct { char *forename; char *surname; } name; then, when calling the method one would provide an array reference with the values orded to match the structure $object->hello([“John”, “Doe”]);

MAGIC TYPES

When specifying introspection data for an exported service, there are a couple of so called magic types. Parameters declared as magic types are not visible to clients, but instead their values are provided automatically by the server side bindings. One use of magic types is to get an extra parameter passed with the unique name of the caller invoking the method.

“caller”
The value passed in is the unique name of the caller of the method. Unique names are strings automatically assigned to client connections by the bus daemon, for example ‘:1.15’

“serial”
The value passed in is an integer within the scope of a caller, which increments on every method call.

ANNOTATIONS

When exporting methods, signals & properties, in addition to the core data typing information, a number of metadata annotations are possible. These are specified by passing a hash reference with the desired keys as the last parameter when defining the export. The following annotations are currently supported

no_return
Indicate that this method does not return any value, and thus no reply message should be sent over the wire, likewise informing the clients not to expect / wait for a reply message

deprecated
Indicate that use of this method/signal/property is discouraged, and it may disappear altogether in a future release. Clients will typically print out a warning message when a deprecated method/signal/property is used.

param_names
An array of strings specifying names for the input parameters of the method or signal. If omitted, no names will be assigned.

return_names
An array of strings specifying names for the return parameters of the method. If omitted, no names will be assigned.

strict_exceptions
Exceptions thrown by this method which are not of type Net::DBus::Error will not be caught and converted to D-Bus errors. They will be rethrown and continue up the stack until something else catches them (or the process dies).

METHODS

dbus_method($name, $params, $returns, [\annotations]);

dbus_method($name, $params, $returns, $interface, [\annotations]);

Exports a method called $name, having parameters whose types are defined by $params, and returning values whose types are defined by $returns. If the $interface parameter is provided, then the method is associated with that interface, otherwise the default interface for the calling package is used. The value for the $params parameter should be an array reference with each element defining the data type of a parameter to the method. Likewise, the $returns parameter should be an array reference with each element defining the data type of a return value. If it not possible to export a method which accepts a variable number of parameters, or returns a variable number of values.

dbus_no_strict_exports();
If a object is using the Exporter to generate DBus introspection data, the default behaviour is to only allow invocation of methods which have been explicitly exported. To allow clients to access methods which have not been explicitly exported, call dbus_no_strict_exports. NB, doing this may be a security risk if you have methods considered to be “private” for internal use only. As such this method should not normally be used. It is here only to allow switching export behaviour to match earlier releases.

dbus_property($name, $type, $access, [\attributes]);

dbus_property($name, $type, $access, $interface, [\attributes]);

Exports a property called $name, whose data type is $type. If the $interface parameter is provided, then the property is associated with that interface, otherwise the default interface for the calling package is used.

dbus_signal($name, $params, [\attributes]);

dbus_signal($name, $params, $interface, [\attributes]);

Exports a signal called $name, having parameters whose types are defined by $params. If the $interface parameter is provided, then the signal is associated with that interface, otherwise the default interface for the calling package is used. The value for the $params parameter should be an array reference with each element defining the data type of a parameter to the signal. Signals do not have return values. It not possible to export a signal which has a variable number of parameters.

EXAMPLES

No parameters, no return values
A method which simply prints “Hello World” each time its called sub Hello { my $self = shift; print “Hello World “; } dbus_method(“Hello”, [], []);

One string parameter, returning an boolean value
A method which accepts a process name, issues the killall command on it, and returns a boolean value to indicate whether it was successful. sub KillAll { my $self = shift; my $processname = shift; my $ret = system(“killall $processname”); return $ret == 0 ? 1 : 0; } dbus_method(“KillAll”, [“string”], [“bool”]);

One list of strings parameter, returning a dictionary
A method which accepts a list of files names, stats them, and returns a dictionary containing the last modification times. sub LastModified { my $self = shift; my $files = shift; my %mods; foreach my $file (@{$files}) { $mods{$file} = (stat $file)[9]; } return \mods; } dbus_method(“LastModified”, [“array”, “string”], [“dict”, “string”, “int32”]);

Annotating methods with metdata
A method which is targeted for removal, and also does not return any value sub PlayMP3 { my $self = shift; my $track = shift; system “mpg123 $track &”; } dbus_method(“PlayMP3”, [“string”], [], { deprecated => 1, no_return => 1 }); Or giving names to input parameters: sub PlayMP3 { my $self = shift; my $track = shift; system “mpg123 $track &”; } dbus_method(“PlayMP3”, [“string”], [], { param_names => [“track”] });

AUTHOR

Daniel P. Berrange <[email protected]>

COPYRIGHT

Copright (C) 2004-2011, Daniel Berrange.

SEE ALSO

Net::DBus::Object, Net::DBus::Binding::Introspector

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1238 - Linux cli command Image_ExifTool_FlashPixpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_FlashPixpm and provides detailed information about the command Image_ExifTool_FlashPixpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_FlashPixpm.

NAME 🖥️ Image_ExifTool_FlashPixpm 🖥️

Read FlashPix meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to extract FlashPix meta information from FPX images, and from the APP2 FPXR segment of JPEG images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.exif.org/Exif2-2.PDF>

<http://www.graphcomp.com/info/specs/livepicture/fpx.pdf>

<http://search.cpan.org/~jdb/libwin32/>

<http://msdn.microsoft.com/en-us/library/aa380374.aspx>

SEE ALSO

“FlashPix Tags” in Image::ExifTool::TagNames, “OOXML Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1239 - Linux cli command pthread_spin_lock

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_spin_lock and provides detailed information about the command pthread_spin_lock, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_spin_lock.

NAME 🖥️ pthread_spin_lock 🖥️

lock and unlock a spin lock

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_spin_lock(pthread_spinlock_t *lock);
int pthread_spin_trylock(pthread_spinlock_t *lock);
int pthread_spin_unlock(pthread_spinlock_t *lock);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

pthread_spin_lock(), pthread_spin_trylock():

    _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The pthread_spin_lock() function locks the spin lock referred to by lock. If the spin lock is currently unlocked, the calling thread acquires the lock immediately. If the spin lock is currently locked by another thread, the calling thread spins, testing the lock until it becomes available, at which point the calling thread acquires the lock.

Calling pthread_spin_lock() on a lock that is already held by the caller or a lock that has not been initialized with pthread_spin_init(3) results in undefined behavior.

The pthread_spin_trylock() function is like pthread_spin_lock(), except that if the spin lock referred to by lock is currently locked, then, instead of spinning, the call returns immediately with the error EBUSY.

The pthread_spin_unlock() function unlocks the spin lock referred to lock. If any threads are spinning on the lock, one of those threads will then acquire the lock.

Calling pthread_spin_unlock() on a lock that is not held by the caller results in undefined behavior.

RETURN VALUE

On success, these functions return zero. On failure, they return an error number.

ERRORS

pthread_spin_lock() may fail with the following errors:

EDEADLOCK
The system detected a deadlock condition.

pthread_spin_trylock() fails with the following errors:

EBUSY
The spin lock is currently locked by another thread.

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.2. POSIX.1-2001.

CAVEATS

Applying any of the functions described on this page to an uninitialized spin lock results in undefined behavior.

Carefully read NOTES in pthread_spin_init(3).

SEE ALSO

pthread_spin_destroy(3), pthread_spin_init(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1240 - Linux cli command Image_ExifTool_MIEpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_MIEpm and provides detailed information about the command Image_ExifTool_MIEpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_MIEpm.

NAME 🖥️ Image_ExifTool_MIEpm 🖥️

Read/write MIE meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to read and write information in MIE files.

WHAT IS MIE?

MIE stands for “Meta Information Encapsulation”. The MIE format is an extensible, dedicated meta information format which supports storage of binary as well as textual meta information. MIE can be used to encapsulate meta information from many sources and bundle it together with any type of file.

Features

Below is very subjective score card comparing the features of a number of common file and meta information formats, and comparing them to MIE. The following features are rated for each format with a score of 0 to 10:

1) Extensible (can incorporate user-defined information). 2) Meaningful tag IDs (hint to meaning of unknown information). 3) Sequential read/write ability (streamable). 4) Hierarchical information structure. 5) Easy to implement reader/writer/editor. 6) Order of information well defined. 7) Large data lengths supported: >64kB (+5) and >4GB (+5). 8) Localized text strings. 9) Multiple documents in a single file. 10) Compact format doesnt squander disk space or bandwidth. 11) Compressed meta information supported. 12) Relocatable data elements (ie. no fixed offsets). 13) Binary meta information (+7) with variable byte order (+3). 14) Mandatory tags not required (an unnecessary complication). 15) Append information to end of file without editing. Feature number Total Format 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Score —— ——————————————— —– MIE 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 150 PDF 10 10 0 10 0 0 10 0 10 10 10 0 7 10 10 97 PNG 10 10 10 0 8 0 5 10 0 10 10 10 0 10 0 93 XMP 10 10 10 10 2 0 10 10 10 0 0 10 0 10 0 92 AIFF 0 5 10 10 10 0 5 0 0 10 0 10 7 10 0 77 RIFF 0 5 10 10 10 0 5 0 0 10 0 10 7 10 0 77 JPEG 10 0 10 0 10 0 0 0 0 10 0 10 7 10 0 67 EPS 10 10 10 0 0 0 10 0 10 0 0 5 0 10 0 65 CIFF 0 0 0 10 10 0 5 0 0 10 0 10 10 10 0 65 TIFF 0 0 0 10 5 10 5 0 10 10 0 0 10 0 0 60 EXIF 0 0 0 10 5 10 0 0 0 10 0 0 10 0 0 45 IPTC 0 0 10 0 8 0 0 0 0 10 0 10 7 0 0 45

By design, MIE ranks highest by a significant margin. Other formats with reasonable scores are PDF, PNG and XMP, but each has significant weak points. What may be surprising is that TIFF, EXIF and IPTC rank so low.

As well as scoring high in all these features, the MIE format has the unique ability to encapsulate any other type of file, and provides a non-invasive method of adding meta information to a file. The meta information is logically separated from the original file data, which is extremely important because meta information is routinely lost when files are edited.

Also, the MIE format supports multiple files by simple concatenation, enabling all kinds of wonderful features such as linear databases, edit histories or non-intrusive file updates. This ability can also be leveraged to allow MIE-format trailers to be added to some other file types.

MIE 1.1 FORMAT SPECIFICATION (2007-01-21)

File Structure

A MIE file consists of a series of MIE elements. A MIE element may contain either data or a group of MIE elements, providing a hierarchical format for storing data. Each MIE element is identified by a human-readable tag name, and may store data from zero to 2^64-1 bytes in length.

File Signature

The first element in the MIE file must be an uncompressed MIE group element with a tag name of “0MIE”. This restriction allows the first 8 bytes of a MIE file to be used to identify a MIE format file. The following table lists the two possible initial byte sequences for a MIE-format file (the first for big-endian, and the second for little-endian byte ordering):

Byte Number: 0 1 2 3 4 5 6 7 C Characters: ~   ? 0 M I E or ~   ? 0 M I E Hexadecimal: 7e 10 04 ? 30 4d 49 45 or 7e 18 04 ? 30 4d 49 45 Decimal: 126 16 4 ? 48 77 73 69 or 126 24 4 ? 48 77 73 69

Note that byte 1 may have one of the two possible values (0x10 or 0x18), and byte 3 may have any value (0x00 to 0xff).

Element Structure

1 byte SyncByte = 0x7e (decimal 126, character ~) 1 byte FormatCode (see below) 1 byte TagLength (T) 1 byte DataLength (gives D if DataLength < 253) T bytes TagName (T given by TagLength) 2 bytes DataLength2 [exists only if DataLength == 255 (0xff)] 4 bytes DataLength4 [exists only if DataLength == 254 (0xfe)] 8 bytes DataLength8 [exists only if DataLength == 253 (0xfd)] D bytes DataBlock (D given by DataLength)

The minimum element length is 4 bytes (for a group terminator). The maximum DataBlock size is 2^64-1 bytes. TagLength and DataLength are unsigned integers, and the byte ordering for multi-byte DataLength fields is specified by the containing MIE group element. The SyncByte is byte aligned, so no padding is added to align on an N-byte boundary.

FormatCode

The format code is a bitmask that defines the format of the data:

7654 3210 ++++ —- FormatType —- +— TypeModifier —- -+– Compressed —- –++ FormatSize

FormatType (bitmask 0xf0):
0x00 - other (or unknown) data 0x10 - MIE group 0x20 - text string 0x30 - list of null-separated text strings 0x40 - integer 0x50 - rational 0x60 - fixed point 0x70 - floating point 0x80 - free space

TypeModifier (bitmask 0x08):
Modifies the meaning of certain FormatTypes (0x00-0x60): 0x08 - other data sensitive to MIE group byte order 0x18 - MIE group with little-endian byte ordering 0x28 - UTF encoded text string 0x38 - UTF encoded text string list 0x48 - signed integer 0x58 - signed rational (denominator is always unsigned) 0x68 - signed fixed-point

Compressed (bitmask 0x04):
If this bit is set, the data block is compressed using Zlib deflate. An entire MIE group may be compressed, with the exception of file-level groups.

FormatSize (bitmask 0x03):
Gives the byte size of each data element: 0x00 - 8 bits (1 byte) 0x01 - 16 bits (2 bytes) 0x02 - 32 bits (4 bytes) 0x03 - 64 bits (8 bytes) The number of bytes in a single value for this format is given by 2**FormatSize (or 1 << FormatSize). The number of values is the data length divided by this number of bytes. It is an error if the data length is not an even multiple of the format size in bytes.

The following is a list of all currently defined MIE FormatCode values for uncompressed data (add 0x04 to each value for compressed data):

0x00 - other data (insensitive to MIE group byte order) (1) 0x01 - other 16-bit data (may be byte swapped) 0x02 - other 32-bit data (may be byte swapped) 0x03 - other 64-bit data (may be byte swapped) 0x08 - other data (sensitive to MIE group byte order) (1) 0x10 - MIE group with big-endian values (1) 0x18 - MIE group with little-endian values (1) 0x20 - ASCII (ISO 8859-1) string (2,3) 0x28 - UTF-8 string (2,3,4) 0x29 - UTF-16 string (2,3,4) 0x2a - UTF-32 string (2,3,4) 0x30 - ASCII (ISO 8859-1) string list (3,5) 0x38 - UTF-8 string list (3,4,5) 0x39 - UTF-16 string list (3,4,5) 0x3a - UTF-32 string list (3,4,5) 0x40 - unsigned 8-bit integer 0x41 - unsigned 16-bit integer 0x42 - unsigned 32-bit integer 0x43 - unsigned 64-bit integer (6) 0x48 - signed 8-bit integer 0x49 - signed 16-bit integer 0x4a - signed 32-bit integer 0x4b - signed 64-bit integer (6) 0x52 - unsigned 32-bit rational (16-bit numerator then denominator) (7) 0x53 - unsigned 64-bit rational (32-bit numerator then denominator) (7) 0x5a - signed 32-bit rational (denominator is unsigned) (7) 0x5b - signed 64-bit rational (denominator is unsigned) (7) 0x61 - unsigned 16-bit fixed-point (high 8 bits is integer part) (8) 0x62 - unsigned 32-bit fixed-point (high 16 bits is integer part) (8) 0x69 - signed 16-bit fixed-point (high 8 bits is signed integer) (8) 0x6a - signed 32-bit fixed-point (high 16 bits is signed integer) (8) 0x72 - 32-bit IEEE float (not recommended for portability reasons) 0x73 - 64-bit IEEE double (not recommended for portability reasons) (6) 0x80 - free space (value data does not contain useful information)

Notes:

  1. The byte ordering specified by the MIE group TypeModifier applies to the MIE group element as well as all elements within the group. Data for all FormatCodes except 0x08 (other data, sensitive to byte order) may be transferred between MIE groups with different byte order by byte swapping the uncompressed data according to the specified data format. The following list illustrates the byte-swapping pattern, based on FormatSize, for all format types except rational (FormatType 0x50). FormatSize Change in Byte Sequence ————– ———————————– 0x00 (8 bits) 0 1 2 3 4 5 6 7 –> 0 1 2 3 4 5 6 7 (no change) 0x01 (16 bits) 0 1 2 3 4 5 6 7 –> 1 0 3 2 5 4 7 6 0x02 (32 bits) 0 1 2 3 4 5 6 7 –> 3 2 1 0 7 6 5 4 0x03 (64 bits) 0 1 2 3 4 5 6 7 –> 7 6 5 4 3 2 1 0 Rational values consist of two integers, so they are swapped as the next lower FormatSize. For example, a 32-bit rational (FormatSize 0x02, and FormatCode 0x52 or 0x5a) is swapped as two 16-bit values (ie. as if it had FormatSize 0x01).

  2. The TagName of a string element may have an 6-character suffix to indicate a specific locale. (eg. “Title-en_US”, or “Keywords-de_DE”).

  3. Text strings are not normally null terminated, however they may be padded with one or more null characters to the end of the data block to allow strings to be edited within fixed-length data blocks. Newlines in the text are indicated by a single LF (0x0a) character.

  4. UTF strings must not begin with a byte order mark (BOM) since the byte order and byte size are specified by the MIE format. If a BOM is found, it should be treated as a zero-width non-breaking space.

  5. A list of text strings separated by null characters. These lists must not be null padded or null terminated, since this would be interpreted as additional zero-length strings. For ASCII and UTF-8 strings, the null character is a single zero (0x00) byte. For UTF-16 or UTF-32 strings, the null character is 2 or 4 zero bytes respectively.

  6. 64-bit integers and doubles are subject to the specified byte ordering for both 32-bit words and bytes within these words. For instance, the high order byte is always the first byte if big-endian, and the eighth byte if little-endian. This means that some swapping is always necessary for these values on systems where the byte order differs from the word order (eg. some ARM systems), regardless of the endian-ness of the stored values.

  7. Rational values are treated as two separate integers. The numerator always comes first regardless of the byte ordering. In a signed rational value, only the numerator is signed. The denominator of all rational values is unsigned (eg. a signed 64-bit rational of 0x80000000/0x80000000 evaluates to -1, not +1).

  8. 32-bit fixed point values are converted to floating point by treating them as an integer and dividing by an appropriate value. eg) 16-bit fixed value = 16-bit integer value / 256.0 32-bit fixed value = 32-bit integer value / 65536.0

TagLength

Gives the length of the TagName string. Any value between 0 and 255 is valid, but the TagLength of 0 is valid only for the MIE group terminator.

DataLength

DataLength is an unsigned byte that gives the number of bytes in the data block. A value between 0 and 252 gives the data length directly, and numbers from 253 to 255 are reserved for extended DataLength codes. Codes of 255, 254 and 253 indicate that the element contains an additional 2, 4 or 8 byte unsigned integer representing the data length.

0-252 - length of data block 255 (0xff) - use DataLength2 254 (0xfe) - use DataLength4 253 (0xfd) - use DataLength8

A DataLength of zero is valid for any element except a compressed MIE group. A zero DataLength for an uncompressed MIE group indicates that the group length is unknown. For other elements, a zero length indicates there is no associated data. A terminator element must have a DataLength of 0, 6 or 10, and may not use an extended DataLength.

TagName

The TagName string is 0 to 255 bytes long, and is composed of the ASCII characters A-Z, a-z, 0-9 and underline (’_’). Also, a dash (’-’) is used to separate the language/country code in the TagName of a localized text string, and a units string (possibly containing other ASCII characters) may be appear in brackets at the end of the TagName. The TagName string is NOT null terminated. A MIE element with a tag string of zero length is reserved for the group terminator.

MIE elements are sorted alphabetically by TagName within each group. Multiple elements with the same TagName are allowed, even within the same group.

TagNames should be meaningful. Case is significant. Words should be lowercase with an uppercase first character, and acronyms should be all upper case. The underline ("_") is provided to allow separation of two acronyms or two numbers, but it shouldn’t be used unless necessary. No separation is necessary between an acronym and a word (eg. “ISOSetting”).

All TagNames should start with an uppercase letter. An exception to this rule allows tags to begin with a digit (0-9) if they must come before other tags in the sort order, or a lowercase letter (a-z) if they must come after. For instance, the ‘0Type’ element begins with a digit so it comes before, and the ‘data’ element begins with a lowercase letter so that it comes after meta information tags in the main “0MIE” group.

Tag names for localized text strings have an 6-character suffix with the following format: The first character is a dash (’-’), followed by a 2-character lower case ISO 639-1 language code, then an underline (’_’), and ending with a 2-character upper case ISO 3166-1 alpha 2 country code. (eg. “-en_US”, “-en_GB”, “-de_DE” or “-fr_FR”. Note that “GB”, and not “UK” is the code for Great Britain, although “UK” should be recognized for compatibility reasons.) The suffix is included when sorting the tags alphabetically, so the default locale (with no tag-name suffix) always comes first. If the country is unknown or not applicable, a country code of “XX” should be used.

Tags with numerical values may allow units of measurement to be specified. The units string is stored in brackets at the end of the tag name, and is composed of zero or more ASCII characters in the range 0x21 to 0x7d, excluding the bracket characters 0x28 and 0x29. (eg. “Resolution(/cm)” or “SpecificHeat(J/kg.K)”.) See Image::ExifTool::MIEUnits for details. Unit strings are not localized, and may not be used in combination with localized text strings.

Sets of tags which would require a common prefix should be added in a separate MIE group instead of adding the prefix to all tag names. For example, instead of these TagName’s:

ExternalFlashType ExternalFlashSerialNumber ExternalFlashFired

one would instead designate a separate “ExternalFlash” MIE group to contain the following elements:

Type SerialNumber Fired

DataLength2/4/8

These extended DataLength fields exist only if DataLength is 255, 254 or 253, and are respectively 2, 4 or 8 byte unsigned integers giving the data block length. One of these values must be used if the data block is larger than 252 bytes, but they may be used if desired for smaller blocks too (although this may add a few unnecessary bytes to the MIE element).

DataBlock

The data value for the MIE element. The format of the data is given by the FormatCode. For MIE group elements, the data includes all contained elements and the group terminator.

MIE groups

All MIE data elements must be contained within a group. A group begins with a MIE group element, and ends with a group terminator. Groups may be nested in a hierarchy to arbitrary depth.

A MIE group element is identified by a format code of 0x10 (big endian byte ordering) or 0x18 (little endian). The group terminator is distinguished by a zero TagLength (it is the only element allowed to have a zero TagLength), and has a FormatCode of 0x00.

The MIE group element is permitted to have a zero DataLength only if the data is uncompressed. This special value indicates that the group length is unknown (otherwise the minimum value for DataLength is 4, corresponding the the minimum group size which includes a terminator of at least 4 bytes). If DataLength is zero, all elements in the group must be parsed until the group terminator is found. If non-zero, DataLength includes the length of all elements contained within the group, including the group terminator. Use of a non-zero DataLength is encouraged because it allows readers quickly skip over entire MIE groups. For compressed groups DataLength must be non-zero, and is the length of the compressed group data (which includes the compressed group terminator).

Group Terminator

The group terminator has a FormatCode and TagLength of zero. The terminator DataLength must be 0, 6 or 10 bytes, and extended DataLength codes may not be used. With a zero DataLength, the byte sequence for a terminator is “7e 00 00 00” (hex). With a DataLength of 6 or 10 bytes, the terminator data block contains information about the length and byte ordering of the preceding group. This additional information is recommended for file-level groups, and is used in multi-document MIE files and MIE trailers to allow the file to be scanned backwards from the end. (This may also allow some documents to be recovered if part of the file is corrupted.) The structure of this optional terminator data block is as follows:

4 or 8 bytes GroupLength (unsigned integer) 1 byte ByteOrder (0x10 or 0x18, same as MIE group) 1 byte GroupLengthSize (0x04 or 0x08)

The ByteOrder and GroupLengthSize values give the byte ordering and size of the GroupLength integer. The GroupLength value is the total length of the entire MIE group ending with this terminator, including the opening MIE group element and the terminator itself.

File-level MIE groups

File-level MIE groups may NOT be compressed.

All elements in a MIE file are contained within a special group with a TagName of “0MIE”. The purpose of the “OMIE” group is to provide a unique signature at the start of the file, and to encapsulate information allowing files to be easily combined. The “0MIE” group must be terminated like any other group, but it is recommended that the terminator of a file-level group include the optional data block (defined above) to provide information about the group length and byte order.

It is valid to have more than one “0MIE” group at the file level, allowing multiple documents in a single MIE file. Furthermore, the MIE structure enables multi-document files to be generated by simply concatenating two or more MIE files.

Scanning Backwards through a MIE File

The steps below give an algorithm to quickly locate the last document in a MIE file:

  1. Read the last 10 bytes of the file. (Note that a valid MIE file may be as short as 12 bytes long, but a file this length contains only an an empty MIE group.)

  2. If the last byte of the file is zero, then it is not possible to scan backward through the file, so the file must be scanned from the beginning. Otherwise, proceed to the next step.

  3. If the last byte is 4 or 8, the terminator contains information about the byte ordering and length of the group. Otherwise, stop here because this isn’t a valid MIE file.

  4. The next-to-last byte must be either 0x10 indicating big-endian byte ordering or 0x18 for little-endian ordering, otherwise this isn’t a valid MIE file.

  5. The value of the preceding 4 or 8 bytes gives the length of the complete file-level MIE group (GroupLength). This length includes both the leading MIE group element and the terminator element itself. The value is an unsigned integer with a byte length given in step 3), and a byte order from step 4). From the current file position (at the end of the data read in step 1), seek backward by this number of bytes to find the start of the MIE group element for this document.

This algorithm may be repeated again beginning at this point in the file to locate the next-to-last document, etc.

The table below lists all 5 valid patterns for the last 14 bytes of a file-level MIE group, with all numbers in hex. The comments indicate the length and byte ordering of GroupLength (xx) if available:

?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 7e 00 00 00 - (no GroupLength) ?? ?? ?? ?? 7e 00 00 06 xx xx xx xx 10 04 - 4 bytes, big endian ?? ?? ?? ?? 7e 00 00 06 xx xx xx xx 18 04 - 4 bytes, little endian 7e 00 00 0a xx xx xx xx xx xx xx xx 10 08 - 8 bytes, big endian 7e 00 00 0a xx xx xx xx xx xx xx xx 18 08 - 8 bytes, little endian

Trailer Signature

The MIE format may be used for trailer information appended to other types of files. When this is done, a signature must appear at the end of the main MIE group to uniquely identify the MIE format trailer. To achieve this, a “zmie” trailer signature is written as the last element in the main “0MIE” group. This element has a FormatCode of 0, a TagLength of 4, a DataLength of 0, and a TagName of “zmie”. With this signature, the hex byte sequence “7e 00 04 00 7a 6d 69 65” appears immediately before the final group terminator, and the last 22 bytes of the trailer correspond to one of the following 4 patterns (where the trailer length is given by “xx”, as above):

?? ?? ?? ?? 7e 00 04 00 7a 6d 69 65 7e 00 00 06 xx xx xx xx 10 04 ?? ?? ?? ?? 7e 00 04 00 7a 6d 69 65 7e 00 00 06 xx xx xx xx 18 04 7e 00 04 00 7a 6d 69 65 7e 00 00 0a xx xx xx xx xx xx xx xx 10 08 7e 00 04 00 7a 6d 69 65 7e 00 00 0a xx xx xx xx xx xx xx xx 18 08

Note that the zero-DataLength terminator may not be used here because the trailer length must be known for seeking backwards from the end of the file.

Multiple trailers may be appended to the same file using this technique.

MIE Data Values

MIE data values for a given tag are usually not restricted to a specific FormatCode. Any value may be represented in any appropriate format, including numbers represented in string (ASCII or UTF) form.

It is preferred that closely related values with the same format are written to a single tag instead of using multiple tags. This improves localization of like values and decreases MIE element overhead. For instance, instead of separate ImageWidth and ImageHeight tags, a single ImageSize tag is defined.

Tags which may take on a discrete set of values should have meaningful values if possible. This improves the extensibility of the format and allows a more reasonable interpretation of unrecognized values.

Numerical Representation

Integer and floating point numbers may be represented in binary or string form. In string form, integers are a series of digits with an optional leading sign (eg. “[+|-]DDDDDD”), and multiple values are separated by a single space character (eg. “23 128 -32”). Floating point numbers are similar but may also contain a decimal point and/or a signed exponent with a leading ’e’ character (eg. “[+|-]DD[.DDDDDD][e(+|-)EEE]”). The string “inf” is used to represent infinity. One advantage of numerical strings is that they can have an arbitrarily high precision because the possible number of significant digits is virtually unlimited.

Note that numerical values may have associated units of measurement which are specified in the “TagName” string.

Date/Time Format

All MIE dates are strings in the form “YYYY:mm:dd HH:MM:SS.ss+HH:MM”. The fractional seconds (".ss") are optional, and if included may contain any number of significant digits (unlike all other fields which are a fixed number of digits and must be padded with leading zeros if necessary). The timezone ("+HH:MM" or “-HH:MM”) is recommended but not required. If not given, the local system timezone is assumed.

MIME Type

The basic MIME type for a MIE file is “application/x-mie”, however the specific MIME type depends on the type of subfile, and is obtained by adding “x-mie-” to the MIME type of the subfile. For example, with a subfile of type “image/jpeg”, the MIE file MIME type is “image/x-mie-jpeg”. But note that the “x-” is not duplicated if the subfile MIME type already starts with “x-”. So a subfile with MIME type “image/x-raw” is contained within a MIE file of type “image/x-mie-raw”, not “image/x-mie-x-raw”. In the case of multiple documents in a MIE file, the MIME type is taken from the first document. Regardless of the subfile type, all MIE-format files should have a filename extension of “.MIE”.

Levels of Support

Basic MIE reader/writer applications may choose not to provide support for some advanced features of the MIE format. Features which may not be supported by all software are:

Compression
Software not supporting compression must ignore compressed elements and groups, but should be able to process the remaining information.

Large data lengths
Some software may limit the maximum size of a MIE group or element. Historically, a limit of 2GB may be imposed by some systems. However, 8-byte data lengths should be supported by all applications provided the value doesn’t exceed the system limit. (eg. For systems with a 2GB limit, 8-byte data lengths should be supported if the upper 17 bits are all zero.) If a data length above the system limit is encountered, it may be necessary for the application to stop processing if it can not seek to the next element in the file.

EXAMPLES

This section gives examples for working with MIE information using ExifTool.

Encapsulating Information with Data in a MIE File

The following command encapsulates any file recognized by ExifTool inside a MIE file, and initializes MIE tags from information within the file:

exiftool -o new.mie -tagsfromfile FILE -mie:all<all \ -subfilename<filename -subfiletype<filetype \ -subfilemimetype<mimetype -subfiledata<=FILE

where FILE is the name of the file.

For unrecognized files, this command may be used:

exiftool -o new.mie -subfilename=FILE -subfiletype=TYPE \ -subfilemimetype=MIME -subfiledata<=FILE

where TYPE and MIME represent the source file type and MIME type respectively.

Adding a MIE Trailer to a File

The MIE format may also be used to store information in a trailer appended to another type of file. Beware that trailers may not be compatible with all file formats, but JPEG and TIFF are two formats where additional trailer information doesn’t create any problems for normal parsing of the file. Also note that this technique has the disadvantage that trailer information is commonly lost if the file is subsequently edited by other software.

Creating a MIE trailer with ExifTool is a two-step process since ExifTool can’t currently be used to add a MIE trailer directly. The example below illustrates the steps for adding a MIE trailer with a small preview image (small.jpg) to a destination JPEG image (dst.jpg).

Step 1) Create a MIE file with a TrailerSignature containing the desired information:

exiftool -o new.mie -trailersignature=1 -tagsfromfile small.jpg \ -previewimagetype<filetype -previewimagesize<imagesize \ -previewimagename<filename -previewimage<=small.jpg

Step 2) Append the MIE information to another file. In Unix, this can be done with the ‘cat’ command:

cat new.mie >> dst.jpg

Once added, ExifTool may be used to edit or delete a MIE trailer in a JPEG or TIFF image.

Multiple MIE Documents in a Single File

The MIE specification allows multiple MIE documents (or trailers) to exist in a single file. A file like this may be created by simply concatenating MIE documents. ExifTool may be used to access information in a specific document by adding a copy number to the MIE group name. For example:

# write the Author tag in the second MIE document exiftool -mie2:author=phil test.mie # delete the first MIE document from a file exiftool -mie1:all= test.mie

Units of Measurement

Some MIE tags allow values to be specified in different units of measurement. In the MIE file format these units are combined with the tag name, but when using ExifTool they are specified in brackets after the value:

exiftool -mie:gpsaltitude=7500(ft) test.mie

If no units are provided, the default units are written.

Localized Text

Localized text values are accessed by adding a language/country code to the tag name. For example:

exiftool -comment-en_us=this is a comment test.mie

REVISIONS

2010-04-05 - Fixed “Format Size” Note 7 to give the correct number of bits in the example rational value 2007-01-21 - Specified LF character (0x0a) for text newline sequence 2007-01-19 - Specified ISO 8859-1 character set for extended ASCII codes 2007-01-01 - Improved wording of Step 5 for scanning backwards in MIE file 2006-12-30 - Added EXAMPLES section and note about UTF BOM 2006-12-20 - MIE 1.1: Changed meaning of TypeModifier bit (0x08) for unknown data (FormatType 0x00), and documented byte swapping 2006-12-14 - MIE 1.0: Added Data Values and Numerical Representations sections, and added ability to specify units in tag names 2006-11-09 - Added Levels of Support section 2006-11-03 - Added Trailer Signature 2005-11-18 - Original specification created

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The MIE format itself is also copyright Phil Harvey, and is covered by the same free-use license.

REFERENCES

<https://exiftool.org/MIE1.1-20070121.pdf>

SEE ALSO

“MIE Tags” in Image::ExifTool::TagNames, Image::ExifTool::MIEUnits, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1241 - Linux cli command XtAppInitialize

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppInitialize and provides detailed information about the command XtAppInitialize, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppInitialize.

NAME 🖥️ XtAppInitialize 🖥️

initialize, open, or close a display

SYNTAX

#include <X11/Intrinsic.h>

Widget XtAppInitialize(XtAppContext* app_context_return, const char *application_class, XrmOptionDescRec* options, Cardinal num_options, int *argc_in_out, char **argv_in_out, String *fallback_resources, ArgList args, Cardinal num_args);

Widget XtVaAppInitialize(XtAppContext* app_context_return, const char *application_class, XrmOptionDescRec* options, Cardinal num_options, int *argc_in_out, char **argv_in_out, String *fallback_resources, … );

ARGUMENTS

app_context_return
Specifies the application context.

application_class
Specifies the class name of this application, which usually is the generic name for all instances of this application.

options
Specifies how to parse the command line for any application-specific resources. The options argument is passed as a parameter to XrmParseCommand. For further information, see Xlib - C Language X Interface.

num_options
Specifies the number of entries in the options list.

argc_in_out
Specifies a pointer to the number of command line parameters.

argv_in_out
Specifies the command line parameters.

fallback_resources
Specifies resource values to be used if the application class resource file cannot be opened or read, or NULL.

args
Specifies the argument list to override any other resource specification for the created shell widget.

num_args
Specifies the number of entries in the argument list.


Specifies the variable argument list to override any other resource specification for the created shell widget.

DESCRIPTION

The XtAppInitialize function calls XtToolkitInitialize followed by XtCreateApplicationContext, then calls XtOpenDisplay with display_string NULL and application_name NULL, and finally calls XtAppCreateShell with application_name NULL, widget_class applicationShellWidgetClass, and the specified args and num_args and returns the created shell. The modified argc and argv returned by XtDisplayInitialize are returned in argc_in_out and argv_in_out. If app_context_return is not NULL, the created application context is also returned. If the display specified by the command line cannot be opened, an error message is issued and XtAppInitialize terminates the application. If fallback_resources is non-NULL, XtAppSetFallbackResources is called with the value prior to calling XtOpenDisplay.

XtAppInitialize and XtVaAppInitialize have been superceded by XtOpenApplication and XtVaOpenApplication respectively.

SEE ALSO

XtOpenApplication(3), XtVaOpenApplication(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1242 - Linux cli command Tk_Toplevelpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Toplevelpm and provides detailed information about the command Tk_Toplevelpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Toplevelpm.

NAME 🖥️ Tk_Toplevelpm 🖥️

Create and manipulate Toplevel widgets

SYNOPSIS

$toplevel = $parent->Toplevel(?options?);

STANDARD OPTIONS

-borderwidth -highlightbackground -highlightthickness -takefocus -class -highlightcolor -relief -cursor

See Tk::options for details of the standard options.

WIDGET-SPECIFIC OPTIONS

Name: background

Class: Background

Switch: -background

This option is the same as the standard background option except that its value may also be specified as an undefined value. In this case, the widget will display no background or border, and no colors will be consumed from its colormap for its background and border.

Name: colormap

Class: Colormap

Switch: -colormap

Specifies a colormap to use for the window. The value may be either new, in which case a new colormap is created for the window and its children, or the name of another window (which must be on the same screen and have the same visual as $widget), in which case the new window will use the colormap from the specified window. If the colormap option is not specified, the new window uses the default colormap of its screen. This option may not be changed with the configure method.

Name: container

Class: Container

Switch: -container

The value must be a boolean. If true, it means that this window will be used as a container in which some other application will be embedded (for example, a Tk toplevel can be embedded using the -use option). The window will support the appropriate window manager protocols for things like geometry requests. The window should not have any children of its own in this application. This option may not be changed with the configure method.

Name: height

Class: Height

Switch: -height

Specifies the desired height for the window in any of the forms acceptable to Tk_GetPixels. If this option is less than or equal to zero then the window will not request any size at all.

Name: menu

Class: Menu

Switch: -menu

Specifies a menu widget to be used as a menubar. On the Macintosh, the menubar will be displayed accross the top of the main monitor. On Microsoft Windows and all UNIX platforms, the menu will appear accross the toplevel window as part of the window dressing maintained by the window manager.

Name: ""

Class: ""

Switch: -screen

Specifies the screen on which to place the new window. Any valid screen name may be used, even one associated with a different display. Defaults to the same screen as its parent. This option is special in that it may not be specified via the option database, and it may not be modified with the configure method.

Switch: -title: Specifies the title of the toplevel window.

Name: use

Class: Use

Switch: -use

This option is used for embedding. If the value isn’t an empty string, it must be the the window identifier of a container window, specified as a hexadecimal string like the ones returned by the winfo id command. The toplevel widget will be created as a child of the given container instead of the root window for the screen. If the container window is in a Tk application, it must be a frame or toplevel widget for which the -container option was specified. This option may not be changed with the configure method.

Name: visual

Class: Visual

Switch: -visual

Specifies visual information for the new window in any of the forms accepted by Tk_GetVisual. If this option is not specified, the new window will use the default visual for its screen. The visual option may not be modified with the configure method.

Name: width

Class: Width

Switch: -width

Specifies the desired width for the window in any of the forms acceptable to Tk_GetPixels. If this option is less than or equal to zero then the window will not request any size at all.

DESCRIPTION

The Toplevel method creates a new toplevel widget (given by the $widget argument). Additional options, described above, may be specified on the command line or in the option database to configure aspects of the toplevel such as its background color and relief. The toplevel command returns the path name of the new window.

A toplevel is similar to a frame except that it is created as a top-level window: its X parent is the root window of a screen rather than the logical parent from its path name. The primary purpose of a toplevel is to serve as a container for dialog boxes and other collections of widgets. The only visible features of a toplevel are its background color and an optional 3-D border to make the toplevel appear raised or sunken.

WIDGET METHODS

The Toplevel method creates a widget object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class, and the Tk::Wm class.

BINDINGS

When a new toplevel is created, it has no default event bindings: toplevels are not intended to be interactive.

SEE ALSO

Tk::Widget Tk::Wm

KEYWORDS

toplevel, widget

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1243 - Linux cli command Tk_getSaveFilepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_getSaveFilepm and provides detailed information about the command Tk_getSaveFilepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_getSaveFilepm.

NAME 🖥️ Tk_getSaveFilepm 🖥️

pop up a dialog box for the user to select a file to save.

DESCRIPTION

See Tk::getOpenFile.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1244 - Linux cli command pthread_spin_trylock

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_spin_trylock and provides detailed information about the command pthread_spin_trylock, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_spin_trylock.

NAME 🖥️ pthread_spin_trylock 🖥️

lock and unlock a spin lock

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_spin_lock(pthread_spinlock_t *lock);
int pthread_spin_trylock(pthread_spinlock_t *lock);
int pthread_spin_unlock(pthread_spinlock_t *lock);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

pthread_spin_lock(), pthread_spin_trylock():

    _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The pthread_spin_lock() function locks the spin lock referred to by lock. If the spin lock is currently unlocked, the calling thread acquires the lock immediately. If the spin lock is currently locked by another thread, the calling thread spins, testing the lock until it becomes available, at which point the calling thread acquires the lock.

Calling pthread_spin_lock() on a lock that is already held by the caller or a lock that has not been initialized with pthread_spin_init(3) results in undefined behavior.

The pthread_spin_trylock() function is like pthread_spin_lock(), except that if the spin lock referred to by lock is currently locked, then, instead of spinning, the call returns immediately with the error EBUSY.

The pthread_spin_unlock() function unlocks the spin lock referred to lock. If any threads are spinning on the lock, one of those threads will then acquire the lock.

Calling pthread_spin_unlock() on a lock that is not held by the caller results in undefined behavior.

RETURN VALUE

On success, these functions return zero. On failure, they return an error number.

ERRORS

pthread_spin_lock() may fail with the following errors:

EDEADLOCK
The system detected a deadlock condition.

pthread_spin_trylock() fails with the following errors:

EBUSY
The spin lock is currently locked by another thread.

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.2. POSIX.1-2001.

CAVEATS

Applying any of the functions described on this page to an uninitialized spin lock results in undefined behavior.

Carefully read NOTES in pthread_spin_init(3).

SEE ALSO

pthread_spin_destroy(3), pthread_spin_init(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1245 - Linux cli command fma

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fma and provides detailed information about the command fma, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fma.

NAME 🖥️ fma 🖥️

floating-point multiply and add

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double fma(double x, double y, double z);
float fmaf(float x, float y, float z);
long double fmal(long double x, long double y, long double z);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

fma(), fmaf(), fmal():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions compute x * y + z. The result is rounded as one ternary operation according to the current rounding mode (see fenv(3)).

RETURN VALUE

These functions return the value of x * y + z, rounded as one ternary operation.

If x or y is a NaN, a NaN is returned.

If x times y is an exact infinity, and z is an infinity with the opposite sign, a domain error occurs, and a NaN is returned.

If one of x or y is an infinity, the other is 0, and z is not a NaN, a domain error occurs, and a NaN is returned.

If one of x or y is an infinity, and the other is 0, and z is a NaN, a domain error occurs, and a NaN is returned.

If x times y is not an infinity times zero (or vice versa), and z is a NaN, a NaN is returned.

If the result overflows, a range error occurs, and an infinity with the correct sign is returned.

If the result underflows, a range error occurs, and a signed 0 is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x * y + z, or x * y is invalid and z is not a NaN
An invalid floating-point exception (FE_INVALID) is raised.

Range error: result overflow
An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error: result underflow
An underflow floating-point exception (FE_UNDERFLOW) is raised.

These functions do not set errno.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fma(), fmaf(), fmal()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

remainder(3), remquo(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1246 - Linux cli command nextupl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command nextupl and provides detailed information about the command nextupl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the nextupl.

NAME 🖥️ nextupl 🖥️

return next floating-point number toward positive/negative infinity

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <math.h>
double nextup(double x);
float nextupf(float x);
long double nextupl(long double x);
double nextdown(double x);
float nextdownf(float x);
long double nextdownl(long double x);

DESCRIPTION

The nextup(), nextupf(), and nextupl() functions return the next representable floating-point number greater than x.

If x is the smallest representable negative number in the corresponding type, these functions return -0. If x is 0, the returned value is the smallest representable positive number of the corresponding type.

If x is positive infinity, the returned value is positive infinity. If x is negative infinity, the returned value is the largest representable finite negative number of the corresponding type.

If x is Nan, the returned value is NaN.

The value returned by nextdown(x) is -nextup(-x), and similarly for the other types.

RETURN VALUE

See DESCRIPTION.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

nextup(), nextupf(), nextupl(), nextdown(), nextdownf(), nextdownl()

Thread safetyMT-Safe

STANDARDS

These functions are described in IEEE Std 754-2008 - Standard for Floating-Point Arithmetic and ISO/IEC TS 18661.

HISTORY

glibc 2.24.

SEE ALSO

nearbyint(3), nextafter(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1247 - Linux cli command pthread_getschedparam

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_getschedparam and provides detailed information about the command pthread_getschedparam, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_getschedparam.

NAME 🖥️ pthread_getschedparam 🖥️

set/get scheduling policy and parameters of a thread

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_setschedparam(pthread_t thread, int policy,
 const struct sched_param *param);
int pthread_getschedparam(pthread_t thread, int *restrict policy,
 struct sched_param *restrict param);

DESCRIPTION

The pthread_setschedparam() function sets the scheduling policy and parameters of the thread thread.

policy specifies the new scheduling policy for thread. The supported values for policy, and their semantics, are described in sched(7).

The structure pointed to by param specifies the new scheduling parameters for thread. Scheduling parameters are maintained in the following structure:

struct sched_param {
    int sched_priority;     /* Scheduling priority */
};

As can be seen, only one scheduling parameter is supported. For details of the permitted ranges for scheduling priorities in each scheduling policy, see sched(7).

The pthread_getschedparam() function returns the scheduling policy and parameters of the thread thread, in the buffers pointed to by policy and param, respectively. The returned priority value is that set by the most recent pthread_setschedparam(), pthread_setschedprio(3), or pthread_create(3) call that affected thread. The returned priority does not reflect any temporary priority adjustments as a result of calls to any priority inheritance or priority ceiling functions (see, for example, pthread_mutexattr_setprioceiling(3) and pthread_mutexattr_setprotocol(3)).

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number. If pthread_setschedparam() fails, the scheduling policy and parameters of thread are not changed.

ERRORS

Both of these functions can fail with the following error:

ESRCH
No thread with the ID thread could be found.

pthread_setschedparam() may additionally fail with the following errors:

EINVAL
policy is not a recognized policy, or param does not make sense for the policy.

EPERM
The caller does not have appropriate privileges to set the specified scheduling policy and parameters.

POSIX.1 also documents an ENOTSUP (“attempt was made to set the policy or scheduling parameters to an unsupported value”) error for pthread_setschedparam().

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_setschedparam(), pthread_getschedparam()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.0 POSIX.1-2001.

NOTES

For a description of the permissions required to, and the effect of, changing a thread’s scheduling policy and priority, and details of the permitted ranges for priorities in each scheduling policy, see sched(7).

EXAMPLES

The program below demonstrates the use of pthread_setschedparam() and pthread_getschedparam(), as well as the use of a number of other scheduling-related pthreads functions.

In the following run, the main thread sets its scheduling policy to SCHED_FIFO with a priority of 10, and initializes a thread attributes object with a scheduling policy attribute of SCHED_RR and a scheduling priority attribute of 20. The program then sets (using pthread_attr_setinheritsched(3)) the inherit scheduler attribute of the thread attributes object to PTHREAD_EXPLICIT_SCHED, meaning that threads created using this attributes object should take their scheduling attributes from the thread attributes object. The program then creates a thread using the thread attributes object, and that thread displays its scheduling policy and priority.

$ su      # Need privilege to set real-time scheduling policies
Password:
# ./a.out -mf10 -ar20 -i e
Scheduler settings of main thread
    policy=SCHED_FIFO, priority=10
Scheduler settings in 'attr'
    policy=SCHED_RR, priority=20
    inheritsched is EXPLICIT
Scheduler attributes of new thread
    policy=SCHED_RR, priority=20

In the above output, one can see that the scheduling policy and priority were taken from the values specified in the thread attributes object.

The next run is the same as the previous, except that the inherit scheduler attribute is set to PTHREAD_INHERIT_SCHED, meaning that threads created using the thread attributes object should ignore the scheduling attributes specified in the attributes object and instead take their scheduling attributes from the creating thread.

# ./a.out -mf10 -ar20 -i i
Scheduler settings of main thread
    policy=SCHED_FIFO, priority=10
Scheduler settings in 'attr'
    policy=SCHED_RR, priority=20
    inheritsched is INHERIT
Scheduler attributes of new thread
    policy=SCHED_FIFO, priority=10

In the above output, one can see that the scheduling policy and priority were taken from the creating thread, rather than the thread attributes object.

Note that if we had omitted the -i i option, the output would have been the same, since PTHREAD_INHERIT_SCHED is the default for the inherit scheduler attribute.

Program source

/* pthreads_sched_test.c */
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define handle_error_en(en, msg) \
        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
[[noreturn]]
static void
usage(char *prog_name, char *msg)
{
    if (msg != NULL)
        fputs(msg, stderr);
    fprintf(stderr, "Usage: %s [options]

“, prog_name); fprintf(stderr, “Options are: “); #define fpe(msg) fprintf(stderr, " %s”, msg) /* Shorter */ fpe("-a Set scheduling policy and priority in “); fpe(” thread attributes object “); fpe(” can be “); fpe(” f SCHED_FIFO “); fpe(” r SCHED_RR “); fpe(” o SCHED_OTHER “); fpe("-A Use default thread attributes object “); fpe("-i {e|i} Set inherit scheduler attribute to “); fpe(” ’explicit’ or ‘inherit’ “); fpe("-m Set scheduling policy and priority on “); fpe(” main thread before pthread_create() call “); exit(EXIT_FAILURE); } static int get_policy(char p, int *policy) { switch (p) { case ‘f’: *policy = SCHED_FIFO; return 1; case ‘r’: *policy = SCHED_RR; return 1; case ‘o’: *policy = SCHED_OTHER; return 1; default: return 0; } } static void display_sched_attr(int policy, const struct sched_param *param) { printf(” policy=%s, priority=%d “, (policy == SCHED_FIFO) ? “SCHED_FIFO” : (policy == SCHED_RR) ? “SCHED_RR” : (policy == SCHED_OTHER) ? “SCHED_OTHER” : “???”, param->sched_priority); } static void display_thread_sched_attr(char *msg) { int policy, s; struct sched_param param; s = pthread_getschedparam(pthread_self(), &policy, &param); if (s != 0) handle_error_en(s, “pthread_getschedparam”); printf("%s “, msg); display_sched_attr(policy, &param); } static void * thread_start(void *arg) { display_thread_sched_attr(“Scheduler attributes of new thread”); return NULL; } int main(int argc, char *argv[]) { int s, opt, inheritsched, use_null_attrib, policy; pthread_t thread; pthread_attr_t attr; pthread_attr_t *attrp; char *attr_sched_str, *main_sched_str, inheritsched_str; struct sched_param param; / Process command-line options. / use_null_attrib = 0; attr_sched_str = NULL; main_sched_str = NULL; inheritsched_str = NULL; while ((opt = getopt(argc, argv, “a:Ai:m:”)) != -1) { switch (opt) { case ‘a’: attr_sched_str = optarg; break; case ‘A’: use_null_attrib = 1; break; case ‘i’: inheritsched_str = optarg; break; case ’m’: main_sched_str = optarg; break; default: usage(argv[0], “Unrecognized option “); } } if (use_null_attrib && (inheritsched_str != NULL || attr_sched_str != NULL)) { usage(argv[0], “Can’t specify -A with -i or -a “); } / Optionally set scheduling attributes of main thread, and display the attributes. / if (main_sched_str != NULL) { if (!get_policy(main_sched_str[0], &policy)) usage(argv[0], “Bad policy for main thread (-m) “); param.sched_priority = strtol(&main_sched_str[1], NULL, 0); s = pthread_setschedparam(pthread_self(), policy, &param); if (s != 0) handle_error_en(s, “pthread_setschedparam”); } display_thread_sched_attr(“Scheduler settings of main thread”); printf(” “); / Initialize thread attributes object according to options. / attrp = NULL; if (!use_null_attrib) { s = pthread_attr_init(&attr); if (s != 0) handle_error_en(s, “pthread_attr_init”); attrp = &attr; } if (inheritsched_str != NULL) { if (inheritsched_str[0] == ’e’) inheritsched = PTHREAD_EXPLICIT_SCHED; else if (inheritsched_str[0] == ‘i’) inheritsched = PTHREAD_INHERIT_SCHED; else usage(argv[0], “Value for -i must be ’e’ or ‘i’ “); s = pthread_attr_setinheritsched(&attr, inheritsched); if (s != 0) handle_error_en(s, “pthread_attr_setinheritsched”); } if (attr_sched_str != NULL) { if (!get_policy(attr_sched_str[0], &policy)) usage(argv[0], “Bad policy for ‘attr’ (-a) “); param.sched_priority = strtol(&attr_sched_str[1], NULL, 0); s = pthread_attr_setschedpolicy(&attr, policy); if (s != 0) handle_error_en(s, “pthread_attr_setschedpolicy”); s = pthread_attr_setschedparam(&attr, &param); if (s != 0) handle_error_en(s, “pthread_attr_setschedparam”); } / If we initialized a thread attributes object, display the scheduling attributes that were set in the object. / if (attrp != NULL) { s = pthread_attr_getschedparam(&attr, &param); if (s != 0) handle_error_en(s, “pthread_attr_getschedparam”); s = pthread_attr_getschedpolicy(&attr, &policy); if (s != 0) handle_error_en(s, “pthread_attr_getschedpolicy”); printf(“Scheduler settings in ‘attr’ “); display_sched_attr(policy, &param); pthread_attr_getinheritsched(&attr, &inheritsched); printf(” inheritsched is %s “, (inheritsched == PTHREAD_INHERIT_SCHED) ? “INHERIT” : (inheritsched == PTHREAD_EXPLICIT_SCHED) ? “EXPLICIT” : “???”); printf(” “); } / Create a thread that will display its scheduling attributes. / s = pthread_create(&thread, attrp, &thread_start, NULL); if (s != 0) handle_error_en(s, “pthread_create”); / Destroy unneeded thread attributes object. */ if (!use_null_attrib) { s = pthread_attr_destroy(&attr); if (s != 0) handle_error_en(s, “pthread_attr_destroy”); } s = pthread_join(thread, NULL); if (s != 0) handle_error_en(s, “pthread_join”); exit(EXIT_SUCCESS); }

SEE ALSO

getrlimit(2), sched_get_priority_min(2), pthread_attr_init(3), pthread_attr_setinheritsched(3), pthread_attr_setschedparam(3), pthread_attr_setschedpolicy(3), pthread_create(3), pthread_self(3), pthread_setschedprio(3), pthreads(7), sched(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1248 - Linux cli command Net_DBus_Tutorial_UsingObjectspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Tutorial_UsingObjectspm and provides detailed information about the command Net_DBus_Tutorial_UsingObjectspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Tutorial_UsingObjectspm.

NAME 🖥️ Net_DBus_Tutorial_UsingObjectspm 🖥️

tutorial on accessing a DBus service

DESCRIPTION

This document provides a tutorial on accessing a DBus service using the Perl Net::DBus application bindings. Sadly it is not yet written.

SEE ALSO

Net::DBus::Tutorial for details of other tutorials, and Net::DBus for API documentation

AUTHORS

Daniel Berrange <[email protected]>

COPYRIGHT

Copyright (C) 2006 Daniel P. Berrange

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1249 - Linux cli command Image_ExifTool_DVpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_DVpm and provides detailed information about the command Image_ExifTool_DVpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_DVpm.

NAME 🖥️ Image_ExifTool_DVpm 🖥️

Read DV meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read meta information from DV (raw Digital Video) files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://ffmpeg.org/>

<http://dvswitch.alioth.debian.org/wiki/DV_format/>

SEE ALSO

“DV Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1250 - Linux cli command S_ISSOCK

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command S_ISSOCK and provides detailed information about the command S_ISSOCK, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the S_ISSOCK.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1251 - Linux cli command pthread_mutexattr_setrobust

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_mutexattr_setrobust and provides detailed information about the command pthread_mutexattr_setrobust, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_mutexattr_setrobust.

NAME 🖥️ pthread_mutexattr_setrobust 🖥️

get and set the robustness attribute of a mutex attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_mutexattr_getrobust(const pthread_mutexattr_t *attr,
 int *robustness);
int pthread_mutexattr_setrobust(pthread_mutexattr_t *attr,
 int robustness);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

pthread_mutexattr_getrobust(), pthread_mutexattr_setrobust():

    _POSIX_C_SOURCE >= 200809L

DESCRIPTION

The pthread_mutexattr_getrobust() function places the value of the robustness attribute of the mutex attributes object referred to by attr in *robustness. The pthread_mutexattr_setrobust() function sets the value of the robustness attribute of the mutex attributes object referred to by attr to the value specified in *robustness.

The robustness attribute specifies the behavior of the mutex when the owning thread dies without unlocking the mutex. The following values are valid for robustness:

PTHREAD_MUTEX_STALLED
This is the default value for a mutex attributes object. If a mutex is initialized with the PTHREAD_MUTEX_STALLED attribute and its owner dies without unlocking it, the mutex remains locked afterwards and any future attempts to call pthread_mutex_lock(3) on the mutex will block indefinitely.

PTHREAD_MUTEX_ROBUST
If a mutex is initialized with the PTHREAD_MUTEX_ROBUST attribute and its owner dies without unlocking it, any future attempts to call pthread_mutex_lock(3) on this mutex will succeed and return EOWNERDEAD to indicate that the original owner no longer exists and the mutex is in an inconsistent state. Usually after EOWNERDEAD is returned, the next owner should call pthread_mutex_consistent(3) on the acquired mutex to make it consistent again before using it any further.

If the next owner unlocks the mutex using pthread_mutex_unlock(3) before making it consistent, the mutex will be permanently unusable and any subsequent attempts to lock it using pthread_mutex_lock(3) will fail with the error ENOTRECOVERABLE. The only permitted operation on such a mutex is pthread_mutex_destroy(3).

If the next owner terminates before calling pthread_mutex_consistent(3), further pthread_mutex_lock(3) operations on this mutex will still return EOWNERDEAD.

Note that the attr argument of pthread_mutexattr_getrobust() and pthread_mutexattr_setrobust() should refer to a mutex attributes object that was initialized by pthread_mutexattr_init(3), otherwise the behavior is undefined.

RETURN VALUE

On success, these functions return 0. On error, they return a positive error number.

In the glibc implementation, pthread_mutexattr_getrobust() always return zero.

ERRORS

EINVAL
A value other than PTHREAD_MUTEX_STALLED or PTHREAD_MUTEX_ROBUST was passed to pthread_mutexattr_setrobust().

VERSIONS

In the Linux implementation, when using process-shared robust mutexes, a waiting thread also receives the EOWNERDEAD notification if the owner of a robust mutex performs an execve(2) without first unlocking the mutex. POSIX.1 does not specify this detail, but the same behavior also occurs in at least some other implementations.

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.12. POSIX.1-2008.

Before the addition of pthread_mutexattr_getrobust() and pthread_mutexattr_setrobust() to POSIX, glibc defined the following equivalent nonstandard functions if _GNU_SOURCE was defined:

[[deprecated]]
int pthread_mutexattr_getrobust_np(const pthread_mutexattr_t *attr,
 int *robustness);
[[deprecated]]
int pthread_mutexattr_setrobust_np(const pthread_mutexattr_t *attr,
 int robustness);

Correspondingly, the constants PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP were also defined.

These GNU-specific APIs, which first appeared in glibc 2.4, are nowadays obsolete and should not be used in new programs; since glibc 2.34 these APIs are marked as deprecated.

EXAMPLES

The program below demonstrates the use of the robustness attribute of a mutex attributes object. In this program, a thread holding the mutex dies prematurely without unlocking the mutex. The main thread subsequently acquires the mutex successfully and gets the error EOWNERDEAD, after which it makes the mutex consistent.

The following shell session shows what we see when running this program:

$ ./a.out
[original owner] Setting lock...
[original owner] Locked. Now exiting without unlocking.
[main] Attempting to lock the robust mutex.
[main] pthread_mutex_lock() returned EOWNERDEAD
[main] Now make the mutex consistent
[main] Mutex is now consistent; unlocking

Program source

#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define handle_error_en(en, msg) \
        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
static pthread_mutex_t mtx;
static void *
original_owner_thread(void *ptr)
{
    printf("[original owner] Setting lock...

“); pthread_mutex_lock(&mtx); printf("[original owner] Locked. Now exiting without unlocking. “); pthread_exit(NULL); } int main(void) { pthread_t thr; pthread_mutexattr_t attr; int s; pthread_mutexattr_init(&attr); pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST); pthread_mutex_init(&mtx, &attr); pthread_create(&thr, NULL, original_owner_thread, NULL); sleep(2); /* “original_owner_thread” should have exited by now. */ printf("[main] Attempting to lock the robust mutex. “); s = pthread_mutex_lock(&mtx); if (s == EOWNERDEAD) { printf("[main] pthread_mutex_lock() returned EOWNERDEAD “); printf("[main] Now make the mutex consistent “); s = pthread_mutex_consistent(&mtx); if (s != 0) handle_error_en(s, “pthread_mutex_consistent”); printf("[main] Mutex is now consistent; unlocking “); s = pthread_mutex_unlock(&mtx); if (s != 0) handle_error_en(s, “pthread_mutex_unlock”); exit(EXIT_SUCCESS); } else if (s == 0) { printf("[main] pthread_mutex_lock() unexpectedly succeeded “); exit(EXIT_FAILURE); } else { printf("[main] pthread_mutex_lock() unexpectedly failed “); handle_error_en(s, “pthread_mutex_lock”); } }

SEE ALSO

get_robust_list(2), set_robust_list(2), pthread_mutex_consistent(3), pthread_mutex_init(3), pthread_mutex_lock(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1252 - Linux cli command SIMPLEQ_FOREACH

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SIMPLEQ_FOREACH and provides detailed information about the command SIMPLEQ_FOREACH, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SIMPLEQ_FOREACH.

NAME 🖥️ SIMPLEQ_FOREACH 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1253 - Linux cli command Moose_Meta_Method_Overriddenpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Method_Overriddenpm and provides detailed information about the command Moose_Meta_Method_Overriddenpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Method_Overriddenpm.

NAME 🖥️ Moose_Meta_Method_Overriddenpm 🖥️

A Moose Method metaclass for overridden methods

VERSION

version 2.2207

DESCRIPTION

This class implements method overriding logic for the Moose override keyword.

The overriding subroutine’s parent will be invoked explicitly using the super keyword from the parent class’s method definition.

METHODS

Moose::Meta::Method::Overridden->new(%options)

This constructs a new object. It accepts the following options:

  • class The metaclass object for the class in which the override is being declared. This option is required.

  • name The name of the method which we are overriding. This method must exist in one of the class’s superclasses. This option is required.

  • method The subroutine reference which implements the overriding. This option is required.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1254 - Linux cli command rtnetlink

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command rtnetlink and provides detailed information about the command rtnetlink, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the rtnetlink.

NAME 🖥️ rtnetlink 🖥️

macros to manipulate rtnetlink messages

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <asm/types.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
#include <sys/socket.h>
rtnetlink_socket = socket(AF_NETLINK, int socket_type",NETLINK_ROUTE);"
int RTA_OK(struct rtattr *rta, int rtabuflen);
void *RTA_DATA(struct rtattr *rta);
unsigned int RTA_PAYLOAD(struct rtattr *rta);
struct rtattr *RTA_NEXT(struct rtattr *rta",unsignedint"rtabuflen);
unsigned int RTA_LENGTH(unsigned int length);
unsigned int RTA_SPACE(unsigned int length);

DESCRIPTION

All rtnetlink(7) messages consist of a netlink(7) message header and appended attributes. The attributes should be manipulated only using the macros provided here.

RTA_OK(rta, attrlen) returns true if rta points to a valid routing attribute; attrlen is the running length of the attribute buffer. When not true then you must assume there are no more attributes in the message, even if attrlen is nonzero.

RTA_DATA(rta) returns a pointer to the start of this attribute’s data.

RTA_PAYLOAD(rta) returns the length of this attribute’s data.

RTA_NEXT(rta, attrlen) gets the next attribute after rta. Calling this macro will update attrlen. You should use RTA_OK to check the validity of the returned pointer.

RTA_LENGTH(len) returns the length which is required for len bytes of data plus the header.

RTA_SPACE(len) returns the amount of space which will be needed in a message with len bytes of data.

STANDARDS

Linux.

BUGS

This manual page is incomplete.

EXAMPLES

Creating a rtnetlink message to set the MTU of a device:

#include <linux/rtnetlink.h>
...
struct {
    struct nlmsghdr  nh;
    struct ifinfomsg if;
    char             attrbuf[512];
} req;
struct rtattr *rta;
unsigned int mtu = 1000;
int rtnetlink_sk = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE);
memset(&req, 0, sizeof(req));
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.if));
req.nh.nlmsg_flags = NLM_F_REQUEST;
req.nh.nlmsg_type = RTM_NEWLINK;
req.if.ifi_family = AF_UNSPEC;
req.if.ifi_index = INTERFACE_INDEX;
req.if.ifi_change = 0xffffffff; /* ??? */
rta = (struct rtattr *)(((char *) &req) +
                         NLMSG_ALIGN(req.nh.nlmsg_len));
rta->rta_type = IFLA_MTU;
rta->rta_len = RTA_LENGTH(sizeof(mtu));
req.nh.nlmsg_len = NLMSG_ALIGN(req.nh.nlmsg_len) +
                              RTA_LENGTH(sizeof(mtu));
memcpy(RTA_DATA(rta), &mtu, sizeof(mtu));
send(rtnetlink_sk, &req, req.nh.nlmsg_len, 0);

SEE ALSO

netlink(3), netlink(7), rtnetlink(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1255 - Linux cli command scalbn

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command scalbn and provides detailed information about the command scalbn, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the scalbn.

NAME 🖥️ scalbn 🖥️

multiply floating-point number by integral power of radix

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double scalbln(double x, long exp);
float scalblnf(float x, long exp);
long double scalblnl(long double x, long exp);
double scalbn(double x, int exp);
float scalbnf(float x, int exp);
long double scalbnl(long double x, int exp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

scalbln(), scalblnf(), scalblnl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE

scalbn(), scalbnf(), scalbnl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions multiply their first argument x by FLT_RADIX (probably 2) to the power of exp, that is:

    x * FLT_RADIX ** exp

The definition of FLT_RADIX can be obtained by including <float.h>.

RETURN VALUE

On success, these functions return x * FLT_RADIX ** exp.

If x is a NaN, a NaN is returned.

If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.

If x is +0 (-0), +0 (-0) is returned.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with a sign the same as x.

If the result underflows, a range error occurs, and the functions return zero, with a sign the same as x.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error, overflow
An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error, underflow
errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

scalbn(), scalbnf(), scalbnl(), scalbln(), scalblnf(), scalblnl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

HISTORY

These functions differ from the obsolete functions described in scalb(3) in the type of their second argument. The functions described on this page have a second argument of an integral type, while those in scalb(3) have a second argument of type double.

NOTES

If FLT_RADIX equals 2 (which is usual), then scalbn() is equivalent to ldexp(3).

BUGS

Before glibc 2.20, these functions did not set errno for range errors.

SEE ALSO

ldexp(3), scalb(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1256 - Linux cli command IPC_Shareable_SharedMempm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IPC_Shareable_SharedMempm and provides detailed information about the command IPC_Shareable_SharedMempm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IPC_Shareable_SharedMempm.

NAME 🖥️ IPC_Shareable_SharedMempm 🖥️

Object oriented interface to shared memory

SYNOPSIS

*** No public interface ***

WARNING

This module is not intended for public consumption. It is used internally by IPC::Shareable to access shared memory.

DESCRIPTION

This module provides and object-oriented framework to access shared memory. Its use is intended to be limited to IPC::Shareable. Therefore I have not documented an interface.

AUTHOR

Ben Sugars ([email protected])

SEE ALSO

IPC::Shareable, IPC::ShareLite

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1257 - Linux cli command ptsname

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ptsname and provides detailed information about the command ptsname, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ptsname.

NAME 🖥️ ptsname 🖥️

get the name of the slave pseudoterminal

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
char *ptsname(int fd);
int ptsname_r(int fd, char buf[.buflen], size_t buflen);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

ptsname():

    Since glibc 2.24:
        _XOPEN_SOURCE >= 500
    glibc 2.23 and earlier:
        _XOPEN_SOURCE

ptsname_r():

    _GNU_SOURCE

DESCRIPTION

The ptsname() function returns the name of the slave pseudoterminal device corresponding to the master referred to by the file descriptor fd.

The ptsname_r() function is the reentrant equivalent of ptsname(). It returns the name of the slave pseudoterminal device as a null-terminated string in the buffer pointed to by buf. The buflen argument specifies the number of bytes available in buf.

RETURN VALUE

On success, ptsname() returns a pointer to a string in static storage which will be overwritten by subsequent calls. This pointer must not be freed. On failure, NULL is returned.

On success, ptsname_r() returns 0. On failure, an error number is returned to indicate the error.

ERRORS

EINVAL
(ptsname_r() only) buf is NULL. (This error is returned only for glibc 2.25 and earlier.)

ENOTTY
fd does not refer to a pseudoterminal master device.

ERANGE
(ptsname_r() only) buf is too small.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

ptsname()

Thread safetyMT-Unsafe race:ptsname

ptsname_r()

Thread safetyMT-Safe

VERSIONS

A version of ptsname_r() is documented on Tru64 and HP-UX, but on those implementations, -1 is returned on error, with errno set to indicate the error. Avoid using this function in portable programs.

STANDARDS

ptsname():
POSIX.1-2008.

ptsname_r() is a Linux extension, that is proposed for inclusion in the next major revision of POSIX.1 (Issue 8).

HISTORY

ptsname():
POSIX.1-2001. glibc 2.1.

ptsname() is part of the UNIX 98 pseudoterminal support (see pts(4)).

SEE ALSO

grantpt(3), posix_openpt(3), ttyname(3), unlockpt(3), pts(4), pty(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1258 - Linux cli command tmpfile

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tmpfile and provides detailed information about the command tmpfile, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tmpfile.

NAME 🖥️ tmpfile 🖥️

create a temporary file

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
FILE *tmpfile(void);

DESCRIPTION

The tmpfile() function opens a unique temporary file in binary read/write (w+b) mode. The file will be automatically deleted when it is closed or the program terminates.

RETURN VALUE

The tmpfile() function returns a stream descriptor, or NULL if a unique filename cannot be generated or the unique file cannot be opened. In the latter case, errno is set to indicate the error.

ERRORS

EACCES
Search permission denied for directory in file’s path prefix.

EEXIST
Unable to generate a unique filename.

EINTR
The call was interrupted by a signal; see signal(7).

EMFILE
The per-process limit on the number of open file descriptors has been reached.

ENFILE
The system-wide limit on the total number of open files has been reached.

ENOSPC
There was no room in the directory to add the new filename.

EROFS
Read-only filesystem.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tmpfile()

Thread safetyMT-Safe

VERSIONS

The standard does not specify the directory that tmpfile() will use. glibc will try the path prefix P_tmpdir defined in <stdio.h>, and if that fails, then the directory /tmp.

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89, SVr4, 4.3BSD, SUSv2.

NOTES

POSIX.1-2001 specifies: an error message may be written to stdout if the stream cannot be opened.

SEE ALSO

exit(3), mkstemp(3), mktemp(3), tempnam(3), tmpnam(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1259 - Linux cli command vlimit

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command vlimit and provides detailed information about the command vlimit, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the vlimit.

NAME 🖥️ vlimit 🖥️

get/set resource limits

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/resource.h>
int getrlimit(int resource, struct rlimit *rlim);
int setrlimit(int resource, const struct rlimit *rlim);
int prlimit(pid_t pid, int resource,
 const struct rlimit *_Nullable new_limit,
 struct rlimit *_Nullable old_limit);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

prlimit():

    _GNU_SOURCE

DESCRIPTION

The getrlimit() and setrlimit() system calls get and set resource limits. Each resource has an associated soft and hard limit, as defined by the rlimit structure:

struct rlimit {
    rlim_t rlim_cur;  /* Soft limit */
    rlim_t rlim_max;  /* Hard limit (ceiling for rlim_cur) */
};

The soft limit is the value that the kernel enforces for the corresponding resource. The hard limit acts as a ceiling for the soft limit: an unprivileged process may set only its soft limit to a value in the range from 0 up to the hard limit, and (irreversibly) lower its hard limit. A privileged process (under Linux: one with the CAP_SYS_RESOURCE capability in the initial user namespace) may make arbitrary changes to either limit value.

The value RLIM_INFINITY denotes no limit on a resource (both in the structure returned by getrlimit() and in the structure passed to setrlimit()).

The resource argument must be one of:

RLIMIT_AS
This is the maximum size of the process’s virtual memory (address space). The limit is specified in bytes, and is rounded down to the system page size. This limit affects calls to brk(2), mmap(2), and mremap(2), which fail with the error ENOMEM upon exceeding this limit. In addition, automatic stack expansion fails (and generates a SIGSEGV that kills the process if no alternate stack has been made available via sigaltstack(2)). Since the value is a long, on machines with a 32-bit long either this limit is at most 2 GiB, or this resource is unlimited.

RLIMIT_CORE
This is the maximum size of a core file (see core(5)) in bytes that the process may dump. When 0 no core dump files are created. When nonzero, larger dumps are truncated to this size.

RLIMIT_CPU
This is a limit, in seconds, on the amount of CPU time that the process can consume. When the process reaches the soft limit, it is sent a SIGXCPU signal. The default action for this signal is to terminate the process. However, the signal can be caught, and the handler can return control to the main program. If the process continues to consume CPU time, it will be sent SIGXCPU once per second until the hard limit is reached, at which time it is sent SIGKILL. (This latter point describes Linux behavior. Implementations vary in how they treat processes which continue to consume CPU time after reaching the soft limit. Portable applications that need to catch this signal should perform an orderly termination upon first receipt of SIGXCPU.)

RLIMIT_DATA
This is the maximum size of the process’s data segment (initialized data, uninitialized data, and heap). The limit is specified in bytes, and is rounded down to the system page size. This limit affects calls to brk(2), sbrk(2), and (since Linux 4.7) mmap(2), which fail with the error ENOMEM upon encountering the soft limit of this resource.

RLIMIT_FSIZE
This is the maximum size in bytes of files that the process may create. Attempts to extend a file beyond this limit result in delivery of a SIGXFSZ signal. By default, this signal terminates a process, but a process can catch this signal instead, in which case the relevant system call (e.g., write(2), truncate(2)) fails with the error EFBIG.

RLIMIT_LOCKS (Linux 2.4.0 to Linux 2.4.24)
This is a limit on the combined number of flock(2) locks and fcntl(2) leases that this process may establish.

RLIMIT_MEMLOCK
This is the maximum number of bytes of memory that may be locked into RAM. This limit is in effect rounded down to the nearest multiple of the system page size. This limit affects mlock(2), mlockall(2), and the mmap(2) MAP_LOCKED operation. Since Linux 2.6.9, it also affects the shmctl(2) SHM_LOCK operation, where it sets a maximum on the total bytes in shared memory segments (see shmget(2)) that may be locked by the real user ID of the calling process. The shmctl(2) SHM_LOCK locks are accounted for separately from the per-process memory locks established by mlock(2), mlockall(2), and mmap(2) MAP_LOCKED; a process can lock bytes up to this limit in each of these two categories.

Before Linux 2.6.9, this limit controlled the amount of memory that could be locked by a privileged process. Since Linux 2.6.9, no limits are placed on the amount of memory that a privileged process may lock, and this limit instead governs the amount of memory that an unprivileged process may lock.

RLIMIT_MSGQUEUE (since Linux 2.6.8)
This is a limit on the number of bytes that can be allocated for POSIX message queues for the real user ID of the calling process. This limit is enforced for mq_open(3). Each message queue that the user creates counts (until it is removed) against this limit according to the formula:

Since Linux 3.5:

bytes = attr.mq_maxmsg * sizeof(struct msg_msg) +
        MIN(attr.mq_maxmsg, MQ_PRIO_MAX) *
              sizeof(struct posix_msg_tree_node)+
                        /* For overhead */
        attr.mq_maxmsg * attr.mq_msgsize;
                        /* For message data */

Linux 3.4 and earlier:

bytes = attr.mq_maxmsg * sizeof(struct msg_msg *) +
                        /* For overhead */
        attr.mq_maxmsg * attr.mq_msgsize;
                        /* For message data */

where attr is the mq_attr structure specified as the fourth argument to mq_open(3), and the msg_msg and posix_msg_tree_node structures are kernel-internal structures.

The “overhead” addend in the formula accounts for overhead bytes required by the implementation and ensures that the user cannot create an unlimited number of zero-length messages (such messages nevertheless each consume some system memory for bookkeeping overhead).

RLIMIT_NICE (since Linux 2.6.12, but see BUGS below)
This specifies a ceiling to which the process’s nice value can be raised using setpriority(2) or nice(2). The actual ceiling for the nice value is calculated as 20 - rlim_cur. The useful range for this limit is thus from 1 (corresponding to a nice value of 19) to 40 (corresponding to a nice value of -20). This unusual choice of range was necessary because negative numbers cannot be specified as resource limit values, since they typically have special meanings. For example, RLIM_INFINITY typically is the same as -1. For more detail on the nice value, see sched(7).

RLIMIT_NOFILE
This specifies a value one greater than the maximum file descriptor number that can be opened by this process. Attempts (open(2), pipe(2), dup(2), etc.) to exceed this limit yield the error EMFILE. (Historically, this limit was named RLIMIT_OFILE on BSD.)

Since Linux 4.5, this limit also defines the maximum number of file descriptors that an unprivileged process (one without the CAP_SYS_RESOURCE capability) may have “in flight” to other processes, by being passed across UNIX domain sockets. This limit applies to the sendmsg(2) system call. For further details, see unix(7).

RLIMIT_NPROC
This is a limit on the number of extant process (or, more precisely on Linux, threads) for the real user ID of the calling process. So long as the current number of processes belonging to this process’s real user ID is greater than or equal to this limit, fork(2) fails with the error EAGAIN.

The RLIMIT_NPROC limit is not enforced for processes that have either the CAP_SYS_ADMIN or the CAP_SYS_RESOURCE capability, or run with real user ID 0.

RLIMIT_RSS
This is a limit (in bytes) on the process’s resident set (the number of virtual pages resident in RAM). This limit has effect only in Linux 2.4.x, x < 30, and there affects only calls to madvise(2) specifying MADV_WILLNEED.

RLIMIT_RTPRIO (since Linux 2.6.12, but see BUGS)
This specifies a ceiling on the real-time priority that may be set for this process using sched_setscheduler(2) and sched_setparam(2).

For further details on real-time scheduling policies, see sched(7)

RLIMIT_RTTIME (since Linux 2.6.25)
This is a limit (in microseconds) on the amount of CPU time that a process scheduled under a real-time scheduling policy may consume without making a blocking system call. For the purpose of this limit, each time a process makes a blocking system call, the count of its consumed CPU time is reset to zero. The CPU time count is not reset if the process continues trying to use the CPU but is preempted, its time slice expires, or it calls sched_yield(2).

Upon reaching the soft limit, the process is sent a SIGXCPU signal. If the process catches or ignores this signal and continues consuming CPU time, then SIGXCPU will be generated once each second until the hard limit is reached, at which point the process is sent a SIGKILL signal.

The intended use of this limit is to stop a runaway real-time process from locking up the system.

For further details on real-time scheduling policies, see sched(7)

RLIMIT_SIGPENDING (since Linux 2.6.8)
This is a limit on the number of signals that may be queued for the real user ID of the calling process. Both standard and real-time signals are counted for the purpose of checking this limit. However, the limit is enforced only for sigqueue(3); it is always possible to use kill(2) to queue one instance of any of the signals that are not already queued to the process.

RLIMIT_STACK
This is the maximum size of the process stack, in bytes. Upon reaching this limit, a SIGSEGV signal is generated. To handle this signal, a process must employ an alternate signal stack (sigaltstack(2)).

Since Linux 2.6.23, this limit also determines the amount of space used for the process’s command-line arguments and environment variables; for details, see execve(2).

prlimit()

The Linux-specific prlimit() system call combines and extends the functionality of setrlimit() and getrlimit(). It can be used to both set and get the resource limits of an arbitrary process.

The resource argument has the same meaning as for setrlimit() and getrlimit().

If the new_limit argument is not NULL, then the rlimit structure to which it points is used to set new values for the soft and hard limits for resource. If the old_limit argument is not NULL, then a successful call to prlimit() places the previous soft and hard limits for resource in the rlimit structure pointed to by old_limit.

The pid argument specifies the ID of the process on which the call is to operate. If pid is 0, then the call applies to the calling process. To set or get the resources of a process other than itself, the caller must have the CAP_SYS_RESOURCE capability in the user namespace of the process whose resource limits are being changed, or the real, effective, and saved set user IDs of the target process must match the real user ID of the caller and the real, effective, and saved set group IDs of the target process must match the real group ID of the caller.

RETURN VALUE

On success, these system calls return 0. On error, -1 is returned, and errno is set to indicate the error.

ERRORS

EFAULT
A pointer argument points to a location outside the accessible address space.

EINVAL
The value specified in resource is not valid; or, for setrlimit() or prlimit(): rlim->rlim_cur was greater than rlim->rlim_max.

EPERM
An unprivileged process tried to raise the hard limit; the CAP_SYS_RESOURCE capability is required to do this.

EPERM
The caller tried to increase the hard RLIMIT_NOFILE limit above the maximum defined by /proc/sys/fs/nr_open (see proc(5))

EPERM
(prlimit()) The calling process did not have permission to set limits for the process specified by pid.

ESRCH
Could not find a process with the ID specified in pid.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getrlimit(), setrlimit(), prlimit()

Thread safetyMT-Safe

STANDARDS

getrlimit()
setrlimit()
POSIX.1-2008.

prlimit()
Linux.

RLIMIT_MEMLOCK and RLIMIT_NPROC derive from BSD and are not specified in POSIX.1; they are present on the BSDs and Linux, but on few other implementations. RLIMIT_RSS derives from BSD and is not specified in POSIX.1; it is nevertheless present on most implementations. RLIMIT_MSGQUEUE, RLIMIT_NICE, RLIMIT_RTPRIO, RLIMIT_RTTIME, and RLIMIT_SIGPENDING are Linux-specific.

HISTORY

getrlimit()
setrlimit()
POSIX.1-2001, SVr4, 4.3BSD.

prlimit()
Linux 2.6.36, glibc 2.13.

NOTES

A child process created via fork(2) inherits its parent’s resource limits. Resource limits are preserved across execve(2).

Resource limits are per-process attributes that are shared by all of the threads in a process.

Lowering the soft limit for a resource below the process’s current consumption of that resource will succeed (but will prevent the process from further increasing its consumption of the resource).

One can set the resource limits of the shell using the built-in ulimit command (limit in csh(1)). The shell’s resource limits are inherited by the processes that it creates to execute commands.

Since Linux 2.6.24, the resource limits of any process can be inspected via /proc/pid/limits; see proc(5).

Ancient systems provided a vlimit() function with a similar purpose to setrlimit(). For backward compatibility, glibc also provides vlimit(). All new applications should be written using setrlimit().

C library/kernel ABI differences

Since glibc 2.13, the glibc getrlimit() and setrlimit() wrapper functions no longer invoke the corresponding system calls, but instead employ prlimit(), for the reasons described in BUGS.

The name of the glibc wrapper function is prlimit(); the underlying system call is prlimit64().

BUGS

In older Linux kernels, the SIGXCPU and SIGKILL signals delivered when a process encountered the soft and hard RLIMIT_CPU limits were delivered one (CPU) second later than they should have been. This was fixed in Linux 2.6.8.

In Linux 2.6.x kernels before Linux 2.6.17, a RLIMIT_CPU limit of 0 is wrongly treated as “no limit” (like RLIM_INFINITY). Since Linux 2.6.17, setting a limit of 0 does have an effect, but is actually treated as a limit of 1 second.

A kernel bug means that RLIMIT_RTPRIO does not work in Linux 2.6.12; the problem is fixed in Linux 2.6.13.

In Linux 2.6.12, there was an off-by-one mismatch between the priority ranges returned by getpriority(2) and RLIMIT_NICE. This had the effect that the actual ceiling for the nice value was calculated as 19 - rlim_cur. This was fixed in Linux 2.6.13.

Since Linux 2.6.12, if a process reaches its soft RLIMIT_CPU limit and has a handler installed for SIGXCPU, then, in addition to invoking the signal handler, the kernel increases the soft limit by one second. This behavior repeats if the process continues to consume CPU time, until the hard limit is reached, at which point the process is killed. Other implementations do not change the RLIMIT_CPU soft limit in this manner, and the Linux behavior is probably not standards conformant; portable applications should avoid relying on this Linux-specific behavior. The Linux-specific RLIMIT_RTTIME limit exhibits the same behavior when the soft limit is encountered.

Kernels before Linux 2.4.22 did not diagnose the error EINVAL for setrlimit() when rlim->rlim_cur was greater than rlim->rlim_max.

Linux doesn’t return an error when an attempt to set RLIMIT_CPU has failed, for compatibility reasons.

Representation of “large” resource limit values on 32-bit platforms

The glibc getrlimit() and setrlimit() wrapper functions use a 64-bit rlim_t data type, even on 32-bit platforms. However, the rlim_t data type used in the getrlimit() and setrlimit() system calls is a (32-bit) unsigned long. Furthermore, in Linux, the kernel represents resource limits on 32-bit platforms as unsigned long. However, a 32-bit data type is not wide enough. The most pertinent limit here is RLIMIT_FSIZE, which specifies the maximum size to which a file can grow: to be useful, this limit must be represented using a type that is as wide as the type used to represent file offsets—that is, as wide as a 64-bit off_t (assuming a program compiled with _FILE_OFFSET_BITS=64).

To work around this kernel limitation, if a program tried to set a resource limit to a value larger than can be represented in a 32-bit unsigned long, then the glibc setrlimit() wrapper function silently converted the limit value to RLIM_INFINITY. In other words, the requested resource limit setting was silently ignored.

Since glibc 2.13, glibc works around the limitations of the getrlimit() and setrlimit() system calls by implementing setrlimit() and getrlimit() as wrapper functions that call prlimit().

EXAMPLES

The program below demonstrates the use of prlimit().

#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
#include <err.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/resource.h>
#include <time.h>
int
main(int argc, char *argv[])
{
    pid_t          pid;
    struct rlimit  old, new;
    struct rlimit  *newp;
    if (!(argc == 2 || argc == 4)) {
        fprintf(stderr, "Usage: %s <pid> [<new-soft-limit> "
                "<new-hard-limit>]

“, argv[0]); exit(EXIT_FAILURE); } pid = atoi(argv[1]); /* PID of target process / newp = NULL; if (argc == 4) { new.rlim_cur = atoi(argv[2]); new.rlim_max = atoi(argv[3]); newp = &new; } / Set CPU time limit of target process; retrieve and display previous limit / if (prlimit(pid, RLIMIT_CPU, newp, &old) == -1) err(EXIT_FAILURE, “prlimit-1”); printf(“Previous limits: soft=%jd; hard=%jd “, (intmax_t) old.rlim_cur, (intmax_t) old.rlim_max); / Retrieve and display new CPU time limit */ if (prlimit(pid, RLIMIT_CPU, NULL, &old) == -1) err(EXIT_FAILURE, “prlimit-2”); printf(“New limits: soft=%jd; hard=%jd “, (intmax_t) old.rlim_cur, (intmax_t) old.rlim_max); exit(EXIT_SUCCESS); }

SEE ALSO

prlimit(1), dup(2), fcntl(2), fork(2), getrusage(2), mlock(2), mmap(2), open(2), quotactl(2), sbrk(2), shmctl(2), malloc(3), sigqueue(3), ulimit(3), core(5), capabilities(7), cgroups(7), credentials(7), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1260 - Linux cli command zip_set_archive_comment

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_set_archive_comment and provides detailed information about the command zip_set_archive_comment, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_set_archive_comment.

libzip (-lzip)

The

function sets the comment for the entire zip archive. If

is

and

is 0, the archive comment will be removed.

must be encoded in ASCII or UTF-8.

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

fails if:

is less than 0 or longer than the maximum comment length in a zip file (65535), or

is not a valid UTF-8 encoded string.

Required memory could not be allocated.

was added in libzip 0.7. In libzip 0.11 the type of

was changed from

to

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1261 - Linux cli command oosepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command oosepm and provides detailed information about the command oosepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the oosepm.

NAME 🖥️ oosepm 🖥️

syntactic sugar to make Moose one-liners easier

VERSION

version 2.2207

SYNOPSIS

# create a Moose class on the fly … perl -Moose=Foo -e has bar => ( is=>q[ro], default => q[baz] ); print Foo->new->bar # prints baz # loads an existing class (Moose or non-Moose) # and re-“opens” the package definition to make # debugging/introspection easier perl -Moose=+My::Class -e print join “, " => _ _PACKAGE_ _->meta->get_method_list # also loads Moose::Util::TypeConstraints to allow subtypes etc perl -Moose=Person -esubtype q[ValidAge] => as q[Int] => where { $_ > 0 && $_ < 78 }; has => age ( isa => q[ValidAge], is => q[ro]); Person->new(age => 90)

DESCRIPTION

oose.pm is a simple source filter that adds package $name; use Moose; use Moose::Util::TypeConstraints; to the beginning of your script and was entirely created because typing perl -epackage Foo; use Moose; ... was annoying me.

INTERFACE

oose provides exactly one method and it’s automatically called by perl:

import($package)
Pass a package name to import to be used by the source filter. The package defaults to Class if none is given.

DEPENDENCIES

You will need Filter::Simple and eventually Moose

INCOMPATIBILITIES

None reported. But it is a source filter and might have issues there.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1262 - Linux cli command XcupStoreColors

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XcupStoreColors and provides detailed information about the command XcupStoreColors, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XcupStoreColors.

NAME 🖥️ XcupStoreColors 🖥️

initialize shareable colormap entries at specific locations

SYNOPSIS

cc [ flag ... ] file ... -lXext [ library ... ]
#include <X11/extensions/Xcup.h>
Status XcupStoreColors ( Display *display , Colormap colormap ,
XColor *colors_in_out , int ncolors );

ARGUMENTS

display
Specifies the connection to the X server

colormap
Specifies the colormap

colors_in_out
Specifies and returns the values actually used in the colormap

ncolors
Specifies the number of items in colors_in_out

DESCRIPTION

The * XcupStoreColors * function changes the colormap entries of the pixel values in the pixel members of the XColor structures. The colormap entries are allocated as if an AllocColor has been used instead, i.e. the colors are read-only (shareable). * XcupStoreColors * returns the number of colors that were successfully allocated in the colormap.

A * Value * error is generated if a pixel is not a valid index into the colormap. A * BadMatch * error is generated if the colormap does not belong to a GrayScale, PseudoColor, or DirectColor visual.

Applications which allocate many colors in a screen’s default colormap, e.g. a color-cube or a gray-ramp, should allocate them with * XCupStoreColors *. By using XCupStoreColors the colors will be allocated sharable (read-only) and any other application which allocates the same color will share that color cell.

SEE ALSO

XcupQueryVersion(3Xext), XcupGetReservedColormapEntries(3Xext),
Colormap Utilization Policy and Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1263 - Linux cli command xdrrec_eof

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdrrec_eof and provides detailed information about the command xdrrec_eof, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdrrec_eof.

NAME 🖥️ xdrrec_eof 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1264 - Linux cli command zip_file_error_clear

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_file_error_clear and provides detailed information about the command zip_file_error_clear, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_file_error_clear.

libzip (-lzip)

The

function clears the error state for the zip archive

The

function does the same for the zip file

and

were added in libzip 0.8.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1265 - Linux cli command historyreadline

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command historyreadline and provides detailed information about the command historyreadline, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the historyreadline.

NAME 🖥️ historyreadline 🖥️

GNU History Library

COPYRIGHT

The GNU History Library is Copyright (C) 1989-2020 by the Free Software Foundation, Inc.

DESCRIPTION

Many programs read input from the user a line at a time. The GNU History library is able to keep track of those lines, associate arbitrary data with each line, and utilize information from previous lines in composing new ones.

HISTORY EXPANSION

The history library supports a history expansion feature that is identical to the history expansion in bash. This section describes what syntax features are available.

History expansions introduce words from the history list into the input stream, making it easy to repeat commands, insert the arguments to a previous command into the current input line, or fix errors in previous commands quickly.

History expansion is usually performed immediately after a complete line is read. It takes place in two parts. The first is to determine which line from the history list to use during substitution. The second is to select portions of that line for inclusion into the current one. The line selected from the history is the event, and the portions of that line that are acted upon are words. Various modifiers are available to manipulate the selected words. The line is broken into words in the same fashion as bash does when reading input, so that several words that would otherwise be separated are considered one word when surrounded by quotes (see the description of history_tokenize() below). History expansions are introduced by the appearance of the history expansion character, which is  !  by default. Only backslash ( ** ) and single quotes can quote the history expansion character.

Event Designators

An event designator is a reference to a command line entry in the history list. Unless the reference is absolute, events are relative to the current position in the history list.

!
Start a history substitution, except when followed by a blank, newline, = or (.

!n
Refer to command line n.

!-n
Refer to the current command minus n.

!!
Refer to the previous command. This is a synonym for `!-1'.

!string
Refer to the most recent command preceding the current position in the history list starting with string.

!?string[?]****
Refer to the most recent command preceding the current position in the history list containing string. The trailing ? may be omitted if string is followed immediately by a newline. If string is missing, the string from the most recent search is used; it is an error if there is no previous search string.

^string1^string2^
Quick substitution. Repeat the last command, replacing string1 with string2. Equivalent to ``!!:s^string1^string2^’’ (see Modifiers below).

!#
The entire command line typed so far.

Word Designators

Word designators are used to select desired words from the event. A : separates the event specification from the word designator. It may be omitted if the word designator begins with a ^, $, *, -, or %. Words are numbered from the beginning of the line, with the first word being denoted by 0 (zero). Words are inserted into the current line separated by single spaces.

0 (zero)
The zeroth word. For the shell, this is the command word.

n
The nth word.

^
The first argument. That is, word 1.

$
The last word. This is usually the last argument, but will expand to the zeroth word if there is only one word in the line.

%
The first word matched by the most recent `?string?’ search, if the search string begins with a character that is part of a word.

x*-*y
A range of words; `-y’ abbreviates `0-y'.

*
All of the words but the zeroth. This is a synonym for `1-$’. It is not an error to use * if there is just one word in the event; the empty string is returned in that case.

x*
Abbreviates x-$.

x-
Abbreviates x-$ like x*, but omits the last word. If x is missing, it defaults to 0.

If a word designator is supplied without an event specification, the previous command is used as the event.

Modifiers

After the optional word designator, there may appear a sequence of one or more of the following modifiers, each preceded by a `:’. These modify, or edit, the word or words selected from the history event.

h
Remove a trailing file name component, leaving only the head.

t
Remove all leading file name components, leaving the tail.

r
Remove a trailing suffix of the form .xxx, leaving the basename.

e
Remove all but the trailing suffix.

p
Print the new command but do not execute it.

q
Quote the substituted words, escaping further substitutions.

x
Quote the substituted words as with q, but break into words at blanks and newlines. The q and x modifiers are mutually exclusive; the last one supplied is used.

s/old/new/
Substitute new for the first occurrence of old in the event line. Any character may be used as the delimiter in place of /. The final delimiter is optional if it is the last character of the event line. The delimiter may be quoted in old and new with a single backslash. If & appears in new, it is replaced by old. A single backslash will quote the &. If old is null, it is set to the last old substituted, or, if no previous history substitutions took place, the last string in a !?string[?]**** search. If new is null, each matching old is deleted.

&
Repeat the previous substitution.

g
Cause changes to be applied over the entire event line. This is used in conjunction with `:s’ (e.g., `:gs/old/new/’) or `:&’. If used with `:s’, any delimiter can be used in place of /, and the final delimiter is optional if it is the last character of the event line. An a may be used as a synonym for g.

G
Apply the following `s’ or `&’ modifier once to each word in the event line.

PROGRAMMING WITH HISTORY FUNCTIONS

This section describes how to use the History library in other programs.

Introduction to History

A programmer using the History library has available functions for remembering lines on a history list, associating arbitrary data with a line, removing lines from the list, searching through the list for a line containing an arbitrary text string, and referencing any line in the list directly. In addition, a history expansion function is available which provides for a consistent user interface across different programs.

The user using programs written with the History library has the benefit of a consistent user interface with a set of well-known commands for manipulating the text of previous lines and using that text in new commands. The basic history manipulation commands are identical to the history substitution provided by bash.

The programmer can also use the readline library, which includes some history manipulation by default, and has the added advantage of command line editing.

Before declaring any functions using any functionality the History library provides in other code, an application writer should include the file * <readline/history.h> * in any file that uses the History library’s features. It supplies extern declarations for all of the library’s public functions and variables, and declares all of the public data structures.

History Storage

The history list is an array of history entries. A history entry is declared as follows:

typedef void * histdata_t;

typedef struct _hist_entry {
  char *line;
  char *timestamp;
  histdata_t data;
} HIST_ENTRY;

The history list itself might therefore be declared as

HIST_ENTRY ** the_history_list;

The state of the History library is encapsulated into a single structure:

/*
 * A structure used to pass around the current state of the history.
 */
typedef struct _hist_state {
  HIST_ENTRY **entries; /* Pointer to the entries themselves. */
  int offset;           /* The location pointer within this array. */
  int length;           /* Number of elements within this array. */
  int size;             /* Number of slots allocated to this array. */
  int flags;
} HISTORY_STATE;

If the flags member includes HS_STIFLED, the history has been stifled.

History Functions

This section describes the calling sequence for the various functions exported by the GNU History library.

Initializing History and State Management

This section describes functions used to initialize and manage the state of the History library when you want to use the history functions in your program.

void using_history  (void )
Begin a session in which the history functions might be used. This initializes the interactive variables.

HISTORY_STATE * history_get_history_state  (void )
Return a structure describing the current state of the input history.

void history_set_history_state  (HISTORY_STATE *state )
Set the state of the history list according to state.

History List Management

These functions manage individual entries on the history list, or set parameters managing the list itself.

void add_history  (const char *string )
Place string at the end of the history list. The associated data field (if any) is set to NULL. If the maximum number of history entries has been set using stifle_history(), and the new number of history entries would exceed that maximum, the oldest history entry is removed.

void add_history_time  (const char *string )
Change the time stamp associated with the most recent history entry to string.

HIST_ENTRY * remove_history  (int which )
Remove history entry at offset which from the history. The removed element is returned so you can free the line, data, and containing structure.

histdata_t free_history_entry  (HIST_ENTRY *histent )
Free the history entry histent and any history library private data associated with it. Returns the application-specific data so the caller can dispose of it.

HIST_ENTRY * replace_history_entry  (int which, const char *line, histdata_t data )
Make the history entry at offset which have line and data. This returns the old entry so the caller can dispose of any application-specific data. In the case of an invalid which, a NULL pointer is returned.

void clear_history  (void )
Clear the history list by deleting all the entries.

void stifle_history  (int max )
Stifle the history list, remembering only the last max entries. The history list will contain only max entries at a time.

int unstifle_history  (void )
Stop stifling the history. This returns the previously-set maximum number of history entries (as set by stifle_history()). history was stifled. The value is positive if the history was stifled, negative if it wasn’t.

int history_is_stifled  (void )
Returns non-zero if the history is stifled, zero if it is not.

Information About the History List

These functions return information about the entire history list or individual list entries.

HIST_ENTRY ** history_list  (void )
Return a NULL terminated array of HIST_ENTRY * which is the current input history. Element 0 of this list is the beginning of time. If there is no history, return NULL.

int where_history  (void )
Returns the offset of the current history element.

HIST_ENTRY * current_history  (void )
Return the history entry at the current position, as determined by where_history(). If there is no entry there, return a NULL pointer.

HIST_ENTRY * history_get  (int offset )
Return the history entry at position offset. The range of valid values of offset starts at history_base and ends at history_length - 1. If there is no entry there, or if offset is outside the valid range, return a NULL pointer.

time_t history_get_time  (HIST_ENTRY * )
Return the time stamp associated with the history entry passed as the argument.

int history_total_bytes  (void )
Return the number of bytes that the primary history entries are using. This function returns the sum of the lengths of all the lines in the history.

Moving Around the History List

These functions allow the current index into the history list to be set or changed.

int history_set_pos  (int pos )
Set the current history offset to pos, an absolute index into the list. Returns 1 on success, 0 if pos is less than zero or greater than the number of history entries.

HIST_ENTRY * previous_history  (void )
Back up the current history offset to the previous history entry, and return a pointer to that entry. If there is no previous entry, return a NULL pointer.

HIST_ENTRY * next_history  (void )
If the current history offset refers to a valid history entry, increment the current history offset. If the possibly-incremented history offset refers to a valid history entry, return a pointer to that entry; otherwise, return a NULL pointer.

Searching the History List

These functions allow searching of the history list for entries containing a specific string. Searching may be performed both forward and backward from the current history position. The search may be anchored, meaning that the string must match at the beginning of the history entry.

int history_search  (const char *string, int direction )
Search the history for string, starting at the current history offset. If direction is less than 0, then the search is through previous entries, otherwise through subsequent entries. If string is found, then the current history index is set to that history entry, and the value returned is the offset in the line of the entry where string was found. Otherwise, nothing is changed, and a -1 is returned.

int history_search_prefix  (const char *string, int direction )
Search the history for string, starting at the current history offset. The search is anchored: matching lines must begin with string. If direction is less than 0, then the search is through previous entries, otherwise through subsequent entries. If string is found, then the current history index is set to that entry, and the return value is 0. Otherwise, nothing is changed, and a -1 is returned.

int history_search_pos  (const char *string, int direction, int pos )
Search for string in the history list, starting at pos, an absolute index into the list. If direction is negative, the search proceeds backward from pos, otherwise forward. Returns the absolute index of the history element where string was found, or -1 otherwise.

Managing the History File

The History library can read the history from and write it to a file. This section documents the functions for managing a history file.

int read_history  (const char *filename )
Add the contents of filename to the history list, a line at a time. If filename is NULL, then read from ~/.history. Returns 0 if successful, or errno if not.

int read_history_range  (const char *filename, int from, int to )
Read a range of lines from filename, adding them to the history list. Start reading at line from and end at to. If from is zero, start at the beginning. If to is less than from, then read until the end of the file. If filename is NULL, then read from ~/.history. Returns 0 if successful, or errno if not.

int write_history  (const char *filename )
Write the current history to filename, overwriting filename if necessary. If filename is NULL, then write the history list to ~/.history. Returns 0 on success, or errno on a read or write error.

int append_history  (int nelements, const char *filename )
Append the last nelements of the history list to filename. If filename is NULL, then append to ~/.history. Returns 0 on success, or errno on a read or write error.

int history_truncate_file  (const char *filename, int nlines )
Truncate the history file filename, leaving only the last nlines lines. If filename is NULL, then ~/.history is truncated. Returns 0 on success, or errno on failure.

History Expansion

These functions implement history expansion.

int history_expand  (char *string, char **output )
Expand string, placing the result into output, a pointer to a string. Returns:

0
If no expansions took place (or, if the only change in the text was the removal of escape characters preceding the history expansion character);

1
if expansions did take place;

-1
if there was an error in expansion;

2
if the returned line should be displayed, but not executed, as with the :p modifier.

If an error occurred in expansion, then output contains a descriptive error message.

char * get_history_event  (const char *string, int *cindex, int qchar )
Returns the text of the history event beginning at string + *cindex. *cindex is modified to point to after the event specifier. At function entry, cindex points to the index into string where the history event specification begins. qchar is a character that is allowed to end the event specification in addition to the ``normal’’ terminating characters.

char ** history_tokenize  (const char *string )
Return an array of tokens parsed out of string, much as the shell might. The tokens are split on the characters in the history_word_delimiters variable, and shell quoting conventions are obeyed.

char * history_arg_extract  (int first, int last, const char *string )
Extract a string segment consisting of the first through last arguments present in string. Arguments are split using history_tokenize().

History Variables

This section describes the externally-visible variables exported by the GNU History Library.

int history_base
The logical offset of the first entry in the history list.

int history_length
The number of entries currently stored in the history list.

int history_max_entries
The maximum number of history entries. This must be changed using stifle_history().

int history_write_timestamps
If non-zero, timestamps are written to the history file, so they can be preserved between sessions. The default value is 0, meaning that timestamps are not saved. The current timestamp format uses the value of history_comment_char to delimit timestamp entries in the history file. If that variable does not have a value (the default), timestamps will not be written.

char history_expansion_char
The character that introduces a history event. The default is !. Setting this to 0 inhibits history expansion.

char history_subst_char
The character that invokes word substitution if found at the start of a line. The default is ^.

char history_comment_char
During tokenization, if this character is seen as the first character of a word, then it and all subsequent characters up to a newline are ignored, suppressing history expansion for the remainder of the line. This is disabled by default.

char * history_word_delimiters
The characters that separate tokens for history_tokenize(). The default value is " ()<>;&|".

char * history_no_expand_chars
The list of characters which inhibit history expansion if found immediately following history_expansion_char. The default is space, tab, newline, ** **, and =.

char * history_search_delimiter_chars
The list of additional characters which can delimit a history search string, in addition to space, tab, : and ? in the case of a substring search. The default is empty.

int history_quotes_inhibit_expansion
If non-zero, double-quoted words are not scanned for the history expansion character or the history comment character. The default value is 0.

rl_linebuf_func_t * history_inhibit_expansion_function
This should be set to the address of a function that takes two arguments: a char * (string) and an int index into that string (i). It should return a non-zero value if the history expansion starting at string[i] should not be performed; zero if the expansion should be done. It is intended for use by applications like bash that use the history expansion character for additional purposes. By default, this variable is set to NULL.

FILES

* ~/.history *
Default filename for reading and writing saved history

SEE ALSO

The Gnu Readline Library, Brian Fox and Chet Ramey
The Gnu History Library, Brian Fox and Chet Ramey
bash(1)
readline(3)

AUTHORS

Brian Fox, Free Software Foundation
[email protected]

Chet Ramey, Case Western Reserve University
[email protected]

BUG REPORTS

If you find a bug in the history library, you should report it. But first, you should make sure that it really is a bug, and that it appears in the latest version of the history library that you have.

Once you have determined that a bug actually exists, mail a bug report to bug-readline@gnu.org. If you have a fix, you are welcome to mail that as well! Suggestions and `philosophical’ bug reports may be mailed to bug-readline@gnu.org or posted to the Usenet newsgroup gnu.bash.bug.

Comments and bug reports concerning this manual page should be directed to [email protected].

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1266 - Linux cli command XtInitializeWidgetClass

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtInitializeWidgetClass and provides detailed information about the command XtInitializeWidgetClass, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtInitializeWidgetClass.

NAME 🖥️ XtInitializeWidgetClass 🖥️

initialize a widget class

SYNTAX

#include <X11/Intrinsic.h>

void XtInitializeWidgetClass(WidgetClass object_class);

ARGUMENTS

object_class
Specifies the object class to initialize.

DESCRIPTION

If the specified widget class is already initialized, XtInitializeWidgetClass returns immediately.

If the class initialization procedure registers type converters, these type converters are not available until the first object of the class or subclass is created or XtInitializeWidgetClass is called.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1267 - Linux cli command LIST_HEAD_INITIALIZER

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LIST_HEAD_INITIALIZER and provides detailed information about the command LIST_HEAD_INITIALIZER, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LIST_HEAD_INITIALIZER.

NAME 🖥️ LIST_HEAD_INITIALIZER 🖥️

implementation of a doubly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
LIST_ENTRY(TYPE);
LIST_HEAD(HEADNAME, TYPE);
LIST_HEAD LIST_HEAD_INITIALIZER(LIST_HEAD head);
void LIST_INIT(LIST_HEAD *head);
int LIST_EMPTY(LIST_HEAD *head);
void LIST_INSERT_HEAD(LIST_HEAD *head,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
struct TYPE *LIST_FIRST(LIST_HEAD *head);
struct TYPE *LIST_NEXT(struct TYPE *elm, LIST_ENTRY NAME);
LIST_FOREACH(struct TYPE *var, LIST_HEAD *head, LIST_ENTRY NAME);
void LIST_REMOVE(struct TYPE *elm, LIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type LIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro LIST_HEAD().

Creation

A list is headed by a structure defined by the LIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are doubly linked so that an arbitrary element can be removed without traversing the list. New elements can be added to the list after an existing element, before an existing element, or at the head of the list. A LIST_HEAD structure is declared as follows:

LIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

LIST_ENTRY() declares a structure that connects the elements in the list.

LIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

LIST_INIT() initializes the list referenced by head.

LIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

LIST_INSERT_HEAD() inserts the new element elm at the head of the list.

LIST_INSERT_BEFORE() inserts the new element elm before the element listelm.

LIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

LIST_FIRST() returns the first element in the list, or NULL if the list is empty.

LIST_NEXT() returns the next element in the list, or NULL if this is the last.

LIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

LIST_REMOVE() removes the element elm from the list.

RETURN VALUE

LIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

LIST_FIRST(), and LIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

LIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

LIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. LIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    LIST_ENTRY(entry) entries;              /* List */
};
LIST_HEAD(listhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct listhead head;                   /* List head */
    int i;
    LIST_INIT(&head);                       /* Initialize the list */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    LIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    LIST_INSERT_AFTER(n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    LIST_INSERT_BEFORE(n2, n3, entries);
    i = 0;                                  /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        np->data = i++;
    LIST_REMOVE(n2, entries);               /* Deletion */
    free(n2);
                                            /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* List deletion */ n1 = LIST_FIRST(&head); while (n1 != NULL) { n2 = LIST_NEXT(n1, entries); free(n1); n1 = n2; } LIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1268 - Linux cli command Moose_Util_MetaRolepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Util_MetaRolepm and provides detailed information about the command Moose_Util_MetaRolepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Util_MetaRolepm.

NAME 🖥️ Moose_Util_MetaRolepm 🖥️

Apply roles to any metaclass, as well as the object base class

VERSION

version 2.2207

SYNOPSIS

package MyApp::Moose; use Moose (); use Moose::Exporter; use Moose::Util::MetaRole; use MyApp::Role::Meta::Class; use MyApp::Role::Meta::Method::Constructor; use MyApp::Role::Object; Moose::Exporter->setup_import_methods( also => Moose ); sub init_meta { shift; my %args = @_; Moose->init_meta(%args); Moose::Util::MetaRole::apply_metaroles( for => $args{for_class}, class_metaroles => { class => [MyApp::Role::Meta::Class], constructor => [MyApp::Role::Meta::Method::Constructor], }, ); Moose::Util::MetaRole::apply_base_class_roles( for => $args{for_class}, roles => [MyApp::Role::Object], ); return $args{for_class}->meta(); }

DESCRIPTION

This utility module is designed to help authors of Moose extensions write extensions that are able to cooperate with other Moose extensions. To do this, you must write your extensions as roles, which can then be dynamically applied to the caller’s metaclasses.

This module makes sure to preserve any existing superclasses and roles already set for the meta objects, which means that any number of extensions can apply roles in any order.

USAGE

The easiest way to use this module is through Moose::Exporter, which can generate the appropriate init_meta method for you, and make sure it is called when imported.

FUNCTIONS

This module provides two functions.

apply_metaroles( … )

This function will apply roles to one or more metaclasses for the specified class. It will return a new metaclass object for the class or role passed in the “for” parameter.

It accepts the following parameters:

  • for => $name This specifies the class for which to alter the meta classes. This can be a package name, or an appropriate meta-object (a Moose::Meta::Class or Moose::Meta::Role).

  • class_metaroles => \roles This is a hash reference specifying which metaroles will be applied to the class metaclass and its contained metaclasses and helper classes. Each key should in turn point to an array reference of role names. It accepts the following keys:

    class

    attribute

    method

    wrapped_method

    instance

    constructor

    destructor

    error

role_metaroles => \roles This is a hash reference specifying which metaroles will be applied to the role metaclass and its contained metaclasses and helper classes. It accepts the following keys:

role

attribute

method

required_method

conflicting_method

application_to_class

application_to_role

application_to_instance

application_role_summation

applied_attribute

apply_base_class_roles( for => $class, roles => \roles )

This function will apply the specified roles to the object’s base class.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1269 - Linux cli command sgetspent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sgetspent and provides detailed information about the command sgetspent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sgetspent.

NAME 🖥️ sgetspent 🖥️

get shadow password file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

/* General shadow password file API */
#include <shadow.h>
struct spwd *getspnam(const char *name);
struct spwd *getspent(void);
void setspent(void);
void endspent(void);
struct spwd *fgetspent(FILE *stream);
struct spwd *sgetspent(const char *s);
int putspent(const struct spwd *p, FILE *stream);
int lckpwdf(void);
int ulckpwdf(void);
/* GNU extension */
#include <shadow.h>
int getspent_r(struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int getspnam_r(const char *name, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int fgetspent_r(FILE *stream, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int sgetspent_r(const char *s, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getspent_r(), getspnam_r(), fgetspent_r(), sgetspent_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

Long ago it was considered safe to have encrypted passwords openly visible in the password file. When computers got faster and people got more security-conscious, this was no longer acceptable. Julianne Frances Haugh implemented the shadow password suite that keeps the encrypted passwords in the shadow password database (e.g., the local shadow password file /etc/shadow, NIS, and LDAP), readable only by root.

The functions described below resemble those for the traditional password database (e.g., see getpwnam(3) and getpwent(3)).

The getspnam() function returns a pointer to a structure containing the broken-out fields of the record in the shadow password database that matches the username name.

The getspent() function returns a pointer to the next entry in the shadow password database. The position in the input stream is initialized by setspent(). When done reading, the program may call endspent() so that resources can be deallocated.

The fgetspent() function is similar to getspent() but uses the supplied stream instead of the one implicitly opened by setspent().

The sgetspent() function parses the supplied string s into a struct spwd.

The putspent() function writes the contents of the supplied struct spwd *p as a text line in the shadow password file format to stream. String entries with value NULL and numerical entries with value -1 are written as an empty string.

The lckpwdf() function is intended to protect against multiple simultaneous accesses of the shadow password database. It tries to acquire a lock, and returns 0 on success, or -1 on failure (lock not obtained within 15 seconds). The ulckpwdf() function releases the lock again. Note that there is no protection against direct access of the shadow password file. Only programs that use lckpwdf() will notice the lock.

These were the functions that formed the original shadow API. They are widely available.

Reentrant versions

Analogous to the reentrant functions for the password database, glibc also has reentrant functions for the shadow password database. The getspnam_r() function is like getspnam() but stores the retrieved shadow password structure in the space pointed to by spbuf. This shadow password structure contains pointers to strings, and these strings are stored in the buffer buf of size buflen. A pointer to the result (in case of success) or NULL (in case no entry was found or an error occurred) is stored in *spbufp.

The functions getspent_r(), fgetspent_r(), and sgetspent_r() are similarly analogous to their nonreentrant counterparts.

Some non-glibc systems also have functions with these names, often with different prototypes.

Structure

The shadow password structure is defined in <shadow.h> as follows:

struct spwd {
    char *sp_namp;     /* Login name */
    char *sp_pwdp;     /* Encrypted password */
    long  sp_lstchg;   /* Date of last change
                          (measured in days since
                          1970-01-01 00:00:00 +0000 (UTC)) */
    long  sp_min;      /* Min # of days between changes */
    long  sp_max;      /* Max # of days between changes */
    long  sp_warn;     /* # of days before password expires
                          to warn user to change it */
    long  sp_inact;    /* # of days after password expires
                          until account is disabled */
    long  sp_expire;   /* Date when account expires
                          (measured in days since
                          1970-01-01 00:00:00 +0000 (UTC)) */
    unsigned long sp_flag;  /* Reserved */
};

RETURN VALUE

The functions that return a pointer return NULL if no more entries are available or if an error occurs during processing. The functions which have int as the return value return 0 for success and -1 for failure, with errno set to indicate the error.

For the nonreentrant functions, the return value may point to static area, and may be overwritten by subsequent calls to these functions.

The reentrant functions return zero on success. In case of error, an error number is returned.

ERRORS

EACCES
The caller does not have permission to access the shadow password file.

ERANGE
Supplied buffer is too small.

FILES

/etc/shadow
local shadow password database file

/etc/.pwd.lock
lock file

The include file <paths.h> defines the constant _PATH_SHADOW to the pathname of the shadow password file.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getspnam()

Thread safety

MT-Unsafe race:getspnam locale

getspent()

Thread safety

MT-Unsafe race:getspent race:spentbuf locale

setspent(), endspent(), getspent_r()

Thread safety

MT-Unsafe race:getspent locale

fgetspent()

Thread safety

MT-Unsafe race:fgetspent

sgetspent()

Thread safety

MT-Unsafe race:sgetspent

putspent(), getspnam_r(), sgetspent_r()

Thread safety

MT-Safe locale

lckpwdf(), ulckpwdf(), fgetspent_r()

Thread safety

MT-Safe

In the above table, getspent in race:getspent signifies that if any of the functions setspent(), getspent(), getspent_r(), or endspent() are used in parallel in different threads of a program, then data races could occur.

VERSIONS

Many other systems provide a similar API.

STANDARDS

None.

SEE ALSO

getgrnam(3), getpwnam(3), getpwnam_r(3), shadow(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1270 - Linux cli command XML_DOM_Notationpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_DOM_Notationpm and provides detailed information about the command XML_DOM_Notationpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_DOM_Notationpm.

NAME 🖥️ XML_DOM_Notationpm 🖥️

An XML NOTATION in XML::DOM

DESCRIPTION

XML::DOM::Notation extends XML::DOM::Node.

This node represents a Notation, e.g.

<!NOTATION gs SYSTEM “GhostScript”> <!NOTATION name PUBLIC “pubId”> <!NOTATION name PUBLIC “pubId” “sysId”> <!NOTATION name SYSTEM “sysId”>

METHODS

getName and setName (name)
Returns (or sets) the Notation name, which is the first token after the NOTATION keyword.

getSysId and setSysId (sysId)
Returns (or sets) the system ID, which is the token after the optional SYSTEM keyword.

getPubId and setPubId (pubId)
Returns (or sets) the public ID, which is the token after the optional PUBLIC keyword.

getBase
This is passed by XML::Parser in the Notation handler. I don’t know what it is yet.

getNodeName
Returns the same as getName.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1271 - Linux cli command pcap_breaklooppcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_breaklooppcap and provides detailed information about the command pcap_breaklooppcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_breaklooppcap.

NAME 🖥️ pcap_breaklooppcap 🖥️

force a pcap_dispatch() or pcap_loop() call to return

SYNOPSIS

#include <pcap/pcap.h>
void pcap_breakloop(pcap_t *);

DESCRIPTION

pcap_breakloop() sets a flag that will force pcap_dispatch(3PCAP) or pcap_loop(3PCAP) to return rather than looping; they will return the number of packets that have been processed so far, or PCAP_ERROR_BREAK if no packets have been processed so far. If the loop is currently blocked waiting for packets to arrive, pcap_breakloop() will also, on some platforms, wake up the thread that is blocked. In this version of libpcap, the only platforms on which a wakeup is caused by pcap_breakloop() are Linux and Windows, and the wakeup will only be caused when capturing on network interfaces; it will not be caused on other operating systems, and will not be caused on any OS when capturing on other types of devices.

This routine is safe to use inside a signal handler on UNIX or a console control handler on Windows, or in a thread other than the one in which the loop is running, as it merely sets a flag that is checked within the loop and, on some platforms, performs a signal-safe and thread-safe API call.

The flag is checked in loops reading packets from the OS - a signal by itself will not necessarily terminate those loops - as well as in loops processing a set of packets returned by the OS.

Note that if you are catching signals on UNIX systems that support restarting system calls after a signal, and calling pcap_breakloop() in the signal handler, you must specify, when catching those signals, that system calls should NOT be restarted by that signal. Otherwise, if the signal interrupted a call reading packets in a live capture, when your signal handler returns after calling pcap_breakloop(), the call will be restarted, and the loop will not terminate until more packets arrive and the call completes.

Note also that, in a multi-threaded application, if one thread is blocked in pcap_dispatch(), pcap_loop(), pcap_next(3PCAP), or pcap_next_ex(3PCAP), a call to pcap_breakloop() in a different thread will only unblock that thread on the platforms and capture devices listed above.

If a non-zero packet buffer timeout is set on the pcap_t, and you are capturing on a network interface, the thread will be unblocked with the timeout expires. This is not guaranteed to happen unless at least one packet has arrived; the only platforms on which it happens are macOS, the BSDs, Solaris 11, AIX, Tru64 UNIX, and Windows.

If you want to ensure that the loop will eventually be unblocked on any other platforms, or unblocked when capturing on a device other than a network interface, you will need to use whatever mechanism the OS provides for breaking a thread out of blocking calls in order to unblock the thread, such as thread cancellation or thread signalling in systems that support POSIX threads.

Note that if pcap_breakloop() unblocks the thread capturing packets, and you are running on a platform that supports packet buffering, there may be packets in the buffer that arrived before pcap_breakloop() were called but that weren’t yet provided to libpcap, those packets will not have been processed by pcap_dispatch() or pcap_loop(). If pcap_breakloop() was called in order to terminate the capture process, then, in order to process those packets, you would have to call pcap_dispatch() one time in order to process the last batch of packets. This may block until the packet buffer timeout expires, so a non-zero packet buffer timeout must be used.

Note that pcap_next() and pcap_next_ex() will, on some platforms, loop reading packets from the OS; that loop will not necessarily be terminated by a signal, so pcap_breakloop() should be used to terminate packet processing even if pcap_next() or pcap_next_ex() is being used.

pcap_breakloop() does not guarantee that no further packets will be processed by pcap_dispatch() or pcap_loop() after it is called; at most one more packet might be processed.

If PCAP_ERROR_BREAK is returned from pcap_dispatch() or pcap_loop(), the flag is cleared, so a subsequent call will resume reading packets. If a positive number is returned, the flag is not cleared, so a subsequent call will return PCAP_ERROR_BREAK and clear the flag.

BACKWARD COMPATIBILITY

This function became available in libpcap release 0.8.1.

In releases prior to libpcap 1.10.0, pcap_breakloop() will not wake up a blocked thread on any platform.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1272 - Linux cli command XtSetKeyboardFocus

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtSetKeyboardFocus and provides detailed information about the command XtSetKeyboardFocus, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtSetKeyboardFocus.

NAME 🖥️ XtSetKeyboardFocus 🖥️

focus events on a child widget

SYNTAX

#include <X11/Intrinsic.h>

void XtSetKeyboardFocus(Widget subtree, Widget descendant);

ARGUMENTS

subtree
Specifies either the widget in the subtree structure which is to receive the keyboard event, or None. Note that it is not an error to specify None when no input focus was previously set.

descendant
Specifies the widget for which the keyboard focus is to be set.

DESCRIPTION

If a future KeyPress or KeyRelease event occurs within the specified subtree, XtSetKeyboardFocus causes XtDispatchEvent to remap and send the event to the specified descendant widget.

When there is no modal cascade, keyboard events can occur within a widget W in one of three ways:

  • W has the X input focus.

  • W has the keyboard focus of one of its ancestors, and the event occurs within the ancestor or one of the ancestor’s descendants.

  • No ancestor of W has a descendant within the keyboard focus, and the pointer is within W.

When there is a modal cascade, a widget W receives keyboard events if an ancestor of W is in the active subset of the modal cascade and one or more of the previous conditions is True.

When subtree or one of its descendants acquires the X input focus or the pointer moves into the subtree such that keyboard events would now be delivered to subtree, a FocusIn event is generated for the descendant if FocusNotify events have been selected by the descendant. Similarly, when W loses the X input focus or the keyboard focus for one of its ancestors, a FocusOut event is generated for descendant if FocusNotify events have been selected by the descendant.

SEE ALSO

XtCallAcceptFocus(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1273 - Linux cli command gethostent_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gethostent_r and provides detailed information about the command gethostent_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gethostent_r.

NAME 🖥️ gethostent_r 🖥️

get network host entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
void sethostent(int stayopen);
void endhostent(void);
[[deprecated]] extern int h_errno;
[[deprecated]] struct hostent *gethostbyname(const char *name);
[[deprecated]] struct hostent *gethostbyaddr(const void addr[.len],
 socklen_t len, int type);
[[deprecated]] void herror(const char *s);
[[deprecated]] const char *hstrerror(int err);
/* System V/POSIX extension */
struct hostent *gethostent(void);
/* GNU extensions */
[[deprecated]]
struct hostent *gethostbyname2(const char *name, int af);
int gethostent_r(struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyaddr_r(const void addr[restrict .len], socklen_t len,
 int type,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyname_r(const char *restrict name,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyname2_r(const char *restrict name, int af,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

gethostbyname2(), gethostent_r(), gethostbyaddr_r(), gethostbyname_r(), gethostbyname2_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc up to and including 2.19:
        _BSD_SOURCE || _SVID_SOURCE

herror(), hstrerror():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.8 to glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE
    Before glibc 2.8:
        none

h_errno:

    Since glibc 2.19
        _DEFAULT_SOURCE || _POSIX_C_SOURCE < 200809L
    glibc 2.12 to glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE || _POSIX_C_SOURCE < 200809L
    Before glibc 2.12:
        none

DESCRIPTION

The gethostbyname*(), gethostbyaddr*(), herror(), and hstrerror() functions are obsolete. Applications should use getaddrinfo(3), getnameinfo(3), and gai_strerror(3) instead.

The sethostent() function specifies, if stayopen is true (1), that a connected TCP socket should be used for the name server queries and that the connection should remain open during successive queries. Otherwise, name server queries will use UDP datagrams.

The endhostent() function ends the use of a TCP connection for name server queries.

The gethostbyname() function returns a structure of type hostent for the given host name. Here name is either a hostname or an IPv4 address in standard dot notation (as for inet_addr(3)). If name is an IPv4 address, no lookup is performed and gethostbyname() simply copies name into the h_name field and its struct in_addr equivalent into the h_addr_list[0] field of the returned hostent structure. If name doesn’t end in a dot and the environment variable HOSTALIASES is set, the alias file pointed to by HOSTALIASES will first be searched for name (see hostname(7) for the file format). The current domain and its parents are searched unless name ends in a dot.

The gethostbyaddr() function returns a structure of type hostent for the given host address addr of length len and address type type. Valid address types are AF_INET and AF_INET6 (defined in <sys/socket.h>). The host address argument is a pointer to a struct of a type depending on the address type, for example a struct in_addr * (probably obtained via a call to inet_addr(3)) for address type AF_INET.

The (obsolete) herror() function prints the error message associated with the current value of h_errno on stderr.

The (obsolete) hstrerror() function takes an error number (typically h_errno) and returns the corresponding message string.

The domain name queries carried out by gethostbyname() and gethostbyaddr() rely on the Name Service Switch (nsswitch.conf(5)) configured sources or a local name server (named(8)). The default action is to query the Name Service Switch (nsswitch.conf(5)) configured sources, failing that, a local name server (named(8)).

Historical

The nsswitch.conf(5) file is the modern way of controlling the order of host lookups.

In glibc 2.4 and earlier, the order keyword was used to control the order of host lookups as defined in /etc/host.conf (host.conf(5)).

The hostent structure is defined in <netdb.h> as follows:

struct hostent {
    char  *h_name;            /* official name of host */
    char **h_aliases;         /* alias list */
    int    h_addrtype;        /* host address type */
    int    h_length;          /* length of address */
    char **h_addr_list;       /* list of addresses */
}
#define h_addr h_addr_list[0] /* for backward compatibility */

The members of the hostent structure are:

h_name
The official name of the host.

h_aliases
An array of alternative names for the host, terminated by a null pointer.

h_addrtype
The type of address; always AF_INET or AF_INET6 at present.

h_length
The length of the address in bytes.

h_addr_list
An array of pointers to network addresses for the host (in network byte order), terminated by a null pointer.

h_addr
The first address in h_addr_list for backward compatibility.

RETURN VALUE

The gethostbyname() and gethostbyaddr() functions return the hostent structure or a null pointer if an error occurs. On error, the h_errno variable holds an error number. When non-NULL, the return value may point at static data, see the notes below.

ERRORS

The variable h_errno can have the following values:

HOST_NOT_FOUND
The specified host is unknown.

NO_DATA
The requested name is valid but does not have an IP address. Another type of request to the name server for this domain may return an answer. The constant NO_ADDRESS is a synonym for NO_DATA.

NO_RECOVERY
A nonrecoverable name server error occurred.

TRY_AGAIN
A temporary error occurred on an authoritative name server. Try again later.

FILES

/etc/host.conf
resolver configuration file

/etc/hosts
host database file

/etc/nsswitch.conf
name service switch configuration

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

gethostbyname()

Thread safety

MT-Unsafe race:hostbyname env locale

gethostbyaddr()

Thread safety

MT-Unsafe race:hostbyaddr env locale

sethostent(), endhostent(), gethostent_r()

Thread safety

MT-Unsafe race:hostent env locale

herror(), hstrerror()

Thread safetyMT-Safe

gethostent()

Thread safety

MT-Unsafe race:hostent race:hostentbuf env locale

gethostbyname2()

Thread safety

MT-Unsafe race:hostbyname2 env locale

gethostbyaddr_r(), gethostbyname_r(), gethostbyname2_r()

Thread safetyMT-Safe env locale

In the above table, hostent in race:hostent signifies that if any of the functions sethostent(), gethostent(), gethostent_r(), or endhostent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

sethostent()
endhostent()
gethostent()
POSIX.1-2008.

gethostent_r()
GNU.

Others:
None.

HISTORY

sethostent()
endhostent()
gethostent()
POSIX.1-2001.

gethostbyname()
gethostbyaddr()
h_errno
Marked obsolescent in POSIX.1-2001. Removed in POSIX.1-2008, recommending the use of getaddrinfo(3) and getnameinfo(3) instead.

NOTES

The functions gethostbyname() and gethostbyaddr() may return pointers to static data, which may be overwritten by later calls. Copying the struct hostent does not suffice, since it contains pointers; a deep copy is required.

In the original BSD implementation the len argument of gethostbyname() was an int. The SUSv2 standard is buggy and declares the len argument of gethostbyaddr() to be of type size_t. (That is wrong, because it has to be int, and size_t is not. POSIX.1-2001 makes it socklen_t, which is OK.) See also accept(2).

The BSD prototype for gethostbyaddr() uses const char * for the first argument.

System V/POSIX extension

POSIX requires the gethostent() call, which should return the next entry in the host data base. When using DNS/BIND this does not make much sense, but it may be reasonable if the host data base is a file that can be read line by line. On many systems, a routine of this name reads from the file /etc/hosts. It may be available only when the library was built without DNS support. The glibc version will ignore ipv6 entries. This function is not reentrant, and glibc adds a reentrant version gethostent_r().

GNU extensions

glibc2 also has a gethostbyname2() that works like gethostbyname(), but permits to specify the address family to which the address must belong.

glibc2 also has reentrant versions gethostent_r(), gethostbyaddr_r(), gethostbyname_r(), and gethostbyname2_r(). The caller supplies a hostent structure ret which will be filled in on success, and a temporary work buffer buf of size buflen. After the call, result will point to the result on success. In case of an error or if no entry is found result will be NULL. The functions return 0 on success and a nonzero error number on failure. In addition to the errors returned by the nonreentrant versions of these functions, if buf is too small, the functions will return ERANGE, and the call should be retried with a larger buffer. The global variable h_errno is not modified, but the address of a variable in which to store error numbers is passed in h_errnop.

BUGS

gethostbyname() does not recognize components of a dotted IPv4 address string that are expressed in hexadecimal.

SEE ALSO

getaddrinfo(3), getnameinfo(3), inet(3), inet_ntop(3), inet_pton(3), resolver(3), hosts(5), nsswitch.conf(5), hostname(7), named(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1274 - Linux cli command pthread_condattr_init

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_condattr_init and provides detailed information about the command pthread_condattr_init, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_condattr_init.

NAME 🖥️ pthread_condattr_init 🖥️

condition creation attributes

SYNOPSIS

#include <pthread.h>

int pthread_condattr_init(pthread_condattr_t *attr); int pthread_condattr_destroy(pthread_condattr_t *attr);

DESCRIPTION

Condition attributes can be specified at condition creation time, by passing a condition attribute object as second argument to pthread_cond_init(3). Passing NULL is equivalent to passing a condition attribute object with all attributes set to their default values.

The LinuxThreads implementation supports no attributes for conditions. The functions on condition attributes are included only for compliance with the POSIX standard.

pthread_condattr_init initializes the condition attribute object attr and fills it with default values for the attributes. pthread_condattr_destroy destroys a condition attribute object, which must not be reused until it is reinitialized. Both functions do nothing in the LinuxThreads implementation.

RETURN VALUE

pthread_condattr_init and pthread_condattr_destroy always return 0.

SEE ALSO

pthread_cond_init(3).

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1275 - Linux cli command XauGetBestAuthByAddr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XauGetBestAuthByAddr and provides detailed information about the command XauGetBestAuthByAddr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XauGetBestAuthByAddr.

NAME 🖥️ XauGetBestAuthByAddr 🖥️

X authority database routines

SYNOPSIS

#include <X11/Xauth.h>

typedef struct xauth {
        unsigned short  family;
        unsigned short  address_length;
        char    *address;
        unsigned short  number_length;
        char    *number;
        unsigned short  name_length;
        char    *name;
        unsigned short  data_length;
        char    *data;
} Xauth;
char *XauFileName (void);
Xauth *XauReadAuth (FILE *auth_file );
int XauWriteAuth (FILE *auth_file, Xauth *auth );
Xauth *XauGetAuthByAddr (unsigned short family , unsigned short
address_length , const char *address , unsigned short
number_length , const char *number , unsigned short
name_length , const char *name );
Xauth *XauGetBestAuthByAddr (unsigned short family , unsigned short
address_length , const char *address , unsigned short
number_length , const char *number , int types_length ,
char **types , const int *type_lengths );
int XauLockAuth (const char *file_name , int retries , int
timeout , long dead );
int XauUnlockAuth (const char *file_name );
int XauDisposeAuth (Xauth *auth );

DESCRIPTION

XauFileName generates the default authorization file name by first checking the XAUTHORITY environment variable if set, else it returns $HOME/.Xauthority. This name is statically allocated and should not be freed.

XauReadAuth reads the next entry from auth_file. The entry is not statically allocated and should be freed by calling XauDisposeAuth.

XauWriteAuth writes an authorization entry to auth_file. It returns 1 on success, 0 on failure.

XauGetAuthByAddr searches for an entry which matches the given network address/display number pair. The entry is not statically allocated and should be freed by calling XauDisposeAuth.

XauGetBestAuthByAddr is similar to XauGetAuthByAddr, except that a list of acceptable authentication methods is specified. Xau will choose the file entry which matches the earliest entry in this list (e.g., the most secure authentication method). The types argument is an array of strings, one string for each authentication method. types_length specifies how many elements are in the types array. types_lengths is an array of integers representing the length of each string.

XauLockAuth does the work necessary to synchronously update an authorization file. First it makes two file names, one with ``-c’’ appended to file_name, the other with ``-l’’ appended. If the ``-c’’ file already exists and is more than dead seconds old, XauLockAuth removes it and the associated ``-l’’ file. To prevent possible synchronization troubles with NFS, a dead value of zero forces the files to be removed. XauLockAuth makes retries attempts to create and link the file names, pausing timeout seconds between each attempt. XauLockAuth returns a collection of values depending on the results:

LOCK_ERROR
A system error occurred, either a file_name which is too long, or an unexpected failure from a system call. errno may prove useful.

LOCK_TIMEOUT
retries attempts failed

LOCK_SUCCESS
The lock succeeded.

XauUnlockAuth undoes the work of XauLockAuth by unlinking both the ``-c’’ and ``-l’’ file names.

XauDisposeAuth frees storage allocated to hold an authorization entry.

SEE ALSO

xauth(1), xdm(1)

AUTHOR

Keith Packard, MIT X Consortium

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1276 - Linux cli command Unicode_LineBreakpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Unicode_LineBreakpm and provides detailed information about the command Unicode_LineBreakpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Unicode_LineBreakpm.

NAME 🖥️ Unicode_LineBreakpm 🖥️

UAX #14 Unicode Line Breaking Algorithm

SYNOPSIS

use Unicode::LineBreak; $lb = Unicode::LineBreak->new(); $broken = $lb->break($string);

DESCRIPTION

Unicode::LineBreak performs Line Breaking Algorithm described in Unicode Standard Annex #14 [UAX #14]. East_Asian_Width informative property defined by Annex #11 [UAX #11] will be concerned to determine breaking positions.

Terminology

Following terms are used for convenience.

Mandatory break is obligatory line breaking behavior defined by core rules and performed regardless of surrounding characters. Arbitrary break is line breaking behavior allowed by core rules and chosen by user to perform it. Arbitrary break includes direct break and indirect break defined by [UAX #14].

Alphabetic characters are characters usually no line breaks are allowed between pairs of them, except that other characters provide break oppotunities. Ideographic characters are characters that usually allow line breaks both before and after themselves. [UAX #14] classifies most of alphabetic to AL and most of ideographic to ID (These terms are inaccurate from the point of view by grammatology). On several scripts, breaking positions are not obvious by each characters therefore heuristic based on dictionary is used.

Number of columns of a string is not always equal to the number of characters it contains: Each of characters is either wide, narrow or nonspacing; they occupy 2, 1 or 0 columns, respectively. Several characters may be both wide and narrow by the contexts they are used. Characters may have more various widths by customization.

PUBLIC INTERFACE

Line Breaking

new ([KEY => VALUE, …])
Constructor. About KEY => VALUE pairs see “Options”.

break (STRING)
Instance method. Break Unicode string STRING and returns it. In array context, returns array of lines contained in the result.

break_partial (STRING)
Instance method. Same as break() but accepts incremental inputs. Give undef as STRING argument to specify that input was completed.

config (KEY)

config (KEY => VALUE, …)

Instance method. Get or update configuration. About KEY => VALUE pairs see “Options”.

copy
Copy constructor. Create a copy of object instance.

Getting Informations

breakingRule (BEFORESTR, AFTERSTR)
Instance method. Get possible line breaking behavior between strings BEFORESTR and AFTERSTR. See “Constants” for returned value. Note: This method gives just approximate description of line breaking behavior. Use break() and so on to wrap actual texts.

context ([Charset => CHARSET], [Language => LANGUAGE])
Function. Get language/region context used by character set CHARSET or language LANGUAGE.

Options

“new” and “config” methods accept following pairs. Some of them affect number of columns ([E]), grapheme cluster segmentation ([G]) (see also Unicode::GCString) or line breaking behavior ([L]).

BreakIndent => “YES” | “NO”
[L] Always allows break after SPACEs at beginning of line, a.k.a. indent. [UAX #14] does not take account of such usage of SPACE. Default is "YES". Note: This option was introduced at release 1.011.

CharMax => NUMBER
[L] Possible maximum number of characters in one line, not counting trailing SPACEs and newline sequence. Note that number of characters generally doesn’t represent length of line. Default is 998. 0 means unlimited (as of release 2012.01).

ColMin => NUMBER
[L] Minimum number of columns which line broken arbitrarily may include, not counting trailing spaces and newline sequences. Default is 0.

ColMax => NUMBER
[L] Maximum number of columns line may include not counting trailing spaces and newline sequence. In other words, maximum length of line. Default is 76.

See also “Urgent” option and “User-Defined Breaking Behaviors”.

ComplexBreaking => “YES” | “NO”
[L] Performs heuristic breaking on South East Asian complex context. Default is, if word segmentation for South East Asian writing systems is enabled, "YES".

Context => CONTEXT
[E][L] Specify language/region context. Currently available contexts are "EASTASIAN" and "NONEASTASIAN". Default context is "NONEASTASIAN". In "EASTASIAN" context, characters with East_Asian_Width property ambiguous (A) are treated as “wide” and with Line Breaking Class AI as ideographic (ID). In "NONEASTASIAN" context, characters with East_Asian_Width property ambiguous (A) are treated as “narrow” and with Line Breaking Class AI as alphabetic (AL).

EAWidth => “[” ORD “=>” PROPERTY “]”

EAWidth => “undef”

[E] Tailor classification of East_Asian_Width property. ORD is UCS scalar value of character or array reference of them. PROPERTY is one of East_Asian_Width property values and extended values (See “Constants”). This option may be specified multiple times. If undef is specified, all tailoring assigned before will be canceled. By default, no tailorings are available. See also “Tailoring Character Properties”.

Format => METHOD
[L] Specify the method to format broken lines.

“SIMPLE”
Default method. Just only insert newline at arbitrary breaking positions.

“NEWLINE”
Insert or replace newline sequences with that specified by “Newline” option, remove SPACEs leading newline sequences or end-of-text. Then append newline at end of text if it does not exist.

“TRIM”
Insert newline at arbitrary breaking positions. Remove SPACEs leading newline sequences.

“undef”
Do nothing, even inserting any newlines.

Subroutine reference
See “Formatting Lines”.

HangulAsAL => “YES” | “NO”
[L] Treat hangul syllables and conjoining jamos as alphabetic characters (AL). Default is "NO".

LBClass => “[” ORD “=>” CLASS “]”

LBClass => “undef”

[G][L] Tailor classification of line breaking property. ORD is UCS scalar value of character or array reference of them. CLASS is one of line breaking classes (See “Constants”). This option may be specified multiple times. If undef is specified, all tailoring assigned before will be canceled. By default, no tailorings are available. See also “Tailoring Character Properties”.

LegacyCM => “YES” | “NO”
[G][L] Treat combining characters lead by a SPACE as an isolated combining character (ID). As of Unicode 5.0, such use of SPACE is not recommended. Default is "YES".

Newline => STRING
[L] Unicode string to be used for newline sequence. Default is " ".

Prep => METHOD
[L] Add user-defined line breaking behavior(s). This option may be specified multiple times. Following methods are available.

“NONBREAKURI”
Won’t break URIs.

“BREAKURI”
Break URIs according to a rule suitable for printed materials. For more details see [CMOS], sections 6.17 and 17.11.

“[” REGEX, SUBREF “]”
The sequences matching regular expression REGEX will be broken by subroutine referred by SUBREF. For more details see “User-Defined Breaking Behaviors”.

“undef”
Cancel all methods assigned before.

Sizing => METHOD
[L] Specify method to calculate size of string. Following options are available.

“UAX11”
Default method. Sizes are computed by columns of each characters according to built-in character database.

“undef”
Number of grapheme clusters (see Unicode::GCString) contained in the string.

Subroutine reference
See “Calculating String Size”.

See also “ColMax”, “ColMin” and “EAWidth” options.

Urgent => METHOD
[L] Specify method to handle excessing lines. Following options are available.

“CROAK”
Print error message and die.

“FORCE”
Force breaking excessing fragment.

“undef”
Default method. Won’t break excessing fragment.

Subroutine reference
See “User-Defined Breaking Behaviors”.

ViramaAsJoiner => “YES” | “NO”
[G] Virama sign (“halant” in Hindi, “coeng” in Khmer) and its succeeding letter are not broken. Default is "YES". Note: This option was introduced by release 2012.001_29. On previous releases, it was fixed to "NO". “Default” grapheme cluster defined by [UAX #29] does not include this feature.

Constants

“EA_Na”, “EA_N”, “EA_A”, “EA_W”, “EA_H”, “EA_F”
Index values to specify six East_Asian_Width property values defined by [UAX #11]: narrow (Na), neutral (N), ambiguous (A), wide (W), halfwidth (H) and fullwidth (F).

“EA_Z”
Index value to specify nonspacing characters. Note: This “nonspacing” value is extension by this module, not a part of [UAX #11].

“LB_BK”, “LB_CR”, “LB_LF”, “LB_NL”, “LB_SP”, “LB_OP”, “LB_CL”, “LB_CP”, “LB_QU”, “LB_GL”, “LB_NS”, “LB_EX”, “LB_SY”, “LB_IS”, “LB_PR”, “LB_PO”, “LB_NU”, “LB_AL”, “LB_HL”, “LB_ID”, “LB_IN”, “LB_HY”, “LB_BA”, “LB_BB”, “LB_B2”, “LB_CB”, “LB_ZW”, “LB_CM”, “LB_WJ”, “LB_H2”, “LB_H3”, “LB_JL”, “LB_JV”, “LB_JT”, “LB_SG”, “LB_AI”, “LB_CJ”, “LB_SA”, “LB_XX”, “LB_RI”
Index values to specify 40 line breaking property values (classes) defined by [UAX #14]. Note: Property value CP was introduced by Unicode 5.2.0. Property values HL and CJ were introduced by Unicode 6.1.0. Property value RI was introduced by Unicode 6.2.0.

“MANDATORY”, “DIRECT”, “INDIRECT”, “PROHIBITED”
Four values to specify line breaking behaviors: Mandatory break; Both direct break and indirect break are allowed; Indirect break is allowed but direct break is prohibited; Prohibited break.

“Unicode::LineBreak::SouthEastAsian::supported”
Flag to determin if word segmentation for South East Asian writing systems is enabled. If this feature was enabled, a non-empty string is set. Otherwise, undef is set. N.B.: Current release supports Thai script of modern Thai language only.

“UNICODE_VERSION”
A string to specify version of Unicode standard this module refers.

CUSTOMIZATION

Formatting Lines

If you specify subroutine reference as a value of “Format” option, it should accept three arguments:

$MODIFIED = &subroutine(SELF, EVENT, STR);

SELF is a Unicode::LineBreak object, EVENT is a string to determine the context that subroutine was called in, and STR is a fragment of Unicode string leading or trailing breaking position.

EVENT |When Fired |Value of STR —————————————————————– “sot” |Beginning of text |Fragment of first line “sop” |After mandatory break|Fragment of next line “sol” |After arbitrary break|Fragment on sequel of line "" |Just before any |Complete line without trailing |breaks |SPACEs “eol” |Arbitrary break |SPACEs leading breaking position “eop” |Mandatory break |Newline and its leading SPACEs “eot” |End of text |SPACEs (and newline) at end of | |text —————————————————————–

Subroutine should return modified text fragment or may return undef to express that no modification occurred. Note that modification in the context of "sot", "sop" or "sol" may affect decision of successive breaking positions while in the others won’t.

Note: String arguments are actually sequences of grapheme clusters. See Unicode::GCString.

For example, following code folds lines removing trailing spaces:

sub fmt { if ($_[1] =~ /^eo/) { return " “; } return undef; } my $lb = Unicode::LineBreak->new(Format => \fmt); $output = $lb->break($text);

User-Defined Breaking Behaviors

When a line generated by arbitrary break is expected to be beyond measure of either CharMax, ColMax or ColMin, urgent break may be performed on successive string. If you specify subroutine reference as a value of “Urgent” option, it should accept two arguments:

@BROKEN = &subroutine(SELF, STR);

SELF is a Unicode::LineBreak object and STR is a Unicode string to be broken.

Subroutine should return an array of broken string STR.

Note: String argument is actually a sequence of grapheme clusters. See Unicode::GCString.

For example, following code inserts hyphen to the name of several chemical substances (such as Titin) so that it may be folded:

sub hyphenize { return map {$_ =~ s/yl$/yl-/; $_} split /(\w+?yl(?=\w))/, $_[1]; } my $lb = Unicode::LineBreak->new(Urgent => \hyphenize); $output = $lb->break(“Methionylthreonylthreonylglutaminylarginyl…”);

If you specify [REGEX, SUBREF] array reference as any of “Prep” option, subroutine should accept two arguments:

@BROKEN = &subroutine(SELF, STR);

SELF is a Unicode::LineBreak object and STR is a Unicode string matched with REGEX.

Subroutine should return an array of broken string STR.

For example, following code will break HTTP URLs using [CMOS] rule.

my $url = qr{http://[!-]+}i; sub breakurl { my $self = shift; my $str = shift; return split m{(?<=[/]) (?=[^/]) | (?<=[^-.]) (?=[-.,_?%=&]) | (?<=[=&]) (?=.)}x, $str; } my $lb = Unicode::LineBreak->new(Prep => [$url, \breakurl]); $output = $lb->break($string);

Preserving State

Unicode::LineBreak object can behave as hash reference. Any items may be preserved throughout its life.

For example, following code will separate paragraphs with empty lines.

sub paraformat { my $self = shift; my $action = shift; my $str = shift; if ($action eq sot or $action eq sop) { $self->{line} = ; } elsif ($action eq ) { $self->{line} = $str; } elsif ($action eq eol) { return " “; } elsif ($action eq eop) { if (length $self->{line}) { return "

“; } else { return " “; } } elsif ($action eq eot) { return " “; } return undef; } my $lb = Unicode::LineBreak->new(Format => \paraformat); $output = $lb->break($string);

Calculating String Size

If you specify subroutine reference as a value of “Sizing” option, it will be called with five arguments:

$COLS = &subroutine(SELF, LEN, PRE, SPC, STR);

SELF is a Unicode::LineBreak object, LEN is size of preceding string, PRE is preceding Unicode string, SPC is additional SPACEs and STR is a Unicode string to be processed.

Subroutine should return calculated number of columns of PRE.SPC.STR. The number of columns may not be an integer: Unit of the number may be freely chosen, however, it should be same as those of “ColMin” and “ColMax” option.

Note: String arguments are actually sequences of grapheme clusters. See Unicode::GCString.

For example, following code processes lines with tab stops by each eight columns.

sub tabbedsizing { my ($self, $cols, $pre, $spc, $str) = @_; my $spcstr = $spc.$str; while ($spcstr->lbc == LB_SP) { my $c = $spcstr->item(0); if ($c eq " “) { $cols += 8 - $cols % 8; } else { $cols += $c->columns; } $spcstr = $spcstr->substr(1); } $cols += $spcstr->columns; return $cols; }; my $lb = Unicode::LineBreak->new(LBClass => [ord(” “) => LB_SP], Sizing => \tabbedsizing); $output = $lb->break($string);

Tailoring Character Properties

Character properties may be tailored by “LBClass” and “EAWidth” options. Some constants are defined for convenience of tailoring.

Line Breaking Properties

Non-starters of Kana-like Characters

By default, several hiragana, katakana and characters corresponding to kana are treated as non-starters (NS or CJ). When the following pair(s) are specified for value of “LBClass” option, these characters are treated as normal ideographic characters (ID).

“KANA_NONSTARTERS() => LB_ID”
All of characters below.

“IDEOGRAPHIC_ITERATION_MARKS() => LB_ID”
Ideographic iteration marks. U+3005 IDEOGRAPHIC ITERATION MARK, U+303B VERTICAL IDEOGRAPHIC ITERATION MARK, U+309D HIRAGANA ITERATION MARK, U+309E HIRAGANA VOICED ITERATION MARK, U+30FD KATAKANA ITERATION MARK and U+30FE KATAKANA VOICED ITERATION MARK. N.B. Some of them are neither hiragana nor katakana.

“KANA_SMALL_LETTERS() => LB_ID”

“KANA_PROLONGED_SOUND_MARKS() => LB_ID”

Hiragana or katakana small letters: Hiragana small letters U+3041 A, U+3043 I, U+3045 U, U+3047 E, U+3049 O, U+3063 TU, U+3083 YA, U+3085 YU, U+3087 YO, U+308E WA, U+3095 KA, U+3096 KE. Katakana small letters U+30A1 A, U+30A3 I, U+30A5 U, U+30A7 E, U+30A9 O, U+30C3 TU, U+30E3 YA, U+30E5 YU, U+30E7 YO, U+30EE WA, U+30F5 KA, U+30F6 KE. Katakana phonetic extensions U+31F0 KU - U+31FF RO. Halfwidth katakana small letters U+FF67 A - U+FF6F TU. Hiragana or katakana prolonged sound marks: U+30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK and U+FF70 HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK. N.B. These letters are optionally treated either as non-starter or as normal ideographic. See [JIS X 4051] 6.1.1, [JLREQ] 3.1.7 or [UAX14]. N.B. U+3095, U+3096, U+30F5, U+30F6 are considered to be neither hiragana nor katakana.

“MASU_MARK() => LB_ID”
U+303C MASU MARK. N.B. Although this character is not kana, it is usually regarded as abbreviation to sequence of hiragana ま す or katakana マ ス, MA and SU. N.B. This character is classified as non-starter (NS) by [UAX #14] and as the class corresponding to ID by [JIS X 4051] and [JLREQ].

Ambiguous Quotation Marks

By default, some punctuations are ambiguous quotation marks (QU).

“BACKWARD_QUOTES() => LB_OP, FORWARD_QUOTES() => LB_CL”
Some languages (Dutch, English, Italian, Portuguese, Spanish, Turkish and most East Asian) use rotated-9-style punctuations (‘ “) as opening and 9-style punctuations (’ ”) as closing quotation marks.

“FORWARD_QUOTES() => LB_OP, BACKWARD_QUOTES() => LB_CL”
Some others (Czech, German and Slovak) use 9-style punctuations (’ ”) as opening and rotated-9-style punctuations (‘ “) as closing quotation marks.

“BACKWARD_GUILLEMETS() => LB_OP, FORWARD_GUILLEMETS() => LB_CL”
French, Greek, Russian etc. use left-pointing guillemets (« ‹) as opening and right-pointing guillemets (» ›) as closing quotation marks.

“FORWARD_GUILLEMETS() => LB_OP, BACKWARD_GUILLEMETS() => LB_CL”
German and Slovak use right-pointing guillemets (» ›) as opening and left-pointing guillemets (« ‹) as closing quotation marks.

Danish, Finnish, Norwegian and Swedish use 9-style or right-pointing punctuations (’ ” » ›) as both opening and closing quotation marks.

IDEOGRAPHIC SPACE

“IDEOGRAPHIC_SPACE() => LB_BA”
U+3000 IDEOGRAPHIC SPACE won’t be placed at beginning of line. This is default behavior.

“IDEOGRAPHIC_SPACE() => LB_ID”
IDEOGRAPHIC SPACE can be placed at beginning of line. This was default behavior by Unicode 6.2 and earlier.

“IDEOGRAPHIC_SPACE() => LB_SP”
IDEOGRAPHIC SPACE won’t be placed at beginning of line, and will protrude from end of line.

East_Asian_Width Properties

Some particular letters of Latin, Greek and Cyrillic scripts have ambiguous (A) East_Asian_Width property. Thus, these characters are treated as wide in "EASTASIAN" context. Specifying EAWidth => [ AMBIGUOUS_*() => EA_N ], those characters are always treated as narrow.

“AMBIGUOUS_ALPHABETICS() => EA_N”
Treat all of characters below as East_Asian_Width neutral (N).

“AMBIGUOUS_CYRILLIC() => EA_N”

“AMBIGUOUS_GREEK() => EA_N”

“AMBIGUOUS_LATIN() => EA_N”

Treate letters having ambiguous (A) width of Cyrillic, Greek and Latin scripts as neutral (N).

On the other hand, despite several characters were occasionally rendered as wide characters by number of implementations for East Asian character sets, they are given narrow (Na) East_Asian_Width property just because they have fullwidth (F) compatibility characters. Specifying EAWidth as below, those characters are treated as ambiguous — wide on "EASTASIAN" context.

“QUESTIONABLE_NARROW_SIGNS() => EA_A”
U+00A2 CENT SIGN, U+00A3 POUND SIGN, U+00A5 YEN SIGN (or yuan sign), U+00A6 BROKEN BAR, U+00AC NOT SIGN, U+00AF MACRON.

Configuration File

Built-in defaults of option parameters for “new” and “config” method can be overridden by configuration files: Unicode/LineBreak/Defaults.pm. For more details read Unicode/LineBreak/Defaults.pm.sample.

BUGS

Please report bugs or buggy behaviors to developer.

CPAN Request Tracker: <http://rt.cpan.org/Public/Dist/Display.html?Name=Unicode-LineBreak>.

VERSION

Consult $VERSION variable.

Incompatible Changes

Release 2012.06

eawidth() method was deprecated. “columns” in Unicode::GCString may be used instead.

  • lbclass() method was deprecated. Use “lbc” in Unicode::GCString or “lbcext” in Unicode::GCString.

Conformance to Standards

Character properties this module is based on are defined by Unicode Standard version 8.0.0.

This module is intended to implement UAX14-C2.

IMPLEMENTATION NOTES

  • Some ideographic characters may be treated either as NS or as ID by choice.

  • Hangul syllables and conjoining jamos may be treated as either ID or AL by choice.

  • Characters assigned to AI may be resolved to either AL or ID by choice.

  • Character(s) assigned to CB are not resolved.

  • Characters assigned to CJ are always resolved to NS. More flexible tailoring mechanism is provided.

  • When word segmentation for South East Asian writing systems is not supported, characters assigned to SA are resolved to AL, except that characters that have Grapheme_Cluster_Break property value Extend or SpacingMark be resolved to CM.

  • Characters assigned to SG or XX are resolved to AL.

  • Code points of following UCS ranges are given fixed property values even if they have not been assigned any characters. Ranges | UAX #14 | UAX #11 | Description ————————————————————- U+20A0..U+20CF | PR [*1] | N [*2] | Currency symbols U+3400..U+4DBF | ID | W | CJK ideographs U+4E00..U+9FFF | ID | W | CJK ideographs U+D800..U+DFFF | AL (SG) | N | Surrogates U+E000..U+F8FF | AL (XX) | F or N (A) | Private use U+F900..U+FAFF | ID | W | CJK ideographs U+20000..U+2FFFD | ID | W | CJK ideographs U+30000..U+3FFFD | ID | W | Old hanzi U+F0000..U+FFFFD | AL (XX) | F or N (A) | Private use U+100000..U+10FFFD | AL (XX) | F or N (A) | Private use Other unassigned | AL (XX) | N | Unassigned, | | | reserved or | | | noncharacters ————————————————————- [*1] Except U+20A7 PESETA SIGN (PO), U+20B6 LIVRE TOURNOIS SIGN (PO), U+20BB NORDIC MARK SIGN (PO) and U+20BE LARI SIGN (PO). [*2] Except U+20A9 WON SIGN (H) and U+20AC EURO SIGN (F or N (A)).

  • Characters belonging to General Category Mn, Me, Cc, Cf, Zl or Zp are treated as nonspacing by this module.

REFERENCES

[CMOS]
The Chicago Manual of Style, 15th edition. University of Chicago Press, 2003.

[JIS X 4051]
JIS X 4051:2004 日本語文書の組版方法 (Formatting Rules for Japanese Documents). Japanese Standards Association, 2004.

[JLREQ]
Anan, Yasuhiro et al. Requirements for Japanese Text Layout, W3C Working Group Note 3 April 2012. <http://www.w3.org/TR/2012/NOTE-jlreq-20120403/>.

[UAX #11]
A. Freytag (ed.) (2008-2009). Unicode Standard Annex #11: East Asian Width, Revisions 17-19. <http://unicode.org/reports/tr11/>.

[UAX #14]
A. Freytag and A. Heninger (eds.) (2008-2015). Unicode Standard Annex #14: Unicode Line Breaking Algorithm, Revisions 22-35. <http://unicode.org/reports/tr14/>.

[UAX #29]
Mark Davis (ed.) (2009-2013). Unicode Standard Annex #29: Unicode Text Segmentation, Revisions 15-23. <http://www.unicode.org/reports/tr29/>.

SEE ALSO

Text::LineFold, Text::Wrap, Unicode::GCString.

AUTHOR

Copyright (C) 2009-2018 Hatuka*nezumi - IKEDA Soji <hatuka(at)nezumi.nu>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1277 - Linux cli command XauGetAuthByAddr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XauGetAuthByAddr and provides detailed information about the command XauGetAuthByAddr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XauGetAuthByAddr.

NAME 🖥️ XauGetAuthByAddr 🖥️

X authority database routines

SYNOPSIS

#include <X11/Xauth.h>

typedef struct xauth {
        unsigned short  family;
        unsigned short  address_length;
        char    *address;
        unsigned short  number_length;
        char    *number;
        unsigned short  name_length;
        char    *name;
        unsigned short  data_length;
        char    *data;
} Xauth;
char *XauFileName (void);
Xauth *XauReadAuth (FILE *auth_file );
int XauWriteAuth (FILE *auth_file, Xauth *auth );
Xauth *XauGetAuthByAddr (unsigned short family , unsigned short
address_length , const char *address , unsigned short
number_length , const char *number , unsigned short
name_length , const char *name );
Xauth *XauGetBestAuthByAddr (unsigned short family , unsigned short
address_length , const char *address , unsigned short
number_length , const char *number , int types_length ,
char **types , const int *type_lengths );
int XauLockAuth (const char *file_name , int retries , int
timeout , long dead );
int XauUnlockAuth (const char *file_name );
int XauDisposeAuth (Xauth *auth );

DESCRIPTION

XauFileName generates the default authorization file name by first checking the XAUTHORITY environment variable if set, else it returns $HOME/.Xauthority. This name is statically allocated and should not be freed.

XauReadAuth reads the next entry from auth_file. The entry is not statically allocated and should be freed by calling XauDisposeAuth.

XauWriteAuth writes an authorization entry to auth_file. It returns 1 on success, 0 on failure.

XauGetAuthByAddr searches for an entry which matches the given network address/display number pair. The entry is not statically allocated and should be freed by calling XauDisposeAuth.

XauGetBestAuthByAddr is similar to XauGetAuthByAddr, except that a list of acceptable authentication methods is specified. Xau will choose the file entry which matches the earliest entry in this list (e.g., the most secure authentication method). The types argument is an array of strings, one string for each authentication method. types_length specifies how many elements are in the types array. types_lengths is an array of integers representing the length of each string.

XauLockAuth does the work necessary to synchronously update an authorization file. First it makes two file names, one with ``-c’’ appended to file_name, the other with ``-l’’ appended. If the ``-c’’ file already exists and is more than dead seconds old, XauLockAuth removes it and the associated ``-l’’ file. To prevent possible synchronization troubles with NFS, a dead value of zero forces the files to be removed. XauLockAuth makes retries attempts to create and link the file names, pausing timeout seconds between each attempt. XauLockAuth returns a collection of values depending on the results:

LOCK_ERROR
A system error occurred, either a file_name which is too long, or an unexpected failure from a system call. errno may prove useful.

LOCK_TIMEOUT
retries attempts failed

LOCK_SUCCESS
The lock succeeded.

XauUnlockAuth undoes the work of XauLockAuth by unlinking both the ``-c’’ and ``-l’’ file names.

XauDisposeAuth frees storage allocated to hold an authorization entry.

SEE ALSO

xauth(1), xdm(1)

AUTHOR

Keith Packard, MIT X Consortium

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1278 - Linux cli command XtUnmapWidget

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtUnmapWidget and provides detailed information about the command XtUnmapWidget, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtUnmapWidget.

NAME 🖥️ XtUnmapWidget 🖥️

map and unmap widgets

SYNTAX

#include <X11/Intrinsic.h>

void XtMapWidget(Widget w );

void XtSetMappedWhenManaged(Widget w, Boolean map_when_managed);

void XtUnmapWidget(Widget w );

ARGUMENTS

map_when_managed
Specifies a Boolean value that indicates the new value of the map_when_managed field.

  1. Specifies the widget.

DESCRIPTION

If the widget is realized and managed and if the new value of map_when_managed is True, XtSetMappedWhenManaged maps the window. If the widget is realized and managed and if the new value of map_when_managed is False, it unmaps the window. XtSetMappedWhenManaged is a convenience function that is equivalent to (but slightly faster than) calling XtSetValues and setting the new value for the mappedWhenManaged resource. As an alternative to using XtSetMappedWhenManaged to control mapping, a client may set mapped_when_managed to False and use XtMapWidget and XtUnmapWidget explicitly.

SEE ALSO

XtManageChildren(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1279 - Linux cli command rintf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command rintf and provides detailed information about the command rintf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the rintf.

NAME 🖥️ rintf 🖥️

round to nearest integer

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double nearbyint(double x);
float nearbyintf(float x);
long double nearbyintl(long double x);
double rint(double x);
float rintf(float x);
long double rintl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

nearbyint(), nearbyintf(), nearbyintl():

    _POSIX_C_SOURCE >= 200112L || _ISOC99_SOURCE

rint():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

rintf(), rintl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The nearbyint(), nearbyintf(), and nearbyintl() functions round their argument to an integer value in floating-point format, using the current rounding direction (see fesetround(3)) and without raising the inexact exception. When the current rounding direction is to nearest, these functions round halfway cases to the even integer in accordance with IEEE-754.

The rint(), rintf(), and rintl() functions do the same, but will raise the inexact exception (FE_INEXACT, checkable via fetestexcept(3)) when the result differs in value from the argument.

RETURN VALUE

These functions return the rounded integer value.

If x is integral, +0, -0, NaN, or infinite, x itself is returned.

ERRORS

No errors occur. POSIX.1-2001 documents a range error for overflows, but see NOTES.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

nearbyint(), nearbyintf(), nearbyintl(), rint(), rintf(), rintl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

NOTES

SUSv2 and POSIX.1-2001 contain text about overflow (which might set errno to ERANGE, or raise an FE_OVERFLOW exception). In practice, the result cannot overflow on any current machine, so this error-handling stuff is just nonsense. (More precisely, overflow can happen only when the maximum value of the exponent is smaller than the number of mantissa bits. For the IEEE-754 standard 32-bit and 64-bit floating-point numbers the maximum value of the exponent is 127 (respectively, 1023), and the number of mantissa bits including the implicit bit is 24 (respectively, 53).)

If you want to store the rounded value in an integer type, you probably want to use one of the functions described in lrint(3) instead.

SEE ALSO

ceil(3), floor(3), lrint(3), round(3), trunc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1280 - Linux cli command setaliasent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setaliasent and provides detailed information about the command setaliasent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setaliasent.

NAME 🖥️ setaliasent 🖥️

read an alias entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <aliases.h>
void setaliasent(void);
void endaliasent(void);
struct aliasent *getaliasent(void);
int getaliasent_r(struct aliasent *restrict result,
 char buffer[restrict .buflen], size_t buflen,
 struct aliasent **restrict res);
struct aliasent *getaliasbyname(const char *name);
int getaliasbyname_r(const char *restrict name,
 struct aliasent *restrict result,
 char buffer[restrict .buflen], size_t buflen,
 struct aliasent **restrict res);

DESCRIPTION

One of the databases available with the Name Service Switch (NSS) is the aliases database, that contains mail aliases. (To find out which databases are supported, try getent –help.) Six functions are provided to access the aliases database.

The getaliasent() function returns a pointer to a structure containing the group information from the aliases database. The first time it is called it returns the first entry; thereafter, it returns successive entries.

The setaliasent() function rewinds the file pointer to the beginning of the aliases database.

The endaliasent() function closes the aliases database.

getaliasent_r() is the reentrant version of the previous function. The requested structure is stored via the first argument but the programmer needs to fill the other arguments also. Not providing enough space causes the function to fail.

The function getaliasbyname() takes the name argument and searches the aliases database. The entry is returned as a pointer to a struct aliasent.

getaliasbyname_r() is the reentrant version of the previous function. The requested structure is stored via the second argument but the programmer needs to fill the other arguments also. Not providing enough space causes the function to fail.

The struct aliasent is defined in <aliases.h>:

struct aliasent {
    char    *alias_name;             /* alias name */
    size_t   alias_members_len;
    char   **alias_members;          /* alias name list */
    int      alias_local;
};

RETURN VALUE

The functions getaliasent_r() and getaliasbyname_r() return a nonzero value on error.

FILES

The default alias database is the file /etc/aliases. This can be changed in the /etc/nsswitch.conf file.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setaliasent(), endaliasent(), getaliasent_r(), getaliasbyname_r()

Thread safetyMT-Safe locale

getaliasent(), getaliasbyname()

Thread safetyMT-Unsafe

STANDARDS

GNU.

HISTORY

The NeXT system has similar routines:

#include <aliasdb.h>
void alias_setent(void);
void alias_endent(void);
alias_ent *alias_getent(void);
alias_ent *alias_getbyname(char *name);

EXAMPLES

The following example compiles with gcc example.c -o example. It will dump all names in the alias database.

#include <aliases.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    struct aliasent *al;
    setaliasent();
    for (;;) {
        al = getaliasent();
        if (al == NULL)
            break;
        printf("Name: %s

“, al->alias_name); } if (errno) { perror(“reading alias”); exit(EXIT_FAILURE); } endaliasent(); exit(EXIT_SUCCESS); }

SEE ALSO

getgrent(3), getpwent(3), getspent(3), aliases(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1281 - Linux cli command Spreadsheet_WriteExcel_Chartpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_WriteExcel_Chartpm and provides detailed information about the command Spreadsheet_WriteExcel_Chartpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_WriteExcel_Chartpm.

NAME 🖥️ Spreadsheet_WriteExcel_Chartpm 🖥️

A writer class for Excel Charts.

SYNOPSIS

To create a simple Excel file with a chart using Spreadsheet::WriteExcel:

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( chart.xls ); my $worksheet = $workbook->add_worksheet(); my $chart = $workbook->add_chart( type => column ); # Configure the chart. $chart->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, ); # Add the worksheet data the chart refers to. my $data = [ [ Category, 2, 3, 4, 5, 6, 7 ], [ Value, 1, 4, 5, 2, 1, 5 ], ]; $worksheet->write( A1, $data ); _ _END_ _

DESCRIPTION

The Chart module is an abstract base class for modules that implement charts in Spreadsheet::WriteExcel. The information below is applicable to all of the available subclasses.

The Chart module isn’t used directly, a chart object is created via the Workbook add_chart() method where the chart type is specified:

my $chart = $workbook->add_chart( type => column );

Currently the supported chart types are:

  • area: Creates an Area (filled line) style chart. See Spreadsheet::WriteExcel::Chart::Area.

  • bar: Creates a Bar style (transposed histogram) chart. See Spreadsheet::WriteExcel::Chart::Bar.

  • column: Creates a column style (histogram) chart. See Spreadsheet::WriteExcel::Chart::Column.

  • line: Creates a Line style chart. See Spreadsheet::WriteExcel::Chart::Line.

  • pie: Creates an Pie style chart. See Spreadsheet::WriteExcel::Chart::Pie.

  • scatter: Creates an Scatter style chart. See Spreadsheet::WriteExcel::Chart::Scatter.

  • stock: Creates an Stock style chart. See Spreadsheet::WriteExcel::Chart::Stock.

More charts and sub-types will be supported in time. See the TODO section.

Methods that are common to all chart types are documented below.

CHART METHODS

add_series()

In an Excel chart a series is a collection of information such as values, x-axis labels and the name that define which data is plotted. These settings are displayed when you select the Chart -> Source Data... menu option.

With a Spreadsheet::WriteExcel chart object the add_series() method is used to set the properties for a series:

$chart->add_series( categories => =Sheet1!$A$2:$A$10, values => =Sheet1!$B$2:$B$10, name => Series name, name_formula => =Sheet1!$B$1, );

The properties that can be set are:

  • values This is the most important property of a series and must be set for every chart object. It links the chart with the worksheet data that it displays. Note the format that should be used for the formula. See Working with Cell Ranges.

  • categories This sets the chart category labels. The category is more or less the same as the X-axis. In most chart types the categories property is optional and the chart will just assume a sequential series from 1 .. n.

  • name Set the name for the series. The name is displayed in the chart legend and in the formula bar. The name property is optional and if it isn’t supplied will default to Series 1 .. n.

  • name_formula Optional, can be used to link the name to a worksheet cell. See Chart names and links.

You can add more than one series to a chart, in fact some chart types such as stock require it. The series numbering and order in the final chart is the same as the order in which that are added.

# Add the first series. $chart->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, name => Test data series 1, ); # Add another series. Category is the same but values are different. $chart->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$C$2:$C$7, name => Test data series 2, );

set_x_axis()

The set_x_axis() method is used to set properties of the X axis.

$chart->set_x_axis( name => Sample length (m) );

The properties that can be set are:

  • name Set the name (title or caption) for the axis. The name is displayed below the X axis. This property is optional. The default is to have no axis name.

  • name_formula Optional, can be used to link the name to a worksheet cell. See Chart names and links.

Additional axis properties such as range, divisions and ticks will be made available in later releases. See the TODO section.

set_y_axis()

The set_y_axis() method is used to set properties of the Y axis.

$chart->set_y_axis( name => Sample weight (kg) );

The properties that can be set are:

  • name Set the name (title or caption) for the axis. The name is displayed to the left of the Y axis. This property is optional. The default is to have no axis name.

  • name_formula Optional, can be used to link the name to a worksheet cell. See Chart names and links.

Additional axis properties such as range, divisions and ticks will be made available in later releases. See the TODO section.

set_title()

The set_title() method is used to set properties of the chart title.

$chart->set_title( name => Year End Results );

The properties that can be set are:

  • name Set the name (title) for the chart. The name is displayed above the chart. This property is optional. The default is to have no chart title.

  • name_formula Optional, can be used to link the name to a worksheet cell. See Chart names and links.

set_legend()

The set_legend() method is used to set properties of the chart legend.

$chart->set_legend( position => none );

The properties that can be set are:

  • position Set the position of the chart legend. $chart->set_legend( position => none ); The default legend position is bottom. The currently supported chart positions are: none bottom The other legend positions will be added soon.

set_chartarea()

The set_chartarea() method is used to set the properties of the chart area. In Excel the chart area is the background area behind the chart.

The properties that can be set are:

  • color Set the colour of the chart area. The Excel default chart area color is ‘white’, index 9. See Chart object colours.

  • line_color Set the colour of the chart area border line. The Excel default border line colour is ‘black’, index 9. See Chart object colours.

  • line_pattern Set the pattern of the of the chart area border line. The Excel default pattern is ’none’, index 0 for a chart sheet and ‘solid’, index 1, for an embedded chart. See Chart line patterns.

  • line_weight Set the weight of the of the chart area border line. The Excel default weight is ’narrow’, index 2. See Chart line weights.

Here is an example of setting several properties:

$chart->set_chartarea( color => red, line_color => black, line_pattern => 2, line_weight => 3, );

Note, for chart sheets the chart area border is off by default. For embedded charts this is on by default.

set_plotarea()

The set_plotarea() method is used to set properties of the plot area of a chart. In Excel the plot area is the area between the axes on which the chart series are plotted.

The properties that can be set are:

  • visible Set the visibility of the plot area. The default is 1 for visible. Set to 0 to hide the plot area and have the same colour as the background chart area.

  • color Set the colour of the plot area. The Excel default plot area color is ‘silver’, index 23. See Chart object colours.

  • line_color Set the colour of the plot area border line. The Excel default border line colour is ‘gray’, index 22. See Chart object colours.

  • line_pattern Set the pattern of the of the plot area border line. The Excel default pattern is ‘solid’, index 1. See Chart line patterns.

  • line_weight Set the weight of the of the plot area border line. The Excel default weight is ’narrow’, index 2. See Chart line weights.

Here is an example of setting several properties:

$chart->set_plotarea( color => red, line_color => black, line_pattern => 2, line_weight => 3, );

WORKSHEET METHODS

In Excel a chart sheet (i.e, a chart that isn’t embedded) shares properties with data worksheets such as tab selection, headers, footers, margins and print properties.

In Spreadsheet::WriteExcel you can set chart sheet properties using the same methods that are used for Worksheet objects.

The following Worksheet methods are also available through a non-embedded Chart object:

get_name() activate() select() hide() set_first_sheet() protect() set_zoom() set_tab_color() set_landscape() set_portrait() set_paper() set_margins() set_header() set_footer()

See Spreadsheet::WriteExcel for a detailed explanation of these methods.

EXAMPLE

Here is a complete example that demonstrates some of the available features when creating a chart.

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( chart_area.xls ); my $worksheet = $workbook->add_worksheet(); my $bold = $workbook->add_format( bold => 1 ); # Add the worksheet data that the charts will refer to. my $headings = [ Number, Sample 1, Sample 2 ]; my $data = [ [ 2, 3, 4, 5, 6, 7 ], [ 1, 4, 5, 2, 1, 5 ], [ 3, 6, 7, 5, 4, 3 ], ]; $worksheet->write( A1, $headings, $bold ); $worksheet->write( A2, $data ); # Create a new chart object. In this case an embedded chart. my $chart = $workbook->add_chart( type => area, embedded => 1 ); # Configure the first series. (Sample 1) $chart->add_series( name => Sample 1, categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, ); # Configure the second series. (Sample 2) $chart->add_series( name => Sample 2, categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$C$2:$C$7, ); # Add a chart title and some axis labels. $chart->set_title ( name => Results of sample analysis ); $chart->set_x_axis( name => Test number ); $chart->set_y_axis( name => Sample length (cm) ); # Insert the chart into the worksheet (with an offset). $worksheet->insert_chart( D2, $chart, 25, 10 ); _ _END_ _

Chart object colours

Many of the chart objects supported by Spreadsheet::WriteExcl allow the default colours to be changed. Excel provides a palette of 56 colours and in Spreadsheet::WriteExcel these colours are accessed via their palette index in the range 8..63.

The most commonly used colours can be accessed by name or index.

black => 8, green => 17, navy => 18, white => 9, orange => 53, pink => 33, red => 10, gray => 23, purple => 20, blue => 12, lime => 11, silver => 22, yellow => 13, cyan => 15, brown => 16, magenta => 14,

For example the following are equivalent.

$chart->set_plotarea( color => 10 ); $chart->set_plotarea( color => red );

The colour palette is shown in palette.html in the docs directory of the distro. An Excel version of the palette can be generated using colors.pl in the examples directory.

User defined colours can be set using the set_custom_color() workbook method. This and other aspects of using colours are discussed in the Colours in Excel section of the main Spreadsheet::WriteExcel documentation: <http://search.cpan.org/dist/Spreadsheet-WriteExcel/lib/Spreadsheet/WriteExcel.pm#COLOURS_IN_EXCEL>.

Chart line patterns

Chart lines patterns can be set using either an index or a name:

$chart->set_plotarea( weight => 2 ); $chart->set_plotarea( weight => dash );

Chart lines have 9 possible patterns are follows:

none => 0, solid => 1, dash => 2, dot => 3, dash-dot => 4, dash-dot-dot => 5, medium-gray => 6, dark-gray => 7, light-gray => 8,

The patterns 1-8 are shown in order in the drop down dialog boxes in Excel. The default pattern is ‘solid’, index 1.

Chart line weights

Chart lines weights can be set using either an index or a name:

$chart->set_plotarea( weight => 1 ); $chart->set_plotarea( weight => hairline );

Chart lines have 4 possible weights are follows:

hairline => 1, narrow => 2, medium => 3, wide => 4,

The weights 1-4 are shown in order in the drop down dialog boxes in Excel. The default weight is ’narrow’, index 2.

Chart names and links

The add_series()), set_x_axis(), set_y_axis() and set_title() methods all support a name property. In general these names can be either a static string or a link to a worksheet cell. If you choose to use the name_formula property to specify a link then you should also the name property. This isn’t strictly required by Excel but some third party applications expect it to be present.

$chart->set_title( name => Year End Results, name_formula => =Sheet1!$C$1, );

These links should be used sparingly since they aren’t commonly used in Excel charts.

Chart names and Unicode

The add_series()), set_x_axis(), set_y_axis() and set_title() methods all support a name property. These names can be UTF8 strings if you are using perl 5.8+.

# perl 5.8+ example: my $smiley = “\x{263A}”; $chart->set_title( name => “Best. Results. Ever! $smiley” );

For older perls you write Unicode strings as UTF-16BE by adding a name_encoding property:

# perl 5.005 example: my $utf16be_name = pack n, 0x263A; $chart->set_title( name => $utf16be_name, name_encoding => 1, );

This methodology is explained in the UNICODE IN EXCEL section of Spreadsheet::WriteExcel but is semi-deprecated. If you are using Unicode the easiest option is to just use UTF8 in perl 5.8+.

Working with Cell Ranges

In the section on add_series() it was noted that the series must be defined using a range formula:

$chart->add_series( values => =Sheet1!$B$2:$B$10 );

The worksheet name must be specified (even for embedded charts) and the cell references must be absolute references, i.e., they must contain $ signs. This is the format that is required by Excel for chart references.

Since it isn’t very convenient to work with this type of string programmatically the Spreadsheet::WriteExcel::Utility module, which is included with Spreadsheet::WriteExcel, provides a function called xl_range_formula() to convert from zero based row and column cell references to an A1 style formula string.

The syntax is:

xl_range_formula($sheetname, $row_1, $row_2, $col_1, $col_2)

If you include it in your program, using the standard import syntax, you can use the function as follows:

# Include the Utility module or just the function you need. use Spreadsheet::WriteExcel::Utility qw( xl_range_formula ); … # Then use it as required. $chart->add_series( categories => xl_range_formula( Sheet1, 1, 9, 0, 0 ), values => xl_range_formula( Sheet1, 1, 9, 1, 1 ), ); # Which is the same as: $chart->add_series( categories => =Sheet1!$A$2:$A$10, values => =Sheet1!$B$2:$B$10, );

See Spreadsheet::WriteExcel::Utility for more details.

TODO

Charts in Spreadsheet::WriteExcel are a work in progress. More chart types and features will be added in time. Please be patient. Even a small feature can take a week or more to implement, test and document.

Features that are on the TODO list and will be added are:

  • Chart sub-types.

  • Colours and formatting options. For now you will have to make do with the default Excel colours and formats.

  • Axis controls, gridlines.

  • 3D charts.

  • Embedded data in charts for third party application support. See Known Issues.

  • Additional chart types such as Bubble and Radar. Send an email if you are interested in other types and they will be added to the queue.

If you are interested in sponsoring a feature let me know.

KNOWN ISSUES

  • Currently charts don’t contain embedded data from which the charts can be rendered. Excel and most other third party applications ignore this and read the data via the links that have been specified. However, some applications may complain or not render charts correctly. The preview option in Mac OS X is an known example. This will be fixed in a later release.

  • When there are several charts with titles set in a workbook some of the titles may display at a font size of 10 instead of the default 12 until another chart with the title set is viewed.

  • Stock (and other) charts should have the X-axis dates aligned at an angle for clarity. This will be fixed at a later stage.

AUTHOR

John McNamara [email protected]

COPYRIGHT

Copyright MM-MMX, John McNamara.

All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1282 - Linux cli command freelocale

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command freelocale and provides detailed information about the command freelocale, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the freelocale.

NAME 🖥️ freelocale 🖥️

create, modify, and free a locale object

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <locale.h>
locale_t newlocale(int category_mask, const char *locale,
 locale_t base);
void freelocale(locale_t locobj);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

newlocale(), freelocale():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The newlocale() function creates a new locale object, or modifies an existing object, returning a reference to the new or modified object as the function result. Whether the call creates a new object or modifies an existing object is determined by the value of base:

  • If base is (locale_t) 0, a new object is created.

  • If base refers to valid existing locale object (i.e., an object returned by a previous call to newlocale() or duplocale(3)), then that object is modified by the call. If the call is successful, the contents of base are unspecified (in particular, the object referred to by base may be freed, and a new object created). Therefore, the caller should ensure that it stops using base before the call to newlocale(), and should subsequently refer to the modified object via the reference returned as the function result. If the call fails, the contents of base remain valid and unchanged.

If base is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)), or is not (locale_t) 0 and is not a valid locale object handle, the behavior is undefined.

The category_mask argument is a bit mask that specifies the locale categories that are to be set in a newly created locale object or modified in an existing object. The mask is constructed by a bitwise OR of the constants LC_ADDRESS_MASK, LC_CTYPE_MASK, LC_COLLATE_MASK, LC_IDENTIFICATION_MASK, LC_MEASUREMENT_MASK, LC_MESSAGES_MASK, LC_MONETARY_MASK, LC_NUMERIC_MASK, LC_NAME_MASK, LC_PAPER_MASK, LC_TELEPHONE_MASK, and LC_TIME_MASK. Alternatively, the mask can be specified as LC_ALL_MASK, which is equivalent to ORing all of the preceding constants.

For each category specified in category_mask, the locale data from locale will be used in the object returned by newlocale(). If a new locale object is being created, data for all categories not specified in category_mask is taken from the default (“POSIX”) locale.

The following preset values of locale are defined for all categories that can be specified in category_mask:

“POSIX”
A minimal locale environment for C language programs.

“C”
Equivalent to “POSIX”.

""
An implementation-defined native environment corresponding to the values of the LC_* and LANG environment variables (see locale(7)).

freelocale()

The freelocale() function deallocates the resources associated with locobj, a locale object previously returned by a call to newlocale() or duplocale(3). If locobj is LC_GLOBAL_LOCALE or is not valid locale object handle, the results are undefined.

Once a locale object has been freed, the program should make no further use of it.

RETURN VALUE

On success, newlocale() returns a handle that can be used in calls to duplocale(3), freelocale(), and other functions that take a locale_t argument. On error, newlocale() returns (locale_t) 0, and sets errno to indicate the error.

ERRORS

EINVAL
One or more bits in category_mask do not correspond to a valid locale category.

EINVAL
locale is NULL.

ENOENT
locale is not a string pointer referring to a valid locale.

ENOMEM
Insufficient memory to create a locale object.

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.3.

NOTES

Each locale object created by newlocale() should be deallocated using freelocale().

EXAMPLES

The program below takes up to two command-line arguments, which each identify locales. The first argument is required, and is used to set the LC_NUMERIC category in a locale object created using newlocale(). The second command-line argument is optional; if it is present, it is used to set the LC_TIME category of the locale object.

Having created and initialized the locale object, the program then applies it using uselocale(3), and then tests the effect of the locale changes by:

  1. Displaying a floating-point number with a fractional part. This output will be affected by the LC_NUMERIC setting. In many European-language locales, the fractional part of the number is separated from the integer part using a comma, rather than a period.

  2. Displaying the date. The format and language of the output will be affected by the LC_TIME setting.

The following shell sessions show some example runs of this program.

Set the LC_NUMERIC category to fr_FR (French):

$ ./a.out fr_FR
123456,789
Fri Mar  7 00:25:08 2014

Set the LC_NUMERIC category to fr_FR (French), and the LC_TIME category to it_IT (Italian):

$ ./a.out fr_FR it_IT
123456,789
ven 07 mar 2014 00:26:01 CET

Specify the LC_TIME setting as an empty string, which causes the value to be taken from environment variable settings (which, here, specify mi_NZ, New Zealand Māori):

$ LC_ALL=mi_NZ ./a.out fr_FR ""
123456,789
Te Paraire, te 07 o Poutū-te-rangi, 2014 00:38:44 CET

Program source

#define _XOPEN_SOURCE 700
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \
                        } while (0)
int
main(int argc, char *argv[])
{
    char buf[100];
    time_t t;
    size_t s;
    struct tm *tm;
    locale_t loc, nloc;
    if (argc < 2) {
        fprintf(stderr, "Usage: %s locale1 [locale2]

“, argv[0]); exit(EXIT_FAILURE); } /* Create a new locale object, taking the LC_NUMERIC settings from the locale specified in argv[1]. / loc = newlocale(LC_NUMERIC_MASK, argv[1], (locale_t) 0); if (loc == (locale_t) 0) errExit(“newlocale”); / If a second command-line argument was specified, modify the locale object to take the LC_TIME settings from the locale specified in argv[2]. We assign the result of this newlocale() call to ’nloc’ rather than ’loc’, since in some cases, we might want to preserve ’loc’ if this call fails. / if (argc > 2) { nloc = newlocale(LC_TIME_MASK, argv[2], loc); if (nloc == (locale_t) 0) errExit(“newlocale”); loc = nloc; } / Apply the newly created locale to this thread. / uselocale(loc); / Test effect of LC_NUMERIC. / printf("%8.3f “, 123456.789); / Test effect of LC_TIME. / t = time(NULL); tm = localtime(&t); if (tm == NULL) errExit(“time”); s = strftime(buf, sizeof(buf), “%c”, tm); if (s == 0) errExit(“strftime”); printf("%s “, buf); / Free the locale object. / uselocale(LC_GLOBAL_LOCALE); / So ’loc’ is no longer in use */ freelocale(loc); exit(EXIT_SUCCESS); }

SEE ALSO

locale(1), duplocale(3), setlocale(3), uselocale(3), locale(5), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1283 - Linux cli command sincosl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sincosl and provides detailed information about the command sincosl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sincosl.

NAME 🖥️ sincosl 🖥️

calculate sin and cos simultaneously

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <math.h>
void sincos(double x, double *sin, double *cos);
void sincosf(float x, float *sin, float *cos);
void sincosl(long double x, long double *sin, long double *cos);

DESCRIPTION

Several applications need sine and cosine of the same angle x. These functions compute both at the same time, and store the results in *sin and *cos. Using this function can be more efficient than two separate calls to sin(3) and cos(3).

If x is a NaN, a NaN is returned in *sin and *cos.

If x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned in *sin and *cos.

RETURN VALUE

These functions return void.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is an infinity
errno is set to EDOM (but see BUGS). An invalid floating-point exception (FE_INVALID) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sincos(), sincosf(), sincosl()

Thread safetyMT-Safe

STANDARDS

GNU.

HISTORY

glibc 2.1.

NOTES

To see the performance advantage of sincos(), it may be necessary to disable gcc(1) built-in optimizations, using flags such as:

cc -O -lm -fno-builtin prog.c

BUGS

Before glibc 2.22, the glibc implementation did not set errno to EDOM when a domain error occurred.

SEE ALSO

cos(3), sin(3), tan(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1284 - Linux cli command zip_fdopen

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_fdopen and provides detailed information about the command zip_fdopen, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_fdopen.

libzip (-lzip)

The zip archive specified by the open file descriptor

is opened and a pointer to a

used to manipulate the archive, is returned. In contrast to

using

the archive can only be opened in read-only mode. The

argument may not be used any longer after calling

The

are specified by

the following values, or 0 for none of them.

Perform additional stricter consistency checks on the archive, and error if they fail.

If an error occurs and

is

it will be set to the corresponding error code.

Upon successful completion

returns a

pointer, and

should not be used any longer, nor passed to

Otherwise,

is returned and

is set to indicate the error. In the error case,

remains unchanged.

The file specified by

is prepared for use by

unless:

Inconsistencies were found in the file specified by

This error is often caused by specifying

but can also happen without it.

The

argument is invalid. Not all

flags are allowed for

see

Required memory could not be allocated.

The file specified by

is not a zip archive.

The file specified by

could not be prepared for use by

A read error occurred; see

for details.

The file specified by

does not allow seeks.

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1285 - Linux cli command HTML_LinkExtorpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_LinkExtorpm and provides detailed information about the command HTML_LinkExtorpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_LinkExtorpm.

NAME 🖥️ HTML_LinkExtorpm 🖥️

Extract links from an HTML document

SYNOPSIS

require HTML::LinkExtor; $p = HTML::LinkExtor->new(\cb, “http://www.perl.org/"); sub cb { my($tag, %links) = @_; print “$tag @{[%links]} “; } $p->parse_file(“index.html”);

DESCRIPTION

HTML::LinkExtor is an HTML parser that extracts links from an HTML document. The HTML::LinkExtor is a subclass of HTML::Parser. This means that the document should be given to the parser by calling the $p->parse() or $p->parse_file() methods.

$p = HTML::LinkExtor->new

$p = HTML::LinkExtor->new( $callback )

$p = HTML::LinkExtor->new( $callback, $base )

The constructor takes two optional arguments. The first is a reference to a callback routine. It will be called as links are found. If a callback is not provided, then links are just accumulated internally and can be retrieved by calling the $p->links() method. The $base argument is an optional base URL used to absolutize all URLs found. You need to have the URI module installed if you provide $base. The callback is called with the lowercase tag name as first argument, and then all link attributes as separate key/value pairs. All non-link attributes are removed.

$p->links
Returns a list of all links found in the document. The returned values will be anonymous arrays with the following elements: [$tag, $attr => $url1, $attr2 => $url2,…] The $p->links method will also truncate the internal link list. This means that if the method is called twice without any parsing between them the second call will return an empty list. Also note that $p->links will always be empty if a callback routine was provided when the HTML::LinkExtor was created.

EXAMPLE

This is an example showing how you can extract links from a document received using LWP:

use LWP::UserAgent; use HTML::LinkExtor; use URI::URL; $url = “http://www.perl.org/"; # for instance $ua = LWP::UserAgent->new; # Set up a callback that collect image links my @imgs = (); sub callback { my($tag, %attr) = @_; return if $tag ne img; # we only look closer at <img …> push(@imgs, values %attr); } # Make the parser. Unfortunately, we dont know the base yet # (it might be different from $url) $p = HTML::LinkExtor->new(\callback); # Request document and parse it as it arrives $res = $ua->request(HTTP::Request->new(GET => $url), sub {$p->parse($_[0])}); # Expand all image URLs to absolute ones my $base = $res->base; @imgs = map { $_ = url($_, $base)->abs; } @imgs; # Print them out print join(” “, @imgs), " “;

SEE ALSO

HTML::Parser, HTML::Tagset, LWP, URI::URL

COPYRIGHT

Copyright 1996-2001 Gisle Aas.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1286 - Linux cli command fwprintf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fwprintf and provides detailed information about the command fwprintf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fwprintf.

NAME 🖥️ fwprintf 🖥️

formatted wide-character output conversion

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
#include <wchar.h>
int wprintf(const wchar_t *restrict format, ...);
int fwprintf(FILE *restrict stream,
 const wchar_t *restrict format, ...);
int swprintf(wchar_t wcs[restrict .maxlen], size_t maxlen,
 const wchar_t *restrict format, ...);
int vwprintf(const wchar_t *restrict format, va_list args);
int vfwprintf(FILE *restrict stream,
 const wchar_t *restrict format, va_list args);
int vswprintf(wchar_t wcs[restrict .maxlen], size_t maxlen,
 const wchar_t *restrict format, va_list args);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE
        || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The wprintf() family of functions is the wide-character equivalent of the printf(3) family of functions. It performs formatted output of wide characters.

The wprintf() and vwprintf() functions perform wide-character output to stdout. stdout must not be byte oriented; see fwide(3) for more information.

The fwprintf() and vfwprintf() functions perform wide-character output to stream. stream must not be byte oriented; see fwide(3) for more information.

The swprintf() and vswprintf() functions perform wide-character output to an array of wide characters. The programmer must ensure that there is room for at least maxlen wide characters at wcs.

These functions are like the printf(3), vprintf(3), fprintf(3), vfprintf(3), sprintf(3), vsprintf(3) functions except for the following differences:

·
The format string is a wide-character string.

·
The output consists of wide characters, not bytes.

·
swprintf() and vswprintf() take a maxlen argument, sprintf(3) and vsprintf(3) do not. (snprintf(3) and vsnprintf(3) take a maxlen argument, but these functions do not return -1 upon buffer overflow on Linux.)

The treatment of the conversion characters c and s is different:

c
If no l modifier is present, the int argument is converted to a wide character by a call to the btowc(3) function, and the resulting wide character is written. If an l modifier is present, the wint_t (wide character) argument is written.

s
If no l modifier is present: the const char * argument is expected to be a pointer to an array of character type (pointer to a string) containing a multibyte character sequence beginning in the initial shift state. Characters from the array are converted to wide characters (each by a call to the mbrtowc(3) function with a conversion state starting in the initial state before the first byte). The resulting wide characters are written up to (but not including) the terminating null wide character (L’�’). If a precision is specified, no more wide characters than the number specified are written. Note that the precision determines the number of wide characters written, not the number of bytes or screen positions. The array must contain a terminating null byte (‘�’), unless a precision is given and it is so small that the number of converted wide characters reaches it before the end of the array is reached. If an l modifier is present: the const wchar_t * argument is expected to be a pointer to an array of wide characters. Wide characters from the array are written up to (but not including) a terminating null wide character. If a precision is specified, no more than the number specified are written. The array must contain a terminating null wide character, unless a precision is given and it is smaller than or equal to the number of wide characters in the array.

RETURN VALUE

The functions return the number of wide characters written, excluding the terminating null wide character in case of the functions swprintf() and vswprintf(). They return -1 when an error occurs.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wprintf(), fwprintf(), swprintf(), vwprintf(), vfwprintf(), vswprintf()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of wprintf() et al. depends on the LC_CTYPE category of the current locale.

If the format string contains non-ASCII wide characters, the program will work correctly only if the LC_CTYPE category of the current locale at run time is the same as the LC_CTYPE category of the current locale at compile time. This is because the wchar_t representation is platform- and locale-dependent. (The glibc represents wide characters using their Unicode (ISO/IEC 10646) code point, but other platforms don’t do this. Also, the use of C99 universal character names of the form \unnnn does not solve this problem.) Therefore, in internationalized programs, the format string should consist of ASCII wide characters only, or should be constructed at run time in an internationalized way (e.g., using gettext(3) or iconv(3), followed by mbstowcs(3)).

SEE ALSO

fprintf(3), fputwc(3), fwide(3), printf(3), snprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1287 - Linux cli command XML_XPathEngine_Booleanpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_XPathEngine_Booleanpm and provides detailed information about the command XML_XPathEngine_Booleanpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_XPathEngine_Booleanpm.

NAME 🖥️ XML_XPathEngine_Booleanpm 🖥️

Boolean true/false values

DESCRIPTION

XML::XPathEngine::Boolean objects implement simple boolean true/false objects.

API

XML::XPathEngine::Boolean->True

Creates a new Boolean object with a true value.

XML::XPathEngine::Boolean->False

Creates a new Boolean object with a false value.

value()

Returns true or false.

to_literal()

Returns the string true or false.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1288 - Linux cli command SIMPLEQ_INIT

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SIMPLEQ_INIT and provides detailed information about the command SIMPLEQ_INIT, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SIMPLEQ_INIT.

NAME 🖥️ SIMPLEQ_INIT 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1289 - Linux cli command fsetpos

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fsetpos and provides detailed information about the command fsetpos, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fsetpos.

NAME 🖥️ fsetpos 🖥️

reposition a stream

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int fseek(FILE *stream, long offset, int whence);
long ftell(FILE *stream);
void rewind(FILE *stream);
int fgetpos(FILE *restrict stream, fpos_t *restrict pos);
int fsetpos(FILE *stream, const fpos_t *pos);

DESCRIPTION

The fseek() function sets the file position indicator for the stream pointed to by stream. The new position, measured in bytes, is obtained by adding offset bytes to the position specified by whence. If whence is set to SEEK_SET, SEEK_CUR, or SEEK_END, the offset is relative to the start of the file, the current position indicator, or end-of-file, respectively. A successful call to the fseek() function clears the end-of-file indicator for the stream and undoes any effects of the ungetc(3) function on the same stream.

The ftell() function obtains the current value of the file position indicator for the stream pointed to by stream.

The rewind() function sets the file position indicator for the stream pointed to by stream to the beginning of the file. It is equivalent to:

(void) fseek(stream, 0L, SEEK_SET)

except that the error indicator for the stream is also cleared (see clearerr(3)).

The fgetpos() and fsetpos() functions are alternate interfaces equivalent to ftell() and fseek() (with whence set to SEEK_SET), setting and storing the current value of the file offset into or from the object referenced by pos. On some non-UNIX systems, an fpos_t object may be a complex object and these routines may be the only way to portably reposition a text stream.

If the stream refers to a regular file and the resulting stream offset is beyond the size of the file, subsequent writes will extend the file with a hole, up to the offset, before committing any data. See lseek(2) for details on file seeking semantics.

RETURN VALUE

The rewind() function returns no value. Upon successful completion, fgetpos(), fseek(), fsetpos() return 0, and ftell() returns the current offset. Otherwise, -1 is returned and errno is set to indicate the error.

ERRORS

EINVAL
The whence argument to fseek() was not SEEK_SET, SEEK_END, or SEEK_CUR. Or: the resulting file offset would be negative.

ESPIPE
The file descriptor underlying stream is not seekable (e.g., it refers to a pipe, FIFO, or socket).

The functions fgetpos(), fseek(), fsetpos(), and ftell() may also fail and set errno for any of the errors specified for the routines fflush(3), fstat(2), lseek(2), and malloc(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fseek(), ftell(), rewind(), fgetpos(), fsetpos()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89.

SEE ALSO

lseek(2), fseeko(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1290 - Linux cli command zip_fread

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_fread and provides detailed information about the command zip_fread, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_fread.

libzip (-lzip)

The

function reads at most

bytes from

into

If successful, the number of bytes actually read is returned. Otherwise, -1 is returned.

was added in libzip 0.6. In libzip 0.10 the return type was changed from

to

In libzip 0.10 the type of

was changed from

to

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1291 - Linux cli command floorf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command floorf and provides detailed information about the command floorf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the floorf.

NAME 🖥️ floorf 🖥️

largest integral value not greater than argument

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double floor(double x);
float floorf(float x);
long double floorl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

floorf(), floorl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the largest integral value that is not greater than x.

For example, floor(0.5) is 0.0, and floor(-0.5) is -1.0.

RETURN VALUE

These functions return the floor of x.

If x is integral, +0, -0, NaN, or an infinity, x itself is returned.

ERRORS

No errors occur. POSIX.1-2001 documents a range error for overflows, but see NOTES.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

floor(), floorf(), floorl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

SUSv2 and POSIX.1-2001 contain text about overflow (which might set errno to ERANGE, or raise an FE_OVERFLOW exception). In practice, the result cannot overflow on any current machine, so this error-handling stuff is just nonsense. (More precisely, overflow can happen only when the maximum value of the exponent is smaller than the number of mantissa bits. For the IEEE-754 standard 32-bit and 64-bit floating-point numbers the maximum value of the exponent is 127 (respectively, 1023), and the number of mantissa bits including the implicit bit is 24 (respectively, 53).)

SEE ALSO

ceil(3), lrint(3), nearbyint(3), rint(3), round(3), trunc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1292 - Linux cli command isinf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isinf and provides detailed information about the command isinf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isinf.

NAME 🖥️ isinf 🖥️

floating-point classification macros

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
int fpclassify(x);
int isfinite(x);
int isnormal(x);
int isnan(x);
int isinf(x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

fpclassify(), isfinite(), isnormal():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

isnan():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isinf():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

Floating point numbers can have special values, such as infinite or NaN. With the macro fpclassify(x) you can find out what type x is. The macro takes any floating-point expression as argument. The result is one of the following values:

FP_NAN
x is “Not a Number”.

FP_INFINITE
x is either positive infinity or negative infinity.

FP_ZERO
x is zero.

FP_SUBNORMAL
x is too small to be represented in normalized format.

FP_NORMAL
if nothing of the above is correct then it must be a normal floating-point number.

The other macros provide a short answer to some standard questions.

isfinite(x)
returns a nonzero value if
(fpclassify(x) != FP_NAN && fpclassify(x) != FP_INFINITE)

isnormal(x)
returns a nonzero value if (fpclassify(x) == FP_NORMAL)

isnan(x)
returns a nonzero value if (fpclassify(x) == FP_NAN)

isinf(x)
returns 1 if x is positive infinity, and -1 if x is negative infinity.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fpclassify(), isfinite(), isnormal(), isnan(), isinf()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

In glibc 2.01 and earlier, isinf() returns a nonzero value (actually: 1) if x is positive infinity or negative infinity. (This is all that C99 requires.)

NOTES

For isinf(), the standards merely say that the return value is nonzero if and only if the argument has an infinite value.

SEE ALSO

finite(3), INFINITY(3), isgreater(3), signbit(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1293 - Linux cli command Tk_demos_widget_lib_trace2pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_demos_widget_lib_trace2pm and provides detailed information about the command Tk_demos_widget_lib_trace2pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_demos_widget_lib_trace2pm.

NAME 🖥️ Tk_demos_widget_lib_trace2pm 🖥️

Text contents defined by a traced variable.

SYNOPSIS

$tt = $parent->TraceText(-option => value, … );

DESCRIPTION

Create a new TraceText widget that is derived from the standard Text widget. Because it inherits all the base options and methods it behaves just like a Text widget. Additionally, TraceText adds a -textvariable option, which is a reference to a Perl scalar that defines the contents of the widget.

Based on the Tcl/Tk TracedText “overridden widget” by Kevin Kenny.

-textvariable
A scalar reference. The value of the variable defines the contents of the TraceText widget. Using the keyboard to insert or delete text changes the value of the variable, and changing the variable alters the contents of the TraceText widget.

METHODS

Standard Text widget methods.

ADVERTISED SUBWIDGETS

None.

EXAMPLE

my $tt = $mw->TraceText( -textvariable => \scalar );

AUTHOR

[email protected]

Copyright (C) 2003 - 2004, Steve Lidie. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

KEYWORDS

text, trace

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1294 - Linux cli command XtLastTimestampProcessed

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtLastTimestampProcessed and provides detailed information about the command XtLastTimestampProcessed, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtLastTimestampProcessed.

NAME 🖥️ XtLastTimestampProcessed 🖥️

last event, last timestamp processed

SYNTAX

#include <X11/Intrinsic.h>

XEvent* XtLastEventProcessed(Display* display);

Time XtLastTimestampProcessed(Display* display);

ARGUMENTS

display
Specifies the open display connection.

DESCRIPTION

XtLastEventProcessed returns the last event passed to XtDispatchEvent for the specified display and NULL if there has been no event. The client must not modify the contents of the returned event.

XtLastTimestampProcessed returns the timestamp of the last KeyPress, KeyRelease, ButtonPress, ButtonRelease, MotionNotify, EnterNotify, LeaveNotify, PropertyNotify, or SelectionClear event that has been passed to XtDispatchEvent for the specified display and zero if there has been no such event.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1295 - Linux cli command fprintf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fprintf and provides detailed information about the command fprintf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fprintf.

NAME 🖥️ fprintf 🖥️

formatted output conversion

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int printf(const char *restrict format, ...);
int fprintf(FILE *restrict stream,
 const char *restrict format, ...);
int dprintf(int fd,
 const char *restrict format, ...);
int sprintf(char *restrict str,
 const char *restrict format, ...);
int snprintf(char str[restrict .size], size_t size,
 const char *restrict format, ...);
int vprintf(const char *restrict format, va_list ap);
int vfprintf(FILE *restrict stream,
 const char *restrict format, va_list ap);
int vdprintf(int fd,
 const char *restrict format, va_list ap);
int vsprintf(char *restrict str,
 const char *restrict format, va_list ap);
int vsnprintf(char str[restrict .size], size_t size,
 const char *restrict format, va_list ap);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

snprintf(), vsnprintf():

    _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE

dprintf(), vdprintf():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The functions in the printf() family produce output according to a format as described below. The functions printf() and vprintf() write output to stdout, the standard output stream; fprintf() and vfprintf() write output to the given output stream; sprintf(), snprintf(), vsprintf(), and vsnprintf() write to the character string str.

The function dprintf() is the same as fprintf() except that it outputs to a file descriptor, fd, instead of to a stdio(3) stream.

The functions snprintf() and vsnprintf() write at most size bytes (including the terminating null byte (‘�’)) to str.

The functions vprintf(), vfprintf(), vdprintf(), vsprintf(), vsnprintf() are equivalent to the functions printf(), fprintf(), dprintf(), sprintf(), snprintf(), respectively, except that they are called with a va_list instead of a variable number of arguments. These functions do not call the va_end macro. Because they invoke the va_arg macro, the value of ap is undefined after the call. See stdarg(3).

All of these functions write the output under the control of a format string that specifies how subsequent arguments (or arguments accessed via the variable-length argument facilities of stdarg(3)) are converted for output.

C99 and POSIX.1-2001 specify that the results are undefined if a call to sprintf(), snprintf(), vsprintf(), or vsnprintf() would cause copying to take place between objects that overlap (e.g., if the target string array and one of the supplied input arguments refer to the same buffer). See CAVEATS.

Format of the format string

The format string is a character string, beginning and ending in its initial shift state, if any. The format string is composed of zero or more directives: ordinary characters (not %), which are copied unchanged to the output stream; and conversion specifications, each of which results in fetching zero or more subsequent arguments. Each conversion specification is introduced by the character %, and ends with a conversion specifier. In between there may be (in this order) zero or more flags, an optional minimum field width, an optional precision and an optional length modifier.

The overall syntax of a conversion specification is:

%[$][flags][width][.precision][length modifier]conversion

The arguments must correspond properly (after type promotion) with the conversion specifier. By default, the arguments are used in the order given, where each ‘*’ (see Field width and Precision below) and each conversion specifier asks for the next argument (and it is an error if insufficiently many arguments are given). One can also specify explicitly which argument is taken, at each place where an argument is required, by writing “%m$” instead of ‘%’ and “*m$” instead of ‘*’, where the decimal integer m denotes the position in the argument list of the desired argument, indexed starting from 1. Thus,

printf("%*d", width, num);

and

printf("%2$*1$d", width, num);

are equivalent. The second style allows repeated references to the same argument. The C99 standard does not include the style using ‘$’, which comes from the Single UNIX Specification. If the style using ‘$’ is used, it must be used throughout for all conversions taking an argument and all width and precision arguments, but it may be mixed with “%%” formats, which do not consume an argument. There may be no gaps in the numbers of arguments specified using ‘$’; for example, if arguments 1 and 3 are specified, argument 2 must also be specified somewhere in the format string.

For some numeric conversions a radix character (“decimal point”) or thousands’ grouping character is used. The actual character used depends on the LC_NUMERIC part of the locale. (See setlocale(3).) The POSIX locale uses ‘.’ as radix character, and does not have a grouping character. Thus,

printf("%'.2f", 1234567.89);

results in “1234567.89” in the POSIX locale, in “1234567,89” in the nl_NL locale, and in “1.234.567,89” in the da_DK locale.

Flag characters

The character % is followed by zero or more of the following flags:

#
The value should be converted to an “alternate form”. For o conversions, the first character of the output string is made zero (by prefixing a 0 if it was not zero already). For x and X conversions, a nonzero result has the string “0x” (or “0X” for X conversions) prepended to it. For a, A, e, E, f, F, g, and G conversions, the result will always contain a decimal point, even if no digits follow it (normally, a decimal point appears in the results of those conversions only if a digit follows). For g and G conversions, trailing zeros are not removed from the result as they would otherwise be. For m, if errno contains a valid error code, the output of strerrorname_np(errno) is printed; otherwise, the value stored in errno is printed as a decimal number. For other conversions, the result is undefined.

0
The value should be zero padded. For d, i, o, u, x, X, a, A, e, E, f, F, g, and G conversions, the converted value is padded on the left with zeros rather than blanks. If the 0 and - flags both appear, the 0 flag is ignored. If a precision is given with an integer conversion (d, i, o, u, x, and X), the 0 flag is ignored. For other conversions, the behavior is undefined.

-
The converted value is to be left adjusted on the field boundary. (The default is right justification.) The converted value is padded on the right with blanks, rather than on the left with blanks or zeros. A - overrides a 0 if both are given.

’ ‘
(a space) A blank should be left before a positive number (or empty string) produced by a signed conversion.

+
A sign (+ or -) should always be placed before a number produced by a signed conversion. By default, a sign is used only for negative numbers. A + overrides a space if both are used.

The five flag characters above are defined in the C99 standard. The Single UNIX Specification specifies one further flag character.


For decimal conversion (i, d, u, f, F, g, G) the output is to be grouped with thousands’ grouping characters if the locale information indicates any. (See setlocale(3).) Note that many versions of gcc(1) cannot parse this option and will issue a warning. (SUSv2 did not include %‘F, but SUSv3 added it.) Note also that the default locale of a C program is “C” whose locale information indicates no thousands’ grouping character. Therefore, without a prior call to setlocale(3), no thousands’ grouping characters will be printed.

glibc 2.2 adds one further flag character.

I
For decimal integer conversion (i, d, u) the output uses the locale’s alternative output digits, if any. For example, since glibc 2.2.3 this will give Arabic-Indic digits in the Persian (“fa_IR”) locale.

Field width

An optional decimal digit string (with nonzero first digit) specifying a minimum field width. If the converted value has fewer characters than the field width, it will be padded with spaces on the left (or right, if the left-adjustment flag has been given). Instead of a decimal digit string one may write “*” or “*m$” (for some decimal integer m) to specify that the field width is given in the next argument, or in the m-th argument, respectively, which must be of type int. A negative field width is taken as a ‘-’ flag followed by a positive field width. In no case does a nonexistent or small field width cause truncation of a field; if the result of a conversion is wider than the field width, the field is expanded to contain the conversion result.

Precision

An optional precision, in the form of a period (’.’) followed by an optional decimal digit string. Instead of a decimal digit string one may write “*” or “*m$” (for some decimal integer m) to specify that the precision is given in the next argument, or in the m-th argument, respectively, which must be of type int. If the precision is given as just ‘.’, the precision is taken to be zero. A negative precision is taken as if the precision were omitted. This gives the minimum number of digits to appear for d, i, o, u, x, and X conversions, the number of digits to appear after the radix character for a, A, e, E, f, and F conversions, the maximum number of significant digits for g and G conversions, or the maximum number of characters to be printed from a string for s and S conversions.

Length modifier

Here, “integer conversion” stands for d, i, o, u, x, or X conversion.

hh
A following integer conversion corresponds to a signed char or unsigned char argument, or a following n conversion corresponds to a pointer to a signed char argument.

h
A following integer conversion corresponds to a short or unsigned short argument, or a following n conversion corresponds to a pointer to a short argument.

l
(ell) A following integer conversion corresponds to a long or unsigned long argument, or a following n conversion corresponds to a pointer to a long argument, or a following c conversion corresponds to a wint_t argument, or a following s conversion corresponds to a pointer to wchar_t argument. On a following a, A, e, E, f, F, g, or G conversion, this length modifier is ignored (C99; not in SUSv2).

ll
(ell-ell). A following integer conversion corresponds to a long long or unsigned long long argument, or a following n conversion corresponds to a pointer to a long long argument.

q
A synonym for ll. This is a nonstandard extension, derived from BSD; avoid its use in new code.

L
A following a, A, e, E, f, F, g, or G conversion corresponds to a long double argument. (C99 allows %LF, but SUSv2 does not.)

j
A following integer conversion corresponds to an intmax_t or uintmax_t argument, or a following n conversion corresponds to a pointer to an intmax_t argument.

z
A following integer conversion corresponds to a size_t or ssize_t argument, or a following n conversion corresponds to a pointer to a size_t argument.

Z
A nonstandard synonym for z that predates the appearance of z. Do not use in new code.

t
A following integer conversion corresponds to a ptrdiff_t argument, or a following n conversion corresponds to a pointer to a ptrdiff_t argument.

SUSv3 specifies all of the above, except for those modifiers explicitly noted as being nonstandard extensions. SUSv2 specified only the length modifiers h (in hd, hi, ho, hx, hX, hn) and l (in ld, li, lo, lx, lX, ln, lc, ls) and L (in Le, LE, Lf, Lg, LG).

As a nonstandard extension, the GNU implementations treats ll and L as synonyms, so that one can, for example, write llg (as a synonym for the standards-compliant Lg) and Ld (as a synonym for the standards compliant lld). Such usage is nonportable.

Conversion specifiers

A character that specifies the type of conversion to be applied. The conversion specifiers and their meanings are:

d, i
The int argument is converted to signed decimal notation. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.

o, u, x, X
The unsigned int argument is converted to unsigned octal (o), unsigned decimal (u), or unsigned hexadecimal (x and X) notation. The letters abcdef are used for x conversions; the letters ABCDEF are used for X conversions. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.

e, E
The double argument is rounded and converted in the style [-]d**.ddde**±dd where there is one digit (which is nonzero if the argument is nonzero) before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero, no decimal-point character appears. An E conversion uses the letter E (rather than e) to introduce the exponent. The exponent always contains at least two digits; if the value is zero, the exponent is 00.

f, F
The double argument is rounded and converted to decimal notation in the style [-]ddd**.**ddd, where the number of digits after the decimal-point character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. If a decimal point appears, at least one digit appears before it.

(SUSv2 does not know about F and says that character string representations for infinity and NaN may be made available. SUSv3 adds a specification for F. The C99 standard specifies “[-]inf” or “[-]infinity” for infinity, and a string starting with “nan” for NaN, in the case of f conversion, and “[-]INF” or “[-]INFINITY” or “NAN” in the case of F conversion.)

g, G
The double argument is converted in style f or e (or F or E for G conversions). The precision specifies the number of significant digits. If the precision is missing, 6 digits are given; if the precision is zero, it is treated as 1. Style e is used if the exponent from its conversion is less than -4 or greater than or equal to the precision. Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit.

a, A
(C99; not in SUSv2, but added in SUSv3) For a conversion, the double argument is converted to hexadecimal notation (using the letters abcdef) in the style [-]0xh**.hhhhp**±d; for A conversion the prefix 0X, the letters ABCDEF, and the exponent separator P is used. There is one hexadecimal digit before the decimal point, and the number of digits after it is equal to the precision. The default precision suffices for an exact representation of the value if an exact representation in base 2 exists and otherwise is sufficiently large to distinguish values of type double. The digit before the decimal point is unspecified for nonnormalized numbers, and nonzero but otherwise unspecified for normalized numbers. The exponent always contains at least one digit; if the value is zero, the exponent is 0.

c
If no l modifier is present, the int argument is converted to an unsigned char, and the resulting character is written. If an l modifier is present, the wint_t (wide character) argument is converted to a multibyte sequence by a call to the wcrtomb(3) function, with a conversion state starting in the initial state, and the resulting multibyte string is written.

s
If no l modifier is present: the const char * argument is expected to be a pointer to an array of character type (pointer to a string). Characters from the array are written up to (but not including) a terminating null byte (‘�’); if a precision is specified, no more than the number specified are written. If a precision is given, no null byte need be present; if the precision is not specified, or is greater than the size of the array, the array must contain a terminating null byte.

If an l modifier is present: the const wchar_t * argument is expected to be a pointer to an array of wide characters. Wide characters from the array are converted to multibyte characters (each by a call to the wcrtomb(3) function, with a conversion state starting in the initial state before the first wide character), up to and including a terminating null wide character. The resulting multibyte characters are written up to (but not including) the terminating null byte. If a precision is specified, no more bytes than the number specified are written, but no partial multibyte characters are written. Note that the precision determines the number of bytes written, not the number of wide characters or screen positions. The array must contain a terminating null wide character, unless a precision is given and it is so small that the number of bytes written exceeds it before the end of the array is reached.

C
(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.) Synonym for lc. Don’t use.

S
(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.) Synonym for ls. Don’t use.

p
The void * pointer argument is printed in hexadecimal (as if by %#x or %#lx).

n
The number of characters written so far is stored into the integer pointed to by the corresponding argument. That argument shall be an int *, or variant whose size matches the (optionally) supplied integer length modifier. No argument is converted. (This specifier is not supported by the bionic C library.) The behavior is undefined if the conversion specification includes any flags, a field width, or a precision.

m
(glibc extension; supported by uClibc and musl.) Print output of strerror(errno) (or strerrorname_np(errno) in the alternate form). No argument is required.

%
A ‘%’ is written. No argument is converted. The complete conversion specification is ‘%%’.

RETURN VALUE

Upon successful return, these functions return the number of bytes printed (excluding the null byte used to end output to strings).

The functions snprintf() and vsnprintf() do not write more than size bytes (including the terminating null byte (‘�’)). If the output was truncated due to this limit, then the return value is the number of characters (excluding the terminating null byte) which would have been written to the final string if enough space had been available. Thus, a return value of size or more means that the output was truncated. (See also below under CAVEATS.)

If an output error is encountered, a negative value is returned.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

printf(), fprintf(), sprintf(), snprintf(), vprintf(), vfprintf(), vsprintf(), vsnprintf()

Thread safetyMT-Safe locale

STANDARDS

fprintf()
printf()
sprintf()
vprintf()
vfprintf()
vsprintf()
snprintf()
vsnprintf()
C11, POSIX.1-2008.

dprintf()
vdprintf()
GNU, POSIX.1-2008.

HISTORY

fprintf()
printf()
sprintf()
vprintf()
vfprintf()
vsprintf()
C89, POSIX.1-2001.

snprintf()
vsnprintf()
SUSv2, C99, POSIX.1-2001.

Concerning the return value of snprintf(), SUSv2 and C99 contradict each other: when snprintf() is called with size=0 then SUSv2 stipulates an unspecified return value less than 1, while C99 allows str to be NULL in this case, and gives the return value (as always) as the number of characters that would have been written in case the output string has been large enough. POSIX.1-2001 and later align their specification of snprintf() with C99.

dprintf()
vdprintf()
GNU, POSIX.1-2008.

glibc 2.1 adds length modifiers hh, j, t, and z and conversion characters a and A.

glibc 2.2 adds the conversion character F with C99 semantics, and the flag character I.

glibc 2.35 gives a meaning to the alternate form (#) of the m conversion specifier, that is %#m.

CAVEATS

Some programs imprudently rely on code such as the following

sprintf(buf, "%s some further text", buf);

to append text to buf. However, the standards explicitly note that the results are undefined if source and destination buffers overlap when calling sprintf(), snprintf(), vsprintf(), and vsnprintf(). Depending on the version of gcc(1) used, and the compiler options employed, calls such as the above will not produce the expected results.

The glibc implementation of the functions snprintf() and vsnprintf() conforms to the C99 standard, that is, behaves as described above, since glibc 2.1. Until glibc 2.0.6, they would return -1 when the output was truncated.

BUGS

Because sprintf() and vsprintf() assume an arbitrarily long string, callers must be careful not to overflow the actual space; this is often impossible to assure. Note that the length of the strings produced is locale-dependent and difficult to predict. Use snprintf() and vsnprintf() instead (or asprintf(3) and vasprintf(3)).

Code such as printf(foo); often indicates a bug, since foo may contain a % character. If foo comes from untrusted user input, it may contain %n, causing the printf() call to write to memory and creating a security hole.

EXAMPLES

To print Pi to five decimal places:

#include <math.h>
#include <stdio.h>
fprintf(stdout, "pi = %.5f

“, 4 * atan(1.0));

To print a date and time in the form “Sunday, July 3, 10:02”, where weekday and month are pointers to strings:

#include <stdio.h>
fprintf(stdout, "%s, %s %d, %.2d:%.2d

“, weekday, month, day, hour, min);

Many countries use the day-month-year order. Hence, an internationalized version must be able to print the arguments in an order specified by the format:

#include <stdio.h>
fprintf(stdout, format,
        weekday, month, day, hour, min);

where format depends on locale, and may permute the arguments. With the value:

"%1$s, %3$d. %2$s, %4$d:%5$.2d

"

one might obtain “Sonntag, 3. Juli, 10:02”.

To allocate a sufficiently large string and print into it (code correct for both glibc 2.0 and glibc 2.1):

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
char *
make_message(const char *fmt, ...)
{
    int n = 0;
    size_t size = 0;
    char *p = NULL;
    va_list ap;
    /* Determine required size. */
    va_start(ap, fmt);
    n = vsnprintf(p, size, fmt, ap);
    va_end(ap);
    if (n < 0)
        return NULL;
    size = (size_t) n + 1;      /* One extra byte for '' */
    p = malloc(size);
    if (p == NULL)
        return NULL;
    va_start(ap, fmt);
    n = vsnprintf(p, size, fmt, ap);
    va_end(ap);
    if (n < 0) {
        free(p);
        return NULL;
    }
    return p;
}

If truncation occurs in glibc versions prior to glibc 2.0.6, this is treated as an error instead of being handled gracefully.

SEE ALSO

printf(1), asprintf(3), puts(3), scanf(3), setlocale(3), strfromd(3), wcrtomb(3), wprintf(3), locale(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1296 - Linux cli command remainderl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command remainderl and provides detailed information about the command remainderl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the remainderl.

NAME 🖥️ remainderl 🖥️

floating-point remainder function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double remainder(double x, double y);
float remainderf(float x, float y);
long double remainderl(long double x, long double y);
/* Obsolete synonyms */
[[deprecated]] double drem(double x, double y);
[[deprecated]] float dremf(float x, float y);
[[deprecated]] long double dreml(long double x, long double y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

remainder():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

remainderf(), remainderl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

drem(), dremf(), dreml():

    /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions compute the remainder of dividing x by y. The return value is x-n*y, where n is the value x / y, rounded to the nearest integer. If the absolute value of x-n*y is 0.5, n is chosen to be even.

These functions are unaffected by the current rounding mode (see fenv(3)).

The drem() function does precisely the same thing.

RETURN VALUE

On success, these functions return the floating-point remainder, x-n*y. If the return value is 0, it has the sign of x.

If x or y is a NaN, a NaN is returned.

If x is an infinity, and y is not a NaN, a domain error occurs, and a NaN is returned.

If y is zero, and x is not a NaN, a domain error occurs, and a NaN is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is an infinity and y is not a NaN
errno is set to EDOM (but see BUGS). An invalid floating-point exception (FE_INVALID) is raised.

These functions do not set errno for this case.

Domain error: y is zero
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

drem(), dremf(), dreml(), remainder(), remainderf(), remainderl()

Thread safetyMT-Safe

STANDARDS

remainder()
remainderf()
remainderl()
C11, POSIX.1-2008.

drem()
dremf()
dreml()
None.

HISTORY

remainder()
remainderf()
remainderl()
C99, POSIX.1-2001.

drem()
4.3BSD.

dremf()
dreml()
Tru64, glibc2.

BUGS

Before glibc 2.15, the call

remainder(nan(""), 0);

returned a NaN, as expected, but wrongly caused a domain error. Since glibc 2.15, a silent NaN (i.e., no domain error) is returned.

Before glibc 2.15, errno was not set to EDOM for the domain error that occurs when x is an infinity and y is not a NaN.

EXAMPLES

The call “remainder(29.0, 3.0)” returns -1.

SEE ALSO

div(3), fmod(3), remquo(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1297 - Linux cli command XtAppWarningMsg

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppWarningMsg and provides detailed information about the command XtAppWarningMsg, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppWarningMsg.

NAME 🖥️ XtAppWarningMsg 🖥️

high-level error handlers

SYNTAX

#include <X11/Intrinsic.h>

void XtAppErrorMsg(XtAppContext app_context, const char *name, const char *type, const char *class, const char *defaultMsg, String *params, Cardinal *num_params);

XtErrorMsgHandler XtAppSetErrorMsgHandler(XtAppContext app_context, XtErrorMsgHandler msg_handler);

XtErrorMsgHandler XtAppSetWarningMsgHandler(XtAppContext app_context, XtErrorMsgHandler msg_handler);

void XtAppWarningMsg(XtAppContext app_context, const char *name, const char *type, const char *class, const char *defaultMsg, String *params, Cardinal *num_params);

ARGUMENTS

app_context
Specifies the application context.

class
Specifies the resource class of the error message.

defaultMsg
Specifies the default message to use.

name
Specifies the general kind of error.

type
Specifies the detailed name of the error.

msg_handler
Specifies the new fatal error procedure, which should not return or the nonfatal error procedure, which usually returns.

num_params
Specifies the number of values in the parameter list.

params
Specifies a pointer to a list of values to be stored in the message.

DESCRIPTION

The XtAppErrorMsg function calls the high-level error handler and passes the specified information.

The XtAppSetErrorMsgHandler function registers the specified procedure, which is called when a fatal error occurs.

The XtAppSetWarningMsgHandler function registers the specified procedure, which is called when a nonfatal error condition occurs.

The XtAppWarningMsg function calls the high-level error handler and passes the specified information.

SEE ALSO

XtAppGetErrorDatabase(3), XtAppError(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1298 - Linux cli command mq_timedreceive

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mq_timedreceive and provides detailed information about the command mq_timedreceive, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mq_timedreceive.

NAME 🖥️ mq_timedreceive 🖥️

receive a message from a message queue

LIBRARY

Real-time library (librt, -lrt)

SYNOPSIS

#include <mqueue.h>
ssize_t mq_receive(mqd_t mqdes, char msg_ptr[.msg_len],
 size_t msg_len, unsigned int *msg_prio);
#include <time.h>
#include <mqueue.h>
ssize_t mq_timedreceive(mqd_t mqdes, char *restrict msg_ptr[.msg_len],
 size_t msg_len, unsigned int *restrict msg_prio,
 const struct timespec *restrict abs_timeout);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

mq_timedreceive():

    _POSIX_C_SOURCE >= 200112L

DESCRIPTION

mq_receive() removes the oldest message with the highest priority from the message queue referred to by the message queue descriptor mqdes, and places it in the buffer pointed to by msg_ptr. The msg_len argument specifies the size of the buffer pointed to by msg_ptr; this must be greater than or equal to the mq_msgsize attribute of the queue (see mq_getattr(3)). If msg_prio is not NULL, then the buffer to which it points is used to return the priority associated with the received message.

If the queue is empty, then, by default, mq_receive() blocks until a message becomes available, or the call is interrupted by a signal handler. If the O_NONBLOCK flag is enabled for the message queue description, then the call instead fails immediately with the error EAGAIN.

mq_timedreceive() behaves just like mq_receive(), except that if the queue is empty and the O_NONBLOCK flag is not enabled for the message queue description, then abs_timeout points to a structure which specifies how long the call will block. This value is an absolute timeout in seconds and nanoseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC), specified in a timespec(3) structure.

If no message is available, and the timeout has already expired by the time of the call, mq_timedreceive() returns immediately.

RETURN VALUE

On success, mq_receive() and mq_timedreceive() return the number of bytes in the received message; on error, -1 is returned, with errno set to indicate the error.

ERRORS

EAGAIN
The queue was empty, and the O_NONBLOCK flag was set for the message queue description referred to by mqdes.

EBADF
The descriptor specified in mqdes was invalid or not opened for reading.

EINTR
The call was interrupted by a signal handler; see signal(7).

EINVAL
The call would have blocked, and abs_timeout was invalid, either because tv_sec was less than zero, or because tv_nsec was less than zero or greater than 1000 million.

EMSGSIZE
msg_len was less than the mq_msgsize attribute of the message queue.

ETIMEDOUT
The call timed out before a message could be transferred.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mq_receive(), mq_timedreceive()

Thread safetyMT-Safe

VERSIONS

On Linux, mq_timedreceive() is a system call, and mq_receive() is a library function layered on top of that system call.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

SEE ALSO

mq_close(3), mq_getattr(3), mq_notify(3), mq_open(3), mq_send(3), mq_unlink(3), timespec(3), mq_overview(7), time(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1299 - Linux cli command Moose_Meta_Attributepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Attributepm and provides detailed information about the command Moose_Meta_Attributepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Attributepm.

NAME 🖥️ Moose_Meta_Attributepm 🖥️

The Moose attribute metaclass

VERSION

version 2.2207

DESCRIPTION

This class is a subclass of Class::MOP::Attribute that provides additional Moose-specific functionality.

To really understand this class, you will need to start with the Class::MOP::Attribute documentation. This class can be understood as a set of additional features on top of the basic feature provided by that parent class.

INHERITANCE

Moose::Meta::Attribute is a subclass of Class::MOP::Attribute.

METHODS

Many of the documented below override methods in Class::MOP::Attribute and add Moose specific features.

Creation

Moose::Meta::Attribute->new($name, %options)
This method overrides the Class::MOP::Attribute constructor. Many of the options below are described in more detail in the Moose::Manual::Attributes document. It adds the following options to the constructor:

  • is => ‘ro’, ‘rw’, ‘bare’ This provides a shorthand for specifying the reader, writer, or accessor names. If the attribute is read-only (‘ro’) then it will have a reader method with the same attribute as the name. If it is read-write (‘rw’) then it will have an accessor method with the same name. If you provide an explicit writer for a read-write attribute, then you will have a reader with the same name as the attribute, and a writer with the name you provided. Use ‘bare’ when you are deliberately not installing any methods (accessor, reader, etc.) associated with this attribute; otherwise, Moose will issue a warning when this attribute is added to a metaclass.

  • isa => $type This option accepts a type. The type can be a string, which should be a type name. If the type name is unknown, it is assumed to be a class name. This option can also accept a Moose::Meta::TypeConstraint object. If you also provide a does option, then your isa option must be a class name, and that class must do the role specified with does.

  • does => $role This is short-hand for saying that the attribute’s type must be an object which does the named role.

  • coerce => $bool This option is only valid for objects with a type constraint (isa) that defined a coercion. If this is true, then coercions will be applied whenever this attribute is set. You cannot make both this and the weak_ref option true.

  • trigger => $sub This option accepts a subroutine reference, which will be called after the attribute is set.

  • required => $bool An attribute which is required must be provided to the constructor. An attribute which is required can also have a default or builder, which will satisfy its required-ness. A required attribute must have a default, builder or a non-undef init_arg

  • lazy => $bool A lazy attribute must have a default or builder. When an attribute is lazy, the default value will not be calculated until the attribute is read.

  • weak_ref => $bool If this is true, the attribute’s value will be stored as a weak reference.

  • documentation An arbitrary string that can be retrieved later by calling $attr->documentation.

  • auto_deref => $bool Note that in cases where you want this feature you are often better served by using a Moose::Meta::Attribute::Native trait instead. If this is true, then the reader will dereference the value when it is called. The attribute must have a type constraint which defines the attribute as an array or hash reference.

  • lazy_build => $bool Note that use of this feature is strongly discouraged. Some documentation used to encourage use of this feature as a best practice, but we have changed our minds. Setting this to true makes the attribute lazy and provides a number of default methods. has size => ( is => ro, lazy_build => 1, ); is equivalent to this: has size => ( is => ro, lazy => 1, builder => _build_size, clearer => clear_size, predicate => has_size, ); If your attribute name starts with an underscore (_), then the clearer and predicate will as well: has _size => ( is => ro, lazy_build => 1, ); becomes: has _size => ( is => ro, lazy => 1, builder => _build_ _size, clearer => _clear_size, predicate => _has_size, ); Note the doubled underscore in the builder name. Internally, Moose simply prepends the attribute name with “_build_” to come up with the builder name.

  • role_attribute => $role_attribute If provided, this should be a Moose::Meta::Role::Attribute object.

$attr->clone(%options)
This creates a new attribute based on attribute being cloned. You must supply a name option to provide a new name for the attribute. The %options can only specify options handled by Class::MOP::Attribute.

Value management

$attr->initialize_instance_slot($meta_instance, $instance, $params)
This method is used internally to initialize the attribute’s slot in the object $instance. This overrides the Class::MOP::Attribute method to handle lazy attributes, weak references, and type constraints.

get_value

set_value

eval { $point->meta->get_attribute(x)->set_value($point, forty-two) }; if($@) { print “Oops: $@ “; } Attribute (x) does not pass the type constraint (Int) with ‘forty-two’ Before setting the value, a check is made on the type constraint of the attribute, if it has one, to see if the value passes it. If the value fails to pass, the set operation dies. Any coercion to convert values is done before checking the type constraint. To check a value against a type constraint before setting it, fetch the attribute instance using “find_attribute_by_name” in Class::MOP::Class, fetch the type_constraint from the attribute using “type_constraint” in Moose::Meta::Attribute and call “check” in Moose::Meta::TypeConstraint. See Moose::Cookbook::Basics::Company_Subtypes for an example.

Attribute Accessor generation

$attr->install_accessors
This method overrides the parent to also install delegation methods. If, after installing all methods, the attribute object has no associated methods, it throws an error unless is => bare was passed to the attribute constructor. (Trying to add an attribute that has no associated methods is almost always an error.)

$attr->remove_accessors
This method overrides the parent to also remove delegation methods.

$attr->inline_set($instance_var, $value_var)
This method return a code snippet suitable for inlining the relevant operation. It expect strings containing variable names to be used in the inlining, like $self or $_[1].

$attr->install_delegation
This method adds its delegation methods to the attribute’s associated class, if it has any to add.

$attr->remove_delegation
This method remove its delegation methods from the attribute’s associated class.

$attr->accessor_metaclass
Returns the accessor metaclass name, which defaults to Moose::Meta::Method::Accessor.

$attr->delegation_metaclass
Returns the delegation metaclass name, which defaults to Moose::Meta::Method::Delegation.

Additional Moose features

These methods are not found in the superclass. They support features provided by Moose.

$attr->does($role)
This indicates whether the attribute itself does the given role. The role can be given as a full class name, or as a resolvable trait name. Note that this checks the attribute itself, not its type constraint, so it is checking the attribute’s metaclass and any traits applied to the attribute.

Moose::Meta::Class->interpolate_class_and_new($name, %options)
This is an alternate constructor that handles the metaclass and traits options. Effectively, this method is a factory that finds or creates the appropriate class for the given metaclass and/or traits. Once it has the appropriate class, it will call $class->new($name, %options) on that class.

$attr->clone_and_inherit_options(%options)
This method supports the has +foo feature. It does various bits of processing on the supplied %options before ultimately calling the clone method. One of its main tasks is to make sure that the %options provided does not include the options returned by the illegal_options_for_inheritance method.

$attr->illegal_options_for_inheritance
This returns a blacklist of options that can not be overridden in a subclass’s attribute definition. This exists to allow a custom metaclass to change or add to the list of options which can not be changed.

$attr->type_constraint
Returns the Moose::Meta::TypeConstraint object for this attribute, if it has one.

$attr->has_type_constraint
Returns true if this attribute has a type constraint.

$attr->verify_against_type_constraint($value)
Given a value, this method returns true if the value is valid for the attribute’s type constraint. If the value is not valid, it throws an error.

$attr->handles
This returns the value of the handles option passed to the constructor.

$attr->has_handles
Returns true if this attribute performs delegation.

$attr->is_weak_ref
Returns true if this attribute stores its value as a weak reference.

$attr->is_required
Returns true if this attribute is required to have a value.

$attr->is_lazy
Returns true if this attribute is lazy.

$attr->is_lazy_build
Returns true if the lazy_build option was true when passed to the constructor.

$attr->should_coerce
Returns true if the coerce option passed to the constructor was true.

$attr->should_auto_deref
Returns true if the auto_deref option passed to the constructor was true.

$attr->trigger
This is the subroutine reference that was in the trigger option passed to the constructor, if any.

$attr->has_trigger
Returns true if this attribute has a trigger set.

$attr->documentation
Returns the value that was in the documentation option passed to the constructor, if any.

$attr->has_documentation
Returns true if this attribute has any documentation.

$attr->role_attribute
Returns the Moose::Meta::Role::Attribute object from which this attribute was created, if any. This may return undef.

$attr->has_role_attribute
Returns true if this attribute has an associated role attribute.

$attr->applied_traits
This returns an array reference of all the traits which were applied to this attribute. If none were applied, this returns undef.

$attr->has_applied_traits
Returns true if this attribute has any traits applied.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1300 - Linux cli command Tk_Panedwindowpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Panedwindowpm and provides detailed information about the command Tk_Panedwindowpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Panedwindowpm.

NAME 🖥️ Tk_Panedwindowpm 🖥️

Create and manipulate Panedwindow widgets

SYNOPSIS

$panedwindow = $parent->Panedwindow(?options?);

-background -height -width -borderwidth -orient -cursor -relief

WIDGET-SPECIFIC OPTIONS

Option: -handlepad

Name: handlePad

Class: HandlePad

When sash handles are drawn, specifies the distance from the top or left end of the sash (depending on the orientation of the widget) at which to draw the handle. May be any value accepted by Tk_GetPixels.

Option: -handlesize

Name: handleSize

Class: HandleSize

Specifies the side length of a sash handle. Handles are always drawn as squares. May be any value accepted by Tk_GetPixels.

Option: -opaqueresize

Name: opaqueResize

Class: OpaqueResize

Specifies whether panes should be resized as a sash is moved (true), or if resizing should be deferred until the sash is placed (false).

Option: -sashcursor

Name: sashCursor

Class: SashCursor

Mouse cursor to use when over a sash. If null, sb_h_double_arrow will be used for horizontal Panedwindows, and sb_v_double_arrow will be used for vertical Panedwindows.

Option: -sashpad

Name: sashPad

Class: SashPad

Specifies the amount of padding to leave of each side of a sash. May be any value accepted by Tk_GetPixels.

Option: -sashrelief

Name: sashRelief

Class: SashRelief

Relief to use when drawing a sash. May be any of the standard Tk relief values.

Option: -sashwidth

Name: sashWidth

Class: SashWidth

Specifies the width of each sash. May be any value accepted by Tk_GetPixels.

Option: -showhandle

Name: showHandle

Class: ShowHandle

Specifies whether sash handles should be shown. May be any valid boolean value.

DESCRIPTION

The Panedwindow method creates a new window (given by the $panedwindow argument) and makes it into a Panedwindow widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the Panedwindow such as its default background color and relief.

A Panedwindow widget contains any number of panes, arranged horizontally or vertically, according to the value of the -orient option. Each pane contains one widget, and each pair of panes is separated by a moveable (via mouse movements) sash. Moving a sash causes the widgets on either side of the sash to be resized.

WIDGET METHODS

The Panedwindow method may be used to invoke various operations on the widget. It has the following general form:

$widget->method(?arg arg …?);

The following commands are possible for Panedwindow widgets:

$widget->add(?window …? ?option value …?);
Add one or more windows to the Panedwindow, each in a separate pane. The arguments consist of the names of one or more windows followed by pairs of arguments that specify how to manage the windows. Option may have any of the values accepted by the configure subcommand.

$widget->cget(option);
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the Panedwindow command.

$widget->configure(?option?, ?value, option, value, …?);
Query or modify the configuration options of the widget. If no option is specified, returns a list describing all of the available options for $widget (see Tk::configure for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the Panedwindow command.

$widget->forget(?window …?);
Remove the pane containing $widget from the Panedwindow. All geometry management options for $widget will be forgotten.

$widget->identify(x, y);
Identify the Panedwindow component underneath the point given by x and y, in window coordinates. If the point is over a sash or a sash handle, the result is a two element list containing the index of the sash or handle, and a word indicating whether it is over a sash or a handle, such as [0, ‘sash’] or [2, ‘handle’]. If the point is over any other part of the Panedwindow, the result is an empty list.

$widget->proxy(?args?);
This command is used to query and change the position of the sash proxy, used for rubberband-style pane resizing. It can take any of the following forms:

$widget->proxyCoord;
Return a list containing the x and y coordinates of the most recent proxy location.

$widget->proxyForget;
Remove the proxy from the display.

$widget->proxyPlace(x, y);
Place the proxy at the given x and y coordinates.

$widget->sash(?args?);
This command is used to query and change the position of sashes in the Panedwindow. It can take any of the following forms:

$widget->sashCoord(index);
Return the current x and y coordinate pair for the sash given by index. Index must be an integer between 0 and 1 less than the number of panes in the Panedwindow. The coordinates given are those of the top left corner of the region containing the sash. $widget->sashDragto(index, x, y) This command computes the difference between the given coordinates and the coordinates given to the last sash coord command for the given sash. It then moves that sash the computed difference. The return value is the empty string.

$widget->sashMark(index, x, y);
Records x and y for the sash given by index; used in conjunction with later dragto commands to move the sash.

$widget->sashPlace(index, x, y);
Place the sash given by index at the given coordinates.

$widget $widget->panecget(option);
Query a management option for $widget. Option may be any value allowed by the paneconfigure subcommand.

$widget $widget->paneconfigure(?option? ?value option value …?);
Query or modify the management options for $widget. If no option is specified, returns a list describing all of the available options for $widget (see Tk::configure for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. The following options are supported:

-after => $widget
Insert the window after the window specified. $widget should be the name of a window already managed by $widget.

-before => $widget
Insert the window before the window specified. $widget should be the name of a window already managed by $widget.

-height => size
Specify a height for the window. The height will be the outer dimension of the window including its border, if any. If size is an empty string, or if -height is not specified, then the height requested internally by the window will be used initially; the height may later be adjusted by the movement of sashes in the Panedwindow. Size may be any value accepted by Tk_GetPixels.

-minsize => n
Specifies that the size of the window cannot be made less than n. This constraint only affects the size of the widget in the paned dimension – the x dimension for horizontal Panedwindows, the y dimension for vertical Panedwindows. May be any value accepted by Tk_GetPixels.

-padx => n
Specifies a non-negative value indicating how much extra space to leave on each side of the window in the X-direction. The value may have any of the forms accepted by Tk_GetPixels.

-pady => n
Specifies a non-negative value indicating how much extra space to leave on each side of the window in the Y-direction. The value may have any of the forms accepted by Tk_GetPixels.

-sticky => style
If a window’s pane is larger than the requested dimensions of the window, this option may be used to position (or stretch) the window within its pane. Style is a string that contains zero or more of the characters n, s, e or w. The string can optionally contains spaces or commas, but they are ignored. Each letter refers to a side (north, south, east, or west) that the window will “stick” to. If both n and s (or e and w) are specified, the window will be stretched to fill the entire height (or width) of its cavity.

-width => size
Specify a width for the window. The width will be the outer dimension of the window including its border, if any. If size is an empty string, or if -width is not specified, then the width requested internally by the window will be used initially; the width may later be adjusted by the movement of sashes in the Panedwindow. Size may be any value accepted by Tk_GetPixels.

$widget->panes;
Returns an ordered list of the widgets managed by $widget.

RESIZING PANES

A pane is resized by grabbing the sash (or sash handle if present) and dragging with the mouse. This is accomplished via mouse motion bindings on the widget. When a sash is moved, the sizes of the panes on each side of the sash, and thus the widgets in those panes, are adjusted.

When a pane is resized from outside (eg, it is packed to expand and fill, and the containing toplevel is resized), space is added to the final (rightmost or bottommost) pane in the window.

KEYWORDS

Panedwindow, widget, geometry management

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1301 - Linux cli command XtIsApplicationShell

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtIsApplicationShell and provides detailed information about the command XtIsApplicationShell, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtIsApplicationShell.

NAME 🖥️ XtIsApplicationShell 🖥️

obtain and verify a widget’s class

SYNTAX

#include <X11/Intrinsic.h>

WidgetClass XtClass(Widget w);

WidgetClass XtSuperclass(Widget w);

Boolean XtIsSubclass(Widget w, WidgetClass widget_class);

void XtCheckSubclass(Widget widget, WidgetClass widget_class, String message);

Boolean XtIsObject(Widget w);

Boolean XtIsRectObj(Widget w);

Boolean XtIsWidget(Widget w);

Boolean XtIsComposite(Widget w);

Boolean XtIsConstraint(Widget w);

Boolean XtIsShell(Widget w);

Boolean XtIsOverrideShell(Widget w);

Boolean XtIsWMShell(Widget w);

Boolean XtIsVendorShell(Widget w);

Boolean XtIsTransientShell(Widget w);

Boolean XtIsTopLevelShell(Widget w);

Boolean XtIsApplicationShell(Widget w);

Boolean XtIsSessionShell(Widget w);

ARGUMENTS

  1. Specifies the widget.

widget_class
Specifies the widget class.

message
Specifies the message that is to be used.

DESCRIPTION

The XtClass function returns a pointer to the widget’s class structure.

The XtSuperclass function returns a pointer to the widget’s superclass class structure.

The XtIsSubclass function returns True if the class of the specified widget is equal to or is a subclass of the specified class. The widget’s class can be any number of subclasses down the chain and need not be an immediate subclass of the specified class. Composite widgets that need to restrict the class of the items they contain can use XtIsSubclass to find out if a widget belongs to the desired class of objects.

The XtCheckSubclass macro determines if the class of the specified widget is equal to or is a subclass of the specified widget class. The widget can be any number of subclasses down the chain and need not be an immediate subclass of the specified widget class. If the specified widget is not a subclass, XtCheckSubclass constructs an error message from the supplied message, the widget’s actual class, and the expected class and calls XtErrorMsg. XtCheckSubclass should be used at the entry point of exported routines to ensure that the client has passed in a valid widget class for the exported operation.

XtCheckSubclass is only executed when the widget has been compiled with the compiler symbol DEBUG defined; otherwise, it is defined as the empty string and generates no code.

To test if a given widget belongs to a subclass of an Intrinsics-defined class, the Intrinsics defines macros or functions equivalent to XtIsSubclass for each of the built-in classes. These procedures are XtIsObject, XtIsRectObj, XtIsWidget, XtIsComposite, XtIsConstraint, XtIsShell, XtIsOverrideShell, XtIsWMShell, XtIsVendorShell, XtIsTransientShell, XtIsTopLevelShell, XtIsApplicationShell, and XtIsSessionShell.

The

SEE ALSO

XtAppErrorMsg(3), XtDisplay(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1302 - Linux cli command memchr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command memchr and provides detailed information about the command memchr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the memchr.

NAME 🖥️ memchr 🖥️

scan memory for a character

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
void *memchr(const void s[.n], int c, size_t n);
void *memrchr(const void s[.n], int c, size_t n);
[[deprecated]] void *rawmemchr(const void *s, int c);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

memrchr(), rawmemchr():

    _GNU_SOURCE

DESCRIPTION

The memchr() function scans the initial n bytes of the memory area pointed to by s for the first instance of c. Both c and the bytes of the memory area pointed to by s are interpreted as unsigned char.

The memrchr() function is like the memchr() function, except that it searches backward from the end of the n bytes pointed to by s instead of forward from the beginning.

The rawmemchr() function is similar to memchr(), but it assumes (i.e., the programmer knows for certain) that an instance of c lies somewhere in the memory area starting at the location pointed to by s. If an instance of c is not found, the behavior is undefined. Use either strlen(3) or memchr(3) instead.

RETURN VALUE

The memchr() and memrchr() functions return a pointer to the matching byte or NULL if the character does not occur in the given memory area.

The rawmemchr() function returns a pointer to the matching byte.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

memchr(), memrchr(), rawmemchr()

Thread safetyMT-Safe

STANDARDS

memchr()
C11, POSIX.1-2008.

memrchr()
rawmemchr()
GNU.

HISTORY

memchr()
POSIX.1-2001, C89, SVr4, 4.3BSD.

memrchr()
glibc 2.2.

rawmemchr()
glibc 2.1.

SEE ALSO

bstring(3), ffs(3), memmem(3), strchr(3), strpbrk(3), strrchr(3), strsep(3), strspn(3), strstr(3), wmemchr(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1303 - Linux cli command XtProcessLock

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtProcessLock and provides detailed information about the command XtProcessLock, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtProcessLock.

NAME 🖥️ XtProcessLock 🖥️

lock and unlock process

SYNTAX

#include <X11/Intrinsic.h>

void XtProcessLock(void);

void XtProcessUnlock(void);

DESCRIPTION

XtProcessLock is used to lock all process global data.

XtProcessUnlock unlocks the process.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1304 - Linux cli command Moose_Cookbook_Meta_GlobRef_InstanceMetaclasspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Meta_GlobRef_InstanceMetaclasspm and provides detailed information about the command Moose_Cookbook_Meta_GlobRef_InstanceMetaclasspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Meta_GlobRef_InstanceMetaclasspm.

NAME 🖥️ Moose_Cookbook_Meta_GlobRef_InstanceMetaclasspm 🖥️

Creating a glob reference meta-instance class

VERSION

version 2.2207

SYNOPSIS

package My::Meta::Instance; use Scalar::Util qw( weaken ); use Symbol qw( gensym ); use Moose::Role; sub create_instance { my $self = shift; my $sym = gensym(); bless $sym, $self->_class_name; } sub clone_instance { my ( $self, $instance ) = @_; my $new_sym = gensym(); %{*$new_sym} = %{*$instance}; bless $new_sym, $self->_class_name; } sub get_slot_value { my ( $self, $instance, $slot_name ) = @_; return *$instance->{$slot_name}; } sub set_slot_value { my ( $self, $instance, $slot_name, $value ) = @_; *$instance->{$slot_name} = $value; } sub deinitialize_slot { my ( $self, $instance, $slot_name ) = @_; delete *$instance->{$slot_name}; } sub is_slot_initialized { my ( $self, $instance, $slot_name ) = @_; exists *$instance->{$slot_name}; } sub weaken_slot_value { my ( $self, $instance, $slot_name ) = @_; weaken *$instance->{$slot_name}; } sub inline_create_instance { my ( $self, $class_variable ) = @_; return do { my $sym = Symbol::gensym(); bless $sym, . $class_variable . }; } sub inline_slot_access { my ( $self, $instance, $slot_name ) = @_; return *{ . $instance . }->{ . $slot_name . }; } package MyApp::User; use Moose; Moose::Util::MetaRole::apply_metaroles( for => _ _PACKAGE_ _, class_metaroles => { instance => [My::Meta::Instance], }, ); has name => ( is => rw, isa => Str, ); has email => ( is => rw, isa => Str, );

DESCRIPTION

This recipe shows how to build your own meta-instance. The meta instance is the metaclass that creates object instances and helps manages access to attribute slots.

In this example, we’re creating a meta-instance that is based on a glob reference rather than a hash reference. This example is largely based on the Piotr Roszatycki’s MooseX::GlobRef module.

Our extension is a role which will be applied to Moose::Meta::Instance, which creates hash reference based objects. We need to override all the methods which make assumptions about the object’s data structure.

The first method we override is create_instance:

sub create_instance { my $self = shift; my $sym = gensym(); bless $sym, $self->_class_name; }

This returns an glob reference which has been blessed into our meta-instance’s associated class.

We also override clone_instance to create a new array reference:

sub clone_instance { my ( $self, $instance ) = @_; my $new_sym = gensym(); %{*$new_sym} = %{*$instance}; bless $new_sym, $self->_class_name; }

After that, we have a series of methods which mediate access to the object’s slots (attributes are stored in “slots”). In the default instance class, these expect the object to be a hash reference, but we need to change this to expect a glob reference instead.

sub get_slot_value { my ( $self, $instance, $slot_name ) = @_; *$instance->{$slot_name}; }

This level of indirection probably makes our instance class slower than the default. However, when attribute access is inlined, this lookup will be cached:

sub inline_slot_access { my ( $self, $instance, $slot_name ) = @_; return *{ . $instance . }->{ . $slot_name . }; }

The code snippet that the inline_slot_access method returns will get eval’d once per attribute.

Finally, we use this meta-instance in our MyApp::User class:

Moose::Util::MetaRole::apply_metaroles( for => _ _PACKAGE_ _, class_metaroles => { instance => [My::Meta::Instance], }, );

We actually don’t recommend the use of Moose::Util::MetaRole directly in your class in most cases. Typically, this would be provided by a Moose::Exporter-based module which handles applying the role for you.

CONCLUSION

This recipe shows how to create your own meta-instance class. It’s unlikely that you’ll need to do this yourself, but it’s interesting to take a peek at how Moose works under the hood.

SEE ALSO

There are a few meta-instance class extensions on CPAN:

  • MooseX::Singleton This module extends the instance class in order to ensure that the object is a singleton. The instance it uses is still a blessed hash reference.

  • MooseX::GlobRef This module makes the instance a blessed glob reference. This lets you use a handle as an object instance.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1305 - Linux cli command SLIST_ENTRY

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SLIST_ENTRY and provides detailed information about the command SLIST_ENTRY, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SLIST_ENTRY.

NAME 🖥️ SLIST_ENTRY 🖥️

implementation of a singly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
SLIST_ENTRY(TYPE);
SLIST_HEAD(HEADNAME, TYPE);
SLIST_HEAD SLIST_HEAD_INITIALIZER(SLIST_HEAD head);
void SLIST_INIT(SLIST_HEAD *head);
int SLIST_EMPTY(SLIST_HEAD *head);
void SLIST_INSERT_HEAD(SLIST_HEAD *head,
 struct TYPE *elm, SLIST_ENTRY NAME);
void SLIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, SLIST_ENTRY NAME);
struct TYPE *SLIST_FIRST(SLIST_HEAD *head);
struct TYPE *SLIST_NEXT(struct TYPE *elm, SLIST_ENTRY NAME);
SLIST_FOREACH(struct TYPE *var, SLIST_HEAD *head, SLIST_ENTRY NAME);
void SLIST_REMOVE(SLIST_HEAD *head, struct TYPE *elm,
 SLIST_ENTRY NAME);
void SLIST_REMOVE_HEAD(SLIST_HEAD *head,
 SLIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on singly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type SLIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro SLIST_HEAD().

Creation

A singly linked list is headed by a structure defined by the SLIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the list after an existing element or at the head of the list. An SLIST_HEAD structure is declared as follows:

SLIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

SLIST_ENTRY() declares a structure that connects the elements in the list.

SLIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

SLIST_INIT() initializes the list referenced by head.

SLIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

SLIST_INSERT_HEAD() inserts the new element elm at the head of the list.

SLIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

SLIST_FIRST() returns the first element in the list, or NULL if the list is empty.

SLIST_NEXT() returns the next element in the list.

SLIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

SLIST_REMOVE() removes the element elm from the list.

SLIST_REMOVE_HEAD() removes the element elm from the head of the list. For optimum efficiency, elements being removed from the head of the list should explicitly use this macro instead of the generic SLIST_REMOVE().

RETURN VALUE

SLIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

SLIST_FIRST(), and SLIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

SLIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

SLIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. SLIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    SLIST_ENTRY(entry) entries;             /* Singly linked list */
};
SLIST_HEAD(slisthead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct slisthead head;                  /* Singly linked list
                                               head */
    SLIST_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    SLIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    SLIST_INSERT_AFTER(n1, n2, entries);
    SLIST_REMOVE(&head, n2, entry, entries);/* Deletion */
    free(n2);
    n3 = SLIST_FIRST(&head);
    SLIST_REMOVE_HEAD(&head, entries);      /* Deletion from the head */
    free(n3);
    for (unsigned int i = 0; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        SLIST_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    SLIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); while (!SLIST_EMPTY(&head)) { /* List deletion */ n1 = SLIST_FIRST(&head); SLIST_REMOVE_HEAD(&head, entries); free(n1); } SLIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1306 - Linux cli command XtCreateSelectionRequest

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtCreateSelectionRequest and provides detailed information about the command XtCreateSelectionRequest, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtCreateSelectionRequest.

NAME 🖥️ XtCreateSelectionRequest 🖥️

bundle multiple selection conversion requests into a single request using MULTIPLE target

SYNTAX

#include <X11/Intrinsic.h>

void XtCreateSelectionRequest(Widget requestor, Atom selection);

void XtSendSelectionRequest(Widget requestor, Atom selection, Time time);

void XtCancelSelectionRequest(Widget requestor, Atom selection);

ARGUMENTS

requestor
Specifies the widget making the request. Must be of class Core or a subclass thereof.

selection
Specifies the particular selection desired.

time
Specifies the timestamp to be used in making the request.

DESCRIPTION

When XtCreateSelectionRequest is called, subsequent calls to XtGetSelectionValue and XtGetSelectionValueIncremental with the requestor and selection as specified to XtCreateSelectionRequest will be bundled into a single selection conversion request with multiple targets. The request is actually initiated by calling XtSendSelectionRequest.

When XtSendSelectionRequest is called with a value of requestor and selection matching a previous call to XtCreateSelectionRequest, a selection conversion request is actually sent to the selection owner. If a single target request is queued, that request is made. If multiple targets are queued they are bundled into a single request with the target MULTIPLE using the specified timestamp. As the conversions are made, the callbacks associated with each XtGetSelectionValue and XtGetSelectionValueIncremental are invoked in turn.

Multi-threaded applications should lock the application context before calling XtCreateSelectionRequest and release the lock after calling XtSendSelectionRequest to ensure that the thread assembling the request is safe from interference by another thread assembling a different request naming the same widget and selection.

When XtCancelSelectionRequest is called, any requests queued since the last call to XtCreateSelectionRequest are cleaned up. Subsequent calls to XtGetSelectionValue, XtGetSelectionValues, XtGetSelectionValueIncremental, and XtGetSelectionValuesIncremental will not be deferred.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1307 - Linux cli command h_errno

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command h_errno and provides detailed information about the command h_errno, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the h_errno.

NAME 🖥️ h_errno 🖥️

get network host entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
void sethostent(int stayopen);
void endhostent(void);
[[deprecated]] extern int h_errno;
[[deprecated]] struct hostent *gethostbyname(const char *name);
[[deprecated]] struct hostent *gethostbyaddr(const void addr[.len],
 socklen_t len, int type);
[[deprecated]] void herror(const char *s);
[[deprecated]] const char *hstrerror(int err);
/* System V/POSIX extension */
struct hostent *gethostent(void);
/* GNU extensions */
[[deprecated]]
struct hostent *gethostbyname2(const char *name, int af);
int gethostent_r(struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyaddr_r(const void addr[restrict .len], socklen_t len,
 int type,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyname_r(const char *restrict name,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyname2_r(const char *restrict name, int af,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

gethostbyname2(), gethostent_r(), gethostbyaddr_r(), gethostbyname_r(), gethostbyname2_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc up to and including 2.19:
        _BSD_SOURCE || _SVID_SOURCE

herror(), hstrerror():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.8 to glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE
    Before glibc 2.8:
        none

h_errno:

    Since glibc 2.19
        _DEFAULT_SOURCE || _POSIX_C_SOURCE < 200809L
    glibc 2.12 to glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE || _POSIX_C_SOURCE < 200809L
    Before glibc 2.12:
        none

DESCRIPTION

The gethostbyname*(), gethostbyaddr*(), herror(), and hstrerror() functions are obsolete. Applications should use getaddrinfo(3), getnameinfo(3), and gai_strerror(3) instead.

The sethostent() function specifies, if stayopen is true (1), that a connected TCP socket should be used for the name server queries and that the connection should remain open during successive queries. Otherwise, name server queries will use UDP datagrams.

The endhostent() function ends the use of a TCP connection for name server queries.

The gethostbyname() function returns a structure of type hostent for the given host name. Here name is either a hostname or an IPv4 address in standard dot notation (as for inet_addr(3)). If name is an IPv4 address, no lookup is performed and gethostbyname() simply copies name into the h_name field and its struct in_addr equivalent into the h_addr_list[0] field of the returned hostent structure. If name doesn’t end in a dot and the environment variable HOSTALIASES is set, the alias file pointed to by HOSTALIASES will first be searched for name (see hostname(7) for the file format). The current domain and its parents are searched unless name ends in a dot.

The gethostbyaddr() function returns a structure of type hostent for the given host address addr of length len and address type type. Valid address types are AF_INET and AF_INET6 (defined in <sys/socket.h>). The host address argument is a pointer to a struct of a type depending on the address type, for example a struct in_addr * (probably obtained via a call to inet_addr(3)) for address type AF_INET.

The (obsolete) herror() function prints the error message associated with the current value of h_errno on stderr.

The (obsolete) hstrerror() function takes an error number (typically h_errno) and returns the corresponding message string.

The domain name queries carried out by gethostbyname() and gethostbyaddr() rely on the Name Service Switch (nsswitch.conf(5)) configured sources or a local name server (named(8)). The default action is to query the Name Service Switch (nsswitch.conf(5)) configured sources, failing that, a local name server (named(8)).

Historical

The nsswitch.conf(5) file is the modern way of controlling the order of host lookups.

In glibc 2.4 and earlier, the order keyword was used to control the order of host lookups as defined in /etc/host.conf (host.conf(5)).

The hostent structure is defined in <netdb.h> as follows:

struct hostent {
    char  *h_name;            /* official name of host */
    char **h_aliases;         /* alias list */
    int    h_addrtype;        /* host address type */
    int    h_length;          /* length of address */
    char **h_addr_list;       /* list of addresses */
}
#define h_addr h_addr_list[0] /* for backward compatibility */

The members of the hostent structure are:

h_name
The official name of the host.

h_aliases
An array of alternative names for the host, terminated by a null pointer.

h_addrtype
The type of address; always AF_INET or AF_INET6 at present.

h_length
The length of the address in bytes.

h_addr_list
An array of pointers to network addresses for the host (in network byte order), terminated by a null pointer.

h_addr
The first address in h_addr_list for backward compatibility.

RETURN VALUE

The gethostbyname() and gethostbyaddr() functions return the hostent structure or a null pointer if an error occurs. On error, the h_errno variable holds an error number. When non-NULL, the return value may point at static data, see the notes below.

ERRORS

The variable h_errno can have the following values:

HOST_NOT_FOUND
The specified host is unknown.

NO_DATA
The requested name is valid but does not have an IP address. Another type of request to the name server for this domain may return an answer. The constant NO_ADDRESS is a synonym for NO_DATA.

NO_RECOVERY
A nonrecoverable name server error occurred.

TRY_AGAIN
A temporary error occurred on an authoritative name server. Try again later.

FILES

/etc/host.conf
resolver configuration file

/etc/hosts
host database file

/etc/nsswitch.conf
name service switch configuration

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

gethostbyname()

Thread safety

MT-Unsafe race:hostbyname env locale

gethostbyaddr()

Thread safety

MT-Unsafe race:hostbyaddr env locale

sethostent(), endhostent(), gethostent_r()

Thread safety

MT-Unsafe race:hostent env locale

herror(), hstrerror()

Thread safetyMT-Safe

gethostent()

Thread safety

MT-Unsafe race:hostent race:hostentbuf env locale

gethostbyname2()

Thread safety

MT-Unsafe race:hostbyname2 env locale

gethostbyaddr_r(), gethostbyname_r(), gethostbyname2_r()

Thread safetyMT-Safe env locale

In the above table, hostent in race:hostent signifies that if any of the functions sethostent(), gethostent(), gethostent_r(), or endhostent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

sethostent()
endhostent()
gethostent()
POSIX.1-2008.

gethostent_r()
GNU.

Others:
None.

HISTORY

sethostent()
endhostent()
gethostent()
POSIX.1-2001.

gethostbyname()
gethostbyaddr()
h_errno
Marked obsolescent in POSIX.1-2001. Removed in POSIX.1-2008, recommending the use of getaddrinfo(3) and getnameinfo(3) instead.

NOTES

The functions gethostbyname() and gethostbyaddr() may return pointers to static data, which may be overwritten by later calls. Copying the struct hostent does not suffice, since it contains pointers; a deep copy is required.

In the original BSD implementation the len argument of gethostbyname() was an int. The SUSv2 standard is buggy and declares the len argument of gethostbyaddr() to be of type size_t. (That is wrong, because it has to be int, and size_t is not. POSIX.1-2001 makes it socklen_t, which is OK.) See also accept(2).

The BSD prototype for gethostbyaddr() uses const char * for the first argument.

System V/POSIX extension

POSIX requires the gethostent() call, which should return the next entry in the host data base. When using DNS/BIND this does not make much sense, but it may be reasonable if the host data base is a file that can be read line by line. On many systems, a routine of this name reads from the file /etc/hosts. It may be available only when the library was built without DNS support. The glibc version will ignore ipv6 entries. This function is not reentrant, and glibc adds a reentrant version gethostent_r().

GNU extensions

glibc2 also has a gethostbyname2() that works like gethostbyname(), but permits to specify the address family to which the address must belong.

glibc2 also has reentrant versions gethostent_r(), gethostbyaddr_r(), gethostbyname_r(), and gethostbyname2_r(). The caller supplies a hostent structure ret which will be filled in on success, and a temporary work buffer buf of size buflen. After the call, result will point to the result on success. In case of an error or if no entry is found result will be NULL. The functions return 0 on success and a nonzero error number on failure. In addition to the errors returned by the nonreentrant versions of these functions, if buf is too small, the functions will return ERANGE, and the call should be retried with a larger buffer. The global variable h_errno is not modified, but the address of a variable in which to store error numbers is passed in h_errnop.

BUGS

gethostbyname() does not recognize components of a dotted IPv4 address string that are expressed in hexadecimal.

SEE ALSO

getaddrinfo(3), getnameinfo(3), inet(3), inet_ntop(3), inet_pton(3), resolver(3), hosts(5), nsswitch.conf(5), hostname(7), named(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1308 - Linux cli command Tk_X11Fontpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_X11Fontpm and provides detailed information about the command Tk_X11Fontpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_X11Fontpm.

NAME 🖥️ Tk_X11Fontpm 🖥️

a class for finding X Fonts

SYNOPSIS

use Tk::X11Font; $font = $widget->X11Font(foundry => adobe, family => times, point => 120 ); $font = $widget->X11Font(*-courier-medium-r-normal-*-*);

DESCRIPTION

This module can be use to interrogate the X server what fonts are available.

METHODS

Foundry( [ $val ] )

Family( [ $val ] )

Weight( [ $val ] )

Slant( [ $val ] )

Swidth( [ $val ] )

Adstyle( [ $val ] )

Pixel( [ $val ] )

Point( [ $val ] )

Xres( [ $val ] )

Yres( [ $val ] )

Space( [ $val ] )

Avgwidth( [ $val ] )

Registry( [ $val ] )

Encoding( [ $val ] )

Set the given field in the font name to $val if given and return the current or previous value

Name( [ $max ] )

In a list context it returns a list of all font names that match the fields given. It will return a maximum of $max names, or 128 if $max is not given.

In a scalar contex it returns the first matching name or undef

Clone( [ key => value, [ …]] )

Create a duplicate of the curent font object and modify the given fields

AUTHOR

Graham Barr <[email protected]>

HISTORY

11-Jan-96 Initial version

08-Nov-98 Renamed for Tk800.012

COPYRIGHT

Copyright (c) 1995-1996 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1309 - Linux cli command XtGrabKey

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGrabKey and provides detailed information about the command XtGrabKey, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGrabKey.

NAME 🖥️ XtGrabKey 🖥️

manage grabs

SYNTAX

#include <X11/Intrinsic.h>

void XtGrabKey(Widget widget, KeyCode keycode, Modifiers modifiers, Boolean owner_events, int pointer_mode, int keyboard_mode);

void XtUngrabKey(Widget widget, KeyCode keycode, Modifiers modifiers);

int XtGrabKeyboard(Widget widget, Boolean owner_events, int pointer_mode, int keyboard_mode, Time time);

void XtUngrabKeyboard(Widget widget, Time time);

void XtGrabButton(Widget widget, int button, Modifiers modifiers, Boolean owner_events, unsigned int event_mask, int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor);

void XtUngrabButton(Widget widget, unsigned button, Modifiers modifiers);

int XtGrabPointer(Widget widget, Boolean owner_events, unsigned int event_mask, int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor, Time time);

void XtUngrabPointer(Widget widget, Time time);

ARGUMENTS

widget
Specifies the widget in whose window the grab will occur. Must be of class Core or a subclass thereof.

keycode

modifiers

owner_events

pointer_mode

keyboard_mode

time

button

confine_to

cursor
Specifies arguments to the associated Xlib function call.

DESCRIPTION

XtGrabKey calls XGrabKey specifying the widget’s window as the grab window if the widget is realized. The remaining arguments are exactly as for XGrabKey. If the widget is not realized, or is later unrealized, the call to XGrabKey will be performed (again) when the widget is realized and its window becomes mapped. In the future, if XtDispatchEvent is called with a KeyPress event matching the specified keycode and modifiers (which may be AnyKey or AnyModifier, respectively) for the widget’s window, the Intrinsics will call XtUngrabKeyboard with the timestamp from the KeyPress event if either of the following conditions is true:

  • There is a modal cascade and the widget is not in the active subset of the cascade and the keyboard was not previously grabbed, or

  • XFilterEvent returns True.

XtUngrabKey calls XUngrabKey specifying the widget’s window as the ungrab window if the widget is realized. The remaining arguments are exactly as for XUngrabKey. If the widget is not realized, XtUngrabKey removes a deferred XtGrabKey request, if any, for the specified widget, keycode, and modifiers.

If the specified widget is realized XtGrabKeyboard calls XGrabKeyboard specifying the widget’s window as the grab window. The remaining arguments and return value are exactly as for XGrabKeyboard. If the widget is not realized, XtGrabKeyboard immediately returns GrabNotViewable. No future ungrab is implied by XtGrabKeyboard.

XtUngrabKeyboard calls XUngrabKeyboard with the specified time.

XtGrabButton calls XGrabButton specifying the widget’s window as the grab window if the widget is realized. The remaining arguments are exactly as for XGrabButton. If the widget is not realized, or is later unrealized, the call to XGrabButton will be performed (again) when the widget is realized and its window becomes mapped. In the future, if XtDispatchEvent is called with a ButtonPress event matching the specified button and modifiers (which may be AnyButton or AnyModifier, respectively) for the widget’s window, the Intrinsics will call XtUngrabPointer with the timestamp from the ButtonPress event if either of the following conditions is true:

  • There is a modal cascade and the widget is not in the active subset of the cascade and the pointer was not previously grabbed, or

  • XFilterEvent returns True.

XtUngrabButton calls XUngrabButton specifying the widget’s window as the ungrab window if the widget is realized. The remaining arguments are exactly as for XUngrabButton. If the widget is not realized, XtUngrabButton removes a deferred XtGrabButton request, if any, for the specified widget, button, and modifiers.

XtGrabPointer calls XGrabPointer specifying the widget’s window as the grab window. The remaining arguments and return value are exactly as for XGrabPointer. If the widget is not realized, XtGrabPointer immediately returns GrabNotViewable. No future ungrab is implied by XtGrabPointer.

XtUngrabPointer calls XUngrabPointer with the specified time.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1310 - Linux cli command Net_DNS_Resolver_MSWin32pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_Resolver_MSWin32pm and provides detailed information about the command Net_DNS_Resolver_MSWin32pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_Resolver_MSWin32pm.

NAME 🖥️ Net_DNS_Resolver_MSWin32pm 🖥️

MS Windows resolver class

SYNOPSIS

use Net::DNS::Resolver;

DESCRIPTION

This class implements the OS specific portions of Net::DNS::Resolver.

No user serviceable parts inside, see Net::DNS::Resolver for all your resolving needs.

COPYRIGHT

Copyright (c)2003 Chris Reinhardt.

Portions Copyright (c)2009 Olaf Kolkman, NLnet Labs

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl, Net::DNS, Net::DNS::Resolver

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1311 - Linux cli command Package_Stash_XSpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Package_Stash_XSpm and provides detailed information about the command Package_Stash_XSpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Package_Stash_XSpm.

NAME 🖥️ Package_Stash_XSpm 🖥️

Faster and more correct implementation of the Package::Stash API

VERSION

version 0.30

SYNOPSIS

use Package::Stash;

DESCRIPTION

This is a backend for Package::Stash, which provides the functionality in a way that’s less buggy and much faster. It will be used by default if it’s installed, and should be preferred in all environments with a compiler.

BUGS

No known bugs (but see the BUGS section in Package::Stash).

SEE ALSO

Package::Stash

SUPPORT

Bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=Package-Stash-XS> (or [email protected] <mailto:[email protected]>).

AUTHORS

CONTRIBUTORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2022 by Jesse Luehrs.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1312 - Linux cli command Moose_Manual_MethodModifierspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Manual_MethodModifierspm and provides detailed information about the command Moose_Manual_MethodModifierspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Manual_MethodModifierspm.

NAME 🖥️ Moose_Manual_MethodModifierspm 🖥️

Moose’s method modifiers

VERSION

version 2.2207

WHAT IS A METHOD MODIFIER?

Moose provides a feature called “method modifiers”. You can also think of these as “hooks” or “advice”.

It’s probably easiest to understand this feature with a few examples:

package Example; use Moose; sub foo { print " foo “; } before foo => sub { print “about to call foo “; }; after foo => sub { print “just called foo “; }; around foo => sub { my $orig = shift; my $self = shift; print " Im around foo “; $self->$orig(@_); print " Im still around foo “; };

Now if I call Example->new->foo I’ll get the following output:

about to call foo Im around foo foo Im still around foo just called foo

You probably could have figured that out from the names “before”, “after”, and “around”.

Also, as you can see, the before modifiers come before around modifiers, and after modifiers come last.

When there are multiple modifiers of the same type, the before and around modifiers run from the last added to the first, and after modifiers run from first added to last:

before 2 before 1 around 2 around 1 primary around 1 around 2 after 1 after 2

WHY USE THEM?

Method modifiers have many uses. They are often used in roles to alter the behavior of methods in the classes that consume the role. See Moose::Manual::Roles for more information about roles.

Since modifiers are mostly useful in roles, some of the examples below are a bit artificial. They’re intended to give you an idea of how modifiers work, but may not be the most natural usage.

BEFORE, AFTER, AND AROUND

Method modifiers can be used to add behavior to methods without modifying the definition of those methods.

Before and after Modifiers

Method modifiers can be used to add behavior to a method that Moose generates for you, such as an attribute accessor:

has size => ( is => rw ); before size => sub { my $self = shift; if (@_) { Carp::cluck(Someone is setting size); } };

Another use for the before modifier would be to do some sort of prechecking on a method call. For example:

before size => sub { my $self = shift; die Cannot set size while the person is growing if @_ && $self->is_growing; };

This lets us implement logical checks that don’t make sense as type constraints. In particular, they’re useful for defining logical rules about an object’s state changes.

Similarly, an after modifier could be used for logging an action that was taken.

Note that the return values of both before and after modifiers are ignored.

Around modifiers

An around modifier is more powerful than either a before or after modifier. It can modify the arguments being passed to the original method, and you can even decide to simply not call the original method at all. You can also modify the return value with an around modifier.

An around modifier receives the original method as its first argument, then the object, and finally any arguments passed to the method.

around size => sub { my $orig = shift; my $self = shift; return $self->$orig() unless @_; my $size = shift; $size = $size / 2 if $self->likes_small_things(); return $self->$orig($size); };

Wrapping multiple methods at once

before, after, and around can also modify multiple methods at once. The simplest example of this is passing them as a list:

before [qw(foo bar baz)] => sub { warn “something is being called!”; };

This will add a before modifier to each of the foo, bar, and baz methods in the current class, just as though a separate call to before was made for each of them. The list can be passed either as a bare list, or as an arrayref. Note that the name of the function being modified isn’t passed in in any way; this syntax is only intended for cases where the function being modified doesn’t actually matter. If the function name does matter, use something like this:

for my $func (qw(foo bar baz)) { before $func => sub { warn “$func was called!”; }; }

Using regular expressions to select methods to wrap

In addition, you can specify a regular expression to indicate the methods to wrap, like so:

after qr/^command_/ => sub { warn “got a command”; };

This will match the regular expression against each method name returned by “get_method_list” in Class::MOP::Class, and add a modifier to each one that matches. The same caveats apply as above.

Using regular expressions to determine methods to wrap is quite a bit more powerful than the previous alternatives, but it’s also quite a bit more dangerous. Bear in mind that if your regular expression matches certain Perl and Moose reserved method names with a special meaning to Moose or Perl, such as meta, new, BUILD, DESTROY, AUTOLOAD, etc, this could cause unintended (and hard to debug) problems and is best avoided.

Execution order of method modifiers and inheritance

When both a superclass and an inheriting class have the same method modifiers, the method modifiers of the inheriting class are wrapped around the method modifiers of the superclass, as the following example illustrates:

Here is the parent class:

package Superclass; use Moose; sub rant { printf " RANTING! " } before rant => sub { printf " In %s before “, _ _PACKAGE_ _ }; after rant => sub { printf " In %s after “, _ _PACKAGE_ _ }; around rant => sub { my $orig = shift; my $self = shift; printf " In %s around before calling original “, _ _PACKAGE_ _; $self->$orig; printf " In %s around after calling original “, _ _PACKAGE_ _; }; 1;

And the child class:

package Subclass; use Moose; extends Superclass; before rant => sub { printf “In %s before “, _ _PACKAGE_ _ }; after rant => sub { printf “In %s after “, _ _PACKAGE_ _ }; around rant => sub { my $orig = shift; my $self = shift; printf " In %s around before calling original “, _ _PACKAGE_ _; $self->$orig; printf " In %s around after calling original “, _ _PACKAGE_ _; }; 1;

And here’s the output when we call the wrapped method (Child->rant):

% perl -MSubclass -e Subclass->new->rant In Subclass before In Subclass around before calling original In Superclass before In Superclass around before calling original RANTING! In Superclass around after calling original In Superclass after In Subclass around after calling original In Subclass after

INNER AND AUGMENT

Augment and inner are two halves of the same feature. The augment modifier provides a sort of inverted subclassing. You provide part of the implementation in a superclass, and then document that subclasses are expected to provide the rest.

The superclass calls inner(), which then calls the augment modifier in the subclass:

package Document; use Moose; sub as_xml { my $self = shift; my $xml = “<document> “; $xml .= inner(); $xml .= “</document> “; return $xml; }

Using inner() in this method makes it possible for one or more subclasses to then augment this method with their own specific implementation:

package Report; use Moose; extends Document; augment as_xml => sub { my $self = shift; my $xml = " <report> “; $xml .= inner(); $xml .= " </report> “; return $xml; };

When we call as_xml on a Report object, we get something like this:

<document> <report> </report> </document>

But we also called inner() in Report, so we can continue subclassing and adding more content inside the document:

package Report::IncomeAndExpenses; use Moose; extends Report; augment as_xml => sub { my $self = shift; my $xml = <income> . $self->income . </income>; $xml .= " “; $xml .= <expenses> . $self->expenses . </expenses>; $xml .= " “; $xml .= inner() || q{}; return $xml; };

Now our report has some content:

<document> <report> <income>$10</income> <expenses>$8</expenses> </report> </document>

What makes this combination of augment and inner() special is that it allows us to have methods which are called from parent (least specific) to child (most specific). This inverts the normal inheritance pattern.

Note that in Report::IncomeAndExpenses we call inner() again. If the object is an instance of Report::IncomeAndExpenses then this call is a no-op, and just returns false. It’s a good idea to always call inner() to allow for future subclassing.

OVERRIDE AND SUPER

Finally, Moose provides some simple sugar for Perl’s built-in method overriding scheme. If you want to override a method from a parent class, you can do this with override:

package Employee; use Moose; extends Person; has job_title => ( is => rw ); override display_name => sub { my $self = shift; return super() . q{, } . $self->job_title(); };

The call to super() is almost the same as calling $self->SUPER::display_name. The difference is that the arguments passed to the superclass’s method will always be the same as the ones passed to the method modifier, and cannot be changed.

All arguments passed to super() are ignored, as are any changes made to @_ before super() is called.

SEMI-COLONS

Because all of these method modifiers are implemented as Perl functions, you must always end the modifier declaration with a semi-colon:

after foo => sub { };

EXCEPTIONS AND STACK TRACES

An exception thrown in a before modifier will prevent the method it modifies from being called at all. An exception in an around modifier may prevent the modified method from being called, depending on how the around modifier is structured. An exception in an after modifier obviously cannot prevent the method it wraps from being called.

Both override and augment are similar to around in that they can decide whether or not to call the method they modify before or after throwing an exception.

From the caller’s perspective, an exception in a method modifier will look like the method it called threw an exception. However, method modifiers are just standard Perl subroutines. This means that they end up on the stack in stack traces as an additional frame.

CAVEATS

These method modification features do not work well with multiple inheritance, due to how method resolution is performed in Perl. Experiment with a test program to ensure your class hierarchy works as expected, or more preferably, don’t use multiple inheritance (roles can help with this)!

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1313 - Linux cli command Regexp_Common_SENpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_SENpm and provides detailed information about the command Regexp_Common_SENpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_SENpm.

NAME 🖥️ Regexp_Common_SENpm 🖥️

  • provide regexes for Social-Economical Numbers.

SYNOPSIS

use Regexp::Common qw /SEN/; while (<>) { /^$RE{SEN}{USA}{SSN}$/ and print “Social Security Number “; }

DESCRIPTION

Please consult the manual of Regexp::Common for a general description of the works of this interface.

Do not use this module directly, but load it via Regexp::Common.

“$RE{SEN}{USA}{SSN}{-sep}”

Returns a pattern that matches an American Social Security Number (SSN). SSNs consist of three groups of numbers, separated by a hyphen (-). This pattern only checks for a valid structure, that is, it validates whether a number is valid SSN, was a valid SSN, or maybe a valid SSN in the future. There are almost a billion possible SSNs, and about 400 million are in use, or have been in use.

If -sep=P is specified, the pattern P is used as the separator between the groups of numbers.

Under -keep (see Regexp::Common):

$1
captures the entire SSN.

$2
captures the first group of digits (the area number).

$3
captures the second group of digits (the group number).

$4
captures the third group of digits (the serial number).

SEE ALSO

Regexp::Common for a general description of how to use this interface.

AUTHORS

Damian Conway and Abigail.

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

For a start, there are many common regexes missing. Send them in to [email protected].

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1314 - Linux cli command setenv

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setenv and provides detailed information about the command setenv, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setenv.

NAME 🖥️ setenv 🖥️

change or add an environment variable

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int setenv(const char *name, const char *value, int overwrite);
int unsetenv(const char *name);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

setenv(), unsetenv():

    _POSIX_C_SOURCE >= 200112L
        || /* glibc <= 2.19: */ _BSD_SOURCE

DESCRIPTION

The setenv() function adds the variable name to the environment with the value value, if name does not already exist. If name does exist in the environment, then its value is changed to value if overwrite is nonzero; if overwrite is zero, then the value of name is not changed (and setenv() returns a success status). This function makes copies of the strings pointed to by name and value (by contrast with putenv(3)).

The unsetenv() function deletes the variable name from the environment. If name does not exist in the environment, then the function succeeds, and the environment is unchanged.

RETURN VALUE

setenv() and unsetenv() functions return zero on success, or -1 on error, with errno set to indicate the error.

ERRORS

EINVAL
name is NULL, points to a string of length 0, or contains an ‘=’ character.

ENOMEM
Insufficient memory to add a new variable to the environment.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setenv(), unsetenv()

Thread safetyMT-Unsafe const:env

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, 4.3BSD.

Prior to glibc 2.2.2, unsetenv() was prototyped as returning void; more recent glibc versions follow the POSIX.1-compliant prototype shown in the SYNOPSIS.

CAVEATS

POSIX.1 does not require setenv() or unsetenv() to be reentrant.

BUGS

POSIX.1 specifies that if name contains an ‘=’ character, then setenv() should fail with the error EINVAL; however, versions of glibc before glibc 2.3.4 allowed an ‘=’ sign in name.

SEE ALSO

clearenv(3), getenv(3), putenv(3), environ(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1315 - Linux cli command mq_send

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mq_send and provides detailed information about the command mq_send, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mq_send.

NAME 🖥️ mq_send 🖥️

send a message to a message queue

LIBRARY

Real-time library (librt, -lrt)

SYNOPSIS

#include <mqueue.h>
int mq_send(mqd_t mqdes, const char msg_ptr[.msg_len],
 size_t msg_len, unsigned int msg_prio);
#include <time.h>
#include <mqueue.h>
int mq_timedsend(mqd_t mqdes, const char msg_ptr[.msg_len],
 size_t msg_len, unsigned int msg_prio,
 const struct timespec *abs_timeout);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

mq_timedsend():

    _POSIX_C_SOURCE >= 200112L

DESCRIPTION

mq_send() adds the message pointed to by msg_ptr to the message queue referred to by the message queue descriptor mqdes. The msg_len argument specifies the length of the message pointed to by msg_ptr; this length must be less than or equal to the queue’s mq_msgsize attribute. Zero-length messages are allowed.

The msg_prio argument is a nonnegative integer that specifies the priority of this message. Messages are placed on the queue in decreasing order of priority, with newer messages of the same priority being placed after older messages with the same priority. See mq_overview(7) for details on the range for the message priority.

If the message queue is already full (i.e., the number of messages on the queue equals the queue’s mq_maxmsg attribute), then, by default, mq_send() blocks until sufficient space becomes available to allow the message to be queued, or until the call is interrupted by a signal handler. If the O_NONBLOCK flag is enabled for the message queue description, then the call instead fails immediately with the error EAGAIN.

mq_timedsend() behaves just like mq_send(), except that if the queue is full and the O_NONBLOCK flag is not enabled for the message queue description, then abs_timeout points to a structure which specifies how long the call will block. This value is an absolute timeout in seconds and nanoseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC), specified in a timespec(3) structure.

If the message queue is full, and the timeout has already expired by the time of the call, mq_timedsend() returns immediately.

RETURN VALUE

On success, mq_send() and mq_timedsend() return zero; on error, -1 is returned, with errno set to indicate the error.

ERRORS

EAGAIN
The queue was full, and the O_NONBLOCK flag was set for the message queue description referred to by mqdes.

EBADF
The descriptor specified in mqdes was invalid or not opened for writing.

EINTR
The call was interrupted by a signal handler; see signal(7).

EINVAL
The call would have blocked, and abs_timeout was invalid, either because tv_sec was less than zero, or because tv_nsec was less than zero or greater than 1000 million.

EMSGSIZE
msg_len was greater than the mq_msgsize attribute of the message queue.

ETIMEDOUT
The call timed out before a message could be transferred.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mq_send(), mq_timedsend()

Thread safetyMT-Safe

VERSIONS

On Linux, mq_timedsend() is a system call, and mq_send() is a library function layered on top of that system call.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

SEE ALSO

mq_close(3), mq_getattr(3), mq_notify(3), mq_open(3), mq_receive(3), mq_unlink(3), timespec(3), mq_overview(7), time(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1316 - Linux cli command nearbyintl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command nearbyintl and provides detailed information about the command nearbyintl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the nearbyintl.

NAME 🖥️ nearbyintl 🖥️

round to nearest integer

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double nearbyint(double x);
float nearbyintf(float x);
long double nearbyintl(long double x);
double rint(double x);
float rintf(float x);
long double rintl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

nearbyint(), nearbyintf(), nearbyintl():

    _POSIX_C_SOURCE >= 200112L || _ISOC99_SOURCE

rint():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

rintf(), rintl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The nearbyint(), nearbyintf(), and nearbyintl() functions round their argument to an integer value in floating-point format, using the current rounding direction (see fesetround(3)) and without raising the inexact exception. When the current rounding direction is to nearest, these functions round halfway cases to the even integer in accordance with IEEE-754.

The rint(), rintf(), and rintl() functions do the same, but will raise the inexact exception (FE_INEXACT, checkable via fetestexcept(3)) when the result differs in value from the argument.

RETURN VALUE

These functions return the rounded integer value.

If x is integral, +0, -0, NaN, or infinite, x itself is returned.

ERRORS

No errors occur. POSIX.1-2001 documents a range error for overflows, but see NOTES.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

nearbyint(), nearbyintf(), nearbyintl(), rint(), rintf(), rintl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

NOTES

SUSv2 and POSIX.1-2001 contain text about overflow (which might set errno to ERANGE, or raise an FE_OVERFLOW exception). In practice, the result cannot overflow on any current machine, so this error-handling stuff is just nonsense. (More precisely, overflow can happen only when the maximum value of the exponent is smaller than the number of mantissa bits. For the IEEE-754 standard 32-bit and 64-bit floating-point numbers the maximum value of the exponent is 127 (respectively, 1023), and the number of mantissa bits including the implicit bit is 24 (respectively, 53).)

If you want to store the rounded value in an integer type, you probably want to use one of the functions described in lrint(3) instead.

SEE ALSO

ceil(3), floor(3), lrint(3), round(3), trunc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1317 - Linux cli command XtCancelSelectionRequest

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtCancelSelectionRequest and provides detailed information about the command XtCancelSelectionRequest, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtCancelSelectionRequest.

NAME 🖥️ XtCancelSelectionRequest 🖥️

bundle multiple selection conversion requests into a single request using MULTIPLE target

SYNTAX

#include <X11/Intrinsic.h>

void XtCreateSelectionRequest(Widget requestor, Atom selection);

void XtSendSelectionRequest(Widget requestor, Atom selection, Time time);

void XtCancelSelectionRequest(Widget requestor, Atom selection);

ARGUMENTS

requestor
Specifies the widget making the request. Must be of class Core or a subclass thereof.

selection
Specifies the particular selection desired.

time
Specifies the timestamp to be used in making the request.

DESCRIPTION

When XtCreateSelectionRequest is called, subsequent calls to XtGetSelectionValue and XtGetSelectionValueIncremental with the requestor and selection as specified to XtCreateSelectionRequest will be bundled into a single selection conversion request with multiple targets. The request is actually initiated by calling XtSendSelectionRequest.

When XtSendSelectionRequest is called with a value of requestor and selection matching a previous call to XtCreateSelectionRequest, a selection conversion request is actually sent to the selection owner. If a single target request is queued, that request is made. If multiple targets are queued they are bundled into a single request with the target MULTIPLE using the specified timestamp. As the conversions are made, the callbacks associated with each XtGetSelectionValue and XtGetSelectionValueIncremental are invoked in turn.

Multi-threaded applications should lock the application context before calling XtCreateSelectionRequest and release the lock after calling XtSendSelectionRequest to ensure that the thread assembling the request is safe from interference by another thread assembling a different request naming the same widget and selection.

When XtCancelSelectionRequest is called, any requests queued since the last call to XtCreateSelectionRequest are cleaned up. Subsequent calls to XtGetSelectionValue, XtGetSelectionValues, XtGetSelectionValueIncremental, and XtGetSelectionValuesIncremental will not be deferred.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1318 - Linux cli command TIMESPEC_TO_TIMEVAL

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command TIMESPEC_TO_TIMEVAL and provides detailed information about the command TIMESPEC_TO_TIMEVAL, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the TIMESPEC_TO_TIMEVAL.

NAME 🖥️ TIMESPEC_TO_TIMEVAL 🖥️

convert between time structures

SYNOPSIS

#define _GNU_SOURCE
#include <sys/time.h>
void TIMEVAL_TO_TIMESPEC(const struct timeval *tv, struct timespec *ts);
void TIMESPEC_TO_TIMEVAL(struct timeval *tv, const struct timespec *ts);

DESCRIPTION

These macros convert from a timeval(3type) to a timespec(3type) structure, and vice versa, respectively.

This is especially useful for writing interfaces that receive a type, but are implemented with calls to functions that receive the other one.

STANDARDS

GNU, BSD.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1319 - Linux cli command wcsrchr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcsrchr and provides detailed information about the command wcsrchr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcsrchr.

NAME 🖥️ wcsrchr 🖥️

search a wide character in a wide-character string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
wchar_t *wcsrchr(const wchar_t *wcs, wchar_t wc);

DESCRIPTION

The wcsrchr() function is the wide-character equivalent of the strrchr(3) function. It searches the last occurrence of wc in the wide-character string pointed to by wcs.

RETURN VALUE

The wcsrchr() function returns a pointer to the last occurrence of wc in the wide-character string pointed to by wcs, or NULL if wc does not occur in the string.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcsrchr()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

strrchr(3), wcschr(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1320 - Linux cli command Net_DBus_Binding_Connectionpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Binding_Connectionpm and provides detailed information about the command Net_DBus_Binding_Connectionpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Binding_Connectionpm.

NAME 🖥️ Net_DBus_Binding_Connectionpm 🖥️

A connection between client and server

SYNOPSIS

Creating a connection to a server and sending a message

use Net::DBus::Binding::Connection; my $con = Net::DBus::Binding::Connection->new(address => “unix:path=/path/to/socket”); $con->send($message);

Registering message handlers

sub handle_something { my $con = shift; my $msg = shift; … do something with the message… } $con->register_message_handler( “/some/object/path”, \handle_something);

Hooking up to an event loop:

my $reactor = Net::DBus::Binding::Reactor->new(); $reactor->manage($con); $reactor->run();

DESCRIPTION

An outgoing connection to a server, or an incoming connection from a client. The methods defined on this module have a close correspondence to the dbus_connection_XXX methods in the C API, so for further details on their behaviour, the C API documentation may be of use.

METHODS

my $con = Net::DBus::Binding::Connection->new(address => “unix:path=/path/to/socket”);
Creates a new connection to the remove server specified by the parameter address. If the private parameter is supplied, and set to a True value the connection opened is private; otherwise a shared connection is opened. A private connection must be explicitly shutdown with the disconnect method before the last reference to the object is released. A shared connection must never be explicitly disconnected.

$status = $con->is_connected();
Returns zero if the connection has been disconnected, otherwise a positive value is returned.

$status = $con->is_authenticated();
Returns zero if the connection has not yet successfully completed authentication, otherwise a positive value is returned.

$con->disconnect()
Closes this connection to the remote host. This method is called automatically during garbage collection (ie in the DESTROY method) if the programmer forgets to explicitly disconnect.

$con->flush()
Blocks execution until all data in the outgoing data stream has been sent. This method will not re-enter the application event loop.

$con->send($message)
Queues a message up for sending to the remote host. The data will be sent asynchronously as the applications event loop determines there is space in the outgoing socket send buffer. To force immediate sending of the data, follow this method will a call to flush. This method will return the serial number of the message, which can be used to identify a subsequent reply (if any).

my $reply = $con->send_with_reply_and_block($msg, $timeout);
Queues a message up for sending to the remote host and blocks until it has been sent, and a corresponding reply received. The return value of this method will be a Net::DBus::Binding::Message::MethodReturn or Net::DBus::Binding::Message::Error object.

my $pending_call = $con->send_with_reply($msg, $timeout);
Queues a message up for sending to the remote host and returns immediately providing a reference to a Net::DBus::Binding::PendingCall object. This object can be used to wait / watch for a reply. This allows methods to be processed asynchronously.

$con->dispatch;
Dispatches any pending messages in the incoming queue to their message handlers. This method is typically called on each iteration of the main application event loop where data has been read from the incoming socket.

$message = $con->borrow_message
Temporarily removes the first message from the incoming message queue. No other thread may access the message while it is ‘borrowed’, so it should be replaced in the queue with the return_message method, or removed permanently with th steal_message method as soon as is practical.

$con->return_message($msg)
Replaces a previously borrowed message in the incoming message queue for subsequent dispatch to registered message handlers.

$con->steal_message($msg)
Permanently remove a borrowed message from the incoming message queue. No registered message handlers will now be run for this message.

$msg = $con->pop_message();
Permanently removes the first message on the incoming message queue, without running any registered message handlers. If you have hooked the connection up to an event loop (Net::DBus::Binding::Reactor for example), you probably don’t want to be calling this method.

$con->set_watch_callbacks(\add_watch, \remove_watch, \toggle_watch);
Register a set of callbacks for adding, removing & updating watches in the application’s event loop. Each parameter should be a code reference, which on each invocation, will be supplied with two parameters, the connection object and the watch object. If you are using a Net::DBus::Binding::Reactor object as the application event loop, then the ‘manage’ method on that object will call this on your behalf.

$con->set_timeout_callbacks(\add_timeout, \remove_timeout, \toggle_timeout);
Register a set of callbacks for adding, removing & updating timeouts in the application’s event loop. Each parameter should be a code reference, which on each invocation, will be supplied with two parameters, the connection object and the timeout object. If you are using a Net::DBus::Binding::Reactor object as the application event loop, then the ‘manage’ method on that object will call this on your behalf.

$con->register_object_path($path, \handler)
Registers a handler for messages whose path matches that specified in the $path parameter. The supplied code reference will be invoked with two parameters, the connection object on which the message was received, and the message to be processed (an instance of the Net::DBus::Binding::Message class).

$con->unregister_object_path($path)
Unregisters the handler associated with the object path $path. The handler would previously have been registered with the register_object_path or register_fallback methods.

$con->register_fallback($path, \handler)
Registers a handler for messages whose path starts with the prefix specified in the $path parameter. The supplied code reference will be invoked with two parameters, the connection object on which the message was received, and the message to be processed (an instance of the Net::DBus::Binding::Message class).

$con->set_max_message_size($bytes)
Sets the maximum allowable size of a single incoming message. Messages over this size will be rejected prior to exceeding this threshold. The message size is specified in bytes.

$bytes = $con->get_max_message_size();
Retrieves the maximum allowable incoming message size. The returned size is measured in bytes.

$con->set_max_received_size($bytes)
Sets the maximum size of the incoming message queue. Once this threshold is exceeded, no more messages will be read from wire before one or more of the existing messages are dispatched to their registered handlers. The implication is that the message queue can exceed this threshold by at most the size of a single message.

$bytes $con->get_max_received_size()
Retrieves the maximum incoming message queue size. The returned size is measured in bytes.

$con->add_filter($coderef);
Adds a filter to the connection which will be invoked whenever a message is received. The $coderef should be a reference to a subroutine, which returns a true value if the message should be filtered out, or a false value if the normal message dispatch should be performed.

my $msg = $con->make_raw_message($rawmsg)
Creates a new message, initializing it from the low level C message object provided by the $rawmsg parameter. The returned object will be cast to the appropriate subclass of Net::DBus::Binding::Message.

my $msg = $con->make_error_message( replyto => $method_call, name => $name, description => $description);
Creates a new message, representing an error which occurred during the handling of the method call object passed in as the replyto parameter. The name parameter is the formal name of the error condition, while the description is a short piece of text giving more specific information on the error.

my $call = $con->make_method_call_message( $service_name, $object_path, $interface, $method_name);
Create a message representing a call on the object located at the path $object_path within the client owning the well-known name given by $service_name. The method to be invoked has the name $method_name within the interface specified by the $interface parameter.

my $msg = $con->make_method_return_message( replyto => $method_call);
Create a message representing a reply to the method call passed in the replyto parameter.

my $signal = $con->make_signal_message( object_path => $path, interface => $interface, signal_name => $name);
Creates a new message, representing a signal [to be] emitted by the object located under the path given by the object_path parameter. The name of the signal is given by the signal_name parameter, and is scoped to the interface given by the interface parameter.

AUTHOR

Daniel P. Berrange

COPYRIGHT

Copyright (C) 2004-2011 Daniel P. Berrange

SEE ALSO

Net::DBus::Binding::Server, Net::DBus::Binding::Bus, Net::DBus::Binding::Message::Signal, Net::DBus::Binding::Message::MethodCall, Net::DBus::Binding::Message::MethodReturn, Net::DBus::Binding::Message::Error

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1321 - Linux cli command SIMPLEQ_HEAD

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SIMPLEQ_HEAD and provides detailed information about the command SIMPLEQ_HEAD, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SIMPLEQ_HEAD.

NAME 🖥️ SIMPLEQ_HEAD 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1322 - Linux cli command Tk_Eventlooppm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Eventlooppm and provides detailed information about the command Tk_Eventlooppm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Eventlooppm.

NAME 🖥️ Tk_Eventlooppm 🖥️

ToolKit for Events

SYNOPSIS

use Tk::Event; Tk::Event->fileevent(\FH, readable => callback); Tk::Event->lineavail(\FH, callback); use Tk::Event::Signal qw(INT); $SIG{INT} = callback; use Tk::Event::process; Tk::Event->proc($pid, callback); QueueEvent(callback [, position])

DESCRIPTION

That is better than nothing but still hard to use. Most scripts want higher level result (a line, a “block” of data etc.)

So it has occured to me that we could use new-ish TIEHANDLE thus:

my $obj = tie SOMEHANDLE,Tk::Event::IO; while (<SOMEHANDLE>) { }

Then the READLINE routine registers a callback and looks something like:

sub READLINE { my $obj = shift; Event->io(*$obj,readable,sub { sysread(*$obj,${*$obj},1,length(${*$obj}) }); my $pos; while (($pos = index(${*$obj},$/) < 0) { DoOneEvent(); } Event->io(*$obj,readable,); # unregister $pos += length($/); my $result = substr(${*$obj},0,$pos); substr(${*$obj},0,$pos) = ; return $result; }

This is using the scalar part of the glob representing the _inner_ IO as a buffer in which to accumulate chars.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1323 - Linux cli command XtGetSubvalues

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGetSubvalues and provides detailed information about the command XtGetSubvalues, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGetSubvalues.

NAME 🖥️ XtGetSubvalues 🖥️

obtain and set widget resources

SYNTAX

#include <X11/Intrinsic.h>

void XtSetValues(Widget w, ArgList args, Cardinal num_args);

void XtVaSetValues(Widget w, … );

void XtSetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);

void XtVaSetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, … );

void XtGetValues(Widget w, ArgList args, Cardinal num_args);

void XtVaGetValues(Widget w, … );

void XtGetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);

void XtVaGetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, … );

ARGUMENTS

args
Specifies the argument list of name/address pairs that contain the resource name and either the address into which the resource value is to be stored or their new values.

base
Specifies the base address of the subpart data structure where the resources should be retrieved or written.

num_args
Specifies the number of arguments in the argument list.

resources
Specifies the nonwidget resource list or values.

num_resources
Specifies the number of resources in the resource list.

  1. Specifies the widget.


Specifies the variable argument list of name/address pairs that contain the resource name and either the address into which the resource value is to be stored or their new values.

DESCRIPTION

The XtSetValues function starts with the resources specified for the Core widget fields and proceeds down the subclass chain to the widget. At each stage, it writes the new value (if specified by one of the arguments) or the existing value (if no new value is specified) to a new widget data record. XtSetValues then calls the set_values procedures for the widget in superclass-to-subclass order. If the widget has any non-NULL set_values_hook fields, these are called immediately after the corresponding set_values procedure. This procedure permits subclasses to set nonwidget data for XtSetValues.

If the widget’s parent is a subclass of constraintWidgetClass, XtSetValues also updates the widget’s constraints. It starts with the constraint resources specified for constraintWidgetClass and proceeds down the subclass chain to the parent’s class. At each stage, it writes the new value or the existing value to a new constraint record. It then calls the constraint set_values procedures from constraintWidgetClass down to the parent’s class. The constraint set_values procedures are called with widget arguments, as for all set_values procedures, not just the constraint record arguments, so that they can make adjustments to the desired values based on full information about the widget.

XtSetValues determines if a geometry request is needed by comparing the current widget to the new widget. If any geometry changes are required, it makes the request, and the geometry manager returns XtGeometryYes, XtGeometryAlmost, or XtGeometryNo. If XtGeometryYes, XtSetValues calls the widget’s resize procedure. If XtGeometryNo, XtSetValues resets the geometry fields to their original values. If XtGeometryAlmost, XtSetValues calls the set_values_almost procedure, which determines what should be done and writes new values for the geometry fields into the new widget. XtSetValues then repeats this process, deciding once more whether the geometry manager should be called.

Finally, if any of the set_values procedures returned True, XtSetValues causes the widget’s expose procedure to be invoked by calling the Xlib XClearArea function on the widget’s window.

The XtSetSubvalues function stores resources into the structure identified by base.

The XtGetValues function starts with the resources specified for the core widget fields and proceeds down the subclass chain to the widget. The value field of a passed argument list should contain the address into which to store the corresponding resource value. It is the caller’s responsibility to allocate and deallocate this storage according to the size of the resource representation type used within the widget.

If the widget’s parent is a subclass of constraintWidgetClass, XtGetValues then fetches the values for any constraint resources requested. It starts with the constraint resources specified for constraintWidgetClass and proceeds down to the subclass chain to the parent’s constraint resources. If the argument list contains a resource name that is not found in any of the resource lists searched, the value at the corresponding address is not modified. Finally, if the get_values_hook procedures are non-NULL, they are called in superclass-to-subclass order after all the resource values have been fetched by XtGetValues. This permits a subclass to provide nonwidget resource data to XtGetValues.

The XtGetSubvalues function obtains resource values from the structure identified by base.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1324 - Linux cli command XtMalloc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtMalloc and provides detailed information about the command XtMalloc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtMalloc.

NAME 🖥️ XtMalloc 🖥️

memory management functions

SYNTAX

#include <X11/Intrinsic.h>

char *XtMalloc(Cardinal size);

char *XtCalloc(Cardinal num, Cardinal size);

char *XtRealloc(char *ptr, Cardinal num);

void XtFree(char *ptr);

type *XtNew(type);

String XtNewString(String string);

Cardinal XtAsprintf(char **new_string, const char *format, …);

ARGUMENTS

num
Specifies the number of bytes or array elements.

ptr
Specifies a pointer to the old storage or to the block of storage that is to be freed.

size
Specifies the size of an array element (in bytes) or the number of bytes desired.

string
Specifies a previously declared string.

type
Specifies a previously declared data type.

new_string
Specifies a pointer to write a newly allocated string to.

format
Specifies a formatting string as defined by sprintf(3c)

DESCRIPTION

The XtMalloc functions returns a pointer to a block of storage of at least the specified size bytes. If there is insufficient memory to allocate the new block, XtMalloc calls XtErrorMsg.

The XtCalloc function allocates space for the specified number of array elements of the specified size and initializes the space to zero. If there is insufficient memory to allocate the new block, XtCalloc calls XtErrorMsg.

The XtRealloc function changes the size of a block of storage (possibly moving it). Then, it copies the old contents (or as much as will fit) into the new block and frees the old block. If there is insufficient memory to allocate the new block, XtRealloc calls XtErrorMsg. If ptr is NULL, XtRealloc allocates the new storage without copying the old contents; that is, it simply calls XtMalloc.

The XtFree function returns storage and allows it to be reused. If ptr is NULL, XtFree returns immediately.

XtNew returns a pointer to the allocated storage. If there is insufficient memory to allocate the new block, XtNew calls XtErrorMsg. XtNew is a convenience macro that calls XtMalloc with the following arguments specified:

((type *) XtMalloc((unsigned) sizeof(type))

XtNewString returns a pointer to a new string which is a duplicate of string. If there is insufficient memory to allocate the new block, or the argument is NULL XtNewString returns NULL. The memory can be freed with XtFree.

The XtAsprintf function allocates space for a string large enough to hold the string specified by the sprintf(3c) format pattern when used with the remaining arguments, and fills it with the formatted results. The address of the allocated string is placed into the pointer passed as ret. The length of the string (not including the terminating null byte) is returned. If there is insufficient memory to allocate the new block, XtAsprintf calls XtErrorMsg.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1325 - Linux cli command XtRemoveWorkProc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtRemoveWorkProc and provides detailed information about the command XtRemoveWorkProc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtRemoveWorkProc.

NAME 🖥️ XtRemoveWorkProc 🖥️

Add and remove background processing procedures

SYNTAX

#include <X11/Intrinsic.h>

XtWorkProcId XtAppAddWorkProc(XtAppContext app_context, XtWorkProc proc, XtPointer client_data);

void XtRemoveWorkProc(XtWorkProcId id);

ARGUMENTS

app_context
Specifies the application context that identifies the application.

client_data
Specifies the argument that is to be passed to the specified procedure when it is called.

proc
Specifies the procedure that is to be called.

id
Specifies which work procedure to remove.

DESCRIPTION

The XtAppAddWorkProc function adds the specified work procedure for the application identified by app_context.

The XtRemoveWorkProc function explicitly removes the specified background work procedure.

SEE ALSO

XtAppNextEvent(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1326 - Linux cli command floor

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command floor and provides detailed information about the command floor, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the floor.

NAME 🖥️ floor 🖥️

largest integral value not greater than argument

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double floor(double x);
float floorf(float x);
long double floorl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

floorf(), floorl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the largest integral value that is not greater than x.

For example, floor(0.5) is 0.0, and floor(-0.5) is -1.0.

RETURN VALUE

These functions return the floor of x.

If x is integral, +0, -0, NaN, or an infinity, x itself is returned.

ERRORS

No errors occur. POSIX.1-2001 documents a range error for overflows, but see NOTES.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

floor(), floorf(), floorl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

SUSv2 and POSIX.1-2001 contain text about overflow (which might set errno to ERANGE, or raise an FE_OVERFLOW exception). In practice, the result cannot overflow on any current machine, so this error-handling stuff is just nonsense. (More precisely, overflow can happen only when the maximum value of the exponent is smaller than the number of mantissa bits. For the IEEE-754 standard 32-bit and 64-bit floating-point numbers the maximum value of the exponent is 127 (respectively, 1023), and the number of mantissa bits including the implicit bit is 24 (respectively, 53).)

SEE ALSO

ceil(3), lrint(3), nearbyint(3), rint(3), round(3), trunc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1327 - Linux cli command iconv_open

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command iconv_open and provides detailed information about the command iconv_open, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the iconv_open.

NAME 🖥️ iconv_open 🖥️

allocate descriptor for character set conversion

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <iconv.h>
iconv_t iconv_open(const char *tocode, const char *fromcode);

DESCRIPTION

The iconv_open() function allocates a conversion descriptor suitable for converting byte sequences from character encoding fromcode to character encoding tocode.

The values permitted for fromcode and tocode and the supported combinations are system-dependent. For the GNU C library, the permitted values are listed by the iconv –list command, and all combinations of the listed values are supported. Furthermore the GNU C library and the GNU libiconv library support the following two suffixes:

//TRANSLIT
When the string “//TRANSLIT” is appended to tocode, transliteration is activated. This means that when a character cannot be represented in the target character set, it can be approximated through one or several similarly looking characters.

//IGNORE
When the string “//IGNORE” is appended to tocode, characters that cannot be represented in the target character set will be silently discarded.

The resulting conversion descriptor can be used with iconv(3) any number of times. It remains valid until deallocated using iconv_close(3).

A conversion descriptor contains a conversion state. After creation using iconv_open(), the state is in the initial state. Using iconv(3) modifies the descriptor’s conversion state. To bring the state back to the initial state, use iconv(3) with NULL as inbuf argument.

RETURN VALUE

On success, iconv_open() returns a freshly allocated conversion descriptor. On failure, it returns (iconv_t) -1 and sets errno to indicate the error.

ERRORS

The following error can occur, among others:

EINVAL
The conversion from fromcode to tocode is not supported by the implementation.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

iconv_open()

Thread safetyMT-Safe locale

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.1. POSIX.1-2001, SUSv2.

SEE ALSO

iconv(1), iconv(3), iconv_close(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1328 - Linux cli command pcap_dump_filepcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_dump_filepcap and provides detailed information about the command pcap_dump_filepcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_dump_filepcap.

NAME 🖥️ pcap_dump_filepcap 🖥️

get the standard I/O stream for a savefile being written

SYNOPSIS

#include <pcap/pcap.h>
FILE *pcap_dump_file(pcap_dumper_t *p);

DESCRIPTION

pcap_dump_file() returns the standard I/O stream of the ``savefile’’ opened by pcap_dump_open(3PCAP).

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1329 - Linux cli command svcerr_decode

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command svcerr_decode and provides detailed information about the command svcerr_decode, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the svcerr_decode.

NAME 🖥️ svcerr_decode 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1330 - Linux cli command pthread_cond_destroy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_cond_destroy and provides detailed information about the command pthread_cond_destroy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_cond_destroy.

NAME 🖥️ pthread_cond_destroy 🖥️

operations on conditions

SYNOPSIS

#include <pthread.h>
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
int pthread_cond_init(pthread_cond_t *cond,
 pthread_condattr_t *cond_attr);
int pthread_cond_signal(pthread_cond_t *cond);
int pthread_cond_broadcast(pthread_cond_t *cond);
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
 const struct timespec *abstime);
int pthread_cond_destroy(pthread_cond_t *cond);

DESCRIPTION

A condition (short for ``condition variable’’) is a synchronization device that allows threads to suspend execution and relinquish the processors until some predicate on shared data is satisfied. The basic operations on conditions are: signal the condition (when the predicate becomes true), and wait for the condition, suspending the thread execution until another thread signals the condition.

A condition variable must always be associated with a mutex, to avoid the race condition where a thread prepares to wait on a condition variable and another thread signals the condition just before the first thread actually waits on it.

pthread_cond_init initializes the condition variable cond, using the condition attributes specified in cond_attr, or default attributes if cond_attr is NULL. The LinuxThreads implementation supports no attributes for conditions, hence the cond_attr parameter is actually ignored.

Variables of type pthread_cond_t can also be initialized statically, using the constant PTHREAD_COND_INITIALIZER.

pthread_cond_signal restarts one of the threads that are waiting on the condition variable cond. If no threads are waiting on cond, nothing happens. If several threads are waiting on cond, exactly one is restarted, but it is not specified which.

pthread_cond_broadcast restarts all the threads that are waiting on the condition variable cond. Nothing happens if no threads are waiting on cond.

pthread_cond_wait atomically unlocks the mutex (as per pthread_unlock_mutex) and waits for the condition variable cond to be signaled. The thread execution is suspended and does not consume any CPU time until the condition variable is signaled. The mutex must be locked by the calling thread on entrance to pthread_cond_wait. Before returning to the calling thread, pthread_cond_wait re-acquires mutex (as per pthread_lock_mutex).

Unlocking the mutex and suspending on the condition variable is done atomically. Thus, if all threads always acquire the mutex before signaling the condition, this guarantees that the condition cannot be signaled (and thus ignored) between the time a thread locks the mutex and the time it waits on the condition variable.

pthread_cond_timedwait atomically unlocks mutex and waits on cond, as pthread_cond_wait does, but it also bounds the duration of the wait. If cond has not been signaled within the amount of time specified by abstime, the mutex mutex is re-acquired and pthread_cond_timedwait returns the error ETIMEDOUT. The abstime parameter specifies an absolute time, with the same origin as time(2) and gettimeofday(2): an abstime of 0 corresponds to 00:00:00 GMT, January 1, 1970.

pthread_cond_destroy destroys a condition variable, freeing the resources it might hold. No threads must be waiting on the condition variable on entrance to pthread_cond_destroy. In the LinuxThreads implementation, no resources are associated with condition variables, thus pthread_cond_destroy actually does nothing except checking that the condition has no waiting threads.

CANCELLATION

pthread_cond_wait and pthread_cond_timedwait are cancelation points. If a thread is cancelled while suspended in one of these functions, the thread immediately resumes execution, then locks again the mutex argument to pthread_cond_wait and pthread_cond_timedwait, and finally executes the cancelation. Consequently, cleanup handlers are assured that mutex is locked when they are called.

ASYNC-SIGNAL SAFETY

The condition functions are not async-signal safe, and should not be called from a signal handler. In particular, calling pthread_cond_signal or pthread_cond_broadcast from a signal handler may deadlock the calling thread.

RETURN VALUE

All condition variable functions return 0 on success and a non-zero error code on error.

ERRORS

pthread_cond_init, pthread_cond_signal, pthread_cond_broadcast, and pthread_cond_wait never return an error code.

The pthread_cond_timedwait function returns the following error codes on error:

ETIMEDOUT
The condition variable was not signaled until the timeout specified by abstime.

EINTR
pthread_cond_timedwait was interrupted by a signal.

The pthread_cond_destroy function returns the following error code on error:

EBUSY
Some threads are currently waiting on cond.

SEE ALSO

pthread_condattr_init(3), pthread_mutex_lock(3), pthread_mutex_unlock(3), gettimeofday(2), nanosleep(2).

EXAMPLE

Consider two shared variables x and y, protected by the mutex mut, and a condition variable cond that is to be signaled whenever x becomes greater than y.

int x,y;
pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;

Waiting until x is greater than y is performed as follows:

pthread_mutex_lock(&mut);
while (x <= y) {
        pthread_cond_wait(&cond, &mut);
}
/* operate on x and y */
pthread_mutex_unlock(&mut);

Modifications on x and y that may cause x to become greater than y should signal the condition if needed:

pthread_mutex_lock(&mut);
/* modify x and y */
if (x > y) pthread_cond_broadcast(&cond);
pthread_mutex_unlock(&mut);

If it can be proved that at most one waiting thread needs to be waken up (for instance, if there are only two threads communicating through x and y), pthread_cond_signal can be used as a slightly more efficient alternative to pthread_cond_broadcast. In doubt, use pthread_cond_broadcast.

To wait for x to become greater than y with a timeout of 5 seconds, do:

struct timeval now;
struct timespec timeout;
int retcode;
pthread_mutex_lock(&mut);
gettimeofday(&now);
timeout.tv_sec = now.tv_sec + 5;
timeout.tv_nsec = now.tv_usec * 1000;
retcode = 0;
while (x <= y && retcode != ETIMEDOUT) {
        retcode = pthread_cond_timedwait(&cond, &mut, &timeout);
}
if (retcode == ETIMEDOUT) {
        /* timeout occurred */
} else {
        /* operate on x and y */
}
pthread_mutex_unlock(&mut);
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1331 - Linux cli command XML_DOM_DocumentTypepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_DOM_DocumentTypepm and provides detailed information about the command XML_DOM_DocumentTypepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_DOM_DocumentTypepm.

NAME 🖥️ XML_DOM_DocumentTypepm 🖥️

An XML document type (DTD) in XML::DOM

DESCRIPTION

XML::DOM::DocumentType extends XML::DOM::Node.

Each Document has a doctype attribute whose value is either null or a DocumentType object. The DocumentType interface in the DOM Level 1 Core provides an interface to the list of entities that are defined for the document, and little else because the effect of namespaces and the various XML scheme efforts on DTD representation are not clearly understood as of this writing. The DOM Level 1 doesn’t support editing DocumentType nodes.

Not In DOM Spec: This implementation has added a lot of extra functionality to the DOM Level 1 interface. To allow editing of the DocumentType nodes, see XML::DOM::ignoreReadOnly.

METHODS

getName
Returns the name of the DTD, i.e. the name immediately following the DOCTYPE keyword.

getEntities
A NamedNodeMap containing the general entities, both external and internal, declared in the DTD. Duplicates are discarded. For example in: <!DOCTYPE ex SYSTEM “ex.dtd” [ <!ENTITY foo “foo”> <!ENTITY bar “bar”> <!ENTITY % baz “baz”> ]> <ex/> the interface provides access to foo and bar but not baz. Every node in this map also implements the Entity interface. The DOM Level 1 does not support editing entities, therefore entities cannot be altered in any way. Not In DOM Spec: See XML::DOM::ignoreReadOnly to edit the DocumentType etc.

getNotations
A NamedNodeMap containing the notations declared in the DTD. Duplicates are discarded. Every node in this map also implements the Notation interface. The DOM Level 1 does not support editing notations, therefore notations cannot be altered in any way. Not In DOM Spec: See XML::DOM::ignoreReadOnly to edit the DocumentType etc.

Additional methods not in the DOM Spec

Creating and setting the DocumentType
A new DocumentType can be created with: $doctype = $doc->createDocumentType ($name, $sysId, $pubId, $internal); To set (or replace) the DocumentType for a particular document, use: $doc->setDocType ($doctype);

getSysId and setSysId (sysId)
Returns or sets the system id.

getPubId and setPubId (pudId)
Returns or sets the public id.

setName (name)
Sets the name of the DTD, i.e. the name immediately following the DOCTYPE keyword. Note that this should always be the same as the element tag name of the root element.

getAttlistDecl (elemName)
Returns the AttlistDecl for the Element with the specified name, or undef.

getElementDecl (elemName)
Returns the ElementDecl for the Element with the specified name, or undef.

getEntity (entityName)
Returns the Entity with the specified name, or undef.

addAttlistDecl (elemName)
Adds a new AttDecl node with the specified elemName if one doesn’t exist yet. Returns the AttlistDecl (new or existing) node.

addElementDecl (elemName, model)
Adds a new ElementDecl node with the specified elemName and model if one doesn’t exist yet. Returns the AttlistDecl (new or existing) node. The model is ignored if one already existed.

addEntity (notationName, value, sysId, pubId, ndata, parameter)
Adds a new Entity node. Don’t use createEntity and appendChild, because it should be added to the internal NamedNodeMap containing the entities. Parameters: notationName the entity name. value the entity value. sysId the system id (if any.) pubId the public id (if any.) ndata the NDATA declaration (if any, for general unparsed entities.) parameter whether it is a parameter entity (%ent;) or not (&ent;). SysId, pubId and ndata may be undefined. DOMExceptions:

  • INVALID_CHARACTER_ERR Raised if the notationName does not conform to the XML spec.

addNotation (name, base, sysId, pubId)
Adds a new Notation object. Parameters: name the notation name. base the base to be used for resolving a relative URI. sysId the system id. pubId the public id. Base, sysId, and pubId may all be undefined. (These parameters are passed by the XML::Parser Notation handler.) DOMExceptions:

  • INVALID_CHARACTER_ERR Raised if the notationName does not conform to the XML spec.

addAttDef (elemName, attrName, type, default, fixed)
Adds a new attribute definition. It will add the AttDef node to the AttlistDecl if it exists. If an AttDef with the specified attrName already exists for the given elemName, this function only generates a warning. See XML::DOM::AttDef::new for the other parameters.

getDefaultAttrValue (elem, attr)
Returns the default attribute value as a string or undef, if none is available. Parameters: elem The element tagName. attr The attribute name.

expandEntity (entity [, parameter])
Expands the specified entity or parameter entity (if parameter=1) and returns its value as a string, or undef if the entity does not exist. (The entity name should not contain the ‘%’, ‘&’ or ‘;’ delimiters.)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1332 - Linux cli command HTML_Form_Inputpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_Form_Inputpm and provides detailed information about the command HTML_Form_Inputpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_Form_Inputpm.

NAME 🖥️ HTML_Form_Inputpm 🖥️

A generic HTML form input element for use with HTML::Form

VERSION

version 6.11

AUTHOR

Gisle Aas <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 1998 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1333 - Linux cli command inet_ntoa

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command inet_ntoa and provides detailed information about the command inet_ntoa, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the inet_ntoa.

NAME 🖥️ inet_ntoa 🖥️

Internet address manipulation routines

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
int inet_aton(const char *cp, struct in_addr *inp);
in_addr_t inet_addr(const char *cp);
in_addr_t inet_network(const char *cp);
[[deprecated]] char *inet_ntoa(struct in_addr in);
[[deprecated]] struct in_addr inet_makeaddr(in_addr_t net,
 in_addr_t host);
[[deprecated]] in_addr_t inet_lnaof(struct in_addr in);
[[deprecated]] in_addr_t inet_netof(struct in_addr in);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

inet_aton(), inet_ntoa():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    In glibc up to and including 2.19:
        _BSD_SOURCE || _BSD_SOURCE

DESCRIPTION

inet_aton() converts the Internet host address cp from the IPv4 numbers-and-dots notation into binary form (in network byte order) and stores it in the structure that inp points to. inet_aton() returns nonzero if the address is valid, zero if not. The address supplied in cp can have one of the following forms:

a.b.c.d
Each of the four numeric parts specifies a byte of the address; the bytes are assigned in left-to-right order to produce the binary address.

a.b.c
Parts a and b specify the first two bytes of the binary address. Part c is interpreted as a 16-bit value that defines the rightmost two bytes of the binary address. This notation is suitable for specifying (outmoded) Class B network addresses.

a.b
Part a specifies the first byte of the binary address. Part b is interpreted as a 24-bit value that defines the rightmost three bytes of the binary address. This notation is suitable for specifying (outmoded) Class A network addresses.

a
The value a is interpreted as a 32-bit value that is stored directly into the binary address without any byte rearrangement.

In all of the above forms, components of the dotted address can be specified in decimal, octal (with a leading 0), or hexadecimal, with a leading 0X). Addresses in any of these forms are collectively termed IPV4 numbers-and-dots notation. The form that uses exactly four decimal numbers is referred to as IPv4 dotted-decimal notation (or sometimes: IPv4 dotted-quad notation).

inet_aton() returns 1 if the supplied string was successfully interpreted, or 0 if the string is invalid (errno is not set on error).

The inet_addr() function converts the Internet host address cp from IPv4 numbers-and-dots notation into binary data in network byte order. If the input is invalid, INADDR_NONE (usually -1) is returned. Use of this function is problematic because -1 is a valid address (255.255.255.255). Avoid its use in favor of inet_aton(), inet_pton(3), or getaddrinfo(3), which provide a cleaner way to indicate error return.

The inet_network() function converts cp, a string in IPv4 numbers-and-dots notation, into a number in host byte order suitable for use as an Internet network address. On success, the converted address is returned. If the input is invalid, -1 is returned.

The inet_ntoa() function converts the Internet host address in, given in network byte order, to a string in IPv4 dotted-decimal notation. The string is returned in a statically allocated buffer, which subsequent calls will overwrite.

The inet_lnaof() function returns the local network address part of the Internet address in. The returned value is in host byte order.

The inet_netof() function returns the network number part of the Internet address in. The returned value is in host byte order.

The inet_makeaddr() function is the converse of inet_netof() and inet_lnaof(). It returns an Internet host address in network byte order, created by combining the network number net with the local address host, both in host byte order.

The structure in_addr as used in inet_ntoa(), inet_makeaddr(), inet_lnaof(), and inet_netof() is defined in <netinet/in.h> as:

typedef uint32_t in_addr_t;
struct in_addr {
    in_addr_t s_addr;
};

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

inet_aton(), inet_addr(), inet_network(), inet_ntoa()

Thread safetyMT-Safe locale

inet_makeaddr(), inet_lnaof(), inet_netof()

Thread safetyMT-Safe

STANDARDS

inet_addr()
inet_ntoa()
POSIX.1-2008.

inet_aton()
None.

STANDARDS

inet_addr()
inet_ntoa()
POSIX.1-2001, 4.3BSD.

inet_lnaof(), inet_netof(), and inet_makeaddr() are legacy functions that assume they are dealing with classful network addresses. Classful networking divides IPv4 network addresses into host and network components at byte boundaries, as follows:

Class A
This address type is indicated by the value 0 in the most significant bit of the (network byte ordered) address. The network address is contained in the most significant byte, and the host address occupies the remaining three bytes.

Class B
This address type is indicated by the binary value 10 in the most significant two bits of the address. The network address is contained in the two most significant bytes, and the host address occupies the remaining two bytes.

Class C
This address type is indicated by the binary value 110 in the most significant three bits of the address. The network address is contained in the three most significant bytes, and the host address occupies the remaining byte.

Classful network addresses are now obsolete, having been superseded by Classless Inter-Domain Routing (CIDR), which divides addresses into network and host components at arbitrary bit (rather than byte) boundaries.

NOTES

On x86 architectures, the host byte order is Least Significant Byte first (little endian), whereas the network byte order, as used on the Internet, is Most Significant Byte first (big endian).

EXAMPLES

An example of the use of inet_aton() and inet_ntoa() is shown below. Here are some example runs:

$ ./a.out 226.000.000.037 # Last byte is in octal
226.0.0.31
$ ./a.out 0x7f.1  # First byte is in hex
127.0.0.1

Program source

#define _DEFAULT_SOURCE
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
    struct in_addr addr;
    if (argc != 2) {
        fprintf(stderr, "%s <dotted-address>

“, argv[0]); exit(EXIT_FAILURE); } if (inet_aton(argv[1], &addr) == 0) { fprintf(stderr, “Invalid address “); exit(EXIT_FAILURE); } printf("%s “, inet_ntoa(addr)); exit(EXIT_SUCCESS); }

SEE ALSO

byteorder(3), getaddrinfo(3), gethostbyname(3), getnameinfo(3), getnetent(3), inet_net_pton(3), inet_ntop(3), inet_pton(3), hosts(5), networks(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1334 - Linux cli command XtCallbackPopdown

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtCallbackPopdown and provides detailed information about the command XtCallbackPopdown, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtCallbackPopdown.

NAME 🖥️ XtCallbackPopdown 🖥️

unmap a pop-up

SYNTAX

#include <X11/Intrinsic.h>

void XtPopdown(Widget popup_shell);

void XtCallbackPopdown(Widget w, XtPointer client_data, XtPointer call_data);

ACTIONS

void XtMenuPopdown(String shell_name);

ARGUMENTS

call_data
Specifies the callback data, which is not used by this procedure.

client_data
Specifies a pointer to the XtPopdownID structure.

popup_shell
Specifies the widget shell to pop down.

shell_name
Specifies the name of the widget shell to pop down.

  1. Specifies the widget.

DESCRIPTION

The XtPopdown function performs the following:

  • Calls XtCheckSubclass to ensure popup_shell is a subclass of Shell.

  • Checks that popup_shell is currently popped_up; otherwise, it generates an error.

  • Unmaps popup_shell’s window.

  • If popup_shell’s grab_kind is either XtGrabNonexclusive or XtGrabExclusive, it calls XtRemoveGrab.

  • Sets pop-up shell’s popped_up field to False.

  • Calls the callback procedures on the shell’s popdown_callback list.

The XtCallbackPopdown function casts the client data parameter to an XtPopdownID pointer:

typedef struct { Widget shell_widget; Widget enable_widget; } XtPopdownIDRec, *XtPopdownID;

The shell_widget is the pop-up shell to pop down, and the enable_widget is the widget that was used to pop it up.

XtCallbackPopdown calls XtPopdown with the specified shell_widget and then calls XtSetSensitive to resensitize the enable_widget.

If a shell name is not given, XtMenuPopdown calls XtPopdown with the widget for which the translation is specified. If a shell_name is specified in the translation table, XtMenuPopdown tries to find the shell by looking up the widget tree starting at the parent of the widget in which it is invoked. If it finds a shell with the specified name in the pop-up children of that parent, it pops down the shell; otherwise, it moves up the parent chain as needed. If XtMenuPopdown gets to the application top-level shell widget and cannot find a matching shell, it generates an error.

SEE ALSO

XtCreatePopupShell(3), XtPopup(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1335 - Linux cli command fts

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fts and provides detailed information about the command fts, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fts.

NAME 🖥️ fts 🖥️

traverse a file hierarchy

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <sys/stat.h>
#include <fts.h>
FTS *fts_open(char *const *path_argv, int options,
 int (*_Nullable compar)(const FTSENT **, const FTSENT **));
FTSENT *fts_read(FTS *ftsp);
FTSENT *fts_children(FTS *ftsp, int instr);
int fts_set(FTS *ftsp, FTSENT *f, int instr);
int fts_close(FTS *ftsp);

DESCRIPTION

The fts functions are provided for traversing file hierarchies. A simple overview is that the fts_open() function returns a “handle” (of type FTS *) that refers to a file hierarchy “stream”. This handle is then supplied to the other fts functions. The function fts_read() returns a pointer to a structure describing one of the files in the file hierarchy. The function fts_children() returns a pointer to a linked list of structures, each of which describes one of the files contained in a directory in the hierarchy.

In general, directories are visited two distinguishable times; in preorder (before any of their descendants are visited) and in postorder (after all of their descendants have been visited). Files are visited once. It is possible to walk the hierarchy “logically” (visiting the files that symbolic links point to) or physically (visiting the symbolic links themselves), order the walk of the hierarchy or prune and/or revisit portions of the hierarchy.

Two structures (and associated types) are defined in the include file <fts.h>. The first type is FTS, the structure that represents the file hierarchy itself. The second type is FTSENT, the structure that represents a file in the file hierarchy. Normally, an FTSENT structure is returned for every file in the file hierarchy. In this manual page, “file” and “FTSENT structure” are generally interchangeable.

The FTSENT structure contains fields describing a file. The structure contains at least the following fields (there are additional fields that should be considered private to the implementation):

typedef struct _ftsent {
    unsigned short  fts_info;     /* flags for FTSENT structure */
    char           *fts_accpath;  /* access path */
    char           *fts_path;     /* root path */
    short           fts_pathlen;  /* strlen(fts_path) +
                                     strlen(fts_name) */
    char           *fts_name;     /* filename */
    short           fts_namelen;  /* strlen(fts_name) */
    short           fts_level;    /* depth (-1 to N) */
    int             fts_errno;    /* file errno */
    long            fts_number;   /* local numeric value */
    void           *fts_pointer;  /* local address value */
    struct _ftsent *fts_parent;   /* parent directory */
    struct _ftsent *fts_link;     /* next file structure */
    struct _ftsent *fts_cycle;    /* cycle structure */
    struct stat    *fts_statp;    /* [l]stat(2) information */
} FTSENT;

These fields are defined as follows:

fts_info
One of the following values describing the returned FTSENT structure and the file it represents. With the exception of directories without errors (FTS_D), all of these entries are terminal, that is, they will not be revisited, nor will any of their descendants be visited.

FTS_D
A directory being visited in preorder.

FTS_DC
A directory that causes a cycle in the tree. (The fts_cycle field of the FTSENT structure will be filled in as well.)

FTS_DEFAULT
Any FTSENT structure that represents a file type not explicitly described by one of the other fts_info values.

FTS_DNR
A directory which cannot be read. This is an error return, and the fts_errno field will be set to indicate what caused the error.

FTS_DOT
A file named “.” or “..” which was not specified as a filename to fts_open() (see FTS_SEEDOT).

FTS_DP
A directory being visited in postorder. The contents of the FTSENT structure will be unchanged from when it was returned in preorder, that is, with the fts_info field set to FTS_D.

FTS_ERR
This is an error return, and the fts_errno field will be set to indicate what caused the error.

FTS_F
A regular file.

FTS_NS
A file for which no [l] stat(2) information was available. The contents of the fts_statp field are undefined. This is an error return, and the fts_errno field will be set to indicate what caused the error.

FTS_NSOK
A file for which no [l] stat(2) information was requested. The contents of the fts_statp field are undefined.

FTS_SL
A symbolic link.

FTS_SLNONE
A symbolic link with a nonexistent target. The contents of the fts_statp field reference the file characteristic information for the symbolic link itself.

fts_accpath
A path for accessing the file from the current directory.

fts_path
The path for the file relative to the root of the traversal. This path contains the path specified to fts_open() as a prefix.

fts_pathlen
The sum of the lengths of the strings referenced by fts_path and fts_name.

fts_name
The name of the file.

fts_namelen
The length of the string referenced by fts_name.

fts_level
The depth of the traversal, numbered from -1 to N, where this file was found. The FTSENT structure representing the parent of the starting point (or root) of the traversal is numbered -1, and the FTSENT structure for the root itself is numbered 0.

fts_errno
If fts_children() or fts_read() returns an FTSENT structure whose fts_info field is set to FTS_DNR, FTS_ERR, or FTS_NS, the fts_errno field contains the error number (i.e., the errno value) specifying the cause of the error. Otherwise, the contents of the fts_errno field are undefined.

fts_number
This field is provided for the use of the application program and is not modified by the fts functions. It is initialized to 0.

fts_pointer
This field is provided for the use of the application program and is not modified by the fts functions. It is initialized to NULL.

fts_parent
A pointer to the FTSENT structure referencing the file in the hierarchy immediately above the current file, that is, the directory of which this file is a member. A parent structure for the initial entry point is provided as well, however, only the fts_level, fts_number, and fts_pointer fields are guaranteed to be initialized.

fts_link
Upon return from the fts_children() function, the fts_link field points to the next structure in the NULL-terminated linked list of directory members. Otherwise, the contents of the fts_link field are undefined.

fts_cycle
If a directory causes a cycle in the hierarchy (see FTS_DC), either because of a hard link between two directories, or a symbolic link pointing to a directory, the fts_cycle field of the structure will point to the FTSENT structure in the hierarchy that references the same file as the current FTSENT structure. Otherwise, the contents of the fts_cycle field are undefined.

fts_statp
A pointer to [l] stat(2) information for the file.

A single buffer is used for all of the paths of all of the files in the file hierarchy. Therefore, the fts_path and fts_accpath fields are guaranteed to be null-terminated only for the file most recently returned by fts_read(). To use these fields to reference any files represented by other FTSENT structures will require that the path buffer be modified using the information contained in that FTSENT structure’s fts_pathlen field. Any such modifications should be undone before further calls to fts_read() are attempted. The fts_name field is always null-terminated.

fts_open()

The fts_open() function takes a pointer to an array of character pointers naming one or more paths which make up a logical file hierarchy to be traversed. The array must be terminated by a null pointer.

There are a number of options, at least one of which (either FTS_LOGICAL or FTS_PHYSICAL) must be specified. The options are selected by ORing the following values:

FTS_LOGICAL
This option causes the fts routines to return FTSENT structures for the targets of symbolic links instead of the symbolic links themselves. If this option is set, the only symbolic links for which FTSENT structures are returned to the application are those referencing nonexistent files: the fts_statp field is obtained via stat(2) with a fallback to lstat(2).

FTS_PHYSICAL
This option causes the fts routines to return FTSENT structures for symbolic links themselves instead of the target files they point to. If this option is set, FTSENT structures for all symbolic links in the hierarchy are returned to the application: the fts_statp field is obtained via lstat(2).

FTS_COMFOLLOW
This option causes any symbolic link specified as a root path to be followed immediately, as if via FTS_LOGICAL, regardless of the primary mode.

FTS_NOCHDIR
As a performance optimization, the fts functions change directories as they walk the file hierarchy. This has the side-effect that an application cannot rely on being in any particular directory during the traversal. This option turns off this optimization, and the fts functions will not change the current directory. Note that applications should not themselves change their current directory and try to access files unless FTS_NOCHDIR is specified and absolute pathnames were provided as arguments to fts_open().

FTS_NOSTAT
By default, returned FTSENT structures reference file characteristic information (the fts_statp field) for each file visited. This option relaxes that requirement as a performance optimization, allowing the fts functions to set the fts_info field to FTS_NSOK and leave the contents of the fts_statp field undefined.

FTS_SEEDOT
By default, unless they are specified as path arguments to fts_open(), any files named “.” or “..” encountered in the file hierarchy are ignored. This option causes the fts routines to return FTSENT structures for them.

FTS_XDEV
This option prevents fts from descending into directories that have a different device number than the file from which the descent began.

The argument compar() specifies a user-defined function which may be used to order the traversal of the hierarchy. It takes two pointers to pointers to FTSENT structures as arguments and should return a negative value, zero, or a positive value to indicate if the file referenced by its first argument comes before, in any order with respect to, or after, the file referenced by its second argument. The fts_accpath, fts_path, and fts_pathlen fields of the FTSENT structures may never be used in this comparison. If the fts_info field is set to FTS_NS or FTS_NSOK, the fts_statp field may not either. If the compar() argument is NULL, the directory traversal order is in the order listed in path_argv for the root paths, and in the order listed in the directory for everything else.

fts_read()

The fts_read() function returns a pointer to an FTSENT structure describing a file in the hierarchy. Directories (that are readable and do not cause cycles) are visited at least twice, once in preorder and once in postorder. All other files are visited at least once. (Hard links between directories that do not cause cycles or symbolic links to symbolic links may cause files to be visited more than once, or directories more than twice.)

If all the members of the hierarchy have been returned, fts_read() returns NULL and sets errno to 0. If an error unrelated to a file in the hierarchy occurs, fts_read() returns NULL and sets errno to indicate the error. If an error related to a returned file occurs, a pointer to an FTSENT structure is returned, and errno may or may not have been set (see fts_info).

The FTSENT structures returned by fts_read() may be overwritten after a call to fts_close() on the same file hierarchy stream, or, after a call to fts_read() on the same file hierarchy stream unless they represent a file of type directory, in which case they will not be overwritten until after a call to fts_read() after the FTSENT structure has been returned by the function fts_read() in postorder.

fts_children()

The fts_children() function returns a pointer to an FTSENT structure describing the first entry in a NULL-terminated linked list of the files in the directory represented by the FTSENT structure most recently returned by fts_read(). The list is linked through the fts_link field of the FTSENT structure, and is ordered by the user-specified comparison function, if any. Repeated calls to fts_children() will re-create this linked list.

As a special case, if fts_read() has not yet been called for a hierarchy, fts_children() will return a pointer to the files in the logical directory specified to fts_open(), that is, the arguments specified to fts_open(). Otherwise, if the FTSENT structure most recently returned by fts_read() is not a directory being visited in preorder, or the directory does not contain any files, fts_children() returns NULL and sets errno to zero. If an error occurs, fts_children() returns NULL and sets errno to indicate the error.

The FTSENT structures returned by fts_children() may be overwritten after a call to fts_children(), fts_close(), or fts_read() on the same file hierarchy stream.

The instr argument is either zero or the following value:

FTS_NAMEONLY
Only the names of the files are needed. The contents of all the fields in the returned linked list of structures are undefined with the exception of the fts_name and fts_namelen fields.

fts_set()

The function fts_set() allows the user application to determine further processing for the file f of the stream ftsp. The fts_set() function returns 0 on success, and -1 if an error occurs.

The instr argument is either 0 (meaning “do nothing”) or one of the following values:

FTS_AGAIN
Revisit the file; any file type may be revisited. The next call to fts_read() will return the referenced file. The fts_stat and fts_info fields of the structure will be reinitialized at that time, but no other fields will have been changed. This option is meaningful only for the most recently returned file from fts_read(). Normal use is for postorder directory visits, where it causes the directory to be revisited (in both preorder and postorder) as well as all of its descendants.

FTS_FOLLOW
The referenced file must be a symbolic link. If the referenced file is the one most recently returned by fts_read(), the next call to fts_read() returns the file with the fts_info and fts_statp fields reinitialized to reflect the target of the symbolic link instead of the symbolic link itself. If the file is one of those most recently returned by fts_children(), the fts_info and fts_statp fields of the structure, when returned by fts_read(), will reflect the target of the symbolic link instead of the symbolic link itself. In either case, if the target of the symbolic link does not exist, the fields of the returned structure will be unchanged and the fts_info field will be set to FTS_SLNONE.

If the target of the link is a directory, the preorder return, followed by the return of all of its descendants, followed by a postorder return, is done.

FTS_SKIP
No descendants of this file are visited. The file may be one of those most recently returned by either fts_children() or fts_read().

fts_close()

The fts_close() function closes the file hierarchy stream referred to by ftsp and restores the current directory to the directory from which fts_open() was called to open ftsp. The fts_close() function returns 0 on success, and -1 if an error occurs.

ERRORS

The function fts_open() may fail and set errno for any of the errors specified for open(2) and malloc(3).

In addition, fts_open() may fail and set errno as follows:

ENOENT
Any element of path_argv was an empty string.

The function fts_close() may fail and set errno for any of the errors specified for chdir(2) and close(2).

The functions fts_read() and fts_children() may fail and set errno for any of the errors specified for chdir(2), malloc(3), opendir(3), readdir(3), and [l] stat(2).

In addition, fts_children(), fts_open(), and fts_set() may fail and set errno as follows:

EINVAL
options or instr was invalid.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fts_open(), fts_set(), fts_close()

Thread safetyMT-Safe

fts_read(), fts_children()

Thread safetyMT-Unsafe

STANDARDS

None.

HISTORY

glibc 2. 4.4BSD.

BUGS

Before glibc 2.23, all of the APIs described in this man page are not safe when compiling a program using the LFS APIs (e.g., when compiling with -D_FILE_OFFSET_BITS=64).

SEE ALSO

find(1), chdir(2), lstat(2), stat(2), ftw(3), qsort(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1336 - Linux cli command tanhl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tanhl and provides detailed information about the command tanhl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tanhl.

NAME 🖥️ tanhl 🖥️

hyperbolic tangent function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double tanh(double x);
float tanhf(float x);
long double tanhl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

tanhf(), tanhl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the hyperbolic tangent of x, which is defined mathematically as:

    tanh(x) = sinh(x) / cosh(x)

RETURN VALUE

On success, these functions return the hyperbolic tangent of x.

If x is a NaN, a NaN is returned.

If x is +0 (-0), +0 (-0) is returned.

If x is positive infinity (negative infinity), +1 (-1) is returned.

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tanh(), tanhf(), tanhl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

SEE ALSO

acosh(3), asinh(3), atanh(3), cosh(3), ctanh(3), sinh(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1337 - Linux cli command Tk_Menu_Itempm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Menu_Itempm and provides detailed information about the command Tk_Menu_Itempm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Menu_Itempm.

NAME 🖥️ Tk_Menu_Itempm 🖥️

Base class for Menu items

SYNOPSIS

require Tk::Menu::Item; my $but = $menu->Button(…); $but->configure(…); my $what = $but->cget(); package Whatever; require Tk::Menu::Item; @ISA = qw(Tk::Menu::Item); sub PreInit { my ($class,$menu,$info) = @_; $info->{-xxxxx} = … my $y = delete $info->{-yyyy}; }

DESCRIPTION

Tk::Menu::Item is the base class from which Tk::Menu::Button, Tk::Menu::Cascade, Tk::Menu::Radiobutton and Tk::Menu::Checkbutton are derived. There is also a Tk::Menu::Separator.

Constructors are declared so that $menu->Button(…) etc. do what you would expect.

The -label option is pre-processed allowing ~ to be prefixed to the character to derive a -underline value. Thus

$menu->Button(-label => Goto ~Home,…) is equivalent to $menu->Button(-label => Goto Home, -underline => 6, …)

The Cascade menu item creates a sub-menu and accepts these options:

-menuitems
A list of items for the sub-menu. Within this list (which is also accepted by Menu and Menubutton) the first two elements of each item should be the “constructor” name and the label: -menuitems => [ [Button => ~Quit, -command => [destroy => $mw]], [Checkbutton => ~Oil, -variable => \oil], ]

-postcommand
A callback to be invoked before posting the menu.

-tearoff
Specifies whether sub-menu can be torn-off or not.

-menuvar
Scalar reference that will be set to the newly-created sub-menu.

The returned object is currently a blessed reference to an array of two items: the containing Menu and the ’label’. Methods configure and cget are mapped onto underlying entryconfigure and entrycget.

The main purpose of the OO interface is to allow derived item classes to be defined which pre-set the options used to create a more basic item.

BUGS

This OO interface is very new. Using the label as the “key” is a problem for separaror items which don’t have one. The alternative would be to use an index into the menu but that is a problem if items are deleted (or inserted other than at the end).

There should probably be a PostInit entry point too, or a more widget like defered ‘configure’.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1338 - Linux cli command Net_Whois_IPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Whois_IPpm and provides detailed information about the command Net_Whois_IPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Whois_IPpm.

NAME 🖥️ Net_Whois_IPpm 🖥️

Perl extension for looking up the whois information for ip addresses

SYNOPSIS

use Net::Whois::IP qw(whoisip_query); my $ip = “192.168.1.1”; #Response will be a reference to a hash containing all information #provided by the whois registrar #The array_of_responses is a reference to an array containing references #to hashes containing each level of query done. For example, #many records have to be searched several times to #get to the correct information, this array contains the responses #from each level my ($response,$array_of_responses) = whoisip_query($ip,$optional_multiple_flag,$optional_raw_flag,$option_array_of_search_options); #if $optional_multiple_flag is not null, all possible responses for a give record will be returned #for example, normally only the last instance of Tech phone will be give if record #contains more than one, however, setting this flag to a not null will return both is an array. #The other consequence, is that all records returned become references to an array and must be #dereferenced to utilize #if $optional_raw_flag is not null, response will be a reference to an array containing the raw #response from the registrar instead of a reference to a hash. #If $option_array_of_search_options is not null, the first two entries will be used to replace #TechPhone and OrgTechPhone is the search method. This is fairly dangerous, and can #cause the module not to work at all if set incorrectly

#Normal unwrap of $response ($optional_multiple_flag not set) my $response = whoisip_query($ip); foreach (sort keys(%{$response}) ) { print $_ $response->{$_} ; }

#$optional_multiple_flag set to a value my $response = whoisip_query( $ip,true); foreach ( sort keys %$response ){ print $_ is ; foreach ( @{ $response->{ $_ } } ) { print $_ ; } }

#$optional_raw_flag set to a value my $response = whoisip_query( $ip,",true"); foreach (@{$response}) { print $_; }

#$optonal_array_of_search_options set but not $optional_multiple_flag or $optional_raw_flag my $search_options = [NetName,OrgName]; my $response = whois_query($ip,",,$search_options); foreach (sort keys(%{$response}) ) { print $_ $response->{$_} “; }

DESCRIPTION

Perl module to allow whois lookup of ip addresses. This module should recursively query the various whois providers until it gets the more detailed information including either TechPhone or OrgTechPhone by default; however, this is overrideable.

AUTHOR

Ben Schmitz Ω- [email protected]

Thanks to Orbitz for allowing the community access to this work

Please email me any suggestions, complaints, etc.

SEE ALSO

perl (1). Net::Whois

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1339 - Linux cli command STAILQ_INIT

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command STAILQ_INIT and provides detailed information about the command STAILQ_INIT, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the STAILQ_INIT.

NAME 🖥️ STAILQ_INIT 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1340 - Linux cli command Net_Server_Proto_SSLEAYpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Server_Proto_SSLEAYpm and provides detailed information about the command Net_Server_Proto_SSLEAYpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Server_Proto_SSLEAYpm.

NAME 🖥️ Net_Server_Proto_SSLEAYpm 🖥️

Custom Net::Server SSL protocol handler based on Net::SSLeay.

SYNOPSIS

See Net::Server::Proto.

use base qw(Net::Server::HTTP); main->run( proto => ssleay, SSL_key_file => “/path/to/my/file.key”, SSL_cert_file => “/path/to/my/file.crt”, ); # OR sub SSL_key_file { “/path/to/my/file.key” } sub SSL_cert_file { “/path/to/my/file.crt” } main->run(proto => ssleay); # OR main->run( port => [443, 8443, “80/tcp”], # bind to two ssleay ports and one tcp proto => “ssleay”, # use ssleay as the default ipv => “*”, # bind both IPv4 and IPv6 interfaces SSL_key_file => “/path/to/my/file.key”, SSL_cert_file => “/path/to/my/file.crt”, ); # OR main->run(port => [{ port => “443”, proto => “ssleay”, # ipv => 4, # default - only do IPv4 SSL_key_file => “/path/to/my/file.key”, SSL_cert_file => “/path/to/my/file.crt”, }, { port => “8443”, proto => “ssleay”, ipv => “*”, # IPv4 and IPv6 SSL_key_file => “/path/to/my/file2.key”, # separate key SSL_cert_file => “/path/to/my/file2.crt”, # separate cert }]);

DESCRIPTION

This module has reliably been used in situations receiving millions of hits on a single box per day. If anybody has any successes or ideas for improvement under SSLEAY, please email <[email protected]>.

Protocol module for Net::Server. This module implements a secure socket layer over tcp (also known as SSL). See Net::Server::Proto.

If you need more customization of the SSL layer, you may want to investigate using SSL rather than SSLEAY as it uses the venerable(ish) IO::Socket::SSL.

PARAMETERS

Currently there is support for the following:

“SSL_cert_file”
Full path to the certificate file to be used for this server. Should be in PEM format.

“SSL_key_file”
Full path to the key file to be used for this server. Should be in PEM format.

“SSL_max_getline_length”
Used during getline to only read until this many bytes are found. Default is undef which means unlimited.

“SSL_error_callback”
Should be a code ref that will be called whenever error conditions are encountered. It passes a source message and an arrayref of the errors.

METHODS

This module implements most of the common file handle operations. There are some additions though:

“read_until”
Takes bytes and match qr. If bytes is defined - it will read until that many bytes are found. If match qr is defined, it will read until the buffer matches that qr. If both are undefined, it will read until there is nothing left to read.

“error”
If an error occurred while writing, this method will return that error.

BUGS

There are probably many.

LICENCE

Distributed under the same terms as Net::Server

THANKS

Thanks to Bilbo at http://devpit.org/wiki/OpenSSL_with_nonblocking_sockets_%28in_Perl%29 for documenting a more reliable way of accepting and reading SSL connections.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1341 - Linux cli command pcap_getnonblockpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_getnonblockpcap and provides detailed information about the command pcap_getnonblockpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_getnonblockpcap.

NAME 🖥️ pcap_getnonblockpcap 🖥️

set or get the state of non-blocking mode on a capture device

SYNOPSIS

#include <pcap/pcap.h>
char errbuf[PCAP_ERRBUF_SIZE];
int pcap_setnonblock(pcap_t *p, int nonblock, char *errbuf);
int pcap_getnonblock(pcap_t *p, char *errbuf);

DESCRIPTION

pcap_setnonblock() puts a capture handle into ``non-blocking’’ mode, or takes it out of ``non-blocking’’ mode, depending on whether the nonblock argument is non-zero or zero. It has no effect on ``savefiles’’. If there is an error, PCAP_ERROR is returned and errbuf is filled in with an appropriate error message; otherwise, 0 is returned.

In ``non-blocking’’ mode, an attempt to read from the capture descriptor with pcap_dispatch(3PCAP) and pcap_next_ex(3PCAP) will, if no packets are currently available to be read, return 0 immediately rather than blocking waiting for packets to arrive.

pcap_loop(3PCAP) will loop forever, consuming CPU time when no packets are currently available; pcap_dispatch() should be used instead. pcap_next(3PCAP) will return NULL if there are no packets currently available to read; this is indistinguishable from an error, so pcap_next_ex() should be used instead.

When first activated with pcap_activate(3PCAP) or opened with pcap_open_live(3PCAP), a capture handle is not in ``non-blocking mode’’; a call to pcap_setnonblock() is required in order to put it into ``non-blocking’’ mode.

RETURN VALUE

pcap_getnonblock() returns the current ``non-blocking’’ state of the capture descriptor; it always returns 0 on ``savefiles’’. If called on a capture handle that has been created but not activated, PCAP_ERROR_NOT_ACTIVATED is returned. If there is another error, PCAP_ERROR is returned and errbuf is filled in with an appropriate error message.

errbuf is assumed to be able to hold at least PCAP_ERRBUF_SIZE chars.

SEE ALSO

pcap(3PCAP), pcap_next_ex(3PCAP), pcap_geterr(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1342 - Linux cli command Tk_Internalspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Internalspm and provides detailed information about the command Tk_Internalspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Internalspm.

NAME 🖥️ Tk_Internalspm 🖥️

what is Perl Tk interface doing when you call Tk functions.

This information is worse than useless for “perlTk” users, but can of some help for people interested in using modified Tk source with “perlTk”.

This document is under construction. The information is believed to be pertinent to the version of “portableTk” available when it was created. All the details are subject to change.

DESCRIPTION

PreCompiling
Before the actual compilation stage a script scans the source and extracts the subcommands of different commands. This information resides in the file pTk/Methods.def.

Compilation
During compilation the above file is included in the source of booting routine of dynamic (or static) library. More precisely, the booting code of module Tk calls the subroutine Boot_Glue() from the module tkGlue.c, and this subroutine includes the file (with appropriate macro definitions).

Inside “use Tk;”
The module bootstraps the C code, then loads the Perl libraries. The heart of the Perl code is contained in the Tk::Widget library, all the widgets inherit from this module. Code for toplevels is loaded from Tk::MainWindow. During bootstrap of the C glue code the Xevent::? codes and a handful of Tk::Widget and Tk::Image routines are defined. (Much more XSUBs are created from Tk.xs code.) The widget subcommands are glued to Perl basing on the list included from pTk/Methods.def. In fact all the subcommands are glued to XSUBs that are related to the same C subroutine XStoWidget(), but have different data parts. During the Perl code bootstrap the method Tk::Widget::import is called. This call requires all the code from particular widget packages. Code from the widget packages calls an obscure command like (bless \Text")->WidgetClass; This command (actually Tk::Widget::WidgetClass()) creates three routines: Tk::Widget::Text(), Tk::Widget::isText(), and Tk::Text::isText(). The first one is basically new of Tk::Text, the other two return constants. It also puts the class into depository.

Inside “$top = MainWindow->new;”
This is quite intuitive. This call goes direct to Tk::MainWindow::new, that calls XSUB Tk::MainWindow::CreateMainWindow, that calls C subroutine Tk_CreateMainWindow(). It is a Tk subroutine, so here black magic ends (almost). The only remaining black magic is that the Tk initialization routine creates a lot of commands, but the subroutine for creation is usurped by portableTk and the commands are created in the package Tk. They are associated to XSUBs that are related to one of three C subroutines XStoSubCmd(), XStoBind(), or XStoTk(), but have different data parts. The result of the call is blessed into Tk::MainWindow, as it should.

Inside “$top->title(Text demo);”
The package Tk::Toplevel defines a lot of subroutines on the fly on some list. All the commands from the list are converted to the corresponding subcommands of wm method of the widget. Here subcommand is a command with some particular second argument (in this case "title"). Recall that the first argument is $self. Now Tk::Toplevel @ISA Tk::Widget, that in turn @ISA Tk. So a call to $top->wm(title,Text demo) calls Tk::wm, that is defined during call to Tk_CreateMainWindow(). As it is described above, the XSUB associated to XStoSubCmd() is called. This C routine is defined in tkGlue.c. It gets the data part of XSUB, creates a SV with the name of the command, and calls Call_Tk() with the XSUB data as the first argument, and with the name of XSUB stuffed into the Perl stack in the place there tk expects it. (In fact it can also reorder the arguments if it thinks it is what you want). The latter procedure extracts name of tk procedure and clientData from the first argument and makes a call, using Perl stack as argv for the procedure. A lot of black magic is performed afterwards to convert result of the procedure to a Perl array return.

Inside “$text = $top->Text(background => $txtBg);”
Above we discussed how the command Tk::Widget::Text is created. The above command calls it via inheritance. It is translated to Tk::Text::new($top, background => $txtBg); The package Tk::Text has no method new, so the Tk::Widget::new is called. In turn it calls Tk::Text->DoInit($top), that is Tk::Widget::DoInit(Tk::Text,$top), that initializes the bindings if necessary. Then it creates the name for the widget of the form .text0, and calls Tk::text(.text0, background => $txtBg) (note lowercase). The result of the call is blessed into Tk::Text, and the method bindtags for this object is called. Now the only thing to discuss is who defines the methods text and bindtags. The answer is that they are defined in tkWindow.c, and these commands are created in the package Tk in the same sweep that created the command Tk::wm discussed above. So the the same C code that corresponds to the processing of corresponding TCL commands is called here as well (this time via XStoTk interface).

Inside “$text->insert(insert,Hello, world!);”
As we discussed above, the subcommands of widget procedures correspond to XSUB XStoWidget. This XSUB substitutes the first argument $text (that is a hash reference) to an appropriate value from this hash, adds the additional argument after the first one that contains the name of the subcommand extracted from the data part of XSUB, and calls the corresponding Tk C subroutine via Call_Tk.

Ilya Zakharevich <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1343 - Linux cli command hsearch

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command hsearch and provides detailed information about the command hsearch, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the hsearch.

NAME 🖥️ hsearch 🖥️

hash table management

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <search.h>
int hcreate(size_t nel);
void hdestroy(void);
ENTRY *hsearch(ENTRY item, ACTION action);
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <search.h>
int hcreate_r(size_t nel, struct hsearch_data *htab);
void hdestroy_r(struct hsearch_data *htab);
int hsearch_r(ENTRY item, ACTION action, ENTRY **retval,
 struct hsearch_data *htab);

DESCRIPTION

The three functions hcreate(), hsearch(), and hdestroy() allow the caller to create and manage a hash search table containing entries consisting of a key (a string) and associated data. Using these functions, only one hash table can be used at a time.

The three functions hcreate_r(), hsearch_r(), hdestroy_r() are reentrant versions that allow a program to use more than one hash search table at the same time. The last argument, htab, points to a structure that describes the table on which the function is to operate. The programmer should treat this structure as opaque (i.e., do not attempt to directly access or modify the fields in this structure).

First a hash table must be created using hcreate(). The argument nel specifies the maximum number of entries in the table. (This maximum cannot be changed later, so choose it wisely.) The implementation may adjust this value upward to improve the performance of the resulting hash table.

The hcreate_r() function performs the same task as hcreate(), but for the table described by the structure *htab. The structure pointed to by htab must be zeroed before the first call to hcreate_r().

The function hdestroy() frees the memory occupied by the hash table that was created by hcreate(). After calling hdestroy(), a new hash table can be created using hcreate(). The hdestroy_r() function performs the analogous task for a hash table described by *htab, which was previously created using hcreate_r().

The hsearch() function searches the hash table for an item with the same key as item (where “the same” is determined using strcmp(3)), and if successful returns a pointer to it.

The argument item is of type ENTRY, which is defined in <search.h> as follows:

typedef struct entry {
    char *key;
    void *data;
} ENTRY;

The field key points to a null-terminated string which is the search key. The field data points to data that is associated with that key.

The argument action determines what hsearch() does after an unsuccessful search. This argument must either have the value ENTER, meaning insert a copy of item (and return a pointer to the new hash table entry as the function result), or the value FIND, meaning that NULL should be returned. (If action is FIND, then data is ignored.)

The hsearch_r() function is like hsearch() but operates on the hash table described by *htab. The hsearch_r() function differs from hsearch() in that a pointer to the found item is returned in *retval, rather than as the function result.

RETURN VALUE

hcreate() and hcreate_r() return nonzero on success. They return 0 on error, with errno set to indicate the error.

On success, hsearch() returns a pointer to an entry in the hash table. hsearch() returns NULL on error, that is, if action is ENTER and the hash table is full, or action is FIND and item cannot be found in the hash table. hsearch_r() returns nonzero on success, and 0 on error. In the event of an error, these two functions set errno to indicate the error.

ERRORS

hcreate_r() and hdestroy_r() can fail for the following reasons:

EINVAL
htab is NULL.

hsearch() and hsearch_r() can fail for the following reasons:

ENOMEM
action was ENTER, key was not found in the table, and there was no room in the table to add a new entry.

ESRCH
action was FIND, and key was not found in the table.

POSIX.1 specifies only the ENOMEM error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

hcreate(), hsearch(), hdestroy()

Thread safetyMT-Unsafe race:hsearch

hcreate_r(), hsearch_r(), hdestroy_r()

Thread safetyMT-Safe race:htab

STANDARDS

hcreate()
hsearch()
hdestroy()
POSIX.1-2008.

hcreate_r()
hsearch_r()
hdestroy_r()
GNU.

HISTORY

hcreate()
hsearch()
hdestroy()
SVr4, POSIX.1-2001.

hcreate_r()
hsearch_r()
hdestroy_r()
GNU.

NOTES

Hash table implementations are usually more efficient when the table contains enough free space to minimize collisions. Typically, this means that nel should be at least 25% larger than the maximum number of elements that the caller expects to store in the table.

The hdestroy() and hdestroy_r() functions do not free the buffers pointed to by the key and data elements of the hash table entries. (It can’t do this because it doesn’t know whether these buffers were allocated dynamically.) If these buffers need to be freed (perhaps because the program is repeatedly creating and destroying hash tables, rather than creating a single table whose lifetime matches that of the program), then the program must maintain bookkeeping data structures that allow it to free them.

BUGS

SVr4 and POSIX.1-2001 specify that action is significant only for unsuccessful searches, so that an ENTER should not do anything for a successful search. In libc and glibc (before glibc 2.3), the implementation violates the specification, updating the data for the given key in this case.

Individual hash table entries can be added, but not deleted.

EXAMPLES

The following program inserts 24 items into a hash table, then prints some of them.

#include <search.h>
#include <stdio.h>
#include <stdlib.h>
static char *data[] = { "alpha", "bravo", "charlie", "delta",
     "echo", "foxtrot", "golf", "hotel", "india", "juliet",
     "kilo", "lima", "mike", "november", "oscar", "papa",
     "quebec", "romeo", "sierra", "tango", "uniform",
     "victor", "whisky", "x-ray", "yankee", "zulu"
};
int
main(void)
{
    ENTRY e;
    ENTRY *ep;
    hcreate(30);
    for (size_t i = 0; i < 24; i++) {
        e.key = data[i];
        /* data is just an integer, instead of a
           pointer to something */
        e.data = (void *) i;
        ep = hsearch(e, ENTER);
        /* there should be no failures */
        if (ep == NULL) {
            fprintf(stderr, "entry failed

“); exit(EXIT_FAILURE); } } for (size_t i = 22; i < 26; i++) { /* print two entries from the table, and show that two are not in the table */ e.key = data[i]; ep = hsearch(e, FIND); printf("%9.9s -> %9.9s:%d “, e.key, ep ? ep->key : “NULL”, ep ? (int)(ep->data) : 0); } hdestroy(); exit(EXIT_SUCCESS); }

SEE ALSO

bsearch(3), lsearch(3), malloc(3), tsearch(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1344 - Linux cli command Image_ExifTool_AIFFpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_AIFFpm and provides detailed information about the command Image_ExifTool_AIFFpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_AIFFpm.

NAME 🖥️ Image_ExifTool_AIFFpm 🖥️

Read AIFF meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to extract information from AIFF (Audio Interchange File Format) audio files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://developer.apple.com/documentation/QuickTime/INMAC/SOUND/imsoundmgr.30.htm#pgfId=3190>

<http://astronomy.swin.edu.au/~pbourke/dataformats/aiff/>

<http://www.mactech.com/articles/mactech/Vol.06/06.01/SANENormalized/>

SEE ALSO

“AIFF Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1345 - Linux cli command Regexp_Common_whitespacepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_whitespacepm and provides detailed information about the command Regexp_Common_whitespacepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_whitespacepm.

NAME 🖥️ Regexp_Common_whitespacepm 🖥️

  • provides a regex for leading or trailing whitescape

SYNOPSIS

use Regexp::Common qw /whitespace/; while (<>) { s/$RE{ws}{crop}//g; # Delete surrounding whitespace }

DESCRIPTION

Please consult the manual of Regexp::Common for a general description of the works of this interface.

Do not use this module directly, but load it via Regexp::Common.

“$RE{ws}{crop}”

Returns a pattern that identifies leading or trailing whitespace.

For example:

$str =~ s/$RE{ws}{crop}//g; # Delete surrounding whitespace

The call:

$RE{ws}{crop}->subs($str);

is optimized (but probably still slower than doing the s///g explicitly).

This pattern does not capture under -keep.

SEE ALSO

Regexp::Common for a general description of how to use this interface.

AUTHOR

Damian Conway ([email protected])

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

For a start, there are many common regexes missing. Send them in to [email protected].

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1346 - Linux cli command zip_fopen_encrypted

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_fopen_encrypted and provides detailed information about the command zip_fopen_encrypted, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_fopen_encrypted.

libzip (-lzip)

The

function opens the encrypted file name

in

using the password given in the

argument. The

argument are the same as for

The

function opens the file at position

see

These functions are called automatically by

you only need to call them if you want to specify a non-default password (see

Upon successful completion, a

pointer is returned. Otherwise,

is returned and the error code in

is set to indicate the error.

No password was provided.

The function

may also fail and set

for any of the errors specified for the routine

The function

may also fail and set

for any of the errors specified for the routine

and

were added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1347 - Linux cli command isgreaterequal

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isgreaterequal and provides detailed information about the command isgreaterequal, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isgreaterequal.

NAME 🖥️ isgreaterequal 🖥️

floating-point relational tests without exception for NaN

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
int isgreater(x, y);
int isgreaterequal(x, y);
int isless(x, y);
int islessequal(x, y);
int islessgreater(x, y);
int isunordered(x, y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

    All functions described here:
        _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The normal relational operations (like <, “less than”) fail if one of the operands is NaN. This will cause an exception. To avoid this, C99 defines the macros listed below.

These macros are guaranteed to evaluate their arguments only once. The arguments must be of real floating-point type (note: do not pass integer values as arguments to these macros, since the arguments will not be promoted to real-floating types).

isgreater()
determines (x) > (y) without an exception if x or y is NaN.

isgreaterequal()
determines (x) >= (y) without an exception if x or y is NaN.

isless()
determines (x) < (y) without an exception if x or y is NaN.

islessequal()
determines (x) <= (y) without an exception if x or y is NaN.

islessgreater()
determines (x) < (y) || (x) > (y) without an exception if x or y is NaN. This macro is not equivalent to x != y because that expression is true if x or y is NaN.

isunordered()
determines whether its arguments are unordered, that is, whether at least one of the arguments is a NaN.

RETURN VALUE

The macros other than isunordered() return the result of the relational comparison; these macros return 0 if either argument is a NaN.

isunordered() returns 1 if x or y is NaN and 0 otherwise.

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isgreater(), isgreaterequal(), isless(), islessequal(), islessgreater(), isunordered()

Thread safetyMT-Safe

VERSIONS

Not all hardware supports these functions, and where hardware support isn’t provided, they will be emulated by macros. This will result in a performance penalty. Don’t use these functions if NaN is of no concern for you.

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

fpclassify(3), isnan(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1348 - Linux cli command openpty

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command openpty and provides detailed information about the command openpty, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the openpty.

NAME 🖥️ openpty 🖥️

terminal utility functions

LIBRARY

System utilities library (libutil, -lutil)

SYNOPSIS

#include <pty.h>
int openpty(int *amaster, int *aslave, char *name,
 const struct termios *termp,
 const struct winsize *winp);
pid_t forkpty(int *amaster, char *name,
 const struct termios *termp,
 const struct winsize *winp);
#include <utmp.h>
int login_tty(int fd);

DESCRIPTION

The openpty() function finds an available pseudoterminal and returns file descriptors for the master and slave in amaster and aslave. If name is not NULL, the filename of the slave is returned in name. If termp is not NULL, the terminal parameters of the slave will be set to the values in termp. If winp is not NULL, the window size of the slave will be set to the values in winp.

The login_tty() function prepares for a login on the terminal referred to by the file descriptor fd (which may be a real terminal device, or the slave of a pseudoterminal as returned by openpty()) by creating a new session, making fd the controlling terminal for the calling process, setting fd to be the standard input, output, and error streams of the current process, and closing fd.

The forkpty() function combines openpty(), fork(2), and login_tty() to create a new process operating in a pseudoterminal. A file descriptor referring to master side of the pseudoterminal is returned in amaster. If name is not NULL, the buffer it points to is used to return the filename of the slave. The termp and winp arguments, if not NULL, will determine the terminal attributes and window size of the slave side of the pseudoterminal.

RETURN VALUE

If a call to openpty(), login_tty(), or forkpty() is not successful, -1 is returned and errno is set to indicate the error. Otherwise, openpty(), login_tty(), and the child process of forkpty() return 0, and the parent process of forkpty() returns the process ID of the child process.

ERRORS

openpty() fails if:

ENOENT
There are no available terminals.

login_tty() fails if ioctl(2) fails to set fd to the controlling terminal of the calling process.

forkpty() fails if either openpty() or fork(2) fails.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

forkpty(), openpty()

Thread safetyMT-Safe locale

login_tty()

Thread safetyMT-Unsafe race:ttyname

STANDARDS

BSD.

HISTORY

The const modifiers were added to the structure pointer arguments of openpty() and forkpty() in glibc 2.8.

Before glibc 2.0.92, openpty() returns file descriptors for a BSD pseudoterminal pair; since glibc 2.0.92, it first attempts to open a UNIX 98 pseudoterminal pair, and falls back to opening a BSD pseudoterminal pair if that fails.

BUGS

Nobody knows how much space should be reserved for name. So, calling openpty() or forkpty() with non-NULL name may not be secure.

SEE ALSO

fork(2), ttyname(3), pty(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1349 - Linux cli command Tk_bindpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_bindpm and provides detailed information about the command Tk_bindpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_bindpm.

NAME 🖥️ Tk_bindpm 🖥️

Arrange for X events to invoke callbacks

SYNOPSIS

Retrieve bindings:

$widget->bind

$widget->bind(tag)

$widget->bind(sequence)

$widget->bind(tag,sequence)

Associate and destroy bindings:

$widget->bind(sequence,callback)

$widget->bind(tag,sequence,callback)

DESCRIPTION

The bind method associates callbacks with X events. If callback is specified, bind will arrange for callback to be evaluated whenever the event(s) given by sequence occur in the window(s) identified by $widget or tag. If callback is an empty string then the current binding for sequence is destroyed, leaving sequence unbound. In all of the cases where a callback argument is provided, bind returns an empty string.

If sequence is specified without a callback, then the callback currently bound to sequence is returned, or undef is returned if there is no binding for sequence. If neither sequence nor callback is specified, then the return value is a list whose elements are all the sequences for which there exist bindings for tag.

If no tag is specified then the bind refers to $widget. If tag is specified then it is typically a class name and the bind refers to all instances of the class on the MainWindow associated with $widget. (It is possible for tag to be another “widget object” but this practice is deprecated.) Perl’s ref($object) can be used to get the class name of any object. Each window has an associated list of tags, and a binding applies to a particular window if its tag is among those specified for the window. Although the bindtags method may be used to assign an arbitrary set of binding tags to a window, the default binding tags provide the following behavior:

If a tag is the name of an internal window the binding applies to that window.

If the tag is the name of a toplevel window the binding applies to the toplevel window and all its internal windows.

If the tag is the name of a class of widgets, such as Tk::Button, the binding applies to all widgets in that class;

If tag has the value all, the binding applies to all windows descended from the MainWindow of the application.

EVENT PATTERNS

The sequence argument specifies a sequence of one or more event patterns, with optional white space between the patterns. Each event pat may take one of three forms. In the simplest case it is a single printing ASCII character, such as a or [. The character may not be a space character or the character <. This form of pattern matches a KeyPress event for the particular character. The second form of pattern is longer but more general. It has the following syntax:

‘<modifier-modifier-type-detail>’

The entire event pattern is surrounded by angle brackets, and normally needs to be quoted, as angle brackets are special to perl. Inside the angle brackets are zero or more modifiers, an event type, and an extra piece of information (detail) identifying a particular button or keysym. Any of the fields may be omitted, as long as at least one of type and detail is present. The fields must be separated by white space or dashes.

The third form of pattern is used to specify a user-defined, named virtual event; see Tk::event for details. It has the following syntax:

‘<<name>>’

The entire virtual event pattern is surrounded by double angle brackets. Inside the angle brackets is the user-defined name of the virtual event. Modifiers, such as Shift or Control, may not be combined with a virtual event to modify it. Bindings on a virtual event may be created before the virtual event is defined, and if the definition of a virtual event changes dynamically, all windows bound to that virtual event will respond immediately to the new definition.

MODIFIERS

Modifiers consist of any of the following values:

Control Mod2, M2 Shift Mod3, M3 Lock Mod4, M4 Button1, B1 Mod5, M5 Button2, B2 Meta, M Button3, B3 Alt Button4, B4 Double Button5, B5 Triple Mod1, M1 Quadruple

Where more than one value is listed, separated by commas, the values are equivalent. Most of the modifiers have the obvious X meanings. For example, Button1 requires that button 1 be depressed when the event occurs. For a binding to match a given event, the modifiers in the event must include all of those specified in the event pattern. An event may also contain additional modifiers not specified in the binding. For example, if button 1 is pressed while the shift and control keys are down, the pattern <Control-Button-1> will match the event, but <Mod1-Button-1> will not. If no modifiers are specified, then any combination of modifiers may be present in the event.

Meta and M refer to whichever of the M1 through M5 modifiers is associated with the meta key(s) on the keyboard (keysyms Meta_R and Meta_L). If there are no meta keys, or if they are not associated with any modifiers, then Meta and M will not match any events. Similarly, the Alt modifier refers to whichever modifier is associated with the alt key(s) on the keyboard (keysyms Alt_L and Alt_R).

The Double, Triple and Quadruple modifiers are a convenience for specifying double mouse clicks and other repeated events. They cause a particular event pattern to be repeated 2, 3 or 4 times, and also place a time and space requirement on the sequence: for a sequence of events to match a Double, Triple or Quadruple pattern, all of the events must occur close together in time and without substantial mouse motion in between. For example, <Double-Button-1> is equivalent to <Button-1><Button-1> with the extra time and space requirement.

EVENT TYPES

The type field may be any of the standard X event types, with a few extra abbreviations. Below is a list of all the valid types; where two names appear together, they are synonyms.

Activate Destroy Map ButtonPress, Button Enter MapRequest ButtonRelease Expose Motion Circulate FocusIn MouseWheel CirculateRequest FocusOut Property Colormap Gravity Reparent Configure KeyPress, Key ResizeRequest ConfigureRequest KeyRelease Unmap Create Leave Visibility Deactivate

Most of the above events have the same fields and behaviors as events in the X Windowing system. You can find more detailed descriptions of these events in any X window programming book. A couple of the events are extensions to the X event system to support features unique to the Macintosh and Windows platforms. We provide a little more detail on these events here. These include:

Activate Deactivate

These two events are sent to every sub-window of a toplevel when they change state. In addition to the focus Window, the Macintosh platform and Windows platforms have a notion of an active window (which often has but is not required to have the focus). On the Macintosh, widgets in the active window have a different appearance than widgets in deactive windows. The Activate event is sent to all the sub-windows in a toplevel when it changes from being deactive to active. Likewise, the Deactive event is sent when the window’s state changes from active to deactive. There are no use- ful percent substitutions you would make when binding to these events.

MouseWheel

Some mice on the Windows platform support a mouse wheel which is used for scrolling documents without using the scrollbars. By rolling the wheel, the system will generate MouseWheel events that the application can use to scroll. Like Key events the event is always routed to the window that currently has focus. When the event is received you can use the %D substitution to get the delta field for the event which is a integer value of motion that the mouse wheel has moved. The smallest value for which the system will report is defined by the OS. On Windows 95 & 98 machines this value is at least 120 before it is reported. However, higher resolution devices may be available in the future. The sign of the value determines which direction your widget should scroll. Positive values should scroll up and negative values should scroll down.

The last part of a long event specification is detail. In the case of a ButtonPress or ButtonRelease event, it is the number of a button (1-5). If a button number is given, then only an event on that particular button will match; if no button number is given, then an event on any button will match. Note: giving a specific button number is different than specifying a button modifier; in the first case, it refers to a button being pressed or released, while in the second it refers to some other button that is already depressed when the matching event occurs. If a button number is given then type may be omitted: if will default to ButtonPress. For example, the specifier <1> is equivalent to <ButtonPress-1>.

If the event type is KeyPress or KeyRelease, then detail may be specified in the form of an X keysym. Keysyms are textual specifications for particular keys on the keyboard; they include all the alphanumeric ASCII characters (e.g. ``a’’ is the keysym for the ASCII character ``a’’), plus descriptions for non-alphanumeric characters (``comma’’ is the keysym for the comma character), plus descriptions for all the non-ASCII keys on the keyboard (``Shift_L’’ is the keysm for the left shift key, and ``F1’’ is the keysym for the F1 function key, if it exists). The complete list of keysyms is not presented here; it is available in other X documentation and may vary from system to system. If necessary, you can use the ‘K’ notation described below to print out the keysym name for a particular key. If a keysym detail is given, then the type field may be omitted; it will default to KeyPress. For example, <Control-comma> is equivalent to <Control-KeyPress-comma>.

BINDING CALLBACKS AND SUBSTITUTIONS

The callback argument to bind is a perl/Tk callback. which will be executed whenever the given event sequence occurs. (See Tk::callbacks for description of the possible forms.) Callback will be associated with the same MainWindow that is associated with the $widget that was used to invoke the bind method, and it will run as though called from MainLoop. If callback contains any Ev(%) calls, then each “nested” Ev(%) “callback” will be evaluated when the event occurs to form arguments to be passed to the main callback. The replacement depends on the character %, as defined in the list below. Unless otherwise indicated, the replacement string is the numeric (decimal) value of the given field from the current event. Perl/Tk has enhanced this mechanism slightly compared to the comparable Tcl/Tk mechanism. The enhancements are not yet all reflected in the list below. Some of the substitutions are only valid for certain types of events; if they are used for other types of events the value substituted is undefined (not the same as undef!).

‘#’
The number of the last client request processed by the server (the serial field from the event). Valid for all event types.

‘a’
The above field from the event, formatted as a hexadecimal number. Valid only for Configure events.

‘b’
The number of the button that was pressed or released. Valid only for ButtonPress and ButtonRelease events.

‘c’
The count field from the event. Valid only for Expose events.

’d’
The detail field from the event. The ’d’ is replaced by a string identifying the detail. For Enter, Leave, FocusIn, and FocusOut events, the string will be one of the following: NotifyAncestor NotifyNonlinearVirtual NotifyDetailNone NotifyPointer NotifyInferior NotifyPointerRoot NotifyNonlinear NotifyVirtual For ConfigureRequest events, the string will be one of: Above Opposite Below None BottomIf TopIf For events other than these, the substituted string is undefined. (Note that this is not the same as Detail part of sequence use to specify the event.)

‘f’
The focus field from the event (0 or 1). Valid only for Enter and Leave events.

‘h’
The height field from the event. Valid only for Configure, ConfigureRequest, Create, Expose, and ResizeRequest events.

‘i’
The window field from the event, represented as a hexadecimal integer.

‘k’
The keycode field from the event. Valid only for KeyPress and KeyRelease events.

’m’
The mode field from the event. The substituted string is one of NotifyNormal, NotifyGrab, NotifyUngrab, or NotifyWhileGrabbed. Valid only for Enter, FocusIn, FocusOut, and Leave events.

‘o’
The override_redirect field from the event. Valid only for Map, Reparent, and Configure events.

‘p’
The place field from the event, substituted as one of the strings PlaceOnTop or PlaceOnBottom. Valid only for Circulate and CirculateRequest events.

’s’
The state field from the event. For ButtonPress, ButtonRelease, Enter, KeyPress, KeyRelease, Leave, and Motion events, a decimal string is substituted. For Visibility, one of the strings VisibilityUnobscured, VisibilityPartiallyObscured, and VisibilityFullyObscured is substituted.

’t’
The time field from the event. Valid only for events that contain a time field.

‘w’
The width field from the event. Valid only for Configure, ConfigueRequest, Create, Expose, and ResizeREquest events.

‘x’
The x field from the event. Valid only for events containing an x field.

‘y’
The y field from the event. Valid only for events containing a y field.

‘@’
The string “@x,y” where x and y are as above. Valid only for events containing x and y fields. This format is used my methods of Tk::Text and similar widgets.

‘A’
Substitutes the UNICODE character corresponding to the event, or the empty string if the event doesn’t correspond to a UNICODE character (e.g. the shift key was pressed). XmbLookupString does all the work of translating from the event to a UNICODE character. Valid only for KeyPress and KeyRelease events.

‘B’
The border_width field from the event. Valid only for Configure, ConfigureRequest and Create events.

‘D’
This reports the delta value of a MouseWheel event. The delta value represents the rotation units the mouse wheel has been moved. On Windows 95 & 98 systems the smallest value for the delta is 120. Future systems may support higher resolution values for the delta. The sign of the value represents the direction the mouse wheel was scrolled.

‘E’
The send_event field from the event. Valid for all event types.

‘K’
The keysym corresponding to the event, substituted as a textual string. Valid only for KeyPress and KeyRelease events.

‘N’
The keysym corresponding to the event, substituted as a decimal number. Valid only for KeyPress and KeyRelease events.

‘R’
The root window identifier from the event. Valid only for events containing a root field.

‘S’
The subwindow window identifier from the event, as an object if it is one otherwise as a hexadecimal number. Valid only for events containing a subwindow field.

‘T’
The type field from the event. Valid for all event types.

‘W’
The window to which the event was reported (the $widget field from the event) - as an perl/Tk object. Valid for all event types.

‘X’
The x_root field from the event. If a virtual-root window manager is being used then the substituted value is the corresponding x-coordinate in the virtual root. Valid only for ButtonPress, ButtonRelease, KeyPress, KeyRelease, and Motion events.

‘Y’
The y_root field from the event. If a virtual-root window manager is being used then the substituted value is the corresponding y-coordinate in the virtual root. Valid only for ButtonPress, ButtonRelease, KeyPress, KeyRelease, and Motion events.

MULTIPLE MATCHES

It is possible for several bindings to match a given X event. If the bindings are associated with different tag’s, then each of the bindings will be executed, in order. By default, a class binding will be executed first, followed by a binding for the widget, a binding for its toplevel, and an all binding. The bindtags method may be used to change this order for a particular window or to associate additional binding tags with the window.

return and Tk->break may be used inside a callback to control the processing of matching callbacks. If return is invoked, then the current callback is terminated but Tk will continue processing callbacks associated with other tag’s. If Tk->break is invoked within a callback, then that callback terminates and no other callbacks will be invoked for the event. (Tk->break is implemented via perl’s die with a special value which is “caught” by the perl/Tk “glue” code.)

If more than one binding matches a particular event and they have the same tag, then the most specific binding is chosen and its callback is evaluated. The following tests are applied, in order, to determine which of several matching sequences is more specific: (a) an event pattern that specifies a specific button or key is more specific than one that doesn’t; (b) a longer sequence (in terms of number of events matched) is more specific than a shorter sequence; (c) if the modifiers specified in one pattern are a subset of the modifiers in another pattern, then the pattern with more modifiers is more specific. (d) a virtual event whose physical pattern matches the sequence is less specific than the same physical pattern that is not associated with a virtual event. (e) given a sequence that matches two or more virtual events, one of the virtual events will be chosen, but the order is undefined.

If the matching sequences contain more than one event, then tests (c)-(e) are applied in order from the most recent event to the least recent event in the sequences. If these tests fail to determine a winner, then the most recently registered sequence is the winner.

If there are two (or more) virtual events that are both triggered by the same sequence, and both of those virtual events are bound to the same window tag, then only one of the virtual events will be triggered, and it will be picked at random:

$widget->eventAdd(<<Paste>> => <Control-y>); $widget->eventAdd(<<Paste>> => <Button-2>); $widget->eventAdd <<Scroll>> => <Button-2>); $widget->bind(Tk::Entry,<<Paste>>,sub { print Paste}); $widget->bind(Tk::Entry,<<Scroll>>, sub {print Scroll});

If the user types Control-y, the <<Paste>> binding will be invoked, but if the user presses button 2 then one of either the <<Paste>> or the <<Scroll>> bindings will be invoked, but exactly which one gets invoked is undefined.

If an X event does not match any of the existing bindings, then the event is ignored. An unbound event is not considered to be an error.

MULTI-EVENT SEQUENCES AND IGNORED EVENTS

When a sequence specified in a bind method contains more than one event pattern, then its callback is executed whenever the recent events (leading up to and including the current event) match the given sequence. This means, for example, that if button 1 is clicked repeatedly the sequence <Double-ButtonPress-1> will match each button press but the first. If extraneous events that would prevent a match occur in the middle of an event sequence then the extraneous events are ignored unless they are KeyPress or ButtonPress events. For example, <Double-ButtonPress-1> will match a sequence of presses of button 1, even though there will be ButtonRelease events (and possibly Motion events) between the ButtonPress events. Furthermore, a KeyPress event may be preceded by any number of other KeyPress events for modifier keys without the modifier keys preventing a match. For example, the event sequence aB will match a press of the a key, a release of the a key, a press of the Shift key, and a press of the b key: the press of Shift is ignored because it is a modifier key. Finally, if several Motion events occur in a row, only the last one is used for purposes of matching binding sequences.

ERRORS

If an error occurs in executing the callback for a binding then the Tk::Error mechanism is used to report the error. The Tk::Error mechanism will be executed at same call level, and associated with the same MainWindow as as the callback was invoked.

CAVEATS

Note that for the Canvas widget, the call to bind has to be fully qualified. This is because there is already a bind method for the Canvas widget, which binds individual canvas tags.

$canvas->Tk::bind

SEE ALSO

Tk::Error Tk::callbacks Tk::bindtags

KEYWORDS

Event, binding

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1350 - Linux cli command Net_DNS_RR_NSEC3pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_NSEC3pm and provides detailed information about the command Net_DNS_RR_NSEC3pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_NSEC3pm.

NAME 🖥️ Net_DNS_RR_NSEC3pm 🖥️

DNS NSEC3 resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name NSEC3 algorithm flags iterations salt hnxtname);

DESCRIPTION

Class for DNSSEC NSEC3 resource records.

The NSEC3 Resource Record (RR) provides authenticated denial of existence for DNS Resource Record Sets.

The NSEC3 RR lists RR types present at the original owner name of the NSEC3 RR. It includes the next hashed owner name in the hash order of the zone. The complete set of NSEC3 RRs in a zone indicates which RRSets exist for the original owner name of the RR and form a chain of hashed owner names in the zone.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

algorithm

$algorithm = $rr->algorithm; $rr->algorithm( $algorithm );

The Hash Algorithm field is represented as an unsigned decimal integer. The value has a maximum of 255.

algorithm() may also be invoked as a class method or simple function to perform mnemonic and numeric code translation.

flags

$flags = $rr->flags; $rr->flags( $flags );

The Flags field is an unsigned decimal integer interpreted as eight concatenated Boolean values.

optout
$rr->optout(1); if ( $rr->optout ) { … } Boolean Opt Out flag.

iterations

$iterations = $rr->iterations; $rr->iterations( $iterations );

The Iterations field is represented as an unsigned decimal integer. The value is between 0 and 65535, inclusive.

salt

$salt = $rr->salt; $rr->salt( $salt );

The Salt field is represented as a contiguous sequence of hexadecimal digits. A “-” (unquoted) is used in string format to indicate that the salt field is absent.

saltbin

$saltbin = $rr->saltbin; $rr->saltbin( $saltbin );

The Salt field as a sequence of octets.

hnxtname

$hnxtname = $rr->hnxtname; $rr->hnxtname( $hnxtname );

The Next Hashed Owner Name field points to the next node that has authoritative data or contains a delegation point NS RRset.

typelist

@typelist = $rr->typelist; $typelist = $rr->typelist; $rr->typelist( @typelist );

typelist() identifies the RRset types that exist at the domain name matched by the NSEC3 RR. When called in scalar context, the list is interpolated into a string.

typemap

$exists = $rr->typemap($rrtype);

typemap() returns a Boolean true value if the specified RRtype occurs in the type bitmap of the NSEC3 record.

match

$matched = $rr->match( example.foo );

match() returns a Boolean true value if the hash of the domain name argument matches the hashed owner name of the NSEC3 RR.

covers

$covered = $rr->covers( example.foo );

covers() returns a Boolean true value if the hash of the domain name argument, or ancestor of that name, falls between the owner name and the next hashed owner name of the NSEC3 RR.

encloser, nextcloser, wildcard

$encloser = $rr->encloser( example.foo ); print “encloser: $encloser " if $encloser;

encloser() returns the name of a provable encloser of the query name argument obtained from the NSEC3 RR.

nextcloser() returns the next closer name, which is one label longer than the closest encloser. This is only valid after encloser() has returned a valid domain name.

wildcard() returns the unexpanded wildcard name from which the next closer name was possibly synthesised. This is only valid after encloser() has returned a valid domain name.

COPYRIGHT

Copyright (c)2017,2018 Dick Franks

Portions Copyright (c)2007,2008 NLnet Labs. Author Olaf M. Kolkman

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC5155 (3) <https://iana.org/go/rfc5155#section-3> RFC9077 <https://iana.org/go/rfc9077>

Hash Algorithms <https://iana.org/assignments/dnssec-nsec3-parameters>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1351 - Linux cli command S_ISLNK

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command S_ISLNK and provides detailed information about the command S_ISLNK, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the S_ISLNK.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1352 - Linux cli command zip_source_win32a

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_win32a and provides detailed information about the command zip_source_win32a, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_win32a.

libzip (-lzip)

The functions

and

create a zip source on Windows using a Windows ANSI name. They open

and read

bytes from offset

from it. If

is 0 or -1, the whole file (starting from

is used.

If the file supports seek, the source can be used to open a zip archive from.

The file is opened and read when the data from the source is used, usually by

or

Upon successful completion, the created source is returned. Otherwise,

is returned and the error code in

or

is set to indicate the error.

and

fail if:

or

are invalid.

Required memory could not be allocated.

Opening

failed.

and

were added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1353 - Linux cli command Image_ExifTool_AACpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_AACpm and provides detailed information about the command Image_ExifTool_AACpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_AACpm.

NAME 🖥️ Image_ExifTool_AACpm 🖥️

Read AAC audio files

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read Advanced Audio Coding (AAC) files.

NOTES

Since ISO charges money for the official AAC specification, this module is based on unofficial sources which may be incomplete, inaccurate or outdated.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

“AAC Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1354 - Linux cli command sockatmark

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sockatmark and provides detailed information about the command sockatmark, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sockatmark.

NAME 🖥️ sockatmark 🖥️

determine whether socket is at out-of-band mark

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/socket.h>
int sockatmark(int sockfd);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sockatmark():

    _POSIX_C_SOURCE >= 200112L

DESCRIPTION

sockatmark() returns a value indicating whether or not the socket referred to by the file descriptor sockfd is at the out-of-band mark. If the socket is at the mark, then 1 is returned; if the socket is not at the mark, 0 is returned. This function does not remove the out-of-band mark.

RETURN VALUE

A successful call to sockatmark() returns 1 if the socket is at the out-of-band mark, or 0 if it is not. On error, -1 is returned and errno is set to indicate the error.

ERRORS

EBADF
sockfd is not a valid file descriptor.

EINVAL
sockfd is not a file descriptor to which sockatmark() can be applied.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sockatmark()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.2.4. POSIX.1-2001.

NOTES

If sockatmark() returns 1, then the out-of-band data can be read using the MSG_OOB flag of recv(2).

Out-of-band data is supported only on some stream socket protocols.

sockatmark() can safely be called from a handler for the SIGURG signal.

sockatmark() is implemented using the SIOCATMARK ioctl(2) operation.

BUGS

Prior to glibc 2.4, sockatmark() did not work.

EXAMPLES

The following code can be used after receipt of a SIGURG signal to read (and discard) all data up to the mark, and then read the byte of data at the mark:

    char buf[BUF_LEN];
    char oobdata;
    int atmark, s;
    for (;;) {
        atmark = sockatmark(sockfd);
        if (atmark == -1) {
            perror("sockatmark");
            break;
        }
        if (atmark)
            break;
        s = read(sockfd, buf, BUF_LEN);
        if (s == -1)
            perror("read");
        if (s <= 0)
            break;
    }
    if (atmark == 1) {
        if (recv(sockfd, &oobdata, 1, MSG_OOB) == -1) {
            perror("recv");
            ...
        }
    }

SEE ALSO

fcntl(2), recv(2), send(2), tcp(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1355 - Linux cli command Package_DeprecationManagerpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Package_DeprecationManagerpm and provides detailed information about the command Package_DeprecationManagerpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Package_DeprecationManagerpm.

NAME 🖥️ Package_DeprecationManagerpm 🖥️

Manage deprecation warnings for your distribution

VERSION

version 0.18

SYNOPSIS

package My::Class; use Package::DeprecationManager -deprecations => { My::Class::foo => 0.02, My::Class::bar => 0.05, feature-X => 0.07, }; sub foo { deprecated( Do not call foo! ); … } sub bar { deprecated(); … } sub baz { my %args = @_; if ( $args{foo} ) { deprecated( message => …, feature => feature-X, ); } } package Other::Class; use My::Class -api_version => 0.04; My::Class->new()->foo(); # warns My::Class->new()->bar(); # does not warn My::Class->new()->bar(); # does not warn again

DESCRIPTION

This module allows you to manage a set of deprecations for one or more modules.

When you import Package::DeprecationManager, you must provide a set of -deprecations as a hash ref. The keys are feature names, and the values are the version when that feature was deprecated.

In many cases, you can simply use the fully qualified name of a subroutine or method as the feature name. This works for cases where the whole subroutine is deprecated. However, the feature names can be any string. This is useful if you don’t want to deprecate an entire subroutine, just a certain usage.

You can also provide an optional array reference in the -ignore parameter.

The values to be ignored can be package names or regular expressions (made with qr//). Use this to ignore packages in your distribution that can appear on the call stack when a deprecated feature is used.

As part of the import process, Package::DeprecationManager will export two subroutines into its caller. It provides an import() sub for the caller and a deprecated() sub.

The import() sub allows callers of your class to specify an -api_version parameter. If this is supplied, then deprecation warnings are only issued for deprecations with API versions earlier than the one specified.

You must call the deprecated() sub in each deprecated subroutine. When called, it will issue a warning using Carp::cluck().

The deprecated() sub can be called in several ways. If you do not pass any arguments, it will generate an appropriate warning message. If you pass a single argument, this is used as the warning message.

Finally, you can call it with named arguments. Currently, the only allowed names are message and feature. The feature argument should correspond to the feature name passed in the -deprecations hash.

If you don’t explicitly specify a feature, the deprecated() sub uses caller() to identify its caller, using its fully qualified subroutine name.

A given deprecation warning is only issued once for a given package. This module tracks this based on both the feature name and the error message itself. This means that if you provide several different error messages for the same feature, all of those errors will appear.

Other import() subs

This module works by installing an import sub in any package that uses it. If that package already has an import sub, then that import will be called after any arguments passed for Package::DeprecationManager are stripped out. You need to define your import sub before you use Package::DeprecationManager to make this work:

package HasExporter; use Exporter qw( import ); use Package::DeprecationManager -deprecations => { HasExporter::foo => 0.02, }; our @EXPORT_OK = qw( some_sub another_sub );

DONATIONS

If you’d like to thank me for the work I’ve done on this module, please consider making a donation to me via PayPal. I spend a lot of free time creating free software, and would appreciate any support you’d care to offer.

Please note that I am not suggesting that you must do this in order for me to continue working on this particular software. I will continue to do so, inasmuch as I have in the past, for as long as it interests me.

Similarly, a donation made in this way will probably not make me work on this software much more, unless I get so many donations that I can consider working on free software full time, which seems unlikely at best.

To donate, log into PayPal and send money to [email protected] or use the button on this page: <http://www.urth.org/~autarch/fs-donation.html>

CREDITS

The idea for this functionality and some of its implementation was originally created as Class::MOP::Deprecated by Goro Fuji.

BUGS

Please report any bugs or feature requests to [email protected], or through the web interface at <http://rt.cpan.org>. I will be notified, and then you’ll automatically be notified of progress on your bug as I make changes.

Bugs may be submitted at <https://github.com/moose/Package-DeprecationManager/issues>.

SOURCE

The source code repository for Package-DeprecationManager can be found at <https://github.com/moose/Package-DeprecationManager>.

DONATIONS

If you’d like to thank me for the work I’ve done on this module, please consider making a donation to me via PayPal. I spend a lot of free time creating free software, and would appreciate any support you’d care to offer.

Please note that I am not suggesting that you must do this in order for me to continue working on this particular software. I will continue to do so, inasmuch as I have in the past, for as long as it interests me.

Similarly, a donation made in this way will probably not make me work on this software much more, unless I get so many donations that I can consider working on free software full time (let’s all have a chuckle at that together).

To donate, log into PayPal and send money to [email protected], or use the button at <https://houseabsolute.com/foss-donations/>.

AUTHOR

Dave Rolsky <[email protected]>

CONTRIBUTORS

COPYRIGHT AND LICENSE

This software is Copyright (c) 2023 by Dave Rolsky.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)

The full text of the license can be found in the LICENSE file included with this distribution.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1356 - Linux cli command pcap_set_immediate_modepcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_set_immediate_modepcap and provides detailed information about the command pcap_set_immediate_modepcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_set_immediate_modepcap.

NAME 🖥️ pcap_set_immediate_modepcap 🖥️

set immediate mode for a not-yet-activated capture handle

SYNOPSIS

#include <pcap/pcap.h>
int pcap_set_immediate_mode(pcap_t *p, int immediate_mode);

DESCRIPTION

pcap_set_immediate_mode() sets whether immediate mode should be set on a capture handle when the handle is activated. In immediate mode, packets are always delivered as soon as they arrive, with no buffering. If immediate_mode is non-zero, immediate mode will be set, otherwise it will not be set.

RETURN VALUE

pcap_set_immediate_mode() returns 0 on success or PCAP_ERROR_ACTIVATED if called on a capture handle that has been activated.

BACKWARD COMPATIBILITY

This function became available in libpcap release 1.5.0. In previous releases, if immediate delivery of packets is required:

on FreeBSD, NetBSD, OpenBSD, DragonFly BSD, macOS, and Solaris 11, immediate mode must be turned on with a BIOCIMMEDIATE ioctl(2), as documented in bpf(4), on the descriptor returned by pcap_fileno(3PCAP), after pcap_activate(3PCAP) is called;

on Solaris 10 and earlier versions of Solaris, immediate mode must be turned on by using a read timeout of 0 when opening the device (this will not provide immediate delivery of packets on other platforms, so don’t assume it’s sufficient);

on Digital UNIX/Tru64 UNIX, immediate mode must be turned on by doing a BIOCMBIC ioctl(), as documented in packetfilter(7), to clear the ENBATCH flag on the descriptor returned by pcap_fileno(3PCAP), after pcap_activate(3PCAP) is called;

on Windows, immediate mode must be turned on by calling pcap_setmintocopy() with a size of 0.

On Linux, with previous releases of libpcap, capture devices are always in immediate mode; however, in 1.5.0 and later, they are, by default, not in immediate mode, so if pcap_set_immediate_mode() is available, it should be used.

On other platforms, capture devices are always in immediate mode.

SEE ALSO

pcap(3PCAP), pcap_create(3PCAP), pcap_activate(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1357 - Linux cli command XtAppSetErrorHandler

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppSetErrorHandler and provides detailed information about the command XtAppSetErrorHandler, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppSetErrorHandler.

NAME 🖥️ XtAppSetErrorHandler 🖥️

low-level error handlers

SYNTAX

#include <X11/Intrinsic.h>

void XtAppError(XtAppContext app_context, const char *message);

XtErrorHandler XtAppSetErrorHandler(XtAppContext app_context, XtErrorHandler handler);

XtErrorHandler XtAppSetWarningHandler(XtAppContext app_context, XtErrorHandler handler);

void XtAppWarning(XtAppContext app_context, const char *message);

ARGUMENTS

app_context
Specifies the application context.

message
Specifies the nonfatal error message that is to be reported.

handler
Specifies the new fatal error procedure, which should not return, or the nonfatal error procedure, which usually returns.

message
Specifies the message that is to be reported.

DESCRIPTION

The XtAppError function calls the installed error procedure and passes the specified message.

The XtAppSetErrorHandler function registers the specified procedure, which is called when a fatal error condition occurs.

The XtAppSetWarningHandler registers the specified procedure, which is called when a nonfatal error condition occurs.

The XtAppWarning function calls the installed nonfatal error procedure and passes the specified message.

SEE ALSO

XtAppGetErrorDatabase(3), XtAppErrorMsg(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1358 - Linux cli command File_RandomAccesspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command File_RandomAccesspm and provides detailed information about the command File_RandomAccesspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the File_RandomAccesspm.

NAME 🖥️ File_RandomAccesspm 🖥️

Random access reads of sequential file or scalar

SYNOPSIS

use File::RandomAccess; $raf = File::RandomAccess->new(\FILE, $disableSeekTest); $raf = File::RandomAccess->new(\data); $err = $raf->Seek($pos); $num = $raf->Read($buff, $bytes);

DESCRIPTION

Allows random access to sequential file by buffering the file if necessary. Also allows access to data in memory to be accessed as if it were a file.

METHODS

new
Creates a new RandomAccess object given a file reference or reference to data in memory. # Read from open file or pipe $raf = File::RandomAccess->new(\FILE); # Read from data in memory $raf = File::RandomAccess->new(\data);

Inputs:
0) Reference to RandomAccess object or RandomAccess class name. 1) File reference or scalar reference. 2) Flag set if file is already random access (disables automatic SeekTest).

Returns:
Reference to RandomAccess object.

SeekTest
Performs test seek() on file to determine if buffering is necessary. If the seek() fails, then the file is buffered to allow random access. SeekTest() is automatically called from new unless specified. $result = $raf->SeekTest();

Inputs:
0) Reference to RandomAccess object.

Returns:
1 if seek test passed (ie. no buffering required).

Notes:
Must be called before any other i/o.

Tell
Get current position in file $pos = $raf->Tell();

Inputs:
0) Reference to RandomAccess object.

Returns:
Current position in file

Seek
Seek to specified position in file. When buffered, this doesn’t quite behave like seek() since it returns success even if you seek outside the limits of the file. $success = $raf->Seek($pos, 0);

Inputs:
0) Reference to RandomAccess object. 1) Position. 2) Whence (0=from start, 1=from cur pos, 2=from end).

Returns:
1 on success, 0 otherwise

Read
Read data from the file. $num = $raf->Read($buff, 1024);

Inputs:
0) Reference to RandomAccess object. 1) Buffer. 2) Number of bytes to read.

Returns:
Number of bytes actually read.

ReadLine
Read a line from file (end of line is $/).

Inputs:
0) Reference to RandomAccess object. 1) Buffer.

Returns:
Number of bytes read.

Slurp
Read whole file into buffer, without changing read pointer.

Inputs:
0) Reference to RandomAccess object.

Returns:
Nothing.

BinMode
Set binary mode for file.

Inputs:
0) Reference to RandomAccess object.

Returns:
Nothing.

Close
Close the file and free the buffer.

Inputs:
0) Reference to RandomAccess object.

Returns:
Nothing.

OPTIONS

NoBuffer
Avoid buffering sequential files. $raf->{NoBuffer} = 1; When this option is set, old data is purged from the internal buffer before a read operation on a sequential file. In this mode, memory requirements may be significantly reduced when reading sequential files, but seeking backward is limited to within the size of the internal buffer (which will be at least as large as the last returned data block), and seeking relative to the end of file is not allowed.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1359 - Linux cli command get_current_dir_name

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command get_current_dir_name and provides detailed information about the command get_current_dir_name, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the get_current_dir_name.

NAME 🖥️ get_current_dir_name 🖥️

get current working directory

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
char *getcwd(char buf[.size], size_t size);
char *get_current_dir_name(void);
[[deprecated]] char *getwd(char buf[PATH_MAX]);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

get_current_dir_name():

    _GNU_SOURCE

getwd():

    Since glibc 2.12:
        (_XOPEN_SOURCE >= 500) && ! (_POSIX_C_SOURCE >= 200809L)
            || /* glibc >= 2.19: */ _DEFAULT_SOURCE
            || /* glibc <= 2.19: */ _BSD_SOURCE
    Before glibc 2.12:
        _BSD_SOURCE || _XOPEN_SOURCE >= 500

DESCRIPTION

These functions return a null-terminated string containing an absolute pathname that is the current working directory of the calling process. The pathname is returned as the function result and via the argument buf, if present.

The getcwd() function copies an absolute pathname of the current working directory to the array pointed to by buf, which is of length size.

If the length of the absolute pathname of the current working directory, including the terminating null byte, exceeds size bytes, NULL is returned, and errno is set to ERANGE; an application should check for this error, and allocate a larger buffer if necessary.

As an extension to the POSIX.1-2001 standard, glibc’s getcwd() allocates the buffer dynamically using malloc(3) if buf is NULL. In this case, the allocated buffer has the length size unless size is zero, when buf is allocated as big as necessary. The caller should free(3) the returned buffer.

get_current_dir_name() will malloc(3) an array big enough to hold the absolute pathname of the current working directory. If the environment variable PWD is set, and its value is correct, then that value will be returned. The caller should free(3) the returned buffer.

getwd() does not malloc(3) any memory. The buf argument should be a pointer to an array at least PATH_MAX bytes long. If the length of the absolute pathname of the current working directory, including the terminating null byte, exceeds PATH_MAX bytes, NULL is returned, and errno is set to ENAMETOOLONG. (Note that on some systems, PATH_MAX may not be a compile-time constant; furthermore, its value may depend on the filesystem, see pathconf(3).) For portability and security reasons, use of getwd() is deprecated.

RETURN VALUE

On success, these functions return a pointer to a string containing the pathname of the current working directory. In the case of getcwd() and getwd() this is the same value as buf.

On failure, these functions return NULL, and errno is set to indicate the error. The contents of the array pointed to by buf are undefined on error.

ERRORS

EACCES
Permission to read or search a component of the filename was denied.

EFAULT
buf points to a bad address.

EINVAL
The size argument is zero and buf is not a null pointer.

EINVAL
getwd(): buf is NULL.

ENAMETOOLONG
getwd(): The size of the null-terminated absolute pathname string exceeds PATH_MAX bytes.

ENOENT
The current working directory has been unlinked.

ENOMEM
Out of memory.

ERANGE
The size argument is less than the length of the absolute pathname of the working directory, including the terminating null byte. You need to allocate a bigger array and try again.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getcwd(), getwd()

Thread safetyMT-Safe

get_current_dir_name()

Thread safetyMT-Safe env

VERSIONS

POSIX.1-2001 leaves the behavior of getcwd() unspecified if buf is NULL.

POSIX.1-2001 does not define any errors for getwd().

VERSIONS

C library/kernel differences

On Linux, the kernel provides a getcwd() system call, which the functions described in this page will use if possible. The system call takes the same arguments as the library function of the same name, but is limited to returning at most PATH_MAX bytes. (Before Linux 3.12, the limit on the size of the returned pathname was the system page size. On many architectures, PATH_MAX and the system page size are both 4096 bytes, but a few architectures have a larger page size.) If the length of the pathname of the current working directory exceeds this limit, then the system call fails with the error ENAMETOOLONG. In this case, the library functions fall back to a (slower) alternative implementation that returns the full pathname.

Following a change in Linux 2.6.36, the pathname returned by the getcwd() system call will be prefixed with the string “(unreachable)” if the current directory is not below the root directory of the current process (e.g., because the process set a new filesystem root using chroot(2) without changing its current directory into the new root). Such behavior can also be caused by an unprivileged user by changing the current directory into another mount namespace. When dealing with pathname from untrusted sources, callers of the functions described in this page should consider checking whether the returned pathname starts with ‘/’ or ‘(’ to avoid misinterpreting an unreachable path as a relative pathname.

STANDARDS

getcwd()
POSIX.1-2008.

get_current_dir_name()
GNU.

getwd()
None.

HISTORY

getcwd()
POSIX.1-2001.

getwd()
POSIX.1-2001, but marked LEGACY. Removed in POSIX.1-2008. Use getcwd() instead.

Under Linux, these functions make use of the getcwd() system call (available since Linux 2.1.92). On older systems they would query /proc/self/cwd. If both system call and proc filesystem are missing, a generic implementation is called. Only in that case can these calls fail under Linux with EACCES.

NOTES

These functions are often used to save the location of the current working directory for the purpose of returning to it later. Opening the current directory (".") and calling fchdir(2) to return is usually a faster and more reliable alternative when sufficiently many file descriptors are available, especially on platforms other than Linux.

BUGS

Since the Linux 2.6.36 change that added “(unreachable)” in the circumstances described above, the glibc implementation of getcwd() has failed to conform to POSIX and returned a relative pathname when the API contract requires an absolute pathname. With glibc 2.27 onwards this is corrected; calling getcwd() from such a pathname will now result in failure with ENOENT.

SEE ALSO

pwd(1), chdir(2), fchdir(2), open(2), unlink(2), free(3), malloc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1360 - Linux cli command putchar

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command putchar and provides detailed information about the command putchar, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the putchar.

NAME 🖥️ putchar 🖥️

output of characters and strings

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int fputc(int c, FILE *stream);
int putc(int c, FILE *stream);
int putchar(int c);
int fputs(const char *restrict s, FILE *restrict stream);
int puts(const char *s);

DESCRIPTION

fputc() writes the character c, cast to an unsigned char, to stream.

putc() is equivalent to fputc() except that it may be implemented as a macro which evaluates stream more than once.

putchar(c) is equivalent to putc(c, stdout).

fputs() writes the string s to stream, without its terminating null byte (‘�’).

puts() writes the string s and a trailing newline to stdout.

Calls to the functions described here can be mixed with each other and with calls to other output functions from the stdio library for the same output stream.

For nonlocking counterparts, see unlocked_stdio(3).

RETURN VALUE

fputc(), putc(), and putchar() return the character written as an unsigned char cast to an int or EOF on error.

puts() and fputs() return a nonnegative number on success, or EOF on error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fputc(), fputs(), putc(), putchar(), puts()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89, C99.

BUGS

It is not advisable to mix calls to output functions from the stdio library with low-level calls to write(2) for the file descriptor associated with the same output stream; the results will be undefined and very probably not what you want.

SEE ALSO

write(2), ferror(3), fgets(3), fopen(3), fputwc(3), fputws(3), fseek(3), fwrite(3), putwchar(3), scanf(3), unlocked_stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1361 - Linux cli command TAILQ_CONCAT

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command TAILQ_CONCAT and provides detailed information about the command TAILQ_CONCAT, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the TAILQ_CONCAT.

NAME 🖥️ TAILQ_CONCAT 🖥️

implementation of a doubly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
TAILQ_ENTRY(TYPE);
TAILQ_HEAD(HEADNAME, TYPE);
TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD head);
void TAILQ_INIT(TAILQ_HEAD *head);
int TAILQ_EMPTY(TAILQ_HEAD *head);
void TAILQ_INSERT_HEAD(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_TAIL(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_AFTER(TAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_FIRST(TAILQ_HEAD *head);
struct TYPE *TAILQ_LAST(TAILQ_HEAD *head, HEADNAME);
struct TYPE *TAILQ_PREV(struct TYPE *elm, HEADNAME, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_NEXT(struct TYPE *elm, TAILQ_ENTRY NAME);
TAILQ_FOREACH(struct TYPE *var, TAILQ_HEAD *head,
 TAILQ_ENTRY NAME);
TAILQ_FOREACH_REVERSE(struct TYPE *var, TAILQ_HEAD *head, HEADNAME,
 TAILQ_ENTRY NAME);
void TAILQ_REMOVE(TAILQ_HEAD *head, struct TYPE *elm,
 TAILQ_ENTRY NAME);
void TAILQ_CONCAT(TAILQ_HEAD *head1, TAILQ_HEAD *head2,
 TAILQ_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked tail queues.

In the macro definitions, TYPE is the name of a user defined structure, that must contain a field of type TAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user defined structure that must be declared using the macro TAILQ_HEAD().

Creation

A tail queue is headed by a structure defined by the TAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the queue and the other to the last element in the queue. The elements are doubly linked so that an arbitrary element can be removed without traversing the queue. New elements can be added to the queue after an existing element, before an existing element, at the head of the queue, or at the end of the queue. A TAILQ_HEAD structure is declared as follows:

TAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the queue. A pointer to the head of the queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

TAILQ_ENTRY() declares a structure that connects the elements in the queue.

TAILQ_HEAD_INITIALIZER() evaluates to an initializer for the queue head.

TAILQ_INIT() initializes the queue referenced by

TAILQ_EMPTY() evaluates to true if there are no items on the queue. head.

Insertion

TAILQ_INSERT_HEAD() inserts the new element elm at the head of the queue.

TAILQ_INSERT_TAIL() inserts the new element elm at the end of the queue.

TAILQ_INSERT_BEFORE() inserts the new element elm before the element listelm.

TAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

TAILQ_FIRST() returns the first item on the queue, or NULL if the queue is empty.

TAILQ_LAST() returns the last item on the queue. If the queue is empty the return value is NULL.

TAILQ_PREV() returns the previous item on the queue, or NULL if this item is the first.

TAILQ_NEXT() returns the next item on the queue, or NULL if this item is the last.

TAILQ_FOREACH() traverses the queue referenced by head in the forward direction, assigning each element in turn to var. var is set to NULL if the loop completes normally, or if there were no elements.

TAILQ_FOREACH_REVERSE() traverses the queue referenced by head in the reverse direction, assigning each element in turn to var.

Removal

TAILQ_REMOVE() removes the element elm from the queue.

Other features

TAILQ_CONCAT() concatenates the queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

TAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

TAILQ_FIRST(), TAILQ_LAST(), TAILQ_PREV(), and TAILQ_NEXT() return a pointer to the first, last, previous, or next TYPE structure, respectively.

TAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

STANDARDS

BSD.

HISTORY

4.4BSD.

CAVEATS

TAILQ_FOREACH() and TAILQ_FOREACH_REVERSE() don’t allow var to be removed or freed within the loop, as it would interfere with the traversal. TAILQ_FOREACH_SAFE() and TAILQ_FOREACH_REVERSE_SAFE(), which are present on the BSDs but are not present in glibc, fix this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    TAILQ_ENTRY(entry) entries;             /* Tail queue */
};
TAILQ_HEAD(tailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct tailhead head;                   /* Tail queue head */
    int i;
    TAILQ_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    TAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    TAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    TAILQ_INSERT_AFTER(&head, n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    TAILQ_INSERT_BEFORE(n2, n3, entries);
    TAILQ_REMOVE(&head, n2, entries);       /* Deletion */
    free(n2);
                                            /* Forward traversal */
    i = 0;
    TAILQ_FOREACH(np, &head, entries)
        np->data = i++;
                                            /* Reverse traversal */
    TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = TAILQ_FIRST(&head); while (n1 != NULL) { n2 = TAILQ_NEXT(n1, entries); free(n1); n1 = n2; } TAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1362 - Linux cli command Regexp_Common_URI_telpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_URI_telpm and provides detailed information about the command Regexp_Common_URI_telpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_URI_telpm.

NAME 🖥️ Regexp_Common_URI_telpm 🖥️

  • Returns a pattern for telephone URIs.

SYNOPSIS

use Regexp::Common qw /URI/; while (<>) { /$RE{URI}{tel}/ and print “Contains a telephone URI. “; }

DESCRIPTION

$RE{URI}{tel}

Returns a pattern that matches tel URIs, as defined by RFC 2806. Under {-keep}, the following are returned:

$1
The complete URI.

$2
The scheme.

$3
The phone number, including any possible add-ons like ISDN subaddress, a post dial part, area specifier, service provider, etc.

“$RE{URI}{tel}{nofuture}”

As above (including what’s returned by {-keep}), with the exception that future extensions are not allowed. Without allowing those future extensions, it becomes much easier to check a URI if the correct syntax for post dial, service provider, phone context, etc has been used - otherwise the regex could always classify them as a future extension.

REFERENCES

[RFC 1035]
Mockapetris, P.: DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION. November 1987.

[RFC 2396]
Berners-Lee, Tim, Fielding, R., and Masinter, L.: Uniform Resource Identifiers (URI): Generic Syntax. August 1998.

[RFC 2806]
Vaha-Sipila, A.: URLs for Telephone Calls. April 2000.

SEE ALSO

Regexp::Common::URI for other supported URIs.

AUTHOR

Damian Conway ([email protected])

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1363 - Linux cli command XtRegisterGrabAction

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtRegisterGrabAction and provides detailed information about the command XtRegisterGrabAction, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtRegisterGrabAction.

NAME 🖥️ XtRegisterGrabAction 🖥️

register button and key grabs

SYNTAX

#include <X11/Intrinsic.h>

void XtRegisterGrabAction(XtActionProc action_proc, Boolean owner_events, unsigned int event_mask, int pointer_mode, int keyboard_mode);

ARGUMENTS

action_proc
Specifies the action procedure to search for in translation tables.

action

event

params

num_params
Specify arguments to XtGrabButton or XtGrabKey

DESCRIPTION

XtRegisterGrabAction adds the specified action_proc to a list known to the translation manager.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1364 - Linux cli command Moose_Meta_Attribute_Native_Trait_Codepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Attribute_Native_Trait_Codepm and provides detailed information about the command Moose_Meta_Attribute_Native_Trait_Codepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Attribute_Native_Trait_Codepm.

NAME 🖥️ Moose_Meta_Attribute_Native_Trait_Codepm 🖥️

Helper trait for CodeRef attributes

VERSION

version 2.2207

SYNOPSIS

package Foo; use Moose; has callback => ( traits => [Code], is => ro, isa => CodeRef, default => sub { sub { print “called” } }, handles => { call => execute, }, ); my $foo = Foo->new; $foo->call; # prints “called”

DESCRIPTION

This trait provides native delegation methods for code references.

DEFAULT TYPE

If you don’t provide an isa value for your attribute, it will default to CodeRef.

PROVIDED METHODS

  • execute(@args) Calls the coderef with the given args.

  • execute_method(@args) Calls the coderef with the instance as invocant and given args.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1365 - Linux cli command Moose_Meta_Class_Immutable_Traitpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Class_Immutable_Traitpm and provides detailed information about the command Moose_Meta_Class_Immutable_Traitpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Class_Immutable_Traitpm.

NAME 🖥️ Moose_Meta_Class_Immutable_Traitpm 🖥️

Implements immutability for metaclass objects

VERSION

version 2.2207

DESCRIPTION

This class makes some Moose-specific metaclass methods immutable. This is deep guts.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1366 - Linux cli command Module_Runtime_Conflictspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Module_Runtime_Conflictspm and provides detailed information about the command Module_Runtime_Conflictspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Module_Runtime_Conflictspm.

NAME 🖥️ Module_Runtime_Conflictspm 🖥️

Provide information on conflicts for Module::Runtime

VERSION

version 0.003

SYNOPSIS

`moose-outdated`

or

use Module::Runtime::Conflicts; Module::Runtime::Conflicts->check_conflicts;

DESCRIPTION

This module provides conflicts checking for Module::Runtime, which had a recent release that broke some versions of Moose. It is called from Moose::Conflicts and moose-outdated.

SEE ALSO

  • Dist::CheckConflicts

  • Moose::Conflicts

  • Dist::Zilla::Plugin::Breaks

  • Dist::Zilla::Plugin::Test::CheckBreaks

SUPPORT

Bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=Module-Runtime-Conflicts> (or [email protected] <mailto:[email protected]>).

There is also a mailing list available for users of this distribution, at <http://lists.perl.org/list/cpan-workers.html>.

There is also an irc channel available for users of this distribution, at #toolchain on irc.perl.org <irc://irc.perl.org/#toolchain>.

I am also usually active on irc, as ’ether’ at irc.perl.org.

AUTHOR

Karen Etheridge <[email protected]>

COPYRIGHT AND LICENCE

This software is copyright (c) 2014 by Karen Etheridge.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1367 - Linux cli command XmbufGetBufferAttributes

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XmbufGetBufferAttributes and provides detailed information about the command XmbufGetBufferAttributes, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XmbufGetBufferAttributes.

NAME 🖥️ XmbufGetBufferAttributes 🖥️

X multibuffering functions

SYNTAX

#include <X11/extensions/multibuf.h>

Bool XmbufQueryExtension(
    Display *dpy,
    Display *dpy,
    int *event_base_return,
    int *error_base_return);

Status XmbufGetVersion(
    Display *dpy,
    int *major_version_return,
    int *minor_version_return);

int XmbufCreateBuffers(
    Display *dpy,
    Window window,
    int count,
    int update_action,
    int update_hint,
    Multibuffer *buffers_update);

void XmbufDestroyBuffers(
    Display *dpy,
    Window window);

void XmbufDisplayBuffers(
    Display *dpy,
    int count,
    Multibuffer *buffers,
    int min_delay,
    int max_delay);

Status XmbufGetWindowAttributes(
    Display *dpy,
    Window window,
    XmbufWindowAttributes *attributes);

void XmbufChangeWindowAttributes(
    Display *dpy,
    Window window,
    unsigned long valuemask,
    XmbufSetWindowAttributes *attributes);

Status XmbufGetBufferAttributes(
    Display *dpy,
    Multibuffer buffer,
    XmbufBufferAttributes *attributes);

void XmbufChangeBufferAttributes(
    Display *dpy,
    Multibuffer buffer,
    unsigned long valuemask,
    XmbufSetBufferAttributes *attributes);

Status XmbufGetScreenInfo(
    Display *dpy,
    Drawable drawable,
    int *nmono_return,
    XmbufBufferInfo **mono_info_return,
    int *nstereo_return,
    XmbufBufferInfo **stereo_info_return);

Window XmbufCreateStereoWindow(
    Display *dpy,
    Window parent,
    int x,
    int y,
    unsigned int width,
    unsigned int height,
    unsigned int border_width,
    int depth,
    unsigned int class,                 /* InputOutput, InputOnly*/
    Visual *visual,
    unsigned long valuemask,
    XSetWindowAttributes *attributes,
    Multibuffer *left_return,
    Multibuffer *right_return);

STRUCTURES

Events:

typedef struct {
    int type;   /* of event */
    unsigned long serial;       /* # of last request processed by server */
    int send_event;     /* true if this came from a SendEvent request */
    Display *display;   /* Display the event was read from */
    Multibuffer buffer; /* buffer of event */
    int state;  /* see Clobbered constants above */
} XmbufClobberNotifyEvent;

typedef struct {
    int type;   /* of event */
    unsigned long serial;       /* # of last request processed by server */
    int send_event;     /* true if this came from a SendEvent request */
    Display *display;   /* Display the event was read from */
    Multibuffer buffer; /* buffer of event */
} XmbufUpdateNotifyEvent;

Per-window attributes that can be got:

typedef struct {
    int displayed_index;	/* which buffer is being displayed */
    int update_action;	/* Undefined, Background, Untouched, Copied */
    int update_hint;	/* Frequent, Intermittent, Static */
    int window_mode;	/* Mono, Stereo */
    int nbuffers;	/* Number of buffers */
    Multibuffer *buffers;	/* Buffers */
} XmbufWindowAttributes;

Per-window attributes that can be set:

typedef struct {
    int update_hint;	/* Frequent, Intermittent, Static */
} XmbufSetWindowAttributes;

Per-buffer attributes that can be got:

typedef struct {
    Window window;	/* which window this belongs to */
    unsigned long event_mask;	/* events that have been selected */
    int buffer_index;	/* which buffer is this */
    int side;	/* Mono, Left, Right */
} XmbufBufferAttributes;

Per-buffer attributes that can be set:

typedef struct {
    unsigned long event_mask;	/* events that have been selected */
} XmbufSetBufferAttributes;

Per-screen buffer info (there will be lists of them):

typedef struct {
    VisualID visualid;	/* visual usable at this depth */
    int max_buffers;	/* most buffers for this visual */
    int depth;	/* depth of buffers to be created */
} XmbufBufferInfo;

DESCRIPTION

The application programming library for the X11 Double-Buffering, Multi-Buffering, and Stereo Extension contains the interfaces described below. With the exception of * XmbufQueryExtension *, if any of these routines are called with a display that does not support the extension, the ExtensionErrorHandler (which can be set with * XSetExtensionErrorHandler * and functions the same way as * XSetErrorHandler *) will be called and the function will then return.

* XmbufQueryExtension * returns * True * if the multibuffering/stereo extension is available on the given display. If the extension exists, the value of the first event code (which should be added to the event type constants * MultibufferClobberNotify * and * MultibufferUpdateNotify * to get the actual values) is stored into event_base_return and the value of the first error code (which should be added to the error type constant * MultibufferBadBuffer * to get the actual value) is stored into error_base_return.

* XmbufGetVersion * gets the major and minor version numbers of the extension. The return value is zero if an error occurs or non-zero if no error happens.

* XmbufCreateBuffers * requests that “count” buffers be created with the given update_action and update_hint and be associated with the indicated window. The number of buffers created is returned (zero if an error occurred) and buffers_update is filled in with that many Multibuffer identifiers.

* XmbufDestroyBuffers * destroys the buffers associated with the given window.

* XmbufDisplayBuffers * displays the indicated buffers their appropriate windows within max_delay milliseconds after min_delay milliseconds have passed. No two buffers may be associated with the same window or else a Match error is generated.

* XmbufGetWindowAttributes * gets the multibuffering attributes that apply to all buffers associated with the given window. The list of buffers returns may be freed with * XFree *. Returns non-zero on success and zero if an error occurs.

* XmbufChangeWindowAttributes * sets the multibuffering attributes that apply to all buffers associated with the given window. This is currently limited to the update_hint.

* XmbufGetBufferAttributes * gets the attributes for the indicated buffer. Returns non-zero on success and zero if an error occurs.

* XmbufChangeBufferAttributes * sets the attributes for the indicated buffer. This is currently limited to the event_mask.

* XmbufGetScreenInfo * gets the parameters controlling how mono and stereo windows may be created on the screen of the given drawable. The numbers of sets of visual and depths are returned in nmono_return and nstereo_return. If nmono_return is greater than zero, then mono_info_return is set to the address of an array of * XmbufBufferInfo * structures describing the various visuals and depths that may be used. Otherwise, mono_info_return is set to NULL. Similarly, stereo_info_return is set according to nstereo_return. The storage returned in mono_info_return and stereo_info_return may be released by * XFree *. If no errors are encounted, non-zero will be returned.

* XmbufCreateStereoWindow * creates a stereo window in the same way that * XCreateWindow * creates a mono window. The buffer ids for the left and right buffers are returned in left_return and right_return, respectively. If an extension error handler that returns is installed, * None * will be returned if the extension is not available on this display.

PREDEFINED VALUES

Update_action field:

 MultibufferUpdateActionUndefined   MultibufferUpdateActionBackground   MultibufferUpdateActionUntouched   MultibufferUpdateActionCopied 

Update_hint field:

 MultibufferUpdateHintFrequent   MultibufferUpdateHintIntermittent   MultibufferUpdateHintStatic 

Valuemask fields:

 MultibufferWindowUpdateHint   MultibufferBufferEventMask 

Mono vs. stereo and left vs. right:

 MultibufferModeMono   MultibufferModeStereo   MultibufferSideMono   MultibufferSideLeft   MultibufferSideRight 

Clobber state:

 MultibufferUnclobbered   MultibufferPartiallyClobbered   MultibufferFullyClobbered 

Event stuff:

 MultibufferClobberNotifyMask   MultibufferUpdateNotifyMask   MultibufferClobberNotify   MultibufferUpdateNotify   MultibufferNumberEvents   MultibufferBadBuffer   MultibufferNumberErrors 

BUGS

This manual page needs more work.

SEE ALSO

Extending X for Double Buffering, Multi-Buffering, and Stereo

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1368 - Linux cli command isspace

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isspace and provides detailed information about the command isspace, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isspace.

NAME 🖥️ isspace 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1369 - Linux cli command Pod_ParseUtilspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Pod_ParseUtilspm and provides detailed information about the command Pod_ParseUtilspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Pod_ParseUtilspm.

NAME 🖥️ Pod_ParseUtilspm 🖥️

helpers for POD parsing and conversion

SYNOPSIS

use Pod::ParseUtils; my $list = new Pod::List; my $link = Pod::Hyperlink->new(Pod::Parser);

DESCRIPTION

NOTE: This module is considered legacy; modern Perl releases (5.31.1 and higher) are going to remove Pod-Parser from core and use Pod::Simple for all things POD.

Pod::ParseUtils contains a few object-oriented helper packages for POD parsing and processing (i.e. in POD formatters and translators).

Pod::List

Pod::List can be used to hold information about POD lists (written as =over … =item … =back) for further processing. The following methods are available:

Pod::List->new()
Create a new list object. Properties may be specified through a hash reference like this: my $list = Pod::List->new({ -start => $., -indent => 4 }); See the individual methods/properties for details.

$list->file()
Without argument, retrieves the file name the list is in. This must have been set before by either specifying -file in the new() method or by calling the file() method with a scalar argument.

$list->start()
Without argument, retrieves the line number where the list started. This must have been set before by either specifying -start in the new() method or by calling the start() method with a scalar argument.

$list->indent()
Without argument, retrieves the indent level of the list as specified in =over n. This must have been set before by either specifying -indent in the new() method or by calling the indent() method with a scalar argument.

$list->type()
Without argument, retrieves the list type, which can be an arbitrary value, e.g. OL, UL, … when thinking the HTML way. This must have been set before by either specifying -type in the new() method or by calling the type() method with a scalar argument.

$list->rx()
Without argument, retrieves a regular expression for simplifying the individual item strings once the list type has been determined. Usage: E.g. when converting to HTML, one might strip the leading number in an ordered list as <OL> already prints numbers itself. This must have been set before by either specifying -rx in the new() method or by calling the rx() method with a scalar argument.

$list->item()
Without argument, retrieves the array of the items in this list. The items may be represented by any scalar. If an argument has been given, it is pushed on the list of items.

$list->parent()
Without argument, retrieves information about the parent holding this list, which is represented as an arbitrary scalar. This must have been set before by either specifying -parent in the new() method or by calling the parent() method with a scalar argument.

$list->tag()
Without argument, retrieves information about the list tag, which can be any scalar. This must have been set before by either specifying -tag in the new() method or by calling the tag() method with a scalar argument.

Pod::Hyperlink is a class for manipulation of POD hyperlinks. Usage:

my $link = Pod::Hyperlink->new(alternative text|page/“section in page”);

The Pod::Hyperlink class is mainly designed to parse the contents of the L<...> sequence, providing a simple interface for accessing the different parts of a POD hyperlink for further processing. It can also be used to construct hyperlinks.

Pod::Hyperlink->new()
The new() method can either be passed a set of key/value pairs or a single scalar value, namely the contents of a L<...> sequence. An object of the class Pod::Hyperlink is returned. The value undef indicates a failure, the error message is stored in $@.

$link->parse($string)
This method can be used to (re)parse a (new) hyperlink, i.e. the contents of a L<...> sequence. The result is stored in the current object. Warnings are stored in the warnings property. E.g. sections like L<open(2)> are deprecated, as they do not point to Perl documents. L<DBI::foo(3p)> is wrong as well, the manpage section can simply be dropped.

$link->markup($string)
Set/retrieve the textual value of the link. This string contains special markers P<> and Q<> that should be expanded by the translator’s interior sequence expansion engine to the formatter-specific code to highlight/activate the hyperlink. The details have to be implemented in the translator.

$link->text()
This method returns the textual representation of the hyperlink as above, but without markers (read only). Depending on the link type this is one of the following alternatives (the + and * denote the portions of the text that are marked up): +perl+ L<perl> *$|* in +perlvar+ L<perlvar/$|> *OPTIONS* in +perldoc+ L<perldoc/“OPTIONS”> *DESCRIPTION* L<“DESCRIPTION”>

$link->warning()
After parsing, this method returns any warnings encountered during the parsing process.

$link->file()

$link->line()

Just simple slots for storing information about the line and the file the link was encountered in. Has to be filled in manually.

$link->page()
This method sets or returns the POD page this link points to.

$link->node()
As above, but the destination node text of the link.

$link->alttext()
Sets or returns an alternative text specified in the link.

$link->type()
The node type, either section or item. As an unofficial type, there is also hyperlink, derived from e.g. L<http://perl.com>

$link->link()
Returns the link as contents of L<>. Reciprocal to parse().

Pod::Cache

Pod::Cache holds information about a set of POD documents, especially the nodes for hyperlinks. The following methods are available:

Pod::Cache->new()
Create a new cache object. This object can hold an arbitrary number of POD documents of class Pod::Cache::Item.

$cache->item()
Add a new item to the cache. Without arguments, this method returns a list of all cache elements.

$cache->find_page($name)
Look for a POD document named $name in the cache. Returns the reference to the corresponding Pod::Cache::Item object or undef if not found.

Pod::Cache::Item

Pod::Cache::Item holds information about individual POD documents, that can be grouped in a Pod::Cache object. It is intended to hold information about the hyperlink nodes of POD documents. The following methods are available:

Pod::Cache::Item->new()
Create a new object.

$cacheitem->page()
Set/retrieve the POD document name (e.g. “Pod::Parser”).

$cacheitem->description()
Set/retrieve the POD short description as found in the =head1 NAME section.

$cacheitem->path()
Set/retrieve the POD file storage path.

$cacheitem->file()
Set/retrieve the POD file name.

$cacheitem->nodes()
Add a node (or a list of nodes) to the document’s node list. Note that the order is kept, i.e. start with the first node and end with the last. If no argument is given, the current list of nodes is returned in the same order the nodes have been added. A node can be any scalar, but usually is a pair of node string and unique id for the find_node method to work correctly.

$cacheitem->find_node($name)
Look for a node or index entry named $name in the object. Returns the unique id of the node (i.e. the second element of the array stored in the node array) or undef if not found.

$cacheitem->idx()
Add an index entry (or a list of them) to the document’s index list. Note that the order is kept, i.e. start with the first node and end with the last. If no argument is given, the current list of index entries is returned in the same order the entries have been added. An index entry can be any scalar, but usually is a pair of string and unique id.

AUTHOR

Please report bugs using <http://rt.cpan.org>.

Marek Rouchal <[email protected]>, borrowing a lot of things from pod2man and pod2roff as well as other POD processing tools by Tom Christiansen, Brad Appleton and Russ Allbery.

Pod::ParseUtils is part of the Pod::Parser distribution.

SEE ALSO

pod2man, pod2roff, Pod::Parser, Pod::Checker, pod2html

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1370 - Linux cli command Tk_Radiobuttonpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Radiobuttonpm and provides detailed information about the command Tk_Radiobuttonpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Radiobuttonpm.

NAME 🖥️ Tk_Radiobuttonpm 🖥️

Create and manipulate Radiobutton widgets

SYNOPSIS

$radiobutton = $parent->Radiobutton(?options?);

STANDARD OPTIONS

-activebackground -activeforeground -anchor -background -bitmap -borderwidth -compound -cursor -disabledforeground -font -foreground -highlightbackground -highlightcolor -highlightthickness -image -justify -padx -pady -relief -takefocus -text -textvariable -underline -wraplength

See Tk::options for details of the standard options.

WIDGET-SPECIFIC OPTIONS

Name: command

Class: Command

Switch: -command

Specifies a perl/Tk callback to associate with the button. This command is typically invoked when mouse button 1 is released over the button window. The button’s global variable (-variable option) will be updated before the command is invoked.

Name: height

Class: Height

Switch: -height

Specifies a desired height for the button. If an image or bitmap is being displayed in the button then the value is in screen units (i.e. any of the forms acceptable to Tk_GetPixels); for text it is in lines of text. If this option isn’t specified, the button’s desired height is computed from the size of the image or bitmap or text being displayed in it.

Name: indicatorOn

Class: IndicatorOn

Switch: -indicatoron

Specifies whether or not the indicator should be drawn. Must be a proper boolean value. If false, the relief option is ignored and the widget’s relief is always sunken if the widget is selected and raised otherwise.

Command-Line Name: -offrelief

Database Name: offRelief

Database Class: OffRelief

Specifies the relief for the checkbutton when the indicator is not drawn and the checkbutton is off. The default value is raised. By setting this option to flat and setting -indicatoron false -overrelief raised, the effect is achieved of having a flat button that raises on mouse-over and which is depressed when activated. This is the behavior typically exhibited by the Bold, Italic, and Underline checkbuttons on the toolbar of a word-processor, for example.

Command-Line Name: -overrelief

Database Name: overRelief

Database Class: OverRelief

Specifies an alternative relief for the button, to be used when the mouse cursor is over the widget. This option can be used to make toolbar buttons, by configuring -relief flat -overrelief raised. If the value of this option is the empty string, then no alternative relief is used when the mouse cursor is over the button. The empty string is the default value.

Name: selectColor

Class: Background

Switch: -selectcolor

Specifies a background color to use when the button is selected. If indicatorOn is true then the color applies to the indicator. Under Windows, this color is used as the background for the indicator regardless of the select state. If indicatorOn is false, this color is used as the background for the entire widget, in place of background or activeBackground, whenever the widget is selected. If specified as an empty string then no special color is used for displaying when the widget is selected.

Name: selectImage

Class: SelectImage

Switch: -selectimage

Specifies an image to display (in place of the image option) when the radiobutton is selected. This option is ignored unless the image option has been specified.

Name: state

Class: State

Switch: -state

Specifies one of three states for the radiobutton: normal, active, or disabled. In normal state the radiobutton is displayed using the foreground and background options. The active state is typically used when the pointer is over the radiobutton. In active state the radiobutton is displayed using the activeForeground and activeBackground options. Disabled state means that the radiobutton should be insensitive: the default bindings will refuse to activate the widget and will ignore mouse button presses. In this state the disabledForeground and background options determine how the radiobutton is displayed.

Name: value

Class: Value

Switch: -value

Specifies value to store in the button’s associated variable whenever this button is selected.

Name: variable

Class: Variable

Switch: -variable

Specifies reference to a variable to set whenever this button is selected. Changes in this variable also cause the button to select or deselect itself. Defaults to the value \$Tk::selectedButton.

Name: width

Class: Width

Switch: -width

Specifies a desired width for the button. If an image or bitmap is being displayed in the button, the value is in screen units (i.e. any of the forms acceptable to Tk_GetPixels); for text it is in characters. If this option isn’t specified, the button’s desired width is computed from the size of the image or bitmap or text being displayed in it.

DESCRIPTION

The Radiobutton method creates a new window (given by the $widget argument) and makes it into a radiobutton widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the radiobutton such as its colors, font, text, and initial relief. The radiobutton command returns its $widget argument. At the time this command is invoked, there must not exist a window named $widget, but $widget’s parent must exist.

A radiobutton is a widget that displays a textual string, bitmap or image and a diamond or circle called an indicator. If text is displayed, it must all be in a single font, but it can occupy multiple lines on the screen (if it contains newlines or if wrapping occurs because of the wrapLength option) and one of the characters may optionally be underlined using the underline option. A radiobutton has all of the behavior of a simple button: it can display itself in either of three different ways, according to the state option; it can be made to appear raised, sunken, or flat; it can be made to flash; and it invokes a perl/Tk callback whenever mouse button 1 is clicked over the check button.

In addition, radiobuttons can be selected. If a radiobutton is selected, the indicator is normally drawn with a selected appearance, and a Tcl variable associated with the radiobutton is set to a particular value (normally 1). Under Unix, the indicator is drawn with a sunken relief and a special color. Under Windows, the indicator is drawn with a round mark inside. If the radiobutton is not selected, then the indicator is drawn with a deselected appearance, and the associated variable is set to a different value (typically 0). Under Unix, the indicator is drawn with a raised relief and no special color. Under Windows, the indicator is drawn without a round mark inside. Typically, several radiobuttons share a single variable and the value of the variable indicates which radiobutton is to be selected. When a radiobutton is selected it sets the value of the variable to indicate that fact; each radiobutton also monitors the value of the variable and automatically selects and deselects itself when the variable’s value changes. By default the variable selectedButton is used; its contents give the name of the button that is selected, or the empty string if no button associated with that variable is selected. The name of the variable for a radiobutton, plus the variable to be stored into it, may be modified with options on the command line or in the option database. Configuration options may also be used to modify the way the indicator is displayed (or whether it is displayed at all). By default a radiobutton is configured to select itself on button clicks.

WIDGET METHODS

The Radiobutton method creates a widget object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class.

The following additional methods are available for radiobutton widgets:

$radiobutton->deselect
Deselects the radiobutton and sets the associated variable to an empty string. If this radiobutton was not currently selected, the command has no effect.

$radiobutton->flash
Flashes the radiobutton. This is accomplished by redisplaying the radiobutton several times, alternating between active and normal colors. At the end of the flash the radiobutton is left in the same normal/active state as when the command was invoked. This command is ignored if the radiobutton’s state is disabled.

$radiobutton->invoke
Does just what would have happened if the user invoked the radiobutton with the mouse: selects the button and invokes its associated Tcl command, if there is one. The return value is the return value from the Tcl command, or an empty string if there is no command associated with the radiobutton. This command is ignored if the radiobutton’s state is disabled.

$radiobutton->select
Selects the radiobutton and sets the associated variable to the value corresponding to this widget.

BINDINGS

Tk automatically creates class bindings for radiobuttons that give them the following default behavior:

[1]
On Unix systems, a radiobutton activates whenever the mouse passes over it and deactivates whenever the mouse leaves the radiobutton. On Mac and Windows systems, when mouse button 1 is pressed over a radiobutton, the button activates whenever the mouse pointer is inside the button, and deactivates whenever the mouse pointer leaves the button.

[2]
When mouse button 1 is pressed over a radiobutton it is invoked (it becomes selected and the command associated with the button is invoked, if there is one).

[3]
When a radiobutton has the input focus, the space key causes the radiobutton to be invoked. If the radiobutton’s state is disabled then none of the above actions occur: the radiobutton is completely non-responsive. The behavior of radiobuttons can be changed by defining new bindings for individual widgets or by redefining the class bindings.

KEYWORDS

radiobutton, widget

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1371 - Linux cli command XtResolvePathname

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtResolvePathname and provides detailed information about the command XtResolvePathname, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtResolvePathname.

NAME 🖥️ XtResolvePathname 🖥️

search for a file using standard substitution

SYNTAX

#include <X11/Intrinsic.h>

char * XtResolvePathname(Display *display, const char *type, const char *filename, const char *suffix, const char *path, Substitution substitutions, Cardinal num_substitutions, XtFilePredicate predicate);

ARGUMENTS

display
Specifies the display to use to find the language for language substitutions.

type

filename

suffix
Specify values to substitute into the path.

path
Specifies the list of file specifications, or NULL.

substitutions
Specifies a list of additional substitutions to make into the path, or NULL.

num_substitutions
Specifies the number of entries in substitutions.

predicate
Specifies a procedure called to judge each potential file name, or NULL.

DESCRIPTION

The substitutions specified by XtResolvePathname are determined from the value of the language string retrieved by XtDisplayInitialize for the specified display. To set the language for all applications specify *xnlLanguage: lang in the resource database. The format and content of the language string are implementation-defined. One suggested syntax is to compose the language string of three parts: a language part, a territory part and a codeset part. The manner in which this composition is accomplished is implementation-defined and the Intrinsics make no interpretation of the parts other than to use them in substitutions as described below.

XtResolvePathname calls XtFindFile with the following substitutions in addition to any passed by the caller and returns the value returned by XtFindFile:

%N
The value of the filename parameter, or the application’s class name if filename is NULL.

%T
The value of the type parameter.

%S
The value of the suffix parameter.

%L
The language string associated with the specified display.

%l
The language part of the display’s language string.

%t
The territory part of the display’s language string.

%c
The codeset part of the display’s language string.

%C
The customization string retrieved from the resource database associated with display.

%D
The value of the implementation-specific default path.

If a path is passed to XtResolvePathname, it will be passed along to XtFindFile. If the path argument is NULL, the value of the XFILESEARCHPATH environment variable will be passed to XtFindFile. If XFILESEARCHPATH is not defined, an implementation-specific default path will be used which contains at least 6 entries. These entries must contain the following substitutions:

1.	%C, %N, %S, %T, %L	or	%C, %N, %S, %T, %l, %t, %c
2.	%C, %N, %S, %T, %l
3.	%C, %N, %S, %T
4.	%N, %S, %T, %L	or	%N, %S, %T, %l, %t, %c
5.	%N, %S, %T, %l
6.	%N, %S, %T

The order of these six entries within the path must be as given above. The order and use of substitutions within a given entry is implementation dependent. If the path begins with a colon, it will be preceded by %N%S. If the path includes two adjacent colons, %N%S will be inserted between them.

The type parameter is intended to be a category of files, usually being translated into a directory in the pathname. Possible values might include app-defaults, help, and bitmap.

The suffix parameter is intended to be appended to the file name. Possible values might include .txt, .dat, and .bm.

A suggested value for the default path on POSIX-based systems is

/usr/lib/X11/%L/%T/%N%C%S:/usr/lib/X11/%l/%T/%N%C%S:\
/usr/lib/X11/%T/%N%C%S:/usr/lib/X11/%L/%T/%N%S:\
/usr/lib/X11/%l/%T/%N%S:/usr/lib/X11/%T/%N%S

Using this example, if the user has specified a language, it will be used as a subdirectory of /usr/lib/X11 that will be searched for other files. If the desired file is not found there, the lookup will be tried again using just the language part of the specification. If the file is not there, it will be looked for in /usr/lib/X11. The type parameter is used as a subdirectory of the language directory or of /usr/lib/X11, and suffix is appended to the file name.

The %D substitution allows the addition of path elements to the implementation-specific default path, typically to allow additional directories to be searched without preventing resources in the system directories from being found. For example, a user installing resource files under a directory called ourdir might set XFILESEARCHPATH to

%D:ourdir/%T/%N%C:ourdir/%T/%N

The customization string is obtained by querying the resource database currently associated with the display (the database returned by XrmGetDatabase) for the resource application_name.customization, class application_class.Customization where application_name and application_class are the values returned by XtGetApplicationNameAndClass. If no value is specified in the database, the empty string is used.

It is the responsibility of the caller to free the returned string using XtFree when it is no longer needed.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1372 - Linux cli command pcap_set_rfmonpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_set_rfmonpcap and provides detailed information about the command pcap_set_rfmonpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_set_rfmonpcap.

NAME 🖥️ pcap_set_rfmonpcap 🖥️

set monitor mode for a not-yet-activated capture handle

SYNOPSIS

#include <pcap/pcap.h>
int pcap_set_rfmon(pcap_t *p, int rfmon);

DESCRIPTION

pcap_set_rfmon() sets whether monitor mode should be set on a capture handle when the handle is activated. If rfmon is non-zero, monitor mode will be set, otherwise it will not be set.

RETURN VALUE

pcap_set_rfmon() returns 0 on success or PCAP_ERROR_ACTIVATED if called on a capture handle that has been activated.

SEE ALSO

pcap(3PCAP), pcap_create(3PCAP), pcap_activate(3PCAP), pcap_can_set_rfmon(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1373 - Linux cli command qsort

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command qsort and provides detailed information about the command qsort, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the qsort.

NAME 🖥️ qsort 🖥️

sort an array

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
void qsort(void base[.size * .nmemb], size_t nmemb, size_t size,
 int (*compar)(const void [.size], const void [.size]));
void qsort_r(void base[.size * .nmemb], size_t nmemb, size_t size,
 int (*compar)(const void [.size], const void [.size], void *),
 void *arg);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

qsort_r():

    _GNU_SOURCE

DESCRIPTION

The qsort() function sorts an array with nmemb elements of size size. The base argument points to the start of the array.

The contents of the array are sorted in ascending order according to a comparison function pointed to by compar, which is called with two arguments that point to the objects being compared.

The comparison function must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second. If two members compare as equal, their order in the sorted array is undefined.

The qsort_r() function is identical to qsort() except that the comparison function compar takes a third argument. A pointer is passed to the comparison function via arg. In this way, the comparison function does not need to use global variables to pass through arbitrary arguments, and is therefore reentrant and safe to use in threads.

RETURN VALUE

The qsort() and qsort_r() functions return no value.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

qsort(), qsort_r()

Thread safetyMT-Safe

STANDARDS

qsort()
C11, POSIX.1-2008.

HISTORY

qsort()
POSIX.1-2001, C89, SVr4, 4.3BSD.

qsort_r()
glibc 2.8.

NOTES

To compare C strings, the comparison function can call strcmp(3), as shown in the example below.

EXAMPLES

For one example of use, see the example under bsearch(3).

Another example is the following program, which sorts the strings given in its command-line arguments:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static int
cmpstringp(const void *p1, const void *p2)
{
    /* The actual arguments to this function are "pointers to
       pointers to char", but strcmp(3) arguments are "pointers
       to char", hence the following cast plus dereference. */
    return strcmp(*(const char **) p1, *(const char **) p2);
}
int
main(int argc, char *argv[])
{
    if (argc < 2) {
        fprintf(stderr, "Usage: %s <string>...

“, argv[0]); exit(EXIT_FAILURE); } qsort(&argv[1], argc - 1, sizeof(char *), cmpstringp); for (size_t j = 1; j < argc; j++) puts(argv[j]); exit(EXIT_SUCCESS); }

SEE ALSO

sort(1), alphasort(3), strcmp(3), versionsort(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1374 - Linux cli command NetPacket_USBMonpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command NetPacket_USBMonpm and provides detailed information about the command NetPacket_USBMonpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the NetPacket_USBMonpm.

NAME 🖥️ NetPacket_USBMonpm 🖥️

Assemble and disassemble USB packets captured via Linux USBMon interface.

VERSION

version 1.7.2

SYNOPSIS

use NetPacket::USBMon; $usb = NetPacket::USBMon->decode($raw_pkt);

DESCRIPTION

NetPacket::USBMon is a NetPacket decoder of USB packets captured via Linux USBMon interface.

Methods

“NetPacket::USBMon->decode([RAW PACKET])”
Decode a USB packet.

Instance data

The instance data for the NetPacket::UDP object consists of the following fields.

id
An in-kernel address of the USB Request Block (URB). Stays the same for the transaction submission and completion. Might be truncatted when reading a 64-bit capture with 32-bit file.

type
URB type. Character ‘S’, ‘C’ or ‘E’, for constants USB_TYPE_SUBMISSION, USB_TYPE_CALLBACK or USB_TYPE_ERROR.

xfer_type
Transfer type. USB_XFER_TYPE_ISO, USB_XFER_TYPE_INTR, USB_XFER_TYPE_CONTROL or USB_XFER_TYPE_BULK.

ep
Endpoint identification.

num
Endpoint number.

dir
Transfer direction. IN or OUT.

devnum
Device address.

busnum
Bus number.

flag_setup
Indicates whether setup is present and makes sense.

flag_data
Indicates whether data is present and makes sense.

ts_sec
Timestamp seconds since epoch. Subject to truncation with 32-bit Perl, which should be fine until 2038.

ts_usec
Timestamp microseconds.

status
URB status. Negative errno.

length
Length of data (submitted or actual).

len_cap
Delivered length

setup
Only present for packets with setup_flag turned on. Some contents are dependent on actual request type.

bmRequestType

bRequest

wValue

wIndex

wLength

iso

Only present for isochronous transfers.

error_count

numdesc

interval

Isochronous packet response rate.

start_frame
Only applicable to isochronous transfers.

xfer_flags
A copy of URB’s transfer_flags.

ndesc
Actual number of isochronous descriptors.

data
Packet payload.

Exports

default
none

exportable
USB_TYPE_SUBMISSION, USB_TYPE_CALLBACK, USB_TYPE_ERROR, USB_XFER_TYPE_ISO, USB_XFER_TYPE_INTR, USB_XFER_TYPE_CONTROL, USB_XFER_TYPE_BULK, USB_FLAG_SETUP_IRRELEVANT, USB_FLAG_SETUP_RELEVANT, USB_FLAG_DATA_ERROR, USB_FLAG_DATA_INCOMING, USB_FLAG_DATA_OUTGOING, USB_FLAG_DATA_PRESENT, USB_TYPE_VENDOR

tags
The following tags group together related exportable items.

“:types”
USB_TYPE_SUBMISSION, USB_TYPE_CALLBACK, USB_TYPE_ERROR

“:xfer_types”
USB_XFER_TYPE_ISO, USB_XFER_TYPE_INTR, USB_XFER_TYPE_CONTROL, USB_XFER_TYPE_BULK

“:setup_flags”
USB_FLAG_SETUP_IRRELEVANT, USB_FLAG_SETUP_RELEVANT

“:data_flags”
USB_FLAG_DATA_ERROR, USB_FLAG_DATA_INCOMING, USB_FLAG_DATA_OUTGOING, USB_FLAG_DATA_PRESENT

“:setup_types”
USB_TYPE_VENDOR

“:ALL”
All the above exportable items.

COPYRIGHT

Copyright (c) 2013 Lubomir Rintel.

This module is free software. You can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Lubomir Rintel <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1375 - Linux cli command remquol

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command remquol and provides detailed information about the command remquol, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the remquol.

NAME 🖥️ remquol 🖥️

remainder and part of quotient

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double remquo(double x, double y, int *quo);
float remquof(float x, float y, int *quo);
long double remquol(long double x, long double y, int *quo);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

remquo(), remquof(), remquol():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions compute the remainder and part of the quotient upon division of x by y. A few bits of the quotient are stored via the quo pointer. The remainder is returned as the function result.

The value of the remainder is the same as that computed by the remainder(3) function.

The value stored via the quo pointer has the sign of x / y and agrees with the quotient in at least the low order 3 bits.

For example, remquo(29.0, 3.0) returns -1.0 and might store 2. Note that the actual quotient might not fit in an integer.

RETURN VALUE

On success, these functions return the same value as the analogous functions described in remainder(3).

If x or y is a NaN, a NaN is returned.

If x is an infinity, and y is not a NaN, a domain error occurs, and a NaN is returned.

If y is zero, and x is not a NaN, a domain error occurs, and a NaN is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is an infinity or y is 0, and the other argument is not a NaN
An invalid floating-point exception (FE_INVALID) is raised.

These functions do not set errno.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

remquo(), remquof(), remquol()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

fmod(3), logb(3), remainder(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1376 - Linux cli command XtAppUnlock

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppUnlock and provides detailed information about the command XtAppUnlock, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppUnlock.

NAME 🖥️ XtAppUnlock 🖥️

lock and unlock application context

SYNTAX

#include <X11/Intrinsic.h>

void XtAppLock(XtAppContext app_context);

void XtAppUnlock(XtAppContext app_context);

ARGUMENTS

app_context
Specifies the application context.

DESCRIPTION

XtAppLock locks the application context including all its related displays and widgets.

XtAppUnlock unlocks the application context.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1377 - Linux cli command LWP_MediaTypespm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LWP_MediaTypespm and provides detailed information about the command LWP_MediaTypespm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LWP_MediaTypespm.

NAME 🖥️ LWP_MediaTypespm 🖥️

guess media type for a file or a URL

SYNOPSIS

use LWP::MediaTypes qw(guess_media_type); $type = guess_media_type("/tmp/foo.gif");

DESCRIPTION

This module provides functions for handling media (also known as MIME) types and encodings. The mapping from file extensions to media types is defined by the media.types file. If the ~/.media.types file exists it is used instead. For backwards compatibility we will also look for ~/.mime.types.

The following functions are exported by default:

guess_media_type( $filename )

guess_media_type( $uri )

guess_media_type( $filename_or_object, $header_to_modify )

This function tries to guess media type and encoding for a file or objects that support the a path or filename method, eg, URI or File::Temp objects. When an object does not support either method, it will be stringified to determine the filename. It returns the content type, which is a string like "text/html". In array context it also returns any content encodings applied (in the order used to encode the file). You can pass a URI object reference, instead of the file name. If the type can not be deduced from looking at the file name, then guess_media_type() will let the -T Perl operator take a look. If this works (and -T returns a TRUE value) then we return text/plain as the type, otherwise we return application/octet-stream as the type. The optional second argument should be a reference to a HTTP::Headers object or any object that implements the $obj->header method in a similar way. When it is present the values of the ‘Content-Type’ and ‘Content-Encoding’ will be set for this header.

media_suffix( $type, … )
This function will return all suffixes that can be used to denote the specified media type(s). Wildcard types can be used. In a scalar context it will return the first suffix found. Examples: @suffixes = media_suffix(image/*, audio/basic); $suffix = media_suffix(text/html);

The following functions are only exported by explicit request:

add_type( $type, @exts )
Associate a list of file extensions with the given media type. Example: add_type(“x-world/x-vrml” => qw(wrl vrml));

add_encoding( $type, @ext )
Associate a list of file extensions with an encoding type. Example: add_encoding(“x-gzip” => “gz”);

read_media_types( @files )
Parse media types files and add the type mappings found there. Example: read_media_types(“conf/mime.types”);

COPYRIGHT

Copyright 1995-1999 Gisle Aas.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1378 - Linux cli command Image_ExifTool_DJIpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_DJIpm and provides detailed information about the command Image_ExifTool_DJIpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_DJIpm.

NAME 🖥️ Image_ExifTool_DJIpm 🖥️

DJI Phantom maker notes tags

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret the maker notes in images from some DJI Phantom drones.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

“DJI Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1379 - Linux cli command sys_nerr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sys_nerr and provides detailed information about the command sys_nerr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sys_nerr.

NAME 🖥️ sys_nerr 🖥️

print a system error message

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
void perror(const char *s);
#include <errno.h>
int errno; /* Not really declared this way; see errno(3) */
[[deprecated]] const char *const sys_errlist[];
[[deprecated]] int sys_nerr;

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sys_errlist, sys_nerr:

    From glibc 2.19 to glibc 2.31:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The perror() function produces a message on standard error describing the last error encountered during a call to a system or library function.

First (if s is not NULL and *s is not a null byte (‘�’)), the argument string s is printed, followed by a colon and a blank. Then an error message corresponding to the current value of errno and a new-line.

To be of most use, the argument string should include the name of the function that incurred the error.

The global error list sys_errlist[], which can be indexed by errno, can be used to obtain the error message without the newline. The largest message number provided in the table is sys_nerr-1. Be careful when directly accessing this list, because new error values may not have been added to sys_errlist[]. The use of sys_errlist[] is nowadays deprecated; use strerror(3) instead.

When a system call fails, it usually returns -1 and sets the variable errno to a value describing what went wrong. (These values can be found in <errno.h>.) Many library functions do likewise. The function perror() serves to translate this error code into human-readable form. Note that errno is undefined after a successful system call or library function call: this call may well change this variable, even though it succeeds, for example because it internally used some other library function that failed. Thus, if a failing call is not immediately followed by a call to perror(), the value of errno should be saved.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

perror()

Thread safetyMT-Safe race:stderr

STANDARDS

errno
perror()
C11, POSIX.1-2008.

sys_nerr
sys_errlist
BSD.

HISTORY

errno
perror()
POSIX.1-2001, C89, 4.3BSD.

sys_nerr
sys_errlist
Removed in glibc 2.32.

SEE ALSO

err(3), errno(3), error(3), strerror(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1380 - Linux cli command muntrace

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command muntrace and provides detailed information about the command muntrace, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the muntrace.

NAME 🖥️ muntrace 🖥️

malloc tracing

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <mcheck.h>
void mtrace(void);
void muntrace(void);

DESCRIPTION

The mtrace() function installs hook functions for the memory-allocation functions (malloc(3), realloc(3) memalign(3), free(3)). These hook functions record tracing information about memory allocation and deallocation. The tracing information can be used to discover memory leaks and attempts to free nonallocated memory in a program.

The muntrace() function disables the hook functions installed by mtrace(), so that tracing information is no longer recorded for the memory-allocation functions. If no hook functions were successfully installed by mtrace(), muntrace() does nothing.

When mtrace() is called, it checks the value of the environment variable MALLOC_TRACE, which should contain the pathname of a file in which the tracing information is to be recorded. If the pathname is successfully opened, it is truncated to zero length.

If MALLOC_TRACE is not set, or the pathname it specifies is invalid or not writable, then no hook functions are installed, and mtrace() has no effect. In set-user-ID and set-group-ID programs, MALLOC_TRACE is ignored, and mtrace() has no effect.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mtrace(), muntrace()

Thread safetyMT-Unsafe

STANDARDS

GNU.

NOTES

In normal usage, mtrace() is called once at the start of execution of a program, and muntrace() is never called.

The tracing output produced after a call to mtrace() is textual, but not designed to be human readable. The GNU C library provides a Perl script, mtrace(1), that interprets the trace log and produces human-readable output. For best results, the traced program should be compiled with debugging enabled, so that line-number information is recorded in the executable.

The tracing performed by mtrace() incurs a performance penalty (if MALLOC_TRACE points to a valid, writable pathname).

BUGS

The line-number information produced by mtrace(1) is not always precise: the line number references may refer to the previous or following (nonblank) line of the source code.

EXAMPLES

The shell session below demonstrates the use of the mtrace() function and the mtrace(1) command in a program that has memory leaks at two different locations. The demonstration uses the following program:

$ cat t_mtrace.c

#include <mcheck.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    mtrace();
    for (unsigned int j = 0; j < 2; j++)
        malloc(100);            /* Never freed--a memory leak */
    calloc(16, 16);             /* Never freed--a memory leak */
    exit(EXIT_SUCCESS);
}

When we run the program as follows, we see that mtrace() diagnosed memory leaks at two different locations in the program:

$ cc -g t_mtrace.c -o t_mtrace
$ export MALLOC_TRACE=/tmp/t
$ ./t_mtrace
$ mtrace ./t_mtrace $MALLOC_TRACE
Memory not freed:
-----------------
   Address     Size     Caller
0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12
0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12
0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16

The first two messages about unfreed memory correspond to the two malloc(3) calls inside the for loop. The final message corresponds to the call to calloc(3) (which in turn calls malloc(3)).

SEE ALSO

mtrace(1), malloc(3), malloc_hook(3), mcheck(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1381 - Linux cli command Net_DNS_Mailboxpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_Mailboxpm and provides detailed information about the command Net_DNS_Mailboxpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_Mailboxpm.

NAME 🖥️ Net_DNS_Mailboxpm 🖥️

DNS mailbox representation

SYNOPSIS

use Net::DNS::Mailbox; $mailbox = Net::DNS::Mailbox->new([email protected]); $address = $mailbox->address;

DESCRIPTION

The Net::DNS::Mailbox module implements a subclass of DNS domain name objects representing the DNS coded form of RFC822 mailbox address.

The Net::DNS::Mailbox1035 and Net::DNS::Mailbox2535 packages implement mailbox representation subtypes which provide the name compression and canonicalisation specified by RFC1035 and RFC2535. These are necessary to meet the backward compatibility requirements introduced by RFC3597.

METHODS

new

$mailbox = Net::DNS::Mailbox->new(John Doe <[email protected]>); $mailbox = Net::DNS::Mailbox->new([email protected]); $mailbox = Net::DNS::Mailbox->new(john\doe.example.com);

Creates a mailbox object representing the RFC822 mail address specified by the character string argument. An encoded domain name is also accepted for backward compatibility with Net::DNS 0.68 and earlier.

The argument string consists of printable characters from the 7-bit ASCII repertoire.

address

$address = $mailbox->address;

Returns a character string containing the RFC822 mailbox address corresponding to the encoded domain name representation described in RFC1035 section 8.

COPYRIGHT

Copyright (c)2009,2012 Dick Franks.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::DomainName RFC1035 <https://tools.ietf.org/html/rfc1035> RFC5322 <https://tools.ietf.org/html/rfc5322>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1382 - Linux cli command Net_DNS_RR_EUI48pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_EUI48pm and provides detailed information about the command Net_DNS_RR_EUI48pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_EUI48pm.

NAME 🖥️ Net_DNS_RR_EUI48pm 🖥️

DNS EUI48 resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name IN EUI48 address); $rr = Net::DNS::RR->new( name => example.com, type => EUI48, address => 00-00-5e-00-53-2a );

DESCRIPTION

DNS resource records for 48-bit Extended Unique Identifier (EUI48).

The EUI48 resource record is used to represent IEEE Extended Unique Identifiers used in various layer-2 networks, ethernet for example.

EUI48 addresses SHOULD NOT be published in the public DNS. RFC7043 describes potentially severe privacy implications resulting from indiscriminate publication of link-layer addresses in the DNS.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

address The address field is a 6-octet layer-2 address in network byte order.

The presentation format is hexadecimal separated by “-”.

COPYRIGHT

Copyright (c)2013 Dick Franks.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC7043 <https://tools.ietf.org/html/rfc7043>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1383 - Linux cli command strncasecmp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strncasecmp and provides detailed information about the command strncasecmp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strncasecmp.

NAME 🖥️ strncasecmp 🖥️

compare two strings ignoring case

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <strings.h>
int strcasecmp(const char *s1, const char *s2);
int strncasecmp(const char s1[.n], const char s2[.n], size_t n);

DESCRIPTION

The strcasecmp() function performs a byte-by-byte comparison of the strings s1 and s2, ignoring the case of the characters. It returns an integer less than, equal to, or greater than zero if s1 is found, respectively, to be less than, to match, or be greater than s2.

The strncasecmp() function is similar, except that it compares no more than n bytes of s1 and s2.

RETURN VALUE

The strcasecmp() and strncasecmp() functions return an integer less than, equal to, or greater than zero if s1 is, after ignoring case, found to be less than, to match, or be greater than s2, respectively.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strcasecmp(), strncasecmp()

Thread safetyMT-Safe locale

STANDARDS

POSIX.1-2008.

HISTORY

4.4BSD, POSIX.1-2001.

The strcasecmp() and strncasecmp() functions first appeared in 4.4BSD, where they were declared in <string.h>. Thus, for reasons of historical compatibility, the glibc <string.h> header file also declares these functions, if the _DEFAULT_SOURCE (or, in glibc 2.19 and earlier, _BSD_SOURCE) feature test macro is defined.

The POSIX.1-2008 standard says of these functions:

When the LC_CTYPE category of the locale being used is from the POSIX locale, these functions shall behave as if the strings had been converted to lowercase and then a byte comparison performed. Otherwise, the results are unspecified.

SEE ALSO

memcmp(3), strcmp(3), strcoll(3), string(3), strncmp(3), wcscasecmp(3), wcsncasecmp(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1384 - Linux cli command XtInsertRawEventHandler

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtInsertRawEventHandler and provides detailed information about the command XtInsertRawEventHandler, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtInsertRawEventHandler.

NAME 🖥️ XtInsertRawEventHandler 🖥️

add and remove event handlers

SYNTAX

#include <X11/Intrinsic.h>

void XtAddEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data);

void XtAddRawEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data);

void XtRemoveEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data);

void XtRemoveRawEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data);

void XtInsertEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data, XtListPosition position);

void XtInsertRawEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data, XtListPosition position);

typedef enum { XtListHead, XtListTail } XtListPosition;

ARGUMENTS

client_data
Specifies additional data to be passed to the client’s event handler.

event_mask
Specifies the event mask for which to call or unregister this procedure.

nonmaskable
Specifies a Boolean value that indicates whether this procedure should be called or removed on the nonmaskable events ( GraphicsExpose, NoExpose, SelectionClear, SelectionRequest, SelectionNotify, ClientMessage, and MappingNotify).

proc
Specifies the procedure that is to be added or removed.

  1. Specifies the widget for which this event handler is being registered.

position
Specifies when the event handler is to be called relative to other previously registered handlers.

DESCRIPTION

The XtAddEventHandler function registers a procedure with the dispatch mechanism that is to be called when an event that matches the mask occurs on the specified widget. If the procedure is already registered with the same client_data, the specified mask is ORed into the existing mask. If the widget is realized, XtAddEventHandler calls XSelectInput, if necessary.

The XtAddRawEventHandler function is similar to XtAddEventHandler except that it does not affect the widget’s mask and never causes an XSelectInput for its events. Note that the widget might already have those mask bits set because of other nonraw event handlers registered on it.

The XtRemoveRawEventHandler function stops the specified procedure from receiving the specified events. Because the procedure is a raw event handler, this does not affect the widget’s mask and never causes a call on XSelectInput.

XtInsertEventHandler is identical to XtAddEventHandler with the additional position argument. If position is XtListHead, the event handler is registered to that it will be called before any event handlers that were previously registered for the same widget. If position is XtListTail, the event handler is registered to be called after any previously registered event handlers. If the procedure is already registered with the same client_data value, the specified mask augments the existing mask and the procedure is repositioned in the list.

XtInsertRawEventHandler is similar to XtInsertEventHandler except that it does not modify the widget’s event mask and never causes an XSelectInput for the specified events. If the procedure is already registered with the same client_data value, the specified mask augments the existing mask and the procedure is repositioned in the list.

SEE ALSO

XtAppNextEvent(3), XtBuildEventMask(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1385 - Linux cli command Image_ExifTool_JPEGpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_JPEGpm and provides detailed information about the command Image_ExifTool_JPEGpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_JPEGpm.

NAME 🖥️ Image_ExifTool_JPEGpm 🖥️

Definitions for uncommon JPEG segments

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool for some uncommon JPEG segments. For speed reasons, definitions for more common JPEG segments are included in the Image::ExifTool module itself.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

“JPEG Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1386 - Linux cli command STAILQ_REMOVE

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command STAILQ_REMOVE and provides detailed information about the command STAILQ_REMOVE, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the STAILQ_REMOVE.

NAME 🖥️ STAILQ_REMOVE 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1387 - Linux cli command ilogbl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ilogbl and provides detailed information about the command ilogbl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ilogbl.

NAME 🖥️ ilogbl 🖥️

get integer exponent of a floating-point value

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
int ilogb(double x);
int ilogbf(float x);
int ilogbl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

ilogb():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

ilogbf(), ilogbl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the exponent part of their argument as a signed integer. When no error occurs, these functions are equivalent to the corresponding logb(3) functions, cast to int.

RETURN VALUE

On success, these functions return the exponent of x, as a signed integer.

If x is zero, then a domain error occurs, and the functions return FP_ILOGB0.

If x is a NaN, then a domain error occurs, and the functions return FP_ILOGBNAN.

If x is negative infinity or positive infinity, then a domain error occurs, and the functions return INT_MAX.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is 0 or a NaN
An invalid floating-point exception (FE_INVALID) is raised, and errno is set to EDOM (but see BUGS).

Domain error: x is an infinity
An invalid floating-point exception (FE_INVALID) is raised, and errno is set to EDOM (but see BUGS).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

ilogb(), ilogbf(), ilogbl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

BUGS

Before glibc 2.16, the following bugs existed in the glibc implementation of these functions:

  • The domain error case where x is 0 or a NaN did not cause errno to be set or (on some architectures) raise a floating-point exception.

  • The domain error case where x is an infinity did not cause errno to be set or raise a floating-point exception.

SEE ALSO

log(3), logb(3), significand(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1388 - Linux cli command isupper

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isupper and provides detailed information about the command isupper, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isupper.

NAME 🖥️ isupper 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1389 - Linux cli command Role_Tinypm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Role_Tinypm and provides detailed information about the command Role_Tinypm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Role_Tinypm.

NAME 🖥️ Role_Tinypm 🖥️

Roles: a nouvelle cuisine portion size slice of Moose

SYNOPSIS

package Some::Role; use Role::Tiny; sub foo { … } sub bar { … } around baz => sub { … }; 1;

elsewhere

package Some::Class; use Role::Tiny::With; # bar gets imported, but not foo with Some::Role; sub foo { … } # baz is wrapped in the around modifier by Class::Method::Modifiers sub baz { … } 1;

If you wanted attributes as well, look at Moo::Role.

DESCRIPTION

Role::Tiny is a minimalist role composition tool.

ROLE COMPOSITION

Role composition can be thought of as much more clever and meaningful multiple inheritance. The basics of this implementation of roles is:

  • If a method is already defined on a class, that method will not be composed in from the role. A method inherited by a class gets overridden by the role’s method of the same name, though.

  • If a method that the role requires to be implemented is not implemented, role application will fail loudly.

Unlike Class::C3, where the last class inherited from wins, role composition is the other way around, where the class wins. If multiple roles are applied in a single call (single with statement), then if any of their provided methods clash, an exception is raised unless the class provides a method since this conflict indicates a potential problem.

ROLE METHODS

All subs created after importing Role::Tiny will be considered methods to be composed. For example:

package MyRole; use List::Util qw(min); sub mysub { } use Role::Tiny; use List::Util qw(max); sub mymethod { }

In this role, max and mymethod will be included when composing MyRole, and min and mysub will not. For additional control, namespace::clean can be used to exclude undesired subs from roles.

IMPORTED SUBROUTINES

requires

requires qw(foo bar);

Declares a list of methods that must be defined to compose role.

with

with Some::Role1; with Some::Role1, Some::Role2;

Composes another role into the current role (or class via Role::Tiny::With).

If you have conflicts and want to resolve them in favour of Some::Role1 you can instead write:

with Some::Role1; with Some::Role2;

If you have conflicts and want to resolve different conflicts in favour of different roles, please refactor your codebase.

before

before foo => sub { … };

See before method(s) => sub { … }; in Class::Method::Modifiers for full documentation.

Note that since you are not required to use method modifiers, Class::Method::Modifiers is lazily loaded and we do not declare it as a dependency. If your Role::Tiny role uses modifiers you must depend on both Class::Method::Modifiers and Role::Tiny.

around

around foo => sub { … };

See around method(s) => sub { … }; in Class::Method::Modifiers for full documentation.

Note that since you are not required to use method modifiers, Class::Method::Modifiers is lazily loaded and we do not declare it as a dependency. If your Role::Tiny role uses modifiers you must depend on both Class::Method::Modifiers and Role::Tiny.

after

after foo => sub { … };

See after method(s) => sub { … }; in Class::Method::Modifiers for full documentation.

Note that since you are not required to use method modifiers, Class::Method::Modifiers is lazily loaded and we do not declare it as a dependency. If your Role::Tiny role uses modifiers you must depend on both Class::Method::Modifiers and Role::Tiny.

Strict and Warnings

In addition to importing subroutines, using Role::Tiny applies strict and warnings to the caller.

SUBROUTINES

does_role

if (Role::Tiny::does_role($foo, Some::Role)) { … }

Returns true if class has been composed with role.

This subroutine is also installed as ->does on any class a Role::Tiny is composed into unless that class already has an ->does method, so

if ($foo->does(Some::Role)) { … }

will work for classes but to test a role, one must use ::does_role directly.

Additionally, Role::Tiny will override the standard Perl DOES method for your class. However, if any class in your class’ inheritance hierarchy provides DOES, then Role::Tiny will not override it.

METHODS

make_role

Role::Tiny->make_role(Some::Role);

Makes a package into a role, but does not export any subs into it.

apply_roles_to_package

Role::Tiny->apply_roles_to_package( Some::Package, Some::Role, Some::Other::Role );

Composes role with package. See also Role::Tiny::With.

apply_roles_to_object

Role::Tiny->apply_roles_to_object($foo, qw(Some::Role1 Some::Role2));

Composes roles in order into object directly. Object is reblessed into the resulting class. Note that the object’s methods get overridden by the role’s ones with the same names.

create_class_with_roles

Role::Tiny->create_class_with_roles(Some::Base, qw(Some::Role1 Some::Role2));

Creates a new class based on base, with the roles composed into it in order. New class is returned.

is_role

Role::Tiny->is_role(Some::Role1)

Returns true if the given package is a role.

CAVEATS

  • On perl 5.8.8 and earlier, applying a role to an object won’t apply any overloads from the role to other copies of the object.

  • On perl 5.16 and earlier, applying a role to a class won’t apply any overloads from the role to any existing instances of the class.

SEE ALSO

Role::Tiny is the attribute-less subset of Moo::Role; Moo::Role is a meta-protocol-less subset of the king of role systems, Moose::Role.

Ovid’s Role::Basic provides roles with a similar scope, but without method modifiers, and having some extra usage restrictions.

AUTHOR

mst - Matt S. Trout (cpan:MSTROUT) <[email protected]>

CONTRIBUTORS

dg - David Leadbeater (cpan:DGL) <[email protected]>

frew - Arthur Axel fREW Schmidt (cpan:FREW) <[email protected]>

hobbs - Andrew Rodland (cpan:ARODLAND) <[email protected]>

jnap - John Napiorkowski (cpan:JJNAPIORK) <[email protected]>

ribasushi - Peter Rabbitson (cpan:RIBASUSHI) <[email protected]>

chip - Chip Salzenberg (cpan:CHIPS) <[email protected]>

ajgb - Alex J. G. Burzyński (cpan:AJGB) <[email protected]>

doy - Jesse Luehrs (cpan:DOY) <doy at tozt dot net>

perigrin - Chris Prather (cpan:PERIGRIN) <[email protected]>

Mithaldu - Christian Walde (cpan:MITHALDU) <[email protected]>

ilmari - Dagfinn Ilmari Mannsåker (cpan:ILMARI) <[email protected]>

tobyink - Toby Inkster (cpan:TOBYINK) <[email protected]>

haarg - Graham Knop (cpan:HAARG) <[email protected]>

COPYRIGHT

Copyright (c) 2010-2012 the Role::Tiny AUTHOR and CONTRIBUTORS as listed above.

LICENSE

This library is free software and may be distributed under the same terms as perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1390 - Linux cli command simpleq

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command simpleq and provides detailed information about the command simpleq, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the simpleq.

NAME 🖥️ simpleq 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1391 - Linux cli command Tk_Menupm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Menupm and provides detailed information about the command Tk_Menupm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Menupm.

NAME 🖥️ Tk_Menupm 🖥️

Create and manipulate Menu widgets

SYNOPSIS

$menu = $parent->Menu(?options?);

STANDARD OPTIONS

-activebackground -background -disabledforeground -relief -activeborderwidth -borderwidth -font -takefocus -activeforeground -cursor -foreground

See Tk::options for details of the standard options.

WIDGET-SPECIFIC OPTIONS

Name: postCommand

Class: Command

Switch: -postcommand

If this option is specified then it provides a callback to execute each time the menu is posted. The callback is invoked by the post method before posting the menu. Note that in 8.0 on Macintosh and Windows, all commands in a menu systems are executed before any are posted. This is due to the limitations in the individual platforms’ menu managers.

Name: selectColor

Class: Background

Switch: -selectcolor

For menu entries that are check buttons or radio buttons, this option specifies the color to display in the indicator when the check button or radio button is selected.

Name: tearOff

Class: TearOff

Switch: -tearoff

This option must have a proper boolean value, which specifies whether or not the menu should include a tear-off entry at the top. If so, it will exist as entry 0 of the menu and the other entries will number starting at 1. The default menu bindings arrange for the menu to be torn off when the tear-off entry is invoked.

Name: tearOffCommand

Class: TearOffCommand

Switch: -tearoffcommand

If this option has a non-empty value, then it specifies a perl/Tk callback to invoke whenever the menu is torn off. The actual command will consist of the value of this option, followed by a space, followed by the name of the menu window, followed by a space, followed by the name of the name of the torn off menu window. For example, if the option’s is ``a b’’ and menu .x.y is torn off to create a new menu .x.tearoff1, then the command ``a b .x.y .x.tearoff1’’ will be invoked.

Name: title:

Class: Title

Switch: -title:

The string will be used to title the window created when this menu is torn off. If the title is NULL, then the window will have the title of the menubutton or the text of the cascade item from which this menu was invoked.

Name: type

Class: Type

Switch: -type

This option can be one of menubar, tearoff, or normal, and is set when the menu is created. While the string returned by the configuration database will change if this option is changed, this does not affect the menu widget’s behavior. This is used by the cloning mechanism and is not normally set outside of the Tk library.

DESCRIPTION

The Menu method creates a new top-level window (given by the $widget argument) and makes it into a menu widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the menu such as its colors and font. The menu command returns its $widget argument. At the time this command is invoked, there must not exist a window named $widget, but $widget’s parent must exist.

A menu is a widget that displays a collection of one-line entries arranged in one or more columns. There exist several different types of entries, each with different properties. Entries of different types may be combined in a single menu. Menu entries are not the same as entry widgets. In fact, menu entries are not even distinct widgets; the entire menu is one widget.

Menu entries are displayed with up to three separate fields. The main field is a label in the form of a text string, a bitmap, or an image, controlled by the -label, -bitmap, and -image options for the entry. If the -accelerator option is specified for an entry then a second textual field is displayed to the right of the label. The accelerator typically describes a keystroke sequence that may be typed in the application to cause the same result as invoking the menu entry. The third field is an indicator. The indicator is present only for checkbutton or radiobutton entries. It indicates whether the entry is selected or not, and is displayed to the left of the entry’s string.

In normal use, an entry becomes active (displays itself differently) whenever the mouse pointer is over the entry. If a mouse button is released over the entry then the entry is invoked. The effect of invocation is different for each type of entry; these effects are described below in the sections on individual entries.

Entries may be disabled, which causes their labels and accelerators to be displayed with dimmer colors. The default menu bindings will not allow a disabled entry to be activated or invoked. Disabled entries may be re-enabled, at which point it becomes possible to activate and invoke them again.

Whenever a menu’s active entry is changed, a <<MenuSelect>> virtual event is sent to the menu. The active item can then be queried from the menu, and an action can be taken, such as setting context-sensitive help text for the entry.

COMMAND ENTRIES

The most common kind of menu entry is a command entry, which behaves much like a button widget. When a command entry is invoked, a callback is executed. The callback is specified with the -command option.

SEPARATOR ENTRIES

A separator is an entry that is displayed as a horizontal dividing line. A separator may not be activated or invoked, and it has no behavior other than its display appearance.

CHECKBUTTON ENTRIES

A checkbutton menu entry behaves much like a checkbutton widget. When it is invoked it toggles back and forth between the selected and deselected states. When the entry is selected, a particular value is stored in a particular global variable (as determined by the -onvalue and -variable options for the entry); when the entry is deselected another value (determined by the -offvalue option) is stored in the global variable. An indicator box is displayed to the left of the label in a checkbutton entry. If the entry is selected then the indicator’s center is displayed in the color given by the -selectcolor option for the entry; otherwise the indicator’s center is displayed in the background color for the menu. If a -command option is specified for a checkbutton entry, then its value is evaluated each time the entry is invoked; this happens after toggling the entry’s selected state.

RADIOBUTTON ENTRIES

A radiobutton menu entry behaves much like a radiobutton widget. Radiobutton entries are organized in groups of which only one entry may be selected at a time. Whenever a particular entry becomes selected it stores a particular value into a particular global variable (as determined by the -value and -variable options for the entry). This action causes any previously-selected entry in the same group to deselect itself. Once an entry has become selected, any change to the entry’s associated variable will cause the entry to deselect itself. Grouping of radiobutton entries is determined by their associated variables: if two entries have the same associated variable then they are in the same group. An indicator diamond is displayed to the left of the label in each radiobutton entry. If the entry is selected then the indicator’s center is displayed in the color given by the -selectcolor option for the entry; otherwise the indicator’s center is displayed in the background color for the menu. If a -command option is specified for a radiobutton entry, then its value is evaluated each time the entry is invoked; this happens after selecting the entry.

CASCADE ENTRIES

A cascade entry is one with an associated menu (determined by the -menu option). Cascade entries allow the construction of cascading menus. The postcascade method can be used to post and unpost the associated menu just next to of the cascade entry. The associated menu must be a child of the menu containing the cascade entry (this is needed in order for menu traversal to work correctly).

A cascade entry posts its associated menu by invoking

$menu->post(x,y)

where menu is the path name of the associated menu, and x and y are the root-window coordinates of the upper-right corner of the cascade entry. On Unix, the lower-level menu is unposted by executing

$menu->unpost

where menu is the name of the associated menu. On other platforms, the platform’s native code takes care of unposting the menu.

If a -command option is specified for a cascade entry then it is evaluated whenever the entry is invoked. This is not supported on Windows.

TEAR-OFF ENTRIES

A tear-off entry appears at the top of the menu if enabled with the tearOff option. It is not like other menu entries in that it cannot be created with the add method and cannot be deleted with the delete method. When a tear-off entry is created it appears as a dashed line at the top of the menu. Under the default bindings, invoking the tear-off entry causes a torn-off copy to be made of the menu and all of its submenus.

Any menu can be set as a menubar for a toplevel window (see the Toplevel constructor for syntax). On the Macintosh, whenever the toplevel is in front, this menu’s cascade items will appear in the menubar across the top of the main monitor. On Windows and Unix, this menu’s items will be displayed in a menubar accross the top of the window. These menus will behave according to the interface guidelines of their platforms. For every menu set as a menubar, a clone menu is made. See “CLONES” for more information.

As noted, menubars may behave differently on different platforms. One example of this concerns the handling of checkbuttons and radiobuttons within the menu. While it is permitted to put these menu elements on menubars, they may not be drawn with indicators on some platforms, due to system restrictions.

SPECIAL MENUS IN MENUBARS

Certain menus in a menubar will be treated specially. On the Macintosh, access to the special Apple and Help menus is provided. On Windows, access to the Windows System menu in each window is provided. On X Windows, a special right-justified help menu is provided. In all cases, these menus must be created with the command name of the menubar menu concatenated with the special name. So for a menubar named .menubar, on the Macintosh, the special menus would be .menubar.apple and .menubar.help; on Windows, the special menu would be .menubar.system; on X Windows, the help menu would be .menubar.help.

When Tk sees an Apple menu on the Macintosh, that menu’s contents make up the first items of the Apple menu on the screen whenever the window containing the menubar is in front. The menu is the first one that the user sees and has a title which is an Apple logo. After all of the Tk-defined items, the menu will have a separator, followed by all of the items in the user’s Apple Menu Items folder. Since the System uses a different menu definition procedure for the Apple menu than Tk uses for its menus, and the system APIs do not fully support everything Tk tries to do, the menu item will only have its text displayed. No font attributes, images, bitmaps, or colors will be displayed. In addition, a menu with a tearoff item will have the tearoff item displayed as “(TearOff)”.

When Tk see a Help menu on the Macintosh, the menu’s contents are appended to the standard help menu on the right of the user’s menubar whenever the user’s menubar is in front. The first items in the menu are provided by Apple. Similar to the Apple Menu, cusomization in this menu is limited to what the system provides.

When Tk sees a System menu on Windows, its items are appended to the system menu that the menubar is attached to. This menu has an icon representing a spacebar, and can be invoked with the mouse or by typing Alt+Spacebar. Due to limitations in the Windows API, any font changes, colors, images, bitmaps, or tearoff images will not appear in the system menu.

When Tk see a Help menu on X Windows, the menu is moved to be last in the menubar and is right justified.

CLONES

When a menu is set as a menubar for a toplevel window, or when a menu is torn off, a clone of the menu is made. This clone is a menu widget in its own right, but it is a child of the original. Changes in the configuration of the original are reflected in the clone. Additionally, any cascades that are pointed to are also cloned so that menu traversal will work right. Clones are destroyed when either the tearoff or menubar goes away, or when the original menu is destroyed.

WIDGET METHODS

The Menu method creates a widget object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class, and the Tk::Wm class.

Many of the methods for a menu take as one argument an indicator of which entry of the menu to operate on. These indicators are called indexes and may be specified in any of the following forms:

number
Specifies the entry numerically, where 0 corresponds to the top-most entry of the menu, 1 to the entry below it, and so on.

active
Indicates the entry that is currently active. If no entry is active then this form is equivalent to none. This form may not be abbreviated.

end
Indicates the bottommost entry in the menu. If there are no entries in the menu then this form is equivalent to none. This form may not be abbreviated.

last
Same as end.

none
Indicates ``no entry at all’’; this is used most commonly with the activate option to deactivate all the entries in the menu. In most cases the specification of none causes nothing to happen in the method. This form may not be abbreviated.

  1. In this form, number is treated as a y-coordinate in the menu’s window; the entry closest to that y-coordinate is used. For example, ``@0’’ indicates the top-most entry in the window.

pattern
If the index doesn’t satisfy one of the above forms then this form is used. Pattern is pattern-matched against the label of each entry in the menu, in order from the top down, until a matching entry is found. (In perl/Tk the matching is under review, but exact match should work.)

The following methods are possible for menu widgets:

$menu->activate(index)
Change the state of the entry indicated by index to active and redisplay it using its active colors. Any previously-active entry is deactivated. If index is specified as none, or if the specified entry is disabled, then the menu ends up with no active entry. Returns an empty string.

$menu->add(type, ?option, value, option, value, …?)
Add a new entry to the bottom of the menu. The new entry’s type is given by type and must be one of cascade, checkbutton, command, radiobutton, or separator, or a unique abbreviation of one of the above. If additional arguments are present, they specify any of the following options:

-activebackground => value
Specifies a background color to use for displaying this entry when it is active. If this option is specified as an empty string (the default), then the activeBackground option for the overall menu is used. If the $Tk::strictMotif variable has been set to request strict Motif compliance, then this option is ignored and the -background option is used in its place. This option is not available for separator or tear-off entries.

-activeforeground => value
Specifies a foreground color to use for displaying this entry when it is active. If this option is specified as an empty string (the default), then the activeForeground option for the overall menu is used. This option is not available for separator or tear-off entries.

-accelerator => value
Specifies a string to display at the right side of the menu entry. Normally describes an accelerator keystroke sequence that may be typed to invoke the same function as the menu entry. This option is not available for separator or tear-off entries.

-background => value
Specifies a background color to use for displaying this entry when it is in the normal state (neither active nor disabled). If this option is specified as an empty string (the default), then the background option for the overall menu is used. This option is not available for separator or tear-off entries.

-bitmap => value
Specifies a bitmap to display in the menu instead of a textual label, in any of the forms accepted by Tk_GetBitmap. This option overrides the -label option but may be reset to an empty string to enable a textual label to be displayed. If a -image option has been specified, it overrides -bitmap. This option is not available for separator or tear-off entries.

-columnbreak => value
When this option is zero, the appears below the previous entry. When this option is one, the menu appears at the top of a new column in the menu.

-compound => value
Specifies whether the button should display both an image and text, and if so, where the image should be placed relative to the text. Valid values for this option are bottom, center, left, none, right and top. The default value is none, meaning that the button will display either an image or text, depending on the values of the -image and -bitmap options.

-command => value
For command, checkbutton, and radiobutton entries, specifies a callback to execute when the menu entry is invoked. For cascade entries, specifies a callback to execute when the entry is activated (i.e. just before its submenu is posted). Not available for separator or tear-off entries.

-font => value
Specifies the font to use when drawing the label or accelerator string in this entry. If this option is specified as an empty string (the default) then the font option for the overall menu is used. This option is not available for separator or tear-off entries.

-foreground => value
Specifies a foreground color to use for displaying this entry when it is in the normal state (neither active nor disabled). If this option is specified as an empty string (the default), then the foreground option for the overall menu is used. This option is not available for separator or tear-off entries.

-hidemargin => value
Specifies whether the standard margins should be drawn for this menu entry. This is useful when creating palette with images in them, i.e., color palettes, pattern palettes, etc. 1 indicates that the margin for the entry is hidden; 0 means that the margin is used.

-image => value
Specifies an image to display in the menu instead of a text string or bitmap The image must have been created by some previous invocation of image create. This option overrides the -label and -bitmap options but may be reset to an empty string to enable a textual or bitmap label to be displayed. This option is not available for separator or tear-off entries.

-indicatoron => value
Available only for checkbutton and radiobutton entries. Value is a boolean that determines whether or not the indicator should be displayed.

-label => value
Specifies a string to display as an identifying label in the menu entry. Not available for separator or tear-off entries.

-menu => value
Available only for cascade entries. Specifies the path name of the submenu associated with this entry. The submenu must be a child of the menu.

-offvalue => value
Available only for checkbutton entries. Specifies the value to store in the entry’s associated variable when the entry is deselected.

-onvalue => value
Available only for checkbutton entries. Specifies the value to store in the entry’s associated variable when the entry is selected.

-selectcolor => value
Available only for checkbutton and radiobutton entries. Specifies the color to display in the indicator when the entry is selected. If the value is an empty string (the default) then the selectColor option for the menu determines the indicator color.

-selectimage => value
Available only for checkbutton and radiobutton entries. Specifies an image to display in the entry (in place of the -image option) when it is selected. Value is the name of an image, which must have been created by some previous invocation of image create. This option is ignored unless the -image option has been specified.

-state => value
Specifies one of three states for the entry: normal, active, or disabled. In normal state the entry is displayed using the foreground option for the menu and the background option from the entry or the menu. The active state is typically used when the pointer is over the entry. In active state the entry is displayed using the activeForeground option for the menu along with the activebackground option from the entry. Disabled state means that the entry should be insensitive: the default bindings will refuse to activate or invoke the entry. In this state the entry is displayed according to the disabledForeground option for the menu and the background option from the entry. This option is not available for separator entries.

-underline => value
Specifies the integer index of a character to underline in the entry. This option is also queried by the default bindings and used to implement keyboard traversal. 0 corresponds to the first character of the text displayed in the entry, 1 to the next character, and so on. If a bitmap or image is displayed in the entry then this option is ignored. This option is not available for separator or tear-off entries.

-value => value
Available only for radiobutton entries. Specifies the value to store in the entry’s associated variable when the entry is selected. If an empty string is specified, then the -label option for the entry as the value to store in the variable.

-variable => value
Available only for checkbutton and radiobutton entries. Specifies the name of a global value to set when the entry is selected. For checkbutton entries the variable is also set when the entry is deselected. For radiobutton entries, changing the variable causes the currently-selected entry to deselect itself.

The add method returns an empty string.

$menu->clone($parent ?, cloneType?)
Makes a clone of the current menu as a child of $parent. This clone is a menu in its own right, but any changes to the clone are propogated to the original menu and vice versa. cloneType can be normal, menubar, or tearoff. Should not normally be called outside of the Tk library. See “CLONES” for more information.

$menu->delete(index1?, index2?)
Delete all of the menu entries between index1 and index2 inclusive. If index2 is omitted then it defaults to index1. Attempts to delete a tear-off menu entry are ignored (instead, you should change the tearOff option to remove the tear-off entry).

$menu->entrycget(index, option)
Returns the current value of a configuration option for the entry given by index. Option may have any of the values accepted by the add method.

$menu->entryconfigure(index ?,options?)
This method is similar to the configure method, except that it applies to the options for an individual entry, whereas configure applies to the options for the menu as a whole. Options may have any of the values accepted by the add method. If options are specified, options are modified as indicated in the method call and the method returns an empty string. If no options are specified, returns a list describing the current options for entry index (see Tk::options for information on the format of this list).

$menu->index(index)
Returns the numerical index corresponding to index, or none if index was specified as none.

$menu->insert(index, type?, -option=>value, …?)
Same as the add method except that it inserts the new entry just before the entry given by index, instead of appending to the end of the menu. The type, -option, and value arguments have the same interpretation as for the add widget method. It is not possible to insert new menu entries before the tear-off entry, if the menu has one.

$menu->invoke(index)
Invoke the action of the menu entry. See the sections on the individual entries above for details on what happens. If the menu entry is disabled then nothing happens. If the entry has a callback associated with it then the result of that callback is returned as the result of the invoke widget method. Otherwise the result is an empty string. Note: invoking a menu entry does not automatically unpost the menu; the default bindings normally take care of this before invoking the invoke method.

$menu->post(x, y)
Arrange for the menu to be displayed on the screen at the root-window coordinates given by x and y. These coordinates are adjusted if necessary to guarantee that the entire menu is visible on the screen. This method normally returns an empty string. If the postCommand option has been specified, then its value is executed before posting the menu and the result of that callback is returned as the result of the post widget method. If an error returns while executing the method, then the error is returned without posting the menu.

$menu->postcascade(index)
Posts the submenu associated with the cascade entry given by index, and unposts any previously posted submenu. If index doesn’t correspond to a cascade entry, or if $menu isn’t posted, the method has no effect except to unpost any currently posted submenu.

$menu->type(index)
Returns the type of the menu entry given by index. This is the type argument passed to the add widget method when the entry was created, such as command or separator, or tearoff for a tear-off entry.

$menu->unpost
Unmap the window so that it is no longer displayed. If a lower-level cascaded menu is posted, unpost that menu. Returns an empty string. This method does not work on Windows and the Macintosh, as those platforms have their own way of unposting menus.

$menu->yposition(index)
Returns a decimal string giving the y-coordinate within the menu window of the topmost pixel in the entry specified by index.

MENU CONFIGURATIONS

The default bindings support four different ways of using menus:

Pulldown Menus in Menubar
This is the most command case. You create a menu widget that will become the menu bar. You then add cascade entries to this menu, specifying the pull down menus you wish to use in your menu bar. You then create all of the pulldowns. Once you have done this, specify the menu using the -menu option of the toplevel’s method. See the toplevel manual entry for details.

Pulldown Menus in Menu Buttons
This is the compatible way to do menu bars. You create one menubutton widget for each top-level menu, and typically you arrange a series of menubuttons in a row in a menubar window. You also create the top-level menus and any cascaded submenus, and tie them together with -menu options in menubuttons and cascade menu entries. The top-level menu must be a child of the menubutton, and each submenu must be a child of the menu that refers to it. Once you have done this, the default bindings will allow users to traverse and invoke the tree of menus via its menubutton; see the menubutton documentation for details.

Popup Menus
Popup menus typically post in response to a mouse button press or keystroke. You create the popup menus and any cascaded submenus, then you call the Post method at the appropriate time to post the top-level menu. $menu->Post($x,$y?,$entry?) $x and $y are the root window coordinates at which the $menu will be displayed. If $entry is specified then that entry is centred on that point, otherwise the top-left corner of the $menu is placed at that point. Menu also inherits methods from Tk::Wm and so the method Popup can be used to position menu relative to other windows, the mouse cursor or the screen.

Option Menus
An option menu consists of a menubutton with an associated menu that allows you to select one of several values. The current value is displayed in the menubutton and is also stored in a global variable. Use the Tk::Optionmenu class to create option menubuttons and their menus.

Torn-off Menus
You create a torn-off menu by invoking the tear-off entry at the top of an existing menu. The default bindings will create a new menu that is a copy of the original menu and leave it permanently posted as a top-level window. The torn-off menu behaves just the same as the original menu.

DEFAULT BINDINGS

Tk automatically creates class bindings for menus that give them the following default behavior:

[1]
When the mouse enters a menu, the entry underneath the mouse cursor activates; as the mouse moves around the menu, the active entry changes to track the mouse.

[2]
When the mouse leaves a menu all of the entries in the menu deactivate, except in the special case where the mouse moves from a menu to a cascaded submenu.

[3]
When a button is released over a menu, the active entry (if any) is invoked. The menu also unposts unless it is a torn-off menu.

[4]
The Space and Return keys invoke the active entry and unpost the menu.

[5]
If any of the entries in a menu have letters underlined with with -underline option, then pressing one of the underlined letters (or its upper-case or lower-case equivalent) invokes that entry and unposts the menu.

[6]
The Escape key aborts a menu selection in progress without invoking any entry. It also unposts the menu unless it is a torn-off menu.

[7]
The Up and Down keys activate the next higher or lower entry in the menu. When one end of the menu is reached, the active entry wraps around to the other end.

[8]
The Left key moves to the next menu to the left. If the current menu is a cascaded submenu, then the submenu is unposted and the current menu entry becomes the cascade entry in the parent. If the current menu is a top-level menu posted from a menubutton, then the current menubutton is unposted and the next menubutton to the left is posted. Otherwise the key has no effect. The left-right order of menubuttons is determined by their stacking order: Tk assumes that the lowest menubutton (which by default is the first one created) is on the left.

[9]
The Right key moves to the next menu to the right. If the current entry is a cascade entry, then the submenu is posted and the current menu entry becomes the first entry in the submenu. Otherwise, if the current menu was posted from a menubutton, then the current menubutton is unposted and the next menubutton to the right is posted. Disabled menu entries are non-responsive: they don’t activate and they ignore mouse button presses and releases. The behavior of menus can be changed by defining new bindings for individual widgets or by redefining the class bindings.

BUGS

At present it isn’t possible to use the option database to specify values for the options to individual entries.

SEE ALSO

Tk::callbacks

KEYWORDS

menu, widget

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1392 - Linux cli command vwarnx

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command vwarnx and provides detailed information about the command vwarnx, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the vwarnx.

NAME 🖥️ vwarnx 🖥️

formatted error messages

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <err.h>
[[noreturn]] void err(int eval, const char *fmt, ...);
[[noreturn]] void errx(int eval, const char *fmt, ...);
void warn(const char *fmt, ...);
void warnx(const char *fmt, ...);
#include <stdarg.h>
[[noreturn]] void verr(int eval, const char *fmt, va_list args);
[[noreturn]] void verrx(int eval, const char *fmt, va_list args);
void vwarn(const char *fmt, va_list args);
void vwarnx(const char *fmt, va_list args);

DESCRIPTION

The err() and warn() family of functions display a formatted error message on the standard error output. In all cases, the last component of the program name, a colon character, and a space are output. If the fmt argument is not NULL, the printf(3)-like formatted error message is output. The output is terminated by a newline character.

The err(), verr(), warn(), and vwarn() functions append an error message obtained from strerror(3) based on the global variable errno, preceded by another colon and space unless the fmt argument is NULL.

The errx() and warnx() functions do not append an error message.

The err(), verr(), errx(), and verrx() functions do not return, but exit with the value of the argument eval.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

err(), errx(), warn(), warnx(), verr(), verrx(), vwarn(), vwarnx()

Thread safetyMT-Safe locale

STANDARDS

BSD.

HISTORY

err()
warn()
4.4BSD.

EXAMPLES

Display the current errno information string and exit:

p = malloc(size);
if (p == NULL)
    err(EXIT_FAILURE, NULL);
fd = open(file_name, O_RDONLY, 0);
if (fd == -1)
    err(EXIT_FAILURE, "%s", file_name);

Display an error message and exit:

if (tm.tm_hour < START_TIME)
    errx(EXIT_FAILURE, "too early, wait until %s",
            start_time_string);

Warn of an error:

fd = open(raw_device, O_RDONLY, 0);
if (fd == -1)
    warnx("%s: %s: trying the block device",
            raw_device, strerror(errno));
fd = open(block_device, O_RDONLY, 0);
if (fd == -1)
    err(EXIT_FAILURE, "%s", block_device);

SEE ALSO

error(3), exit(3), perror(3), printf(3), strerror(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1393 - Linux cli command HTML_Filterpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_Filterpm and provides detailed information about the command HTML_Filterpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_Filterpm.

NAME 🖥️ HTML_Filterpm 🖥️

Filter HTML text through the parser

NOTE

This module is deprecated. The HTML::Parser now provides the functionally of HTML::Filter much more efficiently with the default handler.

SYNOPSIS

require HTML::Filter; $p = HTML::Filter->new->parse_file(“index.html”);

DESCRIPTION

HTML::Filter is an HTML parser that by default prints the original text of each HTML element (a slow version of cat (1) basically). The callback methods may be overridden to modify the filtering for some HTML elements and you can override output() method which is called to print the HTML text.

HTML::Filter is a subclass of HTML::Parser. This means that the document should be given to the parser by calling the $p->parse() or $p->parse_file() methods.

EXAMPLES

The first example is a filter that will remove all comments from an HTML file. This is achieved by simply overriding the comment method to do nothing.

package CommentStripper; require HTML::Filter; @ISA=qw(HTML::Filter); sub comment { } # ignore comments

The second example shows a filter that will remove any <TABLE>s found in the HTML file. We specialize the start() and end() methods to count table tags and then make output not happen when inside a table.

package TableStripper; require HTML::Filter; @ISA=qw(HTML::Filter); sub start { my $self = shift; $self->{table_seen}++ if $_[0] eq “table”; $self->SUPER::start(@_); } sub end { my $self = shift; $self->SUPER::end(@_); $self->{table_seen}– if $_[0] eq “table”; } sub output { my $self = shift; unless ($self->{table_seen}) { $self->SUPER::output(@_); } }

If you want to collect the parsed text internally you might want to do something like this:

package FilterIntoString; require HTML::Filter; @ISA=qw(HTML::Filter); sub output { push(@{$_[0]->{fhtml}}, $_[1]) } sub filtered_html { join("", @{$_[0]->{fhtml}}) }

SEE ALSO

HTML::Parser

COPYRIGHT

Copyright 1997-1999 Gisle Aas.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1394 - Linux cli command svcudp_create

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command svcudp_create and provides detailed information about the command svcudp_create, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the svcudp_create.

NAME 🖥️ svcudp_create 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1395 - Linux cli command loff_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command loff_ttype and provides detailed information about the command loff_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the loff_ttype.

NAME 🖥️ loff_ttype 🖥️

file sizes

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/types.h>
typedef /* ... */ off_t;
#define _LARGEFILE64_SOURCE
#include <sys/types.h>
typedef /* ... */ off64_t;
#define _GNU_SOURCE
#include <sys/types.h>
typedef /* ... */ loff_t;

DESCRIPTION

off_t is used for describing file sizes. It is a signed integer type.

off64_t is a 64-bit version of the type, used in glibc.

loff_t is a 64-bit version of the type, introduced by the Linux kernel.

STANDARDS

off_t
POSIX.1-2008.

off64_t
GNU and some BSDs.

loff_t
Linux.

VERSIONS

off_t
POSIX.1-2001.

<aio.h> and <stdio.h> define off_t since POSIX.1-2008.

NOTES

On some architectures, the width of off_t can be controlled with the feature test macro _FILE_OFFSET_BITS.

The following headers also provide off_t: <aio.h>, <fcntl.h>, <stdio.h>, <sys/mman.h>, <sys/stat.h>, and <unistd.h>.

SEE ALSO

copy_file_range(2), llseek(2), lseek(2), mmap(2), posix_fadvise(2), pread(2), readahead(2), sync_file_range(2), truncate(2), fseeko(3), lockf(3), lseek64(3), posix_fallocate(3), feature_test_macros(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1396 - Linux cli command Net_DNS_RR_RRSIGpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_RRSIGpm and provides detailed information about the command Net_DNS_RR_RRSIGpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_RRSIGpm.

NAME 🖥️ Net_DNS_RR_RRSIGpm 🖥️

DNS RRSIG resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name RRSIG typecovered algorithm labels orgttl sigexpiration siginception keytag signame signature); use Net::DNS::SEC; $sigrr = Net::DNS::RR::RRSIG->create( \rrset, $keypath, sigex => 20241230010101 sigin => 20241201010101 ); $sigrr->verify( \rrset, $keyrr ) || die $sigrr->vrfyerrstr;

DESCRIPTION

Class for DNS digital signature (RRSIG) resource records.

In addition to the regular methods inherited from Net::DNS::RR the class contains a method to sign RRsets using private keys (create) and a method for verifying signatures over RRsets (verify).

The RRSIG RR is an implementation of RFC4034. See Net::DNS::RR::SIG for an implementation of SIG0 (RFC2931).

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

typecovered

$typecovered = $rr->typecovered;

The typecovered field identifies the type of the RRset that is covered by this RRSIG record.

algorithm

$algorithm = $rr->algorithm;

The algorithm number field identifies the cryptographic algorithm used to create the signature.

algorithm() may also be invoked as a class method or simple function to perform mnemonic and numeric code translation.

labels

$labels = $rr->labels; $rr->labels( $labels );

The labels field specifies the number of labels in the original RRSIG RR owner name.

orgttl

$orgttl = $rr->orgttl; $rr->orgttl( $orgttl );

The original TTL field specifies the TTL of the covered RRset as it appears in the authoritative zone.

sigexpiration and siginception times

sigex sigin sigval

$expiration = $rr->sigexpiration; $expiration = $rr->sigexpiration( $value ); $inception = $rr->siginception; $inception = $rr->siginception( $value );

The signature expiration and inception fields specify a validity time interval for the signature.

The value may be specified by a string with format ‘yyyymmddhhmmss’ or a Perl time() value.

Return values are dual-valued, providing either a string value or numerical Perl time() value.

keytag

$keytag = $rr->keytag; $rr->keytag( $keytag );

The keytag field contains the key tag value of the DNSKEY RR that validates this signature.

signame

$signame = $rr->signame; $rr->signame( $signame );

The signer name field value identifies the owner name of the DNSKEY RR that a validator is supposed to use to validate this signature.

signature

sig

$sig = $rr->sig; $rr->sig( $sig );

The Signature field contains the cryptographic signature that covers the RRSIG RDATA (excluding the Signature field) and the RRset specified by the RRSIG owner name, RRSIG class, and RRSIG type covered fields.

sigbin

$sigbin = $rr->sigbin; $rr->sigbin( $sigbin );

Binary representation of the cryptographic signature.

create

Create a signature over a RR set.

use Net::DNS::SEC; $keypath = /home/olaf/keys/Kbla.foo.+001+60114.private; $sigrr = Net::DNS::RR::RRSIG->create( \rrsetref, $keypath ); $sigrr = Net::DNS::RR::RRSIG->create( \rrsetref, $keypath, sigex => 20241230010101 sigin => 20241201010101 ); $sigrr->print; # Alternatively use Net::DNS::SEC::Private $private = Net::DNS::SEC::Private->new($keypath); $sigrr= Net::DNS::RR::RRSIG->create( \rrsetref, $private );

create() is an alternative constructor for a RRSIG RR object.

This method returns an RRSIG with the signature over the subject rrset (an array of RRs) made with the private key stored in the key file.

The first argument is a reference to an array that contains the RRset that needs to be signed.

The second argument is a string which specifies the path to a file containing the private key as generated by dnssec-keygen.

The optional remaining arguments consist of ( name => value ) pairs as follows:

sigex => 20241230010101, # signature expiration sigin => 20241201010101, # signature inception sigval => 30, # validity window (days) ttl => 3600 # TTL

The sigin and sigex values may be specified as Perl time values or as a string with the format ‘yyyymmddhhmmss’. The default for sigin is the time of signing.

The sigval argument specifies the signature validity window in days ( sigex = sigin + sigval ).

By default the signature is valid for 30 days.

By default the TTL matches the RRset that is presented for signing.

verify

$verify = $sigrr->verify( $rrsetref, $keyrr ); $verify = $sigrr->verify( $rrsetref, [$keyrr, $keyrr2, $keyrr3] );

$rrsetref contains a reference to an array of RR objects and the method verifies the RRset against the signature contained in the $sigrr object itself using the public key in $keyrr.

The second argument can either be a Net::DNS::RR::KEYRR object or a reference to an array of such objects. Verification will return successful as soon as one of the keys in the array leads to positive validation.

Returns 0 on error and sets $sig->vrfyerrstr

vrfyerrstr

$verify = $sigrr->verify( $rrsetref, $keyrr ); print $sigrr->vrfyerrstr unless $verify; $sigrr->verify( $rrsetref, $keyrr ) || die $sigrr->vrfyerrstr;

KEY GENERATION

Private key files and corresponding public DNSKEY records are most conveniently generated using dnssec-keygen, a program that comes with the ISC BIND distribution.

dnssec-keygen -a 10 -b 2048 -f ksk rsa.example. dnssec-keygen -a 10 -b 1024 rsa.example. dnssec-keygen -a 14 -f ksk ecdsa.example. dnssec-keygen -a 14 ecdsa.example.

Do not change the name of the private key file. The create method uses the filename as generated by dnssec-keygen to determine the keyowner, algorithm, and the keyid (keytag).

REMARKS

The code is not optimised for speed. It is probably not suitable to be used for signing large zones.

If this code is still around in 2100 (not a leap year) you will need to check for proper handling of times after 28th February.

ACKNOWLEDGMENTS

Although their original code may have disappeared following redesign of Net::DNS, Net::DNS::SEC and the OpenSSL API, the following individual contributors deserve to be recognised for their significant influence on the development of the RRSIG package.

Andy Vaskys (Network Associates Laboratories) supplied code for RSA.

T.J. Mather provided support for the DSA algorithm.

Dick Franks added support for elliptic curve and Edwards curve algorithms.

Mike McCauley created the Crypt::OpenSSL::ECDSA perl extension module specifically for this development.

COPYRIGHT

Copyright (c)2001-2005 RIPE NCC, Olaf M. Kolkman

Copyright (c)2007-2008 NLnet Labs, Olaf M. Kolkman

Portions Copyright (c)2014 Dick Franks

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR Net::DNS::SEC RFC4034 (3) <https://iana.org/go/rfc4034#section-3>

Algorithm Numbers <https://iana.org/assignments/dns-sec-alg-numbers>

BIND Administrator Reference Manual <https://bind.isc.org/>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1397 - Linux cli command __malloc_hook

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __malloc_hook and provides detailed information about the command __malloc_hook, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __malloc_hook.

NAME 🖥️ __malloc_hook 🖥️

malloc debugging variables (DEPRECATED)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <malloc.h>
void *(*volatile __malloc_hook)(size_t size, const void *caller);
void *(*volatile __realloc_hook)(void *ptr, size_t size,
 const void *caller);
void *(*volatile __memalign_hook)(size_t alignment, size_t size,
 const void *caller);
void (*volatile __free_hook)(void *ptr, const void *caller);
void (*__malloc_initialize_hook)(void);
void (*volatile __after_morecore_hook)(void);

DESCRIPTION

The GNU C library lets you modify the behavior of malloc(3), realloc(3), and free(3) by specifying appropriate hook functions. You can use these hooks to help you debug programs that use dynamic memory allocation, for example.

The variable __malloc_initialize_hook points at a function that is called once when the malloc implementation is initialized. This is a weak variable, so it can be overridden in the application with a definition like the following:

void (*__malloc_initialize_hook)(void) = my_init_hook;

Now the function my_init_hook() can do the initialization of all hooks.

The four functions pointed to by __malloc_hook, __realloc_hook, __memalign_hook, __free_hook have a prototype like the functions malloc(3), realloc(3), memalign(3), free(3), respectively, except that they have a final argument caller that gives the address of the caller of malloc(3), etc.

The variable __after_morecore_hook points at a function that is called each time after sbrk(2) was asked for more memory.

STANDARDS

GNU.

NOTES

The use of these hook functions is not safe in multithreaded programs, and they are now deprecated. From glibc 2.24 onwards, the __malloc_initialize_hook variable has been removed from the API, and from glibc 2.34 onwards, all the hook variables have been removed from the API. Programmers should instead preempt calls to the relevant functions by defining and exporting malloc(), free(), realloc(), and calloc().

EXAMPLES

Here is a short example of how to use these variables.

#include <stdio.h>
#include <malloc.h>
/* Prototypes for our hooks */
static void my_init_hook(void);
static void *my_malloc_hook(size_t, const void *);
/* Variables to save original hooks */
static void *(*old_malloc_hook)(size_t, const void *);
/* Override initializing hook from the C library */
void (*__malloc_initialize_hook)(void) = my_init_hook;
static void
my_init_hook(void)
{
    old_malloc_hook = __malloc_hook;
    __malloc_hook = my_malloc_hook;
}
static void *
my_malloc_hook(size_t size, const void *caller)
{
    void *result;
    /* Restore all old hooks */
    __malloc_hook = old_malloc_hook;
    /* Call recursively */
    result = malloc(size);
    /* Save underlying hooks */
    old_malloc_hook = __malloc_hook;
    /* printf() might call malloc(), so protect it too */
    printf("malloc(%zu) called from %p returns %p

“, size, caller, result); /* Restore our own hooks */ __malloc_hook = my_malloc_hook; return result; }

SEE ALSO

mallinfo(3), malloc(3), mcheck(3), mtrace(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1398 - Linux cli command HTML_Formpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_Formpm and provides detailed information about the command HTML_Formpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_Formpm.

NAME 🖥️ HTML_Formpm 🖥️

Class that represents an HTML form element

VERSION

version 6.11

SYNOPSIS

use HTML::Form; $form = HTML::Form->parse($html, $base_uri); $form->value(query => “Perl”); use LWP::UserAgent; $ua = LWP::UserAgent->new; $response = $ua->request($form->click);

DESCRIPTION

Objects of the HTML::Form class represents a single HTML <form> ... </form> instance. A form consists of a sequence of inputs that usually have names, and which can take on various values. The state of a form can be tweaked and it can then be asked to provide HTTP::Request objects that can be passed to the request() method of LWP::UserAgent.

The following methods are available:

@forms = HTML::Form->parse( $html_document, $base_uri )

@forms = HTML::Form->parse( $html_document, base => $base_uri, %opt )

@forms = HTML::Form->parse( $response, %opt )

The parse() class method will parse an HTML document and build up HTML::Form objects for each <form> element found. If called in scalar context only returns the first <form>. Returns an empty list if there are no forms to be found. The required arguments is the HTML document to parse ($html_document) and the URI used to retrieve the document ($base_uri). The base URI is needed to resolve relative action URIs. The provided HTML document should be a Unicode string (or US-ASCII). By default HTML::Form assumes that the original document was UTF-8 encoded and thus encode forms that don’t specify an explicit accept-charset as UTF-8. The charset assumed can be overridden by providing the charset option to parse(). It’s a good idea to be explicit about this parameter as well, thus the recommended simplest invocation becomes: my @forms = HTML::Form->parse( Encode::decode($encoding, $html_document_bytes), base => $base_uri, charset => $encoding, ); If the document was retrieved with LWP then the response object provide methods to obtain a proper value for base and charset: my $ua = LWP::UserAgent->new; my $response = $ua->get(“http://www.example.com/form.html"); my @forms = HTML::Form->parse($response->decoded_content, base => $response->base, charset => $response->content_charset, ); In fact, the parse() method can parse from an HTTP::Response object directly, so the example above can be more conveniently written as: my $ua = LWP::UserAgent->new; my $response = $ua->get(“http://www.example.com/form.html"); my @forms = HTML::Form->parse($response); Note that any object that implements a decoded_content(), base() and content_charset() method with similar behaviour as HTTP::Response will do. Additional options might be passed in to control how the parse method behaves. The following are all the options currently recognized:

“base => $uri”
This is the URI used to retrieve the original document. This option is not optional ;-)

“charset => $str”
Specify what charset the original document was encoded in. This is used as the default for accept_charset. If not provided this defaults to UTF-8.

“verbose => $bool”
Warn (print messages to STDERR) about any bad HTML form constructs found. You can trap these with $SIG{_ _WARN_ _}. The default is not to issue warnings.

“strict => $bool”
Initialize any form objects with the given strict attribute. If the strict is turned on the methods that change values of the form will croak if you try to set illegal values or modify readonly fields. The default is not to be strict.

$form->push_input( $type, \attr, $verbose )
This method adds additional inputs to the form. The first argument is the type of input (e.g. hidden, option, etc.). The second argument is a reference to a hash of the input attributes. The third argument is optional, and will issue warnings about unknown input types. Example: push_input( hidden, { name => NewFormElement, id => NewFormElementId, value => some value, });

$method = $form->method

$form->method( $new_method )

This method is gets/sets the method name used for the HTTP::Request generated. It is a string like GET or POST.

$action = $form->action

$form->action( $new_action )

This method gets/sets the URI which we want to apply the request method to.

$enctype = $form->enctype

$form->enctype( $new_enctype )

This method gets/sets the encoding type for the form data. It is a string like application/x-www-form-urlencoded or multipart/form-data.

$accept = $form->accept_charset

$form->accept_charset( $new_accept )

This method gets/sets the list of charset encodings that the server processing the form accepts. Current implementation supports only one-element lists. Default value is UNKNOWN which we interpret as a request to use document charset as specified by the ‘charset’ parameter of the parse() method.

$value = $form->attr( $name )

$form->attr( $name, $new_value )

This method give access to the original HTML attributes of the <form> tag. The $name should always be passed in lower case. Example: @f = HTML::Form->parse( $html, $foo ); @f = grep $_->attr(“id”) eq “foo”, @f; die “No form named foo found” unless @f; $foo = shift @f;

$bool = $form->strict

$form->strict( $bool )

Gets/sets the strict attribute of a form. If the strict is turned on the methods that change values of the form will croak if you try to set illegal values or modify readonly fields. The default is not to be strict.

@inputs = $form->inputs
This method returns the list of inputs in the form. If called in scalar context it returns the number of inputs contained in the form. See INPUTS for what methods are available for the input objects returned.

$input = $form->find_input( $selector )

$input = $form->find_input( $selector, $type )

$input = $form->find_input( $selector, $type, $index )

@inputs = $form->find_input( $selector )

@inputs = $form->find_input( $selector, $type )

This method is used to locate specific inputs within the form. All inputs that match the arguments given are returned. In scalar context only the first is returned, or undef if none match. If $selector is not undef, then the input’s name, id or class attribute must match. A selector prefixed with ‘#’ must match the id attribute of the input. A selector prefixed with ‘.’ matches the class attribute. A selector prefixed with ‘^’ or with no prefix matches the name attribute. my @by_id = $form->find_input( #some-id ); my @by_class = $form->find_input( .some-class ); my @by_name = $form->find_input( ^some-name ); my @also_by_name = $form->find_input( some-name ); If you want to find an input that has no name at all, pass in a reference to undef. my @nameless_inputs = $form->find_input( \undef ); If $type is not undef, then the input must have the specified type. The following type names are used: text, password, hidden, textarea, file, image, submit, radio, checkbox and option. The $index is the sequence number of the input matched where 1 is the first. If combined with $selector and/or $type, then it selects the nth input with the given name and/or type.

$value = $form->value( $selector )

$form->value( $selector, $new_value )

The value() method can be used to get/set the value of some input. If strict is enabled and no input has the indicated name, then this method will croak. If multiple inputs have the same name, only the first one will be affected. The call: $form->value(foo) is basically a short-hand for: $form->find_input(foo)->value;

@names = $form->param

@values = $form->param( $name )

$form->param( $name, $value, … )

$form->param( $name, \values )

Alternative interface to examining and setting the values of the form. If called without arguments then it returns the names of all the inputs in the form. The names will not repeat even if multiple inputs have the same name. In scalar context the number of different names is returned. If called with a single argument then it returns the value or values of inputs with the given name. If called in scalar context only the first value is returned. If no input exists with the given name, then undef is returned. If called with 2 or more arguments then it will set values of the named inputs. This form will croak if no inputs have the given name or if any of the values provided does not fit. Values can also be provided as a reference to an array. This form will allow unsetting all values with the given name as well. This interface resembles that of the param() function of the CGI module.

$form->try_others( \callback )
This method will iterate over all permutations of unvisited enumerated values (<select>, <radio>, <checkbox>) and invoke the callback for each. The callback is passed the $form as argument. The return value from the callback is ignored and the try_others() method itself does not return anything.

$request = $form->make_request
Will return an HTTP::Request object that reflects the current setting of the form. You might want to use the click() method instead.

$request = $form->click

$request = $form->click( $selector )

$request = $form->click( $x, $y )

$request = $form->click( $selector, $x, $y )

Will click on the first clickable input (which will be of type submit or image). The result of clicking is an HTTP::Request object that can then be passed to LWP::UserAgent if you want to obtain the server response. If a $selector is specified, we will click on the first clickable input matching the selector, and the method will croak if no matching clickable input is found. If $selector is not specified, then it is ok if the form contains no clickable inputs. In this case the click() method returns the same request as the make_request() method would do. See description of the find_input() method above for how the $selector is specified. If there are multiple clickable inputs with the same name, then there is no way to get the click() method of the HTML::Form to click on any but the first. If you need this you would have to locate the input with find_input() and invoke the click() method on the given input yourself. A click coordinate pair can also be provided, but this only makes a difference if you clicked on an image. The default coordinate is (1,1). The upper-left corner of the image is (0,0), but some badly coded CGI scripts are known to not recognize this. Therefore (1,1) was selected as a safer default.

@kw = $form->form
Returns the current setting as a sequence of key/value pairs. Note that keys might be repeated, which means that some values might be lost if the return values are assigned to a hash. In scalar context this method returns the number of key/value pairs generated.

$form->dump
Returns a textual representation of current state of the form. Mainly useful for debugging. If called in void context, then the dump is printed on STDERR.

NAME 🖥️ HTML_Formpm 🖥️

Class that represents an HTML form element

INPUTS

An HTML::Form object contains a sequence of inputs. References to the inputs can be obtained with the $form->inputs or $form->find_input methods.

Note that there is not a one-to-one correspondence between input objects and <input> elements in the HTML document. An input object basically represents a name/value pair, so when multiple HTML elements contribute to the same name/value pair in the submitted form they are combined.

The input elements that are mapped one-to-one are text, textarea, password, hidden, file, image, submit and checkbox. For the radio and option inputs the story is not as simple: All <input type=radio> elements with the same name will contribute to the same input radio object. The number of radio input objects will be the same as the number of distinct names used for the <input type=radio> elements. For a <select> element without the multiple attribute there will be one input object of type of option. For a <select multiple> element there will be one input object for each contained <option> element. Each one of these option objects will have the same name.

The following methods are available for the input objects:

$input->type
Returns the type of this input. The type is one of the following strings: text, password, hidden, textarea, file, image, submit, radio, checkbox or option.

$name = $input->name

$input->name( $new_name )

This method can be used to get/set the current name of the input.

$input->id

$input->class

These methods can be used to get/set the current id or class attribute for the input.

$input->selected( $selector )
Returns TRUE if the given selector matched the input. See the description of the find_input() method above for a description of the selector syntax.

$value = $input->value

$input->value( $new_value )

This method can be used to get/set the current value of an input. If strict is enabled and the input only can take an enumerated list of values, then it is an error to try to set it to something else and the method will croak if you try. You will also be able to set the value of read-only inputs, but a warning will be generated if running under perl -w.

$autocomplete = $input->autocomplete

$input->autocomplete( $new_autocomplete )

This method can be used to get/set the current value (if any) of autcomplete for the input.

$input->possible_values
Returns a list of all values that an input can take. For inputs that do not have discrete values, this returns an empty list.

$input->other_possible_values
Returns a list of all values not tried yet.

$input->value_names
For some inputs the values can have names that are different from the values themselves. The number of names returned by this method will match the number of values reported by $input->possible_values. When setting values using the value() method it is also possible to use the value names in place of the value itself.

$bool = $input->readonly

$input->readonly( $bool )

This method is used to get/set the value of the readonly attribute. You are allowed to modify the value of readonly inputs, but setting the value will generate some noise when warnings are enabled. Hidden fields always start out readonly.

$bool = $input->disabled

$input->disabled( $bool )

This method is used to get/set the value of the disabled attribute. Disabled inputs do not contribute any key/value pairs for the form value.

$input->form_name_value
Returns a (possible empty) list of key/value pairs that should be incorporated in the form value from this input.

$input->check
Some input types represent toggles that can be turned on/off. This includes checkbox and option inputs. Calling this method turns this input on without having to know the value name. If the input is already on, then nothing happens. This has the same effect as: $input->value($input->possible_values[1]); The input can be turned off with: $input->value(undef);

$input->click($form, $x, $y)
Some input types (currently submit buttons and images) can be clicked to submit the form. The click() method returns the corresponding HTTP::Request object.

If the input is of type file, then it has these additional methods:

$input->file
This is just an alias for the value() method. It sets the filename to read data from. For security reasons this field will never be initialized from the parsing of a form. This prevents the server from triggering stealth uploads of arbitrary files from the client machine.

$filename = $input->filename

$input->filename( $new_filename )

This get/sets the filename reported to the server during file upload. This attribute defaults to the value reported by the file() method.

$content = $input->content

$input->content( $new_content )

This get/sets the file content provided to the server during file upload. This method can be used if you do not want the content to be read from an actual file.

@headers = $input->headers

input->headers($key => $value, …. )

This get/set additional header fields describing the file uploaded. This can for instance be used to set the Content-Type reported for the file.

SEE ALSO

LWP, LWP::UserAgent, HTML::Parser

AUTHOR

Gisle Aas <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 1998 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1399 - Linux cli command HTML_Parsepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_Parsepm and provides detailed information about the command HTML_Parsepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_Parsepm.

NAME 🖥️ HTML_Parsepm 🖥️

Deprecated, a wrapper around HTML::TreeBuilder

VERSION

This document describes version 5.07 of HTML::Parse, released August 31, 2017 as part of HTML-Tree.

SYNOPSIS

See the documentation for HTML::TreeBuilder

DESCRIPTION

Disclaimer: This module is provided only for backwards compatibility with earlier versions of this library. New code should not use this module, and should really use the HTML::Parser and HTML::TreeBuilder modules directly, instead.

The HTML::Parse module provides functions to parse HTML documents. There are two functions exported by this module:

parse_html($html) or parse_html($html, $obj)
This function is really just a synonym for $obj->parse($html) and $obj is assumed to be a subclass of HTML::Parser. Refer to HTML::Parser for more documentation. If $obj is not specified, the $obj will default to an internally created new HTML::TreeBuilder object configured with strict_comment() turned on. That class implements a parser that builds (and is) a HTML syntax tree with HTML::Element objects as nodes. The return value from parse_html() is $obj.

parse_htmlfile($file, [$obj])
Same as parse_html(), but pulls the HTML to parse, from the named file. Returns undef if the file could not be opened, or $obj otherwise.

When a HTML::TreeBuilder object is created, the following variables control how parsing takes place:

$HTML::Parse::IMPLICIT_TAGS
Setting this variable to true will instruct the parser to try to deduce implicit elements and implicit end tags. If this variable is false you get a parse tree that just reflects the text as it stands. Might be useful for quick & dirty parsing. Default is true. Implicit elements have the implicit() attribute set.

$HTML::Parse::IGNORE_UNKNOWN
This variable contols whether unknown tags should be represented as elements in the parse tree. Default is true.

$HTML::Parse::IGNORE_TEXT
Do not represent the text content of elements. This saves space if all you want is to examine the structure of the document. Default is false.

$HTML::Parse::WARN
Call warn() with an appropriate message for syntax errors. Default is false.

REMEMBER!

HTML::TreeBuilder objects should be explicitly destroyed when you’re finished with them. See HTML::TreeBuilder.

SEE ALSO

HTML::Parser, HTML::TreeBuilder, HTML::Element

AUTHOR

Current maintainers:

  • Christopher J. Madsen <perl AT cjmweb.net>

  • Jeff Fearn <jfearn AT cpan.org>

Original HTML-Tree author:

  • Gisle Aas

Former maintainers:

  • Sean M. Burke

  • Andy Lester

  • Pete Krawczyk <petek AT cpan.org>

You can follow or contribute to HTML-Tree’s development at <https://github.com/kentfredric/HTML-Tree>.

COPYRIGHT AND LICENSE

Copyright 1995-1998 Gisle Aas, 1999-2004 Sean M. Burke, 2005 Andy Lester, 2006 Pete Krawczyk, 2010 Jeff Fearn, 2012 Christopher J. Madsen.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The programs in this library are distributed in the hope that they will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1400 - Linux cli command strtok

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strtok and provides detailed information about the command strtok, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strtok.

NAME 🖥️ strtok 🖥️

extract tokens from strings

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strtok(char *restrict str, const char *restrict delim);
char *strtok_r(char *restrict str, const char *restrict delim,
 char **restrict saveptr);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strtok_r():

    _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The strtok() function breaks a string into a sequence of zero or more nonempty tokens. On the first call to strtok(), the string to be parsed should be specified in str. In each subsequent call that should parse the same string, str must be NULL.

The delim argument specifies a set of bytes that delimit the tokens in the parsed string. The caller may specify different strings in delim in successive calls that parse the same string.

Each call to strtok() returns a pointer to a null-terminated string containing the next token. This string does not include the delimiting byte. If no more tokens are found, strtok() returns NULL.

A sequence of calls to strtok() that operate on the same string maintains a pointer that determines the point from which to start searching for the next token. The first call to strtok() sets this pointer to point to the first byte of the string. The start of the next token is determined by scanning forward for the next nondelimiter byte in str. If such a byte is found, it is taken as the start of the next token. If no such byte is found, then there are no more tokens, and strtok() returns NULL. (A string that is empty or that contains only delimiters will thus cause strtok() to return NULL on the first call.)

The end of each token is found by scanning forward until either the next delimiter byte is found or until the terminating null byte (‘�’) is encountered. If a delimiter byte is found, it is overwritten with a null byte to terminate the current token, and strtok() saves a pointer to the following byte; that pointer will be used as the starting point when searching for the next token. In this case, strtok() returns a pointer to the start of the found token.

From the above description, it follows that a sequence of two or more contiguous delimiter bytes in the parsed string is considered to be a single delimiter, and that delimiter bytes at the start or end of the string are ignored. Put another way: the tokens returned by strtok() are always nonempty strings. Thus, for example, given the string “aaa;;bbb,”, successive calls to strtok() that specify the delimiter string “;,” would return the strings “aaa” and “bbb”, and then a null pointer.

The strtok_r() function is a reentrant version of strtok(). The saveptr argument is a pointer to a char * variable that is used internally by strtok_r() in order to maintain context between successive calls that parse the same string.

On the first call to strtok_r(), str should point to the string to be parsed, and the value of *saveptr is ignored (but see NOTES). In subsequent calls, str should be NULL, and saveptr (and the buffer that it points to) should be unchanged since the previous call.

Different strings may be parsed concurrently using sequences of calls to strtok_r() that specify different saveptr arguments.

RETURN VALUE

The strtok() and strtok_r() functions return a pointer to the next token, or NULL if there are no more tokens.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strtok()

Thread safetyMT-Unsafe race:strtok

strtok_r()

Thread safetyMT-Safe

VERSIONS

On some implementations, *saveptr is required to be NULL on the first call to strtok_r() that is being used to parse str.

STANDARDS

strtok()
C11, POSIX.1-2008.

strtok_r()
POSIX.1-2008.

HISTORY

strtok()
POSIX.1-2001, C89, SVr4, 4.3BSD.

strtok_r()
POSIX.1-2001.

BUGS

Be cautious when using these functions. If you do use them, note that:

  • These functions modify their first argument.

  • These functions cannot be used on constant strings.

  • The identity of the delimiting byte is lost.

  • The strtok() function uses a static buffer while parsing, so it’s not thread safe. Use strtok_r() if this matters to you.

EXAMPLES

The program below uses nested loops that employ strtok_r() to break a string into a two-level hierarchy of tokens. The first command-line argument specifies the string to be parsed. The second argument specifies the delimiter byte(s) to be used to separate that string into “major” tokens. The third argument specifies the delimiter byte(s) to be used to separate the “major” tokens into subtokens.

An example of the output produced by this program is the following:

$ ./a.out 'a/bbb///cc;xxx:yyy:' ':;' '/'
1: a/bbb///cc
         --> a
         --> bbb
         --> cc
2: xxx
         --> xxx
3: yyy
         --> yyy

Program source

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int
main(int argc, char *argv[])
{
    char *str1, *str2, *token, *subtoken;
    char *saveptr1, *saveptr2;
    int j;
    if (argc != 4) {
        fprintf(stderr, "Usage: %s string delim subdelim

“, argv[0]); exit(EXIT_FAILURE); } for (j = 1, str1 = argv[1]; ; j++, str1 = NULL) { token = strtok_r(str1, argv[2], &saveptr1); if (token == NULL) break; printf("%d: %s “, j, token); for (str2 = token; ; str2 = NULL) { subtoken = strtok_r(str2, argv[3], &saveptr2); if (subtoken == NULL) break; printf(” –> %s “, subtoken); } } exit(EXIT_SUCCESS); }

Another example program using strtok() can be found in getaddrinfo_a(3).

SEE ALSO

memchr(3), strchr(3), string(3), strpbrk(3), strsep(3), strspn(3), strstr(3), wcstok(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1401 - Linux cli command gsignal

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gsignal and provides detailed information about the command gsignal, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gsignal.

NAME 🖥️ gsignal 🖥️

software signal facility

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
typedef void (*sighandler_t)(int);
[[deprecated]] int gsignal(int signum);
[[deprecated]] sighandler_t ssignal(int signum, sighandler_t action);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

gsignal(), ssignal():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _SVID_SOURCE

DESCRIPTION

Don’t use these functions under Linux. Due to a historical mistake, under Linux these functions are aliases for raise(3) and signal(2), respectively.

Elsewhere, on System V-like systems, these functions implement software signaling, entirely independent of the classical signal(2) and kill(2) functions. The function ssignal() defines the action to take when the software signal with number signum is raised using the function gsignal(), and returns the previous such action or SIG_DFL. The function gsignal() does the following: if no action (or the action SIG_DFL) was specified for signum, then it does nothing and returns 0. If the action SIG_IGN was specified for signum, then it does nothing and returns 1. Otherwise, it resets the action to SIG_DFL and calls the action function with argument signum, and returns the value returned by that function. The range of possible values signum varies (often 1–15 or 1–17).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

gsignal()

Thread safetyMT-Safe

ssignal()

Thread safetyMT-Safe sigintr

STANDARDS

None.

HISTORY

AIX, DG/UX, HP-UX, SCO, Solaris, Tru64. They are called obsolete under most of these systems, and are broken under glibc. Some systems also have gsignal_r() and ssignal_r().

SEE ALSO

kill(2), signal(2), raise(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1402 - Linux cli command fmemopen

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fmemopen and provides detailed information about the command fmemopen, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fmemopen.

NAME 🖥️ fmemopen 🖥️

open memory as stream

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
FILE *fmemopen(void buf[.size], size_t size, const char *mode);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

fmemopen():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The fmemopen() function opens a stream that permits the access specified by mode. The stream allows I/O to be performed on the string or memory buffer pointed to by buf.

The mode argument specifies the semantics of I/O on the stream, and is one of the following:

r
The stream is opened for reading.

w
The stream is opened for writing.

a
Append; open the stream for writing, with the initial buffer position set to the first null byte.

r+
Open the stream for reading and writing.

w+
Open the stream for reading and writing. The buffer contents are truncated (i.e., ‘�’ is placed in the first byte of the buffer).

a+
Append; open the stream for reading and writing, with the initial buffer position set to the first null byte.

The stream maintains the notion of a current position, the location where the next I/O operation will be performed. The current position is implicitly updated by I/O operations. It can be explicitly updated using fseek(3), and determined using ftell(3). In all modes other than append, the initial position is set to the start of the buffer. In append mode, if no null byte is found within the buffer, then the initial position is size+1.

If buf is specified as NULL, then fmemopen() allocates a buffer of size bytes. This is useful for an application that wants to write data to a temporary buffer and then read it back again. The initial position is set to the start of the buffer. The buffer is automatically freed when the stream is closed. Note that the caller has no way to obtain a pointer to the temporary buffer allocated by this call (but see open_memstream(3)).

If buf is not NULL, then it should point to a buffer of at least size bytes allocated by the caller.

When a stream that has been opened for writing is flushed (fflush(3)) or closed (fclose(3)), a null byte is written at the end of the buffer if there is space. The caller should ensure that an extra byte is available in the buffer (and that size counts that byte) to allow for this.

In a stream opened for reading, null bytes (‘�’) in the buffer do not cause read operations to return an end-of-file indication. A read from the buffer will indicate end-of-file only when the current buffer position advances size bytes past the start of the buffer.

Write operations take place either at the current position (for modes other than append), or at the current size of the stream (for append modes).

Attempts to write more than size bytes to the buffer result in an error. By default, such errors will be visible (by the absence of data) only when the stdio buffer is flushed. Disabling buffering with the following call may be useful to detect errors at the time of an output operation:

setbuf(stream, NULL);

RETURN VALUE

Upon successful completion, fmemopen() returns a FILE pointer. Otherwise, NULL is returned and errno is set to indicate the error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fmemopen(),

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 1.0.x. POSIX.1-2008.

POSIX.1-2008 specifies that ‘b’ in mode shall be ignored. However, Technical Corrigendum 1 adjusts the standard to allow implementation-specific treatment for this case, thus permitting the glibc treatment of ‘b’.

With glibc 2.22, binary mode (see below) was removed, many longstanding bugs in the implementation of fmemopen() were fixed, and a new versioned symbol was created for this interface.

Binary mode

From glibc 2.9 to glibc 2.21, the glibc implementation of fmemopen() supported a “binary” mode, enabled by specifying the letter ‘b’ as the second character in mode. In this mode, writes don’t implicitly add a terminating null byte, and fseek(3) SEEK_END is relative to the end of the buffer (i.e., the value specified by the size argument), rather than the current string length.

An API bug afflicted the implementation of binary mode: to specify binary mode, the ‘b’ must be the second character in mode. Thus, for example, “wb+” has the desired effect, but “w+b” does not. This is inconsistent with the treatment of mode by fopen(3).

Binary mode was removed in glibc 2.22; a ‘b’ specified in mode has no effect.

NOTES

There is no file descriptor associated with the file stream returned by this function (i.e., fileno(3) will return an error if called on the returned stream).

BUGS

Before glibc 2.22, if size is specified as zero, fmemopen() fails with the error EINVAL. It would be more consistent if this case successfully created a stream that then returned end-of-file on the first attempt at reading; since glibc 2.22, the glibc implementation provides that behavior.

Before glibc 2.22, specifying append mode (“a” or “a+”) for fmemopen() sets the initial buffer position to the first null byte, but (if the current position is reset to a location other than the end of the stream) does not force subsequent writes to append at the end of the stream. This bug is fixed in glibc 2.22.

Before glibc 2.22, if the mode argument to fmemopen() specifies append (“a” or “a+”), and the size argument does not cover a null byte in buf, then, according to POSIX.1-2008, the initial buffer position should be set to the next byte after the end of the buffer. However, in this case the glibc fmemopen() sets the buffer position to -1. This bug is fixed in glibc 2.22.

Before glibc 2.22, when a call to fseek(3) with a whence value of SEEK_END was performed on a stream created by fmemopen(), the offset was subtracted from the end-of-stream position, instead of being added. This bug is fixed in glibc 2.22.

The glibc 2.9 addition of “binary” mode for fmemopen() silently changed the ABI: previously, fmemopen() ignored ‘b’ in mode.

EXAMPLES

The program below uses fmemopen() to open an input buffer, and open_memstream(3) to open a dynamically sized output buffer. The program scans its input string (taken from the program’s first command-line argument) reading integers, and writes the squares of these integers to the output buffer. An example of the output produced by this program is the following:

$ ./a.out '1 23 43'
size=11; ptr=1 529 1849

Program source

#define _GNU_SOURCE
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int
main(int argc, char *argv[])
{
    FILE *out, *in;
    int v, s;
    size_t size;
    char *ptr;
    if (argc != 2) {
        fprintf(stderr, "Usage: %s '<num>...'

“, argv[0]); exit(EXIT_FAILURE); } in = fmemopen(argv[1], strlen(argv[1]), “r”); if (in == NULL) err(EXIT_FAILURE, “fmemopen”); out = open_memstream(&ptr, &size); if (out == NULL) err(EXIT_FAILURE, “open_memstream”); for (;;) { s = fscanf(in, “%d”, &v); if (s <= 0) break; s = fprintf(out, “%d “, v * v); if (s == -1) err(EXIT_FAILURE, “fprintf”); } fclose(in); fclose(out); printf(“size=%zu; ptr=%s “, size, ptr); free(ptr); exit(EXIT_SUCCESS); }

SEE ALSO

fopen(3), fopencookie(3), open_memstream(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1403 - Linux cli command Net_DNS_SECpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_SECpm and provides detailed information about the command Net_DNS_SECpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_SECpm.

NAME 🖥️ Net_DNS_SECpm 🖥️

DNSSEC extensions to Net::DNS

SYNOPSIS

use Net::DNS::SEC;

DESCRIPTION

Net::DNS::SEC is installed as an extension to an existing Net::DNS installation providing packages to support DNSSEC as specified in RFC4033, RFC4034, RFC4035 and related documents.

It also provides support for SIG0 which is useful for dynamic updates.

Implements cryptographic signature generation and verification functions using RSA, DSA, ECDSA, and Edwards curve algorithms.

The extended features are made available by replacing Net::DNS by Net::DNS::SEC in the use declaration.

UTILITY FUNCTIONS

algorithm

$mnemonic = algorithm( 5 ); $numeric = algorithm( RSA-SHA1 ); print “algorithm mnemonic “, $mnemonic, " “; print “algorithm number: “, $numeric, " “;

algorithm() provides conversions between an algorithm code number and the corresponding mnemonic.

digtype

$mnemonic = digtype( 2 ); $numeric = digtype( SHA-256 ); print “digest type mnemonic “, $mnemonic, " “; print “digest type number: “, $numeric, " “;

digtype() provides conversions between a digest type number and the corresponding mnemonic.

key_difference

@result = key_difference( \a, \b );

Fills @result with all keys in array @a that are not in array @b.

COPYRIGHT

Copyright (c)2014-2021 Dick Franks

Copyright (c)2001-2005 RIPE NCC. Author Olaf M. Kolkman

All Rights Reserved

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl, Net::DNS, RFC4033, RFC4034, RFC4035, OpenSSL <http://www.openssl.org/docs>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1404 - Linux cli command optopt

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command optopt and provides detailed information about the command optopt, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the optopt.

NAME 🖥️ optopt 🖥️

Parse command-line options

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
int getopt(int argc, char *argv[],
 const char *optstring);
extern char *optarg;
extern int optind, opterr, optopt;
#include <getopt.h>
int getopt_long(int argc, char *argv[],
 const char *optstring,
 const struct option *longopts, int *longindex);
int getopt_long_only(int argc, char *argv[],
 const char *optstring,
 const struct option *longopts, int *longindex);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getopt():

    _POSIX_C_SOURCE >= 2 || _XOPEN_SOURCE

getopt_long(), getopt_long_only():

    _GNU_SOURCE

DESCRIPTION

The getopt() function parses the command-line arguments. Its arguments argc and argv are the argument count and array as passed to the main() function on program invocation. An element of argv that starts with ‘-’ (and is not exactly “-” or “–”) is an option element. The characters of this element (aside from the initial ‘-’) are option characters. If getopt() is called repeatedly, it returns successively each of the option characters from each of the option elements.

The variable optind is the index of the next element to be processed in argv. The system initializes this value to 1. The caller can reset it to 1 to restart scanning of the same argv, or when scanning a new argument vector.

If getopt() finds another option character, it returns that character, updating the external variable optind and a static variable nextchar so that the next call to getopt() can resume the scan with the following option character or argv-element.

If there are no more option characters, getopt() returns -1. Then optind is the index in argv of the first argv-element that is not an option.

optstring is a string containing the legitimate option characters. A legitimate option character is any visible one byte ascii(7) character (for which isgraph(3) would return nonzero) that is not ‘-’, ‘:’, or ‘;’. If such a character is followed by a colon, the option requires an argument, so getopt() places a pointer to the following text in the same argv-element, or the text of the following argv-element, in optarg. Two colons mean an option takes an optional arg; if there is text in the current argv-element (i.e., in the same word as the option name itself, for example, “-oarg”), then it is returned in optarg, otherwise optarg is set to zero. This is a GNU extension. If optstring contains W followed by a semicolon, then -W foo is treated as the long option –foo. (The -W option is reserved by POSIX.2 for implementation extensions.) This behavior is a GNU extension, not available with libraries before glibc 2.

By default, getopt() permutes the contents of argv as it scans, so that eventually all the nonoptions are at the end. Two other scanning modes are also implemented. If the first character of optstring is ‘+’ or the environment variable POSIXLY_CORRECT is set, then option processing stops as soon as a nonoption argument is encountered. If ‘+’ is not the first character of optstring, it is treated as a normal option. If POSIXLY_CORRECT behaviour is required in this case optstring will contain two ‘+’ symbols. If the first character of optstring is ‘-’, then each nonoption argv-element is handled as if it were the argument of an option with character code 1. (This is used by programs that were written to expect options and other argv-elements in any order and that care about the ordering of the two.) The special argument “–” forces an end of option-scanning regardless of the scanning mode.

While processing the option list, getopt() can detect two kinds of errors: (1) an option character that was not specified in optstring and (2) a missing option argument (i.e., an option at the end of the command line without an expected argument). Such errors are handled and reported as follows:

  • By default, getopt() prints an error message on standard error, places the erroneous option character in optopt, and returns ‘?’ as the function result.

  • If the caller has set the global variable opterr to zero, then getopt() does not print an error message. The caller can determine that there was an error by testing whether the function return value is ‘?’. (By default, opterr has a nonzero value.)

  • If the first character (following any optional ‘+’ or ‘-’ described above) of optstring is a colon (’:’), then getopt() likewise does not print an error message. In addition, it returns ‘:’ instead of ‘?’ to indicate a missing option argument. This allows the caller to distinguish the two different types of errors.

getopt_long() and getopt_long_only()

The getopt_long() function works like getopt() except that it also accepts long options, started with two dashes. (If the program accepts only long options, then optstring should be specified as an empty string (""), not NULL.) Long option names may be abbreviated if the abbreviation is unique or is an exact match for some defined option. A long option may take a parameter, of the form –arg=param or –arg param.

longopts is a pointer to the first element of an array of struct option declared in <getopt.h> as

struct option {
    const char *name;
    int         has_arg;
    int        *flag;
    int         val;
};

The meanings of the different fields are:

name
is the name of the long option.

has_arg
is: no_argument (or 0) if the option does not take an argument; required_argument (or 1) if the option requires an argument; or optional_argument (or 2) if the option takes an optional argument.

flag
specifies how results are returned for a long option. If flag is NULL, then getopt_long() returns val. (For example, the calling program may set val to the equivalent short option character.) Otherwise, getopt_long() returns 0, and flag points to a variable which is set to val if the option is found, but left unchanged if the option is not found.

val
is the value to return, or to load into the variable pointed to by flag.

The last element of the array has to be filled with zeros.

If longindex is not NULL, it points to a variable which is set to the index of the long option relative to longopts.

getopt_long_only() is like getopt_long(), but ‘-’ as well as “–” can indicate a long option. If an option that starts with ‘-’ (not “–”) doesn’t match a long option, but does match a short option, it is parsed as a short option instead.

RETURN VALUE

If an option was successfully found, then getopt() returns the option character. If all command-line options have been parsed, then getopt() returns -1. If getopt() encounters an option character that was not in optstring, then ‘?’ is returned. If getopt() encounters an option with a missing argument, then the return value depends on the first character in optstring: if it is ‘:’, then ‘:’ is returned; otherwise ‘?’ is returned.

getopt_long() and getopt_long_only() also return the option character when a short option is recognized. For a long option, they return val if flag is NULL, and 0 otherwise. Error and -1 returns are the same as for getopt(), plus ‘?’ for an ambiguous match or an extraneous parameter.

ENVIRONMENT

POSIXLY_CORRECT
If this is set, then option processing stops as soon as a nonoption argument is encountered.

_<PID>_GNU_nonoption_argv_flags_
This variable was used by bash(1) 2.0 to communicate to glibc which arguments are the results of wildcard expansion and so should not be considered as options. This behavior was removed in bash(1) 2.01, but the support remains in glibc.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getopt(), getopt_long(), getopt_long_only()

Thread safety

MT-Unsafe race:getopt env

VERSIONS

POSIX specifies that the argv array argument should be const, but these functions permute its elements unless the environment variable POSIXLY_CORRECT is set. const is used in the actual prototype to be compatible with other systems; however, this page doesn’t show the qualifier, to avoid confusing readers.

STANDARDS

getopt()
POSIX.1-2008.

getopt_long()
getopt_long_only()
GNU.

The use of ‘+’ and ‘-’ in optstring is a GNU extension.

HISTORY

getopt()
POSIX.1-2001, and POSIX.2.

On some older implementations, getopt() was declared in <stdio.h>. SUSv1 permitted the declaration to appear in either <unistd.h> or <stdio.h>. POSIX.1-1996 marked the use of <stdio.h> for this purpose as LEGACY. POSIX.1-2001 does not require the declaration to appear in <stdio.h>.

NOTES

A program that scans multiple argument vectors, or rescans the same vector more than once, and wants to make use of GNU extensions such as ‘+’ and ‘-’ at the start of optstring, or changes the value of POSIXLY_CORRECT between scans, must reinitialize getopt() by resetting optind to 0, rather than the traditional value of 1. (Resetting to 0 forces the invocation of an internal initialization routine that rechecks POSIXLY_CORRECT and checks for GNU extensions in optstring.)

Command-line arguments are parsed in strict order meaning that an option requiring an argument will consume the next argument, regardless of whether that argument is the correctly specified option argument or simply the next option (in the scenario the user mis-specifies the command line). For example, if optstring is specified as “1n:” and the user specifies the command line arguments incorrectly as prog -n -1, the -n option will be given the optarg value “-1”, and the -1 option will be considered to have not been specified.

EXAMPLES

getopt()

The following trivial example program uses getopt() to handle two program options: -n, with no associated value; and -t val, which expects an associated value.

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int
main(int argc, char *argv[])
{
    int flags, opt;
    int nsecs, tfnd;
    nsecs = 0;
    tfnd = 0;
    flags = 0;
    while ((opt = getopt(argc, argv, "nt:")) != -1) {
        switch (opt) {
        case 'n':
            flags = 1;
            break;
        case 't':
            nsecs = atoi(optarg);
            tfnd = 1;
            break;
        default: /* '?' */
            fprintf(stderr, "Usage: %s [-t nsecs] [-n] name

“, argv[0]); exit(EXIT_FAILURE); } } printf(“flags=%d; tfnd=%d; nsecs=%d; optind=%d “, flags, tfnd, nsecs, optind); if (optind >= argc) { fprintf(stderr, “Expected argument after options “); exit(EXIT_FAILURE); } printf(“name argument = %s “, argv[optind]); /* Other code omitted */ exit(EXIT_SUCCESS); }

getopt_long()

The following example program illustrates the use of getopt_long() with most of its features.

#include <getopt.h>
#include <stdio.h>     /* for printf */
#include <stdlib.h>    /* for exit */
int
main(int argc, char *argv[])
{
    int c;
    int digit_optind = 0;
    while (1) {
        int this_option_optind = optind ? optind : 1;
        int option_index = 0;
        static struct option long_options[] = {
            {"add",     required_argument, 0,  0 },
            {"append",  no_argument,       0,  0 },
            {"delete",  required_argument, 0,  0 },
            {"verbose", no_argument,       0,  0 },
            {"create",  required_argument, 0, 'c'},
            {"file",    required_argument, 0,  0 },
            {0,         0,                 0,  0 }
        };
        c = getopt_long(argc, argv, "abc:d:012",
                        long_options, &option_index);
        if (c == -1)
            break;
        switch (c) {
        case 0:
            printf("option %s", long_options[option_index].name);
            if (optarg)
                printf(" with arg %s", optarg);
            printf("

“); break; case ‘0’: case ‘1’: case ‘2’: if (digit_optind != 0 && digit_optind != this_option_optind) printf(“digits occur in two different argv-elements. “); digit_optind = this_option_optind; printf(“option %c “, c); break; case ‘a’: printf(“option a “); break; case ‘b’: printf(“option b “); break; case ‘c’: printf(“option c with value ‘%s’ “, optarg); break; case ’d’: printf(“option d with value ‘%s’ “, optarg); break; case ‘?’: break; default: printf(”?? getopt returned character code 0%o ?? “, c); } } if (optind < argc) { printf(“non-option ARGV-elements: “); while (optind < argc) printf("%s “, argv[optind++]); printf(” “); } exit(EXIT_SUCCESS); }

SEE ALSO

getopt(1), getsubopt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1405 - Linux cli command SIMPLEQ_REMOVE_HEAD

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SIMPLEQ_REMOVE_HEAD and provides detailed information about the command SIMPLEQ_REMOVE_HEAD, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SIMPLEQ_REMOVE_HEAD.

NAME 🖥️ SIMPLEQ_REMOVE_HEAD 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1406 - Linux cli command XtGetSelectionValueIncremental

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGetSelectionValueIncremental and provides detailed information about the command XtGetSelectionValueIncremental, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGetSelectionValueIncremental.

NAME 🖥️ XtGetSelectionValueIncremental 🖥️

obtain selection values

SYNTAX

#include <X11/Intrinsic.h>

void XtGetSelectionValueIncremental(Widget w, Atom selection, Atom target, XtSelectionCallbackProc callback, XtPointer client_data, Time time);

void XtGetSelectionValuesIncremental(Widget w, Atom selection, Atom *targets, int count, XtSelectionCallbackProc callback, XtPointer *client_data, Time time);

ARGUMENTS

callback
Specifies the callback procedure that is to be called when the selection value has been obtained.

client_data
Specifies the argument that is to be passed to the specified procedure when it is called.

client_data
Specifies the client data (one for each target type) that is passed to the callback procedure when it is called for that target.

count
Specifies the length of the targets and client_data lists.

selection
Specifies the particular selection desired (that is, primary or secondary).

target
Specifies the type of the information that is needed about the selection.

targets
Specifies the types of information that is needed about the selection.

time
Specifies the timestamp that indicates when the selection value is desired.

  1. Specifies the widget that is making the request.

DESCRIPTION

The XtGetSelectionValueIncremental function is similar to XtGetSelectionValue except that the selection_callback procedure will be called repeatedly upon delivery of multiple segments of the selection value. The end of the selection value is indicated when selection_callback is called with a non-NULL value of length zero, which must still be freed by the client. If the transfer of the selection is aborted in the middle of a transfer (for example, because to timeout), the selection_callback procedure is called with a type value equal to the symbolic constant XT_CONVERT_FAIL so that the requestor can dispose of the partial selection value it has collected up until that point. Upon receiving XT_CONVERT_FAIL, the requesting client must determine for itself whether or not a partially completed transfer is meaningful.

The XtGetSelectionValuesIncremental function is similar to XtGetSelectionValueIncremental except that it takes a list of target types and a list of client data and obtains the current value of the selection converted to each of the targets. The effect is as if each target were specified in a separate call to XtGetSelectionValueIncremental. The callback is called once with the corresponding client data for each target. XtGetSelectionValuesIncremental does guarantee that all the conversions will use the same selection value because the ownership of the selection cannot change in the middle of the list, as would be when calling XtGetSelectionValueIncremental repeatedly.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1407 - Linux cli command getgrgid_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getgrgid_r and provides detailed information about the command getgrgid_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getgrgid_r.

NAME 🖥️ getgrgid_r 🖥️

get group file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <grp.h>
struct group *getgrnam(const char *name);
struct group *getgrgid(gid_t gid);
int getgrnam_r(const char *restrict name",structgroup*restrict"grp,
 char buf[restrict .buflen], size_t buflen,
 struct group **restrict result);
int getgrgid_r(gid_t gid, struct group *restrict grp,
 char buf[restrict .buflen], size_t buflen,
 struct group **restrict result);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getgrnam_r(), getgrgid_r():

    _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The getgrnam() function returns a pointer to a structure containing the broken-out fields of the record in the group database (e.g., the local group file /etc/group, NIS, and LDAP) that matches the group name name.

The getgrgid() function returns a pointer to a structure containing the broken-out fields of the record in the group database that matches the group ID gid.

The group structure is defined in <grp.h> as follows:

struct group {
    char   *gr_name;        /* group name */
    char   *gr_passwd;      /* group password */
    gid_t   gr_gid;         /* group ID */
    char  **gr_mem;         /* NULL-terminated array of pointers
                               to names of group members */
};

For more information about the fields of this structure, see group(5).

The getgrnam_r() and getgrgid_r() functions obtain the same information as getgrnam() and getgrgid(), but store the retrieved group structure in the space pointed to by grp. The string fields pointed to by the members of the group structure are stored in the buffer buf of size buflen. A pointer to the result (in case of success) or NULL (in case no entry was found or an error occurred) is stored in *result.

The call

sysconf(_SC_GETGR_R_SIZE_MAX)

returns either -1, without changing errno, or an initial suggested size for buf. (If this size is too small, the call fails with ERANGE, in which case the caller can retry with a larger buffer.)

RETURN VALUE

The getgrnam() and getgrgid() functions return a pointer to a group structure, or NULL if the matching entry is not found or an error occurs. If an error occurs, errno is set to indicate the error. If one wants to check errno after the call, it should be set to zero before the call.

The return value may point to a static area, and may be overwritten by subsequent calls to getgrent(3), getgrgid(), or getgrnam(). (Do not pass the returned pointer to free(3).)

On success, getgrnam_r() and getgrgid_r() return zero, and set *result to grp. If no matching group record was found, these functions return 0 and store NULL in *result. In case of error, an error number is returned, and NULL is stored in *result.

ERRORS

0 or ENOENT or ESRCH or EBADF or EPERM or …
The given name or gid was not found.

EINTR
A signal was caught; see signal(7).

EIO
I/O error.

EMFILE
The per-process limit on the number of open file descriptors has been reached.

ENFILE
The system-wide limit on the total number of open files has been reached.

ENOMEM
Insufficient memory to allocate group structure.

ERANGE
Insufficient buffer space supplied.

FILES

/etc/group
local group database file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getgrnam()

Thread safety

MT-Unsafe race:grnam locale

getgrgid()

Thread safety

MT-Unsafe race:grgid locale

getgrnam_r(), getgrgid_r()

Thread safetyMT-Safe locale

VERSIONS

The formulation given above under “RETURN VALUE” is from POSIX.1. It does not call “not found” an error, hence does not specify what value errno might have in this situation. But that makes it impossible to recognize errors. One might argue that according to POSIX errno should be left unchanged if an entry is not found. Experiments on various UNIX-like systems show that lots of different values occur in this situation: 0, ENOENT, EBADF, ESRCH, EWOULDBLOCK, EPERM, and probably others.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4, 4.3BSD.

SEE ALSO

endgrent(3), fgetgrent(3), getgrent(3), getpwnam(3), setgrent(3), group(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1408 - Linux cli command svc_register

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command svc_register and provides detailed information about the command svc_register, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the svc_register.

NAME 🖥️ svc_register 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1409 - Linux cli command lrint

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lrint and provides detailed information about the command lrint, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lrint.

NAME 🖥️ lrint 🖥️

round to nearest integer

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
long lrint(double x);
long lrintf(float x);
long lrintl(long double x);
long long llrint(double x);
long long llrintf(float x);
long long llrintl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions round their argument to the nearest integer value, using the current rounding direction (see fesetround(3)).

Note that unlike the rint(3) family of functions, the return type of these functions differs from that of their arguments.

RETURN VALUE

These functions return the rounded integer value.

If x is a NaN or an infinity, or the rounded value is too large to be stored in a long (long long in the case of the ll* functions), then a domain error occurs, and the return value is unspecified.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is a NaN or infinite, or the rounded value is too large
An invalid floating-point exception (FE_INVALID) is raised.

These functions do not set errno.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

lrint(), lrintf(), lrintl(), llrint(), llrintf(), llrintl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

ceil(3), floor(3), lround(3), nearbyint(3), rint(3), round(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1410 - Linux cli command XmbufDisplayBuffers

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XmbufDisplayBuffers and provides detailed information about the command XmbufDisplayBuffers, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XmbufDisplayBuffers.

NAME 🖥️ XmbufDisplayBuffers 🖥️

X multibuffering functions

SYNTAX

#include <X11/extensions/multibuf.h>

Bool XmbufQueryExtension(
    Display *dpy,
    Display *dpy,
    int *event_base_return,
    int *error_base_return);

Status XmbufGetVersion(
    Display *dpy,
    int *major_version_return,
    int *minor_version_return);

int XmbufCreateBuffers(
    Display *dpy,
    Window window,
    int count,
    int update_action,
    int update_hint,
    Multibuffer *buffers_update);

void XmbufDestroyBuffers(
    Display *dpy,
    Window window);

void XmbufDisplayBuffers(
    Display *dpy,
    int count,
    Multibuffer *buffers,
    int min_delay,
    int max_delay);

Status XmbufGetWindowAttributes(
    Display *dpy,
    Window window,
    XmbufWindowAttributes *attributes);

void XmbufChangeWindowAttributes(
    Display *dpy,
    Window window,
    unsigned long valuemask,
    XmbufSetWindowAttributes *attributes);

Status XmbufGetBufferAttributes(
    Display *dpy,
    Multibuffer buffer,
    XmbufBufferAttributes *attributes);

void XmbufChangeBufferAttributes(
    Display *dpy,
    Multibuffer buffer,
    unsigned long valuemask,
    XmbufSetBufferAttributes *attributes);

Status XmbufGetScreenInfo(
    Display *dpy,
    Drawable drawable,
    int *nmono_return,
    XmbufBufferInfo **mono_info_return,
    int *nstereo_return,
    XmbufBufferInfo **stereo_info_return);

Window XmbufCreateStereoWindow(
    Display *dpy,
    Window parent,
    int x,
    int y,
    unsigned int width,
    unsigned int height,
    unsigned int border_width,
    int depth,
    unsigned int class,                 /* InputOutput, InputOnly*/
    Visual *visual,
    unsigned long valuemask,
    XSetWindowAttributes *attributes,
    Multibuffer *left_return,
    Multibuffer *right_return);

STRUCTURES

Events:

typedef struct {
    int type;   /* of event */
    unsigned long serial;       /* # of last request processed by server */
    int send_event;     /* true if this came from a SendEvent request */
    Display *display;   /* Display the event was read from */
    Multibuffer buffer; /* buffer of event */
    int state;  /* see Clobbered constants above */
} XmbufClobberNotifyEvent;

typedef struct {
    int type;   /* of event */
    unsigned long serial;       /* # of last request processed by server */
    int send_event;     /* true if this came from a SendEvent request */
    Display *display;   /* Display the event was read from */
    Multibuffer buffer; /* buffer of event */
} XmbufUpdateNotifyEvent;

Per-window attributes that can be got:

typedef struct {
    int displayed_index;	/* which buffer is being displayed */
    int update_action;	/* Undefined, Background, Untouched, Copied */
    int update_hint;	/* Frequent, Intermittent, Static */
    int window_mode;	/* Mono, Stereo */
    int nbuffers;	/* Number of buffers */
    Multibuffer *buffers;	/* Buffers */
} XmbufWindowAttributes;

Per-window attributes that can be set:

typedef struct {
    int update_hint;	/* Frequent, Intermittent, Static */
} XmbufSetWindowAttributes;

Per-buffer attributes that can be got:

typedef struct {
    Window window;	/* which window this belongs to */
    unsigned long event_mask;	/* events that have been selected */
    int buffer_index;	/* which buffer is this */
    int side;	/* Mono, Left, Right */
} XmbufBufferAttributes;

Per-buffer attributes that can be set:

typedef struct {
    unsigned long event_mask;	/* events that have been selected */
} XmbufSetBufferAttributes;

Per-screen buffer info (there will be lists of them):

typedef struct {
    VisualID visualid;	/* visual usable at this depth */
    int max_buffers;	/* most buffers for this visual */
    int depth;	/* depth of buffers to be created */
} XmbufBufferInfo;

DESCRIPTION

The application programming library for the X11 Double-Buffering, Multi-Buffering, and Stereo Extension contains the interfaces described below. With the exception of * XmbufQueryExtension *, if any of these routines are called with a display that does not support the extension, the ExtensionErrorHandler (which can be set with * XSetExtensionErrorHandler * and functions the same way as * XSetErrorHandler *) will be called and the function will then return.

* XmbufQueryExtension * returns * True * if the multibuffering/stereo extension is available on the given display. If the extension exists, the value of the first event code (which should be added to the event type constants * MultibufferClobberNotify * and * MultibufferUpdateNotify * to get the actual values) is stored into event_base_return and the value of the first error code (which should be added to the error type constant * MultibufferBadBuffer * to get the actual value) is stored into error_base_return.

* XmbufGetVersion * gets the major and minor version numbers of the extension. The return value is zero if an error occurs or non-zero if no error happens.

* XmbufCreateBuffers * requests that “count” buffers be created with the given update_action and update_hint and be associated with the indicated window. The number of buffers created is returned (zero if an error occurred) and buffers_update is filled in with that many Multibuffer identifiers.

* XmbufDestroyBuffers * destroys the buffers associated with the given window.

* XmbufDisplayBuffers * displays the indicated buffers their appropriate windows within max_delay milliseconds after min_delay milliseconds have passed. No two buffers may be associated with the same window or else a Match error is generated.

* XmbufGetWindowAttributes * gets the multibuffering attributes that apply to all buffers associated with the given window. The list of buffers returns may be freed with * XFree *. Returns non-zero on success and zero if an error occurs.

* XmbufChangeWindowAttributes * sets the multibuffering attributes that apply to all buffers associated with the given window. This is currently limited to the update_hint.

* XmbufGetBufferAttributes * gets the attributes for the indicated buffer. Returns non-zero on success and zero if an error occurs.

* XmbufChangeBufferAttributes * sets the attributes for the indicated buffer. This is currently limited to the event_mask.

* XmbufGetScreenInfo * gets the parameters controlling how mono and stereo windows may be created on the screen of the given drawable. The numbers of sets of visual and depths are returned in nmono_return and nstereo_return. If nmono_return is greater than zero, then mono_info_return is set to the address of an array of * XmbufBufferInfo * structures describing the various visuals and depths that may be used. Otherwise, mono_info_return is set to NULL. Similarly, stereo_info_return is set according to nstereo_return. The storage returned in mono_info_return and stereo_info_return may be released by * XFree *. If no errors are encounted, non-zero will be returned.

* XmbufCreateStereoWindow * creates a stereo window in the same way that * XCreateWindow * creates a mono window. The buffer ids for the left and right buffers are returned in left_return and right_return, respectively. If an extension error handler that returns is installed, * None * will be returned if the extension is not available on this display.

PREDEFINED VALUES

Update_action field:

 MultibufferUpdateActionUndefined   MultibufferUpdateActionBackground   MultibufferUpdateActionUntouched   MultibufferUpdateActionCopied 

Update_hint field:

 MultibufferUpdateHintFrequent   MultibufferUpdateHintIntermittent   MultibufferUpdateHintStatic 

Valuemask fields:

 MultibufferWindowUpdateHint   MultibufferBufferEventMask 

Mono vs. stereo and left vs. right:

 MultibufferModeMono   MultibufferModeStereo   MultibufferSideMono   MultibufferSideLeft   MultibufferSideRight 

Clobber state:

 MultibufferUnclobbered   MultibufferPartiallyClobbered   MultibufferFullyClobbered 

Event stuff:

 MultibufferClobberNotifyMask   MultibufferUpdateNotifyMask   MultibufferClobberNotify   MultibufferUpdateNotify   MultibufferNumberEvents   MultibufferBadBuffer   MultibufferNumberErrors 

BUGS

This manual page needs more work.

SEE ALSO

Extending X for Double Buffering, Multi-Buffering, and Stereo

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1411 - Linux cli command setlinebuf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setlinebuf and provides detailed information about the command setlinebuf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setlinebuf.

NAME 🖥️ setlinebuf 🖥️

stream buffering operations

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int setvbuf(FILE *restrict stream, char buf[restrict .size],
 int mode, size_t size);
void setbuf(FILE *restrict stream, char *restrict buf);
void setbuffer(FILE *restrict stream, char buf[restrict .size],
 size_t size);
void setlinebuf(FILE *stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

setbuffer(), setlinebuf():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The three types of buffering available are unbuffered, block buffered, and line buffered. When an output stream is unbuffered, information appears on the destination file or terminal as soon as written; when it is block buffered, many characters are saved up and written as a block; when it is line buffered, characters are saved up until a newline is output or input is read from any stream attached to a terminal device (typically stdin). The function fflush(3) may be used to force the block out early. (See fclose(3).)

Normally all files are block buffered. If a stream refers to a terminal (as stdout normally does), it is line buffered. The standard error stream stderr is always unbuffered by default.

The setvbuf() function may be used on any open stream to change its buffer. The mode argument must be one of the following three macros:

_IONBF
unbuffered

_IOLBF
line buffered

_IOFBF
fully buffered

Except for unbuffered files, the buf argument should point to a buffer at least size bytes long; this buffer will be used instead of the current buffer. If the argument buf is NULL, only the mode is affected; a new buffer will be allocated on the next read or write operation. The setvbuf() function may be used only after opening a stream and before any other operations have been performed on it.

The other three calls are, in effect, simply aliases for calls to setvbuf(). The setbuf() function is exactly equivalent to the call

setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);

The setbuffer() function is the same, except that the size of the buffer is up to the caller, rather than being determined by the default BUFSIZ. The setlinebuf() function is exactly equivalent to the call:

setvbuf(stream, NULL, _IOLBF, 0);

RETURN VALUE

The function setvbuf() returns 0 on success. It returns nonzero on failure (mode is invalid or the request cannot be honored). It may set errno on failure.

The other functions do not return a value.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setbuf(), setbuffer(), setlinebuf(), setvbuf()

Thread safetyMT-Safe

STANDARDS

setbuf()
setvbuf()
C11, POSIX.1-2008.

HISTORY

setbuf()
setvbuf()
C89, POSIX.1-2001.

CAVEATS

POSIX notes that the value of errno is unspecified after a call to setbuf() and further notes that, since the value of errno is not required to be unchanged after a successful call to setbuf(), applications should instead use setvbuf() in order to detect errors.

BUGS

You must make sure that the space that buf points to still exists by the time stream is closed, which also happens at program termination. For example, the following is invalid:

#include <stdio.h>
int
main(void)
{
    char buf[BUFSIZ];
    setbuf(stdout, buf);
    printf("Hello, world!

“); return 0; }

SEE ALSO

stdbuf(1), fclose(3), fflush(3), fopen(3), fread(3), malloc(3), printf(3), puts(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1412 - Linux cli command xdr_destroy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_destroy and provides detailed information about the command xdr_destroy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_destroy.

NAME 🖥️ xdr_destroy 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1413 - Linux cli command zip_source_file_create

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_file_create and provides detailed information about the command zip_source_file_create, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_file_create.

libzip (-lzip)

The functions

and

create a zip source from a file. They open

and read

bytes from offset

from it. If

is 0 or -1, the whole file (starting from

is used.

If the file supports seek, the source can be used to open a zip archive from.

The file is opened and read when the data from the source is used, usually by

or

Upon successful completion, the created source is returned. Otherwise,

is returned and the error code in

or

is set to indicate the error.

and

fail if:

or

are invalid.

Required memory could not be allocated.

Opening

failed.

and

were added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1414 - Linux cli command pthread_mutexattr_setrobust_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_mutexattr_setrobust_np and provides detailed information about the command pthread_mutexattr_setrobust_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_mutexattr_setrobust_np.

NAME 🖥️ pthread_mutexattr_setrobust_np 🖥️

get and set the robustness attribute of a mutex attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_mutexattr_getrobust(const pthread_mutexattr_t *attr,
 int *robustness);
int pthread_mutexattr_setrobust(pthread_mutexattr_t *attr,
 int robustness);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

pthread_mutexattr_getrobust(), pthread_mutexattr_setrobust():

    _POSIX_C_SOURCE >= 200809L

DESCRIPTION

The pthread_mutexattr_getrobust() function places the value of the robustness attribute of the mutex attributes object referred to by attr in *robustness. The pthread_mutexattr_setrobust() function sets the value of the robustness attribute of the mutex attributes object referred to by attr to the value specified in *robustness.

The robustness attribute specifies the behavior of the mutex when the owning thread dies without unlocking the mutex. The following values are valid for robustness:

PTHREAD_MUTEX_STALLED
This is the default value for a mutex attributes object. If a mutex is initialized with the PTHREAD_MUTEX_STALLED attribute and its owner dies without unlocking it, the mutex remains locked afterwards and any future attempts to call pthread_mutex_lock(3) on the mutex will block indefinitely.

PTHREAD_MUTEX_ROBUST
If a mutex is initialized with the PTHREAD_MUTEX_ROBUST attribute and its owner dies without unlocking it, any future attempts to call pthread_mutex_lock(3) on this mutex will succeed and return EOWNERDEAD to indicate that the original owner no longer exists and the mutex is in an inconsistent state. Usually after EOWNERDEAD is returned, the next owner should call pthread_mutex_consistent(3) on the acquired mutex to make it consistent again before using it any further.

If the next owner unlocks the mutex using pthread_mutex_unlock(3) before making it consistent, the mutex will be permanently unusable and any subsequent attempts to lock it using pthread_mutex_lock(3) will fail with the error ENOTRECOVERABLE. The only permitted operation on such a mutex is pthread_mutex_destroy(3).

If the next owner terminates before calling pthread_mutex_consistent(3), further pthread_mutex_lock(3) operations on this mutex will still return EOWNERDEAD.

Note that the attr argument of pthread_mutexattr_getrobust() and pthread_mutexattr_setrobust() should refer to a mutex attributes object that was initialized by pthread_mutexattr_init(3), otherwise the behavior is undefined.

RETURN VALUE

On success, these functions return 0. On error, they return a positive error number.

In the glibc implementation, pthread_mutexattr_getrobust() always return zero.

ERRORS

EINVAL
A value other than PTHREAD_MUTEX_STALLED or PTHREAD_MUTEX_ROBUST was passed to pthread_mutexattr_setrobust().

VERSIONS

In the Linux implementation, when using process-shared robust mutexes, a waiting thread also receives the EOWNERDEAD notification if the owner of a robust mutex performs an execve(2) without first unlocking the mutex. POSIX.1 does not specify this detail, but the same behavior also occurs in at least some other implementations.

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.12. POSIX.1-2008.

Before the addition of pthread_mutexattr_getrobust() and pthread_mutexattr_setrobust() to POSIX, glibc defined the following equivalent nonstandard functions if _GNU_SOURCE was defined:

[[deprecated]]
int pthread_mutexattr_getrobust_np(const pthread_mutexattr_t *attr,
 int *robustness);
[[deprecated]]
int pthread_mutexattr_setrobust_np(const pthread_mutexattr_t *attr,
 int robustness);

Correspondingly, the constants PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP were also defined.

These GNU-specific APIs, which first appeared in glibc 2.4, are nowadays obsolete and should not be used in new programs; since glibc 2.34 these APIs are marked as deprecated.

EXAMPLES

The program below demonstrates the use of the robustness attribute of a mutex attributes object. In this program, a thread holding the mutex dies prematurely without unlocking the mutex. The main thread subsequently acquires the mutex successfully and gets the error EOWNERDEAD, after which it makes the mutex consistent.

The following shell session shows what we see when running this program:

$ ./a.out
[original owner] Setting lock...
[original owner] Locked. Now exiting without unlocking.
[main] Attempting to lock the robust mutex.
[main] pthread_mutex_lock() returned EOWNERDEAD
[main] Now make the mutex consistent
[main] Mutex is now consistent; unlocking

Program source

#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define handle_error_en(en, msg) \
        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
static pthread_mutex_t mtx;
static void *
original_owner_thread(void *ptr)
{
    printf("[original owner] Setting lock...

“); pthread_mutex_lock(&mtx); printf("[original owner] Locked. Now exiting without unlocking. “); pthread_exit(NULL); } int main(void) { pthread_t thr; pthread_mutexattr_t attr; int s; pthread_mutexattr_init(&attr); pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST); pthread_mutex_init(&mtx, &attr); pthread_create(&thr, NULL, original_owner_thread, NULL); sleep(2); /* “original_owner_thread” should have exited by now. */ printf("[main] Attempting to lock the robust mutex. “); s = pthread_mutex_lock(&mtx); if (s == EOWNERDEAD) { printf("[main] pthread_mutex_lock() returned EOWNERDEAD “); printf("[main] Now make the mutex consistent “); s = pthread_mutex_consistent(&mtx); if (s != 0) handle_error_en(s, “pthread_mutex_consistent”); printf("[main] Mutex is now consistent; unlocking “); s = pthread_mutex_unlock(&mtx); if (s != 0) handle_error_en(s, “pthread_mutex_unlock”); exit(EXIT_SUCCESS); } else if (s == 0) { printf("[main] pthread_mutex_lock() unexpectedly succeeded “); exit(EXIT_FAILURE); } else { printf("[main] pthread_mutex_lock() unexpectedly failed “); handle_error_en(s, “pthread_mutex_lock”); } }

SEE ALSO

get_robust_list(2), set_robust_list(2), pthread_mutex_consistent(3), pthread_mutex_init(3), pthread_mutex_lock(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1415 - Linux cli command XtRemoveAllCallbacks

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtRemoveAllCallbacks and provides detailed information about the command XtRemoveAllCallbacks, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtRemoveAllCallbacks.

NAME 🖥️ XtRemoveAllCallbacks 🖥️

add and remove callback procedures

SYNTAX

#include <X11/Intrinsic.h>

void XtAddCallback(Widget w, const char *callback_name, XtCallbackProc callback, XtPointer client_data);

void XtAddCallbacks(Widget w, const char *callback_name, XtCallbackList callbacks);

void XtRemoveCallback(Widget w, const char *callback_name, XtCallbackProc callback, XtPointer client_data);

void XtRemoveCallbacks(Widget w, const char *callback_name, XtCallbackList callbacks);

void XtRemoveAllCallbacks(Widget w, const char *callback_name);

ARGUMENTS

callback
Specifies the callback procedure.

callbacks
Specifies the null-terminated list of callback procedures and corresponding client data.

callback_name
Specifies the callback list to which the procedure is to be appended or deleted.

client_data
Specifies the argument that is to be passed to the specified procedure when it is invoked by XtCallbacks or NULL, or the client data to match on the registered callback procedures.

  1. Specifies the widget.

DESCRIPTION

The XtAddCallback function adds the specified callback procedure to the specified widget’s callback list.

The XtAddCallbacks add the specified list of callbacks to the specified widget’s callback list.

The XtRemoveCallback function removes a callback only if both the procedure and the client data match.

The XtRemoveCallbacks function removes the specified callback procedures from the specified widget’s callback list.

The XtRemoveAllCallbacks function removes all the callback procedures from the specified widget’s callback list.

SEE ALSO

XtCallCallbacks(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1416 - Linux cli command zip_unchange

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_unchange and provides detailed information about the command zip_unchange, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_unchange.

libzip (-lzip)

Changes to the file at position

are reverted.

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error code in

is set to indicate the error.

fails if:

Unchanging the name would result in a duplicate name in the archive.

is not a valid file index in

was added in libzip 0.6. In libzip 0.10 the type of

was changed from

to

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1417 - Linux cli command isdigit

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isdigit and provides detailed information about the command isdigit, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isdigit.

NAME 🖥️ isdigit 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1418 - Linux cli command Pod_Findpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Pod_Findpm and provides detailed information about the command Pod_Findpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Pod_Findpm.

NAME 🖥️ Pod_Findpm 🖥️

find POD documents in directory trees

SYNOPSIS

use Pod::Find qw(pod_find simplify_name); my %pods = pod_find({ -verbose => 1, -inc => 1 }); foreach(keys %pods) { print “found library POD `$pods{$_} in $_ “; } print “podname=",simplify_name(a/b/c/mymodule.pod),” “; $location = pod_where( { -inc => 1 }, “Pod::Find” );

DESCRIPTION

NOTE: This module is considered legacy; modern Perl releases (5.31.1 and higher) are going to remove Pod-Parser from core and use Pod::Simple for all things POD.

Pod::Find provides a set of functions to locate POD files. Note that no function is exported by default to avoid pollution of your namespace, so be sure to specify them in the use statement if you need them:

use Pod::Find qw(pod_find);

From this version on the typical SCM (software configuration management) directories are ignored. These are: RCS, CVS, SCCS, .svn, .hg, .git, .sync

“pod_find( { %opts } , @directories )”

The function pod_find searches for POD documents in a given set of files and/or directories. It returns a hash with the file names as keys and the POD name as value. The POD name is derived from the file name and its position in the directory tree.

E.g. when searching in $HOME/perl5lib, the file $HOME/perl5lib/MyModule.pm would get the POD name MyModule, whereas $HOME/perl5lib/Myclass/Subclass.pm would be Myclass::Subclass. The name information can be used for POD translators.

Only text files containing at least one valid POD command are found.

A warning is printed if more than one POD file with the same POD name is found, e.g. CPAN.pm in different directories. This usually indicates duplicate occurrences of modules in the @INC search path.

OPTIONS The first argument for pod_find may be a hash reference with options. The rest are either directories that are searched recursively or files. The POD names of files are the plain basenames with any Perl-like extension (.pm, .pl, .pod) stripped.

“-verbose => 1”
Print progress information while scanning.

“-perl => 1”
Apply Perl-specific heuristics to find the correct PODs. This includes stripping Perl-like extensions, omitting subdirectories that are numeric but do not match the current Perl interpreter’s version id, suppressing site_perl as a module hierarchy name etc.

“-script => 1”
Search for PODs in the current Perl interpreter’s installation scriptdir. This is taken from the local Config module.

“-inc => 1”
Search for PODs in the current Perl interpreter’s @INC paths. This automatically considers paths specified in the PERL5LIB environment as this is included in @INC by the Perl interpreter itself.

simplify_name( $str )

The function simplify_name is equivalent to basename, but also strips Perl-like extensions (.pm, .pl, .pod) and extensions like .bat, .cmd on Win32 and OS/2, or .com on VMS, respectively.

“pod_where( { %opts }, $pod )”

Returns the location of a pod document given a search directory and a module (e.g. File::Find) or script (e.g. perldoc) name.

Options:

“-inc => 1”
Search @INC for the pod and also the scriptdir defined in the Config module.

“-dirs => [ $dir1, $dir2, … ]”
Reference to an array of search directories. These are searched in order before looking in @INC (if -inc). Current directory is used if none are specified.

“-verbose => 1”
List directories as they are searched

Returns the full path of the first occurrence to the file. Package names (eg ‘A::B’) are automatically converted to directory names in the selected directory. (eg on unix ‘A::B’ is converted to ‘A/B’). Additionally, ‘.pm’, ‘.pl’ and ‘.pod’ are appended to the search automatically if required.

A subdirectory pod/ is also checked if it exists in any of the given search directories. This ensures that e.g. perlfunc is found.

It is assumed that if a module name is supplied, that that name matches the file name. Pods are not opened to check for the ‘NAME’ entry.

A check is made to make sure that the file that is found does contain some pod documentation.

“contains_pod( $file , $verbose )”

Returns true if the supplied filename (not POD module) contains some pod information.

AUTHOR

Please report bugs using <http://rt.cpan.org>.

Marek Rouchal <[email protected]>, heavily borrowing code from Nick Ing-Simmons’ PodToHtml.

Tim Jenness <[email protected]> provided pod_where and contains_pod.

Pod::Find is part of the Pod::Parser distribution.

SEE ALSO

Pod::Parser, Pod::Checker, perldoc

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1419 - Linux cli command stdio

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command stdio and provides detailed information about the command stdio, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the stdio.

NAME 🖥️ stdio 🖥️

standard input/output library functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
FILE *stdin;
FILE *stdout;
FILE *stderr;

DESCRIPTION

The standard I/O library provides a simple and efficient buffered stream I/O interface. Input and output is mapped into logical data streams and the physical I/O characteristics are concealed. The functions and macros are listed below; more information is available from the individual man pages.

A stream is associated with an external file (which may be a physical device) by opening a file, which may involve creating a new file. Creating an existing file causes its former contents to be discarded. If a file can support positioning requests (such as a disk file, as opposed to a terminal), then a file position indicator associated with the stream is positioned at the start of the file (byte zero), unless the file is opened with append mode. If append mode is used, it is unspecified whether the position indicator will be placed at the start or the end of the file. The position indicator is maintained by subsequent reads, writes, and positioning requests. All input occurs as if the characters were read by successive calls to the fgetc(3) function; all output takes place as if all characters were written by successive calls to the fputc(3) function.

A file is disassociated from a stream by closing the file. Output streams are flushed (any unwritten buffer contents are transferred to the host environment) before the stream is disassociated from the file. The value of a pointer to a FILE object is indeterminate after a file is closed (garbage).

A file may be subsequently reopened, by the same or another program execution, and its contents reclaimed or modified (if it can be repositioned at the start). If the main function returns to its original caller, or the exit(3) function is called, all open files are closed (hence all output streams are flushed) before program termination. Other methods of program termination, such as abort(3) do not bother about closing files properly.

At program startup, three text streams are predefined and need not be opened explicitly: standard input (for reading conventional input), standard output (for writing conventional output), and standard error (for writing diagnostic output). These streams are abbreviated stdin, stdout, and stderr. When opened, the standard error stream is not fully buffered; the standard input and output streams are fully buffered if and only if the streams do not refer to an interactive device.

Output streams that refer to terminal devices are always line buffered by default; pending output to such streams is written automatically whenever an input stream that refers to a terminal device is read. In cases where a large amount of computation is done after printing part of a line on an output terminal, it is necessary to fflush(3) the standard output before going off and computing so that the output will appear.

The stdio library is a part of the library libc and routines are automatically loaded as needed by cc(1). The SYNOPSIS sections of the following manual pages indicate which include files are to be used, what the compiler declaration for the function looks like and which external variables are of interest.

The following are defined as macros; these names may not be reused without first removing their current definitions with #undef: BUFSIZ, EOF, FILENAME_MAX, FOPEN_MAX, L_cuserid, L_ctermid, L_tmpnam, NULL, SEEK_END, SEEK_SET, SEEK_CUR, TMP_MAX, clearerr, feof, ferror, fileno, getc, getchar, putc, putchar, stderr, stdin, stdout. Function versions of the macro functions feof, ferror, clearerr, fileno, getc, getchar, putc, and putchar exist and will be used if the macros definitions are explicitly removed.

List of functions

FunctionDescription
clearerr(3)check and reset stream status
fclose(3)close a stream
fdopen(3)stream open functions
feof(3)check and reset stream status
ferror(3)check and reset stream status
fflush(3)flush a stream
fgetc(3)get next character or word from input stream
fgetpos(3)reposition a stream
fgets(3)get a line from a stream
fileno(3)return the integer descriptor of the argument stream
fmemopen(3)open memory as stream
fopen(3)stream open functions
fopencookie(3)open a custom stream
fprintf(3)formatted output conversion
fpurge(3)flush a stream
fputc(3)output a character or word to a stream
fputs(3)output a line to a stream
fread(3)binary stream input/output
freopen(3)stream open functions
fscanf(3)input format conversion
fseek(3)reposition a stream
fsetpos(3)reposition a stream
ftell(3)reposition a stream
fwrite(3)binary stream input/output
getc(3)get next character or word from input stream
getchar(3)get next character or word from input stream
gets(3)get a line from a stream
getw(3)get next character or word from input stream
mktemp(3)make temporary filename (unique)
open_memstream(3)open a dynamic memory buffer stream
open_wmemstream(3)open a dynamic memory buffer stream
perror(3)system error messages
printf(3)formatted output conversion
putc(3)output a character or word to a stream
putchar(3)output a character or word to a stream
puts(3)output a line to a stream
putw(3)output a character or word to a stream
remove(3)remove directory entry
rewind(3)reposition a stream
scanf(3)input format conversion
setbuf(3)stream buffering operations
setbuffer(3)stream buffering operations
setlinebuf(3)stream buffering operations
setvbuf(3)stream buffering operations
sprintf(3)formatted output conversion
sscanf(3)input format conversion
strerror(3)system error messages
sys_errlist(3)system error messages
sys_nerr(3)system error messages
tempnam(3)temporary file routines
tmpfile(3)temporary file routines
tmpnam(3)temporary file routines
ungetc(3)un-get character from input stream
vfprintf(3)formatted output conversion
vfscanf(3)input format conversion
vprintf(3)formatted output conversion
vscanf(3)input format conversion
vsprintf(3)formatted output conversion
vsscanf(3)input format conversion

STANDARDS

C11, POSIX.1-2008.

HISTORY

C89, POSIX.1-2001.

SEE ALSO

close(2), open(2), read(2), write(2), stdout(3), unlocked_stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1420 - Linux cli command Moose_Manual_BestPracticespm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Manual_BestPracticespm and provides detailed information about the command Moose_Manual_BestPracticespm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Manual_BestPracticespm.

NAME 🖥️ Moose_Manual_BestPracticespm 🖥️

Get the most out of Moose

VERSION

version 2.2207

RECOMMENDATIONS

Moose has a lot of features, and there’s definitely more than one way to do it. However, we think that picking a subset of these features and using them consistently makes everyone’s life easier.

Of course, as with any list of “best practices”, these are really just opinions. Feel free to ignore us.

“namespace::autoclean” and immutabilize

We recommend that you remove the Moose sugar and end your Moose class definitions by making your class immutable.

package Person; use Moose; use namespace::autoclean; # extends, roles, attributes, etc. # methods _ _PACKAGE_ _->meta->make_immutable; 1;

The use namespace::autoclean bit is simply good code hygiene, as it removes imported symbols from your class’s namespace at the end of your package’s compile cycle, including Moose keywords. Once the class has been built, these keywords are not needed. (This is preferred to placing no Moose at the end of your package).

The make_immutable call allows Moose to speed up a lot of things, most notably object construction. The trade-off is that you can no longer change the class definition.

Never override “new”

Overriding new is a very bad practice. Instead, you should use a BUILD or BUILDARGS methods to do the same thing. When you override new, Moose can no longer inline a constructor when your class is immutabilized.

There are two good reasons to override new. One, you are writing a MooseX extension that provides its own Moose::Object subclass and a subclass of Moose::Meta::Method::Constructor to inline the constructor. Two, you are subclassing a non-Moose parent.

If you know how to do that, you know when to ignore this best practice ;)

Always call the original/parent “BUILDARGS”

If you override the BUILDARGS method in your class, make sure to play nice and call super() to handle cases you’re not checking for explicitly.

The default BUILDARGS method in Moose::Object handles both a list and hashref of named parameters correctly, and also checks for a non-hashref single argument.

Provide defaults whenever possible, otherwise use “required”

When your class provides defaults, this makes constructing new objects simpler. If you cannot provide a default, consider making the attribute required.

If you don’t do either, an attribute can simply be left unset, increasing the complexity of your object, because it has more possible states that you or the user of your class must account for.

Use “builder” instead of “default” most of the time

Builders can be inherited, they have explicit names, and they’re just plain cleaner.

However, do use a default when the default is a non-reference, or when the default is simply an empty reference of some sort.

Also, keep your builder methods private.

Be “lazy”

Lazy is good, and often solves initialization ordering problems. It’s also good for deferring work that may never have to be done. Make your attributes lazy unless they’re required or have trivial defaults.

Consider keeping clearers and predicates private

Does everyone really need to be able to clear an attribute? Probably not. Don’t expose this functionality outside your class by default.

Predicates are less problematic, but there’s no reason to make your public API bigger than it has to be.

Avoid “lazy_build”

As described above, you rarely actually need a clearer or a predicate. lazy_build adds both to your public API, which exposes you to use cases that you must now test for. It’s much better to avoid adding them until you really need them - use explicit lazy and builder options instead.

Default to read-only, and consider keeping writers private

Making attributes mutable just means more complexity to account for in your program. The alternative to mutable state is to encourage users of your class to simply make new objects as needed.

If you must make an attribute read-write, consider making the writer a separate private method. Narrower APIs are easy to maintain, and mutable state is trouble.

In order to declare such attributes, provide a private writer parameter:

has pizza => ( is => ro, isa => Pizza, writer => _pizza, );

Think twice before changing an attribute’s type in a subclass

Down this path lies great confusion. If the attribute is an object itself, at least make sure that it has the same interface as the type of object in the parent class.

Don’t use the “initializer” feature

Don’t know what we’re talking about? That’s fine.

Use Moose::Meta::Attribute::Native traits instead of “auto_deref”

The auto_deref feature is a bit troublesome. Directly exposing a complex attribute is ugly. Instead, consider using Moose::Meta::Attribute::Native traits to define an API that only exposes the necessary pieces of functionality.

Always call “inner” in the most specific subclass

When using augment and inner, we recommend that you call inner in the most specific subclass of your hierarchy. This makes it possible to subclass further and extend the hierarchy without changing the parents.

Namespace your types

Use some sort of namespacing convention for type names. We recommend something like “MyApp::Type::Foo”. We also recommend considering MooseX::Types.

Do not coerce Moose built-ins directly

If you define a coercion for a Moose built-in like ArrayRef, this will affect every application in the Perl interpreter that uses this type.

# very naughty! coerce ArrayRef => from Str => via { [ split /,/ ] };

Instead, create a subtype and coerce that:

subtype My::ArrayRef => as ArrayRef; coerce My::ArrayRef => from Str => via { [ split /,/ ] };

Do not coerce class names directly

Just as with Moose built-in types, a class type is global for the entire interpreter. If you add a coercion for that class name, it can have magical side effects elsewhere:

# also very naughty! coerce HTTP::Headers => from HashRef => via { HTTP::Headers->new( %{$_} ) };

Instead, we can create an “empty” subtype for the coercion:

subtype My::HTTP::Headers => as class_type(HTTP::Headers); coerce My::HTTP::Headers => from HashRef => via { HTTP::Headers->new( %{$_} ) };

Use coercion instead of unions

Consider using a type coercion instead of a type union. This was covered in Moose::Manual::Types.

Define all your types in one module

Define all your types and coercions in one module. This was also covered in Moose::Manual::Types.

BENEFITS OF BEST PRACTICES

Following these practices has a number of benefits.

It helps ensure that your code will play nice with others, making it more reusable and easier to extend.

Following an accepted set of idioms will make maintenance easier, especially when someone else has to maintain your code. It will also make it easier to get support from other Moose users, since your code will be easier to digest quickly.

Some of these practices are designed to help Moose do the right thing, especially when it comes to immutabilization. This means your code will be faster when immutabilized.

Many of these practices also help get the most out of meta programming. If you used an overridden new to do type coercion by hand, rather than defining a real coercion, there is no introspectable metadata. This sort of thing is particularly problematic for MooseX extensions which rely on introspection to do the right thing.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1421 - Linux cli command Moose_Meta_Attribute_Nativepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Attribute_Nativepm and provides detailed information about the command Moose_Meta_Attribute_Nativepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Attribute_Nativepm.

NAME 🖥️ Moose_Meta_Attribute_Nativepm 🖥️

Delegate to native Perl types

VERSION

version 2.2207

SYNOPSIS

package MyClass; use Moose; has mapping => ( traits => [Hash], is => rw, isa => HashRef[Str], default => sub { {} }, handles => { exists_in_mapping => exists, ids_in_mapping => keys, get_mapping => get, set_mapping => set, set_quantity => [ set => quantity ], }, ); my $obj = MyClass->new; $obj->set_quantity(10); # quantity => 10 $obj->set_mapping(foo, 4); # foo => 4 $obj->set_mapping(bar, 5); # bar => 5 $obj->set_mapping(baz, 6); # baz => 6 # prints 5 print $obj->get_mapping(bar) if $obj->exists_in_mapping(bar); # prints quantity, foo, bar, baz print join , , $obj->ids_in_mapping;

DESCRIPTION

Native delegations allow you to delegate to native Perl data structures as if they were objects. For example, in the “SYNOPSIS” you can see a hash reference being treated as if it has methods named exists(), keys(), get(), and set().

The delegation methods (mostly) map to Perl builtins and operators. The return values of these delegations should be the same as the corresponding Perl operation. Any deviations will be explicitly documented.

API

Native delegations are enabled by passing certain options to has when creating an attribute.

traits

To enable this feature, pass the appropriate name in the traits array reference for the attribute. For example, to enable this feature for hash reference, we include Hash in the list of traits.

isa

You will need to make sure that the attribute has an appropriate type. For example, to use this with a Hash you must specify that your attribute is some sort of HashRef.

handles

This is just like any other delegation, but only a hash reference is allowed when defining native delegations. The keys are the methods to be created in the class which contains the attribute. The values are the methods provided by the associated trait. Currying works the same way as it does with any other delegation.

See the docs for each native trait for details on what methods are available.

TRAITS FOR NATIVE DELEGATIONS

Below are some simple examples of each native trait. More features are available than what is shown here; this is just a quick synopsis.

Array (Moose::Meta::Attribute::Native::Trait::Array)
has queue => ( traits => [Array], is => ro, isa => ArrayRef[Str], default => sub { [] }, handles => { add_item => push, next_item => shift, # … } );

Bool (Moose::Meta::Attribute::Native::Trait::Bool)
has is_lit => ( traits => [Bool], is => ro, isa => Bool, default => 0, handles => { illuminate => set, darken => unset, flip_switch => toggle, is_dark => not, # … } );

Code (Moose::Meta::Attribute::Native::Trait::Code)
has callback => ( traits => [Code], is => ro, isa => CodeRef, default => sub { sub {called} }, handles => { call => execute, # … } );

Counter (Moose::Meta::Attribute::Native::Trait::Counter)
has counter => ( traits => [Counter], is => ro, isa => Num, default => 0, handles => { inc_counter => inc, dec_counter => dec, reset_counter => reset, # … } );

Hash (Moose::Meta::Attribute::Native::Trait::Hash)
has options => ( traits => [Hash], is => ro, isa => HashRef[Str], default => sub { {} }, handles => { set_option => set, get_option => get, has_option => exists, # … } );

Number (Moose::Meta::Attribute::Native::Trait::Number)
has integer => ( traits => [Number], is => ro, isa => Int, default => 5, handles => { set => set, add => add, sub => sub, mul => mul, div => div, mod => mod, abs => abs, # … } );

String (Moose::Meta::Attribute::Native::Trait::String)
has text => ( traits => [String], is => ro, isa => Str, default => q{}, handles => { add_text => append, replace_text => replace, # … } );

COMPATIBILITY WITH MooseX::AttributeHelpers

This feature used to be a separated CPAN distribution called MooseX::AttributeHelpers.

When the feature was incorporated into the Moose core, some of the API details were changed. The underlying capabilities are the same, but some details of the API were changed.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1422 - Linux cli command islessgreater

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command islessgreater and provides detailed information about the command islessgreater, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the islessgreater.

NAME 🖥️ islessgreater 🖥️

floating-point relational tests without exception for NaN

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
int isgreater(x, y);
int isgreaterequal(x, y);
int isless(x, y);
int islessequal(x, y);
int islessgreater(x, y);
int isunordered(x, y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

    All functions described here:
        _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The normal relational operations (like <, “less than”) fail if one of the operands is NaN. This will cause an exception. To avoid this, C99 defines the macros listed below.

These macros are guaranteed to evaluate their arguments only once. The arguments must be of real floating-point type (note: do not pass integer values as arguments to these macros, since the arguments will not be promoted to real-floating types).

isgreater()
determines (x) > (y) without an exception if x or y is NaN.

isgreaterequal()
determines (x) >= (y) without an exception if x or y is NaN.

isless()
determines (x) < (y) without an exception if x or y is NaN.

islessequal()
determines (x) <= (y) without an exception if x or y is NaN.

islessgreater()
determines (x) < (y) || (x) > (y) without an exception if x or y is NaN. This macro is not equivalent to x != y because that expression is true if x or y is NaN.

isunordered()
determines whether its arguments are unordered, that is, whether at least one of the arguments is a NaN.

RETURN VALUE

The macros other than isunordered() return the result of the relational comparison; these macros return 0 if either argument is a NaN.

isunordered() returns 1 if x or y is NaN and 0 otherwise.

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isgreater(), isgreaterequal(), isless(), islessequal(), islessgreater(), isunordered()

Thread safetyMT-Safe

VERSIONS

Not all hardware supports these functions, and where hardware support isn’t provided, they will be emulated by macros. This will result in a performance penalty. Don’t use these functions if NaN is of no concern for you.

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

fpclassify(3), isnan(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1423 - Linux cli command tcflag_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tcflag_ttype and provides detailed information about the command tcflag_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tcflag_ttype.

NAME 🖥️ tcflag_ttype 🖥️

terminal special characters, baud rates, modes

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <termios.h>
typedef /* ... */ cc_t;
typedef /* ... */ speed_t;
typedef /* ... */ tcflag_t;

DESCRIPTION

cc_t is used for terminal special characters, speed_t for baud rates, and tcflag_t for modes.

All are unsigned integer types.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

SEE ALSO

termios(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1424 - Linux cli command Image_ExifTool_PGFpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_PGFpm and provides detailed information about the command Image_ExifTool_PGFpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_PGFpm.

NAME 🖥️ Image_ExifTool_PGFpm 🖥️

Read Progressive Graphics File meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to extract meta information from Progressive Graphics File (PGF) images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.libpgf.org/>

<http://www.exiv2.org/>

SEE ALSO

“PGF Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1425 - Linux cli command pthread_attr_getstack

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_attr_getstack and provides detailed information about the command pthread_attr_getstack, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_attr_getstack.

NAME 🖥️ pthread_attr_getstack 🖥️

set/get stack attributes in thread attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_attr_setstack(pthread_attr_t *attr,
 void stackaddr[.stacksize],
 size_t stacksize);
int pthread_attr_getstack(const pthread_attr_t *restrict attr,
 void **restrict stackaddr,
 size_t *restrict stacksize);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

pthread_attr_getstack(), pthread_attr_setstack():

    _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The pthread_attr_setstack() function sets the stack address and stack size attributes of the thread attributes object referred to by attr to the values specified in stackaddr and stacksize, respectively. These attributes specify the location and size of the stack that should be used by a thread that is created using the thread attributes object attr.

stackaddr should point to the lowest addressable byte of a buffer of stacksize bytes that was allocated by the caller. The pages of the allocated buffer should be both readable and writable.

The pthread_attr_getstack() function returns the stack address and stack size attributes of the thread attributes object referred to by attr in the buffers pointed to by stackaddr and stacksize, respectively.

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

pthread_attr_setstack() can fail with the following error:

EINVAL
stacksize is less than PTHREAD_STACK_MIN (16384) bytes. On some systems, this error may also occur if stackaddr or stackaddr + stacksize is not suitably aligned.

POSIX.1 also documents an EACCES error if the stack area described by stackaddr and stacksize is not both readable and writable by the caller.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_attr_setstack(), pthread_attr_getstack()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.2. POSIX.1-2001.

NOTES

These functions are provided for applications that must ensure that a thread’s stack is placed in a particular location. For most applications, this is not necessary, and the use of these functions should be avoided. (Use pthread_attr_setstacksize(3) if an application simply requires a stack size other than the default.)

When an application employs pthread_attr_setstack(), it takes over the responsibility of allocating the stack. Any guard size value that was set using pthread_attr_setguardsize(3) is ignored. If deemed necessary, it is the application’s responsibility to allocate a guard area (one or more pages protected against reading and writing) to handle the possibility of stack overflow.

The address specified in stackaddr should be suitably aligned: for full portability, align it on a page boundary (sysconf(_SC_PAGESIZE)). posix_memalign(3) may be useful for allocation. Probably, stacksize should also be a multiple of the system page size.

If attr is used to create multiple threads, then the caller must change the stack address attribute between calls to pthread_create(3); otherwise, the threads will attempt to use the same memory area for their stacks, and chaos will ensue.

EXAMPLES

See pthread_attr_init(3).

SEE ALSO

mmap(2), mprotect(2), posix_memalign(3), pthread_attr_init(3), pthread_attr_setguardsize(3), pthread_attr_setstackaddr(3), pthread_attr_setstacksize(3), pthread_create(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1426 - Linux cli command Tk_Clipboardpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Clipboardpm and provides detailed information about the command Tk_Clipboardpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Clipboardpm.

NAME 🖥️ Tk_Clipboardpm 🖥️

Manipulate Tk clipboard

SYNOPSIS

$widget->clipboardOption?(args)?

DESCRIPTION

This command provides an interface to the Tk clipboard, which stores data for later retrieval using the selection mechanism. In order to copy data into the clipboard, clipboardClear must be called, followed by a sequence of one or more calls to clipboardAppend. To ensure that the clipboard is updated atomically, all appends should be completed before returning to the event loop.

The following methods are currently supported:

$widget->clipboardClear
Claims ownership of the clipboard on $widget’s display and removes any previous contents. Returns an empty string.

$widget->clipboardAppend(?-format=>format?,?-type=>type?,?–?,data)
Appends data to the clipboard on $widget’s display in the form given by type with the representation given by format and claims ownership of the clipboard on $widget’s display.

Type specifies the form in which the selection is to be returned (the desired ``target’’ for conversion, in ICCCM terminology), and should be an atom name such as STRING or FILE_NAME; see the Inter-Client Communication Conventions Manual for complete details. Type defaults to STRING. The format argument specifies the representation that should be used to transmit the selection to the requester (the second column of Table 2 of the ICCCM), and defaults to STRING. If format is STRING, the selection is transmitted as 8-bit ASCII characters. See the Tk::Selection documentation for explanation of what happens if format is not STRING. Note that arguments passed to clipboardAppend are concatenated before conversion, so the caller must take care to ensure appropriate spacing across string boundaries. All items appended to the clipboard with the same type must have the same format. A argument may be specified to mark the end of options: the next argument will always be used as data. This feature may be convenient if, for example, data starts with a -.

$widget->clipboardGet( ?-type? );
Retrieve data from the clipboard on widget’s display. -type specifies the form in which the data is to be returned and should be an atom name such as STRING or FILE_NAME. Type defaults to STRING. This command is equivalent to SelectionGet( -selection => CLIPBOARD ).

KEYWORDS

clear, format, clipboard, append, selection, type

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1427 - Linux cli command Net_DNS_RR_NSpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_NSpm and provides detailed information about the command Net_DNS_RR_NSpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_NSpm.

NAME 🖥️ Net_DNS_RR_NSpm 🖥️

DNS NS resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name NS nsdname); $rr = Net::DNS::RR->new( name => example.com, type => NS, nsdname => ns.example.com, );

DESCRIPTION

Class for DNS Name Server (NS) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

nsdname

$nsdname = $rr->nsdname; $rr->nsdname( $nsdname );

A domain name which specifies a host which should be authoritative for the specified class and domain.

COPYRIGHT

Copyright (c)1997 Michael Fuhr.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC1035(3.3.11) <https://iana.org/go/rfc1035#section-3.3.11>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1428 - Linux cli command Image_ExifTool_InfiRaypm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_InfiRaypm and provides detailed information about the command Image_ExifTool_InfiRaypm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_InfiRaypm.

NAME 🖥️ Image_ExifTool_InfiRaypm 🖥️

InfiRay IJPEG thermal image metadata

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret metadata and thermal-related information of pictures saved by the InfiRay IJPEG SDK, used in cameras such as the P2 Pro.

AUTHOR

Copyright 2003-2024, Marcos Del Sol Vives (marcos at orca.pet)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<https://github.com/exiftool/exiftool/pull/184>

SEE ALSO

“InfiRay Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1429 - Linux cli command sigvec

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigvec and provides detailed information about the command sigvec, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigvec.

NAME 🖥️ sigvec 🖥️

BSD signal API

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
[[deprecated]] int sigvec(int sig, const struct sigvec *vec,
 struct sigvec *ovec);
[[deprecated]] int sigmask(int signum);
[[deprecated]] int sigblock(int mask);
[[deprecated]] int sigsetmask(int mask);
[[deprecated]] int siggetmask(void);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

These functions are provided in glibc as a compatibility interface for programs that make use of the historical BSD signal API. This API is obsolete: new applications should use the POSIX signal API (sigaction(2), sigprocmask(2), etc.).

The sigvec() function sets and/or gets the disposition of the signal sig (like the POSIX sigaction(2)). If vec is not NULL, it points to a sigvec structure that defines the new disposition for sig. If ovec is not NULL, it points to a sigvec structure that is used to return the previous disposition of sig. To obtain the current disposition of sig without changing it, specify NULL for vec, and a non-null pointer for ovec.

The dispositions for SIGKILL and SIGSTOP cannot be changed.

The sigvec structure has the following form:

struct sigvec {
    void (*sv_handler)(int); /* Signal disposition */
    int    sv_mask;          /* Signals to be blocked in handler */
    int    sv_flags;         /* Flags */
};

The sv_handler field specifies the disposition of the signal, and is either: the address of a signal handler function; SIG_DFL, meaning the default disposition applies for the signal; or SIG_IGN, meaning that the signal is ignored.

If sv_handler specifies the address of a signal handler, then sv_mask specifies a mask of signals that are to be blocked while the handler is executing. In addition, the signal for which the handler is invoked is also blocked. Attempts to block SIGKILL or SIGSTOP are silently ignored.

If sv_handler specifies the address of a signal handler, then the sv_flags field specifies flags controlling what happens when the handler is called. This field may contain zero or more of the following flags:

SV_INTERRUPT
If the signal handler interrupts a blocking system call, then upon return from the handler the system call is not restarted: instead it fails with the error EINTR. If this flag is not specified, then system calls are restarted by default.

SV_RESETHAND
Reset the disposition of the signal to the default before calling the signal handler. If this flag is not specified, then the handler remains established until explicitly removed by a later call to sigvec() or until the process performs an execve(2).

SV_ONSTACK
Handle the signal on the alternate signal stack (historically established under BSD using the obsolete sigstack() function; the POSIX replacement is sigaltstack(2)).

The sigmask() macro constructs and returns a “signal mask” for signum. For example, we can initialize the vec.sv_mask field given to sigvec() using code such as the following:

vec.sv_mask = sigmask(SIGQUIT) | sigmask(SIGABRT);
            /* Block SIGQUIT and SIGABRT during
               handler execution */

The sigblock() function adds the signals in mask to the process’s signal mask (like POSIX sigprocmask(SIG_BLOCK)), and returns the process’s previous signal mask. Attempts to block SIGKILL or SIGSTOP are silently ignored.

The sigsetmask() function sets the process’s signal mask to the value given in mask (like POSIX sigprocmask(SIG_SETMASK)), and returns the process’s previous signal mask.

The siggetmask() function returns the process’s current signal mask. This call is equivalent to sigblock(0).

RETURN VALUE

The sigvec() function returns 0 on success; on error, it returns -1 and sets errno to indicate the error.

The sigblock() and sigsetmask() functions return the previous signal mask.

The sigmask() macro returns the signal mask for signum.

ERRORS

See the ERRORS under sigaction(2) and sigprocmask(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sigvec(), sigmask(), sigblock(), sigsetmask(), siggetmask()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

sigvec()
sigblock()
sigmask()
sigsetmask()
4.3BSD.

siggetmask()
Unclear origin.

sigvec()
Removed in glibc 2.21.

NOTES

On 4.3BSD, the signal() function provided reliable semantics (as when calling sigvec() with vec.sv_mask equal to 0). On System V, signal() provides unreliable semantics. POSIX.1 leaves these aspects of signal() unspecified. See signal(2) for further details.

In order to wait for a signal, BSD and System V both provided a function named sigpause(3), but this function has a different argument on the two systems. See sigpause(3) for details.

SEE ALSO

kill(2), pause(2), sigaction(2), signal(2), sigprocmask(2), raise(3), sigpause(3), sigset(3), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1430 - Linux cli command Moose_Cookbook_Snack_Keywordspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Snack_Keywordspm and provides detailed information about the command Moose_Cookbook_Snack_Keywordspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Snack_Keywordspm.

NAME 🖥️ Moose_Cookbook_Snack_Keywordspm 🖥️

Restricted “keywords” in Moose

VERSION

version 2.2207

DESCRIPTION

Moose exports a number of sugar functions in order to emulate Perl built-in keywords. These can cause clashes with other user-defined functions. This document provides a list of those keywords for easy reference.

The ‘meta’ keyword

use Moose adds a method called meta to your class. If this conflicts with a method or function you are using, you can rename it, or prevent it from being installed entirely. To do this, pass the -meta_name option when you use Moose. For instance:

# install it under a different name use Moose -meta_name => moose_meta; # dont install it at all use Moose -meta_name => undef;

Moose Keywords

If you are using Moose or Moose::Role it is best to avoid these keywords:

extends

with

has

before

after

around

super

override

inner

augment

confess

blessed

meta

Moose::Util::TypeConstraints Keywords

If you are using Moose::Util::TypeConstraints it is best to avoid these keywords:

type

subtype

class_type

role_type

maybe_type

duck_type

as

where

message

inline_as

coerce

from

via

enum

find_type_constraint

register_type_constraint

Avoiding collisions

Turning off Moose

To remove the sugar functions Moose exports, just add no Moose at the bottom of your code:

package Thing; use Moose; # code here no Moose;

This will unexport the sugar functions that Moose originally exported. The same will also work for Moose::Role and Moose::Util::TypeConstraints.

Sub::Exporter features

Moose, Moose::Role and Moose::Util::TypeConstraints all use Sub::Exporter to handle all their exporting needs. This means that all the features that Sub::Exporter provides are also available to them.

For instance, with Sub::Exporter you can rename keywords, like so:

package LOL::Cat; use Moose has => { -as => i_can_haz }; i_can_haz cheeseburger => ( is => rw, trigger => sub { print “NOM NOM” } ); LOL::Cat->new->cheeseburger(KTHNXBYE);

See the Sub::Exporter docs for more information.

namespace::autoclean and namespace::clean

You can also use namespace::autoclean to clean up your namespace. This will remove all imported functions from your namespace. Note that if you are importing functions that are intended to be used as methods (this includes overload, due to internal implementation details), it will remove these as well.

Another option is to use namespace::clean directly, but you must be careful not to remove meta when doing so:

package Foo; use Moose; use namespace::clean -except => meta; # …

SEE ALSO

Moose

Moose::Role

Moose::Util::TypeConstraints

Sub::Exporter

namespace::autoclean

namespace::clean

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1431 - Linux cli command pcap_dump_fopenpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_dump_fopenpcap and provides detailed information about the command pcap_dump_fopenpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_dump_fopenpcap.

NAME 🖥️ pcap_dump_fopenpcap 🖥️

open a file to which to write packets

SYNOPSIS

#include <pcap/pcap.h>
pcap_dumper_t *pcap_dump_open(pcap_t *p, const char *fname);
pcap_dumper_t *pcap_dump_open_append(pcap_t *p, const char *fname);
pcap_dumper_t *pcap_dump_fopen(pcap_t *p, FILE *fp);

DESCRIPTION

pcap_dump_open() is called to open a ``savefile’’ for writing. fname specifies the name of the file to open. The file will have the same format as those used by tcpdump(1) and tcpslice(1). If the file does not exist, it will be created; if the file exists, it will be truncated and overwritten. The name “-” is a synonym for stdout.

pcap_dump_fopen() is called to write data to an existing open stream fp; this stream will be closed by a subsequent call to pcap_dump_close(3PCAP). The stream is assumed to be at the beginning of a file that has been newly created or truncated, so that writes will start at the beginning of the file. Note that on Windows, that stream should be opened in binary mode.

p is a capture or ``savefile’’ handle returned by an earlier call to pcap_create(3PCAP) and activated by an earlier call to pcap_activate(3PCAP), or returned by an earlier call to pcap_open_offline(3PCAP), pcap_open_live(3PCAP), or pcap_open_dead(3PCAP). The time stamp precision, link-layer type, and snapshot length from p are used as the link-layer type and snapshot length of the output file.

pcap_dump_open_append() is like pcap_dump_open() but, if the file already exists, and is a pcap file with the same byte order as the host opening the file, and has the same time stamp precision, link-layer header type, and snapshot length as p, it will write new packets at the end of the file.

RETURN VALUE

A pointer to a pcap_dumper_t structure to use in subsequent pcap_dump(3PCAP) and pcap_dump_close(3PCAP) calls is returned on success. NULL is returned on failure. If NULL is returned, pcap_geterr(3PCAP) can be used to get the error text.

BACKWARD COMPATIBILITY

The pcap_dump_open_append() function became available in libpcap release 1.7.2. In previous releases, there is no support for appending packets to an existing savefile.

SEE ALSO

pcap(3PCAP), pcap-savefile(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1432 - Linux cli command pvalloc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pvalloc and provides detailed information about the command pvalloc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pvalloc.

NAME 🖥️ pvalloc 🖥️

allocate aligned memory

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int posix_memalign(void **memptr, size_t alignment, size_t size);
void *aligned_alloc(size_t alignment, size_t size);
[[deprecated]] void *valloc(size_t size);
#include <malloc.h>
[[deprecated]] void *memalign(size_t alignment, size_t size);
[[deprecated]] void *pvalloc(size_t size);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

posix_memalign():

    _POSIX_C_SOURCE >= 200112L

aligned_alloc():

    _ISOC11_SOURCE

valloc():

    Since glibc 2.12:
        (_XOPEN_SOURCE >= 500) && !(_POSIX_C_SOURCE >= 200112L)
            || /* glibc >= 2.19: */ _DEFAULT_SOURCE
            || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
    Before glibc 2.12:
        _BSD_SOURCE || _XOPEN_SOURCE >= 500

DESCRIPTION

posix_memalign() allocates size bytes and places the address of the allocated memory in *memptr. The address of the allocated memory will be a multiple of alignment, which must be a power of two and a multiple of sizeof(void *). This address can later be successfully passed to free(3). If size is 0, then the value placed in *memptr is either NULL or a unique pointer value.

The obsolete function memalign() allocates size bytes and returns a pointer to the allocated memory. The memory address will be a multiple of alignment, which must be a power of two.

aligned_alloc() is the same as memalign(), except for the added restriction that alignment must be a power of two.

The obsolete function valloc() allocates size bytes and returns a pointer to the allocated memory. The memory address will be a multiple of the page size. It is equivalent to memalign(sysconf(_SC_PAGESIZE),size).

The obsolete function pvalloc() is similar to valloc(), but rounds the size of the allocation up to the next multiple of the system page size.

For all of these functions, the memory is not zeroed.

RETURN VALUE

aligned_alloc(), memalign(), valloc(), and pvalloc() return a pointer to the allocated memory on success. On error, NULL is returned, and errno is set to indicate the error.

posix_memalign() returns zero on success, or one of the error values listed in the next section on failure. The value of errno is not set. On Linux (and other systems), posix_memalign() does not modify memptr on failure. A requirement standardizing this behavior was added in POSIX.1-2008 TC2.

ERRORS

EINVAL
The alignment argument was not a power of two, or was not a multiple of sizeof(void *).

ENOMEM
Out of memory.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

aligned_alloc(), memalign(), posix_memalign()

Thread safetyMT-Safe

valloc(), pvalloc()

Thread safetyMT-Unsafe init

STANDARDS

aligned_alloc()
C11.

posix_memalign()
POSIX.1-2008.

memalign()
valloc()
None.

pvalloc()
GNU.

HISTORY

aligned_alloc()
glibc 2.16. C11.

posix_memalign()
glibc 2.1.91. POSIX.1d, POSIX.1-2001.

memalign()
glibc 2.0. SunOS 4.1.3.

valloc()
glibc 2.0. 3.0BSD. Documented as obsolete in 4.3BSD, and as legacy in SUSv2.

pvalloc()
glibc 2.0.

Headers

Everybody agrees that posix_memalign() is declared in <stdlib.h>.

On some systems memalign() is declared in <stdlib.h> instead of <malloc.h>.

According to SUSv2, valloc() is declared in <stdlib.h>. glibc declares it in <malloc.h>, and also in <stdlib.h> if suitable feature test macros are defined (see above).

NOTES

On many systems there are alignment restrictions, for example, on buffers used for direct block device I/O. POSIX specifies the pathconf(path,_PC_REC_XFER_ALIGN) call that tells what alignment is needed. Now one can use posix_memalign() to satisfy this requirement.

posix_memalign() verifies that alignment matches the requirements detailed above. memalign() may not check that the alignment argument is correct.

POSIX requires that memory obtained from posix_memalign() can be freed using free(3). Some systems provide no way to reclaim memory allocated with memalign() or valloc() (because one can pass to free(3) only a pointer obtained from malloc(3), while, for example, memalign() would call malloc(3) and then align the obtained value). The glibc implementation allows memory obtained from any of these functions to be reclaimed with free(3).

The glibc malloc(3) always returns 8-byte aligned memory addresses, so these functions are needed only if you require larger alignment values.

SEE ALSO

brk(2), getpagesize(2), free(3), malloc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1433 - Linux cli command Spreadsheet_WriteExcel_Propertiespm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_WriteExcel_Propertiespm and provides detailed information about the command Spreadsheet_WriteExcel_Propertiespm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_WriteExcel_Propertiespm.

NAME 🖥️ Spreadsheet_WriteExcel_Propertiespm 🖥️

A module for creating Excel property sets.

SYNOPSIS

See the set_properties() method in the Spreadsheet::WriteExcel documentation.

DESCRIPTION

This module is used in conjunction with Spreadsheet::WriteExcel.

AUTHOR

John McNamara [email protected]

COPYRIGHT

Copyright MM-MMX, John McNamara.

All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1434 - Linux cli command sinhf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sinhf and provides detailed information about the command sinhf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sinhf.

NAME 🖥️ sinhf 🖥️

hyperbolic sine function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double sinh(double x);
float sinhf(float x);
long double sinhl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sinhf(), sinhl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the hyperbolic sine of x, which is defined mathematically as:

    sinh(x) = (exp(x) - exp(-x)) / 2

RETURN VALUE

On success, these functions return the hyperbolic sine of x.

If x is a NaN, a NaN is returned.

If x is +0 (-0), +0 (-0) is returned.

If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the same sign as x.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error: result overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sinh(), sinhf(), sinhl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

SEE ALSO

acosh(3), asinh(3), atanh(3), cosh(3), csinh(3), tanh(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1435 - Linux cli command XtGetApplicationNameAndClass

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGetApplicationNameAndClass and provides detailed information about the command XtGetApplicationNameAndClass, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGetApplicationNameAndClass.

NAME 🖥️ XtGetApplicationNameAndClass 🖥️

retrieve application name and class

SYNTAX

#include <X11/Intrinsic.h>

void XtGetApplicationNameAndClass(Display* display, String* name_return, String* class_return);

ARGUMENTS

display
Specifies an open display connection that has been initialized with XtDisplayInitialize.

name_return
Returns the application name.

class_return
Returns the application class.

DESCRIPTION

XtGetApplicationNameAndClass returns the application name and class passed to XtDisplayInitialize for the specified display. If the display was never initialized or has been closed, the result is undefined. The returned strings are owned by the Intrinsics and must not be modified or freed by the caller.

SEE ALSO

XtDisplayInitialize(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1436 - Linux cli command XtInsertEventTypeHandler

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtInsertEventTypeHandler and provides detailed information about the command XtInsertEventTypeHandler, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtInsertEventTypeHandler.

NAME 🖥️ XtInsertEventTypeHandler 🖥️

extension event handling

SYNTAX

#include <X11/Intrinsic.h>

void XtInsertEventTypeHandler(Widget widget, int event_type, XtPointer select_data, XtEventHandler proc, XtPointer client_data, XtListPosition position);

void XtRemoveEventTypeHandler(Widget widget, int event_type, XtPointer select_data, XtEventHandler proc, XtPointer client_data);

void XtRegisterExtensionSelector(Display* display, int min_event_type, int max_event_type, XtExtensionSelectProc proc, XtPointer client_data);

XtEventDispatchProc XtSetEventDispatcher(Display* display, int event_type, XtEventDispatchProc proc);

Boolean XtDispatchEventToWidget(Widget widget, XEvent* event);

ARGUMENTS

widget
Specifies the widget for this event handler. Must be of class Core or any subclass thereof.

event_type
Specifies the event type.

select_data
Specifies data used to select or deselect events from the server.

proc
Specifies the proc.

client_data
Specifies additional data to be passed to the event handler.

position
Specifies when the event handler is to be called relative to other previously registered handlers.

display
Specifies the display.

min_event_type, max_event_type
Specifies the range of event types for this extension.

event
Specifies a pointer to the event to be dispatched.

DESCRIPTION

The XtInsertEventTypeHandler function registers a procedure with the dispatch mechanism that is to be called when an event that matches the specified event_type is dispatched to the specified widget.

If event_type is one of the core X protocol events then select_data must be a pointer to a value of type EventMask, indicating the event mask to be used to select for the desired event. This event mask will be included in the value returned by XtBuildEventMask. If the widget is realized XtInsertEventTypeHandler calls XSelectInput if necessary. Specifying NULL for select_data is equivalent to specifying a pointer to an event mask containing 0. This is similar to the XtInsertRawEventHandler function.

If event_type specifies an extension event type then the semantics of the data pointed to by select_data are defined by the extension selector registered for the specified event type.

In either case the Intrinsics are not required to copy the data pointed to by select_data, so the caller must ensure that it remains valid as long as the event handler remains registered with this value of select_data.

The position argument allows the client to control the order of the invocation of event handlers registered for the same event type. If the client does not care about the order, it should normally specify XtListTail, which registers this event handler after any previously registered handlers for this event type.

The XtRemoveEventTypeHandler function unregisters an even handler registered with XtInsertEventTypeHandler for the specified event type. The request is ignored if client_data does not match the value given with the handler was registered.

If event_type specifies on of the core X protocol events, select_data must be a pointer to a value of type EventMask, indicating the mask to be used to deselect for the appropriate event. If the widget is realized, XtRemoveEventTypeHandler calls XSelectInput if necessary. Specifying NULL for select_data is equivalent to specifying a pointer to an event mask containing 0. This is similar to the XtRemoveRawEventHandler function.

If event_type specifies an extension event type then the semantics of the data pointed to by select_data are defined by the extension selector registered for the specified event type.

The XtRegisterExtensionSelector function registers a procedure to arrange for the delivery of extension events to widgets.

If min_event_type and max_event_type match the parameters to a previous call to XtRegisterExtensionSelector for the same display, the proc and client_data replace the previously registered values. If the range specified by min_event_type and max_event_type overlaps the range of the parameters to a previous call for the same display in any other way, an error results.

The XtSetEventDispatcher function registers the event dispatcher procedure specified by proc for events with the type event_type. The previously registered dispatcher (or the default dispatcher if there was no previously registered dispatcher) is returned. If proc is NULL, the default procedure is restored for the specified type.

In the future, when XtDispatchEvent is called with an event of event_type, the specified proc (or the default dispatcher) will be invoked to determine a widget ot which to dispatch the event.

The XtDispatchEventToWidget function scans the list of registered event handlers for the specified widget and calls each handler that has been registered for the specified event type, subject to the continue_to_dispatch value returned by each handler. The Intrinsics behave as if event handlers were registered at the head of the list for Expose, NoExpose, GraphicsExpose, and VisibilityNotify events to invoke the widget’s expose procedure according to the exposure compression rules and to update the widget’s visible field if visible_interest is True. These internal event handlers never set continue_to_dispatch to False.

XtDispatchEventToWidget returns True if any event handler was called and False otherwise.

SEE ALSO

XtGetKeyboardFocusWidget(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1437 - Linux cli command Tk_UserGuidepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_UserGuidepm and provides detailed information about the command Tk_UserGuidepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_UserGuidepm.

NAME 🖥️ Tk_UserGuidepm 🖥️

Writing Tk applications in Perl 5

DESCRIPTION

This document is for beginners. It assumes you know some Perl, and have it and Tk running. If you are not currently reading this document courtesy of the widget demonstration program, please be sure to run widget, as it will show you the various widget types supported by Tk and how to use them. widget should be installed in your default path, so type widget at a command prompt.

Here are links to other novice tutorials:

<http://www.lehigh.edu/~sol0/ptk/tpj1.html> <http://www.lehigh.edu/~sol0/ptk/perlmonth01/pm1.html>

Mastering Perl/Tk is the definitive book on Perl/Tk:

<http://www.oreilly.com/catalog/mastperltk>

Some Background

Tk GUI programming is event-driven. (This may already be familiar to you.) In event-driven programs, the main GUI loop is outside of the user program and inside the GUI library. This loop - initiated by calling MainLoop - watches all events of interest and activates the correct handler procedures to handle these events. Some of these handler procedures may be user-supplied; others will be part of the library.

For a programmer, this means that you’re not watching what is happening; instead, you are requested by the toolkit to perform actions whenever necessary. So, you’re not watching for ‘raise window / close window / redraw window’ requests, but you tell the toolkit which routine will handle such cases, and the toolkit will call the procedures when required. These procedures are known as callbacks, and some of them you write yourself.

First Requirements

Perl programs that use Tk need to include use Tk. A program should also use use strict and the -w switch to ensure the program is working without common errors.

Any Perl/Tk application starts by creating the Tk MainWindow. You then create items inside the MainWindow, and/or create new windows called Toplevels that also contain child items, before starting the MainLoop, which is the last logical statment in your program. You can also create more items and windows while you’re running, using callbacks. Items are only shown on the display after they have been arranged by a geometry manager like pack; more information on this later. MainLoop starts the GUI and handle all events. That’s all there is to it! A trivial one-window example is shown below:

#!/usr/bin/perl -w use Tk; use strict; my $mw = MainWindow->new; $mw->Label(-text => Hello, world!)->pack; $mw->Button( -text => Quit, -command => sub { exit }, )->pack; MainLoop;

Please run this example. It shows you two widget types, a Label and a Button, and how they are packed. When clicked, the Button widget invokes the callback specified by the -command option. Finally, note the typical Tk style using -option => value pairs.

Widget creation

Tk windows and widgets are hierarchical, i.e. one window includes one or more other windows. You create the first Tk window using MainWindow->new. This returns a window handle, assigned to $mw in the example above. Keep track of the main handle, commonly called a widget reference.

You can use any Tk handle to create child widgets within the window (or widget). This is done by calling the Tk constructor method on the variable. In the example above, the Label method called from $mw creates a Label widget inside the MainWindow. In the constructor call, you can specify various options; you can later add or change options for any widget using the configure method, which takes the same parameters as the constructor. The one exception to the hierarchical structure is the Toplevel constructor, which creates a new outermost window.

After you create any widget (other than the MainWindow or Toplevels, you must render it by calling pack. (This is not entirely true; more later)). If you do not need to refer to the widget after construction and packing, call pack off the constructor results, as shown for the Label and Button in the example above. Note that the result of the compound call is the result of pack, which is a valid Tk handle.

Windows and widgets are deleted by calling destroy on them; this will delete and un-draw the widget and all its children.

Standard Tk widgets

Here is an itemize of the standard Tk widget set.

Button

Canvas

Checkbutton

Entry

Frame

Label

Labelframe

Listbox

Menu

Menubutton

Message

Panedwindow

Radiobutton

Scale

Scrollbar

Spinbox

Text

Toplevel

Perl/Tk provides an equal number of new widgets, above and beyond this core set.

Adjuster

Balloon

BrowseEntry

ColorEditor

Dialog

DialogBox

DirTree

ErrorDialog

FBox

FileSelect

HList

LabEntry

LabFrame

NoteBook

Optionmenu

Pane

ProgressBar

ROText

Table

TextUndo

Tiler

TList

Tree

Variables and callback routines

Most graphical interfaces are used to set up a set of values and conditions, and then perform the appropriate action. The Tk toolkit is different from your average text-based prompting or menu driven system in that you do not collect settings yourself, and decide on an action based on an input code; instead, you leave these values to your toolkit and only get them when the action is performed.

So, where a traditional text-based system would look like this:

#!/usr/bin/perl -w use strict; print “Please type a font name “; my $font = <>; chomp $font; # Validate font print “Please type a file name “; my $filename = <>; chomp $filename; # Validate filename print “Type <1> to fax, <2> to print “; my $option = <>; chomp $option; if ($option eq 1) { print “Faxing $filename in font $font “; } elsif ($option eq 2) { print “Now sending $filename to printer in font $font “; }

The slightly larger example below shows how to do this in Tk. Note the use of callbacks. Note, also, that Tk handles the values, and the subroutine uses the method get to get at the values. If a user changes his mind and wants to change the font again, the application never notices; it’s all handled by Tk.

#!/usr/bin/perl -w use Tk; use strict; my $mw = MainWindow->new; $mw->Label(-text => File Name)->pack; my $filename = $mw->Entry(-width => 20); $filename->pack; $mw->Label(-text => Font Name)->pack; my $font = $mw->Entry(-width => 10); $font->pack; $mw->Button( -text => Fax, -command => sub{do_fax($filename, $font)} )->pack; $mw->Button( -text => Print, -command => sub{do_print($filename, $font)} )->pack; MainLoop; sub do_fax { my ($file, $font) = @_; my $file_val = $file->get; my $font_val = $font->get; print “Now faxing $file_val in font $font_val “; } sub do_print { my ($file, $font) = @_; my $file_val = $file->get; my $font_val = $font->get; print “Sending file $file_val to printer in font $font_val “; }

The packer - grouping with Frame widgets

In the examples above, you must have noticed the pack calls. This is one of the more complicated parts of Tk. The basic idea is that any window or widget should be subject to a Tk geometry manager; the packer is one of the placement managers, and grid is another.

The actions of the packer are rather simple: when applied to a widget, the packer positions that widget on the indicated position within the remaining space in its parent. By default, the position is on top; this means the next items will be put below. You can also specify the left, right, or bottom positions. Specify position using -side => ‘right’.

Additional packing parameters specify the behavior of the widget when there is some space left in the Frame or when the window size is increased. If widgets should maintain a fixed size, specify nothing; this is the default. For widgets that you want to fill up the current horizontal and/or vertical space, specify -fill => ‘x’, ‘y’, or ‘both’; for widgets that should grow, specify -expand => 1. These parameters are not shown in the example below; see the widget demonstration.

If you want to group some items within a window that have a different packing order than others, you can include them in a Frame. This is a do-nothing window type that is meant for packing or filling (and to play games with borders and colors).

The example below shows the use of pack and Frames:

#!/usr/bin/perl -w use Tk; use strict; # Take top and the bottom - now implicit top is in the middle my $mw = MainWindow->new; $mw->title( The MainWindow ); $mw->Label(-text => At the top (default))->pack; $mw->Label(-text => At the bottom)->pack(-side => bottom); $mw->Label(-text => The middle remains)->pack; # Since left and right are taken, bottom will not work… my $top1 = $mw->Toplevel; $top1->title( Toplevel 1 ); $top1->Label(-text => Left)->pack(-side => left); $top1->Label(-text => Right)->pack(-side => right); $top1->Label(-text => ?Bottom?)->pack(-side => bottom); # But when you use Frames, things work quite alright my $top2 = $mw->Toplevel; $top2->title( Toplevel 2 ); my $frame = $top2->Frame; $frame->pack; $frame->Label(-text => Left2)->pack(-side => left); $frame->Label(-text => Right2)->pack(-side => right); $top2->Label(-text => Bottom2)->pack(-side => bottom); MainLoop;

More than one window

Most real applications require more than one window. As you just saw, you can create more outermost windows by using a Toplevel widget. Each window is independent; destroying a Toplevel window does not affect the others as long as they are not a child of the closed Toplevel. However, exiting the MainWindow will destroy all remaining Toplevel widgets and end the application. The example below shows a trivial three-window application:

#!/usr/bin/perl -w use Tk; use strict; my $mw = MainWindow->new; fill_window($mw, Main); my $top1 = $mw->Toplevel; fill_window($top1, First top-level); my $top2 = $mw->Toplevel; fill_window($top2, Second top-level); MainLoop; sub fill_window { my ($window, $header) = @_; $window->Label(-text => $header)->pack; $window->Button( -text => close, -command => [$window => destroy] )->pack(-side => left); $window->Button( -text => exit, -command => [$mw => destroy] )->pack(-side => right); }

More callbacks

So far, all callback routines shown called a user procedure. You can also have a callback routine call another Tk routine. This is the way that scroll bars are implemented: scroll-bars can call a Tk item or a user procedure, whenever their position has changed. The Tk item that has a scrollbar attached calls the scrollbar when its size or offset has changed. In this way, the items are linked. You can still ask a scrollbar’s position, or set it by hand - but the defaults will be taken care of.

The example below shows a Listbox with a scroll bar. Moving the scrollbar moves the Listbox. Scanning a Listbox (dragging an item with the left mouse button) moves the scrollbar.

#!/usr/bin/perl -w use Tk; use strict; my $mw = MainWindow->new; my $box = $mw->Listbox( -relief => sunken, -height => 5, -setgrid => 1, ); my @items = qw(One Two Three Four Five Six Seven Eight Nine Ten Eleven Twelve); foreach (@items) { $box->insert(end, $_); } my $scroll = $mw->Scrollbar(-command => [yview, $box]); $box->configure(-yscrollcommand => [set, $scroll]); $box->pack(-side => left, -fill => both, -expand => 1); $scroll->pack(-side => right, -fill => y); MainLoop;

Note that there’s a convenience method Scrolled which helps constructing widgets with automatically managed scrollbars.

Canvases and tags

One of the most powerful widgets in Tk is the Canvas window. In a Canvas window, you can draw simple graphics and include other widgets. The Canvas area may be larger than the visible window, and may then be scrolled. Any item you draw on the canvas has its own id, and may optionally have one or more tags. You may refer to any item by its id, and may refer to any group of items by a common tag; you can move, delete, or change groups of items using these tags, and you can bind actions to tags. For a properly designed (often structured) Canvas, you can specify powerful actions quite simply.

In the example below, actions are bound to circles (single click) and blue items (double-click); obviously, this can be extended to any tag or group of tags.

#!/usr/bin/perl -w use Tk; use strict; # Create B<MainWindow> and canvas my $mw = MainWindow->new; my $canvas = $mw->Canvas; $canvas->pack(-expand => 1, -fill => both); # Create various items create_item($canvas, 1, 1, circle, blue, Jane); create_item($canvas, 4, 4, circle, red, Peter); create_item($canvas, 4, 1, square, blue, James); create_item($canvas, 1, 4, square, red, Patricia); # Single-clicking with left on a circle item invokes a procedure $canvas->bind(circle, <1> => sub {handle_circle($canvas)}); # Double-clicking with left on a blue item invokes a procedure $canvas->bind(blue, <Double-1> => sub {handle_blue($canvas)}); MainLoop; # Create an item; use parameters as tags (this is not a default!) sub create_item { my ($can, $x, $y, $form, $color, $name) = @_; my $x2 = $x + 1; my $y2 = $y + 1; my $kind; $kind = oval if ($form eq circle); $kind = rectangle if ($form eq square); $can->create( ($kind, “$x” . c, “$y” . c, “$x2” . c, “$y2” . c), -tags => [$form, $color, $name], -fill => $color); } # This gets the real name (not current, blue/red, square/circle) # Note: youll want to return a list in realistic situations… sub get_name { my ($can) = @_; my $item = $can->find(withtag, current); my @taglist = $can->gettags($item); my $name; foreach (@taglist) { next if ($_ eq current); next if ($_ eq red or $_ eq blue); next if ($_ eq square or $_ eq circle); $name = $_; last; } return $name; } sub handle_circle { my ($can) = @_; my $name = get_name($can); print “Action on circle $name… “; } sub handle_blue { my ($can) = @_; my $name = get_name($can); print “Action on blue item $name… “; }

Perl/Tk and Unicode

Perl/Tk follows Perl’s model of handling Unicode. That is, if a string is correctly flagged as a “character” string in the sense like described in “TERMINOLOGY” in Encode, then Perl/Tk will very probably display and handle this string correctly.

Note that every variable which is passed somehow into a Perl/Tk method will be implicitely changed into an internally utf8-flagged variable. Semantically nothing changes, as the series of codepoints stays the same, but things will change when variables with high-bit iso-8859-1 characters will be passed to the “outer” world. In this case you have to explicitly mark the encoding of your output stream if using IO, or encode the variables using Encode for other style of communication.

This is the theory, now some examples.

If you use non-iso-8859-1 characters in the source code, then use either the use utf8; or use encoding encodingname pragma:

use utf8; use Tk; my $x = “some characters using utf8 encoding”; tkinit->Label(-text => $x)->pack; MainLoop;

For data that comes from a file you have to specify the encoding unless it’s encoded as ascii or iso-8559-1:

use Tk; open my $FH, “<:encoding(utf-8)”, “filename” or die $!; # or for utf-16 data: open my $FH, “<:encoding(utf-16)”, “filename” or die $!; my $data = <$FH>; tkinit->Label(-text => $data)->pack; MainLoop;

Likewise, the encoding must be specified for all data which is read from Tk widgets and that shall be output into a file. For the output, the encoding should be always specified, even if it is iso-8859-1:

use Tk; $mw = tkinit; $mw->Entry(-textvariable => \input)->pack; $mw->Button( -text => “Write to file”, -command => sub { open my $FH, “>:encoding(iso-8859-1)”, “filename” or die $!; print $FH $input; }, )->pack; MainLoop;

Note that Tk is Unicode-capable. So you need to be prepared that the user has the appropriate input methods activated to enter non-ascii characters. If an output encoding is used which does not cover the whole of Unicode codepoints then a warning will be issued when writing the file, like this:

“\x{20ac}” does not map to iso-8859-1 at /usr/local/lib/perl5/site_perl/5.8.8/mach/Tk.pm line 250.

Also, the same hexadecimal notation will be used as replacements for the unhandled characters.

Handling encoding in I/O is pretty simple using the encoding PerlIO layer, as described above. In other cases, such as when dealing with databases, encoding the data usually has to be done manually, unless the database driver has some means for automatically do this for you. So when working with a MySQL database, one could use:

use Tk; use DBI; use Encode qw(encode); $mw = tkinit; $mw->Entry(-textvariable => \input)->pack; $mw->Button( -text => “Write to database”, -command => sub { my $dbh = DBI->connect(“dbi:mysql:test”, “root”, “”) or die; my $encoded_input = encode(“iso-8859-1”, $input); $dbh->do(“INSERT INTO testtable VALUES (?)”, undef, $encoded_input) or die; }, )->pack; MainLoop;

Unfortunately, there are still places in Perl ignorant of Unicode. One of these places are filenames. Consequently, the file selectors in Perl/Tk do not handle encoding of filenames properly. Currently they suppose that filenames are in iso-8859-1 encoding, at least on Unix systems. As soon as Perl has a concept of filename encodings, then Perl/Tk will also implement such schemes.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1438 - Linux cli command XtNumber

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtNumber and provides detailed information about the command XtNumber, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtNumber.

NAME 🖥️ XtNumber 🖥️

determine the byte offset or number of array elements

SYNTAX

#include <X11/Intrinsic.h>

Cardinal XtOffset(Type pointer_type, Field field_name);

Cardinal XtOffsetOf(Type structure_type, Field field_name);

Cardinal XtNumber(ArrayVariable array);

ARGUMENTS

array
Specifies a fixed-size array.

field_name
Specifies the name of the field for which to calculate the byte offset.

pointer_type
Specifies a type that is declared as a pointer to the structure.

structure_type
Specifies a type that is declared as a structure.

DESCRIPTION

The XtOffset macro is usually used to determine the offset of various resource fields from the beginning of a widget and can be used at compile time in static initializations.

The XtOffsetOf macro expands to a constant expression that gives the offset in bytes to the specified structure member from the beginning of the structure. It is normally used to statically initialize resource lists and is more portable than XtOffset, which serves the same function.

The XtNumber macro returns the number of elements in the specified argument lists, resources lists, and other counted arrays.

SEE ALSO

XtGetResourceList(3), XtSetArg(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1439 - Linux cli command zip_source_is_deleted

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_is_deleted and provides detailed information about the command zip_source_is_deleted, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_is_deleted.

libzip (-lzip)

The function

returns whether the zip_source was deleted. This can for example happen when all entries are removed from a zip archive.

returns 1 if the zip_source is deleted and 0 otherwise.

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1440 - Linux cli command mkostemps

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mkostemps and provides detailed information about the command mkostemps, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mkostemps.

NAME 🖥️ mkostemps 🖥️

create a unique temporary file

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int mkstemp(char *template);
int mkostemp(char *template, int flags);
int mkstemps(char *template, int suffixlen);
int mkostemps(char *template, int suffixlen, int flags);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

mkstemp():

    _XOPEN_SOURCE >= 500
        || /* glibc >= 2.12: */ _POSIX_C_SOURCE >= 200809L
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

mkostemp():

    _GNU_SOURCE

mkstemps():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

mkostemps():

    _GNU_SOURCE

DESCRIPTION

The mkstemp() function generates a unique temporary filename from template, creates and opens the file, and returns an open file descriptor for the file.

The last six characters of template must be “XXXXXX” and these are replaced with a string that makes the filename unique. Since it will be modified, template must not be a string constant, but should be declared as a character array.

The file is created with permissions 0600, that is, read plus write for owner only. The returned file descriptor provides both read and write access to the file. The file is opened with the open(2) O_EXCL flag, guaranteeing that the caller is the process that creates the file.

The mkostemp() function is like mkstemp(), with the difference that the following bits—with the same meaning as for open(2)—may be specified in flags: O_APPEND, O_CLOEXEC, and O_SYNC. Note that when creating the file, mkostemp() includes the values O_RDWR, O_CREAT, and O_EXCL in the flags argument given to open(2); including these values in the flags argument given to mkostemp() is unnecessary, and produces errors on some systems.

The mkstemps() function is like mkstemp(), except that the string in template contains a suffix of suffixlen characters. Thus, template is of the form prefixXXXXXXsuffix, and the string XXXXXX is modified as for mkstemp().

The mkostemps() function is to mkstemps() as mkostemp() is to mkstemp().

RETURN VALUE

On success, these functions return the file descriptor of the temporary file. On error, -1 is returned, and errno is set to indicate the error.

ERRORS

EEXIST
Could not create a unique temporary filename. Now the contents of template are undefined.

EINVAL
For mkstemp() and mkostemp(): The last six characters of template were not XXXXXX; now template is unchanged.

For mkstemps() and mkostemps(): template is less than (6 + suffixlen) characters long, or the last 6 characters before the suffix in template were not XXXXXX.

These functions may also fail with any of the errors described for open(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mkstemp(), mkostemp(), mkstemps(), mkostemps()

Thread safetyMT-Safe

STANDARDS

mkstemp()
POSIX.1-2001.

mkstemps()
BSD.

mkostemp()
mkostemps()
GNU.

HISTORY

mkstemp()
4.3BSD, POSIX.1-2001.

mkstemps()
glibc 2.11. BSD, Mac OS X, Solaris, Tru64.

mkostemp()
glibc 2.7.

mkostemps()
glibc 2.11.

In glibc versions 2.06 and earlier, the file is created with permissions 0666, that is, read and write for all users. This old behavior may be a security risk, especially since other UNIX flavors use 0600, and somebody might overlook this detail when porting programs. POSIX.1-2008 adds a requirement that the file be created with mode 0600.

More generally, the POSIX specification of mkstemp() does not say anything about file modes, so the application should make sure its file mode creation mask (see umask(2)) is set appropriately before calling mkstemp() (and mkostemp()).

SEE ALSO

mkdtemp(3), mktemp(3), tempnam(3), tmpfile(3), tmpnam(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1441 - Linux cli command sigsetops

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigsetops and provides detailed information about the command sigsetops, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigsetops.

NAME 🖥️ sigsetops 🖥️

POSIX signal set operations

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
int sigemptyset(sigset_t *set);
int sigfillset(sigset_t *set);
int sigaddset(sigset_t *set, int signum);
int sigdelset(sigset_t *set, int signum);
int sigismember(const sigset_t *set, int signum);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sigemptyset(), sigfillset(), sigaddset(), sigdelset(), sigismember():

    _POSIX_C_SOURCE

DESCRIPTION

These functions allow the manipulation of POSIX signal sets.

sigemptyset() initializes the signal set given by set to empty, with all signals excluded from the set.

sigfillset() initializes set to full, including all signals.

sigaddset() and sigdelset() add and delete respectively signal signum from set.

sigismember() tests whether signum is a member of set.

Objects of type sigset_t must be initialized by a call to either sigemptyset() or sigfillset() before being passed to the functions sigaddset(), sigdelset(), and sigismember() or the additional glibc functions described below (sigisemptyset(), sigandset(), and sigorset()). The results are undefined if this is not done.

RETURN VALUE

sigemptyset(), sigfillset(), sigaddset(), and sigdelset() return 0 on success and -1 on error.

sigismember() returns 1 if signum is a member of set, 0 if signum is not a member, and -1 on error.

On error, these functions set errno to indicate the error.

ERRORS

EINVAL
signum is not a valid signal.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sigemptyset(), sigfillset(), sigaddset(), sigdelset(), sigismember(), sigisemptyset(), sigorset(), sigandset()

Thread safetyMT-Safe

VERSIONS

GNU

If the _GNU_SOURCE feature test macro is defined, then <signal.h> exposes three other functions for manipulating signal sets:

int sigisemptyset(const sigset_t *set);
int sigorset(sigset_t *dest, const sigset_t *left,
 const sigset_t *right);
int sigandset(sigset_t *dest, const sigset_t *left,
 const sigset_t *right);

sigisemptyset() returns 1 if set contains no signals, and 0 otherwise.

sigorset() places the union of the sets left and right in dest. sigandset() places the intersection of the sets left and right in dest. Both functions return 0 on success, and -1 on failure.

These functions are nonstandard (a few other systems provide similar functions) and their use should be avoided in portable applications.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

When creating a filled signal set, the glibc sigfillset() function does not include the two real-time signals used internally by the NPTL threading implementation. See nptl(7) for details.

SEE ALSO

sigaction(2), sigpending(2), sigprocmask(2), sigsuspend(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1442 - Linux cli command lwptutpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lwptutpm and provides detailed information about the command lwptutpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lwptutpm.

NAME 🖥️ lwptutpm 🖥️

  • An LWP Tutorial

DESCRIPTION

LWP (short for “Library for WWW in Perl”) is a very popular group of Perl modules for accessing data on the Web. Like most Perl module-distributions, each of LWP’s component modules comes with documentation that is a complete reference to its interface. However, there are so many modules in LWP that it’s hard to know where to start looking for information on how to do even the simplest most common things.

Really introducing you to using LWP would require a whole book – a book that just happens to exist, called Perl & LWP. But this article should give you a taste of how you can go about some common tasks with LWP.

Getting documents with LWP::Simple

If you just want to get what’s at a particular URL, the simplest way to do it is LWP::Simple’s functions.

In a Perl program, you can call its get($url) function. It will try getting that URL’s content. If it works, then it’ll return the content; but if there’s some error, it’ll return undef.

my $url = http://www.npr.org/programs/fa/?todayDate=current; # Just an example: the URL for the most recent /Fresh Air/ show use LWP::Simple; my $content = get $url; die “Couldnt get $url” unless defined $content; # Then go do things with $content, like this: if($content =~ m/jazz/i) { print “Theyre talking about jazz today on Fresh Air! “; } else { print “Fresh Air is apparently jazzless today. “; }

The handiest variant on get is getprint, which is useful in Perl one-liners. If it can get the page whose URL you provide, it sends it to STDOUT; otherwise it complains to STDERR.

% perl -MLWP::Simple -e “getprint http://www.cpan.org/RECENT"

That is the URL of a plain text file that lists new files in CPAN in the past two weeks. You can easily make it part of a tidy little shell command, like this one that mails you the list of new Acme:: modules:

% perl -MLWP::Simple -e “getprint http://www.cpan.org/RECENT" \ | grep “/by-module/Acme” | mail -s “New Acme modules! Joy!” $USER

There are other useful functions in LWP::Simple, including one function for running a HEAD request on a URL (useful for checking links, or getting the last-revised time of a URL), and two functions for saving/mirroring a URL to a local file. See the LWP::Simple documentation for the full details, or chapter 2 of Perl & LWP for more examples.

The Basics of the LWP Class Model

LWP::Simple’s functions are handy for simple cases, but its functions don’t support cookies or authorization, don’t support setting header lines in the HTTP request, generally don’t support reading header lines in the HTTP response (notably the full HTTP error message, in case of an error). To get at all those features, you’ll have to use the full LWP class model.

While LWP consists of dozens of classes, the main two that you have to understand are LWP::UserAgent and HTTP::Response. LWP::UserAgent is a class for “virtual browsers” which you use for performing requests, and HTTP::Response is a class for the responses (or error messages) that you get back from those requests.

The basic idiom is $response = $browser->get($url), or more fully illustrated:

# Early in your program: use LWP 5.64; # Loads all important LWP classes, and makes # sure your version is reasonably recent. my $browser = LWP::UserAgent->new; … # Then later, whenever you need to make a get request: my $url = http://www.npr.org/programs/fa/?todayDate=current; my $response = $browser->get( $url ); die “Cant get $url – “, $response->status_line unless $response->is_success; die “Hey, I was expecting HTML, not “, $response->content_type unless $response->content_type eq text/html; # or whatever content-type youre equipped to deal with # Otherwise, process the content somehow: if($response->decoded_content =~ m/jazz/i) { print “Theyre talking about jazz today on Fresh Air! “; } else { print “Fresh Air is apparently jazzless today. “; }

There are two objects involved: $browser, which holds an object of class LWP::UserAgent, and then the $response object, which is of class HTTP::Response. You really need only one browser object per program; but every time you make a request, you get back a new HTTP::Response object, which will have some interesting attributes:

  • A status code indicating success or failure (which you can test with $response->is_success).

  • An HTTP status line that is hopefully informative if there’s failure (which you can see with $response->status_line, returning something like “404 Not Found”).

  • A MIME content-type like “text/html”, “image/gif”, “application/xml”, etc., which you can see with $response->content_type

  • The actual content of the response, in $response->decoded_content. If the response is HTML, that’s where the HTML source will be; if it’s a GIF, then $response->decoded_content will be the binary GIF data.

  • And dozens of other convenient and more specific methods that are documented in the docs for HTTP::Response, and its superclasses HTTP::Message and HTTP::Headers.

Adding Other HTTP Request Headers

The most commonly used syntax for requests is $response = $browser->get($url), but in truth, you can add extra HTTP header lines to the request by adding a list of key-value pairs after the URL, like so:

$response = $browser->get( $url, $key1, $value1, $key2, $value2, … );

For example, here’s how to send some commonly used headers, in case you’re dealing with a site that would otherwise reject your request:

my @ns_headers = ( User-Agent => Mozilla/4.76 [en] (Win98; U), Accept => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*, Accept-Charset => iso-8859-1,*,utf-8, Accept-Language => en-US, ); … $response = $browser->get($url, @ns_headers);

If you weren’t reusing that array, you could just go ahead and do this:

$response = $browser->get($url, User-Agent => Mozilla/4.76 [en] (Win98; U), Accept => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*, Accept-Charset => iso-8859-1,*,utf-8, Accept-Language => en-US, );

If you were only ever changing the ‘User-Agent’ line, you could just change the $browser object’s default line from “libwww-perl/5.65” (or the like) to whatever you like, using the LWP::UserAgent agent method:

$browser->agent(Mozilla/4.76 [en] (Win98; U));

Enabling Cookies

A default LWP::UserAgent object acts like a browser with its cookies support turned off. There are various ways of turning it on, by setting its cookie_jar attribute. A “cookie jar” is an object representing a little database of all the HTTP cookies that a browser knows about. It can correspond to a file on disk or an in-memory object that starts out empty, and whose collection of cookies will disappear once the program is finished running.

To give a browser an in-memory empty cookie jar, you set its cookie_jar attribute like so:

use HTTP::CookieJar::LWP; $browser->cookie_jar( HTTP::CookieJar::LWP->new );

To save a cookie jar to disk, see “dump_cookies” in HTTP::CookieJar. To load cookies from disk into a jar, see “load_cookies” in HTTP::CookieJar.

Posting Form Data

Many HTML forms send data to their server using an HTTP POST request, which you can send with this syntax:

$response = $browser->post( $url, [ formkey1 => value1, formkey2 => value2, … ], );

Or if you need to send HTTP headers:

$response = $browser->post( $url, [ formkey1 => value1, formkey2 => value2, … ], headerkey1 => value1, headerkey2 => value2, );

For example, the following program makes a search request to AltaVista (by sending some form data via an HTTP POST request), and extracts from the HTML the report of the number of matches:

use strict; use warnings; use LWP 5.64; my $browser = LWP::UserAgent->new; my $word = tarragon; my $url = http://search.yahoo.com/yhs/search; my $response = $browser->post( $url, [ q => $word, # the Altavista query string fr => altavista, pg => q, avkw => tgz, kl => XX, ] ); die “$url error: “, $response->status_line unless $response->is_success; die “Weird content type at $url – “, $response->content_type unless $response->content_is_html; if( $response->decoded_content =~ m{([0-9,]+)(?:<.*?>)? results for} ) { # The substring will be like “996,000</strong> results for” print “$word: $1 “; } else { print “Couldnt find the match-string in the response “; }

Sending GET Form Data

Some HTML forms convey their form data not by sending the data in an HTTP POST request, but by making a normal GET request with the data stuck on the end of the URL. For example, if you went to www.imdb.com and ran a search on “Blade Runner”, the URL you’d see in your browser window would be:

http://www.imdb.com/find?s=all&q=Blade+Runner

To run the same search with LWP, you’d use this idiom, which involves the URI class:

use URI; my $url = URI->new( http://www.imdb.com/find ); # makes an object representing the URL $url->query_form( # And here the form data pairs: q => Blade Runner, s => all, ); my $response = $browser->get($url);

See chapter 5 of Perl & LWP for a longer discussion of HTML forms and of form data, and chapters 6 through 9 for a longer discussion of extracting data from HTML.

Absolutizing URLs

The URI class that we just mentioned above provides all sorts of methods for accessing and modifying parts of URLs (such as asking sort of URL it is with $url->scheme, and asking what host it refers to with $url->host, and so on, as described in the docs for the URI class. However, the methods of most immediate interest are the query_form method seen above, and now the new_abs method for taking a probably-relative URL string (like “../foo.html”) and getting back an absolute URL (like “http://www.perl.com/stuff/foo.html"), as shown here:

use URI; $abs = URI->new_abs($maybe_relative, $base);

For example, consider this program that matches URLs in the HTML list of new modules in CPAN:

use strict; use warnings; use LWP; my $browser = LWP::UserAgent->new; my $url = http://www.cpan.org/RECENT.html; my $response = $browser->get($url); die “Cant get $url – “, $response->status_line unless $response->is_success; my $html = $response->decoded_content; while( $html =~ m/<A HREF=(.*?)/g ) { print “$1 “; }

When run, it emits output that starts out something like this:

MIRRORING.FROM RECENT RECENT.html authors/00whois.html authors/01mailrc.txt.gz authors/id/A/AA/AASSAD/CHECKSUMS …

However, if you actually want to have those be absolute URLs, you can use the URI module’s new_abs method, by changing the while loop to this:

while( $html =~ m/<A HREF=(.*?)/g ) { print URI->new_abs( $1, $response->base ) ,” “; }

(The $response->base method from HTTP::Message is for returning what URL should be used for resolving relative URLs – it’s usually just the same as the URL that you requested.)

That program then emits nicely absolute URLs:

http://www.cpan.org/MIRRORING.FROM http://www.cpan.org/RECENT http://www.cpan.org/RECENT.html http://www.cpan.org/authors/00whois.html http://www.cpan.org/authors/01mailrc.txt.gz http://www.cpan.org/authors/id/A/AA/AASSAD/CHECKSUMS

See chapter 4 of Perl & LWP for a longer discussion of URI objects.

Of course, using a regexp to match hrefs is a bit simplistic, and for more robust programs, you’ll probably want to use an HTML-parsing module like HTML::LinkExtor or HTML::TokeParser or even maybe HTML::TreeBuilder.

Other Browser Attributes

LWP::UserAgent objects have many attributes for controlling how they work. Here are a few notable ones:

  • $browser->timeout(15); This sets this browser object to give up on requests that don’t answer within 15 seconds.

  • $browser->protocols_allowed( [ http, gopher] ); This sets this browser object to not speak any protocols other than HTTP and gopher. If it tries accessing any other kind of URL (like an “ftp:” or “mailto:” or “news:” URL), then it won’t actually try connecting, but instead will immediately return an error code 500, with a message like “Access to ‘ftp’ URIs has been disabled”.

  • use LWP::ConnCache; $browser->conn_cache(LWP::ConnCache->new()); This tells the browser object to try using the HTTP/1.1 “Keep-Alive” feature, which speeds up requests by reusing the same socket connection for multiple requests to the same server.

  • $browser->agent( SomeName/1.23 (more info here maybe) ) This changes how the browser object will identify itself in the default “User-Agent” line is its HTTP requests. By default, it’ll send “libwww-perl/versionnumber”, like “libwww-perl/5.65”. You can change that to something more descriptive like this: $browser->agent( SomeName/3.14 ([email protected]) ); Or if need be, you can go in disguise, like this: $browser->agent( Mozilla/4.0 (compatible; MSIE 5.12; Mac_PowerPC) );

  • push @{ $ua->requests_redirectable }, POST; This tells this browser to obey redirection responses to POST requests (like most modern interactive browsers), even though the HTTP RFC says that should not normally be done.

For more options and information, see the full documentation for LWP::UserAgent.

Writing Polite Robots

If you want to make sure that your LWP-based program respects robots.txt files and doesn’t make too many requests too fast, you can use the LWP::RobotUA class instead of the LWP::UserAgent class.

LWP::RobotUA class is just like LWP::UserAgent, and you can use it like so:

use LWP::RobotUA; my $browser = LWP::RobotUA->new(YourSuperBot/1.34, [email protected]); # Your bots name and your email address my $response = $browser->get($url);

But HTTP::RobotUA adds these features:

  • If the robots.txt on $url’s server forbids you from accessing $url, then the $browser object (assuming it’s of class LWP::RobotUA) won’t actually request it, but instead will give you back (in $response) a 403 error with a message “Forbidden by robots.txt”. That is, if you have this line: die “$url – “, $response->status_line, " Aborted” unless $response->is_success; then the program would die with an error message like this: http://whatever.site.int/pith/x.html – 403 Forbidden by robots.txt Aborted at whateverprogram.pl line 1234

  • If this $browser object sees that the last time it talked to $url’s server was too recently, then it will pause (via sleep) to avoid making too many requests too often. How long it will pause for, is by default one minute – but you can control it with the $browser->delay( minutes ) attribute. For example, this code: $browser->delay( 7/60 ); …means that this browser will pause when it needs to avoid talking to any given server more than once every 7 seconds.

For more options and information, see the full documentation for LWP::RobotUA.

Using Proxies

In some cases, you will want to (or will have to) use proxies for accessing certain sites and/or using certain protocols. This is most commonly the case when your LWP program is running (or could be running) on a machine that is behind a firewall.

To make a browser object use proxies that are defined in the usual environment variables (HTTP_PROXY, etc.), just call the env_proxy on a user-agent object before you go making any requests on it. Specifically:

use LWP::UserAgent; my $browser = LWP::UserAgent->new; # And before you go making any requests: $browser->env_proxy;

For more information on proxy parameters, see the LWP::UserAgent documentation, specifically the proxy, env_proxy, and no_proxy methods.

HTTP Authentication

Many web sites restrict access to documents by using “HTTP Authentication”. This isn’t just any form of “enter your password” restriction, but is a specific mechanism where the HTTP server sends the browser an HTTP code that says “That document is part of a protected ‘realm’, and you can access it only if you re-request it and add some special authorization headers to your request”.

For example, the Unicode.org admins stop email-harvesting bots from harvesting the contents of their mailing list archives, by protecting them with HTTP Authentication, and then publicly stating the username and password (at http://www.unicode.org/mail-arch/) – namely username “unicode-ml” and password “unicode”.

For example, consider this URL, which is part of the protected area of the web site:

http://www.unicode.org/mail-arch/unicode-ml/y2002-m08/0067.html

If you access that with a browser, you’ll get a prompt like “Enter username and password for ‘Unicode-MailList-Archives’ at server ‘www.unicode.org’”.

In LWP, if you just request that URL, like this:

use LWP; my $browser = LWP::UserAgent->new; my $url = http://www.unicode.org/mail-arch/unicode-ml/y2002-m08/0067.html; my $response = $browser->get($url); die “Error: “, $response->header(WWW-Authenticate) || Error accessing, # (WWW-Authenticate is the realm-name) " “, $response->status_line, " at $url Aborting” unless $response->is_success;

Then you’ll get this error:

Error: Basic realm=“Unicode-MailList-Archives” 401 Authorization Required at http://www.unicode.org/mail-arch/unicode-ml/y2002-m08/0067.html Aborting at auth1.pl line 9. [or wherever]

…because the $browser doesn’t know any the username and password for that realm (“Unicode-MailList-Archives”) at that host (“www.unicode.org”). The simplest way to let the browser know about this is to use the credentials method to let it know about a username and password that it can try using for that realm at that host. The syntax is:

$browser->credentials( servername:portnumber, realm-name, username => password );

In most cases, the port number is 80, the default TCP/IP port for HTTP; and you usually call the credentials method before you make any requests. For example:

$browser->credentials( reports.mybazouki.com:80, web_server_usage_reports, plinky => banjo123 );

So if we add the following to the program above, right after the $browser = LWP::UserAgent->new; line…

$browser->credentials( # add this to our $browser s “key ring” www.unicode.org:80, Unicode-MailList-Archives, unicode-ml => unicode );

…then when we run it, the request succeeds, instead of causing the die to be called.

Accessing HTTPS URLs

When you access an HTTPS URL, it’ll work for you just like an HTTP URL would – if your LWP installation has HTTPS support (via an appropriate Secure Sockets Layer library). For example:

use LWP; my $url = https://www.paypal.com/; # Yes, HTTPS! my $browser = LWP::UserAgent->new; my $response = $browser->get($url); die “Error at $url “, $response->status_line, " Aborting” unless $response->is_success; print “Whee, it worked! I got that “, $response->content_type, " document! “;

If your LWP installation doesn’t have HTTPS support set up, then the response will be unsuccessful, and you’ll get this error message:

Error at https://www.paypal.com/ 501 Protocol scheme https is not supported Aborting at paypal.pl line 7. [or whatever program and line]

If your LWP installation does have HTTPS support installed, then the response should be successful, and you should be able to consult $response just like with any normal HTTP response.

For information about installing HTTPS support for your LWP installation, see the helpful README.SSL file that comes in the libwww-perl distribution.

Getting Large Documents

When you’re requesting a large (or at least potentially large) document, a problem with the normal way of using the request methods (like $response = $browser->get($url)) is that the response object in memory will have to hold the whole document – in memory. If the response is a thirty megabyte file, this is likely to be quite an imposition on this process’s memory usage.

A notable alternative is to have LWP save the content to a file on disk, instead of saving it up in memory. This is the syntax to use:

$response = $ua->get($url, :content_file => $filespec, );

For example,

$response = $ua->get(http://search.cpan.org/, :content_file => /tmp/sco.html );

When you use this :content_file option, the $response will have all the normal header lines, but $response->content will be empty. Errors writing to the content file (for example due to permission denied or the filesystem being full) will be reported via the Client-Aborted or X-Died response headers, and not the is_success method:

if ($response->header(Client-Aborted) eq die) { # handle error …

Note that this “:content_file” option isn’t supported under older versions of LWP, so you should consider adding use LWP 5.66; to check the LWP version, if you think your program might run on systems with older versions.

If you need to be compatible with older LWP versions, then use this syntax, which does the same thing:

use HTTP::Request::Common; $response = $ua->request( GET($url), $filespec );

SEE ALSO

Remember, this article is just the most rudimentary introduction to LWP – to learn more about LWP and LWP-related tasks, you really must read from the following:

  • LWP::Simple – simple functions for getting/heading/mirroring URLs

  • LWP – overview of the libwww-perl modules

  • LWP::UserAgent – the class for objects that represent “virtual browsers”

  • HTTP::Response – the class for objects that represent the response to a LWP response, as in $response = $browser->get(...)

  • HTTP::Message and HTTP::Headers – classes that provide more methods to HTTP::Response.

  • URI – class for objects that represent absolute or relative URLs

  • URI::Escape – functions for URL-escaping and URL-unescaping strings (like turning “this & that” to and from “this%20%26%20that”).

  • HTML::Entities – functions for HTML-escaping and HTML-unescaping strings (like turning “C. & E. Brontë” to and from “C. & E. Brontë”)

  • HTML::TokeParser and HTML::TreeBuilder – classes for parsing HTML

  • HTML::LinkExtor – class for finding links in HTML documents

  • The book Perl & LWP by Sean M. Burke. O’Reilly & Associates, 2002. ISBN: 0-596-00178-9, <http://oreilly.com/catalog/perllwp/>. The whole book is also available free online: <http://lwp.interglacial.com>.

COPYRIGHT

Copyright 2002, Sean M. Burke. You can redistribute this document and/or modify it, but only under the same terms as Perl itself.

AUTHOR

Sean M. Burke [email protected]

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1443 - Linux cli command getopt

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getopt and provides detailed information about the command getopt, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getopt.

NAME 🖥️ getopt 🖥️

Parse command-line options

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
int getopt(int argc, char *argv[],
 const char *optstring);
extern char *optarg;
extern int optind, opterr, optopt;
#include <getopt.h>
int getopt_long(int argc, char *argv[],
 const char *optstring,
 const struct option *longopts, int *longindex);
int getopt_long_only(int argc, char *argv[],
 const char *optstring,
 const struct option *longopts, int *longindex);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getopt():

    _POSIX_C_SOURCE >= 2 || _XOPEN_SOURCE

getopt_long(), getopt_long_only():

    _GNU_SOURCE

DESCRIPTION

The getopt() function parses the command-line arguments. Its arguments argc and argv are the argument count and array as passed to the main() function on program invocation. An element of argv that starts with ‘-’ (and is not exactly “-” or “–”) is an option element. The characters of this element (aside from the initial ‘-’) are option characters. If getopt() is called repeatedly, it returns successively each of the option characters from each of the option elements.

The variable optind is the index of the next element to be processed in argv. The system initializes this value to 1. The caller can reset it to 1 to restart scanning of the same argv, or when scanning a new argument vector.

If getopt() finds another option character, it returns that character, updating the external variable optind and a static variable nextchar so that the next call to getopt() can resume the scan with the following option character or argv-element.

If there are no more option characters, getopt() returns -1. Then optind is the index in argv of the first argv-element that is not an option.

optstring is a string containing the legitimate option characters. A legitimate option character is any visible one byte ascii(7) character (for which isgraph(3) would return nonzero) that is not ‘-’, ‘:’, or ‘;’. If such a character is followed by a colon, the option requires an argument, so getopt() places a pointer to the following text in the same argv-element, or the text of the following argv-element, in optarg. Two colons mean an option takes an optional arg; if there is text in the current argv-element (i.e., in the same word as the option name itself, for example, “-oarg”), then it is returned in optarg, otherwise optarg is set to zero. This is a GNU extension. If optstring contains W followed by a semicolon, then -W foo is treated as the long option –foo. (The -W option is reserved by POSIX.2 for implementation extensions.) This behavior is a GNU extension, not available with libraries before glibc 2.

By default, getopt() permutes the contents of argv as it scans, so that eventually all the nonoptions are at the end. Two other scanning modes are also implemented. If the first character of optstring is ‘+’ or the environment variable POSIXLY_CORRECT is set, then option processing stops as soon as a nonoption argument is encountered. If ‘+’ is not the first character of optstring, it is treated as a normal option. If POSIXLY_CORRECT behaviour is required in this case optstring will contain two ‘+’ symbols. If the first character of optstring is ‘-’, then each nonoption argv-element is handled as if it were the argument of an option with character code 1. (This is used by programs that were written to expect options and other argv-elements in any order and that care about the ordering of the two.) The special argument “–” forces an end of option-scanning regardless of the scanning mode.

While processing the option list, getopt() can detect two kinds of errors: (1) an option character that was not specified in optstring and (2) a missing option argument (i.e., an option at the end of the command line without an expected argument). Such errors are handled and reported as follows:

  • By default, getopt() prints an error message on standard error, places the erroneous option character in optopt, and returns ‘?’ as the function result.

  • If the caller has set the global variable opterr to zero, then getopt() does not print an error message. The caller can determine that there was an error by testing whether the function return value is ‘?’. (By default, opterr has a nonzero value.)

  • If the first character (following any optional ‘+’ or ‘-’ described above) of optstring is a colon (’:’), then getopt() likewise does not print an error message. In addition, it returns ‘:’ instead of ‘?’ to indicate a missing option argument. This allows the caller to distinguish the two different types of errors.

getopt_long() and getopt_long_only()

The getopt_long() function works like getopt() except that it also accepts long options, started with two dashes. (If the program accepts only long options, then optstring should be specified as an empty string (""), not NULL.) Long option names may be abbreviated if the abbreviation is unique or is an exact match for some defined option. A long option may take a parameter, of the form –arg=param or –arg param.

longopts is a pointer to the first element of an array of struct option declared in <getopt.h> as

struct option {
    const char *name;
    int         has_arg;
    int        *flag;
    int         val;
};

The meanings of the different fields are:

name
is the name of the long option.

has_arg
is: no_argument (or 0) if the option does not take an argument; required_argument (or 1) if the option requires an argument; or optional_argument (or 2) if the option takes an optional argument.

flag
specifies how results are returned for a long option. If flag is NULL, then getopt_long() returns val. (For example, the calling program may set val to the equivalent short option character.) Otherwise, getopt_long() returns 0, and flag points to a variable which is set to val if the option is found, but left unchanged if the option is not found.

val
is the value to return, or to load into the variable pointed to by flag.

The last element of the array has to be filled with zeros.

If longindex is not NULL, it points to a variable which is set to the index of the long option relative to longopts.

getopt_long_only() is like getopt_long(), but ‘-’ as well as “–” can indicate a long option. If an option that starts with ‘-’ (not “–”) doesn’t match a long option, but does match a short option, it is parsed as a short option instead.

RETURN VALUE

If an option was successfully found, then getopt() returns the option character. If all command-line options have been parsed, then getopt() returns -1. If getopt() encounters an option character that was not in optstring, then ‘?’ is returned. If getopt() encounters an option with a missing argument, then the return value depends on the first character in optstring: if it is ‘:’, then ‘:’ is returned; otherwise ‘?’ is returned.

getopt_long() and getopt_long_only() also return the option character when a short option is recognized. For a long option, they return val if flag is NULL, and 0 otherwise. Error and -1 returns are the same as for getopt(), plus ‘?’ for an ambiguous match or an extraneous parameter.

ENVIRONMENT

POSIXLY_CORRECT
If this is set, then option processing stops as soon as a nonoption argument is encountered.

_<PID>_GNU_nonoption_argv_flags_
This variable was used by bash(1) 2.0 to communicate to glibc which arguments are the results of wildcard expansion and so should not be considered as options. This behavior was removed in bash(1) 2.01, but the support remains in glibc.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getopt(), getopt_long(), getopt_long_only()

Thread safety

MT-Unsafe race:getopt env

VERSIONS

POSIX specifies that the argv array argument should be const, but these functions permute its elements unless the environment variable POSIXLY_CORRECT is set. const is used in the actual prototype to be compatible with other systems; however, this page doesn’t show the qualifier, to avoid confusing readers.

STANDARDS

getopt()
POSIX.1-2008.

getopt_long()
getopt_long_only()
GNU.

The use of ‘+’ and ‘-’ in optstring is a GNU extension.

HISTORY

getopt()
POSIX.1-2001, and POSIX.2.

On some older implementations, getopt() was declared in <stdio.h>. SUSv1 permitted the declaration to appear in either <unistd.h> or <stdio.h>. POSIX.1-1996 marked the use of <stdio.h> for this purpose as LEGACY. POSIX.1-2001 does not require the declaration to appear in <stdio.h>.

NOTES

A program that scans multiple argument vectors, or rescans the same vector more than once, and wants to make use of GNU extensions such as ‘+’ and ‘-’ at the start of optstring, or changes the value of POSIXLY_CORRECT between scans, must reinitialize getopt() by resetting optind to 0, rather than the traditional value of 1. (Resetting to 0 forces the invocation of an internal initialization routine that rechecks POSIXLY_CORRECT and checks for GNU extensions in optstring.)

Command-line arguments are parsed in strict order meaning that an option requiring an argument will consume the next argument, regardless of whether that argument is the correctly specified option argument or simply the next option (in the scenario the user mis-specifies the command line). For example, if optstring is specified as “1n:” and the user specifies the command line arguments incorrectly as prog -n -1, the -n option will be given the optarg value “-1”, and the -1 option will be considered to have not been specified.

EXAMPLES

getopt()

The following trivial example program uses getopt() to handle two program options: -n, with no associated value; and -t val, which expects an associated value.

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int
main(int argc, char *argv[])
{
    int flags, opt;
    int nsecs, tfnd;
    nsecs = 0;
    tfnd = 0;
    flags = 0;
    while ((opt = getopt(argc, argv, "nt:")) != -1) {
        switch (opt) {
        case 'n':
            flags = 1;
            break;
        case 't':
            nsecs = atoi(optarg);
            tfnd = 1;
            break;
        default: /* '?' */
            fprintf(stderr, "Usage: %s [-t nsecs] [-n] name

“, argv[0]); exit(EXIT_FAILURE); } } printf(“flags=%d; tfnd=%d; nsecs=%d; optind=%d “, flags, tfnd, nsecs, optind); if (optind >= argc) { fprintf(stderr, “Expected argument after options “); exit(EXIT_FAILURE); } printf(“name argument = %s “, argv[optind]); /* Other code omitted */ exit(EXIT_SUCCESS); }

getopt_long()

The following example program illustrates the use of getopt_long() with most of its features.

#include <getopt.h>
#include <stdio.h>     /* for printf */
#include <stdlib.h>    /* for exit */
int
main(int argc, char *argv[])
{
    int c;
    int digit_optind = 0;
    while (1) {
        int this_option_optind = optind ? optind : 1;
        int option_index = 0;
        static struct option long_options[] = {
            {"add",     required_argument, 0,  0 },
            {"append",  no_argument,       0,  0 },
            {"delete",  required_argument, 0,  0 },
            {"verbose", no_argument,       0,  0 },
            {"create",  required_argument, 0, 'c'},
            {"file",    required_argument, 0,  0 },
            {0,         0,                 0,  0 }
        };
        c = getopt_long(argc, argv, "abc:d:012",
                        long_options, &option_index);
        if (c == -1)
            break;
        switch (c) {
        case 0:
            printf("option %s", long_options[option_index].name);
            if (optarg)
                printf(" with arg %s", optarg);
            printf("

“); break; case ‘0’: case ‘1’: case ‘2’: if (digit_optind != 0 && digit_optind != this_option_optind) printf(“digits occur in two different argv-elements. “); digit_optind = this_option_optind; printf(“option %c “, c); break; case ‘a’: printf(“option a “); break; case ‘b’: printf(“option b “); break; case ‘c’: printf(“option c with value ‘%s’ “, optarg); break; case ’d’: printf(“option d with value ‘%s’ “, optarg); break; case ‘?’: break; default: printf(”?? getopt returned character code 0%o ?? “, c); } } if (optind < argc) { printf(“non-option ARGV-elements: “); while (optind < argc) printf("%s “, argv[optind++]); printf(” “); } exit(EXIT_SUCCESS); }

SEE ALSO

getopt(1), getsubopt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1444 - Linux cli command Net_TFTPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_TFTPpm and provides detailed information about the command Net_TFTPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_TFTPpm.

NAME 🖥️ Net_TFTPpm 🖥️

TFTP Client class

SYNOPSIS

use Net::TFTP; $tftp = Net::TFTP->new(“some.host.name”, BlockSize => 1024); $tftp->ascii; $tftp->get(“remotefile”, “localfile”); $tftp->get(“remotefile”, \STDOUT); $fh = $tftp->get(“remotefile”); $tftp->binary; $tftp->put(“localfile”, “remotefile”); $tftp->put(\STDOUT, “remotefile”); $fh = $tftp->put(“remotefile”); $err = $tftp->error

DESCRIPTION

Net::TFTP is a class implementing a simple Trivial File Transfer Protocol client in Perl as described in RFC1350. Net::TFTP also supports the TFTP Option Extension (as described in RFC2347), with the following options

RFC2348 Blocksize Option

CONSTRUCTOR

new ( [ HOST ] [, OPTIONS ])
Create a new Net::TFTP object where HOST is the default host to connect to and OPTIONS are the default transfer options. Valid options are Option Description Default —— ———– ——- Timeout Timeout in seconds before retry 5 Retries Maximum number of retries 5 Port Port to send data to 69 Mode Mode to transfer data in, “octet” or “netascii” “netascii” BlockSize Negotiate size of blocks to use in the transfer 512 IpMode Indicates whether to operate in IPv6 mode “v4”

METHODS

get ( REMOTE_FILE [, LOCAL ] [, OPTIONS ])
Get REMOTE_FILE from the server. OPTIONS can be any that are accepted by new plus the following Host Override default host If the LOCAL option is missing the get will return a filehandle. This filehandle must be read ASAP as the server will otherwise timeout. If the LOCAL option is given then it can be a file name or a reference. If it is a reference it is assumed to be a reference that is valid as a filehandle. get will return true if the transfer is successful and undef otherwise. Valid filehandles are

  • A sub-class of IO::Handle

  • A tied filehandle

  • A GLOB reference (eg \*STDOUT)

put ( [ LOCAL, ] REMOTE_FILE [, OPTIONS])
Put a file to the server as REMOTE_FILE. OPTIONS can be any that are accepted by new plus the following Host Override default host If the LOCAL option is missing the put will return a filehandle. This filehandle must be written to ASAP as the server will otherwise timeout. If the LOCAL option is given then it can be a file name or a reference. If it is a reference it is assumed to be a valid filehandle as described above. put will return true if the transfer is successful and undef otherwise.

error
If there was an error then this method will return an error string.

host ( [ HOST ] )

timeout ( [ TIMEOUT ] )

port ( [ PORT ] )

mode ( [ MODE ] )

retries ( [ VALUE ] )

block_size ( [ VALUE ] )

debug ( [ VALUE ] )

Set or get the values for the various options. If an argument is passed then a new value is set for that option and the previous value returned. If no value is passed then the current value is returned.

ip_mode ( [ VALUE ] )
Set or get which verion of IP to use (v4 or v6)

ascii

netascii

Set the transfer mode to "netascii"

binary

octet

Set the transfer mode to "octet"

AUTHOR

Graham Barr <[email protected]>

COPYRIGHT

Copyright (c) 1998,2007 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1445 - Linux cli command pmap_getmaps

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pmap_getmaps and provides detailed information about the command pmap_getmaps, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pmap_getmaps.

NAME 🖥️ pmap_getmaps 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1446 - Linux cli command XML_Writerpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_Writerpm and provides detailed information about the command XML_Writerpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_Writerpm.

NAME 🖥️ XML_Writerpm 🖥️

Perl extension for writing XML documents.

SYNOPSIS

use XML::Writer; use IO::File; my $output = IO::File->new(">output.xml"); my $writer = XML::Writer->new(OUTPUT => $output); $writer->startTag(“greeting”, “class” => “simple”); $writer->characters(“Hello, world!”); $writer->endTag(“greeting”); $writer->end(); $output->close();

DESCRIPTION

XML::Writer is a helper module for Perl programs that write an XML document. The module handles all escaping for attribute values and character data and constructs different types of markup, such as tags, comments, and processing instructions.

By default, the module performs several well-formedness checks to catch errors during output. This behaviour can be extremely useful during development and debugging, but it can be turned off for production-grade code.

The module can operate either in regular mode in or Namespace processing mode. In Namespace mode, the module will generate Namespace Declarations itself, and will perform additional checks on the output.

Additional support is available for a simplified data mode with no mixed content: newlines are automatically inserted around elements and elements can optionally be indented based as their nesting level.

METHODS

Writing XML

new([$params])
Create a new XML::Writer object: my $writer = XML::Writer->new(OUTPUT => $output, NEWLINES => 1); Arguments are an anonymous hash array of parameters:

OUTPUT
An object blessed into IO::Handle or one of its subclasses (such as IO::File), or a reference to a string, or any blessed object that has a print() method; if this parameter is not present, the module will write to standard output. If a string reference is passed, it will capture the generated XML (as a string; to get bytes use the Encode module). If the string self is passed, the output will be captured internally by the object, and can be accessed via the to_string() method, or by calling the object in a string context. my $writer = XML::Writer->new( OUTPUT => self ); $writer->dataElement( hello => world ); print $writer->to_string; # outputs <hello>world</hello> print “$writer”; # ditto

NAMESPACES
A true (1) or false (0, undef) value; if this parameter is present and its value is true, then the module will accept two-member array reference in the place of element and attribute names, as in the following example: my $rdfns = “http://www.w3.org/1999/02/22-rdf-syntax-ns#"; my $writer = XML::Writer->new(NAMESPACES => 1); $writer->startTag([$rdfns, “Description”]); The first member of the array is a namespace URI, and the second part is the local part of a qualified name. The module will automatically generate appropriate namespace declarations and will replace the URI part with a prefix.

PREFIX_MAP
A hash reference; if this parameter is present and the module is performing namespace processing (see the NAMESPACES parameter), then the module will use this hash to look up preferred prefixes for namespace URIs: my $rdfns = “http://www.w3.org/1999/02/22-rdf-syntax-ns#"; my $writer = XML::Writer->new(NAMESPACES => 1, PREFIX_MAP => {$rdfns => rdf}); The keys in the hash table are namespace URIs, and the values are the associated prefixes. If there is not a preferred prefix for the namespace URI in this hash, then the module will automatically generate prefixes of the form _ _NS1, _ _NS2, etc. To set the default namespace, use ’’ for the prefix.

FORCED_NS_DECLS
An array reference; if this parameter is present, the document element will contain declarations for all the given namespace URIs. Declaring namespaces in advance is particularly useful when a large number of elements from a namespace are siblings, but don’t share a direct ancestor from the same namespace.

NEWLINES
A true or false value; if this parameter is present and its value is true, then the module will insert an extra newline before the closing delimiter of start, end, and empty tags to guarantee that the document does not end up as a single, long line. If the parameter is not present, the module will not insert the newlines.

UNSAFE
A true or false value; if this parameter is present and its value is true, then the module will skip most well-formedness error checking. If the parameter is not present, the module will perform the well-formedness error checking by default. Turn off error checking at your own risk!

DATA_MODE
A true or false value; if this parameter is present and its value is true, then the module will enter a special data mode, inserting newlines automatically around elements and (unless UNSAFE is also specified) reporting an error if any element has both characters and elements as content.

DATA_INDENT
A numeric value or white space; if this parameter is present, it represents the indent step for elements in data mode (it will be ignored when not in data mode). If it is white space it will be repeated for each level of indentation.

ENCODING
A character encoding to use for the output; currently this must be one of ‘utf-8’ or ‘us-ascii’. If present, it will be used for the underlying character encoding and as the default in the XML declaration. All character data should be passed as Unicode strings when an encoding is set.

CHECK_PRINT
A true or false value; if this parameter is present and its value is true, all prints to the underlying output will be checked for success. Failures will cause a croak rather than being ignored.

end()
Finish creating an XML document. This method will check that the document has exactly one document element, and that all start tags are closed: $writer->end(); If OUTPUT as been set to self, end() will return the generated document as well.

xmlDecl([$encoding, $standalone])
Add an XML declaration to the beginning of an XML document. The version will always be 1.0. If you provide a non-null encoding or standalone argument, its value will appear in the declaration (any non-null value for standalone except ’no’ will automatically be converted to ‘yes’). If not given here, the encoding will be taken from the ENCODING argument. Pass the empty string to suppress this behaviour. $writer->xmlDecl(“UTF-8”);

doctype($name, [$publicId, $systemId])
Add a DOCTYPE declaration to an XML document. The declaration must appear before the beginning of the root element. If you provide a publicId, you must provide a systemId as well, but you may provide just a system ID by passing ‘undef’ for the publicId. $writer->doctype(“html”);

comment($text)
Add a comment to an XML document. If the comment appears outside the document element (either before the first start tag or after the last end tag), the module will add a carriage return after it to improve readability. In data mode, comments will be treated as empty tags: $writer->comment(“This is a comment”);

pi($target [, $data])
Add a processing instruction to an XML document: $writer->pi(xml-stylesheet, href=“style.css” type=“text/css”); If the processing instruction appears outside the document element (either before the first start tag or after the last end tag), the module will add a carriage return after it to improve readability. The $target argument must be a single XML name. If you provide the $data argument, the module will insert its contents following the $target argument, separated by a single space.

startTag($name [, $aname1 => $value1, …])
Add a start tag to an XML document. Any arguments after the element name are assumed to be name/value pairs for attributes: the module will escape all ‘&’, ‘<’, ‘>’, and ‘”’ characters in the attribute values using the predefined XML entities: $writer->startTag(doc, version => 1.0, status => draft, topic => AT&T); All start tags must eventually have matching end tags.

emptyTag($name [, $aname1 => $value1, …])
Add an empty tag to an XML document. Any arguments after the element name are assumed to be name/value pairs for attributes (see startTag() for details): $writer->emptyTag(img, src => portrait.jpg, alt => Portrait of Emma.);

endTag([$name])
Add an end tag to an XML document. The end tag must match the closest open start tag, and there must be a matching and properly-nested end tag for every start tag: $writer->endTag(doc); If the $name argument is omitted, then the module will automatically supply the name of the currently open element: $writer->startTag(p); $writer->endTag();

dataElement($name, $data [, $aname1 => $value1, …])
Print an entire element containing only character data. This is equivalent to $writer->startTag($name [, $aname1 => $value1, …]); $writer->characters($data); $writer->endTag($name);

characters($data)
Add character data to an XML document. All ‘<’, ‘>’, and ‘&’ characters in the $data argument will automatically be escaped using the predefined XML entities: $writer->characters(“Here is the formula: “); $writer->characters(“a < 100 && a > 5”); You may invoke this method only within the document element (i.e. after the first start tag and before the last end tag). In data mode, you must not use this method to add whitespace between elements.

raw($data)
Print data completely unquoted and unchecked to the XML document. For example raw(<) will print a literal < character. This necessarily bypasses all well-formedness checking, and is therefore only available in unsafe mode. This can sometimes be useful for printing entities which are defined for your XML format but the module doesn’t know about, for example   for XHTML.

cdata($data)
As characters() but writes the data quoted in a CDATA section, that is, between <![CDATA[ and ]]>. If the data to be written itself contains ]]>, it will be written as several consecutive CDATA sections.

cdataElement($name, $data [, $aname1 => $value1, …])
As dataElement() but the element content is written as one or more CDATA sections (see cdata()).

setOutput($output)
Set the current output destination, as in the OUTPUT parameter for the constructor.

getOutput()
Return the current output destination, as in the OUTPUT parameter for the constructor.

setDataMode($mode)
Enable or disable data mode, as in the DATA_MODE parameter for the constructor.

getDataMode()
Return the current data mode, as in the DATA_MODE parameter for the constructor.

setDataIndent($step)
Set the indent step for data mode, as in the DATA_INDENT parameter for the constructor.

getDataIndent()
Return the indent step for data mode, as in the DATA_INDENT parameter for the constructor.

Querying XML

in_element($name)
Return a true value if the most recent open element matches $name: if ($writer->in_element(dl)) { $writer->startTag(dt); } else { $writer->startTag(li); }

within_element($name)
Return a true value if any open element matches $name: if ($writer->within_element(body)) { $writer->startTag(h1); } else { $writer->startTag(title); }

current_element()
Return the name of the currently open element: my $name = $writer->current_element(); This is the equivalent of my $name = $writer->ancestor(0);

ancestor($n)
Return the name of the nth ancestor, where $n=0 for the current open element.

Additional Namespace Support

As of 0.510, these methods may be used while writing a document.

addPrefix($uri, $prefix)
Add a preferred mapping between a Namespace URI and a prefix. See also the PREFIX_MAP constructor parameter. To set the default namespace, omit the $prefix parameter or set it to ‘’.

removePrefix($uri)
Remove a preferred mapping between a Namespace URI and a prefix.

forceNSDecl($uri)
Indicate that a namespace declaration for this URI should be included with the next element to be started.

ERROR REPORTING

With the default settings, the XML::Writer module can detect several basic XML well-formedness errors:

  • Lack of a (top-level) document element, or multiple document elements.

  • Unclosed start tags.

  • Misplaced delimiters in the contents of processing instructions or comments.

  • Misplaced or duplicate XML declaration(s).

  • Misplaced or duplicate DOCTYPE declaration(s).

  • Mismatch between the document type name in the DOCTYPE declaration and the name of the document element.

  • Mismatched start and end tags.

  • Attempts to insert character data outside the document element.

  • Duplicate attributes with the same name.

During Namespace processing, the module can detect the following additional errors:

  • Attempts to use PI targets or element or attribute names containing a colon.

  • Attempts to use attributes with names beginning xmlns.

To ensure full error detection, a program must also invoke the end method when it has finished writing a document:

$writer->startTag(greeting); $writer->characters(“Hello, world!”); $writer->endTag(greeting); $writer->end();

This error reporting can catch many hidden bugs in Perl programs that create XML documents; however, if necessary, it can be turned off by providing an UNSAFE parameter:

my $writer = XML::Writer->new(OUTPUT => $output, UNSAFE => 1);

PRINTING OUTPUT

If OUTPUT has been set to self and the object has been called in a string context, it’ll return the xml document.

to_string
If OUTPUT has been set to self, calls an implicit end() on the document and prints it. Dies if OUTPUT has been set to anything else.

AUTHOR

David Megginson <[email protected]>

COPYRIGHT AND LICENSE

Copyright (c) 1999 by Megginson Technologies.

Copyright (c) 2003 Ed Avis <[email protected]>

Copyright (c) 2004-2010 Joseph Walton <[email protected]>

Redistribution and use in source and compiled forms, with or without modification, are permitted under any circumstances. No warranty.

SEE ALSO

XML::Parser

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1447 - Linux cli command malloc_stats

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command malloc_stats and provides detailed information about the command malloc_stats, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the malloc_stats.

NAME 🖥️ malloc_stats 🖥️

print memory allocation statistics

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <malloc.h>
void malloc_stats(void);

DESCRIPTION

The malloc_stats() function prints (on standard error) statistics about memory allocated by malloc(3) and related functions. For each arena (allocation area), this function prints the total amount of memory allocated and the total number of bytes consumed by in-use allocations. (These two values correspond to the arena and uordblks fields retrieved by mallinfo(3).) In addition, the function prints the sum of these two statistics for all arenas, and the maximum number of blocks and bytes that were ever simultaneously allocated using mmap(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

malloc_stats()

Thread safetyMT-Safe

STANDARDS

GNU.

HISTORY

glibc 2.0.

NOTES

More detailed information about memory allocations in the main arena can be obtained using mallinfo(3).

SEE ALSO

mmap(2), mallinfo(3), malloc(3), malloc_info(3), mallopt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1448 - Linux cli command Moose_Cookbookpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbookpm and provides detailed information about the command Moose_Cookbookpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbookpm.

NAME 🖥️ Moose_Cookbookpm 🖥️

How to cook a Moose

VERSION

version 2.2207

DESCRIPTION

The Moose cookbook is a series of recipes showing various Moose features. Most recipes present some code demonstrating some feature, and then explain the details of the code.

You should probably read the Moose::Manual first. The manual explains Moose concepts without being too code-heavy.

RECIPES

Basic Moose

These recipes will give you a good overview of Moose’s capabilities, starting with simple attribute declaration, and moving on to more powerful features like laziness, types, type coercion, method modifiers, and more.

Moose::Cookbook::Basics::Point_AttributesAndSubclassing
A simple Moose-based class. Demonstrates basic Moose attributes and subclassing.

Moose::Cookbook::Basics::BankAccount_MethodModifiersAndSubclassing
A slightly more complex Moose class. Demonstrates using a method modifier in a subclass.

Moose::Cookbook::Basics::BinaryTree_AttributeFeatures
Demonstrates several attribute features, including types, weak references, predicates (“does this object have a foo?”), defaults, laziness, and triggers.

Moose::Cookbook::Basics::Company_Subtypes
Introduces the creation and use of custom types, a BUILD method, and the use of override in a subclass. This recipe also shows how to model a set of classes that could be used to model companies, people, employees, etc.

Moose::Cookbook::Basics::HTTP_SubtypesAndCoercion
This recipe covers more subtype creation, including the use of type coercions.

Moose::Cookbook::Basics::Immutable
Making a class immutable greatly increases the speed of accessors and object construction.

Moose::Cookbook::Basics::BinaryTree_BuilderAndLazyBuild - Builder methods and lazy_build
The builder feature provides an inheritable and role-composable way to provide a default attribute value.

Moose::Cookbook::Basics::Genome_OverloadingSubtypesAndCoercion
Demonstrates using operator overloading, coercion, and subtypes to model how eye color is determined during reproduction.

Moose::Cookbook::Basics::Person_BUILDARGSAndBUILD
This recipe demonstrates the use of BUILDARGS and BUILD to hook into object construction.

Moose::Cookbook::Basics::DateTime_ExtendingNonMooseParent
In this recipe, we make a Moose-based subclass of DateTime, a module which does not use Moose itself.

Moose::Cookbook::Basics::Document_AugmentAndInner
Demonstrates the use of augment method modifiers, a way of turning the usual method overriding style “inside-out”.

Moose Roles

These recipes will show you how to use Moose roles.

Moose::Cookbook::Roles::Comparable_CodeReuse
Demonstrates roles, which are also sometimes known as traits or mix-ins. Roles provide a method of code re-use which is orthogonal to subclassing.

Moose::Cookbook::Roles::Restartable_AdvancedComposition
Sometimes you just want to include part of a role in your class. Sometimes you want the whole role but one of its methods conflicts with one in your class. With method exclusion and aliasing, you can work around these problems.

Moose::Cookbook::Roles::ApplicationToInstance
In this recipe, we apply a role to an existing object instance.

Meta Moose

These recipes show you how to write your own meta classes, which lets you extend the object system provided by Moose.

Moose::Cookbook::Meta::WhyMeta
If you’re wondering what all this “meta” stuff is, and why you should care about it, read this “recipe”.

Moose::Cookbook::Meta::Labeled_AttributeTrait
Extending Moose’s attribute metaclass is a great way to add functionality. However, attributes can only have one metaclass. Applying roles to the attribute metaclass lets you provide composable attribute functionality.

Moose::Cookbook::Meta::Table_MetaclassTrait
This recipe takes the class metaclass we saw in the previous recipe and reimplements it as a metaclass trait.

Moose::Cookbook::Meta::PrivateOrPublic_MethodMetaclass
This recipe shows a custom method metaclass that implements making a method private.

Moose::Cookbook::Meta::GlobRef_InstanceMetaclass
This recipe shows an example of how you create your own meta-instance class. The meta-instance determines the internal structure of object instances and provide access to attribute slots. In this particular instance, we use a blessed glob reference as the instance instead of a blessed hash reference.

Hooking into immutabilization (TODO)
Moose has a feature known as “immutabilization”. By calling _ _PACKAGE_ _->meta()->make_immutable() after defining your class (attributes, roles, etc), you tell Moose to optimize things like object creation, attribute access, and so on. If you are creating your own metaclasses, you may need to hook into the immutabilization system. This cuts across a number of spots, including the metaclass class, meta method classes, and possibly the meta-instance class as well. This recipe shows you how to write extensions which immutabilize properly.

Extending Moose

These recipes cover some more ways to extend Moose, and will be useful if you plan to write your own MooseX module.

Moose::Cookbook::Extending::ExtensionOverview
There are quite a few ways to extend Moose. This recipe provides an overview of each method, and provides recommendations for when each is appropriate.

Moose::Cookbook::Extending::Debugging_BaseClassRole
Many base object class extensions can be implemented as roles. This example shows how to provide a base object class debugging role that is applied to any class that uses a notional MooseX::Debugging module.

Moose::Cookbook::Extending::Mooseish_MooseSugar
This recipe shows how to provide a replacement for Moose.pm. You may want to do this as part of the API for a MooseX module, especially if you want to default to a new metaclass class or base object class.

SNACKS

Moose::Cookbook::Snack::Keywords

Moose::Cookbook::Snack::Types

Legacy Recipes

These cover topics that are no longer considered best practice. We’ve kept them in case in you encounter these usages in the wild.

Moose::Cookbook::Legacy::Labeled_AttributeMetaclass

Moose::Cookbook::Legacy::Table_ClassMetaclass

Moose::Cookbook::Legacy::Debugging_BaseClassReplacement

SEE ALSO

<http://www.gsph.com/index.php?Lang=En&ID=291>

AUTHORS

Stevan Little <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1449 - Linux cli command static_assert

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command static_assert and provides detailed information about the command static_assert, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the static_assert.

NAME 🖥️ static_assert 🖥️

fail compilation if assertion is false

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <assert.h>
void static_assert(scalar constant-expression, const char *msg);
/* Since C23: */
void static_assert(scalar constant-expression);

DESCRIPTION

This macro is similar to assert(3), but it works at compile time, generating a compilation error (with an optional message) when the input is false (i.e., compares equal to zero).

If the input is nonzero, no code is emitted.

msg must be a string literal. Since C23, this argument is optional.

There’s a keyword, _Static_assert(), that behaves identically, and can be used without including <assert.h>.

RETURN VALUE

No value is returned.

VERSIONS

In C11, the second argument (msg) was mandatory; since C23, it can be omitted.

STANDARDS

C11 and later.

EXAMPLES

static_assert() can’t be used in some places, like for example at global scope. For that, a macro must_be() can be written in terms of static_assert(). The following program uses the macro to get the size of an array safely.

#include <assert.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
 * This macro behaves like static_assert(), failing to
 * compile if its argument is not true.  However, it always
 * returns 0, which allows using it everywhere an expression
 * can be used.
 */
#define must_be(e)                                        \
(                                                         \
    0 * (int) sizeof(                                     \
        struct {                                          \
            static_assert(e);                             \
            int  ISO_C_forbids_a_struct_with_no_members;  \
        }                                                 \
    )                                                     \
)
#define is_same_type(a, b)  \
    __builtin_types_compatible_p(typeof(a), typeof(b))
#define is_array(arr)       (!is_same_type((arr), &*(arr)))
#define must_be_array(arr)  must_be(is_array(arr))
#define sizeof_array(arr)   (sizeof(arr) + must_be_array(arr))
#define nitems(arr)         (sizeof((arr)) / sizeof((arr)[0]) \
                             + must_be_array(arr))
int     foo[10];
int8_t  bar[sizeof_array(foo)];
int
main(void)
{
    for (size_t i = 0; i < nitems(foo); i++) {
        foo[i] = i;
    }
    memcpy(bar, foo, sizeof_array(bar));
    for (size_t i = 0; i < nitems(bar); i++) {
        printf("%d,", bar[i]);
    }
    exit(EXIT_SUCCESS);
}

SEE ALSO

assert(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1450 - Linux cli command X11_Protocol_Ext_SHAPEpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command X11_Protocol_Ext_SHAPEpm and provides detailed information about the command X11_Protocol_Ext_SHAPEpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the X11_Protocol_Ext_SHAPEpm.

NAME 🖥️ X11_Protocol_Ext_SHAPEpm 🖥️

Perl module for the X11 Protocol Nonrectangular Window Shape Extension

SYNOPSIS

use X11::Protocol; $x = X11::Protocol->new($ENV{DISPLAY}); $x->init_extension(SHAPE) or die;

DESCRIPTION

This module is used by the X11::Protocol module to participate in the shaped window extension to the X protocol, allowing windows to be of any shape, not just rectangles.

SYMBOLIC CONSTANTS

This extension adds the constant types ‘ShapeKind’ and ‘ShapeOp’, with values as defined in the standard.

EVENTS

This extension adds the event type ‘ShapeNotify’, with values as specified in the standard. This event is selected using the ShapeSelectInput() request.

REQUESTS

This extension adds several requests, called as shown below:

$x->ShapeQueryVersion => ($major, $minor) $x->ShapeRectangles($dest, $destKind, $op, $xOff, $yOff, $ordering, @rectangles) $x->ShapeMask($dest, $destKind, $op, $xOff, $yOff, $source) $x->ShapeCombine($dest, $destKind, $op, $xOff, $yOff, $source, $sourceKind) $x->ShapeOffset($dest, $destKind, $xOff, $yOff) $x->ShapeQueryExtents($dest) => ($boundingShaped, $clipShaped, ($xBoundingShape, $yBoundingShape, $widthBoundingShape, $heightBoundingShape) ($xClipShape, $yClipShape, $widthClipShape, $heightClipShape)) $x->ShapeSelectInput($window, $enable) $x->ShapeInputSelected($window) => $enable $x->ShapeGetRectangles($window, $kind) => ($ordering, [$x, $y, $width, $height], …)

AUTHOR

Stephen McCamant <[email protected]>.

SEE ALSO

perl (1), X11::Protocol, Nonrectangular Window Shape Extension (X Consortium Standard).

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1451 - Linux cli command locale_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command locale_ttype and provides detailed information about the command locale_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the locale_ttype.

NAME 🖥️ locale_ttype 🖥️

locale object

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <locale.h>
typedef /* ... */ locale_t;

DESCRIPTION

locale_t is a type used for storing a locale object.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2008.

NOTES

The following headers also provide this type: <ctype.h>, <langinfo.h>, <monetary.h>, <string.h>, <strings.h>, <time.h>, <wchar.h>, <wctype.h>.

SEE ALSO

duplocale(3), freelocale(3), newlocale(3), setlocale(3), uselocale(3), locale(5), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1452 - Linux cli command pmap_set

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pmap_set and provides detailed information about the command pmap_set, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pmap_set.

NAME 🖥️ pmap_set 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1453 - Linux cli command WWW_Mechanize_Imagepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command WWW_Mechanize_Imagepm and provides detailed information about the command WWW_Mechanize_Imagepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the WWW_Mechanize_Imagepm.

NAME 🖥️ WWW_Mechanize_Imagepm 🖥️

Image object for WWW::Mechanize

VERSION

version 2.18

SYNOPSIS

Image object to encapsulate all the stuff that Mech needs

Constructor

new()

Creates and returns a new WWW::Mechanize::Image object.

my $image = WWW::Mechanize::Image->new( { url => $url, base => $base, tag => $tag, name => $name, # From the INPUT tag height => $height, # optional width => $width, # optional alt => $alt, # optional attrs => $attr_ref, # optional } );

Accessors

$image->url()

Image URL from the src attribute of the source tag.

May be undef if source tag has no src attribute.

$image->base()

Base URL to which the links are relative.

$image->name()

Name for the field from the NAME attribute, if any.

$image->tag()

Tag name (either “image” or “input”)

$image->height()

Image height

$image->width()

Image width

$image->alt()

ALT attribute from the source tag, if any.

$image->attrs()

Hash ref of all the attributes and attribute values in the tag.

$image->URI()

Returns the URL as a URI::URL object.

$image->url_abs()

Returns the URL as an absolute URL string.

SEE ALSO

WWW::Mechanize and WWW::Mechanize::Link

AUTHOR

Andy Lester <andy at petdance.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2004 by Andy Lester.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1454 - Linux cli command XML_DOM_NodeListpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_DOM_NodeListpm and provides detailed information about the command XML_DOM_NodeListpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_DOM_NodeListpm.

NAME 🖥️ XML_DOM_NodeListpm 🖥️

A node list as used by XML::DOM

DESCRIPTION

The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented.

The items in the NodeList are accessible via an integral index, starting from 0.

Although the DOM spec states that all NodeLists are live in that they always reflect changes to the DOM tree, the NodeList returned by getElementsByTagName is not live in this implementation. See CAVEATS for details.

METHODS

item (index)
Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns undef.

getLength
The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.

Additional methods not in the DOM Spec

dispose
Removes all circular references in this NodeList and its descendants so the objects can be claimed for garbage collection. The objects should not be used afterwards.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1455 - Linux cli command getentropy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getentropy and provides detailed information about the command getentropy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getentropy.

NAME 🖥️ getentropy 🖥️

fill a buffer with random bytes

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
int getentropy(void buffer[.length], size_t length);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getentropy():

    _DEFAULT_SOURCE

DESCRIPTION

The getentropy() function writes length bytes of high-quality random data to the buffer starting at the location pointed to by buffer. The maximum permitted value for the length argument is 256.

A successful call to getentropy() always provides the requested number of bytes of entropy.

RETURN VALUE

On success, this function returns zero. On error, -1 is returned, and errno is set to indicate the error.

ERRORS

EFAULT
Part or all of the buffer specified by buffer and length is not in valid addressable memory.

EIO
length is greater than 256.

EIO
An unspecified error occurred while trying to overwrite buffer with random data.

ENOSYS
This kernel version does not implement the getrandom(2) system call required to implement this function.

STANDARDS

None.

HISTORY

glibc 2.25. OpenBSD.

NOTES

The getentropy() function is implemented using getrandom(2).

Whereas the glibc wrapper makes getrandom(2) a cancelation point, getentropy() is not a cancelation point.

getentropy() is also declared in <sys/random.h>. (No feature test macro need be defined to obtain the declaration from that header file.)

A call to getentropy() may block if the system has just booted and the kernel has not yet collected enough randomness to initialize the entropy pool. In this case, getentropy() will keep blocking even if a signal is handled, and will return only once the entropy pool has been initialized.

SEE ALSO

getrandom(2), urandom(4), random(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1456 - Linux cli command pthread_mutexattr_setpshared

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_mutexattr_setpshared and provides detailed information about the command pthread_mutexattr_setpshared, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_mutexattr_setpshared.

NAME 🖥️ pthread_mutexattr_setpshared 🖥️

get/set process-shared mutex attribute

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_mutexattr_getpshared(
 const pthread_mutexattr_t *restrict attr,
 int *restrict pshared);
int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr,
 int pshared);

DESCRIPTION

These functions get and set the process-shared attribute in a mutex attributes object. This attribute must be appropriately set to ensure correct, efficient operation of a mutex created using this attributes object.

The process-shared attribute can have one of the following values:

PTHREAD_PROCESS_PRIVATE
Mutexes created with this attributes object are to be shared only among threads in the same process that initialized the mutex. This is the default value for the process-shared mutex attribute.

PTHREAD_PROCESS_SHARED
Mutexes created with this attributes object can be shared between any threads that have access to the memory containing the object, including threads in different processes.

pthread_mutexattr_getpshared() places the value of the process-shared attribute of the mutex attributes object referred to by attr in the location pointed to by pshared.

pthread_mutexattr_setpshared() sets the value of the process-shared attribute of the mutex attributes object referred to by attr to the value specified in pshared.

If attr does not refer to an initialized mutex attributes object, the behavior is undefined.

RETURN VALUE

On success, these functions return 0. On error, they return a positive error number.

ERRORS

pthread_mutexattr_setpshared() can fail with the following errors:

EINVAL
The value specified in pshared is invalid.

ENOTSUP
pshared is PTHREAD_PROCESS_SHARED but the implementation does not support process-shared mutexes.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

SEE ALSO

pthread_mutexattr_init(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1457 - Linux cli command fnmatch

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fnmatch and provides detailed information about the command fnmatch, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fnmatch.

NAME 🖥️ fnmatch 🖥️

match filename or pathname

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <fnmatch.h>
int fnmatch(const char *pattern, const char *string, int flags);

DESCRIPTION

The fnmatch() function checks whether the string argument matches the pattern argument, which is a shell wildcard pattern (see glob(7)).

The flags argument modifies the behavior; it is the bitwise OR of zero or more of the following flags:

FNM_NOESCAPE
If this flag is set, treat backslash as an ordinary character, instead of an escape character.

FNM_PATHNAME
If this flag is set, match a slash in string only with a slash in pattern and not by an asterisk (*) or a question mark (?) metacharacter, nor by a bracket expression ([]) containing a slash.

FNM_PERIOD
If this flag is set, a leading period in string has to be matched exactly by a period in pattern. A period is considered to be leading if it is the first character in string, or if both FNM_PATHNAME is set and the period immediately follows a slash.

FNM_FILE_NAME
This is a GNU synonym for FNM_PATHNAME.

FNM_LEADING_DIR
If this flag (a GNU extension) is set, the pattern is considered to be matched if it matches an initial segment of string which is followed by a slash. This flag is mainly for the internal use of glibc and is implemented only in certain cases.

FNM_CASEFOLD
If this flag (a GNU extension) is set, the pattern is matched case-insensitively.

FNM_EXTMATCH
If this flag (a GNU extension) is set, extended patterns are supported, as introduced by ‘ksh’ and now supported by other shells. The extended format is as follows, with pattern-list being a ‘|’ separated list of patterns.

‘?(pattern-list)’
The pattern matches if zero or one occurrences of any of the patterns in the pattern-list match the input string.

‘*(pattern-list)’
The pattern matches if zero or more occurrences of any of the patterns in the pattern-list match the input string.

‘+(pattern-list)’
The pattern matches if one or more occurrences of any of the patterns in the pattern-list match the input string.

‘@(pattern-list)’
The pattern matches if exactly one occurrence of any of the patterns in the pattern-list match the input string.

‘!(pattern-list)’
The pattern matches if the input string cannot be matched with any of the patterns in the pattern-list.

RETURN VALUE

Zero if string matches pattern, FNM_NOMATCH if there is no match or another nonzero value if there is an error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fnmatch()

Thread safetyMT-Safe env locale

STANDARDS

fnmatch()
POSIX.1-2008.

FNM_FILE_NAME
FNM_LEADING_DIR
FNM_CASEFOLD
GNU.

HISTORY

fnmatch()
POSIX.1-2001, POSIX.2.

SEE ALSO

sh(1), glob(3), scandir(3), wordexp(3), glob(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1458 - Linux cli command Image_ExifTool_Kodakpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Kodakpm and provides detailed information about the command Image_ExifTool_Kodakpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Kodakpm.

NAME 🖥️ Image_ExifTool_Kodakpm 🖥️

Kodak EXIF maker notes and APP3 “Meta” tags

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret Kodak maker notes EXIF meta information.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

Image::MetaData::JPEG

<http://www.ozhiker.com/electronics/pjmt/jpeg_info/meta.html>

<http://www.cybercom.net/~dcoffin/dcraw/>

(…plus lots of testing with my daughter’s CX4200!)

SEE ALSO

“Kodak Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1459 - Linux cli command Net_DNS_RR_HTTPSpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_HTTPSpm and provides detailed information about the command Net_DNS_RR_HTTPSpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_HTTPSpm.

NAME 🖥️ Net_DNS_RR_HTTPSpm 🖥️

DNS HTTPS resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name HTTPS SvcPriority TargetName alpn=h3-29,h3-28,h3-27,h2 …);

DESCRIPTION

DNS HTTPS resource record

The HTTPS class is derived from, and inherits all properties of, the Net::DNS::RR::SVCB class.

Please see the Net::DNS::RR::SVCB documentation for details.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

COPYRIGHT

Copyright (c)2020 Dick Franks.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR Net::DNS::RR::SVCB

RFC9460 (9) <https://iana.org/go/rfc9460#section-9>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1460 - Linux cli command Package_Stash_PPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Package_Stash_PPpm and provides detailed information about the command Package_Stash_PPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Package_Stash_PPpm.

NAME 🖥️ Package_Stash_PPpm 🖥️

Pure perl implementation of the Package::Stash API

VERSION

version 0.40

SYNOPSIS

use Package::Stash;

DESCRIPTION

This is a backend for Package::Stash implemented in pure perl, for those without a compiler or who would like to use this inline in scripts.

BUGS

  • remove_symbol also replaces the associated typeglob This can cause unexpected behavior when doing manipulation at compile time - removing subroutines will still allow them to be called from within the package as subroutines (although they will not be available as methods). This can be considered a feature in some cases (this is how namespace::clean works, for instance), but should not be relied upon - use remove_glob directly if you want this behavior.

  • Some minor memory leaks The pure perl implementation has a couple minor memory leaks (see the TODO tests in t/20-leaks.t) that I’m having a hard time tracking down - these may be core perl bugs, it’s hard to tell.

SEE ALSO

  • Class::MOP::Package This module is a factoring out of code that used to live here

SUPPORT

Bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=Package-Stash> (or [email protected] <mailto:[email protected]>).

AUTHOR

Mostly copied from code from Class::MOP::Package, by Stevan Little and the Moose Cabal.

COPYRIGHT AND LICENSE

This software is copyright (c) 2022 by Jesse Luehrs.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1461 - Linux cli command pcap_datalink_val_to_namepcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_datalink_val_to_namepcap and provides detailed information about the command pcap_datalink_val_to_namepcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_datalink_val_to_namepcap.

NAME 🖥️ pcap_datalink_val_to_namepcap 🖥️

get a name or description for a link-layer header type value

SYNOPSIS

#include <pcap.h>
const char *pcap_datalink_val_to_name(int dlt);
const char *pcap_datalink_val_to_description(int dlt);
const char *pcap_datalink_val_to_description_or_dlt(int dlt);

DESCRIPTION

pcap_datalink_val_to_name() translates a link-layer header type value to the corresponding link-layer header type name, which is the DLT_ name for the link-layer header type value with the DLT_ removed. NULL is returned if the type value does not correspond to a known DLT_ value.

pcap_datalink_val_to_description() translates a link-layer header type value to a short description of that link-layer header type. NULL is returned if the type value does not correspond to a known DLT_ value.

pcap_datalink_val_to_description_or_dlt() translates a link-layer header type value to a short description of that link-layer header type just like pcap_datalink_val_to_description(). If the type value does not correspond to a known DLT_ value, the string “DLT n” is returned, where n is the value of the dlt argument.

BACKWARD COMPATIBILITY

The pcap_datalink_val_to_description_or_dlt() function first became available in libpcap release 1.9.1. In previous releases, pcap_datalink_val_to_description() would have to be called and, if it returned NULL, a default string would have to be constructed.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1462 - Linux cli command XtRemoveCallbacks

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtRemoveCallbacks and provides detailed information about the command XtRemoveCallbacks, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtRemoveCallbacks.

NAME 🖥️ XtRemoveCallbacks 🖥️

add and remove callback procedures

SYNTAX

#include <X11/Intrinsic.h>

void XtAddCallback(Widget w, const char *callback_name, XtCallbackProc callback, XtPointer client_data);

void XtAddCallbacks(Widget w, const char *callback_name, XtCallbackList callbacks);

void XtRemoveCallback(Widget w, const char *callback_name, XtCallbackProc callback, XtPointer client_data);

void XtRemoveCallbacks(Widget w, const char *callback_name, XtCallbackList callbacks);

void XtRemoveAllCallbacks(Widget w, const char *callback_name);

ARGUMENTS

callback
Specifies the callback procedure.

callbacks
Specifies the null-terminated list of callback procedures and corresponding client data.

callback_name
Specifies the callback list to which the procedure is to be appended or deleted.

client_data
Specifies the argument that is to be passed to the specified procedure when it is invoked by XtCallbacks or NULL, or the client data to match on the registered callback procedures.

  1. Specifies the widget.

DESCRIPTION

The XtAddCallback function adds the specified callback procedure to the specified widget’s callback list.

The XtAddCallbacks add the specified list of callbacks to the specified widget’s callback list.

The XtRemoveCallback function removes a callback only if both the procedure and the client data match.

The XtRemoveCallbacks function removes the specified callback procedures from the specified widget’s callback list.

The XtRemoveAllCallbacks function removes all the callback procedures from the specified widget’s callback list.

SEE ALSO

XtCallCallbacks(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1463 - Linux cli command getfsspec

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getfsspec and provides detailed information about the command getfsspec, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getfsspec.

NAME 🖥️ getfsspec 🖥️

handle fstab entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <fstab.h>
int setfsent(void);
struct fstab *getfsent(void);
void endfsent(void);
struct fstab *getfsfile(const char *mount_point);
struct fstab *getfsspec(const char *special_file);

DESCRIPTION

These functions read from the file /etc/fstab. The struct fstab is defined by:

struct fstab {
    char       *fs_spec;       /* block device name */
    char       *fs_file;       /* mount point */
    char       *fs_vfstype;    /* filesystem type */
    char       *fs_mntops;     /* mount options */
    const char *fs_type;       /* rw/rq/ro/sw/xx option */
    int         fs_freq;       /* dump frequency, in days */
    int         fs_passno;     /* pass number on parallel dump */
};

Here the field fs_type contains (on a *BSD system) one of the five strings “rw”, “rq”, “ro”, “sw”, “xx” (read-write, read-write with quota, read-only, swap, ignore).

The function setfsent() opens the file when required and positions it at the first line.

The function getfsent() parses the next line from the file. (After opening it when required.)

The function endfsent() closes the file when required.

The function getfsspec() searches the file from the start and returns the first entry found for which the fs_spec field matches the special_file argument.

The function getfsfile() searches the file from the start and returns the first entry found for which the fs_file field matches the mount_point argument.

RETURN VALUE

Upon success, the functions getfsent(), getfsfile(), and getfsspec() return a pointer to a struct fstab, while setfsent() returns 1. Upon failure or end-of-file, these functions return NULL and 0, respectively.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

endfsent(), setfsent()

Thread safety

MT-Unsafe race:fsent

getfsent(), getfsspec(), getfsfile()

Thread safety

MT-Unsafe race:fsent locale

VERSIONS

Several operating systems have these functions, for example, *BSD, SunOS, Digital UNIX, AIX (which also has a getfstype()). HP-UX has functions of the same names, that however use a struct checklist instead of a struct fstab, and calls these functions obsolete, superseded by getmntent(3).

STANDARDS

None.

HISTORY

The getfsent() function appeared in 4.0BSD; the other four functions appeared in 4.3BSD.

NOTES

These functions are not thread-safe.

Since Linux allows mounting a block special device in several places, and since several devices can have the same mount point, where the last device with a given mount point is the interesting one, while getfsfile() and getfsspec() only return the first occurrence, these two functions are not suitable for use under Linux.

SEE ALSO

getmntent(3), fstab(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1464 - Linux cli command Moose_Cookbook_Meta_PrivateOrPublic_MethodMetaclasspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Meta_PrivateOrPublic_MethodMetaclasspm and provides detailed information about the command Moose_Cookbook_Meta_PrivateOrPublic_MethodMetaclasspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Meta_PrivateOrPublic_MethodMetaclasspm.

NAME 🖥️ Moose_Cookbook_Meta_PrivateOrPublic_MethodMetaclasspm 🖥️

A method metaclass for marking methods public or private

VERSION

version 2.2207

SYNOPSIS

package MyApp::Meta::Method::PrivateOrPublic; use Moose; use Moose::Util::TypeConstraints; extends Moose::Meta::Method; has _policy => ( is => ro, isa => enum( [ qw( public private ) ] ), default => public, init_arg => policy, ); sub new { my $class = shift; my %options = @_; my $self = $class->SUPER::wrap(%options); $self->{_policy} = $options{policy}; $self->_add_policy_wrapper; return $self; } sub _add_policy_wrapper { my $self = shift; return if $self->is_public; my $name = $self->name; my $package = $self->package_name; my $real_body = $self->body; my $body = sub { die “The $package:$name method is private” unless ( scalar caller() ) eq $package; goto &{$real_body}; }; $self->{body} = $body; } sub is_public { $_[0]->_policy eq public } sub is_private { $_[0]->_policy eq private } package MyApp::User; use Moose; has password => ( is => rw ); _ _PACKAGE_ _->meta()->add_method( _reset_password, MyApp::Meta::Method::PrivateOrPublic->new( name => _reset_password, package_name => _ _PACKAGE_ _, body => sub { $_[0]->password(reset) }, policy => private, ) );

DESCRIPTION

This example shows a custom method metaclass that models public versus private methods. If a method is defined as private, it adds a wrapper around the method which dies unless it is called from the class where it was defined.

The way the method is added to the class is rather ugly. If we wanted to make this a real feature, we’d probably want to add some sort of sugar to allow us to declare private methods, but that is beyond the scope of this recipe. See the Extending recipes for more on this topic.

The core of our custom class is the policy attribute, and _add_policy_wrapper method.

You’ll note that we have to explicitly set the policy attribute in our constructor:

$self->{_policy} = $options{policy};

That is necessary because Moose metaclasses do not use the meta API to create objects. Most Moose classes have a custom “inlined” constructor for speed.

In this particular case, our parent class’s constructor is the wrap method. We call that to build our object, but it does not include subclass-specific attributes.

The _add_policy_wrapper method is where the real work is done. If the method is private, we construct a wrapper around the real subroutine which checks that the caller matches the package in which the subroutine was created.

If they don’t match, it dies. If they do match, the real method is called. We use goto so that the wrapper does not show up in the call stack.

Finally, we replace the value of $self->{body}. This is another case where we have to do something a bit gross because Moose does not use Moose for its own implementation.

When we pass this method object to the metaclass’s add_method method, it will take the method body and make it available in the class.

Finally, when we retrieve these methods via the introspection API, we can call the is_public and is_private methods on them to get more information about the method.

SUMMARY

A custom method metaclass lets us add both behavior and meta-information to methods. Unfortunately, because the Perl interpreter does not provide easy hooks into method declaration, the API we have for adding these methods is not very pretty.

That can be improved with custom Moose-like sugar, or even by using a tool like Devel::Declare to create full-blown new keywords in Perl.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1465 - Linux cli command ts_fd

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ts_fd and provides detailed information about the command ts_fd, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ts_fd.

NAME 🖥️ ts_fd 🖥️

get the file descriptor to a touchscreen device

SYNOPSIS

#include <tslib.h>

int ts_fd(struct tsdev *);

DESCRIPTION

ts_fd() gets an open touchscreen device’ file descriptor.

RETURN VALUE

The file descriptor value is returned. struct tsdev is returned.

SEE ALSO

ts_setup(3), ts_close(3), ts_read(3), ts.conf(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1466 - Linux cli command lgammaf_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lgammaf_r and provides detailed information about the command lgammaf_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lgammaf_r.

NAME 🖥️ lgammaf_r 🖥️

log gamma function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double lgamma(double x);
float lgammaf(float x);
long double lgammal(long double x);
double lgamma_r(double x, int *signp);
float lgammaf_r(float x, int *signp);
long double lgammal_r(long double x, int *signp);
extern int signgam;

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

lgamma():
    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

lgammaf(), lgammal():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

lgamma_r(), lgammaf_r(), lgammal_r():

    /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

signgam:

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

For the definition of the Gamma function, see tgamma(3).

The lgamma(), lgammaf(), and lgammal() functions return the natural logarithm of the absolute value of the Gamma function. The sign of the Gamma function is returned in the external integer signgam declared in <math.h>. It is 1 when the Gamma function is positive or zero, -1 when it is negative.

Since using a constant location signgam is not thread-safe, the functions lgamma_r(), lgammaf_r(), and lgammal_r() have been introduced; they return the sign via the argument signp.

RETURN VALUE

On success, these functions return the natural logarithm of Gamma(x).

If x is a NaN, a NaN is returned.

If x is 1 or 2, +0 is returned.

If x is positive infinity or negative infinity, positive infinity is returned.

If x is a nonpositive integer, a pole error occurs, and the functions return +HUGE_VAL, +HUGE_VALF, or +HUGE_VALL, respectively.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the correct mathematical sign.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Pole error: x is a nonpositive integer
errno is set to ERANGE (but see BUGS). A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised.

Range error: result overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

STANDARDS

lgamma()
lgammaf()
lgammal()
C11, POSIX.1-2008.

signgam
POSIX.1-2008.

lgamma_r()
lgammaf_r()
lgammal_r()
None.

HISTORY

lgamma()
lgammaf()
lgammal()
C99, POSIX.1-2001.

signgam
POSIX.1-2001.

lgamma_r()
lgammaf_r()
lgammal_r()
None.

BUGS

In glibc 2.9 and earlier, when a pole error occurs, errno is set to EDOM; instead of the POSIX-mandated ERANGE. Since glibc 2.10, glibc does the right thing.

SEE ALSO

tgamma(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1467 - Linux cli command lgammal_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lgammal_r and provides detailed information about the command lgammal_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lgammal_r.

NAME 🖥️ lgammal_r 🖥️

log gamma function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double lgamma(double x);
float lgammaf(float x);
long double lgammal(long double x);
double lgamma_r(double x, int *signp);
float lgammaf_r(float x, int *signp);
long double lgammal_r(long double x, int *signp);
extern int signgam;

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

lgamma():
    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

lgammaf(), lgammal():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

lgamma_r(), lgammaf_r(), lgammal_r():

    /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

signgam:

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

For the definition of the Gamma function, see tgamma(3).

The lgamma(), lgammaf(), and lgammal() functions return the natural logarithm of the absolute value of the Gamma function. The sign of the Gamma function is returned in the external integer signgam declared in <math.h>. It is 1 when the Gamma function is positive or zero, -1 when it is negative.

Since using a constant location signgam is not thread-safe, the functions lgamma_r(), lgammaf_r(), and lgammal_r() have been introduced; they return the sign via the argument signp.

RETURN VALUE

On success, these functions return the natural logarithm of Gamma(x).

If x is a NaN, a NaN is returned.

If x is 1 or 2, +0 is returned.

If x is positive infinity or negative infinity, positive infinity is returned.

If x is a nonpositive integer, a pole error occurs, and the functions return +HUGE_VAL, +HUGE_VALF, or +HUGE_VALL, respectively.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the correct mathematical sign.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Pole error: x is a nonpositive integer
errno is set to ERANGE (but see BUGS). A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised.

Range error: result overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

STANDARDS

lgamma()
lgammaf()
lgammal()
C11, POSIX.1-2008.

signgam
POSIX.1-2008.

lgamma_r()
lgammaf_r()
lgammal_r()
None.

HISTORY

lgamma()
lgammaf()
lgammal()
C99, POSIX.1-2001.

signgam
POSIX.1-2001.

lgamma_r()
lgammaf_r()
lgammal_r()
None.

BUGS

In glibc 2.9 and earlier, when a pole error occurs, errno is set to EDOM; instead of the POSIX-mandated ERANGE. Since glibc 2.10, glibc does the right thing.

SEE ALSO

tgamma(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1468 - Linux cli command malloc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command malloc and provides detailed information about the command malloc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the malloc.

NAME 🖥️ malloc 🖥️

allocate and free dynamic memory

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
void *malloc(size_t size);
void free(void *_Nullable ptr);
void *calloc(size_t nmemb, size_t size);
void *realloc(void *_Nullable ptr, size_t size);
void *reallocarray(void *_Nullable ptr, size_t nmemb, size_t size);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

reallocarray():

    Since glibc 2.29:
        _DEFAULT_SOURCE
    glibc 2.28 and earlier:
        _GNU_SOURCE

DESCRIPTION

malloc()

The malloc() function allocates size bytes and returns a pointer to the allocated memory. The memory is not initialized. If size is 0, then malloc() returns a unique pointer value that can later be successfully passed to free(). (See “Nonportable behavior” for portability issues.)

free()

The free() function frees the memory space pointed to by ptr, which must have been returned by a previous call to malloc() or related functions. Otherwise, or if ptr has already been freed, undefined behavior occurs. If ptr is NULL, no operation is performed.

calloc()

The calloc() function allocates memory for an array of nmemb elements of size bytes each and returns a pointer to the allocated memory. The memory is set to zero. If nmemb or size is 0, then calloc() returns a unique pointer value that can later be successfully passed to free().

If the multiplication of nmemb and size would result in integer overflow, then calloc() returns an error. By contrast, an integer overflow would not be detected in the following call to malloc(), with the result that an incorrectly sized block of memory would be allocated:

malloc(nmemb * size);

realloc()

The realloc() function changes the size of the memory block pointed to by ptr to size bytes. The contents of the memory will be unchanged in the range from the start of the region up to the minimum of the old and new sizes. If the new size is larger than the old size, the added memory will not be initialized.

If ptr is NULL, then the call is equivalent to malloc(size), for all values of size.

If size is equal to zero, and ptr is not NULL, then the call is equivalent to free(ptr) (but see “Nonportable behavior” for portability issues).

Unless ptr is NULL, it must have been returned by an earlier call to malloc or related functions. If the area pointed to was moved, a free(ptr) is done.

reallocarray()

The reallocarray() function changes the size of (and possibly moves) the memory block pointed to by ptr to be large enough for an array of nmemb elements, each of which is size bytes. It is equivalent to the call

realloc(ptr, nmemb * size);

However, unlike that realloc() call, reallocarray() fails safely in the case where the multiplication would overflow. If such an overflow occurs, reallocarray() returns an error.

RETURN VALUE

The malloc(), calloc(), realloc(), and reallocarray() functions return a pointer to the allocated memory, which is suitably aligned for any type that fits into the requested size or less. On error, these functions return NULL and set errno. Attempting to allocate more than PTRDIFF_MAX bytes is considered an error, as an object that large could cause later pointer subtraction to overflow.

The free() function returns no value, and preserves errno.

The realloc() and reallocarray() functions return NULL if ptr is not NULL and the requested size is zero; this is not considered an error. (See “Nonportable behavior” for portability issues.) Otherwise, the returned pointer may be the same as ptr if the allocation was not moved (e.g., there was room to expand the allocation in-place), or different from ptr if the allocation was moved to a new address. If these functions fail, the original block is left untouched; it is not freed or moved.

ERRORS

calloc(), malloc(), realloc(), and reallocarray() can fail with the following error:

ENOMEM
Out of memory. Possibly, the application hit the RLIMIT_AS or RLIMIT_DATA limit described in getrlimit(2). Another reason could be that the number of mappings created by the caller process exceeded the limit specified by /proc/sys/vm/max_map_count.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

malloc(), free(), calloc(), realloc()

Thread safetyMT-Safe

STANDARDS

malloc()
free()
calloc()
realloc()
C11, POSIX.1-2008.

reallocarray()
None.

HISTORY

malloc()
free()
calloc()
realloc()
POSIX.1-2001, C89.

reallocarray()
glibc 2.26. OpenBSD 5.6, FreeBSD 11.0.

malloc() and related functions rejected sizes greater than PTRDIFF_MAX starting in glibc 2.30.

free() preserved errno starting in glibc 2.33.

NOTES

By default, Linux follows an optimistic memory allocation strategy. This means that when malloc() returns non-NULL there is no guarantee that the memory really is available. In case it turns out that the system is out of memory, one or more processes will be killed by the OOM killer. For more information, see the description of /proc/sys/vm/overcommit_memory and /proc/sys/vm/oom_adj in proc(5), and the Linux kernel source file Documentation/vm/overcommit-accounting.rst.

Normally, malloc() allocates memory from the heap, and adjusts the size of the heap as required, using sbrk(2). When allocating blocks of memory larger than MMAP_THRESHOLD bytes, the glibc malloc() implementation allocates the memory as a private anonymous mapping using mmap(2). MMAP_THRESHOLD is 128 kB by default, but is adjustable using mallopt(3). Prior to Linux 4.7 allocations performed using mmap(2) were unaffected by the RLIMIT_DATA resource limit; since Linux 4.7, this limit is also enforced for allocations performed using mmap(2).

To avoid corruption in multithreaded applications, mutexes are used internally to protect the memory-management data structures employed by these functions. In a multithreaded application in which threads simultaneously allocate and free memory, there could be contention for these mutexes. To scalably handle memory allocation in multithreaded applications, glibc creates additional memory allocation arenas if mutex contention is detected. Each arena is a large region of memory that is internally allocated by the system (using brk(2) or mmap(2)), and managed with its own mutexes.

If your program uses a private memory allocator, it should do so by replacing malloc(), free(), calloc(), and realloc(). The replacement functions must implement the documented glibc behaviors, including errno handling, size-zero allocations, and overflow checking; otherwise, other library routines may crash or operate incorrectly. For example, if the replacement free() does not preserve errno, then seemingly unrelated library routines may fail without having a valid reason in errno. Private memory allocators may also need to replace other glibc functions; see “Replacing malloc” in the glibc manual for details.

Crashes in memory allocators are almost always related to heap corruption, such as overflowing an allocated chunk or freeing the same pointer twice.

The malloc() implementation is tunable via environment variables; see mallopt(3) for details.

Nonportable behavior

The behavior of these functions when the requested size is zero is glibc specific; other implementations may return NULL without setting errno, and portable POSIX programs should tolerate such behavior. See realloc(3p).

POSIX requires memory allocators to set errno upon failure. However, the C standard does not require this, and applications portable to non-POSIX platforms should not assume this.

Portable programs should not use private memory allocators, as POSIX and the C standard do not allow replacement of malloc(), free(), calloc(), and realloc().

EXAMPLES

#include <err.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MALLOCARRAY(n, type)  ((type *) my_mallocarray(n, sizeof(type)))
#define MALLOC(type)          MALLOCARRAY(1, type)
static inline void *my_mallocarray(size_t nmemb, size_t size);
int
main(void)
{
    char  *p;
    p = MALLOCARRAY(32, char);
    if (p == NULL)
        err(EXIT_FAILURE, "malloc");
    strlcpy(p, "foo", 32);
    puts(p);
}
static inline void *
my_mallocarray(size_t nmemb, size_t size)
{
    return reallocarray(NULL, nmemb, size);
}

SEE ALSO

valgrind(1), brk(2), mmap(2), alloca(3), malloc_get_state(3), malloc_info(3), malloc_trim(3), malloc_usable_size(3), mallopt(3), mcheck(3), mtrace(3), posix_memalign(3)

For details of the GNU C library implementation, see .

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1469 - Linux cli command sigignore

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigignore and provides detailed information about the command sigignore, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigignore.

NAME 🖥️ sigignore 🖥️

System V signal API

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
typedef void (*sighandler_t)(int);
[[deprecated]] sighandler_t sigset(int sig, sighandler_t disp);
[[deprecated]] int sighold(int sig);
[[deprecated]] int sigrelse(int sig);
[[deprecated]] int sigignore(int sig);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sigset(), sighold(), sigrelse(), sigignore():

    _XOPEN_SOURCE >= 500

DESCRIPTION

These functions are provided in glibc as a compatibility interface for programs that make use of the historical System V signal API. This API is obsolete: new applications should use the POSIX signal API (sigaction(2), sigprocmask(2), etc.)

The sigset() function modifies the disposition of the signal sig. The disp argument can be the address of a signal handler function, or one of the following constants:

SIG_DFL
Reset the disposition of sig to the default.

SIG_IGN
Ignore sig.

SIG_HOLD
Add sig to the process’s signal mask, but leave the disposition of sig unchanged.

If disp specifies the address of a signal handler, then sig is added to the process’s signal mask during execution of the handler.

If disp was specified as a value other than SIG_HOLD, then sig is removed from the process’s signal mask.

The dispositions for SIGKILL and SIGSTOP cannot be changed.

The sighold() function adds sig to the calling process’s signal mask.

The sigrelse() function removes sig from the calling process’s signal mask.

The sigignore() function sets the disposition of sig to SIG_IGN.

RETURN VALUE

On success, sigset() returns SIG_HOLD if sig was blocked before the call, or the signal’s previous disposition if it was not blocked before the call. On error, sigset() returns -1, with errno set to indicate the error. (But see BUGS below.)

The sighold(), sigrelse(), and sigignore() functions return 0 on success; on error, these functions return -1 and set errno to indicate the error.

ERRORS

For sigset() see the ERRORS under sigaction(2) and sigprocmask(2).

For sighold() and sigrelse() see the ERRORS under sigprocmask(2).

For sigignore(), see the errors under sigaction(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sigset(), sighold(), sigrelse(), sigignore()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

sighandler_t
GNU. POSIX.1 uses the same type but without a typedef.

HISTORY

glibc 2.1. SVr4, POSIX.1-2001. POSIX.1-2008 marks these functions as obsolete, recommending the use of sigaction(2), sigprocmask(2), pthread_sigmask(3), and sigsuspend(2) instead.

NOTES

The sigset() function provides reliable signal handling semantics (as when calling sigaction(2) with sa_mask equal to 0).

On System V, the signal() function provides unreliable semantics (as when calling sigaction(2) with sa_mask equal to SA_RESETHAND | SA_NODEFER). On BSD, signal() provides reliable semantics. POSIX.1-2001 leaves these aspects of signal() unspecified. See signal(2) for further details.

In order to wait for a signal, BSD and System V both provided a function named sigpause(3), but this function has a different argument on the two systems. See sigpause(3) for details.

BUGS

Before glibc 2.2, sigset() did not unblock sig if disp was specified as a value other than SIG_HOLD.

Before glibc 2.5, sigset() does not correctly return the previous disposition of the signal in two cases. First, if disp is specified as SIG_HOLD, then a successful sigset() always returns SIG_HOLD. Instead, it should return the previous disposition of the signal (unless the signal was blocked, in which case SIG_HOLD should be returned). Second, if the signal is currently blocked, then the return value of a successful sigset() should be SIG_HOLD. Instead, the previous disposition of the signal is returned. These problems have been fixed since glibc 2.5.

SEE ALSO

kill(2), pause(2), sigaction(2), signal(2), sigprocmask(2), raise(3), sigpause(3), sigvec(3), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1470 - Linux cli command xdr_authunix_parms

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_authunix_parms and provides detailed information about the command xdr_authunix_parms, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_authunix_parms.

NAME 🖥️ xdr_authunix_parms 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1471 - Linux cli command XShapeCombineRegion

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XShapeCombineRegion and provides detailed information about the command XShapeCombineRegion, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XShapeCombineRegion.

NAME 🖥️ XShapeCombineRegion 🖥️

X nonrectangular shape functions

SYNTAX

#include <X11/extensions/shape.h>
Bool XShapeQueryExtension (
	Display *dpy,
	int *event_basep,
	int *error_basep);
Status XShapeQueryVersion (
	Display *dpy,
	int *major_versionp,
	int *minor_versionp);
void XShapeCombineRegion (
	Display *dpy,
	Window dest,
	int destKind,
	int xOff,
	int yOff,
	struct _XRegion *r,
	int op);
void XShapeCombineRectangles (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	XRectangle *rects,
	int n_rects,
	int op,
	int ordering);
void XShapeCombineMask (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	Pixmap src,
	int op);
void XShapeCombineShape (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	Pixmap src,
	int srcKind,
	int op);
void XShapeOffsetShape (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff);
Status XShapeQueryExtents (
	Display *dpy,
	Window window,
	int *bShaped,
	int *xbs,
	int *ybs,
	unsigned int *wbs,
	unsigned int *hbs,
	int *cShaped,
	int *xcs,
	int *ycs,
	unsigned int *wcs,
	unsigned int *hcs);
void XShapeSelectInput (
	Display *dpy,
	Window window,
	unsigned longmask);
unsigned long XShapeInputSelected (
	Display *dpy,
	Window window);
XRectangle *XShapeGetRectangles (
	Display *dpy,
	Window window,
	int kind,
	int *count,
	int *ordering);

STRUCTURES

typedef struct {
    int type;	/* of event */
    unsigned long serial;	/* # of last request processed by server */
    Bool send_event;	/* true if this came from a SendEvent request */
    Display *display;	/* Display the event was read from */
    Window window;	/* window of event */
    int kind;	/* ShapeBounding or ShapeClip */
    int x, y;	/* extents of new region */
    unsigned width, height;
    Time time;	/* server timestamp when region changed */
    Bool shaped;	/* true if the region exists */
} XShapeEvent;

DESCRIPTION

The X11 Nonrectangular Window Shape Extension adds nonrectangular windows to the X Window System.

PREDEFINED VALUES

Operations:

 ShapeSet   ShapeUnion   ShapeIntersect   ShapeSubtract   ShapeInvert 

Shape Kinds:

 ShapeBounding   ShapeClip 

Event defines:

 ShapeNotifyMask   ShapeNotify 

BUGS

This manual page needs a lot more work.

SEE ALSO

X11 Nonrectangular Window Shape Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1472 - Linux cli command htobe64

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command htobe64 and provides detailed information about the command htobe64, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the htobe64.

NAME 🖥️ htobe64 🖥️

convert values between host and big-/little-endian byte order

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <endian.h>
uint16_t htobe16(uint16_t host_16bits);
uint16_t htole16(uint16_t host_16bits);
uint16_t be16toh(uint16_t big_endian_16bits);
uint16_t le16toh(uint16_t little_endian_16bits);
uint32_t htobe32(uint32_t host_32bits);
uint32_t htole32(uint32_t host_32bits);
uint32_t be32toh(uint32_t big_endian_32bits);
uint32_t le32toh(uint32_t little_endian_32bits);
uint64_t htobe64(uint64_t host_64bits);
uint64_t htole64(uint64_t host_64bits);
uint64_t be64toh(uint64_t big_endian_64bits);
uint64_t le64toh(uint64_t little_endian_64bits);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

htobe16(), htole16(), be16toh(), le16toh(), htobe32(), htole32(), be32toh(), le32toh(), htobe64(), htole64(), be64toh(), le64toh():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    In glibc up to and including 2.19:
        _BSD_SOURCE

DESCRIPTION

These functions convert the byte encoding of integer values from the byte order that the current CPU (the “host”) uses, to and from little-endian and big-endian byte order.

The number, nn, in the name of each function indicates the size of integer handled by the function, either 16, 32, or 64 bits.

The functions with names of the form “htobenn” convert from host byte order to big-endian order.

The functions with names of the form “htolenn” convert from host byte order to little-endian order.

The functions with names of the form “benntoh” convert from big-endian order to host byte order.

The functions with names of the form “lenntoh” convert from little-endian order to host byte order.

VERSIONS

Similar functions are present on the BSDs, where the required header file is <sys/endian.h> instead of <endian.h>. Unfortunately, NetBSD, FreeBSD, and glibc haven’t followed the original OpenBSD naming convention for these functions, whereby the nn component always appears at the end of the function name (thus, for example, in NetBSD, FreeBSD, and glibc, the equivalent of OpenBSDs “betoh32” is “be32toh”).

STANDARDS

None.

HISTORY

glibc 2.9.

These functions are similar to the older byteorder(3) family of functions. For example, be32toh() is identical to ntohl().

The advantage of the byteorder(3) functions is that they are standard functions available on all UNIX systems. On the other hand, the fact that they were designed for use in the context of TCP/IP means that they lack the 64-bit and little-endian variants described in this page.

EXAMPLES

The program below display the results of converting an integer from host byte order to both little-endian and big-endian byte order. Since host byte order is either little-endian or big-endian, only one of these conversions will have an effect. When we run this program on a little-endian system such as x86-32, we see the following:

$ ./a.out
x.u32 = 0x44332211
htole32(x.u32) = 0x44332211
htobe32(x.u32) = 0x11223344

Program source

#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    union {
        uint32_t u32;
        uint8_t arr[4];
    } x;
    x.arr[0] = 0x11;	/* Lowest-address byte */
    x.arr[1] = 0x22;
    x.arr[2] = 0x33;
    x.arr[3] = 0x44;	/* Highest-address byte */
    printf("x.u32 = %#x

“, x.u32); printf(“htole32(x.u32) = %#x “, htole32(x.u32)); printf(“htobe32(x.u32) = %#x “, htobe32(x.u32)); exit(EXIT_SUCCESS); }

SEE ALSO

bswap(3), byteorder(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1473 - Linux cli command pcap_tstamp_type_val_to_descriptionpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_tstamp_type_val_to_descriptionpcap and provides detailed information about the command pcap_tstamp_type_val_to_descriptionpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_tstamp_type_val_to_descriptionpcap.

NAME 🖥️ pcap_tstamp_type_val_to_descriptionpcap 🖥️

get a name or description for a time stamp type value

SYNOPSIS

#include <pcap.h>
const char *pcap_tstamp_type_val_to_name(int tstamp_type);
const char *pcap_tstamp_type_val_to_description(int tstamp_type);

DESCRIPTION

pcap_tstamp_type_val_to_name() translates a time stamp type value to the corresponding time stamp type name. NULL is returned on failure.

pcap_tstamp_type_val_to_description() translates a time stamp type value to a short description of that time stamp type. NULL is returned on failure.

BACKWARD COMPATIBILITY

These functions became available in libpcap release 1.2.1.

SEE ALSO

pcap(3PCAP), pcap_tstamp_type_name_to_val(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1474 - Linux cli command File_MimeInfo_Cookbookpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command File_MimeInfo_Cookbookpm and provides detailed information about the command File_MimeInfo_Cookbookpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the File_MimeInfo_Cookbookpm.

NAME 🖥️ File_MimeInfo_Cookbookpm 🖥️

various code snippets

DESCRIPTION

Some code snippets for non-basic uses of the File::MimeInfo module:

Matching an extension
A file does not have to actually exist in order to get a mimetype for it. This means that the following will work: my $extension = *.txt; my $mimetype = mimetype( $extension );

Mimetyping an scalar
If you want to find the mimetype of a scalar value you need magic mimetyping; after all a scalar doesn’t have a filename or inode. What you need to do is to use IO::Scalar : use File::MimeInfo::Magic; use IO::Scalar; my $io_scalar = new IO::Scalar \data; my $mimetype = mimetype( $io_scalar ); In fact most other IO:: will work as long as they support the seek() and read() methods. Of course if you want really obscure things to happen you can always write your own IO object and feed it in there. Be aware that when using a filehandle like this you need to set the :utf8 binmode yourself if appropriate.

Mimetyping a filehandle
Regrettably for non-seekable filehandles like STDIN simply using an IO:: object will not work. You will need to buffer enough of the data for a proper mimetyping. For example you could mimetype data from STDIN like this: use File::MimeInfo::Magic; use IO::Scalar; my $data; read(STDIN, $data, $File::MimeInfo::Magic::max_buffer); my $io_scalar = new IO::Scalar \data; my $mimetype = mimetype( $io_scalar ); Be aware that when using a filehandle like this you need to set the :utf8 binmode yourself if appropriate.

Creating a new filename
Say you have a temporary file that you want to save with a more proper filename. use File::MimeInfo::Magic qw#mimetype extensions#; use File::Copy; my $tmpfile = /tmp/foo; my $mimetype = mimetype($tmpfile); my $extension = extensions($mimetype); my $newfile = untitled1; $newfile .= ..$extension if length $extension; move($tmpfile, $newfile);

Force the use of a certain database directory
Normally you just need to add the dir where your mime database lives to either the XDG_DATA_HOME or XDG_DATA_DIRS environment variables for it to be found. But in some rare cases you may want to by-pass this system all together. Try one of the following: @File::MimeInfo::DIRS = (/home/me/share/mime); eval use File::MimeInfo; die if $@; or: use File::MimeInfo; @File::MimeInfo::DIRS = (/home/me/share/mime); File::MimeInfo->rehash(); This can also be used for switching between databases at run time while leaving other XDG configuration stuff alone.

AUTHOR

Jaap Karssenberg <[email protected]> Maintained by Michiel Beijen <[email protected]>

COPYRIGHT

Copyright (c) 2005, 2012 Jaap G Karssenberg. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

File::MimeInfo

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1475 - Linux cli command Net_Netmaskpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Netmaskpm and provides detailed information about the command Net_Netmaskpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Netmaskpm.

NAME 🖥️ Net_Netmaskpm 🖥️

parse, manipulate and lookup IP network blocks

SYNOPSIS

use Net::Netmask; $block = Net::Netmask->safe_new(network block) $block = Net::Netmask->safe_new(network block, netmask) $block = Net::Netmask->new2(network block) $block = Net::Netmask->new2(network block, netmask) $block = Net::Netmask->new(network block) # Dont use in new code! $block = Net::Netmask->new(network block, netmask) # Dont use in new code! print $block; # a.b.c.d/bits or 1:2:3::4/bits print $block->base() print $block->mask() print $block->hostmask() print $block->bits() print $block->size() print $block->maxblock() print $block->broadcast() print $block->next() print $block->match($ip); print $block->nth(1, [$bitstep]); print $block->protocol(); if ($block->sameblock(“network block”)) … if ($block->cmpblocks(“network block”)) … $newblock = $block->nextblock([count]); for $ip ($block->enumerate([$bitstep])) { } for $zone ($block->inaddr()) { } my $table = {}; $block->storeNetblock([$table]) $block->deleteNetblock([$table]) @missingblocks = $block->cidrs2inverse(@blocks) $block = findNetblock(ip, [$table]) $block = findOuterNetblock(ip, [$table]) @blocks = findAllNetblock(ip, [$table]) if ($block->checkNetblock([$table]) … $block2 = $block1->findOuterNetblock([$table]) @blocks = dumpNetworkTable([$table]) @blocks = range2cidrlist($beginip, $endip); @blocks = cidrs2cidrs(@blocks_with_dups) @listofblocks = cidrs2contiglists(@blocks); @blocks = sort @blocks @blocks = sort_network_blocks(@blocks) @sorted_ip_addrs = sort_by_ip_address(@unsorted_ip_addrs)

DESCRIPTION

Net::Netmask parses and understands IPv4 and IPv6 CIDR blocks (see <https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing> for more information on CIDR blocks). It’s built with an object-oriented interface, with functions being methods that operate on a Net::Netmask object.

These methods provide nearly all types of information about a network block that you might want.

There are also functions to insert a network block into a table and then later lookup network blocks by IP address using that table. There are functions to turn a IP address range into a list of CIDR blocks. There are functions to turn a list of CIDR blocks into a list of IP addresses.

There is a function for sorting by text IP address.

All functions understand both IPv4 and IPv6. Matches, finds, etc, will always return false when an IPv4 address is matched against an IPv6 address.

IPv6 support was added in 1.9104.

CONSTRUCTING

Net::Netmask objects are created with an IP address and optionally a mask. There are many forms that are recognized:

‘216.240.32.0/24’
The preferred IPv4 form.

‘216.240.32.0:255.255.255.0’

‘216.240.32.0-255.255.255.0’

‘216.240.32.0’, ‘255.255.255.0’

‘216.240.32.0’, ‘0xffffff00’

‘216.240.32.0 - 216.240.32.255’

‘216.240.32.4’

A /32 block.

‘default’ or ‘any’
0.0.0.0/0 (the default route)

‘216.240.32.0#0.0.31.255’
A hostmask (as used by Cisco access-lists - that is, the hostmask is the bitwise inverse of a netmask).

‘2001:db8:1234:5678::/64’
The preferred IPv6 form.

‘2001:db8:1234:5678::9876’
A /128 block.

‘default6’ or ‘any6’
::/0 (the default route)

There are two constructor methods: new and safe_new (also known as new2).

safe_new differs from new in that it will return undef for invalid netmasks, while new will return a netmask object even if the constructor could not figure out what the network block should be.

With new, the error string can be found as $block->{‘ERROR’}. With safe_new the error can be found as Net::Netmask::errstr or $Net::Netmask::error.

IMPORTANT: You want to use safe_new or new2 (new2 is a synonym for safe_new) in new code!

As of version 2.000, the following abbreviated IPv4 netblocks are not accepted by default, but can be accepted with options.

‘216.240.32’
Always a /24 block.

‘216.240’
Always a /16 block.

‘140’
Always a /8 block.

‘216.240.32/24’

‘216.240/16’

To accept these, you can call the constructor with a shortnet option set to a true value. Example:

my $block = Net::Netmask->safe_new(“216.240/16”, shortnet => 1);

For compatibility with older codebases, it’s also possible to change the default to use the old behavior. To do this, you can set the $Net::Netmask::SHORTNET_DEFAULT variable to a true value. It is recommended that this be done by localizing the variable. Example:

local $Net::Netmask::SHORTNET_DEFAULT = 1 my $block = Net::Netmask->safe_new(“216.240/16”);

Please be aware that there are security implications to this as other Perl modules, system libraries, or utilities may not parse these addresses the same way. This is why the default was changed.

For instance:

perl -MNet::Netmask -E “say Net::Netmask->safe_new(“10.20”, shortnet => 1)”

Will print 10.2.0.0/16. However:

perl -MSocket -E “say inet_ntoa(inet_aton(10.20))”

Will often print 10.0.0.20 which is obviously very different, and if the Net::Netmask module was used to check an IP aggainst an ACL, and then another program was executed (that uses inet_aton(), for instance), the ACL processing might not match the connection.

Thus, it is advised to use this with caution.

METHODS

->desc()
Returns a description of the network block. Eg: 216.240.32.0/19 or 2001:db8:1234::/48. This is also available as overloaded stringification.

->base()
Returns base address of the network block as a string. Eg: 216.240.32.0. or 2001:db8:1234::/48. Base does not give an indication of the size of the network block.

->mask()
Returns the netmask as a string. Eg: 255.255.255.0 or ffff:ffff:ffff:ffff::

->hostmask()
Returns the host mask which is the opposite of the netmask. Eg: 0.0.0.255 or ::ffff:ffff:ffff:ffff.

->bits()
Returns the netmask as a number of bits in the network portion of the address for this block. Eg: 24.

->size()
Returns the number of IP addresses in a block. Eg: 256. For IPv6 addresses, this will be a Math::BigInt object.

->broadcast()
The blocks broadcast address. (The last IP address inside the block.) Eg: 192.168.1.0/24 => 192.168.1.255 or 2001:db8::/64 => 2001:db8::ffff:ffff:ffff:ffff

->next()
The first IP address following the block. (The IP address following the broadcast address.) Eg: 192.168.1.0/24 => 192.168.2.0 or 2001:db8:0:1::/64 => 2001:db8:0:2::/64

->first() & ->last()
Synonyms for ->base() and ->broadcast()

->protocol()
Added in version 1.9102. Returns the address family/protocol represented by the block. Either ‘IPv4’ or ‘IPv6’.

->match($ip)
Returns a true if the IP number $ip matches the given network. That is, a true value is returned if $ip is between base() and broadcast(). For example, if we have the network 192.168.1.0/24, then 192.168.0.255 => 0 192.168.1.0 => “0 " 192.168.1.1 => 1 … 192.168.1.255 => 255 $ip should be a dotted-quad (eg: 192.168.66.3) or an IPv6 address in standard notation (eg: 2001:db8::1). It just happens that the return value is the position within the block. Since zero is a legal position, the true string 0 is returned in it’s place. 0 is numerically zero though. When wanting to know the position inside the block, a good idiom is: $pos = $block->match($ip) or die; $pos += 0;

->maxblock()
Much of the time, it is not possible to determine the size of a network block just from it’s base address. For example, with the network block ‘216.240.32.0/27’, if you only had the ‘216.240.32.0’ portion you wouldn’t be able to tell for certain the size of the block. ‘216.240.32.0’ could be anything from a ‘/23’ to a ‘/32’. The maxblock() method gives the size of the largest block that the current block’s address would allow it to be. The size is given in bits. Eg: 23.

->enumerate([$bitstep)
Returns a list of all the IP addresses in the block. Be very careful not to use this function of large blocks. The IP addresses are returned as strings. Eg: ‘216.240.32.0’, ‘216.240.32.1’, … ‘216.240.32.255’. If the optional argument is given, step through the block in increments of a given network size. To step by 4, use a bitstep of 30 (as in a /30 network). Note that for IPv6, this will return failure if more than 1,000,000,000 addresses would be returned.

->nth($index, [$bitstep])
Returns the nth element of the array that enumerate would return if it were called. So, to get the first usable address in a block, use nth(1). To get the broadcast address, use nth(-1). To get the last usable address, use nth(-2).

->inaddr()
Returns an inline list of tuples. For IPv4: There is a tuple for each DNS zone name (at the /24 level) in the block. If the block is smaller than a /24, then the zone of the enclosing /24 is returned. Each tuple contains: the DNS zone name, the last component of the first IP address in the block in that zone, the last component of the last IP address in the block in that zone. Examples: the list returned for the block ‘216.240.32.0/23’ would be: ‘32.240.216.in-addr.arpa’, 0, 255, ‘33.240.216.in-addr.arpa’, 0, 255. The list returned for the block ‘216.240.32.64/27’ would be: ‘32.240.216.in-addr.arpa’, 64, 95. For IPv6: A list is returned with each DNS zone name at the shortest-prefix length possible. This is not returned as a tuple, but just a list of strings. Examples: the list returned for the block ‘2002::/16’ would be a one element list, containing just 2.0.0.2.ip6.arpa’. The list for ‘2002::/17’ would return a two element list containing ‘0.2.0.0.2.ip6.arpa’ and ‘1.2.0.0.2.ip6.arpa’.

->nextblock([$count])
Without a $count, return the next block of the same size after the current one. With a count, return the Nth block after the current one. A count of -1 returns the previous block. Undef will be returned if out of legal address space.

->sameblock($block)
Compares two blocks. The second block will be auto-converted from a string if it isn’t already a Net::Netmask object. Returns 1 if they are identical.

->cmpblocks($block)
Compares two blocks. The second block will be auto-converted from a string if it isn’t already a Net::Netmask object. Returns -1, 0, or 1 depending on which one has the lower base address or which one is larger if they have the same base address.

->contains($block)
Compares two blocks. The second block will be auto-converted from a string if it isn’t already a Net::Netmask object. Returns 1 if the second block fits inside the first block. Returns 0 otherwise.

->storeNetblock([$t])
Adds the current block to an table of network blocks. The table can be used to query which network block a given IP address is in. The optional argument allows there to be more than one table. By default, an internal table is used. If more than one table is needed, then supply a reference to a HASH to store the data in.

->deleteNetblock([$t])
Deletes the current block from a table of network blocks. The optional argument allows there to be more than one table. By default, an internal table is used. If more than one table is needed, then supply a reference to a HASH to store the data in.

->checkNetblock([$t])
Returns true of the netblock is already in the network table.

->tag($name [, $value])
Tag network blocks with your own data. The first argument is the name of your tag (hash key) and the second argument (if present) is the new value. The old value is returned.

->split($parts)
Splits a netmask into a number of sub netblocks. This number must be a base 2 number (2,4,8,16,etc.) and the number must not exceed the number of IPs within this netmask. For instance, Net::Netmask->safe_new( 10.0.0.0/24 )->split(2) is equivalent to ( Net::Netmask( 10.0.0.0/25), Net::Netmask( 10.0.0.128/25 ) )

METHOD/FUNCTION COMBOS

findOuterNetblock(ip, [$t])
Search the table of network blocks (created with storeNetBlock) to find if any of them contain the given IP address. The IP address can either be a string or a Net::Netmask object (method invocation). If more than one block in the table contains the IP address or block, the largest network block will be the one returned. The return value is either a Net::Netmask object or undef.

cidrs2inverse(block, @listOfBlocks)
Given a block and a list of blocks, cidrs2inverse() will return a list of blocks representing the IP addresses that are in the block but not in the list of blocks. It finds the gaps. The block will be auto-converted from a string if it isn’t already a Net::Netmask object. The list of blocks should be Net::Netmask objects. The return value is a list of Net::Netmask objects.

OVERLOADING

"”
Strinification is overloaded to be the ->desc() method.

cmp
Numerical and string comparisons have been overloaded to the ->cmpblocks() method. This allows blocks to be sorted without specifying a sort function.

FUNCTIONS

sort_by_ip_address
This function is included in Net::Netmask simply because there doesn’t seem to be a better place to put it on CPAN. It turns out that there is one method for sorting dotted-quads (a.b.c.d) that is faster than all the rest. This is that way. Use it as sort_by_ip_address(@list_of_ips). That was the theory anyway. Someone sent a faster version … This method also will sort IPv6 addresses, but is not performance optimized. It is correct, however.

sort_network_blocks
This function is a function to sort Net::Netmask objects. It’s faster than the simpler sort @blocks that also works.

findNetblock(ip, [$t])
Search the table of network blocks (created with storeNetBlock) to find if any of them contain the given IP address. The IP address is expected to be a string. If more than one block in the table contains the IP address, the smallest network block will be the one returned. The return value is either a Net::Netmask object or undef.

findAllNetblock(ip, [$t])
Search the table of network blocks (created with storeNetBlock) to find if any of them contain the given IP address. The IP address is expected to be a string. All network blocks in the table that contain the IP address will be returned. The return value is a list of Net::Netmask objects.

dumpNetworkTable([$t])
Returns a list of the networks in a network table (as created by ->storeNetblock()).

range2cidrlist($startip, $endip)
Given a range of IP addresses, return a list of blocks that span that range. For example, range2cidrlist(‘216.240.32.128’, ‘216.240.36.127’), will return a list of Net::Netmask objects that correspond to: 216.240.32.128/25 216.240.33.0/24 216.240.34.0/23 216.240.36.0/25

cidrs2contiglists(@listOfBlocks)
cidrs2contiglists will rearrange a list of Net::Netmask objects such that contiguous sets are in sublists and each sublist is discontiguous with the next. For example, given a list of Net::Netmask objects corresponding to the following blocks: 216.240.32.128/25 216.240.33.0/24 216.240.36.0/25 cidrs2contiglists will return a list with two sublists: 216.240.32.128/25 216.240.33.0/24 216.240.36.0/25 Overlapping blocks will be placed in the same sublist.

cidrs2cidrs(@listOfBlocks)
cidrs2cidrs will collapse a list of Net::Netmask objects by combining adjacent blocks into larger blocks. It returns a list of blocks that covers exactly the same IP space. Overlapping blocks will be collapsed.

AUTHORS

Joelle Maslak <[email protected]> (current maintainer)

David Muir Sharnoff (original creator/author)

LICENSE

Copyright (C) 1998-2006 David Muir Sharnoff.

Copyright (C) 2011-2013 Google, Inc.

Copyright (C) 2018-2021 Joelle Maslak

This module may be used, modified and redistributed under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1476 - Linux cli command Tk_DragDrop_SunConstpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_DragDrop_SunConstpm and provides detailed information about the command Tk_DragDrop_SunConstpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_DragDrop_SunConstpm.

NAME 🖥️ Tk_DragDrop_SunConstpm 🖥️

Constants for Sun’s Drag&Drop protocol

DESCRIPTION

This module defines symbolic name subs for the numeric constants that make up Sun’s Drag&Drop protocol. They are in this module with Exporter as they are shared between the two halves (Dropper and Receiver) of the protocol.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1477 - Linux cli command ftello

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ftello and provides detailed information about the command ftello, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ftello.

NAME 🖥️ ftello 🖥️

seek to or report file position

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int fseeko(FILE *stream, off_t offset, int whence);
off_t ftello(FILE *stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

fseeko(), ftello():

    _FILE_OFFSET_BITS == 64 || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The fseeko() and ftello() functions are identical to fseek(3) and ftell(3) (see fseek(3)), respectively, except that the offset argument of fseeko() and the return value of ftello() is of type off_t instead of long.

On some architectures, both off_t and long are 32-bit types, but defining _FILE_OFFSET_BITS with the value 64 (before including any header files) will turn off_t into a 64-bit type.

RETURN VALUE

On successful completion, fseeko() returns 0, while ftello() returns the current offset. Otherwise, -1 is returned and errno is set to indicate the error.

ERRORS

See the ERRORS in fseek(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fseeko(), ftello()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.1. POSIX.1-2001, SUSv2.

NOTES

The declarations of these functions can also be obtained by defining the obsolete _LARGEFILE_SOURCE feature test macro.

SEE ALSO

fseek(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1478 - Linux cli command Image_ExifTool_Canonpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Canonpm and provides detailed information about the command Image_ExifTool_Canonpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Canonpm.

NAME 🖥️ Image_ExifTool_Canonpm 🖥️

Canon EXIF maker notes tags

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret Canon maker notes in EXIF information.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html>

<http://www.wonderland.org/crw/>

<http://www.cybercom.net/~dcoffin/dcraw/>

<http://homepage3.nifty.com/kamisaka/makernote/makernote_canon.htm>

(…plus lots of testing with my 300D, A570IS and G12!)

ACKNOWLEDGEMENTS

Thanks Michael Rommel and Daniel Pittman for information they provided about the Digital Ixus and PowerShot S70 cameras, Juha Eskelinen and Emil Sit for figuring out the 20D and 30D FileNumber, Denny Priebe for figuring out a couple of 1D tags, and Michael Tiemann, Rainer Honle, Dave Nicholson, Chris Huebsch, Ger Vermeulen, Darryl Zurn, D.J. Cristi, Bogdan, Vesa Kivisto and Kai Harrekilde-Petersen for decoding a number of new tags. Also thanks to everyone who made contributions to the LensType lookup list or the meanings of other tag values.

SEE ALSO

“Canon Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1479 - Linux cli command getpw

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getpw and provides detailed information about the command getpw, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getpw.

NAME 🖥️ getpw 🖥️

reconstruct password line entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <sys/types.h>
#include <pwd.h>
[[deprecated]] int getpw(uid_t uid, char *buf);

DESCRIPTION

The getpw() function reconstructs the password line entry for the given user ID uid in the buffer buf. The returned buffer contains a line of format

name:passwd:uid:gid:gecos:dir:shell

The passwd structure is defined in <pwd.h> as follows:

struct passwd {
    char   *pw_name;       /* username */
    char   *pw_passwd;     /* user password */
    uid_t   pw_uid;        /* user ID */
    gid_t   pw_gid;        /* group ID */
    char   *pw_gecos;      /* user information */
    char   *pw_dir;        /* home directory */
    char   *pw_shell;      /* shell program */
};

For more information about the fields of this structure, see passwd(5).

RETURN VALUE

The getpw() function returns 0 on success; on error, it returns -1, and errno is set to indicate the error.

If uid is not found in the password database, getpw() returns -1, sets errno to 0, and leaves buf unchanged.

ERRORS

0 or ENOENT
No user corresponding to uid.

EINVAL
buf is NULL.

ENOMEM
Insufficient memory to allocate passwd structure.

FILES

/etc/passwd
password database file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getpw()

Thread safetyMT-Safe locale

STANDARDS

None.

HISTORY

SVr2.

BUGS

The getpw() function is dangerous as it may overflow the provided buffer buf. It is obsoleted by getpwuid(3).

SEE ALSO

endpwent(3), fgetpwent(3), getpwent(3), getpwnam(3), getpwuid(3), putpwent(3), setpwent(3), passwd(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1480 - Linux cli command pow10

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pow10 and provides detailed information about the command pow10, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pow10.

NAME 🖥️ pow10 🖥️

base-10 power functions

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <math.h>
double pow10(double x);
float pow10f(float x);
long double pow10l(long double x);

DESCRIPTION

These functions return the value of 10 raised to the power x.

Note well: These functions perform exactly the same task as the functions described in exp10(3), with the difference that the latter functions are now standardized in TS 18661-4:2015. Those latter functions should be used in preference to the functions described in this page.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pow10(), pow10f(), pow10l()

Thread safetyMT-Safe

STANDARDS

GNU.

VERSIONS

glibc 2.1. Removed in glibc 2.27.

SEE ALSO

exp10(3), pow(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1481 - Linux cli command res_search

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command res_search and provides detailed information about the command res_search, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the res_search.

NAME 🖥️ res_search 🖥️

resolver routines

LIBRARY

Resolver library (libresolv, -lresolv)

SYNOPSIS

#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
struct __res_state;
typedef struct __res_state *res_state;
int res_ninit(res_state statep);
void res_nclose(res_state statep);
int res_nquery(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nsearch(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nquerydomain(res_state statep,
 const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
int res_nmkquery(res_state statep,
 int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
int res_nsend(res_state statep,
 const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);
int dn_comp(const char *exp_dn, unsigned char comp_dn[.length],
 int length, unsigned char **dnptrs,
 unsigned char **lastdnptr);
int dn_expand(const unsigned char *msg,
 const unsigned char *eomorig,
 const unsigned char *comp_dn, char exp_dn[.length],
 int length);
[[deprecated]] extern struct __res_state _res;
[[deprecated]] int res_init(void);
[[deprecated]]
int res_query(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_search(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_querydomain(const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
[[deprecated]]
int res_mkquery(int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
[[deprecated]]
int res_send(const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);

DESCRIPTION

Note: This page is incomplete (various resolver functions provided by glibc are not described) and likely out of date.

The functions described below make queries to and interpret the responses from Internet domain name servers.

The API consists of a set of more modern, reentrant functions and an older set of nonreentrant functions that have been superseded. The traditional resolver interfaces such as res_init() and res_query() use some static (global) state stored in the _res structure, rendering these functions non-thread-safe. BIND 8.2 introduced a set of new interfaces res_ninit(), res_nquery(), and so on, which take a res_state as their first argument, so you can use a per-thread resolver state.

The res_ninit() and res_init() functions read the configuration files (see resolv.conf(5)) to get the default domain name and name server address(es). If no server is given, the local host is tried. If no domain is given, that associated with the local host is used. It can be overridden with the environment variable LOCALDOMAIN. res_ninit() or res_init() is normally executed by the first call to one of the other functions. Every call to res_ninit() requires a corresponding call to res_nclose() to free memory allocated by res_ninit() and subsequent calls to res_nquery().

The res_nquery() and res_query() functions query the name server for the fully qualified domain name name of specified type and class. The reply is left in the buffer answer of length anslen supplied by the caller.

The res_nsearch() and res_search() functions make a query and waits for the response like res_nquery() and res_query(), but in addition they implement the default and search rules controlled by RES_DEFNAMES and RES_DNSRCH (see description of _res options below).

The res_nquerydomain() and res_querydomain() functions make a query using res_nquery()/res_query() on the concatenation of name and domain.

The following functions are lower-level routines used by res_nquery()/res_query().

The res_nmkquery() and res_mkquery() functions construct a query message in buf of length buflen for the domain name dname. The query type op is one of the following (typically QUERY):

QUERY
Standard query.

IQUERY
Inverse query. This option was removed in glibc 2.26, since it has not been supported by DNS servers for a very long time.

NS_NOTIFY_OP
Notify secondary of SOA (Start of Authority) change.

newrr is currently unused.

The res_nsend() and res_send() function send a preformatted query given in msg of length msglen and returns the answer in answer which is of length anslen. They will call res_ninit()/res_init() if it has not already been called.

The dn_comp() function compresses the domain name exp_dn and stores it in the buffer comp_dn of length length. The compression uses an array of pointers dnptrs to previously compressed names in the current message. The first pointer points to the beginning of the message and the list ends with NULL. The limit of the array is specified by lastdnptr. If dnptr is NULL, domain names are not compressed. If lastdnptr is NULL, the list of labels is not updated.

The dn_expand() function expands the compressed domain name comp_dn to a full domain name, which is placed in the buffer exp_dn of size length. The compressed name is contained in a query or reply message, and msg points to the beginning of the message.

The resolver routines use configuration and state information contained in a __res_state structure (either passed as the statep argument, or in the global variable _res, in the case of the older nonreentrant functions). The only field of this structure that is normally manipulated by the user is the options field. This field can contain the bitwise “OR” of the following options:

RES_INIT
True if res_ninit() or res_init() has been called.

RES_DEBUG
Print debugging messages. This option is available only if glibc was built with debugging enabled, which is not the default.

RES_AAONLY (unimplemented; deprecated in glibc 2.25)
Accept authoritative answers only. res_send() continues until it finds an authoritative answer or returns an error. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEVC
Use TCP connections for queries rather than UDP datagrams.

RES_PRIMARY (unimplemented; deprecated in glibc 2.25)
Query primary domain name server only. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_IGNTC
Ignore truncation errors. Don’t retry with TCP.

RES_RECURSE
Set the recursion desired bit in queries. Recursion is carried out by the domain name server, not by res_send(). [Enabled by default].

RES_DEFNAMES
If set, res_search() will append the default domain name to single component names—that is, those that do not contain a dot. [Enabled by default].

RES_STAYOPEN
Used with RES_USEVC to keep the TCP connection open between queries.

RES_DNSRCH
If set, res_search() will search for hostnames in the current domain and in parent domains. This option is used by gethostbyname(3). [Enabled by default].

RES_INSECURE1
Accept a response from a wrong server. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_INSECURE2
Accept a response which contains a wrong query. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_NOALIASES
Disable usage of HOSTALIASES environment variable.

RES_USE_INET6
Try an AAAA query before an A query inside the gethostbyname(3) function, and map IPv4 responses in IPv6 “tunneled form” if no AAAA records are found but an A record set exists. Since glibc 2.25, this option is deprecated, and its usage produces a warning; applications should use getaddrinfo(3), rather than gethostbyname(3).

RES_ROTATE
Causes round-robin selection of name servers from among those listed. This has the effect of spreading the query load among all listed servers, rather than having all clients try the first listed server first every time.

RES_NOCHECKNAME (unimplemented; deprecated in glibc 2.25)
Disable the modern BIND checking of incoming hostnames and mail names for invalid characters such as underscore (_), non-ASCII, or control characters. This option was present until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_KEEPTSIG (unimplemented; deprecated in glibc 2.25)
Do not strip TSIG records. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_BLAST (unimplemented; deprecated in glibc 2.25)
Send each query simultaneously and recursively to all servers. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEBSTRING (glibc 2.3.4 to glibc 2.24)
Make reverse IPv6 lookups using the bit-label format described in RFC 2673; if this option is not set (which is the default), then nibble format is used. This option was removed in glibc 2.25, since it relied on a backward-incompatible DNS extension that was never deployed on the Internet.

RES_NOIP6DOTINT (glibc 2.24 and earlier)
Use ip6.arpa zone in IPv6 reverse lookup instead of ip6.int, which is deprecated since glibc 2.3.4. This option is present up to and including glibc 2.24, where it is enabled by default. In glibc 2.25, this option was removed.

RES_USE_EDNS0 (since glibc 2.6)
Enables support for the DNS extensions (EDNS0) described in RFC 2671.

RES_SNGLKUP (since glibc 2.10)
By default, glibc performs IPv4 and IPv6 lookups in parallel since glibc 2.9. Some appliance DNS servers cannot handle these queries properly and make the requests time out. This option disables the behavior and makes glibc perform the IPv6 and IPv4 requests sequentially (at the cost of some slowdown of the resolving process).

RES_SNGLKUPREOP
When RES_SNGLKUP option is enabled, opens a new socket for the each request.

RES_USE_DNSSEC
Use DNSSEC with OK bit in OPT record. This option implies RES_USE_EDNS0.

RES_NOTLDQUERY
Do not look up unqualified name as a top-level domain (TLD).

RES_DEFAULT
Default option which implies: RES_RECURSE, RES_DEFNAMES, RES_DNSRCH, and RES_NOIP6DOTINT.

RETURN VALUE

The res_ninit() and res_init() functions return 0 on success, or -1 if an error occurs.

The res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), res_querydomain(), res_nmkquery(), res_mkquery(), res_nsend(), and res_send() functions return the length of the response, or -1 if an error occurs.

The dn_comp() and dn_expand() functions return the length of the compressed name, or -1 if an error occurs.

In the case of an error return from res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), or res_querydomain(), the global variable h_errno (see gethostbyname(3)) can be consulted to determine the cause of the error.

FILES

/etc/resolv.conf
resolver configuration file

/etc/host.conf
resolver configuration file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

res_ninit(), res_nclose(), res_nquery(), res_nsearch(), res_nquerydomain(), res_nsend()

Thread safetyMT-Safe locale

res_nmkquery(), dn_comp(), dn_expand()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

4.3BSD.

SEE ALSO

gethostbyname(3), resolv.conf(5), resolver(5), hostname(7), named(8)

The GNU C library source file resolv/README.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1482 - Linux cli command freeifaddrs

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command freeifaddrs and provides detailed information about the command freeifaddrs, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the freeifaddrs.

NAME 🖥️ freeifaddrs 🖥️

get interface addresses

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <ifaddrs.h>
int getifaddrs(struct ifaddrs **ifap);
void freeifaddrs(struct ifaddrs *ifa);

DESCRIPTION

The getifaddrs() function creates a linked list of structures describing the network interfaces of the local system, and stores the address of the first item of the list in *ifap. The list consists of ifaddrs structures, defined as follows:

struct ifaddrs {
    struct ifaddrs  *ifa_next;    /* Next item in list */
    char            *ifa_name;    /* Name of interface */
    unsigned int     ifa_flags;   /* Flags from SIOCGIFFLAGS */
    struct sockaddr *ifa_addr;    /* Address of interface */
    struct sockaddr *ifa_netmask; /* Netmask of interface */
    union {
        struct sockaddr *ifu_broadaddr;
                         /* Broadcast address of interface */
        struct sockaddr *ifu_dstaddr;
                         /* Point-to-point destination address */
    } ifa_ifu;
#define              ifa_broadaddr ifa_ifu.ifu_broadaddr
#define              ifa_dstaddr   ifa_ifu.ifu_dstaddr
    void            *ifa_data;    /* Address-specific data */
};

The ifa_next field contains a pointer to the next structure on the list, or NULL if this is the last item of the list.

The ifa_name points to the null-terminated interface name.

The ifa_flags field contains the interface flags, as returned by the SIOCGIFFLAGS ioctl(2) operation (see netdevice(7) for a list of these flags).

The ifa_addr field points to a structure containing the interface address. (The sa_family subfield should be consulted to determine the format of the address structure.) This field may contain a null pointer.

The ifa_netmask field points to a structure containing the netmask associated with ifa_addr, if applicable for the address family. This field may contain a null pointer.

Depending on whether the bit IFF_BROADCAST or IFF_POINTOPOINT is set in ifa_flags (only one can be set at a time), either ifa_broadaddr will contain the broadcast address associated with ifa_addr (if applicable for the address family) or ifa_dstaddr will contain the destination address of the point-to-point interface.

The ifa_data field points to a buffer containing address-family-specific data; this field may be NULL if there is no such data for this interface.

The data returned by getifaddrs() is dynamically allocated and should be freed using freeifaddrs() when no longer needed.

RETURN VALUE

On success, getifaddrs() returns zero; on error, -1 is returned, and errno is set to indicate the error.

ERRORS

getifaddrs() may fail and set errno for any of the errors specified for socket(2), bind(2), getsockname(2), recvmsg(2), sendto(2), malloc(3), or realloc(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getifaddrs(), freeifaddrs()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

This function first appeared in BSDi and is present on the BSD systems, but with slightly different semantics documented—returning one entry per interface, not per address. This means ifa_addr and other fields can actually be NULL if the interface has no address, and no link-level address is returned if the interface has an IP address assigned. Also, the way of choosing either ifa_broadaddr or ifa_dstaddr differs on various systems.

getifaddrs() first appeared in glibc 2.3, but before glibc 2.3.3, the implementation supported only IPv4 addresses; IPv6 support was added in glibc 2.3.3. Support of address families other than IPv4 is available only on kernels that support netlink.

NOTES

The addresses returned on Linux will usually be the IPv4 and IPv6 addresses assigned to the interface, but also one AF_PACKET address per interface containing lower-level details about the interface and its physical layer. In this case, the ifa_data field may contain a pointer to a struct rtnl_link_stats, defined in <linux/if_link.h> (in Linux 2.4 and earlier, struct net_device_stats, defined in <linux/netdevice.h>), which contains various interface attributes and statistics.

EXAMPLES

The program below demonstrates the use of getifaddrs(), freeifaddrs(), and getnameinfo(3). Here is what we see when running this program on one system:

$ ./a.out
lo       AF_PACKET (17)
                tx_packets =        524; rx_packets =        524
                tx_bytes   =      38788; rx_bytes   =      38788
wlp3s0   AF_PACKET (17)
                tx_packets =     108391; rx_packets =     130245
                tx_bytes   =   30420659; rx_bytes   =   94230014
em1      AF_PACKET (17)
                tx_packets =          0; rx_packets =          0
                tx_bytes   =          0; rx_bytes   =          0
lo       AF_INET (2)
                address: <127.0.0.1>
wlp3s0   AF_INET (2)
                address: <192.168.235.137>
lo       AF_INET6 (10)
                address: <::1>
wlp3s0   AF_INET6 (10)
                address: <fe80::7ee9:d3ff:fef5:1a91%wlp3s0>

Program source

#define _GNU_SOURCE     /* To get defns of NI_MAXSERV and NI_MAXHOST */
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netdb.h>
#include <ifaddrs.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <linux/if_link.h>
int main(int argc, char *argv[])
{
    struct ifaddrs *ifaddr;
    int family, s;
    char host[NI_MAXHOST];
    if (getifaddrs(&ifaddr) == -1) {
        perror("getifaddrs");
        exit(EXIT_FAILURE);
    }
    /* Walk through linked list, maintaining head pointer so we
       can free list later. */
    for (struct ifaddrs *ifa = ifaddr; ifa != NULL;
             ifa = ifa->ifa_next) {
        if (ifa->ifa_addr == NULL)
            continue;
        family = ifa->ifa_addr->sa_family;
        /* Display interface name and family (including symbolic
           form of the latter for the common families). */
        printf("%-8s %s (%d)

“, ifa->ifa_name, (family == AF_PACKET) ? “AF_PACKET” : (family == AF_INET) ? “AF_INET” : (family == AF_INET6) ? “AF_INET6” : “???”, family); /* For an AF_INET* interface address, display the address. */ if (family == AF_INET || family == AF_INET6) { s = getnameinfo(ifa->ifa_addr, (family == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6), host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST); if (s != 0) { printf(“getnameinfo() failed: %s “, gai_strerror(s)); exit(EXIT_FAILURE); } printf(” address: <%s> “, host); } else if (family == AF_PACKET && ifa->ifa_data != NULL) { struct rtnl_link_stats *stats = ifa->ifa_data; printf(” tx_packets = %10u; rx_packets = %10u " " tx_bytes = %10u; rx_bytes = %10u “, stats->tx_packets, stats->rx_packets, stats->tx_bytes, stats->rx_bytes); } } freeifaddrs(ifaddr); exit(EXIT_SUCCESS); }

SEE ALSO

bind(2), getsockname(2), socket(2), packet(7), ifconfig(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1483 - Linux cli command STAILQ_INSERT_TAIL

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command STAILQ_INSERT_TAIL and provides detailed information about the command STAILQ_INSERT_TAIL, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the STAILQ_INSERT_TAIL.

NAME 🖥️ STAILQ_INSERT_TAIL 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1484 - Linux cli command j1f

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command j1f and provides detailed information about the command j1f, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the j1f.

NAME 🖥️ j1f 🖥️

Bessel functions of the first kind

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double j0(double x);
double j1(double x);
double jn(int n, double x);
float j0f(float x);
float j1f(float x);
float jnf(int n, float x);
long double j0l(long double x);
long double j1l(long double x);
long double jnl(int n, long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

j0(), j1(), jn():

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

j0f(), j0l(), j1f(), j1l(), jnf(), jnl():

    _XOPEN_SOURCE >= 600
        || (_ISOC99_SOURCE && _XOPEN_SOURCE)
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The j0() and j1() functions return Bessel functions of x of the first kind of orders 0 and 1, respectively. The jn() function returns the Bessel function of x of the first kind of order n.

The j0f(), j1f(), and jnf(), functions are versions that take and return float values. The j0l(), j1l(), and jnl() functions are versions that take and return long double values.

RETURN VALUE

On success, these functions return the appropriate Bessel value of the first kind for x.

If x is a NaN, a NaN is returned.

If x is too large in magnitude, or the result underflows, a range error occurs, and the return value is 0.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error: result underflow, or x is too large in magnitude
errno is set to ERANGE.

These functions do not raise exceptions for fetestexcept(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

j0(), j0f(), j0l()

Thread safetyMT-Safe

j1(), j1f(), j1l()

Thread safetyMT-Safe

jn(), jnf(), jnl()

Thread safetyMT-Safe

STANDARDS

j0()
j1()
jn()
POSIX.1-2008.

Others:
BSD.

HISTORY

j0()
j1()
jn()
SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008.

Others:
BSD.

BUGS

There are errors of up to 2e-16 in the values returned by j0(), j1(), and jn() for values of x between -8 and 8.

SEE ALSO

y0(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1485 - Linux cli command rand_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command rand_r and provides detailed information about the command rand_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the rand_r.

NAME 🖥️ rand_r 🖥️

pseudo-random number generator

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int rand(void);
void srand(unsigned int seed);
[[deprecated]] int rand_r(unsigned int *seedp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

rand_r():

    Since glibc 2.24:
        _POSIX_C_SOURCE >= 199506L
    glibc 2.23 and earlier
        _POSIX_C_SOURCE

DESCRIPTION

The rand() function returns a pseudo-random integer in the range 0 to RAND_MAX inclusive (i.e., the mathematical range [0, RAND_MAX]).

The srand() function sets its argument as the seed for a new sequence of pseudo-random integers to be returned by rand(). These sequences are repeatable by calling srand() with the same seed value.

If no seed value is provided, the rand() function is automatically seeded with a value of 1.

The function rand() is not reentrant, since it uses hidden state that is modified on each call. This might just be the seed value to be used by the next call, or it might be something more elaborate. In order to get reproducible behavior in a threaded application, this state must be made explicit; this can be done using the reentrant function rand_r().

Like rand(), rand_r() returns a pseudo-random integer in the range [0, RAND_MAX]. The seedp argument is a pointer to an unsigned int that is used to store state between calls. If rand_r() is called with the same initial value for the integer pointed to by seedp, and that value is not modified between calls, then the same pseudo-random sequence will result.

The value pointed to by the seedp argument of rand_r() provides only a very small amount of state, so this function will be a weak pseudo-random generator. Try drand48_r(3) instead.

RETURN VALUE

The rand() and rand_r() functions return a value between 0 and RAND_MAX (inclusive). The srand() function returns no value.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

rand(), rand_r(), srand()

Thread safetyMT-Safe

VERSIONS

The versions of rand() and srand() in the Linux C Library use the same random number generator as random(3) and srandom(3), so the lower-order bits should be as random as the higher-order bits. However, on older rand() implementations, and on current implementations on different systems, the lower-order bits are much less random than the higher-order bits. Do not use this function in applications intended to be portable when good randomness is needed. (Use random(3) instead.)

STANDARDS

rand()
srand()
C11, POSIX.1-2008.

rand_r()
POSIX.1-2008.

HISTORY

rand()
srand()
SVr4, 4.3BSD, C89, POSIX.1-2001.

rand_r()
POSIX.1-2001. Obsolete in POSIX.1-2008.

EXAMPLES

POSIX.1-2001 gives the following example of an implementation of rand() and srand(), possibly useful when one needs the same sequence on two different machines.

static unsigned long next = 1;
/* RAND_MAX assumed to be 32767 */
int myrand(void) {
    next = next * 1103515245 + 12345;
    return((unsigned)(next/65536) % 32768);
}
void mysrand(unsigned int seed) {
    next = seed;
}

The following program can be used to display the pseudo-random sequence produced by rand() when given a particular seed. When the seed is -1, the program uses a random seed.

#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
    int           r;
    unsigned int  seed, nloops;
    if (argc != 3) {
        fprintf(stderr, "Usage: %s <seed> <nloops>

“, argv[0]); exit(EXIT_FAILURE); } seed = atoi(argv[1]); nloops = atoi(argv[2]); if (seed == -1) { seed = arc4random(); printf(“seed: %u “, seed); } srand(seed); for (unsigned int j = 0; j < nloops; j++) { r = rand(); printf("%d “, r); } exit(EXIT_SUCCESS); }

SEE ALSO

drand48(3), random(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1486 - Linux cli command getdate_err

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getdate_err and provides detailed information about the command getdate_err, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getdate_err.

NAME 🖥️ getdate_err 🖥️

convert a date-plus-time string to broken-down time

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <time.h>
struct tm *getdate(const char *string);
extern int getdate_err;
int getdate_r(const char *restrict string, struct tm *restrict res);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getdate():

    _XOPEN_SOURCE >= 500

getdate_r():

    _GNU_SOURCE

DESCRIPTION

The function getdate() converts a string representation of a date and time, contained in the buffer pointed to by string, into a broken-down time. The broken-down time is stored in a tm structure, and a pointer to this structure is returned as the function result. This tm structure is allocated in static storage, and consequently it will be overwritten by further calls to getdate().

In contrast to strptime(3), (which has a format argument), getdate() uses the formats found in the file whose full pathname is given in the environment variable DATEMSK. The first line in the file that matches the given input string is used for the conversion.

The matching is done case insensitively. Superfluous whitespace, either in the pattern or in the string to be converted, is ignored.

The conversion specifications that a pattern can contain are those given for strptime(3). One more conversion specification is specified in POSIX.1-2001:

%Z
Timezone name. This is not implemented in glibc.

When %Z is given, the structure containing the broken-down time is initialized with values corresponding to the current time in the given timezone. Otherwise, the structure is initialized to the broken-down time corresponding to the current local time (as by a call to localtime(3)).

When only the day of the week is given, the day is taken to be the first such day on or after today.

When only the month is given (and no year), the month is taken to be the first such month equal to or after the current month. If no day is given, it is the first day of the month.

When no hour, minute, and second are given, the current hour, minute, and second are taken.

If no date is given, but we know the hour, then that hour is taken to be the first such hour equal to or after the current hour.

getdate_r() is a GNU extension that provides a reentrant version of getdate(). Rather than using a global variable to report errors and a static buffer to return the broken down time, it returns errors via the function result value, and returns the resulting broken-down time in the caller-allocated buffer pointed to by the argument res.

RETURN VALUE

When successful, getdate() returns a pointer to a struct tm. Otherwise, it returns NULL and sets the global variable getdate_err to one of the error numbers shown below. Changes to errno are unspecified.

On success getdate_r() returns 0; on error it returns one of the error numbers shown below.

ERRORS

The following errors are returned via getdate_err (for getdate()) or as the function result (for getdate_r()):

1
The DATEMSK environment variable is not defined, or its value is an empty string.

2
The template file specified by DATEMSK cannot be opened for reading.

3
Failed to get file status information.

4
The template file is not a regular file.

5
An error was encountered while reading the template file.

6
Memory allocation failed (not enough memory available).

7
There is no line in the file that matches the input.

8
Invalid input specification.

ENVIRONMENT

DATEMSK
File containing format patterns.

TZ
LC_TIME
Variables used by strptime(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getdate()

Thread safety

MT-Unsafe race:getdate env locale

getdate_r()

Thread safety

MT-Safe env locale

VERSIONS

The POSIX.1 specification for strptime(3) contains conversion specifications using the %E or %O modifier, while such specifications are not given for getdate(). In glibc, getdate() is implemented using strptime(3), so that precisely the same conversions are supported by both.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

EXAMPLES

The program below calls getdate() for each of its command-line arguments, and for each call displays the values in the fields of the returned tm structure. The following shell session demonstrates the operation of the program:

$ TFILE=$PWD/tfile
$ echo '%A' > $TFILE  # Full name of the day of the week
$ echo '%T' >> $TFILE # Time (HH:MM:SS)
$ echo '%F' >> $TFILE # ISO date (YYYY-MM-DD)
$ date
$ export DATEMSK=$TFILE
$ ./a.out Tuesday '2009-12-28' '12:22:33'
Sun Sep  7 06:03:36 CEST 2008
Call 1 ("Tuesday") succeeded:
    tm_sec   = 36
    tm_min   = 3
    tm_hour  = 6
    tm_mday  = 9
    tm_mon   = 8
    tm_year  = 108
    tm_wday  = 2
    tm_yday  = 252
    tm_isdst = 1
Call 2 ("2009-12-28") succeeded:
    tm_sec   = 36
    tm_min   = 3
    tm_hour  = 6
    tm_mday  = 28
    tm_mon   = 11
    tm_year  = 109
    tm_wday  = 1
    tm_yday  = 361
    tm_isdst = 0
Call 3 ("12:22:33") succeeded:
    tm_sec   = 33
    tm_min   = 22
    tm_hour  = 12
    tm_mday  = 7
    tm_mon   = 8
    tm_year  = 108
    tm_wday  = 0
    tm_yday  = 250
    tm_isdst = 1

Program source

#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int
main(int argc, char *argv[])
{
    struct tm *tmp;
    for (size_t j = 1; j < argc; j++) {
        tmp = getdate(argv[j]);
        if (tmp == NULL) {
            printf("Call %zu failed; getdate_err = %d

“, j, getdate_err); continue; } printf(“Call %zu ("%s") succeeded: “, j, argv[j]); printf(” tm_sec = %d “, tmp->tm_sec); printf(” tm_min = %d “, tmp->tm_min); printf(” tm_hour = %d “, tmp->tm_hour); printf(” tm_mday = %d “, tmp->tm_mday); printf(” tm_mon = %d “, tmp->tm_mon); printf(” tm_year = %d “, tmp->tm_year); printf(” tm_wday = %d “, tmp->tm_wday); printf(” tm_yday = %d “, tmp->tm_yday); printf(” tm_isdst = %d “, tmp->tm_isdst); } exit(EXIT_SUCCESS); }

SEE ALSO

time(2), localtime(3), setlocale(3), strftime(3), strptime(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1487 - Linux cli command Moose_Manual_MOPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Manual_MOPpm and provides detailed information about the command Moose_Manual_MOPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Manual_MOPpm.

NAME 🖥️ Moose_Manual_MOPpm 🖥️

The Moose (and Class::MOP) meta API

VERSION

version 2.2207

INTRODUCTION

Moose provides a powerful introspection API built on top of Class::MOP. “MOP” stands for Meta-Object Protocol. In plainer English, a MOP is an API for performing introspection on classes, attributes, methods, and so on.

In fact, it is Class::MOP that provides many of Moose’s core features, including attributes, before/after/around method modifiers, and immutability. In most cases, Moose takes an existing Class::MOP class and subclasses it to add additional features. Moose also adds some entirely new features of its own, such as roles, the augment modifier, and types.

If you’re interested in the MOP, it’s important to know about Class::MOP so you know what docs to read. Often, the introspection method that you’re looking for is defined in a Class::MOP class, rather than Moose itself.

The MOP provides more than just read-only introspection. It also lets you add attributes and methods, apply roles, and much more. In fact, all of the declarative Moose sugar is simply a thin layer on top of the MOP API.

If you want to write Moose extensions, you’ll need to learn some of the MOP API. The introspection methods are also handy if you want to generate docs or inheritance graphs, or do some other runtime reflection.

This document is not a complete reference for the meta API. We’re just going to cover some of the highlights, and give you a sense of how it all works. To really understand it, you’ll have to read a lot of other docs, and possibly even dig into the Moose guts a bit.

GETTING STARTED

The usual entry point to the meta API is through a class’s metaclass object, which is a Moose::Meta::Class. This is available by calling the meta method on a class or object:

package User; use Moose; my $meta = _ _PACKAGE_ _->meta;

The meta method is added to a class when it uses Moose.

You can also use Class::MOP::Class->initialize($name) to get a metaclass object for any class. This is safer than calling $class->meta when you’re not sure that the class has a meta method.

The Class::MOP::Class->initialize constructor will return an existing metaclass if one has already been created (via Moose or some other means). If it hasn’t, it will return a new Class::MOP::Class object. This will work for classes that use Moose, meta API classes, and classes which don’t use Moose at all.

USING THE METACLASS OBJECT

The metaclass object can tell you about a class’s attributes, methods, roles, parents, and more. For example, to look at all of the class’s attributes:

for my $attr ( $meta->get_all_attributes ) { print $attr->name, " “; }

The get_all_attributes method is documented in Class::MOP::Class. For Moose-using classes, it returns a list of Moose::Meta::Attribute objects for attributes defined in the class and its parents.

You can also get a list of methods:

for my $method ( $meta->get_all_methods ) { print $method->fully_qualified_name, " “; }

Now we’re looping over a list of Moose::Meta::Method objects. Note that some of these objects may actually be a subclass of Moose::Meta::Method, as Moose uses different classes to represent wrapped methods, delegation methods, constructors, etc.

We can look at a class’s parent classes and subclasses:

for my $class ( $meta->linearized_isa ) { print “$class “; } for my $subclass ( $meta->subclasses ) { print “$subclass “; }

Note that both these methods return class names, not metaclass objects.

ALTERING CLASSES WITH THE MOP

The metaclass object can change the class directly, by adding attributes, methods, etc.

As an example, we can add a method to a class:

$meta->add_method( say => sub { print @_, " " } );

Or an attribute:

$meta->add_attribute( size => ( is => rw, isa => Int ) );

Obviously, this is much more cumbersome than using Perl syntax or Moose sugar for defining methods and attributes, but this API allows for very powerful extensions.

You might remember that we’ve talked about making classes immutable elsewhere in the manual. This is a good practice. However, once a class is immutable, calling any of these update methods will throw an exception.

You can make a class mutable again simply by calling $meta->make_mutable. Once you’re done changing it, you can restore immutability by calling $meta->make_immutable.

However, the most common use for this part of the meta API is as part of Moose extensions. These extensions should assume that they are being run before you make a class immutable.

GOING FURTHER

If you’re interested in extending Moose, we recommend reading all of the “Meta” and “Extending” recipes in the Moose::Cookbook. Those recipes show various practical applications of the MOP.

If you’d like to write your own extensions, one of the best ways to learn more about this is to look at other similar extensions to see how they work. You’ll probably also need to read various API docs, including the docs for the various Moose::Meta::* and Class::MOP::* classes.

Finally, we welcome questions on the Moose mailing list and IRC. Information on the mailing list, IRC, and more references can be found in the Moose.pm docs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1488 - Linux cli command xdr_enum

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_enum and provides detailed information about the command xdr_enum, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_enum.

NAME 🖥️ xdr_enum 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1489 - Linux cli command pthread_attr_setschedpolicy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_attr_setschedpolicy and provides detailed information about the command pthread_attr_setschedpolicy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_attr_setschedpolicy.

NAME 🖥️ pthread_attr_setschedpolicy 🖥️

set/get scheduling policy attribute in thread attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy);
int pthread_attr_getschedpolicy(const pthread_attr_t *restrict attr,
 int *restrict policy);

DESCRIPTION

The pthread_attr_setschedpolicy() function sets the scheduling policy attribute of the thread attributes object referred to by attr to the value specified in policy. This attribute determines the scheduling policy of a thread created using the thread attributes object attr.

The supported values for policy are SCHED_FIFO, SCHED_RR, and SCHED_OTHER, with the semantics described in sched(7).

The pthread_attr_getschedpolicy() returns the scheduling policy attribute of the thread attributes object attr in the buffer pointed to by policy.

In order for the policy setting made by pthread_attr_setschedpolicy() to have effect when calling pthread_create(3), the caller must use pthread_attr_setinheritsched(3) to set the inherit-scheduler attribute of the attributes object attr to PTHREAD_EXPLICIT_SCHED.

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

pthread_attr_setschedpolicy() can fail with the following error:

EINVAL
Invalid value in policy.

POSIX.1 also documents an optional ENOTSUP error (“attempt was made to set the attribute to an unsupported value”) for pthread_attr_setschedpolicy().

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_attr_setschedpolicy(), pthread_attr_getschedpolicy()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.0. POSIX.1-2001.

EXAMPLES

See pthread_setschedparam(3).

SEE ALSO

pthread_attr_init(3), pthread_attr_setinheritsched(3), pthread_attr_setschedparam(3), pthread_create(3), pthread_setschedparam(3), pthread_setschedprio(3), pthreads(7), sched(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1490 - Linux cli command scandir

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command scandir and provides detailed information about the command scandir, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the scandir.

NAME 🖥️ scandir 🖥️

scan a directory for matching entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <dirent.h>
int scandir(const char *restrict dirp,
 struct dirent ***restrict namelist,
 int (*filter)(const struct dirent *),
 int (*compar)(const struct dirent **,
 const struct dirent **));
int alphasort(const struct dirent **a, const struct dirent **b);
int versionsort(const struct dirent **a, const struct dirent **b);
#include <fcntl.h> /* Definition of AT_* constants */
#include <dirent.h>
int scandirat(int dirfd, const char *restrict dirp,
 struct dirent ***restrict namelist,
 int (*filter)(const struct dirent *),
 int (*compar)(const struct dirent **,
 const struct dirent **));

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

scandir(), alphasort():

    /* Since glibc 2.10: */ _POSIX_C_SOURCE >= 200809L
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

versionsort():

    _GNU_SOURCE

scandirat():

    _GNU_SOURCE

DESCRIPTION

The scandir() function scans the directory dirp, calling filter() on each directory entry. Entries for which filter() returns nonzero are stored in strings allocated via malloc(3), sorted using qsort(3) with the comparison function compar(), and collected in array namelist which is allocated via malloc(3). If filter is NULL, all entries are selected.

The alphasort() and versionsort() functions can be used as the comparison function compar(). The former sorts directory entries using strcoll(3), the latter using strverscmp(3) on the strings (*a)->d_name and (*b)->d_name.

scandirat()

The scandirat() function operates in exactly the same way as scandir(), except for the differences described here.

If the pathname given in dirp is relative, then it is interpreted relative to the directory referred to by the file descriptor dirfd (rather than relative to the current working directory of the calling process, as is done by scandir() for a relative pathname).

If dirp is relative and dirfd is the special value AT_FDCWD, then dirp is interpreted relative to the current working directory of the calling process (like scandir()).

If dirp is absolute, then dirfd is ignored.

See openat(2) for an explanation of the need for scandirat().

RETURN VALUE

The scandir() function returns the number of directory entries selected. On error, -1 is returned, with errno set to indicate the error.

The alphasort() and versionsort() functions return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second.

ERRORS

EBADF
(scandirat()) dirp is relative but dirfd is neither AT_FDCWD nor a valid file descriptor.

ENOENT
The path in dirp does not exist.

ENOMEM
Insufficient memory to complete the operation.

ENOTDIR
The path in dirp is not a directory.

ENOTDIR
(scandirat()) dirp is a relative pathname and dirfd is a file descriptor referring to a file other than a directory.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

scandir(), scandirat()

Thread safetyMT-Safe

alphasort(), versionsort()

Thread safetyMT-Safe locale

STANDARDS

alphasort()
scandir()
POSIX.1-2008.

versionsort()
scandirat()
GNU.

HISTORY

alphasort()
scandir()
4.3BSD, POSIX.1-2008.

versionsort()
glibc 2.1.

scandirat()
glibc 2.15.

NOTES

Since glibc 2.1, alphasort() calls strcoll(3); earlier it used strcmp(3).

Before glibc 2.10, the two arguments of alphasort() and versionsort() were typed as const void *. When alphasort() was standardized in POSIX.1-2008, the argument type was specified as the type-safe const struct dirent **, and glibc 2.10 changed the definition of alphasort() (and the nonstandard versionsort()) to match the standard.

EXAMPLES

The program below prints a list of the files in the current directory in reverse order.

Program source

#define _DEFAULT_SOURCE
#include <dirent.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    struct dirent **namelist;
    int n;
    n = scandir(".", &namelist, NULL, alphasort);
    if (n == -1) {
        perror("scandir");
        exit(EXIT_FAILURE);
    }
    while (n--) {
        printf("%s

“, namelist[n]->d_name); free(namelist[n]); } free(namelist); exit(EXIT_SUCCESS); }

SEE ALSO

closedir(3), fnmatch(3), opendir(3), readdir(3), rewinddir(3), seekdir(3), strcmp(3), strcoll(3), strverscmp(3), telldir(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1491 - Linux cli command getwc_unlocked

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getwc_unlocked and provides detailed information about the command getwc_unlocked, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getwc_unlocked.

NAME 🖥️ getwc_unlocked 🖥️

nonlocking stdio functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int getc_unlocked(FILE *stream);
int getchar_unlocked(void);
int putc_unlocked(int c, FILE *stream);
int putchar_unlocked(int c);
void clearerr_unlocked(FILE *stream);
int feof_unlocked(FILE *stream);
int ferror_unlocked(FILE *stream);
int fileno_unlocked(FILE *stream);
int fflush_unlocked(FILE *_Nullable stream);
int fgetc_unlocked(FILE *stream);
int fputc_unlocked(int c, FILE *stream);
size_t fread_unlocked(void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
size_t fwrite_unlocked(const void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
char *fgets_unlocked(char s[restrict .n], int n",FILE*restrict"stream);
int fputs_unlocked(const char *restrict s, FILE *restrict stream);
#include <wchar.h>
wint_t getwc_unlocked(FILE *stream);
wint_t getwchar_unlocked(void);
wint_t fgetwc_unlocked(FILE *stream);
wint_t fputwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwchar_unlocked(wchar_t wc);
wchar_t *fgetws_unlocked(wchar_t ws[restrict .n], int n,
 FILE *restrict stream);
int fputws_unlocked(const wchar_t *restrict ws,
 FILE *restrict stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getc_unlocked(), getchar_unlocked(), putc_unlocked(), putchar_unlocked():

    /* glibc >= 2.24: */ _POSIX_C_SOURCE >= 199309L
        || /* glibc <= 2.23: */ _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

clearerr_unlocked(), feof_unlocked(), ferror_unlocked(), fileno_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), getwchar_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwchar_unlocked(), fgetws_unlocked(), fputws_unlocked():

    _GNU_SOURCE

DESCRIPTION

Each of these functions has the same behavior as its counterpart without the “_unlocked” suffix, except that they do not use locking (they do not set locks themselves, and do not test for the presence of locks set by others) and hence are thread-unsafe. See flockfile(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getc_unlocked(), putc_unlocked(), clearerr_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked(), fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwc_unlocked(), fgetws_unlocked(), fputws_unlocked()

Thread safety

MT-Safe race:stream

getchar_unlocked(), getwchar_unlocked()

Thread safety

MT-Unsafe race:stdin

putchar_unlocked(), putwchar_unlocked()

Thread safety

MT-Unsafe race:stdout

feof_unlocked(), ferror_unlocked(), fileno_unlocked()

Thread safetyMT-Safe

STANDARDS

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2008.

Others:
None.

HISTORY

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2001.

SEE ALSO

flockfile(3), stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1492 - Linux cli command libzip

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command libzip and provides detailed information about the command libzip, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the libzip.

libzip (-lzip)

is a library for reading, creating, and modifying zip archives.

The main design criteria for

were:

Do not create corrupt files, even in case of errors.

Do not delete data.

Be efficient.

For this reason, when modifying zip archives,

writes to a temporary file and replaces the original zip archive atomically.

Below there are two sections listing functions: one for how to read from zip archives and one for how to create/modify them.

(uncompressed files only)

(uncompressed files only)

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1493 - Linux cli command Spreadsheet_WriteExcel_Chart_Stockpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_WriteExcel_Chart_Stockpm and provides detailed information about the command Spreadsheet_WriteExcel_Chart_Stockpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_WriteExcel_Chart_Stockpm.

NAME 🖥️ Spreadsheet_WriteExcel_Chart_Stockpm 🖥️

A writer class for Excel Stock charts.

SYNOPSIS

To create a simple Excel file with a Stock chart using Spreadsheet::WriteExcel:

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( chart.xls ); my $worksheet = $workbook->add_worksheet(); my $chart = $workbook->add_chart( type => stock ); # Add a series for each Open-High-Low-Close. $chart->add_series( categories => =Sheet1!$A$2:$A$6, values => =Sheet1!$B$2:$B$6 ); $chart->add_series( categories => =Sheet1!$A$2:$A$6, values => =Sheet1!$C$2:$C$6 ); $chart->add_series( categories => =Sheet1!$A$2:$A$6, values => =Sheet1!$D$2:$D$6 ); $chart->add_series( categories => =Sheet1!$A$2:$A$6, values => =Sheet1!$E$2:$E$6 ); # Add the worksheet data the chart refers to. # … See the full example below. _ _END_ _

DESCRIPTION

This module implements Stock charts for Spreadsheet::WriteExcel. The chart object is created via the Workbook add_chart() method:

my $chart = $workbook->add_chart( type => stock );

Once the object is created it can be configured via the following methods that are common to all chart classes:

$chart->add_series(); $chart->set_x_axis(); $chart->set_y_axis(); $chart->set_title();

These methods are explained in detail in Spreadsheet::WriteExcel::Chart. Class specific methods or settings, if any, are explained below.

Stock Chart Methods

There aren’t currently any stock chart specific methods. See the TODO section of Spreadsheet::WriteExcel::Chart.

The default Stock chart is an Open-High-Low-Close chart. A series must be added for each of these data sources.

The default Stock chart is in black and white. User defined colours will be added at a later stage.

EXAMPLE

Here is a complete example that demonstrates most of the available features when creating a Stock chart.

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( chart_stock_ex.xls ); my $worksheet = $workbook->add_worksheet(); my $bold = $workbook->add_format( bold => 1 ); my $date_format = $workbook->add_format( num_format => dd/mm/yyyy ); # Add the worksheet data that the charts will refer to. my $headings = [ Date, Open, High, Low, Close ]; my @data = ( [ 2009-08-23, 110.75, 113.48, 109.05, 109.40 ], [ 2009-08-24, 111.24, 111.60, 103.57, 104.87 ], [ 2009-08-25, 104.96, 108.00, 103.88, 106.00 ], [ 2009-08-26, 104.95, 107.95, 104.66, 107.91 ], [ 2009-08-27, 108.10, 108.62, 105.69, 106.15 ], ); $worksheet->write( A1, $headings, $bold ); my $row = 1; for my $data ( @data ) { $worksheet->write( $row, 0, $data->[0], $date_format ); $worksheet->write( $row, 1, $data->[1] ); $worksheet->write( $row, 2, $data->[2] ); $worksheet->write( $row, 3, $data->[3] ); $worksheet->write( $row, 4, $data->[4] ); $row++; } # Create a new chart object. In this case an embedded chart. my $chart = $workbook->add_chart( type => stock, embedded => 1 ); # Add a series for each of the Open-High-Low-Close columns. $chart->add_series( categories => =Sheet1!$A$2:$A$6, values => =Sheet1!$B$2:$B$6, name => Open, ); $chart->add_series( categories => =Sheet1!$A$2:$A$6, values => =Sheet1!$C$2:$C$6, name => High, ); $chart->add_series( categories => =Sheet1!$A$2:$A$6, values => =Sheet1!$D$2:$D$6, name => Low, ); $chart->add_series( categories => =Sheet1!$A$2:$A$6, values => =Sheet1!$E$2:$E$6, name => Close, ); # Add a chart title and some axis labels. $chart->set_title( name => Open-High-Low-Close, ); $chart->set_x_axis( name => Date, ); $chart->set_y_axis( name => Share price, ); # Insert the chart into the worksheet (with an offset). $worksheet->insert_chart( F2, $chart, 25, 10 ); _ _END_ _

AUTHOR

John McNamara [email protected]

COPYRIGHT

Copyright MM-MMX, John McNamara.

All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1494 - Linux cli command svcerr_systemerr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command svcerr_systemerr and provides detailed information about the command svcerr_systemerr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the svcerr_systemerr.

NAME 🖥️ svcerr_systemerr 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1495 - Linux cli command XML_DOM_DOMImplementationpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_DOM_DOMImplementationpm and provides detailed information about the command XML_DOM_DOMImplementationpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_DOM_DOMImplementationpm.

NAME 🖥️ XML_DOM_DOMImplementationpm 🖥️

Information about XML::DOM implementation

DESCRIPTION

The DOMImplementation interface provides a number of methods for performing operations that are independent of any particular instance of the document object model.

The DOM Level 1 does not specify a way of creating a document instance, and hence document creation is an operation specific to an implementation. Future Levels of the DOM specification are expected to provide methods for creating documents directly.

METHODS

hasFeature (feature, version)
Returns 1 if and only if feature equals XML and version equals 1.0.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1496 - Linux cli command XShmGetEventBase

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XShmGetEventBase and provides detailed information about the command XShmGetEventBase, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XShmGetEventBase.

NAME 🖥️ XShmGetEventBase 🖥️

X Shared Memory extension functions

SYNTAX

#include <X11/Xlib.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
Bool	XShmQueryExtension(
	Display *display);
Bool XShmQueryVersion(
	Display *display;
	int *major, *minor;
	Bool *pixmaps);
int XShmPixmapFormat(
	Display *display);
Bool XShmAttach(
	Display *display;
	XShmSegmentInfo *shminfo);
Bool XShmDetach(
	Display *display;
	XShmSegmentInfo *shminfo);

XImage *XShmCreateImage (
	Display *display;
	Visual *visual;
	unsigned int depth;
	int format;
	char *data;
	XShmSegmentInfo *shminfo;
	unsigned int width, height);
Bool XShmPutImage(
	Display *display;
	Drawable d;
	GC gc;
	XImage *image;
	int src_x, src_y, dest_x, dest_y;
	unsigned int width, height;
	bool send_event);
Bool XShmGetImage (
	Display *display;
	Drawable d;
	XImage *image;
	int x, y;
	unsigned long plane_mask);
Pixmap XShmCreatePixmap(
        Display *display;
        Drawable d;
        char *data;
	XShmSegmentInfo *shminfo;
	unsigned int width, height, depth);
Status XShmGetEventBase(
	Display *display);

STRUCTURES

Events:
typedef struct {
    int type;               /* of event */
    unsigned long serial;   /* # of last request processed by server*/
    Bool send_event;        /* true if this came from a SendEvent request*/
    Display *display;       /* Display the event was read from */
    Drawable drawable;      /* drawable of request */
    int major_code;         /* ShmReqCode */
    int minor_code;         /* X_ShmPutImage */
    ShmSeg shmseg;          /* the ShmSeg used in the request*/
    unsigned long offset;   /* the offset into ShmSeg used in the request*/
} XShmCompletionEvent;
a structure of type XShmSegmentInfo :

typedef struct {
    ShmSeg shmseg;      /* resource id */
    int shmid;          /* kernel id */
    char *shmaddr;      /* address in client */
    Bool readOnly;      /* how the server should attach it */
} XShmSegmentInfo;

DESCRIPTION

* XShmQueryExtension * checks to see if the shared memory extensions are available for the specified display.

* XShmQueryVersion * returns the version numbers of the extension implementation. Shared memory pixmaps are supported if the pixmaps argument returns true.

* XShmAttach * tells the server to attach to your shared memory segment. If all goes well, you will get a non-zero status, back and your XImage is ready for use.

* XShmDetach * tells the server to detach from your shared memory segment.

* XShmPutImage * combines an image in memory with a shape of the specified drawable. If XYBitmap format is used, the depth must be one, or a ``BadMatch’’ error results. The foreground pixel in the GC defines the source for the one bits in the image, and the background pixel defines the source for the zero bits. For XYPixmap and ZPixmap, the depth must match the depth of the drawable, or a ``BadMatch’’ error results.

* XShmGetImage * reads image data into a shared memory XImage where display is the display of interest, drawable is the source drawable, image is the destination XImage, x and y are offsets within the drawable, and plane_mask defines which planes are to be read.

* XShmCreateImage * allocates the memory needed for an XImage structure for the specified display but does not allocate space for the image itself.

* XShmPixmapFormat * gets the format for the server. If your application can deal with the server pixmap data format, a shared memory segment and shminfo structure are created.

* XShmCreatePixmap * points to a pixmap which you can manipulate in all of the usual ways, with the added bonus of being able to edit its contents directly through the shared memory segment.

* XShmGetEventBase * gets the completion event value.

SEE ALSO

MIT-SHM - The MIT Shared Memory Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1497 - Linux cli command XML_Handler_XMLWriterpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_Handler_XMLWriterpm and provides detailed information about the command XML_Handler_XMLWriterpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_Handler_XMLWriterpm.

NAME 🖥️ XML_Handler_XMLWriterpm 🖥️

a PerlSAX handler for writing readable XML

SYNOPSIS

use XML::Parser::PerlSAX; use XML::Handler::XMLWriter; $my_handler = XML::Handler::XMLWriter->new( I<OPTIONS> ); XML::Parser::PerlSAX->new->parse(Source => { SystemId => REC-xml-19980210.xml }, Handler => $my_handler);

DESCRIPTION

XML::Handler::XMLWriter is a PerlSAX handler for writing readable XML (in contrast to Canonical XML, for example). XML::Handler::XMLWriter can be used with a parser to reformat XML, with XML::DOM or XML::Grove to write out XML, or with other PerlSAX modules that generate events.

XML::Handler::XMLWriter is intended to be used with PerlSAX event generators and does not perform any checking itself (for example, matching start and end element events). If you want to generate XML directly from your Perl code, use the XML::Writer module. XML::Writer has an easy to use interface and performs many checks to make sure that the XML you generate is well-formed.

XML::Handler::XMLWriter is a subclass of XML::Handler::Subs. XML::Handler::XMLWriter can be further subclassed to alter it’s behavior or to add element-specific handling. In the subclass, each time an element starts, a method by that name prefixed with `s_’ is called with the element to be processed. Each time an element ends, a method with that name prefixed with `e_’ is called. Any special characters in the element name are replaced by underscores. If there isn’t a start or end method for an element, the default action is to write the start or end tag. Start and end methods can use the `print_start_element()’ and `print_end_element()’ methods to print start or end tags. Subclasses can call the `print()’ method to write additional output.

Subclassing XML::Handler::XMLWriter in this way is similar to XML::Parser’s Stream style.

XML::Handler::Subs maintains a stack of element names, `$self-{Names}’, and a stack of element nodes, `$self-{Nodes}>’ that can be used by subclasses. The current element is pushed on the stacks before calling an element-name start method and popped off the stacks after calling the element-name end method.

See XML::Handler::Subs for additional methods.

In addition to the standard PerlSAX handler methods (see PerlSAX for descriptions), XML::Handler::XMLWriter supports the following methods:

new( OPTIONS )
Creates and returns a new instance of XML::Handler::XMLWriter with the given OPTIONS. Options may be changed at any time by modifying them directly in the hash returned. OPTIONS can be a list of key, value pairs or a hash. The following OPTIONS are supported:

Output
An IO::Handle or one of it’s subclasses (such as IO::File), if this parameter is not present and the AsString option is not used, the module will write to standard output.

AsString
Return the generated XML as a string from the `parse()’ method of the PerlSAX event generator.

Newlines
A true or false value; if this parameter is present and its value is true, then the module will insert an extra newline before the closing delimiter of start, end, and empty tags to guarantee that the document does not end up as a single, long line. If the parameter is not present, the module will not insert the newlines.

IsSGML
A true or false value; if this parameter is present and its value is true, then the module will generate SGML rather than XML.

print_start_element($element)
Print a start tag for `$element’. This is the default action for the PerlSAX `start_element()’ handler, but subclasses may use this if they define a start method for an element.

print_end_element($element)
Prints an end tag for `$element’. This is the default action for the PerlSAX `end_element()’ handler, but subclasses may use this if they define a start method for an element.

print($output)
Write `$output’ to Output and/or append it to the string to be returned. Subclasses may use this to write additional output.

TODO

  • An Elements option that provides finer control over newlines than the Newlines option, where you can choose before and after newline for element start and end tags. Inspired by the Python XMLWriter.

  • Support Doctype and XML declarations.

AUTHOR

Ken MacLeod, [email protected] This module is partially derived from XML::Writer by David Megginson.

SEE ALSO

perl (1), PerlSAX.pod (3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1498 - Linux cli command zip_source_tell

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_tell and provides detailed information about the command zip_source_tell, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_tell.

libzip (-lzip)

The function

returns the current read offset for

The return value can be passed to

with

set to

to return to the same location in the source.

Upon successful completion the current read offset is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1499 - Linux cli command getwd

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getwd and provides detailed information about the command getwd, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getwd.

NAME 🖥️ getwd 🖥️

get current working directory

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
char *getcwd(char buf[.size], size_t size);
char *get_current_dir_name(void);
[[deprecated]] char *getwd(char buf[PATH_MAX]);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

get_current_dir_name():

    _GNU_SOURCE

getwd():

    Since glibc 2.12:
        (_XOPEN_SOURCE >= 500) && ! (_POSIX_C_SOURCE >= 200809L)
            || /* glibc >= 2.19: */ _DEFAULT_SOURCE
            || /* glibc <= 2.19: */ _BSD_SOURCE
    Before glibc 2.12:
        _BSD_SOURCE || _XOPEN_SOURCE >= 500

DESCRIPTION

These functions return a null-terminated string containing an absolute pathname that is the current working directory of the calling process. The pathname is returned as the function result and via the argument buf, if present.

The getcwd() function copies an absolute pathname of the current working directory to the array pointed to by buf, which is of length size.

If the length of the absolute pathname of the current working directory, including the terminating null byte, exceeds size bytes, NULL is returned, and errno is set to ERANGE; an application should check for this error, and allocate a larger buffer if necessary.

As an extension to the POSIX.1-2001 standard, glibc’s getcwd() allocates the buffer dynamically using malloc(3) if buf is NULL. In this case, the allocated buffer has the length size unless size is zero, when buf is allocated as big as necessary. The caller should free(3) the returned buffer.

get_current_dir_name() will malloc(3) an array big enough to hold the absolute pathname of the current working directory. If the environment variable PWD is set, and its value is correct, then that value will be returned. The caller should free(3) the returned buffer.

getwd() does not malloc(3) any memory. The buf argument should be a pointer to an array at least PATH_MAX bytes long. If the length of the absolute pathname of the current working directory, including the terminating null byte, exceeds PATH_MAX bytes, NULL is returned, and errno is set to ENAMETOOLONG. (Note that on some systems, PATH_MAX may not be a compile-time constant; furthermore, its value may depend on the filesystem, see pathconf(3).) For portability and security reasons, use of getwd() is deprecated.

RETURN VALUE

On success, these functions return a pointer to a string containing the pathname of the current working directory. In the case of getcwd() and getwd() this is the same value as buf.

On failure, these functions return NULL, and errno is set to indicate the error. The contents of the array pointed to by buf are undefined on error.

ERRORS

EACCES
Permission to read or search a component of the filename was denied.

EFAULT
buf points to a bad address.

EINVAL
The size argument is zero and buf is not a null pointer.

EINVAL
getwd(): buf is NULL.

ENAMETOOLONG
getwd(): The size of the null-terminated absolute pathname string exceeds PATH_MAX bytes.

ENOENT
The current working directory has been unlinked.

ENOMEM
Out of memory.

ERANGE
The size argument is less than the length of the absolute pathname of the working directory, including the terminating null byte. You need to allocate a bigger array and try again.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getcwd(), getwd()

Thread safetyMT-Safe

get_current_dir_name()

Thread safetyMT-Safe env

VERSIONS

POSIX.1-2001 leaves the behavior of getcwd() unspecified if buf is NULL.

POSIX.1-2001 does not define any errors for getwd().

VERSIONS

C library/kernel differences

On Linux, the kernel provides a getcwd() system call, which the functions described in this page will use if possible. The system call takes the same arguments as the library function of the same name, but is limited to returning at most PATH_MAX bytes. (Before Linux 3.12, the limit on the size of the returned pathname was the system page size. On many architectures, PATH_MAX and the system page size are both 4096 bytes, but a few architectures have a larger page size.) If the length of the pathname of the current working directory exceeds this limit, then the system call fails with the error ENAMETOOLONG. In this case, the library functions fall back to a (slower) alternative implementation that returns the full pathname.

Following a change in Linux 2.6.36, the pathname returned by the getcwd() system call will be prefixed with the string “(unreachable)” if the current directory is not below the root directory of the current process (e.g., because the process set a new filesystem root using chroot(2) without changing its current directory into the new root). Such behavior can also be caused by an unprivileged user by changing the current directory into another mount namespace. When dealing with pathname from untrusted sources, callers of the functions described in this page should consider checking whether the returned pathname starts with ‘/’ or ‘(’ to avoid misinterpreting an unreachable path as a relative pathname.

STANDARDS

getcwd()
POSIX.1-2008.

get_current_dir_name()
GNU.

getwd()
None.

HISTORY

getcwd()
POSIX.1-2001.

getwd()
POSIX.1-2001, but marked LEGACY. Removed in POSIX.1-2008. Use getcwd() instead.

Under Linux, these functions make use of the getcwd() system call (available since Linux 2.1.92). On older systems they would query /proc/self/cwd. If both system call and proc filesystem are missing, a generic implementation is called. Only in that case can these calls fail under Linux with EACCES.

NOTES

These functions are often used to save the location of the current working directory for the purpose of returning to it later. Opening the current directory (".") and calling fchdir(2) to return is usually a faster and more reliable alternative when sufficiently many file descriptors are available, especially on platforms other than Linux.

BUGS

Since the Linux 2.6.36 change that added “(unreachable)” in the circumstances described above, the glibc implementation of getcwd() has failed to conform to POSIX and returned a relative pathname when the API contract requires an absolute pathname. With glibc 2.27 onwards this is corrected; calling getcwd() from such a pathname will now result in failure with ENOENT.

SEE ALSO

pwd(1), chdir(2), fchdir(2), open(2), unlink(2), free(3), malloc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1500 - Linux cli command X11_Protocol_Ext_BIG_REQUESTSpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command X11_Protocol_Ext_BIG_REQUESTSpm and provides detailed information about the command X11_Protocol_Ext_BIG_REQUESTSpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the X11_Protocol_Ext_BIG_REQUESTSpm.

NAME 🖥️ X11_Protocol_Ext_BIG_REQUESTSpm 🖥️

Perl module for the X11 protocol Big Requests extension

SYNOPSIS

use X11::Protocol; $x = X11::Protocol->new($ENV{DISPLAY}); $x->init_extension(BIG_REQUESTS) or die;

DESCRIPTION

This module is used by the X11::Protocol module to participate in the ‘Big Requests’ extension to the X protocol. Once initialized, it transparently allows requests of more than 262140 (65535 * 4) bytes. The new maximum request length is available as $x->maximum_request_length.

AUTHOR

Stephen McCamant <[email protected]>.

SEE ALSO

perl (1), X11::Protocol, Big Requests Extension (X Consortium Standard).

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1501 - Linux cli command fmaxf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fmaxf and provides detailed information about the command fmaxf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fmaxf.

NAME 🖥️ fmaxf 🖥️

determine maximum of two floating-point numbers

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double fmax(double x, double y);
float fmaxf(float x, float y);
long double fmaxl(long double x, long double y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

fmax(), fmaxf(), fmaxl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions return the larger value of x and y.

RETURN VALUE

These functions return the maximum of x and y.

If one argument is a NaN, the other argument is returned.

If both arguments are NaN, a NaN is returned.

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fmax(), fmaxf(), fmaxl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

fdim(3), fmin(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1502 - Linux cli command xdr_wrapstring

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_wrapstring and provides detailed information about the command xdr_wrapstring, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_wrapstring.

NAME 🖥️ xdr_wrapstring 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1503 - Linux cli command jn

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command jn and provides detailed information about the command jn, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the jn.

NAME 🖥️ jn 🖥️

Bessel functions of the first kind

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double j0(double x);
double j1(double x);
double jn(int n, double x);
float j0f(float x);
float j1f(float x);
float jnf(int n, float x);
long double j0l(long double x);
long double j1l(long double x);
long double jnl(int n, long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

j0(), j1(), jn():

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

j0f(), j0l(), j1f(), j1l(), jnf(), jnl():

    _XOPEN_SOURCE >= 600
        || (_ISOC99_SOURCE && _XOPEN_SOURCE)
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The j0() and j1() functions return Bessel functions of x of the first kind of orders 0 and 1, respectively. The jn() function returns the Bessel function of x of the first kind of order n.

The j0f(), j1f(), and jnf(), functions are versions that take and return float values. The j0l(), j1l(), and jnl() functions are versions that take and return long double values.

RETURN VALUE

On success, these functions return the appropriate Bessel value of the first kind for x.

If x is a NaN, a NaN is returned.

If x is too large in magnitude, or the result underflows, a range error occurs, and the return value is 0.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error: result underflow, or x is too large in magnitude
errno is set to ERANGE.

These functions do not raise exceptions for fetestexcept(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

j0(), j0f(), j0l()

Thread safetyMT-Safe

j1(), j1f(), j1l()

Thread safetyMT-Safe

jn(), jnf(), jnl()

Thread safetyMT-Safe

STANDARDS

j0()
j1()
jn()
POSIX.1-2008.

Others:
BSD.

HISTORY

j0()
j1()
jn()
SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008.

Others:
BSD.

BUGS

There are errors of up to 2e-16 in the values returned by j0(), j1(), and jn() for values of x between -8 and 8.

SEE ALSO

y0(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1504 - Linux cli command wmempcpy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wmempcpy and provides detailed information about the command wmempcpy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wmempcpy.

NAME 🖥️ wmempcpy 🖥️

copy memory area

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <string.h>
void *mempcpy(void dest[restrict .n], const void src[restrict .n],
 size_t n);
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <wchar.h>
wchar_t *wmempcpy(wchar_t dest[restrict .n],
 const wchar_t src[restrict .n],
 size_t n);

DESCRIPTION

The mempcpy() function is nearly identical to the memcpy(3) function. It copies n bytes from the object beginning at src into the object pointed to by dest. But instead of returning the value of dest it returns a pointer to the byte following the last written byte.

This function is useful in situations where a number of objects shall be copied to consecutive memory positions.

The wmempcpy() function is identical but takes wchar_t type arguments and copies n wide characters.

RETURN VALUE

dest + n.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mempcpy(), wmempcpy()

Thread safetyMT-Safe

STANDARDS

GNU.

HISTORY

glibc 2.1.

EXAMPLES

void *
combine(void *o1, size_t s1, void *o2, size_t s2)
{
    void *result = malloc(s1 + s2);
    if (result != NULL)
        mempcpy(mempcpy(result, o1, s1), o2, s2);
    return result;
}

SEE ALSO

memccpy(3), memcpy(3), memmove(3), wmemcpy(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1505 - Linux cli command XML_Handler_Samplepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_Handler_Samplepm and provides detailed information about the command XML_Handler_Samplepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_Handler_Samplepm.

NAME 🖥️ XML_Handler_Samplepm 🖥️

a trivial PerlSAX handler

SYNOPSIS

use XML::Parser::PerlSAX; use XML::Handler::Sample; $my_handler = XML::Handler::Sample->new; XML::Parser::PerlSAX->new->parse(Source => { SystemId => REC-xml-19980210.xml }, Handler => $my_handler);

DESCRIPTION

XML::Handler::Sample is a trivial PerlSAX handler that prints out the name of each event it receives. The source for XML::Handler::Sample lists all the currently known PerlSAX handler methods.

XML::Handler::Sample is intended for Perl module authors who wish to look at example PerlSAX handler modules. XML::Handler::Sample can be used as a template for writing your own PerlSAX handler modules. XML::Handler::Sample is in the Public Domain and can be used for any purpose without restriction.

AUTHOR

Ken MacLeod, [email protected]

SEE ALSO

perl (1), PerlSAX.pod (3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1506 - Linux cli command zip_file_extra_field_get_by_id

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_file_extra_field_get_by_id and provides detailed information about the command zip_file_extra_field_get_by_id, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_file_extra_field_get_by_id.

libzip (-lzip)

The

function returns the extra field with index

for the file at position

in the zip archive. This pointer should not be modified or

and becomes invalid when

is closed. If

is not

the integer to which it points will be set to the ID (two-byte signature) of the selected extra field. If

is not

the integer to which it points will be set to the length of the extra field. Generally speaking,

and

should be passed since only the extra field data is returned (i.e., neither the ID nor the length, if the

and

arguments are not provided).

The following

are supported:

Return extra fields from the archive’s central directory.

Return extra fields from the local file headers.

Return the original unchanged extra fields, ignoring any changes made.

The

function returns the extra field with ID (two-byte signature)

and index

(in other words, the

extra field with ID

The other arguments are the same as for

Upon successful completion, a pointer to an extra field is returned, or

if there is no extra field with that

for the file with index

In case of an error,

is returned and the error code in

is set to indicate the error.

and

fail if:

is not a valid file index in

or

is not a valid extra file index (for ID

and

were added in libzip 0.11.

and

Please note that the extra field IDs 0x0001 (ZIP64 extension), 0x6375 (Infozip UTF-8 comment), and 0x7075 (Infozip UTF-8 file name) can not be read using

since they are used by

internally.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1507 - Linux cli command HTML_Tree_Scanningpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_Tree_Scanningpm and provides detailed information about the command HTML_Tree_Scanningpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_Tree_Scanningpm.

NAME 🖥️ HTML_Tree_Scanningpm 🖥️

  • article: “Scanning HTML”

SYNOPSIS

# This an article, not a module.

DESCRIPTION

The following article by Sean M. Burke first appeared in The Perl Journal #19 and is copyright 2000 The Perl Journal. It appears courtesy of Jon Orwant and The Perl Journal. This document may be distributed under the same terms as Perl itself.

(Note that this is discussed in chapters 6 through 10 of the book Perl and LWP <http://lwp.interglacial.com/> which was written after the following documentation, and which is available free online.)

Scanning HTML

– Sean M. Burke

In The Perl Journal issue 17, Ken MacFarlane’s article Parsing HTML with HTML::Parser describes how the HTML::Parser module scans HTML source as a stream of start-tags, end-tags, text, comments, etc. In TPJ #18, my Trees article kicked around the idea of tree-shaped data structures. Now I’ll try to tie it together, in a discussion of HTML trees.

The CPAN module HTML::TreeBuilder takes the tags that HTML::Parser picks out, and builds a parse tree Ω- a tree-shaped network of objects…

Footnote: And if you need a quick explanation of objects, see my TPJ17 article A User’s View of Object-Oriented Modules; or go whole hog and get Damian Conway’s excellent book Object-Oriented Perl, from Manning Publications.

…representing the structured content of the HTML document. And once the document is parsed as a tree, you’ll find the common tasks of extracting data from that HTML document/tree to be quite straightforward.

HTML::Parser, HTML::TreeBuilder, and HTML::Element

You use HTML::TreeBuilder to make a parse tree out of an HTML source file, by simply saying:

use HTML::TreeBuilder; my $tree = HTML::TreeBuilder->new(); $tree->parse_file(foo.html);

and then $tree contains a parse tree built from the HTML source from the file foo.html. The way this parse tree is represented is with a network of objects Ω- $tree is the root, an element with tag-name html, and its children typically include a head and body element, and so on. Elements in the tree are objects of the class HTML::Element.

So, if you take this source:

<html><head><title>Doc 1</title></head> <body> Stuff <hr> 2000-08-17 </body></html>

and feed it to HTML::TreeBuilder, it’ll return a tree of objects that looks like this:

html / \ head body / / | \ title “Stuff” hr “2000-08-17” | “Doc 1”

This is a pretty simple document, but if it were any more complex, it’d be a bit hard to draw in that style, since it’s sprawl left and right. The same tree can be represented a bit more easily sideways, with indenting:

. html . head . title . “Doc 1” . body . “Stuff” . hr . “2000-08-17”

Either way expresses the same structure. In that structure, the root node is an object of the class HTML::Element

Footnote: Well actually, the root is of the class HTML::TreeBuilder, but that’s just a subclass of HTML::Element, plus the few extra methods like parse_file that elaborate the tree

, with the tag name html, and with two children: an HTML::Element object whose tag names are head and body. And each of those elements have children, and so on down. Not all elements (as we’ll call the objects of class HTML::Element) have children Ω- the hr element doesn’t. And note all nodes in the tree are elements Ω- the text nodes (Doc 1, Stuff, and 2000-08-17) are just strings.

Objects of the class HTML::Element each have three noteworthy attributes:

“_tag” Ω- (best accessed as “$e->tag”) this element’s tag-name, lowercased (e.g., “em” for an “em” element).

Footnote: Yes, this is misnamed. In proper SGML terminology, this is instead called a GI, short for generic identifier; and the term tag is used for a token of SGML source that represents either the start of an element (a start-tag like <em lang=‘fr’>) or the end of an element (an end-tag like </em>. However, since more people claim to have been abducted by aliens than to have ever seen the SGML standard, and since both encounters typically involve a feeling of missing time, it’s not surprising that the terminology of the SGML standard is not closely followed.

“_parent” Ω- (best accessed as “$e->parent”) the element that is $obj’s parent, or undef if this element is the root of its tree.

“_content” Ω- (best accessed as “$e->content_list”) the list of nodes (i.e., elements or text segments) that are $e’s children.

Moreover, if an element object has any attributes in the SGML sense of the word, then those are readable as $e->attr(name) Ω- for example, with the object built from having parsed “<a id=‘foo’>bar</a>”, $e->attr(id) will return the string foo. Moreover, $e->tag on that object returns the string a, $e->content_list returns a list consisting of just the single scalar bar, and $e->parent returns the object that’s this node’s parent Ω- which may be, for example, a p element.

And that’s all that there is to it Ω- you throw HTML source at TreeBuilder, and it returns a tree built of HTML::Element objects and some text strings.

However, what do you do with a tree of objects? People code information into HTML trees not for the fun of arranging elements, but to represent the structure of specific text and images Ω- some text is in this li element, some other text is in that heading, some images are in that other table cell that has those attributes, and so on.

Now, it may happen that you’re rendering that whole HTML tree into some layout format. Or you could be trying to make some systematic change to the HTML tree before dumping it out as HTML source again. But, in my experience, by far the most common programming task that Perl programmers face with HTML is in trying to extract some piece of information from a larger document. Since that’s so common (and also since it involves concepts that are basic to more complex tasks), that is what the rest of this article will be about.

Scanning HTML trees

Suppose you have a thousand HTML documents, each of them a press release. They all start out:

[…lots of leading images and junk…] <h1>ConGlomCo to Open New Corporate Office in Ougadougou</h1> BAKERSFIELD, CA, 2000-04-24 – ConGlomCos vice president in charge of world conquest, Rock Feldspar, announced today the opening of a new office in Ougadougou, the capital city of Burkino Faso, gateway to the bustling “Silicon Sahara” of Africa… […etc…]

…and what you’ve got to do is, for each document, copy whatever text is in the h1 element, so that you can, for example, make a table of contents of it. Now, there are three ways to do this:

  • You can just use a regexp to scan the file for a text pattern. For many very simple tasks, this will do fine. Many HTML documents are, in practice, very consistently formatted as far as placement of linebreaks and whitespace, so you could just get away with scanning the file like so: sub get_heading { my $filename = $_[0]; local *HTML; open(HTML, $filename) or die “Couldnt open $filename); my $heading; Line: while(<HTML>) { if( m{<h1>(.*?)</h1>}i ) { # match it! $heading = $1; last Line; } } close(HTML); warn “No heading in $filename?” unless defined $heading; return $heading; } This is quick and fast, but awfully fragile Ω- if there’s a newline in the middle of a heading’s text, it won’t match the above regexp, and you’ll get an error. The regexp will also fail if the h1 element’s start-tag has any attributes. If you have to adapt your code to fit more kinds of start-tags, you’ll end up basically reinventing part of HTML::Parser, at which point you should probably just stop, and use HTML::Parser itself:

  • You can use HTML::Parser to scan the file for an h1 start-tag token, then capture all the text tokens until the h1 close-tag. This approach is extensively covered in the Ken MacFarlane’s TPJ17 article Parsing HTML with HTML::Parser. (A variant of this approach is to use HTML::TokeParser, which presents a different and rather handier interface to the tokens that HTML::Parser picks out.) Using HTML::Parser is less fragile than our first approach, since it’s not sensitive to the exact internal formatting of the start-tag (much less whether it’s split across two lines). However, when you need more information about the context of the h1 element, or if you’re having to deal with any of the tricky bits of HTML, such as parsing of tables, you’ll find out the flat list of tokens that HTML::Parser returns isn’t immediately useful. To get something useful out of those tokens, you’ll need to write code that knows some things about what elements take no content (as with hr elements), and that a </p> end-tags are omissible, so a <p> will end any currently open paragraph Ω- and you’re well on your way to pointlessly reinventing much of the code in HTML::TreeBuilder

    Footnote: And, as the person who last rewrote that module, I can attest that it wasn’t terribly easy to get right! Never underestimate the perversity of people coding HTML.

    , at which point you should probably just stop, and use HTML::TreeBuilder itself:

  • You can use HTML::Treebuilder, and scan the tree of element objects that you get back.

The last approach, using HTML::TreeBuilder, is the diametric opposite of first approach: The first approach involves just elementary Perl and one regexp, whereas the TreeBuilder approach involves being at home with the concept of tree-shaped data structures and modules with object-oriented interfaces, as well as with the particular interfaces that HTML::TreeBuilder and HTML::Element provide.

However, what the TreeBuilder approach has going for it is that it’s the most robust, because it involves dealing with HTML in its native format Ω- it deals with the tree structure that HTML code represents, without any consideration of how the source is coded and with what tags omitted.

So, to extract the text from the h1 elements of an HTML document:

sub get_heading { my $tree = HTML::TreeBuilder->new; $tree->parse_file($_[0]); # ! my $heading; my $h1 = $tree->look_down(_tag, h1); # ! if($h1) { $heading = $h1->as_text; # ! } else { warn “No heading in $_[0]?”; } $tree->delete; # clear memory! return $heading; }

This uses some unfamiliar methods that need explaining. The parse_file method that we’ve seen before, builds a tree based on source from the file given. The delete method is for marking a tree’s contents as available for garbage collection, when you’re done with the tree. The as_text method returns a string that contains all the text bits that are children (or otherwise descendants) of the given node Ω- to get the text content of the $h1 object, we could just say:

$heading = join , $h1->content_list;

but that will work only if we’re sure that the h1 element’s children will be only text bits Ω- if the document contained:

<h1>Local Man Sees <cite>Blade</cite> Again</h1>

then the sub-tree would be:

. h1 . “Local Man Sees " . cite . “Blade” . " Again

so join , $h1->content_list will be something like:

Local Man Sees HTML::Element=HASH(0x15424040) Again

whereas $h1->as_text would yield:

Local Man Sees Blade Again

and depending on what you’re doing with the heading text, you might want the as_HTML method instead. It returns the (sub)tree represented as HTML source. $h1->as_HTML would yield:

<h1>Local Man Sees <cite>Blade</cite> Again</h1>

However, if you wanted the contents of $h1 as HTML, but not the $h1 itself, you could say:

join , map( ref($_) ? $_->as_HTML : $_, $h1->content_list )

This map iterates over the nodes in $h1’s list of children; and for each node that’s just a text bit (as Local Man Sees is), it just passes through that string value, and for each node that’s an actual object (causing ref to be true), as_HTML will used instead of the string value of the object itself (which would be something quite useless, as most object values are). So that as_HTML for the cite element will be the string <cite>Blade</cite>. And then, finally, join just puts into one string all the strings that the map returns.

Last but not least, the most important method in our get_heading sub is the look_down method. This method looks down at the subtree starting at the given object ($h1), looking for elements that meet criteria you provide.

The criteria are specified in the method’s argument list. Each criterion can consist of two scalars, a key and a value, which express that you want elements that have that attribute (like _tag, or src) with the given value (h1); or the criterion can be a reference to a subroutine that, when called on the given element, returns true if that is a node you’re looking for. If you specify several criteria, then that’s taken to mean that you want all the elements that each satisfy all the criteria. (In other words, there’s an implicit AND.)

And finally, there’s a bit of an optimization Ω- if you call the look_down method in a scalar context, you get just the first node (or undef if none) Ω- and, in fact, once look_down finds that first matching element, it doesn’t bother looking any further.

So the example:

$h1 = $tree->look_down(_tag, h1);

returns the first element at-or-under $tree whose "_tag" attribute has the value "h1".

Complex Criteria in Tree Scanning

Now, the above look_down code looks like a lot of bother, with barely more benefit than just grepping the file! But consider if your criteria were more complicated Ω- suppose you found that some of the press releases that you were scanning had several h1 elements, possibly before or after the one you actually want. For example:

<h1><center>Visit Our Corporate Partner <br><a href="/dyna/clickthru” ><img src="/dyna/vend_ad”></a> </center></h1> <h1><center>ConGlomCo President Schreck to Visit Regional HQ <br><a href="/photos/Schreck_visit_large.jpg" ><img src="/photos/Schreck_visit.jpg"></a> </center></h1>

Here, you want to ignore the first h1 element because it contains an ad, and you want the text from the second h1. The problem is in formalizing the way you know that it’s an ad. Since ad banners are always entreating you to visit the sponsoring site, you could exclude h1 elements that contain the word visit under them:

my $real_h1 = $tree->look_down( _tag, h1, sub { $_[0]->as_text !~ m/visit/i } );

The first criterion looks for h1 elements, and the second criterion limits those to only the ones whose text content doesn’t match m/visit/. But unfortunately, that won’t work for our example, since the second h1 mentions “ConGlomCo President Schreck to Visit Regional HQ”.

Instead you could try looking for the first h1 element that doesn’t contain an image:

my $real_h1 = $tree->look_down( _tag, h1, sub { not $_[0]->look_down(_tag, img) } );

This criterion sub might seem a bit odd, since it calls look_down as part of a larger look_down operation, but that’s fine. Note that when considered as a boolean value, a look_down in a scalar context value returns false (specifically, undef) if there’s no matching element at or under the given element; and it returns the first matching element (which, being a reference and object, is always a true value), if any matches. So, here,

sub { not $_[0]->look_down(_tag, img) }

means return true only if this element has no ‘img’ element as descendants (and isn’t an ‘img’ element itself).

This correctly filters out the first h1 that contains the ad, but it also incorrectly filters out the second h1 that contains a non-advertisement photo besides the headline text you want.

There clearly are detectable differences between the first and second h1 elements Ω- the only second one contains the string Schreck, and we could just test for that:

my $real_h1 = $tree->look_down( _tag, h1, sub { $_[0]->as_text =~ m{Schreck} } );

And that works fine for this one example, but unless all thousand of your press releases have Schreck in the headline, that’s just not a general solution. However, if all the ads-in-h1s that you want to exclude involve a link whose URL involves /dyna/, then you can use that:

my $real_h1 = $tree->look_down( _tag, h1, sub { my $link = $_[0]->look_down(_tag,a); return 1 unless $link; # no link means its fine return 0 if $link->attr(href) =~ m{/dyna/}; # a link to there is bad return 1; # otherwise okay } );

Or you can look at it another way and say that you want the first h1 element that either contains no images, or else whose image has a src attribute whose value contains /photos/:

my $real_h1 = $tree->look_down( _tag, h1, sub { my $img = $_[0]->look_down(_tag,img); return 1 unless $img; # no image means its fine return 1 if $img->attr(src) =~ m{/photos/}; # good if a photo return 0; # otherwise bad } );

Recall that this use of look_down in a scalar context means to return the first element at or under $tree that matches all the criteria. But if you notice that you can formulate criteria that’ll match several possible h1 elements, some of which may be bogus but the last one of which is always the one you want, then you can use look_down in a list context, and just use the last element of that list:

my @h1s = $tree->look_down( _tag, h1, …maybe more criteria… ); die “What, no h1s here?” unless @h1s; my $real_h1 = $h1s[-1]; # last or only

A Case Study: Scanning Yahoo News’s HTML

The above (somewhat contrived) case involves extracting data from a bunch of pre-existing HTML files. In that sort of situation, if your code works for all the files, then you know that the code works Ω- since the data it’s meant to handle won’t go changing or growing; and, typically, once you’ve used the program, you’ll never need to use it again.

The other kind of situation faced in many data extraction tasks is where the program is used recurringly to handle new data Ω- such as from ever-changing Web pages. As a real-world example of this, consider a program that you could use (suppose it’s crontabbed) to extract headline-links from subsections of Yahoo News (http://dailynews.yahoo.com/).

Yahoo News has several subsections:

http://dailynews.yahoo.com/h/tc/ for technology news

http://dailynews.yahoo.com/h/sc/ for science news

http://dailynews.yahoo.com/h/hl/ for health news

http://dailynews.yahoo.com/h/wl/ for world news

http://dailynews.yahoo.com/h/en/ for entertainment news

and others. All of them are built on the same basic HTML template Ω- and a scarily complicated template it is, especially when you look at it with an eye toward making up rules that will select where the real headline-links are, while screening out all the links to other parts of Yahoo, other news services, etc. You will need to puzzle over the HTML source, and scrutinize the output of $tree->dump on the parse tree of that HTML.

Sometimes the only way to pin down what you’re after is by position in the tree. For example, headlines of interest may be in the third column of the second row of the second table element in a page:

my $table = ( $tree->look_down(_tag,table) )[1]; my $row2 = ( $table->look_down(_tag, tr ) )[1]; my $col3 = ( $row2->look-down(_tag, td) )[2]; …then do things with $col3…

Or they may be all the links in a p element that has at least three br elements as children:

my $p = $tree->look_down( _tag, p, sub { 2 < grep { ref($_) and $_->tag eq br } $_[0]->content_list } ); @links = $p->look_down(_tag, a);

But almost always, you can get away with looking for properties of the of the thing itself, rather than just looking for contexts. Now, if you’re lucky, the document you’re looking through has clear semantic tagging, such is as useful in CSS Ω- note the class=headlinelink bit here:

<a href="…long_news_url…" class=“headlinelink”>Elvis seen in tortilla</a>

If you find anything like that, you could leap right in and select links with:

@links = $tree->look_down(class,headlinelink);

Regrettably, your chances of seeing any sort of semantic markup principles really being followed with actual HTML are pretty thin.

Footnote: In fact, your chances of finding a page that is simply free of HTML errors are even thinner. And surprisingly, sites like Amazon or Yahoo are typically worse as far as quality of code than personal sites whose entire production cycle involves simply being saved and uploaded from Netscape Composer.

The code may be sort of accidentally semantic, however Ω- for example, in a set of pages I was scanning recently, I found that looking for td elements with a width attribute value of 375 got me exactly what I wanted. No-one designing that page ever conceived of width=375 as meaning this is a headline, but if you impute it to mean that, it works.

An approach like this happens to work for the Yahoo News code, because the headline-links are distinguished by the fact that they (and they alone) contain a b element:

<a href="…long_news_url…"><b>Elvis seen in tortilla</b></a>

or, diagrammed as a part of the parse tree:

. a [href="…long_news_url…"] . b . “Elvis seen in tortilla”

A rule that matches these can be formalized as look for any ‘a’ element that has only one daughter node, which must be a ‘b’ element. And this is what it looks like when cooked up as a look_down expression and prefaced with a bit of code that retrieves the text of the given Yahoo News page and feeds it to TreeBuilder:

use strict; use HTML::TreeBuilder 2.97; use LWP::UserAgent; sub get_headlines { my $url = $_[0] || die “What URL?”; my $response = LWP::UserAgent->new->request( HTTP::Request->new( GET => $url ) ); unless($response->is_success) { warn “Couldnt get $url: “, $response->status_line, " “; return; } my $tree = HTML::TreeBuilder->new(); $tree->parse($response->content); $tree->eof; my @out; foreach my $link ( $tree->look_down( # ! _tag, a, sub { return unless $_[0]->attr(href); my @c = $_[0]->content_list; @c == 1 and ref $c[0] and $c[0]->tag eq b; } ) ) { push @out, [ $link->attr(href), $link->as_text ]; } warn “Odd, fewer than 6 stories in $url!” if @out < 6; $tree->delete; return @out; }

…and add a bit of code to actually call that routine and display the results…

foreach my $section (qw[tc sc hl wl en]) { my @links = get_headlines( “http://dailynews.yahoo.com/h/$section/" ); print $section, “: “, scalar(@links), " stories “, map((” “, $_->[0], " : “, $_->[1], " “), @links), " “; }

And we’ve got our own headline-extractor service! This in and of itself isn’t no amazingly useful (since if you want to see the headlines, you can just look at the Yahoo News pages), but it could easily be the basis for quite useful features like filtering the headlines for matching certain keywords of interest to you.

Now, one of these days, Yahoo News will decide to change its HTML template. When this happens, this will appear to the above program as there being no links that meet the given criteria; or, less likely, dozens of erroneous links will meet the criteria. In either case, the criteria will have to be changed for the new template; they may just need adjustment, or you may need to scrap them and start over.

Regardez, duvet!

It’s often quite a challenge to write criteria to match the desired parts of an HTML parse tree. Very often you can pull it off with a simple $tree->look_down(_tag, h1), but sometimes you do have to keep adding and refining criteria, until you might end up with complex filters like what I’ve shown in this article. The benefit to learning how to deal with HTML parse trees is that one main search tool, the look_down method, can do most of the work, making simple things easy, while still making hard things possible.

[end body of article]

[Author Credit]

Sean M. Burke ([email protected]) is the current maintainer of HTML::TreeBuilder and HTML::Element, both originally by Gisle Aas.

Sean adds: I’d like to thank the folks who listened to me ramble incessantly about HTML::TreeBuilder and HTML::Element at this year’s Yet Another Perl Conference and O’Reilly Open Source Software Convention.

BACK

Return to the HTML::Tree docs.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1508 - Linux cli command Image_ExifTool_ITCpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_ITCpm and provides detailed information about the command Image_ExifTool_ITCpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_ITCpm.

NAME 🖥️ Image_ExifTool_ITCpm 🖥️

Read iTunes Cover Flow meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains the routines required by Image::ExifTool to read meta information (including artwork images) from iTunes Cover Flow files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.waldoland.com/dev/Articles/ITCFileFormat.aspx>

<http://www.falsecognate.org/2007/01/deciphering_the_itunes_itc_fil/>

SEE ALSO

“ITC Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1509 - Linux cli command fpurge

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fpurge and provides detailed information about the command fpurge, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fpurge.

NAME 🖥️ fpurge 🖥️

purge a stream

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

/* unsupported */
#include <stdio.h>
int fpurge(FILE *stream);
/* supported */
#include <stdio.h>
#include <stdio_ext.h>
void __fpurge(FILE *stream);

DESCRIPTION

The function fpurge() clears the buffers of the given stream. For output streams this discards any unwritten output. For input streams this discards any input read from the underlying object but not yet obtained via getc(3); this includes any text pushed back via ungetc(3). See also fflush(3).

The function __fpurge() does precisely the same, but without returning a value.

RETURN VALUE

Upon successful completion fpurge() returns 0. On error, it returns -1 and sets errno to indicate the error.

ERRORS

EBADF
stream is not an open stream.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

__fpurge()

Thread safetyMT-Safe race:stream

STANDARDS

None.

HISTORY

fpurge()
4.4BSD. Not available under Linux.

__fpurge()
Solaris, glibc 2.1.95.

NOTES

Usually it is a mistake to want to discard input buffers.

SEE ALSO

fflush(3), setbuf(3), stdio_ext(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1510 - Linux cli command IO_Multiplexpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_Multiplexpm and provides detailed information about the command IO_Multiplexpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_Multiplexpm.

NAME 🖥️ IO_Multiplexpm 🖥️

Manage IO on many file handles

SYNOPSIS

use IO::Multiplex; my $mux = new IO::Multiplex; $mux->add($fh1); $mux->add(\FH2); $mux->set_callback_object(…); $mux->listen($server_socket); $mux->loop; sub mux_input { … }

IO::Multiplex is designed to take the effort out of managing multiple file handles. It is essentially a really fancy front end to the select system call. In addition to maintaining the select loop, it buffers all input and output to/from the file handles. It can also accept incoming connections on one or more listen sockets.

DESCRIPTION

It is object oriented in design, and will notify you of significant events by calling methods on an object that you supply. If you are not using objects, you can simply supply _ _PACKAGE_ _ instead of an object reference.

You may have one callback object registered for each file handle, or one global one. Possibly both Ω- the per-file handle callback object will be used instead of the global one.

Each file handle may also have a timer associated with it. A callback function is called when the timer expires.

Handling input on descriptors

When input arrives on a file handle, the mux_input method is called on the appropriate callback object. This method is passed three arguments (in addition to the object reference itself of course):

  1. a reference to the mux,

  2. A reference to the file handle, and

  3. a reference to the input buffer for the file handle.

The method should remove the data that it has consumed from the reference supplied. It may leave unconsumed data in the input buffer.

Handling output to descriptors

If IO::Multiplex did not handle output to the file handles as well as input from them, then there is a chance that the program could block while attempting to write. If you let the multiplexer buffer the output, it will write the data only when the file handle is capable of receiveing it.

The basic method for handing output to the multiplexer is the write method, which simply takes a file descriptor and the data to be written, like this:

$mux->write($fh, “Some data”);

For convenience, when the file handle is added to the multiplexer, it is tied to a special class which intercepts all attempts to write to the file handle. Thus, you can use print and printf to send output to the handle in a normal manner:

printf $fh “%s%d%X”, $foo, $bar, $baz

Unfortunately, Perl support for tied file handles is incomplete, and functions such as send cannot be supported.

Also, file handle object methods such as the send method of IO::Socket cannot be intercepted.

EXAMPLES

Simple Example

This is a simple telnet-like program, which demonstrates the concepts covered so far. It does not really work too well against a telnet server, but it does OK against the sample server presented further down.

use IO::Socket; use IO::Multiplex; # Create a multiplex object my $mux = new IO::Multiplex; # Connect to the host/port specified on the command line, # or localhost:23 my $sock = new IO::Socket::INET(Proto => tcp, PeerAddr => shift || localhost, PeerPort => shift || 23) or die “socket: $@”; # add the relevant file handles to the mux $mux->add($sock); $mux->add(\STDIN); # We want to buffer output to the terminal. This prevents the program # from blocking if the user hits CTRL-S for example. $mux->add(\STDOUT); # Were not object oriented, so just request callbacks to the # current package $mux->set_callback_object(_ _PACKAGE_ _); # Enter the main mux loop. $mux->loop; # mux_input is called when input is available on one of # the descriptors. sub mux_input { my $package = shift; my $mux = shift; my $fh = shift; my $input = shift; # Figure out whence the input came, and send it on to the # other place. if ($fh == $sock) { print STDOUT $$input; } else { print $sock $$input; } # Remove the input from the input buffer. $$input = ; } # This gets called if the other end closes the connection. sub mux_close { print STDERR “Connection Closed “; exit; }

A server example

Servers are just as simple to write. We just register a listen socket with the multiplex object listen method. It will automatically accept connections on it and add them to its list of active file handles.

This example is a simple chat server.

use IO::Socket; use IO::Multiplex; my $mux = new IO::Multiplex; # Create a listening socket my $sock = new IO::Socket::INET(Proto => tcp, LocalPort => shift || 2300, Listen => 4) or die “socket: $@”; # We use the listen method instead of the add method. $mux->listen($sock); $mux->set_callback_object(_ _PACKAGE_ _); $mux->loop; sub mux_input { my $package = shift; my $mux = shift; my $fh = shift; my $input = shift; # The handles method returns a list of references to handles which # we have registered, except for listen sockets. foreach $c ($mux->handles) { print $c $$input; } $$input = ; }

A more complex server example

Let us take a look at the beginnings of a multi-user game server. We will have a Player object for each player.

# Paste the above example in here, up to but not including the # mux_input subroutine. # mux_connection is called when a new connection is accepted. sub mux_connection { my $package = shift; my $mux = shift; my $fh = shift; # Construct a new player object Player->new($mux, $fh); } package Player; my %players = (); sub new { my $package = shift; my $self = bless { mux => shift, fh => shift } => $package; # Register the new player object as the callback specifically for # this file handle. $self->{mux}->set_callback_object($self, $self->{fh}); print $self->{fh} “Greetings, Professor. Would you like to play a game? “; # Register this player object in the main list of players $players{$self} = $self; $mux->set_timeout($self->{fh}, 1); } sub players { return values %players; } sub mux_input { my $self = shift; shift; shift; # These two args are boring my $input = shift; # Scalar reference to the input # Process each line in the input, leaving partial lines # in the input buffer while ($$input =~ s/^(.*?) //) { $self->process_command($1); } } sub mux_close { my $self = shift; # Player disconnected; # [Notify other players or something…] delete $players{$self}; } # This gets called every second to update player info, etc… sub mux_timeout { my $self = shift; my $mux = shift; $self->heartbeat; $mux->set_timeout($self->{fh}, 1); }

METHODS

new

Construct a new IO::Multiplex object.

$mux = new IO::Multiplex;

listen

Add a socket to be listened on. The socket should have had the bind and listen system calls already applied to it. The IO::Socket module will do this for you.

$socket = new IO::Socket::INET(Listen => …, LocalAddr => …); $mux->listen($socket);

Connections will be automatically accepted and added to the multiplex object. The mux_connection callback method will also be called.

add

Add a file handle to the multiplexer.

$mux->add($fh);

As a side effect, this sets non-blocking mode on the handle, and disables STDIO buffering. It also ties it to intercept output to the handle.

remove

Removes a file handle from the multiplexer. This also unties the handle. It does not currently turn STDIO buffering back on, or turn off non-blocking mode.

$mux->remove($fh);

set_callback_object

Set the object on which callbacks are made. If you are not using objects, you can specify the name of the package into which the method calls are to be made.

If a file handle is supplied, the callback object is specific for that handle:

$mux->set_callback_object($object, $fh);

Otherwise, it is considered a default callback object, and is used when events occur on a file handle that does not have its own callback object.

$mux->set_callback_object(_ _PACKAGE_ _);

The previously registered object (if any) is returned.

See also the CALLBACK INTERFACE section.

kill_output

Remove any pending output on a file descriptor.

$mux->kill_output($fh);

outbuffer

Return or set the output buffer for a descriptor

$output = $mux->outbuffer($fh); $mux->outbuffer($fh, $output);

inbuffer

Return or set the input buffer for a descriptor

$input = $mux->inbuffer($fh); $mux->inbuffer($fh, $input);

set_timeout

Set the timer for a file handle. The timeout value is a certain number of seconds in the future, after which the mux_timeout callback is called.

If the Time::HiRes module is installed, the timers may be specified in fractions of a second.

Timers are not reset automatically.

$mux->set_timeout($fh, 23.6);

Use $mux->set_timeout($fh, undef) to cancel a timer.

handles

Returns a list of handles that the IO::Multiplex object knows about, excluding listen sockets.

@handles = $mux->handles;

loop

Enter the main loop and start processing IO events.

$mux->loop;

endloop

Prematurly terminate the loop. The loop will automatically terminate when there are no remaining descriptors to be watched.

$mux->endloop;

udp_peer

Get peer endpoint of where the last udp packet originated.

$saddr = $mux->udp_peer($fh);

is_udp

Sometimes UDP packets require special attention. This method will tell if a file handle is of type UDP.

$is_udp = $mux->is_udp($fh);

write

Send output to a file handle.

$mux->write($fh, “ere I am, JH! “);

shutdown

Shut down a socket for reading or writing or both. See the shutdown Perl documentation for further details.

If the shutdown is for reading, it happens immediately. However, shutdowns for writing are delayed until any pending output has been successfully written to the socket.

$mux->shutdown($socket, 1);

close

Close a handle. Always use this method to close a handle that is being watched by the multiplexer.

$mux->close($fh);

CALLBACK INTERFACE

Callback objects should support the following interface. You do not have to provide all of these methods, just provide the ones you are interested in.

All methods receive a reference to the callback object (or package) as their first argument, in the traditional object oriented way. References to the IO::Multiplex object and the relevant file handle are also provided. This will be assumed in the method descriptions.

mux_input

Called when input is ready on a descriptor. It is passed a reference to the input buffer. It should remove any input that it has consumed, and leave any partially received data in the buffer.

sub mux_input { my $self = shift; my $mux = shift; my $fh = shift; my $data = shift; # Process each line in the input, leaving partial lines # in the input buffer while ($$data =~ s/^(.*? )//) { $self->process_command($1); } }

mux_eof

This is called when an end-of-file condition is present on the descriptor. This is does not nessecarily mean that the descriptor has been closed, as the other end of a socket could have used shutdown to close just half of the socket, leaving us free to write data back down the still open half. Like mux_input, it is also passed a reference to the input buffer. It should consume the entire buffer or else it will just be lost.

In this example, we send a final reply to the other end of the socket, and then shut it down for writing. Since it is also shut down for reading (implicly by the EOF condition), it will be closed once the output has been sent, after which the mux_close callback will be called.

sub mux_eof { my $self = shift; my $mux = shift; my $fh = shift; print $fh “Well, goodbye then! “; $mux->shutdown($fh, 1); }

mux_close

Called when a handle has been completely closed. At the time that mux_close is called, the handle will have been removed from the multiplexer, and untied.

mux_outbuffer_empty

Called after all pending output has been written to the file descriptor.

mux_connection

Called upon a new connection being accepted on a listen socket.

mux_timeout

Called when a timer expires.

AUTHOR

Copyright 1999 Bruce J Keeler <[email protected]>

Copyright 2001-2008 Rob Brown <[email protected]>

Released under the same terms as Perl itself.

$Id: Multiplex.pm,v 1.45 2015/04/09 21:27:54 rob Exp $

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1511 - Linux cli command sysv_signal

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sysv_signal and provides detailed information about the command sysv_signal, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sysv_signal.

NAME 🖥️ sysv_signal 🖥️

signal handling with System V semantics

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <signal.h>
typedef void (*sighandler_t)(int);
sighandler_t sysv_signal(int signum, sighandler_t handler);

DESCRIPTION

The sysv_signal() function takes the same arguments, and performs the same task, as signal(2).

However sysv_signal() provides the System V unreliable signal semantics, that is: a) the disposition of the signal is reset to the default when the handler is invoked; b) delivery of further instances of the signal is not blocked while the signal handler is executing; and c) if the handler interrupts (certain) blocking system calls, then the system call is not automatically restarted.

RETURN VALUE

The sysv_signal() function returns the previous value of the signal handler, or SIG_ERR on error.

ERRORS

As for signal(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sysv_signal()

Thread safetyMT-Safe

VERSIONS

Use of sysv_signal() should be avoided; use sigaction(2) instead.

On older Linux systems, sysv_signal() and signal(2) were equivalent. But on newer systems, signal(2) provides reliable signal semantics; see signal(2) for details.

The use of sighandler_t is a GNU extension; this type is defined only if the _GNU_SOURCE feature test macro is defined.

STANDARDS

None.

SEE ALSO

sigaction(2), signal(2), bsd_signal(3), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1512 - Linux cli command zip_delete

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_delete and provides detailed information about the command zip_delete, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_delete.

libzip (-lzip)

The file at position

in the zip archive

is marked as deleted.

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error code in

is set to indicate the error.

fails if:

is not a valid file index in

was added in libzip 0.6. In libzip 0.10 the type of

was changed from

to

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1513 - Linux cli command zip_source_buffer_fragment

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_buffer_fragment and provides detailed information about the command zip_source_buffer_fragment, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_buffer_fragment.

libzip (-lzip)

The functions

and

create a zip source from the data in

specifies the number of fragments. If

is non-zero, the data will be freed when it is no longer needed.

struct zip_stat { zip_uint8_t *data; /* pointer to the actual data */ zip_uint64_t length; /* length of this fragment */ };

The data

point to must remain valid for the lifetime of the created source.

itself can be discarded once the source is created.

The source can be used to open a zip archive from.

Upon successful completion, the created source is returned. Otherwise,

is returned and the error code in

or

is set to indicate the error.

and

fail if:

is greater than zero and

is

Required memory could not be allocated.

and

were added in libzip 1.4.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1514 - Linux cli command HTML_Templatepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_Templatepm and provides detailed information about the command HTML_Templatepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_Templatepm.

NAME 🖥️ HTML_Templatepm 🖥️

Perl module to use HTML-like templating language

SYNOPSIS

First you make a template - this is just a normal HTML file with a few extra tags, the simplest being <TMPL_VAR>

For example, test.tmpl:

<html> <head><title>Test Template</title></head> <body> My Home Directory is <TMPL_VAR NAME=HOME> <p> My Path is set to <TMPL_VAR NAME=PATH> </body> </html>

Now you can use it in a small CGI program:

#!/usr/bin/perl -w use HTML::Template; # open the html template my $template = HTML::Template->new(filename => test.tmpl); # fill in some parameters $template->param(HOME => $ENV{HOME}); $template->param(PATH => $ENV{PATH}); # send the obligatory Content-Type and print the template output print “Content-Type: text/html

“, $template->output;

If all is well in the universe this should show something like this in your browser when visiting the CGI:

My Home Directory is /home/some/directory My Path is set to /bin;/usr/bin

DESCRIPTION

This module attempts to make using HTML templates simple and natural. It extends standard HTML with a few new HTML-esque tags - <TMPL_VAR> <TMPL_LOOP>, <TMPL_INCLUDE>, <TMPL_IF>, <TMPL_ELSE> and <TMPL_UNLESS>. The file written with HTML and these new tags is called a template. It is usually saved separate from your script - possibly even created by someone else! Using this module you fill in the values for the variables, loops and branches declared in the template. This allows you to separate design - the HTML - from the data, which you generate in the Perl script.

This module is licensed under the same terms as Perl. See the LICENSE section below for more details.

TUTORIAL

If you’re new to HTML::Template, I suggest you start with the introductory article available on Perl Monks:

http://www.perlmonks.org/?node_id=65642

FAQ

Please see HTML::Template::FAQ

MOTIVATION

It is true that there are a number of packages out there to do HTML templates. On the one hand you have things like HTML::Embperl which allows you freely mix Perl with HTML. On the other hand lie home-grown variable substitution solutions. Hopefully the module can find a place between the two.

One advantage of this module over a full HTML::Embperl-esque solution is that it enforces an important divide - design and programming. By limiting the programmer to just using simple variables and loops in the HTML, the template remains accessible to designers and other non-perl people. The use of HTML-esque syntax goes further to make the format understandable to others. In the future this similarity could be used to extend existing HTML editors/analyzers to support HTML::Template.

An advantage of this module over home-grown tag-replacement schemes is the support for loops. In my work I am often called on to produce tables of data in html. Producing them using simplistic HTML templates results in programs containing lots of HTML since the HTML itself cannot represent loops. The introduction of loop statements in the HTML simplifies this situation considerably. The designer can layout a single row and the programmer can fill it in as many times as necessary - all they must agree on is the parameter names.

For all that, I think the best thing about this module is that it does just one thing and it does it quickly and carefully. It doesn’t try to replace Perl and HTML, it just augments them to interact a little better. And it’s pretty fast.

THE TAGS

TMPL_VAR

<TMPL_VAR NAME=“PARAMETER_NAME”>

The <TMPL_VAR> tag is very simple. For each <TMPL_VAR> tag in the template you call:

$template->param(PARAMETER_NAME => “VALUE”)

When the template is output the <TMPL_VAR> is replaced with the VALUE text you specified. If you don’t set a parameter it just gets skipped in the output.

You can also specify the value of the parameter as a code reference in order to have lazy variables. These sub routines will only be referenced if the variables are used. See LAZY VALUES for more information.

Attributes

The following attributes can also be specified in template var tags:

  • escape This allows you to escape the value before it’s put into the output. This is useful when you want to use a TMPL_VAR in a context where those characters would cause trouble. For example: <input name=param type=text value="<TMPL_VAR PARAM>"> If you called param() with a value like sam"my you’ll get in trouble with HTML’s idea of a double-quote. On the other hand, if you use escape=html, like this: <input name=param type=text value="<TMPL_VAR PARAM ESCAPE=HTML>"> You’ll get what you wanted no matter what value happens to be passed in for param. The following escape values are supported:

    • html Replaces the following characters with their HTML entity equivalent: &, ", , <, >

    • js Escapes (with a backslash) the following characters: \, , ", ,

    • url URL escapes any ASCII characters except for letters, numbers, _, . and -.

    • none Performs no escaping. This is the default, but it’s useful to be able to explicitly turn off escaping if you are using the default_escape option.

  • default With this attribute you can assign a default value to a variable. For example, this will output the devil gave me a taco if the who variable is not set. <TMPL_VAR WHO DEFAULT=“the devil”> gave me a taco.

TMPL_LOOP

<TMPL_LOOP NAME=“LOOP_NAME”> … </TMPL_LOOP>

The <TMPL_LOOP> tag is a bit more complicated than <TMPL_VAR>. The <TMPL_LOOP> tag allows you to delimit a section of text and give it a name. Inside this named loop you place <TMPL_VAR>s. Now you pass to param() a list (an array ref) of parameter assignments (hash refs) for this loop. The loop iterates over the list and produces output from the text block for each pass. Unset parameters are skipped. Here’s an example:

In the template:

<TMPL_LOOP NAME=EMPLOYEE_INFO> Name: <TMPL_VAR NAME=NAME> <br> Job: <TMPL_VAR NAME=JOB> <p> </TMPL_LOOP>

In your Perl code:

$template->param( EMPLOYEE_INFO => [{name => Sam, job => programmer}, {name => Steve, job => soda jerk}] ); print $template->output();

The output is:

Name: Sam Job: programmer Name: Steve Job: soda jerk

As you can see above the <TMPL_LOOP> takes a list of variable assignments and then iterates over the loop body producing output.

Often you’ll want to generate a <TMPL_LOOP>’s contents programmatically. Here’s an example of how this can be done (many other ways are possible!):

# a couple of arrays of data to put in a loop: my @words = qw(I Am Cool); my @numbers = qw(1 2 3); my @loop_data = (); # initialize an array to hold your loop while (@words and @numbers) { my %row_data; # get a fresh hash for the row data # fill in this row $row_data{WORD} = shift @words; $row_data{NUMBER} = shift @numbers; # the crucial step - push a reference to this row into the loop! push(@loop_data, \row_data); } # finally, assign the loop data to the loop param, again with a reference: $template->param(THIS_LOOP => \loop_data);

The above example would work with a template like:

<TMPL_LOOP NAME=“THIS_LOOP”> Word: <TMPL_VAR NAME=“WORD”> Number: <TMPL_VAR NAME=“NUMBER”> </TMPL_LOOP>

It would produce output like:

Word: I Number: 1 Word: Am Number: 2 Word: Cool Number: 3

<TMPL_LOOP>s within <TMPL_LOOP>s are fine and work as you would expect. If the syntax for the param() call has you stumped, here’s an example of a param call with one nested loop:

$template->param( LOOP => [ { name => Bobby, nicknames => [{name => the big bad wolf}, {name => He-Man}], }, ], );

Basically, each <TMPL_LOOP> gets an array reference. Inside the array are any number of hash references. These hashes contain the name=>value pairs for a single pass over the loop template.

Inside a <TMPL_LOOP>, the only variables that are usable are the ones from the <TMPL_LOOP>. The variables in the outer blocks are not visible within a template loop. For the computer-science geeks among you, a <TMPL_LOOP> introduces a new scope much like a perl subroutine call. If you want your variables to be global you can use global_vars option to new() described below.

TMPL_INCLUDE

<TMPL_INCLUDE NAME=“filename.tmpl”>

This tag includes a template directly into the current template at the point where the tag is found. The included template contents are used exactly as if its contents were physically included in the master template.

The file specified can be an absolute path (beginning with a ‘/’ under Unix, for example). If it isn’t absolute, the path to the enclosing file is tried first. After that the path in the environment variable HTML_TEMPLATE_ROOT is tried, if it exists. Next, the path option is consulted, first as-is and then with HTML_TEMPLATE_ROOT prepended if available. As a final attempt, the filename is passed to open() directly. See below for more information on HTML_TEMPLATE_ROOT and the path option to new().

As a protection against infinitely recursive includes, an arbitrary limit of 10 levels deep is imposed. You can alter this limit with the max_includes option. See the entry for the max_includes option below for more details.

TMPL_IF

<TMPL_IF NAME=“PARAMETER_NAME”> … </TMPL_IF>

The <TMPL_IF> tag allows you to include or not include a block of the template based on the value of a given parameter name. If the parameter is given a value that is true for Perl - like ‘1’ - then the block is included in the output. If it is not defined, or given a false value - like ‘0’ - then it is skipped. The parameters are specified the same way as with <TMPL_VAR>.

Example Template:

<TMPL_IF NAME=“BOOL”> Some text that only gets displayed if BOOL is true! </TMPL_IF>

Now if you call $template->param(BOOL => 1) then the above block will be included by output.

<TMPL_IF> </TMPL_IF> blocks can include any valid HTML::Template construct - VARs and LOOPs and other IF/ELSE blocks. Note, however, that intersecting a <TMPL_IF> and a <TMPL_LOOP> is invalid.

Not going to work: <TMPL_IF BOOL> <TMPL_LOOP SOME_LOOP> </TMPL_IF> </TMPL_LOOP>

If the name of a <TMPL_LOOP> is used in a <TMPL_IF>, the IF block will output if the loop has at least one row. Example:

<TMPL_IF LOOP_ONE> This will output if the loop is not empty. </TMPL_IF> <TMPL_LOOP LOOP_ONE> …. </TMPL_LOOP>

WARNING: Much of the benefit of HTML::Template is in decoupling your Perl and HTML. If you introduce numerous cases where you have TMPL_IFs and matching Perl ifs, you will create a maintenance problem in keeping the two synchronized. I suggest you adopt the practice of only using TMPL_IF if you can do so without requiring a matching if in your Perl code.

TMPL_ELSE

<TMPL_IF NAME=“PARAMETER_NAME”> … <TMPL_ELSE> … </TMPL_IF>

You can include an alternate block in your <TMPL_IF> block by using <TMPL_ELSE>. NOTE: You still end the block with </TMPL_IF>, not </TMPL_ELSE>!

Example: <TMPL_IF BOOL> Some text that is included only if BOOL is true <TMPL_ELSE> Some text that is included only if BOOL is false </TMPL_IF>

TMPL_UNLESS

<TMPL_UNLESS NAME=“PARAMETER_NAME”> … </TMPL_UNLESS>

This tag is the opposite of <TMPL_IF>. The block is output if the PARAMETER_NAME is set false or not defined. You can use <TMPL_ELSE> with <TMPL_UNLESS> just as you can with <TMPL_IF>.

Example: <TMPL_UNLESS BOOL> Some text that is output only if BOOL is FALSE. <TMPL_ELSE> Some text that is output only if BOOL is TRUE. </TMPL_UNLESS>

If the name of a <TMPL_LOOP> is used in a <TMPL_UNLESS>, the <UNLESS> block output if the loop has zero rows.

<TMPL_UNLESS LOOP_ONE> This will output if the loop is empty. </TMPL_UNLESS> <TMPL_LOOP LOOP_ONE> …. </TMPL_LOOP>

NOTES

HTML::Template’s tags are meant to mimic normal HTML tags. However, they are allowed to break the rules. Something like:

<img src="<TMPL_VAR IMAGE_SRC>">

is not really valid HTML, but it is a perfectly valid use and will work as planned.

The NAME= in the tag is optional, although for extensibility’s sake I recommend using it. Example - <TMPL_LOOP LOOP_NAME> is acceptable.

If you’re a fanatic about valid HTML and would like your templates to conform to valid HTML syntax, you may optionally type template tags in the form of HTML comments. This may be of use to HTML authors who would like to validate their templates’ HTML syntax prior to HTML::Template processing, or who use DTD-savvy editing tools.

<!– TMPL_VAR NAME=PARAM1 –>

In order to realize a dramatic savings in bandwidth, the standard (non-comment) tags will be used throughout this documentation.

METHODS

new

Call new() to create a new Template object:

my $template = HTML::Template->new( filename => file.tmpl, option => value, );

You must call new() with at least one name = value> pair specifying how to access the template text. You can use filename => file.tmpl to specify a filename to be opened as the template. Alternately you can use:

my $t = HTML::Template->new( scalarref => $ref_to_template_text, option => value, );

and

my $t = HTML::Template->new( arrayref => $ref_to_array_of_lines, option => value, );

These initialize the template from in-memory resources. In almost every case you’ll want to use the filename parameter. If you’re worried about all the disk access from reading a template file just use mod_perl and the cache option detailed below.

You can also read the template from an already opened filehandle, either traditionally as a glob or as a FileHandle:

my $t = HTML::Template->new(filehandle => *FH, option => value);

The four new() calling methods can also be accessed as below, if you prefer.

my $t = HTML::Template->new_file(file.tmpl, option => value); my $t = HTML::Template->new_scalar_ref($ref_to_template_text, option => value); my $t = HTML::Template->new_array_ref($ref_to_array_of_lines, option => value); my $t = HTML::Template->new_filehandle($fh, option => value);

And as a final option, for those that might prefer it, you can call new as:

my $t = HTML::Template->new( type => filename, source => file.tmpl, );

Which works for all three of the source types.

If the environment variable HTML_TEMPLATE_ROOT is set and your filename doesn’t begin with /, then the path will be relative to the value of c<HTML_TEMPLATE_ROOT>.

Example - if the environment variable HTML_TEMPLATE_ROOT is set to /home/sam and I call HTML::Template->new() with filename set to sam.tmpl, HTML::Template will try to open /home/sam/sam.tmpl to access the template file. You can also affect the search path for files with the path option to new() - see below for more information.

You can modify the Template object’s behavior with new(). The options are available:

Error Detection Options

  • die_on_bad_params If set to 0 the module will let you call: $template->param(param_name => value) even if ‘param_name’ doesn’t exist in the template body. Defaults to 1.

  • force_untaint If set to 1 the module will not allow you to set unescaped parameters with tainted values. If set to 2 you will have to untaint all parameters, including ones with the escape attribute. This option makes sure you untaint everything so you don’t accidentally introduce e.g. cross-site-scripting (XSS) vulnerabilities. Requires taint mode. Defaults to 0.

  • strict - if set to 0 the module will allow things that look like they might be TMPL_* tags to get by without dieing. Example: <TMPL_HUH NAME=ZUH> Would normally cause an error, but if you call new with strict => 0 HTML::Template will ignore it. Defaults to 1.

  • vanguard_compatibility_mode If set to 1 the module will expect to see <TMPL_VAR>s that look like %NAME% in addition to the standard syntax. Also sets die_on_bad_params = 0>. If you’re not at Vanguard Media trying to use an old format template don’t worry about this one. Defaults to 0.

Caching Options

  • cache If set to 1 the module will cache in memory the parsed templates based on the filename parameter, the modification date of the file and the options passed to new(). This only applies to templates opened with the filename parameter specified, not scalarref or arrayref templates. Caching also looks at the modification times of any files included using <TMPL_INCLUDE> tags, but again, only if the template is opened with filename parameter. This is mainly of use in a persistent environment like Apache/mod_perl. It has absolutely no benefit in a normal CGI environment since the script is unloaded from memory after every request. For a cache that does work for a non-persistent environment see the shared_cache option below. My simplistic testing shows that using cache yields a 90% performance increase under mod_perl. Cache defaults to 0.

  • shared_cache If set to 1 the module will store its cache in shared memory using the IPC::SharedCache module (available from CPAN). The effect of this will be to maintain a single shared copy of each parsed template for all instances of HTML::Template on the same machine to use. This can be a significant reduction in memory usage in an environment with a single machine but multiple servers. As an example, on one of our systems we use 4MB of template cache and maintain 25 httpd processes - shared_cache results in saving almost 100MB! Of course, some reduction in speed versus normal caching is to be expected. Another difference between normal caching and shared_cache is that shared_cache will work in a non-persistent environment (like normal CGI) - normal caching is only useful in a persistent environment like Apache/mod_perl. By default HTML::Template uses the IPC key ‘TMPL’ as a shared root segment (0x4c504d54 in hex), but this can be changed by setting the ipc_key new() parameter to another 4-character or integer key. Other options can be used to affect the shared memory cache correspond to IPC::SharedCache options - ipc_mode, ipc_segment_size and ipc_max_size. See IPC::SharedCache for a description of how these work - in most cases you shouldn’t need to change them from the defaults. For more information about the shared memory cache system used by HTML::Template see IPC::SharedCache.

  • double_cache If set to 1 the module will use a combination of shared_cache and normal cache mode for the best possible caching. Of course, it also uses the most memory of all the cache modes. All the same ipc_* options that work with shared_cache apply to double_cache as well. Defaults to 0.

  • blind_cache If set to 1 the module behaves exactly as with normal caching but does not check to see if the file has changed on each request. This option should be used with caution, but could be of use on high-load servers. My tests show blind_cache performing only 1 to 2 percent faster than cache under mod_perl. NOTE: Combining this option with shared_cache can result in stale templates stuck permanently in shared memory!

  • file_cache If set to 1 the module will store its cache in a file using the Storable module. It uses no additional memory, and my simplistic testing shows that it yields a 50% performance advantage. Like shared_cache, it will work in a non-persistent environments (like CGI). Default is 0. If you set this option you must set the file_cache_dir option. See below for details. NOTE: Storable uses flock() to ensure safe access to cache files. Using file_cache on a system or filesystem (like NFS) without flock() support is dangerous.

  • file_cache_dir Sets the directory where the module will store the cache files if file_cache is enabled. Your script will need write permissions to this directory. You’ll also need to make sure the sufficient space is available to store the cache files.

  • file_cache_dir_mode Sets the file mode for newly created file_cache directories and subdirectories. Defaults to 0700 for security but this may be inconvenient if you do not have access to the account running the webserver.

  • double_file_cache If set to 1 the module will use a combination of file_cache and normal cache mode for the best possible caching. The file_cache_* options that work with file_cache apply to double_file_cache as well. Defaults to 0.

  • cache_lazy_vars The option tells HTML::Template to cache the values returned from code references used for TMPL_VARs. See LAZY VALUES for details.

  • cache_lazy_loops The option tells HTML::Template to cache the values returned from code references used for TMPL_LOOPs. See LAZY VALUES for details.

Filesystem Options

  • path You can set this variable with a list of paths to search for files specified with the filename option to new() and for files included with the <TMPL_INCLUDE> tag. This list is only consulted when the filename is relative. The HTML_TEMPLATE_ROOT environment variable is always tried first if it exists. Also, if HTML_TEMPLATE_ROOT is set then an attempt will be made to prepend HTML_TEMPLATE_ROOT onto paths in the path array. In the case of a <TMPL_INCLUDE> file, the path to the including file is also tried before path is consulted. Example: my $template = HTML::Template->new( filename => file.tmpl, path => [/path/to/templates, /alternate/path], ); NOTE: the paths in the path list must be expressed as UNIX paths, separated by the forward-slash character (’/’).

  • search_path_on_include If set to a true value the module will search from the top of the array of paths specified by the path option on every <TMPL_INCLUDE> and use the first matching template found. The normal behavior is to look only in the current directory for a template to include. Defaults to 0.

  • utf8 Setting this to true tells HTML::Template to treat your template files as UTF-8 encoded. This will apply to any file’s passed to new() or any included files. It won’t do anything special to scalars templates passed to new() since you should be doing the encoding on those yourself. my $template = HTML::Template->new( filename => umlauts_are_awesome.tmpl, utf8 => 1, ); Most templates are either ASCII (the default) or UTF-8 encoded Unicode. But if you need some other encoding other than these 2, look at the open_mode option. NOTE: The utf8 and open_mode options cannot be used at the same time.

  • open_mode You can set this option to an opening mode with which all template files will be opened. For example, if you want to use a template that is UTF-16 encoded unicode: my $template = HTML::Template->new( filename => file.tmpl, open_mode => <:encoding(UTF-16), ); That way you can force a different encoding (than the default ASCII or UTF-8), CR/LF properties etc. on the template files. See PerlIO for details. NOTE: this only works in perl 5.7.1 and above. NOTE: you have to supply an opening mode that actually permits reading from the file handle. NOTE: The utf8 and open_mode options cannot be used at the same time.

Debugging Options

  • debug If set to 1 the module will write random debugging information to STDERR. Defaults to 0.

  • stack_debug If set to 1 the module will use Data::Dumper to print out the contents of the parse_stack to STDERR. Defaults to 0.

  • cache_debug If set to 1 the module will send information on cache loads, hits and misses to STDERR. Defaults to 0.

  • shared_cache_debug If set to 1 the module will turn on the debug option in IPC::SharedCache. Defaults to 0.

  • memory_debug If set to 1 the module will send information on cache memory usage to STDERR. Requires the GTop module. Defaults to 0.

Miscellaneous Options

  • associate This option allows you to inherit the parameter values from other objects. The only requirement for the other object is that it have a param() method that works like HTML::Template’s param(). A good candidate would be a CGI query object. Example: my $query = CGI->new; my $template = HTML::Template->new( filename => template.tmpl, associate => $query, ); Now, $template->output() will act as though $template->param(form_field => $cgi->param(form_field)); had been specified for each key/value pair that would be provided by the $cgi->param() method. Parameters you set directly take precedence over associated parameters. You can specify multiple objects to associate by passing an anonymous array to the associate option. They are searched for parameters in the order they appear: my $template = HTML::Template->new( filename => template.tmpl, associate => [$query, $other_obj], ); NOTE: The parameter names are matched in a case-insensitive manner. If you have two parameters in a CGI object like ‘NAME’ and ‘Name’ one will be chosen randomly by associate. This behavior can be changed by the case_sensitive option.

  • case_sensitive Setting this option to true causes HTML::Template to treat template variable names case-sensitively. The following example would only set one parameter without the case_sensitive option: my $template = HTML::Template->new( filename => template.tmpl, case_sensitive => 1 ); $template->param( FieldA => foo, fIELDa => bar, ); This option defaults to off. NOTE: with case_sensitive and loop_context_vars the special loop variables are available in lower-case only.

  • loop_context_vars When this parameter is set to true (it is false by default) extra variables that depend on the loop’s context are made available inside a loop. These are:

    • _ _first_ _ Value that is true for the first iteration of the loop and false every other time.

    • _ _last_ _ Value that is true for the last iteration of the loop and false every other time.

    • _ _inner_ _ Value that is true for the every iteration of the loop except for the first and last.

    • _ _outer_ _ Value that is true for the first and last iterations of the loop.

    • _ _odd_ _ Value that is true for the every odd iteration of the loop.

    • _ _even_ _ Value that is true for the every even iteration of the loop.

    • _ _counter_ _ An integer (starting from 1) whose value increments for each iteration of the loop.

    • _ _index_ _ An integer (starting from 0) whose value increments for each iteration of the loop.

    Just like any other TMPL_VARs these variables can be used in <TMPL_IF>, <TMPL_UNLESS> and <TMPL_ELSE> to control how a loop is output. Example: <TMPL_LOOP NAME=“FOO”> <TMPL_IF NAME=”_ _first_ _"> This only outputs on the first pass. </TMPL_IF> <TMPL_IF NAME=”_ _odd_ _"> This outputs every other pass, on the odd passes. </TMPL_IF> <TMPL_UNLESS NAME="_ _odd_ _"> This outputs every other pass, on the even passes. </TMPL_UNLESS> <TMPL_IF NAME="_ _inner_ _"> This outputs on passes that are neither first nor last. </TMPL_IF> This is pass number <TMPL_VAR NAME="_ _counter_ _">. <TMPL_IF NAME="_ _last_ _"> This only outputs on the last pass. </TMPL_IF> </TMPL_LOOP> One use of this feature is to provide a separator similar in effect to the perl function join(). Example: <TMPL_LOOP FRUIT> <TMPL_IF _ _last_ _> and </TMPL_IF> <TMPL_VAR KIND><TMPL_UNLESS _ _last_ _>, <TMPL_ELSE>.</TMPL_UNLESS> </TMPL_LOOP> Would output something like: Apples, Oranges, Brains, Toes, and Kiwi. Given an appropriate param() call, of course. NOTE: A loop with only a single pass will get both _ _first_ _ and _ _last_ _ set to true, but not _ _inner_ _.

  • no_includes Set this option to 1 to disallow the <TMPL_INCLUDE> tag in the template file. This can be used to make opening untrusted templates slightly less dangerous. Defaults to 0.

  • max_includes Set this variable to determine the maximum depth that includes can reach. Set to 10 by default. Including files to a depth greater than this value causes an error message to be displayed. Set to 0 to disable this protection.

  • die_on_missing_include If true, then HTML::Template will die if it can’t find a file for a <TMPL_INCLUDE>. This defaults to true.

  • global_vars Normally variables declared outside a loop are not available inside a loop. This option makes <TMPL_VAR>s like global variables in Perl - they have unlimited scope. This option also affects <TMPL_IF> and <TMPL_UNLESS>. Example: This is a normal variable: <TMPL_VAR NORMAL>.<P> <TMPL_LOOP NAME=FROOT_LOOP> Here it is inside the loop: <TMPL_VAR NORMAL><P> </TMPL_LOOP> Normally this wouldn’t work as expected, since <TMPL_VAR NORMAL>’s value outside the loop is not available inside the loop. The global_vars option also allows you to access the values of an enclosing loop within an inner loop. For example, in this loop the inner loop will have access to the value of OUTER_VAR in the correct iteration: <TMPL_LOOP OUTER_LOOP> OUTER: <TMPL_VAR OUTER_VAR> <TMPL_LOOP INNER_LOOP> INNER: <TMPL_VAR INNER_VAR> INSIDE OUT: <TMPL_VAR OUTER_VAR> </TMPL_LOOP> </TMPL_LOOP> One side-effect of global_vars is that variables you set with param() that might otherwise be ignored when die_on_bad_params is off will stick around. This is necessary to allow inner loops to access values set for outer loops that don’t directly use the value. NOTE: global_vars is not global_loops (which does not exist). That means that loops you declare at one scope are not available inside other loops even when global_vars is on.

  • filter This option allows you to specify a filter for your template files. A filter is a subroutine that will be called after HTML::Template reads your template file but before it starts parsing template tags. In the most simple usage, you simply assign a code reference to the filter parameter. This subroutine will receive a single argument - a reference to a string containing the template file text. Here is an example that accepts templates with tags that look like !!!ZAP_VAR FOO!!! and transforms them into HTML::Template tags: my $filter = sub { my $text_ref = shift; $$text_ref =~ s/!!!ZAP_(.*?)!!!/<TMPL_$1>/g; }; # open zap.tmpl using the above filter my $template = HTML::Template->new( filename => zap.tmpl, filter => $filter, ); More complicated usages are possible. You can request that your filter receives the template text as an array of lines rather than as a single scalar. To do that you need to specify your filter using a hash-ref. In this form you specify the filter using the sub key and the desired argument format using the format key. The available formats are scalar and array. Using the array format will incur a performance penalty but may be more convenient in some situations. my $template = HTML::Template->new( filename => zap.tmpl, filter => { sub => $filter, format => array, } ); You may also have multiple filters. This allows simple filters to be combined for more elaborate functionality. To do this you specify an array of filters. The filters are applied in the order they are specified. my $template = HTML::Template->new( filename => zap.tmpl, filter => [ { sub => \decompress, format => scalar, }, { sub => \remove_spaces, format => array, }, ] ); The specified filters will be called for any TMPL_INCLUDEed files just as they are for the main template file.

  • default_escape Set this parameter to a valid escape type (see the escape option) and HTML::Template will apply the specified escaping to all variables unless they declare a different escape in the template.

config

A package method that is used to set/get the global default configuration options. For instance, if you want to set the utf8 flag to always be on for every template loaded by this process you would do:

HTML::Template->config(utf8 => 1);

Or if you wanted to check if the utf8 flag was on or not, you could do:

my %config = HTML::Template->config; if( $config{utf8} ) { … }

Any configuration options that are valid for new() are acceptable to be passed to this method.

param

param() can be called in a number of ways

1 - To return a list of parameters in the template :
my @parameter_names = $self->param();

2 - To return the value set to a param :
my $value = $self->param(PARAM);

3 - To set the value of a parameter :
# For simple TMPL_VARs: $self->param(PARAM => value); # with a subroutine reference that gets called to get the value # of the scalar. The sub will receive the template object as a # parameter. $self->param(PARAM => sub { return value }); # And TMPL_LOOPs: $self->param(LOOP_PARAM => [{PARAM => VALUE_FOR_FIRST_PASS}, {PARAM => VALUE_FOR_SECOND_PASS}]);

4 - To set the value of a number of parameters :
# For simple TMPL_VARs: $self->param( PARAM => value, PARAM2 => value ); # And with some TMPL_LOOPs: $self->param( PARAM => value, PARAM2 => value, LOOP_PARAM => [{PARAM => VALUE_FOR_FIRST_PASS}, {PARAM => VALUE_FOR_SECOND_PASS}], ANOTHER_LOOP_PARAM => [{PARAM => VALUE_FOR_FIRST_PASS}, {PARAM => VALUE_FOR_SECOND_PASS}], );

5 - To set the value of a number of parameters using a hash-ref :
$self->param( { PARAM => value, PARAM2 => value, LOOP_PARAM => [{PARAM => VALUE_FOR_FIRST_PASS}, {PARAM => VALUE_FOR_SECOND_PASS}], ANOTHER_LOOP_PARAM => [{PARAM => VALUE_FOR_FIRST_PASS}, {PARAM => VALUE_FOR_SECOND_PASS}], } ); An error occurs if you try to set a value that is tainted if the force_untaint option is set.

clear_params

Sets all the parameters to undef. Useful internally, if nowhere else!

output

output() returns the final result of the template. In most situations you’ll want to print this, like:

print $template->output();

When output is called each occurrence of <TMPL_VAR NAME=name> is replaced with the value assigned to name via param(). If a named parameter is unset it is simply replaced with ‘’. <TMPL_LOOP>s are evaluated once per parameter set, accumulating output on each pass.

Calling output() is guaranteed not to change the state of the HTML::Template object, in case you were wondering. This property is mostly important for the internal implementation of loops.

You may optionally supply a filehandle to print to automatically as the template is generated. This may improve performance and lower memory consumption. Example:

$template->output(print_to => *STDOUT);

The return value is undefined when using the print_to option.

query

This method allow you to get information about the template structure. It can be called in a number of ways. The simplest usage of query is simply to check whether a parameter name exists in the template, using the name option:

if ($template->query(name => foo)) { # do something if a variable of any type named FOO is in the template }

This same usage returns the type of the parameter. The type is the same as the tag minus the leading ‘TMPL_’. So, for example, a TMPL_VAR parameter returns ‘VAR’ from query().

if ($template->query(name => foo) eq VAR) { # do something if FOO exists and is a TMPL_VAR }

Note that the variables associated with TMPL_IFs and TMPL_UNLESSs will be identified as ‘VAR’ unless they are also used in a TMPL_LOOP, in which case they will return ‘LOOP’.

query() also allows you to get a list of parameters inside a loop (and inside loops inside loops). Example loop:

<TMPL_LOOP NAME=“EXAMPLE_LOOP”> <TMPL_VAR NAME=“BEE”> <TMPL_VAR NAME=“BOP”> <TMPL_LOOP NAME=“EXAMPLE_INNER_LOOP”> <TMPL_VAR NAME=“INNER_BEE”> <TMPL_VAR NAME=“INNER_BOP”> </TMPL_LOOP> </TMPL_LOOP>

And some query calls:

# returns LOOP $type = $template->query(name => EXAMPLE_LOOP); # returns (bop, bee, example_inner_loop) @param_names = $template->query(loop => EXAMPLE_LOOP); # both return VAR $type = $template->query(name => [EXAMPLE_LOOP, BEE]); $type = $template->query(name => [EXAMPLE_LOOP, BOP]); # and this one returns LOOP $type = $template->query(name => [EXAMPLE_LOOP, EXAMPLE_INNER_LOOP]); # and finally, this returns (inner_bee, inner_bop) @inner_param_names = $template->query(loop => [EXAMPLE_LOOP, EXAMPLE_INNER_LOOP]); # for non existent parameter names you get undef this returns undef. $type = $template->query(name => DWEAZLE_ZAPPA); # calling loop on a non-loop parameter name will cause an error. This dies: $type = $template->query(loop => DWEAZLE_ZAPPA);

As you can see above the loop option returns a list of parameter names and both name and loop take array refs in order to refer to parameters inside loops. It is an error to use loop with a parameter that is not a loop.

Note that all the names are returned in lowercase and the types are uppercase.

Just like param(), query() with no arguments returns all the parameter names in the template at the top level.

LAZY VALUES

As mentioned above, both TMPL_VAR and TMPL_LOOP values can be code references. These code references are only executed if the variable or loop is used in the template. This is extremely useful if you want to make a variable available to template designers but it can be expensive to calculate, so you only want to do so if you have to.

Maybe an example will help to illustrate. Let’s say you have a template like this:

<tmpl_if we_care> <tmpl_if life_universe_and_everything> </tmpl_if>

If life_universe_and_everything is expensive to calculate we can wrap it’s calculation in a code reference and HTML::Template will only execute that code if we_care is also true.

$tmpl->param(life_universe_and_everything => sub { calculate_42() });

Your code reference will be given a single argument, the HTML::Template object in use. In the above example, if we wanted calculate_42() to have this object we’d do something like this:

$tmpl->param(life_universe_and_everything => sub { calculate_42(shift) });

This same approach can be used for TMPL_LOOPs too:

<tmpl_if we_care> <tmpl_loop needles_in_haystack> Found <tmpl_var _ _counter>! </tmpl_loop> </tmpl_if>

And in your Perl code:

$tmpl->param(needles_in_haystack => sub { find_needles() });

The only difference in the TMPL_LOOP case is that the subroutine needs to return a reference to an ARRAY, not just a scalar value.

Multiple Calls

It’s important to recognize that while this feature is designed to save processing time when things aren’t needed, if you’re not careful it can actually increase the number of times you perform your calculation. HTML::Template calls your code reference each time it seems your loop in the template, this includes the times that you might use the loop in a conditional (TMPL_IF or TMPL_UNLESS). For instance:

<tmpl_if we care> <tmpl_if needles_in_haystack> <tmpl_loop needles_in_haystack> Found <tmpl_var _ _counter>! </tmpl_loop> <tmpl_else> No needles found! </tmpl_if> </tmpl_if>

This will actually call find_needles() twice which will be even worse than you had before. One way to work around this is to cache the return value yourself:

my $needles; $tmpl->param(needles_in_haystack => sub { defined $needles ? $needles : $needles = find_needles() });

BUGS

I am aware of no bugs - if you find one, join the mailing list and tell us about it. You can join the HTML::Template mailing-list by visiting:

http://lists.sourceforge.net/lists/listinfo/html-template-users

Of course, you can still email me directly ([email protected]) with bugs, but I reserve the right to forward bug reports to the mailing list.

When submitting bug reports, be sure to include full details, including the VERSION of the module, a test script and a test template demonstrating the problem!

If you’re feeling really adventurous, HTML::Template has a publically available Git repository. See below for more information in the PUBLIC GIT REPOSITORY section.

CREDITS

This module was the brain child of my boss, Jesse Erlbaum ([email protected]) at Vanguard Media (http://vm.com) . The most original idea in this module - the <TMPL_LOOP> - was entirely his.

Fixes, Bug Reports, Optimizations and Ideas have been generously provided by:

  • Richard Chen

  • Mike Blazer

  • Adriano Nagelschmidt Rodrigues

  • Andrej Mikus

  • Ilya Obshadko

  • Kevin Puetz

  • Steve Reppucci

  • Richard Dice

  • Tom Hukins

  • Eric Zylberstejn

  • David Glasser

  • Peter Marelas

  • James William Carlson

  • Frank D. Cringle

  • Winfried Koenig

  • Matthew Wickline

  • Doug Steinwand

  • Drew Taylor

  • Tobias Brox

  • Michael Lloyd

  • Simran Gambhir

  • Chris Houser <[email protected]>

  • Larry Moore

  • Todd Larason

  • Jody Biggs

  • T.J. Mather

  • Martin Schroth

  • Dave Wolfe

  • uchum

  • Kawai Takanori

  • Peter Guelich

  • Chris Nokleberg

  • Ralph Corderoy

  • William Ward

  • Ade Olonoh

  • Mark Stosberg

  • Lance Thomas

  • Roland Giersig

  • Jere Julian

  • Peter Leonard

  • Kenny Smith

  • Sean P. Scanlon

  • Martin Pfeffer

  • David Ferrance

  • Gyepi Sam

  • Darren Chamberlain

  • Paul Baker

  • Gabor Szabo

  • Craig Manley

  • Richard Fein

  • The Phalanx Project

  • Sven Neuhaus

  • Michael Peters

  • Jan Dubois

  • Moritz Lenz

Thanks!

WEBSITE

You can find information about HTML::Template and other related modules at:

http://html-template.sourceforge.net

PUBLIC GIT REPOSITORY

HTML::Template now has a publicly accessible Git repository provided by GitHub (github.com). You can access it by going to https://github.com/mpeters/html-template. Give it a try!

AUTHOR

Sam Tregar, [email protected]

CO-MAINTAINER

Michael Peters, [email protected]

LICENSE

HTML::Template : A module for using HTML Templates with Perl Copyright (C) 2000-2011 Sam Tregar ([email protected]) This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself, which means using either: a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the “Artistic License” which comes with this module. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the Artistic License for more details. You should have received a copy of the Artistic License with this module. If not, Ill be glad to provide one. You should have received a copy of the GNU General Public License along with this program. If not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1515 - Linux cli command Tk_ColorEditorpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_ColorEditorpm and provides detailed information about the command Tk_ColorEditorpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_ColorEditorpm.

NAME 🖥️ Tk_ColorEditorpm 🖥️

a general purpose Tk widget Color Editor

SYNOPSIS

use Tk::ColorEditor; $cref = $mw->ColorEditor(-title => $title, -cursor => @cursor); $cref->Show;

DESCRIPTION

ColorEditor is implemented as an object with various methods, described below. First, create your ColorEditor object during program initialization (one should be sufficient), and then configure it by specifying a list of Tk widgets to colorize. When it’s time to use the editor, invoke the Show() method.

ColorEditor allows some customization: you may alter the color attribute menu by adding and/or deleting menu items and/or separators, turn the status window on or off, alter the configurator’s list of color widgets, or even supply your own custom color configurator callback.

  1. Call the constructor to create the editor object, which in turn returns a blessed reference to the new object: use Tk::ColorEditor; $cref = $mw->ColorEditor( -title => $title, -cursor => @cursor, ); mw - a window reference, usually the result of a MainWindow->new call. As the default root of a widget tree, $mw and all descendant widgets at object-creation-time are configured by the default color configurator procedure. (You probably want to change this though or you might end up colorizing ColorEditor!) title - Toplevel title, default = . cursor - a valid Tk -cursor specification (default is top_left_arrow). This cursor is used over all ColorEditor “hot spots”.

  2. Invoke the configure() method to change editor characteristics: $cref->configure(-option => value, …, -option-n => value-n); options: -command : a callback to a `set_colors replacement. -widgets : a reference to a list of widget references for the color configurator. -display_status : TRUE IFF display the ColorEditor status window when applying colors. -add_menu_item : SEP, or a color attribute menu item. -delete_menu_item : SEP, a color attribute menu item, or color attribute menu ordinal. For example: $cref->configure(-delete_menu_item => 3, -delete_menu_item => disabledforeground, -add_menu_item => SEP, -add_menu_item => New color attribute, -widgets => [$ce, $qu, $f2b2], -widgets => [$f2->Descendants], -command => [\my_special_configurator, some, args ] );

  3. Invoke the Show() method on the editor object, say, by a button or menu press: $cref->Show;

  4. The cget(-widgets) method returns a reference to a list of widgets that are colorized by the configurator. Typically, you add new widgets to this list and then use it in a subsequent configure() call to expand your color list. $cref->configure( -widgets => [ @{$Filesystem_ref->cget(-widgets)}, @{$cref->cget(-widgets)}, ] );

  5. The delete_widgets() method expects a reference to a list of widgets which are then removed from the current color list. $cref->delete_widgets($OBJTABLE{$objname}->{-widgets})

AUTHORS

Stephen O. Lidie, Lehigh University Computing Center. 95/03/05 [email protected]

Many thanks to Guy Decoux ([email protected]) for doing the initial translation of tcolor.tcl to TkPerl, from which this code has been derived.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1516 - Linux cli command iswupper

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command iswupper and provides detailed information about the command iswupper, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the iswupper.

NAME 🖥️ iswupper 🖥️

test for uppercase wide character

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wctype.h>
int iswupper(wint_t wc);

DESCRIPTION

The iswupper() function is the wide-character equivalent of the isupper(3) function. It tests whether wc is a wide character belonging to the wide-character class “upper”.

The wide-character class “upper” is a subclass of the wide-character class “alpha”, and therefore also a subclass of the wide-character class “alnum”, of the wide-character class “graph” and of the wide-character class “print”.

Being a subclass of the wide-character class “print”, the wide-character class “upper” is disjoint from the wide-character class “cntrl”.

Being a subclass of the wide-character class “graph”, the wide-character class “upper” is disjoint from the wide-character class “space” and its subclass “blank”.

Being a subclass of the wide-character class “alnum”, the wide-character class “upper” is disjoint from the wide-character class “punct”.

Being a subclass of the wide-character class “alpha”, the wide-character class “upper” is disjoint from the wide-character class “digit”.

The wide-character class “upper” contains at least those characters wc which are equal to towupper(wc) and different from towlower(wc).

The wide-character class “upper” always contains at least the letters ‘A’ to ‘Z’.

RETURN VALUE

The iswupper() function returns nonzero if wc is a wide character belonging to the wide-character class “upper”. Otherwise, it returns zero.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

iswupper()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of iswupper() depends on the LC_CTYPE category of the current locale.

This function is not very appropriate for dealing with Unicode characters, because Unicode knows about three cases: upper, lower, and title case.

SEE ALSO

isupper(3), iswctype(3), towupper(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1517 - Linux cli command getgrnam

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getgrnam and provides detailed information about the command getgrnam, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getgrnam.

NAME 🖥️ getgrnam 🖥️

get group file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <grp.h>
struct group *getgrnam(const char *name);
struct group *getgrgid(gid_t gid);
int getgrnam_r(const char *restrict name",structgroup*restrict"grp,
 char buf[restrict .buflen], size_t buflen,
 struct group **restrict result);
int getgrgid_r(gid_t gid, struct group *restrict grp,
 char buf[restrict .buflen], size_t buflen,
 struct group **restrict result);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getgrnam_r(), getgrgid_r():

    _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The getgrnam() function returns a pointer to a structure containing the broken-out fields of the record in the group database (e.g., the local group file /etc/group, NIS, and LDAP) that matches the group name name.

The getgrgid() function returns a pointer to a structure containing the broken-out fields of the record in the group database that matches the group ID gid.

The group structure is defined in <grp.h> as follows:

struct group {
    char   *gr_name;        /* group name */
    char   *gr_passwd;      /* group password */
    gid_t   gr_gid;         /* group ID */
    char  **gr_mem;         /* NULL-terminated array of pointers
                               to names of group members */
};

For more information about the fields of this structure, see group(5).

The getgrnam_r() and getgrgid_r() functions obtain the same information as getgrnam() and getgrgid(), but store the retrieved group structure in the space pointed to by grp. The string fields pointed to by the members of the group structure are stored in the buffer buf of size buflen. A pointer to the result (in case of success) or NULL (in case no entry was found or an error occurred) is stored in *result.

The call

sysconf(_SC_GETGR_R_SIZE_MAX)

returns either -1, without changing errno, or an initial suggested size for buf. (If this size is too small, the call fails with ERANGE, in which case the caller can retry with a larger buffer.)

RETURN VALUE

The getgrnam() and getgrgid() functions return a pointer to a group structure, or NULL if the matching entry is not found or an error occurs. If an error occurs, errno is set to indicate the error. If one wants to check errno after the call, it should be set to zero before the call.

The return value may point to a static area, and may be overwritten by subsequent calls to getgrent(3), getgrgid(), or getgrnam(). (Do not pass the returned pointer to free(3).)

On success, getgrnam_r() and getgrgid_r() return zero, and set *result to grp. If no matching group record was found, these functions return 0 and store NULL in *result. In case of error, an error number is returned, and NULL is stored in *result.

ERRORS

0 or ENOENT or ESRCH or EBADF or EPERM or …
The given name or gid was not found.

EINTR
A signal was caught; see signal(7).

EIO
I/O error.

EMFILE
The per-process limit on the number of open file descriptors has been reached.

ENFILE
The system-wide limit on the total number of open files has been reached.

ENOMEM
Insufficient memory to allocate group structure.

ERANGE
Insufficient buffer space supplied.

FILES

/etc/group
local group database file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getgrnam()

Thread safety

MT-Unsafe race:grnam locale

getgrgid()

Thread safety

MT-Unsafe race:grgid locale

getgrnam_r(), getgrgid_r()

Thread safetyMT-Safe locale

VERSIONS

The formulation given above under “RETURN VALUE” is from POSIX.1. It does not call “not found” an error, hence does not specify what value errno might have in this situation. But that makes it impossible to recognize errors. One might argue that according to POSIX errno should be left unchanged if an entry is not found. Experiments on various UNIX-like systems show that lots of different values occur in this situation: 0, ENOENT, EBADF, ESRCH, EWOULDBLOCK, EPERM, and probably others.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4, 4.3BSD.

SEE ALSO

endgrent(3), fgetgrent(3), getgrent(3), getpwnam(3), setgrent(3), group(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1518 - Linux cli command jrand48

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command jrand48 and provides detailed information about the command jrand48, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the jrand48.

NAME 🖥️ jrand48 🖥️

generate uniformly distributed pseudo-random numbers

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
double drand48(void);
double erand48(unsigned short xsubi[3]);
long lrand48(void);
long nrand48(unsigned short xsubi[3]);
long mrand48(void);
long jrand48(unsigned short xsubi[3]);
void srand48(long seedval);
unsigned short *seed48(unsigned short seed16v[3]);
void lcong48(unsigned short param[7]);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

DESCRIPTION

These functions generate pseudo-random numbers using the linear congruential algorithm and 48-bit integer arithmetic.

The drand48() and erand48() functions return nonnegative double-precision floating-point values uniformly distributed over the interval [0.0, 1.0).

The lrand48() and nrand48() functions return nonnegative long integers uniformly distributed over the interval [0, 2^31).

The mrand48() and jrand48() functions return signed long integers uniformly distributed over the interval [-2^31, 2^31).

The srand48(), seed48(), and lcong48() functions are initialization functions, one of which should be called before using drand48(), lrand48(), or mrand48(). The functions erand48(), nrand48(), and jrand48() do not require an initialization function to be called first.

All the functions work by generating a sequence of 48-bit integers, Xi, according to the linear congruential formula:

Xn+1 = (aXn + c) mod m, where n >= 0

The parameter m = 2^48, hence 48-bit integer arithmetic is performed. Unless lcong48() is called, a and c are given by:

a = 0x5DEECE66D
c = 0xB

The value returned by any of the functions drand48(), erand48(), lrand48(), nrand48(), mrand48(), or jrand48() is computed by first generating the next 48-bit Xi in the sequence. Then the appropriate number of bits, according to the type of data item to be returned, is copied from the high-order bits of Xi and transformed into the returned value.

The functions drand48(), lrand48(), and mrand48() store the last 48-bit Xi generated in an internal buffer. The functions erand48(), nrand48(), and jrand48() require the calling program to provide storage for the successive Xi values in the array argument xsubi. The functions are initialized by placing the initial value of Xi into the array before calling the function for the first time.

The initializer function srand48() sets the high order 32-bits of Xi to the argument seedval. The low order 16-bits are set to the arbitrary value 0x330E.

The initializer function seed48() sets the value of Xi to the 48-bit value specified in the array argument seed16v. The previous value of Xi is copied into an internal buffer and a pointer to this buffer is returned by seed48().

The initialization function lcong48() allows the user to specify initial values for Xi, a, and c. Array argument elements param[0-2] specify Xi, param[3-5] specify a, and param[6] specifies c. After lcong48() has been called, a subsequent call to either srand48() or seed48() will restore the standard values of a and c.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

drand48(), erand48(), lrand48(), nrand48(), mrand48(), jrand48(), srand48(), seed48(), lcong48()

Thread safety

MT-Unsafe race:drand48

The above functions record global state information for the random number generator, so they are not thread-safe.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4.

SEE ALSO

rand(3), random(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1519 - Linux cli command Moose_Meta_Method_Delegationpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Method_Delegationpm and provides detailed information about the command Moose_Meta_Method_Delegationpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Method_Delegationpm.

NAME 🖥️ Moose_Meta_Method_Delegationpm 🖥️

A Moose Method metaclass for delegation methods

VERSION

version 2.2207

DESCRIPTION

This is a subclass of Moose::Meta::Method for delegation methods.

METHODS

Moose::Meta::Method::Delegation->new(%options)

This creates the delegation methods based on the provided %options.

attribute
This must be an instance of Moose::Meta::Attribute which this accessor is being generated for. This options is required.

delegate_to_method
The method in the associated attribute’s value to which we delegate. This can be either a method name or a code reference.

curried_arguments
An array reference of arguments that will be prepended to the argument list for any call to the delegating method.

$metamethod->associated_attribute

Returns the attribute associated with this method.

$metamethod->curried_arguments

Return any curried arguments that will be passed to the delegated method.

$metamethod->delegate_to_method

Returns the method to which this method delegates, as passed to the constructor.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1520 - Linux cli command Regexp_Common_URI_ftppm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_URI_ftppm and provides detailed information about the command Regexp_Common_URI_ftppm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_URI_ftppm.

NAME 🖥️ Regexp_Common_URI_ftppm 🖥️

  • Returns a pattern for FTP URIs.

SYNOPSIS

use Regexp::Common qw /URI/; while (<>) { /$RE{URI}{FTP}/ and print “Contains an FTP URI. “; }

DESCRIPTION

$RE{URI}{FTP}{-type}{-password};

Returns a regex for FTP URIs. Note: FTP URIs are not formally defined. RFC 1738 defines FTP URLs, but parts of that RFC have been obsoleted by RFC 2396. However, the differences between RFC 1738 and RFC 2396 are such that they aren’t applicable straightforwardly to FTP URIs.

There are two main problems:

Passwords.
RFC 1738 allowed an optional username and an optional password (separated by a colon) in the FTP URL. Hence, colons were not allowed in either the username or the password. RFC 2396 strongly recommends passwords should not be used in URIs. It does allow for userinfo instead. This userinfo part may contain colons, and hence contain more than one colon. The regexp returned follows the RFC 2396 specification, unless the {-password} option is given; then the regex allows for an optional username and password, separated by a colon.

The ;type specifier.
RFC 1738 does not allow semi-colons in FTP path names, because a semi-colon is a reserved character for FTP URIs. The semi-colon is used to separate the path from the option type specifier. However, in RFC 2396, paths consist of slash separated segments, and each segment is a semi-colon separated group of parameters. Straigthforward application of RFC 2396 would mean that a trailing type specifier couldn’t be distinguished from the last segment of the path having a two parameters, the last one starting with type=. Therefore we have opted to disallow a semi-colon in the path part of an FTP URI. Furthermore, RFC 1738 allows three values for the type specifier, A, I and D (either upper case or lower case). However, the internet draft about FTP URIs [DRAFT-FTP-URL] (which expired in May 1997) notes the lack of consistent implementation of the D parameter and drops D from the set of possible values. We follow this practise; however, RFC 1738 behaviour can be archieved by using the -type = “[ADIadi]"> parameter.

FTP URIs have the following syntax:

“ftp:” “//” [ userinfo “@” ] host [ “:” port ] [ “/” path [ “;type=” value ]]

When using {-password}, we have the syntax:

“ftp:” “//” [ user [ “:” password ] “@” ] host [ “:” port ] [ “/” path [ “;type=” value ]]

Under {-keep}, the following are returned:

$1
The complete URI.

$2
The scheme.

$3
The userinfo, or if {-password} is used, the username.

$4
If {-password} is used, the password, else undef.

$5
The hostname or IP address.

$6
The port number.

$7
The full path and type specification, including the leading slash.

$8
The full path and type specification, without the leading slash.

$9
The full path, without the type specification nor the leading slash.

$10
The value of the type specification.

REFERENCES

[DRAFT-URL-FTP]
Casey, James: A FTP URL Format. November 1996.

[RFC 1738]
Berners-Lee, Tim, Masinter, L., McCahill, M.: Uniform Resource Locators (URL). December 1994.

[RFC 2396]
Berners-Lee, Tim, Fielding, R., and Masinter, L.: Uniform Resource Identifiers (URI): Generic Syntax. August 1998.

SEE ALSO

Regexp::Common::URI for other supported URIs.

AUTHOR

Damian Conway ([email protected])

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1521 - Linux cli command isnormal

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isnormal and provides detailed information about the command isnormal, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isnormal.

NAME 🖥️ isnormal 🖥️

floating-point classification macros

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
int fpclassify(x);
int isfinite(x);
int isnormal(x);
int isnan(x);
int isinf(x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

fpclassify(), isfinite(), isnormal():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

isnan():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isinf():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

Floating point numbers can have special values, such as infinite or NaN. With the macro fpclassify(x) you can find out what type x is. The macro takes any floating-point expression as argument. The result is one of the following values:

FP_NAN
x is “Not a Number”.

FP_INFINITE
x is either positive infinity or negative infinity.

FP_ZERO
x is zero.

FP_SUBNORMAL
x is too small to be represented in normalized format.

FP_NORMAL
if nothing of the above is correct then it must be a normal floating-point number.

The other macros provide a short answer to some standard questions.

isfinite(x)
returns a nonzero value if
(fpclassify(x) != FP_NAN && fpclassify(x) != FP_INFINITE)

isnormal(x)
returns a nonzero value if (fpclassify(x) == FP_NORMAL)

isnan(x)
returns a nonzero value if (fpclassify(x) == FP_NAN)

isinf(x)
returns 1 if x is positive infinity, and -1 if x is negative infinity.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fpclassify(), isfinite(), isnormal(), isnan(), isinf()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

In glibc 2.01 and earlier, isinf() returns a nonzero value (actually: 1) if x is positive infinity or negative infinity. (This is all that C99 requires.)

NOTES

For isinf(), the standards merely say that the return value is nonzero if and only if the argument has an infinite value.

SEE ALSO

finite(3), INFINITY(3), isgreater(3), signbit(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1522 - Linux cli command j0l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command j0l and provides detailed information about the command j0l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the j0l.

NAME 🖥️ j0l 🖥️

Bessel functions of the first kind

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double j0(double x);
double j1(double x);
double jn(int n, double x);
float j0f(float x);
float j1f(float x);
float jnf(int n, float x);
long double j0l(long double x);
long double j1l(long double x);
long double jnl(int n, long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

j0(), j1(), jn():

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

j0f(), j0l(), j1f(), j1l(), jnf(), jnl():

    _XOPEN_SOURCE >= 600
        || (_ISOC99_SOURCE && _XOPEN_SOURCE)
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The j0() and j1() functions return Bessel functions of x of the first kind of orders 0 and 1, respectively. The jn() function returns the Bessel function of x of the first kind of order n.

The j0f(), j1f(), and jnf(), functions are versions that take and return float values. The j0l(), j1l(), and jnl() functions are versions that take and return long double values.

RETURN VALUE

On success, these functions return the appropriate Bessel value of the first kind for x.

If x is a NaN, a NaN is returned.

If x is too large in magnitude, or the result underflows, a range error occurs, and the return value is 0.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error: result underflow, or x is too large in magnitude
errno is set to ERANGE.

These functions do not raise exceptions for fetestexcept(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

j0(), j0f(), j0l()

Thread safetyMT-Safe

j1(), j1f(), j1l()

Thread safetyMT-Safe

jn(), jnf(), jnl()

Thread safetyMT-Safe

STANDARDS

j0()
j1()
jn()
POSIX.1-2008.

Others:
BSD.

HISTORY

j0()
j1()
jn()
SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008.

Others:
BSD.

BUGS

There are errors of up to 2e-16 in the values returned by j0(), j1(), and jn() for values of x between -8 and 8.

SEE ALSO

y0(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1523 - Linux cli command Net_DNS_RR_CDNSKEYpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_CDNSKEYpm and provides detailed information about the command Net_DNS_RR_CDNSKEYpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_CDNSKEYpm.

NAME 🖥️ Net_DNS_RR_CDNSKEYpm 🖥️

DNS CDNSKEY resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name CDNSKEY flags protocol algorithm publickey);

DESCRIPTION

DNS Child DNSKEY resource record

This is a clone of the DNSKEY record and inherits all properties of the Net::DNS::RR::DNSKEY class.

Please see the Net::DNS::RR::DNSKEY perl documentation for details.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

COPYRIGHT

Copyright (c)2014,2017 Dick Franks

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR Net::DNS::RR::DNSKEY RFC7344 <https://tools.ietf.org/html/rfc7344>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1524 - Linux cli command Net_SSH2_Channelpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_SSH2_Channelpm and provides detailed information about the command Net_SSH2_Channelpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_SSH2_Channelpm.

NAME 🖥️ Net_SSH2_Channelpm 🖥️

SSH2 channel object

SYNOPSIS

my $chan = $ssh2->channel() or $ssh2->die_with_error; $chan->exec(“ls -ld /usr/local/libssh2*”) or $ssh2->die_with_error; $chan->send_eof; while (<$chan>) { print “line read: $_”; } print “exit status: " . $chan->exit_status . " “;

DESCRIPTION

A channel object is created by the Net::SSH2 channel method. As well as being an object, it is also a tied filehandle.

setenv ( key, value … )

Sets remote environment variables. Note that most servers do not allow environment variables to be freely set.

Pass in a list of keys and values with the values to set.

It returns a true value if all the given environment variables were correctly set.

blocking ( flag )

Enable or disable blocking.

Note that this is currently implemented in libssh2 by setting a per-session flag. It’s equivalent to Net::SSH2::blocking.

eof

Returns true if the remote server sent an EOF.

send_eof

Sends an EOF to the remote side.

After an EOF has been sent, no more data may be sent to the remote process STDIN channel.

Note that if a PTY was requested for the channel, the EOF may be ignored by the remote server. See “pty”.

close

Close the channel (happens automatically on object destruction).

wait_closed

Wait for a remote close event.

In order to avoid a bug in libssh2 this method discards any unread data queued in the channel.

exit_status

Returns the channel’s program exit status.

This method blocks until the remote side closes the channel.

pty ( terminal [, modes [, width [, height ]]] )

Request a terminal on a channel.

terminal is the type of emulation (e.g. vt102, ansi, etc…).

modes are the terminal mode modifiers, for instance:

$c->pty(vt100, { echo => 0, vintr => ord(k) });

The list of acceptable mode modifiers is available from the SSH Connection Protocol RFC (RFC4254 <https://tools.ietf.org/html/rfc4254#section-8>).

If provided, width and height are the width and height in characters (defaults to 80x24); if negative their absolute values specify width and height in pixels.

pty_size ( width, height )

Request a terminal size change on a channel. width and height are the width and height in characters; if negative their absolute values specify width and height in pixels.

ext_data ( mode )

Set extended data handling mode:

normal (default)
Keep data in separate channels; STDERR is read separately.

ignore
Ignore all extended data.

merge
Merge into the regular channel.

process ( request, message )

Start a process on the channel. See also shell, exec, subsystem.

Note that only one invocation of process or any of the shortcuts shell, exec or subsystem is allowed per channel. In order to run several commands, shells or/and subsystems, a new Channel instance must be used for every one.

Alternatively, it is also possible to launch a remote shell (using shell) and simulate the user interaction printing commands to its stdin stream and reading data back from its stdout and stderr. But this approach should be avoided if possible; talking to a shell is difficult and, in general, unreliable.

shell

Start a shell on the remote host (calls process("shell")).

exec ( command )

Execute the command on the remote host (calls process("exec", command)).

Note that the given command is parsed by the remote shell; it should be properly quoted, specially when passing data from untrusted sources.

subsystem ( name )

Run subsystem on the remote host (calls process("subsystem", name)).

read ( buffer, max_size [, ext ] )

Attempts to read up to max_size bytes from the channel into buffer. If ext is true, reads from the extended data channel (STDERR).

The method returns as soon as some data is available, even if the given size has not been reached.

Returns number of bytes read or undef on failure. Note that 0 is a valid return code.

read2 ( [max_size] )

Attempts to read from both the ordinary (stdout) and the extended (stderr) channel streams.

Returns two scalars with the data read both from stdout and stderr. It returns as soon as some data is available and any of the returned values may be an empty string.

When some error happens it returns the empty list.

Example:

my ($out, $err) = (, ); while (!$channel->eof) { if (my ($o, $e) = $channel->read2) { $out .= $o; $err .= $e; } else { $ssh2->die_with_error; } } print “STDOUT: $out STDERR: $err “;

readline ( [ext [, eol ] ] )

Reads the next line from the selected stream (ext defaults to 0: stdout).

$/ is used as the end of line marker when eol is undef.

In list context reads and returns all the remaining lines until some read error happens or the remote side sends an eof.

Note that this method is only safe when the complementary stream (e.g. !ext) is guaranteed to not generate data or when “ext_data” has been used to discard or merge it; otherwise it may hang. This is a limitation of libssh2 that hopefully would be removed in a future release, in the meantime you are advised to use read2 instead.

getc( [ext] )

Reads and returns the next character from the selected stream.

Returns undef on error.

Note that due to some libssh2 quirks, the return value can be the empty string which may indicate an EOF condition (but not always!). See “eof”.

write ( buffer )

Send the data in buffer through the channel. Returns number of bytes written, undef on failure.

In versions of this module prior to 0.57, when working in non-blocking mode, the would-block condition was signaled by returning LIBSSH2_ERROR_EAGAIN (a negative number) while leaving the session error status unset. From version 0.59, undef is returned and the session error status is set to LIBSSH2_ERROR_EAGAIN as for any other error.

In non-blocking mode, if write fails with a LIBSSH2_ERROR_EAGAIN error, no other operation must be invoked over any object in the same SSH session besides “sock” and blocking_directions.

Once the socket becomes ready again, the exact same former write call, with exactly the same arguments must be invoked.

Failing to do that would result in a corrupted SSH session. This is a limitation in libssh2.

flush ( [ ext ] )

Discards the received but still unread data on the channel; if ext is present and set, discards data on the extended channel. Returns number of bytes discarded, undef on error.

exit_signal

Returns the name of exit signal from the remote command.

In list context returns also the error message and a language tag, though as of libssh2 1.7.0, those values are always undef.

This method blocks until the remote side closes the channel.

exit_signal_number

Converts the signal name to a signal number using the local mapping (which may be different to the remote one if the operating systems differ).

window_read

Returns the number of bytes which the remote end may send without overflowing the window limit.

In list context it also returns the number of bytes that are immediately available for read and the size of the initial window.

window_write

Returns the number of bytes which may be safely written to the channel without blocking at the SSH level. In list context it also returns the size of the initial window.

Note that this method doesn’t take into account the TCP connection being used under the hood. Getting a positive integer back from this method does not guarantee that such number of bytes could be written to the channel without blocking the TCP connection.

receive_window_adjust (adjustment [, force])

Adjust the channel receive window by the given adjustment bytes.

If the amount to be adjusted is less than LIBSSH2_CHANNEL_MINADJUST and force is false the adjustment amount will be queued for a later packet.

On success returns the new size of the receive window. On failure it returns undef.

SEE ALSO

Net::SSH2.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1525 - Linux cli command Pod_PlainTextpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Pod_PlainTextpm and provides detailed information about the command Pod_PlainTextpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Pod_PlainTextpm.

NAME 🖥️ Pod_PlainTextpm 🖥️

Convert POD data to formatted ASCII text

SYNOPSIS

use Pod::PlainText; my $parser = Pod::PlainText->new (sentence => 0, width => 78); # Read POD from STDIN and write to STDOUT. $parser->parse_from_filehandle; # Read POD from file.pod and write to file.txt. $parser->parse_from_file (file.pod, file.txt);

DESCRIPTION

NOTE: This module is considered legacy; modern Perl releases (5.31.1 and higher) are going to remove Pod-Parser from core and use Pod::Simple for all things POD.

Pod::PlainText is a module that can convert documentation in the POD format (the preferred language for documenting Perl) into formatted ASCII. It uses no special formatting controls or codes whatsoever, and its output is therefore suitable for nearly any device.

As a derived class from Pod::Parser, Pod::PlainText supports the same methods and interfaces. See Pod::Parser for all the details; briefly, one creates a new parser with Pod::PlainText->new() and then calls either parse_from_filehandle() or parse_from_file().

new() can take options, in the form of key/value pairs, that control the behavior of the parser. The currently recognized options are:

alt
If set to a true value, selects an alternate output format that, among other things, uses a different heading style and marks =item entries with a colon in the left margin. Defaults to false.

indent
The number of spaces to indent regular text, and the default indentation for =over blocks. Defaults to 4.

loose
If set to a true value, a blank line is printed after a =headN headings. If set to false (the default), no blank line is printed after =headN. This is the default because it’s the expected formatting for manual pages; if you’re formatting arbitrary text documents, setting this to true may result in more pleasing output.

sentence
If set to a true value, Pod::PlainText will assume that each sentence ends in two spaces, and will try to preserve that spacing. If set to false, all consecutive whitespace in non-verbatim paragraphs is compressed into a single space. Defaults to true.

width
The column at which to wrap text on the right-hand side. Defaults to 76.

The standard Pod::Parser method parse_from_filehandle() takes up to two arguments, the first being the file handle to read POD from and the second being the file handle to write the formatted output to. The first defaults to STDIN if not given, and the second defaults to STDOUT. The method parse_from_file() is almost identical, except that its two arguments are the input and output disk files instead. See Pod::Parser for the specific details.

DIAGNOSTICS

Bizarre space in item
(W) Something has gone wrong in internal =item processing. This message indicates a bug in Pod::PlainText; you should never see it.

Can’t open %s for reading: %s
(F) Pod::PlainText was invoked via the compatibility mode pod2text() interface and the input file it was given could not be opened.

Unknown escape: %s
(W) The POD source contained an E<> escape that Pod::PlainText didn’t know about.

Unknown sequence: %s
(W) The POD source contained a non-standard internal sequence (something of the form X<>) that Pod::PlainText didn’t know about.

Unmatched =back
(W) Pod::PlainText encountered a =back command that didn’t correspond to an =over command.

RESTRICTIONS

Embedded Ctrl-As (octal 001) in the input will be mapped to spaces on output, due to an internal implementation detail.

NOTES

This is a replacement for an earlier Pod::Text module written by Tom Christiansen. It has a revamped interface, since it now uses Pod::Parser, but an interface roughly compatible with the old Pod::Text::pod2text() function is still available. Please change to the new calling convention, though.

The original Pod::Text contained code to do formatting via termcap sequences, although it wasn’t turned on by default and it was problematic to get it to work at all. This rewrite doesn’t even try to do that, but a subclass of it does. Look for Pod::Text::Termcap.

SEE ALSO

Pod::PlainText is part of the Pod::Parser distribution.

Pod::Parser, Pod::Text::Termcap, pod2text (1)

AUTHOR

Please report bugs using <http://rt.cpan.org>.

Russ Allbery <[email protected]>, based very heavily on the original Pod::Text by Tom Christiansen <[email protected]> and its conversion to Pod::Parser by Brad Appleton <[email protected]>.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1526 - Linux cli command pthread_setspecific

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_setspecific and provides detailed information about the command pthread_setspecific, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_setspecific.

NAME 🖥️ pthread_setspecific 🖥️

management of thread-specific data

SYNOPSIS

#include <pthread.h>
int pthread_key_create(pthread_key_t *key,
 void (*destr_function) (void *));
int pthread_key_delete(pthread_key_t key);
int pthread_setspecific(pthread_key_t key, const void *pointer);
void * pthread_getspecific(pthread_key_t key);

DESCRIPTION

Programs often need global or static variables that have different values in different threads. Since threads share one memory space, this cannot be achieved with regular variables. Thread-specific data is the POSIX threads answer to this need.

Each thread possesses a private memory block, the thread-specific data area, or TSD area for short. This area is indexed by TSD keys. The TSD area associates values of type void * to TSD keys. TSD keys are common to all threads, but the value associated with a given TSD key can be different in each thread.

For concreteness, the TSD areas can be viewed as arrays of void * pointers, TSD keys as integer indices into these arrays, and the value of a TSD key as the value of the corresponding array element in the calling thread.

When a thread is created, its TSD area initially associates NULL with all keys.

pthread_key_create allocates a new TSD key. The key is stored in the location pointed to by key. There is a limit of PTHREAD_KEYS_MAX on the number of keys allocated at a given time. The value initially associated with the returned key is NULL in all currently executing threads.

The destr_function argument, if not NULL, specifies a destructor function associated with the key. When a thread terminates via pthread_exit or by cancelation, destr_function is called with arguments the value associated with the key in that thread. The destr_function is not called if that value is NULL. The order in which destructor functions are called at thread termination time is unspecified.

Before the destructor function is called, the NULL value is associated with the key in the current thread. A destructor function might, however, re-associate non-NULL values to that key or some other key. To deal with this, if after all the destructors have been called for all non-NULL values, there are still some non-NULL values with associated destructors, then the process is repeated. The glibc implementation stops the process after PTHREAD_DESTRUCTOR_ITERATIONS iterations, even if some non-NULL values with associated descriptors remain. Other implementations may loop indefinitely.

pthread_key_delete deallocates a TSD key. It does not check whether non-NULL values are associated with that key in the currently executing threads, nor call the destructor function associated with the key.

pthread_setspecific changes the value associated with key in the calling thread, storing the given pointer instead.

pthread_getspecific returns the value currently associated with key in the calling thread.

RETURN VALUE

pthread_key_create, pthread_key_delete, and pthread_setspecific return 0 on success and a non-zero error code on failure. If successful, pthread_key_create stores the newly allocated key in the location pointed to by its key argument.

pthread_getspecific returns the value associated with key on success, and NULL on error.

ERRORS

pthread_key_create returns the following error code on error:

EAGAIN
PTHREAD_KEYS_MAX keys are already allocated.

pthread_key_delete and pthread_setspecific return the following error code on error:

EINVAL
key is not a valid, allocated TSD key.

pthread_getspecific returns NULL if key is not a valid, allocated TSD key.

SEE ALSO

pthread_create(3), pthread_exit(3), pthread_testcancel(3).

EXAMPLE

The following code fragment allocates a thread-specific array of 100 characters, with automatic reclamation at thread exit:

/* Key for the thread-specific buffer */
static pthread_key_t buffer_key;
/* Once-only initialisation of the key */
static pthread_once_t buffer_key_once = PTHREAD_ONCE_INIT;
/* Allocate the thread-specific buffer */
void buffer_alloc(void)
{
  pthread_once(&buffer_key_once, buffer_key_alloc);
  pthread_setspecific(buffer_key, malloc(100));
}
/* Return the thread-specific buffer */
char * get_buffer(void)
{
  return (char *) pthread_getspecific(buffer_key);
}
/* Allocate the key */
static void buffer_key_alloc()
{
  pthread_key_create(&buffer_key, buffer_destroy);
}
/* Free the thread-specific buffer */
static void buffer_destroy(void * buf)
{
  free(buf);
}
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1527 - Linux cli command strncmp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strncmp and provides detailed information about the command strncmp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strncmp.

NAME 🖥️ strncmp 🖥️

compare two strings

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
int strcmp(const char *s1, const char *s2);
int strncmp(const char s1[.n], const char s2[.n], size_t n);

DESCRIPTION

The strcmp() function compares the two strings s1 and s2. The locale is not taken into account (for a locale-aware comparison, see strcoll(3)). The comparison is done using unsigned characters.

strcmp() returns an integer indicating the result of the comparison, as follows:

  • 0, if the s1 and s2 are equal;

  • a negative value if s1 is less than s2;

  • a positive value if s1 is greater than s2.

The strncmp() function is similar, except it compares only the first (at most) n bytes of s1 and s2.

RETURN VALUE

The strcmp() and strncmp() functions return an integer less than, equal to, or greater than zero if s1 (or the first n bytes thereof) is found, respectively, to be less than, to match, or be greater than s2.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strcmp(), strncmp()

Thread safetyMT-Safe

VERSIONS

POSIX.1 specifies only that:

The sign of a nonzero return value shall be determined by the sign of the difference between the values of the first pair of bytes (both interpreted as type unsigned char) that differ in the strings being compared.

In glibc, as in most other implementations, the return value is the arithmetic result of subtracting the last compared byte in s2 from the last compared byte in s1. (If the two characters are equal, this difference is 0.)

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89, SVr4, 4.3BSD.

EXAMPLES

The program below can be used to demonstrate the operation of strcmp() (when given two arguments) and strncmp() (when given three arguments). First, some examples using strcmp():

$ ./string_comp ABC ABC
<str1> and <str2> are equal
$ ./string_comp ABC AB      # 'C' is ASCII 67; 'C' - '' = 67
<str1> is greater than <str2> (67)
$ ./string_comp ABA ABZ     # 'A' is ASCII 65; 'Z' is ASCII 90
<str1> is less than <str2> (-25)
$ ./string_comp ABJ ABC
<str1> is greater than <str2> (7)
$ ./string_comp $'\201' A   # 0201 - 0101 = 0100 (or 64 decimal)
<str1> is greater than <str2> (64)

The last example uses bash(1)-specific syntax to produce a string containing an 8-bit ASCII code; the result demonstrates that the string comparison uses unsigned characters.

And then some examples using strncmp():

$ ./string_comp ABC AB 3
<str1> is greater than <str2> (67)
$ ./string_comp ABC AB 2
<str1> and <str2> are equal in the first 2 bytes

Program source

/* string_comp.c
   Licensed under GNU General Public License v2 or later.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int
main(int argc, char *argv[])
{
    int res;
    if (argc < 3) {
        fprintf(stderr, "Usage: %s <str1> <str2> [<len>]

“, argv[0]); exit(EXIT_FAILURE); } if (argc == 3) res = strcmp(argv[1], argv[2]); else res = strncmp(argv[1], argv[2], atoi(argv[3])); if (res == 0) { printf(" and are equal”); if (argc > 3) printf(" in the first %d bytes “, atoi(argv[3])); printf(” “); } else if (res < 0) { printf(" is less than (%d) “, res); } else { printf(" is greater than (%d) “, res); } exit(EXIT_SUCCESS); }

SEE ALSO

memcmp(3), strcasecmp(3), strcoll(3), string(3), strncasecmp(3), strverscmp(3), wcscmp(3), wcsncmp(3), ascii(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1528 - Linux cli command XML_Perl2SAXpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_Perl2SAXpm and provides detailed information about the command XML_Perl2SAXpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_Perl2SAXpm.

NAME 🖥️ XML_Perl2SAXpm 🖥️

  • translate Perl SAX methods to Java/CORBA style methods

SYNOPSIS

use XML::Perl2SAX; $perl2sax = XML::Perl2SAX(handler => $java_style_handler);

DESCRIPTION

XML::Perl2SAX is a SAX filter that translates Perl style SAX methods to Java/CORBA style method calls. This module performs the inverse operation from XML::SAX2Perl.

Perl2SAX is a Perl SAX document handler. The `new’ method takes a `handler’ argument that is a Java/CORBA style handler that the new Perl2SAX instance will call. The SAX interfaces are defined at <http://www.megginson.com/SAX/>.

AUTHOR

Ken MacLeod <[email protected]>

SEE ALSO

perl (1), XML::Perl2SAX (3).

Extensible Markup Language (XML) <http://www.w3c.org/XML/> Simple API for XML (SAX) <http://www.megginson.com/SAX/>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1529 - Linux cli command lldiv_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lldiv_ttype and provides detailed information about the command lldiv_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lldiv_ttype.

NAME 🖥️ lldiv_ttype 🖥️

quotient and remainder of an integer division

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <stdlib.h>
typedef struct {
 int quot; /* Quotient */
 int rem; /* Remainder */
} div_t;
typedef struct {
 long quot; /* Quotient */
 long rem; /* Remainder */
} ldiv_t;
typedef struct {
 long long quot; /* Quotient */
 long long rem; /* Remainder */
} lldiv_t;
#include <inttypes.h>
typedef struct {
 intmax_t quot; /* Quotient */
 intmax_t rem; /* Remainder */
} imaxdiv_t;

DESCRIPTION

[[l]l]div_t is the type of the value returned by the [[l]l] div(3) function.

imaxdiv_t is the type of the value returned by the imaxdiv(3) function.

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

SEE ALSO

div(3), imaxdiv(3), ldiv(3), lldiv(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1530 - Linux cli command uintN_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command uintN_ttype and provides detailed information about the command uintN_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the uintN_ttype.

NAME 🖥️ uintN_ttype 🖥️

fixed-width basic integer types

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <stdint.h>
typedef /* ... */ int8_t;
typedef /* ... */ int16_t;
typedef /* ... */ int32_t;
typedef /* ... */ int64_t;
typedef /* ... */ uint8_t;
typedef /* ... */ uint16_t;
typedef /* ... */ uint32_t;
typedef /* ... */ uint64_t;
#define INT8_WIDTH 8
#define INT16_WIDTH 16
#define INT32_WIDTH 32
#define INT64_WIDTH 64
#define UINT8_WIDTH 8
#define UINT16_WIDTH 16
#define UINT32_WIDTH 32
#define UINT64_WIDTH 64
#define INT8_MAX /* 2**(INT8_WIDTH - 1) - 1 */
#define INT16_MAX /* 2**(INT16_WIDTH - 1) - 1 */
#define INT32_MAX /* 2**(INT32_WIDTH - 1) - 1 */
#define INT64_MAX /* 2**(INT64_WIDTH - 1) - 1 */
#define INT8_MIN /* - 2**(INT8_WIDTH - 1) */
#define INT16_MIN /* - 2**(INT16_WIDTH - 1) */
#define INT32_MIN /* - 2**(INT32_WIDTH - 1) */
#define INT64_MIN /* - 2**(INT64_WIDTH - 1) */
#define UINT8_MAX /* 2**INT8_WIDTH - 1 */
#define UINT16_MAX /* 2**INT16_WIDTH - 1 */
#define UINT32_MAX /* 2**INT32_WIDTH - 1 */
#define UINT64_MAX /* 2**INT64_WIDTH - 1 */
#define INT8_C(c) c ## /* ... */
#define INT16_C(c) c ## /* ... */
#define INT32_C(c) c ## /* ... */
#define INT64_C(c) c ## /* ... */
#define UINT8_C(c) c ## /* ... */
#define UINT16_C(c) c ## /* ... */
#define UINT32_C(c) c ## /* ... */
#define UINT64_C(c) c ## /* ... */

DESCRIPTION

intN*_t* are signed integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are be capable of storing values in the range [INTN**_MIN**, INTN**_MAX**], substituting N by the appropriate number.

uintN*_t* are unsigned integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are capable of storing values in the range [0, UINTN**_MAX**], substituting N by the appropriate number.

According to POSIX, [u]int8_t, [u]int16_t, and [u]int32_t are required; [u]int64_t are only required in implementations that provide integer types with width 64; and all other types of this form are optional.

The macros [U]INTN**_WIDTH** expand to the width in bits of these types (N).

The macros [U]INTN**_MAX** expand to the maximum value that these types can hold.

The macros INTN**_MIN** expand to the minimum value that these types can hold.

The macros [U]INTN**_C**() expand their argument to an integer constant of type [u]intN*_t*.

The length modifiers for the [u]intN*_t* types for the printf(3) family of functions are expanded by macros of the forms PRIdN, PRIiN, PRIuN, and PRIxN (defined in <inttypes.h>); resulting for example in %“PRId64” or %“PRIi64” for printing int64_t values. The length modifiers for the [u]intN*_t* types for the scanf(3) family of functions are expanded by macros of the forms SCNdN, SCNiN, SCNuN, and SCNxN, (defined in <inttypes.h>); resulting for example in %“SCNu8” or %“SCNx8” for scanning uint8_t values.

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The [U]INTN**_WIDTH** macros were added in C23.

NOTES

The following header also provides these types: <inttypes.h>. <arpa/inet.h> also provides uint16_t and uint32_t.

SEE ALSO

intmax_t(3type), intptr_t(3type), printf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1531 - Linux cli command Image_ExifTool_ISOpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_ISOpm and provides detailed information about the command Image_ExifTool_ISOpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_ISOpm.

NAME 🖥️ Image_ExifTool_ISOpm 🖥️

Read information from ISO 9660 disk images

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read information from ISO 9660 disk images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://wiki.osdev.org/ISO_9660>

SEE ALSO

“ISO Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1532 - Linux cli command readdir

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command readdir and provides detailed information about the command readdir, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the readdir.

NAME 🖥️ readdir 🖥️

read a directory

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <dirent.h>
struct dirent *readdir(DIR *dirp);

DESCRIPTION

The readdir() function returns a pointer to a dirent structure representing the next directory entry in the directory stream pointed to by dirp. It returns NULL on reaching the end of the directory stream or if an error occurred.

In the glibc implementation, the dirent structure is defined as follows:

struct dirent {
    ino_t          d_ino;       /* Inode number */
    off_t          d_off;       /* Not an offset; see below */
    unsigned short d_reclen;    /* Length of this record */
    unsigned char  d_type;      /* Type of file; not supported
                                   by all filesystem types */
    char           d_name[256]; /* Null-terminated filename */
};

The only fields in the dirent structure that are mandated by POSIX.1 are d_name and d_ino. The other fields are unstandardized, and not present on all systems; see NOTES below for some further details.

The fields of the dirent structure are as follows:

d_ino
This is the inode number of the file.

d_off
The value returned in d_off is the same as would be returned by calling telldir(3) at the current position in the directory stream. Be aware that despite its type and name, the d_off field is seldom any kind of directory offset on modern filesystems. Applications should treat this field as an opaque value, making no assumptions about its contents; see also telldir(3).

d_reclen
This is the size (in bytes) of the returned record. This may not match the size of the structure definition shown above; see NOTES.

d_type
This field contains a value indicating the file type, making it possible to avoid the expense of calling lstat(2) if further actions depend on the type of the file.

When a suitable feature test macro is defined (_DEFAULT_SOURCE since glibc 2.19, or _BSD_SOURCE on glibc 2.19 and earlier), glibc defines the following macro constants for the value returned in d_type:

DT_BLK
This is a block device.

DT_CHR
This is a character device.

DT_DIR
This is a directory.

DT_FIFO
This is a named pipe (FIFO).

DT_LNK
This is a symbolic link.

DT_REG
This is a regular file.

DT_SOCK
This is a UNIX domain socket.

DT_UNKNOWN
The file type could not be determined.

Currently, only some filesystems (among them: Btrfs, ext2, ext3, and ext4) have full support for returning the file type in d_type. All applications must properly handle a return of DT_UNKNOWN.

d_name
This field contains the null terminated filename. See NOTES.

The data returned by readdir() may be overwritten by subsequent calls to readdir() for the same directory stream.

RETURN VALUE

On success, readdir() returns a pointer to a dirent structure. (This structure may be statically allocated; do not attempt to free(3) it.)

If the end of the directory stream is reached, NULL is returned and errno is not changed. If an error occurs, NULL is returned and errno is set to indicate the error. To distinguish end of stream from an error, set errno to zero before calling readdir() and then check the value of errno if NULL is returned.

ERRORS

EBADF
Invalid directory stream descriptor dirp.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

readdir()

Thread safetyMT-Unsafe race:dirstream

In the current POSIX.1 specification (POSIX.1-2008), readdir() is not required to be thread-safe. However, in modern implementations (including the glibc implementation), concurrent calls to readdir() that specify different directory streams are thread-safe. In cases where multiple threads must read from the same directory stream, using readdir() with external synchronization is still preferable to the use of the deprecated readdir_r(3) function. It is expected that a future version of POSIX.1 will require that readdir() be thread-safe when concurrently employed on different directory streams.

VERSIONS

Only the fields d_name and (as an XSI extension) d_ino are specified in POSIX.1. Other than Linux, the d_type field is available mainly only on BSD systems. The remaining fields are available on many, but not all systems. Under glibc, programs can check for the availability of the fields not defined in POSIX.1 by testing whether the macros _DIRENT_HAVE_D_NAMLEN, _DIRENT_HAVE_D_RECLEN, _DIRENT_HAVE_D_OFF, or _DIRENT_HAVE_D_TYPE are defined.

The d_name field

The dirent structure definition shown above is taken from the glibc headers, and shows the d_name field with a fixed size.

Warning: applications should avoid any dependence on the size of the d_name field. POSIX defines it as char d_name[], a character array of unspecified size, with at most NAME_MAX characters preceding the terminating null byte (‘�’).

POSIX.1 explicitly notes that this field should not be used as an lvalue. The standard also notes that the use of sizeof(d_name) is incorrect; use strlen(d_name) instead. (On some systems, this field is defined as char d_name[1]!) By implication, the use sizeof(struct dirent) to capture the size of the record including the size of d_name is also incorrect.

Note that while the call

fpathconf(fd, _PC_NAME_MAX)

returns the value 255 for most filesystems, on some filesystems (e.g., CIFS, Windows SMB servers), the null-terminated filename that is (correctly) returned in d_name can actually exceed this size. In such cases, the d_reclen field will contain a value that exceeds the size of the glibc dirent structure shown above.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4, 4.3BSD.

NOTES

A directory stream is opened using opendir(3).

The order in which filenames are read by successive calls to readdir() depends on the filesystem implementation; it is unlikely that the names will be sorted in any fashion.

SEE ALSO

getdents(2), read(2), closedir(3), dirfd(3), ftw(3), offsetof(3), opendir(3), readdir_r(3), rewinddir(3), scandir(3), seekdir(3), telldir(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1533 - Linux cli command isnanf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isnanf and provides detailed information about the command isnanf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isnanf.

NAME 🖥️ isnanf 🖥️

BSD floating-point classification functions

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
int finite(double x);
int finitef(float x);
int finitel(long double x);
int isinf(double x);
int isinff(float x);
int isinfl(long double x);
int isnan(double x);
int isnanf(float x);
int isnanl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

finite(), finitef(), finitel():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
isinf():
    _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isinff(), isinfl():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isnan():

    _XOPEN_SOURCE || _ISOC99_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isnanf(), isnanl():

    _XOPEN_SOURCE >= 600
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The finite(), finitef(), and finitel() functions return a nonzero value if x is neither infinite nor a “not-a-number” (NaN) value, and 0 otherwise.

The isnan(), isnanf(), and isnanl() functions return a nonzero value if x is a NaN value, and 0 otherwise.

The isinf(), isinff(), and isinfl() functions return 1 if x is positive infinity, -1 if x is negative infinity, and 0 otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

finite(), finitef(), finitel(), isinf(), isinff(), isinfl(), isnan(), isnanf(), isnanl()

Thread safetyMT-Safe

NOTES

Note that these functions are obsolete. C99 defines macros isfinite(), isinf(), and isnan() (for all types) replacing them. Further note that the C99 isinf() has weaker guarantees on the return value. See fpclassify(3).

SEE ALSO

fpclassify(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1534 - Linux cli command Regexp_Common_URI_RFC2806pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_URI_RFC2806pm and provides detailed information about the command Regexp_Common_URI_RFC2806pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_URI_RFC2806pm.

NAME 🖥️ Regexp_Common_URI_RFC2806pm 🖥️

  • Definitions from RFC2806;

SYNOPSIS

use Regexp::Common::URI::RFC2806 qw /:ALL/;

DESCRIPTION

This package exports definitions from RFC2806. It’s intended usage is for Regexp::Common::URI submodules only. Its interface might change without notice.

REFERENCES

[RFC 2616]
Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P. and Berners-Lee, Tim: Hypertext Transfer Protocol – HTTP/1.1. June 1999.

AUTHOR

Damian Conway ([email protected])

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1535 - Linux cli command getaddrinfo

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getaddrinfo and provides detailed information about the command getaddrinfo, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getaddrinfo.

NAME 🖥️ getaddrinfo 🖥️

network address and service translation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
int getaddrinfo(const char *restrict node,
 const char *restrict service,
 const struct addrinfo *restrict hints,
 struct addrinfo **restrict res);
void freeaddrinfo(struct addrinfo *res);
const char *gai_strerror(int errcode);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getaddrinfo(), freeaddrinfo(), gai_strerror():

    Since glibc 2.22:
        _POSIX_C_SOURCE >= 200112L
    glibc 2.21 and earlier:
        _POSIX_C_SOURCE

DESCRIPTION

Given node and service, which identify an Internet host and a service, getaddrinfo() returns one or more addrinfo structures, each of which contains an Internet address that can be specified in a call to bind(2) or connect(2). The getaddrinfo() function combines the functionality provided by the gethostbyname(3) and getservbyname(3) functions into a single interface, but unlike the latter functions, getaddrinfo() is reentrant and allows programs to eliminate IPv4-versus-IPv6 dependencies.

The addrinfo structure used by getaddrinfo() contains the following fields:

struct addrinfo {
    int              ai_flags;
    int              ai_family;
    int              ai_socktype;
    int              ai_protocol;
    socklen_t        ai_addrlen;
    struct sockaddr *ai_addr;
    char            *ai_canonname;
    struct addrinfo *ai_next;
};

The hints argument points to an addrinfo structure that specifies criteria for selecting the socket address structures returned in the list pointed to by res. If hints is not NULL it points to an addrinfo structure whose ai_family, ai_socktype, and ai_protocol specify criteria that limit the set of socket addresses returned by getaddrinfo(), as follows:

ai_family
This field specifies the desired address family for the returned addresses. Valid values for this field include AF_INET and AF_INET6. The value AF_UNSPEC indicates that getaddrinfo() should return socket addresses for any address family (either IPv4 or IPv6, for example) that can be used with node and service.

ai_socktype
This field specifies the preferred socket type, for example SOCK_STREAM or SOCK_DGRAM. Specifying 0 in this field indicates that socket addresses of any type can be returned by getaddrinfo().

ai_protocol
This field specifies the protocol for the returned socket addresses. Specifying 0 in this field indicates that socket addresses with any protocol can be returned by getaddrinfo().

ai_flags
This field specifies additional options, described below. Multiple flags are specified by bitwise OR-ing them together.

All the other fields in the structure pointed to by hints must contain either 0 or a null pointer, as appropriate.

Specifying hints as NULL is equivalent to setting ai_socktype and ai_protocol to 0; ai_family to AF_UNSPEC; and ai_flags to (AI_V4MAPPED | AI_ADDRCONFIG). (POSIX specifies different defaults for ai_flags; see NOTES.) node specifies either a numerical network address (for IPv4, numbers-and-dots notation as supported by inet_aton(3); for IPv6, hexadecimal string format as supported by inet_pton(3)), or a network hostname, whose network addresses are looked up and resolved. If hints.ai_flags contains the AI_NUMERICHOST flag, then node must be a numerical network address. The AI_NUMERICHOST flag suppresses any potentially lengthy network host address lookups.

If the AI_PASSIVE flag is specified in hints.ai_flags, and node is NULL, then the returned socket addresses will be suitable for bind(2)ing a socket that will accept(2) connections. The returned socket address will contain the “wildcard address” (INADDR_ANY for IPv4 addresses, IN6ADDR_ANY_INIT for IPv6 address). The wildcard address is used by applications (typically servers) that intend to accept connections on any of the host’s network addresses. If node is not NULL, then the AI_PASSIVE flag is ignored.

If the AI_PASSIVE flag is not set in hints.ai_flags, then the returned socket addresses will be suitable for use with connect(2), sendto(2), or sendmsg(2). If node is NULL, then the network address will be set to the loopback interface address (INADDR_LOOPBACK for IPv4 addresses, IN6ADDR_LOOPBACK_INIT for IPv6 address); this is used by applications that intend to communicate with peers running on the same host.

service sets the port in each returned address structure. If this argument is a service name (see services(5)), it is translated to the corresponding port number. This argument can also be specified as a decimal number, which is simply converted to binary. If service is NULL, then the port number of the returned socket addresses will be left uninitialized. If AI_NUMERICSERV is specified in hints.ai_flags and service is not NULL, then service must point to a string containing a numeric port number. This flag is used to inhibit the invocation of a name resolution service in cases where it is known not to be required.

Either node or service, but not both, may be NULL.

The getaddrinfo() function allocates and initializes a linked list of addrinfo structures, one for each network address that matches node and service, subject to any restrictions imposed by hints, and returns a pointer to the start of the list in res. The items in the linked list are linked by the ai_next field.

There are several reasons why the linked list may have more than one addrinfo structure, including: the network host is multihomed, accessible over multiple protocols (e.g., both AF_INET and AF_INET6); or the same service is available from multiple socket types (one SOCK_STREAM address and another SOCK_DGRAM address, for example). Normally, the application should try using the addresses in the order in which they are returned. The sorting function used within getaddrinfo() is defined in RFC 3484; the order can be tweaked for a particular system by editing /etc/gai.conf (available since glibc 2.5).

If hints.ai_flags includes the AI_CANONNAME flag, then the ai_canonname field of the first of the addrinfo structures in the returned list is set to point to the official name of the host.

The remaining fields of each returned addrinfo structure are initialized as follows:

  • The ai_family, ai_socktype, and ai_protocol fields return the socket creation parameters (i.e., these fields have the same meaning as the corresponding arguments of socket(2)). For example, ai_family might return AF_INET or AF_INET6; ai_socktype might return SOCK_DGRAM or SOCK_STREAM; and ai_protocol returns the protocol for the socket.

  • A pointer to the socket address is placed in the ai_addr field, and the length of the socket address, in bytes, is placed in the ai_addrlen field.

If hints.ai_flags includes the AI_ADDRCONFIG flag, then IPv4 addresses are returned in the list pointed to by res only if the local system has at least one IPv4 address configured, and IPv6 addresses are returned only if the local system has at least one IPv6 address configured. The loopback address is not considered for this case as valid as a configured address. This flag is useful on, for example, IPv4-only systems, to ensure that getaddrinfo() does not return IPv6 socket addresses that would always fail in connect(2) or bind(2).

If hints.ai_flags specifies the AI_V4MAPPED flag, and hints.ai_family was specified as AF_INET6, and no matching IPv6 addresses could be found, then return IPv4-mapped IPv6 addresses in the list pointed to by res. If both AI_V4MAPPED and AI_ALL are specified in hints.ai_flags, then return both IPv6 and IPv4-mapped IPv6 addresses in the list pointed to by res. AI_ALL is ignored if AI_V4MAPPED is not also specified.

The freeaddrinfo() function frees the memory that was allocated for the dynamically allocated linked list res.

Extensions to getaddrinfo() for Internationalized Domain Names

Starting with glibc 2.3.4, getaddrinfo() has been extended to selectively allow the incoming and outgoing hostnames to be transparently converted to and from the Internationalized Domain Name (IDN) format (see RFC 3490, Internationalizing Domain Names in Applications (IDNA)). Four new flags are defined:

AI_IDN
If this flag is specified, then the node name given in node is converted to IDN format if necessary. The source encoding is that of the current locale.

If the input name contains non-ASCII characters, then the IDN encoding is used. Those parts of the node name (delimited by dots) that contain non-ASCII characters are encoded using ASCII Compatible Encoding (ACE) before being passed to the name resolution functions.

AI_CANONIDN
After a successful name lookup, and if the AI_CANONNAME flag was specified, getaddrinfo() will return the canonical name of the node corresponding to the addrinfo structure value passed back. The return value is an exact copy of the value returned by the name resolution function.

If the name is encoded using ACE, then it will contain the xn– prefix for one or more components of the name. To convert these components into a readable form the AI_CANONIDN flag can be passed in addition to AI_CANONNAME. The resulting string is encoded using the current locale’s encoding.

AI_IDN_ALLOW_UNASSIGNED
AI_IDN_USE_STD3_ASCII_RULES
Setting these flags will enable the IDNA_ALLOW_UNASSIGNED (allow unassigned Unicode code points) and IDNA_USE_STD3_ASCII_RULES (check output to make sure it is a STD3 conforming hostname) flags respectively to be used in the IDNA handling.

RETURN VALUE

getaddrinfo() returns 0 if it succeeds, or one of the following nonzero error codes:

EAI_ADDRFAMILY
The specified network host does not have any network addresses in the requested address family.

EAI_AGAIN
The name server returned a temporary failure indication. Try again later.

EAI_BADFLAGS
hints.ai_flags contains invalid flags; or, hints.ai_flags included AI_CANONNAME and node was NULL.

EAI_FAIL
The name server returned a permanent failure indication.

EAI_FAMILY
The requested address family is not supported.

EAI_MEMORY
Out of memory.

EAI_NODATA
The specified network host exists, but does not have any network addresses defined.

EAI_NONAME
The node or service is not known; or both node and service are NULL; or AI_NUMERICSERV was specified in hints.ai_flags and service was not a numeric port-number string.

EAI_SERVICE
The requested service is not available for the requested socket type. It may be available through another socket type. For example, this error could occur if service was “shell” (a service available only on stream sockets), and either hints.ai_protocol was IPPROTO_UDP, or hints.ai_socktype was SOCK_DGRAM; or the error could occur if service was not NULL, and hints.ai_socktype was SOCK_RAW (a socket type that does not support the concept of services).

EAI_SOCKTYPE
The requested socket type is not supported. This could occur, for example, if hints.ai_socktype and hints.ai_protocol are inconsistent (e.g., SOCK_DGRAM and IPPROTO_TCP, respectively).

EAI_SYSTEM
Other system error; errno is set to indicate the error.

The gai_strerror() function translates these error codes to a human readable string, suitable for error reporting.

FILES

/etc/gai.conf

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getaddrinfo()

Thread safetyMT-Safe env locale

freeaddrinfo(), gai_strerror()

Thread safetyMT-Safe

VERSIONS

According to POSIX.1, specifying hints as NULL should cause ai_flags to be assumed as 0. The GNU C library instead assumes a value of (AI_V4MAPPED | AI_ADDRCONFIG) for this case, since this value is considered an improvement on the specification.

STANDARDS

POSIX.1-2008.

getaddrinfo()
RFC 2553.

HISTORY

POSIX.1-2001.

AI_ADDRCONFIG
AI_ALL
AI_V4MAPPED
glibc 2.3.3.

AI_NUMERICSERV
glibc 2.3.4.

NOTES

getaddrinfo() supports the address**%**scope-id notation for specifying the IPv6 scope-ID.

EXAMPLES

The following programs demonstrate the use of getaddrinfo(), gai_strerror(), freeaddrinfo(), and getnameinfo(3). The programs are an echo server and client for UDP datagrams.

Server program

#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
#define BUF_SIZE 500
int
main(int argc, char *argv[])
{
    int                      sfd, s;
    char                     buf[BUF_SIZE];
    ssize_t                  nread;
    socklen_t                peer_addrlen;
    struct addrinfo          hints;
    struct addrinfo          *result, *rp;
    struct sockaddr_storage  peer_addr;
    if (argc != 2) {
        fprintf(stderr, "Usage: %s port

“, argv[0]); exit(EXIT_FAILURE); } memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 / hints.ai_socktype = SOCK_DGRAM; / Datagram socket / hints.ai_flags = AI_PASSIVE; / For wildcard IP address / hints.ai_protocol = 0; / Any protocol / hints.ai_canonname = NULL; hints.ai_addr = NULL; hints.ai_next = NULL; s = getaddrinfo(NULL, argv[1], &hints, &result); if (s != 0) { fprintf(stderr, “getaddrinfo: %s “, gai_strerror(s)); exit(EXIT_FAILURE); } / getaddrinfo() returns a list of address structures. Try each address until we successfully bind(2). If socket(2) (or bind(2)) fails, we (close the socket and) try the next address. / for (rp = result; rp != NULL; rp = rp->ai_next) { sfd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); if (sfd == -1) continue; if (bind(sfd, rp->ai_addr, rp->ai_addrlen) == 0) break; / Success / close(sfd); } freeaddrinfo(result); / No longer needed / if (rp == NULL) { / No address succeeded / fprintf(stderr, “Could not bind “); exit(EXIT_FAILURE); } / Read datagrams and echo them back to sender. */ for (;;) { char host[NI_MAXHOST], service[NI_MAXSERV]; peer_addrlen = sizeof(peer_addr); nread = recvfrom(sfd, buf, BUF_SIZE, 0, (struct sockaddr ) &peer_addr, &peer_addrlen); if (nread == -1) continue; / Ignore failed request */ s = getnameinfo((struct sockaddr *) &peer_addr, peer_addrlen, host, NI_MAXHOST, service, NI_MAXSERV, NI_NUMERICSERV); if (s == 0) printf(“Received %zd bytes from %s:%s “, nread, host, service); else fprintf(stderr, “getnameinfo: %s “, gai_strerror(s)); if (sendto(sfd, buf, nread, 0, (struct sockaddr *) &peer_addr, peer_addrlen) != nread) { fprintf(stderr, “Error sending response “); } } }

Client program

#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
#define BUF_SIZE 500
int
main(int argc, char *argv[])
{
    int              sfd, s;
    char             buf[BUF_SIZE];
    size_t           len;
    ssize_t          nread;
    struct addrinfo  hints;
    struct addrinfo  *result, *rp;
    if (argc < 3) {
        fprintf(stderr, "Usage: %s host port msg...

“, argv[0]); exit(EXIT_FAILURE); } /* Obtain address(es) matching host/port. / memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; / Allow IPv4 or IPv6 / hints.ai_socktype = SOCK_DGRAM; / Datagram socket / hints.ai_flags = 0; hints.ai_protocol = 0; / Any protocol / s = getaddrinfo(argv[1], argv[2], &hints, &result); if (s != 0) { fprintf(stderr, “getaddrinfo: %s “, gai_strerror(s)); exit(EXIT_FAILURE); } / getaddrinfo() returns a list of address structures. Try each address until we successfully connect(2). If socket(2) (or connect(2)) fails, we (close the socket and) try the next address. / for (rp = result; rp != NULL; rp = rp->ai_next) { sfd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); if (sfd == -1) continue; if (connect(sfd, rp->ai_addr, rp->ai_addrlen) != -1) break; / Success / close(sfd); } freeaddrinfo(result); / No longer needed / if (rp == NULL) { / No address succeeded / fprintf(stderr, “Could not connect “); exit(EXIT_FAILURE); } / Send remaining command-line arguments as separate datagrams, and read responses from server. / for (size_t j = 3; j < argc; j++) { len = strlen(argv[j]) + 1; / +1 for terminating null byte */ if (len > BUF_SIZE) { fprintf(stderr, “Ignoring long message in argument %zu “, j); continue; } if (write(sfd, argv[j], len) != len) { fprintf(stderr, “partial/failed write “); exit(EXIT_FAILURE); } nread = read(sfd, buf, BUF_SIZE); if (nread == -1) { perror(“read”); exit(EXIT_FAILURE); } printf(“Received %zd bytes: %s “, nread, buf); } exit(EXIT_SUCCESS); }

SEE ALSO

getaddrinfo_a(3), gethostbyname(3), getnameinfo(3), inet(3), gai.conf(5), hostname(7), ip(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1536 - Linux cli command gethostbyname2_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gethostbyname2_r and provides detailed information about the command gethostbyname2_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gethostbyname2_r.

NAME 🖥️ gethostbyname2_r 🖥️

get network host entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
void sethostent(int stayopen);
void endhostent(void);
[[deprecated]] extern int h_errno;
[[deprecated]] struct hostent *gethostbyname(const char *name);
[[deprecated]] struct hostent *gethostbyaddr(const void addr[.len],
 socklen_t len, int type);
[[deprecated]] void herror(const char *s);
[[deprecated]] const char *hstrerror(int err);
/* System V/POSIX extension */
struct hostent *gethostent(void);
/* GNU extensions */
[[deprecated]]
struct hostent *gethostbyname2(const char *name, int af);
int gethostent_r(struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyaddr_r(const void addr[restrict .len], socklen_t len,
 int type,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyname_r(const char *restrict name,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyname2_r(const char *restrict name, int af,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

gethostbyname2(), gethostent_r(), gethostbyaddr_r(), gethostbyname_r(), gethostbyname2_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc up to and including 2.19:
        _BSD_SOURCE || _SVID_SOURCE

herror(), hstrerror():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.8 to glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE
    Before glibc 2.8:
        none

h_errno:

    Since glibc 2.19
        _DEFAULT_SOURCE || _POSIX_C_SOURCE < 200809L
    glibc 2.12 to glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE || _POSIX_C_SOURCE < 200809L
    Before glibc 2.12:
        none

DESCRIPTION

The gethostbyname*(), gethostbyaddr*(), herror(), and hstrerror() functions are obsolete. Applications should use getaddrinfo(3), getnameinfo(3), and gai_strerror(3) instead.

The sethostent() function specifies, if stayopen is true (1), that a connected TCP socket should be used for the name server queries and that the connection should remain open during successive queries. Otherwise, name server queries will use UDP datagrams.

The endhostent() function ends the use of a TCP connection for name server queries.

The gethostbyname() function returns a structure of type hostent for the given host name. Here name is either a hostname or an IPv4 address in standard dot notation (as for inet_addr(3)). If name is an IPv4 address, no lookup is performed and gethostbyname() simply copies name into the h_name field and its struct in_addr equivalent into the h_addr_list[0] field of the returned hostent structure. If name doesn’t end in a dot and the environment variable HOSTALIASES is set, the alias file pointed to by HOSTALIASES will first be searched for name (see hostname(7) for the file format). The current domain and its parents are searched unless name ends in a dot.

The gethostbyaddr() function returns a structure of type hostent for the given host address addr of length len and address type type. Valid address types are AF_INET and AF_INET6 (defined in <sys/socket.h>). The host address argument is a pointer to a struct of a type depending on the address type, for example a struct in_addr * (probably obtained via a call to inet_addr(3)) for address type AF_INET.

The (obsolete) herror() function prints the error message associated with the current value of h_errno on stderr.

The (obsolete) hstrerror() function takes an error number (typically h_errno) and returns the corresponding message string.

The domain name queries carried out by gethostbyname() and gethostbyaddr() rely on the Name Service Switch (nsswitch.conf(5)) configured sources or a local name server (named(8)). The default action is to query the Name Service Switch (nsswitch.conf(5)) configured sources, failing that, a local name server (named(8)).

Historical

The nsswitch.conf(5) file is the modern way of controlling the order of host lookups.

In glibc 2.4 and earlier, the order keyword was used to control the order of host lookups as defined in /etc/host.conf (host.conf(5)).

The hostent structure is defined in <netdb.h> as follows:

struct hostent {
    char  *h_name;            /* official name of host */
    char **h_aliases;         /* alias list */
    int    h_addrtype;        /* host address type */
    int    h_length;          /* length of address */
    char **h_addr_list;       /* list of addresses */
}
#define h_addr h_addr_list[0] /* for backward compatibility */

The members of the hostent structure are:

h_name
The official name of the host.

h_aliases
An array of alternative names for the host, terminated by a null pointer.

h_addrtype
The type of address; always AF_INET or AF_INET6 at present.

h_length
The length of the address in bytes.

h_addr_list
An array of pointers to network addresses for the host (in network byte order), terminated by a null pointer.

h_addr
The first address in h_addr_list for backward compatibility.

RETURN VALUE

The gethostbyname() and gethostbyaddr() functions return the hostent structure or a null pointer if an error occurs. On error, the h_errno variable holds an error number. When non-NULL, the return value may point at static data, see the notes below.

ERRORS

The variable h_errno can have the following values:

HOST_NOT_FOUND
The specified host is unknown.

NO_DATA
The requested name is valid but does not have an IP address. Another type of request to the name server for this domain may return an answer. The constant NO_ADDRESS is a synonym for NO_DATA.

NO_RECOVERY
A nonrecoverable name server error occurred.

TRY_AGAIN
A temporary error occurred on an authoritative name server. Try again later.

FILES

/etc/host.conf
resolver configuration file

/etc/hosts
host database file

/etc/nsswitch.conf
name service switch configuration

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

gethostbyname()

Thread safety

MT-Unsafe race:hostbyname env locale

gethostbyaddr()

Thread safety

MT-Unsafe race:hostbyaddr env locale

sethostent(), endhostent(), gethostent_r()

Thread safety

MT-Unsafe race:hostent env locale

herror(), hstrerror()

Thread safetyMT-Safe

gethostent()

Thread safety

MT-Unsafe race:hostent race:hostentbuf env locale

gethostbyname2()

Thread safety

MT-Unsafe race:hostbyname2 env locale

gethostbyaddr_r(), gethostbyname_r(), gethostbyname2_r()

Thread safetyMT-Safe env locale

In the above table, hostent in race:hostent signifies that if any of the functions sethostent(), gethostent(), gethostent_r(), or endhostent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

sethostent()
endhostent()
gethostent()
POSIX.1-2008.

gethostent_r()
GNU.

Others:
None.

HISTORY

sethostent()
endhostent()
gethostent()
POSIX.1-2001.

gethostbyname()
gethostbyaddr()
h_errno
Marked obsolescent in POSIX.1-2001. Removed in POSIX.1-2008, recommending the use of getaddrinfo(3) and getnameinfo(3) instead.

NOTES

The functions gethostbyname() and gethostbyaddr() may return pointers to static data, which may be overwritten by later calls. Copying the struct hostent does not suffice, since it contains pointers; a deep copy is required.

In the original BSD implementation the len argument of gethostbyname() was an int. The SUSv2 standard is buggy and declares the len argument of gethostbyaddr() to be of type size_t. (That is wrong, because it has to be int, and size_t is not. POSIX.1-2001 makes it socklen_t, which is OK.) See also accept(2).

The BSD prototype for gethostbyaddr() uses const char * for the first argument.

System V/POSIX extension

POSIX requires the gethostent() call, which should return the next entry in the host data base. When using DNS/BIND this does not make much sense, but it may be reasonable if the host data base is a file that can be read line by line. On many systems, a routine of this name reads from the file /etc/hosts. It may be available only when the library was built without DNS support. The glibc version will ignore ipv6 entries. This function is not reentrant, and glibc adds a reentrant version gethostent_r().

GNU extensions

glibc2 also has a gethostbyname2() that works like gethostbyname(), but permits to specify the address family to which the address must belong.

glibc2 also has reentrant versions gethostent_r(), gethostbyaddr_r(), gethostbyname_r(), and gethostbyname2_r(). The caller supplies a hostent structure ret which will be filled in on success, and a temporary work buffer buf of size buflen. After the call, result will point to the result on success. In case of an error or if no entry is found result will be NULL. The functions return 0 on success and a nonzero error number on failure. In addition to the errors returned by the nonreentrant versions of these functions, if buf is too small, the functions will return ERANGE, and the call should be retried with a larger buffer. The global variable h_errno is not modified, but the address of a variable in which to store error numbers is passed in h_errnop.

BUGS

gethostbyname() does not recognize components of a dotted IPv4 address string that are expressed in hexadecimal.

SEE ALSO

getaddrinfo(3), getnameinfo(3), inet(3), inet_ntop(3), inet_pton(3), resolver(3), hosts(5), nsswitch.conf(5), hostname(7), named(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1537 - Linux cli command Net_Server_Threadpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Server_Threadpm and provides detailed information about the command Net_Server_Threadpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Server_Threadpm.

NAME 🖥️ Net_Server_Threadpm 🖥️

Net::Server personality

SYNOPSIS

use base qw(Net::Server::Thread); sub process_request { #…code… } _ _PACKAGE_ _->run();

DESCRIPTION

Please read the pod on Net::Server first. This module is a personality, or extension, or sub class, of the Net::Server module.

This personality binds to one or more ports and then waits for a client connection. When a connection is received, the server spawns a new thread. The thread handles the request and then closes.

Because this Net::Server flavor spawns and destroys a thread for each request, it really should only be used where the processing of each request may be lengthy or involved. If short and light request are used, perl may not voluntarily give back the used memory. This is highly system dependent.

ARGUMENTS

check_for_dead
Number of seconds to wait before looking for dead children. This only takes place if the maximum number of child processes (max_servers) has been reached. Default is 60 seconds.

max_servers
The maximum number of children to fork. The server will not accept connections until there are free children. Default is 256 children.

CONFIGURATION FILE

See Net::Server.

PROCESS FLOW

Process flow follows Net::Server until the post_accept phase. At this point a child is forked. The parent is immediately able to wait for another request. The child handles the request and then exits.

HOOKS

The Fork server has the following hooks in addition to the hooks provided by the Net::Server base class. See Net::Server

“$self->pre_accept_hook()”
This hook occurs just before the accept is called.

“$self->pre_thread_hook()”
This hook occurs just after accept but before the fork.

“$self->post_accept_hook()”
This hook occurs in the child after the accept and fork.

TO DO

See Net::Server

AUTHOR

Paul Seamons <[email protected]>

SEE ALSO

Please see also Net::Server::INET, Net::Server::Fork, Net::Server::PreFork, Net::Server::PreForkSimple, Net::Server::MultiType, Net::Server::SIG Net::Server::Single

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1538 - Linux cli command lckpwdf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lckpwdf and provides detailed information about the command lckpwdf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lckpwdf.

NAME 🖥️ lckpwdf 🖥️

get shadow password file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

/* General shadow password file API */
#include <shadow.h>
struct spwd *getspnam(const char *name);
struct spwd *getspent(void);
void setspent(void);
void endspent(void);
struct spwd *fgetspent(FILE *stream);
struct spwd *sgetspent(const char *s);
int putspent(const struct spwd *p, FILE *stream);
int lckpwdf(void);
int ulckpwdf(void);
/* GNU extension */
#include <shadow.h>
int getspent_r(struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int getspnam_r(const char *name, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int fgetspent_r(FILE *stream, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int sgetspent_r(const char *s, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getspent_r(), getspnam_r(), fgetspent_r(), sgetspent_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

Long ago it was considered safe to have encrypted passwords openly visible in the password file. When computers got faster and people got more security-conscious, this was no longer acceptable. Julianne Frances Haugh implemented the shadow password suite that keeps the encrypted passwords in the shadow password database (e.g., the local shadow password file /etc/shadow, NIS, and LDAP), readable only by root.

The functions described below resemble those for the traditional password database (e.g., see getpwnam(3) and getpwent(3)).

The getspnam() function returns a pointer to a structure containing the broken-out fields of the record in the shadow password database that matches the username name.

The getspent() function returns a pointer to the next entry in the shadow password database. The position in the input stream is initialized by setspent(). When done reading, the program may call endspent() so that resources can be deallocated.

The fgetspent() function is similar to getspent() but uses the supplied stream instead of the one implicitly opened by setspent().

The sgetspent() function parses the supplied string s into a struct spwd.

The putspent() function writes the contents of the supplied struct spwd *p as a text line in the shadow password file format to stream. String entries with value NULL and numerical entries with value -1 are written as an empty string.

The lckpwdf() function is intended to protect against multiple simultaneous accesses of the shadow password database. It tries to acquire a lock, and returns 0 on success, or -1 on failure (lock not obtained within 15 seconds). The ulckpwdf() function releases the lock again. Note that there is no protection against direct access of the shadow password file. Only programs that use lckpwdf() will notice the lock.

These were the functions that formed the original shadow API. They are widely available.

Reentrant versions

Analogous to the reentrant functions for the password database, glibc also has reentrant functions for the shadow password database. The getspnam_r() function is like getspnam() but stores the retrieved shadow password structure in the space pointed to by spbuf. This shadow password structure contains pointers to strings, and these strings are stored in the buffer buf of size buflen. A pointer to the result (in case of success) or NULL (in case no entry was found or an error occurred) is stored in *spbufp.

The functions getspent_r(), fgetspent_r(), and sgetspent_r() are similarly analogous to their nonreentrant counterparts.

Some non-glibc systems also have functions with these names, often with different prototypes.

Structure

The shadow password structure is defined in <shadow.h> as follows:

struct spwd {
    char *sp_namp;     /* Login name */
    char *sp_pwdp;     /* Encrypted password */
    long  sp_lstchg;   /* Date of last change
                          (measured in days since
                          1970-01-01 00:00:00 +0000 (UTC)) */
    long  sp_min;      /* Min # of days between changes */
    long  sp_max;      /* Max # of days between changes */
    long  sp_warn;     /* # of days before password expires
                          to warn user to change it */
    long  sp_inact;    /* # of days after password expires
                          until account is disabled */
    long  sp_expire;   /* Date when account expires
                          (measured in days since
                          1970-01-01 00:00:00 +0000 (UTC)) */
    unsigned long sp_flag;  /* Reserved */
};

RETURN VALUE

The functions that return a pointer return NULL if no more entries are available or if an error occurs during processing. The functions which have int as the return value return 0 for success and -1 for failure, with errno set to indicate the error.

For the nonreentrant functions, the return value may point to static area, and may be overwritten by subsequent calls to these functions.

The reentrant functions return zero on success. In case of error, an error number is returned.

ERRORS

EACCES
The caller does not have permission to access the shadow password file.

ERANGE
Supplied buffer is too small.

FILES

/etc/shadow
local shadow password database file

/etc/.pwd.lock
lock file

The include file <paths.h> defines the constant _PATH_SHADOW to the pathname of the shadow password file.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getspnam()

Thread safety

MT-Unsafe race:getspnam locale

getspent()

Thread safety

MT-Unsafe race:getspent race:spentbuf locale

setspent(), endspent(), getspent_r()

Thread safety

MT-Unsafe race:getspent locale

fgetspent()

Thread safety

MT-Unsafe race:fgetspent

sgetspent()

Thread safety

MT-Unsafe race:sgetspent

putspent(), getspnam_r(), sgetspent_r()

Thread safety

MT-Safe locale

lckpwdf(), ulckpwdf(), fgetspent_r()

Thread safety

MT-Safe

In the above table, getspent in race:getspent signifies that if any of the functions setspent(), getspent(), getspent_r(), or endspent() are used in parallel in different threads of a program, then data races could occur.

VERSIONS

Many other systems provide a similar API.

STANDARDS

None.

SEE ALSO

getgrnam(3), getpwnam(3), getpwnam_r(3), shadow(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1539 - Linux cli command Moose_Conflictspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Conflictspm and provides detailed information about the command Moose_Conflictspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Conflictspm.

NAME 🖥️ Moose_Conflictspm 🖥️

Check for conflicts between Moose and installed packages

DESCRIPTION

This module contains information about conflicts between this distribution and other CPAN distributions. It does not have any user-facing parts.

This module was generated by Dist::Zilla::Plugin::Conflicts 0.20.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1540 - Linux cli command pthread_cond_timedwait

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_cond_timedwait and provides detailed information about the command pthread_cond_timedwait, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_cond_timedwait.

NAME 🖥️ pthread_cond_timedwait 🖥️

operations on conditions

SYNOPSIS

#include <pthread.h>
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
int pthread_cond_init(pthread_cond_t *cond,
 pthread_condattr_t *cond_attr);
int pthread_cond_signal(pthread_cond_t *cond);
int pthread_cond_broadcast(pthread_cond_t *cond);
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
 const struct timespec *abstime);
int pthread_cond_destroy(pthread_cond_t *cond);

DESCRIPTION

A condition (short for ``condition variable’’) is a synchronization device that allows threads to suspend execution and relinquish the processors until some predicate on shared data is satisfied. The basic operations on conditions are: signal the condition (when the predicate becomes true), and wait for the condition, suspending the thread execution until another thread signals the condition.

A condition variable must always be associated with a mutex, to avoid the race condition where a thread prepares to wait on a condition variable and another thread signals the condition just before the first thread actually waits on it.

pthread_cond_init initializes the condition variable cond, using the condition attributes specified in cond_attr, or default attributes if cond_attr is NULL. The LinuxThreads implementation supports no attributes for conditions, hence the cond_attr parameter is actually ignored.

Variables of type pthread_cond_t can also be initialized statically, using the constant PTHREAD_COND_INITIALIZER.

pthread_cond_signal restarts one of the threads that are waiting on the condition variable cond. If no threads are waiting on cond, nothing happens. If several threads are waiting on cond, exactly one is restarted, but it is not specified which.

pthread_cond_broadcast restarts all the threads that are waiting on the condition variable cond. Nothing happens if no threads are waiting on cond.

pthread_cond_wait atomically unlocks the mutex (as per pthread_unlock_mutex) and waits for the condition variable cond to be signaled. The thread execution is suspended and does not consume any CPU time until the condition variable is signaled. The mutex must be locked by the calling thread on entrance to pthread_cond_wait. Before returning to the calling thread, pthread_cond_wait re-acquires mutex (as per pthread_lock_mutex).

Unlocking the mutex and suspending on the condition variable is done atomically. Thus, if all threads always acquire the mutex before signaling the condition, this guarantees that the condition cannot be signaled (and thus ignored) between the time a thread locks the mutex and the time it waits on the condition variable.

pthread_cond_timedwait atomically unlocks mutex and waits on cond, as pthread_cond_wait does, but it also bounds the duration of the wait. If cond has not been signaled within the amount of time specified by abstime, the mutex mutex is re-acquired and pthread_cond_timedwait returns the error ETIMEDOUT. The abstime parameter specifies an absolute time, with the same origin as time(2) and gettimeofday(2): an abstime of 0 corresponds to 00:00:00 GMT, January 1, 1970.

pthread_cond_destroy destroys a condition variable, freeing the resources it might hold. No threads must be waiting on the condition variable on entrance to pthread_cond_destroy. In the LinuxThreads implementation, no resources are associated with condition variables, thus pthread_cond_destroy actually does nothing except checking that the condition has no waiting threads.

CANCELLATION

pthread_cond_wait and pthread_cond_timedwait are cancelation points. If a thread is cancelled while suspended in one of these functions, the thread immediately resumes execution, then locks again the mutex argument to pthread_cond_wait and pthread_cond_timedwait, and finally executes the cancelation. Consequently, cleanup handlers are assured that mutex is locked when they are called.

ASYNC-SIGNAL SAFETY

The condition functions are not async-signal safe, and should not be called from a signal handler. In particular, calling pthread_cond_signal or pthread_cond_broadcast from a signal handler may deadlock the calling thread.

RETURN VALUE

All condition variable functions return 0 on success and a non-zero error code on error.

ERRORS

pthread_cond_init, pthread_cond_signal, pthread_cond_broadcast, and pthread_cond_wait never return an error code.

The pthread_cond_timedwait function returns the following error codes on error:

ETIMEDOUT
The condition variable was not signaled until the timeout specified by abstime.

EINTR
pthread_cond_timedwait was interrupted by a signal.

The pthread_cond_destroy function returns the following error code on error:

EBUSY
Some threads are currently waiting on cond.

SEE ALSO

pthread_condattr_init(3), pthread_mutex_lock(3), pthread_mutex_unlock(3), gettimeofday(2), nanosleep(2).

EXAMPLE

Consider two shared variables x and y, protected by the mutex mut, and a condition variable cond that is to be signaled whenever x becomes greater than y.

int x,y;
pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;

Waiting until x is greater than y is performed as follows:

pthread_mutex_lock(&mut);
while (x <= y) {
        pthread_cond_wait(&cond, &mut);
}
/* operate on x and y */
pthread_mutex_unlock(&mut);

Modifications on x and y that may cause x to become greater than y should signal the condition if needed:

pthread_mutex_lock(&mut);
/* modify x and y */
if (x > y) pthread_cond_broadcast(&cond);
pthread_mutex_unlock(&mut);

If it can be proved that at most one waiting thread needs to be waken up (for instance, if there are only two threads communicating through x and y), pthread_cond_signal can be used as a slightly more efficient alternative to pthread_cond_broadcast. In doubt, use pthread_cond_broadcast.

To wait for x to become greater than y with a timeout of 5 seconds, do:

struct timeval now;
struct timespec timeout;
int retcode;
pthread_mutex_lock(&mut);
gettimeofday(&now);
timeout.tv_sec = now.tv_sec + 5;
timeout.tv_nsec = now.tv_usec * 1000;
retcode = 0;
while (x <= y && retcode != ETIMEDOUT) {
        retcode = pthread_cond_timedwait(&cond, &mut, &timeout);
}
if (retcode == ETIMEDOUT) {
        /* timeout occurred */
} else {
        /* operate on x and y */
}
pthread_mutex_unlock(&mut);
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1541 - Linux cli command sem_getvalue

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sem_getvalue and provides detailed information about the command sem_getvalue, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sem_getvalue.

NAME 🖥️ sem_getvalue 🖥️

get the value of a semaphore

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <semaphore.h>
int sem_getvalue(sem_t *restrict sem, int *restrict sval);

DESCRIPTION

sem_getvalue() places the current value of the semaphore pointed to sem into the integer pointed to by sval.

If one or more processes or threads are blocked waiting to lock the semaphore with sem_wait(3), POSIX.1 permits two possibilities for the value returned in sval: either 0 is returned; or a negative number whose absolute value is the count of the number of processes and threads currently blocked in sem_wait(3). Linux adopts the former behavior.

RETURN VALUE

sem_getvalue() returns 0 on success; on error, -1 is returned and errno is set to indicate the error.

ERRORS

EINVAL
sem is not a valid semaphore. (The glibc implementation currently does not check whether sem is valid.)

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sem_getvalue()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

The value of the semaphore may already have changed by the time sem_getvalue() returns.

SEE ALSO

sem_post(3), sem_wait(3), sem_overview(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1542 - Linux cli command SLIST_FOREACH

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SLIST_FOREACH and provides detailed information about the command SLIST_FOREACH, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SLIST_FOREACH.

NAME 🖥️ SLIST_FOREACH 🖥️

implementation of a singly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
SLIST_ENTRY(TYPE);
SLIST_HEAD(HEADNAME, TYPE);
SLIST_HEAD SLIST_HEAD_INITIALIZER(SLIST_HEAD head);
void SLIST_INIT(SLIST_HEAD *head);
int SLIST_EMPTY(SLIST_HEAD *head);
void SLIST_INSERT_HEAD(SLIST_HEAD *head,
 struct TYPE *elm, SLIST_ENTRY NAME);
void SLIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, SLIST_ENTRY NAME);
struct TYPE *SLIST_FIRST(SLIST_HEAD *head);
struct TYPE *SLIST_NEXT(struct TYPE *elm, SLIST_ENTRY NAME);
SLIST_FOREACH(struct TYPE *var, SLIST_HEAD *head, SLIST_ENTRY NAME);
void SLIST_REMOVE(SLIST_HEAD *head, struct TYPE *elm,
 SLIST_ENTRY NAME);
void SLIST_REMOVE_HEAD(SLIST_HEAD *head,
 SLIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on singly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type SLIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro SLIST_HEAD().

Creation

A singly linked list is headed by a structure defined by the SLIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the list after an existing element or at the head of the list. An SLIST_HEAD structure is declared as follows:

SLIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

SLIST_ENTRY() declares a structure that connects the elements in the list.

SLIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

SLIST_INIT() initializes the list referenced by head.

SLIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

SLIST_INSERT_HEAD() inserts the new element elm at the head of the list.

SLIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

SLIST_FIRST() returns the first element in the list, or NULL if the list is empty.

SLIST_NEXT() returns the next element in the list.

SLIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

SLIST_REMOVE() removes the element elm from the list.

SLIST_REMOVE_HEAD() removes the element elm from the head of the list. For optimum efficiency, elements being removed from the head of the list should explicitly use this macro instead of the generic SLIST_REMOVE().

RETURN VALUE

SLIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

SLIST_FIRST(), and SLIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

SLIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

SLIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. SLIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    SLIST_ENTRY(entry) entries;             /* Singly linked list */
};
SLIST_HEAD(slisthead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct slisthead head;                  /* Singly linked list
                                               head */
    SLIST_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    SLIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    SLIST_INSERT_AFTER(n1, n2, entries);
    SLIST_REMOVE(&head, n2, entry, entries);/* Deletion */
    free(n2);
    n3 = SLIST_FIRST(&head);
    SLIST_REMOVE_HEAD(&head, entries);      /* Deletion from the head */
    free(n3);
    for (unsigned int i = 0; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        SLIST_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    SLIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); while (!SLIST_EMPTY(&head)) { /* List deletion */ n1 = SLIST_FIRST(&head); SLIST_REMOVE_HEAD(&head, entries); free(n1); } SLIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1543 - Linux cli command XShapeCombineShape

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XShapeCombineShape and provides detailed information about the command XShapeCombineShape, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XShapeCombineShape.

NAME 🖥️ XShapeCombineShape 🖥️

X nonrectangular shape functions

SYNTAX

#include <X11/extensions/shape.h>
Bool XShapeQueryExtension (
	Display *dpy,
	int *event_basep,
	int *error_basep);
Status XShapeQueryVersion (
	Display *dpy,
	int *major_versionp,
	int *minor_versionp);
void XShapeCombineRegion (
	Display *dpy,
	Window dest,
	int destKind,
	int xOff,
	int yOff,
	struct _XRegion *r,
	int op);
void XShapeCombineRectangles (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	XRectangle *rects,
	int n_rects,
	int op,
	int ordering);
void XShapeCombineMask (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	Pixmap src,
	int op);
void XShapeCombineShape (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	Pixmap src,
	int srcKind,
	int op);
void XShapeOffsetShape (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff);
Status XShapeQueryExtents (
	Display *dpy,
	Window window,
	int *bShaped,
	int *xbs,
	int *ybs,
	unsigned int *wbs,
	unsigned int *hbs,
	int *cShaped,
	int *xcs,
	int *ycs,
	unsigned int *wcs,
	unsigned int *hcs);
void XShapeSelectInput (
	Display *dpy,
	Window window,
	unsigned longmask);
unsigned long XShapeInputSelected (
	Display *dpy,
	Window window);
XRectangle *XShapeGetRectangles (
	Display *dpy,
	Window window,
	int kind,
	int *count,
	int *ordering);

STRUCTURES

typedef struct {
    int type;	/* of event */
    unsigned long serial;	/* # of last request processed by server */
    Bool send_event;	/* true if this came from a SendEvent request */
    Display *display;	/* Display the event was read from */
    Window window;	/* window of event */
    int kind;	/* ShapeBounding or ShapeClip */
    int x, y;	/* extents of new region */
    unsigned width, height;
    Time time;	/* server timestamp when region changed */
    Bool shaped;	/* true if the region exists */
} XShapeEvent;

DESCRIPTION

The X11 Nonrectangular Window Shape Extension adds nonrectangular windows to the X Window System.

PREDEFINED VALUES

Operations:

 ShapeSet   ShapeUnion   ShapeIntersect   ShapeSubtract   ShapeInvert 

Shape Kinds:

 ShapeBounding   ShapeClip 

Event defines:

 ShapeNotifyMask   ShapeNotify 

BUGS

This manual page needs a lot more work.

SEE ALSO

X11 Nonrectangular Window Shape Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1544 - Linux cli command Sub_Exporter_Tutorialpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Sub_Exporter_Tutorialpm and provides detailed information about the command Sub_Exporter_Tutorialpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Sub_Exporter_Tutorialpm.

NAME 🖥️ Sub_Exporter_Tutorialpm 🖥️

a friendly guide to exporting with Sub::Exporter

VERSION

version 0.990

DESCRIPTION

What’s an Exporter?

When you use a module, first it is required, then its import method is called. The Perl documentation tells us that the following two lines are equivalent:

use Module LIST; BEGIN { require Module; Module->import(LIST); }

The method named import is the module’s exporter, it exports functions and variables into its caller’s namespace.

The Basics of Sub::Exporter

Sub::Exporter builds a custom exporter which can then be installed into your module. It builds this method based on configuration passed to its setup_exporter method.

A very basic use case might look like this:

package Addition; use Sub::Exporter; Sub::Exporter::setup_exporter({ exports => [ qw(plus) ]}); sub plus { my ($x, $y) = @_; return $x + $y; }

This would mean that when someone used your Addition module, they could have its plus routine imported into their package:

use Addition qw(plus); my $z = plus(2, 2); # this works, because now plus is in the main package

That syntax to set up the exporter, above, is a little verbose, so for the simple case of just naming some exports, you can write this:

use Sub::Exporter -setup => { exports => [ qw(plus) ] };

…which is the same as the original example Ω- except that now the exporter is built and installed at compile time. Well, that and you typed less.

Using Export Groups

You can specify whole groups of things that should be exportable together. These are called groups. Exporter calls these tags. To specify groups, you just pass a groups key in your exporter configuration:

package Food; use Sub::Exporter -setup => { exports => [ qw(apple banana beef fluff lox rabbit) ], groups => { fauna => [ qw(beef lox rabbit) ], flora => [ qw(apple banana) ], } };

Now, to import all that delicious foreign meat, your consumer needs only to write:

use Food qw(:fauna); use Food qw(-fauna);

Either one of the above is acceptable. A colon is more traditional, but barewords with a leading colon can’t be enquoted by a fat arrow. We’ll see why that matters later on.

Groups can contain other groups. If you include a group name (with the leading dash or colon) in a group definition, it will be expanded recursively when the exporter is called. The exporter will not recurse into the same group twice while expanding groups.

There are two special groups: all and default. The all group is defined for you and contains all exportable subs. You can redefine it, if you want to export only a subset when all exports are requested. The default group is the set of routines to export when nothing specific is requested. By default, there is no default group.

Renaming Your Imports

Sometimes you want to import something, but you don’t like the name as which it’s imported. Sub::Exporter can rename your imports for you. If you wanted to import lox from the Food package, but you don’t like the name, you could write this:

use Food lox => { -as => salmon };

Now you’d get the lox routine, but it would be called salmon in your package. You can also rename entire groups by using the prefix option:

use Food -fauna => { -prefix => cute_little_ };

Now you can call your cute_little_rabbit routine. (You can also call cute_little_beef, but that hardly seems as enticing.)

When you define groups, you can include renaming.

use Sub::Exporter -setup => { exports => [ qw(apple banana beef fluff lox rabbit) ], groups => { fauna => [ qw(beef lox), rabbit => { -as => coney } ], } };

A prefix on a group like that does the right thing. This is when it’s useful to use a dash instead of a colon to indicate a group: you can put a fat arrow between the group and its arguments, then.

use Food -fauna => { -prefix => lovely_ }; eat( lovely_coney ); # this works

Prefixes also apply recursively. That means that this code works:

use Sub::Exporter -setup => { exports => [ qw(apple banana beef fluff lox rabbit) ], groups => { fauna => [ qw(beef lox), rabbit => { -as => coney } ], allowed => [ -fauna => { -prefix => willing_ }, banana ], } }; … use Food -allowed => { -prefix => any_ }; $dinner = any_willing_coney; # yum!

Groups can also be passed a -suffix argument.

Finally, if the -as argument to an exported routine is a reference to a scalar, a reference to the routine will be placed in that scalar.

Building Subroutines to Order

Sometimes, you want to export things that you don’t have on hand. You might want to offer customized routines built to the specification of your consumer; that’s just good business! With Sub::Exporter, this is easy.

To offer subroutines to order, you need to provide a generator when you set up your exporter. A generator is just a routine that returns a new routine. perlref is talking about these when it discusses closures and function templates. The canonical example of a generator builds a unique incrementor; here’s how you’d do that with Sub::Exporter;

package Package::Counter; use Sub::Exporter -setup => { exports => [ counter => sub { my $i = 0; sub { $i++ } } ], groups => { default => [ qw(counter) ] }, };

Now anyone can use your Package::Counter module and he’ll receive a counter in his package. It will count up by one, and will never interfere with anyone else’s counter.

This isn’t very useful, though, unless the consumer can explain what he wants. This is done, in part, by supplying arguments when importing. The following example shows how a generator can take and use arguments:

package Package::Counter; sub _build_counter { my ($class, $name, $arg) = @_; $arg ||= {}; my $i = $arg->{start} || 0; return sub { $i++ }; } use Sub::Exporter -setup => { exports => [ counter => \build_counter ], groups => { default => [ qw(counter) ] }, };

Now, the consumer can (if he wants) specify a starting value for his counter:

use Package::Counter counter => { start => 10 };

Arguments to a group are passed along to the generators of routines in that group, but Sub::Exporter arguments Ω- anything beginning with a dash Ω- are never passed in. When groups are nested, the arguments are merged as the groups are expanded.

Notice, too, that in the example above, we gave a reference to a method name rather than a method implementation. By giving the name rather than the subroutine, we make it possible for subclasses of our Package::Counter module to replace the _build_counter method.

When a generator is called, it is passed four parameters:

  • the invocant on which the exporter was called

  • the name of the export being generated (not the name it’s being installed as)

  • the arguments supplied for the routine

  • the collection of generic arguments

The fourth item is the last major feature that hasn’t been covered.

Argument Collectors

Sometimes you will want to accept arguments once that can then be available to any subroutine that you’re going to export. To do this, you specify collectors, like this:

package Menu::Airline use Sub::Exporter -setup => { exports => … , groups => … , collectors => [ qw(allergies ethics) ], };

Collectors look like normal exports in the import call, but they don’t do anything but collect data which can later be passed to generators. If the module was used like this:

use Menu::Airline allergies => [ qw(peanuts) ], ethics => [ qw(vegan) ];

…the consumer would get a salad. Also, all the generators would be passed, as their fourth argument, something like this:

{ allerges => [ qw(peanuts) ], ethics => [ qw(vegan) ] }

Generators may have arguments in their definition, as well. These must be code refs that perform validation of the collected values. They are passed the collection value and may return true or false. If they return false, the exporter will throw an exception.

Generating Many Routines in One Scope

Sometimes it’s useful to have multiple routines generated in one scope. This way they can share lexical data which is otherwise unavailable. To do this, you can supply a generator for a group which returns a hashref of names and code references. This generator is passed all the usual data, and the group may receive the usual -prefix or -suffix arguments.

PERL VERSION

This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years.

Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl.

SEE ALSO

  • Sub::Exporter for complete documentation and references to other exporters

AUTHOR

Ricardo Signes <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 2007 by Ricardo Signes.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1545 - Linux cli command Image_ExifTool_Leafpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Leafpm and provides detailed information about the command Image_ExifTool_Leafpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Leafpm.

NAME 🖥️ Image_ExifTool_Leafpm 🖥️

Read Creo Leaf EXIF meta information

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret meta information from Leaf digital camera backs written by Creo Leaf Capture.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

“Leaf Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1546 - Linux cli command sigisemptyset

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigisemptyset and provides detailed information about the command sigisemptyset, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigisemptyset.

NAME 🖥️ sigisemptyset 🖥️

POSIX signal set operations

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
int sigemptyset(sigset_t *set);
int sigfillset(sigset_t *set);
int sigaddset(sigset_t *set, int signum);
int sigdelset(sigset_t *set, int signum);
int sigismember(const sigset_t *set, int signum);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sigemptyset(), sigfillset(), sigaddset(), sigdelset(), sigismember():

    _POSIX_C_SOURCE

DESCRIPTION

These functions allow the manipulation of POSIX signal sets.

sigemptyset() initializes the signal set given by set to empty, with all signals excluded from the set.

sigfillset() initializes set to full, including all signals.

sigaddset() and sigdelset() add and delete respectively signal signum from set.

sigismember() tests whether signum is a member of set.

Objects of type sigset_t must be initialized by a call to either sigemptyset() or sigfillset() before being passed to the functions sigaddset(), sigdelset(), and sigismember() or the additional glibc functions described below (sigisemptyset(), sigandset(), and sigorset()). The results are undefined if this is not done.

RETURN VALUE

sigemptyset(), sigfillset(), sigaddset(), and sigdelset() return 0 on success and -1 on error.

sigismember() returns 1 if signum is a member of set, 0 if signum is not a member, and -1 on error.

On error, these functions set errno to indicate the error.

ERRORS

EINVAL
signum is not a valid signal.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sigemptyset(), sigfillset(), sigaddset(), sigdelset(), sigismember(), sigisemptyset(), sigorset(), sigandset()

Thread safetyMT-Safe

VERSIONS

GNU

If the _GNU_SOURCE feature test macro is defined, then <signal.h> exposes three other functions for manipulating signal sets:

int sigisemptyset(const sigset_t *set);
int sigorset(sigset_t *dest, const sigset_t *left,
 const sigset_t *right);
int sigandset(sigset_t *dest, const sigset_t *left,
 const sigset_t *right);

sigisemptyset() returns 1 if set contains no signals, and 0 otherwise.

sigorset() places the union of the sets left and right in dest. sigandset() places the intersection of the sets left and right in dest. Both functions return 0 on success, and -1 on failure.

These functions are nonstandard (a few other systems provide similar functions) and their use should be avoided in portable applications.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

When creating a filled signal set, the glibc sigfillset() function does not include the two real-time signals used internally by the NPTL threading implementation. See nptl(7) for details.

SEE ALSO

sigaction(2), sigpending(2), sigprocmask(2), sigsuspend(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1547 - Linux cli command Text_CSV_PPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Text_CSV_PPpm and provides detailed information about the command Text_CSV_PPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Text_CSV_PPpm.

NAME 🖥️ Text_CSV_PPpm 🖥️

Text::CSV_XS compatible pure-Perl module

SYNOPSIS

This section is taken from Text::CSV_XS.

# Functional interface use Text::CSV_PP qw( csv ); # Read whole file in memory my $aoa = csv (in => “data.csv”); # as array of array my $aoh = csv (in => “data.csv”, headers => “auto”); # as array of hash # Write array of arrays as csv file csv (in => $aoa, out => “file.csv”, sep_char => “;”); # Only show lines where “code” is odd csv (in => “data.csv”, filter => { code => sub { $_ % 2 }}); # Object interface use Text::CSV_PP; my @rows; # Read/parse CSV my $csv = Text::CSV_PP->new ({ binary => 1, auto_diag => 1 }); open my $fh, “<:encoding(utf8)”, “test.csv” or die “test.csv: $!”; while (my $row = $csv->getline ($fh)) { $row->[2] =~ m/pattern/ or next; # 3rd field should match push @rows, $row; } close $fh; # and write as CSV open $fh, “>:encoding(utf8)”, “new.csv” or die “new.csv: $!”; $csv->say ($fh, $_) for @rows; close $fh or die “new.csv: $!”;

DESCRIPTION

Text::CSV_PP is a pure-perl module that provides facilities for the composition and decomposition of comma-separated values. This is (almost) compatible with much faster Text::CSV_XS, and mainly used as its fallback module when you use Text::CSV module without having installed Text::CSV_XS. If you don’t have any reason to use this module directly, use Text::CSV for speed boost and portability (or maybe Text::CSV_XS when you write an one-off script and don’t need to care about portability).

The following caveats are taken from the doc of Text::CSV_XS.

Embedded newlines

Important Note: The default behavior is to accept only ASCII characters in the range from 0x20 (space) to 0x7E (tilde). This means that the fields can not contain newlines. If your data contains newlines embedded in fields, or characters above 0x7E (tilde), or binary data, you must set binary => 1 in the call to new. To cover the widest range of parsing options, you will always want to set binary.

But you still have the problem that you have to pass a correct line to the parse method, which is more complicated from the usual point of usage:

my $csv = Text::CSV_PP->new ({ binary => 1, eol => $/ }); while (<>) { # WRONG! $csv->parse ($_); my @fields = $csv->fields (); }

this will break, as the while might read broken lines: it does not care about the quoting. If you need to support embedded newlines, the way to go is to not pass eol in the parser (it accepts , , and by default) and then

my $csv = Text::CSV_PP->new ({ binary => 1 }); open my $fh, “<”, $file or die “$file: $!”; while (my $row = $csv->getline ($fh)) { my @fields = @$row; }

The old(er) way of using global file handles is still supported

while (my $row = $csv->getline (*ARGV)) { … }

Unicode

Unicode is only tested to work with perl-5.8.2 and up.

See also BOM.

The simplest way to ensure the correct encoding is used for in- and output is by either setting layers on the filehandles, or setting the encoding argument for csv.

open my $fh, “<:encoding(UTF-8)”, “in.csv” or die “in.csv: $!”; or my $aoa = csv (in => “in.csv”, encoding => “UTF-8”); open my $fh, “>:encoding(UTF-8)”, “out.csv” or die “out.csv: $!”; or csv (in => $aoa, out => “out.csv”, encoding => “UTF-8”);

On parsing (both for getline and parse), if the source is marked being UTF8, then all fields that are marked binary will also be marked UTF8.

On combining (print and combine): if any of the combining fields was marked UTF8, the resulting string will be marked as UTF8. Note however that all fields before the first field marked UTF8 and contained 8-bit characters that were not upgraded to UTF8, these will be bytes in the resulting string too, possibly causing unexpected errors. If you pass data of different encoding, or you don’t know if there is different encoding, force it to be upgraded before you pass them on:

$csv->print ($fh, [ map { utf8::upgrade (my $x = $_); $x } @data ]);

For complete control over encoding, please use Text::CSV::Encoded:

use Text::CSV::Encoded; my $csv = Text::CSV::Encoded->new ({ encoding_in => “iso-8859-1”, # the encoding comes into Perl encoding_out => “cp1252”, # the encoding comes out of Perl }); $csv = Text::CSV::Encoded->new ({ encoding => “utf8” }); # combine () and print () accept *literally* utf8 encoded data # parse () and getline () return *literally* utf8 encoded data $csv = Text::CSV::Encoded->new ({ encoding => undef }); # default # combine () and print () accept UTF8 marked data # parse () and getline () return UTF8 marked data

BOM

BOM (or Byte Order Mark) handling is available only inside the header method. This method supports the following encodings: utf-8, utf-1, utf-32be, utf-32le, utf-16be, utf-16le, utf-ebcdic, scsu, bocu-1, and gb-18030. See Wikipedia <https://en.wikipedia.org/wiki/Byte_order_mark>.

If a file has a BOM, the easiest way to deal with that is

my $aoh = csv (in => $file, detect_bom => 1);

All records will be encoded based on the detected BOM.

This implies a call to the header method, which defaults to also set the column_names. So this is not the same as

my $aoh = csv (in => $file, headers => “auto”);

which only reads the first record to set column_names but ignores any meaning of possible present BOM.

METHODS

This section is also taken from Text::CSV_XS.

version

(Class method) Returns the current module version.

new

(Class method) Returns a new instance of class Text::CSV_PP. The attributes are described by the (optional) hash ref \%attr.

my $csv = Text::CSV_PP->new ({ attributes … });

The following attributes are available:

eol

my $csv = Text::CSV_PP->new ({ eol => $/ }); $csv->eol (undef); my $eol = $csv->eol;

The end-of-line string to add to rows for print or the record separator for getline.

When not passed in a parser instance, the default behavior is to accept , , and , so it is probably safer to not specify eol at all. Passing undef or the empty string behave the same.

When not passed in a generating instance, records are not terminated at all, so it is probably wise to pass something you expect. A safe choice for eol on output is either $/ or .

Common values for eol are " " ( or Line Feed), " " ( or Carriage Return, Line Feed), and " " ( or Carriage Return). The eol attribute cannot exceed 7 (ASCII) characters.

If both $/ and eol equal " ", parsing lines that end on only a Carriage Return without Line Feed, will be parsed correct.

sep_char

my $csv = Text::CSV_PP->new ({ sep_char => “;” }); $csv->sep_char (";"); my $c = $csv->sep_char;

The char used to separate fields, by default a comma. (,). Limited to a single-byte character, usually in the range from 0x20 (space) to 0x7E (tilde). When longer sequences are required, use sep.

The separation character can not be equal to the quote character or to the escape character.

sep

my $csv = Text::CSV_PP->new ({ sep => “\N{FULLWIDTH COMMA}” }); $csv->sep (";"); my $sep = $csv->sep;

The chars used to separate fields, by default undefined. Limited to 8 bytes.

When set, overrules sep_char. If its length is one byte it acts as an alias to sep_char.

quote_char

my $csv = Text::CSV_PP->new ({ quote_char => "" }); $csv->quote_char (undef); my $c = $csv->quote_char;

The character to quote fields containing blanks or binary data, by default the double quote character ("). A value of undef suppresses quote chars (for simple cases only). Limited to a single-byte character, usually in the range from 0x20 (space) to 0x7E (tilde). When longer sequences are required, use quote.

quote_char can not be equal to sep_char.

quote

my $csv = Text::CSV_PP->new ({ quote => “\N{FULLWIDTH QUOTATION MARK}” }); $csv->quote (""); my $quote = $csv->quote;

The chars used to quote fields, by default undefined. Limited to 8 bytes.

When set, overrules quote_char. If its length is one byte it acts as an alias to quote_char.

This method does not support undef. Use quote_char to disable quotation.

escape_char

my $csv = Text::CSV_PP->new ({ escape_char => “" }); $csv->escape_char (”:"); my $c = $csv->escape_char;

The character to escape certain characters inside quoted fields. This is limited to a single-byte character, usually in the range from 0x20 (space) to 0x7E (tilde).

The escape_char defaults to being the double-quote mark ("). In other words the same as the default quote_char. This means that doubling the quote mark in a field escapes it:

“foo”,“bar”,“Escape ““quote mark”” with two ““quote marks”””,“baz”

If you change the quote_char without changing the escape_char, the escape_char will still be the double-quote ("). If instead you want to escape the quote_char by doubling it you will need to also change the escape_char to be the same as what you have changed the quote_char to.

Setting escape_char to undef or "" will completely disable escapes and is greatly discouraged. This will also disable escape_null.

The escape character can not be equal to the separation character.

binary

my $csv = Text::CSV_PP->new ({ binary => 1 }); $csv->binary (0); my $f = $csv->binary;

If this attribute is 1, you may use binary characters in quoted fields, including line feeds, carriage returns and NULL bytes. (The latter could be escaped as "0.) By default this feature is off.

If a string is marked UTF8, binary will be turned on automatically when binary characters other than CR and NL are encountered. Note that a simple string like "\x{00a0}" might still be binary, but not marked UTF8, so setting { binary => 1 } is still a wise option.

strict

my $csv = Text::CSV_PP->new ({ strict => 1 }); $csv->strict (0); my $f = $csv->strict;

If this attribute is set to 1, any row that parses to a different number of fields than the previous row will cause the parser to throw error 2014.

skip_empty_rows

my $csv = Text::CSV_PP->new ({ skip_empty_rows => 1 }); $csv->skip_empty_rows (“eof”); my $f = $csv->skip_empty_rows;

This attribute defines the behavior for empty rows: an eol immediately following the start of line. Default behavior is to return one single empty field.

This attribute is only used in parsing. This attribute is ineffective when using parse and fields.

Possible values for this attribute are

0 | undef
my $csv = Text::CSV_PP->new ({ skip_empty_rows => 0 }); $csv->skip_empty_rows (undef); No special action is taken. The result will be one single empty field.

1 | “skip”
my $csv = Text::CSV_PP->new ({ skip_empty_rows => 1 }); $csv->skip_empty_rows (“skip”); The row will be skipped.

2 | “eof” | “stop”
my $csv = Text::CSV_PP->new ({ skip_empty_rows => 2 }); $csv->skip_empty_rows (“eof”); The parsing will stop as if an eof was detected.

3 | “die”
my $csv = Text::CSV_PP->new ({ skip_empty_rows => 3 }); $csv->skip_empty_rows (“die”); The parsing will stop. The internal error code will be set to 2015 and the parser will die.

4 | “croak”
my $csv = Text::CSV_PP->new ({ skip_empty_rows => 4 }); $csv->skip_empty_rows (“croak”); The parsing will stop. The internal error code will be set to 2015 and the parser will croak.

5 | “error”
my $csv = Text::CSV_PP->new ({ skip_empty_rows => 5 }); $csv->skip_empty_rows (“error”); The parsing will fail. The internal error code will be set to 2015.

callback
my $csv = Text::CSV_PP->new ({ skip_empty_rows => sub { [] } }); $csv->skip_empty_rows (sub { [ 42, $., undef, “empty” ] }); The callback is invoked and its result used instead. If you want the parse to stop after the callback, make sure to return a false value. The returned value from the callback should be an array-ref. Any other type will cause the parse to stop, so these are equivalent in behavior: csv (in => $fh, skip_empty_rows => “stop”); csv (in => $fh. skip_empty_rows => sub { 0; });

Without arguments, the current value is returned: 0, 1, eof, die, croak or the callback.

formula_handling

Alias for formula

formula

my $csv = Text::CSV_PP->new ({ formula => “none” }); $csv->formula (“none”); my $f = $csv->formula;

This defines the behavior of fields containing formulas. As formulas are considered dangerous in spreadsheets, this attribute can define an optional action to be taken if a field starts with an equal sign (=).

For purpose of code-readability, this can also be written as

my $csv = Text::CSV_PP->new ({ formula_handling => “none” }); $csv->formula_handling (“none”); my $f = $csv->formula_handling;

Possible values for this attribute are

none
Take no specific action. This is the default. $csv->formula (“none”);

die
Cause the process to die whenever a leading = is encountered. $csv->formula (“die”);

croak
Cause the process to croak whenever a leading = is encountered. (See Carp) $csv->formula (“croak”);

diag
Report position and content of the field whenever a leading = is found. The value of the field is unchanged. $csv->formula (“diag”);

empty
Replace the content of fields that start with a = with the empty string. $csv->formula (“empty”); $csv->formula ("");

undef
Replace the content of fields that start with a = with undef. $csv->formula (“undef”); $csv->formula (undef);

a callback
Modify the content of fields that start with a = with the return-value of the callback. The original content of the field is available inside the callback as $_; # Replace all formulas with 42 $csv->formula (sub { 42; }); # same as $csv->formula (“empty”) but slower $csv->formula (sub { "" }); # Allow =4+12 $csv->formula (sub { s/^=(\d+\d+)$/$1/eer }); # Allow more complex calculations $csv->formula (sub { eval { s{^=([-+*/0-9()]+)$}{$1}ee }; $_ });

All other values will give a warning and then fallback to diag.

decode_utf8

my $csv = Text::CSV_PP->new ({ decode_utf8 => 1 }); $csv->decode_utf8 (0); my $f = $csv->decode_utf8;

This attributes defaults to TRUE.

While parsing, fields that are valid UTF-8, are automatically set to be UTF-8, so that

$csv->parse (“Ĩ “);

results in

PV("\304\250"�) [UTF8 “\x{128}”]

Sometimes it might not be a desired action. To prevent those upgrades, set this attribute to false, and the result will be

PV("\304\250"�)

auto_diag

my $csv = Text::CSV_PP->new ({ auto_diag => 1 }); $csv->auto_diag (2); my $l = $csv->auto_diag;

Set this attribute to a number between 1 and 9 causes error_diag to be automatically called in void context upon errors.

In case of error 2012 - EOF, this call will be void.

If auto_diag is set to a numeric value greater than 1, it will die on errors instead of warn. If set to anything unrecognized, it will be silently ignored.

Future extensions to this feature will include more reliable auto-detection of autodie being active in the scope of which the error occurred which will increment the value of auto_diag with 1 the moment the error is detected.

diag_verbose

my $csv = Text::CSV_PP->new ({ diag_verbose => 1 }); $csv->diag_verbose (2); my $l = $csv->diag_verbose;

Set the verbosity of the output triggered by auto_diag. Currently only adds the current input-record-number (if known) to the diagnostic output with an indication of the position of the error.

blank_is_undef

my $csv = Text::CSV_PP->new ({ blank_is_undef => 1 }); $csv->blank_is_undef (0); my $f = $csv->blank_is_undef;

Under normal circumstances, CSV data makes no distinction between quoted- and unquoted empty fields. These both end up in an empty string field once read, thus

1,””,," “,2

is read as

(“1”, “”, “”, " “, “2”)

When writing CSV files with either always_quote or quote_empty set, the unquoted empty field is the result of an undefined value. To enable this distinction when reading CSV data, the blank_is_undef attribute will cause unquoted empty fields to be set to undef, causing the above to be parsed as

(“1”, “”, undef, " “, “2”)

Note that this is specifically important when loading CSV fields into a database that allows NULL values, as the perl equivalent for NULL is undef in DBI land.

empty_is_undef

my $csv = Text::CSV_PP->new ({ empty_is_undef => 1 }); $csv->empty_is_undef (0); my $f = $csv->empty_is_undef;

Going one step further than blank_is_undef, this attribute converts all empty fields to undef, so

1,””,,” “,2

is read as

(1, undef, undef, " “, 2)

Note that this affects only fields that are originally empty, not fields that are empty after stripping allowed whitespace. YMMV.

allow_whitespace

my $csv = Text::CSV_PP->new ({ allow_whitespace => 1 }); $csv->allow_whitespace (0); my $f = $csv->allow_whitespace;

When this option is set to true, the whitespace (TAB’s and SPACE’s) surrounding the separation character is removed when parsing. If either TAB or SPACE is one of the three characters sep_char, quote_char, or escape_char it will not be considered whitespace.

Now lines like:

1 , “foo” , bar , 3 , zapp

are parsed as valid CSV, even though it violates the CSV specs.

Note that all whitespace is stripped from both start and end of each field. That would make it more than a feature to enable parsing bad CSV lines, as

1, 2.0, 3, ape , monkey

will now be parsed as

(“1”, “2.0”, “3”, “ape”, “monkey”)

even if the original line was perfectly acceptable CSV.

allow_loose_quotes

my $csv = Text::CSV_PP->new ({ allow_loose_quotes => 1 }); $csv->allow_loose_quotes (0); my $f = $csv->allow_loose_quotes;

By default, parsing unquoted fields containing quote_char characters like

1,foo “bar” baz,42

would result in parse error 2034. Though it is still bad practice to allow this format, we cannot help the fact that some vendors make their applications spit out lines styled this way.

If there is really bad CSV data, like

1,“foo “bar” baz”,42

or

1,““foo bar baz”",42

there is a way to get this data-line parsed and leave the quotes inside the quoted field as-is. This can be achieved by setting allow_loose_quotes AND making sure that the escape_char is not equal to quote_char.

allow_loose_escapes

my $csv = Text::CSV_PP->new ({ allow_loose_escapes => 1 }); $csv->allow_loose_escapes (0); my $f = $csv->allow_loose_escapes;

Parsing fields that have escape_char characters that escape characters that do not need to be escaped, like:

my $csv = Text::CSV_PP->new ({ escape_char => “" }); $csv->parse (qq{1,“my bar\s”,baz,42});

would result in parse error 2025. Though it is bad practice to allow this format, this attribute enables you to treat all escape character sequences equal.

allow_unquoted_escape

my $csv = Text::CSV_PP->new ({ allow_unquoted_escape => 1 }); $csv->allow_unquoted_escape (0); my $f = $csv->allow_unquoted_escape;

A backward compatibility issue where escape_char differs from quote_char prevents escape_char to be in the first position of a field. If quote_char is equal to the default " and escape_char is set to \, this would be illegal:

1,�,2

Setting this attribute to 1 might help to overcome issues with backward compatibility and allow this style.

always_quote

my $csv = Text::CSV_PP->new ({ always_quote => 1 }); $csv->always_quote (0); my $f = $csv->always_quote;

By default the generated fields are quoted only if they need to be. For example, if they contain the separator character. If you set this attribute to 1 then all defined fields will be quoted. (undef fields are not quoted, see blank_is_undef). This makes it quite often easier to handle exported data in external applications.

quote_space

my $csv = Text::CSV_PP->new ({ quote_space => 1 }); $csv->quote_space (0); my $f = $csv->quote_space;

By default, a space in a field would trigger quotation. As no rule exists this to be forced in CSV, nor any for the opposite, the default is true for safety. You can exclude the space from this trigger by setting this attribute to 0.

quote_empty

my $csv = Text::CSV_PP->new ({ quote_empty => 1 }); $csv->quote_empty (0); my $f = $csv->quote_empty;

By default the generated fields are quoted only if they need to be. An empty (defined) field does not need quotation. If you set this attribute to 1 then empty defined fields will be quoted. (undef fields are not quoted, see blank_is_undef). See also always_quote.

quote_binary

my $csv = Text::CSV_PP->new ({ quote_binary => 1 }); $csv->quote_binary (0); my $f = $csv->quote_binary;

By default, all unsafe bytes inside a string cause the combined field to be quoted. By setting this attribute to 0, you can disable that trigger for bytes >= 0x7F.

escape_null

my $csv = Text::CSV_PP->new ({ escape_null => 1 }); $csv->escape_null (0); my $f = $csv->escape_null;

By default, a NULL byte in a field would be escaped. This option enables you to treat the NULL byte as a simple binary character in binary mode (the { binary => 1 } is set). The default is true. You can prevent NULL escapes by setting this attribute to 0.

When the escape_char attribute is set to undefined, this attribute will be set to false.

The default setting will encode =�= as

“=“0=”

With escape_null set, this will result in

“=�=”

The default when using the csv function is false.

For backward compatibility reasons, the deprecated old name quote_null is still recognized.

keep_meta_info

my $csv = Text::CSV_PP->new ({ keep_meta_info => 1 }); $csv->keep_meta_info (0); my $f = $csv->keep_meta_info;

By default, the parsing of input records is as simple and fast as possible. However, some parsing information - like quotation of the original field - is lost in that process. Setting this flag to true enables retrieving that information after parsing with the methods meta_info, is_quoted, and is_binary described below. Default is false for performance.

If you set this attribute to a value greater than 9, then you can control output quotation style like it was used in the input of the the last parsed record (unless quotation was added because of other reasons).

my $csv = Text::CSV_PP->new ({ binary => 1, keep_meta_info => 1, quote_space => 0, }); my $row = $csv->parse (q{1,,””, ,” “,f,“g”,“h"“h”,help,“help”}); $csv->print (*STDOUT, \row); # 1,,, , ,f,g,“h"“h”,help,help $csv->keep_meta_info (11); $csv->print (*STDOUT, \row); # 1,,””, ,” “,f,“g”,“h"“h”,help,“help”

undef_str

my $csv = Text::CSV_PP->new ({ undef_str => “\N” }); $csv->undef_str (undef); my $s = $csv->undef_str;

This attribute optionally defines the output of undefined fields. The value passed is not changed at all, so if it needs quotation, the quotation needs to be included in the value of the attribute. Use with caution, as passing a value like ",",,,,""" will for sure mess up your output. The default for this attribute is undef, meaning no special treatment.

This attribute is useful when exporting CSV data to be imported in custom loaders, like for MySQL, that recognize special sequences for NULL data.

This attribute has no meaning when parsing CSV data.

comment_str

my $csv = Text::CSV_PP->new ({ comment_str => “#” }); $csv->comment_str (undef); my $s = $csv->comment_str;

This attribute optionally defines a string to be recognized as comment. If this attribute is defined, all lines starting with this sequence will not be parsed as CSV but skipped as comment.

This attribute has no meaning when generating CSV.

Comment strings that start with any of the special characters/sequences are not supported (so it cannot start with any of sep_char, quote_char, escape_char, sep, quote, or eol).

For convenience, comment is an alias for comment_str.

verbatim

my $csv = Text::CSV_PP->new ({ verbatim => 1 }); $csv->verbatim (0); my $f = $csv->verbatim;

This is a quite controversial attribute to set, but makes some hard things possible.

The rationale behind this attribute is to tell the parser that the normally special characters newline (NL) and Carriage Return (CR) will not be special when this flag is set, and be dealt with as being ordinary binary characters. This will ease working with data with embedded newlines.

When verbatim is used with getline, getline auto-chomp’s every line.

Imagine a file format like

M^^Hans^Janssen^Klas 2 2A^Ja^11-06-2007#

where, the line ending is a very specific "# ", and the sep_char is a ^ (caret). None of the fields is quoted, but embedded binary data is likely to be present. With the specific line ending, this should not be too hard to detect.

By default, Text::CSV_PP’ parse function is instructed to only know about " " and " " to be legal line endings, and so has to deal with the embedded newline as a real end-of-line, so it can scan the next line if binary is true, and the newline is inside a quoted field. With this option, we tell parse to parse the line as if " " is just nothing more than a binary character.

For parse this means that the parser has no more idea about line ending and getline chomps line endings on reading.

types

A set of column types; the attribute is immediately passed to the types method.

callbacks

See the Callbacks section below.

accessors

To sum it up,

$csv = Text::CSV_PP->new ();

is equivalent to

$csv = Text::CSV_PP->new ({ eol => undef, # , , or sep_char => ,, sep => undef, quote_char => “, quote => undef, escape_char => “, binary => 0, decode_utf8 => 1, auto_diag => 0, diag_verbose => 0, blank_is_undef => 0, empty_is_undef => 0, allow_whitespace => 0, allow_loose_quotes => 0, allow_loose_escapes => 0, allow_unquoted_escape => 0, always_quote => 0, quote_empty => 0, quote_space => 1, escape_null => 1, quote_binary => 1, keep_meta_info => 0, strict => 0, skip_empty_rows => 0, formula => 0, verbatim => 0, undef_str => undef, comment_str => undef, types => undef, callbacks => undef, });

For all of the above mentioned flags, an accessor method is available where you can inquire the current value, or change the value

my $quote = $csv->quote_char; $csv->binary (1);

It is not wise to change these settings halfway through writing CSV data to a stream. If however you want to create a new stream using the available CSV object, there is no harm in changing them.

If the new constructor call fails, it returns undef, and makes the fail reason available through the error_diag method.

$csv = Text::CSV_PP->new ({ ecs_char => 1 }) or die “".Text::CSV_PP->error_diag ();

error_diag will return a string like

“INI - Unknown attribute ecs_char”

known_attributes

@attr = Text::CSV_PP->known_attributes; @attr = Text::CSV_PP::known_attributes; @attr = $csv->known_attributes;

This method will return an ordered list of all the supported attributes as described above. This can be useful for knowing what attributes are valid in classes that use or extend Text::CSV_PP.

print

$status = $csv->print ($fh, $colref);

Similar to combine + string + print, but much more efficient. It expects an array ref as input (not an array!) and the resulting string is not really created, but immediately written to the $fh object, typically an IO handle or any other object that offers a print method.

For performance reasons print does not create a result string, so all string, status, fields, and error_input methods will return undefined information after executing this method.

If $colref is undef (explicit, not through a variable argument) and bind_columns was used to specify fields to be printed, it is possible to make performance improvements, as otherwise data would have to be copied as arguments to the method call:

$csv->bind_columns ($foo, $bar)); $status = $csv->print ($fh, undef);

A short benchmark

my @data = (“aa” .. “zz”); $csv->bind_columns (@data)); $csv->print ($fh, [ @data ]); # 11800 recs/sec $csv->print ($fh, \data ); # 57600 recs/sec $csv->print ($fh, undef ); # 48500 recs/sec

say

$status = $csv->say ($fh, $colref);

Like print, but eol defaults to $\.

$csv->print_hr ($fh, $ref);

Provides an easy way to print a $ref (as fetched with getline_hr) provided the column names are set with column_names.

It is just a wrapper method with basic parameter checks over

$csv->print ($fh, [ map { $ref->{$_} } $csv->column_names ]);

combine

$status = $csv->combine (@fields);

This method constructs a CSV record from @fields, returning success or failure. Failure can result from lack of arguments or an argument that contains an invalid character. Upon success, string can be called to retrieve the resultant CSV string. Upon failure, the value returned by string is undefined and error_input could be called to retrieve the invalid argument.

string

$line = $csv->string ();

This method returns the input to parse or the resultant CSV string of combine, whichever was called more recently.

getline

$colref = $csv->getline ($fh);

This is the counterpart to print, as parse is the counterpart to combine: it parses a row from the $fh handle using the getline method associated with $fh and parses this row into an array ref. This array ref is returned by the function or undef for failure. When $fh does not support getline, you are likely to hit errors.

When fields are bound with bind_columns the return value is a reference to an empty list.

The string, fields, and status methods are meaningless again.

getline_all

$arrayref = $csv->getline_all ($fh); $arrayref = $csv->getline_all ($fh, $offset); $arrayref = $csv->getline_all ($fh, $offset, $length);

This will return a reference to a list of getline ($fh) results. In this call, keep_meta_info is disabled. If $offset is negative, as with splice, only the last abs ($offset) records of $fh are taken into consideration. Parameters $offset and $length are expected to be integers. Non-integer values are interpreted as integer without check.

Given a CSV file with 10 lines:

lines call —– ——————————————————— 0..9 $csv->getline_all ($fh) # all 0..9 $csv->getline_all ($fh, 0) # all 8..9 $csv->getline_all ($fh, 8) # start at 8 - $csv->getline_all ($fh, 0, 0) # start at 0 first 0 rows 0..4 $csv->getline_all ($fh, 0, 5) # start at 0 first 5 rows 4..5 $csv->getline_all ($fh, 4, 2) # start at 4 first 2 rows 8..9 $csv->getline_all ($fh, -2) # last 2 rows 6..7 $csv->getline_all ($fh, -4, 2) # first 2 of last 4 rows

getline_hr

The getline_hr and column_names methods work together to allow you to have rows returned as hashrefs. You must call column_names first to declare your column names.

$csv->column_names (qw( code name price description )); $hr = $csv->getline_hr ($fh); print “Price for $hr->{name} is $hr->{price} EUR “;

getline_hr will croak if called before column_names.

Note that getline_hr creates a hashref for every row and will be much slower than the combined use of bind_columns and getline but still offering the same easy to use hashref inside the loop:

my @cols = @{$csv->getline ($fh)}; $csv->column_names (@cols); while (my $row = $csv->getline_hr ($fh)) { print $row->{price}; }

Could easily be rewritten to the much faster:

my @cols = @{$csv->getline ($fh)}; my $row = {}; $csv->bind_columns ({$row}{@cols}); while ($csv->getline ($fh)) { print $row->{price}; }

Your mileage may vary for the size of the data and the number of rows. With perl-5.14.2 the comparison for a 100_000 line file with 14 columns:

Rate hashrefs getlines hashrefs 1.00/s – -76% getlines 4.15/s 313% –

getline_hr_all

$arrayref = $csv->getline_hr_all ($fh); $arrayref = $csv->getline_hr_all ($fh, $offset); $arrayref = $csv->getline_hr_all ($fh, $offset, $length);

This will return a reference to a list of getline_hr ($fh) results. In this call, keep_meta_info is disabled.

parse

$status = $csv->parse ($line);

This method decomposes a CSV string into fields, returning success or failure. Failure can result from a lack of argument or the given CSV string is improperly formatted. Upon success, fields can be called to retrieve the decomposed fields. Upon failure calling fields will return undefined data and error_input can be called to retrieve the invalid argument.

You may use the types method for setting column types. See types’ description below.

The $line argument is supposed to be a simple scalar. Everything else is supposed to croak and set error 1500.

fragment

This function tries to implement RFC7111 (URI Fragment Identifiers for the text/csv Media Type) - https://datatracker.ietf.org/doc/html/rfc7111

my $AoA = $csv->fragment ($fh, $spec);

In specifications, * is used to specify the last item, a dash (-) to indicate a range. All indices are 1-based: the first row or column has index 1. Selections can be combined with the semi-colon (;).

When using this method in combination with column_names, the returned reference will point to a list of hashes instead of a list of lists. A disjointed cell-based combined selection might return rows with different number of columns making the use of hashes unpredictable.

$csv->column_names (“Name”, “Age”); my $AoH = $csv->fragment ($fh, “col=3;8”);

If the after_parse callback is active, it is also called on every line parsed and skipped before the fragment.

row
row=4 row=5-7 row=6-* row=1-2;4;6-*

col
col=2 col=1-3 col=4-* col=1-2;4;7-*

cell
In cell-based selection, the comma (,) is used to pair row and column cell=4,1 The range operator (-) using cells can be used to define top-left and bottom-right cell location cell=3,1-4,6 The * is only allowed in the second part of a pair cell=3,2-*,2 # row 3 till end, only column 2 cell=3,2-3,* # column 2 till end, only row 3 cell=3,2-*,* # strip row 1 and 2, and column 1 Cells and cell ranges may be combined with ;, possibly resulting in rows with different numbers of columns cell=1,1-2,2;3,3-4,4;1,4;4,1 Disjointed selections will only return selected cells. The cells that are not specified will not be included in the returned set, not even as undef. As an example given a CSV like 11,12,13,…19 21,22,…28,29 : : 91,…97,98,99 with cell=1,1-2,2;3,3-4,4;1,4;4,1 will return: 11,12,14 21,22 33,34 41,43,44 Overlapping cell-specs will return those cells only once, So cell=1,1-3,3;2,2-4,4;2,3;4,2 will return: 11,12,13 21,22,23,24 31,32,33,34 42,43,44

RFC7111 <https://datatracker.ietf.org/doc/html/rfc7111> does not allow different types of specs to be combined (either row or col or cell). Passing an invalid fragment specification will croak and set error 2013.

column_names

Set the keys that will be used in the getline_hr calls. If no keys (column names) are passed, it will return the current setting as a list.

column_names accepts a list of scalars (the column names) or a single array_ref, so you can pass the return value from getline too:

$csv->column_names ($csv->getline ($fh));

column_names does no checking on duplicates at all, which might lead to unexpected results. Undefined entries will be replaced with the string `”

1548 - Linux cli command Net_DNSpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNSpm and provides detailed information about the command Net_DNSpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNSpm.

NAME 🖥️ Net_DNSpm 🖥️

Perl Interface to the Domain Name System

SYNOPSIS

use Net::DNS;

DESCRIPTION

Net::DNS is a collection of Perl modules that act as a Domain Name System (DNS) resolver. It allows the programmer to perform DNS queries that are beyond the capabilities of “gethostbyname” and “gethostbyaddr”.

The programmer should be familiar with the structure of a DNS packet and the zone file presentation format described in RFC1035.

Resolver Objects

A resolver object is an instance of the Net::DNS::Resolver class. A program may have multiple resolver objects, each maintaining its own state information such as the nameservers to be queried, whether recursion is desired, etc.

Packet Objects

Net::DNS::Resolver queries return Net::DNS::Packet objects. A packet object has five sections:

  • header, represented by a Net::DNS::Header object

  • question, a list of no more than one Net::DNS::Question object

  • answer, a list of Net::DNS::RR objects

  • authority, a list of Net::DNS::RR objects

  • additional, a list of Net::DNS::RR objects

Update Objects

Net::DNS::Update is a subclass of Net::DNS::Packet useful for creating dynamic update requests.

Header Object

The Net::DNS::Header object mediates access to the header data which resides within the corresponding Net::DNS::Packet.

Question Object

The Net::DNS::Question object represents the content of the question section of the DNS packet.

RR Objects

Net::DNS::RR is the base class for DNS resource record (RR) objects in the answer, authority, and additional sections of a DNS packet.

Do not assume that RR objects will be of the type requested. The type of an RR object must be checked before calling any methods.

METHODS

Net::DNS exports methods and auxiliary functions to support DNS updates, zone serial number management, and simple DNS queries.

version

use Net::DNS; print Net::DNS->version, " “;

Returns the version of Net::DNS.

rr

# Use a default resolver – can not get an error string this way. use Net::DNS; my @rr = rr(“example.com”); my @rr = rr(“example.com”, “AAAA”); my @rr = rr(“example.com”, “AAAA”, “IN”); # Use your own resolver object. my $res = Net::DNS::Resolver->new; my @rr = rr($res, “example.com” … ); my ($ptr) = rr(“2001:DB8::dead:beef”);

The rr() method provides simple RR lookup for scenarios where the full flexibility of Net::DNS is not required.

Returns a list of Net::DNS::RR objects for the specified name or an empty list if the query failed or no record was found.

See “EXAMPLES” for more complete examples.

mx

# Use a default resolver – can not get an error string this way. use Net::DNS; my @mx = mx(“example.com”); # Use your own resolver object. my $res = Net::DNS::Resolver->new; my @mx = mx($res, “example.com”);

Returns a list of Net::DNS::RR::MX objects representing the MX records for the specified name. The list will be sorted by preference. Returns an empty list if the query failed or no MX record was found.

This method does not look up address records; it resolves MX only.

Dynamic DNS Update Support

The Net::DNS module provides auxiliary functions which support dynamic DNS update requests.

$update = Net::DNS::Update->new( example.com ); $update->push( prereq => nxrrset(example.com. AAAA) ); $update->push( update => rr_add(example.com. 86400 AAAA 2001::DB8::F00) );

yxrrset

Use this method to add an “RRset exists” prerequisite to a dynamic update packet. There are two forms, value-independent and value-dependent:

# RRset exists (value-independent) $update->push( pre => yxrrset(“host.example.com AAAA”) );

Meaning: At least one RR with the specified name and type must exist.

# RRset exists (value-dependent) $update->push( pre => yxrrset(“host.example.com AAAA 2001:DB8::1”) );

Meaning: At least one RR with the specified name and type must exist and must have matching data.

Returns a Net::DNS::RR object or undef if the object could not be created.

nxrrset

Use this method to add an “RRset does not exist” prerequisite to a dynamic update packet.

$update->push( pre => nxrrset(“host.example.com AAAA”) );

Meaning: No RRs with the specified name and type can exist.

Returns a Net::DNS::RR object or undef if the object could not be created.

yxdomain

Use this method to add a “name is in use” prerequisite to a dynamic update packet.

$update->push( pre => yxdomain(“host.example.com”) );

Meaning: At least one RR with the specified name must exist.

Returns a Net::DNS::RR object or undef if the object could not be created.

nxdomain

Use this method to add a “name is not in use” prerequisite to a dynamic update packet.

$update->push( pre => nxdomain(“host.example.com”) );

Meaning: No RR with the specified name can exist.

Returns a Net::DNS::RR object or undef if the object could not be created.

rr_add

Use this method to add RRs to a zone.

$update->push( update => rr_add(“host.example.com AAAA 2001:DB8::c001:a1e”) );

Meaning: Add this RR to the zone.

RR objects created by this method should be added to the “update” section of a dynamic update packet. The TTL defaults to 86400 seconds (24 hours) if not specified.

Returns a Net::DNS::RR object or undef if the object could not be created.

rr_del

Use this method to delete RRs from a zone. There are three forms: delete all RRsets, delete an RRset, and delete a specific RR.

# Delete all RRsets. $update->push( update => rr_del(“host.example.com”) );

Meaning: Delete all RRs having the specified name.

# Delete an RRset. $update->push( update => rr_del(“host.example.com AAAA”) );

Meaning: Delete all RRs having the specified name and type.

# Delete a specific RR. $update->push( update => rr_del(“host.example.com AAAA 2001:DB8::dead:beef”) );

Meaning: Delete the RR which matches the specified argument.

RR objects created by this method should be added to the “update” section of a dynamic update packet.

Returns a Net::DNS::RR object or undef if the object could not be created.

Zone Serial Number Management

The Net::DNS module provides auxiliary functions which support policy-driven zone serial numbering regimes.

$soa->serial(SEQUENTIAL); $soa->serial(YYYMMDDxx);

SEQUENTIAL

$successor = $soa->serial( SEQUENTIAL );

The existing serial number is incremented modulo 2**32.

UNIXTIME

$successor = $soa->serial( UNIXTIME );

The Unix time scale will be used as the basis for zone serial numbering. The serial number will be incremented if the time elapsed since the previous update is less than one second.

YYYYMMDDxx

$successor = $soa->serial( YYYYMMDDxx );

The 32 bit value returned by the auxiliary YYYYMMDDxx() function will be used as the base for the date-coded zone serial number. Serial number increments must be limited to 100 per day for the date information to remain useful.

Sorting of RR arrays

rrsort() provides functionality to help you sort RR arrays. In most cases this will give you the result that you expect, but you can specify your own sorting method by using the Net::DNS::RR::FOO->set_rrsort_func() class method. See Net::DNS::RR for details.

rrsort

use Net::DNS; my @sorted = rrsort( $rrtype, $attribute, @rr_array );

rrsort() selects all RRs from the input array that are of the type defined by the first argument. Those RRs are sorted based on the attribute that is specified as second argument.

There are a number of RRs for which the sorting function is defined in the code.

For instance:

my @prioritysorted = rrsort( “SRV”, “priority”, @rr_array );

returns the SRV records sorted from lowest to highest priority and for equal priorities from highest to lowest weight.

If the function does not exist then a numerical sort on the attribute value is performed.

my @portsorted = rrsort( “SRV”, “port”, @rr_array );

If the attribute is not defined then either the default_sort() function or “canonical sorting” (as defined by DNSSEC) will be used.

rrsort() returns a sorted array containing only elements of the specified RR type. Any other RR types are silently discarded.

rrsort() returns an empty list when arguments are incorrect.

EXAMPLES

The following brief examples illustrate some of the features of Net::DNS. The documentation for individual modules and the demo scripts included with the distribution provide more extensive examples.

See Net::DNS::Update for an example of performing dynamic updates.

Look up host addresses.

use Net::DNS; my $res = Net::DNS::Resolver->new; my $reply = $res->search(“www.example.com”, “AAAA”); if ($reply) { foreach my $rr ($reply->answer) { print $rr->address, " " if $rr->can(“address”); } } else { warn “query failed: “, $res->errorstring, " “; }

Find the nameservers for a domain.

use Net::DNS; my $res = Net::DNS::Resolver->new; my $reply = $res->query(“example.com”, “NS”); if ($reply) { foreach $rr (grep { $_->type eq “NS” } $reply->answer) { print $rr->nsdname, " “; } } else { warn “query failed: “, $res->errorstring, " “; }

Find the MX records for a domain.

use Net::DNS; my $name = “example.com”; my $res = Net::DNS::Resolver->new; my @mx = mx($res, $name); if (@mx) { foreach $rr (@mx) { print $rr->preference, " “, $rr->exchange, " “; } } else { warn “Can not find MX records for $name: “, $res->errorstring, " “; }

use Net::DNS; my $res = Net::DNS::Resolver->new; my $reply = $res->query(“example.com”, “SOA”); if ($reply) { foreach my $rr ($reply->answer) { $rr->print; } } else { warn “query failed: “, $res->errorstring, " “; }

Perform a zone transfer and print all the records.

use Net::DNS; my $res = Net::DNS::Resolver->new; $res->tcp_timeout(20); $res->nameservers(“ns.example.com”); my @zone = $res->axfr(“example.com”); foreach $rr (@zone) { $rr->print; } warn $res->errorstring if $res->errorstring;

Perform a background query and print the reply.

use Net::DNS; my $res = Net::DNS::Resolver->new; $res->udp_timeout(10); $res->tcp_timeout(20); my $socket = $res->bgsend(“host.example.com”, “AAAA”); while ( $res->bgbusy($socket) ) { # do some work here while waiting for the response # …and some more here } my $packet = $res->bgread($socket); if ($packet) { $packet->print; } else { warn “query failed: “, $res->errorstring, " “; }

BUGS

Net::DNS is slow.

For other items to be fixed, or if you discover a bug in this distribution please use the CPAN bug reporting system.

COPYRIGHT

Copyright (c)1997-2000 Michael Fuhr.

Portions Copyright (c)2002,2003 Chris Reinhardt.

Portions Copyright (c)2005 Olaf Kolkman (RIPE NCC)

Portions Copyright (c)2006 Olaf Kolkman (NLnet Labs)

Portions Copyright (c)2014 Dick Franks

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

AUTHOR INFORMATION

Net::DNS is maintained at NLnet Labs (www.nlnetlabs.nl) by Willem Toorop.

Between 2005 and 2012 Net::DNS was maintained by Olaf Kolkman.

Between 2002 and 2004 Net::DNS was maintained by Chris Reinhardt.

Net::DNS was created in 1997 by Michael Fuhr.

SEE ALSO

perl Net::DNS::Resolver Net::DNS::Question Net::DNS::RR Net::DNS::Packet Net::DNS::Update RFC1035 <https://tools.ietf.org/html/rfc1035>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1549 - Linux cli command SIMPLEQ_INSERT_TAIL

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SIMPLEQ_INSERT_TAIL and provides detailed information about the command SIMPLEQ_INSERT_TAIL, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SIMPLEQ_INSERT_TAIL.

NAME 🖥️ SIMPLEQ_INSERT_TAIL 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1550 - Linux cli command Tk_optionspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_optionspm and provides detailed information about the command Tk_optionspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_optionspm.

NAME 🖥️ Tk_optionspm 🖥️

Standard options supported by widgets and their manipulation

SYNOPSIS

$value = $widget->cget(’-option’);

$widget->configure(-option=>value ?,-option=>value …?);

@list = $widget->configure(’-option’);

@lol = $widget->configure;

DESCRIPTION

All widgets, and images have a standard mechanism for setting and querying attibutes or options. The mechanism is based on two methods configure and cget. The behaviour of these methods is as follows:

$widget->configure(-option=>value ?,-option=>value …?);
Sets the values of -option to value for each -option=>value pair. The internal new method does an implicit configure in this form with options passed in at widget create time.

$widget->configure(’-option’)
In array context returns a list of five or two elements. If -option is an alias for another options it return a list consisting of the alias option and the name for the option is is an alias for, e.g., (-bg, background). If -option is not an alias the returned list has the following five elements:

Option Name
The value of -option, e.g., -background.

Name
The option’s name in the option database, e.g., background.

Class
The option’s class value in the option database, e.g., Background.

Default
The default value for the option if not specified or in the option database, e.g., grey.

Value
The current value (as returned by cget), e.g., white.

$widget->configure
Returns a list of lists for all the options supported by $widget. Each sub-list is in the form returned by configure(’-option’). (This mechanism is used by the Tk::Derived class to determine the options available from base class.)

$widget->cget(’-option’)
Returns the current value of -option for $widget. cget(’-option’) is clumsy with the need for ’’ due to perl’s parsing rules. Something more subtle using tie might look better.

The following paragraphs describe the common configuration options supported by widgets in the Tk toolkit. Every widget does not necessarily support every option (see the the documentation entries for individual widgets for a list of the standard options supported by that widget), but if a widget does support an option with one of the names listed below, then the option has exactly the effect described below.

In the descriptions below, ``Name’’ refers to the option’s name in the option database. ``Class’’ refers to the option’s class value in the option database. ``Switch’’ refers to the switch used in widget-creation and configure widget methods to set this value. For example, if an option’s configure option is -foreground and there exists a widget $widget, then the call:

$widget->configure(-foreground=>‘black’)

may be used to specify the value black for the option in the widget $widget. Configure options may be abbreviated, as long as the abbreviation is unambiguous (abbreviation is deprecated in perl/Tk).

Creation options: Widget Name and Class

The Name and -class options can only be specified when a widget is created, and cannot be changed with configure. These options determine the widget’s identity and how Tk applies resource values from the option database (see Tk::option) and so they cannot be assigned by the options database.

Name: name

Switch: Name

Specifies the path element for the widget. Names generally begin with a lowercase letter. Each widget has a unique pathname that follows the hierarchy from the MainWindow to the widget itself. Since the widget’s PathName is used to assign options from the options database, it is important to specify a distinctive Name for any widget that will have non-default options. See Tk::option for details.

Name: class

Switch: -class

Specifies a class for the window. Classes generally begin with an uppercase letter. This class will be used when querying the option database for the window’s other options (see Tk::options), and it will also be used later for other purposes such as bindings. One typically assigns a class to a TopLevel or Frame so that the class will apply to all of that widget’s children.

Reconfigurable options

These options can be set at widget creation or changed later via configure.

Name: activeBackground

Class: Foreground

Switch: -activebackground

Specifies background color to use when drawing active elements. An element (a widget or portion of a widget) is active if the mouse cursor is positioned over the element and pressing a mouse button will cause some action to occur. If strict Motif compliance has been requested by setting the $Tk::strictMotif variable, this option will normally be ignored; the normal background color will be used instead. For some elements on Windows and Macintosh systems, the active color will only be used while mouse button 1 is pressed over the element.

Name: activeBorderWidth

Class: BorderWidth

Switch: -activeborderwidth

Specifies a non-negative value indicating the width of the 3-D border drawn around active elements. See above for definition of active elements. The value may have any of the forms acceptable to Tk_GetPixels. This option is typically only available in widgets displaying more than one element at a time (e.g. menus but not buttons).

Name: activeForeground

Class: Background

Switch: -activeforeground

Specifies foreground color to use when drawing active elements. See above for definition of active elements.

Name: activetile

Class: Tile

Switch: -activetile

Specifies image used to display inside active elements of the widget. See above for definition of active elements.

Name: anchor

Class: Anchor

Switch: -anchor

Specifies how the information in a widget (e.g. text or a bitmap) is to be displayed in the widget. Must be one of the values n, ne, e, se, s, sw, w, nw, or center. For example, nw means display the information such that its top-left corner is at the top-left corner of the widget.

Name: background

Class: Background

Switch: -background

Alias: -bg

Specifies the normal background color to use when displaying the widget.

Name: bitmap

Class: Bitmap

Switch: -bitmap

Specifies a bitmap to display in the widget, in any of the forms acceptable to Tk_GetBitmap. The exact way in which the bitmap is displayed may be affected by other options such as -anchor or -justify. Typically, if this option is specified then it overrides other options that specify a textual value to display in the widget; the -bitmap option may be reset to an empty string to re-enable a text display. In widgets that support both -bitmap and -image options, -image will usually override -bitmap.

Name: borderWidth

Class: BorderWidth

Switch: -borderwidth

Alias: -bd

Specifies a non-negative value indicating the width of the 3-D border to draw around the outside of the widget (if such a border is being drawn; the relief option typically determines this). The value may also be used when drawing 3-D effects in the interior of the widget. The value may have any of the forms acceptable to Tk_GetPixels.

Name: compound

Class: Compound

Switch: -compound

Specifies if the widget should display text and bitmaps/images at the same time, and if so, where the bitmap/image should be placed relative to the text. Must be one of the values none, bottom, top, left, right, or center. For example, the (default) value none specifies that the bitmap or image should (if defined) be displayed instead of the text, the value left specifies that the bitmap or image should be displayed to the left of the text, and the value center specifies that the bitmap or image should be displayed on top of the text.

Name: cursor

Class: Cursor

Switch: -cursor

Specifies the mouse cursor to be used for the widget. The value may have any of the forms acceptable to Tk_GetCursor.

Name: dash

Class: Dash

Switch: -dash

The value may have any of the forms accepted by Tk_GetDash, such as 4, [6,4], ., -, -., or -...

Name: dashoffset

Class: Dashoffset

Switch: -dashoffset

Specifies the offset in the dash list where the drawing starts.

Name: disabledForeground

Class: DisabledForeground

Switch: -disabledforeground

Specifies foreground color to use when drawing a disabled element. If the option is specified as an empty string (which is typically the case on monochrome displays), disabled elements are drawn with the normal foreground color but they are dimmed by drawing them with a stippled fill pattern.

Name: disabledtile

Class: Tile

Switch: -disabledtile

Specifies image to use when drawing a disabled element.

Name: exportSelection

Class: ExportSelection

Switch: -exportselection

Specifies whether or not a selection in the widget should also be the X selection. The value may have any of the forms accepted by Tcl_GetBoolean, such as true, false, 0, 1, yes, or no. If the selection is exported, then selecting in the widget deselects the current X selection, selecting outside the widget deselects any widget selection, and the widget will respond to selection retrieval requests when it has a selection. The default is usually for widgets to export selections.

Name: font

Class: Font

Switch: -font

Specifies the font to use when drawing text inside the widget.

Name: foreground

Class: Foreground

Switch: -foreground

Alias: -fg

Specifies the normal foreground color to use when displaying the widget.

Name: highlightBackground

Class: HighlightBackground

Switch: -highlightbackground

Specifies the color to display in the traversal highlight region when the widget does not have the input focus.

Name: highlightColor

Class: HighlightColor

Switch: -highlightcolor

Specifies the color to use for the traversal highlight rectangle that is drawn around the widget when it has the input focus.

Name: highlightThickness

Class: HighlightThickness

Switch: -highlightthickness

Specifies a non-negative value indicating the width of the highlight rectangle to draw around the outside of the widget when it has the input focus. The value may have any of the forms acceptable to Tk_GetPixels. If the value is zero, no focus highlight is drawn around the widget.

Name: image

Class: Image

Switch: -image

Specifies an image to display in the widget, which must have been created with an image create. (See Tk::Image for details of image creation.) Typically, if the -image option is specified then it overrides other options that specify a bitmap or textual value to display in the widget; the -image option may be reset to an empty string to re-enable a bitmap or text display.

Name: insertBackground

Class: Foreground

Switch: -insertbackground

Specifies the color to use as background in the area covered by the insertion cursor. This color will normally override either the normal background for the widget (or the selection background if the insertion cursor happens to fall in the selection).

Name: insertBorderWidth

Class: BorderWidth

Switch: -insertborderwidth

Specifies a non-negative value indicating the width of the 3-D border to draw around the insertion cursor. The value may have any of the forms acceptable to Tk_GetPixels.

Name: insertOffTime

Class: OffTime

Switch: -insertofftime

Specifies a non-negative integer value indicating the number of milliseconds the insertion cursor should remain ``off’’ in each blink cycle. If this option is zero then the cursor doesn’t blink: it is on all the time.

Name: insertOnTime

Class: OnTime

Switch: -insertontime

Specifies a non-negative integer value indicating the number of milliseconds the insertion cursor should remain ``on’’ in each blink cycle.

Name: insertWidth

Class: InsertWidth

Switch: -insertwidth

Specifies a value indicating the total width of the insertion cursor. The value may have any of the forms acceptable to Tk_GetPixels. If a border has been specified for the insertion cursor (using the insertBorderWidth option), the border will be drawn inside the width specified by the insertWidth option.

Name: jump

Class: Jump

Switch: -jump

For widgets with a slider that can be dragged to adjust a value, such as scrollbars, this option determines when notifications are made about changes in the value. The option’s value must be a boolean of the form accepted by Tcl_GetBoolean. If the value is false, updates are made continuously as the slider is dragged. If the value is true, updates are delayed until the mouse button is released to end the drag; at that point a single notification is made (the value ``jumps’’ rather than changing smoothly).

Name: justify

Class: Justify

Switch: -justify

When there are multiple lines of text displayed in a widget, this option determines how the lines line up with each other. Must be one of left, center, or right. Left means that the lines’ left edges all line up, center means that the lines’ centers are aligned, and right means that the lines’ right edges line up.

Name: offset

Class: Offset

Switch: -offset

Specifies the offset of tiles (see also -tile option). It can have two different formats -offset x,y or -offset side, where side can be n, ne, e, se, s, sw, w, nw, or center. In the first case the origin is the origin of the toplevel of the current window. For the canvas itself and canvas objects the origin is the canvas origin, but putting # in front of the coordinate pair indicates using the toplevel origin in stead. For canvas objects, the -offset option is used for stippling as well. For the line and polygon canvas items you can also specify an index as argument, which connects the stipple or tile origin to one of the coordinate points of the line/polygon.

Name: orient

Class: Orient

Switch: -orient

For widgets that can lay themselves out with either a horizontal or vertical orientation, such as scrollbars, this option specifies which orientation should be used. Must be either horizontal or vertical or an abbreviation of one of these.

Name: padX

Class: Pad

Switch: -padx

Specifies a non-negative value indicating how much extra space to request for the widget in the X-direction. The value may have any of the forms acceptable to Tk_GetPixels. When computing how large a window it needs, the widget will add this amount to the width it would normally need (as determined by the width of the things displayed in the widget); if the geometry manager can satisfy this request, the widget will end up with extra internal space to the left and/or right of what it displays inside. Most widgets only use this option for padding text: if they are displaying a bitmap or image, then they usually ignore padding options.

Name: padY

Class: Pad

Switch: -pady

Specifies a non-negative value indicating how much extra space to request for the widget in the Y-direction. The value may have any of the forms acceptable to Tk_GetPixels. When computing how large a window it needs, the widget will add this amount to the height it would normally need (as determined by the height of the things displayed in the widget); if the geometry manager can satisfy this request, the widget will end up with extra internal space above and/or below what it displays inside. Most widgets only use this option for padding text: if they are displaying a bitmap or image, then they usually ignore padding options.

Name: relief

Class: Relief

Switch: -relief

Specifies the 3-D effect desired for the widget. Acceptable values are raised, sunken, flat, ridge, solid, and groove. The value indicates how the interior of the widget should appear relative to its exterior; for example, raised means the interior of the widget should appear to protrude from the screen, relative to the exterior of the widget.

Name: repeatDelay

Class: RepeatDelay

Switch: -repeatdelay

Specifies the number of milliseconds a button or key must be held down before it begins to auto-repeat. Used, for example, on the up- and down-arrows in scrollbars.

Name: repeatInterval

Class: RepeatInterval

Switch: -repeatinterval

Used in conjunction with repeatDelay: once auto-repeat begins, this option determines the number of milliseconds between auto-repeats.

Name: selectBackground

Class: Foreground

Switch: -selectbackground

Specifies the background color to use when displaying selected items.

Name: selectBorderWidth

Class: BorderWidth

Switch: -selectborderwidth

Specifies a non-negative value indicating the width of the 3-D border to draw around selected items. The value may have any of the forms acceptable to Tk_GetPixels.

Name: selectForeground

Class: Background

Switch: -selectforeground

Specifies the foreground color to use when displaying selected items.

Name: setGrid

Class: SetGrid

Switch: -setgrid

Specifies a boolean value that determines whether this widget controls the resizing grid for its top-level window. This option is typically used in text widgets, where the information in the widget has a natural size (the size of a character) and it makes sense for the window’s dimensions to be integral numbers of these units. These natural window sizes form a grid. If the setGrid option is set to true then the widget will communicate with the window manager so that when the user interactively resizes the top-level window that contains the widget, the dimensions of the window will be displayed to the user in grid units and the window size will be constrained to integral numbers of grid units. See “GRIDDED GEOMETRY MANAGEMENT” in Tk::Wm for more details.

Name: takeFocus

Class: TakeFocus

Switch: -takefocus

Determines whether the window accepts the focus during keyboard traversal (e.g., Tab and Shift-Tab). Before setting the focus to a window, the traversal scripts consult the value of the takeFocus option. A value of 0 means that the window should be skipped entirely during keyboard traversal. 1 means that the window should receive the input focus as long as it is viewable (it and all of its ancestors are mapped). An empty value for the option means that the traversal scripts make the decision about whether or not to focus on the window: the current algorithm is to skip the window if it is disabled, if it has no key bindings, or if it is not viewable. If the value has any other form, then the traversal scripts take the value, append the name of the window to it (with a separator space), and evaluate the resulting string as a Callback. The script must return 0, 1, or an empty string: a 0 or 1 value specifies whether the window will receive the input focus, and an empty string results in the default decision described above. Note: this interpretation of the option is defined entirely by the Callbacks that implement traversal: the widget implementations ignore the option entirely, so you can change its meaning if you redefine the keyboard traversal scripts.

Name: text

Class: Text

Switch: -text

Specifies a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as anchor or justify.

Name: textVariable

Class: Variable

Switch: -textvariable

Specifies the name of a variable. The value of the variable is a text string to be displayed inside the widget; if the variable value changes then the widget will automatically update itself to reflect the new value. The way in which the string is displayed in the widget depends on the particular widget and may be determined by other options, such as anchor or justify.

Name: tile

Class: Tile

Switch: -tile

Specifies image used to display the widget. If image is the empty string, then the normal background color is displayed.

Name: troughColor

Class: Background

Switch: -troughcolor

Specifies the color to use for the rectangular trough areas in widgets such as scrollbars and scales.

Name: troughTile

Class: Tile

Switch: -troughtile

Specifies image used to display in the rectangular trough areas in widgets such as scrollbars and scales.

Name: underline

Class: Underline

Switch: -underline

Specifies the integer index of a character to underline in the widget. This option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.

Name: wrapLength

Class: WrapLength

Switch: -wraplength

For widgets that can perform word-wrapping, this option specifies the maximum line length. Lines that would exceed this length are wrapped onto the next line, so that no line is longer than the specified length. The value may be specified in any of the standard forms for screen distances. If this value is less than or equal to 0 then no wrapping is done: lines will break only at newline characters in the text.

Name: xScrollCommand

Class: ScrollCommand

Switch: -xscrollcommand

Specifies a callback used to communicate with horizontal scrollbars. When the view in the widget’s window changes (or whenever anything else occurs that could change the display in a scrollbar, such as a change in the total size of the widget’s contents), the widget will make a callback passing two numeric arguments in addition to any specified in the callback. Each of the numbers is a fraction between 0 and 1, which indicates a position in the document. 0 indicates the beginning of the document, 1 indicates the end, .333 indicates a position one third the way through the document, and so on. The first fraction indicates the first information in the document that is visible in the window, and the second fraction indicates the information just after the last portion that is visible. Typically the xScrollCommand option consists of the scrollbar widget object and the method ``set’’ i.e. [set => $sb]: this will cause the scrollbar to be updated whenever the view in the window changes. If this option is not specified, then no command will be executed.

Name: yScrollCommand

Class: ScrollCommand

Switch: -yscrollcommand

Specifies a calback used to communicate with vertical scrollbars. This option is treated in the same way as the xScrollCommand option, except that it is used for vertical scrollbars and is provided by widgets that support vertical scrolling. See the description of xScrollCommand for details on how this option is used.

SEE ALSO

Tk::option Tk::callbacks Tk::ConfigSpecs Tk_GetPixels

KEYWORDS

class, name, standard option, switch

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1551 - Linux cli command __ppc_mdoom

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __ppc_mdoom and provides detailed information about the command __ppc_mdoom, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __ppc_mdoom.

NAME 🖥️ __ppc_mdoom 🖥️

Hint the processor to release shared resources

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/platform/ppc.h>
void __ppc_yield(void);
void __ppc_mdoio(void);
void __ppc_mdoom(void);

DESCRIPTION

These functions provide hints about the usage of resources that are shared with other processors on the Power architecture. They can be used, for example, if a program waiting on a lock intends to divert the shared resources to be used by other processors.

__ppc_yield() provides a hint that performance will probably be improved if shared resources dedicated to the executing processor are released for use by other processors.

__ppc_mdoio() provides a hint that performance will probably be improved if shared resources dedicated to the executing processor are released until all outstanding storage accesses to caching-inhibited storage have been completed.

__ppc_mdoom() provides a hint that performance will probably be improved if shared resources dedicated to the executing processor are released until all outstanding storage accesses to cacheable storage for which the data is not in the cache have been completed.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

__ppc_yield(), __ppc_mdoio(), __ppc_mdoom()

Thread safetyMT-Safe

STANDARDS

GNU.

HISTORY

glibc 2.18.

SEE ALSO

__ppc_set_ppr_med(3)

Power ISA, Book II - Section 3.2 (“or” architecture)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1552 - Linux cli command Net_DBus_Binding_Message_MethodReturnpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Binding_Message_MethodReturnpm and provides detailed information about the command Net_DBus_Binding_Message_MethodReturnpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Binding_Message_MethodReturnpm.

NAME 🖥️ Net_DBus_Binding_Message_MethodReturnpm 🖥️

a message encoding a method return

DESCRIPTION

This module is part of the low-level DBus binding APIs, and should not be used by application code. No guarantees are made about APIs under the Net::DBus::Binding:: namespace being stable across releases.

This module provides a convenience constructor for creating a message representing an method return.

METHODS

my $return = Net::DBus::Binding::Message::MethodReturn->new( call => $method_call);
Create a message representing a reply to the method call passed in the call parameter.

AUTHOR

Daniel P. Berrange.

COPYRIGHT

Copyright (C) 2005-2009 Daniel P. Berrange

SEE ALSO

Net::DBus::Binding::Message

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1553 - Linux cli command setkey

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setkey and provides detailed information about the command setkey, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setkey.

NAME 🖥️ setkey 🖥️

encrypt 64-bit messages

LIBRARY

Password hashing library (libcrypt, -lcrypt)

SYNOPSIS

#define _XOPEN_SOURCE /* See feature_test_macros(7) */
#include <unistd.h>
[[deprecated]] void encrypt(char block[64], int edflag);
#define _XOPEN_SOURCE /* See feature_test_macros(7) */
#include <stdlib.h>
[[deprecated]] void setkey(const char *key);
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <crypt.h>
[[deprecated]] void setkey_r(const char *key, struct crypt_data *data);
[[deprecated]] void encrypt_r(char *block, int edflag,
 struct crypt_data *data);

DESCRIPTION

These functions encrypt and decrypt 64-bit messages. The setkey() function sets the key used by encrypt(). The key argument used here is an array of 64 bytes, each of which has numerical value 1 or 0. The bytes key[n] where n=8*i-1 are ignored, so that the effective key length is 56 bits.

The encrypt() function modifies the passed buffer, encoding if edflag is 0, and decoding if 1 is being passed. Like the key argument, also block is a bit vector representation of the actual value that is encoded. The result is returned in that same vector.

These two functions are not reentrant, that is, the key data is kept in static storage. The functions setkey_r() and encrypt_r() are the reentrant versions. They use the following structure to hold the key data:

struct crypt_data {
    char keysched[16 * 8];
    char sb0[32768];
    char sb1[32768];
    char sb2[32768];
    char sb3[32768];
    char crypt_3_buf[14];
    char current_salt[2];
    long current_saltbits;
    int  direction;
    int  initialized;
};

Before calling setkey_r() set data->initialized to zero.

RETURN VALUE

These functions do not return any value.

ERRORS

Set errno to zero before calling the above functions. On success, errno is unchanged.

ENOSYS
The function is not provided. (For example because of former USA export restrictions.)

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

encrypt(), setkey()

Thread safetyMT-Unsafe race:crypt

encrypt_r(), setkey_r()

Thread safetyMT-Safe

STANDARDS

encrypt()
setkey()
POSIX.1-2008.

encrypt_r()
setkey_r()
None.

HISTORY

Removed in glibc 2.28.

Because they employ the DES block cipher, which is no longer considered secure, these functions were removed from glibc. Applications should switch to a modern cryptography library, such as libgcrypt.

encrypt()
setkey()
POSIX.1-2001, SUS, SVr4.

Availability in glibc

See crypt(3).

Features in glibc

In glibc 2.2, these functions use the DES algorithm.

EXAMPLES

#define _XOPEN_SOURCE
#include <crypt.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int
main(void)
{
    char key[64];
    char orig[9] = "eggplant";
    char buf[64];
    char txt[9];
    for (size_t i = 0; i < 64; i++) {
        key[i] = rand() & 1;
    }
    for (size_t i = 0; i < 8; i++) {
        for (size_t j = 0; j < 8; j++) {
            buf[i * 8 + j] = orig[i] >> j & 1;
        }
        setkey(key);
    }
    printf("Before encrypting: %s

“, orig); encrypt(buf, 0); for (size_t i = 0; i < 8; i++) { for (size_t j = 0, txt[i] = ‘�’; j < 8; j++) { txt[i] |= buf[i * 8 + j] « j; } txt[8] = ‘�’; } printf(“After encrypting: %s “, txt); encrypt(buf, 1); for (size_t i = 0; i < 8; i++) { for (size_t j = 0, txt[i] = ‘�’; j < 8; j++) { txt[i] |= buf[i * 8 + j] « j; } txt[8] = ‘�’; } printf(“After decrypting: %s “, txt); exit(EXIT_SUCCESS); }

SEE ALSO

cbc_crypt(3), crypt(3), ecb_crypt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1554 - Linux cli command X11_Protocol_Ext_DPMSpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command X11_Protocol_Ext_DPMSpm and provides detailed information about the command X11_Protocol_Ext_DPMSpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the X11_Protocol_Ext_DPMSpm.

NAME 🖥️ X11_Protocol_Ext_DPMSpm 🖥️

Perl module for the X11 Protocol DPMS Extension

SYNOPSIS

use X11::Protocol; $x = X11::Protocol->new(); $x->init_extension(DPMS);

DESCRIPTION

This module is used to control the DPMS features of compliant monitors.

SYMBOLIC CONSTANTS

This extension adds the constant type DPMSPowerLevels, with values as defined in the standard.

REQUESTS

This extension adds several requests, called as shown below:

$x->DPMSGetVersion => ($major, $minor) $x->DPMSCapable => ($capable) $x->DPMSGetTimeouts => ($standby_timeout, $suspend_timeout, $off_timeout) $x->DPMSSetTimeouts($standby_timeout, $suspend_timeout, $off_timeout) => () $x->DPMSEnable => () $x->DPMSDisable => () $x->DPMSForceLevel($power_level) => () $x->DPMSInfo => ($power_level,$state)

AUTHOR

Jay Kominek <[email protected]>

SEE ALSO

perl (1), X11::Protocol, X Display Power Management Signaling (DPMS) Extension (X Consortium Standard)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1555 - Linux cli command XtManageChildren

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtManageChildren and provides detailed information about the command XtManageChildren, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtManageChildren.

NAME 🖥️ XtManageChildren 🖥️

manage and unmanage children

SYNTAX

#include <X11/Intrinsic.h>

typedef Widget *WidgetList;

void XtManageChildren(WidgetList children, Cardinal num_children);

void XtManageChild(Widget child);

void XtUnmanageChildren(WidgetList children, Cardinal num_children);

void XtUnmanageChild(Widget child);

void XtChangeManagedSet(WidgetList unmanage_children, Cardinal num_unmanage_children, XtDoChangeProc do_change_proc, XtPointer client_data, WidgetList manage_children, Cardinal num_manage_children);

Boolean XtIsManaged(Widget widget);

ARGUMENTS

child
Specifies the child.

children
Specifies a list of child widgets.

num_children
Specifies the number of children.

widget
Specifies the widget.

manage_children
Specifies the list of widget children to add to the managed set.

num_manage_children
Specifies the number of entries in the manage_children list.

unmanage_children
Specifies the list of widget children to remove from the managed set.

num_unmanage_children
Specifies the number of entries in the unmanage_children list.

do_change_proc
Specifies the post unmanage, pre manage hook procedure to invoke.

client_data
Specifies the client data to be passed to the hook procedure.

DESCRIPTION

The XtManageChildren function performs the following:

  • Issues an error if the children do not all have the same parent or if the parent is not a subclass of compositeWidgetClass.

  • Returns immediately if the common parent is being destroyed; otherwise, for each unique child on the list, XtManageChildren ignores the child if it already is managed or is being destroyed and marks it if not.

  • If the parent is realized and after all children have been marked, it makes some of the newly managed children viewable:

    • Calls the change_managed routine of the widgets’ parent.

    • Calls XtRealizeWidget on each previously unmanaged child that is unrealized.

    • Maps each previously unmanaged child that has map_when_managed True.

Managing children is independent of the ordering of children and independent of creating and deleting children. The layout routine of the parent should consider children whose managed field is True and should ignore all other children. Note that some composite widgets, especially fixed boxes, call XtManageChild from their insert_child procedure.

If the parent widget is realized, its change_managed procedure is called to notify it that its set of managed children has changed. The parent can reposition and resize any of its children. It moves each child as needed by calling XtMoveWidget, which first updates the x and y fields and then calls XMoveWindow if the widget is realized.

The XtManageChild function constructs a WidgetList of length one and calls XtManageChildren.

The XtUnmanageChildren function performs the following:

  • Issues an error if the children do not all have the same parent or if the parent is not a subclass of compositeWidgetClass.

  • Returns immediately if the common parent is being destroyed; otherwise, for each unique child on the list, XtUnmanageChildren performs the following:

    • Ignores the child if it already is unmanaged or is being destroyed and marks it if not.

    • If the child is realized, it makes it nonvisible by unmapping it.

  • Calls the change_managed routine of the widgets’ parent after all children have been marked if the parent is realized.

XtUnmanageChildren does not destroy the children widgets. Removing widgets from a parent’s managed set is often a temporary banishment, and, some time later, you may manage the children again.

The XtUnmanageChild function constructs a widget list of length one and calls XtUnmanageChildren.

The XtChangeManagedSet function performs the following:

  • Issues an error if the widgets specified in the manage_children and the unmanage_children lists to no all have the same parent, or if that parent is not a subclass of compositeWidgetClass.

  • Returns immediately if the common parent is being destroyed.

  • If no CompositeClassExtension is defined, or a CompositeClassExtension is defined but with an allows_change_managed_set field with a value of False, and XtChangeManagedSet was invoked with a non-NULL do_change_proc procedure then XtChangeManagedSet performs the following:

    • Calls XtUnmanageChildren (unmanage_children, num_unmanage_children).

    • Calls the do_change_proc specified.

    • Calls XtManageChildren (manage_children, num_manage_children) and then returns immediately.

  • Otherwise, if a CompositeClassExtension is defined with an allows_change_managed_set field with a value of True, or if no CompositeClassExtension is defined, and XtChangeManagedSet was invoked with a NULL do_change_proc procedure, then the following is performed:

    • For each child on the unmanage_children list; if the child is already unmanaged or is being destroyed it is ignored, otherwise it is marked as being unmanaged and if it is realized it is made nonvisible by being unmapped.

    • If the do_change_proc procedure is non-NULL then it is invoked as specified.

    • For each child on the manage_children list; if the child is already managed or it is being destroyed it is ignored, otherwise it is marked as managed

  • If the parent is realized and after all children have been marked, the change_managed method of the parent is invoked and subsequently some of the newly managed children are made viewable by:

    • Calling XtRealizeWidget on each of the previously unmanaged child that is unrealized.

    • Mapping each previously unmanaged child that has map_when_managed True.

The XtIsManaged function returns True if the specified widget is of class RectObj or any subclass thereof and is managed, or False otherwise.

SEE ALSO

XtMapWidget(3), XtRealizeWidget(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1556 - Linux cli command XtRealizeWidget

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtRealizeWidget and provides detailed information about the command XtRealizeWidget, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtRealizeWidget.

NAME 🖥️ XtRealizeWidget 🖥️

realize and unrealize widgets

SYNTAX

#include <X11/Intrinsic.h>

void XtRealizeWidget(Widget w);

Boolean XtIsRealized(Widget w);

void XtUnrealizeWidget(Widget w);

ARGUMENTS

  1. Specifies the widget.

DESCRIPTION

If the widget is already realized, XtRealizeWidget simply returns. Otherwise, it performs the following:

  • Binds all action names in the widget’s translation table to procedures (see Section 10.1.2).

  • Makes a post-order traversal of the widget tree rooted at the specified widget and calls the change_managed procedure of each composite widget that has one or more managed children.

  • Constructs an XSetWindowAttributes structure filled in with information derived from the Core widget fields and calls the realize procedure for the widget, which adds any widget-specific attributes and creates the X window.

  • If the widget is not a subclass of compositeWidgetClass, XtRealizeWidget returns; otherwise, it continues and performs the following:

    • Descends recursively to each of the widget’s managed children and calls the realize procedures. Primitive widgets that instantiate children are responsible for realizing those children themselves.

    • Maps all of the managed children windows that have mapped_when_managed True. (If a widget is managed but mapped_when_managed is False, the widget is allocated visual space but is not displayed. Some people seem to like this to indicate certain states.)

If the widget is a top-level shell widget (that is, it has no parent), and mapped_when_managed is True, XtRealizeWidget maps the widget window.

The XtIsRealized function returns True if the widget has been realized, that is, if the widget has a nonzero X window ID.

Some widget procedures (for example, set_values) might wish to operate differently after the widget has been realized.

The XtUnrealizeWidget function destroys the windows of an existing widget and all of its children (recursively down the widget tree). To recreate the windows at a later time, call XtRealizeWidget again. If the widget was managed, it will be unmanaged automatically before its window is freed.

SEE ALSO

XtManageChildren(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1557 - Linux cli command XtRemoveTimeOut

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtRemoveTimeOut and provides detailed information about the command XtRemoveTimeOut, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtRemoveTimeOut.

NAME 🖥️ XtRemoveTimeOut 🖥️

register and remove timeouts

SYNTAX

#include <X11/Intrinsic.h>

XtIntervalId XtAppAddTimeOut(XtAppContext app_context, unsigned long interval, XtTimerCallbackProc proc, XtPointer client_data);

void XtRemoveTimeOut(XtIntervalId timer);

ARGUMENTS

app_context
Specifies the application context for which the timer is to be set.

client_data
Specifies the argument that is to be passed to the specified procedure when handling the callback.

interval
Specifies the time interval in milliseconds.

proc
Specifies the procedure that is to be called when time expires.

timer
Specifies the ID for the timeout request to be destroyed.

DESCRIPTION

The XtAppAddTimeOut function creates a timeout and returns an identifier for it. The timeout value is set to interval. The callback procedure is called when the time interval elapses, and then the timeout is removed.

The XtRemoveTimeOut function removes the timeout. Note that timeouts are automatically removed once they trigger.

SEE ALSO

XtAppAddInput(3),XtAppAddSignal(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1558 - Linux cli command tmpnam

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tmpnam and provides detailed information about the command tmpnam, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tmpnam.

NAME 🖥️ tmpnam 🖥️

create a name for a temporary file

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
[[deprecated]] char *tmpnam(char *s);
[[deprecated]] char *tmpnam_r(char *s);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

tmpnam_r()

    Since glibc 2.19:
        _DEFAULT_SOURCE
    Up to and including glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

Note: avoid using these functions; use mkstemp(3) or tmpfile(3) instead.

The tmpnam() function returns a pointer to a string that is a valid filename, and such that a file with this name did not exist at some point in time, so that naive programmers may think it a suitable name for a temporary file. If the argument s is NULL, this name is generated in an internal static buffer and may be overwritten by the next call to tmpnam(). If s is not NULL, the name is copied to the character array (of length at least L_tmpnam) pointed to by s and the value s is returned in case of success.

The created pathname has a directory prefix P_tmpdir. (Both L_tmpnam and P_tmpdir are defined in <stdio.h>, just like the TMP_MAX mentioned below.)

The tmpnam_r() function performs the same task as tmpnam(), but returns NULL (to indicate an error) if s is NULL.

RETURN VALUE

These functions return a pointer to a unique temporary filename, or NULL if a unique name cannot be generated.

ERRORS

No errors are defined.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tmpnam()

Thread safetyMT-Unsafe race:tmpnam/!s

tmpnam_r()

Thread safetyMT-Safe

STANDARDS

tmpnam()
C11, POSIX.1-2008.

tmpnam_r()
None.

HISTORY

tmpnam()
SVr4, 4.3BSD, C89, POSIX.1-2001. Obsolete in POSIX.1-2008.

tmpnam_r()
Solaris.

NOTES

The tmpnam() function generates a different string each time it is called, up to TMP_MAX times. If it is called more than TMP_MAX times, the behavior is implementation defined.

Although these functions generate names that are difficult to guess, it is nevertheless possible that between the time that the pathname is returned and the time that the program opens it, another program might create that pathname using open(2), or create it as a symbolic link. This can lead to security holes. To avoid such possibilities, use the open(2) O_EXCL flag to open the pathname. Or better yet, use mkstemp(3) or tmpfile(3).

Portable applications that use threads cannot call tmpnam() with a NULL argument if either _POSIX_THREADS or _POSIX_THREAD_SAFE_FUNCTIONS is defined.

BUGS

Never use these functions. Use mkstemp(3) or tmpfile(3) instead.

SEE ALSO

mkstemp(3), mktemp(3), tempnam(3), tmpfile(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1559 - Linux cli command XtIsComposite

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtIsComposite and provides detailed information about the command XtIsComposite, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtIsComposite.

NAME 🖥️ XtIsComposite 🖥️

obtain and verify a widget’s class

SYNTAX

#include <X11/Intrinsic.h>

WidgetClass XtClass(Widget w);

WidgetClass XtSuperclass(Widget w);

Boolean XtIsSubclass(Widget w, WidgetClass widget_class);

void XtCheckSubclass(Widget widget, WidgetClass widget_class, String message);

Boolean XtIsObject(Widget w);

Boolean XtIsRectObj(Widget w);

Boolean XtIsWidget(Widget w);

Boolean XtIsComposite(Widget w);

Boolean XtIsConstraint(Widget w);

Boolean XtIsShell(Widget w);

Boolean XtIsOverrideShell(Widget w);

Boolean XtIsWMShell(Widget w);

Boolean XtIsVendorShell(Widget w);

Boolean XtIsTransientShell(Widget w);

Boolean XtIsTopLevelShell(Widget w);

Boolean XtIsApplicationShell(Widget w);

Boolean XtIsSessionShell(Widget w);

ARGUMENTS

  1. Specifies the widget.

widget_class
Specifies the widget class.

message
Specifies the message that is to be used.

DESCRIPTION

The XtClass function returns a pointer to the widget’s class structure.

The XtSuperclass function returns a pointer to the widget’s superclass class structure.

The XtIsSubclass function returns True if the class of the specified widget is equal to or is a subclass of the specified class. The widget’s class can be any number of subclasses down the chain and need not be an immediate subclass of the specified class. Composite widgets that need to restrict the class of the items they contain can use XtIsSubclass to find out if a widget belongs to the desired class of objects.

The XtCheckSubclass macro determines if the class of the specified widget is equal to or is a subclass of the specified widget class. The widget can be any number of subclasses down the chain and need not be an immediate subclass of the specified widget class. If the specified widget is not a subclass, XtCheckSubclass constructs an error message from the supplied message, the widget’s actual class, and the expected class and calls XtErrorMsg. XtCheckSubclass should be used at the entry point of exported routines to ensure that the client has passed in a valid widget class for the exported operation.

XtCheckSubclass is only executed when the widget has been compiled with the compiler symbol DEBUG defined; otherwise, it is defined as the empty string and generates no code.

To test if a given widget belongs to a subclass of an Intrinsics-defined class, the Intrinsics defines macros or functions equivalent to XtIsSubclass for each of the built-in classes. These procedures are XtIsObject, XtIsRectObj, XtIsWidget, XtIsComposite, XtIsConstraint, XtIsShell, XtIsOverrideShell, XtIsWMShell, XtIsVendorShell, XtIsTransientShell, XtIsTopLevelShell, XtIsApplicationShell, and XtIsSessionShell.

The

SEE ALSO

XtAppErrorMsg(3), XtDisplay(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1560 - Linux cli command zip_register_progress_callback_with_state

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_register_progress_callback_with_state and provides detailed information about the command zip_register_progress_callback_with_state, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_register_progress_callback_with_state.

libzip (-lzip)

The

function registers a callback function

for the zip archive

The

argument is a double in the range from 0.00 to 1.0 that defines the smallest change for which the callback should be called (to avoid too frequent calls). The

function is called during cleanup for deleting the userdata supplied in

The callback function is called during

in regular intervals (after every zip archive entry that’s completely written to disk, and while writing data for entries) with zip archive

the current progression state as a

and the user-provided user-data

as arguments. The progression state is a

in the range from 0.0 to 1.0. This can be used to provide progress indicators for user interfaces.

was added in libzip 1.3.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1561 - Linux cli command Moose_Cookbook_Meta_Table_MetaclassTraitpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Meta_Table_MetaclassTraitpm and provides detailed information about the command Moose_Cookbook_Meta_Table_MetaclassTraitpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Meta_Table_MetaclassTraitpm.

NAME 🖥️ Moose_Cookbook_Meta_Table_MetaclassTraitpm 🖥️

Adding a “table” attribute as a metaclass trait

VERSION

version 2.2207

SYNOPSIS

# in lib/MyApp/Meta/Class/Trait/HasTable.pm package MyApp::Meta::Class::Trait::HasTable; use Moose::Role; Moose::Util::meta_class_alias(HasTable); has table => ( is => rw, isa => Str, ); # in lib/MyApp/User.pm package MyApp::User; use Moose -traits => HasTable; _ _PACKAGE_ _->meta->table(User);

DESCRIPTION

In this recipe, we’ll create a class metaclass trait which has a “table” attribute. This trait is for classes associated with a DBMS table, as one might do for an ORM.

In this example, the table name is just a string, but in a real ORM the table might be an object describing the table.

THE METACLASS TRAIT

This really is as simple as the recipe “SYNOPSIS” shows. The trick is getting your classes to use this metaclass, and providing some sort of sugar for declaring the table. This is covered in Moose::Cookbook::Extending::Debugging_BaseClassRole, which shows how to make a module like Moose.pm itself, with sugar like has_table().

Using this Metaclass Trait in Practice

Accessing this new table attribute is quite simple. Given a class named MyApp::User, we could simply write the following:

my $table = MyApp::User->meta->table;

As long as MyApp::User has arranged to apply the MyApp::Meta::Class::Trait::HasTable to its metaclass, this method call just works. If we want to be more careful, we can check that the class metaclass object has a table method:

$table = MyApp::User->meta->table if MyApp::User->meta->can(table);

In theory, this is not entirely correct, since the metaclass might be getting its table method from a different trait. In practice, you are unlikely to encounter this sort of problem.

RECIPE CAVEAT

This recipe doesn’t work when you paste it all into a single file. This is because the use Moose -traits => HasTable; line ends up being executed before the table attribute is defined.

When the two packages are separate files, this just works.

SEE ALSO

Moose::Cookbook::Meta::Labeled_AttributeTrait - Labels implemented via attribute traits =pod

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1562 - Linux cli command fwide

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fwide and provides detailed information about the command fwide, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fwide.

NAME 🖥️ fwide 🖥️

set and determine the orientation of a FILE stream

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
int fwide(FILE *stream, int mode);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

fwide():

    _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE
        || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

When mode is zero, the fwide() function determines the current orientation of stream. It returns a positive value if stream is wide-character oriented, that is, if wide-character I/O is permitted but char I/O is disallowed. It returns a negative value if stream is byte oriented—that is, if char I/O is permitted but wide-character I/O is disallowed. It returns zero if stream has no orientation yet; in this case the next I/O operation might change the orientation (to byte oriented if it is a char I/O operation, or to wide-character oriented if it is a wide-character I/O operation).

Once a stream has an orientation, it cannot be changed and persists until the stream is closed.

When mode is nonzero, the fwide() function first attempts to set stream’s orientation (to wide-character oriented if mode is greater than 0, or to byte oriented if mode is less than 0). It then returns a value denoting the current orientation, as above.

RETURN VALUE

The fwide() function returns the stream’s orientation, after possibly changing it. A positive return value means wide-character oriented. A negative return value means byte oriented. A return value of zero means undecided.

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

Wide-character output to a byte oriented stream can be performed through the fprintf(3) function with the %lc and %ls directives.

Char oriented output to a wide-character oriented stream can be performed through the fwprintf(3) function with the %c and %s directives.

SEE ALSO

fprintf(3), fwprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1563 - Linux cli command sys_errlist

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sys_errlist and provides detailed information about the command sys_errlist, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sys_errlist.

NAME 🖥️ sys_errlist 🖥️

print a system error message

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
void perror(const char *s);
#include <errno.h>
int errno; /* Not really declared this way; see errno(3) */
[[deprecated]] const char *const sys_errlist[];
[[deprecated]] int sys_nerr;

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sys_errlist, sys_nerr:

    From glibc 2.19 to glibc 2.31:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The perror() function produces a message on standard error describing the last error encountered during a call to a system or library function.

First (if s is not NULL and *s is not a null byte (‘�’)), the argument string s is printed, followed by a colon and a blank. Then an error message corresponding to the current value of errno and a new-line.

To be of most use, the argument string should include the name of the function that incurred the error.

The global error list sys_errlist[], which can be indexed by errno, can be used to obtain the error message without the newline. The largest message number provided in the table is sys_nerr-1. Be careful when directly accessing this list, because new error values may not have been added to sys_errlist[]. The use of sys_errlist[] is nowadays deprecated; use strerror(3) instead.

When a system call fails, it usually returns -1 and sets the variable errno to a value describing what went wrong. (These values can be found in <errno.h>.) Many library functions do likewise. The function perror() serves to translate this error code into human-readable form. Note that errno is undefined after a successful system call or library function call: this call may well change this variable, even though it succeeds, for example because it internally used some other library function that failed. Thus, if a failing call is not immediately followed by a call to perror(), the value of errno should be saved.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

perror()

Thread safetyMT-Safe race:stderr

STANDARDS

errno
perror()
C11, POSIX.1-2008.

sys_nerr
sys_errlist
BSD.

HISTORY

errno
perror()
POSIX.1-2001, C89, 4.3BSD.

sys_nerr
sys_errlist
Removed in glibc 2.32.

SEE ALSO

err(3), errno(3), error(3), strerror(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1564 - Linux cli command Term_ReadKeypm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Term_ReadKeypm and provides detailed information about the command Term_ReadKeypm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Term_ReadKeypm.

NAME 🖥️ Term_ReadKeypm 🖥️

A perl module for simple terminal control

SYNOPSIS

use Term::ReadKey; ReadMode 4; # Turn off controls keys while (not defined ($key = ReadKey(-1))) { # No key yet } print “Get key $key “; ReadMode 0; # Reset tty mode before exiting

DESCRIPTION

Term::ReadKey is a compiled perl module dedicated to providing simple control over terminal driver modes (cbreak, raw, cooked, etc.,) support for non-blocking reads, if the architecture allows, and some generalized handy functions for working with terminals. One of the main goals is to have the functions as portable as possible, so you can just plug in “use Term::ReadKey” on any architecture and have a good likelihood of it working.

Version 2.30.01: Added handling of arrows, page up/down, home/end, insert/delete keys under Win32. These keys emit xterm-compatible sequences. Works with Term::ReadLine::Perl.

ReadMode MODE [, Filehandle]
Takes an integer argument or a string synonym (case insensitive), which can currently be one of the following values: INT SYNONYM DESCRIPTION 0 restore Restore original settings. 1 normal Change to what is commonly the default mode, echo on, buffered, signals enabled, Xon/Xoff possibly enabled, and 8-bit mode possibly disabled. 2 noecho Same as 1, just with echo off. Nice for reading passwords. 3 cbreak Echo off, unbuffered, signals enabled, Xon/Xoff possibly enabled, and 8-bit mode possibly enabled. 4 raw Echo off, unbuffered, signals disabled, Xon/Xoff disabled, and 8-bit mode possibly disabled. 5 ultra-raw Echo off, unbuffered, signals disabled, Xon/Xoff disabled, 8-bit mode enabled if parity permits, and CR to CR/LF translation turned off. These functions are automatically applied to the STDIN handle if no other handle is supplied. Modes 0 and 5 have some special properties worth mentioning: not only will mode 0 restore original settings, but it cause the next ReadMode call to save a new set of default settings. Mode 5 is similar to mode 4, except no CR/LF translation is performed, and if possible, parity will be disabled (only if not being used by the terminal, however. It is no different from mode 4 under Windows.) If you just need to read a key at a time, then modes 3 or 4 are probably sufficient. Mode 4 is a tad more flexible, but needs a bit more work to control. If you use ReadMode 3, then you should install a SIGINT or END handler to reset the terminal (via ReadMode 0) if the user aborts the program via ^C. (For any mode, an END handler consisting of “ReadMode 0” is actually a good idea.) If you are executing another program that may be changing the terminal mode, you will either want to say ReadMode 1; # same as ReadMode normal system(someprogram); ReadMode 1; which resets the settings after the program has run, or: $somemode=1; ReadMode 0; # same as ReadMode restore system(someprogram); ReadMode 1; which records any changes the program may have made, before resetting the mode.

ReadKey MODE [, Filehandle]
Takes an integer argument, which can currently be one of the following values: 0 Perform a normal read using getc -1 Perform a non-blocked read >0 Perform a timed read If the filehandle is not supplied, it will default to STDIN. If there is nothing waiting in the buffer during a non-blocked read, then undef will be returned. In most situations, you will probably want to use ReadKey -1. NOTE that if the OS does not provide any known mechanism for non-blocking reads, then a ReadKey -1 can die with a fatal error. This will hopefully not be common. If MODE is greater then zero, then ReadKey will use it as a timeout value in seconds (fractional seconds are allowed), and won’t return undef until that time expires. NOTE, again, that some OS’s may not support this timeout behaviour. If MODE is less then zero, then this is treated as a timeout of zero, and thus will return immediately if no character is waiting. A MODE of zero, however, will act like a normal getc. NOTE, there are currently some limitations with this call under Windows. It may be possible that non-blocking reads will fail when reading repeating keys from more then one console.

ReadLine MODE [, Filehandle]
Takes an integer argument, which can currently be one of the following values: 0 Perform a normal read using scalar(<FileHandle>) -1 Perform a non-blocked read >0 Perform a timed read If there is nothing waiting in the buffer during a non-blocked read, then undef will be returned. NOTE, that if the OS does not provide any known mechanism for non-blocking reads, then a ReadLine 1 can die with a fatal error. This will hopefully not be common. NOTE that a non-blocking test is only performed for the first character in the line, not the entire line. This call will probably not do what you assume, especially with ReadMode MODE values higher then 1. For example, pressing Space and then Backspace would appear to leave you where you started, but any timeouts would now be suspended. This call is currently not available under Windows.

GetTerminalSize [Filehandle]
Returns either an empty array if this operation is unsupported, or a four element array containing: the width of the terminal in characters, the height of the terminal in character, the width in pixels, and the height in pixels. (The pixel size will only be valid in some environments.) NOTE, under Windows, this function must be called with an output filehandle, such as STDOUT, or a handle opened to CONOUT$.

SetTerminalSize WIDTH,HEIGHT,XPIX,YPIX [, Filehandle]
Return -1 on failure, 0 otherwise. NOTE that this terminal size is only for informative value, and changing the size via this mechanism will not change the size of the screen. For example, XTerm uses a call like this when it resizes the screen. If any of the new measurements vary from the old, the OS will probably send a SIGWINCH signal to anything reading that tty or pty. This call does not work under Windows.

GetSpeed [, Filehandle]
Returns either an empty array if the operation is unsupported, or a two value array containing the terminal in and out speeds, in decimal. E.g, an in speed of 9600 baud and an out speed of 4800 baud would be returned as (9600,4800). Note that currently the in and out speeds will always be identical in some OS’s. No speeds are reported under Windows.

GetControlChars [, Filehandle]
Returns an array containing key/value pairs suitable for a hash. The pairs consist of a key, the name of the control character/signal, and the value of that character, as a single character. This call does nothing under Windows. Each key will be an entry from the following list: DISCARD DSUSPEND EOF EOL EOL2 ERASE ERASEWORD INTERRUPT KILL MIN QUIT QUOTENEXT REPRINT START STATUS STOP SUSPEND SWITCH TIME Thus, the following will always return the current interrupt character, regardless of platform. %keys = GetControlChars; $int = $keys{INTERRUPT};

SetControlChars [, Filehandle]
Takes an array containing key/value pairs, as a hash will produce. The pairs should consist of a key that is the name of a legal control character/signal, and the value should be either a single character, or a number in the range 0-255. SetControlChars will die with a runtime error if an invalid character name is passed or there is an error changing the settings. The list of valid names is easily available via %cchars = GetControlChars(); @cnames = keys %cchars; This call does nothing under Windows.

AUTHOR

Kenneth Albanowski <[email protected]>

Currently maintained by Jonathan Stowe <[email protected]>

SUPPORT

The code is maintained at

https://github.com/jonathanstowe/TermReadKey

Please feel free to fork and suggest patches.

LICENSE

Prior to the 2.31 release the license statement was:

Copyright (C) 1994-1999 Kenneth Albanowski. 2001-2005 Jonathan Stowe and others Unlimited distribution and/or modification is allowed as long as this copyright notice remains intact.

And was only stated in the README file.

Because I believe the original author’s intent was to be more open than the other commonly used licenses I would like to leave that in place. However if you or your lawyers require something with some more words you can optionally choose to license this under the standard Perl license:

This module is free software; you can redistribute it and/or modify it under the terms of the Artistic License. For details, see the full text of the license in the file “Artistic” that should have been provided with the version of perl you are using. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1565 - Linux cli command XML_DOM_Elementpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_DOM_Elementpm and provides detailed information about the command XML_DOM_Elementpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_DOM_Elementpm.

NAME 🖥️ XML_DOM_Elementpm 🖥️

An XML element node in XML::DOM

DESCRIPTION

XML::DOM::Element extends XML::DOM::Node.

By far the vast majority of objects (apart from text) that authors encounter when traversing a document are Element nodes. Assume the following XML document:

<elementExample id=“demo”> <subelement1/> <subelement2><subsubelement/></subelement2> </elementExample>

When represented using DOM, the top node is an Element node for elementExample, which contains two child Element nodes, one for subelement1 and one for subelement2. subelement1 contains no child nodes.

Elements may have attributes associated with them; since the Element interface inherits from Node, the generic Node interface method getAttributes may be used to retrieve the set of all attributes for an element. There are methods on the Element interface to retrieve either an Attr object by name or an attribute value by name. In XML, where an attribute value may contain entity references, an Attr object should be retrieved to examine the possibly fairly complex sub-tree representing the attribute value. On the other hand, in HTML, where all attributes have simple string values, methods to directly access an attribute value can safely be used as a convenience.

METHODS

getTagName
The name of the element. For example, in: <elementExample id=“demo”> … </elementExample> tagName has the value elementExample. Note that this is case-preserving in XML, as are all of the operations of the DOM.

getAttribute (name)
Retrieves an attribute value by name. Return Value: The Attr value as a string, or the empty string if that attribute does not have a specified or default value.

setAttribute (name, value)
Adds a new attribute. If an attribute with that name is already present in the element, its value is changed to be that of the value parameter. This value is a simple string, it is not parsed as it is being set. So any markup (such as syntax to be recognized as an entity reference) is treated as literal text, and needs to be appropriately escaped by the implementation when it is written out. In order to assign an attribute value that contains entity references, the user must create an Attr node plus any Text and EntityReference nodes, build the appropriate subtree, and use setAttributeNode to assign it as the value of an attribute. DOMExceptions:

  • INVALID_CHARACTER_ERR Raised if the specified name contains an invalid character.

  • NO_MODIFICATION_ALLOWED_ERR Raised if this node is readonly.

removeAttribute (name)
Removes an attribute by name. If the removed attribute has a default value it is immediately replaced. DOMExceptions:

  • NO_MODIFICATION_ALLOWED_ERR Raised if this node is readonly.

getAttributeNode
Retrieves an Attr node by name. Return Value: The Attr node with the specified attribute name or undef if there is no such attribute.

setAttributeNode (attr)
Adds a new attribute. If an attribute with that name is already present in the element, it is replaced by the new one. Return Value: If the newAttr attribute replaces an existing attribute with the same name, the previously existing Attr node is returned, otherwise undef is returned. DOMExceptions:

  • WRONG_DOCUMENT_ERR Raised if newAttr was created from a different document than the one that created the element.

  • NO_MODIFICATION_ALLOWED_ERR Raised if this node is readonly.

  • INUSE_ATTRIBUTE_ERR Raised if newAttr is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.

removeAttributeNode (oldAttr)
Removes the specified attribute. If the removed Attr has a default value it is immediately replaced. If the Attr already is the default value, nothing happens and nothing is returned. Parameters: oldAttr The Attr node to remove from the attribute list. Return Value: The Attr node that was removed. DOMExceptions:

  • NO_MODIFICATION_ALLOWED_ERR Raised if this node is readonly.

  • NOT_FOUND_ERR Raised if oldAttr is not an attribute of the element.

Additional methods not in the DOM Spec

setTagName (newTagName)
Sets the tag name of the Element. Note that this method is not portable between DOM implementations. DOMExceptions:

  • INVALID_CHARACTER_ERR Raised if the specified name contains an invalid character.

check ($checker)
Uses the specified XML::Checker to validate the document. NOTE: an XML::Checker must be supplied. The checker can be created in different ways, e.g. when parsing a document with XML::DOM::ValParser, or with XML::DOM::Document::createChecker(). See XML::Checker for more info.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1566 - Linux cli command Regexp_Common_URI_prosperopm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_URI_prosperopm and provides detailed information about the command Regexp_Common_URI_prosperopm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_URI_prosperopm.

NAME 🖥️ Regexp_Common_URI_prosperopm 🖥️

  • Returns a pattern for prospero URIs.

SYNOPSIS

use Regexp::Common qw /URI/; while (<>) { /$RE{URI}{prospero}/ and print “Contains a prospero URI. “; }

DESCRIPTION

$RE{URI}{prospero}

Returns a pattern that matches prospero URIs, as defined by RFC 1738. prospero URIs have the form:

“prospero:” “//” host [ “:” port ] “/” path [ fieldspec ] *

Under {-keep}, the following are returned:

$1
The complete URI.

$2
The scheme.

$3
The hostname.

$4
The port, if given.

$5
The propero path.

$6
The field specifications, if given. There can be more field specifications; they will all be returned in $6.

REFERENCES

[RFC 1738]
Berners-Lee, Tim, Masinter, L., McCahill, M.: Uniform Resource Locators (URL). December 1994.

SEE ALSO

Regexp::Common::URI for other supported URIs.

AUTHOR

Abigail. ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1567 - Linux cli command IO_WrapTiepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_WrapTiepm and provides detailed information about the command IO_WrapTiepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_WrapTiepm.

NAME 🖥️ IO_WrapTiepm 🖥️

wrap tieable objects in IO::Handle interface

This is currently Alpha code, released for comments. Please give me your feedback!

SYNOPSIS

First of all, you’ll need tie(), so:

require 5.004;

Function interface (experimental). Use this with any existing class…

use IO::WrapTie; use FooHandle; ### implements TIEHANDLE interface ### Suppose we want a “FooHandle->new(&FOO_RDWR, 2)”. ### We can instead say… $FH = wraptie(FooHandle, &FOO_RDWR, 2); ### Now we can use… print $FH “Hello, “; ### traditional operator syntax… $FH->print(“world! “); ### …and OO syntax as well!

OO interface (preferred). You can inherit from the “Slave” in IO::WrapTie mixin to get a nifty new_tie() constructor…

#—————————— package FooHandle; ### a class which can TIEHANDLE use IO::WrapTie; @ISA = qw(IO::WrapTie::Slave); ### inherit new_tie() … #—————————— package main; $FH = FooHandle->new_tie(&FOO_RDWR, 2); ### $FH is an IO::WrapTie::Master print $FH “Hello, “; ### traditional operator syntax $FH->print(“world! “); ### OO syntax

See IO::Scalar as an example. It also shows you how to create classes which work both with and without 5.004.

DESCRIPTION

Suppose you have a class FooHandle, where…

  • FooHandle does not inherit from IO::Handle. That is, it performs file handle-like I/O, but to something other than an underlying file descriptor. Good examples are IO::Scalar (for printing to a string) and IO::Lines (for printing to an array of lines).

  • FooHandle implements the TIEHANDLE interface (see perltie). That is, it provides methods TIEHANDLE, GETC, PRINT, PRINTF, READ, and READLINE.

  • FooHandle implements the traditional OO interface of FileHandle and IO::Handle. i.e., it contains methods like getline, read, print, seek, tell, eof, etc.

Normally, users of your class would have two options:

  • Use only OO syntax, and forsake named I/O operators like print.

  • Use with tie, and forsake treating it as a first-class object (i.e., class-specific methods can only be invoked through the underlying object via tied… giving the object a “split personality”).

But now with IO::WrapTie, you can say:

$WT = wraptie(FooHandle, &FOO_RDWR, 2); $WT->print(“Hello, world “); ### OO syntax print $WT “Yes! “; ### Named operator syntax too! $WT->weird_stuff; ### Other methods!

And if you’re authoring a class like FooHandle, just have it inherit from IO::WrapTie::Slave and that first line becomes even prettier:

$WT = FooHandle->new_tie(&FOO_RDWR, 2);

The bottom line: now, almost any class can look and work exactly like an IO::Handle and be used both with OO and non-OO file handle syntax.

HOW IT ALL WORKS

The data structures

Consider this example code, using classes in this distribution:

use IO::Scalar; use IO::WrapTie; $WT = wraptie(IO::Scalar,\s); print $WT “Hello, “; $WT->print(“world! “);

In it, the wraptie function creates a data structure as follows:

* $WT is a blessed reference to a tied filehandle $WT glob; that glob is tied to the “Slave” object. | * You would do all your i/o with $WT directly. | | | ,—isa–> IO::WrapTie::Master >–isa–> IO::Handle V / .————-. | | | | * Perl i/o operators work on the tied object, | “Master” | invoking the C<TIEHANDLE> methods. | | * Method invocations are delegated to the tied | | slave. `————- | tied(*$WT) | .—isa–> IO::WrapTie::Slave V / .————-. | | | “Slave” | * Instance of FileHandle-like class which doesnt | | actually use file descriptors, like IO::Scalar. | IO::Scalar | * The slave can be any kind of object. | | * Must implement the C<TIEHANDLE> interface. `————-

NOTE: just as an IO::Handle is really just a blessed reference to a traditional file handle glob. So also, an IO::WrapTie::Master is really just a blessed reference to a file handle glob which has been tied to some “slave” class.

How “wraptie” works

  1. The call to function wraptie(SLAVECLASS, TIEARGS...) is passed onto IO::WrapTie::Master::new(). Note that class IO::WrapTie::Master is a subclass of IO::Handle.

  2. The IO::WrapTie::Master->new method creates a new IO::Handle object, re-blessed into class IO::WrapTie::Master. This object is the master, which will be returned from the constructor. At the same time…

  3. The new method also creates the slave: this is an instance of SLAVECLASS which is created by tying the master’s IO::Handle to SLAVECLASS via tie. This call to tie creates the slave in the following manner:

  4. Class SLAVECLASS is sent the message TIEHANDLE; it will usually delegate this to SLAVECLASS->new(TIEARGS), resulting in a new instance of SLAVECLASS being created and returned.

  5. Once both master and slave have been created, the master is returned to the caller.

How I/O operators work (on the master)

Consider using an i/o operator on the master:

print $WT “Hello, world! “;

Since the master $WT is really a blessed reference to a glob, the normal Perl I/O operators like print may be used on it. They will just operate on the symbol part of the glob.

Since the glob is tied to the slave, the slave’s PRINT method (part of the TIEHANDLE interface) will be automatically invoked.

If the slave is an IO::Scalar, that means “PRINT” in IO::Scalar will be invoked, and that method happens to delegate to the print method of the same class. So the real work is ultimately done by “print” in IO::Scalar.

How methods work (on the master)

Consider using a method on the master:

$WT->print(“Hello, world! “);

Since the master $WT is blessed into the class IO::WrapTie::Master, Perl first attempts to find a print method there. Failing that, Perl next attempts to find a print method in the super class, IO::Handle. It just so happens that there is such a method; that method merely invokes the print I/O operator on the self object… and for that, see above!

But let’s suppose we’re dealing with a method which isn’t part of IO::Handle… for example:

my $sref = $WT->sref;

In this case, the intuitive behavior is to have the master delegate the method invocation to the slave (now do you see where the designations come from?). This is indeed what happens: IO::WrapTie::Master contains an AUTOLOAD method which performs the delegation.

So: when sref can’t be found in IO::Handle, the AUTOLOAD method of IO::WrapTie::Master is invoked, and the standard behavior of delegating the method to the underlying slave (here, an IO::Scalar) is done.

Sometimes, to get this to work properly, you may need to create a subclass of IO::WrapTie::Master which is an effective master for your class, and do the delegation there.

NOTES

Why not simply use the object’s OO interface?

Because that means forsaking the use of named operators like print, and you may need to pass the object to a subroutine which will attempt to use those operators:

$O = FooHandle->new(&FOO_RDWR, 2); $O->print(“Hello, world “); ### OO syntax is okay, BUT…. sub nope { print $_[0] “Nope! " } X nope($O); ### ERROR!!! (not a glob ref)

Why not simply use tie()? Because (1) you have to use tied to invoke methods in the object’s public interface (yuck), and (2) you may need to pass the tied symbol to another subroutine which will attempt to treat it in an OO-way… and that will break it:

tie *T, FooHandle, &FOO_RDWR, 2; print T “Hello, world “; ### Operator is okay, BUT… tied(*T)->other_stuff; ### yuck! AND… sub nope { shift->print(“Nope! “) } X nope(\T); ### ERROR!!! (method “print” on unblessed ref)

Why a master and slave?

Why not simply write C<FooHandle> to inherit from L<IO::Handle?> I tried this, with an implementation similar to that of L<IO::Socket>. The problem is that I<the whole point is to use this with objects that dont have an underlying file/socket descriptor.>. Subclassing L<IO::Handle> will work fine for the OO stuff, and fine with named operators I<if> you C<tie>… but if you just attempt to say: $IO = FooHandle->new(&FOO_RDWR, 2); print $IO “Hello! “;

you get a warning from Perl like:

Filehandle GEN001 never opened

because it’s trying to do system-level I/O on an (unopened) file descriptor. To avoid this, you apparently have to tie the handle… which brings us right back to where we started! At least the IO::WrapTie mixin lets us say:

$IO = FooHandle->new_tie(&FOO_RDWR, 2); print $IO “Hello! “;

and so is not too bad. :-)

WARNINGS

Remember: this stuff is for doing FileHandle-like I/O on things without underlying file descriptors. If you have an underlying file descriptor, you’re better off just inheriting from IO::Handle.

Be aware that new_tie() always returns an instance of a kind of IO::WrapTie::Master… it does not return an instance of the I/O class you’re tying to!

Invoking some methods on the master object causes AUTOLOAD to delegate them to the slave object… so it looks like you’re manipulating a FooHandle object directly, but you’re not.

I have not explored all the ramifications of this use of tie. Here there be dragons.

AUTHOR

Eryq ([email protected]). President, ZeeGee Software Inc (http://www.zeegee.com).

CONTRIBUTORS

Dianne Skoll ([email protected]).

COPYRIGHT & LICENSE

Copyright (c) 1997 Erik (Eryq) Dorfman, ZeeGee Software, Inc. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1568 - Linux cli command Moose_Cookbook_Stylepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Stylepm and provides detailed information about the command Moose_Cookbook_Stylepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Stylepm.

NAME 🖥️ Moose_Cookbook_Stylepm 🖥️

Expanded into Moose::Manual::BestPractices, so go read that

VERSION

version 2.2207

DESCRIPTION

The style cookbook has been replaced by Moose::Manual::BestPractices. This POD document still exists for the benefit of anyone out there who might’ve linked to it in the past.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1569 - Linux cli command Moose_Meta_Attribute_Native_Trait_Stringpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Attribute_Native_Trait_Stringpm and provides detailed information about the command Moose_Meta_Attribute_Native_Trait_Stringpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Attribute_Native_Trait_Stringpm.

NAME 🖥️ Moose_Meta_Attribute_Native_Trait_Stringpm 🖥️

Helper trait for Str attributes

VERSION

version 2.2207

SYNOPSIS

package MyHomePage; use Moose; has text => ( traits => [String], is => rw, isa => Str, default => q{}, handles => { add_text => append, replace_text => replace, }, ); my $page = MyHomePage->new(); $page->add_text(“foo”); # same as $page->text($page->text . “foo”);

DESCRIPTION

This trait provides native delegation methods for strings.

DEFAULT TYPE

If you don’t provide an isa value for your attribute, it will default to Str.

PROVIDED METHODS

  • inc Increments the value stored in this slot using the magical string autoincrement operator. Note that Perl doesn’t provide analogous behavior in --, so dec is not available. This method returns the new value. This method does not accept any arguments.

  • append($string) Appends to the string, like .=, and returns the new value. This method requires a single argument.

  • prepend($string) Prepends to the string and returns the new value. This method requires a single argument.

  • replace($pattern, $replacement) Performs a regexp substitution (“s” in perlop). There is no way to provide the g flag, but code references will be accepted for the replacement, causing the regex to be modified with a single e. /smxi can be applied using the qr operator. This method returns the new value. This method requires two arguments.

  • match($pattern) Runs the regex against the string and returns the matching value(s). This method requires a single argument.

  • chop Just like “chop” in perlfunc. This method returns the chopped character. This method does not accept any arguments.

  • chomp Just like “chomp” in perlfunc. This method returns the number of characters removed. This method does not accept any arguments.

  • clear Sets the string to the empty string (not the value passed to default). This method does not have a defined return value. This method does not accept any arguments.

  • length Just like “length” in perlfunc, returns the length of the string.

  • substr This acts just like “substr” in perlfunc. When called as a writer, it returns the substring that was replaced, just like the Perl builtin. This method requires at least one argument, and accepts no more than three.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1570 - Linux cli command Image_ExifTool_CanonCustompm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_CanonCustompm and provides detailed information about the command Image_ExifTool_CanonCustompm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_CanonCustompm.

NAME 🖥️ Image_ExifTool_CanonCustompm 🖥️

Read and Write Canon custom functions

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

The Canon custom functions meta information is very specific to the camera model, and is found in both the EXIF maker notes and in the Canon RAW files. This module contains the definitions necessary for Image::ExifTool to read this information.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html>

ACKNOWLEDGEMENTS

Thanks to Christian Koller for his work in decoding the 20D custom functions, Rainer Honle for decoding the 5D custom functions and David Pitcher for adding a few undocumented 1DmkIII settings.

SEE ALSO

“Canon Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1571 - Linux cli command svc_getreqset

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command svc_getreqset and provides detailed information about the command svc_getreqset, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the svc_getreqset.

NAME 🖥️ svc_getreqset 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1572 - Linux cli command gnu_dev_major

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gnu_dev_major and provides detailed information about the command gnu_dev_major, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gnu_dev_major.

NAME 🖥️ gnu_dev_major 🖥️

manage a device number

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/sysmacros.h>
dev_t makedev(unsigned int maj, unsigned int min);
unsigned int major(dev_t dev);
unsigned int minor(dev_t dev);

DESCRIPTION

A device ID consists of two parts: a major ID, identifying the class of the device, and a minor ID, identifying a specific instance of a device in that class. A device ID is represented using the type dev_t.

Given major and minor device IDs, makedev() combines these to produce a device ID, returned as the function result. This device ID can be given to mknod(2), for example.

The major() and minor() functions perform the converse task: given a device ID, they return, respectively, the major and minor components. These macros can be useful to, for example, decompose the device IDs in the structure returned by stat(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

makedev(), major(), minor()

Thread safetyMT-Safe

VERSIONS

The BSDs expose the definitions for these macros via <sys/types.h>.

STANDARDS

None.

HISTORY

BSD, HP-UX, Solaris, AIX, Irix.

These interfaces are defined as macros. Since glibc 2.3.3, they have been aliases for three GNU-specific functions: gnu_dev_makedev(), gnu_dev_major(), and gnu_dev_minor(). The latter names are exported, but the traditional names are more portable.

Depending on the version, glibc also exposes definitions for these macros from <sys/types.h> if suitable feature test macros are defined. However, this behavior was deprecated in glibc 2.25, and since glibc 2.28, <sys/types.h> no longer provides these definitions.

SEE ALSO

mknod(2), stat(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1573 - Linux cli command getaliasent_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getaliasent_r and provides detailed information about the command getaliasent_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getaliasent_r.

NAME 🖥️ getaliasent_r 🖥️

read an alias entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <aliases.h>
void setaliasent(void);
void endaliasent(void);
struct aliasent *getaliasent(void);
int getaliasent_r(struct aliasent *restrict result,
 char buffer[restrict .buflen], size_t buflen,
 struct aliasent **restrict res);
struct aliasent *getaliasbyname(const char *name);
int getaliasbyname_r(const char *restrict name,
 struct aliasent *restrict result,
 char buffer[restrict .buflen], size_t buflen,
 struct aliasent **restrict res);

DESCRIPTION

One of the databases available with the Name Service Switch (NSS) is the aliases database, that contains mail aliases. (To find out which databases are supported, try getent –help.) Six functions are provided to access the aliases database.

The getaliasent() function returns a pointer to a structure containing the group information from the aliases database. The first time it is called it returns the first entry; thereafter, it returns successive entries.

The setaliasent() function rewinds the file pointer to the beginning of the aliases database.

The endaliasent() function closes the aliases database.

getaliasent_r() is the reentrant version of the previous function. The requested structure is stored via the first argument but the programmer needs to fill the other arguments also. Not providing enough space causes the function to fail.

The function getaliasbyname() takes the name argument and searches the aliases database. The entry is returned as a pointer to a struct aliasent.

getaliasbyname_r() is the reentrant version of the previous function. The requested structure is stored via the second argument but the programmer needs to fill the other arguments also. Not providing enough space causes the function to fail.

The struct aliasent is defined in <aliases.h>:

struct aliasent {
    char    *alias_name;             /* alias name */
    size_t   alias_members_len;
    char   **alias_members;          /* alias name list */
    int      alias_local;
};

RETURN VALUE

The functions getaliasent_r() and getaliasbyname_r() return a nonzero value on error.

FILES

The default alias database is the file /etc/aliases. This can be changed in the /etc/nsswitch.conf file.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setaliasent(), endaliasent(), getaliasent_r(), getaliasbyname_r()

Thread safetyMT-Safe locale

getaliasent(), getaliasbyname()

Thread safetyMT-Unsafe

STANDARDS

GNU.

HISTORY

The NeXT system has similar routines:

#include <aliasdb.h>
void alias_setent(void);
void alias_endent(void);
alias_ent *alias_getent(void);
alias_ent *alias_getbyname(char *name);

EXAMPLES

The following example compiles with gcc example.c -o example. It will dump all names in the alias database.

#include <aliases.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    struct aliasent *al;
    setaliasent();
    for (;;) {
        al = getaliasent();
        if (al == NULL)
            break;
        printf("Name: %s

“, al->alias_name); } if (errno) { perror(“reading alias”); exit(EXIT_FAILURE); } endaliasent(); exit(EXIT_SUCCESS); }

SEE ALSO

getgrent(3), getpwent(3), getspent(3), aliases(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1574 - Linux cli command Spreadsheet_ParseExcel_FmtUnicodepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_ParseExcel_FmtUnicodepm and provides detailed information about the command Spreadsheet_ParseExcel_FmtUnicodepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_ParseExcel_FmtUnicodepm.

NAME 🖥️ Spreadsheet_ParseExcel_FmtUnicodepm 🖥️

A class for Cell formats.

SYNOPSIS

See the documentation for Spreadsheet::ParseExcel.

DESCRIPTION

This module is used in conjunction with Spreadsheet::ParseExcel. See the documentation for Spreadsheet::ParseExcel.

AUTHOR

Current maintainer 0.60+: Douglas Wilson [email protected]

Maintainer 0.40-0.59: John McNamara [email protected]

Maintainer 0.27-0.33: Gabor Szabo [email protected]

Original author: Kawai Takanori [email protected]

COPYRIGHT

Copyright (c) 2014 Douglas Wilson

Copyright (c) 2009-2013 John McNamara

Copyright (c) 2006-2008 Gabor Szabo

Copyright (c) 2000-2006 Kawai Takanori

All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1575 - Linux cli command XtTranslateCoords

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtTranslateCoords and provides detailed information about the command XtTranslateCoords, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtTranslateCoords.

NAME 🖥️ XtTranslateCoords 🖥️

translate widget coordinates

SYNTAX

#include <X11/Intrinsic.h>

void XtTranslateCoords(Widget w, Position x, Position y, Position *rootx_return, Position *rooty_return);

ARGUMENTS

rootx_return

rooty_return
Returns the root-relative x and y coordinates.

  1. Specify the widget-relative x and y coordinates.

  2. Specifies the widget.

DESCRIPTION

While XtTranslateCoords is similar to the Xlib XTranslateCoordinates function, it does not generate a server request because all the required information already is in the widget’s data structures.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1576 - Linux cli command XShmGetImage

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XShmGetImage and provides detailed information about the command XShmGetImage, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XShmGetImage.

NAME 🖥️ XShmGetImage 🖥️

X Shared Memory extension functions

SYNTAX

#include <X11/Xlib.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
Bool	XShmQueryExtension(
	Display *display);
Bool XShmQueryVersion(
	Display *display;
	int *major, *minor;
	Bool *pixmaps);
int XShmPixmapFormat(
	Display *display);
Bool XShmAttach(
	Display *display;
	XShmSegmentInfo *shminfo);
Bool XShmDetach(
	Display *display;
	XShmSegmentInfo *shminfo);

XImage *XShmCreateImage (
	Display *display;
	Visual *visual;
	unsigned int depth;
	int format;
	char *data;
	XShmSegmentInfo *shminfo;
	unsigned int width, height);
Bool XShmPutImage(
	Display *display;
	Drawable d;
	GC gc;
	XImage *image;
	int src_x, src_y, dest_x, dest_y;
	unsigned int width, height;
	bool send_event);
Bool XShmGetImage (
	Display *display;
	Drawable d;
	XImage *image;
	int x, y;
	unsigned long plane_mask);
Pixmap XShmCreatePixmap(
        Display *display;
        Drawable d;
        char *data;
	XShmSegmentInfo *shminfo;
	unsigned int width, height, depth);
Status XShmGetEventBase(
	Display *display);

STRUCTURES

Events:
typedef struct {
    int type;               /* of event */
    unsigned long serial;   /* # of last request processed by server*/
    Bool send_event;        /* true if this came from a SendEvent request*/
    Display *display;       /* Display the event was read from */
    Drawable drawable;      /* drawable of request */
    int major_code;         /* ShmReqCode */
    int minor_code;         /* X_ShmPutImage */
    ShmSeg shmseg;          /* the ShmSeg used in the request*/
    unsigned long offset;   /* the offset into ShmSeg used in the request*/
} XShmCompletionEvent;
a structure of type XShmSegmentInfo :

typedef struct {
    ShmSeg shmseg;      /* resource id */
    int shmid;          /* kernel id */
    char *shmaddr;      /* address in client */
    Bool readOnly;      /* how the server should attach it */
} XShmSegmentInfo;

DESCRIPTION

* XShmQueryExtension * checks to see if the shared memory extensions are available for the specified display.

* XShmQueryVersion * returns the version numbers of the extension implementation. Shared memory pixmaps are supported if the pixmaps argument returns true.

* XShmAttach * tells the server to attach to your shared memory segment. If all goes well, you will get a non-zero status, back and your XImage is ready for use.

* XShmDetach * tells the server to detach from your shared memory segment.

* XShmPutImage * combines an image in memory with a shape of the specified drawable. If XYBitmap format is used, the depth must be one, or a ``BadMatch’’ error results. The foreground pixel in the GC defines the source for the one bits in the image, and the background pixel defines the source for the zero bits. For XYPixmap and ZPixmap, the depth must match the depth of the drawable, or a ``BadMatch’’ error results.

* XShmGetImage * reads image data into a shared memory XImage where display is the display of interest, drawable is the source drawable, image is the destination XImage, x and y are offsets within the drawable, and plane_mask defines which planes are to be read.

* XShmCreateImage * allocates the memory needed for an XImage structure for the specified display but does not allocate space for the image itself.

* XShmPixmapFormat * gets the format for the server. If your application can deal with the server pixmap data format, a shared memory segment and shminfo structure are created.

* XShmCreatePixmap * points to a pixmap which you can manipulate in all of the usual ways, with the added bonus of being able to edit its contents directly through the shared memory segment.

* XShmGetEventBase * gets the completion event value.

SEE ALSO

MIT-SHM - The MIT Shared Memory Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1577 - Linux cli command zip_file_extra_fields_count

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_file_extra_fields_count and provides detailed information about the command zip_file_extra_fields_count, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_file_extra_fields_count.

libzip (-lzip)

The

function counts the extra fields for the file at position

in the zip archive.

The following

are supported:

Count extra fields from the archive’s central directory.

Count extra fields from the local file headers.

Count the original unchanged extra fields, ignoring any changes made.

The

function counts the extra fields with ID (two-byte signature)

The other arguments are the same as for

Extra fields that are the same in the central directory and the local file header are merged into one. Therefore, the counts with

and

do not need to add up to the same value as when given

at the same time.

Upon successful completion, the requested number of extra fields is returned. Otherwise, -1 is returned and the error code in

is set to indicate the error.

and

fail if:

is not a valid file index in

and

were added in libzip 0.11.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1578 - Linux cli command fwrite_unlocked

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fwrite_unlocked and provides detailed information about the command fwrite_unlocked, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fwrite_unlocked.

NAME 🖥️ fwrite_unlocked 🖥️

nonlocking stdio functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int getc_unlocked(FILE *stream);
int getchar_unlocked(void);
int putc_unlocked(int c, FILE *stream);
int putchar_unlocked(int c);
void clearerr_unlocked(FILE *stream);
int feof_unlocked(FILE *stream);
int ferror_unlocked(FILE *stream);
int fileno_unlocked(FILE *stream);
int fflush_unlocked(FILE *_Nullable stream);
int fgetc_unlocked(FILE *stream);
int fputc_unlocked(int c, FILE *stream);
size_t fread_unlocked(void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
size_t fwrite_unlocked(const void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
char *fgets_unlocked(char s[restrict .n], int n",FILE*restrict"stream);
int fputs_unlocked(const char *restrict s, FILE *restrict stream);
#include <wchar.h>
wint_t getwc_unlocked(FILE *stream);
wint_t getwchar_unlocked(void);
wint_t fgetwc_unlocked(FILE *stream);
wint_t fputwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwchar_unlocked(wchar_t wc);
wchar_t *fgetws_unlocked(wchar_t ws[restrict .n], int n,
 FILE *restrict stream);
int fputws_unlocked(const wchar_t *restrict ws,
 FILE *restrict stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getc_unlocked(), getchar_unlocked(), putc_unlocked(), putchar_unlocked():

    /* glibc >= 2.24: */ _POSIX_C_SOURCE >= 199309L
        || /* glibc <= 2.23: */ _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

clearerr_unlocked(), feof_unlocked(), ferror_unlocked(), fileno_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), getwchar_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwchar_unlocked(), fgetws_unlocked(), fputws_unlocked():

    _GNU_SOURCE

DESCRIPTION

Each of these functions has the same behavior as its counterpart without the “_unlocked” suffix, except that they do not use locking (they do not set locks themselves, and do not test for the presence of locks set by others) and hence are thread-unsafe. See flockfile(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getc_unlocked(), putc_unlocked(), clearerr_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked(), fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwc_unlocked(), fgetws_unlocked(), fputws_unlocked()

Thread safety

MT-Safe race:stream

getchar_unlocked(), getwchar_unlocked()

Thread safety

MT-Unsafe race:stdin

putchar_unlocked(), putwchar_unlocked()

Thread safety

MT-Unsafe race:stdout

feof_unlocked(), ferror_unlocked(), fileno_unlocked()

Thread safetyMT-Safe

STANDARDS

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2008.

Others:
None.

HISTORY

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2001.

SEE ALSO

flockfile(3), stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1579 - Linux cli command Regexp_Common_profanitypm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_profanitypm and provides detailed information about the command Regexp_Common_profanitypm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_profanitypm.

NAME 🖥️ Regexp_Common_profanitypm 🖥️

  • provide regexes for profanity

SYNOPSIS

use Regexp::Common qw /profanity/; while (<>) { /$RE{profanity}/ and print “Contains profanity “; }

DESCRIPTION

Please consult the manual of Regexp::Common for a general description of the works of this interface.

Do not use this module directly, but load it via Regexp::Common.

$RE{profanity}

Returns a pattern matching words – such as Carlin’s “big seven” – that are most likely to give offense. Note that correct anatomical terms are deliberately not included in the list.

Under -keep (see Regexp::Common):

$1
captures the entire word

“$RE{profanity}{contextual}”

Returns a pattern matching words that are likely to give offense when used in specific contexts, but which also have genuinely non-offensive meanings.

Under -keep (see Regexp::Common):

$1
captures the entire word

SEE ALSO

Regexp::Common for a general description of how to use this interface.

AUTHOR

Damian Conway ([email protected])

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

For a start, there are many common regexes missing. Send them in to [email protected].

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1580 - Linux cli command Tk_Checkbuttonpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Checkbuttonpm and provides detailed information about the command Tk_Checkbuttonpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Checkbuttonpm.

NAME 🖥️ Tk_Checkbuttonpm 🖥️

Create and manipulate Checkbutton widgets

SYNOPSIS

$checkbutton = $parent->Checkbutton(?options?);

STANDARD OPTIONS

-activebackground -activeforeground -anchor -background -bitmap -borderwidth -compound -cursor -disabledforeground -font -foreground -highlightbackground -highlightcolor -highlightthickness -image -justify -padx -pady -relief -takefocus -text -textvariable -underline -wraplength

See Tk::options for details of the standard options.

WIDGET-SPECIFIC OPTIONS

Name: command

Class: Command

Switch: -command

Specifies a perl/Tk callback to associate with the button. This command is typically invoked when mouse button 1 is released over the button window. The button’s global variable (-variable option) will be updated before the command is invoked.

Name: height

Class: Height

Switch: -height

Specifies a desired height for the button. If an image or bitmap is being displayed in the button then the value is in screen units (i.e. any of the forms acceptable to Tk_GetPixels); for text it is in lines of text. If this option isn’t specified, the button’s desired height is computed from the size of the image or bitmap or text being displayed in it.

Name: indicatorOn

Class: IndicatorOn

Switch: -indicatoron

Specifies whether or not the indicator should be drawn. Must be a proper boolean value. If false, the relief option is ignored and the widget’s relief is always sunken if the widget is selected and raised otherwise.

Command-Line Name: -offrelief

Database Name: offRelief

Database Class: OffRelief

Specifies the relief for the checkbutton when the indicator is not drawn and the checkbutton is off. The default value is raised. By setting this option to flat and setting -indicatoron false -overrelief raised, the effect is achieved of having a flat button that raises on mouse-over and which is depressed when activated. This is the behavior typically exhibited by the Bold, Italic, and Underline checkbuttons on the toolbar of a word-processor, for example.

Name: offValue

Class: Value

Switch: -offvalue

Specifies value to store in the button’s associated variable whenever this button is deselected. Defaults to ``0’'.

Name: onValue

Class: Value

Switch: -onvalue

Specifies value to store in the button’s associated variable whenever this button is selected. Defaults to ``1’'.

Command-Line Name: -overrelief

Database Name: overRelief

Database Class: OverRelief

Specifies an alternative relief for the button, to be used when the mouse cursor is over the widget. This option can be used to make toolbar buttons, by configuring -relief flat -overrelief raised. If the value of this option is the empty string, then no alternative relief is used when the mouse cursor is over the button. The empty string is the default value.

Name: selectColor

Class: Background

Switch: -selectcolor

Specifies a background color to use when the button is selected. If indicatorOn is true then the color applies to the indicator. Under Windows, this color is used as the background for the indicator regardless of the select state. If indicatorOn is false, this color is used as the background for the entire widget, in place of background or activeBackground, whenever the widget is selected. If specified as an empty string then no special color is used for displaying when the widget is selected.

Name: selectImage

Class: SelectImage

Switch: -selectimage

Specifies an image to display (in place of the image option) when the checkbutton is selected. This option is ignored unless the image option has been specified.

Name: state

Class: State

Switch: -state

Specifies one of three states for the checkbutton: normal, active, or disabled. In normal state the checkbutton is displayed using the foreground and background options. The active state is typically used when the pointer is over the checkbutton. In active state the checkbutton is displayed using the activeForeground and activeBackground options. Disabled state means that the checkbutton should be insensitive: the default bindings will refuse to activate the widget and will ignore mouse button presses. In this state the disabledForeground and background options determine how the checkbutton is displayed.

Name: variable

Class: Variable

Switch: -variable

Specifies reference to a variable to set to indicate whether or not this button is selected. Defaults to \$widget->{Value} member of the widget’s hash. In general perl variables are undef unless specifically initialized which will not match either default -onvalue or default -offvalue.

Name: width

Class: Width

Switch: -width

Specifies a desired width for the button. If an image or bitmap is being displayed in the button then the value is in screen units (i.e. any of the forms acceptable to Tk_GetPixels); for text it is in characters. If this option isn’t specified, the button’s desired width is computed from the size of the image or bitmap or text being displayed in it.

DESCRIPTION

The Checkbutton method creates a new window (given by the $widget argument) and makes it into a checkbutton widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the checkbutton such as its colors, font, text, and initial relief. The checkbutton command returns its $widget argument. At the time this command is invoked, there must not exist a window named $widget, but $widget’s parent must exist.

A checkbutton is a widget that displays a textual string, bitmap or image and a square called an indicator. If text is displayed, it must all be in a single font, but it can occupy multiple lines on the screen (if it contains newlines or if wrapping occurs because of the wrapLength option) and one of the characters may optionally be underlined using the underline option. A checkbutton has all of the behavior of a simple button, including the following: it can display itself in either of three different ways, according to the state option; it can be made to appear raised, sunken, or flat; it can be made to flash; and it invokes a perl/Tk callback whenever mouse button 1 is clicked over the checkbutton.

In addition, checkbuttons can be selected. If a checkbutton is selected then the indicator is normally drawn with a selected appearance, and a Tcl variable associated with the checkbutton is set to a particular value (normally 1). Under Unix, the indicator is drawn with a sunken relief and a special color. Under Windows, the indicator is drawn with a check mark inside. If the checkbutton is not selected, then the indicator is drawn with a deselected appearance, and the associated variable is set to a different value (typically 0). Under Unix, the indicator is drawn with a raised relief and no special color. Under Windows, the indicator is drawn without a check mark inside. By default, the name of the variable associated with a checkbutton is the same as the name used to create the checkbutton. The variable name, and the ``on’’ and ``off’’ values stored in it, may be modified with options on the command line or in the option database. Configuration options may also be used to modify the way the indicator is displayed (or whether it is displayed at all). By default a checkbutton is configured to select and deselect itself on alternate button clicks. In addition, each checkbutton monitors its associated variable and automatically selects and deselects itself when the variables value changes to and from the button’s ``on’’ value.

WIDGET METHODS

The Checkbutton method creates a widget object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class.

The following additional methods are available for checkbutton widgets:

$checkbutton->deselect
Deselects the checkbutton and sets the associated variable to its ``off’’ value.

$checkbutton->flash
Flashes the checkbutton. This is accomplished by redisplaying the checkbutton several times, alternating between active and normal colors. At the end of the flash the checkbutton is left in the same normal/active state as when the command was invoked. This command is ignored if the checkbutton’s state is disabled.

$checkbutton->invoke
Does just what would have happened if the user invoked the checkbutton with the mouse: toggle the selection state of the button and invoke the perl/Tk callback associated with the checkbutton, if there is one. The return value is the return value from the perl/Tk callback, or an empty string if there is no command associated with the checkbutton. This command is ignored if the checkbutton’s state is disabled.

$checkbutton->select
Selects the checkbutton and sets the associated variable to its ``on’’ value.

$checkbutton->toggle
Toggles the selection state of the button, redisplaying it and modifying its associated variable to reflect the new state.

BINDINGS

Tk automatically creates class bindings for checkbuttons that give them the following default behavior:

[1]
On Unix systems, a checkbutton activates whenever the mouse passes over it and deactivates whenever the mouse leaves the checkbutton. On Mac and Windows systems, when mouse button 1 is pressed over a checkbutton, the button activates whenever the mouse pointer is inside the button, and deactivates whenever the mouse pointer leaves the button.

[2]
When mouse button 1 is pressed over a checkbutton, it is invoked (its selection state toggles and the command associated with the button is invoked, if there is one).

[3]
When a checkbutton has the input focus, the space key causes the checkbutton to be invoked. Under Windows, there are additional key bindings; plus (+) and equal (=) select the button, and minus (-) deselects the button. If the checkbutton’s state is disabled then none of the above actions occur: the checkbutton is completely non-responsive. The behavior of checkbuttons can be changed by defining new bindings for individual widgets or by redefining the class bindings.

KEYWORDS

checkbutton, widget

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1581 - Linux cli command XtUngrabKey

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtUngrabKey and provides detailed information about the command XtUngrabKey, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtUngrabKey.

NAME 🖥️ XtUngrabKey 🖥️

manage grabs

SYNTAX

#include <X11/Intrinsic.h>

void XtGrabKey(Widget widget, KeyCode keycode, Modifiers modifiers, Boolean owner_events, int pointer_mode, int keyboard_mode);

void XtUngrabKey(Widget widget, KeyCode keycode, Modifiers modifiers);

int XtGrabKeyboard(Widget widget, Boolean owner_events, int pointer_mode, int keyboard_mode, Time time);

void XtUngrabKeyboard(Widget widget, Time time);

void XtGrabButton(Widget widget, int button, Modifiers modifiers, Boolean owner_events, unsigned int event_mask, int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor);

void XtUngrabButton(Widget widget, unsigned button, Modifiers modifiers);

int XtGrabPointer(Widget widget, Boolean owner_events, unsigned int event_mask, int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor, Time time);

void XtUngrabPointer(Widget widget, Time time);

ARGUMENTS

widget
Specifies the widget in whose window the grab will occur. Must be of class Core or a subclass thereof.

keycode

modifiers

owner_events

pointer_mode

keyboard_mode

time

button

confine_to

cursor
Specifies arguments to the associated Xlib function call.

DESCRIPTION

XtGrabKey calls XGrabKey specifying the widget’s window as the grab window if the widget is realized. The remaining arguments are exactly as for XGrabKey. If the widget is not realized, or is later unrealized, the call to XGrabKey will be performed (again) when the widget is realized and its window becomes mapped. In the future, if XtDispatchEvent is called with a KeyPress event matching the specified keycode and modifiers (which may be AnyKey or AnyModifier, respectively) for the widget’s window, the Intrinsics will call XtUngrabKeyboard with the timestamp from the KeyPress event if either of the following conditions is true:

  • There is a modal cascade and the widget is not in the active subset of the cascade and the keyboard was not previously grabbed, or

  • XFilterEvent returns True.

XtUngrabKey calls XUngrabKey specifying the widget’s window as the ungrab window if the widget is realized. The remaining arguments are exactly as for XUngrabKey. If the widget is not realized, XtUngrabKey removes a deferred XtGrabKey request, if any, for the specified widget, keycode, and modifiers.

If the specified widget is realized XtGrabKeyboard calls XGrabKeyboard specifying the widget’s window as the grab window. The remaining arguments and return value are exactly as for XGrabKeyboard. If the widget is not realized, XtGrabKeyboard immediately returns GrabNotViewable. No future ungrab is implied by XtGrabKeyboard.

XtUngrabKeyboard calls XUngrabKeyboard with the specified time.

XtGrabButton calls XGrabButton specifying the widget’s window as the grab window if the widget is realized. The remaining arguments are exactly as for XGrabButton. If the widget is not realized, or is later unrealized, the call to XGrabButton will be performed (again) when the widget is realized and its window becomes mapped. In the future, if XtDispatchEvent is called with a ButtonPress event matching the specified button and modifiers (which may be AnyButton or AnyModifier, respectively) for the widget’s window, the Intrinsics will call XtUngrabPointer with the timestamp from the ButtonPress event if either of the following conditions is true:

  • There is a modal cascade and the widget is not in the active subset of the cascade and the pointer was not previously grabbed, or

  • XFilterEvent returns True.

XtUngrabButton calls XUngrabButton specifying the widget’s window as the ungrab window if the widget is realized. The remaining arguments are exactly as for XUngrabButton. If the widget is not realized, XtUngrabButton removes a deferred XtGrabButton request, if any, for the specified widget, button, and modifiers.

XtGrabPointer calls XGrabPointer specifying the widget’s window as the grab window. The remaining arguments and return value are exactly as for XGrabPointer. If the widget is not realized, XtGrabPointer immediately returns GrabNotViewable. No future ungrab is implied by XtGrabPointer.

XtUngrabPointer calls XUngrabPointer with the specified time.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1582 - Linux cli command IO_AtomicFilepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_AtomicFilepm and provides detailed information about the command IO_AtomicFilepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_AtomicFilepm.

NAME 🖥️ IO_AtomicFilepm 🖥️

write a file which is updated atomically

SYNOPSIS

use strict; use warnings; use feature say; use IO::AtomicFile; # Write a temp file, and have it install itself when closed: my $fh = IO::AtomicFile->open(“bar.dat”, “w”); $fh->say(“Hello!”); $fh->close || die “couldnt install atomic file: $!”; # Write a temp file, but delete it before it gets installed: my $fh = IO::AtomicFile->open(“bar.dat”, “w”); $fh->say(“Hello!”); $fh->delete; # Write a temp file, but neither install it nor delete it: my $fh = IO::AtomicFile->open(“bar.dat”, “w”); $fh->say(“Hello!”); $fh->detach;

DESCRIPTION

This module is intended for people who need to update files reliably in the face of unexpected program termination.

For example, you generally don’t want to be halfway in the middle of writing /etc/passwd and have your program terminate! Even the act of writing a single scalar to a filehandle is not atomic.

But this module gives you true atomic updates, via rename. When you open a file /foo/bar.dat via this module, you are actually opening a temporary file /foo/bar.dat..TMP, and writing your output there. The act of closing this file (either explicitly via close, or implicitly via the destruction of the object) will cause rename to be called… therefore, from the point of view of the outside world, the file’s contents are updated in a single time quantum.

To ensure that problems do not go undetected, the close method done by the destructor will raise a fatal exception if the rename fails. The explicit close just returns undef.

You can also decide at any point to trash the file you’ve been building.

METHODS

IO::AtomicFile inherits all methods from IO::File and implements the following new ones.

close

$fh->close();

This method calls its parent “close” in IO::File and then renames its temporary file as the original file name.

delete

$fh->delete();

This method calls its parent “close” in IO::File and then deletes the temporary file.

detach

$fh->detach();

This method calls its parent “close” in IO::File. Unlike “delete” in IO::AtomicFile it does not then delete the temporary file.

AUTHOR

Eryq ([email protected]). President, ZeeGee Software Inc (http://www.zeegee.com).

CONTRIBUTORS

Dianne Skoll ([email protected]).

COPYRIGHT & LICENSE

Copyright (c) 1997 Erik (Eryq) Dorfman, ZeeGee Software, Inc. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1583 - Linux cli command pcap_datalink_name_to_valpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_datalink_name_to_valpcap and provides detailed information about the command pcap_datalink_name_to_valpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_datalink_name_to_valpcap.

NAME 🖥️ pcap_datalink_name_to_valpcap 🖥️

get the link-layer header type value corresponding to a header type name

SYNOPSIS

#include <pcap/pcap.h>
int pcap_datalink_name_to_val(const char *name);

DESCRIPTION

pcap_datalink_name_to_val() translates a link-layer header type name, which is a DLT_ name with the DLT_ removed, to the corresponding link-layer header type value. The translation is case-insensitive.

RETURN VALUE

pcap_datalink_name_to_val() returns the type value on success and PCAP_ERROR if the name is not a known type name.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1584 - Linux cli command pthread_attr_getsigmask_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_attr_getsigmask_np and provides detailed information about the command pthread_attr_getsigmask_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_attr_getsigmask_np.

NAME 🖥️ pthread_attr_getsigmask_np 🖥️

set/get signal mask attribute in thread attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <pthread.h>
int pthread_attr_setsigmask_np(pthread_attr_t *attr,
 const sigset_t *sigmask);
int pthread_attr_getsigmask_np(const pthread_attr_t *attr,
 sigset_t *sigmask);

DESCRIPTION

The pthread_attr_setsigmask_np() function sets the signal mask attribute of the thread attributes object referred to by attr to the value specified in *sigmask. If sigmask is specified as NULL, then any existing signal mask attribute in attr is unset.

The pthread_attr_getsigmask_np() function returns the signal mask attribute of the thread attributes object referred to by attr in the buffer pointed to by sigmask. If the signal mask attribute is currently unset, then this function returns the special value PTHREAD_ATTR_NO_SIGMASK_NP as its result.

RETURN VALUE

The pthread_attr_setsigmask_np() function returns 0 on success, or a nonzero error number on failure.

the pthread_attr_getsigmask_np() function returns either 0 or PTHREAD_ATTR_NO_SIGMASK_NP. When 0 is returned, the signal mask attribute is returned via sigmask. A return value of PTHREAD_ATTR_NO_SIGMASK_NP indicates that the signal mask attribute is not set in attr.

On error, these functions return a positive error number.

ERRORS

ENOMEM
(pthread_attr_setsigmask_np()) Could not allocate memory.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_attr_setsigmask_np(), pthread_attr_getsigmask_np()

Thread safetyMT-Safe

STANDARDS

GNU; hence the suffix “_np” (nonportable) in the names.

HISTORY

glibc 2.32.

NOTES

The signal mask attribute determines the signal mask that will be assigned to a thread created using the thread attributes object attr. If this attribute is not set, then a thread created using attr will inherit a copy of the creating thread’s signal mask.

For more details on signal masks, see sigprocmask(2). For a description of a set of macros that can be used to manipulate and inspect signal sets, see sigsetops(3).

In the absence of pthread_attr_setsigmask_np() it is possible to create a thread with a desired signal mask as follows:

  • The creating thread uses pthread_sigmask(3) to save its current signal mask and set its mask to block all signals.

  • The new thread is then created using pthread_create(); the new thread will inherit the creating thread’s signal mask.

  • The new thread sets its signal mask to the desired value using pthread_sigmask(3).

  • The creating thread restores its signal mask to the original value.

Following the above steps, there is no possibility for the new thread to receive a signal before it has adjusted its signal mask to the desired value.

SEE ALSO

sigprocmask(2), pthread_attr_init(3), pthread_sigmask(3), pthreads(7), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1585 - Linux cli command Moose_Meta_TypeConstraint_Unionpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_TypeConstraint_Unionpm and provides detailed information about the command Moose_Meta_TypeConstraint_Unionpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_TypeConstraint_Unionpm.

NAME 🖥️ Moose_Meta_TypeConstraint_Unionpm 🖥️

A union of Moose type constraints

VERSION

version 2.2207

DESCRIPTION

This metaclass represents a union of type constraints. A union takes multiple type constraints, and is true if any one of its member constraints is true.

INHERITANCE

Moose::Meta::TypeConstraint::Union is a subclass of Moose::Meta::TypeConstraint.

METHODS

Moose::Meta::TypeConstraint::Union->new(%options)

This creates a new class type constraint based on the given %options.

It takes the same options as its parent. It also requires an additional option, type_constraints. This is an array reference containing the Moose::Meta::TypeConstraint objects that are the members of the union type. The name option defaults to the names all of these member types sorted and then joined by a pipe (|).

The constructor sets the implementation of the constraint so that is simply calls check on the newly created object.

Finally, the constructor also makes sure that the object’s coercion attribute is a Moose::Meta::TypeCoercion::Union object.

$constraint->type_constraints

This returns the array reference of type_constraints provided to the constructor.

$constraint->parent

This returns the nearest common ancestor of all the components of the union.

$constraint->check($value)

$constraint->validate($value)

These two methods simply call the relevant method on each of the member type constraints in the union. If any type accepts the value, the value is valid.

With validate the error message returned includes all of the error messages returned by the member type constraints.

$constraint->equals($type_name_or_object)

A type is considered equal if it is also a union type, and the two unions have the same member types.

$constraint->find_type_for($value)

This returns the first member type constraint for which check($value) is true, allowing you to determine which of the Union’s member type constraints a given value matches.

$constraint->is_a_type_of($type_name_or_object)

This returns true if all of the member type constraints return true for the is_a_type_of method.

$constraint->is_subtype_of

This returns true if all of the member type constraints return true for the is_subtype_of method.

$constraint->create_child_type(%options)

This returns a new Moose::Meta::TypeConstraint object with the type as its parent.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1586 - Linux cli command Net_Pcappm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Pcappm and provides detailed information about the command Net_Pcappm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Pcappm.

NAME 🖥️ Net_Pcappm 🖥️

Interface to the pcap(3) LBL packet capture library

VERSION

Version 0.21

SYNOPSIS

use Net::Pcap; my $err = ; my $dev = pcap_lookupdev(\err); # find a device # open the device for live listening my $pcap = pcap_open_live($dev, 1024, 1, 0, \err); # loop over next 10 packets pcap_loop($pcap, 10, \process_packet, “just for the demo”); # close the device pcap_close($pcap); sub process_packet { my ($user_data, $header, $packet) = @_; # do something … }

DESCRIPTION

Net::Pcap is a Perl binding to the LBL pcap (3) library and its Win32 counterpart, the WinPcap library. Pcap (packet capture) is a portable API to capture network packet: it allows applications to capture packets at link-layer, bypassing the normal protocol stack. It also provides features like kernel-level packet filtering and access to internal statistics.

Common applications include network statistics collection, security monitoring, network debugging, etc.

NOTES

Signals handling

Since version 5.7.3, Perl uses a mechanism called “deferred signals” to delay signals delivery until “safe” points in the interpreter. See “Deferred Signals (Safe Signals)” in perlipc for a detailed explanation.

Since Net::Pcap version 0.08, released in October 2005, the module modified the internal variable PL_signals to re-enable immediate signals delivery in Perl 5.8 and later within some XS functions (CPAN-RT #6320). However, it can create situations where the Perl interpreter is less stable and can crash (CPAN-RT #43308). Therefore, as of version 0.17, Net::Pcap no longer modifies PL_signals by itself, but provides facilities so the user has full control of how signals are delivered.

First, the pcap_perl_settings() function allows one to select how signals are handled:

pcap_perl_settings(PERL_SIGNALS_UNSAFE); pcap_loop($pcap, 10, \process_packet, “”); pcap_perl_settings(PERL_SIGNALS_SAFE);

Then, to easily make code interruptable, Net::Pcap provides the UNSAFE_SIGNALS pseudo-bloc:

UNSAFE_SIGNALS { pcap_loop($pcap, 10, \process_packet, “”); };

(Stolen from Rafael Garcia-Suarez’s Perl::Unsafe::Signals)

EXPORTS

Net::Pcap supports the following Exporter tags:

  • :bpf exports a few BPF related constants: BPF_ALIGNMENT BPF_MAJOR_VERSION BPF_MAXBUFSIZE BPF_MAXINSNS BPF_MEMWORDS BPF_MINBUFSIZE BPF_MINOR_VERSION BPF_RELEASE

  • :datalink exports the data link types macros: DLT_AIRONET_HEADER DLT_APPLE_IP_OVER_IEEE1394 DLT_ARCNET DLT_ARCNET_LINUX DLT_ATM_CLIP DLT_ATM_RFC1483 DLT_AURORA DLT_AX25 DLT_CHAOS DLT_CHDLC DLT_CISCO_IOS DLT_C_HDLC DLT_DOCSIS DLT_ECONET DLT_EN10MB DLT_EN3MB DLT_ENC DLT_FDDI DLT_FRELAY DLT_HHDLC DLT_IBM_SN DLT_IBM_SP DLT_IEEE802 DLT_IEEE802_11 DLT_IEEE802_11_RADIO DLT_IEEE802_11_RADIO_AVS DLT_IPFILTER DLT_IP_OVER_FC DLT_JUNIPER_ATM1 DLT_JUNIPER_ATM2 DLT_JUNIPER_ES DLT_JUNIPER_GGSN DLT_JUNIPER_MFR DLT_JUNIPER_MLFR DLT_JUNIPER_MLPPP DLT_JUNIPER_MONITOR DLT_JUNIPER_SERVICES DLT_LINUX_IRDA DLT_LINUX_SLL DLT_LOOP DLT_LTALK DLT_NULL DLT_OLD_PFLOG DLT_PCI_EXP DLT_PFLOG DLT_PFSYNC DLT_PPP DLT_PPP_BSDOS DLT_PPP_ETHER DLT_PPP_SERIAL DLT_PRISM_HEADER DLT_PRONET DLT_RAW DLT_RIO DLT_SLIP DLT_SLIP_BSDOS DLT_SUNATM DLT_SYMANTEC_FIREWALL DLT_TZSP DLT_USER0 DLT_USER1 DLT_USER2 DLT_USER3 DLT_USER4 DLT_USER5 DLT_USER6 DLT_USER7 DLT_USER8 DLT_USER9 DLT_USER10 DLT_USER11 DLT_USER12 DLT_USER13 DLT_USER14 DLT_USER15

  • :pcap exports the following pcap constants: PCAP_ERRBUF_SIZE PCAP_IF_LOOPBACK PCAP_VERSION_MAJOR PCAP_VERSION_MINOR

  • :mode exports the following constants: MODE_CAPT MODE_MON MODE_STAT

  • :openflag exports the following constants: OPENFLAG_PROMISCUOUS OPENFLAG_DATATX_UDP OPENFLAG_NOCAPTURE_RPCAP

  • :source exports the following constants: PCAP_SRC_FILE PCAP_SRC_IFLOCAL PCAP_SRC_IFREMOTE

  • :sample exports the following constants: PCAP_SAMP_NOSAMP PCAP_SAMP_1_EVERY_N PCAP_SAMP_FIRST_AFTER_N_MS

  • :rpcap exports the following constants: RMTAUTH_NULL RMTAUTH_PWD

  • :functions short names of the functions (without the "pcap_" prefix) for those which would not cause a clash with an already defined name. Namely, the following functions are not available in short form: open(), close(), next(), dump(), file(), fileno(). Using these short names is now discouraged, and may be removed in the future.

By default, this module exports the symbols from the :datalink and :pcap tags, and all the functions, with the same names as the C library.

FUNCTIONS

All functions defined by Net::Pcap are direct mappings to the libpcap functions. Consult the pcap (3) documentation and source code for more information.

Arguments that change a parameter, for example pcap_lookupdev(), are passed that parameter as a reference. This is to retain compatibility with previous versions of Net::Pcap.

Lookup functions

pcap_lookupdev(\err)
Returns the name of a network device that can be used with pcap_open_live() function. On error, the $err parameter is filled with an appropriate error message else it is undefined. Example $dev = pcap_lookupdev();

pcap_findalldevs(\devinfo, \err)
Returns a list of all network device names that can be used with pcap_open_live() function. On error, the $err parameter is filled with an appropriate error message else it is undefined. Example @devs = pcap_findalldevs(\devinfo, \err); for my $dev (@devs) { print “$dev : $devinfo{$dev} " }

Note
For backward compatibility reasons, this function can also be called using the following signatures: @devs = pcap_findalldevs(\err); @devs = pcap_findalldevs(\err, \devinfo); The first form was introduced by Marco Carnut in Net::Pcap version 0.05 and kept intact in versions 0.06 and 0.07. The second form was introduced by Jean-Louis Morel for the Windows only, ActivePerl port of Net::Pcap, in versions 0.04.01 and 0.04.02. The new syntax has been introduced for consistency with the rest of the Perl API and the C API of libpcap(3), where $err is always the last argument.

pcap_lookupnet($dev, \net, \mask, \err)
Determine the network number and netmask for the device specified in $dev. The function returns 0 on success and sets the $net and $mask parameters with values. On failure it returns -1 and the $err parameter is filled with an appropriate error message.

Packet capture functions

pcap_open_live($dev, $snaplen, $promisc, $to_ms, \err)
Returns a packet capture descriptor for looking at packets on the network. The $dev parameter specifies which network interface to capture packets from. The $snaplen and $promisc parameters specify the maximum number of bytes to capture from each packet, and whether to put the interface into promiscuous mode, respectively. The $to_ms parameter specifies a read timeout in milliseconds. The packet descriptor will be undefined if an error occurs, and the $err parameter will be set with an appropriate error message. Example $dev = pcap_lookupdev(); $pcap = pcap_open_live($dev, 1024, 1, 0, \err) or die “Cant open device $dev: $err “;

pcap_open_dead($linktype, $snaplen)
Creates and returns a new packet descriptor to use when calling the other functions in libpcap. It is typically used when just using libpcap for compiling BPF code. Example $pcap = pcap_open_dead(0, 1024);

pcap_open_offline($filename, \err)
Return a packet capture descriptor to read from a previously created “savefile”. The returned descriptor is undefined if there was an error and in this case the $err parameter will be filled. Savefiles are created using the pcap_dump_* commands. Example $pcap = pcap_open_offline($dump, \err) or die “Cant read $dump: $err “;

pcap_loop($pcap, $count, \callback, $user_data)
Read $count packets from the packet capture descriptor $pcap and call the perl function &callback with an argument of $user_data. If $count is negative, then the function loops forever or until an error occurs. Returns 0 if $count is exhausted, -1 on error, and -2 if the loop terminated due to a call to pcap_breakloop() before any packets were processed. The callback function is also passed packet header information and packet data like so: sub process_packet { my ($user_data, $header, $packet) = @_; … } The header information is a reference to a hash containing the following fields.

  • len - the total length of the packet.

  • caplen - the actual captured length of the packet data. This corresponds to the snapshot length parameter passed to open_live().

  • tv_sec - seconds value of the packet timestamp.

  • tv_usec - microseconds value of the packet timestamp.

Example pcap_loop($pcap, 10, \process_packet, “user data”); sub process_packet { my ($user_data, $header, $packet) = @_; # … }

pcap_breakloop($pcap)
Sets a flag that will force pcap_dispatch() or pcap_loop() to return rather than looping; they will return the number of packets that have been processed so far, or -2 if no packets have been processed so far. This routine is safe to use inside a signal handler on UNIX or a console control handler on Windows, as it merely sets a flag that is checked within the loop. Please see the section on pcap_breakloop() in pcap (3) for more information.

pcap_close($pcap)
Close the packet capture device associated with the descriptor $pcap.

pcap_dispatch($pcap, $count, \callback, $user_data)
Collect $count packets and process them with callback function &callback. if $count is -1, all packets currently buffered are processed. If $count is 0, process all packets until an error occurs.

pcap_next($pcap, \header)
Return the next available packet on the interface associated with packet descriptor $pcap. Into the %header hash is stored the received packet header. If not packet is available, the return value and header is undefined.

pcap_next_ex($pcap, \header, \packet)
Reads the next available packet on the interface associated with packet descriptor $pcap, stores its header in \%header and its data in \$packet and returns a success/failure indication:

  • 1 means that the packet was read without problems;

  • 0 means that packets are being read from a live capture, and the timeout expired;

  • -1 means that an error occurred while reading the packet;

  • -2 packets are being read from a dump file, and there are no more packets to read from the savefile.

pcap_compile($pcap, \filter, $filter_str, $optimize, $netmask)
Compile the filter string contained in $filter_str and store it in $filter. A description of the filter language can be found in the libpcap source code, or the manual page for tcpdump (8) . The filter is optimized if the $optimize variable is true. The netmask of the network device must be specified in the $netmask parameter. The function returns 0 if the compilation was successful, or -1 if there was a problem.

pcap_compile_nopcap($snaplen, $linktype, \filter, $filter_str, $optimize, $netmask)
Similar to compile() except that instead of passing a $pcap descriptor, one passes $snaplen and $linktype directly. Returns -1 if there was an error, but the error message is not available.

pcap_setfilter($pcap, $filter)
Associate the compiled filter stored in $filter with the packet capture descriptor $pcap.

pcap_freecode($filter)
Used to free the allocated memory used by a compiled filter, as created by pcap_compile().

pcap_offline_filter($filter, \header, $packet)
Check whether $filter matches the packet described by header %header and packet data $packet. Returns true if the packet matches.

pcap_setnonblock($pcap, $mode, \err)
Set the non-blocking mode of a live capture descriptor, depending on the value of $mode (zero to activate and non-zero to deactivate). It has no effect on offline descriptors. If there is an error, it returns -1 and sets $err. In non-blocking mode, an attempt to read from the capture descriptor with pcap_dispatch() will, if no packets are currently available to be read, return 0 immediately rather than blocking waiting for packets to arrive. pcap_loop() and pcap_next() will not work in non-blocking mode.

pcap_getnonblock($pcap, \err)
Returns the non-blocking state of the capture descriptor $pcap. Always returns 0 on savefiles. If there is an error, it returns -1 and sets $err.

Savefile commands

pcap_dump_open($pcap, $filename)
Open a savefile for writing and return a descriptor for doing so. If $filename is "-" data is written to standard output. On error, the return value is undefined and pcap_geterr() can be used to retrieve the error text.

pcap_dump($dumper, \header, $packet)
Dump the packet described by header %header and packet data $packet to the savefile associated with $dumper. The packet header has the same format as that passed to the pcap_loop() callback. Example my $dump_file = network.dmp; my $dev = pcap_lookupdev(); my $pcap = pcap_open_live($dev, 1024, 1, 0, \err); my $dumper = pcap_dump_open($pcap, $dump_file); pcap_loop($pcap, 10, \process_packet, ); pcap_dump_close($dumper); sub process_packet { my ($user_data, $header, $packet) = @_; pcap_dump($dumper, $header, $packet); }

pcap_dump_file($dumper)
Returns the filehandle associated with a savefile opened with pcap_dump_open().

pcap_dump_flush($dumper)
Flushes the output buffer to the corresponding save file, so that any packets written with pcap_dump() but not yet written to the save file will be written. Returns -1 on error, 0 on success.

pcap_dump_close($dumper)
Close the savefile associated with the descriptor $dumper.

Status functions

pcap_datalink($pcap)
Returns the link layer type associated with the given pcap descriptor. Example $linktype = pcap_datalink($pcap);

pcap_set_datalink($pcap, $linktype)
Sets the data link type of the given pcap descriptor to the type specified by $linktype. Returns -1 on failure.

pcap_datalink_name_to_val($name)
Translates a data link type name, which is a DLT_ name with the DLT_ part removed, to the corresponding data link type value. The translation is case-insensitive. Returns -1 on failure. Example $linktype = pcap_datalink_name_to_val(LTalk); # returns DLT_LTALK

pcap_datalink_val_to_name($linktype)
Translates a data link type value to the corresponding data link type name. Example $name = pcap_datalink_val_to_name(DLT_LTALK); # returns LTALK

pcap_datalink_val_to_description($linktype)
Translates a data link type value to a short description of that data link type. Example $descr = pcap_datalink_val_to_description(DLT_LTALK); # returns Localtalk

pcap_snapshot($pcap)
Returns the snapshot length (snaplen) specified in the call to pcap_open_live().

pcap_is_swapped($pcap)
This function returns true if the endianness of the currently open savefile is different from the endianness of the machine.

pcap_major_version($pcap)
Return the major version number of the pcap library used to write the currently open savefile.

pcap_minor_version($pcap)
Return the minor version of the pcap library used to write the currently open savefile.

pcap_stats($pcap, \stats)
Returns a hash containing information about the status of packet capture device $pcap. The hash contains the following fields. This function is supported only on live captures, not on savefiles; no statistics are stored in savefiles, so no statistics are available when reading from a savefile.

  • ps_recv - the number of packets received by the packet capture software.

  • ps_drop - the number of packets dropped by the packet capture software.

  • ps_ifdrop - the number of packets dropped by the network interface.

pcap_file($pcap)
Returns the filehandle associated with a savefile opened with pcap_open_offline() or undef if the device was opened with pcap_open_live().

pcap_fileno($pcap)
Returns the file number of the network device opened with pcap_open_live().

pcap_get_selectable_fd($pcap)
Returns, on Unix, a file descriptor number for a file descriptor on which one can do a select() or poll() to wait for it to be possible to read packets without blocking, if such a descriptor exists, or -1, if no such descriptor exists. Some network devices opened with pcap_open_live() do not support select() or poll(), so -1 is returned for those devices. See pcap (3) for more details.

Error handling

pcap_geterr($pcap)
Returns an error message for the last error associated with the packet capture device $pcap.

pcap_strerror($errno)
Returns a string describing error number $errno.

pcap_perror($pcap, $prefix)
Prints the text of the last error associated with descriptor $pcap on standard error, prefixed by $prefix.

Information

pcap_lib_version()
Returns the name and version of the pcap library the module was linked against.

Perl specific functions

The following functions are specific to the Perl binding of libpcap.

pcap_perl_settings($setting)
Modify internal behaviour of the Perl interpreter.

  • PERL_SIGNALS_SAFE, PERL_SIGNALS_UNSAFE respectively enable safe or unsafe signals delivery. Returns the previous value of PL_signals. See “Signals handling”. Example: local $SIG{ALRM} = sub { pcap_breakloop() }; alarm 60; pcap_perl_settings(PERL_SIGNALS_UNSAFE); pcap_loop($pcap, 10, \process_packet, “”); pcap_perl_settings(PERL_SIGNALS_SAFE);

WinPcap specific functions

The following functions are only available with WinPcap, the Win32 port of the Pcap library. If a called function is not available, it will cleanly croak().

pcap_createsrcstr(\source, $type, $host, $port, $name, \err)
Accepts a set of strings (host name, port, …), and stores the complete source string according to the new format (e.g. "rpcap://1.2.3.4/eth0") in $source. This function is provided in order to help the user creating the source string according to the new format. An unique source string is used in order to make easy for old applications to use the remote facilities. Think about tcpdump (1), for example, which has only one way to specify the interface on which the capture has to be started. However, GUI-based programs can find more useful to specify hostname, port and interface name separately. In that case, they can use this function to create the source string before passing it to the pcap_open() function. Returns 0 if everything is fine, -1 if some errors occurred. The string containing the complete source is returned in the $source variable.

pcap_parsesrcstr($source, \type, \host, \port, \name, \err)
Parse the source string and stores the pieces in which the source can be split in the corresponding variables. This call is the other way round of pcap_createsrcstr(). It accepts a null-terminated string and it returns the parameters related to the source. This includes:

  • the type of the source (file, WinPcap on a remote adapter, WinPcap on local adapter), which is determined by the source prefix (PCAP_SRC_IF_STRING and so on);

  • the host on which the capture has to be started (only for remote captures);

  • the raw name of the source (file name, name of the remote adapter, name of the local adapter), without the source prefix. The string returned does not include the type of the source itself (i.e. the string returned does not include "file://" or "rpcap://" or such).

The user can omit some parameters in case it is not interested in them. Returns 0 if everything is fine, -1 if some errors occurred. The requested values (host name, network port, type of the source) are returned into the proper variables passed by reference.

pcap_open($source, $snaplen, $flags, $read_timeout, \auth, \err)
Open a generic source in order to capture / send (WinPcap only) traffic. The pcap_open() replaces all the pcap_open_xxx() functions with a single call. This function hides the differences between the different pcap_open_xxx() functions so that the programmer does not have to manage different opening function. In this way, the true open() function is decided according to the source type, which is included into the source string (in the form of source prefix). Returns a pointer to a pcap descriptor which can be used as a parameter to the following calls (compile() and so on) and that specifies an opened WinPcap session. In case of problems, it returns undef and the $err variable keeps the error message.

pcap_setbuff($pcap, $dim)
Sets the size of the kernel buffer associated with an adapter. $dim specifies the size of the buffer in bytes. The return value is 0 when the call succeeds, -1 otherwise. If an old buffer was already created with a previous call to setbuff(), it is deleted and its content is discarded. open_live() creates a 1 MB buffer by default.

pcap_setmode($pcap, $mode)
Sets the working mode of the interface $pcap to $mode. Valid values for $mode are MODE_CAPT (default capture mode) and MODE_STAT (statistical mode).

pcap_setmintocopy($pcap_t, $size)
Changes the minimum amount of data in the kernel buffer that causes a read from the application to return (unless the timeout expires).

pcap_getevent($pcap)
Returns the Win32::Event object associated with the interface $pcap. Can be used to wait until the driver’s buffer contains some data without performing a read. See Win32::Event.

pcap_sendpacket($pcap, $packet)
Send a raw packet to the network. $pcap is the interface that will be used to send the packet, $packet contains the data of the packet to send (including the various protocol headers). The MAC CRC doesn’t need to be included, because it is transparently calculated and added by the network interface driver. The return value is 0 if the packet is successfully sent, -1 otherwise.

pcap_sendqueue_alloc($memsize)
This function allocates and returns a send queue, i.e. a buffer containing a set of raw packets that will be transmitted on the network with sendqueue_transmit(). $memsize is the size, in bytes, of the queue, therefore it determines the maximum amount of data that the queue will contain. This memory is automatically deallocated when the queue ceases to exist.

pcap_sendqueue_queue($queue, \header, $packet)
Adds a packet at the end of the send queue pointed by $queue. The packet header %header has the same format as that passed to the loop() callback. $ackekt is a buffer with the data of the packet. The %headerr header structure is the same used by WinPcap and libpcap to store the packets in a file, therefore sending a capture file is straightforward. “Raw packet” means that the sending application will have to include the protocol headers, since every packet is sent to the network as is. The CRC of the packets needs not to be calculated, because it will be transparently added by the network interface.

pcap_sendqueue_transmit($pcap, $queue, $sync)
This function transmits the content of a queue to the wire. $pcapt is the interface on which the packets will be sent, $queue is to a send_queue containing the packets to send, $sync determines if the send operation must be synchronized: if it is non-zero, the packets are sent respecting the timestamps, otherwise they are sent as fast as possible. The return value is the amount of bytes actually sent. If it is smaller than the size parameter, an error occurred during the send. The error can be caused by a driver/adapter problem or by an inconsistent/bogus send queue.

CONSTANTS

Net::Pcap exports by default the names of several constants in order to ease the development of programs. See “EXPORTS” for details about which constants are exported.

Here are the descriptions of a few data link types. See pcap (3) for a more complete description and semantics associated with each data link.

  • DLT_NULL - BSD loopback encapsulation

  • DLT_EN10MB - Ethernet (10Mb, 100Mb, 1000Mb, and up)

  • DLT_RAW - raw IP

  • DLT_IEEE802 - IEEE 802.5 Token Ring

  • DLT_IEEE802_11 - IEEE 802.11 wireless LAN

  • DLT_FRELAY - Frame Relay

  • DLT_FDDI - FDDI

  • DLT_SLIP - Serial Line IP

  • DLT_PPP - PPP (Point-to-point Protocol)

  • DLT_PPP_SERIAL - PPP over serial with HDLC encapsulation

  • DLT_PPP_ETHER - PPP over Ethernet

  • DLT_IP_OVER_FC - RFC 2625 IP-over-Fibre Channel

  • DLT_AX25 - Amateur Radio AX.25

  • DLT_LINUX_IRDA - Linux-IrDA

  • DLT_LTALK - Apple LocalTalk

  • DLT_APPLE_IP_OVER_IEEE1394 - Apple IP-over-IEEE 1394 (a.k.a. Firewire)

DIAGNOSTICS

“arg%d not a scalar ref”

“arg%d not a hash ref”

“arg%d not a reference”

(F) These errors occur if you forgot to give a reference to a function which expect one or more of its arguments to be references.

BUGS

Please report any bugs or feature requests to [email protected], or through the web interface at <http://rt.cpan.org/Dist/Display.html?Queue=Net-Pcap>. I will be notified, and then you’ll automatically be notified of progress on your bug as I make changes.

Currently known bugs:

  • the ps_recv field is not correctly set; see t/07-stats.t

  • pcap_file() seems to always returns undef for live connection and causes segmentation fault for dump files; see t/10-fileno.t

  • pcap_fileno() is documented to return -1 when called on save file, but seems to always return an actual file number. See t/10-fileno.t

  • pcap_dump_file() seems to corrupt something somewhere, and makes scripts dump core. See t/05-dump.t

EXAMPLES

See the eg/ and t/ directories of the Net::Pcap distribution for examples on using this module.

SEE ALSO

Perl Modules

the NetPacket or Net::Frame modules to assemble and disassemble packets.

Net::Pcap::Reassemble for reassembly of TCP/IP fragments.

POE::Component::Pcap for using Net::Pcap within POE-based programs.

AnyEvent::Pcap for using Net::Pcap within AnyEvent-based programs.

Net::Packet or NetPacket for decoding and creating network packets.

Net::Pcap::Easy is a module which provides an easier, more Perl-ish API than Net::Pcap and integrates some facilities from Net::Netmask and NetPacket.

Base Libraries

pcap (3), tcpdump (8)

The source code for the pcap(3) library is available from <http://www.tcpdump.org/>

The source code and binary for the Win32 version of the pcap library, WinPcap, is available from <http://www.winpcap.org/>

Articles

Hacking Linux Exposed: Sniffing with Net::Pcap to stealthily managing iptables rules remotely, <http://www.hackinglinuxexposed.com/articles/20030730.html>

PerlMonks node about Net::Pcap, <http://perlmonks.org/?node_id=170648>

AUTHORS

Current maintainer is Sébastien Aperghis-Tramoni (SAPER) with the help of Tim Wilde (TWILDE).

Complete list of authors & contributors:

  • Bo Adler (BOADLER) <thumper (at) alumni.caltech.edu>

  • Craig Davison

  • David Farrell

  • David N. Blank-Edelman <dnb (at) ccs.neu.edu>

  • James Rouzier (ROUZIER)

  • Jean-Louis Morel (JLMOREL) <jl_morel (at) bribes.org>

  • Marco Carnut (KCARNUT) <kiko (at) tempest.com.br>

  • Patrice Auffret (GOMOR)

  • Peter Lister (PLISTER) <p.lister (at) cranfield.ac.uk>

  • Rafaël Garcia-Suarez (RGARCIA)

  • Sébastien Aperghis-Tramoni (SAPER) <sebastien (at) aperghis.net>

  • Tim Potter (TIMPOTTER) <tpot (at) frungy.org>

  • Tim Wilde (TWILDE)

HISTORY

The original version of Net::Pcap, version 0.01, was written by Peter Lister using SWIG.

Version 0.02 was created by Bo Adler with a few bugfixes but not uploaded to CPAN. It could be found at: <http://www.buttsoft.com/~thumper/software/perl/Net-Pcap/>

Versions 0.03 and 0.04 were created by Tim Potter who entirely rewrote Net::Pcap using XS and wrote the documentation, with the help of David N. Blank-Edelman for testing and general polishing.

Version 0.05 was released by Marco Carnut with fixes to make it work with Cygwin and WinPcap.

Version 0.04.02 was independently created by Jean-Louis Morel but not uploaded on the CPAN. It can be found here: <http://www.bribes.org/perl/wnetpcap.html>

Based on Tim Potter’s version 0.04, it included fixes for WinPcap and added wrappers for several new libpcap functions as well as WinPcap specific functions.

ACKNOWLEDGEMENTS

To Paul Johnson for his module Devel::Cover and his patience for helping me using it with XS code, which revealed very useful for writing more tests.

To the beta-testers: Jean-Louis Morel, Max Maischen, Philippe Bruhat, David Morel, Scott Lanning, Rafael Garcia-Suarez, Karl Y. Pradene.

COPYRIGHT & LICENSE

Copyright (C) 2005-2016 Sébastien Aperghis-Tramoni and contributors. All rights reserved.

Copyright (C) 2003 Marco Carnut. All rights reserved.

Copyright (C) 1999, 2000 Tim Potter. All rights reserved.

Copyright (C) 1998 Bo Adler. All rights reserved.

Copyright (C) 1997 Peter Lister. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1587 - Linux cli command XtClass

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtClass and provides detailed information about the command XtClass, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtClass.

NAME 🖥️ XtClass 🖥️

obtain and verify a widget’s class

SYNTAX

#include <X11/Intrinsic.h>

WidgetClass XtClass(Widget w);

WidgetClass XtSuperclass(Widget w);

Boolean XtIsSubclass(Widget w, WidgetClass widget_class);

void XtCheckSubclass(Widget widget, WidgetClass widget_class, String message);

Boolean XtIsObject(Widget w);

Boolean XtIsRectObj(Widget w);

Boolean XtIsWidget(Widget w);

Boolean XtIsComposite(Widget w);

Boolean XtIsConstraint(Widget w);

Boolean XtIsShell(Widget w);

Boolean XtIsOverrideShell(Widget w);

Boolean XtIsWMShell(Widget w);

Boolean XtIsVendorShell(Widget w);

Boolean XtIsTransientShell(Widget w);

Boolean XtIsTopLevelShell(Widget w);

Boolean XtIsApplicationShell(Widget w);

Boolean XtIsSessionShell(Widget w);

ARGUMENTS

  1. Specifies the widget.

widget_class
Specifies the widget class.

message
Specifies the message that is to be used.

DESCRIPTION

The XtClass function returns a pointer to the widget’s class structure.

The XtSuperclass function returns a pointer to the widget’s superclass class structure.

The XtIsSubclass function returns True if the class of the specified widget is equal to or is a subclass of the specified class. The widget’s class can be any number of subclasses down the chain and need not be an immediate subclass of the specified class. Composite widgets that need to restrict the class of the items they contain can use XtIsSubclass to find out if a widget belongs to the desired class of objects.

The XtCheckSubclass macro determines if the class of the specified widget is equal to or is a subclass of the specified widget class. The widget can be any number of subclasses down the chain and need not be an immediate subclass of the specified widget class. If the specified widget is not a subclass, XtCheckSubclass constructs an error message from the supplied message, the widget’s actual class, and the expected class and calls XtErrorMsg. XtCheckSubclass should be used at the entry point of exported routines to ensure that the client has passed in a valid widget class for the exported operation.

XtCheckSubclass is only executed when the widget has been compiled with the compiler symbol DEBUG defined; otherwise, it is defined as the empty string and generates no code.

To test if a given widget belongs to a subclass of an Intrinsics-defined class, the Intrinsics defines macros or functions equivalent to XtIsSubclass for each of the built-in classes. These procedures are XtIsObject, XtIsRectObj, XtIsWidget, XtIsComposite, XtIsConstraint, XtIsShell, XtIsOverrideShell, XtIsWMShell, XtIsVendorShell, XtIsTransientShell, XtIsTopLevelShell, XtIsApplicationShell, and XtIsSessionShell.

The

SEE ALSO

XtAppErrorMsg(3), XtDisplay(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1588 - Linux cli command rresvport

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command rresvport and provides detailed information about the command rresvport, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the rresvport.

NAME 🖥️ rresvport 🖥️

routines for returning a stream to a remote command

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h> /* Or <unistd.h> on some systems */
int rcmd(char **restrict ahost, unsigned short inport,
 const char *restrict locuser,
 const char *restrict remuser,
 const char *restrict cmd, int *restrict fd2p);
int rresvport(int *port);
int iruserok(uint32_t raddr, int superuser,
 const char *ruser, const char *luser);
int ruserok(const char *rhost, int superuser,
 const char *ruser, const char *luser);
int rcmd_af(char **restrict ahost, unsigned short inport,
 const char *restrict locuser,
 const char *restrict remuser,
 const char *restrict cmd, int *restrict fd2p,
 sa_family_t af);
int rresvport_af(int *port, sa_family_t af);
int iruserok_af(const void *restrict raddr, int superuser,
 const char *restrict ruser, const char *restrict luser,
 sa_family_t af);
int ruserok_af(const char *rhost, int superuser,
 const char *ruser, const char *luser,
 sa_family_t af);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

rcmd(), rcmd_af(), rresvport(), rresvport_af(), iruserok(), iruserok_af(), ruserok(), ruserok_af():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The rcmd() function is used by the superuser to execute a command on a remote machine using an authentication scheme based on privileged port numbers. The rresvport() function returns a file descriptor to a socket with an address in the privileged port space. The iruserok() and ruserok() functions are used by servers to authenticate clients requesting service with rcmd(). All four functions are used by the rshd(8) server (among others).

rcmd()

The rcmd() function looks up the host *ahost using gethostbyname(3), returning -1 if the host does not exist. Otherwise, *ahost is set to the standard name of the host and a connection is established to a server residing at the well-known Internet port inport.

If the connection succeeds, a socket in the Internet domain of type SOCK_STREAM is returned to the caller, and given to the remote command as stdin and stdout. If fd2p is nonzero, then an auxiliary channel to a control process will be set up, and a file descriptor for it will be placed in *fd2p. The control process will return diagnostic output from the command (unit 2) on this channel, and will also accept bytes on this channel as being UNIX signal numbers, to be forwarded to the process group of the command. If fd2p is 0, then the stderr (unit 2 of the remote command) will be made the same as the stdout and no provision is made for sending arbitrary signals to the remote process, although you may be able to get its attention by using out-of-band data.

The protocol is described in detail in rshd(8).

rresvport()

The rresvport() function is used to obtain a socket with a privileged port bound to it. This socket is suitable for use by rcmd() and several other functions. Privileged ports are those in the range 0 to 1023. Only a privileged process (on Linux, a process that has the CAP_NET_BIND_SERVICE capability in the user namespace governing its network namespace) is allowed to bind to a privileged port. In the glibc implementation, this function restricts its search to the ports from 512 to 1023. The port argument is value-result: the value it supplies to the call is used as the starting point for a circular search of the port range; on (successful) return, it contains the port number that was bound to.

iruserok() and ruserok()

The iruserok() and ruserok() functions take a remote host’s IP address or name, respectively, two usernames and a flag indicating whether the local user’s name is that of the superuser. Then, if the user is not the superuser, it checks the /etc/hosts.equiv file. If that lookup is not done, or is unsuccessful, the .rhosts in the local user’s home directory is checked to see if the request for service is allowed.

If this file does not exist, is not a regular file, is owned by anyone other than the user or the superuser, is writable by anyone other than the owner, or is hardlinked anywhere, the check automatically fails. Zero is returned if the machine name is listed in the hosts.equiv file, or the host and remote username are found in the .rhosts file; otherwise iruserok() and ruserok() return -1. If the local domain (as obtained from gethostname(2)) is the same as the remote domain, only the machine name need be specified.

If the IP address of the remote host is known, iruserok() should be used in preference to ruserok(), as it does not require trusting the DNS server for the remote host’s domain.

*_af() variants

All of the functions described above work with IPv4 (AF_INET) sockets. The “_af” variants take an extra argument that allows the socket address family to be specified. For these functions, the af argument can be specified as AF_INET or AF_INET6. In addition, rcmd_af() supports the use of AF_UNSPEC.

RETURN VALUE

The rcmd() function returns a valid socket descriptor on success. It returns -1 on error and prints a diagnostic message on the standard error.

The rresvport() function returns a valid, bound socket descriptor on success. On failure, it returns -1 and sets errno to indicate the error. The error code EAGAIN is overloaded to mean: “All network ports in use”.

For information on the return from ruserok() and iruserok(), see above.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

rcmd(), rcmd_af()

Thread safetyMT-Unsafe

rresvport(), rresvport_af()

Thread safetyMT-Safe

iruserok(), ruserok(), iruserok_af(), ruserok_af()

Thread safetyMT-Safe locale

STANDARDS

BSD.

HISTORY

iruserok_af()
rcmd_af()
rresvport_af()
ruserok_af()
glibc 2.2.

Solaris, 4.2BSD. The “_af” variants are more recent additions, and are not present on as wide a range of systems.

BUGS

iruserok() and iruserok_af() are declared in glibc headers only since glibc 2.12.

SEE ALSO

rlogin(1), rsh(1), rexec(3), rexecd(8), rlogind(8), rshd(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1589 - Linux cli command HTTP_DAV_Resourcepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTTP_DAV_Resourcepm and provides detailed information about the command HTTP_DAV_Resourcepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTTP_DAV_Resourcepm.

NAME 🖥️ HTTP_DAV_Resourcepm 🖥️

Represents and interfaces with WebDAV Resources

SYNOPSIS

Sample

DESCRIPTION

Description here

CONSTRUCTORS

new
Returns a new resource represented by the URI. $r = HTTP::DAV::Resource->new( -uri => $uri, -LockedResourceList => $locks, -Comms => $comms -Client => $dav_client ); On creation a Resource object needs 2 other objects passed in: 1. a ResourceList Object. This list will be added to if you lock this Resource. 2. a Comms Object. This object will be used for HTTP communication. 2. a HTTP::DAV Object. This object is where all locks are stored

METHODS

get/GET
Performs an HTTP GET and returns a DAV::Response object. $response = $resource->get; print $resource->get_content if ($response->is_success);

put/PUT
Performs an HTTP PUT and returns a DAV::Response object. $response = $resource->put( $string ); $string is be passed as the body. e.g. $response = $resource->put($string); print $resource->get_content if ($response->is_success); Will use a Lock header if this resource was previously locked.

copy
Not implemented

move
Not implemented

delete
Performs an HTTP DELETE and returns a DAV::Response object. $response = $resource->delete; print “Delete successful” if ($response->is_success); Will use a Lock header if this resource was previously locked.

options
Performs an HTTP OPTIONS and returns a DAV::Response object. $response = $resource->options; print “Yay for PUT!” if $resource->is_option(“PUT”);

mkcol
Performs a WebDAV MKCOL request and returns a DAV::Response object. $response = $resource->mkcol; print “MKCOL successful” if ($response->is_success); Will use a Lock header if this resource was previously locked.

proppatch
xxx

propfind
Performs a WebDAV PROPFIND request and returns a DAV::Response object. $response = $resource->propfind; if ($response->is_success) { print “PROPFIND successful “; print $resource->get_property(“displayname”) . " “; } A successful PROPFIND fills the object with much data about the Resource. Including: displayname … TODO

lock
Performs a WebDAV LOCK request and returns a DAV::Response object. $resource->lock( -owner => “Patrick Collins”, -depth => “infinity” -scope => “exclusive”, -type => “write” -timeout => TIMEOUT, ) lock takes the following arguments. owner - Indicates who locked this resource The default value is: DAV.pm/v$DAV::VERSION ($$) e.g. DAV.pm/v0.1 (123) If you use a URL as the owner, the module will automatically indicate to the server that is is a URL (<D:href>http://…</D:href>) depth - Indicates the depth of the lock. Legal values are 0 or infinity. (1 is not allowed). The default value is infinity. A lock value of 0 on a collection will lock just the collection but not it’s members, whereas a lock value of infinity will lock the collection and all of it’s members. scope - Indicates the scope of the lock. Legal DAV values are exclusive or shared. The default value is exclusive. See section 6.1 of RFC2518 for a description of shared vs. exclusive locks. type - Indicates the type of lock (read, write, etc) The only legal DAV value currently is write. The default value is write. timeout - Indicates when the lock will timeout The timeout value may be one of, an Absolute Date, a Time Offset from now, or the word infinity. The default value is infinity. The following are all valid timeout values: Time Offset: 30s 30 seconds from now 10m ten minutes from now 1h one hour from now 1d tomorrow 3M in three months 10y in ten years time Absolute Date: timeout at the indicated time & date (UTC/GMT) 2000-02-31 00:40:33 timeout at the indicated date (UTC/GMT) 2000-02-31 You can use any of the Absolute Date formats specified in HTTP::Date (see perldoc HTTP::Date) Note: the DAV server may choose to ignore your specified timeout.

unlock
Performs a WebDAV UNLOCK request and returns a DAV::Response object. $response = $resource->unlock() $response = $resource->unlock( -force => 1 ) $response = $resource->unlock( -token => “opaquelocktoken:1342-21423-2323” ) This method will automatically use the correct locktoken If: header if this resource was previously locked. force - Synonymous to calling $resource->forcefully_unlock_all.

forcefully_unlock_all
Remove all locks from a resource and return the last DAV::Response object. This method take no arguments. $response = $resource->forcefully_unlock_all; This method will perform a lockdiscovery against the resource to determine all of the current locks. Then it will UNLOCK them one by one. unlock( -token => locktoken ). This unlock process is achievable because DAV does not enforce any security over locks. Note: this method returns the LAST unlock response (this is sufficient to indicate the success of the sequence of unlocks). If an unlock fails, it will bail and return that response. For instance, In the event that there are 3 shared locks and the second unlock method fails, then you will get returned the unsuccessful second response. The 3rd unlock will not be attempted. Don’t run with this knife, you could hurt someone (or yourself).

steal_lock
Removes all locks from a resource, relocks it in your name and returns the DAV::Response object for the lock command. This method takes no arguments. $response = $resource->steal_lock; Synonymous to forcefully_unlock_all() and then lock().

lockdiscovery
Discover the locks held against this resource and return a DAV::Response object. This method take no arguments. $response = $resource->lockdiscovery; @locks = $resource->get_locks if $response->is_success; This method is in fact a simplified version of propfind().

as_string
Returns a string representation of the object. Mainly useful for debugging purposes. It takes no arguments. print $resource->as_string

ACCESSOR METHODS (get, set and is)

is_option
Returns a boolean indicating whether this resource supports the option passed in as a string. The option match is case insensitive so, PUT and Put are should both work. if ($resource->is_option( “PUT” ) ) { $resource->put( … ) } Note: this routine automatically calls the options() routine which makes the request to the server. Subsequent calls to is_option will use the cached option list. To force a rerequest to the server call options()

is_locked
Returns a boolean indicating whether this resource is locked. @lock = $resource->is_locked( -owned=>[1|0] ); owned - this parameter is used to ask, is this resource locked by me? Note: You must have already called propfind() or lockdiscovery() e.g. Is the resource locked at all? print yes if $resource->is_locked(); Is the resource locked by me? print yes if $resource->is_locked( -owned=>1 ); Is the resource locked by someone other than me? print yes if $resource->is_locked( -owned=>0 );

is_collection
Returns a boolean indicating whether this resource is a collection. print “Directory” if ( $resource->is_collection ); You must first have performed a propfind.

get_uri
Returns the URI object for this resource. print “URL is: " . $resource->get_uri()->as_string . " “; See the URI manpage from the LWP libraries (perldoc URI)

get_property
Returns a property value. Takes a string as an argument. print $resource->get_property( “displayname” ); You must first have performed a propfind.

get_options
Returns an array of options allowed on this resource. Note: If $resource->options has not been called then it will return an empty array. @options = $resource->get_options

get_content
Returns the resource’s content/body as a string. The content is typically the result of a GET. $content = $resource->get_content

get_content_ref
Returns the resource’s content/body as a reference to a string. This is useful and more efficient if the content is large. ${$resource->get_content_ref} =~ s/foo/bar/g; Note: You must have already called get()

get_lock
Returns the DAV::Lock object if it exists. Requires opaquelocktoken passed as a parameter. $lock = $resource->get_lock( “opaquelocktoken:234214–342-3444” );

get_locks
Returns a list of any DAV::Lock objects held against the resource. @lock = $resource->get_locks( -owned=>[1|0] ); owned - this parameter indicates which locks you want. - ‘1’, requests any of my locks. (Locked by this DAV instance). - ‘0’ ,requests any locks not owned by us. - any other value or no value, requests ALL locks. Note: You must have already called propfind() or lockdiscovery() e.g. Give me my locks @lock = $resource->get_locks( -owned=>1 ); Give me all locks @lock = $resource->get_locks();

get_lockedresourcelist

get_parentresourcelist

get_comms

set_parent_resourcelist

$resource->set_parent_resourcelist( $resourcelist ) Sets the parent resource list (ask the question, which collection am I a member of?). See HTTP::DAV::ResourceList.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1590 - Linux cli command Net_DNS_Resolver_Basepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_Resolver_Basepm and provides detailed information about the command Net_DNS_Resolver_Basepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_Resolver_Basepm.

NAME 🖥️ Net_DNS_Resolver_Basepm 🖥️

DNS resolver base class

SYNOPSIS

use base qw(Net::DNS::Resolver::Base);

DESCRIPTION

This class is the common base class for the different platform sub-classes of Net::DNS::Resolver.

No user serviceable parts inside, see Net::DNS::Resolver for all your resolving needs.

METHODS

new, domain, searchlist, nameserver, nameservers,

search, query, send, bgsend, bgbusy, bgread, axfr,

force_v4, force_v6, prefer_v4, prefer_v6,

dnssec, srcaddr, tsig, udppacketsize,

See Net::DNS::Resolver.

COPYRIGHT

Copyright (c)2003,2004 Chris Reinhardt.

Portions Copyright (c)2005 Olaf Kolkman.

Portions Copyright (c)2014-2017 Dick Franks.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::Resolver

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1591 - Linux cli command useconds_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command useconds_ttype and provides detailed information about the command useconds_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the useconds_ttype.

NAME 🖥️ useconds_ttype 🖥️

integer time

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <time.h>
typedef /* ... */ time_t;
#include <sys/types.h>
typedef /* ... */ suseconds_t;
typedef /* ... */ useconds_t;

DESCRIPTION

time_t
Used for time in seconds. According to POSIX, it is an integer type.

suseconds_t
Used for time in microseconds. It is a signed integer type capable of storing values at least in the range [-1, 1000000].

useconds_t
Used for time in microseconds. It is an unsigned integer type capable of storing values at least in the range [0, 1000000].

STANDARDS

time_t
C11, POSIX.1-2008.

suseconds_t
useconds_t
POSIX.1-2008.

HISTORY

time_t
C89, POSIX.1-2001.

suseconds_t
useconds_t
POSIX.1-2001.

<sched.h> defines time_t since POSIX.1-2008.

POSIX.1-2001 defined useconds_t in <unistd.h> too.

NOTES

On some architectures, the width of time_t can be controlled with the feature test macro _TIME_BITS. See feature_test_macros(7).

The following headers also provide time_t: <sched.h>, <sys/msg.h>, <sys/select.h>, <sys/sem.h>, <sys/shm.h>, <sys/stat.h>, <sys/time.h>, <sys/types.h>, and <utime.h>.

The following headers also provide suseconds_t: <sys/select.h> and <sys/time.h>.

SEE ALSO

stime(2), time(2), ctime(3), difftime(3), usleep(3), timeval(3type)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1592 - Linux cli command pcap_datalinkpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_datalinkpcap and provides detailed information about the command pcap_datalinkpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_datalinkpcap.

NAME 🖥️ pcap_datalinkpcap 🖥️

get the link-layer header type

SYNOPSIS

#include <pcap/pcap.h>
int pcap_datalink(pcap_t *p);

DESCRIPTION

pcap_datalink() returns the link-layer header type for the live capture or ``savefile’’ specified by p.

It must not be called on a pcap descriptor created by pcap_create(3PCAP) that has not yet been activated by pcap_activate(3PCAP).

https://www.tcpdump.org/linktypes.html lists the values pcap_datalink() can return and describes the packet formats that correspond to those values.

Do NOT assume that the packets for a given capture or ``savefile`` will have any given link-layer header type, such as DLT_EN10MB for Ethernet. For example, the “any” device on Linux will have a link-layer header type of DLT_LINUX_SLL or DLT_LINUX_SLL2 even if all devices on the system at the time the “any” device is opened have some other data link type, such as DLT_EN10MB for Ethernet.

RETURN VALUE

pcap_datalink() returns the link-layer header type on success and PCAP_ERROR_NOT_ACTIVATED if called on a capture handle that has been created but not activated.

SEE ALSO

pcap(3PCAP), pcap-linktype(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1593 - Linux cli command XtAppProcessEvent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppProcessEvent and provides detailed information about the command XtAppProcessEvent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppProcessEvent.

NAME 🖥️ XtAppProcessEvent 🖥️

query and process events and input

SYNTAX

#include <X11/Intrinsic.h>

void XtAppNextEvent(XtAppContext app_context, XEvent *event_return);

Boolean XtAppPeekEvent(XtAppContext app_context, XEvent *event_return);

XtInputMask XtAppPending(XtAppContext app_context);

void XtAppProcessEvent(XtAppContext app_context, XtInputMask mask);

Boolean XtDispatchEvent(XEvent *event);

void XtAppMainLoop(XtAppContext app_context);

ARGUMENTS

app_context
Specifies the application context that identifies the application.

event
Specifies a pointer to the event structure that is to be dispatched to the appropriate event handler.

event_return
Returns the event information to the specified event structure.

mask
Specifies what types of events to process. The mask is the bitwise inclusive OR of any combination of XtIMXEvent, XtIMTimer, XtIMAlternateInput, and XtIMSignal. As a convenience, the X Toolkit defines the symbolic name XtIMAll to be the bitwise inclusive OR of all event types.

DESCRIPTION

If the X event queue is empty, XtAppNextEvent flushes the X output buffers of each Display in the application context and waits for an event while looking at the other input sources, timeout timeout values, and signal handlers and calling any callback procedures triggered by them. This wait time can be used for background processing (see Section 7.8).

If there is an event in the queue, XtAppPeekEvent fills in the event and returns a nonzero value. If no X input is on the queue, XtAppPeekEvent flushes the output buffer and blocks until input is available (possibly calling some timeout callbacks in the process). If the input is an event, XtAppPeekEvent fills in the event and returns a nonzero value. Otherwise, the input is for an alternate input source, and XtAppPeekEvent returns zero.

The XtAppPending function returns a nonzero value if there are events pending from the X server, timer pending, or other input sources pending. The value returned is a bit mask that is the OR of XtIMXEvent, XtIMTimer, XtIMAlternateInput, and XtIMSignal (see XtAppProcessEvent). If there are no events pending, XtAppPending flushes the output buffer and returns zero.

The XtAppProcessEvent function processes one timer, alternate input, signal source, or X event. If there is nothing of the appropriate type to process, XtAppProcessEvent blocks until there is. If there is more than one type of thing available to process, it is undefined which will get processed. Usually, this procedure is not called by client applications (see XtAppMainLoop). XtAppProcessEvent processes timer events by calling any appropriate timer callbacks, alternate input by calling any appropriate alternate input callbacks, signal source by calling any appropriate signal callbacks, and X events by calling XtDispatchEvent.

When an X event is received, it is passed to XtDispatchEvent, which calls the appropriate event handlers and passes them the widget, the event, and client-specific data registered with each procedure. If there are no handlers for that event registered, the event is ignored and the dispatcher simply returns. The order in which the handlers are called is undefined.

The XtDispatchEvent function sends those events to the event handler functions that have been previously registered with the dispatch routine. XtDispatchEvent returns True if it dispatched the event to some handler and False if it found no handler to dispatch the event to. The most common use of XtDispatchEvent is to dispatch events acquired with the XtAppNextEvent procedure. However, it also can be used to dispatch user-constructed events. XtDispatchEvent also is responsible for implementing the grab semantics for XtAddGrab.

The XtAppMainLoop function processes events using XtAppProcessEvent, varying the mask parameter and using XtAppPending to ensure that it has a chance to handle events of all types, i.e., X events, timer events, input events and signal sources. This constitutes the main loop of X Toolkit applications, and, as such, it does not return unless XtAppSetExitFlag is called. Applications are expected to exit in response to some user action. There is nothing special about XtAppMainLoop; it is simply an loop that processes events until XtAppGetExitFlag() returns true.

Applications can provide their own version of this loop, which tests some global termination flag or tests that the number of top-level widgets is larger than zero before circling back for the next event.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1594 - Linux cli command inet_netof

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command inet_netof and provides detailed information about the command inet_netof, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the inet_netof.

NAME 🖥️ inet_netof 🖥️

Internet address manipulation routines

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
int inet_aton(const char *cp, struct in_addr *inp);
in_addr_t inet_addr(const char *cp);
in_addr_t inet_network(const char *cp);
[[deprecated]] char *inet_ntoa(struct in_addr in);
[[deprecated]] struct in_addr inet_makeaddr(in_addr_t net,
 in_addr_t host);
[[deprecated]] in_addr_t inet_lnaof(struct in_addr in);
[[deprecated]] in_addr_t inet_netof(struct in_addr in);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

inet_aton(), inet_ntoa():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    In glibc up to and including 2.19:
        _BSD_SOURCE || _BSD_SOURCE

DESCRIPTION

inet_aton() converts the Internet host address cp from the IPv4 numbers-and-dots notation into binary form (in network byte order) and stores it in the structure that inp points to. inet_aton() returns nonzero if the address is valid, zero if not. The address supplied in cp can have one of the following forms:

a.b.c.d
Each of the four numeric parts specifies a byte of the address; the bytes are assigned in left-to-right order to produce the binary address.

a.b.c
Parts a and b specify the first two bytes of the binary address. Part c is interpreted as a 16-bit value that defines the rightmost two bytes of the binary address. This notation is suitable for specifying (outmoded) Class B network addresses.

a.b
Part a specifies the first byte of the binary address. Part b is interpreted as a 24-bit value that defines the rightmost three bytes of the binary address. This notation is suitable for specifying (outmoded) Class A network addresses.

a
The value a is interpreted as a 32-bit value that is stored directly into the binary address without any byte rearrangement.

In all of the above forms, components of the dotted address can be specified in decimal, octal (with a leading 0), or hexadecimal, with a leading 0X). Addresses in any of these forms are collectively termed IPV4 numbers-and-dots notation. The form that uses exactly four decimal numbers is referred to as IPv4 dotted-decimal notation (or sometimes: IPv4 dotted-quad notation).

inet_aton() returns 1 if the supplied string was successfully interpreted, or 0 if the string is invalid (errno is not set on error).

The inet_addr() function converts the Internet host address cp from IPv4 numbers-and-dots notation into binary data in network byte order. If the input is invalid, INADDR_NONE (usually -1) is returned. Use of this function is problematic because -1 is a valid address (255.255.255.255). Avoid its use in favor of inet_aton(), inet_pton(3), or getaddrinfo(3), which provide a cleaner way to indicate error return.

The inet_network() function converts cp, a string in IPv4 numbers-and-dots notation, into a number in host byte order suitable for use as an Internet network address. On success, the converted address is returned. If the input is invalid, -1 is returned.

The inet_ntoa() function converts the Internet host address in, given in network byte order, to a string in IPv4 dotted-decimal notation. The string is returned in a statically allocated buffer, which subsequent calls will overwrite.

The inet_lnaof() function returns the local network address part of the Internet address in. The returned value is in host byte order.

The inet_netof() function returns the network number part of the Internet address in. The returned value is in host byte order.

The inet_makeaddr() function is the converse of inet_netof() and inet_lnaof(). It returns an Internet host address in network byte order, created by combining the network number net with the local address host, both in host byte order.

The structure in_addr as used in inet_ntoa(), inet_makeaddr(), inet_lnaof(), and inet_netof() is defined in <netinet/in.h> as:

typedef uint32_t in_addr_t;
struct in_addr {
    in_addr_t s_addr;
};

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

inet_aton(), inet_addr(), inet_network(), inet_ntoa()

Thread safetyMT-Safe locale

inet_makeaddr(), inet_lnaof(), inet_netof()

Thread safetyMT-Safe

STANDARDS

inet_addr()
inet_ntoa()
POSIX.1-2008.

inet_aton()
None.

STANDARDS

inet_addr()
inet_ntoa()
POSIX.1-2001, 4.3BSD.

inet_lnaof(), inet_netof(), and inet_makeaddr() are legacy functions that assume they are dealing with classful network addresses. Classful networking divides IPv4 network addresses into host and network components at byte boundaries, as follows:

Class A
This address type is indicated by the value 0 in the most significant bit of the (network byte ordered) address. The network address is contained in the most significant byte, and the host address occupies the remaining three bytes.

Class B
This address type is indicated by the binary value 10 in the most significant two bits of the address. The network address is contained in the two most significant bytes, and the host address occupies the remaining two bytes.

Class C
This address type is indicated by the binary value 110 in the most significant three bits of the address. The network address is contained in the three most significant bytes, and the host address occupies the remaining byte.

Classful network addresses are now obsolete, having been superseded by Classless Inter-Domain Routing (CIDR), which divides addresses into network and host components at arbitrary bit (rather than byte) boundaries.

NOTES

On x86 architectures, the host byte order is Least Significant Byte first (little endian), whereas the network byte order, as used on the Internet, is Most Significant Byte first (big endian).

EXAMPLES

An example of the use of inet_aton() and inet_ntoa() is shown below. Here are some example runs:

$ ./a.out 226.000.000.037 # Last byte is in octal
226.0.0.31
$ ./a.out 0x7f.1  # First byte is in hex
127.0.0.1

Program source

#define _DEFAULT_SOURCE
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
    struct in_addr addr;
    if (argc != 2) {
        fprintf(stderr, "%s <dotted-address>

“, argv[0]); exit(EXIT_FAILURE); } if (inet_aton(argv[1], &addr) == 0) { fprintf(stderr, “Invalid address “); exit(EXIT_FAILURE); } printf("%s “, inet_ntoa(addr)); exit(EXIT_SUCCESS); }

SEE ALSO

byteorder(3), getaddrinfo(3), gethostbyname(3), getnameinfo(3), getnetent(3), inet_net_pton(3), inet_ntop(3), inet_pton(3), hosts(5), networks(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1595 - Linux cli command Moose_Meta_Method_Augmentedpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Method_Augmentedpm and provides detailed information about the command Moose_Meta_Method_Augmentedpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Method_Augmentedpm.

NAME 🖥️ Moose_Meta_Method_Augmentedpm 🖥️

A Moose Method metaclass for augmented methods

VERSION

version 2.2207

DESCRIPTION

This class implements method augmentation logic for the Moose augment keyword.

The augmentation subroutine reference will be invoked explicitly using the inner keyword from the parent class’s method definition.

INHERITANCE

Moose::Meta::Method::Augmented is a subclass of Moose::Meta::Method.

METHODS

Moose::Meta::Method::Augmented->new(%options)

This constructs a new object. It accepts the following options:

  • class The metaclass object for the class in which the augmentation is being declared. This option is required.

  • name The name of the method which we are augmenting. This method must exist in one of the class’s superclasses. This option is required.

  • method The subroutine reference which implements the augmentation. This option is required.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1596 - Linux cli command register_printf_specifier

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command register_printf_specifier and provides detailed information about the command register_printf_specifier, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the register_printf_specifier.

NAME 🖥️ register_printf_specifier 🖥️

define custom behavior for printf-like functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <printf.h>
int register_printf_specifier(int spec, printf_function func,
 printf_arginfo_size_function arginfo);
int register_printf_modifier(const wchar_t *str);
int register_printf_type(printf_va_arg_function fct);

Callbacks

typedef int printf_function(FILE *stream, const struct printf_info *info,
 const void *const args[]);
typedef int printf_arginfo_size_function(const struct printf_info *info,
 size_t n, int argtypes[n], int size[n]);
typedef void printf_va_arg_function(void *mem, va_list *ap);

Types

struct printf_info {
 int prec; // Precision
 int width; // Width
 wchar_t spec; // Format letter
 unsigned int is_long_double:1;// L or ll flag
 unsigned int is_short:1; // h flag
 unsigned int is_long:1; // l flag
 unsigned int alt:1; // # flag
 unsigned int space:1; // Space flag
 unsigned int left:1; // - flag
 unsigned int showsign:1; // + flag
 unsigned int group:1; // ' flag
 unsigned int extra:1; // For special use
 unsigned int is_char:1; // hh flag
 unsigned int wide:1; // True for wide character streams
 unsigned int i18n:1; // I flag
 unsigned int is_binary128:1; /* Floating-point argument is
  ABI-compatible with
  IEC 60559 binary128 */
 unsigned short user; // Bits for user-installed modifiers
 wchar_t pad; // Padding character
};

Constants

#define PA_FLAG_LONG_LONG /* ... */
#define PA_FLAG_LONG_DOUBLE /* ... */
#define PA_FLAG_LONG /* ... */
#define PA_FLAG_SHORT /* ... */
#define PA_FLAG_PTR /* ... */

DESCRIPTION

These functions serve to extend and/or modify the behavior of the printf(3) family of functions.

register_printf_specifier()

This function registers a custom conversion specifier for the printf(3) family of functions.

spec
The character which will be used as a conversion specifier in the format string.

func
Callback function that will be executed by the printf(3) family of functions to format the input arguments into the output stream.

stream
Output stream where the formatted output should be printed. This stream transparently represents the output, even in the case of functions that write to a string.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in arginfo.

args
Array of pointers to the arguments to the printf(3) -like function.

arginfo
Callback function that will be executed by the printf(3) family of functions to know how many arguments should be parsed for the custom specifier and also their types.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in func.

n
Number of arguments remaining to be parsed.

argtypes
This array should be set to define the type of each of the arguments that will be parsed. Each element in the array represents one of the arguments to be parsed, in the same order that they are passed to the printf(3) -like function. Each element should be set to a base type (PA_*) from the enum above, or a custom one, and optionally ORed with an appropriate length modifier (PA_FLAG_*).

The type is determined by using one of the following constants:

PA_INT
int.

PA_CHAR
int, cast to char.

PA_WCHAR
wchar_t.

PA_STRING
const char *, a ‘�’-terminated string.

PA_WSTRING
const wchar_t *, a wide character L’�’-terminated string.

PA_POINTER
void *.

PA_FLOAT
float.

PA_DOUBLE
double.

PA_LAST
TODO.

size
For user-defined types, the size of the type (in bytes) should also be specified through this array. Otherwise, leave it unused.

arginfo is called before func, and prepares some information needed to call func.

register_printf_modifier()

TODO

register_printf_type()

TODO

RETURN VALUE

register_printf_specifier(), register_printf_modifier(), and register_printf_type() return zero on success, or -1 on error.

Callbacks

The callback of type printf_function should return the number of characters written, or -1 on error.

The callback of type printf_arginfo_size_function should return the number of arguments to be parsed by this specifier. It also passes information about the type of those arguments to the caller through argtypes. On error, it should return -1.

ERRORS

EINVAL
The specifier was not a valid character.

STANDARDS

GNU.

HISTORY

register_printf_function(3) is an older function similar to register_printf_specifier(), and is now deprecated. That function can’t handle user-defined types.

register_printf_specifier() supersedes register_printf_function(3).

EXAMPLES

The following example program registers the ‘b’ and ‘B’ specifiers to print integers in binary format, mirroring rules for other unsigned conversion specifiers like ‘x’ and ‘u’. This can be used to print in binary prior to C23.

/* This code is in the public domain */
#include <err.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <printf.h>
#define GROUP_SEP  '\''
struct Printf_Pad {
    char    ch;
    size_t  len;
};
static int b_printf(FILE *stream, const struct printf_info *info,
                    const void *const args[]);
static int b_arginf_sz(const struct printf_info *info,
                    size_t n, int argtypes[n], int size[n]);
static uintmax_t b_value(const struct printf_info *info,
                    const void *arg);
static size_t b_bin_repr(char bin[UINTMAX_WIDTH],
                    const struct printf_info *info, const void *arg);
static size_t b_bin_len(const struct printf_info *info,
                    ptrdiff_t min_len);
static size_t b_pad_len(const struct printf_info *info,
                    ptrdiff_t bin_len);
static ssize_t b_print_prefix(FILE *stream,
                    const struct printf_info *info);
static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info,
                    ptrdiff_t min_len);
static ssize_t b_print_number(FILE *stream,
                    const struct printf_info *info,
                    const char bin[UINTMAX_WIDTH],
                    size_t min_len, size_t bin_len);
static char pad_ch(const struct printf_info *info);
static ssize_t pad_spaces(FILE *stream, size_t pad_len);
int
main(void)
{
    if (register_printf_specifier('b', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('b', ...)");
    if (register_printf_specifier('B', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('B', ...)");
    printf("....----....----....----....----

“); printf("%llb; “, 0x5Ellu); printf("%lB; “, 0x5Elu); printf("%b; “, 0x5Eu); printf("%hB; “, 0x5Eu); printf("%hhb; “, 0x5Eu); printf("%jb; “, (uintmax_t)0x5E); printf("%zb; “, (size_t)0x5E); printf(”….—-….—-….—-….—- “); printf(”%#b; “, 0x5Eu); printf(”%#B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf("%10b; “, 0x5Eu); printf("%010b; “, 0x5Eu); printf(”%.10b; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%-10B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%‘B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”….—-….—-….—-….—- “); printf(”%#16.12b; “, 0xAB); printf(”%-#‘20.12b; “, 0xAB); printf(”%#‘020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#020B; “, 0xAB); printf(”%‘020B; “, 0xAB); printf("%020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#021B; “, 0xAB); printf(”%‘021B; “, 0xAB); printf("%021B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#022B; “, 0xAB); printf(”%‘022B; “, 0xAB); printf("%022B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#023B; “, 0xAB); printf(”%‘023B; “, 0xAB); printf("%023B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%-#‘19.11b; “, 0xAB); printf(”%#‘019B; “, 0xAB); printf(”%#019B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%‘019B; “, 0xAB); printf("%019B; “, 0xAB); printf(”%#016b; “, 0xAB); printf(”….—-….—-….—-….—- “); return 0; } static int b_printf(FILE *stream, const struct printf_info *info, const void const args[]) { char bin[UINTMAX_WIDTH]; size_t min_len, bin_len; ssize_t len, tmp; struct Printf_Pad pad = {0}; len = 0; min_len = b_bin_repr(bin, info, args[0]); bin_len = b_bin_len(info, min_len); pad.ch = pad_ch(info); if (pad.ch == ’ ‘) pad.len = b_pad_len(info, bin_len); / Padding with ’ ’ (right aligned) / if ((pad.ch == ’ ‘) && !info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } / “0b”/“0B” prefix / if (info->alt) { tmp = b_print_prefix(stream, info); if (tmp == EOF) return EOF; len += tmp; } / Padding with ‘0’ / if (pad.ch == ‘0’) { tmp = b_pad_zeros(stream, info, min_len); if (tmp == EOF) return EOF; len += tmp; } / Print number (including leading 0s to fill precision) / tmp = b_print_number(stream, info, bin, min_len, bin_len); if (tmp == EOF) return EOF; len += tmp; / Padding with ’ ’ (left aligned) */ if (info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } return len; } static int b_arginf_sz(const struct printf_info *info, size_t n, int argtypes[n], [[maybe_unused]] int size[n]) { if (n < 1) return -1; if (info->is_long_double) argtypes[0] = PA_INT | PA_FLAG_LONG_LONG; else if (info->is_long) argtypes[0] = PA_INT | PA_FLAG_LONG; else argtypes[0] = PA_INT; return 1; } static uintmax_t b_value(const struct printf_info *info, const void *arg) { if (info->is_long_double) return *(const unsigned long long *)arg; if (info->is_long) return *(const unsigned long )arg; / short and char are both promoted to int */ return *(const unsigned int *)arg; } static size_t b_bin_repr(char bin[UINTMAX_WIDTH], const struct printf_info *info, const void *arg) { size_t min_len; uintmax_t val; val = b_value(info, arg); bin[0] = ‘0’; for (min_len = 0; val; min_len++) { bin[min_len] = ‘0’ + (val % 2); val »= 1; } return MAX(min_len, 1); } static size_t b_bin_len(const struct printf_info *info, ptrdiff_t min_len) { return MAX(info->prec, min_len); } static size_t b_pad_len(const struct printf_info *info, ptrdiff_t bin_len) { ptrdiff_t pad_len; pad_len = info->width - bin_len; if (info->alt) pad_len -= 2; if (info->group) pad_len -= (bin_len - 1) / 4; return MAX(pad_len, 0); } static ssize_t b_print_prefix(FILE *stream, const struct printf_info *info) { ssize_t len; len = 0; if (fputc(‘0’, stream) == EOF) return EOF; len++; if (fputc(info->spec, stream) == EOF) return EOF; len++; return len; } static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info, ptrdiff_t min_len) { ssize_t len; ptrdiff_t tmp; len = 0; tmp = info->width - (info->alt * 2); if (info->group) tmp -= tmp / 5 - !(tmp % 5); for (ptrdiff_t i = tmp - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static ssize_t b_print_number(FILE *stream, const struct printf_info info, const char bin[UINTMAX_WIDTH], size_t min_len, size_t bin_len) { ssize_t len; len = 0; / Print leading zeros to fill precision / for (size_t i = bin_len - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } / Print number */ for (size_t i = min_len - 1; i < min_len; i–) { if (fputc(bin[i], stream) == EOF) return EOF; len++; if (!info->group || (i % 4) || !i) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static char pad_ch(const struct printf_info *info) { if ((info->prec != -1) || (info->pad == ’ ‘) || info->left) return ’ ‘; return ‘0’; } static ssize_t pad_spaces(FILE *stream, size_t pad_len) { ssize_t len; len = 0; for (size_t i = pad_len - 1; i < pad_len; i–) { if (fputc(’ ‘, stream) == EOF) return EOF; len++; } return len; }

SEE ALSO

asprintf(3), printf(3), wprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1597 - Linux cli command sighold

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sighold and provides detailed information about the command sighold, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sighold.

NAME 🖥️ sighold 🖥️

System V signal API

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
typedef void (*sighandler_t)(int);
[[deprecated]] sighandler_t sigset(int sig, sighandler_t disp);
[[deprecated]] int sighold(int sig);
[[deprecated]] int sigrelse(int sig);
[[deprecated]] int sigignore(int sig);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sigset(), sighold(), sigrelse(), sigignore():

    _XOPEN_SOURCE >= 500

DESCRIPTION

These functions are provided in glibc as a compatibility interface for programs that make use of the historical System V signal API. This API is obsolete: new applications should use the POSIX signal API (sigaction(2), sigprocmask(2), etc.)

The sigset() function modifies the disposition of the signal sig. The disp argument can be the address of a signal handler function, or one of the following constants:

SIG_DFL
Reset the disposition of sig to the default.

SIG_IGN
Ignore sig.

SIG_HOLD
Add sig to the process’s signal mask, but leave the disposition of sig unchanged.

If disp specifies the address of a signal handler, then sig is added to the process’s signal mask during execution of the handler.

If disp was specified as a value other than SIG_HOLD, then sig is removed from the process’s signal mask.

The dispositions for SIGKILL and SIGSTOP cannot be changed.

The sighold() function adds sig to the calling process’s signal mask.

The sigrelse() function removes sig from the calling process’s signal mask.

The sigignore() function sets the disposition of sig to SIG_IGN.

RETURN VALUE

On success, sigset() returns SIG_HOLD if sig was blocked before the call, or the signal’s previous disposition if it was not blocked before the call. On error, sigset() returns -1, with errno set to indicate the error. (But see BUGS below.)

The sighold(), sigrelse(), and sigignore() functions return 0 on success; on error, these functions return -1 and set errno to indicate the error.

ERRORS

For sigset() see the ERRORS under sigaction(2) and sigprocmask(2).

For sighold() and sigrelse() see the ERRORS under sigprocmask(2).

For sigignore(), see the errors under sigaction(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sigset(), sighold(), sigrelse(), sigignore()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

sighandler_t
GNU. POSIX.1 uses the same type but without a typedef.

HISTORY

glibc 2.1. SVr4, POSIX.1-2001. POSIX.1-2008 marks these functions as obsolete, recommending the use of sigaction(2), sigprocmask(2), pthread_sigmask(3), and sigsuspend(2) instead.

NOTES

The sigset() function provides reliable signal handling semantics (as when calling sigaction(2) with sa_mask equal to 0).

On System V, the signal() function provides unreliable semantics (as when calling sigaction(2) with sa_mask equal to SA_RESETHAND | SA_NODEFER). On BSD, signal() provides reliable semantics. POSIX.1-2001 leaves these aspects of signal() unspecified. See signal(2) for further details.

In order to wait for a signal, BSD and System V both provided a function named sigpause(3), but this function has a different argument on the two systems. See sigpause(3) for details.

BUGS

Before glibc 2.2, sigset() did not unblock sig if disp was specified as a value other than SIG_HOLD.

Before glibc 2.5, sigset() does not correctly return the previous disposition of the signal in two cases. First, if disp is specified as SIG_HOLD, then a successful sigset() always returns SIG_HOLD. Instead, it should return the previous disposition of the signal (unless the signal was blocked, in which case SIG_HOLD should be returned). Second, if the signal is currently blocked, then the return value of a successful sigset() should be SIG_HOLD. Instead, the previous disposition of the signal is returned. These problems have been fixed since glibc 2.5.

SEE ALSO

kill(2), pause(2), sigaction(2), signal(2), sigprocmask(2), raise(3), sigpause(3), sigvec(3), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1598 - Linux cli command get_myaddress

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command get_myaddress and provides detailed information about the command get_myaddress, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the get_myaddress.

NAME 🖥️ get_myaddress 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1599 - Linux cli command tcgetattr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tcgetattr and provides detailed information about the command tcgetattr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tcgetattr.

NAME 🖥️ tcgetattr 🖥️

get and set terminal attributes, line control, get and set baud rate

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <termios.h>
#include <unistd.h>
int tcgetattr(int fd, struct termios *termios_p);
int tcsetattr(int fd, int optional_actions,
 const struct termios *termios_p);
int tcsendbreak(int fd, int duration);
int tcdrain(int fd);
int tcflush(int fd, int queue_selector);
int tcflow(int fd, int action);
void cfmakeraw(struct termios *termios_p);
speed_t cfgetispeed(const struct termios *termios_p);
speed_t cfgetospeed(const struct termios *termios_p);
int cfsetispeed(struct termios *termios_p, speed_t speed);
int cfsetospeed(struct termios *termios_p, speed_t speed);
int cfsetspeed(struct termios *termios_p, speed_t speed);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

cfsetspeed(), cfmakeraw():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The termios functions describe a general terminal interface that is provided to control asynchronous communications ports.

The termios structure

Many of the functions described here have a termios_p argument that is a pointer to a termios structure. This structure contains at least the following members:

tcflag_t c_iflag;      /* input modes */
tcflag_t c_oflag;      /* output modes */
tcflag_t c_cflag;      /* control modes */
tcflag_t c_lflag;      /* local modes */
cc_t     c_cc[NCCS];   /* special characters */

The values that may be assigned to these fields are described below. In the case of the first four bit-mask fields, the definitions of some of the associated flags that may be set are exposed only if a specific feature test macro (see feature_test_macros(7)) is defined, as noted in brackets ("[]").

In the descriptions below, “not in POSIX” means that the value is not specified in POSIX.1-2001, and “XSI” means that the value is specified in POSIX.1-2001 as part of the XSI extension.

c_iflag flag constants:

IGNBRK
Ignore BREAK condition on input.

BRKINT
If IGNBRK is set, a BREAK is ignored. If it is not set but BRKINT is set, then a BREAK causes the input and output queues to be flushed, and if the terminal is the controlling terminal of a foreground process group, it will cause a SIGINT to be sent to this foreground process group. When neither IGNBRK nor BRKINT are set, a BREAK reads as a null byte (‘�’), except when PARMRK is set, in which case it reads as the sequence \377 � �.

IGNPAR
Ignore framing errors and parity errors.

PARMRK
If this bit is set, input bytes with parity or framing errors are marked when passed to the program. This bit is meaningful only when INPCK is set and IGNPAR is not set. The way erroneous bytes are marked is with two preceding bytes, \377 and �. Thus, the program actually reads three bytes for one erroneous byte received from the terminal. If a valid byte has the value \377, and ISTRIP (see below) is not set, the program might confuse it with the prefix that marks a parity error. Therefore, a valid byte \377 is passed to the program as two bytes, \377 \377, in this case.

If neither IGNPAR nor PARMRK is set, read a character with a parity error or framing error as �.

INPCK
Enable input parity checking.

ISTRIP
Strip off eighth bit.

INLCR
Translate NL to CR on input.

IGNCR
Ignore carriage return on input.

ICRNL
Translate carriage return to newline on input (unless IGNCR is set).

IUCLC
(not in POSIX) Map uppercase characters to lowercase on input.

IXON
Enable XON/XOFF flow control on output.

IXANY
(XSI) Typing any character will restart stopped output. (The default is to allow just the START character to restart output.)

IXOFF
Enable XON/XOFF flow control on input.

IMAXBEL
(not in POSIX) Ring bell when input queue is full. Linux does not implement this bit, and acts as if it is always set.

IUTF8 (since Linux 2.6.4)
(not in POSIX) Input is UTF8; this allows character-erase to be correctly performed in cooked mode.

c_oflag flag constants:

OPOST
Enable implementation-defined output processing.

OLCUC
(not in POSIX) Map lowercase characters to uppercase on output.

ONLCR
(XSI) Map NL to CR-NL on output.

OCRNL
Map CR to NL on output.

ONOCR
Don’t output CR at column 0.

ONLRET
The NL character is assumed to do the carriage-return function; the kernel’s idea of the current column is set to 0 after both NL and CR.

OFILL
Send fill characters for a delay, rather than using a timed delay.

OFDEL
Fill character is ASCII DEL (0177). If unset, fill character is ASCII NUL (‘�’). (Not implemented on Linux.)

NLDLY
Newline delay mask. Values are NL0 and NL1. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

CRDLY
Carriage return delay mask. Values are CR0, CR1, CR2, or CR3. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

TABDLY
Horizontal tab delay mask. Values are TAB0, TAB1, TAB2, TAB3 (or XTABS, but see the BUGS section). A value of TAB3, that is, XTABS, expands tabs to spaces (with tab stops every eight columns). [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

BSDLY
Backspace delay mask. Values are BS0 or BS1. (Has never been implemented.) [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

VTDLY
Vertical tab delay mask. Values are VT0 or VT1.

FFDLY
Form feed delay mask. Values are FF0 or FF1. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

c_cflag flag constants:

CBAUD
(not in POSIX) Baud speed mask (4+1 bits). [requires _BSD_SOURCE or _SVID_SOURCE]

CBAUDEX
(not in POSIX) Extra baud speed mask (1 bit), included in CBAUD. [requires _BSD_SOURCE or _SVID_SOURCE]

(POSIX says that the baud speed is stored in the termios structure without specifying where precisely, and provides cfgetispeed() and cfsetispeed() for getting at it. Some systems use bits selected by CBAUD in c_cflag, other systems use separate fields, for example, sg_ispeed and sg_ospeed.)

CSIZE
Character size mask. Values are CS5, CS6, CS7, or CS8.

CSTOPB
Set two stop bits, rather than one.

CREAD
Enable receiver.

PARENB
Enable parity generation on output and parity checking for input.

PARODD
If set, then parity for input and output is odd; otherwise even parity is used.

HUPCL
Lower modem control lines after last process closes the device (hang up).

CLOCAL
Ignore modem control lines.

LOBLK
(not in POSIX) Block output from a noncurrent shell layer. For use by shl (shell layers). (Not implemented on Linux.)

CIBAUD
(not in POSIX) Mask for input speeds. The values for the CIBAUD bits are the same as the values for the CBAUD bits, shifted left IBSHIFT bits. [requires _BSD_SOURCE or _SVID_SOURCE] (Not implemented in glibc, supported on Linux via TCGET* and TCSET* ioctls; see ioctl_tty(2))

CMSPAR
(not in POSIX) Use “stick” (mark/space) parity (supported on certain serial devices): if PARODD is set, the parity bit is always 1; if PARODD is not set, then the parity bit is always 0. [requires _BSD_SOURCE or _SVID_SOURCE]

CRTSCTS
(not in POSIX) Enable RTS/CTS (hardware) flow control. [requires _BSD_SOURCE or _SVID_SOURCE]

c_lflag flag constants:

ISIG
When any of the characters INTR, QUIT, SUSP, or DSUSP are received, generate the corresponding signal.

ICANON
Enable canonical mode (described below).

XCASE
(not in POSIX; not supported under Linux) If ICANON is also set, terminal is uppercase only. Input is converted to lowercase, except for characters preceded by \ On output, uppercase characters are preceded by \ and lowercase characters are converted to uppercase. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

ECHO
Echo input characters.

ECHOE
If ICANON is also set, the ERASE character erases the preceding input character, and WERASE erases the preceding word.

ECHOK
If ICANON is also set, the KILL character erases the current line.

ECHONL
If ICANON is also set, echo the NL character even if ECHO is not set.

ECHOCTL
(not in POSIX) If ECHO is also set, terminal special characters other than TAB, NL, START, and STOP are echoed as ^X, where X is the character with ASCII code 0x40 greater than the special character. For example, character 0x08 (BS) is echoed as ^H. [requires _BSD_SOURCE or _SVID_SOURCE]

ECHOPRT
(not in POSIX) If ICANON and ECHO are also set, characters are printed as they are being erased. [requires _BSD_SOURCE or _SVID_SOURCE]

ECHOKE
(not in POSIX) If ICANON is also set, KILL is echoed by erasing each character on the line, as specified by ECHOE and ECHOPRT. [requires _BSD_SOURCE or _SVID_SOURCE]

DEFECHO
(not in POSIX) Echo only when a process is reading. (Not implemented on Linux.)

FLUSHO
(not in POSIX; not supported under Linux) Output is being flushed. This flag is toggled by typing the DISCARD character. [requires _BSD_SOURCE or _SVID_SOURCE]

NOFLSH
Disable flushing the input and output queues when generating signals for the INT, QUIT, and SUSP characters.

TOSTOP
Send the SIGTTOU signal to the process group of a background process which tries to write to its controlling terminal.

PENDIN
(not in POSIX; not supported under Linux) All characters in the input queue are reprinted when the next character is read. (bash(1) handles typeahead this way.) [requires _BSD_SOURCE or _SVID_SOURCE]

IEXTEN
Enable implementation-defined input processing. This flag, as well as ICANON must be enabled for the special characters EOL2, LNEXT, REPRINT, WERASE to be interpreted, and for the IUCLC flag to be effective.

The c_cc array defines the terminal special characters. The symbolic indices (initial values) and meaning are:

VDISCARD
(not in POSIX; not supported under Linux; 017, SI, Ctrl-O) Toggle: start/stop discarding pending output. Recognized when IEXTEN is set, and then not passed as input.

VDSUSP
(not in POSIX; not supported under Linux; 031, EM, Ctrl-Y) Delayed suspend character (DSUSP): send SIGTSTP signal when the character is read by the user program. Recognized when IEXTEN and ISIG are set, and the system supports job control, and then not passed as input.

VEOF
(004, EOT, Ctrl-D) End-of-file character (EOF). More precisely: this character causes the pending tty buffer to be sent to the waiting user program without waiting for end-of-line. If it is the first character of the line, the read(2) in the user program returns 0, which signifies end-of-file. Recognized when ICANON is set, and then not passed as input.

VEOL
(0, NUL) Additional end-of-line character (EOL). Recognized when ICANON is set.

VEOL2
(not in POSIX; 0, NUL) Yet another end-of-line character (EOL2). Recognized when ICANON is set.

VERASE
(0177, DEL, rubout, or 010, BS, Ctrl-H, or also #) Erase character (ERASE). This erases the previous not-yet-erased character, but does not erase past EOF or beginning-of-line. Recognized when ICANON is set, and then not passed as input.

VINTR
(003, ETX, Ctrl-C, or also 0177, DEL, rubout) Interrupt character (INTR). Send a SIGINT signal. Recognized when ISIG is set, and then not passed as input.

VKILL
(025, NAK, Ctrl-U, or Ctrl-X, or also @) Kill character (KILL). This erases the input since the last EOF or beginning-of-line. Recognized when ICANON is set, and then not passed as input.

VLNEXT
(not in POSIX; 026, SYN, Ctrl-V) Literal next (LNEXT). Quotes the next input character, depriving it of a possible special meaning. Recognized when IEXTEN is set, and then not passed as input.

VMIN
Minimum number of characters for noncanonical read (MIN).

VQUIT
(034, FS, Ctrl-\ Quit character (QUIT). Send SIGQUIT signal. Recognized when ISIG is set, and then not passed as input.

VREPRINT
(not in POSIX; 022, DC2, Ctrl-R) Reprint unread characters (REPRINT). Recognized when ICANON and IEXTEN are set, and then not passed as input.

VSTART
(021, DC1, Ctrl-Q) Start character (START). Restarts output stopped by the Stop character. Recognized when IXON is set, and then not passed as input.

VSTATUS
(not in POSIX; not supported under Linux; status request: 024, DC4, Ctrl-T). Status character (STATUS). Display status information at terminal, including state of foreground process and amount of CPU time it has consumed. Also sends a SIGINFO signal (not supported on Linux) to the foreground process group.

VSTOP
(023, DC3, Ctrl-S) Stop character (STOP). Stop output until Start character typed. Recognized when IXON is set, and then not passed as input.

VSUSP
(032, SUB, Ctrl-Z) Suspend character (SUSP). Send SIGTSTP signal. Recognized when ISIG is set, and then not passed as input.

VSWTCH
(not in POSIX; not supported under Linux; 0, NUL) Switch character (SWTCH). Used in System V to switch shells in shell layers, a predecessor to shell job control.

VTIME
Timeout in deciseconds for noncanonical read (TIME).

VWERASE
(not in POSIX; 027, ETB, Ctrl-W) Word erase (WERASE). Recognized when ICANON and IEXTEN are set, and then not passed as input.

An individual terminal special character can be disabled by setting the value of the corresponding c_cc element to _POSIX_VDISABLE.

The above symbolic subscript values are all different, except that VTIME, VMIN may have the same value as VEOL, VEOF, respectively. In noncanonical mode the special character meaning is replaced by the timeout meaning. For an explanation of VMIN and VTIME, see the description of noncanonical mode below.

Retrieving and changing terminal settings

tcgetattr() gets the parameters associated with the object referred by fd and stores them in the termios structure referenced by termios_p. This function may be invoked from a background process; however, the terminal attributes may be subsequently changed by a foreground process.

tcsetattr() sets the parameters associated with the terminal (unless support is required from the underlying hardware that is not available) from the termios structure referred to by termios_p. optional_actions specifies when the changes take effect:

TCSANOW
the change occurs immediately.

TCSADRAIN
the change occurs after all output written to fd has been transmitted. This option should be used when changing parameters that affect output.

TCSAFLUSH
the change occurs after all output written to the object referred by fd has been transmitted, and all input that has been received but not read will be discarded before the change is made.

Canonical and noncanonical mode

The setting of the ICANON canon flag in c_lflag determines whether the terminal is operating in canonical mode (ICANON set) or noncanonical mode (ICANON unset). By default, ICANON is set.

In canonical mode:

  • Input is made available line by line. An input line is available when one of the line delimiters is typed (NL, EOL, EOL2; or EOF at the start of line). Except in the case of EOF, the line delimiter is included in the buffer returned by read(2).

  • Line editing is enabled (ERASE, KILL; and if the IEXTEN flag is set: WERASE, REPRINT, LNEXT). A read(2) returns at most one line of input; if the read(2) requested fewer bytes than are available in the current line of input, then only as many bytes as requested are read, and the remaining characters will be available for a future read(2).

  • The maximum line length is 4096 chars (including the terminating newline character); lines longer than 4096 chars are truncated. After 4095 characters, input processing (e.g., ISIG and ECHO* processing) continues, but any input data after 4095 characters up to (but not including) any terminating newline is discarded. This ensures that the terminal can always receive more input until at least one line can be read.

In noncanonical mode input is available immediately (without the user having to type a line-delimiter character), no input processing is performed, and line editing is disabled. The read buffer will only accept 4095 chars; this provides the necessary space for a newline char if the input mode is switched to canonical. The settings of MIN (c_cc[VMIN]) and TIME (c_cc[VTIME]) determine the circumstances in which a read(2) completes; there are four distinct cases:

MIN == 0, TIME == 0 (polling read)
If data is available, read(2) returns immediately, with the lesser of the number of bytes available, or the number of bytes requested. If no data is available, read(2) returns 0.

MIN > 0, TIME == 0 (blocking read)
read(2) blocks until MIN bytes are available, and returns up to the number of bytes requested.

MIN == 0, TIME > 0 (read with timeout)
TIME specifies the limit for a timer in tenths of a second. The timer is started when read(2) is called. read(2) returns either when at least one byte of data is available, or when the timer expires. If the timer expires without any input becoming available, read(2) returns 0. If data is already available at the time of the call to read(2), the call behaves as though the data was received immediately after the call.

MIN > 0, TIME > 0 (read with interbyte timeout)
TIME specifies the limit for a timer in tenths of a second. Once an initial byte of input becomes available, the timer is restarted after each further byte is received. read(2) returns when any of the following conditions is met:

  • MIN bytes have been received.

  • The interbyte timer expires.

  • The number of bytes requested by read(2) has been received. (POSIX does not specify this termination condition, and on some other implementations read(2) does not return in this case.)

Because the timer is started only after the initial byte becomes available, at least one byte will be read. If data is already available at the time of the call to read(2), the call behaves as though the data was received immediately after the call.

POSIX does not specify whether the setting of the O_NONBLOCK file status flag takes precedence over the MIN and TIME settings. If O_NONBLOCK is set, a read(2) in noncanonical mode may return immediately, regardless of the setting of MIN or TIME. Furthermore, if no data is available, POSIX permits a read(2) in noncanonical mode to return either 0, or -1 with errno set to EAGAIN.

Raw mode

cfmakeraw() sets the terminal to something like the “raw” mode of the old Version 7 terminal driver: input is available character by character, echoing is disabled, and all special processing of terminal input and output characters is disabled. The terminal attributes are set as follows:

termios_p->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
                | INLCR | IGNCR | ICRNL | IXON);
termios_p->c_oflag &= ~OPOST;
termios_p->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
termios_p->c_cflag &= ~(CSIZE | PARENB);
termios_p->c_cflag |= CS8;

Line control

tcsendbreak() transmits a continuous stream of zero-valued bits for a specific duration, if the terminal is using asynchronous serial data transmission. If duration is zero, it transmits zero-valued bits for at least 0.25 seconds, and not more than 0.5 seconds. If duration is not zero, it sends zero-valued bits for some implementation-defined length of time.

If the terminal is not using asynchronous serial data transmission, tcsendbreak() returns without taking any action.

tcdrain() waits until all output written to the object referred to by fd has been transmitted.

tcflush() discards data written to the object referred to by fd but not transmitted, or data received but not read, depending on the value of queue_selector:

TCIFLUSH
flushes data received but not read.

TCOFLUSH
flushes data written but not transmitted.

TCIOFLUSH
flushes both data received but not read, and data written but not transmitted.

tcflow() suspends transmission or reception of data on the object referred to by fd, depending on the value of action:

TCOOFF
suspends output.

TCOON
restarts suspended output.

TCIOFF
transmits a STOP character, which stops the terminal device from transmitting data to the system.

TCION
transmits a START character, which starts the terminal device transmitting data to the system.

The default on open of a terminal file is that neither its input nor its output is suspended.

Line speed

The baud rate functions are provided for getting and setting the values of the input and output baud rates in the termios structure. The new values do not take effect until tcsetattr() is successfully called.

Setting the speed to B0 instructs the modem to “hang up”. The actual bit rate corresponding to B38400 may be altered with setserial(8).

The input and output baud rates are stored in the termios structure.

cfgetospeed() returns the output baud rate stored in the termios structure pointed to by termios_p.

cfsetospeed() sets the output baud rate stored in the termios structure pointed to by termios_p to speed, which must be one of these constants:

B0
B50
B75
B110
B134
B150
B200
B300
B600
B1200
B1800
B2400
B4800
B9600
B19200
B38400
B57600
B115200
B230400
B460800
B500000
B576000
B921600
B1000000
B1152000
B1500000
B2000000

These constants are additionally supported on the SPARC architecture:

B76800
B153600
B307200
B614400

These constants are additionally supported on non-SPARC architectures:

B2500000
B3000000
B3500000
B4000000

Due to differences between architectures, portable applications should check if a particular Bnnn constant is defined prior to using it.

The zero baud rate, B0, is used to terminate the connection. If B0 is specified, the modem control lines shall no longer be asserted. Normally, this will disconnect the line. CBAUDEX is a mask for the speeds beyond those defined in POSIX.1 (57600 and above). Thus, B57600 & CBAUDEX is nonzero.

Setting the baud rate to a value other than those defined by Bnnn constants is possible via the TCSETS2 ioctl; see ioctl_tty(2).

cfgetispeed() returns the input baud rate stored in the termios structure.

cfsetispeed() sets the input baud rate stored in the termios structure to speed, which must be specified as one of the Bnnn constants listed above for cfsetospeed(). If the input baud rate is set to the literal constant 0 (not the symbolic constant B0), the input baud rate will be equal to the output baud rate.

cfsetspeed() is a 4.4BSD extension. It takes the same arguments as cfsetispeed(), and sets both input and output speed.

RETURN VALUE

cfgetispeed() returns the input baud rate stored in the termios structure.

cfgetospeed() returns the output baud rate stored in the termios structure.

All other functions return:

0
on success.

-1
on failure and set errno to indicate the error.

Note that tcsetattr() returns success if any of the requested changes could be successfully carried out. Therefore, when making multiple changes it may be necessary to follow this call with a further call to tcgetattr() to check that all changes have been performed successfully.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tcgetattr(), tcsetattr(), tcdrain(), tcflush(), tcflow(), tcsendbreak(), cfmakeraw(), cfgetispeed(), cfgetospeed(), cfsetispeed(), cfsetospeed(), cfsetspeed()

Thread safetyMT-Safe

STANDARDS

tcgetattr()
tcsetattr()
tcsendbreak()
tcdrain()
tcflush()
tcflow()
cfgetispeed()
cfgetospeed()
cfsetispeed()
cfsetospeed()
POSIX.1-2008.

cfmakeraw()
cfsetspeed()
BSD.

HISTORY

tcgetattr()
tcsetattr()
tcsendbreak()
tcdrain()
tcflush()
tcflow()
cfgetispeed()
cfgetospeed()
cfsetispeed()
cfsetospeed()
POSIX.1-2001.

cfmakeraw()
cfsetspeed()
BSD.

NOTES

UNIX V7 and several later systems have a list of baud rates where after the values B0 through B9600 one finds the two constants EXTA, EXTB (“External A” and “External B”). Many systems extend the list with much higher baud rates.

The effect of a nonzero duration with tcsendbreak() varies. SunOS specifies a break of duration * N seconds, where N is at least 0.25, and not more than 0.5. Linux, AIX, DU, Tru64 send a break of duration milliseconds. FreeBSD and NetBSD and HP-UX and MacOS ignore the value of duration. Under Solaris and UnixWare, tcsendbreak() with nonzero duration behaves like tcdrain().

BUGS

On the Alpha architecture before Linux 4.16 (and glibc before glibc 2.28), the XTABS value was different from TAB3 and it was ignored by the N_TTY line discipline code of the terminal driver as a result (because as it wasn’t part of the TABDLY mask).

SEE ALSO

reset(1), setterm(1), stty(1), tput(1), tset(1), tty(1), ioctl_console(2), ioctl_tty(2), cc_t(3type), speed_t(3type), tcflag_t(3type), setserial(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1600 - Linux cli command getutmpx

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getutmpx and provides detailed information about the command getutmpx, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getutmpx.

NAME 🖥️ getutmpx 🖥️

copy utmp structure to utmpx, and vice versa

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <utmpx.h>
void getutmp(const struct utmpx *ux, struct utmp *u);
void getutmpx(const struct utmp *u, struct utmpx *ux);

DESCRIPTION

The getutmp() function copies the fields of the utmpx structure pointed to by ux to the corresponding fields of the utmp structure pointed to by u. The getutmpx() function performs the converse operation.

RETURN VALUE

These functions do not return a value.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getutmp(), getutmpx()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

glibc 2.1.1. Solaris, NetBSD.

NOTES

These functions exist primarily for compatibility with other systems where the utmp and utmpx structures contain different fields, or the size of corresponding fields differs. On Linux, the two structures contain the same fields, and the fields have the same sizes.

SEE ALSO

utmpdump(1), getutent(3), utmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1601 - Linux cli command hasmntopt

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command hasmntopt and provides detailed information about the command hasmntopt, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the hasmntopt.

NAME 🖥️ hasmntopt 🖥️

get filesystem descriptor file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
#include <mntent.h>
FILE *setmntent(const char *filename, const char *type);
struct mntent *getmntent(FILE *stream);
int addmntent(FILE *restrict stream,
 const struct mntent *restrict mnt);
int endmntent(FILE *streamp);
char *hasmntopt(const struct mntent *mnt, const char *opt);
/* GNU extension */
#include <mntent.h>
struct mntent *getmntent_r(FILE *restrict streamp,
 struct mntent *restrict mntbuf,
 char buf[restrict .buflen], int buflen);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getmntent_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These routines are used to access the filesystem description file /etc/fstab and the mounted filesystem description file /etc/mtab.

The setmntent() function opens the filesystem description file filename and returns a file pointer which can be used by getmntent(). The argument type is the type of access required and can take the same values as the mode argument of fopen(3). The returned stream should be closed using endmntent() rather than fclose(3).

The getmntent() function reads the next line of the filesystem description file from stream and returns a pointer to a structure containing the broken out fields from a line in the file. The pointer points to a static area of memory which is overwritten by subsequent calls to getmntent().

The addmntent() function adds the mntent structure mnt to the end of the open stream.

The endmntent() function closes the stream associated with the filesystem description file.

The hasmntopt() function scans the mnt_opts field (see below) of the mntent structure mnt for a substring that matches opt. See <mntent.h> and mount(8) for valid mount options.

The reentrant getmntent_r() function is similar to getmntent(), but stores the mntent structure in the provided *mntbuf, and stores the strings pointed to by the entries in that structure in the provided array buf of size buflen.

The mntent structure is defined in <mntent.h> as follows:

struct mntent {
    char *mnt_fsname;   /* name of mounted filesystem */
    char *mnt_dir;      /* filesystem path prefix */
    char *mnt_type;     /* mount type (see mntent.h) */
    char *mnt_opts;     /* mount options (see mntent.h) */
    int   mnt_freq;     /* dump frequency in days */
    int   mnt_passno;   /* pass number on parallel fsck */
};

Since fields in the mtab and fstab files are separated by whitespace, octal escapes are used to represent the characters space ( ), tab ( ), newline ( ), and backslash () in those files when they occur in one of the four strings in a mntent structure. The routines addmntent() and getmntent() will convert from string representation to escaped representation and back. When converting from escaped representation, the sequence \134 is also converted to a backslash.

RETURN VALUE

The getmntent() and getmntent_r() functions return a pointer to the mntent structure or NULL on failure.

The addmntent() function returns 0 on success and 1 on failure.

The endmntent() function always returns 1.

The hasmntopt() function returns the address of the substring if a match is found and NULL otherwise.

FILES

/etc/fstab
filesystem description file

/etc/mtab
mounted filesystem description file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setmntent(), endmntent(), hasmntopt()

Thread safetyMT-Safe

getmntent()

Thread safety

MT-Unsafe race:mntentbuf locale

addmntent()

Thread safety

MT-Safe race:stream locale

getmntent_r()

Thread safetyMT-Safe locale

STANDARDS

None.

HISTORY

The nonreentrant functions are from SunOS 4.1.3. A routine getmntent_r() was introduced in HP-UX 10, but it returns an int. The prototype shown above is glibc-only.

System V also has a getmntent() function but the calling sequence differs, and the returned structure is different. Under System V /etc/mnttab is used. 4.4BSD and Digital UNIX have a routine getmntinfo(), a wrapper around the system call getfsstat().

SEE ALSO

fopen(3), fstab(5), mount(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1602 - Linux cli command WWW_Mechanize_Linkpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command WWW_Mechanize_Linkpm and provides detailed information about the command WWW_Mechanize_Linkpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the WWW_Mechanize_Linkpm.

NAME 🖥️ WWW_Mechanize_Linkpm 🖥️

Link object for WWW::Mechanize

VERSION

version 2.18

SYNOPSIS

Link object to encapsulate all the stuff that Mech needs but nobody wants to deal with as an array.

Constructor

new()

my $link = WWW::Mechanize::Link->new( { url => $url, text => $text, name => $name, tag => $tag, base => $base, attr => $attr_href, } );

For compatibility, this older interface is also supported:

new( $url, $text, $name, $tag, $base, $attr_href )

Creates and returns a new WWW::Mechanize::Link object.

Accessors

URL from the link

Text of the link

NAME attribute from the source tag, if any.

Tag name (one of: “a”, “area”, “frame”, “iframe” or “meta”).

Base URL to which the links are relative.

Returns hash ref of all the attributes and attribute values in the tag.

Returns the URL as a URI::URL object.

Returns a URI::URL object for the absolute form of the string.

SEE ALSO

WWW::Mechanize and WWW::Mechanize::Image

AUTHOR

Andy Lester <andy at petdance.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2004 by Andy Lester.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1603 - Linux cli command File_MimeInfo_Roxpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command File_MimeInfo_Roxpm and provides detailed information about the command File_MimeInfo_Roxpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the File_MimeInfo_Roxpm.

NAME 🖥️ File_MimeInfo_Roxpm 🖥️

Open files by mimetype “Rox style”

SYNOPSIS

use File::MimeInfo::Magic; use File::MimeInfo::Rox qw/:magic/; # open some file with the appropriate program mime_system($somefile); # more verbose version my $mt = mimetype($somefile) || die “Could not find mimetype for $somefile “; mime_system($somefile, $mt) || die “No program to open $somefile available “;

DESCRIPTION

This module tries to mimic the behaviour of the rox file browser <http://rox.sf.net> when “opening” data files. It determines the mime type and searches in rox’s Choices directories for a program to handle that mimetype.

See the rox documentation for an extensive discussion of this mechanism.

EXPORT

The methods mime_exec and mime_system are exported, if you use the export tag :magic you get the same methods but File::MimeInfo::Magic will be used for mimetype lookup.

ENVIRONMENT

The environment variable CHOICESPATH is used when searching for rox’s config dirs. It defaults to $ENV{HOME}/Choices:/usr/local/share/Choices:/usr/share/Choices

METHODS

mime_system($file)

“mime_system($file, $mimetype, @_)”

Try to open $file with the appropriate program for files of it’s mimetype. You can use $mimetype to force the mimetype. Also if you already know the mimetype it saves a lot of time to just tell it. If either the mimetype couldn’t be determined or no appropriate program could be found undef is returned. If the actual system fails an exception is raised. All remaining arguments are passed on to the handler.

mime_exec($file)

“mime_exec($file, $mimetype, @_)”

Like mime_system() but uses exec instead of system, so it never returns if successful.

suggest_script_name($mimetype)
Returns the list ($dir, $file) for the suggested place to write new script files (or symlinks) for mimetype $mimetype. The suggested dir doesn’t need to exist.

AUTHOR

Jaap Karssenberg <[email protected]> Maintained by Michiel Beijen <[email protected]>

COPYRIGHT

Copyright (c) 2003, 2012 Jaap G Karssenberg. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

File::MimeInfo, File::MimeInfo::Magic, <http://rox.sourceforce.net>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1604 - Linux cli command getauxval

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getauxval and provides detailed information about the command getauxval, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getauxval.

NAME 🖥️ getauxval 🖥️

retrieve a value from the auxiliary vector

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/auxv.h>
unsigned long getauxval(unsigned long type);

DESCRIPTION

The getauxval() function retrieves values from the auxiliary vector, a mechanism that the kernel’s ELF binary loader uses to pass certain information to user space when a program is executed.

Each entry in the auxiliary vector consists of a pair of values: a type that identifies what this entry represents, and a value for that type. Given the argument type, getauxval() returns the corresponding value.

The value returned for each type is given in the following list. Not all type values are present on all architectures.

AT_BASE
The base address of the program interpreter (usually, the dynamic linker).

AT_BASE_PLATFORM
A pointer to a string (PowerPC and MIPS only). On PowerPC, this identifies the real platform; may differ from AT_PLATFORM. On MIPS, this identifies the ISA level (since Linux 5.7).

AT_CLKTCK
The frequency with which times(2) counts. This value can also be obtained via sysconf(_SC_CLK_TCK).

AT_DCACHEBSIZE
The data cache block size.

AT_EGID
The effective group ID of the thread.

AT_ENTRY
The entry address of the executable.

AT_EUID
The effective user ID of the thread.

AT_EXECFD
File descriptor of program.

AT_EXECFN
A pointer to a string containing the pathname used to execute the program.

AT_FLAGS
Flags (unused).

AT_FPUCW
Used FPU control word (SuperH architecture only). This gives some information about the FPU initialization performed by the kernel.

AT_GID
The real group ID of the thread.

AT_HWCAP
An architecture and ABI dependent bit-mask whose settings indicate detailed processor capabilities. The contents of the bit mask are hardware dependent (for example, see the kernel source file arch/x86/include/asm/cpufeature.h for details relating to the Intel x86 architecture; the value returned is the first 32-bit word of the array described there). A human-readable version of the same information is available via /proc/cpuinfo.

AT_HWCAP2 (since glibc 2.18)
Further machine-dependent hints about processor capabilities.

AT_ICACHEBSIZE
The instruction cache block size.

AT_L1D_CACHEGEOMETRY
Geometry of the L1 data cache, encoded with the cache line size in bytes in the bottom 16 bits and the cache associativity in the next 16 bits. The associativity is such that if N is the 16-bit value, the cache is N-way set associative.

AT_L1D_CACHESIZE
The L1 data cache size.

AT_L1I_CACHEGEOMETRY
Geometry of the L1 instruction cache, encoded as for AT_L1D_CACHEGEOMETRY.

AT_L1I_CACHESIZE
The L1 instruction cache size.

AT_L2_CACHEGEOMETRY
Geometry of the L2 cache, encoded as for AT_L1D_CACHEGEOMETRY.

AT_L2_CACHESIZE
The L2 cache size.

AT_L3_CACHEGEOMETRY
Geometry of the L3 cache, encoded as for AT_L1D_CACHEGEOMETRY.

AT_L3_CACHESIZE
The L3 cache size.

AT_PAGESZ
The system page size (the same value returned by sysconf(_SC_PAGESIZE)).

AT_PHDR
The address of the program headers of the executable.

AT_PHENT
The size of program header entry.

AT_PHNUM
The number of program headers.

AT_PLATFORM
A pointer to a string that identifies the hardware platform that the program is running on. The dynamic linker uses this in the interpretation of rpath values.

AT_RANDOM
The address of sixteen bytes containing a random value.

AT_SECURE
Has a nonzero value if this executable should be treated securely. Most commonly, a nonzero value indicates that the process is executing a set-user-ID or set-group-ID binary (so that its real and effective UIDs or GIDs differ from one another), or that it gained capabilities by executing a binary file that has capabilities (see capabilities(7)). Alternatively, a nonzero value may be triggered by a Linux Security Module. When this value is nonzero, the dynamic linker disables the use of certain environment variables (see ld-linux.so(8)) and glibc changes other aspects of its behavior. (See also secure_getenv(3).)

AT_SYSINFO
The entry point to the system call function in the vDSO. Not present/needed on all architectures (e.g., absent on x86-64).

AT_SYSINFO_EHDR
The address of a page containing the virtual Dynamic Shared Object (vDSO) that the kernel creates in order to provide fast implementations of certain system calls.

AT_UCACHEBSIZE
The unified cache block size.

AT_UID
The real user ID of the thread.

RETURN VALUE

On success, getauxval() returns the value corresponding to type. If type is not found, 0 is returned.

ERRORS

ENOENT (since glibc 2.19)
No entry corresponding to type could be found in the auxiliary vector.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getauxval()

Thread safetyMT-Safe

STANDARDS

GNU.

HISTORY

glibc 2.16.

NOTES

The primary consumer of the information in the auxiliary vector is the dynamic linker, ld-linux.so(8). The auxiliary vector is a convenient and efficient shortcut that allows the kernel to communicate a certain set of standard information that the dynamic linker usually or always needs. In some cases, the same information could be obtained by system calls, but using the auxiliary vector is cheaper.

The auxiliary vector resides just above the argument list and environment in the process address space. The auxiliary vector supplied to a program can be viewed by setting the LD_SHOW_AUXV environment variable when running a program:

$ LD_SHOW_AUXV=1 sleep 1

The auxiliary vector of any process can (subject to file permissions) be obtained via /proc/pid/auxv; see proc(5) for more information.

BUGS

Before the addition of the ENOENT error in glibc 2.19, there was no way to unambiguously distinguish the case where type could not be found from the case where the value corresponding to type was zero.

SEE ALSO

execve(2), secure_getenv(3), vdso(7), ld-linux.so(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1605 - Linux cli command Tk_chooseDirectorypm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_chooseDirectorypm and provides detailed information about the command Tk_chooseDirectorypm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_chooseDirectorypm.

NAME 🖥️ Tk_chooseDirectorypm 🖥️

pops up a dialog box for the user to select a directory.

SYNOPSIS

$widget->chooseDirectory( ?option value …? );

DESCRIPTION

The method chooseDirectory is implemented as a perl wrapper on the core tk “command” tk_chooseDirectory, and $widget is passed as the argument to the hidden -parent option.

The chooseDirectory method pops up a dialog box for the user to select a directory. The following option-value pairs are possible as command line arguments:

-initialdir dirname
Specifies that the directories in directory should be displayed when the dialog pops up. If this parameter is not specified, then the directories in the current working directory are displayed. If the parameter specifies a relative path, the return value will convert the relative path to an absolute path. This option may not always work on the Macintosh. This is not a bug. Rather, the General Controls control panel on the Mac allows the end user to override the application default directory.

-parent $widget
Makes $widget the logical parent of the dialog. The dialog is displayed on top of its parent window.

-title titleString
Specifies a string to display as the title of the dialog box. If this option is not specified, then a default title will be displayed.

-mustexist boolean
Specifies whether the user may specify non-existant directories. If this parameter is true, then the user may only select directories that already exist. The default value is false.

CAVEATS

Perl does not have a concept of encoded filesystems yet. This means that operations on filenames like opendir and open still use byte semantics. Tk however uses character semantics internally, which means that you can get filenames with the UTF-8 flag set in functions like chooseDirectory, getOpenFile and similar. It’s the user’s responsibility to determine the encoding of the underlying filesystem and convert the result into bytes, e.g.

use Encode; … my $dir = $mw->chooseDirectory; $dir = encode(“windows-1252”, $dir); opendir DIR, $dir or die $!; …

See also “When Unicode Does Not Happen” in perlunicode and “Unicode in Filenames” in perltodo.

EXAMPLE

my $dir = $mw->chooseDirectory(-initialdir => ~, -title => Choose a directory); if (!defined $dir) { warn No directory selected; } else { warn “Selected $dir”; }

SEE ALSO

Tk::getOpenFile, Tk::getOpenFile

KEYWORDS

directory selection dialog

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1606 - Linux cli command sigrelse

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigrelse and provides detailed information about the command sigrelse, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigrelse.

NAME 🖥️ sigrelse 🖥️

System V signal API

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
typedef void (*sighandler_t)(int);
[[deprecated]] sighandler_t sigset(int sig, sighandler_t disp);
[[deprecated]] int sighold(int sig);
[[deprecated]] int sigrelse(int sig);
[[deprecated]] int sigignore(int sig);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sigset(), sighold(), sigrelse(), sigignore():

    _XOPEN_SOURCE >= 500

DESCRIPTION

These functions are provided in glibc as a compatibility interface for programs that make use of the historical System V signal API. This API is obsolete: new applications should use the POSIX signal API (sigaction(2), sigprocmask(2), etc.)

The sigset() function modifies the disposition of the signal sig. The disp argument can be the address of a signal handler function, or one of the following constants:

SIG_DFL
Reset the disposition of sig to the default.

SIG_IGN
Ignore sig.

SIG_HOLD
Add sig to the process’s signal mask, but leave the disposition of sig unchanged.

If disp specifies the address of a signal handler, then sig is added to the process’s signal mask during execution of the handler.

If disp was specified as a value other than SIG_HOLD, then sig is removed from the process’s signal mask.

The dispositions for SIGKILL and SIGSTOP cannot be changed.

The sighold() function adds sig to the calling process’s signal mask.

The sigrelse() function removes sig from the calling process’s signal mask.

The sigignore() function sets the disposition of sig to SIG_IGN.

RETURN VALUE

On success, sigset() returns SIG_HOLD if sig was blocked before the call, or the signal’s previous disposition if it was not blocked before the call. On error, sigset() returns -1, with errno set to indicate the error. (But see BUGS below.)

The sighold(), sigrelse(), and sigignore() functions return 0 on success; on error, these functions return -1 and set errno to indicate the error.

ERRORS

For sigset() see the ERRORS under sigaction(2) and sigprocmask(2).

For sighold() and sigrelse() see the ERRORS under sigprocmask(2).

For sigignore(), see the errors under sigaction(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sigset(), sighold(), sigrelse(), sigignore()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

sighandler_t
GNU. POSIX.1 uses the same type but without a typedef.

HISTORY

glibc 2.1. SVr4, POSIX.1-2001. POSIX.1-2008 marks these functions as obsolete, recommending the use of sigaction(2), sigprocmask(2), pthread_sigmask(3), and sigsuspend(2) instead.

NOTES

The sigset() function provides reliable signal handling semantics (as when calling sigaction(2) with sa_mask equal to 0).

On System V, the signal() function provides unreliable semantics (as when calling sigaction(2) with sa_mask equal to SA_RESETHAND | SA_NODEFER). On BSD, signal() provides reliable semantics. POSIX.1-2001 leaves these aspects of signal() unspecified. See signal(2) for further details.

In order to wait for a signal, BSD and System V both provided a function named sigpause(3), but this function has a different argument on the two systems. See sigpause(3) for details.

BUGS

Before glibc 2.2, sigset() did not unblock sig if disp was specified as a value other than SIG_HOLD.

Before glibc 2.5, sigset() does not correctly return the previous disposition of the signal in two cases. First, if disp is specified as SIG_HOLD, then a successful sigset() always returns SIG_HOLD. Instead, it should return the previous disposition of the signal (unless the signal was blocked, in which case SIG_HOLD should be returned). Second, if the signal is currently blocked, then the return value of a successful sigset() should be SIG_HOLD. Instead, the previous disposition of the signal is returned. These problems have been fixed since glibc 2.5.

SEE ALSO

kill(2), pause(2), sigaction(2), signal(2), sigprocmask(2), raise(3), sigpause(3), sigvec(3), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1607 - Linux cli command toascii

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command toascii and provides detailed information about the command toascii, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the toascii.

NAME 🖥️ toascii 🖥️

convert character to ASCII

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
[[deprecated]] int toascii(int c);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

toascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

toascii() converts c to a 7-bit unsigned char value that fits into the ASCII character set, by clearing the high-order bits.

RETURN VALUE

The value returned is that of the converted character.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

toascii()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

SVr4, BSD, POSIX.1-2001. Obsolete in POSIX.1-2008, noting that it cannot be used portably in a localized application.

BUGS

Many people will be unhappy if you use this function. This function will convert accented letters into random characters.

SEE ALSO

isascii(3), tolower(3), toupper(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1608 - Linux cli command Net_DNS_Nameserverpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_Nameserverpm and provides detailed information about the command Net_DNS_Nameserverpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_Nameserverpm.

NAME 🖥️ Net_DNS_Nameserverpm 🖥️

DNS server class

SYNOPSIS

use Net::DNS::Nameserver; my $nameserver = Net::DNS::Nameserver->new( LocalAddr => [::1, 127.0.0.1], LocalPort => 15353, ZoneFile => filename ); my $nameserver = Net::DNS::Nameserver->new( LocalAddr => 10.1.2.3, LocalPort => 15353, ReplyHandler => \reply_handler ); $nameserver->start_server($timeout); $nameserver->stop_server;

DESCRIPTION

Net::DNS::Nameserver offers a simple mechanism for instantiation of customised DNS server objects intended to provide test responses to queries emanating from a client resolver.

It is not, nor will it ever be, a general-purpose DNS nameserver implementation.

See “EXAMPLES” below for further details.

METHODS

new

$nameserver = Net::DNS::Nameserver->new( LocalAddr => [::1, 127.0.0.1], LocalPort => 15353, ZoneFile => “filename” ); $nameserver = Net::DNS::Nameserver->new( LocalAddr => 10.1.2.3, LocalPort => 15353, ReplyHandler => \reply_handler, Verbose => 1, Truncate => 0 );

Instantiates a Net::DNS::Nameserver object. An exception is raised if the object could not be created.

Each instance is configured using the following optional arguments:

LocalAddr IP address on which to listen Defaults to loopback address LocalPort Port on which to listen ZoneFile Name of file containing RRs accessed using the internal reply-handling subroutine ReplyHandler Reference to customised reply-handling subroutine NotifyHandler Reference to reply-handling subroutine for queries with opcode NOTIFY (RFC1996) UpdateHandler Reference to reply-handling subroutine for queries with opcode UPDATE (RFC2136) Verbose Report internal activity Defaults to 0 (off) Truncate Truncates UDP packets that are too big for the reply Defaults to 1 (on)

The LocalAddr attribute may alternatively be specified as an array of IP addresses to listen to.

The ReplyHandler subroutine is passed the query name, query class, query type, peerhost, query record, and connection descriptor. It must either return the response code and references to the answer, authority, and additional sections of the response, or undef to leave the query unanswered. Common response codes are:

NOERROR No error FORMERR Format error SERVFAIL Server failure NXDOMAIN Non-existent domain (name doesnt exist) NOTIMP Not implemented REFUSED Query refused

For advanced usage it may also contain a headermask containing an hashref with the settings for the aa, ra, and ad header bits. The argument is of the form: {ad => 1, aa => 0, ra => 1}

EDNS options may be specified in a similar manner using the optionmask: {$optioncode => $value, $optionname => $value}

See RFC1035 and IANA DNS parameters file for more information:

The nameserver will listen for both UDP and TCP connections. On linux and other Unix-like systems, unprivileged users are denied access to ports below 1024.

UDP reply truncation functionality was introduced in Net::DNS 0.66. The size limit is determined by the EDNS0 size advertised in the query, otherwise 512 is used. If you want to do packet truncation yourself you should set Truncate=>0 and truncate the reply packet in the code of the ReplyHandler.

start_server

$ns->start_server( <TIMEOUT_IN_SECONDS> );

Starts a server process for each of the specified UDP and TCP sockets which continuously responds to user connections.

The timeout parameter specifies the time the server is to remain active. If called with no parameter a default timeout of 10 minutes is applied.

stop_server

$ns->stop_server();

Terminates all server processes in an orderly fashion.

EXAMPLES

Example 1: Test script with embedded nameserver

The following example is a self-contained test script which queries DNS zonefile data served by an embedded Net::DNS::Nameserver instance.

use strict; use warnings; use Test::More; plan skip_all => Net::DNS::Nameserver not available unless eval { require Net::DNS::Nameserver } and Net::DNS::Nameserver->can(start_server); plan tests => 2; my $resolver = Net::DNS::Resolver->new( nameserver => [::1, 127.0.0.1], port => 15353 ); my $ns = Net::DNS::Nameserver->new( LocalAddr => [$resolver->nameserver], LocalPort => $resolver->port, Verbose => 0, ZoneFile => \DATA ) || die “couldnt create nameserver object”; $ns->start_server(10); my $reply = $resolver->send(qw(example.com SOA)); is( ref($reply), Net::DNS::Packet, received reply packet ); my ($rr) = $reply->answer; is( $rr->type, SOA, answer contains SOA record ); $ns->stop_server(); exit; _ _DATA_ _ $ORIGIN example.com. @ IN SOA mname rname 2023 2h 1h 2w 1h www IN A 93.184.216.34

Example 2: Free-standing customised DNS nameserver

The following example will listen on port 15353 and respond to all queries for A records with the IP address 10.1.2.3. All other queries will be answered with NXDOMAIN. Authority and additional sections are left empty. The $peerhost variable catches the IP address of the peer host, so that additional filtering on a per-host basis may be applied.

use strict; use warnings; use Net::DNS::Nameserver; sub reply_handler { my ( $qname, $qclass, $qtype, $peerhost, $query, $conn ) = @_; my ( $rcode, @ans, @auth, @add ); print “Received query from $peerhost to " . $conn->{sockhost} . " “; $query->print; if ( $qtype eq “A” && $qname eq “foo.example.com” ) { my ( $ttl, $rdata ) = ( 3600, “10.1.2.3” ); my $rr = Net::DNS::RR->new("$qname $ttl $qclass $qtype $rdata”); push @ans, $rr; $rcode = “NOERROR”; } elsif ( $qname eq “foo.example.com” ) { $rcode = “NOERROR”; } else { $rcode = “NXDOMAIN”; } # mark the answer as authoritative (by setting the aa flag) my $headermask = {aa => 1}; # specify EDNS options { option => value } my $optionmask = {}; return ( $rcode, \ans, \auth, \add, $headermask, $optionmask ); } my $ns = Net::DNS::Nameserver->new( LocalPort => 15353, ReplyHandler => \reply_handler, Verbose => 1 ) or die “couldnt create nameserver object”; $ns->start_server(60); exit; # leaving nameserver processes running

BUGS

Limitations in perl make it impossible to guarantee that replies to UDP queries from Net::DNS::Nameserver are sent from the IP-address to which the query was directed, the source address being chosen by the operating system based upon its notion of “closest address”. This limitation is mitigated by creating a separate set of sockets and server subprocesses bound to each IP address.

COPYRIGHT

Copyright (c)2000 Michael Fuhr.

Portions Copyright (c)2002-2004 Chris Reinhardt.

Portions Copyright (c)2005 Robert Martin-Legene.

Portions Copyright (c)2005-2009 O.M.Kolkman, RIPE NCC.

Portions Copyright (c)2017-2024 R.W.Franks.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::Resolver Net::DNS::Packet Net::DNS::Update Net::DNS::Header Net::DNS::Question Net::DNS::RR

RFC1035 <https://tools.ietf.org/html/rfc1035>

IANA DNS parameters <http://www.iana.org/assignments/dns-parameters>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1609 - Linux cli command zip_source_win32a_create

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_win32a_create and provides detailed information about the command zip_source_win32a_create, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_win32a_create.

libzip (-lzip)

The functions

and

create a zip source on Windows using a Windows ANSI name. They open

and read

bytes from offset

from it. If

is 0 or -1, the whole file (starting from

is used.

If the file supports seek, the source can be used to open a zip archive from.

The file is opened and read when the data from the source is used, usually by

or

Upon successful completion, the created source is returned. Otherwise,

is returned and the error code in

or

is set to indicate the error.

and

fail if:

or

are invalid.

Required memory could not be allocated.

Opening

failed.

and

were added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1610 - Linux cli command gmtime_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gmtime_r and provides detailed information about the command gmtime_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gmtime_r.

NAME 🖥️ gmtime_r 🖥️

transform date and time to broken-down time or ASCII

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <time.h>
char *asctime(const struct tm *tm);
char *asctime_r(const struct tm *restrict tm,
 char buf[restrict 26]);
char *ctime(const time_t *timep);
char *ctime_r(const time_t *restrict timep,
 char buf[restrict 26]);
struct tm *gmtime(const time_t *timep);
struct tm *gmtime_r(const time_t *restrict timep,
 struct tm *restrict result);
struct tm *localtime(const time_t *timep);
struct tm *localtime_r(const time_t *restrict timep,
 struct tm *restrict result);
time_t mktime(struct tm *tm);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

asctime_r(), ctime_r(), gmtime_r(), localtime_r():

    _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The ctime(), gmtime(), and localtime() functions all take an argument of data type time_t, which represents calendar time. When interpreted as an absolute time value, it represents the number of seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).

The asctime() and mktime() functions both take an argument representing broken-down time, which is a representation separated into year, month, day, and so on.

Broken-down time is stored in the structure tm, described in tm(3type).

The call ctime(t) is equivalent to asctime(localtime(t)). It converts the calendar time t into a null-terminated string of the form

"Wed Jun 30 21:49:08 1993

"

The abbreviations for the days of the week are “Sun”, “Mon”, “Tue”, “Wed”, “Thu”, “Fri”, and “Sat”. The abbreviations for the months are “Jan”, “Feb”, “Mar”, “Apr”, “May”, “Jun”, “Jul”, “Aug”, “Sep”, “Oct”, “Nov”, and “Dec”. The return value points to a statically allocated string which might be overwritten by subsequent calls to any of the date and time functions. The function also sets the external variables tzname, timezone, and daylight (see tzset(3)) with information about the current timezone. The reentrant version ctime_r() does the same, but stores the string in a user-supplied buffer which should have room for at least 26 bytes. It need not set tzname, timezone, and daylight.

The gmtime() function converts the calendar time timep to broken-down time representation, expressed in Coordinated Universal Time (UTC). It may return NULL when the year does not fit into an integer. The return value points to a statically allocated struct which might be overwritten by subsequent calls to any of the date and time functions. The gmtime_r() function does the same, but stores the data in a user-supplied struct.

The localtime() function converts the calendar time timep to broken-down time representation, expressed relative to the user’s specified timezone. The function acts as if it called tzset(3) and sets the external variables tzname with information about the current timezone, timezone with the difference between Coordinated Universal Time (UTC) and local standard time in seconds, and daylight to a nonzero value if daylight savings time rules apply during some part of the year. The return value points to a statically allocated struct which might be overwritten by subsequent calls to any of the date and time functions. The localtime_r() function does the same, but stores the data in a user-supplied struct. It need not set tzname, timezone, and daylight.

The asctime() function converts the broken-down time value tm into a null-terminated string with the same format as ctime(). The return value points to a statically allocated string which might be overwritten by subsequent calls to any of the date and time functions. The asctime_r() function does the same, but stores the string in a user-supplied buffer which should have room for at least 26 bytes.

The mktime() function converts a broken-down time structure, expressed as local time, to calendar time representation. The function ignores the values supplied by the caller in the tm_wday and tm_yday fields. The value specified in the tm_isdst field informs mktime() whether or not daylight saving time (DST) is in effect for the time supplied in the tm structure: a positive value means DST is in effect; zero means that DST is not in effect; and a negative value means that mktime() should (use timezone information and system databases to) attempt to determine whether DST is in effect at the specified time.

The mktime() function modifies the fields of the tm structure as follows: tm_wday and tm_yday are set to values determined from the contents of the other fields; if structure members are outside their valid interval, they will be normalized (so that, for example, 40 October is changed into 9 November); tm_isdst is set (regardless of its initial value) to a positive value or to 0, respectively, to indicate whether DST is or is not in effect at the specified time. Calling mktime() also sets the external variable tzname with information about the current timezone.

If the specified broken-down time cannot be represented as calendar time (seconds since the Epoch), mktime() returns (time_t) -1 and does not alter the members of the broken-down time structure.

RETURN VALUE

On success, gmtime() and localtime() return a pointer to a struct tm.

On success, gmtime_r() and localtime_r() return the address of the structure pointed to by result.

On success, asctime() and ctime() return a pointer to a string.

On success, asctime_r() and ctime_r() return a pointer to the string pointed to by buf.

On success, mktime() returns the calendar time (seconds since the Epoch), expressed as a value of type time_t.

On error, mktime() returns the value (time_t) -1. The remaining functions return NULL on error. On error, errno is set to indicate the error.

ERRORS

EOVERFLOW
The result cannot be represented.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

asctime()

Thread safety

MT-Unsafe race:asctime locale

asctime_r()

Thread safety

MT-Safe locale

ctime()

Thread safety

MT-Unsafe race:tmbuf race:asctime env locale

ctime_r(), gmtime_r(), localtime_r(), mktime()

Thread safety

MT-Safe env locale

gmtime(), localtime()

Thread safety

MT-Unsafe race:tmbuf env locale

VERSIONS

POSIX doesn’t specify the parameters of ctime_r() to be restrict; that is specific to glibc.

In many implementations, including glibc, a 0 in tm_mday is interpreted as meaning the last day of the preceding month.

According to POSIX.1-2001, localtime() is required to behave as though tzset(3) was called, while localtime_r() does not have this requirement. For portable code, tzset(3) should be called before localtime_r().

STANDARDS

asctime()
ctime()
gmtime()
localtime()
mktime()
C11, POSIX.1-2008.

asctime_r()
ctime_r()
gmtime_r()
localtime_r()
POSIX.1-2008.

HISTORY

gmtime()
localtime()
mktime()
C89, POSIX.1-2001.

asctime()
ctime()
C89, POSIX.1-2001. Marked obsolete in POSIX.1-2008 (recommending strftime(3)).

gmtime_r()
localtime_r()
POSIX.1-2001.

asctime_r()
ctime_r()
POSIX.1-2001. Marked obsolete in POSIX.1-2008 (recommending strftime(3)).

NOTES

The four functions asctime(), ctime(), gmtime(), and localtime() return a pointer to static data and hence are not thread-safe. The thread-safe versions, asctime_r(), ctime_r(), gmtime_r(), and localtime_r(), are specified by SUSv2.

POSIX.1-2001 says: “The asctime(), ctime(), gmtime(), and localtime() functions shall return values in one of two static objects: a broken-down time structure and an array of type char. Execution of any of the functions may overwrite the information returned in either of these objects by any of the other functions.” This can occur in the glibc implementation.

SEE ALSO

date(1), gettimeofday(2), time(2), utime(2), clock(3), difftime(3), strftime(3), strptime(3), timegm(3), tzset(3), time(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1611 - Linux cli command gammal

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gammal and provides detailed information about the command gammal, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gammal.

NAME 🖥️ gammal 🖥️

(logarithm of the) gamma function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
[[deprecated]] double gamma(double x);
[[deprecated]] float gammaf(float x);
[[deprecated]] long double gammal(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

gamma():

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

gammaf(), gammal():

    _XOPEN_SOURCE >= 600 || (_XOPEN_SOURCE && _ISOC99_SOURCE)
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions are deprecated: instead, use either the tgamma(3) or the lgamma(3) functions, as appropriate.

For the definition of the Gamma function, see tgamma(3).

*BSD version

The libm in 4.4BSD and some versions of FreeBSD had a gamma() function that computes the Gamma function, as one would expect.

glibc version

glibc has a gamma() function that is equivalent to lgamma(3) and computes the natural logarithm of the Gamma function.

RETURN VALUE

See lgamma(3).

ERRORS

See lgamma(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

gamma(), gammaf(), gammal()

Thread safetyMT-Unsafe race:signgam

STANDARDS

None.

HISTORY

SVID 2.

Because of historical variations in behavior across systems, this function is not specified in any recent standard.

4.2BSD had a gamma() that computed ln(|Gamma(|x|)|), leaving the sign of Gamma(|x|) in the external integer signgam. In 4.3BSD the name was changed to lgamma(3), and the man page promises

“At some time in the future the name gamma will be rehabilitated and used for the Gamma function”

This did indeed happen in 4.4BSD, where gamma() computes the Gamma function (with no effect on signgam). However, this came too late, and we now have tgamma(3), the “true gamma” function.

SEE ALSO

lgamma(3), signgam(3), tgamma(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1612 - Linux cli command Net_DNS_Resolver_Recursepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_Resolver_Recursepm and provides detailed information about the command Net_DNS_Resolver_Recursepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_Resolver_Recursepm.

NAME 🖥️ Net_DNS_Resolver_Recursepm 🖥️

DNS recursive resolver

SYNOPSIS

use Net::DNS::Resolver::Recurse; my $resolver = new Net::DNS::Resolver::Recurse(); $resolver->hints(198.41.0.4); # A.ROOT-SERVER.NET. my $packet = $resolver->send( www.rob.com.au., A );

DESCRIPTION

This module is a subclass of Net::DNS::Resolver.

METHODS

This module inherits almost all the methods from Net::DNS::Resolver. Additional module-specific methods are described below.

hints

This method specifies a list of the IP addresses of nameservers to be used to discover the addresses of the root nameservers.

$resolver->hints(@ip);

If no hints are passed, the priming query is directed to nameservers drawn from a built-in list of IP addresses.

query, search, send

The query(), search() and send() methods produce the same result as their counterparts in Net::DNS::Resolver.

$packet = $resolver->send( www.example.com., A );

Server-side recursion is suppressed by clearing the recurse flag in query packets and recursive name resolution is performed explicitly.

The query() and search() methods are inherited from Net::DNS::Resolver and invoke send() indirectly.

callback

This method specifies a code reference to a subroutine, which is then invoked at each stage of the recursive lookup.

For example to emulate dig’s +trace function:

my $coderef = sub { my $packet = shift; printf “;; Received %d bytes from %s

“, $packet->answersize, $packet->answerfrom; }; $resolver->callback($coderef);

The callback subroutine is not called for queries for missing glue records.

ACKNOWLEDGEMENT

This package is an improved and compatible reimplementation of the Net::DNS::Resolver::Recurse.pm created by Rob Brown in 2002, whose contribution is gratefully acknowledged.

COPYRIGHT

Copyright (c)2014,2019 Dick Franks.

Portions Copyright (c)2002 Rob Brown.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

Net::DNS::Resolver

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1613 - Linux cli command setnetgrent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setnetgrent and provides detailed information about the command setnetgrent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setnetgrent.

NAME 🖥️ setnetgrent 🖥️

handle network group entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
int setnetgrent(const char *netgroup);
void endnetgrent(void);
int getnetgrent(char **restrict host,
 char **restrict user, char **restrict domain);
int getnetgrent_r(char **restrict host,
 char **restrict user, char **restrict domain,
 char buf[restrict .buflen], size_t buflen);
int innetgr(const char *netgroup, const char *host,
 const char *user, const char *domain);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

setnetgrent(), endnetgrent(), getnetgrent(), getnetgrent_r(), innetgr():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The netgroup is a SunOS invention. A netgroup database is a list of string triples (hostname, username, domainname) or other netgroup names. Any of the elements in a triple can be empty, which means that anything matches. The functions described here allow access to the netgroup databases. The file /etc/nsswitch.conf defines what database is searched.

The setnetgrent() call defines the netgroup that will be searched by subsequent getnetgrent() calls. The getnetgrent() function retrieves the next netgroup entry, and returns pointers in host, user, domain. A null pointer means that the corresponding entry matches any string. The pointers are valid only as long as there is no call to other netgroup-related functions. To avoid this problem you can use the GNU function getnetgrent_r() that stores the strings in the supplied buffer. To free all allocated buffers use endnetgrent().

In most cases you want to check only if the triplet (hostname, username, domainname) is a member of a netgroup. The function innetgr() can be used for this without calling the above three functions. Again, a null pointer is a wildcard and matches any string. The function is thread-safe.

RETURN VALUE

These functions return 1 on success and 0 for failure.

FILES

/etc/netgroup
/etc/nsswitch.conf

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setnetgrent(), getnetgrent_r(), innetgr()

Thread safety

MT-Unsafe race:netgrent locale

endnetgrent()

Thread safety

MT-Unsafe race:netgrent

getnetgrent()

Thread safety

MT-Unsafe race:netgrent race:netgrentbuf locale

In the above table, netgrent in race:netgrent signifies that if any of the functions setnetgrent(), getnetgrent_r(), innetgr(), getnetgrent(), or endnetgrent() are used in parallel in different threads of a program, then data races could occur.

VERSIONS

In the BSD implementation, setnetgrent() returns void.

STANDARDS

None.

HISTORY

setnetgrent(), endnetgrent(), getnetgrent(), and innetgr() are available on most UNIX systems. getnetgrent_r() is not widely available on other systems.

SEE ALSO

sethostent(3), setprotoent(3), setservent(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1614 - Linux cli command XML_DOM_NamedNodeMappm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_DOM_NamedNodeMappm and provides detailed information about the command XML_DOM_NamedNodeMappm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_DOM_NamedNodeMappm.

NAME 🖥️ XML_DOM_NamedNodeMappm 🖥️

A hash table interface for XML::DOM

DESCRIPTION

Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name. Note that NamedNodeMap does not inherit from NodeList; NamedNodeMaps are not maintained in any particular order. Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal index, but this is simply to allow convenient enumeration of the contents of a NamedNodeMap, and does not imply that the DOM specifies an order to these Nodes.

Note that in this implementation, the objects added to a NamedNodeMap are kept in order.

METHODS

getNamedItem (name)
Retrieves a node specified by name. Return Value: A Node (of any type) with the specified name, or undef if the specified name did not identify any node in the map.

setNamedItem (arg)
Adds a node using its nodeName attribute. As the nodeName attribute is used to derive the name which the node must be stored under, multiple nodes of certain types (those that have a special string value) cannot be stored as the names would clash. This is seen as preferable to allowing nodes to be aliased. Parameters: arg A node to store in a named node map. The node will later be accessible using the value of the nodeName attribute of the node. If a node with that name is already present in the map, it is replaced by the new one. Return Value: If the new Node replaces an existing node with the same name the previously existing Node is returned, otherwise undef is returned. DOMExceptions:

  • WRONG_DOCUMENT_ERR Raised if arg was created from a different document than the one that created the NamedNodeMap.

  • NO_MODIFICATION_ALLOWED_ERR Raised if this NamedNodeMap is readonly.

  • INUSE_ATTRIBUTE_ERR Raised if arg is an Attr that is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.

removeNamedItem (name)
Removes a node specified by name. If the removed node is an Attr with a default value it is immediately replaced. Return Value: The node removed from the map or undef if no node with such a name exists. DOMException:

  • NOT_FOUND_ERR Raised if there is no node named name in the map.

item (index)
Returns the indexth item in the map. If index is greater than or equal to the number of nodes in the map, this returns undef. Return Value: The node at the indexth position in the NamedNodeMap, or undef if that is not a valid index.

getLength
Returns the number of nodes in the map. The range of valid child node indices is 0 to length-1 inclusive.

Additional methods not in the DOM Spec

getValues
Returns a NodeList with the nodes contained in the NamedNodeMap. The NodeList is live, in that it reflects changes made to the NamedNodeMap. When this method is called in a list context, it returns a regular perl list containing the values. Note that this list is not live. E.g. @list = $map->getValues; # returns a perl list $nodelist = $map->getValues; # returns a NodeList (object ref.) for my $val ($map->getValues) # iterate over the values

getChildIndex (node)
Returns the index of the node in the NodeList as returned by getValues, or -1 if the node is not in the NamedNodeMap.

dispose
Removes all circular references in this NamedNodeMap and its descendants so the objects can be claimed for garbage collection. The objects should not be used afterwards.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1615 - Linux cli command Parse_Win32Registrypm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Parse_Win32Registrypm and provides detailed information about the command Parse_Win32Registrypm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Parse_Win32Registrypm.

NAME 🖥️ Parse_Win32Registrypm 🖥️

Parse Windows Registry Files

SYNOPSIS

use strict; use Parse::Win32Registry qw( :REG_ unpack_windows_time unpack_unicode_string ); my $filename = shift or die “Filename?”; my $registry = Parse::Win32Registry->new($filename) or die “$filename is not a registry file “; my $root_key = $registry->get_root_key or die “Could not get root key of $filename “; # The following code works on USER.DAT or NTUSER.DAT files my $software_key = $root_key->get_subkey(".DEFAULT\Software”) || $root_key->get_subkey(“Software”); if (defined($software_key)) { my @user_key_names = ( “Microsoft\Windows\CurrentVersion\Explorer\Shell Folders”, “Microsoft\Windows\CurrentVersion\Explorer\RunMRU”, ); foreach my $name (@user_key_names) { if (my $key = $software_key->get_subkey($name)) { print " “, $key->as_string, " “; foreach my $value ($key->get_list_of_values) { print $value->as_string, " “; } } } # This demonstrates how you can deal with a binary value # that contains a Unicode string foreach my $ver (qw(8.0 9.0 10.0 11.0)) { my $key_name = “Microsoft\Office$ver\Common\UserInfo”; if (my $key = $software_key->get_subkey($key_name)) { print " “, $key->as_string, " “; my @value_names = qw(UserName UserInitials Company); foreach my $value_name (@value_names) { if (my $value = $key->get_value($value_name)) { print $value->as_string, " “; my $data = $value->get_data; my $string = unpack_unicode_string($data); print “$value_name = $string “; } } } } } # The following code works on SYSTEM.DAT or SOFTWARE files my $software_key = $root_key->get_subkey(“Software”) || $root_key; if (defined($software_key)) { my @software_key_names = ( “Microsoft\Windows\CurrentVersion”, “Microsoft\Windows NT\CurrentVersion”, ); foreach my $name (@software_key_names) { if (my $key = $software_key->get_subkey($name)) { print " “, $key->as_string, " “; foreach my $value ($key->get_list_of_values) { print $value->as_string, " “; } } } # This demonstrates how you can deal with a Unix date # found in a registry value my $key_name = “Microsoft\Windows NT\CurrentVersion”; if (my $curver_key = $software_key->get_subkey($key_name)) { print " “, $curver_key->as_string, " “; if (my $value = $curver_key->get_value(“InstallDate”)) { print $value->as_string, " “; my $time = $value->get_data; print “InstallDate = “, scalar gmtime $time, " GMT “; print “InstallDate = “, scalar localtime $time, " Local “; } } } # The following code works on SYSTEM.DAT or SYSTEM files my $system_key = $root_key->get_subkey(“System”) || $root_key; my $ccs_name = “CurrentControlSet”; # default for Win95 if (my $key = $system_key->get_subkey(“Select”)) { my $current_value = $key->get_value(“Current”); $ccs_name = sprintf(“ControlSet%03d”, $current_value->get_data); print “CurrentControlSet = $ccs_name “; } my $ccs_key = $system_key->get_subkey($ccs_name); if (defined($ccs_key)) { my @system_key_names = ( “Control\ComputerName\ComputerName”, “Control\TimeZoneInformation”, ); foreach my $name (@system_key_names) { if (my $key = $ccs_key->get_subkey($name)) { print " “, $key->as_string, " “; foreach my $value ($key->get_list_of_values) { print $value->as_string, " “; } } } # This demonstrates how you can deal with a Windows date # found in a registry value my $key_name = “Control\Windows”; if (my $windows_key = $ccs_key->get_subkey($key_name)) { print " “, $windows_key->as_string, " “; if (my $value = $windows_key->get_value(“ShutdownTime”)) { print $value->as_string, " “; my $data = $value->get_data; my $time = unpack_windows_time($data); print “ShutdownTime = “, scalar gmtime $time, " GMT “; print “ShutdownTime = “, scalar localtime $time, " Local “; } } }

DESCRIPTION

Parse::Win32Registry is a module for parsing Windows Registry files, allowing you to read the keys and values of a registry file without going through the Windows API.

It provides an object-oriented interface to the keys and values in a registry file. Registry files are structured as trees of keys, with each key containing further subkeys or values.

The module is intended to be cross-platform, and run on those platforms where Perl will run.

It supports both Windows NT registry files (Windows NT, 2000, XP, 2003, Vista, 7) and Windows 95 registry files (Windows 95, 98, Millennium Edition).

It is intended to be used to parse offline registry files. If a registry file is currently in use, you will not be able to open it. However, you can save part or all of a currently loaded registry file using the Windows reg command if you have the appropriate administrative access.

DEPENDENCIES

Requires Perl 5.8.1. All required modules are standard modules.

METHODS

Start by creating a Registry object from a valid registry file. Use the Registry object’s get_root_key method to obtain the root key of that registry file. This root key is your first Key object. From this key, you can explore the Key and Value objects that comprise the registry file using the methods described below.

Data is read directly from a registry file when a Key or Value object is created, and discarded when the Key or Value object is destroyed. This avoids any delay in parsing an entire registry file to obtain a Key or Value object as most code only looks at a subset of the keys and values contained in a registry file.

Registry Object Methods

$registry = Parse::Win32Registry->new( ‘filename’ )
Creates a new Registry object for the specified registry file.

$registry->get_root_key
Returns the root Key object of the registry file. The root key of a registry file is not the same as one of the virtual roots of the registry (HKEY_LOCAL_MACHINE, HKEY_USERS, etc) that you might be familiar with from using tools such as REGEDIT. The names of root keys vary by operating system and by file. For example, the name of the root key of a Windows XP NTUSER.DAT file is ‘$$$PROTO.HIV’ and the name of the root key of a Windows 98 USER.DAT file is an empty string.

$registry->get_virtual_root_key

$registry->get_virtual_root_key( ‘virtual root key name’ )

Returns the virtual root Key object of the registry file. In all respects this is exactly the same as the root Key object, except that it pretends to be a virtual root by simply faking its name. It guesses the virtual root key name by looking at the filename of the registry file. For example, if the filename contains ‘SYSTEM’ the virtual root key will be named ‘HKEY_LOCAL_MACHINE\SYSTEM’. If the guess fails (because the filename is not recognised) the virtual root key will be named ‘HKEY_UNKNOWN’. You can override the guess by supplying your own root key name. You can use this to pass in your preferred root key name. For example, you could pass the filename of the registry file in as the virtual root key name, which would then cause the filename to appear as part of each key’s path.

$registry->get_timestamp
Returns the embedded timestamp for the registry file as a time value (the number of seconds since your computer’s epoch) suitable for passing to gmtime or localtime. Only Windows NT registry files have an embedded timestamp. Returns nothing if the date is out of range or if called on a Windows 95 registry file.

$registry->get_timestamp_as_string
Returns the timestamp as a ISO 8601 string, for example, ‘2010-05-30T13:57:11Z’. The Z indicates that the time is GMT (‘Zero Meridian’). Returns the string ‘(undefined)’ if the date is out of range or if called on a Windows 95 registry file.

$registry->get_embedded_filename
Returns the embedded filename for the registry file. Only Windows NT registry files have an embedded filename. Returns nothing if called on a Windows 95 registry file.

$registry->get_filename
Returns the filename of the registry file.

$registry->get_length
Returns the length of the registry file.

Key Object Methods

$key->get_name
Returns the name of the key. The root key of a Windows 95 based registry file does not have a name; this is returned as an empty string.

$key->get_path
Returns the path to the key. This shows the all of the keys from the root key to the current key, joined by the path separator ‘.

$key->get_subkey( ‘key name’ )
Returns a Key object for the specified subkey name. If a key with that name does not exist, nothing will be returned. You can specify a path to a subkey by separating keys using the path separator ‘. Remember to quote any ‘\ characters with a preceding ‘. For example: $key->get_subkey(Software\Microsoft\Windows) A path is always relative to the current key. It should start with the name of the first subkey in the path, not the current key. If any key in the path does not exist, nothing will be returned.

$key->get_value( ‘value name’ )
Returns a Value object for the specified value name. If a value with that name does not exist, nothing will be returned. The default value (displayed as ‘(Default)’ by REGEDIT) does not actually have a name. It can obtained by supplying an empty string, e.g. $key->get_value(’’);

$key->get_value_data( ‘value name’ )
Returns the data for the specified value name. If either the value or the value’s data does not exist, nothing will be returned. This is simply a shortcut for accessing the data of a value without creating an intermediate Value object. The following code: my $value = $key->get_value(value name); if (defined $value) { my $data = $value->get_data; if (defined $data) { …process data… } } can be replaced with: my $data = $key->get_value_data(value name); if (defined $data) { …process data… }

$key->get_list_of_subkeys
Returns a list of Key objects representing the subkeys of the current key. If a key has no subkeys, an empty list will be returned.

$key->get_list_of_values
Returns a list of Value objects representing the values of the current key. If a key has no values, an empty list will be returned.

$key->get_timestamp
Returns the timestamp for the key as a time value (the number of seconds since your computer’s epoch) suitable for passing to gmtime or localtime. Only Windows NT registry keys have a timestamp. Returns nothing if the date is out of range or if called on a Windows 95 registry key.

$key->get_timestamp_as_string
Returns the timestamp as an ISO 8601 string, for example, ‘2010-05-30T13:57:11Z’. The Z indicates that the time is GMT (‘Zero Meridian’). Returns the string ‘(undefined)’ if the date is out of range or if called on a Windows 95 registry key.

$key->as_string
Returns the path of the key as a string. The timestamp will be appended for Windows NT registry keys.

$key->as_regedit_export
Returns the path of the key as a string in the Windows Registry Editor Version 5.00 export format. The string will be terminated with a newline character. If used in conjunction with the get_virtual_root_key method of Registry objects this should generate key paths interoperable with those exported by REGEDIT.

$key->get_parent
Returns a Key object for parent of the current key. If the key does not have a valid parent key (which will normally only occur for the root key) nothing will be returned.

$key->is_root
Returns true if this key is the root key.

$key->get_class_name
Returns a string containing the class name associated with a key. Only a very few Windows NT registry key have class names. Returns nothing if the key has no class name or if called on a Windows 95 registry key.

$key->get_security
Returns a Security object containing the security information for the key. Only Windows NT registry keys have security information. Returns nothing if called on a Windows 95 registry key.

$key->get_subkey_iterator
Returns an iterator for retrieving the subkeys of the current key. Each time the get_next method of the iterator is used, it will return a single Key object. Keys will be returned one by one until the end of the list is reached, when nothing will be returned. It can be used as follows: my $subkey_iter = $key->get_subkey_iterator; while (my $subkey = $subkey_iter->get_next) { # do something with $subkey … } Note that it is usually simpler to just use $key->get_list_of_subkeys. An iterator might be useful when you need to control the amount of processing you are performing, such as programs that need to remain responsive to user actions.

$key->get_value_iterator
Returns an iterator for retrieving the values of the current key. Each time the get_next method of the iterator is used, it will return a single Value object. Values will be returned one by one until the end of the list is reached, when nothing will be returned. It can be used as follows: my $value_iter = $key->get_value_iterator; while (my $value = $value_iter->get_next) { # do something with $value … } Note that it is usually simpler to just use $key->get_list_of_values.

$key->get_subtree_iterator
Returns an iterator for retrieving the entire subtree of keys and values beginning at the current key. Each time the get_next method of the iterator is used, it will return either a Key object or a Key object and a Value object. Each value accompanies the key that it belongs to. Keys or Key/Value pairs will be returned one by one until the end of the list is reached, when nothing will be returned. It can be used as follows: my $subtree_iter = $key->get_subtree_iterator; while (my ($key, $value) = $subtree_iter->get_next) { if (defined $value) { # do something with $key and $value … } else { # do something with $key … } } Keys and values will be returned in the following order: root_key root_key\key1 root_key\key1, value1 root_key\key1, value2 root_key\key1\key2 root_key\key1\key2, value3 root_key\key1\key2, value4 If the iterator is used in a scalar context, only Key objects will returned. my $subtree_iter = $key->get_subtree_iterator; while (my $key = $subtree_iter->get_next) { # do something with $key … } Keys will be returned in the following order: root_key root_key\key1 root_key\key1\key2 Note that it might be simpler to write a recursive function to process the keys and values. sub traverse { my $key = shift; # do something with $key … foreach my $value ($key->get_list_of_values) { # do something with $value … } foreach my $subkey ($key->get_list_of_subkeys) { # recursively process $key traverse($subkey); } } traverse($root_key);

$key->walk( \callback );
Performs a recursive descent of all the keys in the subtree starting with the calling key, and calls the callback function for each key reached. The callback function will be passed the current key. $key->walk( sub { my $key = shift; print $key->as_string, " “; } ); $key->walk( sub { my $key = shift; print $key->as_regedit_export; foreach my $value ($key->get_list_of_values) { print $value->as_regedit_export; } } );

Value Object Methods

$value->get_name
Returns the name of the value. In both Windows NT and Windows 95 based registry files you can get values without a name. This is returned as an empty string.

$value->get_type
Returns the integer representing the type of the value (where 1 is a REG_SZ, 2 is a REG_EXPAND_SZ, etc). The constants for the value types can be imported from the Parse::Win32Registry module with use Parse::Win32Registry qw( :REG_ );

$value->get_type_as_string
Returns the type of the value as a string instead of an integer constant, making it more suitable for printed output.

$value->get_data
Returns the data for the value. REG_SZ and REG_EXPAND_SZ values will be returned as strings. String data will be converted from Unicode (UCS-2LE) for Windows NT based registry files. Any terminating null characters will be removed. REG_MULTI_SZ values will be returned as a list of strings when called in a list context, and as a string with each element separated by the list separator $” when called in a scalar context. (The list separator defaults to the space character. See perlvar for further information.) String data will be converted from Unicode (UCS-2LE) for Windows NT based registry files. # get REG_MULTI_SZ data as a string my $data = $multi_sz_value->get_data; # get REG_MULTI_SZ data as a list my @data = $multi_sz_value->get_data; REG_DWORD values are unpacked and returned as unsigned integers. All other types are returned as packed binary strings. To extract data from these packed binary strings, you will need to use Perl’s unpack function, or one of the provided support functions. Nothing will be returned if the data is invalid.

$value->get_data_as_string
Returns the data for a value, making binary data safe for printed output. REG_SZ and REG_EXPAND_SZ values will be returned directly from get_data, REG_MULTI_SZ values will have their component strings prefixed by indices to more clearly show the number of elements, and REG_DWORD values will be returned as a hexadecimal number followed by its parenthesized decimal equivalent. All other types of values will be returned as a string of hex octets. ‘(invalid data)’ will be returned if the data is invalid (i.e. when get_data returns undef). ‘(no data)’ will be returned if get_data returns an empty string.

$value->get_raw_data
Returns the data for a value exactly as it was read from the registry, without the processing normally performed by get_data. It is intended for those rare occasions when you need to access binary data that has been inappropriately stored in a REG_SZ, REG_EXPAND_SZ, REG_MULTI_SZ, or REG_DWORD value.

$value->as_string
Returns the name, type, and data for the value as a string, safe for printed output. ‘(Default)’ will be used for the names of those values that do not have names.

$value->as_regedit_export
Returns the name, type, and data for the value as a string, in the Windows Registry Editor Version 5.00 export format. The string will contain line breaks to ensure that no line is longer than 80 characters. Each line will be terminated with a newline character. ‘@’ will be used for the names of those values that do not have names. This should generate values interoperable with those exported by REGEDIT.

Security Object Methods

Only Windows NT registry files contain security information to control access to the registry keys. This information is stored in security entries which are distributed through the registry file separately from the keys that they apply to. This allows the registry to share security information amongst a large number of keys whilst unnecessary duplication.

Security entries link to other security entries in a circular chain, each entry linking to the one that precedes it and the one that follows it.

$security->get_security_descriptor
Returns a Security Descriptor Object representing the security descriptor contained in the security information registry entry.

$security->get_next
Returns the next security object.

$security->get_previous
Returns the previous security object.

$security->get_reference_count
Returns the reference count for the security object.

Security Descriptor Object Methods

A Security Descriptor object represents a security descriptor which contains an owner SID, a primary group SID, a System ACL, and a Discretionary ACL.

$security_descriptor->get_owner
Returns a SID Object containing the Owner SID.

$security_descriptor->get_group
Returns a SID Object containing the primary group SID.

$security_descriptor->get_sacl
Returns an ACL Object containing the System ACL. The System ACL contains those ACEs used for auditing. Nothing will be returned if the security descriptor does not contain a System ACL.

$security_descriptor->get_dacl
Returns an ACL Object containing the Discretionary ACL. The Discretionary ACL contains those ACEs used for access control. Nothing will be returned if the security descriptor does not contain a Discretionary ACL.

$security_descriptor->as_stanza
Returns a multi-line string containing the security descriptor formatted for presentation. It will contain a line for the owner SID, the group SID, and each component ACE of the System ACL and the Discretionary ACL. Each line will be terminated by a newline character.

ACL Object Methods

An ACL object represents an Access Control List, which comprises a list of Access Control Entries.

$acl->get_list_of_aces
Returns a list of ACE Objects representing the ACEs in the order they appear in the ACL. If the ACL contains no ACEs, nothing will be returned.

$acl->as_stanza
Returns a multi-line string containing the ACL formatted for presentation. It will contain a line for each component ACE of the ACL. Each line will be terminated by a newline character.

ACE Object Methods

An ACE object represents an Access Control Entry. An ACE describes the permissions assigned (the access mask) to a Security Identifier (the trustee).

$ace->get_type
Returns an integer containing the ACE type, where 0 indicates an ACCESS_ALLOWED ACE, 1 an ACCESS_DENIED ACE, and 2 a SYSTEM_AUDIT ACE. Typically you will encounter ACCESS_ALLOWED and ACCESS_DENIED ACEs in Discretionary ACLs and SYSTEM_AUDIT ACEs in System ACLs.

$ace->get_type_as_string
Returns the type as a string, rather than integer.

$ace->get_flags
Returns an integer containing the ACE flags.

$ace->get_access_mask
Returns an integer containing the ACE access mask. The access mask controls what actions the trustee might perform with the object the ACE applies to.

$ace->get_trustee
Returns a SID Object containing the trustee that this ACE is associated with.

$ace->as_string
Returns a string containing the ACE formatted for presentation.

SID Object Methods

A SID object represents a Security Identifier.

$sid->get_name
Returns a string containing a name for the SID (e.g. Administrators for S-1-5-32-544) if it is a well known SID. See Microsoft Knowledge Base Article KB243330.

$sid->as_string
Returns a string containing the SID formatted for presentation.

EXPORTS

Constants

On request, Parse::Win32Registry will export the registry type constants:

use Parse::Win32Registry qw( :REG_ );

The :REG_ tag exports all of the following constants:

REG_NONE REG_SZ REG_EXPAND_SZ REG_BINARY REG_DWORD REG_DWORD_BIG_ENDIAN REG_LINK REG_MULTI_SZ REG_RESOURCE_LIST REG_FULL_RESOURCE_DESCRIPTOR REG_RESOURCE_REQUIREMENTS_LIST REG_QWORD

You can import individual types by specifying them, for example:

use Parse::Win32Registry qw( REG_SZ REG_DWORD );

SUPPORT FUNCTIONS

Parse::Win32Registry provides a number of support functions, which are exported on request. All of the support functions can be imported with:

use Parse::Win32Registry qw( :functions );

Unpacking Binary Data

There are a number of functions for assisting in unpacking binary data found in registry values. These functions are exported on request:

use Parse::Win32Registry qw( unpack_windows_time unpack_unicode_string unpack_sid unpack_ace unpack_acl unpack_security_descriptor );

These unpack functions also return the length of the packed object when called in a list context.

For example, to extract one SID:

my $sid = unpack_sid($data);

To extract a series of SIDs:

my $pos = 0; while ($pos < length($data)) { my ($sid, $packed_len) = unpack_sid(substr($data, $pos)); last if !defined $sid; # abort if SID not defined # …do something with $sid… $pos += $packed_len; # move past the packed SID }

$time = unpack_windows_time( $data ) =item ( $time, $packed_len ) = unpack_windows_time( $data )
Returns the epoch time for the Win32 FILETIME contained in the supplied binary data. A Win32 FILETIME is a 64-bit integer containing the number of 100-nanosecond intervals since January 1st, 1601 and can sometimes be found in Windows NT registry values. Returns nothing if the date is earlier than your computer’s epoch. The epoch begins at January 1st, 1970 on Unix and Windows machines. When called in a list context, it will also return the space used in the supplied data by the windows time. (This function can also be called by its previous name of convert_filetime_to_epoch_time.)

$str = unpack_unicode_string( $data ) =item ( $str, $packed_len ) = unpack_unicode_string( $data )
Extracts a Unicode (UCS-2LE) string from the supplied binary data. Any terminating null characters are dropped. Unicode (UCS-2LE) strings are sometimes encountered in Windows NT registry REG_BINARY values. Note that Unicode strings contained in REG_SZ, REG_EXPAND_SZ, and REG_MULTI_SZ values are already automatically decoded by the get_data method of a Value object. When called in a list context, it will also return the space used in the supplied data by the Unicode string.

$sid = unpack_sid( $data ) =item ( $sid, $packed_len) = unpack_sid( $data )
Returns a SID Object representing the SID contained in the supplied data. Returns nothing if the supplied data does not appear to contain a valid SID. When called in a list context, it will also return the space used in the supplied data by the SID.

$ace = unpack_ace( $data ) =item ( $ace, $packed_len ) = unpack_ace( $data )
Returns an ACE Object representing the ACE contained in the supplied data. Returns nothing if the supplied data does not appear to contain a valid ACE. When called in a list context, it will also return the space used in the supplied data by the ACE.

$acl = unpack_acl( $data ) =item ( $acl, $packed_len ) = unpack_acl( $data )
Returns an ACL Object representing the ACL contained in the supplied data. Returns nothing if the supplied data does not appear to contain a valid ACL. When called in a list context, it will also return the space used in the supplied data by the ACL.

$sd = unpack_security_descriptor( $data ) =item ( $sd, $packed_len ) = unpack_security_descriptor( $data )
Returns a Security Descriptor Object representing the security descriptor contained in the supplied data. Returns nothing if the supplied data does not appear to contain a valid security descriptor. When called in a list context, it will also return the space used in the supplied data by the security descriptor.

Formatting Data

These functions are exported on request:

use Parse::Win32Registry qw( iso8601 hexdump );

$str = iso8601( $epoch_time )
Returns the ISO8601 string for the supplied $epoch_time, for example, ‘2010-05-30T13:57:11Z’. It assumes the supplied $epoch_time is in UTC, and appends ‘Z’ to indicate this. The string ‘(undefined)’ will be returned if the epoch time is out of range. my $data = $reg_binary_value->get_data; # extract the Win32 FILETIME starting at the 9th byte of $data my $time = unpack_windows_time( substr( $data, 8 ) ); my $time_as_string = iso8601( $time ); print “$time_as_string “; There are a number of ways of displaying a timestamp. For example: use Parse::Win32Registry qw(iso8601); use POSIX qw(strftime); print iso8601($key->get_timestamp); print scalar(gmtime($key->get_timestamp)), " GMT “; print scalar(localtime($key->get_timestamp)), " Local “; print strftime("%Y-%m-%d %H:%M:%S GMT”, gmtime($key->get_timestamp)), " “; print strftime("%Y-%m-%d %H:%M:%S Local”, localtime($key->get_timestamp)), " “; …might produce the following output: 2000-08-06T23:42:36Z Sun Aug 6 23:42:36 2000 GMT Mon Aug 7 07:42:36 2000 Local 2000-08-06 23:42:36 GMT 2000-08-07 07:42:36 Local

$str = hexdump( $data )
Returns a multi-line string containing a hexadecimal dump of the supplied data. Each line will display 16 bytes in hexadecimal and ASCII, and will be terminated by a newline character.

Processing Multiple Registry Files Simultaneously

There are three support functions that create iterators for simultaneously processing the keys and values of multiple registry files. These functions are exported on request:

use Parse::Win32Registry qw( make_multiple_subkey_iterator make_multiple_value_iterator make_multiple_subtree_iterator );

Handling lists of subkeys or values should be done with a little care as some of the processed registry files might not contain the subkey or value being examined and the list will contain missing entries:

($key1, $key2, undef, $key4)

One way of handling this is to use map to check that a key is defined and return undef if the subkey or value is not present.

@subkeys = map { defined $_ && $_->get_subkey(subkey) || undef } @keys; @values = map { defined $_ && $_->get_value(value) || undef } @keys;

$iter = make_multiple_subkey_iterator( $key1, $key2, $key3, … )
Returns an iterator for retrieving the subkeys of the supplied Key objects. Each call to the get_next method of the iterator returns a reference to a list of Key objects with the same name and path. If any of the supplied Key objects does not have a subkey with that name, then that subkey will be undefined. my $subkey_iter = make_multiple_subkey_iterator($key1, $key2, …); while (my ($subkey1, $subkey2, …) = $subkey_iter->get_next) { … } my $subkey_iter = make_multiple_subkey_iterator($key1, $key2, …); while (my @subkeys = $subkey_iter->get_next) { foreach my $subkey (@subkeys) { if (defined $subkey) { … } } }

$iter = make_multiple_value_iterator( $key1, $key2, $key3, … )
Returns an iterator for retrieving the values of the supplied Key objects. Each call to the get_next method of the iterator returns a reference to a list of Value objects with the same name. If any of the supplied Key objects does not have a value with that name, then that value will be undefined. my $value_iter = make_multiple_value_iterator($key1, $key2, …); while (my ($value1, $value2, …) = $value_iter->get_next) { … }

$iter = make_multiple_subtree_iterator( $key1, $key2, $key3, … )
Returns an iterator for retrieving the immediate subkeys and all descendant subkeys of the supplied Key objects. Each call to the get_next method of the iterator returns a list of Key objects with the same name and path. If any of the supplied Key objects does not have a subkey with that name, then that subkey will be undefined. Each call to the get_next method of the iterator returns it will return either a reference to a list of Key objects or a reference to a list of Key objects and a reference to a list of a Value objects, with each list of values accompanying the list of keys that they belong to. Nothing is returned when the end of the list is reached. my $subtree_iter = make_multiple_subtree_iterator($key1, $key2, …); while (my $subkeys_ref = $tree_iter->get_next) { # do something with @$subkeys_ref } my $subtree_iter = make_multiple_subtree_iterator($key1, $key2, …); while (my ($subkeys_ref, $values_ref) = $tree_iter->get_next) { if (defined $values_ref) { # do something with @$subkeys_ref and @$values_ref for (my $i = 0; $i < @$values_ref; $i++) { print $values_ref->[$i]->as_string, " “; } … } else { # do something with @$subkeys_ref my $first_defined_subkey = (grep { defined } @$subkeys_ref)[0]; print $first_defined_subkey->as_string, " “; … } }

Comparing Keys and Values

These functions are exported on request:

use Parse::Win32Registry qw( compare_multiple_keys compare_multiple_values );

@changes = compare_multiple_keys( $key1, $key2, … );
Returns a list of strings describing the differences found between the supplied keys. The keys are compared in the order they are supplied. If one of the supplied keys is undefined, it is assumed to have been deleted. The possible changes are ‘ADDED’, and ‘DELETED’, and for Windows NT registry keys (which have timestamps) ‘NEWER’, and ‘OLDER’. For example, compare_multiple_keys($k1, $k2, $k3) would return the list (’’, ‘NEWER’, ‘’) if $k2 had a more recent timestamp than $k1, but $k3 had the same timestamp as $k2. You can count the number of changed keys using the grep operator: my $num_changes = grep { $_ } @changes;

@changes = compare_multiple_values( $value1, $value2, … );
Returns a list of strings describing the differences found between the supplied values. The values are compared in the order they are supplied. If one of the supplied values is undefined, it is assumed to have been deleted. The possible changes are ‘ADDED’, ‘DELETED’, and ‘CHANGED’. For example, compare_multiple_keys($v1, $v2, $v3) would return the list (’’, ‘ADDED’, ‘CHANGED’) if $v2 exists but $v1 did not, and $v3 had different data from $v2. You can count the number of changed values using the grep operator: my $num_changes = grep { $_ } @changes;

HANDLING INVALID DATA

The Parse::Win32Registry module will skip keys or values that cannot be successfully parsed.

If keys or values cannot be parsed, then the get_subkey and get_value methods of Key objects will return nothing.

The get_list_of_subkeys and get_list_of_values methods of Key objects will skip those keys or values that cannot be parsed. If none of the keys or values can be parsed successfully, an empty list will be returned.

Additionally, values (in Windows NT registry files) often store data in a separate area of the registry file. If the value can be parsed, but the data cannot, a Value object will be created, but it will have no data. The get_data method will return nothing.

The most robust way of handling keys or values or data is therefore to check that they are defined before processing them. For example:

my $key = $root_key->get_subkey( “Software\Perl” ); if ( defined $key ) { print $key->as_string, " “; my $value = $key->get_value( “Version” ); if ( defined $value ) { print $value->as_string, " “; my $data = $value->get_data; if ( defined $data ) { # process $data in some way… } } }

You might not feel this robustness is necessary for your scripts.

You can be alerted when there are problems parsing registry keys or values by switching on warnings with:

Parse::Win32Registry->enable_warnings;

They can be switched off again with:

Parse::Win32Registry->disable_warnings;

LOW-LEVEL METHODS

These methods are intended for those who want to look at the structure of a registry file, but with something a little more helpful than a hex editor. They are not designed for pulling data out of keys and values: they are designed to make it easier to look at the underlying components of a registry file.

Windows NT registry files are composed of one or more Hbin blocks. Hbin blocks can contain a series of entries, such as key, value, and security entries, but also includes subkey lists, value lists, key class names, and value data.

Windows 95 registry files are composed of an RGKN block, followed by one or more RGDB blocks. RGKN blocks contain the entries which link the registry keys in the form of a tree. RGDB blocks contain a corresponding entry for each key in the RGKN block. This RGDB entry includes the name of the key and any associated values. For convenience, when iterating the entries in an RGDB block, each will be returned as a key entry followed by zero or more value entries.

To see demonstrations of how these methods can be used, look at the regscan.pl, gtkregscope.pl, and wxregscope.pl scripts.

Registry Object Methods

$registry->get_block_iterator
Returns an iterator for retrieving all the blocks in a registry file. Each time the get_next method of the iterator is used, it will return a single Block object. Blocks will be returned one by one until the end of the registry file is reached, when nothing will be returned. Typically you would iterate over all the blocks in a registry file, and iterate over all the entries in each block: my $block_iter = $registry->get_block_iterator; while (my $block = $block_iter->get_next) { my $entry_iter = $block->get_entry_iterator; while (my $entry = $entry_iter->get_next) { … } }

$registry->get_entry_iterator
Returns an iterator for retrieving all the entries in a registry file. Each time the get_next method of the iterator is used, it will return a single Entry object. Entries will be returned one by one until the end of the registry file is reached, when nothing will be returned. This is simply a more convenient method for retrieving all the entries in a registry file, which does not require you to iterate over each block.

Block Object Methods

$block->get_entry_iterator
Returns an iterator for retrieving all the entries in a block. Each time the get_next method of the iterator is used, it will return a single Entry object. Entries will be returned one by one until the end of the block is reached, when nothing will be returned. my $entry_iter = $block->get_entry_iterator; while (my $entry = $entry_iter->get_next) { … }

$block->get_offset
Returns the position of the block relative to the start of the file.

$block->get_length
Returns the length of the block.

$block->parse_info
Returns a string containing a summary of the parser information for the block.

$block->unparsed
Returns a string containing a hex dump of the unparsed on-disk data for the block header.

$block->get_raw_bytes
Returns the unparsed on-disk data for the block header.

Entry Object Methods

In addition to the basic methods provided by all entries, if an entry is a key, value, or security entry, it will also provide the methods available to Key, Value, or Security objects. You might therefore find it useful to check what methods are available so that you can use them:

# use Entry object methods… … if ($entry->can(get_subkey)) { # use Key object methods… } elsif ($entry->can(get_data)) { # use Value object methods… } elsif ($entry->can(get_security_descriptor)) { # use Security object methods… }

$entry->get_offset
Returns the position of the entry relative to the start of the file.

$entry->get_length
Returns the length of the entry.

$entry->get_tag
Returns a string containing a descriptive tag for the entry. For Windows NT registry entries, the tags reflect the signatures used to identify them. These are: ’nk’ for keys; ‘vk’ for values; ‘sk’ for security entries; and ’lf’, ’lh’, ’li’, or ‘ri’ for subkey lists. Entries that do not have signatures will return an empty string. Unidentified entries include value lists, value data, and the class names of keys. For Windows 95 registry files, the tag reflects which part of the registry file the entry is from, and will be ‘rgkn key’, ‘rgdb key’, or ‘rgdb value’.

$entry->is_allocated
Returns a boolean value indicating the ‘allocated’ state of a Windows NT registry entry. This value has no meaning for Windows 95 registry entries.

$entry->as_string
Returns a string representation of the entry. If the entry is a valid Key, Value, or Security object, then as_string will call the as_string method of that object.

$entry->parse_info
Returns a string containing a summary of the parser information for that entry. If the entry is a valid Key, Value, or Security object, then parse_info will call the parse_info method of that object.

$entry->unparsed
Returns a string containing a hex dump of the unparsed on-disk data for the entry.

$entry->get_raw_bytes
Returns the unparsed on-disk data for the entry.

SCRIPTS

All of the supplied scripts are intended to be used either as tools or as examples for you to modify and develop.

Try regdump.pl or regshell.pl to look at a registry file from the command line, or gtkregview.pl or wxregview.pl if you want a GUI. If you want to compare registry files, try regmultidiff.pl from the command line or gtkregcompare.pl or wxregcompare.pl if you want a GUI. You can edit the scripts to customize them for your own requirements.

If you specify subkeys on the command line, note that you need to quote the subkey on Windows if it contains spaces:

regdump.pl ntuser.dat “software\microsoft\windows nt”

You will also need to quote backslashes and spaces in Unix shells:

regdump.pl ntuser.dat software\microsoft\windows\ nt

or use single quotes:

regdump.pl ntuser.dat software\microsoft\windows nt

gtkregcompare.pl

gtkregcompare.pl is a GTK+ program for comparing multiple registry files. It displays a tree of the registry keys and values highlighting those that have changed.

It requires Gtk2-Perl to be installed.

Filenames of registry files to compare can be supplied on the command line:

gtkregcompare.pl <filename1> <filename2> <filename3> …

You can of course use wildcards when running from a Unix shell.

gtkregscope.pl

gtkregscope.pl is a GTK+ registry scanner. It presents all the entries in a registry file returned by the get_block_iterator and get_entry_iterator methods. It uses color to highlight key, value, security, and subkey list entries, and presents the block as a colored map.

It requires Gtk2-Perl to be installed.

A filename can also be supplied on the command line:

gtkregscope.pl <filename>

gtkregview.pl

gtkregview.pl is a GTK+ registry viewer. It displays a tree of registry keys on the left hand side, a list of values on the right, and a hex dump of the selected value data at the bottom.

It requires Gtk2-Perl to be installed.

A filename can also be supplied on the command line:

gtkregview.pl <filename>

regclassnames.pl

regclassnames.pl will display registry keys that have class names. Only a very few Windows NT registry key have class names.

Type regclassnames.pl on its own to see the help:

regclassnames.pl <filename> [subkey]

regdump.pl

regdump.pl is used to display the keys and values of a registry file.

Type regdump.pl on its own to see the help:

regdump.pl <filename> [subkey] [-r] [-v] [-x] [-c] [-s] [-o] -r or –recurse traverse all child keys from the root key or the subkey specified -v or –values display values -x or –hexdump display value data as a hex dump -c or –class-name display the class name for the key (if present) -s or –security display the security information for the key, including the owner and group SIDs, and the system and discretionary ACLs (if present) -o or –owner display the owner SID for the key (if present)

The contents of the root key will be displayed unless a subkey is specified. Paths to subkeys are always specified relative to the root key. By default, only the subkeys and values immediately underneath the specified key will be displayed. To display all keys and values beneath a key, use the -r or –recurse option.

For example, regdump.pl ntuser.dat might display the following:

$$$PROTO.HIV [2005-01-01T09:00:00Z] ..\AppEvents ..\Console ..\Control Panel ..nvironment ..\Identities ..\Keyboard Layout ..\Printers ..\Software ..\UNICODE Program Groups

From here, you can explore the subkeys to find those keys or values you are interested in:

regdump.pl ntuser.dat software regdump.pl ntuser.dat software\microsoft …

regexport.pl

regexport.pl will display registry keys and values in the Windows Registry Editor Version 5.00 format used by REGEDIT on Windows 2000 and later.

Type regexport.pl on its own to see the help:

regexport.pl <filename> [subkey] [-r] -r or –recurse traverse all child keys from the root key or the subkey specified

Values are always shown for each key displayed.

Subkeys are displayed as comments when not recursing. (Comments are preceded by the ‘;’ character.)

regfind.pl

regfind.pl is used to search the keys, values, data, or types of a registry file for a matching string.

Type regfind.pl on its own to see the help:

regfind.pl <filename> <search-string> [-k] [-v] [-d] [-t] [-x] -k or –key search key names for a match -v or –value search value names for a match -d or –data search value data for a match -t or –type search value types for a match -x or –hexdump display value data as a hex dump

To search for the string recent in the names of any keys or values:

regfind.pl ntuser.dat recent -kv

To search for the string administrator in the data of any values:

regfind.pl ntuser.dat administrator -d

To list all REG_MULTI_SZ values:

regfind.pl ntuser.dat -t multi_sz

Search strings are not case-sensitive.

regml.pl

regml.pl will display those keys with explicit System Mandatory Label ACEs set in the System ACL. This feature was introduced with Windows Vista, and is used by applications such as Internet Explorer running in Protected Mode. Note that if a key does not have an explicit System Mandatory Label ACE, it has Medium Integrity Level. Only Windows NT registry files can contain System Mandatory Label ACEs.

Type regml.pl on its own to see the help:

regml.pl <filename>

regmultidiff.pl

regmultidiff.pl can be used to compare multiple registry files and identify the differences between them.

Type regmultidiff.pl on its own to see the help:

regmultidiff.pl <file1> <file2> <file3> … [<subkey>] [-v] [-x] [-l] [-a] -v or –values display values -x or –hexdump display value data as a hex dump -l or –long show each changed key or value instead of a summary -a or –all show all keys and values before and after a change

You can limit the comparison by specifying an initial subkey.

regscan.pl

regscan.pl dumps all the entries in a registry file. This will include defunct keys and values that are no longer part of the current active registry.

Type regscan.pl on its own to see the help:

regscan.pl <filename> [-k] [-v] [-s] [-a] [-p] [-u] [-w] -k or –keys list only key entries -v or –values list only value entries -s or –security list only security entries -a or –allocated list only allocated entries -p or –parse-info show the technical information for an entry instead of the string representation -u or –unparsed show the unparsed on-disk entries as a hex dump

regsecurity.pl

regsecurity.pl will display the security information contained in a registry files. Only Windows NT registry files contain security information.

Type regsecurity.pl on its own to see the help:

regsecurity.pl <filename>

regshell.pl

Provides an interactive command shell where you navigate through the keys using ‘cd’ to change the current key and ’ls’ or ‘dir’ to list the contents of the current key.

Tab completion of subkey and value names is available. Names containing spaces are supported by quoting names with " characters. Note that names are case sensitive.

A filename should be supplied on the command line:

regshell.pl <filename>

Once regshell.pl is running, type help to see the available commands.

It requires Term::ReadLine to be installed.

regstats.pl

regstats.pl counts the number of keys and values in a registry file. It will also provide a count of each value type if requested.

Type regstats.pl on its own to see the help:

regstats.pl <filename> [-t] -t or –types count value types

regtimeline.pl

regtimeline.pl displays keys and values in date order.

As only Windows NT based registry keys provide timestamps, this script only works on Windows NT registry files.

You can limit the display to a given number of days (counting back from the timestamp of the last key).

Type regtimeline.pl on its own to see the help:

regtimeline.pl <filename> [subkey] [-l <number>] [-v] [-x] -l or –last display only the last <number> days of registry activity -v or –values display values -x or –hexdump display value data as a hex dump

regtree.pl

regtree.pl simply displays the registry as an indented tree, optionally displaying the values of each key.

Type regtree.pl on its own to see the help:

regtree.pl <filename> [subkey] [-v] -v or –values display values

wxregcompare.pl

wxregcompare.pl is a wxWidgets program for comparing multiple registry files. It displays a tree of the registry keys and values, highlighting those that have changed.

It requires wxPerl to be installed.

Filenames of registry files to compare can be supplied on the command line:

wxregcompare.pl <filename1> <filename2> <filename3> …

You can of course use wildcards when running from a Unix shell.

wxregscope.pl

wxregscope.pl is a wxWidgets registry scanner. It presents all the entries in a registry file returned by the get_block_iterator and get_entry_iterator methods. It uses color to highlight key, value, security, and subkey list entries.

It requires wxPerl to be installed.

A filename can also be supplied on the command line:

wxregscope.pl <filename>

wxregview.pl

wxregview.pl is a wxWidgets registry viewer. It displays a tree of registry keys on the left hand side, a list of values on the right, and a hex dump of the selected value data at the bottom. It can also provide a timeline view of all of the registry keys, which can be used to navigate the main tree view by clicking or double-clicking on a timeline key.

It requires wxPerl to be installed.

A filename can also be supplied on the command line:

wxregview.pl <filename>

ACKNOWLEDGEMENTS

This would not have been possible without the work of those people who have analysed and shared their knowledge of the structure of Windows Registry files, primarily: B.D. (WinReg.txt), Petter Nordahl-Hagen (chntpw), and Richard Sharpe and Jerry Carter (Samba 3).

AUTHOR

James Macfarlane, <[email protected]>

COPYRIGHT AND LICENSE

Copyright (C) 2006-2012 by James Macfarlane

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

THIS PACKAGE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1616 - Linux cli command Spreadsheet_ParseExcel_SaveParser_Worksheetpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_ParseExcel_SaveParser_Worksheetpm and provides detailed information about the command Spreadsheet_ParseExcel_SaveParser_Worksheetpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_ParseExcel_SaveParser_Worksheetpm.

NAME 🖥️ Spreadsheet_ParseExcel_SaveParser_Worksheetpm 🖥️

A class for SaveParser Worksheets.

SYNOPSIS

See the documentation for Spreadsheet::ParseExcel.

DESCRIPTION

This module is used in conjunction with Spreadsheet::ParseExcel. See the documentation for Spreadsheet::ParseExcel.

AUTHOR

Current maintainer 0.60+: Douglas Wilson [email protected]

Maintainer 0.40-0.59: John McNamara [email protected]

Maintainer 0.27-0.33: Gabor Szabo [email protected]

Original author: Kawai Takanori [email protected]

COPYRIGHT

Copyright (c) 2014 Douglas Wilson

Copyright (c) 2009-2013 John McNamara

Copyright (c) 2006-2008 Gabor Szabo

Copyright (c) 2000-2006 Kawai Takanori

All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1617 - Linux cli command srandom_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command srandom_r and provides detailed information about the command srandom_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the srandom_r.

NAME 🖥️ srandom_r 🖥️

reentrant random number generator

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int random_r(struct random_data *restrict buf,
 int32_t *restrict result);
int srandom_r(unsigned int seed, struct random_data *buf);
int initstate_r(unsigned int seed, char statebuf[restrict .statelen],
 size_t statelen, struct random_data *restrict buf);
int setstate_r(char *restrict statebuf,
 struct random_data *restrict buf);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

random_r(), srandom_r(), initstate_r(), setstate_r():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

These functions are the reentrant equivalents of the functions described in random(3). They are suitable for use in multithreaded programs where each thread needs to obtain an independent, reproducible sequence of random numbers.

The random_r() function is like random(3), except that instead of using state information maintained in a global variable, it uses the state information in the argument pointed to by buf, which must have been previously initialized by initstate_r(). The generated random number is returned in the argument result.

The srandom_r() function is like srandom(3), except that it initializes the seed for the random number generator whose state is maintained in the object pointed to by buf, which must have been previously initialized by initstate_r(), instead of the seed associated with the global state variable.

The initstate_r() function is like initstate(3) except that it initializes the state in the object pointed to by buf, rather than initializing the global state variable. Before calling this function, the buf.state field must be initialized to NULL. The initstate_r() function records a pointer to the statebuf argument inside the structure pointed to by buf. Thus, statebuf should not be deallocated so long as buf is still in use. (So, statebuf should typically be allocated as a static variable, or allocated on the heap using malloc(3) or similar.)

The setstate_r() function is like setstate(3) except that it modifies the state in the object pointed to by buf, rather than modifying the global state variable. state must first have been initialized using initstate_r() or be the result of a previous call of setstate_r().

RETURN VALUE

All of these functions return 0 on success. On error, -1 is returned, with errno set to indicate the error.

ERRORS

EINVAL
A state array of less than 8 bytes was specified to initstate_r().

EINVAL
The statebuf or buf argument to setstate_r() was NULL.

EINVAL
The buf or result argument to random_r() was NULL.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

random_r(), srandom_r(), initstate_r(), setstate_r()

Thread safetyMT-Safe race:buf

STANDARDS

GNU.

BUGS

The initstate_r() interface is confusing. It appears that the random_data type is intended to be opaque, but the implementation requires the user to either initialize the buf.state field to NULL or zero out the entire structure before the call.

SEE ALSO

drand48(3), rand(3), random(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1618 - Linux cli command timeam

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command timeam and provides detailed information about the command timeam, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the timeam.

NAME 🖥️ timeam 🖥️

time functions for gawk

SYNOPSIS

@load “time”

time = gettimeofday()
ret = sleep(amount)

CAUTION

This extension is deprecated in favor of the timex extension in the gawkextlib project. Loading it issues a warning. It will be removed from the gawk distribution in the next major release.

DESCRIPTION

The time extension adds two functions named gettimeofday() and sleep(), as follows.

gettimeofday()
This function returns the number of seconds since the Epoch as a floating-point value. It should have subsecond precision. It returns -1 upon error and sets ERRNO to indicate the problem.

sleep(seconds)
This function attempts to sleep for the given amount of seconds, which may include a fractional portion. If seconds is negative, or the attempt to sleep fails, then it returns -1 and sets ERRNO. Otherwise, the function should return 0 after sleeping for the indicated amount of time.

EXAMPLE

@load "time"
...
printf "It is now %g seconds since the Epoch

“, gettimeofday() printf “Pausing for a while… " ; sleep(2.5) ; print “done”

SEE ALSO

GAWK: Effective AWK Programming, filefuncs(3am), fnmatch(3am), fork(3am), inplace(3am), ordchr(3am), readdir(3am), readfile(3am), revoutput(3am), rwarray(3am).

gettimeofday(2), nanosleep(2), select(2).

AUTHOR

Arnold Robbins, [email protected].

COPYING PERMISSIONS

Copyright © 2012, 2013, 2018, 2022, Free Software Foundation, Inc.

Permission is granted to make and distribute verbatim copies of this manual page provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to process this file through troff and print the results, provided the printed document carries copying permission notice identical to this one except for the removal of this paragraph (this paragraph not being relevant to the printed manual page).

Permission is granted to copy and distribute modified versions of this manual page under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual page into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1619 - Linux cli command swab

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command swab and provides detailed information about the command swab, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the swab.

NAME 🖥️ swab 🖥️

swap adjacent bytes

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _XOPEN_SOURCE /* See feature_test_macros(7) */
#include <unistd.h>
void swab(const void from[restrict .n], void to[restrict .n],
 ssize_t n);

DESCRIPTION

The swab() function copies n bytes from the array pointed to by from to the array pointed to by to, exchanging adjacent even and odd bytes. This function is used to exchange data between machines that have different low/high byte ordering.

This function does nothing when n is negative. When n is positive and odd, it handles n-1 bytes as above, and does something unspecified with the last byte. (In other words, n should be even.)

RETURN VALUE

The swab() function returns no value.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

swab()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4, 4.3BSD.

SEE ALSO

bstring(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1620 - Linux cli command XtProcessEvent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtProcessEvent and provides detailed information about the command XtProcessEvent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtProcessEvent.

NAME 🖥️ XtProcessEvent 🖥️

query and process events and input

SYNTAX

#include <X11/Intrinsic.h>

void XtNextEvent(XEvent *event_return);

Boolean XtPeekEvent(XEvent *event_return);

Boolean XtPending(void);

void XtProcessEvent(XtInputMask mask);

void XtMainLoop(void);

ARGUMENTS

event
Specifies a pointer to the event structure that is to be dispatched to the appropriate event handler.

event_return
Returns the event information to the specified event structure.

mask
Specifies what types of events to process. The mask is the bitwise inclusive OR of any combination of XtIMXEvent, XtIMTimer, XtIMAlternateInput, and XtIMSignal. As a convenience, the X Toolkit defines the symbolic name XtIMAll to be the bitwise inclusive OR of all event types.

DESCRIPTION

XtNextEvent has been replaced by XtAppNextEvent.

XtPeekEvent has been replaced by XtAppPeekEvent.

XtPending has been replaced by XtAppPending.

XtProcessEvent has been replaced by XtAppProcessEvent.

XtMainLoop has been replaced by XtAppMainLoop.

SEE ALSO

XtAppNextEvent(3xt), XtAppPending(3), XtAppPeekEvent(3), XtAppProcessEvent(3), XtAppMainLoop(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1621 - Linux cli command Tk_Adjusterpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Adjusterpm and provides detailed information about the command Tk_Adjusterpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Adjusterpm.

NAME 🖥️ Tk_Adjusterpm 🖥️

Allow size of packed widgets to be adjusted by user

SYNOPSIS

use Tk::Adjuster;

$adjuster = $widget->Adjuster*(?options?)*;

WIDGET-SPECIFIC OPTIONS

Name: restore

Class: Restore

Switch: -restore

Specifies a boolean value that determines whether the Adjuster should forcibly attempt to make room for itself (by reducing the size of its managed widget) when it is unmapped (for example, due to a size change in a top level window). The default value is 1.

Name: side

Class: Side

Switch: -side

Specifies the side on which the managed widget lies relative to the Adjuster. In conjunction with the pack geometry manager, this relates to the side of the master against which the managed widget and the Adjuster are packed. Must be left, right, top, or bottom. Defaults to top.

Name: widget

Class: Widget

Switch: -widget

Specifies the widget which is to be managed by the Adjuster.

DESCRIPTION

Tk::Adjuster is a Frame containing a “line” and a “blob”.

Dragging with Mouse Button-1 results in a line being dragged to indicate new size. Releasing Button-1 submits GeometryRequests on behalf of the managed widget which will cause the packer to change the widget’s size.

If Drag is done with Shift button down, then GeometryRequests are made in “real time” so that text-flow effects can be seen, but as a lot more work is done behaviour may be sluggish.

If widget is packed with -side => left or -side => right then width is adjusted. If packed -side => top or -side => bottom then height is adjusted.

packPropagate is turned off for the master window to prevent adjustment changing overall window size. Similarly packPropagate is turned off for the managed widget if it has things packed inside it. This is so that the GeometryRequests made by Tk::Adjuster are not overridden by pack.

In addition, the managed widget is made non-expandable to prevent the geometry manager reallocating freed space in the master back to the managed widget. Note however that expansion is turned off only after the Adjuster is mapped, which allows the managed widget to expand naturally on window creation.

The Tk::Widget method, packAdjust, calls pack on the widget, then creates an instance of Tk::Adjuster, and packs that “after” the widget. Its use has two disadvantages however: the Adjuster widget is not made available to the caller, and options cannot be set on the Adjuster. For these reasons, the Tk::Adjuster method, packAfter is preferred, but packAdjust is retained for backwards compatibility.

WIDGET METHODS

$adjuster->packAfter(managed_widget, ?pack_options?)
This command configures the Adjuster’s -widget and -side options respectively to managed_widget and the -side value specified in pack_options (top if not specified). It then packs the Adjuster after managed_widget, with -fill set to x or y as appropriate.

$adjuster->packForget?(boolean)?
This command calls Tk::Widget::packForget on the Adjuster. If a parameter is provided and it has a true boolean value, then packForget is also called on the managed widget.

$adjuster->slave
This command returns the value $adjuster->cget(’-widget’), ie. the reference to the managed widget.

EXAMPLES

Using an Adjuster to separate two widgets, whereby the left widget is managed, and right widget expands to fill space on a window resize

a) Using packAfter (preferred interface)

use Tk; use Tk::Adjuster; my $f = MainWindow->new; my $lst1 = $f->Listbox(); my $adj1 = $f->Adjuster(); my $lst2 = $f->Listbox(); my $side = left; $lst1->pack(-side => $side, -fill => both, -expand => 1); $adj1->packAfter($lst1, -side => $side); $lst2->pack(-side => $side, -fill => both, -expand => 1); MainLoop;

b) Using packAdjust

use Tk; use Tk::Adjuster; my $f = MainWindow->new; my $lst1 = $f->Listbox(); my $lst2 = $f->Listbox(); my $side = left; $lst1->packAdjust(-side => $side, -fill => both); $lst2->pack (-side => $side, -fill => both, -expand => 1); MainLoop;

c) Using the standard Tk::Widget::pack

use Tk; use Tk::Adjuster; my $f = MainWindow->new; my $side = left; my $lst1 = $f->Listbox(); my $adj = $f->Adjuster(-widget => $lst1, -side => $side); my $lst2 = $f->Listbox(); $lst1->pack(-side => $side, -fill => both, -expand => 1); $adj->pack (-side => $side, -fill => y); $lst2->pack(-side => $side, -fill => both, -expand => 1); MainLoop;

Changing the above examples so that $side has the value ‘right’ means the left widget expands to fill space on a window resize.

Changing the above examples so that $side has the value ’top’ produces a testcase with a horizontal Adjuster. Here the bottom widget expands to fill space on a window resize. Packing to the ‘bottom’ makes the top widget expand to fill space on window resize.

Using -restore => 0 for multiple columns

In the case of multiple columns (or rows) the “restore” functionality of the Adjuster can be inconvenient. When the user adjusts the width of one column and thereby pushes the Adjuster of another column off the window, this adjuster tries to restore itself by reducing the size of its managed widget. This has the effect that column widths shrink; and the original size is not restored when the user reverses the originating change. The -restore option can be used to turn off this functionality. (It makes some sense, however, to leave -restore turned on for the first-packed Adjuster, so that at least one Adjuster always remains visible.)

use Tk; use Tk::Adjuster; my $f = MainWindow->new; my $lst1 = $f->Listbox(); my $adj1 = $f->Adjuster(); my $lst2 = $f->Listbox(); my $adj2 = $f->Adjuster(-restore => 0); my $lst3 = $f->Listbox(); my $side = left; $lst1->pack(-side => $side, -fill => both, -expand => 1); $adj1->packAfter($lst1, -side => $side); $lst2->pack(-side => $side, -fill => both, -expand => 1); $adj2->packAfter($lst2, -side => $side); $lst3->pack(-side => $side, -fill => both, -expand => 1); MainLoop;

BUGS

It is currently not possible to configure the appearance of the Adjuster. It would be nice to be able to set the width and relief of the Adjuster “line” and the presence/absence of the “blob” on the Adjuster.

Tk::Adjuster works theoretically with the grid geometry manager but there are currently some problems which seem to be due to bugs in grid:

a) Theres never an Unmap event for the adjuster, so the “restore” functionality has no effect. b) After adjusting, widgets protrude into the border of the master. c) grid(Propagate, 0) on MainWindow has no effect - window shrinks/grows when widgets are adjusted. d) Widgets shuffle to correct position on startup

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1622 - Linux cli command if_nameindex

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command if_nameindex and provides detailed information about the command if_nameindex, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the if_nameindex.

NAME 🖥️ if_nameindex 🖥️

get network interface names and indexes

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <net/if.h>
struct if_nameindex *if_nameindex(void);
void if_freenameindex(struct if_nameindex *ptr);

DESCRIPTION

The if_nameindex() function returns an array of if_nameindex structures, each containing information about one of the network interfaces on the local system. The if_nameindex structure contains at least the following entries:

unsigned int if_index; /* Index of interface (1, 2, ...) */
char        *if_name;  /* Null-terminated name ("eth0", etc.) */

The if_index field contains the interface index. The if_name field points to the null-terminated interface name. The end of the array is indicated by entry with if_index set to zero and if_name set to NULL.

The data structure returned by if_nameindex() is dynamically allocated and should be freed using if_freenameindex() when no longer needed.

RETURN VALUE

On success, if_nameindex() returns pointer to the array; on error, NULL is returned, and errno is set to indicate the error.

ERRORS

if_nameindex() may fail and set errno if:

ENOBUFS
Insufficient resources available.

if_nameindex() may also fail for any of the errors specified for socket(2), bind(2), ioctl(2), getsockname(2), recvmsg(2), sendto(2), or malloc(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

if_nameindex(), if_freenameindex()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008, RFC 3493.

HISTORY

glibc 2.1. POSIX.1-2001. BSDi.

Before glibc 2.3.4, the implementation supported only interfaces with IPv4 addresses. Support of interfaces that don’t have IPv4 addresses is available only on kernels that support netlink.

EXAMPLES

The program below demonstrates the use of the functions described on this page. An example of the output this program might produce is the following:

$ ./a.out
1: lo
2: wlan0
3: em1

Program source

#include <net/if.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int
main(void)
{
    struct if_nameindex *if_ni, *i;
    if_ni = if_nameindex();
    if (if_ni == NULL) {
        perror("if_nameindex");
        exit(EXIT_FAILURE);
    }
    for (i = if_ni; !(i->if_index == 0 && i->if_name == NULL); i++)
        printf("%u: %s

“, i->if_index, i->if_name); if_freenameindex(if_ni); exit(EXIT_SUCCESS); }

SEE ALSO

getsockopt(2), setsockopt(2), getifaddrs(3), if_indextoname(3), if_nametoindex(3), ifconfig(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1623 - Linux cli command futimes

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command futimes and provides detailed information about the command futimes, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the futimes.

NAME 🖥️ futimes 🖥️

change file timestamps

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/time.h>
int futimes(int fd, const struct timeval tv[2]);
int lutimes(const char *filename, const struct timeval tv[2]);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

futimes(), lutimes():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

futimes() changes the access and modification times of a file in the same way as utimes(2), with the difference that the file whose timestamps are to be changed is specified via a file descriptor, fd, rather than via a pathname.

lutimes() changes the access and modification times of a file in the same way as utimes(2), with the difference that if filename refers to a symbolic link, then the link is not dereferenced: instead, the timestamps of the symbolic link are changed.

RETURN VALUE

On success, zero is returned. On error, -1 is returned, and errno is set to indicate the error.

ERRORS

Errors are as for utimes(2), with the following additions for futimes():

EBADF
fd is not a valid file descriptor.

ENOSYS
The /proc filesystem could not be accessed.

The following additional error may occur for lutimes():

ENOSYS
The kernel does not support this call; Linux 2.6.22 or later is required.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

futimes(), lutimes()

Thread safetyMT-Safe

STANDARDS

Linux, BSD.

HISTORY

futimes()
glibc 2.3.

lutimes()
glibc 2.6.

NOTES

lutimes() is implemented using the utimensat(2) system call.

SEE ALSO

utime(2), utimensat(2), symlink(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1624 - Linux cli command pthread_setcancelstate

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_setcancelstate and provides detailed information about the command pthread_setcancelstate, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_setcancelstate.

NAME 🖥️ pthread_setcancelstate 🖥️

set cancelability state and type

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_setcancelstate(int state, int *oldstate);
int pthread_setcanceltype(int type, int *oldtype);

DESCRIPTION

The pthread_setcancelstate() sets the cancelability state of the calling thread to the value given in state. The previous cancelability state of the thread is returned in the buffer pointed to by oldstate. The state argument must have one of the following values:

PTHREAD_CANCEL_ENABLE
The thread is cancelable. This is the default cancelability state in all new threads, including the initial thread. The thread’s cancelability type determines when a cancelable thread will respond to a cancelation request.

PTHREAD_CANCEL_DISABLE
The thread is not cancelable. If a cancelation request is received, it is blocked until cancelability is enabled.

The pthread_setcanceltype() sets the cancelability type of the calling thread to the value given in type. The previous cancelability type of the thread is returned in the buffer pointed to by oldtype. The type argument must have one of the following values:

PTHREAD_CANCEL_DEFERRED
A cancelation request is deferred until the thread next calls a function that is a cancelation point (see pthreads(7)). This is the default cancelability type in all new threads, including the initial thread.

Even with deferred cancelation, a cancelation point in an asynchronous signal handler may still be acted upon and the effect is as if it was an asynchronous cancelation.

PTHREAD_CANCEL_ASYNCHRONOUS
The thread can be canceled at any time. (Typically, it will be canceled immediately upon receiving a cancelation request, but the system doesn’t guarantee this.)

The set-and-get operation performed by each of these functions is atomic with respect to other threads in the process calling the same function.

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

The pthread_setcancelstate() can fail with the following error:

EINVAL
Invalid value for state.

The pthread_setcanceltype() can fail with the following error:

EINVAL
Invalid value for type.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_setcancelstate(), pthread_setcanceltype()

Thread safety

MT-Safe

pthread_setcancelstate(), pthread_setcanceltype()

Async-cancel safety

AC-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.0 POSIX.1-2001.

NOTES

For details of what happens when a thread is canceled, see pthread_cancel(3).

Briefly disabling cancelability is useful if a thread performs some critical action that must not be interrupted by a cancelation request. Beware of disabling cancelability for long periods, or around operations that may block for long periods, since that will render the thread unresponsive to cancelation requests.

Asynchronous cancelability

Setting the cancelability type to PTHREAD_CANCEL_ASYNCHRONOUS is rarely useful. Since the thread could be canceled at any time, it cannot safely reserve resources (e.g., allocating memory with malloc(3)), acquire mutexes, semaphores, or locks, and so on. Reserving resources is unsafe because the application has no way of knowing what the state of these resources is when the thread is canceled; that is, did cancelation occur before the resources were reserved, while they were reserved, or after they were released? Furthermore, some internal data structures (e.g., the linked list of free blocks managed by the malloc(3) family of functions) may be left in an inconsistent state if cancelation occurs in the middle of the function call. Consequently, clean-up handlers cease to be useful.

Functions that can be safely asynchronously canceled are called async-cancel-safe functions. POSIX.1-2001 and POSIX.1-2008 require only that pthread_cancel(3), pthread_setcancelstate(), and pthread_setcanceltype() be async-cancel-safe. In general, other library functions can’t be safely called from an asynchronously cancelable thread.

One of the few circumstances in which asynchronous cancelability is useful is for cancelation of a thread that is in a pure compute-bound loop.

Portability notes

The Linux threading implementations permit the oldstate argument of pthread_setcancelstate() to be NULL, in which case the information about the previous cancelability state is not returned to the caller. Many other implementations also permit a NULL oldstat argument, but POSIX.1 does not specify this point, so portable applications should always specify a non-NULL value in oldstate. A precisely analogous set of statements applies for the oldtype argument of pthread_setcanceltype().

EXAMPLES

See pthread_cancel(3).

SEE ALSO

pthread_cancel(3), pthread_cleanup_push(3), pthread_testcancel(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1625 - Linux cli command PA_FLAG_PTRconst

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command PA_FLAG_PTRconst and provides detailed information about the command PA_FLAG_PTRconst, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the PA_FLAG_PTRconst.

NAME 🖥️ PA_FLAG_PTRconst 🖥️

define custom behavior for printf-like functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <printf.h>
int register_printf_specifier(int spec, printf_function func,
 printf_arginfo_size_function arginfo);
int register_printf_modifier(const wchar_t *str);
int register_printf_type(printf_va_arg_function fct);

Callbacks

typedef int printf_function(FILE *stream, const struct printf_info *info,
 const void *const args[]);
typedef int printf_arginfo_size_function(const struct printf_info *info,
 size_t n, int argtypes[n], int size[n]);
typedef void printf_va_arg_function(void *mem, va_list *ap);

Types

struct printf_info {
 int prec; // Precision
 int width; // Width
 wchar_t spec; // Format letter
 unsigned int is_long_double:1;// L or ll flag
 unsigned int is_short:1; // h flag
 unsigned int is_long:1; // l flag
 unsigned int alt:1; // # flag
 unsigned int space:1; // Space flag
 unsigned int left:1; // - flag
 unsigned int showsign:1; // + flag
 unsigned int group:1; // ' flag
 unsigned int extra:1; // For special use
 unsigned int is_char:1; // hh flag
 unsigned int wide:1; // True for wide character streams
 unsigned int i18n:1; // I flag
 unsigned int is_binary128:1; /* Floating-point argument is
  ABI-compatible with
  IEC 60559 binary128 */
 unsigned short user; // Bits for user-installed modifiers
 wchar_t pad; // Padding character
};

Constants

#define PA_FLAG_LONG_LONG /* ... */
#define PA_FLAG_LONG_DOUBLE /* ... */
#define PA_FLAG_LONG /* ... */
#define PA_FLAG_SHORT /* ... */
#define PA_FLAG_PTR /* ... */

DESCRIPTION

These functions serve to extend and/or modify the behavior of the printf(3) family of functions.

register_printf_specifier()

This function registers a custom conversion specifier for the printf(3) family of functions.

spec
The character which will be used as a conversion specifier in the format string.

func
Callback function that will be executed by the printf(3) family of functions to format the input arguments into the output stream.

stream
Output stream where the formatted output should be printed. This stream transparently represents the output, even in the case of functions that write to a string.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in arginfo.

args
Array of pointers to the arguments to the printf(3) -like function.

arginfo
Callback function that will be executed by the printf(3) family of functions to know how many arguments should be parsed for the custom specifier and also their types.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in func.

n
Number of arguments remaining to be parsed.

argtypes
This array should be set to define the type of each of the arguments that will be parsed. Each element in the array represents one of the arguments to be parsed, in the same order that they are passed to the printf(3) -like function. Each element should be set to a base type (PA_*) from the enum above, or a custom one, and optionally ORed with an appropriate length modifier (PA_FLAG_*).

The type is determined by using one of the following constants:

PA_INT
int.

PA_CHAR
int, cast to char.

PA_WCHAR
wchar_t.

PA_STRING
const char *, a ‘�’-terminated string.

PA_WSTRING
const wchar_t *, a wide character L’�’-terminated string.

PA_POINTER
void *.

PA_FLOAT
float.

PA_DOUBLE
double.

PA_LAST
TODO.

size
For user-defined types, the size of the type (in bytes) should also be specified through this array. Otherwise, leave it unused.

arginfo is called before func, and prepares some information needed to call func.

register_printf_modifier()

TODO

register_printf_type()

TODO

RETURN VALUE

register_printf_specifier(), register_printf_modifier(), and register_printf_type() return zero on success, or -1 on error.

Callbacks

The callback of type printf_function should return the number of characters written, or -1 on error.

The callback of type printf_arginfo_size_function should return the number of arguments to be parsed by this specifier. It also passes information about the type of those arguments to the caller through argtypes. On error, it should return -1.

ERRORS

EINVAL
The specifier was not a valid character.

STANDARDS

GNU.

HISTORY

register_printf_function(3) is an older function similar to register_printf_specifier(), and is now deprecated. That function can’t handle user-defined types.

register_printf_specifier() supersedes register_printf_function(3).

EXAMPLES

The following example program registers the ‘b’ and ‘B’ specifiers to print integers in binary format, mirroring rules for other unsigned conversion specifiers like ‘x’ and ‘u’. This can be used to print in binary prior to C23.

/* This code is in the public domain */
#include <err.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <printf.h>
#define GROUP_SEP  '\''
struct Printf_Pad {
    char    ch;
    size_t  len;
};
static int b_printf(FILE *stream, const struct printf_info *info,
                    const void *const args[]);
static int b_arginf_sz(const struct printf_info *info,
                    size_t n, int argtypes[n], int size[n]);
static uintmax_t b_value(const struct printf_info *info,
                    const void *arg);
static size_t b_bin_repr(char bin[UINTMAX_WIDTH],
                    const struct printf_info *info, const void *arg);
static size_t b_bin_len(const struct printf_info *info,
                    ptrdiff_t min_len);
static size_t b_pad_len(const struct printf_info *info,
                    ptrdiff_t bin_len);
static ssize_t b_print_prefix(FILE *stream,
                    const struct printf_info *info);
static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info,
                    ptrdiff_t min_len);
static ssize_t b_print_number(FILE *stream,
                    const struct printf_info *info,
                    const char bin[UINTMAX_WIDTH],
                    size_t min_len, size_t bin_len);
static char pad_ch(const struct printf_info *info);
static ssize_t pad_spaces(FILE *stream, size_t pad_len);
int
main(void)
{
    if (register_printf_specifier('b', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('b', ...)");
    if (register_printf_specifier('B', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('B', ...)");
    printf("....----....----....----....----

“); printf("%llb; “, 0x5Ellu); printf("%lB; “, 0x5Elu); printf("%b; “, 0x5Eu); printf("%hB; “, 0x5Eu); printf("%hhb; “, 0x5Eu); printf("%jb; “, (uintmax_t)0x5E); printf("%zb; “, (size_t)0x5E); printf(”….—-….—-….—-….—- “); printf(”%#b; “, 0x5Eu); printf(”%#B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf("%10b; “, 0x5Eu); printf("%010b; “, 0x5Eu); printf(”%.10b; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%-10B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%‘B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”….—-….—-….—-….—- “); printf(”%#16.12b; “, 0xAB); printf(”%-#‘20.12b; “, 0xAB); printf(”%#‘020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#020B; “, 0xAB); printf(”%‘020B; “, 0xAB); printf("%020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#021B; “, 0xAB); printf(”%‘021B; “, 0xAB); printf("%021B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#022B; “, 0xAB); printf(”%‘022B; “, 0xAB); printf("%022B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#023B; “, 0xAB); printf(”%‘023B; “, 0xAB); printf("%023B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%-#‘19.11b; “, 0xAB); printf(”%#‘019B; “, 0xAB); printf(”%#019B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%‘019B; “, 0xAB); printf("%019B; “, 0xAB); printf(”%#016b; “, 0xAB); printf(”….—-….—-….—-….—- “); return 0; } static int b_printf(FILE *stream, const struct printf_info *info, const void const args[]) { char bin[UINTMAX_WIDTH]; size_t min_len, bin_len; ssize_t len, tmp; struct Printf_Pad pad = {0}; len = 0; min_len = b_bin_repr(bin, info, args[0]); bin_len = b_bin_len(info, min_len); pad.ch = pad_ch(info); if (pad.ch == ’ ‘) pad.len = b_pad_len(info, bin_len); / Padding with ’ ’ (right aligned) / if ((pad.ch == ’ ‘) && !info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } / “0b”/“0B” prefix / if (info->alt) { tmp = b_print_prefix(stream, info); if (tmp == EOF) return EOF; len += tmp; } / Padding with ‘0’ / if (pad.ch == ‘0’) { tmp = b_pad_zeros(stream, info, min_len); if (tmp == EOF) return EOF; len += tmp; } / Print number (including leading 0s to fill precision) / tmp = b_print_number(stream, info, bin, min_len, bin_len); if (tmp == EOF) return EOF; len += tmp; / Padding with ’ ’ (left aligned) */ if (info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } return len; } static int b_arginf_sz(const struct printf_info *info, size_t n, int argtypes[n], [[maybe_unused]] int size[n]) { if (n < 1) return -1; if (info->is_long_double) argtypes[0] = PA_INT | PA_FLAG_LONG_LONG; else if (info->is_long) argtypes[0] = PA_INT | PA_FLAG_LONG; else argtypes[0] = PA_INT; return 1; } static uintmax_t b_value(const struct printf_info *info, const void *arg) { if (info->is_long_double) return *(const unsigned long long *)arg; if (info->is_long) return *(const unsigned long )arg; / short and char are both promoted to int */ return *(const unsigned int *)arg; } static size_t b_bin_repr(char bin[UINTMAX_WIDTH], const struct printf_info *info, const void *arg) { size_t min_len; uintmax_t val; val = b_value(info, arg); bin[0] = ‘0’; for (min_len = 0; val; min_len++) { bin[min_len] = ‘0’ + (val % 2); val »= 1; } return MAX(min_len, 1); } static size_t b_bin_len(const struct printf_info *info, ptrdiff_t min_len) { return MAX(info->prec, min_len); } static size_t b_pad_len(const struct printf_info *info, ptrdiff_t bin_len) { ptrdiff_t pad_len; pad_len = info->width - bin_len; if (info->alt) pad_len -= 2; if (info->group) pad_len -= (bin_len - 1) / 4; return MAX(pad_len, 0); } static ssize_t b_print_prefix(FILE *stream, const struct printf_info *info) { ssize_t len; len = 0; if (fputc(‘0’, stream) == EOF) return EOF; len++; if (fputc(info->spec, stream) == EOF) return EOF; len++; return len; } static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info, ptrdiff_t min_len) { ssize_t len; ptrdiff_t tmp; len = 0; tmp = info->width - (info->alt * 2); if (info->group) tmp -= tmp / 5 - !(tmp % 5); for (ptrdiff_t i = tmp - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static ssize_t b_print_number(FILE *stream, const struct printf_info info, const char bin[UINTMAX_WIDTH], size_t min_len, size_t bin_len) { ssize_t len; len = 0; / Print leading zeros to fill precision / for (size_t i = bin_len - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } / Print number */ for (size_t i = min_len - 1; i < min_len; i–) { if (fputc(bin[i], stream) == EOF) return EOF; len++; if (!info->group || (i % 4) || !i) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static char pad_ch(const struct printf_info *info) { if ((info->prec != -1) || (info->pad == ’ ‘) || info->left) return ’ ‘; return ‘0’; } static ssize_t pad_spaces(FILE *stream, size_t pad_len) { ssize_t len; len = 0; for (size_t i = pad_len - 1; i < pad_len; i–) { if (fputc(’ ‘, stream) == EOF) return EOF; len++; } return len; }

SEE ALSO

asprintf(3), printf(3), wprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1626 - Linux cli command pcap_setnonblockpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_setnonblockpcap and provides detailed information about the command pcap_setnonblockpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_setnonblockpcap.

NAME 🖥️ pcap_setnonblockpcap 🖥️

set or get the state of non-blocking mode on a capture device

SYNOPSIS

#include <pcap/pcap.h>
char errbuf[PCAP_ERRBUF_SIZE];
int pcap_setnonblock(pcap_t *p, int nonblock, char *errbuf);
int pcap_getnonblock(pcap_t *p, char *errbuf);

DESCRIPTION

pcap_setnonblock() puts a capture handle into ``non-blocking’’ mode, or takes it out of ``non-blocking’’ mode, depending on whether the nonblock argument is non-zero or zero. It has no effect on ``savefiles’’. If there is an error, PCAP_ERROR is returned and errbuf is filled in with an appropriate error message; otherwise, 0 is returned.

In ``non-blocking’’ mode, an attempt to read from the capture descriptor with pcap_dispatch(3PCAP) and pcap_next_ex(3PCAP) will, if no packets are currently available to be read, return 0 immediately rather than blocking waiting for packets to arrive.

pcap_loop(3PCAP) will loop forever, consuming CPU time when no packets are currently available; pcap_dispatch() should be used instead. pcap_next(3PCAP) will return NULL if there are no packets currently available to read; this is indistinguishable from an error, so pcap_next_ex() should be used instead.

When first activated with pcap_activate(3PCAP) or opened with pcap_open_live(3PCAP), a capture handle is not in ``non-blocking mode’’; a call to pcap_setnonblock() is required in order to put it into ``non-blocking’’ mode.

RETURN VALUE

pcap_getnonblock() returns the current ``non-blocking’’ state of the capture descriptor; it always returns 0 on ``savefiles’’. If called on a capture handle that has been created but not activated, PCAP_ERROR_NOT_ACTIVATED is returned. If there is another error, PCAP_ERROR is returned and errbuf is filled in with an appropriate error message.

errbuf is assumed to be able to hold at least PCAP_ERRBUF_SIZE chars.

SEE ALSO

pcap(3PCAP), pcap_next_ex(3PCAP), pcap_geterr(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1627 - Linux cli command res_nquery

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command res_nquery and provides detailed information about the command res_nquery, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the res_nquery.

NAME 🖥️ res_nquery 🖥️

resolver routines

LIBRARY

Resolver library (libresolv, -lresolv)

SYNOPSIS

#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
struct __res_state;
typedef struct __res_state *res_state;
int res_ninit(res_state statep);
void res_nclose(res_state statep);
int res_nquery(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nsearch(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nquerydomain(res_state statep,
 const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
int res_nmkquery(res_state statep,
 int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
int res_nsend(res_state statep,
 const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);
int dn_comp(const char *exp_dn, unsigned char comp_dn[.length],
 int length, unsigned char **dnptrs,
 unsigned char **lastdnptr);
int dn_expand(const unsigned char *msg,
 const unsigned char *eomorig,
 const unsigned char *comp_dn, char exp_dn[.length],
 int length);
[[deprecated]] extern struct __res_state _res;
[[deprecated]] int res_init(void);
[[deprecated]]
int res_query(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_search(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_querydomain(const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
[[deprecated]]
int res_mkquery(int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
[[deprecated]]
int res_send(const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);

DESCRIPTION

Note: This page is incomplete (various resolver functions provided by glibc are not described) and likely out of date.

The functions described below make queries to and interpret the responses from Internet domain name servers.

The API consists of a set of more modern, reentrant functions and an older set of nonreentrant functions that have been superseded. The traditional resolver interfaces such as res_init() and res_query() use some static (global) state stored in the _res structure, rendering these functions non-thread-safe. BIND 8.2 introduced a set of new interfaces res_ninit(), res_nquery(), and so on, which take a res_state as their first argument, so you can use a per-thread resolver state.

The res_ninit() and res_init() functions read the configuration files (see resolv.conf(5)) to get the default domain name and name server address(es). If no server is given, the local host is tried. If no domain is given, that associated with the local host is used. It can be overridden with the environment variable LOCALDOMAIN. res_ninit() or res_init() is normally executed by the first call to one of the other functions. Every call to res_ninit() requires a corresponding call to res_nclose() to free memory allocated by res_ninit() and subsequent calls to res_nquery().

The res_nquery() and res_query() functions query the name server for the fully qualified domain name name of specified type and class. The reply is left in the buffer answer of length anslen supplied by the caller.

The res_nsearch() and res_search() functions make a query and waits for the response like res_nquery() and res_query(), but in addition they implement the default and search rules controlled by RES_DEFNAMES and RES_DNSRCH (see description of _res options below).

The res_nquerydomain() and res_querydomain() functions make a query using res_nquery()/res_query() on the concatenation of name and domain.

The following functions are lower-level routines used by res_nquery()/res_query().

The res_nmkquery() and res_mkquery() functions construct a query message in buf of length buflen for the domain name dname. The query type op is one of the following (typically QUERY):

QUERY
Standard query.

IQUERY
Inverse query. This option was removed in glibc 2.26, since it has not been supported by DNS servers for a very long time.

NS_NOTIFY_OP
Notify secondary of SOA (Start of Authority) change.

newrr is currently unused.

The res_nsend() and res_send() function send a preformatted query given in msg of length msglen and returns the answer in answer which is of length anslen. They will call res_ninit()/res_init() if it has not already been called.

The dn_comp() function compresses the domain name exp_dn and stores it in the buffer comp_dn of length length. The compression uses an array of pointers dnptrs to previously compressed names in the current message. The first pointer points to the beginning of the message and the list ends with NULL. The limit of the array is specified by lastdnptr. If dnptr is NULL, domain names are not compressed. If lastdnptr is NULL, the list of labels is not updated.

The dn_expand() function expands the compressed domain name comp_dn to a full domain name, which is placed in the buffer exp_dn of size length. The compressed name is contained in a query or reply message, and msg points to the beginning of the message.

The resolver routines use configuration and state information contained in a __res_state structure (either passed as the statep argument, or in the global variable _res, in the case of the older nonreentrant functions). The only field of this structure that is normally manipulated by the user is the options field. This field can contain the bitwise “OR” of the following options:

RES_INIT
True if res_ninit() or res_init() has been called.

RES_DEBUG
Print debugging messages. This option is available only if glibc was built with debugging enabled, which is not the default.

RES_AAONLY (unimplemented; deprecated in glibc 2.25)
Accept authoritative answers only. res_send() continues until it finds an authoritative answer or returns an error. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEVC
Use TCP connections for queries rather than UDP datagrams.

RES_PRIMARY (unimplemented; deprecated in glibc 2.25)
Query primary domain name server only. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_IGNTC
Ignore truncation errors. Don’t retry with TCP.

RES_RECURSE
Set the recursion desired bit in queries. Recursion is carried out by the domain name server, not by res_send(). [Enabled by default].

RES_DEFNAMES
If set, res_search() will append the default domain name to single component names—that is, those that do not contain a dot. [Enabled by default].

RES_STAYOPEN
Used with RES_USEVC to keep the TCP connection open between queries.

RES_DNSRCH
If set, res_search() will search for hostnames in the current domain and in parent domains. This option is used by gethostbyname(3). [Enabled by default].

RES_INSECURE1
Accept a response from a wrong server. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_INSECURE2
Accept a response which contains a wrong query. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_NOALIASES
Disable usage of HOSTALIASES environment variable.

RES_USE_INET6
Try an AAAA query before an A query inside the gethostbyname(3) function, and map IPv4 responses in IPv6 “tunneled form” if no AAAA records are found but an A record set exists. Since glibc 2.25, this option is deprecated, and its usage produces a warning; applications should use getaddrinfo(3), rather than gethostbyname(3).

RES_ROTATE
Causes round-robin selection of name servers from among those listed. This has the effect of spreading the query load among all listed servers, rather than having all clients try the first listed server first every time.

RES_NOCHECKNAME (unimplemented; deprecated in glibc 2.25)
Disable the modern BIND checking of incoming hostnames and mail names for invalid characters such as underscore (_), non-ASCII, or control characters. This option was present until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_KEEPTSIG (unimplemented; deprecated in glibc 2.25)
Do not strip TSIG records. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_BLAST (unimplemented; deprecated in glibc 2.25)
Send each query simultaneously and recursively to all servers. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEBSTRING (glibc 2.3.4 to glibc 2.24)
Make reverse IPv6 lookups using the bit-label format described in RFC 2673; if this option is not set (which is the default), then nibble format is used. This option was removed in glibc 2.25, since it relied on a backward-incompatible DNS extension that was never deployed on the Internet.

RES_NOIP6DOTINT (glibc 2.24 and earlier)
Use ip6.arpa zone in IPv6 reverse lookup instead of ip6.int, which is deprecated since glibc 2.3.4. This option is present up to and including glibc 2.24, where it is enabled by default. In glibc 2.25, this option was removed.

RES_USE_EDNS0 (since glibc 2.6)
Enables support for the DNS extensions (EDNS0) described in RFC 2671.

RES_SNGLKUP (since glibc 2.10)
By default, glibc performs IPv4 and IPv6 lookups in parallel since glibc 2.9. Some appliance DNS servers cannot handle these queries properly and make the requests time out. This option disables the behavior and makes glibc perform the IPv6 and IPv4 requests sequentially (at the cost of some slowdown of the resolving process).

RES_SNGLKUPREOP
When RES_SNGLKUP option is enabled, opens a new socket for the each request.

RES_USE_DNSSEC
Use DNSSEC with OK bit in OPT record. This option implies RES_USE_EDNS0.

RES_NOTLDQUERY
Do not look up unqualified name as a top-level domain (TLD).

RES_DEFAULT
Default option which implies: RES_RECURSE, RES_DEFNAMES, RES_DNSRCH, and RES_NOIP6DOTINT.

RETURN VALUE

The res_ninit() and res_init() functions return 0 on success, or -1 if an error occurs.

The res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), res_querydomain(), res_nmkquery(), res_mkquery(), res_nsend(), and res_send() functions return the length of the response, or -1 if an error occurs.

The dn_comp() and dn_expand() functions return the length of the compressed name, or -1 if an error occurs.

In the case of an error return from res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), or res_querydomain(), the global variable h_errno (see gethostbyname(3)) can be consulted to determine the cause of the error.

FILES

/etc/resolv.conf
resolver configuration file

/etc/host.conf
resolver configuration file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

res_ninit(), res_nclose(), res_nquery(), res_nsearch(), res_nquerydomain(), res_nsend()

Thread safetyMT-Safe locale

res_nmkquery(), dn_comp(), dn_expand()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

4.3BSD.

SEE ALSO

gethostbyname(3), resolv.conf(5), resolver(5), hostname(7), named(8)

The GNU C library source file resolv/README.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1628 - Linux cli command shm_unlink

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command shm_unlink and provides detailed information about the command shm_unlink, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the shm_unlink.

NAME 🖥️ shm_unlink 🖥️

create/open or unlink POSIX shared memory objects

LIBRARY

Real-time library (librt, -lrt)

SYNOPSIS

#include <sys/mman.h>
#include <sys/stat.h> /* For mode constants */
#include <fcntl.h> /* For O_* constants */
int shm_open(const char *name, int oflag, mode_t mode);
int shm_unlink(const char *name);

DESCRIPTION

shm_open() creates and opens a new, or opens an existing, POSIX shared memory object. A POSIX shared memory object is in effect a handle which can be used by unrelated processes to mmap(2) the same region of shared memory. The shm_unlink() function performs the converse operation, removing an object previously created by shm_open().

The operation of shm_open() is analogous to that of open(2). name specifies the shared memory object to be created or opened. For portable use, a shared memory object should be identified by a name of the form /somename; that is, a null-terminated string of up to NAME_MAX (i.e., 255) characters consisting of an initial slash, followed by one or more characters, none of which are slashes.

oflag is a bit mask created by ORing together exactly one of O_RDONLY or O_RDWR and any of the other flags listed here:

O_RDONLY
Open the object for read access. A shared memory object opened in this way can be mmap(2)ed only for read (PROT_READ) access.

O_RDWR
Open the object for read-write access.

O_CREAT
Create the shared memory object if it does not exist. The user and group ownership of the object are taken from the corresponding effective IDs of the calling process, and the object’s permission bits are set according to the low-order 9 bits of mode, except that those bits set in the process file mode creation mask (see umask(2)) are cleared for the new object. A set of macro constants which can be used to define mode is listed in open(2). (Symbolic definitions of these constants can be obtained by including <sys/stat.h>.)

A new shared memory object initially has zero length—the size of the object can be set using ftruncate(2). The newly allocated bytes of a shared memory object are automatically initialized to 0.

O_EXCL
If O_CREAT was also specified, and a shared memory object with the given name already exists, return an error. The check for the existence of the object, and its creation if it does not exist, are performed atomically.

O_TRUNC
If the shared memory object already exists, truncate it to zero bytes.

Definitions of these flag values can be obtained by including <fcntl.h>.

On successful completion shm_open() returns a new file descriptor referring to the shared memory object. This file descriptor is guaranteed to be the lowest-numbered file descriptor not previously opened within the process. The FD_CLOEXEC flag (see fcntl(2)) is set for the file descriptor.

The file descriptor is normally used in subsequent calls to ftruncate(2) (for a newly created object) and mmap(2). After a call to mmap(2) the file descriptor may be closed without affecting the memory mapping.

The operation of shm_unlink() is analogous to unlink(2): it removes a shared memory object name, and, once all processes have unmapped the object, deallocates and destroys the contents of the associated memory region. After a successful shm_unlink(), attempts to shm_open() an object with the same name fail (unless O_CREAT was specified, in which case a new, distinct object is created).

RETURN VALUE

On success, shm_open() returns a file descriptor (a nonnegative integer). On success, shm_unlink() returns 0. On failure, both functions return -1 and set errno to indicate the error.

ERRORS

EACCES
Permission to shm_unlink() the shared memory object was denied.

EACCES
Permission was denied to shm_open() name in the specified mode, or O_TRUNC was specified and the caller does not have write permission on the object.

EEXIST
Both O_CREAT and O_EXCL were specified to shm_open() and the shared memory object specified by name already exists.

EINVAL
The name argument to shm_open() was invalid.

EMFILE
The per-process limit on the number of open file descriptors has been reached.

ENAMETOOLONG
The length of name exceeds PATH_MAX.

ENFILE
The system-wide limit on the total number of open files has been reached.

ENOENT
An attempt was made to shm_open() a name that did not exist, and O_CREAT was not specified.

ENOENT
An attempt was to made to shm_unlink() a name that does not exist.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

shm_open(), shm_unlink()

Thread safetyMT-Safe locale

VERSIONS

POSIX leaves the behavior of the combination of O_RDONLY and O_TRUNC unspecified. On Linux, this will successfully truncate an existing shared memory object—this may not be so on other UNIX systems.

The POSIX shared memory object implementation on Linux makes use of a dedicated tmpfs(5) filesystem that is normally mounted under /dev/shm.

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.2. POSIX.1-2001.

POSIX.1-2001 says that the group ownership of a newly created shared memory object is set to either the calling process’s effective group ID or “a system default group ID”. POSIX.1-2008 says that the group ownership may be set to either the calling process’s effective group ID or, if the object is visible in the filesystem, the group ID of the parent directory.

EXAMPLES

The programs below employ POSIX shared memory and POSIX unnamed semaphores to exchange a piece of data. The “bounce” program (which must be run first) raises the case of a string that is placed into the shared memory by the “send” program. Once the data has been modified, the “send” program then prints the contents of the modified shared memory. An example execution of the two programs is the following:

$ ./pshm_ucase_bounce /myshm &
[1] 270171
$ ./pshm_ucase_send /myshm hello
HELLO

Further detail about these programs is provided below.

Program source: pshm_ucase.h

The following header file is included by both programs below. Its primary purpose is to define a structure that will be imposed on the memory object that is shared between the two programs.

#ifndef PSHM_UCASE_H
#define PSHM_UCASE_H
#include <semaphore.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \
                        } while (0)
#define BUF_SIZE 1024   /* Maximum size for exchanged string */
/* Define a structure that will be imposed on the shared
   memory object */
struct shmbuf {
    sem_t  sem1;            /* POSIX unnamed semaphore */
    sem_t  sem2;            /* POSIX unnamed semaphore */
    size_t cnt;             /* Number of bytes used in 'buf' */
    char   buf[BUF_SIZE];   /* Data being transferred */
};
#endif  // include guard

Program source: pshm_ucase_bounce.c

The “bounce” program creates a new shared memory object with the name given in its command-line argument and sizes the object to match the size of the shmbuf structure defined in the header file. It then maps the object into the process’s address space, and initializes two POSIX semaphores inside the object to 0.

After the “send” program has posted the first of the semaphores, the “bounce” program upper cases the data that has been placed in the memory by the “send” program and then posts the second semaphore to tell the “send” program that it may now access the shared memory.

/* pshm_ucase_bounce.c
   Licensed under GNU General Public License v2 or later.
*/
#include <ctype.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <unistd.h>
#include "pshm_ucase.h"
int
main(int argc, char *argv[])
{
    int            fd;
    char           *shmpath;
    struct shmbuf  *shmp;
    if (argc != 2) {
        fprintf(stderr, "Usage: %s /shm-path

“, argv[0]); exit(EXIT_FAILURE); } shmpath = argv[1]; /* Create shared memory object and set its size to the size of our structure. / fd = shm_open(shmpath, O_CREAT | O_EXCL | O_RDWR, 0600); if (fd == -1) errExit(“shm_open”); if (ftruncate(fd, sizeof(struct shmbuf)) == -1) errExit(“ftruncate”); / Map the object into the caller’s address space. */ shmp = mmap(NULL, sizeof(shmp), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (shmp == MAP_FAILED) errExit(“mmap”); / Initialize semaphores as process-shared, with value 0. / if (sem_init(&shmp->sem1, 1, 0) == -1) errExit(“sem_init-sem1”); if (sem_init(&shmp->sem2, 1, 0) == -1) errExit(“sem_init-sem2”); / Wait for ‘sem1’ to be posted by peer before touching shared memory. / if (sem_wait(&shmp->sem1) == -1) errExit(“sem_wait”); / Convert data in shared memory into upper case. / for (size_t j = 0; j < shmp->cnt; j++) shmp->buf[j] = toupper((unsigned char) shmp->buf[j]); / Post ‘sem2’ to tell the peer that it can now access the modified data in shared memory. / if (sem_post(&shmp->sem2) == -1) errExit(“sem_post”); / Unlink the shared memory object. Even if the peer process is still using the object, this is okay. The object will be removed only after all open references are closed. */ shm_unlink(shmpath); exit(EXIT_SUCCESS); }

Program source: pshm_ucase_send.c

The “send” program takes two command-line arguments: the pathname of a shared memory object previously created by the “bounce” program and a string that is to be copied into that object.

The program opens the shared memory object and maps the object into its address space. It then copies the data specified in its second argument into the shared memory, and posts the first semaphore, which tells the “bounce” program that it can now access that data. After the “bounce” program posts the second semaphore, the “send” program prints the contents of the shared memory on standard output.

/* pshm_ucase_send.c
   Licensed under GNU General Public License v2 or later.
*/
#include <fcntl.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <unistd.h>
#include "pshm_ucase.h"
int
main(int argc, char *argv[])
{
    int            fd;
    char           *shmpath, *string;
    size_t         len;
    struct shmbuf  *shmp;
    if (argc != 3) {
        fprintf(stderr, "Usage: %s /shm-path string

“, argv[0]); exit(EXIT_FAILURE); } shmpath = argv[1]; string = argv[2]; len = strlen(string); if (len > BUF_SIZE) { fprintf(stderr, “String is too long “); exit(EXIT_FAILURE); } /* Open the existing shared memory object and map it into the caller’s address space. */ fd = shm_open(shmpath, O_RDWR, 0); if (fd == -1) errExit(“shm_open”); shmp = mmap(NULL, sizeof(shmp), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (shmp == MAP_FAILED) errExit(“mmap”); / Copy data into the shared memory object. / shmp->cnt = len; memcpy(&shmp->buf, string, len); / Tell peer that it can now access shared memory. / if (sem_post(&shmp->sem1) == -1) errExit(“sem_post”); / Wait until peer says that it has finished accessing the shared memory. / if (sem_wait(&shmp->sem2) == -1) errExit(“sem_wait”); / Write modified data in shared memory to standard output. */ write(STDOUT_FILENO, &shmp->buf, len); write(STDOUT_FILENO, " “, 1); exit(EXIT_SUCCESS); }

SEE ALSO

close(2), fchmod(2), fchown(2), fcntl(2), fstat(2), ftruncate(2), memfd_create(2), mmap(2), open(2), umask(2), shm_overview(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1629 - Linux cli command XtRemoveGrab

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtRemoveGrab and provides detailed information about the command XtRemoveGrab, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtRemoveGrab.

NAME 🖥️ XtRemoveGrab 🖥️

redirect user input to a modal widget

SYNTAX

#include <X11/Intrinsic.h>

void XtAddGrab(Widget w, Boolean exclusive, Boolean spring_loaded);

void XtRemoveGrab(Widget w);

ARGUMENTS

exclusive
Specifies whether user events should be dispatched exclusively to this widget or also to previous widgets in the cascade.

spring_loaded
Specifies whether this widget was popped up because the user pressed a pointer button.

  1. Specifies the widget to add to or remove from the modal cascade.

DESCRIPTION

The XtAddGrab function appends the widget (and associated parameters) to the modal cascade and checks that exclusive is True if spring_loaded is True. If these are not True, XtAddGrab generates an error.

The modal cascade is used by XtDispatchEvent when it tries to dispatch a user event. When at least one modal widget is in the widget cascade, XtDispatchEvent first determines if the event should be delivered. It starts at the most recent cascade entry and follows the cascade up to and including the most recent cascade entry added with the exclusive parameter True.

This subset of the modal cascade along with all descendants of these widgets comprise the active subset. User events that occur outside the widgets in this subset are ignored or remapped. Modal menus with submenus generally add a submenu widget to the cascade with exclusive False. Modal dialog boxes that need to restrict user input to the most deeply nested dialog box add a subdialog widget to the cascade with exclusive True. User events that occur within the active subset are delivered to the appropriate widget, which is usually a child or further descendant of the modal widget.

Regardless of where on the screen they occur, remap events are always delivered to the most recent widget in the active subset of the cascade that has spring_loaded True, if any such widget exists.

The XtRemoveGrab function removes widgets from the modal cascade starting at the most recent widget up to and including the specified widget. It issues an error if the specified widget is not on the modal cascade.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1630 - Linux cli command Net_RawIPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_RawIPpm and provides detailed information about the command Net_RawIPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_RawIPpm.

NAME 🖥️ Net_RawIPpm 🖥️

Perl extension to manipulate raw IP packets with interface to libpcap

VERSION

This is the documentation of Net::RawIP version 0.25

SYNOPSIS

use Net::RawIP; $n = Net::RawIP->new({ ip => { saddr => my.target.lan, daddr => my.target.lan, }, }); tcp => { source => 139, dest => 139, psh => 1, syn => 1, }, }); $n->send; $n->ethnew(“eth0”); $n->ethset(source => my.target.lan, dest =>my.target.lan); $n->ethsend; $p = $n->pcapinit(“eth0”, “dst port 21”, 1500, 30); $f = dump_open($p, “/my/home/log”); loop($p, 10, \dump, $f);

DESCRIPTION

This package provides a class which can be used for creating, manipulating and sending raw IP packets with optional features for manipulating Ethernet headers.

Note: Ethernet related methods are implemented on Linux and *BSD only.

As its name implies, this module is quite low-level, and currently duplicates some features with Net::Pcap. If you prefer a higher-level module (in terms of Perl support), please take a look at Net::Write, which provides a portable interface to construct and send raw packets on the network.

Exported constants

PCAP_ERRBUF_SIZE PCAP_VERSION_MAJOR PCAP_VERSION_MINOR lib_pcap_h

Exported functions

open_live open_offline dump_open lookupdev lookupnet dispatch loop dump compile setfilter next datalink snapshot is_swapped major_version minor_version stats file fileno perror geterr strerror close dump_close timem linkoffset ifaddrlist rdev

By default exported functions are the loop, dispatch, dump_open, dump, open_live, timem, linkoffset, ifaddrlist, rdev. You have to use the export tag pcap for export all of the pcap functions. Please read the docs for the libpcap and look at Net::RawIP::libpcap (3pm).

Please look at the examples in the examples/ folder of the distribution.

METHODS

new
Net::RawIP->new({ ARGPROTO => {PROTOKEY => PROTOVALUE,…} ip => {IPKEY => IPVALUE,…}, }) ARGPROTO is one of (tcp, udp, icmp, generic) defining the protocol of the current packet. Defaults to tcp. You can NOT change protocol in the object after its creation. Unless you want your packet to be TCP, you must set the protocol type in the new() call. The possible values of PROTOKEY depend on the value of ARGPROTO If ARGPROTO is <tcp> PROTOKEY can be one of (source, dest, seq, ack_seq, doff, res1, res2, urg, ack, psh, rst, syn, fin, window, check, urg_ptr, data). If ARGPROTO is icmp PROTOKEY can be one of (type, code, check, gateway, id, sequence, unused, mtu, data). If ARGPROTO is udp PROTOKEY can be one of (source, dest, len, check, data) If ARGPROTO is generic PROTOKEY can be data only. The data entries are scalars containing packed network byte order data. As the real icmp packet is a C union one can specify only one of the following set of values.

  • gateway - (int)

  • (id and sequence) - (short and short)

  • (mtu and unused) - (short and short)

The default values are:

  • (0,0,0,0,5,0,0,0,0,0,0,0,0,0xffff,0,0,’’) for tcp

  • (0,0,0,0,0,0,0,0,’’) for icmp

  • (0,0,0,0,’’) for udp

  • (’’) for generic

The valid values for urg ack psh rst syn fin are 0 or 1. The value of data is a string. Length of the result packet will be calculated if you do not specify non-zero value for tot_len. The value of ip is a hash defining the parameters of the IP header (iphdr) in the current IP packet. IPKEY is one of (version, ihl, tos, tot_len, id, frag_off, ttl, protocol, check, saddr, daddr). You can to specify any and all of the above parameters. If check is not given checksum will be calculated automatically. The values of the saddr and the daddr can be hostname (e.g. www.oracle.com ) or IP address (205.227.44.16), and even the integer value if you happen to know what is 205.227.44.16 as an unsigned int in the host format ;). Examples: my $rawip = Net::RawIP->new({udp =>{}}); or my $rawip = Net::RawIP->new({ip => { tos => 22 }, udp => { source => 22,dest =>23 } }); The default values of the ip hash are

  • (4,5,16,0,0,0x4000,64,6,0,0,0) for tcp

  • (4,5,16,0,0,0x4000,64,17,0,0,0) for udp

  • (4,5,16,0,0,0x4000,64,1,0,0,0) for icmp

  • (4,5,16,0,0,0x4000,64,0,0,0,0) for generic

dump_open
If dump_open opens and returns a valid file descriptor, this descriptor can be used in the perl callback as a perl filehandle.

loop

dispatch

loop and dispatch can run a perl code refs as a callbacks for packet analyzing and printing. the fourth parameter for loop and dispatch can be an array or a hash reference and it can be dereferenced in a perl callback.

next
next() returns a string (next packet).

timem
timem() returns a string that looks like sec.microsec, where the sec and the microsec are the values returned by gettimeofday (3). If microsec is less than 100000 then zeros will be added to the left side of microsec for adjusting to six digits. Similar to sprintf("%.6f", Time::HiRes::time());

linkoffset
The function which called linkoffset returns a number of the bytes in the link protocol header e.g. 14 for a Ethernet or 4 for a Point-to-Point protocol. This function has one input parameter (pcap_t*) that is returned by open_live.

ifaddrlist
ifaddrlist() returns a hash reference. In this hash keys are the running network devices, values are ip addresses of those devices in an internet address format.

rdev
rdev() returns a name of the outgoing device for given destination address. It has one input parameter (destination address in an internet address or a domain name or a host byteorder int formats).

proto
Returns the name of the subclass current object e.g. tcp. No input parameters.

packet
Returns a scalar which contain the packed ip packet of the current object. No input parameters.

set
Method for setting the parameters of the current object. The given parameters must look like the parameters for the constructor.

bset($packet,$eth)
Method for setting the parameters of the current object. $packet is a scalar which contain binary structure (an ip or an eth packet). This scalar must match with the subclass of the current object. If $eth is given and it have a non-zero value then assumed that packet is a ethernet packet,otherwise it is a ip packet.

get
is a method for get the parameters from the current object. This method returns the array which will be filled with an asked parameters in order as they have ordered in packet if you’d call it with an array context. If this method is called with a scalar context then it returns a hash reference. In that hash will stored an asked parameters as values,the keys are their names. The input parameter is a hash reference. In this hash can be three keys. They are a ip and an one of the ARGPROTOs. The value must be an array reference. This array contain asked parameters. E.g. you want to know current value of the tos from the iphdr and the flags of the tcphdr. Here is a code : ($tos,$urg,$ack,$psh,$rst,$syn,$fin) = $packet->get({ ip => [qw(tos)], tcp => [qw(psh syn urg ack rst fin)] }); The members in the array can be given in any order. For get the ethernet parameters you have to use the key eth and the values of the array (dest,source,proto). The values of the dest and the source will look like the output of the ifconfig (8) e.g. 00:00:E8:43:0B:2A.

open_live

send($delay,$times)

is a method which has used for send raw ip packet. The input parameters are the delay seconds and the times for repeating send. If you do not specify parameters for the send,then packet will be sent once without delay. If you do specify for the times a negative value then packet will be sent forever. E.g. you want to send the packet for ten times with delay equal to one second. Here is a code : $packet->send(1,10); The delay could be specified not only as integer but and as 0.25 for sleep to 250 ms or 3.5 to sleep for 3 seconds and 500 ms.

pcapinit($device,$filter,$psize,$timeout)
is a method for some a pcap init. The input parameters are a device,a string with a program for a filter,a packet size,a timeout. This method will call the function open_live,then compile the filter string by compile(), set the filter and returns the pointer (pcap_t *).

pcapinit_offline($fname)
is a method for an offline pcap init.The input parameter is a name of the file which contains raw output of the libpcap dump function. Returns the pointer (pcap_t *).

ethnew($device,dest => ARGOFDEST,source => ARGOFSOURCE)
is a method for init the ethernet subclass in the current object, $device is a required parameter,dest and source are an optional, $device is an ethernet device e.g. eth0, an ARGOFDEST and an ARGOFSOURCE are a the ethernet addresses in the ethernet header of the current object. The ARGOFDEST and the ARGOFSOURCE can be given as a string which contain just 6 bytes of the real ethernet address or like the output of the ifconfig (8) e.g. 00:00:E8:43:0B:2A or just an ip address or a hostname of a target, then a mac address will be discovered automatically. The ethernet frame will be sent with given addresses. By default the source and the dest will be filled with a hardware address of the $device. NOTE: For use methods which are related to the ethernet you have to before initialize ethernet subclass by ethnew.

ethset
is a method for set an ethernet parameters in the current object. The given parameters must look like parameters for the ethnew without a $device.

ethsend
is a method for send an ethernet frame. The given parameters must look like a parameters for the send.

send_eth_frame($frame,$times,$delay)
is a method for send any ethernet frame which you may construct by hands.$frame is a packed ethernet frame exept destination and source fields(these fields can be setting by ethset or ethnew). Another parameters must look like the parameters for the send.

optset(OPTPROTO => { type => […],data => […] },…)
is a method for set an IP and a TCP options. The parameters for the optset must be given as a key-value pairs. The OPTPROTO,s are the prototypes of the options(ip,tcp),values are the hashes references.The keys in this hashes are type and data. The value of the type is an array reference. This array must be filled with an integers.Refer to a RFC for a valid types.The value of the data also is an array reference. This array must be filled with strings which must contain all bytes from a option except bytes with type and length of an option.Of course indexes in those arrays must be equal for the one option.If type is equal to 0 or 1 then there is no bytes with a length and a data,but you have to specify zero data for compatibility.

optget(OPTPROTO => { type => […] },…)
is a method for get an IP and a TCP options. The parameters for the optget must be given as key-value pairs. The OPTPROTO is the prototype of the options(ip,tcp),the values are the hashes references.The key is the type.The value of the type is an array reference. The return value is an array which will be filled with asked types,lengths,datas of the each type of the option in order as you have asked.If you do not specify type then all types,lengths,datas of an options will be returned. E.g. you want to know all the IP options from the current object. Here is a code: @opts = $n->optget(ip => {}); E.g. you want to know just the IP options with the type which equal to 131 and 137. Here is a code: ($t131,$l131,$d131,$t137,$l137,$d137) = $n->optget( ip =>{ type =>[(131,137)] } );

optunset
is a method for unset a subclass of the IP or the TCP options from a current object.It can be used if you won’t use options in the current object later. This method must be used only after the optset. The parameters for this method are the OPTPROTO’s. E.g. you want to unset an IP options. Here is a code: $n->optunset(ip); E.g. you want to unset a TCP and an IP options. Here is a code: $n->optunset(ip,tcp);

SEE ALSO

pcap (3), tcpdump (1), RFC 791-793, RFC 768.

Net::Pcap, Net::Pcap::Easy, Net::Pcap::Reassemble, Net::Pcap::FindDevice

Net::Write for an alternative module to send raw packets on the network

AUTHORS

Current maintainer is Sébastien Aperghis-Tramoni <[email protected]>

Previous authors & maintainers:

COPYRIGHT & LICENSE

Copyright (c) 1998-2006 Sergey Kolychev. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

CREDITS

Steve Bonds <[email protected]> + work on some endianness bugs and improving code comments

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1631 - Linux cli command gethostbyname

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gethostbyname and provides detailed information about the command gethostbyname, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gethostbyname.

NAME 🖥️ gethostbyname 🖥️

get network host entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
void sethostent(int stayopen);
void endhostent(void);
[[deprecated]] extern int h_errno;
[[deprecated]] struct hostent *gethostbyname(const char *name);
[[deprecated]] struct hostent *gethostbyaddr(const void addr[.len],
 socklen_t len, int type);
[[deprecated]] void herror(const char *s);
[[deprecated]] const char *hstrerror(int err);
/* System V/POSIX extension */
struct hostent *gethostent(void);
/* GNU extensions */
[[deprecated]]
struct hostent *gethostbyname2(const char *name, int af);
int gethostent_r(struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyaddr_r(const void addr[restrict .len], socklen_t len,
 int type,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyname_r(const char *restrict name,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyname2_r(const char *restrict name, int af,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

gethostbyname2(), gethostent_r(), gethostbyaddr_r(), gethostbyname_r(), gethostbyname2_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc up to and including 2.19:
        _BSD_SOURCE || _SVID_SOURCE

herror(), hstrerror():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.8 to glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE
    Before glibc 2.8:
        none

h_errno:

    Since glibc 2.19
        _DEFAULT_SOURCE || _POSIX_C_SOURCE < 200809L
    glibc 2.12 to glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE || _POSIX_C_SOURCE < 200809L
    Before glibc 2.12:
        none

DESCRIPTION

The gethostbyname*(), gethostbyaddr*(), herror(), and hstrerror() functions are obsolete. Applications should use getaddrinfo(3), getnameinfo(3), and gai_strerror(3) instead.

The sethostent() function specifies, if stayopen is true (1), that a connected TCP socket should be used for the name server queries and that the connection should remain open during successive queries. Otherwise, name server queries will use UDP datagrams.

The endhostent() function ends the use of a TCP connection for name server queries.

The gethostbyname() function returns a structure of type hostent for the given host name. Here name is either a hostname or an IPv4 address in standard dot notation (as for inet_addr(3)). If name is an IPv4 address, no lookup is performed and gethostbyname() simply copies name into the h_name field and its struct in_addr equivalent into the h_addr_list[0] field of the returned hostent structure. If name doesn’t end in a dot and the environment variable HOSTALIASES is set, the alias file pointed to by HOSTALIASES will first be searched for name (see hostname(7) for the file format). The current domain and its parents are searched unless name ends in a dot.

The gethostbyaddr() function returns a structure of type hostent for the given host address addr of length len and address type type. Valid address types are AF_INET and AF_INET6 (defined in <sys/socket.h>). The host address argument is a pointer to a struct of a type depending on the address type, for example a struct in_addr * (probably obtained via a call to inet_addr(3)) for address type AF_INET.

The (obsolete) herror() function prints the error message associated with the current value of h_errno on stderr.

The (obsolete) hstrerror() function takes an error number (typically h_errno) and returns the corresponding message string.

The domain name queries carried out by gethostbyname() and gethostbyaddr() rely on the Name Service Switch (nsswitch.conf(5)) configured sources or a local name server (named(8)). The default action is to query the Name Service Switch (nsswitch.conf(5)) configured sources, failing that, a local name server (named(8)).

Historical

The nsswitch.conf(5) file is the modern way of controlling the order of host lookups.

In glibc 2.4 and earlier, the order keyword was used to control the order of host lookups as defined in /etc/host.conf (host.conf(5)).

The hostent structure is defined in <netdb.h> as follows:

struct hostent {
    char  *h_name;            /* official name of host */
    char **h_aliases;         /* alias list */
    int    h_addrtype;        /* host address type */
    int    h_length;          /* length of address */
    char **h_addr_list;       /* list of addresses */
}
#define h_addr h_addr_list[0] /* for backward compatibility */

The members of the hostent structure are:

h_name
The official name of the host.

h_aliases
An array of alternative names for the host, terminated by a null pointer.

h_addrtype
The type of address; always AF_INET or AF_INET6 at present.

h_length
The length of the address in bytes.

h_addr_list
An array of pointers to network addresses for the host (in network byte order), terminated by a null pointer.

h_addr
The first address in h_addr_list for backward compatibility.

RETURN VALUE

The gethostbyname() and gethostbyaddr() functions return the hostent structure or a null pointer if an error occurs. On error, the h_errno variable holds an error number. When non-NULL, the return value may point at static data, see the notes below.

ERRORS

The variable h_errno can have the following values:

HOST_NOT_FOUND
The specified host is unknown.

NO_DATA
The requested name is valid but does not have an IP address. Another type of request to the name server for this domain may return an answer. The constant NO_ADDRESS is a synonym for NO_DATA.

NO_RECOVERY
A nonrecoverable name server error occurred.

TRY_AGAIN
A temporary error occurred on an authoritative name server. Try again later.

FILES

/etc/host.conf
resolver configuration file

/etc/hosts
host database file

/etc/nsswitch.conf
name service switch configuration

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

gethostbyname()

Thread safety

MT-Unsafe race:hostbyname env locale

gethostbyaddr()

Thread safety

MT-Unsafe race:hostbyaddr env locale

sethostent(), endhostent(), gethostent_r()

Thread safety

MT-Unsafe race:hostent env locale

herror(), hstrerror()

Thread safetyMT-Safe

gethostent()

Thread safety

MT-Unsafe race:hostent race:hostentbuf env locale

gethostbyname2()

Thread safety

MT-Unsafe race:hostbyname2 env locale

gethostbyaddr_r(), gethostbyname_r(), gethostbyname2_r()

Thread safetyMT-Safe env locale

In the above table, hostent in race:hostent signifies that if any of the functions sethostent(), gethostent(), gethostent_r(), or endhostent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

sethostent()
endhostent()
gethostent()
POSIX.1-2008.

gethostent_r()
GNU.

Others:
None.

HISTORY

sethostent()
endhostent()
gethostent()
POSIX.1-2001.

gethostbyname()
gethostbyaddr()
h_errno
Marked obsolescent in POSIX.1-2001. Removed in POSIX.1-2008, recommending the use of getaddrinfo(3) and getnameinfo(3) instead.

NOTES

The functions gethostbyname() and gethostbyaddr() may return pointers to static data, which may be overwritten by later calls. Copying the struct hostent does not suffice, since it contains pointers; a deep copy is required.

In the original BSD implementation the len argument of gethostbyname() was an int. The SUSv2 standard is buggy and declares the len argument of gethostbyaddr() to be of type size_t. (That is wrong, because it has to be int, and size_t is not. POSIX.1-2001 makes it socklen_t, which is OK.) See also accept(2).

The BSD prototype for gethostbyaddr() uses const char * for the first argument.

System V/POSIX extension

POSIX requires the gethostent() call, which should return the next entry in the host data base. When using DNS/BIND this does not make much sense, but it may be reasonable if the host data base is a file that can be read line by line. On many systems, a routine of this name reads from the file /etc/hosts. It may be available only when the library was built without DNS support. The glibc version will ignore ipv6 entries. This function is not reentrant, and glibc adds a reentrant version gethostent_r().

GNU extensions

glibc2 also has a gethostbyname2() that works like gethostbyname(), but permits to specify the address family to which the address must belong.

glibc2 also has reentrant versions gethostent_r(), gethostbyaddr_r(), gethostbyname_r(), and gethostbyname2_r(). The caller supplies a hostent structure ret which will be filled in on success, and a temporary work buffer buf of size buflen. After the call, result will point to the result on success. In case of an error or if no entry is found result will be NULL. The functions return 0 on success and a nonzero error number on failure. In addition to the errors returned by the nonreentrant versions of these functions, if buf is too small, the functions will return ERANGE, and the call should be retried with a larger buffer. The global variable h_errno is not modified, but the address of a variable in which to store error numbers is passed in h_errnop.

BUGS

gethostbyname() does not recognize components of a dotted IPv4 address string that are expressed in hexadecimal.

SEE ALSO

getaddrinfo(3), getnameinfo(3), inet(3), inet_ntop(3), inet_pton(3), resolver(3), hosts(5), nsswitch.conf(5), hostname(7), named(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1632 - Linux cli command Moose_Cookbook_Legacy_Labeled_AttributeMetaclasspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Legacy_Labeled_AttributeMetaclasspm and provides detailed information about the command Moose_Cookbook_Legacy_Labeled_AttributeMetaclasspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Legacy_Labeled_AttributeMetaclasspm.

NAME 🖥️ Moose_Cookbook_Legacy_Labeled_AttributeMetaclasspm 🖥️

A meta-attribute, attributes with labels

VERSION

version 2.2207

SYNOPSIS

package MyApp::Meta::Attribute::Labeled; use Moose; extends Moose::Meta::Attribute; has label => ( is => rw, isa => Str, predicate => has_label, ); package Moose::Meta::Attribute::Custom::Labeled; sub register_implementation {MyApp::Meta::Attribute::Labeled} package MyApp::Website; use Moose; has url => ( metaclass => Labeled, is => rw, isa => Str, label => “The sites URL”, ); has name => ( is => rw, isa => Str, ); sub dump { my $self = shift; my $meta = $self->meta; my $dump = ; for my $attribute ( map { $meta->get_attribute($_) } sort $meta->get_attribute_list ) { if ( $attribute->isa(MyApp::Meta::Attribute::Labeled) && $attribute->has_label ) { $dump .= $attribute->label; } else { $dump .= $attribute->name; } my $reader = $attribute->get_read_method; $dump .= “: " . $self->$reader . " “; } return $dump; } package main; my $app = MyApp::Website->new( url => “http://google.com”, name => “Google” );

SUMMARY

WARNING: Subclassing metaclasses (as opposed to providing metaclass traits) is strongly discouraged. This recipe is provided solely for reference when encountering older code that does this.

In this recipe, we begin to delve into the wonder of meta-programming. Some readers may scoff and claim that this is the arena of only the most twisted Moose developers. Absolutely not! Any sufficiently twisted developer can benefit greatly from going more meta.

Our goal is to allow each attribute to have a human-readable “label” attached to it. Such labels would be used when showing data to an end user. In this recipe we label the url attribute with “The site’s URL” and create a simple method showing how to use that label.

The proper, modern way to extend attributes (using a role instead of a subclass) is described in Moose::Cookbook::Meta::Recipe3, but that recipe assumes you’ve read and at least tried to understand this one.

META-ATTRIBUTE OBJECTS

All the attributes of a Moose-based object are actually objects themselves. These objects have methods and attributes. Let’s look at a concrete example.

has x => ( isa => Int, is => ro ); has y => ( isa => Int, is => rw );

Internally, the metaclass for Point has two Moose::Meta::Attribute. There are several methods for getting meta-attributes out of a metaclass, one of which is get_attribute_list. This method is called on the metaclass object.

The get_attribute_list method returns a list of attribute names. You can then use get_attribute to get the Moose::Meta::Attribute object itself.

Once you have this meta-attribute object, you can call methods on it like this:

print $point->meta->get_attribute(x)->type_constraint; => Int

To add a label to our attributes there are two steps. First, we need a new attribute metaclass that can store a label for an attribute. Second, we need to create attributes that use that attribute metaclass.

RECIPE REVIEW

We start by creating a new attribute metaclass.

package MyApp::Meta::Attribute::Labeled; use Moose; extends Moose::Meta::Attribute;

We can subclass a Moose metaclass in the same way that we subclass anything else.

has label => ( is => rw, isa => Str, predicate => has_label, );

Again, this is standard Moose code.

Then we need to register our metaclass with Moose:

package Moose::Meta::Attribute::Custom::Labeled; sub register_implementation { MyApp::Meta::Attribute::Labeled }

This is a bit of magic that lets us use a short name, “Labeled”, when referring to our new metaclass.

That was the whole attribute metaclass.

Now we start using it.

package MyApp::Website; use Moose; use MyApp::Meta::Attribute::Labeled;

We have to load the metaclass to use it, just like any Perl class.

Finally, we use it for an attribute:

has url => ( metaclass => Labeled, is => rw, isa => Str, label => “The sites URL”, );

This looks like a normal attribute declaration, except for two things, the metaclass and label parameters. The metaclass parameter tells Moose we want to use a custom metaclass for this (one) attribute. The label parameter will be stored in the meta-attribute object.

The reason that we can pass the name Labeled, instead of MyApp::Meta::Attribute::Labeled, is because of the register_implementation code we touched on previously.

When you pass a metaclass to has, it will take the name you provide and prefix it with Moose::Meta::Attribute::Custom::. Then it calls register_implementation in the package. In this case, that means Moose ends up calling Moose::Meta::Attribute::Custom::Labeled::register_implementation.

If this function exists, it should return the real metaclass package name. This is exactly what our code does, returning MyApp::Meta::Attribute::Labeled. This is a little convoluted, and if you don’t like it, you can always use the fully-qualified name.

We can access this meta-attribute and its label like this:

$website->meta->get_attribute(url)->label() MyApp::Website->meta->get_attribute(url)->label()

We also have a regular attribute, name:

has name => ( is => rw, isa => Str, );

This is a regular Moose attribute, because we have not specified a new metaclass.

Finally, we have a dump method, which creates a human-readable representation of a MyApp::Website object. It will use an attribute’s label if it has one.

sub dump { my $self = shift; my $meta = $self->meta; my $dump = ; for my $attribute ( map { $meta->get_attribute($_) } sort $meta->get_attribute_list ) { if ( $attribute->isa(MyApp::Meta::Attribute::Labeled) && $attribute->has_label ) { $dump .= $attribute->label; }

This is a bit of defensive code. We cannot depend on every meta-attribute having a label. Even if we define one for every attribute in our class, a subclass may neglect to do so. Or a superclass could add an attribute without a label.

We also check that the attribute has a label using the predicate we defined. We could instead make the label required. If we have a label, we use it, otherwise we use the attribute name:

else { $dump .= $attribute->name; } my $reader = $attribute->get_read_method; $dump .= “: " . $self->$reader . " “; } return $dump; }

The get_read_method is part of the Moose::Meta::Attribute API. It returns the name of a method that can read the attribute’s value, when called on the real object (don’t call this on the meta-attribute).

CONCLUSION

You might wonder why you’d bother with all this. You could just hardcode “The Site’s URL” in the dump method. But we want to avoid repetition. If you need the label once, you may need it elsewhere, maybe in the as_form method you write next.

Associating a label with an attribute just makes sense! The label is a piece of information about the attribute.

It’s also important to realize that this was a trivial example. You can make much more powerful metaclasses that do things, as opposed to just storing some more information. For example, you could implement a metaclass that expires attributes after a certain amount of time:

has site_cache => ( metaclass => TimedExpiry, expires_after => { hours => 1 }, refresh_with => sub { get( $_[0]->url ) }, isa => Str, is => ro, );

The sky’s the limit!

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1633 - Linux cli command powf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command powf and provides detailed information about the command powf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the powf.

NAME 🖥️ powf 🖥️

power functions

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double pow(double x, double y);
float powf(float x, float y);
long double powl(long double x, long double y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

powf(), powl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the value of x raised to the power of y.

RETURN VALUE

On success, these functions return the value of x to the power of y.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the mathematically correct sign.

If result underflows, and is not representable, a range error occurs, and 0.0 with the appropriate sign is returned.

If x is +0 or -0, and y is an odd integer less than 0, a pole error occurs and HUGE_VAL, HUGE_VALF, or HUGE_VALL, is returned, with the same sign as x.

If x is +0 or -0, and y is less than 0 and not an odd integer, a pole error occurs and +HUGE_VAL, +HUGE_VALF, or +HUGE_VALL, is returned.

If x is +0 (-0), and y is an odd integer greater than 0, the result is +0 (-0).

If x is 0, and y greater than 0 and not an odd integer, the result is +0.

If x is -1, and y is positive infinity or negative infinity, the result is 1.0.

If x is +1, the result is 1.0 (even if y is a NaN).

If y is 0, the result is 1.0 (even if x is a NaN).

If x is a finite value less than 0, and y is a finite noninteger, a domain error occurs, and a NaN is returned.

If the absolute value of x is less than 1, and y is negative infinity, the result is positive infinity.

If the absolute value of x is greater than 1, and y is negative infinity, the result is +0.

If the absolute value of x is less than 1, and y is positive infinity, the result is +0.

If the absolute value of x is greater than 1, and y is positive infinity, the result is positive infinity.

If x is negative infinity, and y is an odd integer less than 0, the result is -0.

If x is negative infinity, and y less than 0 and not an odd integer, the result is +0.

If x is negative infinity, and y is an odd integer greater than 0, the result is negative infinity.

If x is negative infinity, and y greater than 0 and not an odd integer, the result is positive infinity.

If x is positive infinity, and y less than 0, the result is +0.

If x is positive infinity, and y greater than 0, the result is positive infinity.

Except as specified above, if x or y is a NaN, the result is a NaN.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is negative, and y is a finite noninteger
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

Pole error: x is zero, and y is negative
errno is set to ERANGE (but see BUGS). A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised.

Range error: the result overflows
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error: the result underflows
errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pow(), powf(), powl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

BUGS

Historical bugs (now fixed)

Before glibc 2.28, on some architectures (e.g., x86-64) pow() may be more than 10,000 times slower for some inputs than for other nearby inputs. This affects only pow(), and not powf() nor powl(). This problem was fixed in glibc 2.28.

A number of bugs in the glibc implementation of pow() were fixed in glibc 2.16.

In glibc 2.9 and earlier, when a pole error occurs, errno is set to EDOM instead of the POSIX-mandated ERANGE. Since glibc 2.10, glibc does the right thing.

In glibc 2.3.2 and earlier, when an overflow or underflow error occurs, glibc’s pow() generates a bogus invalid floating-point exception (FE_INVALID) in addition to the overflow or underflow exception.

SEE ALSO

cbrt(3), cpow(3), sqrt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1634 - Linux cli command zip_errors

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_errors and provides detailed information about the command zip_errors, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_errors.

libzip (-lzip)

The following error codes are used by libzip:

Entry has been changed.

Closing zip archive failed.

Compression method not supported.

Compressed data invalid.

CRC error.

Entry has been deleted.

Encryption method not supported.

Premature end of file.

File already exists.

Zip archive inconsistent.

Internal error.

Resource still in use.

Invalid argument.

Malloc failure.

Multi-disk zip archives not supported.

No such file.

No password provided.

Not a zip archive.

No error.

Can’t open file.

Operation not supported.

Read-only archive.

Read error.

Can’t remove file.

Renaming temporary file failed.

Seek error.

Tell error.

Failure to create temporary file.

Write error.

Wrong password provided.

Containing zip archive was closed.

Zlib error.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1635 - Linux cli command Image_ExifTool_WriteIPTCpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_WriteIPTCpm and provides detailed information about the command Image_ExifTool_WriteIPTCpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_WriteIPTCpm.

NAME 🖥️ Image_ExifTool_WriteIPTCpm 🖥️

Write IPTC meta information

SYNOPSIS

This file is autoloaded by Image::ExifTool::IPTC.

DESCRIPTION

This file contains routines to write IPTC metadata, plus a few other seldom-used routines.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Image::ExifTool::IPTC (3pm), Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1636 - Linux cli command Tk_DragDrop_Commonpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_DragDrop_Commonpm and provides detailed information about the command Tk_DragDrop_Commonpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_DragDrop_Commonpm.

NAME 🖥️ Tk_DragDrop_Commonpm 🖥️

private class used by Drag&Drop

DESCRIPTION

This class provides methods to automate the the loading and declaring of Drop and Site ’types'.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1637 - Linux cli command URI_Splitpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command URI_Splitpm and provides detailed information about the command URI_Splitpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the URI_Splitpm.

NAME 🖥️ URI_Splitpm 🖥️

Parse and compose URI strings

SYNOPSIS

use URI::Split qw(uri_split uri_join); ($scheme, $auth, $path, $query, $frag) = uri_split($uri); $uri = uri_join($scheme, $auth, $path, $query, $frag);

DESCRIPTION

Provides functions to parse and compose URI strings. The following functions are provided:

($scheme, $auth, $path, $query, $frag) = uri_split($uri)
Breaks up a URI string into its component parts. An undef value is returned for those parts that are not present. The $path part is always present (but can be the empty string) and is thus never returned as undef. No sensible value is returned if this function is called in a scalar context.

$uri = uri_join($scheme, $auth, $path, $query, $frag)
Puts together a URI string from its parts. Missing parts are signaled by passing undef for the corresponding argument. Minimal escaping is applied to parts that contain reserved chars that would confuse a parser. For instance, any occurrence of ‘?’ or ‘#’ in $path is always escaped, as it would otherwise be parsed back as a query or fragment.

SEE ALSO

URI, URI::Escape

COPYRIGHT

Copyright 2003, Gisle Aas

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1638 - Linux cli command XtAppGetErrorDatabase

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppGetErrorDatabase and provides detailed information about the command XtAppGetErrorDatabase, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppGetErrorDatabase.

NAME 🖥️ XtAppGetErrorDatabase 🖥️

obtain error database

SYNTAX

#include <X11/Intrinsic.h>

XrmDatabase *XtAppGetErrorDatabase( XtAppContext app_context);

void XtAppGetErrorDatabaseText(XtAppContext app_context, const char *name, const char *type, const char *class, const char *defaultMsg, char *buffer_return, int nbytes, XrmDatabase database);

ARGUMENTS

app_context
Specifies the application context.

buffer_return
Specifies the buffer into which the error message is to be returned.

class
Specifies the resource class of the error message.

database
Specifies the name of the alternative database that is to be used or NULL if the application’s database is to be used.

defaultMsg
Specifies the default message to use.

name

type
Specifies the name and type that are concatenated to form the resource name of the error message.

nbytes
Specifies the size of the buffer in bytes.

DESCRIPTION

The XtAppGetErrorDatabase function returns the address of the error database. The Intrinsics do a lazy binding of the error database and do not merge in the database file until the first call to XtAppGetErrorDatbaseText.

The XtAppGetErrorDatabaseText returns the appropriate message from the error database or returns the specified default message if one is not found in the error database.

SEE ALSO

XtAppError(3), XtAppErrorMsg(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1639 - Linux cli command getline

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getline and provides detailed information about the command getline, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getline.

NAME 🖥️ getline 🖥️

delimited string input

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
ssize_t getline(char **restrict lineptr, size_t *restrict n,
 FILE *restrict stream);
ssize_t getdelim(char **restrict lineptr, size_t *restrict n,
 int delim, FILE *restrict stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getline(), getdelim():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

getline() reads an entire line from stream, storing the address of the buffer containing the text into *lineptr. The buffer is null-terminated and includes the newline character, if one was found.

If *lineptr is set to NULL before the call, then getline() will allocate a buffer for storing the line. This buffer should be freed by the user program even if getline() failed.

Alternatively, before calling getline(), *lineptr can contain a pointer to a malloc(3)-allocated buffer *n bytes in size. If the buffer is not large enough to hold the line, getline() resizes it with realloc(3), updating *lineptr and *n as necessary.

In either case, on a successful call, *lineptr and *n will be updated to reflect the buffer address and allocated size respectively.

getdelim() works like getline(), except that a line delimiter other than newline can be specified as the delimiter argument. As with getline(), a delimiter character is not added if one was not present in the input before end of file was reached.

RETURN VALUE

On success, getline() and getdelim() return the number of characters read, including the delimiter character, but not including the terminating null byte (‘�’). This value can be used to handle embedded null bytes in the line read.

Both functions return -1 on failure to read a line (including end-of-file condition). In the event of a failure, errno is set to indicate the error.

If *lineptr was set to NULL before the call, then the buffer should be freed by the user program even on failure.

ERRORS

EINVAL
Bad arguments (n or lineptr is NULL, or stream is not valid).

ENOMEM
Allocation or reallocation of the line buffer failed.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getline(), getdelim()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

GNU, POSIX.1-2008.

EXAMPLES

#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
    FILE *stream;
    char *line = NULL;
    size_t len = 0;
    ssize_t nread;
    if (argc != 2) {
        fprintf(stderr, "Usage: %s <file>

“, argv[0]); exit(EXIT_FAILURE); } stream = fopen(argv[1], “r”); if (stream == NULL) { perror(“fopen”); exit(EXIT_FAILURE); } while ((nread = getline(&line, &len, stream)) != -1) { printf(“Retrieved line of length %zd: “, nread); fwrite(line, nread, 1, stdout); } free(line); fclose(stream); exit(EXIT_SUCCESS); }

SEE ALSO

read(2), fgets(3), fopen(3), fread(3), scanf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1640 - Linux cli command Net_DNS_SEC_libcryptopm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_SEC_libcryptopm and provides detailed information about the command Net_DNS_SEC_libcryptopm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_SEC_libcryptopm.

NAME 🖥️ Net_DNS_SEC_libcryptopm 🖥️

Perl interface to OpenSSL libcrypto

DESCRIPTION

Perl XS extension providing access to the OpenSSL libcrypto library upon which the Net::DNS::SEC cryptographic components are built.

ACKNOWLEDGMENT

Thanks are due to Eric Young and the many developers and contributors to the OpenSSL cryptographic library.

COPYRIGHT

Copyright (c)2018 Dick Franks.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

Net::DNS, Net::DNS::SEC, OpenSSL <http://www.openssl.org/docs>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1641 - Linux cli command XtAppSetFallbackResources

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppSetFallbackResources and provides detailed information about the command XtAppSetFallbackResources, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppSetFallbackResources.

NAME 🖥️ XtAppSetFallbackResources 🖥️

set fallback resources

SYNTAX

#include <X11/Intrinsic.h>

void XtAppSetFallbackResources(XtAppContext app_context, String* specification_list);

ARGUMENTS

app_context
Specifies the application context.

specification_list
Specifies a NULL-terminated list of resource specifications to pre-load the database, or NULL.

DESCRIPTION

Each entry in specification_list points to a string in the format XrmPutLineResource. following a call to XtAppSetFallbackResources, when a resource database is being created for a particular screen and the Intrinsics are not able to find or read an application-specific class resource file and if specification_list is not NULL the resource specification in specification_list will be merged into the screen resource database in place of the application-specific class resource file. XtAppSetFallbackResources is not required to copy specification_list; the caller must ensure that the contents of the list and the strings addressed by the list remain valid until all displays are initialized or until XtAppSetFallbackResources is called again. The value NULL for specification_list removes any previous fallback resource specification for the application context. The intended use for fallback resources is to provide a minimal number of resources that will make the application usable (or at least terminate with helpful diagnostic messages) when some problem exists in finding and loading the application defaults file.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1642 - Linux cli command pthread_sigqueue

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_sigqueue and provides detailed information about the command pthread_sigqueue, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_sigqueue.

NAME 🖥️ pthread_sigqueue 🖥️

queue a signal and data to a thread

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <signal.h>
#include <pthread.h>
int pthread_sigqueue(pthread_t thread, int sig,
 const union sigval value);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

pthread_sigqueue():

    _GNU_SOURCE

DESCRIPTION

The pthread_sigqueue() function performs a similar task to sigqueue(3), but, rather than sending a signal to a process, it sends a signal to a thread in the same process as the calling thread.

The thread argument is the ID of a thread in the same process as the caller. The sig argument specifies the signal to be sent. The value argument specifies data to accompany the signal; see sigqueue(3) for details.

RETURN VALUE

On success, pthread_sigqueue() returns 0; on error, it returns an error number.

ERRORS

EAGAIN
The limit of signals which may be queued has been reached. (See signal(7) for further information.)

EINVAL
sig was invalid.

ENOSYS
pthread_sigqueue() is not supported on this system.

ESRCH
thread is not valid.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_sigqueue()

Thread safetyMT-Safe

VERSIONS

The glibc implementation of pthread_sigqueue() gives an error (EINVAL) on attempts to send either of the real-time signals used internally by the NPTL threading implementation. See nptl(7) for details.

STANDARDS

GNU.

HISTORY

glibc 2.11.

SEE ALSO

rt_tgsigqueueinfo(2), sigaction(2), pthread_sigmask(3), sigqueue(3), sigwait(3), pthreads(7), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1643 - Linux cli command XtIsTopLevelShell

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtIsTopLevelShell and provides detailed information about the command XtIsTopLevelShell, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtIsTopLevelShell.

NAME 🖥️ XtIsTopLevelShell 🖥️

obtain and verify a widget’s class

SYNTAX

#include <X11/Intrinsic.h>

WidgetClass XtClass(Widget w);

WidgetClass XtSuperclass(Widget w);

Boolean XtIsSubclass(Widget w, WidgetClass widget_class);

void XtCheckSubclass(Widget widget, WidgetClass widget_class, String message);

Boolean XtIsObject(Widget w);

Boolean XtIsRectObj(Widget w);

Boolean XtIsWidget(Widget w);

Boolean XtIsComposite(Widget w);

Boolean XtIsConstraint(Widget w);

Boolean XtIsShell(Widget w);

Boolean XtIsOverrideShell(Widget w);

Boolean XtIsWMShell(Widget w);

Boolean XtIsVendorShell(Widget w);

Boolean XtIsTransientShell(Widget w);

Boolean XtIsTopLevelShell(Widget w);

Boolean XtIsApplicationShell(Widget w);

Boolean XtIsSessionShell(Widget w);

ARGUMENTS

  1. Specifies the widget.

widget_class
Specifies the widget class.

message
Specifies the message that is to be used.

DESCRIPTION

The XtClass function returns a pointer to the widget’s class structure.

The XtSuperclass function returns a pointer to the widget’s superclass class structure.

The XtIsSubclass function returns True if the class of the specified widget is equal to or is a subclass of the specified class. The widget’s class can be any number of subclasses down the chain and need not be an immediate subclass of the specified class. Composite widgets that need to restrict the class of the items they contain can use XtIsSubclass to find out if a widget belongs to the desired class of objects.

The XtCheckSubclass macro determines if the class of the specified widget is equal to or is a subclass of the specified widget class. The widget can be any number of subclasses down the chain and need not be an immediate subclass of the specified widget class. If the specified widget is not a subclass, XtCheckSubclass constructs an error message from the supplied message, the widget’s actual class, and the expected class and calls XtErrorMsg. XtCheckSubclass should be used at the entry point of exported routines to ensure that the client has passed in a valid widget class for the exported operation.

XtCheckSubclass is only executed when the widget has been compiled with the compiler symbol DEBUG defined; otherwise, it is defined as the empty string and generates no code.

To test if a given widget belongs to a subclass of an Intrinsics-defined class, the Intrinsics defines macros or functions equivalent to XtIsSubclass for each of the built-in classes. These procedures are XtIsObject, XtIsRectObj, XtIsWidget, XtIsComposite, XtIsConstraint, XtIsShell, XtIsOverrideShell, XtIsWMShell, XtIsVendorShell, XtIsTransientShell, XtIsTopLevelShell, XtIsApplicationShell, and XtIsSessionShell.

The

SEE ALSO

XtAppErrorMsg(3), XtDisplay(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1644 - Linux cli command ftok

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ftok and provides detailed information about the command ftok, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ftok.

NAME 🖥️ ftok 🖥️

convert a pathname and a project identifier to a System V IPC key

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/ipc.h>

key_t ftok(const char *pathname, int proj_id);

DESCRIPTION

The ftok() function uses the identity of the file named by the given pathname (which must refer to an existing, accessible file) and the least significant 8 bits of proj_id (which must be nonzero) to generate a key_t type System V IPC key, suitable for use with msgget(2), semget(2), or shmget(2).

The resulting value is the same for all pathnames that name the same file, when the same value of proj_id is used. The value returned should be different when the (simultaneously existing) files or the project IDs differ.

RETURN VALUE

On success, the generated key_t value is returned. On failure -1 is returned, with errno indicating the error as for the stat(2) system call.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

ftok()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

On some ancient systems, the prototype was:

key_t ftok(char *pathname, char proj_id);

Today, proj_id is an int, but still only 8 bits are used. Typical usage has an ASCII character proj_id, that is why the behavior is said to be undefined when proj_id is zero.

Of course, no guarantee can be given that the resulting key_t is unique. Typically, a best-effort attempt combines the given proj_id byte, the lower 16 bits of the inode number, and the lower 8 bits of the device number into a 32-bit result. Collisions may easily happen, for example between files on /dev/hda1 and files on /dev/sda1.

EXAMPLES

See semget(2).

SEE ALSO

msgget(2), semget(2), shmget(2), stat(2), sysvipc(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1645 - Linux cli command XtOpenApplication

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtOpenApplication and provides detailed information about the command XtOpenApplication, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtOpenApplication.

NAME 🖥️ XtOpenApplication 🖥️

initialize, open, or close a display

SYNTAX

#include <X11/Intrinsic.h>

Widget XtOpenApplication(XtAppContext *app_context_return, const char *application_class, XrmOptionDescRec *options, Cardinal num_options, int *argc_in_out, char **argv_in_out, String *fallback_resources, WidgetClass widget_class, ArgList args, Cardinal num_args);

Widget XtVaOpenApplication(XtAppContext *app_context_return, const char *application_class, XrmOptionDescRec *options, Cardinal num_options, int *argc_in_out, char **argv_in_out, String *fallback_resources, WidgetClass widget_class, … );

ARGUMENTS

app_context_return
Specifies the application context.

application_class
Specifies the class name of this application, which usually is the generic name for all instances of this application.

options
Specifies how to parse the command line for any application-specific resources. The options argument is passed as a parameter to XrmParseCommand. For further information, see Xlib - C Language X Interface.

num_options
Specifies the number of entries in the options list.

argc_in_out
Specifies a pointer to the number of command line parameters.

argv_in_out
Specifies the command line parameters.

fallback_resources
Specifies resource values to be used if the application class resource file cannot be opened or read, or NULL.

widget_class
Specifies the widget class of the shell to be created.

args
Specifies the argument list to override any other resource specification for the created shell widget.

num_args
Specifies the number of entries in the argument list.


Specifies the variable argument list to override any other resource specification for the created shell widget.

DESCRIPTION

The XtOpenApplication function calls XtToolkitInitialize followed by XtCreateApplicationContext, then calls XtOpenDisplay with display_string NULL and application_name NULL, and finally calls XtAppCreateShell with application_name NULL, the specified widget_class, and the specified args and num_args and returns the created shell. The modified argc and argv returned by XtDisplayInitialize are returned in argc_in_out and argv_in_out. If app_context_return is not NULL, the created application context is also returned. If the display specified by the command line cannot be opened, an error message is issued and XtOpenApplication terminates the application. If fallback_resources is non-NULL, XtAppSetFallbackResources is called with the value prior to calling XtOpenDisplay.

XtAppInitialize and XtVaAppInitialize have been superceded by XtOpenApplication and XtVaOpenApplication respectively.

SEE ALSO

XtAppInitialize(3), XtVaAppInitialize(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1646 - Linux cli command isalpha

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isalpha and provides detailed information about the command isalpha, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isalpha.

NAME 🖥️ isalpha 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1647 - Linux cli command WWW_RobotRulespm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command WWW_RobotRulespm and provides detailed information about the command WWW_RobotRulespm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the WWW_RobotRulespm.

NAME 🖥️ WWW_RobotRulespm 🖥️

database of robots.txt-derived permissions

SYNOPSIS

use WWW::RobotRules; my $rules = WWW::RobotRules->new(MOMspider/1.0); use LWP::Simple qw(get); { my $url = “http://some.place/robots.txt"; my $robots_txt = get $url; $rules->parse($url, $robots_txt) if defined $robots_txt; } { my $url = “http://some.other.place/robots.txt"; my $robots_txt = get $url; $rules->parse($url, $robots_txt) if defined $robots_txt; } # Now we can check if a URL is valid for those servers # whose “robots.txt” files weve gotten and parsed: if($rules->allowed($url)) { $c = get $url; … }

DESCRIPTION

This module parses /robots.txt files as specified in A Standard for Robot Exclusion, at <http://www.robotstxt.org/wc/norobots.html> Webmasters can use the /robots.txt file to forbid conforming robots from accessing parts of their web site.

The parsed files are kept in a WWW::RobotRules object, and this object provides methods to check if access to a given URL is prohibited. The same WWW::RobotRules object can be used for one or more parsed /robots.txt files on any number of hosts.

The following methods are provided:

$rules = WWW::RobotRules->new($robot_name)
This is the constructor for WWW::RobotRules objects. The first argument given to new() is the name of the robot.

$rules->parse($robot_txt_url, $content, $fresh_until)
The parse() method takes as arguments the URL that was used to retrieve the /robots.txt file, and the contents of the file.

$rules->allowed($uri)
Returns TRUE if this robot is allowed to retrieve this URL.

$rules->agent([$name])
Get/set the agent name. NOTE: Changing the agent name will clear the robots.txt rules and expire times out of the cache.

ROBOTS.TXT

The format and semantics of the /robots.txt file are as follows (this is an edited abstract of <http://www.robotstxt.org/wc/norobots.html>):

The file consists of one or more records separated by one or more blank lines. Each record contains lines of the form

<field-name>: <value>

The field name is case insensitive. Text after the ‘#’ character on a line is ignored during parsing. This is used for comments. The following <field-names> can be used:

User-Agent
The value of this field is the name of the robot the record is describing access policy for. If more than one User-Agent field is present the record describes an identical access policy for more than one robot. At least one field needs to be present per record. If the value is ‘*’, the record describes the default access policy for any robot that has not not matched any of the other records. The User-Agent fields must occur before the Disallow fields. If a record contains a User-Agent field after a Disallow field, that constitutes a malformed record. This parser will assume that a blank line should have been placed before that User-Agent field, and will break the record into two. All the fields before the User-Agent field will constitute a record, and the User-Agent field will be the first field in a new record.

Disallow
The value of this field specifies a partial URL that is not to be visited. This can be a full path, or a partial path; any URL that starts with this value will not be retrieved

Unrecognized records are ignored.

ROBOTS.TXT EXAMPLES

The following example /robots.txt file specifies that no robots should visit any URL starting with /cyberworld/map/ or /tmp/:

User-agent: * Disallow: /cyberworld/map/ # This is an infinite virtual URL space Disallow: /tmp/ # these will soon disappear

This example /robots.txt file specifies that no robots should visit any URL starting with /cyberworld/map/, except the robot called cybermapper:

User-agent: * Disallow: /cyberworld/map/ # This is an infinite virtual URL space # Cybermapper knows where to go. User-agent: cybermapper Disallow:

This example indicates that no robots should visit this site further:

# go away User-agent: * Disallow: /

This is an example of a malformed robots.txt file.

# robots.txt for ancientcastle.example.com # Ive locked myself away. User-agent: * Disallow: / # The castle is your home now, so you can go anywhere you like. User-agent: Belle Disallow: /west-wing/ # except the west wing! # Its good to be the Prince… User-agent: Beast Disallow:

This file is missing the required blank lines between records. However, the intention is clear.

SEE ALSO

LWP::RobotUA, WWW::RobotRules::AnyDBM_File

COPYRIGHT

Copyright 1995-2009, Gisle Aas Copyright 1995, Martijn Koster

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1648 - Linux cli command Tk_palettepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_palettepm and provides detailed information about the command Tk_palettepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_palettepm.

NAME 🖥️ Tk_palettepm 🖥️

Modify the Tk color palette

SYNOPSIS

$widget->setPalette(background)

$widget->**setPalette(**name=>value?,name=>value …?)

$widget->bisque

DESCRIPTION

The setPalette method changes the color scheme for Tk. It does this by modifying the colors of existing widgets and by changing the option database so that future widgets will use the new color scheme. If setPalette is invoked with a single argument, the argument is the name of a color to use as the normal background color; setPalette will compute a complete color palette from this background color. Alternatively, the arguments to setPalette may consist of any number of name-value pairs, where the first argument of the pair is the name of an option in the Tk option database and the second argument is the new value to use for that option. The following database names are currently supported:

activeBackground foreground selectColor activeForeground highlightBackground selectBackground background highlightColor selectForeground disabledForeground insertBackground troughColor

setPalette tries to compute reasonable defaults for any options that you don’t specify. You can specify options other than the above ones and Tk will change those options on widgets as well. This feature may be useful if you are using custom widgets with additional color options.

Once it has computed the new value to use for each of the color options, setPalette scans the widget hierarchy to modify the options of all existing widgets. For each widget, it checks to see if any of the above options is defined for the widget. If so, and if the option’s current value is the default, then the value is changed; if the option has a value other than the default, setPalette will not change it. The default for an option is the one provided by the widget (($w->configure(‘option’))[3]) unless setPalette has been run previously, in which case it is the value specified in the previous invocation of setPalette.

After modifying all the widgets in the application, setPalette adds options to the option database to change the defaults for widgets created in the future. The new options are added at priority widgetDefault, so they will be overridden by options from the .Xdefaults file or options specified on the command-line that creates a widget.

The method bisque is provided for backward compatibility: it restores the application’s colors to the light brown (``bisque’’) color scheme used in Tk 3.6 and earlier versions.

BUGS

The use of option database names rather than the configure names is understandable given the mechanism (copied from Tcl/Tk), but is potentially confusing.

The interpolation of different ‘shades’ of color used for 3D effects in ‘RGB’ space can lead to undesirable changes in ‘hue’. Interpolation in ‘HSV’ (as used in Tk::ColorEditor) would be more robust and X11R5’s color support probably even more so.

SEE ALSO

Tk::options

KEYWORDS

bisque, color, palette

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1649 - Linux cli command Tk_tkvarspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_tkvarspm and provides detailed information about the command Tk_tkvarspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_tkvarspm.

NAME 🖥️ Tk_tkvarspm 🖥️

Variables used or set by Tk

DESCRIPTION

The following perl variables are either set or used by Tk at various times in its execution. (For a list of variables used by perl see perlvar.)

$Tk::library
This variable holds the file name for a directory containing the modules related to Tk. These modules include an initialization file that is normally processed whenever a Tk application starts up, plus other files containing procedures that implement default behaviors for widgets. The initial value of $Tk::library is set when Tk is added to an interpreter; this is done by searching searching for a directory named Tk in the directory where the file Tk.pm, or the first directory Tk in @INC. The TK_LIBRARY environment variable used by Tcl/Tk is not supported by perl/Tk. Please use @INC to change where modules are searched. Note: This is Tcl remnant. With perl it makes more sense to use @INC and %INC).

$Tk::patchLevel
Contains a decimal integer giving the current patch level for Tk. The patch level is incremented for each new release or patch, and it uniquely identifies an official version of Tk. Note: this is Tcl remnant. With perl it makes more sense to use $Tk::VERSION described below.

$Tk::strictMotif
This variable is set to zero by default. If an application sets it to one, then Tk attempts to adhere as closely as possible to Motif look-and-feel standards. For example, active elements such as buttons and scrollbar sliders will not change color when the pointer passes over them.

$Tk::VERSION
The variable holds the current version number of the perl/Tk release in the form major.minor. Major and minor are integers. The major version number shows on which Tcl/Tk release perl/Tk is based. E.g., 402 means based on Tcls Tk 4.2. (Patchlevel of Tcls Tk are not incorporated because perl/Tk tended to be ``ahead’’ of them on some fixes and behind on others. The first digest of the major version number increases in any Tk release that includes changes that are not backward compatible (i.e. whenever existing perl/Tk applications and scripts may have to change to work with the new release). The minor version depends on perl/Tk only. It uses the ’even’=‘stable’, ‘odd’=‘experimental’ scheme that linux uses: .0xx - inherently alpha .1xx - experimental beta .2xx - stable .3xx - experimental .4xx - stable … The minor version number increases with each new release of Tk, except that it resets to zero whenever the major version number changes.

$Tk::version
The variable holds the current version number of the Tk library in the form major.minor. Major and minor are integers. The major version number increases in any Tk release that includes changes that are not backward compatible (i.e. whenever existing Tk applications and scripts may have to change to work with the new release). The minor version number increases with each new release of Tk, except that it resets to zero whenever the major version number changes. Note: this is Tcl remnant. With perl it makes more sense to use $Tk::VERSION described above.

KEYWORDS

variables, version

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1650 - Linux cli command utmpxname

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command utmpxname and provides detailed information about the command utmpxname, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the utmpxname.

NAME 🖥️ utmpxname 🖥️

access utmp file entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <utmp.h>
struct utmp *getutent(void);
struct utmp *getutid(const struct utmp *ut);
struct utmp *getutline(const struct utmp *ut);
struct utmp *pututline(const struct utmp *ut);
void setutent(void);
void endutent(void);
int utmpname(const char *file);

DESCRIPTION

New applications should use the POSIX.1-specified “utmpx” versions of these functions; see STANDARDS.

utmpname() sets the name of the utmp-format file for the other utmp functions to access. If utmpname() is not used to set the filename before the other functions are used, they assume _PATH_UTMP, as defined in <paths.h>.

setutent() rewinds the file pointer to the beginning of the utmp file. It is generally a good idea to call it before any of the other functions.

endutent() closes the utmp file. It should be called when the user code is done accessing the file with the other functions.

getutent() reads a line from the current file position in the utmp file. It returns a pointer to a structure containing the fields of the line. The definition of this structure is shown in utmp(5).

getutid() searches forward from the current file position in the utmp file based upon ut. If ut->ut_type is one of RUN_LVL, BOOT_TIME, NEW_TIME, or OLD_TIME, getutid() will find the first entry whose ut_type field matches ut->ut_type. If ut->ut_type is one of INIT_PROCESS, LOGIN_PROCESS, USER_PROCESS, or DEAD_PROCESS, getutid() will find the first entry whose ut_id field matches ut->ut_id.

getutline() searches forward from the current file position in the utmp file. It scans entries whose ut_type is USER_PROCESS or LOGIN_PROCESS and returns the first one whose ut_line field matches ut->ut_line.

pututline() writes the utmp structure ut into the utmp file. It uses getutid() to search for the proper place in the file to insert the new entry. If it cannot find an appropriate slot for ut, pututline() will append the new entry to the end of the file.

RETURN VALUE

getutent(), getutid(), and getutline() return a pointer to a struct utmp on success, and NULL on failure (which includes the “record not found” case). This struct utmp is allocated in static storage, and may be overwritten by subsequent calls.

On success pututline() returns ut; on failure, it returns NULL.

utmpname() returns 0 if the new name was successfully stored, or -1 on failure.

On failure, these functions errno set to indicate the error.

ERRORS

ENOMEM
Out of memory.

ESRCH
Record not found.

setutent(), pututline(), and the getut*() functions can also fail for the reasons described in open(2).

FILES

/var/run/utmp
database of currently logged-in users

/var/log/wtmp
database of past user logins

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getutent()

Thread safety

MT-Unsafe init race:utent race:utentbuf sig:ALRM timer

getutid(), getutline()

Thread safety

MT-Unsafe init race:utent sig:ALRM timer

pututline()

Thread safety

MT-Unsafe race:utent sig:ALRM timer

setutent(), endutent(), utmpname()

Thread safetyMT-Unsafe race:utent

In the above table, utent in race:utent signifies that if any of the functions setutent(), getutent(), getutid(), getutline(), pututline(), utmpname(), or endutent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

None.

HISTORY

XPG2, SVr4.

In XPG2 and SVID 2 the function pututline() is documented to return void, and that is what it does on many systems (AIX, HP-UX). HP-UX introduces a new function _pututline() with the prototype given above for pututline().

All these functions are obsolete now on non-Linux systems. POSIX.1-2001 and POSIX.1-2008, following SUSv1, does not have any of these functions, but instead uses

#include <utmpx.h> struct utmpx *getutxent(void); struct utmpx *getutxid(const struct utmpx *); struct utmpx *getutxline(const struct utmpx *); struct utmpx *pututxline(const struct utmpx *); void setutxent(void); void endutxent(void);

These functions are provided by glibc, and perform the same task as their equivalents without the “x”, but use struct utmpx, defined on Linux to be the same as struct utmp. For completeness, glibc also provides utmpxname(), although this function is not specified by POSIX.1.

On some other systems, the utmpx structure is a superset of the utmp structure, with additional fields, and larger versions of the existing fields, and parallel files are maintained, often /var/*/utmpx and /var/*/wtmpx.

Linux glibc on the other hand does not use a parallel utmpx file since its utmp structure is already large enough. The “x” functions listed above are just aliases for their counterparts without the “x” (e.g., getutxent() is an alias for getutent()).

NOTES

glibc notes

The above functions are not thread-safe. glibc adds reentrant versions

#include <utmp.h>
int getutent_r(struct utmp *ubuf, struct utmp **ubufp);
int getutid_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);
int getutline_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getutent_r(), getutid_r(), getutline_r():

    _GNU_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */    _SVID_SOURCE || _BSD_SOURCE

These functions are GNU extensions, analogs of the functions of the same name without the _r suffix. The ubuf argument gives these functions a place to store their result. On success, they return 0, and a pointer to the result is written in *ubufp. On error, these functions return -1. There are no utmpx equivalents of the above functions. (POSIX.1 does not specify such functions.)

EXAMPLES

The following example adds and removes a utmp record, assuming it is run from within a pseudo terminal. For usage in a real application, you should check the return values of getpwuid(3) and ttyname(3).

#include <pwd.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <utmp.h>
int
main(void)
{
    struct utmp entry;
    system("echo before adding entry:;who");
    entry.ut_type = USER_PROCESS;
    entry.ut_pid = getpid();
    strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen("/dev/"));
    /* only correct for ptys named /dev/tty[pqr][0-9a-z] */
    strcpy(entry.ut_id, ttyname(STDIN_FILENO) + strlen("/dev/tty"));
    entry.ut_time = time(NULL);
    strcpy(entry.ut_user, getpwuid(getuid())->pw_name);
    memset(entry.ut_host, 0, UT_HOSTSIZE);
    entry.ut_addr = 0;
    setutent();
    pututline(&entry);
    system("echo after adding entry:;who");
    entry.ut_type = DEAD_PROCESS;
    memset(entry.ut_line, 0, UT_LINESIZE);
    entry.ut_time = 0;
    memset(entry.ut_user, 0, UT_NAMESIZE);
    setutent();
    pututline(&entry);
    system("echo after removing entry:;who");
    endutent();
    exit(EXIT_SUCCESS);
}

SEE ALSO

getutmp(3), utmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1651 - Linux cli command strerrordesc_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strerrordesc_np and provides detailed information about the command strerrordesc_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strerrordesc_np.

NAME 🖥️ strerrordesc_np 🖥️

return string describing error number

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strerror(int errnum);
const char *strerrorname_np(int errnum);
const char *strerrordesc_np(int errnum);
int strerror_r(int errnum, char buf[.buflen], size_t buflen);
               /* XSI-compliant */
char *strerror_r(int errnum, char buf[.buflen], size_t buflen);
               /* GNU-specific */
char *strerror_l(int errnum, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strerrorname_np(), strerrordesc_np():

    _GNU_SOURCE

strerror_r():

    The XSI-compliant version is provided if:
        (_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE
    Otherwise, the GNU-specific version is provided.

DESCRIPTION

The strerror() function returns a pointer to a string that describes the error code passed in the argument errnum, possibly using the LC_MESSAGES part of the current locale to select the appropriate language. (For example, if errnum is EINVAL, the returned description will be “Invalid argument”.) This string must not be modified by the application, and the returned pointer will be invalidated on a subsequent call to strerror() or strerror_l(), or if the thread that obtained the string exits. No other library function, including perror(3), will modify this string.

Like strerror(), the strerrordesc_np() function returns a pointer to a string that describes the error code passed in the argument errnum, with the difference that the returned string is not translated according to the current locale.

The strerrorname_np() function returns a pointer to a string containing the name of the error code passed in the argument errnum. For example, given EPERM as an argument, this function returns a pointer to the string “EPERM”. Given 0 as an argument, this function returns a pointer to the string “0”.

strerror_r()

strerror_r() is like strerror(), but might use the supplied buffer buf instead of allocating one internally. This function is available in two versions: an XSI-compliant version specified in POSIX.1-2001 (available since glibc 2.3.4, but not POSIX-compliant until glibc 2.13), and a GNU-specific version (available since glibc 2.0). The XSI-compliant version is provided with the feature test macros settings shown in the SYNOPSIS; otherwise the GNU-specific version is provided. If no feature test macros are explicitly defined, then (since glibc 2.4) _POSIX_C_SOURCE is defined by default with the value 200112L, so that the XSI-compliant version of strerror_r() is provided by default.

The XSI-compliant strerror_r() is preferred for portable applications. It returns the error string in the user-supplied buffer buf of length buflen.

The GNU-specific strerror_r() returns a pointer to a string containing the error message. This may be either a pointer to a string that the function stores in buf, or a pointer to some (immutable) static string (in which case buf is unused). If the function stores a string in buf, then at most buflen bytes are stored (the string may be truncated if buflen is too small and errnum is unknown). The string always includes a terminating null byte (‘�’).

strerror_l()

strerror_l() is like strerror(), but maps errnum to a locale-dependent error message in the locale specified by locale. The behavior of strerror_l() is undefined if locale is the special locale object LC_GLOBAL_LOCALE or is not a valid locale object handle.

RETURN VALUE

The strerror(), strerror_l(), and the GNU-specific strerror_r() functions return the appropriate error description string, or an “Unknown error nnn” message if the error number is unknown.

On success, strerrorname_np() and strerrordesc_np() return the appropriate error description string. If errnum is an invalid error number, these functions return NULL.

The XSI-compliant strerror_r() function returns 0 on success. On error, a (positive) error number is returned (since glibc 2.13), or -1 is returned and errno is set to indicate the error (before glibc 2.13).

POSIX.1-2001 and POSIX.1-2008 require that a successful call to strerror() or strerror_l() shall leave errno unchanged, and note that, since no function return value is reserved to indicate an error, an application that wishes to check for errors should initialize errno to zero before the call, and then check errno after the call.

ERRORS

EINVAL
The value of errnum is not a valid error number.

ERANGE
Insufficient storage was supplied to contain the error description string.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strerror()

Thread safety

MT-Safe

strerrorname_np(), strerrordesc_np()

Thread safetyMT-Safe

strerror_r(), strerror_l()

Thread safetyMT-Safe

Before glibc 2.32, strerror() is not MT-Safe.

STANDARDS

strerror()
C11, POSIX.1-2008.

strerror_r()
strerror_l()
POSIX.1-2008.

strerrorname_np()
strerrordesc_np()
GNU.

POSIX.1-2001 permits strerror() to set errno if the call encounters an error, but does not specify what value should be returned as the function result in the event of an error. On some systems, strerror() returns NULL if the error number is unknown. On other systems, strerror() returns a string something like “Error nnn occurred” and sets errno to EINVAL if the error number is unknown. C99 and POSIX.1-2008 require the return value to be non-NULL.

HISTORY

strerror()
POSIX.1-2001, C89.

strerror_r()
POSIX.1-2001.

strerror_l()
glibc 2.6. POSIX.1-2008.

strerrorname_np()
strerrordesc_np()
glibc 2.32.

NOTES

strerrorname_np() and strerrordesc_np() are thread-safe and async-signal-safe.

SEE ALSO

err(3), errno(3), error(3), perror(3), strsignal(3), locale(7), signal-safety(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1652 - Linux cli command xdr_string

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_string and provides detailed information about the command xdr_string, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_string.

NAME 🖥️ xdr_string 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1653 - Linux cli command pthread_mutex_init

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_mutex_init and provides detailed information about the command pthread_mutex_init, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_mutex_init.

NAME 🖥️ pthread_mutex_init 🖥️

operations on mutexes

SYNOPSIS

#include <pthread.h>
pthread_mutex_t fastmutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t recmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
pthread_mutex_t errchkmutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
int pthread_mutex_init(pthread_mutex_t *mutex,
 const pthread_mutexattr_t *mutexattr);
int pthread_mutex_lock(pthread_mutex_t *mutex);
int pthread_mutex_trylock(pthread_mutex_t *mutex);
int pthread_mutex_unlock(pthread_mutex_t *mutex);
int pthread_mutex_destroy(pthread_mutex_t *mutex);

DESCRIPTION

A mutex is a MUTual EXclusion device, and is useful for protecting shared data structures from concurrent modifications, and implementing critical sections and monitors.

A mutex has two possible states: unlocked (not owned by any thread), and locked (owned by one thread). A mutex can never be owned by two different threads simultaneously. A thread attempting to lock a mutex that is already locked by another thread is suspended until the owning thread unlocks the mutex first.

pthread_mutex_init initializes the mutex object pointed to by mutex according to the mutex attributes specified in mutexattr. If mutexattr is NULL, default attributes are used instead.

The LinuxThreads implementation supports only one mutex attributes, the mutex kind, which is either ``fast’’, ``recursive’’, or ``error checking’’. The kind of a mutex determines whether it can be locked again by a thread that already owns it. The default kind is ``fast’’. See pthread_mutexattr_init(3) for more information on mutex attributes.

Variables of type pthread_mutex_t can also be initialized statically, using the constants PTHREAD_MUTEX_INITIALIZER (for fast mutexes), PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP (for recursive mutexes), and PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP (for error checking mutexes).

pthread_mutex_lock locks the given mutex. If the mutex is currently unlocked, it becomes locked and owned by the calling thread, and pthread_mutex_lock returns immediately. If the mutex is already locked by another thread, pthread_mutex_lock suspends the calling thread until the mutex is unlocked.

If the mutex is already locked by the calling thread, the behavior of pthread_mutex_lock depends on the kind of the mutex. If the mutex is of the ``fast’’ kind, the calling thread is suspended until the mutex is unlocked, thus effectively causing the calling thread to deadlock. If the mutex is of the ``error checking’’ kind, pthread_mutex_lock returns immediately with the error code EDEADLK. If the mutex is of the ``recursive’’ kind, pthread_mutex_lock succeeds and returns immediately, recording the number of times the calling thread has locked the mutex. An equal number of pthread_mutex_unlock operations must be performed before the mutex returns to the unlocked state.

pthread_mutex_trylock behaves identically to pthread_mutex_lock, except that it does not block the calling thread if the mutex is already locked by another thread (or by the calling thread in the case of a ``fast’’ mutex). Instead, pthread_mutex_trylock returns immediately with the error code EBUSY.

pthread_mutex_unlock unlocks the given mutex. The mutex is assumed to be locked and owned by the calling thread on entrance to pthread_mutex_unlock. If the mutex is of the ``fast’’ kind, pthread_mutex_unlock always returns it to the unlocked state. If it is of the ``recursive’’ kind, it decrements the locking count of the mutex (number of pthread_mutex_lock operations performed on it by the calling thread), and only when this count reaches zero is the mutex actually unlocked.

On ``error checking’’ and ``recursive’’ mutexes, pthread_mutex_unlock actually checks at run-time that the mutex is locked on entrance, and that it was locked by the same thread that is now calling pthread_mutex_unlock. If these conditions are not met, an error code is returned and the mutex remains unchanged. ``Fast’’ mutexes perform no such checks, thus allowing a locked mutex to be unlocked by a thread other than its owner. This is non-portable behavior and must not be relied upon.

pthread_mutex_destroy destroys a mutex object, freeing the resources it might hold. The mutex must be unlocked on entrance. In the LinuxThreads implementation, no resources are associated with mutex objects, thus pthread_mutex_destroy actually does nothing except checking that the mutex is unlocked.

CANCELLATION

None of the mutex functions is a cancelation point, not even pthread_mutex_lock, in spite of the fact that it can suspend a thread for arbitrary durations. This way, the status of mutexes at cancelation points is predictable, allowing cancelation handlers to unlock precisely those mutexes that need to be unlocked before the thread stops executing. Consequently, threads using deferred cancelation should never hold a mutex for extended periods of time.

ASYNC-SIGNAL SAFETY

The mutex functions are not async-signal safe. What this means is that they should not be called from a signal handler. In particular, calling pthread_mutex_lock or pthread_mutex_unlock from a signal handler may deadlock the calling thread.

RETURN VALUE

pthread_mutex_init always returns 0. The other mutex functions return 0 on success and a non-zero error code on error.

ERRORS

The pthread_mutex_lock function returns the following error code on error:

EINVAL
The mutex has not been properly initialized.

EDEADLK
The mutex is already locked by the calling thread (``error checking’’ mutexes only).

The pthread_mutex_trylock function returns the following error codes on error:

EBUSY
The mutex could not be acquired because it was currently locked.

EINVAL
The mutex has not been properly initialized.

The pthread_mutex_unlock function returns the following error code on error:

EINVAL
The mutex has not been properly initialized.

EPERM
The calling thread does not own the mutex (``error checking’’ mutexes only).

The pthread_mutex_destroy function returns the following error code on error:

EBUSY
The mutex is currently locked.

SEE ALSO

pthread_mutexattr_init(3), pthread_mutexattr_setkind_np(3), pthread_cancel(3).

EXAMPLE

A shared global variable x can be protected by a mutex as follows:

int x;
pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER;

All accesses and modifications to x should be bracketed by calls to pthread_mutex_lock and pthread_mutex_unlock as follows:

pthread_mutex_lock(&mut);
/* operate on x */
pthread_mutex_unlock(&mut);
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1654 - Linux cli command ts_conf_get

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ts_conf_get and provides detailed information about the command ts_conf_get, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ts_conf_get.

NAME 🖥️ ts_conf_get 🖥️

get a pointer to struct ts_module_conf holding data from the TSLIB_CONFFILE file.

SYNOPSIS

#include <tslib.h>

struct ts_module_conf *ts_conf_get(struct tsdev *ts);

DESCRIPTION

ts_conf_get() This function returns a pointer to a struct ts_module_conf that is part of a list of modules listed in the TSLIB_CONFFILE configuration file. ts_conf_get() actually reads TSLIB_CONFFILE. One struct represents one line in the file. They get allocated for the user here:

struct ts_module_conf {
	char *name;
	char *params;
	int raw;
	int nr;

	struct ts_module_conf *next;
	struct ts_module_conf *prev;
};

RETURN VALUE

This function returns a pointer to a struct ts_module_conf.

SEE ALSO

ts_conf_set(3), ts.conf(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1655 - Linux cli command JSON_backportPP_Compat5005pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command JSON_backportPP_Compat5005pm and provides detailed information about the command JSON_backportPP_Compat5005pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the JSON_backportPP_Compat5005pm.

NAME 🖥️ JSON_backportPP_Compat5005pm 🖥️

Helper module in using JSON::PP in Perl 5.005

DESCRIPTION

JSON::PP calls internally.

AUTHOR

Makamaka Hannyaharamitu, <makamaka[at]cpan.org>

COPYRIGHT AND LICENSE

Copyright 2007-2012 by Makamaka Hannyaharamitu

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1656 - Linux cli command ftw

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ftw and provides detailed information about the command ftw, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ftw.

NAME 🖥️ ftw 🖥️

file tree walk

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ftw.h>
int nftw(const char *dirpath,
 int (*fn)(const char *fpath, const struct stat *sb,
 int typeflag, struct FTW *ftwbuf),
 int nopenfd, int flags);
[[deprecated]]
int ftw(const char *dirpath,
 int (*fn)(const char *fpath, const struct stat *sb,
 int typeflag),
 int nopenfd);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

nftw():

    _XOPEN_SOURCE >= 500

DESCRIPTION

nftw() walks through the directory tree that is located under the directory dirpath, and calls fn() once for each entry in the tree. By default, directories are handled before the files and subdirectories they contain (preorder traversal).

To avoid using up all of the calling process’s file descriptors, nopenfd specifies the maximum number of directories that nftw() will hold open simultaneously. When the search depth exceeds this, nftw() will become slower because directories have to be closed and reopened. nftw() uses at most one file descriptor for each level in the directory tree.

For each entry found in the tree, nftw() calls fn() with four arguments: fpath, sb, typeflag, and ftwbuf. fpath is the pathname of the entry, and is expressed either as a pathname relative to the calling process’s current working directory at the time of the call to nftw(), if dirpath was expressed as a relative pathname, or as an absolute pathname, if dirpath was expressed as an absolute pathname. sb is a pointer to the stat structure returned by a call to stat(2) for fpath.

The typeflag argument passed to fn() is an integer that has one of the following values:

FTW_F
fpath is a regular file.

FTW_D
fpath is a directory.

FTW_DNR
fpath is a directory which can’t be read.

FTW_DP
fpath is a directory, and FTW_DEPTH was specified in flags. (If FTW_DEPTH was not specified in flags, then directories will always be visited with typeflag set to FTW_D.) All of the files and subdirectories within fpath have been processed.

FTW_NS
The stat(2) call failed on fpath, which is not a symbolic link. The probable cause for this is that the caller had read permission on the parent directory, so that the filename fpath could be seen, but did not have execute permission, so that the file could not be reached for stat(2). The contents of the buffer pointed to by sb are undefined.

FTW_SL
fpath is a symbolic link, and FTW_PHYS was set in flags.

FTW_SLN
fpath is a symbolic link pointing to a nonexistent file. (This occurs only if FTW_PHYS is not set.) In this case the sb argument passed to fn() contains information returned by performing lstat(2) on the “dangling” symbolic link. (But see BUGS.)

The fourth argument (ftwbuf) that nftw() supplies when calling fn() is a pointer to a structure of type FTW:

struct FTW {
    int base;
    int level;
};

base is the offset of the filename (i.e., basename component) in the pathname given in fpath. level is the depth of fpath in the directory tree, relative to the root of the tree (dirpath, which has depth 0).

To stop the tree walk, fn() returns a nonzero value; this value will become the return value of nftw(). As long as fn() returns 0, nftw() will continue either until it has traversed the entire tree, in which case it will return zero, or until it encounters an error (such as a malloc(3) failure), in which case it will return -1.

Because nftw() uses dynamic data structures, the only safe way to exit out of a tree walk is to return a nonzero value from fn(). To allow a signal to terminate the walk without causing a memory leak, have the handler set a global flag that is checked by fn(). Don’t use longjmp(3) unless the program is going to terminate.

The flags argument of nftw() is formed by ORing zero or more of the following flags:

FTW_ACTIONRETVAL (since glibc 2.3.3)
If this glibc-specific flag is set, then nftw() handles the return value from fn() differently. fn() should return one of the following values:

FTW_CONTINUE
Instructs nftw() to continue normally.

FTW_SKIP_SIBLINGS
If fn() returns this value, then siblings of the current entry will be skipped, and processing continues in the parent.

FTW_SKIP_SUBTREE
If fn() is called with an entry that is a directory (typeflag is FTW_D), this return value will prevent objects within that directory from being passed as arguments to fn(). nftw() continues processing with the next sibling of the directory.

FTW_STOP
Causes nftw() to return immediately with the return value FTW_STOP.

Other return values could be associated with new actions in the future; fn() should not return values other than those listed above.

The feature test macro _GNU_SOURCE must be defined (before including any header files) in order to obtain the definition of FTW_ACTIONRETVAL from <ftw.h>.

FTW_CHDIR
If set, do a chdir(2) to each directory before handling its contents. This is useful if the program needs to perform some action in the directory in which fpath resides. (Specifying this flag has no effect on the pathname that is passed in the fpath argument of fn.)

FTW_DEPTH
If set, do a post-order traversal, that is, call fn() for the directory itself after handling the contents of the directory and its subdirectories. (By default, each directory is handled before its contents.)

FTW_MOUNT
If set, stay within the same filesystem (i.e., do not cross mount points).

FTW_PHYS
If set, do not follow symbolic links. (This is what you want.) If not set, symbolic links are followed, but no file is reported twice.

If FTW_PHYS is not set, but FTW_DEPTH is set, then the function fn() is never called for a directory that would be a descendant of itself.

ftw()

ftw() is an older function that offers a subset of the functionality of nftw(). The notable differences are as follows:

  • ftw() has no flags argument. It behaves the same as when nftw() is called with flags specified as zero.

  • The callback function, fn(), is not supplied with a fourth argument.

  • The range of values that is passed via the typeflag argument supplied to fn() is smaller: just FTW_F, FTW_D, FTW_DNR, FTW_NS, and (possibly) FTW_SL.

RETURN VALUE

These functions return 0 on success, and -1 if an error occurs.

If fn() returns nonzero, then the tree walk is terminated and the value returned by fn() is returned as the result of ftw() or nftw().

If nftw() is called with the FTW_ACTIONRETVAL flag, then the only nonzero value that should be used by fn() to terminate the tree walk is FTW_STOP, and that value is returned as the result of nftw().

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

nftw()

Thread safetyMT-Safe cwd

ftw()

Thread safetyMT-Safe

VERSIONS

In some implementations (e.g., glibc), ftw() will never use FTW_SL; on other systems FTW_SL occurs only for symbolic links that do not point to an existing file; and again on other systems ftw() will use FTW_SL for each symbolic link. If fpath is a symbolic link and stat(2) failed, POSIX.1-2008 states that it is undefined whether FTW_NS or FTW_SL is passed in typeflag. For predictable results, use nftw().

STANDARDS

POSIX.1-2008.

HISTORY

ftw()
POSIX.1-2001, SVr4, SUSv1. POSIX.1-2008 marks it as obsolete.

nftw()
glibc 2.1. POSIX.1-2001, SUSv1.

FTW_SL
POSIX.1-2001, SUSv1.

NOTES

POSIX.1-2008 notes that the results are unspecified if fn does not preserve the current working directory.

BUGS

According to POSIX.1-2008, when the typeflag argument passed to fn() contains FTW_SLN, the buffer pointed to by sb should contain information about the dangling symbolic link (obtained by calling lstat(2) on the link). Early glibc versions correctly followed the POSIX specification on this point. However, as a result of a regression introduced in glibc 2.4, the contents of the buffer pointed to by sb were undefined when FTW_SLN is passed in typeflag. (More precisely, the contents of the buffer were left unchanged in this case.) This regression was eventually fixed in glibc 2.30, so that the glibc implementation (once more) follows the POSIX specification.

EXAMPLES

The following program traverses the directory tree under the path named in its first command-line argument, or under the current directory if no argument is supplied. It displays various information about each file. The second command-line argument can be used to specify characters that control the value assigned to the flags argument when calling nftw().

Program source

#define _XOPEN_SOURCE 500
#include <ftw.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static int
display_info(const char *fpath, const struct stat *sb,
             int tflag, struct FTW *ftwbuf)
{
    printf("%-3s %2d ",
           (tflag == FTW_D) ?   "d"   : (tflag == FTW_DNR) ? "dnr" :
           (tflag == FTW_DP) ?  "dp"  : (tflag == FTW_F) ?   "f" :
           (tflag == FTW_NS) ?  "ns"  : (tflag == FTW_SL) ?  "sl" :
           (tflag == FTW_SLN) ? "sln" : "???",
           ftwbuf->level);
    if (tflag == FTW_NS)
        printf("-------");
    else
        printf("%7jd", (intmax_t) sb->st_size);
    printf("   %-40s %d %s

“, fpath, ftwbuf->base, fpath + ftwbuf->base); return 0; /* To tell nftw() to continue */ } int main(int argc, char *argv[]) { int flags = 0; if (argc > 2 && strchr(argv[2], ’d’) != NULL) flags |= FTW_DEPTH; if (argc > 2 && strchr(argv[2], ‘p’) != NULL) flags |= FTW_PHYS; if (nftw((argc < 2) ? “.” : argv[1], display_info, 20, flags) == -1) { perror(“nftw”); exit(EXIT_FAILURE); } exit(EXIT_SUCCESS); }

SEE ALSO

stat(2), fts(3), readdir(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1657 - Linux cli command Tk_focuspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_focuspm and provides detailed information about the command Tk_focuspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_focuspm.

NAME 🖥️ Tk_focuspm 🖥️

Manage the input focus

SYNOPSIS

$widget->focus

$widget->focusOption

$widget->focusNext

$widget->focusPrev

$widget->focusFollowsMouse

DESCRIPTION

The focus methods are used to manage the Tk input focus. At any given time, one window on each display is designated as the focus window; any key press or key release events for the display are sent to that window. It is normally up to the window manager to redirect the focus among the top-level windows of a display. For example, some window managers automatically set the input focus to a top-level window whenever the mouse enters it; others redirect the input focus only when the user clicks on a window. Usually the window manager will set the focus only to top-level windows, leaving it up to the application to redirect the focus among the children of the top-level.

Tk remembers one focus window for each top-level (the most recent descendant of that top-level to receive the focus); when the window manager gives the focus to a top-level, Tk automatically redirects it to the remembered window. Within a top-level Tk uses an explicit focus model by default. Moving the mouse within a top-level does not normally change the focus; the focus changes only when a widget decides explicitly to claim the focus (e.g., because of a button click), or when the user types a key such as Tab that moves the focus.

The method focusFollowsMouse may be invoked to create an implicit focus model: it reconfigures Tk so that the focus is set to a window whenever the mouse enters it. The methods focusNext and focusPrev implement a focus order among the windows of a top-level; they are used in the default bindings for Tab and Shift-Tab, among other things.

The focus methods can take any of the following forms:

$widget->focusCurrent
Returns the focus window on the display containing the $widget, or an empty string if no window in this application has the focus on that display.

$widget->focus
If the application currently has the input focus on $widget’s display, this command resets the input focus for $widget’s display to $widget and returns an empty string. If the application doesn’t currently have the input focus on $widget’s display, $widget will be remembered as the focus for its top-level; the next time the focus arrives at the top-level, Tk will redirect it to $widget.

$widget->focusForce
Sets the focus of $widget’s display to $widget, even if the application doesn’t currently have the input focus for the display. This command should be used sparingly, if at all. In normal usage, an application should not claim the focus for itself; instead, it should wait for the window manager to give it the focus.

$widget->focusLastfor
Returns the name of the most recent window to have the input focus among all the windows in the same top-level as $widget. If no window in that top-level has ever had the input focus, or if the most recent focus window has been deleted, then the top-level is returned. The return value is the window that will receive the input focus the next time the window manager gives the focus to the top-level.

$widget->focusNext

$widget->focusPrev

focusNext is a utility method used for keyboard traversal, but can be useful in other contexts. It sets the focus to the ``next’’ window after $widget in focus order. The focus order is determined by the stacking order of windows and the structure of the window hierarchy. Among siblings, the focus order is the same as the stacking order, with the lowest window being first. If a window has children, the window is visited first, followed by its children (recursively), followed by its next sibling. Top-level windows other than $widget are skipped, so that focusNext never returns a window in a different top-level from $widget. After computing the next window, focusNext examines the window’s -takefocus option to see whether it should be skipped. If so, focusNext continues on to the next window in the focus order, until it eventually finds a window that will accept the focus or returns back to $widget. focusPrev is similar to focusNext except that it sets the focus to the window just before $widget in the focus order.

$widget->focusFollowsMouse
focusFollowsMouse changes the focus model for the application to an implicit one where the window under the mouse gets the focus. After this procedure is called, whenever the mouse enters a window Tk will automatically give it the input focus. The focus command may be used to move the focus to a window other than the one under the mouse, but as soon as the mouse moves into a new window the focus will jump to that window. Note: at present there is no built-in support for returning the application to an explicit focus model; to do this you’ll have to write a script that deletes the bindings created by focusFollowsMouse.

QUIRKS

When an internal window receives the input focus, Tk doesn’t actually set the X focus to that window; as far as X is concerned, the focus will stay on the top-level window containing the window with the focus. However, Tk generates FocusIn and FocusOut events just as if the X focus were on the internal window. This approach gets around a number of problems that would occur if the X focus were actually moved; the fact that the X focus is on the top-level is invisible unless you use C code to query the X server directly.

CAVEATS

Note that for the Canvas widget, the call to focus has to be fully qualified. This is because there is already a focus method for the Canvas widget, which sets the focus on individual canvas tags.

$canvas->Tk::focus

KEYWORDS

events, focus, keyboard, top-level, window manager

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1658 - Linux cli command zip_libzip_version

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_libzip_version and provides detailed information about the command zip_libzip_version, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_libzip_version.

libzip (-lzip)

returns the version number of the library as string in the format

where

is the major version,

the minor,

the micro, and

a suffix that’s only set for development versions.

was added in libzip 1.3.1.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1659 - Linux cli command File_MimeInfopm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command File_MimeInfopm and provides detailed information about the command File_MimeInfopm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the File_MimeInfopm.

NAME 🖥️ File_MimeInfopm 🖥️

Determine file type from the file name

SYNOPSIS

use File::MimeInfo; my $mime_type = mimetype($file); my $mime_type2 = mimetype(test.png);

DESCRIPTION

This module can be used to determine the mime type of a file. It tries to implement the freedesktop specification for a shared MIME database.

For this module shared-mime-info-spec 0.13 was used.

This package only uses the globs file. No real magic checking is used. The File::MimeInfo::Magic package is provided for magic typing.

If you want to determine the mimetype of data in a memory buffer you should use File::MimeInfo::Magic in combination with IO::Scalar.

This module loads the various data files when needed. If you want to hash data earlier see the rehash methods below.

EXPORT

The method mimetype is exported by default. The methods inodetype, globs, extensions, describe, mimetype_canon and mimetype_isa can be exported on demand.

METHODS

new()
Simple constructor to allow Object Oriented use of this module. If you want to use this, include the package as use File::MimeInfo (); to avoid importing sub mimetype().

mimetype($file)
Returns a mimetype string for $file, returns undef on failure. This method bundles inodetype and globs. If these methods are unsuccessful the file is read and the mimetype defaults to ’text/plain’ or to ‘application/octet-stream’ when the first ten chars of the file match ascii control chars (white spaces excluded). If the file doesn’t exist or isn’t readable undef is returned.

inodetype($file)
Returns a mimetype in the ‘inode’ namespace or undef when the file is actually a normal file.

globs($file)
Returns a mimetype string for $file based on the filename and filename extensions. Returns undef on failure. The file doesn’t need to exist. Behaviour in list context (wantarray) is unspecified and will change in future releases.

default($file)
This method decides whether a file is binary or plain text by looking at the first few bytes in the file. Used to decide between “text/plain” and “application/octet-stream” if all other methods have failed. The spec states that we should check for the ascii control chars and let higher bit chars pass to allow utf8. We try to be more intelligent using perl utf8 support.

extensions($mimetype)
In list context, returns the list of filename extensions that map to the given mimetype. In scalar context, returns the first extension that is found in the database for this mimetype.

“describe($mimetype, $lang)”
Returns a description of this mimetype as supplied by the mime info database. You can specify a language with the optional parameter $lang, this should be the two letter language code used in the xml files. Also you can set the global variable $File::MimeInfo::LANG to specify a language. This method returns undef when no xml file was found (i.e. the mimetype doesn’t exist in the database). It returns an empty string when the xml file doesn’t contain a description in the language you specified. Currently no real xml parsing is done, it trusts the xml files are nicely formatted.

mimetype_canon($mimetype)
Returns the canonical mimetype for a given mimetype. Deprecated mimetypes are typically aliased to their canonical variants. This method only checks aliases, doesn’t check whether the mimetype exists. Use this method as a filter when you take a mimetype as input.

mimetype_isa($mimetype)

“mimetype_isa($mimetype, $mimetype)”

When give only one argument this method returns a list with mimetypes that are parent classes for this mimetype. When given two arguments returns true if the second mimetype is a parent class of the first one. This method checks the subclasses table and applies a few rules for implicit subclasses.

has_mimeinfo_database()
Check if there are mimeinfo database files available; returns 1 on success. If you don’t have the shared-mime-info package installed or not in the PATH or @File::MimeInfo::DIRS does not contain database directories, you will not get the successful reply. New in version 0.30.

rehash()
Rehash the data files. Glob information is preparsed when this method is called. If you want to by-pass the XDG basedir system you can specify your database directories by setting @File::MimeInfo::DIRS. But normally it is better to change the XDG basedir environment variables.

rehash_aliases()
Rehashes the mime/aliases files.

rehash_subclasses()
Rehashes the mime/subclasses files.

DIAGNOSTICS

This module throws an exception when it can’t find any data files, when it can’t open a data file it found for reading or when a subroutine doesn’t get enough arguments. In the first case you either don’t have the freedesktop mime info database installed, or your environment variables point to the wrong places, in the second case you have the database installed, but it is broken (the mime info database should logically be world readable).

TODO

Make an option for using some caching mechanism to reduce init time.

Make describe() use real xml parsing ?

LIMITATIONS

Perl versions prior to 5.8.0 do not have the ‘:utf8’ IO Layer, thus for the default method and for reading the xml files utf8 is not supported for these versions.

Since it is not possible to distinguish between encoding types (utf8, latin1, latin2 etc.) in a straightforward manner only utf8 is supported (because the spec recommends this).

This module does not yet check extended attributes for a mimetype. Patches for this are very welcome.

This module uses the FreeDesktop.org shared mime info database. On your desktop linux this is typically pre-installed so it’s not a problem. On your server you can install the shared-mime-info package via apt or dnf or apk or whatnot.

To install on macOS, you can install it like this:

brew install shared-mime-info

AUTHOR

Jaap Karssenberg <[email protected]> Maintained by Michiel Beijen <[email protected]>

COPYRIGHT

Copyright (c) 2003, 2012 Jaap G Karssenberg. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

File::BaseDir, File::MimeInfo::Magic, File::MimeInfo::Applications, File::MimeInfo::Rox

related CPAN modules
File::MMagic

freedesktop specifications used
<http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec>, <http://www.freedesktop.org/wiki/Specifications/basedir-spec>, <http://www.freedesktop.org/wiki/Specifications/desktop-entry-spec>

freedesktop mime database
<http://www.freedesktop.org/wiki/Software/shared-mime-info>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1660 - Linux cli command getpwnam_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getpwnam_r and provides detailed information about the command getpwnam_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getpwnam_r.

NAME 🖥️ getpwnam_r 🖥️

get password file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <pwd.h>
struct passwd *getpwnam(const char *name);
struct passwd *getpwuid(uid_t uid);
int getpwnam_r(const char *restrict name, struct passwd *restrict pwd,
 char buf[restrict .buflen], size_t buflen,
 struct passwd **restrict result);
int getpwuid_r(uid_t uid, struct passwd *restrict pwd,
 char buf[restrict .buflen], size_t buflen,
 struct passwd **restrict result);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getpwnam_r(), getpwuid_r():

    _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The getpwnam() function returns a pointer to a structure containing the broken-out fields of the record in the password database (e.g., the local password file /etc/passwd, NIS, and LDAP) that matches the username name.

The getpwuid() function returns a pointer to a structure containing the broken-out fields of the record in the password database that matches the user ID uid.

The passwd structure is defined in <pwd.h> as follows:

struct passwd {
    char   *pw_name;       /* username */
    char   *pw_passwd;     /* user password */
    uid_t   pw_uid;        /* user ID */
    gid_t   pw_gid;        /* group ID */
    char   *pw_gecos;      /* user information */
    char   *pw_dir;        /* home directory */
    char   *pw_shell;      /* shell program */
};

See passwd(5) for more information about these fields.

The getpwnam_r() and getpwuid_r() functions obtain the same information as getpwnam() and getpwuid(), but store the retrieved passwd structure in the space pointed to by pwd. The string fields pointed to by the members of the passwd structure are stored in the buffer buf of size buflen. A pointer to the result (in case of success) or NULL (in case no entry was found or an error occurred) is stored in *result.

The call

sysconf(_SC_GETPW_R_SIZE_MAX)

returns either -1, without changing errno, or an initial suggested size for buf. (If this size is too small, the call fails with ERANGE, in which case the caller can retry with a larger buffer.)

RETURN VALUE

The getpwnam() and getpwuid() functions return a pointer to a passwd structure, or NULL if the matching entry is not found or an error occurs. If an error occurs, errno is set to indicate the error. If one wants to check errno after the call, it should be set to zero before the call.

The return value may point to a static area, and may be overwritten by subsequent calls to getpwent(3), getpwnam(), or getpwuid(). (Do not pass the returned pointer to free(3).)

On success, getpwnam_r() and getpwuid_r() return zero, and set *result to pwd. If no matching password record was found, these functions return 0 and store NULL in *result. In case of error, an error number is returned, and NULL is stored in *result.

ERRORS

0 or ENOENT or ESRCH or EBADF or EPERM or …
The given name or uid was not found.

EINTR
A signal was caught; see signal(7).

EIO
I/O error.

EMFILE
The per-process limit on the number of open file descriptors has been reached.

ENFILE
The system-wide limit on the total number of open files has been reached.

ENOMEM
Insufficient memory to allocate passwd structure.

ERANGE
Insufficient buffer space supplied.

NOTE

The user password database mostly refers to /etc/passwd. However, with recent systems it also refers to network wide databases using NIS, LDAP and other local files as configured in /etc/nsswitch.conf.

FILES

/etc/passwd
local password database file

/etc/nsswitch.conf
System Databases and Name Service Switch configuration file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getpwnam()

Thread safety

MT-Unsafe race:pwnam locale

getpwuid()

Thread safety

MT-Unsafe race:pwuid locale

getpwnam_r(), getpwuid_r()

Thread safety

MT-Safe locale

VERSIONS

The pw_gecos field is not specified in POSIX, but is present on most implementations.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4, 4.3BSD.

NOTES

The formulation given above under “RETURN VALUE” is from POSIX.1-2001. It does not call “not found” an error, and hence does not specify what value errno might have in this situation. But that makes it impossible to recognize errors. One might argue that according to POSIX errno should be left unchanged if an entry is not found. Experiments on various UNIX-like systems show that lots of different values occur in this situation: 0, ENOENT, EBADF, ESRCH, EWOULDBLOCK, EPERM, and probably others.

The pw_dir field contains the name of the initial working directory of the user. Login programs use the value of this field to initialize the HOME environment variable for the login shell. An application that wants to determine its user’s home directory should inspect the value of HOME (rather than the value getpwuid(getuid())->pw_dir) since this allows the user to modify their notion of “the home directory” during a login session. To determine the (initial) home directory of another user, it is necessary to use getpwnam(“username”)->pw_dir or similar.

EXAMPLES

The program below demonstrates the use of getpwnam_r() to find the full username and user ID for the username supplied as a command-line argument.

#include <errno.h>
#include <pwd.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int
main(int argc, char *argv[])
{
    struct passwd pwd;
    struct passwd *result;
    char *buf;
    long bufsize;
    int s;
    if (argc != 2) {
        fprintf(stderr, "Usage: %s username

“, argv[0]); exit(EXIT_FAILURE); } bufsize = sysconf(_SC_GETPW_R_SIZE_MAX); if (bufsize == -1) /* Value was indeterminate / bufsize = 16384; / Should be more than enough */ buf = malloc(bufsize); if (buf == NULL) { perror(“malloc”); exit(EXIT_FAILURE); } s = getpwnam_r(argv[1], &pwd, buf, bufsize, &result); if (result == NULL) { if (s == 0) printf(“Not found “); else { errno = s; perror(“getpwnam_r”); } exit(EXIT_FAILURE); } printf(“Name: %s; UID: %jd “, pwd.pw_gecos, (intmax_t) pwd.pw_uid); exit(EXIT_SUCCESS); }

SEE ALSO

endpwent(3), fgetpwent(3), getgrnam(3), getpw(3), getpwent(3), getspnam(3), putpwent(3), setpwent(3), nsswitch.conf(5), passwd(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1661 - Linux cli command xdr_accepted_reply

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_accepted_reply and provides detailed information about the command xdr_accepted_reply, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_accepted_reply.

NAME 🖥️ xdr_accepted_reply 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1662 - Linux cli command Moose_Meta_Role_Application_ToInstancepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Role_Application_ToInstancepm and provides detailed information about the command Moose_Meta_Role_Application_ToInstancepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Role_Application_ToInstancepm.

NAME 🖥️ Moose_Meta_Role_Application_ToInstancepm 🖥️

Compose a role into an instance

VERSION

version 2.2207

DESCRIPTION

METHODS

new

meta

apply

rebless_params

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1663 - Linux cli command zip_source_filep

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_filep and provides detailed information about the command zip_source_filep, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_filep.

libzip (-lzip)

The functions

and

create a zip source from a file stream. They read

bytes from offset

from the open file stream

If

is 0 or -1, the whole file (starting from

is used.

If the file stream supports seeking, the source can be used to open a read-only zip archive from.

The file stream is closed when the source is being freed, usually by

Upon successful completion, the created source is returned. Otherwise,

is returned and the error code in

or

is set to indicate the error.

fails if:

or

are invalid.

Required memory could not be allocated.

and

were added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1664 - Linux cli command HTML_Form_TextInputpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_Form_TextInputpm and provides detailed information about the command HTML_Form_TextInputpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_Form_TextInputpm.

NAME 🖥️ HTML_Form_TextInputpm 🖥️

An HTML form text input element for use with HTML::Form

VERSION

version 6.11

AUTHOR

Gisle Aas <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 1998 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1665 - Linux cli command pcap_list_datalinkspcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_list_datalinkspcap and provides detailed information about the command pcap_list_datalinkspcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_list_datalinkspcap.

NAME 🖥️ pcap_list_datalinkspcap 🖥️

get a list of link-layer header types supported by a capture device, and free that list

SYNOPSIS

#include <pcap/pcap.h>
int pcap_list_datalinks(pcap_t *p, int **dlt_buf);
void pcap_free_datalinks(int *dlt_list);

DESCRIPTION

pcap_list_datalinks() is used to get a list of the supported link-layer header types of the interface associated with the pcap descriptor. pcap_list_datalinks() allocates an array to hold the list and sets *dlt_buf to point to that array.

The caller is responsible for freeing the array with pcap_free_datalinks(), which frees the list of link-layer header types pointed to by dlt_list.

It must not be called on a pcap descriptor created by pcap_create(3PCAP) that has not yet been activated by pcap_activate(3PCAP).

RETURN VALUE

pcap_list_datalinks() returns the number of link-layer header types in the array on success, PCAP_ERROR_NOT_ACTIVATED if called on a capture handle that has been created but not activated, and PCAP_ERROR on other errors. If PCAP_ERROR is returned, pcap_geterr(3PCAP) or pcap_perror(3PCAP) may be called with p as an argument to fetch or display the error text.

SEE ALSO

pcap(3PCAP), pcap_datalink_val_to_name(3PCAP), pcap-linktype(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1666 - Linux cli command ts_read_raw_mt

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ts_read_raw_mt and provides detailed information about the command ts_read_raw_mt, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ts_read_raw_mt.

NAME 🖥️ ts_read_raw_mt 🖥️

read tslib touch samples

SYNOPSIS

#include <tslib.h>

int ts_read(struct tsdev *dev, struct ts_sample *samp, int nr);

int ts_read_raw(struct tsdev *dev, struct ts_sample *samp, int nr);

int ts_read_mt(struct tsdev *dev, struct ts_sample_mt **samp, int slots, int nr);

int ts_read_raw_mt(struct tsdev *dev, struct ts_sample_mt **samp, int slots, int nr);

DESCRIPTION

ts_read() reads nr input samples with tslib’s filters applied. struct ts_sample is define as follows:

struct ts_sample {
        int             x;
        int             y;
        unsigned int    pressure;
        struct timeval  tv;
};

ts_read_mt() reads nr * slots input samples with tslib’s filters applied. struct ts_sample_mt is defined as follows:

struct ts_sample_mt {
        /* most recent ABS_MT_* event codes.
         * see linux/input.h for descriptions */
        int             x;
        int             y;
        unsigned int    pressure;
        int             slot;
        int             tracking_id;

        int             tool_type;
        int             tool_x;
        int             tool_y;
        unsigned int    touch_major;
        unsigned int    width_major;
        unsigned int    touch_minor;
        unsigned int    width_minor;
        int             orientation;
        int             distance;
        int             blob_id;

        struct timeval  tv;

        /* BTN_TOUCH state */
        short           pen_down;

        /* the TSLIB_MT_VALID bit is set in valid if this sample
         * contains new data;
	 * valid is set to 0 otherwise */
        short           valid;
};

The user has to provide the amount of memory described in nr and slots to hold them.

ts_read_raw() and ts_read_raw_mt() do the same thing without tslib’s filters applied.

RETURN VALUE

The number of actually read samples is returned. Especially when opened in non-blocking mode, see ts_setup() , that can be less than requested in the call. On failure, a negative error number is returned.

EXAMPLE

The following program continuously reads tslib multitouch input samples and prints slot and position values to stdout as the touch screen is touched.

#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>

#include <tslib.h>

#define READ_SAMPLES 1
#define MAX_SLOTS 5

int main(int argc, char **argv)
{
        struct tsdev *ts;
        struct ts_sample_mt **samp_mt = NULL;
        int i, j;
        int ret;

        ts = ts_setup(NULL, 0);
        if (!ts)
                return -1;

        samp_mt = malloc(READ_SAMPLES * sizeof(struct ts_sample_mt **));
        if (!samp_mt)
                return -1;

        for (i = 0; i < READ_SAMPLES; i++) {
                samp_mt[i] = calloc(MAX_SLOTS, sizeof(struct ts_sample_mt));
                if (!samp_mt[i])
                        return -1;
        }

        while(1) {
                ret = ts_read_mt(ts, samp_mt, MAX_SLOTS, READ_SAMPLES);
                for (i = 0; i < ret; i++) {
                        printf("sample nr %d, i);
                        for (j = 0; i < MAX_SLOTS; j++) {
                                if (!(samp_mt[i][j].valid & TSLIB_MT_VALID))
                                        continue;

                                printf("slot %d: X:%d Y: %d,
                                       samp_mt[i][j].slot,
                                       samp_mt[i][j].x,
                                       samp_mt[i][j].y);
                        }
                }
        }
}

SEE ALSO

ts_setup(3), ts_config(3), ts_open(3), ts_close(3), ts.conf(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1667 - Linux cli command iruserok_af

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command iruserok_af and provides detailed information about the command iruserok_af, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the iruserok_af.

NAME 🖥️ iruserok_af 🖥️

routines for returning a stream to a remote command

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h> /* Or <unistd.h> on some systems */
int rcmd(char **restrict ahost, unsigned short inport,
 const char *restrict locuser,
 const char *restrict remuser,
 const char *restrict cmd, int *restrict fd2p);
int rresvport(int *port);
int iruserok(uint32_t raddr, int superuser,
 const char *ruser, const char *luser);
int ruserok(const char *rhost, int superuser,
 const char *ruser, const char *luser);
int rcmd_af(char **restrict ahost, unsigned short inport,
 const char *restrict locuser,
 const char *restrict remuser,
 const char *restrict cmd, int *restrict fd2p,
 sa_family_t af);
int rresvport_af(int *port, sa_family_t af);
int iruserok_af(const void *restrict raddr, int superuser,
 const char *restrict ruser, const char *restrict luser,
 sa_family_t af);
int ruserok_af(const char *rhost, int superuser,
 const char *ruser, const char *luser,
 sa_family_t af);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

rcmd(), rcmd_af(), rresvport(), rresvport_af(), iruserok(), iruserok_af(), ruserok(), ruserok_af():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The rcmd() function is used by the superuser to execute a command on a remote machine using an authentication scheme based on privileged port numbers. The rresvport() function returns a file descriptor to a socket with an address in the privileged port space. The iruserok() and ruserok() functions are used by servers to authenticate clients requesting service with rcmd(). All four functions are used by the rshd(8) server (among others).

rcmd()

The rcmd() function looks up the host *ahost using gethostbyname(3), returning -1 if the host does not exist. Otherwise, *ahost is set to the standard name of the host and a connection is established to a server residing at the well-known Internet port inport.

If the connection succeeds, a socket in the Internet domain of type SOCK_STREAM is returned to the caller, and given to the remote command as stdin and stdout. If fd2p is nonzero, then an auxiliary channel to a control process will be set up, and a file descriptor for it will be placed in *fd2p. The control process will return diagnostic output from the command (unit 2) on this channel, and will also accept bytes on this channel as being UNIX signal numbers, to be forwarded to the process group of the command. If fd2p is 0, then the stderr (unit 2 of the remote command) will be made the same as the stdout and no provision is made for sending arbitrary signals to the remote process, although you may be able to get its attention by using out-of-band data.

The protocol is described in detail in rshd(8).

rresvport()

The rresvport() function is used to obtain a socket with a privileged port bound to it. This socket is suitable for use by rcmd() and several other functions. Privileged ports are those in the range 0 to 1023. Only a privileged process (on Linux, a process that has the CAP_NET_BIND_SERVICE capability in the user namespace governing its network namespace) is allowed to bind to a privileged port. In the glibc implementation, this function restricts its search to the ports from 512 to 1023. The port argument is value-result: the value it supplies to the call is used as the starting point for a circular search of the port range; on (successful) return, it contains the port number that was bound to.

iruserok() and ruserok()

The iruserok() and ruserok() functions take a remote host’s IP address or name, respectively, two usernames and a flag indicating whether the local user’s name is that of the superuser. Then, if the user is not the superuser, it checks the /etc/hosts.equiv file. If that lookup is not done, or is unsuccessful, the .rhosts in the local user’s home directory is checked to see if the request for service is allowed.

If this file does not exist, is not a regular file, is owned by anyone other than the user or the superuser, is writable by anyone other than the owner, or is hardlinked anywhere, the check automatically fails. Zero is returned if the machine name is listed in the hosts.equiv file, or the host and remote username are found in the .rhosts file; otherwise iruserok() and ruserok() return -1. If the local domain (as obtained from gethostname(2)) is the same as the remote domain, only the machine name need be specified.

If the IP address of the remote host is known, iruserok() should be used in preference to ruserok(), as it does not require trusting the DNS server for the remote host’s domain.

*_af() variants

All of the functions described above work with IPv4 (AF_INET) sockets. The “_af” variants take an extra argument that allows the socket address family to be specified. For these functions, the af argument can be specified as AF_INET or AF_INET6. In addition, rcmd_af() supports the use of AF_UNSPEC.

RETURN VALUE

The rcmd() function returns a valid socket descriptor on success. It returns -1 on error and prints a diagnostic message on the standard error.

The rresvport() function returns a valid, bound socket descriptor on success. On failure, it returns -1 and sets errno to indicate the error. The error code EAGAIN is overloaded to mean: “All network ports in use”.

For information on the return from ruserok() and iruserok(), see above.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

rcmd(), rcmd_af()

Thread safetyMT-Unsafe

rresvport(), rresvport_af()

Thread safetyMT-Safe

iruserok(), ruserok(), iruserok_af(), ruserok_af()

Thread safetyMT-Safe locale

STANDARDS

BSD.

HISTORY

iruserok_af()
rcmd_af()
rresvport_af()
ruserok_af()
glibc 2.2.

Solaris, 4.2BSD. The “_af” variants are more recent additions, and are not present on as wide a range of systems.

BUGS

iruserok() and iruserok_af() are declared in glibc headers only since glibc 2.12.

SEE ALSO

rlogin(1), rsh(1), rexec(3), rexecd(8), rlogind(8), rshd(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1668 - Linux cli command modff

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command modff and provides detailed information about the command modff, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the modff.

NAME 🖥️ modff 🖥️

extract signed integral and fractional values from floating-point number

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double modf(double x, double *iptr);
float modff(float x, float *iptr);
long double modfl(long double x, long double *iptr);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

modff(), modfl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions break the argument x into an integral part and a fractional part, each of which has the same sign as x. The integral part is stored in the location pointed to by iptr.

RETURN VALUE

These functions return the fractional part of x.

If x is a NaN, a NaN is returned, and *iptr is set to a NaN.

If x is positive infinity (negative infinity), +0 (-0) is returned, and *iptr is set to positive infinity (negative infinity).

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

modf(), modff(), modfl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

SEE ALSO

frexp(3), ldexp(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1669 - Linux cli command rawmemchr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command rawmemchr and provides detailed information about the command rawmemchr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the rawmemchr.

NAME 🖥️ rawmemchr 🖥️

scan memory for a character

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
void *memchr(const void s[.n], int c, size_t n);
void *memrchr(const void s[.n], int c, size_t n);
[[deprecated]] void *rawmemchr(const void *s, int c);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

memrchr(), rawmemchr():

    _GNU_SOURCE

DESCRIPTION

The memchr() function scans the initial n bytes of the memory area pointed to by s for the first instance of c. Both c and the bytes of the memory area pointed to by s are interpreted as unsigned char.

The memrchr() function is like the memchr() function, except that it searches backward from the end of the n bytes pointed to by s instead of forward from the beginning.

The rawmemchr() function is similar to memchr(), but it assumes (i.e., the programmer knows for certain) that an instance of c lies somewhere in the memory area starting at the location pointed to by s. If an instance of c is not found, the behavior is undefined. Use either strlen(3) or memchr(3) instead.

RETURN VALUE

The memchr() and memrchr() functions return a pointer to the matching byte or NULL if the character does not occur in the given memory area.

The rawmemchr() function returns a pointer to the matching byte.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

memchr(), memrchr(), rawmemchr()

Thread safetyMT-Safe

STANDARDS

memchr()
C11, POSIX.1-2008.

memrchr()
rawmemchr()
GNU.

HISTORY

memchr()
POSIX.1-2001, C89, SVr4, 4.3BSD.

memrchr()
glibc 2.2.

rawmemchr()
glibc 2.1.

SEE ALSO

bstring(3), ffs(3), memmem(3), strchr(3), strpbrk(3), strrchr(3), strsep(3), strspn(3), strstr(3), wmemchr(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1670 - Linux cli command IO_Socket_SSLpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_Socket_SSLpm and provides detailed information about the command IO_Socket_SSLpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_Socket_SSLpm.

NAME 🖥️ IO_Socket_SSLpm 🖥️

SSL sockets with IO::Socket interface

SYNOPSIS

use strict; use IO::Socket::SSL; # simple client my $cl = IO::Socket::SSL->new(www.google.com:443); print $cl “GET / HTTP/1.0

“; print <$cl>; # simple server my $srv = IO::Socket::SSL->new( LocalAddr => 0.0.0.0:1234, Listen => 10, SSL_cert_file => server-cert.pem, SSL_key_file => server-key.pem, ); $srv->accept;

DESCRIPTION

IO::Socket::SSL makes using SSL/TLS much easier by wrapping the necessary functionality into the familiar IO::Socket interface and providing secure defaults whenever possible. This way, existing applications can be made SSL-aware without much effort, at least if you do blocking I/O and don’t use select or poll.

But, under the hood, SSL is a complex beast. So there are lots of methods to make it do what you need if the default behavior is not adequate. Because it is easy to inadvertently introduce critical security bugs or just hard to debug problems, I would recommend studying the following documentation carefully.

The documentation consists of the following parts:

  • “Essential Information About SSL/TLS”

  • “Basic SSL Client”

  • “Basic SSL Server”

  • “Common Usage Errors”

  • “Common Problems with SSL”

  • “Using Non-Blocking Sockets”

  • “Advanced Usage”

  • “Integration Into Own Modules”

  • “Description Of Methods”

Additional documentation can be found in

  • IO::Socket::SSL::Intercept - Doing Man-In-The-Middle with SSL

  • IO::Socket::SSL::Utils - Useful functions for certificates etc

Essential Information About SSL/TLS

SSL (Secure Socket Layer) or its successor TLS (Transport Layer Security) are protocols to facilitate end-to-end security. These protocols are used when accessing web sites (https), delivering or retrieving email, and in lots of other use cases. In the following documentation we will refer to both SSL and TLS as simply ‘SSL’.

SSL enables end-to-end security by providing two essential functions:

Encryption
This part encrypts the data for transit between the communicating parties, so that nobody in between can read them. It also provides tamper resistance so that nobody in between can manipulate the data.

Identification
This part makes sure that you talk to the right peer. If the identification is done incorrectly it is easy to mount man-in-the-middle attacks, e.g. if Alice wants to talk to Bob it would be possible for Mallory to put itself in the middle, so that Alice talks to Mallory and Mallory to Bob. All the data would still be encrypted, but not end-to-end between Alice and Bob, but only between Alice and Mallory and then between Mallory and Bob. Thus Mallory would be able to read and modify all traffic between Alice and Bob.

Identification is the part which is the hardest to understand and the easiest to get wrong.

With SSL, the Identification is usually done with certificates inside a PKI (Public Key Infrastructure). These Certificates are comparable to an identity card, which contains information about the owner of the card. The card then is somehow signed by the issuer of the card, the CA (Certificate Agency).

To verify the identity of the peer the following must be done inside SSL:

  • Get the certificate from the peer. If the peer does not present a certificate we cannot verify it.

  • Check if we trust the certificate, e.g. make sure it’s not a forgery. We believe that a certificate is not a fake if we either know the certificate already or if we trust the issuer (the CA) and can verify the issuers signature on the certificate. In reality there is often a hierarchy of certificate agencies and we only directly trust the root of this hierarchy. In this case the peer not only sends his own certificate, but also all intermediate certificates. Verification will be done by building a trust path from the trusted root up to the peers certificate and checking in each step if the we can verify the issuer’s signature. This step often causes problems because the client does not know the necessary trusted root certificates. These are usually stored in a system dependent CA store, but often the browsers have their own CA store.

  • Check if the certificate is still valid. Each certificate has a lifetime and should not be used after that time because it might be compromised or the underlying cryptography got broken in the mean time.

  • Check if the subject of the certificate matches the peer. This is like comparing the picture on the identity card against the person representing the identity card. When connecting to a server this is usually done by comparing the hostname used for connecting against the names represented in the certificate. A certificate might contain multiple names or wildcards, so that it can be used for multiple hosts (e.g. *.example.com and *.example.org). Although nobody sane would accept an identity card where the picture does not match the person we see, it is a common implementation error with SSL to omit this check or get it wrong.

  • Check if the certificate was revoked by the issuer. This might be the case if the certificate was compromised somehow and now somebody else might use it to claim the wrong identity. Such revocations happened a lot after the heartbleed attack. For SSL there are two ways to verify a revocation, CRL and OCSP. With CRLs (Certificate Revocation List) the CA provides a list of serial numbers for revoked certificates. The client somehow has to download the list (which can be huge) and keep it up to date. With OCSP (Online Certificate Status Protocol) the client can check a single certificate directly by asking the issuer. Revocation is the hardest part of the verification and none of today’s browsers get it fully correct. But, they are still better than most other implementations which don’t implement revocation checks or leave the hard parts to the developer.

When accessing a web site with SSL or delivering mail in a secure way the identity is usually only checked one way, e.g. the client wants to make sure it talks to the right server, but the server usually does not care which client it talks to. But, sometimes the server wants to identify the client too and will request a certificate from the client which the server must verify in a similar way.

Basic SSL Client

A basic SSL client is simple:

my $client = IO::Socket::SSL->new(www.example.com:443) or die “error=$!, ssl_error=$SSL_ERROR”;

This will take the OpenSSL default CA store as the store for the trusted CA. This usually works on UNIX systems. If there are no certificates in the store it will try use Mozilla::CA which provides the default CAs of Firefox.

In the default settings, IO::Socket::SSL will use a safer cipher set and SSL version, do a proper hostname check against the certificate, and use SNI (server name indication) to send the hostname inside the SSL handshake. This is necessary to work with servers which have different certificates behind the same IP address. It will also check the revocation of the certificate with OCSP, but currently only if the server provides OCSP stapling (for deeper checks see ocsp_resolver method).

Lots of options can be used to change ciphers, SSL version, location of CA and much more. See documentation of methods for details.

With protocols like SMTP it is necessary to upgrade an existing socket to SSL. This can be done like this:

my $client = IO::Socket::INET->new(mx.example.com:25) or die $!; # .. read greeting from server # .. send EHLO and read response # .. send STARTTLS command and read response # .. if response was successful we can upgrade the socket to SSL now: IO::Socket::SSL->start_SSL($client, # explicitly set hostname we should use for SNI SSL_hostname => mx.example.com ) or die $SSL_ERROR;

A more complete example for a simple HTTP client:

my $client = IO::Socket::SSL->new( # where to connect PeerHost => “www.example.com”, PeerPort => “https”, # certificate verification - VERIFY_PEER is default SSL_verify_mode => SSL_VERIFY_PEER, # location of CA store # need only be given if default store should not be used SSL_ca_path => /etc/ssl/certs, # typical CA path on Linux SSL_ca_file => /etc/ssl/cert.pem, # typical CA file on BSD # or just use default path on system: IO::Socket::SSL::default_ca(), # either explicitly # or implicitly by not giving SSL_ca_* # easy hostname verification # It will use PeerHost as default name a verification # scheme as default, which is safe enough for most purposes. SSL_verifycn_name => foo.bar, SSL_verifycn_scheme => http, # SNI support - defaults to PeerHost SSL_hostname => foo.bar, ) or die “failed connect or ssl handshake: $!,$SSL_ERROR”; # send and receive over SSL connection print $client “GET / HTTP/1.0

“; print <$client>;

And to do revocation checks with OCSP (only available with OpenSSL 1.0.0 or higher and Net::SSLeay 1.59 or higher):

# default will try OCSP stapling and check only leaf certificate my $client = IO::Socket::SSL->new($dst); # better yet: require checking of full chain my $client = IO::Socket::SSL->new( PeerAddr => $dst, SSL_ocsp_mode => SSL_OCSP_FULL_CHAIN, ); # even better: make OCSP errors fatal # (this will probably fail with lots of sites because of bad OCSP setups) # also use common OCSP response cache my $ocsp_cache = IO::Socket::SSL::OCSP_Cache->new; my $client = IO::Socket::SSL->new( PeerAddr => $dst, SSL_ocsp_mode => SSL_OCSP_FULL_CHAIN|SSL_OCSP_FAIL_HARD, SSL_ocsp_cache => $ocsp_cache, ); # disable OCSP stapling in case server has problems with it my $client = IO::Socket::SSL->new( PeerAddr => $dst, SSL_ocsp_mode => SSL_OCSP_NO_STAPLE, ); # check any certificates which are not yet checked by OCSP stapling or # where we have already cached results. For your own resolving combine # $ocsp->requests with $ocsp->add_response(uri,response). my $ocsp = $client->ocsp_resolver(); my $errors = $ocsp->resolve_blocking(); if ($errors) { warn “OCSP verification failed: $errors”; close($client); }

Basic SSL Server

A basic SSL server looks similar to other IO::Socket servers, only that it also contains settings for certificate and key:

# simple server my $server = IO::Socket::SSL->new( # where to listen LocalAddr => 127.0.0.1, LocalPort => 8080, Listen => 10, # which certificate to offer # with SNI support there can be different certificates per hostname SSL_cert_file => cert.pem, SSL_key_file => key.pem, ) or die “failed to listen: $!”; # accept client my $client = $server->accept or die “failed to accept or ssl handshake: $!,$SSL_ERROR”;

This will automatically use a secure set of ciphers and SSL version and also supports Forward Secrecy with (Elliptic-Curve) Diffie-Hellmann Key Exchange.

If you are doing a forking or threading server, we recommend that you do the SSL handshake inside the new process/thread so that the master is free for new connections. We recommend this because a client with improper or slow SSL handshake could make the server block in the handshake which would be bad to do on the listening socket:

# inet server my $server = IO::Socket::INET->new( # where to listen LocalAddr => 127.0.0.1, LocalPort => 8080, Listen => 10, ); # accept client my $client = $server->accept or die; # SSL upgrade client (in new process/thread) IO::Socket::SSL->start_SSL($client, SSL_server => 1, SSL_cert_file => cert.pem, SSL_key_file => key.pem, ) or die “failed to ssl handshake: $SSL_ERROR”;

Like with normal sockets, neither forking nor threading servers scale well. It is recommended to use non-blocking sockets instead, see “Using Non-Blocking Sockets”

Common Usage Errors

This is a list of typical errors seen with the use of IO::Socket::SSL:

  • Disabling verification with SSL_verify_mode. As described in “Essential Information About SSL/TLS”, a proper identification of the peer is essential and failing to verify makes Man-In-The-Middle attacks possible. Nevertheless, lots of scripts and even public modules or applications disable verification, because it is probably the easiest way to make the thing work and usually nobody notices any security problems anyway. If the verification does not succeed with the default settings, one can do the following:

    • Make sure the needed CAs are in the store, maybe use SSL_ca_file or SSL_ca_path to specify a different CA store.

    • If the validation fails because the certificate is self-signed and that’s what you expect, you can use the SSL_fingerprint option to accept specific leaf certificates by their certificate or pubkey fingerprint.

    • If the validation failed because the hostname does not match and you cannot access the host with the name given in the certificate, you can use SSL_verifycn_name to specify the hostname you expect in the certificate.

    A common error pattern is also to disable verification if they found no CA store (different modules look at different “default” places). Because IO::Socket::SSL is now able to provide a usable CA store on most platforms (UNIX, Mac OSX and Windows) it is better to use the defaults provided by IO::Socket::SSL. If necessary these can be checked with the default_ca method.

  • Polling of SSL sockets (e.g. select, poll and other event loops). If you sysread one byte on a normal socket it will result in a syscall to read one byte. Thus, if more than one byte is available on the socket it will be kept in the network stack of your OS and the next select or poll call will return the socket as readable. But, with SSL you don’t deliver single bytes. Multiple data bytes are packaged and encrypted together in an SSL frame. Decryption can only be done on the whole frame, so a sysread for one byte actually reads the complete SSL frame from the socket, decrypts it and returns the first decrypted byte. Further sysreads will return more bytes from the same frame until all bytes are returned and the next SSL frame will be read from the socket. Thus, in order to decide if you can read more data (e.g. if sysread will block) you must check if there are still data in the current SSL frame by calling pending and if there are no data pending you might check the underlying socket with select or poll. Another way might be if you try to sysread at least 16kByte all the time. 16kByte is the maximum size of an SSL frame and because sysread returns data from only a single SSL frame you can guarantee that there are no pending data. Additionally, contrary to plain sockets the data delivered on the socket are not necessarily application payload. It might be a TLS handshake, it might just be the beginning of a TLS record or it might be TLS session tickets which are send after the TLS handshake in TLS 1.3. In such situations select will return that data are available for read since it only looks at the plain socket. A sysread on the IO::Socket::SSL socket will not return any data though since it is an abstraction which only returns application data. This causes the sysread to hang in case the socket was blocking or to return an error with EAGAIN on non-blocking sockets. Applications using select or similar should therefore set the socket to non-blocking and also expect that the sysread might temporarily fail with EAGAIN. See also “Using Non-Blocking Sockets”.

  • Expecting exactly the same behavior as plain sockets. IO::Socket::SSL tries to emulate the usual socket behavior as good as possible, but full emulation can not be done. Specifically a read on the SSL socket might also result in a write on the TCP socket or a write on the SSL socket might result in a read on the TCP socket. Also accept and close on the SSL socket will result in writing and reading data to the TCP socket too. Especially the hidden writes might result in a connection reset if the underlying TCP socket is already closed by the peer. Unless signal PIPE is explicitly handled by the application this will usually result in the application crashing. It is thus recommended to explicitly IGNORE signal PIPE so that the errors get propagated as EPIPE instead of causing a crash of the application.

  • Set ‘SSL_version’ or ‘SSL_cipher_list’ to a “better” value. IO::Socket::SSL tries to set these values to reasonable, secure values which are compatible with the rest of the world. But, there are some scripts or modules out there which tried to be smart and get more secure or compatible settings. Unfortunately, they did this years ago and never updated these values, so they are still forced to do only ‘TLSv1’ (instead of also using TLSv12 or TLSv11). Or they set ‘HIGH’ as the cipher list and thought they were secure, but did not notice that ‘HIGH’ includes anonymous ciphers, e.g. without identification of the peer. So it is recommended to leave the settings at the secure defaults which IO::Socket::SSL sets and which get updated from time to time to better fit the real world.

  • Make SSL settings inaccessible by the user, together with bad builtin settings. Some modules use IO::Socket::SSL, but don’t make the SSL settings available to the user. This is often combined with bad builtin settings or defaults (like switching verification off). Thus the user needs to hack around these restrictions by using set_args_filter_hack or similar.

  • Use of constants as strings. Constants like SSL_VERIFY_PEER or SSL_WANT_READ should be used as constants and not be put inside quotes, because they represent numerical values.

  • Forking and handling the socket in parent and child. A fork of the process will duplicate the internal user space SSL state of the socket. If both master and child interact with the socket by using their own SSL state strange error messages will happen. Such interaction includes explicit or implicit close of the SSL socket. To avoid this the socket should be explicitly closed with SSL_no_shutdown.

  • Forking and executing a new process. Since the SSL state is stored in user space it will be duplicated by a fork but it will be lost when doing exec. This means it is not possible to simply redirect stdin and stdout for the new process to the SSL socket by duplicating the relevant file handles. Instead explicitly exchanging plain data between child-process and SSL socket are needed.

Common Problems with SSL

SSL is a complex protocol with multiple implementations and each of these has their own quirks. While most of these implementations work together, it often gets problematic with older versions, minimal versions in load balancers, or plain wrong setups.

Unfortunately these problems are hard to debug. Helpful for debugging are a knowledge of SSL internals, wireshark and the use of the debug settings of IO::Socket::SSL and Net::SSLeay, which can both be set with $IO::Socket::SSL::DEBUG. The following debugs levels are defined, but used not in any consistent way:

  • 0 - No debugging (default).

  • 1 - Print out errors from IO::Socket::SSL and ciphers from Net::SSLeay.

  • 2 - Print also information about call flow from IO::Socket::SSL, progress information from Net::SSLeay and state information from OpenSSL.

  • 3 - Print also some data dumps from IO::Socket::SSL and from Net::SSLeay.

Also, analyze-ssl.pl from the ssl-tools repository at <https://github.com/noxxi/p5-ssl-tools> might be a helpful tool when debugging SSL problems, as do the openssl command line tool and a check with a different SSL implementation (e.g. a web browser).

The following problems are not uncommon:

  • Bad server setup: missing intermediate certificates. It is a regular problem that administrators fail to include all necessary certificates into their server setup, e.g. everything needed to build the trust chain from the trusted root. If they check the setup with the browser everything looks ok, because browsers work around these problems by caching any intermediate certificates and apply them to new connections if certificates are missing. But, fresh browser profiles which have never seen these intermediates cannot fill in the missing certificates and fail to verify; the same is true with IO::Socket::SSL.

  • Old versions of servers or load balancers which do not understand specific TLS versions or croak on specific data. From time to time one encounters an SSL peer, which just closes the connection inside the SSL handshake. This can usually be worked around by downgrading the SSL version, e.g. by setting SSL_version. Modern Browsers usually deal with such servers by automatically downgrading the SSL version and repeat the connection attempt until they succeed. Worse servers do not close the underlying TCP connection but instead just drop the relevant packet. This is harder to detect because it looks like a stalled connection. But downgrading the SSL version often works here too. A cause of such problems are often load balancers or security devices, which have hardware acceleration and only a minimal (and less robust) SSL stack. They can often be detected because they support much fewer ciphers than other implementations.

  • Bad or old OpenSSL versions. IO::Socket::SSL uses OpenSSL with the help of the Net::SSLeay library. It is recommend to have a recent version of this library, because it has more features and usually fewer known bugs.

  • Validation of client certificates fail. Make sure that the purpose of the certificate allows use as ssl client (check with openssl x509 -purpose, that the necessary root certificate is in the path specified by SSL_ca* (or the default path) and that any intermediate certificates needed to build the trust chain are sent by the client.

  • Validation of self-signed certificate fails even if it is given with SSL_ca* argument. The SSL_ca* arguments do not give a general trust store for arbitrary certificates but only specify a store for CA certificates which then can be used to verify other certificates. This especially means that certificates which are not a CA get simply ignored, notably self-signed certificates which do not also have the CA-flag set. This behavior of OpenSSL differs from the more general trust-store concept which can be found in browsers and where it is possible to simply added arbitrary certificates (CA or not) as trusted.

Using Non-Blocking Sockets

If you have a non-blocking socket, the expected behavior on read, write, accept or connect is to set $! to EWOULDBLOCK if the operation cannot be completed immediately. Note that EWOULDBLOCK is the same as EAGAIN on UNIX systems, but is different on Windows.

With SSL, handshakes might occur at any time, even within an established connection. In these cases it is necessary to finish the handshake before you can read or write data. This might result in situations where you want to read but must first finish the write of a handshake or where you want to write but must first finish a read. In these cases $! is set to EAGAIN like expected, and additionally $SSL_ERROR is set to either SSL_WANT_READ or SSL_WANT_WRITE. Thus if you get EWOULDBLOCK on a SSL socket you must check $SSL_ERROR for SSL_WANT_* and adapt your event mask accordingly.

Using readline on non-blocking sockets does not make much sense and I would advise against using it. And, while the behavior is not documented for other IO::Socket classes, it will try to emulate the behavior seen there, e.g. to return the received data instead of blocking, even if the line is not complete. If an unrecoverable error occurs it will return nothing, even if it already received some data.

Also, I would advise against using accept with a non-blocking SSL object because it might block and this is not what most would expect. The reason for this is that accept on a non-blocking TCP socket (e.g. IO::Socket::IP, IO::Socket::INET..) results in a new TCP socket which does not inherit the non-blocking behavior of the master socket. And thus, the initial SSL handshake on the new socket inside IO::Socket::SSL::accept will be done in a blocking way. To work around this you are safer by doing a TCP accept and later upgrade the TCP socket in a non-blocking way with start_SSL and accept_SSL.

my $cl = IO::Socket::SSL->new($dst); $cl->blocking(0); my $sel = IO::Select->new($cl); while (1) { # with SSL a call for reading n bytes does not result in reading of n # bytes from the socket, but instead it must read at least one full SSL # frame. If the socket has no new bytes, but there are unprocessed data # from the SSL frame can_read will block! # wait for data on socket $sel->can_read(); # new data on socket or eof READ: # this does not read only 1 byte from socket, but reads the complete SSL # frame and then just returns one byte. On subsequent calls it than # returns more byte of the same SSL frame until it needs to read the # next frame. my $n = sysread( $cl,my $buf,1); if ( ! defined $n ) { die $! if not $!{EWOULDBLOCK}; next if $SSL_ERROR == SSL_WANT_READ; if ( $SSL_ERROR == SSL_WANT_WRITE ) { # need to write data on renegotiation $sel->can_write; next; } die “something went wrong: $SSL_ERROR”; } elsif ( ! $n ) { last; # eof } else { # read next bytes # we might have still data within the current SSL frame # thus first process these data instead of waiting on the underlying # socket object goto READ if $cl->pending; # goto sysread next; # goto $sel->can_read } }

Additionally there are differences to plain sockets when using select, poll, kqueue or similar technologies to get notified if data are available. Relying only on these calls is not sufficient in all cases since unread data might be internally buffered in the SSL stack. To detect such buffering pending() need to be used. Alternatively the buffering can be avoided by using sysread with the maximum size of an SSL frame. See “Common Usage Errors” for details.

Advanced Usage

SNI Support

Newer extensions to SSL can distinguish between multiple hostnames on the same IP address using Server Name Indication (SNI).

Support for SNI on the client side was added somewhere in the OpenSSL 0.9.8 series, but with 1.0 a bug was fixed when the server could not decide about its hostname. Therefore client side SNI is only supported with OpenSSL 1.0 or higher in IO::Socket::SSL. With a supported version, SNI is used automatically on the client side, if it can determine the hostname from PeerAddr or PeerHost (which are synonyms in the underlying IO::Socket:: classes and thus should never be set both or at least not to different values). On unsupported OpenSSL versions it will silently not use SNI. The hostname can also be given explicitly given with SSL_hostname, but in this case it will throw in error, if SNI is not supported. To check for support you might call IO::Socket::SSL->can_client_sni().

On the server side, earlier versions of OpenSSL are supported, but only together with Net::SSLeay version >= 1.50. To check for support you might call IO::Socket::SSL->can_server_sni(). If server side SNI is supported, you might specify different certificates per host with SSL_cert* and SSL_key*, and check the requested name using get_servername.

Talk Plain and SSL With The Same Socket

It is often required to first exchange some plain data and then upgrade the socket to SSL after some kind of STARTTLS command. Protocols like FTPS even need a way to downgrade the socket again back to plain.

The common way to do this would be to create a normal socket and use start_SSL to upgrade and stop_SSL to downgrade:

my $sock = IO::Socket::INET->new(…) or die $!; … exchange plain data on $sock until starttls command … IO::Socket::SSL->start_SSL($sock,%sslargs) or die $SSL_ERROR; … now $sock is an IO::Socket::SSL object … … exchange data with SSL on $sock until stoptls command … $sock->stop_SSL or die $SSL_ERROR; … now $sock is again an IO::Socket::INET object …

But, lots of modules just derive directly from IO::Socket::INET. While this base class can be replaced with IO::Socket::SSL, these modules cannot easily support different base classes for SSL and plain data and switch between these classes on a starttls command.

To help in this case, IO::Socket::SSL can be reduced to a plain socket on startup, and connect_SSL/accept_SSL/start_SSL can be used to enable SSL and stop_SSL to talk plain again:

my $sock = IO::Socket::SSL->new( PeerAddr => … SSL_startHandshake => 0, %sslargs ) or die $!; … exchange plain data on $sock until starttls command … $sock->connect_SSL or die $SSL_ERROR; … now $sock is an IO::Socket::SSL object … … exchange data with SSL on $sock until stoptls command … $sock->stop_SSL or die $SSL_ERROR; … $sock is still an IO::Socket::SSL object … … but data exchanged again in plain …

Integration Into Own Modules

IO::Socket::SSL behaves similarly to other IO::Socket modules and thus could be integrated in the same way, but you have to take special care when using non-blocking I/O (like for handling timeouts) or using select or poll. Please study the documentation on how to deal with these differences.

Also, it is recommended to not set or touch most of the SSL_* options, so that they keep their secure defaults. It is also recommended to let the user override these SSL specific settings without the need of global settings or hacks like set_args_filter_hack.

The notable exception is SSL_verifycn_scheme. This should be set to the hostname verification scheme required by the module or protocol.

Description Of Methods

IO::Socket::SSL inherits from another IO::Socket module. The choice of the super class depends on the installed modules:

  • If IO::Socket::IP with at least version 0.20 is installed it will use this module as super class, transparently providing IPv6 and IPv4 support.

  • If IO::Socket::INET6 is installed it will use this module as super class, transparently providing IPv6 and IPv4 support.

  • Otherwise it will fall back to IO::Socket::INET, which is a perl core module. With IO::Socket::INET you only get IPv4 support.

Please be aware that with the IPv6 capable super classes, it will look first for the IPv6 address of a given hostname. If the resolver provides an IPv6 address, but the host cannot be reached by IPv6, there will be no automatic fallback to IPv4. To avoid these problems you can enforce IPv4 for a specific socket by using the Domain or Family option with the value AF_INET as described in IO::Socket::IP. Alternatively you can enforce IPv4 globally by loading IO::Socket::SSL with the option ‘inet4’, in which case it will use the IPv4 only class IO::Socket::INET as the super class.

IO::Socket::SSL will provide all of the methods of its super class, but sometimes it will override them to match the behavior expected from SSL or to provide additional arguments.

The new or changed methods are described below, but please also read the section about SSL specific error handling.

Error Handling
If an SSL specific error occurs, the global variable $SSL_ERROR will be set. If the error occurred on an existing SSL socket, the method errstr will give access to the latest socket specific error. Both $SSL_ERROR and the errstr method give a dualvar similar to $!, e.g. providing an error number in numeric context or an error description in string context.

new(…)
Creates a new IO::Socket::SSL object. You may use all the friendly options that came bundled with the super class (e.g. IO::Socket::IP, IO::Socket::INET, …) plus (optionally) the ones described below. If you don’t specify any SSL related options it will do its best in using secure defaults, e.g. choosing good ciphers, enabling proper verification, etc.

SSL_server
Set this option to a true value if the socket should be used as a server. If this is not explicitly set it is assumed if the Listen parameter is given when creating the socket.

SSL_hostname
This can be given to specify the hostname used for SNI, which is needed if you have multiple SSL hostnames on the same IP address. If not given it will try to determine the hostname from PeerAddr, which will fail if only an IP was given or if this argument is used within start_SSL. If you want to disable SNI, set this argument to ‘’. Currently only supported for the client side and will be ignored for the server side. See section “SNI Support” for details of SNI the support.

SSL_startHandshake
If this option is set to false (defaults to true) it will not start the SSL handshake yet. This has to be done later with accept_SSL or connect_SSL. Before the handshake is started read/write/etc. can be used to exchange plain data.

SSL_keepSocketOnError
If this option is set to true (defaults to false) it will not close the underlying TCP socket on errors. In most cases there is no real use for this behavior since both sides of the TCP connection will probably have a different idea of the current state of the connection.

SSL_ca | SSL_ca_file | SSL_ca_path
Usually you want to verify that the peer certificate has been signed by a trusted certificate authority. In this case you should use this option to specify the file (SSL_ca_file) or directory (SSL_ca_path) containing the certificate(s) of the trusted certificate authorities. SSL_ca_path can also be an array or a string containing multiple path, where the path are separated by the platform specific separator. This separator is ; on DOS, Windows, Netware, , on VMS and : for all the other systems. If multiple path are given at least one of these must be accessible. You can also give a list of X509* certificate handles (like you get from Net::SSLeay or IO::Socket::SSL::Utils::PEM_xxx2cert) with SSL_ca. These will be added to the CA store before path and file and thus take precedence. If neither SSL_ca, nor SSL_ca_file or SSL_ca_path are set it will use default_ca() to determine the user-set or system defaults. If you really don’t want to set a CA set SSL_ca_file or SSL_ca_path to \undef or SSL_ca to an empty list. (unfortunately is used by some modules using IO::Socket::SSL when CA is not explicitly given).

SSL_client_ca | SSL_client_ca_file
If verify_mode is VERIFY_PEER on the server side these options can be used to set the list of acceptable CAs for the client. This way the client can select they required certificate from a list of certificates. The value for these options is similar to SSL_ca and SSL_ca_file.

SSL_fingerprint
Sometimes you have a self-signed certificate or a certificate issued by an unknown CA and you really want to accept it, but don’t want to disable verification at all. In this case you can specify the fingerprint of the certificate as algo$hex_fingerprint. algo is a fingerprint algorithm supported by OpenSSL, e.g. ‘sha1’,‘sha256’… and hex_fingerprint is the hexadecimal representation of the binary fingerprint. Any colons inside the hex string will be ignored. If you want to use the fingerprint of the pubkey inside the certificate instead of the certificate use the syntax algo$pub$hex_fingerprint instead. To get the fingerprint of an established connection you can use get_fingerprint. It is also possible to skip algo$, i.e. only specify the fingerprint. In this case the likely algorithms will be automatically detected based on the length of the digest string. You can specify a list of fingerprints in case you have several acceptable certificates. If a fingerprint matches the topmost (i.e. leaf) certificate no additional validations can make the verification fail.

SSL_cert_file | SSL_cert | SSL_key_file | SSL_key
If you create a server you usually need to specify a server certificate which should be verified by the client. Same is true for client certificates, which should be verified by the server. The certificate can be given as a file with SSL_cert_file or as an internal representation of an X509* object (like you get from Net::SSLeay or IO::Socket::SSL::Utils::PEM_xxx2cert) with SSL_cert. If given as a file it will automatically detect the format. Supported file formats are PEM, DER and PKCS#12, where PEM and PKCS#12 can contain the certificate and the chain to use, while DER can only contain a single certificate. If given as a list of X509* please note, that the all the chain certificates (e.g. all except the first) will be “consumed” by openssl and will be freed if the SSL context gets destroyed - so you should never free them yourself. But the servers certificate (e.g. the first) will not be consumed by openssl and thus must be freed by the application. For each certificate a key is need, which can either be given as a file with SSL_key_file or as an internal representation of an EVP_PKEY* object with SSL_key (like you get from Net::SSLeay or IO::Socket::SSL::Utils::PEM_xxx2key). If a key was already given within the PKCS#12 file specified by SSL_cert_file it will ignore any SSL_key or SSL_key_file. If no SSL_key or SSL_key_file was given it will try to use the PEM file given with SSL_cert_file again, maybe it contains the key too. If your SSL server should be able to use different certificates on the same IP address, depending on the name given by SNI, you can use a hash reference instead of a file with <hostname = cert_file>>. If your SSL server should be able to use both RSA and ECDSA certificates for the same domain/IP a similar hash reference like with SNI is given. The domain names used to specify the additional certificates should be hostname%whatever, i.e. hostname%ecc or similar. This needs at least OpenSSL 1.0.2. To let the server pick the certificate based on the clients cipher preference SSL_honor_cipher_order should be set to false. In case certs and keys are needed but not given it might fall back to builtin defaults, see “Defaults for Cert, Key and CA”. Examples: SSL_cert_file => mycert.pem, SSL_key_file => mykey.pem, SSL_cert_file => { “foo.example.org” => foo-cert.pem, “foo.example.org%ecc” => foo-ecc-cert.pem, “bar.example.org” => bar-cert.pem, # used when nothing matches or client does not support SNI => default-cert.pem, %ecc => default-ecc-cert.pem, }, SSL_key_file => { “foo.example.org” => foo-key.pem, “foo.example.org%ecc” => foo-ecc-key.pem, “bar.example.org” => bar-key.pem, # used when nothing matches or client does not support SNI => default-key.pem, %ecc => default-ecc-key.pem, }

SSL_passwd_cb
If your private key is encrypted, you might not want the default password prompt from Net::SSLeay. This option takes a reference to a subroutine that should return the password required to decrypt your private key.

SSL_use_cert
If this is true, it forces IO::Socket::SSL to use a certificate and key, even if you are setting up an SSL client. If this is set to 0 (the default), then you will only need a certificate and key if you are setting up a server. SSL_use_cert will implicitly be set if SSL_server is set. For convenience it is also set if it was not given but a cert was given for use (SSL_cert_file or similar).

SSL_version
Sets the version of the SSL protocol used to transmit data. ‘SSLv23’ uses a handshake compatible with SSL2.0, SSL3.0 and TLS1.x, while ‘SSLv2’, ‘SSLv3’, ‘TLSv1’, ‘TLSv1_1’, ‘TLSv1_2’, or ‘TLSv1_3’ restrict handshake and protocol to the specified version. All values are case-insensitive. Instead of ‘TLSv1_1’, ‘TLSv1_2’, and ‘TLSv1_3’ one can also use ‘TLSv11’, ‘TLSv12’, and ‘TLSv13’. Which protocol versions are actually supported depend on the versions of OpenSSL and Net::SSLeay installed, but modern protocols like TLS 1.3 are supported by these for many years now. Independent from the handshake format you can limit to set of accepted SSL versions by adding !version separated by ‘:’. The default SSL_version is ‘SSLv23:!TLSv1:!TLSv1_1:!SSLv3:!SSLv2’. This means, that the handshake format is compatible to SSL2.0 and higher, but that the successful handshake is limited to TLS1.2 and higher, that is no SSL2.0, SSL3.0, TLS 1.0 or TLS 1.1 because these versions have serious security issues and should not be used anymore. You can also use !TLSv1_1 and !TLSv1_2 to disable TLS versions 1.1 and 1.2 while still allowing TLS version 1.0. Setting the version instead to ‘TLSv1’ might break interaction with very old or broken clients, which expect a SSL2.0 compatible handshake. On the other side some broken clients just close the connection when they receive a TLS version 1.1 request. In this case setting the version to ‘SSLv23:!SSLv2:!SSLv3:!TLSv1_1:!TLSv1_2’ might help.

SSL_cipher_list
If this option is set the cipher list for the connection will be set to the given value, e.g. something like ‘ALL:!LOW:!EXP:!aNULL’. This will only affect ciphers for TLS 1.2 and lower. See the OpenSSL documentation (<https://www.openssl.org/docs/manmaster/man1/openssl-ciphers.html#CIPHER-STRINGS>) for more details. Unless you fail to contact your peer because of no shared ciphers it is recommended to leave this option at the default setting, which uses the system default but disables some insecure ciphers which might still be enabled on older systems. In case different cipher lists are needed for different SNI hosts a hash can be given with the host as key and the cipher suite as value, similar to SSL_cert*.

SSL_ciphersuites
If this option is set the TLS 1.3 ciphersuites for the connection will be set to the given value. This is similar to SSL_cipher_list, but only for TLS 1.3 ciphers. See argument -ciphersuites in the OpenSSL documentation (<https://www.openssl.org/docs/manmaster/man1/openssl-ciphers.html>) for details. Unless you fail to contact your peer because of no shared ciphers it is recommended to leave this option at the default setting, which uses the system default. In case different cipher lists are needed for different SNI hosts a hash can be given with the host as key and the cipher suite as value, similar to SSL_cert*.

SSL_honor_cipher_order
If this option is true the cipher order the server specified is used instead of the order proposed by the client. This option defaults to true to make use of our secure cipher list setting.

SSL_dh_file
To create a server which provides forward secrecy you need to either give the DH parameters or (better, because faster) the ECDH curve. This setting cares about DH parameters. To support non-elliptic Diffie-Hellman key exchange a suitable file needs to be given here or the SSL_dh should be used with an appropriate value. See dhparam command in openssl for more information. If neither SSL_dh_file nor SSL_dh are set a builtin DH parameter with a length of 2048 bit is used to offer DH key exchange by default. If you don’t want this (e.g. disable DH key exchange) explicitly set this or the SSL_dh parameter to undef.

SSL_dh
Like SSL_dh_file, but instead of giving a file you use a preloaded or generated DH*.

SSL_ecdh_curve
To create a server which provides forward secrecy you need to either give the DH parameters or (better, because faster) the ECDH curve. This setting cares about the ECDH curve(s). To support Elliptic Curve Diffie-Hellmann key exchange the OID or NID of at least one suitable curve needs to be provided here. With OpenSSL 1.1.0+ this parameter defaults to auto, which means that it lets OpenSSL pick the best settings. If support for CTX_set_ecdh_auto is implemented in Net::SSLeay (needs at least version 1.86) it will use this to implement the same default. Otherwise it will default to prime256v1 (builtin of OpenSSL) in order to offer ECDH key exchange by default. If setting groups or curves is supported by Net::SSLeay (needs at least version 1.86) then multiple curves can be given here in the order of the preference, i.e. P-521:P-384:P-256. When used at the client side this will include the supported curves as extension in the TLS handshake. If you don’t want to have ECDH key exchange this could be set to undef or set SSL_ciphers to exclude all of these ciphers. You can check if ECDH support is available by calling IO::Socket::SSL->can_ecdh.

SSL_verify_mode
This option sets the verification mode for the peer certificate. You may combine SSL_VERIFY_PEER (verify_peer), SSL_VERIFY_FAIL_IF_NO_PEER_CERT (fail verification if no peer certificate exists; ignored for clients), SSL_VERIFY_CLIENT_ONCE (verify client once; ignored for clients). See OpenSSL man page for SSL_CTX_set_verify for more information. The default is SSL_VERIFY_NONE for server (e.g. no check for client certificate) and SSL_VERIFY_PEER for client (check server certificate).

SSL_verify_callback
If you want to verify certificates yourself, you can pass a sub reference along with this parameter to do so. When the callback is called, it will be passed:

The function should return 1 or 0, depending on whether it thinks the certificate is valid or invalid. The default is to let OpenSSL do all of the busy work. The callback will be called for each element in the certificate chain. See the OpenSSL documentation for SSL_CTX_set_verify for more information.

SSL_verifycn_scheme
The scheme is used to correctly verify the identity inside the certificate by using the hostname of the peer. See the information about the verification schemes in verify_hostname. If you don’t specify a scheme it will use ‘default’, but only complain loudly if the name verification fails instead of letting the whole certificate verification fail. THIS WILL CHANGE, e.g. it will let the certificate verification fail in the future if the hostname does not match the certificate !!!! To override the name used in verification use SSL_verifycn_name. The scheme ‘default’ is a superset of the usual schemes, which will accept the hostname in common name and subjectAltName and allow wildcards everywhere. While using this scheme is way more secure than no name verification at all you better should use the scheme specific to your application protocol, e.g. ‘http’, ‘ftp’… If you are really sure, that you don’t want to verify the identity using the hostname you can use ’none’ as a scheme. In this case you’d better have alternative forms of verification, like a certificate fingerprint or do a manual verification later by calling verify_hostname yourself.

SSL_verifycn_publicsuffix
This option is used to specify the behavior when checking wildcards certificates for public suffixes, e.g. no wildcard certificates for *.com or *.co.uk should be accepted, while *.example.com or *.example.co.uk is ok. If not specified it will simply use the builtin default of IO::Socket::SSL::PublicSuffix, you can create another object with from_string or from_file of this module. To disable verification of public suffix set this option to .

SSL_verifycn_name
Set the name which is used in verification of hostname. If SSL_verifycn_scheme is set and no SSL_verifycn_name is given it will try to use SSL_hostname or PeerHost and PeerAddr settings and fail if no name can be determined. If SSL_verifycn_scheme is not set it will use a default scheme and warn if it cannot determine a hostname, but it will not fail. Using PeerHost or PeerAddr works only if you create the connection directly with IO::Socket::SSL->new, if an IO::Socket::INET object is upgraded with start_SSL the name has to be given in SSL_verifycn_name or SSL_hostname.

SSL_check_crl
If you want to verify that the peer certificate has not been revoked by the signing authority, set this value to true. OpenSSL will search for the CRL in your SSL_ca_path, or use the file specified by SSL_crl_file. See the Net::SSLeay documentation for more details. Note that this functionality appears to be broken with OpenSSL < v0.9.7b, so its use with lower versions will result in an error.

SSL_crl_file
If you want to specify the CRL file to be used, set this value to the pathname to be used. This must be used in addition to setting SSL_check_crl.

SSL_ocsp_mode
Defines how certificate revocation is done using OCSP (Online Status Revocation Protocol). The default is to send a request for OCSP stapling to the server and if the server sends an OCSP response back the result will be used. Any other OCSP checking needs to be done manually with ocsp_resolver. The following flags can be combined with |:

SSL_OCSP_NO_STAPLE
Don’t ask for OCSP stapling. This is the default if SSL_verify_mode is VERIFY_NONE.

SSL_OCSP_TRY_STAPLE
Try OCSP stapling, but don’t complain if it gets no stapled response back. This is the default if SSL_verify_mode is VERIFY_PEER (the default).

SSL_OCSP_MUST_STAPLE
Consider it a hard error, if the server does not send a stapled OCSP response back. Most servers currently send no stapled OCSP response back.

SSL_OCSP_FAIL_HARD
Fail hard on response errors, default is to fail soft like the browsers do. Soft errors mean, that the OCSP response is not usable, e.g. no response, error response, no valid signature etc. Certificate revocations inside a verified response are considered hard errors in any case. Soft errors inside a stapled response are never considered hard, e.g. it is expected that in this case an OCSP request will be send to the responsible OCSP responder.

SSL_OCSP_FULL_CHAIN
This will set up the ocsp_resolver so that all certificates from the peer chain will be checked, otherwise only the leaf certificate will be checked against revocation.

SSL_ocsp_staple_callback
If this callback is defined, it will be called with the SSL object and the OCSP response handle obtained from the peer, e.g. <$cb-($ssl,$resp)>>. If the peer did not provide a stapled OCSP response the function will be called with $resp=undef. Because the OCSP response handle is no longer valid after leaving this function it should not by copied or freed. If access to the response is necessary after leaving this function it can be serialized with Net::SSLeay::i2d_OCSP_RESPONSE. If no such callback is provided, it will use the default one, which verifies the response and uses it to check if the certificate(s) of the connection got revoked.

SSL_ocsp_cache
With this option a cache can be given for caching OCSP responses, which could be shared between different SSL contexts. If not given a cache specific to the SSL context only will be used. You can either create a new cache with IO::Socket::SSL::OCSP_Cache->new([size]) or implement your own cache, which needs to have methods put($key,\%entry) and get($key) (returning \%entry) where entry is the hash representation of the OCSP response with fields like nextUpdate. The default implementation of the cache will consider responses valid as long as nextUpdate is less then the current time.

SSL_psk
PSK to use instead of certificate. Requires the peer to use the same PSK. On the client side the identity and psk need to be provided as array-ref with <[identity,psk]>. Alternatively only the psk might be provided, in which case io_socket_ssl is used as identity. On the server side a single psk might be given which will then be use no matter which identity hint was given by the client. Alternatively a hash-ref can be provided with identity as key and psk as value to serve clients with different psk based on the identity hint. The special identity is used to set a default psk. To use PSK make sure to have the relevant ciphers enabled. With TLS 1.3 this is implicit, but with TLS 1.2 and lower explicitly add PSK to SSL_cipher_list since it is not enabled by default. Note that the given psk is expected to be binary and not hexadecimal as some other tools do. To convert hex to binary use pack("H*",hexstring). Also note that the error messages one gets if either identity or psk don’t match the configuration in the peer can be useless (“handshake failure”) or misleading (“bad mac”). PSK support needs respective API functionality in Net::SSLeay, which was only fully included in 1.94. IO::Socket::SSL->can_psk() returns undef if functionality is not available and a hash-ref with details otherwise: key client in the hash signals support for using PSK in a SSL client (available since Net::SSLeay 1.82) while key server for support of PSK in SSL server (since Net::SSLeay 1.94).

SSL_reuse_ctx
If you have already set the above options for a previous instance of IO::Socket::SSL, then you can reuse the SSL context of that instance by passing it as the value for the SSL_reuse_ctx parameter. You may also create a new instance of the IO::Socket::SSL::SSL_Context class, using any context options that you desire without specifying connection options, and pass that here instead. If you use this option, all other context-related options that you pass in the same call to new() will be ignored unless the context supplied was invalid. Note that, contrary to versions of IO::Socket::SSL below v0.90, a global SSL context will not be implicitly used unless you use the set_default_context() function.

SSL_create_ctx_callback
With this callback you can make individual settings to the context after it got created and the default setup was done. The callback will be called with the CTX object from Net::SSLeay as the single argument. Example for limiting the server session cache size: SSL_create_ctx_callback => sub { my $ctx = shift; Net::SSLeay::CTX_sess_set_cache_size($ctx,128); }

SSL_session_cache_size
If you make repeated connections to the same host/port and the SSL renegotiation time is an issue, you can turn on client-side session caching with this option by specifying a positive cache size. For successive connections, pass the SSL_reuse_ctx option to the new() calls (or use set_default_context()) to make use of the cached sessions. The session cache size refers to the number of unique host/port pairs that can be stored at one time; the oldest sessions in the cache will be removed if new ones are added. This option does not effect the session cache a server has for it’s clients, e.g. it does not affect SSL objects with SSL_server set. Note that session caching with TLS 1.3 needs at least Net::SSLeay 1.86.

SSL_session_cache
Specifies session cache object which should be used instead of creating a new. Overrules SSL_session_cache_size. This option is useful if you want to reuse the cache, but not the rest of the context. A session cache object can be created using IO::Socket::SSL::Session_Cache->new( cachesize ). Use set_default_session_cache() to set a global cache object.

SSL_session_key
Specifies a key to use for lookups and inserts into client-side session cache. Per default ip:port of destination will be used, but sometimes you want to share the same session over multiple ports on the same server (like with FTPS).

SSL_session_id_context
This gives an id for the servers session cache. It’s necessary if you want clients to connect with a client certificate. If not given but SSL_verify_mode specifies the need for client certificate a context unique id will be picked.

SSL_error_trap
When using the accept() or connect() methods, it may be the case that the actual socket connection works but the SSL negotiation fails, as in the case of an HTTP client connecting to an HTTPS server. Passing a subroutine ref attached to this parameter allows you to gain control of the orphaned socket instead of having it be closed forcibly. The subroutine, if called, will be passed two parameters: a reference to the socket on which the SSL negotiation failed and the full text of the error message.

SSL_npn_protocols
If used on the server side it specifies list of protocols advertised by SSL server as an array ref, e.g. [‘spdy/2’,‘http1.1’]. On the client side it specifies the protocols offered by the client for NPN as an array ref. See also method next_proto_negotiated. Next Protocol Negotiation (NPN) is available with Net::SSLeay 1.46+ and openssl-1.0.1+. NPN is unavailable in TLSv1.3 protocol. To check support you might call IO::Socket::SSL->can_npn(). If you use this option with an unsupported Net::SSLeay/OpenSSL it will throw an error.

SSL_alpn_protocols
If used on the server side it specifies list of protocols supported by the SSL server as an array ref, e.g. [‘http/2.0’, ‘spdy/3.1’,‘http/1.1’]. On the client side it specifies the protocols advertised by the client for ALPN as an array ref. See also method alpn_selected. Application-Layer Protocol Negotiation (ALPN) is available with Net::SSLeay 1.56+ and openssl-1.0.2+. More details about the extension are in RFC7301. To check support you might call IO::Socket::SSL->can_alpn(). If you use this option with an unsupported Net::SSLeay/OpenSSL it will throw an error. Note that some client implementations may encounter problems if both NPN and ALPN are specified. Since ALPN is intended as a replacement for NPN, try providing ALPN protocols then fall back to NPN if that fails.

SSL_ticket_keycb => [$sub,$data] | $sub
This is a callback used for stateless session reuse (Session Tickets, RFC 5077). This callback will be called as $sub->($data,[$key_name]) where $data is the argument given to SSL_ticket_keycb (or undef) and $key_name depends on the mode:

encrypt ticket
If a ticket needs to be encrypted the callback will be called without $key_name. In this case it should return ($current_key,$current_key_name) where $current_key is the current key (32 byte random data) and $current_key_name the name associated with this key (exactly 16 byte). This $current_key_name will be incorporated into the ticket.

decrypt ticket
If a ticket needs to be decrypted the callback will be called with $key_name as found in the ticket. It should return ($key,$current_key_name) where $key is the key associated with the given $key_name and $current_key_name the name associated with the currently active key. If $current_key_name is different from the given $key_name the callback will be called again to re-encrypt the ticket with the currently active key. If no key can be found which matches the given $key_name then this function should return nothing (empty list). This mechanism should be used to limit the life time for each key encrypting the ticket. Compromise of a ticket encryption key might lead to decryption of SSL sessions which used session tickets protected by this key.

Example: Net::SSLeay::RAND_bytes(my $oldkey,32); Net::SSLeay::RAND_bytes(my $newkey,32); my $oldkey_name = pack(“a16”,oldsecret); my $newkey_name = pack(“a16”,newsecret); my @keys = ( [ $newkey_name, $newkey ], # current active key [ $oldkey_name, $oldkey ], # already expired ); my $keycb = [ sub { my ($mykeys,$name) = @_; # return (current_key, current_key_name) if no name given return ($mykeys->[0][1],$mykeys->[0][0]) if ! $name; # return (matching_key, current_key_name) if we find a key matching # the given name for(my $i = 0; $i<@$mykeys; $i++) { next if $name ne $mykeys->[$i][0]; return ($mykeys->[$i][1],$mykeys->[0][0]); } # no matching key found return; },\keys ]; my $srv = IO::Socket::SSL->new(…, SSL_ticket_keycb => $keycb);

SSL_mode_release_buffers 1|0
This enables or disables the SSL_MODE_RELEASE_BUFFERS option on the SSL object. With this option the read buffer will be released after each SSL_read but will need to be reallocated for each new SSL_read. If memory usage is a concern this might save lots of memory in the mean time though, about 34k per idle SSL connection according to the documentation in SSL_CTX_set_mode (3ssl).

accept
This behaves similar to the accept function of the underlying socket class, but additionally does the initial SSL handshake. But because the underlying socket class does return a blocking file handle even when accept is called on a non-blocking socket, the SSL handshake on the new file object will be done in a blocking way. Please see the section about non-blocking I/O for details. If you don’t like this behavior you should do accept on the TCP socket and then upgrade it with start_SSL later.

connect(…)
This behaves similar to the connect function but also does an SSL handshake. Because you cannot give SSL specific arguments to this function, you should better either use new to create a connect SSL socket or start_SSL to upgrade an established TCP socket to SSL.

close(…)
Contrary to a close for a simple INET socket a close in SSL also mandates a proper shutdown of the SSL part. This is done by sending a close notify message by both peers. A naive implementation would thus wait until it receives the close notify message from the peer - which conflicts with the commonly expected semantic that a close will not block. The default behavior is thus to only send a close notify but not wait for the close notify of the peer. If this is required SSL_fast_shutdown need to be explicitly set to false. There are also cases where a SSL shutdown should not be done at all. This is true for example when forking to let a child deal with the socket and closing the socket in the parent process. A naive explicit close or an implicit close when destroying the socket in the parent would send a close notify to the peer which would make the SSL socket in the client process unusable. In this case an explicit close with SSL_no_shutdown set to true should be done in the parent process. For more details and other arguments see stop_SSL which gets called from close to shutdown the SSL state of the socket.

sysread( BUF, LEN, [ OFFSET ] )
This function behaves from the outside the same as sysread in other IO::Socket objects, e.g. it returns at most LEN bytes of data. But in reality it reads not only LEN bytes from the underlying socket, but at a single SSL frame. It then returns up to LEN bytes it decrypted from this SSL frame. If the frame contained more data than requested it will return only LEN data, buffer the rest and return it on further read calls. This means, that it might be possible to read data, even if the underlying socket is not readable, so using poll or select might not be sufficient. sysread will only return data from a single SSL frame, e.g. either the pending data from the already buffered frame or it will read a frame from the underlying socket and return the decrypted data. It will not return data spanning several SSL frames in a single call. Also, calls to sysread might fail, because it must first finish an SSL handshake. To understand these behaviors is essential, if you write applications which use event loops and/or non-blocking sockets. Please read the specific sections in this documentation.

syswrite( BUF, [ LEN, [ OFFSET ]] )
This functions behaves from the outside the same as syswrite in other IO::Socket objects, e.g. it will write at most LEN bytes to the socket, but there is no guarantee, that all LEN bytes are written. It will return the number of bytes written. Because it basically just calls SSL_write from OpenSSL syswrite will write at most a single SSL frame. This means, that no more than 16.384 bytes, which is the maximum size of an SSL frame, will be written at once. For non-blocking sockets SSL specific behavior applies. Please read the specific section in this documentation.

peek( BUF, LEN, [ OFFSET ])
This function has exactly the same syntax as sysread, and performs nearly the same task but will not advance the read position so that successive calls to peek() with the same arguments will return the same results. This function requires OpenSSL 0.9.6a or later to work.

pending()
This function gives you the number of bytes available without reading from the underlying socket object. This function is essential if you work with event loops, please see the section about polling SSL sockets.

get_fingerprint([algo,certificate,pubkey])
This methods returns the fingerprint of the given certificate in the form algo$digest_hex, where algo is the used algorithm, default ‘sha256’. If no certificate is given the peer certificate of the connection is used. If pubkey is true it will not return the fingerprint of the certificate but instead the fingerprint of the pubkey inside the certificate as algo$pub$digest_hex.

get_fingerprint_bin([algo,certificate,pubkey])
This methods returns the binary fingerprint of the given certificate by using the algorithm algo, default ‘sha256’. If no certificate is given the peer certificate of the connection is used. If pubkey is true it will not return the fingerprint of the certificate but instead the fingerprint of the pubkey inside the certificate.

get_cipher()
Returns the string form of the cipher that the IO::Socket::SSL object is using.

get_sslversion()
Returns the string representation of the SSL version of an established connection.

get_sslversion_int()
Returns the integer representation of the SSL version of an established connection.

get_session_reused()
This returns true if the session got reused and false otherwise. Note that with a reused session no certificates are send within the handshake and no ciphers are offered and thus functions which rely on this might not work.

dump_peer_certificate()
Returns a parsable string with select fields from the peer SSL certificate. This method directly returns the result of the dump_peer_certificate() method of Net::SSLeay.

peer_certificate($field;[$refresh])
If a peer certificate exists, this function can retrieve values from it. If no field is given the internal representation of certificate from Net::SSLeay is returned. If refresh is true it will not used a cached version, but check again in case the certificate of the connection has changed due to renegotiation. The following fields can be queried:

authority (alias issuer)
The certificate authority which signed the certificate.

owner (alias subject)
The owner of the certificate.

commonName (alias cn) - only for Net::SSLeay version >=1.30
The common name, usually the server name for SSL certificates.

subjectAltNames - only for Net::SSLeay version >=1.33
Alternative names for the subject, usually different names for the same server, like example.org, example.com, *.example.com. It returns a list of (typ,value) with typ GEN_DNS, GEN_IPADD etc (these constants are exported from IO::Socket::SSL). See Net::SSLeay::X509_get_subjectAltNames.

sock_certificate($field)
This is similar to peer_certificate but will return the sites own certificate. The same arguments for $field can be used. If no $field is given the certificate handle from the underlying OpenSSL will be returned. This handle will only be valid as long as the SSL connection exists and if used afterwards it might result in strange crashes of the application.

peer_certificates
This returns all the certificates send by the peer, e.g. first the peers own certificate and then the rest of the chain. You might use CERT_asHash from IO::Socket::SSL::Utils to inspect each of the certificates. This function depends on a version of Net::SSLeay >= 1.58 .

get_servername
This gives the name requested by the client if Server Name Indication (SNI) was used.

verify_hostname($hostname,$scheme,$publicsuffix)
This verifies the given hostname against the peer certificate using the given scheme. Hostname is usually what you specify within the PeerAddr. See the SSL_verifycn_publicsuffix parameter for an explanation of suffix checking and for the possible values. Verification of hostname against a certificate is different between various applications and RFCs. Some scheme allow wildcards for hostnames, some only in subjectAltNames, and even their different wildcard schemes are possible. RFC 6125 provides a good overview. To ease the verification the following schemes are predefined (both protocol name and rfcXXXX name can be used):

rfc2818, xmpp (rfc3920), ftp (rfc4217)
Extended wildcards in subjectAltNames and common name are possible, e.g. *.example.org or even www*.example.org. The common name will be only checked if no DNS names are given in subjectAltNames.

http (alias www)
While name checking is defined in rfc2818 the current browsers usually accept also an IP address (w/o wildcards) within the common name as long as no subjectAltNames are defined. Thus this is rfc2818 extended with this feature.

smtp (rfc2595), imap, pop3, acap (rfc4642), netconf (rfc5538), syslog (rfc5425), snmp (rfc5953)
Simple wildcards in subjectAltNames are possible, e.g. *.example.org matches www.example.org but not lala.www.example.org. If nothing from subjectAltNames match it checks against the common name, where wildcards are also allowed to match the full leftmost label.

ldap (rfc4513)
Simple wildcards are allowed in subjectAltNames, but not in common name. Common name will be checked even if subjectAltNames exist.

sip (rfc5922)
No wildcards are allowed and common name is checked even if subjectAltNames exist.

gist (rfc5971)
Simple wildcards are allowed in subjectAltNames and common name, but common name will only be checked if there are no DNS names in subjectAltNames.

default
This is a superset of all the rules and is automatically used if no scheme is given but a hostname (instead of IP) is known. Extended wildcards are allowed in subjectAltNames and common name and common name is checked always.

none
No verification will be done. Actually is does not make any sense to call verify_hostname in this case.

The scheme can be given either by specifying the name for one of the above predefined schemes, or by using a hash which can have the following keys and values:

check_cn: 0|‘always’|‘when_only’
Determines if the common name gets checked. If ‘always’ it will always be checked (like in ldap), if ‘when_only’ it will only be checked if no names are given in subjectAltNames (like in http), for any other values the common name will not be checked.

wildcards_in_alt: 0|‘full_label’|‘anywhere’
Determines if and where wildcards in subjectAltNames are possible. If ‘full_label’ only cases like *.example.org will be possible (like in ldap), for ‘anywhere’ www*.example.org is possible too (like http), dangerous things like but www.*.org or even ‘*’ will not be allowed. For compatibility with older versions ’leftmost’ can be given instead of ‘full_label’.

wildcards_in_cn: 0|‘full_label’|‘anywhere’
Similar to wildcards_in_alt, but checks the common name. There is no predefined scheme which allows wildcards in common names.

ip_in_cn: 0|1|4|6
Determines if an IP address is allowed in the common name (no wildcards are allowed). If set to 4 or 6 it only allows IPv4 or IPv6 addresses, any other true value allows both.

callback: \coderef
If you give a subroutine for verification it will be called with the arguments ($hostname,$commonName,@subjectAltNames), where hostname is the name given for verification, commonName is the result from peer_certificate(‘cn’) and subjectAltNames is the result from peer_certificate(‘subjectAltNames’). All other arguments for the verification scheme will be ignored in this case.

next_proto_negotiated()
This method returns the name of negotiated protocol - e.g. ‘http/1.1’. It works for both client and server side of SSL connection. NPN support is available with Net::SSLeay 1.46+ and openssl-1.0.1+. To check support you might call IO::Socket::SSL->can_npn().

alpn_selected()
Returns the protocol negotiated via ALPN as a string, e.g. ‘http/1.1’, ‘http/2.0’ or ‘spdy/3.1’. ALPN support is available with Net::SSLeay 1.56+ and openssl-1.0.2+. To check support, use IO::Socket::SSL->can_alpn().

errstr()
Returns the last error (in string form) that occurred. If you do not have a real object to perform this method on, call IO::Socket::SSL::errstr() instead. For read and write errors on non-blocking sockets, this method may include the string SSL wants a read first! or SSL wants a write first! meaning that the other side is expecting to read from or write to the socket and wants to be satisfied before you get to do anything. But with version 0.98 you are better comparing the global exported variable $SSL_ERROR against the exported symbols SSL_WANT_READ and SSL_WANT_WRITE.

opened()
This returns false if the socket could not be opened, 1 if the socket could be opened and the SSL handshake was successful done and -1 if the underlying IO::Handle is open, but the SSL handshake failed.

IO::Socket::SSL->start_SSL($socket, … )
This will convert a glob reference or a socket that you provide to an IO::Socket::SSL object. You may also pass parameters to specify context or connection options as with a call to new(). If you are using this function on an **accept()**ed socket, you must set the parameter “SSL_server” to 1, i.e. IO::Socket::SSL->start_SSL($socket, SSL_server => 1). If you have a class that inherits from IO::Socket::SSL and you want the $socket to be blessed into your own class instead, use MyClass->start_SSL($socket) to achieve the desired effect. Note that if start_SSL() fails in SSL negotiation, $socket will remain blessed in its original class. For non-blocking sockets you better just upgrade the socket to IO::Socket::SSL and call accept_SSL or connect_SSL and the upgraded object. To just upgrade the socket set SSL_startHandshake explicitly to 0. If you call start_SSL w/o this parameter it will revert to blocking behavior for accept_SSL and connect_SSL. If given the parameter “Timeout” it will stop if after the timeout no SSL connection was established. This parameter is only used for blocking sockets, if it is not given the default Timeout from the underlying IO::Socket will be used.

stop_SSL(…)
This is the opposite of start_SSL(), connect_SSL() and accept_SSL(), e.g. it will shutdown the SSL connection and return to the class before start_SSL(). It gets the same arguments as close(), in fact close() calls stop_SSL() (but without downgrading the class). Will return true if it succeeded and undef if failed. This might be the case for non-blocking sockets. In this case $! is set to EWOULDBLOCK and the ssl error to SSL_WANT_READ or SSL_WANT_WRITE. In this case the call should be retried again with the same arguments once the socket is ready. For calling from stop_SSL SSL_fast_shutdown default to false, e.g. it waits for the close_notify of the peer. This is necessary in case you want to downgrade the socket and continue to use it as a plain socket. After stop_SSL the socket can again be used to exchange plain data.

connect_SSL, accept_SSL
These functions should be used to do the relevant handshake, if the socket got created with new or upgraded with start_SSL and SSL_startHandshake was set to false. They will return undef until the handshake succeeded or an error got thrown. As long as the function returns undef and $! is set to EWOULDBLOCK one could retry the call after the socket got readable (SSL_WANT_READ) or writeable (SSL_WANT_WRITE).

set_msg_callback
This will add/remove a user defined callback for each message, internally using openssl SSL_set_msg_callback API. To make sure that the callback is active before the handshake starts, combine it with SSL_startHandshake => 0 in the preceding setup of the SSL object. To remove callback explicitly call it with an empty callback function. Example: $sock = IO::Socket::SSL->new( …. , SSL_startHandshake => 0); # set callback $sock->set_msg_callback(\cb, $cbarg1, $cbarg2); $sock->connect_SSL(); sub cb { my ($sock, # see SSL_set_msg_callback for the following args $direction, $ssl_ver, $content_type, $buf, $len, $ssl, $cbarg1, $cbarg2) = @_; … if (no_longer_need_cb) { # disable callback $sock->set_msg_callback(undef); } }

ocsp_resolver
This will create an OCSP resolver object, which can be used to create OCSP requests for the certificates of the SSL connection. Which certificates are verified depends on the setting of SSL_ocsp_mode: by default only the leaf certificate will be checked, but with SSL_OCSP_FULL_CHAIN all chain certificates will be checked. Because to create an OCSP request the certificate and its issuer certificate need to be known it is not possible to check certificates when the trust chain is incomplete or if the certificate is self-signed. The OCSP resolver gets created by calling $ssl->ocsp_resolver and provides the following methods:

hard_error
This returns the hard error when checking the OCSP response. Hard errors are certificate revocations. With the SSL_ocsp_mode of SSL_OCSP_FAIL_HARD any soft error (e.g. failures to get signed information about the certificates) will be considered a hard error too. The OCSP resolving will stop on the first hard error. The method will return undef as long as no hard errors occurred and still requests to be resolved. If all requests got resolved and no hard errors occurred the method will return .

soft_error
This returns the soft error(s) which occurred when asking the OCSP responders.

requests
This will return a hash consisting of (url,request)-tuples, e.g. which contain the OCSP request string and the URL where it should be sent too. The usual way to send such a request is as HTTP POST request with a content-type of application/ocsp-request or as a GET request with the base64 and url-encoded request is added to the path of the URL. After you’ve handled all these requests and added the response with add_response you should better call this method again to make sure, that no more requests are outstanding. IO::Socket::SSL will combine multiple OCSP requests for the same server inside a single request, but some server don’t give a response to all these requests, so that one has to ask again with the remaining requests.

add_response($uri,$response)
This method takes the HTTP body of the response which got received when sending the OCSP request to $uri. If no response was received or an error occurred one should either retry or consider $response as empty which will trigger a soft error. The method returns the current value of hard_error, e.g. a defined value when no more requests need to be done.

resolve_blocking(%args)
This combines requests and add_response which HTTP::Tiny to do all necessary requests in a blocking way. %args will be given to HTTP::Tiny so that you can put proxy settings etc here. HTTP::Tiny will be called with verify_SSL of false, because the OCSP responses have their own signatures so no extra SSL verification is needed. If you don’t want to use blocking requests you need to roll your own user agent with requests and add_response.

IO::Socket::SSL->new_from_fd($fd, [mode], %sslargs)
This will convert a socket identified via a file descriptor into an SSL socket. Note that the argument list does not include a “MODE” argument; if you supply one, it will be thoughtfully ignored (for compatibility with IO::Socket::INET). Instead, a mode of ‘+<’ is assumed, and the file descriptor passed must be able to handle such I/O because the initial SSL handshake requires bidirectional communication. Internally the given $fd will be upgraded to a socket object using the new_from_fd method of the super class (IO::Socket::INET or similar) and then start_SSL will be called using the given %sslargs. If $fd is already an IO::Socket object you should better call start_SSL directly.

IO::Socket::SSL::default_ca([ path|dir| SSL_ca_file = …, SSL_ca_path => … ])>
Determines or sets the default CA path. If existing path or dir or a hash is given it will set the default CA path to this value and never try to detect it automatically. If undef is given it will forget any stored defaults and continue with detection of system defaults. If no arguments are given it will start detection of system defaults, unless it has already stored user-set or previously detected values. The detection of system defaults works similar to OpenSSL, e.g. it will check the directory specified in environment variable SSL_CERT_DIR or the path OPENSSLDIR/certs (SSLCERTS: on VMS) and the file specified in environment variable SSL_CERT_FILE or the path OPENSSLDIR/cert.pem (SSLCERTS:cert.pem on VMS). Contrary to OpenSSL it will check if the SSL_ca_path contains PEM files with the hash as file name and if the SSL_ca_file looks like PEM. If no usable system default can be found it will try to load and use Mozilla::CA and if not available give up detection. The result of the detection will be saved to speed up future calls. The function returns the saved default CA as hash with SSL_ca_file and SSL_ca_path.

IO::Socket::SSL::set_default_context(…)
You may use this to make IO::Socket::SSL automatically re-use a given context (unless specifically overridden in a call to new()). It accepts one argument, which should be either an IO::Socket::SSL object or an IO::Socket::SSL::SSL_Context object. See the SSL_reuse_ctx option of new() for more details. Note that this sets the default context globally, so use with caution (esp. in mod_perl scripts).

IO::Socket::SSL::set_default_session_cache(…)
You may use this to make IO::Socket::SSL automatically re-use a given session cache (unless specifically overridden in a call to new()). It accepts one argument, which should be an IO::Socket::SSL::Session_Cache object or similar (e.g. something which implements get_session, add_session and del_session like IO::Socket::SSL::Session_Cache does). See the SSL_session_cache option of new() for more details. Note that this sets the default cache globally, so use with caution.

IO::Socket::SSL::set_defaults(%args)
With this function one can set defaults for all SSL_* parameter used for creation of the context, like the SSL_verify* parameter. Any SSL_* parameter can be given or the following short versions:

mode - SSL_verify_mode

callback - SSL_verify_callback

scheme - SSL_verifycn_scheme

name - SSL_verifycn_name

IO::Socket::SSL::set_client_defaults(%args)

Similar to set_defaults, but only sets the defaults for client mode.

IO::Socket::SSL::set_server_defaults(%args)
Similar to set_defaults, but only sets the defaults for server mode.

IO::Socket::SSL::set_args_filter_hack(\code|‘use_defaults’)
Sometimes one has to use code which uses unwanted or invalid arguments for SSL, typically disabling SSL verification or setting wrong ciphers or SSL versions. With this hack it is possible to override these settings and restore sanity. Example: IO::Socket::SSL::set_args_filter_hack( sub { my ($is_server,$args) = @_; if ( ! $is_server ) { # client settings - enable verification with default CA # and fallback hostname verification etc delete @{$args}{qw( SSL_verify_mode SSL_ca_file SSL_ca_path SSL_verifycn_scheme SSL_version )}; # and add some fingerprints for known certs which are signed by # unknown CAs or are self-signed $args->{SSL_fingerprint} = … } }); With the short setting set_args_filter_hack(use_defaults) it will prefer the default settings in all cases. These default settings can be modified with set_defaults, set_client_defaults and set_server_defaults.

The following methods are unsupported (not to mention futile!) and IO::Socket::SSL will emit a large CROAK() if you are silly enough to use them:

truncate

stat

ungetc

setbuf

setvbuf

fdopen

send/recv

Note that send() and recv() cannot be reliably trapped by a tied filehandle (such as that used by IO::Socket::SSL) and so may send unencrypted data over the socket. Object-oriented calls to these functions will fail, telling you to use the print/printf/syswrite and read/sysread families instead.

DEPRECATIONS

The following functions are deprecated and are only retained for compatibility:

context_init()
use the SSL_reuse_ctx option if you want to re-use a context

socketToSSL() and socket_to_SSL()
use IO::Socket::SSL->start_SSL() instead

kill_socket()
use close() instead

get_peer_certificate()
use the peer_certificate() function instead. Used to return X509_Certificate with methods subject_name and issuer_name. Now simply returns $self which has these methods (although deprecated).

issuer_name()
use peer_certificate( ‘issuer’ ) instead

subject_name()
use peer_certificate( ‘subject’ ) instead

EXAMPLES

See the ’example’ directory, the tests in ’t’ and also the tools in ‘util’.

BUGS

If you use IO::Socket::SSL together with threads you should load it (e.g. use or require) inside the main thread before creating any other threads which use it. This way it is much faster because it will be initialized only once. Also there are reports that it might crash the other way.

Creating an IO::Socket::SSL object in one thread and closing it in another thread will not work.

IO::Socket::SSL does not work together with Storable::fd_retrieve/fd_store. See BUGS file for more information and how to work around the problem.

If you have a server and it looks like you have a memory leak you might check the size of your session cache. Default for Net::SSLeay seems to be 20480, see the example for SSL_create_ctx_callback for how to limit it.

TLS 1.3 support regarding session reuse is incomplete.

SEE ALSO

IO::Socket::INET, IO::Socket::INET6, IO::Socket::IP, Net::SSLeay.

THANKS

Many thanks to all who added patches or reported bugs or helped IO::Socket::SSL another way. Please keep reporting bugs and help with patches, even if they just fix the documentation.

Special thanks to the team of Net::SSLeay for the good cooperation.

AUTHORS

Steffen Ullrich, <sullr at cpan.org> is the current maintainer.

Peter Behroozi, <behrooz at fas.harvard.edu> (Note the lack of an “i” at the end of “behrooz”)

Marko Asplund, <marko.asplund at kronodoc.fi>, was the original author of IO::Socket::SSL.

Patches incorporated from various people, see file Changes.

COPYRIGHT

The original versions of this module are Copyright (C) 1999-2002 Marko Asplund.

The rewrite of this module is Copyright (C) 2002-2005 Peter Behroozi.

Versions 0.98 and newer are Copyright (C) 2006-2014 Steffen Ullrich.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1671 - Linux cli command Net_DNS_ZoneFilepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_ZoneFilepm and provides detailed information about the command Net_DNS_ZoneFilepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_ZoneFilepm.

NAME 🖥️ Net_DNS_ZoneFilepm 🖥️

DNS zone file

SYNOPSIS

use Net::DNS::ZoneFile; $zonefile = Net::DNS::ZoneFile->new( named.example ); while ( $rr = $zonefile->read ) { $rr->print; } @zone = $zonefile->read;

DESCRIPTION

Each Net::DNS::ZoneFile object instance represents a zone file together with any subordinate files introduced by the $INCLUDE directive. Zone file syntax is defined by RFC1035.

A program may have multiple zone file objects, each maintaining its own independent parser state information.

The parser supports both the $TTL directive defined by RFC2308 and the BIND $GENERATE syntax extension.

All RRs in a zone file must have the same class, which may be specified for the first RR encountered and is then propagated automatically to all subsequent records.

METHODS

new

$zonefile = Net::DNS::ZoneFile->new( filename, [example.com] ); $handle = IO::File->new( filename, <:encoding(ISO8859-7) ); $zonefile = Net::DNS::ZoneFile->new( $handle, [example.com] );

The new() constructor returns a Net::DNS::ZoneFile object which represents the zone file specified in the argument list.

The specified file or file handle is open for reading and closed when exhausted or all references to the ZoneFile object cease to exist.

The optional second argument specifies $ORIGIN for the zone file.

Zone files are presumed to be UTF-8 encoded where that is supported.

Alternative character encodings may be specified indirectly by creating a file handle with the desired encoding layer, which is then passed as an argument to new(). The specified encoding is propagated to files introduced by $INCLUDE directives.

read

$rr = $zonefile->read; @rr = $zonefile->read;

When invoked in scalar context, read() returns a Net::DNS::RR object representing the next resource record encountered in the zone file, or undefined if end of data has been reached.

When invoked in list context, read() returns the list of Net::DNS::RR objects in the order that they appear in the zone file.

Comments and blank lines are silently disregarded.

$INCLUDE, $ORIGIN, $TTL and $GENERATE directives are processed transparently.

name

$filename = $zonefile->name;

Returns the name of the current zone file. Embedded $INCLUDE directives will cause this to differ from the filename argument supplied when the object was created.

line

$line = $zonefile->line;

Returns the number of the last line read from the current zone file.

origin

$origin = $zonefile->origin;

Returns the fully qualified name of the current origin within the zone file.

ttl

$ttl = $zonefile->ttl;

Returns the default TTL as specified by the $TTL directive.

COMPATIBILITY WITH Net::DNS::ZoneFile 1.04

Applications which depended on the defunct Net::DNS::ZoneFile 1.04 CPAN distribution will continue to operate with minimal change using the compatibility interface described below. New application code should use the object-oriented interface.

use Net::DNS::ZoneFile; $listref = Net::DNS::ZoneFile->read( $filename ); $listref = Net::DNS::ZoneFile->read( $filename, $include_dir ); $listref = Net::DNS::ZoneFile->readfh( $filehandle ); $listref = Net::DNS::ZoneFile->readfh( $filehandle, $include_dir ); $listref = Net::DNS::ZoneFile->parse( $string ); $listref = Net::DNS::ZoneFile->parse( \string ); $listref = Net::DNS::ZoneFile->parse( $string, $include_dir ); $listref = Net::DNS::ZoneFile->parse( \string, $include_dir ); $_->print for @$listref;

The optional second argument specifies the default path for filenames. The current working directory is used by default.

Although not available in the original implementation, the RR list can be obtained directly by calling any of these methods in list context.

@rr = Net::DNS::ZoneFile->read( $filename, $include_dir );

The partial result is returned if an error is encountered by the parser.

read

$listref = Net::DNS::ZoneFile->read( $filename ); $listref = Net::DNS::ZoneFile->read( $filename, $include_dir );

read() parses the contents of the specified file and returns a reference to the list of Net::DNS::RR objects. The return value is undefined if an error is encountered by the parser.

readfh

$listref = Net::DNS::ZoneFile->readfh( $filehandle ); $listref = Net::DNS::ZoneFile->readfh( $filehandle, $include_dir );

readfh() parses data from the specified file handle and returns a reference to the list of Net::DNS::RR objects. The return value is undefined if an error is encountered by the parser.

parse

$listref = Net::DNS::ZoneFile->parse( $string ); $listref = Net::DNS::ZoneFile->parse( \string ); $listref = Net::DNS::ZoneFile->parse( $string, $include_dir ); $listref = Net::DNS::ZoneFile->parse( \string, $include_dir );

parse() interprets the text in the argument string and returns a reference to the list of Net::DNS::RR objects. The return value is undefined if an error is encountered by the parser.

ACKNOWLEDGEMENTS

This package is designed as an improved and compatible replacement for Net::DNS::ZoneFile 1.04 which was created by Luis Munoz in 2002 as a separate CPAN module.

The present implementation is the result of an agreement to merge our two different approaches into one package integrated into Net::DNS. The contribution of Luis Munoz is gratefully acknowledged.

Thanks are also due to Willem Toorop for his constructive criticism of the initial version and invaluable assistance during testing.

COPYRIGHT

Copyright (c)2011-2012 Dick Franks.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC1035(5.1) <https://tools.ietf.org/html/rfc1035> RFC2308 (4) <https://tools.ietf.org/html/rfc2308>

BIND Administrator Reference Manual <http://bind.isc.org/>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1672 - Linux cli command Regexp_Common_URI_httppm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_URI_httppm and provides detailed information about the command Regexp_Common_URI_httppm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_URI_httppm.

NAME 🖥️ Regexp_Common_URI_httppm 🖥️

  • Returns a pattern for HTTP URIs.

SYNOPSIS

use Regexp::Common qw /URI/; while (<>) { /$RE{URI}{HTTP}/ and print “Contains an HTTP URI. “; }

DESCRIPTION

$RE{URI}{HTTP}{-scheme}

Provides a regex for an HTTP URI as defined by RFC 2396 (generic syntax) and RFC 2616 (HTTP).

If -scheme => P is specified the pattern P is used as the scheme. By default P is qr/http/. https and https? are reasonable alternatives.

The syntax for an HTTP URI is:

“http:” “//” host [ “:” port ] [ “/” path [ “?” query ]]

Under {-keep}, the following are returned:

$1
The entire URI.

$2
The scheme.

$3
The host (name or address).

$4
The port (if any).

$5
The absolute path, including the query and leading slash.

$6
The absolute path, including the query, without the leading slash.

$7
The absolute path, without the query or leading slash.

$8
The query, without the question mark.

REFERENCES

[RFC 2396]
Berners-Lee, Tim, Fielding, R., and Masinter, L.: Uniform Resource Identifiers (URI): Generic Syntax. August 1998.

[RFC 2616]
Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P. and Berners-Lee, Tim: Hypertext Transfer Protocol – HTTP/1.1. June 1999.

SEE ALSO

Regexp::Common::URI for other supported URIs.

AUTHOR

Damian Conway ([email protected])

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1673 - Linux cli command XtSetErrorMsgHandler

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtSetErrorMsgHandler and provides detailed information about the command XtSetErrorMsgHandler, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtSetErrorMsgHandler.

NAME 🖥️ XtSetErrorMsgHandler 🖥️

high-level error handlers

SYNTAX

#include <X11/Intrinsic.h>

void XtErrorMsg(const char *name, const char *type, const char *class, const char *defaultMsg, String *params, Cardinal *num_params);

void XtSetErrorMsgHandler(XtErrorMsgHandler msg_handler);

void XtSetWarningMsgHandler(XtErrorMsgHandler msg_handler);

void XtWarningMsg(const char *name, const char *type, const char *class, const char *defaultMsg, String *params, Cardinal *num_params);

ARGUMENTS

class
Specifies the resource class of the error message.

default
Specifies the default message to use.

name
Specifies the general kind of error.

type
Specifies the detailed name of the error.

msg_handler
Specifies the new fatal error procedure, which should not return or the nonfatal error procedure, which usually returns.

num_params
Specifies the number of values in the parameter list.

params
Specifies a pointer to a list of values to be stored in the message.

DESCRIPTION

The XtErrorMsg function has been superceded by XtAppErrorMsg.

The XtSetErrorMsgHandler function has been superceded by XtAppSetErrorMsgHandler.

The XtSetWarningMsgHandler function has been superceded by XtAppSetWarningMsgHandler.

The XtWarningMsg function has been superceded by XtAppWarningMsg

SEE ALSO

XtAppErrorMsg(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1674 - Linux cli command if_freenameindex

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command if_freenameindex and provides detailed information about the command if_freenameindex, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the if_freenameindex.

NAME 🖥️ if_freenameindex 🖥️

get network interface names and indexes

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <net/if.h>
struct if_nameindex *if_nameindex(void);
void if_freenameindex(struct if_nameindex *ptr);

DESCRIPTION

The if_nameindex() function returns an array of if_nameindex structures, each containing information about one of the network interfaces on the local system. The if_nameindex structure contains at least the following entries:

unsigned int if_index; /* Index of interface (1, 2, ...) */
char        *if_name;  /* Null-terminated name ("eth0", etc.) */

The if_index field contains the interface index. The if_name field points to the null-terminated interface name. The end of the array is indicated by entry with if_index set to zero and if_name set to NULL.

The data structure returned by if_nameindex() is dynamically allocated and should be freed using if_freenameindex() when no longer needed.

RETURN VALUE

On success, if_nameindex() returns pointer to the array; on error, NULL is returned, and errno is set to indicate the error.

ERRORS

if_nameindex() may fail and set errno if:

ENOBUFS
Insufficient resources available.

if_nameindex() may also fail for any of the errors specified for socket(2), bind(2), ioctl(2), getsockname(2), recvmsg(2), sendto(2), or malloc(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

if_nameindex(), if_freenameindex()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008, RFC 3493.

HISTORY

glibc 2.1. POSIX.1-2001. BSDi.

Before glibc 2.3.4, the implementation supported only interfaces with IPv4 addresses. Support of interfaces that don’t have IPv4 addresses is available only on kernels that support netlink.

EXAMPLES

The program below demonstrates the use of the functions described on this page. An example of the output this program might produce is the following:

$ ./a.out
1: lo
2: wlan0
3: em1

Program source

#include <net/if.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int
main(void)
{
    struct if_nameindex *if_ni, *i;
    if_ni = if_nameindex();
    if (if_ni == NULL) {
        perror("if_nameindex");
        exit(EXIT_FAILURE);
    }
    for (i = if_ni; !(i->if_index == 0 && i->if_name == NULL); i++)
        printf("%u: %s

“, i->if_index, i->if_name); if_freenameindex(if_ni); exit(EXIT_SUCCESS); }

SEE ALSO

getsockopt(2), setsockopt(2), getifaddrs(3), if_indextoname(3), if_nametoindex(3), ifconfig(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1675 - Linux cli command zip_file_attributes_init

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_file_attributes_init and provides detailed information about the command zip_file_attributes_init, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_file_attributes_init.

libzip (-lzip)

The

initializes a

structure with default values. It must be called before modifying such a structure for the first time.

was added in libzip 1.7.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1676 - Linux cli command strerror_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strerror_r and provides detailed information about the command strerror_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strerror_r.

NAME 🖥️ strerror_r 🖥️

return string describing error number

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strerror(int errnum);
const char *strerrorname_np(int errnum);
const char *strerrordesc_np(int errnum);
int strerror_r(int errnum, char buf[.buflen], size_t buflen);
               /* XSI-compliant */
char *strerror_r(int errnum, char buf[.buflen], size_t buflen);
               /* GNU-specific */
char *strerror_l(int errnum, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strerrorname_np(), strerrordesc_np():

    _GNU_SOURCE

strerror_r():

    The XSI-compliant version is provided if:
        (_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE
    Otherwise, the GNU-specific version is provided.

DESCRIPTION

The strerror() function returns a pointer to a string that describes the error code passed in the argument errnum, possibly using the LC_MESSAGES part of the current locale to select the appropriate language. (For example, if errnum is EINVAL, the returned description will be “Invalid argument”.) This string must not be modified by the application, and the returned pointer will be invalidated on a subsequent call to strerror() or strerror_l(), or if the thread that obtained the string exits. No other library function, including perror(3), will modify this string.

Like strerror(), the strerrordesc_np() function returns a pointer to a string that describes the error code passed in the argument errnum, with the difference that the returned string is not translated according to the current locale.

The strerrorname_np() function returns a pointer to a string containing the name of the error code passed in the argument errnum. For example, given EPERM as an argument, this function returns a pointer to the string “EPERM”. Given 0 as an argument, this function returns a pointer to the string “0”.

strerror_r()

strerror_r() is like strerror(), but might use the supplied buffer buf instead of allocating one internally. This function is available in two versions: an XSI-compliant version specified in POSIX.1-2001 (available since glibc 2.3.4, but not POSIX-compliant until glibc 2.13), and a GNU-specific version (available since glibc 2.0). The XSI-compliant version is provided with the feature test macros settings shown in the SYNOPSIS; otherwise the GNU-specific version is provided. If no feature test macros are explicitly defined, then (since glibc 2.4) _POSIX_C_SOURCE is defined by default with the value 200112L, so that the XSI-compliant version of strerror_r() is provided by default.

The XSI-compliant strerror_r() is preferred for portable applications. It returns the error string in the user-supplied buffer buf of length buflen.

The GNU-specific strerror_r() returns a pointer to a string containing the error message. This may be either a pointer to a string that the function stores in buf, or a pointer to some (immutable) static string (in which case buf is unused). If the function stores a string in buf, then at most buflen bytes are stored (the string may be truncated if buflen is too small and errnum is unknown). The string always includes a terminating null byte (‘�’).

strerror_l()

strerror_l() is like strerror(), but maps errnum to a locale-dependent error message in the locale specified by locale. The behavior of strerror_l() is undefined if locale is the special locale object LC_GLOBAL_LOCALE or is not a valid locale object handle.

RETURN VALUE

The strerror(), strerror_l(), and the GNU-specific strerror_r() functions return the appropriate error description string, or an “Unknown error nnn” message if the error number is unknown.

On success, strerrorname_np() and strerrordesc_np() return the appropriate error description string. If errnum is an invalid error number, these functions return NULL.

The XSI-compliant strerror_r() function returns 0 on success. On error, a (positive) error number is returned (since glibc 2.13), or -1 is returned and errno is set to indicate the error (before glibc 2.13).

POSIX.1-2001 and POSIX.1-2008 require that a successful call to strerror() or strerror_l() shall leave errno unchanged, and note that, since no function return value is reserved to indicate an error, an application that wishes to check for errors should initialize errno to zero before the call, and then check errno after the call.

ERRORS

EINVAL
The value of errnum is not a valid error number.

ERANGE
Insufficient storage was supplied to contain the error description string.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strerror()

Thread safety

MT-Safe

strerrorname_np(), strerrordesc_np()

Thread safetyMT-Safe

strerror_r(), strerror_l()

Thread safetyMT-Safe

Before glibc 2.32, strerror() is not MT-Safe.

STANDARDS

strerror()
C11, POSIX.1-2008.

strerror_r()
strerror_l()
POSIX.1-2008.

strerrorname_np()
strerrordesc_np()
GNU.

POSIX.1-2001 permits strerror() to set errno if the call encounters an error, but does not specify what value should be returned as the function result in the event of an error. On some systems, strerror() returns NULL if the error number is unknown. On other systems, strerror() returns a string something like “Error nnn occurred” and sets errno to EINVAL if the error number is unknown. C99 and POSIX.1-2008 require the return value to be non-NULL.

HISTORY

strerror()
POSIX.1-2001, C89.

strerror_r()
POSIX.1-2001.

strerror_l()
glibc 2.6. POSIX.1-2008.

strerrorname_np()
strerrordesc_np()
glibc 2.32.

NOTES

strerrorname_np() and strerrordesc_np() are thread-safe and async-signal-safe.

SEE ALSO

err(3), errno(3), error(3), perror(3), strsignal(3), locale(7), signal-safety(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1677 - Linux cli command XtBuildEventMask

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtBuildEventMask and provides detailed information about the command XtBuildEventMask, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtBuildEventMask.

NAME 🖥️ XtBuildEventMask 🖥️

retrieve a widget’s event mask

SYNTAX

#include <X11/Intrinsic.h>

EventMask XtBuildEventMask(Widget w);

ARGUMENTS

  1. Specifies the widget.

DESCRIPTION

The XtBuildEventMask function returns the event mask representing the logical OR of all event masks for event handlers registered on the widget with XtAddEventHandler and all event translations, including accelerators, installed on the widget. This is the same event mask stored into the XSetWindowAttributes structure by XtRealizeWidget and sent to the server when event handlers and translations are installed or removed on the realized widget.

SEE ALSO

XtAddEventHandler(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1678 - Linux cli command key_encryptsession

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command key_encryptsession and provides detailed information about the command key_encryptsession, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the key_encryptsession.

NAME 🖥️ key_encryptsession 🖥️

interfaces to rpc keyserver daemon

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <rpc/rpc.h>
int key_decryptsession(char *remotename, des_block *deskey);
int key_encryptsession(char *remotename, des_block *deskey);
int key_gendes(des_block *deskey);
int key_setsecret(char *key);
int key_secretkey_is_set(void);

DESCRIPTION

The functions here are used within the RPC’s secure authentication mechanism (AUTH_DES). There should be no need for user programs to use this functions.

The function key_decryptsession() uses the (remote) server netname and takes the DES key for decrypting. It uses the public key of the server and the secret key associated with the effective UID of the calling process.

The function key_encryptsession() is the inverse of key_decryptsession(). It encrypts the DES keys with the public key of the server and the secret key associated with the effective UID of the calling process.

The function key_gendes() is used to ask the keyserver for a secure conversation key.

The function key_setsecret() is used to set the key for the effective UID of the calling process.

The function key_secretkey_is_set() can be used to determine whether a key has been set for the effective UID of the calling process.

RETURN VALUE

These functions return 1 on success and 0 on failure.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

key_decryptsession(), key_encryptsession(), key_gendes(), key_setsecret(), key_secretkey_is_set()

Thread safetyMT-Safe

NOTES

Note that we talk about two types of encryption here. One is asymmetric using a public and secret key. The other is symmetric, the 64-bit DES.

These routines were part of the Linux/Doors-project, abandoned by now.

SEE ALSO

crypt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1679 - Linux cli command ssize_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ssize_ttype and provides detailed information about the command ssize_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ssize_ttype.

NAME 🖥️ ssize_ttype 🖥️

count of bytes

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <stddef.h>
typedef /* ... */ size_t;
#include <sys/types.h>
typedef /* ... */ ssize_t;

DESCRIPTION

size_t
Used for a count of bytes. It is the result of the sizeof() operator. It is an unsigned integer type capable of storing values in the range [0, SIZE_MAX].

ssize_t
Used for a count of bytes or an error indication. It is a signed integer type capable of storing values at least in the range [-1, SSIZE_MAX].

Use with printf(3) and scanf(3)

size_t
The length modifier for size_t for the printf(3) and the scanf(3) families of functions is z, resulting commonly in %zu or %zx for printing size_t values.

ssize_t
glibc and most other implementations provide a length modifier for ssize_t for the printf(3) and the scanf(3) families of functions, which is z; resulting commonly in %zd or %zi for printing ssize_t values. Although z works for ssize_t on most implementations, portable POSIX programs should avoid using it—for example, by converting the value to intmax_t and using its length modifier (j).

STANDARDS

size_t
C11, POSIX.1-2008.

ssize_t
POSIX.1-2008.

HISTORY

size_t
C89, POSIX.1-2001.

ssize_t
POSIX.1-2001.

<aio.h>, <glob.h>, <grp.h>, <iconv.h>, <mqueue.h>, <pwd.h>, <signal.h>, and <sys/socket.h> define size_t since POSIX.1-2008.

<aio.h>, <mqueue.h>, and <sys/socket.h> define ssize_t since POSIX.1-2008.

NOTES

size_t
The following headers also provide size_t: <aio.h>, <glob.h>, <grp.h>, <iconv.h>, <monetary.h>, <mqueue.h>, <ndbm.h>, <pwd.h>, <regex.h>, <search.h>, <signal.h>, <stdio.h>, <stdlib.h>, <string.h>, <strings.h>, <sys/mman.h>, <sys/msg.h>, <sys/sem.h>, <sys/shm.h>, <sys/socket.h>, <sys/types.h>, <sys/uio.h>, <time.h>, <unistd.h>, <wchar.h>, and <wordexp.h>.

ssize_t
The following headers also provide ssize_t: <aio.h>, <monetary.h>, <mqueue.h>, <stdio.h>, <sys/msg.h>, <sys/socket.h>, <sys/uio.h>, and <unistd.h>.

SEE ALSO

read(2), readlink(2), readv(2), recv(2), send(2), write(2), fread(3), fwrite(3), memcmp(3), memcpy(3), memset(3), offsetof(3), ptrdiff_t(3type)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1680 - Linux cli command XtGetGC

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGetGC and provides detailed information about the command XtGetGC, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGetGC.

NAME 🖥️ XtGetGC 🖥️

obtain and destroy a sharable GC

SYNTAX

#include <X11/Intrinsic.h>

GC XtGetGC(Widget w, XtGCMask value_mask, XGCValues *values);

void XtReleaseGC(Widget w, GC gc);

ARGUMENTS

gc
Specifies the GC to be deallocated.

values
Specifies the actual values for this GC.

value_mask
Specifies which fields of the values are specified.

  1. Specifies the widget.

DESCRIPTION

The XtGetGC function returns a sharable, read-only GC. The parameters to this function are the same as those for XCreateGC except that a widget is passed instead of a display. XtGetGC shares only GCs in which all values in the GC returned by XCreateGC are the same. In particular, it does not use the value_mask provided to determine which fields of the GC a widget considers relevant. The value_mask is used only to tell the server which fields should be filled in with widget data and which it should fill in with default values. For further information about value_mask and values, see XCreateGC in the Xlib - C Language X Interface.

The XtReleaseGC function deallocate the specified shared GC.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1681 - Linux cli command Tk_Labelframepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Labelframepm and provides detailed information about the command Tk_Labelframepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Labelframepm.

NAME 🖥️ Tk_Labelframepm 🖥️

Create and manipulate Labelframe widgets

SYNOPSIS

$labelframe = $parent->Labelframe(?options?);

-borderwidth -highlightbackground -pady -cursor -highlightcolor -relief -font -highlightthickness -takefocus -foreground -padx -text

WIDGET-SPECIFIC OPTIONS

Option: -background

Name: background

Class: Background

This option is the same as the standard background option except that its value may also be specified as an empty string. In this case, the widget will display no background or border, and no colors will be consumed from its colormap for its background and border.

Option: -class

Name: class

Class: Class

Specifies a class for the window. This class will be used when querying the option database for the window’s other options, and it will also be used later for other purposes such as bindings. The class option may not be changed with the configure method.

Option: -colormap

Name: colormap

Class: Colormap

Specifies a colormap to use for the window. The value may be either new, in which case a new colormap is created for the window and its children, or the name of another window (which must be on the same screen and have the same visual as $widget), in which case the new window will use the colormap from the specified window. If the colormap option is not specified, the new window uses the same colormap as its parent. This option may not be changed with the configure method.

Option: -container

Name: container

Class: Container

The value must be a boolean. If true, it means that this window will be used as a container in which some other application will be embedded (for example, a Tk toplevel can be embedded using the -use option). The window will support the appropriate window manager protocols for things like geometry requests. The window should not have any children of its own in this application. This option may not be changed with the configure method.

Option: -height

Name: height

Class: Height

Specifies the desired height for the window in any of the forms acceptable to Tk_GetPixels. If this option is less than or equal to zero then the window will not request any size at all.

Option: -labelanchor

Name: labelAnchor

Class: LabelAnchor

Specifies where to place the label. A label is only displayed if the -text option is not the empty string. Valid values for this option are (listing them clockwise) nw, n, ne, en, e, es, se, s,sw, ws, w and wn. The default value is nw.

Option: -labelwidget

Name: labelWidget

Class: LabelWidget

Specifies a widget to use as label. This overrides any -text option. The widget must exist before being used as -labelwidget and if it is not a descendant of this window, it will be raised above it in the stacking order.

Option: -visual

Name: visual

Class: Visual

Specifies visual information for the new window in any of the forms accepted by Tk_GetVisual. If this option is not specified, the new window will use the same visual as its parent. The visual option may not be modified with the configure method.

Option: -width

Name: width

Class: Width

Specifies the desired width for the window in any of the forms acceptable to Tk_GetPixels. If this option is less than or equal to zero then the window will not request any size at all.

DESCRIPTION

The Labelframe method creates a new window (given by the $labelframe argument) and makes it into a Labelframe widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the Labelframe such as its background color and relief.

A Labelframe is a simple widget. Its primary purpose is to act as a spacer or container for complex window layouts. It has the features of a Frame plus the ability to display a label.

WIDGET METHODS

The Labelframe method may be used to invoke various operations on the widget. It has the following general form:

$widget->method(?arg arg …?);

The following methods are possible for Labelframe widgets:

$widget->cget(option);
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the Labelframe command.

$widget->configure(?option?, ?value, option, value, …?);
Query or modify the configuration options of the widget. If no option is specified, returns a list describing all of the available options for $widget (see Tk::configure for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the Labelframe command.

BINDINGS

When a new Labelframe is created, it has no default event bindings: Labelframes are not intended to be interactive.

SEE ALSO

Tk::Frame, Tk::Label

KEYWORDS

Labelframe, widget

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1682 - Linux cli command nextdown

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command nextdown and provides detailed information about the command nextdown, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the nextdown.

NAME 🖥️ nextdown 🖥️

return next floating-point number toward positive/negative infinity

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <math.h>
double nextup(double x);
float nextupf(float x);
long double nextupl(long double x);
double nextdown(double x);
float nextdownf(float x);
long double nextdownl(long double x);

DESCRIPTION

The nextup(), nextupf(), and nextupl() functions return the next representable floating-point number greater than x.

If x is the smallest representable negative number in the corresponding type, these functions return -0. If x is 0, the returned value is the smallest representable positive number of the corresponding type.

If x is positive infinity, the returned value is positive infinity. If x is negative infinity, the returned value is the largest representable finite negative number of the corresponding type.

If x is Nan, the returned value is NaN.

The value returned by nextdown(x) is -nextup(-x), and similarly for the other types.

RETURN VALUE

See DESCRIPTION.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

nextup(), nextupf(), nextupl(), nextdown(), nextdownf(), nextdownl()

Thread safetyMT-Safe

STANDARDS

These functions are described in IEEE Std 754-2008 - Standard for Floating-Point Arithmetic and ISO/IEC TS 18661.

HISTORY

glibc 2.24.

SEE ALSO

nearbyint(3), nextafter(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1683 - Linux cli command XtAppAddTimeOut

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppAddTimeOut and provides detailed information about the command XtAppAddTimeOut, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppAddTimeOut.

NAME 🖥️ XtAppAddTimeOut 🖥️

register and remove timeouts

SYNTAX

#include <X11/Intrinsic.h>

XtIntervalId XtAppAddTimeOut(XtAppContext app_context, unsigned long interval, XtTimerCallbackProc proc, XtPointer client_data);

void XtRemoveTimeOut(XtIntervalId timer);

ARGUMENTS

app_context
Specifies the application context for which the timer is to be set.

client_data
Specifies the argument that is to be passed to the specified procedure when handling the callback.

interval
Specifies the time interval in milliseconds.

proc
Specifies the procedure that is to be called when time expires.

timer
Specifies the ID for the timeout request to be destroyed.

DESCRIPTION

The XtAppAddTimeOut function creates a timeout and returns an identifier for it. The timeout value is set to interval. The callback procedure is called when the time interval elapses, and then the timeout is removed.

The XtRemoveTimeOut function removes the timeout. Note that timeouts are automatically removed once they trigger.

SEE ALSO

XtAppAddInput(3),XtAppAddSignal(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1684 - Linux cli command XtSetSelectionParameters

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtSetSelectionParameters and provides detailed information about the command XtSetSelectionParameters, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtSetSelectionParameters.

NAME 🖥️ XtSetSelectionParameters 🖥️

specify target parameters for a selection request with a single target

SYNTAX

#include <X11/Intrinsic.h>

void XtSetSelectionParameters(Widget requestor, Atom selection, Atom type, XtPointer value, unsigned long length, int format);

ARGUMENTS

requestor
Specifies the widget making the request. Must be of class Core or any subclass thereof.

selection
Specifies the atom that names the selection.

type
Specifies the type of the property in which the parameters will be passed.

value
Specifies a pointer to the parameters.

length
Specifies the number of elements containing data in value, each element of a sized indicated by format.

format
Specifies the size in bits of the data in the elements of value.

DESCRIPTION

The specified parameters will be copied and stored in a new property of the specified type and format on the requestor’s window. To initiate a selection request with a target and these parameters, a subsequent call to XtGetSelectionValue or to XtGetSelectionValueIncremental specifying the same requestor widget and selection atom will generate a ConvertSelection request referring referring to the property containing the parameters. If XtSetSelectionParameters is called more than once with the same widget and selection without a call to specify a request, the most recently specified parameters are used in the subsequent request.

The possible values of format may be 8, 16, or 32. If the format is 8, the elements of value are assumed to be sizeof(char); if 16, sizeof(short); if 32, sizeof(long).

To generate a MULTIPLE target request with parameters for any of the multiple targets of the selection request, precede individual calls to XtGetSelectionValue and XtGetSelectionValueIncremental with corresponding individual calls to XtSetSelectionParameters, and enclose these all within XtCreateSelectionRequest and XtSendSelectionRequest. XtGetSelectionValues and XtGetSelectionValuesIncremental cannot be used to make selection requests with parameterized targets.

SEE ALSO

XtGetSelectionParameters(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1685 - Linux cli command isascii

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isascii and provides detailed information about the command isascii, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isascii.

NAME 🖥️ isascii 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1686 - Linux cli command X11_Keysymspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command X11_Keysymspm and provides detailed information about the command X11_Keysymspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the X11_Keysymspm.

NAME 🖥️ X11_Keysymspm 🖥️

Perl module for names of X11 keysyms

SYNOPSIS

use X11::Keysyms %Keysyms, qw(MISCELLANY XKB_KEYS LATIN1); %Keysyms_name = reverse %Keysyms; $ks = $Keysyms{BackSpace}; $name = $Keysysms_name{$ks};

DESCRIPTION

This module exports a hash mapping the names of X11 keysyms, such as ‘A’ or ‘Linefeed’ or ‘Hangul_J_YeorinHieuh’, onto the numbers that represent them. The first argument to ‘use’ is the name of the variable the hash should be exported into, and the rest are names of subsets of the keysysms to export: one or more of

MISCELLANY, XKB_KEYS, 3270, LATIN1, LATIN2, LATIN3, LATIN4, KATAKANA, ARABIC, CYRILLIC, GREEK, TECHNICAL, SPECIAL, PUBLISHING, APL, HEBREW, THAI, KOREAN.

If this list is omitted, the list

MISCELLANY, XKB_KEYS, LATIN1, LATIN2, LATIN3, LATIN4, GREEK

is used.

AUTHOR

This module was generated semi-automatically by Stephen McCamant (<[email protected]>) from the header file ‘X11/keysymdef.h’, distributed by the X Consortium.

SEE ALSO

perl (1), X11::Protocol, X Window System Protocol (X Version 11).

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1687 - Linux cli command NetPacket_ICMPv6pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command NetPacket_ICMPv6pm and provides detailed information about the command NetPacket_ICMPv6pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the NetPacket_ICMPv6pm.

NAME 🖥️ NetPacket_ICMPv6pm 🖥️

Assemble and disassemble ICMPv6 (Internet Control Message Protocol for IPv6) packets.

VERSION

version 1.7.2

SYNOPSIS

use NetPacket::ICMPv6; $icmpv6_obj = NetPacket::ICMPv6->decode($raw_pkt); $icmpv6_pkt = NetPacket::ICMPv6->encode($ipv6_pkt); $icmpv6_data = NetPacket::ICMPv6::strip($raw_pkt);

DESCRIPTION

NetPacket::ICMPv6 provides a set of routines for assembling and disassembling packets using ICMPv6 (Internet Control Message Protocol for IPv6).

Methods

“NetPacket::ICMPv6->decode([RAW PACKET])”
Decode the raw packet data given and return an object containing instance data. This method will quite happily decode garbage input. It is the responsibility of the programmer to ensure valid packet data is passed to this method.

“NetPacket::ICMPv6->encode($ipv6_obj)”
Return an ICMPv6 packet encoded with the instance data specified. Needs parts of the IPv6 header contained in $ipv6_obj in order to calculate the ICMPv6 checksum.

Functions

“NetPacket::ICMPv6::strip([RAW PACKET])”
Return the encapsulated data (or payload) contained in the ICMPv6 packet.

Instance data

The instance data for the NetPacket::ICMPv6 object consists of the following fields.

type
The ICMPv6 message type of this packet.

code
The ICMPv6 message code of this packet.

cksum
The checksum for this packet.

data
The encapsulated data (payload) for this packet.

Exports

default
none

exportable
ICMPv6 message types: ICMPv6_UNREACH ICMPv6_TOOBIG ICMPv6_TIMXCEED ICMPv6_PARAMPROB ICMPv6_PRIVATEERROR1 ICMPv6_PRIVATEERROR2 ICMPv6_EXPANSIONERROR ICMPv6_ECHOREQ ICMPv6_ECHOREPLY ICMPv6_MULTICASTQUERY ICMPv6_MULTICASTREPORT ICMPv6_MULTICASTDONE ICMPv6_ROUTERSOLICIT ICMPv6_ROUTERADVERT ICMPv6_NEIGHBORSOLICIT ICMPv6_NEIGHBORADVERT ICMPv6_REDIRECT ICMPv6_ROUTERRENUMBER ICMPv6_NODEINFOQUERY ICMPv6_NODEINFOREPLY ICMPv6_INVNEIGHBORSOLICIT ICMPv6_INVNEIGHBORADVERT ICMPv6_MULTICASTREPORTV2 ICMPv6_HOMEAGENTREQUEST ICMPv6_HOMEAGENTREPLY ICMPv6_MOBILEPREFIXSOLICIT ICMPv6_MOBILEPREFIXADVERT ICMPv6_CERTPATHSOLICIT ICMPv6_CERTPATHADVERT ICMPv6_MULTICASTADVERT ICMPv6_MULTICASTSOLICIT ICMPv6_MULTICASTTERM ICMPv6_FMIPv6 ICMPv6_RPLCONTROL ICMPv6_DUPREQUEST ICMPv6_DUPCONFIRM ICMPv6_MPLCONTROL ICMPv6_EXTECHOREQ ICMPv6_EXTECHOREPLY ICMPv6_PRIVATEINFO1 ICMPv6_PRIVATEINFO2 ICMPv6_EXPANSIONINFO ICMPv6 message codes: ICMPv6_UNREACH_NO_ROUTE ICMPv6_UNREACH_COMM_PROHIB ICMPv6_UNREACH_BEYOND_SCOPE ICMPv6_UNREACH_ADDRESS ICMPv6_UNREACH_PORT ICMPv6_UNREACH_SRC_FAIL_POLICY ICMPv6_UNREACH_REJECT_DEST ICMPv6_TIMXCEED_INTRANS ICMPv6_TIMXCEED_REASS ICMPv6_PARAMPROB_HEADER_FIELD ICMPv6_PARAMPROB_NEXT_HEADER ICMPv6_PARAMPROB_OPTION ICMPv6_ROUTERRENUMBER_COMMAND ICMPv6_ROUTERRENUMBER_RESULT ICMPv6_ROUTERRENUMBER_RESET ICMPv6_NODEINFOQUERY_IPv6 ICMPv6_NODEINFOQUERY_NAME ICMPv6_NODEINFOQUERY_IPv4 ICMPv6_NODEINFOREPLY_SUCCESS ICMPv6_NODEINFOREPLY_REFUSED ICMPv6_NODEINFOREPLY_UNKNOWN ICMPv6_RPLCONTROL_DODAG_SOLICIT ICMPv6_RPLCONTROL_DODAG_OBJECT ICMPv6_RPLCONTROL_DEST_ADVERT ICMPv6_RPLCONTROL_DEST_ACK ICMPv6_RPLCONTROL_SECURE_DODAG_SOLICIT ICMPv6_RPLCONTROL_SECURE_DODAG_OBJECT ICMPv6_RPLCONTROL_SECURE_DEST_ADVERT ICMPv6_RPLCONTROL_SECURE_DEST_ACK ICMPv6_RPLCONTROL_CONSISTENCY ICMPv6_EXTECHOREPLY_NO_ERROR ICMPv6_EXTECHOREPLY_MALFORMED ICMPv6_EXTECHOREPLY_NO_INTERFACE ICMPv6_EXTECHOREPLY_NO_ENTRY ICMPv6_EXTECHOREPLY_MULTIPLE

tags
The following tags group together related exportable items.

“:types”

“:codes”

“:strip”

Import the strip function icmpv6_strip.

“:ALL”
All the above exportable items.

EXAMPLE

The following example prints the ICMPv6 type, code, and checksum fields.

#!/usr/bin/perl use strict; use warnings; use Net::PcapUtils; use NetPacket::Ethernet qw(:strip); use NetPacket::IPv6 qw(:strip); use NetPacket::ICMPv6; sub process_pkt { my ($user, $hdr, $pkt) = @_; my $icmpv6_obj = NetPacket::ICMPv6->decode(ipv6_strip(eth_strip($pkt))); print(“Type: $icmpv6_obj->{type} “); print(“Code: $icmpv6_obj->{code} “); print(“Checksum: $icmpv6_obj->{cksum}

“); } Net::PcapUtils::loop(\process_pkt, FILTER => icmp6);

COPYRIGHT

Copyright (c) 2018 Dan Book.

This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

AUTHOR

Dan Book <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1688 - Linux cli command XtNoticeSignal

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtNoticeSignal and provides detailed information about the command XtNoticeSignal, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtNoticeSignal.

NAME 🖥️ XtNoticeSignal 🖥️

register and remove a signal source

SYNTAX

#include <X11/Intrinsic.h>

XtSignalId XtAppAddSignal(XtAppContext app_context, XtSignalCallbackProc proc, XtPointer client_data);

void XtRemoveSignal(XtSignalId id);

void XtNoticeSignal(XtSignalId id);

ARGUMENTS

app_context
Specifies the application context.

client_data
Specifies the argument that is to be passed to the specified procedure when a signal has been raised.

id
Specifies the ID returned from the corresponding XtAppAddSignal call.

proc
Specifies the procedure that is to be called when the signal has been raised.

DESCRIPTION

The XtAppAddSignal function initiates a mechanism for handling signals within the context of the Intrinsics. Prior to establishing an operating system dependent signal handler the application may call XtAppAddSignal and store the returned id in a place accessible to the signal handler.

Upon receipt of a signal from the operating system, the application may call XtNoticeSignal passing the id returned by the call to XtAppAddSignal.

XtNoticeSignal is the only Intrinsics function that can safely be called from a signal handler. If XtNoticeSignal is called multiple times before the Intrinsics are able to invoke the registered callback, the callback is only called once. Logically the Intrinsics maintain pending for each registered callback. This flag is initially False and is set to True by XtNoticeSignal; the Intrinsics invoke the callback whenever the flag is True, and the flag is set to False just before the callback is invoked.

The XtRemoveSignal function is called to remove the specified Intrinsics signal handler. The client should disable the source of the signal before calling XtRemoveSignal.

SEE ALSO

XtAppAddTimeOut(3),XtAppAddInput(3),XtAppAddWorkProc(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1689 - Linux cli command HTML_FormatRTFpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_FormatRTFpm and provides detailed information about the command HTML_FormatRTFpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_FormatRTFpm.

NAME 🖥️ HTML_FormatRTFpm 🖥️

Format HTML as RTF

VERSION

version 2.16

SYNOPSIS

use HTML::FormatRTF; my $out_file = “test.rtf”; open(RTF, “>$out_file”) or die “Cant write-open $out_file: $! Aborting”; print RTF HTML::FormatRTF->format_file( test.html, fontname_headings => “Verdana”, ); close(RTF);

DESCRIPTION

HTML::FormatRTF is a class for objects that you use to convert HTML to RTF. There is currently no proper support for tables or forms.

This is a subclass of HTML::Formatter, whose documentation you should consult for more information on underlying methods such as new, format, format_file etc

You can specify any of the following parameters in the call to new, format_file, or format_string:

lm
Amount of extra indenting to apply to the left margin, in twips (twentieths of a point). Default is 0. So if you wanted the left margin to be an additional half inch larger, you’d set lm => 720 (since there’s 1440 twips in an inch). If you wanted it to be about 1.5cm larger, you’d set lw => 850 (since there’s about 567 twips in a centimeter).

rm
Amount of extra indenting to apply to the left margin, in twips (twentieths of a point). Default is 0.

normal_halfpoint_size
This is the size of normal text in the document, in half-points. The default value is 22, meaning that normal text is in 11 point.

header_halfpoint_size
This is the size of text used in the document’s page-header, in half-points. The default value is 17, meaning that normal text is in 7.5 point. Currently, the header consists just of “p. pagenumber” in the upper-right-hand corner, and cannot be disabled.

head1_halfpoint_size … head6_halfpoint_size
These control the font size of each heading level, in half-twips. For example, the default for head3_halfpoint_size is 25, meaning that HTML <h3>...</h3> text will be in 12.5 point text (in addition to being underlined and in the heading font).

codeblock_halfpoint_size
This controls the font size (in half-points) of the text used for <pre>...</pre> text. By default, it is 18, meaning 9 point.

fontname_body
This option controls what font is to be used for the body of the text Ω- that is, everything other than heading text and text in pre/code/tt elements. The default value is currently Times. Other handy values I can suggest using are Georgia or Bookman Old Style.

fontname_code
This option controls what font is to be used for text in pre/code/tt elements. The default value is currently Courier New.

fontname_headings
This option controls what font name is to be used for headings. You can use the same font as fontname_body, but I prefer a sans-serif font, so the default value is currently Arial. Also consider Tahoma and Verdana.

document_language
This option controls what Microsoft language number will be specified as the language for this document. The current default value is 1033, for US English. Consult an RTF reference for other language numbers.

hr_width
This option controls how many underline characters will be used for rendering a <hr> tag. Its default value is currently 50. You can usually leave this alone, but under some circumstances you might want to use a smaller or larger number.

no_prolog
If this option is set to a true value, HTML::FormatRTF will make a point of not emitting the RTF prolog before the document. By default, this is off, meaning that HTML::FormatRTF will emit the prolog. This option is of interest only to advanced users.

no_trailer
If this option is set to a true value, HTML::FormatRTF will make a point of not emitting the RTF trailer at the end of the document. By default, this is off, meaning that HTML::FormatRTF will emit the bit of RTF that ends the document. This option is of interest only to advanced users.

SEE ALSO

HTML::Formatter, RTF::Writer

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Nigel Metheringham, 2002-2005 Sean M Burke, 1999-2002 Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1690 - Linux cli command lsearch

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lsearch and provides detailed information about the command lsearch, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lsearch.

NAME 🖥️ lsearch 🖥️

linear search of an array

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <search.h>
void *lfind(const void key[.size], const void base[.size * .nmemb],
 size_t *nmemb, size_t size,
 int(*compar)(const void [.size], const void [.size]));
void *lsearch(const void key[.size], void base[.size * .nmemb],
 size_t *nmemb, size_t size,
 int(*compar)(const void [.size], const void [.size]));

DESCRIPTION

lfind() and lsearch() perform a linear search for key in the array base which has *nmemb elements of size bytes each. The comparison function referenced by compar is expected to have two arguments which point to the key object and to an array member, in that order, and which returns zero if the key object matches the array member, and nonzero otherwise.

If lsearch() does not find a matching element, then the key object is inserted at the end of the table, and *nmemb is incremented. In particular, one should know that a matching element exists, or that more room is available.

RETURN VALUE

lfind() returns a pointer to a matching member of the array, or NULL if no match is found. lsearch() returns a pointer to a matching member of the array, or to the newly added member if no match is found.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

lfind(), lsearch()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4, 4.3BSD. libc-4.6.27.

BUGS

The naming is unfortunate.

SEE ALSO

bsearch(3), hsearch(3), tsearch(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1691 - Linux cli command fminl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fminl and provides detailed information about the command fminl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fminl.

NAME 🖥️ fminl 🖥️

determine minimum of two floating-point numbers

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double fmin(double x, double y);
float fminf(float x, float y);
long double fminl(long double x, long double y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

fmin(), fminf(), fminl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions return the lesser value of x and y.

RETURN VALUE

These functions return the minimum of x and y.

If one argument is a NaN, the other argument is returned.

If both arguments are NaN, a NaN is returned.

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fmin(), fminf(), fminl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

fdim(3), fmax(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1692 - Linux cli command nfs4_uid_to_name

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command nfs4_uid_to_name and provides detailed information about the command nfs4_uid_to_name, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the nfs4_uid_to_name.

NAME 🖥️ nfs4_uid_to_name 🖥️

ID mapping routines used for NFSv4

SYNOPSIS

#include <nfs4_idmap.h>

int nfs4_init_name_mapping(char *conffile);

int nfs4_get_default_domain(char *server, char *domain, size_t len);

int nfs4_uid_to_name(uid_t uid, char *domain, char *name, size_t len);

int nfs4_uid_to_owner(uid_t uid, char *domain, char *name, size_t len);

int nfs4_gid_to_name(gid_t gid, char *domain, char *name, size_t len);

int nfs4_gid_to_owner(gid_t gid, char *domain, char *name, size_t len);

int nfs4_name_to_uid(char *name, uid_t *uid);

int nfs4_name_to_gid(char *name, gid_t *gid);

int nfs4_owner_to_uid(char *name, uid_t *uid);

int nfs4_owner_to_gid(char *name, gid_t *gid);

int nfs4_gss_princ_to_ids(char *secname, char *princ, uid_t *uid, gid_t *gid);

int nfs4_gss_princ_to_grouplist(char *secname, char *princ, gid_t *groups, int *ngroups);

int nfs4_gss_princ_to_ids_ex(char *secname, char *princ, uid_t *uid, gid_t *gid, extra_mapping_params **ex);

int nfs4_gss_princ_to_grouplist_ex(char *secname, char *princ, gid_t *groups, int *ngroups, extra_mapping_params **ex);

void nfs4_set_debug(int dbg_level, void (*logger)(const char *, …));

DESCRIPTION

NFSv4 uses names of the form user@domain. To write code that helps the kernel map uid’s (as rpc.idmapd does) or that processes NFSv4 ACLs, you need to be able to convert between NFSv4 names and local uids and gids.

The nfs4_uid_to_name() and nfs4_gid_to_name() functions, given uid or gid and domain (as a null-terminated string), write the corresponding nfsv4 name into the buffer provided in name, which must be of length at least len.

The nfs4_uid_to_owner() and nfs4_gid_to_group_owner() functions, given uid or gid and domain (as a null-terminated string), write the corresponding nfsv4 name into the buffer provided in name, which must be of length at least len. If there is no valid mapping from uid or gid to name, then the numerical string representing uid or gid is returned instead.

The nfs4_name_to_uid() and nfs4_name_to_gid() functions, given name (as a null-terminated string), return the corresponding uid or gid in the second parameter.

The nfs4_owner_to_uid() and nfs4_group_owner_to_gid() functions, given name (as a null-terminated string), return the corresponding uid or gid in the second parameter. If there is no valid mapping from name to uid or gid the value for the user or group “nobody” will be returned instead.

The nfs4_init_name_mapping() function must be called before using any of these functions. It reads defaults from the configuration file at the provided path, usually “etc/idmapd.conf”.

The domain argument to the id-to-name functions is there to provide a hint to the name mapper in the case where an id might be mapped to names in multiple domains. In most cases, this argument should just be the name returned in the domain argument to nfs4_get_default_domain() which should be called with server set to NULL. The domain should be a buffer of length len. The constant NFS4_MAX_DOMAIN_LEN may be used to determine a reasonable value for that length.

The function nfs4_get_grouplist(), given a name, fills the provided array groups with up to *ngroups group IDs corresponding to which the user name belongs to, setting *ngroups to the actual number of such groups. If the user belongs to more than *ngroups groups, then an error is returned and the actual number of groups is stored in *ngroups.

Functions nfs4_gss_princ_to_ids(), nfs4_gss_princ_to_grouplist(), nfs4_gss_princ_to_ids_ex(), and nfs4_gss_princ_to_grouplist_ex() are used to convert from a gss principal name (as returned by gss_display_name()) to a uid and gid, or list of gids.

Finally, nfs4_set_debug() allows the application to set a debugging level to produce extra debugging information from within the library. The optional logger function specifies an alternative logging function to call for the debug messages rather than the default internal function within the library.

RETURN VALUE

All functions return 0 or, in the case of error, -ERRNO.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1693 - Linux cli command IO_Compress_Brotlipm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_Compress_Brotlipm and provides detailed information about the command IO_Compress_Brotlipm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_Compress_Brotlipm.

NAME 🖥️ IO_Compress_Brotlipm 🖥️

Write Brotli buffers/streams

SYNOPSIS

use IO::Compress::Brotli; # compress a buffer my $encoded = bro $encoded; # compress a stream my $bro = IO::Compress::Brotli->create; while(have_input()) { my $block = get_input_block(); my $encoded_block = $bro->compress($block); handle_output_block($encoded_block); } # Need to finish the steam handle_output_block($bro->finish());

DESCRIPTION

IO::Compress::Brotli is a module that compressed Brotli buffers and streams. Despite its name, it is not a subclass of IO::Compress::Base and does not implement its interface. This will be rectified in a future release.

One-shot interface

If you have the whole buffer in a Perl scalar use the bro function.

bro($input)
Takes a whole uncompressed buffer as input and returns the compressed data. Exported by default.

Streaming interface

If you want to process the data in blocks use the object oriented interface. The available methods are:

IO::Compress::Brotli->create
Returns a IO::Compress::Brotli instance. Please note that a single instance cannot be used to decompress multiple streams.

$bro->window($window)
Sets the window parameter on the brotli encoder. Defaults to BROTLI_DEFAULT_WINDOW (22).

$bro->quality($quality)
Sets the quality paremeter on the brotli encoder. Defaults to BROTLI_DEFAULT_QUALITY (11).

$bro->mode($mode)
Sets the brotli encoder mode, which can be any of “generic”, “text” or “font”. Defaults to “generic”.

$bro->compress($block)
Takes the a block of uncompressed data and returns a block of compressed data. Dies on error.

$bro->flush()
Flushes any pending output from the encoder.

$bro->finish()
Tells the encoder to start the finish operation, and flushes any remaining compressed output. Once finish is called, the encoder cannot be used to compress any more content. NOTE: Calling finish is required, or the output might remain unflushed, and the be missing termination marks.

SEE ALSO

Brotli Compressed Data Format Internet-Draft: <https://www.ietf.org/id/draft-alakuijala-brotli-08.txt>

Brotli source code: <https://github.com/google/brotli/>

AUTHOR

Marius Gavrilescu, <[email protected]>

The encoder bindings, modernisation of the decoder bindings and a clean up of the overall project were contributed by:

Quim Rovira, <[email protected]>

Ævar Arnfjörð Bjarmason, <[email protected]>

Marcell Szathmári

Mattia Barbon, <[email protected]>

COPYRIGHT AND LICENSE

Copyright (C) 2015-2018 by Marius Gavrilescu

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

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1694 - Linux cli command Moose_Meta_Role_Application_RoleSummationpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Role_Application_RoleSummationpm and provides detailed information about the command Moose_Meta_Role_Application_RoleSummationpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Role_Application_RoleSummationpm.

NAME 🖥️ Moose_Meta_Role_Application_RoleSummationpm 🖥️

Combine two or more roles

VERSION

version 2.2207

DESCRIPTION

Summation composes two traits, forming the union of non-conflicting bindings and ‘disabling’ the conflicting bindings

METHODS

new

meta

role_params

get_exclusions_for_role

get_method_aliases_for_role

is_aliased_method

is_method_aliased

is_method_excluded

apply

check_role_exclusions

check_required_methods

check_required_attributes

apply_attributes

apply_methods

apply_overloading

apply_method_modifiers

apply_override_method_modifiers

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1695 - Linux cli command XtRemoveInput

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtRemoveInput and provides detailed information about the command XtRemoveInput, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtRemoveInput.

NAME 🖥️ XtRemoveInput 🖥️

register and remove an input source

SYNTAX

#include <X11/Intrinsic.h>

XtInputId XtAppAddInput(XtAppContext app_context, int source, XtPointer condition, XtInputCallbackProc proc, XtPointer client_data);

void XtRemoveInput(XtInputId id);

ARGUMENTS

app_context
Specifies the application context that identifies the application.

client_data
Specifies the argument that is to be passed to the specified procedure when input is available.

condition
Specifies the mask that indicates a read, write, or exception condition or some operating system dependent condition.

id
Specifies the ID returned from the corresponding XtAppAddInput call.

proc
Specifies the procedure that is to be called when input is available.

source
Specifies the source file descriptor on a UNIX-based system or other operating system dependent device specification.

DESCRIPTION

The XtAppAddInput function registers with the Intrinsics read routine a new source of events, which is usually file input but can also be file output. Note that file should be loosely interpreted to mean any sink or source of data. XtAppAddInput also specifies the conditions under which the source can generate events. When input is pending on this source, the callback procedure is called.

The legal values for the condition argument are operating-system dependent. On a UNIX-based system, the condition is some union of XtInputReadMask, XtInputWriteMask, and XtInputExceptMask. The XtRemoveInput function causes the Intrinsics read routine to stop watching for input from the input source.

SEE ALSO

XtAppAddTimeOut(3),XtAppAddSignal(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

BUGS

In ANSI C it is necessary to cast the condition to an XtPointer, e.g.:

XtAppAddInput(app_context,

source,
(XtPointer) (XtInputReadMask | XtInputWriteMask),
proc,
client_data);

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1696 - Linux cli command sockaddr_intype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sockaddr_intype and provides detailed information about the command sockaddr_intype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sockaddr_intype.

NAME 🖥️ sockaddr_intype 🖥️

socket address

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/socket.h>
struct sockaddr {
 sa_family_t sa_family; /* Address family */
 char sa_data[]; /* Socket address */
};
struct sockaddr_storage {
 sa_family_t ss_family; /* Address family */
};
typedef /* ... */ socklen_t;
typedef /* ... */ sa_family_t;

Internet domain sockets

#include <netinet/in.h>
struct sockaddr_in {
 sa_family_t sin_family; /* AF_INET */
 in_port_t sin_port; /* Port number */
 struct in_addr sin_addr; /* IPv4 address */
};
struct sockaddr_in6 {
 sa_family_t sin6_family; /* AF_INET6 */
 in_port_t sin6_port; /* Port number */
 uint32_t sin6_flowinfo; /* IPv6 flow info */
 struct in6_addr sin6_addr; /* IPv6 address */
 uint32_t sin6_scope_id; /* Set of interfaces for a scope */
};
struct in_addr {
 in_addr_t s_addr;
};
struct in6_addr {
 uint8_t s6_addr[16];
};
typedef uint32_t in_addr_t;
typedef uint16_t in_port_t;

UNIX domain sockets

#include <sys/un.h>
struct sockaddr_un {
 sa_family_t sun_family; /* Address family */
 char sun_path[]; /* Socket pathname */
};

DESCRIPTION

sockaddr
Describes a socket address.

sockaddr_storage
A structure at least as large as any other sockaddr_* address structures. It’s aligned so that a pointer to it can be cast as a pointer to other sockaddr_* structures and used to access its fields.

socklen_t
Describes the length of a socket address. This is an integer type of at least 32 bits.

sa_family_t
Describes a socket’s protocol family. This is an unsigned integer type.

Internet domain sockets

sockaddr_in
Describes an IPv4 Internet domain socket address. The sin_port and sin_addr members are stored in network byte order.

sockaddr_in6
Describes an IPv6 Internet domain socket address. The sin6_addr.s6_addr array is used to contain a 128-bit IPv6 address, stored in network byte order.

UNIX domain sockets

sockaddr_un
Describes a UNIX domain socket address.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

socklen_t was invented by POSIX. See also accept(2).

These structures were invented before modern ISO C strict-aliasing rules. If aliasing rules are applied strictly, these structures would be extremely difficult to use without invoking Undefined Behavior. POSIX Issue 8 will fix this by requiring that implementations make sure that these structures can be safely used as they were designed.

NOTES

socklen_t is also defined in <netdb.h>.

sa_family_t is also defined in <netinet/in.h> and <sys/un.h>.

SEE ALSO

accept(2), bind(2), connect(2), getpeername(2), getsockname(2), getsockopt(2), sendto(2), setsockopt(2), socket(2), socketpair(2), getaddrinfo(3), gethostbyaddr(3), getnameinfo(3), htonl(3), ipv6(7), socket(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1697 - Linux cli command XML_Parser_PerlSAXpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_Parser_PerlSAXpm and provides detailed information about the command XML_Parser_PerlSAXpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_Parser_PerlSAXpm.

NAME 🖥️ XML_Parser_PerlSAXpm 🖥️

Perl SAX parser using XML::Parser

SYNOPSIS

use XML::Parser::PerlSAX; $parser = XML::Parser::PerlSAX->new( [OPTIONS] ); $result = $parser->parse( [OPTIONS] ); $result = $parser->parse($string);

DESCRIPTION

XML::Parser::PerlSAX is a PerlSAX parser using the XML::Parser module. This man page summarizes the specific options, handlers, and properties supported by XML::Parser::PerlSAX; please refer to the PerlSAX standard in `PerlSAX.pod’ for general usage information.

METHODS

new
Creates a new parser object. Default options for parsing, described below, are passed as key-value pairs or as a single hash. Options may be changed directly in the parser object unless stated otherwise. Options passed to `parse()’ override the default options in the parser object for the duration of the parse.

parse
Parses a document. Options, described below, are passed as key-value pairs or as a single hash. Options passed to `parse()’ override default options in the parser object.

location
Returns the location as a hash: ColumnNumber The column number of the parse. LineNumber The line number of the parse. BytePosition The current byte position of the parse. PublicId A string containing the public identifier, or undef if none is available. SystemId A string containing the system identifier, or undef if none is available. Base The current value of the base for resolving relative URIs. ALPHA WARNING: The `SystemId’ and `PublicId’ properties returned are the system and public identifiers of the document passed to `parse()’, not the identifiers of the currently parsing external entity. The column, line, and byte positions are of the current entity being parsed.

OPTIONS

The following options are supported by XML::Parser::PerlSAX:

Handler default handler to receive events DocumentHandler handler to receive document events DTDHandler handler to receive DTD events ErrorHandler handler to receive error events EntityResolver handler to resolve entities Locale locale to provide localisation for errors Source hash containing the input source for parsing UseAttributeOrder set to true to provide AttributeOrder and Defaulted properties in `start_element()

If no handlers are provided then all events will be silently ignored, except for `fatal_error()’ which will cause a `die()’ to be called after calling `end_document()'.

If a single string argument is passed to the `parse()’ method, it is treated as if a `Source’ option was given with a `String’ parameter.

The `Source’ hash may contain the following parameters:

ByteStream The raw byte stream (file handle) containing the document. String A string containing the document. SystemId The system identifier (URI) of the document. PublicId The public identifier. Encoding A string describing the character encoding.

If more than one of `ByteStream’, `String’, or `SystemId’, then preference is given first to `ByteStream’, then `String’, then `SystemId'.

HANDLERS

The following handlers and properties are supported by XML::Parser::PerlSAX:

DocumentHandler methods

start_document
Receive notification of the beginning of a document. No properties defined.

end_document
Receive notification of the end of a document. No properties defined.

start_element
Receive notification of the beginning of an element. Name The element type name. Attributes A hash containing the attributes attached to the element, if any. The `Attributes’ hash contains only string values. If the `UseAttributeOrder’ parser option is true, the following properties are also passed to `start_element’: AttributeOrder An array of attribute names in the order they were specified, followed by the defaulted attribute names. Defaulted The index number of the first defaulted attribute in `AttributeOrder. If this index is equal to the length of `AttributeOrder, there were no defaulted values. Note to XML::Parser users: `Defaulted’ will be half the value of XML::Parser::Expat’s `specified_attr()’ function because only attribute names are provided, not their values.

end_element
Receive notification of the end of an element. Name The element type name.

characters
Receive notification of character data. Data The characters from the XML document.

processing_instruction
Receive notification of a processing instruction. Target The processing instruction target. Data The processing instruction data, if any.

comment
Receive notification of a comment. Data The comment data, if any.

start_cdata
Receive notification of the start of a CDATA section. No properties defined.

end_cdata
Receive notification of the end of a CDATA section. No properties defined.

entity_reference
Receive notification of an internal entity reference. If this handler is defined, internal entities will not be expanded and not passed to the `characters()’ handler. If this handler is not defined, internal entities will be expanded if possible and passed to the `characters()’ handler. Name The entity reference name Value The entity reference value

DTDHandler methods

notation_decl
Receive notification of a notation declaration event. Name The notation name. PublicId The notations public identifier, if any. SystemId The notations system identifier, if any. Base The base for resolving a relative URI, if any.

unparsed_entity_decl
Receive notification of an unparsed entity declaration event. Name The unparsed entitys name. SystemId The entitys system identifier. PublicId The entitys public identifier, if any. Base The base for resolving a relative URI, if any.

entity_decl
Receive notification of an entity declaration event. Name The entity name. Value The entity value, if any. PublicId The notations public identifier, if any. SystemId The notations system identifier, if any. Notation The notation declared for this entity, if any. For internal entities, the `Value’ parameter will contain the value and the `PublicId’, `SystemId’, and `Notation’ will be undefined. For external entities, the `Value’ parameter will be undefined, the `SystemId’ parameter will have the system id, the `PublicId’ parameter will have the public id if it was provided (it will be undefined otherwise), the `Notation’ parameter will contain the notation name for unparsed entities. If this is a parameter entity declaration, then a ‘%’ will be prefixed to the entity name. Note that `entity_decl()’ and `unparsed_entity_decl()’ overlap. If both methods are implemented by a handler, then this handler will not be called for unparsed entities.

element_decl
Receive notification of an element declaration event. Name The element type name. Model The content model as a string.

attlist_decl
Receive notification of an attribute list declaration event. This handler is called for each attribute in an ATTLIST declaration found in the internal subset. So an ATTLIST declaration that has multiple attributes will generate multiple calls to this handler. ElementName The element type name. AttributeName The attribute name. Type The attribute type. Fixed True if this is a fixed attribute. The default for `Type’ is the default value, which will either be #REQUIRED, #IMPLIED or a quoted string (i.e. the returned string will begin and end with a quote character).

doctype_decl
Receive notification of a DOCTYPE declaration event. Name The document type name. SystemId The documents system identifier. PublicId The documents public identifier, if any. Internal The internal subset as a string, if any. Internal will contain all whitespace, comments, processing instructions, and declarations seen in the internal subset. The declarations will be there whether or not they have been processed by another handler (except for unparsed entities processed by the Unparsed handler). However, comments and processing instructions will not appear if they’ve been processed by their respective handlers.

xml_decl
Receive notification of an XML declaration event. Version The version. Encoding The encoding string, if any. Standalone True, false, or undefined if not declared.

EntityResolver

resolve_entity
Allow the handler to resolve external entities. Name The notation name. SystemId The notations system identifier. PublicId The notations public identifier, if any. Base The base for resolving a relative URI, if any. `resolve_entity()’ should return undef to request that the parser open a regular URI connection to the system identifier or a hash describing the new input source. This hash has the same properties as the `Source’ parameter to `parse()’: PublicId The public identifier of the external entity being referenced, or undef if none was supplied. SystemId The system identifier of the external entity being referenced. String String containing XML text ByteStream An open file handle. CharacterStream An open file handle. Encoding The character encoding, if known.

AUTHOR

Ken MacLeod, [email protected]

SEE ALSO

perl (1), PerlSAX.pod (3)

Extensible Markup Language (XML) <http://www.w3c.org/XML/> SAX 1.0: The Simple API for XML <http://www.megginson.com/SAX/>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1698 - Linux cli command pathconf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pathconf and provides detailed information about the command pathconf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pathconf.

NAME 🖥️ pathconf 🖥️

get configuration values for files

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
long fpathconf(int fd, int name);
long pathconf(const char *path, int name);

DESCRIPTION

fpathconf() gets a value for the configuration option name for the open file descriptor fd.

pathconf() gets a value for configuration option name for the filename path.

The corresponding macros defined in <unistd.h> are minimum values; if an application wants to take advantage of values which may change, a call to fpathconf() or pathconf() can be made, which may yield more liberal results.

Setting name equal to one of the following constants returns the following configuration options:

_PC_LINK_MAX
The maximum number of links to the file. If fd or path refer to a directory, then the value applies to the whole directory. The corresponding macro is _POSIX_LINK_MAX.

_PC_MAX_CANON
The maximum length of a formatted input line, where fd or path must refer to a terminal. The corresponding macro is _POSIX_MAX_CANON.

_PC_MAX_INPUT
The maximum length of an input line, where fd or path must refer to a terminal. The corresponding macro is _POSIX_MAX_INPUT.

_PC_NAME_MAX
The maximum length of a filename in the directory path or fd that the process is allowed to create. The corresponding macro is _POSIX_NAME_MAX.

_PC_PATH_MAX
The maximum length of a relative pathname when path or fd is the current working directory. The corresponding macro is _POSIX_PATH_MAX.

_PC_PIPE_BUF
The maximum number of bytes that can be written atomically to a pipe of FIFO. For fpathconf(), fd should refer to a pipe or FIFO. For fpathconf(), path should refer to a FIFO or a directory; in the latter case, the returned value corresponds to FIFOs created in that directory. The corresponding macro is _POSIX_PIPE_BUF.

_PC_CHOWN_RESTRICTED
This returns a positive value if the use of chown(2) and fchown(2) for changing a file’s user ID is restricted to a process with appropriate privileges, and changing a file’s group ID to a value other than the process’s effective group ID or one of its supplementary group IDs is restricted to a process with appropriate privileges. According to POSIX.1, this variable shall always be defined with a value other than -1. The corresponding macro is _POSIX_CHOWN_RESTRICTED.

If fd or path refers to a directory, then the return value applies to all files in that directory.

_PC_NO_TRUNC
This returns nonzero if accessing filenames longer than _POSIX_NAME_MAX generates an error. The corresponding macro is _POSIX_NO_TRUNC.

_PC_VDISABLE
This returns nonzero if special character processing can be disabled, where fd or path must refer to a terminal.

RETURN VALUE

The return value of these functions is one of the following:

  • On error, -1 is returned and errno is set to indicate the error (for example, EINVAL, indicating that name is invalid).

  • If name corresponds to a maximum or minimum limit, and that limit is indeterminate, -1 is returned and errno is not changed. (To distinguish an indeterminate limit from an error, set errno to zero before the call, and then check whether errno is nonzero when -1 is returned.)

  • If name corresponds to an option, a positive value is returned if the option is supported, and -1 is returned if the option is not supported.

  • Otherwise, the current value of the option or limit is returned. This value will not be more restrictive than the corresponding value that was described to the application in <unistd.h> or <limits.h> when the application was compiled.

ERRORS

EACCES
(pathconf()) Search permission is denied for one of the directories in the path prefix of path.

EBADF
(fpathconf()) fd is not a valid file descriptor.

EINVAL
name is invalid.

EINVAL
The implementation does not support an association of name with the specified file.

ELOOP
(pathconf()) Too many symbolic links were encountered while resolving path.

ENAMETOOLONG
(pathconf()) path is too long.

ENOENT
(pathconf()) A component of path does not exist, or path is an empty string.

ENOTDIR
(pathconf()) A component used as a directory in path is not in fact a directory.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fpathconf(), pathconf()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

Files with name lengths longer than the value returned for name equal to _PC_NAME_MAX may exist in the given directory.

Some returned values may be huge; they are not suitable for allocating memory.

SEE ALSO

getconf(1), open(2), statfs(2), confstr(3), sysconf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1699 - Linux cli command printf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command printf and provides detailed information about the command printf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the printf.

NAME 🖥️ printf 🖥️

formatted output conversion

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int printf(const char *restrict format, ...);
int fprintf(FILE *restrict stream,
 const char *restrict format, ...);
int dprintf(int fd,
 const char *restrict format, ...);
int sprintf(char *restrict str,
 const char *restrict format, ...);
int snprintf(char str[restrict .size], size_t size,
 const char *restrict format, ...);
int vprintf(const char *restrict format, va_list ap);
int vfprintf(FILE *restrict stream,
 const char *restrict format, va_list ap);
int vdprintf(int fd,
 const char *restrict format, va_list ap);
int vsprintf(char *restrict str,
 const char *restrict format, va_list ap);
int vsnprintf(char str[restrict .size], size_t size,
 const char *restrict format, va_list ap);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

snprintf(), vsnprintf():

    _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE

dprintf(), vdprintf():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The functions in the printf() family produce output according to a format as described below. The functions printf() and vprintf() write output to stdout, the standard output stream; fprintf() and vfprintf() write output to the given output stream; sprintf(), snprintf(), vsprintf(), and vsnprintf() write to the character string str.

The function dprintf() is the same as fprintf() except that it outputs to a file descriptor, fd, instead of to a stdio(3) stream.

The functions snprintf() and vsnprintf() write at most size bytes (including the terminating null byte (‘�’)) to str.

The functions vprintf(), vfprintf(), vdprintf(), vsprintf(), vsnprintf() are equivalent to the functions printf(), fprintf(), dprintf(), sprintf(), snprintf(), respectively, except that they are called with a va_list instead of a variable number of arguments. These functions do not call the va_end macro. Because they invoke the va_arg macro, the value of ap is undefined after the call. See stdarg(3).

All of these functions write the output under the control of a format string that specifies how subsequent arguments (or arguments accessed via the variable-length argument facilities of stdarg(3)) are converted for output.

C99 and POSIX.1-2001 specify that the results are undefined if a call to sprintf(), snprintf(), vsprintf(), or vsnprintf() would cause copying to take place between objects that overlap (e.g., if the target string array and one of the supplied input arguments refer to the same buffer). See CAVEATS.

Format of the format string

The format string is a character string, beginning and ending in its initial shift state, if any. The format string is composed of zero or more directives: ordinary characters (not %), which are copied unchanged to the output stream; and conversion specifications, each of which results in fetching zero or more subsequent arguments. Each conversion specification is introduced by the character %, and ends with a conversion specifier. In between there may be (in this order) zero or more flags, an optional minimum field width, an optional precision and an optional length modifier.

The overall syntax of a conversion specification is:

%[$][flags][width][.precision][length modifier]conversion

The arguments must correspond properly (after type promotion) with the conversion specifier. By default, the arguments are used in the order given, where each ‘*’ (see Field width and Precision below) and each conversion specifier asks for the next argument (and it is an error if insufficiently many arguments are given). One can also specify explicitly which argument is taken, at each place where an argument is required, by writing “%m$” instead of ‘%’ and “*m$” instead of ‘*’, where the decimal integer m denotes the position in the argument list of the desired argument, indexed starting from 1. Thus,

printf("%*d", width, num);

and

printf("%2$*1$d", width, num);

are equivalent. The second style allows repeated references to the same argument. The C99 standard does not include the style using ‘$’, which comes from the Single UNIX Specification. If the style using ‘$’ is used, it must be used throughout for all conversions taking an argument and all width and precision arguments, but it may be mixed with “%%” formats, which do not consume an argument. There may be no gaps in the numbers of arguments specified using ‘$’; for example, if arguments 1 and 3 are specified, argument 2 must also be specified somewhere in the format string.

For some numeric conversions a radix character (“decimal point”) or thousands’ grouping character is used. The actual character used depends on the LC_NUMERIC part of the locale. (See setlocale(3).) The POSIX locale uses ‘.’ as radix character, and does not have a grouping character. Thus,

printf("%'.2f", 1234567.89);

results in “1234567.89” in the POSIX locale, in “1234567,89” in the nl_NL locale, and in “1.234.567,89” in the da_DK locale.

Flag characters

The character % is followed by zero or more of the following flags:

#
The value should be converted to an “alternate form”. For o conversions, the first character of the output string is made zero (by prefixing a 0 if it was not zero already). For x and X conversions, a nonzero result has the string “0x” (or “0X” for X conversions) prepended to it. For a, A, e, E, f, F, g, and G conversions, the result will always contain a decimal point, even if no digits follow it (normally, a decimal point appears in the results of those conversions only if a digit follows). For g and G conversions, trailing zeros are not removed from the result as they would otherwise be. For m, if errno contains a valid error code, the output of strerrorname_np(errno) is printed; otherwise, the value stored in errno is printed as a decimal number. For other conversions, the result is undefined.

0
The value should be zero padded. For d, i, o, u, x, X, a, A, e, E, f, F, g, and G conversions, the converted value is padded on the left with zeros rather than blanks. If the 0 and - flags both appear, the 0 flag is ignored. If a precision is given with an integer conversion (d, i, o, u, x, and X), the 0 flag is ignored. For other conversions, the behavior is undefined.

-
The converted value is to be left adjusted on the field boundary. (The default is right justification.) The converted value is padded on the right with blanks, rather than on the left with blanks or zeros. A - overrides a 0 if both are given.

’ ‘
(a space) A blank should be left before a positive number (or empty string) produced by a signed conversion.

+
A sign (+ or -) should always be placed before a number produced by a signed conversion. By default, a sign is used only for negative numbers. A + overrides a space if both are used.

The five flag characters above are defined in the C99 standard. The Single UNIX Specification specifies one further flag character.


For decimal conversion (i, d, u, f, F, g, G) the output is to be grouped with thousands’ grouping characters if the locale information indicates any. (See setlocale(3).) Note that many versions of gcc(1) cannot parse this option and will issue a warning. (SUSv2 did not include %‘F, but SUSv3 added it.) Note also that the default locale of a C program is “C” whose locale information indicates no thousands’ grouping character. Therefore, without a prior call to setlocale(3), no thousands’ grouping characters will be printed.

glibc 2.2 adds one further flag character.

I
For decimal integer conversion (i, d, u) the output uses the locale’s alternative output digits, if any. For example, since glibc 2.2.3 this will give Arabic-Indic digits in the Persian (“fa_IR”) locale.

Field width

An optional decimal digit string (with nonzero first digit) specifying a minimum field width. If the converted value has fewer characters than the field width, it will be padded with spaces on the left (or right, if the left-adjustment flag has been given). Instead of a decimal digit string one may write “*” or “*m$” (for some decimal integer m) to specify that the field width is given in the next argument, or in the m-th argument, respectively, which must be of type int. A negative field width is taken as a ‘-’ flag followed by a positive field width. In no case does a nonexistent or small field width cause truncation of a field; if the result of a conversion is wider than the field width, the field is expanded to contain the conversion result.

Precision

An optional precision, in the form of a period (’.’) followed by an optional decimal digit string. Instead of a decimal digit string one may write “*” or “*m$” (for some decimal integer m) to specify that the precision is given in the next argument, or in the m-th argument, respectively, which must be of type int. If the precision is given as just ‘.’, the precision is taken to be zero. A negative precision is taken as if the precision were omitted. This gives the minimum number of digits to appear for d, i, o, u, x, and X conversions, the number of digits to appear after the radix character for a, A, e, E, f, and F conversions, the maximum number of significant digits for g and G conversions, or the maximum number of characters to be printed from a string for s and S conversions.

Length modifier

Here, “integer conversion” stands for d, i, o, u, x, or X conversion.

hh
A following integer conversion corresponds to a signed char or unsigned char argument, or a following n conversion corresponds to a pointer to a signed char argument.

h
A following integer conversion corresponds to a short or unsigned short argument, or a following n conversion corresponds to a pointer to a short argument.

l
(ell) A following integer conversion corresponds to a long or unsigned long argument, or a following n conversion corresponds to a pointer to a long argument, or a following c conversion corresponds to a wint_t argument, or a following s conversion corresponds to a pointer to wchar_t argument. On a following a, A, e, E, f, F, g, or G conversion, this length modifier is ignored (C99; not in SUSv2).

ll
(ell-ell). A following integer conversion corresponds to a long long or unsigned long long argument, or a following n conversion corresponds to a pointer to a long long argument.

q
A synonym for ll. This is a nonstandard extension, derived from BSD; avoid its use in new code.

L
A following a, A, e, E, f, F, g, or G conversion corresponds to a long double argument. (C99 allows %LF, but SUSv2 does not.)

j
A following integer conversion corresponds to an intmax_t or uintmax_t argument, or a following n conversion corresponds to a pointer to an intmax_t argument.

z
A following integer conversion corresponds to a size_t or ssize_t argument, or a following n conversion corresponds to a pointer to a size_t argument.

Z
A nonstandard synonym for z that predates the appearance of z. Do not use in new code.

t
A following integer conversion corresponds to a ptrdiff_t argument, or a following n conversion corresponds to a pointer to a ptrdiff_t argument.

SUSv3 specifies all of the above, except for those modifiers explicitly noted as being nonstandard extensions. SUSv2 specified only the length modifiers h (in hd, hi, ho, hx, hX, hn) and l (in ld, li, lo, lx, lX, ln, lc, ls) and L (in Le, LE, Lf, Lg, LG).

As a nonstandard extension, the GNU implementations treats ll and L as synonyms, so that one can, for example, write llg (as a synonym for the standards-compliant Lg) and Ld (as a synonym for the standards compliant lld). Such usage is nonportable.

Conversion specifiers

A character that specifies the type of conversion to be applied. The conversion specifiers and their meanings are:

d, i
The int argument is converted to signed decimal notation. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.

o, u, x, X
The unsigned int argument is converted to unsigned octal (o), unsigned decimal (u), or unsigned hexadecimal (x and X) notation. The letters abcdef are used for x conversions; the letters ABCDEF are used for X conversions. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.

e, E
The double argument is rounded and converted in the style [-]d**.ddde**±dd where there is one digit (which is nonzero if the argument is nonzero) before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero, no decimal-point character appears. An E conversion uses the letter E (rather than e) to introduce the exponent. The exponent always contains at least two digits; if the value is zero, the exponent is 00.

f, F
The double argument is rounded and converted to decimal notation in the style [-]ddd**.**ddd, where the number of digits after the decimal-point character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. If a decimal point appears, at least one digit appears before it.

(SUSv2 does not know about F and says that character string representations for infinity and NaN may be made available. SUSv3 adds a specification for F. The C99 standard specifies “[-]inf” or “[-]infinity” for infinity, and a string starting with “nan” for NaN, in the case of f conversion, and “[-]INF” or “[-]INFINITY” or “NAN” in the case of F conversion.)

g, G
The double argument is converted in style f or e (or F or E for G conversions). The precision specifies the number of significant digits. If the precision is missing, 6 digits are given; if the precision is zero, it is treated as 1. Style e is used if the exponent from its conversion is less than -4 or greater than or equal to the precision. Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit.

a, A
(C99; not in SUSv2, but added in SUSv3) For a conversion, the double argument is converted to hexadecimal notation (using the letters abcdef) in the style [-]0xh**.hhhhp**±d; for A conversion the prefix 0X, the letters ABCDEF, and the exponent separator P is used. There is one hexadecimal digit before the decimal point, and the number of digits after it is equal to the precision. The default precision suffices for an exact representation of the value if an exact representation in base 2 exists and otherwise is sufficiently large to distinguish values of type double. The digit before the decimal point is unspecified for nonnormalized numbers, and nonzero but otherwise unspecified for normalized numbers. The exponent always contains at least one digit; if the value is zero, the exponent is 0.

c
If no l modifier is present, the int argument is converted to an unsigned char, and the resulting character is written. If an l modifier is present, the wint_t (wide character) argument is converted to a multibyte sequence by a call to the wcrtomb(3) function, with a conversion state starting in the initial state, and the resulting multibyte string is written.

s
If no l modifier is present: the const char * argument is expected to be a pointer to an array of character type (pointer to a string). Characters from the array are written up to (but not including) a terminating null byte (‘�’); if a precision is specified, no more than the number specified are written. If a precision is given, no null byte need be present; if the precision is not specified, or is greater than the size of the array, the array must contain a terminating null byte.

If an l modifier is present: the const wchar_t * argument is expected to be a pointer to an array of wide characters. Wide characters from the array are converted to multibyte characters (each by a call to the wcrtomb(3) function, with a conversion state starting in the initial state before the first wide character), up to and including a terminating null wide character. The resulting multibyte characters are written up to (but not including) the terminating null byte. If a precision is specified, no more bytes than the number specified are written, but no partial multibyte characters are written. Note that the precision determines the number of bytes written, not the number of wide characters or screen positions. The array must contain a terminating null wide character, unless a precision is given and it is so small that the number of bytes written exceeds it before the end of the array is reached.

C
(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.) Synonym for lc. Don’t use.

S
(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.) Synonym for ls. Don’t use.

p
The void * pointer argument is printed in hexadecimal (as if by %#x or %#lx).

n
The number of characters written so far is stored into the integer pointed to by the corresponding argument. That argument shall be an int *, or variant whose size matches the (optionally) supplied integer length modifier. No argument is converted. (This specifier is not supported by the bionic C library.) The behavior is undefined if the conversion specification includes any flags, a field width, or a precision.

m
(glibc extension; supported by uClibc and musl.) Print output of strerror(errno) (or strerrorname_np(errno) in the alternate form). No argument is required.

%
A ‘%’ is written. No argument is converted. The complete conversion specification is ‘%%’.

RETURN VALUE

Upon successful return, these functions return the number of bytes printed (excluding the null byte used to end output to strings).

The functions snprintf() and vsnprintf() do not write more than size bytes (including the terminating null byte (‘�’)). If the output was truncated due to this limit, then the return value is the number of characters (excluding the terminating null byte) which would have been written to the final string if enough space had been available. Thus, a return value of size or more means that the output was truncated. (See also below under CAVEATS.)

If an output error is encountered, a negative value is returned.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

printf(), fprintf(), sprintf(), snprintf(), vprintf(), vfprintf(), vsprintf(), vsnprintf()

Thread safetyMT-Safe locale

STANDARDS

fprintf()
printf()
sprintf()
vprintf()
vfprintf()
vsprintf()
snprintf()
vsnprintf()
C11, POSIX.1-2008.

dprintf()
vdprintf()
GNU, POSIX.1-2008.

HISTORY

fprintf()
printf()
sprintf()
vprintf()
vfprintf()
vsprintf()
C89, POSIX.1-2001.

snprintf()
vsnprintf()
SUSv2, C99, POSIX.1-2001.

Concerning the return value of snprintf(), SUSv2 and C99 contradict each other: when snprintf() is called with size=0 then SUSv2 stipulates an unspecified return value less than 1, while C99 allows str to be NULL in this case, and gives the return value (as always) as the number of characters that would have been written in case the output string has been large enough. POSIX.1-2001 and later align their specification of snprintf() with C99.

dprintf()
vdprintf()
GNU, POSIX.1-2008.

glibc 2.1 adds length modifiers hh, j, t, and z and conversion characters a and A.

glibc 2.2 adds the conversion character F with C99 semantics, and the flag character I.

glibc 2.35 gives a meaning to the alternate form (#) of the m conversion specifier, that is %#m.

CAVEATS

Some programs imprudently rely on code such as the following

sprintf(buf, "%s some further text", buf);

to append text to buf. However, the standards explicitly note that the results are undefined if source and destination buffers overlap when calling sprintf(), snprintf(), vsprintf(), and vsnprintf(). Depending on the version of gcc(1) used, and the compiler options employed, calls such as the above will not produce the expected results.

The glibc implementation of the functions snprintf() and vsnprintf() conforms to the C99 standard, that is, behaves as described above, since glibc 2.1. Until glibc 2.0.6, they would return -1 when the output was truncated.

BUGS

Because sprintf() and vsprintf() assume an arbitrarily long string, callers must be careful not to overflow the actual space; this is often impossible to assure. Note that the length of the strings produced is locale-dependent and difficult to predict. Use snprintf() and vsnprintf() instead (or asprintf(3) and vasprintf(3)).

Code such as printf(foo); often indicates a bug, since foo may contain a % character. If foo comes from untrusted user input, it may contain %n, causing the printf() call to write to memory and creating a security hole.

EXAMPLES

To print Pi to five decimal places:

#include <math.h>
#include <stdio.h>
fprintf(stdout, "pi = %.5f

“, 4 * atan(1.0));

To print a date and time in the form “Sunday, July 3, 10:02”, where weekday and month are pointers to strings:

#include <stdio.h>
fprintf(stdout, "%s, %s %d, %.2d:%.2d

“, weekday, month, day, hour, min);

Many countries use the day-month-year order. Hence, an internationalized version must be able to print the arguments in an order specified by the format:

#include <stdio.h>
fprintf(stdout, format,
        weekday, month, day, hour, min);

where format depends on locale, and may permute the arguments. With the value:

"%1$s, %3$d. %2$s, %4$d:%5$.2d

"

one might obtain “Sonntag, 3. Juli, 10:02”.

To allocate a sufficiently large string and print into it (code correct for both glibc 2.0 and glibc 2.1):

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
char *
make_message(const char *fmt, ...)
{
    int n = 0;
    size_t size = 0;
    char *p = NULL;
    va_list ap;
    /* Determine required size. */
    va_start(ap, fmt);
    n = vsnprintf(p, size, fmt, ap);
    va_end(ap);
    if (n < 0)
        return NULL;
    size = (size_t) n + 1;      /* One extra byte for '' */
    p = malloc(size);
    if (p == NULL)
        return NULL;
    va_start(ap, fmt);
    n = vsnprintf(p, size, fmt, ap);
    va_end(ap);
    if (n < 0) {
        free(p);
        return NULL;
    }
    return p;
}

If truncation occurs in glibc versions prior to glibc 2.0.6, this is treated as an error instead of being handled gracefully.

SEE ALSO

printf(1), asprintf(3), puts(3), scanf(3), setlocale(3), strfromd(3), wcrtomb(3), wprintf(3), locale(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1700 - Linux cli command pthread_attr_setstacksize

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_attr_setstacksize and provides detailed information about the command pthread_attr_setstacksize, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_attr_setstacksize.

NAME 🖥️ pthread_attr_setstacksize 🖥️

set/get stack size attribute in thread attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_attr_setstacksize(pthread_attr_t *attr",size_t"stacksize);
int pthread_attr_getstacksize(const pthread_attr_t *restrict attr,
 size_t *restrict stacksize);

DESCRIPTION

The pthread_attr_setstacksize() function sets the stack size attribute of the thread attributes object referred to by attr to the value specified in stacksize.

The stack size attribute determines the minimum size (in bytes) that will be allocated for threads created using the thread attributes object attr.

The pthread_attr_getstacksize() function returns the stack size attribute of the thread attributes object referred to by attr in the buffer pointed to by stacksize.

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

pthread_attr_setstacksize() can fail with the following error:

EINVAL
The stack size is less than PTHREAD_STACK_MIN (16384) bytes.

On some systems, pthread_attr_setstacksize() can fail with the error EINVAL if stacksize is not a multiple of the system page size.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_attr_setstacksize(), pthread_attr_getstacksize()

Thread safetyMT-Safe

VERSIONS

These functions are provided since glibc 2.1.

STANDARDS

POSIX.1-2001, POSIX.1-2008.

NOTES

For details on the default stack size of new threads, see pthread_create(3).

A thread’s stack size is fixed at the time of thread creation. Only the main thread can dynamically grow its stack.

The pthread_attr_setstack(3) function allows an application to set both the size and location of a caller-allocated stack that is to be used by a thread.

BUGS

As at glibc 2.8, if the specified stacksize is not a multiple of STACK_ALIGN (16 bytes on most architectures), it may be rounded downward, in violation of POSIX.1, which says that the allocated stack will be at least stacksize bytes.

EXAMPLES

See pthread_create(3).

SEE ALSO

getrlimit(2), pthread_attr_init(3), pthread_attr_setguardsize(3), pthread_attr_setstack(3), pthread_create(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1701 - Linux cli command HTML_Form_FileInputpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_Form_FileInputpm and provides detailed information about the command HTML_Form_FileInputpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_Form_FileInputpm.

NAME 🖥️ HTML_Form_FileInputpm 🖥️

An HTML form file input element for use with HTML::Form

VERSION

version 6.11

AUTHOR

Gisle Aas <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 1998 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1702 - Linux cli command Net_DNS_RR_OPTpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_OPTpm and provides detailed information about the command Net_DNS_RR_OPTpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_OPTpm.

NAME 🖥️ Net_DNS_RR_OPTpm 🖥️

DNS OPT resource record

SYNOPSIS

use Net::DNS; my $packet = Net::DNS::Packet->new( … ); $packet->header->do(1); # extended header flag $packet->edns->UDPsize(1232); # UDP payload size $packet->edns->option( NSID => {OPTION-DATA => rawbytes} ); $packet->edns->option( DAU => [8, 10, 13, 14, 15, 16] ); $packet->edns->option( TCP-KEEPALIVE => 200 ); $packet->edns->option( EXTENDED-ERROR => {INFO-CODE => 123} ); $packet->edns->option( 65023 => {BASE16 => 076578616d706c6500} ); $packet->edns->print; ;; { “EDNS-VERSION”: 0, ;; “FLAGS”: “8000”, ;; “RCODE”: 0, ;; “UDPSIZE”: 1232, ;; “OPTIONS”: [ ;; {“NSID”: “7261776279746573”}, ;; {“DAU”: [ 8, 10, 13, 14, 15, 16 ]}, ;; {“TCP-KEEPALIVE”: {“TIMEOUT”: 200}}, ;; {“EXTENDED-ERROR”: {“INFO-CODE”: 123, “EXTRA-TEXT”: “”}}, ;; {“65023”: {“BASE16”: “076578616d706c6500”}} ] ;; }

DESCRIPTION

EDNS OPT pseudo resource record.

The OPT record supports EDNS protocol extensions and is not intended to be created, accessed or modified directly by user applications.

All EDNS features are performed indirectly by operations on the objects returned by the $packet->header and $packet->edns creator methods. The underlying mechanisms are, or should be, entirely hidden from the user.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

version

$version = $packet->edns->version;

The version of EDNS supported by this OPT record.

UDPsize

$size = $packet->edns->UDPsize; $packet->edns->UDPsize($size);

UDPsize() advertises the maximum size (octets) of UDP packet that can be reassembled in the network stack of the originating host.

rcode

$extended_rcode = $packet->header->rcode;

The 12 bit extended RCODE. The most significant 8 bits are obtained from the OPT record. The least significant 4 bits reside in the packet header.

flags

$do = $packet->header->do; $packet->header->do(1); $edns_flags = $packet->edns->flags;

16 bit field containing EDNS extended header flags.

options, option

my @option = $packet->edns->options;

When called in a list context, options() returns a list of option codes found in the OPT record.

my $octets = $packet->edns->option(COOKIE); my $base16 = unpack H*, $octets; $packet->edns->option( COOKIE => {OPTION-DATA => $octets} ); $packet->edns->option( 10 => {BASE16 => $base16} );

When called in a scalar context with a single argument, option() returns the uninterpreted octet string corresponding to the specified option. The method returns undef if the option is absent.

Options can be added or replaced by providing the (name => value) pair. The option is deleted if the value is undefined.

When called in a list context with a single argument, option() returns a structured representation of the option value.

For example:

my ($structure) = $packet->edns->option(DAU); my @algorithms = @$structure; my ($structure) = $packet->edns->option(15); my $info_code = $$structure{INFO-CODE}; my $extra_text = $$structure{EXTRA-TEXT};

Similar forms of array or hash syntax may be used to construct the option value:

$packet->edns->option( DAU => [8, 10, 13, 14, 15, 16] ); $packet->edns->option( EXTENDED-ERROR => {INFO-CODE => 123, EXTRA-TEXT => “”} );

COPYRIGHT

Copyright (c)2001,2002 RIPE NCC. Author Olaf M. Kolkman.

Portions Copyright (c)2012,2017-2023 Dick Franks.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC6891 <https://tools.ietf.org/html/rfc6891> RFC3225 <https://tools.ietf.org/html/rfc3225>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1703 - Linux cli command lockf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lockf and provides detailed information about the command lockf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lockf.

NAME 🖥️ lockf 🖥️

apply, test or remove a POSIX lock on an open file

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
int lockf(int fd, int op, off_t len);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

lockf():

    _XOPEN_SOURCE >= 500
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

Apply, test, or remove a POSIX lock on a section of an open file. The file is specified by fd, a file descriptor open for writing, the action by op, and the section consists of byte positions pos..pos+len-1 if len is positive, and pos-len..pos-1 if len is negative, where pos is the current file position, and if len is zero, the section extends from the current file position to infinity, encompassing the present and future end-of-file positions. In all cases, the section may extend past current end-of-file.

On Linux, lockf() is just an interface on top of fcntl(2) locking. Many other systems implement lockf() in this way, but note that POSIX.1 leaves the relationship between lockf() and fcntl(2) locks unspecified. A portable application should probably avoid mixing calls to these interfaces.

Valid operations are given below:

F_LOCK
Set an exclusive lock on the specified section of the file. If (part of) this section is already locked, the call blocks until the previous lock is released. If this section overlaps an earlier locked section, both are merged. File locks are released as soon as the process holding the locks closes some file descriptor for the file. A child process does not inherit these locks.

F_TLOCK
Same as F_LOCK but the call never blocks and returns an error instead if the file is already locked.

F_ULOCK
Unlock the indicated section of the file. This may cause a locked section to be split into two locked sections.

F_TEST
Test the lock: return 0 if the specified section is unlocked or locked by this process; return -1, set errno to EAGAIN (EACCES on some other systems), if another process holds a lock.

RETURN VALUE

On success, zero is returned. On error, -1 is returned, and errno is set to indicate the error.

ERRORS

EACCES or EAGAIN
The file is locked and F_TLOCK or F_TEST was specified, or the operation is prohibited because the file has been memory-mapped by another process.

EBADF
fd is not an open file descriptor; or op is F_LOCK or F_TLOCK and fd is not a writable file descriptor.

EDEADLK
op was F_LOCK and this lock operation would cause a deadlock.

EINTR
While waiting to acquire a lock, the call was interrupted by delivery of a signal caught by a handler; see signal(7).

EINVAL
An invalid operation was specified in op.

ENOLCK
Too many segment locks open, lock table is full.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

lockf()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4.

SEE ALSO

fcntl(2), flock(2)

locks.txt and mandatory-locking.txt in the Linux kernel source directory Documentation/filesystems (on older kernels, these files are directly under the Documentation directory, and mandatory-locking.txt is called mandatory.txt)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1704 - Linux cli command Spreadsheet_WriteExcel_Chart_Linepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_WriteExcel_Chart_Linepm and provides detailed information about the command Spreadsheet_WriteExcel_Chart_Linepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_WriteExcel_Chart_Linepm.

NAME 🖥️ Spreadsheet_WriteExcel_Chart_Linepm 🖥️

A writer class for Excel Line charts.

SYNOPSIS

To create a simple Excel file with a Line chart using Spreadsheet::WriteExcel:

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( chart.xls ); my $worksheet = $workbook->add_worksheet(); my $chart = $workbook->add_chart( type => line ); # Configure the chart. $chart->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, ); # Add the worksheet data the chart refers to. my $data = [ [ Category, 2, 3, 4, 5, 6, 7 ], [ Value, 1, 4, 5, 2, 1, 5 ], ]; $worksheet->write( A1, $data ); _ _END_ _

DESCRIPTION

This module implements Line charts for Spreadsheet::WriteExcel. The chart object is created via the Workbook add_chart() method:

my $chart = $workbook->add_chart( type => line );

Once the object is created it can be configured via the following methods that are common to all chart classes:

$chart->add_series(); $chart->set_x_axis(); $chart->set_y_axis(); $chart->set_title();

These methods are explained in detail in Spreadsheet::WriteExcel::Chart. Class specific methods or settings, if any, are explained below.

Line Chart Methods

There aren’t currently any line chart specific methods. See the TODO section of Spreadsheet::WriteExcel::Chart.

EXAMPLE

Here is a complete example that demonstrates most of the available features when creating a chart.

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( chart_line.xls ); my $worksheet = $workbook->add_worksheet(); my $bold = $workbook->add_format( bold => 1 ); # Add the worksheet data that the charts will refer to. my $headings = [ Number, Sample 1, Sample 2 ]; my $data = [ [ 2, 3, 4, 5, 6, 7 ], [ 1, 4, 5, 2, 1, 5 ], [ 3, 6, 7, 5, 4, 3 ], ]; $worksheet->write( A1, $headings, $bold ); $worksheet->write( A2, $data ); # Create a new chart object. In this case an embedded chart. my $chart = $workbook->add_chart( type => line, embedded => 1 ); # Configure the first series. (Sample 1) $chart->add_series( name => Sample 1, categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, ); # Configure the second series. (Sample 2) $chart->add_series( name => Sample 2, categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$C$2:$C$7, ); # Add a chart title and some axis labels. $chart->set_title ( name => Results of sample analysis ); $chart->set_x_axis( name => Test number ); $chart->set_y_axis( name => Sample length (cm) ); # Insert the chart into the worksheet (with an offset). $worksheet->insert_chart( D2, $chart, 25, 10 ); _ _END_ _

AUTHOR

John McNamara [email protected]

COPYRIGHT

Copyright MM-MMX, John McNamara.

All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1705 - Linux cli command Image_ExifTool_Lang_trpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Lang_trpm and provides detailed information about the command Image_ExifTool_Lang_trpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Lang_trpm.

NAME 🖥️ Image_ExifTool_Lang_trpm 🖥️

ExifTool Turkish language translations

DESCRIPTION

This file is used by Image::ExifTool to generate localized tag descriptions and values.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

ACKNOWLEDGEMENTS

Thanks to Jens Duttke, Hasan Yildirim and Cihan Ulusoy for providing this translation.

SEE ALSO

Image::ExifTool (3pm), Image::ExifTool::TagInfoXML (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1706 - Linux cli command X11_Protocol_Connection_INETSocketpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command X11_Protocol_Connection_INETSocketpm and provides detailed information about the command X11_Protocol_Connection_INETSocketpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the X11_Protocol_Connection_INETSocketpm.

NAME 🖥️ X11_Protocol_Connection_INETSocketpm 🖥️

Perl module for IO::Socket::INET-based X11 connections

SYNOPSIS

use X11::Protocol; use X11::Protocol::Connection::INETSocket; $conn = X11::Protocol::Connection::INETSocket ->open($host, $display_number); $x = X11::Protocol->new($conn);

DESCRIPTION

This module is used by X11::Protocol to establish a connection and communicate with a server over a TCP/IP connection, using the IO::Socket::INET module.

AUTHOR

Stephen McCamant <[email protected]>.

SEE ALSO

perl (1), X11::Protocol, X11::Protocol::Connection::Socket, X11::Protocol::Connection::UNIXSocket, IO::Socket.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1707 - Linux cli command svcraw_create

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command svcraw_create and provides detailed information about the command svcraw_create, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the svcraw_create.

NAME 🖥️ svcraw_create 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1708 - Linux cli command XtDestroyWidget

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtDestroyWidget and provides detailed information about the command XtDestroyWidget, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtDestroyWidget.

NAME 🖥️ XtDestroyWidget 🖥️

create and destroy widgets

SYNTAX

#include <X11/Intrinsic.h>

Widget XtCreateWidget(const char *name, WidgetClass widget_class, Widget parent, ArgList args, Cardinal num_args);

Widget XtVaCreateWidget(const char *name, WidgetClass widget_class, Widget parent, … );

Widget XtCreateManagedWidget(const char *name, WidgetClass widget_class, Widget parent, ArgList args, Cardinal num_args);

Widget XtVaCreateManagedWidget(const char *name, WidgetClass widget_class, Widget parent, … );

void XtDestroyWidget(Widget w);

ARGUMENTS

args
Specifies the argument list to override the resource defaults.

name
Specifies the resource name for the created widget, which is used for retrieving resources and, for that reason, should not be the same as any other widget that is a child of same parent.

num_args
Specifies the number of arguments in the argument list.

parent
Specifies the parent widget.

  1. Specifies the widget.

widget_class
Specifies the widget class pointer for the created widget.


Specifies the variable argument list to override the resource defaults.

DESCRIPTION

The XtCreateWidget function performs much of the boilerplate operations of widget creation:

  • Checks to see if the class_initialize procedure has been called for this class and for all superclasses and, if not, calls those necessary in a superclass-to-subclass order.

  • Allocates memory for the widget instance.

  • If the parent is a subclass of constraintWidgetClass, it allocates memory for the parent’s constraints and stores the address of this memory into the constraints field.

  • Initializes the core nonresource data fields (for example, parent and visible).

  • Initializes the resource fields (for example, background_pixel) by using the resource lists specified for this class and all superclasses.

  • If the parent is a subclass of constraintWidgetClass, it initializes the resource fields of the constraints record by using the constraint resource list specified for the parent’s class and all superclasses up to constraintWidgetClass.

  • Calls the initialize procedures for the widget by starting at the Core initialize procedure on down to the widget’s initialize procedure.

  • If the parent is a subclass of compositeWidgetClass, it puts the widget into its parent’s children list by calling its parent’s insert_child procedure. For further information, see Section 3.5.

  • If the parent is a subclass of constraintWidgetClass, it calls the constraint initialize procedures, starting at constraintWidgetClass on down to the parent’s constraint initialize procedure.

Note that you can determine the number of arguments in an argument list by using the XtNumber macro. For further information, see Section 11.1.

The XtCreateManagedWidget function is a convenience routine that calls XtCreateWidget and XtManageChild.

The XtDestroyWidget function provides the only method of destroying a widget, including widgets that need to destroy themselves. It can be called at any time, including from an application callback routine of the widget being destroyed. This requires a two-phase destroy process in order to avoid dangling references to destroyed widgets.

In phase one, XtDestroyWidget performs the following:

  • If the being_destroyed field of the widget is True, it returns immediately.

  • Recursively descends the widget tree and sets the being_destroyed field to True for the widget and all children.

  • Adds the widget to a list of widgets (the destroy list) that should be destroyed when it is safe to do so.

Entries on the destroy list satisfy the invariant that if w2 occurs after w1 on the destroy list then w2 is not a descendent of w1. (A descendant refers to both normal and pop-up children.)

Phase two occurs when all procedures that should execute as a result of the current event have been called (including all procedures registered with the event and translation managers), that is, when the current invocation of XtDispatchEvent is about to return or immediately if not in XtDispatchEvent.

In phase two, XtDestroyWidget performs the following on each entry in the destroy list:

  • Calls the destroy callback procedures registered on the widget (and all descendants) in post-order (it calls children callbacks before parent callbacks).

  • If the widget’s parent is a subclass of compositeWidgetClass and if the parent is not being destroyed, it calls XtUnmanageChild on the widget and then calls the widget’s parent’s delete_child procedure (see Section 3.4).

  • If the widget’s parent is a subclass of constraintWidgetClass, it calls the constraint destroy procedure for the parent, then the parent’s superclass, until finally it calls the constraint destroy procedure for constraintWidgetClass.

  • Calls the destroy methods for the widget (and all descendants) in post-order. For each such widget, it calls the destroy procedure declared in the widget class, then the destroy procedure declared in its superclass, until finally it calls the destroy procedure declared in the Core class record.

  • Calls XDestroyWindow if the widget is realized (that is, has an X window). The server recursively destroys all descendant windows.

  • Recursively descends the tree and deallocates all pop-up widgets, constraint records, callback lists and, if the widget is a subclass of compositeWidgetClass, children.

SEE ALSO

XtAppCreateShell(3), XtCreatePopupShell(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1709 - Linux cli command Net_DBus_Binding_Valuepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Binding_Valuepm and provides detailed information about the command Net_DBus_Binding_Valuepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Binding_Valuepm.

NAME 🖥️ Net_DBus_Binding_Valuepm 🖥️

Strongly typed data value

SYNOPSIS

# Import the convenience functions use Net::DBus qw(:typing); # Call a method with passing an int32 $object->doit(dint32(“3”));

DESCRIPTION

This module provides a simple wrapper around a raw Perl value, associating an explicit DBus type with the value. This is used in cases where a client is communicating with a server which does not provide introspection data, but for which the basic data types are not sufficient. This class should not be used directly, rather the convenience functions in Net::DBus be called.

METHODS

my $value = Net::DBus::Binding::Value->new($type, $value);
Creates a wrapper for the perl value $value marking it as having the dbus data type $type. It is not necessary to call this method directly, instead the data typing methods in the Net::DBus object should be used.

my $raw = $value->value
Returns the raw perl value wrapped by this object

my $type = $value->type
Returns the dbus data type this value is marked as having

AUTHOR

Daniel P. Berrange

COPYRIGHT

Copyright (C) 2004-2011 Daniel P. Berrange

SEE ALSO

Net::DBus, Net::DBus::Binding::Introspector, Net::DBus::Binding::Iterator

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1710 - Linux cli command printf_arginfo_size_functiontype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command printf_arginfo_size_functiontype and provides detailed information about the command printf_arginfo_size_functiontype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the printf_arginfo_size_functiontype.

NAME 🖥️ printf_arginfo_size_functiontype 🖥️

define custom behavior for printf-like functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <printf.h>
int register_printf_specifier(int spec, printf_function func,
 printf_arginfo_size_function arginfo);
int register_printf_modifier(const wchar_t *str);
int register_printf_type(printf_va_arg_function fct);

Callbacks

typedef int printf_function(FILE *stream, const struct printf_info *info,
 const void *const args[]);
typedef int printf_arginfo_size_function(const struct printf_info *info,
 size_t n, int argtypes[n], int size[n]);
typedef void printf_va_arg_function(void *mem, va_list *ap);

Types

struct printf_info {
 int prec; // Precision
 int width; // Width
 wchar_t spec; // Format letter
 unsigned int is_long_double:1;// L or ll flag
 unsigned int is_short:1; // h flag
 unsigned int is_long:1; // l flag
 unsigned int alt:1; // # flag
 unsigned int space:1; // Space flag
 unsigned int left:1; // - flag
 unsigned int showsign:1; // + flag
 unsigned int group:1; // ' flag
 unsigned int extra:1; // For special use
 unsigned int is_char:1; // hh flag
 unsigned int wide:1; // True for wide character streams
 unsigned int i18n:1; // I flag
 unsigned int is_binary128:1; /* Floating-point argument is
  ABI-compatible with
  IEC 60559 binary128 */
 unsigned short user; // Bits for user-installed modifiers
 wchar_t pad; // Padding character
};

Constants

#define PA_FLAG_LONG_LONG /* ... */
#define PA_FLAG_LONG_DOUBLE /* ... */
#define PA_FLAG_LONG /* ... */
#define PA_FLAG_SHORT /* ... */
#define PA_FLAG_PTR /* ... */

DESCRIPTION

These functions serve to extend and/or modify the behavior of the printf(3) family of functions.

register_printf_specifier()

This function registers a custom conversion specifier for the printf(3) family of functions.

spec
The character which will be used as a conversion specifier in the format string.

func
Callback function that will be executed by the printf(3) family of functions to format the input arguments into the output stream.

stream
Output stream where the formatted output should be printed. This stream transparently represents the output, even in the case of functions that write to a string.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in arginfo.

args
Array of pointers to the arguments to the printf(3) -like function.

arginfo
Callback function that will be executed by the printf(3) family of functions to know how many arguments should be parsed for the custom specifier and also their types.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in func.

n
Number of arguments remaining to be parsed.

argtypes
This array should be set to define the type of each of the arguments that will be parsed. Each element in the array represents one of the arguments to be parsed, in the same order that they are passed to the printf(3) -like function. Each element should be set to a base type (PA_*) from the enum above, or a custom one, and optionally ORed with an appropriate length modifier (PA_FLAG_*).

The type is determined by using one of the following constants:

PA_INT
int.

PA_CHAR
int, cast to char.

PA_WCHAR
wchar_t.

PA_STRING
const char *, a ‘�’-terminated string.

PA_WSTRING
const wchar_t *, a wide character L’�’-terminated string.

PA_POINTER
void *.

PA_FLOAT
float.

PA_DOUBLE
double.

PA_LAST
TODO.

size
For user-defined types, the size of the type (in bytes) should also be specified through this array. Otherwise, leave it unused.

arginfo is called before func, and prepares some information needed to call func.

register_printf_modifier()

TODO

register_printf_type()

TODO

RETURN VALUE

register_printf_specifier(), register_printf_modifier(), and register_printf_type() return zero on success, or -1 on error.

Callbacks

The callback of type printf_function should return the number of characters written, or -1 on error.

The callback of type printf_arginfo_size_function should return the number of arguments to be parsed by this specifier. It also passes information about the type of those arguments to the caller through argtypes. On error, it should return -1.

ERRORS

EINVAL
The specifier was not a valid character.

STANDARDS

GNU.

HISTORY

register_printf_function(3) is an older function similar to register_printf_specifier(), and is now deprecated. That function can’t handle user-defined types.

register_printf_specifier() supersedes register_printf_function(3).

EXAMPLES

The following example program registers the ‘b’ and ‘B’ specifiers to print integers in binary format, mirroring rules for other unsigned conversion specifiers like ‘x’ and ‘u’. This can be used to print in binary prior to C23.

/* This code is in the public domain */
#include <err.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <printf.h>
#define GROUP_SEP  '\''
struct Printf_Pad {
    char    ch;
    size_t  len;
};
static int b_printf(FILE *stream, const struct printf_info *info,
                    const void *const args[]);
static int b_arginf_sz(const struct printf_info *info,
                    size_t n, int argtypes[n], int size[n]);
static uintmax_t b_value(const struct printf_info *info,
                    const void *arg);
static size_t b_bin_repr(char bin[UINTMAX_WIDTH],
                    const struct printf_info *info, const void *arg);
static size_t b_bin_len(const struct printf_info *info,
                    ptrdiff_t min_len);
static size_t b_pad_len(const struct printf_info *info,
                    ptrdiff_t bin_len);
static ssize_t b_print_prefix(FILE *stream,
                    const struct printf_info *info);
static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info,
                    ptrdiff_t min_len);
static ssize_t b_print_number(FILE *stream,
                    const struct printf_info *info,
                    const char bin[UINTMAX_WIDTH],
                    size_t min_len, size_t bin_len);
static char pad_ch(const struct printf_info *info);
static ssize_t pad_spaces(FILE *stream, size_t pad_len);
int
main(void)
{
    if (register_printf_specifier('b', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('b', ...)");
    if (register_printf_specifier('B', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('B', ...)");
    printf("....----....----....----....----

“); printf("%llb; “, 0x5Ellu); printf("%lB; “, 0x5Elu); printf("%b; “, 0x5Eu); printf("%hB; “, 0x5Eu); printf("%hhb; “, 0x5Eu); printf("%jb; “, (uintmax_t)0x5E); printf("%zb; “, (size_t)0x5E); printf(”….—-….—-….—-….—- “); printf(”%#b; “, 0x5Eu); printf(”%#B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf("%10b; “, 0x5Eu); printf("%010b; “, 0x5Eu); printf(”%.10b; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%-10B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%‘B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”….—-….—-….—-….—- “); printf(”%#16.12b; “, 0xAB); printf(”%-#‘20.12b; “, 0xAB); printf(”%#‘020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#020B; “, 0xAB); printf(”%‘020B; “, 0xAB); printf("%020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#021B; “, 0xAB); printf(”%‘021B; “, 0xAB); printf("%021B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#022B; “, 0xAB); printf(”%‘022B; “, 0xAB); printf("%022B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#023B; “, 0xAB); printf(”%‘023B; “, 0xAB); printf("%023B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%-#‘19.11b; “, 0xAB); printf(”%#‘019B; “, 0xAB); printf(”%#019B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%‘019B; “, 0xAB); printf("%019B; “, 0xAB); printf(”%#016b; “, 0xAB); printf(”….—-….—-….—-….—- “); return 0; } static int b_printf(FILE *stream, const struct printf_info *info, const void const args[]) { char bin[UINTMAX_WIDTH]; size_t min_len, bin_len; ssize_t len, tmp; struct Printf_Pad pad = {0}; len = 0; min_len = b_bin_repr(bin, info, args[0]); bin_len = b_bin_len(info, min_len); pad.ch = pad_ch(info); if (pad.ch == ’ ‘) pad.len = b_pad_len(info, bin_len); / Padding with ’ ’ (right aligned) / if ((pad.ch == ’ ‘) && !info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } / “0b”/“0B” prefix / if (info->alt) { tmp = b_print_prefix(stream, info); if (tmp == EOF) return EOF; len += tmp; } / Padding with ‘0’ / if (pad.ch == ‘0’) { tmp = b_pad_zeros(stream, info, min_len); if (tmp == EOF) return EOF; len += tmp; } / Print number (including leading 0s to fill precision) / tmp = b_print_number(stream, info, bin, min_len, bin_len); if (tmp == EOF) return EOF; len += tmp; / Padding with ’ ’ (left aligned) */ if (info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } return len; } static int b_arginf_sz(const struct printf_info *info, size_t n, int argtypes[n], [[maybe_unused]] int size[n]) { if (n < 1) return -1; if (info->is_long_double) argtypes[0] = PA_INT | PA_FLAG_LONG_LONG; else if (info->is_long) argtypes[0] = PA_INT | PA_FLAG_LONG; else argtypes[0] = PA_INT; return 1; } static uintmax_t b_value(const struct printf_info *info, const void *arg) { if (info->is_long_double) return *(const unsigned long long *)arg; if (info->is_long) return *(const unsigned long )arg; / short and char are both promoted to int */ return *(const unsigned int *)arg; } static size_t b_bin_repr(char bin[UINTMAX_WIDTH], const struct printf_info *info, const void *arg) { size_t min_len; uintmax_t val; val = b_value(info, arg); bin[0] = ‘0’; for (min_len = 0; val; min_len++) { bin[min_len] = ‘0’ + (val % 2); val »= 1; } return MAX(min_len, 1); } static size_t b_bin_len(const struct printf_info *info, ptrdiff_t min_len) { return MAX(info->prec, min_len); } static size_t b_pad_len(const struct printf_info *info, ptrdiff_t bin_len) { ptrdiff_t pad_len; pad_len = info->width - bin_len; if (info->alt) pad_len -= 2; if (info->group) pad_len -= (bin_len - 1) / 4; return MAX(pad_len, 0); } static ssize_t b_print_prefix(FILE *stream, const struct printf_info *info) { ssize_t len; len = 0; if (fputc(‘0’, stream) == EOF) return EOF; len++; if (fputc(info->spec, stream) == EOF) return EOF; len++; return len; } static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info, ptrdiff_t min_len) { ssize_t len; ptrdiff_t tmp; len = 0; tmp = info->width - (info->alt * 2); if (info->group) tmp -= tmp / 5 - !(tmp % 5); for (ptrdiff_t i = tmp - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static ssize_t b_print_number(FILE *stream, const struct printf_info info, const char bin[UINTMAX_WIDTH], size_t min_len, size_t bin_len) { ssize_t len; len = 0; / Print leading zeros to fill precision / for (size_t i = bin_len - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } / Print number */ for (size_t i = min_len - 1; i < min_len; i–) { if (fputc(bin[i], stream) == EOF) return EOF; len++; if (!info->group || (i % 4) || !i) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static char pad_ch(const struct printf_info *info) { if ((info->prec != -1) || (info->pad == ’ ‘) || info->left) return ’ ‘; return ‘0’; } static ssize_t pad_spaces(FILE *stream, size_t pad_len) { ssize_t len; len = 0; for (size_t i = pad_len - 1; i < pad_len; i–) { if (fputc(’ ‘, stream) == EOF) return EOF; len++; } return len; }

SEE ALSO

asprintf(3), printf(3), wprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1711 - Linux cli command svcfd_create

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command svcfd_create and provides detailed information about the command svcfd_create, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the svcfd_create.

NAME 🖥️ svcfd_create 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1712 - Linux cli command Image_ExifTool_XMP2pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_XMP2pm and provides detailed information about the command Image_ExifTool_XMP2pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_XMP2pm.

NAME 🖥️ Image_ExifTool_XMP2pm 🖥️

Additional XMP namespace definitions

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This file contains definitions for less common XMP namespaces.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://ns.useplus.org/>

<http://www.prismstandard.org/>

<http://www.portfoliofaq.com/pfaq/v7mappings.htm>

<http://www.iptc.org/IPTC4XMP/>

<http://creativecommons.org/technology/xmp>

<http://www.optimasc.com/products/fileid/xmp-extensions.pdf>

<http://www.w3.org/TR/SVG11/>

SEE ALSO

“XMP Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1713 - Linux cli command Sub_Exporterpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Sub_Exporterpm and provides detailed information about the command Sub_Exporterpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Sub_Exporterpm.

NAME 🖥️ Sub_Exporterpm 🖥️

a sophisticated exporter for custom-built routines

VERSION

version 0.990

SYNOPSIS

Sub::Exporter must be used in two places. First, in an exporting module:

# in the exporting module: package Text::Tweaker; use Sub::Exporter -setup => { exports => [ qw(squish titlecase), # always works the same way reformat => \build_reformatter, # generator to build exported function trim => \build_trimmer, indent => \build_indenter, ], collectors => [ defaults ], };

Then, in an importing module:

# in the importing module: use Text::Tweaker squish, indent => { margin => 5 }, reformat => { width => 79, justify => full, -as => prettify_text }, defaults => { eol => CRLF };

With this setup, the importing module ends up with three routines: squish, indent, and prettify_text. The latter two have been built to the specifications of the importer Ω- they are not just copies of the code in the exporting package.

DESCRIPTION

ACHTUNG! If you’re not familiar with Exporter or exporting, read Sub::Exporter::Tutorial first!

Why Generators?

The biggest benefit of Sub::Exporter over existing exporters (including the ubiquitous Exporter.pm) is its ability to build new coderefs for export, rather than to simply export code identical to that found in the exporting package.

If your module’s consumers get a routine that works like this:

use Data::Analyze qw(analyze); my $value = analyze($data, $tolerance, $passes);

and they constantly pass only one or two different set of values for the non-$data arguments, your code can benefit from Sub::Exporter. By writing a simple generator, you can let them do this, instead:

use Data::Analyze analyze => { tolerance => 0.10, passes => 10, -as => analyze10 }, analyze => { tolerance => 0.15, passes => 50, -as => analyze50 }; my $value = analyze10($data);

The package with the generator for that would look something like this:

package Data::Analyze; use Sub::Exporter -setup => { exports => [ analyze => \build_analyzer, ], }; sub build_analyzer { my ($class, $name, $arg) = @_; return sub { my $data = shift; my $tolerance = shift || $arg->{tolerance}; my $passes = shift || $arg->{passes}; analyze($data, $tolerance, $passes); } }

Your module’s user now has to do less work to benefit from it Ω- and remember, you’re often your own user! Investing in customized subroutines is an investment in future laziness.

This also avoids a common form of ugliness seen in many modules: package-level configuration. That is, you might have seen something like the above implemented like so:

use Data::Analyze qw(analyze); $Data::Analyze::default_tolerance = 0.10; $Data::Analyze::default_passes = 10;

This might save time, until you have multiple modules using Data::Analyze. Because there is only one global configuration, they step on each other’s toes and your code begins to have mysterious errors.

Generators can also allow you to export class methods to be called as subroutines:

package Data::Methodical; use Sub::Exporter -setup => { exports => { some_method => \_curry_class } }; sub _curry_class { my ($class, $name) = @_; sub { $class->$name(@_); }; }

Because of the way that exporters and Sub::Exporter work, any package that inherits from Data::Methodical can inherit its exporter and override its some_method. If a user imports some_method from that package, he’ll receive a subroutine that calls the method on the subclass, rather than on Data::Methodical itself. Keep in mind that if you re-setup Sub::Exporter in a package that inherits from Data::Methodical you will, of course, be entirely replacing the exporter from Data::Methodical. import is a method, and is hidden by the same means as any other method.

Other Customizations

Building custom routines with generators isn’t the only way that Sub::Exporters allows the importing code to refine its use of the exported routines. They may also be renamed to avoid naming collisions.

Consider the following code:

# this program determines to which circle of Hell you will be condemned use Morality qw(sin virtue); # for calculating viciousness use Math::Trig qw(:all); # for dealing with circles

The programmer has inadvertently imported two sin routines. The solution, in Exporter.pm-based modules, would be to import only one and then call the other by its fully-qualified name. Alternately, the importer could write a routine that did so, or could mess about with typeglobs.

How much easier to write:

# this program determines to which circle of Hell you will be condemned use Morality qw(virtue), sin => { -as => offense }; use Math::Trig -all => { -prefix => trig_ };

and to have at one’s disposal offense and trig_sin Ω- not to mention trig_cos and trig_tan.

PERL VERSION

This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years.

Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl.

EXPORTER CONFIGURATION

You can configure an exporter for your package by using Sub::Exporter like so:

package Tools; use Sub::Exporter -setup => { exports => [ qw(function1 function2 function3) ] };

This is the simplest way to use the exporter, and is basically equivalent to this:

package Tools; use base qw(Exporter); our @EXPORT_OK = qw(function1 function2 function3);

Any basic use of Sub::Exporter will look like this:

package Tools; use Sub::Exporter -setup => \config;

The following keys are valid in %config:

exports - a list of routines to provide for exporting; each routine may be followed by generator groups - a list of groups to provide for exporting; each must be followed by either (a) a list of exports, possibly with arguments for each export, or (b) a generator collectors - a list of names into which values are collected for use in routine generation; each name may be followed by a validator

In addition to the basic options above, a few more advanced options may be passed:

into_level - how far up the caller stack to look for a target (default 0) into - an explicit target (package) into which to export routines

In other words: Sub::Exporter installs a import routine which, when called, exports routines to the calling namespace. The into and into_level options change where those exported routines are installed.

generator - a callback used to produce the code that will be installed default: Sub::Exporter::default_generator installer - a callback used to install the code produced by the generator default: Sub::Exporter::default_installer

For information on how these callbacks are used, see the documentation for "default_generator" and "default_installer".

Export Configuration

The exports list may be provided as an array reference or a hash reference. The list is processed in such a way that the following are equivalent:

{ exports => [ qw(foo bar baz), quux => \quux_generator ] } { exports => { foo => undef, bar => undef, baz => undef, quux => \quux_generator } }

Generators are code that return coderefs. They are called with four parameters:

$class - the class whose exporter has been called (the exporting class) $name - the name of the export for which the routine is being build \arg - the arguments passed for this export \col - the collections for this import

Given the configuration in the SYNOPSIS, the following use statement:

use Text::Tweaker reformat => { -as => make_narrow, width => 33 }, defaults => { eol => CR };

would result in the following call to &build_reformatter:

my $code = build_reformatter( Text::Tweaker, reformat, { width => 33 }, # note that -as is not passed in { defaults => { eol => CR } }, );

The returned coderef ($code) would then be installed as make_narrow in the calling package.

Instead of providing a coderef in the configuration, a reference to a method name may be provided. This method will then be called on the invocant of the import method. (In this case, we do not pass the $class parameter, as it would be redundant.)

Group Configuration

The groups list can be passed in the same forms as exports. Groups must have values to be meaningful, which may either list exports that make up the group (optionally with arguments) or may provide a way to build the group.

The simpler case is the first: a group definition is a list of exports. Here’s the example that could go in exporter in the SYNOPSIS.

groups => { default => [ qw(reformat) ], shorteners => [ qw(squish trim) ], email_safe => [ indent, reformat => { -as => email_format, width => 72 } ], },

Groups are imported by specifying their name prefixed be either a dash or a colon. This line of code would import the shorteners group:

use Text::Tweaker qw(-shorteners);

Arguments passed to a group when importing are merged into the groups options and passed to any relevant generators. Groups can contain other groups, but looping group structures are ignored.

The other possible value for a group definition, a coderef, allows one generator to build several exportable routines simultaneously. This is useful when many routines must share enclosed lexical variables. The coderef must return a hash reference. The keys will be used as export names and the values are the subs that will be exported.

This example shows a simple use of the group generator.

package Data::Crypto; use Sub::Exporter -setup => { groups => { cipher => \build_cipher_group } }; sub build_cipher_group { my ($class, $group, $arg) = @_; my ($encode, $decode) = build_codec($arg->{secret}); return { cipher => $encode, decipher => $decode }; }

The cipher and decipher routines are built in a group because they are built together by code which encloses their secret in their environment.

Default Groups

If a module that uses Sub::Exporter is used with no arguments, it will try to export the group named default. If that group has not been specifically configured, it will be empty, and nothing will happen.

Another group is also created if not defined: all. The all group contains all the exports from the exports list.

Collector Configuration

The collectors entry in the exporter configuration gives names which, when found in the import call, have their values collected and passed to every generator.

For example, the build_analyzer generator that we saw above could be rewritten as:

sub build_analyzer { my ($class, $name, $arg, $col) = @_; return sub { my $data = shift; my $tolerance = shift || $arg->{tolerance} || $col->{defaults}{tolerance}; my $passes = shift || $arg->{passes} || $col->{defaults}{passes}; analyze($data, $tolerance, $passes); } }

That would allow the importer to specify global defaults for his imports:

use Data::Analyze analyze, analyze => { tolerance => 0.10, -as => analyze10 }, analyze => { tolerance => 0.15, passes => 50, -as => analyze50 }, defaults => { passes => 10 }; my $A = analyze10($data); # equivalent to analyze($data, 0.10, 10); my $C = analyze50($data); # equivalent to analyze($data, 0.15, 50); my $B = analyze($data, 0.20); # equivalent to analyze($data, 0.20, 10);

If values are provided in the collectors list during exporter setup, they must be code references, and are used to validate the importer’s values. The validator is called when the collection is found, and if it returns false, an exception is thrown. We could ensure that no one tries to set a global data default easily:

collectors => { defaults => sub { return (exists $_[0]->{data}) ? 0 : 1 } }

Collector coderefs can also be used as hooks to perform arbitrary actions before anything is exported.

When the coderef is called, it is passed the value of the collection and a hashref containing the following entries:

name - the name of the collector config - the exporter configuration (hashref) import_args - the arguments passed to the exporter, sans collections (aref) class - the package on which the importer was called into - the package into which exports will be exported

Collectors with all-caps names (that is, made up of underscore or capital A through Z) are reserved for special use. The only currently implemented special collector is INIT, whose hook (if present in the exporter configuration) is always run before any other hook.

CALLING THE EXPORTER

Arguments to the exporter (that is, the arguments after the module name in a use statement) are parsed as follows:

First, the collectors gather any collections found in the arguments. Any reference type may be given as the value for a collector. For each collection given in the arguments, its validator (if any) is called.

Next, groups are expanded. If the group is implemented by a group generator, the generator is called. There are two special arguments which, if given to a group, have special meaning:

-prefix - a string to prepend to any export imported from this group -suffix - a string to append to any export imported from this group

Finally, individual export generators are called and all subs, generated or otherwise, are installed in the calling package. There is only one special argument for export generators:

-as - where to install the exported sub

Normally, -as will contain an alternate name for the routine. It may, however, contain a reference to a scalar. If that is the case, a reference the generated routine will be placed in the scalar referenced by -as. It will not be installed into the calling package.

Special Exporter Arguments

The generated exporter accept some special options, which may be passed as the first argument, in a hashref.

These options are:

into_level into generator installer

These override the same-named configuration options described in EXPORTER CONFIGURATION.

SUBROUTINES

setup_exporter

This routine builds and installs an import routine. It is called with one argument, a hashref containing the exporter configuration. Using this, it builds an exporter and installs it into the calling package with the name import. In addition to the normal exporter configuration, a few named arguments may be passed in the hashref:

into - into what package should the exporter be installed into_level - into what level up the stack should the exporter be installed as - what name should the installed exporter be given

By default the exporter is installed with the name import into the immediate caller of setup_exporter. In other words, if your package calls setup_exporter without providing any of the three above arguments, it will have an import routine installed.

Providing both into and into_level will cause an exception to be thrown.

The exporter is built by "build_exporter".

build_exporter

Given a standard exporter configuration, this routine builds and returns an exporter Ω- that is, a subroutine that can be installed as a class method to perform exporting on request.

Usually, this method is called by "setup_exporter", which then installs the exporter as a package’s import routine.

default_generator

This is Sub::Exporter’s default generator. It takes bits of configuration that have been gathered during the import and turns them into a coderef that can be installed.

my $code = default_generator(\arg);

Passed arguments are:

class - the class on which the import method was called name - the name of the export being generated arg - the arguments to the generator col - the collections generator - the generator to be used to build the export (code or scalar ref)

default_installer

This is Sub::Exporter’s default installer. It does what Sub::Exporter promises: it installs code into the target package.

default_installer(\arg, \to_export);

Passed arguments are:

into - the package into which exports should be delivered

@to_export is a list of name/value pairs. The default exporter assigns code (the values) to named slots (the names) in the given package. If the name is a scalar reference, the scalar reference is made to point to the code reference instead.

EXPORTS

Sub::Exporter also offers its own exports: the setup_exporter and build_exporter routines described above. It also provides a special setup collector, which will set up an exporter using the parameters passed to it.

Note that the setup collector (seen in examples like the SYNOPSIS above) uses build_exporter, not setup_exporter. This means that the special arguments like into and as for setup_exporter are not accepted here. Instead, you may write something like:

use Sub::Exporter { into => Target::Package }, -setup => { -as => do_import, exports => [ … ], } ;

Finding a good reason for wanting to do this is left as an exercise for the reader.

COMPARISONS

There are a whole mess of exporters on the CPAN. The features included in Sub::Exporter set it apart from any existing Exporter. Here’s a summary of some other exporters and how they compare.

  • Exporter and co. This is the standard Perl exporter. Its interface is a little clunky, but it’s fast and ubiquitous. It can do some things that Sub::Exporter can’t: it can export things other than routines, it can import everything in this group except this symbol, and some other more esoteric things. These features seem to go nearly entirely unused. It always exports things exactly as they appear in the exporting module; it can’t rename or customize routines. Its groups (tags) can’t be nested. Exporter::Lite is a whole lot like Exporter, but it does significantly less: it supports exporting symbols, but not groups, pattern matching, or negation. The fact that Sub::Exporter can’t export symbols other than subroutines is a good idea, not a missing feature. For simple uses, setting up Sub::Exporter is about as easy as Exporter. For complex uses, Sub::Exporter makes hard things possible, which would not be possible with Exporter. When using a module that uses Sub::Exporter, users familiar with Exporter will probably see no difference in the basics. These two lines do about the same thing in whether the exporting module uses Exporter or Sub::Exporter. use Some::Module qw(foo bar baz); use Some::Module qw(foo :bar baz); The definition for exporting in Exporter.pm might look like this: package Some::Module; use base qw(Exporter); our @EXPORT_OK = qw(foo bar baz quux); our %EXPORT_TAGS = (bar => [ qw(bar baz) ]); Using Sub::Exporter, it would look like this: package Some::Module; use Sub::Exporter -setup => { exports => [ qw(foo bar baz quux) ], groups => { bar => [ qw(bar baz) ]} }; Sub::Exporter respects inheritance, so that a package may export inherited routines, and will export the most inherited version. Exporting methods without currying away the invocant is a bad idea, but Sub::Exporter allows you to do just that Ω- and anyway, there are other uses for this feature, like packages of exported subroutines which use inheritance specifically to allow more specialized, but similar, packages. Exporter::Easy provides a wrapper around the standard Exporter. It makes it simpler to build groups, but doesn’t provide any more functionality. Because it is a front-end to Exporter, it will store your exporter’s configuration in global package variables.

  • Attribute-Based Exporters Some exporters use attributes to mark variables to export. Exporter::Simple supports exporting any kind of symbol, and supports groups. Using a module like Exporter or Sub::Exporter, it’s easy to look at one place and see what is exported, but it’s impossible to look at a variable definition and see whether it is exported by that alone. Exporter::Simple makes this trade in reverse: each variable’s declaration includes its export definition, but there is no one place to look to find a manifest of exports. More importantly, Exporter::Simple does not add any new features to those of Exporter. In fact, like Exporter::Easy, it is just a front-end to Exporter, so it ends up storing its configuration in global package variables. (This means that there is one place to look for your exporter’s manifest, actually. You can inspect the @EXPORT package variables, and other related package variables, at runtime.) Perl6::Export isn’t actually attribute based, but looks similar. Its syntax is borrowed from Perl 6, and implemented by a source filter. It is a prototype of an interface that is still being designed. It should probably be avoided for production work. On the other hand, Perl6::Export::Attrs implements Perl 6-like exporting, but translates it into Perl 5 by providing attributes.

  • Other Exporters Exporter::Renaming wraps the standard Exporter to allow it to export symbols with changed names. Class::Exporter performs a special kind of routine generation, giving each importing package an instance of your class, and then exporting the instance’s methods as normal routines. (Sub::Exporter, of course, can easily emulate this behavior, as shown above.) Exporter::Tidy implements a form of renaming (using its _map argument) and of prefixing, and implements groups. It also avoids using package variables for its configuration.

TODO

  • write a set of longer, more demonstrative examples

  • solidify the custom exporter interface (see &default_exporter)

  • add an always group

THANKS

Hans Dieter Pearcey provided helpful advice while I was writing Sub::Exporter. Ian Langworth and Shawn Sorichetti asked some good questions and helped me improve my documentation quite a bit. Yuval Kogman helped me find a bunch of little problems.

Thanks, friends!

BUGS

Please report any bugs or feature requests through the web interface at <http://rt.cpan.org>. I will be notified, and then you’ll automatically be notified of progress on your bug as I make changes.

AUTHOR

Ricardo Signes <[email protected]>

CONTRIBUTORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2007 by Ricardo Signes.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1714 - Linux cli command Text_WrapI18Npm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Text_WrapI18Npm and provides detailed information about the command Text_WrapI18Npm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Text_WrapI18Npm.

NAME 🖥️ Text_WrapI18Npm 🖥️

Line wrapping module with support for multibyte, fullwidth, and combining characters and languages without whitespaces between words

SYNOPSIS

use Text::WrapI18N qw(wrap $columns); wrap(firstheader, nextheader, texts);

DESCRIPTION

This module intends to be a better Text::Wrap module. This module is needed to support multibyte character encodings such as UTF-8, EUC-JP, EUC-KR, GB2312, and Big5. This module also supports characters with irregular widths, such as combining characters (which occupy zero columns on terminal, like diacritical marks in UTF-8) and fullwidth characters (which occupy two columns on terminal, like most of east Asian characters). Also, minimal handling of languages which doesn’t use whitespaces between words (like Chinese and Japanese) is supported.

Like Text::Wrap, hyphenation and kinsoku processing are not supported, to keep simplicity.

wrap(firstheader, nextheader, texts) is the main subroutine of Text::WrapI18N module to execute the line wrapping. Input parameters and output data emulate Text::Wrap. The texts have to be written in locale encoding.

SEE ALSO

locale (5), utf-8 (7), charsets (7)

AUTHOR

Tomohiro KUBOTA, <[email protected]>

COPYRIGHT AND LICENSE

Copyright 2003 by Tomohiro KUBOTA

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1715 - Linux cli command URI_WithBasepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command URI_WithBasepm and provides detailed information about the command URI_WithBasepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the URI_WithBasepm.

NAME 🖥️ URI_WithBasepm 🖥️

URIs which remember their base

SYNOPSIS

$u1 = URI::WithBase->new($str, $base); $u2 = $u1->abs; $base = $u1->base; $u1->base( $new_base )

DESCRIPTION

This module provides the URI::WithBase class. Objects of this class are like URI objects, but can keep their base too. The base represents the context where this URI was found and can be used to absolutize or relativize the URI. All the methods described in URI are supported for URI::WithBase objects.

The methods provided in addition to or modified from those of URI are:

$uri = URI::WithBase->new($str, [$base])
The constructor takes an optional base URI as the second argument. If provided, this argument initializes the base attribute.

$uri->base( [$new_base] )
Can be used to get or set the value of the base attribute. The return value, which is the old value, is a URI object or undef.

$uri->abs( [$base_uri] )
The $base_uri argument is now made optional as the object carries its base with it. A new object is returned even if $uri is already absolute (while plain URI objects simply return themselves in that case).

$uri->rel( [$base_uri] )
The $base_uri argument is now made optional as the object carries its base with it. A new object is always returned.

SEE ALSO

URI

COPYRIGHT

Copyright 1998-2002 Gisle Aas.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1716 - Linux cli command Net_DBus_Binding_Messagepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Binding_Messagepm and provides detailed information about the command Net_DBus_Binding_Messagepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Binding_Messagepm.

NAME 🖥️ Net_DBus_Binding_Messagepm 🖥️

Base class for messages

SYNOPSIS

Sending a message

my $msg = new Net::DBus::Binding::Message::Signal; my $iterator = $msg->iterator; $iterator->append_byte(132); $iterator->append_int32(14241); $connection->send($msg);

DESCRIPTION

Provides a base class for the different kinds of message that can be sent/received. Instances of this class are never instantiated directly, rather one of the four sub-types Net::DBus::Binding::Message::Signal, Net::DBus::Binding::Message::MethodCall, Net::DBus::Binding::Message::MethodReturn, Net::DBus::Binding::Message::Error should be used.

CONSTANTS

The following constants are defined in this module. They are not exported into the caller’s namespace & thus must be referenced with their fully qualified package names

TYPE_ARRAY
Constant representing the signature value associated with the array data type.

TYPE_BOOLEAN
Constant representing the signature value associated with the boolean data type.

TYPE_BYTE
Constant representing the signature value associated with the byte data type.

TYPE_DICT_ENTRY
Constant representing the signature value associated with the dictionary entry data type.

TYPE_DOUBLE
Constant representing the signature value associated with the IEEE double precision floating point data type.

TYPE_INT16
Constant representing the signature value associated with the signed 16 bit integer data type.

TYPE_INT32
Constant representing the signature value associated with the signed 32 bit integer data type.

TYPE_INT64
Constant representing the signature value associated with the signed 64 bit integer data type.

TYPE_OBJECT_PATH
Constant representing the signature value associated with the object path data type.

TYPE_STRING
Constant representing the signature value associated with the UTF-8 string data type.

TYPE_SIGNATURE
Constant representing the signature value associated with the signature data type.

TYPE_STRUCT
Constant representing the signature value associated with the struct data type.

TYPE_UINT16
Constant representing the signature value associated with the unsigned 16 bit integer data type.

TYPE_UINT32
Constant representing the signature value associated with the unsigned 32 bit integer data type.

TYPE_UINT64
Constant representing the signature value associated with the unsigned 64 bit integer data type.

TYPE_VARIANT
Constant representing the signature value associated with the variant data type.

TYPE_UNIX_FD
Constant representing the signature value associated with the unix file descriptor data type.

METHODS

my $msg = Net::DBus::Binding::Message->new(message => $rawmessage);
Creates a new message object, initializing it with the underlying C message object given by the message object. This constructor is intended for internal use only, instead refer to one of the four sub-types for this class for specific message types

my $type = $msg->get_type
Retrieves the type code for this message. The returned value corresponds to one of the four Net::DBus::Binding::Message::MESSAGE_TYPE_* constants.

my $interface = $msg->get_interface
Retrieves the name of the interface targeted by this message, possibly an empty string if there is no applicable interface for this message.

my $path = $msg->get_path
Retrieves the object path associated with the message, possibly an empty string if there is no applicable object for this message.

my $name = $msg->get_destination
Retrieves the unique or well-known bus name for client intended to be the recipient of the message. Possibly returns an empty string if the message is being broadcast to all clients.

my $name = $msg->get_sender
Retireves the unique name of the client sending the message

my $serial = $msg->get_serial
Retrieves the unique serial number of this message. The number is guaranteed unique for as long as the connection over which the message was sent remains open. May return zero, if the message is yet to be sent.

my $name = $msg->get_member
For method calls, retrieves the name of the method to be invoked, while for signals, retrieves the name of the signal.

my $sig = $msg->get_signature
Retrieves a string representing the type signature of the values packed into the body of the message.

$msg->set_sender($name)
Set the name of the client sending the message. The name must be the unique name of the client.

$msg->set_destination($name)
Set the name of the intended recipient of the message. This is typically used for signals to switch them from broadcast to unicast.

my $iterator = $msg->iterator;
Retrieves an iterator which can be used for reading or writing fields of the message. The returned object is an instance of the Net::DBus::Binding::Iterator class.

$boolean = $msg->get_no_reply()
Gets the flag indicating whether the message is expecting a reply to be sent.

$msg->set_no_reply($boolean)
Toggles the flag indicating whether the message is expecting a reply to be sent. All method call messages expect a reply by default. By toggling this flag the communication latency is reduced by removing the need for the client to wait

my @values = $msg->get_args_list
De-marshall all the values in the body of the message, using the message signature to identify data types. The values are returned as a list.

$msg->append_args_list(@values)
Append a set of values to the body of the message. Values will be encoded as either a string, list or dictionary as appropriate to their Perl data type. For more specific data typing needs, the Net::DBus::Binding::Iterator object should be used instead.

AUTHOR

Daniel P. Berrange

COPYRIGHT

Copyright (C) 2004-2011 Daniel P. Berrange

SEE ALSO

Net::DBus::Binding::Server, Net::DBus::Binding::Connection, Net::DBus::Binding::Message::Signal, Net::DBus::Binding::Message::MethodCall, Net::DBus::Binding::Message::MethodReturn, Net::DBus::Binding::Message::Error

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1717 - Linux cli command HTML_Elementpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_Elementpm and provides detailed information about the command HTML_Elementpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_Elementpm.

NAME 🖥️ HTML_Elementpm 🖥️

Class for objects that represent HTML elements

VERSION

This document describes version 5.07 of HTML::Element, released August 31, 2017 as part of HTML-Tree.

SYNOPSIS

use HTML::Element; $a = HTML::Element->new(a, href => http://www.perl.com/); $a->push_content(“The Perl Homepage”); $tag = $a->tag; print “$tag starts out as:”, $a->starttag, " “; print “$tag ends as:”, $a->endtag, " “; print “$tag\s href attribute is: “, $a->attr(href), " “; $links_r = $a->extract_links(); print “Hey, I found “, scalar(@$links_r), " links. “; print “And that, as HTML, is: “, $a->as_HTML, " “; $a = $a->delete;

DESCRIPTION

(This class is part of the HTML::Tree dist.)

Objects of the HTML::Element class can be used to represent elements of HTML document trees. These objects have attributes, notably attributes that designates each element’s parent and content. The content is an array of text segments and other HTML::Element objects. A tree with HTML::Element objects as nodes can represent the syntax tree for a HTML document.

HOW WE REPRESENT TREES

Consider this HTML document:

<html lang=en-US> <head> <title>Stuff</title> <meta name=author content=Jojo> </head> <body> <h1>I like potatoes!</h1> </body> </html>

Building a syntax tree out of it makes a tree-structure in memory that could be diagrammed as:

html (lang=en-US) / \ / \ / \ head body /\ \ / \ \ / \ \ title meta h1 | (name=author, | “Stuff” content=Jojo) “I like potatoes”

This is the traditional way to diagram a tree, with the root at the top, and it’s this kind of diagram that people have in mind when they say, for example, that the meta element is under the head element instead of under the body element. (The same is also said with inside instead of under Ω- the use of inside makes more sense when you’re looking at the HTML source.)

Another way to represent the above tree is with indenting:

html (attributes: lang=en-US) head title “Stuff” meta (attributes: name=author content=Jojo) body h1 “I like potatoes”

Incidentally, diagramming with indenting works much better for very large trees, and is easier for a program to generate. The $tree->dump method uses indentation just that way.

However you diagram the tree, it’s stored the same in memory Ω- it’s a network of objects, each of which has attributes like so:

element #1: _tag: html _parent: none _content: [element #2, element #5] lang: en-US element #2: _tag: head _parent: element #1 _content: [element #3, element #4] element #3: _tag: title _parent: element #2 _content: [text segment “Stuff”] element #4 _tag: meta _parent: element #2 _content: none name: author content: Jojo element #5 _tag: body _parent: element #1 _content: [element #6] element #6 _tag: h1 _parent: element #5 _content: [text segment “I like potatoes”]

The treeness of the tree-structure that these elements comprise is not an aspect of any particular object, but is emergent from the relatedness attributes (_parent and _content) of these element-objects and from how you use them to get from element to element.

While you could access the content of a tree by writing code that says “access the ‘src’ attribute of the root’s first child’s seventh child’s third child, you’re more likely to have to scan the contents of a tree, looking for whatever nodes, or kinds of nodes, you want to do something with. The most straightforward way to look over a tree is to traverse” it; an HTML::Element method ($h->traverse) is provided for this purpose; and several other HTML::Element methods are based on it.

(For everything you ever wanted to know about trees, and then some, see Niklaus Wirth’s Algorithms + Data Structures = Programs or Donald Knuth’s The Art of Computer Programming, Volume 1.)

Weak References

TL;DR summary: use HTML::TreeBuilder 5 -weak; and forget about the delete method (except for pruning a node from a tree).

Because HTML::Element stores a reference to the parent element, Perl’s reference-count garbage collection doesn’t work properly with HTML::Element trees. Starting with version 5.00, HTML::Element uses weak references (if available) to prevent that problem. Weak references were introduced in Perl 5.6.0, but you also need a version of Scalar::Util that provides the weaken function.

Weak references are enabled by default. If you want to be certain they’re in use, you can say use HTML::Element 5 -weak;. You must include the version number; previous versions of HTML::Element ignored the import list entirely.

To disable weak references, you can say use HTML::Element -noweak;. This is a global setting. This feature is deprecated and is provided only as a quick fix for broken code. If your code does not work properly with weak references, you should fix it immediately, as weak references may become mandatory in a future version. Generally, all you need to do is keep a reference to the root of the tree until you’re done working with it.

Because HTML::TreeBuilder is a subclass of HTML::Element, you can also import -weak or -noweak from HTML::TreeBuilder: e.g. use HTML::TreeBuilder: 5 -weak;.

BASIC METHODS

new

$h = HTML::Element->new(tag, attrname => value, … );

This constructor method returns a new HTML::Element object. The tag name is a required argument; it will be forced to lowercase. Optionally, you can specify other initial attributes at object creation time.

attr

$value = $h->attr(attr); $old_value = $h->attr(attr, $new_value);

Returns (optionally sets) the value of the given attribute of $h. The attribute name (but not the value, if provided) is forced to lowercase. If trying to read the value of an attribute not present for this element, the return value is undef. If setting a new value, the old value of that attribute is returned.

If methods are provided for accessing an attribute (like $h->tag for _tag, $h->content_list, etc. below), use those instead of calling attr $h->attr, whether for reading or setting.

Note that setting an attribute to undef (as opposed to “”, the empty string) actually deletes the attribute.

tag

$tagname = $h->tag(); $h->tag(tagname);

Returns (optionally sets) the tag name (also known as the generic identifier) for the element $h. In setting, the tag name is always converted to lower case.

There are four kinds of pseudo-elements that show up as HTML::Element objects:

Comment pseudo-elements
These are element objects with a $h->tag value of ~comment, and the content of the comment is stored in the text attribute ($h->attr("text")). For example, parsing this code with HTML::TreeBuilder… <!– I like Pie. Pie is good –> produces an HTML::Element object with these attributes: “_tag”, “~comment”, “text”, " I like Pie. Pie is good "

Declaration pseudo-elements
Declarations (rarely encountered) are represented as HTML::Element objects with a tag name of ~declaration, and content in the text attribute. For example, this: <!DOCTYPE foo> produces an element whose attributes include: “_tag”, “~declaration”, “text”, “DOCTYPE foo”

Processing instruction pseudo-elements
PIs (rarely encountered) are represented as HTML::Element objects with a tag name of ~pi, and content in the text attribute. For example, this: <?stuff foo?> produces an element whose attributes include: “_tag”, “~pi”, “text”, “stuff foo?” (assuming a recent version of HTML::Parser)

~literal pseudo-elements
These objects are not currently produced by HTML::TreeBuilder, but can be used to represent a super-literal Ω- i.e., a literal you want to be immune from escaping. (Yes, I just made that term up.) That is, this is useful if you want to insert code into a tree that you plan to dump out with as_HTML, where you want, for some reason, to suppress as_HTML’s normal behavior of amp-quoting text segments. For example, this: my $literal = HTML::Element->new(~literal, text => x < 4 & y > 7 ); my $span = HTML::Element->new(span); $span->push_content($literal); print $span->as_HTML; prints this: <span>x < 4 & y > 7</span> Whereas this: my $span = HTML::Element->new(span); $span->push_content(x < 4 & y > 7); # normal text segment print $span->as_HTML; prints this: <span>x < 4 & y > 7</span> Unless you’re inserting lots of pre-cooked code into existing trees, and dumping them out again, it’s not likely that you’ll find ~literal pseudo-elements useful.

parent

$parent = $h->parent(); $h->parent($new_parent);

Returns (optionally sets) the parent (aka container) for this element. The parent should either be undef, or should be another element.

You should not use this to directly set the parent of an element. Instead use any of the other methods under Structure-Modifying Methods, below.

Note that not($h->parent) is a simple test for whether $h is the root of its subtree.

content_list

@content = $h->content_list(); $num_children = $h->content_list();

Returns a list of the child nodes of this element Ω- i.e., what nodes (elements or text segments) are inside/under this element. (Note that this may be an empty list.)

In a scalar context, this returns the count of the items, as you may expect.

content

$content_array_ref = $h->content(); # may return undef

This somewhat deprecated method returns the content of this element; but unlike content_list, this returns either undef (which you should understand to mean no content), or a reference to the array of content items, each of which is either a text segment (a string, i.e., a defined non-reference scalar value), or an HTML::Element object. Note that even if an arrayref is returned, it may be a reference to an empty array.

While older code should feel free to continue to use $h->content, new code should use $h->content_list in almost all conceivable cases. It is my experience that in most cases this leads to simpler code anyway, since it means one can say:

@children = $h->content_list;

instead of the inelegant:

@children = @{$h->content || []};

If you do use $h->content (or $h->content_array_ref), you should not use the reference returned by it (assuming it returned a reference, and not undef) to directly set or change the content of an element or text segment! Instead use content_refs_list or any of the other methods under Structure-Modifying Methods, below.

content_array_ref

$content_array_ref = $h->content_array_ref(); # never undef

This is like content (with all its caveats and deprecations) except that it is guaranteed to return an array reference. That is, if the given node has no _content attribute, the content method would return that undef, but content_array_ref would set the given node’s _content value to [] (a reference to a new, empty array), and return that.

content_refs_list

@content_refs = $h->content_refs_list;

This returns a list of scalar references to each element of $h’s content list. This is useful in case you want to in-place edit any large text segments without having to get a copy of the current value of that segment value, modify that copy, then use the splice_content to replace the old with the new. Instead, here you can in-place edit:

foreach my $item_r ($h->content_refs_list) { next if ref $$item_r; $$item_r =~ s/honour/honor/g; }

You could currently achieve the same affect with:

foreach my $item (@{ $h->content_array_ref }) { # deprecated! next if ref $item; $item =~ s/honour/honor/g; }

…except that using the return value of $h->content or $h->content_array_ref to do that is deprecated, and just might stop working in the future.

implicit

$is_implicit = $h->implicit(); $h->implicit($make_implicit);

Returns (optionally sets) the _implicit attribute. This attribute is a flag that’s used for indicating that the element was not originally present in the source, but was added to the parse tree (by HTML::TreeBuilder, for example) in order to conform to the rules of HTML structure.

pos

$pos = $h->pos(); $h->pos($element);

Returns (and optionally sets) the _pos (for “current position”) pointer of $h. This attribute is a pointer used during some parsing operations, whose value is whatever HTML::Element element at or under $h is currently open, where $h->insert_element(NEW) will actually insert a new element.

(This has nothing to do with the Perl function called pos, for controlling where regular expression matching starts.)

If you set $h->pos($element), be sure that $element is either $h, or an element under $h.

If you’ve been modifying the tree under $h and are no longer sure $h->pos is valid, you can enforce validity with:

$h->pos(undef) unless $h->pos->is_inside($h);

all_attr

%attr = $h->all_attr();

Returns all this element’s attributes and values, as key-value pairs. This will include any internal attributes (i.e., ones not present in the original element, and which will not be represented if/when you call $h->as_HTML). Internal attributes are distinguished by the fact that the first character of their key (not value! key!) is an underscore (_).

Example output of $h->all_attr() : _parent, [object_value] , _tag, em, lang, en-US, _content, [array-ref value].

all_attr_names

@names = $h->all_attr_names(); $num_attrs = $h->all_attr_names();

Like all_attr, but only returns the names of the attributes. In scalar context, returns the number of attributes.

Example output of $h->all_attr_names() : _parent, _tag, lang, _content, .

all_external_attr

%attr = $h->all_external_attr();

Like all_attr, except that internal attributes are not present.

all_external_attr_names

@names = $h->all_external_attr_names(); $num_attrs = $h->all_external_attr_names();

Like all_attr_names, except that internal attributes’ names are not present (or counted).

id

$id = $h->id(); $h->id($string);

Returns (optionally sets to $string) the id attribute. $h->id(undef) deletes the id attribute.

$h->id(...) is basically equivalent to $h->attr(id, ...), except that when setting the attribute, this method returns the new value, not the old value.

idf

$id = $h->idf(); $h->idf($string);

Just like the id method, except that if you call $h->idf() and no id attribute is defined for this element, then it’s set to a likely-to-be-unique value, and returned. (The f is for force.)

STRUCTURE-MODIFYING METHODS

These methods are provided for modifying the content of trees by adding or changing nodes as parents or children of other nodes.

push_content

$h->push_content($element_or_text, …);

Adds the specified items to the end of the content list of the element $h. The items of content to be added should each be either a text segment (a string), an HTML::Element object, or an arrayref. Arrayrefs are fed thru $h->new_from_lol(that_arrayref) to convert them into elements, before being added to the content list of $h. This means you can say things concise things like:

$body->push_content( [br], [ul, map [li, $_], qw(Peaches Apples Pears Mangos) ] );

See the new_from_lol method’s documentation, far below, for more explanation.

Returns $h (the element itself).

The push_content method will try to consolidate adjacent text segments while adding to the content list. That’s to say, if $h’s content_list is

(foo bar , $some_node, baz!)

and you call

$h->push_content(quack?);

then the resulting content list will be this:

(foo bar , $some_node, baz!quack?)

and not this:

(foo bar , $some_node, baz!, quack?)

If that latter is what you want, you’ll have to override the feature of consolidating text by using splice_content, as in:

$h->splice_content(scalar($h->content_list),0,quack?);

Similarly, if you wanted to add ‘Skronk’ to the beginning of the content list, calling this:

$h->unshift_content(Skronk);

then the resulting content list will be this:

(Skronkfoo bar , $some_node, baz!)

and not this:

(Skronk, foo bar , $some_node, baz!)

What you’d to do get the latter is:

$h->splice_content(0,0,Skronk);

unshift_content

$h->unshift_content($element_or_text, …)

Just like push_content, but adds to the beginning of the $h element’s content list.

The items of content to be added should each be either a text segment (a string), an HTML::Element object, or an arrayref (which is fed thru new_from_lol).

The unshift_content method will try to consolidate adjacent text segments while adding to the content list. See above for a discussion of this.

Returns $h (the element itself).

splice_content

@removed = $h->splice_content($offset, $length, $element_or_text, …);

Detaches the elements from $h’s list of content-nodes, starting at $offset and continuing for $length items, replacing them with the elements of the following list, if any. Returns the elements (if any) removed from the content-list. If $offset is negative, then it starts that far from the end of the array, just like Perl’s normal splice function. If $length and the following list is omitted, removes everything from $offset onward.

The items of content to be added (if any) should each be either a text segment (a string), an arrayref (which is fed thru new_from_lol), or an HTML::Element object that’s not already a child of $h.

detach

$old_parent = $h->detach();

This unlinks $h from its parent, by setting its ‘parent’ attribute to undef, and by removing it from the content list of its parent (if it had one). The return value is the parent that was detached from (or undef, if $h had no parent to start with). Note that neither $h nor its parent are explicitly destroyed.

detach_content

@old_content = $h->detach_content();

This unlinks all of $h’s children from $h, and returns them. Note that these are not explicitly destroyed; for that, you can just use $h->delete_content.

replace_with

$h->replace_with( $element_or_text, … )

This replaces $h in its parent’s content list with the nodes specified. The element $h (which by then may have no parent) is returned. This causes a fatal error if $h has no parent. The list of nodes to insert may contain $h, but at most once. Aside from that possible exception, the nodes to insert should not already be children of $h’s parent.

Also, note that this method does not destroy $h if weak references are turned off Ω- use $h->replace_with(...)->delete if you need that.

preinsert

$h->preinsert($element_or_text…);

Inserts the given nodes right BEFORE $h in $h’s parent’s content list. This causes a fatal error if $h has no parent. None of the given nodes should be $h or other children of $h. Returns $h.

postinsert

$h->postinsert($element_or_text…)

Inserts the given nodes right AFTER $h in $h’s parent’s content list. This causes a fatal error if $h has no parent. None of the given nodes should be $h or other children of $h. Returns $h.

replace_with_content

$h->replace_with_content();

This replaces $h in its parent’s content list with its own content. The element $h (which by then has no parent or content of its own) is returned. This causes a fatal error if $h has no parent. Also, note that this does not destroy $h if weak references are turned off Ω- use $h->replace_with_content->delete if you need that.

delete_content

$h->delete_content(); $h->destroy_content(); # alias

Clears the content of $h, calling $h->delete for each content element. Compare with $h->detach_content.

Returns $h.

destroy_content is an alias for this method.

delete

$h->delete(); $h->destroy(); # alias

Detaches this element from its parent (if it has one) and explicitly destroys the element and all its descendants. The return value is the empty list (or undef in scalar context).

Before version 5.00 of HTML::Element, you had to call delete when you were finished with the tree, or your program would leak memory. This is no longer necessary if weak references are enabled, see Weak References.

destroy

An alias for delete.

destroy_content

An alias for delete_content.

clone

$copy = $h->clone();

Returns a copy of the element (whose children are clones (recursively) of the original’s children, if any).

The returned element is parentless. Any ‘_pos’ attributes present in the source element/tree will be absent in the copy. For that and other reasons, the clone of an HTML::TreeBuilder object that’s in mid-parse (i.e, the head of a tree that HTML::TreeBuilder is elaborating) cannot (currently) be used to continue the parse.

You are free to clone HTML::TreeBuilder trees, just as long as: 1) they’re done being parsed, or 2) you don’t expect to resume parsing into the clone. (You can continue parsing into the original; it is never affected.)

clone_list

@copies = HTML::Element->clone_list(…nodes…);

Returns a list consisting of a copy of each node given. Text segments are simply copied; elements are cloned by calling $it->clone on each of them.

Note that this must be called as a class method, not as an instance method. clone_list will croak if called as an instance method. You can also call it like so:

ref($h)->clone_list(…nodes…)

normalize_content

$h->normalize_content

Normalizes the content of $h Ω- i.e., concatenates any adjacent text nodes. (Any undefined text segments are turned into empty-strings.) Note that this does not recurse into $h’s descendants.

delete_ignorable_whitespace

$h->delete_ignorable_whitespace()

This traverses under $h and deletes any text segments that are ignorable whitespace. You should not use this if $h is under a <pre> element.

insert_element

$h->insert_element($element, $implicit);

Inserts (via push_content) a new element under the element at $h->pos(). Then updates $h->pos() to point to the inserted element, unless $element is a prototypically empty element like <br>, <hr>, <img>, etc. The new $h->pos() is returned. This method is useful only if your particular tree task involves setting $h->pos().

DUMPING METHODS

dump

$h->dump() $h->dump(*FH) ; # or *FH{IO} or $fh_obj

Prints the element and all its children to STDOUT (or to a specified filehandle), in a format useful only for debugging. The structure of the document is shown by indentation (no end tags).

as_HTML

$s = $h->as_HTML(); $s = $h->as_HTML($entities); $s = $h->as_HTML($entities, $indent_char); $s = $h->as_HTML($entities, $indent_char, \optional_end_tags);

Returns a string representing in HTML the element and its descendants. The optional argument $entities specifies a string of the entities to encode. For compatibility with previous versions, specify <>& here. If omitted or undef, all unsafe characters are encoded as HTML entities. See HTML::Entities for details. If passed an empty string, no entities are encoded.

If $indent_char is specified and defined, the HTML to be output is intented, using the string you specify (which you probably should set to , or some number of spaces, if you specify it).

If \%optional_end_tags is specified and defined, it should be a reference to a hash that holds a true value for every tag name whose end tag is optional. Defaults to \%HTML::Element::optionalEndTag, which is an alias to %HTML::Tagset::optionalEndTag, which, at time of writing, contains true values for p, li, dt, dd. A useful value to pass is an empty hashref, {}, which means that no end-tags are optional for this dump. Otherwise, possibly consider copying %HTML::Tagset::optionalEndTag to a hash of your own, adding or deleting values as you like, and passing a reference to that hash.

as_text

$s = $h->as_text(); $s = $h->as_text(skip_dels => 1);

Returns a string consisting of only the text parts of the element’s descendants. Any whitespace inside the element is included unchanged, but whitespace not in the tree is never added. But remember that whitespace may be ignored or compacted by HTML::TreeBuilder during parsing (depending on the value of the ignore_ignorable_whitespace and no_space_compacting attributes). Also, since whitespace is never added during parsing,

HTML::TreeBuilder->new_from_content("<p>a</p><p>b</p>”) ->as_text;

returns "ab", not "a b" or "a b".

Text under <script> or <style> elements is never included in what’s returned. If skip_dels is true, then text content under <del> nodes is not included in what’s returned.

as_trimmed_text

$s = $h->as_trimmed_text(…); $s = $h->as_trimmed_text(extra_chars => �); # remove   $s = $h->as_text_trimmed(…); # alias

This is just like as_text(...) except that leading and trailing whitespace is deleted, and any internal whitespace is collapsed.

This will not remove non-breaking spaces, Unicode spaces, or any other non-ASCII whitespace unless you supply the extra characters as a string argument (e.g. $h->as_trimmed_text(extra_chars => �)). extra_chars may be any string that can appear inside a character class, including ranges like a-z, POSIX character classes like [:alpha:], and character class escapes like \p{Zs}.

as_XML

$s = $h->as_XML()

Returns a string representing in XML the element and its descendants.

The XML is not indented.

as_Lisp_form

$s = $h->as_Lisp_form();

Returns a string representing the element and its descendants as a Lisp form. Unsafe characters are encoded as octal escapes.

The Lisp form is indented, and contains external (href, etc.) as well as internal attributes (_tag, _content, _implicit, etc.), except for _parent, which is omitted.

Current example output for a given element:

(”_tag” “img” “border” “0” “src” “pie.png” “usemap” “#main.map”)

format

$s = $h->format; # use HTML::FormatText $s = $h->format($formatter);

Formats text output. Defaults to HTML::FormatText.

Takes a second argument that is a reference to a formatter.

starttag

$start = $h->starttag(); $start = $h->starttag($entities);

Returns a string representing the complete start tag for the element. I.e., leading <, tag name, attributes, and trailing >. All values are surrounded with double-quotes, and appropriate characters are encoded. If $entities is omitted or undef, all unsafe characters are encoded as HTML entities. See HTML::Entities for details. If you specify some value for $entities, remember to include the double-quote character in it. (Previous versions of this module would basically behave as if &"> were specified for $entities.) If $entities is an empty string, no entity is escaped.

starttag_XML

$start = $h->starttag_XML();

Returns a string representing the complete start tag for the element.

endtag

$end = $h->endtag();

Returns a string representing the complete end tag for this element. I.e., </, tag name, and >.

endtag_XML

$end = $h->endtag_XML();

Returns a string representing the complete end tag for this element. I.e., </, tag name, and >.

SECONDARY STRUCTURAL METHODS

These methods all involve some structural aspect of the tree; either they report some aspect of the tree’s structure, or they involve traversal down the tree, or walking up the tree.

is_inside

$inside = $h->is_inside(tag, $element, …);

Returns true if the $h element is, or is contained anywhere inside an element that is any of the ones listed, or whose tag name is any of the tag names listed. You can use any mix of elements and tag names.

is_empty

$empty = $h->is_empty();

Returns true if $h has no content, i.e., has no elements or text segments under it. In other words, this returns true if $h is a leaf node, AKA a terminal node. Do not confuse this sense of empty with another sense that it can have in SGML/HTML/XML terminology, which means that the element in question is of the type (like HTML’s <hr>, <br>, <img>, etc.) that can’t have any content.

That is, a particular <p> element may happen to have no content, so $that_p_element->is_empty will be true Ω- even though the prototypical <p> element isn’t empty (not in the way that the prototypical <hr> element is).

If you think this might make for potentially confusing code, consider simply using the clearer exact equivalent: not($h->content_list).

pindex

$index = $h->pindex();

Return the index of the element in its parent’s contents array, such that $h would equal

$h->parent->content->[$h->pindex] # or ($h->parent->content_list)[$h->pindex]

assuming $h isn’t root. If the element $h is root, then $h->pindex returns undef.

left

$element = $h->left(); @elements = $h->left();

In scalar context: returns the node that’s the immediate left sibling of $h. If $h is the leftmost (or only) child of its parent (or has no parent), then this returns undef.

In list context: returns all the nodes that’re the left siblings of $h (starting with the leftmost). If $h is the leftmost (or only) child of its parent (or has no parent), then this returns an empty list.

(See also $h->preinsert(LIST).)

$element = $h->right(); @elements = $h->right();

In scalar context: returns the node that’s the immediate right sibling of $h. If $h is the rightmost (or only) child of its parent (or has no parent), then this returns undef.

In list context: returns all the nodes that’re the right siblings of $h, starting with the leftmost. If $h is the rightmost (or only) child of its parent (or has no parent), then this returns an empty list.

(See also $h->postinsert(LIST).)

address

$address = $h->address(); $element_or_text = $h->address($address);

The first form (with no parameter) returns a string representing the location of $h in the tree it is a member of. The address consists of numbers joined by a ‘.’, starting with ‘0’, and followed by the pindexes of the nodes in the tree that are ancestors of $h, starting from the top.

So if the way to get to a node starting at the root is to go to child 2 of the root, then child 10 of that, and then child 0 of that, and then you’re there Ω- then that node’s address is 0.2.10.0.

As a bit of a special case, the address of the root is simply 0.

I forsee this being used mainly for debugging, but you may find your own uses for it.

$element_or_text = $h->address($address);

This form returns the node (whether element or text-segment) at the given address in the tree that $h is a part of. (That is, the address is resolved starting from $h->root.)

If there is no node at the given address, this returns undef.

You can specify relative addressing (i.e., that indexing is supposed to start from $h and not from $h->root) by having the address start with a period Ω- e.g., $h->address(".3.2") will look at child 3 of $h, and child 2 of that.

depth

$depth = $h->depth();

Returns a number expressing $h’s depth within its tree, i.e., how many steps away it is from the root. If $h has no parent (i.e., is root), its depth is 0.

root

$root = $h->root();

Returns the element that’s the top of $h’s tree. If $h is root, this just returns $h. (If you want to test whether $h is the root, instead of asking what its root is, just test not($h->parent).)

lineage

@lineage = $h->lineage();

Returns the list of $h’s ancestors, starting with its parent, and then that parent’s parent, and so on, up to the root. If $h is root, this returns an empty list.

If you simply want a count of the number of elements in $h’s lineage, use $h->depth.

lineage_tag_names

@names = $h->lineage_tag_names();

Returns the list of the tag names of $h’s ancestors, starting with its parent, and that parent’s parent, and so on, up to the root. If $h is root, this returns an empty list. Example output: (em, td, tr, table, body, html)

Equivalent to:

map { $_->tag } $h->lineage;

descendants

@descendants = $h->descendants();

In list context, returns the list of all $h’s descendant elements, listed in pre-order (i.e., an element appears before its content-elements). Text segments DO NOT appear in the list. In scalar context, returns a count of all such elements.

descendents

This is just an alias to the descendants method, for people who can’t spell.

find_by_tag_name

@elements = $h->find_by_tag_name(tag, …); $first_match = $h->find_by_tag_name(tag, …);

In list context, returns a list of elements at or under $h that have any of the specified tag names. In scalar context, returns the first (in pre-order traversal of the tree) such element found, or undef if none.

find

This is just an alias to find_by_tag_name. (There was once going to be a whole find_* family of methods, but then look_down filled that niche, so there turned out not to be much reason for the verboseness of the name find_by_tag_name.)

find_by_attribute

@elements = $h->find_by_attribute(attribute, value); $first_match = $h->find_by_attribute(attribute, value);

In a list context, returns a list of elements at or under $h that have the specified attribute, and have the given value for that attribute. In a scalar context, returns the first (in pre-order traversal of the tree) such element found, or undef if none.

This method is deprecated in favor of the more expressive look_down method, which new code should use instead.

look_down

@elements = $h->look_down( …criteria… ); $first_match = $h->look_down( …criteria… );

This starts at $h and looks thru its element descendants (in pre-order), looking for elements matching the criteria you specify. In list context, returns all elements that match all the given criteria; in scalar context, returns the first such element (or undef, if nothing matched).

There are three kinds of criteria you can specify:

(attr_name, attr_value)
This means you’re looking for an element with that value for that attribute. Example: "alt", "pix!". Consider that you can search on internal attribute values too: "_tag", "p".

(attr_name, qr/…/)
This means you’re looking for an element whose value for that attribute matches the specified Regexp object.

a coderef
This means you’re looking for elements where coderef->(each_element) returns true. Example: my @wide_pix_images = $h->look_down( _tag => “img”, alt => “pix!”, sub { $_[0]->attr(width) > 350 } );

Note that (attr_name, attr_value) and (attr_name, qr/.../) criteria are almost always faster than coderef criteria, so should presumably be put before them in your list of criteria. That is, in the example above, the sub ref is called only for elements that have already passed the criteria of having a _tag attribute with value img, and an alt attribute with value pix!. If the coderef were first, it would be called on every element, and then what elements pass that criterion (i.e., elements for which the coderef returned true) would be checked for their _tag and alt attributes.

Note that comparison of string attribute-values against the string value in (attr_name, attr_value) is case-INsensitive! A criterion of (align, right) will match an element whose align value is RIGHT, or right or rIGhT, etc.

Note also that look_down considers "” (empty-string) and undef to be different things, in attribute values. So this:

$h->look_down(“alt”, “”)

will find elements with an alt attribute, but where the value for the alt attribute is “”. But this:

$h->look_down(“alt”, undef)

is the same as:

$h->look_down(sub { !defined($_[0]->attr(alt)) } )

That is, it finds elements that do not have an alt attribute at all (or that do have an alt attribute, but with a value of undef Ω- which is not normally possible).

Note that when you give several criteria, this is taken to mean you’re looking for elements that match all your criterion, not just any of them. In other words, there is an implicit and, not an or. So if you wanted to express that you wanted to find elements with a name attribute with the value foo or with an id attribute with the value baz, you’d have to do it like:

@them = $h->look_down( sub { # the lcs are to fold case lc($_[0]->attr(name)) eq foo or lc($_[0]->attr(id)) eq baz } );

Coderef criteria are more expressive than (attr_name, attr_value) and (attr_name, qr/.../) criteria, and all (attr_name, attr_value) and (attr_name, qr/.../) criteria could be expressed in terms of coderefs. However, (attr_name, attr_value) and (attr_name, qr/.../) criteria are a convenient shorthand. (In fact, look_down itself is basically shorthand too, since anything you can do with look_down you could do by traversing the tree, either with the traverse method or with a routine of your own. However, look_down often makes for very concise and clear code.)

look_up

@elements = $h->look_up( …criteria… ); $first_match = $h->look_up( …criteria… );

This is identical to $h->look_down, except that whereas $h->look_down basically scans over the list:

($h, $h->descendants)

$h->look_up instead scans over the list

($h, $h->lineage)

So, for example, this returns all ancestors of $h (possibly including $h itself) that are <td> elements with an align attribute with a value of right (or RIGHT, etc.):

$h->look_up(”_tag”, “td”, “align”, “right”);

traverse

$h->traverse(…options…)

Lengthy discussion of HTML::Element’s unnecessary and confusing traverse method has been moved to a separate file: HTML::Element::traverse

attr_get_i

@values = $h->attr_get_i(attribute); $first_value = $h->attr_get_i(attribute);

In list context, returns a list consisting of the values of the given attribute for $h and for all its ancestors starting from $h and working its way up. Nodes with no such attribute are skipped. (attr_get_i stands for attribute get, with inheritance.) In scalar context, returns the first such value, or undef if none.

Consider a document consisting of:

<html lang=i-klingon> <head><title>Pati Pata</title></head> <body> <h1 lang=la>Stuff</h1> <p lang=es-MX align=center> Foo bar baz <cite>Quux</cite>. </p> <p>Hooboy.</p> </body> </html>

If $h is the <cite> element, $h->attr_get_i("lang") in list context will return the list (es-MX, i-klingon). In scalar context, it will return the value es-MX.

If you call with multiple attribute names…

@values = $h->attr_get_i(a1, a2, a3); $first_value = $h->attr_get_i(a1, a2, a3);

…in list context, this will return a list consisting of the values of these attributes which exist in $h and its ancestors. In scalar context, this returns the first value (i.e., the value of the first existing attribute from the first element that has any of the attributes listed). So, in the above example,

$h->attr_get_i(lang, align);

will return:

(es-MX, center, i-klingon) # in list context or es-MX # in scalar context.

But note that this:

$h->attr_get_i(align, lang);

will return:

(center, es-MX, i-klingon) # in list context or center # in scalar context.

tagname_map

$hash_ref = $h->tagname_map();

Scans across $h and all its descendants, and makes a hash (a reference to which is returned) where each entry consists of a key that’s a tag name, and a value that’s a reference to a list to all elements that have that tag name. I.e., this method returns:

{ # Across $h and all descendants… a => [ …list of all <a> elements… ], em => [ …list of all <em> elements… ], img => [ …list of all <img> elements… ], }

(There are entries in the hash for only those tagnames that occur at/under $h Ω- so if there’s no <img> elements, there’ll be no img entry in the returned hashref.)

Example usage:

my $map_r = $h->tagname_map(); my @heading_tags = sort grep m/^h\d$/s, keys %$map_r; if(@heading_tags) { print “Heading levels used: @heading_tags “; } else { print “No headings. " }

$links_array_ref = $h->extract_links(); $links_array_ref = $h->extract_links(@wantedTypes);

Returns links found by traversing the element and all of its children and looking for attributes (like href in an <a> element, or src in an <img> element) whose values represent links. The return value is a reference to an array. Each element of the array is reference to an array with four items: the link-value, the element that has the attribute with that link-value, and the name of that attribute, and the tagname of that element. (Example: [http://www.suck.com/, $elem_obj , href, a].) You may or may not end up using the element itself Ω- for some purposes, you may use only the link value.

You might specify that you want to extract links from just some kinds of elements (instead of the default, which is to extract links from all the kinds of elements known to have attributes whose values represent links). For instance, if you want to extract links from only <a> and <img> elements, you could code it like this:

for (@{ $e->extract_links(a, img) }) { my($link, $element, $attr, $tag) = @$_; print “Hey, theres a $tag that links to “, $link, “, in its $attr attribute, at “, $element->address(), “. “; }

simplify_pres

$h->simplify_pres();

In text bits under PRE elements that are at/under $h, this routine nativizes all newlines, and expands all tabs.

That is, if you read a file with lines delimited by `

1718 - Linux cli command sigstack

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigstack and provides detailed information about the command sigstack, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigstack.

NAME 🖥️ sigstack 🖥️

set and/or get signal stack context

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
int sigaltstack(const stack_t *_Nullable restrict ss,
 stack_t *_Nullable restrict old_ss);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sigaltstack():

    _XOPEN_SOURCE >= 500
        || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L
        || /* glibc <= 2.19: */ _BSD_SOURCE

DESCRIPTION

sigaltstack() allows a thread to define a new alternate signal stack and/or retrieve the state of an existing alternate signal stack. An alternate signal stack is used during the execution of a signal handler if the establishment of that handler (see sigaction(2)) requested it.

The normal sequence of events for using an alternate signal stack is the following:

1.
Allocate an area of memory to be used for the alternate signal stack.

2.
Use sigaltstack() to inform the system of the existence and location of the alternate signal stack.

3.
When establishing a signal handler using sigaction(2), inform the system that the signal handler should be executed on the alternate signal stack by specifying the SA_ONSTACK flag.

The ss argument is used to specify a new alternate signal stack, while the old_ss argument is used to retrieve information about the currently established signal stack. If we are interested in performing just one of these tasks, then the other argument can be specified as NULL.

The stack_t type used to type the arguments of this function is defined as follows:

typedef struct {
    void  *ss_sp;     /* Base address of stack */
    int    ss_flags;  /* Flags */
    size_t ss_size;   /* Number of bytes in stack */
} stack_t;

To establish a new alternate signal stack, the fields of this structure are set as follows:

ss.ss_flags
This field contains either 0, or the following flag:

SS_AUTODISARM (since Linux 4.7)
Clear the alternate signal stack settings on entry to the signal handler. When the signal handler returns, the previous alternate signal stack settings are restored.

This flag was added in order to make it safe to switch away from the signal handler with swapcontext(3). Without this flag, a subsequently handled signal will corrupt the state of the switched-away signal handler. On kernels where this flag is not supported, sigaltstack() fails with the error EINVAL when this flag is supplied.

ss.ss_sp
This field specifies the starting address of the stack. When a signal handler is invoked on the alternate stack, the kernel automatically aligns the address given in ss.ss_sp to a suitable address boundary for the underlying hardware architecture.

ss.ss_size
This field specifies the size of the stack. The constant SIGSTKSZ is defined to be large enough to cover the usual size requirements for an alternate signal stack, and the constant MINSIGSTKSZ defines the minimum size required to execute a signal handler.

To disable an existing stack, specify ss.ss_flags as SS_DISABLE. In this case, the kernel ignores any other flags in ss.ss_flags and the remaining fields in ss.

If old_ss is not NULL, then it is used to return information about the alternate signal stack which was in effect prior to the call to sigaltstack(). The old_ss.ss_sp and old_ss.ss_size fields return the starting address and size of that stack. The old_ss.ss_flags may return either of the following values:

SS_ONSTACK
The thread is currently executing on the alternate signal stack. (Note that it is not possible to change the alternate signal stack if the thread is currently executing on it.)

SS_DISABLE
The alternate signal stack is currently disabled.

Alternatively, this value is returned if the thread is currently executing on an alternate signal stack that was established using the SS_AUTODISARM flag. In this case, it is safe to switch away from the signal handler with swapcontext(3). It is also possible to set up a different alternative signal stack using a further call to sigaltstack().

SS_AUTODISARM
The alternate signal stack has been marked to be autodisarmed as described above.

By specifying ss as NULL, and old_ss as a non-NULL value, one can obtain the current settings for the alternate signal stack without changing them.

RETURN VALUE

sigaltstack() returns 0 on success, or -1 on failure with errno set to indicate the error.

ERRORS

EFAULT
Either ss or old_ss is not NULL and points to an area outside of the process’s address space.

EINVAL
ss is not NULL and the ss_flags field contains an invalid flag.

ENOMEM
The specified size of the new alternate signal stack ss.ss_size was less than MINSIGSTKSZ.

EPERM
An attempt was made to change the alternate signal stack while it was active (i.e., the thread was already executing on the current alternate signal stack).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sigaltstack()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

SS_AUTODISARM is a Linux extension.

HISTORY

POSIX.1-2001, SUSv2, SVr4.

NOTES

The most common usage of an alternate signal stack is to handle the SIGSEGV signal that is generated if the space available for the standard stack is exhausted: in this case, a signal handler for SIGSEGV cannot be invoked on the standard stack; if we wish to handle it, we must use an alternate signal stack.

Establishing an alternate signal stack is useful if a thread expects that it may exhaust its standard stack. This may occur, for example, because the stack grows so large that it encounters the upwardly growing heap, or it reaches a limit established by a call to setrlimit(RLIMIT_STACK, &rlim). If the standard stack is exhausted, the kernel sends the thread a SIGSEGV signal. In these circumstances the only way to catch this signal is on an alternate signal stack.

On most hardware architectures supported by Linux, stacks grow downward. sigaltstack() automatically takes account of the direction of stack growth.

Functions called from a signal handler executing on an alternate signal stack will also use the alternate signal stack. (This also applies to any handlers invoked for other signals while the thread is executing on the alternate signal stack.) Unlike the standard stack, the system does not automatically extend the alternate signal stack. Exceeding the allocated size of the alternate signal stack will lead to unpredictable results.

A successful call to execve(2) removes any existing alternate signal stack. A child process created via fork(2) inherits a copy of its parent’s alternate signal stack settings. The same is also true for a child process created using clone(2), unless the clone flags include CLONE_VM and do not include CLONE_VFORK, in which case any alternate signal stack that was established in the parent is disabled in the child process.

sigaltstack() supersedes the older sigstack() call. For backward compatibility, glibc also provides sigstack(). All new applications should be written using sigaltstack().

History

4.2BSD had a sigstack() system call. It used a slightly different struct, and had the major disadvantage that the caller had to know the direction of stack growth.

BUGS

In Linux 2.2 and earlier, the only flag that could be specified in ss.sa_flags was SS_DISABLE. In the lead up to the release of the Linux 2.4 kernel, a change was made to allow sigaltstack() to allow ss.ss_flags==SS_ONSTACK with the same meaning as ss.ss_flags==0 (i.e., the inclusion of SS_ONSTACK in ss.ss_flags is a no-op). On other implementations, and according to POSIX.1, SS_ONSTACK appears only as a reported flag in old_ss.ss_flags. On Linux, there is no need ever to specify SS_ONSTACK in ss.ss_flags, and indeed doing so should be avoided on portability grounds: various other systems give an error if SS_ONSTACK is specified in ss.ss_flags.

EXAMPLES

The following code segment demonstrates the use of sigaltstack() (and sigaction(2)) to install an alternate signal stack that is employed by a handler for the SIGSEGV signal:

stack_t ss;
ss.ss_sp = malloc(SIGSTKSZ);
if (ss.ss_sp == NULL) {
    perror("malloc");
    exit(EXIT_FAILURE);
}
ss.ss_size = SIGSTKSZ;
ss.ss_flags = 0;
if (sigaltstack(&ss, NULL) == -1) {
    perror("sigaltstack");
    exit(EXIT_FAILURE);
}
sa.sa_flags = SA_ONSTACK;
sa.sa_handler = handler();      /* Address of a signal handler */
sigemptyset(&sa.sa_mask);
if (sigaction(SIGSEGV, &sa, NULL) == -1) {
    perror("sigaction");
    exit(EXIT_FAILURE);
}

SEE ALSO

execve(2), setrlimit(2), sigaction(2), siglongjmp(3), sigsetjmp(3), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1719 - Linux cli command IO_All_MLDBMpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_All_MLDBMpm and provides detailed information about the command IO_All_MLDBMpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_All_MLDBMpm.

NAME 🖥️ IO_All_MLDBMpm 🖥️

MLDBM Support for IO::All

SYNOPSIS

See IO::All.

DESCRIPTION

<<<cpan-foot>>>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1720 - Linux cli command IO_All_FTPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_All_FTPpm and provides detailed information about the command IO_All_FTPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_All_FTPpm.

NAME 🖥️ IO_All_FTPpm 🖥️

Extends IO::All to FTP URLs

SYNOPSIS

use IO::All; “hello world " > io(ftp://localhost/test/x); # save to FTP io(ftp//example.org/pub/xyz) > io(xyz); # GET to file # two ways of getting a file with a password: $content < io(ftp://me:[email protected]/xyz); $content < io(ftp://example.org/xyz)->user(me)->password(secret);

DESCRIPTION

This module extends IO::All for dealing with FTP URLs. Note that you don’t need to use it explicitly, as it is autoloaded by IO::All whenever it sees something that looks like an FTP URL.

METHODS

This is a subclass of IO::All::LWP. The only new method is ftp, which can be used to create a blank IO::All::FTP object; or it can also take an FTP URL as a parameter. Note that in most cases it is simpler just to call io(‘ftp//example.com’), which calls the ftp method automatically.

OPERATOR OVERLOADING

The same operators from IO::All may be used. < GETs an FTP URL; > PUTs to an FTP URL.

SEE ALSO

IO::All::LWP, IO::All, LWP.

AUTHORS

Ivan Tubert-Brohman <[email protected]> and Brian Ingerson <[email protected]>

COPYRIGHT

Copyright (c) 2007. Ivan Tubert-Brohman and Brian Ingerson. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See <http://www.perl.com/perl/misc/Artistic.html>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1721 - Linux cli command sqrtf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sqrtf and provides detailed information about the command sqrtf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sqrtf.

NAME 🖥️ sqrtf 🖥️

square root function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double sqrt(double x);
float sqrtf(float x);
long double sqrtl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sqrtf(), sqrtl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the nonnegative square root of x.

RETURN VALUE

On success, these functions return the square root of x.

If x is a NaN, a NaN is returned.

If x is +0 (-0), +0 (-0) is returned.

If x is positive infinity, positive infinity is returned.

If x is less than -0, a domain error occurs, and a NaN is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x less than -0
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sqrt(), sqrtf(), sqrtl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

SEE ALSO

cbrt(3), csqrt(3), hypot(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1722 - Linux cli command zip_file_get_error

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_file_get_error and provides detailed information about the command zip_file_get_error, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_file_get_error.

libzip (-lzip)

function returns the zip_error associated with the zip_file

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1723 - Linux cli command innetgr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command innetgr and provides detailed information about the command innetgr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the innetgr.

NAME 🖥️ innetgr 🖥️

handle network group entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
int setnetgrent(const char *netgroup);
void endnetgrent(void);
int getnetgrent(char **restrict host,
 char **restrict user, char **restrict domain);
int getnetgrent_r(char **restrict host,
 char **restrict user, char **restrict domain,
 char buf[restrict .buflen], size_t buflen);
int innetgr(const char *netgroup, const char *host,
 const char *user, const char *domain);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

setnetgrent(), endnetgrent(), getnetgrent(), getnetgrent_r(), innetgr():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The netgroup is a SunOS invention. A netgroup database is a list of string triples (hostname, username, domainname) or other netgroup names. Any of the elements in a triple can be empty, which means that anything matches. The functions described here allow access to the netgroup databases. The file /etc/nsswitch.conf defines what database is searched.

The setnetgrent() call defines the netgroup that will be searched by subsequent getnetgrent() calls. The getnetgrent() function retrieves the next netgroup entry, and returns pointers in host, user, domain. A null pointer means that the corresponding entry matches any string. The pointers are valid only as long as there is no call to other netgroup-related functions. To avoid this problem you can use the GNU function getnetgrent_r() that stores the strings in the supplied buffer. To free all allocated buffers use endnetgrent().

In most cases you want to check only if the triplet (hostname, username, domainname) is a member of a netgroup. The function innetgr() can be used for this without calling the above three functions. Again, a null pointer is a wildcard and matches any string. The function is thread-safe.

RETURN VALUE

These functions return 1 on success and 0 for failure.

FILES

/etc/netgroup
/etc/nsswitch.conf

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setnetgrent(), getnetgrent_r(), innetgr()

Thread safety

MT-Unsafe race:netgrent locale

endnetgrent()

Thread safety

MT-Unsafe race:netgrent

getnetgrent()

Thread safety

MT-Unsafe race:netgrent race:netgrentbuf locale

In the above table, netgrent in race:netgrent signifies that if any of the functions setnetgrent(), getnetgrent_r(), innetgr(), getnetgrent(), or endnetgrent() are used in parallel in different threads of a program, then data races could occur.

VERSIONS

In the BSD implementation, setnetgrent() returns void.

STANDARDS

None.

HISTORY

setnetgrent(), endnetgrent(), getnetgrent(), and innetgr() are available on most UNIX systems. getnetgrent_r() is not widely available on other systems.

SEE ALSO

sethostent(3), setprotoent(3), setservent(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1724 - Linux cli command Net_DNS_RR_NULLpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_NULLpm and provides detailed information about the command Net_DNS_RR_NULLpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_NULLpm.

NAME 🖥️ Net_DNS_RR_NULLpm 🖥️

DNS NULL resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name NULL \ length hexdata …);

DESCRIPTION

Class for DNS null (NULL) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

rdlength

$rdlength = $rr->rdlength;

Returns the length of the record data section.

rdata

$rdata = $rr->rdata; $rr->rdata( $rdata );

Returns the record data section as binary data.

COPYRIGHT

Copyright (c)1997 Michael Fuhr.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC1035(3.3.10) <https://iana.org/go/rfc1035#section-3.3.10>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1725 - Linux cli command Image_ExifTool_MPCpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_MPCpm and provides detailed information about the command Image_ExifTool_MPCpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_MPCpm.

NAME 🖥️ Image_ExifTool_MPCpm 🖥️

Read Musepack audio meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to extract meta information from Musepack (MPC) audio files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.musepack.net/>

SEE ALSO

“MPC Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1726 - Linux cli command XML_DOM_AttDefpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_DOM_AttDefpm and provides detailed information about the command XML_DOM_AttDefpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_DOM_AttDefpm.

NAME 🖥️ XML_DOM_AttDefpm 🖥️

A single XML attribute definition in an ATTLIST in XML::DOM

DESCRIPTION

XML::DOM::AttDef extends XML::DOM::Node, but is not part of the DOM Level 1 specification.

Each object of this class represents one attribute definition in an AttlistDecl.

METHODS

getName
Returns the attribute name.

getDefault
Returns the default value, or undef.

isFixed
Whether the attribute value is fixed (see #FIXED keyword.)

isRequired
Whether the attribute value is required (see #REQUIRED keyword.)

isImplied
Whether the attribute value is implied (see #IMPLIED keyword.)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1727 - Linux cli command insque

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command insque and provides detailed information about the command insque, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the insque.

NAME 🖥️ insque 🖥️

insert/remove an item from a queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <search.h>
void insque(void *elem, void *prev);
void remque(void *elem);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

insque(), remque():

    _XOPEN_SOURCE >= 500
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

DESCRIPTION

The insque() and remque() functions manipulate doubly linked lists. Each element in the list is a structure of which the first two elements are a forward and a backward pointer. The linked list may be linear (i.e., NULL forward pointer at the end of the list and NULL backward pointer at the start of the list) or circular.

The insque() function inserts the element pointed to by elem immediately after the element pointed to by prev.

If the list is linear, then the call insque(elem, NULL) can be used to insert the initial list element, and the call sets the forward and backward pointers of elem to NULL.

If the list is circular, the caller should ensure that the forward and backward pointers of the first element are initialized to point to that element, and the prev argument of the insque() call should also point to the element.

The remque() function removes the element pointed to by elem from the doubly linked list.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

insque(), remque()

Thread safetyMT-Safe

VERSIONS

On ancient systems, the arguments of these functions were of type struct qelem *, defined as:

struct qelem {
    struct qelem *q_forw;
    struct qelem *q_back;
    char          q_data[1];
};

This is still what you will get if _GNU_SOURCE is defined before including <search.h>.

The location of the prototypes for these functions differs among several versions of UNIX. The above is the POSIX version. Some systems place them in <string.h>.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

BUGS

In glibc 2.4 and earlier, it was not possible to specify prev as NULL. Consequently, to build a linear list, the caller had to build a list using an initial call that contained the first two elements of the list, with the forward and backward pointers in each element suitably initialized.

EXAMPLES

The program below demonstrates the use of insque(). Here is an example run of the program:

$ ./a.out -c a b c
Traversing completed list:
    a
    b
    c
That was a circular list

Program source

#include <search.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
struct element {
    struct element *forward;
    struct element *backward;
    char *name;
};
static struct element *
new_element(void)
{
    struct element *e;
    e = malloc(sizeof(*e));
    if (e == NULL) {
        fprintf(stderr, "malloc() failed

“); exit(EXIT_FAILURE); } return e; } int main(int argc, char *argv[]) { struct element *first, *elem, prev; int circular, opt, errfnd; / The “-c” command-line option can be used to specify that the list is circular. / errfnd = 0; circular = 0; while ((opt = getopt(argc, argv, “c”)) != -1) { switch (opt) { case ‘c’: circular = 1; break; default: errfnd = 1; break; } } if (errfnd || optind >= argc) { fprintf(stderr, “Usage: %s [-c] string… “, argv[0]); exit(EXIT_FAILURE); } / Create first element and place it in the linked list. / elem = new_element(); first = elem; elem->name = argv[optind]; if (circular) { elem->forward = elem; elem->backward = elem; insque(elem, elem); } else { insque(elem, NULL); } / Add remaining command-line arguments as list elements. / while (++optind < argc) { prev = elem; elem = new_element(); elem->name = argv[optind]; insque(elem, prev); } / Traverse the list from the start, printing element names. */ printf(“Traversing completed list: “); elem = first; do { printf(” %s “, elem->name); elem = elem->forward; } while (elem != NULL && elem != first); if (elem == first) printf(“That was a circular list “); exit(EXIT_SUCCESS); }

SEE ALSO

queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1728 - Linux cli command Net_SSH2pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_SSH2pm and provides detailed information about the command Net_SSH2pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_SSH2pm.

NAME 🖥️ Net_SSH2pm 🖥️

Support for the SSH 2 protocol via libssh2.

SYNOPSIS

use Net::SSH2; my $ssh2 = Net::SSH2->new(); $ssh2->connect(example.com) or $ssh2->die_with_error; $ssh->check_hostkey(ask) or $ssh2->die_with_error; $ssh->auth_publickey($ENV{USER}, “$ENV{HOME}/.ssh/id_rsa.pub”, “$ENV{HOME}/.ssh/id_rsa”) or $ssh->die_with_error; my $chan = $ssh2->channel() or $ssh2->die_with_error; $chan->exec(ls) or $ssh2->die_with_error; print while <$chan>; print “EXIT CODE: “, $chan->exit_status, " “; $chan->close; my $sftp = $ssh2->sftp() or $ssh2->die_with_error;; my $fh = $sftp->open(/etc/passwd) or $sftp->die_with_error; print while <$fh>;

DESCRIPTION

Net::SSH2 is a Perl interface to the libssh2 (<http://www.libssh2.org>) library. It supports the SSH2 protocol (there is no support for SSH1) with all of the key exchanges, ciphers, and compression of libssh2.

Even if the module can be compiled and linked against very old versions of the library, nothing below 1.5.0 should really be used (older versions were quite buggy and unreliable) and version 1.7.0 or later is recommended.

Error handling

Unless otherwise indicated, methods return a true value on success and undef on failure; use the “error” method to get extended error information.

Important: methods in Net::SSH2 not backed by libssh2 functions (i.e. “check_hostkey” or SCP related methods) require libssh2 1.7.0 or later in order to set the error state. That means that after any of those methods fails, “error” would not return the real code but just some bogus result when an older version of the library is used.

Typical usage

The typical usage order is as follows:

  1. Create the SSH2 object calling “new”.

  2. Configure the session if required. For instance, enabling compression or picking some specific encryption methods.

  3. Establish the SSH connection calling the method “connect”.

  4. Check the remote host public key calling “check_hostkey”.

  5. Authenticate calling the required authentication methods.

  6. Call “channel” and related methods to create new bidirectional communication channels over the SSH connection.

  7. Close the connection letting the Net::SSH2 object go out of scope or calling “disconnect” explicitly.

CONSTANTS

All the constants defined in libssh2 can be imported from Net::SSH2.

For instance:

use Net::SSH2 qw(LIBSSH2_CHANNEL_EXTENDED_DATA_MERGE LIBSSH2_CHANNEL_FLUSH_ALL LIBSSH2_HOSTKEY_POLICY_ASK);

Though note that most methods accept the uncommon part of the constant name as a string. For instance the following two method calls are equivalent:

$channel->ext_data(LIBSSH2_CHANNEL_EXTENDED_DATA_MERGE); $channel->ext_data(merge);

Tags can be used to import the following constant subsets:

callback channel error socket trace hash method disconnect policy fx fxf sftp

The tag all can also be used to import all of them.

METHODS

new ( %options )

Create new Net::SSH2 object representing a SSH session.

The accepted options are as follows:

timeout
Sets the default timeout in milliseconds. See “timeout”.

trace
Sets tracing. See “trace”. Example: my $ssh2 = Net::SSH2->new(trace => -1); Note that tracing requires a version of libssh2 compiled with debugging support.

debug
Enable debugging. See “debug”.

compress
Sets flag LIBSSH2_FLAG_COMPRESS. See “flag”.

sigpipe
Sets flag LIBSSH2_FLAG_SIGPIPE. See “flag”.

Set the SSH2 banner text sent to the remote host (prepends required “SSH-2.0-”).

version

In scalar context, returns libssh2 version/patch e.g. 0.18 or “0.18.0-20071110”. In list context, returns that version plus the numeric version (major, minor, and patch, each encoded as 8 bits, e.g. 0x001200 for version 0.18) and the default banner text (e.g. “SSH-2.0-libssh2_0.18.0-20071110”).

error

Returns the last error code. In list context, returns (code, error name, error string).

Note that the returned error value is only meaningful after some other method indicates an error by returning false.

die_with_error ( [message] )

Calls die with the given message and the error information from the object appended.

For instance:

$ssh2->connect(“ajhkfhdklfjhklsjhd”, 22) or $ssh2->die_with_error; # dies as: # Unable to connect to remote host: Invalid argument (-1 LIBSSH2_ERROR_SOCKET_NONE)

sock

Returns a reference to the underlying IO::Socket object (usually a derived class as IO::Socket::IP or IO::Socket::INET), or undef if not yet connected.

trace

Calls libssh2_trace with supplied bitmask. In order to enable all tracing pass -1 as follows:

$ssh2->trace(-1);

A version of libssh2 compiled with tracing support is required.

timeout ( timeout_ms )

Enables a global timeout (in milliseconds) which will affect every action (requires libssh2 1.2.9 or later).

By default, or if you set the timeout to zero, Net::SSH2 has no timeout.

Note that timeout errors may leave the SSH connection in an inconsistent state and further operations may fail or behave incorrectly. Actually, some methods are able to recover after a timeout error and others are not.

Don’t hesitate to report any issue you encounter related to this so that it can be fixed or at least, documented!

method ( type [, values… ] )

Sets or gets a method preference. For get, pass in the type only; to set, pass in either a list of values or a comma-separated string. Values can only be queried after the session is connected.

The following methods can be set or queried:

LIBSSH2_METHOD_KEX
Key exchange method names. Supported values:

diffie-hellman-group1-sha1
Diffie-Hellman key exchange with SHA-1 as hash, and Oakley Group 2 (see RFC 2409).

diffie-hellman-group14-sha1
Diffie-Hellman key exchange with SHA-1 as hash, and Oakley Group 14 (see RFC 3526).

diffie-hellman-group-exchange-sha1
Diffie-Hellman key exchange with SHA-1 as hash, using a safe-prime/generator pair (chosen by server) of arbitrary strength (specified by client) (see IETF draft secsh-dh-group-exchange).

LIBSSH2_METHOD_HOSTKEY
Public key algorithms. Supported values:

ssh-dss
Based on the Digital Signature Standard (FIPS-186-2).

ssh-rsa
Based on PKCS#1 (RFC 3447).

LIBSSH2_METHOD_CRYPT_CS
Encryption algorithm from client to server. Supported algorithms:

aes256-cbc
AES in CBC mode, with 256-bit key.

[email protected]
Alias for aes256-cbc.

aes192-cbc
AES in CBC mode, with 192-bit key.

aes128-cbc
AES in CBC mode, with 128-bit key.

blowfish-cbc
Blowfish in CBC mode.

arcfour
ARCFOUR stream cipher.

cast128-cbc
CAST-128 in CBC mode.

3des-cbc
Three-key 3DES in CBC mode.

none
No encryption.

LIBSSH2_METHOD_CRYPT_SC
Encryption algorithm from server to client. See the LIBSSH2_METHOD_CRYPT_CS entry above for supported algorithms.

LIBSSH2_METHOD_MAC_CS
Message Authentication Code (MAC) algorithms from client to server. Supported values:

hmac-sha1
SHA-1 with 20-byte digest and key length.

hmac-sha1-96
SHA-1 with 20-byte key length and 12-byte digest length.

hmac-md5
MD5 with 16-byte digest and key length.

hmac-md5-96
MD5 with 16-byte key length and 12-byte digest length.

hmac-ripemd160
RIPEMD-160 algorithm with 20-byte digest length.

[email protected]
Alias for hmac-ripemd160.

none
No encryption.

LIBSSH2_METHOD_MAC_SC
Message Authentication Code (MAC) algorithms from server to client. See LIBSSH2_METHOD_MAC_CS for supported algorithms.

LIBSSH2_METHOD_COMP_CS
Compression methods from client to server. Supported values:

zlib
The “zlib” compression method as described in RFC 1950 and RFC 1951.

none
No compression

LIBSSH2_METHOD_COMP_SC
Compression methods from server to client. See LIBSSH2_METHOD_COMP_CS for supported compression methods.

connect ( handle | host [, port])

The argument combinations accepted are as follows:

a glob or “IO::*” object reference
Note that tied file handles are not acceptable. The underlying libssh2 requires real file handles.

host [, port]
In order to handle IPv6 addresses the optional module IO::Socket::IP is required. The port number defaults to 22.

This method used to accept a Timeout argument. That feature has been replaced by the constructor timeout option but note that it takes milliseconds instead of seconds!

disconnect ( [description [, reason [, language]]] )

Sends a clean disconnect message to the remote server. Default values are empty strings for description and language, and SSH_DISCONNECT_BY_APPLICATION for the reason.

hostname

The name of the remote host given at connect time or retrieved from the TCP layer.

port

The port number of the remote SSH server.

hostkey_hash ( hash type )

Returns a hash of the host key; note that the key is raw data and may contain nulls or control characters.

The type may be as follows:

LIBSSH2_HOSTKEY_HASH_MD5
MD5 hash, 16 bytes long (requires libssh2 compiled with MD5 support).

LIBSSH2_HOSTKEY_HASH_SHA1
SHA1 hash, 20 bytes long.

Note: in previous versions of the module this method was called hostkey.

remote_hostkey

Returns the public key from the remote host and its type which is one of LIBSSH2_HOSTKEY_TYPE_RSA, LIBSSH2_HOSTKEY_TYPE_DSS, or LIBSSH2_HOSTKEY_TYPE_UNKNOWN.

check_hostkey( [policy, [known_hosts_path [, comment] ] ] )

Looks for the remote host key inside the given known host file (defaults to ~/.ssh/known_hosts).

On success, this method returns the result of the call done under the hood to Net::SSH2::KnownHost::check (i.e. LIBSSH2_KNOWNHOST_CHECK_MATCH, LIBSSH2_KNOWNHOST_CHECK_FAILURE, LIBSSH2_KNOWNHOST_CHECK_NOTFOUND or LIBSSH2_KNOWNHOST_CHECK_MISMATCH).

On failure it returns undef.

The accepted policies are as follows:

LIBSSH2_HOSTKEY_POLICY_STRICT
Only host keys already present in the known hosts file are accepted. This is the default policy.

LIBSSH2_HOSTKEY_POLICY_ASK
If the host key is not present in the known hosts file, the user is asked if it should be accepted or not. If accepted, the key is added to the known host file with the given comment.

LIBSSH2_HOSTKEY_POLICY_TOFU
Trust On First Use: if the host key is not present in the known hosts file, it is added there and accepted.

LIBSSH2_HOSTKEY_POLICY_ADVISORY
The key is always accepted, but it is never saved into the known host file.

callback
If a reference to a subroutine is given, it is called when the key is not present in the known hosts file or a different key is found. The arguments passed to the callback are the session object, the matching error (LIBSSH2_KNOWNHOST_CHECK_FAILURE, LIBSSH2_KNOWNHOST_CHECK_NOTFOUND or LIBSSH2_KNOWNHOST_CHECK_MISMATCH) and the comment.

auth_list ( [username] )

Returns the authentication methods accepted by the server. In scalar context the methods are returned as a comma separated string.

When the server accepted an unauthenticated session for the given username, this method returns undef but “auth_ok” returns true.

auth_ok

Returns true when the session is authenticated.

auth_password ( username [, password [, callback ]] )

Authenticates using a password.

If the password has expired, if a callback code reference was given, it’s called as callback($self, $username) and should return a password. If no callback is provided, LIBSSH2_ERROR_PASSWORD_EXPIRED is returned.

auth_password_interact ( username [, callback])

Prompts the user for the password interactively (requires Term::ReadKey).

auth_publickey ( username, publickey_path, privatekey_path [, passphrase ] )

Authenticate using the given private key and an optional passphrase.

When libssh2 is compiled using OpenSSL as the crypto backend, passing this method undef as the public key argument is acceptable (OpenSSL is able to extract the public key from the private one).

See also “Supported key formats”.

auth_publickey_frommemory ( username, publickey_blob, privatekey_blob [, passphrase ] )

Authenticate using the given public/private key and an optional passphrase. The keys must be PEM encoded (requires libssh2 1.6.0 or later with the OpenSSL backend).

auth_hostbased ( username, publickey, privatekey, hostname, [, local username [, passphrase ]] )

Host-based authentication using an optional passphrase. The local username defaults to be the same as the remote username.

auth_keyboard ( username, password | callback )

Authenticate using keyboard-interactive. Takes either a password, or a callback code reference which is invoked as callback->(self, username, name, instruction, prompt...) (where each prompt is a hash with text and echo keys, signifying the prompt text and whether the user input should be echoed, respectively) which should return an array of responses.

If only a username is provided, the default callback will handle standard interactive responses (requires Term::ReadKey)

auth_agent ( username )

Try to authenticate using an SSH agent (requires libssh2 1.2.3).

auth ( … )

This is a general, prioritizing authentication mechanism that can use any of the previous methods. You provide it some parameters and (optionally) a ranked list of methods you want considered (defaults to all). It will remove any unsupported methods or methods for which it doesn’t have parameters (e.g. if you don’t give it a public key, it can’t use publickey or hostkey), and try the rest, returning whichever one succeeded or undef if they all failed. If a parameter is passed with an undef value, a default value will be supplied if possible.

The parameters are:

rank
An optional ranked list of methods to try. The names should be the names of the Net::SSH2 auth methods, e.g. keyboard or publickey, with the addition of keyboard-auto for automated keyboard-interactive and password-interact which prompts the user for the password interactively.

username

password

publickey

privatekey

privatekey and publickey are file paths.

passphrase

hostname

local_username

interact

If this option is set to a true value, interactive methods will be enabled.

fallback
If a password is given but authentication using it fails, the module will fall back to ask the user for another password if this parameter is set to a true value.

cb_keyboard
auth_keyboard callback.

cb_password
auth_password callback.

For historical reasons and in order to maintain backward compatibility with older versions of the module, when the password argument is given, it is also used as the passphrase (and a deprecation warning generated).

In order to avoid that behaviour the passphrase argument must be also passed (it could be undef). For instance:

$ssh2->auth(username => $user, privatekey => $privatekey_path, publickey => $publickey_path, password => $password, passphrase => undef);

This work around will be removed in a not too distant future version of the module.

flag (key, value)

Sets the given session flag.

The currently supported flag values are:

LIBSSH2_FLAG_COMPRESS
If set before the connection negotiation is performed, compression will be negotiated for this connection. Compression can also be enabled passing option compress to the constructor new.

LIBSSH2_FLAG_SIGPIPE
if set, Net::SSH2/libssh2 will not attempt to block SIGPIPEs but will let them trigger from the underlying socket layer.

keepalive_config(want_reply, interval)

Set how often keepalive messages should be sent.

want_reply indicates whether the keepalive messages should request a response from the server. interval is number of seconds that can pass without any I/O.

keepalive_send

Send a keepalive message if needed.

On failure returns undef. On success returns how many seconds you can sleep after this call before you need to call it again.

Note that the underlying libssh2 function libssh2_keepalive_send can not recover from EAGAIN errors. If this method fails with such error, the SSH connection may become corrupted.

The usage of this function is discouraged.

channel ( [type, [window size, [packet size]]] )

Creates and returns a new channel object. See Net::SSH2::Channel.

Type, if given, must be session (a reminiscence of an old, more generic, but never working wrapping).

tcpip ( host, port [, shost, sport ] )

Creates a TCP connection from the remote host to the given host:port, returning a new channel.

The shost and sport arguments are merely informative and passed to the remote SSH server as the origin of the connection. They default to 127.0.0.1:22.

Note that this method does not open a new port on the local machine and forwards incoming connections to the remote side.

listen ( port [, host [, bound port [, queue size ]]] )

Sets up a TCP listening port on the remote host. Host defaults to 0.0.0.0; if bound port is provided, it should be a scalar reference in which the bound port is returned. Queue size specifies the maximum number of queued connections allowed before the server refuses new connections.

Returns a new Net::SSH2::Listener object.

scp_get ( remote_path [, local_path ] )

Retrieve a file with SCP. Local path defaults to basename of remote.

Alternatively, local_path may be an already open file handle or an IO::Handle object (e.g. IO::File, IO::Scalar).

scp_put ( local_path [, remote_path ] )

Send a file with SCP. Remote path defaults to same as local.

Alternatively, local_path may be an already open file handle or a reference to a IO::Handle object (it must have a valid stat method).

sftp

Return SecureFTP interface object (see Net::SSH2::SFTP).

Note that SFTP support in libssh2 is pretty rudimentary. You should consider using Net::SFTP::Foreign with the Net::SSH2 backend Net::SFTP::Foreign::Backend::Net_SSH2 instead.

public_key

Return public key interface object (see Net::SSH2::PublicKey).

known_hosts

Returns known hosts interface object (see Net::SSH2::KnownHosts).

poll ( timeout, arrayref of hashes )

Deprecated: the poll functionality in libssh2 is deprecated and its usage disregarded. Session methods “sock” and “block_directions” can be used instead to integrate Net::SSH2 inside an external event loop.

Pass in a timeout in milliseconds and an arrayref of hashes with the following keys:

handle
May be a Net::SSH2::Channel or Net::SSH2::Listener object, integer file descriptor, or perl file handle.

events
Requested events. Combination of LIBSSH2_POLLFD_* constants (with the POLL prefix stripped if present), or an arrayref of the names (‘in’, ‘hup’ etc.).

revents
Returned events. Returns a hash with the (lowercased) names of the received events (‘in’, ‘hup’, etc.) as keys with true values, and a value key with the integer value.

Returns undef on error, or the number of active objects.

block_directions

Get the blocked direction after some method returns LIBSSH2_ERROR_EAGAIN.

Returns LIBSSH2_SESSION_BLOCK_INBOUND or/and LIBSSH2_SESSION_BLOCK_OUTBOUND.

debug ( state )

Class method (affects all Net::SSH2 objects).

Pass 1 to enable, 0 to disable. Debug output is sent to STDERR.

blocking ( flag )

Enable or disable blocking.

A good number of the methods in Net::SSH2/libssh2 can not work in non-blocking mode. Some of them may just forcibly enable blocking during its execution. A few may even corrupt the SSH session or crash the program.

The ones that can be safely called are read and, with some caveats, write. See “write” in Net::SSH2::Channel.

Don’t hesitate to report any bug you found in that area!

INTEROPERABILITY AND OTHER KNOWN ISSUES

Protocol versions

The underlying libssh2 library does support version 2 of the SSH protocol exclusively (hopefully, version 1 usage is almost extinct.)

The SFTP client implements version 3 of the SFTP protocol.

Key formats

Private and public keys can be generated and stored using different formats and cyphers. Which ones are accepted by Net::SSH2 depends on the libssh2 version being used and of the underlying crypto backend it was configured to use at build time (OpenSSL libssl or libgcrypt).

An increasingly common problem is that OpenSSH since version 7.8 (released 2018-8-24) generates keys by default using the format RFC4716 which is not supported by the default crypto backend (libssl).

Keys can be converted inplace to the old PEM format using ssh-keygen (1) as follows:

$ ssh-keygen -p -m PEM -N "” -f ~/.ssh/id_rsa

On Windows, PuTTYgen (which is part of the PuTTY distribution) can be used to convert keys.

Another common issue is that in the last years OpenSSH has incorporated several new cyphers that are not supported by any version of libssh2 yet. Currently the best option from an interoperability standpoint is probably to stick to RSA key usage.

Security

Nowadays libssh2 development is not thrilling; new versions (even minor ones) are being released just every two or three years. On the other hand security issues are found and reported far more frequently. That means that Net::SSH2/libssh2 could be an easy attack vector.

So, Net::SSH2 should be used only in trusted environments. More specifically, using it to connect to untrusted third party computers over the Internet is probably a very bad idea!

SEE ALSO

Net::SSH2::Channel, Net::SSH2::Listener, Net::SSH2::SFTP, Net::SSH2::File, Net::SSH2::Dir.

LibSSH2 documentation at <http://www.libssh2.org>.

IETF Secure Shell (secsh) working group at <http://www.ietf.org/html.charters/secsh-charter.html>.

Net::SSH::Any and Net::SFTP::Foreign integrate nicely with Net::SSH2.

Other Perl modules related to SSH you may find interesting: Net::OpenSSH, Net::SSH::Perl, Net::OpenSSH::Parallel, Net::OpenSSH::Compat.

COPYRIGHT AND LICENSE

Copyright (C) 2005 - 2010 by David B. Robins ([email protected]).

Copyright (C) 2010 - 2020 by Rafael Kitover ([email protected]).

Copyright (C) 2011 - 2020 by Salvador Fandiño ([email protected]).

All rights reserved.

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

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1729 - Linux cli command rand

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command rand and provides detailed information about the command rand, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the rand.

NAME 🖥️ rand 🖥️

pseudo-random number generator

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int rand(void);
void srand(unsigned int seed);
[[deprecated]] int rand_r(unsigned int *seedp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

rand_r():

    Since glibc 2.24:
        _POSIX_C_SOURCE >= 199506L
    glibc 2.23 and earlier
        _POSIX_C_SOURCE

DESCRIPTION

The rand() function returns a pseudo-random integer in the range 0 to RAND_MAX inclusive (i.e., the mathematical range [0, RAND_MAX]).

The srand() function sets its argument as the seed for a new sequence of pseudo-random integers to be returned by rand(). These sequences are repeatable by calling srand() with the same seed value.

If no seed value is provided, the rand() function is automatically seeded with a value of 1.

The function rand() is not reentrant, since it uses hidden state that is modified on each call. This might just be the seed value to be used by the next call, or it might be something more elaborate. In order to get reproducible behavior in a threaded application, this state must be made explicit; this can be done using the reentrant function rand_r().

Like rand(), rand_r() returns a pseudo-random integer in the range [0, RAND_MAX]. The seedp argument is a pointer to an unsigned int that is used to store state between calls. If rand_r() is called with the same initial value for the integer pointed to by seedp, and that value is not modified between calls, then the same pseudo-random sequence will result.

The value pointed to by the seedp argument of rand_r() provides only a very small amount of state, so this function will be a weak pseudo-random generator. Try drand48_r(3) instead.

RETURN VALUE

The rand() and rand_r() functions return a value between 0 and RAND_MAX (inclusive). The srand() function returns no value.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

rand(), rand_r(), srand()

Thread safetyMT-Safe

VERSIONS

The versions of rand() and srand() in the Linux C Library use the same random number generator as random(3) and srandom(3), so the lower-order bits should be as random as the higher-order bits. However, on older rand() implementations, and on current implementations on different systems, the lower-order bits are much less random than the higher-order bits. Do not use this function in applications intended to be portable when good randomness is needed. (Use random(3) instead.)

STANDARDS

rand()
srand()
C11, POSIX.1-2008.

rand_r()
POSIX.1-2008.

HISTORY

rand()
srand()
SVr4, 4.3BSD, C89, POSIX.1-2001.

rand_r()
POSIX.1-2001. Obsolete in POSIX.1-2008.

EXAMPLES

POSIX.1-2001 gives the following example of an implementation of rand() and srand(), possibly useful when one needs the same sequence on two different machines.

static unsigned long next = 1;
/* RAND_MAX assumed to be 32767 */
int myrand(void) {
    next = next * 1103515245 + 12345;
    return((unsigned)(next/65536) % 32768);
}
void mysrand(unsigned int seed) {
    next = seed;
}

The following program can be used to display the pseudo-random sequence produced by rand() when given a particular seed. When the seed is -1, the program uses a random seed.

#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
    int           r;
    unsigned int  seed, nloops;
    if (argc != 3) {
        fprintf(stderr, "Usage: %s <seed> <nloops>

“, argv[0]); exit(EXIT_FAILURE); } seed = atoi(argv[1]); nloops = atoi(argv[2]); if (seed == -1) { seed = arc4random(); printf(“seed: %u “, seed); } srand(seed); for (unsigned int j = 0; j < nloops; j++) { r = rand(); printf("%d “, r); } exit(EXIT_SUCCESS); }

SEE ALSO

drand48(3), random(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1730 - Linux cli command XtVaAppInitialize

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtVaAppInitialize and provides detailed information about the command XtVaAppInitialize, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtVaAppInitialize.

NAME 🖥️ XtVaAppInitialize 🖥️

initialize, open, or close a display

SYNTAX

#include <X11/Intrinsic.h>

Widget XtAppInitialize(XtAppContext* app_context_return, const char *application_class, XrmOptionDescRec* options, Cardinal num_options, int *argc_in_out, char **argv_in_out, String *fallback_resources, ArgList args, Cardinal num_args);

Widget XtVaAppInitialize(XtAppContext* app_context_return, const char *application_class, XrmOptionDescRec* options, Cardinal num_options, int *argc_in_out, char **argv_in_out, String *fallback_resources, … );

ARGUMENTS

app_context_return
Specifies the application context.

application_class
Specifies the class name of this application, which usually is the generic name for all instances of this application.

options
Specifies how to parse the command line for any application-specific resources. The options argument is passed as a parameter to XrmParseCommand. For further information, see Xlib - C Language X Interface.

num_options
Specifies the number of entries in the options list.

argc_in_out
Specifies a pointer to the number of command line parameters.

argv_in_out
Specifies the command line parameters.

fallback_resources
Specifies resource values to be used if the application class resource file cannot be opened or read, or NULL.

args
Specifies the argument list to override any other resource specification for the created shell widget.

num_args
Specifies the number of entries in the argument list.


Specifies the variable argument list to override any other resource specification for the created shell widget.

DESCRIPTION

The XtAppInitialize function calls XtToolkitInitialize followed by XtCreateApplicationContext, then calls XtOpenDisplay with display_string NULL and application_name NULL, and finally calls XtAppCreateShell with application_name NULL, widget_class applicationShellWidgetClass, and the specified args and num_args and returns the created shell. The modified argc and argv returned by XtDisplayInitialize are returned in argc_in_out and argv_in_out. If app_context_return is not NULL, the created application context is also returned. If the display specified by the command line cannot be opened, an error message is issued and XtAppInitialize terminates the application. If fallback_resources is non-NULL, XtAppSetFallbackResources is called with the value prior to calling XtOpenDisplay.

XtAppInitialize and XtVaAppInitialize have been superceded by XtOpenApplication and XtVaOpenApplication respectively.

SEE ALSO

XtOpenApplication(3), XtVaOpenApplication(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1731 - Linux cli command xdr_pointer

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_pointer and provides detailed information about the command xdr_pointer, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_pointer.

NAME 🖥️ xdr_pointer 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1732 - Linux cli command XtAppAddSignal

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppAddSignal and provides detailed information about the command XtAppAddSignal, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppAddSignal.

NAME 🖥️ XtAppAddSignal 🖥️

register and remove a signal source

SYNTAX

#include <X11/Intrinsic.h>

XtSignalId XtAppAddSignal(XtAppContext app_context, XtSignalCallbackProc proc, XtPointer client_data);

void XtRemoveSignal(XtSignalId id);

void XtNoticeSignal(XtSignalId id);

ARGUMENTS

app_context
Specifies the application context.

client_data
Specifies the argument that is to be passed to the specified procedure when a signal has been raised.

id
Specifies the ID returned from the corresponding XtAppAddSignal call.

proc
Specifies the procedure that is to be called when the signal has been raised.

DESCRIPTION

The XtAppAddSignal function initiates a mechanism for handling signals within the context of the Intrinsics. Prior to establishing an operating system dependent signal handler the application may call XtAppAddSignal and store the returned id in a place accessible to the signal handler.

Upon receipt of a signal from the operating system, the application may call XtNoticeSignal passing the id returned by the call to XtAppAddSignal.

XtNoticeSignal is the only Intrinsics function that can safely be called from a signal handler. If XtNoticeSignal is called multiple times before the Intrinsics are able to invoke the registered callback, the callback is only called once. Logically the Intrinsics maintain pending for each registered callback. This flag is initially False and is set to True by XtNoticeSignal; the Intrinsics invoke the callback whenever the flag is True, and the flag is set to False just before the callback is invoked.

The XtRemoveSignal function is called to remove the specified Intrinsics signal handler. The client should disable the source of the signal before calling XtRemoveSignal.

SEE ALSO

XtAppAddTimeOut(3),XtAppAddInput(3),XtAppAddWorkProc(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1733 - Linux cli command Image_ExifTool_M2TSpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_M2TSpm and provides detailed information about the command Image_ExifTool_M2TSpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_M2TSpm.

NAME 🖥️ Image_ExifTool_M2TSpm 🖥️

Read M2TS (AVCHD) meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to extract information from MPEG-2 transport streams, such as those used by AVCHD video.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://neuron2.net/library/mpeg2/iso13818-1.pdf>

<http://www.blu-raydisc.com/Assets/Downloadablefile/BD-RE_Part3_V2.1_WhitePaper_080406-15271.pdf>

<http://www.videohelp.com/forum/archive/reading-avchd-playlist-files-bdmv-playlist-mpl-t358888.html>

<http://en.wikipedia.org/wiki/MPEG_transport_stream>

<http://www.dunod.com/documents/9782100493463/49346_DVB.pdf>

<http://trac.handbrake.fr/browser/trunk/libhb/stream.c>

<http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=04560141>

<http://www.w6rz.net/xport.zip>

SEE ALSO

“M2TS Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1734 - Linux cli command XtAppAddActions

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppAddActions and provides detailed information about the command XtAppAddActions, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppAddActions.

NAME 🖥️ XtAppAddActions 🖥️

register an action table

SYNTAX

#include <X11/Intrinsic.h>

void XtAppAddActions(XtAppContext app_context, XtActionList actions, Cardinal num_actions);

ARGUMENTS

app_context
Specifies the application context.

actions
Specifies the action table to register.

num_args
Specifies the number of entries in this action table.

DESCRIPTION

The XtAppAddActions function adds the specified action table and registers it with the translation manager.

SEE ALSO

XtParseTranslationTable(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1735 - Linux cli command Moose_Exporterpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Exporterpm and provides detailed information about the command Moose_Exporterpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Exporterpm.

NAME 🖥️ Moose_Exporterpm 🖥️

make an import() and unimport() just like Moose.pm

VERSION

version 2.2207

SYNOPSIS

package MyApp::Moose; use Moose (); use Moose::Exporter; use Some::Random (); Moose::Exporter->setup_import_methods( with_meta => [ has_rw, sugar2 ], as_is => [ sugar3, \Some::Random::thing, Some::Random::other_thing ], also => Moose, ); sub has_rw { my ( $meta, $name, %options ) = @_; $meta->add_attribute( $name, is => rw, %options, ); } # then later … package MyApp::User; use MyApp::Moose; has name => ( is => ro ); has_rw size; thing; other_thing; no MyApp::Moose;

DESCRIPTION

This module encapsulates the exporting of sugar functions in a Moose.pm-like manner. It does this by building custom import and unimport methods for your module, based on a spec you provide.

It also lets you “stack” Moose-alike modules so you can export Moose’s sugar as well as your own, along with sugar from any random MooseX module, as long as they all use Moose::Exporter. This feature exists to let you bundle a set of MooseX modules into a policy module that developers can use directly instead of using Moose itself.

To simplify writing exporter modules, Moose::Exporter also imports strict and warnings into your exporter module, as well as into modules that use it.

METHODS

This module provides two public methods:

Moose::Exporter->setup_import_methods(…)

When you call this method, Moose::Exporter builds custom import and unimport methods for your module. The import method will export the functions you specify, and can also re-export functions exported by some other module (like Moose.pm). If you pass any parameters for Moose::Util::MetaRole, the import method will also call Moose::Util::MetaRole::apply_metaroles and Moose::Util::MetaRole::apply_base_class_roles as needed, after making sure the metaclass is initialized.

The unimport method cleans the caller’s namespace of all the exported functions. This includes any functions you re-export from other packages. However, if the consumer of your package also imports those functions from the original package, they will not be cleaned.

Note that if any of these methods already exist, they will not be overridden, you will have to use build_import_methods to get the coderef that would be installed.

This method accepts the following parameters:

  • with_meta => [ … ] This list of function names only will be wrapped and then exported. The wrapper will pass the metaclass object for the caller as its first argument. Many sugar functions will need to use this metaclass object to do something to the calling package.

  • as_is => [ … ] This list of function names or sub references will be exported as-is. You can identify a subroutine by reference, which is handy to re-export some other module’s functions directly by reference (\&Some::Package::function). If you do export some other package’s function, this function will never be removed by the unimport method. The reason for this is we cannot know if the caller also explicitly imported the sub themselves, and therefore wants to keep it.

  • trait_aliases => [ … ] This is a list of package names which should have shortened aliases exported, similar to the functionality of aliased. Each element in the list can be either a package name, in which case the export will be named as the last namespace component of the package, or an arrayref, whose first element is the package to alias to, and second element is the alias to export.

  • also => $name or \names This is a list of modules which contain functions that the caller wants to export. These modules must also use Moose::Exporter. The most common use case will be to export the functions from Moose.pm. Functions specified by with_meta or as_is take precedence over functions exported by modules specified by also, so that a module can selectively override functions exported by another module. Moose::Exporter also makes sure all these functions get removed when unimport is called.

  • meta_lookup => sub { … } This is a function which will be called to provide the metaclass to be operated upon by the exporter. This is an advanced feature intended for use by package generator modules in the vein of MooseX::Role::Parameterized in order to simplify reusing sugar from other modules that use Moose::Exporter. This function is used, for example, to select the metaclass to bind to functions that are exported using the with_meta option. This function will receive one parameter: the class name into which the sugar is being exported. The default implementation is: sub { Class::MOP::class_of(shift) } Accordingly, this function is expected to return a metaclass.

You can also provide parameters for Moose::Util::MetaRole::apply_metaroles and Moose::Util::MetaRole::apply_base_class_roles. Specifically, valid parameters are “class_metaroles”, “role_metaroles”, and “base_class_roles”.

Moose::Exporter->build_import_methods(…)

Returns three code refs, one for import, one for unimport and one for init_meta.

Accepts the additional install option, which accepts an arrayref of method names to install into your exporting package. The valid options are import and unimport. Calling setup_import_methods is equivalent to calling build_import_methods with install => [qw(import unimport)] except that it doesn’t also return the methods.

The import method is built using Sub::Exporter. This means that it can take a hashref of the form { into => $package } to specify the package it operates on.

Used by setup_import_methods.

IMPORTING AND init_meta

If you want to set an alternative base object class or metaclass class, see above for details on how this module can call Moose::Util::MetaRole for you.

If you want to do something that is not supported by this module, simply define an init_meta method in your class. The import method that Moose::Exporter generates for you will call this method (if it exists). It will always pass the caller to this method via the for_class parameter.

Most of the time, your init_meta method will probably just call Moose->init_meta to do the real work:

sub init_meta { shift; # our class name return Moose->init_meta( @_, metaclass => My::Metaclass ); }

METACLASS TRAITS

The import method generated by Moose::Exporter will allow the user of your module to specify metaclass traits in a -traits parameter passed as part of the import:

use Moose -traits => My::Meta::Trait; use Moose -traits => [ My::Meta::Trait, My::Other::Trait ];

These traits will be applied to the caller’s metaclass instance. Providing traits for an exporting class that does not create a metaclass for the caller is an error.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1736 - Linux cli command XML_DOM_EntityReferencepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_DOM_EntityReferencepm and provides detailed information about the command XML_DOM_EntityReferencepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_DOM_EntityReferencepm.

NAME 🖥️ XML_DOM_EntityReferencepm 🖥️

An XML ENTITY reference in XML::DOM

DESCRIPTION

XML::DOM::EntityReference extends XML::DOM::Node.

EntityReference objects may be inserted into the structure model when an entity reference is in the source document, or when the user wishes to insert an entity reference. Note that character references and references to predefined entities are considered to be expanded by the HTML or XML processor so that characters are represented by their Unicode equivalent rather than by an entity reference. Moreover, the XML processor may completely expand references to entities while building the structure model, instead of providing EntityReference objects. If it does provide such objects, then for a given EntityReference node, it may be that there is no Entity node representing the referenced entity; but if such an Entity exists, then the child list of the EntityReference node is the same as that of the Entity node. As with the Entity node, all descendants of the EntityReference are readonly.

The resolution of the children of the EntityReference (the replacement value of the referenced Entity) may be lazily evaluated; actions by the user (such as calling the childNodes method on the EntityReference node) are assumed to trigger the evaluation.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1737 - Linux cli command Image_ExifTool_Lang_zh_cnpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Lang_zh_cnpm and provides detailed information about the command Image_ExifTool_Lang_zh_cnpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Lang_zh_cnpm.

NAME 🖥️ Image_ExifTool_Lang_zh_cnpm 🖥️

ExifTool Simplified Chinese language translations

DESCRIPTION

This file is used by Image::ExifTool to generate localized tag descriptions and values.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

ACKNOWLEDGEMENTS

Thanks to Jens Duttke and Haibing Zhong for providing this translation.

SEE ALSO

Image::ExifTool (3pm), Image::ExifTool::TagInfoXML (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1738 - Linux cli command wcsstr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcsstr and provides detailed information about the command wcsstr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcsstr.

NAME 🖥️ wcsstr 🖥️

locate a substring in a wide-character string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
wchar_t *wcsstr(const wchar_t *haystack, const wchar_t *needle);

DESCRIPTION

The wcsstr() function is the wide-character equivalent of the strstr(3) function. It searches for the first occurrence of the wide-character string needle (without its terminating null wide character (L’�’)) as a substring in the wide-character string haystack.

RETURN VALUE

The wcsstr() function returns a pointer to the first occurrence of needle in haystack. It returns NULL if needle does not occur as a substring in haystack.

Note the special case: If needle is the empty wide-character string, the return value is always haystack itself.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcsstr()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

strstr(3), wcschr(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1739 - Linux cli command Net_Server_PSGIpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Server_PSGIpm and provides detailed information about the command Net_Server_PSGIpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Server_PSGIpm.

NAME 🖥️ Net_Server_PSGIpm 🖥️

basic Net::Server based PSGI HTTP server class

TEST ONE LINER

perl -e use base qw(Net::Server::PSGI); main->run(port => 8080, ipv => “*”) # runs a default echo server

SYNOPSIS

use base qw(Net::Server::PSGI); _ _PACKAGE_ _->run(app => \my_echo_handler); # will bind IPv4 port 80 sub my_echo_handler { my $env = shift; my $txt = qq{<form method=“post” action="/bam"><input type=“text” name=“foo”><input type=“submit”></form> }; require Data::Dumper; local $Data::Dumper::Sortkeys = 1; require CGI::PSGI; my $form = {}; my $q = CGI::PSGI->new($env); $form->{$_} = $q->param($_) for $q->param; $txt .= “<pre>".Data::Dumper->Dump([$env, $form], [env, form])."</pre>”; return [200, [Content-type, text/html], [$txt]]; }

DESCRIPTION

If you want a more fully featured PSGI experience, it would be wise to look at the Plack and Starman set of modules. Net::Server::PSGI is intended as an easy gateway into PSGI. But to get the most out of all that PSGI has to offer, you should review the Plack and Plack::Middleware. If you only need something a little more rudimentary, then Net::Server::PSGI may be good for you.

Net::Server::PSGI takes Net::Server::HTTP one level farther. It begins with base type MultiType defaulting to Net::Server::Fork. It is easy to change it to any of the other Net::Server flavors by passing server_type => $other_flavor in the server configuration. The port has also been defaulted to port 80 - but could easily be changed to another through the server configuration. You can also very easily add ssl by including, proto=>ssl and provide a SSL_cert_file and SSL_key_file.

For example, here is a basic server that will bind to all interfaces, will speak both HTTP on port 8080 as well as HTTPS on 8443, and will speak both IPv4, as well as IPv6 if it is available.

use base qw(Net::Server::PSGI); _ _PACKAGE_ _->run( port => [8080, “8443/ssl”], ipv => *, # IPv6 if available SSL_key_file => /my/key, SSL_cert_file => /my/cert, );

METHODS

“process_request”
This method has been overridden in Net::Server::PSGI - you should not use it while using Net::Server::PSGI. This overridden method parses the environment and sets up request alarms and handles dying failures. It calls process_psgi_request once the request is ready and headers have been parsed.

“process_psgi_request”
Used when psgi_enabled is true. During this method, find_psgi_handler will be called to return the appropriate psgi response handler. Once finished, print_psgi_headers and print_psgi_body are used to print out the response. See PSGI. Typically this method should not be overridden. Instead, an appropriate method for finding the app should be given to find_psgi_handler or app.

“find_psgi_handler”
Used to lookup the appropriate PSGI handler. A reference to the already parsed $env hashref is passed. PATH_INFO will be initialized to the full path portion of the URI. SCRIPT_NAME will be initialized to the empty string. This handler should set the appropriate values for SCRIPT_NAME and PATH_INFO depending upon the path matched. A code reference for the handler should be returned. The default find_psgi_handler will call the app method. If that fails a reference to the psgi_echo_handler is returned as the default application. sub find_psgi_handler { my ($self, $env) = @_; if ($env->{PATH_INFO} && $env->{PATH_INFO} =~ s{^ (/foo) (?= $ | /) }{}x) { $env->{SCRIPT_NAME} = $1; return \foo_app; } return $self->SUPER::find_psgi_handler($env); }

“app”
Return a reference to the application being served. This should be a valid PSGI application. See PSGI. By default it will look at the value of the app configuration option. The app method may also be used to set the app configuration option. package MyApp; use base qw(Net::Server::PSGI); sub default_server_type { Prefork } sub my_app { my $env = shift; return [200, [Content-type, text/html], [“Hello world”]]; } MyApp->run(app => \my_app); # OR sub app { \my_app } MyApp->run; # OR my $server = MyApp->new; $server->app(\my_app); $server->run;

OPTIONS

In addition to the command line arguments of the Net::Server::HTTP base classes you can also set the following options.

app
Should return a coderef of the PSGI application. Is returned by the app method.

AUTHOR

Paul T. Seamons [email protected]

SEE ALSO

Please see also Plack, Starman,

Net::Server::Fork, Net::Server::INET, Net::Server::PreFork, Net::Server::PreForkSimple, Net::Server::MultiType, Net::Server::Single Net::Server::SIG Net::Server::Daemonize Net::Server::Proto Net::Server::HTTP

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1740 - Linux cli command Image_ExifTool_NikonSettingspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_NikonSettingspm and provides detailed information about the command Image_ExifTool_NikonSettingspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_NikonSettingspm.

NAME 🖥️ Image_ExifTool_NikonSettingspm 🖥️

Read Nikon user settings

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains the definitions necessary to read the user settings for Nikon cameras such as the D6 and Z7mk2.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

ACKNOWLEDGEMENTS

Thanks to Warren Hatch for his work decoding settings for the D6 and Z7mkII, and for providing the original source code for this module.

SEE ALSO

“Nikon Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1741 - Linux cli command Image_ExifTool_TagInfoXMLpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_TagInfoXMLpm and provides detailed information about the command Image_ExifTool_TagInfoXMLpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_TagInfoXMLpm.

NAME 🖥️ Image_ExifTool_TagInfoXMLpm 🖥️

Read/write tag information XML database

DESCRIPTION

This module is used to generate an XML database from all ExifTool tag information. The XML database may then be edited and used to re-generate the language modules (Image::ExifTool::Lang::*).

METHODS

Write

Print complete tag information database in XML format.

# save list of all tags $success = Image::ExifTool::TagInfoXML::Write(dst.xml); # list all IPTC tags to console, including Flags Image::ExifTool::TagInfoXML::Write(undef, IPTC, Flags => 1); # write all EXIF Camera tags to file Image::ExifTool::TagInfoXML::Write($outfile, exif:camera);

Inputs:
0) [optional] Output file name, or undef for console output. Output file will be overwritten if it already exists. 1) [optional] String of group names separated by colons to specify the group to print. A specific IFD may not be given as a group, since EXIF tags may be written to any IFD. Saves all groups if not specified. 2) [optional] Hash of options values: Flags - Set to output flags attribute NoDesc - Set to suppress output of descriptions Lang - Select a single language for output

Return Value:
True on success.

Sample XML Output:

<?xml version=1.0 encoding=UTF-8?> <taginfo> <table name=XMP::dc g0=XMP g1=XMP-dc g2=Other> <desc lang=en>XMP Dublin Core</desc> <tag id=title name=Title type=lang-alt writable=true g2=Image> <desc lang=en>Title</desc> <desc lang=de>Titel</desc> <desc lang=fr>Titre</desc> </tag> … </table> </taginfo>

Flags (if selected and available) are formatted as a comma-separated list of the following possible values: Avoid, Binary, List, Mandatory, Permanent, Protected, Unknown and Unsafe. See the tag name documentation and lib/Image/ExifTool/README for a description of these flags. For XMP List tags, the list type (Alt, Bag or Seq) is also output as a flag if applicable.

BuildLangModules

Build all Image::ExifTool::Lang modules from an XML database file.

Image::ExifTool::TagInfoXML::BuildLangModules(src.xml);

Inputs:
0) XML file name 1) Update flags: 0x01 = preserve version numbers 0x02 = update all modules, even if they didnt change 0x04 = update from scratch, ignoring existing definitions 0x08 = override existing different descriptions and values

Return Value:
Number of modules updated, or negative on error.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Image::ExifTool (3pm), Image::ExifTool::TagNames (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1742 - Linux cli command XtAppAddInput

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppAddInput and provides detailed information about the command XtAppAddInput, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppAddInput.

NAME 🖥️ XtAppAddInput 🖥️

register and remove an input source

SYNTAX

#include <X11/Intrinsic.h>

XtInputId XtAppAddInput(XtAppContext app_context, int source, XtPointer condition, XtInputCallbackProc proc, XtPointer client_data);

void XtRemoveInput(XtInputId id);

ARGUMENTS

app_context
Specifies the application context that identifies the application.

client_data
Specifies the argument that is to be passed to the specified procedure when input is available.

condition
Specifies the mask that indicates a read, write, or exception condition or some operating system dependent condition.

id
Specifies the ID returned from the corresponding XtAppAddInput call.

proc
Specifies the procedure that is to be called when input is available.

source
Specifies the source file descriptor on a UNIX-based system or other operating system dependent device specification.

DESCRIPTION

The XtAppAddInput function registers with the Intrinsics read routine a new source of events, which is usually file input but can also be file output. Note that file should be loosely interpreted to mean any sink or source of data. XtAppAddInput also specifies the conditions under which the source can generate events. When input is pending on this source, the callback procedure is called.

The legal values for the condition argument are operating-system dependent. On a UNIX-based system, the condition is some union of XtInputReadMask, XtInputWriteMask, and XtInputExceptMask. The XtRemoveInput function causes the Intrinsics read routine to stop watching for input from the input source.

SEE ALSO

XtAppAddTimeOut(3),XtAppAddSignal(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

BUGS

In ANSI C it is necessary to cast the condition to an XtPointer, e.g.:

XtAppAddInput(app_context,

source,
(XtPointer) (XtInputReadMask | XtInputWriteMask),
proc,
client_data);

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1743 - Linux cli command get_nprocs

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command get_nprocs and provides detailed information about the command get_nprocs, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the get_nprocs.

NAME 🖥️ get_nprocs 🖥️

get number of processors

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/sysinfo.h>
int get_nprocs(void);
int get_nprocs_conf(void);

DESCRIPTION

The function get_nprocs_conf() returns the number of processors configured by the operating system.

The function get_nprocs() returns the number of processors currently available in the system. This may be less than the number returned by get_nprocs_conf() because processors may be offline (e.g., on hotpluggable systems).

RETURN VALUE

As given in DESCRIPTION.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

get_nprocs(), get_nprocs_conf()

Thread safetyMT-Safe

STANDARDS

GNU.

NOTES

The current implementation of these functions is rather expensive, since they open and parse files in the /sys filesystem each time they are called.

The following sysconf(3) calls make use of the functions documented on this page to return the same information.

np = sysconf(_SC_NPROCESSORS_CONF);     /* processors configured */
np = sysconf(_SC_NPROCESSORS_ONLN);     /* processors available */

EXAMPLES

The following example shows how get_nprocs() and get_nprocs_conf() can be used.

#include <stdio.h>
#include <stdlib.h>
#include <sys/sysinfo.h>
int
main(void)
{
    printf("This system has %d processors configured and "
            "%d processors available.

“, get_nprocs_conf(), get_nprocs()); exit(EXIT_SUCCESS); }

SEE ALSO

nproc(1)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1744 - Linux cli command Spreadsheet_WriteExcelpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_WriteExcelpm and provides detailed information about the command Spreadsheet_WriteExcelpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_WriteExcelpm.

NAME 🖥️ Spreadsheet_WriteExcelpm 🖥️

Write to a cross-platform Excel binary file.

VERSION

This document refers to version 2.40 of Spreadsheet::WriteExcel, released November 6, 2013.

SYNOPSIS

To write a string, a formatted string, a number and a formula to the first worksheet in an Excel workbook called perl.xls:

use Spreadsheet::WriteExcel; # Create a new Excel workbook my $workbook = Spreadsheet::WriteExcel->new(perl.xls); # Add a worksheet $worksheet = $workbook->add_worksheet(); # Add and define a format $format = $workbook->add_format(); # Add a format $format->set_bold(); $format->set_color(red); $format->set_align(center); # Write a formatted and unformatted string, row and column notation. $col = $row = 0; $worksheet->write($row, $col, Hi Excel!, $format); $worksheet->write(1, $col, Hi Excel!); # Write a number and a formula using A1 notation $worksheet->write(A3, 1.2345); $worksheet->write(A4, =SIN(PI()/4));

DESCRIPTION

The Spreadsheet::WriteExcel Perl module can be used to create a cross-platform Excel binary file. Multiple worksheets can be added to a workbook and formatting can be applied to cells. Text, numbers, formulas, hyperlinks, images and charts can be written to the cells.

The file produced by this module is compatible with Excel 97, 2000, 2002, 2003 and 2007.

The module will work on the majority of Windows, UNIX and Mac platforms. Generated files are also compatible with the Linux/UNIX spreadsheet applications Gnumeric and OpenOffice.org.

This module cannot be used to write to an existing Excel file (See MODIFYING AND REWRITING EXCEL FILES).

Note: This module is in maintenance only mode and in future will only be updated with bug fixes. The newer, more feature rich and API compatible Excel::Writer::XLSX module is recommended instead. See, Migrating to Excel::Writer::XLSX.

QUICK START

Spreadsheet::WriteExcel tries to provide an interface to as many of Excel’s features as possible. As a result there is a lot of documentation to accompany the interface and it can be difficult at first glance to see what it important and what is not. So for those of you who prefer to assemble Ikea furniture first and then read the instructions, here are three easy steps:

1. Create a new Excel workbook (i.e. file) using new().

2. Add a worksheet to the new workbook using add_worksheet().

3. Write to the worksheet using write().

Like this:

use Spreadsheet::WriteExcel; # Step 0 my $workbook = Spreadsheet::WriteExcel->new(perl.xls); # Step 1 $worksheet = $workbook->add_worksheet(); # Step 2 $worksheet->write(A1, Hi Excel!); # Step 3

This will create an Excel file called perl.xls with a single worksheet and the text Hi Excel! in the relevant cell. And that’s it. Okay, so there is actually a zeroth step as well, but use module goes without saying. There are also more than 80 examples that come with the distribution and which you can use to get you started. See EXAMPLES.

Those of you who read the instructions first and assemble the furniture afterwards will know how to proceed. ;-)

WORKBOOK METHODS

The Spreadsheet::WriteExcel module provides an object oriented interface to a new Excel workbook. The following methods are available through a new workbook.

new() add_worksheet() add_format() add_chart() add_chart_ext() close() compatibility_mode() set_properties() define_name() set_tempdir() set_custom_color() sheets() set_1904() set_codepage()

If you are unfamiliar with object oriented interfaces or the way that they are implemented in Perl have a look at perlobj and perltoot in the main Perl documentation.

new()

A new Excel workbook is created using the new() constructor which accepts either a filename or a filehandle as a parameter. The following example creates a new Excel file based on a filename:

my $workbook = Spreadsheet::WriteExcel->new(filename.xls); my $worksheet = $workbook->add_worksheet(); $worksheet->write(0, 0, Hi Excel!);

Here are some other examples of using new() with filenames:

my $workbook1 = Spreadsheet::WriteExcel->new($filename); my $workbook2 = Spreadsheet::WriteExcel->new(/tmp/filename.xls); my $workbook3 = Spreadsheet::WriteExcel->new(“c:\tmp\filename.xls”); my $workbook4 = Spreadsheet::WriteExcel->new(c: mp ilename.xls);

The last two examples demonstrates how to create a file on DOS or Windows where it is necessary to either escape the directory separator \ or to use single quotes to ensure that it isn’t interpolated. For more information see perlfaq5: Why cant I use "C: emp oo" in DOS paths?.

The new() constructor returns a Spreadsheet::WriteExcel object that you can use to add worksheets and store data. It should be noted that although my is not specifically required it defines the scope of the new workbook variable and, in the majority of cases, ensures that the workbook is closed properly without explicitly calling the close() method.

If the file cannot be created, due to file permissions or some other reason, new will return undef. Therefore, it is good practice to check the return value of new before proceeding. As usual the Perl variable $! will be set if there is a file creation error. You will also see one of the warning messages detailed in DIAGNOSTICS:

my $workbook = Spreadsheet::WriteExcel->new(protected.xls); die “Problems creating new Excel file: $!” unless defined $workbook;

You can also pass a valid filehandle to the new() constructor. For example in a CGI program you could do something like this:

binmode(STDOUT); my $workbook = Spreadsheet::WriteExcel->new(\STDOUT);

The requirement for binmode() is explained below.

See also, the cgi.pl program in the examples directory of the distro.

However, this special case will not work in mod_perl programs where you will have to do something like the following:

# mod_perl 1 … tie *XLS, Apache; binmode(XLS); my $workbook = Spreadsheet::WriteExcel->new(\XLS); … # mod_perl 2 … tie *XLS => $r; # Tie to the Apache::RequestRec object binmode(*XLS); my $workbook = Spreadsheet::WriteExcel->new(\XLS); …

See also, the mod_perl1.pl and mod_perl2.pl programs in the examples directory of the distro.

Filehandles can also be useful if you want to stream an Excel file over a socket or if you want to store an Excel file in a scalar.

For example here is a way to write an Excel file to a scalar with perl 5.8:

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; # Requires perl 5.8 or later open my $fh, >, \my $str or die “Failed to open filehandle: $!”; my $workbook = Spreadsheet::WriteExcel->new($fh); my $worksheet = $workbook->add_worksheet(); $worksheet->write(0, 0, Hi Excel!); $workbook->close(); # The Excel file in now in $str. Remember to binmode() the output # filehandle before printing it. binmode STDOUT; print $str;

See also the write_to_scalar.pl and filehandle.pl programs in the examples directory of the distro.

Note about the requirement for binmode(). An Excel file is comprised of binary data. Therefore, if you are using a filehandle you should ensure that you binmode() it prior to passing it to new().You should do this regardless of whether you are on a Windows platform or not. This applies especially to users of perl 5.8 on systems where UTF-8 is likely to be in operation such as RedHat Linux 9. If your program, either intentionally or not, writes UTF-8 data to a filehandle that is passed to new() it will corrupt the Excel file that is created.

You don’t have to worry about binmode() if you are using filenames instead of filehandles. Spreadsheet::WriteExcel performs the binmode() internally when it converts the filename to a filehandle. For more information about binmode() see perlfunc and perlopentut in the main Perl documentation.

add_worksheet($sheetname, $utf_16_be)

At least one worksheet should be added to a new workbook. A worksheet is used to write data into cells:

$worksheet1 = $workbook->add_worksheet(); # Sheet1 $worksheet2 = $workbook->add_worksheet(Foglio2); # Foglio2 $worksheet3 = $workbook->add_worksheet(Data); # Data $worksheet4 = $workbook->add_worksheet(); # Sheet4

If $sheetname is not specified the default Excel convention will be followed, i.e. Sheet1, Sheet2, etc. The $utf_16_be parameter is optional, see below.

The worksheet name must be a valid Excel worksheet name, i.e. it cannot contain any of the following characters, [ ] : * ? / \ and it must be less than 32 characters. In addition, you cannot use the same, case insensitive, $sheetname for more than one worksheet.

On systems with perl 5.8 and later the add_worksheet() method will also handle strings in UTF-8 format.

$worksheet = $workbook->add_worksheet("\x{263a}"); # Smiley

On earlier Perl systems your can specify UTF-16BE worksheet names using an additional optional parameter:

my $name = pack n, 0x263a; $worksheet = $workbook->add_worksheet($name, 1); # Smiley

add_format(%properties)

The add_format() method can be used to create new Format objects which are used to apply formatting to a cell. You can either define the properties at creation time via a hash of property values or later via method calls.

$format1 = $workbook->add_format(%props); # Set properties at creation $format2 = $workbook->add_format(); # Set properties later

See the CELL FORMATTING section for more details about Format properties and how to set them.

add_chart(%properties)

This method is use to create a new chart either as a standalone worksheet (the default) or as an embeddable object that can be inserted into a worksheet via the insert_chart() Worksheet method.

my $chart = $workbook->add_chart( type => column );

The properties that can be set are:

type (required) name (optional) embedded (optional)

  • type This is a required parameter. It defines the type of chart that will be created. my $chart = $workbook->add_chart( type => line ); The available types are: area bar column line pie scatter stock

  • name Set the name for the chart sheet. The name property is optional and if it isn’t supplied will default to Chart1 .. n. The name must be a valid Excel worksheet name. See add_worksheet() for more details on valid sheet names. The name property can be omitted for embedded charts. my $chart = $workbook->add_chart( type => line, name => Results Chart );

  • embedded Specifies that the Chart object will be inserted in a worksheet via the insert_chart() Worksheet method. It is an error to try insert a Chart that doesn’t have this flag set. my $chart = $workbook->add_chart( type => line, embedded => 1 ); # Configure the chart. … # Insert the chart into the a worksheet. $worksheet->insert_chart( E2, $chart );

See Spreadsheet::WriteExcel::Chart for details on how to configure the chart object once it is created. See also the chart_*.pl programs in the examples directory of the distro.

add_chart_ext($chart_data, $chartname)

This method is use to include externally generated charts in a Spreadsheet::WriteExcel file.

my $chart = $workbook->add_chart_ext(chart01.bin, Chart1);

This feature is semi-deprecated in favour of the native charts created using add_chart(). Read external_charts.txt (or .pod) in the external_charts directory of the distro for a full explanation.

close()

In general your Excel file will be closed automatically when your program ends or when the Workbook object goes out of scope, however the close() method can be used to explicitly close an Excel file.

$workbook->close();

An explicit close() is required if the file must be closed prior to performing some external action on it such as copying it, reading its size or attaching it to an email.

In addition, close() may be required to prevent perl’s garbage collector from disposing of the Workbook, Worksheet and Format objects in the wrong order. Situations where this can occur are:

  • If my() was not used to declare the scope of a workbook variable created using new().

  • If the new(), add_worksheet() or add_format() methods are called in subroutines.

The reason for this is that Spreadsheet::WriteExcel relies on Perl’s DESTROY mechanism to trigger destructor methods in a specific sequence. This may not happen in cases where the Workbook, Worksheet and Format variables are not lexically scoped or where they have different lexical scopes.

In general, if you create a file with a size of 0 bytes or you fail to create a file you need to call close().

The return value of close() is the same as that returned by perl when it closes the file created by new(). This allows you to handle error conditions in the usual way:

$workbook->close() or die “Error closing file: $!”;

compatibility_mode()

This method is used to improve compatibility with third party applications that read Excel files.

$workbook->compatibility_mode();

An Excel file is comprised of binary records that describe properties of a spreadsheet. Excel is reasonably liberal about this and, outside of a core subset, it doesn’t require every possible record to be present when it reads a file. This is also true of Gnumeric and OpenOffice.Org Calc.

Spreadsheet::WriteExcel takes advantage of this fact to omit some records in order to minimise the amount of data stored in memory and to simplify and speed up the writing of files. However, some third party applications that read Excel files often expect certain records to be present. In compatibility mode Spreadsheet::WriteExcel writes these records and tries to be as close to an Excel generated file as possible.

Applications that require compatibility_mode() are Apache POI, Apple Numbers, and Quickoffice on Nokia, Palm and other devices. You should also use compatibility_mode() if your Excel file will be used as an external data source by another Excel file.

If you encounter other situations that require compatibility_mode(), please let me know.

It should be noted that compatibility_mode() requires additional data to be stored in memory and additional processing. This incurs a memory and speed penalty and may not be suitable for very large files (>20MB).

You must call compatibility_mode() before calling add_worksheet().

set_properties()

The set_properties method can be used to set the document properties of the Excel file created by Spreadsheet::WriteExcel. These properties are visible when you use the File->Properties menu option in Excel and are also available to external applications that read or index windows files.

The properties should be passed as a hash of values as follows:

$workbook->set_properties( title => This is an example spreadsheet, author => John McNamara, comments => Created with Perl and Spreadsheet::WriteExcel, );

The properties that can be set are:

title subject author manager company category keywords comments

User defined properties are not supported due to effort required.

In perl 5.8+ you can also pass UTF-8 strings as properties. See UNICODE IN EXCEL.

my $smiley = chr 0x263A; $workbook->set_properties( subject => “Happy now? $smiley”, );

With older versions of perl you can use a module to convert a non-ASCII string to a binary representation of UTF-8 and then pass an additional utf8 flag to set_properties():

my $smiley = pack H*, E298BA; $workbook->set_properties( subject => “Happy now? $smiley”, utf8 => 1, );

Usually Spreadsheet::WriteExcel allows you to use UTF-16 with pre 5.8 versions of perl. However, document properties don’t support UTF-16 for these type of strings.

In order to promote the usefulness of Perl and the Spreadsheet::WriteExcel module consider adding a comment such as the following when using document properties:

$workbook->set_properties( …, comments => Created with Perl and Spreadsheet::WriteExcel, …, );

This feature requires that the OLE::Storage_Lite module is installed (which is usually the case for a standard Spreadsheet::WriteExcel installation). However, this also means that the resulting OLE document may possibly be buggy for files less than 7MB since it hasn’t been as rigorously tested in that domain. As a result of this set_properties is currently incompatible with Gnumeric for files less than 7MB. This is being investigated. If you encounter any problems with this features let me know.

For convenience it is possible to pass either a hash or hash ref of arguments to this method.

See also the properties.pl program in the examples directory of the distro.

define_name()

This method is used to defined a name that can be used to represent a value, a single cell or a range of cells in a workbook.

$workbook->define_name(Exchange_rate, =0.96); $workbook->define_name(Sales, =Sheet1!$G$1:$H$10); $workbook->define_name(Sheet2!Sales, =Sheet2!$G$1:$G$10);

See the defined_name.pl program in the examples dir of the distro.

Note: This currently a beta feature. More documentation and examples will be added.

set_tempdir()

For speed and efficiency Spreadsheet::WriteExcel stores worksheet data in temporary files prior to assembling the final workbook.

If Spreadsheet::WriteExcel is unable to create these temporary files it will store the required data in memory. This can be slow for large files.

The problem occurs mainly with IIS on Windows although it could feasibly occur on Unix systems as well. The problem generally occurs because the default temp file directory is defined as C:/ or some other directory that IIS doesn’t provide write access to.

To check if this might be a problem on a particular system you can run a simple test program with -w or use warnings. This will generate a warning if the module cannot create the required temporary files:

#!/usr/bin/perl -w use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(test.xls); my $worksheet = $workbook->add_worksheet();

To avoid this problem the set_tempdir() method can be used to specify a directory that is accessible for the creation of temporary files.

The File::Temp module is used to create the temporary files. File::Temp uses File::Spec to determine an appropriate location for these files such as /tmp or c:\windows emp. You can find out which directory is used on your system as follows:

perl -MFile::Spec -le “print File::Spec->tmpdir”

Even if the default temporary file directory is accessible you may wish to specify an alternative location for security or maintenance reasons:

$workbook->set_tempdir(/tmp/writeexcel); $workbook->set_tempdir(c:\windows emp\writeexcel);

The directory for the temporary file must exist, set_tempdir() will not create a new directory.

One disadvantage of using the set_tempdir() method is that on some Windows systems it will limit you to approximately 800 concurrent tempfiles. This means that a single program running on one of these systems will be limited to creating a total of 800 workbook and worksheet objects. You can run multiple, non-concurrent programs to work around this if necessary.

set_custom_color($index, $red, $green, $blue)

The set_custom_color() method can be used to override one of the built-in palette values with a more suitable colour.

The value for $index should be in the range 8..63, see COLOURS IN EXCEL.

The default named colours use the following indices:

8 => black 9 => white 10 => red 11 => lime 12 => blue 13 => yellow 14 => magenta 15 => cyan 16 => brown 17 => green 18 => navy 20 => purple 22 => silver 23 => gray 33 => pink 53 => orange

A new colour is set using its RGB (red green blue) components. The $red, $green and $blue values must be in the range 0..255. You can determine the required values in Excel using the Tools->Options->Colors->Modify dialog.

The set_custom_color() workbook method can also be used with a HTML style #rrggbb hex value:

$workbook->set_custom_color(40, 255, 102, 0 ); # Orange $workbook->set_custom_color(40, 0xFF, 0x66, 0x00); # Same thing $workbook->set_custom_color(40, #FF6600 ); # Same thing my $font = $workbook->add_format(color => 40); # Use the modified colour

The return value from set_custom_color() is the index of the colour that was changed:

my $ferrari = $workbook->set_custom_color(40, 216, 12, 12); my $format = $workbook->add_format( bg_color => $ferrari, pattern => 1, border => 1 );

sheets(0, 1, …)

The sheets() method returns a list, or a sliced list, of the worksheets in a workbook.

If no arguments are passed the method returns a list of all the worksheets in the workbook. This is useful if you want to repeat an operation on each worksheet:

foreach $worksheet ($workbook->sheets()) { print $worksheet->get_name(); }

You can also specify a slice list to return one or more worksheet objects:

$worksheet = $workbook->sheets(0); $worksheet->write(A1, Hello);

Or since return value from sheets() is a reference to a worksheet object you can write the above example as:

$workbook->sheets(0)->write(A1, Hello);

The following example returns the first and last worksheet in a workbook:

foreach $worksheet ($workbook->sheets(0, -1)) { # Do something }

Array slices are explained in the perldata manpage.

set_1904()

Excel stores dates as real numbers where the integer part stores the number of days since the epoch and the fractional part stores the percentage of the day. The epoch can be either 1900 or 1904. Excel for Windows uses 1900 and Excel for Macintosh uses 1904. However, Excel on either platform will convert automatically between one system and the other.

Spreadsheet::WriteExcel stores dates in the 1900 format by default. If you wish to change this you can call the set_1904() workbook method. You can query the current value by calling the get_1904() workbook method. This returns 0 for 1900 and 1 for 1904.

See also DATES AND TIME IN EXCEL for more information about working with Excel’s date system.

In general you probably won’t need to use set_1904().

set_codepage($codepage)

The default code page or character set used by Spreadsheet::WriteExcel is ANSI. This is also the default used by Excel for Windows. Occasionally however it may be necessary to change the code page via the set_codepage() method.

Changing the code page may be required if your are using Spreadsheet::WriteExcel on the Macintosh and you are using characters outside the ASCII 128 character set:

$workbook->set_codepage(1); # ANSI, MS Windows $workbook->set_codepage(2); # Apple Macintosh

The set_codepage() method is rarely required.

WORKSHEET METHODS

A new worksheet is created by calling the add_worksheet() method from a workbook object:

$worksheet1 = $workbook->add_worksheet(); $worksheet2 = $workbook->add_worksheet();

The following methods are available through a new worksheet:

write() write_number() write_string() write_utf16be_string() write_utf16le_string() keep_leading_zeros() write_blank() write_row() write_col() write_date_time() write_url() write_url_range() write_formula() store_formula() repeat_formula() write_comment() show_comments() add_write_handler() insert_image() insert_chart() data_validation() get_name() activate() select() hide() set_first_sheet() protect() set_selection() set_row() set_column() outline_settings() freeze_panes() split_panes() merge_range() set_zoom() right_to_left() hide_zero() set_tab_color() autofilter()

Cell notation

Spreadsheet::WriteExcel supports two forms of notation to designate the position of cells: Row-column notation and A1 notation.

Row-column notation uses a zero based index for both row and column while A1 notation uses the standard Excel alphanumeric sequence of column letter and 1-based row. For example:

(0, 0) # The top left cell in row-column notation. (A1) # The top left cell in A1 notation. (1999, 29) # Row-column notation. (AD2000) # The same cell in A1 notation.

Row-column notation is useful if you are referring to cells programmatically:

for my $i (0 .. 9) { $worksheet->write($i, 0, Hello); # Cells A1 to A10 }

A1 notation is useful for setting up a worksheet manually and for working with formulas:

$worksheet->write(H1, 200); $worksheet->write(H2, =H1+1);

In formulas and applicable methods you can also use the A:A column notation:

$worksheet->write(A1, =SUM(B:B));

The Spreadsheet::WriteExcel::Utility module that is included in the distro contains helper functions for dealing with A1 notation, for example:

use Spreadsheet::WriteExcel::Utility; ($row, $col) = xl_cell_to_rowcol(C2); # (1, 2) $str = xl_rowcol_to_cell(1, 2); # C2

For simplicity, the parameter lists for the worksheet method calls in the following sections are given in terms of row-column notation. In all cases it is also possible to use A1 notation.

Note: in Excel it is also possible to use a R1C1 notation. This is not supported by Spreadsheet::WriteExcel.

write($row, $column, $token, $format)

Excel makes a distinction between data types such as strings, numbers, blanks, formulas and hyperlinks. To simplify the process of writing data the write() method acts as a general alias for several more specific methods:

write_string() write_number() write_blank() write_formula() write_url() write_row() write_col()

The general rule is that if the data looks like a something then a something is written. Here are some examples in both row-column and A1 notation:

# Same as: $worksheet->write(0, 0, Hello ); # write_string() $worksheet->write(1, 0, One ); # write_string() $worksheet->write(2, 0, 2 ); # write_number() $worksheet->write(3, 0, 3.00001 ); # write_number() $worksheet->write(4, 0, "" ); # write_blank() $worksheet->write(5, 0, ); # write_blank() $worksheet->write(6, 0, undef ); # write_blank() $worksheet->write(7, 0 ); # write_blank() $worksheet->write(8, 0, http://www.perl.com/); # write_url() $worksheet->write(A9, ftp://ftp.cpan.org/ ); # write_url() $worksheet->write(A10, internal:Sheet1!A1 ); # write_url() $worksheet->write(A11, external:c: oo.xls ); # write_url() $worksheet->write(A12, =A3 + 3*A4 ); # write_formula() $worksheet->write(A13, =SIN(PI()/4) ); # write_formula() $worksheet->write(A14, \array ); # write_row() $worksheet->write(A15, [\array] ); # write_col() # And if the keep_leading_zeros property is set: $worksheet->write(A16, 2 ); # write_number() $worksheet->write(A17, 02 ); # write_string() $worksheet->write(A18, 00002 ); # write_string()

The looks like rule is defined by regular expressions:

write_number() if $token is a number based on the following regex: $token =~ /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/.

write_string() if keep_leading_zeros() is set and $token is an integer with leading zeros based on the following regex: $token =~ /^0\d+$/.

write_blank() if $token is undef or a blank string: undef, "" or .

write_url() if $token is a http, https, ftp or mailto URL based on the following regexes: $token =~ m|^[fh]tt?ps?://| or $token =~ m|^mailto:|.

write_url() if $token is an internal or external sheet reference based on the following regex: $token =~ m[^(in|ex)ternal:].

write_formula() if the first character of $token is "=".

write_row() if $token is an array ref.

write_col() if $token is an array ref of array refs.

write_string() if none of the previous conditions apply.

The $format parameter is optional. It should be a valid Format object, see CELL FORMATTING:

my $format = $workbook->add_format(); $format->set_bold(); $format->set_color(red); $format->set_align(center); $worksheet->write(4, 0, Hello, $format); # Formatted string

The write() method will ignore empty strings or undef tokens unless a format is also supplied. As such you needn’t worry about special handling for empty or undef values in your data. See also the write_blank() method.

One problem with the write() method is that occasionally data looks like a number but you don’t want it treated as a number. For example, zip codes or ID numbers often start with a leading zero. If you write this data as a number then the leading zero(s) will be stripped. You can change this default behaviour by using the keep_leading_zeros() method. While this property is in place any integers with leading zeros will be treated as strings and the zeros will be preserved. See the keep_leading_zeros() section for a full discussion of this issue.

You can also add your own data handlers to the write() method using add_write_handler().

On systems with perl 5.8 and later the write() method will also handle Unicode strings in UTF-8 format.

The write methods return:

0 for success. -1 for insufficient number of arguments. -2 for row or column out of bounds. -3 for string too long.

write_number($row, $column, $number, $format)

Write an integer or a float to the cell specified by $row and $column:

$worksheet->write_number(0, 0, 123456); $worksheet->write_number(A2, 2.3451);

See the note about Cell notation. The $format parameter is optional.

In general it is sufficient to use the write() method.

write_string($row, $column, $string, $format)

Write a string to the cell specified by $row and $column:

$worksheet->write_string(0, 0, Your text here ); $worksheet->write_string(A2, or here );

The maximum string size is 32767 characters. However the maximum string segment that Excel can display in a cell is 1000. All 32767 characters can be displayed in the formula bar.

The $format parameter is optional.

On systems with perl 5.8 and later the write() method will also handle strings in UTF-8 format. With older perls you can also write Unicode in UTF16 format via the write_utf16be_string() method. See also the unicode_*.pl programs in the examples directory of the distro.

In general it is sufficient to use the write() method. However, you may sometimes wish to use the write_string() method to write data that looks like a number but that you don’t want treated as a number. For example, zip codes or phone numbers:

# Write as a plain string $worksheet->write_string(A1, 01209);

However, if the user edits this string Excel may convert it back to a number. To get around this you can use the Excel text format @:

# Format as a string. Doesnt change to a number when edited my $format1 = $workbook->add_format(num_format => @); $worksheet->write_string(A2, 01209, $format1);

See also the note about Cell notation.

write_utf16be_string($row, $column, $string, $format)

This method is used to write UTF-16BE strings to a cell in Excel. It is functionally the same as the write_string() method except that the string should be in UTF-16BE Unicode format. It is generally easier, when using Spreadsheet::WriteExcel, to write unicode strings in UTF-8 format, see UNICODE IN EXCEL. The write_utf16be_string() method is mainly of use in versions of perl prior to 5.8.

The following is a simple example showing how to write some Unicode strings in UTF-16BE format:

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; use Unicode::Map(); my $workbook = Spreadsheet::WriteExcel->new(utf_16_be.xls); my $worksheet = $workbook->add_worksheet(); # Increase the column width for clarity $worksheet->set_column(A:A, 25); # Write a Unicode character # my $smiley = pack n, 0x263a; # Increase the font size for legibility. my $big_font = $workbook->add_format(size => 72); $worksheet->write_utf16be_string(A3, $smiley, $big_font); # Write a phrase in Cyrillic using a hex-encoded string # my $str = pack H*, 042d0442043e0020044404400430043704300020043d . 043000200440044304410441043a043e043c0021; $worksheet->write_utf16be_string(A5, $str); # Map a string to UTF-16BE using an external module. # my $map = Unicode::Map->new(ISO-8859-1); my $utf16 = $map->to_unicode(Hello world!); $worksheet->write_utf16be_string(A7, $utf16);

You can convert ASCII encodings to the required UTF-16BE format using one of the many Unicode modules on CPAN. For example Unicode::Map and Unicode::String: <http://search.cpan.org/author/MSCHWARTZ/Unicode-Map/Map.pm> and <http://search.cpan.org/author/GAAS/Unicode-String/String.pm>.

For a full list of the Perl Unicode modules see: <http://search.cpan.org/search?query=unicode&mode=all>.

UTF-16BE is the format most often returned by Perl modules that generate UTF-16. To write UTF-16 strings in little-endian format use the write_utf16be_string_le() method below.

The write_utf16be_string() method was previously called write_unicode(). That, overly general, name is still supported but deprecated.

See also the unicode_*.pl programs in the examples directory of the distro.

write_utf16le_string($row, $column, $string, $format)

This method is the same as write_utf16be() except that the string should be 16-bit characters in little-endian format. This is generally referred to as UTF-16LE. See UNICODE IN EXCEL.

UTF-16 data can be changed from little-endian to big-endian format (and vice-versa) as follows:

$utf16be = pack n*, unpack v*, $utf16le;

keep_leading_zeros()

This method changes the default handling of integers with leading zeros when using the write() method.

The write() method uses regular expressions to determine what type of data to write to an Excel worksheet. If the data looks like a number it writes a number using write_number(). One problem with this approach is that occasionally data looks like a number but you don’t want it treated as a number.

Zip codes and ID numbers, for example, often start with a leading zero. If you write this data as a number then the leading zero(s) will be stripped. This is the also the default behaviour when you enter data manually in Excel.

To get around this you can use one of three options. Write a formatted number, write the number as a string or use the keep_leading_zeros() method to change the default behaviour of write():

# Implicitly write a number, the leading zero is removed: 1209 $worksheet->write(A1, 01209); # Write a zero padded number using a format: 01209 my $format1 = $workbook->add_format(num_format => 00000); $worksheet->write(A2, 01209, $format1); # Write explicitly as a string: 01209 $worksheet->write_string(A3, 01209); # Write implicitly as a string: 01209 $worksheet->keep_leading_zeros(); $worksheet->write(A4, 01209);

The above code would generate a worksheet that looked like the following:

———————————————————– | | A | B | C | D | … ———————————————————– | 1 | 1209 | | | | … | 2 | 01209 | | | | … | 3 | 01209 | | | | … | 4 | 01209 | | | | …

The examples are on different sides of the cells due to the fact that Excel displays strings with a left justification and numbers with a right justification by default. You can change this by using a format to justify the data, see CELL FORMATTING.

It should be noted that if the user edits the data in examples A3 and A4 the strings will revert back to numbers. Again this is Excel’s default behaviour. To avoid this you can use the text format @:

# Format as a string (01209) my $format2 = $workbook->add_format(num_format => @); $worksheet->write_string(A5, 01209, $format2);

The keep_leading_zeros() property is off by default. The keep_leading_zeros() method takes 0 or 1 as an argument. It defaults to 1 if an argument isn’t specified:

$worksheet->keep_leading_zeros(); # Set on $worksheet->keep_leading_zeros(1); # Set on $worksheet->keep_leading_zeros(0); # Set off

See also the add_write_handler() method.

write_blank($row, $column, $format)

Write a blank cell specified by $row and $column:

$worksheet->write_blank(0, 0, $format);

This method is used to add formatting to a cell which doesn’t contain a string or number value.

Excel differentiates between an Empty cell and a Blank cell. An Empty cell is a cell which doesn’t contain data whilst a Blank cell is a cell which doesn’t contain data but does contain formatting. Excel stores Blank cells but ignores Empty cells.

As such, if you write an empty cell without formatting it is ignored:

$worksheet->write(A1, undef, $format); # write_blank() $worksheet->write(A2, undef ); # Ignored

This seemingly uninteresting fact means that you can write arrays of data without special treatment for undef or empty string values.

See the note about Cell notation.

write_row($row, $column, $array_ref, $format)

The write_row() method can be used to write a 1D or 2D array of data in one go. This is useful for converting the results of a database query into an Excel worksheet. You must pass a reference to the array of data rather than the array itself. The write() method is then called for each element of the data. For example:

@array = (awk, gawk, mawk); $array_ref = \array; $worksheet->write_row(0, 0, $array_ref); # The above example is equivalent to: $worksheet->write(0, 0, $array[0]); $worksheet->write(0, 1, $array[1]); $worksheet->write(0, 2, $array[2]);

Note: For convenience the write() method behaves in the same way as write_row() if it is passed an array reference. Therefore the following two method calls are equivalent:

$worksheet->write_row(A1, $array_ref); # Write a row of data $worksheet->write( A1, $array_ref); # Same thing

As with all of the write methods the $format parameter is optional. If a format is specified it is applied to all the elements of the data array.

Array references within the data will be treated as columns. This allows you to write 2D arrays of data in one go. For example:

@eec = ( [maggie, milly, molly, may ], [13, 14, 15, 16 ], [shell, star, crab, stone] ); $worksheet->write_row(A1, \eec);

Would produce a worksheet as follows:

———————————————————– | | A | B | C | D | E | … ———————————————————– | 1 | maggie | 13 | shell | … | … | … | 2 | milly | 14 | star | … | … | … | 3 | molly | 15 | crab | … | … | … | 4 | may | 16 | stone | … | … | … | 5 | … | … | … | … | … | … | 6 | … | … | … | … | … | …

To write the data in a row-column order refer to the write_col() method below.

Any undef values in the data will be ignored unless a format is applied to the data, in which case a formatted blank cell will be written. In either case the appropriate row or column value will still be incremented.

To find out more about array references refer to perlref and perlreftut in the main Perl documentation. To find out more about 2D arrays or lists of lists refer to perllol.

The write_row() method returns the first error encountered when writing the elements of the data or zero if no errors were encountered. See the return values described for the write() method above.

See also the write_arrays.pl program in the examples directory of the distro.

The write_row() method allows the following idiomatic conversion of a text file to an Excel file:

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(file.xls); my $worksheet = $workbook->add_worksheet(); open INPUT, file.txt or die “Couldnt open file: $!”; $worksheet->write($.-1, 0, [split]) while <INPUT>;

write_col($row, $column, $array_ref, $format)

The write_col() method can be used to write a 1D or 2D array of data in one go. This is useful for converting the results of a database query into an Excel worksheet. You must pass a reference to the array of data rather than the array itself. The write() method is then called for each element of the data. For example:

@array = (awk, gawk, mawk); $array_ref = \array; $worksheet->write_col(0, 0, $array_ref); # The above example is equivalent to: $worksheet->write(0, 0, $array[0]); $worksheet->write(1, 0, $array[1]); $worksheet->write(2, 0, $array[2]);

As with all of the write methods the $format parameter is optional. If a format is specified it is applied to all the elements of the data array.

Array references within the data will be treated as rows. This allows you to write 2D arrays of data in one go. For example:

@eec = ( [maggie, milly, molly, may ], [13, 14, 15, 16 ], [shell, star, crab, stone] ); $worksheet->write_col(A1, \eec);

Would produce a worksheet as follows:

———————————————————– | | A | B | C | D | E | … ———————————————————– | 1 | maggie | milly | molly | may | … | … | 2 | 13 | 14 | 15 | 16 | … | … | 3 | shell | star | crab | stone | … | … | 4 | … | … | … | … | … | … | 5 | … | … | … | … | … | … | 6 | … | … | … | … | … | …

To write the data in a column-row order refer to the write_row() method above.

Any undef values in the data will be ignored unless a format is applied to the data, in which case a formatted blank cell will be written. In either case the appropriate row or column value will still be incremented.

As noted above the write() method can be used as a synonym for write_row() and write_row() handles nested array refs as columns. Therefore, the following two method calls are equivalent although the more explicit call to write_col() would be preferable for maintainability:

$worksheet->write_col(A1, $array_ref ); # Write a column of data $worksheet->write( A1, [ $array_ref ]); # Same thing

To find out more about array references refer to perlref and perlreftut in the main Perl documentation. To find out more about 2D arrays or lists of lists refer to perllol.

The write_col() method returns the first error encountered when writing the elements of the data or zero if no errors were encountered. See the return values described for the write() method above.

See also the write_arrays.pl program in the examples directory of the distro.

write_date_time($row, $col, $date_string, $format)

The write_date_time() method can be used to write a date or time to the cell specified by $row and $column:

$worksheet->write_date_time(A1, 2004-05-13T23:20, $date_format);

The $date_string should be in the following format:

yyyy-mm-ddThh:mm:ss.sss

This conforms to an ISO8601 date but it should be noted that the full range of ISO8601 formats are not supported.

The following variations on the $date_string parameter are permitted:

yyyy-mm-ddThh:mm:ss.sss # Standard format yyyy-mm-ddT # No time Thh:mm:ss.sss # No date yyyy-mm-ddThh:mm:ss.sssZ # Additional Z (but not time zones) yyyy-mm-ddThh:mm:ss # No fractional seconds yyyy-mm-ddThh:mm # No seconds

Note that the T is required in all cases.

A date should always have a $format, otherwise it will appear as a number, see DATES AND TIME IN EXCEL and CELL FORMATTING. Here is a typical example:

my $date_format = $workbook->add_format(num_format => mm/dd/yy); $worksheet->write_date_time(A1, 2004-05-13T23:20, $date_format);

Valid dates should be in the range 1900-01-01 to 9999-12-31, for the 1900 epoch and 1904-01-01 to 9999-12-31, for the 1904 epoch. As with Excel, dates outside these ranges will be written as a string.

See also the date_time.pl program in the examples directory of the distro.

write_url($row, $col, $url, $label, $format)

Write a hyperlink to a URL in the cell specified by $row and $column. The hyperlink is comprised of two elements: the visible label and the invisible link. The visible label is the same as the link unless an alternative label is specified. The parameters $label and the $format are optional and their position is interchangeable.

The label is written using the write() method. Therefore it is possible to write strings, numbers or formulas as labels.

There are four web style URI’s supported: http://, https://, ftp:// and mailto::

$worksheet->write_url(0, 0, ftp://www.perl.org/ ); $worksheet->write_url(1, 0, http://www.perl.com/, Perl home ); $worksheet->write_url(A3, http://www.perl.com/, $format ); $worksheet->write_url(A4, http://www.perl.com/, Perl, $format); $worksheet->write_url(A5, mailto:[email protected] );

There are two local URIs supported: internal: and external:. These are used for hyperlinks to internal worksheet references or external workbook and worksheet references:

$worksheet->write_url(A6, internal:Sheet2!A1 ); $worksheet->write_url(A7, internal:Sheet2!A1, $format ); $worksheet->write_url(A8, internal:Sheet2!A1:B2 ); $worksheet->write_url(A9, q{internal:Sales Data!A1} ); $worksheet->write_url(A10, external:c: emp oo.xls ); $worksheet->write_url(A11, external:c: emp oo.xls#Sheet2!A1 ); $worksheet->write_url(A12, external:.... oo.xls ); $worksheet->write_url(A13, external:.... oo.xls#Sheet2!A1 ); $worksheet->write_url(A13, external:\NETWORK\share oo.xls );

All of the these URI types are recognised by the write() method, see above.

Worksheet references are typically of the form Sheet1!A1. You can also refer to a worksheet range using the standard Excel notation: Sheet1!A1:B2.

In external links the workbook and worksheet name must be separated by the # character: external:Workbook.xls#Sheet1!A1.

You can also link to a named range in the target worksheet. For example say you have a named range called my_name in the workbook c: emp oo.xls you could link to it as follows:

$worksheet->write_url(A14, external:c: emp oo.xls#my_name);

Note, you cannot currently create named ranges with Spreadsheet::WriteExcel.

Excel requires that worksheet names containing spaces or non alphanumeric characters are single quoted as follows Sales Data!A1. If you need to do this in a single quoted string then you can either escape the single quotes \ or use the quote operator q{} as described in perlop in the main Perl documentation.

Links to network files are also supported. MS/Novell Network files normally begin with two back slashes as follows \NETWORKtc. In order to generate this in a single or double quoted string you will have to escape the backslashes, \\NETWORKtc.

If you are using double quote strings then you should be careful to escape anything that looks like a metacharacter. For more information see perlfaq5: Why cant I use "C: emp oo" in DOS paths?.

Finally, you can avoid most of these quoting problems by using forward slashes. These are translated internally to backslashes:

$worksheet->write_url(A14, “external:c:/temp/foo.xls” ); $worksheet->write_url(A15, external://NETWORK/share/foo.xls );

See also, the note about Cell notation.

write_url_range($row1, $col1, $row2, $col2, $url, $string, $format)

This method is essentially the same as the write_url() method described above. The main difference is that you can specify a link for a range of cells:

$worksheet->write_url(0, 0, 0, 3, ftp://www.perl.org/ ); $worksheet->write_url(1, 0, 0, 3, http://www.perl.com/, Perl home); $worksheet->write_url(A3:D3, internal:Sheet2!A1 ); $worksheet->write_url(A4:D4, external:c: emp oo.xls );

This method is generally only required when used in conjunction with merged cells. See the merge_range() method and the merge property of a Format object, CELL FORMATTING.

There is no way to force this behaviour through the write() method.

The parameters $string and the $format are optional and their position is interchangeable. However, they are applied only to the first cell in the range.

See also, the note about Cell notation.

write_formula($row, $column, $formula, $format, $value)

Write a formula or function to the cell specified by $row and $column:

$worksheet->write_formula(0, 0, =$B$3 + B4 ); $worksheet->write_formula(1, 0, =SIN(PI()/4)); $worksheet->write_formula(2, 0, =SUM(B1:B5) ); $worksheet->write_formula(A4, =IF(A3>1,“Yes”, “No”) ); $worksheet->write_formula(A5, =AVERAGE(1, 2, 3, 4) ); $worksheet->write_formula(A6, =DATEVALUE(“1-Jan-2001”));

See the note about Cell notation. For more information about writing Excel formulas see FORMULAS AND FUNCTIONS IN EXCEL

See also the section Improving performance when working with formulas and the store_formula() and repeat_formula() methods.

If required, it is also possible to specify the calculated value of the formula. This is occasionally necessary when working with non-Excel applications that don’t calculate the value of the formula. The calculated $value is added at the end of the argument list:

$worksheet->write(A1, =2+2, $format, 4);

However, this probably isn’t something that will ever need to do. If you do use this feature then do so with care.

store_formula($formula)

The store_formula() method is used in conjunction with repeat_formula() to speed up the generation of repeated formulas. See Improving performance when working with formulas in FORMULAS AND FUNCTIONS IN EXCEL.

The store_formula() method pre-parses a textual representation of a formula and stores it for use at a later stage by the repeat_formula() method.

store_formula() carries the same speed penalty as write_formula(). However, in practice it will be used less frequently.

The return value of this method is a scalar that can be thought of as a reference to a formula.

my $sin = $worksheet->store_formula(=SIN(A1)); my $cos = $worksheet->store_formula(=COS(A1)); $worksheet->repeat_formula(B1, $sin, $format, A1, A2); $worksheet->repeat_formula(C1, $cos, $format, A1, A2);

Although store_formula() is a worksheet method the return value can be used in any worksheet:

my $now = $worksheet->store_formula(=NOW()); $worksheet1->repeat_formula(B1, $now); $worksheet2->repeat_formula(B1, $now); $worksheet3->repeat_formula(B1, $now);

repeat_formula($row, $col, $formula, $format, ($pattern => $replace, …))

The repeat_formula() method is used in conjunction with store_formula() to speed up the generation of repeated formulas. See Improving performance when working with formulas in FORMULAS AND FUNCTIONS IN EXCEL.

In many respects repeat_formula() behaves like write_formula() except that it is significantly faster.

The repeat_formula() method creates a new formula based on the pre-parsed tokens returned by store_formula(). The new formula is generated by substituting $pattern, $replace pairs in the stored formula:

my $formula = $worksheet->store_formula(=A1 * 3 + 50); for my $row (0..99) { $worksheet->repeat_formula($row, 1, $formula, $format, A1, A.($row +1)); }

It should be noted that repeat_formula() doesn’t modify the tokens. In the above example the substitution is always made against the original token, A1, which doesn’t change.

As usual, you can use undef if you don’t wish to specify a $format:

$worksheet->repeat_formula(B2, $formula, $format, A1, A2); $worksheet->repeat_formula(B3, $formula, undef, A1, A3);

The substitutions are made from left to right and you can use as many $pattern, $replace pairs as you need. However, each substitution is made only once:

my $formula = $worksheet->store_formula(=A1 + A1); # Gives =B1 + A1 $worksheet->repeat_formula(B1, $formula, undef, A1, B1); # Gives =B1 + B1 $worksheet->repeat_formula(B2, $formula, undef, (A1, B1) x 2);

Since the $pattern is interpolated each time that it is used it is worth using the qr operator to quote the pattern. The qr operator is explained in the perlop man page.

$worksheet->repeat_formula(B1, $formula, $format, qr/A1/, A2);

Care should be taken with the values that are substituted. The formula returned by repeat_formula() contains several other tokens in addition to those in the formula and these might also match the pattern that you are trying to replace. In particular you should avoid substituting a single 0, 1, 2 or 3.

You should also be careful to avoid false matches. For example the following snippet is meant to change the stored formula in steps from =A1 + SIN(A1) to =A10 + SIN(A10).

my $formula = $worksheet->store_formula(=A1 + SIN(A1)); for my $row (1 .. 10) { $worksheet->repeat_formula($row -1, 1, $formula, undef, qw/A1/, A . $row, #! Bad. qw/A1/, A . $row #! Bad. ); }

However it contains a bug. In the last iteration of the loop when $row is 10 the following substitutions will occur:

s/A1/A10/; changes =A1 + SIN(A1) to =A10 + SIN(A1) s/A1/A10/; changes =A10 + SIN(A1) to =A100 + SIN(A1) # !!

The solution in this case is to use a more explicit match such as qw/^A1$/:

$worksheet->repeat_formula($row -1, 1, $formula, undef, qw/^A1$/, A . $row, qw/^A1$/, A . $row );

Another similar problem occurs due to the fact that substitutions are made in order. For example the following snippet is meant to change the stored formula from =A10 + A11 to =A11 + A12:

my $formula = $worksheet->store_formula(=A10 + A11); $worksheet->repeat_formula(A1, $formula, undef, qw/A10/, A11, #! Bad. qw/A11/, A12 #! Bad. );

However, the actual substitution yields =A12 + A11:

s/A10/A11/; changes =A10 + A11 to =A11 + A11 s/A11/A12/; changes =A11 + A11 to =A12 + A11 # !!

The solution here would be to reverse the order of the substitutions or to start with a stored formula that won’t yield a false match such as =X10 + Y11:

my $formula = $worksheet->store_formula(=X10 + Y11); $worksheet->repeat_formula(A1, $formula, undef, qw/X10/, A11, qw/Y11/, A12 );

If you think that you have a problem related to a false match you can check the tokens that you are substituting against as follows.

my $formula = $worksheet->store_formula(=A1*5+4); print “@$formula “;

See also the repeat.pl program in the examples directory of the distro.

write_comment($row, $column, $string, …)

The write_comment() method is used to add a comment to a cell. A cell comment is indicated in Excel by a small red triangle in the upper right-hand corner of the cell. Moving the cursor over the red triangle will reveal the comment.

The following example shows how to add a comment to a cell:

$worksheet->write (2, 2, Hello); $worksheet->write_comment(2, 2, This is a comment.);

As usual you can replace the $row and $column parameters with an A1 cell reference. See the note about Cell notation.

$worksheet->write (C3, Hello); $worksheet->write_comment(C3, This is a comment.);

On systems with perl 5.8 and later the write_comment() method will also handle strings in UTF-8 format.

$worksheet->write_comment(C3, “\x{263a}”); # Smiley $worksheet->write_comment(C4, Comment ca va?);

In addition to the basic 3 argument form of write_comment() you can pass in several optional key/value pairs to control the format of the comment. For example:

$worksheet->write_comment(C3, Hello, visible => 1, author => Perl);

Most of these options are quite specific and in general the default comment behaviour will be all that you need. However, should you need greater control over the format of the cell comment the following options are available:

encoding author author_encoding visible x_scale width y_scale height color start_cell start_row start_col x_offset y_offset

Option: encoding
This option is used to indicate that the comment string is encoded as UTF-16BE. my $comment = pack n, 0x263a; # UTF-16BE Smiley symbol $worksheet->write_comment(C3, $comment, encoding => 1); If you wish to use Unicode characters in the comment string then the preferred method is to use perl 5.8 and UTF-8 strings, see UNICODE IN EXCEL.

Option: author
This option is used to indicate who the author of the comment is. Excel displays the author of the comment in the status bar at the bottom of the worksheet. This is usually of interest in corporate environments where several people might review and provide comments to a workbook. $worksheet->write_comment(C3, Atonement, author => Ian McEwan);

Option: author_encoding
This option is used to indicate that the author string is encoded as UTF-16BE.

Option: visible
This option is used to make a cell comment visible when the worksheet is opened. The default behaviour in Excel is that comments are initially hidden. However, it is also possible in Excel to make individual or all comments visible. In Spreadsheet::WriteExcel individual comments can be made visible as follows: $worksheet->write_comment(C3, Hello, visible => 1); It is possible to make all comments in a worksheet visible using the show_comments() worksheet method (see below). Alternatively, if all of the cell comments have been made visible you can hide individual comments: $worksheet->write_comment(C3, Hello, visible => 0);

Option: x_scale
This option is used to set the width of the cell comment box as a factor of the default width. $worksheet->write_comment(C3, Hello, x_scale => 2); $worksheet->write_comment(C4, Hello, x_scale => 4.2);

Option: width
This option is used to set the width of the cell comment box explicitly in pixels. $worksheet->write_comment(C3, Hello, width => 200);

Option: y_scale
This option is used to set the height of the cell comment box as a factor of the default height. $worksheet->write_comment(C3, Hello, y_scale => 2); $worksheet->write_comment(C4, Hello, y_scale => 4.2);

Option: height
This option is used to set the height of the cell comment box explicitly in pixels. $worksheet->write_comment(C3, Hello, height => 200);

Option: color
This option is used to set the background colour of cell comment box. You can use one of the named colours recognised by Spreadsheet::WriteExcel or a colour index. See COLOURS IN EXCEL. $worksheet->write_comment(C3, Hello, color => green); $worksheet->write_comment(C4, Hello, color => 0x35); # Orange

Option: start_cell
This option is used to set the cell in which the comment will appear. By default Excel displays comments one cell to the right and one cell above the cell to which the comment relates. However, you can change this behaviour if you wish. In the following example the comment which would appear by default in cell D2 is moved to E2. $worksheet->write_comment(C3, Hello, start_cell => E2);

Option: start_row
This option is used to set the row in which the comment will appear. See the start_cell option above. The row is zero indexed. $worksheet->write_comment(C3, Hello, start_row => 0);

Option: start_col
This option is used to set the column in which the comment will appear. See the start_cell option above. The column is zero indexed. $worksheet->write_comment(C3, Hello, start_col => 4);

Option: x_offset
This option is used to change the x offset, in pixels, of a comment within a cell: $worksheet->write_comment(C3, $comment, x_offset => 30);

Option: y_offset
This option is used to change the y offset, in pixels, of a comment within a cell: $worksheet->write_comment(C3, $comment, x_offset => 30);

You can apply as many of these options as you require.

See also ROW HEIGHTS AND WORKSHEET OBJECTS.

show_comments()

This method is used to make all cell comments visible when a worksheet is opened.

Individual comments can be made visible using the visible parameter of the write_comment method (see above):

$worksheet->write_comment(C3, Hello, visible => 1);

If all of the cell comments have been made visible you can hide individual comments as follows:

$worksheet->write_comment(C3, Hello, visible => 0);

add_write_handler($re, $code_ref)

This method is used to extend the Spreadsheet::WriteExcel write() method to handle user defined data.

If you refer to the section on write() above you will see that it acts as an alias for several more specific write_* methods. However, it doesn’t always act in exactly the way that you would like it to.

One solution is to filter the input data yourself and call the appropriate write_* method. Another approach is to use the add_write_handler() method to add your own automated behaviour to write().

The add_write_handler() method take two arguments, $re, a regular expression to match incoming data and $code_ref a callback function to handle the matched data:

$worksheet->add_write_handler(qr/^\d\d\d\d$/, \my_write);

(In the these examples the qr operator is used to quote the regular expression strings, see perlop for more details).

The method is used as follows. say you wished to write 7 digit ID numbers as a string so that any leading zeros were preserved*, you could do something like the following:

$worksheet->add_write_handler(qr/^\d{7}$/, \write_my_id); sub write_my_id { my $worksheet = shift; return $worksheet->write_string(@_); }

* You could also use the keep_leading_zeros() method for this.

Then if you call write() with an appropriate string it will be handled automatically:

# Writes 0000000. It would normally be written as a number; 0. $worksheet->write(A1, 0000000);

The callback function will receive a reference to the calling worksheet and all of the other arguments that were passed to write(). The callback will see an @_ argument list that looks like the following:

$_[0] A ref to the calling worksheet. * $_[1] Zero based row number. $_[2] Zero based column number. $_[3] A number or string or token. $_[4] A format ref if any. $_[5] Any other arguments. … * It is good style to shift this off the list so the @_ is the same as the argument list seen by write().

Your callback should return() the return value of the write_* method that was called or undef to indicate that you rejected the match and want write() to continue as normal.

So for example if you wished to apply the previous filter only to ID values that occur in the first column you could modify your callback function as follows:

sub write_my_id { my $worksheet = shift; my $col = $_[1]; if ($col == 0) { return $worksheet->write_string(@_); } else { # Reject the match and return control to write() return undef; } }

Now, you will get different behaviour for the first column and other columns:

$worksheet->write(A1, 0000000); # Writes 0000000 $worksheet->write(B1, 0000000); # Writes 0

You may add more than one handler in which case they will be called in the order that they were added.

Note, the add_write_handler() method is particularly suited for handling dates.

See the write_handler 1-4 programs in the examples directory for further examples.

insert_image($row, $col, $filename, $x, $y, $scale_x, $scale_y)

This method can be used to insert a image into a worksheet. The image can be in PNG, JPEG or BMP format. The $x, $y, $scale_x and $scale_y parameters are optional.

$worksheet1->insert_image(A1, perl.bmp); $worksheet2->insert_image(A1, ../images/perl.bmp); $worksheet3->insert_image(A1, .c:\images\perl.bmp);

The parameters $x and $y can be used to specify an offset from the top left hand corner of the cell specified by $row and $col. The offset values are in pixels.

$worksheet1->insert_image(A1, perl.bmp, 32, 10);

The default width of a cell is 63 pixels. The default height of a cell is 17 pixels. The pixels offsets can be calculated using the following relationships:

Wp = int(12We) if We < 1 Wp = int(7We +5) if We >= 1 Hp = int(4/3He) where: We is the cell width in Excels units Wp is width in pixels He is the cell height in Excels units Hp is height in pixels

The offsets can be greater than the width or height of the underlying cell. This can be occasionally useful if you wish to align two or more images relative to the same cell.

The parameters $scale_x and $scale_y can be used to scale the inserted image horizontally and vertically:

# Scale the inserted image: width x 2.0, height x 0.8 $worksheet->insert_image(A1, perl.bmp, 0, 0, 2, 0.8);

See also the images.pl program in the examples directory of the distro.

BMP images must be 24 bit, true colour, bitmaps. In general it is best to avoid BMP images since they aren’t compressed. The older insert_bitmap() method is still supported but deprecated.

See also ROW HEIGHTS AND WORKSHEET OBJECTS.

insert_chart($row, $col, $chart, $x, $y, $scale_x, $scale_y)

This method can be used to insert a Chart object into a worksheet. The Chart must be created by the add_chart() Workbook method and it must have the embedded option set.

my $chart = $workbook->add_chart( type => line, embedded => 1 ); # Configure the chart. … # Insert the chart into the a worksheet. $worksheet->insert_chart(E2, $chart);

See add_chart() for details on how to create the Chart object and Spreadsheet::WriteExcel::Chart for details on how to configure it. See also the chart_*.pl programs in the examples directory of the distro.

The $x, $y, $scale_x and $scale_y parameters are optional.

The parameters $x and $y can be used to specify an offset from the top left hand corner of the cell specified by $row and $col. The offset values are in pixels. See the insert_image method above for more information on sizes.

$worksheet1->insert_chart(E2, $chart, 3, 3);

The parameters $scale_x and $scale_y can be used to scale the inserted image horizontally and vertically:

# Scale the width by 120% and the height by 150% $worksheet->insert_chart(E2, $chart, 0, 0, 1.2, 1.5);

The easiest way to calculate the required scaling is to create a test chart worksheet with Spreadsheet::WriteExcel. Then open the file, select the chart and drag the corner to get the required size. While holding down the mouse the scale of the resized chart is shown to the left of the formula bar.

See also ROW HEIGHTS AND WORKSHEET OBJECTS.

embed_chart($row, $col, $filename, $x, $y, $scale_x, $scale_y)

This method can be used to insert a externally generated chart into a worksheet. The chart must first be extracted from an existing Excel file. This feature is semi-deprecated in favour of the native charts created using add_chart(). Read external_charts.txt (or .pod) in the external_charts directory of the distro for a full explanation.

Here is an example:

$worksheet->embed_chart(B2, sales_chart.bin);

The $x, $y, $scale_x and $scale_y parameters are optional. See insert_chart() above for details.

data_validation()

The data_validation() method is used to construct an Excel data validation or to limit the user input to a dropdown list of values.

$worksheet->data_validation(B3, { validate => integer, criteria => >, value => 100, }); $worksheet->data_validation(B5:B9, { validate => list, value => [open, high, close], });

This method contains a lot of parameters and is described in detail in a separate section DATA VALIDATION IN EXCEL.

See also the data_validate.pl program in the examples directory of the distro

get_name()

The get_name() method is used to retrieve the name of a worksheet. For example:

foreach my $sheet ($workbook->sheets()) { print $sheet->get_name(); }

For reasons related to the design of Spreadsheet::WriteExcel and to the internals of Excel there is no set_name() method. The only way to set the worksheet name is via the add_worksheet() method.

activate()

The activate() method is used to specify which worksheet is initially visible in a multi-sheet workbook:

$worksheet1 = $workbook->add_worksheet(To); $worksheet2 = $workbook->add_worksheet(the); $worksheet3 = $workbook->add_worksheet(wind); $worksheet3->activate();

This is similar to the Excel VBA activate method. More than one worksheet can be selected via the select() method, see below, however only one worksheet can be active.

The default active worksheet is the first worksheet.

select()

The select() method is used to indicate that a worksheet is selected in a multi-sheet workbook:

$worksheet1->activate(); $worksheet2->select(); $worksheet3->select();

A selected worksheet has its tab highlighted. Selecting worksheets is a way of grouping them together so that, for example, several worksheets could be printed in one go. A worksheet that has been activated via the activate() method will also appear as selected.

hide()

The hide() method is used to hide a worksheet:

$worksheet2->hide();

You may wish to hide a worksheet in order to avoid confusing a user with intermediate data or calculations.

A hidden worksheet can not be activated or selected so this method is mutually exclusive with the activate() and select() methods. In addition, since the first worksheet will default to being the active worksheet, you cannot hide the first worksheet without activating another sheet:

$worksheet2->activate(); $worksheet1->hide();

set_first_sheet()

The activate() method determines which worksheet is initially selected. However, if there are a large number of worksheets the selected worksheet may not appear on the screen. To avoid this you can select which is the leftmost visible worksheet using set_first_sheet():

for (1..20) { $workbook->add_worksheet; } $worksheet21 = $workbook->add_worksheet(); $worksheet22 = $workbook->add_worksheet(); $worksheet21->set_first_sheet(); $worksheet22->activate();

This method is not required very often. The default value is the first worksheet.

protect($password)

The protect() method is used to protect a worksheet from modification:

$worksheet->protect();

It can be turned off in Excel via the Tools->Protection->Unprotect Sheet menu command.

The protect() method also has the effect of enabling a cell’s locked and hidden properties if they have been set. A locked cell cannot be edited. A hidden cell will display the results of a formula but not the formula itself. In Excel a cell’s locked property is on by default.

# Set some format properties my $unlocked = $workbook->add_format(locked => 0); my $hidden = $workbook->add_format(hidden => 1); # Enable worksheet protection $worksheet->protect(); # This cell cannot be edited, it is locked by default $worksheet->write(A1, =1+2); # This cell can be edited $worksheet->write(A2, =1+2, $unlocked); # The formula in this cell isnt visible $worksheet->write(A3, =1+2, $hidden);

See also the set_locked and set_hidden format methods in CELL FORMATTING.

You can optionally add a password to the worksheet protection:

$worksheet->protect(drowssap);

Note, the worksheet level password in Excel provides very weak protection. It does not encrypt your data in any way and it is very easy to deactivate. Therefore, do not use the above method if you wish to protect sensitive data or calculations. However, before you get worried, Excel’s own workbook level password protection does provide strong encryption in Excel 97+. For technical reasons this will never be supported by Spreadsheet::WriteExcel.

set_selection($first_row, $first_col, $last_row, $last_col)

This method can be used to specify which cell or cells are selected in a worksheet. The most common requirement is to select a single cell, in which case $last_row and $last_col can be omitted. The active cell within a selected range is determined by the order in which $first and $last are specified. It is also possible to specify a cell or a range using A1 notation. See the note about Cell notation.

Examples:

$worksheet1->set_selection(3, 3); # 1. Cell D4. $worksheet2->set_selection(3, 3, 6, 6); # 2. Cells D4 to G7. $worksheet3->set_selection(6, 6, 3, 3); # 3. Cells G7 to D4. $worksheet4->set_selection(D4); # Same as 1. $worksheet5->set_selection(D4:G7); # Same as 2. $worksheet6->set_selection(G7:D4); # Same as 3.

The default cell selections is (0, 0), ‘A1’.

set_row($row, $height, $format, $hidden, $level, $collapsed)

This method can be used to change the default properties of a row. All parameters apart from $row are optional.

The most common use for this method is to change the height of a row:

$worksheet->set_row(0, 20); # Row 1 height set to 20

If you wish to set the format without changing the height you can pass undef as the height parameter:

$worksheet->set_row(0, undef, $format);

The $format parameter will be applied to any cells in the row that don’t have a format. For example

$worksheet->set_row(0, undef, $format1); # Set the format for row 1 $worksheet->write(A1, Hello); # Defaults to $format1 $worksheet->write(B1, Hello, $format2); # Keeps $format2

If you wish to define a row format in this way you should call the method before any calls to write(). Calling it afterwards will overwrite any format that was previously specified.

The $hidden parameter should be set to 1 if you wish to hide a row. This can be used, for example, to hide intermediary steps in a complicated calculation:

$worksheet->set_row(0, 20, $format, 1); $worksheet->set_row(1, undef, undef, 1);

The $level parameter is used to set the outline level of the row. Outlines are described in OUTLINES AND GROUPING IN EXCEL. Adjacent rows with the same outline level are grouped together into a single outline.

The following example sets an outline level of 1 for rows 1 and 2 (zero-indexed):

$worksheet->set_row(1, undef, undef, 0, 1); $worksheet->set_row(2, undef, undef, 0, 1);

The $hidden parameter can also be used to hide collapsed outlined rows when used in conjunction with the $level parameter.

$worksheet->set_row(1, undef, undef, 1, 1); $worksheet->set_row(2, undef, undef, 1, 1);

For collapsed outlines you should also indicate which row has the collapsed + symbol using the optional $collapsed parameter.

$worksheet->set_row(3, undef, undef, 0, 0, 1);

For a more complete example see the outline.pl and outline_collapsed.pl programs in the examples directory of the distro.

Excel allows up to 7 outline levels. Therefore the $level parameter should be in the range 0 <= $level <= 7.

set_column($first_col, $last_col, $width, $format, $hidden, $level, $collapsed)

This method can be used to change the default properties of a single column or a range of columns. All parameters apart from $first_col and $last_col are optional.

If set_column() is applied to a single column the value of $first_col and $last_col should be the same. In the case where $last_col is zero it is set to the same value as $first_col.

It is also possible, and generally clearer, to specify a column range using the form of A1 notation used for columns. See the note about Cell notation.

Examples:

$worksheet->set_column(0, 0, 20); # Column A width set to 20 $worksheet->set_column(1, 3, 30); # Columns B-D width set to 30 $worksheet->set_column(E:E, 20); # Column E width set to 20 $worksheet->set_column(F:H, 30); # Columns F-H width set to 30

The width corresponds to the column width value that is specified in Excel. It is approximately equal to the length of a string in the default font of Arial 10. Unfortunately, there is no way to specify AutoFit for a column in the Excel file format. This feature is only available at runtime from within Excel.

As usual the $format parameter is optional, for additional information, see CELL FORMATTING. If you wish to set the format without changing the width you can pass undef as the width parameter:

$worksheet->set_column(0, 0, undef, $format);

The $format parameter will be applied to any cells in the column that don’t have a format. For example

$worksheet->set_column(A:A, undef, $format1); # Set format for col 1 $worksheet->write(A1, Hello); # Defaults to $format1 $worksheet->write(A2, Hello, $format2); # Keeps $format2

If you wish to define a column format in this way you should call the method before any calls to write(). If you call it afterwards it won’t have any effect.

A default row format takes precedence over a default column format

$worksheet->set_row(0, undef, $format1); # Set format for row 1 $worksheet->set_column(A:A, undef, $format2); # Set format for col 1 $worksheet->write(A1, Hello); # Defaults to $format1 $worksheet->write(A2, Hello); # Defaults to $format2

The $hidden parameter should be set to 1 if you wish to hide a column. This can be used, for example, to hide intermediary steps in a complicated calculation:

$worksheet->set_column(D:D, 20, $format, 1); $worksheet->set_column(E:E, undef, undef, 1);

The $level parameter is used to set the outline level of the column. Outlines are described in OUTLINES AND GROUPING IN EXCEL. Adjacent columns with the same outline level are grouped together into a single outline.

The following example sets an outline level of 1 for columns B to G:

$worksheet->set_column(B:G, undef, undef, 0, 1);

The $hidden parameter can also be used to hide collapsed outlined columns when used in conjunction with the $level parameter.

$worksheet->set_column(B:G, undef, undef, 1, 1);

For collapsed outlines you should also indicate which row has the collapsed + symbol using the optional $collapsed parameter.

$worksheet->set_column(H:H, undef, undef, 0, 0, 1);

For a more complete example see the outline.pl and outline_collapsed.pl programs in the examples directory of the distro.

Excel allows up to 7 outline levels. Therefore the $level parameter should be in the range 0 <= $level <= 7.

outline_settings($visible, $symbols_below, $symbols_right, $auto_style)

The outline_settings() method is used to control the appearance of outlines in Excel. Outlines are described in OUTLINES AND GROUPING IN EXCEL.

The $visible parameter is used to control whether or not outlines are visible. Setting this parameter to 0 will cause all outlines on the worksheet to be hidden. They can be unhidden in Excel by means of the Show Outline Symbols command button. The default setting is 1 for visible outlines.

$worksheet->outline_settings(0);

The $symbols_below parameter is used to control whether the row outline symbol will appear above or below the outline level bar. The default setting is 1 for symbols to appear below the outline level bar.

The symbols_right parameter is used to control whether the column outline symbol will appear to the left or the right of the outline level bar. The default setting is 1 for symbols to appear to the right of the outline level bar.

The $auto_style parameter is used to control whether the automatic outline generator in Excel uses automatic styles when creating an outline. This has no effect on a file generated by Spreadsheet::WriteExcel but it does have an effect on how the worksheet behaves after it is created. The default setting is 0 for Automatic Styles to be turned off.

The default settings for all of these parameters correspond to Excel’s default parameters.

The worksheet parameters controlled by outline_settings() are rarely used.

freeze_panes($row, $col, $top_row, $left_col)

This method can be used to divide a worksheet into horizontal or vertical regions known as panes and to also freeze these panes so that the splitter bars are not visible. This is the same as the Window->Freeze Panes menu command in Excel

The parameters $row and $col are used to specify the location of the split. It should be noted that the split is specified at the top or left of a cell and that the method uses zero based indexing. Therefore to freeze the first row of a worksheet it is necessary to specify the split at row 2 (which is 1 as the zero-based index). This might lead you to think that you are using a 1 based index but this is not the case.

You can set one of the $row and $col parameters as zero if you do not want either a vertical or horizontal split.

Examples:

$worksheet->freeze_panes(1, 0); # Freeze the first row $worksheet->freeze_panes(A2); # Same using A1 notation $worksheet->freeze_panes(0, 1); # Freeze the first column $worksheet->freeze_panes(B1); # Same using A1 notation $worksheet->freeze_panes(1, 2); # Freeze first row and first 2 columns $worksheet->freeze_panes(C2); # Same using A1 notation

The parameters $top_row and $left_col are optional. They are used to specify the top-most or left-most visible row or column in the scrolling region of the panes. For example to freeze the first row and to have the scrolling region begin at row twenty:

$worksheet->freeze_panes(1, 0, 20, 0);

You cannot use A1 notation for the $top_row and $left_col parameters.

See also the panes.pl program in the examples directory of the distribution.

split_panes($y, $x, $top_row, $left_col)

This method can be used to divide a worksheet into horizontal or vertical regions known as panes. This method is different from the freeze_panes() method in that the splits between the panes will be visible to the user and each pane will have its own scroll bars.

The parameters $y and $x are used to specify the vertical and horizontal position of the split. The units for $y and $x are the same as those used by Excel to specify row height and column width. However, the vertical and horizontal units are different from each other. Therefore you must specify the $y and $x parameters in terms of the row heights and column widths that you have set or the default values which are 12.75 for a row and 8.43 for a column.

You can set one of the $y and $x parameters as zero if you do not want either a vertical or horizontal split. The parameters $top_row and $left_col are optional. They are used to specify the top-most or left-most visible row or column in the bottom-right pane.

Example:

$worksheet->split_panes(12.75, 0, 1, 0); # First row $worksheet->split_panes(0, 8.43, 0, 1); # First column $worksheet->split_panes(12.75, 8.43, 1, 1); # First row and column

You cannot use A1 notation with this method.

See also the freeze_panes() method and the panes.pl program in the examples directory of the distribution.

Note: This split_panes() method was called thaw_panes() in older versions. The older name is still available for backwards compatibility.

merge_range($first_row, $first_col, $last_row, $last_col, $token, $format, $utf_16_be)

Merging cells can be achieved by setting the merge property of a Format object, see CELL FORMATTING. However, this only allows simple Excel5 style horizontal merging which Excel refers to as center across selection.

The merge_range() method allows you to do Excel97+ style formatting where the cells can contain other types of alignment in addition to the merging:

my $format = $workbook->add_format( border => 6, valign => vcenter, align => center, ); $worksheet->merge_range(B3:D4, Vertical and horizontal, $format);

WARNING. The format object that is used with a merge_range() method call is marked internally as being associated with a merged range. It is a fatal error to use a merged format in a non-merged cell. Instead you should use separate formats for merged and non-merged cells. This restriction will be removed in a future release.

The $utf_16_be parameter is optional, see below.

merge_range() writes its $token argument using the worksheet write() method. Therefore it will handle numbers, strings, formulas or urls as required.

Setting the merge property of the format isn’t required when you are using merge_range(). In fact using it will exclude the use of any other horizontal alignment option.

On systems with perl 5.8 and later the merge_range() method will also handle strings in UTF-8 format.

$worksheet->merge_range(B3:D4, “\x{263a}”, $format); # Smiley

On earlier Perl systems your can specify UTF-16BE worksheet names using an additional optional parameter:

my $str = pack n, 0x263a; $worksheet->merge_range(B3:D4, $str, $format, 1); # Smiley

The full possibilities of this method are shown in the merge3.pl to merge6.pl programs in the examples directory of the distribution.

set_zoom($scale)

Set the worksheet zoom factor in the range 10 <= $scale <= 400:

$worksheet1->set_zoom(50); $worksheet2->set_zoom(75); $worksheet3->set_zoom(300); $worksheet4->set_zoom(400);

The default zoom factor is 100. You cannot zoom to Selection because it is calculated by Excel at run-time.

Note, set_zoom() does not affect the scale of the printed page. For that you should use set_print_scale().

right_to_left()

The right_to_left() method is used to change the default direction of the worksheet from left-to-right, with the A1 cell in the top left, to right-to-left, with the he A1 cell in the top right.

$worksheet->right_to_left();

This is useful when creating Arabic, Hebrew or other near or far eastern worksheets that use right-to-left as the default direction.

hide_zero()

The hide_zero() method is used to hide any zero values that appear in cells.

$worksheet->hide_zero();

In Excel this option is found under Tools->Options->View.

set_tab_color()

The set_tab_color() method is used to change the colour of the worksheet tab. This feature is only available in Excel 2002 and later. You can use one of the standard colour names provided by the Format object or a colour index. See COLOURS IN EXCEL and the set_custom_color() method.

$worksheet1->set_tab_color(red); $worksheet2->set_tab_color(0x0C);

See the tab_colors.pl program in the examples directory of the distro.

autofilter($first_row, $first_col, $last_row, $last_col)

This method allows an autofilter to be added to a worksheet. An autofilter is a way of adding drop down lists to the headers of a 2D range of worksheet data. This in turn allow users to filter the data based on simple criteria so that some data is shown and some is hidden.

To add an autofilter to a worksheet:

$worksheet->autofilter(0, 0, 10, 3); $worksheet->autofilter(A1:D11); # Same as above in A1 notation.

Filter conditions can be applied using the filter_column() method.

See the autofilter.pl program in the examples directory of the distro for a more detailed example.

filter_column($column, $expression)

The filter_column method can be used to filter columns in a autofilter range based on simple conditions.

NOTE: It isn’t sufficient to just specify the filter condition. You must also hide any rows that don’t match the filter condition. Rows are hidden using the set_row() visible parameter. Spreadsheet::WriteExcel cannot do this automatically since it isn’t part of the file format. See the autofilter.pl program in the examples directory of the distro for an example.

The conditions for the filter are specified using simple expressions:

$worksheet->filter_column(A, x > 2000); $worksheet->filter_column(B, x > 2000 and x < 5000);

The $column parameter can either be a zero indexed column number or a string column name.

The following operators are available:

Operator Synonyms == = eq =~ != <> ne != > < >= <= and && or ||

The operator synonyms are just syntactic sugar to make you more comfortable using the expressions. It is important to remember that the expressions will be interpreted by Excel and not by perl.

An expression can comprise a single statement or two statements separated by the and and or operators. For example:

x < 2000 x > 2000 x == 2000 x > 2000 and x < 5000 x == 2000 or x == 5000

Filtering of blank or non-blank data can be achieved by using a value of Blanks or NonBlanks in the expression:

x == Blanks x == NonBlanks

Top 10 style filters can be specified using a expression like the following:

Top|Bottom 1-500 Items|%

For example:

Top 10 Items Bottom 5 Items Top 25 % Bottom 50 %

Excel also allows some simple string matching operations:

x =~ b* # begins with b x !~ b* # doesnt begin with b x =~ *b # ends with b x !~ *b # doesnt end with b x =~ *b* # contains b x !~ *b* # doesnt contains b

You can also use * to match any character or number and ? to match any single character or number. No other regular expression quantifier is supported by Excel’s filters. Excel’s regular expression characters can be escaped using ~.

The placeholder variable x in the above examples can be replaced by any simple string. The actual placeholder name is ignored internally so the following are all equivalent:

x < 2000 col < 2000 Price < 2000

Also, note that a filter condition can only be applied to a column in a range specified by the autofilter() Worksheet method.

See the autofilter.pl program in the examples directory of the distro for a more detailed example.

PAGE SET-UP METHODS

Page set-up methods affect the way that a worksheet looks when it is printed. They control features such as page headers and footers and margins. These methods are really just standard worksheet methods. They are documented here in a separate section for the sake of clarity.

The following methods are available for page set-up:

set_landscape() set_portrait() set_page_view() set_paper() center_horizontally() center_vertically() set_margins() set_header() set_footer() repeat_rows() repeat_columns() hide_gridlines() print_row_col_headers() print_area() print_across() fit_to_pages() set_start_page() set_print_scale() set_h_pagebreaks() set_v_pagebreaks()

A common requirement when working with Spreadsheet::WriteExcel is to apply the same page set-up features to all of the worksheets in a workbook. To do this you can use the sheets() method of the workbook class to access the array of worksheets in a workbook:

foreach $worksheet ($workbook->sheets()) { $worksheet->set_landscape(); }

set_landscape()

This method is used to set the orientation of a worksheet’s printed page to landscape:

$worksheet->set_landscape(); # Landscape mode

set_portrait()

This method is used to set the orientation of a worksheet’s printed page to portrait. The default worksheet orientation is portrait, so you won’t generally need to call this method.

$worksheet->set_portrait(); # Portrait mode

set_page_view()

This method is used to display the worksheet in Page View mode. This is currently only supported by Mac Excel, where it is the default.

$worksheet->set_page_view();

set_paper($index)

This method is used to set the paper format for the printed output of a worksheet. The following paper styles are available:

Index Paper format Paper size ===== ============ ========== 0 Printer default - 1 Letter 8 1/2 x 11 in 2 Letter Small 8 1/2 x 11 in 3 Tabloid 11 x 17 in 4 Ledger 17 x 11 in 5 Legal 8 1/2 x 14 in 6 Statement 5 1/2 x 8 1/2 in 7 Executive 7 1/4 x 10 1/2 in 8 A3 297 x 420 mm 9 A4 210 x 297 mm 10 A4 Small 210 x 297 mm 11 A5 148 x 210 mm 12 B4 250 x 354 mm 13 B5 182 x 257 mm 14 Folio 8 1/2 x 13 in 15 Quarto 215 x 275 mm 16 - 10x14 in 17 - 11x17 in 18 Note 8 1/2 x 11 in 19 Envelope 9 3 7/8 x 8 7/8 20 Envelope 10 4 1/8 x 9 1/2 21 Envelope 11 4 1/2 x 10 3/8 22 Envelope 12 4 3/4 x 11 23 Envelope 14 5 x 11 1/2 24 C size sheet - 25 D size sheet - 26 E size sheet - 27 Envelope DL 110 x 220 mm 28 Envelope C3 324 x 458 mm 29 Envelope C4 229 x 324 mm 30 Envelope C5 162 x 229 mm 31 Envelope C6 114 x 162 mm 32 Envelope C65 114 x 229 mm 33 Envelope B4 250 x 353 mm 34 Envelope B5 176 x 250 mm 35 Envelope B6 176 x 125 mm 36 Envelope 110 x 230 mm 37 Monarch 3.875 x 7.5 in 38 Envelope 3 5/8 x 6 1/2 in 39 Fanfold 14 7/8 x 11 in 40 German Std Fanfold 8 1/2 x 12 in 41 German Legal Fanfold 8 1/2 x 13 in

Note, it is likely that not all of these paper types will be available to the end user since it will depend on the paper formats that the user’s printer supports. Therefore, it is best to stick to standard paper types.

$worksheet->set_paper(1); # US Letter $worksheet->set_paper(9); # A4

If you do not specify a paper type the worksheet will print using the printer’s default paper.

center_horizontally()

Center the worksheet data horizontally between the margins on the printed page:

$worksheet->center_horizontally();

center_vertically()

Center the worksheet data vertically between the margins on the printed page:

$worksheet->center_vertically();

set_margins($inches)

There are several methods available for setting the worksheet margins on the printed page:

set_margins() # Set all margins to the same value set_margins_LR() # Set left and right margins to the same value set_margins_TB() # Set top and bottom margins to the same value set_margin_left(); # Set left margin set_margin_right(); # Set right margin set_margin_top(); # Set top margin set_margin_bottom(); # Set bottom margin

All of these methods take a distance in inches as a parameter. Note: 1 inch = 25.4mm. ;-) The default left and right margin is 0.75 inch. The default top and bottom margin is 1.00 inch.

set_header($string, $margin)

Headers and footers are generated using a $string which is a combination of plain text and control characters. The $margin parameter is optional.

The available control character are:

Control Category Description ======= ======== =========== &L Justification Left &C Center &R Right &P Information Page number &N Total number of pages &D Date &T Time &F File name &A Worksheet name &Z Workbook path &fontsize Font Font size &“font,style” Font name and style &U Single underline &E Double underline &S Strikethrough &X Superscript &Y Subscript && Miscellaneous Literal ampersand &

Text in headers and footers can be justified (aligned) to the left, center and right by prefixing the text with the control characters &L, &C and &R.

For example (with ASCII art representation of the results):

$worksheet->set_header(&LHello); ————————————————————— | | | Hello | | | $worksheet->set_header(&CHello); ————————————————————— | | | Hello | | | $worksheet->set_header(&RHello); ————————————————————— | | | Hello | | |

For simple text, if you do not specify any justification the text will be centred. However, you must prefix the text with &C if you specify a font name or any other formatting:

$worksheet->set_header(Hello); ————————————————————— | | | Hello | | |

You can have text in each of the justification regions:

$worksheet->set_header(&LCiao&CBello&RCielo); ————————————————————— | | | Ciao Bello Cielo | | |

The information control characters act as variables that Excel will update as the workbook or worksheet changes. Times and dates are in the users default format:

$worksheet->set_header(&CPage &P of &N); ————————————————————— | | | Page 1 of 6 | | | $worksheet->set_header(&CUpdated at &T); ————————————————————— | | | Updated at 12:30 PM | | |

You can specify the font size of a section of the text by prefixing it with the control character &n where n is the font size:

$worksheet1->set_header(&C&30Hello Big ); $worksheet2->set_header(&C&10Hello Small);

You can specify the font of a section of the text by prefixing it with the control sequence &"font,style" where fontname is a font name such as Courier New or Times New Roman and style is one of the standard Windows font descriptions: Regular, Italic, Bold or Bold Italic:

$worksheet1->set_header(&C&“Courier New,Italic"Hello); $worksheet2->set_header(&C&“Courier New,Bold Italic"Hello); $worksheet3->set_header(&C&“Times New Roman,Regular"Hello);

It is possible to combine all of these features together to create sophisticated headers and footers. As an aid to setting up complicated headers and footers you can record a page set-up as a macro in Excel and look at the format strings that VBA produces. Remember however that VBA uses two double quotes "" to indicate a single double quote. For the last example above the equivalent VBA code looks like this:

.LeftHeader = "” .CenterHeader = “&““Times New Roman,Regular"“Hello” .RightHeader = "”

To include a single literal ampersand & in a header or footer you should use a double ampersand &&:

$worksheet1->set_header(&CCuriouser && Curiouser - Attorneys at Law);

As stated above the margin parameter is optional. As with the other margins the value should be in inches. The default header and footer margin is 0.50 inch. The header and footer margin size can be set as follows:

$worksheet->set_header(&CHello, 0.75);

The header and footer margins are independent of the top and bottom margins.

Note, the header or footer string must be less than 255 characters. Strings longer than this will not be written and a warning will be generated.

On systems with perl 5.8 and later the set_header() method can also handle Unicode strings in UTF-8 format.

$worksheet->set_header("&C\x{263a}”)

See, also the headers.pl program in the examples directory of the distribution.

The syntax of the set_footer() method is the same as set_header(), see above.

repeat_rows($first_row, $last_row)

Set the number of rows to repeat at the top of each printed page.

For large Excel documents it is often desirable to have the first row or rows of the worksheet print out at the top of each page. This can be achieved by using the repeat_rows() method. The parameters $first_row and $last_row are zero based. The $last_row parameter is optional if you only wish to specify one row:

$worksheet1->repeat_rows(0); # Repeat the first row $worksheet2->repeat_rows(0, 1); # Repeat the first two rows

repeat_columns($first_col, $last_col)

Set the columns to repeat at the left hand side of each printed page.

For large Excel documents it is often desirable to have the first column or columns of the worksheet print out at the left hand side of each page. This can be achieved by using the repeat_columns() method. The parameters $first_column and $last_column are zero based. The $last_column parameter is optional if you only wish to specify one column. You can also specify the columns using A1 column notation, see the note about Cell notation.

$worksheet1->repeat_columns(0); # Repeat the first column $worksheet2->repeat_columns(0, 1); # Repeat the first two columns $worksheet3->repeat_columns(A:A); # Repeat the first column $worksheet4->repeat_columns(A:B); # Repeat the first two columns

hide_gridlines($option)

This method is used to hide the gridlines on the screen and printed page. Gridlines are the lines that divide the cells on a worksheet. Screen and printed gridlines are turned on by default in an Excel worksheet. If you have defined your own cell borders you may wish to hide the default gridlines.

$worksheet->hide_gridlines();

The following values of $option are valid:

0 : Dont hide gridlines 1 : Hide printed gridlines only 2 : Hide screen and printed gridlines

If you don’t supply an argument or use undef the default option is 1, i.e. only the printed gridlines are hidden.

Set the option to print the row and column headers on the printed page.

An Excel worksheet looks something like the following;

—————————————— | | A | B | C | D | … —————————————— | 1 | | | | | … | 2 | | | | | … | 3 | | | | | … | 4 | | | | | … |…| … | … | … | … | …

The headers are the letters and numbers at the top and the left of the worksheet. Since these headers serve mainly as a indication of position on the worksheet they generally do not appear on the printed page. If you wish to have them printed you can use the print_row_col_headers() method :

$worksheet->print_row_col_headers();

Do not confuse these headers with page headers as described in the set_header() section above.

This method is used to specify the area of the worksheet that will be printed. All four parameters must be specified. You can also use A1 notation, see the note about Cell notation.

$worksheet1->print_area(A1:H20); # Cells A1 to H20 $worksheet2->print_area(0, 0, 19, 7); # The same $worksheet2->print_area(A:H); # Columns A to H if rows have data

The print_across method is used to change the default print direction. This is referred to by Excel as the sheet page order.

$worksheet->print_across();

The default page order is shown below for a worksheet that extends over 4 pages. The order is called down then across:

[1] [3] [2] [4]

However, by using the print_across method the print order will be changed to across then down:

[1] [2] [3] [4]

fit_to_pages($width, $height)

The fit_to_pages() method is used to fit the printed area to a specific number of pages both vertically and horizontally. If the printed area exceeds the specified number of pages it will be scaled down to fit. This guarantees that the printed area will always appear on the specified number of pages even if the page size or margins change.

$worksheet1->fit_to_pages(1, 1); # Fit to 1x1 pages $worksheet2->fit_to_pages(2, 1); # Fit to 2x1 pages $worksheet3->fit_to_pages(1, 2); # Fit to 1x2 pages

The print area can be defined using the print_area() method as described above.

A common requirement is to fit the printed output to n pages wide but have the height be as long as necessary. To achieve this set the $height to zero or leave it blank:

$worksheet1->fit_to_pages(1, 0); # 1 page wide and as long as necessary $worksheet2->fit_to_pages(1); # The same

Note that although it is valid to use both fit_to_pages() and set_print_scale() on the same worksheet only one of these options can be active at a time. The last method call made will set the active option.

Note that fit_to_pages() will override any manual page breaks that are defined in the worksheet.

set_start_page($start_page)

The set_start_page() method is used to set the number of the starting page when the worksheet is printed out. The default value is 1.

$worksheet->set_start_page(2);

set_print_scale($scale)

Set the scale factor of the printed page. Scale factors in the range 10 <= $scale <= 400 are valid:

$worksheet1->set_print_scale(50); $worksheet2->set_print_scale(75); $worksheet3->set_print_scale(300); $worksheet4->set_print_scale(400);

The default scale factor is 100. Note, set_print_scale() does not affect the scale of the visible page in Excel. For that you should use set_zoom().

Note also that although it is valid to use both fit_to_pages() and set_print_scale() on the same worksheet only one of these options can be active at a time. The last method call made will set the active option.

set_h_pagebreaks(@breaks)

Add horizontal page breaks to a worksheet. A page break causes all the data that follows it to be printed on the next page. Horizontal page breaks act between rows. To create a page break between rows 20 and 21 you must specify the break at row 21. However in zero index notation this is actually row 20. So you can pretend for a small while that you are using 1 index notation:

$worksheet1->set_h_pagebreaks(20); # Break between row 20 and 21

The set_h_pagebreaks() method will accept a list of page breaks and you can call it more than once:

$worksheet2->set_h_pagebreaks( 20, 40, 60, 80, 100); # Add breaks $worksheet2->set_h_pagebreaks(120, 140, 160, 180, 200); # Add some more

Note: If you specify the fit to page option via the fit_to_pages() method it will override all manual page breaks.

There is a silent limitation of about 1000 horizontal page breaks per worksheet in line with an Excel internal limitation.

set_v_pagebreaks(@breaks)

Add vertical page breaks to a worksheet. A page break causes all the data that follows it to be printed on the next page. Vertical page breaks act between columns. To create a page break between columns 20 and 21 you must specify the break at column 21. However in zero index notation this is actually column 20. So you can pretend for a small while that you are using 1 index notation:

$worksheet1->set_v_pagebreaks(20); # Break between column 20 and 21

The set_v_pagebreaks() method will accept a list of page breaks and you can call it more than once:

$worksheet2->set_v_pagebreaks( 20, 40, 60, 80, 100); # Add breaks $worksheet2->set_v_pagebreaks(120, 140, 160, 180, 200); # Add some more

Note: If you specify the fit to page option via the fit_to_pages() method it will override all manual page breaks.

CELL FORMATTING

This section describes the methods and properties that are available for formatting cells in Excel. The properties of a cell that can be formatted include: fonts, colours, patterns, borders, alignment and number formatting.

Creating and using a Format object

Cell formatting is defined through a Format object. Format objects are created by calling the workbook add_format() method as follows:

my $format1 = $workbook->add_format(); # Set properties later my $format2 = $workbook->add_format(%props); # Set at creation

The format object holds all the formatting properties that can be applied to a cell, a row or a column. The process of setting these properties is discussed in the next section.

Once a Format object has been constructed and its properties have been set it can be passed as an argument to the worksheet write methods as follows:

$worksheet->write(0, 0, One, $format); $worksheet->write_string(1, 0, Two, $format); $worksheet->write_number(2, 0, 3, $format); $worksheet->write_blank(3, 0, $format);

Formats can also be passed to the worksheet set_row() and set_column() methods to define the default property for a row or column.

$worksheet->set_row(0, 15, $format); $worksheet->set_column(0, 0, 15, $format);

Format methods and Format properties

The following table shows the Excel format categories, the formatting properties that can be applied and the equivalent object method:

Category Description Property Method Name ——– ———– ——– ———– Font Font type font set_font() Font size size set_size() Font color color set_color() Bold bold set_bold() Italic italic set_italic() Underline underline set_underline() Strikeout font_strikeout set_font_strikeout() Super/Subscript font_script set_font_script() Outline font_outline set_font_outline() Shadow font_shadow set_font_shadow() Number Numeric format num_format set_num_format() Protection Lock cells locked set_locked() Hide formulas hidden set_hidden() Alignment Horizontal align align set_align() Vertical align valign set_align() Rotation rotation set_rotation() Text wrap text_wrap set_text_wrap() Justify last text_justlast set_text_justlast() Center across center_across set_center_across() Indentation indent set_indent() Shrink to fit shrink set_shrink() Pattern Cell pattern pattern set_pattern() Background color bg_color set_bg_color() Foreground color fg_color set_fg_color() Border Cell border border set_border() Bottom border bottom set_bottom() Top border top set_top() Left border left set_left() Right border right set_right() Border color border_color set_border_color() Bottom color bottom_color set_bottom_color() Top color top_color set_top_color() Left color left_color set_left_color() Right color right_color set_right_color()

There are two ways of setting Format properties: by using the object method interface or by setting the property directly. For example, a typical use of the method interface would be as follows:

my $format = $workbook->add_format(); $format->set_bold(); $format->set_color(red);

By comparison the properties can be set directly by passing a hash of properties to the Format constructor:

my $format = $workbook->add_format(bold => 1, color => red);

or after the Format has been constructed by means of the set_format_properties() method as follows:

my $format = $workbook->add_format(); $format->set_format_properties(bold => 1, color => red);

You can also store the properties in one or more named hashes and pass them to the required method:

my %font = ( font => Arial, size => 12, color => blue, bold => 1, ); my %shading = ( bg_color => green, pattern => 1, ); my $format1 = $workbook->add_format(%font); # Font only my $format2 = $workbook->add_format(%font, %shading); # Font and shading

The provision of two ways of setting properties might lead you to wonder which is the best way. The method mechanism may be better is you prefer setting properties via method calls (which the author did when the code was first written) otherwise passing properties to the constructor has proved to be a little more flexible and self documenting in practice. An additional advantage of working with property hashes is that it allows you to share formatting between workbook objects as shown in the example above.

The Perl/Tk style of adding properties is also supported:

my %font = ( -font => Arial, -size => 12, -color => blue, -bold => 1, );

Working with formats

The default format is Arial 10 with all other properties off.

Each unique format in Spreadsheet::WriteExcel must have a corresponding Format object. It isn’t possible to use a Format with a write() method and then redefine the Format for use at a later stage. This is because a Format is applied to a cell not in its current state but in its final state. Consider the following example:

my $format = $workbook->add_format(); $format->set_bold(); $format->set_color(red); $worksheet->write(A1, Cell A1, $format); $format->set_color(green); $worksheet->write(B1, Cell B1, $format);

Cell A1 is assigned the Format $format which is initially set to the colour red. However, the colour is subsequently set to green. When Excel displays Cell A1 it will display the final state of the Format which in this case will be the colour green.

In general a method call without an argument will turn a property on, for example:

my $format1 = $workbook->add_format(); $format1->set_bold(); # Turns bold on $format1->set_bold(1); # Also turns bold on $format1->set_bold(0); # Turns bold off

FORMAT METHODS

The Format object methods are described in more detail in the following sections. In addition, there is a Perl program called formats.pl in the examples directory of the WriteExcel distribution. This program creates an Excel workbook called formats.xls which contains examples of almost all the format types.

The following Format methods are available:

set_font() set_size() set_color() set_bold() set_italic() set_underline() set_font_strikeout() set_font_script() set_font_outline() set_font_shadow() set_num_format() set_locked() set_hidden() set_align() set_rotation() set_text_wrap() set_text_justlast() set_center_across() set_indent() set_shrink() set_pattern() set_bg_color() set_fg_color() set_border() set_bottom() set_top() set_left() set_right() set_border_color() set_bottom_color() set_top_color() set_left_color() set_right_color()

The above methods can also be applied directly as properties. For example $format->set_bold() is equivalent to $workbook->add_format(bold => 1).

set_format_properties(%properties)

The properties of an existing Format object can be also be set by means of set_format_properties():

my $format = $workbook->add_format(); $format->set_format_properties(bold => 1, color => red);

However, this method is here mainly for legacy reasons. It is preferable to set the properties in the format constructor:

my $format = $workbook->add_format(bold => 1, color => red);

set_font($fontname)

Default state: Font is Arial Default action: None Valid args: Any valid font name

Specify the font used:

$format->set_font(Times New Roman);

Excel can only display fonts that are installed on the system that it is running on. Therefore it is best to use the fonts that come as standard such as ‘Arial’, ‘Times New Roman’ and ‘Courier New’. See also the Fonts worksheet created by formats.pl

set_size()

Default state: Font size is 10 Default action: Set font size to 1 Valid args: Integer values from 1 to as big as your screen.

Set the font size. Excel adjusts the height of a row to accommodate the largest font size in the row. You can also explicitly specify the height of a row using the set_row() worksheet method.

my $format = $workbook->add_format(); $format->set_size(30);

set_color()

Default state: Excels default color, usually black Default action: Set the default color Valid args: Integers from 8..63 or the following strings: black blue brown cyan gray green lime magenta navy orange pink purple red silver white yellow

Set the font colour. The set_color() method is used as follows:

my $format = $workbook->add_format(); $format->set_color(red); $worksheet->write(0, 0, wheelbarrow, $format);

Note: The set_color() method is used to set the colour of the font in a cell. To set the colour of a cell use the set_bg_color() and set_pattern() methods.

For additional examples see the ‘Named colors’ and ‘Standard colors’ worksheets created by formats.pl in the examples directory.

See also COLOURS IN EXCEL.

set_bold()

Default state: bold is off Default action: Turn bold on Valid args: 0, 1 [1]

Set the bold property of the font:

$format->set_bold(); # Turn bold on

[1] Actually, values in the range 100..1000 are also valid. 400 is normal, 700 is bold and 1000 is very bold indeed. It is probably best to set the value to 1 and use normal bold.

set_italic()

Default state: Italic is off Default action: Turn italic on Valid args: 0, 1

Set the italic property of the font:

$format->set_italic(); # Turn italic on

set_underline()

Default state: Underline is off Default action: Turn on single underline Valid args: 0 = No underline 1 = Single underline 2 = Double underline 33 = Single accounting underline 34 = Double accounting underline

Set the underline property of the font.

$format->set_underline(); # Single underline

set_font_strikeout()

Default state: Strikeout is off Default action: Turn strikeout on Valid args: 0, 1

Set the strikeout property of the font.

set_font_script()

Default state: Super/Subscript is off Default action: Turn Superscript on Valid args: 0 = Normal 1 = Superscript 2 = Subscript

Set the superscript/subscript property of the font. This format is currently not very useful.

set_font_outline()

Default state: Outline is off Default action: Turn outline on Valid args: 0, 1

Macintosh only.

set_font_shadow()

Default state: Shadow is off Default action: Turn shadow on Valid args: 0, 1

Macintosh only.

set_num_format()

Default state: General format Default action: Format index 1 Valid args: See the following table

This method is used to define the numerical format of a number in Excel. It controls whether a number is displayed as an integer, a floating point number, a date, a currency value or some other user defined format.

The numerical format of a cell can be specified by using a format string or an index to one of Excel’s built-in formats:

my $format1 = $workbook->add_format(); my $format2 = $workbook->add_format(); $format1->set_num_format(d mmm yyyy); # Format string $format2->set_num_format(0x0f); # Format index $worksheet->write(0, 0, 36892.521, $format1); # 1 Jan 2001 $worksheet->write(0, 0, 36892.521, $format2); # 1-Jan-01

Using format strings you can define very sophisticated formatting of numbers.

$format01->set_num_format(0.000); $worksheet->write(0, 0, 3.1415926, $format01); # 3.142 $format02->set_num_format(#,##0); $worksheet->write(1, 0, 1234.56, $format02); # 1,235 $format03->set_num_format(#,##0.00); $worksheet->write(2, 0, 1234.56, $format03); # 1,234.56 $format04->set_num_format($0.00); $worksheet->write(3, 0, 49.99, $format04); # $49.99 # Note you can use other currency symbols such as the pound or yen as well. # Other currencies may require the use of Unicode. $format07->set_num_format(mm/dd/yy); $worksheet->write(6, 0, 36892.521, $format07); # 01/01/01 $format08->set_num_format(mmm d yyyy); $worksheet->write(7, 0, 36892.521, $format08); # Jan 1 2001 $format09->set_num_format(d mmmm yyyy); $worksheet->write(8, 0, 36892.521, $format09); # 1 January 2001 $format10->set_num_format(dd/mm/yyyy hh:mm AM/PM); $worksheet->write(9, 0, 36892.521, $format10); # 01/01/2001 12:30 AM $format11->set_num_format(0 “dollar and” .00 “cents”); $worksheet->write(10, 0, 1.87, $format11); # 1 dollar and .87 cents # Conditional formatting $format12->set_num_format([Green]General;[Red]-General;General); $worksheet->write(11, 0, 123, $format12); # > 0 Green $worksheet->write(12, 0, -45, $format12); # < 0 Red $worksheet->write(13, 0, 0, $format12); # = 0 Default colour # Zip code $format13->set_num_format(00000); $worksheet->write(14, 0, 01209, $format13);

The number system used for dates is described in DATES AND TIME IN EXCEL.

The colour format should have one of the following values:

[Black] [Blue] [Cyan] [Green] [Magenta] [Red] [White] [Yellow]

Alternatively you can specify the colour based on a colour index as follows: [Color n], where n is a standard Excel colour index - 7. See the ‘Standard colors’ worksheet created by formats.pl.

For more information refer to the documentation on formatting in the docs directory of the Spreadsheet::WriteExcel distro, the Excel on-line help or <http://office.microsoft.com/en-gb/assistance/HP051995001033.aspx>.

You should ensure that the format string is valid in Excel prior to using it in WriteExcel.

Excel’s built-in formats are shown in the following table:

Index Index Format String 0 0x00 General 1 0x01 0 2 0x02 0.00 3 0x03 #,##0 4 0x04 #,##0.00 5 0x05 ($#,##0_);($#,##0) 6 0x06 ($#,##0_);[Red]($#,##0) 7 0x07 ($#,##0.00_);($#,##0.00) 8 0x08 ($#,##0.00_);[Red]($#,##0.00) 9 0x09 0% 10 0x0a 0.00% 11 0x0b 0.00E+00 12 0x0c # ?/? 13 0x0d # ??/?? 14 0x0e m/d/yy 15 0x0f d-mmm-yy 16 0x10 d-mmm 17 0x11 mmm-yy 18 0x12 h:mm AM/PM 19 0x13 h:mm:ss AM/PM 20 0x14 h:mm 21 0x15 h:mm:ss 22 0x16 m/d/yy h:mm .. …. ……….. 37 0x25 (#,##0_);(#,##0) 38 0x26 (#,##0_);[Red](#,##0) 39 0x27 (#,##0.00_);(#,##0.00) 40 0x28 (#,##0.00_);[Red](#,##0.00) 41 0x29 _(* #,##0_);_(* (#,##0);_(* “-”_);_(@_) 42 0x2a _($* #,##0_);_($* (#,##0);_($* “-”_);_(@_) 43 0x2b _(* #,##0.00_);_(* (#,##0.00);_(* “-”??_);_(@_) 44 0x2c _($* #,##0.00_);_($* (#,##0.00);_($* “-”??_);_(@_) 45 0x2d mm:ss 46 0x2e [h]:mm:ss 47 0x2f mm:ss.0 48 0x30 ##0.0E+0 49 0x31 @

For examples of these formatting codes see the ‘Numerical formats’ worksheet created by formats.pl. See also the number_formats1.html and the number_formats2.html documents in the docs directory of the distro.

Note 1. Numeric formats 23 to 36 are not documented by Microsoft and may differ in international versions.

Note 2. In Excel 5 the dollar sign appears as a dollar sign. In Excel 97-2000 it appears as the defined local currency symbol.

Note 3. The red negative numeric formats display slightly differently in Excel 5 and Excel 97-2000.

set_locked()

Default state: Cell locking is on Default action: Turn locking on Valid args: 0, 1

This property can be used to prevent modification of a cells contents. Following Excel’s convention, cell locking is turned on by default. However, it only has an effect if the worksheet has been protected, see the worksheet protect() method.

my $locked = $workbook->add_format(); $locked->set_locked(1); # A non-op my $unlocked = $workbook->add_format(); $locked->set_locked(0); # Enable worksheet protection $worksheet->protect(); # This cell cannot be edited. $worksheet->write(A1, =1+2, $locked); # This cell can be edited. $worksheet->write(A2, =1+2, $unlocked);

Note: This offers weak protection even with a password, see the note in relation to the protect() method.

set_hidden()

Default state: Formula hiding is off Default action: Turn hiding on Valid args: 0, 1

This property is used to hide a formula while still displaying its result. This is generally used to hide complex calculations from end users who are only interested in the result. It only has an effect if the worksheet has been protected, see the worksheet protect() method.

my $hidden = $workbook->add_format(); $hidden->set_hidden(); # Enable worksheet protection $worksheet->protect(); # The formula in this cell isnt visible $worksheet->write(A1, =1+2, $hidden);

Note: This offers weak protection even with a password, see the note in relation to the protect() method.

set_align()

Default state: Alignment is off Default action: Left alignment Valid args: left Horizontal center right fill justify center_across top Vertical vcenter bottom vjustify

This method is used to set the horizontal and vertical text alignment within a cell. Vertical and horizontal alignments can be combined. The method is used as follows:

my $format = $workbook->add_format(); $format->set_align(center); $format->set_align(vcenter); $worksheet->set_row(0, 30); $worksheet->write(0, 0, X, $format);

Text can be aligned across two or more adjacent cells using the center_across property. However, for genuine merged cells it is better to use the merge_range() worksheet method.

The vjustify (vertical justify) option can be used to provide automatic text wrapping in a cell. The height of the cell will be adjusted to accommodate the wrapped text. To specify where the text wraps use the set_text_wrap() method.

For further examples see the ‘Alignment’ worksheet created by formats.pl.

set_center_across()

Default state: Center across selection is off Default action: Turn center across on Valid args: 1

Text can be aligned across two or more adjacent cells using the set_center_across() method. This is an alias for the set_align(center_across) method call.

Only one cell should contain the text, the other cells should be blank:

my $format = $workbook->add_format(); $format->set_center_across(); $worksheet->write(1, 1, Center across selection, $format); $worksheet->write_blank(1, 2, $format);

See also the merge1.pl to merge6.pl programs in the examples directory and the merge_range() method.

set_text_wrap()

Default state: Text wrap is off Default action: Turn text wrap on Valid args: 0, 1

Here is an example using the text wrap property, the escape character is used to indicate the end of line:

my $format = $workbook->add_format(); $format->set_text_wrap(); $worksheet->write(0, 0, “Its a bum wrap”, $format);

Excel will adjust the height of the row to accommodate the wrapped text. A similar effect can be obtained without newlines using the set_align(vjustify) method. See the textwrap.pl program in the examples directory.

set_rotation()

Default state: Text rotation is off Default action: None Valid args: Integers in the range -90 to 90 and 270

Set the rotation of the text in a cell. The rotation can be any angle in the range -90 to 90 degrees.

my $format = $workbook->add_format(); $format->set_rotation(30); $worksheet->write(0, 0, This text is rotated, $format);

The angle 270 is also supported. This indicates text where the letters run from top to bottom.

set_indent()

Default state: Text indentation is off Default action: Indent text 1 level Valid args: Positive integers

This method can be used to indent text. The argument, which should be an integer, is taken as the level of indentation:

my $format = $workbook->add_format(); $format->set_indent(2); $worksheet->write(0, 0, This text is indented, $format);

Indentation is a horizontal alignment property. It will override any other horizontal properties but it can be used in conjunction with vertical properties.

set_shrink()

Default state: Text shrinking is off Default action: Turn “shrink to fit” on Valid args: 1

This method can be used to shrink text so that it fits in a cell.

my $format = $workbook->add_format(); $format->set_shrink(); $worksheet->write(0, 0, Honey, I shrunk the text!, $format);

set_text_justlast()

Default state: Justify last is off Default action: Turn justify last on Valid args: 0, 1

Only applies to Far Eastern versions of Excel.

set_pattern()

Default state: Pattern is off Default action: Solid fill is on Valid args: 0 .. 18

Set the background pattern of a cell.

Examples of the available patterns are shown in the ‘Patterns’ worksheet created by formats.pl. However, it is unlikely that you will ever need anything other than Pattern 1 which is a solid fill of the background color.

set_bg_color()

Default state: Color is off Default action: Solid fill. Valid args: See set_color()

The set_bg_color() method can be used to set the background colour of a pattern. Patterns are defined via the set_pattern() method. If a pattern hasn’t been defined then a solid fill pattern is used as the default.

Here is an example of how to set up a solid fill in a cell:

my $format = $workbook->add_format(); $format->set_pattern(); # This is optional when using a solid fill $format->set_bg_color(green); $worksheet->write(A1, Ray, $format);

For further examples see the ‘Patterns’ worksheet created by formats.pl.

set_fg_color()

Default state: Color is off Default action: Solid fill. Valid args: See set_color()

The set_fg_color() method can be used to set the foreground colour of a pattern.

For further examples see the ‘Patterns’ worksheet created by formats.pl.

set_border()

Also applies to: set_bottom() set_top() set_left() set_right() Default state: Border is off Default action: Set border type 1 Valid args: 0-13, See below.

A cell border is comprised of a border on the bottom, top, left and right. These can be set to the same value using set_border() or individually using the relevant method calls shown above.

The following shows the border styles sorted by Spreadsheet::WriteExcel index number:

Index Name Weight Style ===== ============= ====== =========== 0 None 0 1 Continuous 1 ———– 2 Continuous 2 ———– 3 Dash 1 - - - - - - 4 Dot 1 . . . . . . 5 Continuous 3 ———– 6 Double 3 =========== 7 Continuous 0 ———– 8 Dash 2 - - - - - - 9 Dash Dot 1 - . - . - . 10 Dash Dot 2 - . - . - . 11 Dash Dot Dot 1 - . . - . . 12 Dash Dot Dot 2 - . . - . . 13 SlantDash Dot 2 / - . / - .

The following shows the borders sorted by style:

Name Weight Style Index ============= ====== =========== ===== Continuous 0 ———– 7 Continuous 1 ———– 1 Continuous 2 ———– 2 Continuous 3 ———– 5 Dash 1 - - - - - - 3 Dash 2 - - - - - - 8 Dash Dot 1 - . - . - . 9 Dash Dot 2 - . - . - . 10 Dash Dot Dot 1 - . . - . . 11 Dash Dot Dot 2 - . . - . . 12 Dot 1 . . . . . . 4 Double 3 =========== 6 None 0 0 SlantDash Dot 2 / - . / - . 13

The following shows the borders in the order shown in the Excel Dialog.

Index Style Index Style ===== ===== ===== ===== 0 None 12 - . . - . . 7 ———– 13 / - . / - . 4 . . . . . . 10 - . - . - . 11 - . . - . . 8 - - - - - - 9 - . - . - . 2 ———– 3 - - - - - - 5 ———– 1 ———– 6 ===========

Examples of the available border styles are shown in the ‘Borders’ worksheet created by formats.pl.

set_border_color()

Also applies to: set_bottom_color() set_top_color() set_left_color() set_right_color() Default state: Color is off Default action: Undefined Valid args: See set_color()

Set the colour of the cell borders. A cell border is comprised of a border on the bottom, top, left and right. These can be set to the same colour using set_border_color() or individually using the relevant method calls shown above. Examples of the border styles and colours are shown in the ‘Borders’ worksheet created by formats.pl.

copy($format)

This method is used to copy all of the properties from one Format object to another:

my $lorry1 = $workbook->add_format(); $lorry1->set_bold(); $lorry1->set_italic(); $lorry1->set_color(red); # lorry1 is bold, italic and red my $lorry2 = $workbook->add_format(); $lorry2->copy($lorry1); $lorry2->set_color(yellow); # lorry2 is bold, italic and yellow

The copy() method is only useful if you are using the method interface to Format properties. It generally isn’t required if you are setting Format properties directly using hashes.

Note: this is not a copy constructor, both objects must exist prior to copying.

UNICODE IN EXCEL

The following is a brief introduction to handling Unicode in Spreadsheet::WriteExcel.

For a more general introduction to Unicode handling in Perl see perlunitut and perluniintro.

When using Spreadsheet::WriteExcel the best and easiest way to write unicode strings to an Excel file is to use UTF-8 encoded strings and perl 5.8 (or later). Spreadsheet::WriteExcel also allows you to write unicode strings using older perls but it generally requires more work, as explained below.

Internally, Excel encodes unicode data as UTF-16LE (where LE means little-endian). If you are using perl 5.8+ then Spreadsheet::WriteExcel will convert UTF-8 strings to UTF-16LE when required. No further intervention is required from the programmer, for example:

# perl 5.8+ example: my $smiley = “\x{263A}”; $worksheet->write(A1, Hello world); # ASCII $worksheet->write(A2, $smiley); # UTF-8

Spreadsheet::WriteExcel also lets you write unicode data as UTF-16. Since the majority of CPAN modules default to UTF-16BE (big-endian) Spreadsheet::WriteExcel also uses UTF-16BE and converts it internally to UTF-16LE:

# perl 5.005 example: my $smiley = pack n, 0x263A; $worksheet->write (A3, Hello world); # ASCII $worksheet->write_utf16be_string(A4, $smiley); # UTF-16

Although the above examples look similar there is an important difference. With uft8 and perl 5.8+ Spreadsheet::WriteExcel treats UTF-8 strings in exactly the same way as any other string. However, with UTF16 data we need to distinguish it from other strings either by calling a separate function or by passing an additional flag to indicate the data type.

If you are dealing with non-ASCII characters that aren’t in UTF-8 then perl 5.8+ provides useful tools in the guise of the Encode module to help you to convert to the required format. For example:

use Encode decode; my $string = some string with koi8-r characters; $string = decode(koi8-r, $string); # koi8-r to utf8

Alternatively you can read data from an encoded file and convert it to UTF-8 as you read it in:

my $file = unicode_koi8r.txt; open FH, <:encoding(koi8-r), $file or die “Couldnt open $file: $! “; my $row = 0; while (<FH>) { # Data read in is now in utf8 format. chomp; $worksheet->write($row++, 0, $_); }

These methodologies are explained in more detail in perlunitut, perluniintro and perlunicode.

See also the unicode_*.pl programs in the examples directory of the distro.

COLOURS IN EXCEL

Excel provides a colour palette of 56 colours. In Spreadsheet::WriteExcel these colours are accessed via their palette index in the range 8..63. This index is used to set the colour of fonts, cell patterns and cell borders. For example:

my $format = $workbook->add_format( color => 12, # index for blue font => Arial, size => 12, bold => 1, );

The most commonly used colours can also be accessed by name. The name acts as a simple alias for the colour index:

black => 8 blue => 12 brown => 16 cyan => 15 gray => 23 green => 17 lime => 11 magenta => 14 navy => 18 orange => 53 pink => 33 purple => 20 red => 10 silver => 22 white => 9 yellow => 13

For example:

my $font = $workbook->add_format(color => red);

Users of VBA in Excel should note that the equivalent colour indices are in the range 1..56 instead of 8..63.

If the default palette does not provide a required colour you can override one of the built-in values. This is achieved by using the set_custom_color() workbook method to adjust the RGB (red green blue) components of the colour:

my $ferrari = $workbook->set_custom_color(40, 216, 12, 12); my $format = $workbook->add_format( bg_color => $ferrari, pattern => 1, border => 1 ); $worksheet->write_blank(A1, $format);

The default Excel colour palette is shown in palette.html in the docs directory of the distro. You can generate an Excel version of the palette using colors.pl in the examples directory.

DATES AND TIME IN EXCEL

There are two important things to understand about dates and times in Excel:

1 A date/time in Excel is a real number plus an Excel number format.

2 Spreadsheet::WriteExcel doesn’t automatically convert date/time strings in “write()” to an Excel date/time.

These two points are explained in more detail below along with some suggestions on how to convert times and dates to the required format.

An Excel date/time is a number plus a format

If you write a date string with write() then all you will get is a string:

$worksheet->write(A1, 02/03/04); # !! Writes a string not a date. !!

Dates and times in Excel are represented by real numbers, for example Jan 1 2001 12:30 AM is represented by the number 36892.521.

The integer part of the number stores the number of days since the epoch and the fractional part stores the percentage of the day.

A date or time in Excel is just like any other number. To have the number display as a date you must apply an Excel number format to it. Here are some examples.

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(date_examples.xls); my $worksheet = $workbook->add_worksheet(); $worksheet->set_column(A:A, 30); # For extra visibility. my $number = 39506.5; $worksheet->write(A1, $number); # 39506.5 my $format2 = $workbook->add_format(num_format => dd/mm/yy); $worksheet->write(A2, $number , $format2); # 28/02/08 my $format3 = $workbook->add_format(num_format => mm/dd/yy); $worksheet->write(A3, $number , $format3); # 02/28/08 my $format4 = $workbook->add_format(num_format => d-m-yyyy); $worksheet->write(A4, $number , $format4); # 28-2-2008 my $format5 = $workbook->add_format(num_format => dd/mm/yy hh:mm); $worksheet->write(A5, $number , $format5); # 28/02/08 12:00 my $format6 = $workbook->add_format(num_format => d mmm yyyy); $worksheet->write(A6, $number , $format6); # 28 Feb 2008 my $format7 = $workbook->add_format(num_format => mmm d yyyy hh:mm AM/PM); $worksheet->write(A7, $number , $format7); # Feb 28 2008 12:00 PM

Spreadsheet::WriteExcel doesn’t automatically convert date/time strings

Spreadsheet::WriteExcel doesn’t automatically convert input date strings into Excel’s formatted date numbers due to the large number of possible date formats and also due to the possibility of misinterpretation.

For example, does 02/03/04 mean March 2 2004, February 3 2004 or even March 4 2002.

Therefore, in order to handle dates you will have to convert them to numbers and apply an Excel format. Some methods for converting dates are listed in the next section.

The most direct way is to convert your dates to the ISO8601 yyyy-mm-ddThh:mm:ss.sss date format and use the write_date_time() worksheet method:

$worksheet->write_date_time(A2, 2001-01-01T12:20, $format);

See the write_date_time() section of the documentation for more details.

A general methodology for handling date strings with write_date_time() is:

1. Identify incoming date/time strings with a regex. 2. Extract the component parts of the date/time using the same regex. 3. Convert the date/time to the ISO8601 format. 4. Write the date/time using write_date_time() and a number format.

Here is an example:

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new(example.xls); my $worksheet = $workbook->add_worksheet(); # Set the default format for dates. my $date_format = $workbook->add_format(num_format => mmm d yyyy); # Increase column width to improve visibility of data. $worksheet->set_column(A:C, 20); # Simulate reading from a data source. my $row = 0; while (<DATA>) { chomp; my $col = 0; my @data = split ; for my $item (@data) { # Match dates in the following formats: d/m/yy, d/m/yyyy if ($item =~ qr[^(\d{1,2})/(\d{1,2})/(\d{4})$]) { # Change to the date format required by write_date_time(). my $date = sprintf “%4d-%02d-%02dT”, $3, $2, $1; $worksheet->write_date_time($row, $col++, $date, $date_format); } else { # Just plain data $worksheet->write($row, $col++, $item); } } $row++; } _ _DATA_ _ Item Cost Date Book 10 1/9/2007 Beer 4 12/9/2007 Bed 500 5/10/2007

For a slightly more advanced solution you can modify the write() method to handle date formats of your choice via the add_write_handler() method. See the add_write_handler() section of the docs and the write_handler3.pl and write_handler4.pl programs in the examples directory of the distro.

Converting dates and times to an Excel date or time

The write_date_time() method above is just one way of handling dates and times.

The Spreadsheet::WriteExcel::Utility module which is included in the distro has date/time handling functions:

use Spreadsheet::WriteExcel::Utility; $date = xl_date_list(2002, 1, 1); # 37257 $date = xl_parse_date(“11 July 1997”); # 35622 $time = xl_parse_time(3:21:36 PM); # 0.64 $date = xl_decode_date_EU(“13 May 2002”); # 37389

Note: some of these functions require additional CPAN modules.

For date conversions using the CPAN DateTime framework see DateTime::Format::Excel <http://search.cpan.org/search?dist=DateTime-Format-Excel>.

OUTLINES AND GROUPING IN EXCEL

Excel allows you to group rows or columns so that they can be hidden or displayed with a single mouse click. This feature is referred to as outlines.

Outlines can reduce complex data down to a few salient sub-totals or summaries.

This feature is best viewed in Excel but the following is an ASCII representation of what a worksheet with three outlines might look like. Rows 3-4 and rows 7-8 are grouped at level 2. Rows 2-9 are grouped at level 1. The lines at the left hand side are called outline level bars.

—————————————— 1 2 3 | | A | B | C | D | … —————————————— _ | 1 | A | | | | … | _ | 2 | B | | | | … | | | 3 | (C) | | | | … | | | 4 | (D) | | | | … | - | 5 | E | | | | … | _ | 6 | F | | | | … | | | 7 | (G) | | | | … | | | 8 | (H) | | | | … | - | 9 | I | | | | … - | . | … | … | … | … | …

Clicking the minus sign on each of the level 2 outlines will collapse and hide the data as shown in the next figure. The minus sign changes to a plus sign to indicate that the data in the outline is hidden.

—————————————— 1 2 3 | | A | B | C | D | … —————————————— _ | 1 | A | | | | … | | 2 | B | | | | … | + | 5 | E | | | | … | | 6 | F | | | | … | + | 9 | I | | | | … - | . | … | … | … | … | …

Clicking on the minus sign on the level 1 outline will collapse the remaining rows as follows:

—————————————— 1 2 3 | | A | B | C | D | … —————————————— | 1 | A | | | | … + | . | … | … | … | … | …

Grouping in Spreadsheet::WriteExcel is achieved by setting the outline level via the set_row() and set_column() worksheet methods:

set_row($row, $height, $format, $hidden, $level, $collapsed) set_column($first_col, $last_col, $width, $format, $hidden, $level, $collapsed)

The following example sets an outline level of 1 for rows 1 and 2 (zero-indexed) and columns B to G. The parameters $height and $XF are assigned default values since they are undefined:

$worksheet->set_row(1, undef, undef, 0, 1); $worksheet->set_row(2, undef, undef, 0, 1); $worksheet->set_column(B:G, undef, undef, 0, 1);

Excel allows up to 7 outline levels. Therefore the $level parameter should be in the range 0 <= $level <= 7.

Rows and columns can be collapsed by setting the $hidden flag for the hidden rows/columns and setting the $collapsed flag for the row/column that has the collapsed + symbol:

$worksheet->set_row(1, undef, undef, 1, 1); $worksheet->set_row(2, undef, undef, 1, 1); $worksheet->set_row(3, undef, undef, 0, 0, 1); # Collapsed flag. $worksheet->set_column(B:G, undef, undef, 1, 1); $worksheet->set_column(H:H, undef, undef, 0, 0, 1); # Collapsed flag.

Note: Setting the $collapsed flag is particularly important for compatibility with OpenOffice.org and Gnumeric.

For a more complete example see the outline.pl and outline_collapsed.pl programs in the examples directory of the distro.

Some additional outline properties can be set via the outline_settings() worksheet method, see above.

DATA VALIDATION IN EXCEL

Data validation is a feature of Excel which allows you to restrict the data that a users enters in a cell and to display help and warning messages. It also allows you to restrict input to values in a drop down list.

A typical use case might be to restrict data in a cell to integer values in a certain range, to provide a help message to indicate the required value and to issue a warning if the input data doesn’t meet the stated criteria. In Spreadsheet::WriteExcel we could do that as follows:

$worksheet->data_validation(B3, { validate => integer, criteria => between, minimum => 1, maximum => 100, input_title => Input an integer:, input_message => Between 1 and 100, error_message => Sorry, try again., });

The above example would look like this in Excel: <http://homepage.eircom.net/~jmcnamara/perl/data_validation.jpg>.

For more information on data validation see the following Microsoft support article Description and examples of data validation in Excel: <http://support.microsoft.com/kb/211485>.

The following sections describe how to use the data_validation() method and its various options.

data_validation($row, $col, { parameter => ‘value’, … })

The data_validation() method is used to construct an Excel data validation.

It can be applied to a single cell or a range of cells. You can pass 3 parameters such as ($row, $col, {...}) or 5 parameters such as ($first_row, $first_col, $last_row, $last_col, {...}). You can also use A1 style notation. For example:

$worksheet->data_validation(0, 0, {…}); $worksheet->data_validation(0, 0, 4, 1, {…}); # Which are the same as: $worksheet->data_validation(A1, {…}); $worksheet->data_validation(A1:B5, {…});

See also the note about Cell notation for more information.

The last parameter in data_validation() must be a hash ref containing the parameters that describe the type and style of the data validation. The allowable parameters are:

validate criteria value | minimum | source maximum ignore_blank dropdown input_title input_message show_input error_title error_message error_type show_error

These parameters are explained in the following sections. Most of the parameters are optional, however, you will generally require the three main options validate, criteria and value.

$worksheet->data_validation(B3, { validate => integer, criteria => >, value => 100, });

The data_validation method returns:

0 for success. -1 for insufficient number of arguments. -2 for row or column out of bounds. -3 for incorrect parameter or value.

validate

This parameter is passed in a hash ref to data_validation().

The validate parameter is used to set the type of data that you wish to validate. It is always required and it has no default value. Allowable values are:

any integer decimal list date time length custom

  • any is used to specify that the type of data is unrestricted. This is the same as not applying a data validation. It is only provided for completeness and isn’t used very often in the context of Spreadsheet::WriteExcel.

  • integer restricts the cell to integer values. Excel refers to this as ‘whole number’. validate => integer, criteria => >, value => 100,

  • decimal restricts the cell to decimal values. validate => decimal, criteria => >, value => 38.6,

  • list restricts the cell to a set of user specified values. These can be passed in an array ref or as a cell range (named ranges aren’t currently supported): validate => list, value => [open, high, close], # Or like this: value => B1:B3, Excel requires that range references are only to cells on the same worksheet.

  • date restricts the cell to date values. Dates in Excel are expressed as integer values but you can also pass an ISO860 style string as used in write_date_time(). See also DATES AND TIME IN EXCEL for more information about working with Excel’s dates. validate => date, criteria => >, value => 39653, # 24 July 2008 # Or like this: value => 2008-07-24T,

  • time restricts the cell to time values. Times in Excel are expressed as decimal values but you can also pass an ISO860 style string as used in write_date_time(). See also DATES AND TIME IN EXCEL for more information about working with Excel’s times. validate => time, criteria => >, value => 0.5, # Noon # Or like this: value => T12:00:00,

  • length restricts the cell data based on an integer string length. Excel refers to this as ‘Text length’. validate => length, criteria => >, value => 10,

  • custom restricts the cell based on an external Excel formula that returns a TRUE/FALSE value. validate => custom, value => =IF(A10>B10,TRUE,FALSE),

criteria

This parameter is passed in a hash ref to data_validation().

The criteria parameter is used to set the criteria by which the data in the cell is validated. It is almost always required except for the list and custom validate options. It has no default value. Allowable values are:

between not between equal to | == | = not equal to | != | <> greater than | > less than | < greater than or equal to | >= less than or equal to | <=

You can either use Excel’s textual description strings, in the first column above, or the more common operator alternatives. The following are equivalent:

validate => integer, criteria => greater than, value => 100, validate => integer, criteria => >, value => 100,

The list and custom validate options don’t require a criteria. If you specify one it will be ignored.

validate => list, value => [open, high, close], validate => custom, value => =IF(A10>B10,TRUE,FALSE),

value | minimum | source

This parameter is passed in a hash ref to data_validation().

The value parameter is used to set the limiting value to which the criteria is applied. It is always required and it has no default value. You can also use the synonyms minimum or source to make the validation a little clearer and closer to Excel’s description of the parameter:

# Use value validate => integer, criteria => >, value => 100, # Use minimum validate => integer, criteria => between, minimum => 1, maximum => 100, # Use source validate => list, source => $B$1:$B$3,

maximum

This parameter is passed in a hash ref to data_validation().

The maximum parameter is used to set the upper limiting value when the criteria is either between or not between:

validate => integer, criteria => between, minimum => 1, maximum => 100,

ignore_blank

This parameter is passed in a hash ref to data_validation().

The ignore_blank parameter is used to toggle on and off the ‘Ignore blank’ option in the Excel data validation dialog. When the option is on the data validation is not applied to blank data in the cell. It is on by default.

ignore_blank => 0, # Turn the option off

This parameter is passed in a hash ref to data_validation().

The dropdown parameter is used to toggle on and off the ‘In-cell dropdown’ option in the Excel data validation dialog. When the option is on a dropdown list will be shown for list validations. It is on by default.

dropdown => 0, # Turn the option off

input_title

This parameter is passed in a hash ref to data_validation().

The input_title parameter is used to set the title of the input message that is displayed when a cell is entered. It has no default value and is only displayed if the input message is displayed. See the input_message parameter below.

input_title => This is the input title,

The maximum title length is 32 characters. UTF8 strings are handled automatically in perl 5.8 and later.

input_message

This parameter is passed in a hash ref to data_validation().

The input_message parameter is used to set the input message that is displayed when a cell is entered. It has no default value.

validate => integer, criteria => between, minimum => 1, maximum => 100, input_title => Enter the applied discount:, input_message => between 1 and 100,

The message can be split over several lines using newlines, " " in double quoted strings.

input_message => “This is a test.”,

The maximum message length is 255 characters. UTF8 strings are handled automatically in perl 5.8 and later.

show_input

This parameter is passed in a hash ref to data_validation().

The show_input parameter is used to toggle on and off the ‘Show input message when cell is selected’ option in the Excel data validation dialog. When the option is off an input message is not displayed even if it has been set using input_message. It is on by default.

show_input => 0, # Turn the option off

error_title

This parameter is passed in a hash ref to data_validation().

The error_title parameter is used to set the title of the error message that is displayed when the data validation criteria is not met. The default error title is ‘Microsoft Excel’.

error_title => Input value is not valid,

The maximum title length is 32 characters. UTF8 strings are handled automatically in perl 5.8 and later.

error_message

This parameter is passed in a hash ref to data_validation().

The error_message parameter is used to set the error message that is displayed when a cell is entered. The default error message is The value you entered is not valid. A user has restricted values that can be entered into the cell..

validate => integer, criteria => between, minimum => 1, maximum => 100, error_title => Input value is not valid, error_message => It should be an integer between 1 and 100,

The message can be split over several lines using newlines, " " in double quoted strings.

input_message => “This is a test.”,

The maximum message length is 255 characters. UTF8 strings are handled automatically in perl 5.8 and later.

error_type

This parameter is passed in a hash ref to data_validation().

The error_type parameter is used to specify the type of error dialog that is displayed. There are 3 options:

stop warning information

The default is stop.

show_error

This parameter is passed in a hash ref to data_validation().

The show_error parameter is used to toggle on and off the ‘Show error alert after invalid data is entered’ option in the Excel data validation dialog. When the option is off an error message is not displayed even if it has been set using error_message. It is on by default.

show_error => 0, # Turn the option off

Data Validation Examples

Example 1. Limiting input to an integer greater than a fixed value.

$worksheet->data_validation(A1, { validate => integer, criteria => >, value => 0, });

Example 2. Limiting input to an integer greater than a fixed value where the value is referenced from a cell.

$worksheet->data_validation(A2, { validate => integer, criteria => >, value => =E3, });

Example 3. Limiting input to a decimal in a fixed range.

$worksheet->data_validation(A3, { validate => decimal, criteria => between, minimum => 0.1, maximum => 0.5, });

Example 4. Limiting input to a value in a dropdown list.

$worksheet->data_validation(A4, { validate => list, source => [open, high, close], });

Example 5. Limiting input to a value in a dropdown list where the list is specified as a cell range.

$worksheet->data_validation(A5, { validate => list, source => =E4:G4, });

Example 6. Limiting input to a date in a fixed range.

$worksheet->data_validation(A6, { validate => date, criteria => between, minimum => 2008-01-01T, maximum => 2008-12-12T, });

Example 7. Displaying a message when the cell is selected.

$worksheet->data_validation(A7, { validate => integer, criteria => between, minimum => 1, maximum => 100, input_title => Enter an integer:, input_message => between 1 and 100, });

See also the data_validate.pl program in the examples directory of the distro.

ROW HEIGHTS AND WORKSHEET OBJECTS

The following relates to worksheet objects such as images, comments and charts.

If you specify the height of a row that contains a worksheet object then Spreadsheet::WriteExcel will adjust the height of the object to maintain its default or user specified dimensions. In this way the object won’t appear stretched or compressed in Excel.

However, Excel can also adjust the height of a row automatically if it contains cells that have the text wrap property set or contain large fonts. In these cases the height of the row is unknown to Spreadsheet::WriteExcel at execution time and the scaling calculations it performs are incorrect. The effect of this is that the object is stretched with the row when it is displayed in Excel.

In order to avoid this issue you should use the set_row() method to explicitly specify the height of any row that may otherwise be changed automatically by Excel.

FORMULAS AND FUNCTIONS IN EXCEL

Caveats

The first thing to note is that there are still some outstanding issues with the implementation of formulas and functions:

1. Writing a formula is much slower than writing the equivalent string. 2. You cannot use array constants, i.e. {1;2;3}, in functions. 3. Unary minus isnt supported. 4. Whitespace is not preserved around operators. 5. Named ranges are not supported. 6. Array formulas are not supported.

However, these constraints will be removed in future versions. They are here because of a trade-off between features and time. Also, it is possible to work around issue 1 using the store_formula() and repeat_formula() methods as described later in this section.

Introduction

The following is a brief introduction to formulas and functions in Excel and Spreadsheet::WriteExcel.

A formula is a string that begins with an equals sign:

=A1+B1 =AVERAGE(1, 2, 3)

The formula can contain numbers, strings, boolean values, cell references, cell ranges and functions. Named ranges are not supported. Formulas should be written as they appear in Excel, that is cells and functions must be in uppercase.

Cells in Excel are referenced using the A1 notation system where the column is designated by a letter and the row by a number. Columns range from A to IV i.e. 0 to 255, rows range from 1 to 65536. The Spreadsheet::WriteExcel::Utility module that is included in the distro contains helper functions for dealing with A1 notation, for example:

use Spreadsheet::WriteExcel::Utility; ($row, $col) = xl_cell_to_rowcol(C2); # (1, 2) $str = xl_rowcol_to_cell(1, 2); # C2

The Excel $ notation in cell references is also supported. This allows you to specify whether a row or column is relative or absolute. This only has an effect if the cell is copied. The following examples show relative and absolute values.

=A1 # Column and row are relative =$A1 # Column is absolute and row is relative =A$1 # Column is relative and row is absolute =$A$1 # Column and row are absolute

Formulas can also refer to cells in other worksheets of the current workbook. For example:

=Sheet2!A1 =Sheet2!A1:A5 =Sheet2:Sheet3!A1 =Sheet2:Sheet3!A1:A5 q{=Test Data!A1} q{=Test Data1:Test Data2!A1}

The sheet reference and the cell reference are separated by ! the exclamation mark symbol. If worksheet names contain spaces, commas or parentheses then Excel requires that the name is enclosed in single quotes as shown in the last two examples above. In order to avoid using a lot of escape characters you can use the quote operator q{} to protect the quotes. See perlop in the main Perl documentation. Only valid sheet names that have been added using the add_worksheet() method can be used in formulas. You cannot reference external workbooks.

The following table lists the operators that are available in Excel’s formulas. The majority of the operators are the same as Perl’s, differences are indicated:

Arithmetic operators: ===================== Operator Meaning Example + Addition 1+2 - Subtraction 2-1 * Multiplication 2*3 / Division 1/4 ^ Exponentiation 2^3 # Equivalent to ** - Unary minus -(1+2) # Not yet supported % Percent (Not modulus) 13% # Not supported, [1] Comparison operators: ===================== Operator Meaning Example = Equal to A1 = B1 # Equivalent to == <> Not equal to A1 <> B1 # Equivalent to != > Greater than A1 > B1 < Less than A1 < B1 >= Greater than or equal to A1 >= B1 <= Less than or equal to A1 <= B1 String operator: ================ Operator Meaning Example & Concatenation “Hello " & “World!” # [2] Reference operators: ==================== Operator Meaning Example : Range operator A1:A4 # [3] , Union operator SUM(1, 2+2, B3) # [4] Notes: [1]: You can get a percentage with formatting and modulus with MOD(). [2]: Equivalent to (“Hello " . “World!”) in Perl. [3]: This range is equivalent to cells A1, A2, A3 and A4. [4]: The comma behaves like the list separator in Perl.

The range and comma operators can have different symbols in non-English versions of Excel. These will be supported in a later version of Spreadsheet::WriteExcel. European users of Excel take note:

$worksheet->write(A1, =SUM(1; 2; 3)); # Wrong!! $worksheet->write(A1, =SUM(1, 2, 3)); # Okay

The following table lists all of the core functions supported by Excel 5 and Spreadsheet::WriteExcel. Any additional functions that are available through the Analysis ToolPak or other add-ins are not supported. These functions have all been tested to verify that they work.

ABS DB INDIRECT NORMINV SLN ACOS DCOUNT INFO NORMSDIST SLOPE ACOSH DCOUNTA INT NORMSINV SMALL ADDRESS DDB INTERCEPT NOT SQRT AND DEGREES IPMT NOW STANDARDIZE AREAS DEVSQ IRR NPER STDEV ASIN DGET ISBLANK NPV STDEVP ASINH DMAX ISERR ODD STEYX ATAN DMIN ISERROR OFFSET SUBSTITUTE ATAN2 DOLLAR ISLOGICAL OR SUBTOTAL ATANH DPRODUCT ISNA PEARSON SUM AVEDEV DSTDEV ISNONTEXT PERCENTILE SUMIF AVERAGE DSTDEVP ISNUMBER PERCENTRANK SUMPRODUCT BETADIST DSUM ISREF PERMUT SUMSQ BETAINV DVAR ISTEXT PI SUMX2MY2 BINOMDIST DVARP KURT PMT SUMX2PY2 CALL ERROR.TYPE LARGE POISSON SUMXMY2 CEILING EVEN LEFT POWER SYD CELL EXACT LEN PPMT T CHAR EXP LINEST PROB TAN CHIDIST EXPONDIST LN PRODUCT TANH CHIINV FACT LOG PROPER TDIST CHITEST FALSE LOG10 PV TEXT CHOOSE FDIST LOGEST QUARTILE TIME CLEAN FIND LOGINV RADIANS TIMEVALUE CODE FINV LOGNORMDIST RAND TINV COLUMN FISHER LOOKUP RANK TODAY COLUMNS FISHERINV LOWER RATE TRANSPOSE COMBIN FIXED MATCH REGISTER.ID TREND CONCATENATE FLOOR MAX REPLACE TRIM CONFIDENCE FORECAST MDETERM REPT TRIMMEAN CORREL FREQUENCY MEDIAN RIGHT TRUE COS FTEST MID ROMAN TRUNC COSH FV MIN ROUND TTEST COUNT GAMMADIST MINUTE ROUNDDOWN TYPE COUNTA GAMMAINV MINVERSE ROUNDUP UPPER COUNTBLANK GAMMALN MIRR ROW VALUE COUNTIF GEOMEAN MMULT ROWS VAR COVAR GROWTH MOD RSQ VARP CRITBINOM HARMEAN MODE SEARCH VDB DATE HLOOKUP MONTH SECOND VLOOKUP DATEVALUE HOUR N SIGN WEEKDAY DAVERAGE HYPGEOMDIST NA SIN WEIBULL DAY IF NEGBINOMDIST SINH YEAR DAYS360 INDEX NORMDIST SKEW ZTEST

You can also modify the module to support function names in the following languages: German, French, Spanish, Portuguese, Dutch, Finnish, Italian and Swedish. See the function_locale.pl program in the examples directory of the distro.

For a general introduction to Excel’s formulas and an explanation of the syntax of the function refer to the Excel help files or the following: <http://office.microsoft.com/en-us/assistance/CH062528031033.aspx>.

If your formula doesn’t work in Spreadsheet::WriteExcel try the following:

1. Verify that the formula works in Excel (or Gnumeric or OpenOffice.org). 2. Ensure that it isnt on the Caveats list shown above. 3. Ensure that cell references and formula names are in uppercase. 4. Ensure that you are using : as the range operator, A1:A4. 5. Ensure that you are using , as the union operator, SUM(1,2,3). 6. Ensure that the function is in the above table.

If you go through steps 1-6 and you still have a problem, mail me.

Improving performance when working with formulas

Writing a large number of formulas with Spreadsheet::WriteExcel can be slow. This is due to the fact that each formula has to be parsed and with the current implementation this is computationally expensive.

However, in a lot of cases the formulas that you write will be quite similar, for example:

$worksheet->write_formula(B1, =A1 * 3 + 50, $format); $worksheet->write_formula(B2, =A2 * 3 + 50, $format); … … $worksheet->write_formula(B99, =A999 * 3 + 50, $format); $worksheet->write_formula(B1000, =A1000 * 3 + 50, $format);

In this example the cell reference changes in iterations from A1 to A1000. The parser treats this variable as a token and arranges it according to predefined rules. However, since the parser is oblivious to the value of the token, it is essentially performing the same calculation 1000 times. This is inefficient.

The way to avoid this inefficiency and thereby speed up the writing of formulas is to parse the formula once and then repeatedly substitute similar tokens.

A formula can be parsed and stored via the store_formula() worksheet method. You can then use the repeat_formula() method to substitute $pattern, $replace pairs in the stored formula:

my $formula = $worksheet->store_formula(=A1 * 3 + 50); for my $row (0..999) { $worksheet->repeat_formula($row, 1, $formula, $format, A1, A.($row +1)); }

On an arbitrary test machine this method was 10 times faster than the brute force method shown above.

For more information about how Spreadsheet::WriteExcel parses and stores formulas see the Spreadsheet::WriteExcel::Formula man page.

It should be noted however that the overall speed of direct formula parsing will be improved in a future version.

EXAMPLES

See Spreadsheet::WriteExcel::Examples for a full list of examples.

Example 1

The following example shows some of the basic features of Spreadsheet::WriteExcel.

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; # Create a new workbook called simple.xls and add a worksheet my $workbook = Spreadsheet::WriteExcel->new(simple.xls); my $worksheet = $workbook->add_worksheet(); # The general syntax is write($row, $column, $token). Note that row and # column are zero indexed # Write some text $worksheet->write(0, 0, Hi Excel!); # Write some numbers $worksheet->write(2, 0, 3); # Writes 3 $worksheet->write(3, 0, 3.00000); # Writes 3 $worksheet->write(4, 0, 3.00001); # Writes 3.00001 $worksheet->write(5, 0, 3.14159); # TeX revision no.? # Write some formulas $worksheet->write(7, 0, =A3 + A6); $worksheet->write(8, 0, =IF(A5>3,“Yes”, “No”)); # Write a hyperlink $worksheet->write(10, 0, http://www.perl.com/);

Example 2

The following is a general example which demonstrates some features of working with multiple worksheets.

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; # Create a new Excel workbook my $workbook = Spreadsheet::WriteExcel->new(regions.xls); # Add some worksheets my $north = $workbook->add_worksheet(North); my $south = $workbook->add_worksheet(South); my $east = $workbook->add_worksheet(East); my $west = $workbook->add_worksheet(West); # Add a Format my $format = $workbook->add_format(); $format->set_bold(); $format->set_color(blue); # Add a caption to each worksheet foreach my $worksheet ($workbook->sheets()) { $worksheet->write(0, 0, Sales, $format); } # Write some data $north->write(0, 1, 200000); $south->write(0, 1, 100000); $east->write (0, 1, 150000); $west->write (0, 1, 100000); # Set the active worksheet $south->activate(); # Set the width of the first column $south->set_column(0, 0, 20); # Set the active cell $south->set_selection(0, 1);

Example 3

This example shows how to use a conditional numerical format with colours to indicate if a share price has gone up or down.

use strict; use Spreadsheet::WriteExcel; # Create a new workbook and add a worksheet my $workbook = Spreadsheet::WriteExcel->new(stocks.xls); my $worksheet = $workbook->add_worksheet(); # Set the column width for columns 1, 2, 3 and 4 $worksheet->set_column(0, 3, 15); # Create a format for the column headings my $header = $workbook->add_format(); $header->set_bold(); $header->set_size(12); $header->set_color(blue); # Create a format for the stock price my $f_price = $workbook->add_format(); $f_price->set_align(left); $f_price->set_num_format($0.00); # Create a format for the stock volume my $f_volume = $workbook->add_format(); $f_volume->set_align(left); $f_volume->set_num_format(#,##0); # Create a format for the price change. This is an example of a # conditional format. The number is formatted as a percentage. If it is # positive it is formatted in green, if it is negative it is formatted # in red and if it is zero it is formatted as the default font colour # (in this case black). Note: the [Green] format produces an unappealing # lime green. Try [Color 10] instead for a dark green. # my $f_change = $workbook->add_format(); $f_change->set_align(left); $f_change->set_num_format([Green]0.0%;[Red]-0.0%;0.0%); # Write out the data $worksheet->write(0, 0, Company,$header); $worksheet->write(0, 1, Price, $header); $worksheet->write(0, 2, Volume, $header); $worksheet->write(0, 3, Change, $header); $worksheet->write(1, 0, Damage Inc. ); $worksheet->write(1, 1, 30.25, $f_price ); # $30.25 $worksheet->write(1, 2, 1234567, $f_volume); # 1,234,567 $worksheet->write(1, 3, 0.085, $f_change); # 8.5% in green $worksheet->write(2, 0, Dump Corp. ); $worksheet->write(2, 1, 1.56, $f_price ); # $1.56 $worksheet->write(2, 2, 7564, $f_volume); # 7,564 $worksheet->write(2, 3, -0.015, $f_change); # -1.5% in red $worksheet->write(3, 0, Rev Ltd. ); $worksheet->write(3, 1, 0.13, $f_price ); # $0.13 $worksheet->write(3, 2, 321, $f_volume); # 321 $worksheet->write(3, 3, 0, $f_change); # 0 in the font color (black)

Example 4

The following is a simple example of using functions.

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; # Create a new workbook and add a worksheet my $workbook = Spreadsheet::WriteExcel->new(stats.xls); my $worksheet = $workbook->add_worksheet(Test data); # Set the column width for columns 1 $worksheet->set_column(0, 0, 20); # Create a format for the headings my $format = $workbook->add_format(); $format->set_bold(); # Write the sample data $worksheet->write(0, 0, Sample, $format); $worksheet->write(0, 1, 1); $worksheet->write(0, 2, 2); $worksheet->write(0, 3, 3); $worksheet->write(0, 4, 4); $worksheet->write(0, 5, 5); $worksheet->write(0, 6, 6); $worksheet->write(0, 7, 7); $worksheet->write(0, 8, 8); $worksheet->write(1, 0, Length, $format); $worksheet->write(1, 1, 25.4); $worksheet->write(1, 2, 25.4); $worksheet->write(1, 3, 24.8); $worksheet->write(1, 4, 25.0); $worksheet->write(1, 5, 25.3); $worksheet->write(1, 6, 24.9); $worksheet->write(1, 7, 25.2); $worksheet->write(1, 8, 24.8); # Write some statistical functions $worksheet->write(4, 0, Count, $format); $worksheet->write(4, 1, =COUNT(B1:I1)); $worksheet->write(5, 0, Sum, $format); $worksheet->write(5, 1, =SUM(B2:I2)); $worksheet->write(6, 0, Average, $format); $worksheet->write(6, 1, =AVERAGE(B2:I2)); $worksheet->write(7, 0, Min, $format); $worksheet->write(7, 1, =MIN(B2:I2)); $worksheet->write(8, 0, Max, $format); $worksheet->write(8, 1, =MAX(B2:I2)); $worksheet->write(9, 0, Standard Deviation, $format); $worksheet->write(9, 1, =STDEV(B2:I2)); $worksheet->write(10, 0, Kurtosis, $format); $worksheet->write(10, 1, =KURT(B2:I2));

Example 5

The following example converts a tab separated file called tab.txt into an Excel file called tab.xls.

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; open (TABFILE, tab.txt) or die “tab.txt: $!”; my $workbook = Spreadsheet::WriteExcel->new(tab.xls); my $worksheet = $workbook->add_worksheet(); # Row and column are zero indexed my $row = 0; while (<TABFILE>) { chomp; # Split on single tab my @Fld = split( , $_); my $col = 0; foreach my $token (@Fld) { $worksheet->write($row, $col, $token); $col++; } $row++; }

NOTE: This is a simple conversion program for illustrative purposes only. For converting a CSV or Tab separated or any other type of delimited text file to Excel I recommend the more rigorous csv2xls program that is part of H.Merijn Brand’s Text::CSV_XS module distro.

See the examples/csv2xls link here: <http://search.cpan.org/~hmbrand/Text-CSV_XS/MANIFEST>.

Additional Examples

The following is a description of the example files that are provided in the standard Spreadsheet::WriteExcel distribution. They demonstrate the different features and options of the module. See Spreadsheet::WriteExcel::Examples for more details.

Getting started =============== a_simple.pl A get started example with some basic features. demo.pl A demo of some of the available features. regions.pl A simple example of multiple worksheets. stats.pl Basic formulas and functions. formats.pl All the available formatting on several worksheets. bug_report.pl A template for submitting bug reports. Advanced ======== autofilter.pl Examples of worksheet autofilters. autofit.pl Simulate Excels autofit for column widths. bigfile.pl Write past the 7MB limit with OLE::Storage_Lite. cgi.pl A simple CGI program. chart_area.pl A demo of area style charts. chart_bar.pl A demo of bar (vertical histogram) style charts. chart_column.pl A demo of column (histogram) style charts. chart_line.pl A demo of line style charts. chart_pie.pl A demo of pie style charts. chart_scatter.pl A demo of scatter style charts. chart_stock.pl A demo of stock style charts. chess.pl An example of reusing formatting via properties. colors.pl A demo of the colour palette and named colours. comments1.pl Add comments to worksheet cells. comments2.pl Add comments with advanced options. copyformat.pl Example of copying a cell format. data_validate.pl An example of data validation and dropdown lists. date_time.pl Write dates and times with write_date_time(). defined_name.pl Example of how to create defined names. diag_border.pl A simple example of diagonal cell borders. easter_egg.pl Expose the Excel97 flight simulator. filehandle.pl Examples of working with filehandles. formula_result.pl Formulas with user specified results. headers.pl Examples of worksheet headers and footers. hide_sheet.pl Simple example of hiding a worksheet. hyperlink1.pl Shows how to create web hyperlinks. hyperlink2.pl Examples of internal and external hyperlinks. images.pl Adding images to worksheets. indent.pl An example of cell indentation. merge1.pl A simple example of cell merging. merge2.pl A simple example of cell merging with formatting. merge3.pl Add hyperlinks to merged cells. merge4.pl An advanced example of merging with formatting. merge5.pl An advanced example of merging with formatting. merge6.pl An example of merging with Unicode strings. mod_perl1.pl A simple mod_perl 1 program. mod_perl2.pl A simple mod_perl 2 program. outline.pl An example of outlines and grouping. outline_collapsed.pl An example of collapsed outlines. panes.pl An examples of how to create panes. properties.pl Add document properties to a workbook. protection.pl Example of cell locking and formula hiding. repeat.pl Example of writing repeated formulas. right_to_left.pl Change default sheet direction to right to left. row_wrap.pl How to wrap data from one worksheet onto another. sales.pl An example of a simple sales spreadsheet. sendmail.pl Send an Excel email attachment using Mail::Sender. stats_ext.pl Same as stats.pl with external references. stocks.pl Demonstrates conditional formatting. tab_colors.pl Example of how to set worksheet tab colours. textwrap.pl Demonstrates text wrapping options. win32ole.pl A sample Win32::OLE example for comparison. write_arrays.pl Example of writing 1D or 2D arrays of data. write_handler1.pl Example of extending the write() method. Step 1. write_handler2.pl Example of extending the write() method. Step 2. write_handler3.pl Example of extending the write() method. Step 3. write_handler4.pl Example of extending the write() method. Step 4. write_to_scalar.pl Example of writing an Excel file to a Perl scalar. Unicode ======= unicode_utf16.pl Simple example of using Unicode UTF16 strings. unicode_utf16_japan.pl Write Japanese Unicode strings using UTF-16. unicode_cyrillic.pl Write Russian Cyrillic strings using UTF-8. unicode_list.pl List the chars in a Unicode font. unicode_2022_jp.pl Japanese: ISO-2022-JP to utf8 in perl 5.8. unicode_8859_11.pl Thai: ISO-8859_11 to utf8 in perl 5.8. unicode_8859_7.pl Greek: ISO-8859_7 to utf8 in perl 5.8. unicode_big5.pl Chinese: BIG5 to utf8 in perl 5.8. unicode_cp1251.pl Russian: CP1251 to utf8 in perl 5.8. unicode_cp1256.pl Arabic: CP1256 to utf8 in perl 5.8. unicode_koi8r.pl Russian: KOI8-R to utf8 in perl 5.8. unicode_polish_utf8.pl Polish : UTF8 to utf8 in perl 5.8. unicode_shift_jis.pl Japanese: Shift JIS to utf8 in perl 5.8. Utility ======= csv2xls.pl Program to convert a CSV file to an Excel file. tab2xls.pl Program to convert a tab separated file to xls. datecalc1.pl Convert Unix/Perl time to Excel time. datecalc2.pl Calculate an Excel date using Date::Calc. lecxe.pl Convert Excel to WriteExcel using Win32::OLE. Developer ========= convertA1.pl Helper functions for dealing with A1 notation. function_locale.pl Add non-English function names to Formula.pm. writeA1.pl Example of how to extend the module.

LIMITATIONS

The following limits are imposed by Excel:

Description Limit ———————————– —— Maximum number of chars in a string 32767 Maximum number of columns 256 Maximum number of rows 65536 Maximum chars in a sheet name 31 Maximum chars in a header/footer 254

For Excel 2007+ file limits see the Excel::Writer::XLSX module.

The minimum file size is 6K due to the OLE overhead. The maximum file size is approximately 7MB (7087104 bytes) of BIFF data. This can be extended by installing Takanori Kawai’s OLE::Storage_Lite module <http://search.cpan.org/search?dist=OLE-Storage_Lite> see the bigfile.pl example in the examples directory of the distro.

DOWNLOADING

The latest version of this module is always available at: <http://search.cpan.org/search?dist=Spreadsheet-WriteExcel/>.

REQUIREMENTS

This module requires Perl >= 5.005, Parse::RecDescent, File::Temp and OLE::Storage_Lite:

http://search.cpan.org/search?dist=Parse-RecDescent/ # For formulas. http://search.cpan.org/search?dist=File-Temp/ # For set_tempdir(). http://search.cpan.org/search?dist=OLE-Storage_Lite/ # For files > 7MB.

Note, these aren’t strict requirements. Spreadsheet::WriteExcel will work without these modules if you don’t use write_formula(), set_tempdir() or create files greater than 7MB. However, it is best to install them if possible and they will be installed automatically if you use a tool such as CPAN.pm or ppm.

INSTALLATION

See the INSTALL or install.html docs that come with the distribution or: <http://search.cpan.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.31/INSTALL>.

PORTABILITY

Spreadsheet::WriteExcel will work on the majority of Windows, UNIX and Macintosh platforms. Specifically, the module will work on any system where perl packs floats in the 64 bit IEEE format. The float must also be in little-endian format but it will be reversed if necessary. Thus:

print join( , map { sprintf %#02x, $_ } unpack(C*, pack d, 1.2345)), " “;

should give (or in reverse order):

0x8d 0x97 0x6e 0x12 0x83 0xc0 0xf3 0x3f

In general, if you don’t know whether your system supports a 64 bit IEEE float or not, it probably does. If your system doesn’t, WriteExcel will croak() with the message given in the DIAGNOSTICS section. You can check which platforms the module has been tested on at the CPAN testers site: <http://testers.cpan.org/search?request=dist&dist=Spreadsheet-WriteExcel>.

DIAGNOSTICS

Filename required by Spreadsheet::WriteExcel->new()
A filename must be given in the constructor.

Can’t open filename. It may be in use or protected.
The file cannot be opened for writing. The directory that you are writing to may be protected or the file may be in use by another program.

Unable to create tmp files via File::Temp::tempfile()…
This is a -w warning. You will see it if you are using Spreadsheet::WriteExcel in an environment where temporary files cannot be created, in which case all data will be stored in memory. The warning is for information only: it does not affect creation but it will affect the speed of execution for large files. See the set_tempdir workbook method.

Maximum file size, 7087104, exceeded.
The current OLE implementation only supports a maximum BIFF file of this size. This limit can be extended, see the LIMITATIONS section.

Can’t locate Parse/RecDescent.pm in @INC …
Spreadsheet::WriteExcel requires the Parse::RecDescent module. Download it from CPAN: <http://search.cpan.org/search?dist=Parse-RecDescent>

Couldn’t parse formula …
There are a large number of warnings which relate to badly formed formulas and functions. See the FORMULAS AND FUNCTIONS IN EXCEL section for suggestions on how to avoid these errors. You should also check the formula in Excel to ensure that it is valid.

Required floating point format not supported on this platform.
Operating system doesn’t support 64 bit IEEE float or it is byte-ordered in a way unknown to WriteExcel.

‘file.xls’ cannot be accessed. The file may be read-only …
You may sometimes encounter the following error when trying to open a file in Excel: file.xls cannot be accessed. The file may be read-only, or you may be trying to access a read-only location. Or, the server the document is stored on may not be responding. This error generally means that the Excel file has been corrupted. There are two likely causes of this: the file was FTPed in ASCII mode instead of binary mode or else the file was created with UTF-8 data returned by an XML parser. See Warning about XML::Parser and perl 5.6 for further details.

THE EXCEL BINARY FORMAT

The following is some general information about the Excel binary format for anyone who may be interested.

Excel data is stored in the Binary Interchange File Format (BIFF) file format. Details of this format are given in Excel 97-2007 Binary File Format Specification <http://www.microsoft.com/interop/docs/OfficeBinaryFormats.mspx>.

Daniel Rentz of OpenOffice.org has also written a detailed description of the Excel workbook records, see <http://sc.openoffice.org/excelfileformat.pdf>.

Charles Wybble has collected together additional information about the Excel file format. See The Chicago Project at <http://chicago.sourceforge.net/devel/>.

The BIFF data is stored along with other data in an OLE Compound File. This is a structured storage which acts like a file system within a file. A Compound File is comprised of storages and streams which, to follow the file system analogy, are like directories and files.

The OLE format is explained in the Windows Compound Binary File Format Specification <http://www.microsoft.com/interop/docs/supportingtechnologies.mspx>

The Digital Imaging Group have also detailed the OLE format in the JPEG2000 specification: see Appendix A of <http://www.i3a.org/pdf/wg1n1017.pdf>.

Please note that the provision of this information does not constitute an invitation to start hacking at the BIFF or OLE file formats. There are more interesting ways to waste your time. ;-)

WRITING EXCEL FILES

Depending on your requirements, background and general sensibilities you may prefer one of the following methods of getting data into Excel:

  • Win32::OLE module and office automation This requires a Windows platform and an installed copy of Excel. This is the most powerful and complete method for interfacing with Excel. See <http://www.activestate.com/ASPN/Reference/Products/ActivePerl-5.6/faq/Windows/ActivePerl-Winfaq12.html> and <http://www.activestate.com/ASPN/Reference/Products/ActivePerl-5.6/site/lib/Win32/OLE.html>. If your main platform is UNIX but you have the resources to set up a separate Win32/MSOffice server, you can convert office documents to text, postscript or PDF using Win32::OLE. For a demonstration of how to do this using Perl see Docserver: <http://search.cpan.org/search?mode=module&query=docserver>.

  • CSV, comma separated variables or text If the file extension is csv, Excel will open and convert this format automatically. Generating a valid CSV file isn’t as easy as it seems. Have a look at the DBD::RAM, DBD::CSV, Text::xSV and Text::CSV_XS modules.

  • DBI with DBD::ADO or DBD::ODBC Excel files contain an internal index table that allows them to act like a database file. Using one of the standard Perl database modules you can connect to an Excel file as a database.

  • DBD::Excel You can also access Spreadsheet::WriteExcel using the standard DBI interface via Takanori Kawai’s DBD::Excel module <http://search.cpan.org/dist/DBD-Excel>

  • Spreadsheet::WriteExcelXML This module allows you to create an Excel XML file using the same interface as Spreadsheet::WriteExcel. See: <http://search.cpan.org/dist/Spreadsheet-WriteExcelXML>

  • Excel::Template This module allows you to create an Excel file from an XML template in a manner similar to HTML::Template. See <http://search.cpan.org/dist/Excel-Template/>.

  • Spreadsheet::WriteExcel::FromXML This module allows you to turn a simple XML file into an Excel file using Spreadsheet::WriteExcel as a back-end. The format of the XML file is defined by a supplied DTD: <http://search.cpan.org/dist/Spreadsheet-WriteExcel-FromXML>.

  • Spreadsheet::WriteExcel::Simple This provides an easier interface to Spreadsheet::WriteExcel: <http://search.cpan.org/dist/Spreadsheet-WriteExcel-Simple>.

  • Spreadsheet::WriteExcel::FromDB This is a useful module for creating Excel files directly from a DB table: <http://search.cpan.org/dist/Spreadsheet-WriteExcel-FromDB>.

  • HTML tables This is an easy way of adding formatting via a text based format.

  • XML or HTML The Excel XML and HTML file specification are available from <http://msdn.microsoft.com/library/officedev/ofxml2k/ofxml2k.htm>.

For other Perl-Excel modules try the following search: <http://search.cpan.org/search?mode=module&query=excel>.

READING EXCEL FILES

To read data from Excel files try:

  • Spreadsheet::ParseExcel This uses the OLE::Storage-Lite module to extract data from an Excel file. <http://search.cpan.org/dist/Spreadsheet-ParseExcel>.

  • Spreadsheet::ParseExcel_XLHTML This module uses Spreadsheet::ParseExcel’s interface but uses xlHtml (see below) to do the conversion: <http://search.cpan.org/dist/Spreadsheet-ParseExcel_XLHTML> Spreadsheet::ParseExcel_XLHTML

  • xlHtml This is an open source Excel to HTML Converter C/C++ project at <http://chicago.sourceforge.net/xlhtml/>.

  • DBD::Excel (reading) You can also access Spreadsheet::ParseExcel using the standard DBI interface via Takanori Kawai’s DBD::Excel module <http://search.cpan.org/dist/DBD-Excel>.

  • Win32::OLE module and office automation (reading) See, the section WRITING EXCEL FILES.

  • HTML tables (reading) If the files are saved from Excel in a HTML format the data can be accessed using HTML::TableExtract <http://search.cpan.org/dist/HTML-TableExtract>.

  • DBI with DBD::ADO or DBD::ODBC. See, the section WRITING EXCEL FILES.

  • XML::Excel Converts Excel files to XML using Spreadsheet::ParseExcel <http://search.cpan.org/dist/XML-Excel>.

  • OLE::Storage, aka LAOLA This is a Perl interface to OLE file formats. In particular, the distro contains an Excel to HTML converter called Herbert, <http://user.cs.tu-berlin.de/~schwartz/pmh/>. This has been superseded by the Spreadsheet::ParseExcel module.

For other Perl-Excel modules try the following search: <http://search.cpan.org/search?mode=module&query=excel>.

If you wish to view Excel files on a UNIX/Linux platform check out the excellent Gnumeric spreadsheet application at <http://www.gnome.org/projects/gnumeric/> or OpenOffice.org at <http://www.openoffice.org/>.

If you wish to view Excel files on a Windows platform which doesn’t have Excel installed you can use the free Microsoft Excel Viewer <http://office.microsoft.com/downloads/2000/xlviewer.aspx>.

MODIFYING AND REWRITING EXCEL FILES

An Excel file is a binary file within a binary file. It contains several interlinked checksums and changing even one byte can cause it to become corrupted.

As such you cannot simply append or update an Excel file. The only way to achieve this is to read the entire file into memory, make the required changes or additions and then write the file out again.

You can read and rewrite an Excel file using the Spreadsheet::ParseExcel::SaveParser module which is a wrapper around Spreadsheet::ParseExcel and Spreadsheet::WriteExcel. It is part of the Spreadsheet::ParseExcel package: <http://search.cpan.org/search?dist=Spreadsheet-ParseExcel>.

However, you can only rewrite the features that Spreadsheet::WriteExcel supports so macros, graphs and some other features in the original Excel file will be lost. Also, formulas aren’t rewritten, only the result of a formula is written.

Here is an example:

#!/usr/bin/perl -w use strict; use Spreadsheet::ParseExcel; use Spreadsheet::ParseExcel::SaveParser; # Open the template with SaveParser my $parser = new Spreadsheet::ParseExcel::SaveParser; my $template = $parser->Parse(template.xls); my $sheet = 0; my $row = 0; my $col = 0; # Get the format from the cell my $format = $template->{Worksheet}[$sheet] ->{Cells}[$row][$col] ->{FormatNo}; # Write data to some cells $template->AddCell(0, $row, $col, 1, $format); $template->AddCell(0, $row+1, $col, “Hello”, $format); # Add a new worksheet $template->AddWorksheet(New Data); # The SaveParser SaveAs() method returns a reference to a # Spreadsheet::WriteExcel object. If you wish you can then # use this to access any of the methods that arent # available from the SaveParser object. If you dont need # to do this just use SaveAs(). # my $workbook; { # SaveAs generates a lot of harmless warnings about unset # Worksheet properties. You can ignore them if you wish. local $^W = 0; # Rewrite the file or save as a new file $workbook = $template->SaveAs(new.xls); } # Use Spreadsheet::WriteExcel methods my $worksheet = $workbook->sheets(0); $worksheet->write($row+2, $col, “World2”); $workbook->close();

Warning about XML::Parser and perl 5.6

You must be careful when using Spreadsheet::WriteExcel in conjunction with perl 5.6 and XML::Parser (and other XML parsers) due to the fact that the data returned by the parser is generally in UTF-8 format.

When UTF-8 strings are added to Spreadsheet::WriteExcel’s internal data it causes the generated Excel file to become corrupt.

Note, this doesn’t affect perl 5.005 (which doesn’t try to handle UTF-8) or 5.8 (which handles it correctly).

To avoid this problem you should upgrade to perl 5.8, if possible, or else you should convert the output data from XML::Parser to ASCII or ISO-8859-1 using one of the following methods:

$new_str = pack C*, unpack U*, $utf8_str; use Unicode::MapUTF8 from_utf8; $new_str = from_utf8({-str => $utf8_str, -charset => ISO-8859-1});

Warning about Office Service Pack 3

If you have Office Service Pack 3 (SP3) installed you may see the following warning when you open a file created by Spreadsheet::WriteExcel:

“File Error: data may have been lost”.

This is usually caused by multiple instances of data in a cell.

SP3 changed Excel’s default behaviour when it encounters multiple data in a cell so that it issues a warning when the file is opened and it displays the first data that was written. Prior to SP3 it didn’t issue a warning and displayed the last data written.

For a longer discussion and some workarounds see the following: <http://groups.google.com/group/spreadsheet-writeexcel/browse_thread/thread/3dcea40e6620af3a>.

BUGS

Formulas are formulae.

XML and UTF-8 data on perl 5.6 can cause Excel files created by Spreadsheet::WriteExcel to become corrupt. See Warning about XML::Parser and perl 5.6 for further details.

The format object that is used with a merge_range() method call is marked internally as being associated with a merged range. It is a fatal error to use a merged format in a non-merged cell. The current workaround is to use separate formats for merged and non-merged cell. This restriction will be removed in a future release.

Nested formulas sometimes aren’t parsed correctly and give a result of #VALUE. If you come across a formula that parses like this, let me know.

Spreadsheet::ParseExcel: All formulas created by Spreadsheet::WriteExcel are read as having a value of zero. This is because Spreadsheet::WriteExcel only stores the formula and not the calculated result.

OpenOffice.org: No known issues in this release.

Gnumeric: No known issues in this release.

If you wish to submit a bug report run the bug_report.pl program in the examples directory of the distro.

Migrating to Excel::Writer::XLSX

Spreadsheet::WriteExcel is in maintenance only mode and has effectively been superseded by Excel::Writer::XLSX.

Excel::Writer::XLSX is an API compatible, drop-in replacement for Spreadsheet::WriteExcel. It also has many more features such as conditional formats, better charts, better formula handling, Excel tables and even sparklines.

To convert your Spreadsheet::WriteExcel program to Excel::Writer::XLSX you only need do the following:

  • Substitute Excel::Writer::XLSX for Spreadsheet::WriteExcel in your program.

  • Change the file extension of the output file from .xls to .xlsx.

  • Optionally replace store_formula() and repeat_formula() with write_formula() which is no longer an expensive operation in Excel::Writer::XLSX. However, you can leave them unchanged if required.

There are some differences between the formats and the modules that are worth noting:

  • The default font in the XLSX format is Calibri 11 not Arial 10.

  • Default column widths and row heights are different between XLS and XLSX.

  • The Excel::Writer::XLSX module uses more memory by default but has a optimisation mode to reduce usage for large files.

  • The XLSX format doesn’t have reading support that is as complete as Spreadsheet::ParseExcel.

REPOSITORY

The Spreadsheet::WriteExcel source code in host on github: <http://github.com/jmcnamara/spreadsheet-writeexcel>.

MAILING LIST

There is a Google group for discussing and asking questions about Spreadsheet::WriteExcel. This is a good place to search to see if your question has been asked before: <http://groups.google.com/group/spreadsheet-writeexcel>.

Alternatively you can keep up to date with future releases by subscribing at: <http://freshmeat.net/projects/writeexcel/>.

DONATIONS

If you’d care to donate to the Spreadsheet::WriteExcel project, you can do so via PayPal: <http://tinyurl.com/7ayes>.

SEE ALSO

Spreadsheet::ParseExcel: <http://search.cpan.org/dist/Spreadsheet-ParseExcel>.

Spreadsheet-WriteExcel-FromXML: <http://search.cpan.org/dist/Spreadsheet-WriteExcel-FromXML>.

Spreadsheet::WriteExcel::FromDB: <http://search.cpan.org/dist/Spreadsheet-WriteExcel-FromDB>.

Excel::Template: <http://search.cpan.org/~rkinyon/Excel-Template/>.

DateTime::Format::Excel: <http://search.cpan.org/dist/DateTime-Format-Excel>.

Reading and writing Excel files with Perl by Teodor Zlatanov, at IBM developerWorks: <http://www-106.ibm.com/developerworks/library/l-pexcel/>.

Excel-Dateien mit Perl erstellen - Controller im Gluck by Peter Dintelmann and Christian Kirsch in the German Unix/web journal iX: <http://www.heise.de/ix/artikel/2001/06/175/>.

Spreadsheet::WriteExcel documentation in Japanese by Takanori Kawai. <http://member.nifty.ne.jp/hippo2000/perltips/Spreadsheet/WriteExcel.htm>.

Oesterly user brushes with fame: <http://oesterly.com/releases/12102000.html>.

The csv2xls program that is part of Text::CSV_XS: <http://search.cpan.org/~hmbrand/Text-CSV_XS/MANIFEST>.

ACKNOWLEDGMENTS

The following people contributed to the debugging and testing of Spreadsheet::WriteExcel:

Alexander Farber, Andre de Bruin, Arthur@ais, Artur Silveira da Cunha, Bob Rose, Borgar Olsen, Brian Foley, Brian White, Bob Mackay, Cedric Bouvier, Chad Johnson, CPAN testers, Damyan Ivanov, Daniel Berger, Daniel Gardner, Dmitry Kochurov, Eric Frazier, Ernesto Baschny, Felipe Perez Galiana, Gordon Simpson, Hanc Pavel, Harold Bamford, James Holmes, James Wilkinson, Johan Ekenberg, Johann Hanne, Jonathan Scott Duff, J.C. Wren, Kenneth Stacey, Keith Miller, Kyle Krom, Marc Rosenthal, Markus Schmitz, Michael Braig, Michael Buschauer, Mike Blazer, Michael Erickson, Michael W J West, Ning Xie, Paul J. Falbe, Paul Medynski, Peter Dintelmann, Pierre Laplante, Praveen Kotha, Reto Badertscher, Rich Sorden, Shane Ashby, Sharron McKenzie, Shenyu Zheng, Stephan Loescher, Steve Sapovits, Sven Passig, Svetoslav Marinov, Tamas Gulacsi, Troy Daniels, Vahe Sarkissian.

The following people contributed patches, examples or Excel information:

Andrew Benham, Bill Young, Cedric Bouvier, Charles Wybble, Daniel Rentz, David Robins, Franco Venturi, Guy Albertelli, Ian Penman, John Heitmann, Jon Guy, Kyle R. Burton, Pierre-Jean Vouette, Rubio, Marco Geri, Mark Fowler, Matisse Enzer, Sam Kington, Takanori Kawai, Tom O’Sullivan.

Many thanks to Ron McKelvey, Ronzo Consulting for Siemens, who sponsored the development of the formula caching routines.

Many thanks to Cassens Transport who sponsored the development of the embedded charts and autofilters.

Additional thanks to Takanori Kawai for translating the documentation into Japanese.

Gunnar Wolf maintains the Debian distro.

Thanks to Damian Conway for the excellent Parse::RecDescent.

Thanks to Tim Jenness for File::Temp.

Thanks to Michael Meeks and Jody Goldberg for their work on Gnumeric.

DISCLAIMER OF WARRANTY

Because this software is licensed free of charge, there is no warranty for the software, to the extent permitted by applicable law. Except when otherwise stated in writing the copyright holders and/or other parties provide the software as is without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the software is with you. Should the software prove defective, you assume the cost of all necessary servicing, repair, or correction.

In no event unless required by applicable law or agreed to in writing will any copyright holder, or any other party who may modify and/or redistribute the software as permitted by the above licence, be liable to you for damages, including any general, special, incidental, or consequential damages arising out of the use or inability to use the software (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the software to operate with any other software), even if such holder or other party has been advised of the possibility of such damages.

LICENSE

Either the Perl Artistic Licence <http://dev.perl.org/licenses/artistic.html> or the GPL <http://www.opensource.org/licenses/gpl-license.php>.

AUTHOR

John McNamara [email protected]

The ashtray says You were up all night. When you went to bed With your darkest mind. Your pillow wept And covered your eyes. And you finally slept While the sun caught fire. Youve changed. – Jeff Tweedy

COPYRIGHT

Copyright MM-MMXII, John McNamara.

All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1745 - Linux cli command XtIsWMShell

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtIsWMShell and provides detailed information about the command XtIsWMShell, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtIsWMShell.

NAME 🖥️ XtIsWMShell 🖥️

obtain and verify a widget’s class

SYNTAX

#include <X11/Intrinsic.h>

WidgetClass XtClass(Widget w);

WidgetClass XtSuperclass(Widget w);

Boolean XtIsSubclass(Widget w, WidgetClass widget_class);

void XtCheckSubclass(Widget widget, WidgetClass widget_class, String message);

Boolean XtIsObject(Widget w);

Boolean XtIsRectObj(Widget w);

Boolean XtIsWidget(Widget w);

Boolean XtIsComposite(Widget w);

Boolean XtIsConstraint(Widget w);

Boolean XtIsShell(Widget w);

Boolean XtIsOverrideShell(Widget w);

Boolean XtIsWMShell(Widget w);

Boolean XtIsVendorShell(Widget w);

Boolean XtIsTransientShell(Widget w);

Boolean XtIsTopLevelShell(Widget w);

Boolean XtIsApplicationShell(Widget w);

Boolean XtIsSessionShell(Widget w);

ARGUMENTS

  1. Specifies the widget.

widget_class
Specifies the widget class.

message
Specifies the message that is to be used.

DESCRIPTION

The XtClass function returns a pointer to the widget’s class structure.

The XtSuperclass function returns a pointer to the widget’s superclass class structure.

The XtIsSubclass function returns True if the class of the specified widget is equal to or is a subclass of the specified class. The widget’s class can be any number of subclasses down the chain and need not be an immediate subclass of the specified class. Composite widgets that need to restrict the class of the items they contain can use XtIsSubclass to find out if a widget belongs to the desired class of objects.

The XtCheckSubclass macro determines if the class of the specified widget is equal to or is a subclass of the specified widget class. The widget can be any number of subclasses down the chain and need not be an immediate subclass of the specified widget class. If the specified widget is not a subclass, XtCheckSubclass constructs an error message from the supplied message, the widget’s actual class, and the expected class and calls XtErrorMsg. XtCheckSubclass should be used at the entry point of exported routines to ensure that the client has passed in a valid widget class for the exported operation.

XtCheckSubclass is only executed when the widget has been compiled with the compiler symbol DEBUG defined; otherwise, it is defined as the empty string and generates no code.

To test if a given widget belongs to a subclass of an Intrinsics-defined class, the Intrinsics defines macros or functions equivalent to XtIsSubclass for each of the built-in classes. These procedures are XtIsObject, XtIsRectObj, XtIsWidget, XtIsComposite, XtIsConstraint, XtIsShell, XtIsOverrideShell, XtIsWMShell, XtIsVendorShell, XtIsTransientShell, XtIsTopLevelShell, XtIsApplicationShell, and XtIsSessionShell.

The

SEE ALSO

XtAppErrorMsg(3), XtDisplay(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1746 - Linux cli command Gitpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Gitpm and provides detailed information about the command Gitpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Gitpm.

NAME 🖥️ Gitpm 🖥️

Perl interface to the Git version control system

SYNOPSIS

use Git; my $version = Git::command_oneline(version); git_cmd_try { Git::command_noisy(update-server-info) } %s failed w/ code %d; my $repo = Git->repository (Directory => /srv/git/cogito.git); my @revs = $repo->command(rev-list, –since=last monday, –all); my ($fh, $c) = $repo->command_output_pipe(rev-list, –since=last monday, –all); my $lastrev = <$fh>; chomp $lastrev; $repo->command_close_pipe($fh, $c); my $lastrev = $repo->command_oneline( [ rev-list, –all ], STDERR => 0 ); my $sha1 = $repo->hash_and_insert_object(file.txt); my $tempfile = tempfile(); my $size = $repo->cat_blob($sha1, $tempfile);

DESCRIPTION

This module provides Perl scripts easy way to interface the Git version control system. The modules have an easy and well-tested way to call arbitrary Git commands; in the future, the interface will also provide specialized methods for doing easily operations which are not totally trivial to do over the generic command interface.

While some commands can be executed outside of any context (e.g. ‘version’ or ‘init’), most operations require a repository context, which in practice means getting an instance of the Git object using the repository() constructor. (In the future, we will also get a new_repository() constructor.) All commands called as methods of the object are then executed in the context of the repository.

Part of the repository state is also information about path to the attached working copy (unless you work with a bare repository). You can also navigate inside of the working copy using the wc_chdir() method. (Note that the repository object is self-contained and will not change working directory of your process.)

TODO: In the future, we might also do

my $remoterepo = $repo->remote_repository (Name => cogito, Branch => master); $remoterepo ||= Git->remote_repository (http://git.or.cz/cogito.git/); my @refs = $remoterepo->refs();

Currently, the module merely wraps calls to external Git tools. In the future, it will provide a much faster way to interact with Git by linking directly to libgit. This should be completely opaque to the user, though (performance increase notwithstanding).

CONSTRUCTORS

repository ( OPTIONS )

repository ( DIRECTORY )

repository ()

Construct a new repository object. OPTIONS are passed in a hash like fashion, using key and value pairs. Possible options are: Repository - Path to the Git repository. WorkingCopy - Path to the associated working copy; not strictly required as many commands will happily crunch on a bare repository. WorkingSubdir - Subdirectory in the working copy to work inside. Just left undefined if you do not want to limit the scope of operations. Directory - Path to the Git working directory in its usual setup. The .git directory is searched in the directory and all the parent directories; if found, WorkingCopy is set to the directory containing it and Repository to the .git directory itself. If no .git directory was found, the Directory is assumed to be a bare repository, Repository is set to point at it and WorkingCopy is left undefined. If the $GIT_DIR environment variable is set, things behave as expected as well. You should not use both Directory and either of Repository and WorkingCopy - the results of that are undefined. Alternatively, a directory path may be passed as a single scalar argument to the constructor; it is equivalent to setting only the Directory option field. Calling the constructor with no options whatsoever is equivalent to calling it with Directory => .. In general, if you are building a standard porcelain command, simply doing Git->repository() should do the right thing and setup the object to reflect exactly where the user is right now.

METHODS

command ( COMMAND [, ARGUMENTS… ] )

command ( [ COMMAND, ARGUMENTS… ], { Opt => Val … } )

Execute the given Git COMMAND (specify it without the ‘git-’ prefix), optionally with the specified extra ARGUMENTS. The second more elaborate form can be used if you want to further adjust the command execution. Currently, only one option is supported: STDERR - How to deal with the command’s error output. By default (undef) it is delivered to the caller’s STDERR. A false value (0 or ‘’) will cause it to be thrown away. If you want to process it, you can get it in a filehandle you specify, but you must be extremely careful; if the error output is not very short and you want to read it in the same process as where you called command(), you are set up for a nice deadlock! The method can be called without any instance or on a specified Git repository (in that case the command will be run in the repository context). In scalar context, it returns all the command output in a single string (verbatim). In array context, it returns an array containing lines printed to the command’s stdout (without trailing newlines). In both cases, the command’s stdin and stderr are the same as the caller’s.

command_oneline ( COMMAND [, ARGUMENTS… ] )

command_oneline ( [ COMMAND, ARGUMENTS… ], { Opt => Val … } )

Execute the given COMMAND in the same way as command() does but always return a scalar string containing the first line of the command’s standard output.

command_output_pipe ( COMMAND [, ARGUMENTS… ] )

command_output_pipe ( [ COMMAND, ARGUMENTS… ], { Opt => Val … } )

Execute the given COMMAND in the same way as command() does but return a pipe filehandle from which the command output can be read. The function can return ($pipe, $ctx) in array context. See command_close_pipe() for details.

command_input_pipe ( COMMAND [, ARGUMENTS… ] )

command_input_pipe ( [ COMMAND, ARGUMENTS… ], { Opt => Val … } )

Execute the given COMMAND in the same way as command_output_pipe() does but return an input pipe filehandle instead; the command output is not captured. The function can return ($pipe, $ctx) in array context. See command_close_pipe() for details.

command_close_pipe ( PIPE [, CTX ] )
Close the PIPE as returned from command_*_pipe(), checking whether the command finished successfully. The optional CTX argument is required if you want to see the command name in the error message, and it is the second value returned by command_*_pipe() when called in array context. The call idiom is: my ($fh, $ctx) = $r->command_output_pipe(status); while (<$fh>) { … } $r->command_close_pipe($fh, $ctx); Note that you should not rely on whatever actually is in CTX; currently it is simply the command name but in future the context might have more complicated structure.

command_bidi_pipe ( COMMAND [, ARGUMENTS… ] )
Execute the given COMMAND in the same way as command_output_pipe() does but return both an input pipe filehandle and an output pipe filehandle. The function will return ($pid, $pipe_in, $pipe_out, $ctx). See command_close_bidi_pipe() for details.

command_close_bidi_pipe ( PID, PIPE_IN, PIPE_OUT [, CTX] )
Close the PIPE_IN and PIPE_OUT as returned from command_bidi_pipe(), checking whether the command finished successfully. The optional CTX argument is required if you want to see the command name in the error message, and it is the fourth value returned by command_bidi_pipe(). The call idiom is: my ($pid, $in, $out, $ctx) = $r->command_bidi_pipe(cat-file –batch-check); print $out “000000000 “; while (<$in>) { … } $r->command_close_bidi_pipe($pid, $in, $out, $ctx); Note that you should not rely on whatever actually is in CTX; currently it is simply the command name but in future the context might have more complicated structure. PIPE_IN and PIPE_OUT may be undef if they have been closed prior to calling this function. This may be useful in a query-response type of commands where caller first writes a query and later reads response, eg: my ($pid, $in, $out, $ctx) = $r->command_bidi_pipe(cat-file –batch-check); print $out “000000000 “; close $out; while (<$in>) { … } $r->command_close_bidi_pipe($pid, $in, undef, $ctx); This idiom may prevent potential dead locks caused by data sent to the output pipe not being flushed and thus not reaching the executed command.

command_noisy ( COMMAND [, ARGUMENTS… ] )
Execute the given COMMAND in the same way as command() does but do not capture the command output - the standard output is not redirected and goes to the standard output of the caller application. While the method is called command_noisy(), you might want to as well use it for the most silent Git commands which you know will never pollute your stdout but you want to avoid the overhead of the pipe setup when calling them. The function returns only after the command has finished running.

version ()
Return the Git version in use.

exec_path ()
Return path to the Git sub-command executables (the same as git --exec-path). Useful mostly only internally.

html_path ()
Return path to the Git html documentation (the same as git --html-path). Useful mostly only internally.

get_tz_offset ( TIME )
Return the time zone offset from GMT in the form +/-HHMM where HH is the number of hours from GMT and MM is the number of minutes. This is the equivalent of what strftime(%z, …) would provide on a GNU platform. If TIME is not supplied, the current local time is used.

get_record ( FILEHANDLE, INPUT_RECORD_SEPARATOR )
Read one record from FILEHANDLE delimited by INPUT_RECORD_SEPARATOR, removing any trailing INPUT_RECORD_SEPARATOR.

prompt ( PROMPT , ISPASSWORD )
Query user PROMPT and return answer from user. Honours GIT_ASKPASS and SSH_ASKPASS environment variables for querying the user. If no *_ASKPASS variable is set or an error occurred, the terminal is tried as a fallback. If ISPASSWORD is set and true, the terminal disables echo.

repo_path ()
Return path to the git repository. Must be called on a repository instance.

wc_path ()
Return path to the working copy. Must be called on a repository instance.

wc_subdir ()
Return path to the subdirectory inside of a working copy. Must be called on a repository instance.

wc_chdir ( SUBDIR )
Change the working copy subdirectory to work within. The SUBDIR is relative to the working copy root directory (not the current subdirectory). Must be called on a repository instance attached to a working copy and the directory must exist.

config ( VARIABLE )
Retrieve the configuration VARIABLE in the same manner as config does. In scalar context requires the variable to be set only one time (exception is thrown otherwise), in array context returns allows the variable to be set multiple times and returns all the values.

config_bool ( VARIABLE )
Retrieve the bool configuration VARIABLE. The return value is usable as a boolean in perl (and undef if it’s not defined, of course).

config_path ( VARIABLE )
Retrieve the path configuration VARIABLE. The return value is an expanded path or undef if it’s not defined.

config_int ( VARIABLE )
Retrieve the integer configuration VARIABLE. The return value is simple decimal number. An optional value suffix of ‘k’, ’m’, or ‘g’ in the config file will cause the value to be multiplied by 1024, 1048576 (1024^2), or 1073741824 (1024^3) prior to output. It would return undef if configuration variable is not defined.

config_regexp ( RE )
Retrieve the list of configuration key names matching the regular expression RE. The return value is a list of strings matching this regex.

get_colorbool ( NAME )
Finds if color should be used for NAMEd operation from the configuration, and returns boolean (true for use color, false for do not use color).

get_color ( SLOT, COLOR )
Finds color for SLOT from the configuration, while defaulting to COLOR, and returns the ANSI color escape sequence: print $repo->get_color(“color.interactive.prompt”, “underline blue white”); print “some text”; print $repo->get_color(””, “normal”);

remote_refs ( REPOSITORY [, GROUPS [, REFGLOBS ] ] )
This function returns a hashref of refs stored in a given remote repository. The hash is in the format refname =\ hash>. For tags, the refname entry contains the tag object while a refname^{} entry gives the tagged objects. REPOSITORY has the same meaning as the appropriate git-ls-remote argument; either a URL or a remote name (if called on a repository instance). GROUPS is an optional arrayref that can contain ’tags’ to return all the tags and/or ‘heads’ to return all the heads. REFGLOB is an optional array of strings containing a shell-like glob to further limit the refs returned in the hash; the meaning is again the same as the appropriate git-ls-remote argument. This function may or may not be called on a repository instance. In the former case, remote names as defined in the repository are recognized as repository specifiers.

ident ( TYPE | IDENTSTR )

ident_person ( TYPE | IDENTSTR | IDENTARRAY )

This suite of functions retrieves and parses ident information, as stored in the commit and tag objects or produced by var GIT_type_IDENT (thus TYPE can be either author or committer; case is insignificant). The ident method retrieves the ident information from git var and either returns it as a scalar string or as an array with the fields parsed. Alternatively, it can take a prepared ident string (e.g. from the commit object) and just parse it. ident_person returns the person part of the ident - name and email; it can take the same arguments as ident or the array returned by ident. The synopsis is like: my ($name, $email, $time_tz) = ident(author); “$name <$email>” eq ident_person(author); “$name <$email>” eq ident_person($name); $time_tz =~ /^\d+ [+-]\d{4}$/;

hash_object ( TYPE, FILENAME )
Compute the SHA1 object id of the given FILENAME considering it is of the TYPE object type (blob, commit, tree). The method can be called without any instance or on a specified Git repository, it makes zero difference. The function returns the SHA1 hash.

hash_and_insert_object ( FILENAME )
Compute the SHA1 object id of the given FILENAME and add the object to the object database. The function returns the SHA1 hash.

cat_blob ( SHA1, FILEHANDLE )
Prints the contents of the blob identified by SHA1 to FILEHANDLE and returns the number of bytes printed.

credential_read( FILEHANDLE )
Reads credential key-value pairs from FILEHANDLE. Reading stops at EOF or when an empty line is encountered. Each line must be of the form key=value with a non-empty key. Function returns hash with all read values. Any white space (other than new-line character) is preserved.

credential_write( FILEHANDLE, CREDENTIAL_HASHREF )
Writes credential key-value pairs from hash referenced by CREDENTIAL_HASHREF to FILEHANDLE. Keys and values cannot contain new-lines or NUL bytes characters, and key cannot contain equal signs nor be empty (if they do Error::Simple is thrown). Any white space is preserved. If value for a key is undef, it will be skipped. If url key exists it will be written first. (All the other key-value pairs are written in sorted order but you should not depend on that). Once all lines are written, an empty line is printed.

credential( CREDENTIAL_HASHREF [, OPERATION ] )

credential( CREDENTIAL_HASHREF, CODE )

Executes git credential for a given set of credentials and specified operation. In both forms CREDENTIAL_HASHREF needs to be a reference to a hash which stores credentials. Under certain conditions the hash can change. In the first form, OPERATION can be fill, approve or reject, and function will execute corresponding git credential sub-command. If it’s omitted fill is assumed. In case of fill the values stored in CREDENTIAL_HASHREF will be changed to the ones returned by the git credential fill command. The usual usage would look something like: my %cred = ( protocol => https, host => example.com, username => bob ); Git::credential \cred; if (try_to_authenticate($cred{username}, $cred{password})) { Git::credential \cred, approve; … do more stuff … } else { Git::credential \cred, reject; } In the second form, CODE needs to be a reference to a subroutine. The function will execute git credential fill to fill the provided credential hash, then call CODE with CREDENTIAL_HASHREF as the sole argument. If CODE’s return value is defined, the function will execute git credential approve (if return value yields true) or git credential reject (if return value is false). If the return value is undef, nothing at all is executed; this is useful, for example, if the credential could neither be verified nor rejected due to an unrelated network error. The return value is the same as what CODE returns. With this form, the usage might look as follows: if (Git::credential { protocol => https, host => example.com, username => bob }, sub { my $cred = shift; return !!try_to_authenticate($cred->{username}, $cred->{password}); }) { … do more stuff … }

temp_acquire ( NAME )
Attempts to retrieve the temporary file mapped to the string NAME. If an associated temp file has not been created this session or was closed, it is created, cached, and set for autoflush and binmode. Internally locks the file mapped to NAME. This lock must be released with temp_release() when the temp file is no longer needed. Subsequent attempts to retrieve temporary files mapped to the same NAME while still locked will cause an error. This locking mechanism provides a weak guarantee and is not threadsafe. It does provide some error checking to help prevent temp file refs writing over one another. In general, the File::Handle returned should not be closed by consumers as it defeats the purpose of this caching mechanism. If you need to close the temp file handle, then you should use File::Temp or another temp file faculty directly. If a handle is closed and then requested again, then a warning will issue.

temp_is_locked ( NAME )
Returns true if the internal lock created by a previous temp_acquire() call with NAME is still in effect. When temp_acquire is called on a NAME, it internally locks the temporary file mapped to NAME. That lock will not be released until temp_release() is called with either the original NAME or the File::Handle that was returned from the original call to temp_acquire. Subsequent attempts to call temp_acquire() with the same NAME will fail unless there has been an intervening temp_release() call for that NAME (or its corresponding File::Handle that was returned by the original temp_acquire() call). If true is returned by temp_is_locked() for a NAME, an attempt to temp_acquire() the same NAME will cause an error unless temp_release is first called on that NAME (or its corresponding File::Handle that was returned by the original temp_acquire() call).

temp_release ( NAME )

temp_release ( FILEHANDLE )

Releases a lock acquired through temp_acquire(). Can be called either with the NAME mapping used when acquiring the temp file or with the FILEHANDLE referencing a locked temp file. Warns if an attempt is made to release a file that is not locked. The temp file will be truncated before being released. This can help to reduce disk I/O where the system is smart enough to detect the truncation while data is in the output buffers. Beware that after the temp file is released and truncated, any operations on that file may fail miserably until it is re-acquired. All contents are lost between each release and acquire mapped to the same string.

temp_reset ( FILEHANDLE )
Truncates and resets the position of the FILEHANDLE.

temp_path ( NAME )

temp_path ( FILEHANDLE )

Returns the filename associated with the given tempfile.

prefix_lines ( PREFIX, STRING [, STRING… ])
Prefixes lines in STRING with PREFIX.

unquote_path ( PATH )
Unquote a quoted path containing c-escapes as returned by ls-files etc. when not using -z or when parsing the output of diff -u.

get_comment_line_char ( )
Gets the core.commentchar configuration value. The value falls-back to ‘#’ if core.commentchar is set to ‘auto’.

comment_lines ( STRING [, STRING… ])
Comments lines following core.commentchar configuration.

ERROR HANDLING

All functions are supposed to throw Perl exceptions in case of errors. See the Error module on how to catch those. Most exceptions are mere Error::Simple instances.

However, the command(), command_oneline() and command_noisy() functions suite can throw Git::Error::Command exceptions as well: those are thrown when the external command returns an error code and contain the error code as well as access to the captured command’s output. The exception class provides the usual stringify and value (command’s exit code) methods and in addition also a cmd_output method that returns either an array or a string with the captured command output (depending on the original function call context; command_noisy() returns undef) and $<cmdline> which returns the command and its arguments (but without proper quoting).

Note that the command_*_pipe() functions cannot throw this exception since it has no idea whether the command failed or not. You will only find out at the time you close the pipe; if you want to have that automated, use command_close_pipe(), which can throw the exception.

git_cmd_try { CODE } ERRMSG
This magical statement will automatically catch any Git::Error::Command exceptions thrown by CODE and make your program die with ERRMSG on its lips; the message will have %s substituted for the command line and %d for the exit status. This statement is useful mostly for producing more user-friendly error messages. In case of no exception caught the statement returns CODE’s return value. Note that this is the only auto-exported function.

COPYRIGHT

Copyright 2006 by Petr Baudis <[email protected]>.

This module is free software; it may be used, copied, modified and distributed under the terms of the GNU General Public Licence, either version 2, or (at your option) any later version.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1747 - Linux cli command posix_spawn

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command posix_spawn and provides detailed information about the command posix_spawn, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the posix_spawn.

NAME 🖥️ posix_spawn 🖥️

spawn a process

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <spawn.h>
int posix_spawn(pid_t *restrict pid, const char *restrict path,
 const posix_spawn_file_actions_t *restrict file_actions,
 const posix_spawnattr_t *restrict attrp,
 char *const argv[restrict],
 char *const envp[restrict]);
int posix_spawnp(pid_t *restrict pid, const char *restrict file,
 const posix_spawn_file_actions_t *restrict file_actions,
 const posix_spawnattr_t *restrict attrp,
 char *const argv[restrict],
 char *const envp[restrict]);

DESCRIPTION

The posix_spawn() and posix_spawnp() functions are used to create a new child process that executes a specified file. These functions were specified by POSIX to provide a standardized method of creating new processes on machines that lack the capability to support the fork(2) system call. These machines are generally small, embedded systems lacking MMU support.

The posix_spawn() and posix_spawnp() functions provide the functionality of a combined fork(2) and exec(3), with some optional housekeeping steps in the child process before the exec(3). These functions are not meant to replace the fork(2) and execve(2) system calls. In fact, they provide only a subset of the functionality that can be achieved by using the system calls.

The only difference between posix_spawn() and posix_spawnp() is the manner in which they specify the file to be executed by the child process. With posix_spawn(), the executable file is specified as a pathname (which can be absolute or relative). With posix_spawnp(), the executable file is specified as a simple filename; the system searches for this file in the list of directories specified by PATH (in the same way as for execvp(3)). For the remainder of this page, the discussion is phrased in terms of posix_spawn(), with the understanding that posix_spawnp() differs only on the point just described.

The remaining arguments to these two functions are as follows:

pid
points to a buffer that is used to return the process ID of the new child process.

file_actions
points to a spawn file actions object that specifies file-related actions to be performed in the child between the fork(2) and exec(3) steps. This object is initialized and populated before the posix_spawn() call using posix_spawn_file_actions_init(3) and the posix_spawn_file_actions_*() functions.

attrp
points to an attributes objects that specifies various attributes of the created child process. This object is initialized and populated before the posix_spawn() call using posix_spawnattr_init(3) and the posix_spawnattr_*() functions.

argv
envp
specify the argument list and environment for the program that is executed in the child process, as for execve(2).

Below, the functions are described in terms of a three-step process: the fork() step, the pre-exec() step (executed in the child), and the exec() step (executed in the child).

fork() step

Since glibc 2.24, the posix_spawn() function commences by calling clone(2) with CLONE_VM and CLONE_VFORK flags. Older implementations use fork(2), or possibly vfork(2) (see below).

The PID of the new child process is placed in *pid. The posix_spawn() function then returns control to the parent process.

Subsequently, the parent can use one of the system calls described in wait(2) to check the status of the child process. If the child fails in any of the housekeeping steps described below, or fails to execute the desired file, it exits with a status of 127.

Before glibc 2.24, the child process is created using vfork(2) instead of fork(2) when either of the following is true:

  • the spawn-flags element of the attributes object pointed to by attrp contains the GNU-specific flag POSIX_SPAWN_USEVFORK; or

  • file_actions is NULL and the spawn-flags element of the attributes object pointed to by attrp does not contain POSIX_SPAWN_SETSIGMASK, POSIX_SPAWN_SETSIGDEF, POSIX_SPAWN_SETSCHEDPARAM, POSIX_SPAWN_SETSCHEDULER, POSIX_SPAWN_SETPGROUP, or POSIX_SPAWN_RESETIDS.

In other words, vfork(2) is used if the caller requests it, or if there is no cleanup expected in the child before it exec(3)s the requested file.

pre-exec() step: housekeeping

In between the fork() and the exec() steps, a child process may need to perform a set of housekeeping actions. The posix_spawn() and posix_spawnp() functions support a small, well-defined set of system tasks that the child process can accomplish before it executes the executable file. These operations are controlled by the attributes object pointed to by attrp and the file actions object pointed to by file_actions. In the child, processing is done in the following sequence:

  1. Process attribute actions: signal mask, signal default handlers, scheduling algorithm and parameters, process group, and effective user and group IDs are changed as specified by the attributes object pointed to by attrp.

  2. File actions, as specified in the file_actions argument, are performed in the order that they were specified using calls to the posix_spawn_file_actions_add*() functions.

  3. File descriptors with the FD_CLOEXEC flag set are closed.

All process attributes in the child, other than those affected by attributes specified in the object pointed to by attrp and the file actions in the object pointed to by file_actions, will be affected as though the child was created with fork(2) and it executed the program with execve(2).

The process attributes actions are defined by the attributes object pointed to by attrp. The spawn-flags attribute (set using posix_spawnattr_setflags(3)) controls the general actions that occur, and other attributes in the object specify values to be used during those actions.

The effects of the flags that may be specified in spawn-flags are as follows:

POSIX_SPAWN_SETSIGMASK
Set the signal mask to the signal set specified in the spawn-sigmask attribute of the object pointed to by attrp. If the POSIX_SPAWN_SETSIGMASK flag is not set, then the child inherits the parent’s signal mask.

POSIX_SPAWN_SETSIGDEF
Reset the disposition of all signals in the set specified in the spawn-sigdefault attribute of the object pointed to by attrp to the default. For the treatment of the dispositions of signals not specified in the spawn-sigdefault attribute, or the treatment when POSIX_SPAWN_SETSIGDEF is not specified, see execve(2).

POSIX_SPAWN_SETSCHEDPARAM
If this flag is set, and the POSIX_SPAWN_SETSCHEDULER flag is not set, then set the scheduling parameters to the parameters specified in the spawn-schedparam attribute of the object pointed to by attrp.

POSIX_SPAWN_SETSCHEDULER
Set the scheduling policy algorithm and parameters of the child, as follows:

  • The scheduling policy is set to the value specified in the spawn-schedpolicy attribute of the object pointed to by attrp.

  • The scheduling parameters are set to the value specified in the spawn-schedparam attribute of the object pointed to by attrp (but see BUGS).

If the POSIX_SPAWN_SETSCHEDPARAM and POSIX_SPAWN_SETSCHEDPOLICY flags are not specified, the child inherits the corresponding scheduling attributes from the parent.

POSIX_SPAWN_RESETIDS
If this flag is set, reset the effective UID and GID to the real UID and GID of the parent process. If this flag is not set, then the child retains the effective UID and GID of the parent. In either case, if the set-user-ID and set-group-ID permission bits are enabled on the executable file, their effect will override the setting of the effective UID and GID (se execve(2)).

POSIX_SPAWN_SETPGROUP
Set the process group to the value specified in the spawn-pgroup attribute of the object pointed to by attrp. If the spawn-pgroup attribute has the value 0, the child’s process group ID is made the same as its process ID. If the POSIX_SPAWN_SETPGROUP flag is not set, the child inherits the parent’s process group ID.

POSIX_SPAWN_USEVFORK
Since glibc 2.24, this flag has no effect. On older implementations, setting this flag forces the fork() step to use vfork(2) instead of fork(2). The _GNU_SOURCE feature test macro must be defined to obtain the definition of this constant.

POSIX_SPAWN_SETSID (since glibc 2.26)
If this flag is set, the child process shall create a new session and become the session leader. The child process shall also become the process group leader of the new process group in the session (see setsid(2)). The _GNU_SOURCE feature test macro must be defined to obtain the definition of this constant.

If attrp is NULL, then the default behaviors described above for each flag apply.

The file_actions argument specifies a sequence of file operations that are performed in the child process after the general processing described above, and before it performs the exec(3). If file_actions is NULL, then no special action is taken, and standard exec(3) semantics apply—file descriptors open before the exec remain open in the new process, except those for which the FD_CLOEXEC flag has been set. File locks remain in place.

If file_actions is not NULL, then it contains an ordered set of requests to open(2), close(2), and dup2(2) files. These requests are added to the file_actions by posix_spawn_file_actions_addopen(3), posix_spawn_file_actions_addclose(3), and posix_spawn_file_actions_adddup2(3). The requested operations are performed in the order they were added to file_actions.

If any of the housekeeping actions fails (due to bogus values being passed or other reasons why signal handling, process scheduling, process group ID functions, and file descriptor operations might fail), the child process exits with exit value 127.

exec() step

Once the child has successfully forked and performed all requested pre-exec steps, the child runs the requested executable.

The child process takes its environment from the envp argument, which is interpreted as if it had been passed to execve(2). The arguments to the created process come from the argv argument, which is processed as for execve(2).

RETURN VALUE

Upon successful completion, posix_spawn() and posix_spawnp() place the PID of the child process in pid, and return 0. If there is an error during the fork() step, then no child is created, the contents of *pid are unspecified, and these functions return an error number as described below.

Even when these functions return a success status, the child process may still fail for a plethora of reasons related to its pre-exec() initialization. In addition, the exec(3) may fail. In all of these cases, the child process will exit with the exit value of 127.

ERRORS

The posix_spawn() and posix_spawnp() functions fail only in the case where the underlying fork(2), vfork(2), or clone(2) call fails; in these cases, these functions return an error number, which will be one of the errors described for fork(2), vfork(2), or clone(2).

In addition, these functions fail if:

ENOSYS
Function not supported on this system.

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.2. POSIX.1-2001.

NOTES

The housekeeping activities in the child are controlled by the objects pointed to by attrp (for non-file actions) and file_actions In POSIX parlance, the posix_spawnattr_t and posix_spawn_file_actions_t data types are referred to as objects, and their elements are not specified by name. Portable programs should initialize these objects using only the POSIX-specified functions. (In other words, although these objects may be implemented as structures containing fields, portable programs must avoid dependence on such implementation details.)

According to POSIX, it is unspecified whether fork handlers established with pthread_atfork(3) are called when posix_spawn() is invoked. Since glibc 2.24, the fork handlers are not executed in any case. On older implementations, fork handlers are called only if the child is created using fork(2).

There is no “posix_fspawn” function (i.e., a function that is to posix_spawn() as fexecve(3) is to execve(2)). However, this functionality can be obtained by specifying the path argument as one of the files in the caller’s /proc/self/fd directory.

BUGS

POSIX.1 says that when POSIX_SPAWN_SETSCHEDULER is specified in spawn-flags, then the POSIX_SPAWN_SETSCHEDPARAM (if present) is ignored. However, before glibc 2.14, calls to posix_spawn() failed with an error if POSIX_SPAWN_SETSCHEDULER was specified without also specifying POSIX_SPAWN_SETSCHEDPARAM.

EXAMPLES

The program below demonstrates the use of various functions in the POSIX spawn API. The program accepts command-line attributes that can be used to create file actions and attributes objects. The remaining command-line arguments are used as the executable name and command-line arguments of the program that is executed in the child.

In the first run, the date(1) command is executed in the child, and the posix_spawn() call employs no file actions or attributes objects.

$ ./a.out date
PID of child: 7634
Tue Feb  1 19:47:50 CEST 2011
Child status: exited, status=0

In the next run, the -c command-line option is used to create a file actions object that closes standard output in the child. Consequently, date(1) fails when trying to perform output and exits with a status of 1.

$ ./a.out -c date
PID of child: 7636
date: write error: Bad file descriptor
Child status: exited, status=1

In the next run, the -s command-line option is used to create an attributes object that specifies that all (blockable) signals in the child should be blocked. Consequently, trying to kill child with the default signal sent by kill(1) (i.e., SIGTERM) fails, because that signal is blocked. Therefore, to kill the child, SIGKILL is necessary (SIGKILL can’t be blocked).

$ ./a.out -s sleep 60 &
[1] 7637
$ PID of child: 7638
$ kill 7638
$ kill -KILL 7638
$ Child status: killed by signal 9
[1]+  Done                    ./a.out -s sleep 60

When we try to execute a nonexistent command in the child, the exec(3) fails and the child exits with a status of 127.

$ ./a.out xxxxx
PID of child: 10190
Child status: exited, status=127

Program source

#include <errno.h>
#include <spawn.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <wait.h>
#define errExit(msg)    do { perror(msg); \
                             exit(EXIT_FAILURE); } while (0)
#define errExitEN(en, msg) \
                        do { errno = en; perror(msg); \
                             exit(EXIT_FAILURE); } while (0)
char **environ;
int
main(int argc, char *argv[])
{
    pid_t child_pid;
    int s, opt, status;
    sigset_t mask;
    posix_spawnattr_t attr;
    posix_spawnattr_t *attrp;
    posix_spawn_file_actions_t file_actions;
    posix_spawn_file_actions_t *file_actionsp;
    /* Parse command-line options, which can be used to specify an
       attributes object and file actions object for the child. */
    attrp = NULL;
    file_actionsp = NULL;
    while ((opt = getopt(argc, argv, "sc")) != -1) {
        switch (opt) {
        case 'c':       /* -c: close standard output in child */
            /* Create a file actions object and add a "close"
               action to it. */
            s = posix_spawn_file_actions_init(&file_actions);
            if (s != 0)
                errExitEN(s, "posix_spawn_file_actions_init");
            s = posix_spawn_file_actions_addclose(&file_actions,
                                                  STDOUT_FILENO);
            if (s != 0)
                errExitEN(s, "posix_spawn_file_actions_addclose");
            file_actionsp = &file_actions;
            break;
        case 's':       /* -s: block all signals in child */
            /* Create an attributes object and add a "set signal mask"
               action to it. */
            s = posix_spawnattr_init(&attr);
            if (s != 0)
                errExitEN(s, "posix_spawnattr_init");
            s = posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETSIGMASK);
            if (s != 0)
                errExitEN(s, "posix_spawnattr_setflags");
            sigfillset(&mask);
            s = posix_spawnattr_setsigmask(&attr, &mask);
            if (s != 0)
                errExitEN(s, "posix_spawnattr_setsigmask");
            attrp = &attr;
            break;
        }
    }
    /* Spawn the child. The name of the program to execute and the
       command-line arguments are taken from the command-line arguments
       of this program. The environment of the program execed in the
       child is made the same as the parent's environment. */
    s = posix_spawnp(&child_pid, argv[optind], file_actionsp, attrp,
                     &argv[optind], environ);
    if (s != 0)
        errExitEN(s, "posix_spawn");
    /* Destroy any objects that we created earlier. */
    if (attrp != NULL) {
        s = posix_spawnattr_destroy(attrp);
        if (s != 0)
            errExitEN(s, "posix_spawnattr_destroy");
    }
    if (file_actionsp != NULL) {
        s = posix_spawn_file_actions_destroy(file_actionsp);
        if (s != 0)
            errExitEN(s, "posix_spawn_file_actions_destroy");
    }
    printf("PID of child: %jd

“, (intmax_t) child_pid); /* Monitor status of the child until it terminates. */ do { s = waitpid(child_pid, &status, WUNTRACED | WCONTINUED); if (s == -1) errExit(“waitpid”); printf(“Child status: “); if (WIFEXITED(status)) { printf(“exited, status=%d “, WEXITSTATUS(status)); } else if (WIFSIGNALED(status)) { printf(“killed by signal %d “, WTERMSIG(status)); } else if (WIFSTOPPED(status)) { printf(“stopped by signal %d “, WSTOPSIG(status)); } else if (WIFCONTINUED(status)) { printf(“continued “); } } while (!WIFEXITED(status) && !WIFSIGNALED(status)); exit(EXIT_SUCCESS); }

SEE ALSO

close(2), dup2(2), execl(2), execlp(2), fork(2), open(2), sched_setparam(2), sched_setscheduler(2), setpgid(2), setuid(2), sigaction(2), sigprocmask(2), posix_spawn_file_actions_addclose(3), posix_spawn_file_actions_adddup2(3), posix_spawn_file_actions_addopen(3), posix_spawn_file_actions_destroy(3), posix_spawn_file_actions_init(3), posix_spawnattr_destroy(3), posix_spawnattr_getflags(3), posix_spawnattr_getpgroup(3), posix_spawnattr_getschedparam(3), posix_spawnattr_getschedpolicy(3), posix_spawnattr_getsigdefault(3), posix_spawnattr_getsigmask(3), posix_spawnattr_init(3), posix_spawnattr_setflags(3), posix_spawnattr_setpgroup(3), posix_spawnattr_setschedparam(3), posix_spawnattr_setschedpolicy(3), posix_spawnattr_setsigdefault(3), posix_spawnattr_setsigmask(3), pthread_atfork(3), <spawn.h>, Base Definitions volume of POSIX.1-2001, http://www.opengroup.org/unix/online.html

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1748 - Linux cli command Net_Serverpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Serverpm and provides detailed information about the command Net_Serverpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Serverpm.

NAME 🖥️ Net_Serverpm 🖥️

Extensible, general Perl server engine

SYNOPSIS

#!/usr/bin/perl -w -T package MyPackage; use base qw(Net::Server); sub process_request { my $self = shift; while (<STDIN>) { s/[ ]+$//; print “You said $_ “; # basic echo last if /quit/i; } } MyPackage->run(port => 160, ipv => *); # one liner to get going quickly perl -e use base qw(Net::Server); main->run(port => 20208) NOTE: beginning in Net::Server 2.005, the default value for ipv is IPv* meaning that if no host is passed, or a hostname is past, any available IPv4 and IPv6 sockets will be bound. You can force IPv4 only by adding an ipv => 4 configuration in any of the half dozen ways we let you specify it.

FEATURES

* Full IPv6 support * Working SSL sockets and https (both with and without IO::Socket::SSL) * Single Server Mode * Inetd Server Mode * Preforking Simple Mode (PreForkSimple) * Preforking Managed Mode (PreFork) * Forking Mode * Multiplexing Mode using a single process * Multi port accepts on Single, Preforking, and Forking modes * Basic HTTP Daemon (supports IPv6, SSL, full apache style logs) * Basic PSGI Daemon * Simultaneous accept/recv on tcp/udp/unix, ssl/tcp, and IPv4/IPv6 sockets * Safe signal handling in Fork/PreFork avoids perl signal trouble * User customizable hooks * Chroot ability after bind * Change of user and group after bind * Basic allow/deny access control * Pluggable logging (Sys::Syslog, Log::Log4perl, log_file, STDERR, or your own) * HUP able server (clean restarts via sig HUP) * Graceful shutdowns (via sig QUIT) * Hot deploy in Fork and PreFork modes (via sig TTIN and TTOU) * Dequeue ability in all Fork and PreFork modes. * Taint clean * Written in Perl * Protection against buffer overflow * Clean process flow * Extensibility

DESCRIPTION

Net::Server is an extensible, generic Perl server engine.

Net::Server attempts to be a generic server as in Net::Daemon and NetServer::Generic. It includes with it the ability to run as an inetd process (Net::Server::INET), a single connection server (Net::Server or Net::Server::Single), a forking server (Net::Server::Fork), a preforking server which maintains a constant number of preforked children (Net::Server::PreForkSimple), or as a managed preforking server which maintains the number of children based on server load (Net::Server::PreFork). In all but the inetd type, the server provides the ability to connect to one or to multiple server ports.

The additional server types are made possible via personalities or sub classes of the Net::Server. By moving the multiple types of servers out of the main Net::Server class, the Net::Server concept is easily extended to other types (in the near future, we would like to add a Thread personality).

Net::Server borrows several concepts from the Apache Webserver. Net::Server uses hooks to allow custom servers such as SMTP, HTTP, POP3, etc. to be layered over the base Net::Server class. In addition the Net::Server::PreFork class borrows concepts of min_start_servers, max_servers, and min_waiting servers. Net::Server::PreFork also uses the concept of an flock serialized accept when accepting on multiple ports (PreFork can choose between flock, IPC::Semaphore, and pipe to control serialization).

PERSONALITIES

Net::Server is built around a common class (Net::Server) and is extended using sub classes, or personalities. Each personality inherits, overrides, or enhances the base methods of the base class.

Included with the Net::Server package are several basic personalities, each of which has their own use.

Fork
Found in the module Net/Server/Fork.pm (see Net::Server::Fork). This server binds to one or more ports and then waits for a connection. When a client request is received, the parent forks a child, which then handles the client and exits. This is good for moderately hit services.

INET
Found in the module Net/Server/INET.pm (see Net::Server::INET). This server is designed to be used with inetd. The pre_bind, bind, accept, and post_accept are all overridden as these services are taken care of by the INET daemon.

MultiType
Found in the module Net/Server/MultiType.pm (see Net::Server::MultiType). This server has no server functionality of its own. It is designed for servers which need a simple way to easily switch between different personalities. Multiple server_type parameters may be given and Net::Server::MultiType will cycle through until it finds a class that it can use.

Multiplex
Found in the module Net/Server/Multiplex.pm (see Net::Server::Multiplex). This server binds to one or more ports. It uses IO::Multiplex to multiplex between waiting for new connections and waiting for input on currently established connections. This personality is designed to run as one process without forking. The process_request method is never used but the mux_input callback is used instead (see also IO::Multiplex). See examples/samplechat.pl for an example using most of the features of Net::Server::Multiplex.

PreForkSimple
Found in the module Net/Server/PreFork.pm (see Net::Server::PreFork). This server binds to one or more ports and then forks max_servers child process. The server will make sure that at any given time there are always max_servers available to receive a client request. Each of these children will process up to max_requests client connections. This type is good for a heavily hit site that can dedicate max_server processes no matter what the load. It should scale well for most applications. Multi port accept is accomplished using either flock, IPC::Semaphore, or pipe to serialize the children. Serialization may also be switched on for single port in order to get around an OS that does not allow multiple children to accept at the same time. For a further discussion of serialization see Net::Server::PreFork.

PreFork
Found in the module Net/Server/PreFork.pm (see Net::Server::PreFork). This server binds to one or more ports and then forks min_servers child process. The server will make sure that at any given time there are at least min_spare_servers but not more than max_spare_servers available to receive a client request, up to max_servers. Each of these children will process up to max_requests client connections. This type is good for a heavily hit site, and should scale well for most applications. Multi port accept is accomplished using either flock, IPC::Semaphore, or pipe to serialize the children. Serialization may also be switched on for single port in order to get around an OS that does not allow multiple children to accept at the same time. For a further discussion of serialization see Net::Server::PreFork.

Single
All methods fall back to Net::Server. This personality is provided only as parallelism for Net::Server::MultiType.

HTTP
Not a distinct personality. Provides a basic HTTP daemon. This can be combined with the SSL or SSLEAY proto to provide an HTTPS Daemon. See Net::Server::HTTP.

Net::Server was partially written to make it easy to add new personalities. Using separate modules built upon an open architecture allows for easy addition of new features, a separate development process, and reduced code bloat in the core module.

SOCKET ACCESS

Once started, the Net::Server will take care of binding to port and waiting for connections. Once a connection is received, the Net::Server will accept on the socket and will store the result (the client connection) in $self->{server}->{client}. This property is a Socket blessed into the IO::Socket classes. UDP servers are slightly different in that they will perform a recv instead of an accept.

To make programming easier, during the post_accept phase, STDIN and STDOUT are opened to the client connection. This allows for programs to be written using <STDIN> and print out to print to the client connection. UDP will require using a ->send call.

SAMPLE CODE

The following is a very simple server. The main functionality occurs in the process_request method call as shown below. Notice the use of timeouts to prevent Denial of Service while reading. (Other examples of using Net::Server can, or will, be included with this distribution).

#!/usr/bin/perl -w -T package MyPackage; use strict; use base qw(Net::Server::PreFork); # any personality will do MyPackage->run; # over-ride the default echo handler sub process_request { my $self = shift; eval { local $SIG{ALRM} = sub { die “Timed Out! " }; my $timeout = 30; # give the user 30 seconds to type some lines my $previous_alarm = alarm($timeout); while (<STDIN>) { s/ ? $//; print “You said $_ “; alarm($timeout); } alarm($previous_alarm); }; if ($@ =~ /timed out/i) { print STDOUT “Timed Out. “; return; } } 1;

Playing this file from the command line will invoke a Net::Server using the PreFork personality. When building a server layer over the Net::Server, it is important to use features such as timeouts to prevent Denial Of Service attacks.

Net::Server comes with a built in echo server by default. You can test it out by simply running the following from the commandline:

net-server

If you wanted to try another flavor you could try

net-server PreFork

If you wanted to try out a basic HTTP server you could use

net-server HTTP

Or if you wanted to test out a CGI you are writing you could use

net-server HTTP –app ../../mycgi.cgi

ARGUMENTS

There are at least five possible ways to pass arguments to Net::Server. They are passing to the new method, passing on command line, passing parameters to run, using a conf file, returning values in the default_values method, or configuring the values in post_configure_hook.

The options method is used to determine which arguments the server will search for and can be used to extend the parsed parameters. Any arguments found from the command line, parameters passed to run, and arguments found in the conf_file will be matched against the keys of the options template. Any commandline parameters that do not match will be left in place and can be further processed by the server in the various hooks (by looking at @ARGV). Arguments passed to new will automatically win over any other options (this can be used if you would like to disallow a user passing in other arguments).

Arguments consist of key value pairs. On the commandline these pairs follow the POSIX fashion of --key value or --key=value, and also key=value. In the conf file the parameter passing can best be shown by the following regular expression: ($key,$val)=~/^(\w+)\s+(\S+?)\s+$/. Passing arguments to the run method is done as follows: <Net::Server->run(key1 = ‘val1’)>>. Passing arguments via a prebuilt object can best be shown in the following code:

#!/usr/bin/perl -w -T package MyPackage; use strict; use base qw(Net::Server); my $server = MyPackage->new({ key1 => val1, }); $server->run;

All five methods for passing arguments may be used at the same time. Once an argument has been set, it is not over written if another method passes the same argument. Net::Server will look for arguments in the following order:

1) Arguments passed to the C<new> method. 2) Arguments passed on command line. 3) Arguments passed to the C<run> method. 4) Arguments passed via a conf file. 5) Arguments set in the C<default_values> method.

Additionally the following hooks are available:

1) Arguments set in the configure_hook (occurs after new but before any of the other areas are checked). 2) Arguments set and validated in the post_configure_hook (occurs after all of the other areas are checked).

Each of these levels will override parameters of the same name specified in subsequent levels. For example, specifying –setsid=0 on the command line will override a value of setsid 1 in the conf file.

Note that the configure_hook method doesn’t return values to set, but is there to allow for setting up configured values before the configure method is called.

Key/value pairs used by the server are removed by the configuration process so that server layers on top of Net::Server can pass and read their own parameters.

ADDING CUSTOM ARGUMENTS

It is possible to add in your own custom parameters to those parsed by Net::Server. The following code shows how this is done:

sub options { my $self = shift; my $prop = $self->{server}; my $template = shift; # setup options in the parent classes $self->SUPER::options($template); # add a single value option $prop->{my_option} ||= undef; $template->{my_option} = \ $prop->{my_option}; # add a multi value option $prop->{an_arrayref_item} ||= []; $template->{an_arrayref_item} = $prop->{an_arrayref_item}; }

Overriding the options method allows for adding your own custom fields. A template hashref is passed in, that should then be modified to contain an of your custom fields. Fields which are intended to receive a single scalar value should have a reference to the destination scalar given. Fields which are intended to receive multiple values should reference the corresponding destination arrayref.

You are responsible for validating your custom options once they have been parsed. The post_configure_hook is a good place to do your validation.

Some emails have asked why we use this template method. The idea is that you are creating the data structure to store the values in, and you are also creating a way to get the values into the data structure. The template is the way to get the values to the servers data structure. One of the possibilities (that probably isn’t used that much) is that by letting you specify the mapping, you could build a nested data structure - even though the passed in arguments are flat. It also allows you to setup aliases to your names.

For example, a basic structure might look like this:

$prop = $self->{server} $prop->{my_custom_option} ||= undef; $prop->{my_custom_array} ||= []; $template = { my_custom_option => \ $prop->{my_custom_option}, mco => \ $prop->{my_custom_option}, # alias my_custom_array => $prop->{my_custom_array}, mca => $prop->{my_custom_array}, # an alias }; $template->{mco2} = $template->{mco}; # another way to alias

But you could also have more complex data:

$prop = $self->{server}; $prop->{one_layer} = { two_layer => [ undef, undef, ], }; $template = { param1 => \ $prop->{one_layer}->{two_layer}->[0], param2 => \ $prop->{one_layer}->{two_layer}->[1], };

This is of course a contrived example - but it does show that you can get the data from the flat passed in arguments to whatever type of structure you need - with only a little bit of effort.

DEFAULT ARGUMENTS FOR Net::Server

The following arguments are available in the default Net::Server or Net::Server::Single modules. (Other personalities may use additional parameters and may optionally not use parameters from the base class.)

Key Value Default conf_file “filename” undef log_level 0-4 2 log_file (filename|Sys::Syslog |Log::Log4perl) undef log_function undef port \d+ 20203 host “host” “*” ipv (4|6|*) * proto (tcp|udp|unix) “tcp” listen \d+ SOMAXCONN ipv6_package (IO::Socket::INET6 IO::Socket::IP |IO::Socket::IP) ## syslog parameters (if log_file eq Sys::Syslog) syslog_logsock (native|unix|inet|udp |tcp|stream|console) unix (on Sys::Syslog < 0.15) syslog_ident “identity” “net_server” syslog_logopt (cons|ndelay|nowait|pid) pid syslog_facility \w+ daemon reverse_lookups (1|double|double-debug) undef double_reverse_lookups (1|debug|autofail) undef allow /regex/ none deny /regex/ none cidr_allow CIDR none cidr_deny CIDR none ## daemonization parameters pid_file “filename” undef chroot “directory” undef user (uid|username) “nobody” group (gid|group) “nobody” background 1 undef setsid 1 undef no_close_by_child (1|undef) undef ## See Net::Server::Proto::(TCP|UDP|UNIX|SSL|SSLeay|etc) ## for more sample parameters.

conf_file
Filename from which to read additional key value pair arguments for starting the server. Default is undef. There are two ways that you can specify a default location for a conf_file. The first is to pass the default value to the run method as in: MyServer->run({ conf_file => /etc/my_server.conf, }); If the end user passes in –conf_file=/etc/their_server.conf then the value will be overridden. The second way to do this was added in the 0.96 version. It uses the default_values method as in: sub default_values { return { conf_file => /etc/my_server.conf, } } This method has the advantage of also being able to be overridden in the run method. If you do not want the user to be able to specify a conf_file at all, you can pass conf_file to the new method when creating your object: MyServer->new({ conf_file => /etc/my_server.conf, })->run; If passed this way, the value passed to new will win over any of the other passed in values.

log_level
Ranges from 0 to 4 in level. Specifies what level of error will be logged. O means logging is off. 4 means very verbose. These levels should be able to correlate to syslog levels. Default is 2. These levels correlate to syslog levels as defined by the following key/value pairs: 0=>’err’, 1=>‘warning’, 2=>’notice’, 3=>‘info’, 4=>‘debug’.

log_file
Name of log file or log subsystem to be written to. If no name is given and the write_to_log_hook is not overridden, log goes to STDERR. Default is undef. The log_file may also be the name of a Net::Server pluggable logging class. Net::Server is packaged with Sys::Syslog and Log::Log4perl. If the log_file looks like a module name, it will have Net::Server::Log:: added to the front and it will then be required. The package should provide an initialize class method that returns a single function which will be used for logging. This returned function will be passed log_level, and message. If the magic name Sys::Syslog is used, all logging will take place via the Net::Server::Log::Sys::Syslog module. If syslog is used the parameters syslog_logsock, syslog_ident, and syslog_logopt,and syslog_facility may also be defined. See Net::Server::Log::Sys::Syslog. If the magic name Log::Log4perl is used, all logging will be directed to the Log4perl system. If used, the log4perl_conf, log4perl_poll, log4perl_logger may also be defined. See Net::Server::Log::Log::Log4per. If a log_file is given or if setsid is set, STDIN and STDOUT will automatically be opened to /dev/null and STDERR will be opened to STDOUT. This will prevent any output from ending up at the terminal.

log_function
Can take a coderef or method name to call when a log event occurs. Will be passed the level of the log message and the log message. Note that functions depending upon stdout will not function during process_request in situations where the tie_stdout is set (such as during Net::Server::HTTP).

pid_file
Filename to store pid of parent process. Generally applies only to forking servers. Default is none (undef).

port
See Net::Server::Proto for further examples of configuration. Local port/socket on which to bind. If it is a low port, the process must start as root. If multiple ports are given, all will be bound at server startup. May be of the form host:port/proto, host:port/proto/ipv, host:port, port/proto, or port, where host represents a hostname residing on the local box, where port represents either the number of the port (eg. 80) or the service designation (eg. http), where ipv represents the IP protocol version (IPv4 or IPv6 or IPv*) and where proto represents the protocol to be used. See Net::Server::Proto. The following are some valid port strings: 20203 # port only localhost:20203 # host and port localhost:http # localhost bound to port 80 localhost:20203/tcp # host, port, protocol localhost:20203/tcp/IPv* # host, port, protocol and family localhost, 20203, tcp, IPv* # same localhost | 20203 | tcp | IPv* # same localhost:20203/IPv* # bind any configured interfaces for IPv4 or 6 (default) localhost:20203/IPv4/IPv6 # bind localhost on IPv4 and 6 (fails if it cannot do both) *:20203 # bind all local interfaces Additionally, when passed in the code (non-commandline, and non-config), the port may be passed as a hashref or array hashrefs of information: port => { host => localhost, port => 20203, ipv => 6, # IPv6 only proto => udp, # UDP protocol } port => [{ host => *, port => 20203, ipv => 4, # IPv4 only proto => tcp, # (default) }, { host => localhost, port => 20204, ipv => *, # default - all IPv4 and IPv6 interfaces tied to localhost proto => ssleay, # or ssl - Using SSL }], An explicit host given in a port specification overrides a default binding address (a host setting, see below). The host part may be enclosed in square brackets, but when it is a numerical IPv6 address it should be enclosed in square brackets to avoid ambiguity in parsing a port number, e.g.: [::1]:80. However you could also use pipes, white space, or commas to separate these. Note that host and port number must come first. If the protocol is not specified, proto will default to the proto specified in the arguments. If proto is not specified there it will default to tcp. If host is not specified, host will default to host specified in the arguments. If host is not specified there it will default to *. Default port is 20203. Configuration passed to new or run may be either a scalar containing a single port number or an arrayref of ports. If ipv is not specified it will default to * (Any resolved addresses under IPv4 or IPv6). If you are working with unix sockets, you may also specify socket_file|unix or socket_file|type|unix where type is SOCK_DGRAM or SOCK_STREAM. On systems that support it, a port value of 0 may be used to ask the OS to auto-assign a port. The value of the auto-assigned port will be stored in the NS_port property of the Net::Server::Proto::TCP object and is also available in the sockport method. When the server is processing a request, the $self->{server}->{sockport} property contains the port that was connected through.

host
Local host or addr upon which to bind port. If a value of ‘*’ is given, the server will bind that port on all available addresses on the box. The host argument provides a default local host address if the port argument omits a host specification. See Net::Server::Proto. See IO::Socket. Configuration passed to new or run may be either a scalar containing a single host or an arrayref of hosts - if the hosts array is shorter than the ports array, the last host entry will be used to augment the hosts array to the size of the ports array. If an IPv4 address is passed, an IPv4 socket will be created. If an IPv6 address is passed, an IPv6 socket will be created. If a hostname is given, Net::Server will look at the value of ipv (default IPv4) to determine which type of socket to create. Optionally the ipv specification can be passed as part of the hostname. host => “127.0.0.1”, # an IPv4 address host => “::1”, # an IPv6 address host => localhost, # addresses matched by localhost (default any IPv4 and/or IPv6) host => localhost/IPv*, # same ipv => 6, host => localhost, # addresses matched by localhost (IPv6) ipv => 4, host => localhost, # addresses matched by localhost (IPv4) ipv => IPv4 IPv6, host => localhost, # addresses matched by localhost (requires IPv6 and IPv4) host => *, # any local interfaces (any IPv6 or IPv4) host => */IPv*, # same (any IPv6 or IPv4) ipv => 4, host => *, # any local IPv4 interfaces

proto
See Net::Server::Proto. Protocol to use when binding ports. See IO::Socket. As of release 2.0, Net::Server supports tcp, udp, and unix, unixdgram, ssl, and ssleay. Other types will need to be added later (or custom modules extending the Net::Server::Proto class may be used). Configuration passed to new or run may be either a scalar containing a single proto or an arrayref of protos - if the protos array is shorter than the ports array, the last proto entry will be used to augment the protos array to the size of the ports array. Additionally the proto may also contain the ipv specification.

ipv (IPv4 and IPv6)
See Net::Server::Proto. IPv6 is now available under Net::Server. It will be used automatically if an IPv6 address is passed, or if the ipv is set explicitly to IPv6, or if ipv is left as the default value of IPv*. This is a significant change from version 2.004 and earlier where the default value was IPv4. However, the previous behavior led to confusion on IPv6 only hosts, and on hosts that only had IPv6 entries for a local hostname. Trying to pass an IPv4 address when ipv is set to 6 (only 6 - not * or 4) will result in an error. localhost:20203 # will use IPv6 if there is a corresponding entry for localhost # it will also use IPv4 if there is a corresponding v4 entry for localhost localhost:20203:IPv* # same (default) localhost:20203:IPv6 # will use IPv6 [::1]:20203 # will use IPv6 (IPv6 style address) localhost:20203:IPv4 # will use IPv4 127.0.0.1:20203 # will use IPv4 (IPv4 style address localhost:20203:IPv4:IPv6 # will bind to both v4 and v6 - fails otherwise # or as a hashref as port => { host => “localhost”, ipv => 6, # only binds IPv6 } port => { host => “localhost”, ipv => 4, # only binds IPv4 } port => { host => “::1”, ipv => “IPv6”, # same as passing “6” } port => { host => “localhost/IPv*”, # any IPv4 or IPv6 } port => { host => “localhost IPv4 IPv6”, # must create both } In many proposed Net::Server solutions, IPv* was enabled by default. For versions 2.000 through 2.004, the previous default of IPv4 was used. We have attempted to make it easy to set IPv4, IPv6, or IPv*. If you do not want or need IPv6, simply set ipv to 4, pass IPv4 along in the port specification, set $ENV{‘IPV’}=4; before running the server, set $ENV{‘NO_IPV6’}, or uninstall IO::Socket::IP and/or IO::Socket::INET6. On my local box the following command results in the following output: perl -e use base qw(Net::Server); main->run(host => “localhost”) Resolved [localhost]:20203 to [::1]:20203, IPv6 Resolved [localhost]:20203 to [127.0.0.1]:20203, IPv4 Binding to TCP port 20203 on host ::1 with IPv6 Binding to TCP port 20203 on host 127.0.0.1 with IPv4 My local box has IPv6 enabled and there are entries for localhost on both IPv6 ::1 and IPv4 127.0.0.1. I could also choose to explicitly bind ports rather than depending upon ipv => * to resolve them for me as in the following: perl -e use base qw(Net::Server); main->run(port => [20203,20203], host => “localhost”, ipv => [4,6]) Binding to TCP port 20203 on host localhost with IPv4 Binding to TCP port 20203 on host localhost with IPv6 There is a special case of using host => * as well as ipv => *. The Net::Server::Proto::_bindv6only method is used to check the system setting for sysctl -n net.ipv6.bindv6only (or net.inet6.ip6.v6only). If this setting is false, then an IPv6 socket will listen for the corresponding IPv4 address. For example the address [::] (IPv6 equivalent of INADDR_ANY) will also listen for 0.0.0.0. The address ::FFFF:127.0.0.1 (IPv6) would also listen to 127.0.0.1 (IPv4). In this case, only one socket will be created because it will handle both cases (an error is returned if an attempt is made to listen to both addresses when bindv6only is false). However, if net.ipv6.bindv6only (or equivalent) is true, then a hostname (such as *) resolving to both a IPv4 entry as well as an IPv6 will result in both an IPv4 socket as well as an IPv6 socket. On my linux box which defaults to net.ipv6.bindv6only=0, the following is output. perl -e use base qw(Net::Server); main->run(host => “*”) Resolved [*]:8080 to [::]:8080, IPv6 Not including resolved host [0.0.0.0] IPv4 because it will be handled by [::] IPv6 Binding to TCP port 8080 on host :: with IPv6 If I issue a sudo /sbin/sysctl -w net.ipv6.bindv6only=1, the following is output. perl -e use base qw(Net::Server); main->run(host => “*”) Resolved [*]:8080 to [0.0.0.0]:8080, IPv4 Resolved [*]:8080 to [::]:8080, IPv6 Binding to TCP port 8080 on host 0.0.0.0 with IPv4 Binding to TCP port 8080 on host :: with IPv6 BSD differs from linux and generally defaults to net.inet6.ip6.v6only=0. If it cannot be determined on your OS, it will default to false and the log message will change from it will be handled to it should be handled (if you have a non-resource intensive way to check on your platform, feel free to email me). Be sure to check the logs as you test your server to make sure you have bound the ports you desire. You can always pass in individual explicit IPv4 and IPv6 port specifications if you need. For example, if your system has both IPv4 and IPv6 interfaces but you’d only like to bind to IPv6 entries, then you should use a hostname of [::] instead of [*]. If bindv6only (or equivalent) is false, and you receive an IPv4 connection on a bound IPv6 port, the textual representation of the peer’s IPv4 address will typically be in a form of an IPv4-mapped IPv6 addresses, e.g. ::FFFF:127.0.0.1 . The ipv parameter was chosen because it does not conflict with any other existing usage, it is very similar to ipv4 or ipv6, it allows for user code to not need to know about Socket::AF_INET or Socket6::AF_INET6 or Socket::AF_UNSPEC, and it is short.

listen
See IO::Socket. Not used with udp protocol (or UNIX SOCK_DGRAM).

ipv6_package
Net::Server::Proto will try to determine the appropriate socket class to use if a v6 socket is needed. It will default to trying IO::Socket::IP first, and then IO::Socket::INET6. Specifying this package allows for a specific package to be used (note that IO::Socket::SSL used by Proto::SSL does its own ipv6 socket package determination).

reverse_lookups
Specify whether to lookup the hostname of the connected IP. Information is cached in server object under peerhost property. Default is to not use reverse_lookups (undef). Can be set to the values double, double-detail, double-autofail, or double-debug to set double_reverse_lookups.

double_reverse_lookups
If set, also sets reverse_lookups. Same as setting reverse_lookups to double. Looks up the IPs that the hostname resolves to to make sure the connection ip is one of those ips. Sets peerhost_rev as a hashref of ip addresses the name resolved to during get_client_info. If double_reverse_lookups is set, the double_reverse_lookup method is called during the allow_deny method. The double_reverse_lookup method is passed: addr - the IPv4 or IPv6 address host - the hostname the addr resolved to addrs - the hashref of ip addresses the host resolved to orig - the original unfiltered addr Makes allow_deny return false if there is no hostname, no reverse ips, or if one of the ip addrs does not match the connection ip addr. Sends a log level 3 message. Can set double_reverse_lookups to one of the following to adjust logging: detail - add addrs to the failure messages autofail - fail on every connection and log debug - log address information (but not fail) for successful connections The following one liners can help with debugging: net-server HTTP –reverse_lookups=double-debug –log_level=3 # curl localhost:8080 in other window 2022/11/30-22:16:45 CONNECT TCP Peer: “[::ffff:127.0.0.1]:44766” (localhost) Local: “[::ffff:127.0.0.1]:8080” 2022/11/30-22:16:45 Double reverse debug: addr: 127.0.0.1, host: localhost, addrs: (127.0.0.1), orig_addr: ::ffff:127.0.0.1 The double_reverse_lookup is called before running any allow/deny rules.

allow/deny
May be specified multiple times. Contains regex to compare to incoming peeraddr or peerhost (if reverse_lookups has been enabled). If allow or deny options are given, the incoming client must match an allow and not match a deny or the client connection will be closed. Defaults to empty array refs.

cidr_allow/cidr_deny
May be specified multiple times. Contains a CIDR block to compare to incoming peeraddr. If cidr_allow or cidr_deny options are given, the incoming client must match a cidr_allow and not match a cidr_deny or the client connection will be closed. Defaults to empty array refs.

chroot
Directory to chroot to after bind process has taken place and the server is still running as root. Defaults to undef.

user
Userid or username to become after the bind process has occurred. Defaults to nobody. If you would like the server to run as root, you will have to specify user equal to root.

group
Groupid or groupname to become after the bind process has occurred. Defaults to nobody. If you would like the server to run as root, you will have to specify group equal to root.

background
Specifies whether or not the server should fork after the bind method to release itself from the command line. Defaults to undef. Process will also background if setsid is set.

setsid
Specifies whether or not the server should fork after the bind method to release itself from the command line and then run the POSIX::setsid() command to truly daemonize. Defaults to undef. If a log_file is given or if setsid is set, STDIN and STDOUT will automatically be opened to /dev/null and STDERR will be opened to STDOUT. This will prevent any output from ending up at the terminal.

no_close_by_child
Boolean. Specifies whether or not a forked child process has permission or not to shutdown the entire server process. If set to 1, the child may NOT signal the parent to shutdown all children. Default is undef (not set).

no_client_stdout
Boolean. Default undef (not set). Specifies that STDIN and STDOUT should not be opened on the client handle once a connection has been accepted. By default the Net::Server will open STDIN and STDOUT on the client socket making it easier for many types of scripts to read directly from and write directly to the socket using normal print and read methods. Disabling this is useful on clients that may be opening their own connections to STDIN and STDOUT. This option has no affect on STDIN and STDOUT which has a magic client property that is tied to the already open STDIN and STDOUT.

leave_children_open_on_hup
Boolean. Default undef (not set). If set, the parent will not attempt to close child processes if the parent receives a SIG HUP. The parent will rebind the open port and begin tracking a fresh set of children. Children of a Fork server will exit after their current request. Children of a Prefork type server will finish the current request and then exit. Note - the newly restarted parent will start up a fresh set of servers on fork servers. The new parent will attempt to keep track of the children from the former parent but custom communication channels (open pipes from the child to the old parent) will no longer be available to the old child processes. New child processes will still connect properly to the new parent.

sig_passthrough
Default none. Allow for passing requested signals through to children. Takes a single signal name, a comma separated list of names, or an arrayref of signal names. It first sends the signals to the children before calling any currently registered signal by that name.

tie_client_stdout
Default undef. If set will use Net::Server::TiedHandle tied interface for STDIN and STDOUT. This interface allows SSL and SSLEAY to work. It also allows for intercepting read and write via the tied_stdin_callback and tied_stdout_callback.

tied_stdin_callback
Default undef. Called during a read of STDIN data if tie_client_stdout has been set, or if the client handle’s tie_stdout method returns true. It is passed the client connection, the name of the method that would be called, and the arguments that are being passed. The callback is then responsible for calling that method on the handle or for performing some other input operation.

tied_stdout_callback
Default undef. Called during a write of data to STDOUT if tie_client_stdout has been set, or if the client handle’s tie_stdout method returns true. It is passed the client connection, the name of the method that would be called, and the arguments that are being passed. The callback is then responsible for calling that method on the handle or for performing some other output operation.

PROPERTIES

All of the ARGUMENTS listed above become properties of the server object under the same name. These properties, as well as other internal properties, are available during hooks and other method calls.

The structure of a Net::Server object is shown below:

$self = bless({ server => { key1 => val1, # more key/vals }, }, Net::Server);

This structure was chosen so that all server related properties are grouped under a single key of the object hashref. This is so that other objects could layer on top of the Net::Server object class and still have a fairly clean namespace in the hashref.

You may get and set properties in two ways. The suggested way is to access properties directly via

my $val = $self->{server}->{key1};

Accessing the properties directly will speed the server process - though some would deem this as bad style. A second way has been provided for object oriented types who believe in methods. The second way consists of the following methods:

my $val = $self->get_property( key1 ); my $self->set_property( key1 => val1 );

Properties are allowed to be changed at any time with caution (please do not undef the sock property or you will close the client connection).

CONFIGURATION FILE

Net::Server allows for the use of a configuration file to read in server parameters. The format of this conf file is simple key value pairs. Comments and blank lines are ignored.

#————– file test.conf ————– ### user and group to become user somebody group everybody # logging ? log_file /var/log/server.log log_level 3 pid_file /tmp/server.pid # optional syslog directive # used in place of log_file above #log_file Sys::Syslog #syslog_logsock unix #syslog_ident myserver #syslog_logopt pid|cons # access control allow .+(net|com) allow domain\com deny a.+ cidr_allow 127.0.0.0/8 cidr_allow 192.0.2.0/24 cidr_deny 192.0.2.4/30 # background the process? background 1 # ports to bind (this should bind # 127.0.0.1:20205 on IPv6 and # localhost:20204 on IPv4) # See Net::Server::Proto host 127.0.0.1 ipv IPv6 port localhost:20204/IPv4 port 20205 # reverse lookups ? # reverse_lookups on #————– file test.conf ————–

PROCESS FLOW

The process flow is written in an open, easy to override, easy to hook, fashion. The basic flow is shown below. This is the flow of the $self->run method.

$self->configure_hook; $self->configure(@_); $self->post_configure; $self->post_configure_hook; $self->pre_bind; $self->bind; $self->post_bind_hook; $self->post_bind; $self->pre_loop_hook; $self->loop; ### routines inside a standard $self->loop # $self->accept; # $self->run_client_connection; # $self->done; $self->pre_server_close_hook; $self->server_close;

The server then exits.

During the client processing phase ($self->run_client_connection), the following represents the program flow:

$self->post_accept; $self->get_client_info; $self->post_accept_hook; if ($self->allow_deny && $self->allow_deny_hook) { $self->process_request; } else { $self->request_denied_hook; } $self->post_process_request_hook; $self->post_process_request; $self->post_client_connection_hook;

The allow_deny method calls $self->double_reverse_lookup if double_reverse_lookups are enabled.

The process then loops and waits for the next connection. For a more in depth discussion, please read the code.

During the server shutdown phase ($self->server_close), the following represents the program flow:

$self->close_children; # if any $self->post_child_cleanup_hook; if (Restarting server) { $self->restart_close_hook(); $self->hup_server; } $self->shutdown_sockets; $self->server_exit;

MAIN SERVER METHODS

“$self->run”
This method incorporates the main process flow. This flow is listed above. The method run may be called in any of the following ways. MyPackage->run(port => 20201); MyPackage->new({port => 20201})->run; my $obj = bless {server=>{port => 20201}}, MyPackage; $obj->run; The ->run method should typically be the last method called in a server start script (the server will exit at the end of the ->run method).

“$self->configure”
This method attempts to read configurations from the commandline, from the run method call, or from a specified conf_file (the conf_file may be specified by passed in parameters, or in the default_values). All of the configured parameters are then stored in the {server} property of the Server object.

“$self->post_configure”
The post_configure hook begins the startup of the server. During this method running server instances are checked for, pid_files are created, log_files are created, Sys::Syslog is initialized (as needed), process backgrounding occurs and the server closes STDIN and STDOUT (as needed).

“$self->pre_bind”
This method is used to initialize all of the socket objects used by the server.

“$self->bind”
This method actually binds to the initialized sockets (or rebinds if the server has been HUPed).

“$self->post_bind”
During this method privileges are dropped. The INT, TERM, and QUIT signals are set to run server_close. Sig PIPE is set to IGNORE. Sig CHLD is set to sig_chld. And sig HUP is set to call sig_hup. Under the Fork, PreFork, and PreFork simple personalities, these signals are registered using Net::Server::SIG to allow for safe signal handling.

“$self->loop”
During this phase, the server accepts incoming connections. The behavior of how the accepting occurs and if a child process handles the connection is controlled by what type of Net::Server personality the server is using. Net::Server and Net::Server single accept only one connection at a time. Net::Server::INET runs one connection and then exits (for use by inetd or xinetd daemons). Net::Server::MultiPlex allows for one process to simultaneously handle multiple connections (but requires rewriting the process_request code to operate in a more packet-like manner). Net::Server::Fork forks off a new child process for each incoming connection. Net::Server::PreForkSimple starts up a fixed number of processes that all accept on incoming connections. Net::Server::PreFork starts up a base number of child processes which all accept on incoming connections. The server throttles the number of processes running depending upon the number of requests coming in (similar to concept to how Apache controls its child processes in a PreFork server). Read the documentation for each of the types for more information.

“$self->server_close”
This method is called once the server has been signaled to end, or signaled for the server to restart (via HUP), or the loop method has been exited. This method takes care of cleaning up any remaining child processes, setting appropriate flags on sockets (for HUPing), closing up logging, and then closing open sockets. Can optionally be passed an exit value that will be passed to the server_exit call.

“$self->server_exit”
This method is called at the end of server_close. It calls exit, but may be overridden to do other items. At this point all services should be shut down. Can optionally be passed an exit value that will be passed to the exit call.

MAIN CLIENT CONNECTION METHODS

“$self->run_client_connection”
This method is run after the server has accepted and received a client connection. The full process flow is listed above under PROCESS FLOWS. This method takes care of handling each client connection.

“$self->post_accept”
This method opens STDIN and STDOUT to the client socket. This allows any of the methods during the run_client_connection phase to print directly to and read directly from the client socket.

“$self->get_client_info”
This method looks up information about the client connection such as ip address, socket type, and hostname (as needed). Sets the following in $self->{‘server’} (note that these names do not necessarily correspond to the names of the IO::Socket:: libraries): sockaddr - Human IP address that was connected to sockport - Local port that was connected to peeraddr - Human IP address of the remote source (either IPv6 or IPv4) peerport - Source port of the connection peerhost - IP Address resolved to hostname (if possible) peerhost_rev - Hashref of ips of the reverse lookup of the peerhost - only set if double_reverse_lookups

“$self->allow_deny”
This method uses the rules defined in the allow and deny configuration parameters to determine if the ip address should be accepted.

“$self->double_reverse_lookup”
Called if the double_reverse_lookups value is set or reverse_lookups is set to double. Uses peerhost_rev hashref ips to verify that the connection ip is valid for the hostname. See the double_reverse_lookups configuration.

“$self->process_request”
This method is intended to handle all of the client communication. At this point STDIN and STDOUT are opened to the client, the ip address has been verified. The server can then interact with the client connection according to whatever API or protocol the server is implementing. Note that the stub implementation uses STDIN and STDOUT and will not work if the no_client_stdout flag is set. This is the main method to override. The default method implements a simple echo server that will repeat whatever is sent. It will quit the child if quit is sent, and will exit the server if exit is sent. As of version 2.000, the client handle is passed as an argument.

“$self->post_process_request”
This method is used to clean up the client connection and to handle any parent/child accounting for the forking servers.

HOOKS

Net::Server provides a number of hooks allowing for servers layered on top of Net::Server to respond at different levels of execution without having to SUPER class the main built-in methods. The placement of the hooks can be seen in the PROCESS FLOW section.

Almost all of the default hook methods do nothing. To use a hook you simply need to override the method in your subclass. For example to add your own post_configure_hook you could do something like the following:

package MyServer; sub post_configure_hook { my $self = shift; my $prop = $self->{server}; # do some validation here }

The following describes the hooks available in the plain Net::Server class (other flavors such as Fork or PreFork have additional hooks).

“$self->configure_hook()”
This hook takes place immediately after the ->run() method is called. This hook allows for setting up the object before any built in configuration takes place. This allows for custom configurability.

“$self->post_configure_hook()”
This hook occurs just after the reading of configuration parameters and initiation of logging and pid_file creation. It also occurs before the ->pre_bind() and ->bind() methods are called. This hook allows for verifying configuration parameters.

“$self->post_bind_hook()”
This hook occurs just after the bind process and just before any chrooting, change of user, or change of group occurs. At this point the process will still be running as the user who started the server.

“$self->pre_loop_hook()”
This hook occurs after chroot, change of user, and change of group has occurred. It allows for preparation before looping begins.

“$self->can_read_hook()”
This hook occurs after a socket becomes readable on an accept_multi_port request (accept_multi_port is used if there are multiple bound ports to accept on, or if the multi_port configuration parameter is set to true). This hook is intended to allow for processing of arbitrary handles added to the IO::Select used for the accept_multi_port. These handles could be added during the post_bind_hook. No internal support is added for processing these handles or adding them to the IO::Socket. Care must be used in how much occurs during the can_read_hook as a long response time will result in the server being susceptible to DOS attacks. A return value of true indicates that the Server should not pass the readable handle on to the post_accept and process_request phases. It is generally suggested that other avenues be pursued for sending messages via sockets not created by the Net::Server.

“$self->post_accept_hook()”
This hook occurs after a client has connected to the server. At this point STDIN and STDOUT are mapped to the client socket. This hook occurs before the processing of the request.

“$self->allow_deny_hook()”
This hook allows for the checking of ip and host information beyond the $self->allow_deny() routine. If this hook returns 1, the client request will be processed, otherwise, the request will be denied processing. As of version 2.000, the client connection is passed as an argument.

“$self->request_denied_hook()”
This hook occurs if either the $self->allow_deny() or $self->allow_deny_hook() have taken place.

“$self->post_process_request_hook()”
This hook occurs after the processing of the request, but before the client connection has been closed.

“$self->post_client_connection_hook”
This is one final hook that occurs at the very end of the run_client_connection method. At this point all other methods and hooks that will run during the run_client_connection have finished and the client connection has already been closed. item $self->other_child_died_hook($pid) Net::Server takes control of signal handling and child process cleanup; this makes it difficult to tell when a child process terminates if that child process was not started by Net::Server itself. If Net::Server notices another child process dying that it did not start, it will fire this hook with the PID of the terminated process.

“$self->pre_server_close_hook()”
This hook occurs before the server begins shutting down.

“$self->write_to_log_hook”
This hook handles writing to log files. The default hook is to write to STDERR, or to the filename contained in the parameter log_file. The arguments passed are a log level of 0 to 4 (4 being very verbose), and a log line. If log_file is equal to Sys::Syslog, then logging will go to Sys::Syslog and will bypass the write_to_log_hook.

“$self->fatal_hook”
This hook occurs when the server has encountered an unrecoverable error. Arguments passed are the error message, the package, file, and line number. The hook may close the server, but it is suggested that it simply return and use the built in shut down features.

“$self->post_child_cleanup_hook”
This hook occurs in the parent server process after all children have been shut down and just before the server either restarts or exits. It is intended for additional cleanup of information. At this point pid_files and lockfiles still exist.

“$self->restart_open_hook”
This hook occurs if a server has been HUPed (restarted via the HUP signal. It occurs just before reopening to the filenos of the sockets that were already opened.

“$self->restart_close_hook”
This hook occurs if a server has been HUPed (restarted via the HUP signal. It occurs just before restarting the server via exec.

“$self->child_init_hook()”
This hook is called during the forking servers. It is also called during run_dequeue. It runs just after the fork and after signals have been cleaned up. If it is a dequeue process, the string ‘dequeue’ will be passed as an argument. If your child processes will be needing random numbers, this hook is a good location to initialize srand (forked processes maintain the same random seed unless changed). sub child_init_hook { # from perldoc -f srand srand(time ^ $$ ^ unpack “%L*”, `ps axww | gzip -f`); }

“$self->pre_fork_hook()”
Similar to the child_init_hook, but occurs just before the fork.

“$self->register_child($pid, $type)”
Called by parent process when a child has been forked. Type will be one of dequeue, fork, prefork, or preforksimple depending on where the child was created.

“$self->child_finish_hook()”
Similar to the child_init_hook, but ran when the forked process is about to finish up.

OTHER METHODS

“$self->default_values”
Allow for returning configuration values that will be used if no other value could be found. Should return a hashref. sub default_values { return { port => 20201, }; }

“$self->handle_syslog_error”
Called when log_file is set to ‘Sys::Syslog’ and an error occurs while writing to the syslog. It is passed two arguments, the value of $@, and an arrayref containing the arguments that were passed to the log method when the error occurred.

“$self->log”
Parameters are a log_level and a message. If log_level is set to ‘Sys::Syslog’, the parameters may alternately be a log_level, a format string, and format string parameters. (The second parameter is assumed to be a format string if additional arguments are passed along). Passing arbitrary format strings to Sys::Syslog will allow the server to be vulnerable to exploit. The server maintainer should make sure that any string treated as a format string is controlled. # assuming log_file = Sys::Syslog $self->log(1, “My Message with %s in it”); # sends “%s”, “My Message with %s in it” to syslog $self->log(1, “My Message with %s in it”, “Foo”); # sends “My Message with %s in it”, “Foo” to syslog If log_file is set to a file (other than Sys::Syslog), the message will be appended to the log file by calling the write_to_log_hook. If the log_file is Sys::Syslog and an error occurs during write, the handle_syslog_error method will be called and passed the error exception. The default option of handle_syslog_error is to die - but could easily be told to do nothing by using the following code in your subclassed server: sub handle_syslog_error {} It the log had been closed, you could attempt to reopen it in the error handler with the following code: sub handle_syslog_error { my $self = shift; $self->open_syslog; }

“$self->new”
As of Net::Server 0.91 there is finally a new method. This method takes a class name and an argument hashref as parameters. The argument hashref becomes the server property of the object. package MyPackage; use base qw(Net::Server); my $obj = MyPackage->new({port => 20201}); # same as my $obj = bless {server => {port => 20201}}, MyPackage;

“$self->open_syslog”
Called during post_configure when the log_file option is set to ‘Sys::Syslog’. By default it use the parsed configuration options listed in this document. If more custom behavior is desired, the method could be overridden and Sys::Syslog::openlog should be called with the custom parameters.

“$self->shutdown_sockets”
This method will close any remaining open sockets. This is called at the end of the server_close method.

RESTARTING

Each of the server personalities (except for INET), support restarting via a HUP signal (see kill -l). When a HUP is received, the server will close children (if any), make sure that sockets are left open, and re-exec using the same commandline parameters that initially started the server. (Note: for this reason it is important that @ARGV is not modified until ->run is called).

The Net::Server will attempt to find out the commandline used for starting the program. The attempt is made before any configuration files or other arguments are processed. The outcome of this attempt is stored using the method ->commandline. The stored commandline may also be retrieved using the same method name. The stored contents will undoubtedly contain Tainted items that will cause the server to die during a restart when using the -T flag (Taint mode). As it is impossible to arbitrarily decide what is taint safe and what is not, the individual program must clean up the tainted items before doing a restart.

sub configure_hook{ my $self = shift; ### see the contents my $ref = $self->commandline; use Data::Dumper; print Dumper $ref; ### arbitrary untainting - VERY dangerous my @untainted = map {/(.+)/;$1} @$ref; $self->commandline(\untainted) }

SHUTDOWN

Each of the Fork and PreFork personalities support graceful shutdowns via the QUIT signal. When a QUIT is received, the parent will signal the children and then wait for them to exit.

All server personalities support the normal TERM and INT signal shutdowns.

HOT DEPLOY

Since version 2.000, the Fork and PreFork personalities have accepted the TTIN and TTOU signals. When a TTIN is received, the max_servers is increased by 1. If a TTOU signal is received the max_servers is decreased by 1. This allows for adjusting the number of handling processes without having to restart the server.

If the log_level is set to at 3, then the new value is displayed in the logs.

FILES

The following files are installed as part of this distribution.

Net/Server.pm Net/Server/Fork.pm Net/Server/INET.pm Net/Server/MultiType.pm Net/Server/PreForkSimple.pm Net/Server/PreFork.pm Net/Server/Single.pm Net/Server/Daemonize.pm Net/Server/SIG.pm Net/Server/Proto.pm Net/Server/Proto/*.pm

INSTALL

Download and extract tarball before running these commands in its base directory:

perl Makefile.PL make make test make install

AUTHOR

Paul Seamons <paul at seamons.com>

THANKS

As we move to a github flow, please be sure to add yourself to the credits as patches are passed along (if you’d like to be mentioned).

Thanks to Rob Brown (bbb at cpan.org) for help with miscellaneous concepts such as tracking down the serialized select via flock ala Apache and the reference to IO::Select making multiport servers possible. And for researching into allowing sockets to remain open upon exec (making HUP possible).

Thanks to Jonathan J. Miner <miner at doit.wisc.edu> for patching a blatant problem in the reverse lookups.

Thanks to Bennett Todd <bet at rahul.net> for pointing out a problem in Solaris 2.5.1 which does not allow multiple children to accept on the same port at the same time. Also for showing some sample code from Viktor Duchovni which now represents the semaphore option of the serialize argument in the PreFork server.

Thanks to traveler and merlyn from http://perlmonks.org for pointing me in the right direction for determining the protocol used on a socket connection.

Thanks to Jeremy Howard <j+daemonize at howard.fm> for numerous suggestions and for work on Net::Server::Daemonize.

Thanks to Vadim <vadim at hardison.net> for patches to implement parent/child communication on PreFork.pm.

Thanks to Carl Lewis for suggesting - in user names.

Thanks to Slaven Rezic for suggesting Reuse => 1 in Proto::UDP.

Thanks to Tim Watt for adding udp_broadcast to Proto::UDP.

Thanks to Christopher A Bongaarts for pointing out problems with the Proto::SSL implementation that currently locks around the socket accept and the SSL negotiation. See Net::Server::Proto::SSL.

Thanks to Alessandro Zummo for pointing out various bugs including some in configuration, commandline args, and cidr_allow.

Thanks to various other people for bug fixes over the years. These and future thank-you’s are available in the Changes file as well as CVS comments.

Thanks to Ben Cohen and tye (on Permonks) for finding and diagnosing more correct behavior for dealing with re-opening STDIN and STDOUT on the client handles.

Thanks to Mark Martinec for trouble shooting other problems with STDIN and STDOUT (he proposed having a flag that is now the no_client_stdout flag).

Thanks to David (DSCHWEI) on cpan for asking for the nofatal option with syslog.

Thanks to Andreas Kippnick and Peter Beckman for suggesting leaving open child connections open during a HUP (this is now available via the leave_children_open_on_hup flag).

Thanks to LUPE on cpan for helping patch HUP with taint on.

Thanks to Michael Virnstein for fixing a bug in the check_for_dead section of PreFork server.

Thanks to Rob Mueller for patching PreForkSimple to only open lock_file once during parent call. This patch should be portable on systems supporting flock. Rob also suggested not closing STDIN/STDOUT but instead reopening them to /dev/null to prevent spurious warnings. Also suggested short circuit in post_accept if in UDP. Also for cleaning up some of the child management code of PreFork.

Thanks to Mark Martinec for suggesting additional log messages for failure during accept.

Thanks to Bill Nesbitt and Carlos Velasco for pointing out double decrement bug in PreFork.pm (rt #21271)

Thanks to John W. Krahn for pointing out glaring precedence with non-parened open and ||.

Thanks to Ricardo Signes for pointing out setuid bug for perl 5.6.1 (rt #21262).

Thanks to Carlos Velasco for updating the Syslog options (rt #21265). And for additional fixes later.

Thanks to Steven Lembark for pointing out that no_client_stdout wasn’t working with the Multiplex server.

Thanks to Peter Beckman for suggesting allowing Sys::SysLog keywords be passed through the ->log method and for suggesting we allow more types of characters through in syslog_ident. Also to Peter Beckman for pointing out that a poorly setup localhost will cause tests to hang.

Thanks to Curtis Wilbar for pointing out that the Fork server called post_accept_hook twice. Changed to only let the child process call this, but added the pre_fork_hook method.

And just a general Thanks You to everybody who is using Net::Server or who has contributed fixes over the years.

Thanks to Paul Miller for some ->autoflush, FileHandle fixes.

Thanks to Patrik Wallstrom for suggesting handling syslog errors better.

Thanks again to Rob Mueller for more logic cleanup for child accounting in PreFork server.

Thanks to David Schweikert for suggesting handling setlogsock a little better on newer versions of Sys::Syslog (>= 0.15).

Thanks to Mihail Nasedkin for suggesting adding a hook that is now called post_client_connection_hook.

Thanks to Graham Barr for adding the ability to set the check_for_spawn and min_child_ttl settings of the PreFork server.

Thanks to Daniel Kahn Gillmor for adding the other_child_died_hook.

Thanks to Dominic Humphries for helping not kill pid files on HUP.

Thanks to Kristoffer Møllerhøj for fixing UDP on Multiplex.

Thanks to mishikal for patches for helping identify un-cleaned up children.

Thanks to rpkelly and tim@retout for pointing out error in header regex of HTTP.

Thanks to dmcbride for some basic HTTP parsing fixes, as well as for some broken tied handle fixes.

Thanks to Gareth for pointing out glaring bug issues with broken pipe and semaphore serialization.

Thanks to CATONE for sending the idea for arbitrary signal passing to children. (See the sig_passthrough option)

Thanks to intrigeri@boum for pointing out and giving code ideas for NS_port not functioning after a HUP.

Thanks to Sergey Zasenko for adding sysread/syswrite support to SSLEAY as well as the base test.

Thanks to mbarbon@users. for adding tally dequeue to prefork server.

Thanks to stefanos@cpan for fixes to PreFork under Win32

Thanks to Mark Martinec for much of the initial work towards getting IPv6 going.

Thanks to the munin developers and Nicolai Langfeldt for hosting the development version of Net::Server for so long and for fixes to the allow_deny checking for IPv6 addresses.

Thanks to Tatsuhiko Miyagawa for feedback, and for suggesting adding graceful shutdowns and hot deploy (max_servers adjustment).

Thanks to TONVOON@cpan for submitting a patch adding Log4perl functionality.

Thanks to Miko O’Sullivan for fixes to HTTP to correct tainting issues and passing initial log fixes, and for patches to fix CLOSE on tied stdout and various other HTTP issues.

Thanks to Emanuele <targeta> for a small patch releasing semaphores.

Thanks to Rob <hookbot> for daemonization fixes with zero pid file.

SEE ALSO

Please see also Net::Server::Fork, Net::Server::INET, Net::Server::PreForkSimple, Net::Server::PreFork, Net::Server::MultiType, Net::Server::Single Net::Server::HTTP

TODO

Improve test suite to fully cover code (using Devel::Cover). Anybody that wanted to send me patches to the t/*.t tests that improved coverage would earn a big thank you.

CODE REPOSITORY

https://github.com/rhandom/perl-net-server

AUTHOR

Paul Seamons <paul at seamons.com> http://seamons.com/ Rob Brown <bbb at cpan.org>

LICENSE

This package may be distributed under the terms of either the

GNU General Public License or the Perl Artistic License

All rights reserved.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1749 - Linux cli command versionsort

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command versionsort and provides detailed information about the command versionsort, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the versionsort.

NAME 🖥️ versionsort 🖥️

scan a directory for matching entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <dirent.h>
int scandir(const char *restrict dirp,
 struct dirent ***restrict namelist,
 int (*filter)(const struct dirent *),
 int (*compar)(const struct dirent **,
 const struct dirent **));
int alphasort(const struct dirent **a, const struct dirent **b);
int versionsort(const struct dirent **a, const struct dirent **b);
#include <fcntl.h> /* Definition of AT_* constants */
#include <dirent.h>
int scandirat(int dirfd, const char *restrict dirp,
 struct dirent ***restrict namelist,
 int (*filter)(const struct dirent *),
 int (*compar)(const struct dirent **,
 const struct dirent **));

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

scandir(), alphasort():

    /* Since glibc 2.10: */ _POSIX_C_SOURCE >= 200809L
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

versionsort():

    _GNU_SOURCE

scandirat():

    _GNU_SOURCE

DESCRIPTION

The scandir() function scans the directory dirp, calling filter() on each directory entry. Entries for which filter() returns nonzero are stored in strings allocated via malloc(3), sorted using qsort(3) with the comparison function compar(), and collected in array namelist which is allocated via malloc(3). If filter is NULL, all entries are selected.

The alphasort() and versionsort() functions can be used as the comparison function compar(). The former sorts directory entries using strcoll(3), the latter using strverscmp(3) on the strings (*a)->d_name and (*b)->d_name.

scandirat()

The scandirat() function operates in exactly the same way as scandir(), except for the differences described here.

If the pathname given in dirp is relative, then it is interpreted relative to the directory referred to by the file descriptor dirfd (rather than relative to the current working directory of the calling process, as is done by scandir() for a relative pathname).

If dirp is relative and dirfd is the special value AT_FDCWD, then dirp is interpreted relative to the current working directory of the calling process (like scandir()).

If dirp is absolute, then dirfd is ignored.

See openat(2) for an explanation of the need for scandirat().

RETURN VALUE

The scandir() function returns the number of directory entries selected. On error, -1 is returned, with errno set to indicate the error.

The alphasort() and versionsort() functions return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second.

ERRORS

EBADF
(scandirat()) dirp is relative but dirfd is neither AT_FDCWD nor a valid file descriptor.

ENOENT
The path in dirp does not exist.

ENOMEM
Insufficient memory to complete the operation.

ENOTDIR
The path in dirp is not a directory.

ENOTDIR
(scandirat()) dirp is a relative pathname and dirfd is a file descriptor referring to a file other than a directory.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

scandir(), scandirat()

Thread safetyMT-Safe

alphasort(), versionsort()

Thread safetyMT-Safe locale

STANDARDS

alphasort()
scandir()
POSIX.1-2008.

versionsort()
scandirat()
GNU.

HISTORY

alphasort()
scandir()
4.3BSD, POSIX.1-2008.

versionsort()
glibc 2.1.

scandirat()
glibc 2.15.

NOTES

Since glibc 2.1, alphasort() calls strcoll(3); earlier it used strcmp(3).

Before glibc 2.10, the two arguments of alphasort() and versionsort() were typed as const void *. When alphasort() was standardized in POSIX.1-2008, the argument type was specified as the type-safe const struct dirent **, and glibc 2.10 changed the definition of alphasort() (and the nonstandard versionsort()) to match the standard.

EXAMPLES

The program below prints a list of the files in the current directory in reverse order.

Program source

#define _DEFAULT_SOURCE
#include <dirent.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    struct dirent **namelist;
    int n;
    n = scandir(".", &namelist, NULL, alphasort);
    if (n == -1) {
        perror("scandir");
        exit(EXIT_FAILURE);
    }
    while (n--) {
        printf("%s

“, namelist[n]->d_name); free(namelist[n]); } free(namelist); exit(EXIT_SUCCESS); }

SEE ALSO

closedir(3), fnmatch(3), opendir(3), readdir(3), rewinddir(3), seekdir(3), strcmp(3), strcoll(3), strverscmp(3), telldir(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1750 - Linux cli command Image_ExifTool_PICTpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_PICTpm and provides detailed information about the command Image_ExifTool_PICTpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_PICTpm.

NAME 🖥️ Image_ExifTool_PICTpm 🖥️

Read PICT meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to read PICT (Apple Picture) images.

NOTES

Extraction of PICT opcodes is experimental, and is only enabled with the Verbose or the Unknown option.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://developer.apple.com/documentation/mac/QuickDraw/QuickDraw-2.html>

<http://developer.apple.com/documentation/QuickTime/INMAC/QT/iqImageCompMgr.a.htm>

SEE ALSO

“PICT Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1751 - Linux cli command pcap_freealldevspcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_freealldevspcap and provides detailed information about the command pcap_freealldevspcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_freealldevspcap.

NAME 🖥️ pcap_freealldevspcap 🖥️

get a list of capture devices, and free that list

SYNOPSIS

#include <pcap/pcap.h>
char errbuf[PCAP_ERRBUF_SIZE];
int pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf);
void pcap_freealldevs(pcap_if_t *alldevs);

DESCRIPTION

pcap_findalldevs() constructs a list of network devices that can be opened with pcap_create(3PCAP) and pcap_activate(3PCAP) or with pcap_open_live(3PCAP). (Note that there may be network devices that cannot be opened by the process calling pcap_findalldevs(), because, for example, that process does not have sufficient privileges to open them for capturing; if so, those devices will not appear on the list.) If pcap_findalldevs() succeeds, the pointer pointed to by alldevsp is set to point to the first element of the list, or to NULL if no devices were found (this is considered success). Each element of the list is of type pcap_if_t, and has the following members:

next
if not NULL, a pointer to the next element in the list; NULL for the last element of the list

name
a pointer to a string giving a name for the device to pass to pcap_open_live()

description
if not NULL, a pointer to a string giving a human-readable description of the device

addresses
a pointer to the first element of a list of network addresses for the device, or NULL if the device has no addresses

flags
device flags:

PCAP_IF_LOOPBACK
set if the device is a loopback interface

PCAP_IF_UP
set if the device is up

PCAP_IF_RUNNING
set if the device is running

PCAP_IF_WIRELESS
set if the device is a wireless interface; this includes IrDA as well as radio-based networks such as IEEE 802.15.4 and IEEE 802.11, so it doesn’t just mean Wi-Fi

PCAP_IF_CONNECTION_STATUS
a bitmask for an indication of whether the adapter is connected or not; for wireless interfaces, “connected” means “associated with a network”

The possible values for the connection status bits are:
PCAP_IF_CONNECTION_STATUS_UNKNOWN
it’s unknown whether the adapter is connected or not

PCAP_IF_CONNECTION_STATUS_CONNECTED
the adapter is connected

PCAP_IF_CONNECTION_STATUS_DISCONNECTED
the adapter is disconnected

PCAP_IF_CONNECTION_STATUS_NOT_APPLICABLE
the notion of “connected” and “disconnected” don’t apply to this interface; for example, it doesn’t apply to a loopback device

Each element of the list of addresses is of type pcap_addr_t, and has the following members:

next
if not NULL, a pointer to the next element in the list; NULL for the last element of the list

addr
a pointer to a struct sockaddr containing an address

netmask
if not NULL, a pointer to a struct sockaddr that contains the netmask corresponding to the address pointed to by addr

broadaddr
if not NULL, a pointer to a struct sockaddr that contains the broadcast address corresponding to the address pointed to by addr; may be null if the device doesn’t support broadcasts

dstaddr
if not NULL, a pointer to a struct sockaddr that contains the destination address corresponding to the address pointed to by addr; may be null if the device isn’t a point-to-point interface

Note that the addresses in the list of addresses might be IPv4 addresses, IPv6 addresses, or some other type of addresses, so you must check the sa_family member of the struct sockaddr before interpreting the contents of the address; do not assume that the addresses are all IPv4 addresses, or even all IPv4 or IPv6 addresses. IPv4 addresses have the value AF_INET, IPv6 addresses have the value AF_INET6 (which older operating systems that don’t support IPv6 might not define), and other addresses have other values. Whether other addresses are returned, and what types they might have is platform-dependent. For IPv4 addresses, the struct sockaddr pointer can be interpreted as if it pointed to a struct sockaddr_in; for IPv6 addresses, it can be interpreted as if it pointed to a struct sockaddr_in6.

The list of devices must be freed with pcap_freealldevs(3PCAP), which frees the list pointed to by alldevs.

RETURN VALUE

pcap_findalldevs() returns 0 on success and PCAP_ERROR on failure; as indicated, finding no devices is considered success, rather than failure, so 0 will be returned in that case. If PCAP_ERROR is returned, errbuf is filled in with an appropriate error message. errbuf is assumed to be able to hold at least PCAP_ERRBUF_SIZE chars.

BACKWARD COMPATIBILITY

The PCAP_IF_UP and PCAP_IF_RUNNING constants became available in libpcap release 1.6.1. The PCAP_IF_WIRELESS, PCAP_IF_CONNECTION_STATUS, PCAP_IF_CONNECTION_STATUS_UNKNOWN, PCAP_IF_CONNECTION_STATUS_CONNECTED, PCAP_IF_CONNECTION_STATUS_DISCONNECTED, and PCAP_IF_CONNECTION_STATUS_NOT_APPLICABLE constants became available in libpcap release 1.9.0.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1752 - Linux cli command remainder

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command remainder and provides detailed information about the command remainder, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the remainder.

NAME 🖥️ remainder 🖥️

floating-point remainder function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double remainder(double x, double y);
float remainderf(float x, float y);
long double remainderl(long double x, long double y);
/* Obsolete synonyms */
[[deprecated]] double drem(double x, double y);
[[deprecated]] float dremf(float x, float y);
[[deprecated]] long double dreml(long double x, long double y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

remainder():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

remainderf(), remainderl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

drem(), dremf(), dreml():

    /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions compute the remainder of dividing x by y. The return value is x-n*y, where n is the value x / y, rounded to the nearest integer. If the absolute value of x-n*y is 0.5, n is chosen to be even.

These functions are unaffected by the current rounding mode (see fenv(3)).

The drem() function does precisely the same thing.

RETURN VALUE

On success, these functions return the floating-point remainder, x-n*y. If the return value is 0, it has the sign of x.

If x or y is a NaN, a NaN is returned.

If x is an infinity, and y is not a NaN, a domain error occurs, and a NaN is returned.

If y is zero, and x is not a NaN, a domain error occurs, and a NaN is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is an infinity and y is not a NaN
errno is set to EDOM (but see BUGS). An invalid floating-point exception (FE_INVALID) is raised.

These functions do not set errno for this case.

Domain error: y is zero
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

drem(), dremf(), dreml(), remainder(), remainderf(), remainderl()

Thread safetyMT-Safe

STANDARDS

remainder()
remainderf()
remainderl()
C11, POSIX.1-2008.

drem()
dremf()
dreml()
None.

HISTORY

remainder()
remainderf()
remainderl()
C99, POSIX.1-2001.

drem()
4.3BSD.

dremf()
dreml()
Tru64, glibc2.

BUGS

Before glibc 2.15, the call

remainder(nan(""), 0);

returned a NaN, as expected, but wrongly caused a domain error. Since glibc 2.15, a silent NaN (i.e., no domain error) is returned.

Before glibc 2.15, errno was not set to EDOM for the domain error that occurs when x is an infinity and y is not a NaN.

EXAMPLES

The call “remainder(29.0, 3.0)” returns -1.

SEE ALSO

div(3), fmod(3), remquo(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1753 - Linux cli command Image_ExifTool_Exifpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Exifpm and provides detailed information about the command Image_ExifTool_Exifpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Exifpm.

NAME 🖥️ Image_ExifTool_Exifpm 🖥️

Read EXIF/TIFF meta information

SYNOPSIS

This module is required by Image::ExifTool.

DESCRIPTION

This module contains routines required by Image::ExifTool for processing EXIF and TIFF meta information.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.exif.org/Exif2-2.PDF>

<http://www.cipa.jp/std/documents/e/DC-008-2012_E.pdf>

<http://partners.adobe.com/asn/developer/pdfs/tn/TIFF6.pdf>

<http://partners.adobe.com/public/developer/en/tiff/TIFFPM6.pdf>

<http://www.adobe.com/products/dng/pdfs/dng_spec.pdf>

<http://www.awaresystems.be/imaging/tiff/tifftags.html>

<http://www.remotesensing.org/libtiff/TIFFTechNote2.html>

<http://www.exif.org/dcf.PDF>

<http://park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html>

<http://www.fine-view.com/jp/lab/doc/ps6ffspecsv2.pdf>

<http://www.ozhiker.com/electronics/pjmt/jpeg_info/meta.html>

<http://hul.harvard.edu/jhove/tiff-tags.html>

<http://www.microsoft.com/whdc/xps/wmphoto.mspx>

<http://www.asmail.be/msg0054681802.html>

<http://crousseau.free.fr/imgfmt_raw.htm>

<http://www.cybercom.net/~dcoffin/dcraw/>

<http://www.digitalpreservation.gov/formats/content/tiff_tags.shtml>

<http://community.roxen.com/developers/idocs/rfc/rfc3949.html>

<http://tools.ietf.org/html/draft-ietf-fax-tiff-fx-extension1-01>

<http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/cinemadng/pdfs/CinemaDNG_Format_Specification_v1_1.pdf>

<http://geotiff.maptools.org/spec/geotiffhome.html>

ACKNOWLEDGEMENTS

Thanks to Jeremy Brown for the 35efl tags, and Matt Madrid for his help with the XP character code conversions.

SEE ALSO

“EXIF Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1754 - Linux cli command XtUninstallTranslations

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtUninstallTranslations and provides detailed information about the command XtUninstallTranslations, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtUninstallTranslations.

NAME 🖥️ XtUninstallTranslations 🖥️

manage translation tables

SYNTAX

#include <X11/Intrinsic.h>

XtTranslations XtParseTranslationTable(const char *table);

void XtAugmentTranslations(Widget w, XtTranslations translations);

void XtOverrideTranslations(Widget w, XtTranslations translations);

void XtUninstallTranslations(Widget w);

ARGUMENTS

table
Specifies the translation table to compile.

translations
Specifies the compiled translation table to merge in (must not be NULL).

  1. Specifies the widget into which the new translations are to be merged or removed.

DESCRIPTION

The XtParseTranslationTable function compiles the translation table into the opaque internal representation of type XtTranslations. Note that if an empty translation table is required for any purpose, one can be obtained by calling XtParseTranslationTable and passing an empty string.

The XtAugmentTranslations function nondestructively merges the new translations into the existing widget translations. If the new translations contain an event or event sequence that already exists in the widget’s translations, the new translation is ignored.

The XtOverrideTranslations function destructively merges the new translations into the existing widget translations. If the new translations contain an event or event sequence that already exists in the widget’s translations, the new translation is merged in and override the widget’s translation.

To replace a widget’s translations completely, use XtSetValues on the XtNtranslations resource and specify a compiled translation table as the value.

The XtUninstallTranslations function causes the entire translation table for widget to be removed.

SEE ALSO

XtAppAddActions(3), XtCreatePopupShell(3), XtParseAcceleratorTable(3), XtPopup(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1755 - Linux cli command fscanf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fscanf and provides detailed information about the command fscanf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fscanf.

NAME 🖥️ fscanf 🖥️

input FILE format conversion

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int scanf(const char *restrict format, ...);
int fscanf(FILE *restrict stream,
 const char *restrict format, ...);
#include <stdarg.h>
int vscanf(const char *restrict format, va_list ap);
int vfscanf(FILE *restrict stream,
 const char *restrict format, va_list ap);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

vscanf(), vfscanf():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The scanf() family of functions scans formatted input like sscanf(3), but read from a FILE. It is very difficult to use these functions correctly, and it is preferable to read entire lines with fgets(3) or getline(3) and parse them later with sscanf(3) or more specialized functions such as strtol(3).

The scanf() function reads input from the standard input stream stdin and fscanf() reads input from the stream pointer stream.

The vfscanf() function is analogous to vfprintf(3) and reads input from the stream pointer stream using a variable argument list of pointers (see stdarg(3). The vscanf() function is analogous to vprintf(3) and reads from the standard input.

RETURN VALUE

On success, these functions return the number of input items successfully matched and assigned; this can be fewer than provided for, or even zero, in the event of an early matching failure.

The value EOF is returned if the end of input is reached before either the first successful conversion or a matching failure occurs. EOF is also returned if a read error occurs, in which case the error indicator for the stream (see ferror(3)) is set, and errno is set to indicate the error.

ERRORS

EAGAIN
The file descriptor underlying stream is marked nonblocking, and the read operation would block.

EBADF
The file descriptor underlying stream is invalid, or not open for reading.

EILSEQ
Input byte sequence does not form a valid character.

EINTR
The read operation was interrupted by a signal; see signal(7).

EINVAL
Not enough arguments; or format is NULL.

ENOMEM
Out of memory.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

scanf(), fscanf(), vscanf(), vfscanf()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

CAVEATS

These functions make it difficult to distinguish newlines from other white space, This is especially problematic with line-buffered input, like the standard input stream.

These functions can’t report errors after the last non-suppressed conversion specification.

BUGS

It is impossible to accurately know how many characters these functions have consumed from the input stream, since they only report the number of successful conversions. For example, if the input is “123 a”, scanf("%d %d", &a, &b) will consume the digits, the newline, and the space, but not the letter a. This makes it difficult to recover from invalid input.

SEE ALSO

fgets(3), getline(3), sscanf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1756 - Linux cli command stdout

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command stdout and provides detailed information about the command stdout, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the stdout.

NAME 🖥️ stdout 🖥️

standard I/O streams

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
extern FILE *stdin;
extern FILE *stdout;
extern FILE *stderr;

DESCRIPTION

Under normal circumstances every UNIX program has three streams opened for it when it starts up, one for input, one for output, and one for printing diagnostic or error messages. These are typically attached to the user’s terminal (see tty(4)) but might instead refer to files or other devices, depending on what the parent process chose to set up. (See also the “Redirection” section of sh(1).)

The input stream is referred to as “standard input”; the output stream is referred to as “standard output”; and the error stream is referred to as “standard error”. These terms are abbreviated to form the symbols used to refer to these files, namely stdin, stdout, and stderr.

Each of these symbols is a stdio(3) macro of type pointer to FILE, and can be used with functions like fprintf(3) or fread(3).

Since FILEs are a buffering wrapper around UNIX file descriptors, the same underlying files may also be accessed using the raw UNIX file interface, that is, the functions like read(2) and lseek(2).

On program startup, the integer file descriptors associated with the streams stdin, stdout, and stderr are 0, 1, and 2, respectively. The preprocessor symbols STDIN_FILENO, STDOUT_FILENO, and STDERR_FILENO are defined with these values in <unistd.h>. (Applying freopen(3) to one of these streams can change the file descriptor number associated with the stream.)

Note that mixing use of FILEs and raw file descriptors can produce unexpected results and should generally be avoided. (For the masochistic among you: POSIX.1, section 8.2.3, describes in detail how this interaction is supposed to work.) A general rule is that file descriptors are handled in the kernel, while stdio is just a library. This means for example, that after an exec(3), the child inherits all open file descriptors, but all old streams have become inaccessible.

Since the symbols stdin, stdout, and stderr are specified to be macros, assigning to them is nonportable. The standard streams can be made to refer to different files with help of the library function freopen(3), specially introduced to make it possible to reassign stdin, stdout, and stderr. The standard streams are closed by a call to exit(3) and by normal program termination.

STANDARDS

C11, POSIX.1-2008.

The standards also stipulate that these three streams shall be open at program startup.

HISTORY

C89, POSIX.1-2001.

NOTES

The stream stderr is unbuffered. The stream stdout is line-buffered when it points to a terminal. Partial lines will not appear until fflush(3) or exit(3) is called, or a newline is printed. This can produce unexpected results, especially with debugging output. The buffering mode of the standard streams (or any other stream) can be changed using the setbuf(3) or setvbuf(3) call. Note that in case stdin is associated with a terminal, there may also be input buffering in the terminal driver, entirely unrelated to stdio buffering. (Indeed, normally terminal input is line buffered in the kernel.) This kernel input handling can be modified using calls like tcsetattr(3); see also stty(1), and termios(3).

SEE ALSO

csh(1), sh(1), open(2), fopen(3), stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1757 - Linux cli command Tk_grabpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_grabpm and provides detailed information about the command Tk_grabpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_grabpm.

NAME 🖥️ Tk_grabpm 🖥️

Confine pointer and keyboard events to a window sub-tree

SYNOPSIS

$widget->grab

$widget->grabOption

DESCRIPTION

This set of methods implement simple pointer and keyboard grabs for Tk. Tk’s grabs are different than the grabs described in the Xlib documentation. When a grab is set for a particular window, Tk restricts all pointer events to the grab window and its descendants in Tk’s window hierarchy. Whenever the pointer is within the grab window’s subtree, the pointer will behave exactly the same as if there had been no grab at all and all events will be reported in the normal fashion. When the pointer is outside $widget’s tree, button presses and releases and mouse motion events are reported to $widget, and window entry and window exit events are ignored. The grab subtree ``owns’’ the pointer: windows outside the grab subtree will be visible on the screen but they will be insensitive until the grab is released. The tree of windows underneath the grab window can include top-level windows, in which case all of those top-level windows and their descendants will continue to receive mouse events during the grab.

Two forms of grabs are possible: local and global. A local grab affects only the grabbing application: events will be reported to other applications as if the grab had never occurred. Grabs are local by default. A global grab locks out all applications on the screen, so that only the given subtree of the grabbing application will be sensitive to pointer events (mouse button presses, mouse button releases, pointer motions, window entries, and window exits). During global grabs the window manager will not receive pointer events either.

During local grabs, keyboard events (key presses and key releases) are delivered as usual: the window manager controls which application receives keyboard events, and if they are sent to any window in the grabbing application then they are redirected to the focus window. During a global grab Tk grabs the keyboard so that all keyboard events are always sent to the grabbing application. The focus method is still used to determine which window in the application receives the keyboard events. The keyboard grab is released when the grab is released.

Grabs apply to particular displays. If an application has windows on multiple displays then it can establish a separate grab on each display. The grab on a particular display affects only the windows on that display. It is possible for different applications on a single display to have simultaneous local grabs, but only one application can have a global grab on a given display at once.

The grab methods take any of the following forms:

$widget->grabCurrent
Returns the current grab window in this application for $widget’s display, or an empty string if there is no such window.

$widget->grabs
Returns a list whose elements are all of the windows grabbed by this application for all displays, or an empty string if the application has no grabs. Not implemented yet!

$widget->grabRelease
Releases the grab on $widget if there is one, otherwise does nothing. Returns an empty string.

$widget->grab
Sets a local grab on $widget. If a grab was already in effect for this application on $widget’s display then it is automatically released. If there is already a local grab on $widget, then the command does nothing. Returns an empty string.

$widget->grabGlobal
Sets a global grab on $widget. If a grab was already in effect for this application on $widget’s display then it is automatically released. If there is already a global grab on $widget, then the command does nothing. Returns an empty string.

$widget->grabStatus
Returns none if no grab is currently set on $widget, local if a local grab is set on $widget, and global if a global grab is set.

BUGS

It took an incredibly complex and gross implementation to produce the simple grab effect described above. Given the current implementation, it isn’t safe for applications to use the Xlib grab facilities at all except through the Tk grab procedures. If applications try to manipulate X’s grab mechanisms directly, things will probably break.

If a single process is managing several different Tk applications, only one of those applications can have a local grab for a given display at any given time. If the applications are in different processes, this restriction doesn’t exist.

KEYWORDS

grab, keyboard events, pointer events, window

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1758 - Linux cli command ts_libversion

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ts_libversion and provides detailed information about the command ts_libversion, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ts_libversion.

NAME 🖥️ ts_libversion 🖥️

get version information on the currently running tslib

SYNOPSIS

#include <tslib.h>

struct ts_lib_version_data *ts_libversion();

DESCRIPTION

ts_libversion() This function returns a pointer to a static copy of the version info struct:

struct ts_lib_version_data {
        const char      *package_version;
        int             version_num;
        unsigned int    features;
};

package_version is just the string containing the tarball release number, e.g. “1.10”.

version_num is a 24 bit number created like this: <8 bits major number> | <8 bits minor number> | <8 bits patch number> of the library libts. Version 0.7.1 is therefore returned as 0x000701.

features can have one or more bits set. The currently defined bits are:

TSLIB_VERSION_MT tslib filters support multitouch ts_read_mt() and there is at least one raw access module supporting it (currently evdev input) TSLIB_VERSION_OPEN_RESTRICTED ts_open_restricted and ts_close_restricted function pointers are available to implement TSLIB_VERSION_EVENTPATH ts_get_eventpath() is available since tslib can auto-detect a device TSLIB_VERSION_VERSION simple tslib_version() and ts_print_ascii_logo() are available

RETURN VALUE

This function returns a pointer to a static copy of the version info struct.

SEE ALSO

ts_setup(3), ts_read(3), ts.conf(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1759 - Linux cli command XtDispatchEventToWidget

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtDispatchEventToWidget and provides detailed information about the command XtDispatchEventToWidget, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtDispatchEventToWidget.

NAME 🖥️ XtDispatchEventToWidget 🖥️

extension event handling

SYNTAX

#include <X11/Intrinsic.h>

void XtInsertEventTypeHandler(Widget widget, int event_type, XtPointer select_data, XtEventHandler proc, XtPointer client_data, XtListPosition position);

void XtRemoveEventTypeHandler(Widget widget, int event_type, XtPointer select_data, XtEventHandler proc, XtPointer client_data);

void XtRegisterExtensionSelector(Display* display, int min_event_type, int max_event_type, XtExtensionSelectProc proc, XtPointer client_data);

XtEventDispatchProc XtSetEventDispatcher(Display* display, int event_type, XtEventDispatchProc proc);

Boolean XtDispatchEventToWidget(Widget widget, XEvent* event);

ARGUMENTS

widget
Specifies the widget for this event handler. Must be of class Core or any subclass thereof.

event_type
Specifies the event type.

select_data
Specifies data used to select or deselect events from the server.

proc
Specifies the proc.

client_data
Specifies additional data to be passed to the event handler.

position
Specifies when the event handler is to be called relative to other previously registered handlers.

display
Specifies the display.

min_event_type, max_event_type
Specifies the range of event types for this extension.

event
Specifies a pointer to the event to be dispatched.

DESCRIPTION

The XtInsertEventTypeHandler function registers a procedure with the dispatch mechanism that is to be called when an event that matches the specified event_type is dispatched to the specified widget.

If event_type is one of the core X protocol events then select_data must be a pointer to a value of type EventMask, indicating the event mask to be used to select for the desired event. This event mask will be included in the value returned by XtBuildEventMask. If the widget is realized XtInsertEventTypeHandler calls XSelectInput if necessary. Specifying NULL for select_data is equivalent to specifying a pointer to an event mask containing 0. This is similar to the XtInsertRawEventHandler function.

If event_type specifies an extension event type then the semantics of the data pointed to by select_data are defined by the extension selector registered for the specified event type.

In either case the Intrinsics are not required to copy the data pointed to by select_data, so the caller must ensure that it remains valid as long as the event handler remains registered with this value of select_data.

The position argument allows the client to control the order of the invocation of event handlers registered for the same event type. If the client does not care about the order, it should normally specify XtListTail, which registers this event handler after any previously registered handlers for this event type.

The XtRemoveEventTypeHandler function unregisters an even handler registered with XtInsertEventTypeHandler for the specified event type. The request is ignored if client_data does not match the value given with the handler was registered.

If event_type specifies on of the core X protocol events, select_data must be a pointer to a value of type EventMask, indicating the mask to be used to deselect for the appropriate event. If the widget is realized, XtRemoveEventTypeHandler calls XSelectInput if necessary. Specifying NULL for select_data is equivalent to specifying a pointer to an event mask containing 0. This is similar to the XtRemoveRawEventHandler function.

If event_type specifies an extension event type then the semantics of the data pointed to by select_data are defined by the extension selector registered for the specified event type.

The XtRegisterExtensionSelector function registers a procedure to arrange for the delivery of extension events to widgets.

If min_event_type and max_event_type match the parameters to a previous call to XtRegisterExtensionSelector for the same display, the proc and client_data replace the previously registered values. If the range specified by min_event_type and max_event_type overlaps the range of the parameters to a previous call for the same display in any other way, an error results.

The XtSetEventDispatcher function registers the event dispatcher procedure specified by proc for events with the type event_type. The previously registered dispatcher (or the default dispatcher if there was no previously registered dispatcher) is returned. If proc is NULL, the default procedure is restored for the specified type.

In the future, when XtDispatchEvent is called with an event of event_type, the specified proc (or the default dispatcher) will be invoked to determine a widget ot which to dispatch the event.

The XtDispatchEventToWidget function scans the list of registered event handlers for the specified widget and calls each handler that has been registered for the specified event type, subject to the continue_to_dispatch value returned by each handler. The Intrinsics behave as if event handlers were registered at the head of the list for Expose, NoExpose, GraphicsExpose, and VisibilityNotify events to invoke the widget’s expose procedure according to the exposure compression rules and to update the widget’s visible field if visible_interest is True. These internal event handlers never set continue_to_dispatch to False.

XtDispatchEventToWidget returns True if any event handler was called and False otherwise.

SEE ALSO

XtGetKeyboardFocusWidget(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1760 - Linux cli command Tk_Xpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Xpm and provides detailed information about the command Tk_Xpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Xpm.

NAME 🖥️ Tk_Xpm 🖥️

Perl extension for Xlib constants.

SYNOPSIS

use Tk::X;

DESCRIPTION

A module generated by h2xs. It exists to export Xlib #define type constants for possible use with Tk::Xlib.

Exported constants

Above AllTemporary AllocAll AllocNone AllowExposures AlreadyGrabbed Always AnyButton AnyKey AnyModifier AnyPropertyType ArcChord ArcPieSlice AsyncBoth AsyncKeyboard AsyncPointer AutoRepeatModeDefault AutoRepeatModeOff AutoRepeatModeOn BadAccess BadAlloc BadAtom BadColor BadCursor BadDrawable BadFont BadGC BadIDChoice BadImplementation BadLength BadMatch BadName BadPixmap BadRequest BadValue BadWindow Below BottomIf Button1 Button1Mask Button1MotionMask Button2 Button2Mask Button2MotionMask Button3 Button3Mask Button3MotionMask Button4 Button4Mask Button4MotionMask Button5 Button5Mask Button5MotionMask ButtonMotionMask ButtonPress ButtonPressMask ButtonRelease ButtonReleaseMask CWBackPixel CWBackPixmap CWBackingPixel CWBackingPlanes CWBackingStore CWBitGravity CWBorderPixel CWBorderPixmap CWBorderWidth CWColormap CWCursor CWDontPropagate CWEventMask CWHeight CWOverrideRedirect CWSaveUnder CWSibling CWStackMode CWWidth CWWinGravity CWX CWY CapButt CapNotLast CapProjecting CapRound CenterGravity CirculateNotify CirculateRequest ClientMessage ClipByChildren ColormapChangeMask ColormapInstalled ColormapNotify ColormapUninstalled Complex ConfigureNotify ConfigureRequest ControlMapIndex ControlMask Convex CoordModeOrigin CoordModePrevious CopyFromParent CreateNotify CurrentTime CursorShape DefaultBlanking DefaultExposures DestroyAll DestroyNotify DirectColor DisableAccess DisableScreenInterval DisableScreenSaver DoBlue DoGreen DoRed DontAllowExposures DontPreferBlanking EastGravity EnableAccess EnterNotify EnterWindowMask EvenOddRule Expose ExposureMask FamilyChaos FamilyDECnet FamilyInternet FillOpaqueStippled FillSolid FillStippled FillTiled FirstExtensionError FocusChangeMask FocusIn FocusOut FontChange FontLeftToRight FontRightToLeft ForgetGravity GCArcMode GCBackground GCCapStyle GCClipMask GCClipXOrigin GCClipYOrigin GCDashList GCDashOffset GCFillRule GCFillStyle GCFont GCForeground GCFunction GCGraphicsExposures GCJoinStyle GCLastBit GCLineStyle GCLineWidth GCPlaneMask GCStipple GCSubwindowMode GCTile GCTileStipXOrigin GCTileStipYOrigin GXand GXandInverted GXandReverse GXclear GXcopy GXcopyInverted GXequiv GXinvert GXnand GXnoop GXnor GXor GXorInverted GXorReverse GXset GXxor GrabFrozen GrabInvalidTime GrabModeAsync GrabModeSync GrabNotViewable GrabSuccess GraphicsExpose GravityNotify GrayScale HostDelete HostInsert IncludeInferiors InputFocus InputOnly InputOutput IsUnmapped IsUnviewable IsViewable JoinBevel JoinMiter JoinRound KBAutoRepeatMode KBBellDuration KBBellPercent KBBellPitch KBKey KBKeyClickPercent KBLed KBLedMode KeyPress KeyPressMask KeyRelease KeyReleaseMask KeymapNotify KeymapStateMask LASTEvent LSBFirst LastExtensionError LeaveNotify LeaveWindowMask LedModeOff LedModeOn LineDoubleDash LineOnOffDash LineSolid LockMapIndex LockMask LowerHighest MSBFirst MapNotify MapRequest MappingBusy MappingFailed MappingKeyboard MappingModifier MappingNotify MappingPointer MappingSuccess Mod1MapIndex Mod1Mask Mod2MapIndex Mod2Mask Mod3MapIndex Mod3Mask Mod4MapIndex Mod4Mask Mod5MapIndex Mod5Mask MotionNotify NoEventMask NoExpose NoSymbol Nonconvex None NorthEastGravity NorthGravity NorthWestGravity NotUseful NotifyAncestor NotifyDetailNone NotifyGrab NotifyHint NotifyInferior NotifyNonlinear NotifyNonlinearVirtual NotifyNormal NotifyPointer NotifyPointerRoot NotifyUngrab NotifyVirtual NotifyWhileGrabbed Opposite OwnerGrabButtonMask ParentRelative PlaceOnBottom PlaceOnTop PointerMotionHintMask PointerMotionMask PointerRoot PointerWindow PreferBlanking PropModeAppend PropModePrepend PropModeReplace PropertyChangeMask PropertyDelete PropertyNewValue PropertyNotify PseudoColor RaiseLowest ReparentNotify ReplayKeyboard ReplayPointer ResizeRedirectMask ResizeRequest RetainPermanent RetainTemporary RevertToNone RevertToParent RevertToPointerRoot ScreenSaverActive ScreenSaverReset SelectionClear SelectionNotify SelectionRequest SetModeDelete SetModeInsert ShiftMapIndex ShiftMask SouthEastGravity SouthGravity SouthWestGravity StaticColor StaticGravity StaticGray StippleShape StructureNotifyMask SubstructureNotifyMask SubstructureRedirectMask Success SyncBoth SyncKeyboard SyncPointer TileShape TopIf TrueColor UnmapGravity UnmapNotify Unsorted VisibilityChangeMask VisibilityFullyObscured VisibilityNotify VisibilityPartiallyObscured VisibilityUnobscured WestGravity WhenMapped WindingRule XYBitmap XYPixmap X_H X_PROTOCOL X_PROTOCOL_REVISION YSorted YXBanded YXSorted ZPixmap

AUTHOR

Nick Ing-Simmons ran h2xs …

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1761 - Linux cli command XtCallCallbackList

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtCallCallbackList and provides detailed information about the command XtCallCallbackList, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtCallCallbackList.

NAME 🖥️ XtCallCallbackList 🖥️

process callbacks

SYNTAX

#include <X11/Intrinsic.h>

void XtCallCallbacks(Widget w, const char *callback_name, XtPointer call_data);

void XtCallCallbackList(Widget w, XtCallbackList callbacks, XtPointer call_data);

typedef enum {XtCallbackNoList, XtCallbackHasNone, XtCallbackHasSome} XtCallbackStatus;

XtCallbackStatus XtHasCallbacks(Widget w, const char *callback_name);

ARGUMENTS

callback_name
Specifies the callback list to be executed or checked.

call_data
Specifies a callback-list specific data value to pass to each of the callback procedure in the list.

callbacks
Specifies the callback list to be executed.

  1. Specifies the widget.

DESCRIPTION

The XtCallCallbacks function calls each procedure that is registered in the specified widget’s callback list.

If callbacks is not NULL, XtCallCallbackList calls each of the callback procedures in the list, passing client data and call_data. The callbacks parameter must specify the contents of a widget or object resource declared with representation type XtRCallback.

The XtHasCallbacks function first checks to see if the widget has a callback list identified by callback_name. If the callback list does not exist, XtHasCallbacks returns XtCallbackNoList. If the callback list exists but is empty, it returns XtCallbackHasNone. If the callback list exists and has at least one callback registered, it returns XtCallbackHasSome.

SEE ALSO

XtAddCallback(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1762 - Linux cli command Image_ExifTool_RTFpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_RTFpm and provides detailed information about the command Image_ExifTool_RTFpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_RTFpm.

NAME 🖥️ Image_ExifTool_RTFpm 🖥️

Read Rich Text Format meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read meta information from RTF (Rich Text Format) documents.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://download.microsoft.com/download/2/f/5/2f599e18-07ee-4ec5-a1e7-f4e6a9423592/Word2007RTFSpec9.doc>

<http://search.cpan.org/dist/RTF-Writer/lib/RTF/Cookbook.pod>

SEE ALSO

“RTF Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1763 - Linux cli command Net_DNS_DomainNamepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_DomainNamepm and provides detailed information about the command Net_DNS_DomainNamepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_DomainNamepm.

NAME 🖥️ Net_DNS_DomainNamepm 🖥️

DNS name representation

SYNOPSIS

use Net::DNS::DomainName; $object = Net::DNS::DomainName->new(example.com); $name = $object->name; $data = $object->encode; ( $object, $next ) = Net::DNS::DomainName->decode( \data, $offset );

DESCRIPTION

The Net::DNS::DomainName module implements the concrete representation of DNS domain names used within DNS packets.

Net::DNS::DomainName defines methods for encoding and decoding wire format octet strings. All other behaviour is inherited from Net::DNS::Domain.

The Net::DNS::DomainName1035 and Net::DNS::DomainName2535 packages implement disjoint domain name subtypes which provide the name compression and canonicalisation specified by RFC1035 and RFC2535. These are necessary to meet the backward compatibility requirements introduced by RFC3597.

METHODS

new

$object = Net::DNS::DomainName->new(example.com);

Creates a domain name object which identifies the domain specified by the character string argument.

canonical

$data = $object->canonical;

Returns the canonical wire-format representation of the domain name as defined in RFC2535(8.1).

decode

$object = Net::DNS::DomainName->decode( \buffer, $offset, $hash ); ( $object, $next ) = Net::DNS::DomainName->decode( \buffer, $offset, $hash );

Creates a domain name object which represents the DNS domain name identified by the wire-format data at the indicated offset within the data buffer.

The argument list consists of a reference to a scalar containing the wire-format data and specified offset. The optional reference to a hash table provides improved efficiency of decoding compressed names by exploiting already cached compression pointers.

The returned offset value indicates the start of the next item in the data buffer.

encode

$data = $object->encode;

Returns the wire-format representation of the domain name suitable for inclusion in a DNS packet buffer.

Net::DNS::DomainName1035

Net::DNS::DomainName1035 implements a subclass of domain name objects which are to be encoded using the compressed wire format defined in RFC1035.

use Net::DNS::DomainName; $object = Net::DNS::DomainName1035->new(compressible.example.com); $data = $object->encode( $offset, $hash ); ( $object, $next ) = Net::DNS::DomainName1035->decode( \data, $offset );

Note that RFC3597 implies that the RR types defined in RFC1035 section 3.3 are the only types eligible for compression.

encode

$data = $object->encode( $offset, $hash );

Returns the wire-format representation of the domain name suitable for inclusion in a DNS packet buffer.

The optional arguments are the offset within the packet data where the domain name is to be stored and a reference to a hash table used to index compressed names within the packet.

If the hash reference is undefined, encode() returns the lowercase uncompressed canonical representation defined in RFC2535(8.1).

Net::DNS::DomainName2535

Net::DNS::DomainName2535 implements a subclass of domain name objects which are to be encoded using uncompressed wire format.

Note that RFC3597, and latterly RFC4034, specifies that the lower case canonical encoding defined in RFC2535 is to be used for RR types defined prior to RFC3597.

use Net::DNS::DomainName; $object = Net::DNS::DomainName2535->new(incompressible.example.com); $data = $object->encode( $offset, $hash ); ( $object, $next ) = Net::DNS::DomainName2535->decode( \data, $offset );

encode

$data = $object->encode( $offset, $hash );

Returns the uncompressed wire-format representation of the domain name suitable for inclusion in a DNS packet buffer.

If the hash reference is undefined, encode() returns the lowercase canonical form defined in RFC2535(8.1).

COPYRIGHT

Copyright (c)2009-2011 Dick Franks.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::Domain RFC1035 <https://tools.ietf.org/html/rfc1035> RFC2535 <https://tools.ietf.org/html/rfc2535> RFC3597 <https://tools.ietf.org/html/rfc3597> RFC4034 <https://tools.ietf.org/html/rfc4034>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1764 - Linux cli command svc_run

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command svc_run and provides detailed information about the command svc_run, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the svc_run.

NAME 🖥️ svc_run 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1765 - Linux cli command Net_DNS_Headerpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_Headerpm and provides detailed information about the command Net_DNS_Headerpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_Headerpm.

NAME 🖥️ Net_DNS_Headerpm 🖥️

DNS packet header

SYNOPSIS

use Net::DNS; $packet = Net::DNS::Packet->new(); $header = $packet->header;

DESCRIPTION

Net::DNS::Header represents the header portion of a DNS packet.

METHODS

$packet->header

$packet = Net::DNS::Packet->new(); $header = $packet->header;

Net::DNS::Header objects emanate from the Net::DNS::Packet header() method, and contain an opaque reference to the parent Packet object.

Header objects may be assigned to suitably scoped lexical variables. They should never be stored in global variables or persistent data structures.

string

print $packet->header->string;

Returns a string representation of the packet header.

print

$packet->header->print;

Prints the string representation of the packet header.

id

print “query id = “, $packet->header->id, " “; $packet->header->id(1234);

Gets or sets the query identification number.

A random value is assigned if the argument value is undefined.

opcode

print “query opcode = “, $packet->header->opcode, " “; $packet->header->opcode(“UPDATE”);

Gets or sets the query opcode (the purpose of the query).

rcode

print “query response code = “, $packet->header->rcode, " “; $packet->header->rcode(“SERVFAIL”);

Gets or sets the query response code (the status of the query).

qr

print “query response flag = “, $packet->header->qr, " “; $packet->header->qr(0);

Gets or sets the query response flag.

aa

print “response is “, $packet->header->aa ? "” : “non-”, “authoritative “; $packet->header->aa(0);

Gets or sets the authoritative answer flag.

tc

print “packet is “, $packet->header->tc ? "” : “not “, “truncated “; $packet->header->tc(0);

Gets or sets the truncated packet flag.

rd

print “recursion was “, $packet->header->rd ? "” : “not “, “desired “; $packet->header->rd(0);

Gets or sets the recursion desired flag.

ra

print “recursion is “, $packet->header->ra ? "” : “not “, “available “; $packet->header->ra(0);

Gets or sets the recursion available flag.

z

Unassigned bit, should always be zero.

print “The response has “, $packet->header->ad ? "” : “not”, “been verified “;

Relevant in DNSSEC context.

(The AD bit is only set on a response where signatures have been cryptographically verified or the server is authoritative for the data and is allowed to set the bit by policy.)

cd

print “checking was “, $packet->header->cd ? “not” : “”, “desired “; $packet->header->cd(0);

Gets or sets the checking disabled flag.

qdcount, zocount

print “# of question records: “, $packet->header->qdcount, " “;

Returns the number of records in the question section of the packet. In dynamic update packets, this field is known as zocount and refers to the number of RRs in the zone section.

ancount, prcount

print “# of answer records: “, $packet->header->ancount, " “;

Returns the number of records in the answer section of the packet which may, in the case of corrupt packets, differ from the actual number of records. In dynamic update packets, this field is known as prcount and refers to the number of RRs in the prerequisite section.

nscount, upcount

print “# of authority records: “, $packet->header->nscount, " “;

Returns the number of records in the authority section of the packet which may, in the case of corrupt packets, differ from the actual number of records. In dynamic update packets, this field is known as upcount and refers to the number of RRs in the update section.

arcount, adcount

print “# of additional records: “, $packet->header->arcount, " “;

Returns the number of records in the additional section of the packet which may, in the case of corrupt packets, differ from the actual number of records. In dynamic update packets, this field is known as adcount.

EDNS Protocol Extensions

do, co

print “DNSSEC_OK flag was “, $packet->header->do ? “not” : “”, “set “; $packet->header->do(1);

Gets or sets the named EDNS flag.

Extended rcode

EDNS extended rcodes are handled transparently by $packet->header->rcode().

UDP packet size

$udp_max = $packet->edns->UDPsize;

EDNS offers a mechanism to advertise the maximum UDP packet size which can be assembled by the local network stack.

edns

$header = $packet->header; $version = $header->edns->version; @options = $header->edns->options; $option = $header->edns->option(n); $udp_max = $packet->edns->UDPsize;

Auxiliary function which provides access to the EDNS protocol extension OPT RR.

COPYRIGHT

Copyright (c)1997 Michael Fuhr.

Portions Copyright (c)2002,2003 Chris Reinhardt.

Portions Copyright (c)2012,2022 Dick Franks.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::Packet Net::DNS::RR::OPT RFC1035(4.1.1) <https://tools.ietf.org/html/rfc1035>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1766 - Linux cli command pcappcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcappcap and provides detailed information about the command pcappcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcappcap.

NAME 🖥️ pcappcap 🖥️

Packet Capture library

SYNOPSIS

#include <pcap/pcap.h>

DESCRIPTION

The Packet Capture library provides a high level interface to packet capture systems. All packets on the network, even those destined for other hosts, are accessible through this mechanism. It also supports saving captured packets to a ``savefile’’, and reading packets from a ``savefile’'.

Initializing

pcap_init() initializes the library. It takes an argument giving options; currently, the options are:

PCAP_CHAR_ENC_LOCAL
Treat all strings supplied as arguments, and return all strings to the caller, as being in the local character encoding.

PCAP_CHAR_ENC_UTF_8
Treat all strings supplied as arguments, and return all strings to the caller, as being in UTF-8.

On UNIX-like systems, the local character encoding is assumed to be UTF-8, so no character encoding transformations are done.

On Windows, the local character encoding is the local ANSI code page.

If pcap_init() is called, the deprecated pcap_lookupdev() routine always fails, so it should not be used, and, on Windows, pcap_create() does not attempt to handle UTF-16LE strings.

If pcap_init() is not called, strings are treated as being in the local ANSI code page on Windows, pcap_lookupdev() will succeed if there is a device on which to capture, and pcap_create() makes an attempt to check whether the string passed as an argument is a UTF-16LE string - note that this attempt is unsafe, as it may run past the end of the string - to handle pcap_lookupdev() returning a UTF-16LE string. Programs that don’t call pcap_init() should, on Windows, call pcap_wsockinit() to initialize Winsock; this is not necessary if pcap_init() is called, as pcap_init() will initialize Winsock itself on Windows.

Routines

pcap_init(3PCAP)
initialize the library

Opening a capture handle for reading

To open a handle for a live capture, given the name of the network or other interface on which the capture should be done, call pcap_create(), set the appropriate options on the handle, and then activate it with pcap_activate(). If pcap_activate() fails, the handle should be closed with pcap_close().

To obtain a list of devices that can be opened for a live capture, call pcap_findalldevs(); to free the list returned by pcap_findalldevs(), call pcap_freealldevs(). pcap_lookupdev() will return the first device on that list that is not a ``loopback`` network interface.

To open a handle for a ``savefile’’ from which to read packets, given the pathname of the ``savefile’’, call pcap_open_offline(); to set up a handle for a ``savefile’’, given a FILE * referring to a file already opened for reading, call pcap_fopen_offline().

In order to get a ``fake’’ pcap_t for use in routines that require a pcap_t as an argument, such as routines to open a ``savefile’’ for writing and to compile a filter expression, call pcap_open_dead().

pcap_create(), pcap_open_offline(), pcap_fopen_offline(), and pcap_open_dead() return a pointer to a pcap_t, which is the handle used for reading packets from the capture stream or the ``savefile’’, and for finding out information about the capture stream or ``savefile’’. To close a handle, use pcap_close().

The options that can be set on a capture handle include

snapshot length
If, when capturing, you capture the entire contents of the packet, that requires more CPU time to copy the packet to your application, more disk and possibly network bandwidth to write the packet data to a file, and more disk space to save the packet. If you don’t need the entire contents of the packet - for example, if you are only interested in the TCP headers of packets - you can set the “snapshot length” for the capture to an appropriate value. If the snapshot length is set to snaplen, and snaplen is less than the size of a packet that is captured, only the first snaplen bytes of that packet will be captured and provided as packet data.

A snapshot length of 65535 should be sufficient, on most if not all networks, to capture all the data available from the packet.

The snapshot length is set with pcap_set_snaplen().

promiscuous mode
On broadcast LANs such as Ethernet, if the network isn’t switched, or if the adapter is connected to a “mirror port” on a switch to which all packets passing through the switch are sent, a network adapter receives all packets on the LAN, including unicast or multicast packets not sent to a network address that the network adapter isn’t configured to recognize.

Normally, the adapter will discard those packets; however, many network adapters support “promiscuous mode”, which is a mode in which all packets, even if they are not sent to an address that the adapter recognizes, are provided to the host. This is useful for passively capturing traffic between two or more other hosts for analysis.

Note that even if an application does not set promiscuous mode, the adapter could well be in promiscuous mode for some other reason.

For now, this doesn’t work on the “any” device; if an argument of “any” or NULL is supplied, the setting of promiscuous mode is ignored.

Promiscuous mode is set with pcap_set_promisc().

monitor mode
On IEEE 802.11 wireless LANs, even if an adapter is in promiscuous mode, it will supply to the host only frames for the network with which it’s associated. It might also supply only data frames, not management or control frames, and might not provide the 802.11 header or radio information pseudo-header for those frames.

In “monitor mode”, sometimes also called “rfmon mode” (for “Radio Frequency MONitor”), the adapter will supply all frames that it receives, with 802.11 headers, and might supply a pseudo-header with radio information about the frame as well.

Note that in monitor mode the adapter might disassociate from the network with which it’s associated, so that you will not be able to use any wireless networks with that adapter. This could prevent accessing files on a network server, or resolving host names or network addresses, if you are capturing in monitor mode and are not connected to another network with another adapter.

Monitor mode is set with pcap_set_rfmon(), and pcap_can_set_rfmon() can be used to determine whether an adapter can be put into monitor mode.

packet buffer timeout
If, when capturing, packets are delivered as soon as they arrive, the application capturing the packets will be woken up for each packet as it arrives, and might have to make one or more calls to the operating system to fetch each packet.

If, instead, packets are not delivered as soon as they arrive, but are delivered after a short delay (called a “packet buffer timeout”), more than one packet can be accumulated before the packets are delivered, so that a single wakeup would be done for multiple packets, and each set of calls made to the operating system would supply multiple packets, rather than a single packet. This reduces the per-packet CPU overhead if packets are arriving at a high rate, increasing the number of packets per second that can be captured.

The packet buffer timeout is required so that an application won’t wait for the operating system’s capture buffer to fill up before packets are delivered; if packets are arriving slowly, that wait could take an arbitrarily long period of time.

Not all platforms support a packet buffer timeout; on platforms that don’t, the packet buffer timeout is ignored. A zero value for the timeout, on platforms that support a packet buffer timeout, will cause a read to wait forever to allow enough packets to arrive, with no timeout. A negative value is invalid; the result of setting the timeout to a negative value is unpredictable.

NOTE: the packet buffer timeout cannot be used to cause calls that read packets to return within a limited period of time, because, on some platforms, the packet buffer timeout isn’t supported, and, on other platforms, the timer doesn’t start until at least one packet arrives. This means that the packet buffer timeout should NOT be used, for example, in an interactive application to allow the packet capture loop to ``poll’’ for user input periodically, as there’s no guarantee that a call reading packets will return after the timeout expires even if no packets have arrived.

The packet buffer timeout is set with pcap_set_timeout().

immediate mode
In immediate mode, packets are always delivered as soon as they arrive, with no buffering. Immediate mode is set with pcap_set_immediate_mode().

buffer size
Packets that arrive for a capture are stored in a buffer, so that they do not have to be read by the application as soon as they arrive. On some platforms, the buffer’s size can be set; a size that’s too small could mean that, if too many packets are being captured and the snapshot length doesn’t limit the amount of data that’s buffered, packets could be dropped if the buffer fills up before the application can read packets from it, while a size that’s too large could use more non-pageable operating system memory than is necessary to prevent packets from being dropped.

The buffer size is set with pcap_set_buffer_size().

timestamp type
On some platforms, the time stamp given to packets on live captures can come from different sources that can have different resolutions or that can have different relationships to the time values for the current time supplied by routines on the native operating system. See pcap-tstamp(7) for a list of time stamp types.

The time stamp type is set with pcap_set_tstamp_type().

Reading packets from a network interface may require that you have special privileges:

Under SunOS 3.x or 4.x with NIT or BPF:
You must have read access to /dev/nit or /dev/bpf*.

Under Solaris with DLPI:
You must have read/write access to the network pseudo device, e.g. /dev/le. On at least some versions of Solaris, however, this is not sufficient to allow tcpdump to capture in promiscuous mode; on those versions of Solaris, you must be root, or the application capturing packets must be installed setuid to root, in order to capture in promiscuous mode. Note that, on many (perhaps all) interfaces, if you don’t capture in promiscuous mode, you will not see any outgoing packets, so a capture not done in promiscuous mode may not be very useful.

In newer versions of Solaris, you must have been given the net_rawaccess privilege; this is both necessary and sufficient to give you access to the network pseudo-device - there is no need to change the privileges on that device. A user can be given that privilege by, for example, adding that privilege to the user’s defaultpriv key with the usermod(8) command.

Under HP-UX with DLPI:
You must be root or the application capturing packets must be installed setuid to root.

Under IRIX with snoop:
You must be root or the application capturing packets must be installed setuid to root.

Under Linux:
You must be root or the application capturing packets must be installed setuid to root, unless your distribution has a kernel that supports capability bits such as CAP_NET_RAW and code to allow those capability bits to be given to particular accounts and to cause those bits to be set on a user’s initial processes when they log in, in which case you must have CAP_NET_RAW in order to capture.

Under ULTRIX and Digital UNIX/Tru64 UNIX:
Any user may capture network traffic. However, no user (not even the super-user) can capture in promiscuous mode on an interface unless the super-user has enabled promiscuous-mode operation on that interface using pfconfig(8), and no user (not even the super-user) can capture unicast traffic received by or sent by the machine on an interface unless the super-user has enabled copy-all-mode operation on that interface using pfconfig, so useful packet capture on an interface probably requires that either promiscuous-mode or copy-all-mode operation, or both modes of operation, be enabled on that interface.

Under BSD (this includes macOS):
You must have read access to /dev/bpf* on systems that don’t have a cloning BPF device, or to /dev/bpf on systems that do. On BSDs with a devfs (this includes macOS), this might involve more than just having somebody with super-user access setting the ownership or permissions on the BPF devices - it might involve configuring devfs to set the ownership or permissions every time the system is booted, if the system even supports that; if it doesn’t support that, you might have to find some other way to make that happen at boot time.

Reading a saved packet file doesn’t require special privileges.

The packets read from the handle may include a ``pseudo-header’’ containing various forms of packet meta-data, and probably includes a link-layer header whose contents can differ for different network interfaces. To determine the format of the packets supplied by the handle, call pcap_datalink(); https://www.tcpdump.org/linktypes.html lists the values it returns and describes the packet formats that correspond to those values.

Do NOT assume that the packets for a given capture or ``savefile`` will have any given link-layer header type, such as DLT_EN10MB for Ethernet. For example, the “any” device on Linux will have a link-layer header type of DLT_LINUX_SLL or DLT_LINUX_SLL2 even if all devices on the system at the time the “any” device is opened have some other data link type, such as DLT_EN10MB for Ethernet.

To obtain the FILE * corresponding to a pcap_t opened for a ``savefile’’, call pcap_file().

Routines

pcap_create(3PCAP)
get a pcap_t for live capture

pcap_activate(3PCAP)
activate a pcap_t for live capture

pcap_findalldevs(3PCAP)
get a list of devices that can be opened for a live capture

pcap_freealldevs(3PCAP)
free list of devices

pcap_lookupdev(3PCAP)
get first non-loopback device on that list

pcap_open_offline(3PCAP)
open a pcap_t for a ``savefile’’, given a pathname

pcap_open_offline_with_tstamp_precision(3PCAP)
open a pcap_t for a ``savefile’’, given a pathname, and specify the precision to provide for packet time stamps

pcap_fopen_offline(3PCAP)
open a pcap_t for a ``savefile’’, given a FILE *

pcap_fopen_offline_with_tstamp_precision(3PCAP)
open a pcap_t for a ``savefile’’, given a FILE *, and specify the precision to provide for packet time stamps

pcap_open_dead(3PCAP)
create a ``fake’’ pcap_t

pcap_close(3PCAP)
close a pcap_t

pcap_set_snaplen(3PCAP)
set the snapshot length for a not-yet-activated pcap_t for live capture

pcap_snapshot(3PCAP)
get the snapshot length for a pcap_t

pcap_set_promisc(3PCAP)
set promiscuous mode for a not-yet-activated pcap_t for live capture

pcap_set_protocol_linux(3PCAP)
set capture protocol for a not-yet-activated pcap_t for live capture (Linux only)

pcap_set_rfmon(3PCAP)
set monitor mode for a not-yet-activated pcap_t for live capture

pcap_can_set_rfmon(3PCAP)
determine whether monitor mode can be set for a pcap_t for live capture

pcap_set_timeout(3PCAP)
set packet buffer timeout for a not-yet-activated pcap_t for live capture

pcap_set_immediate_mode(3PCAP)
set immediate mode for a not-yet-activated pcap_t for live capture

pcap_set_buffer_size(3PCAP)
set buffer size for a not-yet-activated pcap_t for live capture

pcap_set_tstamp_type(3PCAP)
set time stamp type for a not-yet-activated pcap_t for live capture

pcap_list_tstamp_types(3PCAP)
get list of available time stamp types for a not-yet-activated pcap_t for live capture

pcap_free_tstamp_types(3PCAP)
free list of available time stamp types

pcap_tstamp_type_val_to_name(3PCAP)
get name for a time stamp type

pcap_tstamp_type_val_to_description(3PCAP)
get description for a time stamp type

pcap_tstamp_type_name_to_val(3PCAP)
get time stamp type corresponding to a name

pcap_set_tstamp_precision(3PCAP)
set time stamp precision for a not-yet-activated pcap_t for live capture

pcap_get_tstamp_precision(3PCAP)
get the time stamp precision of a pcap_t for live capture

pcap_datalink(3PCAP)
get link-layer header type for a pcap_t

pcap_file(3PCAP)
get the FILE * for a pcap_t opened for a ``savefile''

pcap_is_swapped(3PCAP)
determine whether a ``savefile’’ being read came from a machine with the opposite byte order

pcap_major_version(3PCAP)

pcap_minor_version(3PCAP)
get the major and minor version of the file format version for a ``savefile''

Some devices may provide more than one link-layer header type. To obtain a list of all link-layer header types provided by a device, call pcap_list_datalinks() on an activated pcap_t for the device. To free a list of link-layer header types, call pcap_free_datalinks(). To set the link-layer header type for a device, call pcap_set_datalink(). This should be done after the device has been activated but before any packets are read and before any filters are compiled or installed.

Routines

pcap_list_datalinks(3PCAP)
get a list of link-layer header types for a device

pcap_free_datalinks(3PCAP)
free list of link-layer header types

pcap_set_datalink(3PCAP)
set link-layer header type for a device

pcap_datalink_val_to_name(3PCAP)
get name for a link-layer header type

pcap_datalink_val_to_description(3PCAP)

pcap_datalink_val_to_description_or_dlt(3PCAP)
get description for a link-layer header type

pcap_datalink_name_to_val(3PCAP)
get link-layer header type corresponding to a name

Reading packets

Packets are read with pcap_dispatch() or pcap_loop(), which process one or more packets, calling a callback routine for each packet, or with pcap_next() or pcap_next_ex(), which return the next packet. The callback for pcap_dispatch() and pcap_loop() is supplied a pointer to a struct pcap_pkthdr, which includes the following members:

ts
a struct timeval containing the time when the packet was captured

caplen
a bpf_u_int32 giving the number of bytes of the packet that are available from the capture

len
a bpf_u_int32 giving the length of the packet, in bytes (which might be more than the number of bytes available from the capture, if the length of the packet is larger than the maximum number of bytes to capture).

The callback is also supplied a const u_char pointer to the first caplen (as given in the struct pcap_pkthdr mentioned above) bytes of data from the packet. This won’t necessarily be the entire packet; to capture the entire packet, you will have to provide a value for snaplen in your call to pcap_set_snaplen() that is sufficiently large to get all of the packet’s data - a value of 65535 should be sufficient on most if not all networks). When reading from a ``savefile’’, the snapshot length specified when the capture was performed will limit the amount of packet data available.

pcap_next() is passed an argument that points to a struct pcap_pkthdr structure, and fills it in with the time stamp and length values for the packet. It returns a const u_char to the first caplen bytes of the packet on success, and NULL on error.

pcap_next_ex() is passed two pointer arguments, one of which points to a structpcap_pkthdr*** and one of which points to a const u_char*. It sets the first pointer to point to a struct pcap_pkthdr structure with the time stamp and length values for the packet, and sets the second pointer to point to the first caplen bytes of the packet.

To force the loop in pcap_dispatch() or pcap_loop() to terminate, call pcap_breakloop().

By default, when reading packets from an interface opened for a live capture, pcap_dispatch(), pcap_next(), and pcap_next_ex() will, if no packets are currently available to be read, block waiting for packets to become available. On some, but not all, platforms, if a packet buffer timeout was specified, the wait will terminate after the packet buffer timeout expires; applications should be prepared for this, as it happens on some platforms, but should not rely on it, as it does not happen on other platforms. Note that the wait might, or might not, terminate even if no packets are available; applications should be prepared for this to happen, but must not rely on it happening.

A handle can be put into ``non-blocking mode’’, so that those routines will, rather than blocking, return an indication that no packets are available to read. Call pcap_setnonblock() to put a handle into non-blocking mode or to take it out of non-blocking mode; call pcap_getnonblock() to determine whether a handle is in non-blocking mode. Note that non-blocking mode does not work correctly in Mac OS X 10.6.

Non-blocking mode is often combined with routines such as select(2) or poll(2) or other routines a platform offers to wait for any of a set of descriptors to be ready to read. To obtain, for a handle, a descriptor that can be used in those routines, call pcap_get_selectable_fd(). If the routine indicates that data is available to read on the descriptor, an attempt should be made to read from the device.

Not all handles have such a descriptor available; pcap_get_selectable_fd() will return -1 if no such descriptor is available. If no such descriptor is available, this may be because the device must be polled periodically for packets; in that case, pcap_get_required_select_timeout() will return a pointer to a struct timeval whose value can be used as a timeout in those routines. When the routine returns, an attempt should be made to read packets from the device. If pcap_get_required_select_timeout() returns NULL, no such timeout is available, and those routines cannot be used with the device.

In addition, for various reasons, one or more of those routines will not work properly with the descriptor; the documentation for pcap_get_selectable_fd() gives details. Note that, just as an attempt to read packets from a pcap_t may not return any packets if the packet buffer timeout expires, a select(), poll(), or other such call may, if the packet buffer timeout expires, indicate that a descriptor is ready to read even if there are no packets available to read.

Routines

pcap_dispatch(3PCAP)
read a bufferful of packets from a pcap_t open for a live capture or the full set of packets from a pcap_t open for a ``savefile''

pcap_loop(3PCAP)
read packets from a pcap_t until an interrupt or error occurs

pcap_next(3PCAP)
read the next packet from a pcap_t without an indication whether an error occurred

pcap_next_ex(3PCAP)
read the next packet from a pcap_t with an error indication on an error

pcap_breakloop(3PCAP)
prematurely terminate the loop in pcap_dispatch() or pcap_loop()

pcap_setnonblock(3PCAP)
set or clear non-blocking mode on a pcap_t

pcap_getnonblock(3PCAP)
get the state of non-blocking mode for a pcap_t

pcap_get_selectable_fd(3PCAP)
attempt to get a descriptor for a pcap_t that can be used in calls such as select() and poll()

pcap_get_required_select_timeout(3PCAP)
attempt to get a timeout required for using a pcap_t in calls such as select() and poll()

Filters

In order to cause only certain packets to be returned when reading packets, a filter can be set on a handle. For a live capture, the filtering will be performed in kernel mode, if possible, to avoid copying ``uninteresting’’ packets from the kernel to user mode.

A filter can be specified as a text string; the syntax and semantics of the string are as described by pcap-filter(7). A filter string is compiled into a program in a pseudo-machine-language by pcap_compile() and the resulting program can be made a filter for a handle with pcap_setfilter(). The result of pcap_compile() can be freed with a call to pcap_freecode(). pcap_compile() may require a network mask for certain expressions in the filter string; pcap_lookupnet() can be used to find the network address and network mask for a given capture device.

A compiled filter can also be applied directly to a packet that has been read using pcap_offline_filter().

Routines

pcap_compile(3PCAP)
compile filter expression to a pseudo-machine-language code program

pcap_freecode(3PCAP)
free a filter program

pcap_setfilter(3PCAP)
set filter for a pcap_t

pcap_lookupnet(3PCAP)
get network address and network mask for a capture device

pcap_offline_filter(3PCAP)
apply a filter program to a packet

Incoming and outgoing packets

By default, libpcap will attempt to capture both packets sent by the machine and packets received by the machine. To limit it to capturing only packets received by the machine or, if possible, only packets sent by the machine, call pcap_setdirection().

Routines

pcap_setdirection(3PCAP)
specify whether to capture incoming packets, outgoing packets, or both

Capture statistics

To get statistics about packets received and dropped in a live capture, call pcap_stats().

Routines

pcap_stats(3PCAP)
get capture statistics

Opening a handle for writing captured packets

To open a ``savefile`` to which to write packets, given the pathname the ``savefile’’ should have, call pcap_dump_open(). To open a ``savefile`` to which to write packets, given the pathname the ``savefile’’ should have, call pcap_dump_open(); to set up a handle for a ``savefile’’, given a FILE * referring to a file already opened for writing, call pcap_dump_fopen(). They each return pointers to a pcap_dumper_t, which is the handle used for writing packets to the ``savefile’’. If it succeeds, it will have created the file if it doesn’t exist and truncated the file if it does exist. To close a pcap_dumper_t, call pcap_dump_close().

Routines

pcap_dump_open(3PCAP)
open a pcap_dumper_t for a ``savefile``, given a pathname, replacing any existing data

pcap_dump_open_append(3PCAP)
open a pcap_dumper_t for a ``savefile``, given a pathname, appending to the existing data

pcap_dump_fopen(3PCAP)
open a pcap_dumper_t for a ``savefile``, given a FILE *, assuming an empty file

pcap_dump_close(3PCAP)
close a pcap_dumper_t

pcap_dump_file(3PCAP)
get the FILE * for a pcap_dumper_t opened for a ``savefile''

Writing packets

To write a packet to a pcap_dumper_t, call pcap_dump(). Packets written with pcap_dump() may be buffered, rather than being immediately written to the ``savefile’’. Closing the pcap_dumper_t will cause all buffered-but-not-yet-written packets to be written to the ``savefile’’. To force all packets written to the pcap_dumper_t, and not yet written to the ``savefile’’ because they’re buffered by the pcap_dumper_t, to be written to the ``savefile’’, without closing the pcap_dumper_t, call pcap_dump_flush().

Routines

pcap_dump(3PCAP)
write packet to a pcap_dumper_t

pcap_dump_flush(3PCAP)
flush buffered packets written to a pcap_dumper_t to the ``savefile''

pcap_dump_ftell(3PCAP)
get current file position for a pcap_dumper_t

Injecting packets

If you have the required privileges, you can inject packets onto a network with a pcap_t for a live capture, using pcap_inject() or pcap_sendpacket(). (The two routines exist for compatibility with both OpenBSD and WinPcap/Npcap; they perform the same function, but have different return values.)

Routines

pcap_inject(3PCAP)

pcap_sendpacket(3PCAP)
transmit a packet

Reporting errors

Some routines return error or warning status codes; to convert them to a string, use pcap_statustostr().

Routines

pcap_statustostr(3PCAP)
get a string for an error or warning status code

Getting library version information

To get a string giving version information about libpcap, call pcap_lib_version().

Routines

pcap_lib_version(3PCAP)
get library version string

BACKWARD COMPATIBILITY

In versions of libpcap prior to 1.0, the pcap.h header file was not in a pcap directory on most platforms; if you are writing an application that must work on versions of libpcap prior to 1.0, include <pcap.h>, which will include <pcap/pcap.h> for you, rather than including <pcap/pcap.h>.

pcap_create() and pcap_activate() were not available in versions of libpcap prior to 1.0; if you are writing an application that must work on versions of libpcap prior to 1.0, either use pcap_open_live() to get a handle for a live capture or, if you want to be able to use the additional capabilities offered by using pcap_create() and pcap_activate(), use an autoconf(1) script or some other configuration script to check whether the libpcap 1.0 APIs are available and use them only if they are.

SEE ALSO

autoconf(1), tcpdump(8), tcpslice(1), pcap-filter(7), pfconfig(8), usermod(8)

AUTHORS

The original authors of libpcap are:

Van Jacobson, Craig Leres and Steven McCanne, all of the Lawrence Berkeley National Laboratory, University of California, Berkeley, CA.

The current version is available from “The Tcpdump Group”’s Web site at

https://www.tcpdump.org/

BUGS

To report a security issue please send an e-mail to [email protected].

To report bugs and other problems, contribute patches, request a feature, provide generic feedback etc please see the file CONTRIBUTING.md in the libpcap source tree root.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1767 - Linux cli command tolower_l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tolower_l and provides detailed information about the command tolower_l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tolower_l.

NAME 🖥️ tolower_l 🖥️

convert uppercase or lowercase

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int toupper(int c);
int tolower(int c);
int toupper_l(int c, locale_t locale);
int tolower_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

toupper_l(), tolower_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions convert lowercase letters to uppercase, and vice versa.

If c is a lowercase letter, toupper() returns its uppercase equivalent, if an uppercase representation exists in the current locale. Otherwise, it returns c. The toupper_l() function performs the same task, but uses the locale referred to by the locale handle locale.

If c is an uppercase letter, tolower() returns its lowercase equivalent, if a lowercase representation exists in the current locale. Otherwise, it returns c. The tolower_l() function performs the same task, but uses the locale referred to by the locale handle locale.

If c is neither an unsigned char value nor EOF, the behavior of these functions is undefined.

The behavior of toupper_l() and tolower_l() is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

RETURN VALUE

The value returned is that of the converted letter, or c if the conversion was not possible.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

toupper(), tolower(), toupper_l(), tolower_l()

Thread safetyMT-Safe

STANDARDS

toupper()
tolower()
C11, POSIX.1-2008.

toupper_l()
tolower_l()
POSIX.1-2008.

HISTORY

toupper()
tolower()
C89, 4.3BSD, POSIX.1-2001.

toupper_l()
tolower_l()
POSIX.1-2008.

NOTES

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what constitutes an uppercase or lowercase letter depend on the locale. For example, the default “C” locale does not know about umlauts, so no conversion is done for them.

In some non-English locales, there are lowercase letters with no corresponding uppercase equivalent; the German sharp s is one example.

SEE ALSO

isalpha(3), newlocale(3), setlocale(3), towlower(3), towupper(3), uselocale(3), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1768 - Linux cli command URI_filepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command URI_filepm and provides detailed information about the command URI_filepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the URI_filepm.

NAME 🖥️ URI_filepm 🖥️

URI that maps to local file names

SYNOPSIS

use URI::file; $u1 = URI->new(“file:/foo/bar”); $u2 = URI->new(“foo/bar”, “file”); $u3 = URI::file->new($path); $u4 = URI::file->new(“c:\windows", “win32”); $u1->file; $u1->file(“mac”);

DESCRIPTION

The URI::file class supports URI objects belonging to the file URI scheme. This scheme allows us to map the conventional file names found on various computer systems to the URI name space, see RFC 8089 <https://www.rfc-editor.org/rfc/rfc8089.html>.

If you simply want to construct file URI objects from URI strings, use the normal URI constructor. If you want to construct file URI objects from the actual file names used by various systems, then use one of the following URI::file constructors:

$u = URI::file->new( $filename, [$os] )
Maps a file name to the file: URI name space, creates a URI object and returns it. The $filename is interpreted as belonging to the indicated operating system ($os), which defaults to the value of the $^O variable. The $filename can be either absolute or relative, and the corresponding type of URI object for $os is returned.

$u = URI::file->new_abs( $filename, [$os] )
Same as URI::file->new, but makes sure that the URI returned represents an absolute file name. If the $filename argument is relative, then the name is resolved relative to the current directory, i.e. this constructor is really the same as: URI::file->new($filename)->abs(URI::file->cwd);

$u = URI::file->cwd
Returns a file URI that represents the current working directory. See Cwd.

The following methods are supported for file URI (in addition to the common and generic methods described in URI):

$u->file( [$os] )
Returns a file name. It maps from the URI name space to the file name space of the indicated operating system. It might return undef if the name can not be represented in the indicated file system.

$u->dir( [$os] )
Some systems use a different form for names of directories than for plain files. Use this method if you know you want to use the name for a directory.

The URI::file module can be used to map generic file names to names suitable for the current system. As such, it can work as a nice replacement for the File::Spec module. For instance, the following code translates the UNIX-style file name Foo/Bar.pm to a name suitable for the local system:

$file = URI::file->new(“Foo/Bar.pm”, “unix”)->file; die “Cant map filename Foo/Bar.pm for $^O” unless defined $file; open(FILE, $file) || die “Cant open $file: $!”; # do something with FILE

MAPPING NOTES

Most computer systems today have hierarchically organized file systems. Mapping the names used in these systems to the generic URI syntax allows us to work with relative file URIs that behave as they should when resolved using the generic algorithm for URIs (specified in RFC 3986 <https://www.rfc-editor.org/rfc/rfc3986.html>). Mapping a file name to the generic URI syntax involves mapping the path separator character to “/” and encoding any reserved characters that appear in the path segments of the file name. If path segments consisting of the strings “.” or “..” have a different meaning than what is specified for generic URIs, then these must be encoded as well.

If the file system has device, volume or drive specifications as the root of the name space, then it makes sense to map them to the authority field of the generic URI syntax. This makes sure that relative URIs can not be resolved “above” them, i.e. generally how relative file names work in those systems.

Another common use of the authority field is to encode the host on which this file name is valid. The host name “localhost” is special and generally has the same meaning as a missing or empty authority field. This use is in conflict with using it as a device specification, but can often be resolved for device specifications having characters not legal in plain host names.

File name to URI mapping in normally not one-to-one. There are usually many URIs that map to any given file name. For instance, an authority of “localhost” maps the same as a URI with a missing or empty authority.

Example 1: The Mac classic (Mac OS 9 and earlier) used “:” as path separator, but not in the same way as a generic URI. “:foo” was a relative name. “foo:bar” was an absolute name. Also, path segments could contain the “/” character as well as the literal “.” or “..”. So the mapping looks like this:

Mac classic URI ———- ——————- :foo:bar <==> foo/bar : <==> ./ ::foo:bar <==> ../foo/bar ::: <==> ../../ foo:bar <==> file:/foo/bar foo:bar: <==> file:/foo/bar/ .. <==> %2E%2E <undef> <== / foo/ <== file:/foo%2F ./foo.txt <== file:/.%2Ffoo.txt

Note that if you want a relative URL, you *must* begin the path with a :. Any path that begins with [^:] is treated as absolute.

Example 2: The UNIX file system is easy to map, as it uses the same path separator as URIs, has a single root, and segments of “.” and “..” have the same meaning. URIs that have the character “�” or “/” as part of any path segment can not be turned into valid UNIX file names.

UNIX URI ———- —————— foo/bar <==> foo/bar /foo/bar <==> file:/foo/bar /foo/bar <== file://localhost/foo/bar file: ==> ./file: <undef> <== file:/fo%00/bar / <==> file:/

CONFIGURATION VARIABLES

The following configuration variables influence how the class and its methods behave:

%URI::file::OS_CLASS
This hash maps OS identifiers to implementation classes. You might want to add or modify this if you want to plug in your own file handler class. Normally the keys should match the $^O values in use. If there is no mapping then the “Unix” implementation is used.

$URI::file::DEFAULT_AUTHORITY
This determines what “authority” string to include in absolute file URIs. It defaults to “”. If you prefer verbose URIs you might set it to be “localhost”. Setting this value to undef forces behaviour compatible to URI v1.31 and earlier. In this mode host names in UNC paths and drive letters are mapped to the authority component on Windows, while we produce authority-less URIs on Unix.

SEE ALSO

URI, File::Spec, perlport

COPYRIGHT

Copyright 1995-1998,2004 Gisle Aas.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1769 - Linux cli command PA_POINTERconst

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command PA_POINTERconst and provides detailed information about the command PA_POINTERconst, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the PA_POINTERconst.

NAME 🖥️ PA_POINTERconst 🖥️

define custom behavior for printf-like functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <printf.h>
int register_printf_specifier(int spec, printf_function func,
 printf_arginfo_size_function arginfo);
int register_printf_modifier(const wchar_t *str);
int register_printf_type(printf_va_arg_function fct);

Callbacks

typedef int printf_function(FILE *stream, const struct printf_info *info,
 const void *const args[]);
typedef int printf_arginfo_size_function(const struct printf_info *info,
 size_t n, int argtypes[n], int size[n]);
typedef void printf_va_arg_function(void *mem, va_list *ap);

Types

struct printf_info {
 int prec; // Precision
 int width; // Width
 wchar_t spec; // Format letter
 unsigned int is_long_double:1;// L or ll flag
 unsigned int is_short:1; // h flag
 unsigned int is_long:1; // l flag
 unsigned int alt:1; // # flag
 unsigned int space:1; // Space flag
 unsigned int left:1; // - flag
 unsigned int showsign:1; // + flag
 unsigned int group:1; // ' flag
 unsigned int extra:1; // For special use
 unsigned int is_char:1; // hh flag
 unsigned int wide:1; // True for wide character streams
 unsigned int i18n:1; // I flag
 unsigned int is_binary128:1; /* Floating-point argument is
  ABI-compatible with
  IEC 60559 binary128 */
 unsigned short user; // Bits for user-installed modifiers
 wchar_t pad; // Padding character
};

Constants

#define PA_FLAG_LONG_LONG /* ... */
#define PA_FLAG_LONG_DOUBLE /* ... */
#define PA_FLAG_LONG /* ... */
#define PA_FLAG_SHORT /* ... */
#define PA_FLAG_PTR /* ... */

DESCRIPTION

These functions serve to extend and/or modify the behavior of the printf(3) family of functions.

register_printf_specifier()

This function registers a custom conversion specifier for the printf(3) family of functions.

spec
The character which will be used as a conversion specifier in the format string.

func
Callback function that will be executed by the printf(3) family of functions to format the input arguments into the output stream.

stream
Output stream where the formatted output should be printed. This stream transparently represents the output, even in the case of functions that write to a string.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in arginfo.

args
Array of pointers to the arguments to the printf(3) -like function.

arginfo
Callback function that will be executed by the printf(3) family of functions to know how many arguments should be parsed for the custom specifier and also their types.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in func.

n
Number of arguments remaining to be parsed.

argtypes
This array should be set to define the type of each of the arguments that will be parsed. Each element in the array represents one of the arguments to be parsed, in the same order that they are passed to the printf(3) -like function. Each element should be set to a base type (PA_*) from the enum above, or a custom one, and optionally ORed with an appropriate length modifier (PA_FLAG_*).

The type is determined by using one of the following constants:

PA_INT
int.

PA_CHAR
int, cast to char.

PA_WCHAR
wchar_t.

PA_STRING
const char *, a ‘�’-terminated string.

PA_WSTRING
const wchar_t *, a wide character L’�’-terminated string.

PA_POINTER
void *.

PA_FLOAT
float.

PA_DOUBLE
double.

PA_LAST
TODO.

size
For user-defined types, the size of the type (in bytes) should also be specified through this array. Otherwise, leave it unused.

arginfo is called before func, and prepares some information needed to call func.

register_printf_modifier()

TODO

register_printf_type()

TODO

RETURN VALUE

register_printf_specifier(), register_printf_modifier(), and register_printf_type() return zero on success, or -1 on error.

Callbacks

The callback of type printf_function should return the number of characters written, or -1 on error.

The callback of type printf_arginfo_size_function should return the number of arguments to be parsed by this specifier. It also passes information about the type of those arguments to the caller through argtypes. On error, it should return -1.

ERRORS

EINVAL
The specifier was not a valid character.

STANDARDS

GNU.

HISTORY

register_printf_function(3) is an older function similar to register_printf_specifier(), and is now deprecated. That function can’t handle user-defined types.

register_printf_specifier() supersedes register_printf_function(3).

EXAMPLES

The following example program registers the ‘b’ and ‘B’ specifiers to print integers in binary format, mirroring rules for other unsigned conversion specifiers like ‘x’ and ‘u’. This can be used to print in binary prior to C23.

/* This code is in the public domain */
#include <err.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <printf.h>
#define GROUP_SEP  '\''
struct Printf_Pad {
    char    ch;
    size_t  len;
};
static int b_printf(FILE *stream, const struct printf_info *info,
                    const void *const args[]);
static int b_arginf_sz(const struct printf_info *info,
                    size_t n, int argtypes[n], int size[n]);
static uintmax_t b_value(const struct printf_info *info,
                    const void *arg);
static size_t b_bin_repr(char bin[UINTMAX_WIDTH],
                    const struct printf_info *info, const void *arg);
static size_t b_bin_len(const struct printf_info *info,
                    ptrdiff_t min_len);
static size_t b_pad_len(const struct printf_info *info,
                    ptrdiff_t bin_len);
static ssize_t b_print_prefix(FILE *stream,
                    const struct printf_info *info);
static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info,
                    ptrdiff_t min_len);
static ssize_t b_print_number(FILE *stream,
                    const struct printf_info *info,
                    const char bin[UINTMAX_WIDTH],
                    size_t min_len, size_t bin_len);
static char pad_ch(const struct printf_info *info);
static ssize_t pad_spaces(FILE *stream, size_t pad_len);
int
main(void)
{
    if (register_printf_specifier('b', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('b', ...)");
    if (register_printf_specifier('B', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('B', ...)");
    printf("....----....----....----....----

“); printf("%llb; “, 0x5Ellu); printf("%lB; “, 0x5Elu); printf("%b; “, 0x5Eu); printf("%hB; “, 0x5Eu); printf("%hhb; “, 0x5Eu); printf("%jb; “, (uintmax_t)0x5E); printf("%zb; “, (size_t)0x5E); printf(”….—-….—-….—-….—- “); printf(”%#b; “, 0x5Eu); printf(”%#B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf("%10b; “, 0x5Eu); printf("%010b; “, 0x5Eu); printf(”%.10b; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%-10B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%‘B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”….—-….—-….—-….—- “); printf(”%#16.12b; “, 0xAB); printf(”%-#‘20.12b; “, 0xAB); printf(”%#‘020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#020B; “, 0xAB); printf(”%‘020B; “, 0xAB); printf("%020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#021B; “, 0xAB); printf(”%‘021B; “, 0xAB); printf("%021B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#022B; “, 0xAB); printf(”%‘022B; “, 0xAB); printf("%022B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#023B; “, 0xAB); printf(”%‘023B; “, 0xAB); printf("%023B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%-#‘19.11b; “, 0xAB); printf(”%#‘019B; “, 0xAB); printf(”%#019B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%‘019B; “, 0xAB); printf("%019B; “, 0xAB); printf(”%#016b; “, 0xAB); printf(”….—-….—-….—-….—- “); return 0; } static int b_printf(FILE *stream, const struct printf_info *info, const void const args[]) { char bin[UINTMAX_WIDTH]; size_t min_len, bin_len; ssize_t len, tmp; struct Printf_Pad pad = {0}; len = 0; min_len = b_bin_repr(bin, info, args[0]); bin_len = b_bin_len(info, min_len); pad.ch = pad_ch(info); if (pad.ch == ’ ‘) pad.len = b_pad_len(info, bin_len); / Padding with ’ ’ (right aligned) / if ((pad.ch == ’ ‘) && !info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } / “0b”/“0B” prefix / if (info->alt) { tmp = b_print_prefix(stream, info); if (tmp == EOF) return EOF; len += tmp; } / Padding with ‘0’ / if (pad.ch == ‘0’) { tmp = b_pad_zeros(stream, info, min_len); if (tmp == EOF) return EOF; len += tmp; } / Print number (including leading 0s to fill precision) / tmp = b_print_number(stream, info, bin, min_len, bin_len); if (tmp == EOF) return EOF; len += tmp; / Padding with ’ ’ (left aligned) */ if (info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } return len; } static int b_arginf_sz(const struct printf_info *info, size_t n, int argtypes[n], [[maybe_unused]] int size[n]) { if (n < 1) return -1; if (info->is_long_double) argtypes[0] = PA_INT | PA_FLAG_LONG_LONG; else if (info->is_long) argtypes[0] = PA_INT | PA_FLAG_LONG; else argtypes[0] = PA_INT; return 1; } static uintmax_t b_value(const struct printf_info *info, const void *arg) { if (info->is_long_double) return *(const unsigned long long *)arg; if (info->is_long) return *(const unsigned long )arg; / short and char are both promoted to int */ return *(const unsigned int *)arg; } static size_t b_bin_repr(char bin[UINTMAX_WIDTH], const struct printf_info *info, const void *arg) { size_t min_len; uintmax_t val; val = b_value(info, arg); bin[0] = ‘0’; for (min_len = 0; val; min_len++) { bin[min_len] = ‘0’ + (val % 2); val »= 1; } return MAX(min_len, 1); } static size_t b_bin_len(const struct printf_info *info, ptrdiff_t min_len) { return MAX(info->prec, min_len); } static size_t b_pad_len(const struct printf_info *info, ptrdiff_t bin_len) { ptrdiff_t pad_len; pad_len = info->width - bin_len; if (info->alt) pad_len -= 2; if (info->group) pad_len -= (bin_len - 1) / 4; return MAX(pad_len, 0); } static ssize_t b_print_prefix(FILE *stream, const struct printf_info *info) { ssize_t len; len = 0; if (fputc(‘0’, stream) == EOF) return EOF; len++; if (fputc(info->spec, stream) == EOF) return EOF; len++; return len; } static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info, ptrdiff_t min_len) { ssize_t len; ptrdiff_t tmp; len = 0; tmp = info->width - (info->alt * 2); if (info->group) tmp -= tmp / 5 - !(tmp % 5); for (ptrdiff_t i = tmp - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static ssize_t b_print_number(FILE *stream, const struct printf_info info, const char bin[UINTMAX_WIDTH], size_t min_len, size_t bin_len) { ssize_t len; len = 0; / Print leading zeros to fill precision / for (size_t i = bin_len - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } / Print number */ for (size_t i = min_len - 1; i < min_len; i–) { if (fputc(bin[i], stream) == EOF) return EOF; len++; if (!info->group || (i % 4) || !i) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static char pad_ch(const struct printf_info *info) { if ((info->prec != -1) || (info->pad == ’ ‘) || info->left) return ’ ‘; return ‘0’; } static ssize_t pad_spaces(FILE *stream, size_t pad_len) { ssize_t len; len = 0; for (size_t i = pad_len - 1; i < pad_len; i–) { if (fputc(’ ‘, stream) == EOF) return EOF; len++; } return len; }

SEE ALSO

asprintf(3), printf(3), wprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1770 - Linux cli command Image_ExifTool_GIFpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_GIFpm and provides detailed information about the command Image_ExifTool_GIFpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_GIFpm.

NAME 🖥️ Image_ExifTool_GIFpm 🖥️

Read and write GIF meta information

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to read and write GIF meta information.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.w3.org/Graphics/GIF/spec-gif89a.txt>

<http://www.adobe.com/devnet/xmp/>

<http://graphcomp.com/info/specs/ani_gif.html>

<http://www.color.org/icc_specs2.html>

<http://www.midiox.com/mmgif.htm>

SEE ALSO

Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1771 - Linux cli command Spreadsheet_ParseExcel_FmtJapanpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_ParseExcel_FmtJapanpm and provides detailed information about the command Spreadsheet_ParseExcel_FmtJapanpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_ParseExcel_FmtJapanpm.

NAME 🖥️ Spreadsheet_ParseExcel_FmtJapanpm 🖥️

A class for Cell formats.

SYNOPSIS

See the documentation for Spreadsheet::ParseExcel.

DESCRIPTION

This module is used in conjunction with Spreadsheet::ParseExcel. See the documentation for Spreadsheet::ParseExcel.

AUTHOR

Current maintainer 0.60+: Douglas Wilson [email protected]

Maintainer 0.40-0.59: John McNamara [email protected]

Maintainer 0.27-0.33: Gabor Szabo [email protected]

Original author: Kawai Takanori [email protected]

COPYRIGHT

Copyright (c) 2014 Douglas Wilson

Copyright (c) 2009-2013 John McNamara

Copyright (c) 2006-2008 Gabor Szabo

Copyright (c) 2000-2006 Kawai Takanori

All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1772 - Linux cli command XtParseTranslationTable

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtParseTranslationTable and provides detailed information about the command XtParseTranslationTable, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtParseTranslationTable.

NAME 🖥️ XtParseTranslationTable 🖥️

manage translation tables

SYNTAX

#include <X11/Intrinsic.h>

XtTranslations XtParseTranslationTable(const char *table);

void XtAugmentTranslations(Widget w, XtTranslations translations);

void XtOverrideTranslations(Widget w, XtTranslations translations);

void XtUninstallTranslations(Widget w);

ARGUMENTS

table
Specifies the translation table to compile.

translations
Specifies the compiled translation table to merge in (must not be NULL).

  1. Specifies the widget into which the new translations are to be merged or removed.

DESCRIPTION

The XtParseTranslationTable function compiles the translation table into the opaque internal representation of type XtTranslations. Note that if an empty translation table is required for any purpose, one can be obtained by calling XtParseTranslationTable and passing an empty string.

The XtAugmentTranslations function nondestructively merges the new translations into the existing widget translations. If the new translations contain an event or event sequence that already exists in the widget’s translations, the new translation is ignored.

The XtOverrideTranslations function destructively merges the new translations into the existing widget translations. If the new translations contain an event or event sequence that already exists in the widget’s translations, the new translation is merged in and override the widget’s translation.

To replace a widget’s translations completely, use XtSetValues on the XtNtranslations resource and specify a compiled translation table as the value.

The XtUninstallTranslations function causes the entire translation table for widget to be removed.

SEE ALSO

XtAppAddActions(3), XtCreatePopupShell(3), XtParseAcceleratorTable(3), XtPopup(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1773 - Linux cli command pcap_looppcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_looppcap and provides detailed information about the command pcap_looppcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_looppcap.

NAME 🖥️ pcap_looppcap 🖥️

process packets from a live capture or savefile

SYNOPSIS

#include <pcap/pcap.h>
typedef void (*pcap_handler)(u_char *user, const struct pcap_pkthdr *h,
			     const u_char *bytes);
int pcap_loop(pcap_t *p, int cnt,
pcap_handler callback, u_char *user);
int pcap_dispatch(pcap_t *p, int cnt,
pcap_handler callback, u_char *user);

DESCRIPTION

pcap_loop() processes packets from a live capture or ``savefile’’ until cnt packets are processed, the end of the ``savefile’’ is reached when reading from a ``savefile’’, pcap_breakloop(3PCAP) is called, or an error occurs. It does not return when live packet buffer timeouts occur. A value of -1 or 0 for cnt is equivalent to infinity, so that packets are processed until another ending condition occurs.

pcap_dispatch() processes packets from a live capture or ``savefile’’ until cnt packets are processed, the end of the current bufferful of packets is reached when doing a live capture, the end of the ``savefile’’ is reached when reading from a ``savefile’’, pcap_breakloop() is called, or an error occurs. Thus, when doing a live capture, cnt is the maximum number of packets to process before returning, but is not a minimum number; when reading a live capture, only one bufferful of packets is read at a time, so fewer than cnt packets may be processed. A value of -1 or 0 for cnt causes all the packets received in one buffer to be processed when reading a live capture, and causes all the packets in the file to be processed when reading a ``savefile’'.

Note that, when doing a live capture on some platforms, if the read timeout expires when there are no packets available, pcap_dispatch() will return 0, even when not in non-blocking mode, as there are no packets to process. Applications should be prepared for this to happen, but must not rely on it happening.

callback specifies a pcap_handler routine to be called with three arguments: a u_char pointer which is passed in the user argument to pcap_loop() or pcap_dispatch(), a const struct pcap_pkthdr pointer pointing to the packet time stamp and lengths, and a const u_char pointer to the first caplen (as given in the struct pcap_pkthdr a pointer to which is passed to the callback routine) bytes of data from the packet. The struct pcap_pkthdr and the packet data are not to be freed by the callback routine, and are not guaranteed to be valid after the callback routine returns; if the code needs them to be valid after the callback, it must make a copy of them.

The bytes of data from the packet begin with a link-layer header. The format of the link-layer header is indicated by the return value of the pcap_datalink(3PCAP) routine when handed the pcap_t value also passed to pcap_loop() or pcap_dispatch(). https://www.tcpdump.org/linktypes.html lists the values pcap_datalink() can return and describes the packet formats that correspond to those values. The value it returns will be valid for all packets received unless and until pcap_set_datalink(3PCAP) is called; after a successful call to pcap_set_datalink(), all subsequent packets will have a link-layer header of the type specified by the link-layer header type value passed to pcap_set_datalink().

Do NOT assume that the packets for a given capture or ``savefile`` will have any given link-layer header type, such as DLT_EN10MB for Ethernet. For example, the “any” device on Linux will have a link-layer header type of DLT_LINUX_SLL or DLT_LINUX_SLL2 even if all devices on the system at the time the “any” device is opened have some other data link type, such as DLT_EN10MB for Ethernet.

RETURN VALUE

pcap_loop() returns 0 if cnt is exhausted or if, when reading from a ``savefile’’, no more packets are available. It returns PCAP_ERROR_BREAK if the loop terminated due to a call to pcap_breakloop() before any packets were processed, PCAP_ERROR_NOT_ACTIVATED if called on a capture handle that has been created but not activated, or PCAP_ERROR if another error occurs. It does not return when live packet buffer timeouts occur; instead, it attempts to read more packets.

pcap_dispatch() returns the number of packets processed on success; this can be 0 if no packets were read from a live capture (if, for example, they were discarded because they didn’t pass the packet filter, or if, on platforms that support a packet buffer timeout that starts before any packets arrive, the timeout expires before any packets arrive, or if the file descriptor for the capture device is in non-blocking mode and no packets were available to be read) or if no more packets are available in a ``savefile.’’ It returns PCAP_ERROR_BREAK if the loop terminated due to a call to pcap_breakloop() before any packets were processed, PCAP_ERROR_NOT_ACTIVATED if called on a capture handle that has been created but not activated, or PCAP_ERROR if another error occurs.

If your application uses pcap_breakloop(), make sure that you explicitly check for PCAP_ERROR and PCAP_ERROR_BREAK, rather than just checking for a return value < 0.

If PCAP_ERROR is returned, pcap_geterr(3PCAP) or pcap_perror(3PCAP) may be called with p as an argument to fetch or display the error text.

BACKWARD COMPATIBILITY

In libpcap versions before 1.5.0, the behavior when cnt was 0 was undefined; different platforms and devices behaved differently, so code that must work with these versions of libpcap should use -1, not 0, as the value of cnt.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1774 - Linux cli command pcap_minor_versionpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_minor_versionpcap and provides detailed information about the command pcap_minor_versionpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_minor_versionpcap.

NAME 🖥️ pcap_minor_versionpcap 🖥️

get the version number of a savefile

SYNOPSIS

#include <pcap/pcap.h>
int pcap_major_version(pcap_t *p);
int pcap_minor_version(pcap_t *p);

DESCRIPTION

If p refers to a ``savefile’’, pcap_major_version() returns the major number of the file format of the ``savefile’’ and pcap_minor_version() returns the minor number of the file format of the ``savefile’’. The version number is stored in the ``savefile’’; note that the meaning of its values depends on the type of ``savefile’’ (for example, pcap or pcapng).

If p refers to a live capture, the values returned by pcap_major_version() and pcap_minor_version() are not meaningful.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1775 - Linux cli command twalk

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command twalk and provides detailed information about the command twalk, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the twalk.

NAME 🖥️ twalk 🖥️

manage a binary search tree

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <search.h>
typedef enum { preorder, postorder, endorder, leaf } VISIT;
void *tsearch(const void *key, void **rootp,
 int (*compar)(const void *, const void *));
void *tfind(const void *key, void *const *rootp,
 int (*compar)(const void *, const void *));
void *tdelete(const void *restrict key, void **restrict rootp,
 int (*compar)(const void *, const void *));
void twalk(const void *root,
 void (*action)(const void *nodep, VISIT which,
 int depth));
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <search.h>
void twalk_r(const void *root,
 void (*action)(const void *nodep, VISIT which,
 void *closure),
 void *closure);
void tdestroy(void *root, void (*free_node)(void *nodep));

DESCRIPTION

tsearch(), tfind(), twalk(), and tdelete() manage a binary search tree. They are generalized from Knuth (6.2.2) Algorithm T. The first field in each node of the tree is a pointer to the corresponding data item. (The calling program must store the actual data.) compar points to a comparison routine, which takes pointers to two items. It should return an integer which is negative, zero, or positive, depending on whether the first item is less than, equal to, or greater than the second.

tsearch() searches the tree for an item. key points to the item to be searched for. rootp points to a variable which points to the root of the tree. If the tree is empty, then the variable that rootp points to should be set to NULL. If the item is found in the tree, then tsearch() returns a pointer to the corresponding tree node. (In other words, tsearch() returns a pointer to a pointer to the data item.) If the item is not found, then tsearch() adds it, and returns a pointer to the corresponding tree node.

tfind() is like tsearch(), except that if the item is not found, then tfind() returns NULL.

tdelete() deletes an item from the tree. Its arguments are the same as for tsearch().

twalk() performs depth-first, left-to-right traversal of a binary tree. root points to the starting node for the traversal. If that node is not the root, then only part of the tree will be visited. twalk() calls the user function action each time a node is visited (that is, three times for an internal node, and once for a leaf). action, in turn, takes three arguments. The first argument is a pointer to the node being visited. The structure of the node is unspecified, but it is possible to cast the pointer to a pointer-to-pointer-to-element in order to access the element stored within the node. The application must not modify the structure pointed to by this argument. The second argument is an integer which takes one of the values preorder, postorder, or endorder depending on whether this is the first, second, or third visit to the internal node, or the value leaf if this is the single visit to a leaf node. (These symbols are defined in <search.h>.) The third argument is the depth of the node; the root node has depth zero.

(More commonly, preorder, postorder, and endorder are known as preorder, inorder, and postorder: before visiting the children, after the first and before the second, and after visiting the children. Thus, the choice of name postorder is rather confusing.)

twalk_r() is similar to twalk(), but instead of the depth argument, the closure argument pointer is passed to each invocation of the action callback, unchanged. This pointer can be used to pass information to and from the callback function in a thread-safe fashion, without resorting to global variables.

tdestroy() removes the whole tree pointed to by root, freeing all resources allocated by the tsearch() function. For the data in each tree node the function free_node is called. The pointer to the data is passed as the argument to the function. If no such work is necessary, free_node must point to a function doing nothing.

RETURN VALUE

tsearch() returns a pointer to a matching node in the tree, or to the newly added node, or NULL if there was insufficient memory to add the item. tfind() returns a pointer to the node, or NULL if no match is found. If there are multiple items that match the key, the item whose node is returned is unspecified.

tdelete() returns a pointer to the parent of the node deleted, or NULL if the item was not found. If the deleted node was the root node, tdelete() returns a dangling pointer that must not be accessed.

tsearch(), tfind(), and tdelete() also return NULL if rootp was NULL on entry.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tsearch(), tfind(), tdelete()

Thread safetyMT-Safe race:rootp

twalk()

Thread safetyMT-Safe race:root

twalk_r()

Thread safetyMT-Safe race:root

tdestroy()

Thread safetyMT-Safe

STANDARDS

tsearch()
tfind()
tdelete()
twalk()
POSIX.1-2008.

tdestroy()
twalk_r()
GNU.

HISTORY

tsearch()
tfind()
tdelete()
twalk()
POSIX.1-2001, POSIX.1-2008, SVr4.

twalk_r()
glibc 2.30.

NOTES

twalk() takes a pointer to the root, while the other functions take a pointer to a variable which points to the root.

tdelete() frees the memory required for the node in the tree. The user is responsible for freeing the memory for the corresponding data.

The example program depends on the fact that twalk() makes no further reference to a node after calling the user function with argument “endorder” or “leaf”. This works with the GNU library implementation, but is not in the System V documentation.

EXAMPLES

The following program inserts twelve random numbers into a binary tree, where duplicate numbers are collapsed, then prints the numbers in order.

#define _GNU_SOURCE     /* Expose declaration of tdestroy() */
#include <search.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
static void *root = NULL;
static void *
xmalloc(size_t n)
{
    void *p;
    p = malloc(n);
    if (p)
        return p;
    fprintf(stderr, "insufficient memory

“); exit(EXIT_FAILURE); } static int compare(const void *pa, const void pb) { if ((int *) pa < *(int ) pb) return -1; if ((int *) pa > *(int *) pb) return 1; return 0; } static void action(const void *nodep, VISIT which, int depth) { int *datap; switch (which) { case preorder: break; case postorder: datap = *(int **) nodep; printf("%6d “, *datap); break; case endorder: break; case leaf: datap = *(int **) nodep; printf("%6d “, *datap); break; } } int main(void) { int *ptr; int **val; srand(time(NULL)); for (unsigned int i = 0; i < 12; i++) { ptr = xmalloc(sizeof(*ptr)); *ptr = rand() & 0xff; val = tsearch(ptr, &root, compare); if (val == NULL) exit(EXIT_FAILURE); if (*val != ptr) free(ptr); } twalk(root, action); tdestroy(root, free); exit(EXIT_SUCCESS); }

SEE ALSO

bsearch(3), hsearch(3), lsearch(3), qsort(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1776 - Linux cli command key_secretkey_is_set

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command key_secretkey_is_set and provides detailed information about the command key_secretkey_is_set, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the key_secretkey_is_set.

NAME 🖥️ key_secretkey_is_set 🖥️

interfaces to rpc keyserver daemon

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <rpc/rpc.h>
int key_decryptsession(char *remotename, des_block *deskey);
int key_encryptsession(char *remotename, des_block *deskey);
int key_gendes(des_block *deskey);
int key_setsecret(char *key);
int key_secretkey_is_set(void);

DESCRIPTION

The functions here are used within the RPC’s secure authentication mechanism (AUTH_DES). There should be no need for user programs to use this functions.

The function key_decryptsession() uses the (remote) server netname and takes the DES key for decrypting. It uses the public key of the server and the secret key associated with the effective UID of the calling process.

The function key_encryptsession() is the inverse of key_decryptsession(). It encrypts the DES keys with the public key of the server and the secret key associated with the effective UID of the calling process.

The function key_gendes() is used to ask the keyserver for a secure conversation key.

The function key_setsecret() is used to set the key for the effective UID of the calling process.

The function key_secretkey_is_set() can be used to determine whether a key has been set for the effective UID of the calling process.

RETURN VALUE

These functions return 1 on success and 0 on failure.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

key_decryptsession(), key_encryptsession(), key_gendes(), key_setsecret(), key_secretkey_is_set()

Thread safetyMT-Safe

NOTES

Note that we talk about two types of encryption here. One is asymmetric using a public and secret key. The other is symmetric, the 64-bit DES.

These routines were part of the Linux/Doors-project, abandoned by now.

SEE ALSO

crypt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1777 - Linux cli command pcap_set_timeoutpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_set_timeoutpcap and provides detailed information about the command pcap_set_timeoutpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_set_timeoutpcap.

NAME 🖥️ pcap_set_timeoutpcap 🖥️

set the packet buffer timeout for a not-yet-activated capture handle

SYNOPSIS

#include <pcap/pcap.h>
int pcap_set_timeout(pcap_t *p, int to_ms);

DESCRIPTION

pcap_set_timeout() sets the packet buffer timeout that will be used on a capture handle when the handle is activated to to_ms, which is in units of milliseconds. (See pcap(3PCAP) for an explanation of the packet buffer timeout.)

The behavior, if the timeout isn’t specified, is undefined, as is the behavior if the timeout is set to zero or to a negative value. We recommend always setting the timeout to a non-zero value unless immediate mode is set, in which case the timeout has no effect.

RETURN VALUE

pcap_set_timeout() returns 0 on success or PCAP_ERROR_ACTIVATED if called on a capture handle that has been activated.

SEE ALSO

pcap_create(3PCAP), pcap_activate(3PCAP), pcap_set_immediate_mode(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1778 - Linux cli command seekdir

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command seekdir and provides detailed information about the command seekdir, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the seekdir.

NAME 🖥️ seekdir 🖥️

set the position of the next readdir() call in the directory stream.

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <dirent.h>
void seekdir(DIR *dirp, long loc);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

seekdir():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The seekdir() function sets the location in the directory stream from which the next readdir(2) call will start. The loc argument should be a value returned by a previous call to telldir(3).

RETURN VALUE

The seekdir() function returns no value.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

seekdir()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, 4.3BSD.

CAVEATS

Up to glibc 2.1.1, the type of the loc argument was off_t. POSIX.1-2001 specifies long, and this is the type used since glibc 2.1.2. See telldir(3) for information on why you should be careful in making any assumptions about the value in this argument.

SEE ALSO

lseek(2), closedir(3), opendir(3), readdir(3), rewinddir(3), scandir(3), telldir(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1779 - Linux cli command strtoimax

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strtoimax and provides detailed information about the command strtoimax, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strtoimax.

NAME 🖥️ strtoimax 🖥️

convert string to integer

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <inttypes.h>
intmax_t strtoimax(const char *restrict nptr, char **restrict endptr,
 int base);
uintmax_t strtoumax(const char *restrict nptr, char **restrict endptr,
 int base);

DESCRIPTION

These functions are just like strtol(3) and strtoul(3), except that they return a value of type intmax_t and uintmax_t, respectively.

RETURN VALUE

On success, the converted value is returned. If nothing was found to convert, zero is returned. On overflow or underflow INTMAX_MAX or INTMAX_MIN or UINTMAX_MAX is returned, and errno is set to ERANGE.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strtoimax(), strtoumax()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

imaxabs(3), imaxdiv(3), strtol(3), strtoul(3), wcstoimax(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1780 - Linux cli command XtSetWarningHandler

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtSetWarningHandler and provides detailed information about the command XtSetWarningHandler, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtSetWarningHandler.

NAME 🖥️ XtSetWarningHandler 🖥️

low-level error handlers

SYNTAX

#include <X11/Intrinsic.h>

void XtError(const char *message);

void XtSetErrorHandler(XtErrorHandler handler);

void XtSetWarningHandler(XtErrorHandler handler);

void XtWarning(const char *message);

ARGUMENTS

message
Specifies the nonfatal error message that is to be reported.

handler
Specifies the new fatal error procedure, which should not return, or the nonfatal error procedure, which usually returns.

message
Specifies the message that is to be reported.

DESCRIPTION

The XtError function has been superceded by XtAppError.

The XtSetErrorHandler function has been superceded by XtAppSetErrorHandler.

The XtSetWarningHandler function has been superceded by XtAppSetWarningHandler.

The XtWarning function has been superceded by XtAppWarning.

SEE ALSO

XtAppError(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1781 - Linux cli command __fwritable

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __fwritable and provides detailed information about the command __fwritable, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __fwritable.

NAME 🖥️ __fwritable 🖥️

interfaces to stdio FILE structure

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
#include <stdio_ext.h>
size_t __fbufsize(FILE *stream);
size_t __fpending(FILE *stream);
int __flbf(FILE *stream);
int __freadable(FILE *stream);
int __fwritable(FILE *stream);
int __freading(FILE *stream);
int __fwriting(FILE *stream);
int __fsetlocking(FILE *stream, int type);
void _flushlbf(void);
void __fpurge(FILE *stream);

DESCRIPTION

Solaris introduced routines to allow portable access to the internals of the FILE structure, and glibc also implemented these.

The __fbufsize() function returns the size of the buffer currently used by the given stream.

The __fpending() function returns the number of bytes in the output buffer. For wide-oriented streams the unit is wide characters. This function is undefined on buffers in reading mode, or opened read-only.

The __flbf() function returns a nonzero value if the stream is line-buffered, and zero otherwise.

The __freadable() function returns a nonzero value if the stream allows reading, and zero otherwise.

The __fwritable() function returns a nonzero value if the stream allows writing, and zero otherwise.

The __freading() function returns a nonzero value if the stream is read-only, or if the last operation on the stream was a read operation, and zero otherwise.

The __fwriting() function returns a nonzero value if the stream is write-only (or append-only), or if the last operation on the stream was a write operation, and zero otherwise.

The __fsetlocking() function can be used to select the desired type of locking on the stream. It returns the current type. The type argument can take the following three values:

FSETLOCKING_INTERNAL
Perform implicit locking around every operation on the given stream (except for the *_unlocked ones). This is the default.

FSETLOCKING_BYCALLER
The caller will take care of the locking (possibly using flockfile(3) in case there is more than one thread), and the stdio routines will not do locking until the state is reset to FSETLOCKING_INTERNAL.

FSETLOCKING_QUERY
Don’t change the type of locking. (Only return it.)

The _flushlbf() function flushes all line-buffered streams. (Presumably so that output to a terminal is forced out, say before reading keyboard input.)

The __fpurge() function discards the contents of the stream’s buffer.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

__fbufsize(), __fpending(), __fpurge(), __fsetlocking()

Thread safetyMT-Safe race:stream

__flbf(), __freadable(), __freading(), __fwritable(), __fwriting(), _flushlbf()

Thread safetyMT-Safe

SEE ALSO

flockfile(3), fpurge(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1782 - Linux cli command pthread_setattr_default_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_setattr_default_np and provides detailed information about the command pthread_setattr_default_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_setattr_default_np.

NAME 🖥️ pthread_setattr_default_np 🖥️

get or set default thread-creation attributes

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <pthread.h>
int pthread_getattr_default_np(pthread_attr_t *attr);
int pthread_setattr_default_np(const pthread_attr_t *attr);

DESCRIPTION

The pthread_setattr_default_np() function sets the default attributes used for creation of a new thread—that is, the attributes that are used when pthread_create(3) is called with a second argument that is NULL. The default attributes are set using the attributes supplied in *attr, a previously initialized thread attributes object. Note the following details about the supplied attributes object:

  • The attribute settings in the object must be valid.

  • The stack address attribute must not be set in the object.

  • Setting the stack size attribute to zero means leave the default stack size unchanged.

The pthread_getattr_default_np() function initializes the thread attributes object referred to by attr so that it contains the default attributes used for thread creation.

ERRORS

EINVAL
(pthread_setattr_default_np()) One of the attribute settings in attr is invalid, or the stack address attribute is set in attr.

ENOMEM
(pthread_setattr_default_np()) Insufficient memory.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_getattr_default_np(), pthread_setattr_default_np()

Thread safetyMT-Safe

STANDARDS

GNU; hence the suffix “_np” (nonportable) in their names.

HISTORY

glibc 2.18.

EXAMPLES

The program below uses pthread_getattr_default_np() to fetch the default thread-creation attributes and then displays various settings from the returned thread attributes object. When running the program, we see the following output:

$ ./a.out
Stack size:          8388608
Guard size:          4096
Scheduling policy:   SCHED_OTHER
Scheduling priority: 0
Detach state:        JOINABLE
Inherit scheduler:   INHERIT

Program source

#define _GNU_SOURCE
#include <err.h>
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
static void
display_pthread_attr(pthread_attr_t *attr)
{
    int s;
    size_t stacksize;
    size_t guardsize;
    int policy;
    struct sched_param schedparam;
    int detachstate;
    int inheritsched;
    s = pthread_attr_getstacksize(attr, &stacksize);
    if (s != 0)
        errc(EXIT_FAILURE, s, "pthread_attr_getstacksize");
    printf("Stack size:          %zu

“, stacksize); s = pthread_attr_getguardsize(attr, &guardsize); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_getguardsize”); printf(“Guard size: %zu “, guardsize); s = pthread_attr_getschedpolicy(attr, &policy); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_getschedpolicy”); printf(“Scheduling policy: %s “, (policy == SCHED_FIFO) ? “SCHED_FIFO” : (policy == SCHED_RR) ? “SCHED_RR” : (policy == SCHED_OTHER) ? “SCHED_OTHER” : “[unknown]”); s = pthread_attr_getschedparam(attr, &schedparam); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_getschedparam”); printf(“Scheduling priority: %d “, schedparam.sched_priority); s = pthread_attr_getdetachstate(attr, &detachstate); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_getdetachstate”); printf(“Detach state: %s “, (detachstate == PTHREAD_CREATE_DETACHED) ? “DETACHED” : (detachstate == PTHREAD_CREATE_JOINABLE) ? “JOINABLE” : “???”); s = pthread_attr_getinheritsched(attr, &inheritsched); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_getinheritsched”); printf(“Inherit scheduler: %s “, (inheritsched == PTHREAD_INHERIT_SCHED) ? “INHERIT” : (inheritsched == PTHREAD_EXPLICIT_SCHED) ? “EXPLICIT” : “???”); } int main(void) { int s; pthread_attr_t attr; s = pthread_getattr_default_np(&attr); if (s != 0) errc(EXIT_FAILURE, s, “pthread_getattr_default_np”); display_pthread_attr(&attr); exit(EXIT_SUCCESS); }

SEE ALSO

pthread_attr_getaffinity_np(3), pthread_attr_getdetachstate(3), pthread_attr_getguardsize(3), pthread_attr_getinheritsched(3), pthread_attr_getschedparam(3), pthread_attr_getschedpolicy(3), pthread_attr_getscope(3), pthread_attr_getstack(3), pthread_attr_getstackaddr(3), pthread_attr_getstacksize(3), pthread_attr_init(3), pthread_create(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1783 - Linux cli command frexpf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command frexpf and provides detailed information about the command frexpf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the frexpf.

NAME 🖥️ frexpf 🖥️

convert floating-point number to fractional and integral components

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double frexp(double x, int *exp);
float frexpf(float x, int *exp);
long double frexpl(long double x, int *exp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

frexpf(), frexpl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions are used to split the number x into a normalized fraction and an exponent which is stored in exp.

RETURN VALUE

These functions return the normalized fraction. If the argument x is not zero, the normalized fraction is x times a power of two, and its absolute value is always in the range 1/2 (inclusive) to 1 (exclusive), that is, [0.5,1).

If x is zero, then the normalized fraction is zero and zero is stored in exp.

If x is a NaN, a NaN is returned, and the value of *exp is unspecified.

If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned, and the value of *exp is unspecified.

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

frexp(), frexpf(), frexpl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

EXAMPLES

The program below produces results such as the following:

$ ./a.out 2560
frexp(2560, &e) = 0.625: 0.625 * 2^12 = 2560
$ ./a.out -4
frexp(-4, &e) = -0.5: -0.5 * 2^3 = -4

Program source

#include <float.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
    double x, r;
    int exp;
    x = strtod(argv[1], NULL);
    r = frexp(x, &exp);
    printf("frexp(%g, &e) = %g: %g * %d^%d = %g

“, x, r, r, 2, exp, x); exit(EXIT_SUCCESS); }

SEE ALSO

ldexp(3), modf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1784 - Linux cli command XtAppWarning

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppWarning and provides detailed information about the command XtAppWarning, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppWarning.

NAME 🖥️ XtAppWarning 🖥️

low-level error handlers

SYNTAX

#include <X11/Intrinsic.h>

void XtAppError(XtAppContext app_context, const char *message);

XtErrorHandler XtAppSetErrorHandler(XtAppContext app_context, XtErrorHandler handler);

XtErrorHandler XtAppSetWarningHandler(XtAppContext app_context, XtErrorHandler handler);

void XtAppWarning(XtAppContext app_context, const char *message);

ARGUMENTS

app_context
Specifies the application context.

message
Specifies the nonfatal error message that is to be reported.

handler
Specifies the new fatal error procedure, which should not return, or the nonfatal error procedure, which usually returns.

message
Specifies the message that is to be reported.

DESCRIPTION

The XtAppError function calls the installed error procedure and passes the specified message.

The XtAppSetErrorHandler function registers the specified procedure, which is called when a fatal error condition occurs.

The XtAppSetWarningHandler registers the specified procedure, which is called when a nonfatal error condition occurs.

The XtAppWarning function calls the installed nonfatal error procedure and passes the specified message.

SEE ALSO

XtAppGetErrorDatabase(3), XtAppErrorMsg(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1785 - Linux cli command pow10l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pow10l and provides detailed information about the command pow10l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pow10l.

NAME 🖥️ pow10l 🖥️

base-10 power functions

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <math.h>
double pow10(double x);
float pow10f(float x);
long double pow10l(long double x);

DESCRIPTION

These functions return the value of 10 raised to the power x.

Note well: These functions perform exactly the same task as the functions described in exp10(3), with the difference that the latter functions are now standardized in TS 18661-4:2015. Those latter functions should be used in preference to the functions described in this page.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pow10(), pow10f(), pow10l()

Thread safetyMT-Safe

STANDARDS

GNU.

VERSIONS

glibc 2.1. Removed in glibc 2.27.

SEE ALSO

exp10(3), pow(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1786 - Linux cli command SLIST_HEAD

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SLIST_HEAD and provides detailed information about the command SLIST_HEAD, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SLIST_HEAD.

NAME 🖥️ SLIST_HEAD 🖥️

implementation of a singly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
SLIST_ENTRY(TYPE);
SLIST_HEAD(HEADNAME, TYPE);
SLIST_HEAD SLIST_HEAD_INITIALIZER(SLIST_HEAD head);
void SLIST_INIT(SLIST_HEAD *head);
int SLIST_EMPTY(SLIST_HEAD *head);
void SLIST_INSERT_HEAD(SLIST_HEAD *head,
 struct TYPE *elm, SLIST_ENTRY NAME);
void SLIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, SLIST_ENTRY NAME);
struct TYPE *SLIST_FIRST(SLIST_HEAD *head);
struct TYPE *SLIST_NEXT(struct TYPE *elm, SLIST_ENTRY NAME);
SLIST_FOREACH(struct TYPE *var, SLIST_HEAD *head, SLIST_ENTRY NAME);
void SLIST_REMOVE(SLIST_HEAD *head, struct TYPE *elm,
 SLIST_ENTRY NAME);
void SLIST_REMOVE_HEAD(SLIST_HEAD *head,
 SLIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on singly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type SLIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro SLIST_HEAD().

Creation

A singly linked list is headed by a structure defined by the SLIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the list after an existing element or at the head of the list. An SLIST_HEAD structure is declared as follows:

SLIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

SLIST_ENTRY() declares a structure that connects the elements in the list.

SLIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

SLIST_INIT() initializes the list referenced by head.

SLIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

SLIST_INSERT_HEAD() inserts the new element elm at the head of the list.

SLIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

SLIST_FIRST() returns the first element in the list, or NULL if the list is empty.

SLIST_NEXT() returns the next element in the list.

SLIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

SLIST_REMOVE() removes the element elm from the list.

SLIST_REMOVE_HEAD() removes the element elm from the head of the list. For optimum efficiency, elements being removed from the head of the list should explicitly use this macro instead of the generic SLIST_REMOVE().

RETURN VALUE

SLIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

SLIST_FIRST(), and SLIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

SLIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

SLIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. SLIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    SLIST_ENTRY(entry) entries;             /* Singly linked list */
};
SLIST_HEAD(slisthead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct slisthead head;                  /* Singly linked list
                                               head */
    SLIST_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    SLIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    SLIST_INSERT_AFTER(n1, n2, entries);
    SLIST_REMOVE(&head, n2, entry, entries);/* Deletion */
    free(n2);
    n3 = SLIST_FIRST(&head);
    SLIST_REMOVE_HEAD(&head, entries);      /* Deletion from the head */
    free(n3);
    for (unsigned int i = 0; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        SLIST_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    SLIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); while (!SLIST_EMPTY(&head)) { /* List deletion */ n1 = SLIST_FIRST(&head); SLIST_REMOVE_HEAD(&head, entries); free(n1); } SLIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1787 - Linux cli command XtScreenDatabase

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtScreenDatabase and provides detailed information about the command XtScreenDatabase, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtScreenDatabase.

NAME 🖥️ XtScreenDatabase 🖥️

initialize, open, or close a display

SYNTAX

#include <X11/Intrinsic.h>

void XtDisplayInitialize(XtAppContext app_context, Display *display, const char *application_name, const char *application_class, XrmOptionDescRec *options, Cardinal num_options, int *argc, char **argv);

Display *XtOpenDisplay(XtAppContext app_context, const char *display_string, const char *application_name, const char *application_class, XrmOptionDescRec *options, Cardinal num_options, int *argc, char **argv);

void XtCloseDisplay(Display *display);

XrmDatabase XtDatabase(Display *display);

XrmDatabase XtScreenDatabase(Screen* screen);

ARGUMENTS

argc
Specifies a pointer to the number of command line parameters.

argv
Specifies the command line parameters.

app_context
Specifies the application context.

application_class
Specifies the class name of this application, which usually is the generic name for all instances of this application.

application_name
Specifies the name of the application instance.

display
Specifies the display. Note that a display can be in at most one application context.

num_options
Specifies the number of entries in the options list.

options
Specifies how to parse the command line for any application-specific resources. The options argument is passed as a parameter to XrmParseCommand. For further information, see Xlib - C Language X Interface.

screen
Specifies the screen whose resource database is to be returned.

DESCRIPTION

The XtDisplayInitialize function builds the resource database, calls the Xlib XrmParseCommand function to parse the command line, and performs other per display initialization. After XrmParseCommand has been called, argc and argv contain only those parameters that were not in the standard option table or in the table specified by the options argument. If the modified argc is not zero, most applications simply print out the modified argv along with a message listing the allowable options. On UNIX-based systems, the application name is usually the final component of argv[0]. If the synchronize resource is True for the specified application, XtDisplayInitialize calls the Xlib XSynchronize function to put Xlib into synchronous mode for this display connection. If the reverseVideo resource is True, the Intrinsics exchange XtDefaultForeground and XtDefaultBackground for widgets created on this display. (See Section 9.6.1).

The XtOpenDisplay function calls XOpenDisplay the specified display name. If display_string is NULL, XtOpenDisplay uses the current value of the -display option specified in argv and if no display is specified in argv, uses the user’s default display (on UNIX-based systems, this is the value of the DISPLAY environment variable).

If this succeeds, it then calls XtDisplayInitialize and pass it the opened display and the value of the -name option specified in argv as the application name. If no name option is specified, it uses the application name passed to XtOpenDisplay. If the application name is NULL, it uses the last component of argv[0]. XtOpenDisplay returns the newly opened display or NULL if it failed.

XtOpenDisplay is provided as a convenience to the application programmer.

The XtCloseDisplay function closes the specified display as soon as it is safe to do so. If called from within an event dispatch (for example, a callback procedure), XtCloseDisplay does not close the display until the dispatch is complete. Note that applications need only call XtCloseDisplay if they are to continue executing after closing the display; otherwise, they should call XtDestroyApplicationContext or just exit.

The XtDatabase function returns the fully merged resource database that was built by XtDisplayInitialize associated with the display that was passed in. If this display has not been initialized by XtDisplayInitialize, the results are not defined.

The XtScreenDatabase function returns the fully merged resource database associated with the specified screen. If the screen does not belong to a Display initialized by XtDisplayInitialize, the results are undefined.

SEE ALSO

XtAppCreateShell(3), XtCreateApplicationContext(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1788 - Linux cli command getnetent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getnetent and provides detailed information about the command getnetent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getnetent.

NAME 🖥️ getnetent 🖥️

get network entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
struct netent *getnetent(void);
struct netent *getnetbyname(const char *name);
struct netent *getnetbyaddr(uint32_t net, int type);
void setnetent(int stayopen);
void endnetent(void);

DESCRIPTION

The getnetent() function reads the next entry from the networks database and returns a netent structure containing the broken-out fields from the entry. A connection is opened to the database if necessary.

The getnetbyname() function returns a netent structure for the entry from the database that matches the network name.

The getnetbyaddr() function returns a netent structure for the entry from the database that matches the network number net of type type. The net argument must be in host byte order.

The setnetent() function opens a connection to the database, and sets the next entry to the first entry. If stayopen is nonzero, then the connection to the database will not be closed between calls to one of the getnet*() functions.

The endnetent() function closes the connection to the database.

The netent structure is defined in <netdb.h> as follows:

struct netent {
    char      *n_name;     /* official network name */
    char     **n_aliases;  /* alias list */
    int        n_addrtype; /* net address type */
    uint32_t   n_net;      /* network number */
}

The members of the netent structure are:

n_name
The official name of the network.

n_aliases
A NULL-terminated list of alternative names for the network.

n_addrtype
The type of the network number; always AF_INET.

n_net
The network number in host byte order.

RETURN VALUE

The getnetent(), getnetbyname(), and getnetbyaddr() functions return a pointer to a statically allocated netent structure, or a null pointer if an error occurs or the end of the file is reached.

FILES

/etc/networks
networks database file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getnetent()

Thread safety

MT-Unsafe race:netent race:netentbuf env locale

getnetbyname()

Thread safety

MT-Unsafe race:netbyname env locale

getnetbyaddr()

Thread safety

MT-Unsafe race:netbyaddr locale

setnetent(), endnetent()

Thread safety

MT-Unsafe race:netent env locale

In the above table, netent in race:netent signifies that if any of the functions setnetent(), getnetent(), or endnetent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, 4.3BSD.

Before glibc 2.2, the net argument of getnetbyaddr() was of type long.

SEE ALSO

getnetent_r(3), getprotoent(3), getservent(3)
RFC 1101

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1789 - Linux cli command lrintl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lrintl and provides detailed information about the command lrintl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lrintl.

NAME 🖥️ lrintl 🖥️

round to nearest integer

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
long lrint(double x);
long lrintf(float x);
long lrintl(long double x);
long long llrint(double x);
long long llrintf(float x);
long long llrintl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions round their argument to the nearest integer value, using the current rounding direction (see fesetround(3)).

Note that unlike the rint(3) family of functions, the return type of these functions differs from that of their arguments.

RETURN VALUE

These functions return the rounded integer value.

If x is a NaN or an infinity, or the rounded value is too large to be stored in a long (long long in the case of the ll* functions), then a domain error occurs, and the return value is unspecified.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is a NaN or infinite, or the rounded value is too large
An invalid floating-point exception (FE_INVALID) is raised.

These functions do not set errno.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

lrint(), lrintf(), lrintl(), llrint(), llrintf(), llrintl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

ceil(3), floor(3), lround(3), nearbyint(3), rint(3), round(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1790 - Linux cli command LIST_INSERT_HEAD

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LIST_INSERT_HEAD and provides detailed information about the command LIST_INSERT_HEAD, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LIST_INSERT_HEAD.

NAME 🖥️ LIST_INSERT_HEAD 🖥️

implementation of a doubly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
LIST_ENTRY(TYPE);
LIST_HEAD(HEADNAME, TYPE);
LIST_HEAD LIST_HEAD_INITIALIZER(LIST_HEAD head);
void LIST_INIT(LIST_HEAD *head);
int LIST_EMPTY(LIST_HEAD *head);
void LIST_INSERT_HEAD(LIST_HEAD *head,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
struct TYPE *LIST_FIRST(LIST_HEAD *head);
struct TYPE *LIST_NEXT(struct TYPE *elm, LIST_ENTRY NAME);
LIST_FOREACH(struct TYPE *var, LIST_HEAD *head, LIST_ENTRY NAME);
void LIST_REMOVE(struct TYPE *elm, LIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type LIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro LIST_HEAD().

Creation

A list is headed by a structure defined by the LIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are doubly linked so that an arbitrary element can be removed without traversing the list. New elements can be added to the list after an existing element, before an existing element, or at the head of the list. A LIST_HEAD structure is declared as follows:

LIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

LIST_ENTRY() declares a structure that connects the elements in the list.

LIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

LIST_INIT() initializes the list referenced by head.

LIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

LIST_INSERT_HEAD() inserts the new element elm at the head of the list.

LIST_INSERT_BEFORE() inserts the new element elm before the element listelm.

LIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

LIST_FIRST() returns the first element in the list, or NULL if the list is empty.

LIST_NEXT() returns the next element in the list, or NULL if this is the last.

LIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

LIST_REMOVE() removes the element elm from the list.

RETURN VALUE

LIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

LIST_FIRST(), and LIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

LIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

LIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. LIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    LIST_ENTRY(entry) entries;              /* List */
};
LIST_HEAD(listhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct listhead head;                   /* List head */
    int i;
    LIST_INIT(&head);                       /* Initialize the list */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    LIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    LIST_INSERT_AFTER(n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    LIST_INSERT_BEFORE(n2, n3, entries);
    i = 0;                                  /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        np->data = i++;
    LIST_REMOVE(n2, entries);               /* Deletion */
    free(n2);
                                            /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* List deletion */ n1 = LIST_FIRST(&head); while (n1 != NULL) { n2 = LIST_NEXT(n1, entries); free(n1); n1 = n2; } LIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1791 - Linux cli command XtAsprintf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAsprintf and provides detailed information about the command XtAsprintf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAsprintf.

NAME 🖥️ XtAsprintf 🖥️

memory management functions

SYNTAX

#include <X11/Intrinsic.h>

char *XtMalloc(Cardinal size);

char *XtCalloc(Cardinal num, Cardinal size);

char *XtRealloc(char *ptr, Cardinal num);

void XtFree(char *ptr);

type *XtNew(type);

String XtNewString(String string);

Cardinal XtAsprintf(char **new_string, const char *format, …);

ARGUMENTS

num
Specifies the number of bytes or array elements.

ptr
Specifies a pointer to the old storage or to the block of storage that is to be freed.

size
Specifies the size of an array element (in bytes) or the number of bytes desired.

string
Specifies a previously declared string.

type
Specifies a previously declared data type.

new_string
Specifies a pointer to write a newly allocated string to.

format
Specifies a formatting string as defined by sprintf(3c)

DESCRIPTION

The XtMalloc functions returns a pointer to a block of storage of at least the specified size bytes. If there is insufficient memory to allocate the new block, XtMalloc calls XtErrorMsg.

The XtCalloc function allocates space for the specified number of array elements of the specified size and initializes the space to zero. If there is insufficient memory to allocate the new block, XtCalloc calls XtErrorMsg.

The XtRealloc function changes the size of a block of storage (possibly moving it). Then, it copies the old contents (or as much as will fit) into the new block and frees the old block. If there is insufficient memory to allocate the new block, XtRealloc calls XtErrorMsg. If ptr is NULL, XtRealloc allocates the new storage without copying the old contents; that is, it simply calls XtMalloc.

The XtFree function returns storage and allows it to be reused. If ptr is NULL, XtFree returns immediately.

XtNew returns a pointer to the allocated storage. If there is insufficient memory to allocate the new block, XtNew calls XtErrorMsg. XtNew is a convenience macro that calls XtMalloc with the following arguments specified:

((type *) XtMalloc((unsigned) sizeof(type))

XtNewString returns a pointer to a new string which is a duplicate of string. If there is insufficient memory to allocate the new block, or the argument is NULL XtNewString returns NULL. The memory can be freed with XtFree.

The XtAsprintf function allocates space for a string large enough to hold the string specified by the sprintf(3c) format pattern when used with the remaining arguments, and fills it with the formatted results. The address of the allocated string is placed into the pointer passed as ret. The length of the string (not including the terminating null byte) is returned. If there is insufficient memory to allocate the new block, XtAsprintf calls XtErrorMsg.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1792 - Linux cli command IO_All_Filesyspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_All_Filesyspm and provides detailed information about the command IO_All_Filesyspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_All_Filesyspm.

NAME 🖥️ IO_All_Filesyspm 🖥️

File System Methods Mixin for IO::All

SYNOPSIS

See IO::All.

DESCRIPTION

<<<cpan-foot>>>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1793 - Linux cli command sinf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sinf and provides detailed information about the command sinf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sinf.

NAME 🖥️ sinf 🖥️

sine function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double sin(double x);
float sinf(float x);
long double sinl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sinf(), sinl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the sine of x, where x is given in radians.

RETURN VALUE

On success, these functions return the sine of x.

If x is a NaN, a NaN is returned.

If x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is an infinity
errno is set to EDOM (but see BUGS). An invalid floating-point exception (FE_INVALID) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sin(), sinf(), sinl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

BUGS

Before glibc 2.10, the glibc implementation did not set errno to EDOM when a domain error occurred.

SEE ALSO

acos(3), asin(3), atan(3), atan2(3), cos(3), csin(3), sincos(3), tan(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1794 - Linux cli command registerrpc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command registerrpc and provides detailed information about the command registerrpc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the registerrpc.

NAME 🖥️ registerrpc 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1795 - Linux cli command libi2c

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command libi2c and provides detailed information about the command libi2c, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the libi2c.

NAME 🖥️ libi2c 🖥️

publicly accessible functions provided by the i2c library

SYNOPSIS

#include <linux/i2c.h>
#include <i2c/smbus.h>

/* Universal SMBus transaction */
__s32 i2c_smbus_access(int file, char read_write, __u8 command,
 int size, union i2c_smbus_data *data);

/* Simple SMBus transactions */
__s32 i2c_smbus_write_quick(int file, __u8 value);
__s32 i2c_smbus_read_byte(int file);
__s32 i2c_smbus_write_byte(int file, __u8 value);
__s32 i2c_smbus_read_byte_data(int file, __u8 command);
__s32 i2c_smbus_write_byte_data(int file, __u8 command, __u8 value);
__s32 i2c_smbus_read_word_data(int file, __u8 command);
__s32 i2c_smbus_write_word_data(int file, __u8 command, __u16 value);
__s32 i2c_smbus_process_call(int file, __u8 command, __u16 value);

/* Block SMBus (and non-SMBus) transactions */
__s32 i2c_smbus_read_block_data(int file, __u8 command, __u8 *values);
__s32 i2c_smbus_write_block_data(int file, __u8 command, __u8 length,
 const __u8 *values);
__s32 i2c_smbus_block_process_call(int file, __u8 command, __u8 length,
 __u8 *values);
__s32 i2c_smbus_read_i2c_block_data(int file, __u8 command, __u8 length,
 __u8 *values);
__s32 i2c_smbus_write_i2c_block_data(int file, __u8 command, __u8 length,
 const __u8 *values);

DESCRIPTION

This library offers to user-space an SMBus-level API similar to the in-kernel one. Each function is a wrapper around the appropriate ioctl call for i2c-dev to process. The i2c-dev kernel driver will convert the ioctl to its in-kernel equivalent function call, and pass the result back to the user-space caller.

i2c_smbus_access() is the universal function to run any SMBus transaction. You have to fill out and link the data structures yourself. It returns 0 on success, or a negative errno value on error. In practice you should never need to call this function directly, instead use one of the specific functions below, which will prepare the data and then call it for you.

i2c_smbus_write_quick() runs an SMBus “Quick command” transaction.

i2c_smbus_write_byte() runs an SMBus “Send byte” transaction.

i2c_smbus_write_byte_data() runs an SMBus “Write byte” transaction.

i2c_smbus_write_word_data() runs an SMBus “Write word” transaction.

These write transaction functions return 0 on success. On error, a negative errno value is returned.

i2c_smbus_read_byte() runs an SMBus “Receive byte” transaction.

i2c_smbus_read_byte_data() runs an SMBus “Read byte” transaction.

i2c_smbus_read_word_data() runs an SMBus “Read word” transaction.

i2c_smbus_process_call() runs an SMBus “Process call” transaction.

These read transaction functions return the read byte or word value on success. On error, a negative errno value is returned.

i2c_smbus_write_block_data() runs an SMBus “Block write” transaction.

i2c_smbus_read_block_data() runs an SMBus “Block read” transaction.

i2c_smbus_block_process_call() runs an SMBus “Block write-block read process call” transaction.

These block transaction functions return 0 on success. On error, a negative errno value is returned. The block length is limited to 32 bytes.

i2c_smbus_write_i2c_block_data() runs an “I2C block write” transaction. This is typically used to write to an EEPROM up to 4 kb in size.

i2c_smbus_read_i2c_block_data() runs an “I2C block read” transaction. This is typically used to read from an EEPROM up to 4 kb in size.

While technically not part of the SMBus specification, these I2C block transactions are supported by many SMBus host controllers. These block transaction functions return 0 on success. On error, a negative errno value is returned. Like their SMBus counterparts, the block length is limited to 32 bytes.

DATA STRUCTURES

Structure i2c_smbus_ioctl_data is used to send data to and retrieve data from the kernel through the i2c-dev driver. It will be filled out for you by i2c_smbus_access() so you do not need to care about the details.

Union i2c_smbus_data is used to store all possible SMBus data.

union i2c_smbus_data {
__u8 byte;
__u16 word;
__u8 block[I2C_SMBUS_BLOCK_MAX + 2];
};

block[0] is used for length and the last byte is reserved. If you use the higher-level functions, this structure will be filled out for you so you do not have to care about the details. Only if you call i2c_smbus_access() directly, you need to fill it out yourself.

BUGS

To report bugs or send fixes, please write to the Linux I2C mailing list <[email protected]> with Cc to the current maintainer: Jean Delvare <[email protected]>.

AUTHOR

Simon G. Vogl, Frodo Looijaard, Jean Delvare and others

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1796 - Linux cli command ts_error_fn

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ts_error_fn and provides detailed information about the command ts_error_fn, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ts_error_fn.

NAME 🖥️ ts_error_fn 🖥️

use a custom error function for libts library errors

SYNOPSIS

#include <tslib.h>

"int(*ts_error_fn)(constchar*fmt,va_listap);

DESCRIPTION

ts_error_fn() is by default implemented similar like this:

static int errfn(const char *fmt, va_list ap)
{
        return vfprintf(stderr, fmt, ap);
}       

inside the library. It is exposed to the user and can be replaced by a custom error function. Simply assign your custom implementation to ts_error_fn like

ts_error_fn = my_custom_errfn;

It can be used to write the system log files, for example. The ts_print_mt test program has an example.

RETURN VALUE

user defined.

SEE ALSO

ts_read(3), ts_open(3), ts_setup(3), ts_close(3), ts.conf(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1797 - Linux cli command Net_DBus_Reactorpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Reactorpm and provides detailed information about the command Net_DBus_Reactorpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Reactorpm.

NAME 🖥️ Net_DBus_Reactorpm 🖥️

application event loop

SYNOPSIS

Create and run an event loop:

use Net::DBus::Reactor; my $reactor = Net::DBus::Reactor->main(); $reactor->run();

Manage some file handlers

$reactor->add_read($fd, Net::DBus::Callback->new(method => sub { my $fd = shift; …read some data… }, args => [$fd])); $reactor->add_write($fd, Net::DBus::Callback->new(method => sub { my $fd = shift; …write some data… }, args => [$fd]));

Temporarily (dis|en)able a handle

# Disable $reactor->toggle_read($fd, 0); # Enable $reactor->toggle_read($fd, 1);

Permanently remove a handle

$reactor->remove_read($fd);

Manage a regular timeout every 100 milliseconds

my $timer = $reactor->add_timeout(100, Net::DBus::Callback->new( method => sub { …process the alarm… }));

Temporarily (dis|en)able a timer

# Disable $reactor->toggle_timeout($timer, 0); # Enable $reactor->toggle_timeout($timer, 1);

Permanently remove a timer

$reactor->remove_timeout($timer);

Add a post-dispatch hook

my $hook = $reactor->add_hook(Net::DBus::Callback->new( method => sub { … do some work… }));

Remove a hook

$reactor->remove_hook($hook);

DESCRIPTION

This class provides a general purpose event loop for the purposes of multiplexing I/O events and timeouts in a single process. The underlying implementation is done using the select system call. File handles can be registered for monitoring on read, write and exception (out-of-band data) events. Timers can be registered to expire with a periodic frequency. These are implemented using the timeout parameter of the select system call. Since this parameter merely represents an upper bound on the amount of time the select system call is allowed to sleep, the actual period of the timers may vary. Under normal load this variance is typically 10 milliseconds. Finally, hooks may be registered which will be invoked on each iteration of the event loop (ie after processing the file events, or timeouts indicated by the select system call returning).

METHODS

my $reactor = Net::DBus::Reactor->new();
Creates a new event loop ready for monitoring file handles, or generating timeouts. Except in very unusual circumstances (examples of which I can’t think up) it is not necessary or desriable to explicitly create new reactor instances. Instead call the main method to get a handle to the singleton instance.

$reactor = Net::DBus::Reactor->main;
Return a handle to the singleton instance of the reactor. This is the recommended way of getting hold of a reactor, since it removes the need for modules to pass around handles to their privately created reactors.

$reactor->manage($connection);

$reactor->manage($server);

Registers a Net::DBus::Binding::Connection or Net::DBus::Binding::Server object for management by the event loop. This basically involves hooking up the watch & timeout callbacks to the event loop. For connections it will also register a hook to invoke the dispatch method periodically.

$reactor->run();
Starts the event loop monitoring any registered file handles and timeouts. At least one file handle, or timer must have been registered prior to running the reactor, otherwise it will immediately exit. The reactor will run until all registered file handles, or timeouts have been removed, or disabled. The reactor can be explicitly stopped by calling the shutdown method.

$reactor->shutdown();
Explicitly shutdown the reactor after pending events have been processed.

$reactor->step();
Perform one iteration of the event loop, going to sleep until an event occurs on a registered file handle, or a timeout occurrs. This method is generally not required in day-to-day use.

$reactor->add_read($fd, $callback[, $status]);
Registers a file handle for monitoring of read events. The $callback parameter specifies either a code reference to a subroutine, or an instance of the Net::DBus::Callback object to invoke each time an event occurs. The optional $status parameter is a boolean value to specify whether the watch is initially enabled.

$reactor->add_write($fd, $callback[, $status]);
Registers a file handle for monitoring of write events. The $callback parameter specifies either a code reference to a subroutine, or an instance of the Net::DBus::Callback object to invoke each time an event occurs. The optional $status parameter is a boolean value to specify whether the watch is initially enabled.

$reactor->add_exception($fd, $callback[, $status]);
Registers a file handle for monitoring of exception events. The $callback parameter specifies either a code reference to a subroutine, or an instance of the Net::DBus::Callback object to invoke each time an event occurs. The optional $status parameter is a boolean value to specify whether the watch is initially enabled.

my $id = $reactor->add_timeout($interval, $callback, $status);
Registers a new timeout to expire every $interval milliseconds. The $callback parameter specifies either a code reference to a subroutine, or an instance of the Net::DBus::Callback object to invoke each time the timeout expires. The optional $status parameter is a boolean value to specify whether the timeout is initially enabled. The return parameter is a unique identifier which can be used to later remove or disable the timeout.

$reactor->remove_timeout($id);
Removes a previously registered timeout specified by the $id parameter.

$reactor->toggle_timeout($id, $status[, $interval]);
Updates the state of a previously registered timeout specified by the $id parameter. The $status parameter specifies whether the timeout is to be enabled or disabled, while the optional $interval parameter can be used to change the period of the timeout.

my $id = $reactor->add_hook($callback[, $status]);
Registers a new hook to be fired on each iteration of the event loop. The $callback parameter specifies either a code reference to a subroutine, or an instance of the Net::DBus::Callback class to invoke. The $status parameter determines whether the hook is initially enabled, or disabled. The return parameter is a unique id which should be used to later remove, or disable the hook.

$reactor->remove_hook($id)
Removes the previously registered hook identified by $id.

$reactor->toggle_hook($id, $status)
Updates the status of the previously registered hook identified by $id. The $status parameter determines whether the hook is to be enabled or disabled.

$reactor->remove_read($fd);

$reactor->remove_write($fd);

$reactor->remove_exception($fd);

Removes a watch on the file handle $fd.

$reactor->toggle_read($fd, $status);

$reactor->toggle_write($fd, $status);

$reactor->toggle_exception($fd, $status);

Updates the status of a watch on the file handle $fd. The $status parameter species whether the watch is to be enabled or disabled.

SEE ALSO

Net::DBus::Callback, Net::DBus::Connection, Net::DBus::Server

AUTHOR

Daniel Berrange <[email protected]>

COPYRIGHT

Copyright 2004-2011 by Daniel Berrange

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1798 - Linux cli command Net_DNS_RR_SSHFPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_SSHFPpm and provides detailed information about the command Net_DNS_RR_SSHFPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_SSHFPpm.

NAME 🖥️ Net_DNS_RR_SSHFPpm 🖥️

DNS SSHFP resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name SSHFP algorithm fptype fp);

DESCRIPTION

DNS SSH Fingerprint (SSHFP) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

algorithm

$algorithm = $rr->algorithm; $rr->algorithm( $algorithm );

The 8-bit algorithm number describes the algorithm used to construct the public key.

fptype

$fptype = $rr->fptype; $rr->fptype( $fptype );

The 8-bit fingerprint type number describes the message-digest algorithm used to calculate the fingerprint of the public key.

fingerprint

fp

$fp = $rr->fp; $rr->fp( $fp );

Hexadecimal representation of the fingerprint digest.

fpbin

$fpbin = $rr->fpbin; $rr->fpbin( $fpbin );

Returns opaque octet string representing the fingerprint digest.

babble

print $rr->babble;

The babble() method returns the ‘BabbleBubble’ representation of the fingerprint if the Digest::BubbleBabble package is available, otherwise an empty string is returned.

Bubble babble represents a message digest as a string of “real” words, to make the fingerprint easier to remember. The “words” are not necessarily real words, but they look more like words than a string of hex characters.

Bubble babble fingerprinting is used by the SSH2 suite (and consequently by Net::SSH::Perl, the Perl SSH implementation) to display easy-to-remember key fingerprints.

The ‘BubbleBabble’ string is appended as a comment when the string method is called.

COPYRIGHT

Copyright (c)2007 Olaf Kolkman, NLnet Labs.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC4255 <https://tools.ietf.org/html/rfc4255>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1799 - Linux cli command optarg

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command optarg and provides detailed information about the command optarg, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the optarg.

NAME 🖥️ optarg 🖥️

Parse command-line options

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
int getopt(int argc, char *argv[],
 const char *optstring);
extern char *optarg;
extern int optind, opterr, optopt;
#include <getopt.h>
int getopt_long(int argc, char *argv[],
 const char *optstring,
 const struct option *longopts, int *longindex);
int getopt_long_only(int argc, char *argv[],
 const char *optstring,
 const struct option *longopts, int *longindex);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getopt():

    _POSIX_C_SOURCE >= 2 || _XOPEN_SOURCE

getopt_long(), getopt_long_only():

    _GNU_SOURCE

DESCRIPTION

The getopt() function parses the command-line arguments. Its arguments argc and argv are the argument count and array as passed to the main() function on program invocation. An element of argv that starts with ‘-’ (and is not exactly “-” or “–”) is an option element. The characters of this element (aside from the initial ‘-’) are option characters. If getopt() is called repeatedly, it returns successively each of the option characters from each of the option elements.

The variable optind is the index of the next element to be processed in argv. The system initializes this value to 1. The caller can reset it to 1 to restart scanning of the same argv, or when scanning a new argument vector.

If getopt() finds another option character, it returns that character, updating the external variable optind and a static variable nextchar so that the next call to getopt() can resume the scan with the following option character or argv-element.

If there are no more option characters, getopt() returns -1. Then optind is the index in argv of the first argv-element that is not an option.

optstring is a string containing the legitimate option characters. A legitimate option character is any visible one byte ascii(7) character (for which isgraph(3) would return nonzero) that is not ‘-’, ‘:’, or ‘;’. If such a character is followed by a colon, the option requires an argument, so getopt() places a pointer to the following text in the same argv-element, or the text of the following argv-element, in optarg. Two colons mean an option takes an optional arg; if there is text in the current argv-element (i.e., in the same word as the option name itself, for example, “-oarg”), then it is returned in optarg, otherwise optarg is set to zero. This is a GNU extension. If optstring contains W followed by a semicolon, then -W foo is treated as the long option –foo. (The -W option is reserved by POSIX.2 for implementation extensions.) This behavior is a GNU extension, not available with libraries before glibc 2.

By default, getopt() permutes the contents of argv as it scans, so that eventually all the nonoptions are at the end. Two other scanning modes are also implemented. If the first character of optstring is ‘+’ or the environment variable POSIXLY_CORRECT is set, then option processing stops as soon as a nonoption argument is encountered. If ‘+’ is not the first character of optstring, it is treated as a normal option. If POSIXLY_CORRECT behaviour is required in this case optstring will contain two ‘+’ symbols. If the first character of optstring is ‘-’, then each nonoption argv-element is handled as if it were the argument of an option with character code 1. (This is used by programs that were written to expect options and other argv-elements in any order and that care about the ordering of the two.) The special argument “–” forces an end of option-scanning regardless of the scanning mode.

While processing the option list, getopt() can detect two kinds of errors: (1) an option character that was not specified in optstring and (2) a missing option argument (i.e., an option at the end of the command line without an expected argument). Such errors are handled and reported as follows:

  • By default, getopt() prints an error message on standard error, places the erroneous option character in optopt, and returns ‘?’ as the function result.

  • If the caller has set the global variable opterr to zero, then getopt() does not print an error message. The caller can determine that there was an error by testing whether the function return value is ‘?’. (By default, opterr has a nonzero value.)

  • If the first character (following any optional ‘+’ or ‘-’ described above) of optstring is a colon (’:’), then getopt() likewise does not print an error message. In addition, it returns ‘:’ instead of ‘?’ to indicate a missing option argument. This allows the caller to distinguish the two different types of errors.

getopt_long() and getopt_long_only()

The getopt_long() function works like getopt() except that it also accepts long options, started with two dashes. (If the program accepts only long options, then optstring should be specified as an empty string (""), not NULL.) Long option names may be abbreviated if the abbreviation is unique or is an exact match for some defined option. A long option may take a parameter, of the form –arg=param or –arg param.

longopts is a pointer to the first element of an array of struct option declared in <getopt.h> as

struct option {
    const char *name;
    int         has_arg;
    int        *flag;
    int         val;
};

The meanings of the different fields are:

name
is the name of the long option.

has_arg
is: no_argument (or 0) if the option does not take an argument; required_argument (or 1) if the option requires an argument; or optional_argument (or 2) if the option takes an optional argument.

flag
specifies how results are returned for a long option. If flag is NULL, then getopt_long() returns val. (For example, the calling program may set val to the equivalent short option character.) Otherwise, getopt_long() returns 0, and flag points to a variable which is set to val if the option is found, but left unchanged if the option is not found.

val
is the value to return, or to load into the variable pointed to by flag.

The last element of the array has to be filled with zeros.

If longindex is not NULL, it points to a variable which is set to the index of the long option relative to longopts.

getopt_long_only() is like getopt_long(), but ‘-’ as well as “–” can indicate a long option. If an option that starts with ‘-’ (not “–”) doesn’t match a long option, but does match a short option, it is parsed as a short option instead.

RETURN VALUE

If an option was successfully found, then getopt() returns the option character. If all command-line options have been parsed, then getopt() returns -1. If getopt() encounters an option character that was not in optstring, then ‘?’ is returned. If getopt() encounters an option with a missing argument, then the return value depends on the first character in optstring: if it is ‘:’, then ‘:’ is returned; otherwise ‘?’ is returned.

getopt_long() and getopt_long_only() also return the option character when a short option is recognized. For a long option, they return val if flag is NULL, and 0 otherwise. Error and -1 returns are the same as for getopt(), plus ‘?’ for an ambiguous match or an extraneous parameter.

ENVIRONMENT

POSIXLY_CORRECT
If this is set, then option processing stops as soon as a nonoption argument is encountered.

_<PID>_GNU_nonoption_argv_flags_
This variable was used by bash(1) 2.0 to communicate to glibc which arguments are the results of wildcard expansion and so should not be considered as options. This behavior was removed in bash(1) 2.01, but the support remains in glibc.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getopt(), getopt_long(), getopt_long_only()

Thread safety

MT-Unsafe race:getopt env

VERSIONS

POSIX specifies that the argv array argument should be const, but these functions permute its elements unless the environment variable POSIXLY_CORRECT is set. const is used in the actual prototype to be compatible with other systems; however, this page doesn’t show the qualifier, to avoid confusing readers.

STANDARDS

getopt()
POSIX.1-2008.

getopt_long()
getopt_long_only()
GNU.

The use of ‘+’ and ‘-’ in optstring is a GNU extension.

HISTORY

getopt()
POSIX.1-2001, and POSIX.2.

On some older implementations, getopt() was declared in <stdio.h>. SUSv1 permitted the declaration to appear in either <unistd.h> or <stdio.h>. POSIX.1-1996 marked the use of <stdio.h> for this purpose as LEGACY. POSIX.1-2001 does not require the declaration to appear in <stdio.h>.

NOTES

A program that scans multiple argument vectors, or rescans the same vector more than once, and wants to make use of GNU extensions such as ‘+’ and ‘-’ at the start of optstring, or changes the value of POSIXLY_CORRECT between scans, must reinitialize getopt() by resetting optind to 0, rather than the traditional value of 1. (Resetting to 0 forces the invocation of an internal initialization routine that rechecks POSIXLY_CORRECT and checks for GNU extensions in optstring.)

Command-line arguments are parsed in strict order meaning that an option requiring an argument will consume the next argument, regardless of whether that argument is the correctly specified option argument or simply the next option (in the scenario the user mis-specifies the command line). For example, if optstring is specified as “1n:” and the user specifies the command line arguments incorrectly as prog -n -1, the -n option will be given the optarg value “-1”, and the -1 option will be considered to have not been specified.

EXAMPLES

getopt()

The following trivial example program uses getopt() to handle two program options: -n, with no associated value; and -t val, which expects an associated value.

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int
main(int argc, char *argv[])
{
    int flags, opt;
    int nsecs, tfnd;
    nsecs = 0;
    tfnd = 0;
    flags = 0;
    while ((opt = getopt(argc, argv, "nt:")) != -1) {
        switch (opt) {
        case 'n':
            flags = 1;
            break;
        case 't':
            nsecs = atoi(optarg);
            tfnd = 1;
            break;
        default: /* '?' */
            fprintf(stderr, "Usage: %s [-t nsecs] [-n] name

“, argv[0]); exit(EXIT_FAILURE); } } printf(“flags=%d; tfnd=%d; nsecs=%d; optind=%d “, flags, tfnd, nsecs, optind); if (optind >= argc) { fprintf(stderr, “Expected argument after options “); exit(EXIT_FAILURE); } printf(“name argument = %s “, argv[optind]); /* Other code omitted */ exit(EXIT_SUCCESS); }

getopt_long()

The following example program illustrates the use of getopt_long() with most of its features.

#include <getopt.h>
#include <stdio.h>     /* for printf */
#include <stdlib.h>    /* for exit */
int
main(int argc, char *argv[])
{
    int c;
    int digit_optind = 0;
    while (1) {
        int this_option_optind = optind ? optind : 1;
        int option_index = 0;
        static struct option long_options[] = {
            {"add",     required_argument, 0,  0 },
            {"append",  no_argument,       0,  0 },
            {"delete",  required_argument, 0,  0 },
            {"verbose", no_argument,       0,  0 },
            {"create",  required_argument, 0, 'c'},
            {"file",    required_argument, 0,  0 },
            {0,         0,                 0,  0 }
        };
        c = getopt_long(argc, argv, "abc:d:012",
                        long_options, &option_index);
        if (c == -1)
            break;
        switch (c) {
        case 0:
            printf("option %s", long_options[option_index].name);
            if (optarg)
                printf(" with arg %s", optarg);
            printf("

“); break; case ‘0’: case ‘1’: case ‘2’: if (digit_optind != 0 && digit_optind != this_option_optind) printf(“digits occur in two different argv-elements. “); digit_optind = this_option_optind; printf(“option %c “, c); break; case ‘a’: printf(“option a “); break; case ‘b’: printf(“option b “); break; case ‘c’: printf(“option c with value ‘%s’ “, optarg); break; case ’d’: printf(“option d with value ‘%s’ “, optarg); break; case ‘?’: break; default: printf(”?? getopt returned character code 0%o ?? “, c); } } if (optind < argc) { printf(“non-option ARGV-elements: “); while (optind < argc) printf("%s “, argv[optind++]); printf(” “); } exit(EXIT_SUCCESS); }

SEE ALSO

getopt(1), getsubopt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1800 - Linux cli command localtime_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command localtime_r and provides detailed information about the command localtime_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the localtime_r.

NAME 🖥️ localtime_r 🖥️

transform date and time to broken-down time or ASCII

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <time.h>
char *asctime(const struct tm *tm);
char *asctime_r(const struct tm *restrict tm,
 char buf[restrict 26]);
char *ctime(const time_t *timep);
char *ctime_r(const time_t *restrict timep,
 char buf[restrict 26]);
struct tm *gmtime(const time_t *timep);
struct tm *gmtime_r(const time_t *restrict timep,
 struct tm *restrict result);
struct tm *localtime(const time_t *timep);
struct tm *localtime_r(const time_t *restrict timep,
 struct tm *restrict result);
time_t mktime(struct tm *tm);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

asctime_r(), ctime_r(), gmtime_r(), localtime_r():

    _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The ctime(), gmtime(), and localtime() functions all take an argument of data type time_t, which represents calendar time. When interpreted as an absolute time value, it represents the number of seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).

The asctime() and mktime() functions both take an argument representing broken-down time, which is a representation separated into year, month, day, and so on.

Broken-down time is stored in the structure tm, described in tm(3type).

The call ctime(t) is equivalent to asctime(localtime(t)). It converts the calendar time t into a null-terminated string of the form

"Wed Jun 30 21:49:08 1993

"

The abbreviations for the days of the week are “Sun”, “Mon”, “Tue”, “Wed”, “Thu”, “Fri”, and “Sat”. The abbreviations for the months are “Jan”, “Feb”, “Mar”, “Apr”, “May”, “Jun”, “Jul”, “Aug”, “Sep”, “Oct”, “Nov”, and “Dec”. The return value points to a statically allocated string which might be overwritten by subsequent calls to any of the date and time functions. The function also sets the external variables tzname, timezone, and daylight (see tzset(3)) with information about the current timezone. The reentrant version ctime_r() does the same, but stores the string in a user-supplied buffer which should have room for at least 26 bytes. It need not set tzname, timezone, and daylight.

The gmtime() function converts the calendar time timep to broken-down time representation, expressed in Coordinated Universal Time (UTC). It may return NULL when the year does not fit into an integer. The return value points to a statically allocated struct which might be overwritten by subsequent calls to any of the date and time functions. The gmtime_r() function does the same, but stores the data in a user-supplied struct.

The localtime() function converts the calendar time timep to broken-down time representation, expressed relative to the user’s specified timezone. The function acts as if it called tzset(3) and sets the external variables tzname with information about the current timezone, timezone with the difference between Coordinated Universal Time (UTC) and local standard time in seconds, and daylight to a nonzero value if daylight savings time rules apply during some part of the year. The return value points to a statically allocated struct which might be overwritten by subsequent calls to any of the date and time functions. The localtime_r() function does the same, but stores the data in a user-supplied struct. It need not set tzname, timezone, and daylight.

The asctime() function converts the broken-down time value tm into a null-terminated string with the same format as ctime(). The return value points to a statically allocated string which might be overwritten by subsequent calls to any of the date and time functions. The asctime_r() function does the same, but stores the string in a user-supplied buffer which should have room for at least 26 bytes.

The mktime() function converts a broken-down time structure, expressed as local time, to calendar time representation. The function ignores the values supplied by the caller in the tm_wday and tm_yday fields. The value specified in the tm_isdst field informs mktime() whether or not daylight saving time (DST) is in effect for the time supplied in the tm structure: a positive value means DST is in effect; zero means that DST is not in effect; and a negative value means that mktime() should (use timezone information and system databases to) attempt to determine whether DST is in effect at the specified time.

The mktime() function modifies the fields of the tm structure as follows: tm_wday and tm_yday are set to values determined from the contents of the other fields; if structure members are outside their valid interval, they will be normalized (so that, for example, 40 October is changed into 9 November); tm_isdst is set (regardless of its initial value) to a positive value or to 0, respectively, to indicate whether DST is or is not in effect at the specified time. Calling mktime() also sets the external variable tzname with information about the current timezone.

If the specified broken-down time cannot be represented as calendar time (seconds since the Epoch), mktime() returns (time_t) -1 and does not alter the members of the broken-down time structure.

RETURN VALUE

On success, gmtime() and localtime() return a pointer to a struct tm.

On success, gmtime_r() and localtime_r() return the address of the structure pointed to by result.

On success, asctime() and ctime() return a pointer to a string.

On success, asctime_r() and ctime_r() return a pointer to the string pointed to by buf.

On success, mktime() returns the calendar time (seconds since the Epoch), expressed as a value of type time_t.

On error, mktime() returns the value (time_t) -1. The remaining functions return NULL on error. On error, errno is set to indicate the error.

ERRORS

EOVERFLOW
The result cannot be represented.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

asctime()

Thread safety

MT-Unsafe race:asctime locale

asctime_r()

Thread safety

MT-Safe locale

ctime()

Thread safety

MT-Unsafe race:tmbuf race:asctime env locale

ctime_r(), gmtime_r(), localtime_r(), mktime()

Thread safety

MT-Safe env locale

gmtime(), localtime()

Thread safety

MT-Unsafe race:tmbuf env locale

VERSIONS

POSIX doesn’t specify the parameters of ctime_r() to be restrict; that is specific to glibc.

In many implementations, including glibc, a 0 in tm_mday is interpreted as meaning the last day of the preceding month.

According to POSIX.1-2001, localtime() is required to behave as though tzset(3) was called, while localtime_r() does not have this requirement. For portable code, tzset(3) should be called before localtime_r().

STANDARDS

asctime()
ctime()
gmtime()
localtime()
mktime()
C11, POSIX.1-2008.

asctime_r()
ctime_r()
gmtime_r()
localtime_r()
POSIX.1-2008.

HISTORY

gmtime()
localtime()
mktime()
C89, POSIX.1-2001.

asctime()
ctime()
C89, POSIX.1-2001. Marked obsolete in POSIX.1-2008 (recommending strftime(3)).

gmtime_r()
localtime_r()
POSIX.1-2001.

asctime_r()
ctime_r()
POSIX.1-2001. Marked obsolete in POSIX.1-2008 (recommending strftime(3)).

NOTES

The four functions asctime(), ctime(), gmtime(), and localtime() return a pointer to static data and hence are not thread-safe. The thread-safe versions, asctime_r(), ctime_r(), gmtime_r(), and localtime_r(), are specified by SUSv2.

POSIX.1-2001 says: “The asctime(), ctime(), gmtime(), and localtime() functions shall return values in one of two static objects: a broken-down time structure and an array of type char. Execution of any of the functions may overwrite the information returned in either of these objects by any of the other functions.” This can occur in the glibc implementation.

SEE ALSO

date(1), gettimeofday(2), time(2), utime(2), clock(3), difftime(3), strftime(3), strptime(3), timegm(3), tzset(3), time(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1801 - Linux cli command XtPeekEvent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtPeekEvent and provides detailed information about the command XtPeekEvent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtPeekEvent.

NAME 🖥️ XtPeekEvent 🖥️

query and process events and input

SYNTAX

#include <X11/Intrinsic.h>

void XtNextEvent(XEvent *event_return);

Boolean XtPeekEvent(XEvent *event_return);

Boolean XtPending(void);

void XtProcessEvent(XtInputMask mask);

void XtMainLoop(void);

ARGUMENTS

event
Specifies a pointer to the event structure that is to be dispatched to the appropriate event handler.

event_return
Returns the event information to the specified event structure.

mask
Specifies what types of events to process. The mask is the bitwise inclusive OR of any combination of XtIMXEvent, XtIMTimer, XtIMAlternateInput, and XtIMSignal. As a convenience, the X Toolkit defines the symbolic name XtIMAll to be the bitwise inclusive OR of all event types.

DESCRIPTION

XtNextEvent has been replaced by XtAppNextEvent.

XtPeekEvent has been replaced by XtAppPeekEvent.

XtPending has been replaced by XtAppPending.

XtProcessEvent has been replaced by XtAppProcessEvent.

XtMainLoop has been replaced by XtAppMainLoop.

SEE ALSO

XtAppNextEvent(3xt), XtAppPending(3), XtAppPeekEvent(3), XtAppProcessEvent(3), XtAppMainLoop(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1802 - Linux cli command Image_ExifTool_MinoltaRawpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_MinoltaRawpm and provides detailed information about the command Image_ExifTool_MinoltaRawpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_MinoltaRawpm.

NAME 🖥️ Image_ExifTool_MinoltaRawpm 🖥️

Read/write Konica-Minolta RAW (MRW) information

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to read and write Konica-Minolta RAW (MRW) images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.cybercom.net/~dcoffin/dcraw/>

<http://www.chauveau-central.net/mrw-format/>

SEE ALSO

“MinoltaRaw Tags” in Image::ExifTool::TagNames, Image::ExifTool::Minolta (3pm), Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1803 - Linux cli command herror

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command herror and provides detailed information about the command herror, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the herror.

NAME 🖥️ herror 🖥️

get network host entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
void sethostent(int stayopen);
void endhostent(void);
[[deprecated]] extern int h_errno;
[[deprecated]] struct hostent *gethostbyname(const char *name);
[[deprecated]] struct hostent *gethostbyaddr(const void addr[.len],
 socklen_t len, int type);
[[deprecated]] void herror(const char *s);
[[deprecated]] const char *hstrerror(int err);
/* System V/POSIX extension */
struct hostent *gethostent(void);
/* GNU extensions */
[[deprecated]]
struct hostent *gethostbyname2(const char *name, int af);
int gethostent_r(struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyaddr_r(const void addr[restrict .len], socklen_t len,
 int type,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyname_r(const char *restrict name,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyname2_r(const char *restrict name, int af,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

gethostbyname2(), gethostent_r(), gethostbyaddr_r(), gethostbyname_r(), gethostbyname2_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc up to and including 2.19:
        _BSD_SOURCE || _SVID_SOURCE

herror(), hstrerror():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.8 to glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE
    Before glibc 2.8:
        none

h_errno:

    Since glibc 2.19
        _DEFAULT_SOURCE || _POSIX_C_SOURCE < 200809L
    glibc 2.12 to glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE || _POSIX_C_SOURCE < 200809L
    Before glibc 2.12:
        none

DESCRIPTION

The gethostbyname*(), gethostbyaddr*(), herror(), and hstrerror() functions are obsolete. Applications should use getaddrinfo(3), getnameinfo(3), and gai_strerror(3) instead.

The sethostent() function specifies, if stayopen is true (1), that a connected TCP socket should be used for the name server queries and that the connection should remain open during successive queries. Otherwise, name server queries will use UDP datagrams.

The endhostent() function ends the use of a TCP connection for name server queries.

The gethostbyname() function returns a structure of type hostent for the given host name. Here name is either a hostname or an IPv4 address in standard dot notation (as for inet_addr(3)). If name is an IPv4 address, no lookup is performed and gethostbyname() simply copies name into the h_name field and its struct in_addr equivalent into the h_addr_list[0] field of the returned hostent structure. If name doesn’t end in a dot and the environment variable HOSTALIASES is set, the alias file pointed to by HOSTALIASES will first be searched for name (see hostname(7) for the file format). The current domain and its parents are searched unless name ends in a dot.

The gethostbyaddr() function returns a structure of type hostent for the given host address addr of length len and address type type. Valid address types are AF_INET and AF_INET6 (defined in <sys/socket.h>). The host address argument is a pointer to a struct of a type depending on the address type, for example a struct in_addr * (probably obtained via a call to inet_addr(3)) for address type AF_INET.

The (obsolete) herror() function prints the error message associated with the current value of h_errno on stderr.

The (obsolete) hstrerror() function takes an error number (typically h_errno) and returns the corresponding message string.

The domain name queries carried out by gethostbyname() and gethostbyaddr() rely on the Name Service Switch (nsswitch.conf(5)) configured sources or a local name server (named(8)). The default action is to query the Name Service Switch (nsswitch.conf(5)) configured sources, failing that, a local name server (named(8)).

Historical

The nsswitch.conf(5) file is the modern way of controlling the order of host lookups.

In glibc 2.4 and earlier, the order keyword was used to control the order of host lookups as defined in /etc/host.conf (host.conf(5)).

The hostent structure is defined in <netdb.h> as follows:

struct hostent {
    char  *h_name;            /* official name of host */
    char **h_aliases;         /* alias list */
    int    h_addrtype;        /* host address type */
    int    h_length;          /* length of address */
    char **h_addr_list;       /* list of addresses */
}
#define h_addr h_addr_list[0] /* for backward compatibility */

The members of the hostent structure are:

h_name
The official name of the host.

h_aliases
An array of alternative names for the host, terminated by a null pointer.

h_addrtype
The type of address; always AF_INET or AF_INET6 at present.

h_length
The length of the address in bytes.

h_addr_list
An array of pointers to network addresses for the host (in network byte order), terminated by a null pointer.

h_addr
The first address in h_addr_list for backward compatibility.

RETURN VALUE

The gethostbyname() and gethostbyaddr() functions return the hostent structure or a null pointer if an error occurs. On error, the h_errno variable holds an error number. When non-NULL, the return value may point at static data, see the notes below.

ERRORS

The variable h_errno can have the following values:

HOST_NOT_FOUND
The specified host is unknown.

NO_DATA
The requested name is valid but does not have an IP address. Another type of request to the name server for this domain may return an answer. The constant NO_ADDRESS is a synonym for NO_DATA.

NO_RECOVERY
A nonrecoverable name server error occurred.

TRY_AGAIN
A temporary error occurred on an authoritative name server. Try again later.

FILES

/etc/host.conf
resolver configuration file

/etc/hosts
host database file

/etc/nsswitch.conf
name service switch configuration

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

gethostbyname()

Thread safety

MT-Unsafe race:hostbyname env locale

gethostbyaddr()

Thread safety

MT-Unsafe race:hostbyaddr env locale

sethostent(), endhostent(), gethostent_r()

Thread safety

MT-Unsafe race:hostent env locale

herror(), hstrerror()

Thread safetyMT-Safe

gethostent()

Thread safety

MT-Unsafe race:hostent race:hostentbuf env locale

gethostbyname2()

Thread safety

MT-Unsafe race:hostbyname2 env locale

gethostbyaddr_r(), gethostbyname_r(), gethostbyname2_r()

Thread safetyMT-Safe env locale

In the above table, hostent in race:hostent signifies that if any of the functions sethostent(), gethostent(), gethostent_r(), or endhostent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

sethostent()
endhostent()
gethostent()
POSIX.1-2008.

gethostent_r()
GNU.

Others:
None.

HISTORY

sethostent()
endhostent()
gethostent()
POSIX.1-2001.

gethostbyname()
gethostbyaddr()
h_errno
Marked obsolescent in POSIX.1-2001. Removed in POSIX.1-2008, recommending the use of getaddrinfo(3) and getnameinfo(3) instead.

NOTES

The functions gethostbyname() and gethostbyaddr() may return pointers to static data, which may be overwritten by later calls. Copying the struct hostent does not suffice, since it contains pointers; a deep copy is required.

In the original BSD implementation the len argument of gethostbyname() was an int. The SUSv2 standard is buggy and declares the len argument of gethostbyaddr() to be of type size_t. (That is wrong, because it has to be int, and size_t is not. POSIX.1-2001 makes it socklen_t, which is OK.) See also accept(2).

The BSD prototype for gethostbyaddr() uses const char * for the first argument.

System V/POSIX extension

POSIX requires the gethostent() call, which should return the next entry in the host data base. When using DNS/BIND this does not make much sense, but it may be reasonable if the host data base is a file that can be read line by line. On many systems, a routine of this name reads from the file /etc/hosts. It may be available only when the library was built without DNS support. The glibc version will ignore ipv6 entries. This function is not reentrant, and glibc adds a reentrant version gethostent_r().

GNU extensions

glibc2 also has a gethostbyname2() that works like gethostbyname(), but permits to specify the address family to which the address must belong.

glibc2 also has reentrant versions gethostent_r(), gethostbyaddr_r(), gethostbyname_r(), and gethostbyname2_r(). The caller supplies a hostent structure ret which will be filled in on success, and a temporary work buffer buf of size buflen. After the call, result will point to the result on success. In case of an error or if no entry is found result will be NULL. The functions return 0 on success and a nonzero error number on failure. In addition to the errors returned by the nonreentrant versions of these functions, if buf is too small, the functions will return ERANGE, and the call should be retried with a larger buffer. The global variable h_errno is not modified, but the address of a variable in which to store error numbers is passed in h_errnop.

BUGS

gethostbyname() does not recognize components of a dotted IPv4 address string that are expressed in hexadecimal.

SEE ALSO

getaddrinfo(3), getnameinfo(3), inet(3), inet_ntop(3), inet_pton(3), resolver(3), hosts(5), nsswitch.conf(5), hostname(7), named(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1804 - Linux cli command Parallel_ForkManager_Childpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Parallel_ForkManager_Childpm and provides detailed information about the command Parallel_ForkManager_Childpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Parallel_ForkManager_Childpm.

NAME 🖥️ Parallel_ForkManager_Childpm 🖥️

role adopted by forked Parallel::ForkManager processes

VERSION

version 2.02

SYNOPSIS

use 5.10.0; use Parallel::ForkManager; my $fm = Parallel::ForkManager->new; say “parent does not consume the child role: “, $fm->does(Parallel::ForkManager::Child); $fm->start_child(sub{ sleep $_; say “but the child does: “, $fm->does(Parallel::ForkManager::Child); say “child $_ says hi!” }) for 1..3;

DESCRIPTION

When the parent Parallel::ForkManager object forks a child process, its forked incarnation consumes this role. The role doesn’t do much: it changes the returning values of is_child and is_parent in the way you’d expect, change start so that it’d die if called from within the child, and change the implementation of finish to potentially send data back to the parent process.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2018, 2016, 2015 by Balázs Szabó.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1805 - Linux cli command getprotobynumber_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getprotobynumber_r and provides detailed information about the command getprotobynumber_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getprotobynumber_r.

NAME 🖥️ getprotobynumber_r 🖥️

get protocol entry (reentrant)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
int getprotoent_r(struct protoent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct protoent **restrict result);
int getprotobyname_r(const char *restrict name,
 struct protoent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct protoent **restrict result);
int getprotobynumber_r(int proto,
 struct protoent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct protoent **restrict result);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getprotoent_r(), getprotobyname_r(), getprotobynumber_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The getprotoent_r(), getprotobyname_r(), and getprotobynumber_r() functions are the reentrant equivalents of, respectively, getprotoent(3), getprotobyname(3), and getprotobynumber(3). They differ in the way that the protoent structure is returned, and in the function calling signature and return value. This manual page describes just the differences from the nonreentrant functions.

Instead of returning a pointer to a statically allocated protoent structure as the function result, these functions copy the structure into the location pointed to by result_buf.

The buf array is used to store the string fields pointed to by the returned protoent structure. (The nonreentrant functions allocate these strings in static storage.) The size of this array is specified in buflen. If buf is too small, the call fails with the error ERANGE, and the caller must try again with a larger buffer. (A buffer of length 1024 bytes should be sufficient for most applications.)

If the function call successfully obtains a protocol record, then *result is set pointing to result_buf; otherwise, *result is set to NULL.

RETURN VALUE

On success, these functions return 0. On error, they return one of the positive error numbers listed in ERRORS.

On error, record not found (getprotobyname_r(), getprotobynumber_r()), or end of input (getprotoent_r()) result is set to NULL.

ERRORS

ENOENT
(getprotoent_r()) No more records in database.

ERANGE
buf is too small. Try again with a larger buffer (and increased buflen).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getprotoent_r(), getprotobyname_r(), getprotobynumber_r()

Thread safetyMT-Safe locale

VERSIONS

Functions with similar names exist on some other systems, though typically with different calling signatures.

STANDARDS

GNU.

EXAMPLES

The program below uses getprotobyname_r() to retrieve the protocol record for the protocol named in its first command-line argument. If a second (integer) command-line argument is supplied, it is used as the initial value for buflen; if getprotobyname_r() fails with the error ERANGE, the program retries with larger buffer sizes. The following shell session shows a couple of sample runs:

$ ./a.out tcp 1
ERANGE! Retrying with larger buffer
getprotobyname_r() returned: 0 (success)  (buflen=78)
p_name=tcp; p_proto=6; aliases=TCP
$ ./a.out xxx 1
ERANGE! Retrying with larger buffer
getprotobyname_r() returned: 0 (success)  (buflen=100)
Call failed/record not found

Program source

#define _GNU_SOURCE
#include <ctype.h>
#include <errno.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_BUF 10000
int
main(int argc, char *argv[])
{
    int buflen, erange_cnt, s;
    struct protoent result_buf;
    struct protoent *result;
    char buf[MAX_BUF];
    if (argc < 2) {
        printf("Usage: %s proto-name [buflen]

“, argv[0]); exit(EXIT_FAILURE); } buflen = 1024; if (argc > 2) buflen = atoi(argv[2]); if (buflen > MAX_BUF) { printf(“Exceeded buffer limit (%d) “, MAX_BUF); exit(EXIT_FAILURE); } erange_cnt = 0; do { s = getprotobyname_r(argv[1], &result_buf, buf, buflen, &result); if (s == ERANGE) { if (erange_cnt == 0) printf(“ERANGE! Retrying with larger buffer “); erange_cnt++; /* Increment a byte at a time so we can see exactly what size buffer was required. */ buflen++; if (buflen > MAX_BUF) { printf(“Exceeded buffer limit (%d) “, MAX_BUF); exit(EXIT_FAILURE); } } } while (s == ERANGE); printf(“getprotobyname_r() returned: %s (buflen=%d) “, (s == 0) ? “0 (success)” : (s == ENOENT) ? “ENOENT” : strerror(s), buflen); if (s != 0 || result == NULL) { printf(“Call failed/record not found “); exit(EXIT_FAILURE); } printf(“p_name=%s; p_proto=%d; aliases=”, result_buf.p_name, result_buf.p_proto); for (char **p = result_buf.p_aliases; *p != NULL; p++) printf("%s “, *p); printf(” “); exit(EXIT_SUCCESS); }

SEE ALSO

getprotoent(3), protocols(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1806 - Linux cli command setspent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setspent and provides detailed information about the command setspent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setspent.

NAME 🖥️ setspent 🖥️

get shadow password file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

/* General shadow password file API */
#include <shadow.h>
struct spwd *getspnam(const char *name);
struct spwd *getspent(void);
void setspent(void);
void endspent(void);
struct spwd *fgetspent(FILE *stream);
struct spwd *sgetspent(const char *s);
int putspent(const struct spwd *p, FILE *stream);
int lckpwdf(void);
int ulckpwdf(void);
/* GNU extension */
#include <shadow.h>
int getspent_r(struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int getspnam_r(const char *name, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int fgetspent_r(FILE *stream, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int sgetspent_r(const char *s, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getspent_r(), getspnam_r(), fgetspent_r(), sgetspent_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

Long ago it was considered safe to have encrypted passwords openly visible in the password file. When computers got faster and people got more security-conscious, this was no longer acceptable. Julianne Frances Haugh implemented the shadow password suite that keeps the encrypted passwords in the shadow password database (e.g., the local shadow password file /etc/shadow, NIS, and LDAP), readable only by root.

The functions described below resemble those for the traditional password database (e.g., see getpwnam(3) and getpwent(3)).

The getspnam() function returns a pointer to a structure containing the broken-out fields of the record in the shadow password database that matches the username name.

The getspent() function returns a pointer to the next entry in the shadow password database. The position in the input stream is initialized by setspent(). When done reading, the program may call endspent() so that resources can be deallocated.

The fgetspent() function is similar to getspent() but uses the supplied stream instead of the one implicitly opened by setspent().

The sgetspent() function parses the supplied string s into a struct spwd.

The putspent() function writes the contents of the supplied struct spwd *p as a text line in the shadow password file format to stream. String entries with value NULL and numerical entries with value -1 are written as an empty string.

The lckpwdf() function is intended to protect against multiple simultaneous accesses of the shadow password database. It tries to acquire a lock, and returns 0 on success, or -1 on failure (lock not obtained within 15 seconds). The ulckpwdf() function releases the lock again. Note that there is no protection against direct access of the shadow password file. Only programs that use lckpwdf() will notice the lock.

These were the functions that formed the original shadow API. They are widely available.

Reentrant versions

Analogous to the reentrant functions for the password database, glibc also has reentrant functions for the shadow password database. The getspnam_r() function is like getspnam() but stores the retrieved shadow password structure in the space pointed to by spbuf. This shadow password structure contains pointers to strings, and these strings are stored in the buffer buf of size buflen. A pointer to the result (in case of success) or NULL (in case no entry was found or an error occurred) is stored in *spbufp.

The functions getspent_r(), fgetspent_r(), and sgetspent_r() are similarly analogous to their nonreentrant counterparts.

Some non-glibc systems also have functions with these names, often with different prototypes.

Structure

The shadow password structure is defined in <shadow.h> as follows:

struct spwd {
    char *sp_namp;     /* Login name */
    char *sp_pwdp;     /* Encrypted password */
    long  sp_lstchg;   /* Date of last change
                          (measured in days since
                          1970-01-01 00:00:00 +0000 (UTC)) */
    long  sp_min;      /* Min # of days between changes */
    long  sp_max;      /* Max # of days between changes */
    long  sp_warn;     /* # of days before password expires
                          to warn user to change it */
    long  sp_inact;    /* # of days after password expires
                          until account is disabled */
    long  sp_expire;   /* Date when account expires
                          (measured in days since
                          1970-01-01 00:00:00 +0000 (UTC)) */
    unsigned long sp_flag;  /* Reserved */
};

RETURN VALUE

The functions that return a pointer return NULL if no more entries are available or if an error occurs during processing. The functions which have int as the return value return 0 for success and -1 for failure, with errno set to indicate the error.

For the nonreentrant functions, the return value may point to static area, and may be overwritten by subsequent calls to these functions.

The reentrant functions return zero on success. In case of error, an error number is returned.

ERRORS

EACCES
The caller does not have permission to access the shadow password file.

ERANGE
Supplied buffer is too small.

FILES

/etc/shadow
local shadow password database file

/etc/.pwd.lock
lock file

The include file <paths.h> defines the constant _PATH_SHADOW to the pathname of the shadow password file.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getspnam()

Thread safety

MT-Unsafe race:getspnam locale

getspent()

Thread safety

MT-Unsafe race:getspent race:spentbuf locale

setspent(), endspent(), getspent_r()

Thread safety

MT-Unsafe race:getspent locale

fgetspent()

Thread safety

MT-Unsafe race:fgetspent

sgetspent()

Thread safety

MT-Unsafe race:sgetspent

putspent(), getspnam_r(), sgetspent_r()

Thread safety

MT-Safe locale

lckpwdf(), ulckpwdf(), fgetspent_r()

Thread safety

MT-Safe

In the above table, getspent in race:getspent signifies that if any of the functions setspent(), getspent(), getspent_r(), or endspent() are used in parallel in different threads of a program, then data races could occur.

VERSIONS

Many other systems provide a similar API.

STANDARDS

None.

SEE ALSO

getgrnam(3), getpwnam(3), getpwnam_r(3), shadow(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1807 - Linux cli command Sub_Installpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Sub_Installpm and provides detailed information about the command Sub_Installpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Sub_Installpm.

NAME 🖥️ Sub_Installpm 🖥️

install subroutines into packages easily

VERSION

version 0.929

SYNOPSIS

use Sub::Install; Sub::Install::install_sub({ code => sub { … }, into => $package, as => $subname });

DESCRIPTION

This module makes it easy to install subroutines into packages without the unsightly mess of no strict or typeglobs lying about where just anyone can see them.

PERL VERSION

This library should run on perls released even an extremely long time ago. It should work on any version of perl released in the last ten years.

Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl.

FUNCTIONS

install_sub

Sub::Install::install_sub({ code => \subroutine, into => “Finance::Shady”, as => launder, });

This routine installs a given code reference into a package as a normal subroutine. The above is equivalent to:

no strict refs; *{“Finance::Shady” . :: . “launder”} = \subroutine;

If into is not given, the sub is installed into the calling package.

If code is not a code reference, it is looked for as an existing sub in the package named in the from parameter. If from is not given, it will look in the calling package.

If as is not given, and if code is a name, as will default to code. If as is not given, but if code is a code ref, Sub::Install will try to find the name of the given code ref and use that as as.

That means that this code:

Sub::Install::install_sub({ code => twitch, from => Person::InPain, into => Person::Teenager, as => dance, });

is the same as:

package Person::Teenager; Sub::Install::install_sub({ code => Person::InPain->can(twitch), as => dance, });

reinstall_sub

This routine behaves exactly like "install_sub", but does not emit a warning if warnings are on and the destination is already defined.

install_installers

This routine is provided to allow Sub::Install compatibility with Sub::Installer. It installs install_sub and reinstall_sub methods into the package named by its argument.

Sub::Install::install_installers(Code::Builder); # just for us, please Code::Builder->install_sub({ name => $code_ref }); Sub::Install::install_installers(UNIVERSAL); # feeling lucky, punk? Anything::At::All->install_sub({ name => $code_ref });

The installed installers are similar, but not identical, to those provided by Sub::Installer. They accept a single hash as an argument. The key/value pairs are used as the as and code parameters to the install_sub routine detailed above. The package name on which the method is called is used as the into parameter.

Unlike Sub::Installer’s install_sub will not eval strings into code, but will look for named code in the calling package.

EXPORTS

Sub::Install exports install_sub and reinstall_sub only if they are requested.

exporter

Sub::Install has a never-exported subroutine called exporter, which is used to implement its import routine. It takes a hashref of named arguments, only one of which is currently recognize: exports. This must be an arrayref of subroutines to offer for export.

This routine is mainly for Sub::Install’s own consumption. Instead, consider Sub::Exporter.

SEE ALSO

Sub::Installer
This module is (obviously) a reaction to Damian Conway’s Sub::Installer, which does the same thing, but does it by getting its greasy fingers all over UNIVERSAL. I was really happy about the idea of making the installation of coderefs less ugly, but I couldn’t bring myself to replace the ugliness of typeglobs and loosened strictures with the ugliness of UNIVERSAL methods.

Sub::Exporter
This is a complete Exporter.pm replacement, built atop Sub::Install.

EXTRA CREDITS

Several of the tests are adapted from tests that shipped with Damian Conway’s Sub-Installer distribution.

AUTHOR

Ricardo SIGNES <[email protected]>

CONTRIBUTORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2005 by Ricardo SIGNES.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1808 - Linux cli command zip_file_error_get

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_file_error_get and provides detailed information about the command zip_file_error_get, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_file_error_get.

libzip (-lzip)

The functions

and

are deprecated. Use

and

instead.

For

replace

int ze, se; zip_error_get(za, &ze, &se);

with

int ze, se; zip_error_t *error = zip_get_error(za); ze = zip_error_code_zip(error); se = zip_error_code_system(error);

For

replace

int ze, se; zip_file_error_get(zf, &ze, &se);

with

int ze, se; zip_error_t *error = zip_file_get_error(zf); ze = zip_error_code_zip(error); se = zip_error_code_system(error);

was added in libzip 0.6. It was deprecated in libzip 1.0, use

/

instead.

was added in libzip 0.6. It was deprecated in libzip 1.0, use

/

instead.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1809 - Linux cli command Net_DBus_Servicepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Servicepm and provides detailed information about the command Net_DBus_Servicepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Servicepm.

NAME 🖥️ Net_DBus_Servicepm 🖥️

Provide a service to the bus for clients to use

SYNOPSIS

package main; use Net::DBus; # Attach to the bus my $bus = Net::DBus->find; # Acquire a service org.demo.Hello my $service = $bus->export_service(“org.demo.Hello”); # Export our object within the service my $object = Demo::HelloWorld->new($service); ….rest of program…

DESCRIPTION

This module represents a service which is exported to the message bus. Once a service has been exported, it is possible to create and export objects to the bus.

METHODS

my $service = Net::DBus::Service->new($bus, $name);
Create a new service, attaching to the bus provided in the $bus parameter, which should be an instance of the Net::DBus object. The $name parameter is the qualified service name. It is not usually necessary to use this constructor, since services can be created via the export_service method on the Net::DBus object. When $name is not specified or is undef then returned handle to the service is identified only by the unique name of client’s connection to the bus.

my $bus = $service->get_bus;
Retrieves the Net::DBus object to which this service is attached.

my $name = $service->get_service_name
Retrieves the qualified name by which this service is known on the bus.

AUTHOR

Daniel P. Berrange

COPYRIGHT

Copyright (C) 2005-2011 Daniel P. Berrange

SEE ALSO

Net::DBus, Net::DBus::Object, Net::DBus::RemoteService

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1810 - Linux cli command getprotobyname

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getprotobyname and provides detailed information about the command getprotobyname, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getprotobyname.

NAME 🖥️ getprotobyname 🖥️

get protocol entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
struct protoent *getprotoent(void);
struct protoent *getprotobyname(const char *name);
struct protoent *getprotobynumber(int proto);
void setprotoent(int stayopen);
void endprotoent(void);

DESCRIPTION

The getprotoent() function reads the next entry from the protocols database (see protocols(5)) and returns a protoent structure containing the broken-out fields from the entry. A connection is opened to the database if necessary.

The getprotobyname() function returns a protoent structure for the entry from the database that matches the protocol name name. A connection is opened to the database if necessary.

The getprotobynumber() function returns a protoent structure for the entry from the database that matches the protocol number number. A connection is opened to the database if necessary.

The setprotoent() function opens a connection to the database, and sets the next entry to the first entry. If stayopen is nonzero, then the connection to the database will not be closed between calls to one of the getproto*() functions.

The endprotoent() function closes the connection to the database.

The protoent structure is defined in <netdb.h> as follows:

struct protoent {
    char  *p_name;       /* official protocol name */
    char **p_aliases;    /* alias list */
    int    p_proto;      /* protocol number */
}

The members of the protoent structure are:

p_name
The official name of the protocol.

p_aliases
A NULL-terminated list of alternative names for the protocol.

p_proto
The protocol number.

RETURN VALUE

The getprotoent(), getprotobyname(), and getprotobynumber() functions return a pointer to a statically allocated protoent structure, or a null pointer if an error occurs or the end of the file is reached.

FILES

/etc/protocols
protocol database file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getprotoent()

Thread safety

MT-Unsafe race:protoent race:protoentbuf locale

getprotobyname()

Thread safety

MT-Unsafe race:protobyname locale

getprotobynumber()

Thread safety

MT-Unsafe race:protobynumber locale

setprotoent(), endprotoent()

Thread safety

MT-Unsafe race:protoent locale

In the above table, protoent in race:protoent signifies that if any of the functions setprotoent(), getprotoent(), or endprotoent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, 4.3BSD.

SEE ALSO

getnetent(3), getprotoent_r(3), getservent(3), protocols(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1811 - Linux cli command htobe32

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command htobe32 and provides detailed information about the command htobe32, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the htobe32.

NAME 🖥️ htobe32 🖥️

convert values between host and big-/little-endian byte order

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <endian.h>
uint16_t htobe16(uint16_t host_16bits);
uint16_t htole16(uint16_t host_16bits);
uint16_t be16toh(uint16_t big_endian_16bits);
uint16_t le16toh(uint16_t little_endian_16bits);
uint32_t htobe32(uint32_t host_32bits);
uint32_t htole32(uint32_t host_32bits);
uint32_t be32toh(uint32_t big_endian_32bits);
uint32_t le32toh(uint32_t little_endian_32bits);
uint64_t htobe64(uint64_t host_64bits);
uint64_t htole64(uint64_t host_64bits);
uint64_t be64toh(uint64_t big_endian_64bits);
uint64_t le64toh(uint64_t little_endian_64bits);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

htobe16(), htole16(), be16toh(), le16toh(), htobe32(), htole32(), be32toh(), le32toh(), htobe64(), htole64(), be64toh(), le64toh():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    In glibc up to and including 2.19:
        _BSD_SOURCE

DESCRIPTION

These functions convert the byte encoding of integer values from the byte order that the current CPU (the “host”) uses, to and from little-endian and big-endian byte order.

The number, nn, in the name of each function indicates the size of integer handled by the function, either 16, 32, or 64 bits.

The functions with names of the form “htobenn” convert from host byte order to big-endian order.

The functions with names of the form “htolenn” convert from host byte order to little-endian order.

The functions with names of the form “benntoh” convert from big-endian order to host byte order.

The functions with names of the form “lenntoh” convert from little-endian order to host byte order.

VERSIONS

Similar functions are present on the BSDs, where the required header file is <sys/endian.h> instead of <endian.h>. Unfortunately, NetBSD, FreeBSD, and glibc haven’t followed the original OpenBSD naming convention for these functions, whereby the nn component always appears at the end of the function name (thus, for example, in NetBSD, FreeBSD, and glibc, the equivalent of OpenBSDs “betoh32” is “be32toh”).

STANDARDS

None.

HISTORY

glibc 2.9.

These functions are similar to the older byteorder(3) family of functions. For example, be32toh() is identical to ntohl().

The advantage of the byteorder(3) functions is that they are standard functions available on all UNIX systems. On the other hand, the fact that they were designed for use in the context of TCP/IP means that they lack the 64-bit and little-endian variants described in this page.

EXAMPLES

The program below display the results of converting an integer from host byte order to both little-endian and big-endian byte order. Since host byte order is either little-endian or big-endian, only one of these conversions will have an effect. When we run this program on a little-endian system such as x86-32, we see the following:

$ ./a.out
x.u32 = 0x44332211
htole32(x.u32) = 0x44332211
htobe32(x.u32) = 0x11223344

Program source

#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    union {
        uint32_t u32;
        uint8_t arr[4];
    } x;
    x.arr[0] = 0x11;	/* Lowest-address byte */
    x.arr[1] = 0x22;
    x.arr[2] = 0x33;
    x.arr[3] = 0x44;	/* Highest-address byte */
    printf("x.u32 = %#x

“, x.u32); printf(“htole32(x.u32) = %#x “, htole32(x.u32)); printf(“htobe32(x.u32) = %#x “, htobe32(x.u32)); exit(EXIT_SUCCESS); }

SEE ALSO

bswap(3), byteorder(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1812 - Linux cli command XML_Parser_Style_Treepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_Parser_Style_Treepm and provides detailed information about the command XML_Parser_Style_Treepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_Parser_Style_Treepm.

NAME 🖥️ XML_Parser_Style_Treepm 🖥️

Tree style parser

SYNOPSIS

use XML::Parser; my $p = XML::Parser->new(Style => Tree); my $tree = $p->parsefile(foo.xml);

DESCRIPTION

This module implements XML::Parser’s Tree style parser.

When parsing a document, parse() will return a parse tree for the document. Each node in the tree takes the form of a tag, content pair. Text nodes are represented with a pseudo-tag of “0” and the string that is their content. For elements, the content is an array reference. The first item in the array is a (possibly empty) hash reference containing attributes. The remainder of the array is a sequence of tag-content pairs representing the content of the element.

So for example the result of parsing:

<foo><head id=“a”>Hello <em>there</em></head><bar>Howdy<ref/></bar>do</foo>

would be:

Tag Content ================================================================== [foo, [{}, head, [{id => “a”}, 0, “Hello “, em, [{}, 0, “there”]], bar, [ {}, 0, “Howdy”, ref, [{}]], 0, “do” ] ]

The root document “foo”, has 3 children: a “head” element, a “bar” element and the text “do”. After the empty attribute hash, these are represented in it’s contents by 3 tag-content pairs.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1813 - Linux cli command XtIsSensitive

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtIsSensitive and provides detailed information about the command XtIsSensitive, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtIsSensitive.

NAME 🖥️ XtIsSensitive 🖥️

set and check a widget’s sensitivity state

SYNTAX

#include <X11/Intrinsic.h>

void XtSetSensitive(Widget w, Boolean sensitive);

Boolean XtIsSensitive(Widget w);

ARGUMENTS

sensitive
Specifies a Boolean value that indicates whether the widget should receive keyboard and pointer events.

  1. Specifies the widget.

DESCRIPTION

The XtSetSensitive function first calls XtSetValues on the current widget with an argument list specifying that the sensitive field should change to the new value. It then recursively propagates the new value down the managed children tree by calling XtSetValues on each child to set the ancestor_sensitive to the new value if the new values for sensitive and the child’s ancestor_sensitive are not the same.

XtSetSensitive calls XtSetValues to change sensitive and ancestor_sensitive. Therefore, when one of these changes, the widget’s set_values procedure should take whatever display actions are needed (for example, greying out or stippling the widget).

XtSetSensitive maintains the invariant that if parent has either sensitive or ancestor_sensitive False, then all children have ancestor_sensitive False.

The XtIsSensitive function returns True or False to indicate whether or not user input events are being dispatched. If both core.sensitive and core.ancestor_sensitive are True, XtIsSensitive returns True; otherwise, it returns False.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1814 - Linux cli command XtVaAppCreateShell

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtVaAppCreateShell and provides detailed information about the command XtVaAppCreateShell, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtVaAppCreateShell.

NAME 🖥️ XtVaAppCreateShell 🖥️

create top-level widget instance

SYNTAX

#include <X11/Intrinsic.h>

Widget XtAppCreateShell(const char *application_name, const char *application_class, WidgetClass widget_class, Display *display, ArgList args, Cardinal num_args);

Widget XtVaAppCreateShell(const char * application_name, const char * application_class, WidgetClass widget_class, Display *display, … );

ARGUMENTS

application_name
Specifies the name of the application instance.

application_class
Specifies the class name of this application, which usually is the generic name for all instances of this application.

widget_class
Specifies the widget class that the application top-level widget should be.

display
Specifies the display from which to get the resources.

args
Specifies the argument list from which to get the resources.

num_args
Specifies the number of arguments in the argument list.


Specifies the variable argument list from which to get the resources.

DESCRIPTION

The XtAppCreateShell function saves the specified application name and application class for qualifying all widget resource specifiers. The application name and application class are used as the left-most components in all widget resource names for this application. XtAppCreateShell should be used to create a new logical application within a program or to create a shell on another display. In the first case, it allows the specification of a new root in the resource hierarchy. In the second case, it uses the resource database associated with the other display.

Note that the widget returned by XtAppCreateShell has the WM_COMMAND property set for session managers (see Chapter 4).

SEE ALSO

XtCreateWidget(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1815 - Linux cli command twalk_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command twalk_r and provides detailed information about the command twalk_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the twalk_r.

NAME 🖥️ twalk_r 🖥️

manage a binary search tree

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <search.h>
typedef enum { preorder, postorder, endorder, leaf } VISIT;
void *tsearch(const void *key, void **rootp,
 int (*compar)(const void *, const void *));
void *tfind(const void *key, void *const *rootp,
 int (*compar)(const void *, const void *));
void *tdelete(const void *restrict key, void **restrict rootp,
 int (*compar)(const void *, const void *));
void twalk(const void *root,
 void (*action)(const void *nodep, VISIT which,
 int depth));
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <search.h>
void twalk_r(const void *root,
 void (*action)(const void *nodep, VISIT which,
 void *closure),
 void *closure);
void tdestroy(void *root, void (*free_node)(void *nodep));

DESCRIPTION

tsearch(), tfind(), twalk(), and tdelete() manage a binary search tree. They are generalized from Knuth (6.2.2) Algorithm T. The first field in each node of the tree is a pointer to the corresponding data item. (The calling program must store the actual data.) compar points to a comparison routine, which takes pointers to two items. It should return an integer which is negative, zero, or positive, depending on whether the first item is less than, equal to, or greater than the second.

tsearch() searches the tree for an item. key points to the item to be searched for. rootp points to a variable which points to the root of the tree. If the tree is empty, then the variable that rootp points to should be set to NULL. If the item is found in the tree, then tsearch() returns a pointer to the corresponding tree node. (In other words, tsearch() returns a pointer to a pointer to the data item.) If the item is not found, then tsearch() adds it, and returns a pointer to the corresponding tree node.

tfind() is like tsearch(), except that if the item is not found, then tfind() returns NULL.

tdelete() deletes an item from the tree. Its arguments are the same as for tsearch().

twalk() performs depth-first, left-to-right traversal of a binary tree. root points to the starting node for the traversal. If that node is not the root, then only part of the tree will be visited. twalk() calls the user function action each time a node is visited (that is, three times for an internal node, and once for a leaf). action, in turn, takes three arguments. The first argument is a pointer to the node being visited. The structure of the node is unspecified, but it is possible to cast the pointer to a pointer-to-pointer-to-element in order to access the element stored within the node. The application must not modify the structure pointed to by this argument. The second argument is an integer which takes one of the values preorder, postorder, or endorder depending on whether this is the first, second, or third visit to the internal node, or the value leaf if this is the single visit to a leaf node. (These symbols are defined in <search.h>.) The third argument is the depth of the node; the root node has depth zero.

(More commonly, preorder, postorder, and endorder are known as preorder, inorder, and postorder: before visiting the children, after the first and before the second, and after visiting the children. Thus, the choice of name postorder is rather confusing.)

twalk_r() is similar to twalk(), but instead of the depth argument, the closure argument pointer is passed to each invocation of the action callback, unchanged. This pointer can be used to pass information to and from the callback function in a thread-safe fashion, without resorting to global variables.

tdestroy() removes the whole tree pointed to by root, freeing all resources allocated by the tsearch() function. For the data in each tree node the function free_node is called. The pointer to the data is passed as the argument to the function. If no such work is necessary, free_node must point to a function doing nothing.

RETURN VALUE

tsearch() returns a pointer to a matching node in the tree, or to the newly added node, or NULL if there was insufficient memory to add the item. tfind() returns a pointer to the node, or NULL if no match is found. If there are multiple items that match the key, the item whose node is returned is unspecified.

tdelete() returns a pointer to the parent of the node deleted, or NULL if the item was not found. If the deleted node was the root node, tdelete() returns a dangling pointer that must not be accessed.

tsearch(), tfind(), and tdelete() also return NULL if rootp was NULL on entry.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tsearch(), tfind(), tdelete()

Thread safetyMT-Safe race:rootp

twalk()

Thread safetyMT-Safe race:root

twalk_r()

Thread safetyMT-Safe race:root

tdestroy()

Thread safetyMT-Safe

STANDARDS

tsearch()
tfind()
tdelete()
twalk()
POSIX.1-2008.

tdestroy()
twalk_r()
GNU.

HISTORY

tsearch()
tfind()
tdelete()
twalk()
POSIX.1-2001, POSIX.1-2008, SVr4.

twalk_r()
glibc 2.30.

NOTES

twalk() takes a pointer to the root, while the other functions take a pointer to a variable which points to the root.

tdelete() frees the memory required for the node in the tree. The user is responsible for freeing the memory for the corresponding data.

The example program depends on the fact that twalk() makes no further reference to a node after calling the user function with argument “endorder” or “leaf”. This works with the GNU library implementation, but is not in the System V documentation.

EXAMPLES

The following program inserts twelve random numbers into a binary tree, where duplicate numbers are collapsed, then prints the numbers in order.

#define _GNU_SOURCE     /* Expose declaration of tdestroy() */
#include <search.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
static void *root = NULL;
static void *
xmalloc(size_t n)
{
    void *p;
    p = malloc(n);
    if (p)
        return p;
    fprintf(stderr, "insufficient memory

“); exit(EXIT_FAILURE); } static int compare(const void *pa, const void pb) { if ((int *) pa < *(int ) pb) return -1; if ((int *) pa > *(int *) pb) return 1; return 0; } static void action(const void *nodep, VISIT which, int depth) { int *datap; switch (which) { case preorder: break; case postorder: datap = *(int **) nodep; printf("%6d “, *datap); break; case endorder: break; case leaf: datap = *(int **) nodep; printf("%6d “, *datap); break; } } int main(void) { int *ptr; int **val; srand(time(NULL)); for (unsigned int i = 0; i < 12; i++) { ptr = xmalloc(sizeof(*ptr)); *ptr = rand() & 0xff; val = tsearch(ptr, &root, compare); if (val == NULL) exit(EXIT_FAILURE); if (*val != ptr) free(ptr); } twalk(root, action); tdestroy(root, free); exit(EXIT_SUCCESS); }

SEE ALSO

bsearch(3), hsearch(3), lsearch(3), qsort(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1816 - Linux cli command Image_ExifTool_Matroskapm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Matroskapm and provides detailed information about the command Image_ExifTool_Matroskapm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Matroskapm.

NAME 🖥️ Image_ExifTool_Matroskapm 🖥️

Read meta information from Matroska files

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read meta information from Matroska multimedia files (MKA, MKV, MKS and WEBM).

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.matroska.org/technical/specs/index.html>

<https://www.matroska.org/technical/tagging.html>

SEE ALSO

“Matroska Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1817 - Linux cli command Net_DNS_Updatepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_Updatepm and provides detailed information about the command Net_DNS_Updatepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_Updatepm.

NAME 🖥️ Net_DNS_Updatepm 🖥️

DNS dynamic update packet

SYNOPSIS

use Net::DNS; $update = Net::DNS::Update->new( example.com, IN ); $update->push( prereq => nxrrset(host.example.com. AAAA) ); $update->push( update => rr_add(host.example.com. 86400 AAAA 2001::DB8::F00) );

DESCRIPTION

Net::DNS::Update is a subclass of Net::DNS::Packet, to be used for making DNS dynamic updates.

Programmers should refer to RFC2136 for dynamic update semantics.

METHODS

new

$update = Net::DNS::Update->new; $update = Net::DNS::Update->new( example.com ); $update = Net::DNS::Update->new( example.com, IN );

Returns a Net::DNS::Update object suitable for performing a DNS dynamic update. Specifically, it creates a packet with the header opcode set to UPDATE and the zone record type to SOA (per RFC 2136, Section 2.3).

Programs must use the push() method to add RRs to the prerequisite and update sections before performing the update.

Arguments are the zone name and the class. The zone and class may be undefined or omitted and default to the default domain from the resolver configuration and IN respectively.

push

$ancount = $update->push( prereq => $rr ); $nscount = $update->push( update => $rr ); $arcount = $update->push( additional => $rr ); $nscount = $update->push( update => $rr1, $rr2, $rr3 ); $nscount = $update->push( update => @rr );

Adds RRs to the specified section of the update packet.

Returns the number of resource records in the specified section.

Section names may be abbreviated to the first three characters.

unique_push

$ancount = $update->unique_push( prereq => $rr ); $nscount = $update->unique_push( update => $rr ); $arcount = $update->unique_push( additional => $rr ); $nscount = $update->unique_push( update => $rr1, $rr2, $rr3 ); $nscount = $update->unique_push( update => @rr );

Adds RRs to the specified section of the update packet provided that the RRs are not already present in the same section.

Returns the number of resource records in the specified section.

Section names may be abbreviated to the first three characters.

EXAMPLES

The first example below shows a complete program. Subsequent examples show only the creation of the update packet.

Although the examples are presented using the string form of RRs, the corresponding ( name => value ) form may also be used.

Add a new host

#!/usr/bin/perl use Net::DNS; # Create the update packet. my $update = Net::DNS::Update->new(example.com); # Prerequisite is that no address records exist for the name. $update->push( pre => nxrrset(host.example.com. A) ); $update->push( pre => nxrrset(host.example.com. AAAA) ); # Add two address records for the name. $update->push( update => rr_add(host.example.com. 86400 A 192.0.2.1) ); $update->push( update => rr_add(host.example.com. 86400 AAAA 2001:DB8::1) ); # Send the update to the zones primary nameserver. my $resolver = Net::DNS::Resolver->new(); $resolver->nameservers(DNSprimary.example.com); my $reply = $resolver->send($update); # Did it work? if ($reply) { if ( $reply->header->rcode eq NOERROR ) { print “Update succeeded “; } else { print Update failed: , $reply->header->rcode, " “; } } else { print Update failed: , $resolver->errorstring, " “; }

Add an MX record for a name that already exists

my $update = Net::DNS::Update->new(example.com); $update->push( prereq => yxdomain(example.com) ); $update->push( update => rr_add(example.com MX 10 mailhost.example.com) );

Add a TXT record for a name that does not exist

my $update = Net::DNS::Update->new(example.com); $update->push( prereq => nxdomain(info.example.com) ); $update->push( update => rr_add(info.example.com TXT “yabba dabba doo”) );

Delete all A records for a name

my $update = Net::DNS::Update->new(example.com); $update->push( prereq => yxrrset(host.example.com A) ); $update->push( update => rr_del(host.example.com A) );

Delete all RRs for a name

my $update = Net::DNS::Update->new(example.com); $update->push( prereq => yxdomain(byebye.example.com) ); $update->push( update => rr_del(byebye.example.com) );

Perform DNS update signed using a key generated by BIND tsig-keygen

my $update = Net::DNS::Update->new(example.com); $update->push( update => rr_add(host.example.com AAAA 2001:DB8::1) ); $update->sign_tsig( $key_file ); my $reply = $resolver->send( $update ); $reply->verify( $update ) || die $reply->verifyerr;

Signing the DNS update using a customised TSIG record

$update->sign_tsig( $key_file, fudge => 60 );

Signing the DNS update using private key generated by BIND dnssec-keygen

$update->sign_tsig( “$dir/Khmac-sha512.example.com.+165+01018.private” );

Signing the DNS update using public key generated by BIND dnssec-keygen

$update->sign_tsig( “$dir/Khmac-sha512.example.com.+165+01018.key” );

Another way to sign a DNS update

use Net::DNS::RR::TSIG; my $tsig = create Net::DNS::RR::TSIG( $key_file ); $tsig->fudge(60); my $update = Net::DNS::Update->new(example.com); $update->push( update => rr_add(host.example.com AAAA 2001:DB8::1) ); $update->push( additional => $tsig );

COPYRIGHT

Copyright (c)1997-2000 Michael Fuhr.

Portions Copyright (c)2002,2003 Chris Reinhardt.

Portions Copyright (c)2015 Dick Franks.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::Packet Net::DNS::Header Net::DNS::RR Net::DNS::Resolver RFC2136 <https://tools.ietf.org/html/rfc2136> RFC8945 <https://tools.ietf.org/html/rfc8945>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1818 - Linux cli command SLIST_EMPTY

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SLIST_EMPTY and provides detailed information about the command SLIST_EMPTY, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SLIST_EMPTY.

NAME 🖥️ SLIST_EMPTY 🖥️

implementation of a singly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
SLIST_ENTRY(TYPE);
SLIST_HEAD(HEADNAME, TYPE);
SLIST_HEAD SLIST_HEAD_INITIALIZER(SLIST_HEAD head);
void SLIST_INIT(SLIST_HEAD *head);
int SLIST_EMPTY(SLIST_HEAD *head);
void SLIST_INSERT_HEAD(SLIST_HEAD *head,
 struct TYPE *elm, SLIST_ENTRY NAME);
void SLIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, SLIST_ENTRY NAME);
struct TYPE *SLIST_FIRST(SLIST_HEAD *head);
struct TYPE *SLIST_NEXT(struct TYPE *elm, SLIST_ENTRY NAME);
SLIST_FOREACH(struct TYPE *var, SLIST_HEAD *head, SLIST_ENTRY NAME);
void SLIST_REMOVE(SLIST_HEAD *head, struct TYPE *elm,
 SLIST_ENTRY NAME);
void SLIST_REMOVE_HEAD(SLIST_HEAD *head,
 SLIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on singly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type SLIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro SLIST_HEAD().

Creation

A singly linked list is headed by a structure defined by the SLIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the list after an existing element or at the head of the list. An SLIST_HEAD structure is declared as follows:

SLIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

SLIST_ENTRY() declares a structure that connects the elements in the list.

SLIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

SLIST_INIT() initializes the list referenced by head.

SLIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

SLIST_INSERT_HEAD() inserts the new element elm at the head of the list.

SLIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

SLIST_FIRST() returns the first element in the list, or NULL if the list is empty.

SLIST_NEXT() returns the next element in the list.

SLIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

SLIST_REMOVE() removes the element elm from the list.

SLIST_REMOVE_HEAD() removes the element elm from the head of the list. For optimum efficiency, elements being removed from the head of the list should explicitly use this macro instead of the generic SLIST_REMOVE().

RETURN VALUE

SLIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

SLIST_FIRST(), and SLIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

SLIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

SLIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. SLIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    SLIST_ENTRY(entry) entries;             /* Singly linked list */
};
SLIST_HEAD(slisthead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct slisthead head;                  /* Singly linked list
                                               head */
    SLIST_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    SLIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    SLIST_INSERT_AFTER(n1, n2, entries);
    SLIST_REMOVE(&head, n2, entry, entries);/* Deletion */
    free(n2);
    n3 = SLIST_FIRST(&head);
    SLIST_REMOVE_HEAD(&head, entries);      /* Deletion from the head */
    free(n3);
    for (unsigned int i = 0; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        SLIST_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    SLIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); while (!SLIST_EMPTY(&head)) { /* List deletion */ n1 = SLIST_FIRST(&head); SLIST_REMOVE_HEAD(&head, entries); free(n1); } SLIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1819 - Linux cli command swprintf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command swprintf and provides detailed information about the command swprintf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the swprintf.

NAME 🖥️ swprintf 🖥️

formatted wide-character output conversion

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
#include <wchar.h>
int wprintf(const wchar_t *restrict format, ...);
int fwprintf(FILE *restrict stream,
 const wchar_t *restrict format, ...);
int swprintf(wchar_t wcs[restrict .maxlen], size_t maxlen,
 const wchar_t *restrict format, ...);
int vwprintf(const wchar_t *restrict format, va_list args);
int vfwprintf(FILE *restrict stream,
 const wchar_t *restrict format, va_list args);
int vswprintf(wchar_t wcs[restrict .maxlen], size_t maxlen,
 const wchar_t *restrict format, va_list args);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE
        || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The wprintf() family of functions is the wide-character equivalent of the printf(3) family of functions. It performs formatted output of wide characters.

The wprintf() and vwprintf() functions perform wide-character output to stdout. stdout must not be byte oriented; see fwide(3) for more information.

The fwprintf() and vfwprintf() functions perform wide-character output to stream. stream must not be byte oriented; see fwide(3) for more information.

The swprintf() and vswprintf() functions perform wide-character output to an array of wide characters. The programmer must ensure that there is room for at least maxlen wide characters at wcs.

These functions are like the printf(3), vprintf(3), fprintf(3), vfprintf(3), sprintf(3), vsprintf(3) functions except for the following differences:

·
The format string is a wide-character string.

·
The output consists of wide characters, not bytes.

·
swprintf() and vswprintf() take a maxlen argument, sprintf(3) and vsprintf(3) do not. (snprintf(3) and vsnprintf(3) take a maxlen argument, but these functions do not return -1 upon buffer overflow on Linux.)

The treatment of the conversion characters c and s is different:

c
If no l modifier is present, the int argument is converted to a wide character by a call to the btowc(3) function, and the resulting wide character is written. If an l modifier is present, the wint_t (wide character) argument is written.

s
If no l modifier is present: the const char * argument is expected to be a pointer to an array of character type (pointer to a string) containing a multibyte character sequence beginning in the initial shift state. Characters from the array are converted to wide characters (each by a call to the mbrtowc(3) function with a conversion state starting in the initial state before the first byte). The resulting wide characters are written up to (but not including) the terminating null wide character (L’�’). If a precision is specified, no more wide characters than the number specified are written. Note that the precision determines the number of wide characters written, not the number of bytes or screen positions. The array must contain a terminating null byte (‘�’), unless a precision is given and it is so small that the number of converted wide characters reaches it before the end of the array is reached. If an l modifier is present: the const wchar_t * argument is expected to be a pointer to an array of wide characters. Wide characters from the array are written up to (but not including) a terminating null wide character. If a precision is specified, no more than the number specified are written. The array must contain a terminating null wide character, unless a precision is given and it is smaller than or equal to the number of wide characters in the array.

RETURN VALUE

The functions return the number of wide characters written, excluding the terminating null wide character in case of the functions swprintf() and vswprintf(). They return -1 when an error occurs.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wprintf(), fwprintf(), swprintf(), vwprintf(), vfwprintf(), vswprintf()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of wprintf() et al. depends on the LC_CTYPE category of the current locale.

If the format string contains non-ASCII wide characters, the program will work correctly only if the LC_CTYPE category of the current locale at run time is the same as the LC_CTYPE category of the current locale at compile time. This is because the wchar_t representation is platform- and locale-dependent. (The glibc represents wide characters using their Unicode (ISO/IEC 10646) code point, but other platforms don’t do this. Also, the use of C99 universal character names of the form \unnnn does not solve this problem.) Therefore, in internationalized programs, the format string should consist of ASCII wide characters only, or should be constructed at run time in an internationalized way (e.g., using gettext(3) or iconv(3), followed by mbstowcs(3)).

SEE ALSO

fprintf(3), fputwc(3), fwide(3), printf(3), snprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1820 - Linux cli command sysconf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sysconf and provides detailed information about the command sysconf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sysconf.

NAME 🖥️ sysconf 🖥️

get configuration information at run time

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
long sysconf(int name);

DESCRIPTION

POSIX allows an application to test at compile or run time whether certain options are supported, or what the value is of certain configurable constants or limits.

At compile time this is done by including <unistd.h> and/or <limits.h> and testing the value of certain macros.

At run time, one can ask for numerical values using the present function sysconf(). One can ask for numerical values that may depend on the filesystem in which a file resides using fpathconf(3) and pathconf(3). One can ask for string values using confstr(3).

The values obtained from these functions are system configuration constants. They do not change during the lifetime of a process.

For options, typically, there is a constant _POSIX_FOO that may be defined in <unistd.h>. If it is undefined, one should ask at run time. If it is defined to -1, then the option is not supported. If it is defined to 0, then relevant functions and headers exist, but one has to ask at run time what degree of support is available. If it is defined to a value other than -1 or 0, then the option is supported. Usually the value (such as 200112L) indicates the year and month of the POSIX revision describing the option. glibc uses the value 1 to indicate support as long as the POSIX revision has not been published yet. The sysconf() argument will be _SC_FOO. For a list of options, see posixoptions(7).

For variables or limits, typically, there is a constant _FOO, maybe defined in <limits.h>, or _POSIX_FOO, maybe defined in <unistd.h>. The constant will not be defined if the limit is unspecified. If the constant is defined, it gives a guaranteed value, and a greater value might actually be supported. If an application wants to take advantage of values which may change between systems, a call to sysconf() can be made. The sysconf() argument will be _SC_FOO.

POSIX.1 variables

We give the name of the variable, the name of the sysconf() argument used to inquire about its value, and a short description.

First, the POSIX.1 compatible values.

ARG_MAX - _SC_ARG_MAX
The maximum length of the arguments to the exec(3) family of functions. Must not be less than _POSIX_ARG_MAX (4096).

CHILD_MAX - _SC_CHILD_MAX
The maximum number of simultaneous processes per user ID. Must not be less than _POSIX_CHILD_MAX (25).

HOST_NAME_MAX - _SC_HOST_NAME_MAX
Maximum length of a hostname, not including the terminating null byte, as returned by gethostname(2). Must not be less than _POSIX_HOST_NAME_MAX (255).

LOGIN_NAME_MAX - _SC_LOGIN_NAME_MAX
Maximum length of a login name, including the terminating null byte. Must not be less than _POSIX_LOGIN_NAME_MAX (9).

NGROUPS_MAX - _SC_NGROUPS_MAX
Maximum number of supplementary group IDs.

clock ticks - _SC_CLK_TCK
The number of clock ticks per second. The corresponding variable is obsolete. It was of course called CLK_TCK. (Note: the macro CLOCKS_PER_SEC does not give information: it must equal 1000000.)

OPEN_MAX - _SC_OPEN_MAX
The maximum number of files that a process can have open at any time. Must not be less than _POSIX_OPEN_MAX (20).

PAGESIZE - _SC_PAGESIZE
Size of a page in bytes. Must not be less than 1.

PAGE_SIZE - _SC_PAGE_SIZE
A synonym for PAGESIZE/_SC_PAGESIZE. (Both PAGESIZE and PAGE_SIZE are specified in POSIX.)

RE_DUP_MAX - _SC_RE_DUP_MAX
The number of repeated occurrences of a BRE permitted by regexec(3) and regcomp(3). Must not be less than _POSIX2_RE_DUP_MAX (255).

STREAM_MAX - _SC_STREAM_MAX
The maximum number of streams that a process can have open at any time. If defined, it has the same value as the standard C macro FOPEN_MAX. Must not be less than _POSIX_STREAM_MAX (8).

SYMLOOP_MAX - _SC_SYMLOOP_MAX
The maximum number of symbolic links seen in a pathname before resolution returns ELOOP. Must not be less than _POSIX_SYMLOOP_MAX (8).

TTY_NAME_MAX - _SC_TTY_NAME_MAX
The maximum length of terminal device name, including the terminating null byte. Must not be less than _POSIX_TTY_NAME_MAX (9).

TZNAME_MAX - _SC_TZNAME_MAX
The maximum number of bytes in a timezone name. Must not be less than _POSIX_TZNAME_MAX (6).

_POSIX_VERSION - _SC_VERSION
indicates the year and month the POSIX.1 standard was approved in the format YYYYMML; the value 199009L indicates the Sept. 1990 revision.

POSIX.2 variables

Next, the POSIX.2 values, giving limits for utilities.

BC_BASE_MAX - _SC_BC_BASE_MAX
indicates the maximum obase value accepted by the bc(1) utility.

BC_DIM_MAX - _SC_BC_DIM_MAX
indicates the maximum value of elements permitted in an array by bc(1).

BC_SCALE_MAX - _SC_BC_SCALE_MAX
indicates the maximum scale value allowed by bc(1).

BC_STRING_MAX - _SC_BC_STRING_MAX
indicates the maximum length of a string accepted by bc(1).

COLL_WEIGHTS_MAX - _SC_COLL_WEIGHTS_MAX
indicates the maximum numbers of weights that can be assigned to an entry of the LC_COLLATE order keyword in the locale definition file.

EXPR_NEST_MAX - _SC_EXPR_NEST_MAX
is the maximum number of expressions which can be nested within parentheses by expr(1).

LINE_MAX - _SC_LINE_MAX
The maximum length of a utility’s input line, either from standard input or from a file. This includes space for a trailing newline.

RE_DUP_MAX - _SC_RE_DUP_MAX
The maximum number of repeated occurrences of a regular expression when the interval notation *\m,n* is used.

POSIX2_VERSION - _SC_2_VERSION
indicates the version of the POSIX.2 standard in the format of YYYYMML.

POSIX2_C_DEV - _SC_2_C_DEV
indicates whether the POSIX.2 C language development facilities are supported.

POSIX2_FORT_DEV - _SC_2_FORT_DEV
indicates whether the POSIX.2 FORTRAN development utilities are supported.

POSIX2_FORT_RUN - _SC_2_FORT_RUN
indicates whether the POSIX.2 FORTRAN run-time utilities are supported.

_POSIX2_LOCALEDEF - _SC_2_LOCALEDEF
indicates whether the POSIX.2 creation of locales via localedef(1) is supported.

POSIX2_SW_DEV - _SC_2_SW_DEV
indicates whether the POSIX.2 software development utilities option is supported.

These values also exist, but may not be standard.

  • _SC_PHYS_PAGES
    The number of pages of physical memory. Note that it is possible for the product of this value and the value of _SC_PAGESIZE to overflow.

  • _SC_AVPHYS_PAGES
    The number of currently available pages of physical memory.

  • _SC_NPROCESSORS_CONF
    The number of processors configured. See also get_nprocs_conf(3).

  • _SC_NPROCESSORS_ONLN
    The number of processors currently online (available). See also get_nprocs_conf(3).

RETURN VALUE

The return value of sysconf() is one of the following:

  • On error, -1 is returned and errno is set to indicate the error (for example, EINVAL, indicating that name is invalid).

  • If name corresponds to a maximum or minimum limit, and that limit is indeterminate, -1 is returned and errno is not changed. (To distinguish an indeterminate limit from an error, set errno to zero before the call, and then check whether errno is nonzero when -1 is returned.)

  • If name corresponds to an option, a positive value is returned if the option is supported, and -1 is returned if the option is not supported.

  • Otherwise, the current value of the option or limit is returned. This value will not be more restrictive than the corresponding value that was described to the application in <unistd.h> or <limits.h> when the application was compiled.

ERRORS

EINVAL
name is invalid.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sysconf()

Thread safetyMT-Safe env

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

BUGS

It is difficult to use ARG_MAX because it is not specified how much of the argument space for exec(3) is consumed by the user’s environment variables.

Some returned values may be huge; they are not suitable for allocating memory.

SEE ALSO

bc(1), expr(1), getconf(1), locale(1), confstr(3), fpathconf(3), pathconf(3), posixoptions(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1821 - Linux cli command vfwprintf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command vfwprintf and provides detailed information about the command vfwprintf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the vfwprintf.

NAME 🖥️ vfwprintf 🖥️

formatted wide-character output conversion

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
#include <wchar.h>
int wprintf(const wchar_t *restrict format, ...);
int fwprintf(FILE *restrict stream,
 const wchar_t *restrict format, ...);
int swprintf(wchar_t wcs[restrict .maxlen], size_t maxlen,
 const wchar_t *restrict format, ...);
int vwprintf(const wchar_t *restrict format, va_list args);
int vfwprintf(FILE *restrict stream,
 const wchar_t *restrict format, va_list args);
int vswprintf(wchar_t wcs[restrict .maxlen], size_t maxlen,
 const wchar_t *restrict format, va_list args);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE
        || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The wprintf() family of functions is the wide-character equivalent of the printf(3) family of functions. It performs formatted output of wide characters.

The wprintf() and vwprintf() functions perform wide-character output to stdout. stdout must not be byte oriented; see fwide(3) for more information.

The fwprintf() and vfwprintf() functions perform wide-character output to stream. stream must not be byte oriented; see fwide(3) for more information.

The swprintf() and vswprintf() functions perform wide-character output to an array of wide characters. The programmer must ensure that there is room for at least maxlen wide characters at wcs.

These functions are like the printf(3), vprintf(3), fprintf(3), vfprintf(3), sprintf(3), vsprintf(3) functions except for the following differences:

·
The format string is a wide-character string.

·
The output consists of wide characters, not bytes.

·
swprintf() and vswprintf() take a maxlen argument, sprintf(3) and vsprintf(3) do not. (snprintf(3) and vsnprintf(3) take a maxlen argument, but these functions do not return -1 upon buffer overflow on Linux.)

The treatment of the conversion characters c and s is different:

c
If no l modifier is present, the int argument is converted to a wide character by a call to the btowc(3) function, and the resulting wide character is written. If an l modifier is present, the wint_t (wide character) argument is written.

s
If no l modifier is present: the const char * argument is expected to be a pointer to an array of character type (pointer to a string) containing a multibyte character sequence beginning in the initial shift state. Characters from the array are converted to wide characters (each by a call to the mbrtowc(3) function with a conversion state starting in the initial state before the first byte). The resulting wide characters are written up to (but not including) the terminating null wide character (L’�’). If a precision is specified, no more wide characters than the number specified are written. Note that the precision determines the number of wide characters written, not the number of bytes or screen positions. The array must contain a terminating null byte (‘�’), unless a precision is given and it is so small that the number of converted wide characters reaches it before the end of the array is reached. If an l modifier is present: the const wchar_t * argument is expected to be a pointer to an array of wide characters. Wide characters from the array are written up to (but not including) a terminating null wide character. If a precision is specified, no more than the number specified are written. The array must contain a terminating null wide character, unless a precision is given and it is smaller than or equal to the number of wide characters in the array.

RETURN VALUE

The functions return the number of wide characters written, excluding the terminating null wide character in case of the functions swprintf() and vswprintf(). They return -1 when an error occurs.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wprintf(), fwprintf(), swprintf(), vwprintf(), vfwprintf(), vswprintf()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of wprintf() et al. depends on the LC_CTYPE category of the current locale.

If the format string contains non-ASCII wide characters, the program will work correctly only if the LC_CTYPE category of the current locale at run time is the same as the LC_CTYPE category of the current locale at compile time. This is because the wchar_t representation is platform- and locale-dependent. (The glibc represents wide characters using their Unicode (ISO/IEC 10646) code point, but other platforms don’t do this. Also, the use of C99 universal character names of the form \unnnn does not solve this problem.) Therefore, in internationalized programs, the format string should consist of ASCII wide characters only, or should be constructed at run time in an internationalized way (e.g., using gettext(3) or iconv(3), followed by mbstowcs(3)).

SEE ALSO

fprintf(3), fputwc(3), fwide(3), printf(3), snprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1822 - Linux cli command strsignal

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strsignal and provides detailed information about the command strsignal, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strsignal.

NAME 🖥️ strsignal 🖥️

return string describing signal

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strsignal(int sig);
const char *sigdescr_np(int sig);
const char *sigabbrev_np(int sig);
[[deprecated]] extern const char *const sys_siglist[];

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sigabbrev_np(), sigdescr_np():

    _GNU_SOURCE

strsignal():

    From glibc 2.10 to glibc 2.31:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

sys_siglist:

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The strsignal() function returns a string describing the signal number passed in the argument sig. The string can be used only until the next call to strsignal(). The string returned by strsignal() is localized according to the LC_MESSAGES category in the current locale.

The sigdescr_np() function returns a string describing the signal number passed in the argument sig. Unlike strsignal() this string is not influenced by the current locale.

The sigabbrev_np() function returns the abbreviated name of the signal, sig. For example, given the value SIGINT, it returns the string “INT”.

The (deprecated) array sys_siglist holds the signal description strings indexed by signal number. The strsignal() or the sigdescr_np() function should be used instead of this array; see also VERSIONS.

RETURN VALUE

The strsignal() function returns the appropriate description string, or an unknown signal message if the signal number is invalid. On some systems (but not on Linux), NULL may instead be returned for an invalid signal number.

The sigdescr_np() and sigabbrev_np() functions return the appropriate description string. The returned string is statically allocated and valid for the lifetime of the program. These functions return NULL for an invalid signal number.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strsignal()

Thread safety

MT-Unsafe race:strsignal locale

sigdescr_np(), sigabbrev_np()

Thread safetyMT-Safe

STANDARDS

strsignal()
POSIX.1-2008.

sigdescr_np()
sigabbrev_np()
GNU.

sys_siglist
None.

HISTORY

strsignal()
POSIX.1-2008. Solaris, BSD.

sigdescr_np()
sigabbrev_np()
glibc 2.32.

sys_siglist
Removed in glibc 2.32.

NOTES

sigdescr_np() and sigabbrev_np() are thread-safe and async-signal-safe.

SEE ALSO

psignal(3), strerror(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1823 - Linux cli command qecvt

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command qecvt and provides detailed information about the command qecvt, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the qecvt.

NAME 🖥️ qecvt 🖥️

convert a floating-point number to a string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
[[deprecated]] char *qecvt(long double number, int ndigits,
 int *restrict decpt, int *restrict sign);
[[deprecated]] char *qfcvt(long double number, int ndigits,
 int *restrict decpt, int *restrict sign);
[[deprecated]] char *qgcvt(long double number, int ndigit, char *buf);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

qecvt(), qfcvt(), qgcvt():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    In glibc up to and including 2.19:
        _SVID_SOURCE

DESCRIPTION

The functions qecvt(), qfcvt(), and qgcvt() are identical to ecvt(3), fcvt(3), and gcvt(3) respectively, except that they use a long double argument number. See ecvt(3) and gcvt(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

qecvt()

Thread safetyMT-Unsafe race:qecvt

qfcvt()

Thread safetyMT-Unsafe race:qfcvt

qgcvt()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

SVr4, SunOS, GNU.

These functions are obsolete. Instead, snprintf(3) is recommended.

SEE ALSO

ecvt(3), ecvt_r(3), gcvt(3), sprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1824 - Linux cli command inplaceam

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command inplaceam and provides detailed information about the command inplaceam, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the inplaceam.

NAME 🖥️ inplaceam 🖥️

emulate sed/perl/ruby in-place editing

SYNOPSIS

gawk -i inplace ...

DESCRIPTION

The inplace extension adds two functions named inplace_begin() and inplace_end(). These functions are meant to be invoked from the inplace.awk wrapper which is installed when gawk is.

By default, each named file on the command line is replaced with a new file of the same name whose contents are the results of running the AWK program. If the user supplies an AWK variable named inplace::suffix in a BEGIN rule or on the command line, then the inplace extension concatenates that suffix onto the original filename and uses the result as a filename for renaming the original.

For backwards compatibility, the variable will also check INPLACE_SUFFIX (in the awk namespace) for the suffix to use if inplace::suffix is not set.

One can disable inplace editing selectively by placing inplace::enable=0 on the command line prior to files that should be processed normally. One can reenable inplace editing by placing inplace::enable=1 prior to files that should be subject to inplace editing.

BUGS

While the extension does attempt to preserve ownership and permissions, it makes no attempt to copy the ACLs from the original file.

If the program dies prematurely, as might happen if an unhandled signal is received, a temporary file may be left behind.

EXAMPLE

gawk -i inplace 'script' files ...


gawk -i inplace -f scriptfile files ...

SEE ALSO

GAWK: Effective AWK Programming, filefuncs(3am), fnmatch(3am), fork(3am), ordchr(3am), readdir(3am), readfile(3am), revoutput(3am), rwarray(3am).

AUTHOR

Andrew Schorr, [email protected].

COPYING PERMISSIONS

Copyright © 2012, 2013, 2015, 2018, 2019, Free Software Foundation, Inc.

Permission is granted to make and distribute verbatim copies of this manual page provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to process this file through troff and print the results, provided the printed document carries copying permission notice identical to this one except for the removal of this paragraph (this paragraph not being relevant to the printed manual page).

Permission is granted to copy and distribute modified versions of this manual page under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual page into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1825 - Linux cli command sigdescr_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigdescr_np and provides detailed information about the command sigdescr_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigdescr_np.

NAME 🖥️ sigdescr_np 🖥️

return string describing signal

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strsignal(int sig);
const char *sigdescr_np(int sig);
const char *sigabbrev_np(int sig);
[[deprecated]] extern const char *const sys_siglist[];

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sigabbrev_np(), sigdescr_np():

    _GNU_SOURCE

strsignal():

    From glibc 2.10 to glibc 2.31:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

sys_siglist:

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The strsignal() function returns a string describing the signal number passed in the argument sig. The string can be used only until the next call to strsignal(). The string returned by strsignal() is localized according to the LC_MESSAGES category in the current locale.

The sigdescr_np() function returns a string describing the signal number passed in the argument sig. Unlike strsignal() this string is not influenced by the current locale.

The sigabbrev_np() function returns the abbreviated name of the signal, sig. For example, given the value SIGINT, it returns the string “INT”.

The (deprecated) array sys_siglist holds the signal description strings indexed by signal number. The strsignal() or the sigdescr_np() function should be used instead of this array; see also VERSIONS.

RETURN VALUE

The strsignal() function returns the appropriate description string, or an unknown signal message if the signal number is invalid. On some systems (but not on Linux), NULL may instead be returned for an invalid signal number.

The sigdescr_np() and sigabbrev_np() functions return the appropriate description string. The returned string is statically allocated and valid for the lifetime of the program. These functions return NULL for an invalid signal number.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strsignal()

Thread safety

MT-Unsafe race:strsignal locale

sigdescr_np(), sigabbrev_np()

Thread safetyMT-Safe

STANDARDS

strsignal()
POSIX.1-2008.

sigdescr_np()
sigabbrev_np()
GNU.

sys_siglist
None.

HISTORY

strsignal()
POSIX.1-2008. Solaris, BSD.

sigdescr_np()
sigabbrev_np()
glibc 2.32.

sys_siglist
Removed in glibc 2.32.

NOTES

sigdescr_np() and sigabbrev_np() are thread-safe and async-signal-safe.

SEE ALSO

psignal(3), strerror(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1826 - Linux cli command xdr_setpos

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_setpos and provides detailed information about the command xdr_setpos, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_setpos.

NAME 🖥️ xdr_setpos 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1827 - Linux cli command XtIsRectObj

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtIsRectObj and provides detailed information about the command XtIsRectObj, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtIsRectObj.

NAME 🖥️ XtIsRectObj 🖥️

obtain and verify a widget’s class

SYNTAX

#include <X11/Intrinsic.h>

WidgetClass XtClass(Widget w);

WidgetClass XtSuperclass(Widget w);

Boolean XtIsSubclass(Widget w, WidgetClass widget_class);

void XtCheckSubclass(Widget widget, WidgetClass widget_class, String message);

Boolean XtIsObject(Widget w);

Boolean XtIsRectObj(Widget w);

Boolean XtIsWidget(Widget w);

Boolean XtIsComposite(Widget w);

Boolean XtIsConstraint(Widget w);

Boolean XtIsShell(Widget w);

Boolean XtIsOverrideShell(Widget w);

Boolean XtIsWMShell(Widget w);

Boolean XtIsVendorShell(Widget w);

Boolean XtIsTransientShell(Widget w);

Boolean XtIsTopLevelShell(Widget w);

Boolean XtIsApplicationShell(Widget w);

Boolean XtIsSessionShell(Widget w);

ARGUMENTS

  1. Specifies the widget.

widget_class
Specifies the widget class.

message
Specifies the message that is to be used.

DESCRIPTION

The XtClass function returns a pointer to the widget’s class structure.

The XtSuperclass function returns a pointer to the widget’s superclass class structure.

The XtIsSubclass function returns True if the class of the specified widget is equal to or is a subclass of the specified class. The widget’s class can be any number of subclasses down the chain and need not be an immediate subclass of the specified class. Composite widgets that need to restrict the class of the items they contain can use XtIsSubclass to find out if a widget belongs to the desired class of objects.

The XtCheckSubclass macro determines if the class of the specified widget is equal to or is a subclass of the specified widget class. The widget can be any number of subclasses down the chain and need not be an immediate subclass of the specified widget class. If the specified widget is not a subclass, XtCheckSubclass constructs an error message from the supplied message, the widget’s actual class, and the expected class and calls XtErrorMsg. XtCheckSubclass should be used at the entry point of exported routines to ensure that the client has passed in a valid widget class for the exported operation.

XtCheckSubclass is only executed when the widget has been compiled with the compiler symbol DEBUG defined; otherwise, it is defined as the empty string and generates no code.

To test if a given widget belongs to a subclass of an Intrinsics-defined class, the Intrinsics defines macros or functions equivalent to XtIsSubclass for each of the built-in classes. These procedures are XtIsObject, XtIsRectObj, XtIsWidget, XtIsComposite, XtIsConstraint, XtIsShell, XtIsOverrideShell, XtIsWMShell, XtIsVendorShell, XtIsTransientShell, XtIsTopLevelShell, XtIsApplicationShell, and XtIsSessionShell.

The

SEE ALSO

XtAppErrorMsg(3), XtDisplay(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1828 - Linux cli command HTTP_Negotiatepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTTP_Negotiatepm and provides detailed information about the command HTTP_Negotiatepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTTP_Negotiatepm.

NAME 🖥️ HTTP_Negotiatepm 🖥️

choose a variant to serve

SYNOPSIS

use HTTP::Negotiate qw(choose); # ID QS Content-Type Encoding Char-Set Lang Size $variants = [[var1, 1.000, text/html, undef, iso-8859-1, en, 3000], [var2, 0.950, text/plain, gzip, us-ascii, no, 400], [var3, 0.3, image/gif, undef, undef, undef, 43555], ]; @preferred = choose($variants, $request_headers); $the_one = choose($variants);

DESCRIPTION

This module provides a complete implementation of the HTTP content negotiation algorithm specified in draft-ietf-http-v11-spec-00.ps chapter 12. Content negotiation allows for the selection of a preferred content representation based upon attributes of the negotiable variants and the value of the various Accept* header fields in the request.

The variants are ordered by preference by calling the function choose().

The first parameter is reference to an array of the variants to choose among. Each element in this array is an array with the values [$id, $qs, $content_type, $content_encoding, $charset, $content_language, $content_length] whose meanings are described below. The $content_encoding and $content_language can be either a single scalar value or an array reference if there are several values.

The second optional parameter is either a HTTP::Headers or a HTTP::Request object which is searched for Accept* headers. If this parameter is missing, then the accept specification is initialized from the CGI environment variables HTTP_ACCEPT, HTTP_ACCEPT_CHARSET, HTTP_ACCEPT_ENCODING and HTTP_ACCEPT_LANGUAGE.

In an array context, choose() returns a list of [variant identifier, calculated quality, size] tuples. The values are sorted by quality, highest quality first. If the calculated quality is the same for two variants, then they are sorted by size (smallest first). E.g.:

([var1, 1, 2000], [var2, 0.3, 512], [var3, 0.3, 1024]);

Note that also zero quality variants are included in the return list even if these should never be served to the client.

In a scalar context, it returns the identifier of the variant with the highest score or undef if none have non-zero quality.

If the $HTTP::Negotiate::DEBUG variable is set to TRUE, then a lot of noise is generated on STDOUT during evaluation of choose().

VARIANTS

A variant is described by a list of the following values. If the attribute does not make sense or is unknown for a variant, then use undef instead.

identifier
This is a string that you use as the name for the variant. This identifier for the preferred variants returned by choose().

qs
This is a number between 0.000 and 1.000 that describes the source quality. This is what draft-ietf-http-v11-spec-00.ps says about this value: Source quality is measured by the content provider as representing the amount of degradation from the original source. For example, a picture in JPEG form would have a lower qs when translated to the XBM format, and much lower qs when translated to an ASCII-art representation. Note, however, that this is a function of the source - an original piece of ASCII-art may degrade in quality if it is captured in JPEG form. The qs values should be assigned to each variant by the content provider; if no qs value has been assigned, the default is generally qs=1.

content-type
This is the media type of the variant. The media type does not include a charset attribute, but might contain other parameters. Examples are: text/html text/html;version=2.0 text/plain image/gif image/jpg

content-encoding
This is one or more content encodings that has been applied to the variant. The content encoding is generally used as a modifier to the content media type. The most common content encodings are: gzip compress

content-charset
This is the character set used when the variant contains text. The charset value should generally be undef or one of these: us-ascii iso-8859-1 … iso-8859-9 iso-2022-jp iso-2022-jp-2 iso-2022-kr unicode-1-1 unicode-1-1-utf-7 unicode-1-1-utf-8

content-language
This describes one or more languages that are used in the variant. Language is described like this in draft-ietf-http-v11-spec-00.ps: A language is in this context a natural language spoken, written, or otherwise conveyed by human beings for communication of information to other human beings. Computer languages are explicitly excluded. The language tags are defined by RFC 3066. Examples are: no Norwegian en International English en-US US English en-cockney

content-length
This is the number of bytes used to represent the content.

ACCEPT HEADERS

The following Accept* headers can be used for describing content preferences in a request (This description is an edited extract from draft-ietf-http-v11-spec-00.ps):

Accept
This header can be used to indicate a list of media ranges which are acceptable as a response to the request. The * character is used to group media types into ranges, with */* indicating all media types and type/* indicating all subtypes of that type. The parameter q is used to indicate the quality factor, which represents the user’s preference for that range of media types. The parameter mbx gives the maximum acceptable size of the response content. The default values are: q=1 and mbx=infinity. If no Accept header is present, then the client accepts all media types with q=1. For example: Accept: audio/*;q=0.2;mbx=200000, audio/basic would mean: I prefer audio/basic (of any size), but send me any audio type if it is the best available after an 80% mark-down in quality and its size is less than 200000 bytes

Accept-Charset
Used to indicate what character sets are acceptable for the response. The us-ascii character set is assumed to be acceptable for all user agents. If no Accept-Charset field is given, the default is that any charset is acceptable. Example: Accept-Charset: iso-8859-1, unicode-1-1

Accept-Encoding
Restricts the Content-Encoding values which are acceptable in the response. If no Accept-Encoding field is present, the server may assume that the client will accept any content encoding. An empty Accept-Encoding means that no content encoding is acceptable. Example: Accept-Encoding: compress, gzip

Accept-Language
This field is similar to Accept, but restricts the set of natural languages that are preferred in a response. Each language may be given an associated quality value which represents an estimate of the user’s comprehension of that language. For example: Accept-Language: no, en-gb;q=0.8, de;q=0.55 would mean: “I prefer Norwegian, but will accept British English (with 80% comprehension) or German (with 55% comprehension).

COPYRIGHT

Copyright 1996,2001 Gisle Aas.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Gisle Aas <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1829 - Linux cli command res_nclose

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command res_nclose and provides detailed information about the command res_nclose, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the res_nclose.

NAME 🖥️ res_nclose 🖥️

resolver routines

LIBRARY

Resolver library (libresolv, -lresolv)

SYNOPSIS

#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
struct __res_state;
typedef struct __res_state *res_state;
int res_ninit(res_state statep);
void res_nclose(res_state statep);
int res_nquery(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nsearch(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nquerydomain(res_state statep,
 const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
int res_nmkquery(res_state statep,
 int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
int res_nsend(res_state statep,
 const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);
int dn_comp(const char *exp_dn, unsigned char comp_dn[.length],
 int length, unsigned char **dnptrs,
 unsigned char **lastdnptr);
int dn_expand(const unsigned char *msg,
 const unsigned char *eomorig,
 const unsigned char *comp_dn, char exp_dn[.length],
 int length);
[[deprecated]] extern struct __res_state _res;
[[deprecated]] int res_init(void);
[[deprecated]]
int res_query(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_search(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_querydomain(const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
[[deprecated]]
int res_mkquery(int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
[[deprecated]]
int res_send(const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);

DESCRIPTION

Note: This page is incomplete (various resolver functions provided by glibc are not described) and likely out of date.

The functions described below make queries to and interpret the responses from Internet domain name servers.

The API consists of a set of more modern, reentrant functions and an older set of nonreentrant functions that have been superseded. The traditional resolver interfaces such as res_init() and res_query() use some static (global) state stored in the _res structure, rendering these functions non-thread-safe. BIND 8.2 introduced a set of new interfaces res_ninit(), res_nquery(), and so on, which take a res_state as their first argument, so you can use a per-thread resolver state.

The res_ninit() and res_init() functions read the configuration files (see resolv.conf(5)) to get the default domain name and name server address(es). If no server is given, the local host is tried. If no domain is given, that associated with the local host is used. It can be overridden with the environment variable LOCALDOMAIN. res_ninit() or res_init() is normally executed by the first call to one of the other functions. Every call to res_ninit() requires a corresponding call to res_nclose() to free memory allocated by res_ninit() and subsequent calls to res_nquery().

The res_nquery() and res_query() functions query the name server for the fully qualified domain name name of specified type and class. The reply is left in the buffer answer of length anslen supplied by the caller.

The res_nsearch() and res_search() functions make a query and waits for the response like res_nquery() and res_query(), but in addition they implement the default and search rules controlled by RES_DEFNAMES and RES_DNSRCH (see description of _res options below).

The res_nquerydomain() and res_querydomain() functions make a query using res_nquery()/res_query() on the concatenation of name and domain.

The following functions are lower-level routines used by res_nquery()/res_query().

The res_nmkquery() and res_mkquery() functions construct a query message in buf of length buflen for the domain name dname. The query type op is one of the following (typically QUERY):

QUERY
Standard query.

IQUERY
Inverse query. This option was removed in glibc 2.26, since it has not been supported by DNS servers for a very long time.

NS_NOTIFY_OP
Notify secondary of SOA (Start of Authority) change.

newrr is currently unused.

The res_nsend() and res_send() function send a preformatted query given in msg of length msglen and returns the answer in answer which is of length anslen. They will call res_ninit()/res_init() if it has not already been called.

The dn_comp() function compresses the domain name exp_dn and stores it in the buffer comp_dn of length length. The compression uses an array of pointers dnptrs to previously compressed names in the current message. The first pointer points to the beginning of the message and the list ends with NULL. The limit of the array is specified by lastdnptr. If dnptr is NULL, domain names are not compressed. If lastdnptr is NULL, the list of labels is not updated.

The dn_expand() function expands the compressed domain name comp_dn to a full domain name, which is placed in the buffer exp_dn of size length. The compressed name is contained in a query or reply message, and msg points to the beginning of the message.

The resolver routines use configuration and state information contained in a __res_state structure (either passed as the statep argument, or in the global variable _res, in the case of the older nonreentrant functions). The only field of this structure that is normally manipulated by the user is the options field. This field can contain the bitwise “OR” of the following options:

RES_INIT
True if res_ninit() or res_init() has been called.

RES_DEBUG
Print debugging messages. This option is available only if glibc was built with debugging enabled, which is not the default.

RES_AAONLY (unimplemented; deprecated in glibc 2.25)
Accept authoritative answers only. res_send() continues until it finds an authoritative answer or returns an error. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEVC
Use TCP connections for queries rather than UDP datagrams.

RES_PRIMARY (unimplemented; deprecated in glibc 2.25)
Query primary domain name server only. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_IGNTC
Ignore truncation errors. Don’t retry with TCP.

RES_RECURSE
Set the recursion desired bit in queries. Recursion is carried out by the domain name server, not by res_send(). [Enabled by default].

RES_DEFNAMES
If set, res_search() will append the default domain name to single component names—that is, those that do not contain a dot. [Enabled by default].

RES_STAYOPEN
Used with RES_USEVC to keep the TCP connection open between queries.

RES_DNSRCH
If set, res_search() will search for hostnames in the current domain and in parent domains. This option is used by gethostbyname(3). [Enabled by default].

RES_INSECURE1
Accept a response from a wrong server. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_INSECURE2
Accept a response which contains a wrong query. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_NOALIASES
Disable usage of HOSTALIASES environment variable.

RES_USE_INET6
Try an AAAA query before an A query inside the gethostbyname(3) function, and map IPv4 responses in IPv6 “tunneled form” if no AAAA records are found but an A record set exists. Since glibc 2.25, this option is deprecated, and its usage produces a warning; applications should use getaddrinfo(3), rather than gethostbyname(3).

RES_ROTATE
Causes round-robin selection of name servers from among those listed. This has the effect of spreading the query load among all listed servers, rather than having all clients try the first listed server first every time.

RES_NOCHECKNAME (unimplemented; deprecated in glibc 2.25)
Disable the modern BIND checking of incoming hostnames and mail names for invalid characters such as underscore (_), non-ASCII, or control characters. This option was present until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_KEEPTSIG (unimplemented; deprecated in glibc 2.25)
Do not strip TSIG records. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_BLAST (unimplemented; deprecated in glibc 2.25)
Send each query simultaneously and recursively to all servers. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEBSTRING (glibc 2.3.4 to glibc 2.24)
Make reverse IPv6 lookups using the bit-label format described in RFC 2673; if this option is not set (which is the default), then nibble format is used. This option was removed in glibc 2.25, since it relied on a backward-incompatible DNS extension that was never deployed on the Internet.

RES_NOIP6DOTINT (glibc 2.24 and earlier)
Use ip6.arpa zone in IPv6 reverse lookup instead of ip6.int, which is deprecated since glibc 2.3.4. This option is present up to and including glibc 2.24, where it is enabled by default. In glibc 2.25, this option was removed.

RES_USE_EDNS0 (since glibc 2.6)
Enables support for the DNS extensions (EDNS0) described in RFC 2671.

RES_SNGLKUP (since glibc 2.10)
By default, glibc performs IPv4 and IPv6 lookups in parallel since glibc 2.9. Some appliance DNS servers cannot handle these queries properly and make the requests time out. This option disables the behavior and makes glibc perform the IPv6 and IPv4 requests sequentially (at the cost of some slowdown of the resolving process).

RES_SNGLKUPREOP
When RES_SNGLKUP option is enabled, opens a new socket for the each request.

RES_USE_DNSSEC
Use DNSSEC with OK bit in OPT record. This option implies RES_USE_EDNS0.

RES_NOTLDQUERY
Do not look up unqualified name as a top-level domain (TLD).

RES_DEFAULT
Default option which implies: RES_RECURSE, RES_DEFNAMES, RES_DNSRCH, and RES_NOIP6DOTINT.

RETURN VALUE

The res_ninit() and res_init() functions return 0 on success, or -1 if an error occurs.

The res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), res_querydomain(), res_nmkquery(), res_mkquery(), res_nsend(), and res_send() functions return the length of the response, or -1 if an error occurs.

The dn_comp() and dn_expand() functions return the length of the compressed name, or -1 if an error occurs.

In the case of an error return from res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), or res_querydomain(), the global variable h_errno (see gethostbyname(3)) can be consulted to determine the cause of the error.

FILES

/etc/resolv.conf
resolver configuration file

/etc/host.conf
resolver configuration file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

res_ninit(), res_nclose(), res_nquery(), res_nsearch(), res_nquerydomain(), res_nsend()

Thread safetyMT-Safe locale

res_nmkquery(), dn_comp(), dn_expand()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

4.3BSD.

SEE ALSO

gethostbyname(3), resolv.conf(5), resolver(5), hostname(7), named(8)

The GNU C library source file resolv/README.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1830 - Linux cli command Moose_Manual_Unsweetenedpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Manual_Unsweetenedpm and provides detailed information about the command Moose_Manual_Unsweetenedpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Manual_Unsweetenedpm.

NAME 🖥️ Moose_Manual_Unsweetenedpm 🖥️

Moose idioms in plain old Perl 5 without the sugar

VERSION

version 2.2207

DESCRIPTION

If you’re trying to figure out just what the heck Moose does, and how it saves you time, you might find it helpful to see what Moose is really doing for you. This document shows you the translation from Moose sugar back to plain old Perl 5.

CLASSES AND ATTRIBUTES

First, we define two very small classes the Moose way.

package Person; use DateTime; use DateTime::Format::Natural; use Moose; use Moose::Util::TypeConstraints; has name => ( is => rw, isa => Str, required => 1, ); # Moose doesnt know about non-Moose-based classes. class_type DateTime; my $en_parser = DateTime::Format::Natural->new( lang => en, time_zone => UTC, ); coerce DateTime => from Str => via { $en_parser->parse_datetime($_) }; has birth_date => ( is => rw, isa => DateTime, coerce => 1, handles => { birth_year => year }, ); enum ShirtSize => [qw( s m l xl xxl )]; has shirt_size => ( is => rw, isa => ShirtSize, default => l, );

This is a fairly simple class with three attributes. We also define an enum type to validate t-shirt sizes because we don’t want to end up with something like “blue” for the shirt size!

package User; use Email::Valid; use Moose; use Moose::Util::TypeConstraints; extends Person; subtype Email => as Str => where { Email::Valid->address($_) } => message { “$_ is not a valid email address” }; has email_address => ( is => rw, isa => Email, required => 1, );

This class subclasses Person to add a single attribute, email address.

Now we will show what these classes would look like in plain old Perl 5. For the sake of argument, we won’t use any base classes or any helpers like Class::Accessor.

package Person; use strict; use warnings; use Carp qw( confess ); use DateTime; use DateTime::Format::Natural; sub new { my $class = shift; my %p = ref $_[0] ? %{ $_[0] } : @_; exists $p{name} or confess name is a required attribute; $class->_validate_name( $p{name} ); exists $p{birth_date} or confess birth_date is a required attribute; $p{birth_date} = $class->_coerce_birth_date( $p{birth_date} ); $class->_validate_birth_date( $p{birth_date} ); $p{shirt_size} = l unless exists $p{shirt_size}; $class->_validate_shirt_size( $p{shirt_size} ); return bless \p, $class; } sub _validate_name { shift; my $name = shift; local $Carp::CarpLevel = $Carp::CarpLevel + 1; defined $name or confess name must be a string; } { my $en_parser = DateTime::Format::Natural->new( lang => en, time_zone => UTC, ); sub _coerce_birth_date { shift; my $date = shift; return $date unless defined $date && ! ref $date; my $dt = $en_parser->parse_datetime($date); return $dt ? $dt : undef; } } sub _validate_birth_date { shift; my $birth_date = shift; local $Carp::CarpLevel = $Carp::CarpLevel + 1; $birth_date->isa(DateTime) or confess birth_date must be a DateTime object; } sub _validate_shirt_size { shift; my $shirt_size = shift; local $Carp::CarpLevel = $Carp::CarpLevel + 1; defined $shirt_size or confess shirt_size cannot be undef; my %sizes = map { $_ => 1 } qw( s m l xl xxl ); $sizes{$shirt_size} or confess “$shirt_size is not a valid shirt size (s, m, l, xl, xxl)”; } sub name { my $self = shift; if (@_) { $self->_validate_name( $_[0] ); $self->{name} = $_[0]; } return $self->{name}; } sub birth_date { my $self = shift; if (@_) { my $date = $self->_coerce_birth_date( $_[0] ); $self->_validate_birth_date( $date ); $self->{birth_date} = $date; } return $self->{birth_date}; } sub birth_year { my $self = shift; return $self->birth_date->year; } sub shirt_size { my $self = shift; if (@_) { $self->_validate_shirt_size( $_[0] ); $self->{shirt_size} = $_[0]; } return $self->{shirt_size}; }

Wow, that was a mouthful! One thing to note is just how much space the data validation code consumes. As a result, it’s pretty common for Perl 5 programmers to just not bother. Unfortunately, not validating arguments leads to surprises down the line (“why is birth_date an email address?”).

Also, did you spot the (intentional) bug?

It’s in the _validate_birth_date() method. We should check that the value in $birth_date is actually defined and an object before we go and call isa() on it! Leaving out those checks means our data validation code could actually cause our program to die. Oops.

Note that if we add a superclass to Person we’ll have to change the constructor to account for that.

(As an aside, getting all the little details of what Moose does for you just right in this example was really not easy, which emphasizes the point of the example. Moose saves you a lot of work!)

Now let’s see User:

package User; use strict; use warnings; use Carp qw( confess ); use Email::Valid; use Scalar::Util qw( blessed ); use parent Person; sub new { my $class = shift; my %p = ref $_[0] ? %{ $_[0] } : @_; exists $p{email_address} or confess email_address is a required attribute; $class->_validate_email_address( $p{email_address} ); my $self = $class->SUPER::new(%p); $self->{email_address} = $p{email_address}; return $self; } sub _validate_email_address { shift; my $email_address = shift; local $Carp::CarpLevel = $Carp::CarpLevel + 1; defined $email_address or confess email_address must be a string; Email::Valid->address($email_address) or confess “$email_address is not a valid email address”; } sub email_address { my $self = shift; if (@_) { $self->_validate_email_address( $_[0] ); $self->{email_address} = $_[0]; } return $self->{email_address}; }

That one was shorter, but it only has one attribute.

Between the two classes, we have a whole lot of code that doesn’t do much. We could probably simplify this by defining some sort of “attribute and validation” hash, like this:

package Person; my %Attr = ( name => { required => 1, validate => sub { defined $_ }, }, birth_date => { required => 1, validate => sub { blessed $_ && $_->isa(DateTime) }, }, shirt_size => { required => 1, validate => sub { defined $_ && $_ =~ /^(?:s|m|l|xl|xxl)$/i }, } );

Then we could define a base class that would accept such a definition and do the right thing. Keep that sort of thing up and we’re well on our way to writing a half-assed version of Moose!

Of course, there are CPAN modules that do some of what Moose does, like Class::Accessor, Class::Meta, and so on. But none of them put together all of Moose’s features along with a layer of declarative sugar, nor are these other modules designed for extensibility in the same way as Moose. With Moose, it’s easy to write a MooseX module to replace or extend a piece of built-in functionality.

Moose is a complete OO package in and of itself, and is part of a rich ecosystem of extensions. It also has an enthusiastic community of users and is being actively maintained and developed.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1831 - Linux cli command opterr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command opterr and provides detailed information about the command opterr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the opterr.

NAME 🖥️ opterr 🖥️

Parse command-line options

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
int getopt(int argc, char *argv[],
 const char *optstring);
extern char *optarg;
extern int optind, opterr, optopt;
#include <getopt.h>
int getopt_long(int argc, char *argv[],
 const char *optstring,
 const struct option *longopts, int *longindex);
int getopt_long_only(int argc, char *argv[],
 const char *optstring,
 const struct option *longopts, int *longindex);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getopt():

    _POSIX_C_SOURCE >= 2 || _XOPEN_SOURCE

getopt_long(), getopt_long_only():

    _GNU_SOURCE

DESCRIPTION

The getopt() function parses the command-line arguments. Its arguments argc and argv are the argument count and array as passed to the main() function on program invocation. An element of argv that starts with ‘-’ (and is not exactly “-” or “–”) is an option element. The characters of this element (aside from the initial ‘-’) are option characters. If getopt() is called repeatedly, it returns successively each of the option characters from each of the option elements.

The variable optind is the index of the next element to be processed in argv. The system initializes this value to 1. The caller can reset it to 1 to restart scanning of the same argv, or when scanning a new argument vector.

If getopt() finds another option character, it returns that character, updating the external variable optind and a static variable nextchar so that the next call to getopt() can resume the scan with the following option character or argv-element.

If there are no more option characters, getopt() returns -1. Then optind is the index in argv of the first argv-element that is not an option.

optstring is a string containing the legitimate option characters. A legitimate option character is any visible one byte ascii(7) character (for which isgraph(3) would return nonzero) that is not ‘-’, ‘:’, or ‘;’. If such a character is followed by a colon, the option requires an argument, so getopt() places a pointer to the following text in the same argv-element, or the text of the following argv-element, in optarg. Two colons mean an option takes an optional arg; if there is text in the current argv-element (i.e., in the same word as the option name itself, for example, “-oarg”), then it is returned in optarg, otherwise optarg is set to zero. This is a GNU extension. If optstring contains W followed by a semicolon, then -W foo is treated as the long option –foo. (The -W option is reserved by POSIX.2 for implementation extensions.) This behavior is a GNU extension, not available with libraries before glibc 2.

By default, getopt() permutes the contents of argv as it scans, so that eventually all the nonoptions are at the end. Two other scanning modes are also implemented. If the first character of optstring is ‘+’ or the environment variable POSIXLY_CORRECT is set, then option processing stops as soon as a nonoption argument is encountered. If ‘+’ is not the first character of optstring, it is treated as a normal option. If POSIXLY_CORRECT behaviour is required in this case optstring will contain two ‘+’ symbols. If the first character of optstring is ‘-’, then each nonoption argv-element is handled as if it were the argument of an option with character code 1. (This is used by programs that were written to expect options and other argv-elements in any order and that care about the ordering of the two.) The special argument “–” forces an end of option-scanning regardless of the scanning mode.

While processing the option list, getopt() can detect two kinds of errors: (1) an option character that was not specified in optstring and (2) a missing option argument (i.e., an option at the end of the command line without an expected argument). Such errors are handled and reported as follows:

  • By default, getopt() prints an error message on standard error, places the erroneous option character in optopt, and returns ‘?’ as the function result.

  • If the caller has set the global variable opterr to zero, then getopt() does not print an error message. The caller can determine that there was an error by testing whether the function return value is ‘?’. (By default, opterr has a nonzero value.)

  • If the first character (following any optional ‘+’ or ‘-’ described above) of optstring is a colon (’:’), then getopt() likewise does not print an error message. In addition, it returns ‘:’ instead of ‘?’ to indicate a missing option argument. This allows the caller to distinguish the two different types of errors.

getopt_long() and getopt_long_only()

The getopt_long() function works like getopt() except that it also accepts long options, started with two dashes. (If the program accepts only long options, then optstring should be specified as an empty string (""), not NULL.) Long option names may be abbreviated if the abbreviation is unique or is an exact match for some defined option. A long option may take a parameter, of the form –arg=param or –arg param.

longopts is a pointer to the first element of an array of struct option declared in <getopt.h> as

struct option {
    const char *name;
    int         has_arg;
    int        *flag;
    int         val;
};

The meanings of the different fields are:

name
is the name of the long option.

has_arg
is: no_argument (or 0) if the option does not take an argument; required_argument (or 1) if the option requires an argument; or optional_argument (or 2) if the option takes an optional argument.

flag
specifies how results are returned for a long option. If flag is NULL, then getopt_long() returns val. (For example, the calling program may set val to the equivalent short option character.) Otherwise, getopt_long() returns 0, and flag points to a variable which is set to val if the option is found, but left unchanged if the option is not found.

val
is the value to return, or to load into the variable pointed to by flag.

The last element of the array has to be filled with zeros.

If longindex is not NULL, it points to a variable which is set to the index of the long option relative to longopts.

getopt_long_only() is like getopt_long(), but ‘-’ as well as “–” can indicate a long option. If an option that starts with ‘-’ (not “–”) doesn’t match a long option, but does match a short option, it is parsed as a short option instead.

RETURN VALUE

If an option was successfully found, then getopt() returns the option character. If all command-line options have been parsed, then getopt() returns -1. If getopt() encounters an option character that was not in optstring, then ‘?’ is returned. If getopt() encounters an option with a missing argument, then the return value depends on the first character in optstring: if it is ‘:’, then ‘:’ is returned; otherwise ‘?’ is returned.

getopt_long() and getopt_long_only() also return the option character when a short option is recognized. For a long option, they return val if flag is NULL, and 0 otherwise. Error and -1 returns are the same as for getopt(), plus ‘?’ for an ambiguous match or an extraneous parameter.

ENVIRONMENT

POSIXLY_CORRECT
If this is set, then option processing stops as soon as a nonoption argument is encountered.

_<PID>_GNU_nonoption_argv_flags_
This variable was used by bash(1) 2.0 to communicate to glibc which arguments are the results of wildcard expansion and so should not be considered as options. This behavior was removed in bash(1) 2.01, but the support remains in glibc.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getopt(), getopt_long(), getopt_long_only()

Thread safety

MT-Unsafe race:getopt env

VERSIONS

POSIX specifies that the argv array argument should be const, but these functions permute its elements unless the environment variable POSIXLY_CORRECT is set. const is used in the actual prototype to be compatible with other systems; however, this page doesn’t show the qualifier, to avoid confusing readers.

STANDARDS

getopt()
POSIX.1-2008.

getopt_long()
getopt_long_only()
GNU.

The use of ‘+’ and ‘-’ in optstring is a GNU extension.

HISTORY

getopt()
POSIX.1-2001, and POSIX.2.

On some older implementations, getopt() was declared in <stdio.h>. SUSv1 permitted the declaration to appear in either <unistd.h> or <stdio.h>. POSIX.1-1996 marked the use of <stdio.h> for this purpose as LEGACY. POSIX.1-2001 does not require the declaration to appear in <stdio.h>.

NOTES

A program that scans multiple argument vectors, or rescans the same vector more than once, and wants to make use of GNU extensions such as ‘+’ and ‘-’ at the start of optstring, or changes the value of POSIXLY_CORRECT between scans, must reinitialize getopt() by resetting optind to 0, rather than the traditional value of 1. (Resetting to 0 forces the invocation of an internal initialization routine that rechecks POSIXLY_CORRECT and checks for GNU extensions in optstring.)

Command-line arguments are parsed in strict order meaning that an option requiring an argument will consume the next argument, regardless of whether that argument is the correctly specified option argument or simply the next option (in the scenario the user mis-specifies the command line). For example, if optstring is specified as “1n:” and the user specifies the command line arguments incorrectly as prog -n -1, the -n option will be given the optarg value “-1”, and the -1 option will be considered to have not been specified.

EXAMPLES

getopt()

The following trivial example program uses getopt() to handle two program options: -n, with no associated value; and -t val, which expects an associated value.

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int
main(int argc, char *argv[])
{
    int flags, opt;
    int nsecs, tfnd;
    nsecs = 0;
    tfnd = 0;
    flags = 0;
    while ((opt = getopt(argc, argv, "nt:")) != -1) {
        switch (opt) {
        case 'n':
            flags = 1;
            break;
        case 't':
            nsecs = atoi(optarg);
            tfnd = 1;
            break;
        default: /* '?' */
            fprintf(stderr, "Usage: %s [-t nsecs] [-n] name

“, argv[0]); exit(EXIT_FAILURE); } } printf(“flags=%d; tfnd=%d; nsecs=%d; optind=%d “, flags, tfnd, nsecs, optind); if (optind >= argc) { fprintf(stderr, “Expected argument after options “); exit(EXIT_FAILURE); } printf(“name argument = %s “, argv[optind]); /* Other code omitted */ exit(EXIT_SUCCESS); }

getopt_long()

The following example program illustrates the use of getopt_long() with most of its features.

#include <getopt.h>
#include <stdio.h>     /* for printf */
#include <stdlib.h>    /* for exit */
int
main(int argc, char *argv[])
{
    int c;
    int digit_optind = 0;
    while (1) {
        int this_option_optind = optind ? optind : 1;
        int option_index = 0;
        static struct option long_options[] = {
            {"add",     required_argument, 0,  0 },
            {"append",  no_argument,       0,  0 },
            {"delete",  required_argument, 0,  0 },
            {"verbose", no_argument,       0,  0 },
            {"create",  required_argument, 0, 'c'},
            {"file",    required_argument, 0,  0 },
            {0,         0,                 0,  0 }
        };
        c = getopt_long(argc, argv, "abc:d:012",
                        long_options, &option_index);
        if (c == -1)
            break;
        switch (c) {
        case 0:
            printf("option %s", long_options[option_index].name);
            if (optarg)
                printf(" with arg %s", optarg);
            printf("

“); break; case ‘0’: case ‘1’: case ‘2’: if (digit_optind != 0 && digit_optind != this_option_optind) printf(“digits occur in two different argv-elements. “); digit_optind = this_option_optind; printf(“option %c “, c); break; case ‘a’: printf(“option a “); break; case ‘b’: printf(“option b “); break; case ‘c’: printf(“option c with value ‘%s’ “, optarg); break; case ’d’: printf(“option d with value ‘%s’ “, optarg); break; case ‘?’: break; default: printf(”?? getopt returned character code 0%o ?? “, c); } } if (optind < argc) { printf(“non-option ARGV-elements: “); while (optind < argc) printf("%s “, argv[optind++]); printf(” “); } exit(EXIT_SUCCESS); }

SEE ALSO

getopt(1), getsubopt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1832 - Linux cli command XtGrabPointer

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGrabPointer and provides detailed information about the command XtGrabPointer, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGrabPointer.

NAME 🖥️ XtGrabPointer 🖥️

manage grabs

SYNTAX

#include <X11/Intrinsic.h>

void XtGrabKey(Widget widget, KeyCode keycode, Modifiers modifiers, Boolean owner_events, int pointer_mode, int keyboard_mode);

void XtUngrabKey(Widget widget, KeyCode keycode, Modifiers modifiers);

int XtGrabKeyboard(Widget widget, Boolean owner_events, int pointer_mode, int keyboard_mode, Time time);

void XtUngrabKeyboard(Widget widget, Time time);

void XtGrabButton(Widget widget, int button, Modifiers modifiers, Boolean owner_events, unsigned int event_mask, int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor);

void XtUngrabButton(Widget widget, unsigned button, Modifiers modifiers);

int XtGrabPointer(Widget widget, Boolean owner_events, unsigned int event_mask, int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor, Time time);

void XtUngrabPointer(Widget widget, Time time);

ARGUMENTS

widget
Specifies the widget in whose window the grab will occur. Must be of class Core or a subclass thereof.

keycode

modifiers

owner_events

pointer_mode

keyboard_mode

time

button

confine_to

cursor
Specifies arguments to the associated Xlib function call.

DESCRIPTION

XtGrabKey calls XGrabKey specifying the widget’s window as the grab window if the widget is realized. The remaining arguments are exactly as for XGrabKey. If the widget is not realized, or is later unrealized, the call to XGrabKey will be performed (again) when the widget is realized and its window becomes mapped. In the future, if XtDispatchEvent is called with a KeyPress event matching the specified keycode and modifiers (which may be AnyKey or AnyModifier, respectively) for the widget’s window, the Intrinsics will call XtUngrabKeyboard with the timestamp from the KeyPress event if either of the following conditions is true:

  • There is a modal cascade and the widget is not in the active subset of the cascade and the keyboard was not previously grabbed, or

  • XFilterEvent returns True.

XtUngrabKey calls XUngrabKey specifying the widget’s window as the ungrab window if the widget is realized. The remaining arguments are exactly as for XUngrabKey. If the widget is not realized, XtUngrabKey removes a deferred XtGrabKey request, if any, for the specified widget, keycode, and modifiers.

If the specified widget is realized XtGrabKeyboard calls XGrabKeyboard specifying the widget’s window as the grab window. The remaining arguments and return value are exactly as for XGrabKeyboard. If the widget is not realized, XtGrabKeyboard immediately returns GrabNotViewable. No future ungrab is implied by XtGrabKeyboard.

XtUngrabKeyboard calls XUngrabKeyboard with the specified time.

XtGrabButton calls XGrabButton specifying the widget’s window as the grab window if the widget is realized. The remaining arguments are exactly as for XGrabButton. If the widget is not realized, or is later unrealized, the call to XGrabButton will be performed (again) when the widget is realized and its window becomes mapped. In the future, if XtDispatchEvent is called with a ButtonPress event matching the specified button and modifiers (which may be AnyButton or AnyModifier, respectively) for the widget’s window, the Intrinsics will call XtUngrabPointer with the timestamp from the ButtonPress event if either of the following conditions is true:

  • There is a modal cascade and the widget is not in the active subset of the cascade and the pointer was not previously grabbed, or

  • XFilterEvent returns True.

XtUngrabButton calls XUngrabButton specifying the widget’s window as the ungrab window if the widget is realized. The remaining arguments are exactly as for XUngrabButton. If the widget is not realized, XtUngrabButton removes a deferred XtGrabButton request, if any, for the specified widget, button, and modifiers.

XtGrabPointer calls XGrabPointer specifying the widget’s window as the grab window. The remaining arguments and return value are exactly as for XGrabPointer. If the widget is not realized, XtGrabPointer immediately returns GrabNotViewable. No future ungrab is implied by XtGrabPointer.

XtUngrabPointer calls XUngrabPointer with the specified time.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1833 - Linux cli command strrchr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strrchr and provides detailed information about the command strrchr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strrchr.

NAME 🖥️ strrchr 🖥️

locate character in string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strchr(const char *s, int c);
char *strrchr(const char *s, int c);
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <string.h>
char *strchrnul(const char *s, int c);

DESCRIPTION

The strchr() function returns a pointer to the first occurrence of the character c in the string s.

The strrchr() function returns a pointer to the last occurrence of the character c in the string s.

The strchrnul() function is like strchr() except that if c is not found in s, then it returns a pointer to the null byte at the end of s, rather than NULL.

Here “character” means “byte”; these functions do not work with wide or multibyte characters.

RETURN VALUE

The strchr() and strrchr() functions return a pointer to the matched character or NULL if the character is not found. The terminating null byte is considered part of the string, so that if c is specified as ‘�’, these functions return a pointer to the terminator.

The strchrnul() function returns a pointer to the matched character, or a pointer to the null byte at the end of s (i.e., s+strlen(s)) if the character is not found.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strchr(), strrchr(), strchrnul()

Thread safetyMT-Safe

STANDARDS

strchr()
strrchr()
C11, POSIX.1-2008.

strchrnul()
GNU.

HISTORY

strchr()
strrchr()
POSIX.1-2001, C89, SVr4, 4.3BSD.

strchrnul()
glibc 2.1.1, FreeBSD 10, NetBSD 8.

SEE ALSO

memchr(3), string(3), strlen(3), strpbrk(3), strsep(3), strspn(3), strstr(3), strtok(3), wcschr(3), wcsrchr(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1834 - Linux cli command isfdtype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isfdtype and provides detailed information about the command isfdtype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isfdtype.

NAME 🖥️ isfdtype 🖥️

test file type of a file descriptor

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/stat.h>
#include <sys/socket.h>
int isfdtype(int fd, int fdtype);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isfdtype():

    Since glibc 2.20:
        _DEFAULT_SOURCE
    Before glibc 2.20:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The isfdtype() function tests whether the file descriptor fd refers to a file of type fdtype. The fdtype argument specifies one of the S_IF* constants defined in <sys/stat.h> and documented in stat(2) (e.g., S_IFREG).

RETURN VALUE

The isfdtype() function returns 1 if the file descriptor fd is of type fdtype and 0 if it is not. On failure, -1 is returned and errno is set to indicate the error.

ERRORS

The isfdtype() function can fail with any of the same errors as fstat(2).

VERSIONS

Portable applications should use fstat(2) instead.

STANDARDS

None.

HISTORY

It appeared in the draft POSIX.1g standard. It is present on OpenBSD and Tru64 UNIX (where the required header file in both cases is just <sys/stat.h>, as shown in the POSIX.1g draft).

SEE ALSO

fstat(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1835 - Linux cli command localtime

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command localtime and provides detailed information about the command localtime, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the localtime.

NAME 🖥️ localtime 🖥️

transform date and time to broken-down time or ASCII

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <time.h>
char *asctime(const struct tm *tm);
char *asctime_r(const struct tm *restrict tm,
 char buf[restrict 26]);
char *ctime(const time_t *timep);
char *ctime_r(const time_t *restrict timep,
 char buf[restrict 26]);
struct tm *gmtime(const time_t *timep);
struct tm *gmtime_r(const time_t *restrict timep,
 struct tm *restrict result);
struct tm *localtime(const time_t *timep);
struct tm *localtime_r(const time_t *restrict timep,
 struct tm *restrict result);
time_t mktime(struct tm *tm);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

asctime_r(), ctime_r(), gmtime_r(), localtime_r():

    _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The ctime(), gmtime(), and localtime() functions all take an argument of data type time_t, which represents calendar time. When interpreted as an absolute time value, it represents the number of seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).

The asctime() and mktime() functions both take an argument representing broken-down time, which is a representation separated into year, month, day, and so on.

Broken-down time is stored in the structure tm, described in tm(3type).

The call ctime(t) is equivalent to asctime(localtime(t)). It converts the calendar time t into a null-terminated string of the form

"Wed Jun 30 21:49:08 1993

"

The abbreviations for the days of the week are “Sun”, “Mon”, “Tue”, “Wed”, “Thu”, “Fri”, and “Sat”. The abbreviations for the months are “Jan”, “Feb”, “Mar”, “Apr”, “May”, “Jun”, “Jul”, “Aug”, “Sep”, “Oct”, “Nov”, and “Dec”. The return value points to a statically allocated string which might be overwritten by subsequent calls to any of the date and time functions. The function also sets the external variables tzname, timezone, and daylight (see tzset(3)) with information about the current timezone. The reentrant version ctime_r() does the same, but stores the string in a user-supplied buffer which should have room for at least 26 bytes. It need not set tzname, timezone, and daylight.

The gmtime() function converts the calendar time timep to broken-down time representation, expressed in Coordinated Universal Time (UTC). It may return NULL when the year does not fit into an integer. The return value points to a statically allocated struct which might be overwritten by subsequent calls to any of the date and time functions. The gmtime_r() function does the same, but stores the data in a user-supplied struct.

The localtime() function converts the calendar time timep to broken-down time representation, expressed relative to the user’s specified timezone. The function acts as if it called tzset(3) and sets the external variables tzname with information about the current timezone, timezone with the difference between Coordinated Universal Time (UTC) and local standard time in seconds, and daylight to a nonzero value if daylight savings time rules apply during some part of the year. The return value points to a statically allocated struct which might be overwritten by subsequent calls to any of the date and time functions. The localtime_r() function does the same, but stores the data in a user-supplied struct. It need not set tzname, timezone, and daylight.

The asctime() function converts the broken-down time value tm into a null-terminated string with the same format as ctime(). The return value points to a statically allocated string which might be overwritten by subsequent calls to any of the date and time functions. The asctime_r() function does the same, but stores the string in a user-supplied buffer which should have room for at least 26 bytes.

The mktime() function converts a broken-down time structure, expressed as local time, to calendar time representation. The function ignores the values supplied by the caller in the tm_wday and tm_yday fields. The value specified in the tm_isdst field informs mktime() whether or not daylight saving time (DST) is in effect for the time supplied in the tm structure: a positive value means DST is in effect; zero means that DST is not in effect; and a negative value means that mktime() should (use timezone information and system databases to) attempt to determine whether DST is in effect at the specified time.

The mktime() function modifies the fields of the tm structure as follows: tm_wday and tm_yday are set to values determined from the contents of the other fields; if structure members are outside their valid interval, they will be normalized (so that, for example, 40 October is changed into 9 November); tm_isdst is set (regardless of its initial value) to a positive value or to 0, respectively, to indicate whether DST is or is not in effect at the specified time. Calling mktime() also sets the external variable tzname with information about the current timezone.

If the specified broken-down time cannot be represented as calendar time (seconds since the Epoch), mktime() returns (time_t) -1 and does not alter the members of the broken-down time structure.

RETURN VALUE

On success, gmtime() and localtime() return a pointer to a struct tm.

On success, gmtime_r() and localtime_r() return the address of the structure pointed to by result.

On success, asctime() and ctime() return a pointer to a string.

On success, asctime_r() and ctime_r() return a pointer to the string pointed to by buf.

On success, mktime() returns the calendar time (seconds since the Epoch), expressed as a value of type time_t.

On error, mktime() returns the value (time_t) -1. The remaining functions return NULL on error. On error, errno is set to indicate the error.

ERRORS

EOVERFLOW
The result cannot be represented.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

asctime()

Thread safety

MT-Unsafe race:asctime locale

asctime_r()

Thread safety

MT-Safe locale

ctime()

Thread safety

MT-Unsafe race:tmbuf race:asctime env locale

ctime_r(), gmtime_r(), localtime_r(), mktime()

Thread safety

MT-Safe env locale

gmtime(), localtime()

Thread safety

MT-Unsafe race:tmbuf env locale

VERSIONS

POSIX doesn’t specify the parameters of ctime_r() to be restrict; that is specific to glibc.

In many implementations, including glibc, a 0 in tm_mday is interpreted as meaning the last day of the preceding month.

According to POSIX.1-2001, localtime() is required to behave as though tzset(3) was called, while localtime_r() does not have this requirement. For portable code, tzset(3) should be called before localtime_r().

STANDARDS

asctime()
ctime()
gmtime()
localtime()
mktime()
C11, POSIX.1-2008.

asctime_r()
ctime_r()
gmtime_r()
localtime_r()
POSIX.1-2008.

HISTORY

gmtime()
localtime()
mktime()
C89, POSIX.1-2001.

asctime()
ctime()
C89, POSIX.1-2001. Marked obsolete in POSIX.1-2008 (recommending strftime(3)).

gmtime_r()
localtime_r()
POSIX.1-2001.

asctime_r()
ctime_r()
POSIX.1-2001. Marked obsolete in POSIX.1-2008 (recommending strftime(3)).

NOTES

The four functions asctime(), ctime(), gmtime(), and localtime() return a pointer to static data and hence are not thread-safe. The thread-safe versions, asctime_r(), ctime_r(), gmtime_r(), and localtime_r(), are specified by SUSv2.

POSIX.1-2001 says: “The asctime(), ctime(), gmtime(), and localtime() functions shall return values in one of two static objects: a broken-down time structure and an array of type char. Execution of any of the functions may overwrite the information returned in either of these objects by any of the other functions.” This can occur in the glibc implementation.

SEE ALSO

date(1), gettimeofday(2), time(2), utime(2), clock(3), difftime(3), strftime(3), strptime(3), timegm(3), tzset(3), time(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1836 - Linux cli command Spreadsheet_ParseExcel_Worksheetpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_ParseExcel_Worksheetpm and provides detailed information about the command Spreadsheet_ParseExcel_Worksheetpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_ParseExcel_Worksheetpm.

get_tab_color()

Return color index of tab, or undef if not set.

is_sheet_hidden()

Return true if sheet is hidden

is_row_hidden($row)

In scalar context, return true if $row is hidden In array context, return an array whose elements are true if the corresponding row is hidden.

is_col_hidden($col)

In scalar context, return true if $col is hidden In array context, return an array whose elements are true if the corresponding column is hidden.

NAME 🖥️ Spreadsheet_ParseExcel_Worksheetpm 🖥️

A class for Worksheets.

SYNOPSIS

See the documentation for Spreadsheet::ParseExcel.

DESCRIPTION

This module is used in conjunction with Spreadsheet::ParseExcel. See the documentation for Spreadsheet::ParseExcel.

Methods

The Spreadsheet::ParseExcel::Worksheet class encapsulates the properties of an Excel worksheet. It has the following methods:

$worksheet->get_cell() $worksheet->row_range() $worksheet->col_range() $worksheet->get_name() $worksheet->get_h_pagebreaks() $worksheet->get_v_pagebreaks() $worksheet->get_merged_areas() $worksheet->get_row_heights() $worksheet->get_col_widths() $worksheet->get_default_row_height() $worksheet->get_default_col_width() $worksheet->get_header() $worksheet->get_footer() $worksheet->get_margin_left() $worksheet->get_margin_right() $worksheet->get_margin_top() $worksheet->get_margin_bottom() $worksheet->get_margin_header() $worksheet->get_margin_footer() $worksheet->get_paper() $worksheet->get_start_page() $worksheet->get_print_order() $worksheet->get_print_scale() $worksheet->get_fit_to_pages() $worksheet->is_portrait() $worksheet->is_centered_horizontally() $worksheet->is_centered_vertically() $worksheet->is_print_gridlines() $worksheet->is_print_row_col_headers() $worksheet->is_print_black_and_white() $worksheet->is_print_draft() $worksheet->is_print_comments()

get_cell($row, $col)

Return the Cell object at row $row and column $col if it is defined. Otherwise returns undef.

my $cell = $worksheet->get_cell($row, $col);

row_range()

Returns a two-element list ($min, $max) containing the minimum and maximum defined rows in the worksheet. If there is no row defined $max is smaller than $min.

my ( $row_min, $row_max ) = $worksheet->row_range();

col_range()

Returns a two-element list ($min, $max) containing the minimum and maximum of defined columns in the worksheet. If there is no column defined $max is smaller than $min.

my ( $col_min, $col_max ) = $worksheet->col_range();

get_name()

The get_name() method returns the name of the worksheet.

my $name = $worksheet->get_name();

get_h_pagebreaks()

The get_h_pagebreaks() method returns an array ref of row numbers where a horizontal page break occurs.

my $h_pagebreaks = $worksheet->get_h_pagebreaks();

Returns undef if there are no pagebreaks.

get_v_pagebreaks()

The get_v_pagebreaks() method returns an array ref of column numbers where a vertical page break occurs.

my $v_pagebreaks = $worksheet->get_v_pagebreaks();

Returns undef if there are no pagebreaks.

get_merged_areas()

The get_merged_areas() method returns an array ref of cells that are merged.

my $merged_areas = $worksheet->get_merged_areas();

Each merged area is represented as follows:

[ $start_row, $start_col, $end_row, $end_col]

Returns undef if there are no merged areas.

get_row_heights()

The get_row_heights() method returns an array_ref of row heights in scalar context, and an array in list context.

my $row_heights = $worksheet->get_row_heights();

Returns undef if the property isn’t set.

get_col_widths()

The get_col_widths() method returns an array_ref of column widths in scalar context, and an array in list context.

my $col_widths = $worksheet->get_col_widths();

Returns undef if the property isn’t set.

get_default_row_height()

The get_default_row_height() method returns the default row height for the worksheet. Generally 12.75.

my $default_row_height = $worksheet->get_default_row_height();

get_default_col_width()

The get_default_col_width() method returns the default column width for the worksheet. Generally 8.43.

my $default_col_width = $worksheet->get_default_col_width();

get_header()

The get_header() method returns the worksheet header string. This string can contain control codes for alignment and font properties. Refer to the Excel on-line help on headers and footers or to the Spreadsheet::WriteExcel documentation for set_header().

my $header = $worksheet->get_header();

Returns undef if the property isn’t set.

The get_footer() method returns the worksheet footer string. This string can contain control codes for alignment and font properties. Refer to the Excel on-line help on headers and footers or to the Spreadsheet::WriteExcel documentation for set_header().

my $footer = $worksheet->get_footer();

Returns undef if the property isn’t set.

get_margin_left()

The get_margin_left() method returns the left margin of the worksheet in inches.

my $margin_left = $worksheet->get_margin_left();

Returns undef if the property isn’t set.

get_margin_right()

The get_margin_right() method returns the right margin of the worksheet in inches.

my $margin_right = $worksheet->get_margin_right();

Returns undef if the property isn’t set.

get_margin_top()

The get_margin_top() method returns the top margin of the worksheet in inches.

my $margin_top = $worksheet->get_margin_top();

Returns undef if the property isn’t set.

get_margin_bottom()

The get_margin_bottom() method returns the bottom margin of the worksheet in inches.

my $margin_bottom = $worksheet->get_margin_bottom();

Returns undef if the property isn’t set.

get_margin_header()

The get_margin_header() method returns the header margin of the worksheet in inches.

my $margin_header = $worksheet->get_margin_header();

Returns a default value of 0.5 if not set.

The get_margin_footer() method returns the footer margin of the worksheet in inches.

my $margin_footer = $worksheet->get_margin_footer();

Returns a default value of 0.5 if not set.

get_paper()

The get_paper() method returns the printer paper size.

my $paper = $worksheet->get_paper();

The value corresponds to the formats shown below:

Index Paper format Paper size ===== ============ ========== 0 Printer default - 1 Letter 8 1/2 x 11 in 2 Letter Small 8 1/2 x 11 in 3 Tabloid 11 x 17 in 4 Ledger 17 x 11 in 5 Legal 8 1/2 x 14 in 6 Statement 5 1/2 x 8 1/2 in 7 Executive 7 1/4 x 10 1/2 in 8 A3 297 x 420 mm 9 A4 210 x 297 mm 10 A4 Small 210 x 297 mm 11 A5 148 x 210 mm 12 B4 250 x 354 mm 13 B5 182 x 257 mm 14 Folio 8 1/2 x 13 in 15 Quarto 215 x 275 mm 16 - 10x14 in 17 - 11x17 in 18 Note 8 1/2 x 11 in 19 Envelope 9 3 7/8 x 8 7/8 20 Envelope 10 4 1/8 x 9 1/2 21 Envelope 11 4 1/2 x 10 3/8 22 Envelope 12 4 3/4 x 11 23 Envelope 14 5 x 11 1/2 24 C size sheet - 25 D size sheet - 26 E size sheet - 27 Envelope DL 110 x 220 mm 28 Envelope C3 324 x 458 mm 29 Envelope C4 229 x 324 mm 30 Envelope C5 162 x 229 mm 31 Envelope C6 114 x 162 mm 32 Envelope C65 114 x 229 mm 33 Envelope B4 250 x 353 mm 34 Envelope B5 176 x 250 mm 35 Envelope B6 176 x 125 mm 36 Envelope 110 x 230 mm 37 Monarch 3.875 x 7.5 in 38 Envelope 3 5/8 x 6 1/2 in 39 Fanfold 14 7/8 x 11 in 40 German Std Fanfold 8 1/2 x 12 in 41 German Legal Fanfold 8 1/2 x 13 in 256 User defined

The two most common paper sizes are 1 = "US Letter" and 9 = A4. Returns 9 by default.

get_start_page()

The get_start_page() method returns the page number that printing will start from.

my $start_page = $worksheet->get_start_page();

Returns 0 if the property isn’t set.

get_print_order()

The get_print_order() method returns 0 if the worksheet print page order is Down then over (the default) or 1 if it is Over then down.

my $print_order = $worksheet->get_print_order();

get_print_scale()

The get_print_scale() method returns the workbook scale for printing. The print scale factor can be in the range 10 .. 400.

my $print_scale = $worksheet->get_print_scale();

Returns 100 by default.

get_fit_to_pages()

The get_fit_to_pages() method returns the number of pages wide and high that the printed worksheet page will fit to.

my ($pages_wide, $pages_high) = $worksheet->get_fit_to_pages();

Returns (0, 0) if the property isn’t set.

is_portrait()

The is_portrait() method returns true if the worksheet has been set for printing in portrait mode.

my $is_portrait = $worksheet->is_portrait();

Returns 0 if the worksheet has been set for printing in horizontal mode.

is_centered_horizontally()

The is_centered_horizontally() method returns true if the worksheet has been centered horizontally for printing.

my $is_centered_horizontally = $worksheet->is_centered_horizontally();

Returns 0 if the property isn’t set.

is_centered_vertically()

The is_centered_vertically() method returns true if the worksheet has been centered vertically for printing.

my $is_centered_vertically = $worksheet->is_centered_vertically();

Returns 0 if the property isn’t set.

is_print_gridlines()

The is_print_gridlines() method returns true if the worksheet print gridlines option is turned on.

my $is_print_gridlines = $worksheet->is_print_gridlines();

Returns 0 if the property isn’t set.

is_print_row_col_headers()

The is_print_row_col_headers() method returns true if the worksheet print row and column headings option is turned on.

my $is_print_row_col_headers = $worksheet->is_print_row_col_headers();

Returns 0 if the property isn’t set.

is_print_black_and_white()

The is_print_black_and_white() method returns true if the worksheet print black and white option is turned on.

my $is_print_black_and_white = $worksheet->is_print_black_and_white();

Returns 0 if the property isn’t set.

is_print_draft()

The is_print_draft() method returns true if the worksheet print draft option is turned on.

my $is_print_draft = $worksheet->is_print_draft();

Returns 0 if the property isn’t set.

is_print_comments()

The is_print_comments() method returns true if the worksheet print comments option is turned on.

my $is_print_comments = $worksheet->is_print_comments();

Returns 0 if the property isn’t set.

AUTHOR

Current maintainer 0.60+: Douglas Wilson [email protected]

Maintainer 0.40-0.59: John McNamara [email protected]

Maintainer 0.27-0.33: Gabor Szabo [email protected]

Original author: Kawai Takanori [email protected]

COPYRIGHT

Copyright (c) 2014 Douglas Wilson

Copyright (c) 2009-2013 John McNamara

Copyright (c) 2006-2008 Gabor Szabo

Copyright (c) 2000-2006 Kawai Takanori

All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1837 - Linux cli command Image_ExifTool_DICOMpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_DICOMpm and provides detailed information about the command Image_ExifTool_DICOMpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_DICOMpm.

NAME 🖥️ Image_ExifTool_DICOMpm 🖥️

Read DICOM and ACR-NEMA medical images

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to extract meta information from DICOM (Digital Imaging and Communications in Medicine) DCM and ACR-NEMA (American College of Radiology - National Electrical Manufacturer’s Association) ACR medical images.

NOTES

Images compressed using the DICOM deflated transfer syntax will be decoded if Compress::Zlib is installed.

No translation of special characters sets is done.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://medical.nema.org/>

<http://www.sph.sc.edu/comd/rorden/dicom.html>

<http://www.dclunie.com/>

<http://www.gehealthcare.com/usen/interoperability/dicom/docs/2258357r3.pdf>

SEE ALSO

“DICOM Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1838 - Linux cli command lldiv

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lldiv and provides detailed information about the command lldiv, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lldiv.

NAME 🖥️ lldiv 🖥️

compute quotient and remainder of an integer division

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
div_t div(int numerator, int denominator);
ldiv_t ldiv(long numerator, long denominator);
lldiv_t lldiv(long long numerator, long long denominator);
#include <inttypes.h>
imaxdiv_t imaxdiv(intmax_t numerator, intmax_t denominator);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

lldiv():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The div() function computes the value numerator/denominator and returns the quotient and remainder in a structure named div_t that contains two integer members (in unspecified order) named quot and rem. The quotient is rounded toward zero. The result satisfies quot*denominator+rem = numerator.

The ldiv(), lldiv(), and imaxdiv() functions do the same, dividing numbers of the indicated type and returning the result in a structure of the indicated name, in all cases with fields quot and rem of the same type as the function arguments.

RETURN VALUE

The div_t (etc.) structure.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

div(), ldiv(), lldiv(), imaxdiv()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89, C99, SVr4, 4.3BSD.

lldiv() and imaxdiv() were added in C99.

EXAMPLES

After

div_t q = div(-5, 3);

the values q.quot and q.rem are -1 and -2, respectively.

SEE ALSO

abs(3), remainder(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1839 - Linux cli command Tk_InputOpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_InputOpm and provides detailed information about the command Tk_InputOpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_InputOpm.

NAME 🖥️ Tk_InputOpm 🖥️

Create and manipulate TIX InputO widgets

SYNOPSIS

$inputonly = $parent->InputO(?options?);

STANDARD OPTIONS

Only the following three standard options are supported by InputO:

cursor width height

See Tk::options for details of the standard options.

WIDGET-SPECIFIC OPTIONS

InputO does not have any widget specific options.

DESCRIPTION

The InputO method creates a new window (given by the $widget argument) and makes it into a InputO widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the InputO such as its cursor or width.

InputO widgets are not visible to the user. The only purpose of InputO widgets are to accept inputs from the user, which can be done with the bind method.

WIDGET METHODS

The InputO method creates a widget object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class.

BINDINGS

InputO widgets have no default bindings.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1840 - Linux cli command XauUnlockAuth

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XauUnlockAuth and provides detailed information about the command XauUnlockAuth, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XauUnlockAuth.

NAME 🖥️ XauUnlockAuth 🖥️

X authority database routines

SYNOPSIS

#include <X11/Xauth.h>

typedef struct xauth {
        unsigned short  family;
        unsigned short  address_length;
        char    *address;
        unsigned short  number_length;
        char    *number;
        unsigned short  name_length;
        char    *name;
        unsigned short  data_length;
        char    *data;
} Xauth;
char *XauFileName (void);
Xauth *XauReadAuth (FILE *auth_file );
int XauWriteAuth (FILE *auth_file, Xauth *auth );
Xauth *XauGetAuthByAddr (unsigned short family , unsigned short
address_length , const char *address , unsigned short
number_length , const char *number , unsigned short
name_length , const char *name );
Xauth *XauGetBestAuthByAddr (unsigned short family , unsigned short
address_length , const char *address , unsigned short
number_length , const char *number , int types_length ,
char **types , const int *type_lengths );
int XauLockAuth (const char *file_name , int retries , int
timeout , long dead );
int XauUnlockAuth (const char *file_name );
int XauDisposeAuth (Xauth *auth );

DESCRIPTION

XauFileName generates the default authorization file name by first checking the XAUTHORITY environment variable if set, else it returns $HOME/.Xauthority. This name is statically allocated and should not be freed.

XauReadAuth reads the next entry from auth_file. The entry is not statically allocated and should be freed by calling XauDisposeAuth.

XauWriteAuth writes an authorization entry to auth_file. It returns 1 on success, 0 on failure.

XauGetAuthByAddr searches for an entry which matches the given network address/display number pair. The entry is not statically allocated and should be freed by calling XauDisposeAuth.

XauGetBestAuthByAddr is similar to XauGetAuthByAddr, except that a list of acceptable authentication methods is specified. Xau will choose the file entry which matches the earliest entry in this list (e.g., the most secure authentication method). The types argument is an array of strings, one string for each authentication method. types_length specifies how many elements are in the types array. types_lengths is an array of integers representing the length of each string.

XauLockAuth does the work necessary to synchronously update an authorization file. First it makes two file names, one with ``-c’’ appended to file_name, the other with ``-l’’ appended. If the ``-c’’ file already exists and is more than dead seconds old, XauLockAuth removes it and the associated ``-l’’ file. To prevent possible synchronization troubles with NFS, a dead value of zero forces the files to be removed. XauLockAuth makes retries attempts to create and link the file names, pausing timeout seconds between each attempt. XauLockAuth returns a collection of values depending on the results:

LOCK_ERROR
A system error occurred, either a file_name which is too long, or an unexpected failure from a system call. errno may prove useful.

LOCK_TIMEOUT
retries attempts failed

LOCK_SUCCESS
The lock succeeded.

XauUnlockAuth undoes the work of XauLockAuth by unlinking both the ``-c’’ and ``-l’’ file names.

XauDisposeAuth frees storage allocated to hold an authorization entry.

SEE ALSO

xauth(1), xdm(1)

AUTHOR

Keith Packard, MIT X Consortium

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1841 - Linux cli command setusershell

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setusershell and provides detailed information about the command setusershell, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setusershell.

NAME 🖥️ setusershell 🖥️

get permitted user shells

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
char *getusershell(void);
void setusershell(void);
void endusershell(void);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getusershell(), setusershell(), endusershell():

    Since glibc 2.21:
        _DEFAULT_SOURCE
    In glibc 2.19 and 2.20:
        _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)
    Up to and including glibc 2.19:
        _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)

DESCRIPTION

The getusershell() function returns the next line from the file /etc/shells, opening the file if necessary. The line should contain the pathname of a valid user shell. If /etc/shells does not exist or is unreadable, getusershell() behaves as if /bin/sh and /bin/csh were listed in the file.

The setusershell() function rewinds /etc/shells.

The endusershell() function closes /etc/shells.

RETURN VALUE

The getusershell() function returns NULL on end-of-file.

FILES

/etc/shells

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getusershell(), setusershell(), endusershell()

Thread safetyMT-Unsafe

STANDARDS

None.

HISTORY

4.3BSD.

SEE ALSO

shells(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1842 - Linux cli command Image_ExifTool_BZZpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_BZZpm and provides detailed information about the command Image_ExifTool_BZZpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_BZZpm.

NAME 🖥️ Image_ExifTool_BZZpm 🖥️

Utility to decode BZZ compressed data

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to decode BZZ compressed data in DjVu images.

NOTES

This code is based on ZPCodec and BSByteStream of DjVuLibre 3.5.21 (see additional copyrights and the first reference below), which are covered under the GNU GPL license.

This is implemented as Image::ExifTool::BZZ instead of Compress::BZZ because I am hoping that someone else will write a proper Compress::BZZ module (with compression ability).

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com) Copyright 2002, Leon Bottou and Yann Le Cun Copyright 2001, AT&T Copyright 1999-2001, LizardTech Inc.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://djvu.sourceforge.net/>

<http://www.djvu.org/>

SEE ALSO

Image::ExifTool::DjVu (3pm), Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1843 - Linux cli command getc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getc and provides detailed information about the command getc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getc.

NAME 🖥️ getc 🖥️

input of characters and strings

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int fgetc(FILE *stream);
int getc(FILE *stream);
int getchar(void);
char *fgets(char s[restrict .size], int size, FILE *restrict stream);
int ungetc(int c, FILE *stream);

DESCRIPTION

fgetc() reads the next character from stream and returns it as an unsigned char cast to an int, or EOF on end of file or error.

getc() is equivalent to fgetc() except that it may be implemented as a macro which evaluates stream more than once.

getchar() is equivalent to getc(stdin).

fgets() reads in at most one less than size characters from stream and stores them into the buffer pointed to by s. Reading stops after an EOF or a newline. If a newline is read, it is stored into the buffer. A terminating null byte (‘�’) is stored after the last character in the buffer.

ungetc() pushes c back to stream, cast to unsigned char, where it is available for subsequent read operations. Pushed-back characters will be returned in reverse order; only one pushback is guaranteed.

Calls to the functions described here can be mixed with each other and with calls to other input functions from the stdio library for the same input stream.

For nonlocking counterparts, see unlocked_stdio(3).

RETURN VALUE

fgetc(), getc(), and getchar() return the character read as an unsigned char cast to an int or EOF on end of file or error.

fgets() returns s on success, and NULL on error or when end of file occurs while no characters have been read.

ungetc() returns c on success, or EOF on error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fgetc(), fgets(), getc(), getchar(), ungetc()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89.

NOTES

It is not advisable to mix calls to input functions from the stdio library with low-level calls to read(2) for the file descriptor associated with the input stream; the results will be undefined and very probably not what you want.

SEE ALSO

read(2), write(2), ferror(3), fgetwc(3), fgetws(3), fopen(3), fread(3), fseek(3), getline(3), gets(3), getwchar(3), puts(3), scanf(3), ungetwc(3), unlocked_stdio(3), feature_test_macros(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1844 - Linux cli command remove

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command remove and provides detailed information about the command remove, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the remove.

NAME 🖥️ remove 🖥️

remove a file or directory

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int remove(const char *pathname);

DESCRIPTION

remove() deletes a name from the filesystem. It calls unlink(2) for files, and rmdir(2) for directories.

If the removed name was the last link to a file and no processes have the file open, the file is deleted and the space it was using is made available for reuse.

If the name was the last link to a file, but any processes still have the file open, the file will remain in existence until the last file descriptor referring to it is closed.

If the name referred to a symbolic link, the link is removed.

If the name referred to a socket, FIFO, or device, the name is removed, but processes which have the object open may continue to use it.

RETURN VALUE

On success, zero is returned. On error, -1 is returned, and errno is set to indicate the error.

ERRORS

The errors that occur are those for unlink(2) and rmdir(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

remove()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89, 4.3BSD.

BUGS

Infelicities in the protocol underlying NFS can cause the unexpected disappearance of files which are still being used.

SEE ALSO

rm(1), unlink(1), link(2), mknod(2), open(2), rename(2), rmdir(2), unlink(2), mkfifo(3), symlink(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1845 - Linux cli command Moose_Meta_Method_Accessorpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Method_Accessorpm and provides detailed information about the command Moose_Meta_Method_Accessorpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Method_Accessorpm.

NAME 🖥️ Moose_Meta_Method_Accessorpm 🖥️

A Moose Method metaclass for accessors

VERSION

version 2.2207

DESCRIPTION

This class is a subclass of Class::MOP::Method::Accessor that provides additional Moose-specific functionality, all of which is private.

To understand this class, you should read the Class::MOP::Method::Accessor documentation.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1846 - Linux cli command Net_DNS_Questionpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_Questionpm and provides detailed information about the command Net_DNS_Questionpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_Questionpm.

NAME 🖥️ Net_DNS_Questionpm 🖥️

DNS question record

SYNOPSIS

use Net::DNS::Question; $question = Net::DNS::Question->new(example.com, AAAA, IN);

DESCRIPTION

A Net::DNS::Question object represents a record in the question section of a DNS packet.

METHODS

new

$question = Net::DNS::Question->new(example.com, AAAA, IN); $question = Net::DNS::Question->new(example.com, A, IN); $question = Net::DNS::Question->new(example.com); $question = Net::DNS::Question->new(2001::DB8::dead:beef, PTR, IN); $question = Net::DNS::Question->new(2001::DB8::dead:beef);

Creates a question object from the domain, type, and class passed as arguments. One or both type and class arguments may be omitted and will assume the default values shown above.

RFC4291 and RFC4632 IP address/prefix notation is supported for queries in both in-addr.arpa and ip6.arpa namespaces.

decode

$question = Net::DNS::Question->decode(\data, $offset); ($question, $offset) = Net::DNS::Question->decode(\data, $offset);

Decodes the question record at the specified location within a DNS wire-format packet. The first argument is a reference to the buffer containing the packet data. The second argument is the offset of the start of the question record.

Returns a Net::DNS::Question object and the offset of the next location in the packet.

An exception is raised if the object cannot be created (e.g., corrupt or insufficient data).

encode

$data = $question->encode( $offset, $hash );

Returns the Net::DNS::Question in binary format suitable for inclusion in a DNS packet buffer.

The optional arguments are the offset within the packet data where the Net::DNS::Question is to be stored and a reference to a hash table used to index compressed names within the packet.

string

print “string = “, $question->string, " “;

Returns a string representation of the question record.

print

$object->print;

Prints the record to the standard output. Calls the string() method to get the string representation.

name

$name = $question->name;

Internationalised domain name corresponding to the qname attribute.

Decoding non-ASCII domain names is computationally expensive and undesirable for names which are likely to be used to construct further queries.

When required to communicate with humans, the ‘proper’ domain name should be extracted from a query or reply packet.

$query = Net::DNS::Packet->new( $example, SOA ); $reply = $resolver->send($query) or die; ($question) = $reply->question; $name = $question->name;

qname, zname

$qname = $question->qname; $zname = $question->zname;

Fully qualified domain name in the form required for a query transmitted to a nameserver. In dynamic update packets, this attribute is known as zname() and refers to the zone name.

qtype, ztype, type

$qtype = $question->type; $qtype = $question->qtype; $ztype = $question->ztype;

Returns the question type attribute. In dynamic update packets, this attribute is known as ztype() and refers to the zone type.

qclass, zclass, class

$qclass = $question->class; $qclass = $question->qclass; $zclass = $question->zclass;

Returns the question class attribute. In dynamic update packets, this attribute is known as zclass() and refers to the zone class.

COPYRIGHT

Copyright (c)1997-2000 Michael Fuhr.

Portions Copyright (c)2002,2003 Chris Reinhardt.

Portions Copyright (c)2003,2006-2011 Dick Franks.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::DomainName Net::DNS::Packet RFC1035(4.1.2) <https://tools.ietf.org/html/rfc1035>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1847 - Linux cli command Regexp_Common_netpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_netpm and provides detailed information about the command Regexp_Common_netpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_netpm.

NAME 🖥️ Regexp_Common_netpm 🖥️

  • provide regexes for IPv4, IPv6, and MAC addresses.

SYNOPSIS

use Regexp::Common qw /net/; while (<>) { /$RE{net}{IPv4}/ and print “Dotted decimal IP address”; /$RE{net}{IPv4}{hex}/ and print “Dotted hexadecimal IP address”; /$RE{net}{IPv4}{oct}{-sep => :}/ and print “Colon separated octal IP address”; /$RE{net}{IPv4}{bin}/ and print “Dotted binary IP address”; /$RE{net}{MAC}/ and print “MAC address”; /$RE{net}{MAC}{oct}{-sep => " “}/ and print “Space separated octal MAC address”; }

DESCRIPTION

Please consult the manual of Regexp::Common for a general description of the works of this interface.

Do not use this module directly, but load it via Regexp::Common.

This modules gives you regular expressions for various style IPv4, IPv6, and MAC (or ethernet) addresses.

“$RE{net}{IPv4}”

Returns a pattern that matches a valid IP address in “dotted decimal”. Note that while 318.99.183.11 is not a valid IP address, it does match /$RE{net}{IPv4}/, but this is because 318.99.183.11 contains a valid IP address, namely 18.99.183.11. To prevent the unwanted matching, one needs to anchor the regexp: /^$RE{net}{IPv4}$/.

For this pattern and the next four, under -keep (See Regexp::Common):

$1
captures the entire match

$2
captures the first component of the address

$3
captures the second component of the address

$4
captures the third component of the address

$5
captures the final component of the address

“$RE{net}{IPv4}{dec}{-sep}”

Returns a pattern that matches a valid IP address in “dotted decimal”. Leading 0s are allowed, as long as each component does not exceed 3 digits.

If -sep=P is specified the pattern P is used as the separator. By default P is qr/[.]/.

“$RE{net}{IPv4}{strict}{-sep}”

Returns a pattern that matches a valid IP address in “dotted decimal”, but disallow any leading 0s.

If -sep=P is specified the pattern P is used as the separator. By default P is qr/[.]/.

“$RE{net}{IPv4}{hex}{-sep}”

Returns a pattern that matches a valid IP address in “dotted hexadecimal”, with the letters A to F capitalized.

If -sep=P is specified the pattern P is used as the separator. By default P is qr/[.]/. -sep="" and -sep=" " are useful alternatives.

“$RE{net}{IPv4}{oct}{-sep}”

Returns a pattern that matches a valid IP address in “dotted octal”

If -sep=P is specified the pattern P is used as the separator. By default P is qr/[.]/.

“$RE{net}{IPv4}{bin}{-sep}”

Returns a pattern that matches a valid IP address in “dotted binary”

If -sep=P is specified the pattern P is used as the separator. By default P is qr/[.]/.

“$RE{net}{MAC}”

Returns a pattern that matches a valid MAC or ethernet address as colon separated hexadecimals.

For this pattern, and the next four, under -keep (See Regexp::Common):

$1
captures the entire match

$2
captures the first component of the address

$3
captures the second component of the address

$4
captures the third component of the address

$5
captures the fourth component of the address

$6
captures the fifth component of the address

$7
captures the sixth and final component of the address

This pattern, and the next four, have a subs method as well, which will transform a matching MAC address into so called canonical format. Canonical format means that every component of the address will be exactly two hexadecimals (with a leading zero if necessary), and the components will be separated by a colon.

“$RE{net}{MAC}{dec}{-sep}”

Returns a pattern that matches a valid MAC address as colon separated decimals.

If -sep=P is specified the pattern P is used as the separator. By default P is qr/:/.

“$RE{net}{MAC}{hex}{-sep}”

Returns a pattern that matches a valid MAC address as colon separated hexadecimals, with the letters a to f in lower case.

If -sep=P is specified the pattern P is used as the separator. By default P is qr/:/.

“$RE{net}{MAC}{oct}{-sep}”

Returns a pattern that matches a valid MAC address as colon separated octals.

If -sep=P is specified the pattern P is used as the separator. By default P is qr/:/.

“$RE{net}{MAC}{bin}{-sep}”

Returns a pattern that matches a valid MAC address as colon separated binary numbers.

If -sep=P is specified the pattern P is used as the separator. By default P is qr/:/.

“$RE{net}{IPv6}{-sep => :}{-style => HeX}”

Returns a pattern matching IPv6 numbers. An IPv6 address consists of eight groups of four hexadecimal digits, separated by colons. In each group, leading zeros may be omitted. Two or more consecutive groups consisting of only zeros may be omitted (including any colons separating them), resulting into two sets of groups, separated by a double colon. (Each of the groups may be empty; :: is a valid address, equal to 0000:0000:0000:0000:0000:0000:0000:0000). The hex numbers may be in either case.

If the -sep option is used, its argument is a pattern that matches the separator that separates groups. This defaults to :. The -style option is used to denote which case the hex numbers may be. The default style, HeX indicates both lower case letters a to f and upper case letters A to F will be matched. The style HEX restricts matching to upper case letters, and hex only matches lower case letters.

If {-keep} is used, $1 to $9 will be set. $1 will be set to the matched address, while $2 to $9 will be set to each matched group. If a group is omitted because it contains all zeros, its matching variable will be the empty string.

Example:

“2001:db8:85a3::8a2e:370:7334” =~ /$RE{net}{IPv6}{-keep}/; print $2; # 2001 print $4; # 85a3 print $6; # Empty string print $8; # 370

Perl 5.10 (or later) is required for this pattern.

“$RE{net}{domain}”

Returns a pattern to match domains (and hosts) as defined in RFC 1035. Under I{-keep} only the entire domain name is returned.

RFC 1035 says that a single space can be a domainname too. So, the pattern returned by $RE{net}{domain} recognizes a single space as well. This is not always what people want. If you want to recognize domainnames, but not a space, you can do one of two things, either use

/(?! )$RE{net}{domain}/

or use the {-nospace} option (without an argument).

RFC 1035 does not allow host or domain names to start with a digits; however, this restriction is relaxed in RFC 1101; this RFC allows host and domain names to start with a digit, as long as the first part of a domain does not look like an IP address. If the {-rfc1101} option is given (as in $RE {net} {domain} {-rfc1101}), we will match using the relaxed rules.

REFERENCES

RFC 1035
Mockapetris, P.: DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION. November 1987.

RFC 1101
Mockapetris, P.: DNS Encoding of Network Names and Other Types. April 1987.

SEE ALSO

Regexp::Common for a general description of how to use this interface.

AUTHOR

Damian Conway [email protected].

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

For a start, there are many common regexes missing. Send them in to [email protected].

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1848 - Linux cli command XtCallAcceptFocus

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtCallAcceptFocus and provides detailed information about the command XtCallAcceptFocus, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtCallAcceptFocus.

NAME 🖥️ XtCallAcceptFocus 🖥️

calla widget’s accept_focus procedure

SYNTAX

#include <X11/Intrinsic.h>

Boolean XtCallAcceptFocus(Widget w, Time *time);

ARGUMENTS

time
Specifies the X time of the event that is causing the accept focus.

  1. Specifies the widget.

DESCRIPTION

The XtCallAcceptFocus function calls the specified widget’s accept_focus procedure, passing it the specified widget and time, and returns what the accept_focus procedure returns. If accept_focus is NULL, XtCallAcceptFocus returns False.

SEE ALSO

XtSetKeyboardFocus(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1849 - Linux cli command pthread_attr_getaffinity_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_attr_getaffinity_np and provides detailed information about the command pthread_attr_getaffinity_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_attr_getaffinity_np.

NAME 🖥️ pthread_attr_getaffinity_np 🖥️

set/get CPU affinity attribute in thread attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <pthread.h>
int pthread_attr_setaffinity_np(pthread_attr_t *attr,
 size_t cpusetsize, const cpu_set_t *cpuset);
int pthread_attr_getaffinity_np(const pthread_attr_t *attr,
 size_t cpusetsize, cpu_set_t *cpuset);

DESCRIPTION

The pthread_attr_setaffinity_np() function sets the CPU affinity mask attribute of the thread attributes object referred to by attr to the value specified in cpuset. This attribute determines the CPU affinity mask of a thread created using the thread attributes object attr.

The pthread_attr_getaffinity_np() function returns the CPU affinity mask attribute of the thread attributes object referred to by attr in the buffer pointed to by cpuset.

The argument cpusetsize is the length (in bytes) of the buffer pointed to by cpuset. Typically, this argument would be specified as sizeof(cpu_set_t).

For more details on CPU affinity masks, see sched_setaffinity(2). For a description of a set of macros that can be used to manipulate and inspect CPU sets, see CPU_SET(3).

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

EINVAL
(pthread_attr_setaffinity_np()) cpuset specified a CPU that was outside the set supported by the kernel. (The kernel configuration option CONFIG_NR_CPUS defines the range of the set supported by the kernel data type used to represent CPU sets.)

EINVAL
(pthread_attr_getaffinity_np()) A CPU in the affinity mask of the thread attributes object referred to by attr lies outside the range specified by cpusetsize (i.e., cpuset/cpusetsize is too small).

ENOMEM
(pthread_attr_setaffinity_np()) Could not allocate memory.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_attr_setaffinity_np(), pthread_attr_getaffinity_np()

Thread safetyMT-Safe

STANDARDS

GNU; hence the suffix “_np” (nonportable) in the names.

HISTORY

glibc 2.3.4.

NOTES

In glibc 2.3.3 only, versions of these functions were provided that did not have a cpusetsize argument. Instead the CPU set size given to the underlying system calls was always sizeof(cpu_set_t).

SEE ALSO

sched_setaffinity(2), pthread_attr_init(3), pthread_setaffinity_np(3), cpuset(7), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1850 - Linux cli command Image_ExifTool_Oggpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Oggpm and provides detailed information about the command Image_ExifTool_Oggpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Oggpm.

NAME 🖥️ Image_ExifTool_Oggpm 🖥️

Read Ogg meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to extract meta information from Ogg bitstream container files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.xiph.org/vorbis/doc/>

<http://flac.sourceforge.net/ogg_mapping.html>

<http://www.theora.org/doc/Theora.pdf>

SEE ALSO

“Ogg Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1851 - Linux cli command Moose_Cookbook_Basics_BinaryTree_BuilderAndLazyBuildpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Basics_BinaryTree_BuilderAndLazyBuildpm and provides detailed information about the command Moose_Cookbook_Basics_BinaryTree_BuilderAndLazyBuildpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Basics_BinaryTree_BuilderAndLazyBuildpm.

NAME 🖥️ Moose_Cookbook_Basics_BinaryTree_BuilderAndLazyBuildpm 🖥️

Builder methods and lazy_build

VERSION

version 2.2207

SYNOPSIS

package BinaryTree; use Moose; has node => (is => rw, isa => Any); has parent => ( is => rw, isa => BinaryTree, predicate => has_parent, weak_ref => 1, ); has left => ( is => rw, isa => BinaryTree, predicate => has_left, lazy => 1, builder => _build_child_tree, ); has right => ( is => rw, isa => BinaryTree, predicate => has_right, lazy => 1, builder => _build_child_tree, ); before right, left => sub { my ($self, $tree) = @_; $tree->parent($self) if defined $tree; }; sub _build_child_tree { my $self = shift; return BinaryTree->new( parent => $self ); }

DESCRIPTION

If you’ve already read Moose::Cookbook::Basics::BinaryTree_AttributeFeatures, then this example should look very familiar. In fact, all we’ve done here is replace the attribute’s default parameter with a builder.

In this particular case, the default and builder options act in exactly the same way. When the left or right attribute is read, Moose calls the builder method to initialize the attribute.

Note that Moose calls the builder method on the object which has the attribute. Here’s an example:

my $tree = BinaryTree->new(); my $left = $tree->left();

When $tree->left() is called, Moose calls $tree->_build_child_tree() in order to populate the left attribute. If we had passed left to the original constructor, the builder would not be called.

There are some differences between default and builder. Notably, a builder is subclassable, and can be composed from a role. See Moose::Manual::Attributes for more details.

The lazy_build shortcut

The lazy_build attribute option can be used as sugar to specify a whole set of attribute options at once:

has animal => ( is => ro, isa => Animal, lazy_build => 1, );

This is a shorthand for:

has animal => ( is => ro, isa => Animal, required => 1, lazy => 1, builder => _build_animal, predicate => has_animal, clearer => clear_animal, );

If your attribute starts with an underscore, Moose is smart and will do the right thing with the predicate and clearer, making them both start with an underscore. The builder method always starts with an underscore.

You can read more about lazy_build in Moose::Meta::Attribute

CONCLUSION

The builder option is a more OO-friendly version of the default functionality. It also separates the default-generating code into a well-defined method. Sprinkling your attribute definitions with anonymous subroutines can be quite ugly and hard to follow.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1852 - Linux cli command Moose_Meta_Role_Compositepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Role_Compositepm and provides detailed information about the command Moose_Meta_Role_Compositepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Role_Compositepm.

NAME 🖥️ Moose_Meta_Role_Compositepm 🖥️

An object to represent the set of roles

VERSION

version 2.2207

DESCRIPTION

A composite is a role that consists of a set of two or more roles.

The API of a composite role is almost identical to that of a regular role.

INHERITANCE

Moose::Meta::Role::Composite is a subclass of Moose::Meta::Role.

METHODS

Moose::Meta::Role::Composite->new(%options)

This returns a new composite role object. It accepts the same options as its parent class, with a few changes:

  • roles This option is an array reference containing a list of Moose::Meta::Role object. This is a required option.

  • name If a name is not given, one is generated from the roles provided.

  • apply_params(\role_params) Creates a new RoleSummation role application with %role_params and applies the composite role to it. The RoleSummation role application class used is determined by the composite role’s application_role_summation_class attribute.

  • reinitialize($metaclass) Like Class::MOP::Package->reinitialize, but doesn’t allow passing a string with the package name, as there is no real package for composite roles.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1853 - Linux cli command getaliasbyname_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getaliasbyname_r and provides detailed information about the command getaliasbyname_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getaliasbyname_r.

NAME 🖥️ getaliasbyname_r 🖥️

read an alias entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <aliases.h>
void setaliasent(void);
void endaliasent(void);
struct aliasent *getaliasent(void);
int getaliasent_r(struct aliasent *restrict result,
 char buffer[restrict .buflen], size_t buflen,
 struct aliasent **restrict res);
struct aliasent *getaliasbyname(const char *name);
int getaliasbyname_r(const char *restrict name,
 struct aliasent *restrict result,
 char buffer[restrict .buflen], size_t buflen,
 struct aliasent **restrict res);

DESCRIPTION

One of the databases available with the Name Service Switch (NSS) is the aliases database, that contains mail aliases. (To find out which databases are supported, try getent –help.) Six functions are provided to access the aliases database.

The getaliasent() function returns a pointer to a structure containing the group information from the aliases database. The first time it is called it returns the first entry; thereafter, it returns successive entries.

The setaliasent() function rewinds the file pointer to the beginning of the aliases database.

The endaliasent() function closes the aliases database.

getaliasent_r() is the reentrant version of the previous function. The requested structure is stored via the first argument but the programmer needs to fill the other arguments also. Not providing enough space causes the function to fail.

The function getaliasbyname() takes the name argument and searches the aliases database. The entry is returned as a pointer to a struct aliasent.

getaliasbyname_r() is the reentrant version of the previous function. The requested structure is stored via the second argument but the programmer needs to fill the other arguments also. Not providing enough space causes the function to fail.

The struct aliasent is defined in <aliases.h>:

struct aliasent {
    char    *alias_name;             /* alias name */
    size_t   alias_members_len;
    char   **alias_members;          /* alias name list */
    int      alias_local;
};

RETURN VALUE

The functions getaliasent_r() and getaliasbyname_r() return a nonzero value on error.

FILES

The default alias database is the file /etc/aliases. This can be changed in the /etc/nsswitch.conf file.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setaliasent(), endaliasent(), getaliasent_r(), getaliasbyname_r()

Thread safetyMT-Safe locale

getaliasent(), getaliasbyname()

Thread safetyMT-Unsafe

STANDARDS

GNU.

HISTORY

The NeXT system has similar routines:

#include <aliasdb.h>
void alias_setent(void);
void alias_endent(void);
alias_ent *alias_getent(void);
alias_ent *alias_getbyname(char *name);

EXAMPLES

The following example compiles with gcc example.c -o example. It will dump all names in the alias database.

#include <aliases.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    struct aliasent *al;
    setaliasent();
    for (;;) {
        al = getaliasent();
        if (al == NULL)
            break;
        printf("Name: %s

“, al->alias_name); } if (errno) { perror(“reading alias”); exit(EXIT_FAILURE); } endaliasent(); exit(EXIT_SUCCESS); }

SEE ALSO

getgrent(3), getpwent(3), getspent(3), aliases(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1854 - Linux cli command ulimit

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ulimit and provides detailed information about the command ulimit, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ulimit.

NAME 🖥️ ulimit 🖥️

get and set user limits

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ulimit.h>
[[deprecated]] long ulimit(int cmd, long newlimit);

DESCRIPTION

Warning: this routine is obsolete. Use getrlimit(2), setrlimit(2), and sysconf(3) instead. For the shell command ulimit, see bash(1).

The ulimit() call will get or set some limit for the calling process. The cmd argument can have one of the following values.

UL_GETFSIZE
Return the limit on the size of a file, in units of 512 bytes.

UL_SETFSIZE
Set the limit on the size of a file.

3
(Not implemented for Linux.) Return the maximum possible address of the data segment.

4
(Implemented but no symbolic constant provided.) Return the maximum number of files that the calling process can open.

RETURN VALUE

On success, ulimit() returns a nonnegative value. On error, -1 is returned, and errno is set to indicate the error.

ERRORS

EPERM
An unprivileged process tried to increase a limit.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

ulimit()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

SVr4, POSIX.1-2001. POSIX.1-2008 marks it as obsolete.

SEE ALSO

bash(1), getrlimit(2), setrlimit(2), sysconf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1855 - Linux cli command isxdigit_l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isxdigit_l and provides detailed information about the command isxdigit_l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isxdigit_l.

NAME 🖥️ isxdigit_l 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1856 - Linux cli command Net_DBus_Test_MockConnectionpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Test_MockConnectionpm and provides detailed information about the command Net_DBus_Test_MockConnectionpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Test_MockConnectionpm.

NAME 🖥️ Net_DBus_Test_MockConnectionpm 🖥️

Fake a connection to the bus unit testing

SYNOPSIS

use Net::DBus; my $bus = Net::DBus->test # Register a service, and the objec to be tested use MyObject my $service = $bus->export_service(“org.example.MyService”); my $object = MyObject->new($service); # Acquire the service & do tests my $remote_service = $bus->get_service(org.example.MyService); my $remote_object = $service->get_object("/org/example/MyObjct"); # This traverses the mock connection, eventually # invoking testSomething on the $object above. $remote_object->testSomething()

DESCRIPTION

This object provides a fake implementation of the Net::DBus::Binding::Connection enabling a pure ‘in-memory’ message bus to be mocked up. This is intended to facilitate creation of unit tests for services which would otherwise need to call out to other object on a live message bus. It is used as a companion to the Net::DBus::Test::MockObject module which is how fake objects are to be provided on the fake bus.

METHODS

my $con = Net::DBus::Test::MockConnection->new()
Create a new mock connection object instance. It is not usually necessary to create instances of this object directly, instead the test method on the Net::DBus object can be used to get a handle to a test bus.

$con->send($message)
Send a message over the mock connection. If the message is a method call, it will be dispatched straight to any corresponding mock object registered. If the message is an error or method return it will be made available as a return value for the send_with_reply_and_block method. If the message is a signal it will be queued up for processing by the dispatch method.

$bus->request_name($service_name)
Pretend to send a request to the bus registering the well known name specified in the $service_name parameter. In reality this is just a no-op giving the impression that the name was successfully registered.

my $reply = $con->send_with_reply_and_block($msg)
Send a message over the mock connection and wait for a reply. The $msg should be an instance of Net::DBus::Binding::Message::MethodCall and the return $reply will be an instance of Net::DBus::Binding::Message::MethodReturn. It is also possible that an error will be thrown, with the thrown error being blessed into the Net::DBus::Error class.

$con->dispatch;
Dispatches any pending messages in the incoming queue to their message handlers. This method should be called by test suites whenever they anticipate that there are pending signals to be dealt with.

$con->add_filter($coderef);
Adds a filter to the connection which will be invoked whenever a message is received. The $coderef should be a reference to a subroutine, which returns a true value if the message should be filtered out, or a false value if the normal message dispatch should be performed.

$bus->add_match($rule)
Register a signal match rule with the bus controller, allowing matching broadcast signals to routed to this client. In reality this is just a no-op giving the impression that the match was successfully registered.

$bus->remove_match($rule)
Unregister a signal match rule with the bus controller, preventing further broadcast signals being routed to this client. In reality this is just a no-op giving the impression that the match was successfully unregistered.

$con->register_object_path($path, \handler)
Registers a handler for messages whose path matches that specified in the $path parameter. The supplied code reference will be invoked with two parameters, the connection object on which the message was received, and the message to be processed (an instance of the Net::DBus::Binding::Message class).

$con->register_fallback($path, \handler)
Registers a handler for messages whose path starts with the prefix specified in the $path parameter. The supplied code reference will be invoked with two parameters, the connection object on which the message was received, and the message to be processed (an instance of the Net::DBus::Binding::Message class).

$con->unregister_object_path($path)
Unregisters the handler associated with the object path $path. The handler would previously have been registered with the register_object_path or register_fallback methods.

my $msg = $con->make_error_message($replyto, $name, $description)
Creates a new message, representing an error which occurred during the handling of the method call object passed in as the $replyto parameter. The $name parameter is the formal name of the error condition, while the $description is a short piece of text giving more specific information on the error.

my $call = $con->make_method_call_message( $service_name, $object_path, $interface, $method_name);
Create a message representing a call on the object located at the path $object_path within the client owning the well-known name given by $service_name. The method to be invoked has the name $method_name within the interface specified by the $interface parameter.

my $msg = $con->make_method_return_message($replyto)
Create a message representing a reply to the method call message passed in the $replyto parameter.

my $msg = $con->make_signal_message($object_path, $interface, $signal_name);
Creates a new message, representing a signal [to be] emitted by the object located under the path given by the $object_path parameter. The name of the signal is given by the $signal_name parameter, and is scoped to the interface given by the $interface parameter.

BUGS

It doesn’t completely replicate the API of Net::DBus::Binding::Connection, merely enough to make the high level bindings work in a test scenario.

AUTHOR

Daniel P. Berrange

COPYRIGHT

Copyright (C) 2005-2009 Daniel P. Berrange

SEE ALSO

Net::DBus, Net::DBus::Test::MockObject, Net::DBus::Binding::Connection, <http://www.mockobjects.com/Faq.html>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1857 - Linux cli command login

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command login and provides detailed information about the command login, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the login.

NAME 🖥️ login 🖥️

write utmp and wtmp entries

LIBRARY

System utilities library (libutil, -lutil)

SYNOPSIS

#include <utmp.h>
void login(const struct utmp *ut);
int logout(const char *ut_line);

DESCRIPTION

The utmp file records who is currently using the system. The wtmp file records all logins and logouts. See utmp(5).

The function login() takes the supplied struct utmp, ut, and writes it to both the utmp and the wtmp file.

The function logout() clears the entry in the utmp file again.

GNU details

More precisely, login() takes the argument ut struct, fills the field ut->ut_type (if there is such a field) with the value USER_PROCESS, and fills the field ut->ut_pid (if there is such a field) with the process ID of the calling process. Then it tries to fill the field ut->ut_line. It takes the first of stdin, stdout, stderr that is a terminal, and stores the corresponding pathname minus a possible leading /dev/ into this field, and then writes the struct to the utmp file. On the other hand, if no terminal name was found, this field is filled with “???” and the struct is not written to the utmp file. After this, the struct is written to the wtmp file.

The logout() function searches the utmp file for an entry matching the ut_line argument. If a record is found, it is updated by zeroing out the ut_name and ut_host fields, updating the ut_tv timestamp field and setting ut_type (if there is such a field) to DEAD_PROCESS.

RETURN VALUE

The logout() function returns 1 if the entry was successfully written to the database, or 0 if an error occurred.

FILES

/var/run/utmp
user accounting database, configured through _PATH_UTMP in <paths.h>

/var/log/wtmp
user accounting log file, configured through _PATH_WTMP in <paths.h>

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

login(), logout()

Thread safety

MT-Unsafe race:utent sig:ALRM timer

In the above table, utent in race:utent signifies that if any of the functions setutent(3), getutent(3), or endutent(3) are used in parallel in different threads of a program, then data races could occur. login() and logout() calls those functions, so we use race:utent to remind users.

VERSIONS

The member ut_user of struct utmp is called ut_name in BSD. Therefore, ut_name is defined as an alias for ut_user in <utmp.h>.

STANDARDS

BSD.

SEE ALSO

getutent(3), utmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1858 - Linux cli command strverscmp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strverscmp and provides detailed information about the command strverscmp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strverscmp.

NAME 🖥️ strverscmp 🖥️

compare two version strings

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <string.h>
int strverscmp(const char *s1, const char *s2);

DESCRIPTION

Often one has files jan1, jan2, …, jan9, jan10, … and it feels wrong when ls(1) orders them jan1, jan10, …, jan2, …, jan9. In order to rectify this, GNU introduced the -v option to ls(1), which is implemented using versionsort(3), which again uses strverscmp().

Thus, the task of strverscmp() is to compare two strings and find the “right” order, while strcmp(3) finds only the lexicographic order. This function does not use the locale category LC_COLLATE, so is meant mostly for situations where the strings are expected to be in ASCII.

What this function does is the following. If both strings are equal, return 0. Otherwise, find the position between two bytes with the property that before it both strings are equal, while directly after it there is a difference. Find the largest consecutive digit strings containing (or starting at, or ending at) this position. If one or both of these is empty, then return what strcmp(3) would have returned (numerical ordering of byte values). Otherwise, compare both digit strings numerically, where digit strings with one or more leading zeros are interpreted as if they have a decimal point in front (so that in particular digit strings with more leading zeros come before digit strings with fewer leading zeros). Thus, the ordering is 000, 00, 01, 010, 09, 0, 1, 9, 10.

RETURN VALUE

The strverscmp() function returns an integer less than, equal to, or greater than zero if s1 is found, respectively, to be earlier than, equal to, or later than s2.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strverscmp()

Thread safetyMT-Safe

STANDARDS

GNU.

EXAMPLES

The program below can be used to demonstrate the behavior of strverscmp(). It uses strverscmp() to compare the two strings given as its command-line arguments. An example of its use is the following:

$ ./a.out jan1 jan10
jan1 < jan10

Program source

#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int
main(int argc, char *argv[])
{
    int res;
    if (argc != 3) {
        fprintf(stderr, "Usage: %s <string1> <string2>

“, argv[0]); exit(EXIT_FAILURE); } res = strverscmp(argv[1], argv[2]); printf("%s %s %s “, argv[1], (res < 0) ? “<” : (res == 0) ? “==” : “>”, argv[2]); exit(EXIT_SUCCESS); }

SEE ALSO

rename(1), strcasecmp(3), strcmp(3), strcoll(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1859 - Linux cli command float_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command float_ttype and provides detailed information about the command float_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the float_ttype.

NAME 🖥️ float_ttype 🖥️

most efficient floating types

LIBRARY

Math library (libm)

SYNOPSIS

#include <math.h>
typedef /* ... */ float_t;
typedef /* ... */ double_t;

DESCRIPTION

The implementation’s most efficient floating types at least as wide as float and double respectively. Their type depends on the value of the macro FLT_EVAL_METHOD (defined in <float.h>):

FLT_EVAL_METHODfloat_tdouble_t
0floatdouble
1doubledouble
2long doublelong double

For other values of FLT_EVAL_METHOD, the types of float_t and double_t are implementation-defined.

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

SEE ALSO

float.h(0p), math.h(0p)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1860 - Linux cli command Image_ExifTool_WTVpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_WTVpm and provides detailed information about the command Image_ExifTool_WTVpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_WTVpm.

NAME 🖥️ Image_ExifTool_WTVpm 🖥️

Read WTV meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read WTV (Windows recorded TV show) videos.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<https://wiki.multimedia.cx/index.php?title=WTV>

SEE ALSO

“WTV Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1861 - Linux cli command zip_source_open

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_open and provides detailed information about the command zip_source_open, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_open.

libzip (-lzip)

The function

opens

for reading.

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1862 - Linux cli command Net_HTTP_NBpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_HTTP_NBpm and provides detailed information about the command Net_HTTP_NBpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_HTTP_NBpm.

NAME 🖥️ Net_HTTP_NBpm 🖥️

Non-blocking HTTP client

VERSION

version 6.23

SYNOPSIS

use Net::HTTP::NB; my $s = Net::HTTP::NB->new(Host => “www.perl.com”) || die $@; $s->write_request(GET => “/”); use IO::Select; my $sel = IO::Select->new($s); READ_HEADER: { die “Header timeout” unless $sel->can_read(10); my($code, $mess, %h) = $s->read_response_headers; redo READ_HEADER unless $code; } while (1) { die “Body timeout” unless $sel->can_read(10); my $buf; my $n = $s->read_entity_body($buf, 1024); last unless $n; print $buf; }

DESCRIPTION

Same interface as Net::HTTP but it will never try multiple reads when the read_response_headers() or read_entity_body() methods are invoked. This make it possible to multiplex multiple Net::HTTP::NB using select without risk blocking.

If read_response_headers() did not see enough data to complete the headers an empty list is returned.

If read_entity_body() did not see new entity data in its read the value -1 is returned.

SEE ALSO

Net::HTTP

AUTHOR

Gisle Aas <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 2001 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1863 - Linux cli command getipnodebyaddr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getipnodebyaddr and provides detailed information about the command getipnodebyaddr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getipnodebyaddr.

NAME 🖥️ getipnodebyaddr 🖥️

get network hostnames and addresses

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
[[deprecated]] struct hostent *getipnodebyname(const char *name, int af,
 int flags, int *error_num);
[[deprecated]] struct hostent *getipnodebyaddr(const void addr[.len],
 size_t len, int af,
 int *error_num);
[[deprecated]] void freehostent(struct hostent *ip);

DESCRIPTION

These functions are deprecated (and unavailable in glibc). Use getaddrinfo(3) and getnameinfo(3) instead.

The getipnodebyname() and getipnodebyaddr() functions return the names and addresses of a network host. These functions return a pointer to the following structure:

struct hostent {
    char  *h_name;
    char **h_aliases;
    int    h_addrtype;
    int    h_length;
    char **h_addr_list;
};

These functions replace the gethostbyname(3) and gethostbyaddr(3) functions, which could access only the IPv4 network address family. The getipnodebyname() and getipnodebyaddr() functions can access multiple network address families.

Unlike the gethostby functions, these functions return pointers to dynamically allocated memory. The freehostent() function is used to release the dynamically allocated memory after the caller no longer needs the hostent structure.

getipnodebyname() arguments

The getipnodebyname() function looks up network addresses for the host specified by the name argument. The af argument specifies one of the following values:

AF_INET
The name argument points to a dotted-quad IPv4 address or a name of an IPv4 network host.

AF_INET6
The name argument points to a hexadecimal IPv6 address or a name of an IPv6 network host.

The flags argument specifies additional options. More than one option can be specified by bitwise OR-ing them together. flags should be set to 0 if no options are desired.

AI_V4MAPPED
This flag is used with AF_INET6 to request a query for IPv4 addresses instead of IPv6 addresses; the IPv4 addresses will be mapped to IPv6 addresses.

AI_ALL
This flag is used with AI_V4MAPPED to request a query for both IPv4 and IPv6 addresses. Any IPv4 address found will be mapped to an IPv6 address.

AI_ADDRCONFIG
This flag is used with AF_INET6 to further request that queries for IPv6 addresses should not be made unless the system has at least one IPv6 address assigned to a network interface, and that queries for IPv4 addresses should not be made unless the system has at least one IPv4 address assigned to a network interface. This flag may be used by itself or with the AI_V4MAPPED flag.

AI_DEFAULT
This flag is equivalent to (AI_ADDRCONFIG | AI_V4MAPPED).

getipnodebyaddr() arguments

The getipnodebyaddr() function looks up the name of the host whose network address is specified by the addr argument. The af argument specifies one of the following values:

AF_INET
The addr argument points to a struct in_addr and len must be set to sizeof(struct in_addr).

AF_INET6
The addr argument points to a struct in6_addr and len must be set to sizeof(struct in6_addr).

RETURN VALUE

NULL is returned if an error occurred, and error_num will contain an error code from the following list:

HOST_NOT_FOUND
The hostname or network address was not found.

NO_ADDRESS
The domain name server recognized the network address or name, but no answer was returned. This can happen if the network host has only IPv4 addresses and a request has been made for IPv6 information only, or vice versa.

NO_RECOVERY
The domain name server returned a permanent failure response.

TRY_AGAIN
The domain name server returned a temporary failure response. You might have better luck next time.

A successful query returns a pointer to a hostent structure that contains the following fields:

h_name
This is the official name of this network host.

h_aliases
This is an array of pointers to unofficial aliases for the same host. The array is terminated by a null pointer.

h_addrtype
This is a copy of the af argument to getipnodebyname() or getipnodebyaddr(). h_addrtype will always be AF_INET if the af argument was AF_INET. h_addrtype will always be AF_INET6 if the af argument was AF_INET6.

h_length
This field will be set to sizeof(struct in_addr) if h_addrtype is AF_INET, and to sizeof(struct in6_addr) if h_addrtype is AF_INET6.

h_addr_list
This is an array of one or more pointers to network address structures for the network host. The array is terminated by a null pointer.

STANDARDS

None.

HISTORY

RFC 2553.

Present in glibc 2.1.91-95, but removed again. Several UNIX-like systems support them, but all call them deprecated.

SEE ALSO

getaddrinfo(3), getnameinfo(3), inet_ntop(3), inet_pton(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1864 - Linux cli command pthread_self

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_self and provides detailed information about the command pthread_self, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_self.

NAME 🖥️ pthread_self 🖥️

obtain ID of the calling thread

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
pthread_t pthread_self(void);

DESCRIPTION

The pthread_self() function returns the ID of the calling thread. This is the same value that is returned in *thread in the pthread_create(3) call that created this thread.

RETURN VALUE

This function always succeeds, returning the calling thread’s ID.

ERRORS

This function always succeeds.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_self()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

POSIX.1 allows an implementation wide freedom in choosing the type used to represent a thread ID; for example, representation using either an arithmetic type or a structure is permitted. Therefore, variables of type pthread_t can’t portably be compared using the C equality operator (==); use pthread_equal(3) instead.

Thread identifiers should be considered opaque: any attempt to use a thread ID other than in pthreads calls is nonportable and can lead to unspecified results.

Thread IDs are guaranteed to be unique only within a process. A thread ID may be reused after a terminated thread has been joined, or a detached thread has terminated.

The thread ID returned by pthread_self() is not the same thing as the kernel thread ID returned by a call to gettid(2).

SEE ALSO

pthread_create(3), pthread_equal(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1865 - Linux cli command sigdelset

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigdelset and provides detailed information about the command sigdelset, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigdelset.

NAME 🖥️ sigdelset 🖥️

POSIX signal set operations

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
int sigemptyset(sigset_t *set);
int sigfillset(sigset_t *set);
int sigaddset(sigset_t *set, int signum);
int sigdelset(sigset_t *set, int signum);
int sigismember(const sigset_t *set, int signum);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sigemptyset(), sigfillset(), sigaddset(), sigdelset(), sigismember():

    _POSIX_C_SOURCE

DESCRIPTION

These functions allow the manipulation of POSIX signal sets.

sigemptyset() initializes the signal set given by set to empty, with all signals excluded from the set.

sigfillset() initializes set to full, including all signals.

sigaddset() and sigdelset() add and delete respectively signal signum from set.

sigismember() tests whether signum is a member of set.

Objects of type sigset_t must be initialized by a call to either sigemptyset() or sigfillset() before being passed to the functions sigaddset(), sigdelset(), and sigismember() or the additional glibc functions described below (sigisemptyset(), sigandset(), and sigorset()). The results are undefined if this is not done.

RETURN VALUE

sigemptyset(), sigfillset(), sigaddset(), and sigdelset() return 0 on success and -1 on error.

sigismember() returns 1 if signum is a member of set, 0 if signum is not a member, and -1 on error.

On error, these functions set errno to indicate the error.

ERRORS

EINVAL
signum is not a valid signal.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sigemptyset(), sigfillset(), sigaddset(), sigdelset(), sigismember(), sigisemptyset(), sigorset(), sigandset()

Thread safetyMT-Safe

VERSIONS

GNU

If the _GNU_SOURCE feature test macro is defined, then <signal.h> exposes three other functions for manipulating signal sets:

int sigisemptyset(const sigset_t *set);
int sigorset(sigset_t *dest, const sigset_t *left,
 const sigset_t *right);
int sigandset(sigset_t *dest, const sigset_t *left,
 const sigset_t *right);

sigisemptyset() returns 1 if set contains no signals, and 0 otherwise.

sigorset() places the union of the sets left and right in dest. sigandset() places the intersection of the sets left and right in dest. Both functions return 0 on success, and -1 on failure.

These functions are nonstandard (a few other systems provide similar functions) and their use should be avoided in portable applications.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

When creating a filled signal set, the glibc sigfillset() function does not include the two real-time signals used internally by the NPTL threading implementation. See nptl(7) for details.

SEE ALSO

sigaction(2), sigpending(2), sigprocmask(2), sigsuspend(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1866 - Linux cli command pcap_free_tstamp_typespcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_free_tstamp_typespcap and provides detailed information about the command pcap_free_tstamp_typespcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_free_tstamp_typespcap.

NAME 🖥️ pcap_free_tstamp_typespcap 🖥️

get a list of time stamp types supported by a capture device, and free that list

SYNOPSIS

#include <pcap/pcap.h>
int pcap_list_tstamp_types(pcap_t *p, int **tstamp_typesp);
void pcap_free_tstamp_types(int *tstamp_types);

DESCRIPTION

pcap_list_tstamp_types() is used to get a list of the supported time stamp types of the interface associated with the pcap descriptor. pcap_list_tstamp_types() allocates an array to hold the list and sets *tstamp_typesp to point to the array. See pcap-tstamp(7) for a list of all the time stamp types.

The caller is responsible for freeing the array with pcap_free_tstamp_types(), which frees the list pointed to by tstamp_types.

RETURN VALUE

pcap_list_tstamp_types() returns the number of time stamp types in the array on success and PCAP_ERROR on failure. A return value of one means that the only time stamp type supported is the one in the list, which is the capture device’s default time stamp type. A return value of zero means that the only time stamp type supported is PCAP_TSTAMP_HOST, which is the capture device’s default time stamp type (only older versions of libpcap will return that; newer versions will always return one or more types). If PCAP_ERROR is returned, pcap_geterr(3PCAP) or pcap_perror(3PCAP) may be called with p as an argument to fetch or display the error text.

BACKWARD COMPATIBILITY

These functions became available in libpcap release 1.2.1. In previous releases, the time stamp type cannot be set; only the default time stamp type offered by a capture source is available.

SEE ALSO

pcap(3PCAP), pcap_tstamp_type_val_to_name(3PCAP), pcap-tstamp(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1867 - Linux cli command Moose_Manual_Conceptspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Manual_Conceptspm and provides detailed information about the command Moose_Manual_Conceptspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Manual_Conceptspm.

NAME 🖥️ Moose_Manual_Conceptspm 🖥️

Moose OO concepts

VERSION

version 2.2207

MOOSE CONCEPTS (VS “OLD SCHOOL” Perl)

In the past, you may not have thought too much about the difference between packages and classes, attributes and methods, constructors and methods, etc. With Moose, these are all conceptually separate, though under the hood they’re implemented with plain old Perl.

Our meta-object protocol (aka MOP) provides well-defined introspection features for each of those concepts, and Moose in turn provides distinct sugar for each of them. Moose also introduces additional concepts such as roles, method modifiers, and declarative delegation.

Knowing what these concepts mean in Moose-speak, and how they used to be done in old school Perl 5 OO is a good way to start learning to use Moose.

Class

When you say “use Moose” in a package, you are making your package a class. At its simplest, a class will consist simply of attributes and/or methods. It can also include roles, method modifiers, and more.

A class has zero or more attributes.

A class has zero or more methods.

A class has zero or more superclasses (aka parent classes). A class inherits from its superclass(es).

A class has zero or more method modifiers. These modifiers can apply to its own methods or methods that are inherited from its ancestors.

A class does (and consumes) zero or more roles.

A class has a constructor and a destructor. These are provided for you “for free” by Moose.

The constructor accepts named parameters corresponding to the class’s attributes and uses them to initialize an object instance.

A class has a metaclass, which in turn has meta-attributes, meta-methods, and meta-roles. This metaclass describes the class.

A class is usually analogous to a category of nouns, like “People” or “Users”.

package Person; use Moose; # now its a Moose class!

Attribute

An attribute is a property of the class that defines it. It always has a name, and it may have a number of other properties.

These properties can include a read/write flag, a type, accessor method names, delegations, a default value, and more.

Attributes are not methods, but defining them causes various accessor methods to be created. At a minimum, a normal attribute will have a reader accessor method. Many attributes have other methods, such as a writer method, a clearer method, or a predicate method (“has it been set?”).

An attribute may also define delegations, which will create additional methods based on the delegation mapping.

By default, Moose stores attributes in the object instance, which is a hashref, but this is invisible to the author of a Moose-based class! It is best to think of Moose attributes as “properties” of the opaque object instance. These properties are accessed through well-defined accessor methods.

An attribute is something that the class’s members have. For example, People have first and last names. Users have passwords and last login datetimes.

has first_name => ( is => rw, isa => Str, );

Method

A method is very straightforward. Any subroutine you define in your class is a method.

Methods correspond to verbs, and are what your objects can do. For example, a User can login.

sub login { … }

Role

A role is something that a class does. We also say that classes consume roles. For example, a Machine class might do the Breakable role, and so could a Bone class. A role is used to define some concept that cuts across multiple unrelated classes, like “breakability”, or “has a color”.

A role has zero or more attributes.

A role has zero or more methods.

A role has zero or more method modifiers.

A role has zero or more required methods.

A required method is not implemented by the role. Required methods are a way for the role to declare “to use this role you must implement this method”.

A role has zero or more excluded roles.

An excluded role is a role that the role doing the excluding says it cannot be combined with.

Roles are composed into classes (or other roles). When a role is composed into a class, its attributes and methods are “flattened” into the class. Roles do not show up in the inheritance hierarchy. When a role is composed, its attributes and methods appear as if they were defined in the consuming class.

Role are somewhat like mixins or interfaces in other OO languages.

package Breakable; use Moose::Role; requires break; has is_broken => ( is => rw, isa => Bool, ); after break => sub { my $self = shift; $self->is_broken(1); };

Method modifiers

A method modifier is a hook that is called when a named method is called. For example, you could say “before calling login(), call this modifier first”. Modifiers come in different flavors like “before”, “after”, “around”, and “augment”, and you can apply more than one modifier to a single method.

Method modifiers are often used as an alternative to overriding a method in a parent class. They are also used in roles as a way of modifying methods in the consuming class.

Under the hood, a method modifier is just a plain old Perl subroutine that gets called before or after (or around, etc.) some named method.

before login => sub { my $self = shift; my $pw = shift; warn “Called login() with $pw “; };

Type

Moose also comes with a (miniature) type system. This allows you to define types for attributes. Moose has a set of built-in types based on the types Perl provides in its core, such as Str, Num, Bool, HashRef, etc.

In addition, every class name in your application can also be used as a type name.

Finally, you can define your own types with their own constraints. For example, you could define a PosInt type, a subtype of Int which only allows positive numbers.

Delegation

Moose attributes provide declarative syntax for defining delegations. A delegation is a method which in turn calls some method on an attribute to do its real work.

Constructor

A constructor creates an object instance for the class. In old school Perl, this was usually done by defining a method called new() which in turn called bless on a reference.

With Moose, this new() method is created for you, and it simply does the right thing. You should never need to define your own constructor!

Sometimes you want to do something whenever an object is created. In those cases, you can provide a BUILD() method in your class. Moose will call this for you after creating a new object.

Destructor

This is a special method called when an object instance goes out of scope. You can specialize what your class does in this method if you need to, but you usually don’t.

With old school Perl 5, this is the DESTROY() method, but with Moose it is the DEMOLISH() method.

Object instance

An object instance is a specific noun in the class’s “category”. For example, one specific Person or User. An instance is created by the class’s constructor.

An instance has values for its attributes. For example, a specific person has a first and last name.

In old school Perl 5, this is often a blessed hash reference. With Moose, you should never need to know what your object instance actually is. (Okay, it’s usually a blessed hashref with Moose, too.)

Moose vs old school summary

  • Class A package with no introspection other than mucking about in the symbol table. With Moose, you get well-defined declaration and introspection.

  • Attributes Hand-written accessor methods, symbol table hackery, or a helper module like Class::Accessor. With Moose, these are declaratively defined, and distinct from methods.

  • Method These are pretty much the same in Moose as in old school Perl.

  • Roles Class::Trait or Class::Role, or maybe mixin.pm. With Moose, they’re part of the core feature set, and are introspectable like everything else.

  • Method Modifiers Could only be done through serious symbol table wizardry, and you probably never saw this before (at least in Perl 5).

  • Type Hand-written parameter checking in your new() method and accessors. With Moose, you define types declaratively, and then use them by name with your attributes.

  • Delegation Class::Delegation or Class::Delegator, but probably even more hand-written code. With Moose, this is also declarative.

  • Constructor A new() method which calls bless on a reference. Comes for free when you define a class with Moose.

  • Destructor A DESTROY() method. With Moose, this is called DEMOLISH().

  • Object Instance A blessed reference, usually a hash reference. With Moose, this is an opaque thing which has a bunch of attributes and methods, as defined by its class.

  • Immutabilization Moose comes with a feature called “immutabilization”. When you make your class immutable, it means you’re done adding methods, attributes, roles, etc. This lets Moose optimize your class with a bunch of extremely dirty in-place code generation tricks that speed up things like object construction and so on.

META WHAT?

A metaclass is a class that describes classes. With Moose, every class you define gets a meta() method. The meta() method returns a Moose::Meta::Class object, which has an introspection API that can tell you about the class it represents.

my $meta = User->meta(); for my $attribute ( $meta->get_all_attributes ) { print $attribute->name(), " “; if ( $attribute->has_type_constraint ) { print " type: “, $attribute->type_constraint->name, " “; } } for my $method ( $meta->get_all_methods ) { print $method->name, " “; }

Almost every concept we defined earlier has a meta class, so we have Moose::Meta::Class, Moose::Meta::Attribute, Moose::Meta::Method, Moose::Meta::Role, Moose::Meta::TypeConstraint, Moose::Meta::Instance, and so on.

BUT I NEED TO DO IT MY WAY!

One of the great things about Moose is that if you dig down and find that it does something the “wrong way”, you can change it by extending a metaclass. For example, you can have arrayref based objects, you can make your constructors strict (no unknown parameters allowed!), you can define a naming scheme for attribute accessors, you can make a class a Singleton, and much, much more.

Many of these extensions require surprisingly small amounts of code, and once you’ve done it once, you’ll never have to hand-code “your way of doing things” again. Instead you’ll just load your favorite extensions.

package MyWay::User; use Moose; use MooseX::StrictConstructor; use MooseX::MyWay; has …;

WHAT NEXT?

So you’re sold on Moose. Time to learn how to really use it.

If you want to see how Moose would translate directly into old school Perl 5 OO code, check out Moose::Manual::Unsweetened. This might be helpful for quickly wrapping your brain around some aspects of “the Moose way”.

Or you can skip that and jump straight to Moose::Manual::Classes and the rest of the Moose::Manual.

After that we recommend that you start with the Moose::Cookbook. If you work your way through all the recipes under the basics section, you should have a pretty good sense of how Moose works, and all of its basic OO features.

After that, check out the Role recipes. If you’re really curious, go on and read the Meta and Extending recipes, but those are mostly there for people who want to be Moose wizards and extend Moose itself.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1868 - Linux cli command pcap_setfilterpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_setfilterpcap and provides detailed information about the command pcap_setfilterpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_setfilterpcap.

NAME 🖥️ pcap_setfilterpcap 🖥️

set the filter

SYNOPSIS

#include <pcap/pcap.h>
int pcap_setfilter(pcap_t *p, struct bpf_program *fp);

DESCRIPTION

pcap_setfilter() is used to specify a filter program. fp is a pointer to a bpf_program struct, usually the result of a call to pcap_compile(3PCAP).

RETURN VALUE

pcap_setfilter() returns 0 on success, PCAP_ERROR_NOT_ACTIVATED if called on a capture handle that has been created but not activated, or PCAP_ERROR on other errors. If PCAP_ERROR is returned, pcap_geterr(3PCAP) or pcap_perror(3PCAP) may be called with p as an argument to fetch or display the error text.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1869 - Linux cli command Tk_optionpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_optionpm and provides detailed information about the command Tk_optionpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_optionpm.

NAME 🖥️ Tk_optionpm 🖥️

Using the option database in Perl/Tk

SYNOPSIS

$widget->widgetClass(Name=>name, -class=>class);

$widget->PathName;

$widget->optionAdd(pattern=>value ?,priority?);

$widget->optionClear;

$widget->optionGet(name, class);

$widget->optionReadfile(fileName ?,priority?);

DESCRIPTION

The option database (also known as the resource database or the application defaults database) is a set of rules for applying default options to widgets. Users and system administrators can set up these rules to customize the appearance of applications without changing any application code; for example, a user might set up personal foreground and background colors, or a site might use fonts associated with visual or language preferences. Different window managers (and implementations of them) have implemented the database differently, but most Xt-based window managers use the .Xdefaults file or the xrdb utility to manage user preferences; some use both, and/or implement a more complex set of site, user and application databases. Check your site documentation for these topics or your window manager’s RESOURCE_MANAGER property.

Being a good citizen

For most applications, the option database “just works.” The option… methods are for applications that need to do something unusual, such as add new rules or test an option’s default. Even in such cases, the application should provide for user preferences. Do not hardcode widget options without a very good reason. All users have their own tastes and they are all different. They choose a special font in a special size and have often spend a lot of time working out a color scheme that they will love until death. When you respect their choices they will enjoy working with your applications much more. Don’t destroy the common look and feel of a personal desktop.

Option rules and widget identification

All widgets in an application are identified hierarchically by pathname, starting from the MainWindow and passing through each widget used to create the endpoint. The path elements are widget names, much like the elements of a file path from the root directory to a file. The rules in the option database are patterns that are matched against a widget’s pathname to determine which defaults apply. When a widget is created, the Name option can be used to assign the widget’s name and thus create a distinctive path for widgets in an application. If the Name option isn’t given, Perl/Tk assigns a default name based on the type of widget; a MainWindow’s default name is the appname. These defaults are fine for most widgets, so don’t feel you need to find a meaningful name for every widget you create. A widget must have a distinctive name to allow users to tailor its options independently of other widgets in an application. For instance, to create a Text widget that will have special options assigned to it, give it a name such as:

$text = $mw->Text(Name => importantText);

You can then tailor the widget’s attributes with a rule in the option database such as:

*importantText*foreground: red

The class attribute identifies groups of widgets, usually within an application but also to group similar widgets among different applications. One typically assigns a class to a TopLevel or Frame so that the class will apply to all of that widget’s children. To extend the example, we could be more specific about the importantText widget by giving its frame a class:

$frame = $mw->Frame(-class => Urgent); $text = $frame->Text(Name => importantText);

Then the resource pattern can be specified as so:

*Urgent*importantText*foreground: red

Similarly, the pattern *Urgent*background: cyan would apply to all widgets in the frame.

METHODS

$widget->widgetClass(Name=>name, -class=>class);
Identify a new widget with name and/or class. Name specifies the path element for the widget; names generally begin with a lowercase letter. -class specifies the class for the widget and its children; classes generally begin with an uppercase letter. If not specified, Perl/Tk will assign a unique default name to each widget. Only MainWindow widgets have a default class, made by uppercasing the first letter of the application name.

$widget->PathName;
The PathName method returns the widget’s pathname, which uniquely identifies the widget within the application.

$widget->optionAdd(pattern=>value ?, priority?);
The optionAdd method adds a new option to the database. Pattern contains the option being specified, and consists of names and/or classes separated by asterisks or dots, in the usual X format. Value contains a text string to associate with pattern; this is the value that will be returned in calls to the optionGet method. If priority is specified, it indicates the priority level for this option (see below for legal values); it defaults to interactive. This method always returns an empty string.

$widget->optionClear;
The optionClear method clears the option database. Default options (from the RESOURCE_MANAGER property or the .Xdefaults file) will be reloaded automatically the next time an option is added to the database or removed from it. This method always returns an empty string.

$widget->optionGet(name,class);
The optionGet method returns the value of the option specified for $widget under name and class. To look up the option, optionGet matches the patterns in the resource database against $widget’s pathname along with the class of $widget (or its parent if $widget has no class specified). The widget’s class and name are options set when the widget is created (not related to class in the sense of bless); the MainWindow’s name is the appname and its class is (by default) derived from the name of the script. If several entries in the option database match $widget’s pathname, name, and class, then the method returns whichever was created with highest priority level. If there are several matching entries at the same priority level, then it returns whichever entry was most recently entered into the option database. If there are no matching entries, then the empty string is returned.

$widget->optionReadfile(fileName?,priority?);
The optionReadfile method reads fileName, which should have the standard format for an X resource database such as .Xdefaults, and adds all the options specified in that file to the option database. If priority is specified, it indicates the priority level at which to enter the options; priority defaults to interactive. The priority arguments to the option methods are normally specified symbolically using one of the following values:

widgetDefault
Level 20. Used for default values hard-coded into widgets.

startupFile
Level 40. Used for options specified in application-specific startup files.

userDefault
Level 60. Used for options specified in user-specific defaults files, such as .Xdefaults, resource databases loaded into the X server, or user-specific startup files.

interactive
Level 80. Used for options specified interactively after the application starts running. If priority isn’t specified, it defaults to this level.

Any of the above keywords may be abbreviated. In addition, priorities may be specified numerically using integers between 0 and 100, inclusive. The numeric form is probably a bad idea except for new priority levels other than the ones given above.

BUGS

The priority scheme used by core Tk is not the same as used by normal Xlib routines. In particular is assumes that the order of the entries is defined, but user commands like xrdb -merge can change the order.

SEE ALSO

Tk::Xrm

KEYWORDS

database, option, priority, retrieve

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1870 - Linux cli command getspent_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getspent_r and provides detailed information about the command getspent_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getspent_r.

NAME 🖥️ getspent_r 🖥️

get shadow password file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

/* General shadow password file API */
#include <shadow.h>
struct spwd *getspnam(const char *name);
struct spwd *getspent(void);
void setspent(void);
void endspent(void);
struct spwd *fgetspent(FILE *stream);
struct spwd *sgetspent(const char *s);
int putspent(const struct spwd *p, FILE *stream);
int lckpwdf(void);
int ulckpwdf(void);
/* GNU extension */
#include <shadow.h>
int getspent_r(struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int getspnam_r(const char *name, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int fgetspent_r(FILE *stream, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int sgetspent_r(const char *s, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getspent_r(), getspnam_r(), fgetspent_r(), sgetspent_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

Long ago it was considered safe to have encrypted passwords openly visible in the password file. When computers got faster and people got more security-conscious, this was no longer acceptable. Julianne Frances Haugh implemented the shadow password suite that keeps the encrypted passwords in the shadow password database (e.g., the local shadow password file /etc/shadow, NIS, and LDAP), readable only by root.

The functions described below resemble those for the traditional password database (e.g., see getpwnam(3) and getpwent(3)).

The getspnam() function returns a pointer to a structure containing the broken-out fields of the record in the shadow password database that matches the username name.

The getspent() function returns a pointer to the next entry in the shadow password database. The position in the input stream is initialized by setspent(). When done reading, the program may call endspent() so that resources can be deallocated.

The fgetspent() function is similar to getspent() but uses the supplied stream instead of the one implicitly opened by setspent().

The sgetspent() function parses the supplied string s into a struct spwd.

The putspent() function writes the contents of the supplied struct spwd *p as a text line in the shadow password file format to stream. String entries with value NULL and numerical entries with value -1 are written as an empty string.

The lckpwdf() function is intended to protect against multiple simultaneous accesses of the shadow password database. It tries to acquire a lock, and returns 0 on success, or -1 on failure (lock not obtained within 15 seconds). The ulckpwdf() function releases the lock again. Note that there is no protection against direct access of the shadow password file. Only programs that use lckpwdf() will notice the lock.

These were the functions that formed the original shadow API. They are widely available.

Reentrant versions

Analogous to the reentrant functions for the password database, glibc also has reentrant functions for the shadow password database. The getspnam_r() function is like getspnam() but stores the retrieved shadow password structure in the space pointed to by spbuf. This shadow password structure contains pointers to strings, and these strings are stored in the buffer buf of size buflen. A pointer to the result (in case of success) or NULL (in case no entry was found or an error occurred) is stored in *spbufp.

The functions getspent_r(), fgetspent_r(), and sgetspent_r() are similarly analogous to their nonreentrant counterparts.

Some non-glibc systems also have functions with these names, often with different prototypes.

Structure

The shadow password structure is defined in <shadow.h> as follows:

struct spwd {
    char *sp_namp;     /* Login name */
    char *sp_pwdp;     /* Encrypted password */
    long  sp_lstchg;   /* Date of last change
                          (measured in days since
                          1970-01-01 00:00:00 +0000 (UTC)) */
    long  sp_min;      /* Min # of days between changes */
    long  sp_max;      /* Max # of days between changes */
    long  sp_warn;     /* # of days before password expires
                          to warn user to change it */
    long  sp_inact;    /* # of days after password expires
                          until account is disabled */
    long  sp_expire;   /* Date when account expires
                          (measured in days since
                          1970-01-01 00:00:00 +0000 (UTC)) */
    unsigned long sp_flag;  /* Reserved */
};

RETURN VALUE

The functions that return a pointer return NULL if no more entries are available or if an error occurs during processing. The functions which have int as the return value return 0 for success and -1 for failure, with errno set to indicate the error.

For the nonreentrant functions, the return value may point to static area, and may be overwritten by subsequent calls to these functions.

The reentrant functions return zero on success. In case of error, an error number is returned.

ERRORS

EACCES
The caller does not have permission to access the shadow password file.

ERANGE
Supplied buffer is too small.

FILES

/etc/shadow
local shadow password database file

/etc/.pwd.lock
lock file

The include file <paths.h> defines the constant _PATH_SHADOW to the pathname of the shadow password file.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getspnam()

Thread safety

MT-Unsafe race:getspnam locale

getspent()

Thread safety

MT-Unsafe race:getspent race:spentbuf locale

setspent(), endspent(), getspent_r()

Thread safety

MT-Unsafe race:getspent locale

fgetspent()

Thread safety

MT-Unsafe race:fgetspent

sgetspent()

Thread safety

MT-Unsafe race:sgetspent

putspent(), getspnam_r(), sgetspent_r()

Thread safety

MT-Safe locale

lckpwdf(), ulckpwdf(), fgetspent_r()

Thread safety

MT-Safe

In the above table, getspent in race:getspent signifies that if any of the functions setspent(), getspent(), getspent_r(), or endspent() are used in parallel in different threads of a program, then data races could occur.

VERSIONS

Many other systems provide a similar API.

STANDARDS

None.

SEE ALSO

getgrnam(3), getpwnam(3), getpwnam_r(3), shadow(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1871 - Linux cli command NetPacket_IPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command NetPacket_IPpm and provides detailed information about the command NetPacket_IPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the NetPacket_IPpm.

NAME 🖥️ NetPacket_IPpm 🖥️

Assemble and disassemble IP (Internet Protocol) packets.

VERSION

version 1.7.2

SYNOPSIS

use NetPacket::IP; $ip_obj = NetPacket::IP->decode($raw_pkt); $ip_pkt = NetPacket::IP->encode($ip_obj); $ip_data = NetPacket::IP::strip($raw_pkt);

DESCRIPTION

NetPacket::IP provides a set of routines for assembling and disassembling packets using IP (Internet Protocol).

Methods

“NetPacket::IP->decode([RAW PACKET])”
Decode the raw packet data given and return an object containing instance data. This method will quite happily decode garbage input. It is the responsibility of the programmer to ensure valid packet data is passed to this method.

“NetPacket::IP->encode()”
Return an IP packet encoded with the instance data specified. This will infer the total length of the packet automatically from the payload length and also adjust the checksum.

Functions

“NetPacket::IP::strip([RAW PACKET])”
Return the encapsulated data (or payload) contained in the IP packet. This data is suitable to be used as input for other NetPacket::* modules. This function is equivalent to creating an object using the decode() constructor and returning the data field of that object.

Instance data

The instance data for the NetPacket::IP object consists of the following fields.

ver
The IP version number of this packet.

hlen
The IP header length of this packet.

flags
The IP header flags for this packet.

foffset
The IP fragment offset for this packet.

tos
The type-of-service for this IP packet.

len
The length (including length of header) in bytes for this packet.

id
The identification (sequence) number for this IP packet.

ttl
The time-to-live value for this packet.

proto
The IP protocol number for this packet.

cksum
The IP checksum value for this packet.

src_ip
The source IP address for this packet in dotted-quad notation.

dest_ip
The destination IP address for this packet in dotted-quad notation.

options
Any IP options for this packet.

data
The encapsulated data (payload) for this IP packet.

Exports

default
none

exportable
IP_PROTO_IP IP_PROTO_ICMP IP_PROTO_IGMP IP_PROTO_IPIP IP_PROTO_TCP IP_PROTO_UDP IP_VERSION_IPv4

tags
The following tags group together related exportable items.

“:protos”
IP_PROTO_IP IP_PROTO_ICMP IP_PROTO_IGMP IP_PROTO_IPIP IP_PROTO_TCP IP_PROTO_UDP

“:versions”
IP_VERSION_IPv4

“:strip”
Import the strip function ip_strip.

“:ALL”
All the above exportable items.

EXAMPLE

The following script dumps IP frames by IP address and protocol to standard output.

#!/usr/bin/perl -w use strict; use Net::PcapUtils; use NetPacket::Ethernet qw(:strip); use NetPacket::IP; sub process_pkt { my ($user, $hdr, $pkt) = @_; my $ip_obj = NetPacket::IP->decode(eth_strip($pkt)); print("$ip_obj->{src_ip}:$ip_obj->{dest_ip} $ip_obj->{proto} “); } Net::PcapUtils::loop(\process_pkt, FILTER => ip);

TODO

IP option decoding - currently stored in binary form.

Assembly of received fragments

COPYRIGHT

Copyright (c) 2001 Tim Potter and Stephanie Wehner.

Copyright (c) 1995,1996,1997,1998,1999 ANU and CSIRO on behalf of the participants in the CRC for Advanced Computational Systems (‘ACSys’).

This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

AUTHOR

Tim Potter <[email protected]>

Stephanie Wehner <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1872 - Linux cli command SNMPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SNMPpm and provides detailed information about the command SNMPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SNMPpm.

NAME 🖥️ SNMPpm 🖥️

The Perl5 ‘SNMP’ Extension Module for the Net-SNMP SNMP package.

SYNOPSIS

use SNMP; … $sess = new SNMP::Session(DestHost => localhost, Community => public); $val = $sess->get(sysDescr.0); … $vars = new SNMP::VarList([sysDescr,0], [sysContact,0], [sysLocation,0]); @vals = $sess->get($vars); … $vb = new SNMP::Varbind(); do { $val = $sess->getnext($vb); print “@{$vb} “; } until ($sess->{ErrorNum}); … $SNMP::save_descriptions = 1; SNMP::initMib(); # assuming mib is not already loaded print “$SNMP::MIB{sysDescr}{description} “;

DESCRIPTION

Note: The perl SNMP 5.0 module which comes with net-snmp 5.0 and higher is different than previous versions in a number of ways. Most importantly, it behaves like a proper net-snmp application and calls init_snmp properly, which means it will read configuration files and use those defaults where appropriate automatically parse MIB files, etc. This will likely affect your perl applications if you have, for instance, default values set up in your snmp.conf file (as the perl module will now make use of those defaults). The documentation, however, has sadly not been updated yet (aside from this note), nor is the read_config default usage implementation fully complete.

The basic operations of the SNMP protocol are provided by this module through an object oriented interface for modularity and ease of use. The primary class is SNMP::Session which encapsulates the persistent aspects of a connection between the management application and the managed agent. Internally the class is implemented as a blessed hash reference. This class supplies ‘get’, ‘getnext’, ‘set’, ‘fget’, and ‘fgetnext’ method calls. The methods take a variety of input argument formats and support both synchronous and asynchronous operation through a polymorphic API (i.e., method behaviour varies dependent on args passed - see below).

SNMP::Session

$sess = new SNMP::Session(DestHost => ‘host’, …)

The following arguments may be passed to new as a hash.

Basic Options

DestHost
Hostname or IP address of the SNMP agent you want to talk to. Specified in Net-SNMP formatted agent addresses. These addresses typically look like one of the following: localhost tcp:localhost tls:localhost tls:localhost:9876 udp6:[::1]:9876 unix:/some/path/to/file/socket Defaults to ’localhost’.

Version
SNMP version to use. The default is taken from library configuration - probably 3 [1, 2 (same as 2c), 2c, 3].

Timeout
The number of micro-seconds to wait before resending a request. The default is ‘1000000’

Retries
The number of times to retry a request. The default is ‘5’

RetryNoSuch
If enabled NOSUCH errors in ‘get’ pdus will be repaired, removing the varbind in error, and resent - undef will be returned for all NOSUCH varbinds, when set to ‘0’ this feature is disabled and the entire get request will fail on any NOSUCH error (applies to v1 only) The default is ‘0’.

SNMPv3/TLS Options

OurIdentity
Our X.509 identity to use, which should either be a fingerprint or the filename that holds the certificate.

TheirIdentity
The remote server’s identity to connect to, specified as either a fingerprint or a file name. Either this must be specified, or the hostname below along with a trust anchor.

TheirHostname
The remote server’s hostname that is expected. If their certificate was signed by a CA then their hostname presented in the certificate must match this value or the connection fails to be established (to avoid man-in-the-middle attacks).

TrustCert
A trusted certificate to use as trust anchor (like a CA certificate) for verifying a remote server’s certificate. If a CA certificate is used to validate a certificate then the TheirHostname parameter must also be specified to ensure their presented hostname in the certificate matches.

SNMPv3/USM Options

SecName
The SNMPv3 security name to use (most for SNMPv3 with USM). The default is ‘initial’.

SecLevel
The SNMPv3 security level to use [noAuthNoPriv, authNoPriv, authPriv] (v3) The default is ’noAuthNoPriv’.

SecEngineId
The SNMPv3 security engineID to use (if the snmpv3 security model needs it; for example USM). The format is as a string without the leading ‘0x’. So if snmptrapd.conf has -e 0x8000000001020304, use SecEngineId => 8000000001020304. The default is <none>, security engineID and it will be probed if not supplied (v3)

ContextEngineId
The SNMPv3 context engineID to use. The default is the <none> and will be set either to the SecEngineId value if set or discovered or will be discovered in other ways if using TLS (RFC5343 based discovery).

Context
The SNMPv3 context name to use. The default is ’’ (an empty string)

AuthProto
The SNMPv3/USM authentication protocol to use [MD5, SHA]. The default is ‘MD5’.

AuthPass
The SNMPv3/USM authentication passphrase to use. default <none>, authentication passphrase

PrivProto
The SNMPv3/USM privacy protocol to use [DES, AES]. The default is ‘DES’.

PrivPass
The SNMPv3/USM privacy passphrase to use. default <none>, privacy passphrase (v3)

AuthMasterKey

PrivMasterKey

AuthLocalizedKey

PrivLocalizedKey

Directly specified SNMPv3 USM user keys (used if you want to specify the keys instead of deriving them from a password as above).

SNMPv1 and SNMPv2c Options

Community
For SNMPv1 and SNMPv2c, the clear-text community name to use. The default is ‘public’.

Other Configuration Options

VarFormats
default ‘undef’, used by ‘fget[next]’, holds an hash reference of output value formatters, (e.g., {<obj> => <sub-ref>, … }, <obj> must match the <obj> and format used in the get operation. A special <obj>, ‘*’, may be used to apply all <obj>s, the supplied sub is called to translate the value to a new format. The sub is called passing the Varbind as the arg

TypeFormats
default ‘undef’, used by ‘fget[next]’, holds an hash reference of output value formatters, (e.g., {<type> => <sub-ref>, … }, the supplied sub is called to translate the value to a new format, unless a VarFormat mathces first (e.g., $sess->{TypeFormats}{INTEGER} = **mapEnum()**; although this can be done more efficiently by enabling $SNMP::use_enums or session creation param ‘UseEnums’)

UseLongNames
defaults to the value of SNMP::use_long_names at time of session creation. set to non-zero to have <tags> for ‘getnext’ methods generated preferring longer Mib name convention (e.g., system.sysDescr vs just sysDescr)

UseSprintValue
defaults to the value of SNMP::use_sprint_value at time of session creation. set to non-zero to have return values for ‘get’ and ‘getnext’ methods formatted with the libraries snprint_value function. This will result in certain data types being returned in non-canonical format Note: values returned with this option set may not be appropriate for ‘set’ operations (see discussion of value formats in <vars> description section)

UseEnums
defaults to the value of SNMP::use_enums at time of session creation. set to non-zero to have integer return values converted to enumeration identifiers if possible, these values will also be acceptable when supplied to ‘set’ operations

UseNumeric
defaults to the value of SNMP::use_numeric at time of session creation. set to non-zero to have <tags> for get methods returned as numeric OID’s rather than descriptions. UseLongNames will be set so that the full OID is returned to the caller.

BestGuess
defaults to the value of SNMP::best_guess at time of session creation. this setting controls how <tags> are parsed. setting to 0 causes a regular lookup. setting to 1 causes a regular expression match (defined as -Ib in snmpcmd) and setting to 2 causes a random access lookup (defined as -IR in snmpcmd).

NonIncreasing
defaults to the value of SNMP::non_increasing at time of session creation. this setting controls if a non-increasing OID during bulkwalk will causes an error. setting to 0 causes the default behaviour (which may, in very badly performing agents, result in a never-ending loop). setting to 1 causes an error (OID not increasing) when this error occur.

ErrorStr
read-only, holds the error message assoc. w/ last request

ErrorNum
read-only, holds the snmp_err or staus of last request

ErrorInd
read-only, holds the snmp_err_index when appropriate

Private variables:

DestAddr
internal field used to hold the translated DestHost field

SessPtr
internal field used to cache a created session structure

RemotePort
Obsolete. Please use the DestHost specifier to indicate the hostname and port combination instead of this paramet.

SNMP::Session methods

$sess->update(<fields>)
Updates the SNMP::Session object with the values fields passed in as a hash list (similar to new(<fields>)) (WARNING! not fully implemented)

$sess->get(<vars> [,<callback>])
do SNMP GET, multiple <vars> formats accepted. for syncronous operation <vars> will be updated with value(s) and type(s) and will also return retrieved value(s). If <callback> supplied method will operate asynchronously

$sess->fget(<vars> [,<callback>])
do SNMP GET like ‘get’ and format the values according the handlers specified in $sess->{VarFormats} and $sess->{TypeFormats}

$sess->getnext(<vars> [,<callback>])
do SNMP GETNEXT, multiple <vars> formats accepted, returns retrieved value(s), <vars> passed as arguments are updated to indicate next lexicographical <obj>,<iid>,<val>, and <type> Note: simple string <vars>,(e.g., ‘sysDescr.0’) form is not updated. If <callback> supplied method will operate asynchronously

$sess->fgetnext(<vars> [,<callback>])
do SNMP GETNEXT like getnext and format the values according the handlers specified in $sess->{VarFormats} and $sess->{TypeFormats}

$sess->set(<vars> [,<callback>])
do SNMP SET, multiple <vars> formats accepted. the value field in all <vars> formats must be in a canonical format (i.e., well known format) to ensure unambiguous translation to SNMP MIB data value (see discussion of canonical value format <vars> description section), returns snmp_errno. If <callback> supplied method will operate asynchronously

$sess->getbulk(<non-repeaters>, <max-repeaters>, <vars>)
do an SNMP GETBULK, from the list of Varbinds, the single next lexico instance is fetched for the first n Varbinds as defined by <non-repeaters>. For remaining Varbinds, the m lexico instances are retrieved each of the remaining Varbinds, where m is <max-repeaters>.

$sess->bulkwalk(<non-repeaters>, <max-repeaters>, <vars> [,<callback>])
Do a “bulkwalk” of the list of Varbinds. This is done by sending a GETBULK request (see getbulk() above) for the Varbinds. For each requested variable, the response is examined to see if the next lexico instance has left the requested sub-tree. Any further instances returned for this variable are ignored, and the walk for that sub-tree is considered complete. If any sub-trees were not completed when the end of the responses is reached, another request is composed, consisting of the remaining variables. This process is repeated until all sub-trees have been completed, or too many packets have been exchanged (to avoid loops). The bulkwalk() method returns an array containing an array of Varbinds, one for each requested variable, in the order of the variable requests. Upon error, bulkwalk() returns undef and sets $sess->ErrorStr and $sess->ErrorNum. If a callback is supplied, bulkwalk() returns the SNMP request id, and returns immediately. The callback will be called with the supplied argument list and the returned variables list. Note: Because the client must “discover” that the tree is complete by comparing the returned variables with those that were requested, there is a potential “gotcha” when using the max-repeaters value. Consider the following code to print a list of interfaces and byte counts: $numInts = $sess->get(ifNumber.0); ($desc, $in, $out) = $sess->bulkwalk(0, $numInts, [[ifDescr], [ifInOctets], [ifOutOctets]]); for $i (0..($numInts - 1)) { printf “Interface %4s: %s inOctets, %s outOctets “, $$desc[$i]->val, $$in[$i]->val, $$out[$i]->val; } This code will produce *two* requests to the agent – the first to get the interface values, and the second to discover that all the information was in the first packet. To get around this, use ‘$numInts + 1’ for the max_repeaters value. This asks the agent to include one additional (unrelated) variable that signals the end of the sub-tree, allowing bulkwalk() to determine that the request is complete.

$results = $sess->gettable(<TABLE OID>, <OPTIONS>)
This will retrieve an entire table of data and return a hash reference to that data. The returned hash reference will have indexes of the OID suffixes for the index data as the key. The value for each entry will be another hash containing the data for a given row. The keys to that hash will be the column names, and the values will be the data. Example: #!/usr/bin/perl use SNMP; use Data::Dumper; my $s = new SNMP::Session(DestHost => localhost); print Dumper($s->gettable(ifTable)); On my machine produces: $VAR1 = { 6 => { ifMtu => 1500, ifPhysAddress => PV, # … ifInUnknownProtos => 0 }, 4 => { ifMtu => 1480, ifPhysAddress => , # … ifInUnknownProtos => 0 }, # … }; By default, it will try to do as optimized retrieval as possible. It’ll request multiple columns at once, and use GETBULK if possible. A few options may be specified by passing in an OPTIONS hash containing various parameters:

noindexes => 1
Instructs the code not to parse the indexes and place the results in the second hash. If you don’t need the index data, this will be faster.

columns => [ colname1, … ]
This specifies which columns to collect. By default, it will try to collect all the columns defined in the MIB table.

repeat => COUNT
Specifies a GETBULK repeat COUNT. IE, it will request this many varbinds back per column when using the GETBULK operation. Shortening this will mean smaller packets which may help going through some systems. By default, this value is calculated and attempts to guess at what will fit all the results into 1000 bytes. This calculation is fairly safe, hopefully, but you can either raise or lower the number using this option if desired. In lossy networks, you want to make sure that the packets don’t get fragmented and lowering this value is one way to help that.

nogetbulk => 1
Force the use of GETNEXT rather than GETBULK. (always true for SNMPv1, as it doesn’t have GETBULK anyway). Some agents are great implementers of GETBULK and this allows you to force the use of GETNEXT operations instead.

callback => \subroutine

callback => [\subroutine, optarg1, optarg2, …]

If a callback is specified, gettable will return quickly without returning results. When the results are finally retrieved the callback subroutine will be called (see the other sections defining callback behaviour and how to make use of SNMP::MainLoop which is required for this to work). An additional argument of the normal hash result will be added to the callback subroutine arguments. Note 1: internally, the gettable function uses it’s own callbacks which are passed to getnext/getbulk as appropriate. Note 2: callback support is only available in the SNMP module version 5.04 and above. To test for this in code intending to support both versions prior to 5.04 and 5.04 and up, the following should work: if ($response = $sess->gettable(ifTable, callback => \my_sub)) { # got a response, gettable doesnt support callback my_sub($response); $no_mainloop = 1; } Deciding on whether to use SNMP::MainLoop is left as an exercise to the reader since it depends on whether your code uses other callbacks as well.

$sess->get_sec_engine_id
Returns the security engine ID for the current session, whether probed or provided by the client, in hex format suitable for the SecEngineId parameter when creating a session in the future. Returns undef if we have not had not had any contact with the remote agent yet.

$sess->get_context_engine_id
Like get_sec_engine_id, but for the context engine ID (ContextEngineId).

SNMP::TrapSession

$sess = new SNMP::Session(DestHost => ‘host’, …)

supports all applicable fields from SNMP::Session (see above)

SNMP::TrapSession methods

$sess->trap(enterprise, agent, generic, specific, uptime, <vars>)
$sess->trap(enterprise=>.1.3.6.1.4.1.2021, # or ucdavis [default] agent => 127.0.0.1, # or localhost,[dflt 1st intf on host] generic => specific, # can be omitted if specific supplied specific => 5, # can be omitted if generic supplied uptime => 1234, # dflt to localhost uptime (0 on win32) [[ifIndex, 1, 1],[sysLocation, 0, “here”]]); # optional vars # always last

trap(oid, uptime, <vars>) - v2 format
$sess->trap(oid => snmpRisingAlarm, uptime => 1234, [[ifIndex, 1, 1],[sysLocation, 0, “here”]]); # optional vars # always last

Acceptable variable formats:

<vars> may be one of the following forms:

SNMP::VarList
represents an array of MIB objects to get or set, implemented as a blessed reference to an array of SNMP::Varbinds, (e.g., [<varbind1>, <varbind2>, …])

SNMP::Varbind
represents a single MIB object to get or set, implemented as a blessed reference to a 4 element array; [<obj>, <iid>, <val>, <type>].

<obj>
one of the following forms:

  1. leaf identifier (e.g., ‘sysDescr’) assumed to be unique for practical purposes

  2. fully qualified identifier (e.g., ‘.iso.org.dod.internet.mgmt.mib-2.system.sysDescr’)

  3. fully qualified, dotted-decimal, numeric OID (e.g., ‘.1.3.6.1.2.1.1.1’)

<iid>
the dotted-decimal, instance identifier. for scalar MIB objects use ‘0’

<val>
the SNMP data value retrieved from or being set to the agents MIB. for (f)get(next) operations <val> may have a variety of formats as determined by session and package settings. However for set operations the <val> format must be canonical to ensure unambiguous translation. The canonical forms are as follows:

OBJECTID
dotted-decimal (e.g., .1.3.6.1.2.1.1.1)

OCTETSTR
perl scalar containing octets

INTEGER
decimal signed integer (or enum)

NETADDR
dotted-decimal

IPADDR
dotted-decimal

COUNTER
decimal unsigned integer

COUNTER64
decimal unsigned integer

GAUGE
decimal unsigned integer

UINTEGER
decimal unsigned integer

TICKS
decimal unsigned integer

OPAQUE
perl scalar containing octets

NULL
perl scalar containing nothing

<type>
SNMP data type (see list above), this field is populated by ‘get’ and ‘getnext’ operations. In some cases the programmer needs to populate this field when passing to a ‘set’ operation. this field need not be supplied when the attribute indicated by <tag> is already described by loaded Mib modules. for ‘set’s, if a numeric OID is used and the object is not currently in the loaded Mib, the <type> field must be supplied

simple string
light weight form of <var> used to ‘set’ or ‘get’ a single attribute without constructing an SNMP::Varbind. stored in a perl scalar, has the form ‘<tag>.<iid>’, (e.g., ‘sysDescr.0’). for ‘set’ operations the value is passed as a second arg. Note: This argument form is not updated in get[next] operations as are the other forms.

Acceptable callback formats

<callback> may be one of the following forms:

without arguments

\subname

sub { … }

or with arguments

[ \subname, $arg1, … ]

[ sub { … }, $arg1, … ]

[ “method”, $obj, $arg1, … ]

callback will be called when response is received or timeout occurs. the last argument passed to callback will be a SNMP::VarList reference. In case of timeout the last argument will be undef.

&SNMP::MainLoop([<timeout>, [<callback>]])
to be used with async SNMP::Session calls. MainLoop must be called after initial async calls so return packets from the agent will be processed. If no args supplied this function enters an infinite loop so program must be exited in a callback or externally interrupted. If <timeout(sic)

&SNMP::finish()
This function, when called from an SNMP::MainLoop() callback function, will cause the current SNMP::MainLoop() to return after the callback is completed. finish() can be used to terminate an otherwise-infinite MainLoop. A new MainLoop() instance can then be started to handle further requests.

SNMP package variables and functions

$SNMP::VERSION
the current version specifier (e.g., 3.1.0)

$SNMP::auto_init_mib
default ‘1’, set to 0 to disable automatic reading of the MIB upon session creation. set to non-zero to call initMib at session creation which will result in MIB loading according to Net-SNMP env. variables (see man mib_api)

$SNMP::verbose
default ‘0’, controls warning/info output of SNMP module, 0 => no output, 1 => enables warning/info output from SNMP module itself (is also controlled by SNMP::debugging - see below)

$SNMP::use_long_names
default ‘0’, set to non-zero to enable the use of longer Mib identifiers. see translateObj. will also influence the formatting of <tag> in varbinds returned from ‘getnext’ operations. Can be set on a per session basis (UseLongNames)

$SNMP::use_sprint_value
default ‘0’, set to non-zero to enable formatting of response values using the snmp libraries snprint_value function. can also be set on a per session basis (see UseSprintValue) Note: returned values may not be suitable for ‘set’ operations

$SNMP::use_enums
default ‘0’,set non-zero to return values as enums and allow sets using enums where appropriate. integer data will still be accepted for set operations. can also be set on a per session basis (see UseEnums)

$SNMP::use_numeric
default to ‘0’,set to non-zero to have <tags> for ‘get’ methods returned as numeric OID’s rather than descriptions. UseLongNames will be set so that the entire OID will be returned. Set on a per-session basis (see UseNumeric).

$SNMP::best_guess
default ‘0’. This setting controls how <tags> are parsed. Setting to 0 causes a regular lookup. Setting to 1 causes a regular expression match (defined as -Ib in snmpcmd) and setting to 2 causes a random access lookup (defined as -IR in snmpcmd). Can also be set on a per session basis (see BestGuess)

$SNMP::save_descriptions
default ‘0’,set non-zero to have mib parser save attribute descriptions. must be set prior to mib initialization

$SNMP::debugging
default ‘0’, controls debugging output level within SNMP module and libsnmp

  1. enables ‘SNMP::verbose’ (see above)

  2. level 1 plus snmp_set_do_debugging (1)

  3. level 2 plus snmp_set_dump_packet (1)

$SNMP::dump_packet
default ‘0’, set [non-]zero to independently set snmp_set_dump_packet()

SNMP::register_debug_tokens()
Allows to register one or more debug tokens, just like the -D option of snmpd. Each debug token enables a group of debug statements. An example: SNMP::register_debug_tokens(“tdomain,netsnmp_unix”);

%SNMP::MIB

a tied hash to access parsed MIB information. After the MIB has been loaded this hash allows access to to the parsed in MIB meta-data(the structure of the MIB (i.e., schema)). The hash returns blessed references to SNMP::MIB::NODE objects which represent a single MIB attribute. The nodes can be fetched with multiple ‘key’ formats - the leaf name (e.g.,sysDescr) or fully/partially qualified name (e.g., system.sysDescr) or fully qualified numeric OID. The returned node object supports the following fields:

objectID
dotted decimal fully qualified OID

label
leaf textual identifier (e.g., ‘sysDescr’)

subID
leaf numeric OID component of objectID (e.g., ‘1’)

moduleID
textual identifier for module (e.g., ‘RFC1213-MIB’)

parent
parent node

children
array reference of children nodes

nextNode
next lexico node (BUG!does not return in lexico order)

type
returns application type (see getType for values)

access
returns ACCESS (ReadOnly, ReadWrite, WriteOnly, NoAccess, Notify, Create)

status
returns STATUS (Mandatory, Optional, Obsolete, Deprecated)

syntax
returns ’textualConvention’ if defined else ’type’

textualConvention
returns TEXTUAL-CONVENTION

TCDescription
returns the TEXTUAL-CONVENTION’s DESCRIPTION field.

units
returns UNITS

hint
returns HINT

enums
returns hash ref {tag => num, …}

ranges
returns array ref of hash ref [{low => num, high => num}, …]

description
returns DESCRIPTION ($SNMP::save_descriptions must be set prior to MIB initialization/parsing)

reference
returns the REFERENCE clause

indexes
returns the objects in the INDEX clause

implied
returns true if the last object in the INDEX is IMPLIED

MIB Functions

&SNMP::setMib(<file>)
allows dynamic parsing of the mib and explicit specification of mib file independent of environment variables. called with no args acts like initMib, loading MIBs indicated by environment variables (see Net-SNMP mib_api docs). passing non-zero second arg forces previous mib to be freed and replaced (Note: second arg not working since freeing previous Mib is more involved than before).

&SNMP::initMib()
calls library init_mib function if Mib not already loaded - does nothing if Mib already loaded. will parse directories and load modules according to environment variables described in Net-SNMP documentations. (see man mib_api, MIBDIRS, MIBS, MIBFILE(S), etc.)

&SNMP::addMibDirs(<dir>,…)
calls library add_mibdir for each directory supplied. will cause directory(s) to be added to internal list and made available for searching in subsequent loadModules calls

&SNMP::addMibFiles(<file>,…)
calls library read_mib function. The file(s) supplied will be read and all Mib module definitions contained therein will be added to internal mib tree structure

&SNMP::loadModules(<mod>,…)
calls library read_module function. The module(s) supplied will be searched for in the current mibdirs and and added to internal mib tree structure. Passing special <mod>, ‘ALL’, will cause all known modules to be loaded.

&SNMP::unloadModules(<mod>,…)
*Not Implemented*

&SNMP::translateObj(<var>[,arg,[arg]])
will convert a text obj tag to an OID and vice-versa. Any iid suffix is retained numerically. Default behaviour when converting a numeric OID to text form is to return leaf identifier only (e.g.,‘sysDescr’) but when $SNMP::use_long_names is non-zero or a non-zero second arg is supplied it will return a longer textual identifier. An optional third argument of non-zero will cause the module name to be prepended to the text name (e.g. ‘SNMPv2-MIB::sysDescr’). When converting a text obj, the $SNMP::best_guess option is used. If no Mib is loaded when called and $SNMP::auto_init_mib is enabled then the Mib will be loaded. Will return ‘undef’ upon failure.

&SNMP::getType(<var>)
return SNMP data type for given textual identifier OBJECTID, OCTETSTR, INTEGER, NETADDR, IPADDR, COUNTER GAUGE, TIMETICKS, OPAQUE, or undef

&SNMP::mapEnum(<var>)
converts integer value to enumertion tag defined in Mib or converts tag to integer depending on input. the function will return the corresponding integer value *or* tag for a given MIB attribute and value. The function will sense which direction to perform the conversion. Various arg formats are supported

$val = SNMP::mapEnum($varbind);
where $varbind is SNMP::Varbind or equiv. note: $varbind will be updated

$val = SNMP::mapEnum(‘ipForwarding’, ‘forwarding’);

$val = SNMP::mapEnum(‘ipForwarding’, 1);

Exported SNMP utility functions

Note: utility functions do not support async operation yet.

&snmp_get()
takes args of SNMP::Session::new followed by those of SNMP::Session::get

&snmp_getnext()
takes args of SNMP::Session::new followed by those of SNMP::Session::getnext

&snmp_set()
takes args of SNMP::Session::new followed by those of SNMP::Session::set

&snmp_trap()
takes args of SNMP::TrapSession::new followed by those of SNMP::TrapSession::trap

Trouble Shooting

If problems occur there are number areas to look at to narrow down the possibilities.

The first step should be to test the Net-SNMP installation independently from the Perl5 SNMP interface.

Try running the apps from the Net-SNMP distribution.

Make sure your agent (snmpd) is running and properly configured with read-write access for the community you are using.

Ensure that your MIBs are installed and enviroment variables are set appropriately (see man mib_api)

Be sure to remove old net-snmp installations and ensure headers and libraries from old CMU installations are not being used by mistake.

If the problem occurs during compilation/linking check that the snmp library being linked is actually the Net-SNMP library (there have been name conflicts with existing snmp libs).

Also check that the header files are correct and up to date.

Sometimes compiling the Net-SNMP library with ‘position-independent-code’ enabled is required (HPUX specifically).

If you cannot resolve the problem you can post to comp.lang.perl.modules or net-snmp-users@[email protected]

please give sufficient information to analyze the problem (OS type, versions for OS/Perl/Net-SNMP/compiler, complete error output, etc.)

Acknowledgements

Many thanks to all those who supplied patches, suggestions and feedback.

Joe Marzot (the original author) Wes Hardaker and the net-snmp-coders Dave Perkins Marcel Wiget David Blackburn John Stofell Gary Hayward Claire Harrison Achim Bohnet Doug Kingston Jacques Vidrine Carl Jacobsen Wayne Marquette Scott Schumate Michael Slifcak Srivathsan Srinivasagopalan Bill Fenner Jef Peeraer Daniel Hagerty Karl “Rat” Schilke and Electric Lightwave, Inc. Perl5 Porters Alex Burger

Apologies to any/all who’s patch/feature/request was not mentioned or included - most likely it was lost when paying work intruded on my fun. Please try again if you do not see a desired feature. This may actually turn out to be a decent package with such excellent help and the fact that I have more time to work on it than in the past.

AUTHOR

bugs, comments, questions to [email protected]

Copyright

Copyright (c) 1995-2000 G. S. Marzot. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Copyright (c) 2001-2002 Networks Associates Technology, Inc. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1873 - Linux cli command srand

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command srand and provides detailed information about the command srand, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the srand.

NAME 🖥️ srand 🖥️

pseudo-random number generator

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int rand(void);
void srand(unsigned int seed);
[[deprecated]] int rand_r(unsigned int *seedp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

rand_r():

    Since glibc 2.24:
        _POSIX_C_SOURCE >= 199506L
    glibc 2.23 and earlier
        _POSIX_C_SOURCE

DESCRIPTION

The rand() function returns a pseudo-random integer in the range 0 to RAND_MAX inclusive (i.e., the mathematical range [0, RAND_MAX]).

The srand() function sets its argument as the seed for a new sequence of pseudo-random integers to be returned by rand(). These sequences are repeatable by calling srand() with the same seed value.

If no seed value is provided, the rand() function is automatically seeded with a value of 1.

The function rand() is not reentrant, since it uses hidden state that is modified on each call. This might just be the seed value to be used by the next call, or it might be something more elaborate. In order to get reproducible behavior in a threaded application, this state must be made explicit; this can be done using the reentrant function rand_r().

Like rand(), rand_r() returns a pseudo-random integer in the range [0, RAND_MAX]. The seedp argument is a pointer to an unsigned int that is used to store state between calls. If rand_r() is called with the same initial value for the integer pointed to by seedp, and that value is not modified between calls, then the same pseudo-random sequence will result.

The value pointed to by the seedp argument of rand_r() provides only a very small amount of state, so this function will be a weak pseudo-random generator. Try drand48_r(3) instead.

RETURN VALUE

The rand() and rand_r() functions return a value between 0 and RAND_MAX (inclusive). The srand() function returns no value.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

rand(), rand_r(), srand()

Thread safetyMT-Safe

VERSIONS

The versions of rand() and srand() in the Linux C Library use the same random number generator as random(3) and srandom(3), so the lower-order bits should be as random as the higher-order bits. However, on older rand() implementations, and on current implementations on different systems, the lower-order bits are much less random than the higher-order bits. Do not use this function in applications intended to be portable when good randomness is needed. (Use random(3) instead.)

STANDARDS

rand()
srand()
C11, POSIX.1-2008.

rand_r()
POSIX.1-2008.

HISTORY

rand()
srand()
SVr4, 4.3BSD, C89, POSIX.1-2001.

rand_r()
POSIX.1-2001. Obsolete in POSIX.1-2008.

EXAMPLES

POSIX.1-2001 gives the following example of an implementation of rand() and srand(), possibly useful when one needs the same sequence on two different machines.

static unsigned long next = 1;
/* RAND_MAX assumed to be 32767 */
int myrand(void) {
    next = next * 1103515245 + 12345;
    return((unsigned)(next/65536) % 32768);
}
void mysrand(unsigned int seed) {
    next = seed;
}

The following program can be used to display the pseudo-random sequence produced by rand() when given a particular seed. When the seed is -1, the program uses a random seed.

#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
    int           r;
    unsigned int  seed, nloops;
    if (argc != 3) {
        fprintf(stderr, "Usage: %s <seed> <nloops>

“, argv[0]); exit(EXIT_FAILURE); } seed = atoi(argv[1]); nloops = atoi(argv[2]); if (seed == -1) { seed = arc4random(); printf(“seed: %u “, seed); } srand(seed); for (unsigned int j = 0; j < nloops; j++) { r = rand(); printf("%d “, r); } exit(EXIT_SUCCESS); }

SEE ALSO

drand48(3), random(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1874 - Linux cli command strtoumax

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strtoumax and provides detailed information about the command strtoumax, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strtoumax.

NAME 🖥️ strtoumax 🖥️

convert string to integer

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <inttypes.h>
intmax_t strtoimax(const char *restrict nptr, char **restrict endptr,
 int base);
uintmax_t strtoumax(const char *restrict nptr, char **restrict endptr,
 int base);

DESCRIPTION

These functions are just like strtol(3) and strtoul(3), except that they return a value of type intmax_t and uintmax_t, respectively.

RETURN VALUE

On success, the converted value is returned. If nothing was found to convert, zero is returned. On overflow or underflow INTMAX_MAX or INTMAX_MIN or UINTMAX_MAX is returned, and errno is set to ERANGE.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strtoimax(), strtoumax()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

imaxabs(3), imaxdiv(3), strtol(3), strtoul(3), wcstoimax(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1875 - Linux cli command X11_Protocol_Ext_XFree86_Miscpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command X11_Protocol_Ext_XFree86_Miscpm and provides detailed information about the command X11_Protocol_Ext_XFree86_Miscpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the X11_Protocol_Ext_XFree86_Miscpm.

NAME 🖥️ X11_Protocol_Ext_XFree86_Miscpm 🖥️

Perl module for the XFree86 Misc Extension

SYNOPSIS

use X11::Protocol; $x = X11::Protocol->new(); $x->init_extension(XFree86-Misc);

DESCRIPTION

This module is used to access miscellaneous features of XFree86 servers

SYMBOLIC CONSTANTS

This extension adds the MouseTypes, KeyboardTypes and MouseFlags constants, with values as defined in the XFree86 3.3.3 source code.

REQUESTS

This extension adds several requests, called as shown below:

$x->XF86MiscQueryVersion => ($major, $minor) $x->XF86MiscGetSaver($screen) => ($suspendtime, $offtime) $x->XF86MiscSetSaver($screen, $suspendtime, $offtime) $x->XF86MiscGetMouseSettings => (%settings) $x->XF86MiscSetMouseSettings(%settings) $x->XF86MiscGetKbdSettings => ($type, $rate, $delay, $servnumlock) $x->XF86MiscSetKbdSettings($type, $rate, $delay, $servnumlock)

AUTHOR

Jay Kominek <[email protected]>

SEE ALSO

perl (1), X11::Protocol

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1876 - Linux cli command zip_source_rollback_write

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_rollback_write and provides detailed information about the command zip_source_rollback_write, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_rollback_write.

libzip (-lzip)

The function

reverts changes written to

restoring the data before

was called. Usually this removes temporary files or frees buffers.

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1877 - Linux cli command logf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command logf and provides detailed information about the command logf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the logf.

NAME 🖥️ logf 🖥️

natural logarithmic function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double log(double x);
float logf(float x);
long double logl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

logf(), logl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the natural logarithm of x.

RETURN VALUE

On success, these functions return the natural logarithm of x.

If x is a NaN, a NaN is returned.

If x is 1, the result is +0.

If x is positive infinity, positive infinity is returned.

If x is zero, then a pole error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.

If x is negative (including negative infinity), then a domain error occurs, and a NaN (not a number) is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is negative
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

Pole error: x is zero
errno is set to ERANGE. A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

log(), logf(), logl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

BUGS

In glibc 2.5 and earlier, taking the log() of a NaN produces a bogus invalid floating-point (FE_INVALID) exception.

SEE ALSO

cbrt(3), clog(3), log10(3), log1p(3), log2(3), sqrt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1878 - Linux cli command strtod

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strtod and provides detailed information about the command strtod, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strtod.

NAME 🖥️ strtod 🖥️

convert ASCII string to floating-point number

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
double strtod(const char *restrict nptr, char **restrict endptr);
float strtof(const char *restrict nptr, char **restrict endptr);
long double strtold(const char *restrict nptr",char**restrict"endptr);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strtof(), strtold():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The strtod(), strtof(), and strtold() functions convert the initial portion of the string pointed to by nptr to double, float, and long double representation, respectively.

The expected form of the (initial portion of the) string is optional leading white space as recognized by isspace(3), an optional plus (’+’) or minus sign (’-’) and then either (i) a decimal number, or (ii) a hexadecimal number, or (iii) an infinity, or (iv) a NAN (not-a-number).

A decimal number consists of a nonempty sequence of decimal digits possibly containing a radix character (decimal point, locale-dependent, usually ‘.’), optionally followed by a decimal exponent. A decimal exponent consists of an ‘E’ or ’e’, followed by an optional plus or minus sign, followed by a nonempty sequence of decimal digits, and indicates multiplication by a power of 10.

A hexadecimal number consists of a “0x” or “0X” followed by a nonempty sequence of hexadecimal digits possibly containing a radix character, optionally followed by a binary exponent. A binary exponent consists of a ‘P’ or ‘p’, followed by an optional plus or minus sign, followed by a nonempty sequence of decimal digits, and indicates multiplication by a power of 2. At least one of radix character and binary exponent must be present.

An infinity is either “INF” or “INFINITY”, disregarding case.

A NAN is “NAN” (disregarding case) optionally followed by a string, (n-char-sequence), where n-char-sequence specifies in an implementation-dependent way the type of NAN (see NOTES).

RETURN VALUE

These functions return the converted value, if any.

If endptr is not NULL, a pointer to the character after the last character used in the conversion is stored in the location referenced by endptr.

If no conversion is performed, zero is returned and (unless endptr is null) the value of nptr is stored in the location referenced by endptr.

If the correct value would cause overflow, plus or minus HUGE_VAL, HUGE_VALF, or HUGE_VALL is returned (according to the return type and sign of the value), and ERANGE is stored in errno.

If the correct value would cause underflow, a value with magnitude no larger than DBL_MIN, FLT_MIN, or LDBL_MIN is returned and ERANGE is stored in errno.

ERRORS

ERANGE
Overflow or underflow occurred.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strtod(), strtof(), strtold()

Thread safetyMT-Safe locale

VERSIONS

In the glibc implementation, the n-char-sequence that optionally follows “NAN” is interpreted as an integer number (with an optional ‘0’ or ‘0x’ prefix to select base 8 or 16) that is to be placed in the mantissa component of the returned value.

STANDARDS

C11, POSIX.1-2008.

HISTORY

strtod()
C89, POSIX.1-2001.

strtof()
strtold()
C99, POSIX.1-2001.

NOTES

Since 0 can legitimately be returned on both success and failure, the calling program should set errno to 0 before the call, and then determine if an error occurred by checking whether errno has a nonzero value after the call.

EXAMPLES

See the example on the strtol(3) manual page; the use of the functions described in this manual page is similar.

SEE ALSO

atof(3), atoi(3), atol(3), nan(3), nanf(3), nanl(3), strfromd(3), strtol(3), strtoul(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1879 - Linux cli command XML_DOM_Documentpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_DOM_Documentpm and provides detailed information about the command XML_DOM_Documentpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_DOM_Documentpm.

NAME 🖥️ XML_DOM_Documentpm 🖥️

An XML document node in XML::DOM

DESCRIPTION

XML::DOM::Document extends XML::DOM::Node.

It is the main root of the XML document structure as returned by XML::DOM::Parser::parse and XML::DOM::Parser::parsefile.

Since elements, text nodes, comments, processing instructions, etc. cannot exist outside the context of a Document, the Document interface also contains the factory methods needed to create these objects. The Node objects created have a getOwnerDocument method which associates them with the Document within whose context they were created.

METHODS

getDocumentElement
This is a convenience method that allows direct access to the child node that is the root Element of the document.

getDoctype
The Document Type Declaration (see DocumentType) associated with this document. For HTML documents as well as XML documents without a document type declaration this returns undef. The DOM Level 1 does not support editing the Document Type Declaration. Not In DOM Spec: This implementation allows editing the doctype. See XML::DOM::ignoreReadOnly for details.

getImplementation
The DOMImplementation object that handles this document. A DOM application may use objects from multiple implementations.

createElement (tagName)
Creates an element of the type specified. Note that the instance returned implements the Element interface, so attributes can be specified directly on the returned object. DOMExceptions:

  • INVALID_CHARACTER_ERR Raised if the tagName does not conform to the XML spec.

createTextNode (data)
Creates a Text node given the specified string.

createComment (data)
Creates a Comment node given the specified string.

createCDATASection (data)
Creates a CDATASection node given the specified string.

createAttribute (name [, value [, specified ]])
Creates an Attr of the given name. Note that the Attr instance can then be set on an Element using the setAttribute method. Not In DOM Spec: The DOM Spec does not allow passing the value or the specified property in this method. In this implementation they are optional. Parameters: value The attribute’s value. See Attr::setValue for details. If the value is not supplied, the specified property is set to 0. specified Whether the attribute value was specified or whether the default value was used. If not supplied, it’s assumed to be 1. DOMExceptions:

  • INVALID_CHARACTER_ERR Raised if the name does not conform to the XML spec.

createProcessingInstruction (target, data)
Creates a ProcessingInstruction node given the specified name and data strings. Parameters: target The target part of the processing instruction. data The data for the node. DOMExceptions:

  • INVALID_CHARACTER_ERR Raised if the target does not conform to the XML spec.

createDocumentFragment
Creates an empty DocumentFragment object.

createEntityReference (name)
Creates an EntityReference object.

Additional methods not in the DOM Spec

getXMLDecl and setXMLDecl (xmlDecl)
Returns the XMLDecl for this Document or undef if none was specified. Note that XMLDecl is not part of the list of child nodes.

setDoctype (doctype)
Sets or replaces the DocumentType. NOTE: Don’t use appendChild or insertBefore to set the DocumentType. Even though doctype will be part of the list of child nodes, it is handled specially.

getDefaultAttrValue (elem, attr)
Returns the default attribute value as a string or undef, if none is available. Parameters: elem The element tagName. attr The attribute name.

getEntity (name)
Returns the Entity with the specified name.

createXMLDecl (version, encoding, standalone)
Creates an XMLDecl object. All parameters may be undefined.

createDocumentType (name, sysId, pubId)
Creates a DocumentType object. SysId and pubId may be undefined.

createNotation (name, base, sysId, pubId)
Creates a new Notation object. Consider using XML::DOM::DocumentType::addNotation!

createEntity (parameter, notationName, value, sysId, pubId, ndata)
Creates an Entity object. Consider using XML::DOM::DocumentType::addEntity!

createElementDecl (name, model)
Creates an ElementDecl object. DOMExceptions:

  • INVALID_CHARACTER_ERR Raised if the element name (tagName) does not conform to the XML spec.

createAttlistDecl (name)
Creates an AttlistDecl object. DOMExceptions:

  • INVALID_CHARACTER_ERR Raised if the element name (tagName) does not conform to the XML spec.

expandEntity (entity [, parameter])
Expands the specified entity or parameter entity (if parameter=1) and returns its value as a string, or undef if the entity does not exist. (The entity name should not contain the ‘%’, ‘&’ or ‘;’ delimiters.)

check ( [$checker] )
Uses the specified XML::Checker to validate the document. If no XML::Checker is supplied, a new XML::Checker is created. See XML::Checker for details.

check_sax ( [$checker] )
Similar to check() except it uses the SAX interface to XML::Checker instead of the expat interface. This method may disappear or replace check() at some time.

createChecker ()
Creates an XML::Checker based on the document’s DTD. The $checker can be reused to check any elements within the document. Create a new XML::Checker whenever the DOCTYPE section of the document is altered!

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1880 - Linux cli command XtResizeWidget

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtResizeWidget and provides detailed information about the command XtResizeWidget, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtResizeWidget.

NAME 🖥️ XtResizeWidget 🖥️

move and resize widgets

SYNTAX

#include <X11/Intrinsic.h>

void XtConfigureWidget(Widget w, Position x, Position y, Dimension width, Dimension height, Dimension border_width);

void XtMoveWidget(Widget w, Position x, Position y);

void XtResizeWidget(Widget w, Dimension width, Dimension height, Dimension border_width);

void XtResizeWindow(Widget w);

ARGUMENTS

width

height

border_width
Specify the new widget size.

  1. Specifies the widget.

  1. Specify the new widget x and y coordinates.

DESCRIPTION

The XtConfigureWidget function returns immediately if the specified geometry fields are the same as the old values. Otherwise, XtConfigureWidget writes the new x, y, width, height, and border_width values into the widget and, if the widget is realized, makes an Xlib XConfigureWindow call on the widget’s window.

If either the new width or height is different from its old value, XtConfigureWidget calls the widget’s resize procedure to notify it of the size change; otherwise, it simply returns.

The XtMoveWidget function returns immediately if the specified geometry fields are the same as the old values. Otherwise, XtMoveWidget writes the new x and y values into the widget and, if the widget is realized, issues an Xlib XMoveWindow call on the widget’s window.

The XtResizeWidget function returns immediately if the specified geometry fields are the same as the old values. Otherwise, XtResizeWidget writes the new width, height, and border_width values into the widget and, if the widget is realized, issues an XConfigureWindow call on the widget’s window.

If the new width or height are different from the old values, XtResizeWidget calls the widget’s resize procedure to notify it of the size change.

The XtResizeWindow function calls the XConfigureWindow Xlib function to make the window of the specified widget match its width, height, and border width. This request is done unconditionally because there is no way to tell if these values match the current values. Note that the widget’s resize procedure is not called.

There are very few times to use XtResizeWindow; instead, you should use XtResizeWidget.

SEE ALSO

XtMakeGeometryRequest(3), XtQueryGeometry(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1881 - Linux cli command Net_SSH2_PublicKeypm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_SSH2_PublicKeypm and provides detailed information about the command Net_SSH2_PublicKeypm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_SSH2_PublicKeypm.

NAME 🖥️ Net_SSH2_PublicKeypm 🖥️

SSH 2 public key object

DESCRIPTION

*** WARNING: public key functionality in libssh2 is experimental *** and mostly abandoned. Dont expect anything on this module to *** work correctly.

A public key object is created by the Net::SSH2 public_key method.

METHODS

add ( name, blob, overwrite flag, attributes… )

Adds a new public key; attributes is a list of hashes with name, value, and mandatory keys; mandatory defaults to false and value to empty.

remove ( name, blob )

Remove the given public key.

fetch

Returns a list of public keys in array context (count in scalar context); each item is a hash with keys name, blob, and attr, with the latter being a hash with name, value, and mandatory keys.

SEE ALSO

Net::SSH2.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1882 - Linux cli command XdbeSwapBuffers

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XdbeSwapBuffers and provides detailed information about the command XdbeSwapBuffers, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XdbeSwapBuffers.

NAME 🖥️ XdbeSwapBuffers 🖥️

swaps front and back DBE buffers.

SYNOPSIS

#include <X11/extensions/Xdbe.h>

Status XdbeSwapBuffers( Display *dpy, XdbeSwapInfo *swap_info, int num_windows)

DESCRIPTION

This function swaps the front and back buffers for a list of windows. The argument num_windows specifies how many windows are to have their buffers swapped; it is the number of elements in the swap_info array. The argument swap_info specifies the information needed per window to do the swap.

The XdbeSwapInfo structure has the following fields:

Window swap_window XdbeSwapAction swap_action

swap_window specifies the window for which to swap buffers. swap_action specifies the swap action to use for this swap_window.

swap_action determines what will happen to the new back buffer of the swap_window it is paired with in the list in addition to making the old back buffer become visible. The defined actions are as follows:

XdbeUndefined
The contents of the new back buffer become undefined. This may be the most efficient action since it allows the implementation to discard the contents of the buffer if it needs to.

XdbeBackground
The unobscured region of the new back buffer will be tiled with the window background. The background action allows devices to use a fast clear capability during a swap.

XdbeUntouched
The unobscured region of the new back buffer will be unmodified by the swap.

XdbeCopied
The unobscured region of the new back buffer will be the contents of the old back buffer

ERRORS

BadMatch
A non-double-buffered window was specified or a window was specified twice.

BadWindow
An invalid window was specified.

BadValue
An invalid swap action was specified.

SEE ALSO

DBE, XdbeAllocateBackBufferName(), XdbeBeginIdiom(), XdbeDeallocateBackBufferName(), XdbeEndIdiom(), XdbeFreeVisualInfo(), XdbeGetBackBufferAttributes(), XdbeGetVisualInfo(), XdbeQueryExtension().

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1883 - Linux cli command log

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command log and provides detailed information about the command log, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the log.

NAME 🖥️ log 🖥️

natural logarithmic function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double log(double x);
float logf(float x);
long double logl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

logf(), logl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the natural logarithm of x.

RETURN VALUE

On success, these functions return the natural logarithm of x.

If x is a NaN, a NaN is returned.

If x is 1, the result is +0.

If x is positive infinity, positive infinity is returned.

If x is zero, then a pole error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.

If x is negative (including negative infinity), then a domain error occurs, and a NaN (not a number) is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is negative
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

Pole error: x is zero
errno is set to ERANGE. A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

log(), logf(), logl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

BUGS

In glibc 2.5 and earlier, taking the log() of a NaN produces a bogus invalid floating-point (FE_INVALID) exception.

SEE ALSO

cbrt(3), clog(3), log10(3), log1p(3), log2(3), sqrt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1884 - Linux cli command Moose_Cookbook_Basics_Genome_OverloadingSubtypesAndCoercionpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Basics_Genome_OverloadingSubtypesAndCoercionpm and provides detailed information about the command Moose_Cookbook_Basics_Genome_OverloadingSubtypesAndCoercionpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Basics_Genome_OverloadingSubtypesAndCoercionpm.

NAME 🖥️ Moose_Cookbook_Basics_Genome_OverloadingSubtypesAndCoercionpm 🖥️

Operator overloading, subtypes, and coercion

VERSION

version 2.2207

SYNOPSIS

package Human; use Moose; use Moose::Util::TypeConstraints; subtype Sex => as Str => where { $_ =~ m{^[mf]$}s }; has sex => ( is => ro, isa => Sex, required => 1 ); has mother => ( is => ro, isa => Human ); has father => ( is => ro, isa => Human ); use overload + => \_overload_add, fallback => 1; sub _overload_add { my ( $one, $two ) = @_; die(Only male and female humans may create children) if ( $one->sex() eq $two->sex() ); my ( $mother, $father ) = ( $one->sex eq f ? ( $one, $two ) : ( $two, $one ) ); my $sex = f; $sex = m if ( rand() >= 0.5 ); return Human->new( sex => $sex, mother => $mother, father => $father, ); }

DESCRIPTION

This Moose cookbook recipe shows how operator overloading, coercion, and subtypes can be used to mimic the human reproductive system (well, the selection of genes at least).

INTRODUCTION

Our Human class uses operator overloading to allow us to “add” two humans together and produce a child. Our implementation does require that the two objects be of opposite sex. Remember, we’re talking about biological reproduction, not marriage.

While this example works as-is, we can take it a lot further by adding genes into the mix. We’ll add the two genes that control eye color, and use overloading to combine the genes from the parent to model the biology.

What is Operator Overloading?

Overloading is not a Moose-specific feature. It’s a general OO concept that is implemented in Perl with the overload pragma. Overloading lets objects do something sane when used with Perl’s built in operators, like addition (+) or when used as a string.

In this example we overload addition so we can write code like $child = $mother + $father.

GENES

There are many genes which affect eye color, but there are two which are most important, gey and bey2. We will start by making a class for each gene.

Human::Gene::bey2

package Human::Gene::bey2; use Moose; use Moose::Util::TypeConstraints; type bey2_color => where { $_ =~ m{^(?:brown|blue)$} }; has color => ( is => ro, isa => bey2_color );

This class is trivial. We have a type constraint for the allowed colors, and a color attribute.

Human::Gene::gey

package Human::Gene::gey; use Moose; use Moose::Util::TypeConstraints; type gey_color => where { $_ =~ m{^(?:green|blue)$} }; has color => ( is => ro, isa => gey_color );

This is nearly identical to the Humane::Gene::bey2 class, except that the gey gene allows for different colors.

EYE COLOR

We could just give four attributes (two of each gene) to the Human class, but this is a bit messy. Instead, we’ll abstract the genes into a container class, Human::EyeColor. Then a Human can have a single eye_color attribute.

package Human::EyeColor; use Moose; use Moose::Util::TypeConstraints; coerce Human::Gene::bey2 => from Str => via { Human::Gene::bey2->new( color => $_ ) }; coerce Human::Gene::gey => from Str => via { Human::Gene::gey->new( color => $_ ) }; has [qw( bey2_1 bey2_2 )] => ( is => ro, isa => Human::Gene::bey2, coerce => 1 ); has [qw( gey_1 gey_2 )] => ( is => ro, isa => Human::Gene::gey, coerce => 1 );

The eye color class has two of each type of gene. We’ve also created a coercion for each class that coerces a string into a new object. Note that a coercion will fail if it attempts to coerce a string like “indigo”, because that is not a valid color for either type of gene.

As an aside, you can see that we can define several identical attributes at once by supplying an array reference of names as the first argument to has.

We also need a method to calculate the actual eye color that results from a set of genes. The bey2 brown gene is dominant over both blue and green. The gey green gene is dominant over blue.

sub color { my ($self) = @_; return brown if ( $self->bey2_1->color() eq brown or $self->bey2_2->color() eq brown ); return green if ( $self->gey_1->color() eq green or $self->gey_2->color() eq green ); return blue; }

We’d like to be able to treat a Human::EyeColor object as a string, so we define a string overloading for the class:

use overload "" => \color, fallback => 1;

Finally, we need to define overloading for addition. That way we can add together two Human::EyeColor objects and get a new one with a new (genetically correct) eye color.

use overload + => \_overload_add, fallback => 1; sub _overload_add { my ( $one, $two ) = @_; my $one_bey2 = bey2_ . _rand2(); my $two_bey2 = bey2_ . _rand2(); my $one_gey = gey_ . _rand2(); my $two_gey = gey_ . _rand2(); return Human::EyeColor->new( bey2_1 => $one->$one_bey2->color(), bey2_2 => $two->$two_bey2->color(), gey_1 => $one->$one_gey->color(), gey_2 => $two->$two_gey->color(), ); } sub _rand2 { return 1 + int( rand(2) ); }

When two eye color objects are added together, the _overload_add() method will be passed two Human::EyeColor objects. These are the left and right side operands for the + operator. This method returns a new Human::EyeColor object.

ADDING EYE COLOR TO “Human"s

Our original Human class requires just a few changes to incorporate our new Human::EyeColor class.

use List::Util 1.56 qw( mesh ); coerce Human::EyeColor => from ArrayRef => via { my @genes = qw( bey2_1 bey2_2 gey_1 gey_2 ); return Human::EyeColor->new( mesh ( \genes, $_ ) ); }; has eye_color => ( is => ro, isa => Human::EyeColor, coerce => 1, required => 1, );

We also need to modify _overload_add() in the Human class to account for eye color:

return Human->new( sex => $sex, eye_color => ( $one->eye_color() + $two->eye_color() ), mother => $mother, father => $father, );

CONCLUSION

The three techniques we used, overloading, subtypes, and coercion, combine to provide a powerful interface.

If you’d like to learn more about overloading, please read the documentation for the overload pragma.

To see all the code we created together, take a look at t/recipes/basics_genome_overloadingsubtypesandcoercion.t.

NEXT STEPS

Had this been a real project we’d probably want:

Better Randomization with Crypt::Random

Characteristic Base Class

Mutating Genes

More Characteristics

Artificial Life

AUTHORS

COPYRIGHT AND LICENSE

This work is licensed under a Creative Commons Attribution 3.0 Unported License.

License details are at: <http://creativecommons.org/licenses/by/3.0/>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1885 - Linux cli command TAILQ_INSERT_TAIL

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command TAILQ_INSERT_TAIL and provides detailed information about the command TAILQ_INSERT_TAIL, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the TAILQ_INSERT_TAIL.

NAME 🖥️ TAILQ_INSERT_TAIL 🖥️

implementation of a doubly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
TAILQ_ENTRY(TYPE);
TAILQ_HEAD(HEADNAME, TYPE);
TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD head);
void TAILQ_INIT(TAILQ_HEAD *head);
int TAILQ_EMPTY(TAILQ_HEAD *head);
void TAILQ_INSERT_HEAD(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_TAIL(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_AFTER(TAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_FIRST(TAILQ_HEAD *head);
struct TYPE *TAILQ_LAST(TAILQ_HEAD *head, HEADNAME);
struct TYPE *TAILQ_PREV(struct TYPE *elm, HEADNAME, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_NEXT(struct TYPE *elm, TAILQ_ENTRY NAME);
TAILQ_FOREACH(struct TYPE *var, TAILQ_HEAD *head,
 TAILQ_ENTRY NAME);
TAILQ_FOREACH_REVERSE(struct TYPE *var, TAILQ_HEAD *head, HEADNAME,
 TAILQ_ENTRY NAME);
void TAILQ_REMOVE(TAILQ_HEAD *head, struct TYPE *elm,
 TAILQ_ENTRY NAME);
void TAILQ_CONCAT(TAILQ_HEAD *head1, TAILQ_HEAD *head2,
 TAILQ_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked tail queues.

In the macro definitions, TYPE is the name of a user defined structure, that must contain a field of type TAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user defined structure that must be declared using the macro TAILQ_HEAD().

Creation

A tail queue is headed by a structure defined by the TAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the queue and the other to the last element in the queue. The elements are doubly linked so that an arbitrary element can be removed without traversing the queue. New elements can be added to the queue after an existing element, before an existing element, at the head of the queue, or at the end of the queue. A TAILQ_HEAD structure is declared as follows:

TAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the queue. A pointer to the head of the queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

TAILQ_ENTRY() declares a structure that connects the elements in the queue.

TAILQ_HEAD_INITIALIZER() evaluates to an initializer for the queue head.

TAILQ_INIT() initializes the queue referenced by

TAILQ_EMPTY() evaluates to true if there are no items on the queue. head.

Insertion

TAILQ_INSERT_HEAD() inserts the new element elm at the head of the queue.

TAILQ_INSERT_TAIL() inserts the new element elm at the end of the queue.

TAILQ_INSERT_BEFORE() inserts the new element elm before the element listelm.

TAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

TAILQ_FIRST() returns the first item on the queue, or NULL if the queue is empty.

TAILQ_LAST() returns the last item on the queue. If the queue is empty the return value is NULL.

TAILQ_PREV() returns the previous item on the queue, or NULL if this item is the first.

TAILQ_NEXT() returns the next item on the queue, or NULL if this item is the last.

TAILQ_FOREACH() traverses the queue referenced by head in the forward direction, assigning each element in turn to var. var is set to NULL if the loop completes normally, or if there were no elements.

TAILQ_FOREACH_REVERSE() traverses the queue referenced by head in the reverse direction, assigning each element in turn to var.

Removal

TAILQ_REMOVE() removes the element elm from the queue.

Other features

TAILQ_CONCAT() concatenates the queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

TAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

TAILQ_FIRST(), TAILQ_LAST(), TAILQ_PREV(), and TAILQ_NEXT() return a pointer to the first, last, previous, or next TYPE structure, respectively.

TAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

STANDARDS

BSD.

HISTORY

4.4BSD.

CAVEATS

TAILQ_FOREACH() and TAILQ_FOREACH_REVERSE() don’t allow var to be removed or freed within the loop, as it would interfere with the traversal. TAILQ_FOREACH_SAFE() and TAILQ_FOREACH_REVERSE_SAFE(), which are present on the BSDs but are not present in glibc, fix this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    TAILQ_ENTRY(entry) entries;             /* Tail queue */
};
TAILQ_HEAD(tailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct tailhead head;                   /* Tail queue head */
    int i;
    TAILQ_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    TAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    TAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    TAILQ_INSERT_AFTER(&head, n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    TAILQ_INSERT_BEFORE(n2, n3, entries);
    TAILQ_REMOVE(&head, n2, entries);       /* Deletion */
    free(n2);
                                            /* Forward traversal */
    i = 0;
    TAILQ_FOREACH(np, &head, entries)
        np->data = i++;
                                            /* Reverse traversal */
    TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = TAILQ_FIRST(&head); while (n1 != NULL) { n2 = TAILQ_NEXT(n1, entries); free(n1); n1 = n2; } TAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1886 - Linux cli command pcap_set_snaplenpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_set_snaplenpcap and provides detailed information about the command pcap_set_snaplenpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_set_snaplenpcap.

NAME 🖥️ pcap_set_snaplenpcap 🖥️

set the snapshot length for a not-yet-activated capture handle

SYNOPSIS

#include <pcap/pcap.h>
int pcap_set_snaplen(pcap_t *p, int snaplen);

DESCRIPTION

pcap_set_snaplen() sets the snapshot length to be used on a capture handle when the handle is activated to snaplen.

RETURN VALUE

pcap_set_snaplen() returns 0 on success or PCAP_ERROR_ACTIVATED if called on a capture handle that has been activated.

SEE ALSO

pcap(3PCAP), pcap_create(3PCAP), pcap_activate(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1887 - Linux cli command readdiram

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command readdiram and provides detailed information about the command readdiram, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the readdiram.

NAME 🖥️ readdiram 🖥️

directory input parser for gawk

SYNOPSIS

@load “readdir”

DESCRIPTION

The readdir extension adds an input parser for directories.

When this extension is in use, instead of skipping directories named on the command line (or with getline), they are read, with each entry returned as a record.

The record consists of three fields. The first two are the inode number and the filename, separated by a forward slash character. On systems where the directory entry contains the file type, the record has a third field which is a single letter indicating the type of the file: f for file, d for directory, b for a block device, c for a character device, p for a FIFO, l for a symbolic link, s for a socket.

On systems without the file type information, the extension falls back to calling stat(2), in order to provide the information. Thus the third field should never be u.

By default, if a directory cannot be opened (due to permission problems, for example), gawk will exit. As with regular files, this situation can be handled using a BEGINFILE rule that checks ERRNO and prints an error or otherwise handles the problem.

EXAMPLE

@load "readdir"
...
BEGIN { FS = "/" }
{ print "file name is", $2 }

SEE ALSO

GAWK: Effective AWK Programming, filefuncs(3am), fnmatch(3am), fork(3am), inplace(3am), ordchr(3am), readfile(3am), revoutput(3am), rwarray(3am), time(3am).

opendir(3), readdir(3), stat(2).

AUTHOR

Arnold Robbins, [email protected].

COPYING PERMISSIONS

Copyright © 2012, 2013, 2018, 2019 Free Software Foundation, Inc.

Permission is granted to make and distribute verbatim copies of this manual page provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to process this file through troff and print the results, provided the printed document carries copying permission notice identical to this one except for the removal of this paragraph (this paragraph not being relevant to the printed manual page).

Permission is granted to copy and distribute modified versions of this manual page under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual page into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1888 - Linux cli command frexp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command frexp and provides detailed information about the command frexp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the frexp.

NAME 🖥️ frexp 🖥️

convert floating-point number to fractional and integral components

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double frexp(double x, int *exp);
float frexpf(float x, int *exp);
long double frexpl(long double x, int *exp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

frexpf(), frexpl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions are used to split the number x into a normalized fraction and an exponent which is stored in exp.

RETURN VALUE

These functions return the normalized fraction. If the argument x is not zero, the normalized fraction is x times a power of two, and its absolute value is always in the range 1/2 (inclusive) to 1 (exclusive), that is, [0.5,1).

If x is zero, then the normalized fraction is zero and zero is stored in exp.

If x is a NaN, a NaN is returned, and the value of *exp is unspecified.

If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned, and the value of *exp is unspecified.

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

frexp(), frexpf(), frexpl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

EXAMPLES

The program below produces results such as the following:

$ ./a.out 2560
frexp(2560, &e) = 0.625: 0.625 * 2^12 = 2560
$ ./a.out -4
frexp(-4, &e) = -0.5: -0.5 * 2^3 = -4

Program source

#include <float.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
    double x, r;
    int exp;
    x = strtod(argv[1], NULL);
    r = frexp(x, &exp);
    printf("frexp(%g, &e) = %g: %g * %d^%d = %g

“, x, r, r, 2, exp, x); exit(EXIT_SUCCESS); }

SEE ALSO

ldexp(3), modf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1889 - Linux cli command statvfs

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command statvfs and provides detailed information about the command statvfs, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the statvfs.

NAME 🖥️ statvfs 🖥️

get filesystem statistics

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/statvfs.h>
int statvfs(const char *restrict path",structstatvfs*restrict"buf);
int fstatvfs(int fd, struct statvfs *buf);

DESCRIPTION

The function statvfs() returns information about a mounted filesystem. path is the pathname of any file within the mounted filesystem. buf is a pointer to a statvfs structure defined approximately as follows:

struct statvfs {
    unsigned long  f_bsize;    /* Filesystem block size */
    unsigned long  f_frsize;   /* Fragment size */
    fsblkcnt_t     f_blocks;   /* Size of fs in f_frsize units */
    fsblkcnt_t     f_bfree;    /* Number of free blocks */
    fsblkcnt_t     f_bavail;   /* Number of free blocks for
                                  unprivileged users */
    fsfilcnt_t     f_files;    /* Number of inodes */
    fsfilcnt_t     f_ffree;    /* Number of free inodes */
    fsfilcnt_t     f_favail;   /* Number of free inodes for
                                  unprivileged users */
    unsigned long  f_fsid;     /* Filesystem ID */
    unsigned long  f_flag;     /* Mount flags */
    unsigned long  f_namemax;  /* Maximum filename length */
};

Here the types fsblkcnt_t and fsfilcnt_t are defined in <sys/types.h>. Both used to be unsigned long.

The field f_flag is a bit mask indicating various options that were employed when mounting this filesystem. It contains zero or more of the following flags:

ST_MANDLOCK
Mandatory locking is permitted on the filesystem (see fcntl(2)).

ST_NOATIME
Do not update access times; see mount(2).

ST_NODEV
Disallow access to device special files on this filesystem.

ST_NODIRATIME
Do not update directory access times; see mount(2).

ST_NOEXEC
Execution of programs is disallowed on this filesystem.

ST_NOSUID
The set-user-ID and set-group-ID bits are ignored by exec(3) for executable files on this filesystem

ST_RDONLY
This filesystem is mounted read-only.

ST_RELATIME
Update atime relative to mtime/ctime; see mount(2).

ST_SYNCHRONOUS
Writes are synched to the filesystem immediately (see the description of O_SYNC in open(2)).

It is unspecified whether all members of the returned struct have meaningful values on all filesystems.

fstatvfs() returns the same information about an open file referenced by descriptor fd.

RETURN VALUE

On success, zero is returned. On error, -1 is returned, and errno is set to indicate the error.

ERRORS

EACCES
(statvfs()) Search permission is denied for a component of the path prefix of path. (See also path_resolution(7).)

EBADF
(fstatvfs()) fd is not a valid open file descriptor.

EFAULT
Buf or path points to an invalid address.

EINTR
This call was interrupted by a signal; see signal(7).

EIO
An I/O error occurred while reading from the filesystem.

ELOOP
(statvfs()) Too many symbolic links were encountered in translating path.

ENAMETOOLONG
(statvfs()) path is too long.

ENOENT
(statvfs()) The file referred to by path does not exist.

ENOMEM
Insufficient kernel memory was available.

ENOSYS
The filesystem does not support this call.

ENOTDIR
(statvfs()) A component of the path prefix of path is not a directory.

EOVERFLOW
Some values were too large to be represented in the returned struct.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

statvfs(), fstatvfs()

Thread safetyMT-Safe

VERSIONS

Only the ST_NOSUID and ST_RDONLY flags of the f_flag field are specified in POSIX.1. To obtain definitions of the remaining flags, one must define _GNU_SOURCE.

NOTES

The Linux kernel has system calls statfs(2) and fstatfs(2) to support this library call.

The glibc implementations of

pathconf(path, _PC_REC_XFER_ALIGN);
pathconf(path, _PC_ALLOC_SIZE_MIN);
pathconf(path, _PC_REC_MIN_XFER_SIZE);

respectively use the f_frsize, f_frsize, and f_bsize fields returned by a call to statvfs() with the argument path.

Under Linux, f_favail is always the same as f_ffree, and there’s no way for a filesystem to report otherwise. This is not an issue, since no filesystems with an inode root reservation exist.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

Before glibc 2.13, statvfs() populated the bits of the f_flag field by scanning the mount options shown in /proc/mounts. However, starting with Linux 2.6.36, the underlying statfs(2) system call provides the necessary information via the f_flags field, and since glibc 2.13, the statvfs() function will use information from that field rather than scanning /proc/mounts.

SEE ALSO

statfs(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1890 - Linux cli command wmemset

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wmemset and provides detailed information about the command wmemset, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wmemset.

NAME 🖥️ wmemset 🖥️

fill an array of wide-characters with a constant wide character

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
wchar_t *wmemset(wchar_t wcs[.n], wchar_t wc, size_t n);

DESCRIPTION

The wmemset() function is the wide-character equivalent of the memset(3) function. It fills the array of n wide-characters starting at wcs with n copies of the wide character wc.

RETURN VALUE

wmemset() returns wcs.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wmemset()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

memset(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1891 - Linux cli command IO_All_Socketpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_All_Socketpm and provides detailed information about the command IO_All_Socketpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_All_Socketpm.

NAME 🖥️ IO_All_Socketpm 🖥️

Socket Support for IO::All

SYNOPSIS

See IO::All.

DESCRIPTION

<<<cpan-foot>>>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1892 - Linux cli command siggetmask

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command siggetmask and provides detailed information about the command siggetmask, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the siggetmask.

NAME 🖥️ siggetmask 🖥️

BSD signal API

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
[[deprecated]] int sigvec(int sig, const struct sigvec *vec,
 struct sigvec *ovec);
[[deprecated]] int sigmask(int signum);
[[deprecated]] int sigblock(int mask);
[[deprecated]] int sigsetmask(int mask);
[[deprecated]] int siggetmask(void);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

These functions are provided in glibc as a compatibility interface for programs that make use of the historical BSD signal API. This API is obsolete: new applications should use the POSIX signal API (sigaction(2), sigprocmask(2), etc.).

The sigvec() function sets and/or gets the disposition of the signal sig (like the POSIX sigaction(2)). If vec is not NULL, it points to a sigvec structure that defines the new disposition for sig. If ovec is not NULL, it points to a sigvec structure that is used to return the previous disposition of sig. To obtain the current disposition of sig without changing it, specify NULL for vec, and a non-null pointer for ovec.

The dispositions for SIGKILL and SIGSTOP cannot be changed.

The sigvec structure has the following form:

struct sigvec {
    void (*sv_handler)(int); /* Signal disposition */
    int    sv_mask;          /* Signals to be blocked in handler */
    int    sv_flags;         /* Flags */
};

The sv_handler field specifies the disposition of the signal, and is either: the address of a signal handler function; SIG_DFL, meaning the default disposition applies for the signal; or SIG_IGN, meaning that the signal is ignored.

If sv_handler specifies the address of a signal handler, then sv_mask specifies a mask of signals that are to be blocked while the handler is executing. In addition, the signal for which the handler is invoked is also blocked. Attempts to block SIGKILL or SIGSTOP are silently ignored.

If sv_handler specifies the address of a signal handler, then the sv_flags field specifies flags controlling what happens when the handler is called. This field may contain zero or more of the following flags:

SV_INTERRUPT
If the signal handler interrupts a blocking system call, then upon return from the handler the system call is not restarted: instead it fails with the error EINTR. If this flag is not specified, then system calls are restarted by default.

SV_RESETHAND
Reset the disposition of the signal to the default before calling the signal handler. If this flag is not specified, then the handler remains established until explicitly removed by a later call to sigvec() or until the process performs an execve(2).

SV_ONSTACK
Handle the signal on the alternate signal stack (historically established under BSD using the obsolete sigstack() function; the POSIX replacement is sigaltstack(2)).

The sigmask() macro constructs and returns a “signal mask” for signum. For example, we can initialize the vec.sv_mask field given to sigvec() using code such as the following:

vec.sv_mask = sigmask(SIGQUIT) | sigmask(SIGABRT);
            /* Block SIGQUIT and SIGABRT during
               handler execution */

The sigblock() function adds the signals in mask to the process’s signal mask (like POSIX sigprocmask(SIG_BLOCK)), and returns the process’s previous signal mask. Attempts to block SIGKILL or SIGSTOP are silently ignored.

The sigsetmask() function sets the process’s signal mask to the value given in mask (like POSIX sigprocmask(SIG_SETMASK)), and returns the process’s previous signal mask.

The siggetmask() function returns the process’s current signal mask. This call is equivalent to sigblock(0).

RETURN VALUE

The sigvec() function returns 0 on success; on error, it returns -1 and sets errno to indicate the error.

The sigblock() and sigsetmask() functions return the previous signal mask.

The sigmask() macro returns the signal mask for signum.

ERRORS

See the ERRORS under sigaction(2) and sigprocmask(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sigvec(), sigmask(), sigblock(), sigsetmask(), siggetmask()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

sigvec()
sigblock()
sigmask()
sigsetmask()
4.3BSD.

siggetmask()
Unclear origin.

sigvec()
Removed in glibc 2.21.

NOTES

On 4.3BSD, the signal() function provided reliable semantics (as when calling sigvec() with vec.sv_mask equal to 0). On System V, signal() provides unreliable semantics. POSIX.1 leaves these aspects of signal() unspecified. See signal(2) for further details.

In order to wait for a signal, BSD and System V both provided a function named sigpause(3), but this function has a different argument on the two systems. See sigpause(3) for details.

SEE ALSO

kill(2), pause(2), sigaction(2), signal(2), sigprocmask(2), raise(3), sigpause(3), sigset(3), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1893 - Linux cli command ungetc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ungetc and provides detailed information about the command ungetc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ungetc.

NAME 🖥️ ungetc 🖥️

input of characters and strings

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int fgetc(FILE *stream);
int getc(FILE *stream);
int getchar(void);
char *fgets(char s[restrict .size], int size, FILE *restrict stream);
int ungetc(int c, FILE *stream);

DESCRIPTION

fgetc() reads the next character from stream and returns it as an unsigned char cast to an int, or EOF on end of file or error.

getc() is equivalent to fgetc() except that it may be implemented as a macro which evaluates stream more than once.

getchar() is equivalent to getc(stdin).

fgets() reads in at most one less than size characters from stream and stores them into the buffer pointed to by s. Reading stops after an EOF or a newline. If a newline is read, it is stored into the buffer. A terminating null byte (‘�’) is stored after the last character in the buffer.

ungetc() pushes c back to stream, cast to unsigned char, where it is available for subsequent read operations. Pushed-back characters will be returned in reverse order; only one pushback is guaranteed.

Calls to the functions described here can be mixed with each other and with calls to other input functions from the stdio library for the same input stream.

For nonlocking counterparts, see unlocked_stdio(3).

RETURN VALUE

fgetc(), getc(), and getchar() return the character read as an unsigned char cast to an int or EOF on end of file or error.

fgets() returns s on success, and NULL on error or when end of file occurs while no characters have been read.

ungetc() returns c on success, or EOF on error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fgetc(), fgets(), getc(), getchar(), ungetc()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89.

NOTES

It is not advisable to mix calls to input functions from the stdio library with low-level calls to read(2) for the file descriptor associated with the input stream; the results will be undefined and very probably not what you want.

SEE ALSO

read(2), write(2), ferror(3), fgetwc(3), fgetws(3), fopen(3), fread(3), fseek(3), getline(3), gets(3), getwchar(3), puts(3), scanf(3), ungetwc(3), unlocked_stdio(3), feature_test_macros(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1894 - Linux cli command XtIsObject

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtIsObject and provides detailed information about the command XtIsObject, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtIsObject.

NAME 🖥️ XtIsObject 🖥️

obtain and verify a widget’s class

SYNTAX

#include <X11/Intrinsic.h>

WidgetClass XtClass(Widget w);

WidgetClass XtSuperclass(Widget w);

Boolean XtIsSubclass(Widget w, WidgetClass widget_class);

void XtCheckSubclass(Widget widget, WidgetClass widget_class, String message);

Boolean XtIsObject(Widget w);

Boolean XtIsRectObj(Widget w);

Boolean XtIsWidget(Widget w);

Boolean XtIsComposite(Widget w);

Boolean XtIsConstraint(Widget w);

Boolean XtIsShell(Widget w);

Boolean XtIsOverrideShell(Widget w);

Boolean XtIsWMShell(Widget w);

Boolean XtIsVendorShell(Widget w);

Boolean XtIsTransientShell(Widget w);

Boolean XtIsTopLevelShell(Widget w);

Boolean XtIsApplicationShell(Widget w);

Boolean XtIsSessionShell(Widget w);

ARGUMENTS

  1. Specifies the widget.

widget_class
Specifies the widget class.

message
Specifies the message that is to be used.

DESCRIPTION

The XtClass function returns a pointer to the widget’s class structure.

The XtSuperclass function returns a pointer to the widget’s superclass class structure.

The XtIsSubclass function returns True if the class of the specified widget is equal to or is a subclass of the specified class. The widget’s class can be any number of subclasses down the chain and need not be an immediate subclass of the specified class. Composite widgets that need to restrict the class of the items they contain can use XtIsSubclass to find out if a widget belongs to the desired class of objects.

The XtCheckSubclass macro determines if the class of the specified widget is equal to or is a subclass of the specified widget class. The widget can be any number of subclasses down the chain and need not be an immediate subclass of the specified widget class. If the specified widget is not a subclass, XtCheckSubclass constructs an error message from the supplied message, the widget’s actual class, and the expected class and calls XtErrorMsg. XtCheckSubclass should be used at the entry point of exported routines to ensure that the client has passed in a valid widget class for the exported operation.

XtCheckSubclass is only executed when the widget has been compiled with the compiler symbol DEBUG defined; otherwise, it is defined as the empty string and generates no code.

To test if a given widget belongs to a subclass of an Intrinsics-defined class, the Intrinsics defines macros or functions equivalent to XtIsSubclass for each of the built-in classes. These procedures are XtIsObject, XtIsRectObj, XtIsWidget, XtIsComposite, XtIsConstraint, XtIsShell, XtIsOverrideShell, XtIsWMShell, XtIsVendorShell, XtIsTransientShell, XtIsTopLevelShell, XtIsApplicationShell, and XtIsSessionShell.

The

SEE ALSO

XtAppErrorMsg(3), XtDisplay(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1895 - Linux cli command zip_add_dir

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_add_dir and provides detailed information about the command zip_add_dir, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_add_dir.

libzip (-lzip)

The function

is the obsolete version of

It is the same as calling

with an empty flags argument.

was added in libzip 0.8. In libzip 0.10 the return type was changed from

to

It was deprecated in libzip 0.11, use

instead.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1896 - Linux cli command XtDirectConvert

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtDirectConvert and provides detailed information about the command XtDirectConvert, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtDirectConvert.

NAME 🖥️ XtDirectConvert 🖥️

invoke resource converters

SYNTAX

#include <X11/Intrinsic.h>

void XtConvert(Widget w, const char *from_type, XrmValuePtr from, const char *to_type, XrmValuePtr to_return);

void XtDirectConvert(XtConverter converter, XrmValuePtr args, Cardinal num_args, XrmValuePtr from, XrmValuePtr to_return);

ARGUMENTS

args
Specifies the argument list that contains the additional arguments needed to perform the conversion (often NULL).

converter
Specifies the conversion procedure that is to be called.

from
Specifies the value to be converted.

from_type
Specifies the source type.

num_args
Specifies the number of additional arguments (often zero).

to_type
Specifies the destination type.

to_return
Returns the converted value.

  1. Specifies the widget to use for additional arguments (if any are needed).

DESCRIPTION

The XtConvert function looks up the type converter registered to convert from_type to to_type, computes any additional arguments needed, and then calls XtDirectConvert. XtConvert has been replaced by XtConvertAndStore.

The XtDirectConvert function looks in the converter cache to see if this conversion procedure has been called with the specified arguments. If so, it returns a descriptor for information stored in the cache; otherwise, it calls the converter and enters the result in the cache.

Before calling the specified converter, XtDirectConvert sets the return value size to zero and the return value address to NULL. To determine if the conversion was successful, the client should check to_return.address for non-NULL. XtDirectConvert has been replaced by XtCallConverter.

SEE ALSO

XtAppAddConverter(3), XtStringConversionWarning(3), XtConvertAndStore(3), XtCallConverter(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1897 - Linux cli command Moose_Cookbook_Extending_ExtensionOverviewpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Extending_ExtensionOverviewpm and provides detailed information about the command Moose_Cookbook_Extending_ExtensionOverviewpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Extending_ExtensionOverviewpm.

NAME 🖥️ Moose_Cookbook_Extending_ExtensionOverviewpm 🖥️

Moose extension overview

VERSION

version 2.2207

DESCRIPTION

Moose provides several ways in which extensions can hook into Moose and change its behavior. Moose also has a lot of behavior that can be changed. This recipe will provide an overview of each extension method and give you some recommendations on what tools to use.

If you haven’t yet read the recipes on metaclasses, go read those first. You can’t write Moose extensions without understanding the metaclasses, and those recipes also demonstrate some basic extension mechanisms, such as metaclass subclasses and traits.

Playing Nice With Others

One of the goals of this overview is to help you build extensions that cooperate well with other extensions. This is especially important if you plan to release your extension to CPAN.

Moose comes with several modules that exist to help your write cooperative extensions. These are Moose::Exporter and Moose::Util::MetaRole. By using these two modules, you will ensure that your extension works with both the Moose core features and any other CPAN extension using those modules.

PARTS OF Moose YOU CAN EXTEND

The types of things you might want to do in Moose extensions fall into a few broad categories.

Metaclass Extensions

One way of extending Moose is by extending one or more Moose metaclasses. For example, in Moose::Cookbook::Meta::Table_MetaclassTrait we saw a metaclass role that added a table attribute to the metaclass. If you were writing an ORM, this would be a logical extension.

Many of the Moose extensions on CPAN work by providing an attribute metaclass role. For example, the MooseX::Aliases module provides an attribute metaclass trait that lets you specify aliases to install for methods and attribute accessors.

A metaclass extension can be packaged as a role/trait or a subclass. If you can, we recommend using traits instead of subclasses, since it’s much easier to combine disparate traits than it is to combine a bunch of subclasses.

When your extensions are implemented as roles, you can apply them with the Moose::Util::MetaRole module.

Providing Sugar Functions

As part of a metaclass extension, you may also want to provide some sugar functions, just like Moose.pm does. Moose provides a helper module called Moose::Exporter that makes this much simpler. We will be use Moose::Exporter in several of the extension recipes.

Object Class Extensions

Another common Moose extension technique is to change the default object class’s behavior. As with metaclass extensions, this can be done with a role/trait or with a subclass. For example, MooseX::StrictConstructor extension applies a trait that makes the constructor reject arguments which don’t match its attributes.

Object class extensions often include metaclass extensions as well. In particular, if you want your object extension to work when a class is made immutable, you may need to modify the behavior of some or all of the Moose::Meta::Instance, Moose::Meta::Method::Constructor, and Moose::Meta::Method::Destructor objects.

The Moose::Util::MetaRole module lets you apply roles to the base object class, as well as the meta classes just mentioned.

Providing a Role

Some extensions come in the form of a role for you to consume. The MooseX::Object::Pluggable extension is a great example of this. In fact, despite the MooseX name, it does not actually change anything about Moose’s behavior. Instead, it is just a role that an object which wants to be pluggable can consume.

If you are implementing this sort of extension, you don’t need to do anything special. You simply create a role and document that it should be used via the normal with sugar:

package MyApp::User; use Moose; with My::Role;

Don’t use “MooseX” in the name for such packages.

New Types

Another common Moose extension is a new type for the Moose type system. In this case, you simply create a type in your module. When people load your module, the type is created, and they can refer to it by name after that. The MooseX::Types::URI and MooseX::Types::DateTime distributions are two good examples of how this works. These both build on top of the MooseX::Types extension.

ROLES VS TRAITS VS SUBCLASSES

It is important to understand that roles and traits are the same thing. A trait is simply a role applied to a instance. The only thing that may distinguish the two is that a trait can be packaged in a way that lets Moose resolve a short name to a class name. In other words, with a trait, the caller can refer to it by a short name like “Big”, and Moose will resolve it to a class like MooseX::Embiggen::Meta::Attribute::Role::Big.

See Moose::Cookbook::Meta::Labeled_AttributeTrait and Moose::Cookbook::Meta::Table_MetaclassTrait for examples of traits in action. In particular, both of these recipes demonstrate the trait resolution mechanism.

Implementing an extension as a (set of) metaclass or base object role(s) will make your extension more cooperative. It is hard for an end-user to effectively combine together multiple metaclass subclasses, but it is very easy to combine roles.

USING YOUR EXTENSION

There are a number of ways in which an extension can be applied. In some cases you can provide multiple ways of consuming your extension.

Extensions as Metaclass Traits

If your extension is available as a trait, you can ask end users to simply specify it in a list of traits. Currently, this only works for (class) metaclass and attribute metaclass traits:

use Moose -traits => [ Big, Blue ]; has animal => ( traits => [ Big, Blue ], … );

If your extension applies to any other metaclass, or the object base class, you cannot use the trait mechanism.

The benefit of the trait mechanism is that is very easy to see where a trait is applied in the code, and consumers have fine-grained control over what the trait applies to. This is especially true for attribute traits, where you can apply the trait to just one attribute in a class.

Extensions as Metaclass (and Base Object) Roles

Implementing your extensions as metaclass roles makes your extensions easy to apply, and cooperative with other role-based extensions for metaclasses.

Just as with a subclass, you will probably want to package your extensions for consumption with a single module that uses Moose::Exporter. However, in this case, you will use Moose::Util::MetaRole to apply all of your roles. The advantage of using this module is that it preserves any subclassing or roles already applied to the user’s metaclasses. This means that your extension is cooperative by default, and consumers of your extension can easily use it with other role-based extensions. Most uses of Moose::Util::MetaRole can be handled by Moose::Exporter directly; see the Moose::Exporter docs.

package MooseX::Embiggen; use Moose::Exporter; use MooseX::Embiggen::Role::Meta::Class; use MooseX::Embiggen::Role::Meta::Attribute; use MooseX::Embiggen::Role::Meta::Method::Constructor; use MooseX::Embiggen::Role::Object; Moose::Exporter->setup_import_methods( class_metaroles => { class => [MooseX::Embiggen::Role::Meta::Class], attribute => [MooseX::Embiggen::Role::Meta::Attribute], constructor => [MooseX::Embiggen::Role::Meta::Method::Constructor], }, base_class_roles => [MooseX::Embiggen::Role::Object], );

As you can see from this example, you can use Moose::Util::MetaRole to apply roles to any metaclass, as well as the base object class. If some other extension has already applied its own roles, they will be preserved when your extension applies its roles, and vice versa.

Providing Sugar

With Moose::Exporter, you can also export your own sugar functions:

package MooseX::Embiggen; use Moose::Exporter; Moose::Exporter->setup_import_methods( with_meta => [embiggen], class_metaroles => { class => [MooseX::Embiggen::Role::Meta::Class], }, ); sub embiggen { my $meta = shift; $meta->embiggen(@_); }

And then the consumer of your extension can use your embiggen sub:

package Consumer; use Moose; use MooseX::Embiggen; extends Thing; embiggen …;

This can be combined with metaclass and base class roles quite easily.

More advanced extensions

Providing your extension simply as a set of traits that gets applied to the appropriate metaobjects is easy, but sometimes not sufficient. For instance, sometimes you need to supply not just a base object role, but an actual base object class (due to needing to interact with existing systems that only provide a base class). To write extensions like this, you will need to provide a custom init_meta method in your exporter. For instance:

package MooseX::Embiggen; use Moose::Exporter; my ($import, $unimport, $init_meta) = Moose::Exporter->build_import_methods( install => [import, unimport], with_meta => [embiggen], class_metaroles => { class => [MooseX::Embiggen::Role::Meta::Class], }, ); sub embiggen { my $meta = shift; $meta->embiggen(@_); } sub init_meta { my $package = shift; my %options = @_; if (my $meta = Class::MOP::class_of($options{for_class})) { if ($meta->isa(Class::MOP::Class)) { my @supers = $meta->superclasses; $meta->superclasses(MooseX::Embiggen::Base::Class) if @supers == 1 && $supers[0] eq Moose::Object; } } $package->$init_meta(%options); }

In the previous examples, init_meta was generated for you, but here you must override it in order to add additional functionality. Some differences to note:

“build_import_methods” instead of “setup_import_methods”
build_import_methods simply returns the import, unimport, and init_meta methods, rather than installing them under the appropriate names. This way, you can write your own methods which wrap the functionality provided by Moose::Exporter. The build_import_methods sub also takes an additional install parameter, which tells it to just go ahead and install these methods (since we don’t need to modify them).

“sub init_meta”
Next, we must write our init_meta wrapper. The important things to remember are that it is called as a method, and that %options needs to be passed through to the existing implementation. We call the base implementation by using the $init_meta subroutine reference that was returned by build_import_methods earlier.

Additional implementation
This extension sets a different default base object class. To do so, it first checks to see if it’s being applied to a class, and then checks to see if Moose::Object is that class’s only superclass, and if so, replaces that with the superclass that this extension requires. Note that two extensions that do this same thing will not work together properly (the second extension to be loaded won’t see Moose::Object as the base object, since it has already been overridden). This is why using a base object role is recommended for the general case. This init_meta also works defensively, by only applying its functionality if a metaclass already exists. This makes sure it doesn’t break with legacy extensions which override the metaclass directly (and so must be the first extension to initialize the metaclass). This is likely not necessary, since almost no extensions work this way anymore, but just provides an additional level of protection. The common case of use Moose; use MooseX::Embiggen; is not affected regardless.

This is just one example of what can be done with a custom init_meta method. It can also be used for preventing an extension from being applied to a role, doing other kinds of validation on the class being applied to, or pretty much anything that would otherwise be done in an import method.

LEGACY EXTENSION MECHANISMS

Before the existence of Moose::Exporter and Moose::Util::MetaRole, there were a number of other ways to extend Moose. In general, these methods were less cooperative, and only worked well with a single extension.

These methods include metaclass.pm, Moose::Policy (which uses metaclass.pm under the hood), and various hacks to do what Moose::Exporter does. Please do not use these for your own extensions.

Note that if you write a cooperative extension, it should cooperate with older extensions, though older extensions generally do not cooperate with each other.

CONCLUSION

If you can write your extension as one or more metaclass and base object roles, please consider doing so. Make sure to read the docs for Moose::Exporter and Moose::Util::MetaRole as well.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1898 - Linux cli command Test_Moosepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Test_Moosepm and provides detailed information about the command Test_Moosepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Test_Moosepm.

NAME 🖥️ Test_Moosepm 🖥️

Test functions for Moose specific features

VERSION

version 2.2207

SYNOPSIS

use Test::More plan => 1; use Test::Moose; meta_ok($class_or_obj, “… Foo has a ->meta”); does_ok($class_or_obj, $role, “… Foo does the Baz role”); has_attribute_ok($class_or_obj, $attr_name, “… Foo has the bar attribute”);

DESCRIPTION

This module provides some useful test functions for Moose based classes. It is an experimental first release, so comments and suggestions are very welcome.

EXPORTED FUNCTIONS

meta_ok ($class_or_object)

Tests if a class or object has a metaclass.

does_ok ($class_or_object, $role, ?$message)

Tests if a class or object does a certain role, similar to what isa_ok does for the isa method.

has_attribute_ok($class_or_object, $attr_name, ?$message)

Tests if a class or object has a certain attribute, similar to what can_ok does for the methods.

with_immutable { CODE } @class_names

Runs CODE (which should contain normal tests) twice, and make each class in @class_names immutable in between the two runs.

The CODE block is called with a single boolean argument indicating whether or not the classes have been made immutable yet.

TODO

Convert the Moose test suite to use this module.

Here is a list of possible functions to write

immutability predicates

anon-class predicates

discovering original method from modified method

attribute metaclass predicates (attribute_isa?)

SEE ALSO

Test::More

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1899 - Linux cli command zip_file_set_comment

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_file_set_comment and provides detailed information about the command zip_file_set_comment, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_file_set_comment.

libzip (-lzip)

The

function sets the comment for the file at position

in the zip archive to

of length

If

is

and

is 0, the file comment will be removed. The

argument can be any of:

Guess encoding of

(default).

Interpret

as UTF-8.

Interpret

as code page 437 (CP-437).

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

fails if:

is not a valid file index in

or

is less than 0 or longer than the maximum comment length in a zip file (65535), or

is not a valid UTF-8 encoded string.

Required memory could not be allocated.

The

was opened in read-only mode.

was added in libzip 0.11.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1900 - Linux cli command PA_FLAG_LONGconst

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command PA_FLAG_LONGconst and provides detailed information about the command PA_FLAG_LONGconst, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the PA_FLAG_LONGconst.

NAME 🖥️ PA_FLAG_LONGconst 🖥️

define custom behavior for printf-like functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <printf.h>
int register_printf_specifier(int spec, printf_function func,
 printf_arginfo_size_function arginfo);
int register_printf_modifier(const wchar_t *str);
int register_printf_type(printf_va_arg_function fct);

Callbacks

typedef int printf_function(FILE *stream, const struct printf_info *info,
 const void *const args[]);
typedef int printf_arginfo_size_function(const struct printf_info *info,
 size_t n, int argtypes[n], int size[n]);
typedef void printf_va_arg_function(void *mem, va_list *ap);

Types

struct printf_info {
 int prec; // Precision
 int width; // Width
 wchar_t spec; // Format letter
 unsigned int is_long_double:1;// L or ll flag
 unsigned int is_short:1; // h flag
 unsigned int is_long:1; // l flag
 unsigned int alt:1; // # flag
 unsigned int space:1; // Space flag
 unsigned int left:1; // - flag
 unsigned int showsign:1; // + flag
 unsigned int group:1; // ' flag
 unsigned int extra:1; // For special use
 unsigned int is_char:1; // hh flag
 unsigned int wide:1; // True for wide character streams
 unsigned int i18n:1; // I flag
 unsigned int is_binary128:1; /* Floating-point argument is
  ABI-compatible with
  IEC 60559 binary128 */
 unsigned short user; // Bits for user-installed modifiers
 wchar_t pad; // Padding character
};

Constants

#define PA_FLAG_LONG_LONG /* ... */
#define PA_FLAG_LONG_DOUBLE /* ... */
#define PA_FLAG_LONG /* ... */
#define PA_FLAG_SHORT /* ... */
#define PA_FLAG_PTR /* ... */

DESCRIPTION

These functions serve to extend and/or modify the behavior of the printf(3) family of functions.

register_printf_specifier()

This function registers a custom conversion specifier for the printf(3) family of functions.

spec
The character which will be used as a conversion specifier in the format string.

func
Callback function that will be executed by the printf(3) family of functions to format the input arguments into the output stream.

stream
Output stream where the formatted output should be printed. This stream transparently represents the output, even in the case of functions that write to a string.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in arginfo.

args
Array of pointers to the arguments to the printf(3) -like function.

arginfo
Callback function that will be executed by the printf(3) family of functions to know how many arguments should be parsed for the custom specifier and also their types.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in func.

n
Number of arguments remaining to be parsed.

argtypes
This array should be set to define the type of each of the arguments that will be parsed. Each element in the array represents one of the arguments to be parsed, in the same order that they are passed to the printf(3) -like function. Each element should be set to a base type (PA_*) from the enum above, or a custom one, and optionally ORed with an appropriate length modifier (PA_FLAG_*).

The type is determined by using one of the following constants:

PA_INT
int.

PA_CHAR
int, cast to char.

PA_WCHAR
wchar_t.

PA_STRING
const char *, a ‘�’-terminated string.

PA_WSTRING
const wchar_t *, a wide character L’�’-terminated string.

PA_POINTER
void *.

PA_FLOAT
float.

PA_DOUBLE
double.

PA_LAST
TODO.

size
For user-defined types, the size of the type (in bytes) should also be specified through this array. Otherwise, leave it unused.

arginfo is called before func, and prepares some information needed to call func.

register_printf_modifier()

TODO

register_printf_type()

TODO

RETURN VALUE

register_printf_specifier(), register_printf_modifier(), and register_printf_type() return zero on success, or -1 on error.

Callbacks

The callback of type printf_function should return the number of characters written, or -1 on error.

The callback of type printf_arginfo_size_function should return the number of arguments to be parsed by this specifier. It also passes information about the type of those arguments to the caller through argtypes. On error, it should return -1.

ERRORS

EINVAL
The specifier was not a valid character.

STANDARDS

GNU.

HISTORY

register_printf_function(3) is an older function similar to register_printf_specifier(), and is now deprecated. That function can’t handle user-defined types.

register_printf_specifier() supersedes register_printf_function(3).

EXAMPLES

The following example program registers the ‘b’ and ‘B’ specifiers to print integers in binary format, mirroring rules for other unsigned conversion specifiers like ‘x’ and ‘u’. This can be used to print in binary prior to C23.

/* This code is in the public domain */
#include <err.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <printf.h>
#define GROUP_SEP  '\''
struct Printf_Pad {
    char    ch;
    size_t  len;
};
static int b_printf(FILE *stream, const struct printf_info *info,
                    const void *const args[]);
static int b_arginf_sz(const struct printf_info *info,
                    size_t n, int argtypes[n], int size[n]);
static uintmax_t b_value(const struct printf_info *info,
                    const void *arg);
static size_t b_bin_repr(char bin[UINTMAX_WIDTH],
                    const struct printf_info *info, const void *arg);
static size_t b_bin_len(const struct printf_info *info,
                    ptrdiff_t min_len);
static size_t b_pad_len(const struct printf_info *info,
                    ptrdiff_t bin_len);
static ssize_t b_print_prefix(FILE *stream,
                    const struct printf_info *info);
static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info,
                    ptrdiff_t min_len);
static ssize_t b_print_number(FILE *stream,
                    const struct printf_info *info,
                    const char bin[UINTMAX_WIDTH],
                    size_t min_len, size_t bin_len);
static char pad_ch(const struct printf_info *info);
static ssize_t pad_spaces(FILE *stream, size_t pad_len);
int
main(void)
{
    if (register_printf_specifier('b', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('b', ...)");
    if (register_printf_specifier('B', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('B', ...)");
    printf("....----....----....----....----

“); printf("%llb; “, 0x5Ellu); printf("%lB; “, 0x5Elu); printf("%b; “, 0x5Eu); printf("%hB; “, 0x5Eu); printf("%hhb; “, 0x5Eu); printf("%jb; “, (uintmax_t)0x5E); printf("%zb; “, (size_t)0x5E); printf(”….—-….—-….—-….—- “); printf(”%#b; “, 0x5Eu); printf(”%#B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf("%10b; “, 0x5Eu); printf("%010b; “, 0x5Eu); printf(”%.10b; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%-10B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%‘B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”….—-….—-….—-….—- “); printf(”%#16.12b; “, 0xAB); printf(”%-#‘20.12b; “, 0xAB); printf(”%#‘020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#020B; “, 0xAB); printf(”%‘020B; “, 0xAB); printf("%020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#021B; “, 0xAB); printf(”%‘021B; “, 0xAB); printf("%021B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#022B; “, 0xAB); printf(”%‘022B; “, 0xAB); printf("%022B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#023B; “, 0xAB); printf(”%‘023B; “, 0xAB); printf("%023B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%-#‘19.11b; “, 0xAB); printf(”%#‘019B; “, 0xAB); printf(”%#019B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%‘019B; “, 0xAB); printf("%019B; “, 0xAB); printf(”%#016b; “, 0xAB); printf(”….—-….—-….—-….—- “); return 0; } static int b_printf(FILE *stream, const struct printf_info *info, const void const args[]) { char bin[UINTMAX_WIDTH]; size_t min_len, bin_len; ssize_t len, tmp; struct Printf_Pad pad = {0}; len = 0; min_len = b_bin_repr(bin, info, args[0]); bin_len = b_bin_len(info, min_len); pad.ch = pad_ch(info); if (pad.ch == ’ ‘) pad.len = b_pad_len(info, bin_len); / Padding with ’ ’ (right aligned) / if ((pad.ch == ’ ‘) && !info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } / “0b”/“0B” prefix / if (info->alt) { tmp = b_print_prefix(stream, info); if (tmp == EOF) return EOF; len += tmp; } / Padding with ‘0’ / if (pad.ch == ‘0’) { tmp = b_pad_zeros(stream, info, min_len); if (tmp == EOF) return EOF; len += tmp; } / Print number (including leading 0s to fill precision) / tmp = b_print_number(stream, info, bin, min_len, bin_len); if (tmp == EOF) return EOF; len += tmp; / Padding with ’ ’ (left aligned) */ if (info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } return len; } static int b_arginf_sz(const struct printf_info *info, size_t n, int argtypes[n], [[maybe_unused]] int size[n]) { if (n < 1) return -1; if (info->is_long_double) argtypes[0] = PA_INT | PA_FLAG_LONG_LONG; else if (info->is_long) argtypes[0] = PA_INT | PA_FLAG_LONG; else argtypes[0] = PA_INT; return 1; } static uintmax_t b_value(const struct printf_info *info, const void *arg) { if (info->is_long_double) return *(const unsigned long long *)arg; if (info->is_long) return *(const unsigned long )arg; / short and char are both promoted to int */ return *(const unsigned int *)arg; } static size_t b_bin_repr(char bin[UINTMAX_WIDTH], const struct printf_info *info, const void *arg) { size_t min_len; uintmax_t val; val = b_value(info, arg); bin[0] = ‘0’; for (min_len = 0; val; min_len++) { bin[min_len] = ‘0’ + (val % 2); val »= 1; } return MAX(min_len, 1); } static size_t b_bin_len(const struct printf_info *info, ptrdiff_t min_len) { return MAX(info->prec, min_len); } static size_t b_pad_len(const struct printf_info *info, ptrdiff_t bin_len) { ptrdiff_t pad_len; pad_len = info->width - bin_len; if (info->alt) pad_len -= 2; if (info->group) pad_len -= (bin_len - 1) / 4; return MAX(pad_len, 0); } static ssize_t b_print_prefix(FILE *stream, const struct printf_info *info) { ssize_t len; len = 0; if (fputc(‘0’, stream) == EOF) return EOF; len++; if (fputc(info->spec, stream) == EOF) return EOF; len++; return len; } static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info, ptrdiff_t min_len) { ssize_t len; ptrdiff_t tmp; len = 0; tmp = info->width - (info->alt * 2); if (info->group) tmp -= tmp / 5 - !(tmp % 5); for (ptrdiff_t i = tmp - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static ssize_t b_print_number(FILE *stream, const struct printf_info info, const char bin[UINTMAX_WIDTH], size_t min_len, size_t bin_len) { ssize_t len; len = 0; / Print leading zeros to fill precision / for (size_t i = bin_len - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } / Print number */ for (size_t i = min_len - 1; i < min_len; i–) { if (fputc(bin[i], stream) == EOF) return EOF; len++; if (!info->group || (i % 4) || !i) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static char pad_ch(const struct printf_info *info) { if ((info->prec != -1) || (info->pad == ’ ‘) || info->left) return ’ ‘; return ‘0’; } static ssize_t pad_spaces(FILE *stream, size_t pad_len) { ssize_t len; len = 0; for (size_t i = pad_len - 1; i < pad_len; i–) { if (fputc(’ ‘, stream) == EOF) return EOF; len++; } return len; }

SEE ALSO

asprintf(3), printf(3), wprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1901 - Linux cli command putwchar_unlocked

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command putwchar_unlocked and provides detailed information about the command putwchar_unlocked, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the putwchar_unlocked.

NAME 🖥️ putwchar_unlocked 🖥️

nonlocking stdio functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int getc_unlocked(FILE *stream);
int getchar_unlocked(void);
int putc_unlocked(int c, FILE *stream);
int putchar_unlocked(int c);
void clearerr_unlocked(FILE *stream);
int feof_unlocked(FILE *stream);
int ferror_unlocked(FILE *stream);
int fileno_unlocked(FILE *stream);
int fflush_unlocked(FILE *_Nullable stream);
int fgetc_unlocked(FILE *stream);
int fputc_unlocked(int c, FILE *stream);
size_t fread_unlocked(void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
size_t fwrite_unlocked(const void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
char *fgets_unlocked(char s[restrict .n], int n",FILE*restrict"stream);
int fputs_unlocked(const char *restrict s, FILE *restrict stream);
#include <wchar.h>
wint_t getwc_unlocked(FILE *stream);
wint_t getwchar_unlocked(void);
wint_t fgetwc_unlocked(FILE *stream);
wint_t fputwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwchar_unlocked(wchar_t wc);
wchar_t *fgetws_unlocked(wchar_t ws[restrict .n], int n,
 FILE *restrict stream);
int fputws_unlocked(const wchar_t *restrict ws,
 FILE *restrict stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getc_unlocked(), getchar_unlocked(), putc_unlocked(), putchar_unlocked():

    /* glibc >= 2.24: */ _POSIX_C_SOURCE >= 199309L
        || /* glibc <= 2.23: */ _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

clearerr_unlocked(), feof_unlocked(), ferror_unlocked(), fileno_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), getwchar_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwchar_unlocked(), fgetws_unlocked(), fputws_unlocked():

    _GNU_SOURCE

DESCRIPTION

Each of these functions has the same behavior as its counterpart without the “_unlocked” suffix, except that they do not use locking (they do not set locks themselves, and do not test for the presence of locks set by others) and hence are thread-unsafe. See flockfile(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getc_unlocked(), putc_unlocked(), clearerr_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked(), fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwc_unlocked(), fgetws_unlocked(), fputws_unlocked()

Thread safety

MT-Safe race:stream

getchar_unlocked(), getwchar_unlocked()

Thread safety

MT-Unsafe race:stdin

putchar_unlocked(), putwchar_unlocked()

Thread safety

MT-Unsafe race:stdout

feof_unlocked(), ferror_unlocked(), fileno_unlocked()

Thread safetyMT-Safe

STANDARDS

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2008.

Others:
None.

HISTORY

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2001.

SEE ALSO

flockfile(3), stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1902 - Linux cli command zip_fopen_index

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_fopen_index and provides detailed information about the command zip_fopen_index, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_fopen_index.

libzip (-lzip)

The

function opens the file name

in

The

argument specifies how the name lookup should be done, according to the values are described in

Also, the following values may be

to it.

Read the compressed data. Otherwise the data is uncompressed by

Read the original data from the zip archive, ignoring any changes made to the file.

The

function opens the file at position

If encrypted data is encountered, the functions call

or

respectively, using the default password set with

Upon successful completion, a

pointer is returned. Otherwise,

is returned and the error code in

is set to indicate the error.

The file data has been changed.

The compression method used is not supported.

The encryption method used is not supported.

Required memory could not be allocated.

The file is encrypted, but no password has been provided.

A file read error occurred.

A file seek error occurred.

The provided password does not match the password used for encryption. Note that some incorrect passwords are not detected by the check done by

Initializing the zlib stream failed.

The function

may also fail and set

for any of the errors specified for the routine

The function

may also fail with

if

is invalid.

and

were added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1903 - Linux cli command xdr_callmsg

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_callmsg and provides detailed information about the command xdr_callmsg, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_callmsg.

NAME 🖥️ xdr_callmsg 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1904 - Linux cli command Image_ExifTool_QuickTimepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_QuickTimepm and provides detailed information about the command Image_ExifTool_QuickTimepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_QuickTimepm.

NAME 🖥️ Image_ExifTool_QuickTimepm 🖥️

Read QuickTime and MP4 meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to extract information from QuickTime and MP4 video, M4A audio, and HEIC image files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://developer.apple.com/mac/library/documentation/QuickTime/QTFF/QTFFChap1/qtff1.html>

<http://search.cpan.org/dist/MP4-Info-1.04/>

<http://www.geocities.com/xhelmboyx/quicktime/formats/mp4-layout.txt>

<http://wiki.multimedia.cx/index.php?title=Apple_QuickTime>

<http://atomicparsley.sourceforge.net/mpeg-4files.html>

<http://wiki.multimedia.cx/index.php?title=QuickTime_container>

<http://code.google.com/p/mp4v2/wiki/iTunesMetadata>

<http://www.canieti.com.mx/assets/files/1011/IEC_100_1384_DC.pdf>

<http://www.adobe.com/devnet/flv/pdf/video_file_format_spec_v10.pdf>

SEE ALSO

“QuickTime Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1905 - Linux cli command Tk_Reindexpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Reindexpm and provides detailed information about the command Tk_Reindexpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Reindexpm.

NAME 🖥️ Tk_Reindexpm 🖥️

change the base index of Text-like widgets

SYNOPSIS

use Tk::ReindexedText; $t1=$w->ReindexedText(-linestart => 2); use Tk::ReindexedROText; $t2=$w->ReindexedROText(-linestart => 0);

DESCRIPTION

Creates a new widget class based on Text-like widgets that can redefine the line number base (normally Text widgets start line numbers at 1), or possibly other manipulations on indexes.

STANDARD OPTIONS

The newly-defined widget takes all the same options as the base widget, which defaults to Text.

WIDGET-SPECIFIC OPTIONS

Name: lineStart

Class: LineStart

Switch: -linestart

Sets the line number of the first line in the Text widget. The default -toindexcmd and -fromindexcmd use this configuration option. -item Name: toIndexCmd fromIndexCmd -item Class: ToIndexCmd FromIndexCmd -item Switch: -toindexcmd -fromindexcmd These two options specify callbacks that are called with a list of indexes and are responsible for translating them to/from indexes that the base Text widget can understand. The callback is passed the widget followed by a list of indexes, and should return a list of translated indexes. -toindexcmd should translate from ‘user’ indexes to ’native’ Text-compatible indexes, and -fromindexcmd should translate from ’native’ indexes to ‘user’ indexes. The default callbacks simply add/subtract the offset given by the -linestart option for all indexes in ’line.character’ format. It would probably be prudent to make these functions inverses of each other.

CLASS METHODS

import
To make new Reindex widgets, this function should be called via use with the name of the Text-like base class that you are extending with “Reindex” capability. ‘use base(Tk::Reindex Tk::nameofbasewidget)’ should also be specified for that widget.

BUGS

I’ve used the word “indexes” instead of “indices” throughout the documentation.

All the built-in perl code for widget bindings & methods will use the new ‘user’ indexes. Which means all this index manipulation might might break code that is trying to parse/manipulate indexes. Or even assume that ‘1.0’ is the beginning index. Tk::Text::Contents comes to mind.

AUTHOR

Andrew Allen <[email protected]>

This code may be distributed under the same conditions as Perl.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1906 - Linux cli command xdr_short

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_short and provides detailed information about the command xdr_short, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_short.

NAME 🖥️ xdr_short 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1907 - Linux cli command syslog

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command syslog and provides detailed information about the command syslog, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the syslog.

NAME 🖥️ syslog 🖥️

send messages to the system logger

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <syslog.h>
void openlog(const char *ident, int option, int facility);
void syslog(int priority, const char *format, ...);
void closelog(void);
void vsyslog(int priority, const char *format, va_list ap);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

vsyslog():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

openlog()

openlog() opens a connection to the system logger for a program.

The string pointed to by ident is prepended to every message, and is typically set to the program name. If ident is NULL, the program name is used. (POSIX.1-2008 does not specify the behavior when ident is NULL.)

The option argument specifies flags which control the operation of openlog() and subsequent calls to syslog(). The facility argument establishes a default to be used if none is specified in subsequent calls to syslog(). The values that may be specified for option and facility are described below.

The use of openlog() is optional; it will automatically be called by syslog() if necessary, in which case ident will default to NULL.

syslog() and vsyslog()

syslog() generates a log message, which will be distributed by syslogd(8).

The priority argument is formed by ORing together a facility value and a level value (described below). If no facility value is ORed into priority, then the default value set by openlog() is used, or, if there was no preceding openlog() call, a default of LOG_USER is employed.

The remaining arguments are a format, as in printf(3), and any arguments required by the format, except that the two-character sequence %m will be replaced by the error message string strerror(errno). The format string need not include a terminating newline character.

The function vsyslog() performs the same task as syslog() with the difference that it takes a set of arguments which have been obtained using the stdarg(3) variable argument list macros.

closelog()

closelog() closes the file descriptor being used to write to the system logger. The use of closelog() is optional.

Values for option

The option argument to openlog() is a bit mask constructed by ORing together any of the following values:

LOG_CONS
Write directly to the system console if there is an error while sending to the system logger.

LOG_NDELAY
Open the connection immediately (normally, the connection is opened when the first message is logged). This may be useful, for example, if a subsequent chroot(2) would make the pathname used internally by the logging facility unreachable.

LOG_NOWAIT
Don’t wait for child processes that may have been created while logging the message. (The GNU C library does not create a child process, so this option has no effect on Linux.)

LOG_ODELAY
The converse of LOG_NDELAY; opening of the connection is delayed until syslog() is called. (This is the default, and need not be specified.)

LOG_PERROR
(Not in POSIX.1-2001 or POSIX.1-2008.) Also log the message to stderr.

LOG_PID
Include the caller’s PID with each message.

Values for facility

The facility argument is used to specify what type of program is logging the message. This lets the configuration file specify that messages from different facilities will be handled differently.

LOG_AUTH
security/authorization messages

LOG_AUTHPRIV
security/authorization messages (private)

LOG_CRON
clock daemon (cron and at)

LOG_DAEMON
system daemons without separate facility value

LOG_FTP
ftp daemon

LOG_KERN
kernel messages (these can’t be generated from user processes)

LOG_LOCAL0 through LOG_LOCAL7
reserved for local use

LOG_LPR
line printer subsystem

LOG_MAIL
mail subsystem

LOG_NEWS
USENET news subsystem

LOG_SYSLOG
messages generated internally by syslogd(8)

LOG_USER (default)
generic user-level messages

LOG_UUCP
UUCP subsystem

Values for level

This determines the importance of the message. The levels are, in order of decreasing importance:

LOG_EMERG
system is unusable

LOG_ALERT
action must be taken immediately

LOG_CRIT
critical conditions

LOG_ERR
error conditions

LOG_WARNING
warning conditions

LOG_NOTICE
normal, but significant, condition

LOG_INFO
informational message

LOG_DEBUG
debug-level message

The function setlogmask(3) can be used to restrict logging to specified levels only.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

openlog(), closelog()

Thread safetyMT-Safe

syslog(), vsyslog()

Thread safetyMT-Safe env locale

STANDARDS

syslog()
openlog()
closelog()
POSIX.1-2008.

vsyslog()
None.

HISTORY

syslog()
4.2BSD, SUSv2, POSIX.1-2001.

openlog()
closelog()
4.3BSD, SUSv2, POSIX.1-2001.

vsyslog()
4.3BSD-Reno.

POSIX.1-2001 specifies only the LOG_USER and LOG_LOCAL* values for facility. However, with the exception of LOG_AUTHPRIV and LOG_FTP, the other facility values appear on most UNIX systems.

The LOG_PERROR value for option is not specified by POSIX.1-2001 or POSIX.1-2008, but is available in most versions of UNIX.

NOTES

The argument ident in the call of openlog() is probably stored as-is. Thus, if the string it points to is changed, syslog() may start prepending the changed string, and if the string it points to ceases to exist, the results are undefined. Most portable is to use a string constant.

Never pass a string with user-supplied data as a format, use the following instead:

syslog(priority, "%s", string);

SEE ALSO

journalctl(1), logger(1), setlogmask(3), syslog.conf(5), syslogd(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1908 - Linux cli command fputws

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fputws and provides detailed information about the command fputws, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fputws.

NAME 🖥️ fputws 🖥️

write a wide-character string to a FILE stream

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
int fputws(const wchar_t *restrict ws, FILE *restrict stream);

DESCRIPTION

The fputws() function is the wide-character equivalent of the fputs(3) function. It writes the wide-character string starting at ws, up to but not including the terminating null wide character (L’�’), to stream.

For a nonlocking counterpart, see unlocked_stdio(3).

RETURN VALUE

The fputws() function returns a nonnegative integer if the operation was successful, or -1 to indicate an error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fputws()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of fputws() depends on the LC_CTYPE category of the current locale.

In the absence of additional information passed to the fopen(3) call, it is reasonable to expect that fputws() will actually write the multibyte string corresponding to the wide-character string ws.

SEE ALSO

fputwc(3), unlocked_stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1909 - Linux cli command Net_DBus_Binding_Message_Errorpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Binding_Message_Errorpm and provides detailed information about the command Net_DBus_Binding_Message_Errorpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Binding_Message_Errorpm.

NAME 🖥️ Net_DBus_Binding_Message_Errorpm 🖥️

a message encoding a method call error

SYNOPSIS

use Net::DBus::Binding::Message::Error; my $error = Net::DBus::Binding::Message::Error->new( replyto => $method_call, name => “org.example.myobject.FooException”, description => “Unable to do Foo when updating bar”); $connection->send($error);

DESCRIPTION

This module is part of the low-level DBus binding APIs, and should not be used by application code. No guarantees are made about APIs under the Net::DBus::Binding:: namespace being stable across releases.

This module provides a convenience constructor for creating a message representing an error condition.

METHODS

my $error = Net::DBus::Binding::Message::Error->new( replyto => $method_call, name => $name, description => $description);
Creates a new message, representing an error which occurred during the handling of the method call object passed in as the replyto parameter. The name parameter is the formal name of the error condition, while the description is a short piece of text giving more specific information on the error.

my $name = $error->get_error_name
Returns the formal name of the error, as previously passed in via the name parameter in the constructor.

AUTHOR

Daniel P. Berrange.

COPYRIGHT

Copyright (C) 2004-2009 Daniel P. Berrange

SEE ALSO

Net::DBus::Binding::Message

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1910 - Linux cli command Net_DNS_RR_KEYpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_KEYpm and provides detailed information about the command Net_DNS_RR_KEYpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_KEYpm.

NAME 🖥️ Net_DNS_RR_KEYpm 🖥️

DNS KEY resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name KEY flags protocol algorithm publickey);

DESCRIPTION

DNS KEY resource record

This is a clone of the DNSKEY record and inherits all properties of the Net::DNS::RR::DNSKEY class.

Please see the Net::DNS::RR::DNSKEY documentation for details.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

COPYRIGHT

Copyright (c)2005 Olaf Kolkman, NLnet Labs.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR Net::DNS::RR::DNSKEY RFC2535 (3) <https://iana.org/go/rfc2535#section-3> RFC2936 <https://iana.org/go/rfc2936> RFC2931 <https://iana.org/go/rfc2931> RFC3110 <https://iana.org/go/rfc3110> RFC4034 <https://iana.org/go/rfc4034>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1911 - Linux cli command Net_Server_Proto_TCPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Server_Proto_TCPpm and provides detailed information about the command Net_Server_Proto_TCPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Server_Proto_TCPpm.

NAME 🖥️ Net_Server_Proto_TCPpm 🖥️

Net::Server TCP protocol.

SYNOPSIS

See Net::Server::Proto.

DESCRIPTION

Protocol module for Net::Server. This module implements the SOCK_STREAM socket type under INET (also known as TCP). See Net::Server::Proto.

PARAMETERS

There are no additional parameters that can be specified. See Net::Server for more information on reading arguments.

INTERNAL METHODS

“object”
Returns an object with parameters suitable for eventual creation of a IO::Socket::INET object listening on UDP.

“log_connect”
Called before binding the socket to provide useful information to the logs.

“connect”
Called when actually binding the port. Handles default parameters before calling parent method.

“reconnect”
Called instead of connect method during a server hup.

“accept”
Override of the parent class to make sure necessary parameters are passed down to client sockets.

“poll_cb”
Allow for psgi compatible interface during HTTP server.

“read_until”
Takes a regular expression, reads from the socket until the regular expression is matched.

“hup_string”
Returns a unique identifier that can be passed to the re-exec’ed process during HUP.

“show”
Basic dumper of properties stored in the glob.

“AUTOLOAD”
Handle accessor methods.

LICENCE

Distributed under the same terms as Net::Server

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1912 - Linux cli command zip_error_to_str

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_error_to_str and provides detailed information about the command zip_error_to_str, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_error_to_str.

libzip (-lzip)

The function

is deprecated; use

and

instead.

Replace

char buf[BUFSIZE]; zip_error_to_str(buf, sizeof(buf), ze, se); printf("%s", buf);

with

zip_error_t error; zip_error_init_with_code(&error, ze); printf("%s", zip_error_strerror(&error)); zip_error_fini(&error);

was added in libzip 0.6. In libzip 0.10 the type of

was changed from

to

It was deprecated in libzip 1.0, use

and

instead.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1913 - Linux cli command Image_ExifTool_FujiFilmpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_FujiFilmpm and provides detailed information about the command Image_ExifTool_FujiFilmpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_FujiFilmpm.

NAME 🖥️ Image_ExifTool_FujiFilmpm 🖥️

Read/write FujiFilm maker notes and RAF images

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret FujiFilm maker notes in EXIF information, and to read/write FujiFilm RAW (RAF) images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html>

<http://homepage3.nifty.com/kamisaka/makernote/makernote_fuji.htm>

<http://www.cybercom.net/~dcoffin/dcraw/>

(…plus testing with my own FinePix 2400 Zoom)

ACKNOWLEDGEMENTS

Thanks to Michael Meissner, Paul Samuelson and Jens Duttke for help decoding some FujiFilm information.

SEE ALSO

“FujiFilm Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1914 - Linux cli command Regexp_Common_URI_RFC1035pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_URI_RFC1035pm and provides detailed information about the command Regexp_Common_URI_RFC1035pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_URI_RFC1035pm.

NAME 🖥️ Regexp_Common_URI_RFC1035pm 🖥️

  • Definitions from RFC1035;

SYNOPSIS

use Regexp::Common::URI::RFC1035 qw /:ALL/;

DESCRIPTION

This package exports definitions from RFC1035. It’s intended usage is for Regexp::Common::URI submodules only. Its interface might change without notice.

REFERENCES

[RFC 1035]
Mockapetris, P.: DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION. November 1987.

AUTHOR

Damian Conway ([email protected])

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1915 - Linux cli command futimens

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command futimens and provides detailed information about the command futimens, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the futimens.

NAME 🖥️ futimens 🖥️

change file timestamps with nanosecond precision

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <fcntl.h> /* Definition of AT_* constants */
#include <sys/stat.h>
int utimensat(int dirfd, const char *pathname,
 const struct timespec times[_Nullable 2], int flags);
int futimens(int fd, const struct timespec times[_Nullable 2]);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

utimensat():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _ATFILE_SOURCE

futimens():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

utimensat() and futimens() update the timestamps of a file with nanosecond precision. This contrasts with the historical utime(2) and utimes(2), which permit only second and microsecond precision, respectively, when setting file timestamps.

With utimensat() the file is specified via the pathname given in pathname. With futimens() the file whose timestamps are to be updated is specified via an open file descriptor, fd.

For both calls, the new file timestamps are specified in the array times: times[0] specifies the new “last access time” (atime); times[1] specifies the new “last modification time” (mtime). Each of the elements of times specifies a time as the number of seconds and nanoseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). This information is conveyed in a timespec(3) structure.

Updated file timestamps are set to the greatest value supported by the filesystem that is not greater than the specified time.

If the tv_nsec field of one of the timespec structures has the special value UTIME_NOW, then the corresponding file timestamp is set to the current time. If the tv_nsec field of one of the timespec structures has the special value UTIME_OMIT, then the corresponding file timestamp is left unchanged. In both of these cases, the value of the corresponding tv_sec field is ignored.

If times is NULL, then both timestamps are set to the current time.

The status change time (ctime) will be set to the current time, even if the other time stamps don’t actually change.

Permissions requirements

To set both file timestamps to the current time (i.e., times is NULL, or both tv_nsec fields specify UTIME_NOW), either:

  • the caller must have write access to the file;

  • the caller’s effective user ID must match the owner of the file; or

  • the caller must have appropriate privileges.

To make any change other than setting both timestamps to the current time (i.e., times is not NULL, and neither tv_nsec field is UTIME_NOW and neither tv_nsec field is UTIME_OMIT), either condition 2 or 3 above must apply.

If both tv_nsec fields are specified as UTIME_OMIT, then no file ownership or permission checks are performed, and the file timestamps are not modified, but other error conditions may still be detected.

utimensat() specifics

If pathname is relative, then by default it is interpreted relative to the directory referred to by the open file descriptor, dirfd (rather than relative to the current working directory of the calling process, as is done by utimes(2) for a relative pathname). See openat(2) for an explanation of why this can be useful.

If pathname is relative and dirfd is the special value AT_FDCWD, then pathname is interpreted relative to the current working directory of the calling process (like utimes(2)).

If pathname is absolute, then dirfd is ignored.

The flags argument is a bit mask created by ORing together zero or more of the following values defined in <fcntl.h>:

AT_EMPTY_PATH (since Linux 5.8)
If pathname is an empty string, operate on the file referred to by dirfd (which may have been obtained using the open(2) O_PATH flag). In this case, dirfd can refer to any type of file, not just a directory. If dirfd is AT_FDCWD, the call operates on the current working directory. This flag is Linux-specific; define _GNU_SOURCE to obtain its definition.

AT_SYMLINK_NOFOLLOW
If pathname specifies a symbolic link, then update the timestamps of the link, rather than the file to which it refers.

RETURN VALUE

On success, utimensat() and futimens() return 0. On error, -1 is returned and errno is set to indicate the error.

ERRORS

EACCES
times is NULL, or both tv_nsec values are UTIME_NOW, and the effective user ID of the caller does not match the owner of the file, the caller does not have write access to the file, and the caller is not privileged (Linux: does not have either the CAP_FOWNER or the CAP_DAC_OVERRIDE capability).

EBADF
(futimens()) fd is not a valid file descriptor.

EBADF
(utimensat()) pathname is relative but dirfd is neither AT_FDCWD nor a valid file descriptor.

EFAULT
times pointed to an invalid address; or, dirfd was AT_FDCWD, and pathname is NULL or an invalid address.

EINVAL
Invalid value in flags.

EINVAL
Invalid value in one of the tv_nsec fields (value outside range [0, 999,999,999], and not UTIME_NOW or UTIME_OMIT); or an invalid value in one of the tv_sec fields.

EINVAL
pathname is NULL, dirfd is not AT_FDCWD, and flags contains AT_SYMLINK_NOFOLLOW.

ELOOP
(utimensat()) Too many symbolic links were encountered in resolving pathname.

ENAMETOOLONG
(utimensat()) pathname is too long.

ENOENT
(utimensat()) A component of pathname does not refer to an existing directory or file, or pathname is an empty string.

ENOTDIR
(utimensat()) pathname is a relative pathname, but dirfd is neither AT_FDCWD nor a file descriptor referring to a directory; or, one of the prefix components of pathname is not a directory.

EPERM
The caller attempted to change one or both timestamps to a value other than the current time, or to change one of the timestamps to the current time while leaving the other timestamp unchanged, (i.e., times is not NULL, neither tv_nsec field is UTIME_NOW, and neither tv_nsec field is UTIME_OMIT) and either:

  • the caller’s effective user ID does not match the owner of file, and the caller is not privileged (Linux: does not have the CAP_FOWNER capability); or,

  • the file is marked append-only or immutable (see chattr(1)).

EROFS
The file is on a read-only filesystem.

ESRCH
(utimensat()) Search permission is denied for one of the prefix components of pathname.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

utimensat(), futimens()

Thread safetyMT-Safe

VERSIONS

C library/kernel ABI differences

On Linux, futimens() is a library function implemented on top of the utimensat() system call. To support this, the Linux utimensat() system call implements a nonstandard feature: if pathname is NULL, then the call modifies the timestamps of the file referred to by the file descriptor dirfd (which may refer to any type of file). Using this feature, the call futimens(fd, times) is implemented as:

utimensat(fd, NULL, times, 0);

Note, however, that the glibc wrapper for utimensat() disallows passing NULL as the value for pathname: the wrapper function returns the error EINVAL in this case.

STANDARDS

POSIX.1-2008.

VERSIONS

utimensat()
Linux 2.6.22, glibc 2.6. POSIX.1-2008.

futimens()
glibc 2.6. POSIX.1-2008.

NOTES

utimensat() obsoletes futimesat(2).

On Linux, timestamps cannot be changed for a file marked immutable, and the only change permitted for files marked append-only is to set the timestamps to the current time. (This is consistent with the historical behavior of utime(2) and utimes(2) on Linux.)

If both tv_nsec fields are specified as UTIME_OMIT, then the Linux implementation of utimensat() succeeds even if the file referred to by dirfd and pathname does not exist.

BUGS

Several bugs afflict utimensat() and futimens() before Linux 2.6.26. These bugs are either nonconformances with the POSIX.1 draft specification or inconsistencies with historical Linux behavior.

  • POSIX.1 specifies that if one of the tv_nsec fields has the value UTIME_NOW or UTIME_OMIT, then the value of the corresponding tv_sec field should be ignored. Instead, the value of the tv_sec field is required to be 0 (or the error EINVAL results).

  • Various bugs mean that for the purposes of permission checking, the case where both tv_nsec fields are set to UTIME_NOW isn’t always treated the same as specifying times as NULL, and the case where one tv_nsec value is UTIME_NOW and the other is UTIME_OMIT isn’t treated the same as specifying times as a pointer to an array of structures containing arbitrary time values. As a result, in some cases: a) file timestamps can be updated by a process that shouldn’t have permission to perform updates; b) file timestamps can’t be updated by a process that should have permission to perform updates; and c) the wrong errno value is returned in case of an error.

  • POSIX.1 says that a process that has write access to the file can make a call with times as NULL, or with times pointing to an array of structures in which both tv_nsec fields are UTIME_NOW, in order to update both timestamps to the current time. However, futimens() instead checks whether the access mode of the file descriptor allows writing.

SEE ALSO

chattr(1), touch(1), futimesat(2), openat(2), stat(2), utimes(2), futimes(3), timespec(3), inode(7), path_resolution(7), symlink(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1916 - Linux cli command Moose_Manual_Attributespm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Manual_Attributespm and provides detailed information about the command Moose_Manual_Attributespm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Manual_Attributespm.

NAME 🖥️ Moose_Manual_Attributespm 🖥️

Object attributes with Moose

VERSION

version 2.2207

INTRODUCTION

Moose attributes have many properties, and attributes are probably the single most powerful and flexible part of Moose. You can create a powerful class simply by declaring attributes. In fact, it’s possible to have classes that consist solely of attribute declarations.

An attribute is a property that every member of a class has. For example, we might say that “every Person object has a first name and last name”. Attributes can be optional, so that we can say “some Person objects have a social security number (and some don’t)”.

At its simplest, an attribute can be thought of as a named value (as in a hash) that can be read and set. However, attributes can also have defaults, type constraints, delegation and much more.

In other languages, attributes are also referred to as slots or properties.

ATTRIBUTE OPTIONS

Use the has function to declare an attribute:

package Person; use Moose; has first_name => ( is => rw );

This says that all Person objects have an optional read-write “first_name” attribute.

Read-write vs. read-only

The options passed to has define the properties of the attribute. There are many options, but in the simplest form you just need to set is, which can be either ro (read-only) or rw (read-write). When an attribute is rw, you can change it by passing a value to its accessor. When an attribute is ro, you may only read the current value of the attribute through its accessor. You can, however, set the attribute when creating the object by passing it to the constructor.

In fact, you could even omit is, but that gives you an attribute that has no accessor. This can be useful with other attribute options, such as handles. However, if your attribute generates no accessors, Moose will issue a warning, because that usually means the programmer forgot to say the attribute is read-only or read-write. If you really mean to have no accessors, you can silence this warning by setting is to bare.

Accessor methods

Each attribute has one or more accessor methods. An accessor lets you read and write the value of that attribute for an object.

By default, the accessor method has the same name as the attribute. If you declared your attribute as ro then your accessor will be read-only. If you declared it as rw, you get a read-write accessor. Simple.

Given our Person example above, we now have a single first_name accessor that can read or write a Person object’s first_name attribute’s value.

If you want, you can also explicitly specify the method names to be used for reading and writing an attribute’s value. This is particularly handy when you’d like an attribute to be publicly readable, but only privately settable. For example:

has weight => ( is => ro, writer => _set_weight, );

This might be useful if weight is calculated based on other methods. For example, every time the eat method is called, we might adjust weight. This lets us hide the implementation details of weight changes, but still provide the weight value to users of the class.

Some people might prefer to have distinct methods for reading and writing. In Perl Best Practices, Damian Conway recommends that reader methods start with “get_” and writer methods start with “set_”.

We can do exactly that by providing names for both the reader and writer methods:

has weight => ( is => rw, reader => get_weight, writer => set_weight, );

If you’re thinking that doing this over and over would be insanely tedious, you’re right! Fortunately, Moose provides a powerful extension system that lets you override the default naming conventions. See Moose::Manual::MooseX for more details.

Predicate and clearer methods

Moose allows you to explicitly distinguish between a false or undefined attribute value and an attribute which has not been set. If you want to access this information, you must define clearer and predicate methods for an attribute.

A predicate method tells you whether or not a given attribute is currently set. Note that an attribute can be explicitly set to undef or some other false value, but the predicate will return true.

The clearer method unsets the attribute. This is not the same as setting the value to undef, but you can only distinguish between them if you define a predicate method!

Here’s some code to illustrate the relationship between an accessor, predicate, and clearer method.

package Person; use Moose; has ssn => ( is => rw, clearer => clear_ssn, predicate => has_ssn, ); … my $person = Person->new(); $person->has_ssn; # false $person->ssn(undef); $person->ssn; # returns undef $person->has_ssn; # true $person->clear_ssn; $person->ssn; # returns undef $person->has_ssn; # false $person->ssn(123-45-6789); $person->ssn; # returns 123-45-6789 $person->has_ssn; # true my $person2 = Person->new( ssn => 111-22-3333); $person2->has_ssn; # true

By default, Moose does not make a predicate or clearer for you. You must explicitly provide names for them, and then Moose will create the methods for you.

Required or not?

By default, all attributes are optional, and do not need to be provided at object construction time. If you want to make an attribute required, simply set the required option to true:

has name => ( is => ro, required => 1, );

There are a couple caveats worth mentioning in regards to what “required” actually means.

Basically, all it says is that this attribute (name) must be provided to the constructor or it must have either a default or a builder. It does not say anything about its value, so it could be undef.

If you define a clearer method on a required attribute, the clearer will work, so even a required attribute can be unset after object construction.

This means that if you do make an attribute required, providing a clearer doesn’t make much sense. In some cases, it might be handy to have a private clearer and predicate for a required attribute.

Default and builder methods

Attributes can have default values, and Moose provides two ways to specify that default.

In the simplest form, you simply provide a non-reference scalar value for the default option:

has size => ( is => ro, default => medium, predicate => has_size, );

If the size attribute is not provided to the constructor, then it ends up being set to medium:

my $person = Person->new(); $person->size; # medium $person->has_size; # true

You can also provide a subroutine reference for default. This reference will be called as a method on the object.

has size => ( is => ro, default => sub { ( small, medium, large )[ int( rand 3 ) ] }, predicate => has_size, );

This is a trivial example, but it illustrates the point that the subroutine will be called for every new object created.

When you provide a default subroutine reference, it is called as a method on the object, with no additional parameters:

has size => ( is => ro, default => sub { my $self = shift; return $self->height > 200 ? large : average; }, );

When the default is called during object construction, it may be called before other attributes have been set. If your default is dependent on other parts of the object’s state, you can make the attribute lazy. Laziness is covered in the next section.

If you want to use a reference of any sort as the default value, you must return it from a subroutine.

has mapping => ( is => ro, default => sub { {} }, );

This is necessary because otherwise Perl would instantiate the reference exactly once, and it would be shared by all objects:

has mapping => ( is => ro, default => {}, # wrong! );

Moose will throw an error if you pass a bare non-subroutine reference as the default.

If Moose allowed this then the default mapping attribute could easily end up shared across many objects. Instead, wrap it in a subroutine reference as we saw above.

This is a bit awkward, but it’s just the way Perl works.

As an alternative to using a subroutine reference, you can supply a builder method for your attribute:

has size => ( is => ro, builder => _build_size, predicate => has_size, ); sub _build_size { return ( small, medium, large )[ int( rand 3 ) ]; }

This has several advantages. First, it moves a chunk of code to its own named method, which improves readability and code organization. Second, because this is a named method, it can be subclassed or provided by a role.

We strongly recommend that you use a builder instead of a default for anything beyond the most trivial default.

A builder, just like a default, is called as a method on the object with no additional parameters.

Builders allow subclassing

Because the builder is called by name, it goes through Perl’s method resolution. This means that builder methods are both inheritable and overridable.

If we subclass our Person class, we can override _build_size:

package Lilliputian; use Moose; extends Person; sub _build_size { return small }

Builders work well with roles

Because builders are called by name, they work well with roles. For example, a role could provide an attribute but require that the consuming class provide the builder:

package HasSize; use Moose::Role; requires _build_size; has size => ( is => ro, lazy => 1, builder => _build_size, ); package Lilliputian; use Moose; with HasSize; sub _build_size { return small }

Roles are covered in Moose::Manual::Roles.

Laziness

Moose lets you defer attribute population by making an attribute lazy:

has size => ( is => ro, lazy => 1, builder => _build_size, );

When lazy is true, the default is not generated until the reader method is called, rather than at object construction time. There are several reasons you might choose to do this.

First, if the default value for this attribute depends on some other attributes, then the attribute must be lazy. During object construction, defaults are not generated in a predictable order, so you cannot count on some other attribute being populated when generating a default.

Second, there’s often no reason to calculate a default before it’s needed. Making an attribute lazy lets you defer the cost until the attribute is needed. If the attribute is never needed, you save some CPU time.

We recommend that you make any attribute with a builder or non-trivial default lazy as a matter of course.

Lazy defaults and $_

Please note that a lazy default or builder can be called anywhere, even inside a map or grep. This means that if your default sub or builder changes $_, something weird could happen. You can prevent this by adding local $_ inside your default or builder.

Constructor parameters (“init_arg”)

By default, each attribute can be passed by name to the class’s constructor. On occasion, you may want to use a different name for the constructor parameter. You may also want to make an attribute unsettable via the constructor.

You can do either of these things with the init_arg option:

has bigness => ( is => ro, init_arg => size, );

Now we have an attribute named “bigness”, but we pass size to the constructor.

Even more useful is the ability to disable setting an attribute via the constructor. This is particularly handy for private attributes:

has _genetic_code => ( is => ro, lazy => 1, builder => _build_genetic_code, init_arg => undef, );

By setting the init_arg to undef, we make it impossible to set this attribute when creating a new object.

Weak references

Moose has built-in support for weak references. If you set the weak_ref option to a true value, then it will call Scalar::Util::weaken whenever the attribute is set:

has parent => ( is => rw, weak_ref => 1, ); $node->parent($parent_node);

This is very useful when you’re building objects that may contain circular references.

When the object in a weak reference goes out of scope, the attribute’s value will become undef “behind the scenes”. This is done by the Perl interpreter directly, so Moose does not see this change. This means that triggers don’t fire, coercions aren’t applied, etc.

The attribute is not cleared, so a predicate method for that attribute will still return true. Similarly, when the attribute is next accessed, a default value will not be generated.

Triggers

A trigger is a subroutine that is called whenever the attribute is set:

has size => ( is => rw, trigger => \_size_set, ); sub _size_set { my ( $self, $size, $old_size ) = @_; my $msg = $self->name; if ( @_ > 2 ) { $msg .= " - old size was $old_size"; } $msg .= " - size is now $size"; warn $msg; }

The trigger is called after an attribute’s value is set. It is called as a method on the object, and receives the new and old values as its arguments. If the attribute had not previously been set at all, then only the new value is passed. This lets you distinguish between the case where the attribute had no value versus when the old value was undef.

This differs from an after method modifier in two ways. First, a trigger is only called when the attribute is set, as opposed to whenever the accessor method is called (for reading or writing). Second, it is also called when an attribute’s value is passed to the constructor.

However, triggers are not called when an attribute is populated from a default or builder.

Attribute types

Attributes can be restricted to only accept certain types:

has first_name => ( is => ro, isa => Str, );

This says that the first_name attribute must be a string.

Moose also provides a shortcut for specifying that an attribute only accepts objects that do a certain role:

has weapon => ( is => rw, does => MyApp::Weapon, );

See the Moose::Manual::Types documentation for a complete discussion of Moose’s type system.

Delegation

An attribute can define methods which simply delegate to its value:

has hair_color => ( is => ro, isa => Graphics::Color::RGB, handles => { hair_color_hex => as_hex_string }, );

This adds a new method, hair_color_hex. When someone calls hair_color_hex, internally, the object just calls $self->hair_color->as_hex_string.

See Moose::Manual::Delegation for documentation on how to set up delegation methods.

Attribute traits and metaclasses

One of Moose’s best features is that it can be extended in all sorts of ways through the use of metaclass traits and custom metaclasses.

You can apply one or more traits to an attribute:

use MooseX::MetaDescription; has size => ( is => ro, traits => [MooseX::MetaDescription::Meta::Trait], description => { html_widget => text_input, serialize_as => element, }, );

The advantage of traits is that you can mix more than one of them together easily (in fact, a trait is just a role under the hood).

There are a number of MooseX modules on CPAN which provide useful attribute metaclasses and traits. See Moose::Manual::MooseX for some examples. You can also write your own metaclasses and traits. See the “Meta” and “Extending” recipes in Moose::Cookbook for examples.

Native Delegations

Native delegations allow you to delegate to standard Perl data structures as if they were objects.

For example, we can pretend that an array reference has methods like push(), shift(), map(), count(), and more.

has options => ( traits => [Array], is => ro, isa => ArrayRef[Str], default => sub { [] }, handles => { all_options => elements, add_option => push, map_options => map, option_count => count, sorted_options => sort, }, );

See Moose::Manual::Delegation for more details.

ATTRIBUTE INHERITANCE

By default, a child inherits all of its parent class(es)’ attributes as-is. However, you can change most aspects of the inherited attribute in the child class. You cannot change any of its associated method names (reader, writer, predicate, etc).

To change some aspects of an attribute, you simply prepend a plus sign (+) to its name:

package LazyPerson; use Moose; extends Person; has +first_name => ( lazy => 1, default => Bill, );

Now the first_name attribute in LazyPerson is lazy, and defaults to Bill.

We recommend that you exercise caution when changing the type (isa) of an inherited attribute.

Attribute Inheritance and Method Modifiers

When an inherited attribute is defined, that creates an entirely new set of accessors for the attribute (reader, writer, predicate, etc.). This is necessary because these may be what was changed when inheriting the attribute.

As a consequence, any method modifiers defined on the attribute’s accessors in an ancestor class will effectively be ignored, because the new accessors live in the child class and do not see the modifiers from the parent class.

MULTIPLE ATTRIBUTE SHORTCUTS

If you have a number of attributes that differ only by name, you can declare them all at once:

package Point; use Moose; has [ x, y ] => ( is => ro, isa => Int );

Also, because has is just a function call, you can call it in a loop:

for my $name ( qw( x y ) ) { my $builder = _build_ . $name; has $name => ( is => ro, isa => Int, builder => $builder ); }

MORE ON ATTRIBUTES

Moose attributes are a big topic, and this document glosses over a few aspects. We recommend that you read the Moose::Manual::Delegation and Moose::Manual::Types documents to get a more complete understanding of attribute features.

A FEW MORE OPTIONS

Moose has lots of attribute options. The ones listed below are superseded by some more modern features, but are covered for the sake of completeness.

The “documentation” option

You can provide a piece of documentation as a string for an attribute:

has first_name => ( is => rw, documentation => q{The persons first (personal) name}, );

Moose does absolutely nothing with this information other than store it.

The “auto_deref” option

If your attribute is an array reference or hash reference, the auto_deref option will make Moose dereference the value when it is returned from the reader method in list context:

my %map = $object->mapping;

This option only works if your attribute is explicitly typed as an ArrayRef or HashRef. When the reader is called in scalar context, the reference itself is returned.

However, we recommend that you use Moose::Meta::Attribute::Native traits for these types of attributes, which gives you much more control over how they are accessed and manipulated. See also “Use Moose::Meta::Attribute::Native traits instead of auto deref” in Moose::Manual::BestPractices.

Initializer

Moose provides an attribute option called initializer. This is called when the attribute’s value is being set in the constructor, and lets you change the value before it is set.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1917 - Linux cli command Tk_FileSelectpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_FileSelectpm and provides detailed information about the command Tk_FileSelectpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_FileSelectpm.

NAME 🖥️ Tk_FileSelectpm 🖥️

a widget for choosing files

SYNOPSIS

use Tk::FileSelect; $FSref = $top->FileSelect(-directory => $start_dir); $top - a window reference, e.g. MainWindow->new $start_dir - the starting point for the FileSelect $file = $FSref->Show; Executes the fileselector until either a filename is accepted or the user hits Cancel. Returns the filename or the empty string, respectively, and unmaps the FileSelect. $FSref->configure(option => value[, …]) Please see the Populate subroutine as the configuration list changes rapidly.

DESCRIPTION

This Module pops up a Fileselector box, with a directory entry on top, a list of directories in the current directory, a list of files in the current directory, an entry for entering/modifying a file name, an accept button and a cancel button.

You can enter a starting directory in the directory entry. After hitting Return, the listboxes get updated. Double clicking on any directory shows you the respective contents. Single clicking on a file brings it into the file entry for further consideration, double clocking on a file pops down the file selector and calls the optional command with the complete path for the selected file. Hitting return in the file selector box or pressing the accept button will also work. *NOTE* the file selector box will only then get destroyed if the file name is not zero length. If you want yourself take care of it, change the if(length(.. in sub accept_file.

AUTHORS

Based on original FileSelect by Klaus Lichtenwalder, [email protected], Datapat GmbH, Munich, April 22, 1995 adapted by Frederick L. Wagner, [email protected], Texas Instruments Incorporated, Dallas, 21Jun95

HISTORY

950621 – The following changes were made:

  • Rewrote Tk stuff to take advantage of new Compound widget module, so FileSelect is now composed of 2 LabEntry and 2 ScrlListbox2 subwidgets.

  • Moved entry labels (from to the left of) to above the entry fields.

  • Caller is now able to control these aspects of widget, in both FileSelect (new) and configure : (Please see subroutine Populate for details, as these options change rapidly!)

  • I changed from Double-Button-1 to Button-1 in the Files listbox, to work with multiple mode in addition to browse mode. I also made some name changes (LastPath –> saved_path, …).

  • The show method is not yet updated.

  • The topLevel stuff is not done yet. I took it out while I toy with the idea of FileSelect as a subwidget. Then the ’normal’ topLevel thing with Buttons along the bottom could be build on top of it.

  • By request of Henry Katz <[email protected]>, I added the functionality of using the Directory entry as a filter. So, if you want to only see the *.c files, you add a .c (the *’s already there :) and hit return.

95/10/17, SOL, LUCC. [email protected]

  • Allow either file or directory names to be accepted.

  • Require double click to move into a new directory rather than a single click. This allows a single click to select a directory name so it can be accepted.

  • Add -verify list option so that standard Perl file test operators (like -d and -x) can be specified for further name validation. The default value is the special value ‘!-d’ (not a directory), so any name can be selected as long as it’s not a directory - after all, this IS FileSelect! For example: $fs->configure(-verify => [-d, [\verify_code, $P1, $P2, … $Pn]]); ensures that the selected name is a directory. Further, if an element of the list is an array reference, the first element is a code reference to a subroutine and the remaining optional elements are its parameters. The subroutine is called like this: &verify_code($cd, $leaf, $P1, $P2, … $Pn); where $cd is the current directory, $leaf is a directory or file name, and $P1 .. $Pn are your optional parameters. The subroutine should return TRUE if success or FALSE if failure.

961008 – [email protected] :

By request of Jim Stern <[email protected]> and Brad Vance <[email protected]>, I updated the Accept and Show functions to support selection of multiple files. I also corrected a typo in the -verify code.

SEE ALSO

Tk::getOpenFile, Tk::FBox.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1918 - Linux cli command svc_getargs

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command svc_getargs and provides detailed information about the command svc_getargs, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the svc_getargs.

NAME 🖥️ svc_getargs 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1919 - Linux cli command TAILQ_INIT

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command TAILQ_INIT and provides detailed information about the command TAILQ_INIT, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the TAILQ_INIT.

NAME 🖥️ TAILQ_INIT 🖥️

implementation of a doubly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
TAILQ_ENTRY(TYPE);
TAILQ_HEAD(HEADNAME, TYPE);
TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD head);
void TAILQ_INIT(TAILQ_HEAD *head);
int TAILQ_EMPTY(TAILQ_HEAD *head);
void TAILQ_INSERT_HEAD(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_TAIL(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_AFTER(TAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_FIRST(TAILQ_HEAD *head);
struct TYPE *TAILQ_LAST(TAILQ_HEAD *head, HEADNAME);
struct TYPE *TAILQ_PREV(struct TYPE *elm, HEADNAME, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_NEXT(struct TYPE *elm, TAILQ_ENTRY NAME);
TAILQ_FOREACH(struct TYPE *var, TAILQ_HEAD *head,
 TAILQ_ENTRY NAME);
TAILQ_FOREACH_REVERSE(struct TYPE *var, TAILQ_HEAD *head, HEADNAME,
 TAILQ_ENTRY NAME);
void TAILQ_REMOVE(TAILQ_HEAD *head, struct TYPE *elm,
 TAILQ_ENTRY NAME);
void TAILQ_CONCAT(TAILQ_HEAD *head1, TAILQ_HEAD *head2,
 TAILQ_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked tail queues.

In the macro definitions, TYPE is the name of a user defined structure, that must contain a field of type TAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user defined structure that must be declared using the macro TAILQ_HEAD().

Creation

A tail queue is headed by a structure defined by the TAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the queue and the other to the last element in the queue. The elements are doubly linked so that an arbitrary element can be removed without traversing the queue. New elements can be added to the queue after an existing element, before an existing element, at the head of the queue, or at the end of the queue. A TAILQ_HEAD structure is declared as follows:

TAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the queue. A pointer to the head of the queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

TAILQ_ENTRY() declares a structure that connects the elements in the queue.

TAILQ_HEAD_INITIALIZER() evaluates to an initializer for the queue head.

TAILQ_INIT() initializes the queue referenced by

TAILQ_EMPTY() evaluates to true if there are no items on the queue. head.

Insertion

TAILQ_INSERT_HEAD() inserts the new element elm at the head of the queue.

TAILQ_INSERT_TAIL() inserts the new element elm at the end of the queue.

TAILQ_INSERT_BEFORE() inserts the new element elm before the element listelm.

TAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

TAILQ_FIRST() returns the first item on the queue, or NULL if the queue is empty.

TAILQ_LAST() returns the last item on the queue. If the queue is empty the return value is NULL.

TAILQ_PREV() returns the previous item on the queue, or NULL if this item is the first.

TAILQ_NEXT() returns the next item on the queue, or NULL if this item is the last.

TAILQ_FOREACH() traverses the queue referenced by head in the forward direction, assigning each element in turn to var. var is set to NULL if the loop completes normally, or if there were no elements.

TAILQ_FOREACH_REVERSE() traverses the queue referenced by head in the reverse direction, assigning each element in turn to var.

Removal

TAILQ_REMOVE() removes the element elm from the queue.

Other features

TAILQ_CONCAT() concatenates the queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

TAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

TAILQ_FIRST(), TAILQ_LAST(), TAILQ_PREV(), and TAILQ_NEXT() return a pointer to the first, last, previous, or next TYPE structure, respectively.

TAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

STANDARDS

BSD.

HISTORY

4.4BSD.

CAVEATS

TAILQ_FOREACH() and TAILQ_FOREACH_REVERSE() don’t allow var to be removed or freed within the loop, as it would interfere with the traversal. TAILQ_FOREACH_SAFE() and TAILQ_FOREACH_REVERSE_SAFE(), which are present on the BSDs but are not present in glibc, fix this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    TAILQ_ENTRY(entry) entries;             /* Tail queue */
};
TAILQ_HEAD(tailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct tailhead head;                   /* Tail queue head */
    int i;
    TAILQ_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    TAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    TAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    TAILQ_INSERT_AFTER(&head, n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    TAILQ_INSERT_BEFORE(n2, n3, entries);
    TAILQ_REMOVE(&head, n2, entries);       /* Deletion */
    free(n2);
                                            /* Forward traversal */
    i = 0;
    TAILQ_FOREACH(np, &head, entries)
        np->data = i++;
                                            /* Reverse traversal */
    TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = TAILQ_FIRST(&head); while (n1 != NULL) { n2 = TAILQ_NEXT(n1, entries); free(n1); n1 = n2; } TAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1920 - Linux cli command zip_file_rename

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_file_rename and provides detailed information about the command zip_file_rename, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_file_rename.

libzip (-lzip)

The file at position

in the zip archive

is renamed to

The

argument can be any of:

Guess encoding of

(default).

Interpret

as UTF-8.

Interpret

as code page 437 (CP-437).

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error code in

is set to indicate the error.

fails if:

The file to be renamed has been deleted from the archive.

There is already a file called

in the archive.

is not a valid file index in

the empty string, or not a valid UTF-8 encoded string. Also a file cannot be renamed to a directory or vice versa. Directories are denoted by a trailing slash.

was added in libzip 0.11.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1921 - Linux cli command gets

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gets and provides detailed information about the command gets, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gets.

NAME 🖥️ gets 🖥️

get a string from standard input (DEPRECATED)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
[[deprecated]] char *gets(char *s);

DESCRIPTION

Never use this function.

gets() reads a line from stdin into the buffer pointed to by s until either a terminating newline or EOF, which it replaces with a null byte (‘�’). No check for buffer overrun is performed (see BUGS below).

RETURN VALUE

gets() returns s on success, and NULL on error or when end of file occurs while no characters have been read. However, given the lack of buffer overrun checking, there can be no guarantees that the function will even return.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

gets()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

C89, POSIX.1-2001.

LSB deprecates gets(). POSIX.1-2008 marks gets() obsolescent. ISO C11 removes the specification of gets() from the C language, and since glibc 2.16, glibc header files don’t expose the function declaration if the _ISOC11_SOURCE feature test macro is defined.

BUGS

Never use gets(). Because it is impossible to tell without knowing the data in advance how many characters gets() will read, and because gets() will continue to store characters past the end of the buffer, it is extremely dangerous to use. It has been used to break computer security. Use fgets() instead.

For more information, see CWE-242 (aka “Use of Inherently Dangerous Function”) at http://cwe.mitre.org/data/definitions/242.html

SEE ALSO

read(2), write(2), ferror(3), fgetc(3), fgets(3), fgetwc(3), fgetws(3), fopen(3), fread(3), fseek(3), getline(3), getwchar(3), puts(3), scanf(3), ungetwc(3), unlocked_stdio(3), feature_test_macros(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1922 - Linux cli command Tk_pTkpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_pTkpm and provides detailed information about the command Tk_pTkpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_pTkpm.

NAME 🖥️ Tk_pTkpm 🖥️

how to make your Tk source portable to other interpreted languages.

Author

Ilya Zakharevich <[email protected]> has contributed most of this document. Many thanks.

DESCRIPTION

PortableTk is an attempt to make Tk useful from other languages. Currently tk4.0 runs under Perl using this approach. Below, Lang is the notation for an external language to which PortableTk glues Tk code.

The main problem with using the code developed for TCL with different languages is the absence of data types: almost anything is char*. It makes automatic translation hopeless. However, if you typedef several new symbols to be char*, you can still use your code in TCL, and it will make the automatic translation possible.

Another problem with the approach that “everything is a string” is impossibility to have a result that says “NotApplicable” without setting an error. Thus different Tk command return different string values that mean “error happened”, like "", " " or "??". Other languages can be more flexible, so in portableTk you should inform the compiler that what you want to return means “error” (see “Setting variables”).

Currently PortableTk uses several different approachs to simplify translation: several TCL functions that are especially dangerous to use are undefined, so you can easily find places that need to be updated to use Language-independent functions based on compiler warnings. Eventually a way to use these Language-independent functions under proper TCL will be also provided. The end of this document provides a starting point for such a project.

Structure of pTk, porting your code

pTk, that is a port of Tk, is very special with respect to porting of other code to portableTk. The problem is that currently there is very little hope to merge the modifications back into Tk, so a special strategy is needed to maintain this port. Do not use this strategy to port your own code.

pTk is produced from Tk via a two-step process: first, some manual editing (the result is in the subdirectory mTk), and second, automatic conversion by the munge script (written in Perl). Thus the subdirectory pTk/mTk contains code with minimal possible difference from the virgin Tk code, so it is easier to merge (1) the differences between Tk versions into modified code.

It looks like the strategy for a portable code should be exactly opposite: starting from TCL-based code, apply munge, and then hand-edit the resulting code. Probably it is also possible to target your code to portableTk from scratch, since this will make it possible to run it under a lot of Languages.

The only reason anyone would like to look into contents of pTk/mTk directory is to find out which constructs are not supported by munge. On the other hand, pTk directory contains code that is conformant to portableTk, so you can look there to find example code.

munge is the script that converts most common Tk constructs to their portableTk equivalent. For your code to qualify, you should follow Tk conventions on indentation and names of variables, in particular, the array of arguments for the ...CmdProc should be called argv.

For details on what munge can do, see “Translation of some TCL functions”.

PortableTk API

Checking what you are running under

PortableTk provides a symbol ????. If this symbol is defined, your source is compiled with it.

New types of configuration options

PortableTk defines several new types of configuration options:

TK_CONFIG_CALLBACK TK_CONFIG_LANGARG TK_CONFIG_SCALARVAR TK_CONFIG_HASHVAR TK_CONFIG_ARRAYVAR TK_CONFIG_IMAGE

You should use them instead of TK_CONFIG_STRING whenever appropriate. This allows your application to receive a direct representation of the corresponding resource instead of the string representation, if this is possible under given language.

???? It looks like TK_CONFIG_IMAGE and TK_CONFIG_SCALARVAR set variables of type char*.

Language data

The following data types are defined:

“Tcl_Obj *”
is the main datatype of the language. This is a type that your C function gets pointers to for arguments when the corresponding Lang function is called. The corresponding config type is TK_CONFIG_LANGARG. This is also a type that keeps information about contents of Lang variable.

“Var”
Is a substitute for a char * that contains name of variable. In Lang it is an object that contains reference to another Lang variable.

“LangResultSave”
????

“LangCallback”
LangCallback* a substitute for a char * that contains command to call. The corresponding config type is TK_CONFIG_CALLBACK.

“LangFreeProc”
It is the type that the Lang_SplitList sets. Before you call it, declare Args *args; LangFreeProc *freeProc = NULL; … code = Lang_SplitList(interp, value, &argc, &args, &freeProc); After you use the split values, call if (args != NULL && freeProc) (*freeProc)(argc,args); It is not guaranteed that the args can survive deletion of value.

Conversion

The following macros and functions are used for conversion between strings and the additional types:

LangCallback * LangMakeCallback(Tcl_Obj *) Tcl_Obj * LangCallbackArg(LangCallback *) char * LangString(Tcl_Obj *)

After you use the result of LangCallbackArg(), you should free it with freeProc LANG_DYNAMIC (it is not guaranteed that any change of Tcl_Obj * will not be reflected in <LangCallback>, so you cannot do LangSet…() in between, and you should reset it to NULL if you want to do any further assignments to this Tcl_Obj *).

The following function returns the Tcl_Obj * that is a reference to Var:

Tcl_Obj * LangVarArg(Var)

???? It is very anti-intuitive, I hope the name is changed.

int LangCmpCallback(LangCallback *a,Tcl_Obj * b)

(currently only a stub), and, at last,

LangCallback * LangCopyCallback(LangCallback *)

Callbacks

Above we have seen the new datatype LangCallback and the corresponding Config option TK_CONFIG_CALLBACK. The following functions are provided for manipulation of LangCallbacks:

void LangFreeCallback(LangCallback *) int LangDoCallback(Tcl_Interp *,LangCallback *, int result,int argc, char *format,…)

The argument format of LangDoCallback should contain a string that is suitable for sprintf with optional arguments of LangDoCallback. result should be false if result of callback is not needed.

int LangMethodCall(Tcl_Interp *,Tcl_Obj *,char *method, int result,int argc,…)

????

Conceptually, LangCallback* is a substitute for ubiquitous char * in TCL. So you should use LangFreeCallback instead of ckfree or free if appropriate.

Setting variables

void LangFreeArg (Tcl_Obj *, Tcl_FreeProc *freeProc) Tcl_Obj * LangCopyArg (Tcl_Obj *); void Tcl_AppendArg (Tcl_Interp *interp, Tcl_Obj *) void LangSetString(Tcl_Obj * *, char *s) void LangSetDefault(Tcl_Obj * *, char *s)

These two are equivalent unless s is an empty string. In this case LangSetDefault behaves like LangSetString with s==NULL, i.e., it sets the current value of the Lang variable to be false.

void LangSetInt(Tcl_Obj * *,int) void LangSetDouble(Tcl_Obj * *,double)

The Lang functions separate uninitialized and initialized data comparing data with NULL. So the declaration for an Tcl_Obj * should look like

Tcl_Obj * arg = NULL;

if you want to use this arg with the above functions. After you are done, you should use LangFreeArg with TCL_DYNAMIC as freeProc.

Language functions

Use

“int LangNull(Tcl_Obj *)”
to check that an object is false;

“int LangStringMatch(char *string, Tcl_Obj * match)”
????

“void LangExit(int)”
to make a proper shutdown;

“int LangEval(Tcl_Interp *interp, char *cmd, int global)”
to call Lang eval;

“void Lang_SetErrorCode(Tcl_Interp *interp,char *code)”

“char *Lang_GetErrorCode(Tcl_Interp *interp)”

“char *Lang_GetErrorInfo(Tcl_Interp *interp)”

“void LangCloseHandler(Tcl_Interp *interp,Tcl_Obj * arg,FILE *f,Lang_FileCloseProc *proc)”

currently stubs only;

“int LangSaveVar(Tcl_Interp *,Tcl_Obj * arg,Var *varPtr,int type)”
to save the structure arg into Lang variable *varPtr;

“void LangFreeVar(Var var)”
to free the result;

“int LangEventCallback(Tcl_Interp *,LangCallback *,XEvent *,KeySym)”
????

“int LangEventHook(int flags)”

“void LangBadFile(int fd)”

“int LangCmpConfig(char *spec, char *arg, size_t length)”

unsupported????;

“void Tcl_AppendArg (Tcl_Interp *interp, Tcl_Obj *)”

Another useful construction is

Tcl_Obj * variable = LangFindVar(interp, Tk_Window tkwin, char *name);

After using the above function, you should call

LangFreeVar(Var variable);

???? Note discrepancy in types!

If you want to find the value of a variable (of type Tcl_Obj *) given the variable name, use Tcl_GetVar(interp, varName, flags). If you are interested in the string value of this variable, use LangString(Tcl_GetVar(...)).

To get a C array of Tcl_Obj * of length n, use

Tcl_Obj * *args = LangAllocVec(n); … LangFreeVec(n,args);

You can set the values of the Tcl_Obj *s using LangSet... functions, and get string value using LangString.

If you want to merge an array of Tcl_Obj *s into one Tcl_Obj * (that will be an array variable), use

result = Tcl_Merge(listLength, list);

Translation of some TCL functions

We mark items that can be dealt with by munge by Autoconverted.

“Tcl_AppendResult”
does not take (char*)NULL, but NULL as delimiter. Autoconverted.

“Tcl_CreateCommand”, “Tcl_DeleteCommand”
Tk_CreateWidget, Tk_DeleteWidget, the second argument is the window itself, not the pathname. Autoconverted.

“sprintf(interp->result, “%d %d %d %d”,…)”
Tcl_IntResults(interp,4,0,...). Autoconverted.

“interp->result = “1”;”
Tcl_SetResult(interp,"1", TCL_STATIC). Autoconverted.

Reading “interp->result”
Tcl_GetResult(interp). Autoconverted.

“interp->result = Tk_PathName(textPtr->tkwin);”
Tk_WidgetResult(interp,textPtr->tkwin). Autoconverted.

Sequence “Tcl_PrintDouble, Tcl_PrintDouble, …, Tcl_AppendResult”
Use a single command void Tcl_DoubleResults(Tcl_Interp *interp, int append, int argc,…); append governs whether it is required to clear the result first. A similar command for int arguments is Tcl_IntResults.

“Tcl_SplitList”
Use Lang_SplitList (see the description above).

Translation back to TCL

To use your portableTk program with TCL, put

#include “ptcl.h”

before inclusion of tk.h, and link the resulting code with ptclGlue.c.

These files currently implement the following:

Additional config types:
TK_CONFIG_CALLBACK TK_CONFIG_LANGARG TK_CONFIG_SCALARVAR TK_CONFIG_HASHVAR TK_CONFIG_ARRAYVAR TK_CONFIG_IMAGE

Types:
Var, Tcl_Obj *, LangCallback, LangFreeProc.

Functions and macros:
Lang_SplitList, LangString, LangSetString, LangSetDefault, LangSetInt, LangSetDouble Tcl_ArgResult, LangCallbackArg, LangSaveVar, LangFreeVar, LangFreeSplitProc, LangFreeArg, Tcl_DoubleResults, Tcl_IntResults, LangDoCallback, Tk_WidgetResult, Tcl_CreateCommand, Tcl_DeleteCommand, Tcl_GetResult.

Current implementation contains enough to make it possible to compile mTk/tkText*.[ch] with the virgin Tk.

New types of events ????

PortableTk defines following new types of events:

TK_EVENTTYPE_NONE TK_EVENTTYPE_STRING TK_EVENTTYPE_NUMBER TK_EVENTTYPE_WINDOW TK_EVENTTYPE_ATOM TK_EVENTTYPE_DISPLAY TK_EVENTTYPE_DATA

and a function

char * Tk_EventInfo(int letter, Tk_Window tkwin, XEvent *eventPtr, KeySym keySym, int *numPtr, int *isNum, int *type, int num_size, char *numStorage)

Checking for trouble

If you start with working TCL code, you can start conversion using the above hints. Good indication that you are doing is OK is absence of sprintf and sscanf in your code (at least in the part that is working with interpreter).

Additional API

What is described here is not included into base portableTk distribution. Currently it is coded in TCL and as Perl macros (core is coded as functions, so theoretically you can use the same object files with different interpreted languages).

“ListFactory”

Dynamic arrays in TCL are used for two different purposes: to construct strings, and to construct lists. These two usages will have separate interfaces in other languages (since list is a different type from a string), so you should use a different interface in your code.

The type for construction of dynamic lists is ListFactory. The API below is a counterpart of the API for construction of dynamic lists in TCL:

void ListFactoryInit(ListFactory *) void ListFactoryFinish(ListFactory *) void ListFactoryFree(ListFactory *) Tcl_Obj * * ListFactoryArg(ListFactory *) void ListFactoryAppend(ListFactory *, Tcl_Obj * *arg) void ListFactoryAppendCopy(ListFactory *, Tcl_Obj * *arg) ListFactory * ListFactoryNewLevel(ListFactory *) ListFactory * ListFactoryEndLevel(ListFactory *) void ListFactoryResult(Tcl_Interp *, ListFactory *)

The difference is that a call to ListFactoryFinish should precede the actual usage of the value of ListFactory, and there are two different ways to append an Tcl_Obj * to a ListFactory: ListFactoryAppendCopy() guarantees that the value of arg is copied to the list, but ListFactoryAppend() may append to the list a reference to the current value of arg. If you are not going to change the value of arg after appending, the call to ListFactoryAppend may be quicker.

As in TCL, the call to ListFactoryFree() does not free the ListFactory, only the objects it references.

The functions ListFactoryNewLevel() and ListFactoryEndLevel() return a pointer to a ListFactory to fill. The argument of ListFactoryEndLevel() cannot be used after a call to this function.

DStrings

Production of strings are still supported in portableTk.

Accessing “Tcl_Obj *“s

The following functions for getting a value of an Tcl_Obj * may be provided:

double LangDouble(Tcl_Obj *) int LangInt(Tcl_Obj *) long LangLong(Tcl_Obj *) int LangIsList(Tcl_Obj * arg)

The function LangIsList() is supported only partially under TCL, since there is no data types. It checks whether there is a space inside the string arg.

Assigning numbers to “Tcl_Obj *“s

While LangSetDouble() and LangSetInt() are supported ways to assign numbers to assign an integer value to a variable, for the sake of efficiency under TCL it is supposed that the destination of these commands was massaged before the call so it contains a long enough string to sprintf() the numbers inside it. If you are going to immediately use the resulting Tcl_Obj *, the best way to do this is to declare a buffer in the beginning of a block by

dArgBuffer;

and assign this buffer to the Tcl_Obj * by

void LangSetDefaultBuffer(Tcl_Obj * *)

You can also create the buffer(s) manually and assign them using

void LangSetBuffer(Tcl_Obj * *, char *)

This is the only choice if you need to assign numeric values to several Tcl_Obj *s simultaneously. The advantage of the first approach is that the above declarations can be made nops in different languages.

Note that if you apply LangSetDefaultBuffer to an Tcl_Obj * that contains some value, you can create a leak if you do not free that Tcl_Obj * first. This is a non-problem in real languages, but can be a trouble in TCL, unless you use only the above API.

Creating new “Tcl_Obj *“s

The API for creating a new Tcl_Obj * is

void LangNewArg(Tcl_Obj * *, LangFreeProc *)

The API for creating a new Tcl_Obj * is absent. Just initialize Tcl_Obj * to be NULL, and apply one of LangSet... methods.

After you use this Tcl_Obj *, it should be freed thusly:

LangFreeArg(arg, freeProc).

Evaluating a list

Use

int LangArgEval(Tcl_Interp *, Tcl_Obj * arg)

Here arg should be a list to evaluate, in particular, the first element should be a LangCallback massaged to be an Tcl_Obj *. The arguments can be send to the subroutine by reference or by value in different languages.

Getting result as “Tcl_Obj *”

Use Tcl_ArgResult. It is not guaranteed that result survives this operation, so the Tcl_Obj * you get should be the only mean to access the data from this moment on. After you use this Tcl_Obj *, you should free it with freeProc LANG_DYNAMIC (you can do LangSet…() in between).

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1923 - Linux cli command scanf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command scanf and provides detailed information about the command scanf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the scanf.

NAME 🖥️ scanf 🖥️

input FILE format conversion

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int scanf(const char *restrict format, ...);
int fscanf(FILE *restrict stream,
 const char *restrict format, ...);
#include <stdarg.h>
int vscanf(const char *restrict format, va_list ap);
int vfscanf(FILE *restrict stream,
 const char *restrict format, va_list ap);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

vscanf(), vfscanf():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The scanf() family of functions scans formatted input like sscanf(3), but read from a FILE. It is very difficult to use these functions correctly, and it is preferable to read entire lines with fgets(3) or getline(3) and parse them later with sscanf(3) or more specialized functions such as strtol(3).

The scanf() function reads input from the standard input stream stdin and fscanf() reads input from the stream pointer stream.

The vfscanf() function is analogous to vfprintf(3) and reads input from the stream pointer stream using a variable argument list of pointers (see stdarg(3). The vscanf() function is analogous to vprintf(3) and reads from the standard input.

RETURN VALUE

On success, these functions return the number of input items successfully matched and assigned; this can be fewer than provided for, or even zero, in the event of an early matching failure.

The value EOF is returned if the end of input is reached before either the first successful conversion or a matching failure occurs. EOF is also returned if a read error occurs, in which case the error indicator for the stream (see ferror(3)) is set, and errno is set to indicate the error.

ERRORS

EAGAIN
The file descriptor underlying stream is marked nonblocking, and the read operation would block.

EBADF
The file descriptor underlying stream is invalid, or not open for reading.

EILSEQ
Input byte sequence does not form a valid character.

EINTR
The read operation was interrupted by a signal; see signal(7).

EINVAL
Not enough arguments; or format is NULL.

ENOMEM
Out of memory.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

scanf(), fscanf(), vscanf(), vfscanf()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

CAVEATS

These functions make it difficult to distinguish newlines from other white space, This is especially problematic with line-buffered input, like the standard input stream.

These functions can’t report errors after the last non-suppressed conversion specification.

BUGS

It is impossible to accurately know how many characters these functions have consumed from the input stream, since they only report the number of successful conversions. For example, if the input is “123 a”, scanf("%d %d", &a, &b) will consume the digits, the newline, and the space, but not the letter a. This makes it difficult to recover from invalid input.

SEE ALSO

fgets(3), getline(3), sscanf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1924 - Linux cli command Tk_ProgressBarpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_ProgressBarpm and provides detailed information about the command Tk_ProgressBarpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_ProgressBarpm.

NAME 🖥️ Tk_ProgressBarpm 🖥️

A graphical progress bar

SYNOPSIS

use Tk::ProgressBar; $progress = $parent->ProgressBar( -width => 20, -length => 200, -anchor => s, -from => 0, -to => 100, -blocks => 10, -colors => [0, green, 50, yellow , 80, red], -variable => \percent_done ); $progress->value($position);

DESCRIPTION

Tk::ProgressBar provides a widget which will show a graphical representation of a value, given maximum and minimum reference values.

STANDARD OPTIONS

The following standard widget options are supported:

-borderwidth

-highlightthickness

Defaults to 0.

-padx
Defaults to 0.

-pady
Defaults to 0.

-relief
Defaults to sunken

-troughcolor
The color to be used for the background (trough) of the progress bar. Default is to use grey55.

WIDGET-SPECIFIC OPTIONS

-anchor
This can be used to position the start point of the bar. Default is ‘w’ (horizontal bar starting from the left). A vertical bar can be configured by using either ’s’ or ’n’.

-blocks
This controls the number of blocks to be used to construct the progress bar. The default is to break the bar into 10 blocks.

-colors
Controls the colors to be used for different positions of the progress bar. The colors should be supplied as a reference to an array containing pairs of positions and colors. -colors => [ 0, green, 50, red ] means that for the range 0 to 50 the progress bar should be green and for higher values it should be red.

-from
This sets the lower limit of the progress bar. If the bar is set to a value below the lower limt no bar will be displayed. Defaults to 0. See the -to description for more information.

-gap
This is the spacing (in pixels) between each block. Defaults to 1. Use 0 to get a continuous bar.

-length
Specifies the desired long dimension of the ProgressBar in screen units (i.e. any of the forms acceptable to Tk_GetPixels). For vertical ProgressBars this is the ProgressBars height; for horizontal scales it is the ProgressBars width. The default length is calculated from the values of -padx, -borderwidth, -highlightthickness and the difference between -from and -to.

-resolution
A real value specifying the resolution for the scale. If this value is greater than zero then the scale’s value will always be rounded to an even multiple of this value, as will tick marks and the endpoints of the scale. If the value is less than zero then no rounding occurs. Defaults to 1 (i.e., the value will be integral).

-to
This sets the upper limit of the progress bar. If a value is specified (for example, using the value method) that lies above this value the full progress bar will be displayed. Defaults to 100.

-variable
Specifies the reference to a scalar variable to link to the ProgressBar. Whenever the value of the variable changes, the ProgressBar will update to reflect this value. (See also the value method below.)

-value
This can be used to set the current position of the progress bar when used in conjunction with the standard configure. It is usually recommended to use the value method instead.

-width
Specifies the desired narrow dimension of the ProgressBar in screen units (i.e. any of the forms acceptable to Tk_GetPixels). For vertical ProgressBars this is the ProgressBars width; for horizontal bars this is the ProgressBars height. The default width is derived from the values of -borderwidth and -pady and -highlightthickness.

WIDGET METHODS

$ProgressBar->value(?value?)
If value is omitted, returns the current value of the ProgressBar. If value is given, the value of the ProgressBar is set. If $value is given but undefined the value of the option -from is used.

AUTHOR

Graham Barr <[email protected]>

COPYRIGHT

Copyright (c) 1997-1998 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1925 - Linux cli command XtUnregisterDrawable

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtUnregisterDrawable and provides detailed information about the command XtUnregisterDrawable, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtUnregisterDrawable.

NAME 🖥️ XtUnregisterDrawable 🖥️

register a drawable with the Intrinsics event dispatcher

SYNTAX

#include <X11/Intrinsic.h>

void XtRegisterDrawable(Display* display, Drawable drawable, Widget widget);

void XtUnregisterDrawable(Display* display, Drawable drawable);

ARGUMENTS

display
Specifies the drawable’s display.

drawable
Specifies the drawable to register.

widget
Specifies the widget to register the drawable for.

DESCRIPTION

XtRegisterDrawable associates the specified drawable with the specified widget so that future calls to XtWindowToWidget with the drawable will return the widget. The default event dispatcher will dispatch future core events that arrive with the drawable to the widget as though the event contained the widget’s window, but the event itself will not be changed in any way when being passed to even handler or action procedures.

If the drawable is already registered with another widget, or if the drawable is the window of a widget in the client’s widget tree, the results of calling XtRegisterDrawable are undefined.

XtUnregisterDrawable removes an association created with XtRegisterDrawable. If the drawable is the window of a widget in the client’s widget tree the results of calling XtUnregisterDrawable are undefined.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1926 - Linux cli command Net_DNS_RR_DHCIDpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_DHCIDpm and provides detailed information about the command Net_DNS_RR_DHCIDpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_DHCIDpm.

NAME 🖥️ Net_DNS_RR_DHCIDpm 🖥️

DNS DHCID resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(client.example.com. DHCID ( AAAB xLmlskllE0MVjd57zHcWmEH3pCQ6VytcKD//7es/deY=); $rr = Net::DNS::RR->new( name => client.example.com, type => DHCID, digest => ObfuscatedIdentityData, digesttype => 1, identifiertype => 2, );

DESCRIPTION

DNS RR for Encoding DHCP Information (DHCID)

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

identifiertype

$identifiertype = $rr->identifiertype; $rr->identifiertype( $identifiertype );

The 16-bit identifier type describes the form of host identifier used to construct the DHCP identity information.

digesttype

$digesttype = $rr->digesttype; $rr->digesttype( $digesttype );

The 8-bit digest type number describes the message-digest algorithm used to obfuscate the DHCP identity information.

digest

$digest = $rr->digest; $rr->digest( $digest );

Binary representation of the digest of DHCP identity information.

COPYRIGHT

Copyright (c)2009 Olaf Kolkman, NLnet Labs.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC4701 <https://tools.ietf.org/html/rfc4701>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1927 - Linux cli command Moose_Meta_Role_Method_Requiredpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Role_Method_Requiredpm and provides detailed information about the command Moose_Meta_Role_Method_Requiredpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Role_Method_Requiredpm.

NAME 🖥️ Moose_Meta_Role_Method_Requiredpm 🖥️

A Moose metaclass for required methods in Roles

VERSION

version 2.2207

DESCRIPTION

INHERITANCE

Moose::Meta::Role::Method::Required is a subclass of Class::MOP::Object. It is not a subclass of Moose::Meta::Role::Method since it does not provide an implementation of the method.

METHODS

Moose::Meta::Role::Method::Required->new(%options)

This creates a new type constraint based on the provided %options:

  • name The method name. This is required.

$method->name

Returns the required method’s name, as provided to the constructor.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1928 - Linux cli command passwd2des

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command passwd2des and provides detailed information about the command passwd2des, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the passwd2des.

NAME 🖥️ passwd2des 🖥️

RFS password encryption

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <rpc/des_crypt.h>
void passwd2des(char *passwd, char *key);
int xencrypt(char *secret, char *passwd);
int xdecrypt(char *secret, char *passwd);

DESCRIPTION

WARNING: Do not use these functions in new code. They do not achieve any type of acceptable cryptographic security guarantees.

The function passwd2des() takes a character string passwd of arbitrary length and fills a character array key of length 8. The array key is suitable for use as DES key. It has odd parity set in bit 0 of each byte. Both other functions described here use this function to turn their argument passwd into a DES key.

The xencrypt() function takes the ASCII character string secret given in hex, which must have a length that is a multiple of 16, encrypts it using the DES key derived from passwd by passwd2des(), and outputs the result again in secret as a hex string of the same length.

The xdecrypt() function performs the converse operation.

RETURN VALUE

The functions xencrypt() and xdecrypt() return 1 on success and 0 on error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

passwd2des(), xencrypt(), xdecrypt()

Thread safetyMT-Safe

VERSIONS

These functions are available since glibc 2.1.

BUGS

The prototypes are missing from the abovementioned include file.

SEE ALSO

cbc_crypt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1929 - Linux cli command in6_addrtype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command in6_addrtype and provides detailed information about the command in6_addrtype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the in6_addrtype.

NAME 🖥️ in6_addrtype 🖥️

socket address

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/socket.h>
struct sockaddr {
 sa_family_t sa_family; /* Address family */
 char sa_data[]; /* Socket address */
};
struct sockaddr_storage {
 sa_family_t ss_family; /* Address family */
};
typedef /* ... */ socklen_t;
typedef /* ... */ sa_family_t;

Internet domain sockets

#include <netinet/in.h>
struct sockaddr_in {
 sa_family_t sin_family; /* AF_INET */
 in_port_t sin_port; /* Port number */
 struct in_addr sin_addr; /* IPv4 address */
};
struct sockaddr_in6 {
 sa_family_t sin6_family; /* AF_INET6 */
 in_port_t sin6_port; /* Port number */
 uint32_t sin6_flowinfo; /* IPv6 flow info */
 struct in6_addr sin6_addr; /* IPv6 address */
 uint32_t sin6_scope_id; /* Set of interfaces for a scope */
};
struct in_addr {
 in_addr_t s_addr;
};
struct in6_addr {
 uint8_t s6_addr[16];
};
typedef uint32_t in_addr_t;
typedef uint16_t in_port_t;

UNIX domain sockets

#include <sys/un.h>
struct sockaddr_un {
 sa_family_t sun_family; /* Address family */
 char sun_path[]; /* Socket pathname */
};

DESCRIPTION

sockaddr
Describes a socket address.

sockaddr_storage
A structure at least as large as any other sockaddr_* address structures. It’s aligned so that a pointer to it can be cast as a pointer to other sockaddr_* structures and used to access its fields.

socklen_t
Describes the length of a socket address. This is an integer type of at least 32 bits.

sa_family_t
Describes a socket’s protocol family. This is an unsigned integer type.

Internet domain sockets

sockaddr_in
Describes an IPv4 Internet domain socket address. The sin_port and sin_addr members are stored in network byte order.

sockaddr_in6
Describes an IPv6 Internet domain socket address. The sin6_addr.s6_addr array is used to contain a 128-bit IPv6 address, stored in network byte order.

UNIX domain sockets

sockaddr_un
Describes a UNIX domain socket address.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

socklen_t was invented by POSIX. See also accept(2).

These structures were invented before modern ISO C strict-aliasing rules. If aliasing rules are applied strictly, these structures would be extremely difficult to use without invoking Undefined Behavior. POSIX Issue 8 will fix this by requiring that implementations make sure that these structures can be safely used as they were designed.

NOTES

socklen_t is also defined in <netdb.h>.

sa_family_t is also defined in <netinet/in.h> and <sys/un.h>.

SEE ALSO

accept(2), bind(2), connect(2), getpeername(2), getsockname(2), getsockopt(2), sendto(2), setsockopt(2), socket(2), socketpair(2), getaddrinfo(3), gethostbyaddr(3), getnameinfo(3), htonl(3), ipv6(7), socket(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1930 - Linux cli command pcap_next_expcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_next_expcap and provides detailed information about the command pcap_next_expcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_next_expcap.

NAME 🖥️ pcap_next_expcap 🖥️

read the next packet from a pcap_t

SYNOPSIS

#include <pcap/pcap.h>
int pcap_next_ex(pcap_t *p, struct pcap_pkthdr **pkt_header,
const u_char **pkt_data);
const u_char *pcap_next(pcap_t *p, struct pcap_pkthdr *h);

DESCRIPTION

pcap_next_ex() reads the next packet and returns a success/failure indication. If the packet was read without problems, the pointer pointed to by the pkt_header argument is set to point to the pcap_pkthdr struct for the packet, and the pointer pointed to by the pkt_data argument is set to point to the data in the packet. The struct pcap_pkthdr and the packet data are not to be freed by the caller, and are not guaranteed to be valid after the next call to pcap_next_ex(), pcap_next(), pcap_loop(3PCAP), or pcap_dispatch(3PCAP); if the code needs them to remain valid, it must make a copy of them.

pcap_next() reads the next packet (by calling pcap_dispatch() with a cnt of 1) and returns a u_char pointer to the data in that packet. The packet data is not to be freed by the caller, and is not guaranteed to be valid after the next call to pcap_next_ex(), pcap_next(), pcap_loop(), or pcap_dispatch(); if the code needs it to remain valid, it must make a copy of it. The pcap_pkthdr structure pointed to by h is filled in with the appropriate values for the packet.

The bytes of data from the packet begin with a link-layer header. The format of the link-layer header is indicated by the return value of the pcap_datalink(3PCAP) routine when handed the pcap_t value also passed to pcap_loop() or pcap_dispatch(). https://www.tcpdump.org/linktypes.html lists the values pcap_datalink() can return and describes the packet formats that correspond to those values. The value it returns will be valid for all packets received unless and until pcap_set_datalink(3PCAP) is called; after a successful call to pcap_set_datalink(), all subsequent packets will have a link-layer header of the type specified by the link-layer header type value passed to pcap_set_datalink().

Do NOT assume that the packets for a given capture or ``savefile`` will have any given link-layer header type, such as DLT_EN10MB for Ethernet. For example, the “any” device on Linux will have a link-layer header type of DLT_LINUX_SLL or DLT_LINUX_SLL2 even if all devices on the system at the time the “any” device is opened have some other data link type, such as DLT_EN10MB for Ethernet.

RETURN VALUE

pcap_next_ex() returns 1 if the packet was read without problems, 0 if packets are being read from a live capture and the packet buffer timeout expired, PCAP_ERROR_BREAK if packets are being read from a ``savefile’’ and there are no more packets to read from the savefile, PCAP_ERROR_NOT_ACTIVATED if called on a capture handle that has been created but not activated, or PCAP_ERROR if an error occurred while reading the packet. If PCAP_ERROR is returned, pcap_geterr(3PCAP) or pcap_perror(3PCAP) may be called with p as an argument to fetch or display the error text.

pcap_next() returns a pointer to the packet data on success, and returns NULL if an error occurred, or if no packets were read from a live capture (if, for example, they were discarded because they didn’t pass the packet filter, or if, on platforms that support a packet buffer timeout that starts before any packets arrive, the timeout expires before any packets arrive, or if the file descriptor for the capture device is in non-blocking mode and no packets were available to be read), or if no more packets are available in a ``savefile.’’ Unfortunately, there is no way to determine whether an error occurred or not.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1931 - Linux cli command Net_DNS_RR_DELEGpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_DELEGpm and provides detailed information about the command Net_DNS_RR_DELEGpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_DELEGpm.

NAME 🖥️ Net_DNS_RR_DELEGpm 🖥️

DNS DELEG resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(alias DELEG 0 target); $rr = Net::DNS::RR->new(domain DELEG 1 nameserver ipv6hint=2001:db8::f00);

DESCRIPTION

DNS DELEG resource record

The DELEG record appears in, and is logically a part of, the parent zone to mark the delegation point for a child zone. It advertises, directly or indirectly, transport methods available for connection to nameservers serving the child zone.

The DELEG class is derived from, and inherits all properties of, the Net::DNS::RR::SVCB class.

Please see the Net::DNS::RR::SVCB documentation for details.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

COPYRIGHT

Copyright (c)2024 Dick Franks.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR Net::DNS::RR::SVCB

RFC9460 <https://tools.ietf.org/html/rfc9460>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1932 - Linux cli command pthread_cleanup_pop_restore_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_cleanup_pop_restore_np and provides detailed information about the command pthread_cleanup_pop_restore_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_cleanup_pop_restore_np.

NAME 🖥️ pthread_cleanup_pop_restore_np 🖥️

push and pop thread cancelation clean-up handlers while saving cancelability type

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
void pthread_cleanup_push_defer_np(void (*routine)(void *), void *arg);
void pthread_cleanup_pop_restore_np(int execute);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

pthread_cleanup_push_defer_np(), pthread_cleanup_pop_defer_np():

    _GNU_SOURCE

DESCRIPTION

These functions are the same as pthread_cleanup_push(3) and pthread_cleanup_pop(3), except for the differences noted on this page.

Like pthread_cleanup_push(3), pthread_cleanup_push_defer_np() pushes routine onto the thread’s stack of cancelation clean-up handlers. In addition, it also saves the thread’s current cancelability type, and sets the cancelability type to “deferred” (see pthread_setcanceltype(3)); this ensures that cancelation clean-up will occur even if the thread’s cancelability type was “asynchronous” before the call.

Like pthread_cleanup_pop(3), pthread_cleanup_pop_restore_np() pops the top-most clean-up handler from the thread’s stack of cancelation clean-up handlers. In addition, it restores the thread’s cancelability type to its value at the time of the matching pthread_cleanup_push_defer_np().

The caller must ensure that calls to these functions are paired within the same function, and at the same lexical nesting level. Other restrictions apply, as described in pthread_cleanup_push(3).

This sequence of calls:

pthread_cleanup_push_defer_np(routine, arg);
pthread_cleanup_pop_restore_np(execute);

is equivalent to (but shorter and more efficient than):

int oldtype;
pthread_cleanup_push(routine, arg);
pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);
...
pthread_setcanceltype(oldtype, NULL);
pthread_cleanup_pop(execute);

STANDARDS

GNU; hence the suffix “_np” (nonportable) in the names.

HISTORY

glibc 2.0

SEE ALSO

pthread_cancel(3), pthread_cleanup_push(3), pthread_setcancelstate(3), pthread_testcancel(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1933 - Linux cli command HTTP_DAV_Lockpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTTP_DAV_Lockpm and provides detailed information about the command HTTP_DAV_Lockpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTTP_DAV_Lockpm.

NAME 🖥️ HTTP_DAV_Lockpm 🖥️

Represents a WebDAV Lock.

SYNOPSIS

Need example

DESCRIPTION

ACCESSOR METHODS

Timeout This parameter can take an absolute or relative timeout. The following forms are all valid for the -timeout field:
Timeouts in: 300 30s 30 seconds from now 10m ten minutes from now 1h one hour from now 1d tomorrow 3M in three months 10y in ten years time Timeout at: 2000-02-31 00:40:33 at the indicated time & date For more time and date formats that are handled see HTTP::Date RFC2518 states that the timeout value MUST NOT be greater than 2^32-1. If this occurs it will simply set the timeout to infinity

$r->as_string()
Method returning a textual representation of the request. Mainly useful for debugging purposes. It takes no arguments.

SEE ALSO

HTTP::Headers, HTTP::Message, HTTP::Request::Common

COPYRIGHT

Copyright 2000 Patrick Collins.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1934 - Linux cli command XML_XPathEngine_NodeSetpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_XPathEngine_NodeSetpm and provides detailed information about the command XML_XPathEngine_NodeSetpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_XPathEngine_NodeSetpm.

NAME 🖥️ XML_XPathEngine_NodeSetpm 🖥️

a list of XML document nodes

DESCRIPTION

An XML::XPathEngine::NodeSet object contains an ordered list of nodes. The nodes each take the same format as described in XML::XPathEngine::XMLParser.

SYNOPSIS

my $results = $xp->find(//someelement); if (!$results->isa(XML::XPathEngine::NodeSet)) { print “Found $results “; exit; } foreach my $context ($results->get_nodelist) { my $newresults = $xp->find(./other/element, $context); … }

API

new()

You will almost never have to create a new NodeSet object, as it is all done for you by XPath.

get_nodelist()

Returns a list of nodes. See XML::XPathEngine::XMLParser for the format of the nodes.

string_value()

Returns the string-value of the first node in the list. See the XPath specification for what string-value means.

string_values()

Returns a list of the string-values of all the nodes in the list.

to_literal()

Returns the concatenation of all the string-values of all the nodes in the list.

get_node($pos)

Returns the node at $pos. The node position in XPath is based at 1, not 0.

size()

Returns the number of nodes in the NodeSet.

pop()

Equivalent to perl’s pop function.

push(@nodes)

Equivalent to perl’s push function.

append($nodeset)

Given a nodeset, appends the list of nodes in $nodeset to the end of the current list.

shift()

Equivalent to perl’s shift function.

unshift(@nodes)

Equivalent to perl’s unshift function.

prepend($nodeset)

Given a nodeset, prepends the list of nodes in $nodeset to the front of the current list.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1935 - Linux cli command pcap_open_offline_with_tstamp_precisionpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_open_offline_with_tstamp_precisionpcap and provides detailed information about the command pcap_open_offline_with_tstamp_precisionpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_open_offline_with_tstamp_precisionpcap.

NAME 🖥️ pcap_open_offline_with_tstamp_precisionpcap 🖥️

open a saved capture file for reading

SYNOPSIS

#include <pcap/pcap.h>
char errbuf[PCAP_ERRBUF_SIZE];
pcap_t *pcap_open_offline(const char *fname, char *errbuf);
pcap_t *pcap_open_offline_with_tstamp_precision(const char *fname,
    u_int precision, char *errbuf);
pcap_t *pcap_fopen_offline(FILE *fp, char *errbuf);
pcap_t *pcap_fopen_offline_with_tstamp_precision(FILE *fp,
    u_int precision, char *errbuf);

DESCRIPTION

pcap_open_offline() and pcap_open_offline_with_tstamp_precision() are called to open a ``savefile’’ for reading.

fname specifies the name of the file to open. The file can have the pcap file format as described in pcap-savefile(5), which is the file format used by, among other programs, tcpdump(1) and tcpslice(1), or can have the pcapng file format, although not all pcapng files can be read. The name “-” is a synonym for stdin.

pcap_open_offline_with_tstamp_precision() takes an additional precision argument specifying the time stamp precision desired; if PCAP_TSTAMP_PRECISION_MICRO is specified, packet time stamps will be supplied in seconds and microseconds, and if PCAP_TSTAMP_PRECISION_NANO is specified, packet time stamps will be supplied in seconds and nanoseconds. If the time stamps in the file do not have the same precision as the requested precision, they will be scaled up or down as necessary before being supplied.

Alternatively, you may call pcap_fopen_offline() or pcap_fopen_offline_with_tstamp_precision() to read dumped data from an existing open stream fp. pcap_fopen_offline_with_tstamp_precision() takes an additional precision argument as described above. Note that on Windows, that stream should be opened in binary mode.

RETURN VALUE

pcap_open_offline(), pcap_open_offline_with_tstamp_precision(), pcap_fopen_offline(), and pcap_fopen_offline_with_tstamp_precision() return a pcap_t * on success and NULL on failure. If NULL is returned, errbuf is filled in with an appropriate error message. errbuf is assumed to be able to hold at least PCAP_ERRBUF_SIZE chars.

BACKWARD COMPATIBILITY

pcap_open_offline_with_tstamp_precision() and pcap_fopen_offline_with_tstamp_precision() became available in libpcap release 1.5.1. In previous releases, time stamps from a savefile are always given in seconds and microseconds.

SEE ALSO

pcap(3PCAP), pcap-savefile(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1936 - Linux cli command LIST_INSERT_BEFORE

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LIST_INSERT_BEFORE and provides detailed information about the command LIST_INSERT_BEFORE, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LIST_INSERT_BEFORE.

NAME 🖥️ LIST_INSERT_BEFORE 🖥️

implementation of a doubly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
LIST_ENTRY(TYPE);
LIST_HEAD(HEADNAME, TYPE);
LIST_HEAD LIST_HEAD_INITIALIZER(LIST_HEAD head);
void LIST_INIT(LIST_HEAD *head);
int LIST_EMPTY(LIST_HEAD *head);
void LIST_INSERT_HEAD(LIST_HEAD *head,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
struct TYPE *LIST_FIRST(LIST_HEAD *head);
struct TYPE *LIST_NEXT(struct TYPE *elm, LIST_ENTRY NAME);
LIST_FOREACH(struct TYPE *var, LIST_HEAD *head, LIST_ENTRY NAME);
void LIST_REMOVE(struct TYPE *elm, LIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type LIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro LIST_HEAD().

Creation

A list is headed by a structure defined by the LIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are doubly linked so that an arbitrary element can be removed without traversing the list. New elements can be added to the list after an existing element, before an existing element, or at the head of the list. A LIST_HEAD structure is declared as follows:

LIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

LIST_ENTRY() declares a structure that connects the elements in the list.

LIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

LIST_INIT() initializes the list referenced by head.

LIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

LIST_INSERT_HEAD() inserts the new element elm at the head of the list.

LIST_INSERT_BEFORE() inserts the new element elm before the element listelm.

LIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

LIST_FIRST() returns the first element in the list, or NULL if the list is empty.

LIST_NEXT() returns the next element in the list, or NULL if this is the last.

LIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

LIST_REMOVE() removes the element elm from the list.

RETURN VALUE

LIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

LIST_FIRST(), and LIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

LIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

LIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. LIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    LIST_ENTRY(entry) entries;              /* List */
};
LIST_HEAD(listhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct listhead head;                   /* List head */
    int i;
    LIST_INIT(&head);                       /* Initialize the list */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    LIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    LIST_INSERT_AFTER(n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    LIST_INSERT_BEFORE(n2, n3, entries);
    i = 0;                                  /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        np->data = i++;
    LIST_REMOVE(n2, entries);               /* Deletion */
    free(n2);
                                            /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* List deletion */ n1 = LIST_FIRST(&head); while (n1 != NULL) { n2 = LIST_NEXT(n1, entries); free(n1); n1 = n2; } LIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1937 - Linux cli command scalblnf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command scalblnf and provides detailed information about the command scalblnf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the scalblnf.

NAME 🖥️ scalblnf 🖥️

multiply floating-point number by integral power of radix

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double scalbln(double x, long exp);
float scalblnf(float x, long exp);
long double scalblnl(long double x, long exp);
double scalbn(double x, int exp);
float scalbnf(float x, int exp);
long double scalbnl(long double x, int exp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

scalbln(), scalblnf(), scalblnl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE

scalbn(), scalbnf(), scalbnl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions multiply their first argument x by FLT_RADIX (probably 2) to the power of exp, that is:

    x * FLT_RADIX ** exp

The definition of FLT_RADIX can be obtained by including <float.h>.

RETURN VALUE

On success, these functions return x * FLT_RADIX ** exp.

If x is a NaN, a NaN is returned.

If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.

If x is +0 (-0), +0 (-0) is returned.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with a sign the same as x.

If the result underflows, a range error occurs, and the functions return zero, with a sign the same as x.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error, overflow
An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error, underflow
errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

scalbn(), scalbnf(), scalbnl(), scalbln(), scalblnf(), scalblnl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

HISTORY

These functions differ from the obsolete functions described in scalb(3) in the type of their second argument. The functions described on this page have a second argument of an integral type, while those in scalb(3) have a second argument of type double.

NOTES

If FLT_RADIX equals 2 (which is usual), then scalbn() is equivalent to ldexp(3).

BUGS

Before glibc 2.20, these functions did not set errno for range errors.

SEE ALSO

ldexp(3), scalb(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1938 - Linux cli command log1pl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command log1pl and provides detailed information about the command log1pl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the log1pl.

NAME 🖥️ log1pl 🖥️

logarithm of 1 plus argument

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double log1p(double x);
float log1pf(float x);
long double log1pl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

log1p():
    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

log1pf(), log1pl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return a value equivalent to

    log (1 + x)

The result is computed in a way that is accurate even if the value of x is near zero.

RETURN VALUE

On success, these functions return the natural logarithm of (1 + x).

If x is a NaN, a NaN is returned.

If x is positive infinity, positive infinity is returned.

If x is -1, a pole error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.

If x is less than -1 (including negative infinity), a domain error occurs, and a NaN (not a number) is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is less than -1
errno is set to EDOM (but see BUGS). An invalid floating-point exception (FE_INVALID) is raised.

Pole error: x is -1
errno is set to ERANGE (but see BUGS). A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

log1p(), log1pf(), log1pl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

BUGS

Before glibc 2.22, the glibc implementation did not set errno to EDOM when a domain error occurred.

Before glibc 2.22, the glibc implementation did not set errno to ERANGE when a range error occurred.

SEE ALSO

exp(3), expm1(3), log(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1939 - Linux cli command nan

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command nan and provides detailed information about the command nan, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the nan.

NAME 🖥️ nan 🖥️

floating-point constants

LIBRARY

Math library (libm)

SYNOPSIS

#define _ISOC99_SOURCE /* See feature_test_macros(7) */
#include <math.h>
INFINITY
NAN
HUGE_VAL
HUGE_VALF
HUGE_VALL

DESCRIPTION

The macro INFINITY expands to a float constant representing positive infinity.

The macro NAN expands to a float constant representing a quiet NaN (when supported). A quiet NaN is a NaN (“not-a-number”) that does not raise exceptions when it is used in arithmetic. The opposite is a signaling NaN. See IEC 60559:1989.

The macros HUGE_VAL, HUGE_VALF, HUGE_VALL expand to constants of types double, float, and long double, respectively, that represent a large positive value, possibly positive infinity.

STANDARDS

C11.

HISTORY

C99.

On a glibc system, the macro HUGE_VAL is always available. Availability of the NAN macro can be tested using #ifdef NAN, and similarly for INFINITY, HUGE_VALF, HUGE_VALL. They will be defined by <math.h> if _ISOC99_SOURCE or _GNU_SOURCE is defined, or __STDC_VERSION__ is defined and has a value not less than 199901L.

SEE ALSO

fpclassify(3), math_error(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1940 - Linux cli command svcerr_noprog

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command svcerr_noprog and provides detailed information about the command svcerr_noprog, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the svcerr_noprog.

NAME 🖥️ svcerr_noprog 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1941 - Linux cli command XtUnrealizeWidget

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtUnrealizeWidget and provides detailed information about the command XtUnrealizeWidget, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtUnrealizeWidget.

NAME 🖥️ XtUnrealizeWidget 🖥️

realize and unrealize widgets

SYNTAX

#include <X11/Intrinsic.h>

void XtRealizeWidget(Widget w);

Boolean XtIsRealized(Widget w);

void XtUnrealizeWidget(Widget w);

ARGUMENTS

  1. Specifies the widget.

DESCRIPTION

If the widget is already realized, XtRealizeWidget simply returns. Otherwise, it performs the following:

  • Binds all action names in the widget’s translation table to procedures (see Section 10.1.2).

  • Makes a post-order traversal of the widget tree rooted at the specified widget and calls the change_managed procedure of each composite widget that has one or more managed children.

  • Constructs an XSetWindowAttributes structure filled in with information derived from the Core widget fields and calls the realize procedure for the widget, which adds any widget-specific attributes and creates the X window.

  • If the widget is not a subclass of compositeWidgetClass, XtRealizeWidget returns; otherwise, it continues and performs the following:

    • Descends recursively to each of the widget’s managed children and calls the realize procedures. Primitive widgets that instantiate children are responsible for realizing those children themselves.

    • Maps all of the managed children windows that have mapped_when_managed True. (If a widget is managed but mapped_when_managed is False, the widget is allocated visual space but is not displayed. Some people seem to like this to indicate certain states.)

If the widget is a top-level shell widget (that is, it has no parent), and mapped_when_managed is True, XtRealizeWidget maps the widget window.

The XtIsRealized function returns True if the widget has been realized, that is, if the widget has a nonzero X window ID.

Some widget procedures (for example, set_values) might wish to operate differently after the widget has been realized.

The XtUnrealizeWidget function destroys the windows of an existing widget and all of its children (recursively down the widget tree). To recreate the windows at a later time, call XtRealizeWidget again. If the widget was managed, it will be unmanaged automatically before its window is freed.

SEE ALSO

XtManageChildren(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1942 - Linux cli command zip_source_keep

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_keep and provides detailed information about the command zip_source_keep, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_keep.

libzip (-lzip)

The function

increments the reference count of

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1943 - Linux cli command pthread_getname_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_getname_np and provides detailed information about the command pthread_getname_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_getname_np.

NAME 🖥️ pthread_getname_np 🖥️

set/get the name of a thread

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <pthread.h>
int pthread_setname_np(pthread_t thread, const char *name);
int pthread_getname_np(pthread_t thread, char name[.size], size_t size);

DESCRIPTION

By default, all the threads created using pthread_create() inherit the program name. The pthread_setname_np() function can be used to set a unique name for a thread, which can be useful for debugging multithreaded applications. The thread name is a meaningful C language string, whose length is restricted to 16 characters, including the terminating null byte (‘�’). The thread argument specifies the thread whose name is to be changed; name specifies the new name.

The pthread_getname_np() function can be used to retrieve the name of the thread. The thread argument specifies the thread whose name is to be retrieved. The buffer name is used to return the thread name; size specifies the number of bytes available in name. The buffer specified by name should be at least 16 characters in length. The returned thread name in the output buffer will be null terminated.

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

The pthread_setname_np() function can fail with the following error:

ERANGE
The length of the string specified pointed to by name exceeds the allowed limit.

The pthread_getname_np() function can fail with the following error:

ERANGE
The buffer specified by name and size is too small to hold the thread name.

If either of these functions fails to open /proc/self/task/tid/comm, then the call may fail with one of the errors described in open(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_setname_np(), pthread_getname_np()

Thread safetyMT-Safe

STANDARDS

GNU; hence the suffix “_np” (nonportable) in the names.

HISTORY

glibc 2.12.

NOTES

pthread_setname_np() internally writes to the thread-specific comm file under the /proc filesystem: /proc/self/task/tid/comm. pthread_getname_np() retrieves it from the same location.

EXAMPLES

The program below demonstrates the use of pthread_setname_np() and pthread_getname_np().

The following shell session shows a sample run of the program:

$ ./a.out
Created a thread. Default name is: a.out
The thread name after setting it is THREADFOO.
^Z                           # Suspend the program
[1]+  Stopped           ./a.out
$ ps H -C a.out -o 'pid tid cmd comm'
  PID   TID CMD                         COMMAND
 5990  5990 ./a.out                     a.out
 5990  5991 ./a.out                     THREADFOO
$ cat /proc/5990/task/5990/comm
a.out
$ cat /proc/5990/task/5991/comm
THREADFOO

Program source

#define _GNU_SOURCE
#include <err.h>
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#define NAMELEN 16
static void *
threadfunc(void *parm)
{
    sleep(5);          // allow main program to set the thread name
    return NULL;
}
int
main(int argc, char *argv[])
{
    pthread_t thread;
    int rc;
    char thread_name[NAMELEN];
    rc = pthread_create(&thread, NULL, threadfunc, NULL);
    if (rc != 0)
        errc(EXIT_FAILURE, rc, "pthread_create");
    rc = pthread_getname_np(thread, thread_name, NAMELEN);
    if (rc != 0)
        errc(EXIT_FAILURE, rc, "pthread_getname_np");
    printf("Created a thread. Default name is: %s

“, thread_name); rc = pthread_setname_np(thread, (argc > 1) ? argv[1] : “THREADFOO”); if (rc != 0) errc(EXIT_FAILURE, rc, “pthread_setname_np”); sleep(2); rc = pthread_getname_np(thread, thread_name, NAMELEN); if (rc != 0) errc(EXIT_FAILURE, rc, “pthread_getname_np”); printf(“The thread name after setting it is %s. “, thread_name); rc = pthread_join(thread, NULL); if (rc != 0) errc(EXIT_FAILURE, rc, “pthread_join”); printf(“Done “); exit(EXIT_SUCCESS); }

SEE ALSO

prctl(2), pthread_create(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1944 - Linux cli command Image_ExifTool_XMPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_XMPpm and provides detailed information about the command Image_ExifTool_XMPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_XMPpm.

NAME 🖥️ Image_ExifTool_XMPpm 🖥️

Read XMP meta information

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

XMP stands for Extensible Metadata Platform. It is a format based on XML that Adobe developed for embedding metadata information in image files. This module contains the definitions required by Image::ExifTool to read XMP information.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.adobe.com/devnet/xmp/>

<http://www.w3.org/TR/rdf-syntax-grammar/>

<http://www.iptc.org/IPTC4XMP/>

SEE ALSO

“XMP Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1945 - Linux cli command rresvport_af

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command rresvport_af and provides detailed information about the command rresvport_af, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the rresvport_af.

NAME 🖥️ rresvport_af 🖥️

routines for returning a stream to a remote command

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h> /* Or <unistd.h> on some systems */
int rcmd(char **restrict ahost, unsigned short inport,
 const char *restrict locuser,
 const char *restrict remuser,
 const char *restrict cmd, int *restrict fd2p);
int rresvport(int *port);
int iruserok(uint32_t raddr, int superuser,
 const char *ruser, const char *luser);
int ruserok(const char *rhost, int superuser,
 const char *ruser, const char *luser);
int rcmd_af(char **restrict ahost, unsigned short inport,
 const char *restrict locuser,
 const char *restrict remuser,
 const char *restrict cmd, int *restrict fd2p,
 sa_family_t af);
int rresvport_af(int *port, sa_family_t af);
int iruserok_af(const void *restrict raddr, int superuser,
 const char *restrict ruser, const char *restrict luser,
 sa_family_t af);
int ruserok_af(const char *rhost, int superuser,
 const char *ruser, const char *luser,
 sa_family_t af);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

rcmd(), rcmd_af(), rresvport(), rresvport_af(), iruserok(), iruserok_af(), ruserok(), ruserok_af():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The rcmd() function is used by the superuser to execute a command on a remote machine using an authentication scheme based on privileged port numbers. The rresvport() function returns a file descriptor to a socket with an address in the privileged port space. The iruserok() and ruserok() functions are used by servers to authenticate clients requesting service with rcmd(). All four functions are used by the rshd(8) server (among others).

rcmd()

The rcmd() function looks up the host *ahost using gethostbyname(3), returning -1 if the host does not exist. Otherwise, *ahost is set to the standard name of the host and a connection is established to a server residing at the well-known Internet port inport.

If the connection succeeds, a socket in the Internet domain of type SOCK_STREAM is returned to the caller, and given to the remote command as stdin and stdout. If fd2p is nonzero, then an auxiliary channel to a control process will be set up, and a file descriptor for it will be placed in *fd2p. The control process will return diagnostic output from the command (unit 2) on this channel, and will also accept bytes on this channel as being UNIX signal numbers, to be forwarded to the process group of the command. If fd2p is 0, then the stderr (unit 2 of the remote command) will be made the same as the stdout and no provision is made for sending arbitrary signals to the remote process, although you may be able to get its attention by using out-of-band data.

The protocol is described in detail in rshd(8).

rresvport()

The rresvport() function is used to obtain a socket with a privileged port bound to it. This socket is suitable for use by rcmd() and several other functions. Privileged ports are those in the range 0 to 1023. Only a privileged process (on Linux, a process that has the CAP_NET_BIND_SERVICE capability in the user namespace governing its network namespace) is allowed to bind to a privileged port. In the glibc implementation, this function restricts its search to the ports from 512 to 1023. The port argument is value-result: the value it supplies to the call is used as the starting point for a circular search of the port range; on (successful) return, it contains the port number that was bound to.

iruserok() and ruserok()

The iruserok() and ruserok() functions take a remote host’s IP address or name, respectively, two usernames and a flag indicating whether the local user’s name is that of the superuser. Then, if the user is not the superuser, it checks the /etc/hosts.equiv file. If that lookup is not done, or is unsuccessful, the .rhosts in the local user’s home directory is checked to see if the request for service is allowed.

If this file does not exist, is not a regular file, is owned by anyone other than the user or the superuser, is writable by anyone other than the owner, or is hardlinked anywhere, the check automatically fails. Zero is returned if the machine name is listed in the hosts.equiv file, or the host and remote username are found in the .rhosts file; otherwise iruserok() and ruserok() return -1. If the local domain (as obtained from gethostname(2)) is the same as the remote domain, only the machine name need be specified.

If the IP address of the remote host is known, iruserok() should be used in preference to ruserok(), as it does not require trusting the DNS server for the remote host’s domain.

*_af() variants

All of the functions described above work with IPv4 (AF_INET) sockets. The “_af” variants take an extra argument that allows the socket address family to be specified. For these functions, the af argument can be specified as AF_INET or AF_INET6. In addition, rcmd_af() supports the use of AF_UNSPEC.

RETURN VALUE

The rcmd() function returns a valid socket descriptor on success. It returns -1 on error and prints a diagnostic message on the standard error.

The rresvport() function returns a valid, bound socket descriptor on success. On failure, it returns -1 and sets errno to indicate the error. The error code EAGAIN is overloaded to mean: “All network ports in use”.

For information on the return from ruserok() and iruserok(), see above.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

rcmd(), rcmd_af()

Thread safetyMT-Unsafe

rresvport(), rresvport_af()

Thread safetyMT-Safe

iruserok(), ruserok(), iruserok_af(), ruserok_af()

Thread safetyMT-Safe locale

STANDARDS

BSD.

HISTORY

iruserok_af()
rcmd_af()
rresvport_af()
ruserok_af()
glibc 2.2.

Solaris, 4.2BSD. The “_af” variants are more recent additions, and are not present on as wide a range of systems.

BUGS

iruserok() and iruserok_af() are declared in glibc headers only since glibc 2.12.

SEE ALSO

rlogin(1), rsh(1), rexec(3), rexecd(8), rlogind(8), rshd(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1946 - Linux cli command pcap_nextpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_nextpcap and provides detailed information about the command pcap_nextpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_nextpcap.

NAME 🖥️ pcap_nextpcap 🖥️

read the next packet from a pcap_t

SYNOPSIS

#include <pcap/pcap.h>
int pcap_next_ex(pcap_t *p, struct pcap_pkthdr **pkt_header,
const u_char **pkt_data);
const u_char *pcap_next(pcap_t *p, struct pcap_pkthdr *h);

DESCRIPTION

pcap_next_ex() reads the next packet and returns a success/failure indication. If the packet was read without problems, the pointer pointed to by the pkt_header argument is set to point to the pcap_pkthdr struct for the packet, and the pointer pointed to by the pkt_data argument is set to point to the data in the packet. The struct pcap_pkthdr and the packet data are not to be freed by the caller, and are not guaranteed to be valid after the next call to pcap_next_ex(), pcap_next(), pcap_loop(3PCAP), or pcap_dispatch(3PCAP); if the code needs them to remain valid, it must make a copy of them.

pcap_next() reads the next packet (by calling pcap_dispatch() with a cnt of 1) and returns a u_char pointer to the data in that packet. The packet data is not to be freed by the caller, and is not guaranteed to be valid after the next call to pcap_next_ex(), pcap_next(), pcap_loop(), or pcap_dispatch(); if the code needs it to remain valid, it must make a copy of it. The pcap_pkthdr structure pointed to by h is filled in with the appropriate values for the packet.

The bytes of data from the packet begin with a link-layer header. The format of the link-layer header is indicated by the return value of the pcap_datalink(3PCAP) routine when handed the pcap_t value also passed to pcap_loop() or pcap_dispatch(). https://www.tcpdump.org/linktypes.html lists the values pcap_datalink() can return and describes the packet formats that correspond to those values. The value it returns will be valid for all packets received unless and until pcap_set_datalink(3PCAP) is called; after a successful call to pcap_set_datalink(), all subsequent packets will have a link-layer header of the type specified by the link-layer header type value passed to pcap_set_datalink().

Do NOT assume that the packets for a given capture or ``savefile`` will have any given link-layer header type, such as DLT_EN10MB for Ethernet. For example, the “any” device on Linux will have a link-layer header type of DLT_LINUX_SLL or DLT_LINUX_SLL2 even if all devices on the system at the time the “any” device is opened have some other data link type, such as DLT_EN10MB for Ethernet.

RETURN VALUE

pcap_next_ex() returns 1 if the packet was read without problems, 0 if packets are being read from a live capture and the packet buffer timeout expired, PCAP_ERROR_BREAK if packets are being read from a ``savefile’’ and there are no more packets to read from the savefile, PCAP_ERROR_NOT_ACTIVATED if called on a capture handle that has been created but not activated, or PCAP_ERROR if an error occurred while reading the packet. If PCAP_ERROR is returned, pcap_geterr(3PCAP) or pcap_perror(3PCAP) may be called with p as an argument to fetch or display the error text.

pcap_next() returns a pointer to the packet data on success, and returns NULL if an error occurred, or if no packets were read from a live capture (if, for example, they were discarded because they didn’t pass the packet filter, or if, on platforms that support a packet buffer timeout that starts before any packets arrive, the timeout expires before any packets arrive, or if the file descriptor for the capture device is in non-blocking mode and no packets were available to be read), or if no more packets are available in a ``savefile.’’ Unfortunately, there is no way to determine whether an error occurred or not.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1947 - Linux cli command XShmCreateImage

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XShmCreateImage and provides detailed information about the command XShmCreateImage, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XShmCreateImage.

NAME 🖥️ XShmCreateImage 🖥️

X Shared Memory extension functions

SYNTAX

#include <X11/Xlib.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
Bool	XShmQueryExtension(
	Display *display);
Bool XShmQueryVersion(
	Display *display;
	int *major, *minor;
	Bool *pixmaps);
int XShmPixmapFormat(
	Display *display);
Bool XShmAttach(
	Display *display;
	XShmSegmentInfo *shminfo);
Bool XShmDetach(
	Display *display;
	XShmSegmentInfo *shminfo);

XImage *XShmCreateImage (
	Display *display;
	Visual *visual;
	unsigned int depth;
	int format;
	char *data;
	XShmSegmentInfo *shminfo;
	unsigned int width, height);
Bool XShmPutImage(
	Display *display;
	Drawable d;
	GC gc;
	XImage *image;
	int src_x, src_y, dest_x, dest_y;
	unsigned int width, height;
	bool send_event);
Bool XShmGetImage (
	Display *display;
	Drawable d;
	XImage *image;
	int x, y;
	unsigned long plane_mask);
Pixmap XShmCreatePixmap(
        Display *display;
        Drawable d;
        char *data;
	XShmSegmentInfo *shminfo;
	unsigned int width, height, depth);
Status XShmGetEventBase(
	Display *display);

STRUCTURES

Events:
typedef struct {
    int type;               /* of event */
    unsigned long serial;   /* # of last request processed by server*/
    Bool send_event;        /* true if this came from a SendEvent request*/
    Display *display;       /* Display the event was read from */
    Drawable drawable;      /* drawable of request */
    int major_code;         /* ShmReqCode */
    int minor_code;         /* X_ShmPutImage */
    ShmSeg shmseg;          /* the ShmSeg used in the request*/
    unsigned long offset;   /* the offset into ShmSeg used in the request*/
} XShmCompletionEvent;
a structure of type XShmSegmentInfo :

typedef struct {
    ShmSeg shmseg;      /* resource id */
    int shmid;          /* kernel id */
    char *shmaddr;      /* address in client */
    Bool readOnly;      /* how the server should attach it */
} XShmSegmentInfo;

DESCRIPTION

* XShmQueryExtension * checks to see if the shared memory extensions are available for the specified display.

* XShmQueryVersion * returns the version numbers of the extension implementation. Shared memory pixmaps are supported if the pixmaps argument returns true.

* XShmAttach * tells the server to attach to your shared memory segment. If all goes well, you will get a non-zero status, back and your XImage is ready for use.

* XShmDetach * tells the server to detach from your shared memory segment.

* XShmPutImage * combines an image in memory with a shape of the specified drawable. If XYBitmap format is used, the depth must be one, or a ``BadMatch’’ error results. The foreground pixel in the GC defines the source for the one bits in the image, and the background pixel defines the source for the zero bits. For XYPixmap and ZPixmap, the depth must match the depth of the drawable, or a ``BadMatch’’ error results.

* XShmGetImage * reads image data into a shared memory XImage where display is the display of interest, drawable is the source drawable, image is the destination XImage, x and y are offsets within the drawable, and plane_mask defines which planes are to be read.

* XShmCreateImage * allocates the memory needed for an XImage structure for the specified display but does not allocate space for the image itself.

* XShmPixmapFormat * gets the format for the server. If your application can deal with the server pixmap data format, a shared memory segment and shminfo structure are created.

* XShmCreatePixmap * points to a pixmap which you can manipulate in all of the usual ways, with the added bonus of being able to edit its contents directly through the shared memory segment.

* XShmGetEventBase * gets the completion event value.

SEE ALSO

MIT-SHM - The MIT Shared Memory Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1948 - Linux cli command Image_ExifTool_JSONpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_JSONpm and provides detailed information about the command Image_ExifTool_JSONpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_JSONpm.

NAME 🖥️ Image_ExifTool_JSONpm 🖥️

Read JSON files

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool read information from JSON files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

“JSON Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1949 - Linux cli command Tk_Pixmappm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Pixmappm and provides detailed information about the command Tk_Pixmappm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Pixmappm.

NAME 🖥️ Tk_Pixmappm 🖥️

Create color images from XPM files.

SYNOPSIS

$widget->Pixmap?(name?,options?)?

DESCRIPTION

XPM is a popular X Window image file format for storing color icons. The Pixmap image type can be used to create color images using XPM files.

Pixmaps support the following options:

-data => string
Specifies the contents of the source pixmap as a string. The string must adhere to the XPM file format (e.g., as generated by the pixmap (1) program). If both the -data and -file options are specified, the -data option takes precedence. Please note that the XPM file parsing code in the xpm library is somewhat fragile. The first line of the string must be “/* XPM */” or otherwise a segmatation fault will be caused.

-file => name
name gives the name of a file whose contents define the source pixmap. The file must adhere to the XPM file format (e.g., as generated by the pixmap (1) program).

IMAGE METHODS

When a pixmap image is created, Tk also creates a new object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above.

SEE ALSO

Tk::Image

KEYWORDS

pixmap, image, tix

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1950 - Linux cli command mallinfo2

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mallinfo2 and provides detailed information about the command mallinfo2, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mallinfo2.

NAME 🖥️ mallinfo2 🖥️

obtain memory allocation information

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <malloc.h>
struct mallinfo mallinfo(void);
struct mallinfo2 mallinfo2(void);

DESCRIPTION

These functions return a copy of a structure containing information about memory allocations performed by malloc(3) and related functions. The structure returned by each function contains the same fields. However, the older function, mallinfo(), is deprecated since the type used for the fields is too small (see BUGS).

Note that not all allocations are visible to these functions; see BUGS and consider using malloc_info(3) instead.

The mallinfo2 structure returned by mallinfo2() is defined as follows:

struct mallinfo2 {
    size_t arena;     /* Non-mmapped space allocated (bytes) */
    size_t ordblks;   /* Number of free chunks */
    size_t smblks;    /* Number of free fastbin blocks */
    size_t hblks;     /* Number of mmapped regions */
    size_t hblkhd;    /* Space allocated in mmapped regions
                         (bytes) */
    size_t usmblks;   /* See below */
    size_t fsmblks;   /* Space in freed fastbin blocks (bytes) */
    size_t uordblks;  /* Total allocated space (bytes) */
    size_t fordblks;  /* Total free space (bytes) */
    size_t keepcost;  /* Top-most, releasable space (bytes) */
};

The mallinfo structure returned by the deprecated mallinfo() function is exactly the same, except that the fields are typed as int.

The structure fields contain the following information:

arena
The total amount of memory allocated by means other than mmap(2) (i.e., memory allocated on the heap). This figure includes both in-use blocks and blocks on the free list.

ordblks
The number of ordinary (i.e., non-fastbin) free blocks.

smblks
The number of fastbin free blocks (see mallopt(3)).

hblks
The number of blocks currently allocated using mmap(2). (See the discussion of M_MMAP_THRESHOLD in mallopt(3).)

hblkhd
The number of bytes in blocks currently allocated using mmap(2).

usmblks
This field is unused, and is always 0. Historically, it was the “highwater mark” for allocated space—that is, the maximum amount of space that was ever allocated (in bytes); this field was maintained only in nonthreading environments.

fsmblks
The total number of bytes in fastbin free blocks.

uordblks
The total number of bytes used by in-use allocations.

fordblks
The total number of bytes in free blocks.

keepcost
The total amount of releasable free space at the top of the heap. This is the maximum number of bytes that could ideally (i.e., ignoring page alignment restrictions, and so on) be released by malloc_trim(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mallinfo(), mallinfo2()

Thread safety

MT-Unsafe init const:mallopt

mallinfo()/ mallinfo2() would access some global internal objects. If modify them with non-atomically, may get inconsistent results. The identifier mallopt in const:mallopt mean that mallopt() would modify the global internal objects with atomics, that make sure mallinfo()/ mallinfo2() is safe enough, others modify with non-atomically maybe not.

STANDARDS

None.

HISTORY

mallinfo()
glibc 2.0. SVID.

mallinfo2()
glibc 2.33.

BUGS

Information is returned for only the main memory allocation area. Allocations in other arenas are excluded. See malloc_stats(3) and malloc_info(3) for alternatives that include information about other arenas.

The fields of the mallinfo structure that is returned by the older mallinfo() function are typed as int. However, because some internal bookkeeping values may be of type long, the reported values may wrap around zero and thus be inaccurate.

EXAMPLES

The program below employs mallinfo2() to retrieve memory allocation statistics before and after allocating and freeing some blocks of memory. The statistics are displayed on standard output.

The first two command-line arguments specify the number and size of blocks to be allocated with malloc(3).

The remaining three arguments specify which of the allocated blocks should be freed with free(3). These three arguments are optional, and specify (in order): the step size to be used in the loop that frees blocks (the default is 1, meaning free all blocks in the range); the ordinal position of the first block to be freed (default 0, meaning the first allocated block); and a number one greater than the ordinal position of the last block to be freed (default is one greater than the maximum block number). If these three arguments are omitted, then the defaults cause all allocated blocks to be freed.

In the following example run of the program, 1000 allocations of 100 bytes are performed, and then every second allocated block is freed:

$ ./a.out 1000 100 2
============== Before allocating blocks ==============
Total non-mmapped bytes (arena):       0
# of free chunks (ordblks):            1
# of free fastbin blocks (smblks):     0
# of mapped regions (hblks):           0
Bytes in mapped regions (hblkhd):      0
Max. total allocated space (usmblks):  0
Free bytes held in fastbins (fsmblks): 0
Total allocated space (uordblks):      0
Total free space (fordblks):           0
Topmost releasable block (keepcost):   0
============== After allocating blocks ==============
Total non-mmapped bytes (arena):       135168
# of free chunks (ordblks):            1
# of free fastbin blocks (smblks):     0
# of mapped regions (hblks):           0
Bytes in mapped regions (hblkhd):      0
Max. total allocated space (usmblks):  0
Free bytes held in fastbins (fsmblks): 0
Total allocated space (uordblks):      104000
Total free space (fordblks):           31168
Topmost releasable block (keepcost):   31168
============== After freeing blocks ==============
Total non-mmapped bytes (arena):       135168
# of free chunks (ordblks):            501
# of free fastbin blocks (smblks):     0
# of mapped regions (hblks):           0
Bytes in mapped regions (hblkhd):      0
Max. total allocated space (usmblks):  0
Free bytes held in fastbins (fsmblks): 0
Total allocated space (uordblks):      52000
Total free space (fordblks):           83168
Topmost releasable block (keepcost):   31168

Program source

#include <malloc.h>
#include <stdlib.h>
#include <string.h>
static void
display_mallinfo2(void)
{
    struct mallinfo2 mi;
    mi = mallinfo2();
    printf("Total non-mmapped bytes (arena):       %zu

“, mi.arena); printf(”# of free chunks (ordblks): %zu “, mi.ordblks); printf(”# of free fastbin blocks (smblks): %zu “, mi.smblks); printf(”# of mapped regions (hblks): %zu “, mi.hblks); printf(“Bytes in mapped regions (hblkhd): %zu “, mi.hblkhd); printf(“Max. total allocated space (usmblks): %zu “, mi.usmblks); printf(“Free bytes held in fastbins (fsmblks): %zu “, mi.fsmblks); printf(“Total allocated space (uordblks): %zu “, mi.uordblks); printf(“Total free space (fordblks): %zu “, mi.fordblks); printf(“Topmost releasable block (keepcost): %zu “, mi.keepcost); } int main(int argc, char *argv[]) { #define MAX_ALLOCS 2000000 char *alloc[MAX_ALLOCS]; size_t blockSize, numBlocks, freeBegin, freeEnd, freeStep; if (argc < 3 || strcmp(argv[1], “–help”) == 0) { fprintf(stderr, “%s num-blocks block-size [free-step " “[start-free [end-free]]] “, argv[0]); exit(EXIT_FAILURE); } numBlocks = atoi(argv[1]); blockSize = atoi(argv[2]); freeStep = (argc > 3) ? atoi(argv[3]) : 1; freeBegin = (argc > 4) ? atoi(argv[4]) : 0; freeEnd = (argc > 5) ? atoi(argv[5]) : numBlocks; printf("============== Before allocating blocks ============== “); display_mallinfo2(); for (size_t j = 0; j < numBlocks; j++) { if (numBlocks >= MAX_ALLOCS) { fprintf(stderr, “Too many allocations “); exit(EXIT_FAILURE); } alloc[j] = malloc(blockSize); if (alloc[j] == NULL) { perror(“malloc”); exit(EXIT_FAILURE); } } printf(” ============== After allocating blocks ============== “); display_mallinfo2(); for (size_t j = freeBegin; j < freeEnd; j += freeStep) free(alloc[j]); printf(” ============== After freeing blocks ============== “); display_mallinfo2(); exit(EXIT_SUCCESS); }

SEE ALSO

mmap(2), malloc(3), malloc_info(3), malloc_stats(3), malloc_trim(3), mallopt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1951 - Linux cli command PA_FLAG_LONG_DOUBLEconst

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command PA_FLAG_LONG_DOUBLEconst and provides detailed information about the command PA_FLAG_LONG_DOUBLEconst, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the PA_FLAG_LONG_DOUBLEconst.

NAME 🖥️ PA_FLAG_LONG_DOUBLEconst 🖥️

define custom behavior for printf-like functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <printf.h>
int register_printf_specifier(int spec, printf_function func,
 printf_arginfo_size_function arginfo);
int register_printf_modifier(const wchar_t *str);
int register_printf_type(printf_va_arg_function fct);

Callbacks

typedef int printf_function(FILE *stream, const struct printf_info *info,
 const void *const args[]);
typedef int printf_arginfo_size_function(const struct printf_info *info,
 size_t n, int argtypes[n], int size[n]);
typedef void printf_va_arg_function(void *mem, va_list *ap);

Types

struct printf_info {
 int prec; // Precision
 int width; // Width
 wchar_t spec; // Format letter
 unsigned int is_long_double:1;// L or ll flag
 unsigned int is_short:1; // h flag
 unsigned int is_long:1; // l flag
 unsigned int alt:1; // # flag
 unsigned int space:1; // Space flag
 unsigned int left:1; // - flag
 unsigned int showsign:1; // + flag
 unsigned int group:1; // ' flag
 unsigned int extra:1; // For special use
 unsigned int is_char:1; // hh flag
 unsigned int wide:1; // True for wide character streams
 unsigned int i18n:1; // I flag
 unsigned int is_binary128:1; /* Floating-point argument is
  ABI-compatible with
  IEC 60559 binary128 */
 unsigned short user; // Bits for user-installed modifiers
 wchar_t pad; // Padding character
};

Constants

#define PA_FLAG_LONG_LONG /* ... */
#define PA_FLAG_LONG_DOUBLE /* ... */
#define PA_FLAG_LONG /* ... */
#define PA_FLAG_SHORT /* ... */
#define PA_FLAG_PTR /* ... */

DESCRIPTION

These functions serve to extend and/or modify the behavior of the printf(3) family of functions.

register_printf_specifier()

This function registers a custom conversion specifier for the printf(3) family of functions.

spec
The character which will be used as a conversion specifier in the format string.

func
Callback function that will be executed by the printf(3) family of functions to format the input arguments into the output stream.

stream
Output stream where the formatted output should be printed. This stream transparently represents the output, even in the case of functions that write to a string.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in arginfo.

args
Array of pointers to the arguments to the printf(3) -like function.

arginfo
Callback function that will be executed by the printf(3) family of functions to know how many arguments should be parsed for the custom specifier and also their types.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in func.

n
Number of arguments remaining to be parsed.

argtypes
This array should be set to define the type of each of the arguments that will be parsed. Each element in the array represents one of the arguments to be parsed, in the same order that they are passed to the printf(3) -like function. Each element should be set to a base type (PA_*) from the enum above, or a custom one, and optionally ORed with an appropriate length modifier (PA_FLAG_*).

The type is determined by using one of the following constants:

PA_INT
int.

PA_CHAR
int, cast to char.

PA_WCHAR
wchar_t.

PA_STRING
const char *, a ‘�’-terminated string.

PA_WSTRING
const wchar_t *, a wide character L’�’-terminated string.

PA_POINTER
void *.

PA_FLOAT
float.

PA_DOUBLE
double.

PA_LAST
TODO.

size
For user-defined types, the size of the type (in bytes) should also be specified through this array. Otherwise, leave it unused.

arginfo is called before func, and prepares some information needed to call func.

register_printf_modifier()

TODO

register_printf_type()

TODO

RETURN VALUE

register_printf_specifier(), register_printf_modifier(), and register_printf_type() return zero on success, or -1 on error.

Callbacks

The callback of type printf_function should return the number of characters written, or -1 on error.

The callback of type printf_arginfo_size_function should return the number of arguments to be parsed by this specifier. It also passes information about the type of those arguments to the caller through argtypes. On error, it should return -1.

ERRORS

EINVAL
The specifier was not a valid character.

STANDARDS

GNU.

HISTORY

register_printf_function(3) is an older function similar to register_printf_specifier(), and is now deprecated. That function can’t handle user-defined types.

register_printf_specifier() supersedes register_printf_function(3).

EXAMPLES

The following example program registers the ‘b’ and ‘B’ specifiers to print integers in binary format, mirroring rules for other unsigned conversion specifiers like ‘x’ and ‘u’. This can be used to print in binary prior to C23.

/* This code is in the public domain */
#include <err.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <printf.h>
#define GROUP_SEP  '\''
struct Printf_Pad {
    char    ch;
    size_t  len;
};
static int b_printf(FILE *stream, const struct printf_info *info,
                    const void *const args[]);
static int b_arginf_sz(const struct printf_info *info,
                    size_t n, int argtypes[n], int size[n]);
static uintmax_t b_value(const struct printf_info *info,
                    const void *arg);
static size_t b_bin_repr(char bin[UINTMAX_WIDTH],
                    const struct printf_info *info, const void *arg);
static size_t b_bin_len(const struct printf_info *info,
                    ptrdiff_t min_len);
static size_t b_pad_len(const struct printf_info *info,
                    ptrdiff_t bin_len);
static ssize_t b_print_prefix(FILE *stream,
                    const struct printf_info *info);
static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info,
                    ptrdiff_t min_len);
static ssize_t b_print_number(FILE *stream,
                    const struct printf_info *info,
                    const char bin[UINTMAX_WIDTH],
                    size_t min_len, size_t bin_len);
static char pad_ch(const struct printf_info *info);
static ssize_t pad_spaces(FILE *stream, size_t pad_len);
int
main(void)
{
    if (register_printf_specifier('b', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('b', ...)");
    if (register_printf_specifier('B', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('B', ...)");
    printf("....----....----....----....----

“); printf("%llb; “, 0x5Ellu); printf("%lB; “, 0x5Elu); printf("%b; “, 0x5Eu); printf("%hB; “, 0x5Eu); printf("%hhb; “, 0x5Eu); printf("%jb; “, (uintmax_t)0x5E); printf("%zb; “, (size_t)0x5E); printf(”….—-….—-….—-….—- “); printf(”%#b; “, 0x5Eu); printf(”%#B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf("%10b; “, 0x5Eu); printf("%010b; “, 0x5Eu); printf(”%.10b; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%-10B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%‘B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”….—-….—-….—-….—- “); printf(”%#16.12b; “, 0xAB); printf(”%-#‘20.12b; “, 0xAB); printf(”%#‘020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#020B; “, 0xAB); printf(”%‘020B; “, 0xAB); printf("%020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#021B; “, 0xAB); printf(”%‘021B; “, 0xAB); printf("%021B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#022B; “, 0xAB); printf(”%‘022B; “, 0xAB); printf("%022B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#023B; “, 0xAB); printf(”%‘023B; “, 0xAB); printf("%023B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%-#‘19.11b; “, 0xAB); printf(”%#‘019B; “, 0xAB); printf(”%#019B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%‘019B; “, 0xAB); printf("%019B; “, 0xAB); printf(”%#016b; “, 0xAB); printf(”….—-….—-….—-….—- “); return 0; } static int b_printf(FILE *stream, const struct printf_info *info, const void const args[]) { char bin[UINTMAX_WIDTH]; size_t min_len, bin_len; ssize_t len, tmp; struct Printf_Pad pad = {0}; len = 0; min_len = b_bin_repr(bin, info, args[0]); bin_len = b_bin_len(info, min_len); pad.ch = pad_ch(info); if (pad.ch == ’ ‘) pad.len = b_pad_len(info, bin_len); / Padding with ’ ’ (right aligned) / if ((pad.ch == ’ ‘) && !info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } / “0b”/“0B” prefix / if (info->alt) { tmp = b_print_prefix(stream, info); if (tmp == EOF) return EOF; len += tmp; } / Padding with ‘0’ / if (pad.ch == ‘0’) { tmp = b_pad_zeros(stream, info, min_len); if (tmp == EOF) return EOF; len += tmp; } / Print number (including leading 0s to fill precision) / tmp = b_print_number(stream, info, bin, min_len, bin_len); if (tmp == EOF) return EOF; len += tmp; / Padding with ’ ’ (left aligned) */ if (info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } return len; } static int b_arginf_sz(const struct printf_info *info, size_t n, int argtypes[n], [[maybe_unused]] int size[n]) { if (n < 1) return -1; if (info->is_long_double) argtypes[0] = PA_INT | PA_FLAG_LONG_LONG; else if (info->is_long) argtypes[0] = PA_INT | PA_FLAG_LONG; else argtypes[0] = PA_INT; return 1; } static uintmax_t b_value(const struct printf_info *info, const void *arg) { if (info->is_long_double) return *(const unsigned long long *)arg; if (info->is_long) return *(const unsigned long )arg; / short and char are both promoted to int */ return *(const unsigned int *)arg; } static size_t b_bin_repr(char bin[UINTMAX_WIDTH], const struct printf_info *info, const void *arg) { size_t min_len; uintmax_t val; val = b_value(info, arg); bin[0] = ‘0’; for (min_len = 0; val; min_len++) { bin[min_len] = ‘0’ + (val % 2); val »= 1; } return MAX(min_len, 1); } static size_t b_bin_len(const struct printf_info *info, ptrdiff_t min_len) { return MAX(info->prec, min_len); } static size_t b_pad_len(const struct printf_info *info, ptrdiff_t bin_len) { ptrdiff_t pad_len; pad_len = info->width - bin_len; if (info->alt) pad_len -= 2; if (info->group) pad_len -= (bin_len - 1) / 4; return MAX(pad_len, 0); } static ssize_t b_print_prefix(FILE *stream, const struct printf_info *info) { ssize_t len; len = 0; if (fputc(‘0’, stream) == EOF) return EOF; len++; if (fputc(info->spec, stream) == EOF) return EOF; len++; return len; } static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info, ptrdiff_t min_len) { ssize_t len; ptrdiff_t tmp; len = 0; tmp = info->width - (info->alt * 2); if (info->group) tmp -= tmp / 5 - !(tmp % 5); for (ptrdiff_t i = tmp - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static ssize_t b_print_number(FILE *stream, const struct printf_info info, const char bin[UINTMAX_WIDTH], size_t min_len, size_t bin_len) { ssize_t len; len = 0; / Print leading zeros to fill precision / for (size_t i = bin_len - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } / Print number */ for (size_t i = min_len - 1; i < min_len; i–) { if (fputc(bin[i], stream) == EOF) return EOF; len++; if (!info->group || (i % 4) || !i) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static char pad_ch(const struct printf_info *info) { if ((info->prec != -1) || (info->pad == ’ ‘) || info->left) return ’ ‘; return ‘0’; } static ssize_t pad_spaces(FILE *stream, size_t pad_len) { ssize_t len; len = 0; for (size_t i = pad_len - 1; i < pad_len; i–) { if (fputc(’ ‘, stream) == EOF) return EOF; len++; } return len; }

SEE ALSO

asprintf(3), printf(3), wprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1952 - Linux cli command zip_source_filep_create

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_filep_create and provides detailed information about the command zip_source_filep_create, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_filep_create.

libzip (-lzip)

The functions

and

create a zip source from a file stream. They read

bytes from offset

from the open file stream

If

is 0 or -1, the whole file (starting from

is used.

If the file stream supports seeking, the source can be used to open a read-only zip archive from.

The file stream is closed when the source is being freed, usually by

Upon successful completion, the created source is returned. Otherwise,

is returned and the error code in

or

is set to indicate the error.

fails if:

or

are invalid.

Required memory could not be allocated.

and

were added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1953 - Linux cli command Image_ExifTool_Rawzorpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Rawzorpm and provides detailed information about the command Image_ExifTool_Rawzorpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Rawzorpm.

NAME 🖥️ Image_ExifTool_Rawzorpm 🖥️

Read meta information from Rawzor compressed images

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to extract meta information from Rawzor compressed images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.rawzor.com/>

SEE ALSO

“Rawzor Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1954 - Linux cli command mpool

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mpool and provides detailed information about the command mpool, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mpool.

NAME 🖥️ mpool 🖥️

shared memory buffer pool

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <db.h>
#include <mpool.h>
MPOOL *mpool_open(DBT *key, int fd, pgno_t pagesize",pgno_t"maxcache);
void mpool_filter(MPOOL *mp, void (*pgin)(void *, pgno_t, void *),
 void (*pgout)(void *, pgno_t, void *),
 void *pgcookie);
void *mpool_new(MPOOL *mp, pgno_t *pgnoaddr);
void *mpool_get(MPOOL *mp, pgno_t pgno, unsigned int flags);
int mpool_put(MPOOL *mp, void *pgaddr, unsigned int flags);
int mpool_sync(MPOOL *mp);
int mpool_close(MPOOL *mp);

DESCRIPTION

Note well: This page documents interfaces provided up until glibc 2.1. Since glibc 2.2, glibc no longer provides these interfaces. Probably, you are looking for the APIs provided by the libdb library instead.

Mpool is the library interface intended to provide page oriented buffer management of files. The buffers may be shared between processes.

The function mpool_open() initializes a memory pool. The key argument is the byte string used to negotiate between multiple processes wishing to share buffers. If the file buffers are mapped in shared memory, all processes using the same key will share the buffers. If key is NULL, the buffers are mapped into private memory. The fd argument is a file descriptor for the underlying file, which must be seekable. If key is non-NULL and matches a file already being mapped, the fd argument is ignored.

The pagesize argument is the size, in bytes, of the pages into which the file is broken up. The maxcache argument is the maximum number of pages from the underlying file to cache at any one time. This value is not relative to the number of processes which share a file’s buffers, but will be the largest value specified by any of the processes sharing the file.

The mpool_filter() function is intended to make transparent input and output processing of the pages possible. If the pgin function is specified, it is called each time a buffer is read into the memory pool from the backing file. If the pgout function is specified, it is called each time a buffer is written into the backing file. Both functions are called with the pgcookie pointer, the page number and a pointer to the page to being read or written.

The function mpool_new() takes an MPOOL pointer and an address as arguments. If a new page can be allocated, a pointer to the page is returned and the page number is stored into the pgnoaddr address. Otherwise, NULL is returned and errno is set.

The function mpool_get() takes an MPOOL pointer and a page number as arguments. If the page exists, a pointer to the page is returned. Otherwise, NULL is returned and errno is set. The flags argument is not currently used.

The function mpool_put() unpins the page referenced by pgaddr. pgaddr must be an address previously returned by mpool_get() or mpool_new(). The flag value is specified by ORing any of the following values:

MPOOL_DIRTY
The page has been modified and needs to be written to the backing file.

mpool_put() returns 0 on success and -1 if an error occurs.

The function mpool_sync() writes all modified pages associated with the MPOOL pointer to the backing file. mpool_sync() returns 0 on success and -1 if an error occurs.

The mpool_close() function free’s up any allocated memory associated with the memory pool cookie. Modified pages are not written to the backing file. mpool_close() returns 0 on success and -1 if an error occurs.

ERRORS

The mpool_open() function may fail and set errno for any of the errors specified for the library routine malloc(3).

The mpool_get() function may fail and set errno for the following:

EINVAL
The requested record doesn’t exist.

The mpool_new() and mpool_get() functions may fail and set errno for any of the errors specified for the library routines read(2), write(2), and malloc(3).

The mpool_sync() function may fail and set errno for any of the errors specified for the library routine write(2).

The mpool_close() function may fail and set errno for any of the errors specified for the library routine free(3).

STANDARDS

BSD.

SEE ALSO

btree(3), dbopen(3), hash(3), recno(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1955 - Linux cli command uselocale

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command uselocale and provides detailed information about the command uselocale, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the uselocale.

NAME 🖥️ uselocale 🖥️

set/get the locale for the calling thread

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <locale.h>
locale_t uselocale(locale_t newloc);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

uselocale():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The uselocale() function sets the current locale for the calling thread, and returns the thread’s previously current locale. After a successful call to uselocale(), any calls by this thread to functions that depend on the locale will operate as though the locale has been set to newloc.

The newloc argument can have one of the following values:

A handle returned by a call to newlocale(3) or duplocale(3)
The calling thread’s current locale is set to the specified locale.

The special locale object handle LC_GLOBAL_LOCALE
The calling thread’s current locale is set to the global locale determined by setlocale(3).

(locale_t) 0
The calling thread’s current locale is left unchanged (and the current locale is returned as the function result).

RETURN VALUE

On success, uselocale() returns the locale handle that was set by the previous call to uselocale() in this thread, or LC_GLOBAL_LOCALE if there was no such previous call. On error, it returns (locale_t) 0, and sets errno to indicate the error.

ERRORS

EINVAL
newloc does not refer to a valid locale object.

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.3. POSIX.1-2008.

NOTES

Unlike setlocale(3), uselocale() does not allow selective replacement of individual locale categories. To employ a locale that differs in only a few categories from the current locale, use calls to duplocale(3) and newlocale(3) to obtain a locale object equivalent to the current locale and modify the desired categories in that object.

EXAMPLES

See newlocale(3) and duplocale(3).

SEE ALSO

locale(1), duplocale(3), freelocale(3), newlocale(3), setlocale(3), locale(5), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1956 - Linux cli command gethostbyname2

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gethostbyname2 and provides detailed information about the command gethostbyname2, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gethostbyname2.

NAME 🖥️ gethostbyname2 🖥️

get network host entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
void sethostent(int stayopen);
void endhostent(void);
[[deprecated]] extern int h_errno;
[[deprecated]] struct hostent *gethostbyname(const char *name);
[[deprecated]] struct hostent *gethostbyaddr(const void addr[.len],
 socklen_t len, int type);
[[deprecated]] void herror(const char *s);
[[deprecated]] const char *hstrerror(int err);
/* System V/POSIX extension */
struct hostent *gethostent(void);
/* GNU extensions */
[[deprecated]]
struct hostent *gethostbyname2(const char *name, int af);
int gethostent_r(struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyaddr_r(const void addr[restrict .len], socklen_t len,
 int type,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyname_r(const char *restrict name,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyname2_r(const char *restrict name, int af,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

gethostbyname2(), gethostent_r(), gethostbyaddr_r(), gethostbyname_r(), gethostbyname2_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc up to and including 2.19:
        _BSD_SOURCE || _SVID_SOURCE

herror(), hstrerror():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.8 to glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE
    Before glibc 2.8:
        none

h_errno:

    Since glibc 2.19
        _DEFAULT_SOURCE || _POSIX_C_SOURCE < 200809L
    glibc 2.12 to glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE || _POSIX_C_SOURCE < 200809L
    Before glibc 2.12:
        none

DESCRIPTION

The gethostbyname*(), gethostbyaddr*(), herror(), and hstrerror() functions are obsolete. Applications should use getaddrinfo(3), getnameinfo(3), and gai_strerror(3) instead.

The sethostent() function specifies, if stayopen is true (1), that a connected TCP socket should be used for the name server queries and that the connection should remain open during successive queries. Otherwise, name server queries will use UDP datagrams.

The endhostent() function ends the use of a TCP connection for name server queries.

The gethostbyname() function returns a structure of type hostent for the given host name. Here name is either a hostname or an IPv4 address in standard dot notation (as for inet_addr(3)). If name is an IPv4 address, no lookup is performed and gethostbyname() simply copies name into the h_name field and its struct in_addr equivalent into the h_addr_list[0] field of the returned hostent structure. If name doesn’t end in a dot and the environment variable HOSTALIASES is set, the alias file pointed to by HOSTALIASES will first be searched for name (see hostname(7) for the file format). The current domain and its parents are searched unless name ends in a dot.

The gethostbyaddr() function returns a structure of type hostent for the given host address addr of length len and address type type. Valid address types are AF_INET and AF_INET6 (defined in <sys/socket.h>). The host address argument is a pointer to a struct of a type depending on the address type, for example a struct in_addr * (probably obtained via a call to inet_addr(3)) for address type AF_INET.

The (obsolete) herror() function prints the error message associated with the current value of h_errno on stderr.

The (obsolete) hstrerror() function takes an error number (typically h_errno) and returns the corresponding message string.

The domain name queries carried out by gethostbyname() and gethostbyaddr() rely on the Name Service Switch (nsswitch.conf(5)) configured sources or a local name server (named(8)). The default action is to query the Name Service Switch (nsswitch.conf(5)) configured sources, failing that, a local name server (named(8)).

Historical

The nsswitch.conf(5) file is the modern way of controlling the order of host lookups.

In glibc 2.4 and earlier, the order keyword was used to control the order of host lookups as defined in /etc/host.conf (host.conf(5)).

The hostent structure is defined in <netdb.h> as follows:

struct hostent {
    char  *h_name;            /* official name of host */
    char **h_aliases;         /* alias list */
    int    h_addrtype;        /* host address type */
    int    h_length;          /* length of address */
    char **h_addr_list;       /* list of addresses */
}
#define h_addr h_addr_list[0] /* for backward compatibility */

The members of the hostent structure are:

h_name
The official name of the host.

h_aliases
An array of alternative names for the host, terminated by a null pointer.

h_addrtype
The type of address; always AF_INET or AF_INET6 at present.

h_length
The length of the address in bytes.

h_addr_list
An array of pointers to network addresses for the host (in network byte order), terminated by a null pointer.

h_addr
The first address in h_addr_list for backward compatibility.

RETURN VALUE

The gethostbyname() and gethostbyaddr() functions return the hostent structure or a null pointer if an error occurs. On error, the h_errno variable holds an error number. When non-NULL, the return value may point at static data, see the notes below.

ERRORS

The variable h_errno can have the following values:

HOST_NOT_FOUND
The specified host is unknown.

NO_DATA
The requested name is valid but does not have an IP address. Another type of request to the name server for this domain may return an answer. The constant NO_ADDRESS is a synonym for NO_DATA.

NO_RECOVERY
A nonrecoverable name server error occurred.

TRY_AGAIN
A temporary error occurred on an authoritative name server. Try again later.

FILES

/etc/host.conf
resolver configuration file

/etc/hosts
host database file

/etc/nsswitch.conf
name service switch configuration

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

gethostbyname()

Thread safety

MT-Unsafe race:hostbyname env locale

gethostbyaddr()

Thread safety

MT-Unsafe race:hostbyaddr env locale

sethostent(), endhostent(), gethostent_r()

Thread safety

MT-Unsafe race:hostent env locale

herror(), hstrerror()

Thread safetyMT-Safe

gethostent()

Thread safety

MT-Unsafe race:hostent race:hostentbuf env locale

gethostbyname2()

Thread safety

MT-Unsafe race:hostbyname2 env locale

gethostbyaddr_r(), gethostbyname_r(), gethostbyname2_r()

Thread safetyMT-Safe env locale

In the above table, hostent in race:hostent signifies that if any of the functions sethostent(), gethostent(), gethostent_r(), or endhostent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

sethostent()
endhostent()
gethostent()
POSIX.1-2008.

gethostent_r()
GNU.

Others:
None.

HISTORY

sethostent()
endhostent()
gethostent()
POSIX.1-2001.

gethostbyname()
gethostbyaddr()
h_errno
Marked obsolescent in POSIX.1-2001. Removed in POSIX.1-2008, recommending the use of getaddrinfo(3) and getnameinfo(3) instead.

NOTES

The functions gethostbyname() and gethostbyaddr() may return pointers to static data, which may be overwritten by later calls. Copying the struct hostent does not suffice, since it contains pointers; a deep copy is required.

In the original BSD implementation the len argument of gethostbyname() was an int. The SUSv2 standard is buggy and declares the len argument of gethostbyaddr() to be of type size_t. (That is wrong, because it has to be int, and size_t is not. POSIX.1-2001 makes it socklen_t, which is OK.) See also accept(2).

The BSD prototype for gethostbyaddr() uses const char * for the first argument.

System V/POSIX extension

POSIX requires the gethostent() call, which should return the next entry in the host data base. When using DNS/BIND this does not make much sense, but it may be reasonable if the host data base is a file that can be read line by line. On many systems, a routine of this name reads from the file /etc/hosts. It may be available only when the library was built without DNS support. The glibc version will ignore ipv6 entries. This function is not reentrant, and glibc adds a reentrant version gethostent_r().

GNU extensions

glibc2 also has a gethostbyname2() that works like gethostbyname(), but permits to specify the address family to which the address must belong.

glibc2 also has reentrant versions gethostent_r(), gethostbyaddr_r(), gethostbyname_r(), and gethostbyname2_r(). The caller supplies a hostent structure ret which will be filled in on success, and a temporary work buffer buf of size buflen. After the call, result will point to the result on success. In case of an error or if no entry is found result will be NULL. The functions return 0 on success and a nonzero error number on failure. In addition to the errors returned by the nonreentrant versions of these functions, if buf is too small, the functions will return ERANGE, and the call should be retried with a larger buffer. The global variable h_errno is not modified, but the address of a variable in which to store error numbers is passed in h_errnop.

BUGS

gethostbyname() does not recognize components of a dotted IPv4 address string that are expressed in hexadecimal.

SEE ALSO

getaddrinfo(3), getnameinfo(3), inet(3), inet_ntop(3), inet_pton(3), resolver(3), hosts(5), nsswitch.conf(5), hostname(7), named(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1957 - Linux cli command pthread_spin_destroy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_spin_destroy and provides detailed information about the command pthread_spin_destroy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_spin_destroy.

NAME 🖥️ pthread_spin_destroy 🖥️

initialize or destroy a spin lock

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_spin_init(pthread_spinlock_t *lock, int pshared);
int pthread_spin_destroy(pthread_spinlock_t *lock);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

pthread_spin_init(), pthread_spin_destroy():

    _POSIX_C_SOURCE >= 200112L

DESCRIPTION

General note: Most programs should use mutexes instead of spin locks. Spin locks are primarily useful in conjunction with real-time scheduling policies. See NOTES.

The pthread_spin_init() function allocates any resources required for the use of the spin lock referred to by lock and initializes the lock to be in the unlocked state. The pshared argument must have one of the following values:

PTHREAD_PROCESS_PRIVATE
The spin lock is to be operated on only by threads in the same process as the thread that calls pthread_spin_init(). (Attempting to share the spin lock between processes results in undefined behavior.)

PTHREAD_PROCESS_SHARED
The spin lock may be operated on by any thread in any process that has access to the memory containing the lock (i.e., the lock may be in a shared memory object that is shared among multiple processes).

Calling pthread_spin_init() on a spin lock that has already been initialized results in undefined behavior.

The pthread_spin_destroy() function destroys a previously initialized spin lock, freeing any resources that were allocated for that lock. Destroying a spin lock that has not been previously been initialized or destroying a spin lock while another thread holds the lock results in undefined behavior.

Once a spin lock has been destroyed, performing any operation on the lock other than once more initializing it with pthread_spin_init() results in undefined behavior.

The result of performing operations such as pthread_spin_lock(3), pthread_spin_unlock(3), and pthread_spin_destroy() on copies of the object referred to by lock is undefined.

RETURN VALUE

On success, there functions return zero. On failure, they return an error number. In the event that pthread_spin_init() fails, the lock is not initialized.

ERRORS

pthread_spin_init() may fail with the following errors:

EAGAIN
The system has insufficient resources to initialize a new spin lock.

ENOMEM
Insufficient memory to initialize the spin lock.

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.2. POSIX.1-2001.

Support for process-shared spin locks is a POSIX option. The option is supported in the glibc implementation.

NOTES

Spin locks should be employed in conjunction with real-time scheduling policies (SCHED_FIFO, or possibly SCHED_RR). Use of spin locks with nondeterministic scheduling policies such as SCHED_OTHER probably indicates a design mistake. The problem is that if a thread operating under such a policy is scheduled off the CPU while it holds a spin lock, then other threads will waste time spinning on the lock until the lock holder is once more rescheduled and releases the lock.

If threads create a deadlock situation while employing spin locks, those threads will spin forever consuming CPU time.

User-space spin locks are not applicable as a general locking solution. They are, by definition, prone to priority inversion and unbounded spin times. A programmer using spin locks must be exceptionally careful not only in the code, but also in terms of system configuration, thread placement, and priority assignment.

SEE ALSO

pthread_mutex_init(3), pthread_mutex_lock(3), pthread_spin_lock(3), pthread_spin_unlock(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1958 - Linux cli command Net_CIDRpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_CIDRpm and provides detailed information about the command Net_CIDRpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_CIDRpm.

NAME 🖥️ Net_CIDRpm 🖥️

Manipulate IPv4/IPv6 netblocks in CIDR notation

SYNOPSIS

use Net::CIDR; use Net::CIDR :all; my $var; if ($var = Net::CIDR::cidrvalidate($var)) { // … do something } print join(" “, Net::CIDR::range2cidr(“192.168.0.0-192.168.255.255”, “10.0.0.0-10.3.255.255”)) . " “; # # Output from above: # # 192.168.0.0/16 # 10.0.0.0/14 print join(” “, Net::CIDR::range2cidr( “dead:beef::-dead:beef:ffff:ffff:ffff:ffff:ffff:ffff”)) . " “; # # Output from above: # # dead:beef::/32 print join(” “, Net::CIDR::range2cidr(“192.168.1.0-192.168.2.255”)) . " “; # # Output from above: # # 192.168.1.0/24 # 192.168.2.0/24 print join(” “, Net::CIDR::cidr2range(“192.168.0.0/16”)) . " “; # # Output from above: # # 192.168.0.0-192.168.255.255 print join(” “, Net::CIDR::cidr2range(“dead::beef::/46”)) . " “; # # Output from above: # # dead:beef::-dead:beef:3:ffff:ffff:ffff:ffff:ffff @list=(“192.168.0.0/24”); @list=Net::CIDR::cidradd(“192.168.1.0-192.168.1.255”, @list); print join(” “, @list) . " “; # # Output from above: # # 192.168.0.0/23 print join(” “, Net::CIDR::cidr2octets(“192.168.0.0/22”)) . " “; # # Output from above: # # 192.168.0 # 192.168.1 # 192.168.2 # 192.168.3 print join(” “, Net::CIDR::cidr2octets(“dead::beef::/46”)) . " “; # # Output from above: # # dead:beef:0000 # dead:beef:0001 # dead:beef:0002 # dead:beef:0003 @list=(“192.168.0.0/24”); print Net::CIDR::cidrlookup(“192.168.0.12”, @list); # # Output from above: # # 1 @list = Net::CIDR::addr2cidr(“192.168.0.31”); print join(” “, @list); # # Output from above: # # 192.168.0.31/32 # 192.168.0.30/31 # 192.168.0.28/30 # 192.168.0.24/29 # 192.168.0.16/28 # 192.168.0.0/27 # 192.168.0.0/26 # 192.168.0.0/25 # 192.168.0.0/24 # 192.168.0.0/23 # [and so on] print Net::CIDR::addrandmask2cidr(“195.149.50.61”, “255.255.255.248”).” “; # # Output from above: # # 195.149.50.56/29

DESCRIPTION

The Net::CIDR package contains functions that manipulate lists of IP netblocks expressed in CIDR notation. The Net::CIDR functions handle both IPv4 and IPv6 addresses.

The cidrvalidate() function, described below, checks that its argument is a single, valid IP address or a CIDR. The remaining functions expect that their parameters consist of validated IPs or CIDRs. See cidrvalidate() and BUGS, below, for more information.

@cidr_list=Net::CIDR::range2cidr(@range_list);

Each element in the @range_list is a string start-finish, where start is the first IP address and finish is the last IP address. range2cidr() converts each range into an equivalent CIDR netblock. It returns a list of netblocks except in the case where it is given only one parameter and is called in scalar context.

For example:

@a=Net::CIDR::range2cidr(“192.168.0.0-192.168.255.255”);

The result is a one-element array, with $a[0] being 192.168.0.0/16. range2cidr() processes each start-finish element in @range_list separately. But if invoked like so:

$a=Net::CIDR::range2cidr(“192.168.0.0-192.168.255.255”);

The result is a scalar 192.168.0.0/16.

Where each element cannot be expressed as a single CIDR netblock range2cidr() will generate as many CIDR netblocks as are necessary to cover the full range of IP addresses. Example:

@a=Net::CIDR::range2cidr(“192.168.1.0-192.168.2.255”);

The result is a two element array: (192.168.1.0/24,192.168.2.0/24);

@a=Net::CIDR::range2cidr( “d08c:43::-d08c:43:ffff:ffff:ffff:ffff:ffff:ffff”);

The result is an one element array: (d08c:43::/32) that reflects this IPv6 netblock in CIDR notation.

range2cidr() does not merge adjacent or overlapping netblocks in @range_list.

@range_list=Net::CIDR::cidr2range(@cidr_list);

The cidr2range() functions converts a netblock list in CIDR notation to a list of start-finish IP address ranges:

@a=Net::CIDR::cidr2range(“10.0.0.0/14”, “192.168.0.0/24”);

The result is a two-element array: (10.0.0.0-10.3.255.255, 192.168.0.0-192.168.0.255).

@a=Net::CIDR::cidr2range(“d08c:43::/32”);

The result is a one-element array: (d08c:43::-d08c:43:ffff:ffff:ffff:ffff:ffff:ffff).

cidr2range() does not merge adjacent or overlapping netblocks in @cidr_list.

@netblock_list = Net::CIDR::addr2cidr($address);

The addr2cidr function takes an IP address and returns a list of all the CIDR netblocks it might belong to:

@a=Net::CIDR::addr2cidr(192.168.0.31);

The result is a thirtythree-element array: (‘192.168.0.31/32’, ‘192.168.0.30/31’, ‘192.168.0.28/30’, ‘192.168.0.24/29’, [and so on]) consisting of all the possible subnets containing this address from 0.0.0.0/0 to address/32.

Any addresses supplied to addr2cidr after the first will be ignored. It works similarly for IPv6 addresses, returning a list of one hundred and twenty nine elements.

$cidr=Net::CIDR::addrandmask2cidr($address, $netmask);

The addrandmask2cidr function takes an IP address and a netmask, and returns the CIDR range whose size fits the netmask and which contains the address. It is an error to supply one parameter in IPv4-ish format and the other in IPv6-ish format, and it is an error to supply a netmask which does not consist solely of 1 bits followed by 0 bits. For example, ‘255.255.248.192’ is an invalid netmask, as is ‘255.255.255.32’ because both contain 0 bits in between 1 bits.

Technically speaking both of those *are* valid netmasks, but a) you’d have to be insane to use them, and b) there’s no corresponding CIDR range.

@octet_list=Net::CIDR::cidr2octets(@cidr_list);

cidr2octets() takes @cidr_list and returns a list of leading octets representing those netblocks. Example:

@octet_list=Net::CIDR::cidr2octets(“10.0.0.0/14”, “192.168.0.0/24”);

The result is the following five-element array: (10.0, 10.1, 10.2, 10.3, 192.168.0).

For IPv6 addresses, the hexadecimal words in the resulting list are zero-padded:

@octet_list=Net::CIDR::cidr2octets(”::dead:beef:0:0/110”);

The result is a four-element array: (0000:0000:0000:0000:dead:beef:0000, 0000:0000:0000:0000:dead:beef:0001, 0000:0000:0000:0000:dead:beef:0002, 0000:0000:0000:0000:dead:beef:0003). Prefixes of IPv6 CIDR blocks should be even multiples of 16 bits, otherwise they can potentially expand out to a 32,768-element array, each!

@cidr_list=Net::CIDR::cidradd($block, @cidr_list);

The cidradd() functions allows a CIDR list to be built one CIDR netblock at a time, merging adjacent and overlapping ranges. $block is a single netblock, expressed as either start-finish, or address/prefix. Example:

@cidr_list=Net::CIDR::range2cidr(“192.168.0.0-192.168.0.255”); @cidr_list=Net::CIDR::cidradd(“10.0.0.0/8”, @cidr_list); @cidr_list=Net::CIDR::cidradd(“192.168.1.0-192.168.1.255”, @cidr_list);

The result is a two-element array: (10.0.0.0/8, 192.168.0.0/23). IPv6 addresses are handled in an analogous fashion.

$found=Net::CIDR::cidrlookup($ip, @cidr_list);

Search for $ip in @cidr_list. $ip can be a single IP address, or a netblock in CIDR or start-finish notation. lookup() returns 1 if $ip overlaps any netblock in @cidr_list, 0 if not.

$ip=Net::CIDR::cidrvalidate($ip);

Validate whether $ip is a valid IPv4 or IPv6 address, or a CIDR. Returns its argument or undef. Spaces are removed, and IPv6 hexadecimal address are converted to lowercase.

$ip with less than four octets gets filled out with additional octets, and the modified value gets returned. This turns 192.168/16 into a proper 192.168.0.0/16.

If $ip contains a /, it must be a valid CIDR, otherwise it must be a valid IPv4 or an IPv6 address.

A technically invalid CIDR, such as 192.168.0.1/24 fails validation, returning undef.

BUGS

Garbage in, garbage out. Always use cidrvalidate() before doing anything with untrusted input. Otherwise, slightly invalid input will work (extraneous whitespace is generally OK), but the functions will croak if you’re totally off the wall.

AUTHOR

Sam Varshavchik <[email protected]>

With some contributions from David Cantrell <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1959 - Linux cli command Net_DNS_RR_IPSECKEYpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_IPSECKEYpm and provides detailed information about the command Net_DNS_RR_IPSECKEYpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_IPSECKEYpm.

NAME 🖥️ Net_DNS_RR_IPSECKEYpm 🖥️

DNS IPSECKEY resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name IPSECKEY precedence gatetype algorithm gateway key);

DESCRIPTION

DNS IPSEC Key Storage (IPSECKEY) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

precedence

$precedence = $rr->precedence; $rr->precedence( $precedence );

This is an 8-bit precedence for this record. Gateways listed in IPSECKEY records with lower precedence are to be attempted first.

gatetype

$gatetype = $rr->gatetype;

The gateway type field indicates the format of the information that is stored in the gateway field.

algorithm

$algorithm = $rr->algorithm; $rr->algorithm( $algorithm );

The algorithm type field identifies the public keys cryptographic algorithm and determines the format of the public key field.

gateway

$gateway = $rr->gateway; $rr->gateway( $gateway );

The gateway field indicates a gateway to which an IPsec tunnel may be created in order to reach the entity named by this resource record.

pubkey

key

$key = $rr->key; $rr->key( $key );

Base64 representation of the optional public key block for the resource record.

keybin

$keybin = $rr->keybin; $rr->keybin( $keybin );

Binary representation of the public key block for the resource record.

COPYRIGHT

Copyright (c)2007 Olaf Kolkman, NLnet Labs.

Portions Copyright (c)2012,2015 Dick Franks.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC4025 <https://tools.ietf.org/html/rfc4025>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1960 - Linux cli command xdr_pmap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_pmap and provides detailed information about the command xdr_pmap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_pmap.

NAME 🖥️ xdr_pmap 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1961 - Linux cli command Moose_Intropm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Intropm and provides detailed information about the command Moose_Intropm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Intropm.

NAME 🖥️ Moose_Intropm 🖥️

Expanded into Moose::Manual, so go read that

VERSION

version 2.2207

DESCRIPTION

The intro has been replaced by Moose::Manual. This POD document still exists for the benefit of anyone out there who might’ve linked to it in the past.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1962 - Linux cli command strcat

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strcat and provides detailed information about the command strcat, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strcat.

NAME 🖥️ strcat 🖥️

copy or catenate a string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *stpcpy(char *restrict dst, const char *restrict src);
char *strcpy(char *restrict dst, const char *restrict src);
char *strcat(char *restrict dst, const char *restrict src);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

stpcpy():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

stpcpy()
strcpy()
These functions copy the string pointed to by src, into a string at the buffer pointed to by dst. The programmer is responsible for allocating a destination buffer large enough, that is, strlen(src) + 1. For the difference between the two functions, see RETURN VALUE.

strcat()
This function catenates the string pointed to by src, after the string pointed to by dst (overwriting its terminating null byte). The programmer is responsible for allocating a destination buffer large enough, that is, strlen(dst) + strlen(src) + 1.

An implementation of these functions might be:

char *
stpcpy(char *restrict dst, const char *restrict src)
{
    char  *p;
    p = mempcpy(dst, src, strlen(src));
    *p = '';
    return p;
}
char *
strcpy(char *restrict dst, const char *restrict src)
{
    stpcpy(dst, src);
    return dst;
}
char *
strcat(char *restrict dst, const char *restrict src)
{
    stpcpy(dst + strlen(dst), src);
    return dst;
}

RETURN VALUE

stpcpy()
This function returns a pointer to the terminating null byte of the copied string.

strcpy()
strcat()
These functions return dst.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

stpcpy(), strcpy(), strcat()

Thread safetyMT-Safe

STANDARDS

stpcpy()
POSIX.1-2008.

strcpy()
strcat()
C11, POSIX.1-2008.

STANDARDS

stpcpy()
POSIX.1-2008.

strcpy()
strcat()
POSIX.1-2001, C89, SVr4, 4.3BSD.

CAVEATS

The strings src and dst may not overlap.

If the destination buffer is not large enough, the behavior is undefined. See _FORTIFY_SOURCE in feature_test_macros(7).

strcat() can be very inefficient. Read about Shlemiel the painter.

EXAMPLES

#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int
main(void)
{
    char    *p;
    char    *buf1;
    char    *buf2;
    size_t  len, maxsize;
    maxsize = strlen("Hello ") + strlen("world") + strlen("!") + 1;
    buf1 = malloc(sizeof(*buf1) * maxsize);
    if (buf1 == NULL)
        err(EXIT_FAILURE, "malloc()");
    buf2 = malloc(sizeof(*buf2) * maxsize);
    if (buf2 == NULL)
        err(EXIT_FAILURE, "malloc()");
    p = buf1;
    p = stpcpy(p, "Hello ");
    p = stpcpy(p, "world");
    p = stpcpy(p, "!");
    len = p - buf1;
    printf("[len = %zu]: ", len);
    puts(buf1);  // "Hello world!"
    free(buf1);
    strcpy(buf2, "Hello ");
    strcat(buf2, "world");
    strcat(buf2, "!");
    len = strlen(buf2);
    printf("[len = %zu]: ", len);
    puts(buf2);  // "Hello world!"
    free(buf2);
    exit(EXIT_SUCCESS);
}

SEE ALSO

strdup(3), string(3), wcscpy(3), string_copying(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1963 - Linux cli command isgraph

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isgraph and provides detailed information about the command isgraph, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isgraph.

NAME 🖥️ isgraph 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1964 - Linux cli command Moose_Meta_Attribute_Native_Trait_Arraypm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Attribute_Native_Trait_Arraypm and provides detailed information about the command Moose_Meta_Attribute_Native_Trait_Arraypm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Attribute_Native_Trait_Arraypm.

NAME 🖥️ Moose_Meta_Attribute_Native_Trait_Arraypm 🖥️

Helper trait for ArrayRef attributes

VERSION

version 2.2207

SYNOPSIS

package Stuff; use Moose; has options => ( traits => [Array], is => ro, isa => ArrayRef[Str], default => sub { [] }, handles => { all_options => elements, add_option => push, map_options => map, filter_options => grep, find_option => first, get_option => get, join_options => join, count_options => count, has_options => count, has_no_options => is_empty, sorted_options => sort, }, ); no Moose; 1;

DESCRIPTION

This trait provides native delegation methods for array references.

DEFAULT TYPE

If you don’t provide an isa value for your attribute, it will default to ArrayRef.

PROVIDED METHODS

  • count Returns the number of elements in the array. $stuff = Stuff->new; $stuff->options( [ “foo”, “bar”, “baz”, “boo” ] ); print $stuff->count_options; # prints 4 This method does not accept any arguments.

  • is_empty Returns a boolean value that is true when the array has no elements. $stuff->has_no_options ? die “No options! " : print “Good boy. “; This method does not accept any arguments.

  • elements In list context, returns all of the elements of the array as a list. In scalar context, returns the number of elements in the array. my @options = $stuff->all_options; print “@options”; # prints “foo bar baz boo” print scalar $stuff->all_options; # prints 4 This method does not accept any arguments.

  • get($index) Returns an element of the array by its index. You can also use negative index numbers, just as with Perl’s core array handling. my $option = $stuff->get_option(1); print “$option “; # prints “bar” If the specified element does not exist, this will return undef. This method accepts just one argument.

  • pop Just like Perl’s builtin pop. This method does not accept any arguments.

  • push($value1, $value2, value3 …) Just like Perl’s builtin push. Returns the number of elements in the new array. This method accepts any number of arguments.

  • shift Just like Perl’s builtin shift. This method does not accept any arguments.

  • unshift($value1, $value2, value3 …) Just like Perl’s builtin unshift. Returns the number of elements in the new array. This method accepts any number of arguments.

  • splice($offset, $length, @values) Just like Perl’s builtin splice. In scalar context, this returns the last element removed, or undef if no elements were removed. In list context, this returns all the elements removed from the array. This method requires at least one argument.

  • first( sub { … } ) This method returns the first matching item in the array, just like List::Util’s first function. The matching is done with a subroutine reference you pass to this method. The subroutine will be called against each element in the array until one matches or all elements have been checked. Each list element will be available to the sub in $_. my $found = $stuff->find_option( sub {/^b/} ); print “$found “; # prints “bar” This method requires a single argument.

  • first_index( sub { … } ) This method returns the index of the first matching item in the array, just like “first_index” in List::SomeUtils. The matching is done with a subroutine reference you pass to this method. The subroutine will be called against each element in the array until one matches or all elements have been checked. Each list element will be available to the sub in $_. If no match is made, -1 is returned. This method requires a single argument.

  • grep( sub { … } ) This method returns every element matching a given criteria, just like Perl’s core grep function. This method requires a subroutine which implements the matching logic; each list element will be available to the sub in $_. my @found = $stuff->filter_options( sub {/^b/} ); print “@found “; # prints “bar baz boo” This method requires a single argument.

  • map( sub { … } ) This method transforms every element in the array and returns a new array, just like Perl’s core map function. This method requires a subroutine which implements the transformation; each list element will be available to the sub in $_. my @mod_options = $stuff->map_options( sub { $_ . “-tag” } ); print “@mod_options “; # prints “foo-tag bar-tag baz-tag boo-tag” This method requires a single argument.

  • reduce( sub { … } ) This method turns an array into a single value, by passing a function the value so far and the next value in the array, just like List::Util’s reduce function. The reducing is done with a subroutine reference you pass to this method; each list element will be available to the sub in $_. my $found = $stuff->reduce_options( sub { $_[0] . $_[1] } ); print “$found “; # prints “foobarbazboo” This method requires a single argument.

  • sort

  • sort( sub { … } ) Returns the elements of the array (not an array reference) in sorted order, or, like elements, returns the number of elements in the array in scalar context. You can provide an optional subroutine reference to sort with (as you can with Perl’s core sort function). However, instead of using $a and $b in this subroutine, you will need to use $_[0] and $_[1]. # ascending ASCIIbetical my @sorted = $stuff->sort_options(); # Descending alphabetical order my @sorted_options = $stuff->sort_options( sub { lc $_[1] cmp lc $_[0] } ); print “@sorted_options “; # prints “foo boo baz bar” This method accepts a single argument.

  • sort_in_place

  • sort_in_place( sub { … } ) Sorts the array in place, modifying the value of the attribute. You can provide an optional subroutine reference to sort with (as you can with Perl’s core sort function). However, instead of using $a and $b, you will need to use $_[0] and $_[1] instead. This method does not define a return value. This method accepts a single argument.

  • shuffle Returns the elements of the array in random order, like shuffle from List::Util. This method does not accept any arguments.

  • uniq Returns the array with all duplicate elements removed, like “uniq” in List::Util. This method does not accept any arguments.

  • join($str) Joins every element of the array using the separator given as argument, just like Perl’s core join function. my $joined = $stuff->join_options(:); print “$joined “; # prints “foo:bar:baz:boo” This method requires a single argument.

  • set($index, $value) Given an index and a value, sets the specified array element’s value. This method returns the value at $index after the set. This method requires two arguments.

  • delete($index) Removes the element at the given index from the array. This method returns the deleted value. Note that if no value exists, it will return undef. This method requires one argument.

  • insert($index, $value) Inserts a new element into the array at the given index. This method returns the new value at $index. This method requires two arguments.

  • clear Empties the entire array, like @array = (). This method does not define a return value. This method does not accept any arguments.

  • accessor($index)

  • accessor($index, $value) This method provides a get/set accessor for the array, based on array indexes. If passed one argument, it returns the value at the specified index. If passed two arguments, it sets the value of the specified index. When called as a setter, this method returns the new value at $index. This method accepts one or two arguments.

  • natatime($n)

  • natatime($n, $code) This method returns an iterator which, on each call, returns $n more items from the array, in order, like “natatime” in List::SomeUtils. If you pass a coderef as the second argument, then this code ref will be called on each group of $n elements in the array until the array is exhausted. This method accepts one or two arguments.

  • shallow_clone This method returns a shallow clone of the array reference. The return value is a reference to a new array with the same elements. It is shallow because any elements that were references in the original will be the same references in the clone.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1965 - Linux cli command Image_ExifTool_Theorapm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Theorapm and provides detailed information about the command Image_ExifTool_Theorapm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Theorapm.

NAME 🖥️ Image_ExifTool_Theorapm 🖥️

Read Theora video meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to extract meta information from Theora video streams.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.theora.org/doc/Theora.pdf>

SEE ALSO

“Theora Tags” in Image::ExifTool::TagNames, “Ogg Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1966 - Linux cli command STAILQ_INSERT_AFTER

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command STAILQ_INSERT_AFTER and provides detailed information about the command STAILQ_INSERT_AFTER, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the STAILQ_INSERT_AFTER.

NAME 🖥️ STAILQ_INSERT_AFTER 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1967 - Linux cli command Moose_Meta_Attribute_Native_Traitpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Attribute_Native_Traitpm and provides detailed information about the command Moose_Meta_Attribute_Native_Traitpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Attribute_Native_Traitpm.

NAME 🖥️ Moose_Meta_Attribute_Native_Traitpm 🖥️

Shared role for native delegation traits

VERSION

version 2.2207

BUGS

See “BUGS” in Moose for details on reporting bugs.

SEE ALSO

Documentation for Moose native traits can be found in Moose::Meta::Attribute::Native.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1968 - Linux cli command ttyname

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ttyname and provides detailed information about the command ttyname, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ttyname.

NAME 🖥️ ttyname 🖥️

return name of a terminal

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
char *ttyname(int fd);
int ttyname_r(int fd, char buf[.buflen], size_t buflen);

DESCRIPTION

The function ttyname() returns a pointer to the null-terminated pathname of the terminal device that is open on the file descriptor fd, or NULL on error (for example, if fd is not connected to a terminal). The return value may point to static data, possibly overwritten by the next call. The function ttyname_r() stores this pathname in the buffer buf of length buflen.

RETURN VALUE

The function ttyname() returns a pointer to a pathname on success. On error, NULL is returned, and errno is set to indicate the error. The function ttyname_r() returns 0 on success, and an error number upon error.

ERRORS

EBADF
Bad file descriptor.

ENODEV
fd refers to a slave pseudoterminal device but the corresponding pathname could not be found (see NOTES).

ENOTTY
fd does not refer to a terminal device.

ERANGE
(ttyname_r()) buflen was too small to allow storing the pathname.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

ttyname()

Thread safetyMT-Unsafe race:ttyname

ttyname_r()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, 4.2BSD.

NOTES

A process that keeps a file descriptor that refers to a pts(4) device open when switching to another mount namespace that uses a different /dev/ptmx instance may still accidentally find that a device path of the same name for that file descriptor exists. However, this device path refers to a different device and thus can’t be used to access the device that the file descriptor refers to. Calling ttyname() or ttyname_r() on the file descriptor in the new mount namespace will cause these functions to return NULL and set errno to ENODEV.

SEE ALSO

tty(1), fstat(2), ctermid(3), isatty(3), pts(4)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1969 - Linux cli command XtAppSetExitFlag

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppSetExitFlag and provides detailed information about the command XtAppSetExitFlag, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppSetExitFlag.

NAME 🖥️ XtAppSetExitFlag 🖥️

thread support functions

SYNTAX

#include <X11/Intrinsic.h>

void XtAppSetExitFlag(XtAppContext app_context);

Boolean XtAppGetExitFlag(XtAppContext app_context);

ARGUMENTS

app_context
Specifies the application context.

DESCRIPTION

To indicate that an application context should exit, use XtAppSetExitFlag.

To test the exit status of an application context, use XtAppGetExitFlag.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1970 - Linux cli command getrpcbynumber

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getrpcbynumber and provides detailed information about the command getrpcbynumber, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getrpcbynumber.

NAME 🖥️ getrpcbynumber 🖥️

get RPC entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
struct rpcent *getrpcent(void);
struct rpcent *getrpcbyname(const char *name);
struct rpcent *getrpcbynumber(int number);
void setrpcent(int stayopen);
void endrpcent(void);

DESCRIPTION

The getrpcent(), getrpcbyname(), and getrpcbynumber() functions each return a pointer to an object with the following structure containing the broken-out fields of an entry in the RPC program number data base.

struct rpcent {
    char  *r_name;     /* name of server for this RPC program */
    char **r_aliases;  /* alias list */
    long   r_number;   /* RPC program number */
};

The members of this structure are:

r_name
The name of the server for this RPC program.

r_aliases
A NULL-terminated list of alternate names for the RPC program.

r_number
The RPC program number for this service.

The getrpcent() function reads the next entry from the database. A connection is opened to the database if necessary.

The setrpcent() function opens a connection to the database, and sets the next entry to the first entry. If stayopen is nonzero, then the connection to the database will not be closed between calls to one of the getrpc*() functions.

The endrpcent() function closes the connection to the database.

The getrpcbyname() and getrpcbynumber() functions sequentially search from the beginning of the file until a matching RPC program name or program number is found, or until end-of-file is encountered.

RETURN VALUE

On success, getrpcent(), getrpcbyname(), and getrpcbynumber() return a pointer to a statically allocated rpcent structure. NULL is returned on EOF or error.

FILES

/etc/rpc
RPC program number database.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getrpcent(), getrpcbyname(), getrpcbynumber()

Thread safetyMT-Unsafe

setrpcent(), endrpcent()

Thread safetyMT-Safe locale

STANDARDS

BSD.

HISTORY

BSD, Solaris.

BUGS

All information is contained in a static area so it must be copied if it is to be saved.

SEE ALSO

getrpcent_r(3), rpc(5), rpcinfo(8), ypserv(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1971 - Linux cli command tan

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tan and provides detailed information about the command tan, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tan.

NAME 🖥️ tan 🖥️

tangent function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double tan(double x);
float tanf(float x);
long double tanl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

tanf(), tanl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the tangent of x, where x is given in radians.

RETURN VALUE

On success, these functions return the tangent of x.

If x is a NaN, a NaN is returned.

If x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned.

If the correct result would overflow, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the mathematically correct sign.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is an infinity
errno is set to EDOM (but see BUGS). An invalid floating-point exception (FE_INVALID) is raised.

Range error: result overflow
An overflow floating-point exception (FE_OVERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tan(), tanf(), tanl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

BUGS

Before glibc 2.10, the glibc implementation did not set errno to EDOM when a domain error occurred.

SEE ALSO

acos(3), asin(3), atan(3), atan2(3), cos(3), ctan(3), sin(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1972 - Linux cli command xdr_u_char

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_u_char and provides detailed information about the command xdr_u_char, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_u_char.

NAME 🖥️ xdr_u_char 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1973 - Linux cli command XShmCreatePixmap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XShmCreatePixmap and provides detailed information about the command XShmCreatePixmap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XShmCreatePixmap.

NAME 🖥️ XShmCreatePixmap 🖥️

X Shared Memory extension functions

SYNTAX

#include <X11/Xlib.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
Bool	XShmQueryExtension(
	Display *display);
Bool XShmQueryVersion(
	Display *display;
	int *major, *minor;
	Bool *pixmaps);
int XShmPixmapFormat(
	Display *display);
Bool XShmAttach(
	Display *display;
	XShmSegmentInfo *shminfo);
Bool XShmDetach(
	Display *display;
	XShmSegmentInfo *shminfo);

XImage *XShmCreateImage (
	Display *display;
	Visual *visual;
	unsigned int depth;
	int format;
	char *data;
	XShmSegmentInfo *shminfo;
	unsigned int width, height);
Bool XShmPutImage(
	Display *display;
	Drawable d;
	GC gc;
	XImage *image;
	int src_x, src_y, dest_x, dest_y;
	unsigned int width, height;
	bool send_event);
Bool XShmGetImage (
	Display *display;
	Drawable d;
	XImage *image;
	int x, y;
	unsigned long plane_mask);
Pixmap XShmCreatePixmap(
        Display *display;
        Drawable d;
        char *data;
	XShmSegmentInfo *shminfo;
	unsigned int width, height, depth);
Status XShmGetEventBase(
	Display *display);

STRUCTURES

Events:
typedef struct {
    int type;               /* of event */
    unsigned long serial;   /* # of last request processed by server*/
    Bool send_event;        /* true if this came from a SendEvent request*/
    Display *display;       /* Display the event was read from */
    Drawable drawable;      /* drawable of request */
    int major_code;         /* ShmReqCode */
    int minor_code;         /* X_ShmPutImage */
    ShmSeg shmseg;          /* the ShmSeg used in the request*/
    unsigned long offset;   /* the offset into ShmSeg used in the request*/
} XShmCompletionEvent;
a structure of type XShmSegmentInfo :

typedef struct {
    ShmSeg shmseg;      /* resource id */
    int shmid;          /* kernel id */
    char *shmaddr;      /* address in client */
    Bool readOnly;      /* how the server should attach it */
} XShmSegmentInfo;

DESCRIPTION

* XShmQueryExtension * checks to see if the shared memory extensions are available for the specified display.

* XShmQueryVersion * returns the version numbers of the extension implementation. Shared memory pixmaps are supported if the pixmaps argument returns true.

* XShmAttach * tells the server to attach to your shared memory segment. If all goes well, you will get a non-zero status, back and your XImage is ready for use.

* XShmDetach * tells the server to detach from your shared memory segment.

* XShmPutImage * combines an image in memory with a shape of the specified drawable. If XYBitmap format is used, the depth must be one, or a ``BadMatch’’ error results. The foreground pixel in the GC defines the source for the one bits in the image, and the background pixel defines the source for the zero bits. For XYPixmap and ZPixmap, the depth must match the depth of the drawable, or a ``BadMatch’’ error results.

* XShmGetImage * reads image data into a shared memory XImage where display is the display of interest, drawable is the source drawable, image is the destination XImage, x and y are offsets within the drawable, and plane_mask defines which planes are to be read.

* XShmCreateImage * allocates the memory needed for an XImage structure for the specified display but does not allocate space for the image itself.

* XShmPixmapFormat * gets the format for the server. If your application can deal with the server pixmap data format, a shared memory segment and shminfo structure are created.

* XShmCreatePixmap * points to a pixmap which you can manipulate in all of the usual ways, with the added bonus of being able to edit its contents directly through the shared memory segment.

* XShmGetEventBase * gets the completion event value.

SEE ALSO

MIT-SHM - The MIT Shared Memory Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1974 - Linux cli command forkpty

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command forkpty and provides detailed information about the command forkpty, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the forkpty.

NAME 🖥️ forkpty 🖥️

terminal utility functions

LIBRARY

System utilities library (libutil, -lutil)

SYNOPSIS

#include <pty.h>
int openpty(int *amaster, int *aslave, char *name,
 const struct termios *termp,
 const struct winsize *winp);
pid_t forkpty(int *amaster, char *name,
 const struct termios *termp,
 const struct winsize *winp);
#include <utmp.h>
int login_tty(int fd);

DESCRIPTION

The openpty() function finds an available pseudoterminal and returns file descriptors for the master and slave in amaster and aslave. If name is not NULL, the filename of the slave is returned in name. If termp is not NULL, the terminal parameters of the slave will be set to the values in termp. If winp is not NULL, the window size of the slave will be set to the values in winp.

The login_tty() function prepares for a login on the terminal referred to by the file descriptor fd (which may be a real terminal device, or the slave of a pseudoterminal as returned by openpty()) by creating a new session, making fd the controlling terminal for the calling process, setting fd to be the standard input, output, and error streams of the current process, and closing fd.

The forkpty() function combines openpty(), fork(2), and login_tty() to create a new process operating in a pseudoterminal. A file descriptor referring to master side of the pseudoterminal is returned in amaster. If name is not NULL, the buffer it points to is used to return the filename of the slave. The termp and winp arguments, if not NULL, will determine the terminal attributes and window size of the slave side of the pseudoterminal.

RETURN VALUE

If a call to openpty(), login_tty(), or forkpty() is not successful, -1 is returned and errno is set to indicate the error. Otherwise, openpty(), login_tty(), and the child process of forkpty() return 0, and the parent process of forkpty() returns the process ID of the child process.

ERRORS

openpty() fails if:

ENOENT
There are no available terminals.

login_tty() fails if ioctl(2) fails to set fd to the controlling terminal of the calling process.

forkpty() fails if either openpty() or fork(2) fails.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

forkpty(), openpty()

Thread safetyMT-Safe locale

login_tty()

Thread safetyMT-Unsafe race:ttyname

STANDARDS

BSD.

HISTORY

The const modifiers were added to the structure pointer arguments of openpty() and forkpty() in glibc 2.8.

Before glibc 2.0.92, openpty() returns file descriptors for a BSD pseudoterminal pair; since glibc 2.0.92, it first attempts to open a UNIX 98 pseudoterminal pair, and falls back to opening a BSD pseudoterminal pair if that fails.

BUGS

Nobody knows how much space should be reserved for name. So, calling openpty() or forkpty() with non-NULL name may not be secure.

SEE ALSO

fork(2), ttyname(3), pty(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1975 - Linux cli command mbrtowc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mbrtowc and provides detailed information about the command mbrtowc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mbrtowc.

NAME 🖥️ mbrtowc 🖥️

convert a multibyte sequence to a wide character

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
size_t mbrtowc(wchar_t *restrict pwc, const char s[restrict .n],
 size_t n, mbstate_t *restrict ps);

DESCRIPTION

The main case for this function is when s is not NULL and pwc is not NULL. In this case, the mbrtowc() function inspects at most n bytes of the multibyte string starting at s, extracts the next complete multibyte character, converts it to a wide character and stores it at *pwc. It updates the shift state *ps. If the converted wide character is not L’�’ (the null wide character), it returns the number of bytes that were consumed from s. If the converted wide character is L’�’, it resets the shift state *ps to the initial state and returns 0.

If the n bytes starting at s do not contain a complete multibyte character, mbrtowc() returns (size_t) -2. This can happen even if n >= MB_CUR_MAX, if the multibyte string contains redundant shift sequences.

If the multibyte string starting at s contains an invalid multibyte sequence before the next complete character, mbrtowc() returns (size_t) -1 and sets errno to EILSEQ. In this case, the effects on *ps are undefined.

A different case is when s is not NULL but pwc is NULL. In this case, the mbrtowc() function behaves as above, except that it does not store the converted wide character in memory.

A third case is when s is NULL. In this case, pwc and n are ignored. If the conversion state represented by *ps denotes an incomplete multibyte character conversion, the mbrtowc() function returns (size_t) -1, sets errno to EILSEQ, and leaves *ps in an undefined state. Otherwise, the mbrtowc() function puts *ps in the initial state and returns 0.

In all of the above cases, if ps is NULL, a static anonymous state known only to the mbrtowc() function is used instead. Otherwise, *ps must be a valid mbstate_t object. An mbstate_t object a can be initialized to the initial state by zeroing it, for example using

memset(&a, 0, sizeof(a));

RETURN VALUE

The mbrtowc() function returns the number of bytes parsed from the multibyte sequence starting at s, if a non-L’�’ wide character was recognized. It returns 0, if a L’�’ wide character was recognized. It returns (size_t) -1 and sets errno to EILSEQ, if an invalid multibyte sequence was encountered. It returns (size_t) -2 if it couldn’t parse a complete multibyte character, meaning that n should be increased.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mbrtowc()

Thread safetyMT-Unsafe race:mbrtowc/!ps

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of mbrtowc() depends on the LC_CTYPE category of the current locale.

SEE ALSO

mbsinit(3), mbsrtowcs(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1976 - Linux cli command Regexp_Common_URI_RFC2384pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_URI_RFC2384pm and provides detailed information about the command Regexp_Common_URI_RFC2384pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_URI_RFC2384pm.

NAME 🖥️ Regexp_Common_URI_RFC2384pm 🖥️

  • Definitions from RFC2384;

SYNOPSIS

use Regexp::Common::URI::RFC2384 qw /:ALL/;

DESCRIPTION

This package exports definitions from RFC2384. It’s intended usage is for Regexp::Common::URI submodules only. Its interface might change without notice.

REFERENCES

[RFC 2384]
Gellens, R.: POP URL scheme August 1998.

AUTHOR

Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1977 - Linux cli command towlower_l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command towlower_l and provides detailed information about the command towlower_l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the towlower_l.

NAME 🖥️ towlower_l 🖥️

convert a wide character to lowercase

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wctype.h>
wint_t towlower(wint_t wc);
wint_t towlower_l(wint_t wc, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

towlower_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The towlower() function is the wide-character equivalent of the tolower(3) function. If wc is an uppercase wide character, and there exists a lowercase equivalent in the current locale, it returns the lowercase equivalent of wc. In all other cases, wc is returned unchanged.

The towlower_l() function performs the same task, but performs the conversion based on the character type information in the locale specified by locale. The behavior of towlower_l() is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The argument wc must be representable as a wchar_t and be a valid character in the locale or be the value WEOF.

RETURN VALUE

If wc was convertible to lowercase, towlower() returns its lowercase equivalent; otherwise it returns wc.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

towlower()

Thread safetyMT-Safe locale

towlower_l()

Thread safetyMT-Safe

STANDARDS

towlower()
C11, POSIX.1-2008 (XSI).

towlower_l()
POSIX.1-2008.

STANDARDS

towlower()
C99, POSIX.1-2001 (XSI). Obsolete in POSIX.1-2008 (XSI).

towlower_l()
glibc 2.3. POSIX.1-2008.

NOTES

The behavior of these functions depends on the LC_CTYPE category of the locale.

These functions are not very appropriate for dealing with Unicode characters, because Unicode knows about three cases: upper, lower, and title case.

SEE ALSO

iswlower(3), towctrans(3), towupper(3), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1978 - Linux cli command xdecrypt

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdecrypt and provides detailed information about the command xdecrypt, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdecrypt.

NAME 🖥️ xdecrypt 🖥️

RFS password encryption

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <rpc/des_crypt.h>
void passwd2des(char *passwd, char *key);
int xencrypt(char *secret, char *passwd);
int xdecrypt(char *secret, char *passwd);

DESCRIPTION

WARNING: Do not use these functions in new code. They do not achieve any type of acceptable cryptographic security guarantees.

The function passwd2des() takes a character string passwd of arbitrary length and fills a character array key of length 8. The array key is suitable for use as DES key. It has odd parity set in bit 0 of each byte. Both other functions described here use this function to turn their argument passwd into a DES key.

The xencrypt() function takes the ASCII character string secret given in hex, which must have a length that is a multiple of 16, encrypts it using the DES key derived from passwd by passwd2des(), and outputs the result again in secret as a hex string of the same length.

The xdecrypt() function performs the converse operation.

RETURN VALUE

The functions xencrypt() and xdecrypt() return 1 on success and 0 on error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

passwd2des(), xencrypt(), xdecrypt()

Thread safetyMT-Safe

VERSIONS

These functions are available since glibc 2.1.

BUGS

The prototypes are missing from the abovementioned include file.

SEE ALSO

cbc_crypt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1979 - Linux cli command getfsent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getfsent and provides detailed information about the command getfsent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getfsent.

NAME 🖥️ getfsent 🖥️

handle fstab entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <fstab.h>
int setfsent(void);
struct fstab *getfsent(void);
void endfsent(void);
struct fstab *getfsfile(const char *mount_point);
struct fstab *getfsspec(const char *special_file);

DESCRIPTION

These functions read from the file /etc/fstab. The struct fstab is defined by:

struct fstab {
    char       *fs_spec;       /* block device name */
    char       *fs_file;       /* mount point */
    char       *fs_vfstype;    /* filesystem type */
    char       *fs_mntops;     /* mount options */
    const char *fs_type;       /* rw/rq/ro/sw/xx option */
    int         fs_freq;       /* dump frequency, in days */
    int         fs_passno;     /* pass number on parallel dump */
};

Here the field fs_type contains (on a *BSD system) one of the five strings “rw”, “rq”, “ro”, “sw”, “xx” (read-write, read-write with quota, read-only, swap, ignore).

The function setfsent() opens the file when required and positions it at the first line.

The function getfsent() parses the next line from the file. (After opening it when required.)

The function endfsent() closes the file when required.

The function getfsspec() searches the file from the start and returns the first entry found for which the fs_spec field matches the special_file argument.

The function getfsfile() searches the file from the start and returns the first entry found for which the fs_file field matches the mount_point argument.

RETURN VALUE

Upon success, the functions getfsent(), getfsfile(), and getfsspec() return a pointer to a struct fstab, while setfsent() returns 1. Upon failure or end-of-file, these functions return NULL and 0, respectively.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

endfsent(), setfsent()

Thread safety

MT-Unsafe race:fsent

getfsent(), getfsspec(), getfsfile()

Thread safety

MT-Unsafe race:fsent locale

VERSIONS

Several operating systems have these functions, for example, *BSD, SunOS, Digital UNIX, AIX (which also has a getfstype()). HP-UX has functions of the same names, that however use a struct checklist instead of a struct fstab, and calls these functions obsolete, superseded by getmntent(3).

STANDARDS

None.

HISTORY

The getfsent() function appeared in 4.0BSD; the other four functions appeared in 4.3BSD.

NOTES

These functions are not thread-safe.

Since Linux allows mounting a block special device in several places, and since several devices can have the same mount point, where the last device with a given mount point is the interesting one, while getfsfile() and getfsspec() only return the first occurrence, these two functions are not suitable for use under Linux.

SEE ALSO

getmntent(3), fstab(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1980 - Linux cli command int8_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command int8_ttype and provides detailed information about the command int8_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the int8_ttype.

NAME 🖥️ int8_ttype 🖥️

fixed-width basic integer types

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <stdint.h>
typedef /* ... */ int8_t;
typedef /* ... */ int16_t;
typedef /* ... */ int32_t;
typedef /* ... */ int64_t;
typedef /* ... */ uint8_t;
typedef /* ... */ uint16_t;
typedef /* ... */ uint32_t;
typedef /* ... */ uint64_t;
#define INT8_WIDTH 8
#define INT16_WIDTH 16
#define INT32_WIDTH 32
#define INT64_WIDTH 64
#define UINT8_WIDTH 8
#define UINT16_WIDTH 16
#define UINT32_WIDTH 32
#define UINT64_WIDTH 64
#define INT8_MAX /* 2**(INT8_WIDTH - 1) - 1 */
#define INT16_MAX /* 2**(INT16_WIDTH - 1) - 1 */
#define INT32_MAX /* 2**(INT32_WIDTH - 1) - 1 */
#define INT64_MAX /* 2**(INT64_WIDTH - 1) - 1 */
#define INT8_MIN /* - 2**(INT8_WIDTH - 1) */
#define INT16_MIN /* - 2**(INT16_WIDTH - 1) */
#define INT32_MIN /* - 2**(INT32_WIDTH - 1) */
#define INT64_MIN /* - 2**(INT64_WIDTH - 1) */
#define UINT8_MAX /* 2**INT8_WIDTH - 1 */
#define UINT16_MAX /* 2**INT16_WIDTH - 1 */
#define UINT32_MAX /* 2**INT32_WIDTH - 1 */
#define UINT64_MAX /* 2**INT64_WIDTH - 1 */
#define INT8_C(c) c ## /* ... */
#define INT16_C(c) c ## /* ... */
#define INT32_C(c) c ## /* ... */
#define INT64_C(c) c ## /* ... */
#define UINT8_C(c) c ## /* ... */
#define UINT16_C(c) c ## /* ... */
#define UINT32_C(c) c ## /* ... */
#define UINT64_C(c) c ## /* ... */

DESCRIPTION

intN*_t* are signed integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are be capable of storing values in the range [INTN**_MIN**, INTN**_MAX**], substituting N by the appropriate number.

uintN*_t* are unsigned integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are capable of storing values in the range [0, UINTN**_MAX**], substituting N by the appropriate number.

According to POSIX, [u]int8_t, [u]int16_t, and [u]int32_t are required; [u]int64_t are only required in implementations that provide integer types with width 64; and all other types of this form are optional.

The macros [U]INTN**_WIDTH** expand to the width in bits of these types (N).

The macros [U]INTN**_MAX** expand to the maximum value that these types can hold.

The macros INTN**_MIN** expand to the minimum value that these types can hold.

The macros [U]INTN**_C**() expand their argument to an integer constant of type [u]intN*_t*.

The length modifiers for the [u]intN*_t* types for the printf(3) family of functions are expanded by macros of the forms PRIdN, PRIiN, PRIuN, and PRIxN (defined in <inttypes.h>); resulting for example in %“PRId64” or %“PRIi64” for printing int64_t values. The length modifiers for the [u]intN*_t* types for the scanf(3) family of functions are expanded by macros of the forms SCNdN, SCNiN, SCNuN, and SCNxN, (defined in <inttypes.h>); resulting for example in %“SCNu8” or %“SCNx8” for scanning uint8_t values.

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The [U]INTN**_WIDTH** macros were added in C23.

NOTES

The following header also provides these types: <inttypes.h>. <arpa/inet.h> also provides uint16_t and uint32_t.

SEE ALSO

intmax_t(3type), intptr_t(3type), printf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1981 - Linux cli command strerror

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strerror and provides detailed information about the command strerror, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strerror.

NAME 🖥️ strerror 🖥️

return string describing error number

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strerror(int errnum);
const char *strerrorname_np(int errnum);
const char *strerrordesc_np(int errnum);
int strerror_r(int errnum, char buf[.buflen], size_t buflen);
               /* XSI-compliant */
char *strerror_r(int errnum, char buf[.buflen], size_t buflen);
               /* GNU-specific */
char *strerror_l(int errnum, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strerrorname_np(), strerrordesc_np():

    _GNU_SOURCE

strerror_r():

    The XSI-compliant version is provided if:
        (_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE
    Otherwise, the GNU-specific version is provided.

DESCRIPTION

The strerror() function returns a pointer to a string that describes the error code passed in the argument errnum, possibly using the LC_MESSAGES part of the current locale to select the appropriate language. (For example, if errnum is EINVAL, the returned description will be “Invalid argument”.) This string must not be modified by the application, and the returned pointer will be invalidated on a subsequent call to strerror() or strerror_l(), or if the thread that obtained the string exits. No other library function, including perror(3), will modify this string.

Like strerror(), the strerrordesc_np() function returns a pointer to a string that describes the error code passed in the argument errnum, with the difference that the returned string is not translated according to the current locale.

The strerrorname_np() function returns a pointer to a string containing the name of the error code passed in the argument errnum. For example, given EPERM as an argument, this function returns a pointer to the string “EPERM”. Given 0 as an argument, this function returns a pointer to the string “0”.

strerror_r()

strerror_r() is like strerror(), but might use the supplied buffer buf instead of allocating one internally. This function is available in two versions: an XSI-compliant version specified in POSIX.1-2001 (available since glibc 2.3.4, but not POSIX-compliant until glibc 2.13), and a GNU-specific version (available since glibc 2.0). The XSI-compliant version is provided with the feature test macros settings shown in the SYNOPSIS; otherwise the GNU-specific version is provided. If no feature test macros are explicitly defined, then (since glibc 2.4) _POSIX_C_SOURCE is defined by default with the value 200112L, so that the XSI-compliant version of strerror_r() is provided by default.

The XSI-compliant strerror_r() is preferred for portable applications. It returns the error string in the user-supplied buffer buf of length buflen.

The GNU-specific strerror_r() returns a pointer to a string containing the error message. This may be either a pointer to a string that the function stores in buf, or a pointer to some (immutable) static string (in which case buf is unused). If the function stores a string in buf, then at most buflen bytes are stored (the string may be truncated if buflen is too small and errnum is unknown). The string always includes a terminating null byte (‘�’).

strerror_l()

strerror_l() is like strerror(), but maps errnum to a locale-dependent error message in the locale specified by locale. The behavior of strerror_l() is undefined if locale is the special locale object LC_GLOBAL_LOCALE or is not a valid locale object handle.

RETURN VALUE

The strerror(), strerror_l(), and the GNU-specific strerror_r() functions return the appropriate error description string, or an “Unknown error nnn” message if the error number is unknown.

On success, strerrorname_np() and strerrordesc_np() return the appropriate error description string. If errnum is an invalid error number, these functions return NULL.

The XSI-compliant strerror_r() function returns 0 on success. On error, a (positive) error number is returned (since glibc 2.13), or -1 is returned and errno is set to indicate the error (before glibc 2.13).

POSIX.1-2001 and POSIX.1-2008 require that a successful call to strerror() or strerror_l() shall leave errno unchanged, and note that, since no function return value is reserved to indicate an error, an application that wishes to check for errors should initialize errno to zero before the call, and then check errno after the call.

ERRORS

EINVAL
The value of errnum is not a valid error number.

ERANGE
Insufficient storage was supplied to contain the error description string.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strerror()

Thread safety

MT-Safe

strerrorname_np(), strerrordesc_np()

Thread safetyMT-Safe

strerror_r(), strerror_l()

Thread safetyMT-Safe

Before glibc 2.32, strerror() is not MT-Safe.

STANDARDS

strerror()
C11, POSIX.1-2008.

strerror_r()
strerror_l()
POSIX.1-2008.

strerrorname_np()
strerrordesc_np()
GNU.

POSIX.1-2001 permits strerror() to set errno if the call encounters an error, but does not specify what value should be returned as the function result in the event of an error. On some systems, strerror() returns NULL if the error number is unknown. On other systems, strerror() returns a string something like “Error nnn occurred” and sets errno to EINVAL if the error number is unknown. C99 and POSIX.1-2008 require the return value to be non-NULL.

HISTORY

strerror()
POSIX.1-2001, C89.

strerror_r()
POSIX.1-2001.

strerror_l()
glibc 2.6. POSIX.1-2008.

strerrorname_np()
strerrordesc_np()
glibc 2.32.

NOTES

strerrorname_np() and strerrordesc_np() are thread-safe and async-signal-safe.

SEE ALSO

err(3), errno(3), error(3), perror(3), strsignal(3), locale(7), signal-safety(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1982 - Linux cli command Moose_Manual_Exceptionspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Manual_Exceptionspm and provides detailed information about the command Moose_Manual_Exceptionspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Manual_Exceptionspm.

NAME 🖥️ Moose_Manual_Exceptionspm 🖥️

Moose’s exceptions

VERSION

version 2.2207

EXCEPTIONS IN MOOSE

Moose will throw an exception for all error conditions. This applies both to code in the Moose core as well as to all code generated when a class is made immutable. All exceptions are subclasses of the Moose::Exception class.

Each type of error has its own unique subclass, and many subclasses have additional attributes to provide more information about the error’s context, such as what classes or roles were involved.

EXCEPTION STRINGIFICATION

By default, Moose exceptions remove Moose internals from the stack trace. If you set the MOOSE_FULL_EXCEPTION environment variable to a true value, then the Moose internals will be included in the trace.

HANDLING MOOSE EXCEPTIONS

Because Moose’s exceptions use the standard die mechanism, you are free to catch and handle errors however you like. You could use an eval block to catch Moose exceptions. However, the Moose team strongly recommends using Try::Tiny instead. Please refer to Try::Tiny’s documentation for a discussion of how eval is dangerous.

The following example demonstrates how to catch and inspect a Moose::Exception. For the sake of simplicity, we will cause a very simple error. The extends keywords expects a list of superclass names. If we pass no superclass names, Moose will throw an instance of Moose::Exception::ExtendsMissingArgs.

Catching with Try::Tiny

use warnings; use strict; use Try::Tiny; try { package Example::Exception; use Moose; extends; # <– error! } catch { # $_ contains the instance of the exception thrown by the above try # block, but $_ may get clobbered, so we should copy its value to # another variable. my $e = $_; # Exception objects are not ubiquitous in Perl, so we must check # whether $e is blessed. We also need to ensure that $e is actually # the kind of exception we were expecting. if ( blessed $e && $e->isa(Moose::Exception::ExtendsMissingArgs) ) { my $class_name = $e->class_name; warn “You forgot to specify a superclass for $class_name, silly!”; } # Its either another type of an object or not an object at all. else { warn “$e “; } };

Example of catching ValidationFailedForTypeConstraint

use warnings; use strict; use Try::Tiny; { package Person; use Moose; use Moose::Util::TypeConstraints; subtype NameStr, as Str, where { $_ =~ /^[a-zA-Z]+$/; }; has age => ( is => ro, isa => Int, required => 1 ); has name => ( is => ro, isa => NameStr, required => 1 ); } my $person; while ( !$person ) { try { print Enter your age : ; my $age = <STDIN>; chomp $age; print Enter your name : ; my $name = <STDIN>; chomp $name; $person = Person->new( age => $age, name => $name ); my $person_name = $person->name; my $person_age = $person->age; print “$person_name is $person_age years old “; } catch { my $e = $_; if ( blessed $e && $e->isa( Moose::Exception::ValidationFailedForTypeConstraint) ) { my $attribute_name = $e->attribute->name; my $type_name = $e->type->name; my $value = $e->value; warn “You entered $value for $attribute_name, which is not a $type_name!”; } else { warn “$e “; } }; }

Example of catching AttributeIsRequired

use warnings; use strict; use Try::Tiny; { package Example::RequiredAttribute; use Moose; has required_attribute => ( is => ro, isa => Int, required => 1 ); } try { # were not passing required_attribute, so itll throw an exception my $object = Example::RequiredAttribute->new(); } catch { my $e = $_; if ( blessed $e && $e->isa(Moose::Exception::AttributeIsRequired) ) { warn $e->message, " “; } else { warn “$e “; } };

MOOSE EXCEPTION CLASSES

All the exception classes are listed in Moose::Manual::Exceptions::Manifest.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1983 - Linux cli command sigabbrev_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigabbrev_np and provides detailed information about the command sigabbrev_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigabbrev_np.

NAME 🖥️ sigabbrev_np 🖥️

return string describing signal

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strsignal(int sig);
const char *sigdescr_np(int sig);
const char *sigabbrev_np(int sig);
[[deprecated]] extern const char *const sys_siglist[];

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sigabbrev_np(), sigdescr_np():

    _GNU_SOURCE

strsignal():

    From glibc 2.10 to glibc 2.31:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

sys_siglist:

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The strsignal() function returns a string describing the signal number passed in the argument sig. The string can be used only until the next call to strsignal(). The string returned by strsignal() is localized according to the LC_MESSAGES category in the current locale.

The sigdescr_np() function returns a string describing the signal number passed in the argument sig. Unlike strsignal() this string is not influenced by the current locale.

The sigabbrev_np() function returns the abbreviated name of the signal, sig. For example, given the value SIGINT, it returns the string “INT”.

The (deprecated) array sys_siglist holds the signal description strings indexed by signal number. The strsignal() or the sigdescr_np() function should be used instead of this array; see also VERSIONS.

RETURN VALUE

The strsignal() function returns the appropriate description string, or an unknown signal message if the signal number is invalid. On some systems (but not on Linux), NULL may instead be returned for an invalid signal number.

The sigdescr_np() and sigabbrev_np() functions return the appropriate description string. The returned string is statically allocated and valid for the lifetime of the program. These functions return NULL for an invalid signal number.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strsignal()

Thread safety

MT-Unsafe race:strsignal locale

sigdescr_np(), sigabbrev_np()

Thread safetyMT-Safe

STANDARDS

strsignal()
POSIX.1-2008.

sigdescr_np()
sigabbrev_np()
GNU.

sys_siglist
None.

HISTORY

strsignal()
POSIX.1-2008. Solaris, BSD.

sigdescr_np()
sigabbrev_np()
glibc 2.32.

sys_siglist
Removed in glibc 2.32.

NOTES

sigdescr_np() and sigabbrev_np() are thread-safe and async-signal-safe.

SEE ALSO

psignal(3), strerror(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1984 - Linux cli command TAILQ_FIRST

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command TAILQ_FIRST and provides detailed information about the command TAILQ_FIRST, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the TAILQ_FIRST.

NAME 🖥️ TAILQ_FIRST 🖥️

implementation of a doubly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
TAILQ_ENTRY(TYPE);
TAILQ_HEAD(HEADNAME, TYPE);
TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD head);
void TAILQ_INIT(TAILQ_HEAD *head);
int TAILQ_EMPTY(TAILQ_HEAD *head);
void TAILQ_INSERT_HEAD(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_TAIL(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_AFTER(TAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_FIRST(TAILQ_HEAD *head);
struct TYPE *TAILQ_LAST(TAILQ_HEAD *head, HEADNAME);
struct TYPE *TAILQ_PREV(struct TYPE *elm, HEADNAME, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_NEXT(struct TYPE *elm, TAILQ_ENTRY NAME);
TAILQ_FOREACH(struct TYPE *var, TAILQ_HEAD *head,
 TAILQ_ENTRY NAME);
TAILQ_FOREACH_REVERSE(struct TYPE *var, TAILQ_HEAD *head, HEADNAME,
 TAILQ_ENTRY NAME);
void TAILQ_REMOVE(TAILQ_HEAD *head, struct TYPE *elm,
 TAILQ_ENTRY NAME);
void TAILQ_CONCAT(TAILQ_HEAD *head1, TAILQ_HEAD *head2,
 TAILQ_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked tail queues.

In the macro definitions, TYPE is the name of a user defined structure, that must contain a field of type TAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user defined structure that must be declared using the macro TAILQ_HEAD().

Creation

A tail queue is headed by a structure defined by the TAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the queue and the other to the last element in the queue. The elements are doubly linked so that an arbitrary element can be removed without traversing the queue. New elements can be added to the queue after an existing element, before an existing element, at the head of the queue, or at the end of the queue. A TAILQ_HEAD structure is declared as follows:

TAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the queue. A pointer to the head of the queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

TAILQ_ENTRY() declares a structure that connects the elements in the queue.

TAILQ_HEAD_INITIALIZER() evaluates to an initializer for the queue head.

TAILQ_INIT() initializes the queue referenced by

TAILQ_EMPTY() evaluates to true if there are no items on the queue. head.

Insertion

TAILQ_INSERT_HEAD() inserts the new element elm at the head of the queue.

TAILQ_INSERT_TAIL() inserts the new element elm at the end of the queue.

TAILQ_INSERT_BEFORE() inserts the new element elm before the element listelm.

TAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

TAILQ_FIRST() returns the first item on the queue, or NULL if the queue is empty.

TAILQ_LAST() returns the last item on the queue. If the queue is empty the return value is NULL.

TAILQ_PREV() returns the previous item on the queue, or NULL if this item is the first.

TAILQ_NEXT() returns the next item on the queue, or NULL if this item is the last.

TAILQ_FOREACH() traverses the queue referenced by head in the forward direction, assigning each element in turn to var. var is set to NULL if the loop completes normally, or if there were no elements.

TAILQ_FOREACH_REVERSE() traverses the queue referenced by head in the reverse direction, assigning each element in turn to var.

Removal

TAILQ_REMOVE() removes the element elm from the queue.

Other features

TAILQ_CONCAT() concatenates the queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

TAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

TAILQ_FIRST(), TAILQ_LAST(), TAILQ_PREV(), and TAILQ_NEXT() return a pointer to the first, last, previous, or next TYPE structure, respectively.

TAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

STANDARDS

BSD.

HISTORY

4.4BSD.

CAVEATS

TAILQ_FOREACH() and TAILQ_FOREACH_REVERSE() don’t allow var to be removed or freed within the loop, as it would interfere with the traversal. TAILQ_FOREACH_SAFE() and TAILQ_FOREACH_REVERSE_SAFE(), which are present on the BSDs but are not present in glibc, fix this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    TAILQ_ENTRY(entry) entries;             /* Tail queue */
};
TAILQ_HEAD(tailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct tailhead head;                   /* Tail queue head */
    int i;
    TAILQ_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    TAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    TAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    TAILQ_INSERT_AFTER(&head, n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    TAILQ_INSERT_BEFORE(n2, n3, entries);
    TAILQ_REMOVE(&head, n2, entries);       /* Deletion */
    free(n2);
                                            /* Forward traversal */
    i = 0;
    TAILQ_FOREACH(np, &head, entries)
        np->data = i++;
                                            /* Reverse traversal */
    TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = TAILQ_FIRST(&head); while (n1 != NULL) { n2 = TAILQ_NEXT(n1, entries); free(n1); n1 = n2; } TAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1985 - Linux cli command XtAppErrorMsg

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppErrorMsg and provides detailed information about the command XtAppErrorMsg, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppErrorMsg.

NAME 🖥️ XtAppErrorMsg 🖥️

high-level error handlers

SYNTAX

#include <X11/Intrinsic.h>

void XtAppErrorMsg(XtAppContext app_context, const char *name, const char *type, const char *class, const char *defaultMsg, String *params, Cardinal *num_params);

XtErrorMsgHandler XtAppSetErrorMsgHandler(XtAppContext app_context, XtErrorMsgHandler msg_handler);

XtErrorMsgHandler XtAppSetWarningMsgHandler(XtAppContext app_context, XtErrorMsgHandler msg_handler);

void XtAppWarningMsg(XtAppContext app_context, const char *name, const char *type, const char *class, const char *defaultMsg, String *params, Cardinal *num_params);

ARGUMENTS

app_context
Specifies the application context.

class
Specifies the resource class of the error message.

defaultMsg
Specifies the default message to use.

name
Specifies the general kind of error.

type
Specifies the detailed name of the error.

msg_handler
Specifies the new fatal error procedure, which should not return or the nonfatal error procedure, which usually returns.

num_params
Specifies the number of values in the parameter list.

params
Specifies a pointer to a list of values to be stored in the message.

DESCRIPTION

The XtAppErrorMsg function calls the high-level error handler and passes the specified information.

The XtAppSetErrorMsgHandler function registers the specified procedure, which is called when a fatal error occurs.

The XtAppSetWarningMsgHandler function registers the specified procedure, which is called when a nonfatal error condition occurs.

The XtAppWarningMsg function calls the high-level error handler and passes the specified information.

SEE ALSO

XtAppGetErrorDatabase(3), XtAppError(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1986 - Linux cli command zip_fclose

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_fclose and provides detailed information about the command zip_fclose, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_fclose.

libzip (-lzip)

The

function closes

and frees the memory allocated for it.

Upon successful completion 0 is returned. Otherwise, the error code is returned.

was added in libzip 0.6.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1987 - Linux cli command SLIST_REMOVE_HEAD

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SLIST_REMOVE_HEAD and provides detailed information about the command SLIST_REMOVE_HEAD, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SLIST_REMOVE_HEAD.

NAME 🖥️ SLIST_REMOVE_HEAD 🖥️

implementation of a singly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
SLIST_ENTRY(TYPE);
SLIST_HEAD(HEADNAME, TYPE);
SLIST_HEAD SLIST_HEAD_INITIALIZER(SLIST_HEAD head);
void SLIST_INIT(SLIST_HEAD *head);
int SLIST_EMPTY(SLIST_HEAD *head);
void SLIST_INSERT_HEAD(SLIST_HEAD *head,
 struct TYPE *elm, SLIST_ENTRY NAME);
void SLIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, SLIST_ENTRY NAME);
struct TYPE *SLIST_FIRST(SLIST_HEAD *head);
struct TYPE *SLIST_NEXT(struct TYPE *elm, SLIST_ENTRY NAME);
SLIST_FOREACH(struct TYPE *var, SLIST_HEAD *head, SLIST_ENTRY NAME);
void SLIST_REMOVE(SLIST_HEAD *head, struct TYPE *elm,
 SLIST_ENTRY NAME);
void SLIST_REMOVE_HEAD(SLIST_HEAD *head,
 SLIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on singly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type SLIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro SLIST_HEAD().

Creation

A singly linked list is headed by a structure defined by the SLIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the list after an existing element or at the head of the list. An SLIST_HEAD structure is declared as follows:

SLIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

SLIST_ENTRY() declares a structure that connects the elements in the list.

SLIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

SLIST_INIT() initializes the list referenced by head.

SLIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

SLIST_INSERT_HEAD() inserts the new element elm at the head of the list.

SLIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

SLIST_FIRST() returns the first element in the list, or NULL if the list is empty.

SLIST_NEXT() returns the next element in the list.

SLIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

SLIST_REMOVE() removes the element elm from the list.

SLIST_REMOVE_HEAD() removes the element elm from the head of the list. For optimum efficiency, elements being removed from the head of the list should explicitly use this macro instead of the generic SLIST_REMOVE().

RETURN VALUE

SLIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

SLIST_FIRST(), and SLIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

SLIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

SLIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. SLIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    SLIST_ENTRY(entry) entries;             /* Singly linked list */
};
SLIST_HEAD(slisthead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct slisthead head;                  /* Singly linked list
                                               head */
    SLIST_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    SLIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    SLIST_INSERT_AFTER(n1, n2, entries);
    SLIST_REMOVE(&head, n2, entry, entries);/* Deletion */
    free(n2);
    n3 = SLIST_FIRST(&head);
    SLIST_REMOVE_HEAD(&head, entries);      /* Deletion from the head */
    free(n3);
    for (unsigned int i = 0; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        SLIST_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    SLIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); while (!SLIST_EMPTY(&head)) { /* List deletion */ n1 = SLIST_FIRST(&head); SLIST_REMOVE_HEAD(&head, entries); free(n1); } SLIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1988 - Linux cli command fseek

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fseek and provides detailed information about the command fseek, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fseek.

NAME 🖥️ fseek 🖥️

reposition a stream

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int fseek(FILE *stream, long offset, int whence);
long ftell(FILE *stream);
void rewind(FILE *stream);
int fgetpos(FILE *restrict stream, fpos_t *restrict pos);
int fsetpos(FILE *stream, const fpos_t *pos);

DESCRIPTION

The fseek() function sets the file position indicator for the stream pointed to by stream. The new position, measured in bytes, is obtained by adding offset bytes to the position specified by whence. If whence is set to SEEK_SET, SEEK_CUR, or SEEK_END, the offset is relative to the start of the file, the current position indicator, or end-of-file, respectively. A successful call to the fseek() function clears the end-of-file indicator for the stream and undoes any effects of the ungetc(3) function on the same stream.

The ftell() function obtains the current value of the file position indicator for the stream pointed to by stream.

The rewind() function sets the file position indicator for the stream pointed to by stream to the beginning of the file. It is equivalent to:

(void) fseek(stream, 0L, SEEK_SET)

except that the error indicator for the stream is also cleared (see clearerr(3)).

The fgetpos() and fsetpos() functions are alternate interfaces equivalent to ftell() and fseek() (with whence set to SEEK_SET), setting and storing the current value of the file offset into or from the object referenced by pos. On some non-UNIX systems, an fpos_t object may be a complex object and these routines may be the only way to portably reposition a text stream.

If the stream refers to a regular file and the resulting stream offset is beyond the size of the file, subsequent writes will extend the file with a hole, up to the offset, before committing any data. See lseek(2) for details on file seeking semantics.

RETURN VALUE

The rewind() function returns no value. Upon successful completion, fgetpos(), fseek(), fsetpos() return 0, and ftell() returns the current offset. Otherwise, -1 is returned and errno is set to indicate the error.

ERRORS

EINVAL
The whence argument to fseek() was not SEEK_SET, SEEK_END, or SEEK_CUR. Or: the resulting file offset would be negative.

ESPIPE
The file descriptor underlying stream is not seekable (e.g., it refers to a pipe, FIFO, or socket).

The functions fgetpos(), fseek(), fsetpos(), and ftell() may also fail and set errno for any of the errors specified for the routines fflush(3), fstat(2), lseek(2), and malloc(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fseek(), ftell(), rewind(), fgetpos(), fsetpos()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89.

SEE ALSO

lseek(2), fseeko(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1989 - Linux cli command Module_Runtimepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Module_Runtimepm and provides detailed information about the command Module_Runtimepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Module_Runtimepm.

NAME 🖥️ Module_Runtimepm 🖥️

runtime module handling

SYNOPSIS

use Module::Runtime qw( $module_name_rx is_module_name check_module_name module_notional_filename require_module); if($module_name =~ /\A$module_name_rx\z/o) { … if(is_module_name($module_name)) { … check_module_name($module_name); $notional_filename = module_notional_filename($module_name); require_module($module_name); use Module::Runtime qw(use_module use_package_optimistically); $bi = use_module(“Math::BigInt”, 1.31)->new(“1_234”); $widget = use_package_optimistically(“Local::Widget”)->new; use Module::Runtime qw( $top_module_spec_rx $sub_module_spec_rx is_module_spec check_module_spec compose_module_name); if($spec =~ /\A$top_module_spec_rx\z/o) { … if($spec =~ /\A$sub_module_spec_rx\z/o) { … if(is_module_spec(“Standard::Prefix”, $spec)) { … check_module_spec(“Standard::Prefix”, $spec); $module_name = compose_module_name(“Standard::Prefix”, $spec);

DESCRIPTION

The functions exported by this module deal with runtime handling of Perl modules, which are normally handled at compile time. This module avoids using any other modules, so that it can be used in low-level infrastructure.

The parts of this module that work with module names apply the same syntax that is used for barewords in Perl source. In principle this syntax can vary between versions of Perl, and this module applies the syntax of the Perl on which it is running. In practice the usable syntax hasn’t changed yet. There’s some intent for Unicode module names to be supported in the future, but this hasn’t yet amounted to any consistent facility.

The functions of this module whose purpose is to load modules include workarounds for three old Perl core bugs regarding require. These workarounds are applied on any Perl version where the bugs exist, except for a case where one of the bugs cannot be adequately worked around in pure Perl.

Module name syntax

The usable module name syntax has not changed from Perl 5.000 up to Perl 5.19.8. The syntax is composed entirely of ASCII characters. From Perl 5.6 onwards there has been some attempt to allow the use of non-ASCII Unicode characters in Perl source, but it was fundamentally broken (like the entirety of Perl 5.6’s Unicode handling) and remained pretty much entirely unusable until it got some attention in the Perl 5.15 series. Although Unicode is now consistently accepted by the parser in some places, it remains broken for module names. Furthermore, there has not yet been any work on how to map Unicode module names into filenames, so in that respect also Unicode module names are unusable.

The module name syntax is, precisely: the string must consist of one or more segments separated by ::; each segment must consist of one or more identifier characters (ASCII alphanumerics plus _); the first character of the string must not be a digit. Thus “IO::File, warnings, and foo::123::x_0 are all valid module names, whereas IO:: and 1foo::bar” are not. separators are not permitted by this module, though they remain usable in Perl source, being translated to :: in the parser.

Core bugs worked around

The first bug worked around is core bug [perl #68590], which causes lexical state in one file to leak into another that is required/used from it. This bug is present from Perl 5.6 up to Perl 5.10, and is fixed in Perl 5.11.0. From Perl 5.9.4 up to Perl 5.10.0 no satisfactory workaround is possible in pure Perl. The workaround means that modules loaded via this module don’t suffer this pollution of their lexical state. Modules loaded in other ways, or via this module on the Perl versions where the pure Perl workaround is impossible, remain vulnerable. The module Lexical::SealRequireHints provides a complete workaround for this bug.

The second bug worked around causes some kinds of failure in module loading, principally compilation errors in the loaded module, to be recorded in %INC as if they were successful, so later attempts to load the same module immediately indicate success. This bug is present up to Perl 5.8.9, and is fixed in Perl 5.9.0. The workaround means that a compilation error in a module loaded via this module won’t be cached as a success. Modules loaded in other ways remain liable to produce bogus %INC entries, and if a bogus entry exists then it will mislead this module if it is used to re-attempt loading.

The third bug worked around causes the wrong context to be seen at file scope of a loaded module, if require is invoked in a location that inherits context from a higher scope. This bug is present up to Perl 5.11.2, and is fixed in Perl 5.11.3. The workaround means that a module loaded via this module will always see the correct context. Modules loaded in other ways remain vulnerable.

REGULAR EXPRESSIONS

These regular expressions do not include any anchors, so to check whether an entire string matches a syntax item you must supply the anchors yourself.

$module_name_rx
Matches a valid Perl module name in bareword syntax.

$top_module_spec_rx
Matches a module specification for use with compose_module_name, where no prefix is being used.

$sub_module_spec_rx
Matches a module specification for use with compose_module_name, where a prefix is being used.

FUNCTIONS

Basic module handling

is_module_name(ARG)
Returns a truth value indicating whether ARG is a plain string satisfying Perl module name syntax as described for $module_name_rx.

is_valid_module_name(ARG)
Deprecated alias for is_module_name.

check_module_name(ARG)
Check whether ARG is a plain string satisfying Perl module name syntax as described for $module_name_rx. Return normally if it is, or die if it is not.

module_notional_filename(NAME)
Generates a notional relative filename for a module, which is used in some Perl core interfaces. The NAME is a string, which should be a valid module name (one or more ::-separated segments). If it is not a valid name, the function dies. The notional filename for the named module is generated and returned. This filename is always in Unix style, with / directory separators and a .pm suffix. This kind of filename can be used as an argument to require, and is the key that appears in %INC to identify a module, regardless of actual local filename syntax.

require_module(NAME)
This is essentially the bareword form of require, in runtime form. The NAME is a string, which should be a valid module name (one or more ::-separated segments). If it is not a valid name, the function dies. The module specified by NAME is loaded, if it hasn’t been already, in the manner of the bareword form of require. That means that a search through @INC is performed, and a byte-compiled form of the module will be used if available. The return value is as for require. That is, it is the value returned by the module itself if the module is loaded anew, or 1 if the module was already loaded.

Structured module use

use_module(NAME[, VERSION])
This is essentially use in runtime form, but without the importing feature (which is fundamentally a compile-time thing). The NAME is handled just like in require_module above: it must be a module name, and the named module is loaded as if by the bareword form of require. If a VERSION is specified, the VERSION method of the loaded module is called with the specified VERSION as an argument. This normally serves to ensure that the version loaded is at least the version required. This is the same functionality provided by the VERSION parameter of use. On success, the name of the module is returned. This is unlike require_module, and is done so that the entire call to use_module can be used as a class name to call a constructor, as in the example in the synopsis.

use_package_optimistically(NAME[, VERSION])
This is an analogue of use_module for the situation where there is uncertainty as to whether a package/class is defined in its own module or by some other means. It attempts to arrange for the named package to be available, either by loading a module or by doing nothing and hoping. An attempt is made to load the named module (as if by the bareword form of require). If the module cannot be found then it is assumed that the package was actually already loaded by other means, and no error is signalled. That’s the optimistic bit. Warning: this optional module loading is liable to cause unreliable behaviour, including security problems. It interacts especially badly with having . in @INC, which was the default state of affairs in Perls prior to 5.25.11. If a package is actually defined by some means other than a module, then applying this function to it causes a spurious attempt to load a module that is expected to be non-existent. If a module actually exists under that name then it will be unintentionally loaded. If . is in @INC and this code is ever run with the current directory being one writable by a malicious user (such as /tmp), then the malicious user can easily cause the victim to run arbitrary code, by creating a module file under the predictable spuriously-loaded name in the writable directory. Generally, optional module loading should be avoided. This is mostly the same operation that is performed by the base pragma to ensure that the specified base classes are available. The behaviour of base was simplified in version 2.18, and later improved in version 2.20, and on both occasions this function changed to match. If a VERSION is specified, the VERSION method of the loaded package is called with the specified VERSION as an argument. This normally serves to ensure that the version loaded is at least the version required. On success, the name of the package is returned. These aspects of the function work just like use_module.

Module name composition

is_module_spec(PREFIX, SPEC)
Returns a truth value indicating whether SPEC is valid input for compose_module_name. See below for what that entails. Whether a PREFIX is supplied affects the validity of SPEC, but the exact value of the prefix is unimportant, so this function treats PREFIX as a truth value.

is_valid_module_spec(PREFIX, SPEC)
Deprecated alias for is_module_spec.

check_module_spec(PREFIX, SPEC)
Check whether SPEC is valid input for compose_module_name. Return normally if it is, or die if it is not.

compose_module_name(PREFIX, SPEC)
This function is intended to make it more convenient for a user to specify a Perl module name at runtime. Users have greater need for abbreviations and context-sensitivity than programmers, and Perl module names get a little unwieldy. SPEC is what the user specifies, and this function translates it into a module name in standard form, which it returns. SPEC has syntax approximately that of a standard module name: it should consist of one or more name segments, each of which consists of one or more identifier characters. However, / is permitted as a separator, in addition to the standard ::. The two separators are entirely interchangeable. Additionally, if PREFIX is not undef then it must be a module name in standard form, and it is prefixed to the user-specified name. The user can inhibit the prefix addition by starting SPEC with a separator (either / or ::).

BUGS

On Perl versions 5.7.2 to 5.8.8, if require is overridden by the CORE::GLOBAL mechanism, it is likely to break the heuristics used by use_package_optimistically, making it signal an error for a missing module rather than assume that it was already loaded. From Perl 5.8.9 onwards, and on 5.7.1 and earlier, this module can avoid being confused by such an override. On the affected versions, a require override might be installed by Lexical::SealRequireHints, if something requires its bugfix but for some reason its XS implementation isn’t available.

SEE ALSO

Lexical::SealRequireHints, base, require in perlfunc, use in perlfunc

AUTHOR

Andrew Main (Zefram) <[email protected]>

COPYRIGHT

Copyright (C) 2004, 2006, 2007, 2009, 2010, 2011, 2012, 2014, 2017 Andrew Main (Zefram) <[email protected]>

LICENSE

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1990 - Linux cli command pthread_create

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_create and provides detailed information about the command pthread_create, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_create.

NAME 🖥️ pthread_create 🖥️

create a new thread

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_create(pthread_t *restrict thread,
 const pthread_attr_t *restrict attr,
 void *(*start_routine)(void *),
 void *restrict arg);

DESCRIPTION

The pthread_create() function starts a new thread in the calling process. The new thread starts execution by invoking start_routine(); arg is passed as the sole argument of start_routine().

The new thread terminates in one of the following ways:

  • It calls pthread_exit(3), specifying an exit status value that is available to another thread in the same process that calls pthread_join(3).

  • It returns from start_routine(). This is equivalent to calling pthread_exit(3) with the value supplied in the return statement.

  • It is canceled (see pthread_cancel(3)).

  • Any of the threads in the process calls exit(3), or the main thread performs a return from main(). This causes the termination of all threads in the process.

The attr argument points to a pthread_attr_t structure whose contents are used at thread creation time to determine attributes for the new thread; this structure is initialized using pthread_attr_init(3) and related functions. If attr is NULL, then the thread is created with default attributes.

Before returning, a successful call to pthread_create() stores the ID of the new thread in the buffer pointed to by thread; this identifier is used to refer to the thread in subsequent calls to other pthreads functions.

The new thread inherits a copy of the creating thread’s signal mask (pthread_sigmask(3)). The set of pending signals for the new thread is empty (sigpending(2)). The new thread does not inherit the creating thread’s alternate signal stack (sigaltstack(2)).

The new thread inherits the calling thread’s floating-point environment (fenv(3)).

The initial value of the new thread’s CPU-time clock is 0 (see pthread_getcpuclockid(3)).

Linux-specific details

The new thread inherits copies of the calling thread’s capability sets (see capabilities(7)) and CPU affinity mask (see sched_setaffinity(2)).

RETURN VALUE

On success, pthread_create() returns 0; on error, it returns an error number, and the contents of *thread are undefined.

ERRORS

EAGAIN
Insufficient resources to create another thread.

EAGAIN
A system-imposed limit on the number of threads was encountered. There are a number of limits that may trigger this error: the RLIMIT_NPROC soft resource limit (set via setrlimit(2)), which limits the number of processes and threads for a real user ID, was reached; the kernel’s system-wide limit on the number of processes and threads, /proc/sys/kernel/threads-max, was reached (see proc(5)); or the maximum number of PIDs, /proc/sys/kernel/pid_max, was reached (see proc(5)).

EINVAL
Invalid settings in attr.

EPERM
No permission to set the scheduling policy and parameters specified in attr.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_create()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

See pthread_self(3) for further information on the thread ID returned in *thread by pthread_create(). Unless real-time scheduling policies are being employed, after a call to pthread_create(), it is indeterminate which thread—the caller or the new thread—will next execute.

A thread may either be joinable or detached. If a thread is joinable, then another thread can call pthread_join(3) to wait for the thread to terminate and fetch its exit status. Only when a terminated joinable thread has been joined are the last of its resources released back to the system. When a detached thread terminates, its resources are automatically released back to the system: it is not possible to join with the thread in order to obtain its exit status. Making a thread detached is useful for some types of daemon threads whose exit status the application does not need to care about. By default, a new thread is created in a joinable state, unless attr was set to create the thread in a detached state (using pthread_attr_setdetachstate(3)).

Under the NPTL threading implementation, if the RLIMIT_STACK soft resource limit at the time the program started has any value other than “unlimited”, then it determines the default stack size of new threads. Using pthread_attr_setstacksize(3), the stack size attribute can be explicitly set in the attr argument used to create a thread, in order to obtain a stack size other than the default. If the RLIMIT_STACK resource limit is set to “unlimited”, a per-architecture value is used for the stack size: 2 MB on most architectures; 4 MB on POWER and Sparc-64.

BUGS

In the obsolete LinuxThreads implementation, each of the threads in a process has a different process ID. This is in violation of the POSIX threads specification, and is the source of many other nonconformances to the standard; see pthreads(7).

EXAMPLES

The program below demonstrates the use of pthread_create(), as well as a number of other functions in the pthreads API.

In the following run, on a system providing the NPTL threading implementation, the stack size defaults to the value given by the “stack size” resource limit:

$ ulimit -s
8192            # The stack size limit is 8 MB (0x800000 bytes)
$ ./a.out hola salut servus
Thread 1: top of stack near 0xb7dd03b8; argv_string=hola
Thread 2: top of stack near 0xb75cf3b8; argv_string=salut
Thread 3: top of stack near 0xb6dce3b8; argv_string=servus
Joined with thread 1; returned value was HOLA
Joined with thread 2; returned value was SALUT
Joined with thread 3; returned value was SERVUS

In the next run, the program explicitly sets a stack size of 1 MB (using pthread_attr_setstacksize(3)) for the created threads:

$ ./a.out -s 0x100000 hola salut servus
Thread 1: top of stack near 0xb7d723b8; argv_string=hola
Thread 2: top of stack near 0xb7c713b8; argv_string=salut
Thread 3: top of stack near 0xb7b703b8; argv_string=servus
Joined with thread 1; returned value was HOLA
Joined with thread 2; returned value was SALUT
Joined with thread 3; returned value was SERVUS

Program source

#include <ctype.h>
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#define handle_error_en(en, msg) \
        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
#define handle_error(msg) \
        do { perror(msg); exit(EXIT_FAILURE); } while (0)
struct thread_info {    /* Used as argument to thread_start() */
    pthread_t thread_id;        /* ID returned by pthread_create() */
    int       thread_num;       /* Application-defined thread # */
    char     *argv_string;      /* From command-line argument */
};
/* Thread start function: display address near top of our stack,
   and return upper-cased copy of argv_string. */
static void *
thread_start(void *arg)
{
    struct thread_info *tinfo = arg;
    char *uargv;
    printf("Thread %d: top of stack near %p; argv_string=%s

“, tinfo->thread_num, (void *) &tinfo, tinfo->argv_string); uargv = strdup(tinfo->argv_string); if (uargv == NULL) handle_error(“strdup”); for (char *p = uargv; *p != ‘�’; p++) *p = toupper(*p); return uargv; } int main(int argc, char *argv[]) { int s, opt; void *res; size_t num_threads; ssize_t stack_size; pthread_attr_t attr; struct thread_info tinfo; / The “-s” option specifies a stack size for our threads. / stack_size = -1; while ((opt = getopt(argc, argv, “s:”)) != -1) { switch (opt) { case ’s’: stack_size = strtoul(optarg, NULL, 0); break; default: fprintf(stderr, “Usage: %s [-s stack-size] arg… “, argv[0]); exit(EXIT_FAILURE); } } num_threads = argc - optind; / Initialize thread creation attributes. / s = pthread_attr_init(&attr); if (s != 0) handle_error_en(s, “pthread_attr_init”); if (stack_size > 0) { s = pthread_attr_setstacksize(&attr, stack_size); if (s != 0) handle_error_en(s, “pthread_attr_setstacksize”); } / Allocate memory for pthread_create() arguments. */ tinfo = calloc(num_threads, sizeof(tinfo)); if (tinfo == NULL) handle_error(“calloc”); / Create one thread for each command-line argument. / for (size_t tnum = 0; tnum < num_threads; tnum++) { tinfo[tnum].thread_num = tnum + 1; tinfo[tnum].argv_string = argv[optind + tnum]; / The pthread_create() call stores the thread ID into corresponding element of tinfo[]. / s = pthread_create(&tinfo[tnum].thread_id, &attr, &thread_start, &tinfo[tnum]); if (s != 0) handle_error_en(s, “pthread_create”); } / Destroy the thread attributes object, since it is no longer needed. / s = pthread_attr_destroy(&attr); if (s != 0) handle_error_en(s, “pthread_attr_destroy”); / Now join with each thread, and display its returned value. */ for (size_t tnum = 0; tnum < num_threads; tnum++) { s = pthread_join(tinfo[tnum].thread_id, &res); if (s != 0) handle_error_en(s, “pthread_join”); printf(“Joined with thread %d; returned value was %s “, tinfo[tnum].thread_num, (char ) res); free(res); / Free memory allocated by thread */ } free(tinfo); exit(EXIT_SUCCESS); }

SEE ALSO

getrlimit(2), pthread_attr_init(3), pthread_cancel(3), pthread_detach(3), pthread_equal(3), pthread_exit(3), pthread_getattr_np(3), pthread_join(3), pthread_self(3), pthread_setattr_default_np(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1991 - Linux cli command wcstok

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcstok and provides detailed information about the command wcstok, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcstok.

NAME 🖥️ wcstok 🖥️

split wide-character string into tokens

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
wchar_t *wcstok(wchar_t *restrict wcs",constwchar_t*restrict"delim,
 wchar_t **restrict ptr);

DESCRIPTION

The wcstok() function is the wide-character equivalent of the strtok(3) function, with an added argument to make it multithread-safe. It can be used to split a wide-character string wcs into tokens, where a token is defined as a substring not containing any wide-characters from delim.

The search starts at wcs, if wcs is not NULL, or at *ptr, if wcs is NULL. First, any delimiter wide-characters are skipped, that is, the pointer is advanced beyond any wide-characters which occur in delim. If the end of the wide-character string is now reached, wcstok() returns NULL, to indicate that no tokens were found, and stores an appropriate value in *ptr, so that subsequent calls to wcstok() will continue to return NULL. Otherwise, the wcstok() function recognizes the beginning of a token and returns a pointer to it, but before doing that, it zero-terminates the token by replacing the next wide-character which occurs in delim with a null wide character (L’�’), and it updates *ptr so that subsequent calls will continue searching after the end of recognized token.

RETURN VALUE

The wcstok() function returns a pointer to the next token, or NULL if no further token was found.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcstok()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The original wcs wide-character string is destructively modified during the operation.

EXAMPLES

The following code loops over the tokens contained in a wide-character string.

wchar_t *wcs = ...;
wchar_t *token;
wchar_t *state;
for (token = wcstok(wcs, L" 	

“, &state); token != NULL; token = wcstok(NULL, L” “, &state)) { … }

SEE ALSO

strtok(3), wcschr(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1992 - Linux cli command zip_stat

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_stat and provides detailed information about the command zip_stat, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_stat.

libzip (-lzip)

The

function obtains information about the file named

in

The

argument specifies how the name lookup should be done. Its values are described in

Also,

may be

to it to request information about the original file in the archive, ignoring any changes made.

The

function obtains information about the file at position

The

argument is a pointer to a

(shown below), into which information about the file is placed.

struct zip_stat { zip_uint64_t valid; /* which fields have valid values */ const char *name; /* name of the file */ zip_uint64_t index; /* index within archive */ zip_uint64_t size; /* size of file (uncompressed) */ zip_uint64_t comp_size; /* size of file (compressed) */ time_t mtime; /* modification time */ zip_uint32_t crc; /* crc of file data */ zip_uint16_t comp_method; /* compression method used */ zip_uint16_t encryption_method; /* encryption method used */ zip_uint32_t flags; /* reserved for future use */ };

The structure pointed to by

must be allocated before calling

or

The

field of the structure specifies which other fields are valid. Check if the flag defined by the following defines are in

before accessing the fields:

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

The function

can fail for any of the errors specified for the routine

The function

fails and sets the error information to

if

is invalid. If

is not set and no information can be obtained from the source callback, the error information is set to

was added in libzip 0.6. In libzip 0.11 the type of

was changed from

to

was added in libzip 0.6. In libzip 0.10 the type of

was changed from

to

In libzip 0.11 the type of

was changed from

to

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1993 - Linux cli command Number_Comparepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Number_Comparepm and provides detailed information about the command Number_Comparepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Number_Comparepm.

NAME 🖥️ Number_Comparepm 🖥️

numeric comparisons

SYNOPSIS

Number::Compare->new(">1Ki")->test(1025); # is 1025 > 1024 my $c = Number::Compare->new(">1M"); $c->(1_200_000); # slightly terser invocation

DESCRIPTION

Number::Compare compiles a simple comparison to an anonymous subroutine, which you can call with a value to be tested again.

Now this would be very pointless, if Number::Compare didn’t understand magnitudes.

The target value may use magnitudes of kilobytes (k, ki), megabytes (m, mi), or gigabytes (g, gi). Those suffixed with an i use the appropriate 2**n version in accordance with the IEC standard: http://physics.nist.gov/cuu/Units/binary.html

METHODS

->new( $test )

Returns a new object that compares the specified test.

->test( $value )

A longhanded version of $compare->( $value ). Predates blessed subroutine reference implementation.

->parse_to_perl( $test )

Returns a perl code fragment equivalent to the test.

AUTHOR

Richard Clamp <[email protected]>

COPYRIGHT

Copyright (C) 2002,2011 Richard Clamp. All Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

http://physics.nist.gov/cuu/Units/binary.html

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1994 - Linux cli command XML_Parser_Style_Objectspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_Parser_Style_Objectspm and provides detailed information about the command XML_Parser_Style_Objectspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_Parser_Style_Objectspm.

NAME 🖥️ XML_Parser_Style_Objectspm 🖥️

Objects styler parser

SYNOPSIS

use XML::Parser; my $p = XML::Parser->new(Style => Objects, Pkg => MyNode); my $tree = $p->parsefile(foo.xml);

DESCRIPTION

This module implements XML::Parser’s Objects style parser.

This is similar to the Tree style, except that a hash object is created for each element. The corresponding object will be in the class whose name is created by appending “::” and the element name to the package set with the Pkg option. Non-markup text will be in the ::Characters class. The contents of the corresponding object will be in an anonymous array that is the value of the Kids property for that object.

SEE ALSO

XML::Parser::Style::Tree

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1995 - Linux cli command off64_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command off64_ttype and provides detailed information about the command off64_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the off64_ttype.

NAME 🖥️ off64_ttype 🖥️

file sizes

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/types.h>
typedef /* ... */ off_t;
#define _LARGEFILE64_SOURCE
#include <sys/types.h>
typedef /* ... */ off64_t;
#define _GNU_SOURCE
#include <sys/types.h>
typedef /* ... */ loff_t;

DESCRIPTION

off_t is used for describing file sizes. It is a signed integer type.

off64_t is a 64-bit version of the type, used in glibc.

loff_t is a 64-bit version of the type, introduced by the Linux kernel.

STANDARDS

off_t
POSIX.1-2008.

off64_t
GNU and some BSDs.

loff_t
Linux.

VERSIONS

off_t
POSIX.1-2001.

<aio.h> and <stdio.h> define off_t since POSIX.1-2008.

NOTES

On some architectures, the width of off_t can be controlled with the feature test macro _FILE_OFFSET_BITS.

The following headers also provide off_t: <aio.h>, <fcntl.h>, <stdio.h>, <sys/mman.h>, <sys/stat.h>, and <unistd.h>.

SEE ALSO

copy_file_range(2), llseek(2), lseek(2), mmap(2), posix_fadvise(2), pread(2), readahead(2), sync_file_range(2), truncate(2), fseeko(3), lockf(3), lseek64(3), posix_fallocate(3), feature_test_macros(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1996 - Linux cli command Image_ExifTool_MNGpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_MNGpm and provides detailed information about the command Image_ExifTool_MNGpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_MNGpm.

NAME 🖥️ Image_ExifTool_MNGpm 🖥️

MNG and JNG meta information tags

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read MNG (Multi-image Network Graphics) and JNG (JPEG Network Graphics) images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.libpng.org/pub/mng/>

SEE ALSO

“MNG Tags” in Image::ExifTool::TagNames, “PNG Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1997 - Linux cli command Image_ExifTool_Reconyxpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Reconyxpm and provides detailed information about the command Image_ExifTool_Reconyxpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Reconyxpm.

NAME 🖥️ Image_ExifTool_Reconyxpm 🖥️

Reconyx maker notes tags

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret maker notes in images from Reconyx cameras.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

“Reconyx Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1998 - Linux cli command sem_destroy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sem_destroy and provides detailed information about the command sem_destroy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sem_destroy.

NAME 🖥️ sem_destroy 🖥️

destroy an unnamed semaphore

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <semaphore.h>
int sem_destroy(sem_t *sem);

DESCRIPTION

sem_destroy() destroys the unnamed semaphore at the address pointed to by sem.

Only a semaphore that has been initialized by sem_init(3) should be destroyed using sem_destroy().

Destroying a semaphore that other processes or threads are currently blocked on (in sem_wait(3)) produces undefined behavior.

Using a semaphore that has been destroyed produces undefined results, until the semaphore has been reinitialized using sem_init(3).

RETURN VALUE

sem_destroy() returns 0 on success; on error, -1 is returned, and errno is set to indicate the error.

ERRORS

EINVAL
sem is not a valid semaphore.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sem_destroy()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

An unnamed semaphore should be destroyed with sem_destroy() before the memory in which it is located is deallocated. Failure to do this can result in resource leaks on some implementations.

SEE ALSO

sem_init(3), sem_post(3), sem_wait(3), sem_overview(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

1999 - Linux cli command XtOwnSelectionIncremental

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtOwnSelectionIncremental and provides detailed information about the command XtOwnSelectionIncremental, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtOwnSelectionIncremental.

NAME 🖥️ XtOwnSelectionIncremental 🖥️

set selection owner

SYNTAX

#include <X11/Intrinsic.h>

Boolean XtOwnSelection(Widget w, Atom selection, Time time, XtConvertSelectionProc convert_proc, XtLoseSelectionProc lose_selection, XtSelectionDoneProc done_proc);

Boolean XtOwnSelectionIncremental(Widget w, Atom selection, Time time, XtConvertSelectionIncrProc convert_callback, XtLoseSelectionIncrProc lose_callback, XtSelectionDoneIncrProc done_callback, XtCancelConvertSelectionProc cancel_callback, XtPointer client_data);

void XtDisownSelection(Widget w, Atom selection, Time time);

ARGUMENTS

convert_proc
Specifies the procedure that is to be called whenever someone requests the current value of the selection.

done_proc
Specifies the procedure that is called after the requestor has received the selection or NULL if the owner is not interested in being called back.

lose_selection
Specifies the procedure that is to be called whenever the widget has lost selection ownership or NULL if the owner is not interested in being called back.

selection
Specifies an atom that describes the type of the selection (for example, XA_PRIMARY, XA_SECONDARY, or XA_CLIPBOARD).

time
Specifies the timestamp that indicates when the selection ownership should commence or is to be relinquished.

  1. Specifies the widget that wishes to become the owner or to relinquish ownership.

DESCRIPTION

The XtOwnSelection function informs the Intrinsics selection mechanism that a widget believes it owns a selection. It returns True if the widget has successfully become the owner and False otherwise. The widget may fail to become the owner if some other widget has asserted ownership at a time later than this widget. Note that widgets can lose selection ownership either because someone else asserted later ownership of the selection or because the widget voluntarily gave up ownership of the selection. Also note that the lose_selection procedure is not called if the widget fails to obtain selection ownership in the first place.

The XtOwnSelectionIncremental procedure informs the Intrinsics incremental selection mechanism that the specified widget wishes to own the selection. It returns True if the specified widget successfully becomes the selection owner or False otherwise. For more information about selection, target, and time, see Section 2.6 of the Inter-Client Communication Conventions Manual.

A widget that becomes the selection owner using XtOwnSelectionIncremental may use XtDisownSelection to relinquish selection ownership.

The XtDisownSelection function informs the Intrinsics selection mechanism that the specified widget is to lose ownership of the selection. If the widget does not currently own the selection either because it lost the selection or because it never had the selection to begin with, XtDisownSelection does nothing.

After a widget has called XtDisownSelection, its convert procedure is not called even if a request arrives later with a timestamp during the period that this widget owned the selection. However, its done procedure will be called if a conversion that started before the call to XtDisownSelection finishes after the call to XtDisownSelection.

SEE ALSO

XtAppGetSelectionTimeout(3), XtGetSelectionValue(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2000 - Linux cli command __free_hook

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __free_hook and provides detailed information about the command __free_hook, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __free_hook.

NAME 🖥️ __free_hook 🖥️

malloc debugging variables (DEPRECATED)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <malloc.h>
void *(*volatile __malloc_hook)(size_t size, const void *caller);
void *(*volatile __realloc_hook)(void *ptr, size_t size,
 const void *caller);
void *(*volatile __memalign_hook)(size_t alignment, size_t size,
 const void *caller);
void (*volatile __free_hook)(void *ptr, const void *caller);
void (*__malloc_initialize_hook)(void);
void (*volatile __after_morecore_hook)(void);

DESCRIPTION

The GNU C library lets you modify the behavior of malloc(3), realloc(3), and free(3) by specifying appropriate hook functions. You can use these hooks to help you debug programs that use dynamic memory allocation, for example.

The variable __malloc_initialize_hook points at a function that is called once when the malloc implementation is initialized. This is a weak variable, so it can be overridden in the application with a definition like the following:

void (*__malloc_initialize_hook)(void) = my_init_hook;

Now the function my_init_hook() can do the initialization of all hooks.

The four functions pointed to by __malloc_hook, __realloc_hook, __memalign_hook, __free_hook have a prototype like the functions malloc(3), realloc(3), memalign(3), free(3), respectively, except that they have a final argument caller that gives the address of the caller of malloc(3), etc.

The variable __after_morecore_hook points at a function that is called each time after sbrk(2) was asked for more memory.

STANDARDS

GNU.

NOTES

The use of these hook functions is not safe in multithreaded programs, and they are now deprecated. From glibc 2.24 onwards, the __malloc_initialize_hook variable has been removed from the API, and from glibc 2.34 onwards, all the hook variables have been removed from the API. Programmers should instead preempt calls to the relevant functions by defining and exporting malloc(), free(), realloc(), and calloc().

EXAMPLES

Here is a short example of how to use these variables.

#include <stdio.h>
#include <malloc.h>
/* Prototypes for our hooks */
static void my_init_hook(void);
static void *my_malloc_hook(size_t, const void *);
/* Variables to save original hooks */
static void *(*old_malloc_hook)(size_t, const void *);
/* Override initializing hook from the C library */
void (*__malloc_initialize_hook)(void) = my_init_hook;
static void
my_init_hook(void)
{
    old_malloc_hook = __malloc_hook;
    __malloc_hook = my_malloc_hook;
}
static void *
my_malloc_hook(size_t size, const void *caller)
{
    void *result;
    /* Restore all old hooks */
    __malloc_hook = old_malloc_hook;
    /* Call recursively */
    result = malloc(size);
    /* Save underlying hooks */
    old_malloc_hook = __malloc_hook;
    /* printf() might call malloc(), so protect it too */
    printf("malloc(%zu) called from %p returns %p

“, size, caller, result); /* Restore our own hooks */ __malloc_hook = my_malloc_hook; return result; }

SEE ALSO

mallinfo(3), malloc(3), mcheck(3), mtrace(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2001 - Linux cli command getaddrinfo_a

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getaddrinfo_a and provides detailed information about the command getaddrinfo_a, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getaddrinfo_a.

NAME 🖥️ getaddrinfo_a 🖥️

asynchronous network address and service translation

LIBRARY

Asynchronous name lookup library (libanl, -lanl)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <netdb.h>
int getaddrinfo_a(int mode, struct gaicb *list[restrict],
 int nitems, struct sigevent *restrict sevp);
int gai_suspend(const struct gaicb *const list[], int nitems,
 const struct timespec *timeout);
int gai_error(struct gaicb *req);
int gai_cancel(struct gaicb *req);

DESCRIPTION

The getaddrinfo_a() function performs the same task as getaddrinfo(3), but allows multiple name look-ups to be performed asynchronously, with optional notification on completion of look-up operations.

The mode argument has one of the following values:

GAI_WAIT
Perform the look-ups synchronously. The call blocks until the look-ups have completed.

GAI_NOWAIT
Perform the look-ups asynchronously. The call returns immediately, and the requests are resolved in the background. See the discussion of the sevp argument below.

The array list specifies the look-up requests to process. The nitems argument specifies the number of elements in list. The requested look-up operations are started in parallel. NULL elements in list are ignored. Each request is described by a gaicb structure, defined as follows:

struct gaicb {
    const char            *ar_name;
    const char            *ar_service;
    const struct addrinfo *ar_request;
    struct addrinfo       *ar_result;
};

The elements of this structure correspond to the arguments of getaddrinfo(3). Thus, ar_name corresponds to the node argument and ar_service to the service argument, identifying an Internet host and a service. The ar_request element corresponds to the hints argument, specifying the criteria for selecting the returned socket address structures. Finally, ar_result corresponds to the res argument; you do not need to initialize this element, it will be automatically set when the request is resolved. The addrinfo structure referenced by the last two elements is described in getaddrinfo(3).

When mode is specified as GAI_NOWAIT, notifications about resolved requests can be obtained by employing the sigevent structure pointed to by the sevp argument. For the definition and general details of this structure, see sigevent(3type). The sevp->sigev_notify field can have the following values:

SIGEV_NONE
Don’t provide any notification.

SIGEV_SIGNAL
When a look-up completes, generate the signal sigev_signo for the process. See sigevent(3type) for general details. The si_code field of the siginfo_t structure will be set to SI_ASYNCNL.

SIGEV_THREAD
When a look-up completes, invoke sigev_notify_function as if it were the start function of a new thread. See sigevent(3type) for details.

For SIGEV_SIGNAL and SIGEV_THREAD, it may be useful to point sevp->sigev_value.sival_ptr to list.

The gai_suspend() function suspends execution of the calling thread, waiting for the completion of one or more requests in the array list. The nitems argument specifies the size of the array list. The call blocks until one of the following occurs:

  • One or more of the operations in list completes.

  • The call is interrupted by a signal that is caught.

  • The time interval specified in timeout elapses. This argument specifies a timeout in seconds plus nanoseconds (see nanosleep(2) for details of the timespec structure). If timeout is NULL, then the call blocks indefinitely (until one of the events above occurs).

No explicit indication of which request was completed is given; you must determine which request(s) have completed by iterating with gai_error() over the list of requests.

The gai_error() function returns the status of the request req: either EAI_INPROGRESS if the request was not completed yet, 0 if it was handled successfully, or an error code if the request could not be resolved.

The gai_cancel() function cancels the request req. If the request has been canceled successfully, the error status of the request will be set to EAI_CANCELED and normal asynchronous notification will be performed. The request cannot be canceled if it is currently being processed; in that case, it will be handled as if gai_cancel() has never been called. If req is NULL, an attempt is made to cancel all outstanding requests that the process has made.

RETURN VALUE

The getaddrinfo_a() function returns 0 if all of the requests have been enqueued successfully, or one of the following nonzero error codes:

EAI_AGAIN
The resources necessary to enqueue the look-up requests were not available. The application may check the error status of each request to determine which ones failed.

EAI_MEMORY
Out of memory.

EAI_SYSTEM
mode is invalid.

The gai_suspend() function returns 0 if at least one of the listed requests has been completed. Otherwise, it returns one of the following nonzero error codes:

EAI_AGAIN
The given timeout expired before any of the requests could be completed.

EAI_ALLDONE
There were no actual requests given to the function.

EAI_INTR
A signal has interrupted the function. Note that this interruption might have been caused by signal notification of some completed look-up request.

The gai_error() function can return EAI_INPROGRESS for an unfinished look-up request, 0 for a successfully completed look-up (as described above), one of the error codes that could be returned by getaddrinfo(3), or the error code EAI_CANCELED if the request has been canceled explicitly before it could be finished.

The gai_cancel() function can return one of these values:

EAI_CANCELED
The request has been canceled successfully.

EAI_NOTCANCELED
The request has not been canceled.

EAI_ALLDONE
The request has already completed.

The gai_strerror(3) function translates these error codes to a human readable string, suitable for error reporting.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getaddrinfo_a(), gai_suspend(), gai_error(), gai_cancel()

Thread safetyMT-Safe

STANDARDS

GNU.

HISTORY

glibc 2.2.3.

The interface of getaddrinfo_a() was modeled after the lio_listio(3) interface.

EXAMPLES

Two examples are provided: a simple example that resolves several requests in parallel synchronously, and a complex example showing some of the asynchronous capabilities.

Synchronous example

The program below simply resolves several hostnames in parallel, giving a speed-up compared to resolving the hostnames sequentially using getaddrinfo(3). The program might be used like this:

$ ./a.out mirrors.kernel.org enoent.linuxfoundation.org gnu.org
mirrors.kernel.org: 139.178.88.99
enoent.linuxfoundation.org: Name or service not known
gnu.org: 209.51.188.116

Here is the program source code

#define _GNU_SOURCE
#include <err.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MALLOC(n, type)  ((type *) reallocarray(NULL, n, sizeof(type)))
int
main(int argc, char *argv[])
{
    int ret;
    struct gaicb *reqs[argc - 1];
    char host[NI_MAXHOST];
    struct addrinfo *res;
    if (argc < 2) {
        fprintf(stderr, "Usage: %s HOST...

“, argv[0]); exit(EXIT_FAILURE); } for (size_t i = 0; i < argc - 1; i++) { reqs[i] = MALLOC(1, struct gaicb); if (reqs[i] == NULL) err(EXIT_FAILURE, “malloc”); memset(reqs[i], 0, sizeof(*reqs[0])); reqs[i]->ar_name = argv[i + 1]; } ret = getaddrinfo_a(GAI_WAIT, reqs, argc - 1, NULL); if (ret != 0) { fprintf(stderr, “getaddrinfo_a() failed: %s “, gai_strerror(ret)); exit(EXIT_FAILURE); } for (size_t i = 0; i < argc - 1; i++) { printf("%s: “, reqs[i]->ar_name); ret = gai_error(reqs[i]); if (ret == 0) { res = reqs[i]->ar_result; ret = getnameinfo(res->ai_addr, res->ai_addrlen, host, sizeof(host), NULL, 0, NI_NUMERICHOST); if (ret != 0) { fprintf(stderr, “getnameinfo() failed: %s “, gai_strerror(ret)); exit(EXIT_FAILURE); } puts(host); } else { puts(gai_strerror(ret)); } } exit(EXIT_SUCCESS); }

Asynchronous example

This example shows a simple interactive getaddrinfo_a() front-end. The notification facility is not demonstrated.

An example session might look like this:

$ ./a.out
> a mirrors.kernel.org enoent.linuxfoundation.org gnu.org
> c 2
[2] gnu.org: Request not canceled
> w 0 1
[00] mirrors.kernel.org: Finished
> l
[00] mirrors.kernel.org: 139.178.88.99
[01] enoent.linuxfoundation.org: Processing request in progress
[02] gnu.org: 209.51.188.116
> l
[00] mirrors.kernel.org: 139.178.88.99
[01] enoent.linuxfoundation.org: Name or service not known
[02] gnu.org: 209.51.188.116

The program source is as follows:

#define _GNU_SOURCE
#include <assert.h>
#include <err.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define CALLOC(n, type)  ((type *) calloc(n, sizeof(type)))
#define REALLOCF(ptr, n, type)                                          \
({                                                                      \
    static_assert(__builtin_types_compatible_p(typeof(ptr), type *));   \
                                                                        \
    (type *) reallocarrayf(ptr, n, sizeof(type));                       \
})
static struct gaicb **reqs = NULL;
static size_t nreqs = 0;
static inline void *
reallocarrayf(void *p, size_t nmemb, size_t size)
{
    void  *q;
    q = reallocarray(p, nmemb, size);
    if (q == NULL && nmemb != 0 && size != 0)
        free(p);
    return q;
}
static char *
getcmd(void)
{
    static char buf[256];
    fputs("> ", stdout); fflush(stdout);
    if (fgets(buf, sizeof(buf), stdin) == NULL)
        return NULL;
    if (buf[strlen(buf) - 1] == '

‘) buf[strlen(buf) - 1] = 0; return buf; } /* Add requests for specified hostnames. */ static void add_requests(void) { size_t nreqs_base = nreqs; char *host; int ret; while ((host = strtok(NULL, " “))) { nreqs++; reqs = REALLOCF(reqs, nreqs, struct gaicb ); if (reqs == NULL) err(EXIT_FAILURE, “reallocf”); reqs[nreqs - 1] = CALLOC(1, struct gaicb); if (reqs[nreqs - 1] == NULL) err(EXIT_FAILURE, “calloc”); reqs[nreqs - 1]->ar_name = strdup(host); } / Queue nreqs_base..nreqs requests. / ret = getaddrinfo_a(GAI_NOWAIT, &reqs[nreqs_base], nreqs - nreqs_base, NULL); if (ret) { fprintf(stderr, “getaddrinfo_a() failed: %s “, gai_strerror(ret)); exit(EXIT_FAILURE); } } / Wait until at least one of specified requests completes. */ static void wait_requests(void) { char *id; int ret; size_t n; struct gaicb const **wait_reqs; wait_reqs = CALLOC(nreqs, const struct gaicb ); if (wait_reqs == NULL) err(EXIT_FAILURE, “calloc”); / NULL elements are ignored by gai_suspend(). / while ((id = strtok(NULL, " “)) != NULL) { n = atoi(id); if (n >= nreqs) { printf(“Bad request number: %s “, id); return; } wait_reqs[n] = reqs[n]; } ret = gai_suspend(wait_reqs, nreqs, NULL); if (ret) { printf(“gai_suspend(): %s “, gai_strerror(ret)); return; } for (size_t i = 0; i < nreqs; i++) { if (wait_reqs[i] == NULL) continue; ret = gai_error(reqs[i]); if (ret == EAI_INPROGRESS) continue; printf(”[%02zu] %s: %s “, i, reqs[i]->ar_name, ret == 0 ? “Finished” : gai_strerror(ret)); } } / Cancel specified requests. */ static void cancel_requests(void) { char id; int ret; size_t n; while ((id = strtok(NULL, " “)) != NULL) { n = atoi(id); if (n >= nreqs) { printf(“Bad request number: %s “, id); return; } ret = gai_cancel(reqs[n]); printf(”[%s] %s: %s “, id, reqs[atoi(id)]->ar_name, gai_strerror(ret)); } } / List all requests. */ static void list_requests(void) { int ret; char host[NI_MAXHOST]; struct addrinfo *res; for (size_t i = 0; i < nreqs; i++) { printf(”[%02zu] %s: “, i, reqs[i]->ar_name); ret = gai_error(reqs[i]); if (!ret) { res = reqs[i]->ar_result; ret = getnameinfo(res->ai_addr, res->ai_addrlen, host, sizeof(host), NULL, 0, NI_NUMERICHOST); if (ret) { fprintf(stderr, “getnameinfo() failed: %s “, gai_strerror(ret)); exit(EXIT_FAILURE); } puts(host); } else { puts(gai_strerror(ret)); } } } int main(void) { char *cmdline; char *cmd; while ((cmdline = getcmd()) != NULL) { cmd = strtok(cmdline, " “); if (cmd == NULL) { list_requests(); } else { switch (cmd[0]) { case ‘a’: add_requests(); break; case ‘w’: wait_requests(); break; case ‘c’: cancel_requests(); break; case ’l’: list_requests(); break; default: fprintf(stderr, “Bad command: %c “, cmd[0]); break; } } } exit(EXIT_SUCCESS); }

SEE ALSO

getaddrinfo(3), inet(3), lio_listio(3), hostname(7), ip(7), sigevent(3type)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2002 - Linux cli command HTTP_Headerspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTTP_Headerspm and provides detailed information about the command HTTP_Headerspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTTP_Headerspm.

NAME 🖥️ HTTP_Headerspm 🖥️

Class encapsulating HTTP Message headers

VERSION

version 6.46

SYNOPSIS

require HTTP::Headers; $h = HTTP::Headers->new; $h->header(Content-Type => text/plain); # set $ct = $h->header(Content-Type); # get $h->remove_header(Content-Type); # delete

DESCRIPTION

The HTTP::Headers class encapsulates HTTP-style message headers. The headers consist of attribute-value pairs also called fields, which may be repeated, and which are printed in a particular order. The field names are cases insensitive.

Instances of this class are usually created as member variables of the HTTP::Request and HTTP::Response classes, internal to the library.

The following methods are available:

$h = HTTP::Headers->new
Constructs a new HTTP::Headers object. You might pass some initial attribute-value pairs as parameters to the constructor. E.g.: $h = HTTP::Headers->new( Date => Thu, 03 Feb 1994 00:00:00 GMT, Content_Type => text/html; version=3.2, Content_Base => http://www.perl.org/); The constructor arguments are passed to the header method which is described below.

$h->clone
Returns a copy of this HTTP::Headers object.

$h->header( $field )

$h->header( $field => $value )

$h->header( $f1 => $v1, $f2 => $v2, … )

Get or set the value of one or more header fields. The header field name ($field) is not case sensitive. To make the life easier for perl users who wants to avoid quoting before the => operator, you can use ‘_’ as a replacement for ‘-’ in header names. The header() method accepts multiple ($field => $value) pairs, which means that you can update several fields with a single invocation. The $value argument may be a plain string or a reference to an array of strings for a multi-valued field. If the $value is provided as undef then the field is removed. If the $value is not given, then that header field will remain unchanged. In addition to being a string, $value may be something that stringifies. The old value (or values) of the last of the header fields is returned. If no such field exists undef will be returned. A multi-valued field will be returned as separate values in list context and will be concatenated with “, " as separator in scalar context. The HTTP spec (RFC 2616) promises that joining multiple values in this way will not change the semantic of a header field, but in practice there are cases like old-style Netscape cookies (see HTTP::Cookies) where “,” is used as part of the syntax of a single field value. Examples: $header->header(MIME_Version => 1.0, User_Agent => My-Web-Client/0.01); $header->header(Accept => “text/html, text/plain, image/*”); $header->header(Accept => [qw(text/html text/plain image/*)]); @accepts = $header->header(Accept); # get multiple values $accepts = $header->header(Accept); # get values as a single string

$h->push_header( $field => $value )

$h->push_header( $f1 => $v1, $f2 => $v2, … )

Add a new field value for the specified header field. Previous values for the same field are retained. As for the header() method, the field name ($field) is not case sensitive and ‘_’ can be used as a replacement for ‘-’. The $value argument may be a scalar or a reference to a list of scalars. $header->push_header(Accept => image/jpeg); $header->push_header(Accept => [map “image/$_”, qw(gif png tiff)]);

$h->init_header( $field => $value )
Set the specified header to the given value, but only if no previous value for that field is set. The header field name ($field) is not case sensitive and ‘_’ can be used as a replacement for ‘-’. The $value argument may be a scalar or a reference to a list of scalars.

$h->remove_header( $field, … )
This function removes the header fields with the specified names. The header field names ($field) are not case sensitive and ‘_’ can be used as a replacement for ‘-’. The return value is the values of the fields removed. In scalar context the number of fields removed is returned. Note that if you pass in multiple field names then it is generally not possible to tell which of the returned values belonged to which field.

$h->remove_content_headers
This will remove all the header fields used to describe the content of a message. All header field names prefixed with Content- fall into this category, as well as Allow, Expires and Last-Modified. RFC 2616 denotes these fields as Entity Header Fields. The return value is a new HTTP::Headers object that contains the removed headers only.

$h->clear
This will remove all header fields.

$h->header_field_names
Returns the list of distinct names for the fields present in the header. The field names have case as suggested by HTTP spec, and the names are returned in the recommended “Good Practice” order. In scalar context return the number of distinct field names.

$h->scan( \process_header_field )
Apply a subroutine to each header field in turn. The callback routine is called with two parameters; the name of the field and a single value (a string). If a header field is multi-valued, then the routine is called once for each value. The field name passed to the callback routine has case as suggested by HTTP spec, and the headers will be visited in the recommended “Good Practice” order. Any return values of the callback routine are ignored. The loop can be broken by raising an exception (die), but the caller of scan() would have to trap the exception itself.

$h->flatten()
Returns the list of pairs of keys and values.

$h->as_string

$h->as_string( $eol )

Return the header fields as a formatted MIME header. Since it internally uses the scan method to build the string, the result will use case as suggested by HTTP spec, and it will follow recommended “Good Practice” of ordering the header fields. Long header values are not folded. The optional $eol parameter specifies the line ending sequence to use. The default is " “. Embedded " " characters in header field values will be substituted with this line ending sequence.

CONVENIENCE METHODS

The most frequently used headers can also be accessed through the following convenience methods. Most of these methods can both be used to read and to set the value of a header. The header value is set if you pass an argument to the method. The old header value is always returned. If the given header did not exist then undef is returned.

Methods that deal with dates/times always convert their value to system time (seconds since Jan 1, 1970) and they also expect this kind of value when the header value is set.

$h->date
This header represents the date and time at which the message was originated. E.g.: $h->date(time); # set current date

$h->expires
This header gives the date and time after which the entity should be considered stale.

$h->if_modified_since

$h->if_unmodified_since

These header fields are used to make a request conditional. If the requested resource has (or has not) been modified since the time specified in this field, then the server will return a 304 Not Modified response instead of the document itself.

$h->last_modified
This header indicates the date and time at which the resource was last modified. E.g.: # check if document is more than 1 hour old if (my $last_mod = $h->last_modified) { if ($last_mod < time - 60*60) { … } }

$h->content_type
The Content-Type header field indicates the media type of the message content. E.g.: $h->content_type(text/html); The value returned will be converted to lower case, and potential parameters will be chopped off and returned as a separate value if in an array context. If there is no such header field, then the empty string is returned. This makes it safe to do the following: if ($h->content_type eq text/html) { # we enter this place even if the real header value happens to # be TEXT/HTML; version=3.0 … }

$h->content_type_charset
Returns the upper-cased charset specified in the Content-Type header. In list context return the lower-cased bare content type followed by the upper-cased charset. Both values will be undef if not specified in the header.

$h->content_is_text
Returns TRUE if the Content-Type header field indicate that the content is textual.

$h->content_is_html
Returns TRUE if the Content-Type header field indicate that the content is some kind of HTML (including XHTML). This method can’t be used to set Content-Type.

$h->content_is_xhtml
Returns TRUE if the Content-Type header field indicate that the content is XHTML. This method can’t be used to set Content-Type.

$h->content_is_xml
Returns TRUE if the Content-Type header field indicate that the content is XML. This method can’t be used to set Content-Type.

$h->content_encoding
The Content-Encoding header field is used as a modifier to the media type. When present, its value indicates what additional encoding mechanism has been applied to the resource.

$h->content_length
A decimal number indicating the size in bytes of the message content.

$h->content_language
The natural language(s) of the intended audience for the message content. The value is one or more language tags as defined by RFC 1766. Eg. “no” for some kind of Norwegian and “en-US” for English the way it is written in the US.

$h->title: The title of the document. In libwww-perl this header will be initialized automatically from the <TITLE>…</TITLE> element of HTML documents. This header is no longer part of the HTTP standard.

$h->user_agent
This header field is used in request messages and contains information about the user agent originating the request. E.g.: $h->user_agent(Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 6.0));

$h->server
The server header field contains information about the software being used by the originating server program handling the request.

$h->from
This header should contain an Internet e-mail address for the human user who controls the requesting user agent. The address should be machine-usable, as defined by RFC822. E.g.: $h->from(King Kong <[email protected]>); This header is no longer part of the HTTP standard.

$h->referer
Used to specify the address (URI) of the document from which the requested resource address was obtained. The “Free On-line Dictionary of Computing” as this to say about the word referer: <World-Wide Web> A misspelling of “referrer” which somehow made it into the {HTTP} standard. A given {web page}s referer (sic) is the {URL} of whatever web page contains the link that the user followed to the current page. Most browsers pass this information as part of a request. (1998-10-19) By popular demand referrer exists as an alias for this method so you can avoid this misspelling in your programs and still send the right thing on the wire. When setting the referrer, this method removes the fragment from the given URI if it is present, as mandated by RFC2616. Note that the removal does not happen automatically if using the header(), push_header() or init_header() methods to set the referrer.

$h->www_authenticate
This header must be included as part of a 401 Unauthorized response. The field value consist of a challenge that indicates the authentication scheme and parameters applicable to the requested URI.

$h->proxy_authenticate
This header must be included in a 407 Proxy Authentication Required response.

$h->authorization

$h->proxy_authorization

A user agent that wishes to authenticate itself with a server or a proxy, may do so by including these headers.

$h->authorization_basic
This method is used to get or set an authorization header that use the “Basic Authentication Scheme”. In array context it will return two values; the user name and the password. In scalar context it will return “uname:password” as a single string value. When used to set the header value, it expects two arguments. E.g.: $h->authorization_basic($uname, $password); The method will croak if the $uname contains a colon ‘:’.

$h->proxy_authorization_basic
Same as authorization_basic() but will set the “Proxy-Authorization” header instead.

NON-CANONICALIZED FIELD NAMES

The header field name spelling is normally canonicalized including the ‘_’ to ‘-’ translation. There are some application where this is not appropriate. Prefixing field names with ‘:’ allow you to force a specific spelling. For example if you really want a header field name to show up as foo_bar instead of “Foo-Bar”, you might set it like this:

$h->header(":foo_bar” => 1);

These field names are returned with the ‘:’ intact for $h->header_field_names and the $h->scan callback, but the colons do not show in $h->as_string.

AUTHOR

Gisle Aas <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 1994 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2003 - Linux cli command hypot

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command hypot and provides detailed information about the command hypot, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the hypot.

NAME 🖥️ hypot 🖥️

Euclidean distance function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double hypot(double x, double y);
float hypotf(float x, float y);
long double hypotl(long double x, long double y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

hypot():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

hypotf(), hypotl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return sqrt(x*x+y*y). This is the length of the hypotenuse of a right-angled triangle with sides of length x and y, or the distance of the point (x,y) from the origin.

The calculation is performed without undue overflow or underflow during the intermediate steps of the calculation.

RETURN VALUE

On success, these functions return the length of the hypotenuse of a right-angled triangle with sides of length x and y.

If x or y is an infinity, positive infinity is returned.

If x or y is a NaN, and the other argument is not an infinity, a NaN is returned.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively.

If both arguments are subnormal, and the result is subnormal, a range error occurs, and the correct result is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error: result overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error: result underflow
An underflow floating-point exception (FE_UNDERFLOW) is raised.

These functions do not set errno for this case.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

hypot(), hypotf(), hypotl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD.

SEE ALSO

cabs(3), sqrt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2004 - Linux cli command Locale_gettextpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Locale_gettextpm and provides detailed information about the command Locale_gettextpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Locale_gettextpm.

NAME 🖥️ Locale_gettextpm 🖥️

message handling functions

SYNOPSIS

use Locale::gettext; use POSIX; # Needed for setlocale() setlocale(LC_MESSAGES, “”); # OO interface my $d = Locale::gettext->domain(“my_program”); print $d->get(“Welcome to my program”), " “; # (printed in the local language) # Direct access to C functions textdomain(“my_program”); print gettext(“Welcome to my program”), " “; # (printed in the local language)

DESCRIPTION

The gettext module permits access from perl to the gettext() family of functions for retrieving message strings from databases constructed to internationalize software.

$d = Locale::gettext->domain(DOMAIN)

$d = Locale::gettext->domain_raw(DOMAIN)

Creates a new object for retrieving strings in the domain DOMAIN and returns it. domain requests that strings be returned as Perl strings (possibly with wide characters) if possible while domain_raw requests that octet strings directly from functions like dgettext().

$d->get(MSGID)
Calls dgettext() to return the translated string for the given MSGID.

$d->cget(MSGID, CATEGORY)
Calls dcgettext() to return the translated string for the given MSGID in the given CATEGORY.

$d->nget(MSGID, MSGID_PLURAL, N)
Calls dngettext() to return the translated string for the given MSGID or MSGID_PLURAL depending on N.

$d->ncget(MSGID, MSGID_PLURAL, N, CATEGORY)
Calls dngettext() to return the translated string for the given MSGID or MSGID_PLURAL depending on N in the given CATEGORY.

$d->dir([NEWDIR])
If NEWDIR is given, calls bindtextdomain to set the name of the directory where messages for the domain represented by $d are found. Returns the (possibly changed) current directory name.

$d->codeset([NEWCODE])
For instances created with Locale::gettext->domain_raw, manuiplates the character set of the returned strings. If NEWCODE is given, calls bind_textdomain_codeset to set the character encoding in which messages for the domain represented by $d are returned. Returns the (possibly changed) current encoding name.

gettext(), dgettext(), and dcgettext() attempt to retrieve a string matching their msgid parameter within the context of the current locale. dcgettext() takes the message’s category and the text domain as parameters while dgettext() defaults to the LC_MESSAGES category and gettext() defaults to LC_MESSAGES and uses the current text domain. If the string is not found in the database, then msgid is returned.

ngettext(), dngettext(), and dcngettext() function similarily but implement differentiation of messages between singular and plural. See the documentation for the corresponding C functions for details.

textdomain() sets the current text domain and returns the previously active domain.

bindtextdomain(domain, dirname) instructs the retrieval functions to look for the databases belonging to domain domain in the directory dirname

bind_textdomain_codeset(domain, codeset) instructs the retrieval functions to translate the returned messages to the character encoding given by codeset if the encoding of the message catalog is known.

NOTES

Not all platforms provide all of the functions. Functions that are not available in the underlying C library will not be available in Perl either.

Perl programs should use the object interface. In addition to being able to return native Perl wide character strings, bind_textdomain_codeset will be emulated if the C library does not provide it.

VERSION

1.07.

SEE ALSO

gettext (3i), gettext (1), msgfmt (1)

AUTHOR

Kim Vandry <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2005 - Linux cli command getutmp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getutmp and provides detailed information about the command getutmp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getutmp.

NAME 🖥️ getutmp 🖥️

copy utmp structure to utmpx, and vice versa

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <utmpx.h>
void getutmp(const struct utmpx *ux, struct utmp *u);
void getutmpx(const struct utmp *u, struct utmpx *ux);

DESCRIPTION

The getutmp() function copies the fields of the utmpx structure pointed to by ux to the corresponding fields of the utmp structure pointed to by u. The getutmpx() function performs the converse operation.

RETURN VALUE

These functions do not return a value.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getutmp(), getutmpx()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

glibc 2.1.1. Solaris, NetBSD.

NOTES

These functions exist primarily for compatibility with other systems where the utmp and utmpx structures contain different fields, or the size of corresponding fields differs. On Linux, the two structures contain the same fields, and the fields have the same sizes.

SEE ALSO

utmpdump(1), getutent(3), utmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2006 - Linux cli command STAILQ_EMPTY

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command STAILQ_EMPTY and provides detailed information about the command STAILQ_EMPTY, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the STAILQ_EMPTY.

NAME 🖥️ STAILQ_EMPTY 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2007 - Linux cli command MIME_Charsetpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command MIME_Charsetpm and provides detailed information about the command MIME_Charsetpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the MIME_Charsetpm.

NAME 🖥️ MIME_Charsetpm 🖥️

Charset Information for MIME

SYNOPSIS

use MIME::Charset: $charset = MIME::Charset->new(“euc-jp”);

Getting charset information:

$benc = $charset->body_encoding; # e.g. “Q” $cset = $charset->as_string; # e.g. “US-ASCII” $henc = $charset->header_encoding; # e.g. “S” $cset = $charset->output_charset; # e.g. “ISO-2022-JP”

Translating text data:

($text, $charset, $encoding) = $charset->header_encode( “��Ū����Ū”. “��ʪ���ϴ�”, Charset => euc-jp); # …returns e.g. (<converted>, “ISO-2022-JP”, “B”). ($text, $charset, $encoding) = $charset->body_encode( “Collectioneur path�tiquement “. “�clectique de d�chets”, Charset => latin1); # …returns e.g. (<original>, “ISO-8859-1”, “QUOTED-PRINTABLE”). $len = $charset->encoded_header_len( “Perl言語”, Charset => utf-8, Encoding => “b”); # …returns e.g. 28.

Manipulating module defaults:

MIME::Charset::alias(“csEUCKR”, “euc-kr”); MIME::Charset::default(“iso-8859-1”); MIME::Charset::fallback(“us-ascii”);

Non-OO functions (may be deprecated in near future):

use MIME::Charset qw(:info); $benc = body_encoding(“iso-8859-2”); # “Q” $cset = canonical_charset(“ANSI X3.4-1968”); # “US-ASCII” $henc = header_encoding(“utf-8”); # “S” $cset = output_charset(“shift_jis”); # “ISO-2022-JP” use MIME::Charset qw(:trans); ($text, $charset, $encoding) = header_encode( “��Ū����Ū”. “��ʪ���ϴ�”, “euc-jp”); # …returns (<converted>, “ISO-2022-JP”, “B”); ($text, $charset, $encoding) = body_encode( “Collectioneur path�tiquement “. “�clectique de d�chets”, “latin1”); # …returns (<original>, “ISO-8859-1”, “QUOTED-PRINTABLE”); $len = encoded_header_len( “Perl言語”, “b”, “utf-8”); # 28

DESCRIPTION

MIME::Charset provides information about character sets used for MIME messages on Internet.

Definitions

The charset is ``character set’’ used in MIME to refer to a method of converting a sequence of octets into a sequence of characters. It includes both concepts of ``coded character set’’ (CCS) and ``character encoding scheme’’ (CES) of ISO/IEC.

The encoding is that used in MIME to refer to a method of representing a body part or a header body as sequence(s) of printable US-ASCII characters.

Constructor

$charset = MIME::Charset->new([CHARSET [, OPTS]])
Create charset object. OPTS may accept following key-value pair. NOTE: When Unicode/multibyte support is disabled (see USE_ENCODE), conversion will not be performed. So this option do not have any effects.

Mapping => MAPTYPE
Whether to extend mappings actually used for charset names or not. "EXTENDED" uses extended mappings. "STANDARD" uses standardized strict mappings. Default is "EXTENDED".

Getting Information of Charsets

$charset->body_encoding

body_encoding CHARSET

Get recommended transfer-encoding of CHARSET for message body. Returned value will be one of "B" (BASE64), "Q" (QUOTED-PRINTABLE), "S" (shorter one of either) or undef (might not be transfer-encoded; either 7BIT or 8BIT). This may not be same as encoding for message header.

$charset->as_string

canonical_charset CHARSET

Get canonical name for charset.

$charset->decoder
Get Encode::Encoding object to decode strings to Unicode by charset. If charset is not specified or not known by this module, undef will be returned.

$charset->dup
Get a copy of charset object.

$charset->encoder([CHARSET])
Get Encode::Encoding object to encode Unicode string using compatible charset recommended to be used for messages on Internet. If optional CHARSET is specified, replace encoder (and output charset name) of $charset object with those of CHARSET, therefore, $charset object will be a converter between original charset and new CHARSET.

$charset->header_encoding

header_encoding CHARSET

Get recommended encoding scheme of CHARSET for message header. Returned value will be one of "B", "Q", "S" (shorter one of either) or undef (might not be encoded). This may not be same as encoding for message body.

$charset->output_charset

output_charset CHARSET

Get a charset which is compatible with given CHARSET and is recommended to be used for MIME messages on Internet (if it is known by this module). When Unicode/multibyte support is disabled (see USE_ENCODE), this function will simply return the result of canonical_charset.

Translating Text Data

$charset->body_encode(STRING [, OPTS])

body_encode STRING, CHARSET [, OPTS]

Get converted (if needed) data of STRING and recommended transfer-encoding of that data for message body. CHARSET is the charset by which STRING is encoded. OPTS may accept following key-value pairs. NOTE: When Unicode/multibyte support is disabled (see USE_ENCODE), conversion will not be performed. So these options do not have any effects.

Detect7bit => YESNO
Try auto-detecting 7-bit charset when CHARSET is not given. Default is "YES".

Replacement => REPLACEMENT
Specifies error handling scheme. See Error Handling.

3-item list of (converted string, charset for output, transfer-encoding) will be returned. Transfer-encoding will be either "BASE64", "QUOTED-PRINTABLE", "7BIT" or "8BIT". If charset for output could not be determined and converted string contains non-ASCII byte(s), charset for output will be undef and transfer-encoding will be "BASE64". Charset for output will be "US-ASCII" if and only if string does not contain any non-ASCII bytes.

$charset->decode(STRING [,CHECK])
Decode STRING to Unicode. Note: When Unicode/multibyte support is disabled (see USE_ENCODE), this function will die.

detect_7bit_charset STRING
Guess 7-bit charset that may encode a string STRING. If STRING contains any 8-bit bytes, undef will be returned. Otherwise, Default Charset will be returned for unknown charset.

$charset->encode(STRING [, CHECK])
Encode STRING (Unicode or non-Unicode) using compatible charset recommended to be used for messages on Internet (if this module knows it). Note that string will be decoded to Unicode then encoded even if compatible charset was equal to original charset. Note: When Unicode/multibyte support is disabled (see USE_ENCODE), this function will die.

$charset->encoded_header_len(STRING [, ENCODING])

encoded_header_len STRING, ENCODING, CHARSET

Get length of encoded STRING for message header (without folding). ENCODING may be one of "B", "Q" or "S" (shorter one of either "B" or "Q").

$charset->header_encode(STRING [, OPTS])

header_encode STRING, CHARSET [, OPTS]

Get converted (if needed) data of STRING and recommended encoding scheme of that data for message headers. CHARSET is the charset by which STRING is encoded. OPTS may accept following key-value pairs. NOTE: When Unicode/multibyte support is disabled (see USE_ENCODE), conversion will not be performed. So these options do not have any effects.

Detect7bit => YESNO
Try auto-detecting 7-bit charset when CHARSET is not given. Default is "YES".

Replacement => REPLACEMENT
Specifies error handling scheme. See Error Handling.

3-item list of (converted string, charset for output, encoding scheme) will be returned. Encoding scheme will be either "B", "Q" or undef (might not be encoded). If charset for output could not be determined and converted string contains non-ASCII byte(s), charset for output will be "8BIT" (this is not charset name but a special value to represent unencodable data) and encoding scheme will be undef (should not be encoded). Charset for output will be "US-ASCII" if and only if string does not contain any non-ASCII bytes.

$charset->undecode(STRING [,CHECK])
Encode Unicode string STRING to byte string by input charset of $charset. This is equivalent to $charset->decoder->encode(). Note: When Unicode/multibyte support is disabled (see USE_ENCODE), this function will die.

Manipulating Module Defaults

alias ALIAS [, CHARSET]
Get/set charset alias for canonical names determined by canonical_charset. If CHARSET is given and isn’t false, ALIAS will be assigned as an alias of CHARSET. Otherwise, alias won’t be changed. In both cases, current charset name that ALIAS is assigned will be returned.

default [CHARSET]
Get/set default charset. Default charset is used by this module when charset context is unknown. Modules using this module are recommended to use this charset when charset context is unknown or implicit default is expected. By default, it is "US-ASCII". If CHARSET is given and isn’t false, it will be set to default charset. Otherwise, default charset won’t be changed. In both cases, current default charset will be returned. NOTE: Default charset should not be changed.

fallback [CHARSET]
Get/set fallback charset. Fallback charset is used by this module when conversion by given charset is failed and "FALLBACK" error handling scheme is specified. Modules using this module may use this charset as last resort of charset for conversion. By default, it is "UTF-8". If CHARSET is given and isn’t false, it will be set to fallback charset. If CHARSET is "NONE", fallback charset will be undefined. Otherwise, fallback charset won’t be changed. In any cases, current fallback charset will be returned. NOTE: It is useful that "US-ASCII" is specified as fallback charset, since result of conversion will be readable without charset information.

recommended CHARSET [, HEADERENC, BODYENC [, ENCCHARSET]]
Get/set charset profiles. If optional arguments are given and any of them are not false, profiles for CHARSET will be set by those arguments. Otherwise, profiles won’t be changed. In both cases, current profiles for CHARSET will be returned as 3-item list of (HEADERENC, BODYENC, ENCCHARSET). HEADERENC is recommended encoding scheme for message header. It may be one of "B", "Q", "S" (shorter one of either) or undef (might not be encoded). BODYENC is recommended transfer-encoding for message body. It may be one of "B", "Q", "S" (shorter one of either) or undef (might not be transfer-encoded). ENCCHARSET is a charset which is compatible with given CHARSET and is recommended to be used for MIME messages on Internet. If conversion is not needed (or this module doesn’t know appropriate charset), ENCCHARSET is undef. NOTE: This function in the future releases can accept more optional arguments (for example, properties to handle character widths, line folding behavior, …). So format of returned value may probably be changed. Use header_encoding, body_encoding or output_charset to get particular profile.

Constants

USE_ENCODE
Unicode/multibyte support flag. Non-empty string will be set when Unicode and multibyte support is enabled. Currently, this flag will be non-empty on Perl 5.7.3 or later and empty string on earlier versions of Perl.

Error Handling

body_encode and header_encode accept following Replacement options:

“DEFAULT”
Put a substitution character in place of a malformed character. For UCM-based encodings, <subchar> will be used.

“FALLBACK”
Try "DEFAULT" scheme using fallback charset (see fallback). When fallback charset is undefined and conversion causes error, code will die on error with an error message.

“CROAK”
Code will die on error immediately with an error message. Therefore, you should trap the fatal error with eval{} unless you really want to let it die on error. Synonym is "STRICT".

“PERLQQ”

“HTMLCREF”

“XMLCREF”

Use FB_PERLQQ, FB_HTMLCREF or FB_XMLCREF scheme defined by Encode module.

numeric values
Numeric values are also allowed. For more details see Handling Malformed Data in Encode.

If error handling scheme is not specified or unknown scheme is specified, "DEFAULT" will be assumed.

Configuration File

Built-in defaults for option parameters can be overridden by configuration file: MIME/Charset/Defaults.pm. For more details read MIME/Charset/Defaults.pm.sample.

VERSION

Consult $VERSION variable.

Development versions of this module may be found at <http://hatuka.nezumi.nu/repos/MIME-Charset/>.

Incompatible Changes

Release 1.001

new() method returns an object when CHARSET argument is not specified.

Release 1.005

Restrict characters in encoded-word according to RFC 2047 section 5 (3). This also affects return value of encoded_header_len() method.

Release 1.008.2

body_encoding() method may also returns "S".

  • Return value of body_encode() method for UTF-8 may include "QUOTED-PRINTABLE" encoding item that in earlier versions was fixed to "BASE64".

SEE ALSO

Multipurpose Internet Mail Extensions (MIME).

AUTHOR

Hatuka*nezumi - IKEDA Soji <hatuka(at)nezumi.nu>

COPYRIGHT

Copyright (C) 2006-2017 Hatuka*nezumi - IKEDA Soji. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2008 - Linux cli command Net_Server_HTTPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Server_HTTPpm and provides detailed information about the command Net_Server_HTTPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Server_HTTPpm.

NAME 🖥️ Net_Server_HTTPpm 🖥️

very basic Net::Server based HTTP server class

TEST ONE LINER

perl -e use base qw(Net::Server::HTTP); main->run(port => 8080) # will start up an echo server

SYNOPSIS

use base qw(Net::Server::HTTP); _ _PACKAGE_ _->run; sub process_http_request { my $self = shift; print “Content-type: text/html

“; print “<form method=post action=/bam><input type=text name=foo><input type=submit></form> “; require Data::Dumper; local $Data::Dumper::Sortkeys = 1; require CGI; my $form = {}; my $q = CGI->new; $form->{$_} = $q->param($_) for $q->param; print “<pre>".Data::Dumper->Dump([\ENV, $form], [*ENV, form])."</pre>”; }

DESCRIPTION

Even though Net::Server::HTTP doesn’t fall into the normal parallel of the other Net::Server flavors, handling HTTP requests is an often requested feature and is a standard and simple protocol.

Net::Server::HTTP begins with base type MultiType defaulting to Net::Server::PreFork. It is easy to change it to any of the other Net::Server flavors by passing server_type => $other_flavor in the server configuration. The port has also been defaulted to port 80 - but could easily be changed to another through the server configuration. You can also very easily add ssl by including, proto=>ssl and provide a SSL_cert_file and SSL_key_file.

For example, here is a basic server that will bind to all interfaces, will speak both HTTP on port 8080 as well as HTTPS on 8443, and will speak both IPv4, as well as IPv6 if it is available.

use base qw(Net::Server::HTTP); _ _PACKAGE_ _->run( port => [8080, “8443/ssl”], ipv => *, # IPv6 if available SSL_key_file => /my/key, SSL_cert_file => /my/cert, );

METHODS

“_init_access_log”
Used to open and initialize any requested access_log (see access_log_file and access_log_format).

“_tie_client_stdout”
Used to initialize automatic response header parsing.

“process_http_request”
Will be passed the client handle, and will have STDOUT and STDIN tied to the client. During this method, the %ENV will have been set to a standard CGI style environment. You will need to be sure to print the Content-type header. This is one change from the other standard Net::Server base classes. During this method you can read from %ENV and STDIN just like a normal HTTP request in other web servers. You can print to STDOUT and Net::Server will handle the header negotiation for you. Note: Net::Server::HTTP has no concept of document root or script aliases or default handling of static content. That is up to the consumer of Net::Server::HTTP to work out. Net::Server::HTTP comes with a basic %ENV display installed as the default process_http_request method.

“process_request”
This method has been overridden in Net::Server::HTTP - you should not use it while using Net::Server::HTTP. This overridden method parses the environment and sets up request alarms and handles dying failures. It calls process_http_request once the request is ready and headers have been parsed.

“request_denied_hook”
This method has been overridden to call send_400. This is new behavior. To get the previous behavior (where the client was closed without any indication), simply provide

“process_headers”
Used to read in the incoming headers and set the ENV.

“_init_http_request_info”
Called at the end of process_headers. Initializes the contents of http_request_info.

“http_request_info”
Returns a hashref of information specific to the current request. This information will be used for logging later on.

“send_status”
Takes an HTTP status, an optional message, optional body, and optional generate_body flag. Sends out the correct headers. $self->send_status(500); $self->send_status(500, Internal Server Error); $self->send_status(500, Internal Server Error, “<h1>Internal Server Error</h1><p>Msg</p>”); $self->send_status(500, undef, undef, [Msg]);

“send_400”
Calls send_status with 400 and the passed arguments as generate_body.

“send_500”
Calls send_status with 500 and the argument passed to send_500.

c<log_http_request>
Called at the end of post_process_request. The default method looks for the default access_log_format and checks if logging was initialized during _init_access_log. If both of these exist, the http_request_info is formatted using http_log_format and the result is logged.

“http_log_format”
Takes a format string, and request_info and returns a formatted string. The format should follow the apache mod_log_config specification. As in the mod_log_config specification, backslashes, quotes should be escaped with backslashes and you may also include and characters as well. The following is a listing of the available parameters as well as sample output based on a very basic HTTP server. %% % # a percent %a ::1 # remote ip %A ::1 # local ip %b 83 # response size (- if 0) Common Log Format %B 83 # response size %{bar}C baz # value of cookie by that name %D 916 # elapsed in microseconds %{HTTP_COOKIE}e bar=baz # value of %ENV by that name %f - # filename - unused %h ::1 # remote host if lookups are on, remote ip otherwise %H http # request protocol %{Host}i localhost:8080 # request header by that name %I 336 # bytes received including headers %l - # remote logname - unsused %m GET # request method %n Just a note # http_note by that name %{Content-type}o text/html # output header by that name %O 189 # response size including headers %p 8080 # server port %P 22999 # pid - does not support %{tid}P q ?hello=there # query_string including ? (- otherwise) r GET /bam?hello=there HTTP/1.1 # the first line of the request %s 200 # response status %u - # remote user - unused %U /bam # request path (no query string) %t [06/Jun/2012:12:14:21 -0600] # http_log_time standard format %t{%F %T %z}t [2012-06-06 12:14:21 -0600] # http_log_time with format %T 0 # elapsed time in seconds %v localhost:8080 # http_log_vhost - partial implementation %V localhost:8080 # http_log_vhost - partial implementation %X - # Connection completed and is close (-) Additionally, the log parsing allows for the following formats. %>s 200 # status of last request %<s 200 # status of original request %400a - # remote ip if status is 400 %!400a ::1 # remote ip if status is not 400 %!200a - # remote ip if status is not 200 There are few bits not completely implemented: > and < # There is no internal redirection %I # The answer to this is based on header size and Content-length instead of the more correct actual number of bytes read though in common cases those would be the same. %X # There is no Connection keepalive in the default server. %v and %V # There are no virtual hosts in the default HTTP server. %{tid}P # The default servers are not threaded. See the access_log_format option for how to set a different format as well as to see the default string.

“exec_cgi”
Allow for calling an external script as a CGI. This will use IPC::Open3 to fork a new process and read/write from it. use base qw(Net::Server::HTTP); _ _PACKAGE_ _->run; sub process_http_request { my $self = shift; if ($ENV{PATH_INFO} && $ENV{PATH_INFO} =~ s{^ (/foo) (?= $ | /) }{}x) { $ENV{SCRIPT_NAME} = $1; my $file = “/var/www/cgi-bin/foo”; # assuming this exists return $self->exec_cgi($file); } print “Content-type: text/html

“; print “<a href=/foo>Foo</a>”; } At this first release, the parent server is not tracking the child script which may cause issues if the script is running when a HUP is received.

“http_log_time”
Used to implement the %t format.

“http_log_env”
Used to implement the %e format.

“http_log_cookie”
Used to implement the %C format.

“http_log_header_in”
used to implement the %i format.

“http_log_note”
Used to implement the %n format.

“http_note”
Takes a key and an optional value. If passed a key and value, sets the note for that key. Always returns the value. These notes currently only are used for %{key}n output format.

“http_log_header_out”
Used to implement the %o format.

“http_log_pid”
Used to implement the %P format.

“http_log_vhost”
Used to implement the %v and %V formats.

“http_log_constat”
Used to implement the %X format.

“exec_trusted_perl”
Allow for calling an external perl script. This method will still fork, but instead of using IPC::Open3, it simply requires the perl script. That means that the running script will be able to make use of any shared memory. It also means that the STDIN/STDOUT/STDERR handles the script is using are those directly bound by the server process. use base qw(Net::Server::HTTP); _ _PACKAGE_ _->run; sub process_http_request { my $self = shift; if ($ENV{PATH_INFO} && $ENV{PATH_INFO} =~ s{^ (/foo) (?= $ | /) }{}x) { $ENV{SCRIPT_NAME} = $1; my $file = “/var/www/cgi-bin/foo”; # assuming this exists return $self->exec_trusted_perl($file); } print “Content-type: text/html

“; print “<a href=/foo>Foo</a>”; } At this first release, the parent server is not tracking the child script which may cause issues if the script is running when a HUP is received.

“exec_fork_hook”
This method is called after the fork of exec_trusted_perl and exec_cgi hooks. It is passed the pid (0 if the child) and the file being ran. Note, that the hook will not be called from the child during exec_cgi.

“http_dispatch”
Called if the default process_http_request and process_request methods have not been overridden and app configuration parameters have been passed. In this case this replaces the default echo server. You can also enable this subsystem for your own direct use by setting enable_dispatch to true during configuration. See the app configuration item. It will be passed a dispatch qr (regular expression) generated during _check_dispatch, and a dispatch table. The qr will be applied to path_info. This mechanism could be used to augment Net::Server::HTTP with document root and virtual host capabilities.

OPTIONS

In addition to the command line arguments of the Net::Server base classes you can also set the following options.

max_header_size
Defaults to 100_000. Maximum number of bytes to read while parsing headers.

server_revision
Defaults to Net::Server::HTTP/$Net::Server::VERSION.

timeout_header
Defaults to 15 - number of seconds to wait for parsing headers.

timeout_idle
Defaults to 60 - number of seconds a request can be idle before the request is closed.

access_log_file
Defaults to undef. If true, this represents the location of where the access log should be written to. If a special value of STDERR or /dev/stderr is passed, the access log entry will be written to the same location as the ERROR log. If a special value of STDOUT or /dev/stdout is passed, the access log entry will be written to standard out.

access_log_function
Can take a coderef or method name to call when an log_http_request method is called. Will be passed the formatted log access log message. Note that functions depending upon stdout will not function during Net::Server::HTTP process_request because stdout is always tied for the client (and not restored after running).

access_log_format
Should be a valid apache log format that will be passed to http_log_format. See the http_log_format method for more information. The default value is the NCSA extended/combined log format: %h %l %u %t %r\ %>s %b %{Referer}i\ %{User-Agent}i\

app
Takes one or more items and registers them for dispatch. Arguments may be supplied as an arrayref containing a location/target pairs, a hashref containing a location/target pairs, a bare code ref that will use / as the location and the codref as the target, a string with a space indicating location target, a string containing location=target, or finally a string that will be used as both location and target. For items passed as an arrayref or hashref, the target may be a coderef which will be called and should handle the request. In all other cases the target should be a valid executable suitable for passing to exec_cgi. The locations will be added in the order that they are configured. They will be added to a regular expression which will be applied to the incoming PATH_INFO string. If the match is successful, the $ENV{‘SCRIPT_NAME’} will be set to the matched portion and the matched portion will be removed from $ENV{‘PATH_INFO’}. Once an app has been passed, it is necessary for the server to listen on /. Therefore if / has not been specifically configured for dispatch, the first found dispatch target will also be used to handle /. For convenience, if the log_level is 2 or greater, the dispatch table is output to the log. This mechanism is left as a generic mechanism suitable for overriding by servers meant to handle more complex dispatch. At the moment there is no handling of virtual hosts. At some point we will add in the default ability to play static content and likely for the ability to configure virtual hosts - or that may have to wait for a third party module. app => “/home/paul/foo.cgi”, # Dispatch: /home/paul/foo.cgi => home/paul/foo.cgi # Dispatch: / => home/paul/foo.cgi (default) app => “../../foo.cgi”, app => “./bar.cgi”, app => “baz ./bar.cgi”, app => “bim=./bar.cgi”, # Dispatch: /foo.cgi => ../../foo.cgi # Dispatch: /bar.cgi => ./bar.cgi # Dispatch: /baz => ./bar.cgi # Dispatch: /bim => ./bar.cgi # Dispatch: / => ../../foo.cgi (default) app => “../../foo.cgi”, app => “/=./bar.cgi”, # Dispatch: /foo.cgi => ../../foo.cgi # Dispatch: / => ./bar.cgi # you could also do this on the commandline net-server HTTP app ../../foo.cgi app /=./bar.cgi # extended options when configured from code Net::Server::HTTP->run(app => { # loses order of matching / => sub { … }, /foo => sub { … }, /bar => /path/to/some.cgi, }); Net::Server::HTTP->run(app => [ / => sub { … }, /foo => sub { … }, /bar => /path/to/some.cgi, ]);

default_content_type
Default is text/html. Set on any responses that have not yet passed a content-type

allow_body_on_all_statuses
By default content-type and printing a body are not allowed on 204, 304, or 1xx statuses. Set this flag to automatically send a content-type on those statuses as well.

TODO

Add support for writing out HTTP/1.1.

AUTHOR

Paul T. Seamons [email protected]

THANKS

See Net::Server

SEE ALSO

Please see also Net::Server::Fork, Net::Server::INET, Net::Server::PreFork, Net::Server::PreForkSimple, Net::Server::MultiType, Net::Server::Single Net::Server::SIG Net::Server::Daemonize Net::Server::Proto

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2009 - Linux cli command nexttoward

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command nexttoward and provides detailed information about the command nexttoward, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the nexttoward.

NAME 🖥️ nexttoward 🖥️

floating-point number manipulation

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double nextafter(double x, double y);
float nextafterf(float x, float y);
long double nextafterl(long double x, long double y);
double nexttoward(double x, long double y);
float nexttowardf(float x, long double y);
long double nexttowardl(long double x, long double y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

nextafter():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

nextafterf(), nextafterl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

nexttoward(), nexttowardf(), nexttowardl():

    _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE
        || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The nextafter(), nextafterf(), and nextafterl() functions return the next representable floating-point value following x in the direction of y. If y is less than x, these functions will return the largest representable number less than x.

If x equals y, the functions return y.

The nexttoward(), nexttowardf(), and nexttowardl() functions do the same as the corresponding nextafter() functions, except that they have a long double second argument.

RETURN VALUE

On success, these functions return the next representable floating-point value after x in the direction of y.

If x equals y, then y (cast to the same type as x) is returned.

If x or y is a NaN, a NaN is returned.

If x is finite, and the result would overflow, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the correct mathematical sign.

If x is not equal to y, and the correct function result would be subnormal, zero, or underflow, a range error occurs, and either the correct value (if it can be represented), or 0.0, is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error: result overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error: result is subnormal or underflows
errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

nextafter(), nextafterf(), nextafterl(), nexttoward(), nexttowardf(), nexttowardl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

This function is defined in IEC 559 (and the appendix with recommended functions in IEEE 754/IEEE 854).

HISTORY

C99, POSIX.1-2001.

BUGS

In glibc 2.5 and earlier, these functions do not raise an underflow floating-point (FE_UNDERFLOW) exception when an underflow occurs.

Before glibc 2.23 these functions did not set errno.

SEE ALSO

nearbyint(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2010 - Linux cli command XtDisplayOfObject

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtDisplayOfObject and provides detailed information about the command XtDisplayOfObject, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtDisplayOfObject.

NAME 🖥️ XtDisplayOfObject 🖥️

obtain window information about a widget

SYNTAX

#include <X11/Intrinsic.h>

Display *XtDisplay(Widget w);

Display *XtDisplayOfObject(Widget object);

Screen *XtScreen(Widget w);

Screen *XtScreenOfObject(Widget object);

Window XtWindow(Widget w);

Window XtWindowOfObject(Widget object);

ARGUMENTS

  1. Specifies the widget.

object
Specifies the widget.

DESCRIPTION

XtDisplay returns the display pointer for the specified widget.

XtDisplayOfObject returns the display pointer for the specified object.

XtScreen returns the screen pointer for the specified widget.

XtScreenOfObject returns the screen pointer for the specified object.

XtWindow returns the window of the specified widget.

XtWindowOfObject returns the window of the specified object.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2011 - Linux cli command gethostbyaddr_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gethostbyaddr_r and provides detailed information about the command gethostbyaddr_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gethostbyaddr_r.

NAME 🖥️ gethostbyaddr_r 🖥️

get network host entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
void sethostent(int stayopen);
void endhostent(void);
[[deprecated]] extern int h_errno;
[[deprecated]] struct hostent *gethostbyname(const char *name);
[[deprecated]] struct hostent *gethostbyaddr(const void addr[.len],
 socklen_t len, int type);
[[deprecated]] void herror(const char *s);
[[deprecated]] const char *hstrerror(int err);
/* System V/POSIX extension */
struct hostent *gethostent(void);
/* GNU extensions */
[[deprecated]]
struct hostent *gethostbyname2(const char *name, int af);
int gethostent_r(struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyaddr_r(const void addr[restrict .len], socklen_t len,
 int type,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyname_r(const char *restrict name,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyname2_r(const char *restrict name, int af,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

gethostbyname2(), gethostent_r(), gethostbyaddr_r(), gethostbyname_r(), gethostbyname2_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc up to and including 2.19:
        _BSD_SOURCE || _SVID_SOURCE

herror(), hstrerror():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.8 to glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE
    Before glibc 2.8:
        none

h_errno:

    Since glibc 2.19
        _DEFAULT_SOURCE || _POSIX_C_SOURCE < 200809L
    glibc 2.12 to glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE || _POSIX_C_SOURCE < 200809L
    Before glibc 2.12:
        none

DESCRIPTION

The gethostbyname*(), gethostbyaddr*(), herror(), and hstrerror() functions are obsolete. Applications should use getaddrinfo(3), getnameinfo(3), and gai_strerror(3) instead.

The sethostent() function specifies, if stayopen is true (1), that a connected TCP socket should be used for the name server queries and that the connection should remain open during successive queries. Otherwise, name server queries will use UDP datagrams.

The endhostent() function ends the use of a TCP connection for name server queries.

The gethostbyname() function returns a structure of type hostent for the given host name. Here name is either a hostname or an IPv4 address in standard dot notation (as for inet_addr(3)). If name is an IPv4 address, no lookup is performed and gethostbyname() simply copies name into the h_name field and its struct in_addr equivalent into the h_addr_list[0] field of the returned hostent structure. If name doesn’t end in a dot and the environment variable HOSTALIASES is set, the alias file pointed to by HOSTALIASES will first be searched for name (see hostname(7) for the file format). The current domain and its parents are searched unless name ends in a dot.

The gethostbyaddr() function returns a structure of type hostent for the given host address addr of length len and address type type. Valid address types are AF_INET and AF_INET6 (defined in <sys/socket.h>). The host address argument is a pointer to a struct of a type depending on the address type, for example a struct in_addr * (probably obtained via a call to inet_addr(3)) for address type AF_INET.

The (obsolete) herror() function prints the error message associated with the current value of h_errno on stderr.

The (obsolete) hstrerror() function takes an error number (typically h_errno) and returns the corresponding message string.

The domain name queries carried out by gethostbyname() and gethostbyaddr() rely on the Name Service Switch (nsswitch.conf(5)) configured sources or a local name server (named(8)). The default action is to query the Name Service Switch (nsswitch.conf(5)) configured sources, failing that, a local name server (named(8)).

Historical

The nsswitch.conf(5) file is the modern way of controlling the order of host lookups.

In glibc 2.4 and earlier, the order keyword was used to control the order of host lookups as defined in /etc/host.conf (host.conf(5)).

The hostent structure is defined in <netdb.h> as follows:

struct hostent {
    char  *h_name;            /* official name of host */
    char **h_aliases;         /* alias list */
    int    h_addrtype;        /* host address type */
    int    h_length;          /* length of address */
    char **h_addr_list;       /* list of addresses */
}
#define h_addr h_addr_list[0] /* for backward compatibility */

The members of the hostent structure are:

h_name
The official name of the host.

h_aliases
An array of alternative names for the host, terminated by a null pointer.

h_addrtype
The type of address; always AF_INET or AF_INET6 at present.

h_length
The length of the address in bytes.

h_addr_list
An array of pointers to network addresses for the host (in network byte order), terminated by a null pointer.

h_addr
The first address in h_addr_list for backward compatibility.

RETURN VALUE

The gethostbyname() and gethostbyaddr() functions return the hostent structure or a null pointer if an error occurs. On error, the h_errno variable holds an error number. When non-NULL, the return value may point at static data, see the notes below.

ERRORS

The variable h_errno can have the following values:

HOST_NOT_FOUND
The specified host is unknown.

NO_DATA
The requested name is valid but does not have an IP address. Another type of request to the name server for this domain may return an answer. The constant NO_ADDRESS is a synonym for NO_DATA.

NO_RECOVERY
A nonrecoverable name server error occurred.

TRY_AGAIN
A temporary error occurred on an authoritative name server. Try again later.

FILES

/etc/host.conf
resolver configuration file

/etc/hosts
host database file

/etc/nsswitch.conf
name service switch configuration

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

gethostbyname()

Thread safety

MT-Unsafe race:hostbyname env locale

gethostbyaddr()

Thread safety

MT-Unsafe race:hostbyaddr env locale

sethostent(), endhostent(), gethostent_r()

Thread safety

MT-Unsafe race:hostent env locale

herror(), hstrerror()

Thread safetyMT-Safe

gethostent()

Thread safety

MT-Unsafe race:hostent race:hostentbuf env locale

gethostbyname2()

Thread safety

MT-Unsafe race:hostbyname2 env locale

gethostbyaddr_r(), gethostbyname_r(), gethostbyname2_r()

Thread safetyMT-Safe env locale

In the above table, hostent in race:hostent signifies that if any of the functions sethostent(), gethostent(), gethostent_r(), or endhostent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

sethostent()
endhostent()
gethostent()
POSIX.1-2008.

gethostent_r()
GNU.

Others:
None.

HISTORY

sethostent()
endhostent()
gethostent()
POSIX.1-2001.

gethostbyname()
gethostbyaddr()
h_errno
Marked obsolescent in POSIX.1-2001. Removed in POSIX.1-2008, recommending the use of getaddrinfo(3) and getnameinfo(3) instead.

NOTES

The functions gethostbyname() and gethostbyaddr() may return pointers to static data, which may be overwritten by later calls. Copying the struct hostent does not suffice, since it contains pointers; a deep copy is required.

In the original BSD implementation the len argument of gethostbyname() was an int. The SUSv2 standard is buggy and declares the len argument of gethostbyaddr() to be of type size_t. (That is wrong, because it has to be int, and size_t is not. POSIX.1-2001 makes it socklen_t, which is OK.) See also accept(2).

The BSD prototype for gethostbyaddr() uses const char * for the first argument.

System V/POSIX extension

POSIX requires the gethostent() call, which should return the next entry in the host data base. When using DNS/BIND this does not make much sense, but it may be reasonable if the host data base is a file that can be read line by line. On many systems, a routine of this name reads from the file /etc/hosts. It may be available only when the library was built without DNS support. The glibc version will ignore ipv6 entries. This function is not reentrant, and glibc adds a reentrant version gethostent_r().

GNU extensions

glibc2 also has a gethostbyname2() that works like gethostbyname(), but permits to specify the address family to which the address must belong.

glibc2 also has reentrant versions gethostent_r(), gethostbyaddr_r(), gethostbyname_r(), and gethostbyname2_r(). The caller supplies a hostent structure ret which will be filled in on success, and a temporary work buffer buf of size buflen. After the call, result will point to the result on success. In case of an error or if no entry is found result will be NULL. The functions return 0 on success and a nonzero error number on failure. In addition to the errors returned by the nonreentrant versions of these functions, if buf is too small, the functions will return ERANGE, and the call should be retried with a larger buffer. The global variable h_errno is not modified, but the address of a variable in which to store error numbers is passed in h_errnop.

BUGS

gethostbyname() does not recognize components of a dotted IPv4 address string that are expressed in hexadecimal.

SEE ALSO

getaddrinfo(3), getnameinfo(3), inet(3), inet_ntop(3), inet_pton(3), resolver(3), hosts(5), nsswitch.conf(5), hostname(7), named(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2012 - Linux cli command Moose_Meta_Attribute_Native_Trait_Boolpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Attribute_Native_Trait_Boolpm and provides detailed information about the command Moose_Meta_Attribute_Native_Trait_Boolpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Attribute_Native_Trait_Boolpm.

NAME 🖥️ Moose_Meta_Attribute_Native_Trait_Boolpm 🖥️

Helper trait for Bool attributes

VERSION

version 2.2207

SYNOPSIS

package Room; use Moose; has is_lit => ( traits => [Bool], is => rw, isa => Bool, default => 0, handles => { illuminate => set, darken => unset, flip_switch => toggle, is_dark => not, }, ); my $room = Room->new(); $room->illuminate; # same as $room->is_lit(1); $room->darken; # same as $room->is_lit(0); $room->flip_switch; # same as $room->is_lit(not $room->is_lit); return $room->is_dark; # same as !$room->is_lit

DESCRIPTION

This trait provides native delegation methods for boolean values. A boolean is a scalar which can be 1, 0, "", or undef.

DEFAULT TYPE

If you don’t provide an isa value for your attribute, it will default to Bool.

PROVIDED METHODS

None of these methods accept arguments.

  • set Sets the value to 1 and returns 1.

  • unset Set the value to 0 and returns 0.

  • toggle Toggles the value. If it’s true, set to false, and vice versa. Returns the new value.

  • not Equivalent of ’not $value'.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2013 - Linux cli command wmemcmp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wmemcmp and provides detailed information about the command wmemcmp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wmemcmp.

NAME 🖥️ wmemcmp 🖥️

compare two arrays of wide-characters

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
int wmemcmp(const wchar_t s1[.n], const wchar_t s2[.n], size_t n);

DESCRIPTION

The wmemcmp() function is the wide-character equivalent of the memcmp(3) function. It compares the n wide-characters starting at s1 and the n wide-characters starting at s2.

RETURN VALUE

The wmemcmp() function returns zero if the wide-character arrays of size n at s1 and s2 are equal. It returns an integer greater than zero if at the first differing position i (i < n), the corresponding wide-character s1[i] is greater than s2[i]. It returns an integer less than zero if at the first differing position i (i < n), the corresponding wide-character s1[i] is less than s2[i].

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wmemcmp()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

memcmp(3), wcscmp(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2014 - Linux cli command XML_Parser_Style_Debugpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_Parser_Style_Debugpm and provides detailed information about the command XML_Parser_Style_Debugpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_Parser_Style_Debugpm.

NAME 🖥️ XML_Parser_Style_Debugpm 🖥️

Debug style for XML::Parser

SYNOPSIS

use XML::Parser; my $p = XML::Parser->new(Style => Debug); $p->parsefile(foo.xml);

DESCRIPTION

This just prints out the document in outline form to STDERR. Nothing special is returned by parse.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2015 - Linux cli command Math_Random_ISAAC_PPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Math_Random_ISAAC_PPpm and provides detailed information about the command Math_Random_ISAAC_PPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Math_Random_ISAAC_PPpm.

NAME 🖥️ Math_Random_ISAAC_PPpm 🖥️

Pure Perl port of the ISAAC PRNG algorithm

VERSION

version 1.004

SYNOPSIS

This module implements the same interface as Math::Random::ISAAC and can be used as a drop-in replacement. However, it is recommended that you let the Math::Random::ISAAC module decide whether to use the PurePerl or XS version of this module, instead of choosing manually.

Selecting the backend to use manually really only has two uses:

  • If you are trying to avoid the small overhead incurred with dispatching method calls to the appropriate backend modules.

  • If you are testing the module for performance and wish to explicitly decide which module you would like to use.

Example code:

# With Math::Random::ISAAC my $rng = Math::Random::ISAAC->new(time); my $rand = $rng->rand(); # With Math::Random::ISAAC::PP my $rng = Math::Random::ISAAC::PP->new(time); my $rand = $rng->rand();

DESCRIPTION

See Math::Random::ISAAC for the full description.

METHODS

new

Math::Random::ISAAC::PP->new( @seeds )

Implements the interface as specified in Math::Random::ISAAC

rand

$rng->rand()

Implements the interface as specified in Math::Random::ISAAC

irand

$rng->irand()

Implements the interface as specified in Math::Random::ISAAC

SEE ALSO

Math::Random::ISAAC

BUGS

Please report any bugs or feature requests on the bugtracker website http://rt.cpan.org/NoAuth/Bugs.html?Dist=Math-Random-ISAAC

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR

Jonathan Yu <[email protected]>

COPYRIGHT AND LICENSE

Legally speaking, this package and its contents are:

Copyright (c) 2011 by Jonathan Yu <[email protected]>.

But this is really just a legal technicality that allows the author to offer this package under the public domain and also a variety of licensing options. For all intents and purposes, this is public domain software, which means you can do whatever you want with it.

The software is provided AS IS, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2016 - Linux cli command Image_ExifTool_Radiancepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Radiancepm and provides detailed information about the command Image_ExifTool_Radiancepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Radiancepm.

NAME 🖥️ Image_ExifTool_Radiancepm 🖥️

Read Radiance RGBE HDR meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to extract meta information from Radiance RGBE images. RGBE (Red Green Blue Exponent) images are a type of high dynamic-range image.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://radsite.lbl.gov/radiance/refer/filefmts.pdf>

<http://www.graphics.cornell.edu/online/formats/rgbe/>

SEE ALSO

“Radiance Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2017 - Linux cli command lgamma_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lgamma_r and provides detailed information about the command lgamma_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lgamma_r.

NAME 🖥️ lgamma_r 🖥️

log gamma function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double lgamma(double x);
float lgammaf(float x);
long double lgammal(long double x);
double lgamma_r(double x, int *signp);
float lgammaf_r(float x, int *signp);
long double lgammal_r(long double x, int *signp);
extern int signgam;

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

lgamma():
    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

lgammaf(), lgammal():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

lgamma_r(), lgammaf_r(), lgammal_r():

    /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

signgam:

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

For the definition of the Gamma function, see tgamma(3).

The lgamma(), lgammaf(), and lgammal() functions return the natural logarithm of the absolute value of the Gamma function. The sign of the Gamma function is returned in the external integer signgam declared in <math.h>. It is 1 when the Gamma function is positive or zero, -1 when it is negative.

Since using a constant location signgam is not thread-safe, the functions lgamma_r(), lgammaf_r(), and lgammal_r() have been introduced; they return the sign via the argument signp.

RETURN VALUE

On success, these functions return the natural logarithm of Gamma(x).

If x is a NaN, a NaN is returned.

If x is 1 or 2, +0 is returned.

If x is positive infinity or negative infinity, positive infinity is returned.

If x is a nonpositive integer, a pole error occurs, and the functions return +HUGE_VAL, +HUGE_VALF, or +HUGE_VALL, respectively.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the correct mathematical sign.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Pole error: x is a nonpositive integer
errno is set to ERANGE (but see BUGS). A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised.

Range error: result overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

STANDARDS

lgamma()
lgammaf()
lgammal()
C11, POSIX.1-2008.

signgam
POSIX.1-2008.

lgamma_r()
lgammaf_r()
lgammal_r()
None.

HISTORY

lgamma()
lgammaf()
lgammal()
C99, POSIX.1-2001.

signgam
POSIX.1-2001.

lgamma_r()
lgammaf_r()
lgammal_r()
None.

BUGS

In glibc 2.9 and earlier, when a pole error occurs, errno is set to EDOM; instead of the POSIX-mandated ERANGE. Since glibc 2.10, glibc does the right thing.

SEE ALSO

tgamma(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2018 - Linux cli command Role_Tiny_Withpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Role_Tiny_Withpm and provides detailed information about the command Role_Tiny_Withpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Role_Tiny_Withpm.

NAME 🖥️ Role_Tiny_Withpm 🖥️

Neat interface for consumers of Role::Tiny roles

SYNOPSIS

package Some::Class; use Role::Tiny::With; with Some::Role; # The role is now mixed in

DESCRIPTION

Role::Tiny is a minimalist role composition tool. Role::Tiny::With provides a with function to compose such roles.

AUTHORS

See Role::Tiny for authors.

COPYRIGHT AND LICENSE

See Role::Tiny for the copyright and license.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2019 - Linux cli command SIMPLEQ_FIRST

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SIMPLEQ_FIRST and provides detailed information about the command SIMPLEQ_FIRST, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SIMPLEQ_FIRST.

NAME 🖥️ SIMPLEQ_FIRST 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2020 - Linux cli command tcsendbreak

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tcsendbreak and provides detailed information about the command tcsendbreak, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tcsendbreak.

NAME 🖥️ tcsendbreak 🖥️

get and set terminal attributes, line control, get and set baud rate

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <termios.h>
#include <unistd.h>
int tcgetattr(int fd, struct termios *termios_p);
int tcsetattr(int fd, int optional_actions,
 const struct termios *termios_p);
int tcsendbreak(int fd, int duration);
int tcdrain(int fd);
int tcflush(int fd, int queue_selector);
int tcflow(int fd, int action);
void cfmakeraw(struct termios *termios_p);
speed_t cfgetispeed(const struct termios *termios_p);
speed_t cfgetospeed(const struct termios *termios_p);
int cfsetispeed(struct termios *termios_p, speed_t speed);
int cfsetospeed(struct termios *termios_p, speed_t speed);
int cfsetspeed(struct termios *termios_p, speed_t speed);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

cfsetspeed(), cfmakeraw():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The termios functions describe a general terminal interface that is provided to control asynchronous communications ports.

The termios structure

Many of the functions described here have a termios_p argument that is a pointer to a termios structure. This structure contains at least the following members:

tcflag_t c_iflag;      /* input modes */
tcflag_t c_oflag;      /* output modes */
tcflag_t c_cflag;      /* control modes */
tcflag_t c_lflag;      /* local modes */
cc_t     c_cc[NCCS];   /* special characters */

The values that may be assigned to these fields are described below. In the case of the first four bit-mask fields, the definitions of some of the associated flags that may be set are exposed only if a specific feature test macro (see feature_test_macros(7)) is defined, as noted in brackets ("[]").

In the descriptions below, “not in POSIX” means that the value is not specified in POSIX.1-2001, and “XSI” means that the value is specified in POSIX.1-2001 as part of the XSI extension.

c_iflag flag constants:

IGNBRK
Ignore BREAK condition on input.

BRKINT
If IGNBRK is set, a BREAK is ignored. If it is not set but BRKINT is set, then a BREAK causes the input and output queues to be flushed, and if the terminal is the controlling terminal of a foreground process group, it will cause a SIGINT to be sent to this foreground process group. When neither IGNBRK nor BRKINT are set, a BREAK reads as a null byte (‘�’), except when PARMRK is set, in which case it reads as the sequence \377 � �.

IGNPAR
Ignore framing errors and parity errors.

PARMRK
If this bit is set, input bytes with parity or framing errors are marked when passed to the program. This bit is meaningful only when INPCK is set and IGNPAR is not set. The way erroneous bytes are marked is with two preceding bytes, \377 and �. Thus, the program actually reads three bytes for one erroneous byte received from the terminal. If a valid byte has the value \377, and ISTRIP (see below) is not set, the program might confuse it with the prefix that marks a parity error. Therefore, a valid byte \377 is passed to the program as two bytes, \377 \377, in this case.

If neither IGNPAR nor PARMRK is set, read a character with a parity error or framing error as �.

INPCK
Enable input parity checking.

ISTRIP
Strip off eighth bit.

INLCR
Translate NL to CR on input.

IGNCR
Ignore carriage return on input.

ICRNL
Translate carriage return to newline on input (unless IGNCR is set).

IUCLC
(not in POSIX) Map uppercase characters to lowercase on input.

IXON
Enable XON/XOFF flow control on output.

IXANY
(XSI) Typing any character will restart stopped output. (The default is to allow just the START character to restart output.)

IXOFF
Enable XON/XOFF flow control on input.

IMAXBEL
(not in POSIX) Ring bell when input queue is full. Linux does not implement this bit, and acts as if it is always set.

IUTF8 (since Linux 2.6.4)
(not in POSIX) Input is UTF8; this allows character-erase to be correctly performed in cooked mode.

c_oflag flag constants:

OPOST
Enable implementation-defined output processing.

OLCUC
(not in POSIX) Map lowercase characters to uppercase on output.

ONLCR
(XSI) Map NL to CR-NL on output.

OCRNL
Map CR to NL on output.

ONOCR
Don’t output CR at column 0.

ONLRET
The NL character is assumed to do the carriage-return function; the kernel’s idea of the current column is set to 0 after both NL and CR.

OFILL
Send fill characters for a delay, rather than using a timed delay.

OFDEL
Fill character is ASCII DEL (0177). If unset, fill character is ASCII NUL (‘�’). (Not implemented on Linux.)

NLDLY
Newline delay mask. Values are NL0 and NL1. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

CRDLY
Carriage return delay mask. Values are CR0, CR1, CR2, or CR3. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

TABDLY
Horizontal tab delay mask. Values are TAB0, TAB1, TAB2, TAB3 (or XTABS, but see the BUGS section). A value of TAB3, that is, XTABS, expands tabs to spaces (with tab stops every eight columns). [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

BSDLY
Backspace delay mask. Values are BS0 or BS1. (Has never been implemented.) [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

VTDLY
Vertical tab delay mask. Values are VT0 or VT1.

FFDLY
Form feed delay mask. Values are FF0 or FF1. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

c_cflag flag constants:

CBAUD
(not in POSIX) Baud speed mask (4+1 bits). [requires _BSD_SOURCE or _SVID_SOURCE]

CBAUDEX
(not in POSIX) Extra baud speed mask (1 bit), included in CBAUD. [requires _BSD_SOURCE or _SVID_SOURCE]

(POSIX says that the baud speed is stored in the termios structure without specifying where precisely, and provides cfgetispeed() and cfsetispeed() for getting at it. Some systems use bits selected by CBAUD in c_cflag, other systems use separate fields, for example, sg_ispeed and sg_ospeed.)

CSIZE
Character size mask. Values are CS5, CS6, CS7, or CS8.

CSTOPB
Set two stop bits, rather than one.

CREAD
Enable receiver.

PARENB
Enable parity generation on output and parity checking for input.

PARODD
If set, then parity for input and output is odd; otherwise even parity is used.

HUPCL
Lower modem control lines after last process closes the device (hang up).

CLOCAL
Ignore modem control lines.

LOBLK
(not in POSIX) Block output from a noncurrent shell layer. For use by shl (shell layers). (Not implemented on Linux.)

CIBAUD
(not in POSIX) Mask for input speeds. The values for the CIBAUD bits are the same as the values for the CBAUD bits, shifted left IBSHIFT bits. [requires _BSD_SOURCE or _SVID_SOURCE] (Not implemented in glibc, supported on Linux via TCGET* and TCSET* ioctls; see ioctl_tty(2))

CMSPAR
(not in POSIX) Use “stick” (mark/space) parity (supported on certain serial devices): if PARODD is set, the parity bit is always 1; if PARODD is not set, then the parity bit is always 0. [requires _BSD_SOURCE or _SVID_SOURCE]

CRTSCTS
(not in POSIX) Enable RTS/CTS (hardware) flow control. [requires _BSD_SOURCE or _SVID_SOURCE]

c_lflag flag constants:

ISIG
When any of the characters INTR, QUIT, SUSP, or DSUSP are received, generate the corresponding signal.

ICANON
Enable canonical mode (described below).

XCASE
(not in POSIX; not supported under Linux) If ICANON is also set, terminal is uppercase only. Input is converted to lowercase, except for characters preceded by \ On output, uppercase characters are preceded by \ and lowercase characters are converted to uppercase. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

ECHO
Echo input characters.

ECHOE
If ICANON is also set, the ERASE character erases the preceding input character, and WERASE erases the preceding word.

ECHOK
If ICANON is also set, the KILL character erases the current line.

ECHONL
If ICANON is also set, echo the NL character even if ECHO is not set.

ECHOCTL
(not in POSIX) If ECHO is also set, terminal special characters other than TAB, NL, START, and STOP are echoed as ^X, where X is the character with ASCII code 0x40 greater than the special character. For example, character 0x08 (BS) is echoed as ^H. [requires _BSD_SOURCE or _SVID_SOURCE]

ECHOPRT
(not in POSIX) If ICANON and ECHO are also set, characters are printed as they are being erased. [requires _BSD_SOURCE or _SVID_SOURCE]

ECHOKE
(not in POSIX) If ICANON is also set, KILL is echoed by erasing each character on the line, as specified by ECHOE and ECHOPRT. [requires _BSD_SOURCE or _SVID_SOURCE]

DEFECHO
(not in POSIX) Echo only when a process is reading. (Not implemented on Linux.)

FLUSHO
(not in POSIX; not supported under Linux) Output is being flushed. This flag is toggled by typing the DISCARD character. [requires _BSD_SOURCE or _SVID_SOURCE]

NOFLSH
Disable flushing the input and output queues when generating signals for the INT, QUIT, and SUSP characters.

TOSTOP
Send the SIGTTOU signal to the process group of a background process which tries to write to its controlling terminal.

PENDIN
(not in POSIX; not supported under Linux) All characters in the input queue are reprinted when the next character is read. (bash(1) handles typeahead this way.) [requires _BSD_SOURCE or _SVID_SOURCE]

IEXTEN
Enable implementation-defined input processing. This flag, as well as ICANON must be enabled for the special characters EOL2, LNEXT, REPRINT, WERASE to be interpreted, and for the IUCLC flag to be effective.

The c_cc array defines the terminal special characters. The symbolic indices (initial values) and meaning are:

VDISCARD
(not in POSIX; not supported under Linux; 017, SI, Ctrl-O) Toggle: start/stop discarding pending output. Recognized when IEXTEN is set, and then not passed as input.

VDSUSP
(not in POSIX; not supported under Linux; 031, EM, Ctrl-Y) Delayed suspend character (DSUSP): send SIGTSTP signal when the character is read by the user program. Recognized when IEXTEN and ISIG are set, and the system supports job control, and then not passed as input.

VEOF
(004, EOT, Ctrl-D) End-of-file character (EOF). More precisely: this character causes the pending tty buffer to be sent to the waiting user program without waiting for end-of-line. If it is the first character of the line, the read(2) in the user program returns 0, which signifies end-of-file. Recognized when ICANON is set, and then not passed as input.

VEOL
(0, NUL) Additional end-of-line character (EOL). Recognized when ICANON is set.

VEOL2
(not in POSIX; 0, NUL) Yet another end-of-line character (EOL2). Recognized when ICANON is set.

VERASE
(0177, DEL, rubout, or 010, BS, Ctrl-H, or also #) Erase character (ERASE). This erases the previous not-yet-erased character, but does not erase past EOF or beginning-of-line. Recognized when ICANON is set, and then not passed as input.

VINTR
(003, ETX, Ctrl-C, or also 0177, DEL, rubout) Interrupt character (INTR). Send a SIGINT signal. Recognized when ISIG is set, and then not passed as input.

VKILL
(025, NAK, Ctrl-U, or Ctrl-X, or also @) Kill character (KILL). This erases the input since the last EOF or beginning-of-line. Recognized when ICANON is set, and then not passed as input.

VLNEXT
(not in POSIX; 026, SYN, Ctrl-V) Literal next (LNEXT). Quotes the next input character, depriving it of a possible special meaning. Recognized when IEXTEN is set, and then not passed as input.

VMIN
Minimum number of characters for noncanonical read (MIN).

VQUIT
(034, FS, Ctrl-\ Quit character (QUIT). Send SIGQUIT signal. Recognized when ISIG is set, and then not passed as input.

VREPRINT
(not in POSIX; 022, DC2, Ctrl-R) Reprint unread characters (REPRINT). Recognized when ICANON and IEXTEN are set, and then not passed as input.

VSTART
(021, DC1, Ctrl-Q) Start character (START). Restarts output stopped by the Stop character. Recognized when IXON is set, and then not passed as input.

VSTATUS
(not in POSIX; not supported under Linux; status request: 024, DC4, Ctrl-T). Status character (STATUS). Display status information at terminal, including state of foreground process and amount of CPU time it has consumed. Also sends a SIGINFO signal (not supported on Linux) to the foreground process group.

VSTOP
(023, DC3, Ctrl-S) Stop character (STOP). Stop output until Start character typed. Recognized when IXON is set, and then not passed as input.

VSUSP
(032, SUB, Ctrl-Z) Suspend character (SUSP). Send SIGTSTP signal. Recognized when ISIG is set, and then not passed as input.

VSWTCH
(not in POSIX; not supported under Linux; 0, NUL) Switch character (SWTCH). Used in System V to switch shells in shell layers, a predecessor to shell job control.

VTIME
Timeout in deciseconds for noncanonical read (TIME).

VWERASE
(not in POSIX; 027, ETB, Ctrl-W) Word erase (WERASE). Recognized when ICANON and IEXTEN are set, and then not passed as input.

An individual terminal special character can be disabled by setting the value of the corresponding c_cc element to _POSIX_VDISABLE.

The above symbolic subscript values are all different, except that VTIME, VMIN may have the same value as VEOL, VEOF, respectively. In noncanonical mode the special character meaning is replaced by the timeout meaning. For an explanation of VMIN and VTIME, see the description of noncanonical mode below.

Retrieving and changing terminal settings

tcgetattr() gets the parameters associated with the object referred by fd and stores them in the termios structure referenced by termios_p. This function may be invoked from a background process; however, the terminal attributes may be subsequently changed by a foreground process.

tcsetattr() sets the parameters associated with the terminal (unless support is required from the underlying hardware that is not available) from the termios structure referred to by termios_p. optional_actions specifies when the changes take effect:

TCSANOW
the change occurs immediately.

TCSADRAIN
the change occurs after all output written to fd has been transmitted. This option should be used when changing parameters that affect output.

TCSAFLUSH
the change occurs after all output written to the object referred by fd has been transmitted, and all input that has been received but not read will be discarded before the change is made.

Canonical and noncanonical mode

The setting of the ICANON canon flag in c_lflag determines whether the terminal is operating in canonical mode (ICANON set) or noncanonical mode (ICANON unset). By default, ICANON is set.

In canonical mode:

  • Input is made available line by line. An input line is available when one of the line delimiters is typed (NL, EOL, EOL2; or EOF at the start of line). Except in the case of EOF, the line delimiter is included in the buffer returned by read(2).

  • Line editing is enabled (ERASE, KILL; and if the IEXTEN flag is set: WERASE, REPRINT, LNEXT). A read(2) returns at most one line of input; if the read(2) requested fewer bytes than are available in the current line of input, then only as many bytes as requested are read, and the remaining characters will be available for a future read(2).

  • The maximum line length is 4096 chars (including the terminating newline character); lines longer than 4096 chars are truncated. After 4095 characters, input processing (e.g., ISIG and ECHO* processing) continues, but any input data after 4095 characters up to (but not including) any terminating newline is discarded. This ensures that the terminal can always receive more input until at least one line can be read.

In noncanonical mode input is available immediately (without the user having to type a line-delimiter character), no input processing is performed, and line editing is disabled. The read buffer will only accept 4095 chars; this provides the necessary space for a newline char if the input mode is switched to canonical. The settings of MIN (c_cc[VMIN]) and TIME (c_cc[VTIME]) determine the circumstances in which a read(2) completes; there are four distinct cases:

MIN == 0, TIME == 0 (polling read)
If data is available, read(2) returns immediately, with the lesser of the number of bytes available, or the number of bytes requested. If no data is available, read(2) returns 0.

MIN > 0, TIME == 0 (blocking read)
read(2) blocks until MIN bytes are available, and returns up to the number of bytes requested.

MIN == 0, TIME > 0 (read with timeout)
TIME specifies the limit for a timer in tenths of a second. The timer is started when read(2) is called. read(2) returns either when at least one byte of data is available, or when the timer expires. If the timer expires without any input becoming available, read(2) returns 0. If data is already available at the time of the call to read(2), the call behaves as though the data was received immediately after the call.

MIN > 0, TIME > 0 (read with interbyte timeout)
TIME specifies the limit for a timer in tenths of a second. Once an initial byte of input becomes available, the timer is restarted after each further byte is received. read(2) returns when any of the following conditions is met:

  • MIN bytes have been received.

  • The interbyte timer expires.

  • The number of bytes requested by read(2) has been received. (POSIX does not specify this termination condition, and on some other implementations read(2) does not return in this case.)

Because the timer is started only after the initial byte becomes available, at least one byte will be read. If data is already available at the time of the call to read(2), the call behaves as though the data was received immediately after the call.

POSIX does not specify whether the setting of the O_NONBLOCK file status flag takes precedence over the MIN and TIME settings. If O_NONBLOCK is set, a read(2) in noncanonical mode may return immediately, regardless of the setting of MIN or TIME. Furthermore, if no data is available, POSIX permits a read(2) in noncanonical mode to return either 0, or -1 with errno set to EAGAIN.

Raw mode

cfmakeraw() sets the terminal to something like the “raw” mode of the old Version 7 terminal driver: input is available character by character, echoing is disabled, and all special processing of terminal input and output characters is disabled. The terminal attributes are set as follows:

termios_p->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
                | INLCR | IGNCR | ICRNL | IXON);
termios_p->c_oflag &= ~OPOST;
termios_p->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
termios_p->c_cflag &= ~(CSIZE | PARENB);
termios_p->c_cflag |= CS8;

Line control

tcsendbreak() transmits a continuous stream of zero-valued bits for a specific duration, if the terminal is using asynchronous serial data transmission. If duration is zero, it transmits zero-valued bits for at least 0.25 seconds, and not more than 0.5 seconds. If duration is not zero, it sends zero-valued bits for some implementation-defined length of time.

If the terminal is not using asynchronous serial data transmission, tcsendbreak() returns without taking any action.

tcdrain() waits until all output written to the object referred to by fd has been transmitted.

tcflush() discards data written to the object referred to by fd but not transmitted, or data received but not read, depending on the value of queue_selector:

TCIFLUSH
flushes data received but not read.

TCOFLUSH
flushes data written but not transmitted.

TCIOFLUSH
flushes both data received but not read, and data written but not transmitted.

tcflow() suspends transmission or reception of data on the object referred to by fd, depending on the value of action:

TCOOFF
suspends output.

TCOON
restarts suspended output.

TCIOFF
transmits a STOP character, which stops the terminal device from transmitting data to the system.

TCION
transmits a START character, which starts the terminal device transmitting data to the system.

The default on open of a terminal file is that neither its input nor its output is suspended.

Line speed

The baud rate functions are provided for getting and setting the values of the input and output baud rates in the termios structure. The new values do not take effect until tcsetattr() is successfully called.

Setting the speed to B0 instructs the modem to “hang up”. The actual bit rate corresponding to B38400 may be altered with setserial(8).

The input and output baud rates are stored in the termios structure.

cfgetospeed() returns the output baud rate stored in the termios structure pointed to by termios_p.

cfsetospeed() sets the output baud rate stored in the termios structure pointed to by termios_p to speed, which must be one of these constants:

B0
B50
B75
B110
B134
B150
B200
B300
B600
B1200
B1800
B2400
B4800
B9600
B19200
B38400
B57600
B115200
B230400
B460800
B500000
B576000
B921600
B1000000
B1152000
B1500000
B2000000

These constants are additionally supported on the SPARC architecture:

B76800
B153600
B307200
B614400

These constants are additionally supported on non-SPARC architectures:

B2500000
B3000000
B3500000
B4000000

Due to differences between architectures, portable applications should check if a particular Bnnn constant is defined prior to using it.

The zero baud rate, B0, is used to terminate the connection. If B0 is specified, the modem control lines shall no longer be asserted. Normally, this will disconnect the line. CBAUDEX is a mask for the speeds beyond those defined in POSIX.1 (57600 and above). Thus, B57600 & CBAUDEX is nonzero.

Setting the baud rate to a value other than those defined by Bnnn constants is possible via the TCSETS2 ioctl; see ioctl_tty(2).

cfgetispeed() returns the input baud rate stored in the termios structure.

cfsetispeed() sets the input baud rate stored in the termios structure to speed, which must be specified as one of the Bnnn constants listed above for cfsetospeed(). If the input baud rate is set to the literal constant 0 (not the symbolic constant B0), the input baud rate will be equal to the output baud rate.

cfsetspeed() is a 4.4BSD extension. It takes the same arguments as cfsetispeed(), and sets both input and output speed.

RETURN VALUE

cfgetispeed() returns the input baud rate stored in the termios structure.

cfgetospeed() returns the output baud rate stored in the termios structure.

All other functions return:

0
on success.

-1
on failure and set errno to indicate the error.

Note that tcsetattr() returns success if any of the requested changes could be successfully carried out. Therefore, when making multiple changes it may be necessary to follow this call with a further call to tcgetattr() to check that all changes have been performed successfully.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tcgetattr(), tcsetattr(), tcdrain(), tcflush(), tcflow(), tcsendbreak(), cfmakeraw(), cfgetispeed(), cfgetospeed(), cfsetispeed(), cfsetospeed(), cfsetspeed()

Thread safetyMT-Safe

STANDARDS

tcgetattr()
tcsetattr()
tcsendbreak()
tcdrain()
tcflush()
tcflow()
cfgetispeed()
cfgetospeed()
cfsetispeed()
cfsetospeed()
POSIX.1-2008.

cfmakeraw()
cfsetspeed()
BSD.

HISTORY

tcgetattr()
tcsetattr()
tcsendbreak()
tcdrain()
tcflush()
tcflow()
cfgetispeed()
cfgetospeed()
cfsetispeed()
cfsetospeed()
POSIX.1-2001.

cfmakeraw()
cfsetspeed()
BSD.

NOTES

UNIX V7 and several later systems have a list of baud rates where after the values B0 through B9600 one finds the two constants EXTA, EXTB (“External A” and “External B”). Many systems extend the list with much higher baud rates.

The effect of a nonzero duration with tcsendbreak() varies. SunOS specifies a break of duration * N seconds, where N is at least 0.25, and not more than 0.5. Linux, AIX, DU, Tru64 send a break of duration milliseconds. FreeBSD and NetBSD and HP-UX and MacOS ignore the value of duration. Under Solaris and UnixWare, tcsendbreak() with nonzero duration behaves like tcdrain().

BUGS

On the Alpha architecture before Linux 4.16 (and glibc before glibc 2.28), the XTABS value was different from TAB3 and it was ignored by the N_TTY line discipline code of the terminal driver as a result (because as it wasn’t part of the TABDLY mask).

SEE ALSO

reset(1), setterm(1), stty(1), tput(1), tset(1), tty(1), ioctl_console(2), ioctl_tty(2), cc_t(3type), speed_t(3type), tcflag_t(3type), setserial(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2021 - Linux cli command isless

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isless and provides detailed information about the command isless, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isless.

NAME 🖥️ isless 🖥️

floating-point relational tests without exception for NaN

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
int isgreater(x, y);
int isgreaterequal(x, y);
int isless(x, y);
int islessequal(x, y);
int islessgreater(x, y);
int isunordered(x, y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

    All functions described here:
        _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The normal relational operations (like <, “less than”) fail if one of the operands is NaN. This will cause an exception. To avoid this, C99 defines the macros listed below.

These macros are guaranteed to evaluate their arguments only once. The arguments must be of real floating-point type (note: do not pass integer values as arguments to these macros, since the arguments will not be promoted to real-floating types).

isgreater()
determines (x) > (y) without an exception if x or y is NaN.

isgreaterequal()
determines (x) >= (y) without an exception if x or y is NaN.

isless()
determines (x) < (y) without an exception if x or y is NaN.

islessequal()
determines (x) <= (y) without an exception if x or y is NaN.

islessgreater()
determines (x) < (y) || (x) > (y) without an exception if x or y is NaN. This macro is not equivalent to x != y because that expression is true if x or y is NaN.

isunordered()
determines whether its arguments are unordered, that is, whether at least one of the arguments is a NaN.

RETURN VALUE

The macros other than isunordered() return the result of the relational comparison; these macros return 0 if either argument is a NaN.

isunordered() returns 1 if x or y is NaN and 0 otherwise.

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isgreater(), isgreaterequal(), isless(), islessequal(), islessgreater(), isunordered()

Thread safetyMT-Safe

VERSIONS

Not all hardware supports these functions, and where hardware support isn’t provided, they will be emulated by macros. This will result in a performance penalty. Don’t use these functions if NaN is of no concern for you.

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

fpclassify(3), isnan(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2022 - Linux cli command Tk_BrowseEntrypm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_BrowseEntrypm and provides detailed information about the command Tk_BrowseEntrypm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_BrowseEntrypm.

NAME 🖥️ Tk_BrowseEntrypm 🖥️

entry widget with popup choices.

SYNOPSIS

use Tk::BrowseEntry; $b = $frame->BrowseEntry(-label => “Label”, -variable => \var); $b->insert(“end”, “opt1”); $b->insert(“end”, “opt2”); $b->insert(“end”, “opt3”); … $b->pack;

SUPER-CLASS

The BrowseEntry class is derived from the Frame class and inherits all the methods, options and subwidgets of its super-class. By default, options and methods are delegated to the entry subwidget.

DESCRIPTION

BrowseEntry is a poor man’s ComboBox. It may be considered an enhanced version of LabEntry which provides a button to popup the choices of the possible values that the Entry may take. BrowseEntry supports all the options LabEntry supports except -textvariable. This is replaced by -variable. Other options that BrowseEntry supports:

-arrowimage
Specifies the image to be used in the arrow button beside the entry widget. The default is an downward arrow image in the file cbxarrow.xbm

-autolimitheight
If set to a true value, then the height of the listbox will be at most the number of entries in the list. The overall maximum of -listheight still applies.

-autolistwidth
If set to a true value, then the width of the listbox will match the width of the largest entry.

-browsecmd
Specifies a function to call when a selection is made in the popped up listbox. It is passed the widget and the text of the entry selected. This function is called after the entry variable has been assigned the value.

-browse2cmd
Like -browsecmd, but the callback is called with the listbox index instead of the selected value.

-buttontakefocus
Set the -takefocus option of the button subwidget.

-choices
Specifies the list of choices to pop up. This is a reference to an array of strings specifying the choices.

-colorstate
The state of the widget is reflected by color. A non-editable entry widget will get a light gray background, while an editable entry will be almost white. [This may change]

-listcmd
Specifies the function to call when the button next to the entry is pressed to popup the choices in the listbox. This is called before popping up the listbox, so can be used to populate the entries in the listbox.

-listheight
Set the height of the listbox. See also -autolimitheight.

-listwidth
Specifies the width of the popup listbox.

-state
Specifies one of three states for the widget: normal, readonly, or disabled. If the widget is disabled then the value may not be changed and the arrow button won’t activate. If the widget is readonly, the entry may not be edited, but it may be changed by choosing a value from the popup listbox. normal is the default.

-style
Set the “style” of the widget. Permitted values are MSWin32 and unix. By default -style is set to the current platform. Widgets with the unix style will look like a normal BrowseEntry widget, whereas with the MSWin32 style the arrow will look close to the Windows’ standard combobox widget, while moving the mouse the entries will be highlighted, and probably includes other changes.

-variable
Specifies the variable in which the entered value is to be stored.

METHODS

insert(index, string)
Inserts the text of string at the specified index. This string then becomes available as one of the choices.

delete(index1, index2)
Deletes items from index1 to index2.

get
The get method is delegated to the choices listbox.

ADVERTISED WIDGETS

The following widgets are advertised:

entry
The entry widget.

arrow
The button with the arrow image.

choices
The toplevel widget containing the choice listbox.

slistbox
The scrolled listbox with the choices.

SUBCLASSING

To make subclassing easier, the following methods may be overridden to use other standard widgets in composing the mega widget:

LabEntryWidget
A widget class compatible with Tk::LabEntry used for the entry.

ButtonWidget
A widget class compatible with Tk::Button used for the arrow button.

ListboxWidget
A widget class compatible with Tk::Listbox used for the choices listbox.

For example to use a NumEntry widget (from the Tk-GBARR CPAN distribution) instead of the normal Entry widget:

package Tk::NumBrowseEntry; use base qw(Tk::BrowseEntry); use Tk::NumEntry; Construct Tk::Widget NumBrowseEntry; sub LabEntryWidget { “NumEntry” }

BUGS

BrowseEntry should really provide more of the ComboBox options.

AUTHOR

Rajappa Iyer [email protected]

Chris Dean [email protected] made additions.

More additions by Slaven Rezic [email protected]

This code was inspired by ComboBox.tcl in Tix4.0 by Ioi Lam and bears more than a passing resemblance to ComboBox code. This may be distributed under the same conditions as Perl.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2023 - Linux cli command llroundf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command llroundf and provides detailed information about the command llroundf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the llroundf.

NAME 🖥️ llroundf 🖥️

round to nearest integer

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
long lround(double x);
long lroundf(float x);
long lroundl(long double x);
long long llround(double x);
long long llroundf(float x);
long long llroundl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions round their argument to the nearest integer value, rounding halfway cases away from zero, regardless of the current rounding direction (see fenv(3)).

Note that unlike the round(3) and ceil(3), functions, the return type of these functions differs from that of their arguments.

RETURN VALUE

These functions return the rounded integer value.

If x is a NaN or an infinity, or the rounded value is too large to be stored in a long (long long in the case of the ll* functions), then a domain error occurs, and the return value is unspecified.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is a NaN or infinite, or the rounded value is too large
An invalid floating-point exception (FE_INVALID) is raised.

These functions do not set errno.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

lround(), lroundf(), lroundl(), llround(), llroundf(), llroundl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

ceil(3), floor(3), lrint(3), nearbyint(3), rint(3), round(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2024 - Linux cli command XML_Handler_CanonXMLWriterpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_Handler_CanonXMLWriterpm and provides detailed information about the command XML_Handler_CanonXMLWriterpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_Handler_CanonXMLWriterpm.

NAME 🖥️ XML_Handler_CanonXMLWriterpm 🖥️

output XML in canonical XML format

SYNOPSIS

use XML::Handler::CanonXMLWriter; $writer = XML::Handler::CanonXMLWriter OPTIONS; $parser->parse(Handler => $writer);

DESCRIPTION

XML::Handler::CanonXMLWriter is a PerlSAX handler that will return a string or write a stream of canonical XML for an XML instance and it’s content.

XML::Handler::CanonXMLWriter objects hold the options used for writing the XML objects. Options can be supplied when the the object is created,

$writer = new XML::Handler::CanonXMLWriter PrintComments => 1;

or modified at any time before calling the parser’s `parse()’ method:

$writer->{PrintComments} = 0;

OPTIONS

IOHandle
IOHandle contains a handle for writing the canonical XML to. If an IOHandle is not provided, the canonical XML string will be returned from `parse()'.

PrintComments
By default comments are not written to the output. Setting comment to a true value will include comments in the output.

AUTHOR

Ken MacLeod, [email protected]

SEE ALSO

perl (1), PerlSAX

James Clark’s Canonical XML definition <http://www.jclark.com/xml/canonxml.html>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2025 - Linux cli command Image_ExifTool_Lang_itpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Lang_itpm and provides detailed information about the command Image_ExifTool_Lang_itpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Lang_itpm.

NAME 🖥️ Image_ExifTool_Lang_itpm 🖥️

ExifTool Italian language translations

DESCRIPTION

This file is used by Image::ExifTool to generate localized tag descriptions and values.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

ACKNOWLEDGEMENTS

Thanks to Jens Duttke, Ferdinando Agovino, Emilio Dati and Michele Locati for providing this translation.

SEE ALSO

Image::ExifTool (3pm), Image::ExifTool::TagInfoXML (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2026 - Linux cli command pmap_rmtcall

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pmap_rmtcall and provides detailed information about the command pmap_rmtcall, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pmap_rmtcall.

NAME 🖥️ pmap_rmtcall 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2027 - Linux cli command Regexp_Common_URI_RFC1808pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_URI_RFC1808pm and provides detailed information about the command Regexp_Common_URI_RFC1808pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_URI_RFC1808pm.

NAME 🖥️ Regexp_Common_URI_RFC1808pm 🖥️

  • Definitions from RFC1808;

SYNOPSIS

use Regexp::Common::URI::RFC1808 qw /:ALL/;

DESCRIPTION

This package exports definitions from RFC1808. It’s intended usage is for Regexp::Common::URI submodules only. Its interface might change without notice.

REFERENCES

[RFC 1808]
Fielding, R.: Relative Uniform Resource Locators (URL). June 1995.

AUTHOR

Damian Conway ([email protected])

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2028 - Linux cli command XML_Parser_Style_Subspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_Parser_Style_Subspm and provides detailed information about the command XML_Parser_Style_Subspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_Parser_Style_Subspm.

NAME 🖥️ XML_Parser_Style_Subspm 🖥️

glue for handling element callbacks

SYNOPSIS

use XML::Parser; my $p = XML::Parser->new(Style => Subs, Pkg => MySubs); $p->parsefile(foo.xml); { package MySubs; sub foo { # start of foo tag } sub foo_ { # end of foo tag } }

DESCRIPTION

Each time an element starts, a sub by that name in the package specified by the Pkg option is called with the same parameters that the Start handler gets called with.

Each time an element ends, a sub with that name appended with an underscore ("_"), is called with the same parameters that the End handler gets called with.

Nothing special is returned by parse.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2029 - Linux cli command getpwent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getpwent and provides detailed information about the command getpwent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getpwent.

NAME 🖥️ getpwent 🖥️

get password file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <pwd.h>
struct passwd *getpwent(void);
void setpwent(void);
void endpwent(void);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getpwent(), setpwent(), endpwent():

    _XOPEN_SOURCE >= 500
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The getpwent() function returns a pointer to a structure containing the broken-out fields of a record from the password database (e.g., the local password file /etc/passwd, NIS, and LDAP). The first time getpwent() is called, it returns the first entry; thereafter, it returns successive entries.

The setpwent() function rewinds to the beginning of the password database.

The endpwent() function is used to close the password database after all processing has been performed.

The passwd structure is defined in <pwd.h> as follows:

struct passwd {
    char   *pw_name;       /* username */
    char   *pw_passwd;     /* user password */
    uid_t   pw_uid;        /* user ID */
    gid_t   pw_gid;        /* group ID */
    char   *pw_gecos;      /* user information */
    char   *pw_dir;        /* home directory */
    char   *pw_shell;      /* shell program */
};

When shadow(5) passwords are enabled (which is default on many GNU/Linux installations) the content of pw_passwd is usually not very useful. In such a case most passwords are stored in a separate file.

The variable pw_shell may be empty, in which case the system will execute the default shell (/bin/sh) for the user.

For more information about the fields of this structure, see passwd(5).

RETURN VALUE

The getpwent() function returns a pointer to a passwd structure, or NULL if there are no more entries or an error occurred. If an error occurs, errno is set to indicate the error. If one wants to check errno after the call, it should be set to zero before the call.

The return value may point to a static area, and may be overwritten by subsequent calls to getpwent(), getpwnam(3), or getpwuid(3). (Do not pass the returned pointer to free(3).)

ERRORS

EINTR
A signal was caught; see signal(7).

EIO
I/O error.

EMFILE
The per-process limit on the number of open file descriptors has been reached.

ENFILE
The system-wide limit on the total number of open files has been reached.

ENOMEM
Insufficient memory to allocate passwd structure.

ERANGE
Insufficient buffer space supplied.

FILES

/etc/passwd
local password database file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getpwent()

Thread safety

MT-Unsafe race:pwent race:pwentbuf locale

setpwent(), endpwent()

Thread safety

MT-Unsafe race:pwent locale

In the above table, pwent in race:pwent signifies that if any of the functions setpwent(), getpwent(), or endpwent() are used in parallel in different threads of a program, then data races could occur.

VERSIONS

The pw_gecos field is not specified in POSIX, but is present on most implementations.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4, 4.3BSD.

SEE ALSO

fgetpwent(3), getpw(3), getpwent_r(3), getpwnam(3), getpwuid(3), putpwent(3), shadow(5), passwd(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2030 - Linux cli command Moose_Meta_TypeConstraintpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_TypeConstraintpm and provides detailed information about the command Moose_Meta_TypeConstraintpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_TypeConstraintpm.

NAME 🖥️ Moose_Meta_TypeConstraintpm 🖥️

The Moose Type Constraint metaclass

VERSION

version 2.2207

DESCRIPTION

This class represents a single type constraint. Moose’s built-in type constraints, as well as constraints you define, are all stored in a Moose::Meta::TypeConstraint::Registry object as objects of this class.

INHERITANCE

Moose::Meta::TypeConstraint is a subclass of Class::MOP::Object.

METHODS

Moose::Meta::TypeConstraint->new(%options)

This creates a new type constraint based on the provided %options:

  • name The constraint name. If a name is not provided, it will be set to “_ _ANON_ _”.

  • parent A Moose::Meta::TypeConstraint object which is the parent type for the type being created. This is optional.

  • constraint This is the subroutine reference that implements the actual constraint check. This defaults to a subroutine which always returns true.

  • message A subroutine reference which is used to generate an error message when the constraint fails. This is optional.

  • coercion A Moose::Meta::TypeCoercion object representing the coercions to the type. This is optional.

  • inlined A subroutine which returns a string suitable for inlining this type constraint. It will be called as a method on the type constraint object, and will receive a single additional parameter, a variable name to be tested (usually "$_" or "$_[0]". This is optional.

  • inline_environment A hash reference of variables to close over. The keys are variables names, and the values are references to the variables.

$constraint->equals($type_name_or_object)

Returns true if the supplied name or type object is the same as the current type.

$constraint->is_subtype_of($type_name_or_object)

Returns true if the supplied name or type object is a parent of the current type.

$constraint->is_a_type_of($type_name_or_object)

Returns true if the given type is the same as the current type, or is a parent of the current type. This is a shortcut for checking equals and is_subtype_of.

$constraint->coerce($value)

This will attempt to coerce the value to the type. If the type does not have any defined coercions this will throw an error.

If no coercion can produce a value matching $constraint, the original value is returned.

$constraint->assert_coerce($value)

This method behaves just like coerce, but if the result is not valid according to $constraint, an error is thrown.

$constraint->check($value)

Returns true if the given value passes the constraint for the type.

$constraint->validate($value)

This is similar to check. However, if the type is valid then the method returns an explicit undef. If the type is not valid, we call $self->get_message($value) internally to generate an error message.

$constraint->assert_valid($value)

Like check and validate, this method checks whether $value is valid under the constraint. If it is, it will return true. If it is not, an exception will be thrown with the results of $self->get_message($value).

$constraint->name

Returns the type’s name, as provided to the constructor.

$constraint->parent

Returns the type’s parent, as provided to the constructor, if any.

$constraint->has_parent

Returns true if the type has a parent type.

$constraint->parents

Returns all of the types parents as an list of type constraint objects.

$constraint->constraint

Returns the type’s constraint, as provided to the constructor.

$constraint->get_message($value)

This generates a method for the given value. If the type does not have an explicit message, we generate a default message.

$constraint->has_message

Returns true if the type has a message.

$constraint->message

Returns the type’s message as a subroutine reference.

$constraint->coercion

Returns the type’s Moose::Meta::TypeCoercion object, if one exists.

$constraint->has_coercion

Returns true if the type has a coercion.

$constraint->can_be_inlined

Returns true if this type constraint can be inlined. A type constraint which subtypes an inlinable constraint and does not add an additional constraint “inherits” its parent type’s inlining.

$constraint->create_child_type(%options)

This returns a new type constraint of the same class using the provided %options. The parent option will be the current type.

This method exists so that subclasses of this class can override this behavior and change how child types are created.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2031 - Linux cli command isinfl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isinfl and provides detailed information about the command isinfl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isinfl.

NAME 🖥️ isinfl 🖥️

BSD floating-point classification functions

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
int finite(double x);
int finitef(float x);
int finitel(long double x);
int isinf(double x);
int isinff(float x);
int isinfl(long double x);
int isnan(double x);
int isnanf(float x);
int isnanl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

finite(), finitef(), finitel():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
isinf():
    _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isinff(), isinfl():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isnan():

    _XOPEN_SOURCE || _ISOC99_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isnanf(), isnanl():

    _XOPEN_SOURCE >= 600
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The finite(), finitef(), and finitel() functions return a nonzero value if x is neither infinite nor a “not-a-number” (NaN) value, and 0 otherwise.

The isnan(), isnanf(), and isnanl() functions return a nonzero value if x is a NaN value, and 0 otherwise.

The isinf(), isinff(), and isinfl() functions return 1 if x is positive infinity, -1 if x is negative infinity, and 0 otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

finite(), finitef(), finitel(), isinf(), isinff(), isinfl(), isnan(), isnanf(), isnanl()

Thread safetyMT-Safe

NOTES

Note that these functions are obsolete. C99 defines macros isfinite(), isinf(), and isnan() (for all types) replacing them. Further note that the C99 isinf() has weaker guarantees on the return value. See fpclassify(3).

SEE ALSO

fpclassify(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2032 - Linux cli command LWPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LWPpm and provides detailed information about the command LWPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LWPpm.

NAME 🖥️ LWPpm 🖥️

The World-Wide Web library for Perl

SYNOPSIS

use LWP; print “This is libwww-perl-$LWP::VERSION “;

DESCRIPTION

The libwww-perl collection is a set of Perl modules which provides a simple and consistent application programming interface (API) to the World-Wide Web. The main focus of the library is to provide classes and functions that allow you to write WWW clients. The library also contain modules that are of more general use and even classes that help you implement simple HTTP servers.

Most modules in this library provide an object oriented API. The user agent, requests sent and responses received from the WWW server are all represented by objects. This makes a simple and powerful interface to these services. The interface is easy to extend and customize for your own needs.

The main features of the library are:

  • Contains various reusable components (modules) that can be used separately or together.

  • Provides an object oriented model of HTTP-style communication. Within this framework we currently support access to http, https, gopher, ftp, news, file, and mailto resources.

  • Provides a full object oriented interface or a very simple procedural interface.

  • Supports the basic and digest authorization schemes.

  • Supports transparent redirect handling.

  • Supports access through proxy servers.

  • Provides parser for robots.txt files and a framework for constructing robots.

  • Supports parsing of HTML forms.

  • Implements HTTP content negotiation algorithm that can be used both in protocol modules and in server scripts (like CGI scripts).

  • Supports HTTP cookies.

  • Some simple command line clients, for instance lwp-request and lwp-download.

HTTP STYLE COMMUNICATION

The libwww-perl library is based on HTTP style communication. This section tries to describe what that means.

Let us start with this quote from the HTTP specification document <http://www.w3.org/Protocols/>:

  • The HTTP protocol is based on a request/response paradigm. A client establishes a connection with a server and sends a request to the server in the form of a request method, URI, and protocol version, followed by a MIME-like message containing request modifiers, client information, and possible body content. The server responds with a status line, including the message’s protocol version and a success or error code, followed by a MIME-like message containing server information, entity meta-information, and possible body content.

What this means to libwww-perl is that communication always take place through these steps: First a request object is created and configured. This object is then passed to a server and we get a response object in return that we can examine. A request is always independent of any previous requests, i.e. the service is stateless. The same simple model is used for any kind of service we want to access.

For example, if we want to fetch a document from a remote file server, then we send it a request that contains a name for that document and the response will contain the document itself. If we access a search engine, then the content of the request will contain the query parameters and the response will contain the query result. If we want to send a mail message to somebody then we send a request object which contains our message to the mail server and the response object will contain an acknowledgment that tells us that the message has been accepted and will be forwarded to the recipient(s).

It is as simple as that!

The Request Object

The libwww-perl request object has the class name HTTP::Request. The fact that the class name uses HTTP:: as a prefix only implies that we use the HTTP model of communication. It does not limit the kind of services we can try to pass this request to. For instance, we will send HTTP::Requests both to ftp and gopher servers, as well as to the local file system.

The main attributes of the request objects are:

  • method is a short string that tells what kind of request this is. The most common methods are GET, PUT, POST and HEAD.

  • uri is a string denoting the protocol, server and the name of the “document” we want to access. The uri might also encode various other parameters.

  • headers contains additional information about the request and can also used to describe the content. The headers are a set of keyword/value pairs.

  • content is an arbitrary amount of data.

The Response Object

The libwww-perl response object has the class name HTTP::Response. The main attributes of objects of this class are:

  • code is a numerical value that indicates the overall outcome of the request.

  • message is a short, human readable string that corresponds to the code.

  • headers contains additional information about the response and describe the content.

  • content is an arbitrary amount of data.

Since we don’t want to handle all possible code values directly in our programs, a libwww-perl response object has methods that can be used to query what kind of response this is. The most commonly used response classification methods are:

is_success()
The request was successfully received, understood or accepted.

is_error()
The request failed. The server or the resource might not be available, access to the resource might be denied or other things might have failed for some reason.

The User Agent

Let us assume that we have created a request object. What do we actually do with it in order to receive a response?

The answer is that you pass it to a user agent object and this object takes care of all the things that need to be done (like low-level communication and error handling) and returns a response object. The user agent represents your application on the network and provides you with an interface that can accept requests and return responses.

The user agent is an interface layer between your application code and the network. Through this interface you are able to access the various servers on the network.

The class name for the user agent is LWP::UserAgent. Every libwww-perl application that wants to communicate should create at least one object of this class. The main method provided by this object is request(). This method takes an HTTP::Request object as argument and (eventually) returns a HTTP::Response object.

The user agent has many other attributes that let you configure how it will interact with the network and with your application.

  • timeout specifies how much time we give remote servers to respond before the library disconnects and creates an internal timeout response.

  • agent specifies the name that your application uses when it presents itself on the network.

  • from can be set to the e-mail address of the person responsible for running the application. If this is set, then the address will be sent to the servers with every request.

  • parse_head specifies whether we should initialize response headers from the <head> section of HTML documents.

  • proxy and no_proxy specify if and when to go through a proxy server. <http://www.w3.org/History/1994/WWW/Proxies/>

  • credentials provides a way to set up user names and passwords needed to access certain services.

Many applications want even more control over how they interact with the network and they get this by sub-classing LWP::UserAgent. The library includes a sub-class, LWP::RobotUA, for robot applications.

An Example

This example shows how the user agent, a request and a response are represented in actual perl code:

# Create a user agent object use LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->agent(“MyApp/0.1 “); # Create a request my $req = HTTP::Request->new(POST => http://search.cpan.org/search); $req->content_type(application/x-www-form-urlencoded); $req->content(query=libwww-perl&mode=dist); # Pass request to the user agent and get a response back my $res = $ua->request($req); # Check the outcome of the response if ($res->is_success) { print $res->content; } else { print $res->status_line, " “; }

The $ua is created once when the application starts up. New request objects should normally created for each request sent.

NETWORK SUPPORT

This section discusses the various protocol schemes and the HTTP style methods that headers may be used for each.

For all requests, a “User-Agent” header is added and initialized from the $ua->agent attribute before the request is handed to the network layer. In the same way, a “From” header is initialized from the $ua->from attribute.

For all responses, the library adds a header called “Client-Date”. This header holds the time when the response was received by your application. The format and semantics of the header are the same as the server created “Date” header. You may also encounter other “Client-XXX” headers. They are all generated by the library internally and are not received from the servers.

HTTP Requests

HTTP requests are just handed off to an HTTP server and it decides what happens. Few servers implement methods beside the usual “GET”, “HEAD”, “POST” and “PUT”, but CGI-scripts may implement any method they like.

If the server is not available then the library will generate an internal error response.

The library automatically adds a “Host” and a “Content-Length” header to the HTTP request before it is sent over the network.

For a GET request you might want to add an “If-Modified-Since” or “If-None-Match” header to make the request conditional.

For a POST request you should add the “Content-Type” header. When you try to emulate HTML <FORM> handling you should usually let the value of the “Content-Type” header be “application/x-www-form-urlencoded”. See lwpcook for examples of this.

The libwww-perl HTTP implementation currently support the HTTP/1.1 and HTTP/1.0 protocol.

The library allows you to access proxy server through HTTP. This means that you can set up the library to forward all types of request through the HTTP protocol module. See LWP::UserAgent for documentation of this.

HTTPS Requests

HTTPS requests are HTTP requests over an encrypted network connection using the SSL protocol developed by Netscape. Everything about HTTP requests above also apply to HTTPS requests. In addition the library will add the headers “Client-SSL-Cipher”, “Client-SSL-Cert-Subject” and “Client-SSL-Cert-Issuer” to the response. These headers denote the encryption method used and the name of the server owner.

The request can contain the header “If-SSL-Cert-Subject” in order to make the request conditional on the content of the server certificate. If the certificate subject does not match, no request is sent to the server and an internally generated error response is returned. The value of the “If-SSL-Cert-Subject” header is interpreted as a Perl regular expression.

FTP Requests

The library currently supports GET, HEAD and PUT requests. GET retrieves a file or a directory listing from an FTP server. PUT stores a file on a ftp server.

You can specify a ftp account for servers that want this in addition to user name and password. This is specified by including an “Account” header in the request.

User name/password can be specified using basic authorization or be encoded in the URL. Failed logins return an UNAUTHORIZED response with “WWW-Authenticate: Basic” and can be treated like basic authorization for HTTP.

The library supports ftp ASCII transfer mode by specifying the “type=a” parameter in the URL. It also supports transfer of ranges for FTP transfers using the “Range” header.

Directory listings are by default returned unprocessed (as returned from the ftp server) with the content media type reported to be “text/ftp-dir-listing”. The File::Listing module provides methods for parsing of these directory listing.

The ftp module is also able to convert directory listings to HTML and this can be requested via the standard HTTP content negotiation mechanisms (add an “Accept: text/html” header in the request if you want this).

For normal file retrievals, the “Content-Type” is guessed based on the file name suffix. See LWP::MediaTypes.

The “If-Modified-Since” request header works for servers that implement the MDTM command. It will probably not work for directory listings though.

Example:

$req = HTTP::Request->new(GET => ftp://me:[email protected]/); $req->header(Accept => “text/html, */*;q=0.1”);

News Requests

Access to the USENET News system is implemented through the NNTP protocol. The name of the news server is obtained from the NNTP_SERVER environment variable and defaults to “news”. It is not possible to specify the hostname of the NNTP server in news: URLs.

The library supports GET and HEAD to retrieve news articles through the NNTP protocol. You can also post articles to newsgroups by using (surprise!) the POST method.

GET on newsgroups is not implemented yet.

Examples:

$req = HTTP::Request->new(GET => news:[email protected]); $req = HTTP::Request->new(POST => news:comp.lang.perl.test); $req->header(Subject => This is a test, From => [email protected]); $req->content(<<EOT); This is the content of the message that we are sending to the world. EOT

Gopher Request

The library supports the GET and HEAD methods for gopher requests. All request header values are ignored. HEAD cheats and returns a response without even talking to server.

Gopher menus are always converted to HTML.

The response “Content-Type” is generated from the document type encoded (as the first letter) in the request URL path itself.

Example:

$req = HTTP::Request->new(GET => gopher://gopher.sn.no/);

File Request

The library supports GET and HEAD methods for file requests. The “If-Modified-Since” header is supported. All other headers are ignored. The host component of the file URL must be empty or set to “localhost”. Any other host value will be treated as an error.

Directories are always converted to an HTML document. For normal files, the “Content-Type” and “Content-Encoding” in the response are guessed based on the file suffix.

Example:

$req = HTTP::Request->new(GET => file:/etc/passwd);

Mailto Request

You can send (aka “POST”) mail messages using the library. All headers specified for the request are passed on to the mail system. The “To” header is initialized from the mail address in the URL.

Example:

$req = HTTP::Request->new(POST => mailto:[email protected]); $req->header(Subject => “subscribe”); $req->content(“Please subscribe me to the libwww-perl mailing list! “);

CPAN Requests

URLs with scheme cpan: are redirected to a suitable CPAN mirror. If you have your own local mirror of CPAN you might tell LWP to use it for cpan: URLs by an assignment like this:

$LWP::Protocol::cpan::CPAN = “file:/local/CPAN/”;

Suitable CPAN mirrors are also picked up from the configuration for the CPAN.pm, so if you have used that module a suitable mirror should be picked automatically. If neither of these apply, then a redirect to the generic CPAN http location is issued.

Example request to download the newest perl:

$req = HTTP::Request->new(GET => “cpan:src/latest.tar.gz”);

OVERVIEW OF CLASSES AND PACKAGES

This table should give you a quick overview of the classes provided by the library. Indentation shows class inheritance.

LWP::MemberMixin – Access to member variables of Perl5 classes LWP::UserAgent – WWW user agent class LWP::RobotUA – When developing a robot applications LWP::Protocol – Interface to various protocol schemes LWP::Protocol::http – http:// access LWP::Protocol::file – file:// access LWP::Protocol::ftp – ftp:// access … LWP::Authen::Basic – Handle 401 and 407 responses LWP::Authen::Digest HTTP::Headers – MIME/RFC822 style header (used by HTTP::Message) HTTP::Message – HTTP style message HTTP::Request – HTTP request HTTP::Response – HTTP response HTTP::Daemon – A HTTP server class WWW::RobotRules – Parse robots.txt files WWW::RobotRules::AnyDBM_File – Persistent RobotRules Net::HTTP – Low level HTTP client

The following modules provide various functions and definitions.

LWP – This file. Library version number and documentation. LWP::MediaTypes – MIME types configuration (text/html etc.) LWP::Simple – Simplified procedural interface for common functions HTTP::Status – HTTP status code (200 OK etc) HTTP::Date – Date parsing module for HTTP date formats HTTP::Negotiate – HTTP content negotiation calculation File::Listing – Parse directory listings HTML::Form – Processing for <form>s in HTML documents

MORE DOCUMENTATION

All modules contain detailed information on the interfaces they provide. The lwpcook manpage is the libwww-perl cookbook that contain examples of typical usage of the library. You might want to take a look at how the scripts lwp-request, lwp-download, lwp-dump and lwp-mirror are implemented.

ENVIRONMENT

The following environment variables are used by LWP:

HOME
The LWP::MediaTypes functions will look for the .media.types and .mime.types files relative to you home directory.

http_proxy

ftp_proxy

xxx_proxy

no_proxy

These environment variables can be set to enable communication through a proxy server. See the description of the env_proxy method in LWP::UserAgent.

PERL_LWP_ENV_PROXY
If set to a TRUE value, then the LWP::UserAgent will by default call env_proxy during initialization. This makes LWP honor the proxy variables described above.

PERL_LWP_SSL_VERIFY_HOSTNAME
The default verify_hostname setting for LWP::UserAgent. If not set the default will be 1. Set it as 0 to disable hostname verification (the default prior to libwww-perl 5.840.

PERL_LWP_SSL_CA_FILE

PERL_LWP_SSL_CA_PATH

The file and/or directory where the trusted Certificate Authority certificates is located. See LWP::UserAgent for details.

PERL_HTTP_URI_CLASS
Used to decide what URI objects to instantiate. The default is URI. You might want to set it to URI::URL for compatibility with old times.

AUTHORS

LWP was made possible by contributions from Adam Newby, Albert Dvornik, Alexandre Duret-Lutz, Andreas Gustafsson, Andreas König, Andrew Pimlott, Andy Lester, Ben Coleman, Benjamin Low, Ben Low, Ben Tilly, Blair Zajac, Bob Dalgleish, BooK, Brad Hughes, Brian J. Murrell, Brian McCauley, Charles C. Fu, Charles Lane, Chris Nandor, Christian Gilmore, Chris W. Unger, Craig Macdonald, Dale Couch, Dan Kubb, Dave Dunkin, Dave W. Smith, David Coppit, David Dick, David D. Kilzer, Doug MacEachern, Edward Avis, erik, Gary Shea, Gisle Aas, Graham Barr, Gurusamy Sarathy, Hans de Graaff, Harald Joerg, Harry Bochner, Hugo, Ilya Zakharevich, INOUE Yoshinari, Ivan Panchenko, Jack Shirazi, James Tillman, Jan Dubois, Jared Rhine, Jim Stern, Joao Lopes, John Klar, Johnny Lee, Josh Kronengold, Josh Rai, Joshua Chamas, Joshua Hoblitt, Kartik Subbarao, Keiichiro Nagano, Ken Williams, KONISHI Katsuhiro, Lee T Lindley, Liam Quinn, Marc Hedlund, Marc Langheinrich, Mark D. Anderson, Marko Asplund, Mark Stosberg, Markus B Krüger, Markus Laker, Martijn Koster, Martin Thurn, Matthew Eldridge, Matthew.van.Eerde, Matt Sergeant, Michael A. Chase, Michael Quaranta, Michael Thompson, Mike Schilli, Moshe Kaminsky, Nathan Torkington, Nicolai Langfeldt, Norton Allen, Olly Betts, Paul J. Schinder, peterm, Philip Guenther, Daniel Buenzli, Pon Hwa Lin, Radoslaw Zielinski, Radu Greab, Randal L. Schwartz, Richard Chen, Robin Barker, Roy Fielding, Sander van Zoest, Sean M. Burke, shildreth, Slaven Rezic, Steve A Fink, Steve Hay, Steven Butler, Steve_Kilbane, Takanori Ugai, Thomas Lotterer, Tim Bunce, Tom Hughes, Tony Finch, Ville Skyttä, Ward Vandewege, William York, Yale Huang, and Yitzchak Scott-Thoennes.

LWP owes a lot in motivation, design, and code, to the libwww-perl library for Perl4 by Roy Fielding, which included work from Alberto Accomazzi, James Casey, Brooks Cutter, Martijn Koster, Oscar Nierstrasz, Mel Melchner, Gertjan van Oosten, Jared Rhine, Jack Shirazi, Gene Spafford, Marc VanHeyningen, Steven E. Brenner, Marion Hakanson, Waldemar Kebsch, Tony Sanders, and Larry Wall; see the libwww-perl-0.40 library for details.

COPYRIGHT

Copyright 1995-2009, Gisle Aas Copyright 1995, Martijn Koster

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AVAILABILITY

The latest version of this library is likely to be available from CPAN as well as:

http://github.com/libwww-perl/libwww-perl

The best place to discuss this code is on the <[email protected]> mailing list.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2033 - Linux cli command zip_name_locate

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_name_locate and provides detailed information about the command zip_name_locate, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_name_locate.

libzip (-lzip)

The

function returns the index of the file named

in

If

does not contain a file with that name, -1 is returned. The

are specified by

the following values, or 0 for none of them.

Ignore case distinctions. (Will only work well if the file names are ASCII.) With this flag,

will be slow for archives with many files.

Ignore directory part of file name in archive. With this flag,

will be slow for archives with many files.

Compare against the unmodified names as it is in the ZIP archive.

(Default.) Guess the encoding of the name in the ZIP archive and convert it to UTF-8, if necessary, before comparing.

Follow the ZIP specification and expect CP-437 encoded names in the ZIP archive (except if they are explicitly marked as UTF-8). Convert it to UTF-8 before comparing.

ASCII is a subset of both CP-437 and UTF-8.

returns the index of the file named

or -1, if

does not contain an entry of that name.

fails if:

One of the arguments is invalid.

Required memory could not be allocated.

No entry of the name

is found in the archive.

was added in libzip 0.6. In libzip 0.11 the return type was changed from

to

In libzip 0.11 the type of

was changed from

to

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2034 - Linux cli command LWP_UserAgentpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LWP_UserAgentpm and provides detailed information about the command LWP_UserAgentpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LWP_UserAgentpm.

NAME 🖥️ LWP_UserAgentpm 🖥️

Web user agent class

SYNOPSIS

use strict; use warnings; use LWP::UserAgent (); my $ua = LWP::UserAgent->new(timeout => 10); $ua->env_proxy; my $response = $ua->get(http://example.com); if ($response->is_success) { print $response->decoded_content; } else { die $response->status_line; }

Extra layers of security (note the cookie_jar and protocols_allowed):

use strict; use warnings; use HTTP::CookieJar::LWP (); use LWP::UserAgent (); my $jar = HTTP::CookieJar::LWP->new; my $ua = LWP::UserAgent->new( cookie_jar => $jar, protocols_allowed => [http, https], timeout => 10, ); $ua->env_proxy; my $response = $ua->get(http://example.com); if ($response->is_success) { print $response->decoded_content; } else { die $response->status_line; }

DESCRIPTION

The LWP::UserAgent is a class implementing a web user agent. LWP::UserAgent objects can be used to dispatch web requests.

In normal use the application creates an LWP::UserAgent object, and then configures it with values for timeouts, proxies, name, etc. It then creates an instance of HTTP::Request for the request that needs to be performed. This request is then passed to one of the request method the UserAgent, which dispatches it using the relevant protocol, and returns a HTTP::Response object. There are convenience methods for sending the most common request types: “get” in LWP::UserAgent, “head” in LWP::UserAgent, “post” in LWP::UserAgent, “put” in LWP::UserAgent and “delete” in LWP::UserAgent. When using these methods, the creation of the request object is hidden as shown in the synopsis above.

The basic approach of the library is to use HTTP-style communication for all protocol schemes. This means that you will construct HTTP::Request objects and receive HTTP::Response objects even for non-HTTP resources like gopher and ftp. In order to achieve even more similarity to HTTP-style communications, gopher menus and file directories are converted to HTML documents.

CONSTRUCTOR METHODS

The following constructor methods are available:

clone

my $ua2 = $ua->clone;

Returns a copy of the LWP::UserAgent object.

CAVEAT: Please be aware that the clone method does not copy or clone your cookie_jar attribute. Due to the limited restrictions on what can be used for your cookie jar, there is no way to clone the attribute. The cookie_jar attribute will be undef in the new object instance.

new

my $ua = LWP::UserAgent->new( %options )

This method constructs a new LWP::UserAgent object and returns it. Key/value pair arguments may be provided to set up the initial state. The following options correspond to attribute methods described below:

KEY DEFAULT ———– ——————– agent “libwww-perl/#.###” conn_cache undef cookie_jar undef cookie_jar_class HTTP::Cookies default_headers HTTP::Headers->new from undef local_address undef max_redirect 7 max_size undef no_proxy [] parse_head 1 protocols_allowed undef protocols_forbidden undef proxy {} requests_redirectable [GET, HEAD] send_te 1 show_progress undef ssl_opts { verify_hostname => 1 } timeout 180

The following additional options are also accepted: If the env_proxy option is passed in with a true value, then proxy settings are read from environment variables (see “env_proxy” in LWP::UserAgent). If env_proxy isn’t provided, the PERL_LWP_ENV_PROXY environment variable controls if “env_proxy” in LWP::UserAgent is called during initialization. If the keep_alive option value is defined and non-zero, then an LWP::ConnCache is set up (see “conn_cache” in LWP::UserAgent). The keep_alive value is passed on as the total_capacity for the connection cache.

proxy must be set as an arrayref of key/value pairs. no_proxy takes an arrayref of domains.

ATTRIBUTES

The settings of the configuration attributes modify the behaviour of the LWP::UserAgent when it dispatches requests. Most of these can also be initialized by options passed to the constructor method.

The following attribute methods are provided. The attribute value is left unchanged if no argument is given. The return value from each method is the old attribute value.

agent

my $agent = $ua->agent; $ua->agent(Checkbot/0.4 ); # append the default to the end $ua->agent(Mozilla/5.0); $ua->agent(""); # dont identify

Get/set the product token that is used to identify the user agent on the network. The agent value is sent as the User-Agent header in the requests.

The default is a string of the form libwww-perl/#.###, where #.### is substituted with the version number of this library.

If the provided string ends with space, the default libwww-perl/#.### string is appended to it.

The user agent string should be one or more simple product identifiers with an optional version number separated by the / character.

conn_cache

my $cache_obj = $ua->conn_cache; $ua->conn_cache( $cache_obj );

Get/set the LWP::ConnCache object to use. See LWP::ConnCache for details.

my $jar = $ua->cookie_jar; $ua->cookie_jar( $cookie_jar_obj );

Get/set the cookie jar object to use. The only requirement is that the cookie jar object must implement the extract_cookies($response) and add_cookie_header($request) methods. These methods will then be invoked by the user agent as requests are sent and responses are received. Normally this will be a HTTP::Cookies object or some subclass. You are, however, encouraged to use HTTP::CookieJar::LWP instead. See “BEST PRACTICES” for more information.

use HTTP::CookieJar::LWP (); my $jar = HTTP::CookieJar::LWP->new; my $ua = LWP::UserAgent->new( cookie_jar => $jar ); # or after object creation $ua->cookie_jar( $cookie_jar );

The default is to have no cookie jar, i.e. never automatically add Cookie headers to the requests.

If $jar contains an unblessed hash reference, a new cookie jar object is created for you automatically. The object is of the class set with the cookie_jar_class constructor argument, which defaults to HTTP::Cookies.

$ua->cookie_jar({ file => “$ENV{HOME}/.cookies.txt” });

is really just a shortcut for:

require HTTP::Cookies; $ua->cookie_jar(HTTP::Cookies->new(file => “$ENV{HOME}/.cookies.txt”));

As described above and in “BEST PRACTICES”, you should set cookie_jar_class to "HTTP::CookieJar::LWP" to get a safer cookie jar.

my $ua = LWP::UserAgent->new( cookie_jar_class => HTTP::CookieJar::LWP ); $ua->cookie_jar({}); # HTTP::CookieJar::LWP takes no args

These can also be combined into the constructor, so a jar is created at instantiation.

my $ua = LWP::UserAgent->new( cookie_jar_class => HTTP::CookieJar::LWP, cookie_jar => {}, );

credentials

my $creds = $ua->credentials(); $ua->credentials( $netloc, $realm ); $ua->credentials( $netloc, $realm, $uname, $pass ); $ua->credentials(“www.example.com:80”, “Some Realm”, “foo”, “secret”);

Get/set the user name and password to be used for a realm.

The $netloc is a string of the form <host>:<port>. The username and password will only be passed to this server.

default_header

$ua->default_header( $field ); $ua->default_header( $field => $value ); $ua->default_header(Accept-Encoding => scalar HTTP::Message::decodable()); $ua->default_header(Accept-Language => “no, en”);

This is just a shortcut for $ua->default_headers->header( $field => $value ).

default_headers

my $headers = $ua->default_headers; $ua->default_headers( $headers_obj );

Get/set the headers object that will provide default header values for any requests sent. By default this will be an empty HTTP::Headers object.

from

my $from = $ua->from; $ua->from([email protected]);

Get/set the email address for the human user who controls the requesting user agent. The address should be machine-usable, as defined in RFC2822 <https://tools.ietf.org/html/rfc2822>. The from value is sent as the From header in the requests.

The default is to not send a From header. See “default_headers” in LWP::UserAgent for the more general interface that allow any header to be defaulted.

local_address

my $address = $ua->local_address; $ua->local_address( $address );

Get/set the local interface to bind to for network connections. The interface can be specified as a hostname or an IP address. This value is passed as the LocalAddr argument to IO::Socket::INET.

max_redirect

my $max = $ua->max_redirect; $ua->max_redirect( $n );

This reads or sets the object’s limit of how many times it will obey redirection responses in a given request cycle.

By default, the value is 7. This means that if you call “request” in LWP::UserAgent and the response is a redirect elsewhere which is in turn a redirect, and so on seven times, then LWP gives up after that seventh request.

max_size

my $size = $ua->max_size; $ua->max_size( $bytes );

Get/set the size limit for response content. The default is undef, which means that there is no limit. If the returned response content is only partial, because the size limit was exceeded, then a Client-Aborted header will be added to the response. The content might end up longer than max_size as we abort once appending a chunk of data makes the length exceed the limit. The Content-Length header, if present, will indicate the length of the full content and will normally not be the same as length($res->content).

parse_head

my $bool = $ua->parse_head; $ua->parse_head( $boolean );

Get/set a value indicating whether we should initialize response headers from the <head> section of HTML documents. The default is true. Do not turn this off unless you know what you are doing.

protocols_allowed

my $aref = $ua->protocols_allowed; # get allowed protocols $ua->protocols_allowed( \protocols ); # allow ONLY these $ua->protocols_allowed(undef); # delete the list $ua->protocols_allowed([http,]); # ONLY allow http

By default, an object has neither a protocols_allowed list, nor a “protocols_forbidden” in LWP::UserAgent list.

This reads (or sets) this user agent’s list of protocols that the request methods will exclusively allow. The protocol names are case insensitive.

For example: $ua->protocols_allowed( [ http, https] ); means that this user agent will allow only those protocols, and attempts to use this user agent to access URLs with any other schemes (like ftp://...) will result in a 500 error.

Note that having a protocols_allowed list causes any “protocols_forbidden” in LWP::UserAgent list to be ignored.

protocols_forbidden

my $aref = $ua->protocols_forbidden; # get the forbidden list $ua->protocols_forbidden(\protocols); # do not allow these $ua->protocols_forbidden([http,]); # All http reqs get a 500 $ua->protocols_forbidden(undef); # delete the list

This reads (or sets) this user agent’s list of protocols that the request method will not allow. The protocol names are case insensitive.

For example: $ua->protocols_forbidden( [ file, mailto] ); means that this user agent will not allow those protocols, and attempts to use this user agent to access URLs with those schemes will result in a 500 error.

requests_redirectable

my $aref = $ua->requests_redirectable; $ua->requests_redirectable( \requests ); $ua->requests_redirectable([GET, HEAD,]); # the default

This reads or sets the object’s list of request names that “redirect_ok” in LWP::UserAgent will allow redirection for. By default, this is [GET, HEAD], as per RFC 2616 <https://tools.ietf.org/html/rfc2616>. To change to include POST, consider:

push @{ $ua->requests_redirectable }, POST;

send_te

my $bool = $ua->send_te; $ua->send_te( $boolean );

If true, will send a TE header along with the request. The default is true. Set it to false to disable the TE header for systems who can’t handle it.

show_progress

my $bool = $ua->show_progress; $ua->show_progress( $boolean );

Get/set a value indicating whether a progress bar should be displayed on the terminal as requests are processed. The default is false.

ssl_opts

my @keys = $ua->ssl_opts; my $val = $ua->ssl_opts( $key ); $ua->ssl_opts( $key => $value );

Get/set the options for SSL connections. Without argument return the list of options keys currently set. With a single argument return the current value for the given option. With 2 arguments set the option value and return the old. Setting an option to the value undef removes this option.

The options that LWP relates to are:

“verify_hostname” => $bool
When TRUE LWP will for secure protocol schemes ensure it connects to servers that have a valid certificate matching the expected hostname. If FALSE no checks are made and you can’t be sure that you communicate with the expected peer. The no checks behaviour was the default for libwww-perl-5.837 and earlier releases. This option is initialized from the PERL_LWP_SSL_VERIFY_HOSTNAME environment variable. If this environment variable isn’t set; then verify_hostname defaults to 1. Please note that that recently the overall effect of this option with regards to SSL handling has changed. As of version 6.11 of LWP::Protocol::https, which is an external module, SSL certificate verification was harmonized to behave in sync with IO::Socket::SSL. With this change, setting this option no longer disables all SSL certificate verification, only the hostname checks. To disable all verification, use the SSL_verify_mode option in the ssl_opts attribute. For example: $ua-ssl_opts(SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE);>

“SSL_ca_file” => $path
The path to a file containing Certificate Authority certificates. A default setting for this option is provided by checking the environment variables PERL_LWP_SSL_CA_FILE and HTTPS_CA_FILE in order.

“SSL_ca_path” => $path
The path to a directory containing files containing Certificate Authority certificates. A default setting for this option is provided by checking the environment variables PERL_LWP_SSL_CA_PATH and HTTPS_CA_DIR in order.

Other options can be set and are processed directly by the SSL Socket implementation in use. See IO::Socket::SSL or Net::SSL for details.

The libwww-perl core no longer bundles protocol plugins for SSL. You will need to install LWP::Protocol::https separately to enable support for processing https-URLs.

timeout

my $secs = $ua->timeout; $ua->timeout( $secs );

Get/set the timeout value in seconds. The default value is 180 seconds, i.e. 3 minutes.

The request is aborted if no activity on the connection to the server is observed for timeout seconds. This means that the time it takes for the complete transaction and the “request” in LWP::UserAgent method to actually return might be longer.

When a request times out, a response object is still returned. The response will have a standard HTTP Status Code (500). This response will have the “Client-Warning” header set to the value of “Internal response”. See the “get” in LWP::UserAgent method description below for further details.

PROXY ATTRIBUTES

The following methods set up when requests should be passed via a proxy server.

env_proxy

$ua->env_proxy;

Load proxy settings from *_proxy environment variables. You might specify proxies like this (sh-syntax):

gopher_proxy=http://proxy.my.place/ wais_proxy=http://proxy.my.place/ no_proxy=“localhost,example.com” export gopher_proxy wais_proxy no_proxy

csh or tcsh users should use the setenv command to define these environment variables.

On systems with case insensitive environment variables there exists a name clash between the CGI environment variables and the HTTP_PROXY environment variable normally picked up by env_proxy. Because of this HTTP_PROXY is not honored for CGI scripts. The CGI_HTTP_PROXY environment variable can be used instead.

no_proxy

$ua->no_proxy( @domains ); $ua->no_proxy(localhost, example.com); $ua->no_proxy(); # clear the list

Do not proxy requests to the given domains, including subdomains. Calling no_proxy without any domains clears the list of domains.

proxy

$ua->proxy(\schemes, $proxy_url) $ua->proxy([http, ftp], http://proxy.sn.no:8001/); # For a single scheme: $ua->proxy($scheme, $proxy_url) $ua->proxy(gopher, http://proxy.sn.no:8001/); # To set multiple proxies at once: $ua->proxy([ ftp => http://ftp.example.com:8001/, [ http, https ] => http://http.example.com:8001/, ]);

Set/retrieve proxy URL for a scheme.

The first form specifies that the URL is to be used as a proxy for access methods listed in the list in the first method argument, i.e. http and ftp.

The second form shows a shorthand form for specifying proxy URL for a single access scheme.

The third form demonstrates setting multiple proxies at once. This is also the only form accepted by the constructor.

HANDLERS

Handlers are code that injected at various phases during the processing of requests. The following methods are provided to manage the active handlers:

add_handler

$ua->add_handler( $phase => \cb, %matchspec )

Add handler to be invoked in the given processing phase. For how to specify %matchspec see “Matching” in HTTP::Config.

The possible values $phase and the corresponding callback signatures are as follows. Note that the handlers are documented in the order in which they will be run, which is:

request_preprepare request_prepare request_send response_header response_data response_done response_redirect

request_preprepare => sub { my($request, $ua, $handler) = @_; … }
The handler is called before the request_prepare and other standard initialization of the request. This can be used to set up headers and attributes that the request_prepare handler depends on. Proxy initialization should take place here; but in general don’t register handlers for this phase.

request_prepare => sub { my($request, $ua, $handler) = @_; … }
The handler is called before the request is sent and can modify the request any way it see fit. This can for instance be used to add certain headers to specific requests. The method can assign a new request object to $_[0] to replace the request that is sent fully. The return value from the callback is ignored. If an exception is raised it will abort the request and make the request method return a “400 Bad request” response.

request_send => sub { my($request, $ua, $handler) = @_; … }
This handler gets a chance of handling requests before they’re sent to the protocol handlers. It should return an HTTP::Response object if it wishes to terminate the processing; otherwise it should return nothing. The response_header and response_data handlers will not be invoked for this response, but the response_done will be.

response_header => sub { my($response, $ua, $handler) = @_; … }
This handler is called right after the response headers have been received, but before any content data. The handler might set up handlers for data and might croak to abort the request. The handler might set the $response->{default_add_content} value to control if any received data should be added to the response object directly. This will initially be false if the $ua->request() method was called with a $content_file or $content_cb argument; otherwise true.

response_data => sub { my($response, $ua, $handler, $data) = @_; … }
This handler is called for each chunk of data received for the response. The handler might croak to abort the request. This handler needs to return a TRUE value to be called again for subsequent chunks for the same request.

response_done => sub { my($response, $ua, $handler) = @_; … }
The handler is called after the response has been fully received, but before any redirect handling is attempted. The handler can be used to extract information or modify the response.

response_redirect => sub { my($response, $ua, $handler) = @_; … }
The handler is called in $ua->request after response_done. If the handler returns an HTTP::Request object we’ll start over with processing this request instead.

For all of these, $handler is a code reference to the handler that is currently being run.

get_my_handler

$ua->get_my_handler( $phase, %matchspec ); $ua->get_my_handler( $phase, %matchspec, $init );

Will retrieve the matching handler as hash ref.

If $init is passed as a true value, create and add the handler if it’s not found. If $init is a subroutine reference, then it’s called with the created handler hash as argument. This sub might populate the hash with extra fields; especially the callback. If $init is a hash reference, merge the hashes.

handlers

$ua->handlers( $phase, $request ) $ua->handlers( $phase, $response )

Returns the handlers that apply to the given request or response at the given processing phase.

remove_handler

$ua->remove_handler( undef, %matchspec ); $ua->remove_handler( $phase, %matchspec ); $ua->remove_handler(); # REMOVE ALL HANDLERS IN ALL PHASES

Remove handlers that match the given %matchspec. If $phase is not provided, remove handlers from all phases.

Be careful as calling this function with %matchspec that is not specific enough can remove handlers not owned by you. It’s probably better to use the “set_my_handler” in LWP::UserAgent method instead.

The removed handlers are returned.

set_my_handler

$ua->set_my_handler( $phase, $cb, %matchspec ); $ua->set_my_handler($phase, undef); # remove handler for phase

Set handlers private to the executing subroutine. Works by defaulting an owner field to the %matchspec that holds the name of the called subroutine. You might pass an explicit owner to override this.

If $cb is passed as undef, remove the handler.

REQUEST METHODS

The methods described in this section are used to dispatch requests via the user agent. The following request methods are provided:

delete

my $res = $ua->delete( $url ); my $res = $ua->delete( $url, $field_name => $value, … );

This method will dispatch a DELETE request on the given URL. Additional headers and content options are the same as for the “get” in LWP::UserAgent method.

This method will use the DELETE() function from HTTP::Request::Common to build the request. See HTTP::Request::Common for a details on how to pass form content and other advanced features.

get

my $res = $ua->get( $url ); my $res = $ua->get( $url , $field_name => $value, … );

This method will dispatch a GET request on the given URL. Further arguments can be given to initialize the headers of the request. These are given as separate name/value pairs. The return value is a response object. See HTTP::Response for a description of the interface it provides.

There will still be a response object returned when LWP can’t connect to the server specified in the URL or when other failures in protocol handlers occur. These internal responses use the standard HTTP status codes, so the responses can’t be differentiated by testing the response status code alone. Error responses that LWP generates internally will have the “Client-Warning” header set to the value “Internal response”. If you need to differentiate these internal responses from responses that a remote server actually generates, you need to test this header value.

Fields names that start with “:” are special. These will not initialize headers of the request but will determine how the response content is treated. The following special field names are recognized:

:content_file => $filename # or $filehandle :content_cb => \callback :read_size_hint => $bytes

If a $filename or $filehandle is provided with the :content_file option, then the response content will be saved here instead of in the response object. The $filehandle may also be an object with an open file descriptor, such as a File::Temp object. If a callback is provided with the :content_cb option then this function will be called for each chunk of the response content as it is received from the server. If neither of these options are given, then the response content will accumulate in the response object itself. This might not be suitable for very large response bodies. Only one of :content_file or :content_cb can be specified. The content of unsuccessful responses will always accumulate in the response object itself, regardless of the :content_file or :content_cb options passed in. Note that errors writing to the content file (for example due to permission denied or the filesystem being full) will be reported via the Client-Aborted or X-Died response headers, and not the is_success method.

The :read_size_hint option is passed to the protocol module which will try to read data from the server in chunks of this size. A smaller value for the :read_size_hint will result in a higher number of callback invocations.

The callback function is called with 3 arguments: a chunk of data, a reference to the response object, and a reference to the protocol object. The callback can abort the request by invoking die(). The exception message will show up as the “X-Died” header field in the response returned by the $ua->get() method.

my $res = $ua->head( $url ); my $res = $ua->head( $url , $field_name => $value, … );

This method will dispatch a HEAD request on the given URL. Otherwise it works like the “get” in LWP::UserAgent method described above.

is_protocol_supported

my $bool = $ua->is_protocol_supported( $scheme );

You can use this method to test whether this user agent object supports the specified scheme. (The scheme might be a string (like http or ftp) or it might be an URI object reference.)

Whether a scheme is supported is determined by the user agent’s protocols_allowed or protocols_forbidden lists (if any), and by the capabilities of LWP. I.e., this will return true only if LWP supports this protocol and it’s permitted for this particular object.

is_online

my $bool = $ua->is_online;

Tries to determine if you have access to the Internet. Returns 1 (true) if the built-in heuristics determine that the user agent is able to access the Internet (over HTTP) or 0 (false).

See also LWP::Online.

mirror

my $res = $ua->mirror( $url, $filename );

This method will get the document identified by URL and store it in file called $filename. If the file already exists, then the request will contain an If-Modified-Since header matching the modification time of the file. If the document on the server has not changed since this time, then nothing happens. If the document has been updated, it will be downloaded again. The modification time of the file will be forced to match that of the server.

Uses “move” in File::Copy to attempt to atomically replace the $filename.

The return value is an HTTP::Response object.

patch

# Any version of HTTP::Message works with this form: my $res = $ua->patch( $url, $field_name => $value, Content => $content ); # Using hash or array references requires HTTP::Message >= 6.12 use HTTP::Request 6.12; my $res = $ua->patch( $url, \form ); my $res = $ua->patch( $url, \form ); my $res = $ua->patch( $url, \form, $field_name => $value, … ); my $res = $ua->patch( $url, $field_name => $value, Content => \form ); my $res = $ua->patch( $url, $field_name => $value, Content => \form );

This method will dispatch a PATCH request on the given URL, with %form or @form providing the key/value pairs for the fill-in form content. Additional headers and content options are the same as for the “get” in LWP::UserAgent method.

CAVEAT:

This method can only accept content that is in key-value pairs when using HTTP::Request::Common prior to version 6.12. Any use of hash or array references will result in an error prior to version 6.12.

This method will use the PATCH function from HTTP::Request::Common to build the request. See HTTP::Request::Common for a details on how to pass form content and other advanced features.

post

my $res = $ua->post( $url, \form ); my $res = $ua->post( $url, \form ); my $res = $ua->post( $url, \form, $field_name => $value, … ); my $res = $ua->post( $url, $field_name => $value, Content => \form ); my $res = $ua->post( $url, $field_name => $value, Content => \form ); my $res = $ua->post( $url, $field_name => $value, Content => $content );

This method will dispatch a POST request on the given URL, with %form or @form providing the key/value pairs for the fill-in form content. Additional headers and content options are the same as for the “get” in LWP::UserAgent method.

This method will use the POST function from HTTP::Request::Common to build the request. See HTTP::Request::Common for a details on how to pass form content and other advanced features.

put

# Any version of HTTP::Message works with this form: my $res = $ua->put( $url, $field_name => $value, Content => $content ); # Using hash or array references requires HTTP::Message >= 6.07 use HTTP::Request 6.07; my $res = $ua->put( $url, \form ); my $res = $ua->put( $url, \form ); my $res = $ua->put( $url, \form, $field_name => $value, … ); my $res = $ua->put( $url, $field_name => $value, Content => \form ); my $res = $ua->put( $url, $field_name => $value, Content => \form );

This method will dispatch a PUT request on the given URL, with %form or @form providing the key/value pairs for the fill-in form content. Additional headers and content options are the same as for the “get” in LWP::UserAgent method.

CAVEAT:

This method can only accept content that is in key-value pairs when using HTTP::Request::Common prior to version 6.07. Any use of hash or array references will result in an error prior to version 6.07.

This method will use the PUT function from HTTP::Request::Common to build the request. See HTTP::Request::Common for a details on how to pass form content and other advanced features.

request

my $res = $ua->request( $request ); my $res = $ua->request( $request, $content_file ); my $res = $ua->request( $request, $content_cb ); my $res = $ua->request( $request, $content_cb, $read_size_hint );

This method will dispatch the given $request object. Normally this will be an instance of the HTTP::Request class, but any object with a similar interface will do. The return value is an HTTP::Response object.

The request method will process redirects and authentication responses transparently. This means that it may actually send several simple requests via the “simple_request” in LWP::UserAgent method described below.

The request methods described above; “get” in LWP::UserAgent, “head” in LWP::UserAgent, “post” in LWP::UserAgent and “mirror” in LWP::UserAgent will all dispatch the request they build via this method. They are convenience methods that simply hide the creation of the request object for you.

The $content_file, $content_cb and $read_size_hint all correspond to options described with the “get” in LWP::UserAgent method above. Note that errors writing to the content file (for example due to permission denied or the filesystem being full) will be reported via the Client-Aborted or X-Died response headers, and not the is_success method.

You are allowed to use a CODE reference as content in the request object passed in. The content function should return the content when called. The content can be returned in chunks. The content function will be invoked repeatedly until it return an empty string to signal that there is no more content.

simple_request

my $request = HTTP::Request->new( … ); my $res = $ua->simple_request( $request ); my $res = $ua->simple_request( $request, $content_file ); my $res = $ua->simple_request( $request, $content_cb ); my $res = $ua->simple_request( $request, $content_cb, $read_size_hint );

This method dispatches a single request and returns the response received. Arguments are the same as for the “request” in LWP::UserAgent described above.

The difference from “request” in LWP::UserAgent is that simple_request will not try to handle redirects or authentication responses. The “request” in LWP::UserAgent method will, in fact, invoke this method for each simple request it sends.

CALLBACK METHODS

The following methods will be invoked as requests are processed. These methods are documented here because subclasses of LWP::UserAgent might want to override their behaviour.

get_basic_credentials

# This checks wantarray and can either return an array: my ($user, $pass) = $ua->get_basic_credentials( $realm, $uri, $isproxy ); # or a string that looks like “user:pass” my $creds = $ua->get_basic_credentials($realm, $uri, $isproxy);

This is called by “request” in LWP::UserAgent to retrieve credentials for documents protected by Basic or Digest Authentication. The arguments passed in is the $realm provided by the server, the $uri requested and a boolean flag to indicate if this is authentication against a proxy server.

The method should return a username and password. It should return an empty list to abort the authentication resolution attempt. Subclasses can override this method to prompt the user for the information. An example of this can be found in lwp-request program distributed with this library.

The base implementation simply checks a set of pre-stored member variables, set up with the “credentials” in LWP::UserAgent method.

prepare_request

$request = $ua->prepare_request( $request );

This method is invoked by “simple_request” in LWP::UserAgent. Its task is to modify the given $request object by setting up various headers based on the attributes of the user agent. The return value should normally be the $request object passed in. If a different request object is returned it will be the one actually processed.

The headers affected by the base implementation are; User-Agent, From, Range and Cookie.

progress

my $prog = $ua->progress( $status, $request_or_response );

This is called frequently as the response is received regardless of how the content is processed. The method is called with $status “begin” at the start of processing the request and with $state “end” before the request method returns. In between these $status will be the fraction of the response currently received or the string “tick” if the fraction can’t be calculated.

When $status is “begin” the second argument is the HTTP::Request object, otherwise it is the HTTP::Response object.

redirect_ok

my $bool = $ua->redirect_ok( $prospective_request, $response );

This method is called by “request” in LWP::UserAgent before it tries to follow a redirection to the request in $response. This should return a true value if this redirection is permissible. The $prospective_request will be the request to be sent if this method returns true.

The base implementation will return false unless the method is in the object’s requests_redirectable list, false if the proposed redirection is to a file://... URL, and true otherwise.

BEST PRACTICES

The default settings can get you up and running quickly, but there are settings you can change in order to make your life easier.

Handling Cookies

You are encouraged to install Mozilla::PublicSuffix and use HTTP::CookieJar::LWP as your cookie jar. HTTP::CookieJar::LWP provides a better security model matching that of current Web browsers when Mozilla::PublicSuffix is installed.

use HTTP::CookieJar::LWP (); my $jar = HTTP::CookieJar::LWP->new; my $ua = LWP::UserAgent->new( cookie_jar => $jar );

See “cookie_jar” for more information.

Managing Protocols

protocols_allowed gives you the ability to allow arbitrary protocols.

my $ua = LWP::UserAgent->new( protocols_allowed => [ http, https ] );

This will prevent you from inadvertently following URLs like file:///etc/passwd. See “protocols_allowed”.

protocols_forbidden gives you the ability to deny arbitrary protocols.

my $ua = LWP::UserAgent->new( protocols_forbidden => [ file, mailto, ssh, ] );

This can also prevent you from inadvertently following URLs like file:///etc/passwd. See “protocols_forbidden”.

SEE ALSO

See LWP for a complete overview of libwww-perl5. See lwpcook and the scripts lwp-request and lwp-download for examples of usage.

See HTTP::Request and HTTP::Response for a description of the message objects dispatched and received. See HTTP::Request::Common and HTML::Form for other ways to build request objects.

See WWW::Mechanize and WWW::Search for examples of more specialized user agents based on LWP::UserAgent.

COPYRIGHT AND LICENSE

Copyright 1995-2009 Gisle Aas.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2035 - Linux cli command pcap_lib_versionpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_lib_versionpcap and provides detailed information about the command pcap_lib_versionpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_lib_versionpcap.

NAME 🖥️ pcap_lib_versionpcap 🖥️

get the version information for libpcap

SYNOPSIS

#include <pcap/pcap.h>
const char *pcap_lib_version(void);

DESCRIPTION

pcap_lib_version() returns a pointer to a string giving information about the version of the libpcap library being used; note that it contains more information than just a version number.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2036 - Linux cli command XtAddTimeOut

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAddTimeOut and provides detailed information about the command XtAddTimeOut, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAddTimeOut.

NAME 🖥️ XtAddTimeOut 🖥️

register input, timeout, and workprocs

SYNTAX

#include <X11/Intrinsic.h>

XtInputId XtAddInput(int source, XtPointer condition, XtInputCallbackProc proc, XtPointer client_data);

XtIntervalId XtAddTimeOut(unsigned long interval, XtTimerCallbackProc proc, XtPointer client_data);

XtWorkProcId XtAddWorkProc(XtWorkProc proc, XtPointer client_data);

ARGUMENTS

client_data
Specifies the argument that is to be passed to the specified procedure when input is available

condition
Specifies the mask that indicates a read, write, or exception condition or some operating system dependent condition.

proc
Specifies the procedure that is to be called when input is available.

source
Specifies the source file descriptor on a UNIX-based system or other operating system dependent device specification.

DESCRIPTION

XtAddInput has been replaced by XtAppAddInput.

XtAddTimeOut has been replaced by XtAppAddTimeOut.

XtAddWorkProc has been replaced by XtAppAddWorkProc.

SEE ALSO

XtAppAddInput(3), XtAppAddTimeOut(3), XtAppAddWorkProc(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2037 - Linux cli command jrand48_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command jrand48_r and provides detailed information about the command jrand48_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the jrand48_r.

NAME 🖥️ jrand48_r 🖥️

generate uniformly distributed pseudo-random numbers reentrantly

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int drand48_r(struct drand48_data *restrict buffer,
 double *restrict result);
int erand48_r(unsigned short xsubi[3],
 struct drand48_data *restrict buffer,
 double *restrict result);
int lrand48_r(struct drand48_data *restrict buffer,
 long *restrict result);
int nrand48_r(unsigned short xsubi[3],
 struct drand48_data *restrict buffer,
 long *restrict result);
int mrand48_r(struct drand48_data *restrict buffer,
 long *restrict result);
int jrand48_r(unsigned short xsubi[3],
 struct drand48_data *restrict buffer,
 long *restrict result);
int srand48_r(long int seedval, struct drand48_data *buffer);
int seed48_r(unsigned short seed16v[3], struct drand48_data *buffer);
int lcong48_r(unsigned short param[7], struct drand48_data *buffer);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

These functions are the reentrant analogs of the functions described in drand48(3). Instead of modifying the global random generator state, they use the supplied data buffer.

Before the first use, this struct must be initialized, for example, by filling it with zeros, or by calling one of the functions srand48_r(), seed48_r(), or lcong48_r().

RETURN VALUE

The return value is 0.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

drand48_r(), erand48_r(), lrand48_r(), nrand48_r(), mrand48_r(), jrand48_r(), srand48_r(), seed48_r(), lcong48_r()

Thread safetyMT-Safe race:buffer

STANDARDS

GNU.

SEE ALSO

drand48(3), rand(3), random(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2038 - Linux cli command getservbyport

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getservbyport and provides detailed information about the command getservbyport, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getservbyport.

NAME 🖥️ getservbyport 🖥️

get service entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
struct servent *getservent(void);
struct servent *getservbyname(const char *name, const char *proto);
struct servent *getservbyport(int port, const char *proto);
void setservent(int stayopen);
void endservent(void);

DESCRIPTION

The getservent() function reads the next entry from the services database (see services(5)) and returns a servent structure containing the broken-out fields from the entry. A connection is opened to the database if necessary.

The getservbyname() function returns a servent structure for the entry from the database that matches the service name using protocol proto. If proto is NULL, any protocol will be matched. A connection is opened to the database if necessary.

The getservbyport() function returns a servent structure for the entry from the database that matches the port port (given in network byte order) using protocol proto. If proto is NULL, any protocol will be matched. A connection is opened to the database if necessary.

The setservent() function opens a connection to the database, and sets the next entry to the first entry. If stayopen is nonzero, then the connection to the database will not be closed between calls to one of the getserv*() functions.

The endservent() function closes the connection to the database.

The servent structure is defined in <netdb.h> as follows:

struct servent {
    char  *s_name;       /* official service name */
    char **s_aliases;    /* alias list */
    int    s_port;       /* port number */
    char  *s_proto;      /* protocol to use */
}

The members of the servent structure are:

s_name
The official name of the service.

s_aliases
A NULL-terminated list of alternative names for the service.

s_port
The port number for the service given in network byte order.

s_proto
The name of the protocol to use with this service.

RETURN VALUE

The getservent(), getservbyname(), and getservbyport() functions return a pointer to a statically allocated servent structure, or NULL if an error occurs or the end of the file is reached.

FILES

/etc/services
services database file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getservent()

Thread safety

MT-Unsafe race:servent race:serventbuf locale

getservbyname()

Thread safety

MT-Unsafe race:servbyname locale

getservbyport()

Thread safety

MT-Unsafe race:servbyport locale

setservent(), endservent()

Thread safety

MT-Unsafe race:servent locale

In the above table, servent in race:servent signifies that if any of the functions setservent(), getservent(), or endservent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, 4.3BSD.

SEE ALSO

getnetent(3), getprotoent(3), getservent_r(3), services(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2039 - Linux cli command Moose_Manual_Resourcespm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Manual_Resourcespm and provides detailed information about the command Moose_Manual_Resourcespm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Manual_Resourcespm.

NAME 🖥️ Moose_Manual_Resourcespm 🖥️

Links to various tutorials, videos, blogs, presentations, interviews, etc…

VERSION

version 2.2207

Resources

This section is an attempt to collect and list some of the many Moose resources that can be found online. Additional information can be found at http://moose.perl.org/

Videos

  • A new object system for the Perl 5 core, Stevan Little <https://www.youtube.com/watch?v=Gf0O6Ct7V1s>

  • Stevan Little interviewed by Gabor Szabo for PerlMaven.com <https://www.youtube.com/watch?v=shu-bVimOpM>

  • Perl 6 OO vs. Moose, Herbert Breunung <https://www.youtube.com/watch?v=Boh3109HVLo>

  • Introduction To Moose, Mike Whitaker <https://www.youtube.com/watch?v=YVtqa6zWXqY>

  • “Dr. Strange… Moose or: How I Learned to Stop Worrying and Love Perl” <https://www.youtube.com/watch?v=PNFiIU8S-7g>

  • Evolving Software with Moose, Dave Cross <https://www.youtube.com/watch?v=BIMREkoPYKA>

  • Testing with Test::Class::Moose, Curtis Poe <https://www.youtube.com/watch?v=kUHI1iRrfF4>

  • “Moose is Perl” tutorial, OSCON 2014, Ricardo Signes <https://www.youtube.com/watch?v=LKXvG6VKew4>

Slide Shows

  • Use Moose to create abstractions in the domain, Shawn M. Moore (sartak) <https://speakerdeck.com/sartak/lifting-moose>

Articles

  • Perl.org Moose Whitepaper <https://www.perl.org/about/whitepapers/perl-object-oriented.html>

  • PerlMaven.com <http://perlmaven.com/moose>

  • Getting Started with Moose, brian d foy http://www.theperlreview.com/articles/moose.html

  • Wikipedia.org <http://en.wikipedia.org/wiki/Moose_(Perl)>

  • Moose: A postmodern object system for Perl 5 <http://perltraining.com.au/tips/2010-01-27.html>

  • Roles and Delegates and Refactoring <http://blog.woobling.org/2009/10/roles-and-delegates-and-refactoring.html>

Older Resources

Articles

2011

  • Dave Rolsky reviews Perl Best Practices, Chapter 15, Objects 7 years later <http://blog.urth.org/2011/03/reviewing-perl-best-practices-chapter-15-objects.html>

  • Mark A. Stratman discusses subclassing non-Moose classes <http://blogs.perl.org/users/mark_a_stratman/2011/03/subclassing-tricky-non-moose-classes-constructor-problems.html>

  • Mark A. Stratman shows how to use delegation to work with non-Moose classes <http://blogs.perl.org/users/mark_a_stratman/2011/03/subclassing-tricky-non-moose-classes-dont-do-it.html>

  • The WebGUI folks talk about version 8.0 (which uses Moose) <http://blogs.perl.org/users/preaction/2011/01/whats-new-in-webgui-80-1—psgiplack.html>

  • chromatic discusses Parameterized roles with Moose <http://www.modernperlbooks.com/mt/2011/01/the-parametric-role-of-my-mvc-plugin-system.html>

2010

  • Chris Prather discusses Moose and the Modern Perl movement <http://chris.prather.org/been-there-done-that.md.html>

  • Devin Austin talks about MooseX::App::Cmd <http://www.catalyzed.org/2010/04/moosexappcmd-and-your-command-line-apps.html>

  • JT Smith declares The Second Age of Perl <http://blogs.perl.org/users/jt_smith/2010/04/the-second-age-of-perl.html>

  • JT Smith talks about Lacuna Expanse (which uses Moose) <http://blogs.perl.org/users/jt_smith/2010/10/why-the-lacuna-expanse-is-good-for-perl.html>

  • Moose 1.00 is Released <http://stevan-little.blogspot.com/2010/03/moose-100-is-released.html>

  • Moritz Lenz asks What is “Modern Perl”? <http://perlgeek.de/blog-en/perl-tips/what-is-modern-perl.html>

  • Yuval Kogman declares “Moose has won”. <http://blog.woobling.org/2010/09/moose-has-won.html>

  • chromatic discusses how Moose helps you write more correct code <http://www.modernperlbooks.com/mt/2010/01/subtle-encouragement-toward-correctness.html>

  • chromatic discusses the Moose deprecation policy <http://www.modernperlbooks.com/mt/2010/09/the-right-approach-to-deprecation.html>

  • chromatic talks about Class::MOP in relation to his Modern Perl book <http://www.modernperlbooks.com/mt/2010/03/ill-get-the-mop.html>

  • chromatic talks about Encapsulation and Moose <http://www.modernperlbooks.com/mt/2010/09/what-you-can-and-cannot-teach-about-encapsulation.html>

2009

  • Bruno Vecchi praises Moose for making his protein analysis code easier <http://zerothorder.blogspot.com/2009/04/chopping-proteins-with-moose.html>

  • Chris Prather compares MooseX::Declare to Simula 67 <http://chris.prather.org/a-little-bit-of-history.md.html>

  • Chris Prather rationalizes Moose’s “post modern” label <http://chris.prather.org/why-moose-is-post-modern.html>

  • Dave Rolsky’s post-mortem on his Moose documentation grant <http://blog.urth.org/2009/04/moose-docs-grant-wrap-up.html>

  • David McLaughlin experiments with extending Moose for MooseX::ChainedAccessors <http://www.dmclaughlin.com/2009/05/15/chained-accessors-in-moose/>

  • Sam Crawley summarizes his experience with roles <http://samcrawley.wordpress.com/2009/05/03/getting-the-hang-of-moose-roles/>

  • Shawn M Moore discusses Perl::Critic for Moose and linting with the MOP <http://blog.sartak.org/2009/05/perl-critic-dynamic-moose.html>

  • Shlomi Fish discovers a better way to Moose <http://community.livejournal.com/shlomif_tech/38407.html>

  • Stevan Little explains why you should make your Moose classes immutable <http://stevan-little.blogspot.com/2009/06/why-makeimmutable-is-recommended-for_13.html>

  • Tomas Doran interview about the new Moose-based Catalyst <http://www.catalyzed.org/2009/04/catalyst-58-released.html>

  • chromatic contrasts roles and duck-typing <http://www.modernperlbooks.com/mt/2009/05/perl-roles-versus-duck-typing.html>

  • chromatic contrasts roles and inheritance <http://www.modernperlbooks.com/mt/2009/05/perl-roles-versus-inheritance.html>

  • chromatic on The Why of Perl Roles <http://www.modernperlbooks.com/mt/2009/04/the-why-of-perl-roles.html>

2008

  • Barry Walsh does an excellent comparison of Moose and Ruby (specifically the Doodle module) <http://draegtun.wordpress.com/2008/03/12/doodling-with-moose-part-1/>

  • Tim Bunce’s excellent Perl Myths talk gives a shout out to Moose <http://www.slideshare.net/Tim.Bunce/perl-myths-200802-with-notes/>

  • chromatic suggests Moose and Mouse in his Beginners Introduction to Object-Oriented Programming with Perl article <http://broadcast.oreilly.com/2008/11/beginners-introduction-to-obje.html>

2007

  • Larry mentioned Moose in 2007’s State of the Onion speech <http://www.perl.com/pub/a/2007/12/06/soto-11.html?page=3>

  • Max Kanat-Alexander (of Bugzilla fame) has some nice things to say about Moose <http://avatraxiom.livejournal.com/70947.html>

2006

  • Class::MOP Review (OnLAMP) <http://www.oreillynet.com/onlamp/blog/2006/06/cpan_module_review_classmop.html>

Presentations

Perl Mongers Groups

  • Doug Treder’s Moose talk at Seattle Perl Users Group <http://www.slideshare.net/dtreder/moose-527243>

  • Hans Dieter Pearcey’s Meta-Moose at PDX.pm <http://www.weftsoar.net/~hdp/talk/meta-moose/slides/start.html>

  • Piers Cawley’s MooseX::Declare talk at London.pm (video) <http://www.bofh.org.uk/2009/05/13/london-pm-presentation>

  • Robert Boone’s Moose talk at Houston.pm <http://houston.pm.org/talks/2007talks/0704Talk/slides/start.html>

  • hakobe’s Moose presentation at Kansai.pm <http://www.slideshare.net/hakobe/moose>

2011

  • SawyerX’s FOSDEM 2011 Moose talk <http://www.slideshare.net/xSawyer/moose-talk-at-fosdem-2011-perl-devroom>

2010

  • Drew Stephens gives a lighting talk on Moose at SHDH 36 <http://www.slideshare.net/dinomite/learning-moose-lightning>

  • Jesse Luehrs’s “Extending Moose” talk at YAPC::NA 2010 <http://tozt.net/talks/extending_moose_yapc_na_2010/>

  • Shawn Moore’s “Non-hierarchical osdc.tw <http://sartak.org/talks/osdc.tw-2010/nonhierarchical-oop/nonhierarchical-oop.pdf>

  • Ynon Perek’s Perl Object Oriented Programming slides <http://prezi.com/fgdoyw0smyqo/perl-object-oriented-programming/>

2009

  • Dave Rolsky’s Introduction to Moose master class at YAPC::NA 2009 (delivered by Shawn Moore and Jonathan Rockway) <http://yapc10.org/yn2009/talk/2047>

  • Devin Austin’s Intro to Moose at YAPC::NA 2009 <http://yapc10.org/yn2009/talk/1967>

  • Hans Dieter Pearcey’s Code Reuse with Moose at YAPC::NA 2009 <http://yapc10.org/yn2009/talk/1984>

  • Mike Whitaker’s Intro to Moose at Italian Perl Workshop <http://www.slideshare.net/Penfold/introduction-to-moose-2437037>

  • Mike Whitaker’s Introduction to Moose at the Italian Perl Workshop <http://conferences.yapceurope.org/ipw2009/talk/2371>

  • Shawn M Moore’s Intro to Moose at Frozen Perl <http://sartak.org/talks/frozen-perl-2009/moose/>

  • Shawn Moore’s Extending Moose for Applications at YAPC::NA 2009 <http://sartak.org/talks/yapc-na-2009/extending-moose/extending-moose.pdf>

  • Shawn Moore’s Moose master class at YAPC::Asia 2009 <http://conferences.yapcasia.org/ya2009/talk/2192>

  • Yuval Kogman’s Why Moose at the Nordic Perl Workshop <http://www.perlworkshop.no/npw2009/talk/1901>

2008

  • Mike Whitaker’s Intro to Moose at the London Perl Workshop <http://yapc.tv/2008/lpw/mike-whitaker-intro-moose/>

2006

  • Sam Vilain gives the very first Moose talk at YAPC::EU <http://www.yapceurope.org/2006/talk/item/63.html>

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2040 - Linux cli command offsetof

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command offsetof and provides detailed information about the command offsetof, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the offsetof.

NAME 🖥️ offsetof 🖥️

offset of a structure member

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stddef.h>
size_t offsetof(type, member);

DESCRIPTION

The macro offsetof() returns the offset of the field member from the start of the structure type.

This macro is useful because the sizes of the fields that compose a structure can vary across implementations, and compilers may insert different numbers of padding bytes between fields. Consequently, an element’s offset is not necessarily given by the sum of the sizes of the previous elements.

A compiler error will result if member is not aligned to a byte boundary (i.e., it is a bit field).

RETURN VALUE

offsetof() returns the offset of the given member within the given type, in units of bytes.

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89.

EXAMPLES

On a Linux/i386 system, when compiled using the default gcc(1) options, the program below produces the following output:

$ ./a.out
offsets: i=0; c=4; d=8 a=16
sizeof(struct s)=16

Program source

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    struct s {
        int i;
        char c;
        double d;
        char a[];
    };
    /* Output is compiler dependent */
    printf("offsets: i=%zu; c=%zu; d=%zu a=%zu

“, offsetof(struct s, i), offsetof(struct s, c), offsetof(struct s, d), offsetof(struct s, a)); printf(“sizeof(struct s)=%zu “, sizeof(struct s)); exit(EXIT_SUCCESS); }

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2041 - Linux cli command Image_ExifTool_7Zpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_7Zpm and provides detailed information about the command Image_ExifTool_7Zpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_7Zpm.

NAME 🖥️ Image_ExifTool_7Zpm 🖥️

Read 7z archives

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to extract meta information from 7z archives.

AUTHOR

Copyright 2023, Amir Gooran

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<https://py7zr.readthedocs.io/en/latest/archive_format.html>

SEE ALSO

“ZIP RAR5 Tags” in Image::ExifTool::TagNames

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2042 - Linux cli command Net_SMTP_SSLpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_SMTP_SSLpm and provides detailed information about the command Net_SMTP_SSLpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_SMTP_SSLpm.

NAME 🖥️ Net_SMTP_SSLpm 🖥️

SSL support for Net::SMTP

SYNOPSIS

use Net::SMTP::SSL; my $smtps = Net::SMTP::SSL->new(“example.com”, Port => 465);

DEPRECATED

Hey! Read this!

Since Net::SMTP v1.28 (2014-10-08), Net::SMTP itself has support for SMTP over SSL, and also for STARTTLS. Use Net::SMTP, not Net::SMTP::SSL.

DESCRIPTION

Implements the same API as Net::SMTP, but uses IO::Socket::SSL for its network operations. Due to the nature of Net::SMTP’s new method, it is not overridden to make use of a default port for the SMTPS service. Perhaps future versions will be smart like that. Port 465 is usually what you want, and it’s not a pain to specify that.

For interface documentation, please see Net::SMTP.

SEE ALSO

Net::SMTP, IO::Socket::SSL, perl.

AUTHOR

Casey West, <[email protected]>.

COPYRIGHT

Copyright (c) 2004 Casey West. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2043 - Linux cli command pthread_timedjoin_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_timedjoin_np and provides detailed information about the command pthread_timedjoin_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_timedjoin_np.

NAME 🖥️ pthread_timedjoin_np 🖥️

try to join with a terminated thread

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <pthread.h>
int pthread_tryjoin_np(pthread_t thread, void **retval);
int pthread_timedjoin_np(pthread_t thread, void **retval,
 const struct timespec *abstime);

DESCRIPTION

These functions operate in the same way as pthread_join(3), except for the differences described on this page.

The pthread_tryjoin_np() function performs a nonblocking join with the thread thread, returning the exit status of the thread in *retval. If thread has not yet terminated, then instead of blocking, as is done by pthread_join(3), the call returns an error.

The pthread_timedjoin_np() function performs a join-with-timeout. If thread has not yet terminated, then the call blocks until a maximum time, specified in abstime, measured against the CLOCK_REALTIME clock. If the timeout expires before thread terminates, the call returns an error. The abstime argument is a timespec(3) structure, specifying an absolute time measured since the Epoch (see time(2)).

RETURN VALUE

On success, these functions return 0; on error, they return an error number.

ERRORS

These functions can fail with the same errors as pthread_join(3). pthread_tryjoin_np() can in addition fail with the following error:

EBUSY
thread had not yet terminated at the time of the call.

pthread_timedjoin_np() can in addition fail with the following errors:

EINVAL
abstime value is invalid (tv_sec is less than 0 or tv_nsec is greater than 1e9).

ETIMEDOUT
The call timed out before thread terminated.

pthread_timedjoin_np() never returns the error EINTR.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_tryjoin_np(), pthread_timedjoin_np()

Thread safetyMT-Safe

STANDARDS

GNU; hence the suffix “_np” (nonportable) in the names.

HISTORY

glibc 2.3.3.

BUGS

The pthread_timedjoin_np() function measures time by internally calculating a relative sleep interval that is then measured against the CLOCK_MONOTONIC clock instead of the CLOCK_REALTIME clock. Consequently, the timeout is unaffected by discontinuous changes to the CLOCK_REALTIME clock.

EXAMPLES

The following code waits to join for up to 5 seconds:

struct timespec ts;
int s;
...
if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {
    /* Handle error */
}
ts.tv_sec += 5;
s = pthread_timedjoin_np(thread, NULL, &ts);
if (s != 0) {
    /* Handle error */
}

SEE ALSO

clock_gettime(2), pthread_exit(3), pthread_join(3), timespec(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2044 - Linux cli command powl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command powl and provides detailed information about the command powl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the powl.

NAME 🖥️ powl 🖥️

power functions

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double pow(double x, double y);
float powf(float x, float y);
long double powl(long double x, long double y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

powf(), powl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the value of x raised to the power of y.

RETURN VALUE

On success, these functions return the value of x to the power of y.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the mathematically correct sign.

If result underflows, and is not representable, a range error occurs, and 0.0 with the appropriate sign is returned.

If x is +0 or -0, and y is an odd integer less than 0, a pole error occurs and HUGE_VAL, HUGE_VALF, or HUGE_VALL, is returned, with the same sign as x.

If x is +0 or -0, and y is less than 0 and not an odd integer, a pole error occurs and +HUGE_VAL, +HUGE_VALF, or +HUGE_VALL, is returned.

If x is +0 (-0), and y is an odd integer greater than 0, the result is +0 (-0).

If x is 0, and y greater than 0 and not an odd integer, the result is +0.

If x is -1, and y is positive infinity or negative infinity, the result is 1.0.

If x is +1, the result is 1.0 (even if y is a NaN).

If y is 0, the result is 1.0 (even if x is a NaN).

If x is a finite value less than 0, and y is a finite noninteger, a domain error occurs, and a NaN is returned.

If the absolute value of x is less than 1, and y is negative infinity, the result is positive infinity.

If the absolute value of x is greater than 1, and y is negative infinity, the result is +0.

If the absolute value of x is less than 1, and y is positive infinity, the result is +0.

If the absolute value of x is greater than 1, and y is positive infinity, the result is positive infinity.

If x is negative infinity, and y is an odd integer less than 0, the result is -0.

If x is negative infinity, and y less than 0 and not an odd integer, the result is +0.

If x is negative infinity, and y is an odd integer greater than 0, the result is negative infinity.

If x is negative infinity, and y greater than 0 and not an odd integer, the result is positive infinity.

If x is positive infinity, and y less than 0, the result is +0.

If x is positive infinity, and y greater than 0, the result is positive infinity.

Except as specified above, if x or y is a NaN, the result is a NaN.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is negative, and y is a finite noninteger
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

Pole error: x is zero, and y is negative
errno is set to ERANGE (but see BUGS). A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised.

Range error: the result overflows
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error: the result underflows
errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pow(), powf(), powl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

BUGS

Historical bugs (now fixed)

Before glibc 2.28, on some architectures (e.g., x86-64) pow() may be more than 10,000 times slower for some inputs than for other nearby inputs. This affects only pow(), and not powf() nor powl(). This problem was fixed in glibc 2.28.

A number of bugs in the glibc implementation of pow() were fixed in glibc 2.16.

In glibc 2.9 and earlier, when a pole error occurs, errno is set to EDOM instead of the POSIX-mandated ERANGE. Since glibc 2.10, glibc does the right thing.

In glibc 2.3.2 and earlier, when an overflow or underflow error occurs, glibc’s pow() generates a bogus invalid floating-point exception (FE_INVALID) in addition to the overflow or underflow exception.

SEE ALSO

cbrt(3), cpow(3), sqrt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2045 - Linux cli command XtConvertCase

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtConvertCase and provides detailed information about the command XtConvertCase, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtConvertCase.

NAME 🖥️ XtConvertCase 🖥️

convert KeySym to KeyCodes

SYNTAX

#include <X11/Intrinsic.h>

void XtSetKeyTranslator(Display *display, XtKeyProc proc);

void XtTranslateKeycode(Display *display, KeyCode keycode, Modifiers modifiers, Modifiers *modifiers_return, KeySym *keysym_return);

void XtRegisterCaseConverter(Display *display, XtCaseProc proc, KeySym start, KeySym stop);

void XtConvertCase(Display *display, KeySym keysym, KeySym *lower_return, KeySym *upper_return);

ARGUMENTS

display
Specifies the display.

keycode
Specifies the KeyCode to translate.

keysym
Specifies the KeySym to convert.

keysym_return
Returns the resulting KeySym.

lower_return
Returns the lowercase equivalent of the KeySym.

upper_return
Returns the uppercase equivalent of the KeySym.

modifiers
Specifies the modifiers to the KeyCode.

modifiers_return
Returns a mask that indicates the modifiers actually used to generate the KeySym.

proc
Specifies the procedure that is to perform key translations or conversions.

start
Specifies the first KeySym for which this converter is valid.

stop
Specifies the last KeySym for which this converter is valid.

DESCRIPTION

The XtSetKeyTranslator function sets the specified procedure as the current key translator. The default translator is XtTranslateKey, an XtKeyProc that uses Shift and Lock modifiers with the interpretations defined by the core protocol. It is provided so that new translators can call it to get default KeyCode-to-KeySym translations and so that the default translator can be reinstalled.

The XtTranslateKeycode function passes the specified arguments directly to the currently registered KeyCode to KeySym translator.

The XtRegisterCaseConverter registers the specified case converter. The start and stop arguments provide the inclusive range of KeySyms for which this converter is to be called. The new converter overrides any previous converters for KeySyms in that range. No interface exists to remove converters; you need to register an identity converter. When a new converter is registered, the Intrinsics refreshes the keyboard state if necessary. The default converter understands case conversion for all KeySyms defined in the core protocol.

The XtConvertCase function calls the appropriate converter and returns the results. A user-supplied XtKeyProc may need to use this function.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2046 - Linux cli command if_nametoindex

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command if_nametoindex and provides detailed information about the command if_nametoindex, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the if_nametoindex.

NAME 🖥️ if_nametoindex 🖥️

mappings between network interface names and indexes

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <net/if.h>
unsigned int if_nametoindex(const char *ifname);
char *if_indextoname(unsigned int ifindex, char *ifname);

DESCRIPTION

The if_nametoindex() function returns the index of the network interface corresponding to the name ifname.

The if_indextoname() function returns the name of the network interface corresponding to the interface index ifindex. The name is placed in the buffer pointed to by ifname. The buffer must allow for the storage of at least IF_NAMESIZE bytes.

RETURN VALUE

On success, if_nametoindex() returns the index number of the network interface; on error, 0 is returned and errno is set to indicate the error.

On success, if_indextoname() returns ifname; on error, NULL is returned and errno is set to indicate the error.

ERRORS

if_nametoindex() may fail and set errno if:

ENODEV
No interface found with given name.

if_indextoname() may fail and set errno if:

ENXIO
No interface found for the index.

if_nametoindex() and if_indextoname() may also fail for any of the errors specified for socket(2) or ioctl(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

if_nametoindex(), if_indextoname()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008, RFC 3493.

HISTORY

POSIX.1-2001. BSDi.

SEE ALSO

getifaddrs(3), if_nameindex(3), ifconfig(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2047 - Linux cli command Params_Classifypm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Params_Classifypm and provides detailed information about the command Params_Classifypm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Params_Classifypm.

NAME 🖥️ Params_Classifypm 🖥️

argument type classification

SYNOPSIS

use Params::Classify qw( scalar_class is_undef check_undef is_string check_string is_number check_number is_glob check_glob is_regexp check_regexp is_ref check_ref ref_type is_blessed check_blessed blessed_class is_strictly_blessed check_strictly_blessed is_able check_able); $c = scalar_class($arg); if(is_undef($arg)) { check_undef($arg); if(is_string($arg)) { check_string($arg); if(is_number($arg)) { check_number($arg); if(is_glob($arg)) { check_glob($arg); if(is_regexp($arg)) { check_regexp($arg); if(is_ref($arg)) { check_ref($arg); $t = ref_type($arg); if(is_ref($arg, “HASH”)) { check_ref($arg, “HASH”); if(is_blessed($arg)) { check_blessed($arg); if(is_blessed($arg, “IO::Handle”)) { check_blessed($arg, “IO::Handle”); $c = blessed_class($arg); if(is_strictly_blessed($arg, “IO::Pipe::End”)) { check_strictly_blessed($arg, “IO::Pipe::End”); if(is_able($arg, [“print”, “flush”])) { check_able($arg, [“print”, “flush”]);

DESCRIPTION

This module provides various type-testing functions. These are intended for functions that, unlike most Perl code, care what type of data they are operating on. For example, some functions wish to behave differently depending on the type of their arguments (like overloaded functions in C++).

There are two flavours of function in this module. Functions of the first flavour only provide type classification, to allow code to discriminate between argument types. Functions of the second flavour package up the most common type of type discrimination: checking that an argument is of an expected type. The functions come in matched pairs, of the two flavours, and so the type enforcement functions handle only the simplest requirements for arguments of the types handled by the classification functions. Enforcement of more complex types may, of course, be built using the classification functions, or it may be more convenient to use a module designed for the more complex job, such as Params::Validate.

This module is implemented in XS, with a pure Perl backup version for systems that can’t handle XS.

TYPE CLASSIFICATION

This module divides up scalar values into the following classes:

  • undef

  • string (defined ordinary scalar)

  • typeglob (yes, typeglobs fit into scalar variables)

  • regexp (first-class regular expression objects in Perl 5.11 onwards)

  • reference to unblessed object (further classified by physical data type of the referenced object)

  • reference to blessed object (further classified by class blessed into)

These classes are mutually exclusive and should be exhaustive. This classification has been chosen as the most useful when one wishes to discriminate between types of scalar. Other classifications are possible. (For example, the two reference classes are distinguished by a feature of the referenced object; Perl does not internally treat this as a feature of the reference.)

FUNCTIONS

Each of these functions takes one scalar argument (ARG) to be tested, possibly with other arguments specifying details of the test. Any scalar value is acceptable for the argument to be tested. Each is_ function returns a simple truth value result, which is true iff ARG is of the type being checked for. Each check_ function will return normally if the argument is of the type being checked for, or will die if it is not.

Classification

scalar_class(ARG)
Determines which of the five classes described above ARG falls into. Returns “UNDEF”, “STRING”, “GLOB”, “REGEXP”, “REF”, or “BLESSED” accordingly.

The Undefined Value

is_undef(ARG)

check_undef(ARG)

Check whether ARG is undef. is_undef(ARG) is precisely equivalent to !defined(ARG), and is included for completeness.

Strings

is_string(ARG)

check_string(ARG)

Check whether ARG is defined and is an ordinary scalar value (not a reference, typeglob, or regexp). This is what one usually thinks of as a string in Perl. In fact, any scalar (including undef and references) can be coerced to a string, but if you’re trying to classify a scalar then you don’t want to do that.

is_number(ARG)

check_number(ARG)

Check whether ARG is defined and an ordinary scalar (i.e., satisfies “is_string” above) and is an acceptable number to Perl. This is what one usually thinks of as a number. Note that simple (“is_string”-satisfying) scalars may have independent numeric and string values, despite the usual pretence that they have only one value. Such a scalar is deemed to be a number if either it already has a numeric value (e.g., was generated by a numeric literal or an arithmetic computation) or its string value has acceptable syntax for a number (so it can be converted). Where a scalar has separate numeric and string values (see “dualvar” in Scalar::Util), it is possible for it to have an acceptable numeric value while its string value does not have acceptable numeric syntax. Be careful to use such a value only in a numeric context, if you are using it as a number. “scalar_num_part” in Scalar::Number extracts the numeric part of a scalar as an ordinary number. (0+ARG suffices for that unless you need to preserve floating point signed zeroes.) A number may be either a native integer or a native floating point value, and there are several subtypes of floating point value. For classification, and other handling of numbers in scalars, see Scalar::Number. For details of the two numeric data types, see Data::Integer and Data::Float. This function differs from looks_like_number (see “looks_like_number” in Scalar::Util; also “looks_like_number” in perlapi for a lower-level description) in excluding undef, typeglobs, and references. Why looks_like_number returns true for undef or typeglobs is anybody’s guess. References, if treated as numbers, evaluate to the address in memory that they reference; this is useful for comparing references for equality, but it is not otherwise useful to treat references as numbers. Blessed references may have overloaded numeric operators, but if so then they don’t necessarily behave like ordinary numbers. looks_like_number is also confused by dualvars: it looks at the string portion of the scalar.

Typeglobs

is_glob(ARG)

check_glob(ARG)

Check whether ARG is a typeglob.

Regexps

is_regexp(ARG)

check_regexp(ARG)

Check whether ARG is a regexp object.

References to Unblessed Objects

is_ref(ARG)

check_ref(ARG)

Check whether ARG is a reference to an unblessed object. If it is, then the referenced data type can be determined using ref_type (see below), which will return a string such as “HASH” or “SCALAR”.

ref_type(ARG)
Returns undef if ARG is not a reference to an unblessed object. Otherwise, determines what type of object is referenced. Returns “SCALAR”, “ARRAY”, “HASH”, “CODE”, “FORMAT”, or “IO” accordingly. Note that, unlike ref, this does not distinguish between different types of referenced scalar. A reference to a string and a reference to a reference will both return “SCALAR”. Consequently, what ref_type returns for a particular reference will not change due to changes in the value of the referent, except for the referent being blessed.

is_ref(ARG, TYPE)

check_ref(ARG, TYPE)

Check whether ARG is a reference to an unblessed object of type TYPE, as determined by “ref_type”. TYPE must be a string. Possible TYPEs are “SCALAR”, “ARRAY”, “HASH”, “CODE”, “FORMAT”, and “IO”.

References to Blessed Objects

is_blessed(ARG)

check_blessed(ARG)

Check whether ARG is a reference to a blessed object. If it is, then the class into which the object was blessed can be determined using “blessed_class”.

is_blessed(ARG, CLASS)

check_blessed(ARG, CLASS)

Check whether ARG is a reference to a blessed object that claims to be an instance of CLASS (via its isa method; see “isa” in perlobj). CLASS must be a string, naming a Perl class.

blessed_class(ARG)
Returns undef if ARG is not a reference to a blessed object. Otherwise, returns the class into which the object is blessed. ref (see “ref” in perlfunc) gives the same result on references to blessed objects, but different results on other types of value. blessed_class is actually identical to “blessed” in Scalar::Util.

is_strictly_blessed(ARG)

check_strictly_blessed(ARG)

Check whether ARG is a reference to a blessed object, identically to “is_blessed”. This exists only for symmetry; the useful form of is_strictly_blessed appears below.

is_strictly_blessed(ARG, CLASS)

check_strictly_blessed(ARG, CLASS)

Check whether ARG is a reference to an object blessed into CLASS exactly. CLASS must be a string, naming a Perl class. Because this excludes subclasses, this is rarely what one wants, but there are some specialised occasions where it is useful.

is_able(ARG)

check_able(ARG)

Check whether ARG is a reference to a blessed object, identically to “is_blessed”. This exists only for symmetry; the useful form of is_able appears below.

is_able(ARG, METHODS)

check_able(ARG, METHODS)

Check whether ARG is a reference to a blessed object that claims to implement the methods specified by METHODS (via its can method; see “can” in perlobj). METHODS must be either a single method name or a reference to an array of method names. Each method name is a string. This interface check is often more appropriate than a direct ancestry check (such as “is_blessed” performs).

BUGS

Probably ought to handle something like Params::Validate’s scalar type specification system, which makes much the same distinctions.

SEE ALSO

Data::Float, Data::Integer, Params::Validate, Scalar::Number, Scalar::Util

AUTHOR

Andrew Main (Zefram) <[email protected]>

COPYRIGHT

Copyright (C) 2004, 2006, 2007, 2009, 2010, 2017 Andrew Main (Zefram) <[email protected]>

Copyright (C) 2009, 2010 PhotoBox Ltd

LICENSE

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2048 - Linux cli command Image_ExifTool_XISFpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_XISFpm and provides detailed information about the command Image_ExifTool_XISFpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_XISFpm.

NAME 🖥️ Image_ExifTool_XISFpm 🖥️

Read Extensible Image Serialization Format metadata

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read meta information from XISF (Extensible Image Serialization Format) images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<https://pixinsight.com/doc/docs/XISF-1.0-spec/XISF-1.0-spec.html>

SEE ALSO

“XISF Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2049 - Linux cli command toupper

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command toupper and provides detailed information about the command toupper, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the toupper.

NAME 🖥️ toupper 🖥️

convert uppercase or lowercase

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int toupper(int c);
int tolower(int c);
int toupper_l(int c, locale_t locale);
int tolower_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

toupper_l(), tolower_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions convert lowercase letters to uppercase, and vice versa.

If c is a lowercase letter, toupper() returns its uppercase equivalent, if an uppercase representation exists in the current locale. Otherwise, it returns c. The toupper_l() function performs the same task, but uses the locale referred to by the locale handle locale.

If c is an uppercase letter, tolower() returns its lowercase equivalent, if a lowercase representation exists in the current locale. Otherwise, it returns c. The tolower_l() function performs the same task, but uses the locale referred to by the locale handle locale.

If c is neither an unsigned char value nor EOF, the behavior of these functions is undefined.

The behavior of toupper_l() and tolower_l() is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

RETURN VALUE

The value returned is that of the converted letter, or c if the conversion was not possible.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

toupper(), tolower(), toupper_l(), tolower_l()

Thread safetyMT-Safe

STANDARDS

toupper()
tolower()
C11, POSIX.1-2008.

toupper_l()
tolower_l()
POSIX.1-2008.

HISTORY

toupper()
tolower()
C89, 4.3BSD, POSIX.1-2001.

toupper_l()
tolower_l()
POSIX.1-2008.

NOTES

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what constitutes an uppercase or lowercase letter depend on the locale. For example, the default “C” locale does not know about umlauts, so no conversion is done for them.

In some non-English locales, there are lowercase letters with no corresponding uppercase equivalent; the German sharp s is one example.

SEE ALSO

isalpha(3), newlocale(3), setlocale(3), towlower(3), towupper(3), uselocale(3), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2050 - Linux cli command Moose_Meta_Method_Constructorpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Method_Constructorpm and provides detailed information about the command Moose_Meta_Method_Constructorpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Method_Constructorpm.

NAME 🖥️ Moose_Meta_Method_Constructorpm 🖥️

Method Meta Object for constructors

VERSION

version 2.2207

DESCRIPTION

This class is a subclass of Class::MOP::Method::Constructor that provides additional Moose-specific functionality

To understand this class, you should read the Class::MOP::Method::Constructor documentation as well.

INHERITANCE

Moose::Meta::Method::Constructor is a subclass of Moose::Meta::Method and Class::MOP::Method::Constructor.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2051 - Linux cli command Net_DNS_Resolver_os2pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_Resolver_os2pm and provides detailed information about the command Net_DNS_Resolver_os2pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_Resolver_os2pm.

NAME 🖥️ Net_DNS_Resolver_os2pm 🖥️

OS2 resolver class

SYNOPSIS

use Net::DNS::Resolver;

DESCRIPTION

This class implements the OS specific portions of Net::DNS::Resolver.

No user serviceable parts inside, see Net::DNS::Resolver for all your resolving needs.

COPYRIGHT

Copyright (c)2012 Dick Franks.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl, Net::DNS, Net::DNS::Resolver

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2052 - Linux cli command pcap_get_required_select_timeoutpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_get_required_select_timeoutpcap and provides detailed information about the command pcap_get_required_select_timeoutpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_get_required_select_timeoutpcap.

NAME 🖥️ pcap_get_required_select_timeoutpcap 🖥️

get a timeout to be used when doing select() for a live capture

SYNOPSIS

#include <pcap/pcap.h>
const struct timeval *pcap_get_required_select_timeout(pcap_t *p);

DESCRIPTION

pcap_get_required_select_timeout() returns, on UNIX, a pointer to a struct timeval containing a value that must be used as the minimum timeout in select(2), poll(2), epoll_wait(2), and kevent(2) calls, or NULL if there is no such timeout. If a non-NULL value is returned, it must be used regardless of whether pcap_get_selectable_fd(3PCAP) returns -1 for any descriptor on which those calls are being done. pcap_get_required_select_timeout() should be called for all pcap_ts before a call to select(), poll(), epoll_wait(), or kevent(), and any timeouts used for those calls should be updated as appropriate given the new value of the timeout.

For kevent(), one EVFILT_TIMER filter per selectable descriptor can be used, rather than using the timeout argument to kevent(); if the EVFILT_TIMER event for a particular selectable descriptor signals an event, pcap_dispatch(3PCAP) should be called for the corresponding pcap_t.

On Linux systems with timerfd_create(2), one timer object created by timerfd_create() per selectable descriptor can be used, rather than using the timeout argument to epoll_wait(); if the timer object for a particular selectable descriptor signals an event, pcap_dispatch(3PCAP) should be called for the corresponding pcap_t.

Otherwise, a timeout value no larger than the smallest of all timeouts returned by pcap_get_required_select_timeout() for devices from which packets will be captured and any other timeouts to be used in the call should be used as the timeout for the call, and, when the call returns, pcap_dispatch(3PCAP) should be called for all pcap_ts for which a non-NULL timeout was returned, regardless of whether it’s indicated as having anything to read from it or not.

All devices with a non-NULL timeout must be put in non-blocking mode with pcap_setnonblock(3PCAP).

Note that a device on which a read can be done without blocking may, on some platforms, not have any packets to read if the packet buffer timeout has expired. A call to pcap_dispatch() or pcap_next_ex(3PCAP) will return 0 in this case, but will not block.

pcap_get_required_select_timeout() is not available on Windows.

RETURN VALUE

A pointer to a struct timeval is returned if the timeout is required; otherwise NULL is returned.

BACKWARD COMPATIBILITY

This function became available in libpcap release 1.9.0. In previous releases, select(), poll(), epoll_wait(), and kevent() could not be used for devices that don’t provide a selectable file descriptor (in other words, on any capture source for that pcap_get_selectable_fd() returns -1).

In libpcap release 1.10.0 and later, the timeout value can change from call to call, so pcap_get_required_select_timeout() must be called before each call to select(), poll(), epoll_wait(), or kevent(), and the new value must be used to calculate timeouts for the call. Code that does that will also work with libpcap 1.9.x releases, so code using pcap_get_required_select_timeout() should be changed to call it for each call to select(), poll(), epoll_wait(), or kevent() even if the code must also work with libpcap 1.9.x.

SEE ALSO

pcap(3PCAP), pcap_get_selectable_fd(3PCAP), select(2), poll(2), epoll_wait(2), kqueue(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2053 - Linux cli command pthread_attr_getstacksize

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_attr_getstacksize and provides detailed information about the command pthread_attr_getstacksize, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_attr_getstacksize.

NAME 🖥️ pthread_attr_getstacksize 🖥️

set/get stack size attribute in thread attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_attr_setstacksize(pthread_attr_t *attr",size_t"stacksize);
int pthread_attr_getstacksize(const pthread_attr_t *restrict attr,
 size_t *restrict stacksize);

DESCRIPTION

The pthread_attr_setstacksize() function sets the stack size attribute of the thread attributes object referred to by attr to the value specified in stacksize.

The stack size attribute determines the minimum size (in bytes) that will be allocated for threads created using the thread attributes object attr.

The pthread_attr_getstacksize() function returns the stack size attribute of the thread attributes object referred to by attr in the buffer pointed to by stacksize.

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

pthread_attr_setstacksize() can fail with the following error:

EINVAL
The stack size is less than PTHREAD_STACK_MIN (16384) bytes.

On some systems, pthread_attr_setstacksize() can fail with the error EINVAL if stacksize is not a multiple of the system page size.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_attr_setstacksize(), pthread_attr_getstacksize()

Thread safetyMT-Safe

VERSIONS

These functions are provided since glibc 2.1.

STANDARDS

POSIX.1-2001, POSIX.1-2008.

NOTES

For details on the default stack size of new threads, see pthread_create(3).

A thread’s stack size is fixed at the time of thread creation. Only the main thread can dynamically grow its stack.

The pthread_attr_setstack(3) function allows an application to set both the size and location of a caller-allocated stack that is to be used by a thread.

BUGS

As at glibc 2.8, if the specified stacksize is not a multiple of STACK_ALIGN (16 bytes on most architectures), it may be rounded downward, in violation of POSIX.1, which says that the allocated stack will be at least stacksize bytes.

EXAMPLES

See pthread_create(3).

SEE ALSO

getrlimit(2), pthread_attr_init(3), pthread_attr_setguardsize(3), pthread_attr_setstack(3), pthread_create(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2054 - Linux cli command Image_ExifTool_GEpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_GEpm and provides detailed information about the command Image_ExifTool_GEpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_GEpm.

NAME 🖥️ Image_ExifTool_GEpm 🖥️

General Imaging maker notes tags

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret General Imaging maker notes.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

“GE Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2055 - Linux cli command Params_Util_PPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Params_Util_PPpm and provides detailed information about the command Params_Util_PPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Params_Util_PPpm.

NAME 🖥️ Params_Util_PPpm 🖥️

PurePerl Params::Util routines

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2056 - Linux cli command TAILQ_FOREACH

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command TAILQ_FOREACH and provides detailed information about the command TAILQ_FOREACH, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the TAILQ_FOREACH.

NAME 🖥️ TAILQ_FOREACH 🖥️

implementation of a doubly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
TAILQ_ENTRY(TYPE);
TAILQ_HEAD(HEADNAME, TYPE);
TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD head);
void TAILQ_INIT(TAILQ_HEAD *head);
int TAILQ_EMPTY(TAILQ_HEAD *head);
void TAILQ_INSERT_HEAD(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_TAIL(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_AFTER(TAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_FIRST(TAILQ_HEAD *head);
struct TYPE *TAILQ_LAST(TAILQ_HEAD *head, HEADNAME);
struct TYPE *TAILQ_PREV(struct TYPE *elm, HEADNAME, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_NEXT(struct TYPE *elm, TAILQ_ENTRY NAME);
TAILQ_FOREACH(struct TYPE *var, TAILQ_HEAD *head,
 TAILQ_ENTRY NAME);
TAILQ_FOREACH_REVERSE(struct TYPE *var, TAILQ_HEAD *head, HEADNAME,
 TAILQ_ENTRY NAME);
void TAILQ_REMOVE(TAILQ_HEAD *head, struct TYPE *elm,
 TAILQ_ENTRY NAME);
void TAILQ_CONCAT(TAILQ_HEAD *head1, TAILQ_HEAD *head2,
 TAILQ_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked tail queues.

In the macro definitions, TYPE is the name of a user defined structure, that must contain a field of type TAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user defined structure that must be declared using the macro TAILQ_HEAD().

Creation

A tail queue is headed by a structure defined by the TAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the queue and the other to the last element in the queue. The elements are doubly linked so that an arbitrary element can be removed without traversing the queue. New elements can be added to the queue after an existing element, before an existing element, at the head of the queue, or at the end of the queue. A TAILQ_HEAD structure is declared as follows:

TAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the queue. A pointer to the head of the queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

TAILQ_ENTRY() declares a structure that connects the elements in the queue.

TAILQ_HEAD_INITIALIZER() evaluates to an initializer for the queue head.

TAILQ_INIT() initializes the queue referenced by

TAILQ_EMPTY() evaluates to true if there are no items on the queue. head.

Insertion

TAILQ_INSERT_HEAD() inserts the new element elm at the head of the queue.

TAILQ_INSERT_TAIL() inserts the new element elm at the end of the queue.

TAILQ_INSERT_BEFORE() inserts the new element elm before the element listelm.

TAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

TAILQ_FIRST() returns the first item on the queue, or NULL if the queue is empty.

TAILQ_LAST() returns the last item on the queue. If the queue is empty the return value is NULL.

TAILQ_PREV() returns the previous item on the queue, or NULL if this item is the first.

TAILQ_NEXT() returns the next item on the queue, or NULL if this item is the last.

TAILQ_FOREACH() traverses the queue referenced by head in the forward direction, assigning each element in turn to var. var is set to NULL if the loop completes normally, or if there were no elements.

TAILQ_FOREACH_REVERSE() traverses the queue referenced by head in the reverse direction, assigning each element in turn to var.

Removal

TAILQ_REMOVE() removes the element elm from the queue.

Other features

TAILQ_CONCAT() concatenates the queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

TAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

TAILQ_FIRST(), TAILQ_LAST(), TAILQ_PREV(), and TAILQ_NEXT() return a pointer to the first, last, previous, or next TYPE structure, respectively.

TAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

STANDARDS

BSD.

HISTORY

4.4BSD.

CAVEATS

TAILQ_FOREACH() and TAILQ_FOREACH_REVERSE() don’t allow var to be removed or freed within the loop, as it would interfere with the traversal. TAILQ_FOREACH_SAFE() and TAILQ_FOREACH_REVERSE_SAFE(), which are present on the BSDs but are not present in glibc, fix this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    TAILQ_ENTRY(entry) entries;             /* Tail queue */
};
TAILQ_HEAD(tailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct tailhead head;                   /* Tail queue head */
    int i;
    TAILQ_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    TAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    TAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    TAILQ_INSERT_AFTER(&head, n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    TAILQ_INSERT_BEFORE(n2, n3, entries);
    TAILQ_REMOVE(&head, n2, entries);       /* Deletion */
    free(n2);
                                            /* Forward traversal */
    i = 0;
    TAILQ_FOREACH(np, &head, entries)
        np->data = i++;
                                            /* Reverse traversal */
    TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = TAILQ_FIRST(&head); while (n1 != NULL) { n2 = TAILQ_NEXT(n1, entries); free(n1); n1 = n2; } TAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2057 - Linux cli command Image_ExifTool_Lang_en_capm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Lang_en_capm and provides detailed information about the command Image_ExifTool_Lang_en_capm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Lang_en_capm.

NAME 🖥️ Image_ExifTool_Lang_en_capm 🖥️

ExifTool Canadian English language translations

DESCRIPTION

This file is used by Image::ExifTool to generate localized tag descriptions and values.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Image::ExifTool (3pm), Image::ExifTool::TagInfoXML (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2058 - Linux cli command pcap_set_tstamp_precisionpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_set_tstamp_precisionpcap and provides detailed information about the command pcap_set_tstamp_precisionpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_set_tstamp_precisionpcap.

NAME 🖥️ pcap_set_tstamp_precisionpcap 🖥️

set the time stamp precision returned in captures

SYNOPSIS

#include <pcap/pcap.h>
int pcap_set_tstamp_precision(pcap_t *p, int tstamp_precision);

DESCRIPTION

pcap_set_tstamp_precision() sets the precision of the time stamp desired for packets captured on the pcap descriptor to the type specified by tstamp_precision. It must be called on a pcap descriptor created by pcap_create(3PCAP) that has not yet been activated by pcap_activate(3PCAP). Two time stamp precisions are supported, microseconds and nanoseconds. One can use options PCAP_TSTAMP_PRECISION_MICRO and PCAP_TSTAMP_PRECISION_NANO to request desired precision. By default, time stamps are in microseconds.

RETURN VALUE

pcap_set_tstamp_precision() returns 0 on success if the specified time stamp precision is expected to be supported by the capture device, PCAP_ERROR_TSTAMP_PRECISION_NOTSUP if the capture device does not support the requested time stamp precision, PCAP_ERROR_ACTIVATED if called on a capture handle that has been activated.

BACKWARD COMPATIBILITY

This function became available in libpcap release 1.5.1. In previous releases, time stamps from a capture device or savefile are always given in seconds and microseconds.

SEE ALSO

pcap(3PCAP), pcap_get_tstamp_precision(3PCAP), pcap-tstamp(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2059 - Linux cli command strcoll

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strcoll and provides detailed information about the command strcoll, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strcoll.

NAME 🖥️ strcoll 🖥️

compare two strings using the current locale

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
int strcoll(const char *s1, const char *s2);

DESCRIPTION

The strcoll() function compares the two strings s1 and s2. It returns an integer less than, equal to, or greater than zero if s1 is found, respectively, to be less than, to match, or be greater than s2. The comparison is based on strings interpreted as appropriate for the program’s current locale for category LC_COLLATE. (See setlocale(3).)

RETURN VALUE

The strcoll() function returns an integer less than, equal to, or greater than zero if s1 is found, respectively, to be less than, to match, or be greater than s2, when both are interpreted as appropriate for the current locale.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strcoll()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89, SVr4, 4.3BSD.

NOTES

In the POSIX or C locales strcoll() is equivalent to strcmp(3).

SEE ALSO

memcmp(3), setlocale(3), strcasecmp(3), strcmp(3), string(3), strxfrm(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2060 - Linux cli command zip_source_win32handle_create

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_win32handle_create and provides detailed information about the command zip_source_win32handle_create, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_win32handle_create.

libzip (-lzip)

The functions

and

create a zip source from a Windows file handle. They open

and read

bytes from offset

from it. If

is 0 or -1, the whole file (starting from

is used.

If the file supports seek, the source can be used to open a zip archive from.

The file is opened and read when the data from the source is used, usually by

or

Upon successful completion, the created source is returned. Otherwise,

is returned and the error code in

or

is set to indicate the error.

and

fail if:

or

are invalid.

Required memory could not be allocated.

Opening

failed.

and

were added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2061 - Linux cli command ts_setup

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ts_setup and provides detailed information about the command ts_setup, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ts_setup.

NAME 🖥️ ts_setup 🖥️

find, open and configure a touch screen input device

SYNOPSIS

#include <tslib.h>

struct tsdev *ts_setup(const char *dev_name, int nonblock);

DESCRIPTION

ts_setup() will try to find, open and configure the touch screen device. On success it allocates memory for a new touch screen device, opens and links the input event device to it and loads and initialises all modules configured in the tslib configuration file TSLIB_CONFFILE.

If dev_name is NULL ts_setup() will use the device defined by the TSLIB_TSDEVICE environment variable.

If TSLIB_TSDEVICE is not defined ts_setup() will try to use following devices:

/dev/input/ts,
/dev/input/touchscreen,
/dev/touchscreen/ucb1x00.

After that we ts_setup() scans /dev/input/event* for the first device with property INPUT_PROP_DIRECT.

RETURN VALUE

A pointer to the opened struct tsdev is returned.

SEE ALSO

ts_open(3), ts_close(3), ts_read(3), ts_config(3), ts.conf(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2062 - Linux cli command Moose_Cookbook_Roles_Restartable_AdvancedCompositionpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Roles_Restartable_AdvancedCompositionpm and provides detailed information about the command Moose_Cookbook_Roles_Restartable_AdvancedCompositionpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Roles_Restartable_AdvancedCompositionpm.

NAME 🖥️ Moose_Cookbook_Roles_Restartable_AdvancedCompositionpm 🖥️

Advanced Role Composition - method exclusion and aliasing

VERSION

version 2.2207

SYNOPSIS

package Restartable; use Moose::Role; has is_paused => ( is => rw, isa => Bool, default => 0, ); requires save_state, load_state; sub stop { 1 } sub start { 1 } package Restartable::ButUnreliable; use Moose::Role; with Restartable => { -alias => { stop => _stop, start => _start }, -excludes => [ stop, start ], }; sub stop { my $self = shift; $self->explode() if rand(1) > .5; $self->_stop(); } sub start { my $self = shift; $self->explode() if rand(1) > .5; $self->_start(); } package Restartable::ButBroken; use Moose::Role; with Restartable => { -excludes => [ stop, start ] }; sub stop { my $self = shift; $self->explode(); } sub start { my $self = shift; $self->explode(); }

DESCRIPTION

In this example, we demonstrate how to exercise fine-grained control over what methods we consume from a role. We have a Restartable role which provides an is_paused attribute, and two methods, stop and start.

Then we have two more roles which implement the same interface, each putting their own spin on the stop and start methods.

In the Restartable::ButUnreliable role, we want to provide a new implementation of stop and start, but still have access to the original implementation. To do this, we alias the methods from Restartable to private methods, and provide wrappers around the originals (1).

Note that aliasing simply adds a name, so we also need to exclude the methods with their original names.

with Restartable => { -alias => { stop => _stop, start => _start }, -excludes => [ stop, start ], };

In the Restartable::ButBroken role, we want to provide an entirely new behavior for stop and start. We exclude them entirely when composing the Restartable role into Restartable::ButBroken.

It’s worth noting that the -excludes parameter also accepts a single string as an argument if you just want to exclude one method.

with Restartable => { -excludes => [ stop, start ] };

CONCLUSION

Exclusion and renaming are a power tool that can be handy, especially when building roles out of other roles. In this example, all of our roles implement the Restartable role. Each role provides same API, but each has a different implementation under the hood.

You can also use the method aliasing and excluding features when composing a role into a class.

FOOTNOTES

  1. The mention of wrapper should tell you that we could do the same thing using method modifiers, but for the sake of this example, we don’t.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2063 - Linux cli command wcschr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcschr and provides detailed information about the command wcschr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcschr.

NAME 🖥️ wcschr 🖥️

search a wide character in a wide-character string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
wchar_t *wcschr(const wchar_t *wcs, wchar_t wc);

DESCRIPTION

The wcschr() function is the wide-character equivalent of the strchr(3) function. It searches the first occurrence of wc in the wide-character string pointed to by wcs.

RETURN VALUE

The wcschr() function returns a pointer to the first occurrence of wc in the wide-character string pointed to by wcs, or NULL if wc does not occur in the string.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcschr()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

strchr(3), wcspbrk(3), wcsrchr(3), wcsstr(3), wmemchr(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2064 - Linux cli command glob

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command glob and provides detailed information about the command glob, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the glob.

NAME 🖥️ glob 🖥️

find pathnames matching a pattern, free memory from glob()

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <glob.h>
int glob(const char *restrict pattern, int flags,
 int (*errfunc)(const char *epath, int eerrno),
 glob_t *restrict pglob);
void globfree(glob_t *pglob);

DESCRIPTION

The glob() function searches for all the pathnames matching pattern according to the rules used by the shell (see glob(7)). No tilde expansion or parameter substitution is done; if you want these, use wordexp(3).

The globfree() function frees the dynamically allocated storage from an earlier call to glob().

The results of a glob() call are stored in the structure pointed to by pglob. This structure is of type glob_t (declared in <glob.h>) and includes the following elements defined by POSIX.2 (more may be present as an extension):

typedef struct {
    size_t   gl_pathc;    /* Count of paths matched so far  */
    char   **gl_pathv;    /* List of matched pathnames.  */
    size_t   gl_offs;     /* Slots to reserve in gl_pathv.  */
} glob_t;

Results are stored in dynamically allocated storage.

The argument flags is made up of the bitwise OR of zero or more the following symbolic constants, which modify the behavior of glob():

GLOB_ERR
Return upon a read error (because a directory does not have read permission, for example). By default, glob() attempts carry on despite errors, reading all of the directories that it can.

GLOB_MARK
Append a slash to each path which corresponds to a directory.

GLOB_NOSORT
Don’t sort the returned pathnames. The only reason to do this is to save processing time. By default, the returned pathnames are sorted.

GLOB_DOOFFS
Reserve pglob->gl_offs slots at the beginning of the list of strings in pglob->pathv. The reserved slots contain null pointers.

GLOB_NOCHECK
If no pattern matches, return the original pattern. By default, glob() returns GLOB_NOMATCH if there are no matches.

GLOB_APPEND
Append the results of this call to the vector of results returned by a previous call to glob(). Do not set this flag on the first invocation of glob().

GLOB_NOESCAPE
Don’t allow backslash (’) to be used as an escape character. Normally, a backslash can be used to quote the following character, providing a mechanism to turn off the special meaning metacharacters.

flags may also include any of the following, which are GNU extensions and not defined by POSIX.2:

GLOB_PERIOD
Allow a leading period to be matched by metacharacters. By default, metacharacters can’t match a leading period.

GLOB_ALTDIRFUNC
Use alternative functions pglob->gl_closedir, pglob->gl_readdir, pglob->gl_opendir, pglob->gl_lstat, and pglob->gl_stat for filesystem access instead of the normal library functions.

GLOB_BRACE
Expand csh(1) style brace expressions of the form {a,b}. Brace expressions can be nested. Thus, for example, specifying the pattern “{foo/{,cat,dog},bar}” would return the same results as four separate glob() calls using the strings: “foo/”, “foo/cat”, “foo/dog”, and “bar”.

GLOB_NOMAGIC
If the pattern contains no metacharacters, then it should be returned as the sole matching word, even if there is no file with that name.

GLOB_TILDE
Carry out tilde expansion. If a tilde (’~’) is the only character in the pattern, or an initial tilde is followed immediately by a slash (’/’), then the home directory of the caller is substituted for the tilde. If an initial tilde is followed by a username (e.g., “~andrea/bin”), then the tilde and username are substituted by the home directory of that user. If the username is invalid, or the home directory cannot be determined, then no substitution is performed.

GLOB_TILDE_CHECK
This provides behavior similar to that of GLOB_TILDE. The difference is that if the username is invalid, or the home directory cannot be determined, then instead of using the pattern itself as the name, glob() returns GLOB_NOMATCH to indicate an error.

GLOB_ONLYDIR
This is a hint to glob() that the caller is interested only in directories that match the pattern. If the implementation can easily determine file-type information, then nondirectory files are not returned to the caller. However, the caller must still check that returned files are directories. (The purpose of this flag is merely to optimize performance when the caller is interested only in directories.)

If errfunc is not NULL, it will be called in case of an error with the arguments epath, a pointer to the path which failed, and eerrno, the value of errno as returned from one of the calls to opendir(3), readdir(3), or stat(2). If errfunc returns nonzero, or if GLOB_ERR is set, glob() will terminate after the call to errfunc.

Upon successful return, pglob->gl_pathc contains the number of matched pathnames and pglob->gl_pathv contains a pointer to the list of pointers to matched pathnames. The list of pointers is terminated by a null pointer.

It is possible to call glob() several times. In that case, the GLOB_APPEND flag has to be set in flags on the second and later invocations.

As a GNU extension, pglob->gl_flags is set to the flags specified, ored with GLOB_MAGCHAR if any metacharacters were found.

RETURN VALUE

On successful completion, glob() returns zero. Other possible returns are:

GLOB_NOSPACE
for running out of memory,

GLOB_ABORTED
for a read error, and

GLOB_NOMATCH
for no found matches.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

glob()

Thread safety

MT-Unsafe race:utent env sig:ALRM timer locale

globfree()

Thread safetyMT-Safe

In the above table, utent in race:utent signifies that if any of the functions setutent(3), getutent(3), or endutent(3) are used in parallel in different threads of a program, then data races could occur. glob() calls those functions, so we use race:utent to remind users.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, POSIX.2.

NOTES

The structure elements gl_pathc and gl_offs are declared as size_t in glibc 2.1, as they should be according to POSIX.2, but are declared as int in glibc 2.0.

BUGS

The glob() function may fail due to failure of underlying function calls, such as malloc(3) or opendir(3). These will store their error code in errno.

EXAMPLES

One example of use is the following code, which simulates typing

ls -l *.c ../*.c

in the shell:

glob_t globbuf;
globbuf.gl_offs = 2;
glob("*.c", GLOB_DOOFFS, NULL, &globbuf);
glob("../*.c", GLOB_DOOFFS | GLOB_APPEND, NULL, &globbuf);
globbuf.gl_pathv[0] = "ls";
globbuf.gl_pathv[1] = "-l";
execvp("ls", &globbuf.gl_pathv[0]);

SEE ALSO

ls(1), sh(1), stat(2), exec(3), fnmatch(3), malloc(3), opendir(3), readdir(3), wordexp(3), glob(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2065 - Linux cli command pcap_set_datalinkpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_set_datalinkpcap and provides detailed information about the command pcap_set_datalinkpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_set_datalinkpcap.

NAME 🖥️ pcap_set_datalinkpcap 🖥️

set the link-layer header type to be used by a capture device

SYNOPSIS

#include <pcap/pcap.h>
int pcap_set_datalink(pcap_t *p, int dlt);

DESCRIPTION

pcap_set_datalink() is used to set the current link-layer header type of the pcap descriptor to the type specified by dlt.

RETURN VALUE

pcap_set_datalink() returns 0 on success, PCAP_ERROR_NOT_ACTIVATED if called on a capture handle that has been created but not activated, or PCAP_ERROR on other errors. If PCAP_ERROR is returned, pcap_geterr(3PCAP) or pcap_perror(3PCAP) may be called with p as an argument to fetch or display the error text.

SEE ALSO

pcap(3PCAP), pcap_datalink_name_to_val(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2066 - Linux cli command getservent_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getservent_r and provides detailed information about the command getservent_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getservent_r.

NAME 🖥️ getservent_r 🖥️

get service entry (reentrant)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
int getservent_r(struct servent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct servent **restrict result);
int getservbyname_r(const char *restrict name,
 const char *restrict proto,
 struct servent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct servent **restrict result);
int getservbyport_r(int port,
 const char *restrict proto,
 struct servent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct servent **restrict result);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getservent_r(), getservbyname_r(), getservbyport_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The getservent_r(), getservbyname_r(), and getservbyport_r() functions are the reentrant equivalents of, respectively, getservent(3), getservbyname(3), and getservbyport(3). They differ in the way that the servent structure is returned, and in the function calling signature and return value. This manual page describes just the differences from the nonreentrant functions.

Instead of returning a pointer to a statically allocated servent structure as the function result, these functions copy the structure into the location pointed to by result_buf.

The buf array is used to store the string fields pointed to by the returned servent structure. (The nonreentrant functions allocate these strings in static storage.) The size of this array is specified in buflen. If buf is too small, the call fails with the error ERANGE, and the caller must try again with a larger buffer. (A buffer of length 1024 bytes should be sufficient for most applications.)

If the function call successfully obtains a service record, then *result is set pointing to result_buf; otherwise, *result is set to NULL.

RETURN VALUE

On success, these functions return 0. On error, they return one of the positive error numbers listed in errors.

On error, record not found (getservbyname_r(), getservbyport_r()), or end of input (getservent_r()) result is set to NULL.

ERRORS

ENOENT
(getservent_r()) No more records in database.

ERANGE
buf is too small. Try again with a larger buffer (and increased buflen).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getservent_r(), getservbyname_r(), getservbyport_r()

Thread safetyMT-Safe locale

VERSIONS

Functions with similar names exist on some other systems, though typically with different calling signatures.

STANDARDS

GNU.

EXAMPLES

The program below uses getservbyport_r() to retrieve the service record for the port and protocol named in its first command-line argument. If a third (integer) command-line argument is supplied, it is used as the initial value for buflen; if getservbyport_r() fails with the error ERANGE, the program retries with larger buffer sizes. The following shell session shows a couple of sample runs:

$ ./a.out 7 tcp 1
ERANGE! Retrying with larger buffer
getservbyport_r() returned: 0 (success)  (buflen=87)
s_name=echo; s_proto=tcp; s_port=7; aliases=
$ ./a.out 77777 tcp
getservbyport_r() returned: 0 (success)  (buflen=1024)
Call failed/record not found

Program source

#define _GNU_SOURCE
#include <ctype.h>
#include <errno.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_BUF 10000
int
main(int argc, char *argv[])
{
    int buflen, erange_cnt, port, s;
    struct servent result_buf;
    struct servent *result;
    char buf[MAX_BUF];
    char *protop;
    if (argc < 3) {
        printf("Usage: %s port-num proto-name [buflen]

“, argv[0]); exit(EXIT_FAILURE); } port = htons(atoi(argv[1])); protop = (strcmp(argv[2], “null”) == 0 || strcmp(argv[2], “NULL”) == 0) ? NULL : argv[2]; buflen = 1024; if (argc > 3) buflen = atoi(argv[3]); if (buflen > MAX_BUF) { printf(“Exceeded buffer limit (%d) “, MAX_BUF); exit(EXIT_FAILURE); } erange_cnt = 0; do { s = getservbyport_r(port, protop, &result_buf, buf, buflen, &result); if (s == ERANGE) { if (erange_cnt == 0) printf(“ERANGE! Retrying with larger buffer “); erange_cnt++; /* Increment a byte at a time so we can see exactly what size buffer was required. */ buflen++; if (buflen > MAX_BUF) { printf(“Exceeded buffer limit (%d) “, MAX_BUF); exit(EXIT_FAILURE); } } } while (s == ERANGE); printf(“getservbyport_r() returned: %s (buflen=%d) “, (s == 0) ? “0 (success)” : (s == ENOENT) ? “ENOENT” : strerror(s), buflen); if (s != 0 || result == NULL) { printf(“Call failed/record not found “); exit(EXIT_FAILURE); } printf(“s_name=%s; s_proto=%s; s_port=%d; aliases=”, result_buf.s_name, result_buf.s_proto, ntohs(result_buf.s_port)); for (char **p = result_buf.s_aliases; *p != NULL; p++) printf("%s “, *p); printf(” “); exit(EXIT_SUCCESS); }

SEE ALSO

getservent(3), services(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2067 - Linux cli command revoutputam

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command revoutputam and provides detailed information about the command revoutputam, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the revoutputam.

NAME 🖥️ revoutputam 🖥️

Reverse output strings sample extension

SYNOPSIS

@load “revoutput”

BEGIN { REVOUT = 1 } # Reverse all output strings

DESCRIPTION

The revoutput extension adds a simple output wrapper that reverses the characters in each output line. It’s main purpose is to show how to write an output wrapper, although it may be mildly amusing for the unwary.

EXAMPLE

@load "revoutput"

BEGIN {
    REVOUT = 1
    print "hello, world" > "/dev/stdout"
}

The output from this program is:

dlrow ,olleh

BUGS

This extension does not affect the default standard output.

SEE ALSO

GAWK: Effective AWK Programming, filefuncs(3am), fnmatch(3am), fork(3am), inplace(3am), ordchr(3am), readdir(3am), readfile(3am), rwarray(3am), time(3am).

AUTHOR

Arnold Robbins, [email protected].

COPYING PERMISSIONS

Copyright © 2012, 2013, 2018, Free Software Foundation, Inc.

Permission is granted to make and distribute verbatim copies of this manual page provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to process this file through troff and print the results, provided the printed document carries copying permission notice identical to this one except for the removal of this paragraph (this paragraph not being relevant to the printed manual page).

Permission is granted to copy and distribute modified versions of this manual page under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual page into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2068 - Linux cli command scalbnf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command scalbnf and provides detailed information about the command scalbnf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the scalbnf.

NAME 🖥️ scalbnf 🖥️

multiply floating-point number by integral power of radix

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double scalbln(double x, long exp);
float scalblnf(float x, long exp);
long double scalblnl(long double x, long exp);
double scalbn(double x, int exp);
float scalbnf(float x, int exp);
long double scalbnl(long double x, int exp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

scalbln(), scalblnf(), scalblnl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE

scalbn(), scalbnf(), scalbnl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions multiply their first argument x by FLT_RADIX (probably 2) to the power of exp, that is:

    x * FLT_RADIX ** exp

The definition of FLT_RADIX can be obtained by including <float.h>.

RETURN VALUE

On success, these functions return x * FLT_RADIX ** exp.

If x is a NaN, a NaN is returned.

If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.

If x is +0 (-0), +0 (-0) is returned.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with a sign the same as x.

If the result underflows, a range error occurs, and the functions return zero, with a sign the same as x.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error, overflow
An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error, underflow
errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

scalbn(), scalbnf(), scalbnl(), scalbln(), scalblnf(), scalblnl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

HISTORY

These functions differ from the obsolete functions described in scalb(3) in the type of their second argument. The functions described on this page have a second argument of an integral type, while those in scalb(3) have a second argument of type double.

NOTES

If FLT_RADIX equals 2 (which is usual), then scalbn() is equivalent to ldexp(3).

BUGS

Before glibc 2.20, these functions did not set errno for range errors.

SEE ALSO

ldexp(3), scalb(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2069 - Linux cli command String_Randompm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command String_Randompm and provides detailed information about the command String_Randompm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the String_Randompm.

NAME 🖥️ String_Randompm 🖥️

Perl module to generate random strings based on a pattern

VERSION

version 0.32

SYNOPSIS

use String::Random; my $string_gen = String::Random->new; print $string_gen->randregex(\d\d\d); # Prints 3 random digits # Prints 3 random printable characters print $string_gen->randpattern("…");

or

use String::Random qw(random_regex random_string); print random_regex(\d\d\d); # Also prints 3 random digits print random_string("…"); # Also prints 3 random printable characters

DESCRIPTION

This module makes it trivial to generate random strings.

As an example, let’s say you are writing a script that needs to generate a random password for a user. The relevant code might look something like this:

use String::Random; my $pass = String::Random->new; print “Your password is “, $pass->randpattern(“CCcc!ccn”), " “;

This would output something like this:

Your password is UDwp$tj5

NOTE!!!: currently, String::Random defaults to Perl’s built-in predictable random number generator so the passwords generated by it are insecure. See the rand_gen option to String::Random constructor to specify a more secure random number generator. There is no equivalent to this in the procedural interface, you must use the object-oriented interface to get this functionality.

If you are more comfortable dealing with regular expressions, the following code would have a similar result:

use String::Random; my $pass = String::Random->new; print “Your password is “, $pass->randregex([A-Z]{2}[a-z]{2}.[a-z]{2}\d), " “;

Patterns

The pre-defined patterns (for use with randpattern() and random_pattern()) are as follows:

c Any Latin lowercase character [a-z] C Any Latin uppercase character [A-Z] n Any digit [0-9] ! A punctuation character [~`!@$%^&*()-_+={}[]|;”.<>?/#,] . Any of the above s A “salt” character [A-Za-z0-9./] b Any binary data

These can be modified, but if you need a different pattern it is better to create another pattern, possibly using one of the pre-defined as a base. For example, if you wanted a pattern A that contained all upper and lower case letters ([A-Za-z]), the following would work:

my $gen = String::Random->new; $gen->{A} = [ A..Z, a..z ];

or

my $gen = String::Random->new; $gen->{A} = [ @{$gen->{C}}, @{$gen->{c}} ];

or

my $gen = String::Random->new; $gen->set_pattern(A => [ A..Z, a..z ]);

The random_string function, described below, has an alternative interface for adding patterns.

Methods

new

new max => number

new rand_gen => sub

Create a new String::Random object. Optionally a parameter max can be included to specify the maximum number of characters to return for * and other regular expression patterns that do not return a fixed number of characters. Optionally a parameter rand_gen can be included to specify a subroutine coderef for generating the random numbers used in this module. The coderef must accept one argument max and return an integer between 0 and max - 1. The default rand_gen coderef is sub { my ($max) = @_; return int rand $max; }

randpattern LIST
The randpattern method returns a random string based on the concatenation of all the pattern strings in the list. It will return a list of random strings corresponding to the pattern strings when used in list context.

randregex LIST
The randregex method returns a random string that will match the regular expression passed in the list argument. Please note that the arguments to randregex are not real regular expressions. Only a small subset of regular expression syntax is actually supported. So far, the following regular expression elements are supported: \w Alphanumeric + “_”. \d Digits. \W Printable characters other than those in \w. \D Printable characters other than those in \d. . Printable characters. [] Character classes. {} Repetition. * Same as {0,}. ? Same as {0,1}. + Same as {1,}. Regular expression support is still somewhat incomplete. Currently special characters inside [] are not supported (with the exception of - to denote ranges of characters). The parser doesn’t care for spaces in the regular expression either.

get_pattern STRING
Return a pattern given a name. my $gen = String::Random->new; $gen->get_pattern(C); (Added in version 0.32.)

set_pattern STRING ARRAYREF
Add or redefine a pattern given a name and a character set. my $gen = String::Random->new; $gen->set_pattern(A => [ A..Z, a..z ]); (Added in version 0.32.)

from_pattern
IGNORE! - for compatibility with an old version. DO NOT USE!

Functions

random_string PATTERN,LIST

random_string PATTERN

When called with a single scalar argument, random_string returns a random string using that scalar as a pattern. Optionally, references to lists containing other patterns can be passed to the function. Those lists will be used for 0 through 9 in the pattern (meaning the maximum number of lists that can be passed is 10). For example, the following code: print random_string(“0101”, [“a”, “b”, “c”], [“d”, “e”, “f”]), " “; would print something like this: cebd

random_regex REGEX_IN_STRING
Prints a string for the regular expression given as the string. See the synposis for example.

BUGS

This is Bug FreeX code. (At least until somebody finds oneX)

Please report bugs here:

<https://rt.cpan.org/Public/Dist/Display.html?Name=String-Random> .

AUTHOR

Original Author: Steven Pritchard [email protected]

Now maintained by: Shlomi Fish ( <http://www.shlomifish.org/> ).

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

perl (1).

SUPPORT

Websites

The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources.

  • MetaCPAN A modern, open-source CPAN search engine, useful to view POD in HTML format. <https://metacpan.org/release/String-Random>

  • RT: CPAN’s Bug Tracker The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN. <https://rt.cpan.org/Public/Dist/Display.html?Name=String-Random>

  • CPANTS The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. <http://cpants.cpanauthors.org/dist/String-Random>

  • CPAN Testers The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions. <http://www.cpantesters.org/distro/S/String-Random>

  • CPAN Testers Matrix The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. <http://matrix.cpantesters.org/?dist=String-Random>

  • CPAN Testers Dependencies The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. <http://deps.cpantesters.org/?module=String::Random>

Bugs / Feature Requests

Please report any bugs or feature requests by email to bug-string-random at rt.cpan.org, or through the web interface at <https://rt.cpan.org/Public/Bug/Report.html?Queue=String-Random>. You will be automatically notified of any progress on the request by the system.

Source Code

The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :)

<https://github.com/shlomif/string-random>

git clone http://github.com/shlomif/String-Random

AUTHOR

Shlomi Fish <[email protected]>

BUGS

Please report any bugs or feature requests on the bugtracker website <https://github.com/shlomif/string-random/issues>

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

COPYRIGHT AND LICENSE

This software is copyright (c) 2021 by Shlomi Fish.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2070 - Linux cli command Spreadsheet_WriteExcel_Formulapm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_WriteExcel_Formulapm and provides detailed information about the command Spreadsheet_WriteExcel_Formulapm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_WriteExcel_Formulapm.

NAME 🖥️ Spreadsheet_WriteExcel_Formulapm 🖥️

A class for generating Excel formulas

SYNOPSIS

See the documentation for Spreadsheet::WriteExcel

DESCRIPTION

This module is used by Spreadsheet::WriteExcel. You do not need to use it directly.

NOTES

The following notes are to help developers and maintainers understand the sequence of operation. They are also intended as a pro-memoria for the author. ;-)

Spreadsheet::WriteExcel::Formula converts a textual representation of a formula into the pre-parsed binary format that Excel uses to store formulas. For example 1+2*3 is stored as follows: 1E 01 00 1E 02 00 1E 03 00 05 03.

This string is comprised of operators and operands arranged in a reverse-Polish format. The meaning of the tokens in the above example is shown in the following table:

Token Name Value 1E ptgInt 0001 (stored as 01 00) 1E ptgInt 0002 (stored as 02 00) 1E ptgInt 0003 (stored as 03 00) 05 ptgMul 03 ptgAdd

The tokens and token names are defined in the Excel Developer’s Kit from Microsoft Press. ptg stands for Parse ThinG (as in That lexer can’t grok it, it’s a parse thang.)

In general the tokens fall into two categories: operators such as ptgMul and operands such as ptgInt. When the formula is evaluated by Excel the operand tokens push values onto a stack. The operator tokens then pop the required number of operands off of the stack, perform an operation and push the resulting value back onto the stack. This methodology is similar to the basic operation of a reverse-Polish (RPN) calculator.

Spreadsheet::WriteExcel::Formula parses a formula using a Parse::RecDescent parser (at a later stage it may use a Parse::Yapp parser or Parse::FastDescent).

The parser converts the textual representation of a formula into a parse tree. Thus, 1+2*3 is converted into something like the following, e stands for expression:

e / | \ 1 + e / | \ 2 * 3

The function _reverse_tree() recurses down through this structure swapping the order of operators followed by operands to produce a reverse-Polish tree. In other words the formula is converted from in-fix notation to post-fix. Following the above example the resulting tree would look like this:

e / | \ 1 e + / | \ 2 3 *

The result of the recursion is a single array of tokens. In our example the simplified form would look like the following:

(1, 2, 3, *, +)

The actual return value contains some additional information to help in the secondary parsing stage:

(_num, 1, _num, 2, _num, 3, ptgMul, ptgAdd, _arg, 1)

The additional tokens are:

Token Meaning _num The next token is a number _str The next token is a string _ref2d The next token is a 2d cell reference _ref3d The next token is a 3d cell reference _range2d The next token is a 2d range _range3d The next token is a 3d range _funcV The next token is a function _arg The next token is the number of args for a function _class The next token is a function name _vol The formula contains a voltile function

The _arg token is generated for all lists but is only used for functions that take a variable number of arguments.

The _class token indicates the start of the arguments to a function. This allows the post-processor to decide the class of the ref and range arguments that the function takes. The class can be reference, value or array. Since function calls can be nested, the class variable is stored on a stack in the @class array. The class of the ref or range is then read as the top element of the stack $class[-1]. When a _funcV is read it pops the class value.

Certain Excel functions such as RAND() and NOW() are designated as volatile and must be recalculated by Excel every time that a cell is updated. Any formulas that contain one of these functions has a specially formatted ptgAttr tag prepended to it to indicate that it is volatile.

A secondary parsing stage is carried out by parse_tokens() which converts these tokens into a binary string. For the 1+2*3 example this would give:

1E 01 00 1E 02 00 1E 03 00 05 03

This two-pass method could probably have been reduced to a single pass through the Parse::RecDescent parser. However, it was easier to develop and debug this way.

The token values and formula values are stored in the %ptg and %functions hashes. These hashes and the parser object $parser are exposed as global data. This breaks the OO encapsulation, but means that they can be shared by several instances of Spreadsheet::WriteExcel called from the same program.

Non-English function names can be added to the %functions hash using the function_locale.pl program in the examples directory of the distro. The supported languages are: German, French, Spanish, Portuguese, Dutch, Finnish, Italian and Swedish. These languages are not added by default because there are conflicts between functions names in different languages.

The parser is initialised by _init_parser(). The initialisation is delayed until the first formula is parsed. This eliminates the overhead of generating the parser in programs that are not processing formulas. (The parser should really be pre-compiled, this is to-do when the grammar stabilises).

AUTHOR

John McNamara [email protected]

COPYRIGHT

Copyright MM-MMX, John McNamara.

All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2071 - Linux cli command XtAppAddConverter

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppAddConverter and provides detailed information about the command XtAppAddConverter, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppAddConverter.

NAME 🖥️ XtAppAddConverter 🖥️

register resource converter

SYNTAX

#include <X11/Intrinsic.h>

void XtAppAddConverter(XtAppContext app_context, const char *from_type, const char *to_type, XtConverter converter, XtConvertArgList convert_args, Cardinal num_args);

void XtAddConverter(const char *from_type, const char *to_type, XtConverter converter, XtConvertArgList convert_args, Cardinal num_args);

ARGUMENTS

app_context
Specifies the application context.

converter
Specifies the type converter procedure.

convert_args
Specifies how to compute the additional arguments to the converter or NULL.

from_type
Specifies the source type.

num_args
Specifies the number of additional arguments to the converter or zero.

to_type
Specifies the destination type.

DESCRIPTION

XtAppAddConverter is equivalent in function to XtAppSetTypeConverter with cache_type equal to XtCacheAll for old-format type converters. It has been superseded by XtAppSetTypeConverter.

XtAddConverter is equivalent in function to XtSetTypeConverter with cache_type equal to XtCacheAll for old-format type converters. It has been superseded by XtSetTypeConverter.

SEE ALSO

XtConvert(3), XtStringConversionWarning(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2072 - Linux cli command tanf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tanf and provides detailed information about the command tanf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tanf.

NAME 🖥️ tanf 🖥️

tangent function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double tan(double x);
float tanf(float x);
long double tanl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

tanf(), tanl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the tangent of x, where x is given in radians.

RETURN VALUE

On success, these functions return the tangent of x.

If x is a NaN, a NaN is returned.

If x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned.

If the correct result would overflow, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the mathematically correct sign.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is an infinity
errno is set to EDOM (but see BUGS). An invalid floating-point exception (FE_INVALID) is raised.

Range error: result overflow
An overflow floating-point exception (FE_OVERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tan(), tanf(), tanl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

BUGS

Before glibc 2.10, the glibc implementation did not set errno to EDOM when a domain error occurred.

SEE ALSO

acos(3), asin(3), atan(3), atan2(3), cos(3), ctan(3), sin(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2073 - Linux cli command STAILQ_FIRST

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command STAILQ_FIRST and provides detailed information about the command STAILQ_FIRST, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the STAILQ_FIRST.

NAME 🖥️ STAILQ_FIRST 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2074 - Linux cli command XtVaSetValues

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtVaSetValues and provides detailed information about the command XtVaSetValues, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtVaSetValues.

NAME 🖥️ XtVaSetValues 🖥️

obtain and set widget resources

SYNTAX

#include <X11/Intrinsic.h>

void XtSetValues(Widget w, ArgList args, Cardinal num_args);

void XtVaSetValues(Widget w, … );

void XtSetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);

void XtVaSetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, … );

void XtGetValues(Widget w, ArgList args, Cardinal num_args);

void XtVaGetValues(Widget w, … );

void XtGetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);

void XtVaGetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, … );

ARGUMENTS

args
Specifies the argument list of name/address pairs that contain the resource name and either the address into which the resource value is to be stored or their new values.

base
Specifies the base address of the subpart data structure where the resources should be retrieved or written.

num_args
Specifies the number of arguments in the argument list.

resources
Specifies the nonwidget resource list or values.

num_resources
Specifies the number of resources in the resource list.

  1. Specifies the widget.


Specifies the variable argument list of name/address pairs that contain the resource name and either the address into which the resource value is to be stored or their new values.

DESCRIPTION

The XtSetValues function starts with the resources specified for the Core widget fields and proceeds down the subclass chain to the widget. At each stage, it writes the new value (if specified by one of the arguments) or the existing value (if no new value is specified) to a new widget data record. XtSetValues then calls the set_values procedures for the widget in superclass-to-subclass order. If the widget has any non-NULL set_values_hook fields, these are called immediately after the corresponding set_values procedure. This procedure permits subclasses to set nonwidget data for XtSetValues.

If the widget’s parent is a subclass of constraintWidgetClass, XtSetValues also updates the widget’s constraints. It starts with the constraint resources specified for constraintWidgetClass and proceeds down the subclass chain to the parent’s class. At each stage, it writes the new value or the existing value to a new constraint record. It then calls the constraint set_values procedures from constraintWidgetClass down to the parent’s class. The constraint set_values procedures are called with widget arguments, as for all set_values procedures, not just the constraint record arguments, so that they can make adjustments to the desired values based on full information about the widget.

XtSetValues determines if a geometry request is needed by comparing the current widget to the new widget. If any geometry changes are required, it makes the request, and the geometry manager returns XtGeometryYes, XtGeometryAlmost, or XtGeometryNo. If XtGeometryYes, XtSetValues calls the widget’s resize procedure. If XtGeometryNo, XtSetValues resets the geometry fields to their original values. If XtGeometryAlmost, XtSetValues calls the set_values_almost procedure, which determines what should be done and writes new values for the geometry fields into the new widget. XtSetValues then repeats this process, deciding once more whether the geometry manager should be called.

Finally, if any of the set_values procedures returned True, XtSetValues causes the widget’s expose procedure to be invoked by calling the Xlib XClearArea function on the widget’s window.

The XtSetSubvalues function stores resources into the structure identified by base.

The XtGetValues function starts with the resources specified for the core widget fields and proceeds down the subclass chain to the widget. The value field of a passed argument list should contain the address into which to store the corresponding resource value. It is the caller’s responsibility to allocate and deallocate this storage according to the size of the resource representation type used within the widget.

If the widget’s parent is a subclass of constraintWidgetClass, XtGetValues then fetches the values for any constraint resources requested. It starts with the constraint resources specified for constraintWidgetClass and proceeds down to the subclass chain to the parent’s constraint resources. If the argument list contains a resource name that is not found in any of the resource lists searched, the value at the corresponding address is not modified. Finally, if the get_values_hook procedures are non-NULL, they are called in superclass-to-subclass order after all the resource values have been fetched by XtGetValues. This permits a subclass to provide nonwidget resource data to XtGetValues.

The XtGetSubvalues function obtains resource values from the structure identified by base.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2075 - Linux cli command pthread_attr_setdetachstate

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_attr_setdetachstate and provides detailed information about the command pthread_attr_setdetachstate, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_attr_setdetachstate.

NAME 🖥️ pthread_attr_setdetachstate 🖥️

set/get detach state attribute in thread attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_attr_setdetachstate(pthread_attr_t *attr",int"detachstate);
int pthread_attr_getdetachstate(const pthread_attr_t *attr,
 int *detachstate);

DESCRIPTION

The pthread_attr_setdetachstate() function sets the detach state attribute of the thread attributes object referred to by attr to the value specified in detachstate. The detach state attribute determines whether a thread created using the thread attributes object attr will be created in a joinable or a detached state.

The following values may be specified in detachstate:

PTHREAD_CREATE_DETACHED
Threads that are created using attr will be created in a detached state.

PTHREAD_CREATE_JOINABLE
Threads that are created using attr will be created in a joinable state.

The default setting of the detach state attribute in a newly initialized thread attributes object is PTHREAD_CREATE_JOINABLE.

The pthread_attr_getdetachstate() returns the detach state attribute of the thread attributes object attr in the buffer pointed to by detachstate.

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

pthread_attr_setdetachstate() can fail with the following error:

EINVAL
An invalid value was specified in detachstate.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_attr_setdetachstate(), pthread_attr_getdetachstate()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

See pthread_create(3) for more details on detached and joinable threads.

A thread that is created in a joinable state should eventually either be joined using pthread_join(3) or detached using pthread_detach(3); see pthread_create(3).

It is an error to specify the thread ID of a thread that was created in a detached state in a later call to pthread_detach(3) or pthread_join(3).

EXAMPLES

See pthread_attr_init(3).

SEE ALSO

pthread_attr_init(3), pthread_create(3), pthread_detach(3), pthread_join(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2076 - Linux cli command strcasestr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strcasestr and provides detailed information about the command strcasestr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strcasestr.

NAME 🖥️ strcasestr 🖥️

locate a substring

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strstr(const char *haystack, const char *needle);
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <string.h>
char *strcasestr(const char *haystack, const char *needle);

DESCRIPTION

The strstr() function finds the first occurrence of the substring needle in the string haystack. The terminating null bytes (‘�’) are not compared.

The strcasestr() function is like strstr(), but ignores the case of both arguments.

RETURN VALUE

These functions return a pointer to the beginning of the located substring, or NULL if the substring is not found.

If needle is the empty string, the return value is always haystack itself.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strstr()

Thread safetyMT-Safe

strcasestr()

Thread safetyMT-Safe locale

STANDARDS

strstr()
C11, POSIX.1-2008.

strcasestr()
GNU.

HISTORY

strstr()
POSIX.1-2001, C89.

strcasestr()
GNU.

SEE ALSO

memchr(3), memmem(3), strcasecmp(3), strchr(3), string(3), strpbrk(3), strsep(3), strspn(3), strtok(3), wcsstr(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2077 - Linux cli command Unicode_GCStringpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Unicode_GCStringpm and provides detailed information about the command Unicode_GCStringpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Unicode_GCStringpm.

NAME 🖥️ Unicode_GCStringpm 🖥️

String as Sequence of UAX #29 Grapheme Clusters

SYNOPSIS

use Unicode::GCString; $gcstring = Unicode::GCString->new($string);

DESCRIPTION

Unicode::GCString treats Unicode string as a sequence of extended grapheme clusters defined by Unicode Standard Annex #29 [UAX #29].

Grapheme cluster is a sequence of Unicode character(s) that consists of one grapheme base and optional grapheme extender and/or “prepend” character. It is close in that people consider as character.

Public Interface

Constructors

new (STRING, [KEY => VALUE, …])

new (STRING, [LINEBREAK])

Constructor. Create new grapheme cluster string (Unicode::GCString object) from Unicode string STRING. About optional KEY => VALUE pairs see “Options” in Unicode::LineBreak. On second form, Unicode::LineBreak object LINEBREAK controls breaking features. Note: The first form was introduced by release 2012.10.

copy
Copy constructor. Create a copy of grapheme cluster string. Next position of new string is set at beginning.

Sizes

chars
Instance method. Returns number of Unicode characters grapheme cluster string includes, i.e. length as Unicode string.

columns
Instance method. Returns total number of columns of grapheme clusters defined by built-in character database. For more details see “DESCRIPTION” in Unicode::LineBreak.

length
Instance method. Returns number of grapheme clusters contained in grapheme cluster string.

Operations as String

as_string

“““OBJECT”””

Instance method. Convert grapheme cluster string to Unicode string explicitly.

cmp (STRING)

STRING “cmp” STRING

Instance method. Compare strings. There are no oddities. One of each STRING may be Unicode string.

concat (STRING)

STRING “.” STRING

Instance method. Concatenate STRINGs. One of each STRING may be Unicode string. Note that number of columns (see columns()) or grapheme clusters (see length()) of resulting string is not always equal to sum of both strings. Next position of new string is that set on the left value.

join ([STRING, …])
Instance method. Join STRINGs inserting grapheme cluster string. Any of STRINGs may be Unicode string.

substr (OFFSET, [LENGTH, [REPLACEMENT]])
Instance method. Returns substring of grapheme cluster string. OFFSET and LENGTH are based on grapheme clusters. If REPLACEMENT is specified, substring is replaced by it. REPLACEMENT may be Unicode string. Note: This method cannot return the lvalue, unlike built-in substr().

Operations as Sequence of Grapheme Clusters

as_array

“@{“OBJECT”}”

as_arrayref

Instance method. Convert grapheme cluster string to an array of grapheme clusters.

eos
Instance method. Test if current position is at end of grapheme cluster string.

item ([OFFSET])
Instance method. Returns OFFSET-th grapheme cluster. If OFFSET was not specified, returns next grapheme cluster.

next

“<“OBJECT”>”

Instance method, iterative. Returns next grapheme cluster and increment next position.

pos ([OFFSET])
Instance method. If optional OFFSET is specified, set next position by it. Returns next position of grapheme cluster string.

Miscelaneous

lbc
Instance method. Returns Line Breaking Class (See Unicode::LineBreak) of the first character of first grapheme cluster.

lbcext
Instance method. Returns Line Breaking Class (See Unicode::LineBreak) of the last grapheme extender of last grapheme cluster. If there are no grapheme extenders or its class is CM, value of last grapheme base will be returned.

CAVEATS

  • The grapheme cluster should not be referred to as “grapheme” even though Larry does.

  • On Perl around 5.10.1, implicit conversion from Unicode::GCString object to Unicode string sometimes let "utf8_mg_pos_cache_update" cache be confused. For example, instead of doing $sub = substr($gcstring, $i, $j); do $sub = substr("$gcstring", $i, $j); $sub = substr($gcstring->as_string, $i, $j);

  • This module implements default algorithm for determining grapheme cluster boundaries. Tailoring mechanism has not been supported yet.

VERSION

Consult $VERSION variable.

Incompatible Changes

Release 2013.10

The new() method can take non-Unicode string argument. In this case it will be decoded by iso-8859-1 (Latin 1) character set. That method of former releases would die with non-Unicode inputs.

SEE ALSO

[UAX #29] Mark Davis (ed.) (2009-2013). Unicode Standard Annex #29: Unicode Text Segmentation, Revisions 15-23. <http://www.unicode.org/reports/tr29/>.

AUTHOR

Hatuka*nezumi - IKEDA Soji <hatuka(at)nezumi.nu>

COPYRIGHT

Copyright (C) 2009-2013 Hatuka*nezumi - IKEDA Soji.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2078 - Linux cli command Mail_Utilpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Mail_Utilpm and provides detailed information about the command Mail_Utilpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Mail_Utilpm.

NAME 🖥️ Mail_Utilpm 🖥️

mail utility functions

INHERITANCE

Mail::Util is a Exporter

SYNOPSIS

use Mail::Util qw( … );

DESCRIPTION

This package provides several mail related utility functions. Any function required must by explicitly listed on the use line to be exported into the calling package.

FUNCTIONS

mailaddress( [$address] )
Return a guess at the current users mail address. The user can force the return value by setting the MAILADDRESS environment variable. [2.10] You may set the $address via the parameter. WARNING: When not supplied via the environment variable, <mailaddress> looks at various configuration files and other environmental data. Although this seems to be smart behavior, this is not predictable enough (IMHO) to be used. Please set the MAILADDRESS explicitly, and do not trust on the “automatic detection”, even when that produces a correct address (on the moment) example: # in your main script $ENV{MAILADDRESS} = [email protected]; # everywhere else use Mail::Util mailaddress; print mailaddress; # since v2.10 mailaddress “[email protected]”;

maildomain()
Attempt to determine the current user mail domain string via the following methods

  • Look for the MAILDOMAIN environment variable, which can be set from outside the program. This is by far the best way to configure the domain.

  • Look for a sendmail.cf file and extract DH parameter

  • Look for a smail config file and usr the first host defined in hostname(s)

  • Try an SMTP connect (if Net::SMTP exists) first to mailhost then localhost

  • Use value from Net::Domain::domainname (if Net::Domain exists)

WARNING: On modern machines, there is only one good way to provide information to this method: the first; always explicitly configure the MAILDOMAIN. example: # in your main script $ENV{MAILDOMAIN} = example.com; # everywhere else use Mail::Util maildomain; print maildomain;

read_mbox($file)
Read $file, a binmail mailbox file, and return a list of references. Each reference is a reference to an array containing one message. WARNING: This method does not quote lines which accidentally also start with the message separator From, so this implementation can be considered broken. See Mail::Box::Mbox

SEE ALSO

This module is part of the MailTools distribution, http://perl.overmeer.net/mailtools/.

AUTHORS

The MailTools bundle was developed by Graham Barr. Later, Mark Overmeer took over maintenance without commitment to further development.

Mail::Cap by Gisle Aas <[email protected]>. Mail::Field::AddrList by Peter Orbaek <[email protected]>. Mail::Mailer and Mail::Send by Tim Bunce <[email protected]>. For other contributors see ChangeLog.

LICENSE

Copyrights 1995-2000 Graham Barr <[email protected]> and 2001-2017 Mark Overmeer <[email protected]>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2079 - Linux cli command XShapeSelectInput

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XShapeSelectInput and provides detailed information about the command XShapeSelectInput, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XShapeSelectInput.

NAME 🖥️ XShapeSelectInput 🖥️

X nonrectangular shape functions

SYNTAX

#include <X11/extensions/shape.h>
Bool XShapeQueryExtension (
	Display *dpy,
	int *event_basep,
	int *error_basep);
Status XShapeQueryVersion (
	Display *dpy,
	int *major_versionp,
	int *minor_versionp);
void XShapeCombineRegion (
	Display *dpy,
	Window dest,
	int destKind,
	int xOff,
	int yOff,
	struct _XRegion *r,
	int op);
void XShapeCombineRectangles (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	XRectangle *rects,
	int n_rects,
	int op,
	int ordering);
void XShapeCombineMask (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	Pixmap src,
	int op);
void XShapeCombineShape (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	Pixmap src,
	int srcKind,
	int op);
void XShapeOffsetShape (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff);
Status XShapeQueryExtents (
	Display *dpy,
	Window window,
	int *bShaped,
	int *xbs,
	int *ybs,
	unsigned int *wbs,
	unsigned int *hbs,
	int *cShaped,
	int *xcs,
	int *ycs,
	unsigned int *wcs,
	unsigned int *hcs);
void XShapeSelectInput (
	Display *dpy,
	Window window,
	unsigned longmask);
unsigned long XShapeInputSelected (
	Display *dpy,
	Window window);
XRectangle *XShapeGetRectangles (
	Display *dpy,
	Window window,
	int kind,
	int *count,
	int *ordering);

STRUCTURES

typedef struct {
    int type;	/* of event */
    unsigned long serial;	/* # of last request processed by server */
    Bool send_event;	/* true if this came from a SendEvent request */
    Display *display;	/* Display the event was read from */
    Window window;	/* window of event */
    int kind;	/* ShapeBounding or ShapeClip */
    int x, y;	/* extents of new region */
    unsigned width, height;
    Time time;	/* server timestamp when region changed */
    Bool shaped;	/* true if the region exists */
} XShapeEvent;

DESCRIPTION

The X11 Nonrectangular Window Shape Extension adds nonrectangular windows to the X Window System.

PREDEFINED VALUES

Operations:

 ShapeSet   ShapeUnion   ShapeIntersect   ShapeSubtract   ShapeInvert 

Shape Kinds:

 ShapeBounding   ShapeClip 

Event defines:

 ShapeNotifyMask   ShapeNotify 

BUGS

This manual page needs a lot more work.

SEE ALSO

X11 Nonrectangular Window Shape Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2080 - Linux cli command Net_DBus_Binding_Introspectorpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Binding_Introspectorpm and provides detailed information about the command Net_DBus_Binding_Introspectorpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Binding_Introspectorpm.

NAME 🖥️ Net_DBus_Binding_Introspectorpm 🖥️

Handler for object introspection data

SYNOPSIS

# Create an object populating with info from an # XML doc containing introspection data. my $ins = Net::DBus::Binding::Introspector->new(xml => $data); # Create an object, defining introspection data # programmatically my $ins = Net::DBus::Binding::Introspector->new(object_path => $object->get_object_path); $ins->add_method(“DoSomething”, [“string”], [], “org.example.MyObject”); $ins->add_method(“TestSomething”, [“int32”], [], “org.example.MyObject”);

DESCRIPTION

This class is responsible for managing introspection data, and answering questions about it. This is not intended for use by application developers, whom should instead consult the higher level API in Net::DBus::Exporter.

METHODS

my $ins = Net::DBus::Binding::Introspector->new(object_path => $object_path, xml => $xml);
Creates a new introspection data manager for the object registered at the path specified for the object_path parameter. The optional xml parameter can be used to pre-load the manager with introspection metadata from an XML document.

$ins->add_interface($name)
Register the object as providing an interface with the name $name

my $bool = $ins->has_interface($name)
Return a true value if the object is registered as providing an interface with the name $name; returns false otherwise.

my @interfaces = $ins->has_method($name, [$interface])
Return a list of all interfaces provided by the object, which contain a method called $name. This may be an empty list. The optional $interface parameter can restrict the check to just that one interface.

my $boolean = $ins->is_method_allowed($name[, $interface])
Checks according to whether the remote caller is allowed to invoke the method $name on the object associated with this introspector. If this object has ‘strict exports’ enabled, then only explicitly exported methods will be allowed. The optional $interface parameter can restrict the check to just that one interface. Returns a non-zero value if the method should be allowed.

my @interfaces = $ins->has_signal($name)
Return a list of all interfaces provided by the object, which contain a signal called $name. This may be an empty list.

my @interfaces = $ins->has_property($name)
Return a list of all interfaces provided by the object, which contain a property called $name. This may be an empty list. The optional $interface parameter can restrict the check to just that one interface.

$ins->add_method($name, $params, $returns, $interface, $attributes, $paramnames, $returnnames);
Register the object as providing a method called $name accepting parameters whose types are declared by $params and returning values whose type are declared by $returns. The method will be scoped to the interface named by $interface. The $attributes parameter is a hash reference for annotating the method. The $paramnames and $returnames parameters are a list of argument and return value names.

$ins->add_signal($name, $params, $interface, $attributes);
Register the object as providing a signal called $name with parameters whose types are declared by $params. The signal will be scoped to the interface named by $interface. The $attributes parameter is a hash reference for annotating the signal.

$ins->add_property($name, $type, $access, $interface, $attributes);
Register the object as providing a property called $name with a type of $type. The $access parameter can be one of read, write, or readwrite. The property will be scoped to the interface named by $interface. The $attributes parameter is a hash reference for annotating the signal.

my $boolean = $ins->is_method_deprecated($name, $interface)
Returns a true value if the method called $name in the interface $interface is marked as deprecated

my $boolean = $ins->is_signal_deprecated($name, $interface)
Returns a true value if the signal called $name in the interface $interface is marked as deprecated

my $boolean = $ins->is_property_deprecated($name, $interface)
Returns a true value if the property called $name in the interface $interface is marked as deprecated

my $boolean = $ins->does_method_reply($name, $interface)
Returns a true value if the method called $name in the interface $interface will generate a reply. Returns a false value otherwise.

my $boolean = $ins->method_has_strict_exceptions($name, $interface)
Returns true if the method called $name in the interface $interface has the strict_exceptions attribute; that is any exceptions which aren’t Net::DBus::Error objects should not be caught and allowed to travel up the stack.

my @names = $ins->list_interfaces
Returns a list of all interfaces registered as being provided by the object.

my @names = $ins->list_methods($interface)
Returns a list of all methods registered as being provided by the object, within the interface $interface.

my @names = $ins->list_signals($interface)
Returns a list of all signals registered as being provided by the object, within the interface $interface.

my @names = $ins->list_properties($interface)
Returns a list of all properties registered as being provided by the object, within the interface $interface.

my @paths = $self->list_children;
Returns a list of object paths representing all the children of this node.

my $path = $ins->get_object_path
Returns the path of the object associated with this introspection data

my @types = $ins->get_method_params($interface, $name)
Returns a list of declared data types for parameters of the method called $name within the interface $interface.

my @types = $ins->get_method_param_names($interface, $name)
Returns a list of declared names for parameters of the method called $name within the interface $interface.

my @types = $ins->get_method_returns($interface, $name)
Returns a list of declared data types for return values of the method called $name within the interface $interface.

my @types = $ins->get_method_return_names($interface, $name)
Returns a list of declared names for return values of the method called $name within the interface $interface.

my @types = $ins->get_signal_params($interface, $name)
Returns a list of declared data types for values associated with the signal called $name within the interface $interface.

my @types = $ins->get_signal_param_names($interface, $name)
Returns a list of declared names for values associated with the signal called $name within the interface $interface.

my $type = $ins->get_property_type($interface, $name)
Returns the declared data type for property called $name within the interface $interface.

my $bool = $ins->is_property_readable($interface, $name);
Returns a true value if the property called $name within the interface $interface can have its value read.

my $bool = $ins->is_property_writable($interface, $name);
Returns a true value if the property called $name within the interface $interface can have its value written to.

my $xml = $ins->format([$obj])
Return a string containing an XML document representing the state of the introspection data. The optional $obj parameter can be an instance of Net::DBus::Object to include object specific information in the XML (eg child nodes).

my $xml_fragment = $ins->to_xml
Returns a string containing an XML fragment representing the state of the introspection data. This is basically the same as the format method, but without the leading doctype declaration.

$type = $ins->to_xml_type($type)
Takes a text-based representation of a data type and returns the compact representation used in XML introspection data.

$ins->encode($message, $type, $name, $direction, @args)
Append a set of values <@args> to a message object $message. The $type parameter is either signal or method and $direction is either params or returns. The introspection data will be queried to obtain the declared data types & the argument marshalling accordingly.

my @args = $ins->decode($message, $type, $name, $direction)
Unmarshalls the contents of a message object $message. The $type parameter is either signal or method and $direction is either params or returns. The introspection data will be queried to obtain the declared data types & the arguments unmarshalled accordingly.

AUTHOR

Daniel P. Berrange

COPYRIGHT

Copyright (C) 2004-2011 Daniel P. Berrange

SEE ALSO

Net::DBus::Exporter, Net::DBus::Binding::Message

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2081 - Linux cli command Net_DBus_Callbackpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Callbackpm and provides detailed information about the command Net_DBus_Callbackpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Callbackpm.

NAME 🖥️ Net_DBus_Callbackpm 🖥️

a callback for receiving reactor events

SYNOPSIS

use Net::DBus::Callback; # Assume we have a terminal object and its got a method # to be invoked every time there is input on its terminal. # # To create a callback to invoke this method one might use my $cb = Net::DBus::Callback->new(object => $terminal, method => “handle_stdio”); # Whatever is monitoring the stdio channel, would then # invoke the callback, perhaps passing in a parameter with # some interesting data, such as number of bytes available $cb->invoke($nbytes) #… which results in a call to # $terminal->handle_stdio($nbytes)

DESCRIPTION

This module provides a simple container for storing details about a callback to be invoked at a later date. It is used when registering to receive events from the Net::DBus::Reactor class. NB use of this module in application code is no longer necessary and it remains purely for backwards compatibility. Instead you can simply pass a subroutine code reference in any place where a callback is desired.

METHODS

my $cb = Net::DBus::Callback->new(method => $name, [args => \args])
Creates a new callback object, for invoking a plain old function. The method parameter should be the fully qualified function name to invoke, including the package name. The optional args parameter is an array reference of parameters to be pass to the callback, in addition to those passed into the invoke method.

my $cb = Net::DBus::Callback->new(object => $object, method => $name, [args => \args])
Creates a new callback object, for invoking a method on an object. The method parameter should be the name of the method to invoke, while the object parameter should be a blessed object on which the method will be invoked. The optional args parameter is an array reference of parameters to be pass to the callback, in addition to those passed into the invoke method.

$cb->invoke(@args)
Invokes the callback. The argument list passed to the callback is a combination of the arguments supplied in the callback constructor, followed by the arguments supplied in the invoke method.

AUTHOR

Daniel P. Berrange.

COPYRIGHT

Copyright (C) 2004-2011 Daniel P. Berrange

SEE ALSO

Net::DBus::Reactor

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2082 - Linux cli command XShmDetach

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XShmDetach and provides detailed information about the command XShmDetach, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XShmDetach.

NAME 🖥️ XShmDetach 🖥️

X Shared Memory extension functions

SYNTAX

#include <X11/Xlib.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
Bool	XShmQueryExtension(
	Display *display);
Bool XShmQueryVersion(
	Display *display;
	int *major, *minor;
	Bool *pixmaps);
int XShmPixmapFormat(
	Display *display);
Bool XShmAttach(
	Display *display;
	XShmSegmentInfo *shminfo);
Bool XShmDetach(
	Display *display;
	XShmSegmentInfo *shminfo);

XImage *XShmCreateImage (
	Display *display;
	Visual *visual;
	unsigned int depth;
	int format;
	char *data;
	XShmSegmentInfo *shminfo;
	unsigned int width, height);
Bool XShmPutImage(
	Display *display;
	Drawable d;
	GC gc;
	XImage *image;
	int src_x, src_y, dest_x, dest_y;
	unsigned int width, height;
	bool send_event);
Bool XShmGetImage (
	Display *display;
	Drawable d;
	XImage *image;
	int x, y;
	unsigned long plane_mask);
Pixmap XShmCreatePixmap(
        Display *display;
        Drawable d;
        char *data;
	XShmSegmentInfo *shminfo;
	unsigned int width, height, depth);
Status XShmGetEventBase(
	Display *display);

STRUCTURES

Events:
typedef struct {
    int type;               /* of event */
    unsigned long serial;   /* # of last request processed by server*/
    Bool send_event;        /* true if this came from a SendEvent request*/
    Display *display;       /* Display the event was read from */
    Drawable drawable;      /* drawable of request */
    int major_code;         /* ShmReqCode */
    int minor_code;         /* X_ShmPutImage */
    ShmSeg shmseg;          /* the ShmSeg used in the request*/
    unsigned long offset;   /* the offset into ShmSeg used in the request*/
} XShmCompletionEvent;
a structure of type XShmSegmentInfo :

typedef struct {
    ShmSeg shmseg;      /* resource id */
    int shmid;          /* kernel id */
    char *shmaddr;      /* address in client */
    Bool readOnly;      /* how the server should attach it */
} XShmSegmentInfo;

DESCRIPTION

* XShmQueryExtension * checks to see if the shared memory extensions are available for the specified display.

* XShmQueryVersion * returns the version numbers of the extension implementation. Shared memory pixmaps are supported if the pixmaps argument returns true.

* XShmAttach * tells the server to attach to your shared memory segment. If all goes well, you will get a non-zero status, back and your XImage is ready for use.

* XShmDetach * tells the server to detach from your shared memory segment.

* XShmPutImage * combines an image in memory with a shape of the specified drawable. If XYBitmap format is used, the depth must be one, or a ``BadMatch’’ error results. The foreground pixel in the GC defines the source for the one bits in the image, and the background pixel defines the source for the zero bits. For XYPixmap and ZPixmap, the depth must match the depth of the drawable, or a ``BadMatch’’ error results.

* XShmGetImage * reads image data into a shared memory XImage where display is the display of interest, drawable is the source drawable, image is the destination XImage, x and y are offsets within the drawable, and plane_mask defines which planes are to be read.

* XShmCreateImage * allocates the memory needed for an XImage structure for the specified display but does not allocate space for the image itself.

* XShmPixmapFormat * gets the format for the server. If your application can deal with the server pixmap data format, a shared memory segment and shminfo structure are created.

* XShmCreatePixmap * points to a pixmap which you can manipulate in all of the usual ways, with the added bonus of being able to edit its contents directly through the shared memory segment.

* XShmGetEventBase * gets the completion event value.

SEE ALSO

MIT-SHM - The MIT Shared Memory Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2083 - Linux cli command zip_get_archive_comment

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_get_archive_comment and provides detailed information about the command zip_get_archive_comment, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_get_archive_comment.

libzip (-lzip)

The

function returns the comment for the entire zip archive. The return value is in UTF-8 encoding unless

was specified (see below). This pointer should not be modified or

and becomes invalid when

is closed. If

is not

the integer to which it points will be set to the length of the comment. If

is set to

the original unchanged comment is returned.

Additionally, the following

are supported:

Return the unmodified archive comment as it is in the ZIP archive.

(Default.) Guess the encoding of the archive comment in the ZIP archive and convert it to UTF-8, if necessary.

Follow the ZIP specification for file names and extend it to the archive comment, thus also expecting it in CP-437 encoding. Convert it to UTF-8.

ASCII is a subset of both CP-437 and UTF-8.

Upon successful completion, a pointer to the comment is returned, or

if there is no comment.

was added in libzip 0.7. In libzip 0.11 the type of

was changed from

to

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2084 - Linux cli command Net_Server_PreForkpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Server_PreForkpm and provides detailed information about the command Net_Server_PreForkpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Server_PreForkpm.

NAME 🖥️ Net_Server_PreForkpm 🖥️

Net::Server personality

SYNOPSIS

use base qw(Net::Server::PreFork); sub process_request { #…code… } _ _PACKAGE_ _->run();

DESCRIPTION

Please read the pod on Net::Server and Net::Server::PreForkSimple first. This module is a personality, or extension, or sub class, of the Net::Server::PreForkSimple class which is a sub class of Net::Server. See Net::Server::PreForkSimple.

This personality binds to one or more ports and then forks min_servers child process. The server will make sure that at any given time there are min_spare_servers available to receive a client request, up to max_servers. Each of these children will process up to max_requests client connections. This type is good for a heavily hit site, and should scale well for most applications. (Multi port accept is accomplished using flock to serialize the children).

At this time, it does not appear that this module will pass tests on Win32 systems. Any ideas or patches for making the tests pass would be welcome.

SAMPLE CODE

Please see the sample listed in Net::Server.

COMMAND LINE ARGUMENTS

In addition to the command line arguments of the Net::Server base class and the Net::Server::PreForkSimple parent class, Net::Server::PreFork contains several other configurable parameters. You really should also see Net::Server::PreForkSimple.

Key Value Default min_servers \d+ 5 min_spare_servers \d+ 2 max_spare_servers \d+ 10 max_servers \d+ 50 max_requests \d+ 1000 serialize (flock|semaphore |pipe|none) undef # serialize defaults to flock on multi_port or on Solaris lock_file “filename” File::Temp->new check_for_dead \d+ 30 check_for_waiting \d+ 10 max_dequeue \d+ undef check_for_dequeue \d+ undef child_communication 1 undef

min_servers
The minimum number of servers to keep running.

min_spare_servers
The minimum number of servers to have waiting for requests. Minimum and maximum numbers should not be set to close to each other or the server will fork and kill children too often.

max_spare_servers
The maximum number of servers to have waiting for requests. See min_spare_servers.

max_servers
The maximum number of child servers to start. This does not apply to dequeue processes.

check_for_waiting
Seconds to wait before checking to see if we can kill off some waiting servers.

check_for_spawn
Seconds between checking to see if we need to spawn more children

min_child_ttl
Minimum number of seconds between starting children and killing a child process

child_communication
Enable child communication to parent via unix sockets. If set to true, will let children write to the socket contained in $self->{‘server’}->{‘parent_sock’}. The parent will be notified through child_is_talking_hook where the first argument is the socket to the child. The child’s socket is stored in $self->{‘server’}->{‘children’}->{$child_pid}->{‘sock’}.

serialize
See the documentation under Net::Server::PreForkSimple.

CONFIGURATION FILE

Net::Server::PreFork allows for the use of a configuration file to read in server parameters. The format of this conf file is simple key value pairs. Comments and white space are ignored.

#————– file test.conf ————– ### server information min_servers 20 max_servers 80 min_spare_servers 10 min_spare_servers 15 max_requests 1000 ### user and group to become user somebody group everybody ### logging ? log_file /var/log/server.log log_level 3 pid_file /tmp/server.pid ### access control allow .+(net|com) allow domain\com deny a.+ ### background the process? background 1 ### ports to bind host 127.0.0.1 port localhost:20204 port 20205 ### reverse lookups ? # reverse_lookups on ### enable child communication ? # child_communication #————– file test.conf ————–

PROCESS FLOW

Process flow follows Net::Server until the loop phase. At this point min_servers are forked and wait for connections. When a child accepts a connection, finishes processing a client, or exits, it relays that information to the parent, which keeps track and makes sure there are enough children to fulfill min_servers, min_spare_servers, max_spare_servers, and max_servers.

HOOKS

The PreFork server has the following hooks in addition to the hooks provided by PreForkSimple. See Net::Server::PreForkSimple.

“$self->run_n_children_hook()”
This hook occurs at the top of run_n_children which is called each time the server goes to start more child processes. This gives the parent to do a little of its own accounting (as desired). Idea for this hook came from James FitzGibbon.

“$self->parent_read_hook()”
This hook occurs any time that the parent reads information from the child. The line from the child is sent as an argument.

“$self->child_is_talking_hook()”
This hook occurs if child_communication is true and the child has written to $self->{‘server’}->{‘parent_sock’}. The first argument will be the open socket to the child.

“$self->idle_loop_hook()”
This hook is called in every pass through the main process wait loop, every check_for_waiting seconds. The first argument is a reference to an array of file descriptors that can be read at the moment.

“$self->cleanup_dead_child_hook( $child )”
This hook is called when a dead child is detected. A child is considered dead when the pid does no longer exist. This hook could be used to cleanup possible temporary files or locks left over by a dead child.

HOT DEPLOY

Since version 2.000, the PreFork server has accepted the TTIN and TTOU signals. When a TTIN is received, the min and max_servers are increased by 1. If a TTOU signal is received the min max_servers are decreased by 1. This allows for adjusting the number of handling processes without having to restart the server.

BUGS

Tests don’t seem to work on Win32. Any ideas or patches would be welcome.

TO DO

See Net::Server

AUTHOR

Paul T. Seamons [email protected]

THANKS

See Net::Server

SEE ALSO

Please see also Net::Server::Fork, Net::Server::INET, Net::Server::PreForkSimple, Net::Server::MultiType, Net::Server::Single Net::Server::SIG Net::Server::Daemonize Net::Server::Proto

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2085 - Linux cli command XtPopupSpringLoaded

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtPopupSpringLoaded and provides detailed information about the command XtPopupSpringLoaded, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtPopupSpringLoaded.

NAME 🖥️ XtPopupSpringLoaded 🖥️

map a pop-up

SYNTAX

#include <X11/Intrinsic.h>

void XtPopup(Widget popup_shell, XtGrabKind grab_kind);

void XtPopupSpringLoaded(Widget popup_shell);

void XtCallbackNone(Widget w, XtPointer client_data, XtPointer call_data);

void XtCallbackNonexclusive(Widget w, XtPointer client_data, XtPointer call_data);

void XtCallbackExclusive(Widget w, XtPointer client_data, XtPointer call_data);

ACTIONS

void XtMenuPopup(String shell_name);

ARGUMENTS

call_data
Specifies the callback data, which is not used by this procedure.

client_data
Specifies the pop-up shell.

grab_kind
Specifies the way in which user events should be constrained.

popup_shell
Specifies the widget shell.

  1. Specifies the widget.

DESCRIPTION

The XtPopup function performs the following:

  • Calls XtCheckSubclass to ensure popup_shell is a subclass of Shell.

  • Generates an error if the shell’s popped_up field is already True.

  • Calls the callback procedures on the shell’s popup_callback list.

  • Sets the shell popped_up field to True, the shell spring_loaded field to False, and the shell grab_kind field from grab_kind.

  • If the shell’s create_popup_child field is non-NULL, XtPopup calls it with popup_shell as the parameter.

  • If grab_kind is either XtGrabNonexclusive or XtGrabExclusive, it calls:

XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), False)

  • Calls XtRealizeWidget with popup_shell specified.

  • Calls XMapWindow with popup_shell specified.

The XtPopupSpringLoaded function performs exactly as XtPopup except that it sets the shell spring_loaded field to True and always calls XtAddGrab with exclusive True and spring_loaded True.

The XtCallbackNone, XtCallbackNonexclusive, and XtCallbackExclusive functions call XtPopup with the shell specified by the client data argument and grab_kind set as the name specifies. XtCallbackNone, XtCallbackNonexclusive, and XtCallbackExclusive specify XtGrabNone, XtGrabNonexclusive, and XtGrabExclusive, respectively. Each function then sets the widget that executed the callback list to be insensitive by using XtSetSensitive. Using these functions in callbacks is not required. In particular, an application must provide customized code for callbacks that create pop-up shells dynamically or that must do more than desensitizing the button.

XtMenuPopup is known to the translation manager, which must perform special actions for spring-loaded pop-ups. Calls to XtMenuPopup in a translation specification are mapped into calls to a nonexported action procedure, and the translation manager fills in parameters based on the event specified on the left-hand side of a translation.

If XtMenuPopup is invoked on ButtonPress (possibly with modifiers), the translation manager pops up the shell with grab_kind set to XtGrabExclusive and spring_loaded set to True. If XtMenuPopup is invoked on EnterWindow (possibly with modifiers), the translation manager pops up the shell with grab_kind set to XtGrabNonexclusive and spring_loaded set to False. Otherwise, the translation manager generates an error. When the widget is popped up, the following actions occur:

  • Calls XtCheckSubclass to ensure popup_shell is a subclass of Shell.

  • Generates an error if the shell’s popped_up field is already True.

  • Calls the callback procedures on the shell’s popup_callback list.

  • Sets the shell popped_up field to True and the shell grab_kind and spring_loaded fields appropriately.

  • If the shell’s create_popup_child field is non-NULL, it is called with popup_shell as the parameter.

  • Calls:

XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), spring_loaded)

  • Calls XtRealizeWidget with popup_shell specified.

  • Calls XMapWindow with popup_shell specified.

(Note that these actions are the same as those for XtPopup.) XtMenuPopup tries to find the shell by searching the widget tree starting at the parent of the widget in which it is invoked. If it finds a shell with the specified name in the pop-up children of that parent, it pops up the shell with the appropriate parameters. Otherwise, it moves up the parent chain as needed. If XtMenuPopup gets to the application widget and cannot find a matching shell, it generates an error.

SEE ALSO

XtCreatePopupShell(3), XtPopdown(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2086 - Linux cli command fputc_unlocked

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fputc_unlocked and provides detailed information about the command fputc_unlocked, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fputc_unlocked.

NAME 🖥️ fputc_unlocked 🖥️

nonlocking stdio functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int getc_unlocked(FILE *stream);
int getchar_unlocked(void);
int putc_unlocked(int c, FILE *stream);
int putchar_unlocked(int c);
void clearerr_unlocked(FILE *stream);
int feof_unlocked(FILE *stream);
int ferror_unlocked(FILE *stream);
int fileno_unlocked(FILE *stream);
int fflush_unlocked(FILE *_Nullable stream);
int fgetc_unlocked(FILE *stream);
int fputc_unlocked(int c, FILE *stream);
size_t fread_unlocked(void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
size_t fwrite_unlocked(const void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
char *fgets_unlocked(char s[restrict .n], int n",FILE*restrict"stream);
int fputs_unlocked(const char *restrict s, FILE *restrict stream);
#include <wchar.h>
wint_t getwc_unlocked(FILE *stream);
wint_t getwchar_unlocked(void);
wint_t fgetwc_unlocked(FILE *stream);
wint_t fputwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwchar_unlocked(wchar_t wc);
wchar_t *fgetws_unlocked(wchar_t ws[restrict .n], int n,
 FILE *restrict stream);
int fputws_unlocked(const wchar_t *restrict ws,
 FILE *restrict stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getc_unlocked(), getchar_unlocked(), putc_unlocked(), putchar_unlocked():

    /* glibc >= 2.24: */ _POSIX_C_SOURCE >= 199309L
        || /* glibc <= 2.23: */ _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

clearerr_unlocked(), feof_unlocked(), ferror_unlocked(), fileno_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), getwchar_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwchar_unlocked(), fgetws_unlocked(), fputws_unlocked():

    _GNU_SOURCE

DESCRIPTION

Each of these functions has the same behavior as its counterpart without the “_unlocked” suffix, except that they do not use locking (they do not set locks themselves, and do not test for the presence of locks set by others) and hence are thread-unsafe. See flockfile(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getc_unlocked(), putc_unlocked(), clearerr_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked(), fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwc_unlocked(), fgetws_unlocked(), fputws_unlocked()

Thread safety

MT-Safe race:stream

getchar_unlocked(), getwchar_unlocked()

Thread safety

MT-Unsafe race:stdin

putchar_unlocked(), putwchar_unlocked()

Thread safety

MT-Unsafe race:stdout

feof_unlocked(), ferror_unlocked(), fileno_unlocked()

Thread safetyMT-Safe

STANDARDS

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2008.

Others:
None.

HISTORY

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2001.

SEE ALSO

flockfile(3), stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2087 - Linux cli command XmbufGetVersion

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XmbufGetVersion and provides detailed information about the command XmbufGetVersion, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XmbufGetVersion.

NAME 🖥️ XmbufGetVersion 🖥️

X multibuffering functions

SYNTAX

#include <X11/extensions/multibuf.h>

Bool XmbufQueryExtension(
    Display *dpy,
    Display *dpy,
    int *event_base_return,
    int *error_base_return);

Status XmbufGetVersion(
    Display *dpy,
    int *major_version_return,
    int *minor_version_return);

int XmbufCreateBuffers(
    Display *dpy,
    Window window,
    int count,
    int update_action,
    int update_hint,
    Multibuffer *buffers_update);

void XmbufDestroyBuffers(
    Display *dpy,
    Window window);

void XmbufDisplayBuffers(
    Display *dpy,
    int count,
    Multibuffer *buffers,
    int min_delay,
    int max_delay);

Status XmbufGetWindowAttributes(
    Display *dpy,
    Window window,
    XmbufWindowAttributes *attributes);

void XmbufChangeWindowAttributes(
    Display *dpy,
    Window window,
    unsigned long valuemask,
    XmbufSetWindowAttributes *attributes);

Status XmbufGetBufferAttributes(
    Display *dpy,
    Multibuffer buffer,
    XmbufBufferAttributes *attributes);

void XmbufChangeBufferAttributes(
    Display *dpy,
    Multibuffer buffer,
    unsigned long valuemask,
    XmbufSetBufferAttributes *attributes);

Status XmbufGetScreenInfo(
    Display *dpy,
    Drawable drawable,
    int *nmono_return,
    XmbufBufferInfo **mono_info_return,
    int *nstereo_return,
    XmbufBufferInfo **stereo_info_return);

Window XmbufCreateStereoWindow(
    Display *dpy,
    Window parent,
    int x,
    int y,
    unsigned int width,
    unsigned int height,
    unsigned int border_width,
    int depth,
    unsigned int class,                 /* InputOutput, InputOnly*/
    Visual *visual,
    unsigned long valuemask,
    XSetWindowAttributes *attributes,
    Multibuffer *left_return,
    Multibuffer *right_return);

STRUCTURES

Events:

typedef struct {
    int type;   /* of event */
    unsigned long serial;       /* # of last request processed by server */
    int send_event;     /* true if this came from a SendEvent request */
    Display *display;   /* Display the event was read from */
    Multibuffer buffer; /* buffer of event */
    int state;  /* see Clobbered constants above */
} XmbufClobberNotifyEvent;

typedef struct {
    int type;   /* of event */
    unsigned long serial;       /* # of last request processed by server */
    int send_event;     /* true if this came from a SendEvent request */
    Display *display;   /* Display the event was read from */
    Multibuffer buffer; /* buffer of event */
} XmbufUpdateNotifyEvent;

Per-window attributes that can be got:

typedef struct {
    int displayed_index;	/* which buffer is being displayed */
    int update_action;	/* Undefined, Background, Untouched, Copied */
    int update_hint;	/* Frequent, Intermittent, Static */
    int window_mode;	/* Mono, Stereo */
    int nbuffers;	/* Number of buffers */
    Multibuffer *buffers;	/* Buffers */
} XmbufWindowAttributes;

Per-window attributes that can be set:

typedef struct {
    int update_hint;	/* Frequent, Intermittent, Static */
} XmbufSetWindowAttributes;

Per-buffer attributes that can be got:

typedef struct {
    Window window;	/* which window this belongs to */
    unsigned long event_mask;	/* events that have been selected */
    int buffer_index;	/* which buffer is this */
    int side;	/* Mono, Left, Right */
} XmbufBufferAttributes;

Per-buffer attributes that can be set:

typedef struct {
    unsigned long event_mask;	/* events that have been selected */
} XmbufSetBufferAttributes;

Per-screen buffer info (there will be lists of them):

typedef struct {
    VisualID visualid;	/* visual usable at this depth */
    int max_buffers;	/* most buffers for this visual */
    int depth;	/* depth of buffers to be created */
} XmbufBufferInfo;

DESCRIPTION

The application programming library for the X11 Double-Buffering, Multi-Buffering, and Stereo Extension contains the interfaces described below. With the exception of * XmbufQueryExtension *, if any of these routines are called with a display that does not support the extension, the ExtensionErrorHandler (which can be set with * XSetExtensionErrorHandler * and functions the same way as * XSetErrorHandler *) will be called and the function will then return.

* XmbufQueryExtension * returns * True * if the multibuffering/stereo extension is available on the given display. If the extension exists, the value of the first event code (which should be added to the event type constants * MultibufferClobberNotify * and * MultibufferUpdateNotify * to get the actual values) is stored into event_base_return and the value of the first error code (which should be added to the error type constant * MultibufferBadBuffer * to get the actual value) is stored into error_base_return.

* XmbufGetVersion * gets the major and minor version numbers of the extension. The return value is zero if an error occurs or non-zero if no error happens.

* XmbufCreateBuffers * requests that “count” buffers be created with the given update_action and update_hint and be associated with the indicated window. The number of buffers created is returned (zero if an error occurred) and buffers_update is filled in with that many Multibuffer identifiers.

* XmbufDestroyBuffers * destroys the buffers associated with the given window.

* XmbufDisplayBuffers * displays the indicated buffers their appropriate windows within max_delay milliseconds after min_delay milliseconds have passed. No two buffers may be associated with the same window or else a Match error is generated.

* XmbufGetWindowAttributes * gets the multibuffering attributes that apply to all buffers associated with the given window. The list of buffers returns may be freed with * XFree *. Returns non-zero on success and zero if an error occurs.

* XmbufChangeWindowAttributes * sets the multibuffering attributes that apply to all buffers associated with the given window. This is currently limited to the update_hint.

* XmbufGetBufferAttributes * gets the attributes for the indicated buffer. Returns non-zero on success and zero if an error occurs.

* XmbufChangeBufferAttributes * sets the attributes for the indicated buffer. This is currently limited to the event_mask.

* XmbufGetScreenInfo * gets the parameters controlling how mono and stereo windows may be created on the screen of the given drawable. The numbers of sets of visual and depths are returned in nmono_return and nstereo_return. If nmono_return is greater than zero, then mono_info_return is set to the address of an array of * XmbufBufferInfo * structures describing the various visuals and depths that may be used. Otherwise, mono_info_return is set to NULL. Similarly, stereo_info_return is set according to nstereo_return. The storage returned in mono_info_return and stereo_info_return may be released by * XFree *. If no errors are encounted, non-zero will be returned.

* XmbufCreateStereoWindow * creates a stereo window in the same way that * XCreateWindow * creates a mono window. The buffer ids for the left and right buffers are returned in left_return and right_return, respectively. If an extension error handler that returns is installed, * None * will be returned if the extension is not available on this display.

PREDEFINED VALUES

Update_action field:

 MultibufferUpdateActionUndefined   MultibufferUpdateActionBackground   MultibufferUpdateActionUntouched   MultibufferUpdateActionCopied 

Update_hint field:

 MultibufferUpdateHintFrequent   MultibufferUpdateHintIntermittent   MultibufferUpdateHintStatic 

Valuemask fields:

 MultibufferWindowUpdateHint   MultibufferBufferEventMask 

Mono vs. stereo and left vs. right:

 MultibufferModeMono   MultibufferModeStereo   MultibufferSideMono   MultibufferSideLeft   MultibufferSideRight 

Clobber state:

 MultibufferUnclobbered   MultibufferPartiallyClobbered   MultibufferFullyClobbered 

Event stuff:

 MultibufferClobberNotifyMask   MultibufferUpdateNotifyMask   MultibufferClobberNotify   MultibufferUpdateNotify   MultibufferNumberEvents   MultibufferBadBuffer   MultibufferNumberErrors 

BUGS

This manual page needs more work.

SEE ALSO

Extending X for Double Buffering, Multi-Buffering, and Stereo

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2088 - Linux cli command gnu_get_libc_release

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gnu_get_libc_release and provides detailed information about the command gnu_get_libc_release, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gnu_get_libc_release.

NAME 🖥️ gnu_get_libc_release 🖥️

get glibc version and release

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <gnu/libc-version.h>
const char *gnu_get_libc_version(void);
const char *gnu_get_libc_release(void);

DESCRIPTION

The function gnu_get_libc_version() returns a string that identifies the glibc version available on the system.

The function gnu_get_libc_release() returns a string indicates the release status of the glibc version available on the system. This will be a string such as stable.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

gnu_get_libc_version(), gnu_get_libc_release()

Thread safetyMT-Safe

STANDARDS

GNU.

HISTORY

glibc 2.1.

EXAMPLES

When run, the program below will produce output such as the following:

$ ./a.out
GNU libc version: 2.8
GNU libc release: stable

Program source

#include <stdio.h>
#include <stdlib.h>
#include <gnu/libc-version.h>
int
main(void)
{
    printf("GNU libc version: %s

“, gnu_get_libc_version()); printf(“GNU libc release: %s “, gnu_get_libc_release()); exit(EXIT_SUCCESS); }

SEE ALSO

confstr(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2089 - Linux cli command Image_ExifTool_WPGpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_WPGpm and provides detailed information about the command Image_ExifTool_WPGpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_WPGpm.

NAME 🖥️ Image_ExifTool_WPGpm 🖥️

Read WPG meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read WPG (WordPerfect Graphics) images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<https://www.fileformat.info/format/wpg/egff.htm>

<https://archive.org/details/mac_Graphics_File_Formats_Second_Edition_1996/page/n991/mode/2up>

<http://libwpg.sourceforge.net/>

SEE ALSO

“WPG Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2090 - Linux cli command mbsrtowcs

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mbsrtowcs and provides detailed information about the command mbsrtowcs, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mbsrtowcs.

NAME 🖥️ mbsrtowcs 🖥️

convert a multibyte string to a wide-character string (restartable)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
size_t mbsrtowcs(wchar_t dest[restrict .dsize],
 const char **restrict src,
 size_t dsize, mbstate_t *restrict ps);

DESCRIPTION

If dest is not NULL, convert the multibyte string *src to a wide-character string starting at dest. At most dsize wide characters are written to dest. The shift state *ps is updated. The conversion is effectively performed by repeatedly calling mbrtowc(dest, *src, n, ps) where n is some positive number, as long as this call succeeds, and then incrementing dest by one and *src by the number of bytes consumed. The conversion can stop for three reasons:

  • An invalid multibyte sequence has been encountered. In this case, *src is left pointing to the invalid multibyte sequence, (size_t) -1 is returned, and errno is set to EILSEQ.

  • dsize non-L’�’ wide characters have been stored at dest. In this case, *src is left pointing to the next multibyte sequence to be converted, and the number of wide characters written to dest is returned.

  • The multibyte string has been completely converted, including the terminating null wide character (‘�’), which has the side effect of bringing back *ps to the initial state. In this case, *src is set to NULL, and the number of wide characters written to dest, excluding the terminating null wide character, is returned.

If dest is NULL, dsize is ignored, and the conversion proceeds as above, except that the converted wide characters are not written out to memory, and that no length limit exists.

In both of the above cases, if ps is NULL, a static anonymous state known only to the mbsrtowcs() function is used instead.

In order to avoid the case 2 above, the programmer should make sure dsize is greater than or equal to mbsrtowcs(NULL,src,0,ps)+1.

The programmer must ensure that there is room for at least dsize wide characters at dest.

This function is a restartable version of mbstowcs(3).

RETURN VALUE

The number of wide characters that make up the converted part of the wide-character string, not including the terminating null wide character. If an invalid multibyte sequence was encountered, (size_t) -1 is returned, and errno set to EILSEQ.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mbsrtowcs()

Thread safety

MT-Unsafe race:mbsrtowcs/!ps

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of mbsrtowcs() depends on the LC_CTYPE category of the current locale.

Passing NULL as ps is not multithread safe.

SEE ALSO

iconv(3), mbrtowc(3), mbsinit(3), mbsnrtowcs(3), mbstowcs(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2091 - Linux cli command Net_HTTPSpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_HTTPSpm and provides detailed information about the command Net_HTTPSpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_HTTPSpm.

NAME 🖥️ Net_HTTPSpm 🖥️

Low-level HTTP over SSL/TLS connection (client)

VERSION

version 6.23

DESCRIPTION

The Net::HTTPS is a low-level HTTP over SSL/TLS client. The interface is the same as the interface for Net::HTTP, but the constructor takes additional parameters as accepted by IO::Socket::SSL. The Net::HTTPS object is an IO::Socket::SSL too, which makes it inherit additional methods from that base class.

For historical reasons this module also supports using Net::SSL (from the Crypt-SSLeay distribution) as its SSL driver and base class. This base is automatically selected if available and IO::Socket::SSL isn’t. You might also force which implementation to use by setting $Net::HTTPS::SSL_SOCKET_CLASS before loading this module. If not set this variable is initialized from the PERL_NET_HTTPS_SSL_SOCKET_CLASS environment variable.

ENVIRONMENT

You might set the PERL_NET_HTTPS_SSL_SOCKET_CLASS environment variable to the name of the base SSL implementation (and Net::HTTPS base class) to use. The default is IO::Socket::SSL. Currently the only other supported value is Net::SSL.

SEE ALSO

Net::HTTP, IO::Socket::SSL

AUTHOR

Gisle Aas <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 2001 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2092 - Linux cli command pcap_tstamp_type_name_to_valpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_tstamp_type_name_to_valpcap and provides detailed information about the command pcap_tstamp_type_name_to_valpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_tstamp_type_name_to_valpcap.

NAME 🖥️ pcap_tstamp_type_name_to_valpcap 🖥️

get the time stamp type value corresponding to a time stamp type name

SYNOPSIS

#include <pcap/pcap.h>
int pcap_tstamp_type_name_to_val(const char *name);

DESCRIPTION

pcap_tstamp_type_name_to_val() translates a time stamp type name to the corresponding time stamp type value. The translation is case-insensitive.

RETURN VALUE

pcap_tstamp_type_name_to_val() returns time stamp type value on success and PCAP_ERROR on failure.

BACKWARD COMPATIBILITY

This function became available in libpcap release 1.2.1.

SEE ALSO

pcap(3PCAP), pcap_tstamp_type_val_to_name(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2093 - Linux cli command zip_error_system_type

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_error_system_type and provides detailed information about the command zip_error_system_type, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_error_system_type.

libzip (-lzip)

The

function returns the type of the system specific part for the zip_error

Currently, the following system types are defined:

System specific part of

is unused.

System specific part of

is an

System specific part of

is a

error.

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2094 - Linux cli command fts_open

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fts_open and provides detailed information about the command fts_open, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fts_open.

NAME 🖥️ fts_open 🖥️

traverse a file hierarchy

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <sys/stat.h>
#include <fts.h>
FTS *fts_open(char *const *path_argv, int options,
 int (*_Nullable compar)(const FTSENT **, const FTSENT **));
FTSENT *fts_read(FTS *ftsp);
FTSENT *fts_children(FTS *ftsp, int instr);
int fts_set(FTS *ftsp, FTSENT *f, int instr);
int fts_close(FTS *ftsp);

DESCRIPTION

The fts functions are provided for traversing file hierarchies. A simple overview is that the fts_open() function returns a “handle” (of type FTS *) that refers to a file hierarchy “stream”. This handle is then supplied to the other fts functions. The function fts_read() returns a pointer to a structure describing one of the files in the file hierarchy. The function fts_children() returns a pointer to a linked list of structures, each of which describes one of the files contained in a directory in the hierarchy.

In general, directories are visited two distinguishable times; in preorder (before any of their descendants are visited) and in postorder (after all of their descendants have been visited). Files are visited once. It is possible to walk the hierarchy “logically” (visiting the files that symbolic links point to) or physically (visiting the symbolic links themselves), order the walk of the hierarchy or prune and/or revisit portions of the hierarchy.

Two structures (and associated types) are defined in the include file <fts.h>. The first type is FTS, the structure that represents the file hierarchy itself. The second type is FTSENT, the structure that represents a file in the file hierarchy. Normally, an FTSENT structure is returned for every file in the file hierarchy. In this manual page, “file” and “FTSENT structure” are generally interchangeable.

The FTSENT structure contains fields describing a file. The structure contains at least the following fields (there are additional fields that should be considered private to the implementation):

typedef struct _ftsent {
    unsigned short  fts_info;     /* flags for FTSENT structure */
    char           *fts_accpath;  /* access path */
    char           *fts_path;     /* root path */
    short           fts_pathlen;  /* strlen(fts_path) +
                                     strlen(fts_name) */
    char           *fts_name;     /* filename */
    short           fts_namelen;  /* strlen(fts_name) */
    short           fts_level;    /* depth (-1 to N) */
    int             fts_errno;    /* file errno */
    long            fts_number;   /* local numeric value */
    void           *fts_pointer;  /* local address value */
    struct _ftsent *fts_parent;   /* parent directory */
    struct _ftsent *fts_link;     /* next file structure */
    struct _ftsent *fts_cycle;    /* cycle structure */
    struct stat    *fts_statp;    /* [l]stat(2) information */
} FTSENT;

These fields are defined as follows:

fts_info
One of the following values describing the returned FTSENT structure and the file it represents. With the exception of directories without errors (FTS_D), all of these entries are terminal, that is, they will not be revisited, nor will any of their descendants be visited.

FTS_D
A directory being visited in preorder.

FTS_DC
A directory that causes a cycle in the tree. (The fts_cycle field of the FTSENT structure will be filled in as well.)

FTS_DEFAULT
Any FTSENT structure that represents a file type not explicitly described by one of the other fts_info values.

FTS_DNR
A directory which cannot be read. This is an error return, and the fts_errno field will be set to indicate what caused the error.

FTS_DOT
A file named “.” or “..” which was not specified as a filename to fts_open() (see FTS_SEEDOT).

FTS_DP
A directory being visited in postorder. The contents of the FTSENT structure will be unchanged from when it was returned in preorder, that is, with the fts_info field set to FTS_D.

FTS_ERR
This is an error return, and the fts_errno field will be set to indicate what caused the error.

FTS_F
A regular file.

FTS_NS
A file for which no [l] stat(2) information was available. The contents of the fts_statp field are undefined. This is an error return, and the fts_errno field will be set to indicate what caused the error.

FTS_NSOK
A file for which no [l] stat(2) information was requested. The contents of the fts_statp field are undefined.

FTS_SL
A symbolic link.

FTS_SLNONE
A symbolic link with a nonexistent target. The contents of the fts_statp field reference the file characteristic information for the symbolic link itself.

fts_accpath
A path for accessing the file from the current directory.

fts_path
The path for the file relative to the root of the traversal. This path contains the path specified to fts_open() as a prefix.

fts_pathlen
The sum of the lengths of the strings referenced by fts_path and fts_name.

fts_name
The name of the file.

fts_namelen
The length of the string referenced by fts_name.

fts_level
The depth of the traversal, numbered from -1 to N, where this file was found. The FTSENT structure representing the parent of the starting point (or root) of the traversal is numbered -1, and the FTSENT structure for the root itself is numbered 0.

fts_errno
If fts_children() or fts_read() returns an FTSENT structure whose fts_info field is set to FTS_DNR, FTS_ERR, or FTS_NS, the fts_errno field contains the error number (i.e., the errno value) specifying the cause of the error. Otherwise, the contents of the fts_errno field are undefined.

fts_number
This field is provided for the use of the application program and is not modified by the fts functions. It is initialized to 0.

fts_pointer
This field is provided for the use of the application program and is not modified by the fts functions. It is initialized to NULL.

fts_parent
A pointer to the FTSENT structure referencing the file in the hierarchy immediately above the current file, that is, the directory of which this file is a member. A parent structure for the initial entry point is provided as well, however, only the fts_level, fts_number, and fts_pointer fields are guaranteed to be initialized.

fts_link
Upon return from the fts_children() function, the fts_link field points to the next structure in the NULL-terminated linked list of directory members. Otherwise, the contents of the fts_link field are undefined.

fts_cycle
If a directory causes a cycle in the hierarchy (see FTS_DC), either because of a hard link between two directories, or a symbolic link pointing to a directory, the fts_cycle field of the structure will point to the FTSENT structure in the hierarchy that references the same file as the current FTSENT structure. Otherwise, the contents of the fts_cycle field are undefined.

fts_statp
A pointer to [l] stat(2) information for the file.

A single buffer is used for all of the paths of all of the files in the file hierarchy. Therefore, the fts_path and fts_accpath fields are guaranteed to be null-terminated only for the file most recently returned by fts_read(). To use these fields to reference any files represented by other FTSENT structures will require that the path buffer be modified using the information contained in that FTSENT structure’s fts_pathlen field. Any such modifications should be undone before further calls to fts_read() are attempted. The fts_name field is always null-terminated.

fts_open()

The fts_open() function takes a pointer to an array of character pointers naming one or more paths which make up a logical file hierarchy to be traversed. The array must be terminated by a null pointer.

There are a number of options, at least one of which (either FTS_LOGICAL or FTS_PHYSICAL) must be specified. The options are selected by ORing the following values:

FTS_LOGICAL
This option causes the fts routines to return FTSENT structures for the targets of symbolic links instead of the symbolic links themselves. If this option is set, the only symbolic links for which FTSENT structures are returned to the application are those referencing nonexistent files: the fts_statp field is obtained via stat(2) with a fallback to lstat(2).

FTS_PHYSICAL
This option causes the fts routines to return FTSENT structures for symbolic links themselves instead of the target files they point to. If this option is set, FTSENT structures for all symbolic links in the hierarchy are returned to the application: the fts_statp field is obtained via lstat(2).

FTS_COMFOLLOW
This option causes any symbolic link specified as a root path to be followed immediately, as if via FTS_LOGICAL, regardless of the primary mode.

FTS_NOCHDIR
As a performance optimization, the fts functions change directories as they walk the file hierarchy. This has the side-effect that an application cannot rely on being in any particular directory during the traversal. This option turns off this optimization, and the fts functions will not change the current directory. Note that applications should not themselves change their current directory and try to access files unless FTS_NOCHDIR is specified and absolute pathnames were provided as arguments to fts_open().

FTS_NOSTAT
By default, returned FTSENT structures reference file characteristic information (the fts_statp field) for each file visited. This option relaxes that requirement as a performance optimization, allowing the fts functions to set the fts_info field to FTS_NSOK and leave the contents of the fts_statp field undefined.

FTS_SEEDOT
By default, unless they are specified as path arguments to fts_open(), any files named “.” or “..” encountered in the file hierarchy are ignored. This option causes the fts routines to return FTSENT structures for them.

FTS_XDEV
This option prevents fts from descending into directories that have a different device number than the file from which the descent began.

The argument compar() specifies a user-defined function which may be used to order the traversal of the hierarchy. It takes two pointers to pointers to FTSENT structures as arguments and should return a negative value, zero, or a positive value to indicate if the file referenced by its first argument comes before, in any order with respect to, or after, the file referenced by its second argument. The fts_accpath, fts_path, and fts_pathlen fields of the FTSENT structures may never be used in this comparison. If the fts_info field is set to FTS_NS or FTS_NSOK, the fts_statp field may not either. If the compar() argument is NULL, the directory traversal order is in the order listed in path_argv for the root paths, and in the order listed in the directory for everything else.

fts_read()

The fts_read() function returns a pointer to an FTSENT structure describing a file in the hierarchy. Directories (that are readable and do not cause cycles) are visited at least twice, once in preorder and once in postorder. All other files are visited at least once. (Hard links between directories that do not cause cycles or symbolic links to symbolic links may cause files to be visited more than once, or directories more than twice.)

If all the members of the hierarchy have been returned, fts_read() returns NULL and sets errno to 0. If an error unrelated to a file in the hierarchy occurs, fts_read() returns NULL and sets errno to indicate the error. If an error related to a returned file occurs, a pointer to an FTSENT structure is returned, and errno may or may not have been set (see fts_info).

The FTSENT structures returned by fts_read() may be overwritten after a call to fts_close() on the same file hierarchy stream, or, after a call to fts_read() on the same file hierarchy stream unless they represent a file of type directory, in which case they will not be overwritten until after a call to fts_read() after the FTSENT structure has been returned by the function fts_read() in postorder.

fts_children()

The fts_children() function returns a pointer to an FTSENT structure describing the first entry in a NULL-terminated linked list of the files in the directory represented by the FTSENT structure most recently returned by fts_read(). The list is linked through the fts_link field of the FTSENT structure, and is ordered by the user-specified comparison function, if any. Repeated calls to fts_children() will re-create this linked list.

As a special case, if fts_read() has not yet been called for a hierarchy, fts_children() will return a pointer to the files in the logical directory specified to fts_open(), that is, the arguments specified to fts_open(). Otherwise, if the FTSENT structure most recently returned by fts_read() is not a directory being visited in preorder, or the directory does not contain any files, fts_children() returns NULL and sets errno to zero. If an error occurs, fts_children() returns NULL and sets errno to indicate the error.

The FTSENT structures returned by fts_children() may be overwritten after a call to fts_children(), fts_close(), or fts_read() on the same file hierarchy stream.

The instr argument is either zero or the following value:

FTS_NAMEONLY
Only the names of the files are needed. The contents of all the fields in the returned linked list of structures are undefined with the exception of the fts_name and fts_namelen fields.

fts_set()

The function fts_set() allows the user application to determine further processing for the file f of the stream ftsp. The fts_set() function returns 0 on success, and -1 if an error occurs.

The instr argument is either 0 (meaning “do nothing”) or one of the following values:

FTS_AGAIN
Revisit the file; any file type may be revisited. The next call to fts_read() will return the referenced file. The fts_stat and fts_info fields of the structure will be reinitialized at that time, but no other fields will have been changed. This option is meaningful only for the most recently returned file from fts_read(). Normal use is for postorder directory visits, where it causes the directory to be revisited (in both preorder and postorder) as well as all of its descendants.

FTS_FOLLOW
The referenced file must be a symbolic link. If the referenced file is the one most recently returned by fts_read(), the next call to fts_read() returns the file with the fts_info and fts_statp fields reinitialized to reflect the target of the symbolic link instead of the symbolic link itself. If the file is one of those most recently returned by fts_children(), the fts_info and fts_statp fields of the structure, when returned by fts_read(), will reflect the target of the symbolic link instead of the symbolic link itself. In either case, if the target of the symbolic link does not exist, the fields of the returned structure will be unchanged and the fts_info field will be set to FTS_SLNONE.

If the target of the link is a directory, the preorder return, followed by the return of all of its descendants, followed by a postorder return, is done.

FTS_SKIP
No descendants of this file are visited. The file may be one of those most recently returned by either fts_children() or fts_read().

fts_close()

The fts_close() function closes the file hierarchy stream referred to by ftsp and restores the current directory to the directory from which fts_open() was called to open ftsp. The fts_close() function returns 0 on success, and -1 if an error occurs.

ERRORS

The function fts_open() may fail and set errno for any of the errors specified for open(2) and malloc(3).

In addition, fts_open() may fail and set errno as follows:

ENOENT
Any element of path_argv was an empty string.

The function fts_close() may fail and set errno for any of the errors specified for chdir(2) and close(2).

The functions fts_read() and fts_children() may fail and set errno for any of the errors specified for chdir(2), malloc(3), opendir(3), readdir(3), and [l] stat(2).

In addition, fts_children(), fts_open(), and fts_set() may fail and set errno as follows:

EINVAL
options or instr was invalid.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fts_open(), fts_set(), fts_close()

Thread safetyMT-Safe

fts_read(), fts_children()

Thread safetyMT-Unsafe

STANDARDS

None.

HISTORY

glibc 2. 4.4BSD.

BUGS

Before glibc 2.23, all of the APIs described in this man page are not safe when compiling a program using the LFS APIs (e.g., when compiling with -D_FILE_OFFSET_BITS=64).

SEE ALSO

find(1), chdir(2), lstat(2), stat(2), ftw(3), qsort(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2095 - Linux cli command XtAddCallbacks

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAddCallbacks and provides detailed information about the command XtAddCallbacks, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAddCallbacks.

NAME 🖥️ XtAddCallbacks 🖥️

add and remove callback procedures

SYNTAX

#include <X11/Intrinsic.h>

void XtAddCallback(Widget w, const char *callback_name, XtCallbackProc callback, XtPointer client_data);

void XtAddCallbacks(Widget w, const char *callback_name, XtCallbackList callbacks);

void XtRemoveCallback(Widget w, const char *callback_name, XtCallbackProc callback, XtPointer client_data);

void XtRemoveCallbacks(Widget w, const char *callback_name, XtCallbackList callbacks);

void XtRemoveAllCallbacks(Widget w, const char *callback_name);

ARGUMENTS

callback
Specifies the callback procedure.

callbacks
Specifies the null-terminated list of callback procedures and corresponding client data.

callback_name
Specifies the callback list to which the procedure is to be appended or deleted.

client_data
Specifies the argument that is to be passed to the specified procedure when it is invoked by XtCallbacks or NULL, or the client data to match on the registered callback procedures.

  1. Specifies the widget.

DESCRIPTION

The XtAddCallback function adds the specified callback procedure to the specified widget’s callback list.

The XtAddCallbacks add the specified list of callbacks to the specified widget’s callback list.

The XtRemoveCallback function removes a callback only if both the procedure and the client data match.

The XtRemoveCallbacks function removes the specified callback procedures from the specified widget’s callback list.

The XtRemoveAllCallbacks function removes all the callback procedures from the specified widget’s callback list.

SEE ALSO

XtCallCallbacks(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2096 - Linux cli command Spreadsheet_WriteExcel_OLEwriterpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_WriteExcel_OLEwriterpm and provides detailed information about the command Spreadsheet_WriteExcel_OLEwriterpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_WriteExcel_OLEwriterpm.

NAME 🖥️ Spreadsheet_WriteExcel_OLEwriterpm 🖥️

A writer class to store BIFF data in a OLE compound storage file.

SYNOPSIS

See the documentation for Spreadsheet::WriteExcel

DESCRIPTION

This module is used in conjunction with Spreadsheet::WriteExcel.

AUTHOR

John McNamara [email protected]

COPYRIGHT

Copyright MM-MMX, John McNamara.

All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2097 - Linux cli command lroundf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lroundf and provides detailed information about the command lroundf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lroundf.

NAME 🖥️ lroundf 🖥️

round to nearest integer

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
long lround(double x);
long lroundf(float x);
long lroundl(long double x);
long long llround(double x);
long long llroundf(float x);
long long llroundl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions round their argument to the nearest integer value, rounding halfway cases away from zero, regardless of the current rounding direction (see fenv(3)).

Note that unlike the round(3) and ceil(3), functions, the return type of these functions differs from that of their arguments.

RETURN VALUE

These functions return the rounded integer value.

If x is a NaN or an infinity, or the rounded value is too large to be stored in a long (long long in the case of the ll* functions), then a domain error occurs, and the return value is unspecified.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is a NaN or infinite, or the rounded value is too large
An invalid floating-point exception (FE_INVALID) is raised.

These functions do not set errno.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

lround(), lroundf(), lroundl(), llround(), llroundf(), llroundl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

ceil(3), floor(3), lrint(3), nearbyint(3), rint(3), round(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2098 - Linux cli command Moose_Cookbook_Basics_BankAccount_MethodModifiersAndSubclassingpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Basics_BankAccount_MethodModifiersAndSubclassingpm and provides detailed information about the command Moose_Cookbook_Basics_BankAccount_MethodModifiersAndSubclassingpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Basics_BankAccount_MethodModifiersAndSubclassingpm.

NAME 🖥️ Moose_Cookbook_Basics_BankAccount_MethodModifiersAndSubclassingpm 🖥️

Demonstrates the use of method modifiers in a subclass

VERSION

version 2.2207

SYNOPSIS

package BankAccount; use Moose; has balance => ( isa => Int, is => rw, default => 0 ); sub deposit { my ( $self, $amount ) = @_; $self->balance( $self->balance + $amount ); } sub withdraw { my ( $self, $amount ) = @_; my $current_balance = $self->balance(); ( $current_balance >= $amount ) || confess “Account overdrawn”; $self->balance( $current_balance - $amount ); } package CheckingAccount; use Moose; extends BankAccount; has overdraft_account => ( isa => BankAccount, is => rw ); before withdraw => sub { my ( $self, $amount ) = @_; my $overdraft_amount = $amount - $self->balance(); if ( $self->overdraft_account && $overdraft_amount > 0 ) { $self->overdraft_account->withdraw($overdraft_amount); $self->deposit($overdraft_amount); } };

DESCRIPTION

The first recipe demonstrated how to build very basic Moose classes, focusing on creating and manipulating attributes. The objects in that recipe were very data-oriented, and did not have much in the way of behavior (i.e. methods). In this recipe, we expand upon the concepts from the first recipe to include some real behavior. In particular, we show how you can use a method modifier to implement new behavior for a method.

The classes in the SYNOPSIS show two kinds of bank account. A simple bank account has one attribute, the balance, and two behaviors, depositing and withdrawing money.

We then extend the basic bank account in the CheckingAccount class. This class adds another attribute, an overdraft account. It also adds overdraft protection to the withdraw method. If you try to withdraw more than you have, the checking account attempts to reconcile the difference by withdrawing money from the overdraft account. (1)

The first class, BankAccount, introduces a new attribute feature, a default value:

has balance => ( isa => Int, is => rw, default => 0 );

This says that a BankAccount has a balance attribute, which has an Int type constraint, a read/write accessor, and a default value of 0. This means that every instance of BankAccount that is created will have its balance slot initialized to 0, unless some other value is provided to the constructor.

The deposit and withdraw methods should be fairly self-explanatory, as they are just plain old Perl 5 OO. (2)

As you know from the first recipe, the keyword extends sets a class’s superclass. Here we see that CheckingAccount extends BankAccount. The next line introduces yet another new attribute feature, class-based type constraints:

has overdraft_account => ( isa => BankAccount, is => rw );

Up until now, we have only seen the Int type constraint, which (as we saw in the first recipe) is a builtin type constraint. The BankAccount type constraint is new, and was actually defined the moment we created the BankAccount class itself. In fact, Moose creates a corresponding type constraint for every class in your program (3).

This means that in the first recipe, constraints for both Point and Point3D were created. In this recipe, both BankAccount and CheckingAccount type constraints are created automatically. Moose does this as a convenience so that your classes and type constraint can be kept in sync with one another. In short, Moose makes sure that it will just DWIM (4).

In CheckingAccount, we see another method modifier, the before modifier.

before withdraw => sub { my ( $self, $amount ) = @_; my $overdraft_amount = $amount - $self->balance(); if ( $self->overdraft_account && $overdraft_amount > 0 ) { $self->overdraft_account->withdraw($overdraft_amount); $self->deposit($overdraft_amount); } };

Just as with the after modifier from the first recipe, Moose will handle calling the superclass method (in this case BankAccount->withdraw).

The before modifier will (obviously) run before the code from the superclass is run. Here, before modifier implements overdraft protection by first checking if there are available funds in the checking account. If not (and if there is an overdraft account available), it transfers the amount needed into the checking account (5).

As with the method modifier in the first recipe, we could use SUPER:: to get the same effect:

sub withdraw { my ( $self, $amount ) = @_; my $overdraft_amount = $amount - $self->balance(); if ( $self->overdraft_account && $overdraft_amount > 0 ) { $self->overdraft_account->withdraw($overdraft_amount); $self->deposit($overdraft_amount); } $self->SUPER::withdraw($amount); }

The benefit of taking the method modifier approach is we do not need to remember to call SUPER::withdraw and pass it the $amount argument when writing CheckingAccount->withdraw.

This is actually more than just a convenience for forgetful programmers. Using method modifiers helps isolate subclasses from changes in the superclasses. For instance, if BankAccount->withdraw were to add an additional argument of some kind, the version of CheckingAccount->withdraw which uses SUPER::withdraw would not pass that extra argument correctly, whereas the method modifier version would automatically pass along all arguments correctly.

Just as with the first recipe, object instantiation uses the new method, which accepts named parameters.

my $savings_account = BankAccount->new( balance => 250 ); my $checking_account = CheckingAccount->new( balance => 100, overdraft_account => $savings_account, );

And as with the first recipe, a more in-depth example can be found in the t/recipes/basics_bankaccount_methodmodifiersandsubclassing.t test file.

CONCLUSION

This recipe expanded on the basic concepts from the first recipe with a more “real world” use case.

FOOTNOTES

  1. If you’re paying close attention, you might realize that there’s a circular loop waiting to happen here. A smarter example would have to make sure that we don’t accidentally create a loop between the checking account and its overdraft account.

  2. Note that for simple methods like these, which just manipulate some single piece of data, it is often not necessary to write them at all. For instance, deposit could be implemented via the inc native delegation for counters - see Moose::Meta::Attribute::Native::Trait::Counter for more specifics, and Moose::Meta::Attribute::Native for a broader overview.

  3. In reality, this creation is sensitive to the order in which modules are loaded. In more complicated cases, you may find that you need to explicitly declare a class type before the corresponding class is loaded.

  4. Moose does not attempt to encode a class’s is-a relationships within the type constraint hierarchy. Instead, Moose just considers the class type constraint to be a subtype of Object, and specializes the constraint check to allow for subclasses. This means that an instance of CheckingAccount will pass a BankAccount type constraint successfully. For more details, please refer to the Moose::Util::TypeConstraints documentation.

  5. If the overdraft account does not have the amount needed, it will throw an error. Of course, the overdraft account could also have overdraft protection. See note 1.

ACKNOWLEDGMENT

The BankAccount example in this recipe is directly taken from the examples in this chapter of “Practical Common Lisp”:

<http://www.gigamonkeys.com/book/object-reorientation-generic-functions.html>

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2099 - Linux cli command Moose_Cookbook_Basics_Point_AttributesAndSubclassingpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Basics_Point_AttributesAndSubclassingpm and provides detailed information about the command Moose_Cookbook_Basics_Point_AttributesAndSubclassingpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Basics_Point_AttributesAndSubclassingpm.

NAME 🖥️ Moose_Cookbook_Basics_Point_AttributesAndSubclassingpm 🖥️

Point and Point3D classes, showing basic attributes and subclassing.

VERSION

version 2.2207

SYNOPSIS

package Point; use Moose; has x => (isa => Int, is => rw, required => 1); has y => (isa => Int, is => rw, required => 1); sub clear { my $self = shift; $self->x(0); $self->y(0); } package Point3D; use Moose; extends Point; has z => (isa => Int, is => rw, required => 1); after clear => sub { my $self = shift; $self->z(0); }; package main; # hash or hashrefs are ok for the constructor my $point1 = Point->new(x => 5, y => 7); my $point2 = Point->new({x => 5, y => 7}); my $point3d = Point3D->new(x => 5, y => 42, z => -5);

DESCRIPTION

This is the classic Point example. It is taken directly from the Perl 6 Apocalypse 12 document, and is similar to the example found in the classic K&R C book as well.

As with all Perl 5 classes, a Moose class is defined in a package. Moose handles turning on strict and warnings for us, so all we need to do is say use Moose, and no kittens will die.

When Moose is loaded, it exports a set of sugar functions into our package. This means that we import some functions which serve as Moose “keywords”. These aren’t real language keywords, they’re just Perl functions exported into our package.

Moose automatically makes our package a subclass of Moose::Object. The Moose::Object class provides us with a constructor that respects our attributes, as well other features. See Moose::Object for details.

Now, onto the keywords. The first one we see here is has, which defines an instance attribute in our class:

has x => (isa => Int, is => rw, required => 1);

This will create an attribute named x. The isa parameter says that we expect the value stored in this attribute to pass the type constraint for Int (1). The accessor generated for this attribute will be read-write.

The required => 1 parameter means that this attribute must be provided when a new object is created. A point object without coordinates doesn’t make much sense, so we don’t allow it.

We have defined our attributes; next we define our methods. In Moose, as with regular Perl 5 OO, a method is just a subroutine defined within the package:

sub clear { my $self = shift; $self->x(0); $self->y(0); }

That concludes the Point class.

Next we have a subclass of Point, Point3D. To declare our superclass, we use the Moose keyword extends:

extends Point;

The extends keyword works much like use base/use parent. First, it will attempt to load your class if needed. However, unlike base, the extends keyword will overwrite any previous values in your package’s @ISA, where use base will push values onto the package’s @ISA.

It is my opinion that the behavior of extends is more intuitive. (2).

Next we create a new attribute for Point3D called z.

has z => (isa => Int, is => rw, required => 1);

This attribute is just like Point’s x and y attributes.

The after keyword demonstrates a Moose feature called “method modifiers” (or “advice” for the AOP inclined):

after clear => sub { my $self = shift; $self->z(0); };

When clear is called on a Point3D object, our modifier method gets called as well. Unsurprisingly, the modifier is called after the real method.

In this case, the real clear method is inherited from Point. Our modifier method receives the same arguments as those passed to the modified method (just $self here).

Of course, using the after modifier is not the only way to accomplish this. This is Perl, right? You can get the same results with this code:

sub clear { my $self = shift; $self->SUPER::clear(); $self->z(0); }

You could also use another Moose method modifier, override:

override clear => sub { my $self = shift; super(); $self->z(0); };

The override modifier allows you to use the super keyword to dispatch to the superclass’s method in a very Ruby-ish style.

The choice of whether to use a method modifier, and which one to use, is often a question of style as much as functionality.

Since Point inherits from Moose::Object, it will also inherit the default Moose::Object constructor:

my $point1 = Point->new(x => 5, y => 7); my $point2 = Point->new({x => 5, y => 7}); my $point3d = Point3D->new(x => 5, y => 42, z => -5);

The new constructor accepts a named argument pair for each attribute defined by the class, which you can provide as a hash or hash reference. In this particular example, the attributes are required, and calling new without them will throw an error.

my $point = Point->new( x => 5 ); # no y, kaboom!

From here on, we can use $point and $point3d just as you would any other Perl 5 object. For a more detailed example of what can be done, you can refer to the t/recipes/basics_point_attributesandsubclassing.t test file.

Moose Objects are Just Hashrefs

While this all may appear rather magical, it’s important to realize that Moose objects are just hash references under the hood (3). For example, you could pass $self to Data::Dumper and you’d get exactly what you’d expect.

You could even poke around inside the object’s data structure, but that is strongly discouraged.

The fact that Moose objects are hashrefs means it is easy to use Moose to extend non-Moose classes, as long as they too are hash references. If you want to extend a non-hashref class, check out MooseX::InsideOut.

CONCLUSION

This recipe demonstrates some basic Moose concepts, attributes, subclassing, and a simple method modifier.

FOOTNOTES

  1. Moose provides a number of builtin type constraints, of which Int is one. For more information on the type constraint system, see Moose::Util::TypeConstraints.

  2. The extends keyword supports multiple inheritance. Simply pass all of your superclasses to extends as a list: extends Foo, Bar, Baz;

  3. Moose supports using instance structures other than blessed hash references (such as glob references - see MooseX::GlobRef).

SEE ALSO

Method Modifiers
The concept of method modifiers is directly ripped off from CLOS. A great explanation of them can be found by following this link. <http://www.gigamonkeys.com/book/object-reorientation-generic-functions.html>

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2100 - Linux cli command tcsetpgrp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tcsetpgrp and provides detailed information about the command tcsetpgrp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tcsetpgrp.

NAME 🖥️ tcsetpgrp 🖥️

get and set terminal foreground process group

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
pid_t tcgetpgrp(int fd);
int tcsetpgrp(int fd, pid_t pgrp);

DESCRIPTION

The function tcgetpgrp() returns the process group ID of the foreground process group on the terminal associated to fd, which must be the controlling terminal of the calling process.

The function tcsetpgrp() makes the process group with process group ID pgrp the foreground process group on the terminal associated to fd, which must be the controlling terminal of the calling process, and still be associated with its session. Moreover, pgrp must be a (nonempty) process group belonging to the same session as the calling process.

If tcsetpgrp() is called by a member of a background process group in its session, and the calling process is not blocking or ignoring SIGTTOU, a SIGTTOU signal is sent to all members of this background process group.

RETURN VALUE

When fd refers to the controlling terminal of the calling process, the function tcgetpgrp() will return the foreground process group ID of that terminal if there is one, and some value larger than 1 that is not presently a process group ID otherwise. When fd does not refer to the controlling terminal of the calling process, -1 is returned, and errno is set to indicate the error.

When successful, tcsetpgrp() returns 0. Otherwise, it returns -1, and errno is set to indicate the error.

ERRORS

EBADF
fd is not a valid file descriptor.

EINVAL
pgrp has an unsupported value.

ENOTTY
The calling process does not have a controlling terminal, or it has one but it is not described by fd, or, for tcsetpgrp(), this controlling terminal is no longer associated with the session of the calling process.

EPERM
pgrp has a supported value, but is not the process group ID of a process in the same session as the calling process.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tcgetpgrp(), tcsetpgrp()

Thread safetyMT-Safe

VERSIONS

These functions are implemented via the TIOCGPGRP and TIOCSPGRP ioctls.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

The ioctls appeared in 4.2BSD. The functions are POSIX inventions.

SEE ALSO

setpgid(2), setsid(2), credentials(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2101 - Linux cli command File_Listingpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command File_Listingpm and provides detailed information about the command File_Listingpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the File_Listingpm.

NAME 🖥️ File_Listingpm 🖥️

Parse directory listing

VERSION

version 6.16

SYNOPSIS

use File::Listing qw(parse_dir); $ENV{LANG} = “C”; # dates in non-English locales not supported foreach my $file (parse_dir(`ls -l`)) { my ($name, $type, $size, $mtime, $mode) = @$file; next if $type ne f; # plain file #… } # directory listing can also be read from a file open my $listing, “zcat ls-lR.gz|”; $dir = parse_dir($listing, +0000);

DESCRIPTION

This module exports a single function called parse_dir, which can be used to parse directory listings.

FUNCTIONS

parse_dir

my $dir = parse_dir( $listing ); my $dir = parse_dir( $listing, $time_zone ); my $dir = parse_dir( $listing, $time_zone, $type ); my $dir = parse_dir( $listing, $time_zone, $type, $error ); my @files = parse_dir( $listing ); my @files = parse_dir( $listing, $time_zone ); my @files = parse_dir( $listing, $time_zone, $type ); my @files = parse_dir( $listing, $time_zone, $type, $error );

The first parameter ($listing) is the directory listing to parse. It can be a scalar, a reference to an array of directory lines or a glob representing a filehandle to read the directory listing from.

The second parameter ($time_zone) is the time zone to use when parsing time stamps in the listing. If this value is undefined, then the local time zone is assumed.

The third parameter ($type) is the type of listing to assume. Currently supported formats are unix, apache and dosftp. The default value is unix. Ideally, the listing type should be determined automatically.

The fourth parameter ($error) specifies how unparseable lines should be treated. Values can be ignore, warn or a code reference. Warn means that the perl warn() function will be called. If a code reference is passed, then this routine will be called and the return value from it will be incorporated in the listing. The default is ignore.

Only the first parameter is mandatory.

# list context foreach my $file (parse_dir($listing)) { my($name, $type, $size, $mtime, $mode) = @$file; } # scalar context my $dir = parse_dir($listing); foreach my $file (@$dir) { my($name, $type, $size, $mtime, $mode) = @$file; }

The return value from parse_dir() is a list of directory entries. In a scalar context the return value is a reference to the list. The directory entries are represented by an array consisting of:

name
The name of the file.

type
One of: f file, d directory, l symlink, ? unknown.

size
The size of the file.

time
The number of seconds since January 1, 1970.

mode
Bitmask a la the mode returned by stat.

SEE ALSO

File::Listing::Ftpcopy
Provides the same interface but uses XS and the parser implementation from ftpcopy.

AUTHOR

Original author: Gisle Aas

Current maintainer: Graham Ollis <[email protected]>

Contributors:

Adam Kennedy

Adam Sjogren

Alex Kapranoff

Alexey Tourbin

Andreas J. Koenig

Bill Mann

Bron Gondwana

DAVIDRW

Daniel Hedlund

David E. Wheeler

David Steinbrunner

Erik Esterer

FWILES

Father Chrysostomos

Gavin Peters

Graeme Thompson

Grant Street Group

Hans-H. Froehlich

Ian Kilgore

Jacob J

Mark Stosberg

Mike Schilli

Ondrej Hanak

Peter John Acklam

Peter Rabbitson

Robert Stone

Rolf Grossmann

Sean M. Burke

Simon Legner

Slaven Rezic

Spiros Denaxas

Steve Hay

Todd Lipcon

Tom Hukins

Tony Finch

Toru Yamaguchi

Ville Skyttä

Yuri Karaban

Zefram

amire80

jefflee

john9art

mschilli

murphy

phrstbrn

ruff

sasao

uid39246

COPYRIGHT AND LICENSE

This software is copyright (c) 1996-2022 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2102 - Linux cli command Net_DNS_SEC_Privatepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_SEC_Privatepm and provides detailed information about the command Net_DNS_SEC_Privatepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_SEC_Privatepm.

NAME 🖥️ Net_DNS_SEC_Privatepm 🖥️

DNSSEC Private key object

SYNOPSIS

use Net::DNS::SEC::Private; $private = Net::DNS::SEC::Private->new( $keypath ); $private = Net::DNS::SEC::Private->new( algorithm => 13, keytag => 26512, privatekey => h/mc+iq9VDUbNAjQgi8S8JzlEX29IALchwJmNM3QYKk=, signame => example.com. );

DESCRIPTION

Class representing private keys as read from a keyfile generated by BIND dnssec-keygen. The class is written to be used only in the context of the Net::DNS::RR::RRSIG create method. This class is not designed to interact with any other system.

METHODS

new (from private keyfile)

$keypath = /home/foo/Kexample.com.+013+26512.private; $private = Net::DNS::SEC::Private->new( $keypath );

The argument is the full path to a private key file generated by the BIND dnssec-keygen tool. Note that the filename contains information about the algorithm and keytag.

new (from private key parameters)

$private = Net::DNS::SEC::Private->new( algorithm => 13, keytag => 26512, privatekey => h/mc+iq9VDUbNAjQgi8S8JzlEX29IALchwJmNM3QYKk=, signame => example.com. );

The arguments define the private key parameters as (name,value) pairs. The name and data representation are identical to that used in a BIND private keyfile.

private_key_format

$format = $private->private_key_format;

Returns a string which identifies the format of the private key file.

algorithm, keytag, signame

$algorithm = $private->algorithm; $keytag = $private->keytag; $signame = $private->signame;

Returns the corresponding attribute determined from the filename.

Private key attributes

$attribute = $private->attribute;

Returns the value as it appears in the private key file. The attribute names correspond to the tag in the key file, modified to form an acceptable Perl subroutine name.

created, publish, activate

$created = $private->created; $publish = $private->publish; $activate = $private->activate;

Returns a string which represents a date in the form 20141212123456. Returns undefined value for key formats older than v1.3.

COPYRIGHT

Copyright (c)2014,2018 Dick Franks

All Rights Reserved

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl, Net::DNS, Net::DNS::SEC, Net::DNS::RR::DNSKEY, Net::DNS::RR::RRSIG

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2103 - Linux cli command pthread_mutexattr_init

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_mutexattr_init and provides detailed information about the command pthread_mutexattr_init, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_mutexattr_init.

NAME 🖥️ pthread_mutexattr_init 🖥️

initialize and destroy a mutex attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_mutexattr_init(pthread_mutexattr_t *attr);
int pthread_mutexattr_destroy(pthread_mutexattr_t *attr);

DESCRIPTION

The pthread_mutexattr_init() function initializes the mutex attributes object pointed to by attr with default values for all attributes defined by the implementation.

The results of initializing an already initialized mutex attributes object are undefined.

The pthread_mutexattr_destroy() function destroys a mutex attribute object (making it uninitialized). Once a mutex attributes object has been destroyed, it can be reinitialized with pthread_mutexattr_init().

The results of destroying an uninitialized mutex attributes object are undefined.

RETURN VALUE

On success, these functions return 0. On error, they return a positive error number.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

Subsequent changes to a mutex attributes object do not affect mutex that have already been initialized using that object.

SEE ALSO

pthread_mutex_init(3), pthread_mutexattr_getpshared(3), pthread_mutexattr_getrobust(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2104 - Linux cli command pcap_set_tstamp_typepcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_set_tstamp_typepcap and provides detailed information about the command pcap_set_tstamp_typepcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_set_tstamp_typepcap.

NAME 🖥️ pcap_set_tstamp_typepcap 🖥️

set the time stamp type to be used by a capture device

SYNOPSIS

#include <pcap/pcap.h>
int pcap_set_tstamp_type(pcap_t *p, int tstamp_type);

DESCRIPTION

pcap_set_tstamp_type() sets the type of time stamp desired for packets captured on the pcap descriptor to the type specified by tstamp_type. It must be called on a pcap descriptor created by pcap_create(3PCAP) that has not yet been activated by pcap_activate(3PCAP). pcap_list_tstamp_types(3PCAP) will give a list of the time stamp types supported by a given capture device. See pcap-tstamp(7) for a list of all the time stamp types.

RETURN VALUE

pcap_set_tstamp_type() returns 0 on success if the specified time stamp type is expected to be supported by the capture device, PCAP_WARNING_TSTAMP_TYPE_NOTSUP if the specified time stamp type is not supported by the capture device, PCAP_ERROR_ACTIVATED if called on a capture handle that has been activated, and PCAP_ERROR_CANTSET_TSTAMP_TYPE if the capture device doesn’t support setting the time stamp type (only older versions of libpcap will return that; newer versions will always allow the time stamp type to be set to the default type).

BACKWARD COMPATIBILITY

This function became available in libpcap release 1.2.1. In previous releases, the time stamp type cannot be set; only the default time stamp type offered by a capture source is available.

SEE ALSO

pcap(3PCAP), pcap_tstamp_type_name_to_val(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2105 - Linux cli command gnu_dev_makedev

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gnu_dev_makedev and provides detailed information about the command gnu_dev_makedev, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gnu_dev_makedev.

NAME 🖥️ gnu_dev_makedev 🖥️

manage a device number

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/sysmacros.h>
dev_t makedev(unsigned int maj, unsigned int min);
unsigned int major(dev_t dev);
unsigned int minor(dev_t dev);

DESCRIPTION

A device ID consists of two parts: a major ID, identifying the class of the device, and a minor ID, identifying a specific instance of a device in that class. A device ID is represented using the type dev_t.

Given major and minor device IDs, makedev() combines these to produce a device ID, returned as the function result. This device ID can be given to mknod(2), for example.

The major() and minor() functions perform the converse task: given a device ID, they return, respectively, the major and minor components. These macros can be useful to, for example, decompose the device IDs in the structure returned by stat(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

makedev(), major(), minor()

Thread safetyMT-Safe

VERSIONS

The BSDs expose the definitions for these macros via <sys/types.h>.

STANDARDS

None.

HISTORY

BSD, HP-UX, Solaris, AIX, Irix.

These interfaces are defined as macros. Since glibc 2.3.3, they have been aliases for three GNU-specific functions: gnu_dev_makedev(), gnu_dev_major(), and gnu_dev_minor(). The latter names are exported, but the traditional names are more portable.

Depending on the version, glibc also exposes definitions for these macros from <sys/types.h> if suitable feature test macros are defined. However, this behavior was deprecated in glibc 2.25, and since glibc 2.28, <sys/types.h> no longer provides these definitions.

SEE ALSO

mknod(2), stat(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2106 - Linux cli command res_nsend

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command res_nsend and provides detailed information about the command res_nsend, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the res_nsend.

NAME 🖥️ res_nsend 🖥️

resolver routines

LIBRARY

Resolver library (libresolv, -lresolv)

SYNOPSIS

#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
struct __res_state;
typedef struct __res_state *res_state;
int res_ninit(res_state statep);
void res_nclose(res_state statep);
int res_nquery(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nsearch(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nquerydomain(res_state statep,
 const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
int res_nmkquery(res_state statep,
 int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
int res_nsend(res_state statep,
 const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);
int dn_comp(const char *exp_dn, unsigned char comp_dn[.length],
 int length, unsigned char **dnptrs,
 unsigned char **lastdnptr);
int dn_expand(const unsigned char *msg,
 const unsigned char *eomorig,
 const unsigned char *comp_dn, char exp_dn[.length],
 int length);
[[deprecated]] extern struct __res_state _res;
[[deprecated]] int res_init(void);
[[deprecated]]
int res_query(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_search(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_querydomain(const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
[[deprecated]]
int res_mkquery(int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
[[deprecated]]
int res_send(const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);

DESCRIPTION

Note: This page is incomplete (various resolver functions provided by glibc are not described) and likely out of date.

The functions described below make queries to and interpret the responses from Internet domain name servers.

The API consists of a set of more modern, reentrant functions and an older set of nonreentrant functions that have been superseded. The traditional resolver interfaces such as res_init() and res_query() use some static (global) state stored in the _res structure, rendering these functions non-thread-safe. BIND 8.2 introduced a set of new interfaces res_ninit(), res_nquery(), and so on, which take a res_state as their first argument, so you can use a per-thread resolver state.

The res_ninit() and res_init() functions read the configuration files (see resolv.conf(5)) to get the default domain name and name server address(es). If no server is given, the local host is tried. If no domain is given, that associated with the local host is used. It can be overridden with the environment variable LOCALDOMAIN. res_ninit() or res_init() is normally executed by the first call to one of the other functions. Every call to res_ninit() requires a corresponding call to res_nclose() to free memory allocated by res_ninit() and subsequent calls to res_nquery().

The res_nquery() and res_query() functions query the name server for the fully qualified domain name name of specified type and class. The reply is left in the buffer answer of length anslen supplied by the caller.

The res_nsearch() and res_search() functions make a query and waits for the response like res_nquery() and res_query(), but in addition they implement the default and search rules controlled by RES_DEFNAMES and RES_DNSRCH (see description of _res options below).

The res_nquerydomain() and res_querydomain() functions make a query using res_nquery()/res_query() on the concatenation of name and domain.

The following functions are lower-level routines used by res_nquery()/res_query().

The res_nmkquery() and res_mkquery() functions construct a query message in buf of length buflen for the domain name dname. The query type op is one of the following (typically QUERY):

QUERY
Standard query.

IQUERY
Inverse query. This option was removed in glibc 2.26, since it has not been supported by DNS servers for a very long time.

NS_NOTIFY_OP
Notify secondary of SOA (Start of Authority) change.

newrr is currently unused.

The res_nsend() and res_send() function send a preformatted query given in msg of length msglen and returns the answer in answer which is of length anslen. They will call res_ninit()/res_init() if it has not already been called.

The dn_comp() function compresses the domain name exp_dn and stores it in the buffer comp_dn of length length. The compression uses an array of pointers dnptrs to previously compressed names in the current message. The first pointer points to the beginning of the message and the list ends with NULL. The limit of the array is specified by lastdnptr. If dnptr is NULL, domain names are not compressed. If lastdnptr is NULL, the list of labels is not updated.

The dn_expand() function expands the compressed domain name comp_dn to a full domain name, which is placed in the buffer exp_dn of size length. The compressed name is contained in a query or reply message, and msg points to the beginning of the message.

The resolver routines use configuration and state information contained in a __res_state structure (either passed as the statep argument, or in the global variable _res, in the case of the older nonreentrant functions). The only field of this structure that is normally manipulated by the user is the options field. This field can contain the bitwise “OR” of the following options:

RES_INIT
True if res_ninit() or res_init() has been called.

RES_DEBUG
Print debugging messages. This option is available only if glibc was built with debugging enabled, which is not the default.

RES_AAONLY (unimplemented; deprecated in glibc 2.25)
Accept authoritative answers only. res_send() continues until it finds an authoritative answer or returns an error. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEVC
Use TCP connections for queries rather than UDP datagrams.

RES_PRIMARY (unimplemented; deprecated in glibc 2.25)
Query primary domain name server only. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_IGNTC
Ignore truncation errors. Don’t retry with TCP.

RES_RECURSE
Set the recursion desired bit in queries. Recursion is carried out by the domain name server, not by res_send(). [Enabled by default].

RES_DEFNAMES
If set, res_search() will append the default domain name to single component names—that is, those that do not contain a dot. [Enabled by default].

RES_STAYOPEN
Used with RES_USEVC to keep the TCP connection open between queries.

RES_DNSRCH
If set, res_search() will search for hostnames in the current domain and in parent domains. This option is used by gethostbyname(3). [Enabled by default].

RES_INSECURE1
Accept a response from a wrong server. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_INSECURE2
Accept a response which contains a wrong query. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_NOALIASES
Disable usage of HOSTALIASES environment variable.

RES_USE_INET6
Try an AAAA query before an A query inside the gethostbyname(3) function, and map IPv4 responses in IPv6 “tunneled form” if no AAAA records are found but an A record set exists. Since glibc 2.25, this option is deprecated, and its usage produces a warning; applications should use getaddrinfo(3), rather than gethostbyname(3).

RES_ROTATE
Causes round-robin selection of name servers from among those listed. This has the effect of spreading the query load among all listed servers, rather than having all clients try the first listed server first every time.

RES_NOCHECKNAME (unimplemented; deprecated in glibc 2.25)
Disable the modern BIND checking of incoming hostnames and mail names for invalid characters such as underscore (_), non-ASCII, or control characters. This option was present until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_KEEPTSIG (unimplemented; deprecated in glibc 2.25)
Do not strip TSIG records. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_BLAST (unimplemented; deprecated in glibc 2.25)
Send each query simultaneously and recursively to all servers. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEBSTRING (glibc 2.3.4 to glibc 2.24)
Make reverse IPv6 lookups using the bit-label format described in RFC 2673; if this option is not set (which is the default), then nibble format is used. This option was removed in glibc 2.25, since it relied on a backward-incompatible DNS extension that was never deployed on the Internet.

RES_NOIP6DOTINT (glibc 2.24 and earlier)
Use ip6.arpa zone in IPv6 reverse lookup instead of ip6.int, which is deprecated since glibc 2.3.4. This option is present up to and including glibc 2.24, where it is enabled by default. In glibc 2.25, this option was removed.

RES_USE_EDNS0 (since glibc 2.6)
Enables support for the DNS extensions (EDNS0) described in RFC 2671.

RES_SNGLKUP (since glibc 2.10)
By default, glibc performs IPv4 and IPv6 lookups in parallel since glibc 2.9. Some appliance DNS servers cannot handle these queries properly and make the requests time out. This option disables the behavior and makes glibc perform the IPv6 and IPv4 requests sequentially (at the cost of some slowdown of the resolving process).

RES_SNGLKUPREOP
When RES_SNGLKUP option is enabled, opens a new socket for the each request.

RES_USE_DNSSEC
Use DNSSEC with OK bit in OPT record. This option implies RES_USE_EDNS0.

RES_NOTLDQUERY
Do not look up unqualified name as a top-level domain (TLD).

RES_DEFAULT
Default option which implies: RES_RECURSE, RES_DEFNAMES, RES_DNSRCH, and RES_NOIP6DOTINT.

RETURN VALUE

The res_ninit() and res_init() functions return 0 on success, or -1 if an error occurs.

The res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), res_querydomain(), res_nmkquery(), res_mkquery(), res_nsend(), and res_send() functions return the length of the response, or -1 if an error occurs.

The dn_comp() and dn_expand() functions return the length of the compressed name, or -1 if an error occurs.

In the case of an error return from res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), or res_querydomain(), the global variable h_errno (see gethostbyname(3)) can be consulted to determine the cause of the error.

FILES

/etc/resolv.conf
resolver configuration file

/etc/host.conf
resolver configuration file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

res_ninit(), res_nclose(), res_nquery(), res_nsearch(), res_nquerydomain(), res_nsend()

Thread safetyMT-Safe locale

res_nmkquery(), dn_comp(), dn_expand()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

4.3BSD.

SEE ALSO

gethostbyname(3), resolv.conf(5), resolver(5), hostname(7), named(8)

The GNU C library source file resolv/README.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2107 - Linux cli command logbl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command logbl and provides detailed information about the command logbl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the logbl.

NAME 🖥️ logbl 🖥️

get exponent of a floating-point value

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double logb(double x);
float logbf(float x);
long double logbl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

logb():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

logbf(), logbl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions extract the exponent from the internal floating-point representation of x and return it as a floating-point value. The integer constant FLT_RADIX, defined in <float.h>, indicates the radix used for the system’s floating-point representation. If FLT_RADIX is 2, logb(x) is similar to floor(log2(fabs(x))), except that the latter may give an incorrect integer due to intermediate rounding.

If x is subnormal, logb() returns the exponent x would have if it were normalized.

RETURN VALUE

On success, these functions return the exponent of x.

If x is a NaN, a NaN is returned.

If x is zero, then a pole error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.

If x is negative infinity or positive infinity, then positive infinity is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Pole error: x is 0
A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised.

These functions do not set errno.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

logb(), logbf(), logbl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

logb()
4.3BSD (see IEEE.3 in the 4.3BSD manual).

SEE ALSO

ilogb(3), log(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2108 - Linux cli command zip_discard

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_discard and provides detailed information about the command zip_discard, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_discard.

libzip (-lzip)

The

function closes

and frees the memory allocated for it. Any changes to the archive are not written to disk and discarded.

was added in libzip 0.11.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2109 - Linux cli command pthread_mutexattr_destroy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_mutexattr_destroy and provides detailed information about the command pthread_mutexattr_destroy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_mutexattr_destroy.

NAME 🖥️ pthread_mutexattr_destroy 🖥️

initialize and destroy a mutex attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_mutexattr_init(pthread_mutexattr_t *attr);
int pthread_mutexattr_destroy(pthread_mutexattr_t *attr);

DESCRIPTION

The pthread_mutexattr_init() function initializes the mutex attributes object pointed to by attr with default values for all attributes defined by the implementation.

The results of initializing an already initialized mutex attributes object are undefined.

The pthread_mutexattr_destroy() function destroys a mutex attribute object (making it uninitialized). Once a mutex attributes object has been destroyed, it can be reinitialized with pthread_mutexattr_init().

The results of destroying an uninitialized mutex attributes object are undefined.

RETURN VALUE

On success, these functions return 0. On error, they return a positive error number.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

Subsequent changes to a mutex attributes object do not affect mutex that have already been initialized using that object.

SEE ALSO

pthread_mutex_init(3), pthread_mutexattr_getpshared(3), pthread_mutexattr_getrobust(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2110 - Linux cli command wcsncmp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcsncmp and provides detailed information about the command wcsncmp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcsncmp.

NAME 🖥️ wcsncmp 🖥️

compare two fixed-size wide-character strings

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
int wcsncmp(const wchar_t s1[.n], const wchar_t s2[.n], size_t n);

DESCRIPTION

The wcsncmp() function is the wide-character equivalent of the strncmp(3) function. It compares the wide-character string pointed to by s1 and the wide-character string pointed to by s2, but at most n wide characters from each string. In each string, the comparison extends only up to the first occurrence of a null wide character (L’�’), if any.

RETURN VALUE

The wcsncmp() function returns zero if the wide-character strings at s1 and s2, truncated to at most length n, are equal. It returns an integer greater than zero if at the first differing position i (i < n), the corresponding wide-character s1[i] is greater than s2[i]. It returns an integer less than zero if at the first differing position i (i < n), the corresponding wide-character s1[i] is less than s2[i].

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcsncmp()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

strncmp(3), wcsncasecmp(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2111 - Linux cli command Image_ExifTool_Importpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Importpm and provides detailed information about the command Image_ExifTool_Importpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Importpm.

NAME 🖥️ Image_ExifTool_Importpm 🖥️

Import CSV and JSON database files

SYNOPSIS

use Image::ExifTool::Import qw(ReadCSV ReadJSON); $err = ReadCSV($csvFile, \database); $err = ReadJSON($jsonfile, \database);

DESCRIPTION

This module contains routines for importing tag information from CSV (Comma Separated Value) and JSON (JavaScript Object Notation) database files.

EXPORTS

Exports nothing by default, but ReadCSV and ReadJSON may be exported.

METHODS

ReadCSV / ReadJSON

Read CSV or JSON file into a database hash.

Inputs:
0) CSV file name or file reference. 1) Hash reference for database object. 2) Optional string used to represent an undefined (missing) tag value. (Used for deleting tags.) 3) For ReadCSV this gives the delimiter for CSV entries, with a default of “,”. For ReadJSON this is the character set for converting Unicode escape sequences in strings, with a default of “UTF8”. See the ExifTool Charset option for a list of valid character sets.

Return Value:
These functions return an error string, or undef on success and populate the database hash with entries from the CSV or JSON file. Entries are keyed based on the SourceFile column of the CSV or JSON information, and are stored as hash lookups of tag name/value for each SourceFile.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2112 - Linux cli command le32toh

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command le32toh and provides detailed information about the command le32toh, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the le32toh.

NAME 🖥️ le32toh 🖥️

convert values between host and big-/little-endian byte order

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <endian.h>
uint16_t htobe16(uint16_t host_16bits);
uint16_t htole16(uint16_t host_16bits);
uint16_t be16toh(uint16_t big_endian_16bits);
uint16_t le16toh(uint16_t little_endian_16bits);
uint32_t htobe32(uint32_t host_32bits);
uint32_t htole32(uint32_t host_32bits);
uint32_t be32toh(uint32_t big_endian_32bits);
uint32_t le32toh(uint32_t little_endian_32bits);
uint64_t htobe64(uint64_t host_64bits);
uint64_t htole64(uint64_t host_64bits);
uint64_t be64toh(uint64_t big_endian_64bits);
uint64_t le64toh(uint64_t little_endian_64bits);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

htobe16(), htole16(), be16toh(), le16toh(), htobe32(), htole32(), be32toh(), le32toh(), htobe64(), htole64(), be64toh(), le64toh():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    In glibc up to and including 2.19:
        _BSD_SOURCE

DESCRIPTION

These functions convert the byte encoding of integer values from the byte order that the current CPU (the “host”) uses, to and from little-endian and big-endian byte order.

The number, nn, in the name of each function indicates the size of integer handled by the function, either 16, 32, or 64 bits.

The functions with names of the form “htobenn” convert from host byte order to big-endian order.

The functions with names of the form “htolenn” convert from host byte order to little-endian order.

The functions with names of the form “benntoh” convert from big-endian order to host byte order.

The functions with names of the form “lenntoh” convert from little-endian order to host byte order.

VERSIONS

Similar functions are present on the BSDs, where the required header file is <sys/endian.h> instead of <endian.h>. Unfortunately, NetBSD, FreeBSD, and glibc haven’t followed the original OpenBSD naming convention for these functions, whereby the nn component always appears at the end of the function name (thus, for example, in NetBSD, FreeBSD, and glibc, the equivalent of OpenBSDs “betoh32” is “be32toh”).

STANDARDS

None.

HISTORY

glibc 2.9.

These functions are similar to the older byteorder(3) family of functions. For example, be32toh() is identical to ntohl().

The advantage of the byteorder(3) functions is that they are standard functions available on all UNIX systems. On the other hand, the fact that they were designed for use in the context of TCP/IP means that they lack the 64-bit and little-endian variants described in this page.

EXAMPLES

The program below display the results of converting an integer from host byte order to both little-endian and big-endian byte order. Since host byte order is either little-endian or big-endian, only one of these conversions will have an effect. When we run this program on a little-endian system such as x86-32, we see the following:

$ ./a.out
x.u32 = 0x44332211
htole32(x.u32) = 0x44332211
htobe32(x.u32) = 0x11223344

Program source

#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    union {
        uint32_t u32;
        uint8_t arr[4];
    } x;
    x.arr[0] = 0x11;	/* Lowest-address byte */
    x.arr[1] = 0x22;
    x.arr[2] = 0x33;
    x.arr[3] = 0x44;	/* Highest-address byte */
    printf("x.u32 = %#x

“, x.u32); printf(“htole32(x.u32) = %#x “, htole32(x.u32)); printf(“htobe32(x.u32) = %#x “, htobe32(x.u32)); exit(EXIT_SUCCESS); }

SEE ALSO

bswap(3), byteorder(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2113 - Linux cli command seed48

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command seed48 and provides detailed information about the command seed48, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the seed48.

NAME 🖥️ seed48 🖥️

generate uniformly distributed pseudo-random numbers

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
double drand48(void);
double erand48(unsigned short xsubi[3]);
long lrand48(void);
long nrand48(unsigned short xsubi[3]);
long mrand48(void);
long jrand48(unsigned short xsubi[3]);
void srand48(long seedval);
unsigned short *seed48(unsigned short seed16v[3]);
void lcong48(unsigned short param[7]);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

DESCRIPTION

These functions generate pseudo-random numbers using the linear congruential algorithm and 48-bit integer arithmetic.

The drand48() and erand48() functions return nonnegative double-precision floating-point values uniformly distributed over the interval [0.0, 1.0).

The lrand48() and nrand48() functions return nonnegative long integers uniformly distributed over the interval [0, 2^31).

The mrand48() and jrand48() functions return signed long integers uniformly distributed over the interval [-2^31, 2^31).

The srand48(), seed48(), and lcong48() functions are initialization functions, one of which should be called before using drand48(), lrand48(), or mrand48(). The functions erand48(), nrand48(), and jrand48() do not require an initialization function to be called first.

All the functions work by generating a sequence of 48-bit integers, Xi, according to the linear congruential formula:

Xn+1 = (aXn + c) mod m, where n >= 0

The parameter m = 2^48, hence 48-bit integer arithmetic is performed. Unless lcong48() is called, a and c are given by:

a = 0x5DEECE66D
c = 0xB

The value returned by any of the functions drand48(), erand48(), lrand48(), nrand48(), mrand48(), or jrand48() is computed by first generating the next 48-bit Xi in the sequence. Then the appropriate number of bits, according to the type of data item to be returned, is copied from the high-order bits of Xi and transformed into the returned value.

The functions drand48(), lrand48(), and mrand48() store the last 48-bit Xi generated in an internal buffer. The functions erand48(), nrand48(), and jrand48() require the calling program to provide storage for the successive Xi values in the array argument xsubi. The functions are initialized by placing the initial value of Xi into the array before calling the function for the first time.

The initializer function srand48() sets the high order 32-bits of Xi to the argument seedval. The low order 16-bits are set to the arbitrary value 0x330E.

The initializer function seed48() sets the value of Xi to the 48-bit value specified in the array argument seed16v. The previous value of Xi is copied into an internal buffer and a pointer to this buffer is returned by seed48().

The initialization function lcong48() allows the user to specify initial values for Xi, a, and c. Array argument elements param[0-2] specify Xi, param[3-5] specify a, and param[6] specifies c. After lcong48() has been called, a subsequent call to either srand48() or seed48() will restore the standard values of a and c.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

drand48(), erand48(), lrand48(), nrand48(), mrand48(), jrand48(), srand48(), seed48(), lcong48()

Thread safety

MT-Unsafe race:drand48

The above functions record global state information for the random number generator, so they are not thread-safe.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4.

SEE ALSO

rand(3), random(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2114 - Linux cli command klogctl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command klogctl and provides detailed information about the command klogctl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the klogctl.

NAME 🖥️ klogctl 🖥️

read and/or clear kernel message ring buffer; set console_loglevel

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/klog.h> /* Definition of SYSLOG_* constants */
#include <sys/syscall.h> /* Definition of SYS_* constants */
#include <unistd.h>
int syscall(SYS_syslog, int type, char *bufp, int len);
/* The glibc interface */
#include <sys/klog.h>
int klogctl(int type, char *bufp, int len);

DESCRIPTION

Note: Probably, you are looking for the C library function syslog(), which talks to syslogd(8); see syslog(3) for details.

This page describes the kernel syslog() system call, which is used to control the kernel printk() buffer; the glibc wrapper function for the system call is called klogctl().

The kernel log buffer

The kernel has a cyclic buffer of length LOG_BUF_LEN in which messages given as arguments to the kernel function printk() are stored (regardless of their log level). In early kernels, LOG_BUF_LEN had the value 4096; from Linux 1.3.54, it was 8192; from Linux 2.1.113, it was 16384; since Linux 2.4.23/2.6, the value is a kernel configuration option (CONFIG_LOG_BUF_SHIFT, default value dependent on the architecture). Since Linux 2.6.6, the size can be queried with command type 10 (see below).

Commands

The type argument determines the action taken by this function. The list below specifies the values for type. The symbolic names are defined in the kernel source, but are not exported to user space; you will either need to use the numbers, or define the names yourself.

SYSLOG_ACTION_CLOSE (0)
Close the log. Currently a NOP.

SYSLOG_ACTION_OPEN (1)
Open the log. Currently a NOP.

SYSLOG_ACTION_READ (2)
Read from the log. The call waits until the kernel log buffer is nonempty, and then reads at most len bytes into the buffer pointed to by bufp. The call returns the number of bytes read. Bytes read from the log disappear from the log buffer: the information can be read only once. This is the function executed by the kernel when a user program reads /proc/kmsg.

SYSLOG_ACTION_READ_ALL (3)
Read all messages remaining in the ring buffer, placing them in the buffer pointed to by bufp. The call reads the last len bytes from the log buffer (nondestructively), but will not read more than was written into the buffer since the last “clear ring buffer” command (see command 5 below)). The call returns the number of bytes read.

SYSLOG_ACTION_READ_CLEAR (4)
Read and clear all messages remaining in the ring buffer. The call does precisely the same as for a type of 3, but also executes the “clear ring buffer” command.

SYSLOG_ACTION_CLEAR (5)
The call executes just the “clear ring buffer” command. The bufp and len arguments are ignored.

This command does not really clear the ring buffer. Rather, it sets a kernel bookkeeping variable that determines the results returned by commands 3 (SYSLOG_ACTION_READ_ALL) and 4 (SYSLOG_ACTION_READ_CLEAR). This command has no effect on commands 2 (SYSLOG_ACTION_READ) and 9 (SYSLOG_ACTION_SIZE_UNREAD).

SYSLOG_ACTION_CONSOLE_OFF (6)
The command saves the current value of console_loglevel and then sets console_loglevel to minimum_console_loglevel, so that no messages are printed to the console. Before Linux 2.6.32, the command simply sets console_loglevel to minimum_console_loglevel. See the discussion of /proc/sys/kernel/printk, below.

The bufp and len arguments are ignored.

SYSLOG_ACTION_CONSOLE_ON (7)
If a previous SYSLOG_ACTION_CONSOLE_OFF command has been performed, this command restores console_loglevel to the value that was saved by that command. Before Linux 2.6.32, this command simply sets console_loglevel to default_console_loglevel. See the discussion of /proc/sys/kernel/printk, below.

The bufp and len arguments are ignored.

SYSLOG_ACTION_CONSOLE_LEVEL (8)
The call sets console_loglevel to the value given in len, which must be an integer between 1 and 8 (inclusive). The kernel silently enforces a minimum value of minimum_console_loglevel for len. See the log level section for details. The bufp argument is ignored.

SYSLOG_ACTION_SIZE_UNREAD (9) (since Linux 2.4.10)
The call returns the number of bytes currently available to be read from the kernel log buffer via command 2 (SYSLOG_ACTION_READ). The bufp and len arguments are ignored.

SYSLOG_ACTION_SIZE_BUFFER (10) (since Linux 2.6.6)
This command returns the total size of the kernel log buffer. The bufp and len arguments are ignored.

All commands except 3 and 10 require privilege. In Linux kernels before Linux 2.6.37, command types 3 and 10 are allowed to unprivileged processes; since Linux 2.6.37, these commands are allowed to unprivileged processes only if /proc/sys/kernel/dmesg_restrict has the value 0. Before Linux 2.6.37, “privileged” means that the caller has the CAP_SYS_ADMIN capability. Since Linux 2.6.37, “privileged” means that the caller has either the CAP_SYS_ADMIN capability (now deprecated for this purpose) or the (new) CAP_SYSLOG capability.

/proc/sys/kernel/printk

/proc/sys/kernel/printk is a writable file containing four integer values that influence kernel printk() behavior when printing or logging error messages. The four values are:

console_loglevel
Only messages with a log level lower than this value will be printed to the console. The default value for this field is DEFAULT_CONSOLE_LOGLEVEL (7), but it is set to 4 if the kernel command line contains the word “quiet”, 10 if the kernel command line contains the word “debug”, and to 15 in case of a kernel fault (the 10 and 15 are just silly, and equivalent to 8). The value of console_loglevel can be set (to a value in the range 1–8) by a syslog() call with a type of 8.

default_message_loglevel
This value will be used as the log level for printk() messages that do not have an explicit level. Up to and including Linux 2.6.38, the hard-coded default value for this field was 4 (KERN_WARNING); since Linux 2.6.39, the default value is defined by the kernel configuration option CONFIG_DEFAULT_MESSAGE_LOGLEVEL, which defaults to 4.

minimum_console_loglevel
The value in this field is the minimum value to which console_loglevel can be set.

default_console_loglevel
This is the default value for console_loglevel.

The log level

Every printk() message has its own log level. If the log level is not explicitly specified as part of the message, it defaults to default_message_loglevel. The conventional meaning of the log level is as follows:

Kernel constantLevel valueMeaning
KERN_EMERG0System is unusable
KERN_ALERT1Action must be taken immediately
KERN_CRIT2Critical conditions
KERN_ERR3Error conditions
KERN_WARNING4Warning conditions
KERN_NOTICE5Normal but significant condition
KERN_INFO6Informational
KERN_DEBUG7Debug-level messages

The kernel printk() routine will print a message on the console only if it has a log level less than the value of console_loglevel.

RETURN VALUE

For type equal to 2, 3, or 4, a successful call to syslog() returns the number of bytes read. For type 9, syslog() returns the number of bytes currently available to be read on the kernel log buffer. For type 10, syslog() returns the total size of the kernel log buffer. For other values of type, 0 is returned on success.

In case of error, -1 is returned, and errno is set to indicate the error.

ERRORS

EINVAL
Bad arguments (e.g., bad type; or for type 2, 3, or 4, buf is NULL, or len is less than zero; or for type 8, the level is outside the range 1 to 8).

ENOSYS
This syslog() system call is not available, because the kernel was compiled with the CONFIG_PRINTK kernel-configuration option disabled.

EPERM
An attempt was made to change console_loglevel or clear the kernel message ring buffer by a process without sufficient privilege (more precisely: without the CAP_SYS_ADMIN or CAP_SYSLOG capability).

ERESTARTSYS
System call was interrupted by a signal; nothing was read. (This can be seen only during a trace.)

STANDARDS

Linux.

HISTORY

From the very start, people noted that it is unfortunate that a system call and a library routine of the same name are entirely different animals.

SEE ALSO

dmesg(1), syslog(3), capabilities(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2115 - Linux cli command getgrnam_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getgrnam_r and provides detailed information about the command getgrnam_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getgrnam_r.

NAME 🖥️ getgrnam_r 🖥️

get group file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <grp.h>
struct group *getgrnam(const char *name);
struct group *getgrgid(gid_t gid);
int getgrnam_r(const char *restrict name",structgroup*restrict"grp,
 char buf[restrict .buflen], size_t buflen,
 struct group **restrict result);
int getgrgid_r(gid_t gid, struct group *restrict grp,
 char buf[restrict .buflen], size_t buflen,
 struct group **restrict result);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getgrnam_r(), getgrgid_r():

    _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The getgrnam() function returns a pointer to a structure containing the broken-out fields of the record in the group database (e.g., the local group file /etc/group, NIS, and LDAP) that matches the group name name.

The getgrgid() function returns a pointer to a structure containing the broken-out fields of the record in the group database that matches the group ID gid.

The group structure is defined in <grp.h> as follows:

struct group {
    char   *gr_name;        /* group name */
    char   *gr_passwd;      /* group password */
    gid_t   gr_gid;         /* group ID */
    char  **gr_mem;         /* NULL-terminated array of pointers
                               to names of group members */
};

For more information about the fields of this structure, see group(5).

The getgrnam_r() and getgrgid_r() functions obtain the same information as getgrnam() and getgrgid(), but store the retrieved group structure in the space pointed to by grp. The string fields pointed to by the members of the group structure are stored in the buffer buf of size buflen. A pointer to the result (in case of success) or NULL (in case no entry was found or an error occurred) is stored in *result.

The call

sysconf(_SC_GETGR_R_SIZE_MAX)

returns either -1, without changing errno, or an initial suggested size for buf. (If this size is too small, the call fails with ERANGE, in which case the caller can retry with a larger buffer.)

RETURN VALUE

The getgrnam() and getgrgid() functions return a pointer to a group structure, or NULL if the matching entry is not found or an error occurs. If an error occurs, errno is set to indicate the error. If one wants to check errno after the call, it should be set to zero before the call.

The return value may point to a static area, and may be overwritten by subsequent calls to getgrent(3), getgrgid(), or getgrnam(). (Do not pass the returned pointer to free(3).)

On success, getgrnam_r() and getgrgid_r() return zero, and set *result to grp. If no matching group record was found, these functions return 0 and store NULL in *result. In case of error, an error number is returned, and NULL is stored in *result.

ERRORS

0 or ENOENT or ESRCH or EBADF or EPERM or …
The given name or gid was not found.

EINTR
A signal was caught; see signal(7).

EIO
I/O error.

EMFILE
The per-process limit on the number of open file descriptors has been reached.

ENFILE
The system-wide limit on the total number of open files has been reached.

ENOMEM
Insufficient memory to allocate group structure.

ERANGE
Insufficient buffer space supplied.

FILES

/etc/group
local group database file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getgrnam()

Thread safety

MT-Unsafe race:grnam locale

getgrgid()

Thread safety

MT-Unsafe race:grgid locale

getgrnam_r(), getgrgid_r()

Thread safetyMT-Safe locale

VERSIONS

The formulation given above under “RETURN VALUE” is from POSIX.1. It does not call “not found” an error, hence does not specify what value errno might have in this situation. But that makes it impossible to recognize errors. One might argue that according to POSIX errno should be left unchanged if an entry is not found. Experiments on various UNIX-like systems show that lots of different values occur in this situation: 0, ENOENT, EBADF, ESRCH, EWOULDBLOCK, EPERM, and probably others.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4, 4.3BSD.

SEE ALSO

endgrent(3), fgetgrent(3), getgrent(3), getpwnam(3), setgrent(3), group(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2116 - Linux cli command mcheck_check_all

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mcheck_check_all and provides detailed information about the command mcheck_check_all, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mcheck_check_all.

NAME 🖥️ mcheck_check_all 🖥️

heap consistency checking

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <mcheck.h>
int mcheck(void (*abortfunc)(enum mcheck_status mstatus));
int mcheck_pedantic(void (*abortfunc)(enum mcheck_status mstatus));
void mcheck_check_all(void);
enum mcheck_status mprobe(void *ptr);

DESCRIPTION

The mcheck() function installs a set of debugging hooks for the malloc(3) family of memory-allocation functions. These hooks cause certain consistency checks to be performed on the state of the heap. The checks can detect application errors such as freeing a block of memory more than once or corrupting the bookkeeping data structures that immediately precede a block of allocated memory.

To be effective, the mcheck() function must be called before the first call to malloc(3) or a related function. In cases where this is difficult to ensure, linking the program with -lmcheck inserts an implicit call to mcheck() (with a NULL argument) before the first call to a memory-allocation function.

The mcheck_pedantic() function is similar to mcheck(), but performs checks on all allocated blocks whenever one of the memory-allocation functions is called. This can be very slow!

The mcheck_check_all() function causes an immediate check on all allocated blocks. This call is effective only if mcheck() is called beforehand.

If the system detects an inconsistency in the heap, the caller-supplied function pointed to by abortfunc is invoked with a single argument, mstatus, that indicates what type of inconsistency was detected. If abortfunc is NULL, a default function prints an error message on stderr and calls abort(3).

The mprobe() function performs a consistency check on the block of allocated memory pointed to by ptr. The mcheck() function should be called beforehand (otherwise mprobe() returns MCHECK_DISABLED).

The following list describes the values returned by mprobe() or passed as the mstatus argument when abortfunc is invoked:

MCHECK_DISABLED (mprobe() only)
mcheck() was not called before the first memory allocation function was called. Consistency checking is not possible.

MCHECK_OK (mprobe() only)
No inconsistency detected.

MCHECK_HEAD
Memory preceding an allocated block was clobbered.

MCHECK_TAIL
Memory following an allocated block was clobbered.

MCHECK_FREE
A block of memory was freed twice.

RETURN VALUE

mcheck() and mcheck_pedantic() return 0 on success, or -1 on error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mcheck(), mcheck_pedantic(), mcheck_check_all(), mprobe()

Thread safety

MT-Unsafe race:mcheck const:malloc_hooks

STANDARDS

GNU.

HISTORY

mcheck_pedantic()
mcheck_check_all()
glibc 2.2.

mcheck()
mprobe()
glibc 2.0.

NOTES

Linking a program with -lmcheck and using the MALLOC_CHECK_ environment variable (described in mallopt(3)) cause the same kinds of errors to be detected. But, using MALLOC_CHECK_ does not require the application to be relinked.

EXAMPLES

The program below calls mcheck() with a NULL argument and then frees the same block of memory twice. The following shell session demonstrates what happens when running the program:

$ ./a.out
About to free
About to free a second time
block freed twice
Aborted (core dumped)

Program source

#include <mcheck.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    char *p;
    if (mcheck(NULL) != 0) {
        fprintf(stderr, "mcheck() failed

“); exit(EXIT_FAILURE); } p = malloc(1000); fprintf(stderr, “About to free “); free(p); fprintf(stderr, " About to free a second time “); free(p); exit(EXIT_SUCCESS); }

SEE ALSO

malloc(3), mallopt(3), mtrace(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2117 - Linux cli command Moose_Manual_Exceptions_Manifestpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Manual_Exceptions_Manifestpm and provides detailed information about the command Moose_Manual_Exceptions_Manifestpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Manual_Exceptions_Manifestpm.

NAME 🖥️ Moose_Manual_Exceptions_Manifestpm 🖥️

Moose’s Exception Types

VERSION

version 2.2207

DESCRIPTION

This document contains a manifest of all the exception classes that are thrown as Moose internal errors.

COMMON ELEMENTS

Unless otherwise stated, all classes are subclasses of Moose::Exception.

Similarly, all classes provide the following attribute reader methods:

$exception->message

This method returns the error message for the exception.

$exception->trace

This method returns a Devel::StackTrace object.

EXCEPTION CLASSES

Moose ships with the following exception classes:

Moose::Exception::AccessorMustReadWrite

This class consumes the Moose::Exception::Role::InvalidAttributeOptions and Moose::Exception::Role::ParamsHash roles.

This class has the following methods:

  • $exception->attribute_name() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::AddParameterizableTypeTakesParameterizableType

This class has the following methods:

  • $exception->type_name() Returns a Str value.

Moose::Exception::AddRoleTakesAMooseMetaRoleInstance

This class consumes the Moose::Exception::Role::Class role.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->role_to_be_added()

Moose::Exception::AddRoleToARoleTakesAMooseMetaRole

This class consumes the Moose::Exception::Role::Role role.

This class has the following methods:

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

  • $exception->role_to_be_added()

Moose::Exception::ApplyTakesABlessedInstance

This class consumes the Moose::Exception::Role::Role role.

This class has the following methods:

  • $exception->param()

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

Moose::Exception::AttachToClassNeedsAClassMOPClassInstanceOrASubclass

This class consumes the Moose::Exception::Role::Attribute role.

This class has the following methods:

  • $exception->attribute() Returns a Class::MOP::Attribute object.

  • $exception->class()

Moose::Exception::AttributeConflictInRoles

This class consumes the Moose::Exception::Role::Role role.

This class has the following methods:

  • $exception->attribute_name() Returns a Str value.

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

  • $exception->second_role_name() Returns a Str value.

Moose::Exception::AttributeConflictInSummation

This class consumes the Moose::Exception::Role::AttributeName and Moose::Exception::Role::Role roles.

This class has the following methods:

  • $exception->attribute_name() Returns a Str value.

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

  • $exception->second_role_name() Returns a Str value.

Moose::Exception::AttributeExtensionIsNotSupportedInRoles

This class consumes the Moose::Exception::Role::Role role.

This class has the following methods:

  • $exception->attribute_name() Returns a Str value.

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

Moose::Exception::AttributeIsRequired

This class consumes the Moose::Exception::Role::Class role.

This class has the following methods:

  • $exception->attribute_init_arg() Returns a Str value.

  • $exception->attribute_name() Returns a Str value. This attribute can be used for fetching attribute instance: my $class = Moose::Util::find_meta( $exception->class_name ); my $attribute = $class->get_attribute( $exception->attribute_name );

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->params() Returns a HashRef value.

Moose::Exception::AttributeMustBeAnClassMOPMixinAttributeCoreOrSubclass

This class consumes the Moose::Exception::Role::Class role.

This class has the following methods:

  • $exception->attribute()

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

Moose::Exception::AttributeNamesDoNotMatch

This class has the following methods:

  • $exception->attribute() Returns a Class::MOP::Attribute object.

  • $exception->attribute_name() Returns a Str value.

Moose::Exception::AttributeValueIsNotAnObject

This class consumes the Moose::Exception::Role::Attribute and Moose::Exception::Role::Instance roles.

This class has the following methods:

  • $exception->attribute() Returns a Class::MOP::Attribute object.

  • $exception->given_value()

  • $exception->instance() Returns an Object value.

  • $exception->method() Returns a Moose::Meta::Method::Delegation object.

Moose::Exception::AttributeValueIsNotDefined

This class consumes the Moose::Exception::Role::Attribute and Moose::Exception::Role::Instance roles.

This class has the following methods:

  • $exception->attribute() Returns a Class::MOP::Attribute object.

  • $exception->instance() Returns an Object value.

  • $exception->method() Returns a Moose::Meta::Method::Delegation object.

Moose::Exception::AutoDeRefNeedsArrayRefOrHashRef

This class consumes the Moose::Exception::Role::InvalidAttributeOptions and Moose::Exception::Role::ParamsHash roles.

This class has the following methods:

  • $exception->attribute_name() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::BadOptionFormat

This class consumes the Moose::Exception::Role::Attribute role.

This class has the following methods:

  • $exception->attribute() Returns a Class::MOP::Attribute object.

  • $exception->option_name() Returns a Str value.

  • $exception->option_value()

Moose::Exception::BothBuilderAndDefaultAreNotAllowed

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::BuilderDoesNotExist

This class consumes the Moose::Exception::Role::Attribute and Moose::Exception::Role::Instance roles.

This class has the following methods:

  • $exception->attribute() Returns a Class::MOP::Attribute object.

  • $exception->instance() Returns an Object value.

Moose::Exception::BuilderMethodNotSupportedForAttribute

This class consumes the Moose::Exception::Role::Attribute and Moose::Exception::Role::Instance roles.

This class has the following methods:

  • $exception->attribute() Returns a Class::MOP::Attribute object.

  • $exception->instance() Returns an Object value.

Moose::Exception::BuilderMethodNotSupportedForInlineAttribute

This class consumes the Moose::Exception::Role::Class and Moose::Exception::Role::Instance roles.

This class has the following methods:

  • $exception->attribute_name() Returns a Str value.

  • $exception->builder() Returns a Str value.

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->instance() Returns an Object value.

Moose::Exception::BuilderMustBeAMethodName

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::CallingMethodOnAnImmutableInstance

This class has the following methods:

  • $exception->method_name() Returns a Str value.

Moose::Exception::CallingReadOnlyMethodOnAnImmutableInstance

This class has the following methods:

  • $exception->method_name() Returns a Str value.

Moose::Exception::CanExtendOnlyClasses

This class consumes the Moose::Exception::Role::Role role.

This class has the following methods:

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

Moose::Exception::CanOnlyConsumeRole

This class has the following methods:

  • $exception->role_name() Returns a Str value.

Moose::Exception::CanOnlyWrapBlessedCode

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->code()

  • $exception->params() Returns a HashRef value.

Moose::Exception::CanReblessOnlyIntoASubclass

This class consumes the Moose::Exception::Role::Class, Moose::Exception::Role::Instance, Moose::Exception::Role::InstanceClass, and Moose::Exception::Role::ParamsHash roles.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->instance() Returns an Object value.

  • $exception->instance_class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::CanReblessOnlyIntoASuperclass

This class consumes the Moose::Exception::Role::Class, Moose::Exception::Role::Instance, and Moose::Exception::Role::InstanceClass roles.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->instance() Returns an Object value.

  • $exception->instance_class() Returns a Str value.

Moose::Exception::CannotAddAdditionalTypeCoercionsToUnion

This class has the following methods:

  • $exception->type_coercion_union_object() Returns a Moose::Meta::TypeCoercion::Union object.

Moose::Exception::CannotAddAsAnAttributeToARole

This class consumes the Moose::Exception::Role::Role role.

This class has the following methods:

  • $exception->attribute_class() Returns a Str value.

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

Moose::Exception::CannotApplyBaseClassRolesToRole

This class consumes the Moose::Exception::Role::ParamsHash and Moose::Exception::Role::Role roles.

This class has the following methods:

  • $exception->params() Returns a HashRef value.

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

Moose::Exception::CannotAssignValueToReadOnlyAccessor

This class consumes the Moose::Exception::Role::Class and Moose::Exception::Role::EitherAttributeOrAttributeName roles.

This class has the following methods:

  • $exception->attribute() Returns a Class::MOP::Attribute object.

  • $exception->attribute_name() Returns a Str value.

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->params() Returns a HashRef value.

  • $exception->value()

Moose::Exception::CannotAugmentIfLocalMethodPresent

This class consumes the Moose::Exception::Role::Class and Moose::Exception::Role::Method roles.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->method() Returns a Moose::Meta::Method object.

Moose::Exception::CannotAugmentNoSuperMethod

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->method_name() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::CannotAutoDerefWithoutIsa

This class consumes the Moose::Exception::Role::InvalidAttributeOptions and Moose::Exception::Role::ParamsHash roles.

This class has the following methods:

  • $exception->attribute_name() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::CannotAutoDereferenceTypeConstraint

This class consumes the Moose::Exception::Role::Attribute, Moose::Exception::Role::Instance, and Moose::Exception::Role::TypeConstraint roles.

This class has the following methods:

  • $exception->attribute() Returns a Class::MOP::Attribute object.

  • $exception->instance() Returns an Object value.

  • $exception->type_name() Returns a Str value. This attribute can be used for fetching type constraint(Moose::Meta::TypeConstraint): my $type_constraint = Moose::Util::TypeConstraints::find_type_constraint( $exception->type_name );

Moose::Exception::CannotCalculateNativeType

This class consumes the Moose::Exception::Role::Instance role.

This class has the following methods:

  • $exception->instance() Returns an Object value.

Moose::Exception::CannotCallAnAbstractBaseMethod

This class has the following methods:

  • $exception->package_name() Returns a Str value.

Moose::Exception::CannotCallAnAbstractMethod

This class has no attributes except for message and trace().

Moose::Exception::CannotCoerceAWeakRef

This class consumes the Moose::Exception::Role::InvalidAttributeOptions and Moose::Exception::Role::ParamsHash roles.

This class has the following methods:

  • $exception->attribute_name() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::CannotCoerceAttributeWhichHasNoCoercion

This class consumes the Moose::Exception::Role::InvalidAttributeOptions, Moose::Exception::Role::ParamsHash, and Moose::Exception::Role::TypeConstraint roles.

This class has the following methods:

  • $exception->attribute_name() Returns a Str value.

  • $exception->params() Returns a HashRef value.

  • $exception->type_name() Returns a Str value. This attribute can be used for fetching type constraint(Moose::Meta::TypeConstraint): my $type_constraint = Moose::Util::TypeConstraints::find_type_constraint( $exception->type_name );

Moose::Exception::CannotCreateHigherOrderTypeWithoutATypeParameter

This class consumes the Moose::Exception::Role::TypeConstraint role.

This class has the following methods:

  • $exception->type_name() Returns a Str value. This attribute can be used for fetching type constraint(Moose::Meta::TypeConstraint): my $type_constraint = Moose::Util::TypeConstraints::find_type_constraint( $exception->type_name );

Moose::Exception::CannotCreateMethodAliasLocalMethodIsPresent

This class consumes the Moose::Exception::Role::Method and Moose::Exception::Role::Role roles.

This class has the following methods:

  • $exception->aliased_method_name() Returns a Str value.

  • $exception->method() Returns a Moose::Meta::Method object.

  • $exception->role_being_applied_name() Returns a Str value.

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

Moose::Exception::CannotCreateMethodAliasLocalMethodIsPresentInClass

This class consumes the Moose::Exception::Role::Class, Moose::Exception::Role::Method, and Moose::Exception::Role::Role roles.

This class has the following methods:

  • $exception->aliased_method_name() Returns a Str value.

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->method() Returns a Moose::Meta::Method object.

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

Moose::Exception::CannotDelegateLocalMethodIsPresent

This class consumes the Moose::Exception::Role::Attribute and Moose::Exception::Role::Method roles.

This class has the following methods:

  • $exception->attribute() Returns a Class::MOP::Attribute object.

  • $exception->method() Returns a Moose::Meta::Method object.

Moose::Exception::CannotDelegateWithoutIsa

This class consumes the Moose::Exception::Role::Attribute role.

This class has the following methods:

  • $exception->attribute() Returns a Class::MOP::Attribute object.

Moose::Exception::CannotFindDelegateMetaclass

This class consumes the Moose::Exception::Role::Attribute role.

This class has the following methods:

  • $exception->attribute() Returns a Class::MOP::Attribute object.

Moose::Exception::CannotFindType

This class has the following methods:

  • $exception->type_name() Returns a Str value.

Moose::Exception::CannotFindTypeGivenToMatchOnType

This class has the following methods:

  • $exception->action()

  • $exception->to_match()

  • $exception->type()

Moose::Exception::CannotFixMetaclassCompatibility

This class consumes the Moose::Exception::Role::Class role.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->metaclass_type() Returns a Str value.

  • $exception->superclass() Returns an Object value.

Moose::Exception::CannotGenerateInlineConstraint

This class consumes the Moose::Exception::Role::TypeConstraint role.

This class has the following methods:

  • $exception->parameterizable_type_object_name() Returns a Str value. This attribute can be used for fetching parameterizable type constraint(Moose::Meta::TypeConstraint::Parameterizable): my $type_constraint = Moose::Util::TypeConstraints::find_type_constraint( $exception->type_name );

  • $exception->type_name() Returns a Str value. This attribute can be used for fetching type constraint(Moose::Meta::TypeConstraint): my $type_constraint = Moose::Util::TypeConstraints::find_type_constraint( $exception->type_name );

  • $exception->value() Returns a Str value.

Moose::Exception::CannotInitializeMooseMetaRoleComposite

This class has the following methods:

  • $exception->args() Returns an ArrayRef value.

  • $exception->old_meta()

  • $exception->role_composite() Returns a Moose::Meta::Role::Composite object.

Moose::Exception::CannotInlineTypeConstraintCheck

This class consumes the Moose::Exception::Role::TypeConstraint role.

This class has the following methods:

  • $exception->type_name() Returns a Str value. This attribute can be used for fetching type constraint(Moose::Meta::TypeConstraint): my $type_constraint = Moose::Util::TypeConstraints::find_type_constraint( $exception->type_name );

Moose::Exception::CannotLocatePackageInINC

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->INC() Returns an ArrayRef value.

  • $exception->metaclass_name() Returns a Str value.

  • $exception->params() Returns a HashRef value.

  • $exception->possible_packages() Returns a Str value.

  • $exception->type() Returns a Str value.

Moose::Exception::CannotMakeMetaclassCompatible

This class consumes the Moose::Exception::Role::Class role.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->superclass_name() Returns a Str value.

Moose::Exception::CannotOverrideALocalMethod

This class consumes the Moose::Exception::Role::Role role.

This class has the following methods:

  • $exception->method_name() Returns a Str value.

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

Moose::Exception::CannotOverrideBodyOfMetaMethods

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::CannotOverrideLocalMethodIsPresent

This class consumes the Moose::Exception::Role::Class and Moose::Exception::Role::Method roles.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->method() Returns a Moose::Meta::Method object.

Moose::Exception::CannotOverrideNoSuperMethod

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->method_name() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::CannotRegisterUnnamedTypeConstraint

This class has no attributes except for message and trace().

Moose::Exception::CannotUseLazyBuildAndDefaultSimultaneously

This class consumes the Moose::Exception::Role::InvalidAttributeOptions and Moose::Exception::Role::ParamsHash roles.

This class has the following methods:

  • $exception->attribute_name() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::CircularReferenceInAlso

This class has the following methods:

  • $exception->also_parameter() Returns a Str value.

  • $exception->stack() Returns an ArrayRef value.

Moose::Exception::ClassDoesNotHaveInitMeta

This class consumes the Moose::Exception::Role::Class role.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->traits() Returns an ArrayRef value.

Moose::Exception::ClassDoesTheExcludedRole

This class consumes the Moose::Exception::Role::Class and Moose::Exception::Role::Role roles.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->excluded_role_name() Returns a Str value.

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

Moose::Exception::ClassNamesDoNotMatch

This class has the following methods:

  • $exception->class() Returns a Class::MOP::Class object.

  • $exception->class_name() Returns a Str value.

Moose::Exception::CloneObjectExpectsAnInstanceOfMetaclass

This class consumes the Moose::Exception::Role::Class role.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->instance()

Moose::Exception::CodeBlockMustBeACodeRef

This class consumes the Moose::Exception::Role::Instance and Moose::Exception::Role::ParamsHash roles.

This class has the following methods:

  • $exception->instance() Returns an Object value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::CoercingWithoutCoercions

This class consumes the Moose::Exception::Role::TypeConstraint role.

This class has the following methods:

  • $exception->type_name() Returns a Str value. This attribute can be used for fetching type constraint(Moose::Meta::TypeConstraint): my $type_constraint = Moose::Util::TypeConstraints::find_type_constraint( $exception->type_name );

Moose::Exception::CoercionAlreadyExists

This class consumes the Moose::Exception::Role::Instance role.

This class has the following methods:

  • $exception->constraint_name() Returns a Str value.

  • $exception->instance() Returns an Object value.

Moose::Exception::CoercionNeedsTypeConstraint

This class consumes the Moose::Exception::Role::InvalidAttributeOptions and Moose::Exception::Role::ParamsHash roles.

This class has the following methods:

  • $exception->attribute_name() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::ConflictDetectedInCheckRoleExclusions

This class consumes the Moose::Exception::Role::Role role.

This class has the following methods:

  • $exception->excluded_role_name() Returns a Str value.

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

Moose::Exception::ConflictDetectedInCheckRoleExclusionsInToClass

This class consumes the Moose::Exception::Role::Class and Moose::Exception::Role::Role roles.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

Moose::Exception::ConstructClassInstanceTakesPackageName

This class has no attributes except for message and trace().

Moose::Exception::CouldNotCreateMethod

This class consumes the Moose::Exception::Role::Attribute role.

This class has the following methods:

  • $exception->attribute() Returns a Class::MOP::Attribute object.

  • $exception->error() Returns a Str value.

  • $exception->option_name() Returns a Str value.

  • $exception->option_value()

Moose::Exception::CouldNotCreateWriter

This class consumes the Moose::Exception::Role::EitherAttributeOrAttributeName and Moose::Exception::Role::Instance roles.

This class has the following methods:

  • $exception->attribute() Returns a Class::MOP::Attribute object.

  • $exception->attribute_name() Returns a Str value.

  • $exception->error() Returns a Str value.

  • $exception->instance() Returns an Object value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::CouldNotEvalConstructor

This class has the following methods:

  • $exception->constructor_method() Returns a Class::MOP::Method::Constructor object.

  • $exception->error() Returns a Str value.

  • $exception->source() Returns a Str value.

Moose::Exception::CouldNotEvalDestructor

This class has the following methods:

  • $exception->error() Returns a Str value.

  • $exception->method_destructor_object() Returns a Moose::Meta::Method::Destructor object.

  • $exception->source() Returns a Str value.

Moose::Exception::CouldNotFindTypeConstraintToCoerceFrom

This class consumes the Moose::Exception::Role::Instance role.

This class has the following methods:

  • $exception->constraint_name() Returns a Str value.

  • $exception->instance() Returns an Object value.

Moose::Exception::CouldNotGenerateInlineAttributeMethod

This class consumes the Moose::Exception::Role::Instance role.

This class has the following methods:

  • $exception->error() Returns a Moose::Exception|Str value.

  • $exception->instance() Returns an Object value.

  • $exception->option() Returns a Str value.

Moose::Exception::CouldNotLocateTypeConstraintForUnion

This class consumes the Moose::Exception::Role::TypeConstraint role.

This class has the following methods:

  • $exception->type_name() Returns a Str value. This attribute can be used for fetching type constraint(Moose::Meta::TypeConstraint): my $type_constraint = Moose::Util::TypeConstraints::find_type_constraint( $exception->type_name );

Moose::Exception::CouldNotParseType

This class has the following methods:

  • $exception->position() Returns an Int value.

  • $exception->type() Returns a Str value.

Moose::Exception::CreateMOPClassTakesArrayRefOfAttributes

This class consumes the Moose::Exception::Role::ParamsHash and Moose::Exception::Role::RoleForCreateMOPClass roles.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::CreateMOPClassTakesArrayRefOfSuperclasses

This class consumes the Moose::Exception::Role::ParamsHash and Moose::Exception::Role::RoleForCreateMOPClass roles.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::CreateMOPClassTakesHashRefOfMethods

This class consumes the Moose::Exception::Role::ParamsHash and Moose::Exception::Role::RoleForCreateMOPClass roles.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::CreateTakesArrayRefOfRoles

This class consumes the Moose::Exception::Role::ParamsHash and Moose::Exception::Role::RoleForCreate roles.

This class has the following methods:

  • $exception->attribute_class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::CreateTakesHashRefOfAttributes

This class consumes the Moose::Exception::Role::ParamsHash and Moose::Exception::Role::RoleForCreate roles.

This class has the following methods:

  • $exception->attribute_class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::CreateTakesHashRefOfMethods

This class consumes the Moose::Exception::Role::ParamsHash and Moose::Exception::Role::RoleForCreate roles.

This class has the following methods:

  • $exception->attribute_class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::DefaultToMatchOnTypeMustBeCodeRef

This class has the following methods:

  • $exception->cases_to_be_matched() Returns an ArrayRef value.

  • $exception->default_action()

  • $exception->to_match()

Moose::Exception::DelegationToAClassWhichIsNotLoaded

This class consumes the Moose::Exception::Role::Attribute role.

This class has the following methods:

  • $exception->attribute() Returns a Class::MOP::Attribute object.

  • $exception->class_name() Returns a Str value.

Moose::Exception::DelegationToARoleWhichIsNotLoaded

This class consumes the Moose::Exception::Role::Attribute role.

This class has the following methods:

  • $exception->attribute() Returns a Class::MOP::Attribute object.

  • $exception->role_name() Returns a Str value.

Moose::Exception::DelegationToATypeWhichIsNotAClass

This class consumes the Moose::Exception::Role::Attribute role.

This class has the following methods:

  • $exception->attribute() Returns a Class::MOP::Attribute object.

Moose::Exception::DoesRequiresRoleName

This class consumes the Moose::Exception::Role::Class role.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

Moose::Exception::EnumCalledWithAnArrayRefAndAdditionalArgs

This class has the following methods:

  • $exception->args() Returns an ArrayRef value.

  • $exception->array() Returns an ArrayRef value.

Moose::Exception::EnumValuesMustBeString

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

  • $exception->value()

Moose::Exception::ExtendsMissingArgs

This class consumes the Moose::Exception::Role::Class role.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

Moose::Exception::HandlesMustBeAHashRef

This class consumes the Moose::Exception::Role::Instance role.

This class has the following methods:

  • $exception->given_handles()

  • $exception->instance() Returns an Object value.

Moose::Exception::IllegalInheritedOptions

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->illegal_options() Returns an ArrayRef value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::IllegalMethodTypeToAddMethodModifier

This class has the following methods:

  • $exception->class_or_object()

  • $exception->modifier_name() Returns a Str value.

  • $exception->params() Returns an ArrayRef value.

Moose::Exception::IncompatibleMetaclassOfSuperclass

This class consumes the Moose::Exception::Role::Class role.

This class has the following methods:

  • $exception->class_meta_type() Returns a Str value.

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->superclass_meta_type() Returns a Str value.

  • $exception->superclass_name() Returns a Str value.

Moose::Exception::InitMetaRequiresClass

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->params() Returns a HashRef value.

Moose::Exception::InitializeTakesUnBlessedPackageName

This class has the following methods:

  • $exception->package_name()

Moose::Exception::InstanceBlessedIntoWrongClass

This class consumes the Moose::Exception::Role::Class, Moose::Exception::Role::Instance, and Moose::Exception::Role::ParamsHash roles.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->instance() Returns an Object value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::InstanceMustBeABlessedReference

This class consumes the Moose::Exception::Role::Class and Moose::Exception::Role::ParamsHash roles.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->instance()

  • $exception->params() Returns a HashRef value.

Moose::Exception::InvalidArgPassedToMooseUtilMetaRole

This class has the following methods:

  • $exception->argument()

Moose::Exception::InvalidArgumentToMethod

This class has the following methods:

  • $exception->argument()

  • $exception->argument_noun() Returns a Str value.

  • $exception->method_name() Returns a Str value.

  • $exception->ordinal() Returns a Str value.

  • $exception->type() Returns a Str value.

  • $exception->type_of_argument() Returns a Str value.

Moose::Exception::InvalidArgumentsToTraitAliases

This class consumes the Moose::Exception::Role::Class role.

This class has the following methods:

  • $exception->alias()

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->package_name() Returns a Str value.

Moose::Exception::InvalidBaseTypeGivenToCreateParameterizedTypeConstraint

This class consumes the Moose::Exception::Role::TypeConstraint role.

This class has the following methods:

  • $exception->type_name() Returns a Str value. This attribute can be used for fetching type constraint(Moose::Meta::TypeConstraint): my $type_constraint = Moose::Util::TypeConstraints::find_type_constraint( $exception->type_name );

Moose::Exception::InvalidHandleValue

This class consumes the Moose::Exception::Role::Instance role.

This class has the following methods:

  • $exception->handle_value()

  • $exception->instance() Returns an Object value.

Moose::Exception::InvalidHasProvidedInARole

This class consumes the Moose::Exception::Role::Role role.

This class has the following methods:

  • $exception->attribute_name() Returns a Str value.

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

Moose::Exception::InvalidNameForType

This class has the following methods:

  • $exception->name() Returns a Str value.

Moose::Exception::InvalidOverloadOperator

This class has the following methods:

  • $exception->operator() Returns a Defined value.

Moose::Exception::InvalidRoleApplication

This class consumes the Moose::Exception::Role::Class role.

This class has the following methods:

  • $exception->application()

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

Moose::Exception::InvalidTypeConstraint

This class has the following methods:

  • $exception->registry_object() Returns a Moose::Meta::TypeConstraint::Registry object.

  • $exception->type()

Moose::Exception::InvalidTypeGivenToCreateParameterizedTypeConstraint

This class consumes the Moose::Exception::Role::TypeConstraint role.

This class has the following methods:

  • $exception->type_name() Returns a Str value. This attribute can be used for fetching type constraint(Moose::Meta::TypeConstraint): my $type_constraint = Moose::Util::TypeConstraints::find_type_constraint( $exception->type_name );

Moose::Exception::InvalidValueForIs

This class consumes the Moose::Exception::Role::InvalidAttributeOptions and Moose::Exception::Role::ParamsHash roles.

This class has the following methods:

  • $exception->attribute_name() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::IsaDoesNotDoTheRole

This class consumes the Moose::Exception::Role::InvalidAttributeOptions and Moose::Exception::Role::ParamsHash roles.

This class has the following methods:

  • $exception->attribute_name() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::IsaLacksDoesMethod

This class consumes the Moose::Exception::Role::InvalidAttributeOptions and Moose::Exception::Role::ParamsHash roles.

This class has the following methods:

  • $exception->attribute_name() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::LazyAttributeNeedsADefault

This class consumes the Moose::Exception::Role::EitherAttributeOrAttributeName role.

This class has the following methods:

  • $exception->attribute() Returns a Class::MOP::Attribute object.

  • $exception->attribute_name() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::Legacy

This class has no attributes except for message and trace().

Moose::Exception::MOPAttributeNewNeedsAttributeName

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::MatchActionMustBeACodeRef

This class consumes the Moose::Exception::Role::TypeConstraint role.

This class has the following methods:

  • $exception->action()

  • $exception->to_match()

  • $exception->type_name() Returns a Str value. This attribute can be used for fetching type constraint(Moose::Meta::TypeConstraint): my $type_constraint = Moose::Util::TypeConstraints::find_type_constraint( $exception->type_name );

Moose::Exception::MessageParameterMustBeCodeRef

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::MetaclassIsAClassNotASubclassOfGivenMetaclass

This class consumes the Moose::Exception::Role::Class role.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->metaclass() Returns a Str value.

Moose::Exception::MetaclassIsARoleNotASubclassOfGivenMetaclass

This class consumes the Moose::Exception::Role::Role role.

This class has the following methods:

  • $exception->metaclass() Returns a Str value.

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

Moose::Exception::MetaclassIsNotASubclassOfGivenMetaclass

This class consumes the Moose::Exception::Role::Class role.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->metaclass() Returns a Str value.

Moose::Exception::MetaclassMustBeASubclassOfMooseMetaClass

This class consumes the Moose::Exception::Role::Class role.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

Moose::Exception::MetaclassMustBeASubclassOfMooseMetaRole

This class consumes the Moose::Exception::Role::Role role.

This class has the following methods:

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

Moose::Exception::MetaclassMustBeDerivedFromClassMOPClass

This class has the following methods:

  • $exception->class_name() Returns a Str value.

Moose::Exception::MetaclassNotLoaded

This class consumes the Moose::Exception::Role::Class role.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

Moose::Exception::MetaclassTypeIncompatible

This class consumes the Moose::Exception::Role::Class role.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->metaclass_type() Returns a Str value.

  • $exception->superclass_name() Returns a Str value.

Moose::Exception::MethodExpectedAMetaclassObject

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->metaclass()

Moose::Exception::MethodExpectsFewerArgs

This class has the following methods:

  • $exception->maximum_args() Returns an Int value.

  • $exception->method_name() Returns a Str value.

Moose::Exception::MethodExpectsMoreArgs

This class has the following methods:

  • $exception->method_name() Returns a Str value.

  • $exception->minimum_args() Returns an Int value.

Moose::Exception::MethodModifierNeedsMethodName

This class consumes the Moose::Exception::Role::Class role.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

Moose::Exception::MethodNameConflictInRoles

This class consumes the Moose::Exception::Role::Class role.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->conflict() Returns an ArrayRef[Moose::Meta::Role::Method::Conflicting] value.

Moose::Exception::MethodNameNotFoundInInheritanceHierarchy

This class consumes the Moose::Exception::Role::Class role.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->method_name() Returns a Str value.

Moose::Exception::MethodNameNotGiven

This class consumes the Moose::Exception::Role::Class role.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

Moose::Exception::MustDefineAMethodName

This class consumes the Moose::Exception::Role::Instance role.

This class has the following methods:

  • $exception->instance() Returns an Object value.

Moose::Exception::MustDefineAnAttributeName

This class consumes the Moose::Exception::Role::Class role.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

Moose::Exception::MustDefineAnOverloadOperator

This class consumes the Moose::Exception::Role::Instance role.

This class has the following methods:

  • $exception->instance() Returns an Object value.

Moose::Exception::MustHaveAtLeastOneValueToEnumerate

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::MustPassAHashOfOptions

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::MustPassAMooseMetaRoleInstanceOrSubclass

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->role()

Moose::Exception::MustPassAPackageNameOrAnExistingClassMOPPackageInstance

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class()

  • $exception->params() Returns a HashRef value.

Moose::Exception::MustPassEvenNumberOfArguments

This class has the following methods:

  • $exception->args() Returns an ArrayRef value.

  • $exception->method_name() Returns a Str value.

Moose::Exception::MustPassEvenNumberOfAttributeOptions

This class has the following methods:

  • $exception->attribute_name() Returns a Str value.

  • $exception->options() Returns an ArrayRef value.

Moose::Exception::MustProvideANameForTheAttribute

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::MustSpecifyAtleastOneMethod

This class consumes the Moose::Exception::Role::Role role.

This class has the following methods:

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

Moose::Exception::MustSpecifyAtleastOneRole

This class consumes the Moose::Exception::Role::Role role.

This class has the following methods:

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

Moose::Exception::MustSpecifyAtleastOneRoleToApplicant

This class has the following methods:

  • $exception->applicant()

Moose::Exception::MustSupplyAClassMOPAttributeInstance

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::MustSupplyADelegateToMethod

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::MustSupplyAMetaclass

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::MustSupplyAMooseMetaAttributeInstance

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::MustSupplyAnAccessorTypeToConstructWith

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::MustSupplyAnAttributeToConstructWith

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::MustSupplyArrayRefAsCurriedArguments

This class consumes the Moose::Exception::Role::Class and Moose::Exception::Role::ParamsHash roles.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->params() Returns a HashRef value.

Moose::Exception::MustSupplyPackageNameAndName

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::NeedsTypeConstraintUnionForTypeCoercionUnion

This class consumes the Moose::Exception::Role::TypeConstraint role.

This class has the following methods:

  • $exception->type_coercion_union_object() Returns a Moose::Meta::TypeCoercion::Union object.

  • $exception->type_name() Returns a Str value. This attribute can be used for fetching type constraint(Moose::Meta::TypeConstraint): my $type_constraint = Moose::Util::TypeConstraints::find_type_constraint( $exception->type_name );

Moose::Exception::NeitherAttributeNorAttributeNameIsGiven

This class has no attributes except for message and trace().

Moose::Exception::NeitherClassNorClassNameIsGiven

This class has no attributes except for message and trace().

Moose::Exception::NeitherRoleNorRoleNameIsGiven

This class has no attributes except for message and trace().

Moose::Exception::NeitherTypeNorTypeNameIsGiven

This class has no attributes except for message and trace().

Moose::Exception::NoAttributeFoundInSuperClass

This class consumes the Moose::Exception::Role::Class, Moose::Exception::Role::InvalidAttributeOptions, and Moose::Exception::Role::ParamsHash roles.

This class has the following methods:

  • $exception->attribute_name() Returns a Str value.

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->params() Returns a HashRef value.

Moose::Exception::NoBodyToInitializeInAnAbstractBaseClass

This class has the following methods:

  • $exception->package_name() Returns a Str value.

Moose::Exception::NoCasesMatched

This class has the following methods:

  • $exception->cases_to_be_matched() Returns an ArrayRef value.

  • $exception->to_match()

Moose::Exception::NoConstraintCheckForTypeConstraint

This class consumes the Moose::Exception::Role::TypeConstraint role.

This class has the following methods:

  • $exception->type_name() Returns a Str value. This attribute can be used for fetching type constraint(Moose::Meta::TypeConstraint): my $type_constraint = Moose::Util::TypeConstraints::find_type_constraint( $exception->type_name );

Moose::Exception::NoDestructorClassSpecified

This class consumes the Moose::Exception::Role::Class and Moose::Exception::Role::ParamsHash roles.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->params() Returns a HashRef value.

Moose::Exception::NoImmutableTraitSpecifiedForClass

This class consumes the Moose::Exception::Role::Class and Moose::Exception::Role::ParamsHash roles.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->params() Returns a HashRef value.

Moose::Exception::NoParentGivenToSubtype

This class has the following methods:

  • $exception->name() Returns a Str value.

Moose::Exception::OnlyInstancesCanBeCloned

This class consumes the Moose::Exception::Role::Class and Moose::Exception::Role::ParamsHash roles.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->instance()

  • $exception->params() Returns a HashRef value.

Moose::Exception::OperatorIsRequired

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::OverloadConflictInSummation

This class has the following methods:

  • $exception->overloaded_op() Returns a Str value.

  • $exception->role_application() Returns a Moose::Meta::Role::Application::RoleSummation object.

  • $exception->role_names()

  • $exception->elements() This attribute is an ArrayRef containing role names, if you want metaobjects associated with these role names, then call method roles on the exception object.

Moose::Exception::OverloadRequiresAMetaClass

This class has no attributes except for message and trace().

Moose::Exception::OverloadRequiresAMetaMethod

This class has no attributes except for message and trace().

Moose::Exception::OverloadRequiresAMetaOverload

This class has no attributes except for message and trace().

Moose::Exception::OverloadRequiresAMethodNameOrCoderef

This class has no attributes except for message and trace().

Moose::Exception::OverloadRequiresAnOperator

This class has no attributes except for message and trace().

Moose::Exception::OverloadRequiresNamesForCoderef

This class has no attributes except for message and trace().

Moose::Exception::OverrideConflictInComposition

This class consumes the Moose::Exception::Role::Role role.

This class has the following methods:

  • $exception->method_name() Returns a Str value.

  • $exception->role_being_applied_name() Returns a Str value.

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

  • $exception->two_overrides_found() Returns a Bool value.

Moose::Exception::OverrideConflictInSummation

This class has the following methods:

  • $exception->method_name() Returns a Str value.

  • $exception->role_application() Returns a Moose::Meta::Role::Application::RoleSummation object.

  • $exception->role_names()

  • $exception->elements() This attribute is an ArrayRef containing role names, if you want metaobjects associated with these role names, then call method roles on the exception object.

  • $exception->two_overrides_found() Returns a Bool value.

Moose::Exception::PackageDoesNotUseMooseExporter

This class has the following methods:

  • $exception->is_loaded() Returns a Bool value.

  • $exception->package() Returns a Str value.

Moose::Exception::PackageNameAndNameParamsNotGivenToWrap

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->code() Returns a CodeRef value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::PackagesAndModulesAreNotCachable

This class consumes the Moose::Exception::Role::Class and Moose::Exception::Role::ParamsHash roles.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->is_module() Returns a Bool value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::ParameterIsNotSubtypeOfParent

This class consumes the Moose::Exception::Role::TypeConstraint role.

This class has the following methods:

  • $exception->type_name() Returns a Str value. This attribute can be used for fetching type constraint(Moose::Meta::TypeConstraint): my $type_constraint = Moose::Util::TypeConstraints::find_type_constraint( $exception->type_name );

  • $exception->type_parameter() Returns a Str value.

Moose::Exception::ReferencesAreNotAllowedAsDefault

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->attribute_name() Returns a Str value.

  • $exception->class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::RequiredAttributeLacksInitialization

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::RequiredAttributeNeedsADefault

This class consumes the Moose::Exception::Role::InvalidAttributeOptions and Moose::Exception::Role::ParamsHash roles.

This class has the following methods:

  • $exception->attribute_name() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::RequiredMethodsImportedByClass

This class consumes the Moose::Exception::Role::Class and Moose::Exception::Role::Role roles.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->imported_method() Returns a Moose::Meta::Role::Method::Required object.

  • $exception->missing_methods() Returns an ArrayRef[Moose::Meta::Role::Method::Required] value.

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

Moose::Exception::RequiredMethodsNotImplementedByClass

This class consumes the Moose::Exception::Role::Class and Moose::Exception::Role::Role roles.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->missing_methods() Returns an ArrayRef[Moose::Meta::Role::Method::Required] value.

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

Moose::Exception::RoleDoesTheExcludedRole

This class consumes the Moose::Exception::Role::Role role.

This class has the following methods:

  • $exception->excluded_role_name() Returns a Str value.

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

  • $exception->second_role_name() Returns a Str value.

Moose::Exception::RoleExclusionConflict

This class consumes the Moose::Exception::Role::Role role.

This class has the following methods:

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

  • $exception->roles() Returns an ArrayRef value.

Moose::Exception::RoleNameRequired

This class consumes the Moose::Exception::Role::Class role.

This class has the following methods:

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

Moose::Exception::RoleNameRequiredForMooseMetaRole

This class consumes the Moose::Exception::Role::Role role.

This class has the following methods:

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

Moose::Exception::RolesDoNotSupportAugment

This class has no attributes except for message and trace().

Moose::Exception::RolesDoNotSupportExtends

This class has no attributes except for message and trace().

Moose::Exception::RolesDoNotSupportInner

This class has no attributes except for message and trace().

Moose::Exception::RolesDoNotSupportRegexReferencesForMethodModifiers

This class consumes the Moose::Exception::Role::Role role.

This class has the following methods:

  • $exception->modifier_type() Returns a Str value.

  • $exception->role_name() Returns a Str value. This attribute can be used for fetching the class’s metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->role_name );

Moose::Exception::RolesInCreateTakesAnArrayRef

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->params() Returns a HashRef value.

Moose::Exception::RolesListMustBeInstancesOfMooseMetaRole

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->params() Returns a HashRef value.

  • $exception->role()

Moose::Exception::SingleParamsToNewMustBeHashRef

This class has no attributes except for message and trace().

Moose::Exception::TriggerMustBeACodeRef

This class consumes the Moose::Exception::Role::InvalidAttributeOptions and Moose::Exception::Role::ParamsHash roles.

This class has the following methods:

  • $exception->attribute_name() Returns a Str value.

  • $exception->params() Returns a HashRef value.

Moose::Exception::TypeConstraintCannotBeUsedForAParameterizableType

This class consumes the Moose::Exception::Role::TypeConstraint role.

This class has the following methods:

  • $exception->parent_type_name() Returns a Str value. This attribute can be used for fetching type constraint(Moose::Meta::TypeConstraint): my $type_constraint = Moose::Util::TypeConstraints::find_type_constraint( $exception->parent_type_name );

  • $exception->type_name() Returns a Str value. This attribute can be used for fetching type constraint(Moose::Meta::TypeConstraint): my $type_constraint = Moose::Util::TypeConstraints::find_type_constraint( $exception->type_name );

Moose::Exception::TypeConstraintIsAlreadyCreated

This class consumes the Moose::Exception::Role::TypeConstraint role.

This class has the following methods:

  • $exception->package_defined_in() Returns a Str value.

  • $exception->type_name() Returns a Str value. This attribute can be used for fetching type constraint(Moose::Meta::TypeConstraint): my $type_constraint = Moose::Util::TypeConstraints::find_type_constraint( $exception->type_name );

Moose::Exception::TypeParameterMustBeMooseMetaType

This class consumes the Moose::Exception::Role::TypeConstraint role.

This class has the following methods:

  • $exception->type_name() Returns a Str value. This attribute can be used for fetching type constraint(Moose::Meta::TypeConstraint): my $type_constraint = Moose::Util::TypeConstraints::find_type_constraint( $exception->type_name );

Moose::Exception::UnableToCanonicalizeHandles

This class consumes the Moose::Exception::Role::Attribute role.

This class has the following methods:

  • $exception->attribute() Returns a Class::MOP::Attribute object.

  • $exception->handles()

Moose::Exception::UnableToCanonicalizeNonRolePackage

This class consumes the Moose::Exception::Role::Attribute role.

This class has the following methods:

  • $exception->attribute() Returns a Class::MOP::Attribute object.

  • $exception->handles() Returns a Str value.

Moose::Exception::UnableToRecognizeDelegateMetaclass

This class consumes the Moose::Exception::Role::Attribute role.

This class has the following methods:

  • $exception->attribute() Returns a Class::MOP::Attribute object.

  • $exception->delegate_metaclass()

Moose::Exception::UndefinedHashKeysPassedToMethod

This class has the following methods:

  • $exception->hash_keys() Returns an ArrayRef value.

  • $exception->method_name() Returns a Str value.

Moose::Exception::UnionCalledWithAnArrayRefAndAdditionalArgs

This class has the following methods:

  • $exception->args() Returns an ArrayRef value.

  • $exception->array() Returns an ArrayRef value.

Moose::Exception::UnionTakesAtleastTwoTypeNames

This class has no attributes except for message and trace().

Moose::Exception::ValidationFailedForInlineTypeConstraint

This class consumes the Moose::Exception::Role::Class role.

This class has the following methods:

  • $exception->attribute_name() Returns a Str value.

  • $exception->class_name() Returns a Str value. This attribute can be used for fetching metaclass instance: my $metaclass_instance = Moose::Util::find_meta( $exception->class_name );

  • $exception->new_member() Returns a Bool value.

  • $exception->type_constraint_message() Returns a Str value.

  • $exception->value()

Moose::Exception::ValidationFailedForTypeConstraint

This class consumes the Moose::Exception::Role::Attribute role.

This class has the following methods:

  • $exception->attribute() Returns a Class::MOP::Attribute object.

  • $exception->type() Returns a Moose::Util::TypeConstraints value.

  • $exception->value()

Moose::Exception::WrapTakesACodeRefToBless

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->class() Returns a Str value.

  • $exception->code()

  • $exception->params() Returns a HashRef value.

Moose::Exception::WrongTypeConstraintGiven

This class consumes the Moose::Exception::Role::ParamsHash role.

This class has the following methods:

  • $exception->attribute_name() Returns a Str value.

  • $exception->given_type() Returns a Str value.

  • $exception->params() Returns a HashRef value.

  • $exception->required_type() Returns a Str value.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2118 - Linux cli command significandl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command significandl and provides detailed information about the command significandl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the significandl.

NAME 🖥️ significandl 🖥️

get mantissa of floating-point number

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double significand(double x);
float significandf(float x);
long double significandl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

significand(), significandf(), significandl():

    /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the mantissa of x scaled to the range [1FLT_RADIX). They are equivalent to

scalb(x, (double) -ilogb(x))

This function exists mainly for use in certain standardized tests for IEEE 754 conformance.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

significand(), significandf(), significandl()

Thread safetyMT-Safe

STANDARDS

None.

significand()
BSD.

HISTORY

significand()
BSD.

SEE ALSO

ilogb(3), scalb(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2119 - Linux cli command Tk_packpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_packpm and provides detailed information about the command Tk_packpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_packpm.

NAME 🖥️ Tk_packpm 🖥️

Geometry manager that packs around edges of cavity

SYNOPSIS

$widget->pack?(args)?

$widget->packOption?(args)?

DESCRIPTION

The pack method is used to communicate with the packer, a geometry manager that arranges the children of a parent by packing them in order around the edges of the parent.

In this perl port of Tk it is normal to pack widgets one-at-a-time using the widget object to be packed to invoke a method call. This is a slight distortion of underlying Tk interface (which can handle lists of windows to one pack method call) but has proven effective in practice.

The pack method can have any of several forms, depending on Option:

$slave->pack?(options)?
The options consist of pairs of arguments that specify how to manage the slave. See “THE PACKER ALGORITHM” below for details on how the options are used by the packer. The following options are supported:

-after => $other
$other must be another window. Use its master as the master for the slave, and insert the slave just after $other in the packing order.

-anchor => anchor
Anchor must be a valid anchor position such as n or sw; it specifies where to position each slave in its parcel. Defaults to center.

-before => $other
$other must be another window. Use its master as the master for the slave, and insert the slave just before $other in the packing order.

-expand => boolean
Specifies whether the slave should be expanded to consume extra space in their master. Boolean may have any proper boolean value, such as 1 or no. Defaults to 0.

-fill => style
If a slave’s parcel is larger than its requested dimensions, this option may be used to stretch the slave. Style must have one of the following values:

none
Give the slave its requested dimensions plus any internal padding requested with -ipadx or -ipady. This is the default.

  1. Stretch the slave horizontally to fill the entire width of its parcel (except leave external padding as specified by -padx).

  2. Stretch the slave vertically to fill the entire height of its parcel (except leave external padding as specified by -pady).

both
Stretch the slave both horizontally and vertically.

-in => $master
Insert the slave(s) at the end of the packing order for the master window given by $master.

-ipadx => amount
Amount specifies how much horizontal internal padding to leave on each side of the slave(s). Amount must be a valid screen distance, such as 2 or .5c. It defaults to 0.

-ipady => amount
Amount specifies how much vertical internal padding to leave on each side of the slave(s). Amount defaults to 0.

-padx => amount
Amount specifies how much horizontal external padding to leave on each side of the slave(s). Amount defaults to 0.

-pady => amount
Amount specifies how much vertical external padding to leave on each side of the slave(s). Amount defaults to 0.

-side => side
Specifies which side of the master the slave(s) will be packed against. Must be left, right, top, or bottom. Defaults to top.

If no -in, -after or -before option is specified then slave will be inserted at the end of the packing list for its parent unless it is already managed by the packer (in which case it will be left where it is). If one of these options is specified then slave will be inserted at the specified point. If the slave are already managed by the geometry manager then any unspecified options for them retain their previous values rather than receiving default values.

$slave->packConfigure?(options)?
Same as pack.

$slave->packForget
Removes slave from the packing order for its master and unmaps its window. The slave will no longer be managed by the packer.

$slave->packInfo
Returns a list whose elements are the current configuration state of the slave given by $slave in the same option-value form that might be specified to packConfigure. The first two elements of the list are ``-in=>$master’’ where $master is the slave’s master.

$master->packPropagate?(boolean)?
If boolean has a true boolean value such as 1 or on then propagation is enabled for $master, (see “GEOMETRY PROPAGATION” below). If boolean has a false boolean value then propagation is disabled for $master. In either of these cases an empty string is returned. If boolean is omitted then the method returns 0 or 1 to indicate whether propagation is currently enabled for $master. Propagation is enabled by default.

$master->packSlaves
Returns a list of all of the slaves in the packing order for $master. The order of the slaves in the list is the same as their order in the packing order. If $master has no slaves then an empty list/string is returned in array/scalar context, respectively

THE PACKER ALGORITHM

For each master the packer maintains an ordered list of slaves called the packing list. The -in, -after, and -before configuration options are used to specify the master for each slave and the slave’s position in the packing list. If none of these options is given for a slave then the slave is added to the end of the packing list for its parent.

The packer arranges the slaves for a master by scanning the packing list in order. At the time it processes each slave, a rectangular area within the master is still unallocated. This area is called the cavity; for the first slave it is the entire area of the master.

For each slave the packer carries out the following steps:

[1]
The packer allocates a rectangular parcel for the slave along the side of the cavity given by the slave’s -side option. If the side is top or bottom then the width of the parcel is the width of the cavity and its height is the requested height of the slave plus the -ipady and -pady options. For the left or right side the height of the parcel is the height of the cavity and the width is the requested width of the slave plus the -ipadx and -padx options. The parcel may be enlarged further because of the -expand option (see “EXPANSION” below)

[2]
The packer chooses the dimensions of the slave. The width will normally be the slave’s requested width plus twice its -ipadx option and the height will normally be the slave’s requested height plus twice its -ipady option. However, if the -fill option is x or both then the width of the slave is expanded to fill the width of the parcel, minus twice the -padx option. If the -fill option is y or both then the height of the slave is expanded to fill the width of the parcel, minus twice the -pady option.

[3]
The packer positions the slave over its parcel. If the slave is smaller than the parcel then the -anchor option determines where in the parcel the slave will be placed. If -padx or -pady is non-zero, then the given amount of external padding will always be left between the slave and the edges of the parcel. Once a given slave has been packed, the area of its parcel is subtracted from the cavity, leaving a smaller rectangular cavity for the next slave. If a slave doesn’t use all of its parcel, the unused space in the parcel will not be used by subsequent slaves. If the cavity should become too small to meet the needs of a slave then the slave will be given whatever space is left in the cavity. If the cavity shrinks to zero size, then all remaining slaves on the packing list will be unmapped from the screen until the master window becomes large enough to hold them again.

EXPANSION

If a master window is so large that there will be extra space left over after all of its slaves have been packed, then the extra space is distributed uniformly among all of the slaves for which the -expand option is set. Extra horizontal space is distributed among the expandable slaves whose -side is left or right, and extra vertical space is distributed among the expandable slaves whose -side is top or bottom.

GEOMETRY PROPAGATION

The packer normally computes how large a master must be to just exactly meet the needs of its slaves, and it sets the requested width and height of the master to these dimensions. This causes geometry information to propagate up through a window hierarchy to a top-level window so that the entire sub-tree sizes itself to fit the needs of the leaf windows. However, the packPropagate method may be used to turn off propagation for one or more masters. If propagation is disabled then the packer will not set the requested width and height of the packer. This may be useful if, for example, you wish for a master window to have a fixed size that you specify.

RESTRICTIONS ON MASTER WINDOWS

The master for each slave must either be the slave’s parent (the default) or a descendant of the slave’s parent. This restriction is necessary to guarantee that the slave can be placed over any part of its master that is visible without danger of the slave being clipped by its parent.

PACKING ORDER

If the master for a slave is not its parent then you must make sure that the slave is higher in the stacking order than the master. Otherwise the master will obscure the slave and it will appear as if the slave hasn’t been packed correctly. The easiest way to make sure the slave is higher than the master is to create the master window first: the most recently created window will be highest in the stacking order. Or, you can use the raise and lower methods to change the stacking order of either the master or the slave.

SEE ALSO

Tk::form Tk::grid Tk::place

KEYWORDS

geometry manager, location, packer, parcel, propagation, size

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2120 - Linux cli command SIMPLEQ_REMOVE

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SIMPLEQ_REMOVE and provides detailed information about the command SIMPLEQ_REMOVE, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SIMPLEQ_REMOVE.

NAME 🖥️ SIMPLEQ_REMOVE 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2121 - Linux cli command valloc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command valloc and provides detailed information about the command valloc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the valloc.

NAME 🖥️ valloc 🖥️

allocate aligned memory

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int posix_memalign(void **memptr, size_t alignment, size_t size);
void *aligned_alloc(size_t alignment, size_t size);
[[deprecated]] void *valloc(size_t size);
#include <malloc.h>
[[deprecated]] void *memalign(size_t alignment, size_t size);
[[deprecated]] void *pvalloc(size_t size);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

posix_memalign():

    _POSIX_C_SOURCE >= 200112L

aligned_alloc():

    _ISOC11_SOURCE

valloc():

    Since glibc 2.12:
        (_XOPEN_SOURCE >= 500) && !(_POSIX_C_SOURCE >= 200112L)
            || /* glibc >= 2.19: */ _DEFAULT_SOURCE
            || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
    Before glibc 2.12:
        _BSD_SOURCE || _XOPEN_SOURCE >= 500

DESCRIPTION

posix_memalign() allocates size bytes and places the address of the allocated memory in *memptr. The address of the allocated memory will be a multiple of alignment, which must be a power of two and a multiple of sizeof(void *). This address can later be successfully passed to free(3). If size is 0, then the value placed in *memptr is either NULL or a unique pointer value.

The obsolete function memalign() allocates size bytes and returns a pointer to the allocated memory. The memory address will be a multiple of alignment, which must be a power of two.

aligned_alloc() is the same as memalign(), except for the added restriction that alignment must be a power of two.

The obsolete function valloc() allocates size bytes and returns a pointer to the allocated memory. The memory address will be a multiple of the page size. It is equivalent to memalign(sysconf(_SC_PAGESIZE),size).

The obsolete function pvalloc() is similar to valloc(), but rounds the size of the allocation up to the next multiple of the system page size.

For all of these functions, the memory is not zeroed.

RETURN VALUE

aligned_alloc(), memalign(), valloc(), and pvalloc() return a pointer to the allocated memory on success. On error, NULL is returned, and errno is set to indicate the error.

posix_memalign() returns zero on success, or one of the error values listed in the next section on failure. The value of errno is not set. On Linux (and other systems), posix_memalign() does not modify memptr on failure. A requirement standardizing this behavior was added in POSIX.1-2008 TC2.

ERRORS

EINVAL
The alignment argument was not a power of two, or was not a multiple of sizeof(void *).

ENOMEM
Out of memory.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

aligned_alloc(), memalign(), posix_memalign()

Thread safetyMT-Safe

valloc(), pvalloc()

Thread safetyMT-Unsafe init

STANDARDS

aligned_alloc()
C11.

posix_memalign()
POSIX.1-2008.

memalign()
valloc()
None.

pvalloc()
GNU.

HISTORY

aligned_alloc()
glibc 2.16. C11.

posix_memalign()
glibc 2.1.91. POSIX.1d, POSIX.1-2001.

memalign()
glibc 2.0. SunOS 4.1.3.

valloc()
glibc 2.0. 3.0BSD. Documented as obsolete in 4.3BSD, and as legacy in SUSv2.

pvalloc()
glibc 2.0.

Headers

Everybody agrees that posix_memalign() is declared in <stdlib.h>.

On some systems memalign() is declared in <stdlib.h> instead of <malloc.h>.

According to SUSv2, valloc() is declared in <stdlib.h>. glibc declares it in <malloc.h>, and also in <stdlib.h> if suitable feature test macros are defined (see above).

NOTES

On many systems there are alignment restrictions, for example, on buffers used for direct block device I/O. POSIX specifies the pathconf(path,_PC_REC_XFER_ALIGN) call that tells what alignment is needed. Now one can use posix_memalign() to satisfy this requirement.

posix_memalign() verifies that alignment matches the requirements detailed above. memalign() may not check that the alignment argument is correct.

POSIX requires that memory obtained from posix_memalign() can be freed using free(3). Some systems provide no way to reclaim memory allocated with memalign() or valloc() (because one can pass to free(3) only a pointer obtained from malloc(3), while, for example, memalign() would call malloc(3) and then align the obtained value). The glibc implementation allows memory obtained from any of these functions to be reclaimed with free(3).

The glibc malloc(3) always returns 8-byte aligned memory addresses, so these functions are needed only if you require larger alignment values.

SEE ALSO

brk(2), getpagesize(2), free(3), malloc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2122 - Linux cli command zip_source_win32w

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_win32w and provides detailed information about the command zip_source_win32w, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_win32w.

libzip (-lzip)

The functions

and

create a zip source on Windows using a Windows Unicode name. They open

and read

bytes from offset

from it. If

is 0 or -1, the whole file (starting from

is used.

If the file supports seek, the source can be used to open a zip archive from.

The file is opened and read when the data from the source is used, usually by

or

Upon successful completion, the created source is returned. Otherwise,

is returned and the error code in

or

is set to indicate the error.

and

fail if:

or

are invalid.

Required memory could not be allocated.

Opening

failed.

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2123 - Linux cli command Net_DNS_Resolver_os390pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_Resolver_os390pm and provides detailed information about the command Net_DNS_Resolver_os390pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_Resolver_os390pm.

NAME 🖥️ Net_DNS_Resolver_os390pm 🖥️

IBM OS/390 resolver class

SYNOPSIS

use Net::DNS::Resolver;

DESCRIPTION

This class implements the OS specific portions of Net::DNS::Resolver.

No user serviceable parts inside, see Net::DNS::Resolver for all your resolving needs.

COPYRIGHT

Copyright (c)2017 Dick Franks.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl, Net::DNS, Net::DNS::Resolver

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2124 - Linux cli command mq_open

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mq_open and provides detailed information about the command mq_open, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mq_open.

NAME 🖥️ mq_open 🖥️

open a message queue

LIBRARY

Real-time library (librt, -lrt)

SYNOPSIS

#include <fcntl.h> /* For O_* constants */
#include <sys/stat.h> /* For mode constants */
#include <mqueue.h>
mqd_t mq_open(const char *name, int oflag);
mqd_t mq_open(const char *name, int oflag, mode_t mode,
 struct mq_attr *attr);

DESCRIPTION

mq_open() creates a new POSIX message queue or opens an existing queue. The queue is identified by name. For details of the construction of name, see mq_overview(7).

The oflag argument specifies flags that control the operation of the call. (Definitions of the flags values can be obtained by including <fcntl.h>.) Exactly one of the following must be specified in oflag:

O_RDONLY
Open the queue to receive messages only.

O_WRONLY
Open the queue to send messages only.

O_RDWR
Open the queue to both send and receive messages.

Zero or more of the following flags can additionally be ORed in oflag:

O_CLOEXEC (since Linux 2.6.26)
Set the close-on-exec flag for the message queue descriptor. See open(2) for a discussion of why this flag is useful.

O_CREAT
Create the message queue if it does not exist. The owner (user ID) of the message queue is set to the effective user ID of the calling process. The group ownership (group ID) is set to the effective group ID of the calling process.

O_EXCL
If O_CREAT was specified in oflag, and a queue with the given name already exists, then fail with the error EEXIST.

O_NONBLOCK
Open the queue in nonblocking mode. In circumstances where mq_receive(3) and mq_send(3) would normally block, these functions instead fail with the error EAGAIN.

If O_CREAT is specified in oflag, then two additional arguments must be supplied. The mode argument specifies the permissions to be placed on the new queue, as for open(2). (Symbolic definitions for the permissions bits can be obtained by including <sys/stat.h>.) The permissions settings are masked against the process umask.

The fields of the struct mq_attr pointed to attr specify the maximum number of messages and the maximum size of messages that the queue will allow. This structure is defined as follows:

struct mq_attr {
    long mq_flags;       /* Flags (ignored for mq_open()) */
    long mq_maxmsg;      /* Max. # of messages on queue */
    long mq_msgsize;     /* Max. message size (bytes) */
    long mq_curmsgs;     /* # of messages currently in queue
                            (ignored for mq_open()) */
};

Only the mq_maxmsg and mq_msgsize fields are employed when calling mq_open(); the values in the remaining fields are ignored.

If attr is NULL, then the queue is created with implementation-defined default attributes. Since Linux 3.5, two /proc files can be used to control these defaults; see mq_overview(7) for details.

RETURN VALUE

On success, mq_open() returns a message queue descriptor for use by other message queue functions. On error, mq_open() returns (mqd_t) -1, with errno set to indicate the error.

ERRORS

EACCES
The queue exists, but the caller does not have permission to open it in the specified mode.

EACCES
name contained more than one slash.

EEXIST
Both O_CREAT and O_EXCL were specified in oflag, but a queue with this name already exists.

EINVAL
name doesn’t follow the format in mq_overview(7).

EINVAL
O_CREAT was specified in oflag, and attr was not NULL, but attr->mq_maxmsg or attr->mq_msqsize was invalid. Both of these fields must be greater than zero. In a process that is unprivileged (does not have the CAP_SYS_RESOURCE capability), attr->mq_maxmsg must be less than or equal to the msg_max limit, and attr->mq_msgsize must be less than or equal to the msgsize_max limit. In addition, even in a privileged process, attr->mq_maxmsg cannot exceed the HARD_MAX limit. (See mq_overview(7) for details of these limits.)

EMFILE
The per-process limit on the number of open file and message queue descriptors has been reached (see the description of RLIMIT_NOFILE in getrlimit(2)).

ENAMETOOLONG
name was too long.

ENFILE
The system-wide limit on the total number of open files and message queues has been reached.

ENOENT
The O_CREAT flag was not specified in oflag, and no queue with this name exists.

ENOENT
name was just “/” followed by no other characters.

ENOMEM
Insufficient memory.

ENOSPC
Insufficient space for the creation of a new message queue. This probably occurred because the queues_max limit was encountered; see mq_overview(7).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mq_open()

Thread safetyMT-Safe

VERSIONS

C library/kernel differences

The mq_open() library function is implemented on top of a system call of the same name. The library function performs the check that the name starts with a slash (/), giving the EINVAL error if it does not. The kernel system call expects name to contain no preceding slash, so the C library function passes name without the preceding slash (i.e., name+1) to the system call.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

BUGS

Before Linux 2.6.14, the process umask was not applied to the permissions specified in mode.

SEE ALSO

mq_close(3), mq_getattr(3), mq_notify(3), mq_receive(3), mq_send(3), mq_unlink(3), mq_overview(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2125 - Linux cli command trunc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command trunc and provides detailed information about the command trunc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the trunc.

NAME 🖥️ trunc 🖥️

round to integer, toward zero

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double trunc(double x);
float truncf(float x);
long double truncl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

trunc(), truncf(), truncl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions round x to the nearest integer value that is not larger in magnitude than x.

RETURN VALUE

These functions return the rounded integer value, in floating format.

If x is integral, infinite, or NaN, x itself is returned.

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

trunc(), truncf(), truncl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

NOTES

The integral value returned by these functions may be too large to store in an integer type (int, long, etc.). To avoid an overflow, which will produce undefined results, an application should perform a range check on the returned value before assigning it to an integer type.

SEE ALSO

ceil(3), floor(3), lrint(3), nearbyint(3), rint(3), round(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2126 - Linux cli command XtSetEventDispatcher

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtSetEventDispatcher and provides detailed information about the command XtSetEventDispatcher, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtSetEventDispatcher.

NAME 🖥️ XtSetEventDispatcher 🖥️

extension event handling

SYNTAX

#include <X11/Intrinsic.h>

void XtInsertEventTypeHandler(Widget widget, int event_type, XtPointer select_data, XtEventHandler proc, XtPointer client_data, XtListPosition position);

void XtRemoveEventTypeHandler(Widget widget, int event_type, XtPointer select_data, XtEventHandler proc, XtPointer client_data);

void XtRegisterExtensionSelector(Display* display, int min_event_type, int max_event_type, XtExtensionSelectProc proc, XtPointer client_data);

XtEventDispatchProc XtSetEventDispatcher(Display* display, int event_type, XtEventDispatchProc proc);

Boolean XtDispatchEventToWidget(Widget widget, XEvent* event);

ARGUMENTS

widget
Specifies the widget for this event handler. Must be of class Core or any subclass thereof.

event_type
Specifies the event type.

select_data
Specifies data used to select or deselect events from the server.

proc
Specifies the proc.

client_data
Specifies additional data to be passed to the event handler.

position
Specifies when the event handler is to be called relative to other previously registered handlers.

display
Specifies the display.

min_event_type, max_event_type
Specifies the range of event types for this extension.

event
Specifies a pointer to the event to be dispatched.

DESCRIPTION

The XtInsertEventTypeHandler function registers a procedure with the dispatch mechanism that is to be called when an event that matches the specified event_type is dispatched to the specified widget.

If event_type is one of the core X protocol events then select_data must be a pointer to a value of type EventMask, indicating the event mask to be used to select for the desired event. This event mask will be included in the value returned by XtBuildEventMask. If the widget is realized XtInsertEventTypeHandler calls XSelectInput if necessary. Specifying NULL for select_data is equivalent to specifying a pointer to an event mask containing 0. This is similar to the XtInsertRawEventHandler function.

If event_type specifies an extension event type then the semantics of the data pointed to by select_data are defined by the extension selector registered for the specified event type.

In either case the Intrinsics are not required to copy the data pointed to by select_data, so the caller must ensure that it remains valid as long as the event handler remains registered with this value of select_data.

The position argument allows the client to control the order of the invocation of event handlers registered for the same event type. If the client does not care about the order, it should normally specify XtListTail, which registers this event handler after any previously registered handlers for this event type.

The XtRemoveEventTypeHandler function unregisters an even handler registered with XtInsertEventTypeHandler for the specified event type. The request is ignored if client_data does not match the value given with the handler was registered.

If event_type specifies on of the core X protocol events, select_data must be a pointer to a value of type EventMask, indicating the mask to be used to deselect for the appropriate event. If the widget is realized, XtRemoveEventTypeHandler calls XSelectInput if necessary. Specifying NULL for select_data is equivalent to specifying a pointer to an event mask containing 0. This is similar to the XtRemoveRawEventHandler function.

If event_type specifies an extension event type then the semantics of the data pointed to by select_data are defined by the extension selector registered for the specified event type.

The XtRegisterExtensionSelector function registers a procedure to arrange for the delivery of extension events to widgets.

If min_event_type and max_event_type match the parameters to a previous call to XtRegisterExtensionSelector for the same display, the proc and client_data replace the previously registered values. If the range specified by min_event_type and max_event_type overlaps the range of the parameters to a previous call for the same display in any other way, an error results.

The XtSetEventDispatcher function registers the event dispatcher procedure specified by proc for events with the type event_type. The previously registered dispatcher (or the default dispatcher if there was no previously registered dispatcher) is returned. If proc is NULL, the default procedure is restored for the specified type.

In the future, when XtDispatchEvent is called with an event of event_type, the specified proc (or the default dispatcher) will be invoked to determine a widget ot which to dispatch the event.

The XtDispatchEventToWidget function scans the list of registered event handlers for the specified widget and calls each handler that has been registered for the specified event type, subject to the continue_to_dispatch value returned by each handler. The Intrinsics behave as if event handlers were registered at the head of the list for Expose, NoExpose, GraphicsExpose, and VisibilityNotify events to invoke the widget’s expose procedure according to the exposure compression rules and to update the widget’s visible field if visible_interest is True. These internal event handlers never set continue_to_dispatch to False.

XtDispatchEventToWidget returns True if any event handler was called and False otherwise.

SEE ALSO

XtGetKeyboardFocusWidget(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2127 - Linux cli command Image_ExifTool_RSRCpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_RSRCpm and provides detailed information about the command Image_ExifTool_RSRCpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_RSRCpm.

NAME 🖥️ Image_ExifTool_RSRCpm 🖥️

Read Mac OS Resource information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to read Mac OS resource files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://developer.apple.com/legacy/mac/library/documentation/mac/MoreToolbox/MoreToolbox-99.html>

SEE ALSO

“RSRC Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2128 - Linux cli command Image_ExifTool_SonyIDCpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_SonyIDCpm and provides detailed information about the command Image_ExifTool_SonyIDCpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_SonyIDCpm.

NAME 🖥️ Image_ExifTool_SonyIDCpm 🖥️

Read/write Sony IDC information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read and write Sony Image Data Converter version 3.0 metadata in ARW images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

“SonyIDC Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2129 - Linux cli command XcupGetReservedColormapEntries

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XcupGetReservedColormapEntries and provides detailed information about the command XcupGetReservedColormapEntries, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XcupGetReservedColormapEntries.

NAME 🖥️ XcupGetReservedColormapEntries 🖥️

list colormap entries reserved by the system

SYNOPSIS

cc [ flag ... ] file ... -lXext [ library ... ]
#include <X11/extensions/Xcup.h>
Status XcupGetReservedColormapEntries ( Display *display ,
int screen , XColor **colors_out , int *ncolors );

ARGUMENTS

display
Specifies the connection to the X server.

screen
Screen number on the host server.

colors_out
Returns the values reserved by the server.

ncolors
Returns the number of items in colors_out.

DESCRIPTION

The * XcupGetReservedColormapEntries * function returns a list of colormap entries (pixels) that are reserved by the system. This list will, at a minimum, contain entries for the BlackPixel and WhitePixel of the specified screen. Use * XFree * to free colors_out.

To minimize colormap flash, an application which installs its own private colormap should query the special colors by calling * XCupGetReservedColormapEntries *, and can then store those entries (in the proper location) in its private colormap using * XCupStoreColors *.

SEE ALSO

XcupQueryVersion(3Xext), XcupStoreColors(3Xext), XFree(3X11),
Colormap Utilization Policy and Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2130 - Linux cli command zip_error_to_data

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_error_to_data and provides detailed information about the command zip_error_to_data, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_error_to_data.

libzip (-lzip)

function converts the zip_error

into data suitable as return value for

The data is written into the buffer

of size

If the buffer is not large enough to hold 2 ints, an error is returned.

returns 2*(sizeof int) on success, and -1 on error.

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2131 - Linux cli command SLIST_REMOVE

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SLIST_REMOVE and provides detailed information about the command SLIST_REMOVE, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SLIST_REMOVE.

NAME 🖥️ SLIST_REMOVE 🖥️

implementation of a singly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
SLIST_ENTRY(TYPE);
SLIST_HEAD(HEADNAME, TYPE);
SLIST_HEAD SLIST_HEAD_INITIALIZER(SLIST_HEAD head);
void SLIST_INIT(SLIST_HEAD *head);
int SLIST_EMPTY(SLIST_HEAD *head);
void SLIST_INSERT_HEAD(SLIST_HEAD *head,
 struct TYPE *elm, SLIST_ENTRY NAME);
void SLIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, SLIST_ENTRY NAME);
struct TYPE *SLIST_FIRST(SLIST_HEAD *head);
struct TYPE *SLIST_NEXT(struct TYPE *elm, SLIST_ENTRY NAME);
SLIST_FOREACH(struct TYPE *var, SLIST_HEAD *head, SLIST_ENTRY NAME);
void SLIST_REMOVE(SLIST_HEAD *head, struct TYPE *elm,
 SLIST_ENTRY NAME);
void SLIST_REMOVE_HEAD(SLIST_HEAD *head,
 SLIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on singly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type SLIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro SLIST_HEAD().

Creation

A singly linked list is headed by a structure defined by the SLIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the list after an existing element or at the head of the list. An SLIST_HEAD structure is declared as follows:

SLIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

SLIST_ENTRY() declares a structure that connects the elements in the list.

SLIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

SLIST_INIT() initializes the list referenced by head.

SLIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

SLIST_INSERT_HEAD() inserts the new element elm at the head of the list.

SLIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

SLIST_FIRST() returns the first element in the list, or NULL if the list is empty.

SLIST_NEXT() returns the next element in the list.

SLIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

SLIST_REMOVE() removes the element elm from the list.

SLIST_REMOVE_HEAD() removes the element elm from the head of the list. For optimum efficiency, elements being removed from the head of the list should explicitly use this macro instead of the generic SLIST_REMOVE().

RETURN VALUE

SLIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

SLIST_FIRST(), and SLIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

SLIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

SLIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. SLIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    SLIST_ENTRY(entry) entries;             /* Singly linked list */
};
SLIST_HEAD(slisthead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct slisthead head;                  /* Singly linked list
                                               head */
    SLIST_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    SLIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    SLIST_INSERT_AFTER(n1, n2, entries);
    SLIST_REMOVE(&head, n2, entry, entries);/* Deletion */
    free(n2);
    n3 = SLIST_FIRST(&head);
    SLIST_REMOVE_HEAD(&head, entries);      /* Deletion from the head */
    free(n3);
    for (unsigned int i = 0; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        SLIST_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    SLIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); while (!SLIST_EMPTY(&head)) { /* List deletion */ n1 = SLIST_FIRST(&head); SLIST_REMOVE_HEAD(&head, entries); free(n1); } SLIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2132 - Linux cli command ts_close

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ts_close and provides detailed information about the command ts_close, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ts_close.

NAME 🖥️ ts_close 🖥️

close a touch screen input device

SYNOPSIS

#include <tslib.h>

int ts_close(struct tsdev *dev);

DESCRIPTION

ts_close() closes a touch screen input device opened by ts_open() , see ts_open (3)

RETURN VALUE

Zero is returned on success. A negative value is returned in case of an error.

SEE ALSO

ts_open(3), ts_read(3), ts_config(3), ts.conf(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2133 - Linux cli command Image_ExifTool_BPGpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_BPGpm and provides detailed information about the command Image_ExifTool_BPGpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_BPGpm.

NAME 🖥️ Image_ExifTool_BPGpm 🖥️

Read BPG meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read BPG (Better Portable Graphics) images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://bellard.org/bpg/>

SEE ALSO

“BPG Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2134 - Linux cli command labs

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command labs and provides detailed information about the command labs, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the labs.

NAME 🖥️ labs 🖥️

compute the absolute value of an integer

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int abs(int j);
long labs(long j);
long long llabs(long long j);
#include <inttypes.h>
intmax_t imaxabs(intmax_t j);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

llabs():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The abs() function computes the absolute value of the integer argument j. The labs(), llabs(), and imaxabs() functions compute the absolute value of the argument j of the appropriate integer type for the function.

RETURN VALUE

Returns the absolute value of the integer argument, of the appropriate integer type for the function.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

abs(), labs(), llabs(), imaxabs()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99, SVr4, 4.3BSD.

C89 only includes the abs() and labs() functions; the functions llabs() and imaxabs() were added in C99.

NOTES

Trying to take the absolute value of the most negative integer is not defined.

The llabs() function is included since glibc 2.0. The imaxabs() function is included since glibc 2.1.1.

For llabs() to be declared, it may be necessary to define _ISOC99_SOURCE or _ISOC9X_SOURCE (depending on the version of glibc) before including any standard headers.

By default, GCC handles abs(), labs(), and (since GCC 3.0) llabs() and imaxabs() as built-in functions.

SEE ALSO

cabs(3), ceil(3), fabs(3), floor(3), rint(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2135 - Linux cli command Image_ExifTool_PLISTpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_PLISTpm and provides detailed information about the command Image_ExifTool_PLISTpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_PLISTpm.

NAME 🖥️ Image_ExifTool_PLISTpm 🖥️

Read Apple PLIST information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains the routines used by Image::ExifTool to extract information from Apple Property List files.

NOTES

This module decodes both the binary and XML-based PLIST format.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.apple.com/DTDs/PropertyList-1.0.dtd>

<http://opensource.apple.com/source/CF/CF-550/CFBinaryPList.c>

SEE ALSO

“PLIST Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2136 - Linux cli command NetSNMP_netsnmp_request_infoPtrpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command NetSNMP_netsnmp_request_infoPtrpm and provides detailed information about the command NetSNMP_netsnmp_request_infoPtrpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the NetSNMP_netsnmp_request_infoPtrpm.

NAME 🖥️ NetSNMP_netsnmp_request_infoPtrpm 🖥️

Perl extension for request information

SYNOPSIS

see NetSNMP::agent documentation

AUTHOR

Please mail the [email protected] mailing list for help, questions or comments about this module.

Wes Hardaker, [email protected]

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2137 - Linux cli command siginfo_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command siginfo_ttype and provides detailed information about the command siginfo_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the siginfo_ttype.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2138 - Linux cli command Image_ExifTool_Sanyopm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Sanyopm and provides detailed information about the command Image_ExifTool_Sanyopm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Sanyopm.

NAME 🖥️ Image_ExifTool_Sanyopm 🖥️

Sanyo EXIF maker notes tags

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret Sanyo maker notes in EXIF information.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.exif.org/makernotes/SanyoMakerNote.html>

SEE ALSO

“Sanyo Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2139 - Linux cli command svc_destroy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command svc_destroy and provides detailed information about the command svc_destroy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the svc_destroy.

NAME 🖥️ svc_destroy 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2140 - Linux cli command XML_DOM_DocumentFragmentpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_DOM_DocumentFragmentpm and provides detailed information about the command XML_DOM_DocumentFragmentpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_DOM_DocumentFragmentpm.

NAME 🖥️ XML_DOM_DocumentFragmentpm 🖥️

Facilitates cut & paste in XML::DOM documents

DESCRIPTION

XML::DOM::DocumentFragment extends XML::DOM::Node

DocumentFragment is a lightweight or minimal Document object. It is very common to want to be able to extract a portion of a document’s tree or to create a new fragment of a document. Imagine implementing a user command like cut or rearranging a document by moving fragments around. It is desirable to have an object which can hold such fragments and it is quite natural to use a Node for this purpose. While it is true that a Document object could fulfil this role, a Document object can potentially be a heavyweight object, depending on the underlying implementation. What is really needed for this is a very lightweight object. DocumentFragment is such an object.

Furthermore, various operations Ω- such as inserting nodes as children of another Node Ω- may take DocumentFragment objects as arguments; this results in all the child nodes of the DocumentFragment being moved to the child list of this node.

The children of a DocumentFragment node are zero or more nodes representing the tops of any sub-trees defining the structure of the document. DocumentFragment nodes do not need to be well-formed XML documents (although they do need to follow the rules imposed upon well-formed XML parsed entities, which can have multiple top nodes). For example, a DocumentFragment might have only one child and that child node could be a Text node. Such a structure model represents neither an HTML document nor a well-formed XML document.

When a DocumentFragment is inserted into a Document (or indeed any other Node that may take children) the children of the DocumentFragment and not the DocumentFragment itself are inserted into the Node. This makes the DocumentFragment very useful when the user wishes to create nodes that are siblings; the DocumentFragment acts as the parent of these nodes so that the user can use the standard methods from the Node interface, such as insertBefore() and appendChild().

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2141 - Linux cli command log10

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command log10 and provides detailed information about the command log10, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the log10.

NAME 🖥️ log10 🖥️

base-10 logarithmic function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double log10(double x);
float log10f(float x);
long double log10l(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

log10f(), log10l():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the base-10 logarithm of x.

RETURN VALUE

On success, these functions return the base-10 logarithm of x.

For special cases, including where x is 0, 1, negative, infinity, or NaN, see log(3).

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

For a discussion of the errors that can occur for these functions, see log(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

log10(), log10f(), log10l()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

SEE ALSO

cbrt(3), clog10(3), exp10(3), log(3), log2(3), sqrt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2142 - Linux cli command XauDisposeAuth

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XauDisposeAuth and provides detailed information about the command XauDisposeAuth, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XauDisposeAuth.

NAME 🖥️ XauDisposeAuth 🖥️

X authority database routines

SYNOPSIS

#include <X11/Xauth.h>

typedef struct xauth {
        unsigned short  family;
        unsigned short  address_length;
        char    *address;
        unsigned short  number_length;
        char    *number;
        unsigned short  name_length;
        char    *name;
        unsigned short  data_length;
        char    *data;
} Xauth;
char *XauFileName (void);
Xauth *XauReadAuth (FILE *auth_file );
int XauWriteAuth (FILE *auth_file, Xauth *auth );
Xauth *XauGetAuthByAddr (unsigned short family , unsigned short
address_length , const char *address , unsigned short
number_length , const char *number , unsigned short
name_length , const char *name );
Xauth *XauGetBestAuthByAddr (unsigned short family , unsigned short
address_length , const char *address , unsigned short
number_length , const char *number , int types_length ,
char **types , const int *type_lengths );
int XauLockAuth (const char *file_name , int retries , int
timeout , long dead );
int XauUnlockAuth (const char *file_name );
int XauDisposeAuth (Xauth *auth );

DESCRIPTION

XauFileName generates the default authorization file name by first checking the XAUTHORITY environment variable if set, else it returns $HOME/.Xauthority. This name is statically allocated and should not be freed.

XauReadAuth reads the next entry from auth_file. The entry is not statically allocated and should be freed by calling XauDisposeAuth.

XauWriteAuth writes an authorization entry to auth_file. It returns 1 on success, 0 on failure.

XauGetAuthByAddr searches for an entry which matches the given network address/display number pair. The entry is not statically allocated and should be freed by calling XauDisposeAuth.

XauGetBestAuthByAddr is similar to XauGetAuthByAddr, except that a list of acceptable authentication methods is specified. Xau will choose the file entry which matches the earliest entry in this list (e.g., the most secure authentication method). The types argument is an array of strings, one string for each authentication method. types_length specifies how many elements are in the types array. types_lengths is an array of integers representing the length of each string.

XauLockAuth does the work necessary to synchronously update an authorization file. First it makes two file names, one with ``-c’’ appended to file_name, the other with ``-l’’ appended. If the ``-c’’ file already exists and is more than dead seconds old, XauLockAuth removes it and the associated ``-l’’ file. To prevent possible synchronization troubles with NFS, a dead value of zero forces the files to be removed. XauLockAuth makes retries attempts to create and link the file names, pausing timeout seconds between each attempt. XauLockAuth returns a collection of values depending on the results:

LOCK_ERROR
A system error occurred, either a file_name which is too long, or an unexpected failure from a system call. errno may prove useful.

LOCK_TIMEOUT
retries attempts failed

LOCK_SUCCESS
The lock succeeded.

XauUnlockAuth undoes the work of XauLockAuth by unlinking both the ``-c’’ and ``-l’’ file names.

XauDisposeAuth frees storage allocated to hold an authorization entry.

SEE ALSO

xauth(1), xdm(1)

AUTHOR

Keith Packard, MIT X Consortium

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2143 - Linux cli command pthread_exit

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_exit and provides detailed information about the command pthread_exit, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_exit.

NAME 🖥️ pthread_exit 🖥️

terminate calling thread

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
[[noreturn]] void pthread_exit(void *retval);

DESCRIPTION

The pthread_exit() function terminates the calling thread and returns a value via retval that (if the thread is joinable) is available to another thread in the same process that calls pthread_join(3).

Any clean-up handlers established by pthread_cleanup_push(3) that have not yet been popped, are popped (in the reverse of the order in which they were pushed) and executed. If the thread has any thread-specific data, then, after the clean-up handlers have been executed, the corresponding destructor functions are called, in an unspecified order.

When a thread terminates, process-shared resources (e.g., mutexes, condition variables, semaphores, and file descriptors) are not released, and functions registered using atexit(3) are not called.

After the last thread in a process terminates, the process terminates as by calling exit(3) with an exit status of zero; thus, process-shared resources are released and functions registered using atexit(3) are called.

RETURN VALUE

This function does not return to the caller.

ERRORS

This function always succeeds.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_exit()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

Performing a return from the start function of any thread other than the main thread results in an implicit call to pthread_exit(), using the function’s return value as the thread’s exit status.

To allow other threads to continue execution, the main thread should terminate by calling pthread_exit() rather than exit(3).

The value pointed to by retval should not be located on the calling thread’s stack, since the contents of that stack are undefined after the thread terminates.

BUGS

Currently, there are limitations in the kernel implementation logic for wait(2)ing on a stopped thread group with a dead thread group leader. This can manifest in problems such as a locked terminal if a stop signal is sent to a foreground process whose thread group leader has already called pthread_exit().

SEE ALSO

pthread_create(3), pthread_join(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2144 - Linux cli command res_nsearch

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command res_nsearch and provides detailed information about the command res_nsearch, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the res_nsearch.

NAME 🖥️ res_nsearch 🖥️

resolver routines

LIBRARY

Resolver library (libresolv, -lresolv)

SYNOPSIS

#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
struct __res_state;
typedef struct __res_state *res_state;
int res_ninit(res_state statep);
void res_nclose(res_state statep);
int res_nquery(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nsearch(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nquerydomain(res_state statep,
 const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
int res_nmkquery(res_state statep,
 int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
int res_nsend(res_state statep,
 const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);
int dn_comp(const char *exp_dn, unsigned char comp_dn[.length],
 int length, unsigned char **dnptrs,
 unsigned char **lastdnptr);
int dn_expand(const unsigned char *msg,
 const unsigned char *eomorig,
 const unsigned char *comp_dn, char exp_dn[.length],
 int length);
[[deprecated]] extern struct __res_state _res;
[[deprecated]] int res_init(void);
[[deprecated]]
int res_query(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_search(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_querydomain(const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
[[deprecated]]
int res_mkquery(int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
[[deprecated]]
int res_send(const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);

DESCRIPTION

Note: This page is incomplete (various resolver functions provided by glibc are not described) and likely out of date.

The functions described below make queries to and interpret the responses from Internet domain name servers.

The API consists of a set of more modern, reentrant functions and an older set of nonreentrant functions that have been superseded. The traditional resolver interfaces such as res_init() and res_query() use some static (global) state stored in the _res structure, rendering these functions non-thread-safe. BIND 8.2 introduced a set of new interfaces res_ninit(), res_nquery(), and so on, which take a res_state as their first argument, so you can use a per-thread resolver state.

The res_ninit() and res_init() functions read the configuration files (see resolv.conf(5)) to get the default domain name and name server address(es). If no server is given, the local host is tried. If no domain is given, that associated with the local host is used. It can be overridden with the environment variable LOCALDOMAIN. res_ninit() or res_init() is normally executed by the first call to one of the other functions. Every call to res_ninit() requires a corresponding call to res_nclose() to free memory allocated by res_ninit() and subsequent calls to res_nquery().

The res_nquery() and res_query() functions query the name server for the fully qualified domain name name of specified type and class. The reply is left in the buffer answer of length anslen supplied by the caller.

The res_nsearch() and res_search() functions make a query and waits for the response like res_nquery() and res_query(), but in addition they implement the default and search rules controlled by RES_DEFNAMES and RES_DNSRCH (see description of _res options below).

The res_nquerydomain() and res_querydomain() functions make a query using res_nquery()/res_query() on the concatenation of name and domain.

The following functions are lower-level routines used by res_nquery()/res_query().

The res_nmkquery() and res_mkquery() functions construct a query message in buf of length buflen for the domain name dname. The query type op is one of the following (typically QUERY):

QUERY
Standard query.

IQUERY
Inverse query. This option was removed in glibc 2.26, since it has not been supported by DNS servers for a very long time.

NS_NOTIFY_OP
Notify secondary of SOA (Start of Authority) change.

newrr is currently unused.

The res_nsend() and res_send() function send a preformatted query given in msg of length msglen and returns the answer in answer which is of length anslen. They will call res_ninit()/res_init() if it has not already been called.

The dn_comp() function compresses the domain name exp_dn and stores it in the buffer comp_dn of length length. The compression uses an array of pointers dnptrs to previously compressed names in the current message. The first pointer points to the beginning of the message and the list ends with NULL. The limit of the array is specified by lastdnptr. If dnptr is NULL, domain names are not compressed. If lastdnptr is NULL, the list of labels is not updated.

The dn_expand() function expands the compressed domain name comp_dn to a full domain name, which is placed in the buffer exp_dn of size length. The compressed name is contained in a query or reply message, and msg points to the beginning of the message.

The resolver routines use configuration and state information contained in a __res_state structure (either passed as the statep argument, or in the global variable _res, in the case of the older nonreentrant functions). The only field of this structure that is normally manipulated by the user is the options field. This field can contain the bitwise “OR” of the following options:

RES_INIT
True if res_ninit() or res_init() has been called.

RES_DEBUG
Print debugging messages. This option is available only if glibc was built with debugging enabled, which is not the default.

RES_AAONLY (unimplemented; deprecated in glibc 2.25)
Accept authoritative answers only. res_send() continues until it finds an authoritative answer or returns an error. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEVC
Use TCP connections for queries rather than UDP datagrams.

RES_PRIMARY (unimplemented; deprecated in glibc 2.25)
Query primary domain name server only. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_IGNTC
Ignore truncation errors. Don’t retry with TCP.

RES_RECURSE
Set the recursion desired bit in queries. Recursion is carried out by the domain name server, not by res_send(). [Enabled by default].

RES_DEFNAMES
If set, res_search() will append the default domain name to single component names—that is, those that do not contain a dot. [Enabled by default].

RES_STAYOPEN
Used with RES_USEVC to keep the TCP connection open between queries.

RES_DNSRCH
If set, res_search() will search for hostnames in the current domain and in parent domains. This option is used by gethostbyname(3). [Enabled by default].

RES_INSECURE1
Accept a response from a wrong server. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_INSECURE2
Accept a response which contains a wrong query. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_NOALIASES
Disable usage of HOSTALIASES environment variable.

RES_USE_INET6
Try an AAAA query before an A query inside the gethostbyname(3) function, and map IPv4 responses in IPv6 “tunneled form” if no AAAA records are found but an A record set exists. Since glibc 2.25, this option is deprecated, and its usage produces a warning; applications should use getaddrinfo(3), rather than gethostbyname(3).

RES_ROTATE
Causes round-robin selection of name servers from among those listed. This has the effect of spreading the query load among all listed servers, rather than having all clients try the first listed server first every time.

RES_NOCHECKNAME (unimplemented; deprecated in glibc 2.25)
Disable the modern BIND checking of incoming hostnames and mail names for invalid characters such as underscore (_), non-ASCII, or control characters. This option was present until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_KEEPTSIG (unimplemented; deprecated in glibc 2.25)
Do not strip TSIG records. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_BLAST (unimplemented; deprecated in glibc 2.25)
Send each query simultaneously and recursively to all servers. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEBSTRING (glibc 2.3.4 to glibc 2.24)
Make reverse IPv6 lookups using the bit-label format described in RFC 2673; if this option is not set (which is the default), then nibble format is used. This option was removed in glibc 2.25, since it relied on a backward-incompatible DNS extension that was never deployed on the Internet.

RES_NOIP6DOTINT (glibc 2.24 and earlier)
Use ip6.arpa zone in IPv6 reverse lookup instead of ip6.int, which is deprecated since glibc 2.3.4. This option is present up to and including glibc 2.24, where it is enabled by default. In glibc 2.25, this option was removed.

RES_USE_EDNS0 (since glibc 2.6)
Enables support for the DNS extensions (EDNS0) described in RFC 2671.

RES_SNGLKUP (since glibc 2.10)
By default, glibc performs IPv4 and IPv6 lookups in parallel since glibc 2.9. Some appliance DNS servers cannot handle these queries properly and make the requests time out. This option disables the behavior and makes glibc perform the IPv6 and IPv4 requests sequentially (at the cost of some slowdown of the resolving process).

RES_SNGLKUPREOP
When RES_SNGLKUP option is enabled, opens a new socket for the each request.

RES_USE_DNSSEC
Use DNSSEC with OK bit in OPT record. This option implies RES_USE_EDNS0.

RES_NOTLDQUERY
Do not look up unqualified name as a top-level domain (TLD).

RES_DEFAULT
Default option which implies: RES_RECURSE, RES_DEFNAMES, RES_DNSRCH, and RES_NOIP6DOTINT.

RETURN VALUE

The res_ninit() and res_init() functions return 0 on success, or -1 if an error occurs.

The res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), res_querydomain(), res_nmkquery(), res_mkquery(), res_nsend(), and res_send() functions return the length of the response, or -1 if an error occurs.

The dn_comp() and dn_expand() functions return the length of the compressed name, or -1 if an error occurs.

In the case of an error return from res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), or res_querydomain(), the global variable h_errno (see gethostbyname(3)) can be consulted to determine the cause of the error.

FILES

/etc/resolv.conf
resolver configuration file

/etc/host.conf
resolver configuration file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

res_ninit(), res_nclose(), res_nquery(), res_nsearch(), res_nquerydomain(), res_nsend()

Thread safetyMT-Safe locale

res_nmkquery(), dn_comp(), dn_expand()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

4.3BSD.

SEE ALSO

gethostbyname(3), resolv.conf(5), resolver(5), hostname(7), named(8)

The GNU C library source file resolv/README.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2145 - Linux cli command Image_ExifTool_BuildTagLookuppm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_BuildTagLookuppm and provides detailed information about the command Image_ExifTool_BuildTagLookuppm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_BuildTagLookuppm.

NAME 🖥️ Image_ExifTool_BuildTagLookuppm 🖥️

Build ExifTool tag lookup tables

DESCRIPTION

This module is used to generate the tag lookup tables in Image::ExifTool::TagLookup.pm and tag name documentation in Image::ExifTool::TagNames.pod, as well as HTML tag name documentation. It is used before each new ExifTool release to update the lookup tables and documentation, but it is not used otherwise. It also performs some validation and consistency checks on the tag tables.

SYNOPSIS

use Image::ExifTool::BuildTagLookup; $builder = Image::ExifTool::BuildTagLookup->new; # update Image::ExifTool::TagLookup $ok = $builder->WriteTagLookup(lib/Image/ExifTool/TagLookup.pm); # update the tag name documentation $ok = $builder->WriteTagNames(lib/Image/ExifTool/TagNames.pod,html); # print some statistics my $count = $$builder{COUNT}; foreach (sort keys %$count) { printf “%5d %s “, $$count{$_}, $_; }

MEMBER VARIABLES

PRESERVE_DATE
Flag to preserve “Last revised” date in HTML files. Set before calling WriteTagNames().

COUNT
Reference to hash containing counting statistics. Keys are the descriptions, and values are the numerical counts. Valid after BuildTagLookup object is created, but additional statistics are added by WriteTagNames().

WRITE_PSEUDO
Returned list of writable pseudo tags.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Image::ExifTool (3pm), Image::ExifTool::TagLookup (3pm), Image::ExifTool::TagNames (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2146 - Linux cli command sigismember

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigismember and provides detailed information about the command sigismember, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigismember.

NAME 🖥️ sigismember 🖥️

POSIX signal set operations

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
int sigemptyset(sigset_t *set);
int sigfillset(sigset_t *set);
int sigaddset(sigset_t *set, int signum);
int sigdelset(sigset_t *set, int signum);
int sigismember(const sigset_t *set, int signum);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sigemptyset(), sigfillset(), sigaddset(), sigdelset(), sigismember():

    _POSIX_C_SOURCE

DESCRIPTION

These functions allow the manipulation of POSIX signal sets.

sigemptyset() initializes the signal set given by set to empty, with all signals excluded from the set.

sigfillset() initializes set to full, including all signals.

sigaddset() and sigdelset() add and delete respectively signal signum from set.

sigismember() tests whether signum is a member of set.

Objects of type sigset_t must be initialized by a call to either sigemptyset() or sigfillset() before being passed to the functions sigaddset(), sigdelset(), and sigismember() or the additional glibc functions described below (sigisemptyset(), sigandset(), and sigorset()). The results are undefined if this is not done.

RETURN VALUE

sigemptyset(), sigfillset(), sigaddset(), and sigdelset() return 0 on success and -1 on error.

sigismember() returns 1 if signum is a member of set, 0 if signum is not a member, and -1 on error.

On error, these functions set errno to indicate the error.

ERRORS

EINVAL
signum is not a valid signal.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sigemptyset(), sigfillset(), sigaddset(), sigdelset(), sigismember(), sigisemptyset(), sigorset(), sigandset()

Thread safetyMT-Safe

VERSIONS

GNU

If the _GNU_SOURCE feature test macro is defined, then <signal.h> exposes three other functions for manipulating signal sets:

int sigisemptyset(const sigset_t *set);
int sigorset(sigset_t *dest, const sigset_t *left,
 const sigset_t *right);
int sigandset(sigset_t *dest, const sigset_t *left,
 const sigset_t *right);

sigisemptyset() returns 1 if set contains no signals, and 0 otherwise.

sigorset() places the union of the sets left and right in dest. sigandset() places the intersection of the sets left and right in dest. Both functions return 0 on success, and -1 on failure.

These functions are nonstandard (a few other systems provide similar functions) and their use should be avoided in portable applications.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

When creating a filled signal set, the glibc sigfillset() function does not include the two real-time signals used internally by the NPTL threading implementation. See nptl(7) for details.

SEE ALSO

sigaction(2), sigpending(2), sigprocmask(2), sigsuspend(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2147 - Linux cli command svcerr_auth

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command svcerr_auth and provides detailed information about the command svcerr_auth, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the svcerr_auth.

NAME 🖥️ svcerr_auth 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2148 - Linux cli command XtConvertAndStore

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtConvertAndStore and provides detailed information about the command XtConvertAndStore, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtConvertAndStore.

NAME 🖥️ XtConvertAndStore 🖥️

invoke resource converters

SYNTAX

#include <X11/Intrinsic.h>

Boolean XtConvertAndStore(Widget widget, const char *from_type, XrmValuePtr from, const char *to_type, XrmValuePtr to_in_out);

Boolean XtCallConverter(Display* dpy, XtTypeConverter converter, XrmValuePtr args, Cardinal num_args, XrmValuePtr from, XrmValuePtr to_in_out, XtCacheRef* cache_ref_return);

ARGUMENTS

args
Specifies the argument list that contains the additional arguments needed to perform the conversion, or NULL.

converter
Specifies the conversion procedure that is to be called.

from
Specifies the value to be converted.

from_type
Specifies the source type.

num_args
Specifies the number of additional arguments (often zero).

to_type
Specifies the destination type.

to_in_out
Returns the converted value.

widget
Specifies the widget to use for additional arguments, if any are needed, and the destroy callback list.

dpy
Specifies the display with which the conversion is to be associated.

DESCRIPTION

The XtConvertAndStore function looks up the type converter registered to convert from_type to to_type, computes any additional arguments needed, and then calls XtCallConverter. (or XtDirectConvert if an old-style converter was registered with XtAddConverter or XtAppAddConverter. ) with the from and to_in_out arguments.

The XtCallConverter function looks up the specified type converter in the application context associated with the display and, if the converter was not registered or was registered with cache type XtCacheAll or XtCacheByDisplay looks in the conversion cache to see if this conversion procedure has been called with the specified conversion arguments. If so, it checks the success status of the prior call, and if the conversion failed, XtCallConverter returns False immediately; otherwise it checks the size specified in the to argument and, if it is greater than or equal to the size stored in the cache, copies the information stored in the cache into the location specified by to->addr, stores the cache size into to->size, and returns True. If the size specified in the to argument is smaller than the size stored in the cache, XtCallConverter copies the cache size into the to->size and returns False. If the converter was registered with cache type XtCacheNone or no value was found in the conversion cache, XtCallConverter calls the converter and, if it was not registered with cache type XtCacheNone, enters the result into the cache. XtCallConverter then returns what the converter returned.

The cache_ref_return field specifies storage allocated by the caller in which an opaque value will be stored. If the type converter has been registered with the XtCacheRefCount modifier and if the value returned in in cache_ref_return is non-NULL, then the call should store the cache_ref_return value in order to decrement the reference count when the converted value is no longer required. The cache_ref_return argument should be NULL if the caller is unwilling or unable to store the value.

SEE ALSO

XtAppReleaseCacheRefs(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2149 - Linux cli command tcflow

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tcflow and provides detailed information about the command tcflow, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tcflow.

NAME 🖥️ tcflow 🖥️

get and set terminal attributes, line control, get and set baud rate

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <termios.h>
#include <unistd.h>
int tcgetattr(int fd, struct termios *termios_p);
int tcsetattr(int fd, int optional_actions,
 const struct termios *termios_p);
int tcsendbreak(int fd, int duration);
int tcdrain(int fd);
int tcflush(int fd, int queue_selector);
int tcflow(int fd, int action);
void cfmakeraw(struct termios *termios_p);
speed_t cfgetispeed(const struct termios *termios_p);
speed_t cfgetospeed(const struct termios *termios_p);
int cfsetispeed(struct termios *termios_p, speed_t speed);
int cfsetospeed(struct termios *termios_p, speed_t speed);
int cfsetspeed(struct termios *termios_p, speed_t speed);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

cfsetspeed(), cfmakeraw():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The termios functions describe a general terminal interface that is provided to control asynchronous communications ports.

The termios structure

Many of the functions described here have a termios_p argument that is a pointer to a termios structure. This structure contains at least the following members:

tcflag_t c_iflag;      /* input modes */
tcflag_t c_oflag;      /* output modes */
tcflag_t c_cflag;      /* control modes */
tcflag_t c_lflag;      /* local modes */
cc_t     c_cc[NCCS];   /* special characters */

The values that may be assigned to these fields are described below. In the case of the first four bit-mask fields, the definitions of some of the associated flags that may be set are exposed only if a specific feature test macro (see feature_test_macros(7)) is defined, as noted in brackets ("[]").

In the descriptions below, “not in POSIX” means that the value is not specified in POSIX.1-2001, and “XSI” means that the value is specified in POSIX.1-2001 as part of the XSI extension.

c_iflag flag constants:

IGNBRK
Ignore BREAK condition on input.

BRKINT
If IGNBRK is set, a BREAK is ignored. If it is not set but BRKINT is set, then a BREAK causes the input and output queues to be flushed, and if the terminal is the controlling terminal of a foreground process group, it will cause a SIGINT to be sent to this foreground process group. When neither IGNBRK nor BRKINT are set, a BREAK reads as a null byte (‘�’), except when PARMRK is set, in which case it reads as the sequence \377 � �.

IGNPAR
Ignore framing errors and parity errors.

PARMRK
If this bit is set, input bytes with parity or framing errors are marked when passed to the program. This bit is meaningful only when INPCK is set and IGNPAR is not set. The way erroneous bytes are marked is with two preceding bytes, \377 and �. Thus, the program actually reads three bytes for one erroneous byte received from the terminal. If a valid byte has the value \377, and ISTRIP (see below) is not set, the program might confuse it with the prefix that marks a parity error. Therefore, a valid byte \377 is passed to the program as two bytes, \377 \377, in this case.

If neither IGNPAR nor PARMRK is set, read a character with a parity error or framing error as �.

INPCK
Enable input parity checking.

ISTRIP
Strip off eighth bit.

INLCR
Translate NL to CR on input.

IGNCR
Ignore carriage return on input.

ICRNL
Translate carriage return to newline on input (unless IGNCR is set).

IUCLC
(not in POSIX) Map uppercase characters to lowercase on input.

IXON
Enable XON/XOFF flow control on output.

IXANY
(XSI) Typing any character will restart stopped output. (The default is to allow just the START character to restart output.)

IXOFF
Enable XON/XOFF flow control on input.

IMAXBEL
(not in POSIX) Ring bell when input queue is full. Linux does not implement this bit, and acts as if it is always set.

IUTF8 (since Linux 2.6.4)
(not in POSIX) Input is UTF8; this allows character-erase to be correctly performed in cooked mode.

c_oflag flag constants:

OPOST
Enable implementation-defined output processing.

OLCUC
(not in POSIX) Map lowercase characters to uppercase on output.

ONLCR
(XSI) Map NL to CR-NL on output.

OCRNL
Map CR to NL on output.

ONOCR
Don’t output CR at column 0.

ONLRET
The NL character is assumed to do the carriage-return function; the kernel’s idea of the current column is set to 0 after both NL and CR.

OFILL
Send fill characters for a delay, rather than using a timed delay.

OFDEL
Fill character is ASCII DEL (0177). If unset, fill character is ASCII NUL (‘�’). (Not implemented on Linux.)

NLDLY
Newline delay mask. Values are NL0 and NL1. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

CRDLY
Carriage return delay mask. Values are CR0, CR1, CR2, or CR3. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

TABDLY
Horizontal tab delay mask. Values are TAB0, TAB1, TAB2, TAB3 (or XTABS, but see the BUGS section). A value of TAB3, that is, XTABS, expands tabs to spaces (with tab stops every eight columns). [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

BSDLY
Backspace delay mask. Values are BS0 or BS1. (Has never been implemented.) [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

VTDLY
Vertical tab delay mask. Values are VT0 or VT1.

FFDLY
Form feed delay mask. Values are FF0 or FF1. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

c_cflag flag constants:

CBAUD
(not in POSIX) Baud speed mask (4+1 bits). [requires _BSD_SOURCE or _SVID_SOURCE]

CBAUDEX
(not in POSIX) Extra baud speed mask (1 bit), included in CBAUD. [requires _BSD_SOURCE or _SVID_SOURCE]

(POSIX says that the baud speed is stored in the termios structure without specifying where precisely, and provides cfgetispeed() and cfsetispeed() for getting at it. Some systems use bits selected by CBAUD in c_cflag, other systems use separate fields, for example, sg_ispeed and sg_ospeed.)

CSIZE
Character size mask. Values are CS5, CS6, CS7, or CS8.

CSTOPB
Set two stop bits, rather than one.

CREAD
Enable receiver.

PARENB
Enable parity generation on output and parity checking for input.

PARODD
If set, then parity for input and output is odd; otherwise even parity is used.

HUPCL
Lower modem control lines after last process closes the device (hang up).

CLOCAL
Ignore modem control lines.

LOBLK
(not in POSIX) Block output from a noncurrent shell layer. For use by shl (shell layers). (Not implemented on Linux.)

CIBAUD
(not in POSIX) Mask for input speeds. The values for the CIBAUD bits are the same as the values for the CBAUD bits, shifted left IBSHIFT bits. [requires _BSD_SOURCE or _SVID_SOURCE] (Not implemented in glibc, supported on Linux via TCGET* and TCSET* ioctls; see ioctl_tty(2))

CMSPAR
(not in POSIX) Use “stick” (mark/space) parity (supported on certain serial devices): if PARODD is set, the parity bit is always 1; if PARODD is not set, then the parity bit is always 0. [requires _BSD_SOURCE or _SVID_SOURCE]

CRTSCTS
(not in POSIX) Enable RTS/CTS (hardware) flow control. [requires _BSD_SOURCE or _SVID_SOURCE]

c_lflag flag constants:

ISIG
When any of the characters INTR, QUIT, SUSP, or DSUSP are received, generate the corresponding signal.

ICANON
Enable canonical mode (described below).

XCASE
(not in POSIX; not supported under Linux) If ICANON is also set, terminal is uppercase only. Input is converted to lowercase, except for characters preceded by \ On output, uppercase characters are preceded by \ and lowercase characters are converted to uppercase. [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]

ECHO
Echo input characters.

ECHOE
If ICANON is also set, the ERASE character erases the preceding input character, and WERASE erases the preceding word.

ECHOK
If ICANON is also set, the KILL character erases the current line.

ECHONL
If ICANON is also set, echo the NL character even if ECHO is not set.

ECHOCTL
(not in POSIX) If ECHO is also set, terminal special characters other than TAB, NL, START, and STOP are echoed as ^X, where X is the character with ASCII code 0x40 greater than the special character. For example, character 0x08 (BS) is echoed as ^H. [requires _BSD_SOURCE or _SVID_SOURCE]

ECHOPRT
(not in POSIX) If ICANON and ECHO are also set, characters are printed as they are being erased. [requires _BSD_SOURCE or _SVID_SOURCE]

ECHOKE
(not in POSIX) If ICANON is also set, KILL is echoed by erasing each character on the line, as specified by ECHOE and ECHOPRT. [requires _BSD_SOURCE or _SVID_SOURCE]

DEFECHO
(not in POSIX) Echo only when a process is reading. (Not implemented on Linux.)

FLUSHO
(not in POSIX; not supported under Linux) Output is being flushed. This flag is toggled by typing the DISCARD character. [requires _BSD_SOURCE or _SVID_SOURCE]

NOFLSH
Disable flushing the input and output queues when generating signals for the INT, QUIT, and SUSP characters.

TOSTOP
Send the SIGTTOU signal to the process group of a background process which tries to write to its controlling terminal.

PENDIN
(not in POSIX; not supported under Linux) All characters in the input queue are reprinted when the next character is read. (bash(1) handles typeahead this way.) [requires _BSD_SOURCE or _SVID_SOURCE]

IEXTEN
Enable implementation-defined input processing. This flag, as well as ICANON must be enabled for the special characters EOL2, LNEXT, REPRINT, WERASE to be interpreted, and for the IUCLC flag to be effective.

The c_cc array defines the terminal special characters. The symbolic indices (initial values) and meaning are:

VDISCARD
(not in POSIX; not supported under Linux; 017, SI, Ctrl-O) Toggle: start/stop discarding pending output. Recognized when IEXTEN is set, and then not passed as input.

VDSUSP
(not in POSIX; not supported under Linux; 031, EM, Ctrl-Y) Delayed suspend character (DSUSP): send SIGTSTP signal when the character is read by the user program. Recognized when IEXTEN and ISIG are set, and the system supports job control, and then not passed as input.

VEOF
(004, EOT, Ctrl-D) End-of-file character (EOF). More precisely: this character causes the pending tty buffer to be sent to the waiting user program without waiting for end-of-line. If it is the first character of the line, the read(2) in the user program returns 0, which signifies end-of-file. Recognized when ICANON is set, and then not passed as input.

VEOL
(0, NUL) Additional end-of-line character (EOL). Recognized when ICANON is set.

VEOL2
(not in POSIX; 0, NUL) Yet another end-of-line character (EOL2). Recognized when ICANON is set.

VERASE
(0177, DEL, rubout, or 010, BS, Ctrl-H, or also #) Erase character (ERASE). This erases the previous not-yet-erased character, but does not erase past EOF or beginning-of-line. Recognized when ICANON is set, and then not passed as input.

VINTR
(003, ETX, Ctrl-C, or also 0177, DEL, rubout) Interrupt character (INTR). Send a SIGINT signal. Recognized when ISIG is set, and then not passed as input.

VKILL
(025, NAK, Ctrl-U, or Ctrl-X, or also @) Kill character (KILL). This erases the input since the last EOF or beginning-of-line. Recognized when ICANON is set, and then not passed as input.

VLNEXT
(not in POSIX; 026, SYN, Ctrl-V) Literal next (LNEXT). Quotes the next input character, depriving it of a possible special meaning. Recognized when IEXTEN is set, and then not passed as input.

VMIN
Minimum number of characters for noncanonical read (MIN).

VQUIT
(034, FS, Ctrl-\ Quit character (QUIT). Send SIGQUIT signal. Recognized when ISIG is set, and then not passed as input.

VREPRINT
(not in POSIX; 022, DC2, Ctrl-R) Reprint unread characters (REPRINT). Recognized when ICANON and IEXTEN are set, and then not passed as input.

VSTART
(021, DC1, Ctrl-Q) Start character (START). Restarts output stopped by the Stop character. Recognized when IXON is set, and then not passed as input.

VSTATUS
(not in POSIX; not supported under Linux; status request: 024, DC4, Ctrl-T). Status character (STATUS). Display status information at terminal, including state of foreground process and amount of CPU time it has consumed. Also sends a SIGINFO signal (not supported on Linux) to the foreground process group.

VSTOP
(023, DC3, Ctrl-S) Stop character (STOP). Stop output until Start character typed. Recognized when IXON is set, and then not passed as input.

VSUSP
(032, SUB, Ctrl-Z) Suspend character (SUSP). Send SIGTSTP signal. Recognized when ISIG is set, and then not passed as input.

VSWTCH
(not in POSIX; not supported under Linux; 0, NUL) Switch character (SWTCH). Used in System V to switch shells in shell layers, a predecessor to shell job control.

VTIME
Timeout in deciseconds for noncanonical read (TIME).

VWERASE
(not in POSIX; 027, ETB, Ctrl-W) Word erase (WERASE). Recognized when ICANON and IEXTEN are set, and then not passed as input.

An individual terminal special character can be disabled by setting the value of the corresponding c_cc element to _POSIX_VDISABLE.

The above symbolic subscript values are all different, except that VTIME, VMIN may have the same value as VEOL, VEOF, respectively. In noncanonical mode the special character meaning is replaced by the timeout meaning. For an explanation of VMIN and VTIME, see the description of noncanonical mode below.

Retrieving and changing terminal settings

tcgetattr() gets the parameters associated with the object referred by fd and stores them in the termios structure referenced by termios_p. This function may be invoked from a background process; however, the terminal attributes may be subsequently changed by a foreground process.

tcsetattr() sets the parameters associated with the terminal (unless support is required from the underlying hardware that is not available) from the termios structure referred to by termios_p. optional_actions specifies when the changes take effect:

TCSANOW
the change occurs immediately.

TCSADRAIN
the change occurs after all output written to fd has been transmitted. This option should be used when changing parameters that affect output.

TCSAFLUSH
the change occurs after all output written to the object referred by fd has been transmitted, and all input that has been received but not read will be discarded before the change is made.

Canonical and noncanonical mode

The setting of the ICANON canon flag in c_lflag determines whether the terminal is operating in canonical mode (ICANON set) or noncanonical mode (ICANON unset). By default, ICANON is set.

In canonical mode:

  • Input is made available line by line. An input line is available when one of the line delimiters is typed (NL, EOL, EOL2; or EOF at the start of line). Except in the case of EOF, the line delimiter is included in the buffer returned by read(2).

  • Line editing is enabled (ERASE, KILL; and if the IEXTEN flag is set: WERASE, REPRINT, LNEXT). A read(2) returns at most one line of input; if the read(2) requested fewer bytes than are available in the current line of input, then only as many bytes as requested are read, and the remaining characters will be available for a future read(2).

  • The maximum line length is 4096 chars (including the terminating newline character); lines longer than 4096 chars are truncated. After 4095 characters, input processing (e.g., ISIG and ECHO* processing) continues, but any input data after 4095 characters up to (but not including) any terminating newline is discarded. This ensures that the terminal can always receive more input until at least one line can be read.

In noncanonical mode input is available immediately (without the user having to type a line-delimiter character), no input processing is performed, and line editing is disabled. The read buffer will only accept 4095 chars; this provides the necessary space for a newline char if the input mode is switched to canonical. The settings of MIN (c_cc[VMIN]) and TIME (c_cc[VTIME]) determine the circumstances in which a read(2) completes; there are four distinct cases:

MIN == 0, TIME == 0 (polling read)
If data is available, read(2) returns immediately, with the lesser of the number of bytes available, or the number of bytes requested. If no data is available, read(2) returns 0.

MIN > 0, TIME == 0 (blocking read)
read(2) blocks until MIN bytes are available, and returns up to the number of bytes requested.

MIN == 0, TIME > 0 (read with timeout)
TIME specifies the limit for a timer in tenths of a second. The timer is started when read(2) is called. read(2) returns either when at least one byte of data is available, or when the timer expires. If the timer expires without any input becoming available, read(2) returns 0. If data is already available at the time of the call to read(2), the call behaves as though the data was received immediately after the call.

MIN > 0, TIME > 0 (read with interbyte timeout)
TIME specifies the limit for a timer in tenths of a second. Once an initial byte of input becomes available, the timer is restarted after each further byte is received. read(2) returns when any of the following conditions is met:

  • MIN bytes have been received.

  • The interbyte timer expires.

  • The number of bytes requested by read(2) has been received. (POSIX does not specify this termination condition, and on some other implementations read(2) does not return in this case.)

Because the timer is started only after the initial byte becomes available, at least one byte will be read. If data is already available at the time of the call to read(2), the call behaves as though the data was received immediately after the call.

POSIX does not specify whether the setting of the O_NONBLOCK file status flag takes precedence over the MIN and TIME settings. If O_NONBLOCK is set, a read(2) in noncanonical mode may return immediately, regardless of the setting of MIN or TIME. Furthermore, if no data is available, POSIX permits a read(2) in noncanonical mode to return either 0, or -1 with errno set to EAGAIN.

Raw mode

cfmakeraw() sets the terminal to something like the “raw” mode of the old Version 7 terminal driver: input is available character by character, echoing is disabled, and all special processing of terminal input and output characters is disabled. The terminal attributes are set as follows:

termios_p->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
                | INLCR | IGNCR | ICRNL | IXON);
termios_p->c_oflag &= ~OPOST;
termios_p->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
termios_p->c_cflag &= ~(CSIZE | PARENB);
termios_p->c_cflag |= CS8;

Line control

tcsendbreak() transmits a continuous stream of zero-valued bits for a specific duration, if the terminal is using asynchronous serial data transmission. If duration is zero, it transmits zero-valued bits for at least 0.25 seconds, and not more than 0.5 seconds. If duration is not zero, it sends zero-valued bits for some implementation-defined length of time.

If the terminal is not using asynchronous serial data transmission, tcsendbreak() returns without taking any action.

tcdrain() waits until all output written to the object referred to by fd has been transmitted.

tcflush() discards data written to the object referred to by fd but not transmitted, or data received but not read, depending on the value of queue_selector:

TCIFLUSH
flushes data received but not read.

TCOFLUSH
flushes data written but not transmitted.

TCIOFLUSH
flushes both data received but not read, and data written but not transmitted.

tcflow() suspends transmission or reception of data on the object referred to by fd, depending on the value of action:

TCOOFF
suspends output.

TCOON
restarts suspended output.

TCIOFF
transmits a STOP character, which stops the terminal device from transmitting data to the system.

TCION
transmits a START character, which starts the terminal device transmitting data to the system.

The default on open of a terminal file is that neither its input nor its output is suspended.

Line speed

The baud rate functions are provided for getting and setting the values of the input and output baud rates in the termios structure. The new values do not take effect until tcsetattr() is successfully called.

Setting the speed to B0 instructs the modem to “hang up”. The actual bit rate corresponding to B38400 may be altered with setserial(8).

The input and output baud rates are stored in the termios structure.

cfgetospeed() returns the output baud rate stored in the termios structure pointed to by termios_p.

cfsetospeed() sets the output baud rate stored in the termios structure pointed to by termios_p to speed, which must be one of these constants:

B0
B50
B75
B110
B134
B150
B200
B300
B600
B1200
B1800
B2400
B4800
B9600
B19200
B38400
B57600
B115200
B230400
B460800
B500000
B576000
B921600
B1000000
B1152000
B1500000
B2000000

These constants are additionally supported on the SPARC architecture:

B76800
B153600
B307200
B614400

These constants are additionally supported on non-SPARC architectures:

B2500000
B3000000
B3500000
B4000000

Due to differences between architectures, portable applications should check if a particular Bnnn constant is defined prior to using it.

The zero baud rate, B0, is used to terminate the connection. If B0 is specified, the modem control lines shall no longer be asserted. Normally, this will disconnect the line. CBAUDEX is a mask for the speeds beyond those defined in POSIX.1 (57600 and above). Thus, B57600 & CBAUDEX is nonzero.

Setting the baud rate to a value other than those defined by Bnnn constants is possible via the TCSETS2 ioctl; see ioctl_tty(2).

cfgetispeed() returns the input baud rate stored in the termios structure.

cfsetispeed() sets the input baud rate stored in the termios structure to speed, which must be specified as one of the Bnnn constants listed above for cfsetospeed(). If the input baud rate is set to the literal constant 0 (not the symbolic constant B0), the input baud rate will be equal to the output baud rate.

cfsetspeed() is a 4.4BSD extension. It takes the same arguments as cfsetispeed(), and sets both input and output speed.

RETURN VALUE

cfgetispeed() returns the input baud rate stored in the termios structure.

cfgetospeed() returns the output baud rate stored in the termios structure.

All other functions return:

0
on success.

-1
on failure and set errno to indicate the error.

Note that tcsetattr() returns success if any of the requested changes could be successfully carried out. Therefore, when making multiple changes it may be necessary to follow this call with a further call to tcgetattr() to check that all changes have been performed successfully.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tcgetattr(), tcsetattr(), tcdrain(), tcflush(), tcflow(), tcsendbreak(), cfmakeraw(), cfgetispeed(), cfgetospeed(), cfsetispeed(), cfsetospeed(), cfsetspeed()

Thread safetyMT-Safe

STANDARDS

tcgetattr()
tcsetattr()
tcsendbreak()
tcdrain()
tcflush()
tcflow()
cfgetispeed()
cfgetospeed()
cfsetispeed()
cfsetospeed()
POSIX.1-2008.

cfmakeraw()
cfsetspeed()
BSD.

HISTORY

tcgetattr()
tcsetattr()
tcsendbreak()
tcdrain()
tcflush()
tcflow()
cfgetispeed()
cfgetospeed()
cfsetispeed()
cfsetospeed()
POSIX.1-2001.

cfmakeraw()
cfsetspeed()
BSD.

NOTES

UNIX V7 and several later systems have a list of baud rates where after the values B0 through B9600 one finds the two constants EXTA, EXTB (“External A” and “External B”). Many systems extend the list with much higher baud rates.

The effect of a nonzero duration with tcsendbreak() varies. SunOS specifies a break of duration * N seconds, where N is at least 0.25, and not more than 0.5. Linux, AIX, DU, Tru64 send a break of duration milliseconds. FreeBSD and NetBSD and HP-UX and MacOS ignore the value of duration. Under Solaris and UnixWare, tcsendbreak() with nonzero duration behaves like tcdrain().

BUGS

On the Alpha architecture before Linux 4.16 (and glibc before glibc 2.28), the XTABS value was different from TAB3 and it was ignored by the N_TTY line discipline code of the terminal driver as a result (because as it wasn’t part of the TABDLY mask).

SEE ALSO

reset(1), setterm(1), stty(1), tput(1), tset(1), tty(1), ioctl_console(2), ioctl_tty(2), cc_t(3type), speed_t(3type), tcflag_t(3type), setserial(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2150 - Linux cli command URI_sockspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command URI_sockspm and provides detailed information about the command URI_sockspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the URI_sockspm.

NAME 🖥️ URI_sockspm 🖥️

support for socks://host:port

AUTHOR

Sheridan C Rawlins <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2151 - Linux cli command posix_memalign

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command posix_memalign and provides detailed information about the command posix_memalign, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the posix_memalign.

NAME 🖥️ posix_memalign 🖥️

allocate aligned memory

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int posix_memalign(void **memptr, size_t alignment, size_t size);
void *aligned_alloc(size_t alignment, size_t size);
[[deprecated]] void *valloc(size_t size);
#include <malloc.h>
[[deprecated]] void *memalign(size_t alignment, size_t size);
[[deprecated]] void *pvalloc(size_t size);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

posix_memalign():

    _POSIX_C_SOURCE >= 200112L

aligned_alloc():

    _ISOC11_SOURCE

valloc():

    Since glibc 2.12:
        (_XOPEN_SOURCE >= 500) && !(_POSIX_C_SOURCE >= 200112L)
            || /* glibc >= 2.19: */ _DEFAULT_SOURCE
            || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
    Before glibc 2.12:
        _BSD_SOURCE || _XOPEN_SOURCE >= 500

DESCRIPTION

posix_memalign() allocates size bytes and places the address of the allocated memory in *memptr. The address of the allocated memory will be a multiple of alignment, which must be a power of two and a multiple of sizeof(void *). This address can later be successfully passed to free(3). If size is 0, then the value placed in *memptr is either NULL or a unique pointer value.

The obsolete function memalign() allocates size bytes and returns a pointer to the allocated memory. The memory address will be a multiple of alignment, which must be a power of two.

aligned_alloc() is the same as memalign(), except for the added restriction that alignment must be a power of two.

The obsolete function valloc() allocates size bytes and returns a pointer to the allocated memory. The memory address will be a multiple of the page size. It is equivalent to memalign(sysconf(_SC_PAGESIZE),size).

The obsolete function pvalloc() is similar to valloc(), but rounds the size of the allocation up to the next multiple of the system page size.

For all of these functions, the memory is not zeroed.

RETURN VALUE

aligned_alloc(), memalign(), valloc(), and pvalloc() return a pointer to the allocated memory on success. On error, NULL is returned, and errno is set to indicate the error.

posix_memalign() returns zero on success, or one of the error values listed in the next section on failure. The value of errno is not set. On Linux (and other systems), posix_memalign() does not modify memptr on failure. A requirement standardizing this behavior was added in POSIX.1-2008 TC2.

ERRORS

EINVAL
The alignment argument was not a power of two, or was not a multiple of sizeof(void *).

ENOMEM
Out of memory.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

aligned_alloc(), memalign(), posix_memalign()

Thread safetyMT-Safe

valloc(), pvalloc()

Thread safetyMT-Unsafe init

STANDARDS

aligned_alloc()
C11.

posix_memalign()
POSIX.1-2008.

memalign()
valloc()
None.

pvalloc()
GNU.

HISTORY

aligned_alloc()
glibc 2.16. C11.

posix_memalign()
glibc 2.1.91. POSIX.1d, POSIX.1-2001.

memalign()
glibc 2.0. SunOS 4.1.3.

valloc()
glibc 2.0. 3.0BSD. Documented as obsolete in 4.3BSD, and as legacy in SUSv2.

pvalloc()
glibc 2.0.

Headers

Everybody agrees that posix_memalign() is declared in <stdlib.h>.

On some systems memalign() is declared in <stdlib.h> instead of <malloc.h>.

According to SUSv2, valloc() is declared in <stdlib.h>. glibc declares it in <malloc.h>, and also in <stdlib.h> if suitable feature test macros are defined (see above).

NOTES

On many systems there are alignment restrictions, for example, on buffers used for direct block device I/O. POSIX specifies the pathconf(path,_PC_REC_XFER_ALIGN) call that tells what alignment is needed. Now one can use posix_memalign() to satisfy this requirement.

posix_memalign() verifies that alignment matches the requirements detailed above. memalign() may not check that the alignment argument is correct.

POSIX requires that memory obtained from posix_memalign() can be freed using free(3). Some systems provide no way to reclaim memory allocated with memalign() or valloc() (because one can pass to free(3) only a pointer obtained from malloc(3), while, for example, memalign() would call malloc(3) and then align the obtained value). The glibc implementation allows memory obtained from any of these functions to be reclaimed with free(3).

The glibc malloc(3) always returns 8-byte aligned memory addresses, so these functions are needed only if you require larger alignment values.

SEE ALSO

brk(2), getpagesize(2), free(3), malloc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2152 - Linux cli command Moosepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moosepm and provides detailed information about the command Moosepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moosepm.

NAME 🖥️ Moosepm 🖥️

A postmodern object system for Perl 5

VERSION

version 2.2207

SYNOPSIS

package Point; use Moose; # automatically turns on strict and warnings has x => (is => rw, isa => Int); has y => (is => rw, isa => Int); sub clear { my $self = shift; $self->x(0); $self->y(0); } package Point3D; use Moose; extends Point; has z => (is => rw, isa => Int); after clear => sub { my $self = shift; $self->z(0); };

DESCRIPTION

Moose is an extension of the Perl 5 object system.

The main goal of Moose is to make Perl 5 Object Oriented programming easier, more consistent, and less tedious. With Moose you can think more about what you want to do and less about the mechanics of OOP.

Additionally, Moose is built on top of Class::MOP, which is a metaclass system for Perl 5. This means that Moose not only makes building normal Perl 5 objects better, but it provides the power of metaclass programming as well.

New to Moose?

If you’re new to Moose, the best place to start is the Moose::Manual docs, followed by the Moose::Cookbook. The intro will show you what Moose is, and how it makes Perl 5 OO better.

The cookbook recipes on Moose basics will get you up to speed with many of Moose’s features quickly. Once you have an idea of what Moose can do, you can use the API documentation to get more detail on features which interest you.

Moose Extensions

The MooseX:: namespace is the official place to find Moose extensions. These extensions can be found on the CPAN. The easiest way to find them is to search for them (<https://metacpan.org/search?q=MooseX::>), or to examine Task::Moose which aims to keep an up-to-date, easily installable list of Moose extensions.

TRANSLATIONS

Much of the Moose documentation has been translated into other languages.

Japanese
Japanese docs can be found at <http://perldoc.perlassociation.org/pod/Moose-Doc-JA/index.html>. The source POD files can be found in GitHub: <http://github.com/jpa/Moose-Doc-JA>

BUILDING CLASSES WITH MOOSE

Moose makes every attempt to provide as much convenience as possible during class construction/definition, but still stay out of your way if you want it to. Here are a few items to note when building classes with Moose.

When you use Moose, Moose will set the class’s parent class to Moose::Object, unless the class using Moose already has a parent class. In addition, specifying a parent with extends will change the parent class.

Moose will also manage all attributes (including inherited ones) that are defined with has. And (assuming you call new, which is inherited from Moose::Object) this includes properly initializing all instance slots, setting defaults where appropriate, and performing any type constraint checking or coercion.

PROVIDED METHODS

Moose provides a number of methods to all your classes, mostly through the inheritance of Moose::Object. There is however, one exception. By default, Moose will install a method named meta in any class which uses Moose. This method returns the current class’s metaclass.

If you’d like to rename this method, you can do so by passing the -meta_name option when using Moose:

use Moose -meta_name => my_meta;

However, the Moose::Object class also provides a method named meta which does the same thing. If your class inherits from Moose::Object (which is the default), then you will still have a meta method. However, if your class inherits from a parent which provides a meta method of its own, your class will inherit that instead.

If you’d like for Moose to not install a meta method at all, you can pass undef as the -meta_name option:

use Moose -meta_name => undef;

Again, you will still inherit meta from Moose::Object in this case.

EXPORTED FUNCTIONS

Moose will export a number of functions into the class’s namespace which may then be used to set up the class. These functions all work directly on the current class.

extends (@superclasses)

This function will set the superclass(es) for the current class. If the parent classes are not yet loaded, then extends tries to load them.

This approach is recommended instead of use base/use parent, because use base actually pushes onto the class’s @ISA, whereas extends will replace it. This is important to ensure that classes which do not have superclasses still properly inherit from Moose::Object.

Each superclass can be followed by a hash reference with options. Currently, only -version is recognized:

extends My::Parent => { -version => 0.01 }, My::OtherParent => { -version => 0.03 };

An exception will be thrown if the version requirements are not satisfied.

with (@roles)

This will apply a given set of @roles to the local class.

Like with extends, each specified role can be followed by a hash reference with a -version option:

with My::Role => { -version => 0.32 }, My::Otherrole => { -version => 0.23 };

The specified version requirements must be satisfied, otherwise an exception will be thrown.

If your role takes options or arguments, they can be passed along in the hash reference as well.

You should only use one with, even if you are consuming multiple roles. If you consume roles using multiple with statements Moose cannot detect method conflicts between those roles.

has $name|@$names => %options

This will install an attribute of a given $name into the current class. If the first parameter is an array reference, it will create an attribute for every $name in the list. The %options will be passed to the constructor for Moose::Meta::Attribute (which inherits from Class::MOP::Attribute), so the full documentation for the valid options can be found there. These are the most commonly used options:

is => ‘rw’|‘ro’
The is option accepts either rw (for read/write) or ro (for read only). These will create either a read/write accessor or a read-only accessor respectively, using the same name as the $name of the attribute. If you need more control over how your accessors are named, you can use the reader, writer and accessor options inherited from Class::MOP::Attribute, however if you use those, you won’t need the is option.

isa => $type_name
The isa option uses Moose’s type constraint facilities to set up runtime type checking for this attribute. Moose will perform the checks during class construction, and within any accessors. The $type_name argument must be a string. The string may be either a class name or a type defined using Moose’s type definition features. (Refer to Moose::Util::TypeConstraints for information on how to define a new type, and how to retrieve type meta-data).

coerce => (1|0)
This will attempt to use coercion with the supplied type constraint to change the value passed into any accessors or constructors. You must supply a type constraint, and that type constraint must define a coercion. See Moose::Cookbook::Basics::HTTP_SubtypesAndCoercion for an example.

does => $role_name
This will accept the name of a role which the value stored in this attribute is expected to have consumed.

required => (1|0)
This marks the attribute as being required. This means a value must be supplied during class construction, or the attribute must be lazy and have either a default or a builder. Note that required does not say anything about the attribute’s value, which can be undef.

weak_ref => (1|0)
This will tell the class to store the value of this attribute as a weakened reference. If an attribute is a weakened reference, it cannot also be coerced. Note that when a weak ref expires, the attribute’s value becomes undefined, and is still considered to be set for purposes of predicate, default, etc.

lazy => (1|0)
This will tell the class to not create this slot until absolutely necessary. If an attribute is marked as lazy it must have a default or builder supplied.

trigger => $code
The trigger option is a CODE reference which will be called after the value of the attribute is set. The CODE ref is passed the instance itself, the updated value, and the original value if the attribute was already set. You can have a trigger on a read-only attribute. NOTE: Triggers will only fire when you assign to the attribute, either in the constructor, or using the writer. Default and built values will not cause the trigger to be fired.

handles => ARRAY | HASH | REGEXP | ROLE | ROLETYPE | DUCKTYPE | CODE
The handles option provides Moose classes with automated delegation features. This is a pretty complex and powerful option. It accepts many different option formats, each with its own benefits and drawbacks. NOTE: The class being delegated to does not need to be a Moose based class, which is why this feature is especially useful when wrapping non-Moose classes. All handles option formats share the following traits: You cannot override a locally defined method with a delegated method; an exception will be thrown if you try. That is to say, if you define foo in your class, you cannot override it with a delegated foo. This is almost never something you would want to do, and if it is, you should do it by hand and not use Moose. You cannot override any of the methods found in Moose::Object, or the BUILD and DEMOLISH methods. These will not throw an exception, but will silently move on to the next method in the list. My reasoning for this is that you would almost never want to do this, since it usually breaks your class. As with overriding locally defined methods, if you do want to do this, you should do it manually, not with Moose. You do not need to have a reader (or accessor) for the attribute in order to delegate to it. Moose will create a means of accessing the value for you, however this will be several times less efficient then if you had given the attribute a reader (or accessor) to use. Below is the documentation for each option format:

“ARRAY”
This is the most common usage for handles. You basically pass a list of method names to be delegated, and Moose will install a delegation method for each one.

“HASH”
This is the second most common usage for handles. Instead of a list of method names, you pass a HASH ref where each key is the method name you want installed locally, and its value is the name of the original method in the class being delegated to. This can be very useful for recursive classes like trees. Here is a quick example (soon to be expanded into a Moose::Cookbook recipe): package Tree; use Moose; has node => (is => rw, isa => Any); has children => ( is => ro, isa => ArrayRef, default => sub { [] } ); has parent => ( is => rw, isa => Tree, weak_ref => 1, handles => { parent_node => node, siblings => children, } ); In this example, the Tree package gets parent_node and siblings methods, which delegate to the node and children methods (respectively) of the Tree instance stored in the parent slot. You may also use an array reference to curry arguments to the original method. has thing => ( … handles => { set_foo => [ set => foo ] }, ); # $self->set_foo(…) calls $self->thing->set(foo, …) The first element of the array reference is the original method name, and the rest is a list of curried arguments.

“REGEXP”
The regexp option works very similar to the ARRAY option, except that it builds the list of methods for you. It starts by collecting all possible methods of the class being delegated to, then filters that list using the regexp supplied here. NOTE: An isa option is required when using the regexp option format. This is so that we can determine (at compile time) the method list from the class. Without an isa this is just not possible.

“ROLE” or “ROLETYPE”
With the role option, you specify the name of a role or a role type whose “interface” then becomes the list of methods to handle. The “interface” can be defined as; the methods of the role and any required methods of the role. It should be noted that this does not include any method modifiers or generated attribute methods (which is consistent with role composition).

“DUCKTYPE”
With the duck type option, you pass a duck type object whose “interface” then becomes the list of methods to handle. The “interface” can be defined as the list of methods passed to duck_type to create a duck type object. For more information on duck_type please check Moose::Util::TypeConstraints.

“CODE”
This is the option to use when you really want to do something funky. You should only use it if you really know what you are doing, as it involves manual metaclass twiddling. This takes a code reference, which should expect two arguments. The first is the attribute meta-object this handles is attached to. The second is the metaclass of the class being delegated to. It expects you to return a hash (not a HASH ref) of the methods you want mapped.

traits => [ @role_names ]
This tells Moose to take the list of @role_names and apply them to the attribute meta-object. Custom attribute metaclass traits are useful for extending the capabilities of the has keyword: they are the simplest way to extend the MOP, but they are still a fairly advanced topic and too much to cover here. See “Metaclass and Trait Name Resolution” for details on how a trait name is resolved to a role name. Also see Moose::Cookbook::Meta::Labeled_AttributeTrait for a metaclass trait example.

builder => Str
The value of this key is the name of the method that will be called to obtain the value used to initialize the attribute. See the builder option docs in Class::MOP::Attribute and/or Moose::Cookbook::Basics::BinaryTree_BuilderAndLazyBuild for more information.

default => SCALAR | CODE
The value of this key is the default value which will initialize the attribute. NOTE: If the value is a simple scalar (string or number), then it can be just passed as is. However, if you wish to initialize it with a HASH or ARRAY ref, then you need to wrap that inside a CODE reference. See the default option docs in Class::MOP::Attribute for more information.

clearer => Str
Creates a method allowing you to clear the value. See the clearer option docs in Class::MOP::Attribute for more information.

predicate => Str
Creates a method to perform a basic test to see if a value has been set in the attribute. See the predicate option docs in Class::MOP::Attribute for more information. Note that the predicate will return true even for a weak_ref attribute whose value has expired.

documentation => $string
An arbitrary string that can be retrieved later by calling $attr->documentation.

has +$name => %options

This is variation on the normal attribute creator has which allows you to clone and extend an attribute from a superclass or from a role. Here is an example of the superclass usage:

package Foo; use Moose; has message => ( is => rw, isa => Str, default => Hello, I am a Foo ); package My::Foo; use Moose; extends Foo; has +message => (default => Hello I am My::Foo);

What is happening here is that My::Foo is cloning the message attribute from its parent class Foo, retaining the is => rw and isa => Str characteristics, but changing the value in default.

Here is another example, but within the context of a role:

package Foo::Role; use Moose::Role; has message => ( is => rw, isa => Str, default => Hello, I am a Foo ); package My::Foo; use Moose; with Foo::Role; has +message => (default => Hello I am My::Foo);

In this case, we are basically taking the attribute which the role supplied and altering it within the bounds of this feature.

Note that you can only extend an attribute from either a superclass or a role, you cannot extend an attribute in a role that composes over an attribute from another role.

Aside from where the attributes come from (one from superclass, the other from a role), this feature works exactly the same. This feature is restricted somewhat, so as to try and force at least some sanity into it. Most options work the same, but there are some exceptions:

reader

writer

accessor

clearer

predicate

These options can be added, but cannot override a superclass definition.

traits
You are allowed to add additional traits to the traits definition. These traits will be composed into the attribute, but preexisting traits are not overridden, or removed.

before $name|@names|\names|qr/…/ => sub

after $name|@names|\names|qr/…/ => sub

around $name|@names|\names|qr/…/ => sub

These three items are syntactic sugar for the before, after, and around method modifier features that Class::MOP provides. More information on these may be found in Moose::Manual::MethodModifiers and the Class::MOP::Class documentation.

override ($name, &sub)

An override method is a way of explicitly saying “I am overriding this method from my superclass”. You can call super within this method, and it will work as expected. The same thing can be accomplished with a normal method call and the SUPER:: pseudo-package; it is really your choice.

super

The keyword super is a no-op when called outside of an override method. In the context of an override method, it will call the next most appropriate superclass method with the same arguments as the original method.

augment ($name, &sub)

An augment method, is a way of explicitly saying “I am augmenting this method from my superclass”. Once again, the details of how inner and augment work is best described in the Moose::Cookbook::Basics::Document_AugmentAndInner.

inner

The keyword inner, much like super, is a no-op outside of the context of an augment method. You can think of inner as being the inverse of super; the details of how inner and augment work is best described in the Moose::Cookbook::Basics::Document_AugmentAndInner.

blessed

This is the Scalar::Util::blessed function. It is highly recommended that this is used instead of ref anywhere you need to test for an object’s class name.

confess

This is the Carp::confess function, and exported here for historical reasons.

METACLASS

When you use Moose, you can specify traits which will be applied to your metaclass:

use Moose -traits => My::Trait;

This is very similar to the attribute traits feature. When you do this, your class’s meta object will have the specified traits applied to it.

Metaclass and Trait Name Resolution

By default, when given a trait name, Moose simply tries to load a class of the same name. If such a class does not exist, it then looks for a class matching Moose::Meta::$type::Custom::Trait::$trait_name. The $type variable here will be one of Attribute or Class, depending on what the trait is being applied to.

If a class with this long name exists, Moose checks to see if it has the method register_implementation. This method is expected to return the real class name of the trait. If there is no register_implementation method, it will fall back to using Moose::Meta::$type::Custom::Trait::$trait as the trait name.

The lookup method for metaclasses is the same, except that it looks for a class matching Moose::Meta::$type::Custom::$metaclass_name.

If all this is confusing, take a look at Moose::Cookbook::Meta::Labeled_AttributeTrait, which demonstrates how to create an attribute trait.

UNIMPORTING FUNCTIONS

unimport

Moose offers a way to remove the keywords it exports, through the unimport method. You simply have to say no Moose at the bottom of your code for this to work. Here is an example:

package Person; use Moose; has first_name => (is => rw, isa => Str); has last_name => (is => rw, isa => Str); sub full_name { my $self = shift; $self->first_name . . $self->last_name } no Moose; # keywords are removed from the Person package

EXTENDING AND EMBEDDING MOOSE

To learn more about extending Moose, we recommend checking out the “Extending” recipes in the Moose::Cookbook, starting with Moose::Cookbook::Extending::ExtensionOverview, which provides an overview of all the different ways you might extend Moose. Moose::Exporter and Moose::Util::MetaRole are the modules which provide the majority of the extension functionality, so reading their documentation should also be helpful.

The MooseX:: namespace

Generally if you’re writing an extension for Moose itself you’ll want to put your extension in the MooseX:: namespace. This namespace is specifically for extensions that make Moose better or different in some fundamental way. It is traditionally not for a package that just happens to use Moose. This namespace follows from the examples of the LWPx:: and DBIx:: namespaces that perform the same function for LWP and DBI respectively.

METACLASS COMPATIBILITY AND MOOSE

Metaclass compatibility is a thorny subject. You should start by reading the “About Metaclass compatibility” section in the Class::MOP docs.

Moose will attempt to resolve a few cases of metaclass incompatibility when you set the superclasses for a class, in addition to the cases that Class::MOP handles.

Moose tries to determine if the metaclasses only “differ by roles”. This means that the parent and child’s metaclass share a common ancestor in their respective hierarchies, and that the subclasses under the common ancestor are only different because of role applications. This case is actually fairly common when you mix and match various MooseX::* modules, many of which apply roles to the metaclass.

If the parent and child do differ by roles, Moose replaces the metaclass in the child with a newly created metaclass. This metaclass is a subclass of the parent’s metaclass which does all of the roles that the child’s metaclass did before being replaced. Effectively, this means the new metaclass does all of the roles done by both the parent’s and child’s original metaclasses.

Ultimately, this is all transparent to you except in the case of an unresolvable conflict.

CAVEATS

It should be noted that super and inner cannot be used in the same method. However, they may be combined within the same class hierarchy; see t/basics/override_augment_inner_super.t for an example.

The reason for this is that super is only valid within a method with the override modifier, and inner will never be valid within an override method. In fact, augment will skip over any override methods when searching for its appropriate inner.

This might seem like a restriction, but I am of the opinion that keeping these two features separate (yet interoperable) actually makes them easy to use, since their behavior is then easier to predict. Time will tell whether I am right or not (UPDATE: so far so good).

GETTING HELP

We offer both a mailing list and a very active IRC channel.

The mailing list is <mailto:[email protected]>. You must be subscribed to send a message. To subscribe, send an empty message to <mailto:[email protected]>

You can also visit us at #moose on <irc://irc.perl.org/#moose> This channel is quite active, and questions at all levels (on Moose-related topics ;) are welcome.

WHAT DOES MOOSE STAND FOR?

Moose doesn’t stand for one thing in particular, however, if you want, here are a few of our favorites. Feel free to contribute more!

  • Make Other Object Systems Envious

  • Makes Object Orientation So Easy

  • Makes Object Orientation Spiffy- Er (sorry ingy)

  • Most Other Object Systems Emasculate

  • Moose Often Ovulate Sorta Early

  • Moose Offers Often Super Extensions

  • Meta Object Obligates Salivary Excitation

  • Meta Object Orientation Syntax Extensions

  • Moo, Only Overengineered, Slow, and Execrable (blame rjbs!)

  • Massive Object-Oriented Stacktrace Emitter

ACKNOWLEDGEMENTS

I blame Sam Vilain for introducing me to the insanity that is meta-models.

I blame Audrey Tang for then encouraging my meta-model habit in #perl6.

Without Yuval “nothingmuch” Kogman this module would not be possible, and it certainly wouldn’t have this name ;P

The basis of the TypeContraints module was Rob Kinyon’s idea originally, I just ran with it.

Thanks to mst & chansen and the whole #moose posse for all the early ideas/feature-requests/encouragement/bug-finding.

Thanks to David “Theory” Wheeler for meta-discussions and spelling fixes.

SEE ALSO

<http://moose.perl.org/>
This is the official web home of Moose. It contains links to our public git repository, as well as links to a number of talks and articles on Moose and Moose related technologies.

the Moose manual
This is an introduction to Moose which covers most of the basics.

Modern Perl, by chromatic
This is an introduction to modern Perl programming, which includes a section on Moose. It is available in print and as a free download from <http://onyxneon.com/books/modern_perl/>.

The Moose is flying, a tutorial by Randal Schwartz
Part 1 - <http://www.stonehenge.com/merlyn/LinuxMag/col94.html> Part 2 - <http://www.stonehenge.com/merlyn/LinuxMag/col95.html>

Several Moose extension modules in the “MooseX::” namespace.
See <https://metacpan.org/search?q=MooseX::> for extensions.

Books

The Art of the MetaObject Protocol
I mention this in the Class::MOP docs too, as this book was critical in the development of both modules and is highly recommended.

Papers

<http://www.cs.utah.edu/plt/publications/oopsla04-gff.pdf>
This paper (suggested by lbr on #moose) was what lead to the implementation of the super/override and inner/augment features. If you really want to understand them, I suggest you read this.

BUGS

All complex software has bugs lurking in it, and this module is no exception.

Please report any bugs to [email protected], or through the web interface at <http://rt.cpan.org>. You can also submit a TODO test as a pull request at <https://github.com/moose/Moose>.

You can also discuss feature requests or possible bugs on the Moose mailing list ([email protected]) or on IRC at <irc://irc.perl.org/#moose>.

FEATURE REQUESTS

We are very strict about what features we add to the Moose core, especially the user-visible features. Instead we have made sure that the underlying meta-system of Moose is as extensible as possible so that you can add your own features easily.

That said, occasionally there is a feature needed in the meta-system to support your planned extension, in which case you should either email the mailing list ([email protected]) or join us on IRC at <irc://irc.perl.org/#moose> to discuss. The Moose::Manual::Contributing has more detail about how and when you can contribute.

CABAL

There are only a few people with the rights to release a new version of Moose. The Moose Cabal are the people to go to with questions regarding the wider purview of Moose. They help maintain not just the code but the community as well. See the list below under “AUTHORS”.

CONTRIBUTORS

Moose is a community project, and as such, involves the work of many, many members of the community beyond just the members in the cabal. In particular:

Dave (autarch) Rolsky wrote most of the documentation in Moose::Manual.

John (jgoulah) Goulah wrote Moose::Cookbook::Snack::Keywords.

Jess (castaway) Robinson wrote Moose::Cookbook::Snack::Types.

Aran (bluefeet) Clary Deltac wrote Moose::Cookbook::Basics::Genome_OverloadingSubtypesAndCoercion.

Anders (Debolaz) Nor Berle contributed Test::Moose and Moose::Util.

Also, the code in Moose::Meta::Attribute::Native is based on code from the MooseX::AttributeHelpers distribution, which had contributions from:

Chris (perigrin) Prather

Cory (gphat) Watson

Evan Carroll

Florian (rafl) Ragwitz

Jason May

Jay Hannah

Jesse (doy) Luehrs

Paul (frodwith) Driver

Robert (rlb3) Boone

Robert Buels

Robert (phaylon) Sedlacek

Shawn (Sartak) Moore

Stevan Little

Tom (dec) Lanyon

Yuval Kogman

Finally, these people also contributed various tests, bug fixes, documentation, and features to the Moose codebase:

Aankhen

Adam (Alias) Kennedy

Christian (chansen) Hansen

Cory (gphat) Watson

Dylan Hardison (doc fixes)

Eric (ewilhelm) Wilhelm

Evan Carroll

Guillermo (groditi) Roditi

Jason May

Jay Hannah

Jonathan (jrockway) Rockway

Matt (mst) Trout

Nathan (kolibrie) Gray

Paul (frodwith) Driver

Piotr (dexter) Roszatycki

Robert Buels

Robert (phaylon) Sedlacek

Robert (rlb3) Boone

Sam (mugwump) Vilain

Scott (konobi) McWhirter

Shlomi (rindolf) Fish

Tom (dec) Lanyon

Wallace (wreis) Reis

… and many other #moose folks

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2153 - Linux cli command setrpcent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setrpcent and provides detailed information about the command setrpcent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setrpcent.

NAME 🖥️ setrpcent 🖥️

get RPC entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
struct rpcent *getrpcent(void);
struct rpcent *getrpcbyname(const char *name);
struct rpcent *getrpcbynumber(int number);
void setrpcent(int stayopen);
void endrpcent(void);

DESCRIPTION

The getrpcent(), getrpcbyname(), and getrpcbynumber() functions each return a pointer to an object with the following structure containing the broken-out fields of an entry in the RPC program number data base.

struct rpcent {
    char  *r_name;     /* name of server for this RPC program */
    char **r_aliases;  /* alias list */
    long   r_number;   /* RPC program number */
};

The members of this structure are:

r_name
The name of the server for this RPC program.

r_aliases
A NULL-terminated list of alternate names for the RPC program.

r_number
The RPC program number for this service.

The getrpcent() function reads the next entry from the database. A connection is opened to the database if necessary.

The setrpcent() function opens a connection to the database, and sets the next entry to the first entry. If stayopen is nonzero, then the connection to the database will not be closed between calls to one of the getrpc*() functions.

The endrpcent() function closes the connection to the database.

The getrpcbyname() and getrpcbynumber() functions sequentially search from the beginning of the file until a matching RPC program name or program number is found, or until end-of-file is encountered.

RETURN VALUE

On success, getrpcent(), getrpcbyname(), and getrpcbynumber() return a pointer to a statically allocated rpcent structure. NULL is returned on EOF or error.

FILES

/etc/rpc
RPC program number database.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getrpcent(), getrpcbyname(), getrpcbynumber()

Thread safetyMT-Unsafe

setrpcent(), endrpcent()

Thread safetyMT-Safe locale

STANDARDS

BSD.

HISTORY

BSD, Solaris.

BUGS

All information is contained in a static area so it must be copied if it is to be saved.

SEE ALSO

getrpcent_r(3), rpc(5), rpcinfo(8), ypserv(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2154 - Linux cli command Net_Server_Proto_UNIXDGRAMpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Server_Proto_UNIXDGRAMpm and provides detailed information about the command Net_Server_Proto_UNIXDGRAMpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Server_Proto_UNIXDGRAMpm.

NAME 🖥️ Net_Server_Proto_UNIXDGRAMpm 🖥️

Net::Server UNIXDGRAM protocol.

SYNOPSIS

See Net::Server::Proto.

DESCRIPTION

Protocol module for Net::Server. This module implements the UNIX SOCK_DGRAM socket type. See Net::Server::Proto.

Any sockets created during startup will be chown’ed to the user and group specified in the startup arguments.

PARAMETERS

The following parameters may be specified in addition to normal command line parameters for a Net::Server. See Net::Server for more information on reading arguments.

udp_recv_len
Specifies the number of bytes to read from the SOCK_DGRAM connection handle. Data will be read into $self->{‘server’}->{‘udp_data’}. Default is 4096. See IO::Socket::INET and recv.

udp_recv_flags
See recv. Default is 0.

QUICK PARAMETER LIST

Key Value Default ## UNIXDGRAM socket parameters udp_recv_len \d+ 4096 udp_recv_flags \d+ 0

LICENCE

Distributed under the same terms as Net::Server

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2155 - Linux cli command pcap_statspcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_statspcap and provides detailed information about the command pcap_statspcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_statspcap.

NAME 🖥️ pcap_statspcap 🖥️

get capture statistics

SYNOPSIS

#include <pcap/pcap.h>
int pcap_stats(pcap_t *p, struct pcap_stat *ps);

DESCRIPTION

pcap_stats() fills in the struct pcap_stat pointed to by its second argument. The values represent packet statistics from the start of the run to the time of the call.

pcap_stats() is supported only on live captures, not on ``savefiles’’; no statistics are stored in ``savefiles’’, so no statistics are available when reading from a ``savefile’'.

A struct pcap_stat has the following members:

ps_recv
number of packets received;

ps_drop
number of packets dropped because there was no room in the operating system’s buffer when they arrived, because packets weren’t being read fast enough;

ps_ifdrop
number of packets dropped by the network interface or its driver.

The statistics do not behave the same way on all platforms. ps_recv might count packets whether they passed any filter set with pcap_setfilter(3PCAP) or not, or it might count only packets that pass the filter. It also might, or might not, count packets dropped because there was no room in the operating system’s buffer when they arrived. ps_drop is not available on all platforms; it is zero on platforms where it’s not available. If packet filtering is done in libpcap, rather than in the operating system, it would count packets that don’t pass the filter. Both ps_recv and ps_drop might, or might not, count packets not yet read from the operating system and thus not yet seen by the application. ps_ifdrop might, or might not, be implemented; if it’s zero, that might mean that no packets were dropped by the interface, or it might mean that the statistic is unavailable, so it should not be treated as an indication that the interface did not drop any packets.

RETURN VALUE

pcap_stats() returns 0 on success, PCAP_ERROR_NOT_ACTIVATED if called on a capture handle that has been created but not activated, or PCAP_ERROR if there is another error or if p doesn’t support packet statistics. If PCAP_ERROR is returned, pcap_geterr(3PCAP) or pcap_perror(3PCAP) may be called with p as an argument to fetch or display the error text.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2156 - Linux cli command Tk_Dialogpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Dialogpm and provides detailed information about the command Tk_Dialogpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Dialogpm.

NAME 🖥️ Tk_Dialogpm 🖥️

Create modal dialog and wait for a response.

SYNOPSIS

$dialog = $parent->Dialog(-option => value, … );

DESCRIPTION

This procedure is part of the Tk script library - its arguments describe a dialog box. After creating a dialog box, Dialog waits for the user to select one of the Buttons either by clicking on the Button with the mouse or by typing return to invoke the default Button (if any). Then it returns the text string of the selected Button.

While waiting for the user to respond, Dialog sets a local grab. This prevents the user from interacting with the application in any way except to invoke the dialog box. See the Show() method.

OPTIONS

The following option/value pairs are supported:

-title: Text to appear in the window manager’s title bar for the dialog.

-text
Message to appear in the top portion of the Dialog.

-bitmap
If non-empty, specifies a bitmap to display in the top portion of the Dialog, to the left of the text. If this is an empty string then no bitmap is displayed in the Dialog.

-default_button
Text label string of the Button that displays the default ring.

-buttons
A reference to a list of Button label strings. Each string specifies text to display in a Button, in order from left to right.

METHODS

$answer = $dialog->Show(?-global?);
This method displays the Dialog, waits for the user’s response, and stores the text string of the selected Button in $answer. If -global is specified a global (rather than local) grab is performed. The actual Dialog is shown using the Popup method. Any other options supplied to Show are passed to Popup, and can be used to position the Dialog on the screen. Please read Tk::Popup for details.

ADVERTISED WIDGETS

Because Tk::Dialog is a subclass of Tk::DialogBox it inherits all the advertised subwidgets of its superclass: e.g. “B_button-text”, where ‘button-text’ is a Button’s -text value. Additionally, Tk::Dialog advertises:

message
The dialog’s Label widget containing the message text.

bitmap
The dialog’s Label widget containing the bitmap image.

EXAMPLE

$dialog = $mw->Dialog(-text => ‘Save File?’, -bitmap => ‘question’, -title => ‘Save File Dialog’, -default_button => ‘Yes’, -buttons => [qw/Yes No Cancel/);

KEYWORDS

bitmap, dialog, modal, messageBox

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2157 - Linux cli command ftrylockfile

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ftrylockfile and provides detailed information about the command ftrylockfile, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ftrylockfile.

NAME 🖥️ ftrylockfile 🖥️

lock FILE for stdio

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
void flockfile(FILE *filehandle);
int ftrylockfile(FILE *filehandle);
void funlockfile(FILE *filehandle);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    /* Since glibc 2.24: */ _POSIX_C_SOURCE >= 199309L
        || /* glibc <= 2.23: */ _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The stdio functions are thread-safe. This is achieved by assigning to each FILE object a lockcount and (if the lockcount is nonzero) an owning thread. For each library call, these functions wait until the FILE object is no longer locked by a different thread, then lock it, do the requested I/O, and unlock the object again.

(Note: this locking has nothing to do with the file locking done by functions like flock(2) and lockf(3).)

All this is invisible to the C-programmer, but there may be two reasons to wish for more detailed control. On the one hand, maybe a series of I/O actions by one thread belongs together, and should not be interrupted by the I/O of some other thread. On the other hand, maybe the locking overhead should be avoided for greater efficiency.

To this end, a thread can explicitly lock the FILE object, then do its series of I/O actions, then unlock. This prevents other threads from coming in between. If the reason for doing this was to achieve greater efficiency, one does the I/O with the nonlocking versions of the stdio functions: with getc_unlocked(3) and putc_unlocked(3) instead of getc(3) and putc(3).

The flockfile() function waits for *filehandle to be no longer locked by a different thread, then makes the current thread owner of *filehandle, and increments the lockcount.

The funlockfile() function decrements the lock count.

The ftrylockfile() function is a nonblocking version of flockfile(). It does nothing in case some other thread owns *filehandle, and it obtains ownership and increments the lockcount otherwise.

RETURN VALUE

The ftrylockfile() function returns zero for success (the lock was obtained), and nonzero for failure.

ERRORS

None.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

flockfile(), ftrylockfile(), funlockfile()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

These functions are available when _POSIX_THREAD_SAFE_FUNCTIONS is defined.

SEE ALSO

unlocked_stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2158 - Linux cli command llabs

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command llabs and provides detailed information about the command llabs, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the llabs.

NAME 🖥️ llabs 🖥️

compute the absolute value of an integer

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int abs(int j);
long labs(long j);
long long llabs(long long j);
#include <inttypes.h>
intmax_t imaxabs(intmax_t j);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

llabs():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The abs() function computes the absolute value of the integer argument j. The labs(), llabs(), and imaxabs() functions compute the absolute value of the argument j of the appropriate integer type for the function.

RETURN VALUE

Returns the absolute value of the integer argument, of the appropriate integer type for the function.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

abs(), labs(), llabs(), imaxabs()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99, SVr4, 4.3BSD.

C89 only includes the abs() and labs() functions; the functions llabs() and imaxabs() were added in C99.

NOTES

Trying to take the absolute value of the most negative integer is not defined.

The llabs() function is included since glibc 2.0. The imaxabs() function is included since glibc 2.1.1.

For llabs() to be declared, it may be necessary to define _ISOC99_SOURCE or _ISOC9X_SOURCE (depending on the version of glibc) before including any standard headers.

By default, GCC handles abs(), labs(), and (since GCC 3.0) llabs() and imaxabs() as built-in functions.

SEE ALSO

cabs(3), ceil(3), fabs(3), floor(3), rint(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2159 - Linux cli command xdr_double

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_double and provides detailed information about the command xdr_double, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_double.

NAME 🖥️ xdr_double 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2160 - Linux cli command XtRemoveCallback

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtRemoveCallback and provides detailed information about the command XtRemoveCallback, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtRemoveCallback.

NAME 🖥️ XtRemoveCallback 🖥️

add and remove callback procedures

SYNTAX

#include <X11/Intrinsic.h>

void XtAddCallback(Widget w, const char *callback_name, XtCallbackProc callback, XtPointer client_data);

void XtAddCallbacks(Widget w, const char *callback_name, XtCallbackList callbacks);

void XtRemoveCallback(Widget w, const char *callback_name, XtCallbackProc callback, XtPointer client_data);

void XtRemoveCallbacks(Widget w, const char *callback_name, XtCallbackList callbacks);

void XtRemoveAllCallbacks(Widget w, const char *callback_name);

ARGUMENTS

callback
Specifies the callback procedure.

callbacks
Specifies the null-terminated list of callback procedures and corresponding client data.

callback_name
Specifies the callback list to which the procedure is to be appended or deleted.

client_data
Specifies the argument that is to be passed to the specified procedure when it is invoked by XtCallbacks or NULL, or the client data to match on the registered callback procedures.

  1. Specifies the widget.

DESCRIPTION

The XtAddCallback function adds the specified callback procedure to the specified widget’s callback list.

The XtAddCallbacks add the specified list of callbacks to the specified widget’s callback list.

The XtRemoveCallback function removes a callback only if both the procedure and the client data match.

The XtRemoveCallbacks function removes the specified callback procedures from the specified widget’s callback list.

The XtRemoveAllCallbacks function removes all the callback procedures from the specified widget’s callback list.

SEE ALSO

XtCallCallbacks(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2161 - Linux cli command strftime

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strftime and provides detailed information about the command strftime, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strftime.

NAME 🖥️ strftime 🖥️

format date and time

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <time.h>
size_t strftime(char s[restrict .max], size_t max,
 const char *restrict format,
 const struct tm *restrict tm);
size_t strftime_l(char s[restrict .max], size_t max,
 const char *restrict format,
 const struct tm *restrict tm,
 locale_t locale);

DESCRIPTION

The strftime() function formats the broken-down time tm according to the format specification format and places the result in the character array s of size max. The broken-down time structure tm is defined in <time.h>. See also ctime(3).

The format specification is a null-terminated string and may contain special character sequences called conversion specifications, each of which is introduced by a ‘%’ character and terminated by some other character known as a conversion specifier character. All other character sequences are ordinary character sequences.

The characters of ordinary character sequences (including the null byte) are copied verbatim from format to s. However, the characters of conversion specifications are replaced as shown in the list below. In this list, the field(s) employed from the tm structure are also shown.

%a
The abbreviated name of the day of the week according to the current locale. (Calculated from tm_wday.) (The specific names used in the current locale can be obtained by calling nl_langinfo(3) with ABDAY_{17} as an argument.)

%A
The full name of the day of the week according to the current locale. (Calculated from tm_wday.) (The specific names used in the current locale can be obtained by calling nl_langinfo(3) with DAY_{17} as an argument.)

%b
The abbreviated month name according to the current locale. (Calculated from tm_mon.) (The specific names used in the current locale can be obtained by calling nl_langinfo(3) with ABMON_{112} as an argument.)

%B
The full month name according to the current locale. (Calculated from tm_mon.) (The specific names used in the current locale can be obtained by calling nl_langinfo(3) with MON_{112} as an argument.)

%c
The preferred date and time representation for the current locale. (The specific format used in the current locale can be obtained by calling nl_langinfo(3) with D_T_FMT as an argument for the %c conversion specification, and with ERA_D_T_FMT for the %Ec conversion specification.) (In the POSIX locale this is equivalent to %a %b %e %H:%M:%S %Y.)

%C
The century number (year/100) as a 2-digit integer. (SU) (The %EC conversion specification corresponds to the name of the era.) (Calculated from tm_year.)

%d
The day of the month as a decimal number (range 01 to 31). (Calculated from tm_mday.)

%D
Equivalent to %m/%d/%y. (Yecch—for Americans only. Americans should note that in other countries %d/%m/%y is rather common. This means that in international context this format is ambiguous and should not be used.) (SU)

%e
Like %d, the day of the month as a decimal number, but a leading zero is replaced by a space. (SU) (Calculated from tm_mday.)

%E
Modifier: use alternative (“era-based”) format, see below. (SU)

%F
Equivalent to %Y-%m-%d (the ISO 8601 date format). (C99)

%G
The ISO 8601 week-based year (see NOTES) with century as a decimal number. The 4-digit year corresponding to the ISO week number (see %V). This has the same format and value as %Y, except that if the ISO week number belongs to the previous or next year, that year is used instead. (TZ) (Calculated from tm_year, tm_yday, and tm_wday.)

%g
Like %G, but without century, that is, with a 2-digit year (00–99). (TZ) (Calculated from tm_year, tm_yday, and tm_wday.)

%h
Equivalent to %b. (SU)

%H
The hour as a decimal number using a 24-hour clock (range 00 to 23). (Calculated from tm_hour.)

%I
The hour as a decimal number using a 12-hour clock (range 01 to 12). (Calculated from tm_hour.)

%j
The day of the year as a decimal number (range 001 to 366). (Calculated from tm_yday.)

%k
The hour (24-hour clock) as a decimal number (range 0 to 23); single digits are preceded by a blank. (See also %H.) (Calculated from tm_hour.) (TZ)

%l
The hour (12-hour clock) as a decimal number (range 1 to 12); single digits are preceded by a blank. (See also %I.) (Calculated from tm_hour.) (TZ)

%m
The month as a decimal number (range 01 to 12). (Calculated from tm_mon.)

%M
The minute as a decimal number (range 00 to 59). (Calculated from tm_min.)

%n
A newline character. (SU)

%O
Modifier: use alternative numeric symbols, see below. (SU)

%p
Either “AM” or “PM” according to the given time value, or the corresponding strings for the current locale. Noon is treated as “PM” and midnight as “AM”. (Calculated from tm_hour.) (The specific string representations used for “AM” and “PM” in the current locale can be obtained by calling nl_langinfo(3) with AM_STR and PM_STR, respectively.)

%P
Like %p but in lowercase: “am” or “pm” or a corresponding string for the current locale. (Calculated from tm_hour.) (GNU)

%r
The time in a.m. or p.m. notation. (SU) (The specific format used in the current locale can be obtained by calling nl_langinfo(3) with T_FMT_AMPM as an argument.) (In the POSIX locale this is equivalent to %I:%M:%S %p.)

%R
The time in 24-hour notation (%H:%M). (SU) For a version including the seconds, see %T below.

%s
The number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). (TZ) (Calculated from mktime(tm).)

%S
The second as a decimal number (range 00 to 60). (The range is up to 60 to allow for occasional leap seconds.) (Calculated from tm_sec.)

%t
A tab character. (SU)

%T
The time in 24-hour notation (%H:%M:%S). (SU)

%u
The day of the week as a decimal, range 1 to 7, Monday being 1. See also %w. (Calculated from tm_wday.) (SU)

%U
The week number of the current year as a decimal number, range 00 to 53, starting with the first Sunday as the first day of week 01. See also %V and %W. (Calculated from tm_yday and tm_wday.)

%V
The ISO 8601 week number (see NOTES) of the current year as a decimal number, range 01 to 53, where week 1 is the first week that has at least 4 days in the new year. See also %U and %W. (Calculated from tm_year, tm_yday, and tm_wday.) (SU)

%w
The day of the week as a decimal, range 0 to 6, Sunday being 0. See also %u. (Calculated from tm_wday.)

%W
The week number of the current year as a decimal number, range 00 to 53, starting with the first Monday as the first day of week 01. (Calculated from tm_yday and tm_wday.)

%x
The preferred date representation for the current locale without the time. (The specific format used in the current locale can be obtained by calling nl_langinfo(3) with D_FMT as an argument for the %x conversion specification, and with ERA_D_FMT for the %Ex conversion specification.) (In the POSIX locale this is equivalent to %m/%d/%y.)

%X
The preferred time representation for the current locale without the date. (The specific format used in the current locale can be obtained by calling nl_langinfo(3) with T_FMT as an argument for the %X conversion specification, and with ERA_T_FMT for the %EX conversion specification.) (In the POSIX locale this is equivalent to %H:%M:%S.)

%y
The year as a decimal number without a century (range 00 to 99). (The %Ey conversion specification corresponds to the year since the beginning of the era denoted by the %EC conversion specification.) (Calculated from tm_year)

%Y
The year as a decimal number including the century. (The %EY conversion specification corresponds to the full alternative year representation.) (Calculated from tm_year)

%z
The +hhmm or -hhmm numeric timezone (that is, the hour and minute offset from UTC). (SU)

%Z
The timezone name or abbreviation.

%+
The date and time in date(1) format. (TZ) (Not supported in glibc2.)

%%
A literal ‘%’ character.

Some conversion specifications can be modified by preceding the conversion specifier character by the E or O modifier to indicate that an alternative format should be used. If the alternative format or specification does not exist for the current locale, the behavior will be as if the unmodified conversion specification were used. (SU) The Single UNIX Specification mentions %Ec, %EC, %Ex, %EX, %Ey, %EY, %Od, %Oe, %OH, %OI, %Om, %OM, %OS, %Ou, %OU, %OV, %Ow, %OW, %Oy, where the effect of the O modifier is to use alternative numeric symbols (say, roman numerals), and that of the E modifier is to use a locale-dependent alternative representation. The rules governing date representation with the E modifier can be obtained by supplying ERA as an argument to a nl_langinfo(3). One example of such alternative forms is the Japanese era calendar scheme in the ja_JP glibc locale.

strftime_l() is equivalent to strftime(), except it uses the specified locale instead of the current locale. The behaviour is undefined if locale is invalid or LC_GLOBAL_LOCALE.

RETURN VALUE

Provided that the result string, including the terminating null byte, does not exceed max bytes, strftime() returns the number of bytes (excluding the terminating null byte) placed in the array s. If the length of the result string (including the terminating null byte) would exceed max bytes, then strftime() returns 0, and the contents of the array are undefined.

Note that the return value 0 does not necessarily indicate an error. For example, in many locales %p yields an empty string. An empty format string will likewise yield an empty string.

ENVIRONMENT

The environment variables TZ and LC_TIME are used.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strftime(), strftime_l()

Thread safetyMT-Safe env locale

STANDARDS

strftime()
C11, POSIX.1-2008.

strftime_l()
POSIX.1-2008.

HISTORY

strftime()
SVr4, C89.

strftime_l()
POSIX.1-2008.

There are strict inclusions between the set of conversions given in ANSI C (unmarked), those given in the Single UNIX Specification (marked SU), those given in Olson’s timezone package (marked TZ), and those given in glibc (marked GNU), except that %+ is not supported in glibc2. On the other hand glibc2 has several more extensions. POSIX.1 only refers to ANSI C; POSIX.2 describes under date(1) several extensions that could apply to strftime() as well. The %F conversion is in C99 and POSIX.1-2001.

In SUSv2, the %S specifier allowed a range of 00 to 61, to allow for the theoretical possibility of a minute that included a double leap second (there never has been such a minute).

NOTES

ISO 8601 week dates

%G, %g, and %V yield values calculated from the week-based year defined by the ISO 8601 standard. In this system, weeks start on a Monday, and are numbered from 01, for the first week, up to 52 or 53, for the last week. Week 1 is the first week where four or more days fall within the new year (or, synonymously, week 01 is: the first week of the year that contains a Thursday; or, the week that has 4 January in it). When three or fewer days of the first calendar week of the new year fall within that year, then the ISO 8601 week-based system counts those days as part of week 52 or 53 of the preceding year. For example, 1 January 2010 is a Friday, meaning that just three days of that calendar week fall in 2010. Thus, the ISO 8601 week-based system considers these days to be part of week 53 (%V) of the year 2009 (%G); week 01 of ISO 8601 year 2010 starts on Monday, 4 January 2010. Similarly, the first two days of January 2011 are considered to be part of week 52 of the year 2010.

glibc notes

glibc provides some extensions for conversion specifications. (These extensions are not specified in POSIX.1-2001, but a few other systems provide similar features.) Between the ‘%’ character and the conversion specifier character, an optional flag and field width may be specified. (These precede the E or O modifiers, if present.)

The following flag characters are permitted:

_
(underscore) Pad a numeric result string with spaces.

-
(dash) Do not pad a numeric result string.

0
Pad a numeric result string with zeros even if the conversion specifier character uses space-padding by default.

^
Convert alphabetic characters in result string to uppercase.

#
Swap the case of the result string. (This flag works only with certain conversion specifier characters, and of these, it is only really useful with %Z.)

An optional decimal width specifier may follow the (possibly absent) flag. If the natural size of the field is smaller than this width, then the result string is padded (on the left) to the specified width.

BUGS

If the output string would exceed max bytes, errno is not set. This makes it impossible to distinguish this error case from cases where the format string legitimately produces a zero-length output string. POSIX.1-2001 does not specify any errno settings for strftime().

Some buggy versions of gcc(1) complain about the use of %c: warning: `%c’ yields only last 2 digits of year in some locales. Of course programmers are encouraged to use %c, as it gives the preferred date and time representation. One meets all kinds of strange obfuscations to circumvent this gcc(1) problem. A relatively clean one is to add an intermediate function

size_t
my_strftime(char *s, size_t max, const char *fmt,
            const struct tm *tm)
{
    return strftime(s, max, fmt, tm);
}

Nowadays, gcc(1) provides the -Wno-format-y2k option to prevent the warning, so that the above workaround is no longer required.

EXAMPLES

RFC 2822-compliant date format (with an English locale for %a and %b)

"%a, %d %b %Y %T %z"

RFC 822-compliant date format (with an English locale for %a and %b)

"%a, %d %b %y %T %z"

Example program

The program below can be used to experiment with strftime().

Some examples of the result string produced by the glibc implementation of strftime() are as follows:

$ ./a.out '%m'
Result string is "11"
$ ./a.out '%5m'
Result string is "00011"
$ ./a.out '%_5m'
Result string is "   11"

Program source

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int
main(int argc, char *argv[])
{
    char outstr[200];
    time_t t;
    struct tm *tmp;
    t = time(NULL);
    tmp = localtime(&t);
    if (tmp == NULL) {
        perror("localtime");
        exit(EXIT_FAILURE);
    }
    if (strftime(outstr, sizeof(outstr), argv[1], tmp) == 0) {
        fprintf(stderr, "strftime returned 0");
        exit(EXIT_FAILURE);
    }
    printf("Result string is \"%s\"

“, outstr); exit(EXIT_SUCCESS); }

SEE ALSO

date(1), time(2), ctime(3), nl_langinfo(3), setlocale(3), sprintf(3), strptime(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2162 - Linux cli command Tk_DialogBoxpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_DialogBoxpm and provides detailed information about the command Tk_DialogBoxpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_DialogBoxpm.

NAME 🖥️ Tk_DialogBoxpm 🖥️

create and manipulate a dialog screen.

SYNOPSIS

use Tk::DialogBox … $d = $top->DialogBox(-title => “Title”, -buttons => [“OK”, “Cancel”]); $w = $d->add(Widget, args)->pack; … $button = $d->Show;

DESCRIPTION

DialogBox is very similar to Dialog except that it allows any widget in the top Frame. DialogBox creates two Frames, top and bottom. The bottom Frame shows all the specified Buttons, lined up from left to right. The top Frame acts as a container for all other widgets that can be added with the add() method.

OPTIONS

The options recognized by DialogBox are as follows:

-title: Specify the title of the DialogBox. If this is not set, then the name of the program is used.

-buttons
The button names to display in the bottom Frame. This is a reference to an array of strings containing the text to put on each Button. There is no default value for this. If you do not specify any button names, no Buttons are displayed.

-default_button
Specifies the default Button that is considered invoked when user presses <Return> on the DialogBox. This Button is highlighted. If no default Button is specified, then the first element of the array whose reference is passed to the -buttons option is used as the default.

-cancel_button
Specifies the Button that is considered invoked when the user closes the DialogBox using the window manager’s close button. If the -cancel_button option is not given, and if there’s only one button configured, then this button is also used as the cancel button. Otherwise no button is considered as the cancel button; in such a case Show just returns undef when the user closes the DialogBox.

-command
A callback which is executed after invoking an action to close the DialogBox, but before restoring focus and grab information. The selected button is passed as the first argument.

-focus
Specify the widget to receive the initial focus after popping up the DialogBox. By default the -default_button widget receives the initial focus.

-showcommand
A callback which is executed before displaying the DialogBox and waiting for user input. The DialogBox itself is passed as the first argument.

METHODS

DialogBox supports only two methods as of now:

add(widget, options)
Add the widget indicated by widget. Widget can be the name of any Tk widget (standard or contributed). options are the options that the widget accepts. The widget is advertized as a subwidget of DialogBox. The name of widget is lower-cased and used as the advertised name. If multiple instances of widget are created in the DialogBox, then only the last one gets the advertised name. add() does not automatically pack() or grid() widget into the DialogBox.

Show(?-global?)
Displays the Dialog until the user invokes one of the Buttons in the bottom Frame. If the grab type -global is specified, then Show uses that grab; otherwise it defaults to a local grab. Returns the name of the Button invoked. The actual Dialog is shown using the Popup method. Any other options supplied to Show are passed to Popup, and can be used to position the Dialog on the screen. Please read Tk::Popup for details.

Exit()
Close the dialogbox, by emulating a click on the default button.

ADVERTISED WIDGETS

top
The subwidget reference to the top half of the DialogBox widget, the Frame containing widgets added by the add method.

bottom
The subwidget reference to the bottom half of the DialogBox widget, the Frame containing the Button widgets.

B_“button-text”
Individual subwidget references to the Buttons in the DialogBox widget. The subwidget name is the string B_ concatenated with the Button’s -text value.

BUGS

There is no way of removing a widget once it has been added to the top Frame, unless you access the top subwidget and go through the child widgets.

There is no control over the appearance of the Buttons in the bottom Frame nor is there any way to control the placement of the two Frames with respect to each other.

AUTHOR

Rajappa Iyer [email protected]

This code is distributed under the same terms as Perl.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2163 - Linux cli command uid_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command uid_ttype and provides detailed information about the command uid_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the uid_ttype.

NAME 🖥️ uid_ttype 🖥️

process/user/group identifier

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/types.h>
typedef /* ... */ pid_t;
typedef /* ... */ uid_t;
typedef /* ... */ gid_t;
typedef /* ... */ id_t;

DESCRIPTION

pid_t is a type used for storing process IDs, process group IDs, and session IDs. It is a signed integer type.

uid_t is a type used to hold user IDs. It is an integer type.

gid_t is a type used to hold group IDs. It is an integer type.

id_t is a type used to hold a general identifier. It is an integer type that can be used to contain a pid_t, uid_t, or gid_t.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

The following headers also provide pid_t: <fcntl.h>, <sched.h>, <signal.h>, <spawn.h>, <sys/msg.h>, <sys/sem.h>, <sys/shm.h>, <sys/wait.h>, <termios.h>, <time.h>, <unistd.h>, and <utmpx.h>.

The following headers also provide uid_t: <pwd.h>, <signal.h>, <stropts.h>, <sys/ipc.h>, <sys/stat.h>, and <unistd.h>.

The following headers also provide gid_t: <grp.h>, <pwd.h>, <signal.h>, <stropts.h>, <sys/ipc.h>, <sys/stat.h>, and <unistd.h>.

The following header also provides id_t: <sys/resource.h>.

SEE ALSO

chown(2), fork(2), getegid(2), geteuid(2), getgid(2), getgroups(2), getpgid(2), getpid(2), getppid(2), getpriority(2), getpwnam(3), getresgid(2), getresuid(2), getsid(2), gettid(2), getuid(2), kill(2), pidfd_open(2), sched_setscheduler(2), waitid(2), getgrnam(3), sigqueue(3), credentials(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2164 - Linux cli command ispunct

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ispunct and provides detailed information about the command ispunct, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ispunct.

NAME 🖥️ ispunct 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2165 - Linux cli command perl-tkpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command perl-tkpm and provides detailed information about the command perl-tkpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the perl-tkpm.

NAME 🖥️ perl-tkpm 🖥️

Writing Tk applications in Perl 5

DESCRIPTION

This document is for beginners. It assumes you know some Perl, and have it and Tk running. If you are not currently reading this document courtesy of the widget demonstration program, please be sure to run widget, as it will show you the various widget types supported by Tk and how to use them. widget should be installed in your default path, so type widget at a command prompt.

Here are links to other novice tutorials:

<http://www.lehigh.edu/~sol0/ptk/tpj1.html> <http://www.lehigh.edu/~sol0/ptk/perlmonth01/pm1.html>

Mastering Perl/Tk is the definitive book on Perl/Tk:

<http://www.oreilly.com/catalog/mastperltk>

Some Background

Tk GUI programming is event-driven. (This may already be familiar to you.) In event-driven programs, the main GUI loop is outside of the user program and inside the GUI library. This loop - initiated by calling MainLoop - watches all events of interest and activates the correct handler procedures to handle these events. Some of these handler procedures may be user-supplied; others will be part of the library.

For a programmer, this means that you’re not watching what is happening; instead, you are requested by the toolkit to perform actions whenever necessary. So, you’re not watching for ‘raise window / close window / redraw window’ requests, but you tell the toolkit which routine will handle such cases, and the toolkit will call the procedures when required. These procedures are known as callbacks, and some of them you write yourself.

First Requirements

Perl programs that use Tk need to include use Tk. A program should also use use strict and the -w switch to ensure the program is working without common errors.

Any Perl/Tk application starts by creating the Tk MainWindow. You then create items inside the MainWindow, and/or create new windows called Toplevels that also contain child items, before starting the MainLoop, which is the last logical statment in your program. You can also create more items and windows while you’re running, using callbacks. Items are only shown on the display after they have been arranged by a geometry manager like pack; more information on this later. MainLoop starts the GUI and handle all events. That’s all there is to it! A trivial one-window example is shown below:

#!/usr/bin/perl -w use Tk; use strict; my $mw = MainWindow->new; $mw->Label(-text => Hello, world!)->pack; $mw->Button( -text => Quit, -command => sub { exit }, )->pack; MainLoop;

Please run this example. It shows you two widget types, a Label and a Button, and how they are packed. When clicked, the Button widget invokes the callback specified by the -command option. Finally, note the typical Tk style using -option => value pairs.

Widget creation

Tk windows and widgets are hierarchical, i.e. one window includes one or more other windows. You create the first Tk window using MainWindow->new. This returns a window handle, assigned to $mw in the example above. Keep track of the main handle, commonly called a widget reference.

You can use any Tk handle to create child widgets within the window (or widget). This is done by calling the Tk constructor method on the variable. In the example above, the Label method called from $mw creates a Label widget inside the MainWindow. In the constructor call, you can specify various options; you can later add or change options for any widget using the configure method, which takes the same parameters as the constructor. The one exception to the hierarchical structure is the Toplevel constructor, which creates a new outermost window.

After you create any widget (other than the MainWindow or Toplevels, you must render it by calling pack. (This is not entirely true; more later)). If you do not need to refer to the widget after construction and packing, call pack off the constructor results, as shown for the Label and Button in the example above. Note that the result of the compound call is the result of pack, which is a valid Tk handle.

Windows and widgets are deleted by calling destroy on them; this will delete and un-draw the widget and all its children.

Standard Tk widgets

Here is an itemize of the standard Tk widget set.

Button

Canvas

Checkbutton

Entry

Frame

Label

Labelframe

Listbox

Menu

Menubutton

Message

Panedwindow

Radiobutton

Scale

Scrollbar

Spinbox

Text

Toplevel

Perl/Tk provides an equal number of new widgets, above and beyond this core set.

Adjuster

Balloon

BrowseEntry

ColorEditor

Dialog

DialogBox

DirTree

ErrorDialog

FBox

FileSelect

HList

LabEntry

LabFrame

NoteBook

Optionmenu

Pane

ProgressBar

ROText

Table

TextUndo

Tiler

TList

Tree

Variables and callback routines

Most graphical interfaces are used to set up a set of values and conditions, and then perform the appropriate action. The Tk toolkit is different from your average text-based prompting or menu driven system in that you do not collect settings yourself, and decide on an action based on an input code; instead, you leave these values to your toolkit and only get them when the action is performed.

So, where a traditional text-based system would look like this:

#!/usr/bin/perl -w use strict; print “Please type a font name “; my $font = <>; chomp $font; # Validate font print “Please type a file name “; my $filename = <>; chomp $filename; # Validate filename print “Type <1> to fax, <2> to print “; my $option = <>; chomp $option; if ($option eq 1) { print “Faxing $filename in font $font “; } elsif ($option eq 2) { print “Now sending $filename to printer in font $font “; }

The slightly larger example below shows how to do this in Tk. Note the use of callbacks. Note, also, that Tk handles the values, and the subroutine uses the method get to get at the values. If a user changes his mind and wants to change the font again, the application never notices; it’s all handled by Tk.

#!/usr/bin/perl -w use Tk; use strict; my $mw = MainWindow->new; $mw->Label(-text => File Name)->pack; my $filename = $mw->Entry(-width => 20); $filename->pack; $mw->Label(-text => Font Name)->pack; my $font = $mw->Entry(-width => 10); $font->pack; $mw->Button( -text => Fax, -command => sub{do_fax($filename, $font)} )->pack; $mw->Button( -text => Print, -command => sub{do_print($filename, $font)} )->pack; MainLoop; sub do_fax { my ($file, $font) = @_; my $file_val = $file->get; my $font_val = $font->get; print “Now faxing $file_val in font $font_val “; } sub do_print { my ($file, $font) = @_; my $file_val = $file->get; my $font_val = $font->get; print “Sending file $file_val to printer in font $font_val “; }

The packer - grouping with Frame widgets

In the examples above, you must have noticed the pack calls. This is one of the more complicated parts of Tk. The basic idea is that any window or widget should be subject to a Tk geometry manager; the packer is one of the placement managers, and grid is another.

The actions of the packer are rather simple: when applied to a widget, the packer positions that widget on the indicated position within the remaining space in its parent. By default, the position is on top; this means the next items will be put below. You can also specify the left, right, or bottom positions. Specify position using -side => ‘right’.

Additional packing parameters specify the behavior of the widget when there is some space left in the Frame or when the window size is increased. If widgets should maintain a fixed size, specify nothing; this is the default. For widgets that you want to fill up the current horizontal and/or vertical space, specify -fill => ‘x’, ‘y’, or ‘both’; for widgets that should grow, specify -expand => 1. These parameters are not shown in the example below; see the widget demonstration.

If you want to group some items within a window that have a different packing order than others, you can include them in a Frame. This is a do-nothing window type that is meant for packing or filling (and to play games with borders and colors).

The example below shows the use of pack and Frames:

#!/usr/bin/perl -w use Tk; use strict; # Take top and the bottom - now implicit top is in the middle my $mw = MainWindow->new; $mw->title( The MainWindow ); $mw->Label(-text => At the top (default))->pack; $mw->Label(-text => At the bottom)->pack(-side => bottom); $mw->Label(-text => The middle remains)->pack; # Since left and right are taken, bottom will not work… my $top1 = $mw->Toplevel; $top1->title( Toplevel 1 ); $top1->Label(-text => Left)->pack(-side => left); $top1->Label(-text => Right)->pack(-side => right); $top1->Label(-text => ?Bottom?)->pack(-side => bottom); # But when you use Frames, things work quite alright my $top2 = $mw->Toplevel; $top2->title( Toplevel 2 ); my $frame = $top2->Frame; $frame->pack; $frame->Label(-text => Left2)->pack(-side => left); $frame->Label(-text => Right2)->pack(-side => right); $top2->Label(-text => Bottom2)->pack(-side => bottom); MainLoop;

More than one window

Most real applications require more than one window. As you just saw, you can create more outermost windows by using a Toplevel widget. Each window is independent; destroying a Toplevel window does not affect the others as long as they are not a child of the closed Toplevel. However, exiting the MainWindow will destroy all remaining Toplevel widgets and end the application. The example below shows a trivial three-window application:

#!/usr/bin/perl -w use Tk; use strict; my $mw = MainWindow->new; fill_window($mw, Main); my $top1 = $mw->Toplevel; fill_window($top1, First top-level); my $top2 = $mw->Toplevel; fill_window($top2, Second top-level); MainLoop; sub fill_window { my ($window, $header) = @_; $window->Label(-text => $header)->pack; $window->Button( -text => close, -command => [$window => destroy] )->pack(-side => left); $window->Button( -text => exit, -command => [$mw => destroy] )->pack(-side => right); }

More callbacks

So far, all callback routines shown called a user procedure. You can also have a callback routine call another Tk routine. This is the way that scroll bars are implemented: scroll-bars can call a Tk item or a user procedure, whenever their position has changed. The Tk item that has a scrollbar attached calls the scrollbar when its size or offset has changed. In this way, the items are linked. You can still ask a scrollbar’s position, or set it by hand - but the defaults will be taken care of.

The example below shows a Listbox with a scroll bar. Moving the scrollbar moves the Listbox. Scanning a Listbox (dragging an item with the left mouse button) moves the scrollbar.

#!/usr/bin/perl -w use Tk; use strict; my $mw = MainWindow->new; my $box = $mw->Listbox( -relief => sunken, -height => 5, -setgrid => 1, ); my @items = qw(One Two Three Four Five Six Seven Eight Nine Ten Eleven Twelve); foreach (@items) { $box->insert(end, $_); } my $scroll = $mw->Scrollbar(-command => [yview, $box]); $box->configure(-yscrollcommand => [set, $scroll]); $box->pack(-side => left, -fill => both, -expand => 1); $scroll->pack(-side => right, -fill => y); MainLoop;

Note that there’s a convenience method Scrolled which helps constructing widgets with automatically managed scrollbars.

Canvases and tags

One of the most powerful widgets in Tk is the Canvas window. In a Canvas window, you can draw simple graphics and include other widgets. The Canvas area may be larger than the visible window, and may then be scrolled. Any item you draw on the canvas has its own id, and may optionally have one or more tags. You may refer to any item by its id, and may refer to any group of items by a common tag; you can move, delete, or change groups of items using these tags, and you can bind actions to tags. For a properly designed (often structured) Canvas, you can specify powerful actions quite simply.

In the example below, actions are bound to circles (single click) and blue items (double-click); obviously, this can be extended to any tag or group of tags.

#!/usr/bin/perl -w use Tk; use strict; # Create B<MainWindow> and canvas my $mw = MainWindow->new; my $canvas = $mw->Canvas; $canvas->pack(-expand => 1, -fill => both); # Create various items create_item($canvas, 1, 1, circle, blue, Jane); create_item($canvas, 4, 4, circle, red, Peter); create_item($canvas, 4, 1, square, blue, James); create_item($canvas, 1, 4, square, red, Patricia); # Single-clicking with left on a circle item invokes a procedure $canvas->bind(circle, <1> => sub {handle_circle($canvas)}); # Double-clicking with left on a blue item invokes a procedure $canvas->bind(blue, <Double-1> => sub {handle_blue($canvas)}); MainLoop; # Create an item; use parameters as tags (this is not a default!) sub create_item { my ($can, $x, $y, $form, $color, $name) = @_; my $x2 = $x + 1; my $y2 = $y + 1; my $kind; $kind = oval if ($form eq circle); $kind = rectangle if ($form eq square); $can->create( ($kind, “$x” . c, “$y” . c, “$x2” . c, “$y2” . c), -tags => [$form, $color, $name], -fill => $color); } # This gets the real name (not current, blue/red, square/circle) # Note: youll want to return a list in realistic situations… sub get_name { my ($can) = @_; my $item = $can->find(withtag, current); my @taglist = $can->gettags($item); my $name; foreach (@taglist) { next if ($_ eq current); next if ($_ eq red or $_ eq blue); next if ($_ eq square or $_ eq circle); $name = $_; last; } return $name; } sub handle_circle { my ($can) = @_; my $name = get_name($can); print “Action on circle $name… “; } sub handle_blue { my ($can) = @_; my $name = get_name($can); print “Action on blue item $name… “; }

Perl/Tk and Unicode

Perl/Tk follows Perl’s model of handling Unicode. That is, if a string is correctly flagged as a “character” string in the sense like described in “TERMINOLOGY” in Encode, then Perl/Tk will very probably display and handle this string correctly.

Note that every variable which is passed somehow into a Perl/Tk method will be implicitely changed into an internally utf8-flagged variable. Semantically nothing changes, as the series of codepoints stays the same, but things will change when variables with high-bit iso-8859-1 characters will be passed to the “outer” world. In this case you have to explicitly mark the encoding of your output stream if using IO, or encode the variables using Encode for other style of communication.

This is the theory, now some examples.

If you use non-iso-8859-1 characters in the source code, then use either the use utf8; or use encoding encodingname pragma:

use utf8; use Tk; my $x = “some characters using utf8 encoding”; tkinit->Label(-text => $x)->pack; MainLoop;

For data that comes from a file you have to specify the encoding unless it’s encoded as ascii or iso-8559-1:

use Tk; open my $FH, “<:encoding(utf-8)”, “filename” or die $!; # or for utf-16 data: open my $FH, “<:encoding(utf-16)”, “filename” or die $!; my $data = <$FH>; tkinit->Label(-text => $data)->pack; MainLoop;

Likewise, the encoding must be specified for all data which is read from Tk widgets and that shall be output into a file. For the output, the encoding should be always specified, even if it is iso-8859-1:

use Tk; $mw = tkinit; $mw->Entry(-textvariable => \input)->pack; $mw->Button( -text => “Write to file”, -command => sub { open my $FH, “>:encoding(iso-8859-1)”, “filename” or die $!; print $FH $input; }, )->pack; MainLoop;

Note that Tk is Unicode-capable. So you need to be prepared that the user has the appropriate input methods activated to enter non-ascii characters. If an output encoding is used which does not cover the whole of Unicode codepoints then a warning will be issued when writing the file, like this:

“\x{20ac}” does not map to iso-8859-1 at /usr/local/lib/perl5/site_perl/5.8.8/mach/Tk.pm line 250.

Also, the same hexadecimal notation will be used as replacements for the unhandled characters.

Handling encoding in I/O is pretty simple using the encoding PerlIO layer, as described above. In other cases, such as when dealing with databases, encoding the data usually has to be done manually, unless the database driver has some means for automatically do this for you. So when working with a MySQL database, one could use:

use Tk; use DBI; use Encode qw(encode); $mw = tkinit; $mw->Entry(-textvariable => \input)->pack; $mw->Button( -text => “Write to database”, -command => sub { my $dbh = DBI->connect(“dbi:mysql:test”, “root”, “”) or die; my $encoded_input = encode(“iso-8859-1”, $input); $dbh->do(“INSERT INTO testtable VALUES (?)”, undef, $encoded_input) or die; }, )->pack; MainLoop;

Unfortunately, there are still places in Perl ignorant of Unicode. One of these places are filenames. Consequently, the file selectors in Perl/Tk do not handle encoding of filenames properly. Currently they suppose that filenames are in iso-8859-1 encoding, at least on Unix systems. As soon as Perl has a concept of filename encodings, then Perl/Tk will also implement such schemes.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2166 - Linux cli command __ppc_yield

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __ppc_yield and provides detailed information about the command __ppc_yield, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __ppc_yield.

NAME 🖥️ __ppc_yield 🖥️

Hint the processor to release shared resources

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/platform/ppc.h>
void __ppc_yield(void);
void __ppc_mdoio(void);
void __ppc_mdoom(void);

DESCRIPTION

These functions provide hints about the usage of resources that are shared with other processors on the Power architecture. They can be used, for example, if a program waiting on a lock intends to divert the shared resources to be used by other processors.

__ppc_yield() provides a hint that performance will probably be improved if shared resources dedicated to the executing processor are released for use by other processors.

__ppc_mdoio() provides a hint that performance will probably be improved if shared resources dedicated to the executing processor are released until all outstanding storage accesses to caching-inhibited storage have been completed.

__ppc_mdoom() provides a hint that performance will probably be improved if shared resources dedicated to the executing processor are released until all outstanding storage accesses to cacheable storage for which the data is not in the cache have been completed.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

__ppc_yield(), __ppc_mdoio(), __ppc_mdoom()

Thread safetyMT-Safe

STANDARDS

GNU.

HISTORY

glibc 2.18.

SEE ALSO

__ppc_set_ppr_med(3)

Power ISA, Book II - Section 3.2 (“or” architecture)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2167 - Linux cli command IO_All_DBMpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_All_DBMpm and provides detailed information about the command IO_All_DBMpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_All_DBMpm.

NAME 🖥️ IO_All_DBMpm 🖥️

DBM Support for IO::All

SYNOPSIS

See IO::All.

DESCRIPTION

<<<cpan-foot>>>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2168 - Linux cli command zip_source_close

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_close and provides detailed information about the command zip_source_close, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_close.

libzip (-lzip)

The function

closes

indicating that no more data will be read.

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2169 - Linux cli command Module_Implementationpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Module_Implementationpm and provides detailed information about the command Module_Implementationpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Module_Implementationpm.

NAME 🖥️ Module_Implementationpm 🖥️

Loads one of several alternate underlying implementations for a module

VERSION

version 0.09

SYNOPSIS

package Foo::Bar; use Module::Implementation; BEGIN { my $loader = Module::Implementation::build_loader_sub( implementations => [ XS, PurePerl ], symbols => [ run, check ], ); $loader->(); } package Consumer; # loads the first viable implementation use Foo::Bar;

DESCRIPTION

This module abstracts out the process of choosing one of several underlying implementations for a module. This can be used to provide XS and pure Perl implementations of a module, or it could be used to load an implementation for a given OS or any other case of needing to provide multiple implementations.

This module is only useful when you know all the implementations ahead of time. If you want to load arbitrary implementations then you probably want something like a plugin system, not this module.

API

This module provides two subroutines, neither of which are exported.

Module::Implementation::build_loader_sub(…)

This subroutine takes the following arguments.

  • implementations This should be an array reference of implementation names. Each name should correspond to a module in the caller’s namespace. In other words, using the example in the SYNOPSIS, this module will look for the Foo::Bar::XS and Foo::Bar::PurePerl modules. This argument is required.

  • symbols A list of symbols to copy from the implementation package to the calling package. These can be prefixed with a variable type: $, @, %, &, or *). If no prefix is given, the symbol is assumed to be a subroutine. This argument is optional.

This subroutine returns the implementation loader as a sub reference.

It is up to you to call this loader sub in your code.

I recommend that you do not call this loader in an import() sub. If a caller explicitly requests no imports, your import() sub will not be run at all, which can cause weird breakage.

Module::Implementation::implementation_for($package)

Given a package name, this subroutine returns the implementation that was loaded for the package. This is not a full package name, just the suffix that identifies the implementation. For the SYNOPSIS example, this subroutine would be called as Module::Implementation::implementation_for(Foo::Bar), and it would return XS or PurePerl.

HOW THE IMPLEMENTATION LOADER WORKS

The implementation loader works like this …

First, it checks for an %ENV var specifying the implementation to load. The env var is based on the package name which loads the implementations. The :: package separator is replaced with _, and made entirely upper-case. Finally, we append _IMPLEMENTATION to this name.

So in our SYNOPSIS example, the corresponding %ENV key would be FOO_BAR_IMPLEMENTATION.

If this is set, then the loader will only try to load this one implementation.

If the env var requests an implementation which doesn’t match one of the implementations specified when the loader was created, an error is thrown.

If this one implementation fails to load then loader throws an error. This is useful for testing. You can request a specific implementation in a test file by writing something like this:

BEGIN { $ENV{FOO_BAR_IMPLEMENTATION} = XS } use Foo::Bar;

If the environment variable is not set, then the loader simply tries the implementations originally passed to Module::Implementation. The implementations are tried in the order in which they were originally passed.

The loader will use the first implementation that loads without an error. It will copy any requested symbols from this implementation.

If none of the implementations can be loaded, then the loader throws an exception.

The loader returns the name of the package it loaded.

AUTHOR

Dave Rolsky <[email protected]>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2014 by Dave Rolsky.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2170 - Linux cli command Net_SSH2_Listenerpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_SSH2_Listenerpm and provides detailed information about the command Net_SSH2_Listenerpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_SSH2_Listenerpm.

NAME 🖥️ Net_SSH2_Listenerpm 🖥️

SSH 2 listener object

DESCRIPTION

A listener object is created by the Net::SSH2 listen method. The Net::SSH2 poll method can be used to check for connections.

accept

Accept a connection. Returns a channel object on success, undef on failure.

SEE ALSO

Net::SSH2.

AUTHOR

David B. Robins, <[email protected]>

COPYRIGHT AND LICENSE

Copyright (C) 2005, 2006 by David B. Robins; all rights reserved.

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

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2171 - Linux cli command ts_open_restricted

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ts_open_restricted and provides detailed information about the command ts_open_restricted, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ts_open_restricted.

NAME 🖥️ ts_open_restricted 🖥️

use a custom function for opening the touchscreen’s input device file

SYNOPSIS

#include <tslib.h>

"int(*ts_open_restricted)(constchar*path,intflags,void*user_data);

DESCRIPTION

ts_open_restricted() is useful if libts should not be run as root. If such a function is implemented by the user and assigned to the ts_open_restricted pointer, it will be called by ts_open() instead of the open() system call directly.

It should open the input device at path with flags while user_data is currently unused.

RETURN VALUE

the touchscreen input device’ file descriptor

SEE ALSO

ts_close_restricted(3), ts_open(3), ts_setup(3), ts_close(3), ts.conf(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2172 - Linux cli command STAILQ_FOREACH

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command STAILQ_FOREACH and provides detailed information about the command STAILQ_FOREACH, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the STAILQ_FOREACH.

NAME 🖥️ STAILQ_FOREACH 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2173 - Linux cli command Net_Server_Proto_UDPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Server_Proto_UDPpm and provides detailed information about the command Net_Server_Proto_UDPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Server_Proto_UDPpm.

NAME 🖥️ Net_Server_Proto_UDPpm 🖥️

Net::Server UDP protocol.

SYNOPSIS

See Net::Server::Proto.

DESCRIPTION

Protocol module for Net::Server. This module implements the SOCK_DGRAM socket type under INET (also known as UDP). See Net::Server::Proto.

PARAMETERS

The following parameters may be specified in addition to normal command line parameters for a Net::Server. See Net::Server for more information on reading arguments.

udp_recv_len
Specifies the number of bytes to read from the UDP connection handle. Data will be read into $self->{‘server’}->{‘udp_data’}. Default is 4096. See IO::Socket::INET and recv.

udp_recv_flags
See recv. Default is 0.

udp_broadcast
Default is undef.

QUICK PARAMETER LIST

Key Value Default ## UDP protocol parameters udp_recv_len \d+ 4096 udp_recv_flags \d+ 0 udp_broadcast bool undef

INTERNAL METHODS

“object”
Returns an object with parameters suitable for eventual creation of a IO::Socket::INET object listening on UDP.

“connect”
Called when actually binding the port. Handles default parameters before calling parent method.

LICENCE

Distributed under the same terms as Net::Server

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2174 - Linux cli command Perl4_CoreLibspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Perl4_CoreLibspm and provides detailed information about the command Perl4_CoreLibspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Perl4_CoreLibspm.

NAME 🖥️ Perl4_CoreLibspm 🖥️

libraries historically supplied with Perl 4

DESCRIPTION

This is a collection of .pl files that were bundled with the Perl core until core version 5.15.1. Relying on their presence in the core distribution is deprecated; they should be acquired from this CPAN distribution instead. From core version 5.13.3 until their removal, the core versions of these libraries emit a deprecation warning when loaded. The CPAN version does not emit such a warning.

The entire Perl 4 approach to libraries was largely superseded in Perl 5.000 by the system of module namespaces and .pm files. Most of the libraries in this collection predate Perl 5.000, but a handful were first introduced in that version. Functionally, most have been directly superseded by modules in the Perl 5 style. These libraries should not be used by new code. This collection exists to support old Perl programs that predate satisfactory replacements.

Most of these libraries have not been substantially maintained in the course of Perl 5 development. They are now very antiquated in style, making no use of the language facilities introduced since Perl 4. They should therefore not be used as programming examples.

LIBRARIES

The libraries in this collection are:

abbrev.pl
Build a dictionary of unambiguous abbreviations for a group of words. Prefer Text::Abbrev.

assert.pl
Assertion checking with stack trace upon assertion failure.

bigfloat.pl
Arbitrary precision decimal floating point arithmetic. Prefer Math::BigFloat.

bigint.pl
Arbitrary precision integer arithmetic. Prefer Math::BigInt.

bigrat.pl
Arbitrary precision rational arithmetic. Prefer Math::BigRat.

cacheout.pl
Manage output to a large number of files to avoid running out of file descriptors.

chat2.pl
Framework for partial automation of communication with a remote process over IP. Prefer IO::Socket::INET.

complete.pl
Interactive line input with word completion. Prefer Term::Complete.

ctime.pl
One form of textual representation of time. Prefer scalar(localtime()) or ctime in POSIX.

dotsh.pl
Inhale shell variables set by a shell script.

exceptions.pl
String-based exception handling built on eval and die. Prefer Try::Tiny, TryCatch, or the core try/catch facility on Perl 5.33.7 or later.

fastcwd.pl
Determine current directory. Prefer Cwd.

find.pl
Historical interface for a way of searching for files. Prefer File::Find.

finddepth.pl
Historical interface for a way of searching for files. Prefer File::Find.

flush.pl
Flush an I/O handle’s output buffer. Prefer flush in IO::Handle.

ftp.pl
File Transfer Protocol (FTP) over IP. Prefer Net::FTP.

getcwd.pl
Determine current directory. Prefer Cwd.

getopt.pl
Unix-like option processing with all option taking arguments. Prefer Getopt::Std.

getopts.pl
Full Unix-like option processing. Prefer Getopt::Std.

hostname.pl
Determine host’s hostname. Prefer Sys::Hostname.

importenv.pl
Import environment variables as Perl package variables.

look.pl
Data-based seek within regular file.

newgetopt.pl
GNU-like option processing. Prefer Getopt::Long.

open2.pl
Open a subprocess for both reading and writing. Prefer IPC::Open2.

open3.pl
Open a subprocess for reading, writing, and error handling. Prefer IPC::Open3.

pwd.pl
Track changes of current directory in $ENV{PWD}.

shellwords.pl
Interpret shell quoting. Prefer Text::ParseWords.

stat.pl
Access fields of a stat structure by name. Prefer File::stat.

syslog.pl
Write to Unix system log. Prefer Sys::Syslog.

tainted.pl
Determine whether data is tainted. Prefer Taint::Util.

termcap.pl
Generate escape sequences to control arbitrary terminal. Prefer Term::Cap.

timelocal.pl
Generate time number from broken-down time. Prefer Time::Local.

validate.pl
Check permissions on a group of files.

AUTHOR

Known contributing authors for the libraries in this package are Brandon S. Allbery, John Bazik, Tom Christiansen <[email protected]>, Charles Collins, Joe Doupnik <[email protected]>, Marion Hakanson <[email protected]>, Waldemar Kebsch <[email protected]>, Lee McLoughlin <[email protected]>, <[email protected]>, Randal L. Schwartz <[email protected]>, Aaron Sherman <[email protected]>, Wayne Thompson, Larry Wall <[email protected]>, and Ilya Zakharevich. (Most of these email addresses are probably out of date.)

Known contributing authors for the tests in this package are Tom Christiansen <[email protected]>, Alexandr Ciornii (alexchorny at gmail.com), Marc Horowitz <[email protected]>, Dave Rolsky <[email protected]>, and David Sundstrom <[email protected]>.

Andrew Main (Zefram) <[email protected]> built the Perl4::CoreLibs package.

COPYRIGHT

Copyright (C) 1987-2009 Larry Wall et al

Copyright (C) 2010, 2011, 2017, 2023 Andrew Main (Zefram) <[email protected]>

LICENSE

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2175 - Linux cli command Image_ExifTool_Lang_zh_twpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Lang_zh_twpm and provides detailed information about the command Image_ExifTool_Lang_zh_twpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Lang_zh_twpm.

NAME 🖥️ Image_ExifTool_Lang_zh_twpm 🖥️

ExifTool Traditional Chinese language translations

DESCRIPTION

This file is used by Image::ExifTool to generate localized tag descriptions and values.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

ACKNOWLEDGEMENTS

Thanks to Jens Duttke and MikeF for providing this translation.

SEE ALSO

Image::ExifTool (3pm), Image::ExifTool::TagInfoXML (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2176 - Linux cli command id_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command id_ttype and provides detailed information about the command id_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the id_ttype.

NAME 🖥️ id_ttype 🖥️

process/user/group identifier

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/types.h>
typedef /* ... */ pid_t;
typedef /* ... */ uid_t;
typedef /* ... */ gid_t;
typedef /* ... */ id_t;

DESCRIPTION

pid_t is a type used for storing process IDs, process group IDs, and session IDs. It is a signed integer type.

uid_t is a type used to hold user IDs. It is an integer type.

gid_t is a type used to hold group IDs. It is an integer type.

id_t is a type used to hold a general identifier. It is an integer type that can be used to contain a pid_t, uid_t, or gid_t.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

The following headers also provide pid_t: <fcntl.h>, <sched.h>, <signal.h>, <spawn.h>, <sys/msg.h>, <sys/sem.h>, <sys/shm.h>, <sys/wait.h>, <termios.h>, <time.h>, <unistd.h>, and <utmpx.h>.

The following headers also provide uid_t: <pwd.h>, <signal.h>, <stropts.h>, <sys/ipc.h>, <sys/stat.h>, and <unistd.h>.

The following headers also provide gid_t: <grp.h>, <pwd.h>, <signal.h>, <stropts.h>, <sys/ipc.h>, <sys/stat.h>, and <unistd.h>.

The following header also provides id_t: <sys/resource.h>.

SEE ALSO

chown(2), fork(2), getegid(2), geteuid(2), getgid(2), getgroups(2), getpgid(2), getpid(2), getppid(2), getpriority(2), getpwnam(3), getresgid(2), getresuid(2), getsid(2), gettid(2), getuid(2), kill(2), pidfd_open(2), sched_setscheduler(2), waitid(2), getgrnam(3), sigqueue(3), credentials(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2177 - Linux cli command zip_source_buffer

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_buffer and provides detailed information about the command zip_source_buffer, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_buffer.

libzip (-lzip)

The functions

and

create a zip source from the buffer

of size

If

is non-zero, the buffer will be freed when it is no longer needed.

must remain valid for the lifetime of the created source.

The source can be used to open a zip archive from.

Upon successful completion, the created source is returned. Otherwise,

is returned and the error code in

or

is set to indicate the error.

and

fail if:

is greater than zero and

is

Required memory could not be allocated.

and

were added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2178 - Linux cli command inet_lnaof

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command inet_lnaof and provides detailed information about the command inet_lnaof, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the inet_lnaof.

NAME 🖥️ inet_lnaof 🖥️

Internet address manipulation routines

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
int inet_aton(const char *cp, struct in_addr *inp);
in_addr_t inet_addr(const char *cp);
in_addr_t inet_network(const char *cp);
[[deprecated]] char *inet_ntoa(struct in_addr in);
[[deprecated]] struct in_addr inet_makeaddr(in_addr_t net,
 in_addr_t host);
[[deprecated]] in_addr_t inet_lnaof(struct in_addr in);
[[deprecated]] in_addr_t inet_netof(struct in_addr in);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

inet_aton(), inet_ntoa():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    In glibc up to and including 2.19:
        _BSD_SOURCE || _BSD_SOURCE

DESCRIPTION

inet_aton() converts the Internet host address cp from the IPv4 numbers-and-dots notation into binary form (in network byte order) and stores it in the structure that inp points to. inet_aton() returns nonzero if the address is valid, zero if not. The address supplied in cp can have one of the following forms:

a.b.c.d
Each of the four numeric parts specifies a byte of the address; the bytes are assigned in left-to-right order to produce the binary address.

a.b.c
Parts a and b specify the first two bytes of the binary address. Part c is interpreted as a 16-bit value that defines the rightmost two bytes of the binary address. This notation is suitable for specifying (outmoded) Class B network addresses.

a.b
Part a specifies the first byte of the binary address. Part b is interpreted as a 24-bit value that defines the rightmost three bytes of the binary address. This notation is suitable for specifying (outmoded) Class A network addresses.

a
The value a is interpreted as a 32-bit value that is stored directly into the binary address without any byte rearrangement.

In all of the above forms, components of the dotted address can be specified in decimal, octal (with a leading 0), or hexadecimal, with a leading 0X). Addresses in any of these forms are collectively termed IPV4 numbers-and-dots notation. The form that uses exactly four decimal numbers is referred to as IPv4 dotted-decimal notation (or sometimes: IPv4 dotted-quad notation).

inet_aton() returns 1 if the supplied string was successfully interpreted, or 0 if the string is invalid (errno is not set on error).

The inet_addr() function converts the Internet host address cp from IPv4 numbers-and-dots notation into binary data in network byte order. If the input is invalid, INADDR_NONE (usually -1) is returned. Use of this function is problematic because -1 is a valid address (255.255.255.255). Avoid its use in favor of inet_aton(), inet_pton(3), or getaddrinfo(3), which provide a cleaner way to indicate error return.

The inet_network() function converts cp, a string in IPv4 numbers-and-dots notation, into a number in host byte order suitable for use as an Internet network address. On success, the converted address is returned. If the input is invalid, -1 is returned.

The inet_ntoa() function converts the Internet host address in, given in network byte order, to a string in IPv4 dotted-decimal notation. The string is returned in a statically allocated buffer, which subsequent calls will overwrite.

The inet_lnaof() function returns the local network address part of the Internet address in. The returned value is in host byte order.

The inet_netof() function returns the network number part of the Internet address in. The returned value is in host byte order.

The inet_makeaddr() function is the converse of inet_netof() and inet_lnaof(). It returns an Internet host address in network byte order, created by combining the network number net with the local address host, both in host byte order.

The structure in_addr as used in inet_ntoa(), inet_makeaddr(), inet_lnaof(), and inet_netof() is defined in <netinet/in.h> as:

typedef uint32_t in_addr_t;
struct in_addr {
    in_addr_t s_addr;
};

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

inet_aton(), inet_addr(), inet_network(), inet_ntoa()

Thread safetyMT-Safe locale

inet_makeaddr(), inet_lnaof(), inet_netof()

Thread safetyMT-Safe

STANDARDS

inet_addr()
inet_ntoa()
POSIX.1-2008.

inet_aton()
None.

STANDARDS

inet_addr()
inet_ntoa()
POSIX.1-2001, 4.3BSD.

inet_lnaof(), inet_netof(), and inet_makeaddr() are legacy functions that assume they are dealing with classful network addresses. Classful networking divides IPv4 network addresses into host and network components at byte boundaries, as follows:

Class A
This address type is indicated by the value 0 in the most significant bit of the (network byte ordered) address. The network address is contained in the most significant byte, and the host address occupies the remaining three bytes.

Class B
This address type is indicated by the binary value 10 in the most significant two bits of the address. The network address is contained in the two most significant bytes, and the host address occupies the remaining two bytes.

Class C
This address type is indicated by the binary value 110 in the most significant three bits of the address. The network address is contained in the three most significant bytes, and the host address occupies the remaining byte.

Classful network addresses are now obsolete, having been superseded by Classless Inter-Domain Routing (CIDR), which divides addresses into network and host components at arbitrary bit (rather than byte) boundaries.

NOTES

On x86 architectures, the host byte order is Least Significant Byte first (little endian), whereas the network byte order, as used on the Internet, is Most Significant Byte first (big endian).

EXAMPLES

An example of the use of inet_aton() and inet_ntoa() is shown below. Here are some example runs:

$ ./a.out 226.000.000.037 # Last byte is in octal
226.0.0.31
$ ./a.out 0x7f.1  # First byte is in hex
127.0.0.1

Program source

#define _DEFAULT_SOURCE
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
    struct in_addr addr;
    if (argc != 2) {
        fprintf(stderr, "%s <dotted-address>

“, argv[0]); exit(EXIT_FAILURE); } if (inet_aton(argv[1], &addr) == 0) { fprintf(stderr, “Invalid address “); exit(EXIT_FAILURE); } printf("%s “, inet_ntoa(addr)); exit(EXIT_SUCCESS); }

SEE ALSO

byteorder(3), getaddrinfo(3), gethostbyname(3), getnameinfo(3), getnetent(3), inet_net_pton(3), inet_ntop(3), inet_pton(3), hosts(5), networks(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2179 - Linux cli command Moose_Unsweetenedpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Unsweetenedpm and provides detailed information about the command Moose_Unsweetenedpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Unsweetenedpm.

NAME 🖥️ Moose_Unsweetenedpm 🖥️

Moved to Moose::Manual::Unsweetened, so go read that

VERSION

version 2.2207

DESCRIPTION

This document has been moved to Moose::Manual::Unsweetened. This POD document still exists for the benefit of anyone out there who might’ve linked to it in the past.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2180 - Linux cli command mbsinit

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mbsinit and provides detailed information about the command mbsinit, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mbsinit.

NAME 🖥️ mbsinit 🖥️

test for initial shift state

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
int mbsinit(const mbstate_t *ps);

DESCRIPTION

The function mbsinit() tests whether *ps corresponds to an initial state.

RETURN VALUE

mbsinit() returns nonzero if *ps is an initial state, or if ps is NULL. Otherwise, it returns 0.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mbsinit()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of mbsinit() depends on the LC_CTYPE category of the current locale.

SEE ALSO

mbstate_t(3type), mbrlen(3), mbrtowc(3), mbsrtowcs(3), wcrtomb(3), wcsrtombs(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2181 - Linux cli command Net_DBuspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBuspm and provides detailed information about the command Net_DBuspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBuspm.

NAME 🖥️ Net_DBuspm 🖥️

Perl extension for the DBus message system

SYNOPSIS

####### Attaching to the bus ########### use Net::DBus; # Find the most appropriate bus my $bus = Net::DBus->find; # … or explicitly go for the session bus my $bus = Net::DBus->session; # …. or explicitly go for the system bus my $bus = Net::DBus->system ######## Accessing remote services ######### # Get a handle to the HAL service my $hal = $bus->get_service(“org.freedesktop.Hal”); # Get the device manager my $manager = $hal->get_object("/org/freedesktop/Hal/Manager", “org.freedesktop.Hal.Manager”); # List devices foreach my $dev (@{$manager->GetAllDevices}) { print $dev, " “; } ######### Providing services ############## # Register a service known as org.example.Jukebox my $service = $bus->export_service(“org.example.Jukebox”);

DESCRIPTION

Net::DBus provides a Perl API for the DBus message system. The DBus Perl interface is currently operating against the 0.32 development version of DBus, but should work with later versions too, providing the API changes have not been too drastic.

Users of this package are either typically, service providers in which case the Net::DBus::Service and Net::DBus::Object modules are of most relevance, or are client consumers, in which case Net::DBus::RemoteService and Net::DBus::RemoteObject are of most relevance.

METHODS

my $bus = Net::DBus->find(%params);
Search for the most appropriate bus to connect to and return a connection to it. The heuristic used for the search is - If DBUS_STARTER_BUS_TYPE is set to session attach to the session bus - Else If DBUS_STARTER_BUS_TYPE is set to system attach to the system bus - Else If DBUS_SESSION_BUS_ADDRESS is set attach to the session bus - Else attach to the system bus The optional params hash can contain be used to specify connection options. The only support option at this time is nomainloop which prevents the bus from being automatically attached to the main Net::DBus::Reactor event loop.

my $bus = Net::DBus->system(%params);
Return a handle for the system message bus. Note that the system message bus is locked down by default, so unless appropriate access control rules are added in /etc/dbus/system.d/, an application may access services, but won’t be able to export services. The optional params hash can be used to specify the following options:

nomainloop
If true, prevents the bus from being automatically attached to the main Net::DBus::Reactor event loop.

private
If true, the socket opened is private; any existing socket will be ignored and any future attempts to open the same bus will return a different existing socket or open a fresh one.

my $bus = Net::DBus->session(%params);
Return a handle for the session message bus. The optional params hash can be used to specify the following options:

nomainloop
If true, prevents the bus from being automatically attached to the main Net::DBus::Reactor event loop.

private
If true, the socket opened is private; any existing socket will be ignored and any future attempts to open the same bus will return a different existing socket or open a fresh one.

my $bus = Net::DBus->test(%params);
Returns a handle for a virtual bus for use in unit tests. This bus does not make any network connections, but rather has an in-memory message pipeline. Consult Net::DBus::Test::MockConnection for further details of how to use this special bus.

my $bus = Net::DBus->new($address, %params);
Return a connection to a specific message bus. The $address parameter must contain the address of the message bus to connect to. An example address for a session bus might look like unix:abstract=/tmp/dbus-PBFyyuUiVb,guid=191e0a43c3efc222e0818be556d67500, while one for a system bus would look like unix:/var/run/dbus/system_bus_socket. The optional params hash can contain be used to specify connection options. The only support option at this time is nomainloop which prevents the bus from being automatically attached to the main Net::DBus::Reactor event loop.

my $connection = $bus->get_connection;
Return a handle to the underlying, low level connection object associated with this bus. The returned object will be an instance of the Net::DBus::Binding::Bus class. This method is not intended for use by (most!) application developers, so if you don’t understand what this is for, then you don’t need to be calling it!

my $service = $bus->get_service($name);
Retrieves a handle for the remote service identified by the service name $name. The returned object will be an instance of the Net::DBus::RemoteService class.

my $service = $bus->export_service($name);
Registers a service with the bus, returning a handle to the service. The returned object is an instance of the Net::DBus::Service class. When $name is not specified or is undef then returned handle to the service is identified only by the unique name of client’s connection to the bus.

my $object = $bus->get_bus_object;
Retrieves a handle to the bus object, /org/freedesktop/DBus, provided by the service org.freedesktop.DBus. The returned object is an instance of Net::DBus::RemoteObject

my $name = $bus->get_unique_name;
Retrieves the unique name of this client’s connection to the bus.

my $name = $bus->get_service_owner($service);
Retrieves the unique name of the client on the bus owning the service named by the $service parameter.

my $timeout = $bus->timeout(60 * 1000);
Sets or retrieves the timeout value which will be used for DBus requests belongs to this bus connection. The timeout should be specified in milliseconds, with the default value being 60 seconds.

DATA TYPING METHODS

These methods are not usually used, since most services provide introspection data to inform clients of their data typing requirements. If introspection data is incomplete, however, it may be necessary for a client to mark values with specific data types. In such a case, the following methods can be used. They are not, however, exported by default so must be requested at import time by specifying ‘use Net::DBus qw(:typing)’

$typed_value = dbus_int16($value);
Mark a value as being a signed, 16-bit integer.

$typed_value = dbus_uint16($value);
Mark a value as being an unsigned, 16-bit integer.

$typed_value = dbus_int32($value);
Mark a value as being a signed, 32-bit integer.

$typed_value = dbus_uint32($value);
Mark a value as being an unsigned, 32-bit integer.

$typed_value = dbus_int64($value);
Mark a value as being an unsigned, 64-bit integer.

$typed_value = dbus_uint64($value);
Mark a value as being an unsigned, 64-bit integer.

$typed_value = dbus_double($value);
Mark a value as being a double precision IEEE floating point.

$typed_value = dbus_byte($value);
Mark a value as being an unsigned, byte.

$typed_value = dbus_string($value);
Mark a value as being a UTF-8 string. This is not usually required since ‘string’ is the default data type for any Perl scalar value.

$typed_value = dbus_signature($value);
Mark a value as being a UTF-8 string, whose contents is a valid type signature

$typed_value = dbus_object_path($value);
Mark a value as being a UTF-8 string, whose contents is a valid object path.

$typed_value = dbus_boolean($value);
Mark a value as being an boolean

$typed_value = dbus_array($value);
Mark a value as being an array

$typed_value = dbus_struct($value);
Mark a value as being a structure

$typed_value = dbus_dict($value);
Mark a value as being a dictionary

$typed_value = dbus_variant($value);
Mark a value as being a variant

$typed_value = dbus_unix_fd($value);
Mark a value as being a unix file descriptor

SEE ALSO

Net::DBus, Net::DBus::RemoteService, Net::DBus::Service, Net::DBus::RemoteObject, Net::DBus::Object, Net::DBus::Exporter, Net::DBus::Dumper, Net::DBus::Reactor, dbus-monitor(1), dbus-daemon-1(1), dbus-send(1), <http://dbus.freedesktop.org>,

AUTHOR

Daniel Berrange <[email protected]>

COPYRIGHT

Copyright 2004-2011 by Daniel Berrange

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2182 - Linux cli command netlink

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command netlink and provides detailed information about the command netlink, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the netlink.

NAME 🖥️ netlink 🖥️

Netlink macros

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <asm/types.h>
#include <linux/netlink.h>
int NLMSG_ALIGN(size_t len);
int NLMSG_LENGTH(size_t len);
int NLMSG_SPACE(size_t len);
void *NLMSG_DATA(struct nlmsghdr *nlh);
struct nlmsghdr *NLMSG_NEXT(struct nlmsghdr *nlh, int len);
int NLMSG_OK(struct nlmsghdr *nlh, int len);
int NLMSG_PAYLOAD(struct nlmsghdr *nlh, int len);

DESCRIPTION

<linux/netlink.h> defines several standard macros to access or create a netlink datagram. They are similar in spirit to the macros defined in cmsg(3) for auxiliary data. The buffer passed to and from a netlink socket should be accessed using only these macros.

NLMSG_ALIGN()
Round the length of a netlink message up to align it properly.

NLMSG_LENGTH()
Given the payload length, len, this macro returns the aligned length to store in the nlmsg_len field of the nlmsghdr.

NLMSG_SPACE()
Return the number of bytes that a netlink message with payload of len would occupy.

NLMSG_DATA()
Return a pointer to the payload associated with the passed nlmsghdr.

NLMSG_NEXT()
Get the next nlmsghdr in a multipart message. The caller must check if the current nlmsghdr didn’t have the NLMSG_DONE set—this function doesn’t return NULL on end. The len argument is an lvalue containing the remaining length of the message buffer. This macro decrements it by the length of the message header.

NLMSG_OK()
Return true if the netlink message is not truncated and is in a form suitable for parsing.

NLMSG_PAYLOAD()
Return the length of the payload associated with the nlmsghdr.

VERSIONS

It is often better to use netlink via libnetlink than via the low-level kernel interface.

STANDARDS

Linux.

SEE ALSO

libnetlink(3), netlink(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2183 - Linux cli command HTTP_Cookies_Netscapepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTTP_Cookies_Netscapepm and provides detailed information about the command HTTP_Cookies_Netscapepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTTP_Cookies_Netscapepm.

NAME 🖥️ HTTP_Cookies_Netscapepm 🖥️

Access to Netscape cookies files

VERSION

version 6.11

SYNOPSIS

use LWP; use HTTP::Cookies::Netscape; $cookie_jar = HTTP::Cookies::Netscape->new( file => “c:/program files/netscape/users/ZombieCharity/cookies.txt”, ); my $browser = LWP::UserAgent->new; $browser->cookie_jar( $cookie_jar );

DESCRIPTION

This is a subclass of HTTP::Cookies that reads (and optionally writes) Netscape/Mozilla cookie files.

See the documentation for HTTP::Cookies.

CAVEATS

Please note that the Netscape/Mozilla cookie file format can’t store all the information available in the Set-Cookie2 headers, so you will probably lose some information if you save in this format.

At time of writing, this module seems to work fine with Mozilla Phoenix/Firebird.

SEE ALSO

HTTP::Cookies::Microsoft

AUTHOR

Gisle Aas <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 2002 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2184 - Linux cli command PA_INTconst

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command PA_INTconst and provides detailed information about the command PA_INTconst, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the PA_INTconst.

NAME 🖥️ PA_INTconst 🖥️

define custom behavior for printf-like functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <printf.h>
int register_printf_specifier(int spec, printf_function func,
 printf_arginfo_size_function arginfo);
int register_printf_modifier(const wchar_t *str);
int register_printf_type(printf_va_arg_function fct);

Callbacks

typedef int printf_function(FILE *stream, const struct printf_info *info,
 const void *const args[]);
typedef int printf_arginfo_size_function(const struct printf_info *info,
 size_t n, int argtypes[n], int size[n]);
typedef void printf_va_arg_function(void *mem, va_list *ap);

Types

struct printf_info {
 int prec; // Precision
 int width; // Width
 wchar_t spec; // Format letter
 unsigned int is_long_double:1;// L or ll flag
 unsigned int is_short:1; // h flag
 unsigned int is_long:1; // l flag
 unsigned int alt:1; // # flag
 unsigned int space:1; // Space flag
 unsigned int left:1; // - flag
 unsigned int showsign:1; // + flag
 unsigned int group:1; // ' flag
 unsigned int extra:1; // For special use
 unsigned int is_char:1; // hh flag
 unsigned int wide:1; // True for wide character streams
 unsigned int i18n:1; // I flag
 unsigned int is_binary128:1; /* Floating-point argument is
  ABI-compatible with
  IEC 60559 binary128 */
 unsigned short user; // Bits for user-installed modifiers
 wchar_t pad; // Padding character
};

Constants

#define PA_FLAG_LONG_LONG /* ... */
#define PA_FLAG_LONG_DOUBLE /* ... */
#define PA_FLAG_LONG /* ... */
#define PA_FLAG_SHORT /* ... */
#define PA_FLAG_PTR /* ... */

DESCRIPTION

These functions serve to extend and/or modify the behavior of the printf(3) family of functions.

register_printf_specifier()

This function registers a custom conversion specifier for the printf(3) family of functions.

spec
The character which will be used as a conversion specifier in the format string.

func
Callback function that will be executed by the printf(3) family of functions to format the input arguments into the output stream.

stream
Output stream where the formatted output should be printed. This stream transparently represents the output, even in the case of functions that write to a string.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in arginfo.

args
Array of pointers to the arguments to the printf(3) -like function.

arginfo
Callback function that will be executed by the printf(3) family of functions to know how many arguments should be parsed for the custom specifier and also their types.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in func.

n
Number of arguments remaining to be parsed.

argtypes
This array should be set to define the type of each of the arguments that will be parsed. Each element in the array represents one of the arguments to be parsed, in the same order that they are passed to the printf(3) -like function. Each element should be set to a base type (PA_*) from the enum above, or a custom one, and optionally ORed with an appropriate length modifier (PA_FLAG_*).

The type is determined by using one of the following constants:

PA_INT
int.

PA_CHAR
int, cast to char.

PA_WCHAR
wchar_t.

PA_STRING
const char *, a ‘�’-terminated string.

PA_WSTRING
const wchar_t *, a wide character L’�’-terminated string.

PA_POINTER
void *.

PA_FLOAT
float.

PA_DOUBLE
double.

PA_LAST
TODO.

size
For user-defined types, the size of the type (in bytes) should also be specified through this array. Otherwise, leave it unused.

arginfo is called before func, and prepares some information needed to call func.

register_printf_modifier()

TODO

register_printf_type()

TODO

RETURN VALUE

register_printf_specifier(), register_printf_modifier(), and register_printf_type() return zero on success, or -1 on error.

Callbacks

The callback of type printf_function should return the number of characters written, or -1 on error.

The callback of type printf_arginfo_size_function should return the number of arguments to be parsed by this specifier. It also passes information about the type of those arguments to the caller through argtypes. On error, it should return -1.

ERRORS

EINVAL
The specifier was not a valid character.

STANDARDS

GNU.

HISTORY

register_printf_function(3) is an older function similar to register_printf_specifier(), and is now deprecated. That function can’t handle user-defined types.

register_printf_specifier() supersedes register_printf_function(3).

EXAMPLES

The following example program registers the ‘b’ and ‘B’ specifiers to print integers in binary format, mirroring rules for other unsigned conversion specifiers like ‘x’ and ‘u’. This can be used to print in binary prior to C23.

/* This code is in the public domain */
#include <err.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <printf.h>
#define GROUP_SEP  '\''
struct Printf_Pad {
    char    ch;
    size_t  len;
};
static int b_printf(FILE *stream, const struct printf_info *info,
                    const void *const args[]);
static int b_arginf_sz(const struct printf_info *info,
                    size_t n, int argtypes[n], int size[n]);
static uintmax_t b_value(const struct printf_info *info,
                    const void *arg);
static size_t b_bin_repr(char bin[UINTMAX_WIDTH],
                    const struct printf_info *info, const void *arg);
static size_t b_bin_len(const struct printf_info *info,
                    ptrdiff_t min_len);
static size_t b_pad_len(const struct printf_info *info,
                    ptrdiff_t bin_len);
static ssize_t b_print_prefix(FILE *stream,
                    const struct printf_info *info);
static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info,
                    ptrdiff_t min_len);
static ssize_t b_print_number(FILE *stream,
                    const struct printf_info *info,
                    const char bin[UINTMAX_WIDTH],
                    size_t min_len, size_t bin_len);
static char pad_ch(const struct printf_info *info);
static ssize_t pad_spaces(FILE *stream, size_t pad_len);
int
main(void)
{
    if (register_printf_specifier('b', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('b', ...)");
    if (register_printf_specifier('B', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('B', ...)");
    printf("....----....----....----....----

“); printf("%llb; “, 0x5Ellu); printf("%lB; “, 0x5Elu); printf("%b; “, 0x5Eu); printf("%hB; “, 0x5Eu); printf("%hhb; “, 0x5Eu); printf("%jb; “, (uintmax_t)0x5E); printf("%zb; “, (size_t)0x5E); printf(”….—-….—-….—-….—- “); printf(”%#b; “, 0x5Eu); printf(”%#B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf("%10b; “, 0x5Eu); printf("%010b; “, 0x5Eu); printf(”%.10b; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%-10B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%‘B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”….—-….—-….—-….—- “); printf(”%#16.12b; “, 0xAB); printf(”%-#‘20.12b; “, 0xAB); printf(”%#‘020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#020B; “, 0xAB); printf(”%‘020B; “, 0xAB); printf("%020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#021B; “, 0xAB); printf(”%‘021B; “, 0xAB); printf("%021B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#022B; “, 0xAB); printf(”%‘022B; “, 0xAB); printf("%022B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#023B; “, 0xAB); printf(”%‘023B; “, 0xAB); printf("%023B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%-#‘19.11b; “, 0xAB); printf(”%#‘019B; “, 0xAB); printf(”%#019B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%‘019B; “, 0xAB); printf("%019B; “, 0xAB); printf(”%#016b; “, 0xAB); printf(”….—-….—-….—-….—- “); return 0; } static int b_printf(FILE *stream, const struct printf_info *info, const void const args[]) { char bin[UINTMAX_WIDTH]; size_t min_len, bin_len; ssize_t len, tmp; struct Printf_Pad pad = {0}; len = 0; min_len = b_bin_repr(bin, info, args[0]); bin_len = b_bin_len(info, min_len); pad.ch = pad_ch(info); if (pad.ch == ’ ‘) pad.len = b_pad_len(info, bin_len); / Padding with ’ ’ (right aligned) / if ((pad.ch == ’ ‘) && !info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } / “0b”/“0B” prefix / if (info->alt) { tmp = b_print_prefix(stream, info); if (tmp == EOF) return EOF; len += tmp; } / Padding with ‘0’ / if (pad.ch == ‘0’) { tmp = b_pad_zeros(stream, info, min_len); if (tmp == EOF) return EOF; len += tmp; } / Print number (including leading 0s to fill precision) / tmp = b_print_number(stream, info, bin, min_len, bin_len); if (tmp == EOF) return EOF; len += tmp; / Padding with ’ ’ (left aligned) */ if (info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } return len; } static int b_arginf_sz(const struct printf_info *info, size_t n, int argtypes[n], [[maybe_unused]] int size[n]) { if (n < 1) return -1; if (info->is_long_double) argtypes[0] = PA_INT | PA_FLAG_LONG_LONG; else if (info->is_long) argtypes[0] = PA_INT | PA_FLAG_LONG; else argtypes[0] = PA_INT; return 1; } static uintmax_t b_value(const struct printf_info *info, const void *arg) { if (info->is_long_double) return *(const unsigned long long *)arg; if (info->is_long) return *(const unsigned long )arg; / short and char are both promoted to int */ return *(const unsigned int *)arg; } static size_t b_bin_repr(char bin[UINTMAX_WIDTH], const struct printf_info *info, const void *arg) { size_t min_len; uintmax_t val; val = b_value(info, arg); bin[0] = ‘0’; for (min_len = 0; val; min_len++) { bin[min_len] = ‘0’ + (val % 2); val »= 1; } return MAX(min_len, 1); } static size_t b_bin_len(const struct printf_info *info, ptrdiff_t min_len) { return MAX(info->prec, min_len); } static size_t b_pad_len(const struct printf_info *info, ptrdiff_t bin_len) { ptrdiff_t pad_len; pad_len = info->width - bin_len; if (info->alt) pad_len -= 2; if (info->group) pad_len -= (bin_len - 1) / 4; return MAX(pad_len, 0); } static ssize_t b_print_prefix(FILE *stream, const struct printf_info *info) { ssize_t len; len = 0; if (fputc(‘0’, stream) == EOF) return EOF; len++; if (fputc(info->spec, stream) == EOF) return EOF; len++; return len; } static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info, ptrdiff_t min_len) { ssize_t len; ptrdiff_t tmp; len = 0; tmp = info->width - (info->alt * 2); if (info->group) tmp -= tmp / 5 - !(tmp % 5); for (ptrdiff_t i = tmp - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static ssize_t b_print_number(FILE *stream, const struct printf_info info, const char bin[UINTMAX_WIDTH], size_t min_len, size_t bin_len) { ssize_t len; len = 0; / Print leading zeros to fill precision / for (size_t i = bin_len - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } / Print number */ for (size_t i = min_len - 1; i < min_len; i–) { if (fputc(bin[i], stream) == EOF) return EOF; len++; if (!info->group || (i % 4) || !i) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static char pad_ch(const struct printf_info *info) { if ((info->prec != -1) || (info->pad == ’ ‘) || info->left) return ’ ‘; return ‘0’; } static ssize_t pad_spaces(FILE *stream, size_t pad_len) { ssize_t len; len = 0; for (size_t i = pad_len - 1; i < pad_len; i–) { if (fputc(’ ‘, stream) == EOF) return EOF; len++; } return len; }

SEE ALSO

asprintf(3), printf(3), wprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2185 - Linux cli command pclose

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pclose and provides detailed information about the command pclose, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pclose.

NAME 🖥️ pclose 🖥️

pipe stream to or from a process

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
FILE *popen(const char *command, const char *type);
int pclose(FILE *stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

popen(), pclose():

    _POSIX_C_SOURCE >= 2
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The popen() function opens a process by creating a pipe, forking, and invoking the shell. Since a pipe is by definition unidirectional, the type argument may specify only reading or writing, not both; the resulting stream is correspondingly read-only or write-only.

The command argument is a pointer to a null-terminated string containing a shell command line. This command is passed to /bin/sh using the -c flag; interpretation, if any, is performed by the shell.

The type argument is a pointer to a null-terminated string which must contain either the letter ‘r’ for reading or the letter ‘w’ for writing. Since glibc 2.9, this argument can additionally include the letter ’e’, which causes the close-on-exec flag (FD_CLOEXEC) to be set on the underlying file descriptor; see the description of the O_CLOEXEC flag in open(2) for reasons why this may be useful.

The return value from popen() is a normal standard I/O stream in all respects save that it must be closed with pclose() rather than fclose(3). Writing to such a stream writes to the standard input of the command; the command’s standard output is the same as that of the process that called popen(), unless this is altered by the command itself. Conversely, reading from the stream reads the command’s standard output, and the command’s standard input is the same as that of the process that called popen().

Note that output popen() streams are block buffered by default.

The pclose() function waits for the associated process to terminate and returns the exit status of the command as returned by wait4(2).

RETURN VALUE

popen(): on success, returns a pointer to an open stream that can be used to read or write to the pipe; if the fork(2) or pipe(2) calls fail, or if the function cannot allocate memory, NULL is returned.

pclose(): on success, returns the exit status of the command; if wait4(2) returns an error, or some other error is detected, -1 is returned.

On failure, both functions set errno to indicate the error.

ERRORS

The popen() function does not set errno if memory allocation fails. If the underlying fork(2) or pipe(2) fails, errno is set to indicate the error. If the type argument is invalid, and this condition is detected, errno is set to EINVAL.

If pclose() cannot obtain the child status, errno is set to ECHILD.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

popen(), pclose()

Thread safetyMT-Safe

VERSIONS

The ’e’ value for type is a Linux extension.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

CAVEATS

Carefully read Caveats in system(3).

BUGS

Since the standard input of a command opened for reading shares its seek offset with the process that called popen(), if the original process has done a buffered read, the command’s input position may not be as expected. Similarly, the output from a command opened for writing may become intermingled with that of the original process. The latter can be avoided by calling fflush(3) before popen().

Failure to execute the shell is indistinguishable from the shell’s failure to execute the command, or an immediate exit of the command. The only hint is an exit status of 127.

SEE ALSO

sh(1), fork(2), pipe(2), wait4(2), fclose(3), fflush(3), fopen(3), stdio(3), system(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2186 - Linux cli command Tk_Scrolledpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Scrolledpm and provides detailed information about the command Tk_Scrolledpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Scrolledpm.

NAME 🖥️ Tk_Scrolledpm 🖥️

Create a widget with attached scrollbar(s)

SYNOPSIS

$whatever = $parent->Scrolled(Whatever ?,-scrollbars=>where? ?,…?);

DESCRIPTION

To stop a flood of ScrlWhatever widgets Perl/Tk introcuded the special constructor Scrolled. Scrolled creates a widget of the given Class Whatever with attached scrollbar(s).

OPTIONS

All options beside -scrollbars explained below are passed to the Whatever widget constructor.

-scrollbars
Expects as argument the position where the scrollbars should be created: w, e or n, s or a combination of them. If the one or both positions are prefixed with o the scrollbar will only show up if there is a ‘real’ need to scroll.

ADVERTISED SUBWIDGETS

See “Subwidget” in Tk::mega how to use advertised widgets.

scrolled
the scrolled widget

widget
same as scrolled above. widget is the kind of widget passed to scrolled as first argument in all lowercase.

xscrollbar
the Scrollbar widget used for horizontal scrolling (if it exists)

yscrollbar
the Scrollbar widget used for vertical scrolling (if it exists)

corner
a frame in the corner between the vertical and horizontal scrolbar

BUGS

If a widget does not support -{x,y}scrollcommand options, Scrolled does not complain if the specified widget class does not support them. E.g.,

$parent->Scrolled(‘Button’, …)

One does not get an error message or warning when one tries to configure scrollbars after the widget construction:

$ascrolled->configure(-scrollbars => ’e’);

SEE ALSO

Tk::Scrollbar

KEYWORDS

scrolled, scrollbar

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2187 - Linux cli command strlen

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strlen and provides detailed information about the command strlen, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strlen.

NAME 🖥️ strlen 🖥️

calculate the length of a string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
size_t strlen(const char *s);

DESCRIPTION

The strlen() function calculates the length of the string pointed to by s, excluding the terminating null byte (‘�’).

RETURN VALUE

The strlen() function returns the number of bytes in the string pointed to by s.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strlen()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89, SVr4, 4.3BSD.

NOTES

In cases where the input buffer may not contain a terminating null byte, strnlen(3) should be used instead.

SEE ALSO

string(3), strnlen(3), wcslen(3), wcsnlen(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2188 - Linux cli command logb

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command logb and provides detailed information about the command logb, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the logb.

NAME 🖥️ logb 🖥️

get exponent of a floating-point value

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double logb(double x);
float logbf(float x);
long double logbl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

logb():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

logbf(), logbl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions extract the exponent from the internal floating-point representation of x and return it as a floating-point value. The integer constant FLT_RADIX, defined in <float.h>, indicates the radix used for the system’s floating-point representation. If FLT_RADIX is 2, logb(x) is similar to floor(log2(fabs(x))), except that the latter may give an incorrect integer due to intermediate rounding.

If x is subnormal, logb() returns the exponent x would have if it were normalized.

RETURN VALUE

On success, these functions return the exponent of x.

If x is a NaN, a NaN is returned.

If x is zero, then a pole error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.

If x is negative infinity or positive infinity, then positive infinity is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Pole error: x is 0
A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised.

These functions do not set errno.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

logb(), logbf(), logbl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

logb()
4.3BSD (see IEEE.3 in the 4.3BSD manual).

SEE ALSO

ilogb(3), log(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2189 - Linux cli command memcmp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command memcmp and provides detailed information about the command memcmp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the memcmp.

NAME 🖥️ memcmp 🖥️

compare memory areas

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
int memcmp(const void s1[.n], const void s2[.n], size_t n);

DESCRIPTION

The memcmp() function compares the first n bytes (each interpreted as unsigned char) of the memory areas s1 and s2.

RETURN VALUE

The memcmp() function returns an integer less than, equal to, or greater than zero if the first n bytes of s1 is found, respectively, to be less than, to match, or be greater than the first n bytes of s2.

For a nonzero return value, the sign is determined by the sign of the difference between the first pair of bytes (interpreted as unsigned char) that differ in s1 and s2.

If n is zero, the return value is zero.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

memcmp()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89, SVr4, 4.3BSD.

CAVEATS

Do not use memcmp() to compare confidential data, such as cryptographic secrets, because the CPU time required for the comparison depends on the contents of the addresses compared, this function is subject to timing-based side-channel attacks. In such cases, a function that performs comparisons in deterministic time, depending only on n (the quantity of bytes compared) is required. Some operating systems provide such a function (e.g., NetBSD’s consttime_memequal()), but no such function is specified in POSIX. On Linux, you may need to implement such a function yourself.

SEE ALSO

bstring(3), strcasecmp(3), strcmp(3), strcoll(3), strncasecmp(3), strncmp(3), wmemcmp(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2190 - Linux cli command Net_SSH2_SFTPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_SSH2_SFTPpm and provides detailed information about the command Net_SSH2_SFTPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_SSH2_SFTPpm.

NAME 🖥️ Net_SSH2_SFTPpm 🖥️

SSH 2 Secure FTP object

DESCRIPTION

An SFTP object is created by the Net::SSH2 sftp method.

error

Returns the last SFTP error (one of the LIBSSH2_FX_* constants). Use this when Net::SSH2::error returns LIBSSH2_ERROR_SFTP_PROTOCOL. In list context, returns (code, error name).

die_with_error( [message] )

Calls die with the given message and the error information from the object appended.

open ( file [, flags [, mode ]]] )

Open or create a file on the remote host. The flags are the standard O_RDONLY, O_WRONLY, O_RDWR, O_APPEND, O_CREAT, O_TRUNC, and O_EXCL, which may be combined as usual. Flags default to O_RDONLY and mode to 0666 (create only). Returns a Net::SSH2::File object on success.

opendir ( dir )

Open a directory on the remote host; returns a Net::SSH2::Dir object on success.

Delete the remote file.

rename ( old, new [, flags ] )

Rename old to new. Flags are taken from LIBSSH2_SFTP_RENAME_*, and may be combined; the default is to use all (overwrite, atomic, native).

mkdir ( path [, mode ] )

Create directory; mode defaults to 0777.

rmdir ( path )

Remove directory.

stat ( path [, follow ] )

Get file attributes for the given path. If follow is set (default), will follow symbolic links. On success, returns a hash containing the following:

mode

size

uid

gid

atime

mtime

setstat ( path, key, value… )

Set file attributes for given path; keys are the same as those returned by stat; note that it’s not necessary to pass them all.

Create a symbolic link to a given target.

Return the target of the given link, undef on failure.

realpath ( path )

Resolve a filename’s path; returns the resolved path, or undef on error.

SEE ALSO

Net::SSH2.

Check Net::SFTP::Foreign for a high level, perlish and easy to use SFTP client module. It can work on top of Net::SSH2 via the Net::SFTP::Foreign::Backend::Net_SSH2 backend module.

AUTHOR

David B. Robins, <[email protected]>

COPYRIGHT AND LICENSE

Copyright (C) 2005, 2006 by David B. Robins; all rights reserved.

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

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2191 - Linux cli command isalnum

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isalnum and provides detailed information about the command isalnum, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isalnum.

NAME 🖥️ isalnum 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2192 - Linux cli command Regexp_Common_URI_filepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_URI_filepm and provides detailed information about the command Regexp_Common_URI_filepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_URI_filepm.

NAME 🖥️ Regexp_Common_URI_filepm 🖥️

  • Returns a pattern for file URIs.

SYNOPSIS

use Regexp::Common qw /URI/; while (<>) { /$RE{URI}{file}/ and print “Contains a file URI. “; }

DESCRIPTION

$RE{URI}{file}

Returns a pattern that matches file URIs, as defined by RFC 1738. File URIs have the form:

“file:” “//” [ host | “localhost” ] “/” fpath

Under {-keep}, the following are returned:

$1
The complete URI.

$2
The scheme.

$3
The part of the URI following “file://”.

$4
The hostname.

$5
The path name, including the leading slash.

$6
The path name, without the leading slash.

REFERENCES

[RFC 1738]
Berners-Lee, Tim, Masinter, L., McCahill, M.: Uniform Resource Locators (URL). December 1994.

SEE ALSO

Regexp::Common::URI for other supported URIs.

AUTHOR

Damian Conway ([email protected])

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2193 - Linux cli command wmemmove

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wmemmove and provides detailed information about the command wmemmove, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wmemmove.

NAME 🖥️ wmemmove 🖥️

copy an array of wide-characters

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
wchar_t *wmemmove(wchar_t dest[.n], const wchar_t src[.n], size_t n);

DESCRIPTION

The wmemmove() function is the wide-character equivalent of the memmove(3) function. It copies n wide characters from the array starting at src to the array starting at dest. The arrays may overlap.

The programmer must ensure that there is room for at least n wide characters at dest.

RETURN VALUE

wmemmove() returns dest.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wmemmove()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

memmove(3), wmemcpy(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2194 - Linux cli command getpwent_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getpwent_r and provides detailed information about the command getpwent_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getpwent_r.

NAME 🖥️ getpwent_r 🖥️

get passwd file entry reentrantly

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <pwd.h>
int getpwent_r(struct passwd *restrict pwbuf,
 char buf[restrict .buflen], size_t buflen,
 struct passwd **restrict pwbufp);
int fgetpwent_r(FILE *restrict stream",structpasswd*restrict"pwbuf,
 char buf[restrict .buflen], size_t buflen,
 struct passwd **restrict pwbufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getpwent_r(),

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

fgetpwent_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _SVID_SOURCE

DESCRIPTION

The functions getpwent_r() and fgetpwent_r() are the reentrant versions of getpwent(3) and fgetpwent(3). The former reads the next passwd entry from the stream initialized by setpwent(3). The latter reads the next passwd entry from stream.

The passwd structure is defined in <pwd.h> as follows:

struct passwd {
    char    *pw_name;      /* username */
    char    *pw_passwd;    /* user password */
    uid_t    pw_uid;       /* user ID */
    gid_t    pw_gid;       /* group ID */
    char    *pw_gecos;     /* user information */
    char    *pw_dir;       /* home directory */
    char    *pw_shell;     /* shell program */
};

For more information about the fields of this structure, see passwd(5).

The nonreentrant functions return a pointer to static storage, where this static storage contains further pointers to user name, password, gecos field, home directory and shell. The reentrant functions described here return all of that in caller-provided buffers. First of all there is the buffer pwbuf that can hold a struct passwd. And next the buffer buf of size buflen that can hold additional strings. The result of these functions, the struct passwd read from the stream, is stored in the provided buffer *pwbuf, and a pointer to this struct passwd is returned in *pwbufp.

RETURN VALUE

On success, these functions return 0 and *pwbufp is a pointer to the struct passwd. On error, these functions return an error value and *pwbufp is NULL.

ERRORS

ENOENT
No more entries.

ERANGE
Insufficient buffer space supplied. Try again with larger buffer.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getpwent_r()

Thread safety

MT-Unsafe race:pwent locale

fgetpwent_r()

Thread safetyMT-Safe

In the above table, pwent in race:pwent signifies that if any of the functions setpwent(), getpwent(), endpwent(), or getpwent_r() are used in parallel in different threads of a program, then data races could occur.

VERSIONS

Other systems use the prototype

struct passwd *
getpwent_r(struct passwd *pwd, char *buf, int buflen);

or, better,

int
getpwent_r(struct passwd *pwd, char *buf, int buflen,
           FILE **pw_fp);

STANDARDS

None.

HISTORY

These functions are done in a style resembling the POSIX version of functions like getpwnam_r(3).

NOTES

The function getpwent_r() is not really reentrant since it shares the reading position in the stream with all other threads.

EXAMPLES

#define _GNU_SOURCE
#include <pwd.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#define BUFLEN 4096
int
main(void)
{
    struct passwd pw;
    struct passwd *pwp;
    char buf[BUFLEN];
    int i;
    setpwent();
    while (1) {
        i = getpwent_r(&pw, buf, sizeof(buf), &pwp);
        if (i)
            break;
        printf("%s (%jd)	HOME %s	SHELL %s

“, pwp->pw_name, (intmax_t) pwp->pw_uid, pwp->pw_dir, pwp->pw_shell); } endpwent(); exit(EXIT_SUCCESS); }

SEE ALSO

fgetpwent(3), getpw(3), getpwent(3), getpwnam(3), getpwuid(3), putpwent(3), passwd(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2195 - Linux cli command sockaddr_storagetype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sockaddr_storagetype and provides detailed information about the command sockaddr_storagetype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sockaddr_storagetype.

NAME 🖥️ sockaddr_storagetype 🖥️

socket address

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/socket.h>
struct sockaddr {
 sa_family_t sa_family; /* Address family */
 char sa_data[]; /* Socket address */
};
struct sockaddr_storage {
 sa_family_t ss_family; /* Address family */
};
typedef /* ... */ socklen_t;
typedef /* ... */ sa_family_t;

Internet domain sockets

#include <netinet/in.h>
struct sockaddr_in {
 sa_family_t sin_family; /* AF_INET */
 in_port_t sin_port; /* Port number */
 struct in_addr sin_addr; /* IPv4 address */
};
struct sockaddr_in6 {
 sa_family_t sin6_family; /* AF_INET6 */
 in_port_t sin6_port; /* Port number */
 uint32_t sin6_flowinfo; /* IPv6 flow info */
 struct in6_addr sin6_addr; /* IPv6 address */
 uint32_t sin6_scope_id; /* Set of interfaces for a scope */
};
struct in_addr {
 in_addr_t s_addr;
};
struct in6_addr {
 uint8_t s6_addr[16];
};
typedef uint32_t in_addr_t;
typedef uint16_t in_port_t;

UNIX domain sockets

#include <sys/un.h>
struct sockaddr_un {
 sa_family_t sun_family; /* Address family */
 char sun_path[]; /* Socket pathname */
};

DESCRIPTION

sockaddr
Describes a socket address.

sockaddr_storage
A structure at least as large as any other sockaddr_* address structures. It’s aligned so that a pointer to it can be cast as a pointer to other sockaddr_* structures and used to access its fields.

socklen_t
Describes the length of a socket address. This is an integer type of at least 32 bits.

sa_family_t
Describes a socket’s protocol family. This is an unsigned integer type.

Internet domain sockets

sockaddr_in
Describes an IPv4 Internet domain socket address. The sin_port and sin_addr members are stored in network byte order.

sockaddr_in6
Describes an IPv6 Internet domain socket address. The sin6_addr.s6_addr array is used to contain a 128-bit IPv6 address, stored in network byte order.

UNIX domain sockets

sockaddr_un
Describes a UNIX domain socket address.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

socklen_t was invented by POSIX. See also accept(2).

These structures were invented before modern ISO C strict-aliasing rules. If aliasing rules are applied strictly, these structures would be extremely difficult to use without invoking Undefined Behavior. POSIX Issue 8 will fix this by requiring that implementations make sure that these structures can be safely used as they were designed.

NOTES

socklen_t is also defined in <netdb.h>.

sa_family_t is also defined in <netinet/in.h> and <sys/un.h>.

SEE ALSO

accept(2), bind(2), connect(2), getpeername(2), getsockname(2), getsockopt(2), sendto(2), setsockopt(2), socket(2), socketpair(2), getaddrinfo(3), gethostbyaddr(3), getnameinfo(3), htonl(3), ipv6(7), socket(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2196 - Linux cli command Socket6pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Socket6pm and provides detailed information about the command Socket6pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Socket6pm.

NAME 🖥️ Socket6pm 🖥️

IPv6 related part of the C socket.h defines and structure manipulators

SYNOPSIS

use Socket; use Socket6; @res = getaddrinfo(hishost.com, daytime, AF_UNSPEC, SOCK_STREAM); $family = -1; while (scalar(@res) >= 5) { ($family, $socktype, $proto, $saddr, $canonname, @res) = @res; ($host, $port) = getnameinfo($saddr, NI_NUMERICHOST | NI_NUMERICSERV); print STDERR “Trying to connect to $host port $port… “; socket(Socket_Handle, $family, $socktype, $proto) || next; connect(Socket_Handle, $saddr) && last; close(Socket_Handle); $family = -1; } if ($family != -1) { print STDERR “connected to $host port $port “; } else { die “connect attempt failed “; }

DESCRIPTION

This module provides glue routines to the various IPv6 functions.

If you use the Socket6 module, be sure to specify “use Socket” as well as “use Socket6”.

Functions supplied are:

inet_pton FAMILY, TEXT_ADDRESS
This function takes an IP address in presentation (or string) format and converts it into numeric (or binary) format. The type of IP address conversion (IPv4 versus IPv6) is controlled by the FAMILY argument.

inet_ntop FAMILY, BINARY_ADDRESS
This function takes an IP address in numeric (or binary) format and converts it into presentation (or string) format The type of IP address conversion (IPv4 versus IPv6) is controlled by the FAMILY argument.

pack_sockaddr_in6 PORT, ADDR
This function takes two arguments: a port number, and a 16-octet IPv6 address structure (as returned by inet_pton()). It returns the sockaddr_in6 structure with these arguments packed into their correct fields, as well as the AF_INET6 family. The other fields are not set and their values should not be relied upon.

pack_sockaddr_in6_all PORT, FLOWINFO, ADDR, SCOPEID
This function takes four arguments: a port number, a 16-octet IPv6 address structure (as returned by inet_pton), any special flow information, and any specific scope information. It returns a complete sockaddr_in6 structure with these arguments packed into their correct fields, as well as the AF_INET6 family.

unpack_sockaddr_in6 NAME
This function takes a sockaddr_in6 structure (as returned by pack_sockaddr_in6()) and returns a list of two elements: the port number and the 16-octet IP address. This function will croak if it determines it has not been passed an IPv6 structure.

unpack_sockaddr_in6_all NAME
This function takes a sockaddr_in6 structure (as returned by pack_sockaddr_in6()) and returns a list of four elements: the port number, the flow information, the 16-octet IP address, and the scope information. This function will croak if it determines it has not been passed an IPv6 structure.

gethostbyname2 HOSTNAME, FAMILY

getaddrinfo NODENAME, SERVICENAME, [FAMILY, SOCKTYPE, PROTOCOL, FLAGS]

This function converts node names to addresses and service names to port numbers. If the NODENAME argument is not a false value, then a nodename to address lookup is performed; otherwise a service name to port number lookup is performed. At least one of NODENAME and SERVICENAME must have a true value. If the lookup is successful, a list consisting of multiples of five elements is returned. Each group of five elements consists of the address family, socket type, protocol, 16-octet IP address, and the canonical name (undef if the node name passed is already the canonical name). The arguments FAMILY, SOCKTYPE, PROTOCOL, and FLAGS are all optional. This function will croak if it determines it has not been passed an IPv6 structure. If the lookup is unsuccessful, the function returns a single scalar. This will contain the string version of that error in string context, and the numeric value in numeric context.

getnameinfo NAME, [FLAGS]
This function takes a socket address structure. If successful, it returns two strings containing the node name and service name. The optional FLAGS argument controls what kind of lookup is performed. If the lookup is unsuccessful, the function returns a single scalar. This will contain the string version of that error in string context, and the numeric value in numeric context.

getipnodebyname HOST, [FAMILY, FLAGS]
This function takes either a node name or an IP address string and performs a lookup on that name (or conversion of the string). It returns a list of five elements: the canonical host name, the address family, the length in octets of the IP addresses returned, a reference to a list of IP address structures, and a reference to a list of aliases for the host name. The arguments FAMILY and FLAGS are optional. Note: This function does not handle IPv6 scope identifiers, and should be used with care. And, this function was deprecated in RFC3493. The getnameinfo function should be used instead.

getipnodebyaddr FAMILY, ADDRESS
This function takes an IP address family and an IP address structure and performs a reverse lookup on that address. It returns a list of five elements: the canonical host name, the address family, the length in octets of the IP addresses returned, a reference to a list of IP address structures, and a reference to a list of aliases for the host name. Note: This function does not handle IPv6 scope identifiers, and should be used with care. And, this function was deprecated in RFC3493. The getaddrinfo function should be used instead.

gai_strerror ERROR_NUMBER
This function returns a string corresponding to the error number passed in as an argument.

in6addr_any
This function returns the 16-octet wildcard address.

in6addr_loopback
This function returns the 16-octet loopback address.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2197 - Linux cli command Tk_Messagepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Messagepm and provides detailed information about the command Tk_Messagepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Messagepm.

NAME 🖥️ Tk_Messagepm 🖥️

Create and manipulate Message widgets

SYNOPSIS

use Tk::Message; … my $message = $parent->Message( -text => somewhat long message text, -aspect => 100, -justify => left, )->pack();

STANDARD OPTIONS

-anchor -font -highlightthickness -takefocus -background -foreground -padx -text -borderwidth -highlightbackground -pady -textvariable -cursor -highlightcolor -relief -width

See Tk::options for details of the standard options.

WIDGET-SPECIFIC OPTIONS

Name: aspect

Class: Aspect

Switch: -aspect

Specifies a non-negative integer value indicating desired aspect ratio for the text. The aspect ratio is specified as 100*width/height. 100 means the text should be as wide as it is tall, 200 means the text should be twice as wide as it is tall, 50 means the text should be twice as tall as it is wide, and so on. Used to choose line length for text if width option isn’t specified. Defaults to 150.

Name: justify

Class: Justify

Switch: -justify

Specifies how to justify lines of text. Must be one of left, center, or right. Defaults to left. This option works together with the anchor, aspect, padX, padY, and width options to provide a variety of arrangements of the text within the window. The aspect and width options determine the amount of screen space needed to display the text. The anchor, padX, and padY options determine where this rectangular area is displayed within the widget’s window, and the justify option determines how each line is displayed within that rectangular region. For example, suppose anchor is e and justify is left, and that the message window is much larger than needed for the text. The the text will displayed so that the left edges of all the lines line up and the right edge of the longest line is padX from the right side of the window; the entire text block will be centered in the vertical span of the window.

Name: width

Class: Width

Switch: -width

Specifies the length of lines in the window. The value may have any of the forms acceptable to Tk_GetPixels. If this option has a value greater than zero then the aspect option is ignored and the width option determines the line length. If this option has a value less than or equal to zero, then the aspect option determines the line length.

DESCRIPTION

The Message method creates a new window (given by the $widget argument) and makes it into a message widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the message such as its colors, font, text, and initial relief. The message command returns its $widget argument. At the time this command is invoked, there must not exist a window named $widget, but $widget’s parent must exist.

A message is a widget that displays a textual string. A message widget has three special features. First, it breaks up its string into lines in order to produce a given aspect ratio for the window. The line breaks are chosen at word boundaries wherever possible (if not even a single word would fit on a line, then the word will be split across lines). Newline characters in the string will force line breaks; they can be used, for example, to leave blank lines in the display.

The second feature of a message widget is justification. The text may be displayed left-justified (each line starts at the left side of the window), centered on a line-by-line basis, or right-justified (each line ends at the right side of the window).

The third feature of a message widget is that it handles control characters and non-printing characters specially. Tab characters are replaced with enough blank space to line up on the next 8-character boundary. Newlines cause line breaks. Other control characters (ASCII code less than 0x20) and characters not defined in the font are displayed as a four-character sequence \xhh where hh is the two-digit hexadecimal number corresponding to the character. In the unusual case where the font doesn’t contain all of the characters in ``0123456789abcdef\x’’ then control characters and undefined characters are not displayed at all.

WIDGET METHODS

The Message method creates a widget object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class.

DEFAULT BINDINGS

When a new message is created, it has no default event bindings: messages are intended for output purposes only.

BUGS

Tabs don’t work very well with text that is centered or right-justified. The most common result is that the line is justified wrong.

KEYWORDS

message, widget

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2198 - Linux cli command warnx

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command warnx and provides detailed information about the command warnx, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the warnx.

NAME 🖥️ warnx 🖥️

formatted error messages

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <err.h>
[[noreturn]] void err(int eval, const char *fmt, ...);
[[noreturn]] void errx(int eval, const char *fmt, ...);
void warn(const char *fmt, ...);
void warnx(const char *fmt, ...);
#include <stdarg.h>
[[noreturn]] void verr(int eval, const char *fmt, va_list args);
[[noreturn]] void verrx(int eval, const char *fmt, va_list args);
void vwarn(const char *fmt, va_list args);
void vwarnx(const char *fmt, va_list args);

DESCRIPTION

The err() and warn() family of functions display a formatted error message on the standard error output. In all cases, the last component of the program name, a colon character, and a space are output. If the fmt argument is not NULL, the printf(3)-like formatted error message is output. The output is terminated by a newline character.

The err(), verr(), warn(), and vwarn() functions append an error message obtained from strerror(3) based on the global variable errno, preceded by another colon and space unless the fmt argument is NULL.

The errx() and warnx() functions do not append an error message.

The err(), verr(), errx(), and verrx() functions do not return, but exit with the value of the argument eval.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

err(), errx(), warn(), warnx(), verr(), verrx(), vwarn(), vwarnx()

Thread safetyMT-Safe locale

STANDARDS

BSD.

HISTORY

err()
warn()
4.4BSD.

EXAMPLES

Display the current errno information string and exit:

p = malloc(size);
if (p == NULL)
    err(EXIT_FAILURE, NULL);
fd = open(file_name, O_RDONLY, 0);
if (fd == -1)
    err(EXIT_FAILURE, "%s", file_name);

Display an error message and exit:

if (tm.tm_hour < START_TIME)
    errx(EXIT_FAILURE, "too early, wait until %s",
            start_time_string);

Warn of an error:

fd = open(raw_device, O_RDONLY, 0);
if (fd == -1)
    warnx("%s: %s: trying the block device",
            raw_device, strerror(errno));
fd = open(block_device, O_RDONLY, 0);
if (fd == -1)
    err(EXIT_FAILURE, "%s", block_device);

SEE ALSO

error(3), exit(3), perror(3), printf(3), strerror(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2199 - Linux cli command iswpunct

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command iswpunct and provides detailed information about the command iswpunct, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the iswpunct.

NAME 🖥️ iswpunct 🖥️

test for punctuation or symbolic wide character

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wctype.h>
int iswpunct(wint_t wc);

DESCRIPTION

The iswpunct() function is the wide-character equivalent of the ispunct(3) function. It tests whether wc is a wide character belonging to the wide-character class “punct”.

The wide-character class “punct” is a subclass of the wide-character class “graph”, and therefore also a subclass of the wide-character class “print”.

The wide-character class “punct” is disjoint from the wide-character class “alnum” and therefore also disjoint from its subclasses “alpha”, “upper”, “lower”, “digit”, “xdigit”.

Being a subclass of the wide-character class “print”, the wide-character class “punct” is disjoint from the wide-character class “cntrl”.

Being a subclass of the wide-character class “graph”, the wide-character class “punct” is disjoint from the wide-character class “space” and its subclass “blank”.

RETURN VALUE

The iswpunct() function returns nonzero if wc is a wide-character belonging to the wide-character class “punct”. Otherwise, it returns zero.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

iswpunct()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of iswpunct() depends on the LC_CTYPE category of the current locale.

This function’s name is a misnomer when dealing with Unicode characters, because the wide-character class “punct” contains both punctuation characters and symbol (math, currency, etc.) characters.

SEE ALSO

ispunct(3), iswctype(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2200 - Linux cli command XtCreatePopupShell

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtCreatePopupShell and provides detailed information about the command XtCreatePopupShell, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtCreatePopupShell.

NAME 🖥️ XtCreatePopupShell 🖥️

create a popup shell

SYNTAX

#include <X11/Intrinsic.h>

Widget XtCreatePopupShell(const char *name, WidgetClass widget_class, Widget parent, ArgList args, Cardinal num_args);

Widget XtVaCreatePopupShell(const char *name, WidgetClass widget_class, Widget parent, … );

ARGUMENTS

args
Specifies the argument list to override the resource defaults.

name
Specifies the text name for the created shell widget.

num_args
Specifies the number of arguments in the argument list.

parent
Specifies the parent widget.

widget_class
Specifies the widget class pointer for the created shell widget.


Specifies the variable argument list to override the resource defaults.

DESCRIPTION

The XtCreatePopupShell function ensures that the specified class is a subclass of Shell and, rather than using insert_child to attach the widget to the parent’s children list, attaches the shell to the parent’s pop-ups list directly.

A spring-loaded pop-up invoked from a translation table already must exist at the time that the translation is invoked, so the translation manager can find the shell by name. Pop-ups invoked in other ways can be created on-the-fly when the pop-up actually is needed. This delayed creation of the shell is particularly useful when you pop up an unspecified number of pop-ups. You can look to see if an appropriate unused shell (that is, not currently popped up) exists and create a new shell if needed.

SEE ALSO

XtCreateWidget(3), XtPopdown(3), XtPopup(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2201 - Linux cli command PA_CHARconst

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command PA_CHARconst and provides detailed information about the command PA_CHARconst, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the PA_CHARconst.

NAME 🖥️ PA_CHARconst 🖥️

define custom behavior for printf-like functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <printf.h>
int register_printf_specifier(int spec, printf_function func,
 printf_arginfo_size_function arginfo);
int register_printf_modifier(const wchar_t *str);
int register_printf_type(printf_va_arg_function fct);

Callbacks

typedef int printf_function(FILE *stream, const struct printf_info *info,
 const void *const args[]);
typedef int printf_arginfo_size_function(const struct printf_info *info,
 size_t n, int argtypes[n], int size[n]);
typedef void printf_va_arg_function(void *mem, va_list *ap);

Types

struct printf_info {
 int prec; // Precision
 int width; // Width
 wchar_t spec; // Format letter
 unsigned int is_long_double:1;// L or ll flag
 unsigned int is_short:1; // h flag
 unsigned int is_long:1; // l flag
 unsigned int alt:1; // # flag
 unsigned int space:1; // Space flag
 unsigned int left:1; // - flag
 unsigned int showsign:1; // + flag
 unsigned int group:1; // ' flag
 unsigned int extra:1; // For special use
 unsigned int is_char:1; // hh flag
 unsigned int wide:1; // True for wide character streams
 unsigned int i18n:1; // I flag
 unsigned int is_binary128:1; /* Floating-point argument is
  ABI-compatible with
  IEC 60559 binary128 */
 unsigned short user; // Bits for user-installed modifiers
 wchar_t pad; // Padding character
};

Constants

#define PA_FLAG_LONG_LONG /* ... */
#define PA_FLAG_LONG_DOUBLE /* ... */
#define PA_FLAG_LONG /* ... */
#define PA_FLAG_SHORT /* ... */
#define PA_FLAG_PTR /* ... */

DESCRIPTION

These functions serve to extend and/or modify the behavior of the printf(3) family of functions.

register_printf_specifier()

This function registers a custom conversion specifier for the printf(3) family of functions.

spec
The character which will be used as a conversion specifier in the format string.

func
Callback function that will be executed by the printf(3) family of functions to format the input arguments into the output stream.

stream
Output stream where the formatted output should be printed. This stream transparently represents the output, even in the case of functions that write to a string.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in arginfo.

args
Array of pointers to the arguments to the printf(3) -like function.

arginfo
Callback function that will be executed by the printf(3) family of functions to know how many arguments should be parsed for the custom specifier and also their types.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in func.

n
Number of arguments remaining to be parsed.

argtypes
This array should be set to define the type of each of the arguments that will be parsed. Each element in the array represents one of the arguments to be parsed, in the same order that they are passed to the printf(3) -like function. Each element should be set to a base type (PA_*) from the enum above, or a custom one, and optionally ORed with an appropriate length modifier (PA_FLAG_*).

The type is determined by using one of the following constants:

PA_INT
int.

PA_CHAR
int, cast to char.

PA_WCHAR
wchar_t.

PA_STRING
const char *, a ‘�’-terminated string.

PA_WSTRING
const wchar_t *, a wide character L’�’-terminated string.

PA_POINTER
void *.

PA_FLOAT
float.

PA_DOUBLE
double.

PA_LAST
TODO.

size
For user-defined types, the size of the type (in bytes) should also be specified through this array. Otherwise, leave it unused.

arginfo is called before func, and prepares some information needed to call func.

register_printf_modifier()

TODO

register_printf_type()

TODO

RETURN VALUE

register_printf_specifier(), register_printf_modifier(), and register_printf_type() return zero on success, or -1 on error.

Callbacks

The callback of type printf_function should return the number of characters written, or -1 on error.

The callback of type printf_arginfo_size_function should return the number of arguments to be parsed by this specifier. It also passes information about the type of those arguments to the caller through argtypes. On error, it should return -1.

ERRORS

EINVAL
The specifier was not a valid character.

STANDARDS

GNU.

HISTORY

register_printf_function(3) is an older function similar to register_printf_specifier(), and is now deprecated. That function can’t handle user-defined types.

register_printf_specifier() supersedes register_printf_function(3).

EXAMPLES

The following example program registers the ‘b’ and ‘B’ specifiers to print integers in binary format, mirroring rules for other unsigned conversion specifiers like ‘x’ and ‘u’. This can be used to print in binary prior to C23.

/* This code is in the public domain */
#include <err.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <printf.h>
#define GROUP_SEP  '\''
struct Printf_Pad {
    char    ch;
    size_t  len;
};
static int b_printf(FILE *stream, const struct printf_info *info,
                    const void *const args[]);
static int b_arginf_sz(const struct printf_info *info,
                    size_t n, int argtypes[n], int size[n]);
static uintmax_t b_value(const struct printf_info *info,
                    const void *arg);
static size_t b_bin_repr(char bin[UINTMAX_WIDTH],
                    const struct printf_info *info, const void *arg);
static size_t b_bin_len(const struct printf_info *info,
                    ptrdiff_t min_len);
static size_t b_pad_len(const struct printf_info *info,
                    ptrdiff_t bin_len);
static ssize_t b_print_prefix(FILE *stream,
                    const struct printf_info *info);
static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info,
                    ptrdiff_t min_len);
static ssize_t b_print_number(FILE *stream,
                    const struct printf_info *info,
                    const char bin[UINTMAX_WIDTH],
                    size_t min_len, size_t bin_len);
static char pad_ch(const struct printf_info *info);
static ssize_t pad_spaces(FILE *stream, size_t pad_len);
int
main(void)
{
    if (register_printf_specifier('b', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('b', ...)");
    if (register_printf_specifier('B', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('B', ...)");
    printf("....----....----....----....----

“); printf("%llb; “, 0x5Ellu); printf("%lB; “, 0x5Elu); printf("%b; “, 0x5Eu); printf("%hB; “, 0x5Eu); printf("%hhb; “, 0x5Eu); printf("%jb; “, (uintmax_t)0x5E); printf("%zb; “, (size_t)0x5E); printf(”….—-….—-….—-….—- “); printf(”%#b; “, 0x5Eu); printf(”%#B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf("%10b; “, 0x5Eu); printf("%010b; “, 0x5Eu); printf(”%.10b; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%-10B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%‘B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”….—-….—-….—-….—- “); printf(”%#16.12b; “, 0xAB); printf(”%-#‘20.12b; “, 0xAB); printf(”%#‘020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#020B; “, 0xAB); printf(”%‘020B; “, 0xAB); printf("%020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#021B; “, 0xAB); printf(”%‘021B; “, 0xAB); printf("%021B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#022B; “, 0xAB); printf(”%‘022B; “, 0xAB); printf("%022B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#023B; “, 0xAB); printf(”%‘023B; “, 0xAB); printf("%023B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%-#‘19.11b; “, 0xAB); printf(”%#‘019B; “, 0xAB); printf(”%#019B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%‘019B; “, 0xAB); printf("%019B; “, 0xAB); printf(”%#016b; “, 0xAB); printf(”….—-….—-….—-….—- “); return 0; } static int b_printf(FILE *stream, const struct printf_info *info, const void const args[]) { char bin[UINTMAX_WIDTH]; size_t min_len, bin_len; ssize_t len, tmp; struct Printf_Pad pad = {0}; len = 0; min_len = b_bin_repr(bin, info, args[0]); bin_len = b_bin_len(info, min_len); pad.ch = pad_ch(info); if (pad.ch == ’ ‘) pad.len = b_pad_len(info, bin_len); / Padding with ’ ’ (right aligned) / if ((pad.ch == ’ ‘) && !info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } / “0b”/“0B” prefix / if (info->alt) { tmp = b_print_prefix(stream, info); if (tmp == EOF) return EOF; len += tmp; } / Padding with ‘0’ / if (pad.ch == ‘0’) { tmp = b_pad_zeros(stream, info, min_len); if (tmp == EOF) return EOF; len += tmp; } / Print number (including leading 0s to fill precision) / tmp = b_print_number(stream, info, bin, min_len, bin_len); if (tmp == EOF) return EOF; len += tmp; / Padding with ’ ’ (left aligned) */ if (info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } return len; } static int b_arginf_sz(const struct printf_info *info, size_t n, int argtypes[n], [[maybe_unused]] int size[n]) { if (n < 1) return -1; if (info->is_long_double) argtypes[0] = PA_INT | PA_FLAG_LONG_LONG; else if (info->is_long) argtypes[0] = PA_INT | PA_FLAG_LONG; else argtypes[0] = PA_INT; return 1; } static uintmax_t b_value(const struct printf_info *info, const void *arg) { if (info->is_long_double) return *(const unsigned long long *)arg; if (info->is_long) return *(const unsigned long )arg; / short and char are both promoted to int */ return *(const unsigned int *)arg; } static size_t b_bin_repr(char bin[UINTMAX_WIDTH], const struct printf_info *info, const void *arg) { size_t min_len; uintmax_t val; val = b_value(info, arg); bin[0] = ‘0’; for (min_len = 0; val; min_len++) { bin[min_len] = ‘0’ + (val % 2); val »= 1; } return MAX(min_len, 1); } static size_t b_bin_len(const struct printf_info *info, ptrdiff_t min_len) { return MAX(info->prec, min_len); } static size_t b_pad_len(const struct printf_info *info, ptrdiff_t bin_len) { ptrdiff_t pad_len; pad_len = info->width - bin_len; if (info->alt) pad_len -= 2; if (info->group) pad_len -= (bin_len - 1) / 4; return MAX(pad_len, 0); } static ssize_t b_print_prefix(FILE *stream, const struct printf_info *info) { ssize_t len; len = 0; if (fputc(‘0’, stream) == EOF) return EOF; len++; if (fputc(info->spec, stream) == EOF) return EOF; len++; return len; } static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info, ptrdiff_t min_len) { ssize_t len; ptrdiff_t tmp; len = 0; tmp = info->width - (info->alt * 2); if (info->group) tmp -= tmp / 5 - !(tmp % 5); for (ptrdiff_t i = tmp - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static ssize_t b_print_number(FILE *stream, const struct printf_info info, const char bin[UINTMAX_WIDTH], size_t min_len, size_t bin_len) { ssize_t len; len = 0; / Print leading zeros to fill precision / for (size_t i = bin_len - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } / Print number */ for (size_t i = min_len - 1; i < min_len; i–) { if (fputc(bin[i], stream) == EOF) return EOF; len++; if (!info->group || (i % 4) || !i) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static char pad_ch(const struct printf_info *info) { if ((info->prec != -1) || (info->pad == ’ ‘) || info->left) return ’ ‘; return ‘0’; } static ssize_t pad_spaces(FILE *stream, size_t pad_len) { ssize_t len; len = 0; for (size_t i = pad_len - 1; i < pad_len; i–) { if (fputc(’ ‘, stream) == EOF) return EOF; len++; } return len; }

SEE ALSO

asprintf(3), printf(3), wprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2202 - Linux cli command pthread_getaffinity_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_getaffinity_np and provides detailed information about the command pthread_getaffinity_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_getaffinity_np.

NAME 🖥️ pthread_getaffinity_np 🖥️

set/get CPU affinity of a thread

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <pthread.h>
int pthread_setaffinity_np(pthread_t thread, size_t cpusetsize,
 const cpu_set_t *cpuset);
int pthread_getaffinity_np(pthread_t thread, size_t cpusetsize,
 cpu_set_t *cpuset);

DESCRIPTION

The pthread_setaffinity_np() function sets the CPU affinity mask of the thread thread to the CPU set pointed to by cpuset. If the call is successful, and the thread is not currently running on one of the CPUs in cpuset, then it is migrated to one of those CPUs.

The pthread_getaffinity_np() function returns the CPU affinity mask of the thread thread in the buffer pointed to by cpuset.

For more details on CPU affinity masks, see sched_setaffinity(2). For a description of a set of macros that can be used to manipulate and inspect CPU sets, see CPU_SET(3).

The argument cpusetsize is the length (in bytes) of the buffer pointed to by cpuset. Typically, this argument would be specified as sizeof(cpu_set_t). (It may be some other value, if using the macros described in CPU_SET(3) for dynamically allocating a CPU set.)

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

EFAULT
A supplied memory address was invalid.

EINVAL
(pthread_setaffinity_np()) The affinity bit mask mask contains no processors that are currently physically on the system and permitted to the thread according to any restrictions that may be imposed by the “cpuset” mechanism described in cpuset(7).

EINVAL
(pthread_setaffinity_np()) cpuset specified a CPU that was outside the set supported by the kernel. (The kernel configuration option CONFIG_NR_CPUS defines the range of the set supported by the kernel data type used to represent CPU sets.)

EINVAL
(pthread_getaffinity_np()) cpusetsize is smaller than the size of the affinity mask used by the kernel.

ESRCH
No thread with the ID thread could be found.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_setaffinity_np(), pthread_getaffinity_np()

Thread safetyMT-Safe

STANDARDS

GNU; hence the suffix “_np” (nonportable) in the names.

HISTORY

glibc 2.3.4.

In glibc 2.3.3 only, versions of these functions were provided that did not have a cpusetsize argument. Instead the CPU set size given to the underlying system calls was always sizeof(cpu_set_t).

NOTES

After a call to pthread_setaffinity_np(), the set of CPUs on which the thread will actually run is the intersection of the set specified in the cpuset argument and the set of CPUs actually present on the system. The system may further restrict the set of CPUs on which the thread runs if the “cpuset” mechanism described in cpuset(7) is being used. These restrictions on the actual set of CPUs on which the thread will run are silently imposed by the kernel.

These functions are implemented on top of the sched_setaffinity(2) and sched_getaffinity(2) system calls.

A new thread created by pthread_create(3) inherits a copy of its creator’s CPU affinity mask.

EXAMPLES

In the following program, the main thread uses pthread_setaffinity_np() to set its CPU affinity mask to include CPUs 0 to 7 (which may not all be available on the system), and then calls pthread_getaffinity_np() to check the resulting CPU affinity mask of the thread.

#define _GNU_SOURCE
#include <err.h>
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    int s;
    cpu_set_t cpuset;
    pthread_t thread;
    thread = pthread_self();
    /* Set affinity mask to include CPUs 0 to 7. */
    CPU_ZERO(&cpuset);
    for (size_t j = 0; j < 8; j++)
        CPU_SET(j, &cpuset);
    s = pthread_setaffinity_np(thread, sizeof(cpuset), &cpuset);
    if (s != 0)
        errc(EXIT_FAILURE, s, "pthread_setaffinity_np");
    /* Check the actual affinity mask assigned to the thread. */
    s = pthread_getaffinity_np(thread, sizeof(cpuset), &cpuset);
    if (s != 0)
        errc(EXIT_FAILURE, s, "pthread_getaffinity_np");
    printf("Set returned by pthread_getaffinity_np() contained:

“); for (size_t j = 0; j < CPU_SETSIZE; j++) if (CPU_ISSET(j, &cpuset)) printf(” CPU %zu “, j); exit(EXIT_SUCCESS); }

SEE ALSO

sched_setaffinity(2), CPU_SET(3), pthread_attr_setaffinity_np(3), pthread_self(3), sched_getcpu(3), cpuset(7), pthreads(7), sched(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2203 - Linux cli command pthread_spin_unlock

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_spin_unlock and provides detailed information about the command pthread_spin_unlock, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_spin_unlock.

NAME 🖥️ pthread_spin_unlock 🖥️

lock and unlock a spin lock

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_spin_lock(pthread_spinlock_t *lock);
int pthread_spin_trylock(pthread_spinlock_t *lock);
int pthread_spin_unlock(pthread_spinlock_t *lock);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

pthread_spin_lock(), pthread_spin_trylock():

    _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The pthread_spin_lock() function locks the spin lock referred to by lock. If the spin lock is currently unlocked, the calling thread acquires the lock immediately. If the spin lock is currently locked by another thread, the calling thread spins, testing the lock until it becomes available, at which point the calling thread acquires the lock.

Calling pthread_spin_lock() on a lock that is already held by the caller or a lock that has not been initialized with pthread_spin_init(3) results in undefined behavior.

The pthread_spin_trylock() function is like pthread_spin_lock(), except that if the spin lock referred to by lock is currently locked, then, instead of spinning, the call returns immediately with the error EBUSY.

The pthread_spin_unlock() function unlocks the spin lock referred to lock. If any threads are spinning on the lock, one of those threads will then acquire the lock.

Calling pthread_spin_unlock() on a lock that is not held by the caller results in undefined behavior.

RETURN VALUE

On success, these functions return zero. On failure, they return an error number.

ERRORS

pthread_spin_lock() may fail with the following errors:

EDEADLOCK
The system detected a deadlock condition.

pthread_spin_trylock() fails with the following errors:

EBUSY
The spin lock is currently locked by another thread.

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.2. POSIX.1-2001.

CAVEATS

Applying any of the functions described on this page to an uninitialized spin lock results in undefined behavior.

Carefully read NOTES in pthread_spin_init(3).

SEE ALSO

pthread_spin_destroy(3), pthread_spin_init(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2204 - Linux cli command XtCreateApplicationContext

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtCreateApplicationContext and provides detailed information about the command XtCreateApplicationContext, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtCreateApplicationContext.

NAME 🖥️ XtCreateApplicationContext 🖥️

create, destroy, and obtain an application context

SYNTAX

#include <X11/Intrinsic.h>

XtAppContext XtCreateApplicationContext(void);

void XtDestroyApplicationContext(XtAppContext app_context);

XtAppContext XtWidgetToApplicationContext(Widget w);

void XtToolkitInitialize(void);

ARGUMENTS

app_context
Specifies the application context.

  1. Specifies the widget that you want the application context for.

DESCRIPTION

The XtCreateApplicationContext function returns an application context, which is an opaque type. Every application must have at least one application context.

The XtDestroyApplicationContext function destroys the specified application context as soon as it is safe to do so. If called from with an event dispatch (for example, a callback procedure), XtDestroyApplicationContext does not destroy the application context until the dispatch is complete.

The XtWidgetToApplicationContext function returns the application context for the specified widget.

The XtToolkitInitialize function initializes the Intrinsics internals. If XtToolkitInitialize was previously called it returns immediately.

SEE ALSO

XtDisplayInitialize(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2205 - Linux cli command INFINITY

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command INFINITY and provides detailed information about the command INFINITY, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the INFINITY.

NAME 🖥️ INFINITY 🖥️

floating-point constants

LIBRARY

Math library (libm)

SYNOPSIS

#define _ISOC99_SOURCE /* See feature_test_macros(7) */
#include <math.h>
INFINITY
NAN
HUGE_VAL
HUGE_VALF
HUGE_VALL

DESCRIPTION

The macro INFINITY expands to a float constant representing positive infinity.

The macro NAN expands to a float constant representing a quiet NaN (when supported). A quiet NaN is a NaN (“not-a-number”) that does not raise exceptions when it is used in arithmetic. The opposite is a signaling NaN. See IEC 60559:1989.

The macros HUGE_VAL, HUGE_VALF, HUGE_VALL expand to constants of types double, float, and long double, respectively, that represent a large positive value, possibly positive infinity.

STANDARDS

C11.

HISTORY

C99.

On a glibc system, the macro HUGE_VAL is always available. Availability of the NAN macro can be tested using #ifdef NAN, and similarly for INFINITY, HUGE_VALF, HUGE_VALL. They will be defined by <math.h> if _ISOC99_SOURCE or _GNU_SOURCE is defined, or __STDC_VERSION__ is defined and has a value not less than 199901L.

SEE ALSO

fpclassify(3), math_error(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2206 - Linux cli command inet_ntop

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command inet_ntop and provides detailed information about the command inet_ntop, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the inet_ntop.

NAME 🖥️ inet_ntop 🖥️

convert IPv4 and IPv6 addresses from binary to text form

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <arpa/inet.h>
const char *inet_ntop(int af, const void *restrict src,
 char dst[restrict .size], socklen_t size);

DESCRIPTION

This function converts the network address structure src in the af address family into a character string. The resulting string is copied to the buffer pointed to by dst, which must be a non-null pointer. The caller specifies the number of bytes available in this buffer in the argument size.

inet_ntop() extends the inet_ntoa(3) function to support multiple address families, inet_ntoa(3) is now considered to be deprecated in favor of inet_ntop(). The following address families are currently supported:

AF_INET
src points to a struct in_addr (in network byte order) which is converted to an IPv4 network address in the dotted-decimal format, “ddd.ddd.ddd.ddd”. The buffer dst must be at least INET_ADDRSTRLEN bytes long.

AF_INET6
src points to a struct in6_addr (in network byte order) which is converted to a representation of this address in the most appropriate IPv6 network address format for this address. The buffer dst must be at least INET6_ADDRSTRLEN bytes long.

RETURN VALUE

On success, inet_ntop() returns a non-null pointer to dst. NULL is returned if there was an error, with errno set to indicate the error.

ERRORS

EAFNOSUPPORT
af was not a valid address family.

ENOSPC
The converted address string would exceed the size given by size.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

inet_ntop()

Thread safetyMT-Safe locale

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

Note that RFC 2553 defines a prototype where the last argument size is of type size_t. Many systems follow RFC 2553. glibc 2.0 and 2.1 have size_t, but 2.2 and later have socklen_t.

BUGS

AF_INET6 converts IPv4-mapped IPv6 addresses into an IPv6 format.

EXAMPLES

See inet_pton(3).

SEE ALSO

getnameinfo(3), inet(3), inet_pton(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2207 - Linux cli command XtHooksOfDisplay

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtHooksOfDisplay and provides detailed information about the command XtHooksOfDisplay, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtHooksOfDisplay.

NAME 🖥️ XtHooksOfDisplay 🖥️

external agent access points

SYNTAX

#include <X11/Intrinsic.h>

Widget XtHooksOfDisplay(Display* display);

ARGUMENTS

display
Specifies the desired display.

DESCRIPTION

The class of this object is a private, implementation dependent, subclass of Object. The hook object has no parent. The resources of this object are the callback lists for hooks and the read-only resources for getting a list of parentless shells.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2208 - Linux cli command Net_SNMPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_SNMPpm and provides detailed information about the command Net_SNMPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_SNMPpm.

NAME 🖥️ Net_SNMPpm 🖥️

Object oriented interface to SNMP

SYNOPSIS

The Net::SNMP module implements an object oriented interface to the Simple Network Management Protocol. Perl applications can use the module to retrieve or update information on a remote host using the SNMP protocol. The module supports SNMP version-1, SNMP version-2c (Community-Based SNMPv2), and SNMP version-3. The Net::SNMP module assumes that the user has a basic understanding of the Simple Network Management Protocol and related network management concepts.

DESCRIPTION

The Net::SNMP module abstracts the intricate details of the Simple Network Management Protocol by providing a high level programming interface to the protocol. Each Net::SNMP object provides a one-to-one mapping between a Perl object and a remote SNMP agent or manager. Once an object is created, it can be used to perform the basic protocol exchange actions defined by SNMP.

A Net::SNMP object can be created such that it has either blocking or non-blocking properties. By default, the methods used to send SNMP messages do not return until the protocol exchange has completed successfully or a timeout period has expired. This behavior gives the object a blocking property because the flow of the code is stopped until the method returns.

The optional named argument -nonblocking can be passed to the object constructor with a true value to give the object non-blocking behavior. A method invoked by a non-blocking object queues the SNMP message and returns immediately, allowing the flow of the code to continue. The queued SNMP messages are not sent until an event loop is entered by calling the snmp_dispatcher() method. When the SNMP messages are sent, any response to the messages invokes the subroutine defined by the user when the message was originally queued. The event loop exits when all messages have been removed from the queue by either receiving a response, or by exceeding the number of retries at the Transport Layer.

Blocking Objects

The default behavior of the methods associated with a Net::SNMP object is to block the code flow until the method completes. For methods that initiate a SNMP protocol exchange requiring a response, a hash reference containing the results of the query is returned. The undefined value is returned by all methods when a failure has occurred. The error() method can be used to determine the cause of the failure.

The hash reference returned by a SNMP protocol exchange points to a hash constructed from the VarBindList contained in the SNMP response message. The hash is created using the ObjectName and the ObjectSyntax pairs in the VarBindList. The keys of the hash consist of the OBJECT IDENTIFIERs in dotted notation corresponding to each ObjectName in the VarBindList. The value of each hash entry is set equal to the value of the corresponding ObjectSyntax. This hash reference can also be retrieved using the var_bind_list() method.

Non-blocking Objects

When a Net::SNMP object is created having non-blocking behavior, the invocation of a method associated with the object returns immediately, allowing the flow of the code to continue. When a method is invoked that would initiate a SNMP protocol exchange requiring a response, either a true value (i.e. 0x1) is returned immediately or the undefined value is returned if there was a failure. The error() method can be used to determine the cause of the failure.

The contents of the VarBindList contained in the SNMP response message can be retrieved by calling the var_bind_list() method using the object reference passed as the first argument to the callback. The value returned by the var_bind_list() method is a hash reference created using the ObjectName and the ObjectSyntax pairs in the VarBindList. The keys of the hash consist of the OBJECT IDENTIFIERs in dotted notation corresponding to each ObjectName in the VarBindList. The value of each hash entry is set equal to the value of the corresponding ObjectSyntax. The undefined value is returned if there has been a failure and the error() method may be used to determine the reason.

METHODS

When named arguments are expected by the methods, two different styles are supported. All examples in this documentation use the dashed-option style:

$object->method(-argument => $value);

However, the IO:: style is also allowed:

$object->method(Argument => $value);

Non-blocking Objects Arguments
When a Net::SNMP object has been created with a non-blocking property, most methods that generate a SNMP message take additional arguments to support this property.

Callback
Most methods associated with a non-blocking object have an optional named argument called -callback. The -callback argument expects a reference to a subroutine or to an array whose first element must be a reference to a subroutine. The subroutine defined by the -callback option is executed when a response to a SNMP message is received, an error condition has occurred, or the number of retries for the message has been exceeded. When the -callback argument only contains a subroutine reference, the subroutine is evaluated passing a reference to the original Net::SNMP object as the only parameter. If the -callback argument was defined as an array reference, all elements in the array are passed to subroutine after the reference to the Net::SNMP object. The first element, which is required to be a reference to a subroutine, is removed before the remaining arguments are passed to that subroutine. Once one method is invoked with the -callback argument, this argument stays with the object and is used by any further calls to methods using the -callback option if the argument is absent. The undefined value may be passed to the -callback argument to delete the callback. NOTE: The subroutine being passed with the -callback named argument should not cause blocking itself. This will cause all the actions in the event loop to be stopped, defeating the non-blocking property of the Net::SNMP module.

Delay
An optional argument -delay can also be passed to non-blocking objects. The -delay argument instructs the object to wait the number of seconds passed to the argument before executing the SNMP protocol exchange. The delay period starts when the event loop is entered. The -delay parameter is applied to all methods associated with the object once it is specified. The delay value must be set back to 0 seconds to disable the delay parameter.

SNMPv3 Arguments
A SNMP context is a collection of management information accessible by a SNMP entity. An item of management information may exist in more than one context and a SNMP entity potentially has access to many contexts. The combination of a contextEngineID and a contextName unambiguously identifies a context within an administrative domain. In a SNMPv3 message, the contextEngineID and contextName are included as part of the scopedPDU. All methods that generate a SNMP message optionally take a -contextengineid and -contextname argument to configure these fields.

Context Engine ID
The -contextengineid argument expects a hexadecimal string representing the desired contextEngineID. The string must be 10 to 64 characters (5 to 32 octets) long and can be prefixed with an optional 0x. Once the -contextengineid is specified it stays with the object until it is changed again or reset to default by passing in the undefined value. By default, the contextEngineID is set to match the authoritativeEngineID of the authoritative SNMP engine.

Context Name
The contextName is passed as a string which must be 0 to 32 octets in length using the -contextname argument. The contextName stays with the object until it is changed. The contextName defaults to an empty string which represents the default context.

session() - create a new Net::SNMP object

($session, $error) = Net::SNMP->session( [-hostname => $hostname,] [-port => $port,] [-localaddr => $localaddr,] [-localport => $localport,] [-nonblocking => $boolean,] [-version => $version,] [-domain => $domain,] [-timeout => $seconds,] [-retries => $count,] [-maxmsgsize => $octets,] [-translate => $translate,] [-debug => $bitmask,] [-community => $community,] # v1/v2c [-username => $username,] # v3 [-authkey => $authkey,] # v3 [-authpassword => $authpasswd,] # v3 [-authprotocol => $authproto,] # v3 [-privkey => $privkey,] # v3 [-privpassword => $privpasswd,] # v3 [-privprotocol => $privproto,] # v3 );

This is the constructor for Net::SNMP objects. In scalar context, a reference to a new Net::SNMP object is returned if the creation of the object is successful. In list context, a reference to a new Net::SNMP object and an empty error message string is returned. If a failure occurs, the object reference is returned as the undefined value. The error string may be used to determine the cause of the error.

Most of the named arguments passed to the constructor define basic attributes for the object and are not modifiable after the object has been created. The -timeout, -retries, -maxmsgsize, -translate, and -debug arguments are modifiable using an accessor method. See their corresponding method definitions for a complete description of their usage, default values, and valid ranges.

Transport Domain Arguments
The Net::SNMP module uses UDP/IPv4 as the default Transport Domain to exchange SNMP messages between the local and remote devices. The module also supports UDP/IPv6, TCP/IPv4, and TCP/IPv6 as alternative Transport Domains. The -domain argument can be used to change the Transport Domain by setting the value to one of the following strings: ‘udp6’, ‘udp/ipv6’; ’tcp’, ’tcp4’, ’tcp/ipv4’; ’tcp6’, or ’tcp/ipv6’. The -domain argument also accepts the strings ‘udp’, ‘udp4’, or ‘udp/ipv4’ which correspond to the default Transport Domain of UDP/IPv4. The transport address of the destination SNMP device can be specified using the -hostname argument. This argument is optional and defaults to localhost. The destination port number can be specified as part of the transport address or by using the -port argument. Either a numeric port number or a textual service name can be specified. A numeric port number in parentheses can optionally follow the service name. This port number will be used if the service name cannot be resolved. If the destination port number is not specified, the well-known SNMP port number 161 is used. By default the source transport address and port number are assigned dynamically by the local device on which the Net::SNMP module is being used. This dynamic assignment can be overridden by using the -localaddr and -localport arguments. These arguments accept the same values as the -hostname and -port arguments respectively. The resolved address must correspond to a valid address of an interface on the local device. When using an IPv4 Transport Domain, the transport address can be specified as either an IP network hostname or an IPv4 address in standard dotted notation. The port information can be optionally appended to the hostname or address delimited by a colon. The accepted IPv4 transport address formats are address, address:port, hostname, and hostname:port. When using an IPv6 Transport Domain, the transport address can be specified as an IP hostname (which will be looked up as a DNS quad-A record) or an IPv6 address in presentation format. The port information can optionally be included following a colon after the hostname or address. When including this information after an IPv6 address, the address must be enclosed in square brackets. The scope zone index (described in RFC 4007) can be specified after the address as a decimal value delimited by a percent sign. The accepted transport address formats for IPv6 are address, address%zone, [address]:port, [address%zone]:port, hostname, and hostname:port.

Security Model Arguments
The -version argument controls which other arguments are expected or required by the session() constructor. The Net::SNMP module supports SNMPv1, SNMPv2c, and SNMPv3. The module defaults to SNMPv1 if no -version argument is specified. The -version argument expects either a digit (i.e. ‘1’, ‘2’, or ‘3’) or a string specifying the version (i.e. ‘snmpv1’, ‘snmpv2c’, or ‘snmpv3’) to define the SNMP version. The Security Model used by the Net::SNMP object is based on the SNMP version associated with the object. If the SNMP version is SNMPv1 or SNMPv2c a Community-based Security Model will be used, while the User-based Security Model (USM) will be used if the version is SNMPv3.

Community-based Security Model Argument
If the Security Model is Community-based, the only argument available is the -community argument. This argument expects a string that is to be used as the SNMP community name. By default the community name is set to ‘public’ if the argument is not present.

User-based Security Model Arguments
The User-based Security Model (USM) used by SNMPv3 requires that a securityName be specified using the -username argument. The creation of a Net::SNMP object with the version set to SNMPv3 will fail if the -username argument is not present. The -username argument expects a string 1 to 32 octets in length. Different levels of security are allowed by the User-based Security Model which address authentication and privacy concerns. A SNMPv3 Net::SNMP object will derive the security level (securityLevel) based on which of the following arguments are specified. By default a securityLevel of ’noAuthNoPriv’ is assumed. If the -authkey or -authpassword arguments are specified, the securityLevel becomes ‘authNoPriv’. The -authpassword argument expects a string which is at least 1 octet in length. Optionally, the -authkey argument can be used so that a plain text password does not have to be specified in a script. The -authkey argument expects a hexadecimal string produced by localizing the password with the authoritativeEngineID for the specific destination device. The snmpkey utility included with the distribution can be used to create the hexadecimal string (see snmpkey). Two different hash algorithms are defined by SNMPv3 which can be used by the Security Model for authentication. These algorithms are HMAC-MD5-96 MD5 (RFC 1321) and HMAC-SHA-96 SHA-1 (NIST FIPS PUB 180-1). The default algorithm used by the module is HMAC-MD5-96. This behavior can be changed by using the -authprotocol argument. This argument expects either the string ‘md5’ or ‘sha’ to be passed to modify the hash algorithm. By specifying the arguments -privkey or -privpassword the securityLevel associated with the object becomes ‘authPriv’. According to SNMPv3, privacy requires the use of authentication. Therefore, if either of these two arguments are present and the -authkey or -authpassword arguments are missing, the creation of the object fails. The -privkey and -privpassword arguments expect the same input as the -authkey and -authpassword arguments respectively. The User-based Security Model described in RFC 3414 defines a single encryption protocol to be used for privacy. This protocol, CBC-DES DES (NIST FIPS PUB 46-1), is used by default or if the string ‘des’ is passed to the -privprotocol argument. The module also supports RFC 3826 which describes the use of CFB128-AES-128 AES (NIST FIPS PUB 197) in the USM. The AES encryption protocol can be selected by passing ‘aes’ or ‘aes128’ to the -privprotocol argument. By working with the Extended Security Options Consortium <http://www.snmp.com/protocol/eso.shtml>, the module also supports CBC-3DES-EDE Triple-DES (NIST FIPS 46-3) in the User-based Security Model. This is defined in the draft <http://www.snmp.com/eso/draft-reeder-snmpv3-usm-3desede-00.txt>. The Triple-DES encryption protocol can be selected using the -privprotocol argument with the string ‘3des’ or ‘3desede’.

close() - clear the Transport Domain associated with the object

$session->close();

This method clears the Transport Domain and any errors associated with the object. Once closed, the Net::SNMP object can no longer be used to send or receive SNMP messages.

snmp_dispatcher() - enter the non-blocking object event loop

$session->snmp_dispatcher();

This method enters the event loop associated with non-blocking Net::SNMP objects. The method exits when all queued SNMP messages have received a response or have timed out at the Transport Layer. This method is also exported as the stand alone function snmp_dispatcher() by default (see EXPORTS).

get_request() - send a SNMP get-request to the remote agent

$result = $session->get_request( [-callback => sub {},] # non-blocking [-delay => $seconds,] # non-blocking [-contextengineid => $engine_id,] # v3 [-contextname => $name,] # v3 -varbindlist => \oids, );

This method performs a SNMP get-request query to gather data from the remote agent on the host associated with the Net::SNMP object. The message is built using the list of OBJECT IDENTIFIERs in dotted notation passed to the method as an array reference using the -varbindlist argument. Each OBJECT IDENTIFIER is placed into a single SNMP GetRequest-PDU in the same order that it held in the original list.

A reference to a hash is returned in blocking mode which contains the contents of the VarBindList. In non-blocking mode, a true value is returned when no error has occurred. In either mode, the undefined value is returned when an error has occurred. The error() method may be used to determine the cause of the failure.

get_next_request() - send a SNMP get-next-request to the remote agent

$result = $session->get_next_request( [-callback => sub {},] # non-blocking [-delay => $seconds,] # non-blocking [-contextengineid => $engine_id,] # v3 [-contextname => $name,] # v3 -varbindlist => \oids, );

This method performs a SNMP get-next-request query to gather data from the remote agent on the host associated with the Net::SNMP object. The message is built using the list of OBJECT IDENTIFIERs in dotted notation passed to the method as an array reference using the -varbindlist argument. Each OBJECT IDENTIFER is placed into a single SNMP GetNextRequest-PDU in the same order that it held in the original list.

A reference to a hash is returned in blocking mode which contains the contents of the VarBindList. In non-blocking mode, a true value is returned when no error has occurred. In either mode, the undefined value is returned when an error has occurred. The error() method may be used to determine the cause of the failure.

set_request() - send a SNMP set-request to the remote agent

$result = $session->set_request( [-callback => sub {},] # non-blocking [-delay => $seconds,] # non-blocking [-contextengineid => $engine_id,] # v3 [-contextname => $name,] # v3 -varbindlist => \oid_value, );

This method is used to modify data on the remote agent that is associated with the Net::SNMP object using a SNMP set-request. The message is built using a list of values consisting of groups of an OBJECT IDENTIFIER, an object type, and the actual value to be set. This list is passed to the method as an array reference using the -varbindlist argument. The OBJECT IDENTIFIERs in each trio are to be in dotted notation. The object type is an octet corresponding to the ASN.1 type of value that is to be set. Each of the supported ASN.1 types have been defined and are exported by the package by default (see EXPORTS).

A reference to a hash is returned in blocking mode which contains the contents of the VarBindList. In non-blocking mode, a true value is returned when no error has occurred. In either mode, the undefined value is returned when an error has occurred. The error() method may be used to determine the cause of the failure.

trap() - send a SNMP trap to the remote manager

$result = $session->trap( [-delay => $seconds,] # non-blocking [-enterprise => $oid,] [-agentaddr => $ipaddress,] [-generictrap => $generic,] [-specifictrap => $specific,] [-timestamp => $timeticks,] -varbindlist => \oid_value, );

This method sends a SNMP trap to the remote manager associated with the Net::SNMP object. All arguments are optional and will be given the following defaults in the absence of a corresponding named argument:

  • The default value for the trap -enterprise is 1.3.6.1.4.1, which corresponds to iso.org.dod.internet.private.enterprises. The enterprise value is expected to be an OBJECT IDENTIFER in dotted notation.

  • When the Transport Domain is UDP/IPv4 or TCP/IPv4, the default value for the trap -agentaddr is the IP address associated with the interface on which the trap will be transmitted. For other Transport Domains the -agentaddr is defaulted to 0.0.0.0. When specified, the agent-addr is expected to be an IpAddress in dotted notation.

  • The default value for the -generictrap type is 6 which corresponds to enterpriseSpecific. The generic-trap types are defined and can be exported upon request (see EXPORTS).

  • The default value for the -specifictrap type is 0. No pre-defined values are available for specific-trap types.

  • The default value for the trap -timestamp is the uptime of the script. The uptime of the script is the number of hundredths of seconds that have elapsed since the script began running. The time-stamp is expected to be a TimeTicks number in hundredths of seconds.

  • The default value for the trap -varbindlist is an empty array reference. The variable-bindings are expected to be in an array format consisting of groups of an OBJECT IDENTIFIER, an object type, and the actual value of the object. This is identical to the list expected by the set_request() method. The OBJECT IDENTIFIERs in each trio are to be in dotted notation. The object type is an octet corresponding to the ASN.1 type for the value. Each of the supported types have been defined and are exported by default (see EXPORTS).

A true value is returned when the method is successful. The undefined value is returned when a failure has occurred. The error() method can be used to determine the cause of the failure. Since there are no acknowledgements for Trap-PDUs, there is no way to determine if the remote host actually received the trap.

NOTE: When the object is in non-blocking mode, the trap is not sent until the event loop is entered and no callback is ever executed.

NOTE: This method can only be used when the version of the object is set to SNMPv1.

get_bulk_request() - send a SNMP get-bulk-request to the remote agent

$result = $session->get_bulk_request( [-callback => sub {},] # non-blocking [-delay => $seconds,] # non-blocking [-contextengineid => $engine_id,] # v3 [-contextname => $name,] # v3 [-nonrepeaters => $non_reps,] [-maxrepetitions => $max_reps,] -varbindlist => \oids, );

This method performs a SNMP get-bulk-request query to gather data from the remote agent on the host associated with the Net::SNMP object. All arguments are optional except -varbindlist and will be given the following defaults in the absence of a corresponding named argument:

  • The default value for the get-bulk-request -nonrepeaters is 0. The non-repeaters value specifies the number of variables in the variable-bindings list for which a single successor is to be returned.

  • The default value for the get-bulk-request -maxrepetitions is 0. The max-repetitions value specifies the number of successors to be returned for the remaining variables in the variable-bindings list.

  • The -varbindlist argument expects an array reference consisting of a list of OBJECT IDENTIFIERs in dotted notation. Each OBJECT IDENTIFER is placed into a single SNMP GetBulkRequest-PDU in the same order that it held in the original list.

A reference to a hash is returned in blocking mode which contains the contents of the VarBindList. In non-blocking mode, a true value is returned when no error has occurred. In either mode, the undefined value is returned when an error has occurred. The error() method may be used to determine the cause of the failure.

NOTE: This method can only be used when the version of the object is set to SNMPv2c or SNMPv3.

inform_request() - send a SNMP inform-request to the remote manager

$result = $session->inform_request( [-callback => sub {},] # non-blocking [-delay => $seconds,] # non-blocking [-contextengineid => $engine_id,] # v3 [-contextname => $name,] # v3 -varbindlist => \oid_value, );

This method is used to provide management information to the remote manager associated with the Net::SNMP object using an inform-request. The message is built using a list of values consisting of groups of an OBJECT IDENTIFIER, an object type, and the actual value to be identified. This list is passed to the method as an array reference using the -varbindlist argument. The OBJECT IDENTIFIERs in each trio are to be in dotted notation. The object type is an octet corresponding to the ASN.1 type of value that is to be identified. Each of the supported ASN.1 types have been defined and are exported by the package by default (see EXPORTS).

The first two variable-bindings fields in the inform-request are specified by SNMPv2 and should be:

  • sysUpTime.0 - (‘1.3.6.1.2.1.1.3.0’, TIMETICKS, $timeticks)

  • snmpTrapOID.0 - (‘1.3.6.1.6.3.1.1.4.1.0’, OBJECT_IDENTIFIER, $oid)

A reference to a hash is returned in blocking mode which contains the contents of the VarBindList. In non-blocking mode, a true value is returned when no error has occurred. In either mode, the undefined value is returned when an error has occurred. The error() method may be used to determine the cause of the failure.

NOTE: This method can only be used when the version of the object is set to SNMPv2c or SNMPv3.

snmpv2_trap() - send a SNMP snmpV2-trap to the remote manager

$result = $session->snmpv2_trap( [-delay => $seconds,] # non-blocking -varbindlist => \oid_value, );

This method sends a snmpV2-trap to the remote manager associated with the Net::SNMP object. The message is built using a list of values consisting of groups of an OBJECT IDENTIFIER, an object type, and the actual value to be identified. This list is passed to the method as an array reference using the -varbindlist argument. The OBJECT IDENTIFIERs in each trio are to be in dotted notation. The object type is an octet corresponding to the ASN.1 type of value that is to be identified. Each of the supported ASN.1 types have been defined and are exported by the package by default (see EXPORTS).

The first two variable-bindings fields in the snmpV2-trap are specified by SNMPv2 and should be:

  • sysUpTime.0 - (‘1.3.6.1.2.1.1.3.0’, TIMETICKS, $timeticks)

  • snmpTrapOID.0 - (‘1.3.6.1.6.3.1.1.4.1.0’, OBJECT_IDENTIFIER, $oid)

A true value is returned when the method is successful. The undefined value is returned when a failure has occurred. The error() method can be used to determine the cause of the failure. Since there are no acknowledgements for SNMPv2-Trap-PDUs, there is no way to determine if the remote host actually received the snmpV2-trap.

NOTE: When the object is in non-blocking mode, the snmpV2-trap is not sent until the event loop is entered and no callback is ever executed.

NOTE: This method can only be used when the version of the object is set to SNMPv2c. SNMPv2-Trap-PDUs are supported by SNMPv3, but require the sender of the message to be an authoritative SNMP engine which is not currently supported by the Net::SNMP module.

get_table() - retrieve a table from the remote agent

$result = $session->get_table( [-callback => sub {},] # non-blocking [-delay => $seconds,] # non-blocking [-contextengineid => $engine_id,] # v3 [-contextname => $name,] # v3 -baseoid => $oid, [-maxrepetitions => $max_reps,] # v2c/v3 );

This method performs repeated SNMP get-next-request or get-bulk-request (when using SNMPv2c or SNMPv3) queries to gather data from the remote agent on the host associated with the Net::SNMP object. The first message sent is built using the OBJECT IDENTIFIER in dotted notation passed to the method by the -baseoid argument. Repeated SNMP requests are issued until the OBJECT IDENTIFIER in the response is no longer a child of the base OBJECT IDENTIFIER.

The -maxrepetitions argument can be used to specify the max-repetitions value that is passed to the get-bulk-requests when using SNMPv2c or SNMPv3. If this argument is not present, a value is calculated based on the maximum message size for the Net::SNMP object. If the value is set to 1 or less, get-next-requests will be used for the queries instead of get-bulk-requests.

A reference to a hash is returned in blocking mode which contains the contents of the VarBindList. In non-blocking mode, a true value is returned when no error has occurred. In either mode, the undefined value is returned when an error has occurred. The error() method may be used to determine the cause of the failure.

WARNING: Results from this method can become very large if the base OBJECT IDENTIFIER is close to the root of the SNMP MIB tree.

get_entries() - retrieve table entries from the remote agent

$result = $session->get_entries( [-callback => sub {},] # non-blocking [-delay => $seconds,] # non-blocking [-contextengineid => $engine_id,] # v3 [-contextname => $name,] # v3 -columns => \columns, [-startindex => $start,] [-endindex => $end,] [-maxrepetitions => $max_reps,] # v2c/v3 );

This method performs repeated SNMP get-next-request or get-bulk-request (when using SNMPv2c or SNMPv3) queries to gather data from the remote agent on the host associated with the Net::SNMP object. Each message specifically requests data for each OBJECT IDENTIFIER specified in the -columns array. The OBJECT IDENTIFIERs must correspond to column entries for a conceptual row in a table. They may however be columns in different tables as long as each table is indexed the same way. The optional -startindex and -endindex arguments may be specified to limit the query to specific rows in the table(s).

The -startindex can be specified as a single decimal value or in dotted notation if the index associated with the entry so requires. If the -startindex is specified, it will be include as part of the query results. If no -startindex is specified, the first request message will be sent without an index. To insure that the -startindex is included, the last sub-identifier in the index is decremented by one. If the last sub-identifier has a value of zero, the sub-identifier is removed from the index.

The optional -endindex argument can be specified as a single decimal value or in dotted notation. If the -endindex is specified, it will be included as part of the query results. If no -endindex is specified, repeated SNMP requests are issued until the response no longer returns entries matching any of the columns specified in the -columns array.

The -maxrepetitions argument can be used to specify the max-repetitions value that is passed to the get-bulk-requests when using SNMPv2c or SNMPv3. If this argument is not present, a value is calculated based on the maximum message size of the object and the number of columns specified in the -columns array. If the value is set to 1 or less, get-next-requests will be used for the queries instead of get-bulk-requests.

A reference to a hash is returned in blocking mode which contains the contents of the VarBindList. In non-blocking mode, a true value is returned when no error has occurred. In either mode, the undefined value is returned when an error has occurred. The error() method may be used to determine the cause of the failure.

version() - get the SNMP version from the object

$rfc_version = $session->version();

This method returns the current value for the SNMP version associated with the object. The returned value is the corresponding version number defined by the RFCs for the protocol version field (i.e. SNMPv1 == 0, SNMPv2c == 1, and SNMPv3 == 3). The RFC versions are defined as constant by the module and can be exported by request (see EXPORTS).

error() - get the current error message from the object

$error_message = $session->error();

This method returns a text string explaining the reason for the last error. An empty string is returned if no error has occurred.

hostname() - get the hostname associated with the object

$hostname = $session->hostname();

This method returns the parsed hostname string that is associated with the object. Any port information and formatting that can be included with the corresponding session() constructor argument will be stripped and not included as part of the returned string.

error_status() - get the current SNMP error-status from the object

$error_status = $session->error_status();

This method returns the numeric value of the error-status contained in the last SNMP message received by the object.

error_index() - get the current SNMP error-index from the object

$error_index = $session->error_index();

This method returns the numeric value of the error-index contained in the last SNMP message received by the object.

var_bind_list() - get the hash reference for the VarBindList values

$values = $session->var_bind_list();

This method returns a hash reference created using the ObjectName and the ObjectSyntax pairs in the VarBindList of the last SNMP message received by the object. The keys of the hash consist of the OBJECT IDENTIFIERs in dotted notation corresponding to each ObjectName in the VarBindList. If any of the OBJECT IDENTIFIERs passed to the request method began with a leading dot, all of the OBJECT IDENTIFIER hash keys will be prefixed with a leading dot. If duplicate OBJECT IDENTIFIERs are present in the VarBindList they will be padded with spaces to make them an unique hash key. The value of each hash entry is set equal to the value of the corresponding ObjectSyntax. The undefined value is returned if there has been a failure.

var_bind_names() - get the array of the ObjectNames in the VarBindList

@names = $session->var_bind_names();

This method returns an array containing the OBJECT IDENTIFIERs corresponding to the ObjectNames in the VarBindList in the order that they were received in the last SNMP message. The entries in the array will map directly to the keys in the hash reference returned by the methods that perform SNMP message exchanges and by the var_bind_list() and var_bind_types() methods. The array returned for the convenience methods get_table() and get_entries() will be in lexicographical order. An empty array is returned if there has been a failure.

var_bind_types() - get the hash reference for the VarBindList ASN.1 types

$types = $session->var_bind_types();

This method returns a hash reference created using the ObjectName and the ASN.1 type of the ObjectSyntax in the VarBindList of the last SNMP message received by the object. The keys of the hash consist of the OBJECT IDENTIFIERs in dotted notation corresponding to each ObjectName in the VarBindList. The value of each hash entry is set equal to the ASN.1 type of the corresponding ObjectSyntax. Constants for the supported ASN.1 types have been defined and are exported by the package by default (see EXPORTS). The undefined value is returned if there has been a failure.

timeout() - set or get the current timeout period for the object

$seconds = $session->timeout([$seconds]);

This method returns the current value for the Transport Layer timeout for the Net::SNMP object. This value is the number of seconds that the object will wait for a response from the agent on the remote host. The default timeout is 5.0 seconds.

If a parameter is specified, the timeout for the object is set to the provided value if it falls within the range 1.0 to 60.0 seconds. The undefined value is returned upon an error and the error() method may be used to determine the cause.

retries() - set or get the current retry count for the object

$count = $session->retries([$count]);

This method returns the current value for the number of times to retry sending a SNMP message to the remote host. The default number of retries is 1.

If a parameter is specified, the number of retries for the object is set to the provided value if it falls within the range 0 to 20. The undefined value is returned upon an error and the error() method may be used to determine the cause.

max_msg_size() - set or get the current maxMsgSize for the object

$octets = $session->max_msg_size([$octets]);

This method returns the current value for the maximum message size (maxMsgSize) for the Net::SNMP object. This value is the largest message size in octets that can be prepared or processed by the object. The default maxMsgSize is 1472 octets for UDP/IPv4, 1452 octets for UDP/IPv6, 1460 octets for TCP/IPv4, and 1440 octets for TCP/IPv6.

If a parameter is specified, the maxMsgSize is set to the provided value if it falls within the range 484 to 65535 octets. The undefined value is returned upon an error and the error() method may be used to determine the cause.

NOTE: When using SNMPv3, the maxMsgSize is actually contained in the SNMP message (as msgMaxSize). If the value received from a remote device is less than the current maxMsgSize, the size is automatically adjusted to be the lower value.

translate() - enable or disable the translation mode for the object

$mask = $session->translate([ $mode | [ # Perl anonymous ARRAY reference [-all => $mode0,] [-octetstring => $mode1,] [-null => $mode2,] [-timeticks => $mode3,] [-opaque => $mode4,] [-nosuchobject => $mode5,] [-nosuchinstance => $mode6,] [-endofmibview => $mode7,] [-unsigned => $mode8] ] ]);

When the object decodes the GetResponse-PDU that is returned in response to a SNMP message, certain values are translated into a more human readable form. By default the following translations occur:

  • OCTET STRINGs and Opaques containing any octet which is not part of the character set defined as a DisplayString in RFC 2679 are converted into a hexadecimal representation prefixed with 0x. The control codes NUL(0x00), BEL(0x07), BS(0x08), HT(0x09), LF(0x0A), VT(0x0b), FF(0x0C), and CR(0x0D) are part of the character set and will not trigger translation. The sequence ‘CR x’ for any x other than LF or NUL is illegal and will trigger translation.

  • TimeTicks integer values are converted to a time format.

  • NULL values return the string NULL instead of an empty string.

  • noSuchObject exception values return the string noSuchObject instead of an empty string.

  • noSuchInstance exception values return the string noSuchInstance instead of an empty string.

  • endOfMibView exception values return the string endOfMibView instead of an empty string.

  • Counter64, Counter, Gauge, and TimeTick values that have been incorrectly encoded as signed negative values are returned as unsigned values.

The translate() method can be invoked with two different types of arguments.

If the argument passed is any Perl variable type except an array reference, the translation mode for all ASN.1 types is set to either enabled or disabled, depending on the value of the passed parameter. Any value that Perl would treat as a true value will set the mode to be enabled for all types, while a false value will disable translation for all types.

A reference to an array can be passed to the translate() method in order to define the translation mode on a per ASN.1 type basis. The array is expected to contain a list of named argument pairs for each ASN.1 type that is to be modified. The arguments in the list are applied in the order that they are passed in via the array. Arguments at the end of the list supersede those passed earlier in the list. The argument -all can be used to specify that the mode is to apply to all ASN.1 types. Only the arguments for the ASN.1 types that are to be modified need to be included in the list.

The translate() method returns a bit mask indicating which ASN.1 types are to be translated. Definitions of the bit to ASN.1 type mappings can be exported using the :translate tag (see EXPORTS). The undefined value is returned upon an error and the error() method may be used to determine the cause.

debug() - set or get the debug mode for the module

$mask = $session->debug([$mask]);

This method is used to enable or disable debugging for the Net::SNMP module. Debugging can be enabled on a per component level as defined by a bit mask passed to the debug() method. The bit mask is broken up as follows:

  • 0x02 - Message or PDU encoding and decoding

  • 0x04 - Transport Layer

  • 0x08 - Dispatcher

  • 0x10 - Message Processing

  • 0x20 - Security

Symbols representing these bit mask values are defined by the module and can be exported using the :debug tag (see EXPORTS). If a non-numeric value is passed to the debug() method, it is evaluated in boolean context. Debugging for all of the components is then enabled or disabled based on the resulting truth value.

The current debugging mask is returned by the method. Debugging can also be enabled using the stand alone function snmp_debug(). This function can be exported by request (see EXPORTS).

SUBROUTINES

oid_base_match() - determine if an OID has a specified OID base

$value = oid_base_match($base_oid, $oid);

This function takes two OBJECT IDENTIFIERs in dotted notation and returns a true value (i.e. 0x1) if the second OBJECT IDENTIFIER is equal to or is a child of the first OBJECT IDENTIFIER in the SNMP Management Information Base (MIB). This function can be used in conjunction with the get-next-request() or get-bulk-request() methods to determine when a OBJECT IDENTIFIER in the GetResponse-PDU is no longer in the desired MIB tree branch.

oid_lex_cmp() - compare two OBJECT IDENTIFIERs lexicographically

$cmp = oid_lex_cmp($oid1, $oid2);

This function takes two OBJECT IDENTIFIERs in dotted notation and returns one of the values 1, 0, -1 if $oid1 is respectively lexicographically greater, equal, or less than $oid2.

oid_lex_sort() - sort a list of OBJECT IDENTIFIERs lexicographically

@sorted_oids = oid_lex_sort(@oids);

This function takes a list of OBJECT IDENTIFIERs in dotted notation and returns the listed sorted in lexicographical order.

snmp_type_ntop() - convert an ASN.1 type to presentation format

$text = snmp_type_ntop($type);

This function takes an ASN.1 type octet and returns a text string suitable for presentation. Some ASN.1 type definitions map to the same octet value when encoded. This method cannot distinguish between these multiple mappings and the most basic type name will be returned.

ticks_to_time() - convert TimeTicks to formatted time

$time = ticks_to_time($timeticks);

This function takes an ASN.1 TimeTicks value and returns a string representing the time defined by the value. The TimeTicks value is expected to be a non-negative integer value representing the time in hundredths of a second since some epoch. The returned string will display the time in days, hours, and seconds format according to the value of the TimeTicks argument.

EXPORTS

The Net::SNMP module uses the Exporter module to export useful constants and subroutines. These exportable symbols are defined below and follow the rules and conventions of the Exporter module (see Exporter).

Default
&snmp_dispatcher, INTEGER, INTEGER32, OCTET_STRING, OBJECT_IDENTIFIER, IPADDRESS, COUNTER, COUNTER32, GAUGE, GAUGE32, UNSIGNED32, TIMETICKS, OPAQUE, COUNTER64, NOSUCHOBJECT, NOSUCHINSTANCE, ENDOFMIBVIEW

Exportable
&snmp_debug, &snmp_dispatcher, &snmp_type_ntop, &oid_base_match, &oid_lex_cmp, &oid_lex_sort,&ticks_to_time, INTEGER, INTEGER32, OCTET_STRING, NULL, OBJECT_IDENTIFIER, SEQUENCE, IPADDRESS, COUNTER, COUNTER32, GAUGE, GAUGE32, UNSIGNED32, TIMETICKS, OPAQUE, COUNTER64, NOSUCHOBJECT, NOSUCHINSTANCE, ENDOFMIBVIEW, GET_REQUEST, GET_NEXT_REQUEST, GET_RESPONSE, SET_REQUEST, TRAP, GET_BULK_REQUEST, INFORM_REQUEST, SNMPV2_TRAP, REPORT, DEBUG_ALL, DEBUG_NONE, DEBUG_MESSAGE, DEBUG_TRANSPORT, DEBUG_DISPATCHER,DEBUG_PROCESSING, DEBUG_SECURITY, COLD_START, WARM_START, LINK_DOWN, LINK_UP, AUTHENTICATION_FAILURE, EGP_NEIGHBOR_LOSS, ENTERPRISE_SPECIFIC, SNMP_VERSION_1, SNMP_VERSION_2C, SNMP_VERSION_3, SNMP_PORT, SNMP_TRAP_PORT, TRANSLATE_NONE,TRANSLATE_OCTET_STRING, TRANSLATE_NULL, TRANSLATE_TIMETICKS, TRANSLATE_OPAQUE,TRANSLATE_NOSUCHOBJECT, TRANSLATE_NOSUCHINSTANCE, TRANSLATE_ENDOFMIBVIEW, TRANSLATE_UNSIGNED, TRANSLATE_ALL

Tags

:asn1

INTEGER, INTEGER32, OCTET_STRING, NULL, OBJECT_IDENTIFIER, SEQUENCE, IPADDRESS, COUNTER, COUNTER32, GAUGE, GAUGE32, UNSIGNED32, TIMETICKS, OPAQUE, COUNTER64, NOSUCHOBJECT, NOSUCHINSTANCE, ENDOFMIBVIEW, GET_REQUEST, GET_NEXT_REQUEST, GET_RESPONSE, SET_REQUEST, TRAP, GET_BULK_REQUEST, INFORM_REQUEST, SNMPV2_TRAP, REPORT

:debug
&snmp_debug, DEBUG_ALL, DEBUG_NONE, DEBUG_MESSAGE, DEBUG_TRANSPORT, DEBUG_DISPATCHER, DEBUG_PROCESSING, DEBUG_SECURITY

:generictrap
COLD_START, WARM_START, LINK_DOWN, LINK_UP, AUTHENTICATION_FAILURE, EGP_NEIGHBOR_LOSS, ENTERPRISE_SPECIFIC

:snmp
&snmp_debug, &snmp_dispatcher, &snmp_type_ntop, &oid_base_match, &oid_lex_cmp, &oid_lex_sort, &ticks_to_time, SNMP_VERSION_1, SNMP_VERSION_2C, SNMP_VERSION_3, SNMP_PORT, SNMP_TRAP_PORT

:translate
TRANSLATE_NONE, TRANSLATE_OCTET_STRING, TRANSLATE_NULL, TRANSLATE_TIMETICKS, TRANSLATE_OPAQUE, TRANSLATE_NOSUCHOBJECT, TRANSLATE_NOSUCHINSTANCE, TRANSLATE_ENDOFMIBVIEW, TRANSLATE_UNSIGNED, TRANSLATE_ALL

:ALL
All of the above exportable items.

EXAMPLES

1. Blocking SNMPv1 get-request for sysUpTime

This example gets the sysUpTime from a remote host.

#! /usr/local/bin/perl use strict; use warnings; use Net::SNMP; my $OID_sysUpTime = 1.3.6.1.2.1.1.3.0; my ($session, $error) = Net::SNMP->session( -hostname => shift || localhost, -community => shift || public, ); if (!defined $session) { printf “ERROR: %s. “, $error; exit 1; } my $result = $session->get_request(-varbindlist => [ $OID_sysUpTime ],); if (!defined $result) { printf “ERROR: %s. “, $session->error(); $session->close(); exit 1; } printf “The sysUpTime for host %s is %s. “, $session->hostname(), $result->{$OID_sysUpTime}; $session->close(); exit 0;

2. Blocking SNMPv3 set-request of sysContact

This example sets the sysContact information on the remote host to Help Desk x911. The named arguments passed to the session() constructor are for the demonstration of syntax only. These parameters will need to be set according to the SNMPv3 parameters of the remote host. The snmpkey utility included with the distribution can be used to create the key values.

#! /usr/local/bin/perl use strict; use warnings; use Net::SNMP; my $OID_sysContact = 1.3.6.1.2.1.1.4.0; my ($session, $error) = Net::SNMP->session( -hostname => myv3host.example.com, -version => snmpv3, -username => myv3Username, -authprotocol => sha1, -authkey => 0x6695febc9288e36282235fc7151f128497b38f3f, -privprotocol => des, -privkey => 0x6695febc9288e36282235fc7151f1284, ); if (!defined $session) { printf “ERROR: %s. “, $error; exit 1; } my $result = $session->set_request( -varbindlist => [ $OID_sysContact, OCTET_STRING, Help Desk x911 ], ); if (!defined $result) { printf “ERROR: %s. “, $session->error(); $session->close(); exit 1; } printf “The sysContact for host %s was set to %s. “, $session->hostname(), $result->{$OID_sysContact}; $session->close(); exit 0;

3. Non-blocking SNMPv2c get-bulk-request for ifTable

This example gets the contents of the ifTable by sending get-bulk-requests until the responses are no longer part of the ifTable. The ifTable can also be retrieved using the get_table() method. The ifPhysAddress object in the table has a syntax of an OCTET STRING. By default, translation is enabled and non-printable OCTET STRINGs are translated into a hexadecimal format. Sometimes the OCTET STRING contains all printable characters and this produces unexpected output when it is not translated. The example turns off translation for OCTET STRINGs and specifically formats the output for the ifPhysAddress objects.

#! /usr/local/bin/perl use strict; use warnings; use Net::SNMP qw(:snmp); my $OID_ifTable = 1.3.6.1.2.1.2.2; my $OID_ifPhysAddress = 1.3.6.1.2.1.2.2.1.6; my ($session, $error) = Net::SNMP->session( -hostname => shift || localhost, -community => shift || public, -nonblocking => 1, -translate => [-octetstring => 0], -version => snmpv2c, ); if (!defined $session) { printf “ERROR: %s. “, $error; exit 1; } my %table; # Hash to store the results my $result = $session->get_bulk_request( -varbindlist => [ $OID_ifTable ], -callback => [ \table_callback, \table ], -maxrepetitions => 10, ); if (!defined $result) { printf “ERROR: %s “, $session->error(); $session->close(); exit 1; } # Now initiate the SNMP message exchange. snmp_dispatcher(); $session->close(); # Print the results, specifically formatting ifPhysAddress. for my $oid (oid_lex_sort(keys %table)) { if (!oid_base_match($OID_ifPhysAddress, $oid)) { printf “%s = %s “, $oid, $table{$oid}; } else { printf “%s = %s “, $oid, unpack H*, $table{$oid}; } } exit 0; sub table_callback { my ($session, $table) = @_; my $list = $session->var_bind_list(); if (!defined $list) { printf “ERROR: %s “, $session->error(); return; } # Loop through each of the OIDs in the response and assign # the key/value pairs to the reference that was passed with # the callback. Make sure that we are still in the table # before assigning the key/values. my @names = $session->var_bind_names(); my $next = undef; while (@names) { $next = shift @names; if (!oid_base_match($OID_ifTable, $next)) { return; # Table is done. } $table->{$next} = $list->{$next}; } # Table is not done, send another request, starting at the last # OBJECT IDENTIFIER in the response. No need to include the # calback argument, the same callback that was specified for the # original request will be used. my $result = $session->get_bulk_request( -varbindlist => [ $next ], -maxrepetitions => 10, ); if (!defined $result) { printf “ERROR: %s. “, $session->error(); } return; }

4. Non-blocking SNMPv1 get-request and set-request on multiple hosts

This example first polls several hosts for their sysUpTime. If the poll of the host is successful, the sysContact and sysLocation information is set on the host. The sysContact information is hardcoded to Help Desk x911 while the sysLocation information is passed as an argument to the callback.

#! /usr/local/bin/perl use strict; use warnings; use Net::SNMP; my $OID_sysUpTime = 1.3.6.1.2.1.1.3.0; my $OID_sysContact = 1.3.6.1.2.1.1.4.0; my $OID_sysLocation = 1.3.6.1.2.1.1.6.0; # Hash of hosts and location data. my %host_data = ( 10.1.1.2 => Building 1, Second Floor, 10.2.1.1 => Building 2, First Floor, localhost => Right here!, ); # Create a session for each host and queue a get-request for sysUpTime. for my $host (keys %host_data) { my ($session, $error) = Net::SNMP->session( -hostname => $host, -community => private, -nonblocking => 1, ); if (!defined $session) { printf “ERROR: Failed to create session for host %s: %s. “, $host, $error; next; } my $result = $session->get_request( -varbindlist => [ $OID_sysUpTime ], -callback => [ \get_callback, $host_data{$host} ], ); if (!defined $result) { printf “ERROR: Failed to queue get request for host %s: %s. “, $session->hostname(), $session->error(); } } # Now initiate the SNMP message exchange. snmp_dispatcher(); exit 0; sub get_callback { my ($session, $location) = @_; my $result = $session->var_bind_list(); if (!defined $result) { printf “ERROR: Get request failed for host %s: %s. “, $session->hostname(), $session->error(); return; } printf “The sysUpTime for host %s is %s. “, $session->hostname(), $result->{$OID_sysUpTime}; # Now set the sysContact and sysLocation for the host. $result = $session->set_request( -varbindlist => [ $OID_sysContact, OCTET_STRING, Help Desk x911, $OID_sysLocation, OCTET_STRING, $location, ], -callback => \set_callback, ); if (!defined $result) { printf “ERROR: Failed to queue set request for host %s: %s. “, $session->hostname(), $session->error(); } return; } sub set_callback { my ($session) = @_; my $result = $session->var_bind_list(); if (defined $result) { printf “The sysContact for host %s was set to %s. “, $session->hostname(), $result->{$OID_sysContact}; printf “The sysLocation for host %s was set to %s. “, $session->hostname(), $result->{$OID_sysLocation}; } else { printf “ERROR: Set request failed for host %s: %s. “, $session->hostname(), $session->error(); } return; }

REQUIREMENTS

  • The Net::SNMP module uses syntax that is not supported in versions of Perl earlier than v5.6.0.

  • The non-core modules Crypt::DES, Digest::MD5, and Digest::HMAC are required to support SNMPv3.

  • In order to support the AES Cipher Algorithm as a SNMPv3 privacy protocol, the non-core module Crypt::Rijndael is needed.

  • To use UDP/IPv6 or TCP/IPv6 as a Transport Domain, the non-core module Socket6 is needed.

AUTHOR

David M. Town <[email protected]>

ACKNOWLEDGMENTS

The original concept for this module was based on SNMP_Session.pm written by Simon Leinen <[email protected]>.

The Abstract Syntax Notation One (ASN.1) encode and decode methods were originally derived by example from the CMU SNMP package whose copyright follows: Copyright (c) 1988, 1989, 1991, 1992 by Carnegie Mellon University. All rights reserved.

LICENSE AND COPYRIGHT

Copyright (c) 1998-2010 David M. Town. All rights reserved.

This program is free software; you may redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2209 - Linux cli command S_ISREG

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command S_ISREG and provides detailed information about the command S_ISREG, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the S_ISREG.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2210 - Linux cli command posix_madvise

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command posix_madvise and provides detailed information about the command posix_madvise, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the posix_madvise.

NAME 🖥️ posix_madvise 🖥️

give advice about patterns of memory usage

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/mman.h>
int posix_madvise(void addr[.len], size_t len, int advice);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

posix_madvise():

    _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The posix_madvise() function allows an application to advise the system about its expected patterns of usage of memory in the address range starting at addr and continuing for len bytes. The system is free to use this advice in order to improve the performance of memory accesses (or to ignore the advice altogether), but calling posix_madvise() shall not affect the semantics of access to memory in the specified range.

The advice argument is one of the following:

POSIX_MADV_NORMAL
The application has no special advice regarding its memory usage patterns for the specified address range. This is the default behavior.

POSIX_MADV_SEQUENTIAL
The application expects to access the specified address range sequentially, running from lower addresses to higher addresses. Hence, pages in this region can be aggressively read ahead, and may be freed soon after they are accessed.

POSIX_MADV_RANDOM
The application expects to access the specified address range randomly. Thus, read ahead may be less useful than normally.

POSIX_MADV_WILLNEED
The application expects to access the specified address range in the near future. Thus, read ahead may be beneficial.

POSIX_MADV_DONTNEED
The application expects that it will not access the specified address range in the near future.

RETURN VALUE

On success, posix_madvise() returns 0. On failure, it returns a positive error number.

ERRORS

EINVAL
addr is not a multiple of the system page size or len is negative.

EINVAL
advice is invalid.

ENOMEM
Addresses in the specified range are partially or completely outside the caller’s address space.

VERSIONS

POSIX.1 permits an implementation to generate an error if len is 0. On Linux, specifying len as 0 is permitted (as a successful no-op).

In glibc, this function is implemented using madvise(2). However, since glibc 2.6, POSIX_MADV_DONTNEED is treated as a no-op, because the corresponding madvise(2) value, MADV_DONTNEED, has destructive semantics.

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.2. POSIX.1-2001.

SEE ALSO

madvise(2), posix_fadvise(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2211 - Linux cli command pthread_key_delete

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_key_delete and provides detailed information about the command pthread_key_delete, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_key_delete.

NAME 🖥️ pthread_key_delete 🖥️

management of thread-specific data

SYNOPSIS

#include <pthread.h>
int pthread_key_create(pthread_key_t *key,
 void (*destr_function) (void *));
int pthread_key_delete(pthread_key_t key);
int pthread_setspecific(pthread_key_t key, const void *pointer);
void * pthread_getspecific(pthread_key_t key);

DESCRIPTION

Programs often need global or static variables that have different values in different threads. Since threads share one memory space, this cannot be achieved with regular variables. Thread-specific data is the POSIX threads answer to this need.

Each thread possesses a private memory block, the thread-specific data area, or TSD area for short. This area is indexed by TSD keys. The TSD area associates values of type void * to TSD keys. TSD keys are common to all threads, but the value associated with a given TSD key can be different in each thread.

For concreteness, the TSD areas can be viewed as arrays of void * pointers, TSD keys as integer indices into these arrays, and the value of a TSD key as the value of the corresponding array element in the calling thread.

When a thread is created, its TSD area initially associates NULL with all keys.

pthread_key_create allocates a new TSD key. The key is stored in the location pointed to by key. There is a limit of PTHREAD_KEYS_MAX on the number of keys allocated at a given time. The value initially associated with the returned key is NULL in all currently executing threads.

The destr_function argument, if not NULL, specifies a destructor function associated with the key. When a thread terminates via pthread_exit or by cancelation, destr_function is called with arguments the value associated with the key in that thread. The destr_function is not called if that value is NULL. The order in which destructor functions are called at thread termination time is unspecified.

Before the destructor function is called, the NULL value is associated with the key in the current thread. A destructor function might, however, re-associate non-NULL values to that key or some other key. To deal with this, if after all the destructors have been called for all non-NULL values, there are still some non-NULL values with associated destructors, then the process is repeated. The glibc implementation stops the process after PTHREAD_DESTRUCTOR_ITERATIONS iterations, even if some non-NULL values with associated descriptors remain. Other implementations may loop indefinitely.

pthread_key_delete deallocates a TSD key. It does not check whether non-NULL values are associated with that key in the currently executing threads, nor call the destructor function associated with the key.

pthread_setspecific changes the value associated with key in the calling thread, storing the given pointer instead.

pthread_getspecific returns the value currently associated with key in the calling thread.

RETURN VALUE

pthread_key_create, pthread_key_delete, and pthread_setspecific return 0 on success and a non-zero error code on failure. If successful, pthread_key_create stores the newly allocated key in the location pointed to by its key argument.

pthread_getspecific returns the value associated with key on success, and NULL on error.

ERRORS

pthread_key_create returns the following error code on error:

EAGAIN
PTHREAD_KEYS_MAX keys are already allocated.

pthread_key_delete and pthread_setspecific return the following error code on error:

EINVAL
key is not a valid, allocated TSD key.

pthread_getspecific returns NULL if key is not a valid, allocated TSD key.

SEE ALSO

pthread_create(3), pthread_exit(3), pthread_testcancel(3).

EXAMPLE

The following code fragment allocates a thread-specific array of 100 characters, with automatic reclamation at thread exit:

/* Key for the thread-specific buffer */
static pthread_key_t buffer_key;
/* Once-only initialisation of the key */
static pthread_once_t buffer_key_once = PTHREAD_ONCE_INIT;
/* Allocate the thread-specific buffer */
void buffer_alloc(void)
{
  pthread_once(&buffer_key_once, buffer_key_alloc);
  pthread_setspecific(buffer_key, malloc(100));
}
/* Return the thread-specific buffer */
char * get_buffer(void)
{
  return (char *) pthread_getspecific(buffer_key);
}
/* Allocate the key */
static void buffer_key_alloc()
{
  pthread_key_create(&buffer_key, buffer_destroy);
}
/* Free the thread-specific buffer */
static void buffer_destroy(void * buf)
{
  free(buf);
}
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2212 - Linux cli command res_init

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command res_init and provides detailed information about the command res_init, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the res_init.

NAME 🖥️ res_init 🖥️

resolver routines

LIBRARY

Resolver library (libresolv, -lresolv)

SYNOPSIS

#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
struct __res_state;
typedef struct __res_state *res_state;
int res_ninit(res_state statep);
void res_nclose(res_state statep);
int res_nquery(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nsearch(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nquerydomain(res_state statep,
 const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
int res_nmkquery(res_state statep,
 int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
int res_nsend(res_state statep,
 const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);
int dn_comp(const char *exp_dn, unsigned char comp_dn[.length],
 int length, unsigned char **dnptrs,
 unsigned char **lastdnptr);
int dn_expand(const unsigned char *msg,
 const unsigned char *eomorig,
 const unsigned char *comp_dn, char exp_dn[.length],
 int length);
[[deprecated]] extern struct __res_state _res;
[[deprecated]] int res_init(void);
[[deprecated]]
int res_query(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_search(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_querydomain(const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
[[deprecated]]
int res_mkquery(int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
[[deprecated]]
int res_send(const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);

DESCRIPTION

Note: This page is incomplete (various resolver functions provided by glibc are not described) and likely out of date.

The functions described below make queries to and interpret the responses from Internet domain name servers.

The API consists of a set of more modern, reentrant functions and an older set of nonreentrant functions that have been superseded. The traditional resolver interfaces such as res_init() and res_query() use some static (global) state stored in the _res structure, rendering these functions non-thread-safe. BIND 8.2 introduced a set of new interfaces res_ninit(), res_nquery(), and so on, which take a res_state as their first argument, so you can use a per-thread resolver state.

The res_ninit() and res_init() functions read the configuration files (see resolv.conf(5)) to get the default domain name and name server address(es). If no server is given, the local host is tried. If no domain is given, that associated with the local host is used. It can be overridden with the environment variable LOCALDOMAIN. res_ninit() or res_init() is normally executed by the first call to one of the other functions. Every call to res_ninit() requires a corresponding call to res_nclose() to free memory allocated by res_ninit() and subsequent calls to res_nquery().

The res_nquery() and res_query() functions query the name server for the fully qualified domain name name of specified type and class. The reply is left in the buffer answer of length anslen supplied by the caller.

The res_nsearch() and res_search() functions make a query and waits for the response like res_nquery() and res_query(), but in addition they implement the default and search rules controlled by RES_DEFNAMES and RES_DNSRCH (see description of _res options below).

The res_nquerydomain() and res_querydomain() functions make a query using res_nquery()/res_query() on the concatenation of name and domain.

The following functions are lower-level routines used by res_nquery()/res_query().

The res_nmkquery() and res_mkquery() functions construct a query message in buf of length buflen for the domain name dname. The query type op is one of the following (typically QUERY):

QUERY
Standard query.

IQUERY
Inverse query. This option was removed in glibc 2.26, since it has not been supported by DNS servers for a very long time.

NS_NOTIFY_OP
Notify secondary of SOA (Start of Authority) change.

newrr is currently unused.

The res_nsend() and res_send() function send a preformatted query given in msg of length msglen and returns the answer in answer which is of length anslen. They will call res_ninit()/res_init() if it has not already been called.

The dn_comp() function compresses the domain name exp_dn and stores it in the buffer comp_dn of length length. The compression uses an array of pointers dnptrs to previously compressed names in the current message. The first pointer points to the beginning of the message and the list ends with NULL. The limit of the array is specified by lastdnptr. If dnptr is NULL, domain names are not compressed. If lastdnptr is NULL, the list of labels is not updated.

The dn_expand() function expands the compressed domain name comp_dn to a full domain name, which is placed in the buffer exp_dn of size length. The compressed name is contained in a query or reply message, and msg points to the beginning of the message.

The resolver routines use configuration and state information contained in a __res_state structure (either passed as the statep argument, or in the global variable _res, in the case of the older nonreentrant functions). The only field of this structure that is normally manipulated by the user is the options field. This field can contain the bitwise “OR” of the following options:

RES_INIT
True if res_ninit() or res_init() has been called.

RES_DEBUG
Print debugging messages. This option is available only if glibc was built with debugging enabled, which is not the default.

RES_AAONLY (unimplemented; deprecated in glibc 2.25)
Accept authoritative answers only. res_send() continues until it finds an authoritative answer or returns an error. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEVC
Use TCP connections for queries rather than UDP datagrams.

RES_PRIMARY (unimplemented; deprecated in glibc 2.25)
Query primary domain name server only. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_IGNTC
Ignore truncation errors. Don’t retry with TCP.

RES_RECURSE
Set the recursion desired bit in queries. Recursion is carried out by the domain name server, not by res_send(). [Enabled by default].

RES_DEFNAMES
If set, res_search() will append the default domain name to single component names—that is, those that do not contain a dot. [Enabled by default].

RES_STAYOPEN
Used with RES_USEVC to keep the TCP connection open between queries.

RES_DNSRCH
If set, res_search() will search for hostnames in the current domain and in parent domains. This option is used by gethostbyname(3). [Enabled by default].

RES_INSECURE1
Accept a response from a wrong server. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_INSECURE2
Accept a response which contains a wrong query. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_NOALIASES
Disable usage of HOSTALIASES environment variable.

RES_USE_INET6
Try an AAAA query before an A query inside the gethostbyname(3) function, and map IPv4 responses in IPv6 “tunneled form” if no AAAA records are found but an A record set exists. Since glibc 2.25, this option is deprecated, and its usage produces a warning; applications should use getaddrinfo(3), rather than gethostbyname(3).

RES_ROTATE
Causes round-robin selection of name servers from among those listed. This has the effect of spreading the query load among all listed servers, rather than having all clients try the first listed server first every time.

RES_NOCHECKNAME (unimplemented; deprecated in glibc 2.25)
Disable the modern BIND checking of incoming hostnames and mail names for invalid characters such as underscore (_), non-ASCII, or control characters. This option was present until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_KEEPTSIG (unimplemented; deprecated in glibc 2.25)
Do not strip TSIG records. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_BLAST (unimplemented; deprecated in glibc 2.25)
Send each query simultaneously and recursively to all servers. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEBSTRING (glibc 2.3.4 to glibc 2.24)
Make reverse IPv6 lookups using the bit-label format described in RFC 2673; if this option is not set (which is the default), then nibble format is used. This option was removed in glibc 2.25, since it relied on a backward-incompatible DNS extension that was never deployed on the Internet.

RES_NOIP6DOTINT (glibc 2.24 and earlier)
Use ip6.arpa zone in IPv6 reverse lookup instead of ip6.int, which is deprecated since glibc 2.3.4. This option is present up to and including glibc 2.24, where it is enabled by default. In glibc 2.25, this option was removed.

RES_USE_EDNS0 (since glibc 2.6)
Enables support for the DNS extensions (EDNS0) described in RFC 2671.

RES_SNGLKUP (since glibc 2.10)
By default, glibc performs IPv4 and IPv6 lookups in parallel since glibc 2.9. Some appliance DNS servers cannot handle these queries properly and make the requests time out. This option disables the behavior and makes glibc perform the IPv6 and IPv4 requests sequentially (at the cost of some slowdown of the resolving process).

RES_SNGLKUPREOP
When RES_SNGLKUP option is enabled, opens a new socket for the each request.

RES_USE_DNSSEC
Use DNSSEC with OK bit in OPT record. This option implies RES_USE_EDNS0.

RES_NOTLDQUERY
Do not look up unqualified name as a top-level domain (TLD).

RES_DEFAULT
Default option which implies: RES_RECURSE, RES_DEFNAMES, RES_DNSRCH, and RES_NOIP6DOTINT.

RETURN VALUE

The res_ninit() and res_init() functions return 0 on success, or -1 if an error occurs.

The res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), res_querydomain(), res_nmkquery(), res_mkquery(), res_nsend(), and res_send() functions return the length of the response, or -1 if an error occurs.

The dn_comp() and dn_expand() functions return the length of the compressed name, or -1 if an error occurs.

In the case of an error return from res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), or res_querydomain(), the global variable h_errno (see gethostbyname(3)) can be consulted to determine the cause of the error.

FILES

/etc/resolv.conf
resolver configuration file

/etc/host.conf
resolver configuration file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

res_ninit(), res_nclose(), res_nquery(), res_nsearch(), res_nquerydomain(), res_nsend()

Thread safetyMT-Safe locale

res_nmkquery(), dn_comp(), dn_expand()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

4.3BSD.

SEE ALSO

gethostbyname(3), resolv.conf(5), resolver(5), hostname(7), named(8)

The GNU C library source file resolv/README.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2213 - Linux cli command XtKeysymToKeycodeList

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtKeysymToKeycodeList and provides detailed information about the command XtKeysymToKeycodeList, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtKeysymToKeycodeList.

NAME 🖥️ XtKeysymToKeycodeList 🖥️

query keysyms and keycodes

SYNTAX

#include <X11/Intrinsic.h>

KeySym* XtGetKeysymTable(Display* display, KeyCode* min_keycode_return, int *keysyms_per_keycode_return);

void XtKeysymToKeycodeList(Display* display, KeySym keysym, KeyCode** keycodes_return, Cardinal* keycount_return);

ARGUMENTS

display
Specifies the display whose table is required.

min_keycode_return
Returns the minimum KeyCode valid for the display.

keysyms_per_keycode_return
Returns the number of KeySyms stored for each KeyCode.

keysym
Specifies the KeySym for which to search.

keycodes_return
Returns a list of KeyCodes that have keysym associated with them, or NULL if keycount_return is 0.

keycount_return
Returns the number of KeyCodes in the keycode list.

DESCRIPTION

XtGetKeysymTable returns a pointer to the Intrinsics’ copy of the server’s KeyCode-to-KeySym table. This table must not be modified.

The XtKeysymToKeycodeList procedure returns all the KeyCodes that have keysym in their entry for the keyboard mapping table associated with display. The caller should free the storage pointed to by keycodes_return using XtFree when it is no longer useful.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2214 - Linux cli command File_Find_Rulepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command File_Find_Rulepm and provides detailed information about the command File_Find_Rulepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the File_Find_Rulepm.

NAME 🖥️ File_Find_Rulepm 🖥️

Alternative interface to File::Find

SYNOPSIS

use File::Find::Rule; # find all the subdirectories of a given directory my @subdirs = File::Find::Rule->directory->in( $directory ); # find all the .pm files in @INC my @files = File::Find::Rule->file() ->name( *.pm ) ->in( @INC ); # as above, but without method chaining my $rule = File::Find::Rule->new; $rule->file; $rule->name( *.pm ); my @files = $rule->in( @INC );

DESCRIPTION

File::Find::Rule is a friendlier interface to File::Find. It allows you to build rules which specify the desired files and directories.

METHODS

“new”
A constructor. You need not invoke new manually unless you wish to, as each of the rule-making methods will auto-create a suitable object if called as class methods.

Matching Rules

“name( @patterns )”
Specifies names that should match. May be globs or regular expressions. $set->name( *.mp3, *.ogg ); # mp3s or oggs $set->name( qr/(mp3|ogg)$/ ); # the same as a regex $set->name( foo.bar ); # just things named foo.bar

-X tests
Synonyms are provided for each of the -X tests. See -X in perlfunc for details. None of these methods take arguments. Test | Method Test | Method ——|————- ——|—————- -r | readable -R | r_readable -w | writeable -W | r_writeable -w | writable -W | r_writable -x | executable -X | r_executable -o | owned -O | r_owned | | -e | exists -f | file -z | empty -d | directory -s | nonempty -l | symlink | -p | fifo -u | setuid -S | socket -g | setgid -b | block -k | sticky -c | character | -t | tty -M | modified | -A | accessed -T | ascii -C | changed -B | binary Though some tests are fairly meaningless as binary flags (modified, accessed, changed), they have been included for completeness. # find nonempty files $rule->file, ->nonempty;

stat tests
The following stat based methods are provided: dev, ino, mode, nlink, uid, gid, rdev, size, atime, mtime, ctime, blksize, and blocks. See stat in perlfunc for details. Each of these can take a number of targets, which will follow Number::Compare semantics. $rule->size( 7 ); # exactly 7 $rule->size( “>7Ki” ); # larger than 7 * 1024 * 1024 bytes $rule->size( “>=7” ) ->size( “<=90” ); # between 7 and 90, inclusive $rule->size( 7, 9, 42 ); # 7, 9 or 42

“any( @rules )”

“or( @rules )”

Allows shortcircuiting boolean evaluation as an alternative to the default and-like nature of combined rules. any and or are interchangeable. # find avis, movs, things over 200M and empty files $rule->any( File::Find::Rule->name( *.avi, *.mov ), File::Find::Rule->size( >200M ), File::Find::Rule->file->empty, );

“none( @rules )”

“not( @rules )”

Negates a rule. (The inverse of any.) none and not are interchangeable. # files that arent 8.3 safe $rule->file ->not( $rule->new->name( qr/^[^.]{1,8}(\[^.]{0,3})?$/ ) );

“prune”
Traverse no further. This rule always matches.

“discard”
Don’t keep this file. This rule always matches.

“exec( \subroutine( $shortname, $path, $fullname ) )”
Allows user-defined rules. Your subroutine will be invoked with $_ set to the current short name, and with parameters of the name, the path you’re in, and the full relative filename. Return a true value if your rule matched. # get things with long names $rules->exec( sub { length > 20 } );

“grep( @specifiers )”
Opens a file and tests it each line at a time. For each line it evaluates each of the specifiers, stopping at the first successful match. A specifier may be a regular expression or a subroutine. The subroutine will be invoked with the same parameters as an ->exec subroutine. It is possible to provide a set of negative specifiers by enclosing them in anonymous arrays. Should a negative specifier match the iteration is aborted and the clause is failed. For example: $rule->grep( qr/^#!.*perl/, [ sub { 1 } ] ); Is a passing clause if the first line of a file looks like a perl shebang line.

“maxdepth( $level )”
Descend at most $level (a non-negative integer) levels of directories below the starting point. May be invoked many times per rule, but only the most recent value is used.

“mindepth( $level )”
Do not apply any tests at levels less than $level (a non-negative integer).

“extras( \extras )”
Specifies extra values to pass through to File::File::find as part of the options hash. For example this allows you to specify following of symlinks like so: my $rule = File::Find::Rule->extras({ follow => 1 }); May be invoked many times per rule, but only the most recent value is used.

“relative”
Trim the leading portion of any path found

“canonpath”
Normalize paths found using File::Spec-canonpath>. This will return paths with a file-seperator that is native to your OS (as determined by File::Spec), instead of the default /. For example, this will return tmp/foobar on Unix-ish OSes and tmp oobar on Win32.

“not_*”
Negated version of the rule. An effective shortand related to ! in the procedural interface. $foo->not_name(*.pl); $foo->not( $foo->new->name(*.pl ) );

Query Methods

“in( @directories )”
Evaluates the rule, returns a list of paths to matching files and directories.

“start( @directories )”
Starts a find across the specified directories. Matching items may then be queried using match. This allows you to use a rule as an iterator. my $rule = File::Find::Rule->file->name("*.jpeg")->start( “/web” ); while ( defined ( my $image = $rule->match ) ) { … }

“match”
Returns the next file which matches, false if there are no more.

Extensions

Extension modules are available from CPAN in the File::Find::Rule namespace. In order to use these extensions either use them directly:

use File::Find::Rule::ImageSize; use File::Find::Rule::MMagic; # now your rules can use the clauses supplied by the ImageSize and # MMagic extension

or, specify that File::Find::Rule should load them for you:

use File::Find::Rule qw( :ImageSize :MMagic );

For notes on implementing your own extensions, consult File::Find::Rule::Extending

Further examples

Finding perl scripts
my $finder = File::Find::Rule->or ( File::Find::Rule->name( *.pl ), File::Find::Rule->exec( sub { if (open my $fh, $_) { my $shebang = <$fh>; close $fh; return $shebang =~ /^#!.*perl/; } return 0; } ), ); Based upon this message http://use.perl.org/comments.pl?sid=7052&cid=10842

ignore CVS directories
my $rule = File::Find::Rule->new; $rule->or($rule->new ->directory ->name(CVS) ->prune ->discard, $rule->new); Note here the use of a null rule. Null rules match anything they see, so the effect is to match (and discard) directories called ‘CVS’ or to match anything.

TWO FOR THE PRICE OF ONE

File::Find::Rule also gives you a procedural interface. This is documented in File::Find::Rule::Procedural

EXPORTS

find, rule

TAINT MODE INTERACTION

As of 0.32 File::Find::Rule doesn’t capture the current working directory in a taint-unsafe manner. File::Find itself still does operations that the taint system will flag as insecure but you can use the extras feature to ask File::Find to internally untaint file paths with a regex like so:

my $rule = File::Find::Rule->extras({ untaint => 1 });

Please consult File::Find’s documentation for untaint, untaint_pattern, and untaint_skip for more information.

BUGS

The code makes use of the our keyword and as such requires perl version 5.6.0 or newer.

Currently it isn’t possible to remove a clause from a rule object. If this becomes a significant issue it will be addressed.

AUTHOR

Richard Clamp <[email protected]> with input gained from this use.perl discussion: http://use.perl.org/~richardc/journal/6467

Additional proofreading and input provided by Kake, Greg McCarroll, and Andy Lester [email protected].

COPYRIGHT

Copyright (C) 2002, 2003, 2004, 2006, 2009, 2011 Richard Clamp. All Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

File::Find, Text::Glob, Number::Compare, find (1)

If you want to know about the procedural interface, see File::Find::Rule::Procedural, and if you have an idea for a neat extension File::Find::Rule::Extending

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2215 - Linux cli command fmtmsg

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fmtmsg and provides detailed information about the command fmtmsg, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fmtmsg.

NAME 🖥️ fmtmsg 🖥️

print formatted error messages

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <fmtmsg.h>
int fmtmsg(long classification, const char *label,
 int severity, const char *text,
 const char *action, const char *tag);

DESCRIPTION

This function displays a message described by its arguments on the device(s) specified in the classification argument. For messages written to stderr, the format depends on the MSGVERB environment variable.

The label argument identifies the source of the message. The string must consist of two colon separated parts where the first part has not more than 10 and the second part not more than 14 characters.

The text argument describes the condition of the error.

The action argument describes possible steps to recover from the error. If it is printed, it is prefixed by “TO FIX: “.

The tag argument is a reference to the online documentation where more information can be found. It should contain the label value and a unique identification number.

Dummy arguments

Each of the arguments can have a dummy value. The dummy classification value MM_NULLMC (0L) does not specify any output, so nothing is printed. The dummy severity value NO_SEV (0) says that no severity is supplied. The values MM_NULLLBL, MM_NULLTXT, MM_NULLACT, MM_NULLTAG are synonyms for ((char *) 0), the empty string, and MM_NULLSEV is a synonym for NO_SEV.

The classification argument

The classification argument is the sum of values describing 4 types of information.

The first value defines the output channel.

MM_PRINT
Output to stderr.

MM_CONSOLE
Output to the system console.

MM_PRINT | MM_CONSOLE
Output to both.

The second value is the source of the error:

MM_HARD
A hardware error occurred.

MM_FIRM
A firmware error occurred.

MM_SOFT
A software error occurred.

The third value encodes the detector of the problem:

MM_APPL
It is detected by an application.

MM_UTIL
It is detected by a utility.

MM_OPSYS
It is detected by the operating system.

The fourth value shows the severity of the incident:

MM_RECOVER
It is a recoverable error.

MM_NRECOV
It is a nonrecoverable error.

The severity argument

The severity argument can take one of the following values:

MM_NOSEV
No severity is printed.

MM_HALT
This value is printed as HALT.

MM_ERROR
This value is printed as ERROR.

MM_WARNING
This value is printed as WARNING.

MM_INFO
This value is printed as INFO.

The numeric values are between 0 and 4. Using addseverity(3) or the environment variable SEV_LEVEL you can add more levels and strings to print.

RETURN VALUE

The function can return 4 values:

MM_OK
Everything went smooth.

MM_NOTOK
Complete failure.

MM_NOMSG
Error writing to stderr.

MM_NOCON
Error writing to the console.

ENVIRONMENT

The environment variable MSGVERB (“message verbosity”) can be used to suppress parts of the output to stderr. (It does not influence output to the console.) When this variable is defined, is non-NULL, and is a colon-separated list of valid keywords, then only the parts of the message corresponding to these keywords is printed. Valid keywords are “label”, “severity”, “text”, “action”, and “tag”.

The environment variable SEV_LEVEL can be used to introduce new severity levels. By default, only the five severity levels described above are available. Any other numeric value would make fmtmsg() print nothing. If the user puts SEV_LEVEL with a format like

SEV_LEVEL=[description[:description[:…]]]

in the environment of the process before the first call to fmtmsg(), where each description is of the form

severity-keyword,level,printstring

then fmtmsg() will also accept the indicated values for the level (in addition to the standard levels 0–4), and use the indicated printstring when such a level occurs.

The severity-keyword part is not used by fmtmsg() but it has to be present. The level part is a string representation of a number. The numeric value must be a number greater than 4. This value must be used in the severity argument of fmtmsg() to select this class. It is not possible to overwrite any of the predefined classes. The printstring is the string printed when a message of this class is processed by fmtmsg().

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fmtmsg()

Thread safety

glibc >= 2.16: MT-Safe; glibc < 2.16: MT-Unsafe

Before glibc 2.16, the fmtmsg() function uses a static variable that is not protected, so it is not thread-safe.

Since glibc 2.16, the fmtmsg() function uses a lock to protect the static variable, so it is thread-safe.

STANDARDS

fmtmsg()
MSGVERB
POSIX.1-2008.

HISTORY

fmtmsg()
System V. POSIX.1-2001 and POSIX.1-2008. glibc 2.1.

MSGVERB
System V. POSIX.1-2001 and POSIX.1-2008.

SEV_LEVEL
System V.

System V and UnixWare man pages tell us that these functions have been replaced by “pfmt() and addsev()” or by “pfmt(), vpfmt(), lfmt(), and vlfmt()”, and will be removed later.

EXAMPLES

#include <fmtmsg.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;
    int err;
    err = fmtmsg(class, "util-linux:mount", MM_ERROR,
                 "unknown mount option", "See mount(8).",
                 "util-linux:mount:017");
    switch (err) {
    case MM_OK:
        break;
    case MM_NOTOK:
        printf("Nothing printed

“); break; case MM_NOMSG: printf(“Nothing printed to stderr “); break; case MM_NOCON: printf(“No console output “); break; default: printf(“Unknown error from fmtmsg() “); } exit(EXIT_SUCCESS); }

The output should be:

util-linux:mount: ERROR: unknown mount option
TO FIX: See mount(8).  util-linux:mount:017

and after

MSGVERB=text:action; export MSGVERB

the output becomes:

unknown mount option
TO FIX: See mount(8).

SEE ALSO

addseverity(3), perror(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2216 - Linux cli command intptr_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command intptr_ttype and provides detailed information about the command intptr_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the intptr_ttype.

NAME 🖥️ intptr_ttype 🖥️

integer types wide enough to hold pointers

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <stdint.h>
typedef /* ... */ intptr_t;
typedef /* ... */ uintptr_t;
#define INTPTR_WIDTH /* ... */
#define UINTPTR_WIDTH INTPTR_WIDTH
#define INTPTR_MAX /* 2**(INTPTR_WIDTH - 1) - 1 */
#define INTPTR_MIN /* - 2**(INTPTR_WIDTH - 1) */
#define UINTPTR_MAX /* 2**UINTPTR_WIDTH - 1 */

DESCRIPTION

intptr_t is a signed integer type such that any valid (void *) value can be converted to this type and then converted back. It is capable of storing values in the range [INTPTR_MIN, INTPTR_MAX].

uintptr_t is an unsigned integer type such that any valid (void *) value can be converted to this type and then converted back. It is capable of storing values in the range [0, INTPTR_MAX].

The macros [U]INTPTR_WIDTH expand to the width in bits of these types.

The macros [U]INTPTR_MAX expand to the maximum value that these types can hold.

The macro INTPTR_MIN expands to the minimum value that intptr_t can hold.

The length modifiers for the [u]intptr_t types for the printf(3) family of functions are expanded by the macros PRIdPTR, PRIiPTR, and PRIuPTR (defined in <inttypes.h>); resulting commonly in %“PRIdPTR” or %“PRIiPTR” for printing intptr_t values. The length modifiers for the *[u]*intptr_t types for the scanf(3) family of functions are expanded by the macros SCNdPTR, SCNiPTR, and SCNuPTR (defined in <inttypes.h>); resulting commonly in %“SCNuPTR” for scanning uintptr_t values.

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

NOTES

The following header also provides these types: <inttypes.h>.

SEE ALSO

intmax_t(3type), void(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2217 - Linux cli command isascii_l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isascii_l and provides detailed information about the command isascii_l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isascii_l.

NAME 🖥️ isascii_l 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2218 - Linux cli command Spreadsheet_WriteExcel_Chart_Piepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_WriteExcel_Chart_Piepm and provides detailed information about the command Spreadsheet_WriteExcel_Chart_Piepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_WriteExcel_Chart_Piepm.

NAME 🖥️ Spreadsheet_WriteExcel_Chart_Piepm 🖥️

A writer class for Excel Pie charts.

SYNOPSIS

To create a simple Excel file with a Pie chart using Spreadsheet::WriteExcel:

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( chart.xls ); my $worksheet = $workbook->add_worksheet(); my $chart = $workbook->add_chart( type => pie ); # Configure the chart. $chart->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, ); # Add the worksheet data the chart refers to. my $data = [ [ Category, 2, 3, 4, 5, 6, 7 ], [ Value, 1, 4, 5, 2, 1, 5 ], ]; $worksheet->write( A1, $data ); _ _END_ _

DESCRIPTION

This module implements Pie charts for Spreadsheet::WriteExcel. The chart object is created via the Workbook add_chart() method:

my $chart = $workbook->add_chart( type => pie );

Once the object is created it can be configured via the following methods that are common to all chart classes:

$chart->add_series(); $chart->set_title();

These methods are explained in detail in Spreadsheet::WriteExcel::Chart. Class specific methods or settings, if any, are explained below.

Pie Chart Methods

There aren’t currently any pie chart specific methods. See the TODO section of Spreadsheet::WriteExcel::Chart.

A Pie chart doesn’t have an X or Y axis so the following common chart methods are ignored.

$chart->set_x_axis(); $chart->set_y_axis();

EXAMPLE

Here is a complete example that demonstrates most of the available features when creating a chart.

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( chart_pie.xls ); my $worksheet = $workbook->add_worksheet(); my $bold = $workbook->add_format( bold => 1 ); # Add the worksheet data that the charts will refer to. my $headings = [ Category, Values ]; my $data = [ [ Apple, Cherry, Pecan ], [ 60, 30, 10 ], ]; $worksheet->write( A1, $headings, $bold ); $worksheet->write( A2, $data ); # Create a new chart object. In this case an embedded chart. my $chart = $workbook->add_chart( type => pie, embedded => 1 ); # Configure the series. $chart->add_series( name => Pie sales data, categories => =Sheet1!$A$2:$A$4, values => =Sheet1!$B$2:$B$4, ); # Add a title. $chart->set_title( name => Popular Pie Types ); # Insert the chart into the worksheet (with an offset). $worksheet->insert_chart( C2, $chart, 25, 10 ); _ _END_ _

AUTHOR

John McNamara [email protected]

COPYRIGHT

Copyright MM-MMX, John McNamara.

All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2219 - Linux cli command Moose_Cookbook_Basics_BinaryTree_AttributeFeaturespm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Basics_BinaryTree_AttributeFeaturespm and provides detailed information about the command Moose_Cookbook_Basics_BinaryTree_AttributeFeaturespm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Basics_BinaryTree_AttributeFeaturespm.

NAME 🖥️ Moose_Cookbook_Basics_BinaryTree_AttributeFeaturespm 🖥️

Demonstrates various attribute features including lazy, predicates, weak refs, and more

VERSION

version 2.2207

SYNOPSIS

package BinaryTree; use Moose; has node => ( is => rw, isa => Any ); has parent => ( is => rw, isa => BinaryTree, predicate => has_parent, weak_ref => 1, ); has left => ( is => rw, isa => BinaryTree, predicate => has_left, lazy => 1, default => sub { BinaryTree->new( parent => $_[0] ) }, trigger => \_set_parent_for_child ); has right => ( is => rw, isa => BinaryTree, predicate => has_right, lazy => 1, default => sub { BinaryTree->new( parent => $_[0] ) }, trigger => \_set_parent_for_child ); sub _set_parent_for_child { my ( $self, $child ) = @_; confess “You cannot insert a tree which already has a parent” if $child->has_parent; $child->parent($self); }

DESCRIPTION

This recipe shows how various advanced attribute features can be used to create complex and powerful behaviors. In particular, we introduce a number of new attribute options, including predicate, lazy, and trigger.

The example class is a classic binary tree. Each node in the tree is itself an instance of BinaryTree. It has a node, which holds some arbitrary value. It has right and left attributes, which refer to its child trees, and a parent.

Let’s take a look at the node attribute:

has node => ( is => rw, isa => Any );

Moose generates a read-write accessor for this attribute. The type constraint is Any, which literally means it can contain anything.

We could have left out the isa option, but in this case, we are including it for the benefit of other programmers, not the computer.

Next, let’s move on to the parent attribute:

has parent => ( is => rw, isa => BinaryTree, predicate => has_parent, weak_ref => 1, );

Again, we have a read-write accessor. This time, the isa option says that this attribute must always be an instance of BinaryTree. In the second recipe, we saw that every time we create a Moose-based class, we also get a corresponding class type constraint.

The predicate option is new. It creates a method which can be used to check whether or not a given attribute has been initialized. In this case, the method is named has_parent.

This brings us to our last attribute option, weak_ref. Since parent is a circular reference (the tree in parent should already have a reference to this one, in its left or right attribute), we want to make sure that we weaken the reference to avoid memory leaks. If weak_ref is true, it alters the accessor function so that the reference is weakened when it is set.

Finally, we have the left and right attributes. They are essentially identical except for their names, so we’ll just look at left:

has left => ( is => rw, isa => BinaryTree, predicate => has_left, lazy => 1, default => sub { BinaryTree->new( parent => $_[0] ) }, trigger => \_set_parent_for_child );

There are three new options here, lazy, default, and trigger. The lazy and default options are linked. In fact, you cannot have a lazy attribute unless it has a default (or a builder, but we’ll cover that later). If you try to make an attribute lazy without a default, class creation will fail with an exception. (2)

In the second recipe the BankAccount’s balance attribute had a default value of 0. Given a non-reference, Perl copies the value. However, given a reference, it does not do a deep clone, instead simply copying the reference. If you just specified a simple reference for a default, Perl would create it once and it would be shared by all objects with that attribute.

As a workaround, we use an anonymous subroutine to generate a new reference every time the default is called.

has foo => ( is => rw, default => sub { [] } );

In fact, using a non-subroutine reference as a default is illegal in Moose.

# will fail has foo => ( is => rw, default => [] );

This will blow up, so don’t do it.

You’ll notice that we use $_[0] in our default sub. When the default subroutine is executed, it is called as a method on the object.

In our case, we’re making a new BinaryTree object in our default, with the current tree as the parent.

Normally, when an object is instantiated, any defaults are evaluated immediately. With our BinaryTree class, this would be a big problem! We’d create the first object, which would immediately try to populate its left and right attributes, which would create a new BinaryTree, which would populate its left and right slots. Kaboom!

By making our left and right attributes lazy, we avoid this problem. If the attribute has a value when it is read, the default is never executed at all.

We still have one last bit of behavior to add. The autogenerated right and left accessors are not quite correct. When one of these is set, we want to make sure that we update the parent of the left or right attribute’s tree.

We could write our own accessors, but then why use Moose at all? Instead, we use a trigger. A trigger accepts a subroutine reference, which will be called as a method whenever the attribute is set. This can happen both during object construction or later by passing a new object to the attribute’s accessor method. However, it is not called when a value is provided by a default or builder.

sub _set_parent_for_child { my ( $self, $child ) = @_; confess “You cannot insert a tree which already has a parent” if $child->has_parent; $child->parent($self); }

This trigger does two things. First, it ensures that the new child node does not already have a parent. This is done for the sake of simplifying the example. If we wanted to be more clever, we would remove the child from its old parent tree and add it to the new one.

If the child has no parent, we will add it to the current tree, and we ensure that is has the correct value for its parent attribute.

As with all the other recipes, BinaryTree can be used just like any other Perl 5 class. A more detailed example of its usage can be found in t/recipes/basics_binarytree_attributefeatures.t.

CONCLUSION

This recipe introduced several of Moose’s advanced features. We hope that this inspires you to think of other ways these features can be used to simplify your code.

FOOTNOTES

  1. Weak references are tricky things, and should be used sparingly and appropriately (such as in the case of circular refs). If you are not careful, attribute values could disappear “mysteriously” because Perl’s reference counting garbage collector has gone and removed the item you are weak-referencing. In short, don’t use them unless you know what you are doing :)

  2. You can use the default option without the lazy option if you like, as we showed in the second recipe. Also, you can use builder instead of default. See Moose::Cookbook::Basics::BinaryTree_BuilderAndLazyBuild for details.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2220 - Linux cli command svcudp_bufcreate

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command svcudp_bufcreate and provides detailed information about the command svcudp_bufcreate, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the svcudp_bufcreate.

NAME 🖥️ svcudp_bufcreate 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2221 - Linux cli command pthread_cond_signal

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_cond_signal and provides detailed information about the command pthread_cond_signal, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_cond_signal.

NAME 🖥️ pthread_cond_signal 🖥️

operations on conditions

SYNOPSIS

#include <pthread.h>
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
int pthread_cond_init(pthread_cond_t *cond,
 pthread_condattr_t *cond_attr);
int pthread_cond_signal(pthread_cond_t *cond);
int pthread_cond_broadcast(pthread_cond_t *cond);
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
 const struct timespec *abstime);
int pthread_cond_destroy(pthread_cond_t *cond);

DESCRIPTION

A condition (short for ``condition variable’’) is a synchronization device that allows threads to suspend execution and relinquish the processors until some predicate on shared data is satisfied. The basic operations on conditions are: signal the condition (when the predicate becomes true), and wait for the condition, suspending the thread execution until another thread signals the condition.

A condition variable must always be associated with a mutex, to avoid the race condition where a thread prepares to wait on a condition variable and another thread signals the condition just before the first thread actually waits on it.

pthread_cond_init initializes the condition variable cond, using the condition attributes specified in cond_attr, or default attributes if cond_attr is NULL. The LinuxThreads implementation supports no attributes for conditions, hence the cond_attr parameter is actually ignored.

Variables of type pthread_cond_t can also be initialized statically, using the constant PTHREAD_COND_INITIALIZER.

pthread_cond_signal restarts one of the threads that are waiting on the condition variable cond. If no threads are waiting on cond, nothing happens. If several threads are waiting on cond, exactly one is restarted, but it is not specified which.

pthread_cond_broadcast restarts all the threads that are waiting on the condition variable cond. Nothing happens if no threads are waiting on cond.

pthread_cond_wait atomically unlocks the mutex (as per pthread_unlock_mutex) and waits for the condition variable cond to be signaled. The thread execution is suspended and does not consume any CPU time until the condition variable is signaled. The mutex must be locked by the calling thread on entrance to pthread_cond_wait. Before returning to the calling thread, pthread_cond_wait re-acquires mutex (as per pthread_lock_mutex).

Unlocking the mutex and suspending on the condition variable is done atomically. Thus, if all threads always acquire the mutex before signaling the condition, this guarantees that the condition cannot be signaled (and thus ignored) between the time a thread locks the mutex and the time it waits on the condition variable.

pthread_cond_timedwait atomically unlocks mutex and waits on cond, as pthread_cond_wait does, but it also bounds the duration of the wait. If cond has not been signaled within the amount of time specified by abstime, the mutex mutex is re-acquired and pthread_cond_timedwait returns the error ETIMEDOUT. The abstime parameter specifies an absolute time, with the same origin as time(2) and gettimeofday(2): an abstime of 0 corresponds to 00:00:00 GMT, January 1, 1970.

pthread_cond_destroy destroys a condition variable, freeing the resources it might hold. No threads must be waiting on the condition variable on entrance to pthread_cond_destroy. In the LinuxThreads implementation, no resources are associated with condition variables, thus pthread_cond_destroy actually does nothing except checking that the condition has no waiting threads.

CANCELLATION

pthread_cond_wait and pthread_cond_timedwait are cancelation points. If a thread is cancelled while suspended in one of these functions, the thread immediately resumes execution, then locks again the mutex argument to pthread_cond_wait and pthread_cond_timedwait, and finally executes the cancelation. Consequently, cleanup handlers are assured that mutex is locked when they are called.

ASYNC-SIGNAL SAFETY

The condition functions are not async-signal safe, and should not be called from a signal handler. In particular, calling pthread_cond_signal or pthread_cond_broadcast from a signal handler may deadlock the calling thread.

RETURN VALUE

All condition variable functions return 0 on success and a non-zero error code on error.

ERRORS

pthread_cond_init, pthread_cond_signal, pthread_cond_broadcast, and pthread_cond_wait never return an error code.

The pthread_cond_timedwait function returns the following error codes on error:

ETIMEDOUT
The condition variable was not signaled until the timeout specified by abstime.

EINTR
pthread_cond_timedwait was interrupted by a signal.

The pthread_cond_destroy function returns the following error code on error:

EBUSY
Some threads are currently waiting on cond.

SEE ALSO

pthread_condattr_init(3), pthread_mutex_lock(3), pthread_mutex_unlock(3), gettimeofday(2), nanosleep(2).

EXAMPLE

Consider two shared variables x and y, protected by the mutex mut, and a condition variable cond that is to be signaled whenever x becomes greater than y.

int x,y;
pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;

Waiting until x is greater than y is performed as follows:

pthread_mutex_lock(&mut);
while (x <= y) {
        pthread_cond_wait(&cond, &mut);
}
/* operate on x and y */
pthread_mutex_unlock(&mut);

Modifications on x and y that may cause x to become greater than y should signal the condition if needed:

pthread_mutex_lock(&mut);
/* modify x and y */
if (x > y) pthread_cond_broadcast(&cond);
pthread_mutex_unlock(&mut);

If it can be proved that at most one waiting thread needs to be waken up (for instance, if there are only two threads communicating through x and y), pthread_cond_signal can be used as a slightly more efficient alternative to pthread_cond_broadcast. In doubt, use pthread_cond_broadcast.

To wait for x to become greater than y with a timeout of 5 seconds, do:

struct timeval now;
struct timespec timeout;
int retcode;
pthread_mutex_lock(&mut);
gettimeofday(&now);
timeout.tv_sec = now.tv_sec + 5;
timeout.tv_nsec = now.tv_usec * 1000;
retcode = 0;
while (x <= y && retcode != ETIMEDOUT) {
        retcode = pthread_cond_timedwait(&cond, &mut, &timeout);
}
if (retcode == ETIMEDOUT) {
        /* timeout occurred */
} else {
        /* operate on x and y */
}
pthread_mutex_unlock(&mut);
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2222 - Linux cli command X11_Protocol_Ext_RENDERpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command X11_Protocol_Ext_RENDERpm and provides detailed information about the command X11_Protocol_Ext_RENDERpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the X11_Protocol_Ext_RENDERpm.

NAME 🖥️ X11_Protocol_Ext_RENDERpm 🖥️

Perl module for the X Rendering Extension

SYNOPSIS

use X11::Protocol; $x = X11::Protocol->new($ENV{DISPLAY}); $x->init_extension(RENDER) or die;

DESCRIPTION

The RENDER extension adds a new set of drawing primitives which effectively represent a replacement of the drawing routines in the core protocol, redesigned based on the needs of more modern clients. It adds long-desired features such as subpixel positioning, alpha compositing, direct specification of colors, and multicolored or animated cursors. On the other hand, it omits features that are no longer commonly used: wide lines, arbitrary polygons (only triangles and horizontally-aligned trapezoids are supported), ellipses, bitwise rendering operations, and server-side fonts (in favor of glyphs that are rendered on the client side and transmitted once).

As of this writing (early 2004), the specification and implementation both have rough edges, but there are relatively few alternatives for offloading fancy graphics processing to the server, as is necessary over slow links or if the client is written in a slow language. Another possibility you might consider is the 2D subset of OpenGL, though it doesn’t yet have an X11::Protocol-compatible interface.

SYMBOLIC CONSTANTS

This extension adds the constant types ‘PictType’, ‘PictOp’, ‘SubPixel’, ‘PolyEdge’, and ‘PolyMode’, with values as defined in the standard.

REQUESTS

This extension adds several requests, called as shown below:

$x->RenderQueryVersion($major, $minor) => ($major, $minor) $x->RenderQueryPictFormats() => ([[$id, $type, $depth, $red, $red_m, $green, $green_m, $blue, $blue_m, $alpha, $alpha_m, $cmap], …], [[$fallback, [$depth, [$visual, $format], …], …], …], [$subpixel, …]) $x->RenderQueryPictIndexValues($pict_format) => ([$index, $red, $green, $blue, $alpha], …) $x->RenderQueryFilters($drawable) => ([@filters], [@aliases]) $x->RenderCreatePicture($picture, $drawable, $format, attribute => $value, …) $x->RenderChangePicture($picture, attribute => $value, …) $x->RenderSetPictureClipRectangles($pic, $x_origin, $y_origin, [$x, $y, $width, $height], …) $x->RenderSetPictureTransform($pict, $m11, $m12, $m13, $m21, $m22, $m23, $m31, $m32, $m33); $x->RenderSetPictureFilter($pict, $filter, @args) $x->RenderComposite($op, $src, $mask, $dst, $src_x, $src_y, $mask_x, $mask_y, $dst_x, $dst_y, $width, $height) $x->RenderFillRectangles($op, $dst, [$red, $green, $blue, $alpha], [$x, $y, $width, $height], …) $x->RenderTrapezoids($op, $src, $src_x, $src_y, $dst, $mask_format, [$top, $bottom, $lx1, $ly1, $lx2, $ly2, $rx1, $ry1, $rx2, $ry2] ,…) $x->RenderTriangles($op, $src, $src_x, $src_y, $dst, $mask_format, [$x1, $y1, $x2, $y2, $x3, $y3]) $x->RenderTriStrip($op, $src, $src_x, $src_y, $dst, $mask_format, [$x, $y], [$x, $y], [$x, $y], [$x, $y], …) $x->RenderTriFan($op, $src, $src_x, $src_y, $dst, $mask_format, [$x, $y], [$x, $y], [$x, $y], [$x, $y], …) $x->RenderCreateGlyphSet($gsid, $format) $x->RenderReferenceGlyphSet($gsid, $existing) $x->RenderFreeGlyphSet($gsid) $x->RenderAddGlyphs($gsid, [$glyph, $width, $height, $x, $y, $x_off, $y_off, $data], …)

Warning: with some server implementations (including XFree86 through 4.4) passing more than one glyph to AddGlyphs can hang or crash the server. So don’t do that.

$x->RenderFreeGylphs($gsid, @glyphs) $x->RenderCompositeGlyphs8($op, $src, $dst, $mask_format, $gsid, $src_x, $src_y, [$delta_x, $delta_y, $str], …) $x->RenderCompositeGlyphs16($op, $src, $dst, $mask_format, $gsid, $src_x, $src_y, [$delta_x, $delta_y, $str], …) $x->RenderCompositeGlyphs32($op, $src, $dst, $mask_format, $gsid, $src_x, $src_y, [$delta_x, $delta_y, $str], …)

In these three requests, new GlyphSetIDs can also be interspersed with the array references.

$x->RenderCreateCursor($cid, $source, $hot_x, $hot_y) $x->RenderCreateAnimCursor($cid, [$cursor, $delay], …)

AUTHOR

Stephen McCamant <[email protected]>.

SEE ALSO

perl (1), X11::Protocol, The X Rendering Extension (XFree86 draft standard).

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2223 - Linux cli command log10f

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command log10f and provides detailed information about the command log10f, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the log10f.

NAME 🖥️ log10f 🖥️

base-10 logarithmic function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double log10(double x);
float log10f(float x);
long double log10l(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

log10f(), log10l():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the base-10 logarithm of x.

RETURN VALUE

On success, these functions return the base-10 logarithm of x.

For special cases, including where x is 0, 1, negative, infinity, or NaN, see log(3).

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

For a discussion of the errors that can occur for these functions, see log(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

log10(), log10f(), log10l()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

SEE ALSO

cbrt(3), clog10(3), exp10(3), log(3), log2(3), sqrt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2224 - Linux cli command memcpy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command memcpy and provides detailed information about the command memcpy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the memcpy.

NAME 🖥️ memcpy 🖥️

copy memory area

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
void *memcpy(void dest[restrict .n], const void src[restrict .n],
 size_t n);

DESCRIPTION

The memcpy() function copies n bytes from memory area src to memory area dest. The memory areas must not overlap. Use memmove(3) if the memory areas do overlap.

RETURN VALUE

The memcpy() function returns a pointer to dest.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

memcpy()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89, SVr4, 4.3BSD.

CAVEATS

Failure to observe the requirement that the memory areas do not overlap has been the source of significant bugs. (POSIX and the C standards are explicit that employing memcpy() with overlapping areas produces undefined behavior.) Most notably, in glibc 2.13 a performance optimization of memcpy() on some platforms (including x86-64) included changing the order in which bytes were copied from src to dest.

This change revealed breakages in a number of applications that performed copying with overlapping areas. Under the previous implementation, the order in which the bytes were copied had fortuitously hidden the bug, which was revealed when the copying order was reversed. In glibc 2.14, a versioned symbol was added so that old binaries (i.e., those linked against glibc versions earlier than 2.14) employed a memcpy() implementation that safely handles the overlapping buffers case (by providing an “older” memcpy() implementation that was aliased to memmove(3)).

SEE ALSO

bcopy(3), bstring(3), memccpy(3), memmove(3), mempcpy(3), strcpy(3), strncpy(3), wmemcpy(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2225 - Linux cli command strfry

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strfry and provides detailed information about the command strfry, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strfry.

NAME 🖥️ strfry 🖥️

randomize a string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <string.h>
char *strfry(char *string);

DESCRIPTION

The strfry() function randomizes the contents of string by randomly swapping characters in the string. The result is an anagram of string.

RETURN VALUE

The strfry() functions returns a pointer to the randomized string.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strfry()

Thread safetyMT-Safe

STANDARDS

GNU.

SEE ALSO

memfrob(3), string(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2226 - Linux cli command Tk_chooseColorpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_chooseColorpm and provides detailed information about the command Tk_chooseColorpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_chooseColorpm.

NAME 🖥️ Tk_chooseColorpm 🖥️

pops up a dialog box for the user to select a color.

SYNOPSIS

$color = $widget->chooseColor?(-option=>value, …)?;

DESCRIPTION

The method chooseColor is implemented as a perl wrapper on the core tk “command” tk_chooseColor, and $widget is passed as the argument to the hidden -parent option. The implementation of internal tk_chooseColor is platform specific, on Win32 it is a native dialog, and on UNIX/X11 it is implemented in terms of Tk::ColorEditor.

The chooseColor method pops up a dialog box for the user to select a color. The following option-value pairs are possible as command line arguments:

-initialcolor=>color
Specifies the color to display in the color dialog when it pops up. color must be in a form acceptable to the Tk_GetColor function.

-parent=>$widget
Makes $widget the logical parent of the color dialog. The color dialog is displayed on top of its parent window.

-title=>titleString
Specifies a string to display as the title of the dialog box. If this option is not specified, then a default title will be displayed.

If the user selects a color, tk_chooseColor will return the name of the color in a form acceptable to Tk_GetColor. If the user cancels the operation, the command will return undef.

EXAMPLE

$widget->configure(-fg => $parent->chooseColor(-initialcolor => gray, -title => “Choose color”));

KEYWORDS

color selection dialog

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2227 - Linux cli command XtUngrabButton

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtUngrabButton and provides detailed information about the command XtUngrabButton, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtUngrabButton.

NAME 🖥️ XtUngrabButton 🖥️

manage grabs

SYNTAX

#include <X11/Intrinsic.h>

void XtGrabKey(Widget widget, KeyCode keycode, Modifiers modifiers, Boolean owner_events, int pointer_mode, int keyboard_mode);

void XtUngrabKey(Widget widget, KeyCode keycode, Modifiers modifiers);

int XtGrabKeyboard(Widget widget, Boolean owner_events, int pointer_mode, int keyboard_mode, Time time);

void XtUngrabKeyboard(Widget widget, Time time);

void XtGrabButton(Widget widget, int button, Modifiers modifiers, Boolean owner_events, unsigned int event_mask, int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor);

void XtUngrabButton(Widget widget, unsigned button, Modifiers modifiers);

int XtGrabPointer(Widget widget, Boolean owner_events, unsigned int event_mask, int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor, Time time);

void XtUngrabPointer(Widget widget, Time time);

ARGUMENTS

widget
Specifies the widget in whose window the grab will occur. Must be of class Core or a subclass thereof.

keycode

modifiers

owner_events

pointer_mode

keyboard_mode

time

button

confine_to

cursor
Specifies arguments to the associated Xlib function call.

DESCRIPTION

XtGrabKey calls XGrabKey specifying the widget’s window as the grab window if the widget is realized. The remaining arguments are exactly as for XGrabKey. If the widget is not realized, or is later unrealized, the call to XGrabKey will be performed (again) when the widget is realized and its window becomes mapped. In the future, if XtDispatchEvent is called with a KeyPress event matching the specified keycode and modifiers (which may be AnyKey or AnyModifier, respectively) for the widget’s window, the Intrinsics will call XtUngrabKeyboard with the timestamp from the KeyPress event if either of the following conditions is true:

  • There is a modal cascade and the widget is not in the active subset of the cascade and the keyboard was not previously grabbed, or

  • XFilterEvent returns True.

XtUngrabKey calls XUngrabKey specifying the widget’s window as the ungrab window if the widget is realized. The remaining arguments are exactly as for XUngrabKey. If the widget is not realized, XtUngrabKey removes a deferred XtGrabKey request, if any, for the specified widget, keycode, and modifiers.

If the specified widget is realized XtGrabKeyboard calls XGrabKeyboard specifying the widget’s window as the grab window. The remaining arguments and return value are exactly as for XGrabKeyboard. If the widget is not realized, XtGrabKeyboard immediately returns GrabNotViewable. No future ungrab is implied by XtGrabKeyboard.

XtUngrabKeyboard calls XUngrabKeyboard with the specified time.

XtGrabButton calls XGrabButton specifying the widget’s window as the grab window if the widget is realized. The remaining arguments are exactly as for XGrabButton. If the widget is not realized, or is later unrealized, the call to XGrabButton will be performed (again) when the widget is realized and its window becomes mapped. In the future, if XtDispatchEvent is called with a ButtonPress event matching the specified button and modifiers (which may be AnyButton or AnyModifier, respectively) for the widget’s window, the Intrinsics will call XtUngrabPointer with the timestamp from the ButtonPress event if either of the following conditions is true:

  • There is a modal cascade and the widget is not in the active subset of the cascade and the pointer was not previously grabbed, or

  • XFilterEvent returns True.

XtUngrabButton calls XUngrabButton specifying the widget’s window as the ungrab window if the widget is realized. The remaining arguments are exactly as for XUngrabButton. If the widget is not realized, XtUngrabButton removes a deferred XtGrabButton request, if any, for the specified widget, button, and modifiers.

XtGrabPointer calls XGrabPointer specifying the widget’s window as the grab window. The remaining arguments and return value are exactly as for XGrabPointer. If the widget is not realized, XtGrabPointer immediately returns GrabNotViewable. No future ungrab is implied by XtGrabPointer.

XtUngrabPointer calls XUngrabPointer with the specified time.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2228 - Linux cli command getSaveFilepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getSaveFilepm and provides detailed information about the command getSaveFilepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getSaveFilepm.

NAME 🖥️ getSaveFilepm 🖥️

pop up a dialog box for the user to select a file to open.

SYNOPSIS

$widget->getOpenFile(?-option=>value, …>?)

$widget->getSaveFile(?-option=>value, …>?)

DESCRIPTION

The methods getOpenFile and getSaveFile pop up a dialog box for the user to select a file to open or save.

The getOpenFile method is usually associated with the Open command in the File menu. Its purpose is for the user to select an existing file only. If the user enters an non-existent file, the dialog box gives the user an error prompt and requires the user to give an alternative selection. If an application allows the user to create new files, it should do so by providing a separate New menu command.

The getSaveFile method is usually associated with the Save as command in the File menu. If the user enters a file that already exists, the dialog box prompts the user for confirmation whether the existing file should be overwritten or not.

If the user selects a file, both getOpenFile and getSaveFile return the full pathname of this file. If the user cancels the operation, both commands return an undefined value.

The following option-value pairs are possible as command line arguments to these two commands:

-defaultextension => extension
Specifies a string that will be appended to the filename if the user enters a filename without an extension. The default value is the empty string, which means no extension will be appended to the filename in any case. This option is ignored on the Macintosh platform, which does not require extensions to filenames, and the UNIX implementation guesses reasonable values for this from the -filetypes option when this is not supplied.

-filetypes => [filePattern ?, …?]
If a File types listbox exists in the file dialog on the particular platform, this option gives the filetypes in this listbox. When the user choose a filetype in the listbox, only the files of that type are listed. If this option is unspecified, or if it is set to the empty list, or if the File types listbox is not supported by the particular platform then all files are listed regardless of their types. See “SPECIFYING FILE PATTERNS” below for a discussion on the contents of filePatterns.

-initialdir => directory
Specifies that the files in directory should be displayed when the dialog pops up. If this parameter is not specified, then the files in the current working directory are displayed. This option may not always work on the Macintosh. This is not a bug. Rather, the General Controls control panel on the Mac allows the end user to override the application default directory.

-initialfile => filename
Specifies a filename to be displayed in the dialog when it pops up. This option is ignored by the getOpenFile method.

-multiple
Allows the user to choose multiple files from the Open dialog. On the Macintosh, this is only available when Navigation Services are installed.

-message => string
Specifies a message to include in the client area of the dialog. This is only available on the Macintosh, and only when Navigation Services are installed.

-title => titleString
Specifies a string to display as the title of the dialog box. If this option is not specified, then a default title is displayed. This option is ignored on the Macintosh platform.

SPECIFYING FILE PATTERNS

The filePatterns given by the -filetypes option are a list of file patterns. Each file pattern is a list of the form

typeName [extension ?extension …?] ?[macType ?macType …?]?

typeName is the name of the file type described by this file pattern and is the text string that appears in the File types listbox. extension is a file extension for this file pattern. macType is a four-character Macintosh file type. The list of macTypes is optional and may be omitted for applications that do not need to execute on the Macintosh platform.

Several file patterns may have the same typeName, in which case they refer to the same file type and share the same entry in the listbox. When the user selects an entry in the listbox, all the files that match at least one of the file patterns corresponding to that entry are listed. Usually, each file pattern corresponds to a distinct type of file. The use of more than one file patterns for one type of file is necessary on the Macintosh platform only.

On the Macintosh platform, a file matches a file pattern if its name matches at least one of the extension(s) AND it belongs to at least one of the macType(s) of the file pattern. For example, the C Source Files file pattern in the sample code matches with files that have a \c extension AND belong to the macType TEXT. To use the OR rule instead, you can use two file patterns, one with the extensions only and the other with the macType only. The GIF Files file type in the sample code matches files that EITHER have a \gif extension OR belong to the macType GIFF.

On the Unix and Windows platforms, a file matches a file pattern if its name matches at at least one of the extension(s) of the file pattern. The macTypes are ignored.

SPECIFYING EXTENSIONS

On the Unix and Macintosh platforms, extensions are matched using glob-style pattern matching. On the Windows platforms, extensions are matched by the underlying operating system. The types of possible extensions are: (1) the special extension * matches any file; (2) the special extension "" matches any files that do not have an extension (i.e., the filename contains no full stop character); (3) any character string that does not contain any wild card characters (* and ?).

Due to the different pattern matching rules on the various platforms, to ensure portability, wild card characters are not allowed in the extensions, except as in the special extension *. Extensions without a full stop character (e.g, ~) are allowed but may not work on all platforms.

CAVEATS

See “CAVEATS” in Tk::chooseDirectory.

EXAMPLE

my $types = [ [Text Files, [.txt, .text]], [TCL Scripts, .tcl ], [C Source Files, .c, TEXT], [GIF Files, .gif, ], [GIF Files, , GIFF], [All Files, *, ], ]; my $filename = $widget->getOpenFile(-filetypes=>$types); if ($filename ne “”) { # Open the file … }

SEE ALSO

Tk::FBox, Tk::FileSelect

KEYWORDS

file selection dialog

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2229 - Linux cli command Mail_Field_Genericpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Mail_Field_Genericpm and provides detailed information about the command Mail_Field_Genericpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Mail_Field_Genericpm.

NAME 🖥️ Mail_Field_Genericpm 🖥️

implementation for inspecific fields

INHERITANCE

Mail::Field::Generic is a Mail::Field

SYNOPSIS

use Mail::Field; my $field = Mail::Field->new(Subject, some subject text); my $field = Mail::Field->new(subject => some subject text);

DESCRIPTION

A generic implementation for header fields without own implementation. This is fine for fields like Subject, X-Mailer, etc., where the field holds only a string of no particular importance/format.

Extends “DESCRIPTION” in Mail::Field.

METHODS

Extends “METHODS” in Mail::Field.

Constructors

Extends “Constructors” in Mail::Field.

Mail::Field::Generic->combine($fields)
Inherited, see “Constructors” in Mail::Field

Mail::Field::Generic->extract( $tag, $head [, $index ] )
Inherited, see “Constructors” in Mail::Field

Mail::Field::Generic->new( $tag [, STRING | %options] )
Inherited, see “Constructors” in Mail::Field

“Fake” constructors

Extends ““Fake” constructors” in Mail::Field.

$obj->create(%options)
-Option–Default Text

Text => STRING

$obj->parse( [STRING] )

Set the new text, which is empty when no STRING is provided.

Accessors

Extends “Accessors” in Mail::Field.

$obj->set(%options)
Inherited, see “Accessors” in Mail::Field

$obj->stringify()
Inherited, see “Accessors” in Mail::Field

$obj->tag()

Mail::Field::Generic->tag()

Inherited, see “Accessors” in Mail::Field

Smart accessors

Extends “Smart accessors” in Mail::Field.

$obj->text( [STRING] )
Inherited, see “Smart accessors” in Mail::Field

DETAILS

Extends “DETAILS” in Mail::Field.

DIAGNOSTICS

Error: Undefined subroutine <method> called
Mail::Field objects use autoloading to compile new functionality. Apparently, the method called is not implemented for the specific class of the field object.

SEE ALSO

This module is part of the MailTools distribution, http://perl.overmeer.net/mailtools/.

AUTHORS

The MailTools bundle was developed by Graham Barr. Later, Mark Overmeer took over maintenance without commitment to further development.

Mail::Cap by Gisle Aas <[email protected]>. Mail::Field::AddrList by Peter Orbaek <[email protected]>. Mail::Mailer and Mail::Send by Tim Bunce <[email protected]>. For other contributors see ChangeLog.

LICENSE

Copyrights 1995-2000 Graham Barr <[email protected]> and 2001-2017 Mark Overmeer <[email protected]>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2230 - Linux cli command random_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command random_r and provides detailed information about the command random_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the random_r.

NAME 🖥️ random_r 🖥️

reentrant random number generator

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int random_r(struct random_data *restrict buf,
 int32_t *restrict result);
int srandom_r(unsigned int seed, struct random_data *buf);
int initstate_r(unsigned int seed, char statebuf[restrict .statelen],
 size_t statelen, struct random_data *restrict buf);
int setstate_r(char *restrict statebuf,
 struct random_data *restrict buf);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

random_r(), srandom_r(), initstate_r(), setstate_r():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

These functions are the reentrant equivalents of the functions described in random(3). They are suitable for use in multithreaded programs where each thread needs to obtain an independent, reproducible sequence of random numbers.

The random_r() function is like random(3), except that instead of using state information maintained in a global variable, it uses the state information in the argument pointed to by buf, which must have been previously initialized by initstate_r(). The generated random number is returned in the argument result.

The srandom_r() function is like srandom(3), except that it initializes the seed for the random number generator whose state is maintained in the object pointed to by buf, which must have been previously initialized by initstate_r(), instead of the seed associated with the global state variable.

The initstate_r() function is like initstate(3) except that it initializes the state in the object pointed to by buf, rather than initializing the global state variable. Before calling this function, the buf.state field must be initialized to NULL. The initstate_r() function records a pointer to the statebuf argument inside the structure pointed to by buf. Thus, statebuf should not be deallocated so long as buf is still in use. (So, statebuf should typically be allocated as a static variable, or allocated on the heap using malloc(3) or similar.)

The setstate_r() function is like setstate(3) except that it modifies the state in the object pointed to by buf, rather than modifying the global state variable. state must first have been initialized using initstate_r() or be the result of a previous call of setstate_r().

RETURN VALUE

All of these functions return 0 on success. On error, -1 is returned, with errno set to indicate the error.

ERRORS

EINVAL
A state array of less than 8 bytes was specified to initstate_r().

EINVAL
The statebuf or buf argument to setstate_r() was NULL.

EINVAL
The buf or result argument to random_r() was NULL.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

random_r(), srandom_r(), initstate_r(), setstate_r()

Thread safetyMT-Safe race:buf

STANDARDS

GNU.

BUGS

The initstate_r() interface is confusing. It appears that the random_data type is intended to be opaque, but the implementation requires the user to either initialize the buf.state field to NULL or zero out the entire structure before the call.

SEE ALSO

drand48(3), rand(3), random(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2231 - Linux cli command xdr_free

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_free and provides detailed information about the command xdr_free, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_free.

NAME 🖥️ xdr_free 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2232 - Linux cli command XtToolkitInitialize

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtToolkitInitialize and provides detailed information about the command XtToolkitInitialize, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtToolkitInitialize.

NAME 🖥️ XtToolkitInitialize 🖥️

create, destroy, and obtain an application context

SYNTAX

#include <X11/Intrinsic.h>

XtAppContext XtCreateApplicationContext(void);

void XtDestroyApplicationContext(XtAppContext app_context);

XtAppContext XtWidgetToApplicationContext(Widget w);

void XtToolkitInitialize(void);

ARGUMENTS

app_context
Specifies the application context.

  1. Specifies the widget that you want the application context for.

DESCRIPTION

The XtCreateApplicationContext function returns an application context, which is an opaque type. Every application must have at least one application context.

The XtDestroyApplicationContext function destroys the specified application context as soon as it is safe to do so. If called from with an event dispatch (for example, a callback procedure), XtDestroyApplicationContext does not destroy the application context until the dispatch is complete.

The XtWidgetToApplicationContext function returns the application context for the specified widget.

The XtToolkitInitialize function initializes the Intrinsics internals. If XtToolkitInitialize was previously called it returns immediately.

SEE ALSO

XtDisplayInitialize(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2233 - Linux cli command ruserok

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ruserok and provides detailed information about the command ruserok, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ruserok.

NAME 🖥️ ruserok 🖥️

routines for returning a stream to a remote command

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h> /* Or <unistd.h> on some systems */
int rcmd(char **restrict ahost, unsigned short inport,
 const char *restrict locuser,
 const char *restrict remuser,
 const char *restrict cmd, int *restrict fd2p);
int rresvport(int *port);
int iruserok(uint32_t raddr, int superuser,
 const char *ruser, const char *luser);
int ruserok(const char *rhost, int superuser,
 const char *ruser, const char *luser);
int rcmd_af(char **restrict ahost, unsigned short inport,
 const char *restrict locuser,
 const char *restrict remuser,
 const char *restrict cmd, int *restrict fd2p,
 sa_family_t af);
int rresvport_af(int *port, sa_family_t af);
int iruserok_af(const void *restrict raddr, int superuser,
 const char *restrict ruser, const char *restrict luser,
 sa_family_t af);
int ruserok_af(const char *rhost, int superuser,
 const char *ruser, const char *luser,
 sa_family_t af);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

rcmd(), rcmd_af(), rresvport(), rresvport_af(), iruserok(), iruserok_af(), ruserok(), ruserok_af():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The rcmd() function is used by the superuser to execute a command on a remote machine using an authentication scheme based on privileged port numbers. The rresvport() function returns a file descriptor to a socket with an address in the privileged port space. The iruserok() and ruserok() functions are used by servers to authenticate clients requesting service with rcmd(). All four functions are used by the rshd(8) server (among others).

rcmd()

The rcmd() function looks up the host *ahost using gethostbyname(3), returning -1 if the host does not exist. Otherwise, *ahost is set to the standard name of the host and a connection is established to a server residing at the well-known Internet port inport.

If the connection succeeds, a socket in the Internet domain of type SOCK_STREAM is returned to the caller, and given to the remote command as stdin and stdout. If fd2p is nonzero, then an auxiliary channel to a control process will be set up, and a file descriptor for it will be placed in *fd2p. The control process will return diagnostic output from the command (unit 2) on this channel, and will also accept bytes on this channel as being UNIX signal numbers, to be forwarded to the process group of the command. If fd2p is 0, then the stderr (unit 2 of the remote command) will be made the same as the stdout and no provision is made for sending arbitrary signals to the remote process, although you may be able to get its attention by using out-of-band data.

The protocol is described in detail in rshd(8).

rresvport()

The rresvport() function is used to obtain a socket with a privileged port bound to it. This socket is suitable for use by rcmd() and several other functions. Privileged ports are those in the range 0 to 1023. Only a privileged process (on Linux, a process that has the CAP_NET_BIND_SERVICE capability in the user namespace governing its network namespace) is allowed to bind to a privileged port. In the glibc implementation, this function restricts its search to the ports from 512 to 1023. The port argument is value-result: the value it supplies to the call is used as the starting point for a circular search of the port range; on (successful) return, it contains the port number that was bound to.

iruserok() and ruserok()

The iruserok() and ruserok() functions take a remote host’s IP address or name, respectively, two usernames and a flag indicating whether the local user’s name is that of the superuser. Then, if the user is not the superuser, it checks the /etc/hosts.equiv file. If that lookup is not done, or is unsuccessful, the .rhosts in the local user’s home directory is checked to see if the request for service is allowed.

If this file does not exist, is not a regular file, is owned by anyone other than the user or the superuser, is writable by anyone other than the owner, or is hardlinked anywhere, the check automatically fails. Zero is returned if the machine name is listed in the hosts.equiv file, or the host and remote username are found in the .rhosts file; otherwise iruserok() and ruserok() return -1. If the local domain (as obtained from gethostname(2)) is the same as the remote domain, only the machine name need be specified.

If the IP address of the remote host is known, iruserok() should be used in preference to ruserok(), as it does not require trusting the DNS server for the remote host’s domain.

*_af() variants

All of the functions described above work with IPv4 (AF_INET) sockets. The “_af” variants take an extra argument that allows the socket address family to be specified. For these functions, the af argument can be specified as AF_INET or AF_INET6. In addition, rcmd_af() supports the use of AF_UNSPEC.

RETURN VALUE

The rcmd() function returns a valid socket descriptor on success. It returns -1 on error and prints a diagnostic message on the standard error.

The rresvport() function returns a valid, bound socket descriptor on success. On failure, it returns -1 and sets errno to indicate the error. The error code EAGAIN is overloaded to mean: “All network ports in use”.

For information on the return from ruserok() and iruserok(), see above.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

rcmd(), rcmd_af()

Thread safetyMT-Unsafe

rresvport(), rresvport_af()

Thread safetyMT-Safe

iruserok(), ruserok(), iruserok_af(), ruserok_af()

Thread safetyMT-Safe locale

STANDARDS

BSD.

HISTORY

iruserok_af()
rcmd_af()
rresvport_af()
ruserok_af()
glibc 2.2.

Solaris, 4.2BSD. The “_af” variants are more recent additions, and are not present on as wide a range of systems.

BUGS

iruserok() and iruserok_af() are declared in glibc headers only since glibc 2.12.

SEE ALSO

rlogin(1), rsh(1), rexec(3), rexecd(8), rlogind(8), rshd(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2234 - Linux cli command timerisset

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command timerisset and provides detailed information about the command timerisset, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the timerisset.

NAME 🖥️ timerisset 🖥️

timeval operations

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/time.h>
void timeradd(struct timeval *a, struct timeval *b,
 struct timeval *res);
void timersub(struct timeval *a, struct timeval *b,
 struct timeval *res);
void timerclear(struct timeval *tvp);
int timerisset(struct timeval *tvp);
int timercmp(struct timeval *a, struct timeval *b, CMP);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The macros are provided to operate on timeval structures, defined in <sys/time.h> as:

struct timeval {
    time_t      tv_sec;     /* seconds */
    suseconds_t tv_usec;    /* microseconds */
};

timeradd() adds the time values in a and b, and places the sum in the timeval pointed to by res. The result is normalized such that res->tv_usec has a value in the range 0 to 999,999.

timersub() subtracts the time value in b from the time value in a, and places the result in the timeval pointed to by res. The result is normalized such that res->tv_usec has a value in the range 0 to 999,999.

timerclear() zeros out the timeval structure pointed to by tvp, so that it represents the Epoch: 1970-01-01 00:00:00 +0000 (UTC).

timerisset() returns true (nonzero) if either field of the timeval structure pointed to by tvp contains a nonzero value.

timercmp() compares the timer values in a and b using the comparison operator CMP, and returns true (nonzero) or false (0) depending on the result of the comparison. Some systems (but not Linux/glibc), have a broken timercmp() implementation, in which CMP of >=, <=, and == do not work; portable applications can instead use

!timercmp(..., <)
!timercmp(..., >)
!timercmp(..., !=)

RETURN VALUE

timerisset() and timercmp() return true (nonzero) or false (0).

ERRORS

No errors are defined.

STANDARDS

None.

HISTORY

BSD.

SEE ALSO

gettimeofday(2), time(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2235 - Linux cli command fmaxl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fmaxl and provides detailed information about the command fmaxl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fmaxl.

NAME 🖥️ fmaxl 🖥️

determine maximum of two floating-point numbers

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double fmax(double x, double y);
float fmaxf(float x, float y);
long double fmaxl(long double x, long double y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

fmax(), fmaxf(), fmaxl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions return the larger value of x and y.

RETURN VALUE

These functions return the maximum of x and y.

If one argument is a NaN, the other argument is returned.

If both arguments are NaN, a NaN is returned.

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fmax(), fmaxf(), fmaxl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

fdim(3), fmin(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2236 - Linux cli command LWP_Protocol_sockspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LWP_Protocol_sockspm and provides detailed information about the command LWP_Protocol_sockspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LWP_Protocol_sockspm.

NAME 🖥️ LWP_Protocol_sockspm 🖥️

adds support for the socks protocol and proxy facility

SYNOPSIS

use LWP::Protocol::socks;

DESCRIPTION

Use this package when you wish to use a socks proxy for your connections.

It provides some essential hooks into the LWP system to implement a socks scheme similar to http for describing your socks connection, and can be used to proxy either http or https connections.

The use case is to use LWP::UserAgent’s proxy method to register your socks proxy like so:

$ua->proxy([qw(http https)] => socks://socks.yahoo.com:1080);

Then just use your $ua object as usual!

EXAMPLES

#!/usr/local/bin/perl use strict; use LWP::UserAgent; my $ua = new LWP::UserAgent(agent => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5); # for socks5, use socks like so: $ua->proxy([qw(http https)] => socks://socks.yahoo.com:1080); # for socks4, use socks4 like so: $ua->proxy([qw(http https)] => socks4://socks.yahoo.com:1080); my $response = $ua->get(“http://www.freebsd.org”); print $response->code, , $response->message," “; my $response = $ua->get(“https://www.microsoft.com”); print $response->code, , $response->message,” “;

NOTES

I don’t have much time to contribute to this. If you’d like to contribute, please fork https://github.com/scr/cpan and send me a pull request.

AUTHORS

Sheridan C Rawlins <[email protected]>

Oleg G <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2237 - Linux cli command setstate_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setstate_r and provides detailed information about the command setstate_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setstate_r.

NAME 🖥️ setstate_r 🖥️

reentrant random number generator

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int random_r(struct random_data *restrict buf,
 int32_t *restrict result);
int srandom_r(unsigned int seed, struct random_data *buf);
int initstate_r(unsigned int seed, char statebuf[restrict .statelen],
 size_t statelen, struct random_data *restrict buf);
int setstate_r(char *restrict statebuf,
 struct random_data *restrict buf);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

random_r(), srandom_r(), initstate_r(), setstate_r():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

These functions are the reentrant equivalents of the functions described in random(3). They are suitable for use in multithreaded programs where each thread needs to obtain an independent, reproducible sequence of random numbers.

The random_r() function is like random(3), except that instead of using state information maintained in a global variable, it uses the state information in the argument pointed to by buf, which must have been previously initialized by initstate_r(). The generated random number is returned in the argument result.

The srandom_r() function is like srandom(3), except that it initializes the seed for the random number generator whose state is maintained in the object pointed to by buf, which must have been previously initialized by initstate_r(), instead of the seed associated with the global state variable.

The initstate_r() function is like initstate(3) except that it initializes the state in the object pointed to by buf, rather than initializing the global state variable. Before calling this function, the buf.state field must be initialized to NULL. The initstate_r() function records a pointer to the statebuf argument inside the structure pointed to by buf. Thus, statebuf should not be deallocated so long as buf is still in use. (So, statebuf should typically be allocated as a static variable, or allocated on the heap using malloc(3) or similar.)

The setstate_r() function is like setstate(3) except that it modifies the state in the object pointed to by buf, rather than modifying the global state variable. state must first have been initialized using initstate_r() or be the result of a previous call of setstate_r().

RETURN VALUE

All of these functions return 0 on success. On error, -1 is returned, with errno set to indicate the error.

ERRORS

EINVAL
A state array of less than 8 bytes was specified to initstate_r().

EINVAL
The statebuf or buf argument to setstate_r() was NULL.

EINVAL
The buf or result argument to random_r() was NULL.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

random_r(), srandom_r(), initstate_r(), setstate_r()

Thread safetyMT-Safe race:buf

STANDARDS

GNU.

BUGS

The initstate_r() interface is confusing. It appears that the random_data type is intended to be opaque, but the implementation requires the user to either initialize the buf.state field to NULL or zero out the entire structure before the call.

SEE ALSO

drand48(3), rand(3), random(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2238 - Linux cli command JSON_backportPP_Booleanpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command JSON_backportPP_Booleanpm and provides detailed information about the command JSON_backportPP_Booleanpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the JSON_backportPP_Booleanpm.

NAME 🖥️ JSON_backportPP_Booleanpm 🖥️

dummy module providing JSON::PP::Boolean

SYNOPSIS

# do not “use” yourself

DESCRIPTION

This module exists only to provide overload resolution for Storable and similar modules. See JSON::PP for more info about this class.

AUTHOR

This idea is from JSON::XS::Boolean written by Marc Lehmann <schmorp[at]schmorp.de>

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2239 - Linux cli command Moose_Meta_TypeConstraint_Parameterizablepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_TypeConstraint_Parameterizablepm and provides detailed information about the command Moose_Meta_TypeConstraint_Parameterizablepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_TypeConstraint_Parameterizablepm.

NAME 🖥️ Moose_Meta_TypeConstraint_Parameterizablepm 🖥️

Type constraints which can take a parameter (ArrayRef)

VERSION

version 2.2207

DESCRIPTION

This class represents a parameterizable type constraint. This is a type constraint like ArrayRef or HashRef, that can be parameterized and made more specific by specifying a contained type. For example, instead of just an ArrayRef of anything, you can specify that is an ArrayRef[Int].

A parameterizable constraint should not be used as an attribute type constraint. Instead, when parameterized it creates a Moose::Meta::TypeConstraint::Parameterized which should be used.

INHERITANCE

Moose::Meta::TypeConstraint::Parameterizable is a subclass of Moose::Meta::TypeConstraint.

METHODS

This class is intentionally not documented because the API is confusing and needs some work.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2240 - Linux cli command XeviQueryVersion

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XeviQueryVersion and provides detailed information about the command XeviQueryVersion, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XeviQueryVersion.

NAME 🖥️ XeviQueryVersion 🖥️

X Extended Visual Information functions

SYNOPSIS

#include <X11/extensions/XEVI.h>

Bool XeviQueryExtension (Display *dpy);

Bool XeviQueryVersion (Display *dpy, int *major_version_return, int *minor_version_return);

int XeviGetVisualInfo (Display *dpy, VisualID *visual, int n_visual, ExtendedVisualInfo ** evi_return, int * n_info_return);

DESCRIPTION

The X11 Extended Visual Information extension (EVI) allows a client to determine information about core X visuals beyond what the core protocol provides.

The EVI application programming library contains the interfaces described below. With the exception of XeviQueryExtension, if any of these routines are called with a display that does not support the extension, the ExtensionErrorHandler (which can be set with XSetExtensionErrorHandler and functions the same way as XSetErrorHandler) will be called and the function will then return.

XeviQueryExtension returns True if the Extended Visual Information extension is available on the given display. A client must call XeviQueryExtension before calling any other EVI function in order to negotiate a compatible protocol version; otherwise the client will get undefined behavior (EVI may or may not work).

XeviQueryVersion returns True if the request succeeded; the values of the major and minor protocol version supported by the server are returned in major_version_return and minor_version_return.

XeviGetVisualInfo returns a list of ExtendedVisualInfo structures that describe visual information beyond that supported by the core protocol. This includes layer information relevant for systems supporting overlays and/or underlay planes, and information that allows applications better to determine the level of hardware support for multiple colormaps. XeviGetVisualInfo returns Success if successful, or an X error otherwise. If the argument visual is NULL, then information for all visuals of all screens is returned. Otherwise, it’s a pointer to a list of visuals for which extended visual information is desired. n_visual is the number of elements in the array visual. evi_return returns a pointer to a list of ExtendedVisualInfo. When done, the client should free the list using XFree. n_info_return returns the number of elements in the array evi_return.

The ExtendedVisualInfo structure has the following fields:

VisualID	core_visual_id
int 	screen
int 	level
unsigned int	transparency_type
unsigned int	transparency_value
unsigned int	min_hw_colormaps
unsigned int	max_hw_colormaps
unsigned int	num_colormap_conflicts
VisualID *  	colormap_conflicts

The combination of core_visual_id and screen number uniquely specify the visual being described.

level returns the level number for the visual, 0 for normal planes, > 0 for overlays, < 0 for underlays.

transparency_type returns the type of transparency supported by the visual. XEVI_TRANSPARENCY_NONE if there are no transparent pixels, XEVI_TRANSPARENCY_PIXEL if the visual supports a transparent pixel, XEVI_TRANSPARENCY_MASK if the visual supports transparent plane(s).

transparency_value returns the pixel/plane value to set for transparency if transparency_type isn’t XEVI_TRANSPARENCY_NONE.

min_hw_colormaps and max_hw_colormaps return the minimum and maximum number of hardware colormaps backing up the visual.

num_colormap_conflicts returns the number of elements in colormap_conflicts. This array returns a list of visuals that may cause conflicts in the use of the hardware colormap. For example, if a 12-bit hardware colormap is overloaded to support 8-bit colormaps, the corresponding 8-bit visuals would conflict with the 12-bit visuals.

ERRORS

XeviGetVisualInfo will return BadValue if passed an illegal visual ID, BadAccess if the X server does not respond, BadAlloc if there is a memory allocation failure.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2241 - Linux cli command setPalettepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setPalettepm and provides detailed information about the command setPalettepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setPalettepm.

NAME 🖥️ setPalettepm 🖥️

Modify the Tk color palette

SYNOPSIS

$widget->setPalette(background)

$widget->**setPalette(**name=>value?,name=>value …?)

$widget->bisque

DESCRIPTION

The setPalette method changes the color scheme for Tk. It does this by modifying the colors of existing widgets and by changing the option database so that future widgets will use the new color scheme. If setPalette is invoked with a single argument, the argument is the name of a color to use as the normal background color; setPalette will compute a complete color palette from this background color. Alternatively, the arguments to setPalette may consist of any number of name-value pairs, where the first argument of the pair is the name of an option in the Tk option database and the second argument is the new value to use for that option. The following database names are currently supported:

activeBackground foreground selectColor activeForeground highlightBackground selectBackground background highlightColor selectForeground disabledForeground insertBackground troughColor

setPalette tries to compute reasonable defaults for any options that you don’t specify. You can specify options other than the above ones and Tk will change those options on widgets as well. This feature may be useful if you are using custom widgets with additional color options.

Once it has computed the new value to use for each of the color options, setPalette scans the widget hierarchy to modify the options of all existing widgets. For each widget, it checks to see if any of the above options is defined for the widget. If so, and if the option’s current value is the default, then the value is changed; if the option has a value other than the default, setPalette will not change it. The default for an option is the one provided by the widget (($w->configure(‘option’))[3]) unless setPalette has been run previously, in which case it is the value specified in the previous invocation of setPalette.

After modifying all the widgets in the application, setPalette adds options to the option database to change the defaults for widgets created in the future. The new options are added at priority widgetDefault, so they will be overridden by options from the .Xdefaults file or options specified on the command-line that creates a widget.

The method bisque is provided for backward compatibility: it restores the application’s colors to the light brown (``bisque’’) color scheme used in Tk 3.6 and earlier versions.

BUGS

The use of option database names rather than the configure names is understandable given the mechanism (copied from Tcl/Tk), but is potentially confusing.

The interpolation of different ‘shades’ of color used for 3D effects in ‘RGB’ space can lead to undesirable changes in ‘hue’. Interpolation in ‘HSV’ (as used in Tk::ColorEditor) would be more robust and X11R5’s color support probably even more so.

SEE ALSO

Tk::options

KEYWORDS

bisque, color, palette

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2242 - Linux cli command zip_unchange_archive

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_unchange_archive and provides detailed information about the command zip_unchange_archive, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_unchange_archive.

libzip (-lzip)

Revert all global changes to the archive

This reverts changes to the archive comment and global flags.

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error code in

is set to indicate the error.

was added in libzip 0.7.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2243 - Linux cli command Image_ExifTool_Lytropm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Lytropm and provides detailed information about the command Image_ExifTool_Lytropm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Lytropm.

NAME 🖥️ Image_ExifTool_Lytropm 🖥️

Read Lytro LFP files

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to read metadata from Lytro Light Field Picture (LFP) files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://optics.miloush.net/lytro/TheFileFormat.aspx>

SEE ALSO

“Lytro Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2244 - Linux cli command Net_DNS_RR_ISDNpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_ISDNpm and provides detailed information about the command Net_DNS_RR_ISDNpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_ISDNpm.

NAME 🖥️ Net_DNS_RR_ISDNpm 🖥️

DNS ISDN resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name ISDN ISDNaddress sa);

DESCRIPTION

Class for DNS ISDN resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

ISDNaddress

address

$address = $rr->address; $rr->address( $address );

The ISDN-address is a string of characters, normally decimal digits, beginning with the E.163 country code and ending with the DDI if any.

sa

$sa = $rr->sa; $rr->sa( $sa );

The optional subaddress (SA) is a string of hexadecimal digits.

COPYRIGHT

Copyright (c)1997 Michael Fuhr.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC1183(3.2) <https://iana.org/go/rfc1183#section-3.2>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2245 - Linux cli command HTTP_Datepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTTP_Datepm and provides detailed information about the command HTTP_Datepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTTP_Datepm.

NAME 🖥️ HTTP_Datepm 🖥️

HTTP::Date - date conversion routines

VERSION

version 6.06

SYNOPSIS

use HTTP::Date; $string = time2str($time); # Format as GMT ASCII time $time = str2time($string); # convert ASCII date to machine time

DESCRIPTION

This module provides functions that deal the date formats used by the HTTP protocol (and then some more). Only the first two functions, time2str() and str2time(), are exported by default.

time2str( [$time] )
The time2str() function converts a machine time (seconds since epoch) to a string. If the function is called without an argument or with an undefined argument, it will use the current time. The string returned is in the format preferred for the HTTP protocol. This is a fixed length subset of the format defined by RFC 1123, represented in Universal Time (GMT). An example of a time stamp in this format is: Sun, 06 Nov 1994 08:49:37 GMT

str2time( $str [, $zone] )
The str2time() function converts a string to machine time. It returns undef if the format of $str is unrecognized, otherwise whatever the Time::Local functions can make out of the parsed time. Dates before the system’s epoch may not work on all operating systems. The time formats recognized are the same as for parse_date(). The function also takes an optional second argument that specifies the default time zone to use when converting the date. This parameter is ignored if the zone is found in the date string itself. If this parameter is missing, and the date string format does not contain any zone specification, then the local time zone is assumed. If the zone is not “GMT or numerical (like -0800 or +0100”), then the Time::Zone module must be installed in order to get the date recognized.

parse_date( $str )
This function will try to parse a date string, and then return it as a list of numerical values followed by a (possible undefined) time zone specifier; ($year, $month, $day, $hour, $min, $sec, $tz). The $year will be the full 4-digit year, and $month numbers start with 1 (for January). In scalar context the numbers are interpolated in a string of the YYYY-MM-DD hh:mm:ss TZ-format and returned. If the date is unrecognized, then the empty list is returned (undef in scalar context). The function is able to parse the following formats: “Wed, 09 Feb 1994 22:23:32 GMT” – HTTP format “Thu Feb 3 17:03:55 GMT 1994” – ctime(3) format “Thu Feb 3 00:00:00 1994”, – ANSI C asctime() format “Tuesday, 08-Feb-94 14:15:29 GMT” – old rfc850 HTTP format “Tuesday, 08-Feb-1994 14:15:29 GMT” – broken rfc850 HTTP format “03/Feb/1994:17:03:55 -0700” – common logfile format “09 Feb 1994 22:23:32 GMT” – HTTP format (no weekday) “08-Feb-94 14:15:29 GMT” – rfc850 format (no weekday) “08-Feb-1994 14:15:29 GMT” – broken rfc850 format (no weekday) “1994-02-03 14:15:29 -0100” – ISO 8601 format “1994-02-03 14:15:29” – zone is optional “1994-02-03” – only date “1994-02-03T14:15:29” – Use T as separator “19940203T141529Z” – ISO 8601 compact format “19940203” – only date “08-Feb-94” – old rfc850 HTTP format (no weekday, no time) “08-Feb-1994” – broken rfc850 HTTP format (no weekday, no time) “09 Feb 1994” – proposed new HTTP format (no weekday, no time) “03/Feb/1994” – common logfile format (no time, no offset) “Feb 3 1994” – Unix ls -l format “Feb 3 17:03” – Unix ls -l format “11-15-96 03:52PM” – Windows dir format “11-15-1996 03:52PM” – Windows dir format with four-digit year The parser ignores leading and trailing whitespace. It also allow the seconds to be missing and the month to be numerical in most formats. If the year is missing, then we assume that the date is the first matching date before current month. If the year is given with only 2 digits, then parse_date() will select the century that makes the year closest to the current date.

time2iso( [$time] )
Same as time2str(), but returns a YYYY-MM-DD hh:mm:ss-formatted string representing time in the local time zone.

time2isoz( [$time] )
Same as time2str(), but returns a YYYY-MM-DD hh:mm:ssZ-formatted string representing Universal Time.

SEE ALSO

time in perlfunc, Time::Zone

AUTHOR

Gisle Aas <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 1995 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2246 - Linux cli command Image_ExifTool_JPEGDigestpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_JPEGDigestpm and provides detailed information about the command Image_ExifTool_JPEGDigestpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_JPEGDigestpm.

NAME 🖥️ Image_ExifTool_JPEGDigestpm 🖥️

Calculate JPEGDigest and JPEGQualityEstimate

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains a lookup for values of the JPEG DQT digest, allowing some image identification from JPEG data alone. It also calculates an estimated JPEG quality if requested.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<https://github.com/ImageMagick/ImageMagick/blob/master/coders/jpeg.c>

ACKNOWLEDGEMENTS

Thanks to Jens Duttke for most of the work that went into this module, and to Franz Buchinger for the values he added.

SEE ALSO

“JPEG Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2247 - Linux cli command itimerspectype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command itimerspectype and provides detailed information about the command itimerspectype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the itimerspectype.

NAME 🖥️ itimerspectype 🖥️

interval for a timer with nanosecond precision

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <time.h>
struct itimerspec {
 struct timespec it_interval; /* Interval for periodic timer */
 struct timespec it_value; /* Initial expiration */
};

DESCRIPTION

Describes the initial expiration of a timer, and its interval, in seconds and nanoseconds.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

SEE ALSO

timerfd_create(2), timer_settime(2), timespec(3type)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2248 - Linux cli command scalblnl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command scalblnl and provides detailed information about the command scalblnl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the scalblnl.

NAME 🖥️ scalblnl 🖥️

multiply floating-point number by integral power of radix

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double scalbln(double x, long exp);
float scalblnf(float x, long exp);
long double scalblnl(long double x, long exp);
double scalbn(double x, int exp);
float scalbnf(float x, int exp);
long double scalbnl(long double x, int exp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

scalbln(), scalblnf(), scalblnl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE

scalbn(), scalbnf(), scalbnl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions multiply their first argument x by FLT_RADIX (probably 2) to the power of exp, that is:

    x * FLT_RADIX ** exp

The definition of FLT_RADIX can be obtained by including <float.h>.

RETURN VALUE

On success, these functions return x * FLT_RADIX ** exp.

If x is a NaN, a NaN is returned.

If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.

If x is +0 (-0), +0 (-0) is returned.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with a sign the same as x.

If the result underflows, a range error occurs, and the functions return zero, with a sign the same as x.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error, overflow
An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error, underflow
errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

scalbn(), scalbnf(), scalbnl(), scalbln(), scalblnf(), scalblnl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

HISTORY

These functions differ from the obsolete functions described in scalb(3) in the type of their second argument. The functions described on this page have a second argument of an integral type, while those in scalb(3) have a second argument of type double.

NOTES

If FLT_RADIX equals 2 (which is usual), then scalbn() is equivalent to ldexp(3).

BUGS

Before glibc 2.20, these functions did not set errno for range errors.

SEE ALSO

ldexp(3), scalb(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2249 - Linux cli command strchrnul

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strchrnul and provides detailed information about the command strchrnul, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strchrnul.

NAME 🖥️ strchrnul 🖥️

locate character in string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strchr(const char *s, int c);
char *strrchr(const char *s, int c);
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <string.h>
char *strchrnul(const char *s, int c);

DESCRIPTION

The strchr() function returns a pointer to the first occurrence of the character c in the string s.

The strrchr() function returns a pointer to the last occurrence of the character c in the string s.

The strchrnul() function is like strchr() except that if c is not found in s, then it returns a pointer to the null byte at the end of s, rather than NULL.

Here “character” means “byte”; these functions do not work with wide or multibyte characters.

RETURN VALUE

The strchr() and strrchr() functions return a pointer to the matched character or NULL if the character is not found. The terminating null byte is considered part of the string, so that if c is specified as ‘�’, these functions return a pointer to the terminator.

The strchrnul() function returns a pointer to the matched character, or a pointer to the null byte at the end of s (i.e., s+strlen(s)) if the character is not found.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strchr(), strrchr(), strchrnul()

Thread safetyMT-Safe

STANDARDS

strchr()
strrchr()
C11, POSIX.1-2008.

strchrnul()
GNU.

HISTORY

strchr()
strrchr()
POSIX.1-2001, C89, SVr4, 4.3BSD.

strchrnul()
glibc 2.1.1, FreeBSD 10, NetBSD 8.

SEE ALSO

memchr(3), string(3), strlen(3), strpbrk(3), strsep(3), strspn(3), strstr(3), strtok(3), wcschr(3), wcsrchr(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2250 - Linux cli command getutent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getutent and provides detailed information about the command getutent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getutent.

NAME 🖥️ getutent 🖥️

access utmp file entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <utmp.h>
struct utmp *getutent(void);
struct utmp *getutid(const struct utmp *ut);
struct utmp *getutline(const struct utmp *ut);
struct utmp *pututline(const struct utmp *ut);
void setutent(void);
void endutent(void);
int utmpname(const char *file);

DESCRIPTION

New applications should use the POSIX.1-specified “utmpx” versions of these functions; see STANDARDS.

utmpname() sets the name of the utmp-format file for the other utmp functions to access. If utmpname() is not used to set the filename before the other functions are used, they assume _PATH_UTMP, as defined in <paths.h>.

setutent() rewinds the file pointer to the beginning of the utmp file. It is generally a good idea to call it before any of the other functions.

endutent() closes the utmp file. It should be called when the user code is done accessing the file with the other functions.

getutent() reads a line from the current file position in the utmp file. It returns a pointer to a structure containing the fields of the line. The definition of this structure is shown in utmp(5).

getutid() searches forward from the current file position in the utmp file based upon ut. If ut->ut_type is one of RUN_LVL, BOOT_TIME, NEW_TIME, or OLD_TIME, getutid() will find the first entry whose ut_type field matches ut->ut_type. If ut->ut_type is one of INIT_PROCESS, LOGIN_PROCESS, USER_PROCESS, or DEAD_PROCESS, getutid() will find the first entry whose ut_id field matches ut->ut_id.

getutline() searches forward from the current file position in the utmp file. It scans entries whose ut_type is USER_PROCESS or LOGIN_PROCESS and returns the first one whose ut_line field matches ut->ut_line.

pututline() writes the utmp structure ut into the utmp file. It uses getutid() to search for the proper place in the file to insert the new entry. If it cannot find an appropriate slot for ut, pututline() will append the new entry to the end of the file.

RETURN VALUE

getutent(), getutid(), and getutline() return a pointer to a struct utmp on success, and NULL on failure (which includes the “record not found” case). This struct utmp is allocated in static storage, and may be overwritten by subsequent calls.

On success pututline() returns ut; on failure, it returns NULL.

utmpname() returns 0 if the new name was successfully stored, or -1 on failure.

On failure, these functions errno set to indicate the error.

ERRORS

ENOMEM
Out of memory.

ESRCH
Record not found.

setutent(), pututline(), and the getut*() functions can also fail for the reasons described in open(2).

FILES

/var/run/utmp
database of currently logged-in users

/var/log/wtmp
database of past user logins

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getutent()

Thread safety

MT-Unsafe init race:utent race:utentbuf sig:ALRM timer

getutid(), getutline()

Thread safety

MT-Unsafe init race:utent sig:ALRM timer

pututline()

Thread safety

MT-Unsafe race:utent sig:ALRM timer

setutent(), endutent(), utmpname()

Thread safetyMT-Unsafe race:utent

In the above table, utent in race:utent signifies that if any of the functions setutent(), getutent(), getutid(), getutline(), pututline(), utmpname(), or endutent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

None.

HISTORY

XPG2, SVr4.

In XPG2 and SVID 2 the function pututline() is documented to return void, and that is what it does on many systems (AIX, HP-UX). HP-UX introduces a new function _pututline() with the prototype given above for pututline().

All these functions are obsolete now on non-Linux systems. POSIX.1-2001 and POSIX.1-2008, following SUSv1, does not have any of these functions, but instead uses

#include <utmpx.h> struct utmpx *getutxent(void); struct utmpx *getutxid(const struct utmpx *); struct utmpx *getutxline(const struct utmpx *); struct utmpx *pututxline(const struct utmpx *); void setutxent(void); void endutxent(void);

These functions are provided by glibc, and perform the same task as their equivalents without the “x”, but use struct utmpx, defined on Linux to be the same as struct utmp. For completeness, glibc also provides utmpxname(), although this function is not specified by POSIX.1.

On some other systems, the utmpx structure is a superset of the utmp structure, with additional fields, and larger versions of the existing fields, and parallel files are maintained, often /var/*/utmpx and /var/*/wtmpx.

Linux glibc on the other hand does not use a parallel utmpx file since its utmp structure is already large enough. The “x” functions listed above are just aliases for their counterparts without the “x” (e.g., getutxent() is an alias for getutent()).

NOTES

glibc notes

The above functions are not thread-safe. glibc adds reentrant versions

#include <utmp.h>
int getutent_r(struct utmp *ubuf, struct utmp **ubufp);
int getutid_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);
int getutline_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getutent_r(), getutid_r(), getutline_r():

    _GNU_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */    _SVID_SOURCE || _BSD_SOURCE

These functions are GNU extensions, analogs of the functions of the same name without the _r suffix. The ubuf argument gives these functions a place to store their result. On success, they return 0, and a pointer to the result is written in *ubufp. On error, these functions return -1. There are no utmpx equivalents of the above functions. (POSIX.1 does not specify such functions.)

EXAMPLES

The following example adds and removes a utmp record, assuming it is run from within a pseudo terminal. For usage in a real application, you should check the return values of getpwuid(3) and ttyname(3).

#include <pwd.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <utmp.h>
int
main(void)
{
    struct utmp entry;
    system("echo before adding entry:;who");
    entry.ut_type = USER_PROCESS;
    entry.ut_pid = getpid();
    strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen("/dev/"));
    /* only correct for ptys named /dev/tty[pqr][0-9a-z] */
    strcpy(entry.ut_id, ttyname(STDIN_FILENO) + strlen("/dev/tty"));
    entry.ut_time = time(NULL);
    strcpy(entry.ut_user, getpwuid(getuid())->pw_name);
    memset(entry.ut_host, 0, UT_HOSTSIZE);
    entry.ut_addr = 0;
    setutent();
    pututline(&entry);
    system("echo after adding entry:;who");
    entry.ut_type = DEAD_PROCESS;
    memset(entry.ut_line, 0, UT_LINESIZE);
    entry.ut_time = 0;
    memset(entry.ut_user, 0, UT_NAMESIZE);
    setutent();
    pututline(&entry);
    system("echo after removing entry:;who");
    endutent();
    exit(EXIT_SUCCESS);
}

SEE ALSO

getutmp(3), utmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2251 - Linux cli command HTML_Tree_AboutTreespm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_Tree_AboutTreespm and provides detailed information about the command HTML_Tree_AboutTreespm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_Tree_AboutTreespm.

NAME 🖥️ HTML_Tree_AboutTreespm 🖥️

  • article on tree-shaped data structures in Perl

SYNOPSIS

# This an article, not a module.

DESCRIPTION

The following article by Sean M. Burke first appeared in The Perl Journal #18 and is copyright 2000 The Perl Journal. It appears courtesy of Jon Orwant and The Perl Journal. This document may be distributed under the same terms as Perl itself.

Trees

– Sean M. Burke

AaaAAAaauugh! Watch out for that tree! Ω- George of the Jungle theme

Perl’s facility with references, combined with its automatic management of memory allocation, makes it straightforward to write programs that store data in structures of arbitrary form and complexity.

But I’ve noticed that many programmers, especially those who started out with more restrictive languages, seem at home with complex but uniform data structures Ω- N-dimensional arrays, or more struct-like things like hashes-of-arrays(-of-hashes(-of-hashes), etc.) Ω- but they’re often uneasy with building more freeform, less tabular structures, like tree-shaped data structures.

But trees are easy to build and manage in Perl, as I’ll demonstrate by showing off how the HTML::Element class manages elements in an HTML document tree, and by walking you through a from-scratch implementation of game trees. But first we need to nail down what we mean by a tree.

Socratic Dialogues: “What is a Tree?”

My first brush with tree-shaped structures was in linguistics classes, where tree diagrams are used to describe the syntax underlying natural language sentences. After learning my way around those trees, I started to wonder Ω- are what I’m used to calling trees the same as what programmers call trees? So I asked lots of helpful and patient programmers how they would define a tree. Many replied with a answer in jargon that they could not really explain (understandable, since explaining things, especially defining things, is harder than people think):

– So what is a tree, a tree-shaped data structure? – A tree is a special case of an acyclic directed graph! – What’s a graph? – Um… lines… and… you draw it… with… arcs! nodes! um…

The most helpful were folks who couldn’t explain directly, but with whom I could get into a rather Socratic dialog (where I asked the half-dim half-earnest questions), often with much doodling of illustrations…

Question: so what’s a tree?

Answer: A tree is a collection of nodes that are linked together in a, well, tree-like way! Like this [drawing on a napkin]:

A / \ B C / | \ D E F

Q: So what do these letters represent?

A: Each is a different node, a bunch of data. Maybe C is a bunch of data that stores a number, maybe a hash table, maybe nothing at all besides the fact that it links to D, E, and F (which are other nodes).

Q: So what’re the lines between the nodes?

A: Links. Also called arcs. They just symbolize the fact that each node holds a list of nodes it links to.

Q: So what if I draw nodes and links, like this…

B – E / \ / \ A C \ / E

Is that still a tree?

A: No, not at all. There’s a lot of un-treelike things about that. First off, E has a link coming off of it going into nowhere. You can’t have a link to nothing Ω- you can only link to another node. Second off, I don’t know what that sideways link between B and E means…

Q: Okay, let’s work our way up from something simpler. Is this a tree…?

A

A: Yes, I suppose. It’s a tree of just one node.

Q: And how about…

A B

A: No, you can’t just have nodes floating there, unattached.

Q: Okay, I’ll link A and B. How’s this?

A | B

A: Yup, that’s a tree. There’s a node A, and a node B, and they’re linked.

Q: How is that tree any different from this one…?

B | A

A: Well, in both cases A and B are linked. But it’s in a different direction.

Q: Direction? What does the direction mean?

A: Well, it depends what the tree represents. If it represents a categorization, like this:

citrus / | \ orange lemon kumquat …

then you mean to say that oranges, lemons, kumquats, etc., are a kind of citrus. But if you drew it upside down, you’d be saying, falsely, that citrus is a kind of kumquat, a kind of lemon, and a kind of orange. If the tree represented cause-and-effect (or at least what situations could follow others), or represented what’s a part of what, you wouldn’t want to get those backwards, either. So with the nodes you draw together on paper, one has to be over the other, so you can tell which way the relationship in the tree works.

Q: So are these two trees the same?

A A / \ / \ B C B \ C

A: Yes, although by convention we often try to line up things in the same generation, like it is in the diagram on the left.

Q: generation? This is a family tree?

A: No, not unless it’s a family tree for just yeast cells or something else that reproduces asexually. But for sake of having lots of terms to use, we just pretend that links in the tree represent the is a child of relationship, instead of is a kind of or is a part of, or could result from, or whatever the real relationship is. So we get to borrow a lot of kinship words for describing trees Ω- B and C are children (or daughters) of A; A is the parent (or mother) of B and C. Node C is a sibling (or sister) of node C; and so on, with terms like descendants (a node’s children, children’s children, etc.), and generation (all the nodes at the same level in the tree, i.e., are either all grandchildren of the top node, or all great-grand-children, etc.), and lineage or ancestors (parents, and parent’s parents, etc., all the way to the topmost node).

So then we get to express rules in terms like “A node cannot have more than one parent”, which means that this is not a valid tree:

A / \ B C \ / E

And: “A node can’t be its own parent”, which excludes this looped-up connection:

/\ A | \

Or, put more generally: “A node can’t be its own ancestor”, which excludes the above loop, as well as the one here:

/\ Z | / | A | / \ | B C | \

That tree is excluded because A is a child of Z, and Z is a child of C, and C is a child of A, which means A is its own great-grandparent. So this whole network can’t be a tree, because it breaks the sort of meta-rule: once any node in the supposed tree breaks the rules for trees, you don’t have a tree anymore.

Q: Okay, now, are these two trees the same?

A A / | \ / | \ B C D D C B

A: It depends whether you’re basing your concept of trees on each node having a set (unordered list) of children, or an (ordered) list of children. It’s a question of whether ordering is important for what you’re doing. With my diagram of citrus types, ordering isn’t important, so these tree diagrams express the same thing:

citrus / | \ orange lemon kumquat citrus / | \ kumquat orange lemon

because it doesn’t make sense to say that oranges are before or after kumquats in the whole botanical scheme of things. (Unless, of course, you are using ordering to mean something, like a degree of genetic similarity.)

But consider a tree that’s a diagram of what steps are comprised in an activity, to some degree of specificity:

make tea / | \ pour infuse serve hot water / \ in cup/pot / \ add let tea sit leaves

This means that making tea consists of putting hot water in a cup or put, infusing it (which itself consists of adding tea leaves and letting it sit), then serving it Ω- in that order. If you serve an empty dry pot (sipping from empty cups, etc.), let it sit, add tea leaves, and pour in hot water, then what you’re doing is performance art, not tea preparation:

performance art / | \ serve infuse pour / \ hot water / \ in cup/pot let add sit tea leaves

Except for my having renamed the root, this tree is the same as the making-tea tree as far as what’s under what, but it differs in order, and what the tree means makes the order important.

Q: Wait Ω- root? What’s a root?

A: Besides kinship terms like mother and daughter, the jargon for tree parts also has terms from real-life tree parts: the part that everything else grows from is called the root; and nodes that don’t have nodes attached to them (i.e., childless nodes) are called leaves.

Q: But you’ve been drawing all your trees with the root at the top and leaves at the bottom.

A: Yes, but for some reason, that’s the way everyone seems to think of trees. They can draw trees as above; or they can draw them sort of sideways with indenting representing what nodes are children of what:

* make tea * pour hot water in cup/pot * infuse * add tea leaves * let sit * serve

…but folks almost never seem to draw trees with the root at the bottom. So imagine it’s based on spider plant in a hanging pot. Unfortunately, spider plants aren’t botanically trees, they’re plants; but spider plant diagram is rather a mouthful, so let’s just call them trees.

Trees Defined Formally

In time, I digested all these assorted facts about programmers’ ideas of trees (which turned out to be just a more general case of linguistic ideas of trees) into a single rule:

* A node is an item that contains (is over, is parent of, etc.) zero or more other nodes.

From this you can build up formal definitions for useful terms, like so:

* A node’s descendants are defined as all its children, and all their children, and so on. Or, stated recursively: a node’s descendants are all its children, and all its children’s descendants. (And if it has no children, it has no descendants.)

* A node’s ancestors consist of its parent, and its parent’s parent, etc, up to the root. Or, recursively: a node’s ancestors consist of its parent and its parent’s ancestors. (If it has no parent, it has no ancestors.)

* A tree is a root node and all the root’s descendants.

And you can add a proviso or two to clarify exactly what I impute to the word other in other nodes:

* A node cannot contain itself, or contain any node that contains it, etc. Looking at it the other way: a node cannot be its own parent or ancestor.

* A node can be root (i.e., no other node contains it) or can be contained by only one parent; no node can be the child of two or more parents.

Add to this the idea that children are sometimes ordered, and sometimes not, and that’s about all you need to know about defining what a tree is. From there it’s a matter of using them.

Markup Language Trees: HTML-Tree

While not all markup languages are inherently tree-like, the best-known family of markup languages, HTML, SGML, and XML, are about as tree-like as you can get. In these languages, a document consists of elements and character data in a tree structure where there is one root element, and elements can contain either other elements, or character data.

Footnote: For sake of simplicity, I’m glossing over comments (<!– … –>), processing instructions (<?xml version=‘1.0’>), and declarations (<!ELEMENT …>, <!DOCTYPE …>). And I’m not bothering to distinguish entity references (<, @) or CDATA sections (<![CDATA[ …]]>) from normal text.

For example, consider this HTML document:

<html lang=“en-US”> <head> <title> Blank Document! </title> </head> <body bgcolor="#d010ff"> Ive got <em> something to saaaaay </em> ! </body> </html>

I’ve indented this to point out what nodes (elements or text items) are children of what, with each node on a line of its own.

The HTML::TreeBuilder module (in the CPAN distribution HTML-Tree) does the work of taking HTML source and building in memory the tree that the document source represents.

Footnote: it requires the HTML::Parser module, which tokenizes the source Ω- i.e., identifies each tag, bit of text, comment, etc.

The trees structures that it builds represent bits of text with normal Perl scalar string values; but elements are represented with objects Ω- that is, chunks of data that belong to a class (in this case, HTML::Element), a class that provides methods (routines) for accessing the pieces of data in each element, and otherwise doing things with elements. (See my article in TPJ#17 for a quick explanation of objects, the POD document perltoot for a longer explanation, or Damian Conway’s excellent book Object-Oriented Perl for the full story.)

Each HTML::Element object contains a number of pieces of data:

* its element name (html, h1, etc., accessed as $element->tag)

* a list of elements (or text segments) that it contains, if any (accessed as $element->content_list or $element->content, depending on whether you want a list, or an arrayref)

* what element, if any, contains it (accessed as $element->parent)

* and any SGML attributes that the element has, such as lang="en-US", align="center", etc. (accessed as $element->attr(’lang’), $element->attr(‘center’), etc.)

So, for example, when HTML::TreeBuilder builds the tree for the above HTML document source, the object for the body element has these pieces of data:

* element name: “body” * nodes it contains: the string “Ive got " the object for the “em” element the string “!” * its parent: the object for the “html” element * bgcolor: “#d010ff”

Now, once you have this tree of objects, almost anything you’d want to do with it starts with searching the tree for some bit of information in some element.

Accessing a piece of information in, say, a hash of hashes of hashes, is straightforward:

$password{sean}{sburke1}{hpux}

because you know that all data points in that structure are accessible with that syntax, but with just different keys. Now, the em element in the above HTML tree does happen to be accessible as the root’s child #1’s child #1:

$root->content->[1]->content->[1]

But with trees, you typically don’t know the exact location (via indexes) of the data you’re looking for. Instead, finding what you want will typically involve searching through the tree, seeing if every node is the kind you want. Searching the whole tree is simple enough Ω- look at a given node, and if it’s not what you want, look at its children, and so on. HTML-Tree provides several methods that do this for you, such as find_by_tag_name, which returns the elements (or the first element, if called in scalar context) under a given node (typically the root) whose tag name is whatever you specify.

For example, that em node can be found as:

my $that_em = $root->find_by_tag_name(em);

or as:

@ems = $root->find_by_tag_name(em); # will only have one element for this particular tree

Now, given an HTML document of whatever structure and complexity, if you wanted to do something like change every

<em>stuff</em>

to

<em class=funky> <b>[-</b> stuff <b>-]</b> </em>

the first step is to frame this operation in terms of what you’re doing to the tree. You’re changing this:

em | …

to this:

em / | \ b … b | | “[-” “-]”

In other words, you’re finding all elements whose tag name is em, setting its class attribute to funky, and adding one child to the start of its content list Ω- a new b element whose content is the text string [- Ω- and one to the end of its content list Ω- a new b element whose content is the text string -].

Once you’ve got it in these terms, it’s just a matter of running to the HTML::Element documentation, and coding this up with calls to the appropriate methods, like so:

use HTML::Element 1.53; use HTML::TreeBuilder 2.96; # Build the tree by parsing the document my $root = HTML::TreeBuilder->new; $root->parse_file(whatever.html); # source file # Now make new nodes where needed foreach my $em ($root->find_by_tag_name(em)) { $em->attr(class, funky); # Set that attribute # Make the two new B nodes my $new1 = HTML::Element->new(b); my $new2 = HTML::Element->new(b); # Give them content (they have none at first) $new1->push_content([-); $new2->push_content(-]); # And put em in place! $em->unshift_content($new1); $em->push_content($new2); } print “<!– Looky see what I did! –> “, $root->as_HTML(), " “;

The class HTML::Element provides just about every method I can image you needing, for manipulating trees made of HTML::Element objects. (And what it doesn’t directly provide, it will give you the components to build it with.)

Building Your Own Trees

Theoretically, any tree is pretty much like any other tree, so you could use HTML::Element for anything you’d ever want to do with tree-arranged objects. However, as its name implies, HTML::Element is basically for HTML elements; it has lots of features that make sense only for HTML elements (like the idea that every element must have a tag-name). And it lacks some features that might be useful for general applications Ω- such as any sort of checking to make sure that you’re not trying to arrange objects in a non-treelike way. For a general-purpose tree class that does have such features, you can use Tree::DAG_Node, also available from CPAN.

However, if your task is simple enough, you might find it overkill to bother using Tree::DAG_Node. And, in any case, I find that the best way to learn how something works is to implement it (or something like it, but simpler) yourself. So I’ll here discuss how you’d implement a tree structure, without using any of the existing classes for tree nodes.

Implementation: Game Trees for Alak

Suppose that the task at hand is to write a program that can play against a human opponent at a strategic board game (as opposed to a board game where there’s an element of chance). For most such games, a game tree is an essential part of the program (as I will argue, below), and this will be our test case for implementing a tree structure from scratch.

For sake of simplicity, our game is not chess or backgammon, but instead a much simpler game called Alak. Alak was invented by the mathematician A. K. Dewdney, and described in his 1984 book Planiverse. The rules of Alak are simple:

Footnote: Actually, I’m describing only my interpretation of the rules Dewdney describes in Planiverse. Many other interpretations are possible.

* Alak is a two-player game played on a one-dimensional board with eleven slots on it. Each slot can hold at most one piece at a time. There’s two kinds of pieces, which I represent here as x and o Ω- x’s belong to one player (called X), o’s to the other (called O).

* The initial configuration of the board is:

xxxx_ _ _oooo

For sake of the article, the slots are numbered from 1 (on the left) to 11 (on the right), and X always has the first move.

* The players take turns moving. At each turn, each player can move only one piece, once. (This unlike checkers, where you move one piece per move but get to keep moving it if you jump an your opponent’s piece.) A player cannot pass up on his turn. A player can move any one of his pieces to the next unoccupied slot to its right or left, which may involve jumping over occupied slots. A player cannot move a piece off the side of the board.

* If a move creates a pattern where the opponent’s pieces are surrounded, on both sides, by two pieces of the mover’s color (with no intervening unoccupied blank slot), then those surrounded pieces are removed from the board.

* The goal of the game is to remove all of your opponent’s pieces, at which point the game ends. Removing all-but-one ends the game as well, since the opponent can’t surround you with one piece, and so will always lose within a few moves anyway.

Consider, then, this rather short game where X starts:

xxxx_ _ _oooo ^ Move 1: X moves from 3 (shown with caret) to 5 (Note that any of Xs pieces could move, but that the only place they could move to is 5.) xx_xx_ _oooo ^ Move 2: O moves from 9 to 7. xx_xx_oo_oo ^ Move 3: X moves from 4 to 6. xx_ _xxoo_oo ^ Move 4: O (stupidly) moves from 10 to 9. xx_ _xxooo_o ^ Move 5: X moves from 5 to 10, making the board “xx_ _ _xoooxo”. The three os that X just surrounded are removed. xx_ _ _x_ _ _xo O has only one piece, so has lost.

Now, move 4 could have gone quite the other way:

xx_ _xxoo_oo Move 4: O moves from 8 to 4, making the board “xx_oxxo_ _oo”. The surrounded xs are removed. xx_o_ _o_ _oo ^ Move 5: X moves from 1 to 2. _xxo_ _o_ _oo ^ Move 6: O moves from 7 to 6. _xxo_o_ _ _oo ^ Move 7: X moves from 2 to 5, removing the o at 4. _ _x_xo_ _ _oo …and so on.

To teach a computer program to play Alak (as player X, say), it needs to be able to look at the configuration of the board, figure out what moves it can make, and weigh the benefit or costs, immediate or eventual, of those moves.

So consider the board from just before move 3, and figure all the possible moves X could make. X has pieces in slots 1, 2, 4, and 5. The leftmost two x’s (at 1 and 2) are up against the end of the board, so they can move only right. The other two x’s (at 4 and 5) can move either right or left:

Starting board: xx_xx_oo_oo moving 1 to 3 gives _xxxx_oo_oo moving 2 to 3 gives x_xxx_oo_oo moving 4 to 3 gives xxx_x_oo_oo moving 5 to 3 gives xxxx_ _oo_oo moving 4 to 6 gives xx_ _xxoo_oo moving 5 to 6 gives xx_x_xoo_oo

For the computer to decide which of these is the best move to make, it needs to quantify the benefit of these moves as a number Ω- call that the payoff. The payoff of a move can be figured as just the number of x pieces removed by the most recent move, minus the number of o pieces removed by the most recent move. (It so happens that the rules of the game mean that no move can delete both o’s and x’s, but the formula still applies.) Since none of these moves removed any pieces, all these moves have the same immediate payoff: 0.

Now, we could race ahead and write an Alak-playing program that could use the immediate payoff to decide which is the best move to make. And when there’s more than one best move (as here, where all the moves are equally good), it could choose randomly between the good alternatives. This strategy is simple to implement; but it makes for a very dumb program. Consider what O’s response to each of the potential moves (above) could be. Nothing immediately suggests itself for the first four possibilities (X having moved something to position 3), but either of the last two (illustrated below) are pretty perilous, because in either case O has the obvious option (which he would be foolish to pass up) of removing x’s from the board:

xx_xx_oo_oo ^ X moves 4 to 6. xx_ _xxoo_oo ^ O moves 8 to 4, giving “xx_oxxo_ _oo”. The two surrounded xs are removed. xx_o_ _o_ _oo

or

xx_xx_oo_oo ^ X moves 5 to 6. xx_x_xoo_oo ^ O moves 8 to 5, giving “xx_xoxo_ _oo”. The one surrounded x is removed. xx_xo_o_ _oo

Both contingencies are quite bad for X Ω- but this is not captured by the fact that they start out with X thinking his move will be harmless, having a payoff of zero.

So what’s needed is for X to think more than one step ahead Ω- to consider not merely what it can do in this move, and what the payoff is, but to consider what O might do in response, and the payoff of those potential moves, and so on with X’s possible responses to those cases could be. All these possibilities form a game tree Ω- a tree where each node is a board, and its children are successors of that node Ω- i.e., the boards that could result from every move possible, given the parent’s board.

But how to represent the tree, and how to represent the nodes?

Well, consider that a node holds several pieces of data:

1) the configuration of the board, which, being nice and simple and one-dimensional, can be stored as just a string, like xx_xx_oo_oo.

2) whose turn it is, X or O. (Or: who moved last, from which we can figure whose turn it is).

3) the successors (child nodes).

4) the immediate payoff of having moved to this board position from its predecessor (parent node).

5) and what move gets us from our predecessor node to here. (Granted, knowing the board configuration before and after the move, it’s easy to figure out the move; but it’s easier still to store it as one is figuring out a node’s successors.)

6) whatever else we might want to add later.

These could be stored equally well in an array or in a hash, but it’s my experience that hashes are best for cases where you have more than just two or three bits of data, or especially when you might need to add new bits of data. Moreover, hash key names are mnemonic Ω- $node->{’last_move_payoff’} is plain as day, whereas it’s not so easy having to remember with an array that $node->[3] is where you decided to keep the payoff.

Footnote: Of course, there are ways around that problem: just swear you’ll never use a real numeric index to access data in the array, and instead use constants with mnemonic names: use strict; use constant idx_PAYOFF => 3; … $n->[idx_PAYOFF] Or use a pseudohash. But I prefer to keep it simple, and use a hash. These are, incidentally, the same arguments that people weigh when trying to decide whether their object-oriented modules should be based on blessed hashes, blessed arrays, or what. Essentially the only difference here is that we’re not blessing our nodes or talking in terms of classes and methods. [end footnote]

So, we might as well represent nodes like so:

$node = { # hashref board => …board string, e.g., “xx_x_xoo_oo” last_move_payoff => …payoff of the move that got us here. last_move_from => …the start… last_move_to => …and end point of the move that got us here. E.g., 5 and 6, representing a move from 5 to 6. whose_turn => …whose move it then becomes. just an x or o. successors => …the successors };

Note that we could have a field called something like ’last_move_who’ to denote who last moved, but since turns in Alak always alternate (and no-one can pass), storing whose move it is now and who last moved is redundant Ω- if X last moved, it’s O turn now, and vice versa. I chose to have a ‘whose_turn’ field instead of a ’last_move_who’, but it doesn’t really matter. Either way, we’ll end up inferring one from the other at several points in the program.

When we want to store the successors of a node, should we use an array or a hash? On the one hand, the successors to $node aren’t essentially ordered, so there’s no reason to use an array per se; on the other hand, if we used a hash, with successor nodes as values, we don’t have anything particularly meaningful to use as keys. (And we can’t use the successors themselves as keys, since the nodes are referred to by hash references, and you can’t use a reference as a hash key.) Given no particularly compelling reason to do otherwise, I choose to just use an array to store all a node’s successors, although the order is never actually used for anything:

$node = { … successors => [ …nodes… ], … };

In any case, now that we’ve settled on what should be in a node, let’s make a little sample tree out of a few nodes and see what we can do with it:

# Board just before move 3 in above game my $n0 = { board => xx_xx_oo_oo, last_move_payoff => 0, last_move_from => 9, last_move_to => 7, whose_turn => x, successors => [], }; # And, for now, just two of the successors: # X moves 4 to 6, giving xx_ _xxoo_oo my $n1 = { board => xx_ _xxoo_oo, last_move_payoff => 0, last_move_from => 4, last_move_to => 6, whose_turn => o, successors => [], }; # or X moves 5 to 6, giving xx_x_xoo_oo my $n2 = { board => xx_x_xoo_oo, last_move_payoff => 0, last_move_from => 5, last_move_to => 6, whose_turn => o, successors => [], }; # Now connect them… push @{$n0->{successors}}, $n1, $n2;

In comparing what we store in an Alak game tree node to what HTML::Element stores in HTML element nodes, you’ll note one big difference: every HTML::Element node contains a link to its parent, whereas we don’t have our Alak nodes keeping a link to theirs.

The reason this can be an important difference is because it can affect how Perl knows when you’re not using pieces of memory anymore. Consider the tree we just built, above:

node 0 / \ node 1 node 2

There’s two ways Perl knows you’re using a piece of memory: 1) it’s memory that belongs directly to a variable (i.e., is necessary to hold that variable’s value, or values in the case of a hash or array), or 2) it’s a piece of memory that something holds a reference to. In the above code, Perl knows that the hash for node 0 (for board xx_xx_oo_oo) is in use because something (namely, the variable $n0) holds a reference to it. Now, even if you followed the above code with this:

$n1 = $n2 = whatever;

to make your variables $n1 and $n2 stop holding references to the hashes for the two successors of node 0, Perl would still know that those hashes are still in use, because node 0’s successors array holds a reference to those hashes. And Perl knows that node 0 is still in use because something still holds a reference to it. Now, if you added:

my $root = $n0;

This would change nothing Ω- there’s just be two things holding a reference to the node 0 hash, which in turn holds a reference to the node 1 and node 2 hashes. And if you then added:

$n0 = stuff;

still nothing would change, because something ($root) still holds a reference to the node 0 hash. But once nothing holds a reference to the node 0 hash, Perl will know it can destroy that hash (and reclaim the memory for later use, say), and once it does that, nothing will hold a reference to the node 1 or the node 2 hashes, and those will be destroyed too.

But consider if the node 1 and node 2 hashes each had an attribute parent (or predecessor) that held a reference to node 0. If your program stopped holding a reference to the node 0 hash, Perl could not then say that nothing holds a reference to node 0 Ω- because node 1 and node 2 still do. So, the memory for nodes 0, 1, and 2 would never get reclaimed (until your program ended, at which point Perl destroys everything). If your program grew and discarded lots of nodes in the game tree, but didn’t let Perl know it could reclaim their memory, your program could grow to use immense amounts of memory Ω- never a nice thing to have happen. There’s three ways around this:

1) When you’re finished with a node, delete the reference each of its children have to it (in this case, deleting $n1->{‘parent’}, say). When you’re finished with a whole tree, just go through the whole tree erasing links that children have to their children.

2) Reconsider whether you really need to have each node hold a reference to its parent. Just not having those links will avoid the whole problem.

3) use the WeakRef module with Perl 5.6 or later. This allows you to weaken some references (like the references that node 1 and 2 could hold to their parent) so that they don’t count when Perl goes asking whether anything holds a reference to a given piece of memory. This wonderful new module eliminates the headaches that can often crop up with either of the two previous methods.

It so happens that our Alak program is simple enough that we don’t need for our nodes to have links to their parents, so the second solution is fine. But in a more advanced program, the first or third solutions might be unavoidable.

Recursively Printing the Tree

I don’t like working blind Ω- if I have any kind of a complex data structure in memory for a program I’m working on, the first thing I do is write something that can dump that structure to the screen so I can make sure that what I think is in memory really is what’s in memory. Now, I could just use the x pretty-printer command in Perl’s interactive debugger, or I could have the program use the Data::Dumper module. But in this case, I think the output from those is rather too verbose. Once we have trees with dozens of nodes in them, we’ll really want a dump of the tree to be as concise as possible, hopefully just one line per node. What I’d like is something that can print $n0 and its successors (see above) as something like:

xx_xx_oo_oo (O moved 9 to 7, 0 payoff) xx_ _xxoo_oo (X moved 4 to 6, 0 payoff) xx_x_xoo_oo (X moved 5 to 6, 0 payoff)

A subroutine to print a line for a given node, and then do that again for each successor, would look something like:

sub dump_tree { my $n = $_[0]; # “n” is for node print …something expressing $nn content… foreach my $s (@{$n->{successors}}) { # “s for successor dump($s); } }

And we could just start that out with a call to dump_tree($n0).

Since this routine…

Footnote: I first wrote this routine starting out with sub dump {. But when I tried actually calling dump($n0), Perl would dump core! Imagine my shock when I discovered that this is absolutely to be expected Ω- Perl provides a built-in function called dump, the purpose of which is to, yes, make Perl dump core. Calling our routine dump_tree instead of dump neatly avoids that problem.

…does its work (dumping the subtree at and under the given node) by calling itself, it’s recursive. However, there’s a special term for this kind of recursion across a tree: traversal. To traverse a tree means to do something to a node, and to traverse its children. There’s two prototypical ways to do this, depending on what happens when:

traversing X in pre-order: * do something to X * then traverse Xs children traversing X in post-order: * traverse Xs children * then do something to X

Dumping the tree to the screen the way we want it happens to be a matter of pre-order traversal, since the thing we do (print a description of the node) happens before we recurse into the successors.

When we try writing the print statement for our above dump_tree, we can get something like:

sub dump_tree { my $n = $_[0]; # “xx_xx_oo_oo (O moved 9 to 7, 0 payoff)” print $n->{board}, " (”, ($n->{whose_turn} eq o ? X : O), # Infer who last moved from whose turn it is now. " moved “, $n->{last_move_from}, " to “, $n->{last_move_to}, “, “, $n->{last_move_payoff}, " payoff) “, ; foreach my $s (@{$n->{successors}}) { dump_tree($s); } }

If we run this on $n0 from above, we get this:

xx_xx_oo_oo (O moved 9 to 7, 0 payoff) xx_ _xxoo_oo (X moved 4 to 6, 0 payoff) xx_x_xoo_oo (X moved 5 to 6, 0 payoff)

Each line on its own is fine, but we forget to allow for indenting, and without that we can’t tell what’s a child of what. (Imagine if the first successor had successors of its own Ω- you wouldn’t be able to tell if it were a child, or a sibling.) To get indenting, we’ll need to have the instances of the dump_tree routine know how far down in the tree they’re being called, by passing a depth parameter between them:

sub dump_tree { my $n = $_[0]; my $depth = $_[1]; $depth = 0 unless defined $depth; print " " x $depth, …stuff… foreach my $s (@{$n->{successors}}) { dump_tree($s, $depth + 1); } }

When we call dump_tree($n0), $depth (from $_[1]) is undefined, so gets set to 0, which translates into an indenting of no spaces. But when dump_tree invokes itself on $n0’s children, those instances see $depth + 1 as their $_[1], giving appropriate indenting.

Footnote: Passing values around between different invocations of a recursive routine, as shown, is a decent way to share the data. Another way to share the data is by keeping it in a global variable, like $Depth, initially set to 0. Each time dump_tree is about to recurse, it must ++$Depth, and when it’s back, it must --$Depth. Or, if the reader is familiar with closures, consider this approach: sub dump_tree { # A wrapper around calls to a recursive closure: my $start_node = $_[0]; my $depth = 0; # to be shared across calls to $recursor. my $recursor; $recursor = sub { my $n = $_[0]; print " " x $depth, …stuff… ++$depth; foreach my $s (@{$n->{successors}}) { $recursor->($s); } –$depth; } $recursor->($start_node); # start recursing undef $recursor; } The reader with an advanced understanding of Perl’s reference-count-based garbage collection is invited to consider why it is currently necessary to undef $recursor (or otherwise change its value) after all recursion is done. The reader whose mind is perverse in other ways is invited to consider how (or when!) passing a depth parameter around is unnecessary because of information that Perl’s caller(N) function reports! [end footnote]

Growing the Tree

Our dump_tree routine works fine for the sample tree we’ve got, so now we should get the program working on making its own trees, starting from a given board.

In Games::Alak (the CPAN-released version of Alak that uses essentially the same code that we’re currently discussing the tree-related parts of), there is a routine called figure_successors that, given one childless node, will figure out all its possible successors. That is, it looks at the current board, looks at every piece belonging to the player whose turn it is, and considers the effect of moving each piece every possible way Ω- notably, it figures out the immediate payoff, and if that move would end the game, it notes that by setting an endgame entry in that node’s hash. (That way, we know that that’s a node that can’t have successors.)

In the code for Games::Alak, figure_successors does all these things, in a rather straightforward way. I won’t walk you through the details of the figure_successors code I’ve written, since the code has nothing much to do with trees, and is all just implementation of the Alak rules for what can move where, with what result. Especially interested readers can puzzle over that part of code in the source listing in the archive from CPAN, but others can just assume that it works as described above.

But consider that figure_successors, regardless of its inner workings, does not grow the tree; it only makes one set of successors for one node at a time. It has to be up to a different routine to call figure_successors, and to keep applying it as needed, in order to make a nice big tree that our game-playing program can base its decisions on.

Now, we could do this by just starting from one node, applying figure_successors to it, then applying figure_successors on all the resulting children, and so on:

sub grow { # Just a first attempt at this! my $n = $_[0]; figure_successors($n); unless @{$n->{successors}} # already has successors. or $n->{endgame} # cant have successors. } foreach my $s (@{$n->{successors}}) { grow($s); # recurse } }

If you have a game tree for tic-tac-toe, and you grow it without limitation (as above), you will soon enough have a fully solved tree, where every node that can have successors does, and all the leaves of the tree are all the possible endgames (where, in each case, the board is filled). But a game of Alak is different from tic-tac-toe, because it can, in theory, go on forever. For example, the following sequence of moves is quite possible:

xxxx_ _ _oooo xxx_x_ _oooo xxx_x_o_ooo xxxx_ _o_ooo (x moved back) xxxx_ _ _oooo (o moved back) …repeat forever…

So if you tried using our above attempt at a grow routine, Perl would happily start trying to construct an infinitely deep tree, containing an infinite number of nodes, consuming an infinite amount of memory, and requiring an infinite amount of time. As the old saying goes: You can’t have everything Ω- where would you put it? So we have to place limits on how much we’ll grow the tree.

There’s more than one way to do this:

1. We could grow the tree until we hit some limit on the number of nodes we’ll allow in the tree.

2. We could grow the tree until we hit some limit on the amount of time we’re willing to spend.

3. Or we could grow the tree until it is fully fleshed out to a certain depth.

Since we already know to track depth (as we did in writing dump_tree), we’ll do it that way, the third way. The implementation for that third approach is also pretty straightforward:

$Max_depth = 3; sub grow { my $n = $_[0]; my $depth = $_[1] || 0; figure_successors($n) unless $depth >= $Max_depth or @{$n->{successors}} or $n->{endgame} } foreach my $s (@{$n->{successors}}) { grow($s, $depth + 1); } # If were at $Max_depth, then figure_successors # didnt get called, so theres no successors # to recurse under – thats what stops recursion. }

If we start from a single node (whether it’s a node for the starting board xxxx_ _ _oooo, or for whatever board the computer is faced with), set $Max_depth to 4, and apply grow to it, it will grow the tree to include several hundred nodes.

Footnote: If at each move there are four pieces that can move, and they can each move right or left, the branching factor of the tree is eight, giving a tree with 1 (depth 0) + 8 (depth 1) + 8 ** 2 + 8 ** 3 + 8 ** 4 = 4681 nodes in it. But, in practice, not all pieces can move in both directions (none of the x pieces in xxxx_ _ _oooo can move left, for example), and there may be fewer than four pieces, if some were lost. For example, there are 801 nodes in a tree of depth four starting from xxxx_ _ _oooo, suggesting an average branching factor of about five (801 ** (1/4) is about 5.3), not eight.

What we need to derive from that tree is the information about what are the best moves for X. The simplest way to consider the payoff of different successors is to just average them Ω- but what we average isn’t always their immediate payoffs (because that’d leave us using only one generation of information), but the average payoff of their successors, if any. We can formalize this as:

To figure a nodes average payoff: If the node has successors: Figure each successors average payoff. My average payoff is the average of theirs. Otherwise: My average payoff is my immediate payoff.

Since this involves recursing into the successors before doing anything with the current node, this will traverse the tree in post-order.

We could work that up as a routine of its own, and apply that to the tree after we’ve applied grow to it. But since we’d never grow the tree without also figuring the average benefit, we might as well make that figuring part of the grow routine itself:

$Max_depth = 3; sub grow { my $n = $_[0]; my $depth = $_[1] || 0; figure_successors($n); unless $depth >= $Max_depth or @{$n->{successors}} or $n->{endgame} } if(@{$n->{successors}}) { my $a_payoff_sum = 0; foreach my $s (@{$n->{successors}}) { grow($s, $depth + 1); # RECURSE $a_payoff_sum += $s->{average_payoff}; } $n->{average_payoff} = $a_payoff_sum / @{$n->{successors}}; } else { $n->{average_payoff} = $n->{last_move_payoff}; } }

So, by time grow has applied to a node (wherever in the tree it is), it will have figured successors if possible (which, in turn, sets last_move_payoff for each node it creates), and will have set average_benefit.

Beyond this, all that’s needed is to start the board out with a root note of xxxx_ _ _oooo, and have the computer (X) take turns with the user (O) until someone wins. Whenever it’s O’s turn, Games::Alak presents a prompt to the user, letting him know the state of the current board, and asking what move he selects. When it’s X’s turn, the computer grows the game tree as necessary (using just the grow routine from above), then selects the move with the highest average payoff (or one of the highest, in case of a tie).

In either case, selecting a move means just setting that move’s node as the new root of the program’s game tree. Its sibling nodes and their descendants (the boards that didn’t get selected) and its parent node will be erased from memory, since they will no longer be in use (as Perl can tell by the fact that nothing holds references to them anymore).

The interface code in Games::Alak (the code that prompts the user for his move) actually supports quite a few options besides just moving Ω- including dumping the game tree to a specified depth (using a slightly fancier version of dump_tree, above), resetting the game, changing $Max_depth in the middle of the game, and quitting the game. Like figure_successors, it’s a bit too long to print here, but interested users are welcome to peruse (and freely modify) the code, as well as to enjoy just playing the game.

Now, in practice, there’s more to game trees than this: for games with a larger branching factor than Alak has (which is most!), game trees of depth four or larger would contain too many nodes to be manageable, most of those nodes being strategically quite uninteresting for either player; dealing with game trees specifically is therefore a matter of recognizing uninteresting contingencies and not bothering to grow the tree under them.

Footnote: For example, to choose a straightforward case: if O has a choice between moves that put him in immediate danger of X winning and moves that don’t, then O won’t ever choose the dangerous moves (and if he does, the computer will know enough to end the game), so there’s no point in growing the tree any further beneath those nodes.

But this sample implementation should illustrate the basics of how to build and manipulate a simple tree structure in memory. And once you’ve understood the basics of tree storage here, you should be ready to better understand the complexities and peculiarities of other systems for creating, accessing, and changing trees, including Tree::DAG_Node, HTML::Element, XML::DOM, or related formalisms like XPath and XSL.

[end body of article]

[Author Credit]

Sean M. Burke ([email protected]) is a tree-dwelling hominid.

References

Dewdney, A[lexander] K[eewatin]. 1984. Planiverse: Computer Contact with a Two-Dimensional World. Poseidon Press, New York.

Knuth, Donald Ervin. 1997. Art of Computer Programming, Volume 1, Third Edition: Fundamental Algorithms. Addison-Wesley, Reading, MA.

Wirth, Niklaus. 1976. Algorithms + Data Structures = Programs Prentice-Hall, Englewood Cliffs, NJ.

Worth, Stan and Allman Sheldon. Circa 1967. George of the Jungle theme. [music by Jay Ward.]

Wirth’s classic, currently and lamentably out of print, has a good section on trees. I find it clearer than Knuth’s (if not quite as encyclopedic), probably because Wirth’s example code is in a block-structured high-level language (basically Pascal), instead of in assembler (MIX). I believe the book was re-issued in the 1980s under the titles Algorithms and Data Structures and, in a German edition, Algorithmen und Datenstrukturen. Cheap copies of these editions should be available through used book services such as abebooks.com.

Worth’s classic, however, is available on the soundtrack to the 1997 George of the Jungle movie, as performed by The Presidents of the United States of America.

BACK

Return to the HTML::Tree docs.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2252 - Linux cli command mkdtemp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mkdtemp and provides detailed information about the command mkdtemp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mkdtemp.

NAME 🖥️ mkdtemp 🖥️

create a unique temporary directory

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
char *mkdtemp(char *template);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

mkdtemp():

    /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc 2.19 and earlier: */ _BSD_SOURCE
        || /* Since glibc 2.10: */ _POSIX_C_SOURCE >= 200809L

DESCRIPTION

The mkdtemp() function generates a uniquely named temporary directory from template. The last six characters of template must be XXXXXX and these are replaced with a string that makes the directory name unique. The directory is then created with permissions 0700. Since it will be modified, template must not be a string constant, but should be declared as a character array.

RETURN VALUE

The mkdtemp() function returns a pointer to the modified template string on success, and NULL on failure, in which case errno is set to indicate the error.

ERRORS

EINVAL
The last six characters of template were not XXXXXX. Now template is unchanged.

Also see mkdir(2) for other possible values for errno.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mkdtemp()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.1.91. NetBSD 1.4. POSIX.1-2008.

SEE ALSO

mktemp(1), mkdir(2), mkstemp(3), mktemp(3), tempnam(3), tmpfile(3), tmpnam(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2253 - Linux cli command newlocale

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command newlocale and provides detailed information about the command newlocale, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the newlocale.

NAME 🖥️ newlocale 🖥️

create, modify, and free a locale object

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <locale.h>
locale_t newlocale(int category_mask, const char *locale,
 locale_t base);
void freelocale(locale_t locobj);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

newlocale(), freelocale():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The newlocale() function creates a new locale object, or modifies an existing object, returning a reference to the new or modified object as the function result. Whether the call creates a new object or modifies an existing object is determined by the value of base:

  • If base is (locale_t) 0, a new object is created.

  • If base refers to valid existing locale object (i.e., an object returned by a previous call to newlocale() or duplocale(3)), then that object is modified by the call. If the call is successful, the contents of base are unspecified (in particular, the object referred to by base may be freed, and a new object created). Therefore, the caller should ensure that it stops using base before the call to newlocale(), and should subsequently refer to the modified object via the reference returned as the function result. If the call fails, the contents of base remain valid and unchanged.

If base is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)), or is not (locale_t) 0 and is not a valid locale object handle, the behavior is undefined.

The category_mask argument is a bit mask that specifies the locale categories that are to be set in a newly created locale object or modified in an existing object. The mask is constructed by a bitwise OR of the constants LC_ADDRESS_MASK, LC_CTYPE_MASK, LC_COLLATE_MASK, LC_IDENTIFICATION_MASK, LC_MEASUREMENT_MASK, LC_MESSAGES_MASK, LC_MONETARY_MASK, LC_NUMERIC_MASK, LC_NAME_MASK, LC_PAPER_MASK, LC_TELEPHONE_MASK, and LC_TIME_MASK. Alternatively, the mask can be specified as LC_ALL_MASK, which is equivalent to ORing all of the preceding constants.

For each category specified in category_mask, the locale data from locale will be used in the object returned by newlocale(). If a new locale object is being created, data for all categories not specified in category_mask is taken from the default (“POSIX”) locale.

The following preset values of locale are defined for all categories that can be specified in category_mask:

“POSIX”
A minimal locale environment for C language programs.

“C”
Equivalent to “POSIX”.

""
An implementation-defined native environment corresponding to the values of the LC_* and LANG environment variables (see locale(7)).

freelocale()

The freelocale() function deallocates the resources associated with locobj, a locale object previously returned by a call to newlocale() or duplocale(3). If locobj is LC_GLOBAL_LOCALE or is not valid locale object handle, the results are undefined.

Once a locale object has been freed, the program should make no further use of it.

RETURN VALUE

On success, newlocale() returns a handle that can be used in calls to duplocale(3), freelocale(), and other functions that take a locale_t argument. On error, newlocale() returns (locale_t) 0, and sets errno to indicate the error.

ERRORS

EINVAL
One or more bits in category_mask do not correspond to a valid locale category.

EINVAL
locale is NULL.

ENOENT
locale is not a string pointer referring to a valid locale.

ENOMEM
Insufficient memory to create a locale object.

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.3.

NOTES

Each locale object created by newlocale() should be deallocated using freelocale().

EXAMPLES

The program below takes up to two command-line arguments, which each identify locales. The first argument is required, and is used to set the LC_NUMERIC category in a locale object created using newlocale(). The second command-line argument is optional; if it is present, it is used to set the LC_TIME category of the locale object.

Having created and initialized the locale object, the program then applies it using uselocale(3), and then tests the effect of the locale changes by:

  1. Displaying a floating-point number with a fractional part. This output will be affected by the LC_NUMERIC setting. In many European-language locales, the fractional part of the number is separated from the integer part using a comma, rather than a period.

  2. Displaying the date. The format and language of the output will be affected by the LC_TIME setting.

The following shell sessions show some example runs of this program.

Set the LC_NUMERIC category to fr_FR (French):

$ ./a.out fr_FR
123456,789
Fri Mar  7 00:25:08 2014

Set the LC_NUMERIC category to fr_FR (French), and the LC_TIME category to it_IT (Italian):

$ ./a.out fr_FR it_IT
123456,789
ven 07 mar 2014 00:26:01 CET

Specify the LC_TIME setting as an empty string, which causes the value to be taken from environment variable settings (which, here, specify mi_NZ, New Zealand Māori):

$ LC_ALL=mi_NZ ./a.out fr_FR ""
123456,789
Te Paraire, te 07 o Poutū-te-rangi, 2014 00:38:44 CET

Program source

#define _XOPEN_SOURCE 700
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \
                        } while (0)
int
main(int argc, char *argv[])
{
    char buf[100];
    time_t t;
    size_t s;
    struct tm *tm;
    locale_t loc, nloc;
    if (argc < 2) {
        fprintf(stderr, "Usage: %s locale1 [locale2]

“, argv[0]); exit(EXIT_FAILURE); } /* Create a new locale object, taking the LC_NUMERIC settings from the locale specified in argv[1]. / loc = newlocale(LC_NUMERIC_MASK, argv[1], (locale_t) 0); if (loc == (locale_t) 0) errExit(“newlocale”); / If a second command-line argument was specified, modify the locale object to take the LC_TIME settings from the locale specified in argv[2]. We assign the result of this newlocale() call to ’nloc’ rather than ’loc’, since in some cases, we might want to preserve ’loc’ if this call fails. / if (argc > 2) { nloc = newlocale(LC_TIME_MASK, argv[2], loc); if (nloc == (locale_t) 0) errExit(“newlocale”); loc = nloc; } / Apply the newly created locale to this thread. / uselocale(loc); / Test effect of LC_NUMERIC. / printf("%8.3f “, 123456.789); / Test effect of LC_TIME. / t = time(NULL); tm = localtime(&t); if (tm == NULL) errExit(“time”); s = strftime(buf, sizeof(buf), “%c”, tm); if (s == 0) errExit(“strftime”); printf("%s “, buf); / Free the locale object. / uselocale(LC_GLOBAL_LOCALE); / So ’loc’ is no longer in use */ freelocale(loc); exit(EXIT_SUCCESS); }

SEE ALSO

locale(1), duplocale(3), setlocale(3), uselocale(3), locale(5), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2254 - Linux cli command stderr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command stderr and provides detailed information about the command stderr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the stderr.

NAME 🖥️ stderr 🖥️

standard I/O streams

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
extern FILE *stdin;
extern FILE *stdout;
extern FILE *stderr;

DESCRIPTION

Under normal circumstances every UNIX program has three streams opened for it when it starts up, one for input, one for output, and one for printing diagnostic or error messages. These are typically attached to the user’s terminal (see tty(4)) but might instead refer to files or other devices, depending on what the parent process chose to set up. (See also the “Redirection” section of sh(1).)

The input stream is referred to as “standard input”; the output stream is referred to as “standard output”; and the error stream is referred to as “standard error”. These terms are abbreviated to form the symbols used to refer to these files, namely stdin, stdout, and stderr.

Each of these symbols is a stdio(3) macro of type pointer to FILE, and can be used with functions like fprintf(3) or fread(3).

Since FILEs are a buffering wrapper around UNIX file descriptors, the same underlying files may also be accessed using the raw UNIX file interface, that is, the functions like read(2) and lseek(2).

On program startup, the integer file descriptors associated with the streams stdin, stdout, and stderr are 0, 1, and 2, respectively. The preprocessor symbols STDIN_FILENO, STDOUT_FILENO, and STDERR_FILENO are defined with these values in <unistd.h>. (Applying freopen(3) to one of these streams can change the file descriptor number associated with the stream.)

Note that mixing use of FILEs and raw file descriptors can produce unexpected results and should generally be avoided. (For the masochistic among you: POSIX.1, section 8.2.3, describes in detail how this interaction is supposed to work.) A general rule is that file descriptors are handled in the kernel, while stdio is just a library. This means for example, that after an exec(3), the child inherits all open file descriptors, but all old streams have become inaccessible.

Since the symbols stdin, stdout, and stderr are specified to be macros, assigning to them is nonportable. The standard streams can be made to refer to different files with help of the library function freopen(3), specially introduced to make it possible to reassign stdin, stdout, and stderr. The standard streams are closed by a call to exit(3) and by normal program termination.

STANDARDS

C11, POSIX.1-2008.

The standards also stipulate that these three streams shall be open at program startup.

HISTORY

C89, POSIX.1-2001.

NOTES

The stream stderr is unbuffered. The stream stdout is line-buffered when it points to a terminal. Partial lines will not appear until fflush(3) or exit(3) is called, or a newline is printed. This can produce unexpected results, especially with debugging output. The buffering mode of the standard streams (or any other stream) can be changed using the setbuf(3) or setvbuf(3) call. Note that in case stdin is associated with a terminal, there may also be input buffering in the terminal driver, entirely unrelated to stdio buffering. (Indeed, normally terminal input is line buffered in the kernel.) This kernel input handling can be modified using calls like tcsetattr(3); see also stty(1), and termios(3).

SEE ALSO

csh(1), sh(1), open(2), fopen(3), stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2255 - Linux cli command hdestroy

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command hdestroy and provides detailed information about the command hdestroy, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the hdestroy.

NAME 🖥️ hdestroy 🖥️

hash table management

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <search.h>
int hcreate(size_t nel);
void hdestroy(void);
ENTRY *hsearch(ENTRY item, ACTION action);
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <search.h>
int hcreate_r(size_t nel, struct hsearch_data *htab);
void hdestroy_r(struct hsearch_data *htab);
int hsearch_r(ENTRY item, ACTION action, ENTRY **retval,
 struct hsearch_data *htab);

DESCRIPTION

The three functions hcreate(), hsearch(), and hdestroy() allow the caller to create and manage a hash search table containing entries consisting of a key (a string) and associated data. Using these functions, only one hash table can be used at a time.

The three functions hcreate_r(), hsearch_r(), hdestroy_r() are reentrant versions that allow a program to use more than one hash search table at the same time. The last argument, htab, points to a structure that describes the table on which the function is to operate. The programmer should treat this structure as opaque (i.e., do not attempt to directly access or modify the fields in this structure).

First a hash table must be created using hcreate(). The argument nel specifies the maximum number of entries in the table. (This maximum cannot be changed later, so choose it wisely.) The implementation may adjust this value upward to improve the performance of the resulting hash table.

The hcreate_r() function performs the same task as hcreate(), but for the table described by the structure *htab. The structure pointed to by htab must be zeroed before the first call to hcreate_r().

The function hdestroy() frees the memory occupied by the hash table that was created by hcreate(). After calling hdestroy(), a new hash table can be created using hcreate(). The hdestroy_r() function performs the analogous task for a hash table described by *htab, which was previously created using hcreate_r().

The hsearch() function searches the hash table for an item with the same key as item (where “the same” is determined using strcmp(3)), and if successful returns a pointer to it.

The argument item is of type ENTRY, which is defined in <search.h> as follows:

typedef struct entry {
    char *key;
    void *data;
} ENTRY;

The field key points to a null-terminated string which is the search key. The field data points to data that is associated with that key.

The argument action determines what hsearch() does after an unsuccessful search. This argument must either have the value ENTER, meaning insert a copy of item (and return a pointer to the new hash table entry as the function result), or the value FIND, meaning that NULL should be returned. (If action is FIND, then data is ignored.)

The hsearch_r() function is like hsearch() but operates on the hash table described by *htab. The hsearch_r() function differs from hsearch() in that a pointer to the found item is returned in *retval, rather than as the function result.

RETURN VALUE

hcreate() and hcreate_r() return nonzero on success. They return 0 on error, with errno set to indicate the error.

On success, hsearch() returns a pointer to an entry in the hash table. hsearch() returns NULL on error, that is, if action is ENTER and the hash table is full, or action is FIND and item cannot be found in the hash table. hsearch_r() returns nonzero on success, and 0 on error. In the event of an error, these two functions set errno to indicate the error.

ERRORS

hcreate_r() and hdestroy_r() can fail for the following reasons:

EINVAL
htab is NULL.

hsearch() and hsearch_r() can fail for the following reasons:

ENOMEM
action was ENTER, key was not found in the table, and there was no room in the table to add a new entry.

ESRCH
action was FIND, and key was not found in the table.

POSIX.1 specifies only the ENOMEM error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

hcreate(), hsearch(), hdestroy()

Thread safetyMT-Unsafe race:hsearch

hcreate_r(), hsearch_r(), hdestroy_r()

Thread safetyMT-Safe race:htab

STANDARDS

hcreate()
hsearch()
hdestroy()
POSIX.1-2008.

hcreate_r()
hsearch_r()
hdestroy_r()
GNU.

HISTORY

hcreate()
hsearch()
hdestroy()
SVr4, POSIX.1-2001.

hcreate_r()
hsearch_r()
hdestroy_r()
GNU.

NOTES

Hash table implementations are usually more efficient when the table contains enough free space to minimize collisions. Typically, this means that nel should be at least 25% larger than the maximum number of elements that the caller expects to store in the table.

The hdestroy() and hdestroy_r() functions do not free the buffers pointed to by the key and data elements of the hash table entries. (It can’t do this because it doesn’t know whether these buffers were allocated dynamically.) If these buffers need to be freed (perhaps because the program is repeatedly creating and destroying hash tables, rather than creating a single table whose lifetime matches that of the program), then the program must maintain bookkeeping data structures that allow it to free them.

BUGS

SVr4 and POSIX.1-2001 specify that action is significant only for unsuccessful searches, so that an ENTER should not do anything for a successful search. In libc and glibc (before glibc 2.3), the implementation violates the specification, updating the data for the given key in this case.

Individual hash table entries can be added, but not deleted.

EXAMPLES

The following program inserts 24 items into a hash table, then prints some of them.

#include <search.h>
#include <stdio.h>
#include <stdlib.h>
static char *data[] = { "alpha", "bravo", "charlie", "delta",
     "echo", "foxtrot", "golf", "hotel", "india", "juliet",
     "kilo", "lima", "mike", "november", "oscar", "papa",
     "quebec", "romeo", "sierra", "tango", "uniform",
     "victor", "whisky", "x-ray", "yankee", "zulu"
};
int
main(void)
{
    ENTRY e;
    ENTRY *ep;
    hcreate(30);
    for (size_t i = 0; i < 24; i++) {
        e.key = data[i];
        /* data is just an integer, instead of a
           pointer to something */
        e.data = (void *) i;
        ep = hsearch(e, ENTER);
        /* there should be no failures */
        if (ep == NULL) {
            fprintf(stderr, "entry failed

“); exit(EXIT_FAILURE); } } for (size_t i = 22; i < 26; i++) { /* print two entries from the table, and show that two are not in the table */ e.key = data[i]; ep = hsearch(e, FIND); printf("%9.9s -> %9.9s:%d “, e.key, ep ? ep->key : “NULL”, ep ? (int)(ep->data) : 0); } hdestroy(); exit(EXIT_SUCCESS); }

SEE ALSO

bsearch(3), lsearch(3), malloc(3), tsearch(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2256 - Linux cli command NetPacket_IPXpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command NetPacket_IPXpm and provides detailed information about the command NetPacket_IPXpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the NetPacket_IPXpm.

NAME 🖥️ NetPacket_IPXpm 🖥️

Assemble and disassemble IPX packets

VERSION

version 1.7.2

SYNOPSIS

use NetPacket::IPX; my $ipx = NetPacket::IPX->decode($raw_pkt); my $raw_pkt = $ipx->encode(); my $ipx = NetPacket::IPX->new( tc => 0, type => 1, dest_network => “00:00:00:01”, dest_node => “FF:FF:FF:FF:FF:FF”, dest_socket => 1234, src_network => “00:00:00:01”, src_node => “12:34:56:78:90:AB”, src_socket => 5678, data => “…”, );

DESCRIPTION

NetPacket::IPX is a NetPacket class for encoding and decoding IPX packets.

METHODS

decode($raw_pkt)

Decode a packet and return a NetPacket::IPX instance.

encode()

Return the encoded form of a NetPacket::IPX instance.

new(%options)

Construct a NetPacket::IPX instance with arbitrary contents. All arguments listed in the SYNOPSIS are mandatory.

Throws an exception on missing/invalid arguments.

INSTANCE DATA

The following fields are available in a NetPacket::IPX instance:

tc
Traffic Control field, the number of routers an IPX packet has passed through.

type
Type field.

dest_network
Destination network number, in the format XX:XX:XX:XX.

dest_node
Destination node number, in the format XX:XX:XX:XX:XX:XX.

dest_socket
Destination socket number.

src_network
Source network number, in the format XX:XX:XX:XX.

dest_node
Source node number, in the format XX:XX:XX:XX:XX:XX.

dest_socket
Source socket number.

data
Packet payload.

COPYRIGHT

Copyright (C) 2014 Daniel Collins

This module is free software. You can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Daniel Collins <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2257 - Linux cli command Image_ExifTool_WriteXMPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_WriteXMPpm and provides detailed information about the command Image_ExifTool_WriteXMPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_WriteXMPpm.

NAME 🖥️ Image_ExifTool_WriteXMPpm 🖥️

Write XMP meta information

SYNOPSIS

These routines are autoloaded by Image::ExifTool::XMP.

DESCRIPTION

This file contains routines to write XMP metadata.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Image::ExifTool::XMP (3pm), Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2258 - Linux cli command pthread_key_create

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_key_create and provides detailed information about the command pthread_key_create, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_key_create.

NAME 🖥️ pthread_key_create 🖥️

management of thread-specific data

SYNOPSIS

#include <pthread.h>
int pthread_key_create(pthread_key_t *key,
 void (*destr_function) (void *));
int pthread_key_delete(pthread_key_t key);
int pthread_setspecific(pthread_key_t key, const void *pointer);
void * pthread_getspecific(pthread_key_t key);

DESCRIPTION

Programs often need global or static variables that have different values in different threads. Since threads share one memory space, this cannot be achieved with regular variables. Thread-specific data is the POSIX threads answer to this need.

Each thread possesses a private memory block, the thread-specific data area, or TSD area for short. This area is indexed by TSD keys. The TSD area associates values of type void * to TSD keys. TSD keys are common to all threads, but the value associated with a given TSD key can be different in each thread.

For concreteness, the TSD areas can be viewed as arrays of void * pointers, TSD keys as integer indices into these arrays, and the value of a TSD key as the value of the corresponding array element in the calling thread.

When a thread is created, its TSD area initially associates NULL with all keys.

pthread_key_create allocates a new TSD key. The key is stored in the location pointed to by key. There is a limit of PTHREAD_KEYS_MAX on the number of keys allocated at a given time. The value initially associated with the returned key is NULL in all currently executing threads.

The destr_function argument, if not NULL, specifies a destructor function associated with the key. When a thread terminates via pthread_exit or by cancelation, destr_function is called with arguments the value associated with the key in that thread. The destr_function is not called if that value is NULL. The order in which destructor functions are called at thread termination time is unspecified.

Before the destructor function is called, the NULL value is associated with the key in the current thread. A destructor function might, however, re-associate non-NULL values to that key or some other key. To deal with this, if after all the destructors have been called for all non-NULL values, there are still some non-NULL values with associated destructors, then the process is repeated. The glibc implementation stops the process after PTHREAD_DESTRUCTOR_ITERATIONS iterations, even if some non-NULL values with associated descriptors remain. Other implementations may loop indefinitely.

pthread_key_delete deallocates a TSD key. It does not check whether non-NULL values are associated with that key in the currently executing threads, nor call the destructor function associated with the key.

pthread_setspecific changes the value associated with key in the calling thread, storing the given pointer instead.

pthread_getspecific returns the value currently associated with key in the calling thread.

RETURN VALUE

pthread_key_create, pthread_key_delete, and pthread_setspecific return 0 on success and a non-zero error code on failure. If successful, pthread_key_create stores the newly allocated key in the location pointed to by its key argument.

pthread_getspecific returns the value associated with key on success, and NULL on error.

ERRORS

pthread_key_create returns the following error code on error:

EAGAIN
PTHREAD_KEYS_MAX keys are already allocated.

pthread_key_delete and pthread_setspecific return the following error code on error:

EINVAL
key is not a valid, allocated TSD key.

pthread_getspecific returns NULL if key is not a valid, allocated TSD key.

SEE ALSO

pthread_create(3), pthread_exit(3), pthread_testcancel(3).

EXAMPLE

The following code fragment allocates a thread-specific array of 100 characters, with automatic reclamation at thread exit:

/* Key for the thread-specific buffer */
static pthread_key_t buffer_key;
/* Once-only initialisation of the key */
static pthread_once_t buffer_key_once = PTHREAD_ONCE_INIT;
/* Allocate the thread-specific buffer */
void buffer_alloc(void)
{
  pthread_once(&buffer_key_once, buffer_key_alloc);
  pthread_setspecific(buffer_key, malloc(100));
}
/* Return the thread-specific buffer */
char * get_buffer(void)
{
  return (char *) pthread_getspecific(buffer_key);
}
/* Allocate the key */
static void buffer_key_alloc()
{
  pthread_key_create(&buffer_key, buffer_destroy);
}
/* Free the thread-specific buffer */
static void buffer_destroy(void * buf)
{
  free(buf);
}
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2259 - Linux cli command STAILQ_ENTRY

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command STAILQ_ENTRY and provides detailed information about the command STAILQ_ENTRY, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the STAILQ_ENTRY.

NAME 🖥️ STAILQ_ENTRY 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2260 - Linux cli command y1f

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command y1f and provides detailed information about the command y1f, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the y1f.

NAME 🖥️ y1f 🖥️

Bessel functions of the second kind

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double y0(double x);
double y1(double x);
double yn(int n, double x);
float y0f(float x);
float y1f(float x);
float ynf(int n, float x);
long double y0l(long double x);
long double y1l(long double x);
long double ynl(int n, long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

y0(), y1(), yn():

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

y0f(), y0l(), y1f(), y1l(), ynf(), ynl():

    _XOPEN_SOURCE >= 600
        || (_ISOC99_SOURCE && _XOPEN_SOURCE)
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The y0() and y1() functions return Bessel functions of x of the second kind of orders 0 and 1, respectively. The yn() function returns the Bessel function of x of the second kind of order n.

The value of x must be positive.

The y0f(), y1f(), and ynf() functions are versions that take and return float values. The y0l(), y1l(), and ynl() functions are versions that take and return long double values.

RETURN VALUE

On success, these functions return the appropriate Bessel value of the second kind for x.

If x is a NaN, a NaN is returned.

If x is negative, a domain error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively. (POSIX.1-2001 also allows a NaN return for this case.)

If x is 0.0, a pole error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.

If the result underflows, a range error occurs, and the functions return 0.0

If the result overflows, a range error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively. (POSIX.1-2001 also allows a 0.0 return for this case.)

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is negative
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

Pole error: x is 0.0
errno is set to ERANGE and an FE_DIVBYZERO exception is raised (but see BUGS).

Range error: result underflow
errno is set to ERANGE. No FE_UNDERFLOW exception is returned by fetestexcept(3) for this case.

Range error: result overflow
errno is set to ERANGE (but see BUGS). An overflow floating-point exception (FE_OVERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

y0(), y0f(), y0l()

Thread safetyMT-Safe

y1(), y1f(), y1l()

Thread safetyMT-Safe

yn(), ynf(), ynl()

Thread safetyMT-Safe

STANDARDS

y0()
y1()
yn()
POSIX.1-2008.

Others:
BSD.

HISTORY

y0()
y1()
yn()
SVr4, 4.3BSD, POSIX.1-2001.

Others:
BSD.

BUGS

Before glibc 2.19, these functions misdiagnosed pole errors: errno was set to EDOM, instead of ERANGE and no FE_DIVBYZERO exception was raised.

Before glibc 2.17, did not set errno for “range error: result underflow”.

In glibc 2.3.2 and earlier, these functions do not raise an invalid floating-point exception (FE_INVALID) when a domain error occurs.

SEE ALSO

j0(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2261 - Linux cli command getnetbyaddr_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getnetbyaddr_r and provides detailed information about the command getnetbyaddr_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getnetbyaddr_r.

NAME 🖥️ getnetbyaddr_r 🖥️

get network entry (reentrant)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
int getnetent_r(struct netent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct netent **restrict result,
 int *restrict h_errnop);
int getnetbyname_r(const char *restrict name,
 struct netent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct netent **restrict result,
 int *restrict h_errnop);
int getnetbyaddr_r(uint32_t net, int type,
 struct netent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct netent **restrict result,
 int *restrict h_errnop);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getnetent_r(), getnetbyname_r(), getnetbyaddr_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The getnetent_r(), getnetbyname_r(), and getnetbyaddr_r() functions are the reentrant equivalents of, respectively, getnetent(3), getnetbyname(3), and getnetbynumber(3). They differ in the way that the netent structure is returned, and in the function calling signature and return value. This manual page describes just the differences from the nonreentrant functions.

Instead of returning a pointer to a statically allocated netent structure as the function result, these functions copy the structure into the location pointed to by result_buf.

The buf array is used to store the string fields pointed to by the returned netent structure. (The nonreentrant functions allocate these strings in static storage.) The size of this array is specified in buflen. If buf is too small, the call fails with the error ERANGE, and the caller must try again with a larger buffer. (A buffer of length 1024 bytes should be sufficient for most applications.)

If the function call successfully obtains a network record, then *result is set pointing to result_buf; otherwise, *result is set to NULL.

The buffer pointed to by h_errnop is used to return the value that would be stored in the global variable h_errno by the nonreentrant versions of these functions.

RETURN VALUE

On success, these functions return 0. On error, they return one of the positive error numbers listed in ERRORS.

On error, record not found (getnetbyname_r(), getnetbyaddr_r()), or end of input (getnetent_r()) result is set to NULL.

ERRORS

ENOENT
(getnetent_r()) No more records in database.

ERANGE
buf is too small. Try again with a larger buffer (and increased buflen).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getnetent_r(), getnetbyname_r(), getnetbyaddr_r()

Thread safetyMT-Safe locale

VERSIONS

Functions with similar names exist on some other systems, though typically with different calling signatures.

STANDARDS

GNU.

SEE ALSO

getnetent(3), networks(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2262 - Linux cli command pthread_mutex_consistent_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_mutex_consistent_np and provides detailed information about the command pthread_mutex_consistent_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_mutex_consistent_np.

NAME 🖥️ pthread_mutex_consistent_np 🖥️

make a robust mutex consistent

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_mutex_consistent(pthread_mutex_t *mutex);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

pthread_mutex_consistent():

    _POSIX_C_SOURCE >= 200809L

DESCRIPTION

This function makes a robust mutex consistent if it is in an inconsistent state. A mutex can be left in an inconsistent state if its owner terminates while holding the mutex, in which case the next owner who acquires the mutex will succeed and be notified by a return value of EOWNERDEAD from a call to pthread_mutex_lock().

RETURN VALUE

On success, pthread_mutex_consistent() returns 0. Otherwise, it returns a positive error number to indicate the error.

ERRORS

EINVAL
The mutex is either not robust or is not in an inconsistent state.

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.12. POSIX.1-2008.

Before the addition of pthread_mutex_consistent() to POSIX, glibc defined the following equivalent nonstandard function if _GNU_SOURCE was defined:

[[deprecated]]
int pthread_mutex_consistent_np(const pthread_mutex_t *mutex);

This GNU-specific API, which first appeared in glibc 2.4, is nowadays obsolete and should not be used in new programs; since glibc 2.34 it has been marked as deprecated.

NOTES

pthread_mutex_consistent() simply informs the implementation that the state (shared data) guarded by the mutex has been restored to a consistent state and that normal operations can now be performed with the mutex. It is the application’s responsibility to ensure that the shared data has been restored to a consistent state before calling pthread_mutex_consistent().

EXAMPLES

See pthread_mutexattr_setrobust(3).

SEE ALSO

pthread_mutex_lock(3), pthread_mutexattr_getrobust(3), pthread_mutexattr_init(3), pthread_mutexattr_setrobust(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2263 - Linux cli command Tk_HListpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_HListpm and provides detailed information about the command Tk_HListpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_HListpm.

NAME 🖥️ Tk_HListpm 🖥️

Create and manipulate Tix Hierarchial List widgets

SYNOPSIS

$hlist = $parent->HList(?options?);

STANDARD OPTIONS

-background -borderwidth -cursor -exportselection -foreground -font -height -highlightcolor -highlightthickness -relief -selectbackground -selectforeground -xscrollcommand -yscrollcommand -width

See Tk::options for details of the standard options.

WIDGET-SPECIFIC OPTIONS

Name: browsecmd

Class: BrowseCmd

Switch: -browsecmd

Specifies a perl/Tk callback to be executed when the user browses through the entries in the HList widget.

Name: columns

Class: Columns

Switch: -columns

Specifies the number of columns in this HList widget. This option can only be set during the creation of the HList widget and cannot be changed subsequently.

Name: command

Class: Command

Switch: -command

Specifies the perl/Tk callback to be executed when the user invokes a list entry in the HList widget. Normally the user invokes a list entry by double-clicking it or pressing the Return key.

Name: drawBranch

Class: DrawBranch

Switch: -drawbranch

A Boolean value to specify whether branch line should be drawn to connect list entries to their parents.

Name: foreground

Class: Foreground

Switch: -foreground

Alias: -fg

[OBSOLETE] Specifies the default foreground color for the list entries.

Name: gap

Class: Gap

Switch: -gap

[OBSOLETE] The default distance between the bitmap/image and the text in list entries.

Name: header

Class: Header

Switch: -header

A Boolean value specifying whether headers should be displayed for this HList widget (see the header method below).

Name: height

Class: Height

Switch: -height

Specifies the desired height for the window in number of characters.

Name: indent

Class: Indent

Switch: -indent

Specifies the amount of horizontal indentation between a list entry and its children. Must be a valid screen distance value.

Name: indicator

Class: Indicator

Switch: -indicator

Specifies whether the indicators should be displayed inside the HList widget. See the indicator method below.

Name: indicatorCmd

Class: IndicatorCmd

Switch: -indicatorcmd

Specifies a perl/Tk callback to be executed when the user manipulates the indicator of an HList entry. The -indicatorcmd is triggered when the user press or releases the mouse button over the indicator in an HList entry. By default the perl/Tk callback specified by -indicatorcmd is executed with two additional arguments, the entryPath of the entry whose indicator has been triggered and additional information about the event. The additional information is one of the following strings: <Arm>, <Disarm>, and <Activate>.

Name: itemType

Class: ItemType

Switch: -itemtype

Specifies the default type of display item for this HList widget. When you call the itemCreate, add and addchild methods, display items of this type will be created if the -itemtype option is not specified .

Name: padX

Class: Pad

Switch: -padx

[OBSOLETE] The default horizontal padding for list entries.

Name: padY

Class: Pad

Switch: -padx

[OBSOLETE] The default vertical padding for list entries.

Name: selectBackground

Class: SelectBackground

Switch: -selectbackground

Specifies the background color for the selected list entries.

Name: selectBorderWidth

Class: BorderWidth

Switch: -selectborderwidth

Specifies a non-negative value indicating the width of the 3-D border to draw around selected items. The value may have any of the forms acceptable to Tk_GetPixels.

Name: selectForeground

Class: SelectForeground

Switch: -selectforeground

Specifies the foreground color for the selected list entries.

Name: selectMode

Class: SelectMode

Switch: -selectmode

Specifies one of several styles for manipulating the selection. The value of the option may be arbitrary, but the default bindings expect it to be either single, browse, multiple, or extended; the default value is single.

Name: sizeCmd

Class: SizeCmd

Switch: -sizecmd

Specifies a perl/Tk callback to be called whenever the HList widget changes its size. This method can be useful to implement ``user scroll bars when needed’’ features.

Name: separator

Class: Separator

Switch: -separator

Specifies the character to used as the separator character when intepreting the path-names of list entries. By default the character “.” is used.

Name: width

Class: Width

Switch: -width

Specifies the desired width for the window in characters.

DESCRIPTION

The HList method creates a new window (given by the $widget argument) and makes it into a HList widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the HList widget such as its cursor and relief.

The HList widget can be used to display any data that have a hierarchical structure, for example, file system directory trees. The list entries are indented and connected by branch lines according to their places in the hierarchy.

Each list entry is identified by an entryPath. The entryPath is a sequence of entry names separated by the separator charactor (specified by the -separator option). An entry name can be any string that does not contain the separator charactor, or it can be the a string that contains only one separator charactor.

For example, when “.” is used as the separator charactor, “one.two.three” is the entryPath for a list entry whose parent is “one.two”, whose parent is “one”, which is a toplevel entry (has no parents).

Another examples: “.two.three” is the entryPath for a list entry whose parent is “.two”, whose parent is “.”, which is a toplevel entry.

DISPLAY ITEMS

Each list entry in an HList widget is associated with a display item. The display item determines what visual information should be displayed for this list entry. Please see Tk::DItem for a list of all display items. When a list entry is created by the itemCreate, add or addchild widget methods, the type of its display item is determined by the -itemtype option passed to these methods. If the -itemtype is omitted, then by default the type specified by this HList widget’s -itemtype option is used.

WIDGET METHODS

The HList method creates a widget object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class.

The following additional methods are available HList widgets:

$hlist->add($entryPath ?,option=>value, …?)
Creates a new list entry with the pathname $entryPath. A list entry must be created after its parent is created (unless this entry is a top-level entry, which has no parent). See also “BUGS” below. This method returns the entryPath of the newly created list entry. The following configuration options can be given to configure the list entry:

-at => position
Insert the new list at the position given by position. position must be a valid integer. The position 0 indicates the first position, 1 indicates the second position, and so on.

-after => afterWhich
Insert the new list entry after the entry identified by afterWhich. afterWhich must be a valid list entry and it mush have the same parent as the new list entry

-before => beforeWhich
Insert the new list entry before the entry identified by beforeWhich. beforeWhich must be a valid list entry and it mush have the same parent as the new list entry

-data => string
Specifies a string to associate with this list entry. This string can be queried by the info method. The application programmer can use the -data option to associate the list entry with the data it represents.

-itemtype => type
Specifies the type of display item to be display for the new list entry. type must be a valid display item type. Currently the available display item types are imagetext, text, and $widget. If this option is not specified, then by default the type specified by this HList widget’s -itemtype option is used.

-state => state
Specifies whether this entry can be selected or invoked by the user. Must be either normal or disabled.

The add method accepts additional configuration options to configure the display item associated with this list entry. The set of additional configuration options depends on the type of the display item given by the -itemtype option. Please see Tk::DItem for a list of the configuration options for each of the display item types.

$hlist->addchild($parentPath, ?option, value, …, ?)
Adds a new child entry to the children list of the list entry identified by $parentPath. Or, if $parentPath is set to be the empty string, then creates a new toplevel entry. The name of the new list entry will be a unique name automatically generated by the HList widget. Usually if $parentPath is foo, then the entryPath of the new entry will be foo.0, foo.1, … etc. This method returns the entryPath of the newly created list entry. option can be any option for the add method. See also “BUGS” below.

$hlist->anchorSet($entryPath)
Sets the anchor to the list entry identified by $entryPath. The anchor is the end of the selection that is fixed while the user is dragging out a selection with the mouse.

$hlist->anchorClear
Removes the anchor, if any, from this HList widget. This only removes the surrounding highlights of the anchor entry and does not affect its selection status.

$hlist->columnWidth($col?, -char?, ?width?)
Querys or sets the width of a the column $col in the HList widget. The value of $col is zero-based: 0 stands for the first column, 1 stands for the second, and so on. If no further parameters are given, returns the current width of this column (in number of pixels). Additional parameters can be given to set the width of this column:

$hlist->columnWidth($col, ‘’)
An empty string indicates that the width of the column should be just wide enough to display the widest element in this column. In this case, the width of this column may change as a result of the elements in this column changing their sizes.

$hlist->columnWidth($col, width)
width must be in a form accepted by Tk_GetPixels.

$hlist->columnWidth($col, -char, nChars)
The width is set to be the average width occupied by nChars number of characters of the font specified by the -font option of this HList widget.

$hlist->delete(option, $entryPath)
Delete one or more list entries. option may be one of the following:

all
Delete all entries in the HList. In this case the $entryPath does not need to be specified.

entry
Delete the entry specified by $entryPath and all its offsprings, if any.

offsprings
Delete all the offsprings, if any, of the entry specified by $entryPath. However, $entryPath itself is not deleted.

siblings
Delete all the list entries that share the same parent with the entry specified by $entryPath. However, $entryPath itself is not deleted.

$hlist->dragsiteSet($entryPath)
Sets the dragsite to the list entry identified by $entryPath. The dragsite is used to indicate the source of a drag-and-drop action. Currently drag-and-drop functionality has not been implemented in Tix yet.

$hlist->dragsiteClear
Remove the dragsite, if any, from the this HList widget. This only removes the surrounding highlights of the dragsite entry and does not affect its selection status.

$hlist->dropsiteSet($entryPath)
Sets the dropsite to the list entry identified by $entryPath. The dropsite is used to indicate the target of a drag-and-drop action. Currently drag-and-drop functionality has not been implemented in Tix yet.

$hlist->dropsiteClear
Remove the dropsite, if any, from the this HList widget. This only removes the surrounding highlights of the dropsite entry and does not affect its selection status.

$hlist->entrycget($entryPath, option)
Returns the current value of the configuration option given by option for the entry indentfied by $entryPath. Option may have any of the values accepted by the add method.

$hlist->entryconfigure($entryPath ?,option?, ?value=>option, …?)
Query or modify the configuration options of the list entry indentfied by $entryPath. If no option is specified, returns a list describing all of the available options for $entryPath (see Tk::options for information on the format of this list.) If option is specified with no value, then the method returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the method modifies the given option(s) to have the given value(s); in this case the method returns an empty string. Option may have any of the values accepted by the add or addchild method. The exact set of options depends on the value of the -itemtype option passed to the the add or addchild method when this list entry is created.

$hlist->header(option, $col ?,args, …?)
Manipulates the header items of this HList widget. If the -header option of this HList widget is set to true, then a header item is displayed at the top of each column. The $col argument for this method must be a valid integer. 0 indicates the first column, 1 the second column, … and so on. This method supports the following options:

$hlist->header(cget, $col, option)
If the $col-th column has a header display item, returns the value of the specified option of the header item. If the header doesn’t exist, returns an error.

$hlist->header(configure, $col, ?option?, ?value, option, value, …?)
Query or modify the configuration options of the header display item of the $col-th column. The header item must exist, or an error will result. If no option is specified, returns a list describing all of the available options for the header display item (see Tk::options for information on the format of this list.) If option is specified with no value, then the method returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the method modifies the given option(s) to have the given value(s); in this case the method returns an empty string. Option may have any of the values accepted by the header create method. The exact set of options depends on the value of the -itemtype option passed to the the header create method when this display item was created.

$hlist->header(create, $col, ?-itemtype type? ?option value …?
Creates a new display item as the header for the $col-th column. See also “BUGS” below. If an header display item already exists for this column, it will be replaced by the new item. An optional parameter -itemtype can be used to specify what type of display item should be created. If the -itemtype is not given, then by default the type specified by this HList widget’s -itemtype option is used. Additional parameters, in option-value pairs, can be passed to configure the appearance of the display item. Each option-value pair must be a valid option for this type of display item or one of the following:

-borderwidth => color
Specifies the border width of this header item.

-headerbackground => color
Specifies the background color of this header item.

-relief => type
Specifies the relief type of the border of this header item.

$hlist->header(delete, $col)
Deletes the header display item for the $col-th column.

$hlist->header(exists, $col)
Return true if an header display item exists for the $col-th column; return false otherwise.

$hlist->header(size, $col)
If an header display item exists for the $col-th column , returns its size in pixels in a two element list (width, height); returns an error if the header display item does not exist.

$hlist->hide(option ?,$entryPath?)
Makes some of entries invisible without deleting them. Option can be one of the following:

entry
Hides the list entry identified by $entryPath.

Currently only the entry option is supported. Other options will be added in the next release.

$hlist->indicator(option, $entryPath, ?args, …?)
Manipulates the indicator on the list entries. An indicator is usually a small display item (such as an image) that is displayed to the left to an entry to indicate the status of the entry. For example, it may be used to indicate whether a directory is opened or closed. Option can be one of the following:

$hlist->indicator(cget, $entryPath, option)
If the list entry given by $entryPath has an indicator, returns the value of the specified option of the indicator. If the indicator doesn’t exist, returns an error.

$hlist->indicator(configure, $entryPath, ?option?, ?value, option, value, …?)
Query or modify the configuration options of the indicator display item of the entry specified by $entryPath. The indicator item must exist, or an error will result. If no option is specified, returns a list describing all of the available options for the indicator display item (see Tk::options for information on the format of this list). If option is specified with no value, then the method returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the method modifies the given option(s) to have the given value(s); in this case the method returns an empty string. Option may have any of the values accepted by the indicator create method. The exact set of options depends on the value of the -itemtype option passed to the the indicator create method when this display item was created.

$hlist->indicator(create, $entryPath, ?, -itemtype type? ?option value …?)
Creates a new display item as the indicator for the entry specified by $entryPath. If an indicator display item already exists for this entry, it will be replaced by the new item. An optional parameter -itemtype can be used to specify what type of display item should be created. If the -itemtype is not given, then by default the type specified by this HList widget’s -itemtype option is used. Additional parameters, in option-value pairs, can be passed to configure the appearance of the display item. Each option-value pair must be a valid option for this type of display item.

$hlist->indicator(delete, $entryPath)
Deletes the indicator display item for the entry given by $entryPath.

$hlist->indicator(exists, $entryPath)
Return true if an indicator display item exists for the entry given by $entryPath; return false otherwise.

$hlist->indicator(size, $entryPath)
If an indicator display item exists for the entry given by $entryPath, returns its size in a two element list of the form {width height}; returns an error if the indicator display item does not exist.

$hlist->info(option, arg, …)
Query information about the HList widget. option can be one of the following:

$hlist->info(anchor)
Returns the entryPath of the current anchor, if any, of the HList widget. If the anchor is not set, returns the empty string.

$hlist->infoBbox($entryPath)
Returns a list of four numbers describing the visible bounding box of the entry given $entryPath. The first two elements of the list give the x and y coordinates of the upper-left corner of the screen area covered by the entry (specified in pixels relative to the widget) and the last two elements give the lower-right corner of the area, in pixels. If no part of the entry given by index is visible on the screen then the result is an empty string; if the entry is partially visible, the result gives the only the visible area of the entry.

$hlist->info(children ?,$entryPath?)
If $entryPath is given, returns a list of the entryPath’s of its children entries. Otherwise returns a list of the toplevel entryPath’s.

$hlist->info(data ?,$entryPath?)
Returns the data associated with $entryPath.

$hlist->info(dragsite)
Returns the entryPath of the current dragsite, if any, of the HList widget. If the dragsite is not set, returns the empty string.

$hlist->info(dropsite)
Returns the entryPath of the current dropsite, if any, of the HList widget. If the dropsite is not set, returns the empty string.

$hlist->info(exists, $entryPath)
Returns a boolean value indicating whether the list entry $entryPath exists.

$hlist->info(hidden, $entryPath)
Returns a boolean value indicating whether the list entry $entryPath is hidden or not.

$hlist->info(next, $entryPath)
Returns the entryPath of the list entry, if any, immediately below this list entry. If this entry is already at the bottom of the HList widget, returns an empty string.

$hlist->info(parent, $entryPath)
Returns the name of the parent of the list entry identified by $entryPath. If entryPath is a toplevel list entry, returns the empty string.

$hlist->info(prev, $entryPath)
Returns the entryPath of the list entry, if any, immediately above this list entry. If this entry is already at the top of the HList widget, returns an empty string.

$hlist->info(selection)
Returns a list of selected entries in the HList widget. In scalar context, returns an anonymous list of the selected entries. If no entries are selected, undef is returned in scalar context, and an empty list otherwise.

$hlist->item(option, ?args, …?)
Creates and configures the display items at individual columns the entries. The form of additional of arguments depends on the choice of option:

$hlist->itemCget($entryPath, $col, option)
Returns the current value of the configure option of the display item at the column designated by $col of the entry specified by $entryPath.

$hlist->itemConfigure($entryPath, $col ?,option?, ?value, option, value, …?)
Query or modify the configuration options of the display item at the column designated by $col of the entry specified by $entryPath. If no option is specified, returns a list describing all of the available options for $entryPath (see Tk::options for information on the format of this list). If option is specified with no value, then the method returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the method modifies the given option(s) to have the given value(s); in this case the method returns an empty string. Option may have any of the values accepted by the item create method. The exact set of options depends on the value of the -itemtype option passed to the the item create method when this display item was created.

$hlist->itemCreate($entryPath, $col ?,-itemtype=>type? ?,option value …?)
Creates a new display item at the column designated by $col of the entry specified by $entryPath. An optional parameter -itemtype can be used to specify what type of display items should be created. If the -itemtype is not specified, then by default the type specified by this HList widget’s -itemtype option is used. Additional parameters, in option-value pairs, can be passed to configure the appearance of the display item. Each option- value pair must be a valid option for this type of display item.

$hlist->itemDelete($entryPath, $col)
Deletes the display item at the column designated by $col of the entry specified by $entryPath.

$hlist->itemExists($entryPath, $col)
Returns true if there is a display item at the column designated by $col of the entry specified by $entryPath; returns false otherwise.

$hlist->nearest(y)
$hlist->nearest(y) Given a y-coordinate within the HList window, this method returns the entryPath of the (visible) HList element nearest to that y-coordinate.

$hlist->see($entryPath)
Adjust the view in the HList so that the entry given by $entryPath is visible. If the entry is already visible then the method has no effect; if the entry is near one edge of the window then the HList scrolls to bring the element into view at the edge; otherwise the HList widget scrolls to center the entry.

$hlist->selection(option, arg, …)

$hlist->selectionOption(arg, …)

This method is used to adjust the selection within a HList widget. It has several forms, depending on option:

$hlist->selectionClear(?from?, ?to?)
When no extra arguments are given, deselects all of the list entrie(s) in this HList widget. When only from is given, only the list entry identified by from is deselected. When both from and to are given, deselects all of the list entrie(s) between between from and to, inclusive, without affecting the selection state of elements outside that range.

$hlist->selectionGet
This is an alias for the infoSelection method.

$hlist->selectionIncludes($entryPath)
Returns 1 if the list entry indicated by $entryPath is currently selected; returns 0 otherwise.

$hlist->selectionSet(from?, to?)
Selects all of the list entrie(s) between between from and to, inclusive, without affecting the selection state of entries outside that range. When only from is given, only the list entry identified by from is selected.

$hlist->show(option ?,$entryPath?)
Show the entries that are hidden by the hide method, option can be one of the following:

entry
Shows the list entry identified by $entryPath.

Currently only the entry option is supported. Other options will be added in future releases.

$hlist->xview(args)
This method is used to query and change the horizontal position of the information in the widget’s window. It can take any of the following forms:

$hlist->xview
Returns a list containing two elements. Each element is a real fraction between 0 and 1; together they describe the horizontal span that is visible in the window. For example, if the first element is .2 and the second element is .6, 20% of the HList entry is off-screen to the left, the middle 40% is visible in the window, and 40% of the entry is off-screen to the right. These are the same values passed to scrollbars via the -xscrollcommand option.

$hlist->xview($entryPath)
Adjusts the view in the window so that the list entry identified by $entryPath is aligned to the left edge of the window.

$hlist->xview(moveto => fraction)
Adjusts the view in the window so that fraction of the total width of the HList is off-screen to the left. fraction must be a fraction between 0 and 1.

$hlist->xview(scroll => number, what)
This method shifts the view in the window left or right according to number and what. Number must be an integer. What must be either units or pages or an abbreviation of one of these. If what is units, the view adjusts left or right by number character units (the width of the 0 character) on the display; if it is pages then the view adjusts by number screenfuls. If number is negative then characters farther to the left become visible; if it is positive then characters farther to the right become visible.

$hlist->yview(?args?)
This method is used to query and change the vertical position of the entries in the widget’s window. It can take any of the following forms:

$hlist->yview
Returns a list containing two elements, both of which are real fractions between 0 and 1. The first element gives the position of the list element at the top of the window, relative to the HList as a whole (0.5 means it is halfway through the HList, for example). The second element gives the position of the list entry just after the last one in the window, relative to the HList as a whole. These are the same values passed to scrollbars via the -yscrollcommand option.

$hlist->yview($entryPath)
Adjusts the view in the window so that the list entry given by $entryPath is displayed at the top of the window.

$hlist->yview(moveto => fraction)
Adjusts the view in the window so that the list entry given by fraction appears at the top of the window. Fraction is a fraction between 0 and 1; 0 indicates the first entry in the HList, 0.33 indicates the entry one-third the way through the HList, and so on.

$hlist->yview(scroll => number, what)
This method adjust the view in the window up or down according to number and what. Number must be an integer. What must be either units or pages. If what is units, the view adjusts up or down by number lines; if it is pages then the view adjusts by number screenfuls. If number is negative then earlier entries become visible; if it is positive then later entries become visible.

BINDINGS

[1]
If the -selectmode is “browse”, when the user drags the mouse pointer over the list entries, the entry under the pointer will be highlighted and the -browsecmd callback will be called with one parameter, the entryPath of the highlighted entry. Only one entry can be highlighted at a time. The -command callback will be called when the user double-clicks on a list entry.

[2]
If the -selectmode is “single”, the entries will only be highlighted by mouse <ButtonRelease-1> events. When a new list entry is highlighted, the -browsecmd callback will be called with one parameter indicating the highlighted list entry. The -command callback will be called when the user double-clicks on a list entry.

[3]
If the -selectmode is “multiple”, when the user drags the mouse pointer over the list entries, all the entries under the pointer will be highlighted. However, only a contiguous region of list entries can be selected. When the highlighted area is changed, the -browsecmd callback will be called with an undefined parameter. It is the responsibility of the -browsecmd callback to find out the exact highlighted selection in the HList. The -command callback will be called when the user double-clicks on a list entry.

[4]
If the -selectmode is “extended”, when the user drags the mouse pointer over the list entries, all the entries under the pointer will be highlighted. The user can also make disjointed selections using <Control-ButtonPress-1>. When the highlighted area is changed, the -browsecmd callback will be called with an undefined parameter. It is the responsibility of the -browsecmd callback to find out the exact highlighted selection in the HList. The -command callback will be called when the user double-clicks on a list entry.

[5]
Arrow key bindings: <Up> arrow key moves the anchor point to the item right on top of the current anchor item. <Down> arrow key moves the anchor point to the item right below the current anchor item. <Left> arrow key moves the anchor to the parent item of the current anchor item. <Right> moves the anchor to the first child of the current anchor item. If the current anchor item does not have any children, moves the anchor to the item right below the current anchor item.

EXAMPLE

This example demonstrates how to use an HList to store a file directory structure and respond to the user’s browse events:

use strict; use Tk; use Tk::Label; use Tk::HList; my $mw = MainWindow->new(); my $label = $mw->Label(-width=>15); my $hlist = $mw->HList( -itemtype => text, -separator => /, -selectmode => single, -browsecmd => sub { my $file = shift; $label->configure(-text=>$file); } ); foreach ( qw(/ /home /home/ioi /home/foo /usr /usr/lib) ) { $hlist->add($_, -text=>$_); } $hlist->pack; $label->pack; MainLoop;

BUGS

The fact that the display item at column 0 is implicitly associated with the whole entry is probably a design bug. This was done for backward compatibility purposes. The result is that there is a large overlap between the item method and the add, addchild, entrycget and entryconfigure methods. Whenever multiple columns exist, the programmer should use ONLY the item method to create and configure the display items in each column; the add, addchild, entrycget and entryconfigure should be used ONLY to create and configure entries.

KEYWORDS

Hierarchical Listbox

SEE ALSO

Tk::DItem

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2264 - Linux cli command mq_timedsend

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mq_timedsend and provides detailed information about the command mq_timedsend, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mq_timedsend.

NAME 🖥️ mq_timedsend 🖥️

send a message to a message queue

LIBRARY

Real-time library (librt, -lrt)

SYNOPSIS

#include <mqueue.h>
int mq_send(mqd_t mqdes, const char msg_ptr[.msg_len],
 size_t msg_len, unsigned int msg_prio);
#include <time.h>
#include <mqueue.h>
int mq_timedsend(mqd_t mqdes, const char msg_ptr[.msg_len],
 size_t msg_len, unsigned int msg_prio,
 const struct timespec *abs_timeout);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

mq_timedsend():

    _POSIX_C_SOURCE >= 200112L

DESCRIPTION

mq_send() adds the message pointed to by msg_ptr to the message queue referred to by the message queue descriptor mqdes. The msg_len argument specifies the length of the message pointed to by msg_ptr; this length must be less than or equal to the queue’s mq_msgsize attribute. Zero-length messages are allowed.

The msg_prio argument is a nonnegative integer that specifies the priority of this message. Messages are placed on the queue in decreasing order of priority, with newer messages of the same priority being placed after older messages with the same priority. See mq_overview(7) for details on the range for the message priority.

If the message queue is already full (i.e., the number of messages on the queue equals the queue’s mq_maxmsg attribute), then, by default, mq_send() blocks until sufficient space becomes available to allow the message to be queued, or until the call is interrupted by a signal handler. If the O_NONBLOCK flag is enabled for the message queue description, then the call instead fails immediately with the error EAGAIN.

mq_timedsend() behaves just like mq_send(), except that if the queue is full and the O_NONBLOCK flag is not enabled for the message queue description, then abs_timeout points to a structure which specifies how long the call will block. This value is an absolute timeout in seconds and nanoseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC), specified in a timespec(3) structure.

If the message queue is full, and the timeout has already expired by the time of the call, mq_timedsend() returns immediately.

RETURN VALUE

On success, mq_send() and mq_timedsend() return zero; on error, -1 is returned, with errno set to indicate the error.

ERRORS

EAGAIN
The queue was full, and the O_NONBLOCK flag was set for the message queue description referred to by mqdes.

EBADF
The descriptor specified in mqdes was invalid or not opened for writing.

EINTR
The call was interrupted by a signal handler; see signal(7).

EINVAL
The call would have blocked, and abs_timeout was invalid, either because tv_sec was less than zero, or because tv_nsec was less than zero or greater than 1000 million.

EMSGSIZE
msg_len was greater than the mq_msgsize attribute of the message queue.

ETIMEDOUT
The call timed out before a message could be transferred.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mq_send(), mq_timedsend()

Thread safetyMT-Safe

VERSIONS

On Linux, mq_timedsend() is a system call, and mq_send() is a library function layered on top of that system call.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

SEE ALSO

mq_close(3), mq_getattr(3), mq_notify(3), mq_open(3), mq_receive(3), mq_unlink(3), timespec(3), mq_overview(7), time(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2265 - Linux cli command Math_Random_ISAAC_XSpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Math_Random_ISAAC_XSpm and provides detailed information about the command Math_Random_ISAAC_XSpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Math_Random_ISAAC_XSpm.

NAME 🖥️ Math_Random_ISAAC_XSpm 🖥️

C implementation of the ISAAC PRNG algorithm

VERSION

version 1.004

SYNOPSIS

This module implements the same interface as Math::Random::ISAAC and can be used as a drop-in replacement. This is the recommended implementation of the module, based on Bob Jenkins’ reference implementation in C.

Selecting the backend to use manually really only has two uses:

  • If you are trying to avoid the small overhead incurred with dispatching method calls to the appropriate backend modules.

  • If you are testing the module for performance and wish to explicitly decide which module you would like to use.

Example code:

# With Math::Random::ISAAC my $rng = Math::Random::ISAAC->new(time); my $rand = $rng->rand(); # With Math::Random::ISAAC::XS my $rng = Math::Random::ISAAC::XS->new(time); my $rand = $rng->rand();

DESCRIPTION

See Math::Random::ISAAC for the full description.

METHODS

new

Math::Random::ISAAC::XS->new( @seeds )

Implements the interface as specified in Math::Random::ISAAC

rand

$rng->rand()

Implements the interface as specified in Math::Random::ISAAC

irand

$rng->irand()

Implements the interface as specified in Math::Random::ISAAC

SEE ALSO

Math::Random::ISAAC

1;

BUGS

Please report any bugs or feature requests on the bugtracker website http://rt.cpan.org/NoAuth/Bugs.html?Dist=Math-Random-ISAAC-XS

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR

Jonathan Yu <[email protected]>

COPYRIGHT AND LICENSE

Legally speaking, this package and its contents are:

Copyright (c) 2011 by Jonathan Yu <[email protected]>.

But this is really just a legal technicality that allows the author to offer this package under the public domain and also a variety of licensing options. For all intents and purposes, this is public domain software, which means you can do whatever you want with it.

The software is provided “AS IS”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2266 - Linux cli command IO_All_Pipepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_All_Pipepm and provides detailed information about the command IO_All_Pipepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_All_Pipepm.

NAME 🖥️ IO_All_Pipepm 🖥️

Pipe Support for IO::All

SYNOPSIS

See IO::All.

DESCRIPTION

<<<cpan-foot>>>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2267 - Linux cli command towupper

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command towupper and provides detailed information about the command towupper, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the towupper.

NAME 🖥️ towupper 🖥️

convert a wide character to uppercase

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wctype.h>
wint_t towupper(wint_t wc);
wint_t towupper_l(wint_t wc, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

towupper_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The towupper() function is the wide-character equivalent of the toupper(3) function. If wc is a lowercase wide character, and there exists an uppercase equivalent in the current locale, it returns the uppercase equivalent of wc. In all other cases, wc is returned unchanged.

The towupper_l() function performs the same task, but performs the conversion based on the character type information in the locale specified by locale. The behavior of towupper_l() is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The argument wc must be representable as a wchar_t and be a valid character in the locale or be the value WEOF.

RETURN VALUE

If wc was convertible to uppercase, towupper() returns its uppercase equivalent; otherwise it returns wc.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

towupper()

Thread safetyMT-Safe locale

towupper_l()

Thread safetyMT-Safe

STANDARDS

towupper()
C11, POSIX.1-2008 (XSI).

towupper_l()
POSIX.1-2008.

HISTORY

towupper()
C99, POSIX.1-2001 (XSI). Obsolete in POSIX.1-2008 (XSI).

towupper_l()
POSIX.1-2008. glibc 2.3.

NOTES

The behavior of these functions depends on the LC_CTYPE category of the locale.

These functions are not very appropriate for dealing with Unicode characters, because Unicode knows about three cases: upper, lower, and title case.

SEE ALSO

iswupper(3), towctrans(3), towlower(3), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2268 - Linux cli command Net_DNS_RR_X25pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_X25pm and provides detailed information about the command Net_DNS_RR_X25pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_X25pm.

NAME 🖥️ Net_DNS_RR_X25pm 🖥️

DNS X25 resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name X25 PSDNaddress);

DESCRIPTION

Class for DNS X25 resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

PSDNaddress

address

$address = $rr->address; $rr->address( $address );

The PSDN-address is a string of decimal digits, beginning with the 4 digit DNIC (Data Network Identification Code), as specified in X.121.

COPYRIGHT

Copyright (c)1997 Michael Fuhr.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC1183(3.1) <https://iana.org/go/rfc1183#section-3.1>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2269 - Linux cli command regexec

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command regexec and provides detailed information about the command regexec, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the regexec.

NAME 🖥️ regexec 🖥️

POSIX regex functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <regex.h>
int regcomp(regex_t *restrict preg, const char *restrict regex,
 int cflags);
int regexec(const regex_t *restrict preg",constchar*restrict"string,
 size_t nmatch, regmatch_t pmatch[_Nullable restrict .nmatch],
 int eflags);
size_t regerror(int errcode, const regex_t *_Nullable restrict preg,
 char errbuf[_Nullable restrict .errbuf_size],
 size_t errbuf_size);
void regfree(regex_t *preg);
typedef struct {
 size_t re_nsub;
} regex_t;
typedef struct {
 regoff_t rm_so;
 regoff_t rm_eo;
} regmatch_t;
typedef /* ... */ regoff_t;

DESCRIPTION

Compilation

regcomp() is used to compile a regular expression into a form that is suitable for subsequent regexec() searches.

On success, the pattern buffer at *preg is initialized. regex is a null-terminated string. The locale must be the same when running regexec().

After regcomp() succeeds, preg->re_nsub holds the number of subexpressions in regex. Thus, a value of preg->re_nsub + 1 passed as nmatch to regexec() is sufficient to capture all matches.

cflags is the bitwise OR of zero or more of the following:

REG_EXTENDED
Use POSIX Extended Regular Expression syntax when interpreting regex. If not set, POSIX Basic Regular Expression syntax is used.

REG_ICASE
Do not differentiate case. Subsequent regexec() searches using this pattern buffer will be case insensitive.

REG_NOSUB
Report only overall success. regexec() will use only pmatch for REG_STARTEND, ignoring nmatch.

REG_NEWLINE
Match-any-character operators don’t match a newline.

A nonmatching list ([^…]) not containing a newline does not match a newline.

Match-beginning-of-line operator (^) matches the empty string immediately after a newline, regardless of whether eflags, the execution flags of regexec(), contains REG_NOTBOL.

Match-end-of-line operator ($) matches the empty string immediately before a newline, regardless of whether eflags contains REG_NOTEOL.

Matching

regexec() is used to match a null-terminated string against the compiled pattern buffer in *preg, which must have been initialised with regexec(). eflags is the bitwise OR of zero or more of the following flags:

REG_NOTBOL
The match-beginning-of-line operator always fails to match (but see the compilation flag REG_NEWLINE above). This flag may be used when different portions of a string are passed to regexec() and the beginning of the string should not be interpreted as the beginning of the line.

REG_NOTEOL
The match-end-of-line operator always fails to match (but see the compilation flag REG_NEWLINE above).

REG_STARTEND
Match [string + pmatch[0].rm_so,* string + pmatch[0].rm_eo*) instead of [string,* string + strlen(string)*). This allows matching embedded NUL bytes and avoids a strlen(3) on known-length strings. If any matches are returned (REG_NOSUB wasn’t passed to regcomp(), the match succeeded, and nmatch > 0), they overwrite pmatch as usual, and the match offsets remain relative to string (not string + pmatch[0].rm_so). This flag is a BSD extension, not present in POSIX.

Match offsets

Unless REG_NOSUB was passed to regcomp(), it is possible to obtain the locations of matches within string: regexec() fills nmatch elements of pmatch with results: pmatch[0] corresponds to the entire match, pmatch[1] to the first subexpression, etc. If there were more matches than nmatch, they are discarded; if fewer, unused elements of pmatch are filled with -1s.

Each returned valid (non--1) match corresponds to the range [string + rm_so,* string + rm_eo*).

regoff_t is a signed integer type capable of storing the largest value that can be stored in either an ptrdiff_t type or a ssize_t type.

Error reporting

regerror() is used to turn the error codes that can be returned by both regcomp() and regexec() into error message strings.

If preg isn’t a null pointer, errcode must be the latest error returned from an operation on preg.

If errbuf_size isn’t 0, up to errbuf_size bytes are copied to errbuf; the error string is always null-terminated, and truncated to fit.

Freeing

regfree() deinitializes the pattern buffer at *preg, freeing any associated memory; *preg must have been initialized via regcomp().

RETURN VALUE

regcomp() returns zero for a successful compilation or an error code for failure.

regexec() returns zero for a successful match or REG_NOMATCH for failure.

regerror() returns the size of the buffer required to hold the string.

ERRORS

The following errors can be returned by regcomp():

REG_BADBR
Invalid use of back reference operator.

REG_BADPAT
Invalid use of pattern operators such as group or list.

REG_BADRPT
Invalid use of repetition operators such as using ‘*’ as the first character.

REG_EBRACE
Un-matched brace interval operators.

REG_EBRACK
Un-matched bracket list operators.

REG_ECOLLATE
Invalid collating element.

REG_ECTYPE
Unknown character class name.

REG_EEND
Nonspecific error. This is not defined by POSIX.

REG_EESCAPE
Trailing backslash.

REG_EPAREN
Un-matched parenthesis group operators.

REG_ERANGE
Invalid use of the range operator; for example, the ending point of the range occurs prior to the starting point.

REG_ESIZE
Compiled regular expression requires a pattern buffer larger than 64 kB. This is not defined by POSIX.

REG_ESPACE
The regex routines ran out of memory.

REG_ESUBREG
Invalid back reference to a subexpression.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

regcomp(), regexec()

Thread safetyMT-Safe locale

regerror()

Thread safetyMT-Safe env

regfree()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

Prior to POSIX.1-2008, regoff_t was required to be capable of storing the largest value that can be stored in either an off_t type or a ssize_t type.

CAVEATS

re_nsub is only required to be initialized if REG_NOSUB wasn’t specified, but all known implementations initialize it regardless.

Both regex_t and regmatch_t may (and do) have more members, in any order. Always reference them by name.

EXAMPLES

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <regex.h>
#define ARRAY_SIZE(arr) (sizeof((arr)) / sizeof((arr)[0]))
static const char *const str =
        "1) John Driverhacker;
  1. John Doe;
  2. John Foo; “; static const char *const re = “John.*o”; int main(void) { static const char *s = str; regex_t regex; regmatch_t pmatch[1]; regoff_t off, len; if (regcomp(&regex, re, REG_NEWLINE)) exit(EXIT_FAILURE); printf(“String = "%s" “, str); printf(“Matches: “); for (unsigned int i = 0; ; i++) { if (regexec(&regex, s, ARRAY_SIZE(pmatch), pmatch, 0)) break; off = pmatch[0].rm_so + (s - str); len = pmatch[0].rm_eo - pmatch[0].rm_so; printf(”#%zu: “, i); printf(“offset = %jd; length = %jd “, (intmax_t) off, (intmax_t) len); printf(“substring = "%.*s" “, len, s + pmatch[0].rm_so); s += pmatch[0].rm_eo; } exit(EXIT_SUCCESS); }

SEE ALSO

grep(1), regex(7)

The glibc manual section, Regular Expressions

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2270 - Linux cli command tmpnam_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tmpnam_r and provides detailed information about the command tmpnam_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tmpnam_r.

NAME 🖥️ tmpnam_r 🖥️

create a name for a temporary file

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
[[deprecated]] char *tmpnam(char *s);
[[deprecated]] char *tmpnam_r(char *s);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

tmpnam_r()

    Since glibc 2.19:
        _DEFAULT_SOURCE
    Up to and including glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

Note: avoid using these functions; use mkstemp(3) or tmpfile(3) instead.

The tmpnam() function returns a pointer to a string that is a valid filename, and such that a file with this name did not exist at some point in time, so that naive programmers may think it a suitable name for a temporary file. If the argument s is NULL, this name is generated in an internal static buffer and may be overwritten by the next call to tmpnam(). If s is not NULL, the name is copied to the character array (of length at least L_tmpnam) pointed to by s and the value s is returned in case of success.

The created pathname has a directory prefix P_tmpdir. (Both L_tmpnam and P_tmpdir are defined in <stdio.h>, just like the TMP_MAX mentioned below.)

The tmpnam_r() function performs the same task as tmpnam(), but returns NULL (to indicate an error) if s is NULL.

RETURN VALUE

These functions return a pointer to a unique temporary filename, or NULL if a unique name cannot be generated.

ERRORS

No errors are defined.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tmpnam()

Thread safetyMT-Unsafe race:tmpnam/!s

tmpnam_r()

Thread safetyMT-Safe

STANDARDS

tmpnam()
C11, POSIX.1-2008.

tmpnam_r()
None.

HISTORY

tmpnam()
SVr4, 4.3BSD, C89, POSIX.1-2001. Obsolete in POSIX.1-2008.

tmpnam_r()
Solaris.

NOTES

The tmpnam() function generates a different string each time it is called, up to TMP_MAX times. If it is called more than TMP_MAX times, the behavior is implementation defined.

Although these functions generate names that are difficult to guess, it is nevertheless possible that between the time that the pathname is returned and the time that the program opens it, another program might create that pathname using open(2), or create it as a symbolic link. This can lead to security holes. To avoid such possibilities, use the open(2) O_EXCL flag to open the pathname. Or better yet, use mkstemp(3) or tmpfile(3).

Portable applications that use threads cannot call tmpnam() with a NULL argument if either _POSIX_THREADS or _POSIX_THREAD_SAFE_FUNCTIONS is defined.

BUGS

Never use these functions. Use mkstemp(3) or tmpfile(3) instead.

SEE ALSO

mkstemp(3), mktemp(3), tempnam(3), tmpfile(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2271 - Linux cli command zip_file_set_mtime

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_file_set_mtime and provides detailed information about the command zip_file_set_mtime, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_file_set_mtime.

libzip (-lzip)

The

function sets the last modification time (mtime) for the file at position

in the zip archive to

Currently, no support for any

is implemented.

In the zip archive, the time and date are saved as two 16-bit integers. To set the values directly, call the

function. The values of the time bytes are defined as follows:

day of the month (1-31)

month (January = 1, February = 2, …)

year offset from 1980 (1980 = 0, 1981 = 1, …)

The values of the date bytes are defined as follows:

seconds divided by two (1-2 = 1, 3-4 = 2, …)

minute (0-59)

hour (0-23)

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

and

fail if:

is not a valid file index in

Required memory could not be allocated.

The

was opened in read-only mode.

was added in libzip 1.0.

was added in libzip 1.6.

and

Following historical practice, the

function translates the time from the zip archive into the local time zone. If you want to avoid this, use the

function instead.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2272 - Linux cli command Net_Server_INETpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Server_INETpm and provides detailed information about the command Net_Server_INETpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Server_INETpm.

NAME 🖥️ Net_Server_INETpm 🖥️

Net::Server personality

SYNOPSIS

use base qw(Net::Server::INET); sub process_request { #…code… } Net::Server::INET->run();

DESCRIPTION

Please read the pod on Net::Server first. This module is a personality, or extension, or sub class, of the Net::Server module.

This personality is intended for use with inetd. It offers no methods beyond the Net::Server base class. This module operates by overriding the pre_bind, bind, accept, and post_accept methods to let all socket processing to be done by inetd.

CONFIGURATION FILE

See Net::Server.

PROCESS FLOW

See Net::Server

HOOKS

There are no additional hooks in Net::Server::INET.

TO DO

See Net::Server

AUTHOR

Paul T. Seamons [email protected]

SEE ALSO

Please see also Net::Server::Fork, Net::Server::INET, Net::Server::PreFork, Net::Server::MultiType, Net::Server::Single

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2273 - Linux cli command pthread_attr_getdetachstate

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_attr_getdetachstate and provides detailed information about the command pthread_attr_getdetachstate, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_attr_getdetachstate.

NAME 🖥️ pthread_attr_getdetachstate 🖥️

set/get detach state attribute in thread attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_attr_setdetachstate(pthread_attr_t *attr",int"detachstate);
int pthread_attr_getdetachstate(const pthread_attr_t *attr,
 int *detachstate);

DESCRIPTION

The pthread_attr_setdetachstate() function sets the detach state attribute of the thread attributes object referred to by attr to the value specified in detachstate. The detach state attribute determines whether a thread created using the thread attributes object attr will be created in a joinable or a detached state.

The following values may be specified in detachstate:

PTHREAD_CREATE_DETACHED
Threads that are created using attr will be created in a detached state.

PTHREAD_CREATE_JOINABLE
Threads that are created using attr will be created in a joinable state.

The default setting of the detach state attribute in a newly initialized thread attributes object is PTHREAD_CREATE_JOINABLE.

The pthread_attr_getdetachstate() returns the detach state attribute of the thread attributes object attr in the buffer pointed to by detachstate.

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

pthread_attr_setdetachstate() can fail with the following error:

EINVAL
An invalid value was specified in detachstate.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_attr_setdetachstate(), pthread_attr_getdetachstate()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

See pthread_create(3) for more details on detached and joinable threads.

A thread that is created in a joinable state should eventually either be joined using pthread_join(3) or detached using pthread_detach(3); see pthread_create(3).

It is an error to specify the thread ID of a thread that was created in a detached state in a later call to pthread_detach(3) or pthread_join(3).

EXAMPLES

See pthread_attr_init(3).

SEE ALSO

pthread_attr_init(3), pthread_create(3), pthread_detach(3), pthread_join(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2274 - Linux cli command pthread_yield

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_yield and provides detailed information about the command pthread_yield, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_yield.

NAME 🖥️ pthread_yield 🖥️

yield the processor

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <pthread.h>
[[deprecated]] int pthread_yield(void);

DESCRIPTION

Note: This function is deprecated; see below.

pthread_yield() causes the calling thread to relinquish the CPU. The thread is placed at the end of the run queue for its static priority and another thread is scheduled to run. For further details, see sched_yield(2)

RETURN VALUE

On success, pthread_yield() returns 0; on error, it returns an error number.

ERRORS

On Linux, this call always succeeds (but portable and future-proof applications should nevertheless handle a possible error return).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_yield()

Thread safetyMT-Safe

VERSIONS

On Linux, this function is implemented as a call to sched_yield(2).

STANDARDS

None.

HISTORY

Deprecated since glibc 2.34. Use the standardized sched_yield(2) instead.

NOTES

pthread_yield() is intended for use with real-time scheduling policies (i.e., SCHED_FIFO or SCHED_RR). Use of pthread_yield() with nondeterministic scheduling policies such as SCHED_OTHER is unspecified and very likely means your application design is broken.

SEE ALSO

sched_yield(2), pthreads(7), sched(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2275 - Linux cli command gai_strerror

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gai_strerror and provides detailed information about the command gai_strerror, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gai_strerror.

NAME 🖥️ gai_strerror 🖥️

network address and service translation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
int getaddrinfo(const char *restrict node,
 const char *restrict service,
 const struct addrinfo *restrict hints,
 struct addrinfo **restrict res);
void freeaddrinfo(struct addrinfo *res);
const char *gai_strerror(int errcode);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getaddrinfo(), freeaddrinfo(), gai_strerror():

    Since glibc 2.22:
        _POSIX_C_SOURCE >= 200112L
    glibc 2.21 and earlier:
        _POSIX_C_SOURCE

DESCRIPTION

Given node and service, which identify an Internet host and a service, getaddrinfo() returns one or more addrinfo structures, each of which contains an Internet address that can be specified in a call to bind(2) or connect(2). The getaddrinfo() function combines the functionality provided by the gethostbyname(3) and getservbyname(3) functions into a single interface, but unlike the latter functions, getaddrinfo() is reentrant and allows programs to eliminate IPv4-versus-IPv6 dependencies.

The addrinfo structure used by getaddrinfo() contains the following fields:

struct addrinfo {
    int              ai_flags;
    int              ai_family;
    int              ai_socktype;
    int              ai_protocol;
    socklen_t        ai_addrlen;
    struct sockaddr *ai_addr;
    char            *ai_canonname;
    struct addrinfo *ai_next;
};

The hints argument points to an addrinfo structure that specifies criteria for selecting the socket address structures returned in the list pointed to by res. If hints is not NULL it points to an addrinfo structure whose ai_family, ai_socktype, and ai_protocol specify criteria that limit the set of socket addresses returned by getaddrinfo(), as follows:

ai_family
This field specifies the desired address family for the returned addresses. Valid values for this field include AF_INET and AF_INET6. The value AF_UNSPEC indicates that getaddrinfo() should return socket addresses for any address family (either IPv4 or IPv6, for example) that can be used with node and service.

ai_socktype
This field specifies the preferred socket type, for example SOCK_STREAM or SOCK_DGRAM. Specifying 0 in this field indicates that socket addresses of any type can be returned by getaddrinfo().

ai_protocol
This field specifies the protocol for the returned socket addresses. Specifying 0 in this field indicates that socket addresses with any protocol can be returned by getaddrinfo().

ai_flags
This field specifies additional options, described below. Multiple flags are specified by bitwise OR-ing them together.

All the other fields in the structure pointed to by hints must contain either 0 or a null pointer, as appropriate.

Specifying hints as NULL is equivalent to setting ai_socktype and ai_protocol to 0; ai_family to AF_UNSPEC; and ai_flags to (AI_V4MAPPED | AI_ADDRCONFIG). (POSIX specifies different defaults for ai_flags; see NOTES.) node specifies either a numerical network address (for IPv4, numbers-and-dots notation as supported by inet_aton(3); for IPv6, hexadecimal string format as supported by inet_pton(3)), or a network hostname, whose network addresses are looked up and resolved. If hints.ai_flags contains the AI_NUMERICHOST flag, then node must be a numerical network address. The AI_NUMERICHOST flag suppresses any potentially lengthy network host address lookups.

If the AI_PASSIVE flag is specified in hints.ai_flags, and node is NULL, then the returned socket addresses will be suitable for bind(2)ing a socket that will accept(2) connections. The returned socket address will contain the “wildcard address” (INADDR_ANY for IPv4 addresses, IN6ADDR_ANY_INIT for IPv6 address). The wildcard address is used by applications (typically servers) that intend to accept connections on any of the host’s network addresses. If node is not NULL, then the AI_PASSIVE flag is ignored.

If the AI_PASSIVE flag is not set in hints.ai_flags, then the returned socket addresses will be suitable for use with connect(2), sendto(2), or sendmsg(2). If node is NULL, then the network address will be set to the loopback interface address (INADDR_LOOPBACK for IPv4 addresses, IN6ADDR_LOOPBACK_INIT for IPv6 address); this is used by applications that intend to communicate with peers running on the same host.

service sets the port in each returned address structure. If this argument is a service name (see services(5)), it is translated to the corresponding port number. This argument can also be specified as a decimal number, which is simply converted to binary. If service is NULL, then the port number of the returned socket addresses will be left uninitialized. If AI_NUMERICSERV is specified in hints.ai_flags and service is not NULL, then service must point to a string containing a numeric port number. This flag is used to inhibit the invocation of a name resolution service in cases where it is known not to be required.

Either node or service, but not both, may be NULL.

The getaddrinfo() function allocates and initializes a linked list of addrinfo structures, one for each network address that matches node and service, subject to any restrictions imposed by hints, and returns a pointer to the start of the list in res. The items in the linked list are linked by the ai_next field.

There are several reasons why the linked list may have more than one addrinfo structure, including: the network host is multihomed, accessible over multiple protocols (e.g., both AF_INET and AF_INET6); or the same service is available from multiple socket types (one SOCK_STREAM address and another SOCK_DGRAM address, for example). Normally, the application should try using the addresses in the order in which they are returned. The sorting function used within getaddrinfo() is defined in RFC 3484; the order can be tweaked for a particular system by editing /etc/gai.conf (available since glibc 2.5).

If hints.ai_flags includes the AI_CANONNAME flag, then the ai_canonname field of the first of the addrinfo structures in the returned list is set to point to the official name of the host.

The remaining fields of each returned addrinfo structure are initialized as follows:

  • The ai_family, ai_socktype, and ai_protocol fields return the socket creation parameters (i.e., these fields have the same meaning as the corresponding arguments of socket(2)). For example, ai_family might return AF_INET or AF_INET6; ai_socktype might return SOCK_DGRAM or SOCK_STREAM; and ai_protocol returns the protocol for the socket.

  • A pointer to the socket address is placed in the ai_addr field, and the length of the socket address, in bytes, is placed in the ai_addrlen field.

If hints.ai_flags includes the AI_ADDRCONFIG flag, then IPv4 addresses are returned in the list pointed to by res only if the local system has at least one IPv4 address configured, and IPv6 addresses are returned only if the local system has at least one IPv6 address configured. The loopback address is not considered for this case as valid as a configured address. This flag is useful on, for example, IPv4-only systems, to ensure that getaddrinfo() does not return IPv6 socket addresses that would always fail in connect(2) or bind(2).

If hints.ai_flags specifies the AI_V4MAPPED flag, and hints.ai_family was specified as AF_INET6, and no matching IPv6 addresses could be found, then return IPv4-mapped IPv6 addresses in the list pointed to by res. If both AI_V4MAPPED and AI_ALL are specified in hints.ai_flags, then return both IPv6 and IPv4-mapped IPv6 addresses in the list pointed to by res. AI_ALL is ignored if AI_V4MAPPED is not also specified.

The freeaddrinfo() function frees the memory that was allocated for the dynamically allocated linked list res.

Extensions to getaddrinfo() for Internationalized Domain Names

Starting with glibc 2.3.4, getaddrinfo() has been extended to selectively allow the incoming and outgoing hostnames to be transparently converted to and from the Internationalized Domain Name (IDN) format (see RFC 3490, Internationalizing Domain Names in Applications (IDNA)). Four new flags are defined:

AI_IDN
If this flag is specified, then the node name given in node is converted to IDN format if necessary. The source encoding is that of the current locale.

If the input name contains non-ASCII characters, then the IDN encoding is used. Those parts of the node name (delimited by dots) that contain non-ASCII characters are encoded using ASCII Compatible Encoding (ACE) before being passed to the name resolution functions.

AI_CANONIDN
After a successful name lookup, and if the AI_CANONNAME flag was specified, getaddrinfo() will return the canonical name of the node corresponding to the addrinfo structure value passed back. The return value is an exact copy of the value returned by the name resolution function.

If the name is encoded using ACE, then it will contain the xn– prefix for one or more components of the name. To convert these components into a readable form the AI_CANONIDN flag can be passed in addition to AI_CANONNAME. The resulting string is encoded using the current locale’s encoding.

AI_IDN_ALLOW_UNASSIGNED
AI_IDN_USE_STD3_ASCII_RULES
Setting these flags will enable the IDNA_ALLOW_UNASSIGNED (allow unassigned Unicode code points) and IDNA_USE_STD3_ASCII_RULES (check output to make sure it is a STD3 conforming hostname) flags respectively to be used in the IDNA handling.

RETURN VALUE

getaddrinfo() returns 0 if it succeeds, or one of the following nonzero error codes:

EAI_ADDRFAMILY
The specified network host does not have any network addresses in the requested address family.

EAI_AGAIN
The name server returned a temporary failure indication. Try again later.

EAI_BADFLAGS
hints.ai_flags contains invalid flags; or, hints.ai_flags included AI_CANONNAME and node was NULL.

EAI_FAIL
The name server returned a permanent failure indication.

EAI_FAMILY
The requested address family is not supported.

EAI_MEMORY
Out of memory.

EAI_NODATA
The specified network host exists, but does not have any network addresses defined.

EAI_NONAME
The node or service is not known; or both node and service are NULL; or AI_NUMERICSERV was specified in hints.ai_flags and service was not a numeric port-number string.

EAI_SERVICE
The requested service is not available for the requested socket type. It may be available through another socket type. For example, this error could occur if service was “shell” (a service available only on stream sockets), and either hints.ai_protocol was IPPROTO_UDP, or hints.ai_socktype was SOCK_DGRAM; or the error could occur if service was not NULL, and hints.ai_socktype was SOCK_RAW (a socket type that does not support the concept of services).

EAI_SOCKTYPE
The requested socket type is not supported. This could occur, for example, if hints.ai_socktype and hints.ai_protocol are inconsistent (e.g., SOCK_DGRAM and IPPROTO_TCP, respectively).

EAI_SYSTEM
Other system error; errno is set to indicate the error.

The gai_strerror() function translates these error codes to a human readable string, suitable for error reporting.

FILES

/etc/gai.conf

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getaddrinfo()

Thread safetyMT-Safe env locale

freeaddrinfo(), gai_strerror()

Thread safetyMT-Safe

VERSIONS

According to POSIX.1, specifying hints as NULL should cause ai_flags to be assumed as 0. The GNU C library instead assumes a value of (AI_V4MAPPED | AI_ADDRCONFIG) for this case, since this value is considered an improvement on the specification.

STANDARDS

POSIX.1-2008.

getaddrinfo()
RFC 2553.

HISTORY

POSIX.1-2001.

AI_ADDRCONFIG
AI_ALL
AI_V4MAPPED
glibc 2.3.3.

AI_NUMERICSERV
glibc 2.3.4.

NOTES

getaddrinfo() supports the address**%**scope-id notation for specifying the IPv6 scope-ID.

EXAMPLES

The following programs demonstrate the use of getaddrinfo(), gai_strerror(), freeaddrinfo(), and getnameinfo(3). The programs are an echo server and client for UDP datagrams.

Server program

#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
#define BUF_SIZE 500
int
main(int argc, char *argv[])
{
    int                      sfd, s;
    char                     buf[BUF_SIZE];
    ssize_t                  nread;
    socklen_t                peer_addrlen;
    struct addrinfo          hints;
    struct addrinfo          *result, *rp;
    struct sockaddr_storage  peer_addr;
    if (argc != 2) {
        fprintf(stderr, "Usage: %s port

“, argv[0]); exit(EXIT_FAILURE); } memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 / hints.ai_socktype = SOCK_DGRAM; / Datagram socket / hints.ai_flags = AI_PASSIVE; / For wildcard IP address / hints.ai_protocol = 0; / Any protocol / hints.ai_canonname = NULL; hints.ai_addr = NULL; hints.ai_next = NULL; s = getaddrinfo(NULL, argv[1], &hints, &result); if (s != 0) { fprintf(stderr, “getaddrinfo: %s “, gai_strerror(s)); exit(EXIT_FAILURE); } / getaddrinfo() returns a list of address structures. Try each address until we successfully bind(2). If socket(2) (or bind(2)) fails, we (close the socket and) try the next address. / for (rp = result; rp != NULL; rp = rp->ai_next) { sfd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); if (sfd == -1) continue; if (bind(sfd, rp->ai_addr, rp->ai_addrlen) == 0) break; / Success / close(sfd); } freeaddrinfo(result); / No longer needed / if (rp == NULL) { / No address succeeded / fprintf(stderr, “Could not bind “); exit(EXIT_FAILURE); } / Read datagrams and echo them back to sender. */ for (;;) { char host[NI_MAXHOST], service[NI_MAXSERV]; peer_addrlen = sizeof(peer_addr); nread = recvfrom(sfd, buf, BUF_SIZE, 0, (struct sockaddr ) &peer_addr, &peer_addrlen); if (nread == -1) continue; / Ignore failed request */ s = getnameinfo((struct sockaddr *) &peer_addr, peer_addrlen, host, NI_MAXHOST, service, NI_MAXSERV, NI_NUMERICSERV); if (s == 0) printf(“Received %zd bytes from %s:%s “, nread, host, service); else fprintf(stderr, “getnameinfo: %s “, gai_strerror(s)); if (sendto(sfd, buf, nread, 0, (struct sockaddr *) &peer_addr, peer_addrlen) != nread) { fprintf(stderr, “Error sending response “); } } }

Client program

#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
#define BUF_SIZE 500
int
main(int argc, char *argv[])
{
    int              sfd, s;
    char             buf[BUF_SIZE];
    size_t           len;
    ssize_t          nread;
    struct addrinfo  hints;
    struct addrinfo  *result, *rp;
    if (argc < 3) {
        fprintf(stderr, "Usage: %s host port msg...

“, argv[0]); exit(EXIT_FAILURE); } /* Obtain address(es) matching host/port. / memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; / Allow IPv4 or IPv6 / hints.ai_socktype = SOCK_DGRAM; / Datagram socket / hints.ai_flags = 0; hints.ai_protocol = 0; / Any protocol / s = getaddrinfo(argv[1], argv[2], &hints, &result); if (s != 0) { fprintf(stderr, “getaddrinfo: %s “, gai_strerror(s)); exit(EXIT_FAILURE); } / getaddrinfo() returns a list of address structures. Try each address until we successfully connect(2). If socket(2) (or connect(2)) fails, we (close the socket and) try the next address. / for (rp = result; rp != NULL; rp = rp->ai_next) { sfd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); if (sfd == -1) continue; if (connect(sfd, rp->ai_addr, rp->ai_addrlen) != -1) break; / Success / close(sfd); } freeaddrinfo(result); / No longer needed / if (rp == NULL) { / No address succeeded / fprintf(stderr, “Could not connect “); exit(EXIT_FAILURE); } / Send remaining command-line arguments as separate datagrams, and read responses from server. / for (size_t j = 3; j < argc; j++) { len = strlen(argv[j]) + 1; / +1 for terminating null byte */ if (len > BUF_SIZE) { fprintf(stderr, “Ignoring long message in argument %zu “, j); continue; } if (write(sfd, argv[j], len) != len) { fprintf(stderr, “partial/failed write “); exit(EXIT_FAILURE); } nread = read(sfd, buf, BUF_SIZE); if (nread == -1) { perror(“read”); exit(EXIT_FAILURE); } printf(“Received %zd bytes: %s “, nread, buf); } exit(EXIT_SUCCESS); }

SEE ALSO

getaddrinfo_a(3), gethostbyname(3), getnameinfo(3), inet(3), gai.conf(5), hostname(7), ip(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2276 - Linux cli command stdin

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command stdin and provides detailed information about the command stdin, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the stdin.

NAME 🖥️ stdin 🖥️

standard I/O streams

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
extern FILE *stdin;
extern FILE *stdout;
extern FILE *stderr;

DESCRIPTION

Under normal circumstances every UNIX program has three streams opened for it when it starts up, one for input, one for output, and one for printing diagnostic or error messages. These are typically attached to the user’s terminal (see tty(4)) but might instead refer to files or other devices, depending on what the parent process chose to set up. (See also the “Redirection” section of sh(1).)

The input stream is referred to as “standard input”; the output stream is referred to as “standard output”; and the error stream is referred to as “standard error”. These terms are abbreviated to form the symbols used to refer to these files, namely stdin, stdout, and stderr.

Each of these symbols is a stdio(3) macro of type pointer to FILE, and can be used with functions like fprintf(3) or fread(3).

Since FILEs are a buffering wrapper around UNIX file descriptors, the same underlying files may also be accessed using the raw UNIX file interface, that is, the functions like read(2) and lseek(2).

On program startup, the integer file descriptors associated with the streams stdin, stdout, and stderr are 0, 1, and 2, respectively. The preprocessor symbols STDIN_FILENO, STDOUT_FILENO, and STDERR_FILENO are defined with these values in <unistd.h>. (Applying freopen(3) to one of these streams can change the file descriptor number associated with the stream.)

Note that mixing use of FILEs and raw file descriptors can produce unexpected results and should generally be avoided. (For the masochistic among you: POSIX.1, section 8.2.3, describes in detail how this interaction is supposed to work.) A general rule is that file descriptors are handled in the kernel, while stdio is just a library. This means for example, that after an exec(3), the child inherits all open file descriptors, but all old streams have become inaccessible.

Since the symbols stdin, stdout, and stderr are specified to be macros, assigning to them is nonportable. The standard streams can be made to refer to different files with help of the library function freopen(3), specially introduced to make it possible to reassign stdin, stdout, and stderr. The standard streams are closed by a call to exit(3) and by normal program termination.

STANDARDS

C11, POSIX.1-2008.

The standards also stipulate that these three streams shall be open at program startup.

HISTORY

C89, POSIX.1-2001.

NOTES

The stream stderr is unbuffered. The stream stdout is line-buffered when it points to a terminal. Partial lines will not appear until fflush(3) or exit(3) is called, or a newline is printed. This can produce unexpected results, especially with debugging output. The buffering mode of the standard streams (or any other stream) can be changed using the setbuf(3) or setvbuf(3) call. Note that in case stdin is associated with a terminal, there may also be input buffering in the terminal driver, entirely unrelated to stdio buffering. (Indeed, normally terminal input is line buffered in the kernel.) This kernel input handling can be modified using calls like tcsetattr(3); see also stty(1), and termios(3).

SEE ALSO

csh(1), sh(1), open(2), fopen(3), stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2277 - Linux cli command getprotoent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getprotoent and provides detailed information about the command getprotoent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getprotoent.

NAME 🖥️ getprotoent 🖥️

get protocol entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
struct protoent *getprotoent(void);
struct protoent *getprotobyname(const char *name);
struct protoent *getprotobynumber(int proto);
void setprotoent(int stayopen);
void endprotoent(void);

DESCRIPTION

The getprotoent() function reads the next entry from the protocols database (see protocols(5)) and returns a protoent structure containing the broken-out fields from the entry. A connection is opened to the database if necessary.

The getprotobyname() function returns a protoent structure for the entry from the database that matches the protocol name name. A connection is opened to the database if necessary.

The getprotobynumber() function returns a protoent structure for the entry from the database that matches the protocol number number. A connection is opened to the database if necessary.

The setprotoent() function opens a connection to the database, and sets the next entry to the first entry. If stayopen is nonzero, then the connection to the database will not be closed between calls to one of the getproto*() functions.

The endprotoent() function closes the connection to the database.

The protoent structure is defined in <netdb.h> as follows:

struct protoent {
    char  *p_name;       /* official protocol name */
    char **p_aliases;    /* alias list */
    int    p_proto;      /* protocol number */
}

The members of the protoent structure are:

p_name
The official name of the protocol.

p_aliases
A NULL-terminated list of alternative names for the protocol.

p_proto
The protocol number.

RETURN VALUE

The getprotoent(), getprotobyname(), and getprotobynumber() functions return a pointer to a statically allocated protoent structure, or a null pointer if an error occurs or the end of the file is reached.

FILES

/etc/protocols
protocol database file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getprotoent()

Thread safety

MT-Unsafe race:protoent race:protoentbuf locale

getprotobyname()

Thread safety

MT-Unsafe race:protobyname locale

getprotobynumber()

Thread safety

MT-Unsafe race:protobynumber locale

setprotoent(), endprotoent()

Thread safety

MT-Unsafe race:protoent locale

In the above table, protoent in race:protoent signifies that if any of the functions setprotoent(), getprotoent(), or endprotoent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, 4.3BSD.

SEE ALSO

getnetent(3), getprotoent_r(3), getservent(3), protocols(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2278 - Linux cli command XtCallCallbacks

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtCallCallbacks and provides detailed information about the command XtCallCallbacks, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtCallCallbacks.

NAME 🖥️ XtCallCallbacks 🖥️

process callbacks

SYNTAX

#include <X11/Intrinsic.h>

void XtCallCallbacks(Widget w, const char *callback_name, XtPointer call_data);

void XtCallCallbackList(Widget w, XtCallbackList callbacks, XtPointer call_data);

typedef enum {XtCallbackNoList, XtCallbackHasNone, XtCallbackHasSome} XtCallbackStatus;

XtCallbackStatus XtHasCallbacks(Widget w, const char *callback_name);

ARGUMENTS

callback_name
Specifies the callback list to be executed or checked.

call_data
Specifies a callback-list specific data value to pass to each of the callback procedure in the list.

callbacks
Specifies the callback list to be executed.

  1. Specifies the widget.

DESCRIPTION

The XtCallCallbacks function calls each procedure that is registered in the specified widget’s callback list.

If callbacks is not NULL, XtCallCallbackList calls each of the callback procedures in the list, passing client data and call_data. The callbacks parameter must specify the contents of a widget or object resource declared with representation type XtRCallback.

The XtHasCallbacks function first checks to see if the widget has a callback list identified by callback_name. If the callback list does not exist, XtHasCallbacks returns XtCallbackNoList. If the callback list exists but is empty, it returns XtCallbackHasNone. If the callback list exists and has at least one callback registered, it returns XtCallbackHasSome.

SEE ALSO

XtAddCallback(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2279 - Linux cli command int16_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command int16_ttype and provides detailed information about the command int16_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the int16_ttype.

NAME 🖥️ int16_ttype 🖥️

fixed-width basic integer types

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <stdint.h>
typedef /* ... */ int8_t;
typedef /* ... */ int16_t;
typedef /* ... */ int32_t;
typedef /* ... */ int64_t;
typedef /* ... */ uint8_t;
typedef /* ... */ uint16_t;
typedef /* ... */ uint32_t;
typedef /* ... */ uint64_t;
#define INT8_WIDTH 8
#define INT16_WIDTH 16
#define INT32_WIDTH 32
#define INT64_WIDTH 64
#define UINT8_WIDTH 8
#define UINT16_WIDTH 16
#define UINT32_WIDTH 32
#define UINT64_WIDTH 64
#define INT8_MAX /* 2**(INT8_WIDTH - 1) - 1 */
#define INT16_MAX /* 2**(INT16_WIDTH - 1) - 1 */
#define INT32_MAX /* 2**(INT32_WIDTH - 1) - 1 */
#define INT64_MAX /* 2**(INT64_WIDTH - 1) - 1 */
#define INT8_MIN /* - 2**(INT8_WIDTH - 1) */
#define INT16_MIN /* - 2**(INT16_WIDTH - 1) */
#define INT32_MIN /* - 2**(INT32_WIDTH - 1) */
#define INT64_MIN /* - 2**(INT64_WIDTH - 1) */
#define UINT8_MAX /* 2**INT8_WIDTH - 1 */
#define UINT16_MAX /* 2**INT16_WIDTH - 1 */
#define UINT32_MAX /* 2**INT32_WIDTH - 1 */
#define UINT64_MAX /* 2**INT64_WIDTH - 1 */
#define INT8_C(c) c ## /* ... */
#define INT16_C(c) c ## /* ... */
#define INT32_C(c) c ## /* ... */
#define INT64_C(c) c ## /* ... */
#define UINT8_C(c) c ## /* ... */
#define UINT16_C(c) c ## /* ... */
#define UINT32_C(c) c ## /* ... */
#define UINT64_C(c) c ## /* ... */

DESCRIPTION

intN*_t* are signed integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are be capable of storing values in the range [INTN**_MIN**, INTN**_MAX**], substituting N by the appropriate number.

uintN*_t* are unsigned integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are capable of storing values in the range [0, UINTN**_MAX**], substituting N by the appropriate number.

According to POSIX, [u]int8_t, [u]int16_t, and [u]int32_t are required; [u]int64_t are only required in implementations that provide integer types with width 64; and all other types of this form are optional.

The macros [U]INTN**_WIDTH** expand to the width in bits of these types (N).

The macros [U]INTN**_MAX** expand to the maximum value that these types can hold.

The macros INTN**_MIN** expand to the minimum value that these types can hold.

The macros [U]INTN**_C**() expand their argument to an integer constant of type [u]intN*_t*.

The length modifiers for the [u]intN*_t* types for the printf(3) family of functions are expanded by macros of the forms PRIdN, PRIiN, PRIuN, and PRIxN (defined in <inttypes.h>); resulting for example in %“PRId64” or %“PRIi64” for printing int64_t values. The length modifiers for the [u]intN*_t* types for the scanf(3) family of functions are expanded by macros of the forms SCNdN, SCNiN, SCNuN, and SCNxN, (defined in <inttypes.h>); resulting for example in %“SCNu8” or %“SCNx8” for scanning uint8_t values.

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The [U]INTN**_WIDTH** macros were added in C23.

NOTES

The following header also provides these types: <inttypes.h>. <arpa/inet.h> also provides uint16_t and uint32_t.

SEE ALSO

intmax_t(3type), intptr_t(3type), printf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2280 - Linux cli command Net_Server_Log_Log_Log4perlpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Server_Log_Log_Log4perlpm and provides detailed information about the command Net_Server_Log_Log_Log4perlpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Server_Log_Log_Log4perlpm.

NAME 🖥️ Net_Server_Log_Log_Log4perlpm 🖥️

log via Log4perl

SYNOPSIS

use base qw(Net::Server::PreFork); _ _PACKAGE_ _->run( log_file => Log::Log4perl, log4perl_conf => /path/to/my/log4perl.conf, log4perl_logger => myapp, );

DESCRIPTION

This module provides Log::Log4perl style logging to the Net::Server system.

CONFIGURATION

log_file
To begin using Log::Log4perl logging, simply set the Net::Server log_file configuration parameter to Log::Log4perl. If the magic name Log::Log4perl is used, all logging will be directed to the Log4perl system. If used, the log4perl_conf, log4perl_poll, log4perl_logger may also be defined.

log4perl_conf
Only available if log_file is equal to Log::Log4perl. This is the filename of the log4perl configuration file - see Log::Log4perl. If this is not set, will die on startup. If the file is not readable, will die.

log4perl_poll
If set to a value, will initialize with Log::Log4perl::init_and_watch with this polling value. This can also be the string HUP to re-read the log4perl_conf when a HUP signal is received. If set to 0, no polling is done. See Log::Log4perl for more details.

log4perl_logger
This is the facility name. Defaults to Net::Server.

DEFAULT ARGUMENTS FOR Net::Server

The following arguments are available in the default Net::Server or Net::Server::Single modules. (Other personalities may use additional parameters and may optionally not use parameters from the base class.)

Key Value Default ## log4perl parameters (if log_file eq Log::Log4perl) log4perl_conf “filename” will die if not set log4perl_poll number or HUP 0 (no polling) log4perl_logger “name” “Net::Server”

METHODS

“initialize”
This method is called during the initilize_logging method of Net::Server. It returns a single code ref that will be stored under the log_function property of the Net::Server object. That code ref takes log_level and message as arguments and calls the initialized log4perl system.

LICENCE

Distributed under the same terms as Net::Server

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2281 - Linux cli command __malloc_initialize_hook

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __malloc_initialize_hook and provides detailed information about the command __malloc_initialize_hook, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __malloc_initialize_hook.

NAME 🖥️ __malloc_initialize_hook 🖥️

malloc debugging variables (DEPRECATED)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <malloc.h>
void *(*volatile __malloc_hook)(size_t size, const void *caller);
void *(*volatile __realloc_hook)(void *ptr, size_t size,
 const void *caller);
void *(*volatile __memalign_hook)(size_t alignment, size_t size,
 const void *caller);
void (*volatile __free_hook)(void *ptr, const void *caller);
void (*__malloc_initialize_hook)(void);
void (*volatile __after_morecore_hook)(void);

DESCRIPTION

The GNU C library lets you modify the behavior of malloc(3), realloc(3), and free(3) by specifying appropriate hook functions. You can use these hooks to help you debug programs that use dynamic memory allocation, for example.

The variable __malloc_initialize_hook points at a function that is called once when the malloc implementation is initialized. This is a weak variable, so it can be overridden in the application with a definition like the following:

void (*__malloc_initialize_hook)(void) = my_init_hook;

Now the function my_init_hook() can do the initialization of all hooks.

The four functions pointed to by __malloc_hook, __realloc_hook, __memalign_hook, __free_hook have a prototype like the functions malloc(3), realloc(3), memalign(3), free(3), respectively, except that they have a final argument caller that gives the address of the caller of malloc(3), etc.

The variable __after_morecore_hook points at a function that is called each time after sbrk(2) was asked for more memory.

STANDARDS

GNU.

NOTES

The use of these hook functions is not safe in multithreaded programs, and they are now deprecated. From glibc 2.24 onwards, the __malloc_initialize_hook variable has been removed from the API, and from glibc 2.34 onwards, all the hook variables have been removed from the API. Programmers should instead preempt calls to the relevant functions by defining and exporting malloc(), free(), realloc(), and calloc().

EXAMPLES

Here is a short example of how to use these variables.

#include <stdio.h>
#include <malloc.h>
/* Prototypes for our hooks */
static void my_init_hook(void);
static void *my_malloc_hook(size_t, const void *);
/* Variables to save original hooks */
static void *(*old_malloc_hook)(size_t, const void *);
/* Override initializing hook from the C library */
void (*__malloc_initialize_hook)(void) = my_init_hook;
static void
my_init_hook(void)
{
    old_malloc_hook = __malloc_hook;
    __malloc_hook = my_malloc_hook;
}
static void *
my_malloc_hook(size_t size, const void *caller)
{
    void *result;
    /* Restore all old hooks */
    __malloc_hook = old_malloc_hook;
    /* Call recursively */
    result = malloc(size);
    /* Save underlying hooks */
    old_malloc_hook = __malloc_hook;
    /* printf() might call malloc(), so protect it too */
    printf("malloc(%zu) called from %p returns %p

“, size, caller, result); /* Restore our own hooks */ __malloc_hook = my_malloc_hook; return result; }

SEE ALSO

mallinfo(3), malloc(3), mcheck(3), mtrace(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2282 - Linux cli command Tk_messageBoxpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_messageBoxpm and provides detailed information about the command Tk_messageBoxpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_messageBoxpm.

NAME 🖥️ Tk_messageBoxpm 🖥️

pop up a message window and wait for user response.

SYNOPSIS

$response = $widget->messageBox(-option => value, … );

DESCRIPTION

This method uses Tk::Dialog to quickly create several common dialog boxes. A dialog widget consists of a message, an icon and a set of buttons (see the -type option). After the message window is popped up, messageBox waits for the user to select one of the buttons and return the button text (note that it’s best to check the returned value in a case insensitive manner). NOTE: unlike Tk::Dialog which creates its widget once and can be used many times, the messageBox window is created every time it’s used.

The following option/value pairs are supported:

-default
The case-sensitive symbolic name of the default button for this message window (‘Ok’, ‘Cancel’ and so on). See -type for a list of the symbolic names. If the message box has just one button it will automatically be made the default, otherwise if this option is not specified, there won’t be any default button.

-icon
Specifies an icon to display. On X11 any of the builtin Tk bitmaps can specified. On Windows only error, info, question or warning are supported.

-message
Specifies the message to display.

-title: Specifies a string to display as the title.

-type
Specifies a predefined set of buttons to be displayed. The following values are possible: ‘AbortRetryIgnore’, ‘Ok’, ‘OkCancel’, ‘RetryCancel’, ‘YesNo’ or ‘YesNoCancel’.

EXAMPLE

$response = $mw->messageBox(-icon => ‘question’, -message => ‘Hello World!’, -title => ‘My title’, -type => ‘AbortRetryIgnore’, -default => ‘Retry’);

AUTHOR

[email protected]. 98/05/25

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2283 - Linux cli command HTTP_Daemonpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTTP_Daemonpm and provides detailed information about the command HTTP_Daemonpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTTP_Daemonpm.

NAME 🖥️ HTTP_Daemonpm 🖥️

A simple http server class

VERSION

version 6.16

SYNOPSIS

use HTTP::Daemon; use HTTP::Status; my $d = HTTP::Daemon->new || die; print “Please contact me at: <URL:”, $d->url, “> “; while (my $c = $d->accept) { while (my $r = $c->get_request) { if ($r->method eq GET and $r->uri->path eq “/xyzzy”) { # remember, this is *not* recommended practice :-) $c->send_file_response("/etc/passwd”); } else { $c->send_error(RC_FORBIDDEN) } } $c->close; undef($c); }

DESCRIPTION

Instances of the HTTP::Daemon class are HTTP/1.1 servers that listen on a socket for incoming requests. The HTTP::Daemon is a subclass of IO::Socket::IP, so you can perform socket operations directly on it too.

Please note that HTTP::Daemon used to be a subclass of IO::Socket::INET. To support IPv6, it switched the parent class to IO::Socket::IP at version 6.05. See IPv6 SUPPORT for details.

The accept() method will return when a connection from a client is available. The returned value will be an HTTP::Daemon::ClientConn object which is another IO::Socket::IP subclass. Calling the get_request() method on this object will read data from the client and return an HTTP::Request object. The ClientConn object also provide methods to send back various responses.

This HTTP daemon does not fork (2) for you. Your application, i.e. the user of the HTTP::Daemon is responsible for forking if that is desirable. Also note that the user is responsible for generating responses that conform to the HTTP/1.1 protocol.

The following methods of HTTP::Daemon are new (or enhanced) relative to the IO::Socket::IP base class:

$d = HTTP::Daemon->new

$d = HTTP::Daemon->new( %opts )

The constructor method takes the same arguments as the IO::Socket::IP constructor, but unlike its base class it can also be called without any arguments. The daemon will then set up a listen queue of 5 connections and allocate some random port number. A server that wants to bind to some specific address on the standard HTTP port will be constructed like this: $d = HTTP::Daemon->new( LocalAddr => www.thisplace.com, LocalPort => 80, ); See IO::Socket::IP for a description of other arguments that can be used to configure the daemon during construction.

$c = $d->accept

$c = $d->accept( $pkg )

($c, $peer_addr) = $d->accept

This method works the same as the one provided by the base class, but it returns an HTTP::Daemon::ClientConn reference by default. If a package name is provided as argument, then the returned object will be blessed into the given class. It is probably a good idea to make that class a subclass of HTTP::Daemon::ClientConn. The accept method will return undef if timeouts have been enabled and no connection is made within the given time. The timeout() method is described in IO::Socket::IP. In list context both the client object and the peer address will be returned; see the description of the accept method of IO::Socket for details.

$d->url
Returns a URL string that can be used to access the server root.

$d->product_tokens
Returns the name that this server will use to identify itself. This is the string that is sent with the Server response header. The main reason to have this method is that subclasses can override it if they want to use another product name. The default is the string libwww-perl-daemon/#.## where #.## is replaced with the version number of this module.

The HTTP::Daemon::ClientConn is a subclass of IO::Socket::IP. Instances of this class are returned by the accept() method of HTTP::Daemon. The following methods are provided:

$c->get_request

$c->get_request( $headers_only )

This method reads data from the client and turns it into an HTTP::Request object which is returned. It returns undef if reading fails. If it fails, then the HTTP::Daemon::ClientConn object ($c) should be discarded, and you should not try to call this method again on it. The $c->reason method might give you some information about why $c->get_request failed. The get_request() method will normally not return until the whole request has been received from the client. This might not be what you want if the request is an upload of a large file (and with chunked transfer encoding HTTP can even support infinite request messages - uploading live audio for instance). If you pass a TRUE value as the $headers_only argument, then get_request() will return immediately after parsing the request headers and you are responsible for reading the rest of the request content. If you are going to call $c->get_request again on the same connection you better read the correct number of bytes.

$c->read_buffer

$c->read_buffer( $new_value )

Bytes read by $c->get_request, but not used are placed in the read buffer. The next time $c->get_request is called it will consume the bytes in this buffer before reading more data from the network connection itself. The read buffer is invalid after $c->get_request has failed. If you handle the reading of the request content yourself you need to empty this buffer before you read more and you need to place unconsumed bytes here. You also need this buffer if you implement services like 101 Switching Protocols. This method always returns the old buffer content and can optionally replace the buffer content if you pass it an argument.

$c->reason
When $c->get_request returns undef you can obtain a short string describing why it happened by calling $c->reason.

$c->proto_ge( $proto )
Return TRUE if the client announced a protocol with version number greater or equal to the given argument. The $proto argument can be a string like HTTP/1.1 or just 1.1.

$c->antique_client
Return TRUE if the client speaks the HTTP/0.9 protocol. No status code and no headers should be returned to such a client. This should be the same as !$c->proto_ge(HTTP/1.0).

$c->head_request
Return TRUE if the last request was a HEAD request. No content body must be generated for these requests.

$c->force_last_request
Make sure that $c->get_request will not try to read more requests off this connection. If you generate a response that is not self-delimiting, then you should signal this fact by calling this method. This attribute is turned on automatically if the client announces protocol HTTP/1.0 or worse and does not include a Connection: Keep-Alive header. It is also turned on automatically when HTTP/1.1 or better clients send the Connection: close request header.

$c->send_status_line

$c->send_status_line( $code )

$c->send_status_line( $code, $mess )

$c->send_status_line( $code, $mess, $proto )

Send the status line back to the client. If $code is omitted 200 is assumed. If $mess is omitted, then a message corresponding to $code is inserted. If $proto is missing the content of the $HTTP::Daemon::PROTO variable is used.

$c->send_crlf
Send the CRLF sequence to the client.

$c->send_basic_header

$c->send_basic_header( $code )

$c->send_basic_header( $code, $mess )

$c->send_basic_header( $code, $mess, $proto )

Send the status line and the Date: and Server: headers back to the client. This header is assumed to be continued and does not end with an empty CRLF line. See the description of send_status_line() for the description of the accepted arguments.

$c->send_header( $field, $value )

$c->send_header( $field1, $value1, $field2, $value2, … )

Send one or more header lines.

$c->send_response( $res )
Write an HTTP::Response object to the client as a response. We try hard to make sure that the response is self-delimiting so that the connection can stay persistent for further request/response exchanges. The content attribute of the HTTP::Response object can be a normal string or a subroutine reference. If it is a subroutine, then whatever this callback routine returns is written back to the client as the response content. The routine will be called until it returns an undefined or empty value. If the client is HTTP/1.1 aware then we will use chunked transfer encoding for the response.

$c->send_redirect( $loc )

$c->send_redirect( $loc, $code )

$c->send_redirect( $loc, $code, $entity_body )

Send a redirect response back to the client. The location ($loc) can be an absolute or relative URL. The $code must be one of the redirect status codes, and defaults to 301 Moved Permanently

$c->send_error

$c->send_error( $code )

$c->send_error( $code, $error_message )

Send an error response back to the client. If the $code is missing a Bad Request error is reported. The $error_message is a string that is incorporated in the body of the HTML entity.

$c->send_file_response( $filename )
Send back a response with the specified $filename as content. If the file is a directory we try to generate an HTML index of it.

$c->send_file( $filename )

$c->send_file( $fd )

Copy the file to the client. The file can be a string (which will be interpreted as a filename) or a reference to an IO::Handle or glob.

$c->daemon
Return a reference to the corresponding HTTP::Daemon object.

IPv6 SUPPORT

Since version 6.05, HTTP::Daemon is a subclass of IO::Socket::IP rather than IO::Socket::INET, so that it supports IPv6.

For some reasons, you may want to force HTTP::Daemon to listen on IPv4 addresses only. Then pass Family argument to HTTP::Daemon->new:

use HTTP::Daemon; use Socket AF_INET; my $d = HTTP::Daemon->new(Family => AF_INET);

SEE ALSO

RFC 2616

IO::Socket::IP, IO::Socket

SUPPORT

Bugs may be submitted through <https://github.com/libwww-perl/HTTP-Daemon/issues>.

There is also a mailing list available for users of this distribution, at <mailto:[email protected]>.

There is also an irc channel available for users of this distribution, at #lwp on irc.perl.org <irc://irc.perl.org/#lwp>.

AUTHOR

Gisle Aas <[email protected]>

CONTRIBUTORS

COPYRIGHT AND LICENCE

This software is copyright (c) 1995 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2284 - Linux cli command iconv

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command iconv and provides detailed information about the command iconv, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the iconv.

NAME 🖥️ iconv 🖥️

perform character set conversion

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <iconv.h>
size_t iconv(iconv_t cd,
 char **restrict inbuf, size_t *restrict inbytesleft,
 char **restrict outbuf, size_t *restrict outbytesleft);

DESCRIPTION

The iconv() function converts a sequence of characters in one character encoding to a sequence of characters in another character encoding. The cd argument is a conversion descriptor, previously created by a call to iconv_open(3); the conversion descriptor defines the character encodings that iconv() uses for the conversion. The inbuf argument is the address of a variable that points to the first character of the input sequence; inbytesleft indicates the number of bytes in that buffer. The outbuf argument is the address of a variable that points to the first byte available in the output buffer; outbytesleft indicates the number of bytes available in the output buffer.

The main case is when inbuf is not NULL and *inbuf is not NULL. In this case, the iconv() function converts the multibyte sequence starting at *inbuf to a multibyte sequence starting at *outbuf. At most *inbytesleft bytes, starting at *inbuf, will be read. At most *outbytesleft bytes, starting at *outbuf, will be written.

The iconv() function converts one multibyte character at a time, and for each character conversion it increments *inbuf and decrements *inbytesleft by the number of converted input bytes, it increments *outbuf and decrements *outbytesleft by the number of converted output bytes, and it updates the conversion state contained in cd. If the character encoding of the input is stateful, the iconv() function can also convert a sequence of input bytes to an update to the conversion state without producing any output bytes; such input is called a shift sequence. The conversion can stop for five reasons:

  • An invalid multibyte sequence is encountered in the input. In this case, it sets errno to EILSEQ and returns (size_t) -1. *inbuf is left pointing to the beginning of the invalid multibyte sequence.

  • A multibyte sequence is encountered that is valid but that cannot be translated to the character encoding of the output. This condition depends on the implementation and on the conversion descriptor. In the GNU C library and GNU libiconv, if cd was created without the suffix //TRANSLIT or //IGNORE, the conversion is strict: lossy conversions produce this condition. If the suffix //TRANSLIT was specified, transliteration can avoid this condition in some cases. In the musl C library, this condition cannot occur because a conversion to ’*’ is used as a fallback. In the FreeBSD, NetBSD, and Solaris implementations of iconv(), this condition cannot occur either, because a conversion to ’?’ is used as a fallback. When this condition is met, iconv() sets errno to EILSEQ and returns (size_t) -1. *inbuf is left pointing to the beginning of the unconvertible multibyte sequence.

  • The input byte sequence has been entirely converted, that is, *inbytesleft has gone down to 0. In this case, iconv() returns the number of nonreversible conversions performed during this call.

  • An incomplete multibyte sequence is encountered in the input, and the input byte sequence terminates after it. In this case, it sets errno to EINVAL and returns (size_t) -1. *inbuf is left pointing to the beginning of the incomplete multibyte sequence.

  • The output buffer has no more room for the next converted character. In this case, it sets errno to E2BIG and returns (size_t) -1.

A different case is when inbuf is NULL or *inbuf is NULL, but outbuf is not NULL and *outbuf is not NULL. In this case, the iconv() function attempts to set cd’s conversion state to the initial state and store a corresponding shift sequence at *outbuf. At most *outbytesleft bytes, starting at *outbuf, will be written. If the output buffer has no more room for this reset sequence, it sets errno to E2BIG and returns (size_t) -1. Otherwise, it increments *outbuf and decrements *outbytesleft by the number of bytes written.

A third case is when inbuf is NULL or *inbuf is NULL, and outbuf is NULL or *outbuf is NULL. In this case, the iconv() function sets cd’s conversion state to the initial state.

RETURN VALUE

The iconv() function returns the number of characters converted in a nonreversible way during this call; reversible conversions are not counted. In case of error, iconv() returns (size_t) -1 and sets errno to indicate the error.

ERRORS

The following errors can occur, among others:

E2BIG
There is not sufficient room at *outbuf.

EILSEQ
An invalid multibyte sequence has been encountered in the input.

EINVAL
An incomplete multibyte sequence has been encountered in the input.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

iconv()

Thread safetyMT-Safe race:cd

The iconv() function is MT-Safe, as long as callers arrange for mutual exclusion on the cd argument.

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.1. POSIX.1-2001.

NOTES

In each series of calls to iconv(), the last should be one with inbuf or *inbuf equal to NULL, in order to flush out any partially converted input.

Although inbuf and outbuf are typed as char **, this does not mean that the objects they point can be interpreted as C strings or as arrays of characters: the interpretation of character byte sequences is handled internally by the conversion functions. In some encodings, a zero byte may be a valid part of a multibyte character.

The caller of iconv() must ensure that the pointers passed to the function are suitable for accessing characters in the appropriate character set. This includes ensuring correct alignment on platforms that have tight restrictions on alignment.

SEE ALSO

iconv_close(3), iconv_open(3), iconvconfig(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2285 - Linux cli command Image_ExifTool_LNKpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_LNKpm and provides detailed information about the command Image_ExifTool_LNKpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_LNKpm.

NAME 🖥️ Image_ExifTool_LNKpm 🖥️

Read MS Shell Link (.LNK) meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to extract meta information MS Shell Link (Windows shortcut) files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://msdn.microsoft.com/en-us/library/dd871305(PROT.10).aspx>

<http://www.i2s-lab.com/Papers/The_Windows_Shortcut_File_Format.pdf>

SEE ALSO

“LNK Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2286 - Linux cli command Moose_Cookbook_Extending_Debugging_BaseClassRolepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Extending_Debugging_BaseClassRolepm and provides detailed information about the command Moose_Cookbook_Extending_Debugging_BaseClassRolepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Extending_Debugging_BaseClassRolepm.

NAME 🖥️ Moose_Cookbook_Extending_Debugging_BaseClassRolepm 🖥️

Providing a role for the base object class

VERSION

version 2.2207

SYNOPSIS

package MooseX::Debugging; use Moose::Exporter; Moose::Exporter->setup_import_methods( base_class_roles => [MooseX::Debugging::Role::Object], ); package MooseX::Debugging::Role::Object; use Moose::Role; sub BUILD {} after BUILD => sub { my $self = shift; warn “Made a new " . ( ref $self ) . " object “; };

DESCRIPTION

In this example, we provide a role for the base object class that adds some simple debugging output. Every time an object is created, it spits out a warning saying what type of object it was.

Obviously, a real debugging role would do something more interesting, but this recipe is all about how we apply that role.

In this case, with the combination of Moose::Exporter and Moose::Util::MetaRole, we ensure that when a module does use MooseX::Debugging, it automatically gets the debugging role applied to its base object class.

There are a few pieces of code worth looking at more closely.

Moose::Exporter->setup_import_methods( base_class_roles => [MooseX::Debugging::Role::Object], );

This creates an import method in the MooseX::Debugging package. Since we are not actually exporting anything, we do not pass setup_import_methods any parameters related to exports, but we need to have an import method to ensure that our init_meta method is called. The init_meta is created by setup_import_methods for us, since we passed the base_class_roles parameter. The generated init_meta will in turn call Moose::Util::MetaRole::apply_base_class_roles.

sub BUILD {} after BUILD => sub { … };

Due to the way role composition currently works, if the class that a role is composed into contains a BUILD method, then that will override the BUILD method in any roles it composes, which is typically not what you want. Using a method modifier on BUILD avoids this issue, since method modifiers compose together rather than being overridden. Method modifiers require that a method exists in order to wrap, however, so we also provide a stub method to wrap if no BUILD method exists in the class.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2287 - Linux cli command pcap_initpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_initpcap and provides detailed information about the command pcap_initpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_initpcap.

NAME 🖥️ pcap_initpcap 🖥️

initialize the library

SYNOPSIS

#include <pcap/pcap.h>
char errbuf[PCAP_ERRBUF_SIZE];
int pcap_init(unsigned int opts, char *errbuf);

DESCRIPTION

pcap_init() is used to initialize the Packet Capture library. opts specifies options for the library; currently, the options are:

PCAP_CHAR_ENC_LOCAL
Treat all strings supplied as arguments, and return all strings to the caller, as being in the local character encoding.

PCAP_CHAR_ENC_UTF_8
Treat all strings supplied as arguments, and return all strings to the caller, as being in UTF-8.

On UNIX-like systems, the local character encoding is assumed to be UTF-8, so no character encoding transformations are done.

On Windows, the local character encoding is the local ANSI code page.

If pcap_init() is not called, strings are treated as being in the local ANSI code page on Windows, pcap_lookupdev(3PCAP) will succeed if there is a device on which to capture, and pcap_create(3PCAP) makes an attempt to check whether the string passed as an argument is a UTF-16LE string - note that this attempt is unsafe, as it may run past the end of the string - to handle pcap_lookupdev() returning a UTF-16LE string. Programs that don’t call pcap_init() should, on Windows, call pcap_wsockinit() to initialize Winsock; this is not necessary if pcap_init() is called, as pcap_init() will initialize Winsock itself on Windows.

RETURN VALUE

pcap_init() returns 0 on success and PCAP_ERROR on failure. If PCAP_ERROR is returned, errbuf is filled in with an appropriate error message. errbuf is assumed to be able to hold at least PCAP_ERRBUF_SIZE chars.

BACKWARD COMPATIBILITY

This function became available in libpcap release 1.9.0. In previous releases, on Windows, all strings supplied as arguments, and all strings returned to the caller, are in the local character encoding.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2288 - Linux cli command regoff_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command regoff_ttype and provides detailed information about the command regoff_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the regoff_ttype.

NAME 🖥️ regoff_ttype 🖥️

POSIX regex functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <regex.h>
int regcomp(regex_t *restrict preg, const char *restrict regex,
 int cflags);
int regexec(const regex_t *restrict preg",constchar*restrict"string,
 size_t nmatch, regmatch_t pmatch[_Nullable restrict .nmatch],
 int eflags);
size_t regerror(int errcode, const regex_t *_Nullable restrict preg,
 char errbuf[_Nullable restrict .errbuf_size],
 size_t errbuf_size);
void regfree(regex_t *preg);
typedef struct {
 size_t re_nsub;
} regex_t;
typedef struct {
 regoff_t rm_so;
 regoff_t rm_eo;
} regmatch_t;
typedef /* ... */ regoff_t;

DESCRIPTION

Compilation

regcomp() is used to compile a regular expression into a form that is suitable for subsequent regexec() searches.

On success, the pattern buffer at *preg is initialized. regex is a null-terminated string. The locale must be the same when running regexec().

After regcomp() succeeds, preg->re_nsub holds the number of subexpressions in regex. Thus, a value of preg->re_nsub + 1 passed as nmatch to regexec() is sufficient to capture all matches.

cflags is the bitwise OR of zero or more of the following:

REG_EXTENDED
Use POSIX Extended Regular Expression syntax when interpreting regex. If not set, POSIX Basic Regular Expression syntax is used.

REG_ICASE
Do not differentiate case. Subsequent regexec() searches using this pattern buffer will be case insensitive.

REG_NOSUB
Report only overall success. regexec() will use only pmatch for REG_STARTEND, ignoring nmatch.

REG_NEWLINE
Match-any-character operators don’t match a newline.

A nonmatching list ([^…]) not containing a newline does not match a newline.

Match-beginning-of-line operator (^) matches the empty string immediately after a newline, regardless of whether eflags, the execution flags of regexec(), contains REG_NOTBOL.

Match-end-of-line operator ($) matches the empty string immediately before a newline, regardless of whether eflags contains REG_NOTEOL.

Matching

regexec() is used to match a null-terminated string against the compiled pattern buffer in *preg, which must have been initialised with regexec(). eflags is the bitwise OR of zero or more of the following flags:

REG_NOTBOL
The match-beginning-of-line operator always fails to match (but see the compilation flag REG_NEWLINE above). This flag may be used when different portions of a string are passed to regexec() and the beginning of the string should not be interpreted as the beginning of the line.

REG_NOTEOL
The match-end-of-line operator always fails to match (but see the compilation flag REG_NEWLINE above).

REG_STARTEND
Match [string + pmatch[0].rm_so,* string + pmatch[0].rm_eo*) instead of [string,* string + strlen(string)*). This allows matching embedded NUL bytes and avoids a strlen(3) on known-length strings. If any matches are returned (REG_NOSUB wasn’t passed to regcomp(), the match succeeded, and nmatch > 0), they overwrite pmatch as usual, and the match offsets remain relative to string (not string + pmatch[0].rm_so). This flag is a BSD extension, not present in POSIX.

Match offsets

Unless REG_NOSUB was passed to regcomp(), it is possible to obtain the locations of matches within string: regexec() fills nmatch elements of pmatch with results: pmatch[0] corresponds to the entire match, pmatch[1] to the first subexpression, etc. If there were more matches than nmatch, they are discarded; if fewer, unused elements of pmatch are filled with -1s.

Each returned valid (non--1) match corresponds to the range [string + rm_so,* string + rm_eo*).

regoff_t is a signed integer type capable of storing the largest value that can be stored in either an ptrdiff_t type or a ssize_t type.

Error reporting

regerror() is used to turn the error codes that can be returned by both regcomp() and regexec() into error message strings.

If preg isn’t a null pointer, errcode must be the latest error returned from an operation on preg.

If errbuf_size isn’t 0, up to errbuf_size bytes are copied to errbuf; the error string is always null-terminated, and truncated to fit.

Freeing

regfree() deinitializes the pattern buffer at *preg, freeing any associated memory; *preg must have been initialized via regcomp().

RETURN VALUE

regcomp() returns zero for a successful compilation or an error code for failure.

regexec() returns zero for a successful match or REG_NOMATCH for failure.

regerror() returns the size of the buffer required to hold the string.

ERRORS

The following errors can be returned by regcomp():

REG_BADBR
Invalid use of back reference operator.

REG_BADPAT
Invalid use of pattern operators such as group or list.

REG_BADRPT
Invalid use of repetition operators such as using ‘*’ as the first character.

REG_EBRACE
Un-matched brace interval operators.

REG_EBRACK
Un-matched bracket list operators.

REG_ECOLLATE
Invalid collating element.

REG_ECTYPE
Unknown character class name.

REG_EEND
Nonspecific error. This is not defined by POSIX.

REG_EESCAPE
Trailing backslash.

REG_EPAREN
Un-matched parenthesis group operators.

REG_ERANGE
Invalid use of the range operator; for example, the ending point of the range occurs prior to the starting point.

REG_ESIZE
Compiled regular expression requires a pattern buffer larger than 64 kB. This is not defined by POSIX.

REG_ESPACE
The regex routines ran out of memory.

REG_ESUBREG
Invalid back reference to a subexpression.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

regcomp(), regexec()

Thread safetyMT-Safe locale

regerror()

Thread safetyMT-Safe env

regfree()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

Prior to POSIX.1-2008, regoff_t was required to be capable of storing the largest value that can be stored in either an off_t type or a ssize_t type.

CAVEATS

re_nsub is only required to be initialized if REG_NOSUB wasn’t specified, but all known implementations initialize it regardless.

Both regex_t and regmatch_t may (and do) have more members, in any order. Always reference them by name.

EXAMPLES

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <regex.h>
#define ARRAY_SIZE(arr) (sizeof((arr)) / sizeof((arr)[0]))
static const char *const str =
        "1) John Driverhacker;
  1. John Doe;
  2. John Foo; “; static const char *const re = “John.*o”; int main(void) { static const char *s = str; regex_t regex; regmatch_t pmatch[1]; regoff_t off, len; if (regcomp(&regex, re, REG_NEWLINE)) exit(EXIT_FAILURE); printf(“String = "%s" “, str); printf(“Matches: “); for (unsigned int i = 0; ; i++) { if (regexec(&regex, s, ARRAY_SIZE(pmatch), pmatch, 0)) break; off = pmatch[0].rm_so + (s - str); len = pmatch[0].rm_eo - pmatch[0].rm_so; printf(”#%zu: “, i); printf(“offset = %jd; length = %jd “, (intmax_t) off, (intmax_t) len); printf(“substring = "%.*s" “, len, s + pmatch[0].rm_so); s += pmatch[0].rm_eo; } exit(EXIT_SUCCESS); }

SEE ALSO

grep(1), regex(7)

The glibc manual section, Regular Expressions

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2289 - Linux cli command strnlen

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strnlen and provides detailed information about the command strnlen, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strnlen.

NAME 🖥️ strnlen 🖥️

determine the length of a fixed-size string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
size_t strnlen(const char s[.maxlen], size_t maxlen);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strnlen():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The strnlen() function returns the number of bytes in the string pointed to by s, excluding the terminating null byte (‘�’), but at most maxlen. In doing this, strnlen() looks only at the first maxlen characters in the string pointed to by s and never beyond s[maxlen-1].

RETURN VALUE

The strnlen() function returns strlen(s), if that is less than maxlen, or maxlen if there is no null terminating (‘�’) among the first maxlen characters pointed to by s.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strnlen()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2008.

SEE ALSO

strlen(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2290 - Linux cli command File_Find_Rule_Proceduralpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command File_Find_Rule_Proceduralpm and provides detailed information about the command File_Find_Rule_Proceduralpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the File_Find_Rule_Proceduralpm.

NAME 🖥️ File_Find_Rule_Proceduralpm 🖥️

File::Find::Rule’s procedural interface

SYNOPSIS

use File::Find::Rule; # find all .pm files, procedurally my @files = find(file => name => *.pm, in => \INC);

DESCRIPTION

In addition to the regular object-oriented interface, File::Find::Rule provides two subroutines for you to use.

“find( @clauses )”

“rule( @clauses )”

find and rule can be used to invoke any methods available to the OO version. rule is a synonym for find

Passing more than one value to a clause is done with an anonymous array:

my $finder = find( name => [ *.mp3, *.ogg ] );

find and rule both return a File::Find::Rule instance, unless one of the arguments is in, in which case it returns a list of things that match the rule.

my @files = find( name => [ *.mp3, *.ogg ], in => $ENV{HOME} );

Please note that in will be the last clause evaluated, and so this code will search for mp3s regardless of size.

my @files = find( name => *.mp3, in => $ENV{HOME}, size => <2k ); ^ | Clause processing stopped here ——/

It is also possible to invert a single rule by prefixing it with ! like so:

# large files that arent videos my @files = find( file => !name => [ *.avi, *.mov ], size => >20M, in => $ENV{HOME} );

AUTHOR

Richard Clamp <[email protected]>

COPYRIGHT

Copyright (C) 2003 Richard Clamp. All Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

File::Find::Rule

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2291 - Linux cli command xdr_replymsg

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_replymsg and provides detailed information about the command xdr_replymsg, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_replymsg.

NAME 🖥️ xdr_replymsg 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2292 - Linux cli command pcap_perrorpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_perrorpcap and provides detailed information about the command pcap_perrorpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_perrorpcap.

NAME 🖥️ pcap_perrorpcap 🖥️

get or print libpcap error message text

SYNOPSIS

#include <pcap/pcap.h>
char *pcap_geterr(pcap_t *p);
void pcap_perror(pcap_t *p, const char *prefix);

DESCRIPTION

pcap_geterr() returns the error text pertaining to the last pcap library error. NOTE: the pointer it returns will no longer point to a valid error message string after the pcap_t passed to it is closed; you must use or copy the string before closing the pcap_t.

pcap_perror() prints the text of the last pcap library error on stderr, prefixed by prefix.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2293 - Linux cli command libnftables

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command libnftables and provides detailed information about the command libnftables, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the libnftables.

NAME 🖥️ libnftables 🖥️

nftables frontend library

SYNOPSIS

#include <nftables/libnftables.h>

struct nft_ctx *nft_ctx_new(uint32_t flags);
void nft_ctx_free(struct nft_ctx *ctx);

bool nft_ctx_get_dry_run(struct nft_ctx *ctx);
void nft_ctx_set_dry_run(struct nft_ctx *ctx, bool dry);

unsigned int nft_ctx_input_get_flags(struct nft_ctx *ctx);
unsigned int nft_ctx_input_set_flags(struct nft_ctx *ctx, unsigned int flags);

unsigned int nft_ctx_output_get_flags(struct nft_ctx *ctx);
void nft_ctx_output_set_flags(struct nft_ctx *ctx, unsigned int flags);

unsigned int nft_ctx_output_get_debug(struct nft_ctx *ctx);
void nft_ctx_output_set_debug(struct nft_ctx *ctx, unsigned int mask);

FILE *nft_ctx_set_output(struct nft_ctx *ctx, FILE *fp);
int nft_ctx_buffer_output(struct nft_ctx *ctx);
int nft_ctx_unbuffer_output(struct nft_ctx *ctx);
const char *nft_ctx_get_output_buffer(struct nft_ctx *ctx);

FILE *nft_ctx_set_error(struct nft_ctx *ctx, FILE *fp);
int nft_ctx_buffer_error(struct nft_ctx *ctx);
int nft_ctx_unbuffer_error(struct nft_ctx *ctx);
const char *nft_ctx_get_error_buffer(struct nft_ctx *ctx);

int nft_ctx_add_include_path(struct nft_ctx *ctx, const char *path);
void nft_ctx_clear_include_paths(struct nft_ctx *ctx);

int nft_ctx_add_var(struct nft_ctx *ctx, const char *var);
void nft_ctx_clear_vars(struct nft_ctx \*ctx);

int nft_run_cmd_from_buffer(struct nft_ctx* *nft, const char *buf);
int nft_run_cmd_from_filename(struct nft_ctx *nft,
                              const char *filename);

Link with -lnftables.

DESCRIPTION

This library was designed with nftables integration into applications in mind. Its API is therefore kept as simple as possible, which somewhat limits its flexibility. Due to support for JSON markup of input and output though, convenience in constructing and parsing of input and output data may be achieved by using a third-party library such as libjansson.

At the very basic level, one has to allocate a new object of type struct nft_ctx using nft_ctx_new() function, then pass commands via nft_run_cmd_from_buffer() or nft_run_cmd_from_filename() functions. By default, any output is written to stdout (or stderr for error messages). These file pointers may be changed using nft_ctx_set_output() and nft_ctx_set_error() functions. On top of that, it is possible to have any output buffered by the library for later retrieval as a static buffer. See nft_ctx_buffer_output() and nft_ctx_buffer_error() functions for details.

nft_ctx_new() and nft_ctx_free()

These functions aid in nft context management. In order to make use of the library, at least one context object has to be allocated. The context holds temporary data such as caches, library configuration and (if enabled) output and error buffers.

The nft_ctx_new() function allocates and returns a new context object. The parameter flags is unused at this point and should be set to zero. For convenience, the macro NFT_CTX_DEFAULT is defined to that value.

The nft_ctx_free() function frees the context object pointed to by ctx, including any caches or buffers it may hold.

nft_ctx_get_dry_run() and nft_ctx_set_dry_run()

Dry-run setting controls whether ruleset changes are actually committed on kernel side or not. It allows one to check whether a given operation would succeed without making actual changes to the ruleset. The default setting is false.

The nft_ctx_get_dry_run() function returns the dry-run setting’s value contained in ctx.

The nft_ctx_set_dry_run() function sets the dry-run setting in ctx to the value of dry.

nft_ctx_input_get_flags() and nft_ctx_input_set_flags()

The flags setting controls the input format.

enum { NFT_CTX_INPUT_NO_DNS = (1 « 0), NFT_CTX_INPUT_JSON = (1 « 1), };

NFT_CTX_INPUT_NO_DNS

Avoid resolving IP addresses with blocking getaddrinfo(). In that case, only plain IP addresses are accepted.

NFT_CTX_INPUT_JSON: When parsing the input, first try to interpret the input as JSON before falling back to the nftables format. This behavior is implied when setting the NFT_CTX_OUTPUT_JSON flag.

The nft_ctx_input_get_flags() function returns the input flags setting’s value in ctx.

The nft_ctx_input_set_flags() function sets the input flags setting in ctx to the value of val and returns the previous flags.

nft_ctx_output_get_flags() and nft_ctx_output_set_flags()

The flags setting controls the output format.

enum { NFT_CTX_OUTPUT_REVERSEDNS = (1 « 0), NFT_CTX_OUTPUT_SERVICE = (1 « 1), NFT_CTX_OUTPUT_STATELESS = (1 « 2), NFT_CTX_OUTPUT_HANDLE = (1 « 3), NFT_CTX_OUTPUT_JSON = (1 « 4), NFT_CTX_OUTPUT_ECHO = (1 « 5), NFT_CTX_OUTPUT_GUID = (1 « 6), NFT_CTX_OUTPUT_NUMERIC_PROTO = (1 « 7), NFT_CTX_OUTPUT_NUMERIC_PRIO = (1 « 8), NFT_CTX_OUTPUT_NUMERIC_SYMBOL = (1 « 9), NFT_CTX_OUTPUT_NUMERIC_TIME = (1 « 10), NFT_CTX_OUTPUT_NUMERIC_ALL = (NFT_CTX_OUTPUT_NUMERIC_PROTO | NFT_CTX_OUTPUT_NUMERIC_PRIO | NFT_CTX_OUTPUT_NUMERIC_SYMBOL | NFT_CTX_OUTPUT_NUMERIC_TIME), NFT_CTX_OUTPUT_TERSE = (1 « 11), };

NFT_CTX_OUTPUT_REVERSEDNS

Reverse DNS lookups are performed for IP addresses when printing. Note that this may add significant delay to list commands depending on DNS resolver speed.

NFT_CTX_OUTPUT_SERVICE

Print port numbers as services as described in the /etc/services file.

NFT_CTX_OUTPUT_STATELESS

If stateless output has been requested, then stateful data is not printed. Stateful data refers to those objects that carry run-time data, e.g. the counter statement holds packet and byte counter values, making it stateful.

NFT_CTX_OUTPUT_HANDLE

Upon insertion into the ruleset, some elements are assigned a unique handle for identification purposes. For example, when deleting a table or chain, it may be identified either by name or handle. Rules on the other hand must be deleted by handle, because there is no other way to uniquely identify them. This flag makes ruleset listings include handle values.

NFT_CTX_OUTPUT_JSON

If enabled at compile-time, libnftables accepts input in JSON format and is able to print output in JSON format as well. See libnftables-json(5) for a description of the supported schema. This flag enables JSON output format. If the flag is set, the input will first be tried as JSON format, before falling back to nftables format. This flag implies NFT_CTX_INPUT_JSON.

NFT_CTX_OUTPUT_ECHO

The echo setting makes libnftables print the changes once they are committed to the kernel, just like a running instance of nft monitor would. Amongst other things, this allows one to retrieve an added rule’s handle atomically.

NFT_CTX_OUTPUT_GUID

Display UID and GID as described in the /etc/passwd and /etc/group files.

NFT_CTX_OUTPUT_NUMERIC_PROTO

Display layer 4 protocol numerically.

NFT_CTX_OUTPUT_NUMERIC_PRIO

Display base chain priority numerically.

NFT_CTX_OUTPUT_NUMERIC_SYMBOL

Display expression datatype as numeric value.

NFT_CTX_OUTPUT_NUMERIC_TIME

Display time, day and hour values in numeric format.

NFT_CTX_OUTPUT_NUMERIC_ALL

Display all numerically.

NFT_CTX_OUTPUT_TERSE

If terse output has been requested, then the contents of sets are not printed.

The nft_ctx_output_get_flags() function returns the output flags setting’s value in ctx.

The nft_ctx_output_set_flags() function sets the output flags setting in ctx to the value of val.

nft_ctx_output_get_debug() and nft_ctx_output_set_debug()

Libnftables supports separate debugging of different parts of its internals. To facilitate this, debugging output is controlled via a bit mask. The bits are defined as such:

enum nft_debug_level { NFT_DEBUG_SCANNER = 0x1, NFT_DEBUG_PARSER = 0x2, NFT_DEBUG_EVALUATION = 0x4, NFT_DEBUG_NETLINK = 0x8, NFT_DEBUG_MNL = 0x10, NFT_DEBUG_PROTO_CTX = 0x20, NFT_DEBUG_SEGTREE = 0x40, };

NFT_DEBUG_SCANNER

Print LEX debug output.

NFT_DEBUG_PARSER

Print YACC debug output.

NFT_DEBUG_EVALUATION

Print debug information about evaluation phase.

NFT_DEBUG_NETLINK

Print netlink debug output.

NFT_DEBUG_MNL

Print libmnl debug output.

NFT_DEBUG_PROTO_CTX

Print protocol context debug output.

NFT_DEBUG_SEGTREE

Print segtree (i.e. interval sets) debug output.

The nft_ctx_output_get_debug() function returns the debug output setting’s value in ctx.

The nft_ctx_output_set_debug() function sets the debug output setting in ctx to the value of mask.

Controlling library standard and error output

By default, any output from the library (e.g., after a list command) is written to stdout and any error messages are written to stderr. To give applications control over them, there are functions to assign custom file pointers as well as having the library buffer what would be written for later retrieval in a static buffer. This buffer is guaranteed to be null-terminated and must not be freed. Note that the retrieval functions rewind the buffer position indicator. Further library output will probably overwrite the buffer content and potentially render it invalid (due to reallocation).

The nft_ctx_set_output() and nft_ctx_set_error() functions set the output or error file pointer in ctx to the value of fp. They return the previous value to aid in temporary file pointer overrides. On error, these functions return NULL. This happens only if fp is NULL or invalid (tested using ferror() function).

The nft_ctx_buffer_output() and nft_ctx_buffer_error() functions enable library standard or error output buffering. The functions return zero on success, non-zero otherwise. This may happen if the internal call to fopencookie() failed.

The nft_ctx_unbuffer_output() and nft_ctx_unbuffer_error() functions disable library standard or error output buffering. On failure, the functions return non-zero which may only happen if buffering was not enabled at the time the function was called.

The nft_ctx_get_output_buffer() and nft_ctx_get_error_buffer() functions return a pointer to the buffered output (which may be empty).

nft_ctx_add_include_path() and nft_ctx_clear_include_path()

The include command in nftables rulesets allows one to outsource parts of the ruleset into a different file. The include path defines where these files are searched for. Libnftables allows one to have a list of those paths which are searched in order. The default include path list contains a single compile-time defined entry (typically /etc/).

The nft_ctx_add_include_path() function extends the list of include paths in ctx by the one given in path. The function returns zero on success or non-zero if memory allocation failed.

The nft_ctx_clear_include_paths() function removes all include paths, even the built-in default one.

nft_ctx_add_var() and nft_ctx_clear_vars()

The define command in nftables ruleset allows one to define variables.

The nft_ctx_add_var() function extends the list of variables in ctx. The variable must be given in the format key=value. The function returns zero on success or non-zero if the variable is malformed.

The nft_ctx_clear_vars() function removes all variables.

nft_run_cmd_from_buffer() and nft_run_cmd_from_filename()

These functions perform the actual work of parsing user input into nftables commands and executing them.

The nft_run_cmd_from_buffer() function passes the command(s) contained in buf (which must be null-terminated) to the library, respecting settings and state in nft.

The nft_run_cmd_from_filename() function passes the content of filename to the library, respecting settings and state in nft.

Both functions return zero on success. A non-zero return code indicates an error while parsing or executing the command. This event should be accompanied by an error message written to library error output.

EXAMPLE

#include <stdio.h> #include <string.h> #include <nftables/libnftables.h>

int main(void)
{
        char *list_cmd = "list ruleset";
        struct nft_ctx *nft;
        const char *output, *p;
        char buf[256];
        int rc = 0;

        nft = nft_ctx_new(NFT_CTX_DEFAULT);
        if (!nft)
                return 1;

        while (1) {
                if (nft_ctx_buffer_output(nft) ||
                    nft_run_cmd_from_buffer(nft, list_cmd)) {
                        rc = 1;
                        break;
                }
                output = nft_ctx_get_output_buffer(nft);
                if (strlen(output)) {
                        printf("

This is the current ruleset: | “);

                        for (p = output; *(p + 1); p++) {
                                if (*p == 

)

                                        printf("

| “);

                                else
                                        putchar(*p);
                        }
                        putchar(

);

                } else {
                        printf("

Current ruleset is empty. “);

                }
                nft_ctx_unbuffer_output(nft);

                printf("

Enter command (q to quit): “);

                fflush(stdout);
                fgets(buf, 256, stdin);
                if (strlen(buf))
                        buf[strlen(buf) - 1] = ;

                if (buf[0] == q && buf[1] == )
                        break;

                if (nft_run_cmd_from_buffer(nft, buf)) {
                        rc = 1;
                        break;
                }
        }

        nft_ctx_free(nft);
        return rc;
}

SEE ALSO

libnftables-json(5), nft(8)

AUTHOR

Phil Sutter <[email protected]>

Author.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2294 - Linux cli command setlocale

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setlocale and provides detailed information about the command setlocale, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setlocale.

NAME 🖥️ setlocale 🖥️

set the current locale

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <locale.h>
char *setlocale(int category, const char *locale);

DESCRIPTION

The setlocale() function is used to set or query the program’s current locale.

If locale is not NULL, the program’s current locale is modified according to the arguments. The argument category determines which parts of the program’s current locale should be modified.

CategoryGoverns
LC_ALLAll of the locale
LC_ADDRESSFormatting of addresses and geography-related items (*)
LC_COLLATEString collation
LC_CTYPECharacter classification
LC_IDENTIFICATIONMetadata describing the locale (*)
LC_MEASUREMENTSettings related to measurements (metric versus US customary) (*)
LC_MESSAGESLocalizable natural-language messages
LC_MONETARYFormatting of monetary values
LC_NAMEFormatting of salutations for persons (*)
LC_NUMERICFormatting of nonmonetary numeric values
LC_PAPERSettings related to the standard paper size (*)
LC_TELEPHONEFormats to be used with telephone services (*)
LC_TIMEFormatting of date and time values

The categories marked with an asterisk in the above table are GNU extensions. For further information on these locale categories, see locale(7).

The argument locale is a pointer to a character string containing the required setting of category. Such a string is either a well-known constant like “C” or “da_DK” (see below), or an opaque string that was returned by another call of setlocale().

If locale is an empty string, "", each part of the locale that should be modified is set according to the environment variables. The details are implementation-dependent. For glibc, first (regardless of category), the environment variable LC_ALL is inspected, next the environment variable with the same name as the category (see the table above), and finally the environment variable LANG. The first existing environment variable is used. If its value is not a valid locale specification, the locale is unchanged, and setlocale() returns NULL.

The locale “C” or “POSIX” is a portable locale; it exists on all conforming systems.

A locale name is typically of the form language[_territory][.codeset][@modifier], where language is an ISO 639 language code, territory is an ISO 3166 country code, and codeset is a character set or encoding identifier like ISO-8859-1 or UTF-8. For a list of all supported locales, try “locale -a” (see locale(1)).

If locale is NULL, the current locale is only queried, not modified.

On startup of the main program, the portable “C” locale is selected as default. A program may be made portable to all locales by calling:

setlocale(LC_ALL, "");

after program initialization, and then:

  • using the values returned from a localeconv(3) call for locale-dependent information;

  • using the multibyte and wide character functions for text processing if MB_CUR_MAX > 1;

  • using strcoll(3) and strxfrm(3) to compare strings; and

  • using wcscoll(3) and wcsxfrm(3) to compare wide-character strings.

RETURN VALUE

A successful call to setlocale() returns an opaque string that corresponds to the locale set. This string may be allocated in static storage. The string returned is such that a subsequent call with that string and its associated category will restore that part of the process’s locale. The return value is NULL if the request cannot be honored.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setlocale()

Thread safetyMT-Unsafe const:locale env

STANDARDS

C11, POSIX.1-2008.

Categories

LC_ALL
LC_COLLATE
LC_CTYPE
LC_MONETARY
LC_NUMERIC
LC_TIME
C11, POSIX.1-2008.

LC_MESSAGES
POSIX.1-2008.

Others:
GNU.

HISTORY

POSIX.1-2001, C89.

Categories

LC_ALL
LC_COLLATE
LC_CTYPE
LC_MONETARY
LC_NUMERIC
LC_TIME
C89, POSIX.1-2001.

LC_MESSAGES
POSIX.1-2001.

Others:
GNU.

SEE ALSO

locale(1), localedef(1), isalpha(3), localeconv(3), nl_langinfo(3), rpmatch(3), strcoll(3), strftime(3), charsets(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2295 - Linux cli command stailq

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command stailq and provides detailed information about the command stailq, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the stailq.

NAME 🖥️ stailq 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2296 - Linux cli command strdupa

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strdupa and provides detailed information about the command strdupa, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strdupa.

NAME 🖥️ strdupa 🖥️

duplicate a string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strdup(const char *s);
char *strndup(const char s[.n], size_t n);
char *strdupa(const char *s);
char *strndupa(const char s[.n], size_t n);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strdup():

    _XOPEN_SOURCE >= 500
        || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

strndup():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

strdupa(), strndupa():

    _GNU_SOURCE

DESCRIPTION

The strdup() function returns a pointer to a new string which is a duplicate of the string s. Memory for the new string is obtained with malloc(3), and can be freed with free(3).

The strndup() function is similar, but copies at most n bytes. If s is longer than n, only n bytes are copied, and a terminating null byte (‘�’) is added.

strdupa() and strndupa() are similar, but use alloca(3) to allocate the buffer.

RETURN VALUE

On success, the strdup() function returns a pointer to the duplicated string. It returns NULL if insufficient memory was available, with errno set to indicate the error.

ERRORS

ENOMEM
Insufficient memory available to allocate duplicate string.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strdup(), strndup(), strdupa(), strndupa()

Thread safetyMT-Safe

STANDARDS

strdup()
strndup()
POSIX.1-2008.

strdupa()
strndupa()
GNU.

HISTORY

strdup()
SVr4, 4.3BSD-Reno, POSIX.1-2001.

strndup()
POSIX.1-2008.

strdupa()
strndupa()
GNU.

SEE ALSO

alloca(3), calloc(3), free(3), malloc(3), realloc(3), string(3), wcsdup(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2297 - Linux cli command svc_getcaller

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command svc_getcaller and provides detailed information about the command svc_getcaller, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the svc_getcaller.

NAME 🖥️ svc_getcaller 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2298 - Linux cli command mkstemps

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mkstemps and provides detailed information about the command mkstemps, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mkstemps.

NAME 🖥️ mkstemps 🖥️

create a unique temporary file

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int mkstemp(char *template);
int mkostemp(char *template, int flags);
int mkstemps(char *template, int suffixlen);
int mkostemps(char *template, int suffixlen, int flags);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

mkstemp():

    _XOPEN_SOURCE >= 500
        || /* glibc >= 2.12: */ _POSIX_C_SOURCE >= 200809L
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

mkostemp():

    _GNU_SOURCE

mkstemps():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

mkostemps():

    _GNU_SOURCE

DESCRIPTION

The mkstemp() function generates a unique temporary filename from template, creates and opens the file, and returns an open file descriptor for the file.

The last six characters of template must be “XXXXXX” and these are replaced with a string that makes the filename unique. Since it will be modified, template must not be a string constant, but should be declared as a character array.

The file is created with permissions 0600, that is, read plus write for owner only. The returned file descriptor provides both read and write access to the file. The file is opened with the open(2) O_EXCL flag, guaranteeing that the caller is the process that creates the file.

The mkostemp() function is like mkstemp(), with the difference that the following bits—with the same meaning as for open(2)—may be specified in flags: O_APPEND, O_CLOEXEC, and O_SYNC. Note that when creating the file, mkostemp() includes the values O_RDWR, O_CREAT, and O_EXCL in the flags argument given to open(2); including these values in the flags argument given to mkostemp() is unnecessary, and produces errors on some systems.

The mkstemps() function is like mkstemp(), except that the string in template contains a suffix of suffixlen characters. Thus, template is of the form prefixXXXXXXsuffix, and the string XXXXXX is modified as for mkstemp().

The mkostemps() function is to mkstemps() as mkostemp() is to mkstemp().

RETURN VALUE

On success, these functions return the file descriptor of the temporary file. On error, -1 is returned, and errno is set to indicate the error.

ERRORS

EEXIST
Could not create a unique temporary filename. Now the contents of template are undefined.

EINVAL
For mkstemp() and mkostemp(): The last six characters of template were not XXXXXX; now template is unchanged.

For mkstemps() and mkostemps(): template is less than (6 + suffixlen) characters long, or the last 6 characters before the suffix in template were not XXXXXX.

These functions may also fail with any of the errors described for open(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mkstemp(), mkostemp(), mkstemps(), mkostemps()

Thread safetyMT-Safe

STANDARDS

mkstemp()
POSIX.1-2001.

mkstemps()
BSD.

mkostemp()
mkostemps()
GNU.

HISTORY

mkstemp()
4.3BSD, POSIX.1-2001.

mkstemps()
glibc 2.11. BSD, Mac OS X, Solaris, Tru64.

mkostemp()
glibc 2.7.

mkostemps()
glibc 2.11.

In glibc versions 2.06 and earlier, the file is created with permissions 0666, that is, read and write for all users. This old behavior may be a security risk, especially since other UNIX flavors use 0600, and somebody might overlook this detail when porting programs. POSIX.1-2008 adds a requirement that the file be created with mode 0600.

More generally, the POSIX specification of mkstemp() does not say anything about file modes, so the application should make sure its file mode creation mask (see umask(2)) is set appropriately before calling mkstemp() (and mkostemp()).

SEE ALSO

mkdtemp(3), mktemp(3), tempnam(3), tmpfile(3), tmpnam(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2299 - Linux cli command Net_DNS_RR_KXpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_KXpm and provides detailed information about the command Net_DNS_RR_KXpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_KXpm.

NAME 🖥️ Net_DNS_RR_KXpm 🖥️

DNS KX resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name KX preference exchange);

DESCRIPTION

DNS Key Exchange Delegation (KX) record

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

preference

$preference = $rr->preference; $rr->preference( $preference );

A 16 bit integer which specifies the preference given to this RR among others at the same owner. Lower values are preferred.

exchange

$exchange = $rr->exchange; $rr->exchange( $exchange );

A domain name which specifies a host willing to act as a key exchange for the owner name.

COPYRIGHT

Copyright (c)2009 Olaf Kolkman, NLnet Labs.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC2230 <https://tools.ietf.org/html/rfc2230>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2300 - Linux cli command zip_error_code_zip

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_error_code_zip and provides detailed information about the command zip_error_code_zip, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_error_code_zip.

libzip (-lzip)

The

function returns the libzip specific part of the error from the zip_error error

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2301 - Linux cli command getrpcbynumber_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getrpcbynumber_r and provides detailed information about the command getrpcbynumber_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getrpcbynumber_r.

NAME 🖥️ getrpcbynumber_r 🖥️

get RPC entry (reentrant)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
int getrpcent_r(struct rpcent *result_buf, char buf[.buflen],
 size_t buflen, struct rpcent **result);
int getrpcbyname_r(const char *name,
 struct rpcent *result_buf, char buf[.buflen],
 size_t buflen, struct rpcent **result);
int getrpcbynumber_r(int number,
 struct rpcent *result_buf, char buf[.buflen],
 size_t buflen, struct rpcent **result);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getrpcent_r(), getrpcbyname_r(), getrpcbynumber_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The getrpcent_r(), getrpcbyname_r(), and getrpcbynumber_r() functions are the reentrant equivalents of, respectively, getrpcent(3), getrpcbyname(3), and getrpcbynumber(3). They differ in the way that the rpcent structure is returned, and in the function calling signature and return value. This manual page describes just the differences from the nonreentrant functions.

Instead of returning a pointer to a statically allocated rpcent structure as the function result, these functions copy the structure into the location pointed to by result_buf.

The buf array is used to store the string fields pointed to by the returned rpcent structure. (The nonreentrant functions allocate these strings in static storage.) The size of this array is specified in buflen. If buf is too small, the call fails with the error ERANGE, and the caller must try again with a larger buffer. (A buffer of length 1024 bytes should be sufficient for most applications.)

If the function call successfully obtains an RPC record, then *result is set pointing to result_buf; otherwise, *result is set to NULL.

RETURN VALUE

On success, these functions return 0. On error, they return one of the positive error numbers listed in ERRORS.

On error, record not found (getrpcbyname_r(), getrpcbynumber_r()), or end of input (getrpcent_r()) result is set to NULL.

ERRORS

ENOENT
(getrpcent_r()) No more records in database.

ERANGE
buf is too small. Try again with a larger buffer (and increased buflen).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getrpcent_r(), getrpcbyname_r(), getrpcbynumber_r()

Thread safetyMT-Safe locale

VERSIONS

Functions with similar names exist on some other systems, though typically with different calling signatures.

STANDARDS

GNU.

SEE ALSO

getrpcent(3), rpc(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2302 - Linux cli command isunordered

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isunordered and provides detailed information about the command isunordered, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isunordered.

NAME 🖥️ isunordered 🖥️

floating-point relational tests without exception for NaN

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
int isgreater(x, y);
int isgreaterequal(x, y);
int isless(x, y);
int islessequal(x, y);
int islessgreater(x, y);
int isunordered(x, y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

    All functions described here:
        _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The normal relational operations (like <, “less than”) fail if one of the operands is NaN. This will cause an exception. To avoid this, C99 defines the macros listed below.

These macros are guaranteed to evaluate their arguments only once. The arguments must be of real floating-point type (note: do not pass integer values as arguments to these macros, since the arguments will not be promoted to real-floating types).

isgreater()
determines (x) > (y) without an exception if x or y is NaN.

isgreaterequal()
determines (x) >= (y) without an exception if x or y is NaN.

isless()
determines (x) < (y) without an exception if x or y is NaN.

islessequal()
determines (x) <= (y) without an exception if x or y is NaN.

islessgreater()
determines (x) < (y) || (x) > (y) without an exception if x or y is NaN. This macro is not equivalent to x != y because that expression is true if x or y is NaN.

isunordered()
determines whether its arguments are unordered, that is, whether at least one of the arguments is a NaN.

RETURN VALUE

The macros other than isunordered() return the result of the relational comparison; these macros return 0 if either argument is a NaN.

isunordered() returns 1 if x or y is NaN and 0 otherwise.

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isgreater(), isgreaterequal(), isless(), islessequal(), islessgreater(), isunordered()

Thread safetyMT-Safe

VERSIONS

Not all hardware supports these functions, and where hardware support isn’t provided, they will be emulated by macros. This will result in a performance penalty. Don’t use these functions if NaN is of no concern for you.

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

fpclassify(3), isnan(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2303 - Linux cli command pcrepattern

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcrepattern and provides detailed information about the command pcrepattern, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcrepattern.

NAME 🖥️ pcrepattern 🖥️

Perl-compatible regular expressions

PCRE REGULAR EXPRESSION DETAILS

The syntax and semantics of the regular expressions that are supported by PCRE are described in detail below. There is a quick-reference syntax summary in the pcresyntax page. PCRE tries to match Perl syntax and semantics as closely as it can. PCRE also supports some alternative regular expression syntax (which does not conflict with the Perl syntax) in order to provide some compatibility with regular expressions in Python, .NET, and Oniguruma.

Perl’s regular expressions are described in its own documentation, and regular expressions in general are covered in a number of books, some of which have copious examples. Jeffrey Friedl’s “Mastering Regular Expressions”, published by O’Reilly, covers regular expressions in great detail. This description of PCRE’s regular expressions is intended as reference material.

This document discusses the patterns that are supported by PCRE when one its main matching functions, pcre_exec() (8-bit) or pcre[16|32]_exec() (16- or 32-bit), is used. PCRE also has alternative matching functions, pcre_dfa_exec() and pcre[16|32_dfa_exec(), which match using a different algorithm that is not Perl-compatible. Some of the features discussed below are not available when DFA matching is used. The advantages and disadvantages of the alternative functions, and how they differ from the normal functions, are discussed in the pcrematching page.

SPECIAL START-OF-PATTERN ITEMS

A number of options that can be passed to pcre_compile() can also be set by special items at the start of a pattern. These are not Perl-compatible, but are provided to make these options accessible to pattern writers who are not able to change the program that processes the pattern. Any number of these items may appear, but they must all be together right at the start of the pattern string, and the letters must be in upper case.

UTF support

The original operation of PCRE was on strings of one-byte characters. However, there is now also support for UTF-8 strings in the original library, an extra library that supports 16-bit and UTF-16 character strings, and a third library that supports 32-bit and UTF-32 character strings. To use these features, PCRE must be built to include appropriate support. When using UTF strings you must either call the compiling function with the PCRE_UTF8, PCRE_UTF16, or PCRE_UTF32 option, or the pattern must start with one of these special sequences:

(*UTF8) (*UTF16) (*UTF32) (*UTF)

(*UTF) is a generic sequence that can be used with any of the libraries. Starting a pattern with such a sequence is equivalent to setting the relevant option. How setting a UTF mode affects pattern matching is mentioned in several places below. There is also a summary of features in the pcreunicode page.

Some applications that allow their users to supply patterns may wish to restrict them to non-UTF data for security reasons. If the PCRE_NEVER_UTF option is set at compile time, (*UTF) etc. are not allowed, and their appearance causes an error.

Unicode property support

Another special sequence that may appear at the start of a pattern is (*UCP). This has the same effect as setting the PCRE_UCP option: it causes sequences such as \d and \w to use Unicode properties to determine character types, instead of recognizing only characters with codes less than 128 via a lookup table.

Disabling auto-possessification

If a pattern starts with (*NO_AUTO_POSSESS), it has the same effect as setting the PCRE_NO_AUTO_POSSESS option at compile time. This stops PCRE from making quantifiers possessive when what follows cannot match the repeated item. For example, by default a+b is treated as a++b. For more details, see the pcreapi documentation.

Disabling start-up optimizations

If a pattern starts with (*NO_START_OPT), it has the same effect as setting the PCRE_NO_START_OPTIMIZE option either at compile or matching time. This disables several optimizations for quickly reaching “no match” results. For more details, see the pcreapi documentation.

Newline conventions

PCRE supports five different conventions for indicating line breaks in strings: a single CR (carriage return) character, a single LF (linefeed) character, the two-character sequence CRLF, any of the three preceding, or any Unicode newline sequence. The pcreapi page has further discussion about newlines, and shows how to set the newline convention in the options arguments for the compiling and matching functions.

It is also possible to specify a newline convention by starting a pattern string with one of the following five sequences:

(*CR) carriage return (*LF) linefeed (*CRLF) carriage return, followed by linefeed (*ANYCRLF) any of the three above (*ANY) all Unicode newline sequences

These override the default and the options given to the compiling function. For example, on a Unix system where LF is the default newline sequence, the pattern

(*CR)a.b

changes the convention to CR. That pattern matches “a b” because LF is no longer a newline. If more than one of these settings is present, the last one is used.

The newline convention affects where the circumflex and dollar assertions are true. It also affects the interpretation of the dot metacharacter when PCRE_DOTALL is not set, and the behaviour of \N. However, it does not affect what the \R escape sequence matches. By default, this is any Unicode newline sequence, for Perl compatibility. However, this can be changed; see the description of \R in the section entitled “Newline sequences” below. A change of \R setting can be combined with a change of newline convention.

Setting match and recursion limits

The caller of pcre_exec() can set a limit on the number of times the internal match() function is called and on the maximum depth of recursive calls. These facilities are provided to catch runaway matches that are provoked by patterns with huge matching trees (a typical example is a pattern with nested unlimited repeats) and to avoid running out of system stack by too much recursion. When one of these limits is reached, pcre_exec() gives an error return. The limits can also be set by items at the start of the pattern of the form

(*LIMIT_MATCH=d) (*LIMIT_RECURSION=d)

where d is any number of decimal digits. However, the value of the setting must be less than the value set (or defaulted) by the caller of pcre_exec() for it to have any effect. In other words, the pattern writer can lower the limits set by the programmer, but not raise them. If there is more than one setting of one of these limits, the lower value is used.

EBCDIC CHARACTER CODES

PCRE can be compiled to run in an environment that uses EBCDIC as its character code rather than ASCII or Unicode (typically a mainframe system). In the sections below, character code values are ASCII or Unicode; in an EBCDIC environment these characters may have different code values, and there are no code points greater than 255.

CHARACTERS AND METACHARACTERS

A regular expression is a pattern that is matched against a subject string from left to right. Most characters stand for themselves in a pattern, and match the corresponding characters in the subject. As a trivial example, the pattern

The quick brown fox

matches a portion of a subject string that is identical to itself. When caseless matching is specified (the PCRE_CASELESS option), letters are matched independently of case. In a UTF mode, PCRE always understands the concept of case for characters whose values are less than 128, so caseless matching is always possible. For characters with higher values, the concept of case is supported if PCRE is compiled with Unicode property support, but not otherwise. If you want to use caseless matching for characters 128 and above, you must ensure that PCRE is compiled with Unicode property support as well as with UTF support.

The power of regular expressions comes from the ability to include alternatives and repetitions in the pattern. These are encoded in the pattern by the use of metacharacters, which do not stand for themselves but instead are interpreted in some special way.

There are two different sets of metacharacters: those that are recognized anywhere in the pattern except within square brackets, and those that are recognized within square brackets. Outside square brackets, the metacharacters are as follows:

\ general escape character with several uses ^ assert start of string (or line, in multiline mode) $ assert end of string (or line, in multiline mode) . match any character except newline (by default) [ start character class definition | start of alternative branch ( start subpattern ) end subpattern ? extends the meaning of ( also 0 or 1 quantifier also quantifier minimizer * 0 or more quantifier + 1 or more quantifier also “possessive quantifier” { start min/max quantifier

Part of a pattern that is in square brackets is called a “character class”. In a character class the only metacharacters are:

\ general escape character ^ negate the class, but only if the first character - indicates character range [ POSIX character class (only if followed by POSIX syntax) ] terminates the character class

The following sections describe the use of each of the metacharacters.

BACKSLASH

The backslash character has several uses. Firstly, if it is followed by a character that is not a number or a letter, it takes away any special meaning that character may have. This use of backslash as an escape character applies both inside and outside character classes.

For example, if you want to match a * character, you write \ in the pattern. This escaping action applies whether or not the following character would otherwise be interpreted as a metacharacter, so it is always safe to precede a non-alphanumeric with backslash to specify that it stands for itself. In particular, if you want to match a backslash, you write .

In a UTF mode, only ASCII numbers and letters have any special meaning after a backslash. All other characters (in particular, those whose codepoints are greater than 127) are treated as literals.

If a pattern is compiled with the PCRE_EXTENDED option, most white space in the pattern (other than in a character class), and characters between a # outside a character class and the next newline, inclusive, are ignored. An escaping backslash can be used to include a white space or # character as part of the pattern.

If you want to remove the special meaning from a sequence of characters, you can do so by putting them between \Q and . This is different from Perl in that $ and @ are handled as literals in \Q… sequences in PCRE, whereas in Perl, $ and @ cause variable interpolation. Note the following examples:

Pattern PCRE matches Perl matches

\Qabc$xyz abc$xyz abc followed by the contents of $xyz \Qabc\xyz abc\xyz abc\xyz \Qabc\Qxyz abc$xyz abc$xyz

The \Q… sequence is recognized both inside and outside character classes. An isolated  that is not preceded by \Q is ignored. If \Q is not followed by  later in the pattern, the literal interpretation continues to the end of the pattern (that is,  is assumed at the end). If the isolated \Q is inside a character class, this causes an error, because the character class is not terminated.

Non-printing characters

A second use of backslash provides a way of encoding non-printing characters in patterns in a visible manner. There is no restriction on the appearance of non-printing characters, apart from the binary zero that terminates a pattern, but when a pattern is being prepared by text editing, it is often easier to use one of the following escape sequences than the binary character it represents. In an ASCII or Unicode environment, these escapes are as follows:

 alarm, that is, the BEL character (hex 07)

2304 - Linux cli command Tk_WidgetDemopm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_WidgetDemopm and provides detailed information about the command Tk_WidgetDemopm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_WidgetDemopm.

NAME 🖥️ Tk_WidgetDemopm 🖥️

create a standard widget demonstration window.

SYNOPSIS

use WidgetDemo; my $TOP = $MW->WidgetDemo( -name => $demo, -text => Learn how to write a widget demonstration!, -title => WidgetDemo Demonstration, -iconname => WidgetDemo, -geometry_manager => grid, -font => $FONT, );

DESCRIPTION

This constructor builds a standard widget demonstration window, composed of three frames. The top frame contains descriptive demonstration text. The bottom frame contains the “Dismiss” and “See Code” buttons. The middle frame is demonstration container, which came be managed by either the pack or grid geometry manager.

The -text attribute is supplied to a Label widget, which is left-adjusted with -wraplength set to 4 inches. If you require different specifications then pass an array to -text; the first element is the text string and the remaining array elements are standard Label widget attributes - WidgetDemo will rearrange things as required..

-text => [Hello World!, qw/-wraplength 6i/],

AUTHOR

Steve Lidie <[email protected]>

HISTORY

[email protected], LUCC, 97/02/11 [email protected], LUCC, 97/06/07 [email protected], LUCC, 97/06/07 . Add Delegates() call that obviates the need for Top(). Many thanks to Achim Bohnet for this patch. . Fix -title so that it works.

COPYRIGHT

Copyright (C) 1997 - 1998 Stephen O. Lidie. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2305 - Linux cli command res_query

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command res_query and provides detailed information about the command res_query, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the res_query.

NAME 🖥️ res_query 🖥️

resolver routines

LIBRARY

Resolver library (libresolv, -lresolv)

SYNOPSIS

#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
struct __res_state;
typedef struct __res_state *res_state;
int res_ninit(res_state statep);
void res_nclose(res_state statep);
int res_nquery(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nsearch(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nquerydomain(res_state statep,
 const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
int res_nmkquery(res_state statep,
 int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
int res_nsend(res_state statep,
 const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);
int dn_comp(const char *exp_dn, unsigned char comp_dn[.length],
 int length, unsigned char **dnptrs,
 unsigned char **lastdnptr);
int dn_expand(const unsigned char *msg,
 const unsigned char *eomorig,
 const unsigned char *comp_dn, char exp_dn[.length],
 int length);
[[deprecated]] extern struct __res_state _res;
[[deprecated]] int res_init(void);
[[deprecated]]
int res_query(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_search(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_querydomain(const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
[[deprecated]]
int res_mkquery(int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
[[deprecated]]
int res_send(const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);

DESCRIPTION

Note: This page is incomplete (various resolver functions provided by glibc are not described) and likely out of date.

The functions described below make queries to and interpret the responses from Internet domain name servers.

The API consists of a set of more modern, reentrant functions and an older set of nonreentrant functions that have been superseded. The traditional resolver interfaces such as res_init() and res_query() use some static (global) state stored in the _res structure, rendering these functions non-thread-safe. BIND 8.2 introduced a set of new interfaces res_ninit(), res_nquery(), and so on, which take a res_state as their first argument, so you can use a per-thread resolver state.

The res_ninit() and res_init() functions read the configuration files (see resolv.conf(5)) to get the default domain name and name server address(es). If no server is given, the local host is tried. If no domain is given, that associated with the local host is used. It can be overridden with the environment variable LOCALDOMAIN. res_ninit() or res_init() is normally executed by the first call to one of the other functions. Every call to res_ninit() requires a corresponding call to res_nclose() to free memory allocated by res_ninit() and subsequent calls to res_nquery().

The res_nquery() and res_query() functions query the name server for the fully qualified domain name name of specified type and class. The reply is left in the buffer answer of length anslen supplied by the caller.

The res_nsearch() and res_search() functions make a query and waits for the response like res_nquery() and res_query(), but in addition they implement the default and search rules controlled by RES_DEFNAMES and RES_DNSRCH (see description of _res options below).

The res_nquerydomain() and res_querydomain() functions make a query using res_nquery()/res_query() on the concatenation of name and domain.

The following functions are lower-level routines used by res_nquery()/res_query().

The res_nmkquery() and res_mkquery() functions construct a query message in buf of length buflen for the domain name dname. The query type op is one of the following (typically QUERY):

QUERY
Standard query.

IQUERY
Inverse query. This option was removed in glibc 2.26, since it has not been supported by DNS servers for a very long time.

NS_NOTIFY_OP
Notify secondary of SOA (Start of Authority) change.

newrr is currently unused.

The res_nsend() and res_send() function send a preformatted query given in msg of length msglen and returns the answer in answer which is of length anslen. They will call res_ninit()/res_init() if it has not already been called.

The dn_comp() function compresses the domain name exp_dn and stores it in the buffer comp_dn of length length. The compression uses an array of pointers dnptrs to previously compressed names in the current message. The first pointer points to the beginning of the message and the list ends with NULL. The limit of the array is specified by lastdnptr. If dnptr is NULL, domain names are not compressed. If lastdnptr is NULL, the list of labels is not updated.

The dn_expand() function expands the compressed domain name comp_dn to a full domain name, which is placed in the buffer exp_dn of size length. The compressed name is contained in a query or reply message, and msg points to the beginning of the message.

The resolver routines use configuration and state information contained in a __res_state structure (either passed as the statep argument, or in the global variable _res, in the case of the older nonreentrant functions). The only field of this structure that is normally manipulated by the user is the options field. This field can contain the bitwise “OR” of the following options:

RES_INIT
True if res_ninit() or res_init() has been called.

RES_DEBUG
Print debugging messages. This option is available only if glibc was built with debugging enabled, which is not the default.

RES_AAONLY (unimplemented; deprecated in glibc 2.25)
Accept authoritative answers only. res_send() continues until it finds an authoritative answer or returns an error. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEVC
Use TCP connections for queries rather than UDP datagrams.

RES_PRIMARY (unimplemented; deprecated in glibc 2.25)
Query primary domain name server only. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_IGNTC
Ignore truncation errors. Don’t retry with TCP.

RES_RECURSE
Set the recursion desired bit in queries. Recursion is carried out by the domain name server, not by res_send(). [Enabled by default].

RES_DEFNAMES
If set, res_search() will append the default domain name to single component names—that is, those that do not contain a dot. [Enabled by default].

RES_STAYOPEN
Used with RES_USEVC to keep the TCP connection open between queries.

RES_DNSRCH
If set, res_search() will search for hostnames in the current domain and in parent domains. This option is used by gethostbyname(3). [Enabled by default].

RES_INSECURE1
Accept a response from a wrong server. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_INSECURE2
Accept a response which contains a wrong query. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_NOALIASES
Disable usage of HOSTALIASES environment variable.

RES_USE_INET6
Try an AAAA query before an A query inside the gethostbyname(3) function, and map IPv4 responses in IPv6 “tunneled form” if no AAAA records are found but an A record set exists. Since glibc 2.25, this option is deprecated, and its usage produces a warning; applications should use getaddrinfo(3), rather than gethostbyname(3).

RES_ROTATE
Causes round-robin selection of name servers from among those listed. This has the effect of spreading the query load among all listed servers, rather than having all clients try the first listed server first every time.

RES_NOCHECKNAME (unimplemented; deprecated in glibc 2.25)
Disable the modern BIND checking of incoming hostnames and mail names for invalid characters such as underscore (_), non-ASCII, or control characters. This option was present until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_KEEPTSIG (unimplemented; deprecated in glibc 2.25)
Do not strip TSIG records. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_BLAST (unimplemented; deprecated in glibc 2.25)
Send each query simultaneously and recursively to all servers. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEBSTRING (glibc 2.3.4 to glibc 2.24)
Make reverse IPv6 lookups using the bit-label format described in RFC 2673; if this option is not set (which is the default), then nibble format is used. This option was removed in glibc 2.25, since it relied on a backward-incompatible DNS extension that was never deployed on the Internet.

RES_NOIP6DOTINT (glibc 2.24 and earlier)
Use ip6.arpa zone in IPv6 reverse lookup instead of ip6.int, which is deprecated since glibc 2.3.4. This option is present up to and including glibc 2.24, where it is enabled by default. In glibc 2.25, this option was removed.

RES_USE_EDNS0 (since glibc 2.6)
Enables support for the DNS extensions (EDNS0) described in RFC 2671.

RES_SNGLKUP (since glibc 2.10)
By default, glibc performs IPv4 and IPv6 lookups in parallel since glibc 2.9. Some appliance DNS servers cannot handle these queries properly and make the requests time out. This option disables the behavior and makes glibc perform the IPv6 and IPv4 requests sequentially (at the cost of some slowdown of the resolving process).

RES_SNGLKUPREOP
When RES_SNGLKUP option is enabled, opens a new socket for the each request.

RES_USE_DNSSEC
Use DNSSEC with OK bit in OPT record. This option implies RES_USE_EDNS0.

RES_NOTLDQUERY
Do not look up unqualified name as a top-level domain (TLD).

RES_DEFAULT
Default option which implies: RES_RECURSE, RES_DEFNAMES, RES_DNSRCH, and RES_NOIP6DOTINT.

RETURN VALUE

The res_ninit() and res_init() functions return 0 on success, or -1 if an error occurs.

The res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), res_querydomain(), res_nmkquery(), res_mkquery(), res_nsend(), and res_send() functions return the length of the response, or -1 if an error occurs.

The dn_comp() and dn_expand() functions return the length of the compressed name, or -1 if an error occurs.

In the case of an error return from res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), or res_querydomain(), the global variable h_errno (see gethostbyname(3)) can be consulted to determine the cause of the error.

FILES

/etc/resolv.conf
resolver configuration file

/etc/host.conf
resolver configuration file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

res_ninit(), res_nclose(), res_nquery(), res_nsearch(), res_nquerydomain(), res_nsend()

Thread safetyMT-Safe locale

res_nmkquery(), dn_comp(), dn_expand()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

4.3BSD.

SEE ALSO

gethostbyname(3), resolv.conf(5), resolver(5), hostname(7), named(8)

The GNU C library source file resolv/README.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2306 - Linux cli command Image_ExifTool_Textpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Textpm and provides detailed information about the command Image_ExifTool_Textpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Textpm.

NAME 🖥️ Image_ExifTool_Textpm 🖥️

Read Text meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to deduce some characteristics of TXT and CSV files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<https://github.com/file/file>

SEE ALSO

“Text Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2307 - Linux cli command XtWidgetToApplicationContext

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtWidgetToApplicationContext and provides detailed information about the command XtWidgetToApplicationContext, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtWidgetToApplicationContext.

NAME 🖥️ XtWidgetToApplicationContext 🖥️

create, destroy, and obtain an application context

SYNTAX

#include <X11/Intrinsic.h>

XtAppContext XtCreateApplicationContext(void);

void XtDestroyApplicationContext(XtAppContext app_context);

XtAppContext XtWidgetToApplicationContext(Widget w);

void XtToolkitInitialize(void);

ARGUMENTS

app_context
Specifies the application context.

  1. Specifies the widget that you want the application context for.

DESCRIPTION

The XtCreateApplicationContext function returns an application context, which is an opaque type. Every application must have at least one application context.

The XtDestroyApplicationContext function destroys the specified application context as soon as it is safe to do so. If called from with an event dispatch (for example, a callback procedure), XtDestroyApplicationContext does not destroy the application context until the dispatch is complete.

The XtWidgetToApplicationContext function returns the application context for the specified widget.

The XtToolkitInitialize function initializes the Intrinsics internals. If XtToolkitInitialize was previously called it returns immediately.

SEE ALSO

XtDisplayInitialize(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2308 - Linux cli command HTTP_Responsepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTTP_Responsepm and provides detailed information about the command HTTP_Responsepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTTP_Responsepm.

NAME 🖥️ HTTP_Responsepm 🖥️

HTTP style response message

VERSION

version 6.46

SYNOPSIS

Response objects are returned by the request() method of the LWP::UserAgent:

# … $response = $ua->request($request); if ($response->is_success) { print $response->decoded_content; } else { print STDERR $response->status_line, " “; }

DESCRIPTION

The HTTP::Response class encapsulates HTTP style responses. A response consists of a response line, some headers, and a content body. Note that the LWP library uses HTTP style responses even for non-HTTP protocol schemes. Instances of this class are usually created and returned by the request() method of an LWP::UserAgent object.

HTTP::Response is a subclass of HTTP::Message and therefore inherits its methods. The following additional methods are available:

$r = HTTP::Response->new( $code )

$r = HTTP::Response->new( $code, $msg )

$r = HTTP::Response->new( $code, $msg, $header )

$r = HTTP::Response->new( $code, $msg, $header, $content )

Constructs a new HTTP::Response object describing a response with response code $code and optional message $msg. The optional $header argument should be a reference to an HTTP::Headers object or a plain array reference of key/value pairs. The optional $content argument should be a string of bytes. The meanings of these arguments are described below.

$r = HTTP::Response->parse( $str )
This constructs a new response object by parsing the given string.

$r->code

$r->code( $code )

This is used to get/set the code attribute. The code is a 3 digit number that encode the overall outcome of an HTTP response. The HTTP::Status module provide constants that provide mnemonic names for the code attribute.

$r->message

$r->message( $message )

This is used to get/set the message attribute. The message is a short human readable single line string that explains the response code.

$r->header( $field )

$r->header( $field => $value )

This is used to get/set header values and it is inherited from HTTP::Headers via HTTP::Message. See HTTP::Headers for details and other similar methods that can be used to access the headers.

$r->content

$r->content( $bytes )

This is used to get/set the raw content and it is inherited from the HTTP::Message base class. See HTTP::Message for details and other methods that can be used to access the content.

$r->decoded_content( %options )
This will return the content after any Content-Encoding and charsets have been decoded. See HTTP::Message for details.

$r->request

$r->request( $request )

This is used to get/set the request attribute. The request attribute is a reference to the request that caused this response. It does not have to be the same request passed to the $ua->request() method, because there might have been redirects and authorization retries in between.

$r->previous

$r->previous( $response )

This is used to get/set the previous attribute. The previous attribute is used to link together chains of responses. You get chains of responses if the first response is redirect or unauthorized. The value is undef if this is the first response in a chain. Note that the method $r->redirects is provided as a more convenient way to access the response chain.

$r->status_line
Returns the string “<code> <message>”. If the message attribute is not set then the official name of <code> (see HTTP::Status) is substituted.

$r->base
Returns the base URI for this response. The return value will be a reference to a URI object. The base URI is obtained from one the following sources (in priority order):

  1. Embedded in the document content, for instance <BASE HREF=”…"> in HTML documents.

  2. A “Content-Base:” header in the response. For backwards compatibility with older HTTP implementations we will also look for the “Base:” header.

  3. The URI used to request this response. This might not be the original URI that was passed to $ua->request() method, because we might have received some redirect responses first.

If none of these sources provide an absolute URI, undef is returned. Note: previous versions of HTTP::Response would also consider a “Content-Location:” header, as RFC 2616 <https://www.rfc-editor.org/rfc/rfc2616> said it should be. But this was never widely implemented by browsers, and now RFC 7231 <https://www.rfc-editor.org/rfc/rfc7231> says it should no longer be considered. When the LWP protocol modules produce the HTTP::Response object, then any base URI embedded in the document (step 1) will already have initialized the “Content-Base:” header. (See “parse_head” in LWP::UserAgent). This means that this method only performs the last 2 steps (the content is not always available either).

$r->filename
Returns a filename for this response. Note that doing sanity checks on the returned filename (eg. removing characters that cannot be used on the target filesystem where the filename would be used, and laundering it for security purposes) are the caller’s responsibility; the only related thing done by this method is that it makes a simple attempt to return a plain filename with no preceding path segments. The filename is obtained from one the following sources (in priority order):

  1. A “Content-Disposition:” header in the response. Proper decoding of RFC 2047 encoded filenames requires the MIME::QuotedPrint (for “Q” encoding), MIME::Base64 (for “B” encoding), and Encode modules.

  2. A “Content-Location:” header in the response.

  3. The URI used to request this response. This might not be the original URI that was passed to $ua->request() method, because we might have received some redirect responses first.

If a filename cannot be derived from any of these sources, undef is returned.

$r->as_string

$r->as_string( $eol )

Returns a textual representation of the response.

$r->is_info

$r->is_success

$r->is_redirect

$r->is_error

$r->is_client_error

$r->is_server_error

These methods indicate if the response was informational, successful, a redirection, or an error. See HTTP::Status for the meaning of these.

$r->error_as_HTML
Returns a string containing a complete HTML document indicating what error occurred. This method should only be called when $r->is_error is TRUE.

$r->redirects
Returns the list of redirect responses that lead up to this response by following the $r->previous chain. The list order is oldest first. In scalar context return the number of redirect responses leading up to this one.

$r->current_age
Calculates the “current age” of the response as specified by RFC 2616 section 13.2.3. The age of a response is the time since it was sent by the origin server. The returned value is a number representing the age in seconds.

$r->freshness_lifetime( %opt )
Calculates the “freshness lifetime” of the response as specified by RFC 2616 section 13.2.4. The “freshness lifetime” is the length of time between the generation of a response and its expiration time. The returned value is the number of seconds until expiry. If the response does not contain an “Expires” or a “Cache-Control” header, then this function will apply some simple heuristic based on the “Last-Modified” header to determine a suitable lifetime. The following options might be passed to control the heuristics:

heuristic_expiry => $bool
If passed as a FALSE value, don’t apply heuristics and just return undef when “Expires” or “Cache-Control” is lacking.

h_lastmod_fraction => $num
This number represent the fraction of the difference since the “Last-Modified” timestamp to make the expiry time. The default is 0.10, the suggested typical setting of 10% in RFC 2616.

h_min => $sec
This is the lower limit of the heuristic expiry age to use. The default is 60 (1 minute).

h_max => $sec
This is the upper limit of the heuristic expiry age to use. The default is 86400 (24 hours).

h_default => $sec
This is the expiry age to use when nothing else applies. The default is 3600 (1 hour) or “h_min” if greater.

$r->is_fresh( %opt )
Returns TRUE if the response is fresh, based on the values of freshness_lifetime() and current_age(). If the response is no longer fresh, then it has to be re-fetched or re-validated by the origin server. Options might be passed to control expiry heuristics, see the description of freshness_lifetime().

$r->fresh_until( %opt )
Returns the time (seconds since epoch) when this entity is no longer fresh. Options might be passed to control expiry heuristics, see the description of freshness_lifetime().

SEE ALSO

HTTP::Headers, HTTP::Message, HTTP::Status, HTTP::Request

AUTHOR

Gisle Aas <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 1994 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2309 - Linux cli command Tkpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tkpm and provides detailed information about the command Tkpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tkpm.

NAME 🖥️ Tkpm 🖥️

a graphical user interface toolkit for Perl

SYNOPSIS

use Tk; $top = new MainWindow; MainLoop;

DESCRIPTION

The Perl/Tk manual is split up into a number of sections:

Introduction

  • Tk::overview

  • Tk::UserGuide

Tk Geometry Management

  • Tk::Adjuster

  • Tk::form

  • Tk::grid

  • Tk::pack

  • Tk::place

  • Tk::Table

  • Tk::Tiler

  • Tk::Wm

Binding Events and Callbacks

  • Tk::after

  • Tk::bind

  • Tk::bindtags

  • Tk::callbacks

  • Tk::Error

  • Tk::event

  • Tk::exit

  • Tk::fileevent

  • Tk::IO

Tk Image Classes

  • Tk::Animation

  • Tk::Bitmap

  • Tk::Compound

  • Tk::Image

  • Tk::JPEG

  • Tk::Photo

  • Tk::Pixmap

  • Tk::PNG

Tk Widget Classes

  • Tk::Button

  • Tk::Canvas

  • Tk::Checkbutton

  • Tk::Entry

  • Tk::Frame

  • Tk::HList

  • Tk::Label

  • Tk::Listbox

  • Tk::Menu

  • Tk::Menubutton

  • Tk::Message

  • Tk::Optionmenu

  • Tk::Radiobutton

  • Tk::Scale

  • Tk::Scrollbar

  • Tk::Text

  • Tk::Toplevel

Tix Extensions

  • Tk::Balloon

  • Tk::BrowseEntry

  • Tk::DialogBox

  • Tk::DirTree

  • Tk::DItem

  • Tk::InputO

  • Tk::LabFrame

  • Tk::Mwm

  • Tk::NoteBook

  • Tk::TixGrid

  • Tk::tixWm

  • Tk::TList

  • Tk::Tree

Tk Generic Methods

  • Tk::Font

  • Tk::send

  • Tk::tkvars

  • Tk::Widget

  • Tk::X11Font

User Interaction

  • Tk::DropSite

  • Tk::Clipboard

  • Tk::focus

  • Tk::grab

  • Tk::selection

Creating and Configuring Widgets

  • Tk::CmdLine

  • Tk::MainWindow

  • Tk::option

  • Tk::options

  • Tk::palette

  • Tk::Xrm

Popups and Dialogs

  • Tk::chooseColor

  • Tk::chooseDirectory

  • Tk::ColorEditor

  • Tk::Dialog

  • Tk::DialogBox

  • Tk::FBox

  • Tk::FileSelect

  • Tk::getOpenFile

  • Tk::messageBox

  • Tk::MsgBox

Derived Widgets

  • Tk::composite

  • Tk::configspec

  • Tk::Derived

  • Tk::mega

  • Tk::ROText

  • Tk::Scrolled

  • Tk::TextUndo

  • Tk::Reindex

  • Tk::Pane

  • Tk::ProgressBar

C Programming

  • Internals

  • pTk

  • 3DBorder

  • BackgdErr

  • BindTable

  • CanvPsY

  • CanvTkwin

  • CanvTxtInfo

  • Clipboard

  • ClrSelect

  • ConfigWidg

  • ConfigWind

  • CoordToWin

  • CrtErrHdlr

  • CrtGenHdlr

  • CrtImgType

  • CrtItemType

  • CrtMainWin

  • CrtPhImgFmt

  • CrtSelHdlr

  • CrtWindow

  • DeleteImg

  • DoOneEvent

  • DoWhenIdle

  • DrawFocHlt

  • EventHndlr

  • EventInit

  • FileHndlr

  • FindPhoto

  • FontId

  • FreeXId

  • GeomReq

  • GetAnchor

  • GetBitmap

  • GetCapStyl

  • GetClrmap

  • GetColor

  • GetCursor

  • GetFont

  • GetFontStr

  • GetGC

  • GetImage

  • GetJoinStl

  • GetJustify

  • GetOption

  • GetPixels

  • GetPixmap

  • GetRelief

  • GetRootCrd

  • GetScroll

  • GetSelect

  • GetUid

  • GetVisual

  • GetVRoot

  • HandleEvent

  • IdToWindow

  • ImgChanged

  • InternAtom

  • MainLoop

  • MaintGeom

  • MainWin

  • ManageGeom

  • MapWindow

  • MeasureChar

  • MoveToplev

  • Name

  • NameOfImg

  • OwnSelect

  • ParseArgv

  • Preserve

  • QWinEvent

  • Restack

  • RestrictEv

  • SetAppName

  • SetClass

  • SetGrid

  • SetVisual

  • Sleep

  • StrictMotif

  • TextLayout

  • TimerHndlr

  • Tk_Init

  • WindowId

Implementation

  • Tk::Eventloop

  • Tk::Menu::Item

  • Tk::Submethods

  • Tk::WidgetDemo

  • Tk::widgets

Experimental Modules

  • Tk::Common

  • Tk::SunConst

  • Tk::WinPhoto

Other Modules and Languages

  • Tk::Compile

  • Tk::Tcl-perl

  • Tk::X

AUTHOR

Nick Ing-Simmons

SEE ALSO

perl, wish (1).

Alternative Perl modules implementing the Tk toolkit: Tkx, Tcl::Tk.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2310 - Linux cli command pcap_lookupnetpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_lookupnetpcap and provides detailed information about the command pcap_lookupnetpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_lookupnetpcap.

NAME 🖥️ pcap_lookupnetpcap 🖥️

find the IPv4 network number and netmask for a device

SYNOPSIS

#include <pcap/pcap.h>
char errbuf[PCAP_ERRBUF_SIZE];
int pcap_lookupnet(const char *device, bpf_u_int32 *netp,
bpf_u_int32 *maskp, char *errbuf);

DESCRIPTION

pcap_lookupnet() is used to determine the IPv4 network number and mask associated with the network device device. Both netp and maskp are bpf_u_int32 pointers.

RETURN VALUE

pcap_lookupnet() returns 0 on success and PCAP_ERROR on failure. If PCAP_ERROR is returned, errbuf is filled in with an appropriate error message. errbuf is assumed to be able to hold at least PCAP_ERRBUF_SIZE chars.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2311 - Linux cli command XtName

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtName and provides detailed information about the command XtName, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtName.

NAME 🖥️ XtName 🖥️

obtain widget’s name

SYNTAX

#include <X11/Intrinsic.h>

String XtName(Widget w);

ARGUMENTS

  1. Specifies the widget.

DESCRIPTION

XtName returns the widget’s name.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2312 - Linux cli command ldexpf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ldexpf and provides detailed information about the command ldexpf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ldexpf.

NAME 🖥️ ldexpf 🖥️

multiply floating-point number by integral power of 2

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double ldexp(double x, int exp);
float ldexpf(float x, int exp);
long double ldexpl(long double x, int exp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

ldexpf(), ldexpl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the result of multiplying the floating-point number x by 2 raised to the power exp.

RETURN VALUE

On success, these functions return x * (2^exp).

If exp is zero, then x is returned.

If x is a NaN, a NaN is returned.

If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.

If the result underflows, a range error occurs, and zero is returned.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with a sign the same as x.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error, overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error, underflow
errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

ldexp(), ldexpf(), ldexpl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

SEE ALSO

frexp(3), modf(3), scalbln(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2313 - Linux cli command LIST_NEXT

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LIST_NEXT and provides detailed information about the command LIST_NEXT, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LIST_NEXT.

NAME 🖥️ LIST_NEXT 🖥️

implementation of a doubly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
LIST_ENTRY(TYPE);
LIST_HEAD(HEADNAME, TYPE);
LIST_HEAD LIST_HEAD_INITIALIZER(LIST_HEAD head);
void LIST_INIT(LIST_HEAD *head);
int LIST_EMPTY(LIST_HEAD *head);
void LIST_INSERT_HEAD(LIST_HEAD *head,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
struct TYPE *LIST_FIRST(LIST_HEAD *head);
struct TYPE *LIST_NEXT(struct TYPE *elm, LIST_ENTRY NAME);
LIST_FOREACH(struct TYPE *var, LIST_HEAD *head, LIST_ENTRY NAME);
void LIST_REMOVE(struct TYPE *elm, LIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type LIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro LIST_HEAD().

Creation

A list is headed by a structure defined by the LIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are doubly linked so that an arbitrary element can be removed without traversing the list. New elements can be added to the list after an existing element, before an existing element, or at the head of the list. A LIST_HEAD structure is declared as follows:

LIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

LIST_ENTRY() declares a structure that connects the elements in the list.

LIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

LIST_INIT() initializes the list referenced by head.

LIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

LIST_INSERT_HEAD() inserts the new element elm at the head of the list.

LIST_INSERT_BEFORE() inserts the new element elm before the element listelm.

LIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

LIST_FIRST() returns the first element in the list, or NULL if the list is empty.

LIST_NEXT() returns the next element in the list, or NULL if this is the last.

LIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

LIST_REMOVE() removes the element elm from the list.

RETURN VALUE

LIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

LIST_FIRST(), and LIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

LIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

LIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. LIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    LIST_ENTRY(entry) entries;              /* List */
};
LIST_HEAD(listhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct listhead head;                   /* List head */
    int i;
    LIST_INIT(&head);                       /* Initialize the list */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    LIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    LIST_INSERT_AFTER(n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    LIST_INSERT_BEFORE(n2, n3, entries);
    i = 0;                                  /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        np->data = i++;
    LIST_REMOVE(n2, entries);               /* Deletion */
    free(n2);
                                            /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* List deletion */ n1 = LIST_FIRST(&head); while (n1 != NULL) { n2 = LIST_NEXT(n1, entries); free(n1); n1 = n2; } LIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2314 - Linux cli command pcap_free_datalinkspcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_free_datalinkspcap and provides detailed information about the command pcap_free_datalinkspcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_free_datalinkspcap.

NAME 🖥️ pcap_free_datalinkspcap 🖥️

get a list of link-layer header types supported by a capture device, and free that list

SYNOPSIS

#include <pcap/pcap.h>
int pcap_list_datalinks(pcap_t *p, int **dlt_buf);
void pcap_free_datalinks(int *dlt_list);

DESCRIPTION

pcap_list_datalinks() is used to get a list of the supported link-layer header types of the interface associated with the pcap descriptor. pcap_list_datalinks() allocates an array to hold the list and sets *dlt_buf to point to that array.

The caller is responsible for freeing the array with pcap_free_datalinks(), which frees the list of link-layer header types pointed to by dlt_list.

It must not be called on a pcap descriptor created by pcap_create(3PCAP) that has not yet been activated by pcap_activate(3PCAP).

RETURN VALUE

pcap_list_datalinks() returns the number of link-layer header types in the array on success, PCAP_ERROR_NOT_ACTIVATED if called on a capture handle that has been created but not activated, and PCAP_ERROR on other errors. If PCAP_ERROR is returned, pcap_geterr(3PCAP) or pcap_perror(3PCAP) may be called with p as an argument to fetch or display the error text.

SEE ALSO

pcap(3PCAP), pcap_datalink_val_to_name(3PCAP), pcap-linktype(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2315 - Linux cli command iswspace

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command iswspace and provides detailed information about the command iswspace, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the iswspace.

NAME 🖥️ iswspace 🖥️

test for whitespace wide character

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wctype.h>
int iswspace(wint_t wc);

DESCRIPTION

The iswspace() function is the wide-character equivalent of the isspace(3) function. It tests whether wc is a wide character belonging to the wide-character class “space”.

The wide-character class “space” is disjoint from the wide-character class “graph” and therefore also disjoint from its subclasses “alnum”, “alpha”, “upper”, “lower”, “digit”, “xdigit”, “punct”.

The wide-character class “space” contains the wide-character class “blank”.

The wide-character class “space” always contains at least the space character and the control characters ’ ‘, ' ‘, ’ ‘, ’ ‘, and ’ ‘.

RETURN VALUE

The iswspace() function returns nonzero if wc is a wide character belonging to the wide-character class “space”. Otherwise, it returns zero.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

iswspace()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of iswspace() depends on the LC_CTYPE category of the current locale.

SEE ALSO

isspace(3), iswctype(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2316 - Linux cli command Net_Telnetpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Telnetpm and provides detailed information about the command Net_Telnetpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Telnetpm.

NAME 🖥️ Net_Telnetpm 🖥️

interact with TELNET port or other TCP ports

SYNOPSIS

use Net::Telnet ();

see METHODS or EXAMPLES sections below

DESCRIPTION

Net::Telnet allows you to make client connections to a TCP port and do network I/O, especially to a port using the TELNET protocol. Simple I/O methods such as print, get, and getline are provided. More sophisticated interactive features are provided because connecting to a TELNET port ultimately means communicating with a program designed for human interaction. These interactive features include the ability to specify a time-out and to wait for patterns to appear in the input stream, such as the prompt from a shell. IPv6 support is available when using perl 5.14 or later, see family().

Other reasons to use this module than strictly with a TELNET port are:

  • You’re not familiar with sockets and you want a simple way to make client connections to TCP services.

  • You want to be able to specify your own time-out while connecting, reading, or writing.

  • You’re communicating with an interactive program at the other end of some socket or pipe and you want to wait for certain patterns to appear.

Here’s an example that prints who’s logged-on to a remote host. In addition to a username and password, you must also know the user’s shell prompt, which for this example is "bash$ "

use Net::Telnet (); $t = new Net::Telnet (Timeout => 10, Prompt => /bash\ $/); $t->open($host); $t->login($username, $passwd); @lines = $t->cmd(“who”); print @lines;

See the EXAMPLES section below for more examples.

Usage questions should be directed to the perlmonks.org discussion group. Bugs can be viewed or reported at cpan.org on the Net::Telnet page.

What To Know Before Using

  • All output is flushed while all input is buffered. Each object contains its own input buffer.

  • The output record separator for print() and cmd() is set to " " by default, so that you don’t have to append all your commands with a newline. To avoid printing a trailing " " use put() or set the output_record_separator to "".

  • The methods login() and cmd() use the prompt setting in the object to determine when a login or remote command is complete. Those methods will fail with a time-out if you don’t set the prompt correctly.

  • Use a combination of print() and waitfor() as an alternative to login() or cmd() when they don’t do what you want.

  • Errors such as timing-out are handled according to the error mode action. The default action is to print an error message to standard error and have the program die. See the errmode() method for more information.

  • When constructing the match operator argument for prompt() or waitfor(), always use single quotes instead of double quotes to avoid unexpected backslash interpretation (e.g. /bash\$ $/). If you’re constructing a DOS like file path, you’ll need to use four backslashes to represent one (e.g. /c:\\users\\bill>$/i). Of course don’t forget about regexp metacharacters like ., [, or $. You’ll only need a single backslash to quote them. The anchor metacharacters ^ and $ refer to positions in the input buffer. To avoid matching characters read that look like a prompt, it’s a good idea to end your prompt pattern with the $ anchor. That way the prompt will only match if it’s the last thing read.

  • In the input stream, each sequence of carriage return and line feed (i.e. " " or CR LF) is converted to " ". In the output stream, each occurrence of " " is converted to a sequence of CR LF. See binmode() to change the behavior. TCP protocols typically use the ASCII sequence, carriage return and line feed to designate a newline.

  • Timing-out while making a connection is disabled for machines that don’t support the alarm() function. Most notably these include MS-Windows machines.

  • You’ll need to be running at least Perl version 5.002 to use this module. This module does not require any libraries that don’t already come with a standard Perl distribution. If you have the IO:: libraries installed (they come standard with perl5.004 and later) then IO::Socket::INET is used as a base class, otherwise FileHandle is used.

Debugging

The typical usage bug causes a time-out error because you’ve made incorrect assumptions about what the remote side actually sends. The easiest way to reconcile what the remote side sends with your expectations is to use input_log() or dump_log().

dump_log() allows you to see the data being sent from the remote side before any translation is done, while input_log() shows you the results after translation. The translation includes converting end of line characters, removing and responding to TELNET protocol commands in the data stream.

Style of Named Parameters

Two different styles of named parameters are supported. This document only shows the IO:: style:

Net::Telnet->new(Timeout => 20);

however the dash-option style is also allowed:

Net::Telnet->new(-timeout => 20);

Connecting to a Remote MS-Windows Machine

By default MS-Windows doesn’t come with a TELNET server. However third party TELNET servers are available. Unfortunately many of these servers falsely claim to be a TELNET server. This is especially true of the so-called Microsoft Telnet Server that comes installed with some newer versions MS-Windows.

When a TELNET server first accepts a connection, it must use the ASCII control characters carriage-return and line-feed to start a new line (see RFC854). A server like the Microsoft Telnet Server that doesn’t do this, isn’t a TELNET server. These servers send ANSI terminal escape sequences to position to a column on a subsequent line and to even position while writing characters that are adjacent to each other. Worse, when sending output these servers resend previously sent command output in a misguided attempt to display an entire terminal screen.

Connecting Net::Telnet to one of these false TELNET servers makes your job of parsing command output very difficult. It’s better to replace a false TELNET server with a real TELNET server. The better TELNET servers for MS-Windows allow you to avoid the ANSI escapes by turning off something some of them call console mode.

METHODS

In the calling sequences below, square brackets [] represent optional parameters.

new - create a new Net::Telnet object
$obj = new Net::Telnet ([$host]); $obj = new Net::Telnet ([Binmode => $mode,] [Cmd_remove_mode => $mode,] [Dump_Log => $filename,] [Errmode => $errmode,] [Family => $family,] [Fhopen => $filehandle,] [Host => $host,] [Input_log => $file,] [Input_record_separator => $chars,] [Localfamily => $family,] [Localhost => $host,] [Max_buffer_length => $len,] [Ofs => $chars,] [Option_log => $file,] [Ors => $chars,] [Output_field_separator => $chars,] [Output_log => $file,] [Output_record_separator => $chars,] [Port => $port,] [Prompt => $matchop,] [Rs => $chars,] [Telnetmode => $mode,] [Timeout => $secs,]); This is the constructor for Net::Telnet objects. A new object is returned on success, the error mode action is performed on failure - see errmode(). The optional arguments are short-cuts to methods of the same name. If the $host argument is given then the object is opened by connecting to TCP $port on $host. Also see open(). The new object returned is given the following defaults in the absence of corresponding named parameters:

  • The default Host is "localhost"

  • The default Port is 23

  • The default Family is "ipv4"

  • The default Prompt is /[\$%#>] $/

  • The default Timeout is 10

  • The default Errmode is "die"

  • The default Output_record_separator is " ". Note that Ors is synonymous with Output_record_separator.

  • The default Input_record_separator is " ". Note that Rs is synonymous with Input_record_separator.

  • The default Binmode is 0, which means do newline translation.

  • The default Telnetmode is 1, which means respond to TELNET commands in the data stream.

  • The default Cmd_remove_mode is "auto"

  • The defaults for Dump_log, Input_log, Option_log, and Output_log are "", which means that logging is turned-off.

  • The default Max_buffer_length is 1048576 bytes, i.e. 1 MiB.

  • The default Output_field_separator is "". Note that Ofs is synonymous with Output_field_separator.

  • The default Localhost is ""

  • The default Localfamily is "ipv4"

binmode - toggle newline translation
$mode = $obj->binmode; $prev = $obj->binmode($mode); This method controls whether or not sequences of carriage returns and line feeds (CR LF or more specifically " ") are translated. By default they are translated (i.e. binmode is 0). If no argument is given, the current mode is returned. If $mode is 1 then binmode is on and newline translation is not done. If $mode is 0 then binmode is off and newline translation is done. In the input stream, each sequence of CR LF is converted to " " and in the output stream, each occurrence of " " is converted to a sequence of CR LF. Note that input is always buffered. Changing binmode doesn’t effect what’s already been read into the buffer. Output is not buffered and changing binmode will have an immediate effect.

break - send TELNET break character
$ok = $obj->break; This method sends the TELNET break character. This character is provided because it’s a signal outside the ASCII character set which is currently given local meaning within many systems. It’s intended to indicate that the Break Key or the Attention Key was hit. This method returns 1 on success, or performs the error mode action on failure.

buffer - scalar reference to object’s input buffer
$ref = $obj->buffer; This method returns a scalar reference to the input buffer for $obj. Data in the input buffer is data that has been read from the remote side but has yet to be read by the user. Modifications to the input buffer are returned by a subsequent read.

buffer_empty - discard all data in object’s input buffer
$obj->buffer_empty; This method removes all data in the input buffer for $obj.

close - close object
$ok = $obj->close; This method closes the socket, file, or pipe associated with the object. It always returns a value of 1.

cmd - issue command and retrieve output
$ok = $obj->cmd($string); $ok = $obj->cmd(String => $string, [Output => $ref,] [Cmd_remove_mode => $mode,] [Errmode => $mode,] [Input_record_separator => $chars,] [Ors => $chars,] [Output_record_separator => $chars,] [Prompt => $match,] [Rs => $chars,] [Timeout => $secs,]); @output = $obj->cmd($string); @output = $obj->cmd(String => $string, [Output => $ref,] [Cmd_remove_mode => $mode,] [Errmode => $mode,] [Input_record_separator => $chars,] [Ors => $chars,] [Output_record_separator => $chars,] [Prompt => $match,] [Rs => $chars,] [Timeout => $secs,]); This method sends the command $string, and reads the characters sent back by the command up until and including the matching prompt. It’s assumed that the program to which you’re sending is some kind of command prompting interpreter such as a shell. The command $string is automatically appended with the output_record_separator, by default it is " ". This is similar to someone typing a command and hitting the return key. Set the output_record_separator to change this behavior. In a scalar context, the characters read from the remote side are discarded and 1 is returned on success. On time-out, eof, or other failures, the error mode action is performed. See errmode(). In a list context, just the output generated by the command is returned, one line per element. In other words, all the characters in between the echoed back command string and the prompt are returned. If the command happens to return no output, a list containing one element, the empty string is returned. This is so the list will indicate true in a boolean context. On time-out, eof, or other failures, the error mode action is performed. See errmode(). The characters that matched the prompt may be retrieved using last_prompt(). Many command interpreters echo back the command sent. In most situations, this method removes the first line returned from the remote side (i.e. the echoed back command). See cmd_remove_mode() for more control over this feature. Use dump_log() to debug when this method keeps timing-out and you don’t think it should. Consider using a combination of print() and waitfor() as an alternative to this method when it doesn’t do what you want, e.g. the command you send prompts for input. The Output named parameter provides an alternative method of receiving command output. If you pass a scalar reference, all the output (even if it contains multiple lines) is returned in the referenced scalar. If you pass an array or hash reference, the lines of output are returned in the referenced array or hash. You can use input_record_separator() to change the notion of what separates a line. Optional named parameters are provided to override the current settings of cmd_remove_mode, errmode, input_record_separator, ors, output_record_separator, prompt, rs, and timeout. Rs is synonymous with input_record_separator and ors is synonymous with output_record_separator.

cmd_remove_mode - toggle removal of echoed commands
$mode = $obj->cmd_remove_mode; $prev = $obj->cmd_remove_mode($mode); This method controls how to deal with echoed back commands in the output returned by cmd(). Typically, when you send a command to the remote side, the first line of output returned is the command echoed back. Use this mode to remove the first line of output normally returned by cmd(). If no argument is given, the current mode is returned. If $mode is 0 then the command output returned from cmd() has no lines removed. If $mode is a positive integer, then the first $mode lines of command output are stripped. By default, $mode is set to "auto". Auto means that whether or not the first line of command output is stripped, depends on whether or not the remote side offered to echo. By default, Net::Telnet always accepts an offer to echo by the remote side. You can change the default to reject such an offer using option_accept(). A warning is printed to STDERR when attempting to set this attribute to something that is not "auto" or a non-negative integer.

dump_log - log all I/O in dump format
$fh = $obj->dump_log; $fh = $obj->dump_log($fh); $fh = $obj->dump_log($tiefh); $fh = $obj->dump_log($filename); This method starts or stops dump format logging of all the object’s input and output. The dump format shows the blocks read and written in a hexadecimal and printable character format. This method is useful when debugging, however you might want to first try input_log() as it’s more readable. If no argument is given, the log filehandle is returned. A returned empty string indicates logging is off. To stop logging, use an empty string as an argument. The stopped filehandle is not closed. If an open filehandle is given, it is used for logging and returned. Otherwise, the argument is assumed to be the name of a file, the filename is opened for logging and a filehandle to it is returned. If the filehandle is not already opened or the filename can’t be opened for writing, the error mode action is performed. The filehandle can be a tied filehandle.

eof - end of file indicator
$eof = $obj->eof; This method returns 1 if end of file has been read, otherwise it returns an empty string. Because the input is buffered this isn’t the same thing as $obj has closed. In other words $obj can be closed but there still can be stuff in the buffer to be read. Under this condition you can still read but you won’t be able to write.

errmode - define action to be performed on error
$mode = $obj->errmode; $prev = $obj->errmode($mode); This method gets or sets the action used when errors are encountered using the object. The first calling sequence returns the current error mode. The second calling sequence sets it to $mode and returns the previous mode. Valid values for $mode are "die" (the default), "return", a coderef, or an arrayref. When mode is "die" and an error is encountered using the object, then an error message is printed to standard error and the program dies. When mode is "return" then the method generating the error places an error message in the object and returns an undefined value in a scalar context and an empty list in list context. The error message may be obtained using errmsg(). When mode is a coderef, then when an error is encountered coderef is called with the error message as its first argument. Using this mode you may have your own subroutine handle errors. If coderef itself returns then the method generating the error returns undefined or an empty list depending on context. When mode is an arrayref, the first element of the array must be a coderef. Any elements that follow are the arguments to coderef. When an error is encountered, the coderef is called with its arguments. Using this mode you may have your own subroutine handle errors. If the coderef itself returns then the method generating the error returns undefined or an empty list depending on context. A warning is printed to STDERR when attempting to set this attribute to something that is not "die", "return", a coderef, or an arrayref whose first element isn’t a coderef.

errmsg - most recent error message
$msg = $obj->errmsg; $prev = $obj->errmsg(@msgs); The first calling sequence returns the error message associated with the object. The empty string is returned if no error has been encountered yet. The second calling sequence sets the error message for the object to the concatenation of @msgs and returns the previous error message. Normally, error messages are set internally by a method when an error is encountered.

error - perform the error mode action
$obj->error(@msgs); This method concatenates @msgs into a string and places it in the object as the error message. Also see errmsg(). It then performs the error mode action. Also see errmode(). If the error mode doesn’t cause the program to die, then an undefined value or an empty list is returned depending on the context. This method is primarily used by this class or a sub-class to perform the user requested action when an error is encountered.

family - IP address family for remote host
$family = $obj->family; $prev = $obj->family($family); This method designates which IP address family host() refers to, i.e. IPv4 or IPv6. IPv6 support is available when using perl 5.14 or later. With no argument it returns the current value set in the object. With an argument it sets the current address family to $family and returns the previous address family. Valid values are "ipv4", "ipv6", or "any". When "any", the host() can be a hostname or IP address for either IPv4 or IPv6. After connecting, you can use sockfamily() to determine which IP address family was used. The default value is "ipv4". The error mode action is performed when attempting to set this attribute to something that isn’t "ipv4", "ipv6", or "any". It is also performed when attempting to set it to "ipv6" when the Socket module is less than version 1.94 or IPv6 is not supported in the OS as indicated by Socket::AF_INET6 not being defined.

fhopen - use already open filehandle for I/O
$ok = $obj->fhopen($fh); This method associates the open filehandle $fh with $obj for further I/O. Filehandle $fh must already be opened. Suppose you want to use the features of this module to do I/O to something other than a TCP port, for example STDIN or a filehandle opened to read from a process. Instead of opening the object for I/O to a TCP port by using open() or new(), call this method instead. The value 1 is returned success, the error mode action is performed on failure.

get - read block of data
$data = $obj->get([Binmode => $mode,] [Errmode => $errmode,] [Telnetmode => $mode,] [Timeout => $secs,]); This method reads a block of data from the object and returns it along with any buffered data. If no buffered data is available to return, it will wait for data to read using the timeout specified in the object. You can override that timeout using $secs. Also see timeout(). If buffered data is available to return, it also checks for a block of data that can be immediately read. On eof an undefined value is returned. On time-out or other failures, the error mode action is performed. To distinguish between eof or an error occurring when the error mode is not set to "die", use eof(). Optional named parameters are provided to override the current settings of binmode, errmode, telnetmode, and timeout.

getline - read next line
$line = $obj->getline([Binmode => $mode,] [Errmode => $errmode,] [Input_record_separator => $chars,] [Rs => $chars,] [Telnetmode => $mode,] [Timeout => $secs,]); This method reads and returns the next line of data from the object. You can use input_record_separator() to change the notion of what separates a line. The default is " ". If a line isn’t immediately available, this method blocks waiting for a line or a time-out. On eof an undefined value is returned. On time-out or other failures, the error mode action is performed. To distinguish between eof or an error occurring when the error mode is not set to "die", use eof(). Optional named parameters are provided to override the current settings of binmode, errmode, input_record_separator, rs, telnetmode, and timeout. Rs is synonymous with input_record_separator.

getlines - read next lines
@lines = $obj->getlines([Binmode => $mode,] [Errmode => $errmode,] [Input_record_separator => $chars,] [Rs => $chars,] [Telnetmode => $mode,] [Timeout => $secs,] [All => $boolean,]); This method reads and returns all the lines of data from the object until end of file is read. You can use input_record_separator() to change the notion of what separates a line. The default is " ". A time-out error occurs if all the lines can’t be read within the time-out interval. See timeout(). The behavior of this method was changed in version 3.03. Prior to version 3.03 this method returned just the lines available from the next read. To get that old behavior, use the optional named parameter All and set $boolean to "" or 0. If only eof is read then an empty list is returned. On time-out or other failures, the error mode action is performed. Use eof() to distinguish between reading only eof or an error occurring when the error mode is not set to "die". Optional named parameters are provided to override the current settings of binmode, errmode, input_record_separator, rs, telnetmode, and timeout. Rs is synonymous with input_record_separator.

host - name or IP address of remote host
$host = $obj->host; $prev = $obj->host($host); This method designates the remote host for open(). It is either a hostname or an IP address. With no argument it returns the current value set in the object. With an argument it sets the current host name to $host and returns the previous value. Use family() to control which IP address family, IPv4 or IPv6, host refers to. The default value is "localhost". It may also be set by open() or new().

input_log - log all input
$fh = $obj->input_log; $fh = $obj->input_log($fh); $fh = $obj->input_log($tiefh); $fh = $obj->input_log($filename); This method starts or stops logging of input. This is useful when debugging. Also see dump_log(). Because most command interpreters echo back commands received, it’s likely all your output will also be in this log. Note that input logging occurs after newline translation. See binmode() for details on newline translation. If no argument is given, the log filehandle is returned. A returned empty string indicates logging is off. To stop logging, use an empty string as an argument. The stopped filehandle is not closed. If an open filehandle is given, it is used for logging and returned. Otherwise, the argument is assumed to be the name of a file, the filename is opened for logging and a filehandle to it is returned. If the filehandle is not already opened or the filename can’t be opened for writing, the error mode action is performed. The filehandle can be a tied filehandle.

input_record_separator - input line delimiter
$chars = $obj->input_record_separator; $prev = $obj->input_record_separator($chars); This method designates the line delimiter for input. It’s used with getline(), getlines(), and cmd() to determine lines in the input. With no argument this method returns the current input record separator set in the object. With an argument it sets the input record separator to $chars and returns the previous value. Note that $chars must have length. A warning is printed to STDERR when attempting to set this attribute to a string with no length.

last_prompt - last prompt read
$string = $obj->last_prompt; $prev = $obj->last_prompt($string); With no argument this method returns the last prompt read by cmd() or login(). See prompt(). With an argument it sets the last prompt read to $string and returns the previous value. Normally, only internal methods set the last prompt.

lastline - last line read
$line = $obj->lastline; $prev = $obj->lastline($line); This method retrieves the last line read from the object. This may be a useful error message when the remote side abnormally closes the connection. Typically the remote side will print an error message before closing. With no argument this method returns the last line read from the object. With an argument it sets the last line read to $line and returns the previous value. Normally, only internal methods set the last line.

localfamily - IP address family for local host
$localfamily = $obj->localfamily; $prev = $obj->localfamily($family); This method designates which IP address family localhost() refers to, i.e. IPv4 or IPv6. IPv6 support is available when using perl 5.14 or later. With no argument it returns the current value set in the object. With an argument it sets the current local address family to $family and returns the previous address family. Valid values are "ipv4", "ipv6", or "any". When "any", the localhost() can be a hostname or IP address for either IPv4 or IPv6. The default value is "ipv4". The error mode action is performed when attempting to set this attribute to something that isn’t "ipv4", "ipv6", or "any". It is also performed when attempting to set it to "ipv6" when the Socket module is less than version 1.94 or IPv6 is not supported in the OS as indicated by Socket::AF_INET6 not being defined.

localhost - bind local socket to a specific network interface
$localhost = $obj->localhost; $prev = $obj->localhost($host); This method designates the local socket IP address for open(). It is either a hostname, an IP address, or a null string (i.e. ""). A null string disables this feature. Normally the OS picks which local network interface to use. This method is useful when the local machine has more than one network interface and you want to bind to a specific one. With no argument it returns the current value set in the object. With an argument it sets the current local host name to $host and returns the previous value. Use localfamily() to control which IP address family, IPv4 or IPv6, local host refers to. The default value is "".

login - perform standard login
$ok = $obj->login($username, $password); $ok = $obj->login(Name => $username, Password => $password, [Errmode => $mode,] [Prompt => $match,] [Timeout => $secs,]); This method performs a standard login by waiting for a login prompt and responding with $username, then waiting for the password prompt and responding with $password, and then waiting for the command interpreter prompt. If any of those prompts sent by the remote side don’t match what’s expected, this method will time-out, unless timeout is turned off. Login prompt must match either of these case insensitive patterns: /login[: ]*$/i /username[: ]*$/i Password prompt must match this case insensitive pattern: /password[: ]*$/i The command interpreter prompt must match the current setting of prompt. See prompt(). Use dump_log() to debug when this method keeps timing-out and you don’t think it should. Consider using a combination of print() and waitfor() as an alternative to this method when it doesn’t do what you want, e.g. the remote host doesn’t prompt for a username. On success, 1 is returned. On time out, eof, or other failures, the error mode action is performed. See errmode(). Optional named parameters are provided to override the current settings of errmode, prompt, and timeout.

max_buffer_length - maximum size of input buffer
$len = $obj->max_buffer_length; $prev = $obj->max_buffer_length($len); This method designates the maximum size of the input buffer. An error is generated when a read causes the buffer to exceed this limit. The default value is 1,048,576 bytes (1 MiB). The input buffer can grow much larger than the block size when you continuously read using getline() or waitfor() and the data stream contains no newlines or matching waitfor patterns. With no argument, this method returns the current maximum buffer length set in the object. With an argument it sets the maximum buffer length to $len and returns the previous value. Values of $len smaller than 512 will be adjusted to 512. A warning is printed to STDERR when attempting to set this attribute to something that isn’t a positive integer.

ofs - field separator for print
$chars = $obj->ofs $prev = $obj->ofs($chars); This method is synonymous with output_field_separator().

open - connect to port on remote host
$ok = $obj->open($host); $ok = $obj->open([Host => $host,] [Port => $port,] [Family => $family,] [Errmode => $mode,] [Timeout => $secs,] [Localhost => $host,] [Localfamily => $family,]); This method opens a TCP connection to $port on $host for the IP address $family. If any of those arguments are missing then the current attribute value for the object is used. Specifying Host sets that attribute for the object. Specifying any of the other optional named parameters overrides the current setting. The default IP address family is "ipv4". $family may be set to "ipv4", "ipv6", or "any". See family() for more details. Localhost is used to bind to a specific local network interface. If the object is already open, it is closed before attempting a connection. On success 1 is returned. On time-out or other connection failures, the error mode action is performed. See errmode(). Time-outs don’t work for this method on machines that don’t implement SIGALRM - most notably MS-Windows machines. For those machines, an error is returned when the system reaches its own time-out while trying to connect. A side effect of this method is to reset the alarm interval associated with SIGALRM.

option_accept - indicate willingness to accept a TELNET option
$fh = $obj->option_accept([Do => $telopt,] [Dont => $telopt,] [Will => $telopt,] [Wont => $telopt,]); This method is used to indicate whether to accept or reject an offer to enable a TELNET option made by the remote side. If you’re using Do or Will to indicate a willingness to enable, then a notification callback must have already been defined by a prior call to option_callback(). See option_callback() for details on receiving enable/disable notification of a TELNET option. You can give multiple Do, Dont, Will, or Wont arguments for different TELNET options in the same call to this method. The following example describes the meaning of the named parameters. A TELNET option, such as TELOPT_ECHO used below, is an integer constant that you can import from Net::Telnet. See the source in file Telnet.pm for the complete list.

  • Do => TELOPT_ECHO

    • we’ll accept an offer to enable the echo option on the local side
  • Dont => TELOPT_ECHO

    • we’ll reject an offer to enable the echo option on the local side
  • Will => TELOPT_ECHO

    • we’ll accept an offer to enable the echo option on the remote side
  • Wont => TELOPT_ECHO

    • we’ll reject an offer to enable the echo option on the remote side
  • Use option_send() to send a request to the remote side to enable or disable a particular TELNET option.

option_callback - define the option negotiation callback
$coderef = $obj->option_callback; $prev = $obj->option_callback($coderef); This method defines the callback subroutine that is called when a TELNET option is enabled or disabled. Once defined, the option_callback may not be undefined. However, calling this method with a different $coderef changes it. A warning is printed to STDERR when attempting to set this attribute to something that isn’t a coderef. Here are the circumstances that invoke $coderef:

  • An option becomes enabled because the remote side requested an enable and option_accept() had been used to arrange that it be accepted.

  • The remote side arbitrarily decides to disable an option that is currently enabled. Note that Net::Telnet always accepts a request to disable from the remote side.

  • option_send() was used to send a request to enable or disable an option and the response from the remote side has just been received. Note, that if a request to enable is rejected then $coderef is still invoked even though the option didn’t change.

  • Here are the arguments passed to &$coderef: &$coderef($obj, $option, $is_remote, $is_enabled, $was_enabled, $buf_position);

  • 1. $obj is the Net::Telnet object

  • 2. $option is the TELNET option. Net::Telnet exports constants for the various TELNET options which just equate to an integer.

  • 3. $is_remote is a boolean indicating for which side the option applies.

  • 4. $is_enabled is a boolean indicating the option is enabled or disabled

  • 5. $was_enabled is a boolean indicating the option was previously enabled or disabled

  • 6. $buf_position is an integer indicating the position in the object’s input buffer where the option takes effect. See buffer() to access the object’s input buffer.

option_log - log all TELNET options sent or received
$fh = $obj->option_log; $fh = $obj->option_log($fh); $fh = $obj->option_log($tiefh); $fh = $obj->option_log($filename); This method starts or stops logging of all TELNET options being sent or received. This is useful for debugging when you send options via option_send() or you arrange to accept option requests from the remote side via option_accept(). Also see dump_log(). If no argument is given, the log filehandle is returned. An empty string indicates logging is off. To stop logging, use an empty string as an argument. The stopped filehandle is not closed. If an open filehandle is given, it is used for logging and returned. Otherwise, the argument is assumed to be the name of a file, the filename is opened for logging and a filehandle to it is returned. If the filehandle is not already opened or the filename can’t be opened for writing, the error mode action is performed. The filehandle can be a tied filehandle.

option_send - send TELNET option negotiation request
$ok = $obj->option_send([Do => $telopt,] [Dont => $telopt,] [Will => $telopt,] [Wont => $telopt,] [Async => $boolean,]); This method is not yet implemented. Look for it in a future version.

option_state - get current state of a TELNET option
$hashref = $obj->option_state($telopt); This method returns a hashref containing a copy of the current state of TELNET option $telopt. Here are the values returned in the hash:

  • $hashref->{remote_enabled}

    • boolean that indicates if the option is enabled on the remote side.
  • $hashref->{remote_enable_ok}

    • boolean that indicates if it’s ok to accept an offer to enable this option on the remote side.
  • $hashref->{remote_state}

    • string used to hold the internal state of option negotiation for this option on the remote side.
  • $hashref->{local_enabled}

    • boolean that indicates if the option is enabled on the local side.
  • $hashref->{local_enable_ok}

    • boolean that indicates if it’s ok to accept an offer to enable this option on the local side.
  • $hashref->{local_state}

    • string used to hold the internal state of option negotiation for this option on the local side.

ors - output line delimiter
$chars = $obj->ors; $prev = $obj->ors($chars); This method is synonymous with output_record_separator().

output_field_separator - field separator for print
$chars = $obj->output_field_separator; $prev = $obj->output_field_separator($chars); This method designates the output field separator for print(). Ordinarily the print method simply prints out the comma separated fields you specify. Set this to specify what’s printed between fields. With no argument this method returns the current output field separator set in the object. With an argument it sets the output field separator to $chars and returns the previous value. By default it’s set to an empty string.

output_log - log all output
$fh = $obj->output_log; $fh = $obj->output_log($fh); $fh = $obj->output_log($tiefh); $fh = $obj->output_log($filename); This method starts or stops logging of output. This is useful when debugging. Also see dump_log(). Because most command interpreters echo back commands received, it’s likely all your output would also be in an input log. See input_log(). Note that output logging occurs before newline translation. See binmode() for details on newline translation. If no argument is given, the log filehandle is returned. A returned empty string indicates logging is off. To stop logging, use an empty string as an argument. The stopped filehandle is not closed. If an open filehandle is given, it is used for logging and returned. Otherwise, the argument is assumed to be the name of a file, the filename is opened for logging and a filehandle to it is returned. If the filehandle is not already opened or the filename can’t be opened for writing, the error mode action is performed. The filehandle can be a tied filehandle.

output_record_separator - output line delimiter
$chars = $obj->output_record_separator; $prev = $obj->output_record_separator($chars); This method designates the output line delimiter for print() and cmd(). Set this to specify what’s printed at the end of print() and cmd(). The output record separator is set to " " by default, so there’s no need to append all your commands with a newline. To avoid printing the output_record_separator use put() or set the output_record_separator to an empty string. With no argument this method returns the current output record separator set in the object. With an argument it sets the output record separator to $chars and returns the previous value.

peerhost - IP address of the other end of the socket connection
$ipaddr = $obj->peerhost; This method returns a string which is the IPv4 or IPv6 address the remote socket is bound to (i.e. it is the IP address of host()). It returns "" when not connected.

peerport - TCP port of the other end of the socket connection
$port = $obj->peerport; This method returns the port number which the remote socket is bound to. It is the same as the port() number when connected. It returns "" when not connected.

port - remote port
$port = $obj->port; $prev = $obj->port($port); This method designates the remote TCP port for open(). With no argument this method returns the current port number. With an argument it sets the current port number to $port and returns the previous port. If $port is a TCP service name, then it’s first converted to a port number using the perl function getservbyname(). The default value is 23. The error mode action is performed when attempting to set this attribute to something that is not a positive integer or a valid TCP service name.

print - write to object
$ok = $obj->print(@list); This method writes @list followed by the output_record_separator to the open object and returns 1 if all data was successfully written. On time-out or other failures, the error mode action is performed. See errmode(). By default, the output_record_separator() is set to " " so all your commands automatically end with a newline. In most cases your output is being read by a command interpreter which won’t accept a command until newline is read. This is similar to someone typing a command and hitting the return key. To avoid printing a trailing " " use put() instead or set the output_record_separator to an empty string. On failure, it’s possible that some data was written. If you choose to try and recover from a print timing-out, use print_length() to determine how much was written before the error occurred. You may also use the output field separator to print a string between the list elements. See output_field_separator().

print_length - number of bytes written by print
$num = $obj->print_length; This returns the number of bytes successfully written by the most recent print() or put().

prompt - pattern to match a prompt
$matchop = $obj->prompt; $prev = $obj->prompt($matchop); This method sets the pattern used to find a prompt in the input stream. It must be a string representing a valid perl pattern match operator. The methods login() and cmd() try to read until matching the prompt. They will fail with a time-out error if the pattern you’ve chosen doesn’t match what the remote side sends. With no argument this method returns the prompt set in the object. With an argument it sets the prompt to $matchop and returns the previous value. The default prompt is /[\$%#>] $/ Always use single quotes, instead of double quotes, to construct $matchop (e.g. /bash\$ $/). If you’re constructing a DOS like file path, you’ll need to use four backslashes to represent one (e.g. /c:\\users\\bill>$/i). Of course don’t forget about regexp metacharacters like ., [, or $. You’ll only need a single backslash to quote them. The anchor metacharacters ^ and $ refer to positions in the input buffer. The error mode action is performed when attempting to set this attribute with a match operator missing its opening delimiter.

put - write to object
$ok = $obj->put($string); $ok = $obj->put(String => $string, [Binmode => $mode,] [Errmode => $errmode,] [Telnetmode => $mode,] [Timeout => $secs,]); This method writes $string to the opened object and returns 1 if all data was successfully written. This method is like print() except that it doesn’t write the trailing output_record_separator ( by default). On time-out or other failures, the error mode action is performed. See errmode(). On failure, it’s possible that some data was written. If you choose to try and recover from a put timing-out, use print_length() to determine how much was written before the error occurred. Optional named parameters are provided to override the current settings of binmode, errmode, telnetmode, and timeout.

rs - input line delimiter
$chars = $obj->rs; $prev = $obj->rs($chars); This method is synonymous with input_record_separator().

sockfamily - IP address family of connected local socket
$sockfamily = $obj->sockfamily; This method returns which IP address family open() used to successfully connect. It is most useful when the requested address family() for open() was "any". Values returned may be "ipv4", "ipv6", or "" (when not connected).

sockhost - IP address of this end of the socket connection
$ipaddr = $obj->sockhost; This method returns a string which is the IPv4 or IPv6 address the local socket is bound to. It returns "" when not connected.

sockport - TCP port of this end of the socket connection
$port = $obj->sockport; This method returns the port number which the local socket is bound to. It returns "" when not connected.

telnetmode - turn off/on telnet command interpretation
$mode = $obj->telnetmode; $prev = $obj->telnetmode($mode); This method controls whether or not TELNET commands in the data stream are recognized and handled. The TELNET protocol uses certain character sequences sent in the data stream to control the session. If the port you’re connecting to isn’t using the TELNET protocol, then you should turn this mode off. The default is on. If no argument is given, the current mode is returned. If $mode is 0 then telnet mode is off. If $mode is 1 then telnet mode is on.

timed_out - time-out indicator
$boolean = $obj->timed_out; $prev = $obj->timed_out($boolean); This method indicates if a previous read, write, or open method timed-out. Remember that timing-out is itself an error. To be able to invoke timed_out() after a time-out error, you’d have to change the default error mode to something other than "die". See errmode(). With no argument this method returns 1 if the previous method timed-out. With an argument it sets the indicator. Normally, only internal methods set this indicator.

timeout - I/O time-out interval
$secs = $obj->timeout; $prev = $obj->timeout($secs); This method sets the timeout interval used when performing I/O or connecting to a port. When a method doesn’t complete within the timeout interval then it’s an error and the error mode action is performed. A timeout may be expressed as a relative or absolute value. If $secs is greater than or equal to the time the program started, as determined by $^T, then it’s an absolute time value for when time-out occurs. The perl function time() may be used to obtain an absolute time value. For a relative time-out value less than $^T, time-out happens $secs from when the method begins. If $secs is 0 then time-out occurs if the data cannot be immediately read or written. Use the undefined value to turn off timing-out completely. With no argument this method returns the timeout set in the object. With an argument it sets the timeout to $secs and returns the previous value. The default timeout value is 10 seconds. A warning is printed to STDERR when attempting to set this attribute to something that is not an undef or a non-negative integer.

waitfor - wait for pattern in the input
$ok = $obj->waitfor($matchop); $ok = $obj->waitfor([Match => $matchop,] [String => $string,] [Binmode => $mode,] [Errmode => $errmode,] [Telnetmode => $mode,] [Timeout => $secs,]); ($prematch, $match) = $obj->waitfor($matchop); ($prematch, $match) = $obj->waitfor([Match => $matchop,] [String => $string,] [Binmode => $mode,] [Errmode => $errmode,] [Telnetmode => $mode,] [Timeout => $secs,]); This method reads until a pattern match or string is found in the input stream. All the characters before and including the match are removed from the input stream. In a list context the characters before the match and the matched characters are returned in $prematch and $match. In a scalar context, the matched characters and all characters before it are discarded and 1 is returned on success. On time-out, eof, or other failures, for both list and scalar context, the error mode action is performed. See errmode(). You can specify more than one pattern or string by simply providing multiple Match and/or String named parameters. A $matchop must be a string representing a valid Perl pattern match operator. The $string is just a substring to find in the input stream. Use dump_log() to debug when this method keeps timing-out and you don’t think it should. An optional named parameter is provided to override the current setting of timeout. To avoid unexpected backslash interpretation, always use single quotes instead of double quotes to construct a match operator argument for prompt() and waitfor() (e.g. /bash\$ $/). If you’re constructing a DOS like file path, you’ll need to use four backslashes to represent one (e.g. /c:\\users\\bill>$/i). Of course don’t forget about regexp metacharacters like ., [, or $. You’ll only need a single backslash to quote them. The anchor metacharacters ^ and $ refer to positions in the input buffer. Optional named parameters are provided to override the current settings of binmode, errmode, telnetmode, and timeout.

SEE ALSO

RFC 854
TELNET Protocol Specification http://tools.ietf.org/html/rfc854

RFC 1143
Q Method of Implementing TELNET Option Negotiation http://tools.ietf.org/html/rfc1143

TELNET Option Assignments
http://www.iana.org/assignments/telnet-options

EXAMPLES

Setting prompt() to match a user’s shell prompt can be tricky. This example logs in without knowing the shell prompt and then sets it to match prompt(). It requires /usr/bin/env and /bin/sh on the remote host.

my $host = your_destination_host_here; my $user = your_username_here; my $passwd = your_password_here; my ($t, @output); ## Create a Net::Telnet object. use Net::Telnet (); $t = new Net::Telnet (Timeout => 10); ## Connect and login. $t->open($host); $t->waitfor(/login: ?$/i); $t->print($user); $t->waitfor(/password: ?$/i); $t->print($passwd); ## Switch to a known shell, using a known prompt. $t->prompt(/<xPROMPTx> $/); $t->errmode(“return”); $t->cmd(“exec /usr/bin/env PS1=<xPROMPTx> /bin/sh -i”) or die “login failed to remote host $host”; $t->errmode(“die”); ## Now you can do cmd() to your hearts content. @output = $t->cmd(“uname -a”); print @output; exit;

Usually you want the remote TERM environment variable to be set to something like dumb so you don’t read escape sequences meant to be interpreted by a display terminal. It is best to set it via cmd(), or via waitfor() and print(). It is also possible to negotiate the terminal type via telnet. Here is how to do that.

## Module import. use Net::Telnet qw(TELNET_IAC TELNET_SB TELNET_SE TELOPT_TTYPE); ## Global variables. my $Term; ## Main program. { my $host = “your_destination_host_here”; my $user = “your_username_here”; my $passwd = “your_password_here”; my $prompt = /bash\ $/; # your regexp for shell prompt here my $t; $t = new Net::Telnet (Prompt => $prompt); ## Set up callbacks to negotiate terminal type. $t->option_callback(sub {}); $t->suboption_callback(\subopt_callback); $t->option_accept(Do => TELOPT_TTYPE); ## Login and print value of TERM. $Term = “dumb”; $t->open($host); $t->login($user, $passwd); print $t->cmd(hostname); print “TERM=”, $t->cmd(echo $TERM); $t->close; exit; } # end main program sub subopt_callback { my ($t, $option, $parameters) = @_; my $telcmd; if ($option == TELOPT_TTYPE) { $telcmd = pack(“C4 A* C2”, TELNET_IAC, TELNET_SB, TELOPT_TTYPE, 0, $Term, TELNET_IAC, TELNET_SE); $t->put(String => $telcmd, Telnetmode => 0); } 1; } # end sub subopt_callback

You can also use Net::Telnet to interact with local programs. This example changes a user’s login password. It introduces the spawn() subroutine to start a program and associate a filehandle with its standard I/O. Because the passwd program always prompts for passwords on its controlling terminal, the IO::Pty module is used to create a new pseudo terminal for use by passwd. The Net::Telnet object reads and writes to that pseudo terminal. To use the code below, substitute changeme with the actual old and new passwords.

## Main program. { my ($pty, $passwd); my $oldpw = changeme; my $newpw = changeme;

## Start passwd program. $pty = spawn(“passwd”); ## Create a Net::Telnet object to perform I/O on passwds tty. use Net::Telnet; $passwd = new Net::Telnet (-fhopen => $pty, -timeout => 2, -output_record_separator => " “, -telnetmode => 0, -cmd_remove_mode => 1); $passwd->errmode(“return”); ## Send existing password. $passwd->waitfor(/password: ?$/i) or die “no old password prompt: “, $passwd->lastline; $passwd->print($oldpw); ## Send new password. $passwd->waitfor(/new (\w+\s)?password: ?$/i) or die “bad old password: “, $passwd->lastline; $passwd->print($newpw); ## Send new password verification. $passwd->waitfor(/new (\w+\s)?password: ?$/i) or die “bad new password: “, $passwd->lastline; $passwd->print($newpw); ## Display success or failure. $passwd->waitfor(/(changed|updated)/) or die “bad new password: “, $passwd->lastline; print $passwd->lastline; $passwd->close; exit; } # end main program

sub spawn { my (@cmd) = @_; my ($pid, $pty, $tty, $tty_fd);

## Create a new pseudo terminal. use IO::Pty (); $pty = new IO::Pty or die $!; ## Execute the program in another process. unless ($pid = fork) { # child process die “problem spawning program: $! " unless defined $pid; ## Disassociate process from its controlling terminal. use POSIX (); POSIX::setsid() or die “setsid failed: $!”; ## Associate process with a new controlling terminal. $pty->make_slave_controlling_terminal; $tty = $pty->slave; $tty_fd = $tty->fileno; close $pty; ## Make standard I/O use the new controlling terminal. open STDIN, “<&$tty_fd” or die $!; open STDOUT, “>&$tty_fd” or die $!; open STDERR, “>&STDOUT” or die $!; close $tty; ## Execute requested program. exec @cmd or die “problem executing $cmd[0] “; } # end child process $pty; } # end sub spawn

Here is an example that uses the openssh program to connect to a remote host. It uses the spawn() subroutine, from the password changing example above, to start the ssh program and then read and write to it via a Net::Telnet object. This example turns off ssh host key checking, which reduces your ability to know when someone on the network is impersonating the remote host. To use the code below, substitute changeme with the actual host, user, password, and command prompt.

## Main program. { my $host = “changeme”; my $user = “changeme”; my $passwd = “changeme”; my $prompt = /changeme\ $/; my ($buf, $match, $pty, $ssh, @lines); ## Start ssh program. $pty = spawn(“ssh”, “-l”, $user, “-e”, “none”, “-F”, “/dev/null”, “-o”, “PreferredAuthentications=password”, “-o”, “NumberOfPasswordPrompts=1”, “-o”, “StrictHostKeyChecking=no”, “-o”, “UserKnownHostsFile=/dev/null”, $host); ## Create a Net::Telnet object to perform I/O on sshs tty. use Net::Telnet; $ssh = new Net::Telnet (-fhopen => $pty, -prompt => $prompt, -telnetmode => 0, -output_record_separator => " “, -cmd_remove_mode => 1); ## Wait for the password prompt and send password. $ssh->waitfor(-match => /password: ?$/i, -errmode => “return”) or die “problem connecting to $host: “, $ssh->lastline; $ssh->print($passwd); ## Wait for the shell prompt. (undef, $match) = $ssh->waitfor(-match => $ssh->prompt, -match => /^Permission denied/m, -errmode => “return”) or return $ssh->error(“login failed: expected shell prompt “, “doesnt match actual “); return $ssh->error(“login failed: bad login-name or password “) if $match =~ /^Permission denied/m; ## Run commands on remote host. print $ssh->cmd(“hostname”); print $ssh->cmd(“uptime”); $ssh->close; exit; } # end main program

Some shells have a rather restrictive 255 character line limit. If you run into this problem, here is an example for sending lines longer than 254 as a sequence of shorter lines.

## Main program. { my $host = “changeme”; my $user = “changeme”; my $passwd = “changeme”; my $prompt = /changeme\ $/; my $cmd = join(””, “echo “, “11111111112222222222333333333344444444445555555555”, “66666666667777777777888888888899999999990000000000”, “11111111112222222222333333333344444444445555555555”, “66666666667777777777888888888899999999990000000000”, “11111111112222222222333333333344444444445555555555”, “66666666667777777777888888888899999999990000000000”); use Net::Telnet (); my $t = new Net::Telnet (-prompt => $prompt); $t->open($host); $t->login($user, $passwd); my @output = cmd_unixlong($t, $cmd); print @output; exit; } # end main program sub cmd_unixlong { my ($obj, $cmd) = @_; my ($line, $pos); my $max_tty_line = 254; ## Start a Bourne shell. $obj->cmd(-string => “/usr/bin/env " . “PS1=<xPROMPTx> PS2=<xPROMPTx> /bin/sh -i”, -prompt => /<xPROMPTx> $/) or return; ## Break-up the one large command line and send as shorter lines. $pos = 0; while (1) { $line = substr $cmd, $pos, $max_tty_line; $pos += length $line; last unless $pos < length $cmd; ## Send the line with continuation char. $obj->cmd(-string => “$line", -prompt => /<xPROMPTx> $/) or return; } ## Send the last line and return the output. $obj->cmd("$line ; exit”); } # end sub cmd_unixlong

AUTHOR

Jay Rogers <[email protected]>

CREDITS

Dave Martin, Dave Cardosi

COPYRIGHT

Copyright 1997, 2000, 2002, 2013, 2021 by Jay Rogers. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2317 - Linux cli command Spreadsheet_WriteExcel_Utilitypm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_WriteExcel_Utilitypm and provides detailed information about the command Spreadsheet_WriteExcel_Utilitypm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_WriteExcel_Utilitypm.

NAME 🖥️ Spreadsheet_WriteExcel_Utilitypm 🖥️

Helper functions for Spreadsheet::WriteExcel.

SYNOPSIS

Functions to help with some common tasks when using Spreadsheet::WriteExcel.

These functions mainly relate to dealing with rows and columns in A1 notation and to handling dates and times.

use Spreadsheet::WriteExcel::Utility; # Import everything ($row, $col) = xl_cell_to_rowcol(C2); # (1, 2) $str = xl_rowcol_to_cell(1, 2); # C2 $str = xl_inc_col(Z1 ); # AA1 $str = xl_dec_col(AA1 ); # Z1 $date = xl_date_list(2002, 1, 1); # 37257 $date = xl_parse_date(“11 July 1997”); # 35622 $time = xl_parse_time(3:21:36 PM); # 0.64 $date = xl_decode_date_EU(“13 May 2002”); # 37389

DESCRIPTION

This module provides a set of functions to help with some common tasks encountered when using the Spreadsheet::WriteExcel module. The two main categories of function are:

Row and column functions: these are used to deal with Excel’s A1 representation of cells. The functions in this category are:

xl_rowcol_to_cell xl_cell_to_rowcol xl_range_formula xl_inc_row xl_dec_row xl_inc_col xl_dec_col

Date and Time functions: these are used to convert dates and times to the numeric format used by Excel. The functions in this category are:

xl_date_list xl_date_1904 xl_parse_time xl_parse_date xl_parse_date_init xl_decode_date_EU xl_decode_date_US

All of these functions are exported by default. However, you can use import lists if you wish to limit the functions that are imported:

use Spreadsheet::WriteExcel::Utility; # Import everything use Spreadsheet::WriteExcel::Utility qw(xl_date_list); # xl_date_list only use Spreadsheet::WriteExcel::Utility qw(:rowcol); # Row/col functions use Spreadsheet::WriteExcel::Utility qw(:dates); # Date functions

ROW AND COLUMN FUNCTIONS

Spreadsheet::WriteExcel supports two forms of notation to designate the position of cells: Row-column notation and A1 notation.

Row-column notation uses a zero based index for both row and column while A1 notation uses the standard Excel alphanumeric sequence of column letter and 1-based row. Columns range from A to IV i.e. 0 to 255, rows range from 1 to 16384 in Excel 5 and 65536 in Excel 97. For example:

(0, 0) # The top left cell in row-column notation. (A1) # The top left cell in A1 notation. (1999, 29) # Row-column notation. (AD2000) # The same cell in A1 notation.

Row-column notation is useful if you are referring to cells programmatically:

for my $i (0 .. 9) { $worksheet->write($i, 0, Hello); # Cells A1 to A10 }

A1 notation is useful for setting up a worksheet manually and for working with formulas:

$worksheet->write(H1, 200); $worksheet->write(H2, =H7+1);

The functions in the following sections can be used for dealing with A1 notation, for example:

($row, $col) = xl_cell_to_rowcol(C2); # (1, 2) $str = xl_rowcol_to_cell(1, 2); # C2

Cell references in Excel can be either relative or absolute. Absolute references are prefixed by the dollar symbol as shown below:

A1 # Column and row are relative $A1 # Column is absolute and row is relative A$1 # Column is relative and row is absolute $A$1 # Column and row are absolute

An absolute reference only has an effect if the cell is copied. Refer to the Excel documentation for further details. All of the following functions support absolute references.

xl_rowcol_to_cell($row, $col, $row_absolute, $col_absolute)

Parameters: $row: Integer $col: Integer $row_absolute: Boolean (1/0) [optional, default is 0] $col_absolute: Boolean (1/0) [optional, default is 0] Returns: A string in A1 cell notation

This function converts a zero based row and column cell reference to a A1 style string:

$str = xl_rowcol_to_cell(0, 0); # A1 $str = xl_rowcol_to_cell(0, 1); # B1 $str = xl_rowcol_to_cell(1, 0); # A2

The optional parameters $row_absolute and $col_absolute can be used to indicate if the row or column is absolute:

$str = xl_rowcol_to_cell(0, 0, 0, 1); # $A1 $str = xl_rowcol_to_cell(0, 0, 1, 0); # A$1 $str = xl_rowcol_to_cell(0, 0, 1, 1); # $A$1

See ROW AND COLUMN FUNCTIONS for an explanation of absolute cell references.

xl_cell_to_rowcol($string)

Parameters: $string String in A1 format Returns: List ($row, $col)

This function converts an Excel cell reference in A1 notation to a zero based row and column. The function will also handle Excel’s absolute, $, cell notation.

my ($row, $col) = xl_cell_to_rowcol(A1); # (0, 0) my ($row, $col) = xl_cell_to_rowcol(B1); # (0, 1) my ($row, $col) = xl_cell_to_rowcol(C2); # (1, 2) my ($row, $col) = xl_cell_to_rowcol($C2 ); # (1, 2) my ($row, $col) = xl_cell_to_rowcol(C$2 ); # (1, 2) my ($row, $col) = xl_cell_to_rowcol($C$2); # (1, 2)

xl_range_formula($sheetname, $row_1, $row_2, $col_1, $col_2)

Parameters: $sheetname String $row_1: Integer $row_2: Integer $col_1: Integer $col_2: Integer Returns: A worksheet range formula as a string.

This function converts zero based row and column cell references to an A1 style formula string:

my $str = xl_range_formula(Sheet1, 0, 9, 0, 0); # =Sheet1!$A$1:$A$10 my $str = xl_range_formula(Sheet2, 6, 65, 1, 1); # =Sheet2!$B$7:$B$66 my $str = xl_range_formula(New data, 1, 8, 2, 2); # =New data!$C$2:$C$9

This is useful for setting ranges in Chart objects:

$chart->add_series( categories => xl_range_formula(Sheet1, 1, 9, 0, 0), values => xl_range_formula(Sheet1, 1, 9, 1, 1), ); # Which is the same as: $chart->add_series( categories => =Sheet1!$A$2:$A$10, values => =Sheet1!$B$2:$B$10, );

xl_inc_row($string)

Parameters: $string, a string in A1 format Returns: Incremented string in A1 format

This functions takes a cell reference string in A1 notation and increments the row. The function will also handle Excel’s absolute, $, cell notation:

my $str = xl_inc_row(A1 ); # A2 my $str = xl_inc_row(B$2 ); # B$3 my $str = xl_inc_row($C3 ); # $C4 my $str = xl_inc_row($D$4); # $D$5

xl_dec_row($string)

Parameters: $string, a string in A1 format Returns: Decremented string in A1 format

This functions takes a cell reference string in A1 notation and decrements the row. The function will also handle Excel’s absolute, $, cell notation:

my $str = xl_dec_row(A2 ); # A1 my $str = xl_dec_row(B$3 ); # B$2 my $str = xl_dec_row($C4 ); # $C3 my $str = xl_dec_row($D$5); # $D$4

xl_inc_col($string)

Parameters: $string, a string in A1 format Returns: Incremented string in A1 format

This functions takes a cell reference string in A1 notation and increments the column. The function will also handle Excel’s absolute, $, cell notation:

my $str = xl_inc_col(A1 ); # B1 my $str = xl_inc_col(Z1 ); # AA1 my $str = xl_inc_col($B1 ); # $C1 my $str = xl_inc_col($D$5); # $E$5

xl_dec_col($string)

Parameters: $string, a string in A1 format Returns: Decremented string in A1 format

This functions takes a cell reference string in A1 notation and decrements the column. The function will also handle Excel’s absolute, $, cell notation:

my $str = xl_dec_col(B1 ); # A1 my $str = xl_dec_col(AA1 ); # Z1 my $str = xl_dec_col($C1 ); # $B1 my $str = xl_dec_col($E$5); # $D$5

TIME AND DATE FUNCTIONS

Dates and times in Excel are represented by real numbers, for example Jan 1 2001 12:30 AM is represented by the number 36892.521.

The integer part of the number stores the number of days since the epoch and the fractional part stores the percentage of the day in seconds.

The epoch can be either 1900 or 1904. Excel for Windows uses 1900 and Excel for Macintosh uses 1904. The epochs are:

1900: 0 January 1900 i.e. 31 December 1899 1904: 1 January 1904

Excel on Windows and the Macintosh will convert automatically between one system and the other. By default Spreadsheet::WriteExcel uses the 1900 format. To use the 1904 epoch you must use the set_1904() workbook method, see the Spreadsheet::WriteExcel documentation.

There are two things to note about the 1900 date format. The first is that the epoch starts on 0 January 1900. The second is that the year 1900 is erroneously but deliberately treated as a leap year. Therefore you must add an extra day to dates after 28 February 1900. The functions in the following section will deal with these issues automatically. The reason for this anomaly is explained at http://support.microsoft.com/support/kb/articles/Q181/3/70.asp

Note, a date or time in Excel is like any other number. To display the number as a date you must apply a number format to it: Refer to the set_num_format() method in the Spreadsheet::WriteExcel documentation:

$date = xl_date_list(2001, 1, 1, 12, 30); $format->set_num_format(mmm d yyyy hh:mm AM/PM); $worksheet->write(A1, $date , $format); # Jan 1 2001 12:30 AM

To use these functions you must install the Date::Manip and Date::Calc modules. See REQUIREMENTS and the individual requirements of each functions.

See also the DateTime::Format::Excel module,http://search.cpan.org/search?dist=DateTime-Format-Excel which is part of the DateTime project and which deals specifically with converting dates and times to and from Excel’s format.

xl_date_list($years, $months, $days, $hours, $minutes, $seconds)

Parameters: $years: Integer $months: Integer [optional, default is 1] $days: Integer [optional, default is 1] $hours: Integer [optional, default is 0] $minutes: Integer [optional, default is 0] $seconds: Float [optional, default is 0] Returns: A number that represents an Excel date or undef for an invalid date. Requires: Date::Calc

This function converts an array of data into a number that represents an Excel date. All of the parameters are optional except for $years.

$date1 = xl_date_list(2002, 1, 2); # 2 Jan 2002 $date2 = xl_date_list(2002, 1, 2, 12); # 2 Jan 2002 12:00 pm $date3 = xl_date_list(2002, 1, 2, 12, 30); # 2 Jan 2002 12:30 pm $date4 = xl_date_list(2002, 1, 2, 12, 30, 45); # 2 Jan 2002 12:30:45 pm

This function can be used in conjunction with functions that parse date and time strings. In fact it is used in most of the following functions.

xl_parse_time($string)

Parameters: $string, a textual representation of a time Returns: A number that represents an Excel time or undef for an invalid time.

This function converts a time string into a number that represents an Excel time. The following time formats are valid:

hh:mm [AM|PM] hh:mm [AM|PM] hh:mm:ss [AM|PM] hh:mm:ss.ss [AM|PM]

The meridian, AM or PM, is optional and case insensitive. A 24 hour time is assumed if the meridian is omitted

$time1 = xl_parse_time(12:18); $time2 = xl_parse_time(12:18:14); $time3 = xl_parse_time(12:18:14 AM); $time4 = xl_parse_time(1:18:14 AM);

Time in Excel is expressed as a fraction of the day in seconds. Therefore you can calculate an Excel time as follows:

$time = ($hours*3600 +$minutes*60 +$seconds)/(24*60*60);

xl_parse_date($string)

Parameters: $string, a textual representation of a date and time Returns: A number that represents an Excel date or undef for an invalid date. Requires: Date::Manip and Date::Calc

This function converts a date and time string into a number that represents an Excel date.

The parsing is performed using the ParseDate() function of the Date::Manip module. Refer to the Date::Manip documentation for further information about the date and time formats that can be parsed. In order to use this function you will probably have to initialise some Date::Manip variables via the xl_parse_date_init() function, see below.

xl_parse_date_init(“TZ=GMT”,“DateFormat=non-US”); $date1 = xl_parse_date(“11/7/97”); $date2 = xl_parse_date(“Friday 11 July 1997”); $date3 = xl_parse_date(“10:30 AM Friday 11 July 1997”); $date4 = xl_parse_date(“Today”); $date5 = xl_parse_date(“Yesterday”);

Note, if you parse a string that represents a time but not a date this function will add the current date. If you want the time without the date you can do something like the following:

$time = xl_parse_date(“10:30 AM”); $time -= int($time);

xl_parse_date_init(“variable=value”, …)

Parameters: A list of Date::Manip variable strings Returns: A list of all the Date::Manip strings Requires: Date::Manip

This function is used to initialise variables required by the Date::Manip module. You should call this function before calling xl_parse_date(). It need only be called once.

This function is a thin wrapper for the Date::Manip::Date_Init() function. You can use Date_Init() directly if you wish. Refer to the Date::Manip documentation for further information.

xl_parse_date_init(“TZ=MST”,“DateFormat=US”); $date1 = xl_parse_date(“11/7/97”); # November 7th 1997 xl_parse_date_init(“TZ=GMT”,“DateFormat=non-US”); $date1 = xl_parse_date(“11/7/97”); # July 11th 1997

xl_decode_date_EU($string)

Parameters: $string, a textual representation of a date and time Returns: A number that represents an Excel date or undef for an invalid date. Requires: Date::Calc

This function converts a date and time string into a number that represents an Excel date.

The date parsing is performed using the Decode_Date_EU() function of the Date::Calc module. Refer to the Date::Calc for further information about the date formats that can be parsed. Also note the following from the Date::Calc documentation:

If the year is given as one or two digits only (i.e., if the year is less than 100), it is mapped to the window 1970 -2069 as follows:

0 E<lt>= $year E<lt> 70 ==> $year += 2000; 70 E<lt>= $year E<lt> 100 ==> $year += 1900;

The time portion of the string is parsed using the xl_parse_time() function described above.

Note: the EU in the function name means that a European date format is assumed if it is not clear from the string. See the first example below.

$date1 = xl_decode_date_EU(“11/7/97”); #11 July 1997 $date2 = xl_decode_date_EU(“Sat 12 Sept 1998”); $date3 = xl_decode_date_EU(“4:30 AM Sat 12 Sept 1998”);

xl_decode_date_US($string)

Parameters: $string, a textual representation of a date and time Returns: A number that represents an Excel date or undef for an invalid date. Requires: Date::Calc

This function converts a date and time string into a number that represents an Excel date.

The date parsing is performed using the Decode_Date_US() function of the Date::Calc module. Refer to the Date::Calc for further information about the date formats that can be parsed. Also note the following from the Date::Calc documentation:

If the year is given as one or two digits only (i.e., if the year is less than 100), it is mapped to the window 1970 -2069 as follows:

0 <= $year < 70 ==> $year += 2000; 70 <= $year < 100 ==> $year += 1900;

The time portion of the string is parsed using the xl_parse_time() function described above.

Note: the US in the function name means that an American date format is assumed if it is not clear from the string. See the first example below.

$date1 = xl_decode_date_US(“11/7/97”); # 7 November 1997 $date2 = xl_decode_date_US(“12 Sept Saturday 1998”); $date3 = xl_decode_date_US(“4:30 AM 12 Sept Sat 1998”);

xl_date_1904($date)

Parameters: $date, an Excel date with a 1900 epoch Returns: an Excel date with a 1904 epoch or zero if the $date is before 1904

This function converts an Excel date based on the 1900 epoch into a date based on the 1904 epoch.

$date1 = xl_date_list(2002, 1, 13); # 13 Jan 2002, 1900 epoch $date2 = xl_date_1904($date1); # 13 Jan 2002, 1904 epoch

See also the set_1904() workbook method in the Spreadsheet::WriteExcel documentation.

REQUIREMENTS

The date and time functions require functions from the Date::Manip and Date::Calc modules. The required functions are autoused from these modules so that you do not have to install them unless you wish to use the date and time routines. Therefore it is possible to use the row and column functions without having Date::Manip and Date::Calc installed.

For more information about autousing refer to the documentation on the autouse pragma.

BUGS

When using the autoused functions from Date::Manip and Date::Calc on Perl 5.6.0 with -w you will get a warning like this:

“Subroutine xxx redefined …”

The current workaround for this is to put use warnings; near the beginning of your program.

AUTHOR

John McNamara [email protected]

COPYRIGHT

Copyright MM-MMX, John McNamara.

All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2318 - Linux cli command X11_Authpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command X11_Authpm and provides detailed information about the command X11_Authpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the X11_Authpm.

NAME 🖥️ X11_Authpm 🖥️

Perl module to read X11 authority files

SYNOPSIS

require X11::Auth; $a = new X11::Auth; ($auth_type, $auth_data) = $a->get_by_host($host, $disp_num);

DESCRIPTION

This module is an approximate perl replacement for the libXau C library and the xauth (1) program. It reads and interprets the files (usually ‘~/.Xauthority’) that hold authorization data used in connecting to X servers. Since it was written mainly for the use of X11::Protocol, its functionality is currently restricted to reading, not writing, of these files.

METHODS

new

$auth = X11::Auth->new; $auth = X11::Auth->open($filename);

Open an authority file, and create an object to handle it. The filename will be taken from the XAUTHORITY environment variable, if present, or ‘.Xauthority’ in the user’s home directory, or it may be overridden by an argument. ‘open’ may be used as a synonym.

get_one

($family, $host_addr, $display_num, $auth_name, $auth_data) = $auth->get_one;

Read one entry from the file. Returns a null list at end of file. $family is usually ‘Internet’ or ‘Local’, and $display_num can be any string.

get_all

@auth_data = $auth->get_all;

Read all of the entries in the file. Each member of the array returned is an array ref similar to the list returned by get_one().

get_by_host

($auth_name, $auth_data) = $auth->get_by_host($host, $family, $display_num);

Get authentication data for a connection of type $family to display $display_num on $host. If $family is ‘Internet’, the host will be translated into an appropriate address by gethostbyname(). If no data is found, returns an empty list.

COMPATIBILITY

The following table shows the (rough) correspondence between libXau calls and X11::Auth methods:

libXau X11::Auth —— ——— XauFileName $ENV{XAUTHORITY} || “$ENV{HOME}/.Xauthority” fopen(XauFileName(), “rb”) $auth = new X11::Auth XauReadAuth $auth->get_one XauWriteAuth XauGetAuthByAddr $auth->get_by_host XauGetBestAuthByAddr XauLockAuth XauUnlockAuth XauDisposeAuth

AUTHOR

Stephen McCamant <[email protected]>

SEE ALSO

perl (1), X11::Protocol, Xau (3), xauth (1), lib/Xau/README in the X11 source distribution.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2319 - Linux cli command XmbufCreateBuffers

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XmbufCreateBuffers and provides detailed information about the command XmbufCreateBuffers, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XmbufCreateBuffers.

NAME 🖥️ XmbufCreateBuffers 🖥️

X multibuffering functions

SYNTAX

#include <X11/extensions/multibuf.h>

Bool XmbufQueryExtension(
    Display *dpy,
    Display *dpy,
    int *event_base_return,
    int *error_base_return);

Status XmbufGetVersion(
    Display *dpy,
    int *major_version_return,
    int *minor_version_return);

int XmbufCreateBuffers(
    Display *dpy,
    Window window,
    int count,
    int update_action,
    int update_hint,
    Multibuffer *buffers_update);

void XmbufDestroyBuffers(
    Display *dpy,
    Window window);

void XmbufDisplayBuffers(
    Display *dpy,
    int count,
    Multibuffer *buffers,
    int min_delay,
    int max_delay);

Status XmbufGetWindowAttributes(
    Display *dpy,
    Window window,
    XmbufWindowAttributes *attributes);

void XmbufChangeWindowAttributes(
    Display *dpy,
    Window window,
    unsigned long valuemask,
    XmbufSetWindowAttributes *attributes);

Status XmbufGetBufferAttributes(
    Display *dpy,
    Multibuffer buffer,
    XmbufBufferAttributes *attributes);

void XmbufChangeBufferAttributes(
    Display *dpy,
    Multibuffer buffer,
    unsigned long valuemask,
    XmbufSetBufferAttributes *attributes);

Status XmbufGetScreenInfo(
    Display *dpy,
    Drawable drawable,
    int *nmono_return,
    XmbufBufferInfo **mono_info_return,
    int *nstereo_return,
    XmbufBufferInfo **stereo_info_return);

Window XmbufCreateStereoWindow(
    Display *dpy,
    Window parent,
    int x,
    int y,
    unsigned int width,
    unsigned int height,
    unsigned int border_width,
    int depth,
    unsigned int class,                 /* InputOutput, InputOnly*/
    Visual *visual,
    unsigned long valuemask,
    XSetWindowAttributes *attributes,
    Multibuffer *left_return,
    Multibuffer *right_return);

STRUCTURES

Events:

typedef struct {
    int type;   /* of event */
    unsigned long serial;       /* # of last request processed by server */
    int send_event;     /* true if this came from a SendEvent request */
    Display *display;   /* Display the event was read from */
    Multibuffer buffer; /* buffer of event */
    int state;  /* see Clobbered constants above */
} XmbufClobberNotifyEvent;

typedef struct {
    int type;   /* of event */
    unsigned long serial;       /* # of last request processed by server */
    int send_event;     /* true if this came from a SendEvent request */
    Display *display;   /* Display the event was read from */
    Multibuffer buffer; /* buffer of event */
} XmbufUpdateNotifyEvent;

Per-window attributes that can be got:

typedef struct {
    int displayed_index;	/* which buffer is being displayed */
    int update_action;	/* Undefined, Background, Untouched, Copied */
    int update_hint;	/* Frequent, Intermittent, Static */
    int window_mode;	/* Mono, Stereo */
    int nbuffers;	/* Number of buffers */
    Multibuffer *buffers;	/* Buffers */
} XmbufWindowAttributes;

Per-window attributes that can be set:

typedef struct {
    int update_hint;	/* Frequent, Intermittent, Static */
} XmbufSetWindowAttributes;

Per-buffer attributes that can be got:

typedef struct {
    Window window;	/* which window this belongs to */
    unsigned long event_mask;	/* events that have been selected */
    int buffer_index;	/* which buffer is this */
    int side;	/* Mono, Left, Right */
} XmbufBufferAttributes;

Per-buffer attributes that can be set:

typedef struct {
    unsigned long event_mask;	/* events that have been selected */
} XmbufSetBufferAttributes;

Per-screen buffer info (there will be lists of them):

typedef struct {
    VisualID visualid;	/* visual usable at this depth */
    int max_buffers;	/* most buffers for this visual */
    int depth;	/* depth of buffers to be created */
} XmbufBufferInfo;

DESCRIPTION

The application programming library for the X11 Double-Buffering, Multi-Buffering, and Stereo Extension contains the interfaces described below. With the exception of * XmbufQueryExtension *, if any of these routines are called with a display that does not support the extension, the ExtensionErrorHandler (which can be set with * XSetExtensionErrorHandler * and functions the same way as * XSetErrorHandler *) will be called and the function will then return.

* XmbufQueryExtension * returns * True * if the multibuffering/stereo extension is available on the given display. If the extension exists, the value of the first event code (which should be added to the event type constants * MultibufferClobberNotify * and * MultibufferUpdateNotify * to get the actual values) is stored into event_base_return and the value of the first error code (which should be added to the error type constant * MultibufferBadBuffer * to get the actual value) is stored into error_base_return.

* XmbufGetVersion * gets the major and minor version numbers of the extension. The return value is zero if an error occurs or non-zero if no error happens.

* XmbufCreateBuffers * requests that “count” buffers be created with the given update_action and update_hint and be associated with the indicated window. The number of buffers created is returned (zero if an error occurred) and buffers_update is filled in with that many Multibuffer identifiers.

* XmbufDestroyBuffers * destroys the buffers associated with the given window.

* XmbufDisplayBuffers * displays the indicated buffers their appropriate windows within max_delay milliseconds after min_delay milliseconds have passed. No two buffers may be associated with the same window or else a Match error is generated.

* XmbufGetWindowAttributes * gets the multibuffering attributes that apply to all buffers associated with the given window. The list of buffers returns may be freed with * XFree *. Returns non-zero on success and zero if an error occurs.

* XmbufChangeWindowAttributes * sets the multibuffering attributes that apply to all buffers associated with the given window. This is currently limited to the update_hint.

* XmbufGetBufferAttributes * gets the attributes for the indicated buffer. Returns non-zero on success and zero if an error occurs.

* XmbufChangeBufferAttributes * sets the attributes for the indicated buffer. This is currently limited to the event_mask.

* XmbufGetScreenInfo * gets the parameters controlling how mono and stereo windows may be created on the screen of the given drawable. The numbers of sets of visual and depths are returned in nmono_return and nstereo_return. If nmono_return is greater than zero, then mono_info_return is set to the address of an array of * XmbufBufferInfo * structures describing the various visuals and depths that may be used. Otherwise, mono_info_return is set to NULL. Similarly, stereo_info_return is set according to nstereo_return. The storage returned in mono_info_return and stereo_info_return may be released by * XFree *. If no errors are encounted, non-zero will be returned.

* XmbufCreateStereoWindow * creates a stereo window in the same way that * XCreateWindow * creates a mono window. The buffer ids for the left and right buffers are returned in left_return and right_return, respectively. If an extension error handler that returns is installed, * None * will be returned if the extension is not available on this display.

PREDEFINED VALUES

Update_action field:

 MultibufferUpdateActionUndefined   MultibufferUpdateActionBackground   MultibufferUpdateActionUntouched   MultibufferUpdateActionCopied 

Update_hint field:

 MultibufferUpdateHintFrequent   MultibufferUpdateHintIntermittent   MultibufferUpdateHintStatic 

Valuemask fields:

 MultibufferWindowUpdateHint   MultibufferBufferEventMask 

Mono vs. stereo and left vs. right:

 MultibufferModeMono   MultibufferModeStereo   MultibufferSideMono   MultibufferSideLeft   MultibufferSideRight 

Clobber state:

 MultibufferUnclobbered   MultibufferPartiallyClobbered   MultibufferFullyClobbered 

Event stuff:

 MultibufferClobberNotifyMask   MultibufferUpdateNotifyMask   MultibufferClobberNotify   MultibufferUpdateNotify   MultibufferNumberEvents   MultibufferBadBuffer   MultibufferNumberErrors 

BUGS

This manual page needs more work.

SEE ALSO

Extending X for Double Buffering, Multi-Buffering, and Stereo

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2320 - Linux cli command Image_ExifTool_CaptureOnepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_CaptureOnepm and provides detailed information about the command Image_ExifTool_CaptureOnepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_CaptureOnepm.

NAME 🖥️ Image_ExifTool_CaptureOnepm 🖥️

Read Capture One EIP and COS files

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to extract meta information from Capture One EIP (Enhanced Image Package) and COS (Capture One Settings) files.

NOTES

The EIP format is a ZIP file containing an image (IIQ or TIFF) and some settings files (COS).

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

“ZIP Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2321 - Linux cli command mkfifoat

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mkfifoat and provides detailed information about the command mkfifoat, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mkfifoat.

NAME 🖥️ mkfifoat 🖥️

make a FIFO special file (a named pipe)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <sys/stat.h>
int mkfifo(const char *pathname, mode_t mode);
#include <fcntl.h> /* Definition of AT_* constants */
#include <sys/stat.h>
int mkfifoat(int dirfd, const char *pathname, mode_t mode);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

mkfifoat():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _ATFILE_SOURCE

DESCRIPTION

mkfifo() makes a FIFO special file with name pathname. mode specifies the FIFO’s permissions. It is modified by the process’s umask in the usual way: the permissions of the created file are **(**mode & ~umask).

A FIFO special file is similar to a pipe, except that it is created in a different way. Instead of being an anonymous communications channel, a FIFO special file is entered into the filesystem by calling mkfifo().

Once you have created a FIFO special file in this way, any process can open it for reading or writing, in the same way as an ordinary file. However, it has to be open at both ends simultaneously before you can proceed to do any input or output operations on it. Opening a FIFO for reading normally blocks until some other process opens the same FIFO for writing, and vice versa. See fifo(7) for nonblocking handling of FIFO special files.

mkfifoat()

The mkfifoat() function operates in exactly the same way as mkfifo(), except for the differences described here.

If the pathname given in pathname is relative, then it is interpreted relative to the directory referred to by the file descriptor dirfd (rather than relative to the current working directory of the calling process, as is done by mkfifo() for a relative pathname).

If pathname is relative and dirfd is the special value AT_FDCWD, then pathname is interpreted relative to the current working directory of the calling process (like mkfifo()).

If pathname is absolute, then dirfd is ignored.

See openat(2) for an explanation of the need for mkfifoat().

RETURN VALUE

On success mkfifo() and mkfifoat() return 0. On error, -1 is returned and errno is set to indicate the error.

ERRORS

EACCES
One of the directories in pathname did not allow search (execute) permission.

EBADF
(mkfifoat()) pathname is relative but dirfd is neither AT_FDCWD nor a valid file descriptor.

EDQUOT
The user’s quota of disk blocks or inodes on the filesystem has been exhausted.

EEXIST
pathname already exists. This includes the case where pathname is a symbolic link, dangling or not.

ENAMETOOLONG
Either the total length of pathname is greater than PATH_MAX, or an individual filename component has a length greater than NAME_MAX. In the GNU system, there is no imposed limit on overall filename length, but some filesystems may place limits on the length of a component.

ENOENT
A directory component in pathname does not exist or is a dangling symbolic link.

ENOSPC
The directory or filesystem has no room for the new file.

ENOTDIR
A component used as a directory in pathname is not, in fact, a directory.

ENOTDIR
(mkfifoat()) pathname is a relative pathname and dirfd is a file descriptor referring to a file other than a directory.

EROFS
pathname refers to a read-only filesystem.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mkfifo(), mkfifoat()

Thread safetyMT-Safe

VERSIONS

It is implemented using mknodat(2).

STANDARDS

POSIX.1-2008.

HISTORY

mkfifo()
POSIX.1-2001.

mkfifoat()
glibc 2.4. POSIX.1-2008.

SEE ALSO

mkfifo(1), close(2), open(2), read(2), stat(2), umask(2), write(2), fifo(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2322 - Linux cli command scandirat

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command scandirat and provides detailed information about the command scandirat, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the scandirat.

NAME 🖥️ scandirat 🖥️

scan a directory for matching entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <dirent.h>
int scandir(const char *restrict dirp,
 struct dirent ***restrict namelist,
 int (*filter)(const struct dirent *),
 int (*compar)(const struct dirent **,
 const struct dirent **));
int alphasort(const struct dirent **a, const struct dirent **b);
int versionsort(const struct dirent **a, const struct dirent **b);
#include <fcntl.h> /* Definition of AT_* constants */
#include <dirent.h>
int scandirat(int dirfd, const char *restrict dirp,
 struct dirent ***restrict namelist,
 int (*filter)(const struct dirent *),
 int (*compar)(const struct dirent **,
 const struct dirent **));

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

scandir(), alphasort():

    /* Since glibc 2.10: */ _POSIX_C_SOURCE >= 200809L
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

versionsort():

    _GNU_SOURCE

scandirat():

    _GNU_SOURCE

DESCRIPTION

The scandir() function scans the directory dirp, calling filter() on each directory entry. Entries for which filter() returns nonzero are stored in strings allocated via malloc(3), sorted using qsort(3) with the comparison function compar(), and collected in array namelist which is allocated via malloc(3). If filter is NULL, all entries are selected.

The alphasort() and versionsort() functions can be used as the comparison function compar(). The former sorts directory entries using strcoll(3), the latter using strverscmp(3) on the strings (*a)->d_name and (*b)->d_name.

scandirat()

The scandirat() function operates in exactly the same way as scandir(), except for the differences described here.

If the pathname given in dirp is relative, then it is interpreted relative to the directory referred to by the file descriptor dirfd (rather than relative to the current working directory of the calling process, as is done by scandir() for a relative pathname).

If dirp is relative and dirfd is the special value AT_FDCWD, then dirp is interpreted relative to the current working directory of the calling process (like scandir()).

If dirp is absolute, then dirfd is ignored.

See openat(2) for an explanation of the need for scandirat().

RETURN VALUE

The scandir() function returns the number of directory entries selected. On error, -1 is returned, with errno set to indicate the error.

The alphasort() and versionsort() functions return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second.

ERRORS

EBADF
(scandirat()) dirp is relative but dirfd is neither AT_FDCWD nor a valid file descriptor.

ENOENT
The path in dirp does not exist.

ENOMEM
Insufficient memory to complete the operation.

ENOTDIR
The path in dirp is not a directory.

ENOTDIR
(scandirat()) dirp is a relative pathname and dirfd is a file descriptor referring to a file other than a directory.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

scandir(), scandirat()

Thread safetyMT-Safe

alphasort(), versionsort()

Thread safetyMT-Safe locale

STANDARDS

alphasort()
scandir()
POSIX.1-2008.

versionsort()
scandirat()
GNU.

HISTORY

alphasort()
scandir()
4.3BSD, POSIX.1-2008.

versionsort()
glibc 2.1.

scandirat()
glibc 2.15.

NOTES

Since glibc 2.1, alphasort() calls strcoll(3); earlier it used strcmp(3).

Before glibc 2.10, the two arguments of alphasort() and versionsort() were typed as const void *. When alphasort() was standardized in POSIX.1-2008, the argument type was specified as the type-safe const struct dirent **, and glibc 2.10 changed the definition of alphasort() (and the nonstandard versionsort()) to match the standard.

EXAMPLES

The program below prints a list of the files in the current directory in reverse order.

Program source

#define _DEFAULT_SOURCE
#include <dirent.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    struct dirent **namelist;
    int n;
    n = scandir(".", &namelist, NULL, alphasort);
    if (n == -1) {
        perror("scandir");
        exit(EXIT_FAILURE);
    }
    while (n--) {
        printf("%s

“, namelist[n]->d_name); free(namelist[n]); } free(namelist); exit(EXIT_SUCCESS); }

SEE ALSO

closedir(3), fnmatch(3), opendir(3), readdir(3), rewinddir(3), seekdir(3), strcmp(3), strcoll(3), strverscmp(3), telldir(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2323 - Linux cli command fseeko

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fseeko and provides detailed information about the command fseeko, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fseeko.

NAME 🖥️ fseeko 🖥️

seek to or report file position

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int fseeko(FILE *stream, off_t offset, int whence);
off_t ftello(FILE *stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

fseeko(), ftello():

    _FILE_OFFSET_BITS == 64 || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The fseeko() and ftello() functions are identical to fseek(3) and ftell(3) (see fseek(3)), respectively, except that the offset argument of fseeko() and the return value of ftello() is of type off_t instead of long.

On some architectures, both off_t and long are 32-bit types, but defining _FILE_OFFSET_BITS with the value 64 (before including any header files) will turn off_t into a 64-bit type.

RETURN VALUE

On successful completion, fseeko() returns 0, while ftello() returns the current offset. Otherwise, -1 is returned and errno is set to indicate the error.

ERRORS

See the ERRORS in fseek(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fseeko(), ftello()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.1. POSIX.1-2001, SUSv2.

NOTES

The declarations of these functions can also be obtained by defining the obsolete _LARGEFILE_SOURCE feature test macro.

SEE ALSO

fseek(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2324 - Linux cli command nextafterl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command nextafterl and provides detailed information about the command nextafterl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the nextafterl.

NAME 🖥️ nextafterl 🖥️

floating-point number manipulation

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double nextafter(double x, double y);
float nextafterf(float x, float y);
long double nextafterl(long double x, long double y);
double nexttoward(double x, long double y);
float nexttowardf(float x, long double y);
long double nexttowardl(long double x, long double y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

nextafter():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

nextafterf(), nextafterl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

nexttoward(), nexttowardf(), nexttowardl():

    _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE
        || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The nextafter(), nextafterf(), and nextafterl() functions return the next representable floating-point value following x in the direction of y. If y is less than x, these functions will return the largest representable number less than x.

If x equals y, the functions return y.

The nexttoward(), nexttowardf(), and nexttowardl() functions do the same as the corresponding nextafter() functions, except that they have a long double second argument.

RETURN VALUE

On success, these functions return the next representable floating-point value after x in the direction of y.

If x equals y, then y (cast to the same type as x) is returned.

If x or y is a NaN, a NaN is returned.

If x is finite, and the result would overflow, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the correct mathematical sign.

If x is not equal to y, and the correct function result would be subnormal, zero, or underflow, a range error occurs, and either the correct value (if it can be represented), or 0.0, is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error: result overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error: result is subnormal or underflows
errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

nextafter(), nextafterf(), nextafterl(), nexttoward(), nexttowardf(), nexttowardl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

This function is defined in IEC 559 (and the appendix with recommended functions in IEEE 754/IEEE 854).

HISTORY

C99, POSIX.1-2001.

BUGS

In glibc 2.5 and earlier, these functions do not raise an underflow floating-point (FE_UNDERFLOW) exception when an underflow occurs.

Before glibc 2.23 these functions did not set errno.

SEE ALSO

nearbyint(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2325 - Linux cli command XmbufCreateStereoWindow

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XmbufCreateStereoWindow and provides detailed information about the command XmbufCreateStereoWindow, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XmbufCreateStereoWindow.

NAME 🖥️ XmbufCreateStereoWindow 🖥️

X multibuffering functions

SYNTAX

#include <X11/extensions/multibuf.h>

Bool XmbufQueryExtension(
    Display *dpy,
    Display *dpy,
    int *event_base_return,
    int *error_base_return);

Status XmbufGetVersion(
    Display *dpy,
    int *major_version_return,
    int *minor_version_return);

int XmbufCreateBuffers(
    Display *dpy,
    Window window,
    int count,
    int update_action,
    int update_hint,
    Multibuffer *buffers_update);

void XmbufDestroyBuffers(
    Display *dpy,
    Window window);

void XmbufDisplayBuffers(
    Display *dpy,
    int count,
    Multibuffer *buffers,
    int min_delay,
    int max_delay);

Status XmbufGetWindowAttributes(
    Display *dpy,
    Window window,
    XmbufWindowAttributes *attributes);

void XmbufChangeWindowAttributes(
    Display *dpy,
    Window window,
    unsigned long valuemask,
    XmbufSetWindowAttributes *attributes);

Status XmbufGetBufferAttributes(
    Display *dpy,
    Multibuffer buffer,
    XmbufBufferAttributes *attributes);

void XmbufChangeBufferAttributes(
    Display *dpy,
    Multibuffer buffer,
    unsigned long valuemask,
    XmbufSetBufferAttributes *attributes);

Status XmbufGetScreenInfo(
    Display *dpy,
    Drawable drawable,
    int *nmono_return,
    XmbufBufferInfo **mono_info_return,
    int *nstereo_return,
    XmbufBufferInfo **stereo_info_return);

Window XmbufCreateStereoWindow(
    Display *dpy,
    Window parent,
    int x,
    int y,
    unsigned int width,
    unsigned int height,
    unsigned int border_width,
    int depth,
    unsigned int class,                 /* InputOutput, InputOnly*/
    Visual *visual,
    unsigned long valuemask,
    XSetWindowAttributes *attributes,
    Multibuffer *left_return,
    Multibuffer *right_return);

STRUCTURES

Events:

typedef struct {
    int type;   /* of event */
    unsigned long serial;       /* # of last request processed by server */
    int send_event;     /* true if this came from a SendEvent request */
    Display *display;   /* Display the event was read from */
    Multibuffer buffer; /* buffer of event */
    int state;  /* see Clobbered constants above */
} XmbufClobberNotifyEvent;

typedef struct {
    int type;   /* of event */
    unsigned long serial;       /* # of last request processed by server */
    int send_event;     /* true if this came from a SendEvent request */
    Display *display;   /* Display the event was read from */
    Multibuffer buffer; /* buffer of event */
} XmbufUpdateNotifyEvent;

Per-window attributes that can be got:

typedef struct {
    int displayed_index;	/* which buffer is being displayed */
    int update_action;	/* Undefined, Background, Untouched, Copied */
    int update_hint;	/* Frequent, Intermittent, Static */
    int window_mode;	/* Mono, Stereo */
    int nbuffers;	/* Number of buffers */
    Multibuffer *buffers;	/* Buffers */
} XmbufWindowAttributes;

Per-window attributes that can be set:

typedef struct {
    int update_hint;	/* Frequent, Intermittent, Static */
} XmbufSetWindowAttributes;

Per-buffer attributes that can be got:

typedef struct {
    Window window;	/* which window this belongs to */
    unsigned long event_mask;	/* events that have been selected */
    int buffer_index;	/* which buffer is this */
    int side;	/* Mono, Left, Right */
} XmbufBufferAttributes;

Per-buffer attributes that can be set:

typedef struct {
    unsigned long event_mask;	/* events that have been selected */
} XmbufSetBufferAttributes;

Per-screen buffer info (there will be lists of them):

typedef struct {
    VisualID visualid;	/* visual usable at this depth */
    int max_buffers;	/* most buffers for this visual */
    int depth;	/* depth of buffers to be created */
} XmbufBufferInfo;

DESCRIPTION

The application programming library for the X11 Double-Buffering, Multi-Buffering, and Stereo Extension contains the interfaces described below. With the exception of * XmbufQueryExtension *, if any of these routines are called with a display that does not support the extension, the ExtensionErrorHandler (which can be set with * XSetExtensionErrorHandler * and functions the same way as * XSetErrorHandler *) will be called and the function will then return.

* XmbufQueryExtension * returns * True * if the multibuffering/stereo extension is available on the given display. If the extension exists, the value of the first event code (which should be added to the event type constants * MultibufferClobberNotify * and * MultibufferUpdateNotify * to get the actual values) is stored into event_base_return and the value of the first error code (which should be added to the error type constant * MultibufferBadBuffer * to get the actual value) is stored into error_base_return.

* XmbufGetVersion * gets the major and minor version numbers of the extension. The return value is zero if an error occurs or non-zero if no error happens.

* XmbufCreateBuffers * requests that “count” buffers be created with the given update_action and update_hint and be associated with the indicated window. The number of buffers created is returned (zero if an error occurred) and buffers_update is filled in with that many Multibuffer identifiers.

* XmbufDestroyBuffers * destroys the buffers associated with the given window.

* XmbufDisplayBuffers * displays the indicated buffers their appropriate windows within max_delay milliseconds after min_delay milliseconds have passed. No two buffers may be associated with the same window or else a Match error is generated.

* XmbufGetWindowAttributes * gets the multibuffering attributes that apply to all buffers associated with the given window. The list of buffers returns may be freed with * XFree *. Returns non-zero on success and zero if an error occurs.

* XmbufChangeWindowAttributes * sets the multibuffering attributes that apply to all buffers associated with the given window. This is currently limited to the update_hint.

* XmbufGetBufferAttributes * gets the attributes for the indicated buffer. Returns non-zero on success and zero if an error occurs.

* XmbufChangeBufferAttributes * sets the attributes for the indicated buffer. This is currently limited to the event_mask.

* XmbufGetScreenInfo * gets the parameters controlling how mono and stereo windows may be created on the screen of the given drawable. The numbers of sets of visual and depths are returned in nmono_return and nstereo_return. If nmono_return is greater than zero, then mono_info_return is set to the address of an array of * XmbufBufferInfo * structures describing the various visuals and depths that may be used. Otherwise, mono_info_return is set to NULL. Similarly, stereo_info_return is set according to nstereo_return. The storage returned in mono_info_return and stereo_info_return may be released by * XFree *. If no errors are encounted, non-zero will be returned.

* XmbufCreateStereoWindow * creates a stereo window in the same way that * XCreateWindow * creates a mono window. The buffer ids for the left and right buffers are returned in left_return and right_return, respectively. If an extension error handler that returns is installed, * None * will be returned if the extension is not available on this display.

PREDEFINED VALUES

Update_action field:

 MultibufferUpdateActionUndefined   MultibufferUpdateActionBackground   MultibufferUpdateActionUntouched   MultibufferUpdateActionCopied 

Update_hint field:

 MultibufferUpdateHintFrequent   MultibufferUpdateHintIntermittent   MultibufferUpdateHintStatic 

Valuemask fields:

 MultibufferWindowUpdateHint   MultibufferBufferEventMask 

Mono vs. stereo and left vs. right:

 MultibufferModeMono   MultibufferModeStereo   MultibufferSideMono   MultibufferSideLeft   MultibufferSideRight 

Clobber state:

 MultibufferUnclobbered   MultibufferPartiallyClobbered   MultibufferFullyClobbered 

Event stuff:

 MultibufferClobberNotifyMask   MultibufferUpdateNotifyMask   MultibufferClobberNotify   MultibufferUpdateNotify   MultibufferNumberEvents   MultibufferBadBuffer   MultibufferNumberErrors 

BUGS

This manual page needs more work.

SEE ALSO

Extending X for Double Buffering, Multi-Buffering, and Stereo

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2326 - Linux cli command setbuf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setbuf and provides detailed information about the command setbuf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setbuf.

NAME 🖥️ setbuf 🖥️

stream buffering operations

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int setvbuf(FILE *restrict stream, char buf[restrict .size],
 int mode, size_t size);
void setbuf(FILE *restrict stream, char *restrict buf);
void setbuffer(FILE *restrict stream, char buf[restrict .size],
 size_t size);
void setlinebuf(FILE *stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

setbuffer(), setlinebuf():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The three types of buffering available are unbuffered, block buffered, and line buffered. When an output stream is unbuffered, information appears on the destination file or terminal as soon as written; when it is block buffered, many characters are saved up and written as a block; when it is line buffered, characters are saved up until a newline is output or input is read from any stream attached to a terminal device (typically stdin). The function fflush(3) may be used to force the block out early. (See fclose(3).)

Normally all files are block buffered. If a stream refers to a terminal (as stdout normally does), it is line buffered. The standard error stream stderr is always unbuffered by default.

The setvbuf() function may be used on any open stream to change its buffer. The mode argument must be one of the following three macros:

_IONBF
unbuffered

_IOLBF
line buffered

_IOFBF
fully buffered

Except for unbuffered files, the buf argument should point to a buffer at least size bytes long; this buffer will be used instead of the current buffer. If the argument buf is NULL, only the mode is affected; a new buffer will be allocated on the next read or write operation. The setvbuf() function may be used only after opening a stream and before any other operations have been performed on it.

The other three calls are, in effect, simply aliases for calls to setvbuf(). The setbuf() function is exactly equivalent to the call

setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);

The setbuffer() function is the same, except that the size of the buffer is up to the caller, rather than being determined by the default BUFSIZ. The setlinebuf() function is exactly equivalent to the call:

setvbuf(stream, NULL, _IOLBF, 0);

RETURN VALUE

The function setvbuf() returns 0 on success. It returns nonzero on failure (mode is invalid or the request cannot be honored). It may set errno on failure.

The other functions do not return a value.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setbuf(), setbuffer(), setlinebuf(), setvbuf()

Thread safetyMT-Safe

STANDARDS

setbuf()
setvbuf()
C11, POSIX.1-2008.

HISTORY

setbuf()
setvbuf()
C89, POSIX.1-2001.

CAVEATS

POSIX notes that the value of errno is unspecified after a call to setbuf() and further notes that, since the value of errno is not required to be unchanged after a successful call to setbuf(), applications should instead use setvbuf() in order to detect errors.

BUGS

You must make sure that the space that buf points to still exists by the time stream is closed, which also happens at program termination. For example, the following is invalid:

#include <stdio.h>
int
main(void)
{
    char buf[BUFSIZ];
    setbuf(stdout, buf);
    printf("Hello, world!

“); return 0; }

SEE ALSO

stdbuf(1), fclose(3), fflush(3), fopen(3), fread(3), malloc(3), printf(3), puts(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2327 - Linux cli command pthread_cond_broadcast

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_cond_broadcast and provides detailed information about the command pthread_cond_broadcast, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_cond_broadcast.

NAME 🖥️ pthread_cond_broadcast 🖥️

operations on conditions

SYNOPSIS

#include <pthread.h>
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
int pthread_cond_init(pthread_cond_t *cond,
 pthread_condattr_t *cond_attr);
int pthread_cond_signal(pthread_cond_t *cond);
int pthread_cond_broadcast(pthread_cond_t *cond);
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
 const struct timespec *abstime);
int pthread_cond_destroy(pthread_cond_t *cond);

DESCRIPTION

A condition (short for ``condition variable’’) is a synchronization device that allows threads to suspend execution and relinquish the processors until some predicate on shared data is satisfied. The basic operations on conditions are: signal the condition (when the predicate becomes true), and wait for the condition, suspending the thread execution until another thread signals the condition.

A condition variable must always be associated with a mutex, to avoid the race condition where a thread prepares to wait on a condition variable and another thread signals the condition just before the first thread actually waits on it.

pthread_cond_init initializes the condition variable cond, using the condition attributes specified in cond_attr, or default attributes if cond_attr is NULL. The LinuxThreads implementation supports no attributes for conditions, hence the cond_attr parameter is actually ignored.

Variables of type pthread_cond_t can also be initialized statically, using the constant PTHREAD_COND_INITIALIZER.

pthread_cond_signal restarts one of the threads that are waiting on the condition variable cond. If no threads are waiting on cond, nothing happens. If several threads are waiting on cond, exactly one is restarted, but it is not specified which.

pthread_cond_broadcast restarts all the threads that are waiting on the condition variable cond. Nothing happens if no threads are waiting on cond.

pthread_cond_wait atomically unlocks the mutex (as per pthread_unlock_mutex) and waits for the condition variable cond to be signaled. The thread execution is suspended and does not consume any CPU time until the condition variable is signaled. The mutex must be locked by the calling thread on entrance to pthread_cond_wait. Before returning to the calling thread, pthread_cond_wait re-acquires mutex (as per pthread_lock_mutex).

Unlocking the mutex and suspending on the condition variable is done atomically. Thus, if all threads always acquire the mutex before signaling the condition, this guarantees that the condition cannot be signaled (and thus ignored) between the time a thread locks the mutex and the time it waits on the condition variable.

pthread_cond_timedwait atomically unlocks mutex and waits on cond, as pthread_cond_wait does, but it also bounds the duration of the wait. If cond has not been signaled within the amount of time specified by abstime, the mutex mutex is re-acquired and pthread_cond_timedwait returns the error ETIMEDOUT. The abstime parameter specifies an absolute time, with the same origin as time(2) and gettimeofday(2): an abstime of 0 corresponds to 00:00:00 GMT, January 1, 1970.

pthread_cond_destroy destroys a condition variable, freeing the resources it might hold. No threads must be waiting on the condition variable on entrance to pthread_cond_destroy. In the LinuxThreads implementation, no resources are associated with condition variables, thus pthread_cond_destroy actually does nothing except checking that the condition has no waiting threads.

CANCELLATION

pthread_cond_wait and pthread_cond_timedwait are cancelation points. If a thread is cancelled while suspended in one of these functions, the thread immediately resumes execution, then locks again the mutex argument to pthread_cond_wait and pthread_cond_timedwait, and finally executes the cancelation. Consequently, cleanup handlers are assured that mutex is locked when they are called.

ASYNC-SIGNAL SAFETY

The condition functions are not async-signal safe, and should not be called from a signal handler. In particular, calling pthread_cond_signal or pthread_cond_broadcast from a signal handler may deadlock the calling thread.

RETURN VALUE

All condition variable functions return 0 on success and a non-zero error code on error.

ERRORS

pthread_cond_init, pthread_cond_signal, pthread_cond_broadcast, and pthread_cond_wait never return an error code.

The pthread_cond_timedwait function returns the following error codes on error:

ETIMEDOUT
The condition variable was not signaled until the timeout specified by abstime.

EINTR
pthread_cond_timedwait was interrupted by a signal.

The pthread_cond_destroy function returns the following error code on error:

EBUSY
Some threads are currently waiting on cond.

SEE ALSO

pthread_condattr_init(3), pthread_mutex_lock(3), pthread_mutex_unlock(3), gettimeofday(2), nanosleep(2).

EXAMPLE

Consider two shared variables x and y, protected by the mutex mut, and a condition variable cond that is to be signaled whenever x becomes greater than y.

int x,y;
pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;

Waiting until x is greater than y is performed as follows:

pthread_mutex_lock(&mut);
while (x <= y) {
        pthread_cond_wait(&cond, &mut);
}
/* operate on x and y */
pthread_mutex_unlock(&mut);

Modifications on x and y that may cause x to become greater than y should signal the condition if needed:

pthread_mutex_lock(&mut);
/* modify x and y */
if (x > y) pthread_cond_broadcast(&cond);
pthread_mutex_unlock(&mut);

If it can be proved that at most one waiting thread needs to be waken up (for instance, if there are only two threads communicating through x and y), pthread_cond_signal can be used as a slightly more efficient alternative to pthread_cond_broadcast. In doubt, use pthread_cond_broadcast.

To wait for x to become greater than y with a timeout of 5 seconds, do:

struct timeval now;
struct timespec timeout;
int retcode;
pthread_mutex_lock(&mut);
gettimeofday(&now);
timeout.tv_sec = now.tv_sec + 5;
timeout.tv_nsec = now.tv_usec * 1000;
retcode = 0;
while (x <= y && retcode != ETIMEDOUT) {
        retcode = pthread_cond_timedwait(&cond, &mut, &timeout);
}
if (retcode == ETIMEDOUT) {
        /* timeout occurred */
} else {
        /* operate on x and y */
}
pthread_mutex_unlock(&mut);
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2328 - Linux cli command TAILQ_ENTRY

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command TAILQ_ENTRY and provides detailed information about the command TAILQ_ENTRY, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the TAILQ_ENTRY.

NAME 🖥️ TAILQ_ENTRY 🖥️

implementation of a doubly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
TAILQ_ENTRY(TYPE);
TAILQ_HEAD(HEADNAME, TYPE);
TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD head);
void TAILQ_INIT(TAILQ_HEAD *head);
int TAILQ_EMPTY(TAILQ_HEAD *head);
void TAILQ_INSERT_HEAD(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_TAIL(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_AFTER(TAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_FIRST(TAILQ_HEAD *head);
struct TYPE *TAILQ_LAST(TAILQ_HEAD *head, HEADNAME);
struct TYPE *TAILQ_PREV(struct TYPE *elm, HEADNAME, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_NEXT(struct TYPE *elm, TAILQ_ENTRY NAME);
TAILQ_FOREACH(struct TYPE *var, TAILQ_HEAD *head,
 TAILQ_ENTRY NAME);
TAILQ_FOREACH_REVERSE(struct TYPE *var, TAILQ_HEAD *head, HEADNAME,
 TAILQ_ENTRY NAME);
void TAILQ_REMOVE(TAILQ_HEAD *head, struct TYPE *elm,
 TAILQ_ENTRY NAME);
void TAILQ_CONCAT(TAILQ_HEAD *head1, TAILQ_HEAD *head2,
 TAILQ_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked tail queues.

In the macro definitions, TYPE is the name of a user defined structure, that must contain a field of type TAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user defined structure that must be declared using the macro TAILQ_HEAD().

Creation

A tail queue is headed by a structure defined by the TAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the queue and the other to the last element in the queue. The elements are doubly linked so that an arbitrary element can be removed without traversing the queue. New elements can be added to the queue after an existing element, before an existing element, at the head of the queue, or at the end of the queue. A TAILQ_HEAD structure is declared as follows:

TAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the queue. A pointer to the head of the queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

TAILQ_ENTRY() declares a structure that connects the elements in the queue.

TAILQ_HEAD_INITIALIZER() evaluates to an initializer for the queue head.

TAILQ_INIT() initializes the queue referenced by

TAILQ_EMPTY() evaluates to true if there are no items on the queue. head.

Insertion

TAILQ_INSERT_HEAD() inserts the new element elm at the head of the queue.

TAILQ_INSERT_TAIL() inserts the new element elm at the end of the queue.

TAILQ_INSERT_BEFORE() inserts the new element elm before the element listelm.

TAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

TAILQ_FIRST() returns the first item on the queue, or NULL if the queue is empty.

TAILQ_LAST() returns the last item on the queue. If the queue is empty the return value is NULL.

TAILQ_PREV() returns the previous item on the queue, or NULL if this item is the first.

TAILQ_NEXT() returns the next item on the queue, or NULL if this item is the last.

TAILQ_FOREACH() traverses the queue referenced by head in the forward direction, assigning each element in turn to var. var is set to NULL if the loop completes normally, or if there were no elements.

TAILQ_FOREACH_REVERSE() traverses the queue referenced by head in the reverse direction, assigning each element in turn to var.

Removal

TAILQ_REMOVE() removes the element elm from the queue.

Other features

TAILQ_CONCAT() concatenates the queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

TAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

TAILQ_FIRST(), TAILQ_LAST(), TAILQ_PREV(), and TAILQ_NEXT() return a pointer to the first, last, previous, or next TYPE structure, respectively.

TAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

STANDARDS

BSD.

HISTORY

4.4BSD.

CAVEATS

TAILQ_FOREACH() and TAILQ_FOREACH_REVERSE() don’t allow var to be removed or freed within the loop, as it would interfere with the traversal. TAILQ_FOREACH_SAFE() and TAILQ_FOREACH_REVERSE_SAFE(), which are present on the BSDs but are not present in glibc, fix this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    TAILQ_ENTRY(entry) entries;             /* Tail queue */
};
TAILQ_HEAD(tailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct tailhead head;                   /* Tail queue head */
    int i;
    TAILQ_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    TAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    TAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    TAILQ_INSERT_AFTER(&head, n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    TAILQ_INSERT_BEFORE(n2, n3, entries);
    TAILQ_REMOVE(&head, n2, entries);       /* Deletion */
    free(n2);
                                            /* Forward traversal */
    i = 0;
    TAILQ_FOREACH(np, &head, entries)
        np->data = i++;
                                            /* Reverse traversal */
    TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = TAILQ_FIRST(&head); while (n1 != NULL) { n2 = TAILQ_NEXT(n1, entries); free(n1); n1 = n2; } TAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2329 - Linux cli command XtVaGetValues

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtVaGetValues and provides detailed information about the command XtVaGetValues, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtVaGetValues.

NAME 🖥️ XtVaGetValues 🖥️

obtain and set widget resources

SYNTAX

#include <X11/Intrinsic.h>

void XtSetValues(Widget w, ArgList args, Cardinal num_args);

void XtVaSetValues(Widget w, … );

void XtSetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);

void XtVaSetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, … );

void XtGetValues(Widget w, ArgList args, Cardinal num_args);

void XtVaGetValues(Widget w, … );

void XtGetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);

void XtVaGetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, … );

ARGUMENTS

args
Specifies the argument list of name/address pairs that contain the resource name and either the address into which the resource value is to be stored or their new values.

base
Specifies the base address of the subpart data structure where the resources should be retrieved or written.

num_args
Specifies the number of arguments in the argument list.

resources
Specifies the nonwidget resource list or values.

num_resources
Specifies the number of resources in the resource list.

  1. Specifies the widget.


Specifies the variable argument list of name/address pairs that contain the resource name and either the address into which the resource value is to be stored or their new values.

DESCRIPTION

The XtSetValues function starts with the resources specified for the Core widget fields and proceeds down the subclass chain to the widget. At each stage, it writes the new value (if specified by one of the arguments) or the existing value (if no new value is specified) to a new widget data record. XtSetValues then calls the set_values procedures for the widget in superclass-to-subclass order. If the widget has any non-NULL set_values_hook fields, these are called immediately after the corresponding set_values procedure. This procedure permits subclasses to set nonwidget data for XtSetValues.

If the widget’s parent is a subclass of constraintWidgetClass, XtSetValues also updates the widget’s constraints. It starts with the constraint resources specified for constraintWidgetClass and proceeds down the subclass chain to the parent’s class. At each stage, it writes the new value or the existing value to a new constraint record. It then calls the constraint set_values procedures from constraintWidgetClass down to the parent’s class. The constraint set_values procedures are called with widget arguments, as for all set_values procedures, not just the constraint record arguments, so that they can make adjustments to the desired values based on full information about the widget.

XtSetValues determines if a geometry request is needed by comparing the current widget to the new widget. If any geometry changes are required, it makes the request, and the geometry manager returns XtGeometryYes, XtGeometryAlmost, or XtGeometryNo. If XtGeometryYes, XtSetValues calls the widget’s resize procedure. If XtGeometryNo, XtSetValues resets the geometry fields to their original values. If XtGeometryAlmost, XtSetValues calls the set_values_almost procedure, which determines what should be done and writes new values for the geometry fields into the new widget. XtSetValues then repeats this process, deciding once more whether the geometry manager should be called.

Finally, if any of the set_values procedures returned True, XtSetValues causes the widget’s expose procedure to be invoked by calling the Xlib XClearArea function on the widget’s window.

The XtSetSubvalues function stores resources into the structure identified by base.

The XtGetValues function starts with the resources specified for the core widget fields and proceeds down the subclass chain to the widget. The value field of a passed argument list should contain the address into which to store the corresponding resource value. It is the caller’s responsibility to allocate and deallocate this storage according to the size of the resource representation type used within the widget.

If the widget’s parent is a subclass of constraintWidgetClass, XtGetValues then fetches the values for any constraint resources requested. It starts with the constraint resources specified for constraintWidgetClass and proceeds down to the subclass chain to the parent’s constraint resources. If the argument list contains a resource name that is not found in any of the resource lists searched, the value at the corresponding address is not modified. Finally, if the get_values_hook procedures are non-NULL, they are called in superclass-to-subclass order after all the resource values have been fetched by XtGetValues. This permits a subclass to provide nonwidget resource data to XtGetValues.

The XtGetSubvalues function obtains resource values from the structure identified by base.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2330 - Linux cli command Regexp_Common_URI_gopherpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_URI_gopherpm and provides detailed information about the command Regexp_Common_URI_gopherpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_URI_gopherpm.

NAME 🖥️ Regexp_Common_URI_gopherpm 🖥️

  • Returns a pattern for gopher URIs.

SYNOPSIS

use Regexp::Common qw /URI/; while (<>) { /$RE{URI}{gopher}/ and print “Contains a gopher URI. “; }

DESCRIPTION

$RE{URI}{gopher}{-notab}

Gopher URIs are poorly defined. Originally, RFC 1738 defined gopher URIs, but they were later redefined in an internet draft. One that was expired in June 1997.

The internet draft for gopher URIs defines them as follows:

“gopher:” “//” host [ “:” port ] “/” gopher-type selector [ “%09” search [ “%09” gopherplus_string ]]

Unfortunally, a selector is defined in such a way that characters may be escaped using the URI escape mechanism. This includes tabs, which escaped are %09. Hence, the syntax cannot distinguish between a URI that has both a selector and a search part, and an URI where the selector includes an escaped tab. (The text of the draft forbids tabs to be present in the selector though).

$RE{URI}{gopher} follows the defined syntax. To disallow escaped tabs in the selector and search parts, use $RE{URI}{gopher}{-notab}.

There are other differences between the text and the given syntax. According to the text, selector strings cannot have tabs, linefeeds or carriage returns in them. The text also allows the entire gopher-path, (the part after the slash following the hostport) to be empty; if this is empty the slash may be omitted as well. However, this isn’t reflected in the syntax.

Under {-keep}, the following are returned:

$1
The entire URI.

$2
The scheme.

$3
The host (name or address).

$4
The port (if any).

$5
The “gopher-path”, the part after the / following the host and port.

$6
The gopher-type.

$7
The selector. (When no {-notab} is used, this includes the search and gopherplus_string, including the separating escaped tabs).

$8
The search, if given. (Only when {-notab} is given).

$9
The gopherplus_string, if given. (Only when {-notab} is given).

head1 REFERENCES

[RFC 1738]
Berners-Lee, Tim, Masinter, L., McCahill, M.: Uniform Resource Locators (URL). December 1994.

[RFC 1808]
Fielding, R.: Relative Uniform Resource Locators (URL). June 1995.

[GOPHER URL]
Krishnan, Murali R., Casey, James: “A Gopher URL Format”. Expired Internet draft draft-murali-url-gopher. December 1996.

SEE ALSO

Regexp::Common::URI for other supported URIs.

AUTHOR

Damian Conway ([email protected])

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2331 - Linux cli command wordfree

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wordfree and provides detailed information about the command wordfree, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wordfree.

NAME 🖥️ wordfree 🖥️

perform word expansion like a posix-shell

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wordexp.h>
int wordexp(const char *restrict s, wordexp_t *restrict p",int"flags);
void wordfree(wordexp_t *p);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

wordexp(), wordfree():

    _XOPEN_SOURCE

DESCRIPTION

The function wordexp() performs a shell-like expansion of the string s and returns the result in the structure pointed to by p. The data type wordexp_t is a structure that at least has the fields we_wordc, we_wordv, and we_offs. The field we_wordc is a size_t that gives the number of words in the expansion of s. The field we_wordv is a char ** that points to the array of words found. The field we_offs of type size_t is sometimes (depending on flags, see below) used to indicate the number of initial elements in the we_wordv array that should be filled with NULLs.

The function wordfree() frees the allocated memory again. More precisely, it does not free its argument, but it frees the array we_wordv and the strings that points to.

The string argument

Since the expansion is the same as the expansion by the shell (see sh(1)) of the parameters to a command, the string s must not contain characters that would be illegal in shell command parameters. In particular, there must not be any unescaped newline or |, &, ;, <, >, (, ), {, } characters outside a command substitution or parameter substitution context.

If the argument s contains a word that starts with an unquoted comment character #, then it is unspecified whether that word and all following words are ignored, or the # is treated as a non-comment character.

The expansion

The expansion done consists of the following stages: tilde expansion (replacing ~user by user’s home directory), variable substitution (replacing $FOO by the value of the environment variable FOO), command substitution (replacing $(command) or `command` by the output of command), arithmetic expansion, field splitting, wildcard expansion, quote removal.

The result of expansion of special parameters ($@, $*, $#, $?, $-, $$, $!, $0) is unspecified.

Field splitting is done using the environment variable $IFS. If it is not set, the field separators are space, tab, and newline.

The output array

The array we_wordv contains the words found, followed by a NULL.

The flags argument

The flag argument is a bitwise inclusive OR of the following values:

WRDE_APPEND
Append the words found to the array resulting from a previous call.

WRDE_DOOFFS
Insert we_offs initial NULLs in the array we_wordv. (These are not counted in the returned we_wordc.)

WRDE_NOCMD
Don’t do command substitution.

WRDE_REUSE
The argument p resulted from a previous call to wordexp(), and wordfree() was not called. Reuse the allocated storage.

WRDE_SHOWERR
Normally during command substitution stderr is redirected to /dev/null. This flag specifies that stderr is not to be redirected.

WRDE_UNDEF
Consider it an error if an undefined shell variable is expanded.

RETURN VALUE

On success, wordexp() returns 0. On failure, wordexp() returns one of the following nonzero values:

WRDE_BADCHAR
Illegal occurrence of newline or one of |, &, ;, <, >, (, ), {, }.

WRDE_BADVAL
An undefined shell variable was referenced, and the WRDE_UNDEF flag told us to consider this an error.

WRDE_CMDSUB
Command substitution requested, but the WRDE_NOCMD flag told us to consider this an error.

WRDE_NOSPACE
Out of memory.

WRDE_SYNTAX
Shell syntax error, such as unbalanced parentheses or unmatched quotes.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wordexp()

Thread safety

MT-Unsafe race:utent const:env env sig:ALRM timer locale

wordfree()

Thread safetyMT-Safe

In the above table, utent in race:utent signifies that if any of the functions setutent(3), getutent(3), or endutent(3) are used in parallel in different threads of a program, then data races could occur. wordexp() calls those functions, so we use race:utent to remind users.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001. glibc 2.1.

EXAMPLES

The output of the following example program is approximately that of “ls [a-c]*.c”.

#include <stdio.h>
#include <stdlib.h>
#include <wordexp.h>
int
main(void)
{
    wordexp_t p;
    char **w;
    wordexp("[a-c]*.c", &p, 0);
    w = p.we_wordv;
    for (size_t i = 0; i < p.we_wordc; i++)
        printf("%s

“, w[i]); wordfree(&p); exit(EXIT_SUCCESS); }

SEE ALSO

fnmatch(3), glob(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2332 - Linux cli command Image_ExifTool_PhotoMechanicpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_PhotoMechanicpm and provides detailed information about the command Image_ExifTool_PhotoMechanicpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_PhotoMechanicpm.

NAME 🖥️ Image_ExifTool_PhotoMechanicpm 🖥️

Read/write Photo Mechanic information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read and write information written by the Camera Bits Photo Mechanic software.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

ACKNOWLEDGEMENTS

Many thanks to the great support provided by Camera Bits, and in particular for the valuable exchanges with Kirk Baker. Based on this experience, I can say that the technical support offered by Camera Bits is second to none.

SEE ALSO

“PhotoMechanic Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2333 - Linux cli command ts_conf_set

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ts_conf_set and provides detailed information about the command ts_conf_set, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ts_conf_set.

NAME 🖥️ ts_conf_set 🖥️

write a new TSLIB_CONFFILE config file and reload it.

SYNOPSIS

#include <tslib.h>

int ts_conf_set(struct ts_module_conf *conf);

DESCRIPTION

ts_conf_set() This function takes a pointer to a struct ts_module_conf. It reads data from all linked structs in the list (next and prev pointers) and writes a new TSLIB_CONFFILE. The first struct in the list (where prev is NULL) is the first line and so on. After writing, ts_reconfig() has to be called so the new modules and parameters are reloaded and applied to the currently running program.

The given set of ts_module_conf structs is freed and destroyed here. After calling ts_conf_set() one has to use ts_conf_get() again, for a different change.

struct ts_module_conf {
	char *name;
	char *params;
	int raw;
	int nr;

	struct ts_module_conf *next;
	struct ts_module_conf *prev;
};

RETURN VALUE

This function returns zero on success and a negative integer on failure.

SEE ALSO

ts_conf_get(3), ts_config(3), ts.conf(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2334 - Linux cli command WWW_Mechanize_FAQpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command WWW_Mechanize_FAQpm and provides detailed information about the command WWW_Mechanize_FAQpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the WWW_Mechanize_FAQpm.

NAME 🖥️ WWW_Mechanize_FAQpm 🖥️

Frequently Asked Questions about WWW::Mechanize

VERSION

version 2.18

How to get help with WWW::Mechanize

If your question isn’t answered here in the FAQ, please turn to the communities at:

  • StackOverflow <https://stackoverflow.com/questions/tagged/www-mechanize>

  • #lwp on irc.perl.org

  • <http://perlmonks.org>

  • The libwww-perl mailing list at <http://lists.perl.org>

JavaScript

I have this web page that has JavaScript on it, and my Mech program doesn’t work.

That’s because WWW::Mechanize doesn’t operate on the JavaScript. It only understands the HTML parts of the page.

I thought Mech was supposed to work like a web browser.

It does pretty much, but it doesn’t support JavaScript.

I added some basic attempts at picking up URLs in window.open() calls and return them in $mech->links. They work sometimes.

Since Javascript is completely visible to the client, it cannot be used to prevent a scraper from following links. But it can make life difficult. If you want to scrape specific pages, then a solution is always possible.

One typical use of Javascript is to perform argument checking before posting to the server. The URL you want is probably just buried in the Javascript function. Do a regular expression match on $mech->content() to find the link that you want and $mech->get it directly (this assumes that you know what you are looking for in advance).

In more difficult cases, the Javascript is used for URL mangling to satisfy the needs of some middleware. In this case you need to figure out what the Javascript is doing (why are these URLs always really long?). There is probably some function with one or more arguments which calculates the new URL. Step one: using your favorite browser, get the before and after URLs and save them to files. Edit each file, converting the argument separators (’?’, ‘&’ or ‘;’) into newlines. Now it is easy to use diff or comm to find out what Javascript did to the URL. Step 2 - find the function call which created the URL - you will need to parse and interpret its argument list. The Javascript Debugger in the Firebug extension for Firefox helps with the analysis. At this point, it is fairly trivial to write your own function which emulates the Javascript for the pages you want to process.

Here’s another approach that answers the question, “It works in Firefox, but why not Mech?” Everything the web server knows about the client is present in the HTTP request. If two requests are identical, the results should be identical. So the real question is “What is different between the mech request and the Firefox request?”

The Firefox extension “Tamper Data” is an effective tool for examining the headers of the requests to the server. Compare that with what LWP is sending. Once the two are identical, the action of the server should be the same as well.

I say “should”, because this is an oversimplification - some values are naturally unique, e.g. a SessionID, but if a SessionID is present, that is probably sufficient, even though the value will be different between the LWP request and the Firefox request. The server could use the session to store information which is troublesome, but that’s not the first place to look (and highly unlikely to be relevant when you are requesting the login page of your site).

Generally the problem is to be found in missing or incorrect POSTDATA arguments, Cookies, User-Agents, Accepts, etc. If you are using mech, then redirects and cookies should not be a problem, but are listed here for completeness. If you are missing headers, $mech->add_header can be used to add the headers that you need.

Which modules work like Mechanize and have JavaScript support?

In no particular order: Gtk2::WebKit::Mechanize, WWW::Mechanize::Firefox, WWW::Mechanize::Chrome, WWW::Scripter, WWW::Selenium

How do I do X?

Can I do [such-and-such] with WWW::Mechanize?

If it’s possible with LWP::UserAgent, then yes. WWW::Mechanize is a subclass of LWP::UserAgent, so all the wondrous magic of that class is inherited.

How do I use WWW::Mechanize through a proxy server?

See the docs in LWP::UserAgent on how to use the proxy. Short version:

$mech->proxy([http, ftp], http://proxy.example.com:8000/);

or get the specs from the environment:

$mech->env_proxy(); # Environment set like so: gopher_proxy=http://proxy.my.place/ wais_proxy=http://proxy.my.place/ no_proxy=“localhost,my.domain” export gopher_proxy wais_proxy no_proxy

How can I see what fields are on the forms?

Use the mech-dump utility, optionally installed with Mechanize.

$ mech-dump –forms http://search.cpan.org Dumping forms GET http://search.cpan.org/search query= mode=all (option) [*all|module|dist|author] <NONAME>=CPAN Search (submit)

How do I get Mech to handle authentication?

use MIME::Base64; my $agent = WWW::Mechanize->new(); my @args = ( Authorization => “Basic " . MIME::Base64::encode( USER . : . PASS ) ); $agent->credentials( ADDRESS, REALM, USER, PASS ); $agent->get( URL, @args );

If you want to use the credentials for all future requests, you can also use the LWP::UserAgent default_header() method instead of the extra arguments to get()

$mech->default_header( Authorization => Basic . encode_base64( USER . : . PASSWORD ) );

How can I get WWW::Mechanize to execute this JavaScript?

You can’t. JavaScript is entirely client-based, and WWW::Mechanize is a client that doesn’t understand JavaScript. See the top part of this FAQ.

How do I check a checkbox that doesn’t have a value defined?

Set it to the value of “on”.

$mech->field( my_checkbox => on );

How do I handle frames?

You don’t deal with them as frames, per se, but as links. Extract them with

my @frame_links = $mech->find_link( tag => “frame” );

How do I get a list of HTTP headers and their values?

All HTTP::Headers methods work on a HTTP::Response object which is returned by the get(), reload(), response()/res(), click(), submit_form(), and request() methods.

my $mech = WWW::Mechanize->new( autocheck => 1 ); $mech->get( http://my.site.com ); my $response = $mech->response(); for my $key ( $response->header_field_names() ) { print $key, " : “, $response->header( $key ), " “; }

How do I enable keep-alive?

Since WWW::Mechanize is a subclass of LWP::UserAgent, you can use the same mechanism to enable keep-alive:

use LWP::ConnCache; … $mech->conn_cache(LWP::ConnCache->new);

How can I change/specify the action parameter of an HTML form?

You can access the action of the form by utilizing the HTML::Form object returned from one of the specifying form methods.

Using $mech->form_number($number):

my $mech = WWW::mechanize->new; $mech->get(http://someurlhere.com); # Access the form using its Zero-Based Index by DOM order $mech->form_number(0)->action(http://newAction); #ABS URL

Using $mech->form_name($number):

my $mech = WWW::mechanize->new; $mech->get(http://someurlhere.com); #Access the form using its Zero-Based Index by DOM order $mech->form_name(trgForm)->action(http://newAction); #ABS URL

How do I save an image? How do I save a large tarball?

An image is just content. You get the image and save it.

$mech->get( photo.jpg ); $mech->save_content( /path/to/my/directory/photo.jpg );

You can also save any content directly to disk using the :content_file flag to get(), which is part of LWP::UserAgent.

$mech->get( http://www.cpan.org/src/stable.tar.gz, :content_file => stable.tar.gz );

How do I pick a specific value from a “<select>” list?

Find the HTML::Form::ListInput in the page.

my ($listbox) = $mech->find_all_inputs( name => listbox );

Then create a hash for the lookup:

my %name_lookup; @name_lookup{ $listbox->value_names } = $listbox->possible_values; my $value = $name_lookup{ Name I want };

If you have duplicate names, this method won’t work, and you’ll have to loop over $listbox->value_names and $listbox->possible_values in parallel until you find a matching name.

How do I get Mech to not follow redirects?

You use functionality in LWP::UserAgent, not Mech itself.

$mech->requests_redirectable( [] );

Or you can set max_redirect:

$mech->max_redirect( 0 );

Both these options can also be set in the constructor. Mech doesn’t understand them, so will pass them through to the LWP::UserAgent constructor.

Why doesn’t this work: Debugging your Mechanize program

My Mech program doesn’t work, but it works in the browser.

Mechanize acts like a browser, but apparently something you’re doing is not matching the browser’s behavior. Maybe it’s expecting a certain web client, or maybe you’ve not handling a field properly. For some reason, your Mech problem isn’t doing exactly what the browser is doing, and when you find that, you’ll have the answer.

My Mech program gets these 500 errors.

A 500 error from the web server says that the program on the server side died. Probably the web server program was expecting certain inputs that you didn’t supply, and instead of handling it nicely, the program died.

Whatever the cause of the 500 error, if it works in the browser, but not in your Mech program, you’re not acting like the browser. See the previous question.

Why doesn’t my program handle this form correctly?

Run mech-dump on your page and see what it says.

mech-dump is a marvelous diagnostic tool for figuring out what forms and fields are on the page. Say you’re scraping CNN.com, you’d get this:

$ mech-dump http://www.cnn.com/ GET http://search.cnn.com/cnn/search source=cnn (hidden readonly) invocationType=search/top (hidden readonly) sites=web (radio) [*web/The Web ??|cnn/CNN.com ??] query= (text) <NONAME>=Search (submit) POST http://cgi.money.cnn.com/servlets/quote_redirect query= (text) <NONAME>=GET (submit) POST http://polls.cnn.com/poll poll_id=2112 (hidden readonly) question_1=<UNDEF> (radio) [1/Simplistic option|2/VIEW RESULTS] <NONAME>=VOTE (submit) GET http://search.cnn.com/cnn/search source=cnn (hidden readonly) invocationType=search/bottom (hidden readonly) sites=web (radio) [*web/??CNN.com|cnn/??] query= (text) <NONAME>=Search (submit)

Four forms, including the first one duplicated at the end. All the fields, all their defaults, lovingly generated by HTML::Form’s dump method.

If you want to run mech-dump on something that doesn’t lend itself to a quick URL fetch, then use the save_content() method to write the HTML to a file, and run mech-dump on the file.

Why don’t https:// URLs work?

You need either IO::Socket::SSL or Crypt::SSLeay installed.

Why don’t file:// URLs to files with a question mark in the name work?

If you have a local file named how-are-you?, the URL for that file is file:how-are-you%3f. That’s because URI::file is required to be url-encoded, just like any URL pointing to somewhere on the internet has to be if it contains reserved characters such as ?, / or @. This is specified in RFC 3986. See URI::Escape for a full list of reserved characters.

Why do I get “Input ‘fieldname’ is readonly”?

You’re trying to change the value of a hidden field and you have warnings on.

First, make sure that you actually mean to change the field that you’re changing, and that you don’t have a typo. Usually, hidden variables are set by the site you’re working on for a reason. If you change the value, you might be breaking some functionality by faking it out.

If you really do want to change a hidden value, make the changes in a scope that has warnings turned off:

{ local $^W = 0; $agent->field( name => $value ); }

I tried to [such-and-such] and I got this weird error.

Are you checking your errors?

Are you sure?

Are you checking that your action succeeded after every action?

Are you sure?

For example, if you try this:

$mech->get( “http://my.site.com” ); $mech->follow_link( “foo” );

and the get call fails for some reason, then the Mech internals will be unusable for the follow_link and you’ll get a weird error. You must, after every action that GETs or POSTs a page, check that Mech succeeded, or all bets are off.

$mech->get( “http://my.site.com” ); die “Cant even get the home page: “, $mech->response->status_line unless $mech->success; $mech->follow_link( “foo” ); die “Foo link failed: “, $mech->response->status_line unless $mech->success;

How do I figure out why “$mech->get($url)” doesn’t work?

There are many reasons why a get() can fail. The server can take you to someplace you didn’t expect. It can generate redirects which are not properly handled. You can get time-outs. Servers are down more often than you think! etc, etc, etc. A couple of places to start:

1 Check “$mech->status()” after each call

2 Check the URL with “$mech->uri()” to see where you ended up

3 Try debugging with “LWP::ConsoleLogger”.

If things are really strange, turn on debugging with use LWP::ConsoleLogger::Everywhere; Just put this in the main program. This causes LWP to print out a trace of the HTTP traffic between client and server and can be used to figure out what is happening at the protocol level.

It is also useful to set many traps to verify that processing is proceeding as expected. A Mech program should always have an “I didn’t expect to get here” or “I don’t recognize the page that I am processing” case and bail out.

Since errors can be transient, by the time you notice that the error has occurred, it might not be possible to reproduce it manually. So for automated processing it is useful to email yourself the following information:

  • where processing is taking place

  • An Error Message

  • $mech->uri

  • $mech->content

You can also save the content of the page with $mech->save_content( filename.html );

I submitted a form, but the server ignored everything! I got an empty form back!

The post is handled by application software. It is common for PHP programmers to use the same file both to display a form and to process the arguments returned. So the first task of the application programmer is to decide whether there are arguments to processes. The program can check whether a particular parameter has been set, whether a hidden parameter has been set, or whether the submit button has been clicked. (There are probably other ways that I haven’t thought of).

In any case, if your form is not setting the parameter (e.g. the submit button) which the web application is keying on (and as an outsider there is no way to know what it is keying on), it will not notice that the form has been submitted. Try using $mech->click() instead of $mech->submit() or vice-versa.

I’ve logged in to the server, but I get 500 errors when I try to get to protected content.

Some web sites use distributed databases for their processing. It can take a few seconds for the login/session information to percolate through to all the servers. For human users with their slow reaction times, this is not a problem, but a Perl script can outrun the server. So try adding a sleep(5) between logging in and actually doing anything (the optimal delay must be determined experimentally).

Mech is a big memory pig! I’m running out of RAM!

Mech keeps a history of every page, and the state it was in. It actually keeps a clone of the full Mech object at every step along the way.

You can limit this stack size with the stack_depth param in the new() constructor. If you set stack_size to 0, Mech will not keep any history.

AUTHOR

Andy Lester <andy at petdance.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2004 by Andy Lester.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2335 - Linux cli command vsscanf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command vsscanf and provides detailed information about the command vsscanf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the vsscanf.

NAME 🖥️ vsscanf 🖥️

input string format conversion

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int sscanf(const char *restrict str,
 const char *restrict format, ...);
#include <stdarg.h>
int vsscanf(const char *restrict str,
 const char *restrict format, va_list ap);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

vsscanf():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The sscanf() family of functions scans formatted input according to format as described below. This format may contain conversion specifications; the results from such conversions, if any, are stored in the locations pointed to by the pointer arguments that follow format. Each pointer argument must be of a type that is appropriate for the value returned by the corresponding conversion specification.

If the number of conversion specifications in format exceeds the number of pointer arguments, the results are undefined. If the number of pointer arguments exceeds the number of conversion specifications, then the excess pointer arguments are evaluated, but are otherwise ignored.

sscanf() These functions read their input from the string pointed to by str.

The vsscanf() function is analogous to vsprintf(3).

The format string consists of a sequence of directives which describe how to process the sequence of input characters. If processing of a directive fails, no further input is read, and sscanf() returns. A “failure” can be either of the following: input failure, meaning that input characters were unavailable, or matching failure, meaning that the input was inappropriate (see below).

A directive is one of the following:

·
A sequence of white-space characters (space, tab, newline, etc.; see isspace(3)). This directive matches any amount of white space, including none, in the input.

·
An ordinary character (i.e., one other than white space or ‘%’). This character must exactly match the next character of input.

·
A conversion specification, which commences with a ‘%’ (percent) character. A sequence of characters from the input is converted according to this specification, and the result is placed in the corresponding pointer argument. If the next item of input does not match the conversion specification, the conversion fails—this is a matching failure.

Each conversion specification in format begins with either the character ‘%’ or the character sequence “%n$” (see below for the distinction) followed by:

·
An optional ‘*’ assignment-suppression character: sscanf() reads input as directed by the conversion specification, but discards the input. No corresponding pointer argument is required, and this specification is not included in the count of successful assignments returned by scanf().

·
For decimal conversions, an optional quote character (’). This specifies that the input number may include thousands’ separators as defined by the LC_NUMERIC category of the current locale. (See setlocale(3).) The quote character may precede or follow the ‘*’ assignment-suppression character.

·
An optional ’m’ character. This is used with string conversions (%s, %c, %[), and relieves the caller of the need to allocate a corresponding buffer to hold the input: instead, sscanf() allocates a buffer of sufficient size, and assigns the address of this buffer to the corresponding pointer argument, which should be a pointer to a char * variable (this variable does not need to be initialized before the call). The caller should subsequently free(3) this buffer when it is no longer required.

·
An optional decimal integer which specifies the maximum field width. Reading of characters stops either when this maximum is reached or when a nonmatching character is found, whichever happens first. Most conversions discard initial white space characters (the exceptions are noted below), and these discarded characters don’t count toward the maximum field width. String input conversions store a terminating null byte (‘�’) to mark the end of the input; the maximum field width does not include this terminator.

·
An optional type modifier character. For example, the l type modifier is used with integer conversions such as %d to specify that the corresponding pointer argument refers to a long rather than a pointer to an int.

·
A conversion specifier that specifies the type of input conversion to be performed.

The conversion specifications in format are of two forms, either beginning with ‘%’ or beginning with “%n$”. The two forms should not be mixed in the same format string, except that a string containing “%n$” specifications can include %% and %*. If format contains ‘%’ specifications, then these correspond in order with successive pointer arguments. In the “%n$” form (which is specified in POSIX.1-2001, but not C99), n is a decimal integer that specifies that the converted input should be placed in the location referred to by the n-th pointer argument following format.

Conversions

The following type modifier characters can appear in a conversion specification:

h
Indicates that the conversion will be one of d, i, o, u, x, X, or n and the next pointer is a pointer to a short or unsigned short (rather than int).

hh
As for h, but the next pointer is a pointer to a signed char or unsigned char.

j
As for h, but the next pointer is a pointer to an intmax_t or a uintmax_t. This modifier was introduced in C99.

l
Indicates either that the conversion will be one of d, i, o, u, x, X, or n and the next pointer is a pointer to a long or unsigned long (rather than int), or that the conversion will be one of e, f, or g and the next pointer is a pointer to double (rather than float). If used with %c or %s, the corresponding parameter is considered as a pointer to a wide character or wide-character string respectively.

ll
(ell-ell) Indicates that the conversion will be one of b, d, i, o, u, x, X, or n and the next pointer is a pointer to a long long or unsigned long long (rather than int).

L
Indicates that the conversion will be either e, f, or g and the next pointer is a pointer to long double or (as a GNU extension) the conversion will be d, i, o, u, or x and the next pointer is a pointer to long long.

q
equivalent to L. This specifier does not exist in ANSI C.

t
As for h, but the next pointer is a pointer to a ptrdiff_t. This modifier was introduced in C99.

z
As for h, but the next pointer is a pointer to a size_t. This modifier was introduced in C99.

The following conversion specifiers are available:

%
Matches a literal ‘%’. That is, %% in the format string matches a single input ‘%’ character. No conversion is done (but initial white space characters are discarded), and assignment does not occur.

d
Matches an optionally signed decimal integer; the next pointer must be a pointer to int.

i
Matches an optionally signed integer; the next pointer must be a pointer to int. The integer is read in base 16 if it begins with 0x or 0X, in base 8 if it begins with 0, and in base 10 otherwise. Only characters that correspond to the base are used.

o
Matches an unsigned octal integer; the next pointer must be a pointer to unsigned int.

u
Matches an unsigned decimal integer; the next pointer must be a pointer to unsigned int.

x
Matches an unsigned hexadecimal integer (that may optionally begin with a prefix of 0x or 0X, which is discarded); the next pointer must be a pointer to unsigned int.

X
Equivalent to x.

f
Matches an optionally signed floating-point number; the next pointer must be a pointer to float.

e
Equivalent to f.

g
Equivalent to f.

E
Equivalent to f.

a
(C99) Equivalent to f.

s
Matches a sequence of non-white-space characters; the next pointer must be a pointer to the initial element of a character array that is long enough to hold the input sequence and the terminating null byte (‘�’), which is added automatically. The input string stops at white space or at the maximum field width, whichever occurs first.

c
Matches a sequence of characters whose length is specified by the maximum field width (default 1); the next pointer must be a pointer to char, and there must be enough room for all the characters (no terminating null byte is added). The usual skip of leading white space is suppressed. To skip white space first, use an explicit space in the format.

[
Matches a nonempty sequence of characters from the specified set of accepted characters; the next pointer must be a pointer to char, and there must be enough room for all the characters in the string, plus a terminating null byte. The usual skip of leading white space is suppressed. The string is to be made up of characters in (or not in) a particular set; the set is defined by the characters between the open bracket [ character and a close bracket ] character. The set excludes those characters if the first character after the open bracket is a circumflex (^). To include a close bracket in the set, make it the first character after the open bracket or the circumflex; any other position will end the set. The hyphen character - is also special; when placed between two other characters, it adds all intervening characters to the set. To include a hyphen, make it the last character before the final close bracket. For instance, [^]0-9-] means the set “everything except close bracket, zero through nine, and hyphen”. The string ends with the appearance of a character not in the (or, with a circumflex, in) set or when the field width runs out.

p
Matches a pointer value (as printed by %p in printf(3)); the next pointer must be a pointer to a pointer to void.

n
Nothing is expected; instead, the number of characters consumed thus far from the input is stored through the next pointer, which must be a pointer to int, or variant whose size matches the (optionally) supplied integer length modifier. This is not a conversion and does not increase the count returned by the function. The assignment can be suppressed with the * assignment-suppression character, but the effect on the return value is undefined. Therefore %*n conversions should not be used.

RETURN VALUE

On success, these functions return the number of input items successfully matched and assigned; this can be fewer than provided for, or even zero, in the event of an early matching failure.

The value EOF is returned if the end of input is reached before either the first successful conversion or a matching failure occurs.

ERRORS

EILSEQ
Input byte sequence does not form a valid character.

EINVAL
Not enough arguments; or format is NULL.

ENOMEM
Out of memory.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sscanf(), vsscanf()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

C89, POSIX.1-2001.

The q specifier is the 4.4BSD notation for long long, while ll or the usage of L in integer conversions is the GNU notation.

The Linux version of these functions is based on the GNU libio library. Take a look at the info documentation of GNU libc (glibc-1.08) for a more concise description.

NOTES

The ‘a’ assignment-allocation modifier

Originally, the GNU C library supported dynamic allocation for string inputs (as a nonstandard extension) via the a character. (This feature is present at least as far back as glibc 2.0.) Thus, one could write the following to have sscanf() allocate a buffer for a string, with a pointer to that buffer being returned in *buf:

char *buf;
sscanf(str, "%as", &buf);

The use of the letter a for this purpose was problematic, since a is also specified by the ISO C standard as a synonym for f (floating-point input). POSIX.1-2008 instead specifies the m modifier for assignment allocation (as documented in DESCRIPTION, above).

Note that the a modifier is not available if the program is compiled with gcc -std=c99 or gcc -D_ISOC99_SOURCE (unless _GNU_SOURCE is also specified), in which case the a is interpreted as a specifier for floating-point numbers (see above).

Support for the m modifier was added to glibc 2.7, and new programs should use that modifier instead of a.

As well as being standardized by POSIX, the m modifier has the following further advantages over the use of a:

  • It may also be applied to %c conversion specifiers (e.g., %3mc).

  • It avoids ambiguity with respect to the %a floating-point conversion specifier (and is unaffected by gcc -std=c99 etc.).

BUGS

Numeric conversion specifiers

Use of the numeric conversion specifiers produces Undefined Behavior for invalid input. See C11 7.21.6.2/10. This is a bug in the ISO C standard, and not an inherent design issue with the API. However, current implementations are not safe from that bug, so it is not recommended to use them. Instead, programs should use functions such as strtol(3) to parse numeric input. Alternatively, mitigate it by specifying a maximum field width.

Nonstandard modifiers

These functions are fully C99 conformant, but provide the additional modifiers q and a as well as an additional behavior of the L and ll modifiers. The latter may be considered to be a bug, as it changes the behavior of modifiers defined in C99.

Some combinations of the type modifiers and conversion specifiers defined by C99 do not make sense (e.g., %Ld). While they may have a well-defined behavior on Linux, this need not to be so on other architectures. Therefore it usually is better to use modifiers that are not defined by C99 at all, that is, use q instead of L in combination with d, i, o, u, x, and X conversions or ll.

The usage of q is not the same as on 4.4BSD, as it may be used in float conversions equivalently to L.

EXAMPLES

To use the dynamic allocation conversion specifier, specify m as a length modifier (thus %ms or %m[range]). The caller must free(3) the returned string, as in the following example:

char *p;
int n;
errno = 0;
n = sscanf(str, "%m[a-z]", &p);
if (n == 1) {
    printf("read: %s

“, p); free(p); } else if (errno != 0) { perror(“sscanf”); } else { fprintf(stderr, “No matching characters “); }

As shown in the above example, it is necessary to call free(3) only if the sscanf() call successfully read a string.

SEE ALSO

getc(3), printf(3), setlocale(3), strtod(3), strtol(3), strtoul(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2336 - Linux cli command Image_ExifTool_Realpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Realpm and provides detailed information about the command Image_ExifTool_Realpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Realpm.

NAME 🖥️ Image_ExifTool_Realpm 🖥️

Read Real audio/video meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains the routines required by Image::ExifTool to read meta information in RealAudio (RA), RealMedia (RM, RV and RMVB) and RealMedia Metafile (RAM and RPM) files.

NOTES

There must be a bug in the software that wrote the Metadata used in the test file t/images/Real.rm because the TrackLyricsDataSize word is written little-endian, but the Real format is big-endian.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.getid3.org/>

<https://common.helixcommunity.org/nonav/2003/HCS_SDK_r5/htmfiles/rmff.htm>

SEE ALSO

“Real Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2337 - Linux cli command log2f

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command log2f and provides detailed information about the command log2f, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the log2f.

NAME 🖥️ log2f 🖥️

base-2 logarithmic function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double log2(double x);
float log2f(float x);
long double log2l(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

log2(), log2f(), log2l():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions return the base-2 logarithm of x.

RETURN VALUE

On success, these functions return the base-2 logarithm of x.

For special cases, including where x is 0, 1, negative, infinity, or NaN, see log(3).

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

For a discussion of the errors that can occur for these functions, see log(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

log2(), log2f(), log2l()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD.

SEE ALSO

cbrt(3), clog2(3), log(3), log10(3), sqrt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2338 - Linux cli command Net_DBus_Binding_PendingCallpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Binding_PendingCallpm and provides detailed information about the command Net_DBus_Binding_PendingCallpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Binding_PendingCallpm.

NAME 🖥️ Net_DBus_Binding_PendingCallpm 🖥️

A handler for pending method replies

SYNOPSIS

my $call = Net::DBus::Binding::PendingCall->new(method_call => $call, pending_call => $reply); # Wait for completion $call->block; # And get the reply message my $msg = $call->get_reply;

DESCRIPTION

This object is used when it is necessary to make asynchronous method calls. It provides the means to be notified when the reply is finally received.

METHODS

my $call = Net::DBus::Binding::PendingCall->new(method_call => $method_call, pending_call => $pending_call);
Creates a new pending call object, with the method_call parameter being a reference to the Net::DBus::Binding::Message::MethodCall object whose reply is being waiting for. The pending_call parameter is a reference to the raw C pending call object.

$call->cancel
Cancel the pending call, causing any reply that is later received to be discarded.

my $boolean = $call->get_completed
Returns a true value if the pending call has received its reply, or a timeout has occurred.

$call->block
Block the caller until the reply is received or a timeout occurrs.

my $msg = $call->get_reply;
Retrieves the Net::DBus::Binding::Message object associated with the complete call.

$call->set_notify($coderef);
Sets a notification function to be invoked when the pending call completes. The callback will be passed a single argument which is this pending call object.

AUTHOR

Daniel P. Berrange

COPYRIGHT

Copyright (C) 2006-2011 Daniel P. Berrange

SEE ALSO

Net::DBus::Binding::Connection, Net::DBus::Binding::Message, Net::DBus::ASyncReply

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2339 - Linux cli command Net_DNS_RR_DSpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_DSpm and provides detailed information about the command Net_DNS_RR_DSpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_DSpm.

NAME 🖥️ Net_DNS_RR_DSpm 🖥️

DNS DS resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name DS keytag algorithm digtype digest); use Net::DNS::SEC; $ds = Net::DNS::RR::DS->create( $dnskeyrr, digtype => SHA256, ttl => 3600 );

DESCRIPTION

Class for DNS Delegation Signer (DS) resource record.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

keytag

$keytag = $rr->keytag; $rr->keytag( $keytag );

The 16-bit numerical key tag of the key. (RFC2535 4.1.6)

algorithm

$algorithm = $rr->algorithm; $rr->algorithm( $algorithm );

Decimal representation of the 8-bit algorithm field.

algorithm() may also be invoked as a class method or simple function to perform mnemonic and numeric code translation.

digtype

$digtype = $rr->digtype; $rr->digtype( $digtype );

Decimal representation of the 8-bit digest type field.

digtype() may also be invoked as a class method or simple function to perform mnemonic and numeric code translation.

digest

$digest = $rr->digest; $rr->digest( $digest );

Hexadecimal representation of the digest over the label and key.

digestbin

$digestbin = $rr->digestbin; $rr->digestbin( $digestbin );

Binary representation of the digest over the label and key.

babble

print $rr->babble;

The babble() method returns the ‘BubbleBabble’ representation of the digest if the Digest::BubbleBabble package is available, otherwise an empty string is returned.

BubbleBabble represents a message digest as a string of plausible words, to make the digest easier to verify. The “words” are not necessarily real words, but they look more like words than a string of hex characters.

The ‘BubbleBabble’ string is appended as a comment when the string method is called.

create

use Net::DNS::SEC; $dsrr = Net::DNS::RR::DS->create( $keyrr, digtype => SHA-256 ); $keyrr->print; $dsrr->print;

This constructor takes a DNSKEY argument and will return the corresponding DS RR constructed using the specified algorithm.

The digest algorithm defaults to SHA-1.

verify

$verify = $dsrr->verify($keyrr);

The boolean verify method will return true if the hash over the key RR provided as the argument conforms to the data in the DS itself i.e. the DS points to the DNSKEY from the argument.

COPYRIGHT

Copyright (c)2001-2005 RIPE NCC. Author Olaf M. Kolkman

Portions Copyright (c)2013,2021 Dick Franks.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC4034 (5) <https://iana.org/go/rfc4034#section-5>

Digest Types <https://iana.org/assignments/ds-rr-types>

Algorithm Numbers <https://iana.org/assignments/dns-sec-alg-numbers>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2340 - Linux cli command pcap_offline_filterpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_offline_filterpcap and provides detailed information about the command pcap_offline_filterpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_offline_filterpcap.

NAME 🖥️ pcap_offline_filterpcap 🖥️

check whether a filter matches a packet

SYNOPSIS

#include <pcap/pcap.h>
int pcap_offline_filter(const struct bpf_program *fp,
const struct pcap_pkthdr *h, const u_char *pkt)

DESCRIPTION

pcap_offline_filter() checks whether a filter matches a packet. fp is a pointer to a bpf_program struct, usually the result of a call to pcap_compile(3PCAP). h points to the pcap_pkthdr structure for the packet, and pkt points to the data in the packet.

RETURN VALUE

pcap_offline_filter() returns the return value of the filter program. This will be zero if the packet doesn’t match the filter and non-zero if the packet matches the filter.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2341 - Linux cli command zip_file_replace

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_file_replace and provides detailed information about the command zip_file_replace, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_file_replace.

libzip (-lzip)

The function

adds a file to a zip archive, while

replaces an existing file in a zip archive. The argument

specifies the zip archive to which the file should be added.

is the file’s name in the zip archive (for

while

specifies which file should be replaced (for

The

argument can be any combination of

with one of

Overwrite any existing file of the same name. For

only.

Guess encoding of

(default).

Interpret

as UTF-8.

Interpret

as code page 437 (CP-437).

The data is obtained from the

argument, see

should not be called on a

after it was used successfully in a

or

call.

Upon successful completion,

returns the index of the new file in the archive, and

returns 0. Otherwise, -1 is returned and the error code in

is set to indicate the error.

zip_source_t *s; const char *buf=“teststring”;

if ((s=zip_source_buffer(archive, buf, sizeof(buf), 0)) == NULL || zip_file_add(archive, name, s, ZIP_FL_ENC_UTF_8) < 0) { zip_source_free(s); printf(“error adding file: %s “, zip_strerror(archive)); }

and

fail if:

There is already a file called

in the archive. (Only applies to

and only if

is not provided).

or

are

or

is invalid.

Required memory could not be allocated.

Archive was opened in read-only mode.

and

were added in libzip 0.11.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2342 - Linux cli command fopen

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fopen and provides detailed information about the command fopen, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fopen.

NAME 🖥️ fopen 🖥️

stream open functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
FILE *fopen(const char *restrict pathname",constchar*restrict"mode);
FILE *fdopen(int fd, const char *mode);
FILE *freopen(const char *restrict pathname",constchar*restrict"mode,
 FILE *restrict stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

fdopen():

    _POSIX_C_SOURCE

DESCRIPTION

The fopen() function opens the file whose name is the string pointed to by pathname and associates a stream with it.

The argument mode points to a string beginning with one of the following sequences (possibly followed by additional characters, as described below):

r
Open text file for reading. The stream is positioned at the beginning of the file.

r+
Open for reading and writing. The stream is positioned at the beginning of the file.

w
Truncate file to zero length or create text file for writing. The stream is positioned at the beginning of the file.

w+
Open for reading and writing. The file is created if it does not exist, otherwise it is truncated. The stream is positioned at the beginning of the file.

a
Open for appending (writing at end of file). The file is created if it does not exist. The stream is positioned at the end of the file.

a+
Open for reading and appending (writing at end of file). The file is created if it does not exist. Output is always appended to the end of the file. POSIX is silent on what the initial read position is when using this mode. For glibc, the initial file position for reading is at the beginning of the file, but for Android/BSD/MacOS, the initial file position for reading is at the end of the file.

The mode string can also include the letter ‘b’ either as a last character or as a character between the characters in any of the two-character strings described above. This is strictly for compatibility with ISO C and has no effect; the ‘b’ is ignored on all POSIX conforming systems, including Linux. (Other systems may treat text files and binary files differently, and adding the ‘b’ may be a good idea if you do I/O to a binary file and expect that your program may be ported to non-UNIX environments.)

See NOTES below for details of glibc extensions for mode.

Any created file will have the mode S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH (0666), as modified by the process’s umask value (see umask(2)).

Reads and writes may be intermixed on read/write streams in any order. Note that ANSI C requires that a file positioning function intervene between output and input, unless an input operation encounters end-of-file. (If this condition is not met, then a read is allowed to return the result of writes other than the most recent.) Therefore it is good practice (and indeed sometimes necessary under Linux) to put an fseek(3) or fsetpos(3) operation between write and read operations on such a stream. This operation may be an apparent no-op (as in fseek(…, 0L, SEEK_CUR) called for its synchronizing side effect).

Opening a file in append mode (a as the first character of mode) causes all subsequent write operations to this stream to occur at end-of-file, as if preceded by the call:

fseek(stream, 0, SEEK_END);

The file descriptor associated with the stream is opened as if by a call to open(2) with the following flags:

fopen() modeopen() flags
rO_RDONLY
wO_WRONLY | O_CREAT | O_TRUNC
aO_WRONLY | O_CREAT | O_APPEND
r+O_RDWR
w+O_RDWR | O_CREAT | O_TRUNC
a+O_RDWR | O_CREAT | O_APPEND

fdopen()

The fdopen() function associates a stream with the existing file descriptor, fd. The mode of the stream (one of the values “r”, “r+”, “w”, “w+”, “a”, “a+”) must be compatible with the mode of the file descriptor. The file position indicator of the new stream is set to that belonging to fd, and the error and end-of-file indicators are cleared. Modes “w” or “w+” do not cause truncation of the file. The file descriptor is not dup’ed, and will be closed when the stream created by fdopen() is closed. The result of applying fdopen() to a shared memory object is undefined.

freopen()

The freopen() function opens the file whose name is the string pointed to by pathname and associates the stream pointed to by stream with it. The original stream (if it exists) is closed. The mode argument is used just as in the fopen() function.

If the pathname argument is a null pointer, freopen() changes the mode of the stream to that specified in mode; that is, freopen() reopens the pathname that is associated with the stream. The specification for this behavior was added in the C99 standard, which says:

In this case, the file descriptor associated with the stream need not be closed if the call to freopen() succeeds. It is implementation-defined which changes of mode are permitted (if any), and under what circumstances.

The primary use of the freopen() function is to change the file associated with a standard text stream (stderr, stdin, or stdout).

RETURN VALUE

Upon successful completion fopen(), fdopen(), and freopen() return a FILE pointer. Otherwise, NULL is returned and errno is set to indicate the error.

ERRORS

EINVAL
The mode provided to fopen(), fdopen(), or freopen() was invalid.

The fopen(), fdopen(), and freopen() functions may also fail and set errno for any of the errors specified for the routine malloc(3).

The fopen() function may also fail and set errno for any of the errors specified for the routine open(2).

The fdopen() function may also fail and set errno for any of the errors specified for the routine fcntl(2).

The freopen() function may also fail and set errno for any of the errors specified for the routines open(2), fclose(3), and fflush(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fopen(), fdopen(), freopen()

Thread safetyMT-Safe

STANDARDS

fopen()
freopen()
C11, POSIX.1-2008.

fdopen()
POSIX.1-2008.

HISTORY

fopen()
freopen()
POSIX.1-2001, C89.

fdopen()
POSIX.1-2001.

NOTES

glibc notes

The GNU C library allows the following extensions for the string specified in mode:

c (since glibc 2.3.3)
Do not make the open operation, or subsequent read and write operations, thread cancelation points. This flag is ignored for fdopen().

e (since glibc 2.7)
Open the file with the O_CLOEXEC flag. See open(2) for more information. This flag is ignored for fdopen().

m (since glibc 2.3)
Attempt to access the file using mmap(2), rather than I/O system calls (read(2), write(2)). Currently, use of mmap(2) is attempted only for a file opened for reading.

x
Open the file exclusively (like the O_EXCL flag of open(2)). If the file already exists, fopen() fails, and sets errno to EEXIST. This flag is ignored for fdopen().

In addition to the above characters, fopen() and freopen() support the following syntax in mode:

** ,ccs=**string

The given string is taken as the name of a coded character set and the stream is marked as wide-oriented. Thereafter, internal conversion functions convert I/O to and from the character set string. If the **,ccs=**string syntax is not specified, then the wide-orientation of the stream is determined by the first file operation. If that operation is a wide-character operation, the stream is marked wide-oriented, and functions to convert to the coded character set are loaded.

BUGS

When parsing for individual flag characters in mode (i.e., the characters preceding the “ccs” specification), the glibc implementation of fopen() and freopen() limits the number of characters examined in mode to 7 (or, before glibc 2.14, to 6, which was not enough to include possible specifications such as “rb+cmxe”). The current implementation of fdopen() parses at most 5 characters in mode.

SEE ALSO

open(2), fclose(3), fileno(3), fmemopen(3), fopencookie(3), open_memstream(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2343 - Linux cli command nextup

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command nextup and provides detailed information about the command nextup, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the nextup.

NAME 🖥️ nextup 🖥️

return next floating-point number toward positive/negative infinity

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <math.h>
double nextup(double x);
float nextupf(float x);
long double nextupl(long double x);
double nextdown(double x);
float nextdownf(float x);
long double nextdownl(long double x);

DESCRIPTION

The nextup(), nextupf(), and nextupl() functions return the next representable floating-point number greater than x.

If x is the smallest representable negative number in the corresponding type, these functions return -0. If x is 0, the returned value is the smallest representable positive number of the corresponding type.

If x is positive infinity, the returned value is positive infinity. If x is negative infinity, the returned value is the largest representable finite negative number of the corresponding type.

If x is Nan, the returned value is NaN.

The value returned by nextdown(x) is -nextup(-x), and similarly for the other types.

RETURN VALUE

See DESCRIPTION.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

nextup(), nextupf(), nextupl(), nextdown(), nextdownf(), nextdownl()

Thread safetyMT-Safe

STANDARDS

These functions are described in IEEE Std 754-2008 - Standard for Floating-Point Arithmetic and ISO/IEC TS 18661.

HISTORY

glibc 2.24.

SEE ALSO

nearbyint(3), nextafter(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2344 - Linux cli command remainderf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command remainderf and provides detailed information about the command remainderf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the remainderf.

NAME 🖥️ remainderf 🖥️

floating-point remainder function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double remainder(double x, double y);
float remainderf(float x, float y);
long double remainderl(long double x, long double y);
/* Obsolete synonyms */
[[deprecated]] double drem(double x, double y);
[[deprecated]] float dremf(float x, float y);
[[deprecated]] long double dreml(long double x, long double y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

remainder():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

remainderf(), remainderl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

drem(), dremf(), dreml():

    /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions compute the remainder of dividing x by y. The return value is x-n*y, where n is the value x / y, rounded to the nearest integer. If the absolute value of x-n*y is 0.5, n is chosen to be even.

These functions are unaffected by the current rounding mode (see fenv(3)).

The drem() function does precisely the same thing.

RETURN VALUE

On success, these functions return the floating-point remainder, x-n*y. If the return value is 0, it has the sign of x.

If x or y is a NaN, a NaN is returned.

If x is an infinity, and y is not a NaN, a domain error occurs, and a NaN is returned.

If y is zero, and x is not a NaN, a domain error occurs, and a NaN is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is an infinity and y is not a NaN
errno is set to EDOM (but see BUGS). An invalid floating-point exception (FE_INVALID) is raised.

These functions do not set errno for this case.

Domain error: y is zero
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

drem(), dremf(), dreml(), remainder(), remainderf(), remainderl()

Thread safetyMT-Safe

STANDARDS

remainder()
remainderf()
remainderl()
C11, POSIX.1-2008.

drem()
dremf()
dreml()
None.

HISTORY

remainder()
remainderf()
remainderl()
C99, POSIX.1-2001.

drem()
4.3BSD.

dremf()
dreml()
Tru64, glibc2.

BUGS

Before glibc 2.15, the call

remainder(nan(""), 0);

returned a NaN, as expected, but wrongly caused a domain error. Since glibc 2.15, a silent NaN (i.e., no domain error) is returned.

Before glibc 2.15, errno was not set to EDOM for the domain error that occurs when x is an infinity and y is not a NaN.

EXAMPLES

The call “remainder(29.0, 3.0)” returns -1.

SEE ALSO

div(3), fmod(3), remquo(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2345 - Linux cli command STAILQ_CONCAT

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command STAILQ_CONCAT and provides detailed information about the command STAILQ_CONCAT, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the STAILQ_CONCAT.

NAME 🖥️ STAILQ_CONCAT 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2346 - Linux cli command XShapeCombineMask

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XShapeCombineMask and provides detailed information about the command XShapeCombineMask, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XShapeCombineMask.

NAME 🖥️ XShapeCombineMask 🖥️

X nonrectangular shape functions

SYNTAX

#include <X11/extensions/shape.h>
Bool XShapeQueryExtension (
	Display *dpy,
	int *event_basep,
	int *error_basep);
Status XShapeQueryVersion (
	Display *dpy,
	int *major_versionp,
	int *minor_versionp);
void XShapeCombineRegion (
	Display *dpy,
	Window dest,
	int destKind,
	int xOff,
	int yOff,
	struct _XRegion *r,
	int op);
void XShapeCombineRectangles (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	XRectangle *rects,
	int n_rects,
	int op,
	int ordering);
void XShapeCombineMask (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	Pixmap src,
	int op);
void XShapeCombineShape (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	Pixmap src,
	int srcKind,
	int op);
void XShapeOffsetShape (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff);
Status XShapeQueryExtents (
	Display *dpy,
	Window window,
	int *bShaped,
	int *xbs,
	int *ybs,
	unsigned int *wbs,
	unsigned int *hbs,
	int *cShaped,
	int *xcs,
	int *ycs,
	unsigned int *wcs,
	unsigned int *hcs);
void XShapeSelectInput (
	Display *dpy,
	Window window,
	unsigned longmask);
unsigned long XShapeInputSelected (
	Display *dpy,
	Window window);
XRectangle *XShapeGetRectangles (
	Display *dpy,
	Window window,
	int kind,
	int *count,
	int *ordering);

STRUCTURES

typedef struct {
    int type;	/* of event */
    unsigned long serial;	/* # of last request processed by server */
    Bool send_event;	/* true if this came from a SendEvent request */
    Display *display;	/* Display the event was read from */
    Window window;	/* window of event */
    int kind;	/* ShapeBounding or ShapeClip */
    int x, y;	/* extents of new region */
    unsigned width, height;
    Time time;	/* server timestamp when region changed */
    Bool shaped;	/* true if the region exists */
} XShapeEvent;

DESCRIPTION

The X11 Nonrectangular Window Shape Extension adds nonrectangular windows to the X Window System.

PREDEFINED VALUES

Operations:

 ShapeSet   ShapeUnion   ShapeIntersect   ShapeSubtract   ShapeInvert 

Shape Kinds:

 ShapeBounding   ShapeClip 

Event defines:

 ShapeNotifyMask   ShapeNotify 

BUGS

This manual page needs a lot more work.

SEE ALSO

X11 Nonrectangular Window Shape Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2347 - Linux cli command Net_DNS_RRpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RRpm and provides detailed information about the command Net_DNS_RRpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RRpm.

NAME 🖥️ Net_DNS_RRpm 🖥️

DNS resource record base class

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(example.com IN AAAA 2001:DB8::1); $rr = Net::DNS::RR->new( owner => example.com, type => AAAA, address => 2001:DB8::1 );

DESCRIPTION

Net::DNS::RR is the base class for DNS Resource Record (RR) objects. See also the manual pages for each specific RR type.

METHODS

WARNING!!! Do not assume the RR objects you receive from a query are of a particular type. You must always check the object type before calling any of its methods. If you call an unknown method, you will get an error message and execution will be terminated.

new (from string)

$aaaa = Net::DNS::RR->new(host.example.com. 86400 AAAA 2001:DB8::1); $mx = Net::DNS::RR->new(example.com. 7200 MX 10 mailhost.example.com.); $cname = Net::DNS::RR->new(www.example.com 300 IN CNAME host.example.com); $txt = Net::DNS::RR->new(txt.example.com 3600 HS TXT “text data”);

Returns an object of the appropriate RR type, or a Net::DNS::RR object if the type is not implemented. The attribute values are extracted from the string passed by the user. The syntax of the argument string follows the RFC1035 specification for zone files, and is compatible with the result returned by the string method.

The owner and RR type are required; all other information is optional. Omitting the optional fields is useful for creating the empty RDATA sections required for certain dynamic update operations. See the Net::DNS::Update manual page for additional examples.

All names are interpreted as fully qualified domain names. The trailing dot (.) is optional.

new (from hash)

$rr = Net::DNS::RR->new(%hash); $rr = Net::DNS::RR->new( owner => host.example.com, ttl => 86400, class => IN, type => AAAA, address => 2001:DB8::1 ); $rr = Net::DNS::RR->new( owner => txt.example.com, type => TXT, txtdata => [ one, two ] );

Returns an object of the appropriate RR type, or a Net::DNS::RR object if the type is not implemented. Consult the relevant manual pages for the usage of type specific attributes.

The owner and RR type are required; all other information is optional. Omitting optional attributes is useful for creating the empty RDATA sections required for certain dynamic update operations.

decode

( $rr, $next ) = Net::DNS::RR->decode( \data, $offset, @opaque );

Decodes a DNS resource record at the specified location within a DNS packet.

The argument list consists of a reference to the buffer containing the packet data and offset indicating where resource record begins. Any remaining arguments are passed as opaque data to subordinate decoders and do not form part of the published interface.

Returns a Net::DNS::RR object and the offset of the next record in the packet.

An exception is raised if the data buffer contains insufficient or corrupt data.

encode

$data = $rr->encode( $offset, @opaque );

Returns the Net::DNS::RR in binary format suitable for inclusion in a DNS packet buffer.

The offset indicates the intended location within the packet data where the Net::DNS::RR is to be stored.

Any remaining arguments are opaque data which are passed intact to subordinate encoders.

canonical

$data = $rr->canonical;

Returns the Net::DNS::RR in canonical binary format suitable for DNSSEC signature validation.

The absence of the associative array argument signals to subordinate encoders that the canonical uncompressed lower case form of embedded domain names is to be used.

print

$rr->print;

Prints the resource record to the currently selected output filehandle. Calls the string method to get the formatted RR representation.

string

print $rr->string, " “;

Returns a string representation of the RR using the master file format mandated by RFC1035. All domain names are fully qualified with trailing dot. This differs from RR attribute methods, which omit the trailing dot.

plain

$plain = $rr->plain;

Returns a simplified single-line representation of the RR. This facilitates interaction with programs like nsupdate which have rudimentary parsers.

token

@token = $rr->token;

Returns a token list representation of the RR zone file string.

generic

$generic = $rr->generic;

Returns the generic RR representation defined in RFC3597. This facilitates creation of zone files containing RRs unrecognised by outdated nameservers and provisioning software.

owner name

$name = $rr->owner;

Returns the owner name of the record.

type

$type = $rr->type;

Returns the record type.

class

$class = $rr->class;

Resource record class.

ttl

$ttl = $rr->ttl; $ttl = $rr->ttl(3600);

Resource record time to live in seconds.

rdata

$rr = Net::DNS::RR->new( type => NULL, rdata => arbitrary );

Resource record data section when viewed as opaque octets.

rdstring

$rdstring = $rr->rdstring;

Returns a string representation of the RR-specific data.

rdlength

$rdlength = $rr->rdlength;

Returns the uncompressed length of the encoded RR-specific data.

Sorting of RR arrays

Sorting of RR arrays is done by Net::DNS::rrsort(), see documentation for Net::DNS. This package provides class methods to set the comparator function used for a particular RR based on its attributes.

set_rrsort_func

my $function = sub { ## numerically ascending order $Net::DNS::a->{preference} <=> $Net::DNS::b->{preference}; }; Net::DNS::RR::MX->set_rrsort_func( preference, $function ); Net::DNS::RR::MX->set_rrsort_func( default_sort, $function );

set_rrsort_func() must be called as a class method. The first argument is the attribute name on which the sorting is to take place. If you specify “default_sort” then that is the sort algorithm that will be used when get_rrsort_func() is called without an RR attribute as argument.

The second argument is a reference to a comparator function that uses the global variables $a and $b in the Net::DNS package. During sorting, the variables $a and $b will contain references to objects of the class whose set_rrsort_func() was called. The above sorting function will only be applied to Net::DNS::RR::MX objects.

The above example is the sorting function implemented in MX.

get_rrsort_func

$function = Net::DNS::RR::MX->get_rrsort_func(preference); $function = Net::DNS::RR::MX->get_rrsort_func();

get_rrsort_func() returns a reference to the comparator function.

COPYRIGHT

Copyright (c)1997-2001 Michael Fuhr.

Portions Copyright (c)2002,2003 Chris Reinhardt.

Portions Copyright (c)2005-2007 Olaf Kolkman.

Portions Copyright (c)2007,2012 Dick Franks.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::Question Net::DNS::Packet Net::DNS::Update RFC1035(4.1.3) <https://tools.ietf.org/html/rfc1035> RFC3597 <https://tools.ietf.org/html/rfc3597>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2348 - Linux cli command rintl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command rintl and provides detailed information about the command rintl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the rintl.

NAME 🖥️ rintl 🖥️

round to nearest integer

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double nearbyint(double x);
float nearbyintf(float x);
long double nearbyintl(long double x);
double rint(double x);
float rintf(float x);
long double rintl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

nearbyint(), nearbyintf(), nearbyintl():

    _POSIX_C_SOURCE >= 200112L || _ISOC99_SOURCE

rint():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

rintf(), rintl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The nearbyint(), nearbyintf(), and nearbyintl() functions round their argument to an integer value in floating-point format, using the current rounding direction (see fesetround(3)) and without raising the inexact exception. When the current rounding direction is to nearest, these functions round halfway cases to the even integer in accordance with IEEE-754.

The rint(), rintf(), and rintl() functions do the same, but will raise the inexact exception (FE_INEXACT, checkable via fetestexcept(3)) when the result differs in value from the argument.

RETURN VALUE

These functions return the rounded integer value.

If x is integral, +0, -0, NaN, or infinite, x itself is returned.

ERRORS

No errors occur. POSIX.1-2001 documents a range error for overflows, but see NOTES.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

nearbyint(), nearbyintf(), nearbyintl(), rint(), rintf(), rintl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

NOTES

SUSv2 and POSIX.1-2001 contain text about overflow (which might set errno to ERANGE, or raise an FE_OVERFLOW exception). In practice, the result cannot overflow on any current machine, so this error-handling stuff is just nonsense. (More precisely, overflow can happen only when the maximum value of the exponent is smaller than the number of mantissa bits. For the IEEE-754 standard 32-bit and 64-bit floating-point numbers the maximum value of the exponent is 127 (respectively, 1023), and the number of mantissa bits including the implicit bit is 24 (respectively, 53).)

If you want to store the rounded value in an integer type, you probably want to use one of the functions described in lrint(3) instead.

SEE ALSO

ceil(3), floor(3), lrint(3), round(3), trunc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2349 - Linux cli command XtIsSessionShell

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtIsSessionShell and provides detailed information about the command XtIsSessionShell, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtIsSessionShell.

NAME 🖥️ XtIsSessionShell 🖥️

obtain and verify a widget’s class

SYNTAX

#include <X11/Intrinsic.h>

WidgetClass XtClass(Widget w);

WidgetClass XtSuperclass(Widget w);

Boolean XtIsSubclass(Widget w, WidgetClass widget_class);

void XtCheckSubclass(Widget widget, WidgetClass widget_class, String message);

Boolean XtIsObject(Widget w);

Boolean XtIsRectObj(Widget w);

Boolean XtIsWidget(Widget w);

Boolean XtIsComposite(Widget w);

Boolean XtIsConstraint(Widget w);

Boolean XtIsShell(Widget w);

Boolean XtIsOverrideShell(Widget w);

Boolean XtIsWMShell(Widget w);

Boolean XtIsVendorShell(Widget w);

Boolean XtIsTransientShell(Widget w);

Boolean XtIsTopLevelShell(Widget w);

Boolean XtIsApplicationShell(Widget w);

Boolean XtIsSessionShell(Widget w);

ARGUMENTS

  1. Specifies the widget.

widget_class
Specifies the widget class.

message
Specifies the message that is to be used.

DESCRIPTION

The XtClass function returns a pointer to the widget’s class structure.

The XtSuperclass function returns a pointer to the widget’s superclass class structure.

The XtIsSubclass function returns True if the class of the specified widget is equal to or is a subclass of the specified class. The widget’s class can be any number of subclasses down the chain and need not be an immediate subclass of the specified class. Composite widgets that need to restrict the class of the items they contain can use XtIsSubclass to find out if a widget belongs to the desired class of objects.

The XtCheckSubclass macro determines if the class of the specified widget is equal to or is a subclass of the specified widget class. The widget can be any number of subclasses down the chain and need not be an immediate subclass of the specified widget class. If the specified widget is not a subclass, XtCheckSubclass constructs an error message from the supplied message, the widget’s actual class, and the expected class and calls XtErrorMsg. XtCheckSubclass should be used at the entry point of exported routines to ensure that the client has passed in a valid widget class for the exported operation.

XtCheckSubclass is only executed when the widget has been compiled with the compiler symbol DEBUG defined; otherwise, it is defined as the empty string and generates no code.

To test if a given widget belongs to a subclass of an Intrinsics-defined class, the Intrinsics defines macros or functions equivalent to XtIsSubclass for each of the built-in classes. These procedures are XtIsObject, XtIsRectObj, XtIsWidget, XtIsComposite, XtIsConstraint, XtIsShell, XtIsOverrideShell, XtIsWMShell, XtIsVendorShell, XtIsTransientShell, XtIsTopLevelShell, XtIsApplicationShell, and XtIsSessionShell.

The

SEE ALSO

XtAppErrorMsg(3), XtDisplay(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2350 - Linux cli command wcsncasecmp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcsncasecmp and provides detailed information about the command wcsncasecmp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcsncasecmp.

NAME 🖥️ wcsncasecmp 🖥️

compare two fixed-size wide-character strings, ignoring case

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
int wcsncasecmp(const wchar_t s1[.n], const wchar_t s2[.n], size_t n);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

wcsncasecmp():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The wcsncasecmp() function is the wide-character equivalent of the strncasecmp(3) function. It compares the wide-character string pointed to by s1 and the wide-character string pointed to by s2, but at most n wide characters from each string, ignoring case differences (towupper(3), towlower(3)).

RETURN VALUE

The wcsncasecmp() function returns zero if the wide-character strings at s1 and s2, truncated to at most length n, are equal except for case distinctions. It returns a positive integer if truncated s1 is greater than truncated s2, ignoring case. It returns a negative integer if truncated s1 is smaller than truncated s2, ignoring case.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcsncasecmp()

Thread safetyMT-Safe locale

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.1.

NOTES

The behavior of wcsncasecmp() depends on the LC_CTYPE category of the current locale.

SEE ALSO

strncasecmp(3), wcsncmp(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2351 - Linux cli command HTTP_Headers_Utilpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTTP_Headers_Utilpm and provides detailed information about the command HTTP_Headers_Utilpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTTP_Headers_Utilpm.

NAME 🖥️ HTTP_Headers_Utilpm 🖥️

Header value parsing utility functions

VERSION

version 6.46

SYNOPSIS

use HTTP::Headers::Util qw(split_header_words); @values = split_header_words($h->header(“Content-Type”));

DESCRIPTION

This module provides a few functions that helps parsing and construction of valid HTTP header values. None of the functions are exported by default.

The following functions are available:

split_header_words( @header_values )
This function will parse the header values given as argument into a list of anonymous arrays containing key/value pairs. The function knows how to deal with “,”, “;” and “=” as well as quoted values after “=”. A list of space separated tokens are parsed as if they were separated by “;”. If the @header_values passed as argument contains multiple values, then they are treated as if they were a single value separated by comma “,”. This means that this function is useful for parsing header fields that follow this syntax (BNF as from the HTTP/1.1 specification, but we relax the requirement for tokens). headers = #header header = (token | parameter) *( [";"] (token | parameter)) token = 1*<any CHAR except CTLs or separators> separators = “(” | “)” | “<” | “>” | “@” | “,” | “;” | “:” | “\ | <"> | “/” | “[” | “]” | “?” | “=” | “{” | “}” | SP | HT quoted-string = ( <"> *(qdtext | quoted-pair ) <"> ) qdtext = <any TEXT except <">> quoted-pair = “\ CHAR parameter = attribute “=” value attribute = token value = token | quoted-string Each header is represented by an anonymous array of key/value pairs. The keys will be all be forced to lower case. The value for a simple token (not part of a parameter) is undef. Syntactically incorrect headers will not necessarily be parsed as you would want. This is easier to describe with some examples: split_header_words(foo=“bar”; port=“80,81”; DISCARD, BAR=baz); split_header_words(text/html; charset=“iso-8859-1”); split_header_words(Basic realm=”"foo\bar"”); will return [foo=>bar, port=>80,81, discard=> undef], [bar=>baz ] [text/html => undef, charset => iso-8859-1] [basic => undef, realm => “\foo\bar"] If you don’t want the function to convert tokens and attribute keys to lower case you can call it as _split_header_words instead (with a leading underscore).

join_header_words( @arrays )
This will do the opposite of the conversion done by split_header_words(). It takes a list of anonymous arrays as arguments (or a list of key/value pairs) and produces a single header value. Attribute values are quoted if needed. Example: join_header_words([“text/plain” => undef, charset => “iso-8859/1”]); join_header_words(“text/plain” => undef, charset => “iso-8859/1”); will both return the string: text/plain; charset=“iso-8859/1”

AUTHOR

Gisle Aas <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 1994 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2352 - Linux cli command Moose_Cookbook_Roles_ApplicationToInstancepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Roles_ApplicationToInstancepm and provides detailed information about the command Moose_Cookbook_Roles_ApplicationToInstancepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Roles_ApplicationToInstancepm.

NAME 🖥️ Moose_Cookbook_Roles_ApplicationToInstancepm 🖥️

Applying a role to an object instance

VERSION

version 2.2207

SYNOPSIS

package MyApp::Role::Job::Manager; use List::Util qw( first ); use Moose::Role; has employees => ( is => rw, isa => ArrayRef[Employee], ); sub assign_work { my $self = shift; my $work = shift; my $employee = first { !$_->has_work } @{ $self->employees }; die All my employees have work to do! unless $employee; $employee->work($work); } package main; my $lisa = Employee->new( name => Lisa ); MyApp::Role::Job::Manager->meta->apply($lisa); my $homer = Employee->new( name => Homer ); my $bart = Employee->new( name => Bart ); my $marge = Employee->new( name => Marge ); $lisa->employees( [ $homer, $bart, $marge ] ); $lisa->assign_work(mow the lawn);

DESCRIPTION

In this recipe, we show how a role can be applied to an object. In this specific case, we are giving an employee managerial responsibilities.

Applying a role to an object is simple. The Moose::Meta::Role object provides an apply method. This method will do the right thing when given an object instance.

MyApp::Role::Job::Manager->meta->apply($lisa);

We could also use the apply_all_roles function from Moose::Util.

apply_all_roles( $person, MyApp::Role::Job::Manager->meta );

The main advantage of using apply_all_roles is that it can be used to apply more than one role at a time.

We could also pass parameters to the role we’re applying:

MyApp::Role::Job::Manager->meta->apply( $lisa, -alias => { assign_work => get_off_your_lazy_behind }, );

We saw examples of how method exclusion and alias working in Moose::Cookbook::Roles::Restartable_AdvancedComposition.

CONCLUSION

Applying a role to an object instance is a useful tool for adding behavior to existing objects. In our example, it is effective used to model a promotion.

It can also be useful as a sort of controlled monkey-patching for existing code, particularly non-Moose code. For example, you could create a debugging role and apply it to an object at runtime.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2353 - Linux cli command voidtype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command voidtype and provides detailed information about the command voidtype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the voidtype.

NAME 🖥️ voidtype 🖥️

abstract type

SYNOPSIS

void *

DESCRIPTION

A pointer to any object type may be converted to a pointer to void and back. POSIX further requires that any pointer, including pointers to functions, may be converted to a pointer to void and back.

Conversions from and to any other pointer type are done implicitly, not requiring casts at all. Note that this feature prevents any kind of type checking: the programmer should be careful not to convert a void * value to a type incompatible to that of the underlying data, because that would result in undefined behavior.

This type is useful in function parameters and return value to allow passing values of any type. The function will typically use some mechanism to know the real type of the data being passed via a pointer to void.

A value of this type can’t be dereferenced, as it would give a value of type void, which is not possible. Likewise, pointer arithmetic is not possible with this type. However, in GNU C, pointer arithmetic is allowed as an extension to the standard; this is done by treating the size of a void or of a function as 1. A consequence of this is that sizeof is also allowed on void and on function types, and returns 1.

Use with printf(3) and scanf(3)

The conversion specifier for void * for the printf(3) and the scanf(3) families of functions is p.

VERSIONS

The POSIX requirement about compatibility between void * and function pointers was added in POSIX.1-2008 Technical Corrigendum 1 (2013).

STANDARDS

C11, POSIX.1-2008.

HISTORY

C89, POSIX.1-2001.

SEE ALSO

malloc(3), memcmp(3), memcpy(3), memset(3), intptr_t(3type)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2354 - Linux cli command pcap_get_tstamp_precisionpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_get_tstamp_precisionpcap and provides detailed information about the command pcap_get_tstamp_precisionpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_get_tstamp_precisionpcap.

NAME 🖥️ pcap_get_tstamp_precisionpcap 🖥️

get the time stamp precision returned in captures

SYNOPSIS

#include <pcap/pcap.h>
int pcap_get_tstamp_precision(pcap_t *p);

DESCRIPTION

pcap_get_tstamp_precision() returns the precision of the time stamp returned in packet captures on the pcap descriptor.

RETURN VALUE

pcap_get_tstamp_precision() returns PCAP_TSTAMP_PRECISION_MICRO or PCAP_TSTAMP_PRECISION_NANO, which indicates that pcap captures contains time stamps in microseconds or nanoseconds respectively.

BACKWARD COMPATIBILITY

This function became available in libpcap release 1.5.1. In previous releases, time stamps from a capture device or savefile are always given in seconds and microseconds.

SEE ALSO

pcap(3PCAP), pcap_set_tstamp_precision(3PCAP), pcap-tstamp(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2355 - Linux cli command X11_Protocol_Connection_Socketpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command X11_Protocol_Connection_Socketpm and provides detailed information about the command X11_Protocol_Connection_Socketpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the X11_Protocol_Connection_Socketpm.

NAME 🖥️ X11_Protocol_Connection_Socketpm 🖥️

Perl module base class for IO::Socket-based X11 connections

SYNOPSIS

package X11::Protocol::Connection::WeirdSocket; use X11::Protocol::Connection::Socket; @ISA = (X11::Protocol::Connection::Socket)

DESCRIPTION

This module defines get(), give() and fh() methods common to X11::Protocol::Connection types that are based on IO::Socket. They expect the object they are called with to be a reference to an IO::Socket.

AUTHOR

Stephen McCamant <[email protected]>.

SEE ALSO

perl (1), X11::Protocol, X11::Protocol::Connection::INETSocket, X11::Protocol::Connection::UNIXSocket, IO::Socket.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2356 - Linux cli command xdr_rejected_reply

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_rejected_reply and provides detailed information about the command xdr_rejected_reply, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_rejected_reply.

NAME 🖥️ xdr_rejected_reply 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2357 - Linux cli command profil

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command profil and provides detailed information about the command profil, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the profil.

NAME 🖥️ profil 🖥️

execution time profile

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
int profil(unsigned short *buf, size_t bufsiz,
 size_t offset, unsigned int scale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

profil():

    Since glibc 2.21:
        _DEFAULT_SOURCE
    In glibc 2.19 and 2.20:
        _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)
    Up to and including glibc 2.19:
        _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)

DESCRIPTION

This routine provides a means to find out in what areas your program spends most of its time. The argument buf points to bufsiz bytes of core. Every virtual 10 milliseconds, the user’s program counter (PC) is examined: offset is subtracted and the result is multiplied by scale and divided by 65536. If the resulting value is less than bufsiz, then the corresponding entry in buf is incremented. If buf is NULL, profiling is disabled.

RETURN VALUE

Zero is always returned.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

profil()

Thread safetyMT-Unsafe

STANDARDS

None.

HISTORY

Similar to a call in SVr4.

BUGS

profil() cannot be used on a program that also uses ITIMER_PROF interval timers (see setitimer(2)).

True kernel profiling provides more accurate results.

SEE ALSO

gprof(1), sprof(1), setitimer(2), sigaction(2), signal(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2358 - Linux cli command wcsnrtombs

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcsnrtombs and provides detailed information about the command wcsnrtombs, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcsnrtombs.

NAME 🖥️ wcsnrtombs 🖥️

convert a wide-character string to a multibyte string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
size_t wcsnrtombs(char dest[restrict .len], const wchar_t **restrict src,
 size_t nwc, size_t len, mbstate_t *restrict ps);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

wcsnrtombs():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The wcsnrtombs() function is like the wcsrtombs(3) function, except that the number of wide characters to be converted, starting at *src, is limited to nwc.

If dest is not NULL, the wcsnrtombs() function converts at most nwc wide characters from the wide-character string *src to a multibyte string starting at dest. At most len bytes are written to dest. The shift state *ps is updated. The conversion is effectively performed by repeatedly calling wcrtomb(dest, *src, ps), as long as this call succeeds, and then incrementing dest by the number of bytes written and *src by one. The conversion can stop for three reasons:

  • A wide character has been encountered that can not be represented as a multibyte sequence (according to the current locale). In this case, *src is left pointing to the invalid wide character, (size_t) -1 is returned, and errno is set to EILSEQ.

  • nwc wide characters have been converted without encountering a null wide character (L’�’), or the length limit forces a stop. In this case, *src is left pointing to the next wide character to be converted, and the number of bytes written to dest is returned.

  • The wide-character string has been completely converted, including the terminating null wide character (which has the side effect of bringing back *ps to the initial state). In this case, *src is set to NULL, and the number of bytes written to dest, excluding the terminating null byte (‘�’), is returned.

If dest is NULL, len is ignored, and the conversion proceeds as above, except that the converted bytes are not written out to memory, and that no destination length limit exists.

In both of the above cases, if ps is NULL, a static anonymous state known only to the wcsnrtombs() function is used instead.

The programmer must ensure that there is room for at least len bytes at dest.

RETURN VALUE

The wcsnrtombs() function returns the number of bytes that make up the converted part of multibyte sequence, not including the terminating null byte. If a wide character was encountered which could not be converted, (size_t) -1 is returned, and errno set to EILSEQ.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcsnrtombs()

Thread safety

MT-Unsafe race:wcsnrtombs/!ps

STANDARDS

POSIX.1-2008.

NOTES

The behavior of wcsnrtombs() depends on the LC_CTYPE category of the current locale.

Passing NULL as ps is not multithread safe.

SEE ALSO

iconv(3), mbsinit(3), wcsrtombs(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2359 - Linux cli command y1

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command y1 and provides detailed information about the command y1, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the y1.

NAME 🖥️ y1 🖥️

Bessel functions of the second kind

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double y0(double x);
double y1(double x);
double yn(int n, double x);
float y0f(float x);
float y1f(float x);
float ynf(int n, float x);
long double y0l(long double x);
long double y1l(long double x);
long double ynl(int n, long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

y0(), y1(), yn():

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

y0f(), y0l(), y1f(), y1l(), ynf(), ynl():

    _XOPEN_SOURCE >= 600
        || (_ISOC99_SOURCE && _XOPEN_SOURCE)
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The y0() and y1() functions return Bessel functions of x of the second kind of orders 0 and 1, respectively. The yn() function returns the Bessel function of x of the second kind of order n.

The value of x must be positive.

The y0f(), y1f(), and ynf() functions are versions that take and return float values. The y0l(), y1l(), and ynl() functions are versions that take and return long double values.

RETURN VALUE

On success, these functions return the appropriate Bessel value of the second kind for x.

If x is a NaN, a NaN is returned.

If x is negative, a domain error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively. (POSIX.1-2001 also allows a NaN return for this case.)

If x is 0.0, a pole error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.

If the result underflows, a range error occurs, and the functions return 0.0

If the result overflows, a range error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively. (POSIX.1-2001 also allows a 0.0 return for this case.)

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is negative
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

Pole error: x is 0.0
errno is set to ERANGE and an FE_DIVBYZERO exception is raised (but see BUGS).

Range error: result underflow
errno is set to ERANGE. No FE_UNDERFLOW exception is returned by fetestexcept(3) for this case.

Range error: result overflow
errno is set to ERANGE (but see BUGS). An overflow floating-point exception (FE_OVERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

y0(), y0f(), y0l()

Thread safetyMT-Safe

y1(), y1f(), y1l()

Thread safetyMT-Safe

yn(), ynf(), ynl()

Thread safetyMT-Safe

STANDARDS

y0()
y1()
yn()
POSIX.1-2008.

Others:
BSD.

HISTORY

y0()
y1()
yn()
SVr4, 4.3BSD, POSIX.1-2001.

Others:
BSD.

BUGS

Before glibc 2.19, these functions misdiagnosed pole errors: errno was set to EDOM, instead of ERANGE and no FE_DIVBYZERO exception was raised.

Before glibc 2.17, did not set errno for “range error: result underflow”.

In glibc 2.3.2 and earlier, these functions do not raise an invalid floating-point exception (FE_INVALID) when a domain error occurs.

SEE ALSO

j0(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2360 - Linux cli command Regexp_Assemblepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Assemblepm and provides detailed information about the command Regexp_Assemblepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Assemblepm.

NAME 🖥️ Regexp_Assemblepm 🖥️

Assemble multiple Regular Expressions into a single RE

SYNOPSIS

use Regexp::Assemble; my $ra = Regexp::Assemble->new; $ra->add( ab+c ); $ra->add( ab+- ); $ra->add( a\w\d+ ); $ra->add( a\d+ ); print $ra->re; # prints a(?:\w?\d+|b+[-c])

DESCRIPTION

Regexp::Assemble takes an arbitrary number of regular expressions and assembles them into a single regular expression (or RE) that matches all that the individual REs match.

As a result, instead of having a large list of expressions to loop over, a target string only needs to be tested against one expression. This is interesting when you have several thousand patterns to deal with. Serious effort is made to produce the smallest pattern possible.

It is also possible to track the original patterns, so that you can determine which, among the source patterns that form the assembled pattern, was the one that caused the match to occur.

You should realise that large numbers of alternations are processed in perl’s regular expression engine in O(n) time, not O(1). If you are still having performance problems, you should look at using a trie. Note that Perl’s own regular expression engine will implement trie optimisations in perl 5.10 (they are already available in perl 5.9.3 if you want to try them out). Regexp::Assemble will do the right thing when it knows it’s running on a trie’d perl. (At least in some version after this one).

Some more examples of usage appear in the accompanying README. If that file is not easy to access locally, you can find it on a web repository such as <http://search.cpan.org/dist/Regexp-Assemble/README> or <http://cpan.uwinnipeg.ca/htdocs/Regexp-Assemble/README.html>.

See also LIMITATIONS.

Methods

add(LIST)

Takes a string, breaks it apart into a set of tokens (respecting meta characters) and inserts the resulting list into the R::A object. It uses a naive regular expression to lex the string that may be fooled complex expressions (specifically, it will fail to lex nested parenthetical expressions such as ab(cd(ef)?gh)ij correctly). If this is the case, the end of the string will not be tokenised correctly and returned as one long string.

On the one hand, this may indicate that the patterns you are trying to feed the R::A object are too complex. Simpler patterns might allow the algorithm to work more effectively and perform more reductions in the resulting pattern.

On the other hand, you can supply your own pattern to perform the lexing if you need. The test suite contains an example of a lexer pattern that will match one level of nested parentheses.

Note that there is an internal optimisation that will bypass a much of the lexing process. If a string contains no \ (backslash), [ (open square bracket), ( (open paren), ? (question mark), + (plus), * (star) or { (open curly), a character split will be performed directly.

A list of strings may be supplied, thus you can pass it a file handle of a file opened for reading:

$re->add( \d+-\d+-\d+-\d+\example\com ); $re->add( <IN> );

If the file is very large, it may be more efficient to use a while loop, to read the file line-by-line:

$re->add($_) while <IN>;

The add method will chomp the lines automatically. If you do not want this to occur (you want to keep the record separator), then disable chomping.

$re->chomp(0); $re->add($_) while <IN>;

This method is chainable.

add_file(FILENAME […])

Takes a list of file names. Each file is opened and read line by line. Each line is added to the assembly.

$r->add_file( file.1, file.2 );

If a file cannot be opened, the method will croak. If you cannot afford to let this happen then you should wrap the call in a eval block.

Chomping happens automatically unless you the chomp(0) method to disable it. By default, input lines are read according to the value of the input_record_separator attribute (if defined), and will otherwise fall back to the current setting of the system $/ variable. The record separator may also be specified on each call to add_file. Internally, the routine localises the value of $/ to whatever is required, for the duration of the call.

An alternate calling mechanism using a hash reference is available. The recognised keys are:

file
Reference to a list of file names, or the name of a single file. $r->add_file({file => [file.1, file.2, file.3]}); $r->add_file({file => file.n});

input_record_separator
If present, indicates what constitutes a line $r->add_file({file => data.txt, input_record_separator => : });

rs
An alias for input_record_separator (mnemonic: same as the English variable names).

$r->add_file( { file => [ pattern.txt, more.txt ], input_record_separator => " “, });

clone()

Clones the contents of a Regexp::Assemble object and creates a new object (in other words it performs a deep copy).

If the Storable module is installed, its dclone method will be used, otherwise the cloning will be performed using a pure perl approach.

You can use this method to take a snapshot of the patterns that have been added so far to an object, and generate an assembly from the clone. Additional patterns may to be added to the original object afterwards.

my $re = $main->clone->re(); $main->add( another-pattern-\d+ );

insert(LIST)

Takes a list of tokens representing a regular expression and stores them in the object. Note: you should not pass it a bare regular expression, such as ab+c?d*e. You must pass it as a list of tokens, e.g. (a, b+, c?, d*, e).

This method is chainable, e.g.:

my $ra = Regexp::Assemble->new ->insert( qw[ a b+ c? d* e ] ) ->insert( qw[ a c+ d+ e* f ] );

Lexing complex patterns with metacharacters and so on can consume a significant proportion of the overall time to build an assembly. If you have the information available in a tokenised form, calling insert directly can be a big win.

lexstr

Use the lexstr method if you are curious to see how a pattern gets tokenised. It takes a scalar on input, representing a pattern, and returns a reference to an array, containing the tokenised pattern. You can recover the original pattern by performing a join:

my @token = $re->lexstr($pattern); my $new_pattern = join( , @token );

If the original pattern contains unnecessary backslashes, or K escapes, or quotemeta escapes (\Q) the resulting pattern may not be identical.

Call lexstr does not add the pattern to the object, it is merely for exploratory purposes. It will, however, update various statistical counters.

pre_filter(CODE)

Allows you to install a callback to check that the pattern being loaded contains valid input. It receives the pattern as a whole to be added, before it been tokenised by the lexer. It may to return 0 or undef to indicate that the pattern should not be added, any true value indicates that the contents are fine.

A filter to strip out trailing comments (marked by #):

$re->pre_filter( sub { $_[0] =~ s/\s*#.*$//; 1 } );

A filter to ignore blank lines:

$re->pre_filter( sub { length(shift) } );

If you want to remove the filter, pass undef as a parameter.

$ra->pre_filter(undef);

This method is chainable.

filter(CODE)

Allows you to install a callback to check that the pattern being loaded contains valid input. It receives a list on input, after it has been tokenised by the lexer. It may to return 0 or undef to indicate that the pattern should not be added, any true value indicates that the contents are fine.

If you know that all patterns you expect to assemble contain a restricted set of of tokens (e.g. no spaces), you could do the following:

$ra->filter(sub { not grep { / / } @_ });

or

sub only_spaces_and_digits { not grep { ![\d ] } @_ } $ra->filter( \only_spaces_and_digits );

These two examples will silently ignore faulty patterns, If you want the user to be made aware of the problem you should raise an error (via warn or die), log an error message, whatever is best. If you want to remove a filter, pass undef as a parameter.

$ra->filter(undef);

This method is chainable.

as_string

Assemble the expression and return it as a string. You may want to do this if you are writing the pattern to a file. The following arguments can be passed to control the aspect of the resulting pattern:

indent, the number of spaces used to indent nested grouping of a pattern. Use this to produce a pretty-printed pattern (for some definition of pretty). The resulting output is rather verbose. The reason is to ensure that the metacharacters (?: and ) always occur on otherwise empty lines. This allows you grep the result for an even more synthetic view of the pattern:

egrep -v ^ *[()] <regexp.file>

The result of the above is quite readable. Remember to backslash the spaces appearing in your own patterns if you wish to use an indented pattern in an m/.../x construct. Indenting is ignored if tracking is enabled.

The indent argument takes precedence over the indent method/attribute of the object.

Calling this method will drain the internal data structure. Large numbers of patterns can eat a significant amount of memory, and this lets perl recover the memory used for other purposes.

If you want to reduce the pattern and continue to add new patterns, clone the object and reduce the clone, leaving the original object intact.

re

Assembles the pattern and return it as a compiled RE, using the qr// operator.

As with as_string, calling this method will reset the internal data structures to free the memory used in assembling the RE.

The indent attribute, documented in the as_string method, can be used here (it will be ignored if tracking is enabled).

With method chaining, it is possible to produce a RE without having a temporary Regexp::Assemble object lying around, e.g.:

my $re = Regexp::Assemble->new ->add( q[ab+cd+e] ) ->add( q[ac\d+e] ) ->add( q[c\d+e] ) ->re;

The $re variable now contains a Regexp object that can be used directly:

while( <> ) { /$re/ and print “Something in [$_] matched “; )

The re method is called when the object is used in string context (hence, within an m// operator), so by and large you do not even need to save the RE in a separate variable. The following will work as expected:

my $re = Regexp::Assemble->new->add( qw[ fee fie foe fum ] ); while( <IN> ) { if( /($re)/ ) { print “Here be giants: $1 “; } }

This approach does not work with tracked patterns. The match and matched methods must be used instead, see below.

match(SCALAR)

The following information applies to Perl 5.8 and below. See the section that follows for information on Perl 5.10.

If pattern tracking is in use, you must use re eval in order to make things work correctly. At a minimum, this will make your code look like this:

my $did_match = do { use re eval; $target =~ /$ra/ } if( $did_match ) { print “matched “, $ra->matched, " “; }

(The main reason is that the $^R variable is currently broken and an ugly workaround that runs some Perl code during the match is required, in order to simulate what $^R should be doing. See Perl bug #32840 for more information if you are curious. The README also contains more information). This bug has been fixed in 5.10.

The important thing to note is that with use re eval, THERE ARE SECURITY IMPLICATIONS WHICH YOU IGNORE AT YOUR PERIL. The problem is this: if you do not have strict control over the patterns being fed to Regexp::Assemble when tracking is enabled, and someone slips you a pattern such as /^(?{system rm -rf /})/ and you attempt to match a string against the resulting pattern, you will know Fear and Loathing.

What is more, the $^R workaround means that that tracking does not work if you perform a bare /$re/ pattern match as shown above. You have to instead call the match method, in order to supply the necessary context to take care of the tracking housekeeping details.

if( defined( my $match = $ra->match($_)) ) { print " $_ matched by $match “; }

In the case of a successful match, the original matched pattern is returned directly. The matched pattern will also be available through the matched method.

(Except that the above is not true for 5.6.0: the match method returns true or undef, and the matched method always returns undef).

If you are capturing parts of the pattern e.g. foo(bar)rat you will want to get at the captures. See the mbegin, mend, mvar and capture methods. If you are not using captures then you may safely ignore this section.

In 5.10, since the bug concerning $^R has been resolved, there is no need to use re eval and the assembled pattern does not require any Perl code to be executed during the match.

new()

Creates a new Regexp::Assemble object. The following optional key/value parameters may be employed. All keys have a corresponding method that can be used to change the behaviour later on. As a general rule, especially if you’re just starting out, you don’t have to bother with any of these.

anchor_*, a family of optional attributes that allow anchors (^, , \Z…) to be added to the resulting pattern.

flags, sets the imsx flags to add to the assembled regular expression. Warning: no error checking is done, you should ensure that the flags you pass are understood by the version of Perl you are using. modifiers exists as an alias, for users familiar with Regexp::List.

chomp, controls whether the pattern should be chomped before being lexed. Handy if you are reading patterns from a file. By default, chomping is performed (this behaviour changed as of version 0.24, prior versions did not chomp automatically). See also the file attribute and the add_file method.

file, slurp the contents of the specified file and add them to the assembly. Multiple files may be processed by using a list.

my $r = Regexp::Assemble->new(file => re.list); my $r = Regexp::Assemble->new(file => [re.1, re.2]);

If you really don’t want chomping to occur, you will have to set the chomp attribute to 0 (zero). You may also want to look at the input_record_separator attribute, as well.

input_record_separator, controls what constitutes a record separator when using the file attribute or the add_file method. May be abbreviated to rs. See the $/ variable in perlvar.

lookahead, controls whether the pattern should contain zero-width lookahead assertions (For instance: (?=[abc])(?:bob|alice|charles). This is not activated by default, because in many circumstances the cost of processing the assertion itself outweighs the benefit of its faculty for short-circuiting a match that will fail. This is sensitive to the probability of a match succeeding, so if you’re worried about performance you’ll have to benchmark a sample population of targets to see which way the benefits lie.

track, controls whether you want know which of the initial patterns was the one that matched. See the matched method for more details. Note for version 5.8 of Perl and below, in this mode of operation YOU SHOULD BE AWARE OF THE SECURITY IMPLICATIONS that this entails. Perl 5.10 does not suffer from any such restriction.

indent, the number of spaces used to indent nested grouping of a pattern. Use this to produce a pretty-printed pattern. See the as_string method for a more detailed explanation.

pre_filter, allows you to add a callback to enable sanity checks on the pattern being loaded. This callback is triggered before the pattern is split apart by the lexer. In other words, it operates on the entire pattern. If you are loading patterns from a file, this would be an appropriate place to remove comments.

filter, allows you to add a callback to enable sanity checks on the pattern being loaded. This callback is triggered after the pattern has been split apart by the lexer.

unroll_plus, controls whether to unroll, for example, x+ into x, x*, which may allow additional reductions in the resulting assembled pattern.

reduce, controls whether tail reduction occurs or not. If set, patterns like a(?:bc+d|ec+d) will be reduced to a[be]c+d. That is, the end of the pattern in each part of the b… and d… alternations is identical, and hence is hoisted out of the alternation and placed after it. On by default. Turn it off if you’re really pressed for short assembly times.

lex, specifies the pattern used to lex the input lines into tokens. You could replace the default pattern by a more sophisticated version that matches arbitrarily nested parentheses, for example.

debug, controls whether copious amounts of output is produced during the loading stage or the reducing stage of assembly.

my $ra = Regexp::Assemble->new; my $rb = Regexp::Assemble->new( chomp => 1, debug => 3 );

mutable, controls whether new patterns can be added to the object after the assembled pattern is generated. DEPRECATED.

This method/attribute will be removed in a future release. It doesn’t really serve any purpose, and may be more effectively replaced by cloning an existing Regexp::Assemble object and spinning out a pattern from that instead.

source()

When using tracked mode, after a successful match is made, returns the original source pattern that caused the match. In Perl 5.10, the $^R variable can be used to as an index to fetch the correct pattern from the object.

If no successful match has been performed, or the object is not in tracked mode, this method returns undef.

my $r = Regexp::Assemble->new->track(1)->add(qw(foo? bar{2} [Rr]at)); for my $w (qw(this food is rather barren)) { if ($w =~ /$r/) { print “$w matched by “, $r->source($^R), $/; } else { print “$w no match “; } }

mbegin()

This method returns a copy of @- at the moment of the last match. You should ordinarily not need to bother with this, mvar should be able to supply all your needs.

mend()

This method returns a copy of @+ at the moment of the last match.

mvar(NUMBER)

The mvar method returns the captures of the last match. mvar(1) corresponds to $1, mvar(2) to $2, and so on. mvar(0) happens to return the target string matched, as a byproduct of walking down the @- and @+ arrays after the match.

If called without a parameter, mvar will return a reference to an array containing all captures.

capture

The capture method returns the the captures of the last match as an array. Unlink mvar, this method does not include the matched string. It is equivalent to getting an array back that contains $1, $2, $3, ....

If no captures were found in the match, an empty array is returned, rather than undef. You are therefore guaranteed to be able to use for my $c ($re->capture) { ... without have to check whether anything was captured.

matched()

If pattern tracking has been set, via the track attribute, or through the track method, this method will return the original pattern of the last successful match. Returns undef match has yet been performed, or tracking has not been enabled.

See below in the NOTES section for additional subtleties of which you should be aware of when tracking patterns.

Note that this method is not available in 5.6.0, due to limitations in the implementation of (?{...}) at the time.

Statistics/Reporting routines

stats_add

Returns the number of patterns added to the assembly (whether by add or insert). Duplicate patterns are not included in this total.

stats_dup

Returns the number of duplicate patterns added to the assembly. If non-zero, this may be a sign that something is wrong with your data (or at the least, some needless redundancy). This may occur when you have two patterns (for instance, a\-b and a-b) which map to the same result.

stats_raw()

Returns the raw number of bytes in the patterns added to the assembly. This includes both original and duplicate patterns. For instance, adding the two patterns ab and ab will count as 4 bytes.

stats_cooked()

Return the true number of bytes added to the assembly. This will not include duplicate patterns. Furthermore, it may differ from the raw bytes due to quotemeta treatment. For instance, abc\,def will count as 7 (not 8) bytes, because \, will be stored as ,. Also, \Qa.b is 7 bytes long, however, after the quotemeta directives are processed, a\.b will be stored, for a total of 4 bytes.

stats_length()

Returns the length of the resulting assembled expression. Until as_string or re have been called, the length will be 0 (since the assembly will have not yet been performed). The length includes only the pattern, not the additional ((?-xism...) fluff added by the compilation.

dup_warn(NUMBER|CODEREF)

Turns warnings about duplicate patterns on or off. By default, no warnings are emitted. If the method is called with no parameters, or a true parameter, the object will carp about patterns it has already seen. To turn off the warnings, use 0 as a parameter.

$r->dup_warn();

The method may also be passed a code block. In this case the code will be executed and it will receive a reference to the object in question, and the lexed pattern.

$r->dup_warn( sub { my $self = shift; print $self->stats_add, " patterns added at line $. “, join( , @_ ), " added previously “; } )

Anchor routines

Suppose you wish to assemble a series of patterns that all begin with ^ and end with $ (anchor pattern to the beginning and end of line). Rather than add the anchors to each and every pattern (and possibly forget to do so when a new entry is added), you may specify the anchors in the object, and they will appear in the resulting pattern, and you no longer need to (or should) put them in your source patterns. For example, the two following snippets will produce identical patterns:

$r->add(qw(^this ^that ^them))->as_string; $r->add(qw(this that them))->anchor_line_begin->as_string; # both techniques will produce ^th(?:at|em|is)

All anchors are possible word () boundaries, line boundaries (^ and $) and string boundaries (\A and \Z (or \z if you absolutely need it)).

The shortcut anchor_mumble implies both anchor_mumble_begin anchor_mumble_end is also available. If different anchors are specified the most specific anchor wins. For instance, if both anchor_word_begin and anchor_line_begin are specified, anchor_word_begin takes precedence.

All the anchor methods are chainable.

anchor_word_begin

The resulting pattern will be prefixed with a  word boundary assertion when the value is true. Set to 0 to disable.

$r->add(pre)->anchor_word_begin->as_string; # produces pre

anchor_word_end

The resulting pattern will be suffixed with a  word boundary assertion when the value is true. Set to 0 to disable.

$r->add(qw(ing tion)) ->anchor_word_end ->as_string; # produces (?:tion|ing)

anchor_word

The resulting pattern will be have  word boundary assertions at the beginning and end of the pattern when the value is true. Set to 0 to disable.

$r->add(qw(cat carrot) ->anchor_word(1) ->as_string; # produces ca(?:rro)t

anchor_line_begin

The resulting pattern will be prefixed with a ^ line boundary assertion when the value is true. Set to 0 to disable.

$r->anchor_line_begin; # or $r->anchor_line_begin(1);

anchor_line_end

The resulting pattern will be suffixed with a $ line boundary assertion when the value is true. Set to 0 to disable.

# turn it off $r->anchor_line_end(0);

anchor_line

The resulting pattern will be have the ^ and $ line boundary assertions at the beginning and end of the pattern, respectively, when the value is true. Set to 0 to disable.

$r->add(qw(cat carrot) ->anchor_line ->as_string; # produces ^ca(?:rro)t$

anchor_string_begin

The resulting pattern will be prefixed with a \A string boundary assertion when the value is true. Set to 0 to disable.

$r->anchor_string_begin(1);

anchor_string_end

The resulting pattern will be suffixed with a \Z string boundary assertion when the value is true. Set to 0 to disable.

# disable the string boundary end anchor $r->anchor_string_end(0);

anchor_string_end_absolute

The resulting pattern will be suffixed with a \z string boundary assertion when the value is true. Set to 0 to disable.

# disable the string boundary absolute end anchor $r->anchor_string_end_absolute(0);

If you don’t understand the difference between \Z and \z, the former will probably do what you want.

anchor_string

The resulting pattern will be have the \A and \Z string boundary assertions at the beginning and end of the pattern, respectively, when the value is true. Set to 0 to disable.

$r->add(qw(cat carrot) ->anchor_string ->as_string; # produces \Aca(?:rro)t\Z

anchor_string_absolute

The resulting pattern will be have the \A and \z string boundary assertions at the beginning and end of the pattern, respectively, when the value is true. Set to 0 to disable.

$r->add(qw(cat carrot) ->anchor_string_absolute ->as_string; # produces \Aca(?:rro)t\z

debug(NUMBER)

Turns debugging on or off. Statements are printed to the currently selected file handle (STDOUT by default). If you are already using this handle, you will have to arrange to select an output handle to a file of your own choosing, before call the add, as_string or re) functions, otherwise it will scribble all over your carefully formatted output.

  • Off. Turns off all debugging output.

  • 1 Add. Trace the addition of patterns.

  • 2 Reduce. Trace the process of reduction and assembly.

  • 4 Lex. Trace the lexing of the input patterns into its constituent tokens.

  • 8 Time. Print to STDOUT the time taken to load all the patterns. This is nothing more than the difference between the time the object was instantiated and the time reduction was initiated. # load=<num> Any lengthy computation performed in the client code will be reflected in this value. Another line will be printed after reduction is complete. # reduce=<num> The above output lines will be changed to load-epoch and reduce-epoch if the internal state of the object is corrupted and the initial timestamp is lost. The code attempts to load Time::HiRes in order to report fractional seconds. If this is not successful, the elapsed time is displayed in whole seconds.

Values can be added (or or’ed together) to trace everything

$r->debug(7)->add( \d+abc );

Calling debug with no arguments turns debugging off.

dump()

Produces a synthetic view of the internal data structure. How to interpret the results is left as an exercise to the reader.

print $r->dump;

chomp(0|1)

Turns chomping on or off.

IMPORTANT: As of version 0.24, chomping is now on by default as it makes add_file Just Work. The only time you may run into trouble is with add("\$/"). So don’t do that, or else explicitly turn off chomping.

To avoid incorporating (spurious) record separators (such as on Unix) when reading from a file, add() chomps its input. If you don’t want this to happen, call chomp with a false value.

$re->chomp(0); # really want the record separators $re->add(<DATA>);

fold_meta_pairs(NUMBER)

Determines whether \s, \S and \w, \W and \d, \D are folded into a . (dot). Folding happens by default (for reasons of backwards compatibility, even though it is wrong when the /s expression modifier is active).

Call this method with a false value to prevent this behaviour (which is only a problem when dealing with if the /s expression modifier is also set).

$re->add( \w, \W ); my $clone = $re->clone; $clone->fold_meta_pairs(0); print $clone->as_string; # prints . print $re->as_string; # print [\W\w]

indent(NUMBER)

Sets the level of indent for pretty-printing nested groups within a pattern. See the as_string method for more details. When called without a parameter, no indenting is performed.

$re->indent( 4 ); print $re->as_string;

lookahead(0|1)

Turns on zero-width lookahead assertions. This is usually beneficial when you expect that the pattern will usually fail. If you expect that the pattern will usually match you will probably be worse off.

flags(STRING)

Sets the flags that govern how the pattern behaves (for versions of Perl up to 5.9 or so, these are imsx). By default no flags are enabled.

modifiers(STRING)

An alias of the flags method, for users familiar with Regexp::List.

track(0|1)

Turns tracking on or off. When this attribute is enabled, additional housekeeping information is inserted into the assembled expression using ({...} embedded code constructs. This provides the necessary information to determine which, of the original patterns added, was the one that caused the match.

$re->track( 1 ); if( $target =~ /$re/ ) { print “$target matched by “, $re->matched, " “; }

Note that when this functionality is enabled, no reduction is performed and no character classes are generated. In other words, brag|tag is not reduced down to (?:br|t)ag and dig|dim is not reduced to di[gm].

unroll_plus(0|1)

Turns the unrolling of plus metacharacters on or off. When a pattern is broken up, a+ becomes a, a* (and b+? becomes b, b*?. This may allow the freed a to assemble with other patterns. Not enabled by default.

lex(SCALAR)

Change the pattern used to break a string apart into tokens. You can examine the eg/naive script as a starting point.

reduce(0|1)

Turns pattern reduction on or off. A reduced pattern may be considerably shorter than an unreduced pattern. Consider /sl(?:ip|op|ap)/ versus /sl[aio]p/. An unreduced pattern will be very similar to those produced by Regexp::Optimizer. Reduction is on by default. Turning it off speeds assembly (but assembly is pretty fast Ω- it’s the breaking up of the initial patterns in the lexing stage that can consume a non-negligible amount of time).

mutable(0|1)

This method has been marked as DEPRECATED. It will be removed in a future release. See the clone method for a technique to replace its functionality.

reset()

Empties out the patterns that have been added or insert-ed into the object. Does not modify the state of controller attributes such as debug, lex, reduce and the like.

Default_Lexer

Warning: the Default_Lexer function is a class method, not an object method. It is a fatal error to call it as an object method.

The Default_Lexer method lets you replace the default pattern used for all subsequently created Regexp::Assemble objects. It will not have any effect on existing objects. (It is also possible to override the lexer pattern used on a per-object basis).

The parameter should be an ordinary scalar, not a compiled pattern. If the pattern fails to match all parts of the string, the missing parts will be returned as single chunks. Therefore the following pattern is legal (albeit rather cork-brained):

Regexp::Assemble::Default_Lexer( \d );

The above pattern will split up input strings digit by digit, and all non-digit characters as single chunks.

DIAGNOSTICS

“Cannot pass a C<refname> to Default_Lexer”

You tried to replace the default lexer pattern with an object instead of a scalar. Solution: You probably tried to call $obj->Default_Lexer. Call the qualified class method instead Regexp::Assemble::Default_Lexer.

“filter method not passed a coderef” “pre_filter method not passed a coderef”

A reference to a subroutine (anonymous or otherwise) was expected. Solution: read the documentation for the filter method.

“duplicate pattern added: /…/”

The dup_warn attribute is active, and a duplicate pattern was added (well duh!). Solution: clean your data.

“cannot open [file] for input: [reason]”

The add_file method was unable to open the specified file for whatever reason. Solution: make sure the file exists and the script has the required privileges to read it.

NOTES

This module has been tested successfully with a range of versions of perl, from 5.005_03 to 5.9.3. Use of 5.6.0 is not recommended.

The expressions produced by this module can be used with the PCRE library.

Remember to double up your backslashes if the patterns are hard-coded as constants in your program. That is, you should literally add(a\d+b) rather than add(a\d+b). It usually will work either way, but it’s good practice to do so.

Where possible, supply the simplest tokens possible. Don’t add X(?-\d+){2})Y when X-\d+-\d+Y will do. The reason is that if you also add X\d+Z the resulting assembly changes dramatically: X(?:(?:-\d+){2}Y|-\d+Z) versus X-\d+(?:-\d+Y|Z). Since R::A doesn’t perform enough analysis, it won’t unroll the {2} quantifier, and will fail to notice the divergence after the first -d\d+.

Furthermore, when the string ‘X-123000P’ is matched against the first assembly, the regexp engine will have to backtrack over each alternation (the one that ends in Y and the one that ends in Z) before determining that there is no match. No such backtracking occurs in the second pattern: as soon as the engine encounters the ‘P’ in the target string, neither of the alternations at that point (-\d+Y or Z) could succeed and so the match fails.

Regexp::Assemble does, however, know how to build character classes. Given a-b, axb and a\db, it will assemble these into a[-\dx]b. When - (dash) appears as a candidate for a character class it will be the first character in the class. When ^ (circumflex) appears as a candidate for a character class it will be the last character in the class.

It also knows about meta-characters than can absorb regular characters. For instance, given X\d and X5, it knows that 5 can be represented by \d and so the assembly is just X\d. The absorbent meta-characters it deals with are ., \d, \s and \W and their complements. It will replace \d/\D, \s/\S and \w/\W by . (dot), and it will drop \d if \w is also present (as will \D in the presence of \W).

Regexp::Assemble deals correctly with quotemeta’s propensity to backslash many characters that have no need to be. Backslashes on non-metacharacters will be removed. Similarly, in character classes, a number of characters lose their magic and so no longer need to be backslashed within a character class. Two common examples are . (dot) and $. Such characters will lose their backslash.

At the same time, it will also process \Q... sequences. When such a sequence is encountered, the inner section is extracted and quotemeta is applied to the section. The resulting quoted text is then used in place of the original unquoted text, and the \Q and  metacharacters are thrown away. Similar processing occurs with the \U... and \L... sequences. This may have surprising effects when using a dispatch table. In this case, you will need to know exactly what the module makes of your input. Use the lexstr method to find out what’s going on:

$pattern = join( , @{$re->lexstr($pattern)} );

If all the digits 0..9 appear in a character class, Regexp::Assemble will replace them by \d. I’d do it for letters as well, but thinking about accented characters and other glyphs hurts my head.

In an alternation, the longest paths are chosen first (for example, horse|bird|dog). When two paths have the same length, the path with the most subpaths will appear first. This aims to put the busiest paths to the front of the alternation. For example, the list bad, bit, few, fig and fun will produce the pattern (?:f(?:ew|ig|un)|b(?:ad|it)). See eg/tld for a real-world example of how alternations are sorted. Once you have looked at that, everything should be crystal clear.

When tracking is in use, no reduction is performed. nor are character classes formed. The reason is that it is too difficult to determine the original pattern afterwards. Consider the two patterns pale and palm. These should be reduced to pal[em]. The final character matches one of two possibilities. To resolve whether it matched an e or m would require keeping track of the fact that the pattern finished up in a character class, which would the require a whole lot more work to figure out which character of the class matched. Without character classes it becomes much easier. Instead, pal(?:e|m) is produced, which lets us find out more simply where we ended up.

Similarly, dogfood and seafood should form (?:dog|sea)food. When the pattern is being assembled, the tracking decision needs to be made at the end of the grouping, but the tail of the pattern has not yet been visited. Deferring things to make this work correctly is a vast hassle. In this case, the pattern becomes merely (?:dogfood|seafood. Tracked patterns will therefore be bulkier than simple patterns.

There is an open bug on this issue:

<http://rt.perl.org/rt3/Ticket/Display.html?id=32840>

If this bug is ever resolved, tracking would become much easier to deal with (none of the match hassle would be required - you could just match like a regular RE and it would Just Work).

SEE ALSO

perlre
General information about Perl’s regular expressions.

re
Specific information about use re eval.

Regex::PreSuf
Regex::PreSuf takes a string and chops it itself into tokens of length 1. Since it can’t deal with tokens of more than one character, it can’t deal with meta-characters and thus no regular expressions. Which is the main reason why I wrote this module.

Regexp::Optimizer
Regexp::Optimizer produces regular expressions that are similar to those produced by R::A with reductions switched off. It’s biggest drawback is that it is exponentially slower than Regexp::Assemble on very large sets of patterns.

Regexp::Parser
Fine grained analysis of regular expressions.

Regexp::Trie
Funnily enough, this was my working name for Regexp::Assemble during its development. I changed the name because I thought it was too obscure. Anyway, Regexp::Trie does much the same as Regexp::Optimizer and Regexp::Assemble except that it runs much faster (according to the author). It does not recognise meta characters (that is, ‘a+b’ is interpreted as ‘a\b’).

Text::Trie
Text::Trie is well worth investigating. Tries can outperform very bushy (read: many alternations) patterns.

Tree::Trie
Tree::Trie is another module that builds tries. The algorithm that Regexp::Assemble uses appears to be quite similar to the algorithm described therein, except that R::A solves its end-marker problem without having to rewrite the leaves.

See Also

For alternatives to this module, consider one of:

o Data::Munge

o OnSearch::Regex

o Regex::PreSuf

LIMITATIONS

Some mildly complex cases are not handled well. See examples/failure.01.pl and <https://rt.cpan.org/Public/Bug/Display.html?id=104897>.

See also <https://rt.cpan.org/Public/Bug/Display.html?id=106480> for a discussion of some of the issues arising with the use of a huge number of alterations. Thanx to Slaven Rezic for the details of trie ‘v’ non-trie operations within Perl which influence regexp handling of alternations.

<Regexp::Assemble> does not attempt to find common substrings. For instance, it will not collapse /cabababc/ down to /c(?:ab){3}c/. If there’s a module out there that performs this sort of string analysis I’d like to know about it. But keep in mind that the algorithms that do this are very expensive: quadratic or worse.

Regexp::Assemble does not interpret meta-character modifiers. For instance, if the following two patterns are given: X\d and X\d+, it will not determine that \d can be matched by \d+. Instead, it will produce X(?:\d|\d+). Along a similar line of reasoning, it will not determine that Z and Z\d+ is equivalent to Z\d* (It will produce Z(?:\d+)? instead).

You cannot remove a pattern that has been added to an object. You’ll just have to start over again. Adding a pattern is difficult enough, I’d need a solid argument to convince me to add a remove method. If you need to do this you should read the documentation for the clone method.

Regexp::Assemble does not (yet)? employ the (?>...) construct.

The module does not produce POSIX-style regular expressions. This would be quite easy to add, if there was a demand for it.

BUGS

Patterns that generate look-ahead assertions sometimes produce incorrect patterns in certain obscure corner cases. If you suspect that this is occurring in your pattern, disable lookaheads.

Tracking doesn’t really work at all with 5.6.0. It works better in subsequent 5.6 releases. For maximum reliability, the use of a 5.8 release is strongly recommended. Tracking barely works with 5.005_04. Of note, using \d-style meta-characters invariably causes panics. Tracking really comes into its own in Perl 5.10.

If you feed Regexp::Assemble patterns with nested parentheses, there is a chance that the resulting pattern will be uncompilable due to mismatched parentheses (not enough closing parentheses). This is normal, so long as the default lexer pattern is used. If you want to find out which pattern among a list of 3000 patterns are to blame (speaking from experience here), the eg/debugging script offers a strategy for pinpointing the pattern at fault. While you may not be able to use the script directly, the general approach is easy to implement.

The algorithm used to assemble the regular expressions makes extensive use of mutually-recursive functions (that is, A calls B, B calls A, …) For deeply similar expressions, it may be possible to provoke Deep recursion warnings.

The module has been tested extensively, and has an extensive test suite (that achieves close to 100% statement coverage), but you never know… A bug may manifest itself in two ways: creating a pattern that cannot be compiled, such as a\(bc), or a pattern that compiles correctly but that either matches things it shouldn’t, or doesn’t match things it should. It is assumed that Such problems will occur when the reduction algorithm encounters some sort of edge case. A temporary work-around is to disable reductions:

my $pattern = $assembler->reduce(0)->re;

A discussion about implementation details and where bugs might lurk appears in the README file. If this file is not available locally, you should be able to find a copy on the Web at your nearest CPAN mirror.

Seriously, though, a number of people have been using this module to create expressions anywhere from 140Kb to 600Kb in size, and it seems to be working according to spec. Thus, I don’t think there are any serious bugs remaining.

If you are feeling brave, extensive debugging traces are available to figure out where assembly goes wrong.

Please report all bugs at <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Regexp-Assemble>

Make sure you include the output from the following two commands:

perl -MRegexp::Assemble -le print $Regexp::Assemble::VERSION perl -V

There is a mailing list for the discussion of Regexp::Assemble. Subscription details are available at <http://listes.mongueurs.net/mailman/listinfo/regexp-assemble>.

ACKNOWLEDGEMENTS

This module grew out of work I did building access maps for Postfix, a modern SMTP mail transfer agent. See <http://www.postfix.org/> for more information. I used Perl to build large regular expressions for blocking dynamic/residential IP addresses to cut down on spam and viruses. Once I had the code running for this, it was easy to start adding stuff to block really blatant spam subject lines, bogus HELO strings, spammer mailer-ids and more…

I presented the work at the French Perl Workshop in 2004, and the thing most people asked was whether the underlying mechanism for assembling the REs was available as a module. At that time it was nothing more that a twisty maze of scripts, all different. The interest shown indicated that a module was called for. I’d like to thank the people who showed interest. Hey, it’s going to make my messy scripts smaller, in any case.

Thomas Drugeon was a valuable sounding board for trying out early ideas. Jean Forget and Philippe Blayo looked over an early version. H.Merijn Brandt stopped over in Paris one evening, and discussed things over a few beers.

Nicholas Clark pointed out that while what this module does (?:c|sh)ould be done in perl’s core, as per the 2004 TODO, he encouraged me to continue with the development of this module. In any event, this module allows one to gauge the difficulty of undertaking the endeavour in C. I’d rather gouge my eyes out with a blunt pencil.

Paul Johnson settled the question as to whether this module should live in the Regex:: namespace, or Regexp:: namespace. If you’re not convinced, try running the following one-liner:

perl -le print ref qr//

Philippe Bruhat found a couple of corner cases where this module could produce incorrect results. Such feedback is invaluable, and only improves the module’s quality.

Machine-Readable Change Log

The file Changes was converted into Changelog.ini by Module::Metadata::Changes.

AUTHOR

David Landgren

Copyright (C) 2004-2011. All rights reserved.

http://www.landgren.net/perl/

If you use this module, I’d love to hear about what you’re using it for. If you want to be informed of updates, send me a note.

Ron Savage is co-maint of the module, starting with V 0.36.

Repository

<https://github.com/ronsavage/Regexp-Assemble.git>

TODO

1. Tree equivalencies. Currently, /contend/ /content/ /resend/ /resent/ produces (?:conten[dt]|resend[dt]) but it is possible to produce (?:cont|res)en[dt] if one can spot the common tail nodes (and walk back the equivalent paths). Or be by me my => /[bm][ey]/ in the simplest case.

To do this requires a certain amount of restructuring of the code. Currently, the algorithm uses a two-phase approach. In the first phase, the trie is traversed and reductions are performed. In the second phase, the reduced trie is traversed and the pattern is emitted.

What has to occur is that the reduction and emission have to occur together. As a node is completed, it is replaced by its string representation. This then allows child nodes to be compared for equality with a simple ’eq’. Since there is only a single traversal, the overall generation time might drop, even though the context baggage required to delve through the tree will be more expensive to carry along (a hash rather than a couple of scalars).

Actually, a simpler approach is to take on a secret sentinel atom at the end of every pattern, which gives the reduction algorithm sufficient traction to create a perfect trie.

I’m rewriting the reduction code using this technique.

2. Investigate how (?>foo) works. Can it be applied?

5. How can a tracked pattern be serialised? (Add freeze and thaw methods).

6. Store callbacks per tracked pattern.

12. utf-8… hmmmm…

14. Adding qr//’ed patterns. For example, consider $r->add ( qr/^abc/i ) ->add( qr/^abd/ ) ->add( qr/^ab e/x ); this should admit abc abC aBc aBC abd abe as matches

16. Allow a fast, unsafe tracking mode, that can be used if a(?bc)? can’t happen. (Possibly carp if it does appear during traversal)?

17. given a-\d+-\d+-\d+-\d+-b, produce a(?:-\d+){4}-b. Something along the lines of (.{4))(\1+) would let the regexp engine itself be brought to bear on the matter, which is a rather appealing idea. Consider

while(/(?!)(\S{2,}?)(\1+)/g) { … $1, $2 … } as a starting point.

19. The reduction code has become unbelievably baroque. Adding code to handle (sting,singing,sing) => s(?:(?:ing)?|t)ing was far too difficult. Adding more stuff just breaks existing behaviour. And fixing the ^abcd$ … bug broke stuff all over again. Now that the corner cases are more clearly identified, a full rewrite of the reduction code is needed. And would admit the possibility of implementing items 1 and 17.

20. Handle debug unrev with a separate bit

23. Japhy’s http://www.perlmonks.org/index.pl?node_id=90876 list2range regexp

24. Lookahead assertions contain serious bugs (as shown by assembling powersets. Need to save more context during reduction, which in turn will simplify the preparation of the lookahead classes. See also 19.

26. _lex() swamps the overall run-time. It stems from the decision to use a single regexp to pull apart any pattern. A suite of simpler regexp to pick of parens, char classes, quantifiers and bare tokens may be faster. (This has been implemented as _fastlex(), but it’s only marginally faster. Perhaps split-by- char and lex a la C?

27. We don’t, as yet, unroll_plus a paren e.g. (abc)+?

28. We don’t reroll unrolled a a* to a+ in indented or tracked output

29. Use (*MARK n) in blead for tracked patterns, and use (*FAIL) for the unmatchable pattern.

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2361 - Linux cli command Image_ExifTool_APEpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_APEpm and provides detailed information about the command Image_ExifTool_APEpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_APEpm.

NAME 🖥️ Image_ExifTool_APEpm 🖥️

Read Monkey’s Audio meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to extract meta information from Monkey’s Audio (APE) audio files.

BUGS

Currently doesn’t parse MAC header unless it is at the start of the file.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.monkeysaudio.com/>

<http://www.personal.uni-jena.de/~pfk/mpp/sv8/apetag.html>

SEE ALSO

“APE Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2362 - Linux cli command Image_ExifTool_GPSpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_GPSpm and provides detailed information about the command Image_ExifTool_GPSpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_GPSpm.

NAME 🖥️ Image_ExifTool_GPSpm 🖥️

EXIF GPS meta information tags

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret GPS (Global Positioning System) meta information in EXIF data.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

Image::Info

SEE ALSO

“GPS Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm), Image::Info (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2363 - Linux cli command ssignal

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ssignal and provides detailed information about the command ssignal, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ssignal.

NAME 🖥️ ssignal 🖥️

software signal facility

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
typedef void (*sighandler_t)(int);
[[deprecated]] int gsignal(int signum);
[[deprecated]] sighandler_t ssignal(int signum, sighandler_t action);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

gsignal(), ssignal():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _SVID_SOURCE

DESCRIPTION

Don’t use these functions under Linux. Due to a historical mistake, under Linux these functions are aliases for raise(3) and signal(2), respectively.

Elsewhere, on System V-like systems, these functions implement software signaling, entirely independent of the classical signal(2) and kill(2) functions. The function ssignal() defines the action to take when the software signal with number signum is raised using the function gsignal(), and returns the previous such action or SIG_DFL. The function gsignal() does the following: if no action (or the action SIG_DFL) was specified for signum, then it does nothing and returns 0. If the action SIG_IGN was specified for signum, then it does nothing and returns 1. Otherwise, it resets the action to SIG_DFL and calls the action function with argument signum, and returns the value returned by that function. The range of possible values signum varies (often 1–15 or 1–17).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

gsignal()

Thread safetyMT-Safe

ssignal()

Thread safetyMT-Safe sigintr

STANDARDS

None.

HISTORY

AIX, DG/UX, HP-UX, SCO, Solaris, Tru64. They are called obsolete under most of these systems, and are broken under glibc. Some systems also have gsignal_r() and ssignal_r().

SEE ALSO

kill(2), signal(2), raise(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2364 - Linux cli command XML_DOM_Nodepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_DOM_Nodepm and provides detailed information about the command XML_DOM_Nodepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_DOM_Nodepm.

NAME 🖥️ XML_DOM_Nodepm 🖥️

Super class of all nodes in XML::DOM

DESCRIPTION

XML::DOM::Node is the super class of all nodes in an XML::DOM document. This means that all nodes that subclass XML::DOM::Node also inherit all the methods that XML::DOM::Node implements.

GLOBAL VARIABLES

  1. The variable @XML::DOM::Node::NodeNames maps the node type constants to strings. It is used by XML::DOM::Node::getNodeTypeName.

METHODS

getNodeType
Return an integer indicating the node type. See XML::DOM constants.

getNodeName
Return a property or a hardcoded string, depending on the node type. Here are the corresponding functions or values: Attr getName AttDef getName AttlistDecl getName CDATASection “#cdata-section” Comment “#comment” Document “#document” DocumentType getNodeName DocumentFragment “#document-fragment” Element getTagName ElementDecl getName EntityReference getEntityName Entity getNotationName Notation getName ProcessingInstruction getTarget Text “#text” XMLDecl “#xml-declaration” Not In DOM Spec: AttDef, AttlistDecl, ElementDecl and XMLDecl were added for completeness.

getNodeValue and setNodeValue (value)
Returns a string or undef, depending on the node type. This method is provided for completeness. In other languages it saves the programmer an upcast. The value is either available thru some other method defined in the subclass, or else undef is returned. Here are the corresponding methods: Attr::getValue, Text::getData, CDATASection::getData, Comment::getData, ProcessingInstruction::getData.

getParentNode and setParentNode (parentNode)
The parent of this node. All nodes, except Document, DocumentFragment, and Attr may have a parent. However, if a node has just been created and not yet added to the tree, or if it has been removed from the tree, this is undef.

getChildNodes
A NodeList that contains all children of this node. If there are no children, this is a NodeList containing no nodes. The content of the returned NodeList is live in the sense that, for instance, changes to the children of the node object that it was created from are immediately reflected in the nodes returned by the NodeList accessors; it is not a static snapshot of the content of the node. This is true for every NodeList, including the ones returned by the getElementsByTagName method. NOTE: this implementation does not return a live NodeList for getElementsByTagName. See CAVEATS. When this method is called in a list context, it returns a regular perl list containing the child nodes. Note that this list is not live. E.g. @list = $node->getChildNodes; # returns a perl list $nodelist = $node->getChildNodes; # returns a NodeList (object reference) for my $kid ($node->getChildNodes) # iterate over the children of $node

getFirstChild
The first child of this node. If there is no such node, this returns undef.

getLastChild
The last child of this node. If there is no such node, this returns undef.

getPreviousSibling
The node immediately preceding this node. If there is no such node, this returns undef.

getNextSibling
The node immediately following this node. If there is no such node, this returns undef.

getAttributes
A NamedNodeMap containing the attributes (Attr nodes) of this node (if it is an Element) or undef otherwise. Note that adding/removing attributes from the returned object, also adds/removes attributes from the Element node that the NamedNodeMap came from.

getOwnerDocument
The Document object associated with this node. This is also the Document object used to create new nodes. When this node is a Document this is undef.

insertBefore (newChild, refChild)
Inserts the node newChild before the existing child node refChild. If refChild is undef, insert newChild at the end of the list of children. If newChild is a DocumentFragment object, all of its children are inserted, in the same order, before refChild. If the newChild is already in the tree, it is first removed. Return Value: The node being inserted. DOMExceptions:

  • HIERARCHY_REQUEST_ERR Raised if this node is of a type that does not allow children of the type of the newChild node, or if the node to insert is one of this node’s ancestors.

  • WRONG_DOCUMENT_ERR Raised if newChild was created from a different document than the one that created this node.

  • NO_MODIFICATION_ALLOWED_ERR Raised if this node is readonly.

  • NOT_FOUND_ERR Raised if refChild is not a child of this node.

replaceChild (newChild, oldChild)
Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node. If the newChild is already in the tree, it is first removed. Return Value: The node replaced. DOMExceptions:

  • HIERARCHY_REQUEST_ERR Raised if this node is of a type that does not allow children of the type of the newChild node, or it the node to put in is one of this node’s ancestors.

  • WRONG_DOCUMENT_ERR Raised if newChild was created from a different document than the one that created this node.

  • NO_MODIFICATION_ALLOWED_ERR Raised if this node is readonly.

  • NOT_FOUND_ERR Raised if oldChild is not a child of this node.

removeChild (oldChild)
Removes the child node indicated by oldChild from the list of children, and returns it. Return Value: The node removed. DOMExceptions:

  • NO_MODIFICATION_ALLOWED_ERR Raised if this node is readonly.

  • NOT_FOUND_ERR Raised if oldChild is not a child of this node.

appendChild (newChild)
Adds the node newChild to the end of the list of children of this node. If the newChild is already in the tree, it is first removed. If it is a DocumentFragment object, the entire contents of the document fragment are moved into the child list of this node Return Value: The node added. DOMExceptions:

  • HIERARCHY_REQUEST_ERR Raised if this node is of a type that does not allow children of the type of the newChild node, or if the node to append is one of this node’s ancestors.

  • WRONG_DOCUMENT_ERR Raised if newChild was created from a different document than the one that created this node.

  • NO_MODIFICATION_ALLOWED_ERR Raised if this node is readonly.

hasChildNodes
This is a convenience method to allow easy determination of whether a node has any children. Return Value: 1 if the node has any children, 0 otherwise.

cloneNode (deep)
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. The duplicate node has no parent (parentNode returns undef.). Cloning an Element copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but this method does not copy any text it contains unless it is a deep clone, since the text is contained in a child Text node. Cloning any other type of node simply returns a copy of this node. Parameters: deep If true, recursively clone the subtree under the specified node. If false, clone only the node itself (and its attributes, if it is an Element). Return Value: The duplicate node.

normalize
Puts all Text nodes in the full depth of the sub-tree underneath this Element into a normal form where only markup (e.g., tags, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are no adjacent Text nodes. This can be used to ensure that the DOM view of a document is the same as if it were saved and re-loaded, and is useful when operations (such as XPointer lookups) that depend on a particular document tree structure are to be used. Not In DOM Spec: In the DOM Spec this method is defined in the Element and Document class interfaces only, but it doesn’t hurt to have it here…

getElementsByTagName (name [, recurse])
Returns a NodeList of all descendant elements with a given tag name, in the order in which they would be encountered in a preorder traversal of the Element tree. Parameters: name The name of the tag to match on. The special value * matches all tags. recurse Whether it should return only direct child nodes (0) or any descendant that matches the tag name (1). This argument is optional and defaults to 1. It is not part of the DOM spec. Return Value: A list of matching Element nodes. NOTE: this implementation does not return a live NodeList for getElementsByTagName. See CAVEATS. When this method is called in a list context, it returns a regular perl list containing the result nodes. E.g. @list = $node->getElementsByTagName(“tag”); # returns a perl list $nodelist = $node->getElementsByTagName(“tag”); # returns a NodeList (object ref.) for my $elem ($node->getElementsByTagName(“tag”)) # iterate over the result nodes

Additional methods not in the DOM Spec

getNodeTypeName
Return the string describing the node type. E.g. returns ELEMENT_NODE if getNodeType returns ELEMENT_NODE. It uses @XML::DOM::Node::NodeNames.

toString
Returns the entire subtree as a string.

printToFile (filename)
Prints the entire subtree to the file with the specified filename. Croaks: if the file could not be opened for writing.

printToFileHandle (handle)
Prints the entire subtree to the file handle. E.g. to print to STDOUT: $node->printToFileHandle (\STDOUT);

print (obj)
Prints the entire subtree using the object’s print method. E.g to print to a FileHandle object: $f = new FileHandle (“file.out”, “w”); $node->print ($f);

getChildIndex (child)
Returns the index of the child node in the list returned by getChildNodes. Return Value: the index or -1 if the node is not found.

getChildAtIndex (index)
Returns the child node at the specified index or undef.

addText (text)
Appends the specified string to the last child if it is a Text node, or else appends a new Text node (with the specified text.) Return Value: the last child if it was a Text node or else the new Text node.

dispose
Removes all circular references in this node and its descendants so the objects can be claimed for garbage collection. The objects should not be used afterwards.

setOwnerDocument (doc)
Sets the ownerDocument property of this node and all its children (and attributes etc.) to the specified document. This allows the user to cut and paste document subtrees between different XML::DOM::Documents. The node should be removed from the original document first, before calling setOwnerDocument. This method does nothing when called on a Document node.

isAncestor (parent)
Returns 1 if parent is an ancestor of this node or if it is this node itself.

expandEntityRefs (str)
Expands all the entity references in the string and returns the result. The entity references can be character references (e.g. { or &#x1fc2), default entity references (", >, <, ' and &) or entity references defined in Entity objects as part of the DocumentType of the owning Document. Character references are expanded into UTF-8. Parameter entity references (e.g. %ent;) are not expanded.

to_sax ( %HANDLERS )
E.g. $node->to_sax (DocumentHandler => $my_handler, Handler => $handler2 ); %HANDLERS may contain the following handlers:

  • DocumentHandler

  • DTDHandler

  • EntityResolver

  • Handler Default handler when one of the above is not specified

Each XML::DOM::Node generates the appropriate SAX callbacks (for the appropriate SAX handler.) Different SAX handlers can be plugged in to accomplish different things, e.g. XML::Checker would check the node (currently only Document and Element nodes are supported), XML::Handler::BuildDOM would create a new DOM subtree (thereby, in essence, copying the Node) and in the near future, XML::Writer could print the node. All Perl SAX related work is still in flux, so this interface may change a little. See PerlSAX for the description of the SAX interface.

check ( [$checker] )
See descriptions for check() in XML::DOM::Document and XML::DOM::Element.

xql ( @XQL_OPTIONS )
To use the xql method, you must first use XML::XQL and XML::XQL::DOM. This method is basically a shortcut for: $query = new XML::XQL::Query ( @XQL_OPTIONS ); return $query->solve ($node); If the first parameter in @XQL_OPTIONS is the XQL expression, you can leave off the ‘Expr’ keyword, so: $node->xql (“doc//elem1[@attr]”, @other_options); is identical to: $node->xql (Expr => “doc//elem1[@attr]”, @other_options); See XML::XQL::Query for other available XQL_OPTIONS. See XML::XQL and XML::XQL::Tutorial for more info.

isHidden ()
Whether the node is hidden. See Hidden Nodes for details.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2365 - Linux cli command pututxline

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pututxline and provides detailed information about the command pututxline, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pututxline.

NAME 🖥️ pututxline 🖥️

access utmp file entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <utmp.h>
struct utmp *getutent(void);
struct utmp *getutid(const struct utmp *ut);
struct utmp *getutline(const struct utmp *ut);
struct utmp *pututline(const struct utmp *ut);
void setutent(void);
void endutent(void);
int utmpname(const char *file);

DESCRIPTION

New applications should use the POSIX.1-specified “utmpx” versions of these functions; see STANDARDS.

utmpname() sets the name of the utmp-format file for the other utmp functions to access. If utmpname() is not used to set the filename before the other functions are used, they assume _PATH_UTMP, as defined in <paths.h>.

setutent() rewinds the file pointer to the beginning of the utmp file. It is generally a good idea to call it before any of the other functions.

endutent() closes the utmp file. It should be called when the user code is done accessing the file with the other functions.

getutent() reads a line from the current file position in the utmp file. It returns a pointer to a structure containing the fields of the line. The definition of this structure is shown in utmp(5).

getutid() searches forward from the current file position in the utmp file based upon ut. If ut->ut_type is one of RUN_LVL, BOOT_TIME, NEW_TIME, or OLD_TIME, getutid() will find the first entry whose ut_type field matches ut->ut_type. If ut->ut_type is one of INIT_PROCESS, LOGIN_PROCESS, USER_PROCESS, or DEAD_PROCESS, getutid() will find the first entry whose ut_id field matches ut->ut_id.

getutline() searches forward from the current file position in the utmp file. It scans entries whose ut_type is USER_PROCESS or LOGIN_PROCESS and returns the first one whose ut_line field matches ut->ut_line.

pututline() writes the utmp structure ut into the utmp file. It uses getutid() to search for the proper place in the file to insert the new entry. If it cannot find an appropriate slot for ut, pututline() will append the new entry to the end of the file.

RETURN VALUE

getutent(), getutid(), and getutline() return a pointer to a struct utmp on success, and NULL on failure (which includes the “record not found” case). This struct utmp is allocated in static storage, and may be overwritten by subsequent calls.

On success pututline() returns ut; on failure, it returns NULL.

utmpname() returns 0 if the new name was successfully stored, or -1 on failure.

On failure, these functions errno set to indicate the error.

ERRORS

ENOMEM
Out of memory.

ESRCH
Record not found.

setutent(), pututline(), and the getut*() functions can also fail for the reasons described in open(2).

FILES

/var/run/utmp
database of currently logged-in users

/var/log/wtmp
database of past user logins

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getutent()

Thread safety

MT-Unsafe init race:utent race:utentbuf sig:ALRM timer

getutid(), getutline()

Thread safety

MT-Unsafe init race:utent sig:ALRM timer

pututline()

Thread safety

MT-Unsafe race:utent sig:ALRM timer

setutent(), endutent(), utmpname()

Thread safetyMT-Unsafe race:utent

In the above table, utent in race:utent signifies that if any of the functions setutent(), getutent(), getutid(), getutline(), pututline(), utmpname(), or endutent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

None.

HISTORY

XPG2, SVr4.

In XPG2 and SVID 2 the function pututline() is documented to return void, and that is what it does on many systems (AIX, HP-UX). HP-UX introduces a new function _pututline() with the prototype given above for pututline().

All these functions are obsolete now on non-Linux systems. POSIX.1-2001 and POSIX.1-2008, following SUSv1, does not have any of these functions, but instead uses

#include <utmpx.h> struct utmpx *getutxent(void); struct utmpx *getutxid(const struct utmpx *); struct utmpx *getutxline(const struct utmpx *); struct utmpx *pututxline(const struct utmpx *); void setutxent(void); void endutxent(void);

These functions are provided by glibc, and perform the same task as their equivalents without the “x”, but use struct utmpx, defined on Linux to be the same as struct utmp. For completeness, glibc also provides utmpxname(), although this function is not specified by POSIX.1.

On some other systems, the utmpx structure is a superset of the utmp structure, with additional fields, and larger versions of the existing fields, and parallel files are maintained, often /var/*/utmpx and /var/*/wtmpx.

Linux glibc on the other hand does not use a parallel utmpx file since its utmp structure is already large enough. The “x” functions listed above are just aliases for their counterparts without the “x” (e.g., getutxent() is an alias for getutent()).

NOTES

glibc notes

The above functions are not thread-safe. glibc adds reentrant versions

#include <utmp.h>
int getutent_r(struct utmp *ubuf, struct utmp **ubufp);
int getutid_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);
int getutline_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getutent_r(), getutid_r(), getutline_r():

    _GNU_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */    _SVID_SOURCE || _BSD_SOURCE

These functions are GNU extensions, analogs of the functions of the same name without the _r suffix. The ubuf argument gives these functions a place to store their result. On success, they return 0, and a pointer to the result is written in *ubufp. On error, these functions return -1. There are no utmpx equivalents of the above functions. (POSIX.1 does not specify such functions.)

EXAMPLES

The following example adds and removes a utmp record, assuming it is run from within a pseudo terminal. For usage in a real application, you should check the return values of getpwuid(3) and ttyname(3).

#include <pwd.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <utmp.h>
int
main(void)
{
    struct utmp entry;
    system("echo before adding entry:;who");
    entry.ut_type = USER_PROCESS;
    entry.ut_pid = getpid();
    strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen("/dev/"));
    /* only correct for ptys named /dev/tty[pqr][0-9a-z] */
    strcpy(entry.ut_id, ttyname(STDIN_FILENO) + strlen("/dev/tty"));
    entry.ut_time = time(NULL);
    strcpy(entry.ut_user, getpwuid(getuid())->pw_name);
    memset(entry.ut_host, 0, UT_HOSTSIZE);
    entry.ut_addr = 0;
    setutent();
    pututline(&entry);
    system("echo after adding entry:;who");
    entry.ut_type = DEAD_PROCESS;
    memset(entry.ut_line, 0, UT_LINESIZE);
    entry.ut_time = 0;
    memset(entry.ut_user, 0, UT_NAMESIZE);
    setutent();
    pututline(&entry);
    system("echo after removing entry:;who");
    endutent();
    exit(EXIT_SUCCESS);
}

SEE ALSO

getutmp(3), utmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2366 - Linux cli command Try_Tinypm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Try_Tinypm and provides detailed information about the command Try_Tinypm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Try_Tinypm.

NAME 🖥️ Try_Tinypm 🖥️

Minimal try/catch with proper preservation of $@

VERSION

version 0.32

SYNOPSIS

You can use Try::Tiny’s try and catch to expect and handle exceptional conditions, avoiding quirks in Perl and common mistakes:

# handle errors with a catch handler try { die “foo”; } catch { warn “caught error: $_”; # not $@ };

You can also use it like a standalone eval to catch and ignore any error conditions. Obviously, this is an extreme measure not to be undertaken lightly:

# just silence errors try { die “foo”; };

DESCRIPTION

This module provides bare bones try/catch/finally statements that are designed to minimize common mistakes with eval blocks, and NOTHING else.

This is unlike TryCatch which provides a nice syntax and avoids adding another call stack layer, and supports calling return from the try block to return from the parent subroutine. These extra features come at a cost of a few dependencies, namely Devel::Declare and Scope::Upper which are occasionally problematic, and the additional catch filtering uses Moose type constraints which may not be desirable either.

The main focus of this module is to provide simple and reliable error handling for those having a hard time installing TryCatch, but who still want to write correct eval blocks without 5 lines of boilerplate each time.

It’s designed to work as correctly as possible in light of the various pathological edge cases (see “BACKGROUND”) and to be compatible with any style of error values (simple strings, references, objects, overloaded objects, etc).

If the try block dies, it returns the value of the last statement executed in the catch block, if there is one. Otherwise, it returns undef in scalar context or the empty list in list context. The following examples all assign "bar" to $x:

my $x = try { die “foo” } catch { “bar” }; my $x = try { die “foo” } || “bar”; my $x = (try { die “foo” }) // “bar”; my $x = eval { die “foo” } || “bar”;

You can add finally blocks, yielding the following:

my $x; try { die foo } finally { $x = bar }; try { die foo } catch { warn “Got a die: $_” } finally { $x = bar };

finally blocks are always executed making them suitable for cleanup code which cannot be handled using local. You can add as many finally blocks to a given try block as you like.

Note that adding a finally block without a preceding catch block suppresses any errors. This behaviour is consistent with using a standalone eval, but it is not consistent with try/finally patterns found in other programming languages, such as Java, Python, Javascript or C#. If you learned the try/finally pattern from one of these languages, watch out for this.

EXPORTS

All functions are exported by default using Exporter.

If you need to rename the try, catch or finally keyword consider using Sub::Import to get Sub::Exporter’s flexibility.

try (&;@)
Takes one mandatory try subroutine, an optional catch subroutine and finally subroutine. The mandatory subroutine is evaluated in the context of an eval block. If no error occurred the value from the first block is returned, preserving list/scalar context. If there was an error and the second subroutine was given it will be invoked with the error in $_ (localized) and as that block’s first and only argument. $@ does not contain the error. Inside the catch block it has the same value it had before the try block was executed. Note that the error may be false, but if that happens the catch block will still be invoked. Once all execution is finished then the finally block, if given, will execute.

catch (&;@)
Intended to be used in the second argument position of try. Returns a reference to the subroutine it was given but blessed as Try::Tiny::Catch which allows try to decode correctly what to do with this code reference. catch { … } Inside the catch block the caught error is stored in $_, while previous value of $@ is still available for use. This value may or may not be meaningful depending on what happened before the try, but it might be a good idea to preserve it in an error stack. For code that captures $@ when throwing new errors (i.e. Class::Throwable), you’ll need to do: local $@ = $_;

finally (&;@)
try { … } catch { … } finally { … }; Or try { … } finally { … }; Or even try { … } finally { … } catch { … }; Intended to be the second or third element of try. finally blocks are always executed in the event of a successful try or if catch is run. This allows you to locate cleanup code which cannot be done via local() e.g. closing a file handle. When invoked, the finally block is passed the error that was caught. If no error was caught, it is passed nothing. (Note that the finally block does not localize $_ with the error, since unlike in a catch block, there is no way to know if $_ == undef implies that there were no errors.) In other words, the following code does just what you would expect: try { die_sometimes(); } catch { # …code run in case of error } finally { if (@_) { print “The try block died with: @_ “; } else { print “The try block ran without error. “; } }; You must always do your own error handling in the finally block. Try::Tiny will not do anything about handling possible errors coming from code located in these blocks. Furthermore exceptions in finally blocks are not trappable and are unable to influence the execution of your program. This is due to limitation of DESTROY-based scope guards, which finally is implemented on top of. This may change in a future version of Try::Tiny. In the same way catch() blesses the code reference this subroutine does the same except it bless them as Try::Tiny::Finally.

BACKGROUND

There are a number of issues with eval.

Clobbering $@

When you run an eval block and it succeeds, $@ will be cleared, potentially clobbering an error that is currently being caught.

This causes action at a distance, clearing previous errors your caller may have not yet handled.

$@ must be properly localized before invoking eval in order to avoid this issue.

More specifically, before Perl version 5.14.0 $@ was clobbered at the beginning of the eval, which also made it impossible to capture the previous error before you die (for instance when making exception objects with error stacks).

For this reason try will actually set $@ to its previous value (the one available before entering the try block) in the beginning of the eval block.

Localizing $@ silently masks errors

Inside an eval block, die behaves sort of like:

sub die { $@ = $_[0]; return_undef_from_eval(); }

This means that if you were polite and localized $@ you can’t die in that scope, or your error will be discarded (printing “Something’s wrong” instead).

The workaround is very ugly:

my $error = do { local $@; eval { … }; $@; }; … die $error;

$@ might not be a true value

This code is wrong:

if ( $@ ) { … }

because due to the previous caveats it may have been unset.

$@ could also be an overloaded error object that evaluates to false, but that’s asking for trouble anyway.

The classic failure mode (fixed in Perl 5.14.0) is:

sub Object::DESTROY { eval { … } } eval { my $obj = Object->new; die “foo”; }; if ( $@ ) { }

In this case since Object::DESTROY is not localizing $@ but still uses eval, it will set $@ to "".

The destructor is called when the stack is unwound, after die sets $@ to "foo at Foo.pm line 42 ", so by the time if ( $@ ) is evaluated it has been cleared by eval in the destructor.

The workaround for this is even uglier than the previous ones. Even though we can’t save the value of $@ from code that doesn’t localize, we can at least be sure the eval was aborted due to an error:

my $failed = not eval { … return 1; };

This is because an eval that caught a die will always return a false value.

ALTERNATE SYNTAX

Using Perl 5.10 you can use “Switch statements” in perlsyn (but please don’t, because that syntax has since been deprecated because there was too much unexpected magical behaviour).

The catch block is invoked in a topicalizer context (like a given block), but note that you can’t return a useful value from catch using the when blocks without an explicit return.

This is somewhat similar to Perl 6’s CATCH blocks. You can use it to concisely match errors:

try { require Foo; } catch { when (/^Cant locate .*?\pm in \INC/) { } # ignore default { die $_ } };

CAVEATS

  • @_ is not available within the try block, so you need to copy your argument list. In case you want to work with argument values directly via @_ aliasing (i.e. allow $_[1] = "foo"), you need to pass @_ by reference: sub foo { my ( $self, @args ) = @_; try { $self->bar(@args) } } or sub bar_in_place { my $self = shift; my $args = \_; try { $_ = $self->bar($_) for @$args } }

  • return returns from the try block, not from the parent sub (note that this is also how eval works, but not how TryCatch works): sub parent_sub { try { die; } catch { return; }; say “this text WILL be displayed, even though an exception is thrown”; } Instead, you should capture the return value: sub parent_sub { my $success = try { die; 1; }; return unless $success; say “This text WILL NEVER appear!”; } # OR sub parent_sub_with_catch { my $success = try { die; 1; } catch { # do something with $_ return undef; #see note }; return unless $success; say “This text WILL NEVER appear!”; } Note that if you have a catch block, it must return undef for this to work, since if a catch block exists, its return value is returned in place of undef when an exception is thrown.

  • try introduces another caller stack frame. Sub::Uplevel is not used. Carp will not report this when using full stack traces, though, because %Carp::Internal is used. This lack of magic is considered a feature.

  • The value of $_ in the catch block is not guaranteed to be the value of the exception thrown ($@) in the try block. There is no safe way to ensure this, since eval may be used unhygienically in destructors. The only guarantee is that the catch will be called if an exception is thrown.

  • The return value of the catch block is not ignored, so if testing the result of the expression for truth on success, be sure to return a false value from the catch block: my $obj = try { MightFail->new; } catch { … return; # avoid returning a true value; }; return unless $obj;

  • $SIG{_ _DIE_ _} is still in effect. Though it can be argued that $SIG{_ _DIE_ _} should be disabled inside of eval blocks, since it isn’t people have grown to rely on it. Therefore in the interests of compatibility, try does not disable $SIG{_ _DIE_ _} for the scope of the error throwing code.

  • Lexical $_ may override the one set by catch. For example Perl 5.10’s given form uses a lexical $_, creating some confusing behavior: given ($foo) { when (…) { try { … } catch { warn $_; # will print $foo, not the error warn $_[0]; # instead, get the error like this } } } Note that this behavior was changed once again in Perl5 version 18 <https://metacpan.org/module/perldelta#given-now-aliases-the-global-_>. However, since the entirety of lexical $_ is now considered experimental <https://metacpan.org/module/perldelta#Lexical-_-is-now-experimental>, it is unclear whether the new version 18 behavior is final.

SEE ALSO

Syntax::Keyword::Try
Only available on perls >= 5.14, with a slightly different syntax (e.g. no trailing ; because it’s actually a keyword, not a sub, but this means you can return and next within it). Use Feature::Compat::Try to automatically switch to the native try syntax in newer perls (when available). See also Try Catch Exception Handling.

TryCatch
Much more feature complete, more convenient semantics, but at the cost of implementation complexity.

autodie
Automatic error throwing for builtin functions and more. Also designed to work well with given/when.

Throwable
A lightweight role for rolling your own exception classes.

Error
Exception object implementation with a try statement. Does not localize $@.

Exception::Class::TryCatch
Provides a catch statement, but properly calling eval is your responsibility. The try keyword pushes $@ onto an error stack, avoiding some of the issues with $@, but you still need to localize to prevent clobbering.

LIGHTNING TALK

I gave a lightning talk about this module, you can see the slides (Firefox only):

<http://web.archive.org/web/20100628040134/http://nothingmuch.woobling.org/talks/takahashi.xul>

Or read the source:

<http://web.archive.org/web/20100305133605/http://nothingmuch.woobling.org/talks/yapc_asia_2009/try_tiny.yml>

SUPPORT

Bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=Try-Tiny> (or [email protected] <mailto:[email protected]>).

AUTHORS

CONTRIBUTORS

COPYRIGHT AND LICENCE

This software is Copyright (c) 2009 by יובל קוג’מן (Yuval Kogman).

This is free software, licensed under:

The MIT (X11) License

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2367 - Linux cli command lrand48

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lrand48 and provides detailed information about the command lrand48, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lrand48.

NAME 🖥️ lrand48 🖥️

generate uniformly distributed pseudo-random numbers

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
double drand48(void);
double erand48(unsigned short xsubi[3]);
long lrand48(void);
long nrand48(unsigned short xsubi[3]);
long mrand48(void);
long jrand48(unsigned short xsubi[3]);
void srand48(long seedval);
unsigned short *seed48(unsigned short seed16v[3]);
void lcong48(unsigned short param[7]);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

DESCRIPTION

These functions generate pseudo-random numbers using the linear congruential algorithm and 48-bit integer arithmetic.

The drand48() and erand48() functions return nonnegative double-precision floating-point values uniformly distributed over the interval [0.0, 1.0).

The lrand48() and nrand48() functions return nonnegative long integers uniformly distributed over the interval [0, 2^31).

The mrand48() and jrand48() functions return signed long integers uniformly distributed over the interval [-2^31, 2^31).

The srand48(), seed48(), and lcong48() functions are initialization functions, one of which should be called before using drand48(), lrand48(), or mrand48(). The functions erand48(), nrand48(), and jrand48() do not require an initialization function to be called first.

All the functions work by generating a sequence of 48-bit integers, Xi, according to the linear congruential formula:

Xn+1 = (aXn + c) mod m, where n >= 0

The parameter m = 2^48, hence 48-bit integer arithmetic is performed. Unless lcong48() is called, a and c are given by:

a = 0x5DEECE66D
c = 0xB

The value returned by any of the functions drand48(), erand48(), lrand48(), nrand48(), mrand48(), or jrand48() is computed by first generating the next 48-bit Xi in the sequence. Then the appropriate number of bits, according to the type of data item to be returned, is copied from the high-order bits of Xi and transformed into the returned value.

The functions drand48(), lrand48(), and mrand48() store the last 48-bit Xi generated in an internal buffer. The functions erand48(), nrand48(), and jrand48() require the calling program to provide storage for the successive Xi values in the array argument xsubi. The functions are initialized by placing the initial value of Xi into the array before calling the function for the first time.

The initializer function srand48() sets the high order 32-bits of Xi to the argument seedval. The low order 16-bits are set to the arbitrary value 0x330E.

The initializer function seed48() sets the value of Xi to the 48-bit value specified in the array argument seed16v. The previous value of Xi is copied into an internal buffer and a pointer to this buffer is returned by seed48().

The initialization function lcong48() allows the user to specify initial values for Xi, a, and c. Array argument elements param[0-2] specify Xi, param[3-5] specify a, and param[6] specifies c. After lcong48() has been called, a subsequent call to either srand48() or seed48() will restore the standard values of a and c.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

drand48(), erand48(), lrand48(), nrand48(), mrand48(), jrand48(), srand48(), seed48(), lcong48()

Thread safety

MT-Unsafe race:drand48

The above functions record global state information for the random number generator, so they are not thread-safe.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4.

SEE ALSO

rand(3), random(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2368 - Linux cli command Net_DNS_RR_CAApm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_CAApm and provides detailed information about the command Net_DNS_RR_CAApm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_CAApm.

NAME 🖥️ Net_DNS_RR_CAApm 🖥️

DNS CAA resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name IN CAA flags tag value);

DESCRIPTION

Class for Certification Authority Authorization (CAA) DNS resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

flags

$flags = $rr->flags; $rr->flags( $flags );

Unsigned 8-bit number representing Boolean flags.

critical
$rr->critical(1); if ( $rr->critical ) { … } Issuer critical flag.

tag

$tag = $rr->tag; $rr->tag( $tag );

The property identifier, a sequence of ASCII characters.

Tag values may contain ASCII characters a-z, hyphen and 0-9. Tag values should not contain any other characters. Matching of tag values is not case sensitive.

value

$value = $rr->value; $rr->value( $value );

A sequence of octets representing the property value. Property values are encoded as binary values and may employ sub-formats.

COPYRIGHT

Copyright (c)2013,2015 Dick Franks

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC8659 <https://tools.ietf.org/html/rfc8659>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2369 - Linux cli command Spreadsheet_ParseExcel_Dumppm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_ParseExcel_Dumppm and provides detailed information about the command Spreadsheet_ParseExcel_Dumppm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_ParseExcel_Dumppm.

NAME 🖥️ Spreadsheet_ParseExcel_Dumppm 🖥️

A class for dumping Excel records.

SYNOPSIS

See the documentation for Spreadsheet::ParseExcel.

DESCRIPTION

This module is used in conjunction with Spreadsheet::ParseExcel. See the documentation for Spreadsheet::ParseExcel.

AUTHOR

Current maintainer 0.60+: Douglas Wilson [email protected]

Maintainer 0.40-0.59: John McNamara [email protected]

Maintainer 0.27-0.33: Gabor Szabo [email protected]

Original author: Kawai Takanori [email protected]

COPYRIGHT

Copyright (c) 2014 Douglas Wilson

Copyright (c) 2009-2013 John McNamara

Copyright (c) 2006-2008 Gabor Szabo

Copyright (c) 2000-2006 Kawai Takanori

All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2370 - Linux cli command ldexpl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ldexpl and provides detailed information about the command ldexpl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ldexpl.

NAME 🖥️ ldexpl 🖥️

multiply floating-point number by integral power of 2

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double ldexp(double x, int exp);
float ldexpf(float x, int exp);
long double ldexpl(long double x, int exp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

ldexpf(), ldexpl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the result of multiplying the floating-point number x by 2 raised to the power exp.

RETURN VALUE

On success, these functions return x * (2^exp).

If exp is zero, then x is returned.

If x is a NaN, a NaN is returned.

If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.

If the result underflows, a range error occurs, and zero is returned.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with a sign the same as x.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error, overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error, underflow
errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

ldexp(), ldexpf(), ldexpl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

SEE ALSO

frexp(3), modf(3), scalbln(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2371 - Linux cli command Net_DNS_Resolver_androidpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_Resolver_androidpm and provides detailed information about the command Net_DNS_Resolver_androidpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_Resolver_androidpm.

NAME 🖥️ Net_DNS_Resolver_androidpm 🖥️

Android resolver class

SYNOPSIS

use Net::DNS::Resolver;

DESCRIPTION

This class implements the OS specific portions of Net::DNS::Resolver.

No user serviceable parts inside, see Net::DNS::Resolver for all your resolving needs.

COPYRIGHT

Copyright (c)2014 Dick Franks.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl, Net::DNS, Net::DNS::Resolver

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2372 - Linux cli command rcmd

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command rcmd and provides detailed information about the command rcmd, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the rcmd.

NAME 🖥️ rcmd 🖥️

routines for returning a stream to a remote command

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h> /* Or <unistd.h> on some systems */
int rcmd(char **restrict ahost, unsigned short inport,
 const char *restrict locuser,
 const char *restrict remuser,
 const char *restrict cmd, int *restrict fd2p);
int rresvport(int *port);
int iruserok(uint32_t raddr, int superuser,
 const char *ruser, const char *luser);
int ruserok(const char *rhost, int superuser,
 const char *ruser, const char *luser);
int rcmd_af(char **restrict ahost, unsigned short inport,
 const char *restrict locuser,
 const char *restrict remuser,
 const char *restrict cmd, int *restrict fd2p,
 sa_family_t af);
int rresvport_af(int *port, sa_family_t af);
int iruserok_af(const void *restrict raddr, int superuser,
 const char *restrict ruser, const char *restrict luser,
 sa_family_t af);
int ruserok_af(const char *rhost, int superuser,
 const char *ruser, const char *luser,
 sa_family_t af);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

rcmd(), rcmd_af(), rresvport(), rresvport_af(), iruserok(), iruserok_af(), ruserok(), ruserok_af():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The rcmd() function is used by the superuser to execute a command on a remote machine using an authentication scheme based on privileged port numbers. The rresvport() function returns a file descriptor to a socket with an address in the privileged port space. The iruserok() and ruserok() functions are used by servers to authenticate clients requesting service with rcmd(). All four functions are used by the rshd(8) server (among others).

rcmd()

The rcmd() function looks up the host *ahost using gethostbyname(3), returning -1 if the host does not exist. Otherwise, *ahost is set to the standard name of the host and a connection is established to a server residing at the well-known Internet port inport.

If the connection succeeds, a socket in the Internet domain of type SOCK_STREAM is returned to the caller, and given to the remote command as stdin and stdout. If fd2p is nonzero, then an auxiliary channel to a control process will be set up, and a file descriptor for it will be placed in *fd2p. The control process will return diagnostic output from the command (unit 2) on this channel, and will also accept bytes on this channel as being UNIX signal numbers, to be forwarded to the process group of the command. If fd2p is 0, then the stderr (unit 2 of the remote command) will be made the same as the stdout and no provision is made for sending arbitrary signals to the remote process, although you may be able to get its attention by using out-of-band data.

The protocol is described in detail in rshd(8).

rresvport()

The rresvport() function is used to obtain a socket with a privileged port bound to it. This socket is suitable for use by rcmd() and several other functions. Privileged ports are those in the range 0 to 1023. Only a privileged process (on Linux, a process that has the CAP_NET_BIND_SERVICE capability in the user namespace governing its network namespace) is allowed to bind to a privileged port. In the glibc implementation, this function restricts its search to the ports from 512 to 1023. The port argument is value-result: the value it supplies to the call is used as the starting point for a circular search of the port range; on (successful) return, it contains the port number that was bound to.

iruserok() and ruserok()

The iruserok() and ruserok() functions take a remote host’s IP address or name, respectively, two usernames and a flag indicating whether the local user’s name is that of the superuser. Then, if the user is not the superuser, it checks the /etc/hosts.equiv file. If that lookup is not done, or is unsuccessful, the .rhosts in the local user’s home directory is checked to see if the request for service is allowed.

If this file does not exist, is not a regular file, is owned by anyone other than the user or the superuser, is writable by anyone other than the owner, or is hardlinked anywhere, the check automatically fails. Zero is returned if the machine name is listed in the hosts.equiv file, or the host and remote username are found in the .rhosts file; otherwise iruserok() and ruserok() return -1. If the local domain (as obtained from gethostname(2)) is the same as the remote domain, only the machine name need be specified.

If the IP address of the remote host is known, iruserok() should be used in preference to ruserok(), as it does not require trusting the DNS server for the remote host’s domain.

*_af() variants

All of the functions described above work with IPv4 (AF_INET) sockets. The “_af” variants take an extra argument that allows the socket address family to be specified. For these functions, the af argument can be specified as AF_INET or AF_INET6. In addition, rcmd_af() supports the use of AF_UNSPEC.

RETURN VALUE

The rcmd() function returns a valid socket descriptor on success. It returns -1 on error and prints a diagnostic message on the standard error.

The rresvport() function returns a valid, bound socket descriptor on success. On failure, it returns -1 and sets errno to indicate the error. The error code EAGAIN is overloaded to mean: “All network ports in use”.

For information on the return from ruserok() and iruserok(), see above.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

rcmd(), rcmd_af()

Thread safetyMT-Unsafe

rresvport(), rresvport_af()

Thread safetyMT-Safe

iruserok(), ruserok(), iruserok_af(), ruserok_af()

Thread safetyMT-Safe locale

STANDARDS

BSD.

HISTORY

iruserok_af()
rcmd_af()
rresvport_af()
ruserok_af()
glibc 2.2.

Solaris, 4.2BSD. The “_af” variants are more recent additions, and are not present on as wide a range of systems.

BUGS

iruserok() and iruserok_af() are declared in glibc headers only since glibc 2.12.

SEE ALSO

rlogin(1), rsh(1), rexec(3), rexecd(8), rlogind(8), rshd(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2373 - Linux cli command srandom

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command srandom and provides detailed information about the command srandom, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the srandom.

NAME 🖥️ srandom 🖥️

random number generator

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
long random(void);
void srandom(unsigned int seed);
char *initstate(unsigned int seed, char state[.n], size_t n);
char *setstate(char *state);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

random(), srandom(), initstate(), setstate():

    _XOPEN_SOURCE >= 500
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The random() function uses a nonlinear additive feedback random number generator employing a default table of size 31 long integers to return successive pseudo-random numbers in the range from 0 to 2^31 - 1. The period of this random number generator is very large, approximately 16 * ((2^31) - 1).

The srandom() function sets its argument as the seed for a new sequence of pseudo-random integers to be returned by random(). These sequences are repeatable by calling srandom() with the same seed value. If no seed value is provided, the random() function is automatically seeded with a value of 1.

The initstate() function allows a state array state to be initialized for use by random(). The size of the state array n is used by initstate() to decide how sophisticated a random number generator it should use—the larger the state array, the better the random numbers will be. Current “optimal” values for the size of the state array n are 8, 32, 64, 128, and 256 bytes; other amounts will be rounded down to the nearest known amount. Using less than 8 bytes results in an error. seed is the seed for the initialization, which specifies a starting point for the random number sequence, and provides for restarting at the same point.

The setstate() function changes the state array used by the random() function. The state array state is used for random number generation until the next call to initstate() or setstate(). state must first have been initialized using initstate() or be the result of a previous call of setstate().

RETURN VALUE

The random() function returns a value between 0 and (2^31) - 1. The srandom() function returns no value.

The initstate() function returns a pointer to the previous state array. On failure, it returns NULL, and errno is set to indicate the error.

On success, setstate() returns a pointer to the previous state array. On failure, it returns NULL, and errno is set to indicate the error.

ERRORS

EINVAL
The state argument given to setstate() was NULL.

EINVAL
A state array of less than 8 bytes was specified to initstate().

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

random(), srandom(), initstate(), setstate()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, 4.3BSD.

NOTES

Random-number generation is a complex topic. Numerical Recipes in C: The Art of Scientific Computing (William H. Press, Brian P. Flannery, Saul A. Teukolsky, William T. Vetterling; New York: Cambridge University Press, 2007, 3rd ed.) provides an excellent discussion of practical random-number generation issues in Chapter 7 (Random Numbers).

For a more theoretical discussion which also covers many practical issues in depth, see Chapter 3 (Random Numbers) in Donald E. Knuth’s The Art of Computer Programming, volume 2 (Seminumerical Algorithms), 2nd ed.; Reading, Massachusetts: Addison-Wesley Publishing Company, 1981.

CAVEATS

The random() function should not be used in multithreaded programs where reproducible behavior is required. Use random_r(3) for that purpose.

BUGS

According to POSIX, initstate() should return NULL on error. In the glibc implementation, errno is (as specified) set on error, but the function does not return NULL.

SEE ALSO

getrandom(2), drand48(3), rand(3), random_r(3), srand(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2374 - Linux cli command uint8_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command uint8_ttype and provides detailed information about the command uint8_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the uint8_ttype.

NAME 🖥️ uint8_ttype 🖥️

fixed-width basic integer types

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <stdint.h>
typedef /* ... */ int8_t;
typedef /* ... */ int16_t;
typedef /* ... */ int32_t;
typedef /* ... */ int64_t;
typedef /* ... */ uint8_t;
typedef /* ... */ uint16_t;
typedef /* ... */ uint32_t;
typedef /* ... */ uint64_t;
#define INT8_WIDTH 8
#define INT16_WIDTH 16
#define INT32_WIDTH 32
#define INT64_WIDTH 64
#define UINT8_WIDTH 8
#define UINT16_WIDTH 16
#define UINT32_WIDTH 32
#define UINT64_WIDTH 64
#define INT8_MAX /* 2**(INT8_WIDTH - 1) - 1 */
#define INT16_MAX /* 2**(INT16_WIDTH - 1) - 1 */
#define INT32_MAX /* 2**(INT32_WIDTH - 1) - 1 */
#define INT64_MAX /* 2**(INT64_WIDTH - 1) - 1 */
#define INT8_MIN /* - 2**(INT8_WIDTH - 1) */
#define INT16_MIN /* - 2**(INT16_WIDTH - 1) */
#define INT32_MIN /* - 2**(INT32_WIDTH - 1) */
#define INT64_MIN /* - 2**(INT64_WIDTH - 1) */
#define UINT8_MAX /* 2**INT8_WIDTH - 1 */
#define UINT16_MAX /* 2**INT16_WIDTH - 1 */
#define UINT32_MAX /* 2**INT32_WIDTH - 1 */
#define UINT64_MAX /* 2**INT64_WIDTH - 1 */
#define INT8_C(c) c ## /* ... */
#define INT16_C(c) c ## /* ... */
#define INT32_C(c) c ## /* ... */
#define INT64_C(c) c ## /* ... */
#define UINT8_C(c) c ## /* ... */
#define UINT16_C(c) c ## /* ... */
#define UINT32_C(c) c ## /* ... */
#define UINT64_C(c) c ## /* ... */

DESCRIPTION

intN*_t* are signed integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are be capable of storing values in the range [INTN**_MIN**, INTN**_MAX**], substituting N by the appropriate number.

uintN*_t* are unsigned integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are capable of storing values in the range [0, UINTN**_MAX**], substituting N by the appropriate number.

According to POSIX, [u]int8_t, [u]int16_t, and [u]int32_t are required; [u]int64_t are only required in implementations that provide integer types with width 64; and all other types of this form are optional.

The macros [U]INTN**_WIDTH** expand to the width in bits of these types (N).

The macros [U]INTN**_MAX** expand to the maximum value that these types can hold.

The macros INTN**_MIN** expand to the minimum value that these types can hold.

The macros [U]INTN**_C**() expand their argument to an integer constant of type [u]intN*_t*.

The length modifiers for the [u]intN*_t* types for the printf(3) family of functions are expanded by macros of the forms PRIdN, PRIiN, PRIuN, and PRIxN (defined in <inttypes.h>); resulting for example in %“PRId64” or %“PRIi64” for printing int64_t values. The length modifiers for the [u]intN*_t* types for the scanf(3) family of functions are expanded by macros of the forms SCNdN, SCNiN, SCNuN, and SCNxN, (defined in <inttypes.h>); resulting for example in %“SCNu8” or %“SCNx8” for scanning uint8_t values.

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The [U]INTN**_WIDTH** macros were added in C23.

NOTES

The following header also provides these types: <inttypes.h>. <arpa/inet.h> also provides uint16_t and uint32_t.

SEE ALSO

intmax_t(3type), intptr_t(3type), printf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2375 - Linux cli command Moose_Meta_TypeConstraint_Classpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_TypeConstraint_Classpm and provides detailed information about the command Moose_Meta_TypeConstraint_Classpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_TypeConstraint_Classpm.

NAME 🖥️ Moose_Meta_TypeConstraint_Classpm 🖥️

Class/TypeConstraint parallel hierarchy

VERSION

version 2.2207

DESCRIPTION

This class represents type constraints for a class.

INHERITANCE

Moose::Meta::TypeConstraint::Class is a subclass of Moose::Meta::TypeConstraint.

METHODS

Moose::Meta::TypeConstraint::Class->new(%options)

This creates a new class type constraint based on the given %options.

It takes the same options as its parent, with two exceptions. First, it requires an additional option, class, which is name of the constraint’s class. Second, it automatically sets the parent to the Object type.

The constructor also overrides the hand optimized type constraint with one it creates internally.

$constraint->class

Returns the class name associated with the constraint.

$constraint->parents

Returns all the type’s parent types, corresponding to its parent classes.

$constraint->is_subtype_of($type_name_or_object)

If the given type is also a class type, then this checks that the type’s class is a subclass of the other type’s class.

Otherwise it falls back to the implementation in Moose::Meta::TypeConstraint.

$constraint->create_child_type(%options)

This returns a new Moose::Meta::TypeConstraint object with the type as its parent.

Note that it does not return a Moose::Meta::TypeConstraint::Class object!

$constraint->get_message($value)

This is the same as “get_message” in Moose::Meta::TypeConstraint except that it explicitly says isa was checked. This is to help users deal with accidentally autovivified type constraints.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2376 - Linux cli command pthread_getspecific

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_getspecific and provides detailed information about the command pthread_getspecific, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_getspecific.

NAME 🖥️ pthread_getspecific 🖥️

management of thread-specific data

SYNOPSIS

#include <pthread.h>
int pthread_key_create(pthread_key_t *key,
 void (*destr_function) (void *));
int pthread_key_delete(pthread_key_t key);
int pthread_setspecific(pthread_key_t key, const void *pointer);
void * pthread_getspecific(pthread_key_t key);

DESCRIPTION

Programs often need global or static variables that have different values in different threads. Since threads share one memory space, this cannot be achieved with regular variables. Thread-specific data is the POSIX threads answer to this need.

Each thread possesses a private memory block, the thread-specific data area, or TSD area for short. This area is indexed by TSD keys. The TSD area associates values of type void * to TSD keys. TSD keys are common to all threads, but the value associated with a given TSD key can be different in each thread.

For concreteness, the TSD areas can be viewed as arrays of void * pointers, TSD keys as integer indices into these arrays, and the value of a TSD key as the value of the corresponding array element in the calling thread.

When a thread is created, its TSD area initially associates NULL with all keys.

pthread_key_create allocates a new TSD key. The key is stored in the location pointed to by key. There is a limit of PTHREAD_KEYS_MAX on the number of keys allocated at a given time. The value initially associated with the returned key is NULL in all currently executing threads.

The destr_function argument, if not NULL, specifies a destructor function associated with the key. When a thread terminates via pthread_exit or by cancelation, destr_function is called with arguments the value associated with the key in that thread. The destr_function is not called if that value is NULL. The order in which destructor functions are called at thread termination time is unspecified.

Before the destructor function is called, the NULL value is associated with the key in the current thread. A destructor function might, however, re-associate non-NULL values to that key or some other key. To deal with this, if after all the destructors have been called for all non-NULL values, there are still some non-NULL values with associated destructors, then the process is repeated. The glibc implementation stops the process after PTHREAD_DESTRUCTOR_ITERATIONS iterations, even if some non-NULL values with associated descriptors remain. Other implementations may loop indefinitely.

pthread_key_delete deallocates a TSD key. It does not check whether non-NULL values are associated with that key in the currently executing threads, nor call the destructor function associated with the key.

pthread_setspecific changes the value associated with key in the calling thread, storing the given pointer instead.

pthread_getspecific returns the value currently associated with key in the calling thread.

RETURN VALUE

pthread_key_create, pthread_key_delete, and pthread_setspecific return 0 on success and a non-zero error code on failure. If successful, pthread_key_create stores the newly allocated key in the location pointed to by its key argument.

pthread_getspecific returns the value associated with key on success, and NULL on error.

ERRORS

pthread_key_create returns the following error code on error:

EAGAIN
PTHREAD_KEYS_MAX keys are already allocated.

pthread_key_delete and pthread_setspecific return the following error code on error:

EINVAL
key is not a valid, allocated TSD key.

pthread_getspecific returns NULL if key is not a valid, allocated TSD key.

SEE ALSO

pthread_create(3), pthread_exit(3), pthread_testcancel(3).

EXAMPLE

The following code fragment allocates a thread-specific array of 100 characters, with automatic reclamation at thread exit:

/* Key for the thread-specific buffer */
static pthread_key_t buffer_key;
/* Once-only initialisation of the key */
static pthread_once_t buffer_key_once = PTHREAD_ONCE_INIT;
/* Allocate the thread-specific buffer */
void buffer_alloc(void)
{
  pthread_once(&buffer_key_once, buffer_key_alloc);
  pthread_setspecific(buffer_key, malloc(100));
}
/* Return the thread-specific buffer */
char * get_buffer(void)
{
  return (char *) pthread_getspecific(buffer_key);
}
/* Allocate the key */
static void buffer_key_alloc()
{
  pthread_key_create(&buffer_key, buffer_destroy);
}
/* Free the thread-specific buffer */
static void buffer_destroy(void * buf)
{
  free(buf);
}
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2377 - Linux cli command Spreadsheet_WriteExcel_Chart_Areapm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_WriteExcel_Chart_Areapm and provides detailed information about the command Spreadsheet_WriteExcel_Chart_Areapm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_WriteExcel_Chart_Areapm.

NAME 🖥️ Spreadsheet_WriteExcel_Chart_Areapm 🖥️

A writer class for Excel Area charts.

SYNOPSIS

To create a simple Excel file with a Area chart using Spreadsheet::WriteExcel:

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( chart.xls ); my $worksheet = $workbook->add_worksheet(); my $chart = $workbook->add_chart( type => area ); # Configure the chart. $chart->add_series( categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, ); # Add the worksheet data the chart refers to. my $data = [ [ Category, 2, 3, 4, 5, 6, 7 ], [ Value, 1, 4, 5, 2, 1, 5 ], ]; $worksheet->write( A1, $data ); _ _END_ _

DESCRIPTION

This module implements Area charts for Spreadsheet::WriteExcel. The chart object is created via the Workbook add_chart() method:

my $chart = $workbook->add_chart( type => area );

Once the object is created it can be configured via the following methods that are common to all chart classes:

$chart->add_series(); $chart->set_x_axis(); $chart->set_y_axis(); $chart->set_title();

These methods are explained in detail in Spreadsheet::WriteExcel::Chart. Class specific methods or settings, if any, are explained below.

Area Chart Methods

There aren’t currently any area chart specific methods. See the TODO section of Spreadsheet::WriteExcel::Chart.

EXAMPLE

Here is a complete example that demonstrates most of the available features when creating a chart.

#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new( chart_area.xls ); my $worksheet = $workbook->add_worksheet(); my $bold = $workbook->add_format( bold => 1 ); # Add the worksheet data that the charts will refer to. my $headings = [ Number, Sample 1, Sample 2 ]; my $data = [ [ 2, 3, 4, 5, 6, 7 ], [ 1, 4, 5, 2, 1, 5 ], [ 3, 6, 7, 5, 4, 3 ], ]; $worksheet->write( A1, $headings, $bold ); $worksheet->write( A2, $data ); # Create a new chart object. In this case an embedded chart. my $chart = $workbook->add_chart( type => area, embedded => 1 ); # Configure the first series. (Sample 1) $chart->add_series( name => Sample 1, categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$B$2:$B$7, ); # Configure the second series. (Sample 2) $chart->add_series( name => Sample 2, categories => =Sheet1!$A$2:$A$7, values => =Sheet1!$C$2:$C$7, ); # Add a chart title and some axis labels. $chart->set_title ( name => Results of sample analysis ); $chart->set_x_axis( name => Test number ); $chart->set_y_axis( name => Sample length (cm) ); # Insert the chart into the worksheet (with an offset). $worksheet->insert_chart( D2, $chart, 25, 10 ); _ _END_ _

AUTHOR

John McNamara [email protected]

COPYRIGHT

Copyright MM-MMX, John McNamara.

All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2378 - Linux cli command getpwuid

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getpwuid and provides detailed information about the command getpwuid, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getpwuid.

NAME 🖥️ getpwuid 🖥️

get password file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <pwd.h>
struct passwd *getpwnam(const char *name);
struct passwd *getpwuid(uid_t uid);
int getpwnam_r(const char *restrict name, struct passwd *restrict pwd,
 char buf[restrict .buflen], size_t buflen,
 struct passwd **restrict result);
int getpwuid_r(uid_t uid, struct passwd *restrict pwd,
 char buf[restrict .buflen], size_t buflen,
 struct passwd **restrict result);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getpwnam_r(), getpwuid_r():

    _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The getpwnam() function returns a pointer to a structure containing the broken-out fields of the record in the password database (e.g., the local password file /etc/passwd, NIS, and LDAP) that matches the username name.

The getpwuid() function returns a pointer to a structure containing the broken-out fields of the record in the password database that matches the user ID uid.

The passwd structure is defined in <pwd.h> as follows:

struct passwd {
    char   *pw_name;       /* username */
    char   *pw_passwd;     /* user password */
    uid_t   pw_uid;        /* user ID */
    gid_t   pw_gid;        /* group ID */
    char   *pw_gecos;      /* user information */
    char   *pw_dir;        /* home directory */
    char   *pw_shell;      /* shell program */
};

See passwd(5) for more information about these fields.

The getpwnam_r() and getpwuid_r() functions obtain the same information as getpwnam() and getpwuid(), but store the retrieved passwd structure in the space pointed to by pwd. The string fields pointed to by the members of the passwd structure are stored in the buffer buf of size buflen. A pointer to the result (in case of success) or NULL (in case no entry was found or an error occurred) is stored in *result.

The call

sysconf(_SC_GETPW_R_SIZE_MAX)

returns either -1, without changing errno, or an initial suggested size for buf. (If this size is too small, the call fails with ERANGE, in which case the caller can retry with a larger buffer.)

RETURN VALUE

The getpwnam() and getpwuid() functions return a pointer to a passwd structure, or NULL if the matching entry is not found or an error occurs. If an error occurs, errno is set to indicate the error. If one wants to check errno after the call, it should be set to zero before the call.

The return value may point to a static area, and may be overwritten by subsequent calls to getpwent(3), getpwnam(), or getpwuid(). (Do not pass the returned pointer to free(3).)

On success, getpwnam_r() and getpwuid_r() return zero, and set *result to pwd. If no matching password record was found, these functions return 0 and store NULL in *result. In case of error, an error number is returned, and NULL is stored in *result.

ERRORS

0 or ENOENT or ESRCH or EBADF or EPERM or …
The given name or uid was not found.

EINTR
A signal was caught; see signal(7).

EIO
I/O error.

EMFILE
The per-process limit on the number of open file descriptors has been reached.

ENFILE
The system-wide limit on the total number of open files has been reached.

ENOMEM
Insufficient memory to allocate passwd structure.

ERANGE
Insufficient buffer space supplied.

NOTE

The user password database mostly refers to /etc/passwd. However, with recent systems it also refers to network wide databases using NIS, LDAP and other local files as configured in /etc/nsswitch.conf.

FILES

/etc/passwd
local password database file

/etc/nsswitch.conf
System Databases and Name Service Switch configuration file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getpwnam()

Thread safety

MT-Unsafe race:pwnam locale

getpwuid()

Thread safety

MT-Unsafe race:pwuid locale

getpwnam_r(), getpwuid_r()

Thread safety

MT-Safe locale

VERSIONS

The pw_gecos field is not specified in POSIX, but is present on most implementations.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4, 4.3BSD.

NOTES

The formulation given above under “RETURN VALUE” is from POSIX.1-2001. It does not call “not found” an error, and hence does not specify what value errno might have in this situation. But that makes it impossible to recognize errors. One might argue that according to POSIX errno should be left unchanged if an entry is not found. Experiments on various UNIX-like systems show that lots of different values occur in this situation: 0, ENOENT, EBADF, ESRCH, EWOULDBLOCK, EPERM, and probably others.

The pw_dir field contains the name of the initial working directory of the user. Login programs use the value of this field to initialize the HOME environment variable for the login shell. An application that wants to determine its user’s home directory should inspect the value of HOME (rather than the value getpwuid(getuid())->pw_dir) since this allows the user to modify their notion of “the home directory” during a login session. To determine the (initial) home directory of another user, it is necessary to use getpwnam(“username”)->pw_dir or similar.

EXAMPLES

The program below demonstrates the use of getpwnam_r() to find the full username and user ID for the username supplied as a command-line argument.

#include <errno.h>
#include <pwd.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int
main(int argc, char *argv[])
{
    struct passwd pwd;
    struct passwd *result;
    char *buf;
    long bufsize;
    int s;
    if (argc != 2) {
        fprintf(stderr, "Usage: %s username

“, argv[0]); exit(EXIT_FAILURE); } bufsize = sysconf(_SC_GETPW_R_SIZE_MAX); if (bufsize == -1) /* Value was indeterminate / bufsize = 16384; / Should be more than enough */ buf = malloc(bufsize); if (buf == NULL) { perror(“malloc”); exit(EXIT_FAILURE); } s = getpwnam_r(argv[1], &pwd, buf, bufsize, &result); if (result == NULL) { if (s == 0) printf(“Not found “); else { errno = s; perror(“getpwnam_r”); } exit(EXIT_FAILURE); } printf(“Name: %s; UID: %jd “, pwd.pw_gecos, (intmax_t) pwd.pw_uid); exit(EXIT_SUCCESS); }

SEE ALSO

endpwent(3), fgetpwent(3), getgrnam(3), getpw(3), getpwent(3), getspnam(3), putpwent(3), setpwent(3), nsswitch.conf(5), passwd(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2379 - Linux cli command finitef

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command finitef and provides detailed information about the command finitef, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the finitef.

NAME 🖥️ finitef 🖥️

BSD floating-point classification functions

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
int finite(double x);
int finitef(float x);
int finitel(long double x);
int isinf(double x);
int isinff(float x);
int isinfl(long double x);
int isnan(double x);
int isnanf(float x);
int isnanl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

finite(), finitef(), finitel():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
isinf():
    _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isinff(), isinfl():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isnan():

    _XOPEN_SOURCE || _ISOC99_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isnanf(), isnanl():

    _XOPEN_SOURCE >= 600
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The finite(), finitef(), and finitel() functions return a nonzero value if x is neither infinite nor a “not-a-number” (NaN) value, and 0 otherwise.

The isnan(), isnanf(), and isnanl() functions return a nonzero value if x is a NaN value, and 0 otherwise.

The isinf(), isinff(), and isinfl() functions return 1 if x is positive infinity, -1 if x is negative infinity, and 0 otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

finite(), finitef(), finitel(), isinf(), isinff(), isinfl(), isnan(), isnanf(), isnanl()

Thread safetyMT-Safe

NOTES

Note that these functions are obsolete. C99 defines macros isfinite(), isinf(), and isnan() (for all types) replacing them. Further note that the C99 isinf() has weaker guarantees on the return value. See fpclassify(3).

SEE ALSO

fpclassify(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2380 - Linux cli command Mail_Field_AddrListpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Mail_Field_AddrListpm and provides detailed information about the command Mail_Field_AddrListpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Mail_Field_AddrListpm.

NAME 🖥️ Mail_Field_AddrListpm 🖥️

object representation of e-mail address lists

INHERITANCE

Mail::Field::AddrList is a Mail::Field

SYNOPSIS

use Mail::Field::AddrList; $to = Mail::Field->new(To); $from = Mail::Field->new(From, [email protected] (Peter Orbaek)); $from->create([email protected] => Mr. Foo, poe => Peter); $from->parse([email protected] (Mr Foo), Peter Orbaek <poe>); # make a RFC822 header string print $from->stringify()," “; # extract e-mail addresses and names @addresses = $from->addresses(); # strings @names = $from->names(); # strings @addr = $from->addr_list(); # Mail::Address objects (v2.00) # adjoin a new address to the list $from->set_address([email protected], Mr. Foo);

DESCRIPTION

Defines parsing and formatting of address field, for the following fields: To, From, Cc, Reply-To, and Sender.

All the normally used features of the address field specification of RFC2822 are implemented, but some complex (and therefore hardly ever used) constructs will not be understood. Use Mail::Message::Field::Full in MailBox if you need full RFC compliance.

Extends “DESCRIPTION” in Mail::Field.

METHODS

Extends “METHODS” in Mail::Field.

Constructors

Extends “Constructors” in Mail::Field.

Mail::Field::AddrList->combine($fields)
Inherited, see “Constructors” in Mail::Field

Mail::Field::AddrList->extract( $tag, $head [, $index ] )
Inherited, see “Constructors” in Mail::Field

Mail::Field::AddrList->new( $tag [, STRING | %options] )
Inherited, see “Constructors” in Mail::Field

“Fake” constructors

Extends ““Fake” constructors” in Mail::Field.

$obj->create(%options)
Inherited, see ““Fake” constructors” in Mail::Field

$obj->parse()
Inherited, see ““Fake” constructors” in Mail::Field

Accessors

Extends “Accessors” in Mail::Field.

$obj->set(%options)
Inherited, see “Accessors” in Mail::Field

$obj->stringify()
Inherited, see “Accessors” in Mail::Field

$obj->tag()

Mail::Field::AddrList->tag()

Inherited, see “Accessors” in Mail::Field

Smart accessors

Extends “Smart accessors” in Mail::Field.

$obj->addr_list()
Returns the collected Mail::Address objects.

$obj->addresses()
Returns a list if email addresses, found in the field content.

$obj->names()
Returns a list of nicely formatted named, for each of the addresses found in the content.

$obj->set_address($email, $name)
Add/replace an $email address to the field.

$obj->text( [STRING] )
Inherited, see “Smart accessors” in Mail::Field

DETAILS

Extends “DETAILS” in Mail::Field.

DIAGNOSTICS

Error: Undefined subroutine <method> called
Mail::Field objects use autoloading to compile new functionality. Apparently, the method called is not implemented for the specific class of the field object.

SEE ALSO

This module is part of the MailTools distribution, http://perl.overmeer.net/mailtools/.

AUTHORS

The MailTools bundle was developed by Graham Barr. Later, Mark Overmeer took over maintenance without commitment to further development.

Mail::Cap by Gisle Aas <[email protected]>. Mail::Field::AddrList by Peter Orbaek <[email protected]>. Mail::Mailer and Mail::Send by Tim Bunce <[email protected]>. For other contributors see ChangeLog.

LICENSE

Copyrights 1995-2000 Graham Barr <[email protected]> and 2001-2017 Mark Overmeer <[email protected]>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2381 - Linux cli command wcstoumax

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcstoumax and provides detailed information about the command wcstoumax, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcstoumax.

NAME 🖥️ wcstoumax 🖥️

convert wide-character string to integer

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stddef.h>
#include <inttypes.h>
intmax_t wcstoimax(const wchar_t *restrict nptr,
 wchar_t **restrict endptr, int base);
uintmax_t wcstoumax(const wchar_t *restrict nptr,
 wchar_t **restrict endptr, int base);

DESCRIPTION

These functions are just like wcstol(3) and wcstoul(3), except that they return a value of type intmax_t and uintmax_t, respectively.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcstoimax(), wcstoumax()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

imaxabs(3), imaxdiv(3), strtoimax(3), strtoumax(3), wcstol(3), wcstoul(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2382 - Linux cli command Moose_Manual_Constructionpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Manual_Constructionpm and provides detailed information about the command Moose_Manual_Constructionpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Manual_Constructionpm.

NAME 🖥️ Moose_Manual_Constructionpm 🖥️

Object construction (and destruction) with Moose

VERSION

version 2.2207

WHERE’S THE CONSTRUCTOR?

Do not define a new() method for your classes!

When you use Moose in your class, your class becomes a subclass of Moose::Object. The Moose::Object provides a new() method for your class. If you follow our recommendations in Moose::Manual::BestPractices and make your class immutable, then you actually get a class-specific new() method “inlined” in your class.

OBJECT CONSTRUCTION AND ATTRIBUTES

The Moose-provided constructor accepts a hash or hash reference of named parameters matching your attributes (actually, matching their init_args). This is just another way in which Moose keeps you from worrying how classes are implemented. Simply define a class and you’re ready to start creating objects!

OBJECT CONSTRUCTION HOOKS

Moose lets you hook into object construction. You can validate an object’s state, do logging, customize construction from parameters which do not match your attributes, or maybe allow non-hash(ref) constructor arguments. You can do this by creating BUILD and/or BUILDARGS methods.

If these methods exist in your class, Moose will arrange for them to be called as part of the object construction process.

BUILDARGS

The BUILDARGS method is called as a class method before an object is created. It will receive all of the arguments that were passed to new() as-is, and is expected to return a hash reference. This hash reference will be used to construct the object, so it should contain keys matching your attributes’ names (well, init_args).

One common use for BUILDARGS is to accommodate a non-hash(ref) calling style. For example, we might want to allow our Person class to be called with a single argument of a social security number, Person->new($ssn).

Without a BUILDARGS method, Moose will complain, because it expects a hash or hash reference. We can use the BUILDARGS method to accommodate this calling style:

around BUILDARGS => sub { my $orig = shift; my $class = shift; if ( @_ == 1 && !ref $_[0] ) { return $class->$orig( ssn => $_[0] ); } else { return $class->$orig(@_); } };

Note the call to $class->$orig. This will call the default BUILDARGS in Moose::Object. This method takes care of distinguishing between a hash reference and a plain hash for you.

BUILD

The BUILD method is called after an object is created. There are several reasons to use a BUILD method. One of the most common is to check that the object state is valid. While we can validate individual attributes through the use of types, we can’t validate the state of a whole object that way.

sub BUILD { my $self = shift; if ( $self->country_of_residence eq USA ) { die All US residents must have an SSN unless $self->has_ssn; } }

Another use of a BUILD method could be for logging or tracking object creation.

sub BUILD { my $self = shift; debug( Made a new person - SSN = , $self->ssn, ); }

The BUILD method is called with the hash reference of the parameters passed to the constructor (after munging by BUILDARGS). This gives you a chance to do something with parameters that do not represent object attributes.

sub BUILD { my $self = shift; my $args = shift; $self->add_friend( My::User->new( user_id => $args->{user_id}, ) ); }

BUILD and parent classes

The interaction between multiple BUILD methods in an inheritance hierarchy is different from normal Perl methods. You should never call $self->SUPER::BUILD, nor should you ever apply a method modifier to BUILD. Roles are an exception to this rule, though: it’s completely acceptable to apply a method modifier to BUILD in a role; you can even provide an empty BUILD subroutine in a role so the role is applicable even to classes without their own BUILD.

Moose arranges to have all of the BUILD methods in a hierarchy called when an object is constructed, from parents to children. This might be surprising at first, because it reverses the normal order of method inheritance.

The theory behind this is that BUILD methods can only be used for increasing specialization of a class’s constraints, so it makes sense to call the least specific BUILD method first. Also, this is how Perl 6 does it.

OBJECT DESTRUCTION

Moose provides a hook for object destruction with the DEMOLISH method. As with BUILD, you should never explicitly call $self->SUPER::DEMOLISH. Moose will arrange for all of the DEMOLISH methods in your hierarchy to be called, from most to least specific.

Each DEMOLISH method is called with a single argument. This is a boolean value indicating whether or not this method was called as part of the global destruction process (when the Perl interpreter exits).

In most cases, Perl’s built-in garbage collection is sufficient, and you won’t need to provide a DEMOLISH method.

Error Handling During Destruction

The interaction of object destruction and Perl’s global $@ and $? variables can be very confusing.

Moose always localizes $? when an object is being destroyed. This means that if you explicitly call exit, that exit code will be preserved even if an object’s destructor makes a system call.

Moose also preserves $@ against any eval calls that may happen during object destruction. However, if an object’s DEMOLISH method actually dies, Moose explicitly rethrows that error.

If you do not like this behavior, you will have to provide your own DESTROY method and use that instead of the one provided by Moose::Object. You can do this to preserve $@ and capture any errors from object destruction by creating an error stack.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2383 - Linux cli command strptime

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strptime and provides detailed information about the command strptime, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strptime.

NAME 🖥️ strptime 🖥️

convert a string representation of time to a time tm structure

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _XOPEN_SOURCE /* See feature_test_macros(7) */
#include <time.h>
char *strptime(const char *restrict s, const char *restrict format,
 struct tm *restrict tm);

DESCRIPTION

The strptime() function is the converse of strftime(3); it converts the character string pointed to by s to values which are stored in the “broken-down time” structure pointed to by tm, using the format specified by format.

The broken-down time structure tm is described in tm(3type).

The format argument is a character string that consists of field descriptors and text characters, reminiscent of scanf(3). Each field descriptor consists of a % character followed by another character that specifies the replacement for the field descriptor. All other characters in the format string must have a matching character in the input string, except for whitespace, which matches zero or more whitespace characters in the input string. There should be whitespace or other alphanumeric characters between any two field descriptors.

The strptime() function processes the input string from left to right. Each of the three possible input elements (whitespace, literal, or format) are handled one after the other. If the input cannot be matched to the format string, the function stops. The remainder of the format and input strings are not processed.

The supported input field descriptors are listed below. In case a text string (such as the name of a day of the week or a month name) is to be matched, the comparison is case insensitive. In case a number is to be matched, leading zeros are permitted but not required.

%%
The % character.

%a or %A
The name of the day of the week according to the current locale, in abbreviated form or the full name.

%b or %B or %h
The month name according to the current locale, in abbreviated form or the full name.

%c
The date and time representation for the current locale.

%C
The century number (0–99).

%d or %e
The day of month (1–31).

%D
Equivalent to %m/%d/%y. (This is the American style date, very confusing to non-Americans, especially since %d/%m/%y is widely used in Europe. The ISO 8601 standard format is %Y-%m-%d.)

%H
The hour (0–23).

%I
The hour on a 12-hour clock (1–12).

%j
The day number in the year (1–366).

%m
The month number (1–12).

%M
The minute (0–59).

%n
Arbitrary whitespace.

%p
The locale’s equivalent of AM or PM. (Note: there may be none.)

%r
The 12-hour clock time (using the locale’s AM or PM). In the POSIX locale equivalent to %I:%M:%S %p. If t_fmt_ampm is empty in the LC_TIME part of the current locale, then the behavior is undefined.

%R
Equivalent to %H:%M.

%S
The second (0–60; 60 may occur for leap seconds; earlier also 61 was allowed).

%t
Arbitrary whitespace.

%T
Equivalent to %H:%M:%S.

%U
The week number with Sunday the first day of the week (0–53). The first Sunday of January is the first day of week 1.

%w
The ordinal number of the day of the week (0–6), with Sunday = 0.

%W
The week number with Monday the first day of the week (0–53). The first Monday of January is the first day of week 1.

%x
The date, using the locale’s date format.

%X
The time, using the locale’s time format.

%y
The year within century (0–99). When a century is not otherwise specified, values in the range 69–99 refer to years in the twentieth century (1969–1999); values in the range 00–68 refer to years in the twenty-first century (2000–2068).

%Y
The year, including century (for example, 1991).

Some field descriptors can be modified by the E or O modifier characters to indicate that an alternative format or specification should be used. If the alternative format or specification does not exist in the current locale, the unmodified field descriptor is used.

The E modifier specifies that the input string may contain alternative locale-dependent versions of the date and time representation:

%Ec
The locale’s alternative date and time representation.

%EC
The name of the base year (period) in the locale’s alternative representation.

%Ex
The locale’s alternative date representation.

%EX
The locale’s alternative time representation.

%Ey
The offset from %EC (year only) in the locale’s alternative representation.

%EY
The full alternative year representation.

The O modifier specifies that the numerical input may be in an alternative locale-dependent format:

%Od or %Oe
The day of the month using the locale’s alternative numeric symbols; leading zeros are permitted but not required.

%OH
The hour (24-hour clock) using the locale’s alternative numeric symbols.

%OI
The hour (12-hour clock) using the locale’s alternative numeric symbols.

%Om
The month using the locale’s alternative numeric symbols.

%OM
The minutes using the locale’s alternative numeric symbols.

%OS
The seconds using the locale’s alternative numeric symbols.

%OU
The week number of the year (Sunday as the first day of the week) using the locale’s alternative numeric symbols.

%Ow
The ordinal number of the day of the week (Sunday=0), using the locale’s alternative numeric symbols.

%OW
The week number of the year (Monday as the first day of the week) using the locale’s alternative numeric symbols.

%Oy
The year (offset from %C) using the locale’s alternative numeric symbols.

RETURN VALUE

The return value of the function is a pointer to the first character not processed in this function call. In case the input string contains more characters than required by the format string, the return value points right after the last consumed input character. In case the whole input string is consumed, the return value points to the null byte at the end of the string. If strptime() fails to match all of the format string and therefore an error occurred, the function returns NULL.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strptime()

Thread safetyMT-Safe env locale

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SUSv2.

NOTES

In principle, this function does not initialize tm but stores only the values specified. This means that tm should be initialized before the call. Details differ a bit between different UNIX systems. The glibc implementation does not touch those fields which are not explicitly specified, except that it recomputes the tm_wday and tm_yday field if any of the year, month, or day elements changed.

The ‘y’ (year in century) specification is taken to specify a year in the range 1950–2049 by glibc 2.0. It is taken to be a year in 1969–2068 since glibc 2.1.

glibc notes

For reasons of symmetry, glibc tries to support for strptime() the same format characters as for strftime(3). (In most cases, the corresponding fields are parsed, but no field in tm is changed.) This leads to

%F
Equivalent to %Y-%m-%d, the ISO 8601 date format.

%g
The year corresponding to the ISO week number, but without the century (0–99).

%G
The year corresponding to the ISO week number. (For example, 1991.)

%u
The day of the week as a decimal number (1–7, where Monday = 1).

%V
The ISO 8601:1988 week number as a decimal number (1–53). If the week (starting on Monday) containing 1 January has four or more days in the new year, then it is considered week 1. Otherwise, it is the last week of the previous year, and the next week is week 1.

%z
An RFC-822/ISO 8601 standard timezone specification.

%Z
The timezone name.

Similarly, because of GNU extensions to strftime(3), %k is accepted as a synonym for %H, and %l should be accepted as a synonym for %I, and %P is accepted as a synonym for %p. Finally

%s
The number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). Leap seconds are not counted unless leap second support is available.

The glibc implementation does not require whitespace between two field descriptors.

EXAMPLES

The following example demonstrates the use of strptime() and strftime(3).

#define _XOPEN_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
int
main(void)
{
    struct tm tm;
    char buf[255];
    memset(&tm, 0, sizeof(tm));
    strptime("2001-11-12 18:31:01", "%Y-%m-%d %H:%M:%S", &tm);
    strftime(buf, sizeof(buf), "%d %b %Y %H:%M", &tm);
    puts(buf);
    exit(EXIT_SUCCESS);
}

SEE ALSO

time(2), getdate(3), scanf(3), setlocale(3), strftime(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2384 - Linux cli command tzset

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tzset and provides detailed information about the command tzset, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tzset.

NAME 🖥️ tzset 🖥️

initialize time conversion information

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <time.h>
void tzset(void);
extern char *tzname[2];
extern long timezone;
extern int daylight;

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

tzset():

    _POSIX_C_SOURCE

tzname:

    _POSIX_C_SOURCE

timezone, daylight:

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

DESCRIPTION

The tzset() function initializes the tzname variable from the TZ environment variable. This function is automatically called by the other time conversion functions that depend on the timezone. In a System-V-like environment, it will also set the variables timezone (seconds West of UTC) and daylight (to 0 if this timezone does not have any daylight saving time rules, or to nonzero if there is a time, past, present, or future when daylight saving time applies).

If the TZ variable does not appear in the environment, the system timezone is used. The system timezone is configured by copying, or linking, a file in the tzfile(5) format to /etc/localtime. A timezone database of these files may be located in the system timezone directory (see the FILES section below).

If the TZ variable does appear in the environment, but its value is empty, or its value cannot be interpreted using any of the formats specified below, then Coordinated Universal Time (UTC) is used.

The value of TZ can be one of two formats. The first format is a string of characters that directly represent the timezone to be used:

std offset[dst[offset][,start[/time],end[/time]]]

There are no spaces in the specification. The std string specifies an abbreviation for the timezone and must be three or more alphabetic characters. When enclosed between the less-than (<) and greater-than (>) signs, the character set is expanded to include the plus (+) sign, the minus (-) sign, and digits. The offset string immediately follows std and specifies the time value to be added to the local time to get Coordinated Universal Time (UTC). The offset is positive if the local timezone is west of the Prime Meridian and negative if it is east. The hour must be between 0 and 24, and the minutes and seconds 00 and 59:

[+|-]hh[:mm[:ss]]

The dst string and offset specify the name and offset for the corresponding daylight saving timezone. If the offset is omitted, it defaults to one hour ahead of standard time.

The start field specifies when daylight saving time goes into effect and the end field specifies when the change is made back to standard time. These fields may have the following formats:

Jn
This specifies the Julian day with n between 1 and 365. Leap days are not counted. In this format, February 29 can’t be represented; February 28 is day 59, and March 1 is always day 60.

n
This specifies the zero-based Julian day with n between 0 and 365. February 29 is counted in leap years.

Mm.w.d
This specifies day d (0 <= d <= 6) of week w (1 <= w <= 5) of month m (1 <= m <= 12). Week 1 is the first week in which day d occurs and week 5 is the last week in which day d occurs. Day 0 is a Sunday.

The time fields specify when, in the local time currently in effect, the change to the other time occurs. If omitted, the default is 02:00:00.

Here is an example for New Zealand, where the standard time (NZST) is 12 hours ahead of UTC, and daylight saving time (NZDT), 13 hours ahead of UTC, runs from the first Sunday in October to the third Sunday in March, and the changeovers happen at the default time of 02:00:00:

TZ="NZST-12:00:00NZDT-13:00:00,M10.1.0,M3.3.0"

The second format specifies that the timezone information should be read from a file:

:[filespec]

If the file specification filespec is omitted, or its value cannot be interpreted, then Coordinated Universal Time (UTC) is used. If filespec is given, it specifies another tzfile(5)-format file to read the timezone information from. If filespec does not begin with a ‘/’, the file specification is relative to the system timezone directory. If the colon is omitted each of the above TZ formats will be tried.

Here’s an example, once more for New Zealand:

TZ=":Pacific/Auckland"

ENVIRONMENT

TZ
If this variable is set its value takes precedence over the system configured timezone.

TZDIR
If this variable is set its value takes precedence over the system configured timezone database directory path.

FILES

/etc/localtime
The system timezone file.

/usr/share/zoneinfo/
The system timezone database directory.

/usr/share/zoneinfo/posixrules
When a TZ string includes a dst timezone without anything following it, then this file is used for the start/end rules. It is in the tzfile(5) format. By default, the zoneinfo Makefile hard links it to the America/New_York tzfile.

Above are the current standard file locations, but they are configurable when glibc is compiled.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tzset()

Thread safetyMT-Safe env locale

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4, 4.3BSD.

4.3BSD had a function char *timezone(zone, dst) that returned the name of the timezone corresponding to its first argument (minutes West of UTC). If the second argument was 0, the standard name was used, otherwise the daylight saving time version.

SEE ALSO

date(1), gettimeofday(2), time(2), ctime(3), getenv(3), tzfile(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2385 - Linux cli command getopt_long_only

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getopt_long_only and provides detailed information about the command getopt_long_only, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getopt_long_only.

NAME 🖥️ getopt_long_only 🖥️

Parse command-line options

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
int getopt(int argc, char *argv[],
 const char *optstring);
extern char *optarg;
extern int optind, opterr, optopt;
#include <getopt.h>
int getopt_long(int argc, char *argv[],
 const char *optstring,
 const struct option *longopts, int *longindex);
int getopt_long_only(int argc, char *argv[],
 const char *optstring,
 const struct option *longopts, int *longindex);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getopt():

    _POSIX_C_SOURCE >= 2 || _XOPEN_SOURCE

getopt_long(), getopt_long_only():

    _GNU_SOURCE

DESCRIPTION

The getopt() function parses the command-line arguments. Its arguments argc and argv are the argument count and array as passed to the main() function on program invocation. An element of argv that starts with ‘-’ (and is not exactly “-” or “–”) is an option element. The characters of this element (aside from the initial ‘-’) are option characters. If getopt() is called repeatedly, it returns successively each of the option characters from each of the option elements.

The variable optind is the index of the next element to be processed in argv. The system initializes this value to 1. The caller can reset it to 1 to restart scanning of the same argv, or when scanning a new argument vector.

If getopt() finds another option character, it returns that character, updating the external variable optind and a static variable nextchar so that the next call to getopt() can resume the scan with the following option character or argv-element.

If there are no more option characters, getopt() returns -1. Then optind is the index in argv of the first argv-element that is not an option.

optstring is a string containing the legitimate option characters. A legitimate option character is any visible one byte ascii(7) character (for which isgraph(3) would return nonzero) that is not ‘-’, ‘:’, or ‘;’. If such a character is followed by a colon, the option requires an argument, so getopt() places a pointer to the following text in the same argv-element, or the text of the following argv-element, in optarg. Two colons mean an option takes an optional arg; if there is text in the current argv-element (i.e., in the same word as the option name itself, for example, “-oarg”), then it is returned in optarg, otherwise optarg is set to zero. This is a GNU extension. If optstring contains W followed by a semicolon, then -W foo is treated as the long option –foo. (The -W option is reserved by POSIX.2 for implementation extensions.) This behavior is a GNU extension, not available with libraries before glibc 2.

By default, getopt() permutes the contents of argv as it scans, so that eventually all the nonoptions are at the end. Two other scanning modes are also implemented. If the first character of optstring is ‘+’ or the environment variable POSIXLY_CORRECT is set, then option processing stops as soon as a nonoption argument is encountered. If ‘+’ is not the first character of optstring, it is treated as a normal option. If POSIXLY_CORRECT behaviour is required in this case optstring will contain two ‘+’ symbols. If the first character of optstring is ‘-’, then each nonoption argv-element is handled as if it were the argument of an option with character code 1. (This is used by programs that were written to expect options and other argv-elements in any order and that care about the ordering of the two.) The special argument “–” forces an end of option-scanning regardless of the scanning mode.

While processing the option list, getopt() can detect two kinds of errors: (1) an option character that was not specified in optstring and (2) a missing option argument (i.e., an option at the end of the command line without an expected argument). Such errors are handled and reported as follows:

  • By default, getopt() prints an error message on standard error, places the erroneous option character in optopt, and returns ‘?’ as the function result.

  • If the caller has set the global variable opterr to zero, then getopt() does not print an error message. The caller can determine that there was an error by testing whether the function return value is ‘?’. (By default, opterr has a nonzero value.)

  • If the first character (following any optional ‘+’ or ‘-’ described above) of optstring is a colon (’:’), then getopt() likewise does not print an error message. In addition, it returns ‘:’ instead of ‘?’ to indicate a missing option argument. This allows the caller to distinguish the two different types of errors.

getopt_long() and getopt_long_only()

The getopt_long() function works like getopt() except that it also accepts long options, started with two dashes. (If the program accepts only long options, then optstring should be specified as an empty string (""), not NULL.) Long option names may be abbreviated if the abbreviation is unique or is an exact match for some defined option. A long option may take a parameter, of the form –arg=param or –arg param.

longopts is a pointer to the first element of an array of struct option declared in <getopt.h> as

struct option {
    const char *name;
    int         has_arg;
    int        *flag;
    int         val;
};

The meanings of the different fields are:

name
is the name of the long option.

has_arg
is: no_argument (or 0) if the option does not take an argument; required_argument (or 1) if the option requires an argument; or optional_argument (or 2) if the option takes an optional argument.

flag
specifies how results are returned for a long option. If flag is NULL, then getopt_long() returns val. (For example, the calling program may set val to the equivalent short option character.) Otherwise, getopt_long() returns 0, and flag points to a variable which is set to val if the option is found, but left unchanged if the option is not found.

val
is the value to return, or to load into the variable pointed to by flag.

The last element of the array has to be filled with zeros.

If longindex is not NULL, it points to a variable which is set to the index of the long option relative to longopts.

getopt_long_only() is like getopt_long(), but ‘-’ as well as “–” can indicate a long option. If an option that starts with ‘-’ (not “–”) doesn’t match a long option, but does match a short option, it is parsed as a short option instead.

RETURN VALUE

If an option was successfully found, then getopt() returns the option character. If all command-line options have been parsed, then getopt() returns -1. If getopt() encounters an option character that was not in optstring, then ‘?’ is returned. If getopt() encounters an option with a missing argument, then the return value depends on the first character in optstring: if it is ‘:’, then ‘:’ is returned; otherwise ‘?’ is returned.

getopt_long() and getopt_long_only() also return the option character when a short option is recognized. For a long option, they return val if flag is NULL, and 0 otherwise. Error and -1 returns are the same as for getopt(), plus ‘?’ for an ambiguous match or an extraneous parameter.

ENVIRONMENT

POSIXLY_CORRECT
If this is set, then option processing stops as soon as a nonoption argument is encountered.

_<PID>_GNU_nonoption_argv_flags_
This variable was used by bash(1) 2.0 to communicate to glibc which arguments are the results of wildcard expansion and so should not be considered as options. This behavior was removed in bash(1) 2.01, but the support remains in glibc.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getopt(), getopt_long(), getopt_long_only()

Thread safety

MT-Unsafe race:getopt env

VERSIONS

POSIX specifies that the argv array argument should be const, but these functions permute its elements unless the environment variable POSIXLY_CORRECT is set. const is used in the actual prototype to be compatible with other systems; however, this page doesn’t show the qualifier, to avoid confusing readers.

STANDARDS

getopt()
POSIX.1-2008.

getopt_long()
getopt_long_only()
GNU.

The use of ‘+’ and ‘-’ in optstring is a GNU extension.

HISTORY

getopt()
POSIX.1-2001, and POSIX.2.

On some older implementations, getopt() was declared in <stdio.h>. SUSv1 permitted the declaration to appear in either <unistd.h> or <stdio.h>. POSIX.1-1996 marked the use of <stdio.h> for this purpose as LEGACY. POSIX.1-2001 does not require the declaration to appear in <stdio.h>.

NOTES

A program that scans multiple argument vectors, or rescans the same vector more than once, and wants to make use of GNU extensions such as ‘+’ and ‘-’ at the start of optstring, or changes the value of POSIXLY_CORRECT between scans, must reinitialize getopt() by resetting optind to 0, rather than the traditional value of 1. (Resetting to 0 forces the invocation of an internal initialization routine that rechecks POSIXLY_CORRECT and checks for GNU extensions in optstring.)

Command-line arguments are parsed in strict order meaning that an option requiring an argument will consume the next argument, regardless of whether that argument is the correctly specified option argument or simply the next option (in the scenario the user mis-specifies the command line). For example, if optstring is specified as “1n:” and the user specifies the command line arguments incorrectly as prog -n -1, the -n option will be given the optarg value “-1”, and the -1 option will be considered to have not been specified.

EXAMPLES

getopt()

The following trivial example program uses getopt() to handle two program options: -n, with no associated value; and -t val, which expects an associated value.

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int
main(int argc, char *argv[])
{
    int flags, opt;
    int nsecs, tfnd;
    nsecs = 0;
    tfnd = 0;
    flags = 0;
    while ((opt = getopt(argc, argv, "nt:")) != -1) {
        switch (opt) {
        case 'n':
            flags = 1;
            break;
        case 't':
            nsecs = atoi(optarg);
            tfnd = 1;
            break;
        default: /* '?' */
            fprintf(stderr, "Usage: %s [-t nsecs] [-n] name

“, argv[0]); exit(EXIT_FAILURE); } } printf(“flags=%d; tfnd=%d; nsecs=%d; optind=%d “, flags, tfnd, nsecs, optind); if (optind >= argc) { fprintf(stderr, “Expected argument after options “); exit(EXIT_FAILURE); } printf(“name argument = %s “, argv[optind]); /* Other code omitted */ exit(EXIT_SUCCESS); }

getopt_long()

The following example program illustrates the use of getopt_long() with most of its features.

#include <getopt.h>
#include <stdio.h>     /* for printf */
#include <stdlib.h>    /* for exit */
int
main(int argc, char *argv[])
{
    int c;
    int digit_optind = 0;
    while (1) {
        int this_option_optind = optind ? optind : 1;
        int option_index = 0;
        static struct option long_options[] = {
            {"add",     required_argument, 0,  0 },
            {"append",  no_argument,       0,  0 },
            {"delete",  required_argument, 0,  0 },
            {"verbose", no_argument,       0,  0 },
            {"create",  required_argument, 0, 'c'},
            {"file",    required_argument, 0,  0 },
            {0,         0,                 0,  0 }
        };
        c = getopt_long(argc, argv, "abc:d:012",
                        long_options, &option_index);
        if (c == -1)
            break;
        switch (c) {
        case 0:
            printf("option %s", long_options[option_index].name);
            if (optarg)
                printf(" with arg %s", optarg);
            printf("

“); break; case ‘0’: case ‘1’: case ‘2’: if (digit_optind != 0 && digit_optind != this_option_optind) printf(“digits occur in two different argv-elements. “); digit_optind = this_option_optind; printf(“option %c “, c); break; case ‘a’: printf(“option a “); break; case ‘b’: printf(“option b “); break; case ‘c’: printf(“option c with value ‘%s’ “, optarg); break; case ’d’: printf(“option d with value ‘%s’ “, optarg); break; case ‘?’: break; default: printf(”?? getopt returned character code 0%o ?? “, c); } } if (optind < argc) { printf(“non-option ARGV-elements: “); while (optind < argc) printf("%s “, argv[optind++]); printf(” “); } exit(EXIT_SUCCESS); }

SEE ALSO

getopt(1), getsubopt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2386 - Linux cli command xdr_void

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_void and provides detailed information about the command xdr_void, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_void.

NAME 🖥️ xdr_void 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2387 - Linux cli command XtError

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtError and provides detailed information about the command XtError, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtError.

NAME 🖥️ XtError 🖥️

low-level error handlers

SYNTAX

#include <X11/Intrinsic.h>

void XtError(const char *message);

void XtSetErrorHandler(XtErrorHandler handler);

void XtSetWarningHandler(XtErrorHandler handler);

void XtWarning(const char *message);

ARGUMENTS

message
Specifies the nonfatal error message that is to be reported.

handler
Specifies the new fatal error procedure, which should not return, or the nonfatal error procedure, which usually returns.

message
Specifies the message that is to be reported.

DESCRIPTION

The XtError function has been superceded by XtAppError.

The XtSetErrorHandler function has been superceded by XtAppSetErrorHandler.

The XtSetWarningHandler function has been superceded by XtAppSetWarningHandler.

The XtWarning function has been superceded by XtAppWarning.

SEE ALSO

XtAppError(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2388 - Linux cli command getutent_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getutent_r and provides detailed information about the command getutent_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getutent_r.

NAME 🖥️ getutent_r 🖥️

access utmp file entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <utmp.h>
struct utmp *getutent(void);
struct utmp *getutid(const struct utmp *ut);
struct utmp *getutline(const struct utmp *ut);
struct utmp *pututline(const struct utmp *ut);
void setutent(void);
void endutent(void);
int utmpname(const char *file);

DESCRIPTION

New applications should use the POSIX.1-specified “utmpx” versions of these functions; see STANDARDS.

utmpname() sets the name of the utmp-format file for the other utmp functions to access. If utmpname() is not used to set the filename before the other functions are used, they assume _PATH_UTMP, as defined in <paths.h>.

setutent() rewinds the file pointer to the beginning of the utmp file. It is generally a good idea to call it before any of the other functions.

endutent() closes the utmp file. It should be called when the user code is done accessing the file with the other functions.

getutent() reads a line from the current file position in the utmp file. It returns a pointer to a structure containing the fields of the line. The definition of this structure is shown in utmp(5).

getutid() searches forward from the current file position in the utmp file based upon ut. If ut->ut_type is one of RUN_LVL, BOOT_TIME, NEW_TIME, or OLD_TIME, getutid() will find the first entry whose ut_type field matches ut->ut_type. If ut->ut_type is one of INIT_PROCESS, LOGIN_PROCESS, USER_PROCESS, or DEAD_PROCESS, getutid() will find the first entry whose ut_id field matches ut->ut_id.

getutline() searches forward from the current file position in the utmp file. It scans entries whose ut_type is USER_PROCESS or LOGIN_PROCESS and returns the first one whose ut_line field matches ut->ut_line.

pututline() writes the utmp structure ut into the utmp file. It uses getutid() to search for the proper place in the file to insert the new entry. If it cannot find an appropriate slot for ut, pututline() will append the new entry to the end of the file.

RETURN VALUE

getutent(), getutid(), and getutline() return a pointer to a struct utmp on success, and NULL on failure (which includes the “record not found” case). This struct utmp is allocated in static storage, and may be overwritten by subsequent calls.

On success pututline() returns ut; on failure, it returns NULL.

utmpname() returns 0 if the new name was successfully stored, or -1 on failure.

On failure, these functions errno set to indicate the error.

ERRORS

ENOMEM
Out of memory.

ESRCH
Record not found.

setutent(), pututline(), and the getut*() functions can also fail for the reasons described in open(2).

FILES

/var/run/utmp
database of currently logged-in users

/var/log/wtmp
database of past user logins

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getutent()

Thread safety

MT-Unsafe init race:utent race:utentbuf sig:ALRM timer

getutid(), getutline()

Thread safety

MT-Unsafe init race:utent sig:ALRM timer

pututline()

Thread safety

MT-Unsafe race:utent sig:ALRM timer

setutent(), endutent(), utmpname()

Thread safetyMT-Unsafe race:utent

In the above table, utent in race:utent signifies that if any of the functions setutent(), getutent(), getutid(), getutline(), pututline(), utmpname(), or endutent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

None.

HISTORY

XPG2, SVr4.

In XPG2 and SVID 2 the function pututline() is documented to return void, and that is what it does on many systems (AIX, HP-UX). HP-UX introduces a new function _pututline() with the prototype given above for pututline().

All these functions are obsolete now on non-Linux systems. POSIX.1-2001 and POSIX.1-2008, following SUSv1, does not have any of these functions, but instead uses

#include <utmpx.h> struct utmpx *getutxent(void); struct utmpx *getutxid(const struct utmpx *); struct utmpx *getutxline(const struct utmpx *); struct utmpx *pututxline(const struct utmpx *); void setutxent(void); void endutxent(void);

These functions are provided by glibc, and perform the same task as their equivalents without the “x”, but use struct utmpx, defined on Linux to be the same as struct utmp. For completeness, glibc also provides utmpxname(), although this function is not specified by POSIX.1.

On some other systems, the utmpx structure is a superset of the utmp structure, with additional fields, and larger versions of the existing fields, and parallel files are maintained, often /var/*/utmpx and /var/*/wtmpx.

Linux glibc on the other hand does not use a parallel utmpx file since its utmp structure is already large enough. The “x” functions listed above are just aliases for their counterparts without the “x” (e.g., getutxent() is an alias for getutent()).

NOTES

glibc notes

The above functions are not thread-safe. glibc adds reentrant versions

#include <utmp.h>
int getutent_r(struct utmp *ubuf, struct utmp **ubufp);
int getutid_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);
int getutline_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getutent_r(), getutid_r(), getutline_r():

    _GNU_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */    _SVID_SOURCE || _BSD_SOURCE

These functions are GNU extensions, analogs of the functions of the same name without the _r suffix. The ubuf argument gives these functions a place to store their result. On success, they return 0, and a pointer to the result is written in *ubufp. On error, these functions return -1. There are no utmpx equivalents of the above functions. (POSIX.1 does not specify such functions.)

EXAMPLES

The following example adds and removes a utmp record, assuming it is run from within a pseudo terminal. For usage in a real application, you should check the return values of getpwuid(3) and ttyname(3).

#include <pwd.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <utmp.h>
int
main(void)
{
    struct utmp entry;
    system("echo before adding entry:;who");
    entry.ut_type = USER_PROCESS;
    entry.ut_pid = getpid();
    strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen("/dev/"));
    /* only correct for ptys named /dev/tty[pqr][0-9a-z] */
    strcpy(entry.ut_id, ttyname(STDIN_FILENO) + strlen("/dev/tty"));
    entry.ut_time = time(NULL);
    strcpy(entry.ut_user, getpwuid(getuid())->pw_name);
    memset(entry.ut_host, 0, UT_HOSTSIZE);
    entry.ut_addr = 0;
    setutent();
    pututline(&entry);
    system("echo after adding entry:;who");
    entry.ut_type = DEAD_PROCESS;
    memset(entry.ut_line, 0, UT_LINESIZE);
    entry.ut_time = 0;
    memset(entry.ut_user, 0, UT_NAMESIZE);
    setutent();
    pututline(&entry);
    system("echo after removing entry:;who");
    endutent();
    exit(EXIT_SUCCESS);
}

SEE ALSO

getutmp(3), utmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2389 - Linux cli command Net_DNS_SEC_Keysetpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_SEC_Keysetpm and provides detailed information about the command Net_DNS_SEC_Keysetpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_SEC_Keysetpm.

NAME 🖥️ Net_DNS_SEC_Keysetpm 🖥️

DNSSEC Keyset object class

SYNOPSIS

use Net::DNS::SEC::Keyset;

DESCRIPTION

A keyset is an “administrative” unit used for DNSSEC maintenance.

This class provides interfaces for creating, reading and writing keysets.

Object methods are provided to extract DNSKEY, RRSIG and DS records.

Note that this class is still being developed. Attributes and methods are subject to change.

new (from file)

$keyset = Net::DNS::SEC::Keyset->new( $filename ); $keyset = Net::DNS::SEC::Keyset->new( $filename, $directory ); die Net::DNS::SEC::Keyset->keyset_err unless $keyset;

Constructor method which reads the specified keyset file and returns a keyset object.

The optional second argument specifies the filename base directory.

Sets keyset_err and returns undef on failure.

new (by signing keys)

$keyset = Net::DNS::SEC::Keyset->new( [@keyrr], $privatekeypath ); die Net::DNS::SEC::Keyset->keyset_err unless $keyset;

Creates a keyset object from the keys provided through the reference to an array of Net::DNS::RR::DNSKEY objects.

The method will create and self-sign the whole keyset. The private keys as generated by the BIND dnssec-keygen tool are assumed to be in the current directory or, if specified, the directory indicated by $privatekeypath.

Sets keyset_err and returns undef on failure.

new (from key and sig RRsets)

$keyset = Net::DNS::Keyset->new( [@keyrr], [@sigrr] ); die Net::DNS::SEC::Keyset->keyset_err unless $keyset;

Creates a keyset object from the keys provided through the references to arrays of Net::DNS::RR::DNSKEY and Net::DNS::RR::RRSIG objects.

Sets keyset_err and returns undef on failure.

new (from Packet)

$resolver = Net::DNS::Resolver->new; $resolver->dnssec(1); $reply = $res->send ( “example.com”, “DNSKEY” ); $keyset = Net::DNS::SEC::Keyset->new( $reply ); die Net::DNS::SEC::Keyset->keyset_err unless $keyset;

Creates a keyset object from a Net::DNS::Packet that contains the answer to a query for key records at the zone apex.

This is the method you should use for automatically fetching keys.

Sets keyset_err and returns undef on failure.

keys

@keyrr = $keyset->keys;

Returns an array of Net::DNS::RR::DNSKEY objects.

sigs

@sigrr = $keyset->sigs;

Returns an array of Net::DNS::RR::RRSIG objects.

extract_ds

@ds = $keyset->extract_ds(); # default SHA-1 @ds = $keyset->extract_ds( digtype => SHA-256 ); die Net::DNS::SEC::Keyset->keyset_err unless @ds;

Extracts DS records from the keyset. Note that the keyset will be verified during extraction. All keys will need to have a valid self-signature.

The method sets keyset_err if verification fails.

verify

@keytags = $keyset->verify(); die Net::DNS::SEC::Keyset->keyset_err unless @keytags; $keyset->verify( $keytag ) || die $keyset->keyset_err;

If no arguments are given:

  • Verifies if all signatures present verify the keyset.

  • Verifies if there are DNSKEYs with the SEP flag set, there is at least one RRSIG made using that key.

  • Verifies that if there are no DNSKEYs with the SEP flag set there is at least one RRSIG made with one of the keys from the keyset.

If an argument is given, it is should be the numeric keytag of the key in the keyset which will be verified using the corresponding RRSIG.

The method returns a list of keytags of verified keys in the keyset.

The method sets keyset_err and returns empty list if verification fails.

keyset_err

$keyset_err = Net::DNS::SEC::Keyset->keyset_err;

Returns the keyset error string.

string

$string = $keyset->string;

Returns a string representation of the keyset.

print

$keyset->print; # similar to print( $keyset->string )

Prints the keyset.

writekeyset

$keyset->writekeyset; $keyset->writekeyset( $path ); $keyset->writekeyset( $prefix ); $keyset->writekeyset( $prefix, $path );

Writes the keyset to a file named “keyset-<domain>.” in the current working directory or directory defined by the optional $path argument.

The optional $prefix argument specifies the prefix that will be prepended to the domain name to form the keyset filename.

COPYRIGHT

Copyright (c)2002 RIPE NCC. Author Olaf M. Kolkman

Portions Copyright (c)2014 Dick Franks

All Rights Reserved

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2390 - Linux cli command NetSNMP_OIDpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command NetSNMP_OIDpm and provides detailed information about the command NetSNMP_OIDpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the NetSNMP_OIDpm.

NAME 🖥️ NetSNMP_OIDpm 🖥️

Perl extension for manipulating OIDs

SYNOPSIS

use NetSNMP::OID; my $oid = new NetSNMP::OID(sysContact.0); if ($oid < new NetSNMP::OID(ifTable)) { do_something(); } my @numarray = $oid->to_array(); # appending oids $oid = new NetSNMP::OID(.1.3); $oid += “.6.1”; # -> .1.3.6.1 # appending index strings $oid2 = $oid + “\wes"; # -> .1.3.6.1.3.119.101.115 $oid3 = $oid + “\wes; # -> .1.3.6.1.119.101.115 $len = $oid3->length(); # -> 7 # retrieving indexes from an oid: $arrayref = $tableoid->get_indexes()

DESCRIPTION

The NetSNMP::OID module is a simple wrapper around a C-based net-snmp oid (which is an array of unsigned integers). The OID is internally stored as a C array of integers for speed purposes when doing comparisons, etc.

The standard logical expression operators (<, >, ==, …) are overloaded such that lexographical comparisons may be done with them.

The + operator is overloaded to allow you to append stuff on to the end of a OID, like index segments of a table, for example.

EXPORT

int snmp_oid_compare(oid1, oid2) int compare(oid1, oid2)

AUTHOR

Wes Hardaker, <[email protected]>

SEE ALSO

SNMP, perl.

Copyright

Copyright (c) 2002 Networks Associates Technology, Inc. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2391 - Linux cli command XtCallbackExclusive

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtCallbackExclusive and provides detailed information about the command XtCallbackExclusive, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtCallbackExclusive.

NAME 🖥️ XtCallbackExclusive 🖥️

map a pop-up

SYNTAX

#include <X11/Intrinsic.h>

void XtPopup(Widget popup_shell, XtGrabKind grab_kind);

void XtPopupSpringLoaded(Widget popup_shell);

void XtCallbackNone(Widget w, XtPointer client_data, XtPointer call_data);

void XtCallbackNonexclusive(Widget w, XtPointer client_data, XtPointer call_data);

void XtCallbackExclusive(Widget w, XtPointer client_data, XtPointer call_data);

ACTIONS

void XtMenuPopup(String shell_name);

ARGUMENTS

call_data
Specifies the callback data, which is not used by this procedure.

client_data
Specifies the pop-up shell.

grab_kind
Specifies the way in which user events should be constrained.

popup_shell
Specifies the widget shell.

  1. Specifies the widget.

DESCRIPTION

The XtPopup function performs the following:

  • Calls XtCheckSubclass to ensure popup_shell is a subclass of Shell.

  • Generates an error if the shell’s popped_up field is already True.

  • Calls the callback procedures on the shell’s popup_callback list.

  • Sets the shell popped_up field to True, the shell spring_loaded field to False, and the shell grab_kind field from grab_kind.

  • If the shell’s create_popup_child field is non-NULL, XtPopup calls it with popup_shell as the parameter.

  • If grab_kind is either XtGrabNonexclusive or XtGrabExclusive, it calls:

XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), False)

  • Calls XtRealizeWidget with popup_shell specified.

  • Calls XMapWindow with popup_shell specified.

The XtPopupSpringLoaded function performs exactly as XtPopup except that it sets the shell spring_loaded field to True and always calls XtAddGrab with exclusive True and spring_loaded True.

The XtCallbackNone, XtCallbackNonexclusive, and XtCallbackExclusive functions call XtPopup with the shell specified by the client data argument and grab_kind set as the name specifies. XtCallbackNone, XtCallbackNonexclusive, and XtCallbackExclusive specify XtGrabNone, XtGrabNonexclusive, and XtGrabExclusive, respectively. Each function then sets the widget that executed the callback list to be insensitive by using XtSetSensitive. Using these functions in callbacks is not required. In particular, an application must provide customized code for callbacks that create pop-up shells dynamically or that must do more than desensitizing the button.

XtMenuPopup is known to the translation manager, which must perform special actions for spring-loaded pop-ups. Calls to XtMenuPopup in a translation specification are mapped into calls to a nonexported action procedure, and the translation manager fills in parameters based on the event specified on the left-hand side of a translation.

If XtMenuPopup is invoked on ButtonPress (possibly with modifiers), the translation manager pops up the shell with grab_kind set to XtGrabExclusive and spring_loaded set to True. If XtMenuPopup is invoked on EnterWindow (possibly with modifiers), the translation manager pops up the shell with grab_kind set to XtGrabNonexclusive and spring_loaded set to False. Otherwise, the translation manager generates an error. When the widget is popped up, the following actions occur:

  • Calls XtCheckSubclass to ensure popup_shell is a subclass of Shell.

  • Generates an error if the shell’s popped_up field is already True.

  • Calls the callback procedures on the shell’s popup_callback list.

  • Sets the shell popped_up field to True and the shell grab_kind and spring_loaded fields appropriately.

  • If the shell’s create_popup_child field is non-NULL, it is called with popup_shell as the parameter.

  • Calls:

XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), spring_loaded)

  • Calls XtRealizeWidget with popup_shell specified.

  • Calls XMapWindow with popup_shell specified.

(Note that these actions are the same as those for XtPopup.) XtMenuPopup tries to find the shell by searching the widget tree starting at the parent of the widget in which it is invoked. If it finds a shell with the specified name in the pop-up children of that parent, it pops up the shell with the appropriate parameters. Otherwise, it moves up the parent chain as needed. If XtMenuPopup gets to the application widget and cannot find a matching shell, it generates an error.

SEE ALSO

XtCreatePopupShell(3), XtPopdown(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2392 - Linux cli command XtIsManaged

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtIsManaged and provides detailed information about the command XtIsManaged, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtIsManaged.

NAME 🖥️ XtIsManaged 🖥️

manage and unmanage children

SYNTAX

#include <X11/Intrinsic.h>

typedef Widget *WidgetList;

void XtManageChildren(WidgetList children, Cardinal num_children);

void XtManageChild(Widget child);

void XtUnmanageChildren(WidgetList children, Cardinal num_children);

void XtUnmanageChild(Widget child);

void XtChangeManagedSet(WidgetList unmanage_children, Cardinal num_unmanage_children, XtDoChangeProc do_change_proc, XtPointer client_data, WidgetList manage_children, Cardinal num_manage_children);

Boolean XtIsManaged(Widget widget);

ARGUMENTS

child
Specifies the child.

children
Specifies a list of child widgets.

num_children
Specifies the number of children.

widget
Specifies the widget.

manage_children
Specifies the list of widget children to add to the managed set.

num_manage_children
Specifies the number of entries in the manage_children list.

unmanage_children
Specifies the list of widget children to remove from the managed set.

num_unmanage_children
Specifies the number of entries in the unmanage_children list.

do_change_proc
Specifies the post unmanage, pre manage hook procedure to invoke.

client_data
Specifies the client data to be passed to the hook procedure.

DESCRIPTION

The XtManageChildren function performs the following:

  • Issues an error if the children do not all have the same parent or if the parent is not a subclass of compositeWidgetClass.

  • Returns immediately if the common parent is being destroyed; otherwise, for each unique child on the list, XtManageChildren ignores the child if it already is managed or is being destroyed and marks it if not.

  • If the parent is realized and after all children have been marked, it makes some of the newly managed children viewable:

    • Calls the change_managed routine of the widgets’ parent.

    • Calls XtRealizeWidget on each previously unmanaged child that is unrealized.

    • Maps each previously unmanaged child that has map_when_managed True.

Managing children is independent of the ordering of children and independent of creating and deleting children. The layout routine of the parent should consider children whose managed field is True and should ignore all other children. Note that some composite widgets, especially fixed boxes, call XtManageChild from their insert_child procedure.

If the parent widget is realized, its change_managed procedure is called to notify it that its set of managed children has changed. The parent can reposition and resize any of its children. It moves each child as needed by calling XtMoveWidget, which first updates the x and y fields and then calls XMoveWindow if the widget is realized.

The XtManageChild function constructs a WidgetList of length one and calls XtManageChildren.

The XtUnmanageChildren function performs the following:

  • Issues an error if the children do not all have the same parent or if the parent is not a subclass of compositeWidgetClass.

  • Returns immediately if the common parent is being destroyed; otherwise, for each unique child on the list, XtUnmanageChildren performs the following:

    • Ignores the child if it already is unmanaged or is being destroyed and marks it if not.

    • If the child is realized, it makes it nonvisible by unmapping it.

  • Calls the change_managed routine of the widgets’ parent after all children have been marked if the parent is realized.

XtUnmanageChildren does not destroy the children widgets. Removing widgets from a parent’s managed set is often a temporary banishment, and, some time later, you may manage the children again.

The XtUnmanageChild function constructs a widget list of length one and calls XtUnmanageChildren.

The XtChangeManagedSet function performs the following:

  • Issues an error if the widgets specified in the manage_children and the unmanage_children lists to no all have the same parent, or if that parent is not a subclass of compositeWidgetClass.

  • Returns immediately if the common parent is being destroyed.

  • If no CompositeClassExtension is defined, or a CompositeClassExtension is defined but with an allows_change_managed_set field with a value of False, and XtChangeManagedSet was invoked with a non-NULL do_change_proc procedure then XtChangeManagedSet performs the following:

    • Calls XtUnmanageChildren (unmanage_children, num_unmanage_children).

    • Calls the do_change_proc specified.

    • Calls XtManageChildren (manage_children, num_manage_children) and then returns immediately.

  • Otherwise, if a CompositeClassExtension is defined with an allows_change_managed_set field with a value of True, or if no CompositeClassExtension is defined, and XtChangeManagedSet was invoked with a NULL do_change_proc procedure, then the following is performed:

    • For each child on the unmanage_children list; if the child is already unmanaged or is being destroyed it is ignored, otherwise it is marked as being unmanaged and if it is realized it is made nonvisible by being unmapped.

    • If the do_change_proc procedure is non-NULL then it is invoked as specified.

    • For each child on the manage_children list; if the child is already managed or it is being destroyed it is ignored, otherwise it is marked as managed

  • If the parent is realized and after all children have been marked, the change_managed method of the parent is invoked and subsequently some of the newly managed children are made viewable by:

    • Calling XtRealizeWidget on each of the previously unmanaged child that is unrealized.

    • Mapping each previously unmanaged child that has map_when_managed True.

The XtIsManaged function returns True if the specified widget is of class RectObj or any subclass thereof and is managed, or False otherwise.

SEE ALSO

XtMapWidget(3), XtRealizeWidget(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2393 - Linux cli command getipnodebyname

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getipnodebyname and provides detailed information about the command getipnodebyname, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getipnodebyname.

NAME 🖥️ getipnodebyname 🖥️

get network hostnames and addresses

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
[[deprecated]] struct hostent *getipnodebyname(const char *name, int af,
 int flags, int *error_num);
[[deprecated]] struct hostent *getipnodebyaddr(const void addr[.len],
 size_t len, int af,
 int *error_num);
[[deprecated]] void freehostent(struct hostent *ip);

DESCRIPTION

These functions are deprecated (and unavailable in glibc). Use getaddrinfo(3) and getnameinfo(3) instead.

The getipnodebyname() and getipnodebyaddr() functions return the names and addresses of a network host. These functions return a pointer to the following structure:

struct hostent {
    char  *h_name;
    char **h_aliases;
    int    h_addrtype;
    int    h_length;
    char **h_addr_list;
};

These functions replace the gethostbyname(3) and gethostbyaddr(3) functions, which could access only the IPv4 network address family. The getipnodebyname() and getipnodebyaddr() functions can access multiple network address families.

Unlike the gethostby functions, these functions return pointers to dynamically allocated memory. The freehostent() function is used to release the dynamically allocated memory after the caller no longer needs the hostent structure.

getipnodebyname() arguments

The getipnodebyname() function looks up network addresses for the host specified by the name argument. The af argument specifies one of the following values:

AF_INET
The name argument points to a dotted-quad IPv4 address or a name of an IPv4 network host.

AF_INET6
The name argument points to a hexadecimal IPv6 address or a name of an IPv6 network host.

The flags argument specifies additional options. More than one option can be specified by bitwise OR-ing them together. flags should be set to 0 if no options are desired.

AI_V4MAPPED
This flag is used with AF_INET6 to request a query for IPv4 addresses instead of IPv6 addresses; the IPv4 addresses will be mapped to IPv6 addresses.

AI_ALL
This flag is used with AI_V4MAPPED to request a query for both IPv4 and IPv6 addresses. Any IPv4 address found will be mapped to an IPv6 address.

AI_ADDRCONFIG
This flag is used with AF_INET6 to further request that queries for IPv6 addresses should not be made unless the system has at least one IPv6 address assigned to a network interface, and that queries for IPv4 addresses should not be made unless the system has at least one IPv4 address assigned to a network interface. This flag may be used by itself or with the AI_V4MAPPED flag.

AI_DEFAULT
This flag is equivalent to (AI_ADDRCONFIG | AI_V4MAPPED).

getipnodebyaddr() arguments

The getipnodebyaddr() function looks up the name of the host whose network address is specified by the addr argument. The af argument specifies one of the following values:

AF_INET
The addr argument points to a struct in_addr and len must be set to sizeof(struct in_addr).

AF_INET6
The addr argument points to a struct in6_addr and len must be set to sizeof(struct in6_addr).

RETURN VALUE

NULL is returned if an error occurred, and error_num will contain an error code from the following list:

HOST_NOT_FOUND
The hostname or network address was not found.

NO_ADDRESS
The domain name server recognized the network address or name, but no answer was returned. This can happen if the network host has only IPv4 addresses and a request has been made for IPv6 information only, or vice versa.

NO_RECOVERY
The domain name server returned a permanent failure response.

TRY_AGAIN
The domain name server returned a temporary failure response. You might have better luck next time.

A successful query returns a pointer to a hostent structure that contains the following fields:

h_name
This is the official name of this network host.

h_aliases
This is an array of pointers to unofficial aliases for the same host. The array is terminated by a null pointer.

h_addrtype
This is a copy of the af argument to getipnodebyname() or getipnodebyaddr(). h_addrtype will always be AF_INET if the af argument was AF_INET. h_addrtype will always be AF_INET6 if the af argument was AF_INET6.

h_length
This field will be set to sizeof(struct in_addr) if h_addrtype is AF_INET, and to sizeof(struct in6_addr) if h_addrtype is AF_INET6.

h_addr_list
This is an array of one or more pointers to network address structures for the network host. The array is terminated by a null pointer.

STANDARDS

None.

HISTORY

RFC 2553.

Present in glibc 2.1.91-95, but removed again. Several UNIX-like systems support them, but all call them deprecated.

SEE ALSO

getaddrinfo(3), getnameinfo(3), inet_ntop(3), inet_pton(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2394 - Linux cli command rpc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command rpc and provides detailed information about the command rpc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the rpc.

NAME 🖥️ rpc 🖥️

library routines for remote procedure calls

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client.

To take use of these routines, include the header file <rpc/rpc.h>.

The prototypes below make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *, …); typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddr);

See the header files for the declarations of the AUTH, CLIENT, SVCXPRT, and XDR types.

void auth_destroy(AUTH *auth);

A macro that destroys the authentication information associated with auth. Destruction usually involves deallocation of private data structures. The use of auth is undefined after calling auth_destroy().

AUTH *authnone_create(void);

Create and return an RPC authentication handle that passes nonusable authentication information with each remote procedure call. This is the default authentication used by RPC.

AUTH *authunix_create(char *host, uid_t uid, gid_t gid,
 int len, gid_t aup_gids[.len]);

Create and return an RPC authentication handle that contains authentication information. The parameter host is the name of the machine on which the information was created; uid is the user’s user ID; gid is the user’s current group ID; len and aup_gids refer to a counted array of groups to which the user belongs. It is easy to impersonate a user.

AUTH *authunix_create_default(void);

Calls authunix_create() with the appropriate parameters.

int callrpc(char *host, unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, const char *in,
 xdrproc_t outproc, char *out);

Call the remote procedure associated with prognum, versnum, and procnum on the machine, host. The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results. This routine returns zero if it succeeds, or the value of enum clnt_stat cast to an integer if it fails. The routine clnt_perrno() is handy for translating failure statuses into messages.

Warning: calling remote procedures with this routine uses UDP/IP as a transport; see clntudp_create() for restrictions. You do not have control of timeouts or authentication using this routine.

enum clnt_stat clnt_broadcast(unsigned long prognum,
 unsigned long versnum, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 resultproc_t eachresult);

Like callrpc(), except the call message is broadcast to all locally connected broadcast nets. Each time it receives a response, this routine calls eachresult(), whose form is:

eachresult(char *out, struct sockaddr_in *addr);

where out is the same as out passed to clnt_broadcast(), except that the remote procedure’s output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns zero, clnt_broadcast() waits for more replies; otherwise it returns with appropriate status.

Warning: broadcast sockets are limited in size to the maximum transfer unit of the data link. For ethernet, this value is 1500 bytes.

enum clnt_stat clnt_call(CLIENT *clnt, unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout);

A macro that calls the remote procedure procnum associated with the client handle, clnt, which is obtained with an RPC client creation routine such as clnt_create(). The parameter in is the address of the procedure’s argument(s), and out is the address of where to place the result(s); inproc is used to encode the procedure’s parameters, and outproc is used to decode the procedure’s results; tout is the time allowed for results to come back.

clnt_destroy(CLIENT *clnt);

A macro that destroys the client’s RPC handle. Destruction usually involves deallocation of private data structures, including clnt itself. Use of clnt is undefined after calling clnt_destroy(). If the RPC library opened the associated socket, it will close it also. Otherwise, the socket remains open.

CLIENT *clnt_create(const char *host, unsigned long prog,
 unsigned long vers, const char *proto);

Generic client creation routine. host identifies the name of the remote host where the server is located. proto indicates which kind of transport protocol to use. The currently supported values for this field are “udp” and “tcp”. Default timeouts are set, but can be modified using clnt_control().

Warning: using UDP has its shortcomings. Since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

bool_t clnt_control(CLIENT *cl, int req, char *info);

A macro used to change or retrieve various information about a client object. req indicates the type of operation, and info is a pointer to the information. For both UDP and TCP, the supported values of req and their argument types and what they do are:

CLSET_TIMEOUT  struct timeval // set total timeout
CLGET_TIMEOUT  struct timeval // get total timeout

Note: if you set the timeout using clnt_control(), the timeout parameter passed to clnt_call() will be ignored in all future calls.

CLGET_SERVER_ADDR  struct sockaddr_in
                // get server's address

The following operations are valid for UDP only:

CLSET_RETRY_TIMEOUT  struct timeval // set the retry timeout
CLGET_RETRY_TIMEOUT  struct timeval // get the retry timeout

The retry timeout is the time that “UDP RPC” waits for the server to reply before retransmitting the request.

clnt_freeres(CLIENT * clnt, xdrproc_t outproc, char *out);

A macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. The parameter out is the address of the results, and outproc is the XDR routine describing the results. This routine returns one if the results were successfully freed, and zero otherwise.

void clnt_geterr(CLIENT *clnt, struct rpc_err *errp);

A macro that copies the error structure out of the client handle to the structure at address errp.

void clnt_pcreateerror(const char *s);

Print a message to standard error indicating why a client RPC handle could not be created. The message is prepended with string s and a colon. Used when a clnt_create(), clntraw_create(), clnttcp_create(), or clntudp_create() call fails.

void clnt_perrno(enum clnt_stat stat);

Print a message to standard error corresponding to the condition indicated by stat. Used after callrpc().

clnt_perror(CLIENT *clnt, const char *s);

Print a message to standard error indicating why an RPC call failed; clnt is the handle used to do the call. The message is prepended with string s and a colon. Used after clnt_call().

char *clnt_spcreateerror(const char *s);

Like clnt_pcreateerror(), except that it returns a string instead of printing to the standard error.

Bugs: returns pointer to static data that is overwritten on each call.

char *clnt_sperrno(enum clnt_stat stat);

Take the same arguments as clnt_perrno(), but instead of sending a message to the standard error indicating why an RPC call failed, return a pointer to a string which contains the message. The string ends with a NEWLINE.

clnt_sperrno() is used instead of clnt_perrno() if the program does not have a standard error (as a program running as a server quite likely does not), or if the programmer does not want the message to be output with printf(3), or if a message format different than that supported by clnt_perrno() is to be used. Note: unlike clnt_sperror() and clnt_spcreateerror(), clnt_sperrno() returns pointer to static data, but the result will not get overwritten on each call.

char *clnt_sperror(CLIENT *rpch, const char *s);

Like clnt_perror(), except that (like clnt_sperrno()) it returns a string instead of printing to standard error.

Bugs: returns pointer to static data that is overwritten on each call.

CLIENT *clntraw_create(unsigned long prognum",unsignedlong"versnum);

This routine creates a toy RPC client for the remote program prognum, version versnum. The transport used to pass messages to the service is actually a buffer within the process’s address space, so the corresponding RPC server should live in the same address space; see svcraw_create(). This allows simulation of RPC and acquisition of RPC overheads, such as round trip times, without any kernel interference. This routine returns NULL if it fails.

CLIENT *clnttcp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 int *sockp, unsigned int sendsz",unsignedint"recvsz);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses TCP/IP as a transport. The remote program is located at Internet address *addr. If addr->sin_port is zero, then it is set to the actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. Since TCP-based RPC uses buffered I/O, the user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of zero choose suitable defaults. This routine returns NULL if it fails.

CLIENT *clntudp_create(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp);

This routine creates an RPC client for the remote program prognum, version versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

Warning: since UDP-based RPC messages can hold only up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.

CLIENT *clntudp_bufcreate(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 struct timeval wait, int *sockp,
 unsigned int sendsize, unsigned int recosize);

This routine creates an RPC client for the remote program prognum, on versnum; the client uses use UDP/IP as a transport. The remote program is located at Internet address addr. If addr->sin_port is zero, then it is set to actual port that the remote program is listening on (the remote portmap service is consulted for this information). The parameter sockp is a socket; if it is RPC_ANYSOCK, then this routine opens a new one and sets sockp. The UDP transport resends the call message in intervals of wait time until a response is received or until the call times out. The total time for the call to time out is specified by clnt_call().

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

void get_myaddress(struct sockaddr_in *addr);

Stuff the machine’s IP address into *addr, without consulting the library routines that deal with /etc/hosts. The port number is always set to htons(PMAPPORT).

struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);

A user interface to the portmap service, which returns a list of the current RPC program-to-port mappings on the host located at IP address *addr. This routine can return NULL. The command rpcinfo -p uses this routine.

unsigned short pmap_getport(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned int protocol);

A user interface to the portmap service, which returns the port number on which waits a service that supports program number prognum, version versnum, and speaks the transport protocol associated with protocol. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. A return value of zero means that the mapping does not exist or that the RPC system failed to contact the remote portmap service. In the latter case, the global variable rpc_createerr contains the RPC status.

enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr,
 unsigned long prognum, unsigned long versnum,
 unsigned long procnum,
 xdrproc_t inproc, char *in,
 xdrproc_t outproc, char *out,
 struct timeval tout, unsigned long *portp);

A user interface to the portmap service, which instructs portmap on the host at IP address *addr to make an RPC call on your behalf to a procedure on that host. The parameter *portp will be modified to the program’s port number if the procedure succeeds. The definitions of other parameters are discussed in callrpc() and clnt_call(). This procedure should be used for a “ping” and nothing else. See also clnt_broadcast().

bool_t pmap_set(unsigned long prognum, unsigned long versnum,
 int protocol, unsigned short port);

A user interface to the portmap service, which establishes a mapping between the triple [prognum,versnum,protocol] and port on the machine’s portmap service. The value of protocol is most likely IPPROTO_UDP or IPPROTO_TCP. This routine returns one if it succeeds, zero otherwise. Automatically done by svc_register().

bool_t pmap_unset(unsigned long prognum, unsigned long versnum);

A user interface to the portmap service, which destroys all mapping between the triple [prognum,versnum,*] and ports on the machine’s portmap service. This routine returns one if it succeeds, zero otherwise.

int registerrpc(unsigned long prognum, unsigned long versnum,
 unsigned long procnum, char *(*procname)(char *),
 xdrproc_t inproc, xdrproc_t outproc);

Register procedure procname with the RPC service package. If a request arrives for program prognum, version versnum, and procedure procnum, procname is called with a pointer to its parameter(s); procname should return a pointer to its static result(s); inproc is used to decode the parameters while outproc is used to encode the results. This routine returns zero if the registration succeeded, -1 otherwise.

Warning: remote procedures registered in this form are accessed using the UDP/IP transport; see svcudp_create() for restrictions.

struct rpc_createerr rpc_createerr;

A global variable whose value is set by any RPC client creation routine that does not succeed. Use the routine clnt_pcreateerror() to print the reason why.

void svc_destroy(SVCXPRT *xprt);

A macro that destroys the RPC service transport handle, xprt. Destruction usually involves deallocation of private data structures, including xprt itself. Use of xprt is undefined after calling this routine.

fd_set svc_fdset;

A global variable reflecting the RPC service side’s read file descriptor bit mask; it is suitable as a parameter to the select(2) system call. This is of interest only if a service implementor does their own asynchronous event processing, instead of calling svc_run(). This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines.

int svc_fds;

Similar to svc_fdset, but limited to 32 file descriptors. This interface is obsoleted by svc_fdset.

svc_freeargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that frees any data allocated by the RPC/XDR system when it decoded the arguments to a service procedure using svc_getargs(). This routine returns 1 if the results were successfully freed, and zero otherwise.

svc_getargs(SVCXPRT *xprt, xdrproc_t inproc, char *in);

A macro that decodes the arguments of an RPC request associated with the RPC service transport handle, xprt. The parameter in is the address where the arguments will be placed; inproc is the XDR routine used to decode the arguments. This routine returns one if decoding succeeds, and zero otherwise.

struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);

The approved way of getting the network address of the caller of a procedure associated with the RPC service transport handle, xprt.

void svc_getreqset(fd_set *rdfds);

This routine is of interest only if a service implementor does not call svc_run(), but instead implements custom asynchronous event processing. It is called when the select(2) system call has determined that an RPC request has arrived on some RPC socket(s); rdfds is the resultant read file descriptor bit mask. The routine returns when all sockets associated with the value of rdfds have been serviced.

void svc_getreq(int rdfds);

Similar to svc_getreqset(), but limited to 32 file descriptors. This interface is obsoleted by svc_getreqset().

bool_t svc_register(SVCXPRT *xprt, unsigned long prognum,
 unsigned long versnum,
 void (*dispatch)(struct svc_req *, SVCXPRT *),
 unsigned long protocol);

Associates prognum and versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is nonzero, then a mapping of the triple [prognum,versnum,protocol] to xprt->xp_port is established with the local portmap service (generally protocol is zero, IPPROTO_UDP or IPPROTO_TCP). The procedure dispatch has the following form:

dispatch(struct svc_req *request, SVCXPRT *xprt);

The svc_register() routine returns one if it succeeds, and zero otherwise.

void svc_run(void);

This routine never returns. It waits for RPC requests to arrive, and calls the appropriate service procedure using svc_getreq() when one arrives. This procedure is usually waiting for a select(2) system call to return.

bool_t svc_sendreply(SVCXPRT *xprt, xdrproc_t outproc",char*"out);

Called by an RPC service’s dispatch routine to send the results of a remote procedure call. The parameter xprt is the request’s associated transport handle; outproc is the XDR routine which is used to encode the results; and out is the address of the results. This routine returns one if it succeeds, zero otherwise.

void svc_unregister(unsigned long prognum, unsigned long versnum);

Remove all mapping of the double [prognum,versnum] to dispatch routines, and of the triple [prognum,versnum,*] to port number.

void svcerr_auth(SVCXPRT *xprt, enum auth_stat why);

Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error.

void svcerr_decode(SVCXPRT *xprt);

Called by a service dispatch routine that cannot successfully decode its parameters. See also svc_getargs().

void svcerr_noproc(SVCXPRT *xprt);

Called by a service dispatch routine that does not implement the procedure number that the caller requests.

void svcerr_noprog(SVCXPRT *xprt);

Called when the desired program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_progvers(SVCXPRT *xprt, unsigned long low_vers,
 unsigned long high_vers);

Called when the desired version of a program is not registered with the RPC package. Service implementors usually do not need this routine.

void svcerr_systemerr(SVCXPRT *xprt);

Called by a service dispatch routine when it detects a system error not covered by any particular protocol. For example, if a service can no longer allocate storage, it may call this routine.

void svcerr_weakauth(SVCXPRT *xprt);

Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient authentication parameters. The routine calls svcerr_auth(xprt, AUTH_TOOWEAK).

SVCXPRT *svcfd_create(int fd, unsigned int sendsize,
 unsigned int recvsize);

Create a service on top of any open file descriptor. Typically, this file descriptor is a connected socket for a stream protocol such as TCP. sendsize and recvsize indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen.

SVCXPRT *svcraw_create(void);

This routine creates a toy RPC service transport, to which it returns a pointer. The transport is really a buffer within the process’s address space, so the corresponding RPC client should live in the same address space; see clntraw_create(). This routine allows simulation of RPC and acquisition of RPC overheads (such as round trip times), without any kernel interference. This routine returns NULL if it fails.

SVCXPRT *svctcp_create(int sock, unsigned int send_buf_size,
 unsigned int recv_buf_size);

This routine creates a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

SVCXPRT *svcudp_bufcreate(int sock, unsigned int sendsize,
 unsigned int recosize);

This routine creates a UDP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local UDP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport’s socket descriptor, and xprt->xp_port is the transport’s port number. This routine returns NULL if it fails.

This allows the user to specify the maximum packet size for sending and receiving UDP-based RPC messages.

SVCXPRT *svcudp_create(int sock);

This call is equivalent to svcudp_bufcreate(sock,SZ,SZ) for some default size SZ.

bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar);

Used for encoding RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *aupp);

Used for describing UNIX credentials. This routine is useful for users who wish to generate these credentials without using the RPC authentication package.

void xdr_callhdr(XDR *xdrs, struct rpc_msg *chdr);

Used for describing RPC call header messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_callmsg(XDR *xdrs, struct rpc_msg *cmsg);

Used for describing RPC call messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);

Used for describing RPC authentication information messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_pmap(XDR *xdrs, struct pmap *regs);

Used for describing parameters to various portmap procedures, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_pmaplist(XDR *xdrs, struct pmaplist **rp);

Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate these parameters without using the pmap interface.

bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC-style messages without using the RPC package.

bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg);

Used for describing RPC reply messages. This routine is useful for users who wish to generate RPC style messages without using the RPC package.

void xprt_register(SVCXPRT *xprt);

After RPC service transport handles are created, they should register themselves with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

void xprt_unregister(SVCXPRT *xprt);

Before an RPC service transport handle is destroyed, it should unregister itself with the RPC service package. This routine modifies the global variable svc_fds. Service implementors usually do not need this routine.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

auth_destroy(), authnone_create(), authunix_create(), authunix_create_default(), callrpc(), clnt_broadcast(), clnt_call(), clnt_destroy(), clnt_create(), clnt_control(), clnt_freeres(), clnt_geterr(), clnt_pcreateerror(), clnt_perrno(), clnt_perror(), clnt_spcreateerror(), clnt_sperrno(), clnt_sperror(), clntraw_create(), clnttcp_create(), clntudp_create(), clntudp_bufcreate(), get_myaddress(), pmap_getmaps(), pmap_getport(), pmap_rmtcall(), pmap_set(), pmap_unset(), registerrpc(), svc_destroy(), svc_freeargs(), svc_getargs(), svc_getcaller(), svc_getreqset(), svc_getreq(), svc_register(), svc_run(), svc_sendreply(), svc_unregister(), svcerr_auth(), svcerr_decode(), svcerr_noproc(), svcerr_noprog(), svcerr_progvers(), svcerr_systemerr(), svcerr_weakauth(), svcfd_create(), svcraw_create(), svctcp_create(), svcudp_bufcreate(), svcudp_create(), xdr_accepted_reply(), xdr_authunix_parms(), xdr_callhdr(), xdr_callmsg(), xdr_opaque_auth(), xdr_pmap(), xdr_pmaplist(), xdr_rejected_reply(), xdr_replymsg(), xprt_register(), xprt_unregister()

Thread safetyMT-Safe

SEE ALSO

xdr(3)

The following manuals:

Remote Procedure Calls: Protocol Specification
Remote Procedure Call Programming Guide
rpcgen Programming Guide

RPC: Remote Procedure Call Protocol Specification, RFC 1050, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2395 - Linux cli command strdup

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strdup and provides detailed information about the command strdup, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strdup.

NAME 🖥️ strdup 🖥️

duplicate a string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strdup(const char *s);
char *strndup(const char s[.n], size_t n);
char *strdupa(const char *s);
char *strndupa(const char s[.n], size_t n);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strdup():

    _XOPEN_SOURCE >= 500
        || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

strndup():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

strdupa(), strndupa():

    _GNU_SOURCE

DESCRIPTION

The strdup() function returns a pointer to a new string which is a duplicate of the string s. Memory for the new string is obtained with malloc(3), and can be freed with free(3).

The strndup() function is similar, but copies at most n bytes. If s is longer than n, only n bytes are copied, and a terminating null byte (‘�’) is added.

strdupa() and strndupa() are similar, but use alloca(3) to allocate the buffer.

RETURN VALUE

On success, the strdup() function returns a pointer to the duplicated string. It returns NULL if insufficient memory was available, with errno set to indicate the error.

ERRORS

ENOMEM
Insufficient memory available to allocate duplicate string.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strdup(), strndup(), strdupa(), strndupa()

Thread safetyMT-Safe

STANDARDS

strdup()
strndup()
POSIX.1-2008.

strdupa()
strndupa()
GNU.

HISTORY

strdup()
SVr4, 4.3BSD-Reno, POSIX.1-2001.

strndup()
POSIX.1-2008.

strdupa()
strndupa()
GNU.

SEE ALSO

alloca(3), calloc(3), free(3), malloc(3), realloc(3), string(3), wcsdup(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2396 - Linux cli command system

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command system and provides detailed information about the command system, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the system.

NAME 🖥️ system 🖥️

execute a shell command

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int system(const char *command);

DESCRIPTION

The system() library function behaves as if it used fork(2) to create a child process that executed the shell command specified in command using execl(3) as follows:

execl("/bin/sh", "sh", "-c", command, (char *) NULL);

system() returns after the command has been completed.

During execution of the command, SIGCHLD will be blocked, and SIGINT and SIGQUIT will be ignored, in the process that calls system(). (These signals will be handled according to their defaults inside the child process that executes command.)

If command is NULL, then system() returns a status indicating whether a shell is available on the system.

RETURN VALUE

The return value of system() is one of the following:

  • If command is NULL, then a nonzero value if a shell is available, or 0 if no shell is available.

  • If a child process could not be created, or its status could not be retrieved, the return value is -1 and errno is set to indicate the error.

  • If a shell could not be executed in the child process, then the return value is as though the child shell terminated by calling _exit(2) with the status 127.

  • If all system calls succeed, then the return value is the termination status of the child shell used to execute command. (The termination status of a shell is the termination status of the last command it executes.)

In the last two cases, the return value is a “wait status” that can be examined using the macros described in waitpid(2). (i.e., WIFEXITED(), WEXITSTATUS(), and so on).

system() does not affect the wait status of any other children.

ERRORS

system() can fail with any of the same errors as fork(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

system()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89.

NOTES

system() provides simplicity and convenience: it handles all of the details of calling fork(2), execl(3), and waitpid(2), as well as the necessary manipulations of signals; in addition, the shell performs the usual substitutions and I/O redirections for command. The main cost of system() is inefficiency: additional system calls are required to create the process that runs the shell and to execute the shell.

If the _XOPEN_SOURCE feature test macro is defined (before including any header files), then the macros described in waitpid(2) (WEXITSTATUS(), etc.) are made available when including <stdlib.h>.

As mentioned, system() ignores SIGINT and SIGQUIT. This may make programs that call it from a loop uninterruptible, unless they take care themselves to check the exit status of the child. For example:

while (something) {
    int ret = system("foo");
    if (WIFSIGNALED(ret) &&
        (WTERMSIG(ret) == SIGINT || WTERMSIG(ret) == SIGQUIT))
            break;
}

According to POSIX.1, it is unspecified whether handlers registered using pthread_atfork(3) are called during the execution of system(). In the glibc implementation, such handlers are not called.

Before glibc 2.1.3, the check for the availability of /bin/sh was not actually performed if command was NULL; instead it was always assumed to be available, and system() always returned 1 in this case. Since glibc 2.1.3, this check is performed because, even though POSIX.1-2001 requires a conforming implementation to provide a shell, that shell may not be available or executable if the calling program has previously called chroot(2) (which is not specified by POSIX.1-2001).

It is possible for the shell command to terminate with a status of 127, which yields a system() return value that is indistinguishable from the case where a shell could not be executed in the child process.

Caveats

Do not use system() from a privileged program (a set-user-ID or set-group-ID program, or a program with capabilities) because strange values for some environment variables might be used to subvert system integrity. For example, PATH could be manipulated so that an arbitrary program is executed with privilege. Use the exec(3) family of functions instead, but not execlp(3) or execvp(3) (which also use the PATH environment variable to search for an executable).

system() will not, in fact, work properly from programs with set-user-ID or set-group-ID privileges on systems on which /bin/sh is bash version 2: as a security measure, bash 2 drops privileges on startup. (Debian uses a different shell, dash(1), which does not do this when invoked as sh.)

Any user input that is employed as part of command should be carefully sanitized, to ensure that unexpected shell commands or command options are not executed. Such risks are especially grave when using system() from a privileged program.

BUGS

If the command name starts with a hyphen, sh(1) interprets the command name as an option, and the behavior is undefined. (See the -c option to sh(1).) To work around this problem, prepend the command with a space as in the following call:

    system(" -unfortunate-command-name");

SEE ALSO

sh(1), execve(2), fork(2), sigaction(2), sigprocmask(2), wait(2), exec(3), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2397 - Linux cli command XcupQueryVersion

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XcupQueryVersion and provides detailed information about the command XcupQueryVersion, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XcupQueryVersion.

NAME 🖥️ XcupQueryVersion 🖥️

Returns TOG-CUP protocol version supported by the X server

SYNOPSIS

cc [ flag ... ] file ... -lXext [ library ... ]
#include <X11/extensions/Xcup.h>
Status XcupQueryVersion ( Display *display ,
int *major_version_return , int *minor_version_return );

ARGUMENTS

display
Specifies the connection to the X server

major_version_return
Returns the major version supported by the server

minor_version_return
Returns the minor version supported by the server

DESCRIPTION

* XcupQueryVersion * sets major_version_return and minor_version_return to the major and minor TOG-CUP protocol version supported by the server. If the TOG-CUP library is compatible with the version returned by the server, it returns nonzero. If the server does not support the TOG-CUP extension, or if there was an error during communications with the server, or if the server and library protocol versions are incompatible, it returns zero. No other Xcup functions may be called before this function. If a client violates this rule, the effects of all subsequent Xcup calls that it makes are undefined.

To get the list of reserved colormap entries, use * XcupGetReservedColormapEntries. *

To allocate one or more read-only color cells with RGB values, use * XcupStoreColors. *

SEE ALSO

XcupGetReservedColormapEntries(3Xext), XcupStoreColors(3Xext),
Colormap Utilization Policy and Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2398 - Linux cli command Net_DNS_SEC_Digestpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_SEC_Digestpm and provides detailed information about the command Net_DNS_SEC_Digestpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_SEC_Digestpm.

NAME 🖥️ Net_DNS_SEC_Digestpm 🖥️

Message Digest Algorithms

SYNOPSIS

require Net::DNS::SEC::Digest; $object = Net::DNS::SEC::Digest::SHA->new(256); $object->add($text); $object->add($more); $digest = $object->digest;

DESCRIPTION

Interface package providing access to the message digest algorithm implementations within the OpenSSL libcrypto library.

METHODS

new

require Net::DNS::SEC::Digest; $object = Net::DNS::SEC::Digest::SHA->new(256);

Creates and initialises a new digest object instance for the specified algorithm class.

add

$object->add($data); $object->add($more);

Append specified data to the digest stream.

digest

$digest = $object->digest;

Returns an octet string containing the calculated digest.

ACKNOWLEDGMENT

Thanks are due to Eric Young and the many developers and contributors to the OpenSSL cryptographic library.

COPYRIGHT

Copyright (c)2020,2021 Dick Franks.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

Net::DNS, Net::DNS::SEC, OpenSSL <http://www.openssl.org/docs>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2399 - Linux cli command nextdownf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command nextdownf and provides detailed information about the command nextdownf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the nextdownf.

NAME 🖥️ nextdownf 🖥️

return next floating-point number toward positive/negative infinity

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <math.h>
double nextup(double x);
float nextupf(float x);
long double nextupl(long double x);
double nextdown(double x);
float nextdownf(float x);
long double nextdownl(long double x);

DESCRIPTION

The nextup(), nextupf(), and nextupl() functions return the next representable floating-point number greater than x.

If x is the smallest representable negative number in the corresponding type, these functions return -0. If x is 0, the returned value is the smallest representable positive number of the corresponding type.

If x is positive infinity, the returned value is positive infinity. If x is negative infinity, the returned value is the largest representable finite negative number of the corresponding type.

If x is Nan, the returned value is NaN.

The value returned by nextdown(x) is -nextup(-x), and similarly for the other types.

RETURN VALUE

See DESCRIPTION.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

nextup(), nextupf(), nextupl(), nextdown(), nextdownf(), nextdownl()

Thread safetyMT-Safe

STANDARDS

These functions are described in IEEE Std 754-2008 - Standard for Floating-Point Arithmetic and ISO/IEC TS 18661.

HISTORY

glibc 2.24.

SEE ALSO

nearbyint(3), nextafter(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2400 - Linux cli command pthread_getattr_default_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_getattr_default_np and provides detailed information about the command pthread_getattr_default_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_getattr_default_np.

NAME 🖥️ pthread_getattr_default_np 🖥️

get or set default thread-creation attributes

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <pthread.h>
int pthread_getattr_default_np(pthread_attr_t *attr);
int pthread_setattr_default_np(const pthread_attr_t *attr);

DESCRIPTION

The pthread_setattr_default_np() function sets the default attributes used for creation of a new thread—that is, the attributes that are used when pthread_create(3) is called with a second argument that is NULL. The default attributes are set using the attributes supplied in *attr, a previously initialized thread attributes object. Note the following details about the supplied attributes object:

  • The attribute settings in the object must be valid.

  • The stack address attribute must not be set in the object.

  • Setting the stack size attribute to zero means leave the default stack size unchanged.

The pthread_getattr_default_np() function initializes the thread attributes object referred to by attr so that it contains the default attributes used for thread creation.

ERRORS

EINVAL
(pthread_setattr_default_np()) One of the attribute settings in attr is invalid, or the stack address attribute is set in attr.

ENOMEM
(pthread_setattr_default_np()) Insufficient memory.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_getattr_default_np(), pthread_setattr_default_np()

Thread safetyMT-Safe

STANDARDS

GNU; hence the suffix “_np” (nonportable) in their names.

HISTORY

glibc 2.18.

EXAMPLES

The program below uses pthread_getattr_default_np() to fetch the default thread-creation attributes and then displays various settings from the returned thread attributes object. When running the program, we see the following output:

$ ./a.out
Stack size:          8388608
Guard size:          4096
Scheduling policy:   SCHED_OTHER
Scheduling priority: 0
Detach state:        JOINABLE
Inherit scheduler:   INHERIT

Program source

#define _GNU_SOURCE
#include <err.h>
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
static void
display_pthread_attr(pthread_attr_t *attr)
{
    int s;
    size_t stacksize;
    size_t guardsize;
    int policy;
    struct sched_param schedparam;
    int detachstate;
    int inheritsched;
    s = pthread_attr_getstacksize(attr, &stacksize);
    if (s != 0)
        errc(EXIT_FAILURE, s, "pthread_attr_getstacksize");
    printf("Stack size:          %zu

“, stacksize); s = pthread_attr_getguardsize(attr, &guardsize); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_getguardsize”); printf(“Guard size: %zu “, guardsize); s = pthread_attr_getschedpolicy(attr, &policy); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_getschedpolicy”); printf(“Scheduling policy: %s “, (policy == SCHED_FIFO) ? “SCHED_FIFO” : (policy == SCHED_RR) ? “SCHED_RR” : (policy == SCHED_OTHER) ? “SCHED_OTHER” : “[unknown]”); s = pthread_attr_getschedparam(attr, &schedparam); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_getschedparam”); printf(“Scheduling priority: %d “, schedparam.sched_priority); s = pthread_attr_getdetachstate(attr, &detachstate); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_getdetachstate”); printf(“Detach state: %s “, (detachstate == PTHREAD_CREATE_DETACHED) ? “DETACHED” : (detachstate == PTHREAD_CREATE_JOINABLE) ? “JOINABLE” : “???”); s = pthread_attr_getinheritsched(attr, &inheritsched); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_getinheritsched”); printf(“Inherit scheduler: %s “, (inheritsched == PTHREAD_INHERIT_SCHED) ? “INHERIT” : (inheritsched == PTHREAD_EXPLICIT_SCHED) ? “EXPLICIT” : “???”); } int main(void) { int s; pthread_attr_t attr; s = pthread_getattr_default_np(&attr); if (s != 0) errc(EXIT_FAILURE, s, “pthread_getattr_default_np”); display_pthread_attr(&attr); exit(EXIT_SUCCESS); }

SEE ALSO

pthread_attr_getaffinity_np(3), pthread_attr_getdetachstate(3), pthread_attr_getguardsize(3), pthread_attr_getinheritsched(3), pthread_attr_getschedparam(3), pthread_attr_getschedpolicy(3), pthread_attr_getscope(3), pthread_attr_getstack(3), pthread_attr_getstackaddr(3), pthread_attr_getstacksize(3), pthread_attr_init(3), pthread_create(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2401 - Linux cli command sigblock

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigblock and provides detailed information about the command sigblock, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigblock.

NAME 🖥️ sigblock 🖥️

BSD signal API

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
[[deprecated]] int sigvec(int sig, const struct sigvec *vec,
 struct sigvec *ovec);
[[deprecated]] int sigmask(int signum);
[[deprecated]] int sigblock(int mask);
[[deprecated]] int sigsetmask(int mask);
[[deprecated]] int siggetmask(void);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

These functions are provided in glibc as a compatibility interface for programs that make use of the historical BSD signal API. This API is obsolete: new applications should use the POSIX signal API (sigaction(2), sigprocmask(2), etc.).

The sigvec() function sets and/or gets the disposition of the signal sig (like the POSIX sigaction(2)). If vec is not NULL, it points to a sigvec structure that defines the new disposition for sig. If ovec is not NULL, it points to a sigvec structure that is used to return the previous disposition of sig. To obtain the current disposition of sig without changing it, specify NULL for vec, and a non-null pointer for ovec.

The dispositions for SIGKILL and SIGSTOP cannot be changed.

The sigvec structure has the following form:

struct sigvec {
    void (*sv_handler)(int); /* Signal disposition */
    int    sv_mask;          /* Signals to be blocked in handler */
    int    sv_flags;         /* Flags */
};

The sv_handler field specifies the disposition of the signal, and is either: the address of a signal handler function; SIG_DFL, meaning the default disposition applies for the signal; or SIG_IGN, meaning that the signal is ignored.

If sv_handler specifies the address of a signal handler, then sv_mask specifies a mask of signals that are to be blocked while the handler is executing. In addition, the signal for which the handler is invoked is also blocked. Attempts to block SIGKILL or SIGSTOP are silently ignored.

If sv_handler specifies the address of a signal handler, then the sv_flags field specifies flags controlling what happens when the handler is called. This field may contain zero or more of the following flags:

SV_INTERRUPT
If the signal handler interrupts a blocking system call, then upon return from the handler the system call is not restarted: instead it fails with the error EINTR. If this flag is not specified, then system calls are restarted by default.

SV_RESETHAND
Reset the disposition of the signal to the default before calling the signal handler. If this flag is not specified, then the handler remains established until explicitly removed by a later call to sigvec() or until the process performs an execve(2).

SV_ONSTACK
Handle the signal on the alternate signal stack (historically established under BSD using the obsolete sigstack() function; the POSIX replacement is sigaltstack(2)).

The sigmask() macro constructs and returns a “signal mask” for signum. For example, we can initialize the vec.sv_mask field given to sigvec() using code such as the following:

vec.sv_mask = sigmask(SIGQUIT) | sigmask(SIGABRT);
            /* Block SIGQUIT and SIGABRT during
               handler execution */

The sigblock() function adds the signals in mask to the process’s signal mask (like POSIX sigprocmask(SIG_BLOCK)), and returns the process’s previous signal mask. Attempts to block SIGKILL or SIGSTOP are silently ignored.

The sigsetmask() function sets the process’s signal mask to the value given in mask (like POSIX sigprocmask(SIG_SETMASK)), and returns the process’s previous signal mask.

The siggetmask() function returns the process’s current signal mask. This call is equivalent to sigblock(0).

RETURN VALUE

The sigvec() function returns 0 on success; on error, it returns -1 and sets errno to indicate the error.

The sigblock() and sigsetmask() functions return the previous signal mask.

The sigmask() macro returns the signal mask for signum.

ERRORS

See the ERRORS under sigaction(2) and sigprocmask(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sigvec(), sigmask(), sigblock(), sigsetmask(), siggetmask()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

sigvec()
sigblock()
sigmask()
sigsetmask()
4.3BSD.

siggetmask()
Unclear origin.

sigvec()
Removed in glibc 2.21.

NOTES

On 4.3BSD, the signal() function provided reliable semantics (as when calling sigvec() with vec.sv_mask equal to 0). On System V, signal() provides unreliable semantics. POSIX.1 leaves these aspects of signal() unspecified. See signal(2) for further details.

In order to wait for a signal, BSD and System V both provided a function named sigpause(3), but this function has a different argument on the two systems. See sigpause(3) for details.

SEE ALSO

kill(2), pause(2), sigaction(2), signal(2), sigprocmask(2), raise(3), sigpause(3), sigset(3), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2402 - Linux cli command strndup

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strndup and provides detailed information about the command strndup, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strndup.

NAME 🖥️ strndup 🖥️

duplicate a string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
char *strdup(const char *s);
char *strndup(const char s[.n], size_t n);
char *strdupa(const char *s);
char *strndupa(const char s[.n], size_t n);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strdup():

    _XOPEN_SOURCE >= 500
        || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

strndup():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

strdupa(), strndupa():

    _GNU_SOURCE

DESCRIPTION

The strdup() function returns a pointer to a new string which is a duplicate of the string s. Memory for the new string is obtained with malloc(3), and can be freed with free(3).

The strndup() function is similar, but copies at most n bytes. If s is longer than n, only n bytes are copied, and a terminating null byte (‘�’) is added.

strdupa() and strndupa() are similar, but use alloca(3) to allocate the buffer.

RETURN VALUE

On success, the strdup() function returns a pointer to the duplicated string. It returns NULL if insufficient memory was available, with errno set to indicate the error.

ERRORS

ENOMEM
Insufficient memory available to allocate duplicate string.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strdup(), strndup(), strdupa(), strndupa()

Thread safetyMT-Safe

STANDARDS

strdup()
strndup()
POSIX.1-2008.

strdupa()
strndupa()
GNU.

HISTORY

strdup()
SVr4, 4.3BSD-Reno, POSIX.1-2001.

strndup()
POSIX.1-2008.

strdupa()
strndupa()
GNU.

SEE ALSO

alloca(3), calloc(3), free(3), malloc(3), realloc(3), string(3), wcsdup(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2403 - Linux cli command wcstoimax

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcstoimax and provides detailed information about the command wcstoimax, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcstoimax.

NAME 🖥️ wcstoimax 🖥️

convert wide-character string to integer

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stddef.h>
#include <inttypes.h>
intmax_t wcstoimax(const wchar_t *restrict nptr,
 wchar_t **restrict endptr, int base);
uintmax_t wcstoumax(const wchar_t *restrict nptr,
 wchar_t **restrict endptr, int base);

DESCRIPTION

These functions are just like wcstol(3) and wcstoul(3), except that they return a value of type intmax_t and uintmax_t, respectively.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcstoimax(), wcstoumax()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

imaxabs(3), imaxdiv(3), strtoimax(3), strtoumax(3), wcstol(3), wcstoul(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2404 - Linux cli command Image_ExifTool_AFCPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_AFCPpm and provides detailed information about the command Image_ExifTool_AFCPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_AFCPpm.

NAME 🖥️ Image_ExifTool_AFCPpm 🖥️

Read/write AFCP trailer

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to extract information from the AFCP trailer. Although the AFCP specification is compatible with various file formats, ExifTool currently only processes AFCP in JPEG images.

NOTES

AFCP is a specification which allows meta information (including IPTC) to be appended to the end of a file.

It is a poorly designed protocol because (like TIFF) it uses absolute offsets to specify data locations. This is a huge blunder because it makes the AFCP information dependent on the file length, so it is easily invalidated by image editing software which doesn’t recognize the AFCP trailer to fix up these offsets when the file length changes. ExifTool will attempt to fix these invalid offsets if possible.

Scanning for AFCP information may be time consuming, especially when reading from a sequential device, since the information is at the end of the file. In these instances, the ExifTool FastScan option may be used to disable scanning for AFCP information.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.tocarte.com/media/axs_afcp_spec.pdf>

SEE ALSO

“AFCP Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2405 - Linux cli command fread_unlocked

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fread_unlocked and provides detailed information about the command fread_unlocked, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fread_unlocked.

NAME 🖥️ fread_unlocked 🖥️

nonlocking stdio functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int getc_unlocked(FILE *stream);
int getchar_unlocked(void);
int putc_unlocked(int c, FILE *stream);
int putchar_unlocked(int c);
void clearerr_unlocked(FILE *stream);
int feof_unlocked(FILE *stream);
int ferror_unlocked(FILE *stream);
int fileno_unlocked(FILE *stream);
int fflush_unlocked(FILE *_Nullable stream);
int fgetc_unlocked(FILE *stream);
int fputc_unlocked(int c, FILE *stream);
size_t fread_unlocked(void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
size_t fwrite_unlocked(const void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
char *fgets_unlocked(char s[restrict .n], int n",FILE*restrict"stream);
int fputs_unlocked(const char *restrict s, FILE *restrict stream);
#include <wchar.h>
wint_t getwc_unlocked(FILE *stream);
wint_t getwchar_unlocked(void);
wint_t fgetwc_unlocked(FILE *stream);
wint_t fputwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwchar_unlocked(wchar_t wc);
wchar_t *fgetws_unlocked(wchar_t ws[restrict .n], int n,
 FILE *restrict stream);
int fputws_unlocked(const wchar_t *restrict ws,
 FILE *restrict stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getc_unlocked(), getchar_unlocked(), putc_unlocked(), putchar_unlocked():

    /* glibc >= 2.24: */ _POSIX_C_SOURCE >= 199309L
        || /* glibc <= 2.23: */ _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

clearerr_unlocked(), feof_unlocked(), ferror_unlocked(), fileno_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), getwchar_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwchar_unlocked(), fgetws_unlocked(), fputws_unlocked():

    _GNU_SOURCE

DESCRIPTION

Each of these functions has the same behavior as its counterpart without the “_unlocked” suffix, except that they do not use locking (they do not set locks themselves, and do not test for the presence of locks set by others) and hence are thread-unsafe. See flockfile(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getc_unlocked(), putc_unlocked(), clearerr_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked(), fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwc_unlocked(), fgetws_unlocked(), fputws_unlocked()

Thread safety

MT-Safe race:stream

getchar_unlocked(), getwchar_unlocked()

Thread safety

MT-Unsafe race:stdin

putchar_unlocked(), putwchar_unlocked()

Thread safety

MT-Unsafe race:stdout

feof_unlocked(), ferror_unlocked(), fileno_unlocked()

Thread safetyMT-Safe

STANDARDS

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2008.

Others:
None.

HISTORY

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2001.

SEE ALSO

flockfile(3), stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2406 - Linux cli command gai_suspend

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gai_suspend and provides detailed information about the command gai_suspend, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gai_suspend.

NAME 🖥️ gai_suspend 🖥️

asynchronous network address and service translation

LIBRARY

Asynchronous name lookup library (libanl, -lanl)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <netdb.h>
int getaddrinfo_a(int mode, struct gaicb *list[restrict],
 int nitems, struct sigevent *restrict sevp);
int gai_suspend(const struct gaicb *const list[], int nitems,
 const struct timespec *timeout);
int gai_error(struct gaicb *req);
int gai_cancel(struct gaicb *req);

DESCRIPTION

The getaddrinfo_a() function performs the same task as getaddrinfo(3), but allows multiple name look-ups to be performed asynchronously, with optional notification on completion of look-up operations.

The mode argument has one of the following values:

GAI_WAIT
Perform the look-ups synchronously. The call blocks until the look-ups have completed.

GAI_NOWAIT
Perform the look-ups asynchronously. The call returns immediately, and the requests are resolved in the background. See the discussion of the sevp argument below.

The array list specifies the look-up requests to process. The nitems argument specifies the number of elements in list. The requested look-up operations are started in parallel. NULL elements in list are ignored. Each request is described by a gaicb structure, defined as follows:

struct gaicb {
    const char            *ar_name;
    const char            *ar_service;
    const struct addrinfo *ar_request;
    struct addrinfo       *ar_result;
};

The elements of this structure correspond to the arguments of getaddrinfo(3). Thus, ar_name corresponds to the node argument and ar_service to the service argument, identifying an Internet host and a service. The ar_request element corresponds to the hints argument, specifying the criteria for selecting the returned socket address structures. Finally, ar_result corresponds to the res argument; you do not need to initialize this element, it will be automatically set when the request is resolved. The addrinfo structure referenced by the last two elements is described in getaddrinfo(3).

When mode is specified as GAI_NOWAIT, notifications about resolved requests can be obtained by employing the sigevent structure pointed to by the sevp argument. For the definition and general details of this structure, see sigevent(3type). The sevp->sigev_notify field can have the following values:

SIGEV_NONE
Don’t provide any notification.

SIGEV_SIGNAL
When a look-up completes, generate the signal sigev_signo for the process. See sigevent(3type) for general details. The si_code field of the siginfo_t structure will be set to SI_ASYNCNL.

SIGEV_THREAD
When a look-up completes, invoke sigev_notify_function as if it were the start function of a new thread. See sigevent(3type) for details.

For SIGEV_SIGNAL and SIGEV_THREAD, it may be useful to point sevp->sigev_value.sival_ptr to list.

The gai_suspend() function suspends execution of the calling thread, waiting for the completion of one or more requests in the array list. The nitems argument specifies the size of the array list. The call blocks until one of the following occurs:

  • One or more of the operations in list completes.

  • The call is interrupted by a signal that is caught.

  • The time interval specified in timeout elapses. This argument specifies a timeout in seconds plus nanoseconds (see nanosleep(2) for details of the timespec structure). If timeout is NULL, then the call blocks indefinitely (until one of the events above occurs).

No explicit indication of which request was completed is given; you must determine which request(s) have completed by iterating with gai_error() over the list of requests.

The gai_error() function returns the status of the request req: either EAI_INPROGRESS if the request was not completed yet, 0 if it was handled successfully, or an error code if the request could not be resolved.

The gai_cancel() function cancels the request req. If the request has been canceled successfully, the error status of the request will be set to EAI_CANCELED and normal asynchronous notification will be performed. The request cannot be canceled if it is currently being processed; in that case, it will be handled as if gai_cancel() has never been called. If req is NULL, an attempt is made to cancel all outstanding requests that the process has made.

RETURN VALUE

The getaddrinfo_a() function returns 0 if all of the requests have been enqueued successfully, or one of the following nonzero error codes:

EAI_AGAIN
The resources necessary to enqueue the look-up requests were not available. The application may check the error status of each request to determine which ones failed.

EAI_MEMORY
Out of memory.

EAI_SYSTEM
mode is invalid.

The gai_suspend() function returns 0 if at least one of the listed requests has been completed. Otherwise, it returns one of the following nonzero error codes:

EAI_AGAIN
The given timeout expired before any of the requests could be completed.

EAI_ALLDONE
There were no actual requests given to the function.

EAI_INTR
A signal has interrupted the function. Note that this interruption might have been caused by signal notification of some completed look-up request.

The gai_error() function can return EAI_INPROGRESS for an unfinished look-up request, 0 for a successfully completed look-up (as described above), one of the error codes that could be returned by getaddrinfo(3), or the error code EAI_CANCELED if the request has been canceled explicitly before it could be finished.

The gai_cancel() function can return one of these values:

EAI_CANCELED
The request has been canceled successfully.

EAI_NOTCANCELED
The request has not been canceled.

EAI_ALLDONE
The request has already completed.

The gai_strerror(3) function translates these error codes to a human readable string, suitable for error reporting.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getaddrinfo_a(), gai_suspend(), gai_error(), gai_cancel()

Thread safetyMT-Safe

STANDARDS

GNU.

HISTORY

glibc 2.2.3.

The interface of getaddrinfo_a() was modeled after the lio_listio(3) interface.

EXAMPLES

Two examples are provided: a simple example that resolves several requests in parallel synchronously, and a complex example showing some of the asynchronous capabilities.

Synchronous example

The program below simply resolves several hostnames in parallel, giving a speed-up compared to resolving the hostnames sequentially using getaddrinfo(3). The program might be used like this:

$ ./a.out mirrors.kernel.org enoent.linuxfoundation.org gnu.org
mirrors.kernel.org: 139.178.88.99
enoent.linuxfoundation.org: Name or service not known
gnu.org: 209.51.188.116

Here is the program source code

#define _GNU_SOURCE
#include <err.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MALLOC(n, type)  ((type *) reallocarray(NULL, n, sizeof(type)))
int
main(int argc, char *argv[])
{
    int ret;
    struct gaicb *reqs[argc - 1];
    char host[NI_MAXHOST];
    struct addrinfo *res;
    if (argc < 2) {
        fprintf(stderr, "Usage: %s HOST...

“, argv[0]); exit(EXIT_FAILURE); } for (size_t i = 0; i < argc - 1; i++) { reqs[i] = MALLOC(1, struct gaicb); if (reqs[i] == NULL) err(EXIT_FAILURE, “malloc”); memset(reqs[i], 0, sizeof(*reqs[0])); reqs[i]->ar_name = argv[i + 1]; } ret = getaddrinfo_a(GAI_WAIT, reqs, argc - 1, NULL); if (ret != 0) { fprintf(stderr, “getaddrinfo_a() failed: %s “, gai_strerror(ret)); exit(EXIT_FAILURE); } for (size_t i = 0; i < argc - 1; i++) { printf("%s: “, reqs[i]->ar_name); ret = gai_error(reqs[i]); if (ret == 0) { res = reqs[i]->ar_result; ret = getnameinfo(res->ai_addr, res->ai_addrlen, host, sizeof(host), NULL, 0, NI_NUMERICHOST); if (ret != 0) { fprintf(stderr, “getnameinfo() failed: %s “, gai_strerror(ret)); exit(EXIT_FAILURE); } puts(host); } else { puts(gai_strerror(ret)); } } exit(EXIT_SUCCESS); }

Asynchronous example

This example shows a simple interactive getaddrinfo_a() front-end. The notification facility is not demonstrated.

An example session might look like this:

$ ./a.out
> a mirrors.kernel.org enoent.linuxfoundation.org gnu.org
> c 2
[2] gnu.org: Request not canceled
> w 0 1
[00] mirrors.kernel.org: Finished
> l
[00] mirrors.kernel.org: 139.178.88.99
[01] enoent.linuxfoundation.org: Processing request in progress
[02] gnu.org: 209.51.188.116
> l
[00] mirrors.kernel.org: 139.178.88.99
[01] enoent.linuxfoundation.org: Name or service not known
[02] gnu.org: 209.51.188.116

The program source is as follows:

#define _GNU_SOURCE
#include <assert.h>
#include <err.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define CALLOC(n, type)  ((type *) calloc(n, sizeof(type)))
#define REALLOCF(ptr, n, type)                                          \
({                                                                      \
    static_assert(__builtin_types_compatible_p(typeof(ptr), type *));   \
                                                                        \
    (type *) reallocarrayf(ptr, n, sizeof(type));                       \
})
static struct gaicb **reqs = NULL;
static size_t nreqs = 0;
static inline void *
reallocarrayf(void *p, size_t nmemb, size_t size)
{
    void  *q;
    q = reallocarray(p, nmemb, size);
    if (q == NULL && nmemb != 0 && size != 0)
        free(p);
    return q;
}
static char *
getcmd(void)
{
    static char buf[256];
    fputs("> ", stdout); fflush(stdout);
    if (fgets(buf, sizeof(buf), stdin) == NULL)
        return NULL;
    if (buf[strlen(buf) - 1] == '

‘) buf[strlen(buf) - 1] = 0; return buf; } /* Add requests for specified hostnames. */ static void add_requests(void) { size_t nreqs_base = nreqs; char *host; int ret; while ((host = strtok(NULL, " “))) { nreqs++; reqs = REALLOCF(reqs, nreqs, struct gaicb ); if (reqs == NULL) err(EXIT_FAILURE, “reallocf”); reqs[nreqs - 1] = CALLOC(1, struct gaicb); if (reqs[nreqs - 1] == NULL) err(EXIT_FAILURE, “calloc”); reqs[nreqs - 1]->ar_name = strdup(host); } / Queue nreqs_base..nreqs requests. / ret = getaddrinfo_a(GAI_NOWAIT, &reqs[nreqs_base], nreqs - nreqs_base, NULL); if (ret) { fprintf(stderr, “getaddrinfo_a() failed: %s “, gai_strerror(ret)); exit(EXIT_FAILURE); } } / Wait until at least one of specified requests completes. */ static void wait_requests(void) { char *id; int ret; size_t n; struct gaicb const **wait_reqs; wait_reqs = CALLOC(nreqs, const struct gaicb ); if (wait_reqs == NULL) err(EXIT_FAILURE, “calloc”); / NULL elements are ignored by gai_suspend(). / while ((id = strtok(NULL, " “)) != NULL) { n = atoi(id); if (n >= nreqs) { printf(“Bad request number: %s “, id); return; } wait_reqs[n] = reqs[n]; } ret = gai_suspend(wait_reqs, nreqs, NULL); if (ret) { printf(“gai_suspend(): %s “, gai_strerror(ret)); return; } for (size_t i = 0; i < nreqs; i++) { if (wait_reqs[i] == NULL) continue; ret = gai_error(reqs[i]); if (ret == EAI_INPROGRESS) continue; printf(”[%02zu] %s: %s “, i, reqs[i]->ar_name, ret == 0 ? “Finished” : gai_strerror(ret)); } } / Cancel specified requests. */ static void cancel_requests(void) { char id; int ret; size_t n; while ((id = strtok(NULL, " “)) != NULL) { n = atoi(id); if (n >= nreqs) { printf(“Bad request number: %s “, id); return; } ret = gai_cancel(reqs[n]); printf(”[%s] %s: %s “, id, reqs[atoi(id)]->ar_name, gai_strerror(ret)); } } / List all requests. */ static void list_requests(void) { int ret; char host[NI_MAXHOST]; struct addrinfo *res; for (size_t i = 0; i < nreqs; i++) { printf(”[%02zu] %s: “, i, reqs[i]->ar_name); ret = gai_error(reqs[i]); if (!ret) { res = reqs[i]->ar_result; ret = getnameinfo(res->ai_addr, res->ai_addrlen, host, sizeof(host), NULL, 0, NI_NUMERICHOST); if (ret) { fprintf(stderr, “getnameinfo() failed: %s “, gai_strerror(ret)); exit(EXIT_FAILURE); } puts(host); } else { puts(gai_strerror(ret)); } } } int main(void) { char *cmdline; char *cmd; while ((cmdline = getcmd()) != NULL) { cmd = strtok(cmdline, " “); if (cmd == NULL) { list_requests(); } else { switch (cmd[0]) { case ‘a’: add_requests(); break; case ‘w’: wait_requests(); break; case ‘c’: cancel_requests(); break; case ’l’: list_requests(); break; default: fprintf(stderr, “Bad command: %c “, cmd[0]); break; } } } exit(EXIT_SUCCESS); }

SEE ALSO

getaddrinfo(3), inet(3), lio_listio(3), hostname(7), ip(7), sigevent(3type)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2407 - Linux cli command getwchar_unlocked

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getwchar_unlocked and provides detailed information about the command getwchar_unlocked, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getwchar_unlocked.

NAME 🖥️ getwchar_unlocked 🖥️

nonlocking stdio functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int getc_unlocked(FILE *stream);
int getchar_unlocked(void);
int putc_unlocked(int c, FILE *stream);
int putchar_unlocked(int c);
void clearerr_unlocked(FILE *stream);
int feof_unlocked(FILE *stream);
int ferror_unlocked(FILE *stream);
int fileno_unlocked(FILE *stream);
int fflush_unlocked(FILE *_Nullable stream);
int fgetc_unlocked(FILE *stream);
int fputc_unlocked(int c, FILE *stream);
size_t fread_unlocked(void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
size_t fwrite_unlocked(const void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
char *fgets_unlocked(char s[restrict .n], int n",FILE*restrict"stream);
int fputs_unlocked(const char *restrict s, FILE *restrict stream);
#include <wchar.h>
wint_t getwc_unlocked(FILE *stream);
wint_t getwchar_unlocked(void);
wint_t fgetwc_unlocked(FILE *stream);
wint_t fputwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwchar_unlocked(wchar_t wc);
wchar_t *fgetws_unlocked(wchar_t ws[restrict .n], int n,
 FILE *restrict stream);
int fputws_unlocked(const wchar_t *restrict ws,
 FILE *restrict stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getc_unlocked(), getchar_unlocked(), putc_unlocked(), putchar_unlocked():

    /* glibc >= 2.24: */ _POSIX_C_SOURCE >= 199309L
        || /* glibc <= 2.23: */ _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

clearerr_unlocked(), feof_unlocked(), ferror_unlocked(), fileno_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), getwchar_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwchar_unlocked(), fgetws_unlocked(), fputws_unlocked():

    _GNU_SOURCE

DESCRIPTION

Each of these functions has the same behavior as its counterpart without the “_unlocked” suffix, except that they do not use locking (they do not set locks themselves, and do not test for the presence of locks set by others) and hence are thread-unsafe. See flockfile(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getc_unlocked(), putc_unlocked(), clearerr_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked(), fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwc_unlocked(), fgetws_unlocked(), fputws_unlocked()

Thread safety

MT-Safe race:stream

getchar_unlocked(), getwchar_unlocked()

Thread safety

MT-Unsafe race:stdin

putchar_unlocked(), putwchar_unlocked()

Thread safety

MT-Unsafe race:stdout

feof_unlocked(), ferror_unlocked(), fileno_unlocked()

Thread safetyMT-Safe

STANDARDS

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2008.

Others:
None.

HISTORY

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2001.

SEE ALSO

flockfile(3), stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2408 - Linux cli command String_CRC32pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command String_CRC32pm and provides detailed information about the command String_CRC32pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the String_CRC32pm.

NAME 🖥️ String_CRC32pm 🖥️

Perl interface for cyclic redundancy check generation

SYNOPSIS

use String::CRC32; $crc = crc32(“some string”); $crc = crc32(“some string”, initvalue); $somestring = “some string”; $crc = crc32($somestring); printf “%08x “, $crc; open my $fh, <, location/of/some.file or die $!; binmode $fh; $crc = crc32($fh); close $fh;

DESCRIPTION

The CRC32 module calculates CRC sums of 32 bit lengths as integers. It generates the same CRC values as ZMODEM, PKZIP, PICCHECK and many others.

Despite its name, this module is able to compute the checksum of files as well as strings.

EXAMPLES

$crc = crc32(“some string”);

results in the same as

$crc = crc32(” string”, crc32(“some”));

This is useful for subsequent CRC checking of substrings.

You may even check files:

open my $fh, <, location/of/some.file or die $!; binmode $fh; $crc = crc32($fh); close $fh;

A init value may also have been supplied in the above example.

AUTHOR

Soenke J. Peters <peters_ [email protected]>

Current maintainer: LEEJO

Address bug reports and comments to: <https://github.com/leejo/string-crc32/issues>

LICENSE

CRC algorithm code taken from CRC-32 by Craig Bruce. The module stuff is inspired by a similar perl module called String::CRC by David Sharnoff & Matthew Dillon. Horst Fickenscher told me that it could be useful to supply an init value to the crc checking function and so I included this possibility.

The author of this package disclaims all copyrights and releases it into the public domain.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2409 - Linux cli command Moose_Meta_Method_Destructorpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Method_Destructorpm and provides detailed information about the command Moose_Meta_Method_Destructorpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Method_Destructorpm.

NAME 🖥️ Moose_Meta_Method_Destructorpm 🖥️

Method Meta Object for destructors

VERSION

version 2.2207

DESCRIPTION

This class is a subclass of Class::MOP::Method::Inlined that provides Moose-specific functionality for inlining destructors.

To understand this class, you should read the Class::MOP::Method::Inlined documentation as well.

INHERITANCE

Moose::Meta::Method::Destructor is a subclass of Moose::Meta::Method and Class::MOP::Method::Inlined.

METHODS

Moose::Meta::Method::Destructor->new(%options)

This constructs a new object. It accepts the following options:

  • package_name The package for the class in which the destructor is being inlined. This option is required.

  • name The name of the destructor method. This option is required.

  • metaclass The metaclass for the class this destructor belongs to. This is optional, as it can be set later by calling $metamethod->attach_to_class.

Moose::Meta;:Method::Destructor->is_needed($metaclass)

Given a Moose::Meta::Class object, this method returns a boolean indicating whether the class needs a destructor. If the class or any of its parents defines a DEMOLISH method, it needs a destructor.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2410 - Linux cli command Sub_Deferpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Sub_Deferpm and provides detailed information about the command Sub_Deferpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Sub_Deferpm.

NAME 🖥️ Sub_Deferpm 🖥️

Defer generation of subroutines until they are first called

SYNOPSIS

use Sub::Defer; my $deferred = defer_sub Logger::time_since_first_log => sub { my $t = time; sub { time - $t }; }; Logger->time_since_first_log; # returns 0 and replaces itself Logger->time_since_first_log; # returns time - $t

DESCRIPTION

These subroutines provide the user with a convenient way to defer creation of subroutines and methods until they are first called.

SUBROUTINES

defer_sub

my $coderef = defer_sub $name => sub { … }, \options;

This subroutine returns a coderef that encapsulates the provided sub - when it is first called, the provided sub is called and is -itself- expected to return a subroutine which will be goto’ed to on subsequent calls.

If a name is provided, this also installs the sub as that name - and when the subroutine is undeferred will re-install the final version for speed.

Exported by default.

Options

A hashref of options can optionally be specified.

package
The package to generate the sub in. Will be overridden by a fully qualified $name option. If not specified, will default to the caller’s package.

attributes
The Subroutine Attributes in perlsub to apply to the sub generated. Should be specified as an array reference.

undefer_sub

my $coderef = undefer_sub \Foo::name;

If the passed coderef has been deferred this will undefer it. If the passed coderef has not been deferred, this will just return it.

If this is confusing, take a look at the example in the SYNOPSIS.

Exported by default.

defer_info

my $data = defer_info $sub; my ($name, $generator, $options, $undeferred_sub) = @$data;

Returns original arguments to defer_sub, plus the undeferred version if this sub has already been undeferred.

Note that $sub can be either the original deferred version or the undeferred version for convenience.

Not exported by default.

undefer_all

undefer_all();

This will undefer all deferred subs in one go. This can be very useful in a forking environment where child processes would each have to undefer the same subs. By calling this just before you start forking children you can undefer all currently deferred subs in the parent so that the children do not have to do it. Note this may bake the behavior of some subs that were intended to calculate their behavior later, so it shouldn’t be used midway through a module load or class definition.

Exported by default.

undefer_package

undefer_package($package);

This undefers all deferred subs in a package.

Not exported by default.

SUPPORT

See Sub::Quote for support and contact information.

AUTHORS

See Sub::Quote for authors.

COPYRIGHT AND LICENSE

See Sub::Quote for the copyright and license.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2411 - Linux cli command XtParent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtParent and provides detailed information about the command XtParent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtParent.

NAME 🖥️ XtParent 🖥️

obtain widget’s parent widget id

SYNTAX

#include <X11/Intrinsic.h>

Widget XtParent(Widget w);

ARGUMENTS

  1. Specifies the widget.

DESCRIPTION

XtParent returns the widget’s parent widget ID.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2412 - Linux cli command nextafter

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command nextafter and provides detailed information about the command nextafter, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the nextafter.

NAME 🖥️ nextafter 🖥️

floating-point number manipulation

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double nextafter(double x, double y);
float nextafterf(float x, float y);
long double nextafterl(long double x, long double y);
double nexttoward(double x, long double y);
float nexttowardf(float x, long double y);
long double nexttowardl(long double x, long double y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

nextafter():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

nextafterf(), nextafterl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

nexttoward(), nexttowardf(), nexttowardl():

    _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE
        || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The nextafter(), nextafterf(), and nextafterl() functions return the next representable floating-point value following x in the direction of y. If y is less than x, these functions will return the largest representable number less than x.

If x equals y, the functions return y.

The nexttoward(), nexttowardf(), and nexttowardl() functions do the same as the corresponding nextafter() functions, except that they have a long double second argument.

RETURN VALUE

On success, these functions return the next representable floating-point value after x in the direction of y.

If x equals y, then y (cast to the same type as x) is returned.

If x or y is a NaN, a NaN is returned.

If x is finite, and the result would overflow, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the correct mathematical sign.

If x is not equal to y, and the correct function result would be subnormal, zero, or underflow, a range error occurs, and either the correct value (if it can be represented), or 0.0, is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error: result overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error: result is subnormal or underflows
errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

nextafter(), nextafterf(), nextafterl(), nexttoward(), nexttowardf(), nexttowardl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

This function is defined in IEC 559 (and the appendix with recommended functions in IEEE 754/IEEE 854).

HISTORY

C99, POSIX.1-2001.

BUGS

In glibc 2.5 and earlier, these functions do not raise an underflow floating-point (FE_UNDERFLOW) exception when an underflow occurs.

Before glibc 2.23 these functions did not set errno.

SEE ALSO

nearbyint(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2413 - Linux cli command __ppc_mdoio

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __ppc_mdoio and provides detailed information about the command __ppc_mdoio, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __ppc_mdoio.

NAME 🖥️ __ppc_mdoio 🖥️

Hint the processor to release shared resources

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/platform/ppc.h>
void __ppc_yield(void);
void __ppc_mdoio(void);
void __ppc_mdoom(void);

DESCRIPTION

These functions provide hints about the usage of resources that are shared with other processors on the Power architecture. They can be used, for example, if a program waiting on a lock intends to divert the shared resources to be used by other processors.

__ppc_yield() provides a hint that performance will probably be improved if shared resources dedicated to the executing processor are released for use by other processors.

__ppc_mdoio() provides a hint that performance will probably be improved if shared resources dedicated to the executing processor are released until all outstanding storage accesses to caching-inhibited storage have been completed.

__ppc_mdoom() provides a hint that performance will probably be improved if shared resources dedicated to the executing processor are released until all outstanding storage accesses to cacheable storage for which the data is not in the cache have been completed.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

__ppc_yield(), __ppc_mdoio(), __ppc_mdoom()

Thread safetyMT-Safe

STANDARDS

GNU.

HISTORY

glibc 2.18.

SEE ALSO

__ppc_set_ppr_med(3)

Power ISA, Book II - Section 3.2 (“or” architecture)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2414 - Linux cli command inet_makeaddr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command inet_makeaddr and provides detailed information about the command inet_makeaddr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the inet_makeaddr.

NAME 🖥️ inet_makeaddr 🖥️

Internet address manipulation routines

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
int inet_aton(const char *cp, struct in_addr *inp);
in_addr_t inet_addr(const char *cp);
in_addr_t inet_network(const char *cp);
[[deprecated]] char *inet_ntoa(struct in_addr in);
[[deprecated]] struct in_addr inet_makeaddr(in_addr_t net,
 in_addr_t host);
[[deprecated]] in_addr_t inet_lnaof(struct in_addr in);
[[deprecated]] in_addr_t inet_netof(struct in_addr in);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

inet_aton(), inet_ntoa():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    In glibc up to and including 2.19:
        _BSD_SOURCE || _BSD_SOURCE

DESCRIPTION

inet_aton() converts the Internet host address cp from the IPv4 numbers-and-dots notation into binary form (in network byte order) and stores it in the structure that inp points to. inet_aton() returns nonzero if the address is valid, zero if not. The address supplied in cp can have one of the following forms:

a.b.c.d
Each of the four numeric parts specifies a byte of the address; the bytes are assigned in left-to-right order to produce the binary address.

a.b.c
Parts a and b specify the first two bytes of the binary address. Part c is interpreted as a 16-bit value that defines the rightmost two bytes of the binary address. This notation is suitable for specifying (outmoded) Class B network addresses.

a.b
Part a specifies the first byte of the binary address. Part b is interpreted as a 24-bit value that defines the rightmost three bytes of the binary address. This notation is suitable for specifying (outmoded) Class A network addresses.

a
The value a is interpreted as a 32-bit value that is stored directly into the binary address without any byte rearrangement.

In all of the above forms, components of the dotted address can be specified in decimal, octal (with a leading 0), or hexadecimal, with a leading 0X). Addresses in any of these forms are collectively termed IPV4 numbers-and-dots notation. The form that uses exactly four decimal numbers is referred to as IPv4 dotted-decimal notation (or sometimes: IPv4 dotted-quad notation).

inet_aton() returns 1 if the supplied string was successfully interpreted, or 0 if the string is invalid (errno is not set on error).

The inet_addr() function converts the Internet host address cp from IPv4 numbers-and-dots notation into binary data in network byte order. If the input is invalid, INADDR_NONE (usually -1) is returned. Use of this function is problematic because -1 is a valid address (255.255.255.255). Avoid its use in favor of inet_aton(), inet_pton(3), or getaddrinfo(3), which provide a cleaner way to indicate error return.

The inet_network() function converts cp, a string in IPv4 numbers-and-dots notation, into a number in host byte order suitable for use as an Internet network address. On success, the converted address is returned. If the input is invalid, -1 is returned.

The inet_ntoa() function converts the Internet host address in, given in network byte order, to a string in IPv4 dotted-decimal notation. The string is returned in a statically allocated buffer, which subsequent calls will overwrite.

The inet_lnaof() function returns the local network address part of the Internet address in. The returned value is in host byte order.

The inet_netof() function returns the network number part of the Internet address in. The returned value is in host byte order.

The inet_makeaddr() function is the converse of inet_netof() and inet_lnaof(). It returns an Internet host address in network byte order, created by combining the network number net with the local address host, both in host byte order.

The structure in_addr as used in inet_ntoa(), inet_makeaddr(), inet_lnaof(), and inet_netof() is defined in <netinet/in.h> as:

typedef uint32_t in_addr_t;
struct in_addr {
    in_addr_t s_addr;
};

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

inet_aton(), inet_addr(), inet_network(), inet_ntoa()

Thread safetyMT-Safe locale

inet_makeaddr(), inet_lnaof(), inet_netof()

Thread safetyMT-Safe

STANDARDS

inet_addr()
inet_ntoa()
POSIX.1-2008.

inet_aton()
None.

STANDARDS

inet_addr()
inet_ntoa()
POSIX.1-2001, 4.3BSD.

inet_lnaof(), inet_netof(), and inet_makeaddr() are legacy functions that assume they are dealing with classful network addresses. Classful networking divides IPv4 network addresses into host and network components at byte boundaries, as follows:

Class A
This address type is indicated by the value 0 in the most significant bit of the (network byte ordered) address. The network address is contained in the most significant byte, and the host address occupies the remaining three bytes.

Class B
This address type is indicated by the binary value 10 in the most significant two bits of the address. The network address is contained in the two most significant bytes, and the host address occupies the remaining two bytes.

Class C
This address type is indicated by the binary value 110 in the most significant three bits of the address. The network address is contained in the three most significant bytes, and the host address occupies the remaining byte.

Classful network addresses are now obsolete, having been superseded by Classless Inter-Domain Routing (CIDR), which divides addresses into network and host components at arbitrary bit (rather than byte) boundaries.

NOTES

On x86 architectures, the host byte order is Least Significant Byte first (little endian), whereas the network byte order, as used on the Internet, is Most Significant Byte first (big endian).

EXAMPLES

An example of the use of inet_aton() and inet_ntoa() is shown below. Here are some example runs:

$ ./a.out 226.000.000.037 # Last byte is in octal
226.0.0.31
$ ./a.out 0x7f.1  # First byte is in hex
127.0.0.1

Program source

#define _DEFAULT_SOURCE
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
    struct in_addr addr;
    if (argc != 2) {
        fprintf(stderr, "%s <dotted-address>

“, argv[0]); exit(EXIT_FAILURE); } if (inet_aton(argv[1], &addr) == 0) { fprintf(stderr, “Invalid address “); exit(EXIT_FAILURE); } printf("%s “, inet_ntoa(addr)); exit(EXIT_SUCCESS); }

SEE ALSO

byteorder(3), getaddrinfo(3), gethostbyname(3), getnameinfo(3), getnetent(3), inet_net_pton(3), inet_ntop(3), inet_pton(3), hosts(5), networks(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2415 - Linux cli command vdprintf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command vdprintf and provides detailed information about the command vdprintf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the vdprintf.

NAME 🖥️ vdprintf 🖥️

formatted output conversion

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int printf(const char *restrict format, ...);
int fprintf(FILE *restrict stream,
 const char *restrict format, ...);
int dprintf(int fd,
 const char *restrict format, ...);
int sprintf(char *restrict str,
 const char *restrict format, ...);
int snprintf(char str[restrict .size], size_t size,
 const char *restrict format, ...);
int vprintf(const char *restrict format, va_list ap);
int vfprintf(FILE *restrict stream,
 const char *restrict format, va_list ap);
int vdprintf(int fd,
 const char *restrict format, va_list ap);
int vsprintf(char *restrict str,
 const char *restrict format, va_list ap);
int vsnprintf(char str[restrict .size], size_t size,
 const char *restrict format, va_list ap);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

snprintf(), vsnprintf():

    _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE

dprintf(), vdprintf():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The functions in the printf() family produce output according to a format as described below. The functions printf() and vprintf() write output to stdout, the standard output stream; fprintf() and vfprintf() write output to the given output stream; sprintf(), snprintf(), vsprintf(), and vsnprintf() write to the character string str.

The function dprintf() is the same as fprintf() except that it outputs to a file descriptor, fd, instead of to a stdio(3) stream.

The functions snprintf() and vsnprintf() write at most size bytes (including the terminating null byte (‘�’)) to str.

The functions vprintf(), vfprintf(), vdprintf(), vsprintf(), vsnprintf() are equivalent to the functions printf(), fprintf(), dprintf(), sprintf(), snprintf(), respectively, except that they are called with a va_list instead of a variable number of arguments. These functions do not call the va_end macro. Because they invoke the va_arg macro, the value of ap is undefined after the call. See stdarg(3).

All of these functions write the output under the control of a format string that specifies how subsequent arguments (or arguments accessed via the variable-length argument facilities of stdarg(3)) are converted for output.

C99 and POSIX.1-2001 specify that the results are undefined if a call to sprintf(), snprintf(), vsprintf(), or vsnprintf() would cause copying to take place between objects that overlap (e.g., if the target string array and one of the supplied input arguments refer to the same buffer). See CAVEATS.

Format of the format string

The format string is a character string, beginning and ending in its initial shift state, if any. The format string is composed of zero or more directives: ordinary characters (not %), which are copied unchanged to the output stream; and conversion specifications, each of which results in fetching zero or more subsequent arguments. Each conversion specification is introduced by the character %, and ends with a conversion specifier. In between there may be (in this order) zero or more flags, an optional minimum field width, an optional precision and an optional length modifier.

The overall syntax of a conversion specification is:

%[$][flags][width][.precision][length modifier]conversion

The arguments must correspond properly (after type promotion) with the conversion specifier. By default, the arguments are used in the order given, where each ‘*’ (see Field width and Precision below) and each conversion specifier asks for the next argument (and it is an error if insufficiently many arguments are given). One can also specify explicitly which argument is taken, at each place where an argument is required, by writing “%m$” instead of ‘%’ and “*m$” instead of ‘*’, where the decimal integer m denotes the position in the argument list of the desired argument, indexed starting from 1. Thus,

printf("%*d", width, num);

and

printf("%2$*1$d", width, num);

are equivalent. The second style allows repeated references to the same argument. The C99 standard does not include the style using ‘$’, which comes from the Single UNIX Specification. If the style using ‘$’ is used, it must be used throughout for all conversions taking an argument and all width and precision arguments, but it may be mixed with “%%” formats, which do not consume an argument. There may be no gaps in the numbers of arguments specified using ‘$’; for example, if arguments 1 and 3 are specified, argument 2 must also be specified somewhere in the format string.

For some numeric conversions a radix character (“decimal point”) or thousands’ grouping character is used. The actual character used depends on the LC_NUMERIC part of the locale. (See setlocale(3).) The POSIX locale uses ‘.’ as radix character, and does not have a grouping character. Thus,

printf("%'.2f", 1234567.89);

results in “1234567.89” in the POSIX locale, in “1234567,89” in the nl_NL locale, and in “1.234.567,89” in the da_DK locale.

Flag characters

The character % is followed by zero or more of the following flags:

#
The value should be converted to an “alternate form”. For o conversions, the first character of the output string is made zero (by prefixing a 0 if it was not zero already). For x and X conversions, a nonzero result has the string “0x” (or “0X” for X conversions) prepended to it. For a, A, e, E, f, F, g, and G conversions, the result will always contain a decimal point, even if no digits follow it (normally, a decimal point appears in the results of those conversions only if a digit follows). For g and G conversions, trailing zeros are not removed from the result as they would otherwise be. For m, if errno contains a valid error code, the output of strerrorname_np(errno) is printed; otherwise, the value stored in errno is printed as a decimal number. For other conversions, the result is undefined.

0
The value should be zero padded. For d, i, o, u, x, X, a, A, e, E, f, F, g, and G conversions, the converted value is padded on the left with zeros rather than blanks. If the 0 and - flags both appear, the 0 flag is ignored. If a precision is given with an integer conversion (d, i, o, u, x, and X), the 0 flag is ignored. For other conversions, the behavior is undefined.

-
The converted value is to be left adjusted on the field boundary. (The default is right justification.) The converted value is padded on the right with blanks, rather than on the left with blanks or zeros. A - overrides a 0 if both are given.

’ ‘
(a space) A blank should be left before a positive number (or empty string) produced by a signed conversion.

+
A sign (+ or -) should always be placed before a number produced by a signed conversion. By default, a sign is used only for negative numbers. A + overrides a space if both are used.

The five flag characters above are defined in the C99 standard. The Single UNIX Specification specifies one further flag character.


For decimal conversion (i, d, u, f, F, g, G) the output is to be grouped with thousands’ grouping characters if the locale information indicates any. (See setlocale(3).) Note that many versions of gcc(1) cannot parse this option and will issue a warning. (SUSv2 did not include %‘F, but SUSv3 added it.) Note also that the default locale of a C program is “C” whose locale information indicates no thousands’ grouping character. Therefore, without a prior call to setlocale(3), no thousands’ grouping characters will be printed.

glibc 2.2 adds one further flag character.

I
For decimal integer conversion (i, d, u) the output uses the locale’s alternative output digits, if any. For example, since glibc 2.2.3 this will give Arabic-Indic digits in the Persian (“fa_IR”) locale.

Field width

An optional decimal digit string (with nonzero first digit) specifying a minimum field width. If the converted value has fewer characters than the field width, it will be padded with spaces on the left (or right, if the left-adjustment flag has been given). Instead of a decimal digit string one may write “*” or “*m$” (for some decimal integer m) to specify that the field width is given in the next argument, or in the m-th argument, respectively, which must be of type int. A negative field width is taken as a ‘-’ flag followed by a positive field width. In no case does a nonexistent or small field width cause truncation of a field; if the result of a conversion is wider than the field width, the field is expanded to contain the conversion result.

Precision

An optional precision, in the form of a period (’.’) followed by an optional decimal digit string. Instead of a decimal digit string one may write “*” or “*m$” (for some decimal integer m) to specify that the precision is given in the next argument, or in the m-th argument, respectively, which must be of type int. If the precision is given as just ‘.’, the precision is taken to be zero. A negative precision is taken as if the precision were omitted. This gives the minimum number of digits to appear for d, i, o, u, x, and X conversions, the number of digits to appear after the radix character for a, A, e, E, f, and F conversions, the maximum number of significant digits for g and G conversions, or the maximum number of characters to be printed from a string for s and S conversions.

Length modifier

Here, “integer conversion” stands for d, i, o, u, x, or X conversion.

hh
A following integer conversion corresponds to a signed char or unsigned char argument, or a following n conversion corresponds to a pointer to a signed char argument.

h
A following integer conversion corresponds to a short or unsigned short argument, or a following n conversion corresponds to a pointer to a short argument.

l
(ell) A following integer conversion corresponds to a long or unsigned long argument, or a following n conversion corresponds to a pointer to a long argument, or a following c conversion corresponds to a wint_t argument, or a following s conversion corresponds to a pointer to wchar_t argument. On a following a, A, e, E, f, F, g, or G conversion, this length modifier is ignored (C99; not in SUSv2).

ll
(ell-ell). A following integer conversion corresponds to a long long or unsigned long long argument, or a following n conversion corresponds to a pointer to a long long argument.

q
A synonym for ll. This is a nonstandard extension, derived from BSD; avoid its use in new code.

L
A following a, A, e, E, f, F, g, or G conversion corresponds to a long double argument. (C99 allows %LF, but SUSv2 does not.)

j
A following integer conversion corresponds to an intmax_t or uintmax_t argument, or a following n conversion corresponds to a pointer to an intmax_t argument.

z
A following integer conversion corresponds to a size_t or ssize_t argument, or a following n conversion corresponds to a pointer to a size_t argument.

Z
A nonstandard synonym for z that predates the appearance of z. Do not use in new code.

t
A following integer conversion corresponds to a ptrdiff_t argument, or a following n conversion corresponds to a pointer to a ptrdiff_t argument.

SUSv3 specifies all of the above, except for those modifiers explicitly noted as being nonstandard extensions. SUSv2 specified only the length modifiers h (in hd, hi, ho, hx, hX, hn) and l (in ld, li, lo, lx, lX, ln, lc, ls) and L (in Le, LE, Lf, Lg, LG).

As a nonstandard extension, the GNU implementations treats ll and L as synonyms, so that one can, for example, write llg (as a synonym for the standards-compliant Lg) and Ld (as a synonym for the standards compliant lld). Such usage is nonportable.

Conversion specifiers

A character that specifies the type of conversion to be applied. The conversion specifiers and their meanings are:

d, i
The int argument is converted to signed decimal notation. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.

o, u, x, X
The unsigned int argument is converted to unsigned octal (o), unsigned decimal (u), or unsigned hexadecimal (x and X) notation. The letters abcdef are used for x conversions; the letters ABCDEF are used for X conversions. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.

e, E
The double argument is rounded and converted in the style [-]d**.ddde**±dd where there is one digit (which is nonzero if the argument is nonzero) before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero, no decimal-point character appears. An E conversion uses the letter E (rather than e) to introduce the exponent. The exponent always contains at least two digits; if the value is zero, the exponent is 00.

f, F
The double argument is rounded and converted to decimal notation in the style [-]ddd**.**ddd, where the number of digits after the decimal-point character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. If a decimal point appears, at least one digit appears before it.

(SUSv2 does not know about F and says that character string representations for infinity and NaN may be made available. SUSv3 adds a specification for F. The C99 standard specifies “[-]inf” or “[-]infinity” for infinity, and a string starting with “nan” for NaN, in the case of f conversion, and “[-]INF” or “[-]INFINITY” or “NAN” in the case of F conversion.)

g, G
The double argument is converted in style f or e (or F or E for G conversions). The precision specifies the number of significant digits. If the precision is missing, 6 digits are given; if the precision is zero, it is treated as 1. Style e is used if the exponent from its conversion is less than -4 or greater than or equal to the precision. Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit.

a, A
(C99; not in SUSv2, but added in SUSv3) For a conversion, the double argument is converted to hexadecimal notation (using the letters abcdef) in the style [-]0xh**.hhhhp**±d; for A conversion the prefix 0X, the letters ABCDEF, and the exponent separator P is used. There is one hexadecimal digit before the decimal point, and the number of digits after it is equal to the precision. The default precision suffices for an exact representation of the value if an exact representation in base 2 exists and otherwise is sufficiently large to distinguish values of type double. The digit before the decimal point is unspecified for nonnormalized numbers, and nonzero but otherwise unspecified for normalized numbers. The exponent always contains at least one digit; if the value is zero, the exponent is 0.

c
If no l modifier is present, the int argument is converted to an unsigned char, and the resulting character is written. If an l modifier is present, the wint_t (wide character) argument is converted to a multibyte sequence by a call to the wcrtomb(3) function, with a conversion state starting in the initial state, and the resulting multibyte string is written.

s
If no l modifier is present: the const char * argument is expected to be a pointer to an array of character type (pointer to a string). Characters from the array are written up to (but not including) a terminating null byte (‘�’); if a precision is specified, no more than the number specified are written. If a precision is given, no null byte need be present; if the precision is not specified, or is greater than the size of the array, the array must contain a terminating null byte.

If an l modifier is present: the const wchar_t * argument is expected to be a pointer to an array of wide characters. Wide characters from the array are converted to multibyte characters (each by a call to the wcrtomb(3) function, with a conversion state starting in the initial state before the first wide character), up to and including a terminating null wide character. The resulting multibyte characters are written up to (but not including) the terminating null byte. If a precision is specified, no more bytes than the number specified are written, but no partial multibyte characters are written. Note that the precision determines the number of bytes written, not the number of wide characters or screen positions. The array must contain a terminating null wide character, unless a precision is given and it is so small that the number of bytes written exceeds it before the end of the array is reached.

C
(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.) Synonym for lc. Don’t use.

S
(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.) Synonym for ls. Don’t use.

p
The void * pointer argument is printed in hexadecimal (as if by %#x or %#lx).

n
The number of characters written so far is stored into the integer pointed to by the corresponding argument. That argument shall be an int *, or variant whose size matches the (optionally) supplied integer length modifier. No argument is converted. (This specifier is not supported by the bionic C library.) The behavior is undefined if the conversion specification includes any flags, a field width, or a precision.

m
(glibc extension; supported by uClibc and musl.) Print output of strerror(errno) (or strerrorname_np(errno) in the alternate form). No argument is required.

%
A ‘%’ is written. No argument is converted. The complete conversion specification is ‘%%’.

RETURN VALUE

Upon successful return, these functions return the number of bytes printed (excluding the null byte used to end output to strings).

The functions snprintf() and vsnprintf() do not write more than size bytes (including the terminating null byte (‘�’)). If the output was truncated due to this limit, then the return value is the number of characters (excluding the terminating null byte) which would have been written to the final string if enough space had been available. Thus, a return value of size or more means that the output was truncated. (See also below under CAVEATS.)

If an output error is encountered, a negative value is returned.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

printf(), fprintf(), sprintf(), snprintf(), vprintf(), vfprintf(), vsprintf(), vsnprintf()

Thread safetyMT-Safe locale

STANDARDS

fprintf()
printf()
sprintf()
vprintf()
vfprintf()
vsprintf()
snprintf()
vsnprintf()
C11, POSIX.1-2008.

dprintf()
vdprintf()
GNU, POSIX.1-2008.

HISTORY

fprintf()
printf()
sprintf()
vprintf()
vfprintf()
vsprintf()
C89, POSIX.1-2001.

snprintf()
vsnprintf()
SUSv2, C99, POSIX.1-2001.

Concerning the return value of snprintf(), SUSv2 and C99 contradict each other: when snprintf() is called with size=0 then SUSv2 stipulates an unspecified return value less than 1, while C99 allows str to be NULL in this case, and gives the return value (as always) as the number of characters that would have been written in case the output string has been large enough. POSIX.1-2001 and later align their specification of snprintf() with C99.

dprintf()
vdprintf()
GNU, POSIX.1-2008.

glibc 2.1 adds length modifiers hh, j, t, and z and conversion characters a and A.

glibc 2.2 adds the conversion character F with C99 semantics, and the flag character I.

glibc 2.35 gives a meaning to the alternate form (#) of the m conversion specifier, that is %#m.

CAVEATS

Some programs imprudently rely on code such as the following

sprintf(buf, "%s some further text", buf);

to append text to buf. However, the standards explicitly note that the results are undefined if source and destination buffers overlap when calling sprintf(), snprintf(), vsprintf(), and vsnprintf(). Depending on the version of gcc(1) used, and the compiler options employed, calls such as the above will not produce the expected results.

The glibc implementation of the functions snprintf() and vsnprintf() conforms to the C99 standard, that is, behaves as described above, since glibc 2.1. Until glibc 2.0.6, they would return -1 when the output was truncated.

BUGS

Because sprintf() and vsprintf() assume an arbitrarily long string, callers must be careful not to overflow the actual space; this is often impossible to assure. Note that the length of the strings produced is locale-dependent and difficult to predict. Use snprintf() and vsnprintf() instead (or asprintf(3) and vasprintf(3)).

Code such as printf(foo); often indicates a bug, since foo may contain a % character. If foo comes from untrusted user input, it may contain %n, causing the printf() call to write to memory and creating a security hole.

EXAMPLES

To print Pi to five decimal places:

#include <math.h>
#include <stdio.h>
fprintf(stdout, "pi = %.5f

“, 4 * atan(1.0));

To print a date and time in the form “Sunday, July 3, 10:02”, where weekday and month are pointers to strings:

#include <stdio.h>
fprintf(stdout, "%s, %s %d, %.2d:%.2d

“, weekday, month, day, hour, min);

Many countries use the day-month-year order. Hence, an internationalized version must be able to print the arguments in an order specified by the format:

#include <stdio.h>
fprintf(stdout, format,
        weekday, month, day, hour, min);

where format depends on locale, and may permute the arguments. With the value:

"%1$s, %3$d. %2$s, %4$d:%5$.2d

"

one might obtain “Sonntag, 3. Juli, 10:02”.

To allocate a sufficiently large string and print into it (code correct for both glibc 2.0 and glibc 2.1):

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
char *
make_message(const char *fmt, ...)
{
    int n = 0;
    size_t size = 0;
    char *p = NULL;
    va_list ap;
    /* Determine required size. */
    va_start(ap, fmt);
    n = vsnprintf(p, size, fmt, ap);
    va_end(ap);
    if (n < 0)
        return NULL;
    size = (size_t) n + 1;      /* One extra byte for '' */
    p = malloc(size);
    if (p == NULL)
        return NULL;
    va_start(ap, fmt);
    n = vsnprintf(p, size, fmt, ap);
    va_end(ap);
    if (n < 0) {
        free(p);
        return NULL;
    }
    return p;
}

If truncation occurs in glibc versions prior to glibc 2.0.6, this is treated as an error instead of being handled gracefully.

SEE ALSO

printf(1), asprintf(3), puts(3), scanf(3), setlocale(3), strfromd(3), wcrtomb(3), wprintf(3), locale(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2416 - Linux cli command Net_DBus_Binding_Message_MethodCallpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Binding_Message_MethodCallpm and provides detailed information about the command Net_DBus_Binding_Message_MethodCallpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Binding_Message_MethodCallpm.

NAME 🖥️ Net_DBus_Binding_Message_MethodCallpm 🖥️

a message encoding a method call

DESCRIPTION

This module is part of the low-level DBus binding APIs, and should not be used by application code. No guarantees are made about APIs under the Net::DBus::Binding:: namespace being stable across releases.

This module provides a convenience constructor for creating a message representing a method call.

METHODS

my $call = Net::DBus::Binding::Message::MethodCall->new( service_name => $service, object_path => $object, interface => $interface, method_name => $name);
Create a message representing a call on the object located at the path object_path within the client owning the well-known name given by service_name. The method to be invoked has the name method_name within the interface specified by the interface parameter.

AUTHOR

Daniel P. Berrange.

COPYRIGHT

Copyright (C) 2004-2009 Daniel P. Berrange

SEE ALSO

Net::DBus::Binding::Message

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2417 - Linux cli command XtCallbackNonexclusive

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtCallbackNonexclusive and provides detailed information about the command XtCallbackNonexclusive, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtCallbackNonexclusive.

NAME 🖥️ XtCallbackNonexclusive 🖥️

map a pop-up

SYNTAX

#include <X11/Intrinsic.h>

void XtPopup(Widget popup_shell, XtGrabKind grab_kind);

void XtPopupSpringLoaded(Widget popup_shell);

void XtCallbackNone(Widget w, XtPointer client_data, XtPointer call_data);

void XtCallbackNonexclusive(Widget w, XtPointer client_data, XtPointer call_data);

void XtCallbackExclusive(Widget w, XtPointer client_data, XtPointer call_data);

ACTIONS

void XtMenuPopup(String shell_name);

ARGUMENTS

call_data
Specifies the callback data, which is not used by this procedure.

client_data
Specifies the pop-up shell.

grab_kind
Specifies the way in which user events should be constrained.

popup_shell
Specifies the widget shell.

  1. Specifies the widget.

DESCRIPTION

The XtPopup function performs the following:

  • Calls XtCheckSubclass to ensure popup_shell is a subclass of Shell.

  • Generates an error if the shell’s popped_up field is already True.

  • Calls the callback procedures on the shell’s popup_callback list.

  • Sets the shell popped_up field to True, the shell spring_loaded field to False, and the shell grab_kind field from grab_kind.

  • If the shell’s create_popup_child field is non-NULL, XtPopup calls it with popup_shell as the parameter.

  • If grab_kind is either XtGrabNonexclusive or XtGrabExclusive, it calls:

XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), False)

  • Calls XtRealizeWidget with popup_shell specified.

  • Calls XMapWindow with popup_shell specified.

The XtPopupSpringLoaded function performs exactly as XtPopup except that it sets the shell spring_loaded field to True and always calls XtAddGrab with exclusive True and spring_loaded True.

The XtCallbackNone, XtCallbackNonexclusive, and XtCallbackExclusive functions call XtPopup with the shell specified by the client data argument and grab_kind set as the name specifies. XtCallbackNone, XtCallbackNonexclusive, and XtCallbackExclusive specify XtGrabNone, XtGrabNonexclusive, and XtGrabExclusive, respectively. Each function then sets the widget that executed the callback list to be insensitive by using XtSetSensitive. Using these functions in callbacks is not required. In particular, an application must provide customized code for callbacks that create pop-up shells dynamically or that must do more than desensitizing the button.

XtMenuPopup is known to the translation manager, which must perform special actions for spring-loaded pop-ups. Calls to XtMenuPopup in a translation specification are mapped into calls to a nonexported action procedure, and the translation manager fills in parameters based on the event specified on the left-hand side of a translation.

If XtMenuPopup is invoked on ButtonPress (possibly with modifiers), the translation manager pops up the shell with grab_kind set to XtGrabExclusive and spring_loaded set to True. If XtMenuPopup is invoked on EnterWindow (possibly with modifiers), the translation manager pops up the shell with grab_kind set to XtGrabNonexclusive and spring_loaded set to False. Otherwise, the translation manager generates an error. When the widget is popped up, the following actions occur:

  • Calls XtCheckSubclass to ensure popup_shell is a subclass of Shell.

  • Generates an error if the shell’s popped_up field is already True.

  • Calls the callback procedures on the shell’s popup_callback list.

  • Sets the shell popped_up field to True and the shell grab_kind and spring_loaded fields appropriately.

  • If the shell’s create_popup_child field is non-NULL, it is called with popup_shell as the parameter.

  • Calls:

XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), spring_loaded)

  • Calls XtRealizeWidget with popup_shell specified.

  • Calls XMapWindow with popup_shell specified.

(Note that these actions are the same as those for XtPopup.) XtMenuPopup tries to find the shell by searching the widget tree starting at the parent of the widget in which it is invoked. If it finds a shell with the specified name in the pop-up children of that parent, it pops up the shell with the appropriate parameters. Otherwise, it moves up the parent chain as needed. If XtMenuPopup gets to the application widget and cannot find a matching shell, it generates an error.

SEE ALSO

XtCreatePopupShell(3), XtPopdown(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2418 - Linux cli command zip_get_file_comment

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_get_file_comment and provides detailed information about the command zip_get_file_comment, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_get_file_comment.

libzip (-lzip)

The

function is the obsolete version of

The only differences are the types of the

and

arguments.

was added in libzip 0.7. In libzip 0.10 the type of

was changed from

to

It was deprecated in libzip 0.11, use

instead.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2419 - Linux cli command XtOffsetOf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtOffsetOf and provides detailed information about the command XtOffsetOf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtOffsetOf.

NAME 🖥️ XtOffsetOf 🖥️

determine the byte offset or number of array elements

SYNTAX

#include <X11/Intrinsic.h>

Cardinal XtOffset(Type pointer_type, Field field_name);

Cardinal XtOffsetOf(Type structure_type, Field field_name);

Cardinal XtNumber(ArrayVariable array);

ARGUMENTS

array
Specifies a fixed-size array.

field_name
Specifies the name of the field for which to calculate the byte offset.

pointer_type
Specifies a type that is declared as a pointer to the structure.

structure_type
Specifies a type that is declared as a structure.

DESCRIPTION

The XtOffset macro is usually used to determine the offset of various resource fields from the beginning of a widget and can be used at compile time in static initializations.

The XtOffsetOf macro expands to a constant expression that gives the offset in bytes to the specified structure member from the beginning of the structure. It is normally used to statically initialize resource lists and is more portable than XtOffset, which serves the same function.

The XtNumber macro returns the number of elements in the specified argument lists, resources lists, and other counted arrays.

SEE ALSO

XtGetResourceList(3), XtSetArg(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2420 - Linux cli command __fwriting

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __fwriting and provides detailed information about the command __fwriting, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __fwriting.

NAME 🖥️ __fwriting 🖥️

interfaces to stdio FILE structure

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
#include <stdio_ext.h>
size_t __fbufsize(FILE *stream);
size_t __fpending(FILE *stream);
int __flbf(FILE *stream);
int __freadable(FILE *stream);
int __fwritable(FILE *stream);
int __freading(FILE *stream);
int __fwriting(FILE *stream);
int __fsetlocking(FILE *stream, int type);
void _flushlbf(void);
void __fpurge(FILE *stream);

DESCRIPTION

Solaris introduced routines to allow portable access to the internals of the FILE structure, and glibc also implemented these.

The __fbufsize() function returns the size of the buffer currently used by the given stream.

The __fpending() function returns the number of bytes in the output buffer. For wide-oriented streams the unit is wide characters. This function is undefined on buffers in reading mode, or opened read-only.

The __flbf() function returns a nonzero value if the stream is line-buffered, and zero otherwise.

The __freadable() function returns a nonzero value if the stream allows reading, and zero otherwise.

The __fwritable() function returns a nonzero value if the stream allows writing, and zero otherwise.

The __freading() function returns a nonzero value if the stream is read-only, or if the last operation on the stream was a read operation, and zero otherwise.

The __fwriting() function returns a nonzero value if the stream is write-only (or append-only), or if the last operation on the stream was a write operation, and zero otherwise.

The __fsetlocking() function can be used to select the desired type of locking on the stream. It returns the current type. The type argument can take the following three values:

FSETLOCKING_INTERNAL
Perform implicit locking around every operation on the given stream (except for the *_unlocked ones). This is the default.

FSETLOCKING_BYCALLER
The caller will take care of the locking (possibly using flockfile(3) in case there is more than one thread), and the stdio routines will not do locking until the state is reset to FSETLOCKING_INTERNAL.

FSETLOCKING_QUERY
Don’t change the type of locking. (Only return it.)

The _flushlbf() function flushes all line-buffered streams. (Presumably so that output to a terminal is forced out, say before reading keyboard input.)

The __fpurge() function discards the contents of the stream’s buffer.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

__fbufsize(), __fpending(), __fpurge(), __fsetlocking()

Thread safetyMT-Safe race:stream

__flbf(), __freadable(), __freading(), __fwritable(), __fwriting(), _flushlbf()

Thread safetyMT-Safe

SEE ALSO

flockfile(3), fpurge(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2421 - Linux cli command setutent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setutent and provides detailed information about the command setutent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setutent.

NAME 🖥️ setutent 🖥️

access utmp file entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <utmp.h>
struct utmp *getutent(void);
struct utmp *getutid(const struct utmp *ut);
struct utmp *getutline(const struct utmp *ut);
struct utmp *pututline(const struct utmp *ut);
void setutent(void);
void endutent(void);
int utmpname(const char *file);

DESCRIPTION

New applications should use the POSIX.1-specified “utmpx” versions of these functions; see STANDARDS.

utmpname() sets the name of the utmp-format file for the other utmp functions to access. If utmpname() is not used to set the filename before the other functions are used, they assume _PATH_UTMP, as defined in <paths.h>.

setutent() rewinds the file pointer to the beginning of the utmp file. It is generally a good idea to call it before any of the other functions.

endutent() closes the utmp file. It should be called when the user code is done accessing the file with the other functions.

getutent() reads a line from the current file position in the utmp file. It returns a pointer to a structure containing the fields of the line. The definition of this structure is shown in utmp(5).

getutid() searches forward from the current file position in the utmp file based upon ut. If ut->ut_type is one of RUN_LVL, BOOT_TIME, NEW_TIME, or OLD_TIME, getutid() will find the first entry whose ut_type field matches ut->ut_type. If ut->ut_type is one of INIT_PROCESS, LOGIN_PROCESS, USER_PROCESS, or DEAD_PROCESS, getutid() will find the first entry whose ut_id field matches ut->ut_id.

getutline() searches forward from the current file position in the utmp file. It scans entries whose ut_type is USER_PROCESS or LOGIN_PROCESS and returns the first one whose ut_line field matches ut->ut_line.

pututline() writes the utmp structure ut into the utmp file. It uses getutid() to search for the proper place in the file to insert the new entry. If it cannot find an appropriate slot for ut, pututline() will append the new entry to the end of the file.

RETURN VALUE

getutent(), getutid(), and getutline() return a pointer to a struct utmp on success, and NULL on failure (which includes the “record not found” case). This struct utmp is allocated in static storage, and may be overwritten by subsequent calls.

On success pututline() returns ut; on failure, it returns NULL.

utmpname() returns 0 if the new name was successfully stored, or -1 on failure.

On failure, these functions errno set to indicate the error.

ERRORS

ENOMEM
Out of memory.

ESRCH
Record not found.

setutent(), pututline(), and the getut*() functions can also fail for the reasons described in open(2).

FILES

/var/run/utmp
database of currently logged-in users

/var/log/wtmp
database of past user logins

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getutent()

Thread safety

MT-Unsafe init race:utent race:utentbuf sig:ALRM timer

getutid(), getutline()

Thread safety

MT-Unsafe init race:utent sig:ALRM timer

pututline()

Thread safety

MT-Unsafe race:utent sig:ALRM timer

setutent(), endutent(), utmpname()

Thread safetyMT-Unsafe race:utent

In the above table, utent in race:utent signifies that if any of the functions setutent(), getutent(), getutid(), getutline(), pututline(), utmpname(), or endutent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

None.

HISTORY

XPG2, SVr4.

In XPG2 and SVID 2 the function pututline() is documented to return void, and that is what it does on many systems (AIX, HP-UX). HP-UX introduces a new function _pututline() with the prototype given above for pututline().

All these functions are obsolete now on non-Linux systems. POSIX.1-2001 and POSIX.1-2008, following SUSv1, does not have any of these functions, but instead uses

#include <utmpx.h> struct utmpx *getutxent(void); struct utmpx *getutxid(const struct utmpx *); struct utmpx *getutxline(const struct utmpx *); struct utmpx *pututxline(const struct utmpx *); void setutxent(void); void endutxent(void);

These functions are provided by glibc, and perform the same task as their equivalents without the “x”, but use struct utmpx, defined on Linux to be the same as struct utmp. For completeness, glibc also provides utmpxname(), although this function is not specified by POSIX.1.

On some other systems, the utmpx structure is a superset of the utmp structure, with additional fields, and larger versions of the existing fields, and parallel files are maintained, often /var/*/utmpx and /var/*/wtmpx.

Linux glibc on the other hand does not use a parallel utmpx file since its utmp structure is already large enough. The “x” functions listed above are just aliases for their counterparts without the “x” (e.g., getutxent() is an alias for getutent()).

NOTES

glibc notes

The above functions are not thread-safe. glibc adds reentrant versions

#include <utmp.h>
int getutent_r(struct utmp *ubuf, struct utmp **ubufp);
int getutid_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);
int getutline_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getutent_r(), getutid_r(), getutline_r():

    _GNU_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */    _SVID_SOURCE || _BSD_SOURCE

These functions are GNU extensions, analogs of the functions of the same name without the _r suffix. The ubuf argument gives these functions a place to store their result. On success, they return 0, and a pointer to the result is written in *ubufp. On error, these functions return -1. There are no utmpx equivalents of the above functions. (POSIX.1 does not specify such functions.)

EXAMPLES

The following example adds and removes a utmp record, assuming it is run from within a pseudo terminal. For usage in a real application, you should check the return values of getpwuid(3) and ttyname(3).

#include <pwd.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <utmp.h>
int
main(void)
{
    struct utmp entry;
    system("echo before adding entry:;who");
    entry.ut_type = USER_PROCESS;
    entry.ut_pid = getpid();
    strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen("/dev/"));
    /* only correct for ptys named /dev/tty[pqr][0-9a-z] */
    strcpy(entry.ut_id, ttyname(STDIN_FILENO) + strlen("/dev/tty"));
    entry.ut_time = time(NULL);
    strcpy(entry.ut_user, getpwuid(getuid())->pw_name);
    memset(entry.ut_host, 0, UT_HOSTSIZE);
    entry.ut_addr = 0;
    setutent();
    pututline(&entry);
    system("echo after adding entry:;who");
    entry.ut_type = DEAD_PROCESS;
    memset(entry.ut_line, 0, UT_LINESIZE);
    entry.ut_time = 0;
    memset(entry.ut_user, 0, UT_NAMESIZE);
    setutent();
    pututline(&entry);
    system("echo after removing entry:;who");
    endutent();
    exit(EXIT_SUCCESS);
}

SEE ALSO

getutmp(3), utmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2422 - Linux cli command getprotobyname_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getprotobyname_r and provides detailed information about the command getprotobyname_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getprotobyname_r.

NAME 🖥️ getprotobyname_r 🖥️

get protocol entry (reentrant)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
int getprotoent_r(struct protoent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct protoent **restrict result);
int getprotobyname_r(const char *restrict name,
 struct protoent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct protoent **restrict result);
int getprotobynumber_r(int proto,
 struct protoent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct protoent **restrict result);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getprotoent_r(), getprotobyname_r(), getprotobynumber_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The getprotoent_r(), getprotobyname_r(), and getprotobynumber_r() functions are the reentrant equivalents of, respectively, getprotoent(3), getprotobyname(3), and getprotobynumber(3). They differ in the way that the protoent structure is returned, and in the function calling signature and return value. This manual page describes just the differences from the nonreentrant functions.

Instead of returning a pointer to a statically allocated protoent structure as the function result, these functions copy the structure into the location pointed to by result_buf.

The buf array is used to store the string fields pointed to by the returned protoent structure. (The nonreentrant functions allocate these strings in static storage.) The size of this array is specified in buflen. If buf is too small, the call fails with the error ERANGE, and the caller must try again with a larger buffer. (A buffer of length 1024 bytes should be sufficient for most applications.)

If the function call successfully obtains a protocol record, then *result is set pointing to result_buf; otherwise, *result is set to NULL.

RETURN VALUE

On success, these functions return 0. On error, they return one of the positive error numbers listed in ERRORS.

On error, record not found (getprotobyname_r(), getprotobynumber_r()), or end of input (getprotoent_r()) result is set to NULL.

ERRORS

ENOENT
(getprotoent_r()) No more records in database.

ERANGE
buf is too small. Try again with a larger buffer (and increased buflen).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getprotoent_r(), getprotobyname_r(), getprotobynumber_r()

Thread safetyMT-Safe locale

VERSIONS

Functions with similar names exist on some other systems, though typically with different calling signatures.

STANDARDS

GNU.

EXAMPLES

The program below uses getprotobyname_r() to retrieve the protocol record for the protocol named in its first command-line argument. If a second (integer) command-line argument is supplied, it is used as the initial value for buflen; if getprotobyname_r() fails with the error ERANGE, the program retries with larger buffer sizes. The following shell session shows a couple of sample runs:

$ ./a.out tcp 1
ERANGE! Retrying with larger buffer
getprotobyname_r() returned: 0 (success)  (buflen=78)
p_name=tcp; p_proto=6; aliases=TCP
$ ./a.out xxx 1
ERANGE! Retrying with larger buffer
getprotobyname_r() returned: 0 (success)  (buflen=100)
Call failed/record not found

Program source

#define _GNU_SOURCE
#include <ctype.h>
#include <errno.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_BUF 10000
int
main(int argc, char *argv[])
{
    int buflen, erange_cnt, s;
    struct protoent result_buf;
    struct protoent *result;
    char buf[MAX_BUF];
    if (argc < 2) {
        printf("Usage: %s proto-name [buflen]

“, argv[0]); exit(EXIT_FAILURE); } buflen = 1024; if (argc > 2) buflen = atoi(argv[2]); if (buflen > MAX_BUF) { printf(“Exceeded buffer limit (%d) “, MAX_BUF); exit(EXIT_FAILURE); } erange_cnt = 0; do { s = getprotobyname_r(argv[1], &result_buf, buf, buflen, &result); if (s == ERANGE) { if (erange_cnt == 0) printf(“ERANGE! Retrying with larger buffer “); erange_cnt++; /* Increment a byte at a time so we can see exactly what size buffer was required. */ buflen++; if (buflen > MAX_BUF) { printf(“Exceeded buffer limit (%d) “, MAX_BUF); exit(EXIT_FAILURE); } } } while (s == ERANGE); printf(“getprotobyname_r() returned: %s (buflen=%d) “, (s == 0) ? “0 (success)” : (s == ENOENT) ? “ENOENT” : strerror(s), buflen); if (s != 0 || result == NULL) { printf(“Call failed/record not found “); exit(EXIT_FAILURE); } printf(“p_name=%s; p_proto=%d; aliases=”, result_buf.p_name, result_buf.p_proto); for (char **p = result_buf.p_aliases; *p != NULL; p++) printf("%s “, *p); printf(” “); exit(EXIT_SUCCESS); }

SEE ALSO

getprotoent(3), protocols(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2423 - Linux cli command Moose_Meta_Rolepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Rolepm and provides detailed information about the command Moose_Meta_Rolepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Rolepm.

NAME 🖥️ Moose_Meta_Rolepm 🖥️

The Moose Role metaclass

VERSION

version 2.2207

DESCRIPTION

This class is a subclass of Class::MOP::Module that provides additional Moose-specific functionality.

Its API looks a lot like Moose::Meta::Class, but internally it implements many things differently. This may change in the future.

INHERITANCE

Moose::Meta::Role is a subclass of Class::MOP::Module.

METHODS

Construction

Moose::Meta::Role->initialize($role_name)

This method creates a new role object with the provided name.

Moose::Meta::Role->combine( [ $role => { … } ], [ $role ], … )

This method accepts a list of array references. Each array reference should contain a role name or Moose::Meta::Role object as its first element. The second element is an optional hash reference. The hash reference can contain -excludes and -alias keys to control how methods are composed from the role.

The return value is a new Moose::Meta::Role::Composite that represents the combined roles.

$metarole->composition_class_roles

When combining multiple roles using combine, this method is used to obtain a list of role names to be applied to the Moose::Meta::Role::Composite instance returned by combine. The default implementation returns an empty list. Extensions that need to hook into role combination may wrap this method to return additional role names.

Moose::Meta::Role->create($name, %options)

This method is identical to the Moose::Meta::Class create method.

Moose::Meta::Role->create_anon_role

This method is identical to the Moose::Meta::Class create_anon_class method.

$metarole->is_anon_role

Returns true if the role is an anonymous role.

$metarole->consumers

Returns a list of names of classes and roles which consume this role.

Role application

$metarole->apply( $thing, @options )

This method applies a role to the given $thing. That can be another Moose::Meta::Role, object, a Moose::Meta::Class object, or a (non-meta) object instance.

The options are passed directly to the constructor for the appropriate Moose::Meta::Role::Application subclass.

Note that this will apply the role even if the $thing in question already does this role. “does_role” in Moose::Util is a convenient wrapper for finding out if role application is necessary.

Roles and other roles

$metarole->get_roles

This returns an array reference of roles which this role does. This list may include duplicates.

$metarole->calculate_all_roles

This returns a unique list of all roles that this role does, and all the roles that its roles do.

$metarole->does_role($role)

Given a role name or Moose::Meta::Role object, returns true if this role does the given role.

$metarole->add_role($role)

Given a Moose::Meta::Role object, this adds the role to the list of roles that the role does.

$metarole->get_excluded_roles_list

Returns a list of role names which this role excludes.

$metarole->excludes_role($role_name)

Given a role name, returns true if this role excludes the named role.

$metarole->add_excluded_roles(@role_names)

Given one or more role names, adds those roles to the list of excluded roles.

Methods

The methods for dealing with a role’s methods are all identical in API and behavior to the same methods in Class::MOP::Class.

$metarole->method_metaclass

Returns the method metaclass name for the role. This defaults to Moose::Meta::Role::Method.

$metarole->get_method($name)

$metarole->has_method($name)

$metarole->add_method( $name, $body )

$metarole->get_method_list

$metarole->find_method_by_name($name)

These methods are all identical to the methods of the same name in Class::MOP::Class

Attributes

As with methods, the methods for dealing with a role’s attribute are all identical in API and behavior to the same methods in Class::MOP::Class.

However, attributes stored in this class are not stored as objects. Rather, the attribute definition is stored as a hash reference. When a role is composed into a class, this hash reference is passed directly to the metaclass’s add_attribute method.

This is quite likely to change in the future.

$metarole->get_attribute($attribute_name)

$metarole->has_attribute($attribute_name)

$metarole->get_attribute_list

$metarole->add_attribute($name, %options)

$metarole->remove_attribute($attribute_name)

Overload introspection and creation

The methods for dealing with a role’s overloads are all identical in API and behavior to the same methods in Class::MOP::Class.

$metarole->is_overloaded

$metarole->get_overloaded_operator($op)

$metarole->has_overloaded_operator($op)

$metarole->get_overload_list

$metarole->get_all_overloaded_operators

$metarole->add_overloaded_operator($op, $impl)

$metarole->remove_overloaded_operator($op)

Required methods

$metarole->get_required_method_list

Returns the list of methods required by the role.

$metarole->requires_method($name)

Returns true if the role requires the named method.

$metarole->add_required_methods(@names)

Adds the named methods to the role’s list of required methods.

$metarole->remove_required_methods(@names)

Removes the named methods from the role’s list of required methods.

$metarole->add_conflicting_method(%params)

Instantiate the parameters as a Moose::Meta::Role::Method::Conflicting object, then add it to the required method list.

Method modifiers

These methods act like their counterparts in Class::MOP::Class and Moose::Meta::Class.

However, method modifiers are simply stored internally, and are not applied until the role itself is applied to a class or object.

$metarole->add_after_method_modifier($method_name, $method)

$metarole->add_around_method_modifier($method_name, $method)

$metarole->add_before_method_modifier($method_name, $method)

$metarole->add_override_method_modifier($method_name, $method)

These methods all add an appropriate modifier to the internal list of modifiers.

$metarole->has_after_method_modifiers

$metarole->has_around_method_modifiers

$metarole->has_before_method_modifiers

$metarole->has_override_method_modifier

Return true if the role has any modifiers of the given type.

$metarole->get_after_method_modifiers($method_name)

$metarole->get_around_method_modifiers($method_name)

$metarole->get_before_method_modifiers($method_name)

Given a method name, returns a list of the appropriate modifiers for that method.

$metarole->get_override_method_modifier($method_name)

Given a method name, returns the override method modifier for that method, if it has one.

Introspection

Moose::Meta::Role->meta

This will return a Class::MOP::Class instance for this class.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2424 - Linux cli command setcontext

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setcontext and provides detailed information about the command setcontext, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setcontext.

NAME 🖥️ setcontext 🖥️

get or set the user context

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ucontext.h>
int getcontext(ucontext_t *ucp);
int setcontext(const ucontext_t *ucp);

DESCRIPTION

In a System V-like environment, one has the two types mcontext_t and ucontext_t defined in <ucontext.h> and the four functions getcontext(), setcontext(), makecontext(3), and swapcontext(3) that allow user-level context switching between multiple threads of control within a process.

The mcontext_t type is machine-dependent and opaque. The ucontext_t type is a structure that has at least the following fields:

typedef struct ucontext_t {
    struct ucontext_t *uc_link;
    sigset_t          uc_sigmask;
    stack_t           uc_stack;
    mcontext_t        uc_mcontext;
    ...
} ucontext_t;

with sigset_t and stack_t defined in <signal.h>. Here uc_link points to the context that will be resumed when the current context terminates (in case the current context was created using makecontext(3)), uc_sigmask is the set of signals blocked in this context (see sigprocmask(2)), uc_stack is the stack used by this context (see sigaltstack(2)), and uc_mcontext is the machine-specific representation of the saved context, that includes the calling thread’s machine registers.

The function getcontext() initializes the structure pointed to by ucp to the currently active context.

The function setcontext() restores the user context pointed to by ucp. A successful call does not return. The context should have been obtained by a call of getcontext(), or makecontext(3), or received as the third argument to a signal handler (see the discussion of the SA_SIGINFO flag in sigaction(2)).

If the context was obtained by a call of getcontext(), program execution continues as if this call just returned.

If the context was obtained by a call of makecontext(3), program execution continues by a call to the function func specified as the second argument of that call to makecontext(3). When the function func returns, we continue with the uc_link member of the structure ucp specified as the first argument of that call to makecontext(3). When this member is NULL, the thread exits.

If the context was obtained by a call to a signal handler, then old standard text says that “program execution continues with the program instruction following the instruction interrupted by the signal”. However, this sentence was removed in SUSv2, and the present verdict is “the result is unspecified”.

RETURN VALUE

When successful, getcontext() returns 0 and setcontext() does not return. On error, both return -1 and set errno to indicate the error.

ERRORS

None defined.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getcontext(), setcontext()

Thread safetyMT-Safe race:ucp

STANDARDS

None.

HISTORY

SUSv2, POSIX.1-2001.

POSIX.1-2008 removes these functions, citing portability issues, and recommending that applications be rewritten to use POSIX threads instead.

NOTES

The earliest incarnation of this mechanism was the setjmp(3)/ longjmp(3) mechanism. Since that does not define the handling of the signal context, the next stage was the sigsetjmp(3)/ siglongjmp(3) pair. The present mechanism gives much more control. On the other hand, there is no easy way to detect whether a return from getcontext() is from the first call, or via a setcontext() call. The user has to invent their own bookkeeping device, and a register variable won’t do since registers are restored.

When a signal occurs, the current user context is saved and a new context is created by the kernel for the signal handler. Do not leave the handler using longjmp(3): it is undefined what would happen with contexts. Use siglongjmp(3) or setcontext() instead.

SEE ALSO

sigaction(2), sigaltstack(2), sigprocmask(2), longjmp(3), makecontext(3), sigsetjmp(3), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2425 - Linux cli command stdio_ext

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command stdio_ext and provides detailed information about the command stdio_ext, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the stdio_ext.

NAME 🖥️ stdio_ext 🖥️

interfaces to stdio FILE structure

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
#include <stdio_ext.h>
size_t __fbufsize(FILE *stream);
size_t __fpending(FILE *stream);
int __flbf(FILE *stream);
int __freadable(FILE *stream);
int __fwritable(FILE *stream);
int __freading(FILE *stream);
int __fwriting(FILE *stream);
int __fsetlocking(FILE *stream, int type);
void _flushlbf(void);
void __fpurge(FILE *stream);

DESCRIPTION

Solaris introduced routines to allow portable access to the internals of the FILE structure, and glibc also implemented these.

The __fbufsize() function returns the size of the buffer currently used by the given stream.

The __fpending() function returns the number of bytes in the output buffer. For wide-oriented streams the unit is wide characters. This function is undefined on buffers in reading mode, or opened read-only.

The __flbf() function returns a nonzero value if the stream is line-buffered, and zero otherwise.

The __freadable() function returns a nonzero value if the stream allows reading, and zero otherwise.

The __fwritable() function returns a nonzero value if the stream allows writing, and zero otherwise.

The __freading() function returns a nonzero value if the stream is read-only, or if the last operation on the stream was a read operation, and zero otherwise.

The __fwriting() function returns a nonzero value if the stream is write-only (or append-only), or if the last operation on the stream was a write operation, and zero otherwise.

The __fsetlocking() function can be used to select the desired type of locking on the stream. It returns the current type. The type argument can take the following three values:

FSETLOCKING_INTERNAL
Perform implicit locking around every operation on the given stream (except for the *_unlocked ones). This is the default.

FSETLOCKING_BYCALLER
The caller will take care of the locking (possibly using flockfile(3) in case there is more than one thread), and the stdio routines will not do locking until the state is reset to FSETLOCKING_INTERNAL.

FSETLOCKING_QUERY
Don’t change the type of locking. (Only return it.)

The _flushlbf() function flushes all line-buffered streams. (Presumably so that output to a terminal is forced out, say before reading keyboard input.)

The __fpurge() function discards the contents of the stream’s buffer.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

__fbufsize(), __fpending(), __fpurge(), __fsetlocking()

Thread safetyMT-Safe race:stream

__flbf(), __freadable(), __freading(), __fwritable(), __fwriting(), _flushlbf()

Thread safetyMT-Safe

SEE ALSO

flockfile(3), fpurge(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2426 - Linux cli command XtRealloc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtRealloc and provides detailed information about the command XtRealloc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtRealloc.

NAME 🖥️ XtRealloc 🖥️

memory management functions

SYNTAX

#include <X11/Intrinsic.h>

char *XtMalloc(Cardinal size);

char *XtCalloc(Cardinal num, Cardinal size);

char *XtRealloc(char *ptr, Cardinal num);

void XtFree(char *ptr);

type *XtNew(type);

String XtNewString(String string);

Cardinal XtAsprintf(char **new_string, const char *format, …);

ARGUMENTS

num
Specifies the number of bytes or array elements.

ptr
Specifies a pointer to the old storage or to the block of storage that is to be freed.

size
Specifies the size of an array element (in bytes) or the number of bytes desired.

string
Specifies a previously declared string.

type
Specifies a previously declared data type.

new_string
Specifies a pointer to write a newly allocated string to.

format
Specifies a formatting string as defined by sprintf(3c)

DESCRIPTION

The XtMalloc functions returns a pointer to a block of storage of at least the specified size bytes. If there is insufficient memory to allocate the new block, XtMalloc calls XtErrorMsg.

The XtCalloc function allocates space for the specified number of array elements of the specified size and initializes the space to zero. If there is insufficient memory to allocate the new block, XtCalloc calls XtErrorMsg.

The XtRealloc function changes the size of a block of storage (possibly moving it). Then, it copies the old contents (or as much as will fit) into the new block and frees the old block. If there is insufficient memory to allocate the new block, XtRealloc calls XtErrorMsg. If ptr is NULL, XtRealloc allocates the new storage without copying the old contents; that is, it simply calls XtMalloc.

The XtFree function returns storage and allows it to be reused. If ptr is NULL, XtFree returns immediately.

XtNew returns a pointer to the allocated storage. If there is insufficient memory to allocate the new block, XtNew calls XtErrorMsg. XtNew is a convenience macro that calls XtMalloc with the following arguments specified:

((type *) XtMalloc((unsigned) sizeof(type))

XtNewString returns a pointer to a new string which is a duplicate of string. If there is insufficient memory to allocate the new block, or the argument is NULL XtNewString returns NULL. The memory can be freed with XtFree.

The XtAsprintf function allocates space for a string large enough to hold the string specified by the sprintf(3c) format pattern when used with the remaining arguments, and fills it with the formatted results. The address of the allocated string is placed into the pointer passed as ret. The length of the string (not including the terminating null byte) is returned. If there is insufficient memory to allocate the new block, XtAsprintf calls XtErrorMsg.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2427 - Linux cli command Params_Utilpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Params_Utilpm and provides detailed information about the command Params_Utilpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Params_Utilpm.

NAME 🖥️ Params_Utilpm 🖥️

Simple, compact and correct param-checking functions

SYNOPSIS

# Import some functions use Params::Util qw{_SCALAR _HASH _INSTANCE}; # If you are lazy, or need a lot of them… use Params::Util :ALL; sub foo { my $object = _INSTANCE(shift, Foo) or return undef; my $image = _SCALAR(shift) or return undef; my $options = _HASH(shift) or return undef; # etc… }

DESCRIPTION

Params::Util provides a basic set of importable functions that makes checking parameters a hell of a lot easier

While they can be (and are) used in other contexts, the main point behind this module is that the functions both Do What You Mean, and Do The Right Thing, so they are most useful when you are getting params passed into your code from someone and/or somewhere else and you can’t really trust the quality.

Thus, Params::Util is of most use at the edges of your API, where params and data are coming in from outside your code.

The functions provided by Params::Util check in the most strictly correct manner known, are documented as thoroughly as possible so their exact behaviour is clear, and heavily tested so make sure they are not fooled by weird data and Really Bad Things.

To use, simply load the module providing the functions you want to use as arguments (as shown in the SYNOPSIS).

To aid in maintainability, Params::Util will never export by default.

You must explicitly name the functions you want to export, or use the :ALL param to just have it export everything (although this is not recommended if you have any _FOO functions yourself with which future additions to Params::Util may clash)

FUNCTIONS

_STRING $string

The _STRING function is intended to be imported into your package, and provides a convenient way to test to see if a value is a normal non-false string of non-zero length.

Note that this will NOT do anything magic to deal with the special 0 false negative case, but will return it.

# 0 not considered valid data my $name = _STRING(shift) or die “Bad name”; # 0 is considered valid data my $string = _STRING($_[0]) ? shift : die “Bad string”;

Please also note that this function expects a normal string. It does not support overloading or other magic techniques to get a string.

Returns the string as a convenience if it is a valid string, or undef if not.

_IDENTIFIER $string

The _IDENTIFIER function is intended to be imported into your package, and provides a convenient way to test to see if a value is a string that is a valid Perl identifier.

Returns the string as a convenience if it is a valid identifier, or undef if not.

_CLASS $string

The _CLASS function is intended to be imported into your package, and provides a convenient way to test to see if a value is a string that is a valid Perl class.

This function only checks that the format is valid, not that the class is actually loaded. It also assumes “normalized” form, and does not accept class names such as ::Foo or DOh.

Returns the string as a convenience if it is a valid class name, or undef if not.

_CLASSISA $string, $class

The _CLASSISA function is intended to be imported into your package, and provides a convenient way to test to see if a value is a string that is a particularly class, or a subclass of it.

This function checks that the format is valid and calls the ->isa method on the class name. It does not check that the class is actually loaded.

It also assumes “normalized” form, and does not accept class names such as ::Foo or DOh.

Returns the string as a convenience if it is a valid class name, or undef if not.

_CLASSDOES $string, $role

This routine behaves exactly like "_CLASSISA", but checks with ->DOES rather than ->isa. This is probably only a good idea to use on Perl 5.10 or later, when UNIVERSAL::DOES has been implemented.

_SUBCLASS $string, $class

The _SUBCLASS function is intended to be imported into your package, and provides a convenient way to test to see if a value is a string that is a subclass of a specified class.

This function checks that the format is valid and calls the ->isa method on the class name. It does not check that the class is actually loaded.

It also assumes “normalized” form, and does not accept class names such as ::Foo or DOh.

Returns the string as a convenience if it is a valid class name, or undef if not.

_NUMBER $scalar

The _NUMBER function is intended to be imported into your package, and provides a convenient way to test to see if a value is a number. That is, it is defined and perl thinks it’s a number.

This function is basically a Params::Util-style wrapper around the Scalar::Util looks_like_number function.

Returns the value as a convenience, or undef if the value is not a number.

_POSINT $integer

The _POSINT function is intended to be imported into your package, and provides a convenient way to test to see if a value is a positive integer (of any length).

Returns the value as a convenience, or undef if the value is not a positive integer.

The name itself is derived from the XML schema constraint of the same name.

_NONNEGINT $integer

The _NONNEGINT function is intended to be imported into your package, and provides a convenient way to test to see if a value is a non-negative integer (of any length). That is, a positive integer, or zero.

Returns the value as a convenience, or undef if the value is not a non-negative integer.

As with other tests that may return false values, care should be taken to test via “defined” in boolean validly contexts.

unless ( defined _NONNEGINT($value) ) { die “Invalid value”; }

The name itself is derived from the XML schema constraint of the same name.

_SCALAR \scalar

The _SCALAR function is intended to be imported into your package, and provides a convenient way to test for a raw and unblessed SCALAR reference, with content of non-zero length.

For a version that allows zero length SCALAR references, see the _SCALAR0 function.

Returns the SCALAR reference itself as a convenience, or undef if the value provided is not a SCALAR reference.

_SCALAR0 \scalar

The _SCALAR0 function is intended to be imported into your package, and provides a convenient way to test for a raw and unblessed SCALAR0 reference, allowing content of zero-length.

For a simpler “give me some content” version that requires non-zero length, _SCALAR function.

Returns the SCALAR reference itself as a convenience, or undef if the value provided is not a SCALAR reference.

_ARRAY $value

The _ARRAY function is intended to be imported into your package, and provides a convenient way to test for a raw and unblessed ARRAY reference containing at least one element of any kind.

For a more basic form that allows zero length ARRAY references, see the _ARRAY0 function.

Returns the ARRAY reference itself as a convenience, or undef if the value provided is not an ARRAY reference.

_ARRAY0 $value

The _ARRAY0 function is intended to be imported into your package, and provides a convenient way to test for a raw and unblessed ARRAY reference, allowing ARRAY references that contain no elements.

For a more basic “An array of something” form that also requires at least one element, see the _ARRAY function.

Returns the ARRAY reference itself as a convenience, or undef if the value provided is not an ARRAY reference.

_ARRAYLIKE $value

The _ARRAYLIKE function tests whether a given scalar value can respond to array dereferencing. If it can, the value is returned. If it cannot, _ARRAYLIKE returns undef.

_HASH $value

The _HASH function is intended to be imported into your package, and provides a convenient way to test for a raw and unblessed HASH reference with at least one entry.

For a version of this function that allows the HASH to be empty, see the _HASH0 function.

Returns the HASH reference itself as a convenience, or undef if the value provided is not an HASH reference.

_HASH0 $value

The _HASH0 function is intended to be imported into your package, and provides a convenient way to test for a raw and unblessed HASH reference, regardless of the HASH content.

For a simpler “A hash of something” version that requires at least one element, see the _HASH function.

Returns the HASH reference itself as a convenience, or undef if the value provided is not an HASH reference.

_HASHLIKE $value

The _HASHLIKE function tests whether a given scalar value can respond to hash dereferencing. If it can, the value is returned. If it cannot, _HASHLIKE returns undef.

_CODE $value

The _CODE function is intended to be imported into your package, and provides a convenient way to test for a raw and unblessed CODE reference.

Returns the CODE reference itself as a convenience, or undef if the value provided is not an CODE reference.

_CODELIKE $value

The _CODELIKE is the more generic version of _CODE. Unlike _CODE, which checks for an explicit CODE reference, the _CODELIKE function also includes things that act like them, such as blessed objects that overload &{}.

Please note that in the case of objects overloaded with ‘&{}’, you will almost always end up also testing it in ‘bool’ context at some stage.

For example:

sub foo { my $code1 = _CODELIKE(shift) or die “No code param provided”; my $code2 = _CODELIKE(shift); if ( $code2 ) { print “Got optional second code param”; } }

As such, you will most likely always want to make sure your class has at least the following to allow it to evaluate to true in boolean context.

# Always evaluate to true in boolean context use overload bool => sub () { 1 };

Returns the callable value as a convenience, or undef if the value provided is not callable.

Note - This function was formerly known as _CALLABLE but has been renamed for greater symmetry with the other _XXXXLIKE functions.

The use of _CALLABLE has been deprecated. It will continue to work, but with a warning, until end-2006, then will be removed.

I apologize for any inconvenience caused.

_INVOCANT $value

This routine tests whether the given value is a valid method invocant. This can be either an instance of an object, or a class name.

If so, the value itself is returned. Otherwise, _INVOCANT returns undef.

_INSTANCE $object, $class

The _INSTANCE function is intended to be imported into your package, and provides a convenient way to test for an object of a particular class in a strictly correct manner.

Returns the object itself as a convenience, or undef if the value provided is not an object of that type.

_INSTANCEDOES $object, $role

This routine behaves exactly like "_INSTANCE", but checks with ->DOES rather than ->isa. This is probably only a good idea to use on Perl 5.10 or later, when UNIVERSAL::DOES has been implemented.

_REGEX $value

The _REGEX function is intended to be imported into your package, and provides a convenient way to test for a regular expression.

Returns the value itself as a convenience, or undef if the value provided is not a regular expression.

_SET \array, $class

The _SET function is intended to be imported into your package, and provides a convenient way to test for set of at least one object of a particular class in a strictly correct manner.

The set is provided as a reference to an ARRAY of objects of the class provided.

For an alternative function that allows zero-length sets, see the _SET0 function.

Returns the ARRAY reference itself as a convenience, or undef if the value provided is not a set of that class.

_SET0 \array, $class

The _SET0 function is intended to be imported into your package, and provides a convenient way to test for a set of objects of a particular class in a strictly correct manner, allowing for zero objects.

The set is provided as a reference to an ARRAY of objects of the class provided.

For an alternative function that requires at least one object, see the _SET function.

Returns the ARRAY reference itself as a convenience, or undef if the value provided is not a set of that class.

_HANDLE

The _HANDLE function is intended to be imported into your package, and provides a convenient way to test whether or not a single scalar value is a file handle.

Unfortunately, in Perl the definition of a file handle can be a little bit fuzzy, so this function is likely to be somewhat imperfect (at first anyway).

That said, it is implement as well or better than the other file handle detectors in existence (and we stole from the best of them).

_DRIVER $string

sub foo { my $class = _DRIVER(shift, My::Driver::Base) or die “Bad driver”; … }

The _DRIVER function is intended to be imported into your package, and provides a convenient way to load and validate a driver class.

The most common pattern when taking a driver class as a parameter is to check that the name is a class (i.e. check against _CLASS) and then to load the class (if it exists) and then ensure that the class returns true for the isa method on some base driver name.

Return the value as a convenience, or undef if the value is not a class name, the module does not exist, the module does not load, or the class fails the isa test.

TO DO

- Add _CAN to help resolve the UNIVERSAL::can debacle

- Implement an assertion-like version of this module, that dies on error.

- Implement a Test:: version of this module, for use in testing

SUPPORT

Bugs should be reported via the CPAN bug tracker at

<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Params-Util>

AUTHOR

Adam Kennedy <adamk AT cpan.org>

Jens Rehsack <rehsack AT cpan.org>

SEE ALSO

Params::Validate

COPYRIGHT

Copyright 2005 - 2012 Adam Kennedy.

Copyright 2020 - 2020 Jens Rehsack.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2428 - Linux cli command File_MimeInfo_Applicationspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command File_MimeInfo_Applicationspm and provides detailed information about the command File_MimeInfo_Applicationspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the File_MimeInfo_Applicationspm.

NAME 🖥️ File_MimeInfo_Applicationspm 🖥️

Find programs to open a file by mimetype

SYNOPSIS

use File::MimeInfo::Magic; use File::MimeInfo::Applications; my $file = /foo/bar; my $mimetype = mimetype($file) || die “Could not find mimetype for $file “; my ($default, @other) = mime_applications($mimetype); if (defined $default) { $default->system($file) } else { # prompt user with choice from @others # … }

DESCRIPTION

This module tries to find applications that can open files with a certain mimetype. This is done in the way suggested by the freedesktop Desktop Entry specification. This module is intended to be compatible with file managers and other applications that implement this specification.

This module depends on File::DesktopEntry being installed.

To use this module effectively you need to have the desktop-file-utils package from freedesktop and run update-desktop-database after installing new .desktop files. See <http://www.freedesktop.org/wiki/Software/desktop-file-utils>.

At the moment of writing this module is compatible with the way Nautilus (Gnome) and with Thunar (XFCE) handle applications for mimetypes. I understand KDE is still working on implementing the freedesktop mime specifications but will follow. At the very least all perl applications using this module are using the same defaults.

EXPORT

All methods are exported by default.

METHODS

mime_applications(MIMETYPE)
Returns an array of File::DesktopEntry objects. The first is the default application for this mimetype, the rest are applications that say they can handle this mimetype. If the first result is undefined there is no default application and it is good practice to ask the user which application he wants to use.

mime_applications_all(MIMETYPE)
Like mime_applications() but also takes into account applications that can open mimetypes from which MIMETYPE inherits. Parent mimetypes tell something about the data format, all code inherits from text/plain for example.

“mime_applications_set_default(MIMETYPE, APPLICATION)”
Save a default application for this mimetype. This action will affect other applications using the same mechanism to find a default application. APPLICATION can either be a File::DesktopEntry object or the basename of a .desktop file.

“mime_applications_set_custom(MIMETYPE, COMMAND)”
Save a custom shell command as default application. Generates a DesktopEntry file on the fly and calls mime_applications_set_custom. Returns the DesktopEntry object. No checks are done at all on COMMAND. It should however contain at least one word.

NOTES

This module looks for associations files in the order specified in version 1.0 of the MIME applications specification. It will also attempt a last-resort fallback to the legacy file $XDG_DATA_HOME/applications/defaults.list. In all cases, it will only write to the recommended per-user defaults file located at $XDG_CONFIG_HOME/mimeapps.list.

AUTHOR

Jaap Karssenberg <[email protected]> Maintained by Michiel Beijen <[email protected]>

COPYRIGHT

Copyright (c) 2005, 2012 Jaap G Karssenberg. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

File::DesktopEntry, File::MimeInfo, File::MimeInfo::Magic, File::BaseDir

<http://freedesktop.org/wiki/Software/desktop-file-utils/> <http://freedesktop.org/wiki/Specifications/mime-apps-spec/>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2429 - Linux cli command getrpcent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getrpcent and provides detailed information about the command getrpcent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getrpcent.

NAME 🖥️ getrpcent 🖥️

get RPC entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
struct rpcent *getrpcent(void);
struct rpcent *getrpcbyname(const char *name);
struct rpcent *getrpcbynumber(int number);
void setrpcent(int stayopen);
void endrpcent(void);

DESCRIPTION

The getrpcent(), getrpcbyname(), and getrpcbynumber() functions each return a pointer to an object with the following structure containing the broken-out fields of an entry in the RPC program number data base.

struct rpcent {
    char  *r_name;     /* name of server for this RPC program */
    char **r_aliases;  /* alias list */
    long   r_number;   /* RPC program number */
};

The members of this structure are:

r_name
The name of the server for this RPC program.

r_aliases
A NULL-terminated list of alternate names for the RPC program.

r_number
The RPC program number for this service.

The getrpcent() function reads the next entry from the database. A connection is opened to the database if necessary.

The setrpcent() function opens a connection to the database, and sets the next entry to the first entry. If stayopen is nonzero, then the connection to the database will not be closed between calls to one of the getrpc*() functions.

The endrpcent() function closes the connection to the database.

The getrpcbyname() and getrpcbynumber() functions sequentially search from the beginning of the file until a matching RPC program name or program number is found, or until end-of-file is encountered.

RETURN VALUE

On success, getrpcent(), getrpcbyname(), and getrpcbynumber() return a pointer to a statically allocated rpcent structure. NULL is returned on EOF or error.

FILES

/etc/rpc
RPC program number database.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getrpcent(), getrpcbyname(), getrpcbynumber()

Thread safetyMT-Unsafe

setrpcent(), endrpcent()

Thread safetyMT-Safe locale

STANDARDS

BSD.

HISTORY

BSD, Solaris.

BUGS

All information is contained in a static area so it must be copied if it is to be saved.

SEE ALSO

getrpcent_r(3), rpc(5), rpcinfo(8), ypserv(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2430 - Linux cli command Net_DNS_RR_DNAMEpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_DNAMEpm and provides detailed information about the command Net_DNS_RR_DNAMEpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_DNAMEpm.

NAME 🖥️ Net_DNS_RR_DNAMEpm 🖥️

DNS DNAME resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name DNAME target);

DESCRIPTION

Class for DNS Non-Terminal Name Redirection (DNAME) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

target

$target = $rr->target; $rr->target( $target );

Redirection target domain name which is to be substituted for its owner as a suffix of a domain name.

COPYRIGHT

Copyright (c)2002 Andreas Gustafsson.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC6672 <https://tools.ietf.org/html/rfc6672>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2431 - Linux cli command S_ISFIFO

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command S_ISFIFO and provides detailed information about the command S_ISFIFO, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the S_ISFIFO.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2432 - Linux cli command zip_error_code_system

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_error_code_system and provides detailed information about the command zip_error_code_system, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_error_code_system.

libzip (-lzip)

The

function returns the system specific part of the error from the zip_error error

For finding out what system reported the error, use

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2433 - Linux cli command XtSessionReturnToken

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtSessionReturnToken and provides detailed information about the command XtSessionReturnToken, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtSessionReturnToken.

NAME 🖥️ XtSessionReturnToken 🖥️

token management for checkpointing

SYNTAX

#include <X11/Intrinsic.h>

XtCheckpointToken XtSessionGetToken(Widget w);

void XtSessionReturnToken(XtCheckpointToken token);

ARGUMENTS

  1. Specifies the session widget.

token
Specifies the token to be returned.

DESCRIPTION

The XtSessionGetToken function will return NULL if the checkpoint operation instigated by the session manager is not currently under way.

To indicate the completion of a deferred save operation and to return the checkpoint token use XtSessionReturnToken.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2434 - Linux cli command floorl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command floorl and provides detailed information about the command floorl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the floorl.

NAME 🖥️ floorl 🖥️

largest integral value not greater than argument

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double floor(double x);
float floorf(float x);
long double floorl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

floorf(), floorl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the largest integral value that is not greater than x.

For example, floor(0.5) is 0.0, and floor(-0.5) is -1.0.

RETURN VALUE

These functions return the floor of x.

If x is integral, +0, -0, NaN, or an infinity, x itself is returned.

ERRORS

No errors occur. POSIX.1-2001 documents a range error for overflows, but see NOTES.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

floor(), floorf(), floorl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

SUSv2 and POSIX.1-2001 contain text about overflow (which might set errno to ERANGE, or raise an FE_OVERFLOW exception). In practice, the result cannot overflow on any current machine, so this error-handling stuff is just nonsense. (More precisely, overflow can happen only when the maximum value of the exponent is smaller than the number of mantissa bits. For the IEEE-754 standard 32-bit and 64-bit floating-point numbers the maximum value of the exponent is 127 (respectively, 1023), and the number of mantissa bits including the implicit bit is 24 (respectively, 53).)

SEE ALSO

ceil(3), lrint(3), nearbyint(3), rint(3), round(3), trunc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2435 - Linux cli command pthread_cancel

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_cancel and provides detailed information about the command pthread_cancel, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_cancel.

NAME 🖥️ pthread_cancel 🖥️

send a cancelation request to a thread

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_cancel(pthread_t thread);

DESCRIPTION

The pthread_cancel() function sends a cancelation request to the thread thread. Whether and when the target thread reacts to the cancelation request depends on two attributes that are under the control of that thread: its cancelability state and type.

A thread’s cancelability state, determined by pthread_setcancelstate(3), can be enabled (the default for new threads) or disabled. If a thread has disabled cancelation, then a cancelation request remains queued until the thread enables cancelation. If a thread has enabled cancelation, then its cancelability type determines when cancelation occurs.

A thread’s cancelation type, determined by pthread_setcanceltype(3), may be either asynchronous or deferred (the default for new threads). Asynchronous cancelability means that the thread can be canceled at any time (usually immediately, but the system does not guarantee this). Deferred cancelability means that cancelation will be delayed until the thread next calls a function that is a cancelation point. A list of functions that are or may be cancelation points is provided in pthreads(7).

When a cancelation requested is acted on, the following steps occur for thread (in this order):

  1. Cancelation clean-up handlers are popped (in the reverse of the order in which they were pushed) and called. (See pthread_cleanup_push(3).)

  2. Thread-specific data destructors are called, in an unspecified order. (See pthread_key_create(3).)

  3. The thread is terminated. (See pthread_exit(3).)

The above steps happen asynchronously with respect to the pthread_cancel() call; the return status of pthread_cancel() merely informs the caller whether the cancelation request was successfully queued.

After a canceled thread has terminated, a join with that thread using pthread_join(3) obtains PTHREAD_CANCELED as the thread’s exit status. (Joining with a thread is the only way to know that cancelation has completed.)

RETURN VALUE

On success, pthread_cancel() returns 0; on error, it returns a nonzero error number.

ERRORS

ESRCH
No thread with the ID thread could be found.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_cancel()

Thread safetyMT-Safe

VERSIONS

On Linux, cancelation is implemented using signals. Under the NPTL threading implementation, the first real-time signal (i.e., signal 32) is used for this purpose. On LinuxThreads, the second real-time signal is used, if real-time signals are available, otherwise SIGUSR2 is used.

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.0 POSIX.1-2001.

EXAMPLES

The program below creates a thread and then cancels it. The main thread joins with the canceled thread to check that its exit status was PTHREAD_CANCELED. The following shell session shows what happens when we run the program:

$ ./a.out
thread_func(): started; cancelation disabled
main(): sending cancelation request
thread_func(): about to enable cancelation
main(): thread was canceled

Program source

#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define handle_error_en(en, msg) \
        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
static void *
thread_func(void *ignored_argument)
{
    int s;
    /* Disable cancelation for a while, so that we don't
       immediately react to a cancelation request. */
    s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
    if (s != 0)
        handle_error_en(s, "pthread_setcancelstate");
    printf("%s(): started; cancelation disabled

“, func); sleep(5); printf("%s(): about to enable cancelation “, func); s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); if (s != 0) handle_error_en(s, “pthread_setcancelstate”); /* sleep() is a cancelation point. / sleep(1000); / Should get canceled while we sleep / / Should never get here. */ printf("%s(): not canceled! “, func); return NULL; } int main(void) { pthread_t thr; void res; int s; / Start a thread and then send it a cancelation request. / s = pthread_create(&thr, NULL, &thread_func, NULL); if (s != 0) handle_error_en(s, “pthread_create”); sleep(2); / Give thread a chance to get started / printf("%s(): sending cancelation request “, func); s = pthread_cancel(thr); if (s != 0) handle_error_en(s, “pthread_cancel”); / Join with thread to see what its exit status was. */ s = pthread_join(thr, &res); if (s != 0) handle_error_en(s, “pthread_join”); if (res == PTHREAD_CANCELED) printf("%s(): thread was canceled “, func); else printf("%s(): thread wasn’t canceled (shouldn’t happen!) “, func); exit(EXIT_SUCCESS); }

SEE ALSO

pthread_cleanup_push(3), pthread_create(3), pthread_exit(3), pthread_join(3), pthread_key_create(3), pthread_setcancelstate(3), pthread_setcanceltype(3), pthread_testcancel(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2436 - Linux cli command Image_ExifTool_TagNamespm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_TagNamespm and provides detailed information about the command Image_ExifTool_TagNamespm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_TagNamespm.

NAME 🖥️ Image_ExifTool_TagNamespm 🖥️

ExifTool tag name documentation

DESCRIPTION

This document contains a complete list of ExifTool tag names, organized into tables based on information type. Tag names are used to reference specific meta information extracted from or written to a file.

TAG TABLES

The tables listed below give the names of all tags recognized by ExifTool. They contain a total of 27474 tags, with 17233 unique tag names.

Tag ID, Index# or Sequence is given in the first column of each table. A Tag ID is the computer-readable equivalent of a tag name, and is the identifier that is actually stored in the file. Index# refers to the offset of a value when found at a fixed position within a data block (# is the multiplier for calculating a byte offset: 1, 2, 4 or 8). These offsets may have a decimal part which is used only to differentiate tags with values stored at the same position. (Note that writable tags within binary data blocks are not individually deletable, and the usual alternative is to set them to a value of zero.) Sequence gives the order of values for a serial data stream.

A Tag Name is the handle by which the information is accessed in ExifTool. In some instances, more than one name may correspond to a single tag ID. In these cases, the actual name used depends on the context in which the information is found. Valid characters in a tag name are A-Z, a-z, 0-9, hyphen (-) and underline (_). Case is not significant. A question mark (?) after a tag name indicates that the information is either not understood, not verified, or not very useful – these tags are not extracted by ExifTool unless the Unknown (-u) option is enabled. Be aware that some tag names are different than the descriptions printed out by default when extracting information with exiftool. To see the tag names instead of the descriptions, use exiftool -s.

The Writable column indicates whether the tag is writable by ExifTool. Anything but a no in this column means the tag is writable. A yes indicates writable information that is either unformatted or written using the existing format. Other expressions give details about the format of the stored value, and vary depending on the general type of information. The format name may be followed by a number in square brackets to indicate the number of values written, or the number of characters in a fixed-length string (including a null terminator which is added if required).

A plus sign (+) after an entry in the Writable column indicates a List tag which supports multiple values and allows individual values to be added and deleted. A slash (/) indicates a tag that ExifTool will Avoid when writing. These will be edited but not created if another same-named tag may be created instead. To create these tags, the group should be specified. A tilde (~) indicates a tag this is writable only when the print conversion is disabled (by setting PrintConv to 0, using the -n option, or suffixing the tag name with a # character). An exclamation point (!) indicates a tag that is considered Unsafe to write under normal circumstances. These tags are not written unless specified explicitly (ie. not when wildcards or “all” are used), and care should be taken when editing them manually since they may affect the way an image is rendered. An asterisk (*) indicates a Protected tag which is not writable directly, but is written automatically by ExifTool (often when a corresponding Composite or Extra tag is written). A colon (:) indicates a Mandatory tag which may be added automatically when writing (use the API NoMandatory option to avoid creating mandatory EXIF tags). Normally MakerNotes tags may not be deleted individually, but a caret (^) indicates a Deletable MakerNotes tag.

The HTML version of these tables also lists possible Values for discrete-valued tags, as well as Notes for some tags. The Values are listed with the computer-readable values on the left of the equals sign (=), and the human-readable values on the right. The human-readable values are used by default when reading and writing, but the computer-readable values may be accessed by disabling the value conversion with the -n option on the command line, by setting the PrintConv option to 0 in the API, or or on a per-tag basis by adding a hash (#) after the tag name.

Note: If you are familiar with common meta-information tag names, you may find that some ExifTool tag names are different than expected. The usual reason for this is to make the tag names more consistent across different types of meta information. To determine a tag name, either consult this documentation or run exiftool -s on a file containing the information in question.

(This documentation is the result of decades of research, testing and reverse engineering, and is the most complete metadata tag list available anywhere on the internet. It is provided not only for ExifTool users, but more importantly as a public service to help augment the collective knowledge, and is often used as a primary source of information in the development of other metadata software. Please help keep this documentation as accurate and complete as possible, and feed any new discoveries back to ExifTool. A big thanks to everyone who has helped with this so far!)

JPEG Tags

This table lists information extracted by ExifTool from JPEG images. See <https://www.w3.org/Graphics/JPEG/jfif3.pdf> for the JPEG specification.

Tag ID Tag Name Writable —— ——– ——– APP0 JFIF JFIF JFXX JFIF Extension CIFF CanonRaw AVI1 JPEG AVI1 Ocad JPEG Ocad APP1 EXIF EXIF ExtendedXMP XMP XMP XMP QVCI Casio QVCI FLIR FLIR FFF RawThermalImage no APP2 ICC_Profile ICC_Profile FPXR FlashPix MPF MPF InfiRayVersion InfiRay Version PreviewImage no APP3 Meta Kodak Meta Stim Stim JPS JPEG JPS ThermalData no ImagingData no PreviewImage no APP4 Scalado Scalado FPXR FlashPix InfiRayFactory InfiRay Factory ThermalParams DJI ThermalParams ThermalParams2 DJI ThermalParams2 ThermalParams3 DJI ThermalParams3 PreviewImage no APP5 RMETA Ricoh RMETA SamsungUniqueID Samsung APP5 InfiRayPicture InfiRay Picture ThermalCalibration no PreviewImage no APP6 EPPIM JPEG EPPIM NITF JPEG NITF HP_TDHD HP TDHD GoPro GoPro GPMF InfiRayMixMode InfiRay MixMode DJI_DTAT no APP7 Pentax Pentax Huawei Unknown Qualcomm Qualcomm InfiRayOpMode InfiRay OpMode DJI-DBG DJI Info APP8 SPIFF JPEG SPIFF InfiRayIsothermal InfiRay Isothermal APP9 MediaJukebox JPEG MediaJukebox InfiRaySensor InfiRay Sensor APP10 Comment no APP11 JPEG-HDR JPEG HDR JUMBF Jpeg2000 APP12 PictureInfo APP12 PictureInfo Ducky APP12 Ducky APP13 Photoshop Photoshop Adobe_CM JPEG AdobeCM APP14 Adobe JPEG Adobe APP15 GraphicConverter JPEG GraphConv COM Comment yes DQT DefineQuantizationTable no SOF StartOfFrame JPEG SOF Trailer AFCP AFCP CanonVRD CanonVRD FotoStation FotoStation PhotoMechanic PhotoMechanic MIE MIE Samsung Samsung Trailer EmbeddedVideo no Insta360 no NikonApp no SonyHiddenData no PreviewImage yes

JPEG AVI1 Tags

This information may be found in APP0 of JPEG image data from AVI videos.

Index1 Tag Name Writable —— ——– ——– 0 InterleavedField no

JPEG Ocad Tags

Tags extracted from the JPEG APP0 “Ocad” segment (found in Photobucket images).

Tag ID Tag Name Writable —— ——– ——– Rev OcadRevision no

JPEG JPS Tags

Tags found in JPEG Stereo (JPS) images.

Index1 Tag Name Writable —— ——– ——– 10 JPSSeparation no 11 JPSFlags no 12 JPSLayout no 13 JPSType no 16 JPSComment no

JPEG EPPIM Tags

APP6 is used in by the Toshiba PDR-M700 to store a TIFF structure containing PrintIM information.

Tag ID Tag Name Writable —— ——– ——– 0xc4a5 PrintIM PrintIM

JPEG NITF Tags

Information in APP6 used by the National Imagery Transmission Format. See <http://www.gwg.nga.mil/ntb/baseline/docs/n010697/bwcguide25aug98.pdf> for the official specification.

Index1 Tag Name Writable —— ——– ——– 0 NITFVersion no 2 ImageFormat no 3 BlocksPerRow no 5 BlocksPerColumn no 7 ImageColor no 8 BitDepth no 9 ImageClass no 10 JPEGProcess no 11 Quality no 12 StreamColor no 13 StreamBitDepth no 14 Flags no

JPEG SPIFF Tags

This information is found in APP8 of SPIFF-style JPEG images (the “official” yet rarely used JPEG file format standard: Still Picture Interchange File Format). See <http://www.jpeg.org/public/spiff.pdf> for the official specification.

Index1 Tag Name Writable —— ——– ——– 0 SPIFFVersion no 2 ProfileID no 3 ColorComponents no 6 ImageHeight no 10 ImageWidth no 14 ColorSpace no 15 BitsPerSample no 16 Compression no 17 ResolutionUnit no 18 YResolution no 22 XResolution no

JPEG MediaJukebox Tags

Tags found in the XML metadata of the APP9 “Media Jukebox” segment.

Tag Name Writable ——– ——– Album no Caption no Date no Keywords no Name no People no Places no Tool_Name no Tool_Version no

JPEG HDR Tags

Information extracted from APP11 of a JPEG-HDR image.

Tag ID Tag Name Writable —— ——– ——– RatioImage RatioImage no alp Alpha no bet Beta no cor CorrectionMethod no ln0 Ln0 no ln1 Ln1 no s2n S2n no ver JPEG-HDRVersion no

JPEG AdobeCM Tags

The APP13 “Adobe_CM” segment presumably contains color management information, but the meaning of the data is currently unknown. If anyone has an idea about what this means, please let me know.

Index2 Tag Name Writable —— ——– ——– 0 AdobeCMType no

JPEG Adobe Tags

The APP14 “Adobe” segment stores image encoding information for DCT filters. This segment may be copied or deleted as a block using the Extra “Adobe” tag, but note that it is not deleted by default when deleting all metadata because it may affect the appearance of the image.

Index2 Tag Name Writable —— ——– ——– 0 DCTEncodeVersion no 1 APP14Flags0 no 2 APP14Flags1 no 3 ColorTransform no

JPEG GraphConv Tags

APP15 is used by GraphicConverter to store JPEG quality.

Tag ID Tag Name Writable —— ——– ——– Q Quality no

JPEG SOF Tags

This information is extracted from the JPEG Start Of Frame segment.

Tag Name Writable ——– ——– BitsPerSample no ColorComponents no EncodingProcess no ImageHeight no ImageWidth no YCbCrSubSampling no

EXIF Tags

EXIF stands for “Exchangeable Image File Format”. This type of information is formatted according to the TIFF specification, and may be found in JPG, TIFF, PNG, JP2, PGF, MIFF, HDP, PSP and XCF images, as well as many TIFF-based RAW images, and even some AVI and MOV videos.

The EXIF meta information is organized into different Image File Directories (IFD’s) within an image. The names of these IFD’s correspond to the ExifTool family 1 group names. When writing EXIF information, the default Group listed below is used unless another group is specified.

Mandatory tags (indicated by a colon after the Writable type) may be added automatically with default values when creating a new IFD, and the IFD is removed automatically when deleting tags if only default-valued mandatory tags remain.

The table below lists all EXIF tags. Also listed are TIFF, DNG, HDP and other tags which are not part of the EXIF specification, but may co-exist with EXIF tags in some images. Tags which are part of the EXIF 2.32 specification have an underlined Tag Name in the HTML version of this documentation. See <https://web.archive.org/web/20190624045241if_/http://www.cipa.jp:80/std/documents/e/DC-008-Translation-2019-E.pdf> for the official EXIF 2.32 specification.

Tag ID Tag Name Group Writable —— ——– —– ——– 0x0001 InteropIndex InteropIFD string! 0x0002 InteropVersion InteropIFD undef!: 0x000b ProcessingSoftware IFD0 string 0x00fe SubfileType IFD0 int32u! 0x00ff OldSubfileType IFD0 int16u! 0x0100 ImageWidth IFD0 int32u! 0x0101 ImageHeight IFD0 int32u! 0x0102 BitsPerSample IFD0 int16u[n]! 0x0103 Compression IFD0 int16u!: 0x0106 PhotometricInterpretation IFD0 int16u! 0x0107 Thresholding IFD0 int16u! 0x0108 CellWidth IFD0 int16u! 0x0109 CellLength IFD0 int16u! 0x010a FillOrder IFD0 int16u! 0x010d DocumentName IFD0 string 0x010e ImageDescription IFD0 string 0x010f Make IFD0 string 0x0110 Model IFD0 string 0x0111 StripOffsets - no OtherImageStart - no StripOffsets - no PreviewImageStart IFD0 int32u* PreviewImageStart All int32u* JpgFromRawStart SubIFD2 int32u* 0x0112 Orientation IFD0 int16u 0x0115 SamplesPerPixel IFD0 int16u! 0x0116 RowsPerStrip IFD0 int32u! 0x0117 StripByteCounts - no OtherImageLength - no StripByteCounts - no PreviewImageLength IFD0 int32u* PreviewImageLength All int32u* JpgFromRawLength SubIFD2 int32u* 0x0118 MinSampleValue IFD0 int16u 0x0119 MaxSampleValue IFD0 int16u 0x011a XResolution IFD0 rational64u: 0x011b YResolution IFD0 rational64u: 0x011c PlanarConfiguration IFD0 int16u! 0x011d PageName IFD0 string 0x011e XPosition IFD0 rational64u 0x011f YPosition IFD0 rational64u 0x0120 FreeOffsets - no 0x0121 FreeByteCounts - no 0x0122 GrayResponseUnit IFD0 int16u 0x0123 GrayResponseCurve - no 0x0124 T4Options - no 0x0125 T6Options - no 0x0128 ResolutionUnit IFD0 int16u: 0x0129 PageNumber IFD0 int16u[2] 0x012c ColorResponseUnit - no 0x012d TransferFunction IFD0 int16u[768]! 0x0131 Software IFD0 string 0x0132 ModifyDate IFD0 string 0x013b Artist IFD0 string 0x013c HostComputer IFD0 string 0x013d Predictor IFD0 int16u! 0x013e WhitePoint IFD0 rational64u[2] 0x013f PrimaryChromaticities IFD0 rational64u[6] 0x0140 ColorMap - no 0x0141 HalftoneHints IFD0 int16u[2] 0x0142 TileWidth IFD0 int32u! 0x0143 TileLength IFD0 int32u! 0x0144 TileOffsets - no 0x0145 TileByteCounts - no 0x0146 BadFaxLines - no 0x0147 CleanFaxData - no 0x0148 ConsecutiveBadFaxLines - no 0x014a SubIFD - EXIF A100DataOffset IFD0 no 0x014c InkSet IFD0 int16u 0x014d InkNames - no 0x014e NumberofInks - no 0x0150 DotRange - no 0x0151 TargetPrinter IFD0 string 0x0152 ExtraSamples - no 0x0153 SampleFormat SubIFD no 0x0154 SMinSampleValue - no 0x0155 SMaxSampleValue - no 0x0156 TransferRange - no 0x0157 ClipPath - no 0x0158 XClipPathUnits - no 0x0159 YClipPathUnits - no 0x015a Indexed - no 0x015b JPEGTables - no 0x015f OPIProxy - no 0x0190 GlobalParametersIFD - EXIF 0x0191 ProfileType - no 0x0192 FaxProfile - no 0x0193 CodingMethods - no 0x0194 VersionYear - no 0x0195 ModeNumber - no 0x01b1 Decode - no 0x01b2 DefaultImageColor - no 0x01b3 T82Options - no 0x01b5 JPEGTables - no 0x0200 JPEGProc - no 0x0201 ThumbnailOffset IFD1 int32u* ThumbnailOffset IFD0 int32u* ThumbnailOffset SubIFD int32u* PreviewImageStart MakerNotes int32u* PreviewImageStart IFD0 int32u* JpgFromRawStart SubIFD int32u* JpgFromRawStart IFD2 int32u* OtherImageStart SubIFD1 int32u* OtherImageStart SubIFD2 int32u* OtherImageStart - no 0x0202 ThumbnailLength IFD1 int32u* ThumbnailLength IFD0 int32u* ThumbnailLength SubIFD int32u* PreviewImageLength MakerNotes int32u* PreviewImageLength IFD0 int32u* JpgFromRawLength SubIFD int32u* JpgFromRawLength IFD2 int32u* OtherImageLength SubIFD1 int32u* OtherImageLength SubIFD2 int32u* OtherImageLength - no 0x0203 JPEGRestartInterval - no 0x0205 JPEGLosslessPredictors - no 0x0206 JPEGPointTransforms - no 0x0207 JPEGQTables - no 0x0208 JPEGDCTables - no 0x0209 JPEGACTables - no 0x0211 YCbCrCoefficients IFD0 rational64u[3]! 0x0212 YCbCrSubSampling IFD0 int16u[2]! 0x0213 YCbCrPositioning IFD0 int16u!: 0x0214 ReferenceBlackWhite IFD0 rational64u[6] 0x022f StripRowCounts - no 0x02bc ApplicationNotes IFD0 XMP 0x0303 RenderingIntent - no 0x03e7 USPTOMiscellaneous - no 0x1000 RelatedImageFileFormat InteropIFD string! 0x1001 RelatedImageWidth InteropIFD int16u! 0x1002 RelatedImageHeight InteropIFD int16u! 0x4746 Rating IFD0 int16u/ 0x4747 XP_DIP_XML - no 0x4748 StitchInfo - Microsoft Stitch 0x4749 RatingPercent IFD0 int16u/ 0x5001 ResolutionXUnit - no 0x5002 ResolutionYUnit - no 0x5003 ResolutionXLengthUnit - no 0x5004 ResolutionYLengthUnit - no 0x5005 PrintFlags - no 0x5006 PrintFlagsVersion - no 0x5007 PrintFlagsCrop - no 0x5008 PrintFlagsBleedWidth - no 0x5009 PrintFlagsBleedWidthScale - no 0x500a HalftoneLPI - no 0x500b HalftoneLPIUnit - no 0x500c HalftoneDegree - no 0x500d HalftoneShape - no 0x500e HalftoneMisc - no 0x500f HalftoneScreen - no 0x5010 JPEGQuality - no 0x5011 GridSize - no 0x5012 ThumbnailFormat - no 0x5013 ThumbnailWidth - no 0x5014 ThumbnailHeight - no 0x5015 ThumbnailColorDepth - no 0x5016 ThumbnailPlanes - no 0x5017 ThumbnailRawBytes - no 0x5018 ThumbnailLength - no 0x5019 ThumbnailCompressedSize - no 0x501a ColorTransferFunction - no 0x501b ThumbnailData - no 0x5020 ThumbnailImageWidth - no 0x5021 ThumbnailImageHeight - no 0x5022 ThumbnailBitsPerSample - no 0x5023 ThumbnailCompression - no 0x5024 ThumbnailPhotometricInterp - no 0x5025 ThumbnailDescription - no 0x5026 ThumbnailEquipMake - no 0x5027 ThumbnailEquipModel - no 0x5028 ThumbnailStripOffsets - no 0x5029 ThumbnailOrientation - no 0x502a ThumbnailSamplesPerPixel - no 0x502b ThumbnailRowsPerStrip - no 0x502c ThumbnailStripByteCounts - no 0x502d ThumbnailResolutionX - no 0x502e ThumbnailResolutionY - no 0x502f ThumbnailPlanarConfig - no 0x5030 ThumbnailResolutionUnit - no 0x5031 ThumbnailTransferFunction - no 0x5032 ThumbnailSoftware - no 0x5033 ThumbnailDateTime - no 0x5034 ThumbnailArtist - no 0x5035 ThumbnailWhitePoint - no 0x5036 ThumbnailPrimaryChromaticities - no 0x5037 ThumbnailYCbCrCoefficients - no 0x5038 ThumbnailYCbCrSubsampling - no 0x5039 ThumbnailYCbCrPositioning - no 0x503a ThumbnailRefBlackWhite - no 0x503b ThumbnailCopyright - no 0x5090 LuminanceTable - no 0x5091 ChrominanceTable - no 0x5100 FrameDelay - no 0x5101 LoopCount - no 0x5102 GlobalPalette - no 0x5103 IndexBackground - no 0x5104 IndexTransparent - no 0x5110 PixelUnits - no 0x5111 PixelsPerUnitX - no 0x5112 PixelsPerUnitY - no 0x5113 PaletteHistogram - no 0x7000 SonyRawFileType - no 0x7010 SonyToneCurve - no 0x7031 VignettingCorrection SubIFD int16s! 0x7032 VignettingCorrParams SubIFD int16s[17]! 0x7034 ChromaticAberrationCorrection SubIFD int16s! 0x7035 ChromaticAberrationCorrParams SubIFD int16s[33]! 0x7036 DistortionCorrection SubIFD int16s! 0x7037 DistortionCorrParams SubIFD int16s[17]! 0x7038 SonyRawImageSize SubIFD int32u[2]! 0x7310 BlackLevel SubIFD int16u[4]! 0x7313 WB_RGGBLevels SubIFD int16s[4]! 0x74c7 SonyCropTopLeft SubIFD int32u[2]! 0x74c8 SonyCropSize SubIFD int32u[2]! 0x800d ImageID - no 0x80a3 WangTag1 - no 0x80a4 WangAnnotation - no 0x80a5 WangTag3 - no 0x80a6 WangTag4 - no 0x80b9 ImageReferencePoints - no 0x80ba RegionXformTackPoint - no 0x80bb WarpQuadrilateral - no 0x80bc AffineTransformMat - no 0x80e3 Matteing - no 0x80e4 DataType - no 0x80e5 ImageDepth - no 0x80e6 TileDepth - no 0x8214 ImageFullWidth - no 0x8215 ImageFullHeight - no 0x8216 TextureFormat - no 0x8217 WrapModes - no 0x8218 FovCot - no 0x8219 MatrixWorldToScreen - no 0x821a MatrixWorldToCamera - no 0x827d Model2 - no 0x828d CFARepeatPatternDim SubIFD int16u[2]! 0x828e CFAPattern2 SubIFD int8u[n]! 0x828f BatteryLevel - no 0x8290 KodakIFD - Kodak IFD 0x8298 Copyright IFD0 string 0x829a ExposureTime ExifIFD rational64u 0x829d FNumber ExifIFD rational64u 0x82a5 MDFileTag - no 0x82a6 MDScalePixel - no 0x82a7 MDColorTable - no 0x82a8 MDLabName - no 0x82a9 MDSampleInfo - no 0x82aa MDPrepDate - no 0x82ab MDPrepTime - no 0x82ac MDFileUnits - no 0x830e PixelScale IFD0 double[3] 0x8335 AdventScale - no 0x8336 AdventRevision - no 0x835c UIC1Tag - no 0x835d UIC2Tag - no 0x835e UIC3Tag - no 0x835f UIC4Tag - no 0x83bb IPTC-NAA IFD0 IPTC 0x847e IntergraphPacketData - no 0x847f IntergraphFlagRegisters - no 0x8480 IntergraphMatrix IFD0 double[n] 0x8481 INGRReserved - no 0x8482 ModelTiePoint IFD0 double[n] 0x84e0 Site - no 0x84e1 ColorSequence - no 0x84e2 IT8Header - no 0x84e3 RasterPadding - no 0x84e4 BitsPerRunLength - no 0x84e5 BitsPerExtendedRunLength - no 0x84e6 ColorTable - no 0x84e7 ImageColorIndicator - no 0x84e8 BackgroundColorIndicator - no 0x84e9 ImageColorValue - no 0x84ea BackgroundColorValue - no 0x84eb PixelIntensityRange - no 0x84ec TransparencyIndicator - no 0x84ed ColorCharacterization - no 0x84ee HCUsage - no 0x84ef TrapIndicator - no 0x84f0 CMYKEquivalent - no 0x8546 SEMInfo IFD0 string 0x8568 AFCP_IPTC - IPTC 0x85b8 PixelMagicJBIGOptions - no 0x85d7 JPLCartoIFD - no 0x85d8 ModelTransform IFD0 double[16] 0x8602 WB_GRGBLevels - no 0x8606 LeafData - Leaf 0x8649 PhotoshopSettings IFD0 Photoshop 0x8769 ExifOffset IFD0 EXIF 0x8773 ICC_Profile IFD0 ICC_Profile 0x877f TIFF_FXExtensions - no 0x8780 MultiProfiles - no 0x8781 SharedData - no 0x8782 T88Options - no 0x87ac ImageLayer - no 0x87af GeoTiffDirectory IFD0 int16u[0.5] 0x87b0 GeoTiffDoubleParams IFD0 double[0.125] 0x87b1 GeoTiffAsciiParams IFD0 string 0x87be JBIGOptions - no 0x8822 ExposureProgram ExifIFD int16u 0x8824 SpectralSensitivity ExifIFD string 0x8825 GPSInfo IFD0 GPS 0x8827 ISO ExifIFD int16u[n] 0x8828 Opto-ElectricConvFactor - no 0x8829 Interlace - no 0x882a TimeZoneOffset ExifIFD int16s[n] 0x882b SelfTimerMode ExifIFD int16u 0x8830 SensitivityType ExifIFD int16u 0x8831 StandardOutputSensitivity ExifIFD int32u 0x8832 RecommendedExposureIndex ExifIFD int32u 0x8833 ISOSpeed ExifIFD int32u 0x8834 ISOSpeedLatitudeyyy ExifIFD int32u 0x8835 ISOSpeedLatitudezzz ExifIFD int32u 0x885c FaxRecvParams - no 0x885d FaxSubAddress - no 0x885e FaxRecvTime - no 0x8871 FedexEDR - no 0x888a LeafSubIFD - Leaf SubIFD 0x9000 ExifVersion ExifIFD undef: 0x9003 DateTimeOriginal ExifIFD string 0x9004 CreateDate ExifIFD string 0x9009 GooglePlusUploadCode ExifIFD undef[n] 0x9010 OffsetTime ExifIFD string 0x9011 OffsetTimeOriginal ExifIFD string 0x9012 OffsetTimeDigitized ExifIFD string 0x9101 ComponentsConfiguration ExifIFD undef[4]!: 0x9102 CompressedBitsPerPixel ExifIFD rational64u! 0x9201 ShutterSpeedValue ExifIFD rational64s 0x9202 ApertureValue ExifIFD rational64u 0x9203 BrightnessValue ExifIFD rational64s 0x9204 ExposureCompensation ExifIFD rational64s 0x9205 MaxApertureValue ExifIFD rational64u 0x9206 SubjectDistance ExifIFD rational64u 0x9207 MeteringMode ExifIFD int16u 0x9208 LightSource ExifIFD int16u 0x9209 Flash ExifIFD int16u 0x920a FocalLength ExifIFD rational64u 0x920b FlashEnergy - no 0x920c SpatialFrequencyResponse - no 0x920d Noise - no 0x920e FocalPlaneXResolution - no 0x920f FocalPlaneYResolution - no 0x9210 FocalPlaneResolutionUnit - no 0x9211 ImageNumber ExifIFD int32u 0x9212 SecurityClassification ExifIFD string 0x9213 ImageHistory ExifIFD string 0x9214 SubjectArea ExifIFD int16u[n] 0x9215 ExposureIndex - no 0x9216 TIFF-EPStandardID - no 0x9217 SensingMethod - no 0x923a CIP3DataFile - no 0x923b CIP3Sheet - no 0x923c CIP3Side - no 0x923f StoNits - no 0x927c MakerNoteApple ExifIFD Apple MakerNoteNikon ExifIFD Nikon MakerNoteCanon ExifIFD Canon MakerNoteCasio ExifIFD Casio MakerNoteCasio2 ExifIFD Casio Type2 MakerNoteDJIInfo ExifIFD DJI Info MakerNoteDJI ExifIFD DJI MakerNoteFLIR ExifIFD FLIR MakerNoteFujiFilm ExifIFD FujiFilm MakerNoteGE ExifIFD GE MakerNoteGE2 ExifIFD FujiFilm MakerNoteHasselblad ExifIFD Unknown MakerNoteHP ExifIFD HP MakerNoteHP2 ExifIFD HP Type2 MakerNoteHP4 ExifIFD HP Type4 MakerNoteHP6 ExifIFD HP Type6 MakerNoteISL ExifIFD Unknown MakerNoteJVC ExifIFD JVC MakerNoteJVCText ExifIFD JVC Text MakerNoteKodak1a ExifIFD Kodak MakerNoteKodak1b ExifIFD Kodak MakerNoteKodak2 ExifIFD Kodak Type2 MakerNoteKodak3 ExifIFD Kodak Type3 MakerNoteKodak4 ExifIFD Kodak Type4 MakerNoteKodak5 ExifIFD Kodak Type5 MakerNoteKodak6a ExifIFD Kodak Type6 MakerNoteKodak6b ExifIFD Kodak Type6 MakerNoteKodak7 ExifIFD Kodak Type7 MakerNoteKodak8a ExifIFD Kodak Type8 MakerNoteKodak8b ExifIFD Kodak Type8 MakerNoteKodak8c ExifIFD Kodak Type8 MakerNoteKodak9 ExifIFD Kodak Type9 MakerNoteKodak10 ExifIFD Kodak Type10 MakerNoteKodak11 ExifIFD Kodak Type11 MakerNoteKodak12 ExifIFD Kodak Type11 MakerNoteKodakUnknown ExifIFD Kodak Unknown MakerNoteKyocera ExifIFD Unknown MakerNoteMinolta ExifIFD Minolta MakerNoteMinolta2 ExifIFD Olympus MakerNoteMinolta3 ExifIFD undef MakerNoteMotorola ExifIFD Motorola MakerNoteNikon2 ExifIFD Nikon Type2 MakerNoteNikon3 ExifIFD Nikon MakerNoteNintendo ExifIFD Nintendo MakerNoteOlympus ExifIFD Olympus MakerNoteOlympus2 ExifIFD Olympus MakerNoteOlympus3 ExifIFD Olympus MakerNoteLeica ExifIFD Panasonic MakerNoteLeica2 ExifIFD Panasonic Leica2 MakerNoteLeica3 ExifIFD Panasonic Leica3 MakerNoteLeica4 ExifIFD Panasonic Leica4 MakerNoteLeica5 ExifIFD Panasonic Leica5 MakerNoteLeica6 ExifIFD Panasonic Leica6 MakerNoteLeica7 ExifIFD Panasonic Leica6 MakerNoteLeica8 ExifIFD Panasonic Leica5 MakerNoteLeica9 ExifIFD Panasonic Leica9 MakerNoteLeica10 ExifIFD Panasonic MakerNotePanasonic ExifIFD Panasonic MakerNotePanasonic2 ExifIFD Panasonic Type2 MakerNotePanasonic3 ExifIFD Panasonic MakerNotePentax ExifIFD Pentax MakerNotePentax2 ExifIFD Pentax Type2 MakerNotePentax3 ExifIFD Casio Type2 MakerNotePentax4 ExifIFD Pentax Type4 MakerNotePentax5 ExifIFD Pentax MakerNotePentax6 ExifIFD Pentax S1 MakerNotePhaseOne ExifIFD PhaseOne MakerNoteReconyx ExifIFD Reconyx MakerNoteReconyx2 ExifIFD Reconyx Type2 MakerNoteReconyx3 ExifIFD Reconyx Type3 MakerNoteRicohPentax ExifIFD Pentax MakerNoteRicoh ExifIFD Ricoh MakerNoteRicoh2 ExifIFD Ricoh Type2 MakerNoteRicohText ExifIFD Ricoh Text MakerNoteSamsung1a ExifIFD undef MakerNoteSamsung1b ExifIFD Samsung MakerNoteSamsung2 ExifIFD Samsung Type2 MakerNoteSanyo ExifIFD Sanyo MakerNoteSanyoC4 ExifIFD Sanyo MakerNoteSanyoPatch ExifIFD Sanyo MakerNoteSigma ExifIFD Sigma MakerNoteSony ExifIFD Sony MakerNoteSony2 ExifIFD Olympus MakerNoteSony3 ExifIFD Olympus MakerNoteSony4 ExifIFD Sony PIC MakerNoteSony5 ExifIFD Sony MakerNoteSonyEricsson ExifIFD Sony Ericsson MakerNoteSonySRF ExifIFD Sony SRF MakerNoteUnknownText ExifIFD undef MakerNoteUnknownBinary ExifIFD undef MakerNoteUnknown ExifIFD Unknown 0x9286 UserComment ExifIFD undef 0x9290 SubSecTime ExifIFD string 0x9291 SubSecTimeOriginal ExifIFD string 0x9292 SubSecTimeDigitized ExifIFD string 0x932f MSDocumentText - no 0x9330 MSPropertySetStorage - no 0x9331 MSDocumentTextPosition - no 0x935c ImageSourceData IFD0 Photoshop DocumentData 0x9400 AmbientTemperature ExifIFD rational64s 0x9401 Humidity ExifIFD rational64u 0x9402 Pressure ExifIFD rational64u 0x9403 WaterDepth ExifIFD rational64s 0x9404 Acceleration ExifIFD rational64u 0x9405 CameraElevationAngle ExifIFD rational64s 0x9999 XiaomiSettings ExifIFD JSON 0x9a00 XiaomiModel ExifIFD string! 0x9c9b XPTitle IFD0 int8u 0x9c9c XPComment IFD0 int8u 0x9c9d XPAuthor IFD0 int8u 0x9c9e XPKeywords IFD0 int8u 0x9c9f XPSubject IFD0 int8u 0xa000 FlashpixVersion ExifIFD undef: 0xa001 ColorSpace ExifIFD int16u: 0xa002 ExifImageWidth ExifIFD int16u: 0xa003 ExifImageHeight ExifIFD int16u: 0xa004 RelatedSoundFile ExifIFD string 0xa005 InteropOffset - EXIF 0xa010 SamsungRawPointersOffset - no 0xa011 SamsungRawPointersLength - no 0xa101 SamsungRawByteOrder - no 0xa102 SamsungRawUnknown? - no 0xa20b FlashEnergy ExifIFD rational64u 0xa20c SpatialFrequencyResponse - no 0xa20d Noise - no 0xa20e FocalPlaneXResolution ExifIFD rational64u 0xa20f FocalPlaneYResolution ExifIFD rational64u 0xa210 FocalPlaneResolutionUnit ExifIFD int16u 0xa211 ImageNumber - no 0xa212 SecurityClassification - no 0xa213 ImageHistory - no 0xa214 SubjectLocation ExifIFD int16u[2] 0xa215 ExposureIndex ExifIFD rational64u 0xa216 TIFF-EPStandardID - no 0xa217 SensingMethod ExifIFD int16u 0xa300 FileSource ExifIFD undef 0xa301 SceneType ExifIFD undef 0xa302 CFAPattern ExifIFD undef 0xa401 CustomRendered ExifIFD int16u 0xa402 ExposureMode ExifIFD int16u 0xa403 WhiteBalance ExifIFD int16u 0xa404 DigitalZoomRatio ExifIFD rational64u 0xa405 FocalLengthIn35mmFormat ExifIFD int16u 0xa406 SceneCaptureType ExifIFD int16u 0xa407 GainControl ExifIFD int16u 0xa408 Contrast ExifIFD int16u 0xa409 Saturation ExifIFD int16u 0xa40a Sharpness ExifIFD int16u 0xa40b DeviceSettingDescription - no 0xa40c SubjectDistanceRange ExifIFD int16u 0xa420 ImageUniqueID ExifIFD string 0xa430 OwnerName ExifIFD string 0xa431 SerialNumber ExifIFD string 0xa432 LensInfo ExifIFD rational64u[4] 0xa433 LensMake ExifIFD string 0xa434 LensModel ExifIFD string 0xa435 LensSerialNumber ExifIFD string 0xa436 Title ExifIFD string/ 0xa437 Photographer ExifIFD string 0xa438 ImageEditor ExifIFD string 0xa439 CameraFirmware ExifIFD string 0xa43a RAWDevelopingSoftware ExifIFD string 0xa43b ImageEditingSoftware ExifIFD string 0xa43c MetadataEditingSoftware ExifIFD string 0xa460 CompositeImage ExifIFD int16u 0xa461 CompositeImageCount ExifIFD int16u[2] 0xa462 CompositeImageExposureTimes ExifIFD undef 0xa480 GDALMetadata IFD0 string 0xa481 GDALNoData IFD0 string 0xa500 Gamma ExifIFD rational64u 0xafc0 ExpandSoftware - no 0xafc1 ExpandLens - no 0xafc2 ExpandFilm - no 0xafc3 ExpandFilterLens - no 0xafc4 ExpandScanner - no 0xafc5 ExpandFlashLamp - no 0xb4c3 HasselbladRawImage - no 0xbc01 PixelFormat - no 0xbc02 Transformation - no 0xbc03 Uncompressed - no 0xbc04 ImageType - no 0xbc80 ImageWidth - no 0xbc81 ImageHeight - no 0xbc82 WidthResolution - no 0xbc83 HeightResolution - no 0xbcc0 ImageOffset - no 0xbcc1 ImageByteCount - no 0xbcc2 AlphaOffset - no 0xbcc3 AlphaByteCount - no 0xbcc4 ImageDataDiscard - no 0xbcc5 AlphaDataDiscard - no 0xc427 OceScanjobDesc - no 0xc428 OceApplicationSelector - no 0xc429 OceIDNumber - no 0xc42a OceImageLogic - no 0xc44f Annotations - no 0xc4a5 PrintIM IFD0 PrintIM 0xc519 HasselbladXML - PLIST 0xc51b HasselbladExif - EXIF 0xc573 OriginalFileName - no 0xc580 USPTOOriginalContentType - no 0xc5e0 CR2CFAPattern - no 0xc612 DNGVersion IFD0 int8u[4]! 0xc613 DNGBackwardVersion IFD0 int8u[4]! 0xc614 UniqueCameraModel IFD0 string 0xc615 LocalizedCameraModel IFD0 string 0xc616 CFAPlaneColor SubIFD no 0xc617 CFALayout SubIFD no 0xc618 LinearizationTable SubIFD int16u[n]! 0xc619 BlackLevelRepeatDim SubIFD int16u[2]! 0xc61a BlackLevel SubIFD rational64u[n]! 0xc61b BlackLevelDeltaH SubIFD rational64s[n]! 0xc61c BlackLevelDeltaV SubIFD rational64s[n]! 0xc61d WhiteLevel SubIFD int32u[n]! 0xc61e DefaultScale SubIFD rational64u[2]! 0xc61f DefaultCropOrigin SubIFD int32u[2]! 0xc620 DefaultCropSize SubIFD int32u[2]! 0xc621 ColorMatrix1 IFD0 rational64s[n]! 0xc622 ColorMatrix2 IFD0 rational64s[n]! 0xc623 CameraCalibration1 IFD0 rational64s[n]! 0xc624 CameraCalibration2 IFD0 rational64s[n]! 0xc625 ReductionMatrix1 IFD0 rational64s[n]! 0xc626 ReductionMatrix2 IFD0 rational64s[n]! 0xc627 AnalogBalance IFD0 rational64u[n]! 0xc628 AsShotNeutral IFD0 rational64u[n]! 0xc629 AsShotWhiteXY IFD0 rational64u[2]! 0xc62a BaselineExposure IFD0 rational64s! 0xc62b BaselineNoise IFD0 rational64u! 0xc62c BaselineSharpness IFD0 rational64u! 0xc62d BayerGreenSplit SubIFD int32u! 0xc62e LinearResponseLimit IFD0 rational64u! 0xc62f CameraSerialNumber IFD0 string 0xc630 DNGLensInfo IFD0 rational64u[4] 0xc631 ChromaBlurRadius SubIFD rational64u! 0xc632 AntiAliasStrength SubIFD rational64u! 0xc633 ShadowScale IFD0 rational64u! 0xc634 SR2Private IFD0 Sony SR2Private DNGAdobeData IFD0 DNG AdobeData MakerNotePentax IFD0 Pentax MakerNotePentax5 IFD0 Pentax MakerNoteRicohPentax IFD0 Pentax MakerNoteDJIInfo IFD0 DJI Info DNGPrivateData IFD0 int8u! 0xc635 MakerNoteSafety IFD0 int16u 0xc640 RawImageSegmentation - no 0xc65a CalibrationIlluminant1 IFD0 int16u! 0xc65b CalibrationIlluminant2 IFD0 int16u! 0xc65c BestQualityScale SubIFD rational64u! 0xc65d RawDataUniqueID IFD0 int8u[16]! 0xc660 AliasLayerMetadata - no 0xc68b OriginalRawFileName IFD0 string! 0xc68c OriginalRawFileData IFD0 DNG OriginalRaw 0xc68d ActiveArea SubIFD int32u[4]! 0xc68e MaskedAreas SubIFD int32u[n]! 0xc68f AsShotICCProfile IFD0 ICC_Profile 0xc690 AsShotPreProfileMatrix IFD0 rational64s[n]! 0xc691 CurrentICCProfile IFD0 ICC_Profile 0xc692 CurrentPreProfileMatrix IFD0 rational64s[n]! 0xc6bf ColorimetricReference IFD0 int16u! 0xc6c5 SRawType IFD0 no 0xc6d2 PanasonicTitle IFD0 undef 0xc6d3 PanasonicTitle2 IFD0 undef 0xc6f3 CameraCalibrationSig IFD0 string! 0xc6f4 ProfileCalibrationSig IFD0 string! 0xc6f5 ProfileIFD IFD0 EXIF 0xc6f6 AsShotProfileName IFD0 string! 0xc6f7 NoiseReductionApplied SubIFD rational64u! 0xc6f8 ProfileName IFD0 string! 0xc6f9 ProfileHueSatMapDims IFD0 int32u[3]! 0xc6fa ProfileHueSatMapData1 IFD0 float[n]! 0xc6fb ProfileHueSatMapData2 IFD0 float[n]! 0xc6fc ProfileToneCurve IFD0 float[n]! 0xc6fd ProfileEmbedPolicy IFD0 int32u! 0xc6fe ProfileCopyright IFD0 string! 0xc714 ForwardMatrix1 IFD0 rational64s[n]! 0xc715 ForwardMatrix2 IFD0 rational64s[n]! 0xc716 PreviewApplicationName IFD0 string! 0xc717 PreviewApplicationVersion IFD0 string! 0xc718 PreviewSettingsName IFD0 string! 0xc719 PreviewSettingsDigest IFD0 int8u! 0xc71a PreviewColorSpace IFD0 int32u! 0xc71b PreviewDateTime IFD0 string! 0xc71c RawImageDigest IFD0 int8u[16]! 0xc71d OriginalRawFileDigest IFD0 int8u[16]! 0xc71e SubTileBlockSize - no 0xc71f RowInterleaveFactor - no 0xc725 ProfileLookTableDims IFD0 int32u[3]! 0xc726 ProfileLookTableData IFD0 float[n]! 0xc740 OpcodeList1 SubIFD undef~! 0xc741 OpcodeList2 SubIFD undef~! 0xc74e OpcodeList3 SubIFD undef~! 0xc761 NoiseProfile SubIFD double[n]! 0xc763 TimeCodes IFD0 int8u[n] 0xc764 FrameRate IFD0 rational64s 0xc772 TStop IFD0 rational64u[n] 0xc789 ReelName IFD0 string 0xc791 OriginalDefaultFinalSize IFD0 int32u[2]! 0xc792 OriginalBestQualitySize IFD0 int32u[2]! 0xc793 OriginalDefaultCropSize IFD0 rational64u[2]! 0xc7a1 CameraLabel IFD0 string 0xc7a3 ProfileHueSatMapEncoding IFD0 int32u! 0xc7a4 ProfileLookTableEncoding IFD0 int32u! 0xc7a5 BaselineExposureOffset IFD0 rational64s! 0xc7a6 DefaultBlackRender IFD0 int32u! 0xc7a7 NewRawImageDigest IFD0 int8u[16]! 0xc7a8 RawToPreviewGain IFD0 double! 0xc7aa CacheVersion SubIFD2 int32u! 0xc7b5 DefaultUserCrop SubIFD rational64u[4]! 0xc7d5 NikonNEFInfo - Nikon NEFInfo 0xc7e9 DepthFormat IFD0 int16u! 0xc7ea DepthNear IFD0 rational64u! 0xc7eb DepthFar IFD0 rational64u! 0xc7ec DepthUnits IFD0 int16u! 0xc7ed DepthMeasureType IFD0 int16u! 0xc7ee EnhanceParams IFD0 string! 0xcd2d ProfileGainTableMap SubIFD undef! 0xcd2e SemanticName SubIFD no 0xcd30 SemanticInstanceID SubIFD no 0xcd31 CalibrationIlluminant3 IFD0 int16u! 0xcd32 CameraCalibration3 IFD0 rational64s[n]! 0xcd33 ColorMatrix3 IFD0 rational64s[n]! 0xcd34 ForwardMatrix3 IFD0 rational64s[n]! 0xcd35 IlluminantData1 IFD0 undef! 0xcd36 IlluminantData2 IFD0 undef! 0xcd37 IlluminantData3 IFD0 undef! 0xcd38 MaskSubArea SubIFD no 0xcd39 ProfileHueSatMapData3 IFD0 float[n]! 0xcd3a ReductionMatrix3 IFD0 rational64s[n]! 0xcd3b RGBTables IFD0 undef! 0xcd40 ProfileGainTableMap2 IFD0 undef! 0xcd41 JUMBF - Jpeg2000 0xcd43 ColumnInterleaveFactor SubIFD int32u! 0xcd44 ImageSequenceInfo IFD0 DNG ImageSeq 0xcd46 ImageStats IFD0 undef! 0xcd47 ProfileDynamicRange IFD0 DNG ProfileDynamicRange 0xcd48 ProfileGroupName IFD0 string! 0xea1c Padding ExifIFD undef! 0xea1d OffsetSchema ExifIFD int32s! 0xfde8 OwnerName ExifIFD string/ 0xfde9 SerialNumber ExifIFD string/ 0xfdea Lens ExifIFD string/ 0xfe00 KDC_IFD - Kodak KDC_IFD 0xfe4c RawFile ExifIFD string/ 0xfe4d Converter ExifIFD string/ 0xfe4e WhiteBalance ExifIFD string/ 0xfe51 Exposure ExifIFD string/ 0xfe52 Shadows ExifIFD string/ 0xfe53 Brightness ExifIFD string/ 0xfe54 Contrast ExifIFD string/ 0xfe55 Saturation ExifIFD string/ 0xfe56 Sharpness ExifIFD string/ 0xfe57 Smoothness ExifIFD string/ 0xfe58 MoireFilter ExifIFD string/

IPTC Tags

The tags listed below are part of the International Press Telecommunications Council (IPTC) and the Newspaper Association of America (NAA) Information Interchange Model (IIM). This is an older meta information format, slowly being phased out in favor of XMP – the newer IPTCCore specification uses XMP format. IPTC information may be found in JPG, TIFF, PNG, MIFF, PS, PDF, PSD, XCF and DNG images.

IPTC information is separated into different records, each of which has its own set of tags. See <http://www.iptc.org/std/IIM/4.1/specification/IIMV4.1.pdf> for the official IPTC IIM specification.

This specification dictates a length for ASCII (string or digits) and binary (undef) values. These lengths are given in square brackets after the Writable format name. For tags where a range of lengths is allowed, the minimum and maximum lengths are separated by a comma within the brackets. When writing, ExifTool issues a minor warning and truncates the value if it is longer than allowed by the IPTC specification. Minor errors may be ignored with the IgnoreMinorErrors (-m) option, allowing longer values to be written, but beware that values like this may cause problems for some other IPTC readers. ExifTool will happily read IPTC values of any length.

Separate IPTC date and time tags may be written with a combined date/time value and ExifTool automagically takes the appropriate part of the date/time string depending on whether a date or time tag is being written. This is very useful when copying date/time values to IPTC from other metadata formats.

IPTC time values include a timezone offset. If written with a value which doesn’t include a timezone then the current local timezone offset is used (unless written with a combined date/time, in which case the local timezone offset at the specified date/time is used, which may be different due to changes in daylight savings time).

Note that it is not uncommon for IPTC to be found in non-standard locations in JPEG and TIFF-based images. When reading, the family 1 group name has a number added for non-standard IPTC (“IPTC2”, “IPTC3”, etc), but when writing only “IPTC” may be specified as the group. To keep the IPTC consistent, ExifTool updates tags in all existing IPTC locations, but will create a new IPTC group only in the standard location.

Record Tag Name Writable —— ——– ——– 1 IPTCEnvelope IPTC EnvelopeRecord 2 IPTCApplication IPTC ApplicationRecord 3 IPTCNewsPhoto IPTC NewsPhoto 7 IPTCPreObjectData IPTC PreObjectData 8 IPTCObjectData IPTC ObjectData 9 IPTCPostObjectData IPTC PostObjectData 240 IPTCFotoStation IPTC FotoStation

IPTC EnvelopeRecord Tags

Tag ID Tag Name Writable —— ——– ——– 0 EnvelopeRecordVersion int16u: 5 Destination string[0,1024]+ 20 FileFormat int16u 22 FileVersion int16u 30 ServiceIdentifier string[0,10] 40 EnvelopeNumber digits[8] 50 ProductID string[0,32]+ 60 EnvelopePriority digits[1] 70 DateSent digits[8] 80 TimeSent string[11] 90 CodedCharacterSet string[0,32]! 100 UniqueObjectName string[14,80] 120 ARMIdentifier int16u 122 ARMVersion int16u

IPTC ApplicationRecord Tags

Tag ID Tag Name Writable —— ——– ——– 0 ApplicationRecordVersion int16u: 3 ObjectTypeReference string[3,67] 4 ObjectAttributeReference string[4,68]+ 5 ObjectName string[0,64] 7 EditStatus string[0,64] 8 EditorialUpdate digits[2] 10 Urgency digits[1] 12 SubjectReference string[13,236]+ 15 Category string[0,3] 20 SupplementalCategories string[0,32]+ 22 FixtureIdentifier string[0,32] 25 Keywords string[0,64]+ 26 ContentLocationCode string[3]+ 27 ContentLocationName string[0,64]+ 30 ReleaseDate digits[8] 35 ReleaseTime string[11] 37 ExpirationDate digits[8] 38 ExpirationTime string[11] 40 SpecialInstructions string[0,256] 42 ActionAdvised digits[2] 45 ReferenceService string[0,10]+ 47 ReferenceDate digits[8]+ 50 ReferenceNumber digits[8]+ 55 DateCreated digits[8] 60 TimeCreated string[11] 62 DigitalCreationDate digits[8] 63 DigitalCreationTime string[11] 65 OriginatingProgram string[0,32] 70 ProgramVersion string[0,10] 75 ObjectCycle string[1] 80 By-line string[0,32]+ 85 By-lineTitle string[0,32]+ 90 City string[0,32] 92 Sub-location string[0,32] 95 Province-State string[0,32] 100 Country-PrimaryLocationCode string[3] 101 Country-PrimaryLocationName string[0,64] 103 OriginalTransmissionReference string[0,32] 105 Headline string[0,256] 110 Credit string[0,32] 115 Source string[0,32] 116 CopyrightNotice string[0,128] 118 Contact string[0,128]+ 120 Caption-Abstract string[0,2000] 121 LocalCaption string[0,256] 122 Writer-Editor string[0,32]+ 125 RasterizedCaption undef[7360] 130 ImageType string[2] 131 ImageOrientation string[1] 135 LanguageIdentifier string[2,3] 150 AudioType string[2] 151 AudioSamplingRate digits[6] 152 AudioSamplingResolution digits[2] 153 AudioDuration digits[6] 154 AudioOutcue string[0,64] 184 JobID string[0,64] 185 MasterDocumentID string[0,256] 186 ShortDocumentID string[0,64] 187 UniqueDocumentID string[0,128] 188 OwnerID string[0,128] 200 ObjectPreviewFileFormat int16u 201 ObjectPreviewFileVersion int16u 202 ObjectPreviewData undef[0,256000] 221 Prefs string[0,64] 225 ClassifyState string[0,64] 228 SimilarityIndex string[0,32] 230 DocumentNotes string[0,1024] 231 DocumentHistory string[0,256] 232 ExifCameraInfo string[0,4096] 255 CatalogSets string[0,256]+

IPTC NewsPhoto Tags

Tag ID Tag Name Writable —— ——– ——– 0 NewsPhotoVersion int16u: 10 IPTCPictureNumber string[16] 20 IPTCImageWidth int16u 30 IPTCImageHeight int16u 40 IPTCPixelWidth int16u 50 IPTCPixelHeight int16u 55 SupplementalType int8u 60 ColorRepresentation int16u 64 InterchangeColorSpace int8u 65 ColorSequence int8u 66 ICC_Profile no 70 ColorCalibrationMatrix no 80 LookupTable no 84 NumIndexEntries int16u 85 ColorPalette no 86 IPTCBitsPerSample int8u 90 SampleStructure int8u 100 ScanningDirection int8u 102 IPTCImageRotation int8u 110 DataCompressionMethod int32u 120 QuantizationMethod int8u 125 EndPoints no 130 ExcursionTolerance int8u 135 BitsPerComponent int8u 140 MaximumDensityRange int16u 145 GammaCompensatedValue int16u

IPTC PreObjectData Tags

Tag ID Tag Name Writable —— ——– ——– 10 SizeMode no 20 MaxSubfileSize no 90 ObjectSizeAnnounced no 95 MaximumObjectSize no

IPTC ObjectData Tags

Tag ID Tag Name Writable —— ——– ——– 10 SubFile no+

IPTC PostObjectData Tags

Tag ID Tag Name Writable —— ——– ——– 10 ConfirmedObjectSize no

IPTC FotoStation Tags

Tag ID Tag Name Writable —— ——– ——– [no tags known]

XMP Tags

XMP stands for “Extensible Metadata Platform”, an XML/RDF-based metadata format which is being pushed by Adobe. Information in this format can be embedded in many different image file types including JPG, JP2, TIFF, GIF, EPS, PDF, PSD, IND, INX, PNG, DJVU, SVG, PGF, MIFF, XCF, CRW, DNG and a variety of proprietary TIFF-based RAW images, as well as MOV, AVI, ASF, WMV, FLV, SWF and MP4 videos, and WMA and audio formats supporting ID3v2 information.

The XMP Tag ID’s aren’t listed because in most cases they are identical to the Tag Name (aside from differences in case). Tags with different ID’s are mentioned in the Notes column of the HTML version of this document.

All XMP information is stored as character strings. The Writable column specifies the information format: string is an unformatted string, integer is a string of digits (possibly beginning with a ‘+’ or ‘-’), real is a floating point number, rational is entered as a floating point number but stored as two integer strings separated by a ‘/’ character, date is a date/time string entered in the format “YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM]” but some partial date/time formats are also accepted (see <https://exiftool.org/faq.html#Q5>), boolean is either “True” or “False” (but “true” and “false” may be written as a ValueConv value for compatibility with non-conforming applications), struct indicates a structured tag, and lang-alt is a tag that supports alternate languages.

When reading, struct tags are extracted only if the Struct (-struct) option is used. Otherwise the corresponding Flattened tags, indicated by an underline (_) after the Writable type, are extracted. When copying, by default both structured and flattened tags are available, but the flattened tags are considered “unsafe” so they aren’t copied unless specified explicitly. The Struct option may be disabled by setting Struct to 0 via the API or with –struct on the command line to copy only flattened tags, or enabled by setting Struct to 1 via the API or with -struct on the command line to copy only as structures. When writing, the Struct option has no effect, and both structured and flattened tags may be written. See <https://exiftool.org/struct.html> for more details.

Individual languages for lang-alt tags are accessed by suffixing the tag name with a ‘-’, followed by an RFC 3066 language code (eg. “XMP:Title-fr”, or “Rights-en-US”). (See <http://www.ietf.org/rfc/rfc3066.txt> for the RFC 3066 specification.) A lang-alt tag with no language code accesses the “x-default” language, but causes other languages for this tag to be deleted when writing. The “x-default” language code may be specified when writing to preserve other existing languages (eg. “XMP-dc:Description-x-default”). When reading, “x-default” is not specified.

The XMP tags are organized according to schema Namespace in the following tables. The ExifTool family 1 group names are derived from the namespace prefixes by adding a leading “XMP-” (eg. “XMP-dc”). A few of the longer prefixes have been shortened (as mentioned in the documentation below) to avoid excessively long ExifTool group names. The tags of any namespace may be deleted as a group by specifying the family 1 group name (eg. “-XMP-dc:all=” on the command line). This includes namespaces which are not pre-defined by ExifTool.

In cases where a tag name exists in more than one namespace, less common namespaces are avoided when writing. However, a specific namespace may be written by providing a family 1 group name for the tag (eg. XMP-crs:Contrast or XMP-exif:Contrast). When deciding on which tags to add to an image, using standard schemas such as dc, xmp, iptcCore and iptcExt is recommended if possible.

For structures, the heading of the first column is Field Name. Field names are very similar to tag names, except they are used to identify fields inside structures instead of stand-alone tags. See <https://exiftool.org/struct.html#Fields> for more details.

ExifTool will extract XMP information even if it is not listed in these tables, but other tags are not writable unless added as user-defined tags in the ExifTool config file. For example, the pdfx namespace doesn’t have a predefined set of tag names because it is used to store application-defined PDF information, so although this information will be extracted, it is only writable if the corresponding user-defined tags have been created.

The tables below list tags from the official XMP specification (with an underlined Namespace in the HTML version of this documentation), as well as extensions from various other sources. See <http://www.adobe.com/devnet/xmp/> for the official XMP specification.

Namespace Writable ——— ——– aas XMP aas acdsee XMP acdsee album XMP Album apple-fi XMP apple_fi ast Nikon ast aux XMP aux cc XMP cc cell XMP cell crd XMP crd creatorAtom XMP creatorAtom crs XMP crs dc XMP dc Device XMP Device dex XMP dex DICOM XMP DICOM digiKam XMP digiKam drone-dji DJI XMP dwc DarwinCore et XMP ExifTool exif XMP exif exifEX XMP exifEX expressionmedia XMP ExpressionMedia extensis XMP extensis fpv XMP fpv GAudio XMP GAudio GCamera XMP GCamera GCreations XMP GCreations GDepth XMP GDepth getty XMP GettyImages GFocus XMP GFocus GImage XMP GImage GPano XMP GPano GSpherical XMP GSpherical hdr XMP hdr hdrgm XMP hdrgm ics XMP ics iptcCore XMP iptcCore iptcExt XMP iptcExt LImage XMP LImage lr XMP Lightroom mediapro XMP MediaPro microsoft Microsoft XMP MP Microsoft MP MP1 Microsoft MP1 mwg-coll MWG Collections mwg-kw MWG Keywords mwg-rs MWG Regions nine Nikon nine panorama XMP panorama pdf XMP pdf pdfx XMP pdfx photomech PhotoMechanic XMP photoshop XMP photoshop PixelLive XMP PixelLive plus PLUS XMP pmi XMP pmi prism XMP prism prl XMP prl prm XMP prm pur XMP pur rdf XMP rdf sdc Nikon sdc swf XMP swf tiff XMP tiff x XMP x xmp XMP xmp xmpBJ XMP xmpBJ xmpDM XMP xmpDM xmpDSA Panasonic DSA xmpMM XMP xmpMM xmpNote XMP xmpNote xmpPLUS XMP xmpPLUS xmpRights XMP xmpRights xmpTPg XMP xmpTPg

XMP aas Tags

Apple Adjustment Settings used by iPhone/iPad.

These tags belong to the ExifTool XMP-aas family 1 group.

Tag Name Writable ——– ——– AffineA real AffineB real AffineC real AffineD real AffineX real AffineY real CropH integer/ CropW integer/ CropX integer/ CropY integer/ Curve0x real Curve0y real Curve1x real Curve1y real Curve2x real Curve2y real Curve3x real Curve3y real Curve4x real Curve4y real FaceBalanceOrigI real FaceBalanceOrigQ real FaceBalanceStrength real FaceBalanceWarmth real Highlights real/ Shadows real/ Vibrance real/

XMP acdsee Tags

ACD Systems ACDSee namespace tags.

(A note to software developers: Re-inventing your own private tags instead of using the equivalent tags in standard XMP namespaces defeats one of the most valuable features of metadata: interoperability. Your applications mumble to themselves instead of speaking out for the rest of the world to hear.)

These tags belong to the ExifTool XMP-acdsee family 1 group.

Tag Name Writable ——– ——– Author string/ Caption string/ Categories string/ Collections string/ DateTime date/ DPP lang-alt/ EditStatus string/ FixtureIdentifier string/ Keywords string/+ Notes string/ ObjectCycle string/ OriginatingProgram string/ Rating real/ Rawrppused boolean/ ReleaseDate string/ ReleaseTime string/ RPP lang-alt/ Snapshots string/+ Tagged boolean/

XMP Album Tags

Adobe Album namespace tags.

These tags belong to the ExifTool XMP-album family 1 group.

Tag Name Writable ——– ——– Notes string

XMP apple_fi Tags

Face information tags written by the Apple iPhone 5 inside the mwg-rs RegionExtensions.

These tags belong to the ExifTool XMP-apple-fi family 1 group.

Tag Name Writable ——– ——– AngleInfoRoll integer AngleInfoYaw integer ConfidenceLevel integer FaceID integer TimeStamp integer

XMP aux Tags

Adobe-defined auxiliary EXIF tags. This namespace existed in the XMP specification until it was dropped in 2012, presumably due to the introduction of the EXIF 2.3 for XMP specification and the exifEX namespace at this time. For this reason, tags below with equivalents in the exifEX namespace are avoided when writing.

These tags belong to the ExifTool XMP-aux family 1 group.

Tag Name Writable ——– ——– ApproximateFocusDistance rational DistortionCorrectionAlreadyApplied boolean EnhanceDenoiseAlreadyApplied boolean EnhanceDenoiseLumaAmount string EnhanceDenoiseVersion string EnhanceDetailsAlreadyApplied boolean EnhanceDetailsVersion string EnhanceSuperResolutionAlreadyApplied boolean EnhanceSuperResolutionScale rational EnhanceSuperResolutionVersion string Firmware string FlashCompensation rational ImageNumber string IsMergedHDR boolean IsMergedPanorama boolean LateralChromaticAberrationCorrectionAlreadyApplied boolean Lens string LensDistortInfo string LensID string LensInfo string/ LensSerialNumber string/ NeutralDensityFactor string OwnerName string/ SerialNumber string/ VignetteCorrectionAlreadyApplied boolean

XMP cc Tags

Creative Commons namespace tags. Note that the CC specification for XMP is non-existent, so ExifTool must make some assumptions about the format of the specific properties in XMP (see <http://creativecommons.org/ns>).

These tags belong to the ExifTool XMP-cc family 1 group.

Tag Name Writable ——– ——– AttributionName string AttributionURL string DeprecatedOn date Jurisdiction string LegalCode string License string MorePermissions string Permits string+ Prohibits string+ Requires string+ UseGuidelines string

XMP cell Tags

Location tags written by some Sony Ericsson phones.

These tags belong to the ExifTool XMP-cell family 1 group.

Tag Name Writable ——– ——– CellTowerID string CellGlobalID string LocationAreaCode string MobileCountryCode string MobileNetworkCode string CellR string

XMP crd Tags

Adobe Camera Raw Defaults tags.

These tags belong to the ExifTool XMP-crd family 1 group.

Tag Name Writable ——– ——– AlreadyApplied boolean/ AutoBrightness boolean/ AutoContrast boolean/ AutoExposure boolean/ AutoLateralCA integer/ AutoShadows boolean/ AutoTone boolean/ AutoToneDigest string/ AutoToneDigestNoSat string/ AutoWhiteVersion integer/ Blacks2012 integer/ BlueHue integer/ BlueSaturation integer/ Brightness integer/ CameraModelRestriction string/ CameraProfile string/ CameraProfileDigest string/ ChromaticAberrationB integer/ ChromaticAberrationR integer/ CircularGradientBasedCorrections Correction Struct+ CircGradBasedCorrActive boolean/_ CircGradBasedCorrAmount real/_ CircGradBasedCorrMasks CorrectionMask Struct_+ CircGradBasedCorrMaskAlpha real/_ CircGradBasedCorrMaskAngle real/_ CircGradBasedCorrMaskBottom real/_ CircGradBasedCorrMaskCenterValue real/_ CircGradBasedCorrMaskCenterWeight real/_ CircGradBasedCorrMaskRange CorrRangeMask Struct_+ CircGradBasedCorrMaskRangeAreaModels AreaModels Struct_+ CircGradBasedCorrMaskRangeAreaModelsComponents string/_+ CircGradBasedCorrMaskRangeAreaModelsColorSampleInfo string/_+ CircGradBasedCorrMaskRangeColorAmount real/_+ CircGradBasedCorrMaskRangeDepthFeather real/_+ CircGradBasedCorrMaskRangeDepthMax real/_+ CircGradBasedCorrMaskRangeDepthMin real/_+ CircGradBasedCorrMaskRangeInvert boolean/_+ CircGradBasedCorrMaskRangeLumFeather real/_+ CircGradBasedCorrMaskRangeLuminanceDepthSampleInfo string/_+ CircGradBasedCorrMaskRangeLumMax real/_+ CircGradBasedCorrMaskRangeLumMin real/_+ CircGradBasedCorrMaskRangeLumRange string/_+ CircGradBasedCorrMaskRangeSampleType integer/_+ CircGradBasedCorrMaskRangeType string/_+ CircGradBasedCorrMaskRangeVersion string/_+ CircGradBasedCorrMaskDabs string/_ CircGradBasedCorrMaskFeather real/_ CircGradBasedCorrMaskFlipped boolean/_ CircGradBasedCorrMaskFlow real/_ CircGradBasedCorrMaskFullX real/_ CircGradBasedCorrMaskFullY real/_ CircGradBasedCorrMaskInputDigest string/_ CircGradBasedCorrMaskLeft real/_ CircGradBasedCorrMaskMaskActive boolean/_ CircGradBasedCorrMaskMaskBlendMode integer/_ CircGradBasedCorrMaskMaskDigest string/_ CircGradBasedCorrMaskMaskInverted boolean/_ CircGradBasedCorrMaskMaskName string/_ CircGradBasedCorrMaskMasks CorrectionMask Struct_+ CircGradBasedCorrMaskMasksAlpha real/_ CircGradBasedCorrMaskMasksAngle real/_ CircGradBasedCorrMaskMasksBottom real/_ CircGradBasedCorrMaskMasksCenterValue real/_ CircGradBasedCorrMaskMasksCenterWeight real/_ CircGradBasedCorrMaskMasksDabs string/_+ CircGradBasedCorrMaskMasksFeather real/_ CircGradBasedCorrMaskMasksFlipped boolean/_ CircGradBasedCorrMaskMasksFlow real/_ CircGradBasedCorrMaskMasksFullX real/_ CircGradBasedCorrMaskMasksFullY real/_ CircGradBasedCorrMaskMasksInputDigest string/_ CircGradBasedCorrMaskMasksLeft real/_ CircGradBasedCorrMaskMasksMaskActive boolean/_ CircGradBasedCorrMaskMasksMaskBlendMode integer/_ CircGradBasedCorrMaskMasksMaskDigest string/_ CircGradBasedCorrMaskMasksMaskInverted boolean/_ CircGradBasedCorrMaskMasksMaskName string/_ CircGradBasedCorrMaskMasksMaskSubType string/_ CircGradBasedCorrMaskMasksMaskSyncID string/_ CircGradBasedCorrMaskMasksValue real/_ CircGradBasedCorrMaskMasksMaskVersion string/_ CircGradBasedCorrMaskMasksMidpoint real/_ CircGradBasedCorrMaskMasksOrigin string/_ CircGradBasedCorrMaskMasksPerimeterValue real/_ CircGradBasedCorrMaskMasksRadius real/_ CircGradBasedCorrMaskMasksReferencePoint string/_ CircGradBasedCorrMaskMasksRight real/_ CircGradBasedCorrMaskMasksRoundness real/_ CircGradBasedCorrMaskMasksSizeX real/_ CircGradBasedCorrMaskMasksSizeY real/_ CircGradBasedCorrMaskMasksTop real/_ CircGradBasedCorrMaskMaskSubType string/_ CircGradBasedCorrMaskMasksVersion integer/_ CircGradBasedCorrMaskMasksWhat string/_ CircGradBasedCorrMaskMasksWholeImageArea string/_ CircGradBasedCorrMaskMasksX real/_ CircGradBasedCorrMaskMasksY real/_ CircGradBasedCorrMaskMaskSyncID string/_ CircGradBasedCorrMaskMasksZeroX real/_ CircGradBasedCorrMaskMasksZeroY real/_ CircGradBasedCorrMaskValue real/_ CircGradBasedCorrMaskMaskVersion string/_ CircGradBasedCorrMaskMidpoint real/_ CircGradBasedCorrMaskOrigin string/_ CircGradBasedCorrMaskPerimeterValue real/_ CircGradBasedCorrMaskRadius real/_ CircGradBasedCorrMaskReferencePoint string/_ CircGradBasedCorrMaskRight real/_ CircGradBasedCorrMaskRoundness real/_ CircGradBasedCorrMaskSizeX real/_ CircGradBasedCorrMaskSizeY real/_ CircGradBasedCorrMaskTop real/_ CircGradBasedCorrMaskVersion integer/_ CircGradBasedCorrMaskWhat string/_ CircGradBasedCorrMaskWholeImageArea string/_ CircGradBasedCorrMaskX real/_ CircGradBasedCorrMaskY real/_ CircGradBasedCorrMaskZeroX real/_ CircGradBasedCorrMaskZeroY real/_ CircGradBasedCorrCorrectionName string/_+ CircGradBasedCorrRangeMask CorrRangeMask Struct_+ CircGradBasedCorrRangeMaskAreaModels AreaModels Struct_+ CircGradBasedCorrRangeMaskAreaModelsComponents string/_+ CircGradBasedCorrRangeMaskAreaModelsColorSampleInfo string/_+ CircGradBasedCorrRangeMaskColorAmount real/_+ CircGradBasedCorrRangeMaskDepthFeather real/_+ CircGradBasedCorrRangeMaskDepthMax real/_+ CircGradBasedCorrRangeMaskDepthMin real/_+ CircGradBasedCorrRangeMaskInvert boolean/_+ CircGradBasedCorrRangeMaskLumFeather real/_+ CircGradBasedCorrRangeMaskLuminanceDepthSampleInfo string/_+ CircGradBasedCorrRangeMaskLumMax real/_+ CircGradBasedCorrRangeMaskLumMin real/_+ CircGradBasedCorrRangeMaskLumRange string/_+ CircGradBasedCorrRangeMaskSampleType integer/_+ CircGradBasedCorrRangeMaskType string/_+ CircGradBasedCorrRangeMaskVersion string/_+ CircGradBasedCorrCorrectionSyncID string/_+ CircGradBasedCorrBlacks2012 real/_ CircGradBasedCorrBrightness real/_ CircGradBasedCorrClarity real/_ CircGradBasedCorrClarity2012 real/_ CircGradBasedCorrContrast real/_ CircGradBasedCorrContrast2012 real/_ CircGradBasedCorrDefringe real/_ CircGradBasedCorrDehaze real/_ CircGradBasedCorrExposure real/_ CircGradBasedCorrExposure2012 real/_ CircGradBasedCorrHighlights2012 real/_ CircGradBasedCorrHue real/_ CircGradBasedCorrLuminanceNoise real/_ CircGradBasedCorrMoire real/_ CircGradBasedCorrSaturation real/_ CircGradBasedCorrShadows2012 real/_ CircGradBasedCorrSharpness real/_ CircGradBasedCorrTemperature real/_ CircGradBasedCorrTexture real/_ CircGradBasedCorrTint real/_ CircGradBasedCorrToningHue real/_ CircGradBasedCorrToningSaturation real/_ CircGradBasedCorrWhites2012 real/_ CircGradBasedCorrWhat string/_ Clarity integer/ Clarity2012 integer/ ClipboardAspectRatio integer/ ClipboardOrientation integer/ Cluster string/ ColorGradeBlending integer/ ColorGradeGlobalHue integer/ ColorGradeGlobalLum integer/ ColorGradeGlobalSat integer/ ColorGradeHighlightLum integer/ ColorGradeMidtoneHue integer/ ColorGradeMidtoneLum integer/ ColorGradeMidtoneSat integer/ ColorGradeShadowLum integer/ ColorNoiseReduction integer/ ColorNoiseReductionDetail integer/ ColorNoiseReductionSmoothness integer/ CompatibleVersion string/ ContactInfo string/ Contrast integer/ Contrast2012 integer/ Converter string/ ConvertToGrayscale boolean/ Copyright string/ CropAngle real/ CropBottom real/ CropConstrainToWarp integer/ CropHeight real/ CropLeft real/ CropRight real/ CropTop real/ CropUnit integer/ CropUnits integer/ CropWidth real/ DefaultAutoGray boolean/ DefaultAutoTone boolean/ DefaultsSpecificToISO boolean/ DefaultsSpecificToSerial boolean/ Defringe integer/ DefringeGreenAmount integer/ DefringeGreenHueHi integer/ DefringeGreenHueLo integer/ DefringePurpleAmount integer/ DefringePurpleHueHi integer/ DefringePurpleHueLo integer/ Dehaze real/ DepthBasedCorrections DepthBasedCorr Struct+ DepthBasedCorrCorrectionActive boolean/_+ DepthBasedCorrCorrectionAmount real/_+ DepthBasedCorrMask CorrectionMask Struct_+ DepthBasedCorrMaskAlpha real/_ DepthBasedCorrMaskAngle real/_ DepthBasedCorrMaskBottom real/_ DepthBasedCorrMaskCenterValue real/_ DepthBasedCorrMaskCenterWeight real/_ DepthBasedCorrMaskRange CorrRangeMask Struct_+ DepthBasedCorrMaskRangeAreaModels AreaModels Struct_+ DepthBasedCorrMaskRangeAreaModelsComponents string/_+ DepthBasedCorrMaskRangeAreaModelsColorSampleInfo string/_+ DepthBasedCorrMaskRangeColorAmount real/_+ DepthBasedCorrMaskRangeDepthFeather real/_+ DepthBasedCorrMaskRangeDepthMax real/_+ DepthBasedCorrMaskRangeDepthMin real/_+ DepthBasedCorrMaskRangeInvert boolean/_+ DepthBasedCorrMaskRangeLumFeather real/_+ DepthBasedCorrMaskRangeLuminanceDepthSampleInfo string/_+ DepthBasedCorrMaskRangeLumMax real/_+ DepthBasedCorrMaskRangeLumMin real/_+ DepthBasedCorrMaskRangeLumRange string/_+ DepthBasedCorrMaskRangeSampleType integer/_+ DepthBasedCorrMaskRangeType string/_+ DepthBasedCorrMaskRangeVersion string/_+ DepthBasedCorrMaskDabs string/_+ DepthBasedCorrMaskFeather real/_ DepthBasedCorrMaskFlipped boolean/_ DepthBasedCorrMaskFlow real/_ DepthBasedCorrMaskFullX real/_ DepthBasedCorrMaskFullY real/_ DepthBasedCorrMaskInputDigest string/_ DepthBasedCorrMaskLeft real/_ DepthBasedCorrMaskMaskActive boolean/_ DepthBasedCorrMaskMaskBlendMode integer/_ DepthBasedCorrMaskMaskDigest string/_ DepthBasedCorrMaskMaskInverted boolean/_ DepthBasedCorrMaskMaskName string/_ DepthBasedCorrMaskMasks CorrectionMask Struct_+ DepthBasedCorrMaskMasksAlpha real/_ DepthBasedCorrMaskMasksAngle real/_ DepthBasedCorrMaskMasksBottom real/_ DepthBasedCorrMaskMasksCenterValue real/_ DepthBasedCorrMaskMasksCenterWeight real/_ DepthBasedCorrMaskMasksDabs string/_+ DepthBasedCorrMaskMasksFeather real/_ DepthBasedCorrMaskMasksFlipped boolean/_ DepthBasedCorrMaskMasksFlow real/_ DepthBasedCorrMaskMasksFullX real/_ DepthBasedCorrMaskMasksFullY real/_ DepthBasedCorrMaskMasksInputDigest string/_ DepthBasedCorrMaskMasksLeft real/_ DepthBasedCorrMaskMasksMaskActive boolean/_ DepthBasedCorrMaskMasksMaskBlendMode integer/_ DepthBasedCorrMaskMasksMaskDigest string/_ DepthBasedCorrMaskMasksMaskInverted boolean/_ DepthBasedCorrMaskMasksMaskName string/_ DepthBasedCorrMaskMasksMaskSubType string/_ DepthBasedCorrMaskMasksMaskSyncID string/_ DepthBasedCorrMaskMasksValue real/_ DepthBasedCorrMaskMasksMaskVersion string/_ DepthBasedCorrMaskMasksMidpoint real/_ DepthBasedCorrMaskMasksOrigin string/_ DepthBasedCorrMaskMasksPerimeterValue real/_ DepthBasedCorrMaskMasksRadius real/_ DepthBasedCorrMaskMasksReferencePoint string/_ DepthBasedCorrMaskMasksRight real/_ DepthBasedCorrMaskMasksRoundness real/_ DepthBasedCorrMaskMasksSizeX real/_ DepthBasedCorrMaskMasksSizeY real/_ DepthBasedCorrMaskMasksTop real/_ DepthBasedCorrMaskMaskSubType string/_ DepthBasedCorrMaskMasksVersion integer/_ DepthBasedCorrMaskMasksWhat string/_ DepthBasedCorrMaskMasksWholeImageArea string/_ DepthBasedCorrMaskMasksX real/_ DepthBasedCorrMaskMasksY real/_ DepthBasedCorrMaskMaskSyncID string/_ DepthBasedCorrMaskMasksZeroX real/_ DepthBasedCorrMaskMasksZeroY real/_ DepthBasedCorrMaskValue real/_ DepthBasedCorrMaskMaskVersion string/_ DepthBasedCorrMaskMidpoint real/_ DepthBasedCorrMaskOrigin string/_ DepthBasedCorrMaskPerimeterValue real/_ DepthBasedCorrMaskRadius real/_ DepthBasedCorrMaskReferencePoint string/_ DepthBasedCorrMaskRight real/_ DepthBasedCorrMaskRoundness real/_ DepthBasedCorrMaskSizeX real/_ DepthBasedCorrMaskSizeY real/_ DepthBasedCorrMaskTop real/_ DepthBasedCorrMaskVersion integer/_ DepthBasedCorrMaskWhat string/_ DepthBasedCorrMaskWholeImageArea string/_ DepthBasedCorrMaskX real/_ DepthBasedCorrMaskY real/_ DepthBasedCorrMaskZeroX real/_ DepthBasedCorrMaskZeroY real/_ DepthBasedCorrCorrectionSyncID string/_+ DepthBasedCorrLocalCorrectedDepth real/_+ DepthBasedCorrLocalCurveRefineSaturation real/_+ DepthBasedCorrWhat string/_+ DepthMapInfo DepthMapInfo Struct DepthMapInfoBaseHighlightGuideInputDigest string/_ DepthMapInfoBaseHighlightGuideTable string/_ DepthMapInfoBaseHighlightGuideVersion string/_ DepthMapInfoBaseLayeredDepthInputDigest string/_ DepthMapInfoBaseLayeredDepthTable string/_ DepthMapInfoBaseLayeredDepthVersion string/_ DepthMapInfoBaseRawDepthInputDigest string/_ DepthMapInfoBaseRawDepthTable string/_ DepthMapInfoBaseRawDepthVersion string/_ DepthMapInfoDepthSource string/_ Description lang-alt/ DNGIgnoreSidecars boolean/ Exposure real/ Exposure2012 real/ FillLight integer/ GradientBasedCorrections Correction Struct+ GradientBasedCorrActive boolean/_ GradientBasedCorrAmount real/_ GradientBasedCorrMasks CorrectionMask Struct_+ GradientBasedCorrMaskAlpha real/_ GradientBasedCorrMaskAngle real/_ GradientBasedCorrMaskBottom real/_ GradientBasedCorrMaskCenterValue real/_ GradientBasedCorrMaskCenterWeight real/_ GradientBasedCorrMaskRange CorrRangeMask Struct_+ GradientBasedCorrMaskRangeAreaModels AreaModels Struct_+ GradientBasedCorrMaskRangeAreaModelsComponents string/_+ GradientBasedCorrMaskRangeAreaModelsColorSampleInfo string/_+ GradientBasedCorrMaskRangeColorAmount real/_+ GradientBasedCorrMaskRangeDepthFeather real/_+ GradientBasedCorrMaskRangeDepthMax real/_+ GradientBasedCorrMaskRangeDepthMin real/_+ GradientBasedCorrMaskRangeInvert boolean/_+ GradientBasedCorrMaskRangeLumFeather real/_+ GradientBasedCorrMaskRangeLuminanceDepthSampleInfo string/_+ GradientBasedCorrMaskRangeLumMax real/_+ GradientBasedCorrMaskRangeLumMin real/_+ GradientBasedCorrMaskRangeLumRange string/_+ GradientBasedCorrMaskRangeSampleType integer/_+ GradientBasedCorrMaskRangeType string/_+ GradientBasedCorrMaskRangeVersion string/_+ GradientBasedCorrMaskDabs string/_ GradientBasedCorrMaskFeather real/_ GradientBasedCorrMaskFlipped boolean/_ GradientBasedCorrMaskFlow real/_ GradientBasedCorrMaskFullX real/_ GradientBasedCorrMaskFullY real/_ GradientBasedCorrMaskInputDigest string/_ GradientBasedCorrMaskLeft real/_ GradientBasedCorrMaskMaskActive boolean/_ GradientBasedCorrMaskMaskBlendMode integer/_ GradientBasedCorrMaskMaskDigest string/_ GradientBasedCorrMaskMaskInverted boolean/_ GradientBasedCorrMaskMaskName string/_ GradientBasedCorrMaskMasks CorrectionMask Struct_+ GradientBasedCorrMaskMasksAlpha real/_ GradientBasedCorrMaskMasksAngle real/_ GradientBasedCorrMaskMasksBottom real/_ GradientBasedCorrMaskMasksCenterValue real/_ GradientBasedCorrMaskMasksCenterWeight real/_ GradientBasedCorrMaskMasksDabs string/_+ GradientBasedCorrMaskMasksFeather real/_ GradientBasedCorrMaskMasksFlipped boolean/_ GradientBasedCorrMaskMasksFlow real/_ GradientBasedCorrMaskMasksFullX real/_ GradientBasedCorrMaskMasksFullY real/_ GradientBasedCorrMaskMasksInputDigest string/_ GradientBasedCorrMaskMasksLeft real/_ GradientBasedCorrMaskMasksMaskActive boolean/_ GradientBasedCorrMaskMasksMaskBlendMode integer/_ GradientBasedCorrMaskMasksMaskDigest string/_ GradientBasedCorrMaskMasksMaskInverted boolean/_ GradientBasedCorrMaskMasksMaskName string/_ GradientBasedCorrMaskMasksMaskSubType string/_ GradientBasedCorrMaskMasksMaskSyncID string/_ GradientBasedCorrMaskMasksValue real/_ GradientBasedCorrMaskMasksMaskVersion string/_ GradientBasedCorrMaskMasksMidpoint real/_ GradientBasedCorrMaskMasksOrigin string/_ GradientBasedCorrMaskMasksPerimeterValue real/_ GradientBasedCorrMaskMasksRadius real/_ GradientBasedCorrMaskMasksReferencePoint string/_ GradientBasedCorrMaskMasksRight real/_ GradientBasedCorrMaskMasksRoundness real/_ GradientBasedCorrMaskMasksSizeX real/_ GradientBasedCorrMaskMasksSizeY real/_ GradientBasedCorrMaskMasksTop real/_ GradientBasedCorrMaskMaskSubType string/_ GradientBasedCorrMaskMasksVersion integer/_ GradientBasedCorrMaskMasksWhat string/_ GradientBasedCorrMaskMasksWholeImageArea string/_ GradientBasedCorrMaskMasksX real/_ GradientBasedCorrMaskMasksY real/_ GradientBasedCorrMaskMaskSyncID string/_ GradientBasedCorrMaskMasksZeroX real/_ GradientBasedCorrMaskMasksZeroY real/_ GradientBasedCorrMaskValue real/_ GradientBasedCorrMaskMaskVersion string/_ GradientBasedCorrMaskMidpoint real/_ GradientBasedCorrMaskOrigin string/_ GradientBasedCorrMaskPerimeterValue real/_ GradientBasedCorrMaskRadius real/_ GradientBasedCorrMaskReferencePoint string/_ GradientBasedCorrMaskRight real/_ GradientBasedCorrMaskRoundness real/_ GradientBasedCorrMaskSizeX real/_ GradientBasedCorrMaskSizeY real/_ GradientBasedCorrMaskTop real/_ GradientBasedCorrMaskVersion integer/_ GradientBasedCorrMaskWhat string/_ GradientBasedCorrMaskWholeImageArea string/_ GradientBasedCorrMaskX real/_ GradientBasedCorrMaskY real/_ GradientBasedCorrMaskZeroX real/_ GradientBasedCorrMaskZeroY real/_ GradientBasedCorrCorrectionName string/_+ GradientBasedCorrRangeMask CorrRangeMask Struct_+ GradientBasedCorrRangeMaskAreaModels AreaModels Struct_+ GradientBasedCorrRangeMaskAreaModelsComponents string/_+ GradientBasedCorrRangeMaskAreaModelsColorSampleInfo string/_+ GradientBasedCorrRangeMaskColorAmount real/_+ GradientBasedCorrRangeMaskDepthFeather real/_+ GradientBasedCorrRangeMaskDepthMax real/_+ GradientBasedCorrRangeMaskDepthMin real/_+ GradientBasedCorrRangeMaskInvert boolean/_+ GradientBasedCorrRangeMaskLumFeather real/_+ GradientBasedCorrRangeMaskLuminanceDepthSampleInfo string/_+ GradientBasedCorrRangeMaskLumMax real/_+ GradientBasedCorrRangeMaskLumMin real/_+ GradientBasedCorrRangeMaskLumRange string/_+ GradientBasedCorrRangeMaskSampleType integer/_+ GradientBasedCorrRangeMaskType string/_+ GradientBasedCorrRangeMaskVersion string/_+ GradientBasedCorrCorrectionSyncID string/_+ GradientBasedCorrBlacks2012 real/_ GradientBasedCorrBrightness real/_ GradientBasedCorrClarity real/_ GradientBasedCorrClarity2012 real/_ GradientBasedCorrContrast real/_ GradientBasedCorrContrast2012 real/_ GradientBasedCorrDefringe real/_ GradientBasedCorrDehaze real/_ GradientBasedCorrExposure real/_ GradientBasedCorrExposure2012 real/_ GradientBasedCorrHighlights2012 real/_ GradientBasedCorrHue real/_ GradientBasedCorrLuminanceNoise real/_ GradientBasedCorrMoire real/_ GradientBasedCorrSaturation real/_ GradientBasedCorrShadows2012 real/_ GradientBasedCorrSharpness real/_ GradientBasedCorrTemperature real/_ GradientBasedCorrTexture real/_ GradientBasedCorrTint real/_ GradientBasedCorrToningHue real/_ GradientBasedCorrToningSaturation real/_ GradientBasedCorrWhites2012 real/_ GradientBasedCorrWhat string/_ GrainAmount integer/ GrainFrequency integer/ GrainSeed integer/ GrainSize integer/ GrayMixerAqua integer/ GrayMixerBlue integer/ GrayMixerGreen integer/ GrayMixerMagenta integer/ GrayMixerOrange integer/ GrayMixerPurple integer/ GrayMixerRed integer/ GrayMixerYellow integer/ GreenHue integer/ GreenSaturation integer/ Group lang-alt/ HasCrop boolean/ HasSettings boolean/ HDREditMode integer/ Highlight2012 integer/ HighlightRecovery integer/ Highlights2012 integer/ HueAdjustmentAqua integer/ HueAdjustmentBlue integer/ HueAdjustmentGreen integer/ HueAdjustmentMagenta integer/ HueAdjustmentOrange integer/ HueAdjustmentPurple integer/ HueAdjustmentRed integer/ HueAdjustmentYellow integer/ IncrementalTemperature integer/ IncrementalTint integer/ JPEGHandling string/ LensBlur LensBlur Struct LensBlurActive boolean/_ LensBlurAmount real/_ LensBlurBokehAspect real/_ LensBlurBokehRotation real/_ LensBlurBokehShape real/_ LensBlurBokehShapeDetail real/_ LensBlurCatEyeAmount real/_ LensBlurCatEyeScale real/_ LensBlurFocalRange string/_ LensBlurFocalRangeSource real/_ LensBlurHighlightsBoost real/_ LensBlurHighlightsThreshold real/_ LensBlurSampledArea string/_ LensBlurSampledRange string/_ LensBlurSphericalAberration real/_ LensBlurSubjectRange string/_ LensBlurVersion string/_ LensManualDistortionAmount integer/ LensProfileChromaticAberrationScale integer/ LensProfileDigest string/ LensProfileDistortionScale integer/ LensProfileEnable integer/ LensProfileFilename string/ LensProfileIsEmbedded boolean/ LensProfileMatchKeyCameraModelName string/ LensProfileMatchKeyExifMake string/ LensProfileMatchKeyExifModel string/ LensProfileMatchKeyIsRaw boolean/ LensProfileMatchKeyLensID string/ LensProfileMatchKeyLensInfo string/ LensProfileMatchKeyLensName string/ LensProfileMatchKeySensorFormatFactor real/ LensProfileName string/ LensProfileSetup string/ LensProfileVignettingScale integer/ Look Look Struct LookAmount string/_ LookCluster string/_ LookCopyright string/_ LookGroup lang-alt/_ LookName string/ LookParameters LookParms Struct_ LookParametersCameraProfile string/_ LookParametersClarity2012 string/_ LookParametersConvertToGrayscale string/_ LookParametersHighlights2012 string/_ LookParametersLookTable string/_ LookParametersProcessVersion string/_ LookParametersShadows2012 string/_ LookParametersToneCurvePV2012 string/_+ LookParametersToneCurvePV2012Blue string/_+ LookParametersToneCurvePV2012Green string/_+ LookParametersToneCurvePV2012Red string/_+ LookParametersVersion string/_ LookSupportsAmount string/_ LookSupportsMonochrome string/_ LookSupportsOutputReferred string/_ LookUUID string/_ LuminanceAdjustmentAqua integer/ LuminanceAdjustmentBlue integer/ LuminanceAdjustmentGreen integer/ LuminanceAdjustmentMagenta integer/ LuminanceAdjustmentOrange integer/ LuminanceAdjustmentPurple integer/ LuminanceAdjustmentRed integer/ LuminanceAdjustmentYellow integer/ LuminanceNoiseReductionContrast integer/ LuminanceNoiseReductionDetail integer/ LuminanceSmoothing integer/ MaskGroupBasedCorrections Correction Struct+ MaskGroupBasedCorrActive boolean/_ MaskGroupBasedCorrAmount real/_ MaskGroupBasedCorrMask CorrectionMask Struct_+ MaskGroupBasedCorrMaskAlpha real/_ MaskGroupBasedCorrMaskAngle real/_ MaskGroupBasedCorrMaskBottom real/_ MaskGroupBasedCorrMaskCenterValue real/_ MaskGroupBasedCorrMaskCenterWeight real/_ MaskGroupBasedCorrMaskRange CorrRangeMask Struct_+ MaskGroupBasedCorrMaskRangeAreaModels AreaModels Struct_+ MaskGroupBasedCorrMaskRangeAreaModelsComponents string/_+ MaskGroupBasedCorrMaskRangeAreaModelsColorSampleInfo string/_+ MaskGroupBasedCorrMaskRangeColorAmount real/_+ MaskGroupBasedCorrMaskRangeDepthFeather real/_+ MaskGroupBasedCorrMaskRangeDepthMax real/_+ MaskGroupBasedCorrMaskRangeDepthMin real/_+ MaskGroupBasedCorrMaskRangeInvert boolean/_+ MaskGroupBasedCorrMaskRangeLumFeather real/_+ MaskGroupBasedCorrMaskRangeLuminanceDepthSampleInfo string/_+ MaskGroupBasedCorrMaskRangeLumMax real/_+ MaskGroupBasedCorrMaskRangeLumMin real/_+ MaskGroupBasedCorrMaskRangeLumRange string/_+ MaskGroupBasedCorrMaskRangeSampleType integer/_+ MaskGroupBasedCorrMaskRangeType string/_+ MaskGroupBasedCorrMaskRangeVersion string/_+ MaskGroupBasedCorrMaskDabs string/_+ MaskGroupBasedCorrMaskFeather real/_ MaskGroupBasedCorrMaskFlipped boolean/_ MaskGroupBasedCorrMaskFlow real/_ MaskGroupBasedCorrMaskFullX real/_ MaskGroupBasedCorrMaskFullY real/_ MaskGroupBasedCorrMaskInputDigest string/_ MaskGroupBasedCorrMaskLeft real/_ MaskGroupBasedCorrMaskMaskActive boolean/_ MaskGroupBasedCorrMaskMaskBlendMode integer/_ MaskGroupBasedCorrMaskMaskDigest string/_ MaskGroupBasedCorrMaskMaskInverted boolean/_ MaskGroupBasedCorrMaskMaskName string/_ MaskGroupBasedCorrMaskMasks CorrectionMask Struct_+ MaskGroupBasedCorrMaskMasksAlpha real/_ MaskGroupBasedCorrMaskMasksAngle real/_ MaskGroupBasedCorrMaskMasksBottom real/_ MaskGroupBasedCorrMaskMasksCenterValue real/_ MaskGroupBasedCorrMaskMasksCenterWeight real/_ MaskGroupBasedCorrMaskMasksDabs string/_+ MaskGroupBasedCorrMaskMasksFeather real/_ MaskGroupBasedCorrMaskMasksFlipped boolean/_ MaskGroupBasedCorrMaskMasksFlow real/_ MaskGroupBasedCorrMaskMasksFullX real/_ MaskGroupBasedCorrMaskMasksFullY real/_ MaskGroupBasedCorrMaskMasksInputDigest string/_ MaskGroupBasedCorrMaskMasksLeft real/_ MaskGroupBasedCorrMaskMasksMaskActive boolean/_ MaskGroupBasedCorrMaskMasksMaskBlendMode integer/_ MaskGroupBasedCorrMaskMasksMaskDigest string/_ MaskGroupBasedCorrMaskMasksMaskInverted boolean/_ MaskGroupBasedCorrMaskMasksMaskName string/_ MaskGroupBasedCorrMaskMasksMaskSubType string/_ MaskGroupBasedCorrMaskMasksMaskSyncID string/_ MaskGroupBasedCorrMaskMasksValue real/_ MaskGroupBasedCorrMaskMasksMaskVersion string/_ MaskGroupBasedCorrMaskMasksMidpoint real/_ MaskGroupBasedCorrMaskMasksOrigin string/_ MaskGroupBasedCorrMaskMasksPerimeterValue real/_ MaskGroupBasedCorrMaskMasksRadius real/_ MaskGroupBasedCorrMaskMasksReferencePoint string/_ MaskGroupBasedCorrMaskMasksRight real/_ MaskGroupBasedCorrMaskMasksRoundness real/_ MaskGroupBasedCorrMaskMasksSizeX real/_ MaskGroupBasedCorrMaskMasksSizeY real/_ MaskGroupBasedCorrMaskMasksTop real/_ MaskGroupBasedCorrMaskMaskSubType string/_ MaskGroupBasedCorrMaskMasksVersion integer/_ MaskGroupBasedCorrMaskMasksWhat string/_ MaskGroupBasedCorrMaskMasksWholeImageArea string/_ MaskGroupBasedCorrMaskMasksX real/_ MaskGroupBasedCorrMaskMasksY real/_ MaskGroupBasedCorrMaskMaskSyncID string/_ MaskGroupBasedCorrMaskMasksZeroX real/_ MaskGroupBasedCorrMaskMasksZeroY real/_ MaskGroupBasedCorrMaskValue real/_ MaskGroupBasedCorrMaskMaskVersion string/_ MaskGroupBasedCorrMaskMidpoint real/_ MaskGroupBasedCorrMaskOrigin string/_ MaskGroupBasedCorrMaskPerimeterValue real/_ MaskGroupBasedCorrMaskRadius real/_ MaskGroupBasedCorrMaskReferencePoint string/_ MaskGroupBasedCorrMaskRight real/_ MaskGroupBasedCorrMaskRoundness real/_ MaskGroupBasedCorrMaskSizeX real/_ MaskGroupBasedCorrMaskSizeY real/_ MaskGroupBasedCorrMaskTop real/_ MaskGroupBasedCorrMaskVersion integer/_ MaskGroupBasedCorrMaskWhat string/_ MaskGroupBasedCorrMaskWholeImageArea string/_ MaskGroupBasedCorrMaskX real/_ MaskGroupBasedCorrMaskY real/_ MaskGroupBasedCorrMaskZeroX real/_ MaskGroupBasedCorrMaskZeroY real/_ MaskGroupBasedCorrCorrectionName string/_+ MaskGroupBasedCorrRangeMask CorrRangeMask Struct_+ MaskGroupBasedCorrRangeMaskAreaModels AreaModels Struct_+ MaskGroupBasedCorrRangeMaskAreaModelsComponents string/_+ MaskGroupBasedCorrRangeMaskAreaModelsColorSampleInfo string/_+ MaskGroupBasedCorrRangeMaskColorAmount real/_+ MaskGroupBasedCorrRangeMaskDepthFeather real/_+ MaskGroupBasedCorrRangeMaskDepthMax real/_+ MaskGroupBasedCorrRangeMaskDepthMin real/_+ MaskGroupBasedCorrRangeMaskInvert boolean/_+ MaskGroupBasedCorrRangeMaskLumFeather real/_+ MaskGroupBasedCorrRangeMaskLuminanceDepthSampleInfo string/_+ MaskGroupBasedCorrRangeMaskLumMax real/_+ MaskGroupBasedCorrRangeMaskLumMin real/_+ MaskGroupBasedCorrRangeMaskLumRange string/_+ MaskGroupBasedCorrRangeMaskSampleType integer/_+ MaskGroupBasedCorrRangeMaskType string/_+ MaskGroupBasedCorrRangeMaskVersion string/_+ MaskGroupBasedCorrCorrectionSyncID string/_+ MaskGroupBasedCorrBlacks2012 real/_ MaskGroupBasedCorrBrightness real/_ MaskGroupBasedCorrClarity real/_ MaskGroupBasedCorrClarity2012 real/_ MaskGroupBasedCorrContrast real/_ MaskGroupBasedCorrContrast2012 real/_ MaskGroupBasedCorrDefringe real/_ MaskGroupBasedCorrDehaze real/_ MaskGroupBasedCorrExposure real/_ MaskGroupBasedCorrExposure2012 real/_ MaskGroupBasedCorrHighlights2012 real/_ MaskGroupBasedCorrHue real/_ MaskGroupBasedCorrLuminanceNoise real/_ MaskGroupBasedCorrMoire real/_ MaskGroupBasedCorrSaturation real/_ MaskGroupBasedCorrShadows2012 real/_ MaskGroupBasedCorrSharpness real/_ MaskGroupBasedCorrTemperature real/_ MaskGroupBasedCorrTexture real/_ MaskGroupBasedCorrTint real/_ MaskGroupBasedCorrToningHue real/_ MaskGroupBasedCorrToningSaturation real/_ MaskGroupBasedCorrWhites2012 real/_ MaskGroupBasedCorrWhat string/_ MoireFilter string/ Name lang-alt/ NegativeCacheLargePreviewSize integer/ NegativeCacheMaximumSize real/ NegativeCachePath string/ OverrideLookVignette boolean/ PaintBasedCorrections Correction Struct+ PaintCorrectionActive boolean/_ PaintCorrectionAmount real/_ PaintBasedCorrectionMasks CorrectionMask Struct_+ PaintCorrectionMaskAlpha real/_ PaintCorrectionMaskAngle real/_ PaintCorrectionMaskBottom real/_ PaintCorrectionMaskCenterValue real/_ PaintCorrectionMaskCenterWeight real/_ PaintCorrectionMaskRange CorrRangeMask Struct_+ PaintCorrectionMaskRangeAreaModels AreaModels Struct_+ PaintCorrectionMaskRangeAreaModelsComponents string/_+ PaintCorrectionMaskRangeAreaModelsColorSampleInfo string/_+ PaintCorrectionMaskRangeColorAmount real/_+ PaintCorrectionMaskRangeDepthFeather real/_+ PaintCorrectionMaskRangeDepthMax real/_+ PaintCorrectionMaskRangeDepthMin real/_+ PaintCorrectionMaskRangeInvert boolean/_+ PaintCorrectionMaskRangeLumFeather real/_+ PaintCorrectionMaskRangeLuminanceDepthSampleInfo string/_+ PaintCorrectionMaskRangeLumMax real/_+ PaintCorrectionMaskRangeLumMin real/_+ PaintCorrectionMaskRangeLumRange string/_+ PaintCorrectionMaskRangeSampleType integer/_+ PaintCorrectionMaskRangeType string/_+ PaintCorrectionMaskRangeVersion string/_+ PaintCorrectionMaskDabs string/_ PaintCorrectionMaskFeather real/_ PaintCorrectionMaskFlipped boolean/_ PaintCorrectionMaskFlow real/_ PaintCorrectionMaskFullX real/_ PaintCorrectionMaskFullY real/_ PaintCorrectionMaskInputDigest string/_ PaintCorrectionMaskLeft real/_ PaintCorrectionMaskMaskActive boolean/_ PaintCorrectionMaskMaskBlendMode integer/_ PaintCorrectionMaskMaskDigest string/_ PaintCorrectionMaskMaskInverted boolean/_ PaintCorrectionMaskMaskName string/_ PaintCorrectionMaskMasks CorrectionMask Struct_+ PaintCorrectionMaskMasksAlpha real/_ PaintCorrectionMaskMasksAngle real/_ PaintCorrectionMaskMasksBottom real/_ PaintCorrectionMaskMasksCenterValue real/_ PaintCorrectionMaskMasksCenterWeight real/_ PaintCorrectionMaskMasksDabs string/_+ PaintCorrectionMaskMasksFeather real/_ PaintCorrectionMaskMasksFlipped boolean/_ PaintCorrectionMaskMasksFlow real/_ PaintCorrectionMaskMasksFullX real/_ PaintCorrectionMaskMasksFullY real/_ PaintCorrectionMaskMasksInputDigest string/_ PaintCorrectionMaskMasksLeft real/_ PaintCorrectionMaskMasksMaskActive boolean/_ PaintCorrectionMaskMasksMaskBlendMode integer/_ PaintCorrectionMaskMasksMaskDigest string/_ PaintCorrectionMaskMasksMaskInverted boolean/_ PaintCorrectionMaskMasksMaskName string/_ PaintCorrectionMaskMasksMaskSubType string/_ PaintCorrectionMaskMasksMaskSyncID string/_ PaintCorrectionMaskMasksValue real/_ PaintCorrectionMaskMasksMaskVersion string/_ PaintCorrectionMaskMasksMidpoint real/_ PaintCorrectionMaskMasksOrigin string/_ PaintCorrectionMaskMasksPerimeterValue real/_ PaintCorrectionMaskMasksRadius real/_ PaintCorrectionMaskMasksReferencePoint string/_ PaintCorrectionMaskMasksRight real/_ PaintCorrectionMaskMasksRoundness real/_ PaintCorrectionMaskMasksSizeX real/_ PaintCorrectionMaskMasksSizeY real/_ PaintCorrectionMaskMasksTop real/_ PaintCorrectionMaskMaskSubType string/_ PaintCorrectionMaskMasksVersion integer/_ PaintCorrectionMaskMasksWhat string/_ PaintCorrectionMaskMasksWholeImageArea string/_ PaintCorrectionMaskMasksX real/_ PaintCorrectionMaskMasksY real/_ PaintCorrectionMaskMaskSyncID string/_ PaintCorrectionMaskMasksZeroX real/_ PaintCorrectionMaskMasksZeroY real/_ PaintCorrectionMaskValue real/_ PaintCorrectionMaskMaskVersion string/_ PaintCorrectionMaskMidpoint real/_ PaintCorrectionMaskOrigin string/_ PaintCorrectionMaskPerimeterValue real/_ PaintCorrectionMaskRadius real/_ PaintCorrectionMaskReferencePoint string/_ PaintCorrectionMaskRight real/_ PaintCorrectionMaskRoundness real/_ PaintCorrectionMaskSizeX real/_ PaintCorrectionMaskSizeY real/_ PaintCorrectionMaskTop real/_ PaintCorrectionMaskVersion integer/_ PaintCorrectionMaskWhat string/_ PaintCorrectionMaskWholeImageArea string/_ PaintCorrectionMaskX real/_ PaintCorrectionMaskY real/_ PaintCorrectionMaskZeroX real/_ PaintCorrectionMaskZeroY real/_ PaintCorrectionCorrectionName string/_+ PaintCorrectionRangeMask CorrRangeMask Struct_+ PaintCorrectionRangeMaskAreaModels AreaModels Struct_+ PaintCorrectionRangeMaskAreaModelsComponents string/_+ PaintCorrectionRangeMaskAreaModelsColorSampleInfo string/_+ PaintCorrectionRangeMaskColorAmount real/_+ PaintCorrectionRangeMaskDepthFeather real/_+ PaintCorrectionRangeMaskDepthMax real/_+ PaintCorrectionRangeMaskDepthMin real/_+ PaintCorrectionRangeMaskInvert boolean/_+ PaintCorrectionRangeMaskLumFeather real/_+ PaintCorrectionRangeMaskLuminanceDepthSampleInfo string/_+ PaintCorrectionRangeMaskLumMax real/_+ PaintCorrectionRangeMaskLumMin real/_+ PaintCorrectionRangeMaskLumRange string/_+ PaintCorrectionRangeMaskSampleType integer/_+ PaintCorrectionRangeMaskType string/_+ PaintCorrectionRangeMaskVersion string/_+ PaintCorrectionCorrectionSyncID string/_+ PaintCorrectionBlacks2012 real/_ PaintCorrectionBrightness real/_ PaintCorrectionClarity real/_ PaintCorrectionClarity2012 real/_ PaintCorrectionContrast real/_ PaintCorrectionContrast2012 real/_ PaintCorrectionDefringe real/_ PaintCorrectionDehaze real/_ PaintCorrectionExposure real/_ PaintCorrectionExposure2012 real/_ PaintCorrectionHighlights2012 real/_ PaintCorrectionHue real/_ PaintCorrectionLuminanceNoise real/_ PaintCorrectionMoire real/_ PaintCorrectionSaturation real/_ PaintCorrectionShadows2012 real/_ PaintCorrectionSharpness real/_ PaintCorrectionTemperature real/_ PaintCorrectionTexture real/_ PaintCorrectionTint real/_ PaintCorrectionToningHue real/_ PaintCorrectionToningSaturation real/_ PaintCorrectionWhites2012 real/_ PaintCorrectionWhat string/_ ParametricDarks integer/ ParametricHighlights integer/ ParametricHighlightSplit integer/ ParametricLights integer/ ParametricMidtoneSplit integer/ ParametricShadows integer/ ParametricShadowSplit integer/ PerspectiveAspect integer/ PerspectiveHorizontal integer/ PerspectiveRotate real/ PerspectiveScale integer/ PerspectiveUpright integer/ PerspectiveVertical integer/ PerspectiveX real/ PerspectiveY real/ PostCropVignetteAmount integer/ PostCropVignetteFeather integer/ PostCropVignetteHighlightContrast integer/ PostCropVignetteMidpoint integer/ PostCropVignetteRoundness integer/ PostCropVignetteStyle integer/ PresetType string/ ProcessVersion string/ RangeMask RangeMask Struct RangeMaskMapInfo MapInfo Struct_ RangeMaskMapInfoLabMax string/_ RangeMaskMapInfoLabMin string/_ RangeMaskMapInfoLumEq string/_+ RangeMaskMapInfoRGBMax string/_ RangeMaskMapInfoRGBMin string/_ RawFileName string/ RedEyeInfo string/+ RedHue integer/ RedSaturation integer/ RetouchAreas RetouchArea Struct+ RetouchAreaFeather real/_ RetouchAreaMasks CorrectionMask Struct_+ RetouchAreaMaskAlpha real/_ RetouchAreaMaskAngle real/_ RetouchAreaMaskBottom real/_ RetouchAreaMaskCenterValue real/_ RetouchAreaMaskCenterWeight real/_ RetouchAreaMaskRange CorrRangeMask Struct_+ RetouchAreaMaskRangeAreaModels AreaModels Struct_+ RetouchAreaMaskRangeAreaModelsComponents string/_+ RetouchAreaMaskRangeAreaModelsColorSampleInfo string/_+ RetouchAreaMaskRangeColorAmount real/_+ RetouchAreaMaskRangeDepthFeather real/_+ RetouchAreaMaskRangeDepthMax real/_+ RetouchAreaMaskRangeDepthMin real/_+ RetouchAreaMaskRangeInvert boolean/_+ RetouchAreaMaskRangeLumFeather real/_+ RetouchAreaMaskRangeLuminanceDepthSampleInfo string/_+ RetouchAreaMaskRangeLumMax real/_+ RetouchAreaMaskRangeLumMin real/_+ RetouchAreaMaskRangeLumRange string/_+ RetouchAreaMaskRangeSampleType integer/_+ RetouchAreaMaskRangeType string/_+ RetouchAreaMaskRangeVersion string/_+ RetouchAreaMaskDabs string/_ RetouchAreaMaskFeather real/_ RetouchAreaMaskFlipped boolean/_ RetouchAreaMaskFlow real/_ RetouchAreaMaskFullX real/_ RetouchAreaMaskFullY real/_ RetouchAreaMaskInputDigest string/_ RetouchAreaMaskLeft real/_ RetouchAreaMaskMaskActive boolean/_ RetouchAreaMaskMaskBlendMode integer/_ RetouchAreaMaskMaskDigest string/_ RetouchAreaMaskMaskInverted boolean/_ RetouchAreaMaskMaskName string/_ RetouchAreaMaskMasks CorrectionMask Struct_+ RetouchAreaMaskMasksAlpha real/_ RetouchAreaMaskMasksAngle real/_ RetouchAreaMaskMasksBottom real/_ RetouchAreaMaskMasksCenterValue real/_ RetouchAreaMaskMasksCenterWeight real/_ RetouchAreaMaskMasksDabs string/_+ RetouchAreaMaskMasksFeather real/_ RetouchAreaMaskMasksFlipped boolean/_ RetouchAreaMaskMasksFlow real/_ RetouchAreaMaskMasksFullX real/_ RetouchAreaMaskMasksFullY real/_ RetouchAreaMaskMasksInputDigest string/_ RetouchAreaMaskMasksLeft real/_ RetouchAreaMaskMasksMaskActive boolean/_ RetouchAreaMaskMasksMaskBlendMode integer/_ RetouchAreaMaskMasksMaskDigest string/_ RetouchAreaMaskMasksMaskInverted boolean/_ RetouchAreaMaskMasksMaskName string/_ RetouchAreaMaskMasksMaskSubType string/_ RetouchAreaMaskMasksMaskSyncID string/_ RetouchAreaMaskMasksValue real/_ RetouchAreaMaskMasksMaskVersion string/_ RetouchAreaMaskMasksMidpoint real/_ RetouchAreaMaskMasksOrigin string/_ RetouchAreaMaskMasksPerimeterValue real/_ RetouchAreaMaskMasksRadius real/_ RetouchAreaMaskMasksReferencePoint string/_ RetouchAreaMaskMasksRight real/_ RetouchAreaMaskMasksRoundness real/_ RetouchAreaMaskMasksSizeX real/_ RetouchAreaMaskMasksSizeY real/_ RetouchAreaMaskMasksTop real/_ RetouchAreaMaskMaskSubType string/_ RetouchAreaMaskMasksVersion integer/_ RetouchAreaMaskMasksWhat string/_ RetouchAreaMaskMasksWholeImageArea string/_ RetouchAreaMaskMasksX real/_ RetouchAreaMaskMasksY real/_ RetouchAreaMaskMaskSyncID string/_ RetouchAreaMaskMasksZeroX real/_ RetouchAreaMaskMasksZeroY real/_ RetouchAreaMaskValue real/_ RetouchAreaMaskMaskVersion string/_ RetouchAreaMaskMidpoint real/_ RetouchAreaMaskOrigin string/_ RetouchAreaMaskPerimeterValue real/_ RetouchAreaMaskRadius real/_ RetouchAreaMaskReferencePoint string/_ RetouchAreaMaskRight real/_ RetouchAreaMaskRoundness real/_ RetouchAreaMaskSizeX real/_ RetouchAreaMaskSizeY real/_ RetouchAreaMaskTop real/_ RetouchAreaMaskVersion integer/_ RetouchAreaMaskWhat string/_ RetouchAreaMaskWholeImageArea string/_ RetouchAreaMaskX real/_ RetouchAreaMaskY real/_ RetouchAreaMaskZeroX real/_ RetouchAreaMaskZeroY real/_ RetouchAreaMethod string/_ RetouchAreaOffsetY real/_ RetouchAreaOpacity real/_ RetouchAreaSeed integer/_ RetouchAreaSourceState string/_ RetouchAreaSourceX real/_ RetouchAreaSpotType string/_ RetouchInfo string/+ Saturation integer/ SaturationAdjustmentAqua integer/ SaturationAdjustmentBlue integer/ SaturationAdjustmentGreen integer/ SaturationAdjustmentMagenta integer/ SaturationAdjustmentOrange integer/ SaturationAdjustmentPurple integer/ SaturationAdjustmentRed integer/ SaturationAdjustmentYellow integer/ SDRBlend real/ SDRBrightness real/ SDRContrast real/ SDRHighlights real/ SDRShadows real/ SDRWhites real/ Shadows integer/ Shadows2012 integer/ ShadowTint integer/ SharpenDetail integer/ SharpenEdgeMasking integer/ SharpenRadius real/ Sharpness integer/ ShortName lang-alt/ Smoothness integer/ SortName lang-alt/ SplitToningBalance integer/ SplitToningHighlightHue integer/ SplitToningHighlightSaturation integer/ SplitToningShadowHue integer/ SplitToningShadowSaturation integer/ SupportsAmount boolean/ SupportsColor boolean/ SupportsHighDynamicRange boolean/ SupportsMonochrome boolean/ SupportsNormalDynamicRange boolean/ SupportsOutputReferred boolean/ SupportsSceneReferred boolean/ ColorTemperature integer/ Texture integer/ TIFFHandling string/ Tint integer/ ToggleStyleAmount integer/ ToggleStyleDigest string/ ToneCurve string/+ ToneCurveBlue string/+ ToneCurveGreen string/+ ToneCurveName string/ ToneCurveName2012 string/ ToneCurvePV2012 string/+ ToneCurvePV2012Blue string/+ ToneCurvePV2012Green string/+ ToneCurvePV2012Red string/+ ToneCurveRed string/+ ToneMapStrength real/ UprightCenterMode integer/ UprightCenterNormX real/ UprightCenterNormY real/ UprightDependentDigest string/ UprightFocalLength35mm real/ UprightFocalMode integer/ UprightFourSegments_0 string/ UprightFourSegments_1 string/ UprightFourSegments_2 string/ UprightFourSegments_3 string/ UprightFourSegmentsCount integer/ UprightGuidedDependentDigest string/ UprightPreview boolean/ UprightTransform_0 string/ UprightTransform_1 string/ UprightTransform_2 string/ UprightTransform_3 string/ UprightTransform_4 string/ UprightTransform_5 string/ UprightTransformCount integer/ UprightVersion integer/ UUID string/ Version string/ Vibrance integer/ VignetteAmount integer/ VignetteMidpoint integer/ What string/ WhiteBalance string/ Whites2012 integer/

XMP Correction Struct

Field Name Writable ———- ——– CorrectionActive boolean CorrectionAmount real CorrectionMasks CorrectionMask Struct+ CorrectionName string CorrRangeMask CorrRangeMask Struct - CorrectionSyncID string LocalBlacks2012 real LocalBrightness real LocalClarity real LocalClarity2012 real LocalContrast real LocalContrast2012 real LocalDefringe real LocalDehaze real LocalExposure real LocalExposure2012 real LocalHighlights2012 real LocalHue real LocalLuminanceNoise real LocalMoire real LocalSaturation real LocalShadows2012 real LocalSharpness real LocalTemperature real LocalTexture real LocalTint real LocalToningHue real LocalToningSaturation real LocalWhites2012 real What string

XMP CorrectionMask Struct

Field Name Writable ———- ——– Alpha real Angle real Bottom real CenterValue real CenterWeight real CorrRangeMask CorrRangeMask Struct - Dabs string+ Feather real Flipped boolean Flow real FullX real FullY real InputDigest string Left real MaskActive boolean MaskBlendMode integer MaskDigest string MaskInverted boolean MaskName string MaskSubType string MaskSyncID string MaskValue real MaskVersion string Masks CorrectionMask Struct Midpoint real Origin string PerimeterValue real Radius real ReferencePoint string Right real Roundness real SizeX real SizeY real Top real Version integer What string WholeImageArea string X real Y real ZeroX real ZeroY real

XMP CorrRangeMask Struct

Called CorrectionRangeMask by the spec.

Field Name Writable ———- ——– AreaModels AreaModels Struct+ ColorAmount real DepthFeather real DepthMax real DepthMin real Invert boolean LumFeather real LumMax real LumMin real LumRange string LuminanceDepthSampleInfo string SampleType integer Type string Version string

XMP AreaModels Struct

Field Name Writable ———- ——– AreaComponents string+ ColorRangeMaskAreaSampleInfo string

XMP DepthBasedCorr Struct

Field Name Writable ———- ——– CorrectionActive boolean CorrectionAmount real CorrectionMasks CorrectionMask Struct+ CorrectionSyncID string LocalCorrectedDepth real LocalCurveRefineSaturation real What string

XMP DepthMapInfo Struct

Field Name Writable ———- ——– BaseHighlightGuideInputDigest string BaseHighlightGuideTable string BaseHighlightGuideVersion string BaseLayeredDepthInputDigest string BaseLayeredDepthTable string BaseLayeredDepthVersion string BaseRawDepthInputDigest string BaseRawDepthTable string BaseRawDepthVersion string DepthSource string

XMP LensBlur Struct

Field Name Writable ———- ——– Active boolean BlurAmount real BokehAspect real BokehRotation real BokehShape real BokehShapeDetail real CatEyeAmount real CatEyeScale real FocalRange string FocalRangeSource real HighlightsBoost real HighlightsThreshold real SampledArea string SampledRange string SphericalAberration real SubjectRange string Version string

XMP Look Struct

Field Name Writable ———- ——– Amount string Cluster string Copyright string Group lang-alt Name string Parameters LookParms Struct SupportsAmount string SupportsMonochrome string SupportsOutputReferred string UUID string

XMP LookParms Struct

Field Name Writable ———- ——– CameraProfile string Clarity2012 string ConvertToGrayscale string Highlights2012 string LookTable string ProcessVersion string Shadows2012 string ToneCurvePV2012 string+ ToneCurvePV2012Blue string+ ToneCurvePV2012Green string+ ToneCurvePV2012Red string+ Version string

XMP RangeMask Struct

This structure is actually called RangeMaskMapInfo, but it only contains one element which is a RangeMaskMapInfo structure (Yes, really!). So these are renamed to RangeMask and MapInfo respectively to avoid confusion and redundancy in the tag names.

Field Name Writable ———- ——– RangeMaskMapInfo MapInfo Struct

XMP MapInfo Struct

Called RangeMaskMapInfo by the specification, the same as the containing structure.

Field Name Writable ———- ——– LabMax string LabMin string LumEq string+ RGBMax string RGBMin string

XMP RetouchArea Struct

Field Name Writable ———- ——– Feather real Masks CorrectionMask Struct+ Method string OffsetY real Opacity real Seed integer SourceState string SourceX real SpotType string

XMP creatorAtom Tags

Adobe creatorAtom tags, written by After Effects.

These tags belong to the ExifTool XMP-creatorAtom family 1 group.

Tag Name Writable ——– ——– AeProjectLink AEProjectLink Struct AeProjectLinkCompositionID string_ AeProjectLinkFullPath string_ AeProjectLinkRenderOutputModuleIndex string_ AeProjectLinkRenderQueueItemID string_ AeProjectLinkRenderTimeStamp integer_ MacAtom MacAtom Struct MacAtomApplicationCode string_ MacAtomInvocationAppleEvent string_ MacAtomPosixProjectPath string_ WindowsAtom WindowsAtom Struct WindowsAtomExtension string_ WindowsAtomInvocationFlags string_ WindowsAtomUncProjectPath string_

XMP AEProjectLink Struct

Field Name Writable ———- ——– CompositionID string FullPath string RenderOutputModuleIndex string RenderQueueItemID string RenderTimeStamp integer

XMP MacAtom Struct

Field Name Writable ———- ——– ApplicationCode string InvocationAppleEvent string PosixProjectPath string

XMP WindowsAtom Struct

Field Name Writable ———- ——– Extension string InvocationFlags string UncProjectPath string

XMP crs Tags

Photoshop Camera Raw namespace tags. It is a shame that Adobe pollutes the metadata space with these incredibly bulky image editing parameters.

These tags belong to the ExifTool XMP-crs family 1 group.

Tag Name Writable ——– ——– AlreadyApplied boolean AutoBrightness boolean AutoContrast boolean AutoExposure boolean AutoLateralCA integer AutoShadows boolean AutoTone boolean AutoToneDigest string AutoToneDigestNoSat string AutoWhiteVersion integer Blacks2012 integer BlueHue integer BlueSaturation integer Brightness integer CameraModelRestriction string CameraProfile string CameraProfileDigest string ChromaticAberrationB integer ChromaticAberrationR integer CircularGradientBasedCorrections Correction Struct+ CircGradBasedCorrActive boolean_ CircGradBasedCorrAmount real_ CircGradBasedCorrMasks CorrectionMask Struct_+ CircGradBasedCorrMaskAlpha real_ CircGradBasedCorrMaskAngle real_ CircGradBasedCorrMaskBottom real_ CircGradBasedCorrMaskCenterValue real_ CircGradBasedCorrMaskCenterWeight real_ CircGradBasedCorrMaskRange CorrRangeMask Struct_+ CircGradBasedCorrMaskRangeAreaModels AreaModels Struct_+ CircGradBasedCorrMaskRangeAreaModelsComponents string_+ CircGradBasedCorrMaskRangeAreaModelsColorSampleInfo string_+ CircGradBasedCorrMaskRangeColorAmount real_+ CircGradBasedCorrMaskRangeDepthFeather real_+ CircGradBasedCorrMaskRangeDepthMax real_+ CircGradBasedCorrMaskRangeDepthMin real_+ CircGradBasedCorrMaskRangeInvert boolean_+ CircGradBasedCorrMaskRangeLumFeather real_+ CircGradBasedCorrMaskRangeLuminanceDepthSampleInfo string_+ CircGradBasedCorrMaskRangeLumMax real_+ CircGradBasedCorrMaskRangeLumMin real_+ CircGradBasedCorrMaskRangeLumRange string_+ CircGradBasedCorrMaskRangeSampleType integer_+ CircGradBasedCorrMaskRangeType string_+ CircGradBasedCorrMaskRangeVersion string_+ CircGradBasedCorrMaskDabs string_ CircGradBasedCorrMaskFeather real_ CircGradBasedCorrMaskFlipped boolean_ CircGradBasedCorrMaskFlow real_ CircGradBasedCorrMaskFullX real_ CircGradBasedCorrMaskFullY real_ CircGradBasedCorrMaskInputDigest string_ CircGradBasedCorrMaskLeft real_ CircGradBasedCorrMaskMaskActive boolean_ CircGradBasedCorrMaskMaskBlendMode integer_ CircGradBasedCorrMaskMaskDigest string_ CircGradBasedCorrMaskMaskInverted boolean_ CircGradBasedCorrMaskMaskName string_ CircGradBasedCorrMaskMasks CorrectionMask Struct_+ CircGradBasedCorrMaskMasksAlpha real_ CircGradBasedCorrMaskMasksAngle real_ CircGradBasedCorrMaskMasksBottom real_ CircGradBasedCorrMaskMasksCenterValue real_ CircGradBasedCorrMaskMasksCenterWeight real_ CircGradBasedCorrMaskMasksDabs string_+ CircGradBasedCorrMaskMasksFeather real_ CircGradBasedCorrMaskMasksFlipped boolean_ CircGradBasedCorrMaskMasksFlow real_ CircGradBasedCorrMaskMasksFullX real_ CircGradBasedCorrMaskMasksFullY real_ CircGradBasedCorrMaskMasksInputDigest string_ CircGradBasedCorrMaskMasksLeft real_ CircGradBasedCorrMaskMasksMaskActive boolean_ CircGradBasedCorrMaskMasksMaskBlendMode integer_ CircGradBasedCorrMaskMasksMaskDigest string_ CircGradBasedCorrMaskMasksMaskInverted boolean_ CircGradBasedCorrMaskMasksMaskName string_ CircGradBasedCorrMaskMasksMaskSubType string_ CircGradBasedCorrMaskMasksMaskSyncID string_ CircGradBasedCorrMaskMasksValue real_ CircGradBasedCorrMaskMasksMaskVersion string_ CircGradBasedCorrMaskMasksMidpoint real_ CircGradBasedCorrMaskMasksOrigin string_ CircGradBasedCorrMaskMasksPerimeterValue real_ CircGradBasedCorrMaskMasksRadius real_ CircGradBasedCorrMaskMasksReferencePoint string_ CircGradBasedCorrMaskMasksRight real_ CircGradBasedCorrMaskMasksRoundness real_ CircGradBasedCorrMaskMasksSizeX real_ CircGradBasedCorrMaskMasksSizeY real_ CircGradBasedCorrMaskMasksTop real_ CircGradBasedCorrMaskMaskSubType string_ CircGradBasedCorrMaskMasksVersion integer_ CircGradBasedCorrMaskMasksWhat string_ CircGradBasedCorrMaskMasksWholeImageArea string_ CircGradBasedCorrMaskMasksX real_ CircGradBasedCorrMaskMasksY real_ CircGradBasedCorrMaskMaskSyncID string_ CircGradBasedCorrMaskMasksZeroX real_ CircGradBasedCorrMaskMasksZeroY real_ CircGradBasedCorrMaskValue real_ CircGradBasedCorrMaskMaskVersion string_ CircGradBasedCorrMaskMidpoint real_ CircGradBasedCorrMaskOrigin string_ CircGradBasedCorrMaskPerimeterValue real_ CircGradBasedCorrMaskRadius real_ CircGradBasedCorrMaskReferencePoint string_ CircGradBasedCorrMaskRight real_ CircGradBasedCorrMaskRoundness real_ CircGradBasedCorrMaskSizeX real_ CircGradBasedCorrMaskSizeY real_ CircGradBasedCorrMaskTop real_ CircGradBasedCorrMaskVersion integer_ CircGradBasedCorrMaskWhat string_ CircGradBasedCorrMaskWholeImageArea string_ CircGradBasedCorrMaskX real_ CircGradBasedCorrMaskY real_ CircGradBasedCorrMaskZeroX real_ CircGradBasedCorrMaskZeroY real_ CircGradBasedCorrCorrectionName string_+ CircGradBasedCorrRangeMask CorrRangeMask Struct_+ CircGradBasedCorrRangeMaskAreaModels AreaModels Struct_+ CircGradBasedCorrRangeMaskAreaModelsComponents string_+ CircGradBasedCorrRangeMaskAreaModelsColorSampleInfo string_+ CircGradBasedCorrRangeMaskColorAmount real_+ CircGradBasedCorrRangeMaskDepthFeather real_+ CircGradBasedCorrRangeMaskDepthMax real_+ CircGradBasedCorrRangeMaskDepthMin real_+ CircGradBasedCorrRangeMaskInvert boolean_+ CircGradBasedCorrRangeMaskLumFeather real_+ CircGradBasedCorrRangeMaskLuminanceDepthSampleInfo string_+ CircGradBasedCorrRangeMaskLumMax real_+ CircGradBasedCorrRangeMaskLumMin real_+ CircGradBasedCorrRangeMaskLumRange string_+ CircGradBasedCorrRangeMaskSampleType integer_+ CircGradBasedCorrRangeMaskType string_+ CircGradBasedCorrRangeMaskVersion string_+ CircGradBasedCorrCorrectionSyncID string_+ CircGradBasedCorrBlacks2012 real_ CircGradBasedCorrBrightness real_ CircGradBasedCorrClarity real_ CircGradBasedCorrClarity2012 real_ CircGradBasedCorrContrast real_ CircGradBasedCorrContrast2012 real_ CircGradBasedCorrDefringe real_ CircGradBasedCorrDehaze real_ CircGradBasedCorrExposure real_ CircGradBasedCorrExposure2012 real_ CircGradBasedCorrHighlights2012 real_ CircGradBasedCorrHue real_ CircGradBasedCorrLuminanceNoise real_ CircGradBasedCorrMoire real_ CircGradBasedCorrSaturation real_ CircGradBasedCorrShadows2012 real_ CircGradBasedCorrSharpness real_ CircGradBasedCorrTemperature real_ CircGradBasedCorrTexture real_ CircGradBasedCorrTint real_ CircGradBasedCorrToningHue real_ CircGradBasedCorrToningSaturation real_ CircGradBasedCorrWhites2012 real_ CircGradBasedCorrWhat string_ Clarity integer Clarity2012 integer ClipboardAspectRatio integer ClipboardOrientation integer Cluster string ColorGradeBlending integer ColorGradeGlobalHue integer ColorGradeGlobalLum integer ColorGradeGlobalSat integer ColorGradeHighlightLum integer ColorGradeMidtoneHue integer ColorGradeMidtoneLum integer ColorGradeMidtoneSat integer ColorGradeShadowLum integer ColorNoiseReduction integer ColorNoiseReductionDetail integer ColorNoiseReductionSmoothness integer CompatibleVersion string ContactInfo string Contrast integer/ Contrast2012 integer Converter string ConvertToGrayscale boolean Copyright string/ CropAngle real CropBottom real CropConstrainToWarp integer CropHeight real CropLeft real CropRight real CropTop real CropUnit integer CropUnits integer CropWidth real DefaultAutoGray boolean DefaultAutoTone boolean DefaultsSpecificToISO boolean DefaultsSpecificToSerial boolean Defringe integer DefringeGreenAmount integer DefringeGreenHueHi integer DefringeGreenHueLo integer DefringePurpleAmount integer DefringePurpleHueHi integer DefringePurpleHueLo integer Dehaze real DepthBasedCorrections DepthBasedCorr Struct+ DepthBasedCorrCorrectionActive boolean_+ DepthBasedCorrCorrectionAmount real_+ DepthBasedCorrMask CorrectionMask Struct_+ DepthBasedCorrMaskAlpha real_ DepthBasedCorrMaskAngle real_ DepthBasedCorrMaskBottom real_ DepthBasedCorrMaskCenterValue real_ DepthBasedCorrMaskCenterWeight real_ DepthBasedCorrMaskRange CorrRangeMask Struct_+ DepthBasedCorrMaskRangeAreaModels AreaModels Struct_+ DepthBasedCorrMaskRangeAreaModelsComponents string_+ DepthBasedCorrMaskRangeAreaModelsColorSampleInfo string_+ DepthBasedCorrMaskRangeColorAmount real_+ DepthBasedCorrMaskRangeDepthFeather real_+ DepthBasedCorrMaskRangeDepthMax real_+ DepthBasedCorrMaskRangeDepthMin real_+ DepthBasedCorrMaskRangeInvert boolean_+ DepthBasedCorrMaskRangeLumFeather real_+ DepthBasedCorrMaskRangeLuminanceDepthSampleInfo string_+ DepthBasedCorrMaskRangeLumMax real_+ DepthBasedCorrMaskRangeLumMin real_+ DepthBasedCorrMaskRangeLumRange string_+ DepthBasedCorrMaskRangeSampleType integer_+ DepthBasedCorrMaskRangeType string_+ DepthBasedCorrMaskRangeVersion string_+ DepthBasedCorrMaskDabs string_+ DepthBasedCorrMaskFeather real_ DepthBasedCorrMaskFlipped boolean_ DepthBasedCorrMaskFlow real_ DepthBasedCorrMaskFullX real_ DepthBasedCorrMaskFullY real_ DepthBasedCorrMaskInputDigest string_ DepthBasedCorrMaskLeft real_ DepthBasedCorrMaskMaskActive boolean_ DepthBasedCorrMaskMaskBlendMode integer_ DepthBasedCorrMaskMaskDigest string_ DepthBasedCorrMaskMaskInverted boolean_ DepthBasedCorrMaskMaskName string_ DepthBasedCorrMaskMasks CorrectionMask Struct_+ DepthBasedCorrMaskMasksAlpha real_ DepthBasedCorrMaskMasksAngle real_ DepthBasedCorrMaskMasksBottom real_ DepthBasedCorrMaskMasksCenterValue real_ DepthBasedCorrMaskMasksCenterWeight real_ DepthBasedCorrMaskMasksDabs string_+ DepthBasedCorrMaskMasksFeather real_ DepthBasedCorrMaskMasksFlipped boolean_ DepthBasedCorrMaskMasksFlow real_ DepthBasedCorrMaskMasksFullX real_ DepthBasedCorrMaskMasksFullY real_ DepthBasedCorrMaskMasksInputDigest string_ DepthBasedCorrMaskMasksLeft real_ DepthBasedCorrMaskMasksMaskActive boolean_ DepthBasedCorrMaskMasksMaskBlendMode integer_ DepthBasedCorrMaskMasksMaskDigest string_ DepthBasedCorrMaskMasksMaskInverted boolean_ DepthBasedCorrMaskMasksMaskName string_ DepthBasedCorrMaskMasksMaskSubType string_ DepthBasedCorrMaskMasksMaskSyncID string_ DepthBasedCorrMaskMasksValue real_ DepthBasedCorrMaskMasksMaskVersion string_ DepthBasedCorrMaskMasksMidpoint real_ DepthBasedCorrMaskMasksOrigin string_ DepthBasedCorrMaskMasksPerimeterValue real_ DepthBasedCorrMaskMasksRadius real_ DepthBasedCorrMaskMasksReferencePoint string_ DepthBasedCorrMaskMasksRight real_ DepthBasedCorrMaskMasksRoundness real_ DepthBasedCorrMaskMasksSizeX real_ DepthBasedCorrMaskMasksSizeY real_ DepthBasedCorrMaskMasksTop real_ DepthBasedCorrMaskMaskSubType string_ DepthBasedCorrMaskMasksVersion integer_ DepthBasedCorrMaskMasksWhat string_ DepthBasedCorrMaskMasksWholeImageArea string_ DepthBasedCorrMaskMasksX real_ DepthBasedCorrMaskMasksY real_ DepthBasedCorrMaskMaskSyncID string_ DepthBasedCorrMaskMasksZeroX real_ DepthBasedCorrMaskMasksZeroY real_ DepthBasedCorrMaskValue real_ DepthBasedCorrMaskMaskVersion string_ DepthBasedCorrMaskMidpoint real_ DepthBasedCorrMaskOrigin string_ DepthBasedCorrMaskPerimeterValue real_ DepthBasedCorrMaskRadius real_ DepthBasedCorrMaskReferencePoint string_ DepthBasedCorrMaskRight real_ DepthBasedCorrMaskRoundness real_ DepthBasedCorrMaskSizeX real_ DepthBasedCorrMaskSizeY real_ DepthBasedCorrMaskTop real_ DepthBasedCorrMaskVersion integer_ DepthBasedCorrMaskWhat string_ DepthBasedCorrMaskWholeImageArea string_ DepthBasedCorrMaskX real_ DepthBasedCorrMaskY real_ DepthBasedCorrMaskZeroX real_ DepthBasedCorrMaskZeroY real_ DepthBasedCorrCorrectionSyncID string_+ DepthBasedCorrLocalCorrectedDepth real_+ DepthBasedCorrLocalCurveRefineSaturation real_+ DepthBasedCorrWhat string_+ DepthMapInfo DepthMapInfo Struct DepthMapInfoBaseHighlightGuideInputDigest string_ DepthMapInfoBaseHighlightGuideTable string_ DepthMapInfoBaseHighlightGuideVersion string_ DepthMapInfoBaseLayeredDepthInputDigest string_ DepthMapInfoBaseLayeredDepthTable string_ DepthMapInfoBaseLayeredDepthVersion string_ DepthMapInfoBaseRawDepthInputDigest string_ DepthMapInfoBaseRawDepthTable string_ DepthMapInfoBaseRawDepthVersion string_ DepthMapInfoDepthSource string_ Description lang-alt/ DNGIgnoreSidecars boolean Exposure real Exposure2012 real FillLight integer GradientBasedCorrections Correction Struct+ GradientBasedCorrActive boolean_ GradientBasedCorrAmount real_ GradientBasedCorrMasks CorrectionMask Struct_+ GradientBasedCorrMaskAlpha real_ GradientBasedCorrMaskAngle real_ GradientBasedCorrMaskBottom real_ GradientBasedCorrMaskCenterValue real_ GradientBasedCorrMaskCenterWeight real_ GradientBasedCorrMaskRange CorrRangeMask Struct_+ GradientBasedCorrMaskRangeAreaModels AreaModels Struct_+ GradientBasedCorrMaskRangeAreaModelsComponents string_+ GradientBasedCorrMaskRangeAreaModelsColorSampleInfo string_+ GradientBasedCorrMaskRangeColorAmount real_+ GradientBasedCorrMaskRangeDepthFeather real_+ GradientBasedCorrMaskRangeDepthMax real_+ GradientBasedCorrMaskRangeDepthMin real_+ GradientBasedCorrMaskRangeInvert boolean_+ GradientBasedCorrMaskRangeLumFeather real_+ GradientBasedCorrMaskRangeLuminanceDepthSampleInfo string_+ GradientBasedCorrMaskRangeLumMax real_+ GradientBasedCorrMaskRangeLumMin real_+ GradientBasedCorrMaskRangeLumRange string_+ GradientBasedCorrMaskRangeSampleType integer_+ GradientBasedCorrMaskRangeType string_+ GradientBasedCorrMaskRangeVersion string_+ GradientBasedCorrMaskDabs string_ GradientBasedCorrMaskFeather real_ GradientBasedCorrMaskFlipped boolean_ GradientBasedCorrMaskFlow real_ GradientBasedCorrMaskFullX real_ GradientBasedCorrMaskFullY real_ GradientBasedCorrMaskInputDigest string_ GradientBasedCorrMaskLeft real_ GradientBasedCorrMaskMaskActive boolean_ GradientBasedCorrMaskMaskBlendMode integer_ GradientBasedCorrMaskMaskDigest string_ GradientBasedCorrMaskMaskInverted boolean_ GradientBasedCorrMaskMaskName string_ GradientBasedCorrMaskMasks CorrectionMask Struct_+ GradientBasedCorrMaskMasksAlpha real_ GradientBasedCorrMaskMasksAngle real_ GradientBasedCorrMaskMasksBottom real_ GradientBasedCorrMaskMasksCenterValue real_ GradientBasedCorrMaskMasksCenterWeight real_ GradientBasedCorrMaskMasksDabs string_+ GradientBasedCorrMaskMasksFeather real_ GradientBasedCorrMaskMasksFlipped boolean_ GradientBasedCorrMaskMasksFlow real_ GradientBasedCorrMaskMasksFullX real_ GradientBasedCorrMaskMasksFullY real_ GradientBasedCorrMaskMasksInputDigest string_ GradientBasedCorrMaskMasksLeft real_ GradientBasedCorrMaskMasksMaskActive boolean_ GradientBasedCorrMaskMasksMaskBlendMode integer_ GradientBasedCorrMaskMasksMaskDigest string_ GradientBasedCorrMaskMasksMaskInverted boolean_ GradientBasedCorrMaskMasksMaskName string_ GradientBasedCorrMaskMasksMaskSubType string_ GradientBasedCorrMaskMasksMaskSyncID string_ GradientBasedCorrMaskMasksValue real_ GradientBasedCorrMaskMasksMaskVersion string_ GradientBasedCorrMaskMasksMidpoint real_ GradientBasedCorrMaskMasksOrigin string_ GradientBasedCorrMaskMasksPerimeterValue real_ GradientBasedCorrMaskMasksRadius real_ GradientBasedCorrMaskMasksReferencePoint string_ GradientBasedCorrMaskMasksRight real_ GradientBasedCorrMaskMasksRoundness real_ GradientBasedCorrMaskMasksSizeX real_ GradientBasedCorrMaskMasksSizeY real_ GradientBasedCorrMaskMasksTop real_ GradientBasedCorrMaskMaskSubType string_ GradientBasedCorrMaskMasksVersion integer_ GradientBasedCorrMaskMasksWhat string_ GradientBasedCorrMaskMasksWholeImageArea string_ GradientBasedCorrMaskMasksX real_ GradientBasedCorrMaskMasksY real_ GradientBasedCorrMaskMaskSyncID string_ GradientBasedCorrMaskMasksZeroX real_ GradientBasedCorrMaskMasksZeroY real_ GradientBasedCorrMaskValue real_ GradientBasedCorrMaskMaskVersion string_ GradientBasedCorrMaskMidpoint real_ GradientBasedCorrMaskOrigin string_ GradientBasedCorrMaskPerimeterValue real_ GradientBasedCorrMaskRadius real_ GradientBasedCorrMaskReferencePoint string_ GradientBasedCorrMaskRight real_ GradientBasedCorrMaskRoundness real_ GradientBasedCorrMaskSizeX real_ GradientBasedCorrMaskSizeY real_ GradientBasedCorrMaskTop real_ GradientBasedCorrMaskVersion integer_ GradientBasedCorrMaskWhat string_ GradientBasedCorrMaskWholeImageArea string_ GradientBasedCorrMaskX real_ GradientBasedCorrMaskY real_ GradientBasedCorrMaskZeroX real_ GradientBasedCorrMaskZeroY real_ GradientBasedCorrCorrectionName string_+ GradientBasedCorrRangeMask CorrRangeMask Struct_+ GradientBasedCorrRangeMaskAreaModels AreaModels Struct_+ GradientBasedCorrRangeMaskAreaModelsComponents string_+ GradientBasedCorrRangeMaskAreaModelsColorSampleInfo string_+ GradientBasedCorrRangeMaskColorAmount real_+ GradientBasedCorrRangeMaskDepthFeather real_+ GradientBasedCorrRangeMaskDepthMax real_+ GradientBasedCorrRangeMaskDepthMin real_+ GradientBasedCorrRangeMaskInvert boolean_+ GradientBasedCorrRangeMaskLumFeather real_+ GradientBasedCorrRangeMaskLuminanceDepthSampleInfo string_+ GradientBasedCorrRangeMaskLumMax real_+ GradientBasedCorrRangeMaskLumMin real_+ GradientBasedCorrRangeMaskLumRange string_+ GradientBasedCorrRangeMaskSampleType integer_+ GradientBasedCorrRangeMaskType string_+ GradientBasedCorrRangeMaskVersion string_+ GradientBasedCorrCorrectionSyncID string_+ GradientBasedCorrBlacks2012 real_ GradientBasedCorrBrightness real_ GradientBasedCorrClarity real_ GradientBasedCorrClarity2012 real_ GradientBasedCorrContrast real_ GradientBasedCorrContrast2012 real_ GradientBasedCorrDefringe real_ GradientBasedCorrDehaze real_ GradientBasedCorrExposure real_ GradientBasedCorrExposure2012 real_ GradientBasedCorrHighlights2012 real_ GradientBasedCorrHue real_ GradientBasedCorrLuminanceNoise real_ GradientBasedCorrMoire real_ GradientBasedCorrSaturation real_ GradientBasedCorrShadows2012 real_ GradientBasedCorrSharpness real_ GradientBasedCorrTemperature real_ GradientBasedCorrTexture real_ GradientBasedCorrTint real_ GradientBasedCorrToningHue real_ GradientBasedCorrToningSaturation real_ GradientBasedCorrWhites2012 real_ GradientBasedCorrWhat string_ GrainAmount integer GrainFrequency integer GrainSeed integer GrainSize integer GrayMixerAqua integer GrayMixerBlue integer GrayMixerGreen integer GrayMixerMagenta integer GrayMixerOrange integer GrayMixerPurple integer GrayMixerRed integer GrayMixerYellow integer GreenHue integer GreenSaturation integer Group lang-alt/ HasCrop boolean HasSettings boolean HDREditMode integer Highlight2012 integer HighlightRecovery integer Highlights2012 integer HueAdjustmentAqua integer HueAdjustmentBlue integer HueAdjustmentGreen integer HueAdjustmentMagenta integer HueAdjustmentOrange integer HueAdjustmentPurple integer HueAdjustmentRed integer HueAdjustmentYellow integer IncrementalTemperature integer IncrementalTint integer JPEGHandling string LensBlur LensBlur Struct LensBlurActive boolean_ LensBlurAmount real_ LensBlurBokehAspect real_ LensBlurBokehRotation real_ LensBlurBokehShape real_ LensBlurBokehShapeDetail real_ LensBlurCatEyeAmount real_ LensBlurCatEyeScale real_ LensBlurFocalRange string_ LensBlurFocalRangeSource real_ LensBlurHighlightsBoost real_ LensBlurHighlightsThreshold real_ LensBlurSampledArea string_ LensBlurSampledRange string_ LensBlurSphericalAberration real_ LensBlurSubjectRange string_ LensBlurVersion string_ LensManualDistortionAmount integer LensProfileChromaticAberrationScale integer LensProfileDigest string LensProfileDistortionScale integer LensProfileEnable integer LensProfileFilename string LensProfileIsEmbedded boolean LensProfileMatchKeyCameraModelName string LensProfileMatchKeyExifMake string LensProfileMatchKeyExifModel string LensProfileMatchKeyIsRaw boolean LensProfileMatchKeyLensID string LensProfileMatchKeyLensInfo string LensProfileMatchKeyLensName string LensProfileMatchKeySensorFormatFactor real LensProfileName string LensProfileSetup string LensProfileVignettingScale integer Look Look Struct LookAmount string_ LookCluster string_ LookCopyright string_ LookGroup lang-alt_ LookName string LookParameters LookParms Struct_ LookParametersCameraProfile string_ LookParametersClarity2012 string_ LookParametersConvertToGrayscale string_ LookParametersHighlights2012 string_ LookParametersLookTable string_ LookParametersProcessVersion string_ LookParametersShadows2012 string_ LookParametersToneCurvePV2012 string_+ LookParametersToneCurvePV2012Blue string_+ LookParametersToneCurvePV2012Green string_+ LookParametersToneCurvePV2012Red string_+ LookParametersVersion string_ LookSupportsAmount string_ LookSupportsMonochrome string_ LookSupportsOutputReferred string_ LookUUID string_ LuminanceAdjustmentAqua integer LuminanceAdjustmentBlue integer LuminanceAdjustmentGreen integer LuminanceAdjustmentMagenta integer LuminanceAdjustmentOrange integer LuminanceAdjustmentPurple integer LuminanceAdjustmentRed integer LuminanceAdjustmentYellow integer LuminanceNoiseReductionContrast integer LuminanceNoiseReductionDetail integer LuminanceSmoothing integer MaskGroupBasedCorrections Correction Struct+ MaskGroupBasedCorrActive boolean_ MaskGroupBasedCorrAmount real_ MaskGroupBasedCorrMask CorrectionMask Struct_+ MaskGroupBasedCorrMaskAlpha real_ MaskGroupBasedCorrMaskAngle real_ MaskGroupBasedCorrMaskBottom real_ MaskGroupBasedCorrMaskCenterValue real_ MaskGroupBasedCorrMaskCenterWeight real_ MaskGroupBasedCorrMaskRange CorrRangeMask Struct_+ MaskGroupBasedCorrMaskRangeAreaModels AreaModels Struct_+ MaskGroupBasedCorrMaskRangeAreaModelsComponents string_+ MaskGroupBasedCorrMaskRangeAreaModelsColorSampleInfo string_+ MaskGroupBasedCorrMaskRangeColorAmount real_+ MaskGroupBasedCorrMaskRangeDepthFeather real_+ MaskGroupBasedCorrMaskRangeDepthMax real_+ MaskGroupBasedCorrMaskRangeDepthMin real_+ MaskGroupBasedCorrMaskRangeInvert boolean_+ MaskGroupBasedCorrMaskRangeLumFeather real_+ MaskGroupBasedCorrMaskRangeLuminanceDepthSampleInfo string_+ MaskGroupBasedCorrMaskRangeLumMax real_+ MaskGroupBasedCorrMaskRangeLumMin real_+ MaskGroupBasedCorrMaskRangeLumRange string_+ MaskGroupBasedCorrMaskRangeSampleType integer_+ MaskGroupBasedCorrMaskRangeType string_+ MaskGroupBasedCorrMaskRangeVersion string_+ MaskGroupBasedCorrMaskDabs string_+ MaskGroupBasedCorrMaskFeather real_ MaskGroupBasedCorrMaskFlipped boolean_ MaskGroupBasedCorrMaskFlow real_ MaskGroupBasedCorrMaskFullX real_ MaskGroupBasedCorrMaskFullY real_ MaskGroupBasedCorrMaskInputDigest string_ MaskGroupBasedCorrMaskLeft real_ MaskGroupBasedCorrMaskMaskActive boolean_ MaskGroupBasedCorrMaskMaskBlendMode integer_ MaskGroupBasedCorrMaskMaskDigest string_ MaskGroupBasedCorrMaskMaskInverted boolean_ MaskGroupBasedCorrMaskMaskName string_ MaskGroupBasedCorrMaskMasks CorrectionMask Struct_+ MaskGroupBasedCorrMaskMasksAlpha real_ MaskGroupBasedCorrMaskMasksAngle real_ MaskGroupBasedCorrMaskMasksBottom real_ MaskGroupBasedCorrMaskMasksCenterValue real_ MaskGroupBasedCorrMaskMasksCenterWeight real_ MaskGroupBasedCorrMaskMasksDabs string_+ MaskGroupBasedCorrMaskMasksFeather real_ MaskGroupBasedCorrMaskMasksFlipped boolean_ MaskGroupBasedCorrMaskMasksFlow real_ MaskGroupBasedCorrMaskMasksFullX real_ MaskGroupBasedCorrMaskMasksFullY real_ MaskGroupBasedCorrMaskMasksInputDigest string_ MaskGroupBasedCorrMaskMasksLeft real_ MaskGroupBasedCorrMaskMasksMaskActive boolean_ MaskGroupBasedCorrMaskMasksMaskBlendMode integer_ MaskGroupBasedCorrMaskMasksMaskDigest string_ MaskGroupBasedCorrMaskMasksMaskInverted boolean_ MaskGroupBasedCorrMaskMasksMaskName string_ MaskGroupBasedCorrMaskMasksMaskSubType string_ MaskGroupBasedCorrMaskMasksMaskSyncID string_ MaskGroupBasedCorrMaskMasksValue real_ MaskGroupBasedCorrMaskMasksMaskVersion string_ MaskGroupBasedCorrMaskMasksMidpoint real_ MaskGroupBasedCorrMaskMasksOrigin string_ MaskGroupBasedCorrMaskMasksPerimeterValue real_ MaskGroupBasedCorrMaskMasksRadius real_ MaskGroupBasedCorrMaskMasksReferencePoint string_ MaskGroupBasedCorrMaskMasksRight real_ MaskGroupBasedCorrMaskMasksRoundness real_ MaskGroupBasedCorrMaskMasksSizeX real_ MaskGroupBasedCorrMaskMasksSizeY real_ MaskGroupBasedCorrMaskMasksTop real_ MaskGroupBasedCorrMaskMaskSubType string_ MaskGroupBasedCorrMaskMasksVersion integer_ MaskGroupBasedCorrMaskMasksWhat string_ MaskGroupBasedCorrMaskMasksWholeImageArea string_ MaskGroupBasedCorrMaskMasksX real_ MaskGroupBasedCorrMaskMasksY real_ MaskGroupBasedCorrMaskMaskSyncID string_ MaskGroupBasedCorrMaskMasksZeroX real_ MaskGroupBasedCorrMaskMasksZeroY real_ MaskGroupBasedCorrMaskValue real_ MaskGroupBasedCorrMaskMaskVersion string_ MaskGroupBasedCorrMaskMidpoint real_ MaskGroupBasedCorrMaskOrigin string_ MaskGroupBasedCorrMaskPerimeterValue real_ MaskGroupBasedCorrMaskRadius real_ MaskGroupBasedCorrMaskReferencePoint string_ MaskGroupBasedCorrMaskRight real_ MaskGroupBasedCorrMaskRoundness real_ MaskGroupBasedCorrMaskSizeX real_ MaskGroupBasedCorrMaskSizeY real_ MaskGroupBasedCorrMaskTop real_ MaskGroupBasedCorrMaskVersion integer_ MaskGroupBasedCorrMaskWhat string_ MaskGroupBasedCorrMaskWholeImageArea string_ MaskGroupBasedCorrMaskX real_ MaskGroupBasedCorrMaskY real_ MaskGroupBasedCorrMaskZeroX real_ MaskGroupBasedCorrMaskZeroY real_ MaskGroupBasedCorrCorrectionName string_+ MaskGroupBasedCorrRangeMask CorrRangeMask Struct_+ MaskGroupBasedCorrRangeMaskAreaModels AreaModels Struct_+ MaskGroupBasedCorrRangeMaskAreaModelsComponents string_+ MaskGroupBasedCorrRangeMaskAreaModelsColorSampleInfo string_+ MaskGroupBasedCorrRangeMaskColorAmount real_+ MaskGroupBasedCorrRangeMaskDepthFeather real_+ MaskGroupBasedCorrRangeMaskDepthMax real_+ MaskGroupBasedCorrRangeMaskDepthMin real_+ MaskGroupBasedCorrRangeMaskInvert boolean_+ MaskGroupBasedCorrRangeMaskLumFeather real_+ MaskGroupBasedCorrRangeMaskLuminanceDepthSampleInfo string_+ MaskGroupBasedCorrRangeMaskLumMax real_+ MaskGroupBasedCorrRangeMaskLumMin real_+ MaskGroupBasedCorrRangeMaskLumRange string_+ MaskGroupBasedCorrRangeMaskSampleType integer_+ MaskGroupBasedCorrRangeMaskType string_+ MaskGroupBasedCorrRangeMaskVersion string_+ MaskGroupBasedCorrCorrectionSyncID string_+ MaskGroupBasedCorrBlacks2012 real_ MaskGroupBasedCorrBrightness real_ MaskGroupBasedCorrClarity real_ MaskGroupBasedCorrClarity2012 real_ MaskGroupBasedCorrContrast real_ MaskGroupBasedCorrContrast2012 real_ MaskGroupBasedCorrDefringe real_ MaskGroupBasedCorrDehaze real_ MaskGroupBasedCorrExposure real_ MaskGroupBasedCorrExposure2012 real_ MaskGroupBasedCorrHighlights2012 real_ MaskGroupBasedCorrHue real_ MaskGroupBasedCorrLuminanceNoise real_ MaskGroupBasedCorrMoire real_ MaskGroupBasedCorrSaturation real_ MaskGroupBasedCorrShadows2012 real_ MaskGroupBasedCorrSharpness real_ MaskGroupBasedCorrTemperature real_ MaskGroupBasedCorrTexture real_ MaskGroupBasedCorrTint real_ MaskGroupBasedCorrToningHue real_ MaskGroupBasedCorrToningSaturation real_ MaskGroupBasedCorrWhites2012 real_ MaskGroupBasedCorrWhat string_ MoireFilter string Name lang-alt/ NegativeCacheLargePreviewSize integer NegativeCacheMaximumSize real NegativeCachePath string OverrideLookVignette boolean PaintBasedCorrections Correction Struct+ PaintCorrectionActive boolean_ PaintCorrectionAmount real_ PaintBasedCorrectionMasks CorrectionMask Struct_+ PaintCorrectionMaskAlpha real_ PaintCorrectionMaskAngle real_ PaintCorrectionMaskBottom real_ PaintCorrectionMaskCenterValue real_ PaintCorrectionMaskCenterWeight real_ PaintCorrectionMaskRange CorrRangeMask Struct_+ PaintCorrectionMaskRangeAreaModels AreaModels Struct_+ PaintCorrectionMaskRangeAreaModelsComponents string_+ PaintCorrectionMaskRangeAreaModelsColorSampleInfo string_+ PaintCorrectionMaskRangeColorAmount real_+ PaintCorrectionMaskRangeDepthFeather real_+ PaintCorrectionMaskRangeDepthMax real_+ PaintCorrectionMaskRangeDepthMin real_+ PaintCorrectionMaskRangeInvert boolean_+ PaintCorrectionMaskRangeLumFeather real_+ PaintCorrectionMaskRangeLuminanceDepthSampleInfo string_+ PaintCorrectionMaskRangeLumMax real_+ PaintCorrectionMaskRangeLumMin real_+ PaintCorrectionMaskRangeLumRange string_+ PaintCorrectionMaskRangeSampleType integer_+ PaintCorrectionMaskRangeType string_+ PaintCorrectionMaskRangeVersion string_+ PaintCorrectionMaskDabs string_ PaintCorrectionMaskFeather real_ PaintCorrectionMaskFlipped boolean_ PaintCorrectionMaskFlow real_ PaintCorrectionMaskFullX real_ PaintCorrectionMaskFullY real_ PaintCorrectionMaskInputDigest string_ PaintCorrectionMaskLeft real_ PaintCorrectionMaskMaskActive boolean_ PaintCorrectionMaskMaskBlendMode integer_ PaintCorrectionMaskMaskDigest string_ PaintCorrectionMaskMaskInverted boolean_ PaintCorrectionMaskMaskName string_ PaintCorrectionMaskMasks CorrectionMask Struct_+ PaintCorrectionMaskMasksAlpha real_ PaintCorrectionMaskMasksAngle real_ PaintCorrectionMaskMasksBottom real_ PaintCorrectionMaskMasksCenterValue real_ PaintCorrectionMaskMasksCenterWeight real_ PaintCorrectionMaskMasksDabs string_+ PaintCorrectionMaskMasksFeather real_ PaintCorrectionMaskMasksFlipped boolean_ PaintCorrectionMaskMasksFlow real_ PaintCorrectionMaskMasksFullX real_ PaintCorrectionMaskMasksFullY real_ PaintCorrectionMaskMasksInputDigest string_ PaintCorrectionMaskMasksLeft real_ PaintCorrectionMaskMasksMaskActive boolean_ PaintCorrectionMaskMasksMaskBlendMode integer_ PaintCorrectionMaskMasksMaskDigest string_ PaintCorrectionMaskMasksMaskInverted boolean_ PaintCorrectionMaskMasksMaskName string_ PaintCorrectionMaskMasksMaskSubType string_ PaintCorrectionMaskMasksMaskSyncID string_ PaintCorrectionMaskMasksValue real_ PaintCorrectionMaskMasksMaskVersion string_ PaintCorrectionMaskMasksMidpoint real_ PaintCorrectionMaskMasksOrigin string_ PaintCorrectionMaskMasksPerimeterValue real_ PaintCorrectionMaskMasksRadius real_ PaintCorrectionMaskMasksReferencePoint string_ PaintCorrectionMaskMasksRight real_ PaintCorrectionMaskMasksRoundness real_ PaintCorrectionMaskMasksSizeX real_ PaintCorrectionMaskMasksSizeY real_ PaintCorrectionMaskMasksTop real_ PaintCorrectionMaskMaskSubType string_ PaintCorrectionMaskMasksVersion integer_ PaintCorrectionMaskMasksWhat string_ PaintCorrectionMaskMasksWholeImageArea string_ PaintCorrectionMaskMasksX real_ PaintCorrectionMaskMasksY real_ PaintCorrectionMaskMaskSyncID string_ PaintCorrectionMaskMasksZeroX real_ PaintCorrectionMaskMasksZeroY real_ PaintCorrectionMaskValue real_ PaintCorrectionMaskMaskVersion string_ PaintCorrectionMaskMidpoint real_ PaintCorrectionMaskOrigin string_ PaintCorrectionMaskPerimeterValue real_ PaintCorrectionMaskRadius real_ PaintCorrectionMaskReferencePoint string_ PaintCorrectionMaskRight real_ PaintCorrectionMaskRoundness real_ PaintCorrectionMaskSizeX real_ PaintCorrectionMaskSizeY real_ PaintCorrectionMaskTop real_ PaintCorrectionMaskVersion integer_ PaintCorrectionMaskWhat string_ PaintCorrectionMaskWholeImageArea string_ PaintCorrectionMaskX real_ PaintCorrectionMaskY real_ PaintCorrectionMaskZeroX real_ PaintCorrectionMaskZeroY real_ PaintCorrectionCorrectionName string_+ PaintCorrectionRangeMask CorrRangeMask Struct_+ PaintCorrectionRangeMaskAreaModels AreaModels Struct_+ PaintCorrectionRangeMaskAreaModelsComponents string_+ PaintCorrectionRangeMaskAreaModelsColorSampleInfo string_+ PaintCorrectionRangeMaskColorAmount real_+ PaintCorrectionRangeMaskDepthFeather real_+ PaintCorrectionRangeMaskDepthMax real_+ PaintCorrectionRangeMaskDepthMin real_+ PaintCorrectionRangeMaskInvert boolean_+ PaintCorrectionRangeMaskLumFeather real_+ PaintCorrectionRangeMaskLuminanceDepthSampleInfo string_+ PaintCorrectionRangeMaskLumMax real_+ PaintCorrectionRangeMaskLumMin real_+ PaintCorrectionRangeMaskLumRange string_+ PaintCorrectionRangeMaskSampleType integer_+ PaintCorrectionRangeMaskType string_+ PaintCorrectionRangeMaskVersion string_+ PaintCorrectionCorrectionSyncID string_+ PaintCorrectionBlacks2012 real_ PaintCorrectionBrightness real_ PaintCorrectionClarity real_ PaintCorrectionClarity2012 real_ PaintCorrectionContrast real_ PaintCorrectionContrast2012 real_ PaintCorrectionDefringe real_ PaintCorrectionDehaze real_ PaintCorrectionExposure real_ PaintCorrectionExposure2012 real_ PaintCorrectionHighlights2012 real_ PaintCorrectionHue real_ PaintCorrectionLuminanceNoise real_ PaintCorrectionMoire real_ PaintCorrectionSaturation real_ PaintCorrectionShadows2012 real_ PaintCorrectionSharpness real_ PaintCorrectionTemperature real_ PaintCorrectionTexture real_ PaintCorrectionTint real_ PaintCorrectionToningHue real_ PaintCorrectionToningSaturation real_ PaintCorrectionWhites2012 real_ PaintCorrectionWhat string_ ParametricDarks integer ParametricHighlights integer ParametricHighlightSplit integer ParametricLights integer ParametricMidtoneSplit integer ParametricShadows integer ParametricShadowSplit integer PerspectiveAspect integer PerspectiveHorizontal integer PerspectiveRotate real PerspectiveScale integer PerspectiveUpright integer PerspectiveVertical integer PerspectiveX real PerspectiveY real PostCropVignetteAmount integer PostCropVignetteFeather integer PostCropVignetteHighlightContrast integer PostCropVignetteMidpoint integer PostCropVignetteRoundness integer PostCropVignetteStyle integer PresetType string ProcessVersion string RangeMask RangeMask Struct RangeMaskMapInfo MapInfo Struct_ RangeMaskMapInfoLabMax string_ RangeMaskMapInfoLabMin string_ RangeMaskMapInfoLumEq string_+ RangeMaskMapInfoRGBMax string_ RangeMaskMapInfoRGBMin string_ RawFileName string RedEyeInfo string+ RedHue integer RedSaturation integer RetouchAreas RetouchArea Struct+ RetouchAreaFeather real_ RetouchAreaMasks CorrectionMask Struct_+ RetouchAreaMaskAlpha real_ RetouchAreaMaskAngle real_ RetouchAreaMaskBottom real_ RetouchAreaMaskCenterValue real_ RetouchAreaMaskCenterWeight real_ RetouchAreaMaskRange CorrRangeMask Struct_+ RetouchAreaMaskRangeAreaModels AreaModels Struct_+ RetouchAreaMaskRangeAreaModelsComponents string_+ RetouchAreaMaskRangeAreaModelsColorSampleInfo string_+ RetouchAreaMaskRangeColorAmount real_+ RetouchAreaMaskRangeDepthFeather real_+ RetouchAreaMaskRangeDepthMax real_+ RetouchAreaMaskRangeDepthMin real_+ RetouchAreaMaskRangeInvert boolean_+ RetouchAreaMaskRangeLumFeather real_+ RetouchAreaMaskRangeLuminanceDepthSampleInfo string_+ RetouchAreaMaskRangeLumMax real_+ RetouchAreaMaskRangeLumMin real_+ RetouchAreaMaskRangeLumRange string_+ RetouchAreaMaskRangeSampleType integer_+ RetouchAreaMaskRangeType string_+ RetouchAreaMaskRangeVersion string_+ RetouchAreaMaskDabs string_ RetouchAreaMaskFeather real_ RetouchAreaMaskFlipped boolean_ RetouchAreaMaskFlow real_ RetouchAreaMaskFullX real_ RetouchAreaMaskFullY real_ RetouchAreaMaskInputDigest string_ RetouchAreaMaskLeft real_ RetouchAreaMaskMaskActive boolean_ RetouchAreaMaskMaskBlendMode integer_ RetouchAreaMaskMaskDigest string_ RetouchAreaMaskMaskInverted boolean_ RetouchAreaMaskMaskName string_ RetouchAreaMaskMasks CorrectionMask Struct_+ RetouchAreaMaskMasksAlpha real_ RetouchAreaMaskMasksAngle real_ RetouchAreaMaskMasksBottom real_ RetouchAreaMaskMasksCenterValue real_ RetouchAreaMaskMasksCenterWeight real_ RetouchAreaMaskMasksDabs string_+ RetouchAreaMaskMasksFeather real_ RetouchAreaMaskMasksFlipped boolean_ RetouchAreaMaskMasksFlow real_ RetouchAreaMaskMasksFullX real_ RetouchAreaMaskMasksFullY real_ RetouchAreaMaskMasksInputDigest string_ RetouchAreaMaskMasksLeft real_ RetouchAreaMaskMasksMaskActive boolean_ RetouchAreaMaskMasksMaskBlendMode integer_ RetouchAreaMaskMasksMaskDigest string_ RetouchAreaMaskMasksMaskInverted boolean_ RetouchAreaMaskMasksMaskName string_ RetouchAreaMaskMasksMaskSubType string_ RetouchAreaMaskMasksMaskSyncID string_ RetouchAreaMaskMasksValue real_ RetouchAreaMaskMasksMaskVersion string_ RetouchAreaMaskMasksMidpoint real_ RetouchAreaMaskMasksOrigin string_ RetouchAreaMaskMasksPerimeterValue real_ RetouchAreaMaskMasksRadius real_ RetouchAreaMaskMasksReferencePoint string_ RetouchAreaMaskMasksRight real_ RetouchAreaMaskMasksRoundness real_ RetouchAreaMaskMasksSizeX real_ RetouchAreaMaskMasksSizeY real_ RetouchAreaMaskMasksTop real_ RetouchAreaMaskMaskSubType string_ RetouchAreaMaskMasksVersion integer_ RetouchAreaMaskMasksWhat string_ RetouchAreaMaskMasksWholeImageArea string_ RetouchAreaMaskMasksX real_ RetouchAreaMaskMasksY real_ RetouchAreaMaskMaskSyncID string_ RetouchAreaMaskMasksZeroX real_ RetouchAreaMaskMasksZeroY real_ RetouchAreaMaskValue real_ RetouchAreaMaskMaskVersion string_ RetouchAreaMaskMidpoint real_ RetouchAreaMaskOrigin string_ RetouchAreaMaskPerimeterValue real_ RetouchAreaMaskRadius real_ RetouchAreaMaskReferencePoint string_ RetouchAreaMaskRight real_ RetouchAreaMaskRoundness real_ RetouchAreaMaskSizeX real_ RetouchAreaMaskSizeY real_ RetouchAreaMaskTop real_ RetouchAreaMaskVersion integer_ RetouchAreaMaskWhat string_ RetouchAreaMaskWholeImageArea string_ RetouchAreaMaskX real_ RetouchAreaMaskY real_ RetouchAreaMaskZeroX real_ RetouchAreaMaskZeroY real_ RetouchAreaMethod string_ RetouchAreaOffsetY real_ RetouchAreaOpacity real_ RetouchAreaSeed integer_ RetouchAreaSourceState string_ RetouchAreaSourceX real_ RetouchAreaSpotType string_ RetouchInfo string+ Saturation integer/ SaturationAdjustmentAqua integer SaturationAdjustmentBlue integer SaturationAdjustmentGreen integer SaturationAdjustmentMagenta integer SaturationAdjustmentOrange integer SaturationAdjustmentPurple integer SaturationAdjustmentRed integer SaturationAdjustmentYellow integer SDRBlend real SDRBrightness real SDRContrast real SDRHighlights real SDRShadows real SDRWhites real Shadows integer Shadows2012 integer ShadowTint integer SharpenDetail integer SharpenEdgeMasking integer SharpenRadius real Sharpness integer/ ShortName lang-alt Smoothness integer SortName lang-alt SplitToningBalance integer SplitToningHighlightHue integer SplitToningHighlightSaturation integer SplitToningShadowHue integer SplitToningShadowSaturation integer SupportsAmount boolean SupportsColor boolean SupportsHighDynamicRange boolean SupportsMonochrome boolean SupportsNormalDynamicRange boolean SupportsOutputReferred boolean SupportsSceneReferred boolean ColorTemperature integer Texture integer TIFFHandling string Tint integer ToggleStyleAmount integer ToggleStyleDigest string ToneCurve string+ ToneCurveBlue string+ ToneCurveGreen string+ ToneCurveName string ToneCurveName2012 string ToneCurvePV2012 string+ ToneCurvePV2012Blue string+ ToneCurvePV2012Green string+ ToneCurvePV2012Red string+ ToneCurveRed string+ ToneMapStrength real UprightCenterMode integer UprightCenterNormX real UprightCenterNormY real UprightDependentDigest string UprightFocalLength35mm real UprightFocalMode integer UprightFourSegments_0 string UprightFourSegments_1 string UprightFourSegments_2 string UprightFourSegments_3 string UprightFourSegmentsCount integer UprightGuidedDependentDigest string UprightPreview boolean UprightTransform_0 string UprightTransform_1 string UprightTransform_2 string UprightTransform_3 string UprightTransform_4 string UprightTransform_5 string UprightTransformCount integer UprightVersion integer UUID string/ Version string Vibrance integer VignetteAmount integer VignetteMidpoint integer What string WhiteBalance string/ Whites2012 integer

XMP dc Tags

Dublin Core namespace tags.

These tags belong to the ExifTool XMP-dc family 1 group.

Tag Name Writable ——– ——– Contributor string+ Coverage string Creator string+ Date date+ Description lang-alt Format string Identifier string Language string+ Publisher string+ Relation string+ Rights lang-alt Source string/ Subject string+ Title lang-alt Type string+

XMP Device Tags

Google depth-map Device tags. See <https://developer.android.com/training/camera2/Dynamic-depth-v1.0.pdf> for the specification.

These tags belong to the ExifTool XMP-Device family 1 group.

Tag Name Writable ——– ——– AppInfo AppInfo Struct AppInfoApplication string_ AppInfoItemURI string_ AppInfoVersion string_ Cameras DeviceCameras Struct+ Camera DeviceCamera Struct_+ CameraAppInfo AppInfo Struct_+ CameraAppInfoApplication string_+ CameraAppInfoItemURI string_+ CameraAppInfoVersion string_+ CameraDepthMap DeviceDepthMap Struct_+ CameraDepthMapConfidenceURI string_+ CameraDepthMapDepthURI string_+ CameraDepthMapFar real_+ CameraDepthMapFocalTable string_+ CameraDepthMapFocalTableEntryCount integer_+ CameraDepthMapFormat string_+ CameraDepthMapItemSemantic string_+ CameraDepthMapMeasureType string_+ CameraDepthMapNear real_+ CameraDepthMapSoftware string_+ CameraDepthMapUnits string_+ CameraImage DeviceImage Struct_+ CameraImageItemSemantic string_+ CameraImageItemURI string_+ CameraImagingModel DeviceImagingModel Struct_+ CameraImagingModelDistortion string_+ CameraImagingModelDistortionCount integer_+ CameraImagingModelFocalLengthX real_+ CameraImagingModelFocalLengthY real_+ CameraImagingModelImageHeight integer_+ CameraImagingModelImageWidth integer_+ CameraImagingModelPixelAspectRatio real_+ CameraImagingModelPrincipalPointX real_+ CameraImagingModelPrincipalPointY real_+ CameraImagingModelSkew real_+ CameraLightEstimate DeviceLightEstimate Struct_+ CameraLightEstimateColorCorrectionB real_+ CameraLightEstimateColorCorrectionG real_+ CameraLightEstimateColorCorrectionR real_+ CameraLightEstimatePixelIntensity real_+ CameraPointCloud DevicePointCloud Struct_+ CameraPointCloudMetric boolean_+ CameraPointCloudPointCloud integer_+ CameraPointCloudPoints string_+ CameraPose Pose Struct_+ CameraPosePositionX real_+ CameraPosePositionY real_+ CameraPosePositionZ real_+ CameraPoseRotationW real_+ CameraPoseRotationX real_+ CameraPoseRotationY real_+ CameraPoseRotationZ real_+ CameraPoseTimestamp integer_+ CameraTrait string_+ CameraVendorInfo VendorInfo Struct_+ CameraVendorInfoManufacturer string_+ CameraVendorInfoModel string_+ CameraVendorInfoNotes string_+ Container DeviceContainer Struct ContainerDirectory DeviceDirectory Struct_+ ContainerDirectoryItem DeviceItem Struct_+ ContainerDirectoryItemDataURI string_+ ContainerDirectoryItemLength integer_+ ContainerDirectoryItemMime string_+ ContainerDirectoryItemPadding integer_+ EarthPos EarthPose Struct EarthPosAltitude real_ EarthPosLatitude real_ EarthPosLongitude real_ EarthPosRotationW real_ EarthPosRotationX real_ EarthPosRotationY real_ EarthPosRotationZ real_ EarthPosTimestamp integer_ Planes DevicePlanes Struct+ Plane DevicePlane Struct_+ PlaneBoundary string_+ PlaneBoundaryVertexCount integer_+ PlaneExtentX real_+ PlaneExtentZ real_+ PlanePose Pose Struct_+ PlanePosePositionX real_+ PlanePosePositionY real_+ PlanePosePositionZ real_+ PlanePoseRotationW real_+ PlanePoseRotationX real_+ PlanePoseRotationY real_+ PlanePoseRotationZ real_+ PlanePoseTimestamp integer_+ Pose Pose Struct PosePositionX real_ PosePositionY real_ PosePositionZ real_ PoseRotationW real_ PoseRotationX real_ PoseRotationY real_ PoseRotationZ real_ PoseTimestamp integer_ Profiles DeviceProfiles Struct+ Profile DeviceProfile Struct_+ ProfileCameraIndices integer_+ ProfileType string_+ VendorInfo VendorInfo Struct VendorInfoManufacturer string_ VendorInfoModel string_ VendorInfoNotes string_

XMP AppInfo Struct

Field Name Writable ———- ——– Application string ItemURI string Version string

XMP DeviceCameras Struct

Field Name Writable ———- ——– Camera DeviceCamera Struct

XMP DeviceCamera Struct

Field Name Writable ———- ——– AppInfo AppInfo Struct DepthMap DeviceDepthMap Struct Image DeviceImage Struct ImagingModel DeviceImagingModel Struct LightEstimate DeviceLightEstimate Struct PointCloud DevicePointCloud Struct Pose Pose Struct Trait string VendorInfo VendorInfo Struct

XMP DeviceDepthMap Struct

Field Name Writable ———- ——– ConfidenceURI string DepthURI string Far real FocalTable string FocalTableEntryCount integer Format string ItemSemantic string MeasureType string Near real Software string Units string

XMP DeviceImage Struct

Field Name Writable ———- ——– ItemSemantic string ItemURI string

XMP DeviceImagingModel Struct

Field Name Writable ———- ——– Distortion string DistortionCount integer FocalLengthX real FocalLengthY real ImageHeight integer ImageWidth integer PixelAspectRatio real PrincipalPointX real PrincipalPointY real Skew real

XMP DeviceLightEstimate Struct

Field Name Writable ———- ——– ColorCorrectionB real ColorCorrectionG real ColorCorrectionR real PixelIntensity real

XMP DevicePointCloud Struct

Field Name Writable ———- ——– Metric boolean PointCloud integer Points string

XMP Pose Struct

Field Name Writable ———- ——– PositionX real PositionY real PositionZ real RotationW real RotationX real RotationY real RotationZ real Timestamp integer

XMP VendorInfo Struct

Field Name Writable ———- ——– Manufacturer string Model string Notes string

XMP DeviceContainer Struct

Field Name Writable ———- ——– Directory DeviceDirectory Struct+

XMP DeviceDirectory Struct

Field Name Writable ———- ——– Item DeviceItem Struct

XMP DeviceItem Struct

Field Name Writable ———- ——– DataURI string Length integer Mime string Padding integer

XMP EarthPose Struct

Field Name Writable ———- ——– Altitude real Latitude real Longitude real RotationW real RotationX real RotationY real RotationZ real Timestamp integer

XMP DevicePlanes Struct

Field Name Writable ———- ——– Plane DevicePlane Struct

XMP DevicePlane Struct

Field Name Writable ———- ——– Boundary string BoundaryVertexCount integer ExtentX real ExtentZ real Pose Pose Struct

XMP DeviceProfiles Struct

Field Name Writable ———- ——– Profile DeviceProfile Struct

XMP DeviceProfile Struct

Field Name Writable ———- ——– CameraIndices integer+ Type string

XMP dex Tags

Description Explorer namespace tags. These tags are not very common. The Source and Rating tags are avoided when writing due to name conflicts with other XMP tags. (see <http://www.optimasc.com/products/fileid/>)

These tags belong to the ExifTool XMP-dex family 1 group.

Tag Name Writable ——– ——– CRC32 integer FFID string LicenseType string OS integer Rating string/ Revision string ShortDescription lang-alt Source string/

XMP DICOM Tags

DICOM namespace tags. These XMP tags allow some DICOM information to be stored in files of other than DICOM format. See the DICOM Tags documentation for a list of tags available in DICOM-format files.

These tags belong to the ExifTool XMP-DICOM family 1 group.

Tag Name Writable ——– ——– EquipmentInstitution string EquipmentManufacturer string PatientBirthDate date PatientID string PatientName string PatientSex string SeriesDateTime date SeriesDescription string SeriesModality string SeriesNumber string StudyDateTime date StudyDescription string StudyID string StudyPhysician string

XMP digiKam Tags

DigiKam namespace tags.

These tags belong to the ExifTool XMP-digiKam family 1 group.

Tag Name Writable ——– ——– CaptionsAuthorNames lang-alt CaptionsDateTimeStamps lang-alt ColorLabel string ImageHistory string/ ImageUniqueID string/ LensCorrectionSettings string PicasawebGPhotoId string PickLabel string TagsList string+

XMP ExifTool Tags

These tags belong to the ExifTool XMP-et family 1 group.

Tag Name Writable ——– ——– OriginalImageHash string OriginalImageHashType string OriginalImageMD5 string

XMP exif Tags

EXIF namespace for EXIF tags. See <https://web.archive.org/web/20180921145139if_/http://www.cipa.jp:80/std/documents/e/DC-010-2017_E.pdf> for the specification.

These tags belong to the ExifTool XMP-exif family 1 group.

Tag Name Writable ——– ——– ApertureValue rational BrightnessValue rational CFAPattern CFAPattern Struct CFAPatternColumns integer_ CFAPatternRows integer_ CFAPatternValues integer_+ ColorSpace integer ComponentsConfiguration integer+ CompressedBitsPerPixel rational Contrast integer CustomRendered integer DateTimeDigitized date DateTimeOriginal date DeviceSettingDescription DeviceSettings Struct DeviceSettingDescriptionColumns integer_ DeviceSettingDescriptionRows integer_ DeviceSettingDescriptionSettings string_+ DigitalZoomRatio rational ExifVersion string ExposureCompensation rational ExposureIndex rational ExposureMode integer ExposureProgram integer ExposureTime rational FileSource integer Flash Flash Struct FlashEnergy rational FlashFired boolean_ FlashFunction boolean_ FlashMode integer_ FlashpixVersion string FlashRedEyeMode boolean_ FlashReturn integer_ FNumber rational FocalLength rational FocalLengthIn35mmFormat integer FocalPlaneResolutionUnit integer FocalPlaneXResolution rational FocalPlaneYResolution rational GainControl integer GPSAltitude rational GPSAltitudeRef integer GPSAreaInformation string GPSDestBearing rational GPSDestBearingRef string GPSDestDistance rational GPSDestDistanceRef string GPSDestLatitude string GPSDestLongitude string GPSDifferential integer GPSDOP rational GPSHPositioningError rational GPSImgDirection rational GPSImgDirectionRef string GPSLatitude string GPSLongitude string GPSMapDatum string GPSMeasureMode integer GPSProcessingMethod string GPSSatellites string GPSSpeed rational GPSSpeedRef string GPSStatus string GPSDateTime date GPSTrack rational GPSTrackRef string GPSVersionID string ImageUniqueID string ISO integer+ LightSource string MakerNote string MaxApertureValue rational MeteringMode integer NativeDigest string Opto-ElectricConvFactor OECF Struct OECFColumns integer_ OECFNames string_+ OECFRows integer_ OECFValues rational_+ ExifImageWidth integer ExifImageHeight integer RelatedSoundFile string Saturation integer SceneCaptureType integer SceneType integer SensingMethod integer Sharpness integer ShutterSpeedValue rational SpatialFrequencyResponse OECF Struct SpatialFrequencyResponseColumns integer_ SpatialFrequencyResponseNames string_+ SpatialFrequencyResponseRows integer_ SpatialFrequencyResponseValues rational_+ SpectralSensitivity string SubjectArea integer+ SubjectDistance rational SubjectDistanceRange integer SubjectLocation integer+ UserComment lang-alt WhiteBalance integer

XMP CFAPattern Struct

Field Name Writable ———- ——– Columns integer Rows integer Values integer+

XMP DeviceSettings Struct

Field Name Writable ———- ——– Columns integer Rows integer Settings string+

XMP Flash Struct

Field Name Writable ———- ——– Fired boolean Function boolean Mode integer RedEyeMode boolean Return integer

XMP OECF Struct

Field Name Writable ———- ——– Columns integer Names string+ Rows integer Values rational+

XMP exifEX Tags

EXIF tags added by the EXIF 2.32 for XMP specification (see <https://cipa.jp/std/documents/download_e.html?DC-010-2020_E>).

These tags belong to the ExifTool XMP-exifEX family 1 group.

Tag Name Writable ——– ——– Acceleration rational SerialNumber string CameraElevationAngle rational OwnerName string CompositeImage integer CompositeImageCount integer+ CompositeImageExposureTimes CompImageExp Struct CompImageMaxExposureAll rational_ CompImageMaxExposureUsed rational_ CompImageMinExposureAll rational_ CompImageMinExposureUsed rational_ CompImageImagesPerSequence integer_ CompImageNumSequences integer_ CompImageSumExposureAll rational_ CompImageSumExposureUsed rational_ CompImageTotalExposurePeriod rational_ CompImageValues rational_+ Gamma rational Humidity rational InteropIndex string ISOSpeed integer ISOSpeedLatitudeyyy integer ISOSpeedLatitudezzz integer LensMake string LensModel string LensSerialNumber string LensInfo rational+ PhotographicSensitivity integer Pressure rational RecommendedExposureIndex integer SensitivityType integer StandardOutputSensitivity integer AmbientTemperature rational WaterDepth rational

XMP CompImageExp Struct

Field Name Writable ———- ——– MaxExposureTimesOfAll rational MaxExposureTimesOfUsed rational MinExposureTimesOfAll rational MinExposureTimesOfUsed rational NumberOfImagesInSequences integer NumberOfSequences integer SumOfExposureTimesOfAll rational SumOfExposureTimesOfUsed rational TotalExposurePeriod rational Values rational+

XMP ExpressionMedia Tags

Microsoft Expression Media namespace tags. These tags are avoided when writing due to name conflicts with tags in other schemas.

These tags belong to the ExifTool XMP-expressionmedia family 1 group.

Tag Name Writable ——– ——– CatalogSets string/+ Event string/ People string/+ Status string/

XMP extensis Tags

Tags used by Extensis Portfolio.

These tags belong to the ExifTool XMP-extensis family 1 group.

Tag Name Writable ——– ——– Approved boolean ApprovedBy string ClientName string JobName string JobStatus string RoutedTo string RoutingNotes string WorkToDo string

XMP fpv Tags

Fast Picture Viewer tags (see <http://www.fastpictureviewer.com/help/#rtfcomments>).

These tags belong to the ExifTool XMP-fpv family 1 group.

Tag Name Writable ——– ——– RichTextComment string

XMP GAudio Tags

These tags belong to the ExifTool XMP-GAudio family 1 group.

Tag Name Writable ——– ——– AudioData string AudioMimeType string

XMP GCamera Tags

Camera information found in Google panorama images.

These tags belong to the ExifTool XMP-GCamera family 1 group.

Tag Name Writable ——– ——– BurstID string BurstPrimary string DisableAutoCreation string+ HDRPMakerNote string HdrPlusMakernote string MicroVideo integer MicroVideoOffset integer MicroVideoPresentationTimestampUs integer MicroVideoVersion integer PortraitNote string PortraitRequest string PortraitVersion string ShotLogData string SpecialTypeID string+

XMP GCreations Tags

Google creations tags.

These tags belong to the ExifTool XMP-GCreations family 1 group.

Tag Name Writable ——– ——– CameraBurstID string Type string/

XMP GDepth Tags

Google depthmap information. See <https://developers.google.com/depthmap-metadata/> for the specification.

These tags belong to the ExifTool XMP-GDepth family 1 group.

Tag Name Writable ——– ——– Confidence string/ ConfidenceMime string/ DepthImage string/ Far real/ Format string/ ImageHeight real/ ImageWidth real/ Manufacturer string/ MeasureType string/ Mime string/ Model string/ Near real/ Software string/ Units string/

XMP GettyImages Tags

The actual Getty Images namespace prefix is “GettyImagesGIFT”, which is the prefix recorded in the file, but ExifTool shortens this for the family 1 group name.

These tags belong to the ExifTool XMP-getty family 1 group.

Tag Name Writable ——– ——– AssetID string CallForImage string CameraFilename string CameraMakeModel string/ CameraSerialNumber string/ Composition string ExclusiveCoverage string GIFTFtpPriority string ImageRank string MediaEventIdDate string OriginalCreateDateTime date/ OriginalFileName string ParentMediaEventID string ParentMEID string Personality string+ PrimaryFTP string+ RoutingDestinations string+ RoutingExclusions string+ SecondaryFTP string+ TimeShot string

XMP GFocus Tags

Focus information found in Google depthmap images.

These tags belong to the ExifTool XMP-GFocus family 1 group.

Tag Name Writable ——– ——– BlurAtInfinity real FocalDistance real FocalPointX real FocalPointY real

XMP GImage Tags

These tags belong to the ExifTool XMP-GImage family 1 group.

Tag Name Writable ——– ——– ImageData string ImageMimeType string

XMP GPano Tags

Panorama tags written by Google Photosphere. See <https://developers.google.com/panorama/metadata/> for the specification.

These tags belong to the ExifTool XMP-GPano family 1 group.

Tag Name Writable ——– ——– CaptureSoftware string CroppedAreaImageHeightPixels real CroppedAreaImageWidthPixels real CroppedAreaLeftPixels real CroppedAreaTopPixels real ExposureLockUsed boolean FirstPhotoDate date FullPanoHeightPixels real FullPanoWidthPixels real InitialCameraDolly real InitialHorizontalFOVDegrees real InitialVerticalFOVDegrees real InitialViewHeadingDegrees real InitialViewPitchDegrees real InitialViewRollDegrees real LargestValidInteriorRectHeight real LargestValidInteriorRectLeft real LargestValidInteriorRectTop real LargestValidInteriorRectWidth real LastPhotoDate date PoseHeadingDegrees real PosePitchDegrees real PoseRollDegrees real ProjectionType string SourcePhotosCount integer StitchingSoftware string UsePanoramaViewer boolean

XMP GSpherical Tags

Not actually XMP. These RDF/XML tags are used in Google spherical MP4 videos. These tags are written into the video track of MOV/MP4 files, and not at the top level like other XMP tags. See <https://github.com/google/spatial-media/blob/master/docs/spherical-video-rfc.md> for the specification.

These tags belong to the ExifTool XMP-GSpherical family 1 group.

Tag Name Writable ——– ——– CroppedAreaImageHeightPixels integer/ CroppedAreaImageWidthPixels integer/ CroppedAreaLeftPixels integer/ CroppedAreaTopPixels integer/ FullPanoHeightPixels integer/ FullPanoWidthPixels integer/ InitialViewHeadingDegrees real/ InitialViewPitchDegrees real/ InitialViewRollDegrees real/ ProjectionType string/ SourceCount integer/ Spherical boolean/ StereoMode string/ Stitched boolean/ StitchingSoftware string/ TimeStamp integer/

XMP hdr Tags

HDR metadata namespace tags written by ACR 15.1. The actual namespace prefix is “hdr_metadata”, which is the prefix recorded in the file, but ExifTool shortens this for the family 1 group name.

These tags belong to the ExifTool XMP-hdr family 1 group.

Tag Name Writable ——– ——– CCVAvgLuminanceNits real CCVMaxLuminanceNits real CCVMinLuminanceNits real CCVPrimariesXY string CCVWhiteXY string SceneReferred boolean

XMP hdrgm Tags

Tags used in Adobe gain map images.

These tags belong to the ExifTool XMP-hdrgm family 1 group.

Tag Name Writable ——– ——– BaseRenditionIsHDR boolean GainMapMax real+ GainMapMin real+ Gamma real/+ HDRCapacityMax real HDRCapacityMin real OffsetHDR real+ OffsetSDR real+ Version string/

XMP ics Tags

Tags used by IDimager. Nested TagStructure structures are unrolled to an arbitrary depth of 6 to avoid infinite recursion.

These tags belong to the ExifTool XMP-ics family 1 group.

Tag Name Writable ——– ——– AppVersion string/ ImageRef string SubVersions SubVersion Struct+ SubVersionFileName string_+ SubVersionReference string_+ TagStructure TagStructure Struct+ LabelName1 string_+ ParentReference1 string_+ Reference1 string_+ SubLabels1 TagStructure Struct_+ LabelName2 string_+ ParentReference2 string_+ Reference2 string_+ SubLabels2 TagStructure Struct_+ LabelName3 string_+ ParentReference3 string_+ Reference3 string_+ SubLabels3 TagStructure Struct_+ LabelName4 string_+ ParentReference4 string_+ Reference4 string_+ SubLabels4 TagStructure Struct_+ LabelName5 string_+ ParentReference5 string_+ Reference5 string_+ SubLabels5 TagStructure Struct_+ LabelName6 string_+ ParentReference6 string_+ Reference6 string_+ TimeStamp date/

XMP SubVersion Struct

Field Name Writable ———- ——– FileName string VersRef string

XMP TagStructure Struct

Field Name Writable ———- ——– LabelName string ParentReference string Reference string SubLabels TagStructure Struct+

XMP iptcCore Tags

IPTC Core namespace tags. The actual IPTC Core namespace prefix is “Iptc4xmpCore”, which is the prefix recorded in the file, but ExifTool shortens this for the family 1 group name. (see <http://www.iptc.org/IPTC4XMP/>)

These tags belong to the ExifTool XMP-iptcCore family 1 group.

Tag Name Writable ——– ——– AltTextAccessibility lang-alt CountryCode string CreatorContactInfo ContactInfo Struct CreatorCity string_ CreatorCountry string_ CreatorAddress string_ CreatorPostalCode string_ CreatorRegion string_ CreatorWorkEmail string_ CreatorWorkTelephone string_ CreatorWorkURL string_ ExtDescrAccessibility lang-alt IntellectualGenre string Location string Scene string+ SubjectCode string+

XMP ContactInfo Struct

Field Name Writable ———- ——– CiAdrCity string CiAdrCtry string CiAdrExtadr string CiAdrPcode string CiAdrRegion string CiEmailWork string CiTelWork string CiUrlWork string

XMP iptcExt Tags

This table contains tags defined by the IPTC Extension schema version 1.7 and IPTC Video Metadata version 1.3. The actual namespace prefix is “Iptc4xmpExt”, but ExifTool shortens this for the family 1 group name. (See <http://www.iptc.org/standards/photo-metadata/iptc-standard/> and <https://iptc.org/standards/video-metadata-hub/>.)

These tags belong to the ExifTool XMP-iptcExt family 1 group.

Tag Name Writable ——– ——– AboutCvTerm CVTermDetails Struct+ AboutCvTermCvId string_+ AboutCvTermId string_+ AboutCvTermName lang-alt_+ AboutCvTermRefinedAbout string_+ AdditionalModelInformation string ArtworkOrObject ArtworkOrObjectDetails Struct+ ArtworkCircaDateCreated string!_+ ArtworkContentDescription lang-alt_+ ArtworkContributionDescription lang-alt_+ ArtworkCopyrightNotice string_+ ArtworkCreator string_+ ArtworkCreatorID string_+ ArtworkCopyrightOwnerID string_+ ArtworkCopyrightOwnerName string_+ ArtworkLicensorID string_+ ArtworkLicensorName string_+ ArtworkDateCreated date_+ ArtworkPhysicalDescription lang-alt_+ ArtworkSource string_+ ArtworkSourceInventoryNo string_+ ArtworkSourceInvURL string_+ ArtworkStylePeriod string_+ ArtworkTitle lang-alt_+ AudioBitrate integer AudioBitrateMode string AudioBitsPerSample integer AudioChannelCount integer CircaDateCreated string ContainerFormat Entity Struct ContainerFormatIdentifier string_+ ContainerFormatName lang-alt_ Contributor EntityWithRole Struct+ ContributorIdentifier string_+ ContributorName lang-alt_+ ContributorRole string_+ CopyrightYear integer Creator EntityWithRole Struct+ CreatorIdentifier string_+ CreatorName lang-alt_+ CreatorRole string_+ ControlledVocabularyTerm string+ DataOnScreen TextRegion Struct+ DataOnScreenRegion Area Struct_+ DataOnScreenRegionD real_+ DataOnScreenRegionH real_+ DataOnScreenRegionText string_+ DataOnScreenRegionUnit string_+ DataOnScreenRegionW real_+ DataOnScreenRegionX real_+ DataOnScreenRegionY real_+ DigitalImageGUID string DigitalSourceFileType string DigitalSourceType string Dopesheet lang-alt DopesheetLink QualifiedLink Struct+ DopesheetLinkLink string_+ DopesheetLinkLinkQualifier string_+ EmbdEncRightsExpr EEREDetails Struct+ EmbeddedEncodedRightsExpr string_+ EmbeddedEncodedRightsExprType string_+ EmbeddedEncodedRightsExprLangID string_+ Episode EpisodeOrSeason Struct EpisodeIdentifier string_ EpisodeName string_ EpisodeNumber string_ Event lang-alt ShownEvent Entity Struct+ ShownEventIdentifier string_+ ShownEventName lang-alt_+ EventID string+ ExternalMetadataLink string+ FeedIdentifier string Genre CVTermDetails Struct+ GenreCvId string_+ GenreCvTermId string_+ GenreCvTermName lang-alt_+ GenreCvTermRefinedAbout string_+ Headline lang-alt/ ImageRegion ImageRegion Struct+ ImageRegionName lang-alt_+ ImageRegionCtype Entity Struct_+ ImageRegionCtypeIdentifier string_+ ImageRegionCtypeName lang-alt_+ ImageRegionBoundary RegionBoundary Struct_+ ImageRegionBoundaryH real_+ ImageRegionBoundaryRx real_+ ImageRegionBoundaryShape string_+ ImageRegionBoundaryUnit string_+ ImageRegionBoundaryVertices BoundaryPoint Struct_+ ImageRegionBoundaryVerticesX real_+ ImageRegionBoundaryVerticesY real_+ ImageRegionBoundaryW real_+ ImageRegionBoundaryX real_+ ImageRegionBoundaryY real_+ ImageRegionID string_+ ImageRegionRole Entity Struct_+ ImageRegionRoleIdentifier string_+ ImageRegionRoleName lang-alt_+ IPTCLastEdited date LinkedEncRightsExpr LEREDetails Struct+ LinkedEncodedRightsExpr string_+ LinkedEncodedRightsExprType string_+ LinkedEncodedRightsExprLangID string_+ LocationCreated LocationDetails Struct+ LocationCreatedCity string_+ LocationCreatedCountryCode string_+ LocationCreatedCountryName string_+ LocationCreatedGPSAltitude rational_+ LocationCreatedGPSLatitude string_+ LocationCreatedGPSLongitude string_+ LocationCreatedIdentifier string_+ LocationCreatedLocationId string_+ LocationCreatedLocationName lang-alt_+ LocationCreatedProvinceState string_+ LocationCreatedSublocation string_+ LocationCreatedWorldRegion string_+ LocationShown LocationDetails Struct+ LocationShownCity string_+ LocationShownCountryCode string_+ LocationShownCountryName string_+ LocationShownGPSAltitude rational_+ LocationShownGPSLatitude string_+ LocationShownGPSLongitude string_+ LocationShownIdentifier string_+ LocationShownLocationId string_+ LocationShownLocationName lang-alt_+ LocationShownProvinceState string_+ LocationShownSublocation string_+ LocationShownWorldRegion string_+ MaxAvailHeight integer MaxAvailWidth integer MetadataAuthority Entity Struct MetadataAuthorityIdentifier string_+ MetadataAuthorityName lang-alt_ MetadataLastEdited date MetadataLastEditor Entity Struct MetadataLastEditorIdentifier string_+ MetadataLastEditorName lang-alt_ ModelAge integer+ OrganisationInImageCode string+ OrganisationInImageName string+ ParentID string PersonHeard Entity Struct+ PersonHeardIdentifier string_+ PersonHeardName lang-alt_+ PersonInImage string+ PersonInImageWDetails PersonDetails Struct+ PersonInImageCharacteristic CVTermDetails Struct_+ PersonInImageCvTermCvId string_+ PersonInImageCvTermId string_+ PersonInImageCvTermName lang-alt_+ PersonInImageCvTermRefinedAbout string_+ PersonInImageDescription lang-alt_+ PersonInImageId string_+ PersonInImageName lang-alt_+ PlanningRef EntityWithRole Struct+ PlanningRefIdentifier string_+ PlanningRefName lang-alt_+ PlanningRefRole string_+ ProductInImage ProductDetails Struct+ ProductInImageDescription lang-alt_+ ProductInImageGTIN string_+ ProductInImageProductId string_+ ProductInImageName lang-alt_+ PublicationEvent PublicationEvent Struct+ PublicationEventDate date_+ PublicationEventIdentifier string_+ PublicationEventName string_+ Rating Rating Struct+ RatingRegion LocationDetails Struct_+ RatingRegionCity string_+ RatingRegionCountryCode string_+ RatingRegionCountryName string_+ RatingRegionGPSAltitude rational_+ RatingRegionGPSLatitude string_+ RatingRegionGPSLongitude string_+ RatingRegionIdentifier string_+ RatingRegionLocationId string_+ RatingRegionLocationName lang-alt_+ RatingRegionProvinceState string_+ RatingRegionSublocation string_+ RatingRegionWorldRegion string_+ RatingScaleMaxValue string_+ RatingScaleMinValue string_+ RatingSourceLink string_+ RatingValue string_+ RatingValueLogoLink string_+ RecDevice Device Struct RecDeviceAttLensDescription string_ RecDeviceManufacturer string_ RecDeviceModelName string_ RecDeviceOwnersDeviceId string_ RecDeviceSerialNumber string_ RegistryID RegistryEntryDetails Struct+ RegistryEntryRole string_+ RegistryItemID string_+ RegistryOrganisationID string_+ ReleaseReady boolean Season EpisodeOrSeason Struct SeasonIdentifier string_ SeasonName string_ SeasonNumber string_ Series Series Struct SeriesIdentifier string_ SeriesName string_ Snapshot LinkedImage Struct+ SnapshotFormat string_+ SnapshotHeightPixels integer_+ SnapshotImageRole string_+ SnapshotLink string_+ SnapshotLinkQualifier string_+ SnapshotUsedVideoFrame Timecode Struct_+ SnapshotUsedVideoFrameTimeFormat string_+ SnapshotUsedVideoFrameTimeValue string_+ SnapshotUsedVideoFrameValue integer_+ SnapshotWidthPixels integer_+ StorylineIdentifier string+ StreamReady string StylePeriod string SupplyChainSource Entity Struct+ SupplyChainSourceIdentifier string_+ SupplyChainSourceName lang-alt_+ TemporalCoverage TemporalCoverage Struct TemporalCoverageFrom date_ TemporalCoverageTo date_ Transcript lang-alt TranscriptLink QualifiedLink Struct+ TranscriptLinkLink string_+ TranscriptLinkLinkQualifier string_+ VideoBitrate integer VideoBitrateMode string VideoDisplayAspectRatio rational VideoEncodingProfile string VideoShotType Entity Struct+ VideoShotTypeIdentifier string_+ VideoShotTypeName lang-alt_+ VideoStreamsCount integer VisualColor string WorkflowTag CVTermDetails Struct WorkflowTagCvId string_ WorkflowTagCvTermId string_ WorkflowTagCvTermName lang-alt_ WorkflowTagCvTermRefinedAbout string_

XMP CVTermDetails Struct

Field Name Writable ———- ——– CvId string CvTermId string CvTermName lang-alt CvTermRefinedAbout string

XMP ArtworkOrObjectDetails Struct

Field Name Writable ———- ——– AOCircaDateCreated string AOContentDescription lang-alt AOContributionDescription lang-alt AOCopyrightNotice string AOCreator string+ AOCreatorId string+ AOCurrentCopyrightOwnerId string AOCurrentCopyrightOwnerName string AOCurrentLicensorId string AOCurrentLicensorName string AODateCreated date AOPhysicalDescription lang-alt AOSource string AOSourceInvNo string AOSourceInvURL string AOStylePeriod string+ AOTitle lang-alt

XMP Entity Struct

Field Name Writable ———- ——– Identifier string+ Name lang-alt

XMP EntityWithRole Struct

Field Name Writable ———- ——– Identifier string+ Name lang-alt Role string+

XMP TextRegion Struct

Field Name Writable ———- ——– Region Area Struct RegionText string

XMP Area Struct

Field Name Writable ———- ——– D real H real Unit string W real X real Y real

XMP QualifiedLink Struct

Field Name Writable ———- ——– Link string LinkQualifier string

XMP EEREDetails Struct

Field Name Writable ———- ——– EncRightsExpr string RightsExprEncType string RightsExprLangId string

XMP EpisodeOrSeason Struct

Field Name Writable ———- ——– Identifier string Name string Number string

XMP ImageRegion Struct

This structure is new in the IPTC Extension version 1.5 specification. As well as the fields defined below, this structure may contain any top-level XMP tags, but since they aren’t pre-defined the only way to add these tags is to write ImageRegion as a structure with these tags as new fields.

Field Name Writable ———- ——– Name lang-alt RegionBoundary RegionBoundary Struct RCtype Entity Struct+ RId string RRole Entity Struct+

XMP RegionBoundary Struct

Field Name Writable ———- ——– RbH real RbRx real RbShape string RbUnit string RbVertices BoundaryPoint Struct+ RbW real RbX real RbY real

XMP BoundaryPoint Struct

Field Name Writable ———- ——– RbX real RbY real

XMP LEREDetails Struct

Field Name Writable ———- ——– LinkedRightsExpr string RightsExprEncType string RightsExprLangId string

XMP LocationDetails Struct

Field Name Writable ———- ——– City string CountryCode string CountryName string GPSAltitude rational GPSLatitude string GPSLongitude string Identifier string+ LocationId string+ LocationName lang-alt ProvinceState string Sublocation string WorldRegion string

XMP PersonDetails Struct

Field Name Writable ———- ——– PersonCharacteristic CVTermDetails Struct+ PersonDescription lang-alt PersonId string+ PersonName lang-alt

XMP ProductDetails Struct

Field Name Writable ———- ——– ProductDescription lang-alt ProductGTIN string ProductId string ProductName lang-alt

XMP PublicationEvent Struct

Field Name Writable ———- ——– Date date Identifier string Name string

XMP Rating Struct

Field Name Writable ———- ——– RatingRegion LocationDetails Struct+ RatingScaleMaxValue string RatingScaleMinValue string RatingSourceLink string RatingValue string RatingValueLogoLink string

XMP Device Struct

Field Name Writable ———- ——– AttLensDescription string Manufacturer string ModelName string OwnersDeviceId string SerialNumber string

XMP RegistryEntryDetails Struct

Field Name Writable ———- ——– RegEntryRole string RegItemId string RegOrgId string

XMP Series Struct

Field Name Writable ———- ——– Identifier string Name string

XMP LinkedImage Struct

Field Name Writable ———- ——– HeightPixels integer ImageRole string Link string LinkQualifier string+ UsedVideoFrame Timecode Struct WidthPixels integer Format string

XMP Timecode Struct

Field Name Writable ———- ——– TimeFormat string TimeValue string Value integer

XMP TemporalCoverage Struct

Field Name Writable ———- ——– TempCoverageFrom date TempCoverageTo date

XMP LImage Tags

Tags written by RED smartphones.

These tags belong to the ExifTool XMP-LImage family 1 group.

Tag Name Writable ——– ——– MajorVersion string MinorVersion string RightAlbedo string

XMP Lightroom Tags

Adobe Lightroom “lr” namespace tags.

These tags belong to the ExifTool XMP-lr family 1 group.

Tag Name Writable ——– ——– HierarchicalSubject string+ PrivateRTKInfo string WeightedFlatSubject string+

XMP MediaPro Tags

iView MediaPro namespace tags.

These tags belong to the ExifTool XMP-mediapro family 1 group.

Tag Name Writable ——– ——– CatalogSets string+ Event string/ Location string/ People string+ Status string UserFields string+

XMP panorama Tags

Adobe Photoshop Panorama-profile tags.

These tags belong to the ExifTool XMP-panorama family 1 group.

Tag Name Writable ——– ——– Transformation string VirtualFocalLength real VirtualImageXCenter real VirtualImageYCenter real

XMP pdf Tags

Adobe PDF namespace tags. The official XMP specification defines only Keywords, PDFVersion, Producer and Trapped. The other tags are included because they have been observed in PDF files, but some are avoided when writing due to name conflicts with other XMP namespaces.

These tags belong to the ExifTool XMP-pdf family 1 group.

Tag Name Writable ——– ——– Author string Copyright string/ CreationDate date Creator string/ Keywords string Marked boolean/ ModDate date PDFVersion string Producer string Subject string/ Title string/ Trapped string

XMP pdfx Tags

PDF extension tags. This namespace is used to store application-defined PDF information, so there are no pre-defined tags. User-defined tags must be created to enable writing of XMP-pdfx information.

These tags belong to the ExifTool XMP-pdfx family 1 group.

Tag Name Writable ——– ——– [no tags known]

XMP photoshop Tags

Adobe Photoshop namespace tags.

These tags belong to the ExifTool XMP-photoshop family 1 group.

Tag Name Writable ——– ——– AuthorsPosition string CameraProfiles Camera Struct+ CameraProfilesApertureValue real_+ CameraProfilesAuthor string_+ CameraProfilesAutoScale boolean_+ CameraProfilesCameraPrettyName string_+ CameraProfilesCameraRawProfile boolean_+ CameraProfilesFocalLength real_+ CameraProfilesFocusDistance real_+ CameraProfilesLens string_+ CameraProfilesLensPrettyName string_+ CameraProfilesMake string_+ CameraProfilesModel string_+ CameraProfilesPerspectiveModel PerspectiveModel Struct_+ CameraProfilesPerspectiveModelImageXCenter real_+ CameraProfilesPerspectiveModelImageYCenter real_+ CameraProfilesPerspectiveModelRadialDistortParam1 real_+ CameraProfilesPerspectiveModelRadialDistortParam2 real_+ CameraProfilesPerspectiveModelRadialDistortParam3 real_+ CameraProfilesPerspectiveModelScaleFactor real_+ CameraProfilesPerspectiveModelVersion string_+ CameraProfilesProfileName string_+ CameraProfilesSensorFormatFactor real_+ CameraProfilesUniqueCameraModel string_+ CaptionWriter string Category string City string ColorMode integer Country string Credit string DateCreated date DocumentAncestors string+ EmbeddedXMPDigest string Headline string History string ICCProfileName string Instructions string LegacyIPTCDigest string SidecarForExtension string Source string State string SupplementalCategories string+ TextLayers Layer Struct+ TextLayerName string_+ TextLayerText string_+ TransmissionReference string Urgency integer

XMP Camera Struct

Field Name Writable ———- ——– ApertureValue real Author string AutoScale boolean CameraPrettyName string CameraRawProfile boolean FocalLength real FocusDistance real Lens string LensPrettyName string Make string Model string PerspectiveModel PerspectiveModel Struct ProfileName string SensorFormatFactor real UniqueCameraModel string

XMP PerspectiveModel Struct

Field Name Writable ———- ——– ImageXCenter real ImageYCenter real RadialDistortParam1 real RadialDistortParam2 real RadialDistortParam3 real ScaleFactor real Version string

XMP Layer Struct

Field Name Writable ———- ——– LayerName string LayerText string

XMP PixelLive Tags

PixelLive namespace tags. These tags are not writable because they are very uncommon and I haven’t been able to locate a reference which gives the namespace URI.

These tags belong to the ExifTool XMP-PixelLive family 1 group.

Tag Name Writable ——– ——– Author no Comments no Copyright no Date no Genre no Title no

XMP pmi Tags

PRISM Metadata for Images 3.0 namespace tags. (see <http://www.prismstandard.org/>)

These tags belong to the ExifTool XMP-pmi family 1 group.

Tag Name Writable ——– ——– Color string/ ContactInfo string/ DisplayName string/ DistributorProductID string/ EventAlias string/ EventEnd string/ EventStart string/ EventSubtype string/ EventType string/ Field string/ Framing string/ Location string/ Make string/ Manufacturer string/ Model string/ ModelYear string/ ObjectDescription string/ ObjectSubtype string/ ObjectType string/ Orientation string/ PositionDescriptor string/ ProductID string/ ProductIDType string/ Season string/ SequenceName string/ SequenceNumber string/ SequenceTotalNumber string/ Setting string/ ShootID string/ SlideshowName string/ SlideshowNumber integer/ SlideshowTotalNumber integer/ Viewpoint string/ VisualTechnique string/

XMP prism Tags

Publishing Requirements for Industry Standard Metadata 3.0 namespace tags. (see <https://www.w3.org/Submission/2020/SUBM-prism-20200910/prism-basic.html/>)

These tags belong to the ExifTool XMP-prism family 1 group.

Tag Name Writable ——– ——– AcademicField string/ AggregateIssueNumber integer/ AggregationType string/+ AlternateTitle prismAlternateTitle Struct+ AlternateTitleA-lang string/_+ AlternateTitleA-platform string/_+ AlternateTitleText string/_+ BlogTitle string/ BlogURL string/ BookEdition string/ ByteCount integer/ Channel prismChannel Struct+ ChannelA-lang string/_+ ChannelChannel string/_+ ChannelSubchannel1 string/_+ ChannelSubchannel2 string/_+ ChannelSubchannel3 string/_+ ChannelSubchannel4 string/_+ ComplianceProfile string/ ContentType string/ CopyrightYear string/ CorporateEntity string/+ CoverDate date/ CoverDisplayDate string/ CreationDate date/ DateRecieved date/ Device string/ Distributor string/ DOI string/ Edition string/ EIssn string/ EndingPage string/ Event string/+ Genre string/+ HasAlternative string/+ HasCorrection prismHasCorrection Struct HasCorrectionA-lang string/_ HasCorrectionA-platform string/_ HasCorrectionText string/_ HasTranslation string/+ Industry string/+ IsAlternativeOf string/+ ISBN string/+ IsCorrectionOf string/+ ISSN string/ IssueIdentifier string/ IssueName string/ IssueTeaser string/ IssueType string/ IsTranslationOf string/ Keyword string/+ KillDate prismKillDate Struct KillDateA-platform string/_ KillDateDate date/_ Link string/+ Location string/+ ModificationDate date/ NationalCatalogNumber string/ Number string/ Object string/+ OffSaleDate prismOffSaleDate Struct+ OffSaleDateA-platform string/_+ OffSaleDateDate date/_+ OnSaleDate prismOnSaleDate Struct+ OnSaleDateA-platform string/_+ OnSaleDateDate date/_+ OnSaleDay prismOnSaleDay Struct+ OnSaleDayA-platform string/_+ OnSaleDayDay string/_+ Organization string/+ OriginPlatform string/+ PageCount integer/ PageProgressionDirection string/ PageRange string/+ Person string/ Platform string/ ProductCode string/ Profession string/ PublicationDate prismPublicationDate Struct+ PublicationDateA-platform string/_+ PublicationDateDate date/_+ PublicationDisplayDate prismPublicationDate Struct+ PublicationDisplayDateA-platform string/_+ PublicationDisplayDateDate date/_+ PublicationName string/ PublishingFrequency string/ Rating string/ SamplePageRange string/ Section string/ SellingAgency string/ SeriesNumber integer/ SeriesTitle string/ Sport string/ StartingPage string/ Subsection1 string/ Subsection2 string/ Subsection3 string/ Subsection4 string/ Subtitle string/ SupplementDisplayID string/ SupplementStartingPage string/ SupplementTitle string/ Teaser string/+ Ticker string/+ TimePeriod string/ URL prismUrl Struct+ URLA-platform string/_+ URLUrl string/_+ UspsNumber string/ VersionIdentifier string/ Volume string/ WordCount integer/

XMP prismAlternateTitle Struct

Field Name Writable ———- ——– A-lang string A-platform string Text string

XMP prismChannel Struct

Field Name Writable ———- ——– A-lang string Channel string Subchannel1 string Subchannel2 string Subchannel3 string Subchannel4 string

XMP prismHasCorrection Struct

Field Name Writable ———- ——– A-lang string A-platform string Text string

XMP prismKillDate Struct

Field Name Writable ———- ——– A-platform string Date date

XMP prismOffSaleDate Struct

Field Name Writable ———- ——– A-platform string Date date

XMP prismOnSaleDate Struct

Field Name Writable ———- ——– A-platform string Date date

XMP prismOnSaleDay Struct

Field Name Writable ———- ——– A-platform string Day string

XMP prismPublicationDate Struct

Field Name Writable ———- ——– A-platform string Date date

XMP prismUrl Struct

Field Name Writable ———- ——– A-platform string Url string

XMP prl Tags

PRISM Rights Language 2.1 namespace tags. These tags have been deprecated since the release of the PRISM Usage Rights 3.0. (see <https://www.w3.org/submissions/2020/SUBM-prism-20200910/prism-image.html>)

These tags belong to the ExifTool XMP-prl family 1 group.

Tag Name Writable ——– ——– Geography string/+ Industry string/+ Usage string/+

XMP prm Tags

PRISM Recipe Metadata 3.0 namespace tags. (see <http://www.prismstandard.org/>)

These tags belong to the ExifTool XMP-prm family 1 group.

Tag Name Writable ——– ——– CookingEquipment string/ CookingMethod string/ Course string/ Cuisine string/ DietaryNeeds string/ DishType string/ Duration string/ IngredientExclusion string/ MainIngredient string/ Meal string/ RecipeEndingPage string/ RecipePageRange string/ RecipeSource string/ RecipeStartingPage string/ RecipeTitle string/ ServingSize string/ SkillLevel string/ SpecialOccasion string/ Yield string/

XMP pur Tags

PRISM Usage Rights 3.0 namespace tags. (see <http://www.prismstandard.org/>)

These tags belong to the ExifTool XMP-pur family 1 group.

Tag Name Writable ——– ——– AdultContentWarning string/+ Agreement string/+ Copyright lang-alt/ CreditLine string/+ EmbargoDate date/+ ExclusivityEndDate date/+ ExpirationDate date/+ ImageSizeRestriction string/ OptionEndDate date/+ Permissions string/+ Restrictions string/+ ReuseProhibited boolean/ RightsAgent string/ RightsOwner string/

XMP rdf Tags

Most RDF attributes are handled internally, but the “about” attribute is treated specially to allow it to be set to a specific value if required.

These tags belong to the ExifTool XMP-rdf family 1 group.

Tag Name Writable ——– ——– About string!

XMP swf Tags

Adobe SWF namespace tags.

These tags belong to the ExifTool XMP-swf family 1 group.

Tag Name Writable ——– ——– BackgroundAlpha integer ForwardLock boolean MaxStorage integer Type string/

XMP tiff Tags

EXIF namespace for TIFF tags. See <https://web.archive.org/web/20180921145139if_/http://www.cipa.jp:80/std/documents/e/DC-010-2017_E.pdf> for the specification.

These tags belong to the ExifTool XMP-tiff family 1 group.

Tag Name Writable ——– ——– Artist string BitsPerSample integer+ Compression integer Copyright lang-alt DateTime date ImageDescription lang-alt ImageHeight integer ImageWidth integer Make string Model string NativeDigest string/ Orientation integer PhotometricInterpretation integer PlanarConfiguration integer PrimaryChromaticities rational+ ReferenceBlackWhite rational+ ResolutionUnit integer SamplesPerPixel integer Software string TransferFunction integer+ WhitePoint rational+ XResolution rational YCbCrCoefficients rational+ YCbCrPositioning integer YCbCrSubSampling integer+ YResolution rational

XMP x Tags

The “x” namespace is used for the “xmpmeta” wrapper, and may contain an “xmptk” attribute that is extracted as the XMPToolkit tag. When writing, the XMPToolkit tag is generated automatically by ExifTool unless specifically set to another value.

These tags belong to the ExifTool XMP-x family 1 group.

Tag Name Writable ——– ——– XMPToolkit string!

XMP xmp Tags

XMP namespace tags. If the older “xap”, “xapBJ”, “xapMM” or “xapRights” namespace prefixes are found, they are translated to the newer “xmp”, “xmpBJ”, “xmpMM” and “xmpRights” prefixes for use in family 1 group names.

These tags belong to the ExifTool XMP-xmp family 1 group.

Tag Name Writable ——– ——– Advisory string+ Author string/ BaseURL string CreateDate date CreatorTool string Description lang-alt/ Format string/ Identifier string/+ Keywords string/ Label string MetadataDate date ModifyDate date Nickname string PageInfo PageInfo Struct+ PageImageFormat string_+ PageImageHeight integer_+ PageImage string_+ PageImagePageNumber integer_+ PageImageWidth integer_+ Rating real RatingPercent real/ Thumbnails Thumbnail Struct+ ThumbnailFormat string_+ ThumbnailHeight integer_+ ThumbnailImage string/_+ ThumbnailWidth integer_+ Title lang-alt/

XMP PageInfo Struct

Field Name Writable ———- ——– PageNumber integer Format string Height integer Image string Width integer

XMP Thumbnail Struct

Field Name Writable ———- ——– Format string Height integer Image string Width integer

XMP xmpBJ Tags

XMP Basic Job Ticket namespace tags.

These tags belong to the ExifTool XMP-xmpBJ family 1 group.

Tag Name Writable ——– ——– JobRef JobRef Struct+ JobRefId string_+ JobRefName string_+ JobRefUrl string_+

XMP JobRef Struct

Field Name Writable ———- ——– Id string Name string Url string

XMP xmpDM Tags

XMP Dynamic Media namespace tags.

These tags belong to the ExifTool XMP-xmpDM family 1 group.

Tag Name Writable ——– ——– AbsPeakAudioFilePath string Album string AltTapeName string AltTimecode Timecode Struct AltTimecodeTimeFormat string_ AltTimecodeTimeValue string_ AltTimecodeValue integer_ Artist string/ AudioChannelType string AudioCompressor string AudioModDate date AudioSampleRate integer AudioSampleType string BeatSpliceParams BeatSpliceStretch Struct BeatSpliceParamsRiseInDecibel real_ BeatSpliceParamsRiseInTimeDuration Time Struct_ BeatSpliceParamsRiseInTimeDurationScale rational_ BeatSpliceParamsRiseInTimeDurationValue integer_ BeatSpliceParamsUseFileBeatsMarker boolean_ CameraAngle string CameraLabel string CameraModel string CameraMove string Client string DMComment string Composer string ContributedMedia Media Struct+ ContributedMediaDuration Time Struct_+ ContributedMediaDurationScale rational_+ ContributedMediaDurationValue integer_+ ContributedMediaManaged boolean_+ ContributedMediaPath string_+ ContributedMediaStartTime Time Struct_+ ContributedMediaStartTimeScale rational_+ ContributedMediaStartTimeValue integer_+ ContributedMediaTrack string_+ ContributedMediaWebStatement string_+ Copyright string/ Director string DirectorPhotography string DiscNumber string Duration Time Struct DurationScale rational_ DurationValue integer_ Engineer string FileDataRate rational Genre string Good boolean Instrument string IntroTime Time Struct IntroTimeScale rational_ IntroTimeValue integer_ Key string LogComment string Loop boolean Lyrics string Markers Marker Struct+ MarkersComment string_+ MarkersCuePointParams CuePointParam Struct_+ MarkersCuePointParamsKey string_+ MarkersCuePointParamsValue string_+ MarkersCuePointType string_+ MarkersDuration string_+ MarkersLocation string_+ MarkersName string_+ MarkersProbability real_+ MarkersSpeaker string_+ MarkersStartTime string_+ MarkersTarget string_+ MarkersType string_+ MetadataModDate date NumberOfBeats real OutCue Time Struct OutCueScale rational_ OutCueValue integer_ PartOfCompilation boolean ProjectName string ProjectRef ProjectLink Struct ProjectRefPath string_ ProjectRefType string_ PullDown string RelativePeakAudioFilePath string RelativeTimestamp Time Struct RelativeTimestampScale rational_ RelativeTimestampValue integer_ ReleaseDate date ResampleParams ResampleStretch Struct ResampleParamsQuality string_ ScaleType string Scene string/ ShotDate date ShotDay string ShotLocation string ShotName string ShotNumber string ShotSize string SpeakerPlacement string StartTimecode Timecode Struct StartTimecodeTimeFormat string_ StartTimecodeTimeValue string_ StartTimecodeValue integer_ StartTimeSampleSize integer StartTimeScale string StretchMode string TakeNumber integer TapeName string Tempo real TimeScaleParams TimeScaleStretch Struct TimeScaleParamsFrameOverlappingPercentage real_ TimeScaleParamsFrameSize real_ TimeScaleParamsQuality string_ TimeSignature string TrackNumber integer Tracks Track Struct+ TracksFrameRate string_+ TracksMarkers Marker Struct_+ TracksMarkersComment string_+ TracksMarkersCuePointParams CuePointParam Struct_+ TracksMarkersCuePointParamsKey string_+ TracksMarkersCuePointParamsValue string_+ TracksMarkersCuePointType string_+ TracksMarkersDuration string_+ TracksMarkersLocation string_+ TracksMarkersName string_+ TracksMarkersProbability real_+ TracksMarkersSpeaker string_+ TracksMarkersStartTime string_+ TracksMarkersTarget string_+ TracksMarkersType string_+ TracksTrackName string_+ TracksTrackType string_+ VideoAlphaMode string VideoAlphaPremultipleColor Colorant Struct VideoAlphaPremultipleColorA integer_ VideoAlphaPremultipleColorB integer_ VideoAlphaPremultipleColorBlack real_ VideoAlphaPremultipleColorBlue integer_ VideoAlphaPremultipleColorCyan real_ VideoAlphaPremultipleColorGray integer_ VideoAlphaPremultipleColorGreen integer_ VideoAlphaPremultipleColorL real_ VideoAlphaPremultipleColorMagenta real_ VideoAlphaPremultipleColorMode string_ VideoAlphaPremultipleColorRed integer_ VideoAlphaPremultipleColorSwatchName string_ VideoAlphaPremultipleColorTint integer_ VideoAlphaPremultipleColorType string_ VideoAlphaPremultipleColorYellow real_ VideoAlphaUnityIsTransparent boolean VideoColorSpace string VideoCompressor string VideoFieldOrder string VideoFrameRate real VideoFrameSize Dimensions Struct VideoFrameSizeH real_ VideoFrameSizeUnit string_ VideoFrameSizeW real_ VideoModDate date VideoPixelAspectRatio rational VideoPixelDepth string

XMP BeatSpliceStretch Struct

Field Name Writable ———- ——– RiseInDecibel real RiseInTimeDuration Time Struct UseFileBeatsMarker boolean

XMP Time Struct

Field Name Writable ———- ——– Scale rational Value integer

XMP Media Struct

Field Name Writable ———- ——– Duration Time Struct Managed boolean Path string StartTime Time Struct Track string WebStatement string

XMP Marker Struct

Field Name Writable ———- ——– Comment string CuePointParams CuePointParam Struct+ CuePointType string Duration string Location string Name string Probability real Speaker string StartTime string Target string Type string

XMP CuePointParam Struct

Field Name Writable ———- ——– Key string Value string

XMP ProjectLink Struct

Field Name Writable ———- ——– Path string Type string

XMP ResampleStretch Struct

Field Name Writable ———- ——– Quality string

XMP TimeScaleStretch Struct

Field Name Writable ———- ——– FrameOverlappingPercentage real FrameSize real Quality string

XMP Track Struct

Field Name Writable ———- ——– FrameRate string Markers Marker Struct+ TrackName string TrackType string

XMP Colorant Struct

Field Name Writable ———- ——– A integer B integer L real Black real Blue integer Cyan real Gray integer Green integer Magenta real Mode string Red integer SwatchName string Tint integer Type string Yellow real

XMP Dimensions Struct

Field Name Writable ———- ——– H real Unit string W real

XMP xmpMM Tags

XMP Media Management namespace tags.

These tags belong to the ExifTool XMP-xmpMM family 1 group.

Tag Name Writable ——– ——– DerivedFrom ResourceRef Struct DerivedFromAlternatePaths string_+ DerivedFromDocumentID string_ DerivedFromFilePath string_ DerivedFromFromPart string_ DerivedFromInstanceID string_ DerivedFromLastModifyDate date_ DerivedFromLastURL string_ DerivedFromLinkCategory string_ DerivedFromLinkForm string_ DerivedFromManager string_ DerivedFromManagerVariant string_ DerivedFromManageTo string_ DerivedFromManageUI string_ DerivedFromMaskMarkers string_ DerivedFromOriginalDocumentID string_ DerivedFromPartMapping string_ DerivedFromPlacedResolutionUnit string_ DerivedFromPlacedXResolution string_ DerivedFromPlacedYResolution string_ DerivedFromRenditionClass string_ DerivedFromRenditionParams string_ DerivedFromToPart string_ DerivedFromVersionID string_ DocumentID string History ResourceEvent Struct+ HistoryAction string_+ HistoryChanged string_+ HistoryInstanceID string_+ HistoryParameters string_+ HistorySoftwareAgent string_+ HistoryWhen date_+ Ingredients ResourceRef Struct+ IngredientsAlternatePaths string_+ IngredientsDocumentID string_+ IngredientsFilePath string_+ IngredientsFromPart string_+ IngredientsInstanceID string_+ IngredientsLastModifyDate date_+ IngredientsLastURL string_+ IngredientsLinkCategory string_+ IngredientsLinkForm string_+ IngredientsManager string_+ IngredientsManagerVariant string_+ IngredientsManageTo string_+ IngredientsManageUI string_+ IngredientsMaskMarkers string_+ IngredientsOriginalDocumentID string_+ IngredientsPartMapping string_+ IngredientsPlacedResolutionUnit string_+ IngredientsPlacedXResolution string_+ IngredientsPlacedYResolution string_+ IngredientsRenditionClass string_+ IngredientsRenditionParams string_+ IngredientsToPart string_+ IngredientsVersionID string_+ InstanceID string LastURL string ManagedFrom ResourceRef Struct ManagedFromAlternatePaths string_+ ManagedFromDocumentID string_ ManagedFromFilePath string_ ManagedFromFromPart string_ ManagedFromInstanceID string_ ManagedFromLastModifyDate date_ ManagedFromLastURL string_ ManagedFromLinkCategory string_ ManagedFromLinkForm string_ ManagedFromManager string_ ManagedFromManagerVariant string_ ManagedFromManageTo string_ ManagedFromManageUI string_ ManagedFromMaskMarkers string_ ManagedFromOriginalDocumentID string_ ManagedFromPartMapping string_ ManagedFromPlacedResolutionUnit string_ ManagedFromPlacedXResolution string_ ManagedFromPlacedYResolution string_ ManagedFromRenditionClass string_ ManagedFromRenditionParams string_ ManagedFromToPart string_ ManagedFromVersionID string_ Manager string ManagerVariant string ManageTo string ManageUI string Manifest ManifestItem Struct+ ManifestLinkForm string_+ ManifestPlacedResolutionUnit string_+ ManifestPlacedXResolution real_+ ManifestPlacedYResolution real_+ ManifestReference ResourceRef Struct_+ ManifestReferenceAlternatePaths string_+ ManifestReferenceDocumentID string_+ ManifestReferenceFilePath string_+ ManifestReferenceFromPart string_+ ManifestReferenceInstanceID string_+ ManifestReferenceLastModifyDate date_+ ManifestReferenceLastURL string_+ ManifestReferenceLinkCategory string_+ ManifestReferenceLinkForm string_+ ManifestReferenceManager string_+ ManifestReferenceManagerVariant string_+ ManifestReferenceManageTo string_+ ManifestReferenceManageUI string_+ ManifestReferenceMaskMarkers string_+ ManifestReferenceOriginalDocumentID string_+ ManifestReferencePartMapping string_+ ManifestReferencePlacedResolutionUnit string_+ ManifestReferencePlacedXResolution string_+ ManifestReferencePlacedYResolution string_+ ManifestReferenceRenditionClass string_+ ManifestReferenceRenditionParams string_+ ManifestReferenceToPart string_+ ManifestReferenceVersionID string_+ OriginalDocumentID string Pantry PantryItem Struct+ PantryInstanceID string_ PreservedFileName string RenditionClass string RenditionOf ResourceRef Struct RenditionOfAlternatePaths string_+ RenditionOfDocumentID string_ RenditionOfFilePath string_ RenditionOfFromPart string_ RenditionOfInstanceID string_ RenditionOfLastModifyDate date_ RenditionOfLastURL string_ RenditionOfLinkCategory string_ RenditionOfLinkForm string_ RenditionOfManager string_ RenditionOfManagerVariant string_ RenditionOfManageTo string_ RenditionOfManageUI string_ RenditionOfMaskMarkers string_ RenditionOfOriginalDocumentID string_ RenditionOfPartMapping string_ RenditionOfPlacedResolutionUnit string_ RenditionOfPlacedXResolution string_ RenditionOfPlacedYResolution string_ RenditionOfRenditionClass string_ RenditionOfRenditionParams string_ RenditionOfToPart string_ RenditionOfVersionID string_ RenditionParams string SaveID integer Subject string/+ VersionID string Versions Version Struct+ VersionsComments string_+ VersionsEvent ResourceEvent Struct_+ VersionsEventAction string_+ VersionsEventChanged string_+ VersionsEventInstanceID string_+ VersionsEventParameters string_+ VersionsEventSoftwareAgent string_+ VersionsEventWhen date_+ VersionsModifier string_+ VersionsModifyDate date_+ VersionsVersion string_+

XMP ResourceRef Struct

Field Name Writable ———- ——– AlternatePaths string+ DocumentID string FilePath string FromPart string InstanceID string LastModifyDate date LastURL string LinkCategory string LinkForm string ManageTo string ManageUI string Manager string ManagerVariant string MaskMarkers string OriginalDocumentID string PartMapping string PlacedResolutionUnit string PlacedXResolution string PlacedYResolution string RenditionClass string RenditionParams string ToPart string VersionID string

XMP ResourceEvent Struct

Field Name Writable ———- ——– Action string Changed string InstanceID string Parameters string SoftwareAgent string When date

XMP ManifestItem Struct

Field Name Writable ———- ——– LinkForm string PlacedResolutionUnit string PlacedXResolution real PlacedYResolution real Reference ResourceRef Struct

XMP PantryItem Struct

This structure must have an InstanceID field, but may also contain any other XMP properties.

Field Name Writable ———- ——– InstanceID string

XMP Version Struct

Field Name Writable ———- ——– Comments string Event ResourceEvent Struct Modifier string ModifyDate date Version string

XMP xmpNote Tags

XMP Note namespace tags.

These tags belong to the ExifTool XMP-xmpNote family 1 group.

Tag Name Writable ——– ——– HasExtendedXMP string*

XMP xmpPLUS Tags

XMP Picture Licensing Universal System (PLUS) tags as written by some older Adobe applications. See PLUS XMP Tags for the current PLUS tags.

These tags belong to the ExifTool XMP-xmpPLUS family 1 group.

Tag Name Writable ——– ——– CreditLineReq boolean/ ReuseAllowed boolean/

XMP xmpRights Tags

XMP Rights Management namespace tags.

These tags belong to the ExifTool XMP-xmpRights family 1 group.

Tag Name Writable ——– ——– Certificate string Marked boolean Owner string+ UsageTerms lang-alt WebStatement string

XMP xmpTPg Tags

XMP Paged-Text namespace tags.

These tags belong to the ExifTool XMP-xmpTPg family 1 group.

Tag Name Writable ——– ——– Colorants Colorant Struct+ ColorantA integer_+ ColorantB integer_+ ColorantBlack real_+ ColorantBlue integer_+ ColorantCyan real_+ ColorantGray integer_+ ColorantGreen integer_+ ColorantL real_+ ColorantMagenta real_+ ColorantMode string_+ ColorantRed integer_+ ColorantSwatchName string_+ ColorantTint integer_+ ColorantType string_+ ColorantYellow real_+ Fonts Font Struct+ ChildFontFiles string_+ FontComposite boolean_+ FontFace string_+ FontFamily string_+ FontFileName string_+ FontName string_+ FontType string_+ FontVersion string_+ HasVisibleOverprint boolean HasVisibleTransparency boolean MaxPageSize Dimensions Struct MaxPageSizeH real_ MaxPageSizeUnit string_ MaxPageSizeW real_ NPages integer PlateNames string+ SwatchGroups SwatchGroup Struct+ SwatchGroupsColorants Colorant Struct_+ SwatchColorantA integer_+ SwatchColorantB integer_+ SwatchColorantBlack real_+ SwatchColorantBlue integer_+ SwatchColorantCyan real_+ SwatchColorantGray integer_+ SwatchColorantGreen integer_+ SwatchColorantL real_+ SwatchColorantMagenta real_+ SwatchColorantMode string_+ SwatchColorantRed integer_+ SwatchColorantSwatchName string_+ SwatchColorantTint integer_+ SwatchColorantType string_+ SwatchColorantYellow real_+ SwatchGroupName string_+ SwatchGroupType integer_+

XMP Font Struct

Field Name Writable ———- ——– ChildFontFiles string+ Composite boolean FontFace string FontFamily string FontFileName string FontName string FontType string VersionString string

XMP SwatchGroup Struct

Field Name Writable ———- ——– Colorants Colorant Struct+ GroupName string GroupType integer

XMP XML Tags

Tag ID Tag Name Writable —— ——– ——– dc dc XMP dc lastUpdate LastUpdate no

XMP SVG Tags

SVG (Scalable Vector Graphics) image tags. By default, only the top-level SVG and Metadata tags are extracted from these images, but all graphics tags may be extracted by setting the Unknown option to 2 (-U on the command line). The SVG tags are not part of XMP as such, but are included with the XMP module for convenience. (see <http://www.w3.org/TR/SVG11/>)

These tags belong to the ExifTool XMP-svg family 1 group.

Tag ID Tag Name Writable —— ——– ——– height ImageHeight no id ID no metadataId MetadataID no version SVGVersion no width ImageWidth no

GPS Tags

These GPS tags are part of the EXIF standard, and are stored in a separate IFD within the EXIF information.

ExifTool is very flexible about the input format when writing lat/long coordinates, and will accept from 1 to 3 floating point numbers (for decimal degrees, degrees and minutes, or degrees, minutes and seconds) separated by just about anything, and will format them properly according to the EXIF specification.

Some GPS tags have values which are fixed-length strings. For these, the indicated string lengths include a null terminator which is added automatically by ExifTool. Remember that the descriptive values are used when writing (eg. ‘Above Sea Level’, not ‘0’) unless the print conversion is disabled (with ‘-n’ on the command line or the PrintConv option in the API, or by suffixing the tag name with a # character).

When adding GPS information to an image, it is important to set all of the following tags: GPSLatitude, GPSLatitudeRef, GPSLongitude, GPSLongitudeRef, and GPSAltitude and GPSAltitudeRef if the altitude is known. ExifTool will write the required GPSVersionID tag automatically if new a GPS IFD is added to an image.

Tag ID Tag Name Writable —— ——– ——– 0x0000 GPSVersionID int8u[4]: 0x0001 GPSLatitudeRef string[2] 0x0002 GPSLatitude rational64u[3] 0x0003 GPSLongitudeRef string[2] 0x0004 GPSLongitude rational64u[3] 0x0005 GPSAltitudeRef int8u 0x0006 GPSAltitude rational64u 0x0007 GPSTimeStamp rational64u[3] 0x0008 GPSSatellites string 0x0009 GPSStatus string[2] 0x000a GPSMeasureMode string[2] 0x000b GPSDOP rational64u 0x000c GPSSpeedRef string[2] 0x000d GPSSpeed rational64u 0x000e GPSTrackRef string[2] 0x000f GPSTrack rational64u 0x0010 GPSImgDirectionRef string[2] 0x0011 GPSImgDirection rational64u 0x0012 GPSMapDatum string 0x0013 GPSDestLatitudeRef string[2] 0x0014 GPSDestLatitude rational64u[3] 0x0015 GPSDestLongitudeRef string[2] 0x0016 GPSDestLongitude rational64u[3] 0x0017 GPSDestBearingRef string[2] 0x0018 GPSDestBearing rational64u 0x0019 GPSDestDistanceRef string[2] 0x001a GPSDestDistance rational64u 0x001b GPSProcessingMethod undef 0x001c GPSAreaInformation undef 0x001d GPSDateStamp string[11] 0x001e GPSDifferential int16u 0x001f GPSHPositioningError rational64u

GeoTiff Tags

ExifTool extracts the following tags from GeoTIFF images. See <https://web.archive.org/web/20070820121549/http://www.remotesensing.org/geotiff/spec/geotiffhome.html> for the complete GeoTIFF specification. Also included in the table below are ChartTIFF tags (see <https://web.archive.org/web/20020828193928/http://www.charttiff.com/whitepapers.shtml>). GeoTIFF tags are not writable individually, but they may be copied en mass via the block tags GeoTiffDirectory, GeoTiffDoubleParams and GeoTiffAsciiParams.

Tag ID Tag Name Writable —— ——– ——– 0x0001 GeoTiffVersion no 0x0400 GTModelType no 0x0401 GTRasterType no 0x0402 GTCitation no 0x0800 GeographicType no 0x0801 GeogCitation no 0x0802 GeogGeodeticDatum no 0x0803 GeogPrimeMeridian no 0x0804 GeogLinearUnits no 0x0805 GeogLinearUnitSize no 0x0806 GeogAngularUnits no 0x0807 GeogAngularUnitSize no 0x0808 GeogEllipsoid no 0x0809 GeogSemiMajorAxis no 0x080a GeogSemiMinorAxis no 0x080b GeogInvFlattening no 0x080c GeogAzimuthUnits no 0x080d GeogPrimeMeridianLong no 0x080e GeogToWGS84 no 0x0c00 ProjectedCSType no 0x0c01 PCSCitation no 0x0c02 Projection no 0x0c03 ProjCoordTrans no 0x0c04 ProjLinearUnits no 0x0c05 ProjLinearUnitSize no 0x0c06 ProjStdParallel1 no 0x0c07 ProjStdParallel2 no 0x0c08 ProjNatOriginLong no 0x0c09 ProjNatOriginLat no 0x0c0a ProjFalseEasting no 0x0c0b ProjFalseNorthing no 0x0c0c ProjFalseOriginLong no 0x0c0d ProjFalseOriginLat no 0x0c0e ProjFalseOriginEasting no 0x0c0f ProjFalseOriginNorthing no 0x0c10 ProjCenterLong no 0x0c11 ProjCenterLat no 0x0c12 ProjCenterEasting no 0x0c13 ProjCenterNorthing no 0x0c14 ProjScaleAtNatOrigin no 0x0c15 ProjScaleAtCenter no 0x0c16 ProjAzimuthAngle no 0x0c17 ProjStraightVertPoleLong no 0x0c18 ProjRectifiedGridAngle no 0x1000 VerticalCSType no 0x1001 VerticalCitation no 0x1002 VerticalDatum no 0x1003 VerticalUnits no 0xb799 ChartFormat no 0xb79a ChartSource no 0xb79b ChartSourceEdition no 0xb79c ChartSourceDate no 0xb79d ChartCorrDate no 0xb79e ChartCountryOrigin no 0xb79f ChartRasterEdition no 0xb7a0 ChartSoundingDatum no 0xb7a1 ChartDepthUnits no 0xb7a2 ChartMagVar no 0xb7a3 ChartMagVarYear no 0xb7a4 ChartMagVarAnnChange no 0xb7a5 ChartWGSNSShift no 0xb7a7 InsetNWPixelX no 0xb7a8 InsetNWPixelY no 0xb7a9 ChartContourInterval no

PLUS Tags

PLUS XMP Tags

PLUS (Picture Licensing Universal System) License Data Format 2.0.1 XMP tags. Note that all controlled-vocabulary tags in this table (ie. tags with a fixed set of values) have raw values which begin with “http://ns.useplus.org/ldf/vocab/", but to reduce clutter this prefix has been removed from the values shown below, and from the values read and written with the -n option. See <http://ns.useplus.org/> for the complete specification.

These tags belong to the ExifTool XMP-plus family 1 group.

Tag Name Writable ——– ——– AdultContentWarning string CopyrightOwner CopyrightOwner Struct+ CopyrightOwnerID string_+ CopyrightOwnerName string_+ CopyrightOwnerImageID string CopyrightRegistrationNumber string CopyrightStatus string CreditLineRequired string Custom1 lang-alt+ Custom10 lang-alt+ Custom2 lang-alt+ Custom3 lang-alt+ Custom4 lang-alt+ Custom5 lang-alt+ Custom6 lang-alt+ Custom7 lang-alt+ Custom8 lang-alt+ Custom9 lang-alt+ DataMining string EndUser EndUser Struct+ EndUserID string_+ EndUserName string_+ FileNameAsDelivered string FirstPublicationDate date ImageAlterationConstraints string+ ImageCreator ImageCreator Struct+ ImageCreatorID string_+ ImageCreatorName string_+ ImageCreatorImageID string ImageDuplicationConstraints string ImageFileConstraints string+ ImageFileFormatAsDelivered string ImageFileSizeAsDelivered string ImageSupplier ImageSupplier Struct+ ImageSupplierImageID string ImageSupplierID string_+ ImageSupplierName string_+ ImageType string Licensee Licensee Struct+ LicenseeImageID string LicenseeImageNotes lang-alt LicenseeID string_+ LicenseeName string_+ LicenseEndDate date LicenseeProjectReference string+ LicenseeTransactionID string+ LicenseID string LicenseStartDate date LicenseTransactionDate date Licensor Licensor Struct+ LicensorImageID string LicensorCity string_+ LicensorCountry string_+ LicensorEmail string_+ LicensorExtendedAddress string_+ LicensorID string_+ LicensorName string_+ LicensorPostalCode string_+ LicensorRegion string_+ LicensorStreetAddress string_+ LicensorTelephone1 string_+ LicensorTelephone2 string_+ LicensorTelephoneType1 string_+ LicensorTelephoneType2 string_+ LicensorURL string_+ LicensorNotes lang-alt LicensorTransactionID string+ MediaConstraints lang-alt MediaSummaryCode string MinorModelAgeDisclosure string ModelReleaseID string+ ModelReleaseStatus string OtherConditions lang-alt OtherConstraints lang-alt OtherImageInfo lang-alt OtherLicenseDocuments string+ OtherLicenseInfo lang-alt OtherLicenseRequirements lang-alt ProductOrServiceConstraints lang-alt PropertyReleaseID string+ PropertyReleaseStatus string RegionConstraints lang-alt Reuse string TermsAndConditionsText lang-alt TermsAndConditionsURL string PLUSVersion string

XMP CopyrightOwner Struct

Field Name Writable ———- ——– CopyrightOwnerID string CopyrightOwnerName string

XMP EndUser Struct

Field Name Writable ———- ——– EndUserID string EndUserName string

XMP ImageCreator Struct

Field Name Writable ———- ——– ImageCreatorID string ImageCreatorName string

XMP ImageSupplier Struct

Field Name Writable ———- ——– ImageSupplierID string ImageSupplierName string

XMP Licensee Struct

Field Name Writable ———- ——– LicenseeID string LicenseeName string

XMP Licensor Struct

Field Name Writable ———- ——– LicensorCity string LicensorCountry string LicensorEmail string LicensorExtendedAddress string LicensorID string LicensorName string LicensorPostalCode string LicensorRegion string LicensorStreetAddress string LicensorTelephone1 string LicensorTelephone2 string LicensorTelephoneType1 string LicensorTelephoneType2 string LicensorURL string

Panasonic Tags

These tags are used in Panasonic/Leica cameras.

Tag ID Tag Name Writable —— ——– ——– 0x0001 ImageQuality int16u 0x0002 FirmwareVersion undef 0x0003 WhiteBalance int16u 0x0007 FocusMode int16u 0x000f AFAreaMode int8u[2] 0x001a ImageStabilization int16u 0x001c MacroMode int16u 0x001f ShootingMode int16u 0x0020 Audio int16u 0x0021 DataDump no 0x0023 WhiteBalanceBias int16s 0x0024 FlashBias int16s 0x0025 InternalSerialNumber undef[16] 0x0026 PanasonicExifVersion undef 0x0027 VideoFrameRate int16u 0x0028 ColorEffect int16u 0x0029 TimeSincePowerOn int32u 0x002a BurstMode int16u 0x002b SequenceNumber int32u 0x002c ContrastMode int16u 0x002d NoiseReduction int16u 0x002e SelfTimer int16u 0x0030 Rotation int16u 0x0031 AFAssistLamp int16u 0x0032 ColorMode int16u 0x0033 BabyAge string 0x0034 OpticalZoomMode int16u 0x0035 ConversionLens int16u 0x0036 TravelDay int16u 0x0038 BatteryLevel int16u 0x0039 Contrast int16u 0x003a WorldTimeLocation int16u 0x003b TextStamp int16u 0x003c ProgramISO int16u 0x003d AdvancedSceneType int16u 0x003e TextStamp int16u 0x003f FacesDetected int16u 0x0040 Saturation int16u 0x0041 Sharpness int16u 0x0042 FilmMode int16u 0x0043 JPEGQuality int16u 0x0044 ColorTempKelvin int16u 0x0045 BracketSettings int16u 0x0046 WBShiftAB int16u 0x0047 WBShiftGM int16u 0x0048 FlashCurtain int16u 0x0049 LongExposureNoiseReduction int16u 0x004b PanasonicImageWidth int32u 0x004c PanasonicImageHeight int32u 0x004d AFPointPosition rational64u[2] 0x004e FaceDetInfo Panasonic FaceDetInfo 0x0051 LensType string 0x0052 LensSerialNumber string 0x0053 AccessoryType string 0x0054 AccessorySerialNumber string 0x0059 Transform undef[4] 0x005d IntelligentExposure int16u 0x0060 LensFirmwareVersion undef[4] 0x0061 FaceRecInfo Panasonic FaceRecInfo 0x0062 FlashWarning int16u 0x0063 RecognizedFaceFlags? undef[4] 0x0065 Title undef 0x0066 BabyName undef 0x0067 Location undef 0x0069 Country undef 0x006b State undef 0x006d City undef 0x006f Landmark undef 0x0070 IntelligentResolution int8u 0x0076 MergedImages int16u 0x0077 BurstSpeed int16u 0x0079 IntelligentD-Range int16u 0x007c ClearRetouch int16u 0x0080 City2 undef 0x0086 ManometerPressure int16u 0x0089 PhotoStyle int16u 0x008a ShadingCompensation int16u 0x008b WBShiftIntelligentAuto int16u 0x008c AccelerometerZ int16u 0x008d AccelerometerX int16u 0x008e AccelerometerY int16u 0x008f CameraOrientation int8u 0x0090 RollAngle int16u 0x0091 PitchAngle int16u 0x0092 WBShiftCreativeControl int8u 0x0093 SweepPanoramaDirection int8u 0x0094 SweepPanoramaFieldOfView int16u 0x0096 TimerRecording int8u 0x009d InternalNDFilter rational64u 0x009e HDR int16u 0x009f ShutterType int16u 0x00a1 FilterEffect rational64u[0.5] 0x00a3 ClearRetouchValue rational64u 0x00a7 OutputLUT yes 0x00ab TouchAE int16u 0x00ac MonochromeFilterEffect int16u 0x00ad HighlightShadow int16u[2] 0x00af TimeStamp string 0x00b3 VideoBurstResolution int16u 0x00b4 MultiExposure int16u 0x00b9 RedEyeRemoval int16u 0x00bb VideoBurstMode int32u 0x00bc DiffractionCorrection int16u 0x00bd FocusBracket int16u 0x00be LongExposureNRUsed int16u 0x00bf PostFocusMerging int32u[2] 0x00c1 VideoPreburst int16u 0x00c4 LensTypeMake int16u 0x00c5 LensTypeModel int16u 0x00ca SensorType int16u 0x00d1 ISO int32u 0x00d2 MonochromeGrainEffect int16u 0x00d6 NoiseReductionStrength rational64s 0x00e4 LensTypeModel int16u 0x00e8 MinimumISO int32u 0x00ee DynamicRangeBoost int16u 0x0e00 PrintIM PrintIM 0x2003 TimeInfo Panasonic TimeInfo 0x8000 MakerNoteVersion undef 0x8001 SceneMode int16u 0x8002 HighlightWarning int16u 0x8003 DarkFocusEnvironment int16u 0x8004 WBRedLevel int16u 0x8005 WBGreenLevel int16u 0x8006 WBBlueLevel int16u 0x8008 TextStamp int16u 0x8009 TextStamp int16u 0x8010 BabyAge string 0x8012 Transform undef[4]

Panasonic DSA Tags

XMP Digital Shift Assistant tags written by some Leica cameras.

These tags belong to the ExifTool XMP-xmpDSA family 1 group.

Tag Name Writable ——– ——– ApplyAutomatically boolean/ CorrectionAlreadyApplied boolean/ FocalLength35mm real/ NormalizedCropCorners real/+ PitchAngle real/ RollAngle real/ ScalingFactorHeight real/ TargetAspectRatio real/ ValidCropCorners boolean/ Version string/

Panasonic FaceDetInfo Tags

Face detection position information.

Index2 Tag Name Writable —— ——– ——– 0 NumFacePositions int16u 1 Face1Position int16u[4] 5 Face2Position int16u[4] 9 Face3Position int16u[4] 13 Face4Position int16u[4] 17 Face5Position int16u[4]

Panasonic FaceRecInfo Tags

Tags written by cameras with facial recognition. These cameras not only detect faces in an image, but also recognize specific people based a user-supplied set of known faces.

Index1 Tag Name Writable —— ——– ——– 0 FacesRecognized int16u 4 RecognizedFace1Name string[20] 24 RecognizedFace1Position int16u[4] 32 RecognizedFace1Age string[20] 52 RecognizedFace2Name string[20] 72 RecognizedFace2Position int16u[4] 80 RecognizedFace2Age string[20] 100 RecognizedFace3Name string[20] 120 RecognizedFace3Position int16u[4] 128 RecognizedFace3Age string[20]

Panasonic TimeInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 PanasonicDateTime undef[8] 16 TimeLapseShotNumber int32u

Panasonic Leica2 Tags

These tags are used by the Leica M8.

Tag ID Tag Name Writable —— ——– ——– 0x0300 Quality int16u 0x0302 UserProfile int32u 0x0303 SerialNumber int32u 0x0304 WhiteBalance int16u 0x0310 LensType int32u 0x0311 ExternalSensorBrightnessValue rational64s 0x0312 MeasuredLV rational64s 0x0313 ApproximateFNumber rational64u 0x0320 CameraTemperature int32s 0x0321 ColorTemperature int32u 0x0322 WBRedLevel rational64u 0x0323 WBGreenLevel rational64u 0x0324 WBBlueLevel rational64u 0x0325 UV-IRFilterCorrection int32u 0x0330 CCDVersion int32u 0x0331 CCDBoardVersion int32u 0x0332 ControllerBoardVersion int32u 0x0333 M16CVersion int32u 0x0340 ImageIDNumber int32u

Panasonic Leica3 Tags

These tags are used by the Leica R8 and R9 digital backs.

Tag ID Tag Name Writable —— ——– ——– 0x000b SerialInfo Panasonic SerialInfo 0x000d WB_RGBLevels int16u[3]

Panasonic SerialInfo Tags

Index1 Tag Name Writable —— ——– ——– 4 SerialNumber no

Panasonic Leica4 Tags

This information is written by the M9.

Tag ID Tag Name Writable —— ——– ——– 0x3000 Subdir3000 Panasonic Subdir 0x3100 Subdir3100 Panasonic Subdir 0x3400 Subdir3400 Panasonic Subdir 0x3900 Subdir3900 Panasonic Subdir

Panasonic Subdir Tags

Tag ID Tag Name Writable —— ——– ——– 0x300a Contrast int32u 0x300b Sharpening int32u 0x300d Saturation int32u 0x3033 WhiteBalance int32u 0x3034 JPEGQuality int32u 0x3036 WB_RGBLevels rational64u[3] 0x3038 UserProfile string 0x303a JPEGSize int32u 0x3103 SerialNumber string 0x3109 FirmwareVersion string 0x312a BaseISO int32u 0x312b SensorWidth int32u 0x312c SensorHeight int32u 0x312d SensorBitDepth int32u 0x3402 CameraTemperature int32s 0x3405 LensType int32u 0x3406 ApproximateFNumber rational64u 0x3407 MeasuredLV int32s 0x3408 ExternalSensorBrightnessValue int32s 0x3901 Data1 Panasonic Data1 0x3902 Data2 Panasonic Data2

Panasonic Data1 Tags

Index1 Tag Name Writable —— ——– ——– 22 LensType int32u

Panasonic Data2 Tags

Index1 Tag Name Writable —— ——– ——– [no tags known]

Panasonic Leica5 Tags

This information is written by the X1, X2, X VARIO and T.

Tag ID Tag Name Writable —— ——– ——– 0x0303 LensType string 0x0305 SerialNumber int32u 0x0407 OriginalFileName string 0x0408 OriginalDirectory string 0x040a FocusInfo Panasonic FocusInfo 0x040d ExposureMode int8u[4] 0x0410 ShotInfo Panasonic ShotInfo 0x0412 FilmMode string 0x0413 WB_RGBLevels rational64u[3] 0x0500 InternalSerialNumber undef 0x05ff CameraIFD PanasonicRaw CameraIFD

Panasonic FocusInfo Tags

Index2 Tag Name Writable —— ——– ——– 0 FocusDistance int16u 1 FocalLength int16u

Panasonic ShotInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 FileIndex int16u

Panasonic Leica6 Tags

This information is written by the S2 and M (Typ 240), as a trailer in JPEG images.

Tag ID Tag Name Writable —— ——– ——– 0x0300 PreviewImage undef 0x0301 UnknownBlock? no 0x0303 LensType string 0x0304 FocusDistance int32u 0x0311 ExternalSensorBrightnessValue rational64s 0x0312 MeasuredLV rational64s 0x0320 FirmwareVersion int8u[4] 0x0321 LensSerialNumber int32u

Panasonic Leica9 Tags

This information is written by the Leica S (Typ 007) and M10 models.

Tag ID Tag Name Writable —— ——– ——– 0x0304 FocusDistance int32u 0x0311 ExternalSensorBrightnessValue rational64s 0x0312 MeasuredLV rational64s 0x034c UserProfile string 0x0359 ISOSelected int32s 0x035a FNumber int32s 0x035b CorrelatedColorTemp int16u 0x035c ColorTint int16s 0x035d WhitePoint rational64u[2] 0x0370 LensProfileName string

Panasonic Type2 Tags

This type of maker notes is used by models such as the NV-DS65, PV-D2002, PV-DC3000, PV-DV203, PV-DV401, PV-DV702, PV-L2001, PV-SD4090, PV-SD5000 and iPalm.

Index2 Tag Name Writable —— ——– ——– 0 MakerNoteType no 3 Gain no

Panasonic PANA Tags

Tags extracted from the PANA and LEIC user data found in MP4 videos from various Panasonic and Leica models.

Index1 Tag Name Writable —— ——– ——– 0 Make no 4 Model no 12 Model no 16 JPEG-likeData EXIF 22 Model no 52 Version1 no 62 Version2 no 80 MakerNoteLeica5 Panasonic Leica5 88 ThumbnailWidth no 90 ThumbnailHeight no 92 ThumbnailImage no 1334 ThumbnailWidth no 1338 ThumbnailHeight no 1342 ThumbnailLength no 1350 ThumbnailImage no 1358 ThumbnailWidth no 1362 ThumbnailHeight no 1366 ThumbnailLength no 1374 ThumbnailImage no 16488 ExifData EXIF 16512 ExifData EXIF 0x00200080 ExifData EXIF

Pentax Tags

These tags are used in Pentax/Asahi cameras.

Tag ID Tag Name Writable —— ——– ——– 0x0000 PentaxVersion int8u[4] 0x0001 PentaxModelType int16u 0x0002 PreviewImageSize int16u[2] 0x0003 PreviewImageLength int32u* 0x0004 PreviewImageStart int32u* 0x0005 PentaxModelID int32u 0x0006 Date undef[4] 0x0007 Time undef[3] 0x0008 Quality int16u 0x0009 PentaxImageSize int16u 0x000b PictureMode int16u[n] 0x000c FlashMode int16u[n] 0x000d FocusMode int16u 0x000e AFPointSelected int16u 0x000f AFPointsInFocus int32u AFPointsInFocus int16u 0x0010 FocusPosition int16u 0x0012 ExposureTime int32u 0x0013 FNumber int16u 0x0014 ISO int16u 0x0015 LightReading int16u 0x0016 ExposureCompensation int16u ExposureCompensation int16u[2] 0x0017 MeteringMode int16u 0x0018 AutoBracketing int16u[n] 0x0019 WhiteBalance int16u 0x001a WhiteBalanceMode int16u 0x001b BlueBalance int16u 0x001c RedBalance int16u 0x001d FocalLength int32u 0x001e DigitalZoom int16u 0x001f Saturation int16u[n] 0x0020 Contrast int16u[n] 0x0021 Sharpness int16u[n] 0x0022 WorldTimeLocation int16u 0x0023 HometownCity int16u 0x0024 DestinationCity int16u 0x0025 HometownDST int16u 0x0026 DestinationDST int16u 0x0027 DSPFirmwareVersion undef 0x0028 CPUFirmwareVersion undef 0x0029 FrameNumber int32u 0x002d EffectiveLV int16u EffectiveLV int32u 0x0032 ImageEditing undef[4] 0x0033 PictureMode int8u[3] 0x0034 DriveMode int8u[4] 0x0035 SensorSize int16u[2] 0x0037 ColorSpace int16u 0x0038 ImageAreaOffset int16u[2] 0x0039 RawImageSize int16u[2]~ 0x003c AFPointsInFocus no 0x003d DataScaling int16u 0x003e PreviewImageBorders int8u[4] 0x003f LensRec Pentax LensRec 0x0040 SensitivityAdjust int16u 0x0041 ImageEditCount int16u 0x0047 CameraTemperature int8s 0x0048 AELock int16u 0x0049 NoiseReduction int16u 0x004d FlashExposureComp int32s FlashExposureComp int8s[2] 0x004f ImageTone int16u 0x0050 ColorTemperature int16u 0x0053 ColorTempDaylight undef[4] 0x0054 ColorTempShade undef[4] 0x0055 ColorTempCloudy undef[4] 0x0056 ColorTempTungsten undef[4] 0x0057 ColorTempFluorescentD undef[4] 0x0058 ColorTempFluorescentN undef[4] 0x0059 ColorTempFluorescentW undef[4] 0x005a ColorTempFlash undef[4] 0x005c ShakeReductionInfo Pentax SRInfo Pentax SRInfo2 0x005d ShutterCount undef[4] 0x0060 FaceInfo Pentax FaceInfo 0x0062 RawDevelopmentProcess int16u 0x0067 Hue int16u 0x0068 AWBInfo Pentax AWBInfo 0x0069 DynamicRangeExpansion undef[4] 0x006b TimeInfo Pentax TimeInfo 0x006c HighLowKeyAdj int16s[2] 0x006d ContrastHighlight int16s[2] 0x006e ContrastShadow int16s[2] 0x006f ContrastHighlightShadowAdj int8u 0x0070 FineSharpness int8u[n] 0x0071 HighISONoiseReduction int8u 0x0072 AFAdjustment int16s 0x0073 MonochromeFilterEffect int16u 0x0074 MonochromeToning int16u 0x0076 FaceDetect int8u[2] 0x0077 FaceDetectFrameSize int16u[2] 0x0079 ShadowCorrection int8u[n] 0x007a ISOAutoMinSpeed int8u[2] 0x007b CrossProcess int8u 0x007d LensCorr Pentax LensCorr 0x007e WhiteLevel int32u 0x007f BleachBypassToning int16u 0x0080 AspectRatio yes 0x0082 BlurControl int8u[4] 0x0085 HDR int8u[4] 0x0087 ShutterType int8u 0x0088 NeutralDensityFilter int8u[n] 0x008b ISO int32u 0x0092 IntervalShooting int16u[2] 0x0095 SkinToneCorrection int8s[2] SkinToneCorrection int8s[3] 0x0096 ClarityControl int8s[2] 0x0200 BlackPoint int16u[4] 0x0201 WhitePoint int16u[4] 0x0203 ColorMatrixA int16s[9] 0x0204 ColorMatrixB int16s[9] 0x0205 CameraSettings Pentax CameraSettings CameraSettingsUnknown Pentax CameraSettingsUnknown 0x0206 AEInfo Pentax AEInfo AEInfo2 Pentax AEInfo2 AEInfo3 Pentax AEInfo3 AEInfoUnknown Pentax AEInfoUnknown 0x0207 LensInfo Pentax LensInfo Pentax LensInfo2 Pentax LensInfo3 Pentax LensInfo4 Pentax LensInfo5 0x0208 FlashInfo Pentax FlashInfo FlashInfoUnknown Pentax FlashInfoUnknown 0x0209 AEMeteringSegments int8u[n] 0x020a FlashMeteringSegments int8u[n] 0x020b SlaveFlashMeteringSegments int8u[n] 0x020d WB_RGGBLevelsDaylight int16u[4] 0x020e WB_RGGBLevelsShade int16u[4] 0x020f WB_RGGBLevelsCloudy int16u[4] 0x0210 WB_RGGBLevelsTungsten int16u[4] 0x0211 WB_RGGBLevelsFluorescentD int16u[4] 0x0212 WB_RGGBLevelsFluorescentN int16u[4] 0x0213 WB_RGGBLevelsFluorescentW int16u[4] 0x0214 WB_RGGBLevelsFlash int16u[4] 0x0215 CameraInfo Pentax CameraInfo 0x0216 BatteryInfo Pentax BatteryInfo 0x021b SaturationInfo? no 0x021c ColorMatrixA2 undef[18] 0x021d ColorMatrixB2 undef[18] 0x021f AFInfo Pentax AFInfo 0x0220 HuffmanTable? no 0x0221 KelvinWB Pentax KelvinWB 0x0222 ColorInfo Pentax ColorInfo 0x0224 EVStepInfo Pentax EVStepInfo 0x0226 ShotInfo Pentax ShotInfo 0x0227 FacePos Pentax FacePos 0x0228 FaceSize Pentax FaceSize 0x0229 SerialNumber string 0x022a FilterInfo Pentax FilterInfo Pentax FilterInfo 0x022b LevelInfo Pentax LevelInfo 0x022d WBLevels Pentax WBLevels 0x022e Artist string 0x022f Copyright string 0x0230 FirmwareVersion string 0x0231 ContrastDetectAFArea int16u[4] 0x0235 CrossProcessParams undef[10] 0x0239 LensInfoQ Pentax LensInfoQ 0x023f Model string 0x0243 PixelShiftInfo Pentax PixelShiftInfo 0x0245 AFPointInfo Pentax AFPointInfo 0x03fe DataDump no 0x03ff TempInfo Pentax TempInfo UnknownInfo Pentax UnknownInfo 0x0402 ToneCurve yes~ 0x0403 ToneCurves yes~ 0x0405 UnknownBlock? undef 0x0e00 PrintIM PrintIM

Pentax LensRec Tags

This record stores the LensType, plus one or two unknown bytes for some models.

Index1 Tag Name Writable —— ——– ——– 0 LensType int8u[2] 3 ExtenderStatus int8u

Pentax SRInfo Tags

Shake reduction information.

Index1 Tag Name Writable —— ——– ——– 0 SRResult int8u 1 ShakeReduction int8u 2 SRHalfPressTime int8u 3 SRFocalLength int8u

Pentax SRInfo2 Tags

Shake reduction information for the K-3.

Index1 Tag Name Writable —— ——– ——– 0 SRResult? int8u 1 ShakeReduction int8u

Pentax FaceInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 FacesDetected int8u 2 FacePosition int8u[2]

Pentax AWBInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 WhiteBalanceAutoAdjustment int8u 1 TungstenAWB int8u

Pentax TimeInfo Tags

Index1 Tag Name Writable —— ——– ——– 0.1 WorldTimeLocation int8u & 0x01 0.2 HometownDST int8u & 0x02 0.3 DestinationDST int8u & 0x04 2 HometownCity int8u 3 DestinationCity int8u

Pentax LensCorr Tags

Index1 Tag Name Writable —— ——– ——– 0 DistortionCorrection int8u 1 ChromaticAberrationCorrection int8u 2 PeripheralIlluminationCorr int8u 3 DiffractionCorrection int8u

Pentax CameraSettings Tags

Camera settings information written by Pentax DSLR cameras.

Index1 Tag Name Writable —— ——– ——– 0 PictureMode2 int8u 1.1 ProgramLine int8u & 0x03 1.2 EVSteps int8u & 0x20 1.3 E-DialInProgram int8u & 0x40 1.4 ApertureRingUse int8u & 0x80 2 FlashOptions int8u & 0xf0 2.1 MeteringMode2 int8u & 0x0f 3 AFPointMode int8u & 0xf0 3.1 FocusMode2 int8u & 0x0f 4 AFPointSelected2 int16u 6 ISOFloor int8u 7 DriveMode2 int8u 8 ExposureBracketStepSize int8u 9 BracketShotNumber int8u 10 WhiteBalanceSet int8u & 0xf0 10.1 MultipleExposureSet int8u & 0x0f 13 RawAndJpgRecording int8u 14.1 JpgRecordedPixels int8u & 0x03 14.2 LinkAEToAFPoint int8u & 0x01 14.3 SensitivitySteps int8u & 0x02 14.4 ISOAuto int8u & 0x04 16 FlashOptions2 int8u & 0xf0 16.1 MeteringMode3 int8u & 0x0f 17.1 SRActive int8u & 0x80 17.2 Rotation int8u & 0x60 17.3 ISOSetting int8u & 0x04 17.4 SensitivitySteps int8u & 0x02 18 TvExposureTimeSetting int8u 19 AvApertureSetting int8u 20 SvISOSetting int8u 21 BaseExposureCompensation int8u

Pentax CameraSettingsUnknown Tags

This information has not yet been decoded for models such as the K-01.

Index1 Tag Name Writable —— ——– ——– [no tags known]

Pentax AEInfo Tags

Auto-exposure information for most Pentax models.

Index1 Tag Name Writable —— ——– ——– 0 AEExposureTime int8u 1 AEAperture int8u 2 AE_ISO int8u 3 AEXv int8u 4 AEBXv int8s 5 AEMinExposureTime int8u 6 AEProgramMode int8u 7 AEFlags no 8 AEApertureSteps int8u 9 AEMaxAperture int8u 10 AEMaxAperture2 int8u 11 AEMinAperture int8u 12 AEMeteringMode int8u 13 AEWhiteBalance int8u & 0xf0 13.1 AEMeteringMode2 int8u & 0x0f 14 FlashExposureCompSet int8s 21 LevelIndicator int8u

Pentax AEInfo2 Tags

Auto-exposure information for the K-01.

Index1 Tag Name Writable —— ——– ——– 2 AEExposureTime int8u 3 AEAperture int8u 4 AE_ISO int8u 5 AEXv int8u 6 AEBXv int8s 8 AEError int8s 11 AEApertureSteps int8u 15 SceneMode int8u 16 AEMaxAperture int8u 17 AEMaxAperture2 int8u 18 AEMinAperture int8u 19 AEMinExposureTime int8u

Pentax AEInfo3 Tags

Auto-exposure information for the K-3, K-30, K-50 and K-500.

Index1 Tag Name Writable —— ——– ——– 16 AEExposureTime int8u 17 AEAperture int8u 18 AE_ISO int8u 28 AEMaxAperture int8u 29 AEMaxAperture2 int8u 30 AEMinAperture int8u 31 AEMinExposureTime int8u

Pentax AEInfoUnknown Tags

Index1 Tag Name Writable —— ——– ——– [no tags known]

Pentax LensInfo Tags

Pentax lens information structure for models such as the *istD.

Index1 Tag Name Writable —— ——– ——– 0 LensType int8u[2] 3 LensData Pentax LensData

Pentax LensInfo2 Tags

Pentax lens information structure for models such as the K10D and K20D.

Index1 Tag Name Writable —— ——– ——– 0 LensType int8u[4] 4 LensData Pentax LensData

Pentax LensData Tags

Pentax lens data information. Some of these tags require interesting binary gymnastics to decode them into useful values.

Index1 Tag Name Writable —— ——– ——– 0.1 AutoAperture int8u & 0x01 0.2 MinAperture int8u & 0x06 0.3 LensFStops int8u & 0x70 1 LensKind? int8u 2 LC1? int8u 3 MinFocusDistance int8u & 0xf8 3.1 FocusRangeIndex int8u & 0x07 4 LC3? int8u 5 LC4? int8u 6 LC5? int8u 7 LC6? int8u 8 LC7? int8u 9 LensFocalLength int8u LC8? int8u 10 NominalMaxAperture int8u & 0xf0 10.1 NominalMinAperture int8u & 0x0f 11 LC10? int8u 12 LC11? int8u 13 LC12? int8u 14.1 MaxAperture int8u & 0x7f 15 LC14? int8u 16 LC15? int8u

Pentax LensInfo3 Tags

Pentax lens information structure for 645D.

Index1 Tag Name Writable —— ——– ——– 1 LensType int8u[4] 13 LensData Pentax LensData

Pentax LensInfo4 Tags

Pentax lens information structure for models such as the K-5 and K-r.

Index1 Tag Name Writable —— ——– ——– 1 LensType int8u[4] 12 LensData Pentax LensData

Pentax LensInfo5 Tags

Pentax lens information structure for the K-01 and newer models.

Index1 Tag Name Writable —— ——– ——– 1 LensType int8u[5] 15 LensData Pentax LensData

Pentax FlashInfo Tags

Flash information tags for the K10D, K20D and K200D.

Index1 Tag Name Writable —— ——– ——– 0 FlashStatus int8u 1 InternalFlashMode int8u 2 ExternalFlashMode int8u 3 InternalFlashStrength int8u 4 TTL_DA_AUp int8u 5 TTL_DA_ADown int8u 6 TTL_DA_BUp int8u 7 TTL_DA_BDown int8u 24.1 ExternalFlashGuideNumber int8u & 0x1f 25 ExternalFlashExposureComp int8u 26 ExternalFlashBounce int8u

Pentax FlashInfoUnknown Tags

Index1 Tag Name Writable —— ——– ——– [no tags known]

Pentax CameraInfo Tags

Index4 Tag Name Writable —— ——– ——– 0 PentaxModelID int32u 1 ManufactureDate int32u 2 ProductionCode int32u[2] 4 InternalSerialNumber int32u

Pentax BatteryInfo Tags

Index1 Tag Name Writable —— ——– ——– 0.1 PowerSource int8u & 0x0f 1.1 BodyBatteryState int8u & 0xf0 1.2 GripBatteryState int8u & 0x0f GripBatteryState? int8u & 0x0f 2 BodyBatteryADNoLoad int8u BodyBatteryVoltage1 int16u 3 BodyBatteryADLoad int8u 4 GripBatteryADNoLoad int8u BodyBatteryVoltage2 int16u 5 GripBatteryADLoad int8u 6 BodyBatteryVoltage3 int16u 8 BodyBatteryVoltage4 int16u

Pentax AFInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 AFPointsUnknown1? int16u 2 AFPointsUnknown2? int16u 4 AFPredictor int16s 6 AFDefocus int8u 7 AFIntegrationTime int8u 11 AFPointsInFocus int8u 509 AFHold int8u

Pentax KelvinWB Tags

White balance Blue/Red gains as a function of color temperature.

Index2 Tag Name Writable —— ——– ——– 1 KelvinWB_Daylight int16u[4] 5 KelvinWB_01 int16u[4] 9 KelvinWB_02 int16u[4] 13 KelvinWB_03 int16u[4] 17 KelvinWB_04 int16u[4] 21 KelvinWB_05 int16u[4] 25 KelvinWB_06 int16u[4] 29 KelvinWB_07 int16u[4] 33 KelvinWB_08 int16u[4] 37 KelvinWB_09 int16u[4] 41 KelvinWB_10 int16u[4] 45 KelvinWB_11 int16u[4] 49 KelvinWB_12 int16u[4] 53 KelvinWB_13 int16u[4] 57 KelvinWB_14 int16u[4] 61 KelvinWB_15 int16u[4] 65 KelvinWB_16 int16u[4]

Pentax ColorInfo Tags

Index1 Tag Name Writable —— ——– ——– 16 WBShiftAB int8s 17 WBShiftGM int8s

Pentax EVStepInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 EVSteps int8u 1 SensitivitySteps int8u

Pentax ShotInfo Tags

Index1 Tag Name Writable —— ——– ——– 1 CameraOrientation int8u

Pentax FacePos Tags

Index2 Tag Name Writable —— ——– ——– 0 Face1Position int16u[2] 2 Face2Position int16u[2] 4 Face3Position int16u[2] 6 Face4Position int16u[2] 8 Face5Position int16u[2] 10 Face6Position int16u[2] 12 Face7Position int16u[2] 14 Face8Position int16u[2] 16 Face9Position int16u[2] 18 Face10Position int16u[2] 20 Face11Position int16u[2] 22 Face12Position int16u[2] 24 Face13Position int16u[2] 26 Face14Position int16u[2] 28 Face15Position int16u[2] 30 Face16Position int16u[2] 32 Face17Position int16u[2] 34 Face18Position int16u[2] 36 Face19Position int16u[2] 38 Face20Position int16u[2] 40 Face21Position int16u[2] 42 Face22Position int16u[2] 44 Face23Position int16u[2] 46 Face24Position int16u[2] 48 Face25Position int16u[2] 50 Face26Position int16u[2] 52 Face27Position int16u[2] 54 Face28Position int16u[2] 56 Face29Position int16u[2] 58 Face30Position int16u[2] 60 Face31Position int16u[2] 62 Face32Position int16u[2]

Pentax FaceSize Tags

Index2 Tag Name Writable —— ——– ——– 0 Face1Size int16u[2] 2 Face2Size int16u[2] 4 Face3Size int16u[2] 6 Face4Size int16u[2] 8 Face5Size int16u[2] 10 Face6Size int16u[2] 12 Face7Size int16u[2] 14 Face8Size int16u[2] 16 Face9Size int16u[2] 18 Face10Size int16u[2] 20 Face11Size int16u[2] 22 Face12Size int16u[2] 24 Face13Size int16u[2] 26 Face14Size int16u[2] 28 Face15Size int16u[2] 30 Face16Size int16u[2] 32 Face17Size int16u[2] 34 Face18Size int16u[2] 36 Face19Size int16u[2] 38 Face20Size int16u[2] 40 Face21Size int16u[2] 42 Face22Size int16u[2] 44 Face23Size int16u[2] 46 Face24Size int16u[2] 48 Face25Size int16u[2] 50 Face26Size int16u[2] 52 Face27Size int16u[2] 54 Face28Size int16u[2] 56 Face29Size int16u[2] 58 Face30Size int16u[2] 60 Face31Size int16u[2] 62 Face32Size int16u[2]

Pentax FilterInfo Tags

The parameters associated with each type of digital filter are unique, and these settings are also extracted with the DigitalFilter tag. Information is not extracted for filters that are “Off” unless the Unknown option is used.

Index1 Tag Name Writable —— ——– ——– 0 SourceDirectoryIndex int16u 2 SourceFileIndex int16u 5 DigitalFilter01 undef[17] 22 DigitalFilter02 undef[17] 39 DigitalFilter03 undef[17] 56 DigitalFilter04 undef[17] 73 DigitalFilter05 undef[17] 90 DigitalFilter06 undef[17] 107 DigitalFilter07 undef[17] 124 DigitalFilter08 undef[17] 141 DigitalFilter09 undef[17] 158 DigitalFilter10 undef[17] 175 DigitalFilter11 undef[17] 192 DigitalFilter12 undef[17] 209 DigitalFilter13 undef[17] 226 DigitalFilter14 undef[17] 243 DigitalFilter15 undef[17] 260 DigitalFilter16 undef[17] 277 DigitalFilter17 undef[17] 294 DigitalFilter18 undef[17] 311 DigitalFilter19 undef[17] 328 DigitalFilter20 undef[17]

Pentax LevelInfo Tags

Tags decoded from the electronic level information for the K-5. May not be valid for other models.

Index1 Tag Name Writable —— ——– ——– 0 LevelOrientation int8s & 0x0f 0.1 CompositionAdjust int8s & 0xf0 1 RollAngle int8s 2 PitchAngle int8s 5 CompositionAdjustX int8s 6 CompositionAdjustY int8s 7 CompositionAdjustRotation int8s

Pentax WBLevels Tags

Index1 Tag Name Writable —— ——– ——– 2 WB_RGGBLevelsDaylight int16u[4] 11 WB_RGGBLevelsShade int16u[4] 20 WB_RGGBLevelsCloudy int16u[4] 29 WB_RGGBLevelsTungsten int16u[4] 38 WB_RGGBLevelsFluorescentD int16u[4] 47 WB_RGGBLevelsFluorescentN int16u[4] 56 WB_RGGBLevelsFluorescentW int16u[4] 65 WB_RGGBLevelsFlash int16u[4] 74 WB_RGGBLevelsFluorescentL int16u[4] 83 WB_RGGBLevelsUnknown? int16u[4] 92 WB_RGGBLevelsUserSelected int16u[4]

Pentax LensInfoQ Tags

More lens information stored by the Pentax Q.

Index1 Tag Name Writable —— ——– ——– 12 LensModel string[30] 42 LensInfo string[20]

Pentax PixelShiftInfo Tags

Pixel shift information stored by the K-3 II.

Index1 Tag Name Writable —— ——– ——– 0 PixelShiftResolution int8u

Pentax AFPointInfo Tags

AF point information written by the K-1.

Index1 Tag Name Writable —— ——– ——– 2 NumAFPoints int16u 4 AFPointsInFocus int8u[9]~ 4.1 AFPointsSelected int8u[9]~ 4.2 AFPointsSpecial int8u[9]~

Pentax TempInfo Tags

A number of additional temperature readings are extracted from this 256-byte binary-data block in images from models such as the K-01, K-3, K-5, K-50 and K-500. It is currently not known where the corresponding temperature sensors are located in the camera.

Index1 Tag Name Writable —— ——– ——– 12 SensorTemperature int16s 14 SensorTemperature2 int16s 20 CameraTemperature4 int16s 22 CameraTemperature5 int16s

Pentax UnknownInfo Tags

Index1 Tag Name Writable —— ——– ——– [no tags known]

Pentax Type2 Tags

These tags are used by the Pentax Optio 330 and 430, and are similar to the tags used by Casio.

Tag ID Tag Name Writable —— ——– ——– 0x0001 RecordingMode int16u 0x0002 Quality int16u 0x0003 FocusMode int16u 0x0004 FlashMode int16u 0x0007 WhiteBalance int16u 0x000a DigitalZoom int32u 0x000b Sharpness int16u 0x000c Contrast int16u 0x000d Saturation int16u 0x0014 ISO int16u 0x0017 ColorFilter int16u 0x0e00 PrintIM PrintIM 0x1000 HometownCityCode undef[4] 0x1001 DestinationCityCode undef[4]

Pentax Type4 Tags

The following few tags are extracted from the wealth of information available in maker notes of the Optio E20 and E25. These maker notes are stored as ASCII text in a format very similar to some HP models.

Tag ID Tag Name Writable —— ——– ——– F/W Version FirmwareVersion no

Pentax S1 Tags

Tags extracted from the maker notes of AVI videos from the Optio S1.

Tag ID Tag Name Writable —— ——– ——– 0x0000 MakerNoteVersion no

Pentax Junk Tags

Tags found in the JUNK chunk of AVI videos from the RS1000.

Index1 Tag Name Writable —— ——– ——– 12 Model no

Pentax Junk2 Tags

This information is found in AVI videos from the Optio RZ18.

Index1 Tag Name Writable —— ——– ——– 18 Make no 44 Model no 94 FNumber no 131 DateTime1 no 157 DateTime2 no 299 ThumbnailWidth no 301 ThumbnailHeight no 303 ThumbnailLength no 307 ThumbnailImage no

Pentax AVI Tags

Pentax-specific RIFF tags found in AVI videos.

Tag ID Tag Name Writable —— ——– ——– hymn MakerNotes Pentax mknt MakerNotes Pentax

Pentax PENT Tags

Tags found in the PENT atom of MOV videos from the Optio WG-2 GPS.

Index1 Tag Name Writable —— ——– ——– 0 Make no 26 Model no 56 ExposureTime no 60 FNumber no 68 ExposureCompensation no 84 FocalLength no 113 DateTime1 no 139 DateTime2 no 167 ISO no 199 GPSVersionID no 207 GPSLatitudeRef no 209 GPSLatitude no 233 GPSLongitudeRef no 235 GPSLongitude no 259 GPSAltitudeRef no 260 GPSAltitude no 284 GPSTimeStamp no 308 GPSSatellites no 311 GPSStatus no 313 GPSMeasureMode no 315 GPSMapDatum no 322 GPSDateStamp no 371 AudioCodecID no 2003 PreviewImage no

Pentax PXTH Tags

Tags found in the PXTH atom of MOV videos from the K-01.

Index1 Tag Name Writable —— ——– ——– 0 PreviewImageLength no 4 PreviewImage no

Pentax MOV Tags

This information is found in MOV videos from cameras such as the Optio WP.

Index1 Tag Name Writable —— ——– ——– 0 Make no 38 ExposureTime no 42 FNumber no 50 ExposureCompensation no 68 WhiteBalance no 72 FocalLength no 175 ISO no

ICC_Profile Tags

ICC profile information is used in many different file types including JPEG, TIFF, PDF, PostScript, Photoshop, PNG, MIFF, PICT, QuickTime, XCF and some RAW formats. While the tags listed below are not individually writable, the entire profile itself can be accessed via the extra ‘ICC_Profile’ tag, but this tag is neither extracted nor written unless specified explicitly. See <http://www.color.org/icc_specs2.xalter> for the official ICC specification.

Tag ID Tag Name Writable —— ——– ——– A2B0 AToB0 no A2B1 AToB1 no A2B2 AToB2 no A2B3 AToB3 no A2M0 AToM0 no B2A0 BToA0 no B2A1 BToA1 no B2A2 BToA2 no B2A3 BToA3 no B2D0 BToD0 no B2D1 BToD1 no B2D2 BToD2 no B2D3 BToD3 no CxF CXF no D2B0 DToB0 no D2B1 DToB1 no D2B2 DToB2 no D2B3 DToB3 no Header ProfileHeader ICC_Profile Header M2A0 MToA0 no M2B0 MToB0 no M2B1 MToB1 no M2B2 MToB2 no M2B3 MToB3 no M2S0 MToS0 no M2S1 MToS1 no M2S2 MToS2 no M2S3 MToS3 no MS00 WCSProfiles no bAB0 BRDFAToB0 no bAB1 BRDFAToB1 no bAB2 BRDFAToB2 no bAB3 BRDFAToB3 no bBA0 BRDFBToA0 no bBA1 BRDFBToA1 no bBA2 BRDFBToA2 no bBA3 BRDFBToA3 no bBD0 BRDFBToD0 no bBD1 BRDFBToD1 no bBD2 BRDFBToD2 no bBD3 BRDFBToD3 no bDB0 BRDFDToB0 no bDB1 BRDFDToB1 no bDB2 BRDFDToB2 no bDB3 BRDFDToB3 no bMB0 BRDFMToB0 no bMB1 BRDFMToB1 no bMB2 BRDFMToB2 no bMB3 BRDFMToB3 no bMS0 BRDFMToS0 no bMS1 BRDFMToS1 no bMS2 BRDFMToS2 no bMS3 BRDFMToS3 no bTRC BlueTRC no bXYZ BlueMatrixColumn no bcp0 BRDFColorimetricParam0 no bcp1 BRDFColorimetricParam1 no bcp2 BRDFColorimetricParam2 no bcp3 BRDFColorimetricParam3 no bfd UCRBG no bkpt MediaBlackPoint no bsp0 BRDFSpectralParam0 no bsp1 BRDFSpectralParam1 no bsp2 BRDFSpectralParam2 no bsp3 BRDFSpectralParam3 no c2sp CustomToStandardPcc no calt CalibrationDateTime no cept ColorEncodingParams no chad ChromaticAdaptation no chrm Chromaticity ICC_Profile Chromaticity ciis ColorimetricIntentImageState no clio ColorantInfoOut no cloo ColorantOrderOut no clot ColorantTableOut no clro ColorantOrder no clrt ColorantTable ICC_Profile ColorantTable cprt ProfileCopyright no crdi CRDInfo no csnm ColorSpaceName no dAB0 DirectionalAToB0 no dAB1 DirectionalAToB1 no dAB2 DirectionalAToB2 no dAB3 DirectionalAToB3 no dBA0 DirectionalBToA0 no dBA1 DirectionalBToA1 no dBA2 DirectionalBToA2 no dBA3 DirectionalBToA3 no dBD0 DirectionalBToD0 no dBD1 DirectionalBToD1 no dBD2 DirectionalBToD2 no dBD3 DirectionalBToD3 no dDB0 DirectionalDToB0 no dDB1 DirectionalDToB1 no dDB2 DirectionalDToB2 no dDB3 DirectionalDToB3 no desc ProfileDescription no devs DeviceSettings no dmdd DeviceModelDesc no dmnd DeviceMfgDesc no dscm ProfileDescriptionML no fpce FocalPlaneColorimetryEstimates no gTRC GreenTRC no gXYZ GreenMatrixColumn no gamt Gamut no gdb0 GamutBoundaryDescription0 no gdb1 GamutBoundaryDescription1 no gdb2 GamutBoundaryDescription2 no gdb3 GamutBoundaryDescription3 no kTRC GrayTRC no lumi Luminance no mcta MultiplexTypeArray no mdv MultiplexDefaultValues no meas Measurement ICC_Profile Measurement meta Metadata ICC_Profile Metadata miin MeasurementInputInfo no minf MeasurementInfo no mmod MakeAndModel no ncl2 NamedColor2 no ncol NamedColor no ndin NativeDisplayInfo no nmcl NamedColor no pre0 Preview0 no pre1 Preview1 no pre2 Preview2 no ps2i PS2RenderingIntent no ps2s PostScript2CSA no psd0 PostScript2CRD0 no psd1 PostScript2CRD1 no psd2 PostScript2CRD2 no psd3 PostScript2CRD3 no pseq ProfileSequenceDesc no psid ProfileSequenceIdentifier no psin ProfileSequenceInfo no psvm PS2CRDVMSize no rTRC RedTRC no rXYZ RedMatrixColumn no resp OutputResponse no rfnm ReferenceName no rhoc ReflectionHardcopyOrigColorimetry no rig0 PerceptualRenderingIntentGamut no rig2 SaturationRenderingIntentGamut no rpoc ReflectionPrintOutputColorimetry no s2cp StandardToCustomPcc no sape SceneAppearanceEstimates no scoe SceneColorimetryEstimates no scrd ScreeningDesc no scrn Screening no smap SurfaceMap no svcn SpectralViewingConditions no swpt SpectralWhitePoint no targ CharTarget no tech Technology no vcgt VideoCardGamma no view ViewingConditions ICC_Profile ViewingConditions vued ViewingCondDesc no wtpt MediaWhitePoint no

ICC_Profile Header Tags

Index1 Tag Name Writable —— ——– ——– 4 ProfileCMMType no 8 ProfileVersion no 12 ProfileClass no 16 ColorSpaceData no 20 ProfileConnectionSpace no 24 ProfileDateTime no 36 ProfileFileSignature no 40 PrimaryPlatform no 44 CMMFlags no 48 DeviceManufacturer no 52 DeviceModel no 56 DeviceAttributes no 64 RenderingIntent no 68 ConnectionSpaceIlluminant no 80 ProfileCreator no 84 ProfileID no

ICC_Profile Chromaticity Tags

Index1 Tag Name Writable —— ——– ——– 8 ChromaticityChannels no 10 ChromaticityColorant no 12 ChromaticityChannel1 no 20 ChromaticityChannel2 no 28 ChromaticityChannel3 no 36 ChromaticityChannel4 no

ICC_Profile ColorantTable Tags

Index1 Tag Name Writable —— ——– ——– 8 ColorantCount no 12 Colorant1Name no 44 Colorant1Coordinates no 50 Colorant2Name no 82 Colorant2Coordinates no 88 Colorant3Name no 120 Colorant3Coordinates no

ICC_Profile Measurement Tags

Index1 Tag Name Writable —— ——– ——– 8 MeasurementObserver no 12 MeasurementBacking no 24 MeasurementGeometry no 28 MeasurementFlare no 32 MeasurementIlluminant no

ICC_Profile Metadata Tags

Only these few tags have been pre-defined, but ExifTool will extract any Metadata tags that exist.

Tag Name Writable ——– ——– CreatorApp no ManufacturerName no MediaColor no MediaWeight no

ICC_Profile ViewingConditions Tags

Index1 Tag Name Writable —— ——– ——– 8 ViewingCondIlluminant no 20 ViewingCondSurround no 32 ViewingCondIlluminantType no

PrintIM Tags

The format of the PrintIM information is known, however no PrintIM tags have been decoded. Use the Unknown (-u) option to extract PrintIM information.

Tag ID Tag Name Writable —— ——– ——– PrintIMVersion PrintIMVersion no

Photoshop Tags

Photoshop tags are found in PSD and PSB files, as well as inside embedded Photoshop information in many other file types (JPEG, TIFF, PDF, PNG to name a few).

Many Photoshop tags are marked as Unknown (indicated by a question mark after the tag name) because the information they provide is not very useful under normal circumstances. These unknown tags are not extracted unless the Unknown (-u) option is used. See <http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/> for the official specification

Photoshop path tags (Tag ID’s 0x7d0 to 0xbb5) are not defined by default, but a config file included in the full ExifTool distribution (config_files/photoshop_paths.config) contains the tag definitions to allow access to this information.

Tag ID Tag Name Writable —— ——– ——– 0x03e8 Photoshop2Info? no 0x03e9 MacintoshPrintInfo? no 0x03ea XMLData? no 0x03eb Photoshop2ColorTable? no 0x03ed ResolutionInfo Photoshop Resolution 0x03ee AlphaChannelsNames no 0x03ef DisplayInfo? no 0x03f0 PStringCaption? no 0x03f1 BorderInformation? no 0x03f2 BackgroundColor? no 0x03f3 PrintFlags? no 0x03f4 BW_HalftoningInfo? no 0x03f5 ColorHalftoningInfo? no 0x03f6 DuotoneHalftoningInfo? no 0x03f7 BW_TransferFunc? no 0x03f8 ColorTransferFuncs? no 0x03f9 DuotoneTransferFuncs? no 0x03fa DuotoneImageInfo? no 0x03fb EffectiveBW? no 0x03fc ObsoletePhotoshopTag1? no 0x03fd EPSOptions? no 0x03fe QuickMaskInfo? no 0x03ff ObsoletePhotoshopTag2? no 0x0400 TargetLayerID? no 0x0401 WorkingPath? no 0x0402 LayersGroupInfo? no 0x0403 ObsoletePhotoshopTag3? no 0x0404 IPTCData IPTC 0x0405 RawImageMode? no 0x0406 JPEG_Quality Photoshop JPEG_Quality 0x0408 GridGuidesInfo? no 0x0409 PhotoshopBGRThumbnail undef! 0x040a CopyrightFlag int8u 0x040b URL string 0x040c PhotoshopThumbnail undef! 0x040d GlobalAngle int32u 0x040e ColorSamplersResource? no 0x040f ICC_Profile ICC_Profile 0x0410 Watermark? no 0x0411 ICC_Untagged? no 0x0412 EffectsVisible? no 0x0413 SpotHalftone? no 0x0414 IDsBaseValue? no 0x0415 UnicodeAlphaNames? no 0x0416 IndexedColorTableCount? no 0x0417 TransparentIndex? no 0x0419 GlobalAltitude int32u 0x041a SliceInfo Photoshop SliceInfo 0x041b WorkflowURL no 0x041c JumpToXPEP? no 0x041d AlphaIdentifiers? no 0x041e URL_List no+ 0x0421 VersionInfo Photoshop VersionInfo 0x0422 EXIFInfo EXIF 0x0423 ExifInfo2? no 0x0424 XMP XMP 0x0425 IPTCDigest string! 0x0426 PrintScaleInfo Photoshop PrintScaleInfo 0x0428 PixelInfo Photoshop PixelInfo 0x0429 LayerComps? no 0x042a AlternateDuotoneColors? no 0x042b AlternateSpotColors? no 0x042d LayerSelectionIDs? no 0x042e HDRToningInfo? no 0x042f PrintInfo? no 0x0430 LayerGroupsEnabledID? no 0x0431 ColorSamplersResource2? no 0x0432 MeasurementScale? no 0x0433 TimelineInfo? no 0x0434 SheetDisclosure? no 0x0435 DisplayInfo? no 0x0436 OnionSkins? no 0x0438 CountInfo? no 0x043a PrintInfo2? no 0x043b PrintStyle? no 0x043c MacintoshNSPrintInfo? no 0x043d WindowsDEVMODE? no 0x043e AutoSaveFilePath? no 0x043f AutoSaveFormat? no 0x0440 PathSelectionState? no 0x0bb7 ClippingPathName no 0x0bb8 OriginPathInfo? no 0x1b58 ImageReadyVariables? no 0x1b59 ImageReadyDataSets? no 0x1f40 LightroomWorkflow? no 0x2710 PrintFlagsInfo? no

Photoshop Resolution Tags

Index2 Tag Name Writable —— ——– ——– 0 XResolution int32u 2 DisplayedUnitsX int16u 4 YResolution int32u 6 DisplayedUnitsY int16u

Photoshop JPEG_Quality Tags

Index2 Tag Name Writable —— ——– ——– 0 PhotoshopQuality int16s 1 PhotoshopFormat no 2 ProgressiveScans no

Photoshop SliceInfo Tags

Index1 Tag Name Writable —— ——– ——– 20 SlicesGroupName no 24 NumSlices no

Photoshop VersionInfo Tags

Index1 Tag Name Writable —— ——– ——– 4 HasRealMergedData no 5 WriterName no 9 ReaderName no

Photoshop PrintScaleInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 PrintStyle no 2 PrintPosition no 10 PrintScale no

Photoshop PixelInfo Tags

Index1 Tag Name Writable —— ——– ——– 4 PixelAspectRatio no

Photoshop DocumentData Tags

Tag ID Tag Name Writable —— ——– ——– Layr Layers Photoshop Layers Lr16 Layers Photoshop Layers

Photoshop Layers Tags

Tags extracted from Photoshop layer information.

Tag ID Tag Name Writable —— ——– ——– _xbnd LayerBlendModes no+ _xcnt LayerCount no _xnam LayerNames no+ _xopc LayerOpacities no+ _xrct LayerRectangles no+ _xvis LayerVisible no+ lclr LayerColors no+ lsct LayerSections no+ luni LayerUnicodeNames no+ lyid LayerIDs? no+ shmd LayerModifyDates no+

Photoshop Header Tags

This information is found in the PSD file header.

Index2 Tag Name Writable —— ——– ——– 6 NumChannels no 7 ImageHeight no 9 ImageWidth no 11 BitDepth no 12 ColorMode no

Photoshop ImageData Tags

Index1 Tag Name Writable —— ——– ——– 0 Compression no

Apple Tags

Tags extracted from the maker notes of iPhone images.

Tag ID Tag Name Writable —— ——– ——– 0x0001 MakerNoteVersion int32s 0x0002 AEMatrix? no 0x0003 RunTime Apple RunTime 0x0004 AEStable int32s 0x0005 AETarget int32s 0x0006 AEAverage int32s 0x0007 AFStable int32s 0x0008 AccelerationVector rational64s[3] 0x000a HDRImageType int32s 0x000b BurstUUID string 0x000c FocusDistanceRange rational64s[2] 0x000f OISMode int32s 0x0011 ContentIdentifier string 0x0014 ImageCaptureType int32s 0x0015 ImageUniqueID string 0x0017 LivePhotoVideoIndex yes 0x0019 ImageProcessingFlags? int32s 0x001a QualityHint? string 0x001d LuminanceNoiseAmplitude rational64s 0x0020 ImageCaptureRequestID? string 0x0021 HDRHeadroom rational64s 0x0025 SceneFlags? int32s 0x0026 SignalToNoiseRatioType? int32s 0x0027 SignalToNoiseRatio rational64s 0x002b PhotoIdentifier string 0x002f FocusPosition int32s 0x0030 HDRGain rational64s 0x0038 AFMeasuredDepth int32s 0x003d AFConfidence int32s 0x003e ColorCorrectionMatrix? no 0x003f GreenGhostMitigationStatus? int32s 0x0040 SemanticStyle no 0x0041 SemanticStyleRenderingVer no 0x0042 SemanticStylePreset no 0x0045 FrontFacingCamera int32s

Apple RunTime Tags

This PLIST-format information contains the elements of a CMTime structure representing the amount of time the phone has been running since the last boot, not including standby time.

Tag ID Tag Name Writable —— ——– ——– epoch RunTimeEpoch no flags RunTimeFlags no timescale RunTimeScale no value RunTimeValue no

NikonSettings Tags

User settings for newer Nikon models. A number of the tags are marked as Unknown only to reduce the volume of the normal output.

Tag ID Tag Name Writable —— ——– ——– 0x0001 ISOAutoHiLimit no 0x0002 ISOAutoFlashLimit no 0x0003 ISOAutoShutterTime no 0x000b FlickerReductionShooting no 0x000c FlickerReductionIndicator no 0x000d MovieISOAutoHiLimit no 0x000e MovieISOAutoControlManualMode no 0x000f MovieWhiteBalanceSameAsPhoto no 0x001d AF-CPrioritySel no 0x001e AF-SPrioritySel no 0x0020 AFPointSel no 0x0022 AFActivation no 0x0023 FocusPointWrap no 0x0025 ManualFocusPointIllumination no 0x0026 AF-AssistIlluminator no 0x0027 ManualFocusRingInAFMode no 0x0029 ISOStepSize no 0x002a ExposureControlStepSize no 0x002b EasyExposureCompensation no 0x002c MatrixMetering no 0x002d CenterWeightedAreaSize no 0x002f FineTuneOptMatrixMetering no 0x0030 FineTuneOptCenterWeighted no 0x0031 FineTuneOptSpotMetering no 0x0032 FineTuneOptHighlightWeighted no 0x0033 ShutterReleaseButtonAE-L no 0x0034 StandbyMonitorOffTime no 0x0035 SelfTimerTime no 0x0036 SelfTimerShotCount no 0x0037 SelfTimerShotInterval no 0x0038 PlaybackMonitorOffTime no 0x0039 MenuMonitorOffTime no 0x003a ShootingInfoMonitorOffTime no 0x003b ImageReviewMonitorOffTime no 0x003c LiveViewMonitorOffTime no 0x003e CLModeShootingSpeed no 0x003f MaxContinuousRelease no 0x0040 ExposureDelayMode no 0x0041 ElectronicFront-CurtainShutter no 0x0042 FileNumberSequence no 0x0043 FramingGridDisplay no 0x0045 LCDIllumination no 0x0046 OpticalVR no 0x0047 FlashSyncSpeed no 0x0048 FlashShutterSpeed no 0x0049 FlashExposureCompArea no 0x004a AutoFlashISOSensitivity no 0x0051 AssignBktButton no 0x0052 AssignMovieRecordButton no 0x0053 MultiSelectorShootMode no 0x0054 MultiSelectorPlaybackMode no 0x0056 MultiSelectorLiveView no 0x0058 CmdDialsReverseRotExposureComp? no 0x0059 CmdDialsChangeMainSubExposure? no 0x005a CmdDialsChangeMainSub no 0x005b CmdDialsMenuAndPlayback no 0x005c SubDialFrameAdvance no 0x005d ReleaseButtonToUseDial no 0x005e ReverseIndicators no 0x0062 MovieShutterButton no 0x0063 Language no 0x006c ShootingInfoDisplay no 0x0074 FlickAdvanceDirection no 0x0075 HDMIOutputResolution no 0x0077 HDMIOutputRange no 0x0080 RemoteFuncButton no 0x008b CmdDialsReverseRotation no 0x008d FocusPeakingHighlightColor no 0x008e ContinuousModeDisplay no 0x008f ShutterSpeedLock no 0x0090 ApertureLock no 0x0091 MovieHighlightDisplayThreshold no 0x0092 HDMIExternalRecorder no 0x0093 BlockShotAFResponse no 0x0094 SubjectMotion no 0x0095 Three-DTrackingFaceDetection no 0x0097 StoreByOrientation no 0x0099 DynamicAreaAFAssist no 0x009a ExposureCompStepSize no 0x009b SyncReleaseMode no 0x009c ModelingFlash no 0x009d AutoBracketModeM no 0x009e PreviewButton no 0x00a0 Func1Button no 0x00a2 Func2Button no 0x00a3 AF-OnButton no 0x00a4 SubSelector no 0x00a5 SubSelectorCenter no 0x00a7 LensFunc1Button no 0x00a8 CmdDialsApertureSetting no 0x00a9 MultiSelector no 0x00aa LiveViewButtonOptions no 0x00ab LightSwitch no 0x00b1 MoviePreviewButton no MovieFunc1Button no 0x00b3 MovieFunc1Button no MovieFunc2Button no 0x00b5 MovieFunc2Button no 0x00b6 AssignMovieSubselector no 0x00b8 LimitAFAreaModeSelD9? no 0x00b9 LimitAFAreaModeSelD25? no 0x00bc LimitAFAreaModeSel3D? no 0x00bd LimitAFAreaModeSelGroup? no 0x00be LimitAFAreaModeSelAuto? no 0x00c1 LimitSelectableImageArea5To4? no 0x00c2 LimitSelectableImageArea1To1? no 0x00d4 PhotoShootingMenuBank no 0x00d5 CustomSettingsBank no 0x00d6 LimitAF-AreaModeSelPinpoint? no 0x00d7 LimitAF-AreaModeSelDynamic? no 0x00d8 LimitAF-AreaModeSelWideAF_S? no 0x00d9 LimitAF-AreaModeSelWideAF_L? no 0x00da LowLightAF no 0x00db LimitSelectableImageAreaDX? no 0x00dc LimitSelectableImageArea5To4? no 0x00dd LimitSelectableImageArea1To1? no 0x00de LimitSelectableImageArea16To9? no 0x00df ApplySettingsToLiveView no 0x00e0 FocusPeakingLevel no 0x00ea LensControlRing no 0x00ed MovieMultiSelector no 0x00ee MovieAFSpeed no 0x00ef MovieAFSpeedApply no 0x00f0 MovieAFTrackingSensitivity no 0x00f1 MovieHighlightDisplayPattern no 0x00f2 SubDialFrameAdvanceRating5? no 0x00f3 SubDialFrameAdvanceRating4? no 0x00f4 SubDialFrameAdvanceRating3? no 0x00f5 SubDialFrameAdvanceRating2? no 0x00f6 SubDialFrameAdvanceRating1? no 0x00f7 SubDialFrameAdvanceRating0? no 0x00f9 MovieAF-OnButton no 0x00fb SecondarySlotFunction no 0x00fc SilentPhotography no 0x00fd ExtendedShutterSpeeds no 0x0102 HDMIBitDepth no 0x0103 HDMIOutputHDR no 0x0104 HDMIViewAssist no 0x0109 BracketSet no 0x010a BracketProgram no 0x010b BracketIncrement no 0x010c BracketIncrement no 0x010e MonitorBrightness no 0x0116 GroupAreaC1 no 0x0117 AutoAreaAFStartingPoint no 0x0118 FocusPointPersistence no 0x0119 LimitAFAreaModeSelD49? no 0x011a LimitAFAreaModeSelD105? no 0x011b LimitAFAreaModeSelGroupC1? no 0x011c LimitAFAreaModeSelGroupC2? no 0x011d AutoFocusModeRestrictions no 0x011e FocusPointBrightness no 0x011f CHModeShootingSpeed no 0x0120 CLModeShootingSpeed no 0x0121 QuietShutterShootingSpeed no 0x0122 LimitReleaseModeSelCL? no 0x0123 LimitReleaseModeSelCH? no 0x0124 LimitReleaseModeSelQ? no 0x0125 LimitReleaseModeSelTimer? no 0x0126 LimitReleaseModeSelMirror-Up? no 0x0127 LimitSelectableImageArea16To9? no 0x0128 RearControPanelDisplay no 0x0129 FlashBurstPriority no 0x012a RecallShootFuncExposureMode no 0x012b RecallShootFuncShutterSpeed no 0x012c RecallShootFuncAperture no 0x012d RecallShootFuncExposureComp no 0x012e RecallShootFuncISO no 0x012f RecallShootFuncMeteringMode no 0x0130 RecallShootFuncWhiteBalance no 0x0131 RecallShootFuncAFAreaMode no 0x0132 RecallShootFuncFocusTracking no 0x0133 RecallShootFuncAF-On no 0x0134 VerticalFuncButton no 0x0135 Func3Button no 0x0136 VerticalAF-OnButton no 0x0137 VerticalMultiSelector no 0x0138 MeteringButton no 0x0139 PlaybackFlickUp no 0x013a PlaybackFlickUpRating no 0x013b PlaybackFlickDown no 0x013c PlaybackFlickDownRating no 0x013d MovieFunc3Button no 0x0150 ShutterType no 0x0151 LensFunc2Button no 0x0158 USBPowerDelivery no 0x0159 EnergySavingMode no 0x015c BracketingBurstOptions no 0x015e PrimarySlot no 0x015f ReverseFocusRing no 0x0160 VerticalFuncButton no 0x0161 VerticalAFOnButton no 0x0162 VerticalMultiSelector no 0x0164 VerticalMovieFuncButton no 0x0165 VerticalMovieAFOnButton no 0x0169 LimitAF-AreaModeSelAutoPeople? no 0x016a LimitAF-AreaModeSelAutoAnimals? no 0x016b LimitAF-AreaModeSelWideLPeople? no 0x016c LimitAF-AreaModeSelWideLAnimals? no 0x016d SaveFocus no 0x016e AFAreaMode no 0x016f MovieAFAreaMode no 0x0170 PreferSubSelectorCenter no 0x0171 KeepExposureWithTeleconverter no 0x0174 FocusPointSelectionSpeed no

Canon Tags

Tag ID Tag Name Writable —— ——– ——– 0x0001 CanonCameraSettings Canon CameraSettings 0x0002 CanonFocalLength Canon FocalLength 0x0003 CanonFlashInfo? no 0x0004 CanonShotInfo Canon ShotInfo 0x0005 CanonPanorama Canon Panorama 0x0006 CanonImageType string 0x0007 CanonFirmwareVersion string 0x0008 FileNumber int32u 0x0009 OwnerName string 0x000a UnknownD30 Canon UnknownD30 0x000c SerialNumber int32u 0x000d CanonCameraInfo1D Canon CameraInfo1D CanonCameraInfo1DmkII Canon CameraInfo1DmkII CanonCameraInfo1DmkIIN Canon CameraInfo1DmkIIN CanonCameraInfo1DmkIII Canon CameraInfo1DmkIII CanonCameraInfo1DmkIV Canon CameraInfo1DmkIV CanonCameraInfo1DX Canon CameraInfo1DX CanonCameraInfo5D Canon CameraInfo5D CanonCameraInfo5DmkII Canon CameraInfo5DmkII CanonCameraInfo5DmkIII Canon CameraInfo5DmkIII CanonCameraInfo6D Canon CameraInfo6D CanonCameraInfo7D Canon CameraInfo7D CanonCameraInfo40D Canon CameraInfo40D CanonCameraInfo50D Canon CameraInfo50D CanonCameraInfo60D Canon CameraInfo60D CanonCameraInfo70D Canon CameraInfo70D CanonCameraInfo80D Canon CameraInfo80D CanonCameraInfo450D Canon CameraInfo450D CanonCameraInfo500D Canon CameraInfo500D CanonCameraInfo550D Canon CameraInfo550D CanonCameraInfo600D Canon CameraInfo600D CanonCameraInfo650D Canon CameraInfo650D CanonCameraInfo700D Canon CameraInfo650D CanonCameraInfo750D Canon CameraInfo750D CanonCameraInfo760D Canon CameraInfo750D CanonCameraInfo1000D Canon CameraInfo1000D CanonCameraInfo1100D Canon CameraInfo600D CanonCameraInfo1200D Canon CameraInfo60D CanonCameraInfoR6 Canon CameraInfoR6 CanonCameraInfoG5XII Canon CameraInfoG5XII CanonCameraInfoPowerShot Canon CameraInfoPowerShot CanonCameraInfoPowerShot2 Canon CameraInfoPowerShot2 CanonCameraInfoUnknown32 Canon CameraInfoUnknown32 CanonCameraInfoUnknown16 Canon CameraInfoUnknown16 CanonCameraInfoUnknown Canon CameraInfoUnknown 0x000e CanonFileLength int32u 0x000f CustomFunctions1D CanonCustom Functions1D CustomFunctions5D CanonCustom Functions5D CustomFunctions10D CanonCustom Functions10D CustomFunctions20D CanonCustom Functions20D CustomFunctions30D CanonCustom Functions30D CustomFunctions350D CanonCustom Functions350D CustomFunctions400D CanonCustom Functions400D CustomFunctionsD30 CanonCustom FunctionsD30 CustomFunctionsD60 CanonCustom FunctionsD30 CustomFunctionsUnknown CanonCustom FuncsUnknown 0x0010 CanonModelID int32u 0x0011 MovieInfo Canon MovieInfo 0x0012 CanonAFInfo Canon AFInfo 0x0013 ThumbnailImageValidArea int16u[4] 0x0015 SerialNumberFormat int32u 0x001a SuperMacro int16u 0x001c DateStampMode int16u 0x001d MyColors Canon MyColors 0x001e FirmwareRevision int32u 0x0023 Categories int32u[2] 0x0024 FaceDetect1 Canon FaceDetect1 0x0025 FaceDetect2 Canon FaceDetect2 0x0026 CanonAFInfo2 Canon AFInfo2 0x0027 ContrastInfo Canon ContrastInfo 0x0028 ImageUniqueID int8u 0x0029 WBInfo Canon WBInfo 0x002f FaceDetect3 Canon FaceDetect3 0x0035 TimeInfo Canon TimeInfo 0x0038 BatteryType undef 0x003c AFInfo3 Canon AFInfo2 0x0081 RawDataOffset no 0x0082 RawDataLength no 0x0083 OriginalDecisionDataOffset int32u* 0x0090 CustomFunctions1D CanonCustom Functions1D 0x0091 PersonalFunctions CanonCustom PersonalFuncs 0x0092 PersonalFunctionValues CanonCustom PersonalFuncValues 0x0093 CanonFileInfo Canon FileInfo 0x0094 AFPointsInFocus1D no 0x0095 LensModel string 0x0096 SerialInfo Canon SerialInfo InternalSerialNumber string 0x0097 DustRemovalData undef! 0x0098 CropInfo Canon CropInfo 0x0099 CustomFunctions2 CanonCustom Functions2 0x009a AspectInfo Canon AspectInfo 0x00a0 ProcessingInfo Canon Processing 0x00a1 ToneCurveTable no 0x00a2 SharpnessTable no 0x00a3 SharpnessFreqTable no 0x00a4 WhiteBalanceTable no 0x00a9 ColorBalance Canon ColorBalance 0x00aa MeasuredColor Canon MeasuredColor 0x00ae ColorTemperature int16u 0x00b0 CanonFlags Canon Flags 0x00b1 ModifiedInfo Canon ModifiedInfo 0x00b2 ToneCurveMatching no 0x00b3 WhiteBalanceMatching no 0x00b4 ColorSpace int16u 0x00b6 PreviewImageInfo Canon PreviewImageInfo 0x00d0 VRDOffset int32u* 0x00e0 SensorInfo Canon SensorInfo 0x4001 ColorData1 Canon ColorData1 ColorData2 Canon ColorData2 ColorData3 Canon ColorData3 ColorData4 Canon ColorData4 ColorData5 Canon ColorData5 ColorData6 Canon ColorData6 ColorData7 Canon ColorData7 ColorData8 Canon ColorData8 ColorData9 Canon ColorData9 ColorData10 Canon ColorData10 ColorData11 Canon ColorData11 ColorDataUnknown Canon ColorDataUnknown 0x4002 CRWParam? no 0x4003 ColorInfo Canon ColorInfo 0x4005 Flavor? no 0x4008 PictureStyleUserDef [Values 0-2] Canon PictureStyle 0x4009 PictureStylePC [Values 0-2] Canon PictureStyle 0x4010 CustomPictureStyleFileName string 0x4013 AFMicroAdj Canon AFMicroAdj 0x4015 VignettingCorr Canon VignettingCorr VignettingCorrUnknown1 Canon VignettingCorrUnknown VignettingCorrUnknown2 Canon VignettingCorrUnknown 0x4016 VignettingCorr2 Canon VignettingCorr2 0x4018 LightingOpt Canon LightingOpt 0x4019 LensInfo Canon LensInfo 0x4020 AmbienceInfo Canon Ambience 0x4021 MultiExp Canon MultiExp 0x4024 FilterInfo Canon FilterInfo 0x4025 HDRInfo Canon HDRInfo 0x4026 LogInfo Canon LogInfo 0x4028 AFConfig Canon AFConfig 0x403f RawBurstModeRoll Canon RawBurstInfo

Canon CameraSettings Tags

Index2 Tag Name Writable —— ——– ——– 1 MacroMode int16s 2 SelfTimer int16s 3 Quality int16s 4 CanonFlashMode int16s 5 ContinuousDrive int16s 7 FocusMode int16s 9 RecordMode int16s 10 CanonImageSize int16s 11 EasyMode int16s 12 DigitalZoom int16s 13 Contrast int16s 14 Saturation int16s 15 Sharpness int16s 16 CameraISO int16s 17 MeteringMode int16s 18 FocusRange int16s 19 AFPoint int16s 20 CanonExposureMode int16s 22 LensType int16u 23 MaxFocalLength int16u 24 MinFocalLength int16u 25 FocalUnits int16s 26 MaxAperture int16s 27 MinAperture int16s 28 FlashActivity int16s 29 FlashBits int16s 32 FocusContinuous int16s 33 AESetting int16s 34 ImageStabilization int16s 35 DisplayAperture int16s 36 ZoomSourceWidth int16s 37 ZoomTargetWidth int16s 39 SpotMeteringMode int16s 40 PhotoEffect int16s 41 ManualFlashOutput int16s 42 ColorTone int16s 46 SRAWQuality int16s

Canon FocalLength Tags

Index2 Tag Name Writable —— ——– ——– 0 FocalType int16u 1 FocalLength int16u 2 FocalPlaneXSize int16u FocalPlaneXUnknown? int16u 3 FocalPlaneYSize int16u FocalPlaneYUnknown? int16u

Canon ShotInfo Tags

Index2 Tag Name Writable —— ——– ——– 1 AutoISO int16s 2 BaseISO int16s 3 MeasuredEV int16s 4 TargetAperture int16s 5 TargetExposureTime int16s 6 ExposureCompensation int16s 7 WhiteBalance int16s 8 SlowShutter int16s 9 SequenceNumber int16s 10 OpticalZoomCode int16s 12 CameraTemperature int16s 13 FlashGuideNumber int16s 14 AFPointsInFocus int16s 15 FlashExposureComp int16s 16 AutoExposureBracketing int16s 17 AEBBracketValue int16s 18 ControlMode int16s 19 FocusDistanceUpper int16u 20 FocusDistanceLower int16u 21 FNumber int16s 22 ExposureTime int16s 23 MeasuredEV2 int16s 24 BulbDuration int16s 26 CameraType int16s 27 AutoRotate int16s 28 NDFilter int16s 29 SelfTimer2 int16s 33 FlashOutput int16s

Canon Panorama Tags

Index2 Tag Name Writable —— ——– ——– 2 PanoramaFrameNumber int16s 5 PanoramaDirection int16s

Canon UnknownD30 Tags

Index2 Tag Name Writable —— ——– ——– [no tags known]

Canon CameraInfo1D Tags

Information in the “CameraInfo” records is tricky to decode because the encodings are very different than in other Canon records (even sometimes switching endianness between values within a single camera), plus there is considerable variation in format from model to model. The first table below lists CameraInfo tags for the 1D and 1DS.

Index1 Tag Name Writable —— ——– ——– 4 ExposureTime int8u 10 FocalLength int16u 13 LensType int16uRev 14 MinFocalLength int16u 16 MaxFocalLength int16u 65 SharpnessFrequency int8u 66 Sharpness int8s 68 WhiteBalance int8u 71 SharpnessFrequency int8u 72 ColorTemperature int16u Sharpness int8s 74 WhiteBalance int8u 75 PictureStyle int8u 78 ColorTemperature int16u 81 PictureStyle int8u

Canon CameraInfo1DmkII Tags

CameraInfo tags for the 1DmkII and 1DSmkII.

Index1 Tag Name Writable —— ——– ——– 4 ExposureTime int8u 9 FocalLength int16uRev 12 LensType int16uRev 17 MinFocalLength int16uRev 19 MaxFocalLength int16uRev 45 FocalType int8u 54 WhiteBalance int8u 55 ColorTemperature int16uRev 57 CanonImageSize int16u 102 JPEGQuality int8u 108 PictureStyle int8u 110 Saturation int8s 111 ColorTone int8s 114 Sharpness int8s 115 Contrast int8s 117 ISO string[5]

Canon CameraInfo1DmkIIN Tags

CameraInfo tags for the 1DmkIIN.

Index1 Tag Name Writable —— ——– ——– 4 ExposureTime int8u 9 FocalLength int16uRev 12 LensType int16uRev 17 MinFocalLength int16uRev 19 MaxFocalLength int16uRev 54 WhiteBalance int8u 55 ColorTemperature int16uRev 115 PictureStyle int8u 116 Sharpness int8s 117 Contrast int8s 118 Saturation int8s 119 ColorTone int8s 121 ISO string[5]

Canon CameraInfo1DmkIII Tags

CameraInfo tags for the 1DmkIII and 1DSmkIII.

Index1 Tag Name Writable —— ——– ——– 3 FNumber int8u 4 ExposureTime int8u 6 ISO int8u 24 CameraTemperature int8u 27 MacroMagnification int8u 29 FocalLength int16uRev 48 CameraOrientation int8u 67 FocusDistanceUpper int16uRev 69 FocusDistanceLower int16uRev 94 WhiteBalance int16u 98 ColorTemperature int16u 134 PictureStyle int8u 273 LensType int16uRev 275 MinFocalLength int16uRev 277 MaxFocalLength int16uRev 310 FirmwareVersion string[6] 370 FileIndex int32u 374 ShutterCount int32u 382 DirectoryIndex int32u 682 PictureStyleInfo Canon PSInfo 1114 TimeStamp1 int32u 1118 TimeStamp int32u

Canon PSInfo Tags

Custom picture style information for various models.

Index1 Tag Name Writable —— ——– ——– 0 ContrastStandard int32s 4 SharpnessStandard int32s 8 SaturationStandard int32s 12 ColorToneStandard int32s 16 FilterEffectStandard? int32s 20 ToningEffectStandard? int32s 24 ContrastPortrait int32s 28 SharpnessPortrait int32s 32 SaturationPortrait int32s 36 ColorTonePortrait int32s 40 FilterEffectPortrait? int32s 44 ToningEffectPortrait? int32s 48 ContrastLandscape int32s 52 SharpnessLandscape int32s 56 SaturationLandscape int32s 60 ColorToneLandscape int32s 64 FilterEffectLandscape? int32s 68 ToningEffectLandscape? int32s 72 ContrastNeutral int32s 76 SharpnessNeutral int32s 80 SaturationNeutral int32s 84 ColorToneNeutral int32s 88 FilterEffectNeutral? int32s 92 ToningEffectNeutral? int32s 96 ContrastFaithful int32s 100 SharpnessFaithful int32s 104 SaturationFaithful int32s 108 ColorToneFaithful int32s 112 FilterEffectFaithful? int32s 116 ToningEffectFaithful? int32s 120 ContrastMonochrome int32s 124 SharpnessMonochrome int32s 128 SaturationMonochrome? int32s 132 ColorToneMonochrome? int32s 136 FilterEffectMonochrome int32s 140 ToningEffectMonochrome int32s 144 ContrastUserDef1 int32s 148 SharpnessUserDef1 int32s 152 SaturationUserDef1 int32s 156 ColorToneUserDef1 int32s 160 FilterEffectUserDef1 int32s 164 ToningEffectUserDef1 int32s 168 ContrastUserDef2 int32s 172 SharpnessUserDef2 int32s 176 SaturationUserDef2 int32s 180 ColorToneUserDef2 int32s 184 FilterEffectUserDef2 int32s 188 ToningEffectUserDef2 int32s 192 ContrastUserDef3 int32s 196 SharpnessUserDef3 int32s 200 SaturationUserDef3 int32s 204 ColorToneUserDef3 int32s 208 FilterEffectUserDef3 int32s 212 ToningEffectUserDef3 int32s 216 UserDef1PictureStyle int16u 218 UserDef2PictureStyle int16u 220 UserDef3PictureStyle int16u

Canon CameraInfo1DmkIV Tags

CameraInfo tags for the EOS 1D Mark IV. Indices shown are for firmware versions 1.0.x, but they may be different for other firmware versions.

Index1 Tag Name Writable —— ——– ——– 3 FNumber int8u 4 ExposureTime int8u 6 ISO int8u 7 HighlightTonePriority int8u 8 MeasuredEV2 int8u 9 MeasuredEV3 int8u 21 FlashMeteringMode int8u 25 CameraTemperature int8u 30 FocalLength int16uRev 53 CameraOrientation int8u 84 FocusDistanceUpper int16uRev 86 FocusDistanceLower int16uRev 120 WhiteBalance int16u 124 ColorTemperature int16u 335 LensType int16uRev 337 MinFocalLength int16uRev 339 MaxFocalLength int16uRev 493 FirmwareVersion no 556 FileIndex int32u 568 DirectoryIndex int32u 872 PictureStyleInfo Canon PSInfo

Canon CameraInfo1DX Tags

CameraInfo tags for the EOS 1D X. Indices shown are for firmware version 1.0.2, but they may be different for other firmware versions.

Index1 Tag Name Writable —— ——– ——– 3 FNumber int8u 4 ExposureTime int8u 6 ISO int8u 27 CameraTemperature int8u 35 FocalLength int16uRev 125 CameraOrientation int8u 140 FocusDistanceUpper int16uRev 142 FocusDistanceLower int16uRev 188 WhiteBalance int16u 192 ColorTemperature int16u 244 PictureStyle int8u 423 LensType int16uRev 425 MinFocalLength int16uRev 427 MaxFocalLength int16uRev 640 FirmwareVersion no 720 FileIndex int32u 732 DirectoryIndex int32u 1012 PictureStyleInfo Canon PSInfo2

Canon PSInfo2 Tags

Custom picture style information for the EOS 5DmkIII, 60D, 600D and 1100D.

Index1 Tag Name Writable —— ——– ——– 0 ContrastStandard int32s 4 SharpnessStandard int32s 8 SaturationStandard int32s 12 ColorToneStandard int32s 16 FilterEffectStandard? int32s 20 ToningEffectStandard? int32s 24 ContrastPortrait int32s 28 SharpnessPortrait int32s 32 SaturationPortrait int32s 36 ColorTonePortrait int32s 40 FilterEffectPortrait? int32s 44 ToningEffectPortrait? int32s 48 ContrastLandscape int32s 52 SharpnessLandscape int32s 56 SaturationLandscape int32s 60 ColorToneLandscape int32s 64 FilterEffectLandscape? int32s 68 ToningEffectLandscape? int32s 72 ContrastNeutral int32s 76 SharpnessNeutral int32s 80 SaturationNeutral int32s 84 ColorToneNeutral int32s 88 FilterEffectNeutral? int32s 92 ToningEffectNeutral? int32s 96 ContrastFaithful int32s 100 SharpnessFaithful int32s 104 SaturationFaithful int32s 108 ColorToneFaithful int32s 112 FilterEffectFaithful? int32s 116 ToningEffectFaithful? int32s 120 ContrastMonochrome int32s 124 SharpnessMonochrome int32s 128 SaturationMonochrome? int32s 132 ColorToneMonochrome? int32s 136 FilterEffectMonochrome int32s 140 ToningEffectMonochrome int32s 144 ContrastAuto int32s 148 SharpnessAuto int32s 152 SaturationAuto int32s 156 ColorToneAuto int32s 160 FilterEffectAuto int32s 164 ToningEffectAuto int32s 168 ContrastUserDef1 int32s 172 SharpnessUserDef1 int32s 176 SaturationUserDef1 int32s 180 ColorToneUserDef1 int32s 184 FilterEffectUserDef1 int32s 188 ToningEffectUserDef1 int32s 192 ContrastUserDef2 int32s 196 SharpnessUserDef2 int32s 200 SaturationUserDef2 int32s 204 ColorToneUserDef2 int32s 208 FilterEffectUserDef2 int32s 212 ToningEffectUserDef2 int32s 216 ContrastUserDef3 int32s 220 SharpnessUserDef3 int32s 224 SaturationUserDef3 int32s 228 ColorToneUserDef3 int32s 232 FilterEffectUserDef3 int32s 236 ToningEffectUserDef3 int32s 240 UserDef1PictureStyle int16u 242 UserDef2PictureStyle int16u 244 UserDef3PictureStyle int16u

Canon CameraInfo5D Tags

CameraInfo tags for the EOS 5D.

Index1 Tag Name Writable —— ——– ——– 3 FNumber int8u 4 ExposureTime int8u 6 ISO int8u 12 LensType int16uRev 23 CameraTemperature int8u 27 MacroMagnification int8s 39 CameraOrientation int8s 40 FocalLength int16uRev 56 AFPointsInFocus5D int16uRev 84 WhiteBalance int16u 88 ColorTemperature int16u 108 PictureStyle int8u 147 MinFocalLength int16uRev 149 MaxFocalLength int16uRev 151 LensType int16uRev 164 FirmwareRevision string[8] 172 ShortOwnerName string[16] 204 DirectoryIndex int32u 208 FileIndex int16u 232 ContrastStandard int8s 233 ContrastPortrait int8s 234 ContrastLandscape int8s 235 ContrastNeutral int8s 236 ContrastFaithful int8s 237 ContrastMonochrome int8s 238 ContrastUserDef1 int8s 239 ContrastUserDef2 int8s 240 ContrastUserDef3 int8s 241 SharpnessStandard int8s 242 SharpnessPortrait int8s 243 SharpnessLandscape int8s 244 SharpnessNeutral int8s 245 SharpnessFaithful int8s 246 SharpnessMonochrome int8s 247 SharpnessUserDef1 int8s 248 SharpnessUserDef2 int8s 249 SharpnessUserDef3 int8s 250 SaturationStandard int8s 251 SaturationPortrait int8s 252 SaturationLandscape int8s 253 SaturationNeutral int8s 254 SaturationFaithful int8s 255 FilterEffectMonochrome int8s 256 SaturationUserDef1 int8s 257 SaturationUserDef2 int8s 258 SaturationUserDef3 int8s 259 ColorToneStandard int8s 260 ColorTonePortrait int8s 261 ColorToneLandscape int8s 262 ColorToneNeutral int8s 263 ColorToneFaithful int8s 264 ToningEffectMonochrome int8s 265 ColorToneUserDef1 int8s 266 ColorToneUserDef2 int8s 267 ColorToneUserDef3 int8s 268 UserDef1PictureStyle int16u 270 UserDef2PictureStyle int16u 272 UserDef3PictureStyle int16u 284 TimeStamp int32u

Canon CameraInfo5DmkII Tags

CameraInfo tags for the EOS 5D Mark II. Indices shown are for firmware version 1.0.6, but they may be different for other firmware versions.

Index1 Tag Name Writable —— ——– ——– 3 FNumber int8u 4 ExposureTime int8u 6 ISO int8u 7 HighlightTonePriority int8u 21 FlashMeteringMode int8u 25 CameraTemperature int8u 27 MacroMagnification int8u 30 FocalLength int16uRev 49 CameraOrientation int8u 80 FocusDistanceUpper int16uRev 82 FocusDistanceLower int16uRev 111 WhiteBalance int16u 115 ColorTemperature int16u 167 PictureStyle int8u 189 HighISONoiseReduction int8u 191 AutoLightingOptimizer int8u 230 LensType int16uRev 232 MinFocalLength int16uRev 234 MaxFocalLength int16uRev 382 FirmwareVersion no 443 FileIndex int32u 455 DirectoryIndex int32u 759 PictureStyleInfo Canon PSInfo

Canon CameraInfo5DmkIII Tags

CameraInfo tags for the EOS 5D Mark III. Indices shown are for firmware versions 1.0.x, but they may be different for other firmware versions.

Index1 Tag Name Writable —— ——– ——– 3 FNumber int8u 4 ExposureTime int8u 6 ISO int8u 27 CameraTemperature int8u 35 FocalLength int16uRev 125 CameraOrientation int8u 140 FocusDistanceUpper int16uRev 142 FocusDistanceLower int16uRev 188 WhiteBalance int16u 192 ColorTemperature int16u 244 PictureStyle int8u 339 LensType int16uRev 341 MinFocalLength int16uRev 343 MaxFocalLength int16uRev 356 LensSerialNumber undef[5] 572 FirmwareVersion no 652 FileIndex int32u 656 FileIndex2 int32u 664 DirectoryIndex int32u 668 DirectoryIndex2 int32u 944 PictureStyleInfo Canon PSInfo2

Canon CameraInfo6D Tags

CameraInfo tags for the EOS 6D.

Index1 Tag Name Writable —— ——– ——– 3 FNumber int8u 4 ExposureTime int8u 6 ISO int8u 27 CameraTemperature int8u 35 FocalLength int16uRev 131 CameraOrientation int8u 146 FocusDistanceUpper int16uRev 148 FocusDistanceLower int16uRev 194 WhiteBalance int16u 198 ColorTemperature int16u 250 PictureStyle int8u 353 LensType int16uRev 355 MinFocalLength int16uRev 357 MaxFocalLength int16uRev 598 FirmwareVersion no 682 FileIndex int32u 694 DirectoryIndex int32u 966 PictureStyleInfo Canon PSInfo2

Canon CameraInfo7D Tags

CameraInfo tags for the EOS 7D. Indices shown are for firmware versions 1.0.x, but they may be different for other firmware versions.

Index1 Tag Name Writable —— ——– ——– 3 FNumber int8u 4 ExposureTime int8u 6 ISO int8u 7 HighlightTonePriority int8u 8 MeasuredEV2 int8u 9 MeasuredEV int8u 21 FlashMeteringMode int8u 25 CameraTemperature int8u 30 FocalLength int16uRev 53 CameraOrientation int8u 84 FocusDistanceUpper int16uRev 86 FocusDistanceLower int16uRev 119 WhiteBalance int16u 123 ColorTemperature int16u 175 CameraPictureStyle int8u 201 HighISONoiseReduction int8u 274 LensType int16uRev 276 MinFocalLength int16uRev 278 MaxFocalLength int16uRev 428 FirmwareVersion no 491 FileIndex int32u 503 DirectoryIndex int32u 807 PictureStyleInfo Canon PSInfo

Canon CameraInfo40D Tags

CameraInfo tags for the EOS 40D.

Index1 Tag Name Writable —— ——– ——– 3 FNumber int8u 4 ExposureTime int8u 6 ISO int8u 21 FlashMeteringMode int8u 24 CameraTemperature int8u 27 MacroMagnification int8u 29 FocalLength int16uRev 48 CameraOrientation int8u 67 FocusDistanceUpper int16uRev 69 FocusDistanceLower int16uRev 111 WhiteBalance int16u 115 ColorTemperature int16u 214 LensType int16uRev 216 MinFocalLength int16uRev 218 MaxFocalLength int16uRev 255 FirmwareVersion string[6] 307 FileIndex int32u 319 DirectoryIndex int32u 603 PictureStyleInfo Canon PSInfo 2347 LensModel string[64]

Canon CameraInfo50D Tags

CameraInfo tags for the EOS 50D. Indices shown are for firmware versions 1.0.x, but they may be different for other firmware versions.

Index1 Tag Name Writable —— ——– ——– 3 FNumber int8u 4 ExposureTime int8u 6 ISO int8u 7 HighlightTonePriority int8u 21 FlashMeteringMode int8u 25 CameraTemperature int8u 30 FocalLength int16uRev 49 CameraOrientation int8u 80 FocusDistanceUpper int16uRev 82 FocusDistanceLower int16uRev 111 WhiteBalance int16u 115 ColorTemperature int16u 167 PictureStyle int8u 189 HighISONoiseReduction int8u 191 AutoLightingOptimizer int8u 234 LensType int16uRev 236 MinFocalLength int16uRev 238 MaxFocalLength int16uRev 350 FirmwareVersion no 411 FileIndex int32u 423 DirectoryIndex int32u 727 PictureStyleInfo Canon PSInfo

Canon CameraInfo60D Tags

CameraInfo tags for the EOS 60D and 1200D.

Index1 Tag Name Writable —— ——– ——– 3 FNumber int8u 4 ExposureTime int8u 6 ISO int8u 25 CameraTemperature int8u 30 FocalLength int16uRev 54 CameraOrientation int8u 58 CameraOrientation int8u 85 FocusDistanceUpper int16uRev 87 FocusDistanceLower int16uRev 125 ColorTemperature int16u 232 LensType int16uRev 234 MinFocalLength int16uRev 236 MaxFocalLength int16uRev 409 FirmwareVersion no 473 FileIndex int32u 485 DirectoryIndex int32u 761 PictureStyleInfo Canon PSInfo2 801 PictureStyleInfo Canon PSInfo2

Canon CameraInfo70D Tags

CameraInfo tags for the EOS 70D.

Index1 Tag Name Writable —— ——– ——– 3 FNumber int8u 4 ExposureTime int8u 6 ISO int8u 27 CameraTemperature int8u 35 FocalLength int16uRev 132 CameraOrientation int8u 147 FocusDistanceUpper int16uRev 149 FocusDistanceLower int16uRev 199 ColorTemperature int16u 358 LensType int16uRev 360 MinFocalLength int16uRev 362 MaxFocalLength int16uRev 606 FirmwareVersion no 691 FileIndex int32u 703 DirectoryIndex int32u 975 PictureStyleInfo Canon PSInfo2

Canon CameraInfo80D Tags

CameraInfo tags for the EOS 80D.

Index1 Tag Name Writable —— ——– ——– 3 FNumber int8u 4 ExposureTime int8u 6 ISO int8u 27 CameraTemperature int8u 35 FocalLength int16uRev 150 CameraOrientation int8u 165 FocusDistanceUpper int16uRev 167 FocusDistanceLower int16uRev 314 ColorTemperature int16u 393 LensType int16uRev 395 MinFocalLength int16uRev 397 MaxFocalLength int16uRev 1114 FirmwareVersion no 1198 FileIndex int32u 1210 DirectoryIndex int32u

Canon CameraInfo450D Tags

CameraInfo tags for the EOS 450D.

Index1 Tag Name Writable —— ——– ——– 3 FNumber int8u 4 ExposureTime int8u 6 ISO int8u 21 FlashMeteringMode int8u 24 CameraTemperature int8u 27 MacroMagnification int8u 29 FocalLength int16uRev 48 CameraOrientation int8u 67 FocusDistanceUpper int16uRev 69 FocusDistanceLower int16uRev 111 WhiteBalance int16u 115 ColorTemperature int16u 222 LensType int16uRev 263 FirmwareVersion string[6] 271 OwnerName string[32] 307 DirectoryIndex int32u 319 FileIndex int32u 611 PictureStyleInfo Canon PSInfo 2355 LensModel string[64]

Canon CameraInfo500D Tags

CameraInfo tags for the EOS 500D.

Index1 Tag Name Writable —— ——– ——– 3 FNumber int8u 4 ExposureTime int8u 6 ISO int8u 7 HighlightTonePriority int8u 21 FlashMeteringMode int8u 25 CameraTemperature int8u 30 FocalLength int16uRev 49 CameraOrientation int8u 80 FocusDistanceUpper int16uRev 82 FocusDistanceLower int16uRev 115 WhiteBalance int16u 119 ColorTemperature int16u 171 PictureStyle int8u 188 HighISONoiseReduction int8u 190 AutoLightingOptimizer int8u 246 LensType int16uRev 248 MinFocalLength int16uRev 250 MaxFocalLength int16uRev 400 FirmwareVersion no 467 FileIndex int32u 479 DirectoryIndex int32u 779 PictureStyleInfo Canon PSInfo

Canon CameraInfo550D Tags

CameraInfo tags for the EOS 550D.

Index1 Tag Name Writable —— ——– ——– 3 FNumber int8u 4 ExposureTime int8u 6 ISO int8u 7 HighlightTonePriority int8u 21 FlashMeteringMode int8u 25 CameraTemperature int8u 30 FocalLength int16uRev 53 CameraOrientation int8u 84 FocusDistanceUpper int16uRev 86 FocusDistanceLower int16uRev 120 WhiteBalance int16u 124 ColorTemperature int16u 176 PictureStyle int8u 255 LensType int16uRev 257 MinFocalLength int16uRev 259 MaxFocalLength int16uRev 420 FirmwareVersion no 484 FileIndex int32u 496 DirectoryIndex int32u 796 PictureStyleInfo Canon PSInfo

Canon CameraInfo600D Tags

CameraInfo tags for the EOS 600D and 1100D.

Index1 Tag Name Writable —— ——– ——– 3 FNumber int8u 4 ExposureTime int8u 6 ISO int8u 7 HighlightTonePriority int8u 21 FlashMeteringMode int8u 25 CameraTemperature int8u 30 FocalLength int16uRev 56 CameraOrientation int8u 87 FocusDistanceUpper int16uRev 89 FocusDistanceLower int16uRev 123 WhiteBalance int16u 127 ColorTemperature int16u 179 PictureStyle int8u 234 LensType int16uRev 236 MinFocalLength int16uRev 238 MaxFocalLength int16uRev 411 FirmwareVersion no 475 FileIndex int32u 487 DirectoryIndex int32u 763 PictureStyleInfo Canon PSInfo2

Canon CameraInfo650D Tags

CameraInfo tags for the EOS 650D and 700D.

Index1 Tag Name Writable —— ——– ——– 3 FNumber int8u 4 ExposureTime int8u 6 ISO int8u 27 CameraTemperature int8u 35 FocalLength int16uRev 125 CameraOrientation int8u 140 FocusDistanceUpper int16uRev 142 FocusDistanceLower int16uRev 188 WhiteBalance int16u 192 ColorTemperature int16u 244 PictureStyle int8u 295 LensType int16uRev 297 MinFocalLength int16uRev 299 MaxFocalLength int16uRev 539 FirmwareVersion no 544 FirmwareVersion no 624 FileIndex int32u 628 FileIndex int32u 636 DirectoryIndex int32u 640 DirectoryIndex int32u 912 PictureStyleInfo Canon PSInfo2

Canon CameraInfo750D Tags

CameraInfo tags for the EOS 750D and 760D.

Index1 Tag Name Writable —— ——– ——– 3 FNumber int8u 4 ExposureTime int8u 6 ISO int8u 27 CameraTemperature int8u 35 FocalLength int16uRev 150 CameraOrientation int8u 165 FocusDistanceUpper int16uRev 167 FocusDistanceLower int16uRev 305 WhiteBalance int16u 309 ColorTemperature int16u 361 PictureStyle int8u 388 LensType int16uRev 390 MinFocalLength int16uRev 392 MaxFocalLength int16uRev 1085 FirmwareVersion no 1097 FirmwareVersion no

Canon CameraInfo1000D Tags

CameraInfo tags for the EOS 1000D.

Index1 Tag Name Writable —— ——– ——– 3 FNumber int8u 4 ExposureTime int8u 6 ISO int8u 21 FlashMeteringMode int8u 24 CameraTemperature int8u 27 MacroMagnification int8u 29 FocalLength int16uRev 48 CameraOrientation int8u 67 FocusDistanceUpper int16uRev 69 FocusDistanceLower int16uRev 111 WhiteBalance int16u 115 ColorTemperature int16u 226 LensType int16uRev 228 MinFocalLength int16uRev 230 MaxFocalLength int16uRev 267 FirmwareVersion string[6] 311 DirectoryIndex int32u 323 FileIndex int32u 615 PictureStyleInfo Canon PSInfo 2359 LensModel string[64]

Canon CameraInfoR6 Tags

CameraInfo tags for the EOS R6.

Index1 Tag Name Writable —— ——– ——– 2801 ShutterCount int32u

Canon CameraInfoG5XII Tags

CameraInfo tags for the PowerShot G5 X Mark II.

Index1 Tag Name Writable —— ——– ——– 659 ShutterCount int32u 2849 DirectoryIndex int32u 2861 FileIndex int32u

Canon CameraInfoPowerShot Tags

CameraInfo tags for PowerShot models such as the A450, A460, A550, A560, A570, A630, A640, A650, A710, A720, G7, G9, S5, SD40, SD750, SD800, SD850, SD870, SD900, SD950, SD1000, SX100 and TX1.

Index4 Tag Name Writable —— ——– ——– 0 ISO int32s 5 FNumber int32s 6 ExposureTime int32s 23 Rotation int32s 135 CameraTemperature int32s 145 CameraTemperature int32s

Canon CameraInfoPowerShot2 Tags

CameraInfo tags for PowerShot models such as the A470, A480, A490, A495, A580, A590, A1000, A1100, A2000, A2100, A3000, A3100, D10, E1, G10, G11, S90, S95, SD770, SD780, SD790, SD880, SD890, SD940, SD960, SD970, SD980, SD990, SD1100, SD1200, SD1300, SD1400, SD3500, SD4000, SD4500, SX1, SX10, SX20, SX110, SX120, SX130, SX200 and SX210.

Index4 Tag Name Writable —— ——– ——– 1 ISO int32s 6 FNumber int32s 7 ExposureTime int32s 24 Rotation int32s 153 CameraTemperature int32s 159 CameraTemperature int32s 164 CameraTemperature int32s 168 CameraTemperature int32s 261 CameraTemperature int32s

Canon CameraInfoUnknown32 Tags

Unknown CameraInfo tags are divided into 3 tables based on format size.

Index4 Tag Name Writable —— ——– ——– 71 CameraTemperature int32s 83 CameraTemperature int32s 91 CameraTemperature int32s 92 CameraTemperature int32s 100 CameraTemperature int32s -3 CameraTemperature int32s

Canon CameraInfoUnknown16 Tags

Index2 Tag Name Writable —— ——– ——– [no tags known]

Canon CameraInfoUnknown Tags

Index1 Tag Name Writable —— ——– ——– 363 LensSerialNumber undef[5] 1473 FirmwareVersion no

Canon MovieInfo Tags

Tags written by some Canon cameras when recording video.

Index2 Tag Name Writable —— ——– ——– 1 FrameRate int16u 2 FrameCount int16u 4 FrameCount int32u 6 FrameRate rational32u 106 Duration int32u 108 AudioBitrate int32u 110 AudioSampleRate int32u 112 AudioChannels int32u 116 VideoCodec undef[4]

Canon AFInfo Tags

Auto-focus information used by many older Canon models. The values in this record are sequential, and some have variable sizes based on the value of NumAFPoints (which may be 1,5,7,9,15,45 or 53). The AFArea coordinates are given in a system where the image has dimensions given by AFImageWidth and AFImageHeight, and 0,0 is the image center. The direction of the Y axis depends on the camera model, with positive Y upwards for EOS models, but apparently downwards for PowerShot models.

Sequence Tag Name Writable ——– ——– ——– 0 NumAFPoints no 1 ValidAFPoints no 2 CanonImageWidth no 3 CanonImageHeight no 4 AFImageWidth no 5 AFImageHeight no 6 AFAreaWidth no 7 AFAreaHeight no 8 AFAreaXPositions no 9 AFAreaYPositions no 10 AFPointsInFocus no 11 PrimaryAFPoint no Canon_AFInfo_0x000b? no 12 PrimaryAFPoint no

Canon MyColors Tags

Index2 Tag Name Writable —— ——– ——– 2 MyColorMode int16u

Canon FaceDetect1 Tags

Index2 Tag Name Writable —— ——– ——– 2 FacesDetected int16u 3 FaceDetectFrameSize int16u[2] 8 Face1Position int16s[2] 10 Face2Position int16s[2] 12 Face3Position int16s[2] 14 Face4Position int16s[2] 16 Face5Position int16s[2] 18 Face6Position int16s[2] 20 Face7Position int16s[2] 22 Face8Position int16s[2] 24 Face9Position int16s[2]

Canon FaceDetect2 Tags

Index1 Tag Name Writable —— ——– ——– 1 FaceWidth int8u 2 FacesDetected int8u

Canon AFInfo2 Tags

Newer version of the AFInfo record containing much of the same information (and coordinate confusion) as the older version. In this record, NumAFPoints may be 7, 9, 11, 19, 31, 45 or 61, depending on the camera model.

Sequence Tag Name Writable ——– ——– ——– 0 AFInfoSize? no 1 AFAreaMode no 2 NumAFPoints no 3 ValidAFPoints no 4 CanonImageWidth no 5 CanonImageHeight no 6 AFImageWidth no 7 AFImageHeight no 8 AFAreaWidths no 9 AFAreaHeights no 10 AFAreaXPositions no 11 AFAreaYPositions no 12 AFPointsInFocus no 13 AFPointsSelected no Canon_AFInfo2_0x000d? no 14 PrimaryAFPoint no

Canon ContrastInfo Tags

Index2 Tag Name Writable —— ——– ——– 4 IntelligentContrast int16u

Canon WBInfo Tags

WB tags for the Canon G9.

Index4 Tag Name Writable —— ——– ——– 2 WB_GRBGLevelsAuto int32s[4] 10 WB_GRBGLevelsDaylight int32s[4] 18 WB_GRBGLevelsCloudy int32s[4] 26 WB_GRBGLevelsTungsten int32s[4] 34 WB_GRBGLevelsFluorescent int32s[4] 42 WB_GRBGLevelsFluorHigh int32s[4] 50 WB_GRBGLevelsFlash int32s[4] 58 WB_GRBGLevelsUnderwater int32s[4] 66 WB_GRBGLevelsCustom1 int32s[4] 74 WB_GRBGLevelsCustom2 int32s[4]

Canon FaceDetect3 Tags

Index2 Tag Name Writable —— ——– ——– 3 FacesDetected int16u

Canon TimeInfo Tags

Index4 Tag Name Writable —— ——– ——– 1 TimeZone int32s 2 TimeZoneCity int32s 3 DaylightSavings int32s

Canon FileInfo Tags

Index2 Tag Name Writable —— ——– ——– 1 FileNumber int32u ShutterCount int32u 3 BracketMode int16s 4 BracketValue int16s 5 BracketShotNumber int16s 6 RawJpgQuality int16s 7 RawJpgSize int16s 8 LongExposureNoiseReduction2 int16s 9 WBBracketMode int16s 12 WBBracketValueAB int16s 13 WBBracketValueGM int16s 14 FilterEffect int16s 15 ToningEffect int16s 16 MacroMagnification int16s 19 LiveViewShooting int16s 20 FocusDistanceUpper int16u 21 FocusDistanceLower int16u 23 ShutterMode int16s 25 FlashExposureLock int16s 61 RFLensType int16u

Canon SerialInfo Tags

Index1 Tag Name Writable —— ——– ——– 9 InternalSerialNumber string

Canon CropInfo Tags

Index2 Tag Name Writable —— ——– ——– 0 CropLeftMargin int16u 1 CropRightMargin int16u 2 CropTopMargin int16u 3 CropBottomMargin int16u

Canon AspectInfo Tags

Index4 Tag Name Writable —— ——– ——– 0 AspectRatio int32u 1 CroppedImageWidth int32u 2 CroppedImageHeight int32u 3 CroppedImageLeft int32u 4 CroppedImageTop int32u

Canon Processing Tags

Index2 Tag Name Writable —— ——– ——– 1 ToneCurve int16s 2 Sharpness int16s 3 SharpnessFrequency int16s 4 SensorRedLevel int16s 5 SensorBlueLevel int16s 6 WhiteBalanceRed int16s 7 WhiteBalanceBlue int16s 8 WhiteBalance int16s 9 ColorTemperature int16s 10 PictureStyle int16s 11 DigitalGain int16s 12 WBShiftAB int16s 13 WBShiftGM int16s

Canon ColorBalance Tags

These tags are used by the 10D and 300D.

Index2 Tag Name Writable —— ——– ——– 1 WB_RGGBLevelsAuto int16s[4] 5 WB_RGGBLevelsDaylight int16s[4] 9 WB_RGGBLevelsShade int16s[4] 13 WB_RGGBLevelsCloudy int16s[4] 17 WB_RGGBLevelsTungsten int16s[4] 21 WB_RGGBLevelsFluorescent int16s[4] 25 WB_RGGBLevelsFlash int16s[4] 29 WB_RGGBLevelsCustom int16s[4] BlackLevels int16s[4] 33 WB_RGGBLevelsKelvin int16s[4] 37 WB_RGGBBlackLevels int16s[4]

Canon MeasuredColor Tags

Index2 Tag Name Writable —— ——– ——– 1 MeasuredRGGB int16u[4]

Canon Flags Tags

Index2 Tag Name Writable —— ——– ——– 1 ModifiedParamFlag int16s

Canon ModifiedInfo Tags

Index2 Tag Name Writable —— ——– ——– 1 ModifiedToneCurve int16s 2 ModifiedSharpness int16s 3 ModifiedSharpnessFreq int16s 4 ModifiedSensorRedLevel int16s 5 ModifiedSensorBlueLevel int16s 6 ModifiedWhiteBalanceRed int16s 7 ModifiedWhiteBalanceBlue int16s 8 ModifiedWhiteBalance int16s 9 ModifiedColorTemp int16s 10 ModifiedPictureStyle int16s 11 ModifiedDigitalGain int16s

Canon PreviewImageInfo Tags

Index4 Tag Name Writable —— ——– ——– 1 PreviewQuality int32u 2 PreviewImageLength int32u* 3 PreviewImageWidth int32u 4 PreviewImageHeight int32u 5 PreviewImageStart int32u*

Canon SensorInfo Tags

Index2 Tag Name Writable —— ——– ——– 1 SensorWidth no 2 SensorHeight no 5 SensorLeftBorder no 6 SensorTopBorder no 7 SensorRightBorder no 8 SensorBottomBorder no 9 BlackMaskLeftBorder no 10 BlackMaskTopBorder no 11 BlackMaskRightBorder no 12 BlackMaskBottomBorder no

Canon ColorData1 Tags

These tags are used by the 20D and 350D.

Index2 Tag Name Writable —— ——– ——– 25 WB_RGGBLevelsAsShot int16s[4] 29 ColorTempAsShot int16s 30 WB_RGGBLevelsAuto int16s[4] 34 ColorTempAuto int16s 35 WB_RGGBLevelsDaylight int16s[4] 39 ColorTempDaylight int16s 40 WB_RGGBLevelsShade int16s[4] 44 ColorTempShade int16s 45 WB_RGGBLevelsCloudy int16s[4] 49 ColorTempCloudy int16s 50 WB_RGGBLevelsTungsten int16s[4] 54 ColorTempTungsten int16s 55 WB_RGGBLevelsFluorescent int16s[4] 59 ColorTempFluorescent int16s 60 WB_RGGBLevelsFlash int16s[4] 64 ColorTempFlash int16s 65 WB_RGGBLevelsCustom1 int16s[4] 69 ColorTempCustom1 int16s 70 WB_RGGBLevelsCustom2 int16s[4] 74 ColorTempCustom2 int16s 75 ColorCalib? Canon ColorCalib

Canon ColorCalib Tags

Camera color calibration data. For the 20D, 350D, 1DmkII and 1DSmkII the order of the coefficients is A, B, C, Temperature, but for newer models it is B, C, A, Temperature. These tags are extracted only when the Unknown option is used.

Index2 Tag Name Writable —— ——– ——– 0 CameraColorCalibration01? int16s[4] 4 CameraColorCalibration02? int16s[4] 8 CameraColorCalibration03? int16s[4] 12 CameraColorCalibration04? int16s[4] 16 CameraColorCalibration05? int16s[4] 20 CameraColorCalibration06? int16s[4] 24 CameraColorCalibration07? int16s[4] 28 CameraColorCalibration08? int16s[4] 32 CameraColorCalibration09? int16s[4] 36 CameraColorCalibration10? int16s[4] 40 CameraColorCalibration11? int16s[4] 44 CameraColorCalibration12? int16s[4] 48 CameraColorCalibration13? int16s[4] 52 CameraColorCalibration14? int16s[4] 56 CameraColorCalibration15? int16s[4]

Canon ColorData2 Tags

These tags are used by the 1DmkII and 1DSmkII.

Index2 Tag Name Writable —— ——– ——– 24 WB_RGGBLevelsAuto int16s[4] 28 ColorTempAuto int16s 29 WB_RGGBLevelsUnknown? int16s[4] 33 ColorTempUnknown? int16s 34 WB_RGGBLevelsAsShot int16s[4] 38 ColorTempAsShot int16s 39 WB_RGGBLevelsDaylight int16s[4] 43 ColorTempDaylight int16s 44 WB_RGGBLevelsShade int16s[4] 48 ColorTempShade int16s 49 WB_RGGBLevelsCloudy int16s[4] 53 ColorTempCloudy int16s 54 WB_RGGBLevelsTungsten int16s[4] 58 ColorTempTungsten int16s 59 WB_RGGBLevelsFluorescent int16s[4] 63 ColorTempFluorescent int16s 64 WB_RGGBLevelsKelvin int16s[4] 68 ColorTempKelvin int16s 69 WB_RGGBLevelsFlash int16s[4] 73 ColorTempFlash int16s 74 WB_RGGBLevelsUnknown2? int16s[4] 78 ColorTempUnknown2? int16s 79 WB_RGGBLevelsUnknown3? int16s[4] 83 ColorTempUnknown3? int16s 84 WB_RGGBLevelsUnknown4? int16s[4] 88 ColorTempUnknown4? int16s 89 WB_RGGBLevelsUnknown5? int16s[4] 93 ColorTempUnknown5? int16s 94 WB_RGGBLevelsUnknown6? int16s[4] 98 ColorTempUnknown6? int16s 99 WB_RGGBLevelsUnknown7? int16s[4] 103 ColorTempUnknown7? int16s 104 WB_RGGBLevelsUnknown8? int16s[4] 108 ColorTempUnknown8? int16s 109 WB_RGGBLevelsUnknown9? int16s[4] 113 ColorTempUnknown9? int16s 114 WB_RGGBLevelsUnknown10? int16s[4] 118 ColorTempUnknown10? int16s 119 WB_RGGBLevelsUnknown11? int16s[4] 123 ColorTempUnknown11? int16s 124 WB_RGGBLevelsUnknown12? int16s[4] 128 ColorTempUnknown12? int16s 129 WB_RGGBLevelsUnknown13? int16s[4] 133 ColorTempUnknown13? int16s 134 WB_RGGBLevelsUnknown14? int16s[4] 138 ColorTempUnknown14? int16s 139 WB_RGGBLevelsUnknown15? int16s[4] 143 ColorTempUnknown15? int16s 144 WB_RGGBLevelsPC1 int16s[4] 148 ColorTempPC1 int16s 149 WB_RGGBLevelsPC2 int16s[4] 153 ColorTempPC2 int16s 154 WB_RGGBLevelsPC3 int16s[4] 158 ColorTempPC3 int16s 159 WB_RGGBLevelsUnknown16? int16s[4] 163 ColorTempUnknown16? int16s 164 ColorCalib? Canon ColorCalib 618 RawMeasuredRGGB int32u[4]

Canon ColorData3 Tags

These tags are used by the 1DmkIIN, 5D, 30D and 400D.

Index2 Tag Name Writable —— ——– ——– 0 ColorDataVersion int16s 63 WB_RGGBLevelsAsShot int16s[4] 67 ColorTempAsShot int16s 68 WB_RGGBLevelsAuto int16s[4] 72 ColorTempAuto int16s 73 WB_RGGBLevelsMeasured int16s[4] 77 ColorTempMeasured int16s 78 WB_RGGBLevelsDaylight int16s[4] 82 ColorTempDaylight int16s 83 WB_RGGBLevelsShade int16s[4] 87 ColorTempShade int16s 88 WB_RGGBLevelsCloudy int16s[4] 92 ColorTempCloudy int16s 93 WB_RGGBLevelsTungsten int16s[4] 97 ColorTempTungsten int16s 98 WB_RGGBLevelsFluorescent int16s[4] 102 ColorTempFluorescent int16s 103 WB_RGGBLevelsKelvin int16s[4] 107 ColorTempKelvin int16s 108 WB_RGGBLevelsFlash int16s[4] 112 ColorTempFlash int16s 113 WB_RGGBLevelsPC1 int16s[4] 117 ColorTempPC1 int16s 118 WB_RGGBLevelsPC2 int16s[4] 122 ColorTempPC2 int16s 123 WB_RGGBLevelsPC3 int16s[4] 127 ColorTempPC3 int16s 128 WB_RGGBLevelsCustom int16s[4] 132 ColorTempCustom int16s 133 ColorCalib? Canon ColorCalib 196 PerChannelBlackLevel int16u[4] 584 FlashOutput int16s 585 FlashBatteryLevel int16s 586 ColorTempFlashData int16s 647 MeasuredRGGBData int32u[4]

Canon ColorData4 Tags

These tags are used by the 1DmkIII, 1DSmkIII, 1DmkIV, 5DmkII, 7D, 40D, 50D, 60D, 450D, 500D, 550D, 1000D and 1100D.

Index2 Tag Name Writable —— ——– ——– 0 ColorDataVersion int16s 63 ColorCoefs Canon ColorCoefs 168 ColorCalib? Canon ColorCalib 231 AverageBlackLevel int16u[4] 640 RawMeasuredRGGB int32u[4] 692 PerChannelBlackLevel int16u[4] 696 NormalWhiteLevel int16u 697 SpecularWhiteLevel int16u 698 LinearityUpperMargin int16u 715 PerChannelBlackLevel int16u[4] 719 NormalWhiteLevel int16u PerChannelBlackLevel int16u[4] 720 SpecularWhiteLevel int16u 721 LinearityUpperMargin int16u 723 NormalWhiteLevel int16u 724 SpecularWhiteLevel int16u 725 LinearityUpperMargin int16u

Canon ColorCoefs Tags

Index2 Tag Name Writable —— ——– ——– 0 WB_RGGBLevelsAsShot int16s[4] 4 ColorTempAsShot int16s 5 WB_RGGBLevelsAuto int16s[4] 9 ColorTempAuto int16s 10 WB_RGGBLevelsMeasured int16s[4] 14 ColorTempMeasured int16s 15 WB_RGGBLevelsUnknown? int16s[4] 19 ColorTempUnknown? int16s 20 WB_RGGBLevelsDaylight int16s[4] 24 ColorTempDaylight int16s 25 WB_RGGBLevelsShade int16s[4] 29 ColorTempShade int16s 30 WB_RGGBLevelsCloudy int16s[4] 34 ColorTempCloudy int16s 35 WB_RGGBLevelsTungsten int16s[4] 39 ColorTempTungsten int16s 40 WB_RGGBLevelsFluorescent int16s[4] 44 ColorTempFluorescent int16s 45 WB_RGGBLevelsKelvin int16s[4] 49 ColorTempKelvin int16s 50 WB_RGGBLevelsFlash int16s[4] 54 ColorTempFlash int16s 55 WB_RGGBLevelsUnknown2? int16s[4] 59 ColorTempUnknown2? int16s 60 WB_RGGBLevelsUnknown3? int16s[4] 64 ColorTempUnknown3? int16s 65 WB_RGGBLevelsUnknown4? int16s[4] 69 ColorTempUnknown4? int16s 70 WB_RGGBLevelsUnknown5? int16s[4] 74 ColorTempUnknown5? int16s 75 WB_RGGBLevelsUnknown6? int16s[4] 79 ColorTempUnknown6? int16s 80 WB_RGGBLevelsUnknown7? int16s[4] 84 ColorTempUnknown7? int16s 85 WB_RGGBLevelsUnknown8? int16s[4] 89 ColorTempUnknown8? int16s 90 WB_RGGBLevelsUnknown9? int16s[4] 94 ColorTempUnknown9? int16s 95 WB_RGGBLevelsUnknown10? int16s[4] 99 ColorTempUnknown10? int16s 100 WB_RGGBLevelsUnknown11? int16s[4] 104 ColorTempUnknown11? int16s 105 WB_RGGBLevelsUnknown12? int16s[4] 109 ColorTempUnknown12? int16s 110 WB_RGGBLevelsUnknown13? int16s[4] 114 ColorTempUnknown13? int16s

Canon ColorData5 Tags

These tags are used by many EOS M and PowerShot models.

Index2 Tag Name Writable —— ——– ——– 0 ColorDataVersion int16s 71 ColorCoefs Canon ColorCoefs ColorCoefs2 Canon ColorCoefs2 186 ColorCalib2? Canon ColorCalib2 255 ColorCalib2? Canon ColorCalib2 264 PerChannelBlackLevel int16s[4] 333 PerChannelBlackLevel int16s[4] 662 SpecularWhiteLevel int16u 1385 NormalWhiteLevel int16u 1386 SpecularWhiteLevel int16u

Canon ColorCoefs2 Tags

Index2 Tag Name Writable —— ——– ——– 0 WB_RGGBLevelsAsShot int16s[4] 7 ColorTempAsShot int16s 8 WB_RGGBLevelsAuto int16s[4] 15 ColorTempAuto int16s 16 WB_RGGBLevelsMeasured int16s[4] 23 ColorTempMeasured int16s 24 WB_RGGBLevelsUnknown? int16s[4] 31 ColorTempUnknown? int16s 32 WB_RGGBLevelsDaylight int16s[4] 39 ColorTempDaylight int16s 40 WB_RGGBLevelsShade int16s[4] 47 ColorTempShade int16s 48 WB_RGGBLevelsCloudy int16s[4] 55 ColorTempCloudy int16s 56 WB_RGGBLevelsTungsten int16s[4] 63 ColorTempTungsten int16s 64 WB_RGGBLevelsFluorescent int16s[4] 71 ColorTempFluorescent int16s 72 WB_RGGBLevelsKelvin int16s[4] 79 ColorTempKelvin int16s 80 WB_RGGBLevelsFlash int16s[4] 87 ColorTempFlash int16s 88 WB_RGGBLevelsUnknown2? int16s[4] 95 ColorTempUnknown2? int16s 96 WB_RGGBLevelsUnknown3? int16s[4] 103 ColorTempUnknown3? int16s 104 WB_RGGBLevelsUnknown4? int16s[4] 111 ColorTempUnknown4? int16s 112 WB_RGGBLevelsUnknown5? int16s[4] 119 ColorTempUnknown5? int16s 120 WB_RGGBLevelsUnknown6? int16s[4] 127 ColorTempUnknown6? int16s 128 WB_RGGBLevelsUnknown7? int16s[4] 135 ColorTempUnknown7? int16s 136 WB_RGGBLevelsUnknown8? int16s[4] 143 ColorTempUnknown8? int16s 144 WB_RGGBLevelsUnknown9? int16s[4] 151 ColorTempUnknown9? int16s 152 WB_RGGBLevelsUnknown10? int16s[4] 159 ColorTempUnknown10? int16s 160 WB_RGGBLevelsUnknown11? int16s[4] 167 ColorTempUnknown11? int16s 168 WB_RGGBLevelsUnknown12? int16s[4] 175 ColorTempUnknown12? int16s 176 WB_RGGBLevelsUnknown13? int16s[4] 183 ColorTempUnknown13? int16s

Canon ColorCalib2 Tags

B, C, A, D, Temperature.

Index2 Tag Name Writable —— ——– ——– 0 CameraColorCalibration01? int16s[5] 5 CameraColorCalibration02? int16s[5] 10 CameraColorCalibration03? int16s[5] 15 CameraColorCalibration04? int16s[5] 20 CameraColorCalibration05? int16s[5] 25 CameraColorCalibration06? int16s[5] 30 CameraColorCalibration07? int16s[5] 35 CameraColorCalibration08? int16s[5] 40 CameraColorCalibration09? int16s[5] 45 CameraColorCalibration10? int16s[5] 50 CameraColorCalibration11? int16s[5] 55 CameraColorCalibration12? int16s[5] 60 CameraColorCalibration13? int16s[5] 65 CameraColorCalibration14? int16s[5] 70 CameraColorCalibration15? int16s[5]

Canon ColorData6 Tags

These tags are used by the EOS 600D and 1200D.

Index2 Tag Name Writable —— ——– ——– 0 ColorDataVersion int16s 63 WB_RGGBLevelsAsShot int16s[4] 67 ColorTempAsShot int16s 68 WB_RGGBLevelsAuto int16s[4] 72 ColorTempAuto int16s 73 WB_RGGBLevelsMeasured int16s[4] 77 ColorTempMeasured int16s 78 WB_RGGBLevelsUnknown? int16s[4] 82 ColorTempUnknown? int16s 83 WB_RGGBLevelsUnknown2? int16s[4] 87 ColorTempUnknown2? int16s 88 WB_RGGBLevelsUnknown3? int16s[4] 92 ColorTempUnknown3? int16s 93 WB_RGGBLevelsUnknown4? int16s[4] 97 ColorTempUnknown4? int16s 98 WB_RGGBLevelsUnknown5? int16s[4] 102 ColorTempUnknown5? int16s 103 WB_RGGBLevelsDaylight int16s[4] 107 ColorTempDaylight int16s 108 WB_RGGBLevelsShade int16s[4] 112 ColorTempShade int16s 113 WB_RGGBLevelsCloudy int16s[4] 117 ColorTempCloudy int16s 118 WB_RGGBLevelsTungsten int16s[4] 122 ColorTempTungsten int16s 123 WB_RGGBLevelsFluorescent int16s[4] 127 ColorTempFluorescent int16s 128 WB_RGGBLevelsKelvin int16s[4] 132 ColorTempKelvin int16s 133 WB_RGGBLevelsFlash int16s[4] 137 ColorTempFlash int16s 138 WB_RGGBLevelsUnknown6? int16s[4] 142 ColorTempUnknown6? int16s 143 WB_RGGBLevelsUnknown7? int16s[4] 147 ColorTempUnknown7? int16s 148 WB_RGGBLevelsUnknown8? int16s[4] 152 ColorTempUnknown8? int16s 153 WB_RGGBLevelsUnknown9? int16s[4] 157 ColorTempUnknown9? int16s 158 WB_RGGBLevelsUnknown10? int16s[4] 162 ColorTempUnknown10? int16s 163 WB_RGGBLevelsUnknown11? int16s[4] 167 ColorTempUnknown11? int16s 168 WB_RGGBLevelsUnknown12? int16s[4] 172 ColorTempUnknown12? int16s 173 WB_RGGBLevelsUnknown13? int16s[4] 177 ColorTempUnknown13? int16s 178 WB_RGGBLevelsUnknown14? int16s[4] 182 ColorTempUnknown14? int16s 183 WB_RGGBLevelsUnknown15? int16s[4] 187 ColorTempUnknown15? int16s 188 ColorCalib? Canon ColorCalib 251 AverageBlackLevel int16u[4] 404 RawMeasuredRGGB int32u[4] 479 PerChannelBlackLevel int16u[4] 483 NormalWhiteLevel int16u 484 SpecularWhiteLevel int16u 485 LinearityUpperMargin int16u

Canon ColorData7 Tags

These tags are used by the EOS 1DX, 5DmkIII, 6D, 7DmkII, 100D, 650D, 700D, 8000D, M and M2.

Index2 Tag Name Writable —— ——– ——– 0 ColorDataVersion int16s 63 WB_RGGBLevelsAsShot int16s[4] 67 ColorTempAsShot int16s 68 WB_RGGBLevelsAuto int16s[4] 72 ColorTempAuto int16s 73 WB_RGGBLevelsMeasured int16s[4] 77 ColorTempMeasured int16s 78 WB_RGGBLevelsUnknown? int16s[4] 82 ColorTempUnknown? int16s 83 WB_RGGBLevelsUnknown2? int16s[4] 87 ColorTempUnknown2? int16s 88 WB_RGGBLevelsUnknown3? int16s[4] 92 ColorTempUnknown3? int16s 93 WB_RGGBLevelsUnknown4? int16s[4] 97 ColorTempUnknown4? int16s 98 WB_RGGBLevelsUnknown5? int16s[4] 102 ColorTempUnknown5? int16s 103 WB_RGGBLevelsUnknown6? int16s[4] 107 ColorTempUnknown6? int16s 108 WB_RGGBLevelsUnknown7? int16s[4] 112 ColorTempUnknown7? int16s 113 WB_RGGBLevelsUnknown8? int16s[4] 117 ColorTempUnknown8? int16s 118 WB_RGGBLevelsUnknown9? int16s[4] 122 ColorTempUnknown9? int16s 123 WB_RGGBLevelsUnknown10? int16s[4] 127 ColorTempUnknown10? int16s 128 WB_RGGBLevelsDaylight int16s[4] 132 ColorTempDaylight int16s 133 WB_RGGBLevelsShade int16s[4] 137 ColorTempShade int16s 138 WB_RGGBLevelsCloudy int16s[4] 142 ColorTempCloudy int16s 143 WB_RGGBLevelsTungsten int16s[4] 147 ColorTempTungsten int16s 148 WB_RGGBLevelsFluorescent int16s[4] 152 ColorTempFluorescent int16s 153 WB_RGGBLevelsKelvin int16s[4] 157 ColorTempKelvin int16s 158 WB_RGGBLevelsFlash int16s[4] 162 ColorTempFlash int16s 163 WB_RGGBLevelsUnknown11? int16s[4] 167 ColorTempUnknown11? int16s 168 WB_RGGBLevelsUnknown12? int16s[4] 172 ColorTempUnknown12? int16s 173 WB_RGGBLevelsUnknown13? int16s[4] 177 ColorTempUnknown13? int16s 178 WB_RGGBLevelsUnknown14? int16s[4] 182 ColorTempUnknown14? int16s 183 WB_RGGBLevelsUnknown15? int16s[4] 187 ColorTempUnknown15? int16s 188 WB_RGGBLevelsUnknown16? int16s[4] 192 ColorTempUnknown16? int16s 193 WB_RGGBLevelsUnknown17? int16s[4] 197 ColorTempUnknown17? int16s 198 WB_RGGBLevelsUnknown18? int16s[4] 202 ColorTempUnknown18? int16s 203 WB_RGGBLevelsUnknown19? int16s[4] 207 ColorTempUnknown19? int16s 208 WB_RGGBLevelsUnknown20? int16s[4] 212 ColorTempUnknown20? int16s 213 ColorCalib? Canon ColorCalib 276 AverageBlackLevel int16u[4] 429 RawMeasuredRGGB int32u[4] 504 PerChannelBlackLevel int16u[4] 508 NormalWhiteLevel int16u 509 SpecularWhiteLevel int16u 510 LinearityUpperMargin int16u 619 RawMeasuredRGGB int32u[4] 728 PerChannelBlackLevel int16u[4] 732 NormalWhiteLevel int16u 733 SpecularWhiteLevel int16u 734 LinearityUpperMargin int16u

Canon ColorData8 Tags

These tags are used by the EOS 1DXmkII, 5DS, 5DSR, 5DmkIV, 6DmkII, 77D, 80D, 200D, 800D, 1300D, 2000D, 4000D and 9000D.

Index2 Tag Name Writable —— ——– ——– 0 ColorDataVersion int16s 63 WB_RGGBLevelsAsShot int16s[4] 67 ColorTempAsShot int16s 68 WB_RGGBLevelsAuto int16s[4] 72 ColorTempAuto int16s 73 WB_RGGBLevelsMeasured int16s[4] 77 ColorTempMeasured int16s 78 WB_RGGBLevelsUnknown? int16s[4] 82 ColorTempUnknown? int16s 83 WB_RGGBLevelsUnknown2? int16s[4] 87 ColorTempUnknown2? int16s 88 WB_RGGBLevelsUnknown3? int16s[4] 92 ColorTempUnknown3? int16s 93 WB_RGGBLevelsUnknown4? int16s[4] 97 ColorTempUnknown4? int16s 98 WB_RGGBLevelsUnknown5? int16s[4] 102 ColorTempUnknown5? int16s 103 WB_RGGBLevelsUnknown6? int16s[4] 107 ColorTempUnknown6? int16s 108 WB_RGGBLevelsUnknown7? int16s[4] 112 ColorTempUnknown7? int16s 113 WB_RGGBLevelsUnknown8? int16s[4] 117 ColorTempUnknown8? int16s 118 WB_RGGBLevelsUnknown9? int16s[4] 122 ColorTempUnknown9? int16s 123 WB_RGGBLevelsUnknown10? int16s[4] 127 ColorTempUnknown10? int16s 128 WB_RGGBLevelsUnknown11? int16s[4] 132 ColorTempUnknown11? int16s 133 WB_RGGBLevelsDaylight int16s[4] 137 ColorTempDaylight int16s 138 WB_RGGBLevelsShade int16s[4] 142 ColorTempShade int16s 143 WB_RGGBLevelsCloudy int16s[4] 147 ColorTempCloudy int16s 148 WB_RGGBLevelsTungsten int16s[4] 152 ColorTempTungsten int16s 153 WB_RGGBLevelsFluorescent int16s[4] 157 ColorTempFluorescent int16s 158 WB_RGGBLevelsKelvin int16s[4] 162 ColorTempKelvin int16s 163 WB_RGGBLevelsFlash int16s[4] 167 ColorTempFlash int16s 168 WB_RGGBLevelsUnknown12? int16s[4] 172 ColorTempUnknown12? int16s 173 WB_RGGBLevelsUnknown13? int16s[4] 177 ColorTempUnknown13? int16s 178 WB_RGGBLevelsUnknown14? int16s[4] 182 ColorTempUnknown14? int16s 183 WB_RGGBLevelsUnknown15? int16s[4] 187 ColorTempUnknown15? int16s 188 WB_RGGBLevelsUnknown16? int16s[4] 192 ColorTempUnknown16? int16s 193 WB_RGGBLevelsUnknown17? int16s[4] 197 ColorTempUnknown17? int16s 198 WB_RGGBLevelsUnknown18? int16s[4] 202 ColorTempUnknown18? int16s 203 WB_RGGBLevelsUnknown19? int16s[4] 207 ColorTempUnknown19? int16s 208 WB_RGGBLevelsUnknown20? int16s[4] 212 ColorTempUnknown20? int16s 213 WB_RGGBLevelsUnknown21? int16s[4] 217 ColorTempUnknown21? int16s 218 WB_RGGBLevelsUnknown22? int16s[4] 222 ColorTempUnknown22? int16s 223 WB_RGGBLevelsUnknown23? int16s[4] 227 ColorTempUnknown23? int16s 228 WB_RGGBLevelsUnknown24? int16s[4] 232 ColorTempUnknown24? int16s 233 WB_RGGBLevelsUnknown25? int16s[4] 237 ColorTempUnknown25? int16s 238 WB_RGGBLevelsUnknown26? int16s[4] 242 ColorTempUnknown26? int16s 243 WB_RGGBLevelsUnknown27? int16s[4] 247 ColorTempUnknown27? int16s 248 WB_RGGBLevelsUnknown28? int16s[4] 252 ColorTempUnknown28? int16s 253 WB_RGGBLevelsUnknown29? int16s[4] 257 ColorTempUnknown29? int16s 258 WB_RGGBLevelsUnknown30? int16s[4] 262 ColorTempUnknown30? int16s 263 ColorCalib? Canon ColorCalib 326 AverageBlackLevel int16u[4] 556 PerChannelBlackLevel int16u[4] 560 NormalWhiteLevel int16u 561 SpecularWhiteLevel int16u 562 LinearityUpperMargin int16u 778 PerChannelBlackLevel int16u[4] 782 NormalWhiteLevel int16u 783 SpecularWhiteLevel int16u 784 LinearityUpperMargin int16u

Canon ColorData9 Tags

These tags are used by the M6mkII, M50, M200, EOS R, RP, 90D, 250D and 850D

Index2 Tag Name Writable —— ——– ——– 0 ColorDataVersion int16s 71 WB_RGGBLevelsAsShot int16s[4] 75 ColorTempAsShot int16s 76 WB_RGGBLevelsAuto int16s[4] 80 ColorTempAuto int16s 81 WB_RGGBLevelsMeasured int16s[4] 85 ColorTempMeasured int16s 86 WB_RGGBLevelsUnknown? int16s[4] 90 ColorTempUnknown? int16s 91 WB_RGGBLevelsUnknown2? int16s[4] 95 ColorTempUnknown2? int16s 96 WB_RGGBLevelsUnknown3? int16s[4] 100 ColorTempUnknown3? int16s 101 WB_RGGBLevelsUnknown4? int16s[4] 105 ColorTempUnknown4? int16s 106 WB_RGGBLevelsUnknown5? int16s[4] 110 ColorTempUnknown5? int16s 111 WB_RGGBLevelsUnknown6? int16s[4] 115 ColorTempUnknown6? int16s 116 WB_RGGBLevelsUnknown7? int16s[4] 120 ColorTempUnknown7? int16s 121 WB_RGGBLevelsUnknown8? int16s[4] 125 ColorTempUnknown8? int16s 126 WB_RGGBLevelsUnknown9? int16s[4] 130 ColorTempUnknown9? int16s 131 WB_RGGBLevelsUnknown10? int16s[4] 135 ColorTempUnknown10? int16s 136 WB_RGGBLevelsDaylight int16s[4] 140 ColorTempDaylight int16s 141 WB_RGGBLevelsShade int16s[4] 145 ColorTempShade int16s 146 WB_RGGBLevelsCloudy int16s[4] 150 ColorTempCloudy int16s 151 WB_RGGBLevelsTungsten int16s[4] 155 ColorTempTungsten int16s 156 WB_RGGBLevelsFluorescent int16s[4] 160 ColorTempFluorescent int16s 161 WB_RGGBLevelsKelvin int16s[4] 165 ColorTempKelvin int16s 166 WB_RGGBLevelsFlash int16s[4] 170 ColorTempFlash int16s 171 WB_RGGBLevelsUnknown11? int16s[4] 175 ColorTempUnknown11? int16s 176 WB_RGGBLevelsUnknown12? int16s[4] 180 ColorTempUnknown12? int16s 181 WB_RGGBLevelsUnknown13? int16s[4] 185 ColorTempUnknown13? int16s 186 WB_RGGBLevelsUnknown14? int16s[4] 190 ColorTempUnknown14? int16s 191 WB_RGGBLevelsUnknown15? int16s[4] 195 ColorTempUnknown15? int16s 196 WB_RGGBLevelsUnknown16? int16s[4] 200 ColorTempUnknown16? int16s 201 WB_RGGBLevelsUnknown17? int16s[4] 205 ColorTempUnknown17? int16s 206 WB_RGGBLevelsUnknown18? int16s[4] 210 ColorTempUnknown18? int16s 211 WB_RGGBLevelsUnknown19? int16s[4] 215 ColorTempUnknown19? int16s 216 WB_RGGBLevelsUnknown20? int16s[4] 220 ColorTempUnknown20? int16s 221 WB_RGGBLevelsUnknown21? int16s[4] 225 ColorTempUnknown21? int16s 226 WB_RGGBLevelsUnknown22? int16s[4] 230 ColorTempUnknown22? int16s 231 WB_RGGBLevelsUnknown23? int16s[4] 235 ColorTempUnknown23? int16s 236 WB_RGGBLevelsUnknown24? int16s[4] 240 ColorTempUnknown24? int16s 241 WB_RGGBLevelsUnknown25? int16s[4] 245 ColorTempUnknown25? int16s 246 WB_RGGBLevelsUnknown26? int16s[4] 250 ColorTempUnknown26? int16s 251 WB_RGGBLevelsUnknown27? int16s[4] 255 ColorTempUnknown27? int16s 256 WB_RGGBLevelsUnknown28? int16s[4] 260 ColorTempUnknown28? int16s 261 WB_RGGBLevelsUnknown29? int16s[4] 265 ColorTempUnknown29? int16s 266 ColorCalib? Canon ColorCalib 329 PerChannelBlackLevel int16u[4] 796 NormalWhiteLevel int16u 797 SpecularWhiteLevel int16u 798 LinearityUpperMargin int16u

Canon ColorData10 Tags

These tags are used by the R5, R5 and EOS 1DXmkIII.

Index2 Tag Name Writable —— ——– ——– 0 ColorDataVersion int16s 85 WB_RGGBLevelsAsShot int16s[4] 89 ColorTempAsShot int16s 90 WB_RGGBLevelsAuto int16s[4] 94 ColorTempAuto int16s 95 WB_RGGBLevelsMeasured int16s[4] 99 ColorTempMeasured int16s 100 WB_RGGBLevelsUnknown? int16s[4] 104 ColorTempUnknown? int16s 105 WB_RGGBLevelsUnknown2? int16s[4] 109 ColorTempUnknown2? int16s 110 WB_RGGBLevelsUnknown3? int16s[4] 114 ColorTempUnknown3? int16s 115 WB_RGGBLevelsUnknown4? int16s[4] 119 ColorTempUnknown4? int16s 120 WB_RGGBLevelsUnknown5? int16s[4] 124 ColorTempUnknown5? int16s 125 WB_RGGBLevelsUnknown6? int16s[4] 129 ColorTempUnknown6? int16s 130 WB_RGGBLevelsUnknown7? int16s[4] 134 ColorTempUnknown7? int16s 135 WB_RGGBLevelsUnknown8? int16s[4] 139 ColorTempUnknown8? int16s 140 WB_RGGBLevelsUnknown9? int16s[4] 144 ColorTempUnknown9? int16s 145 WB_RGGBLevelsUnknown10? int16s[4] 149 ColorTempUnknown10? int16s 150 WB_RGGBLevelsDaylight int16s[4] 154 ColorTempDaylight int16s 155 WB_RGGBLevelsShade int16s[4] 159 ColorTempShade int16s 160 WB_RGGBLevelsCloudy int16s[4] 164 ColorTempCloudy int16s 165 WB_RGGBLevelsTungsten int16s[4] 169 ColorTempTungsten int16s 170 WB_RGGBLevelsFluorescent int16s[4] 174 ColorTempFluorescent int16s 175 WB_RGGBLevelsKelvin int16s[4] 179 ColorTempKelvin int16s 180 WB_RGGBLevelsFlash int16s[4] 184 ColorTempFlash int16s 185 WB_RGGBLevelsUnknown11? int16s[4] 189 ColorTempUnknown11? int16s 190 WB_RGGBLevelsUnknown12? int16s[4] 194 ColorTempUnknown12? int16s 195 WB_RGGBLevelsUnknown13? int16s[4] 199 ColorTempUnknown13? int16s 200 WB_RGGBLevelsUnknown14? int16s[4] 204 ColorTempUnknown14? int16s 205 WB_RGGBLevelsUnknown15? int16s[4] 209 ColorTempUnknown15? int16s 210 WB_RGGBLevelsUnknown16? int16s[4] 214 ColorTempUnknown16? int16s 215 WB_RGGBLevelsUnknown17? int16s[4] 219 ColorTempUnknown17? int16s 220 WB_RGGBLevelsUnknown18? int16s[4] 224 ColorTempUnknown18? int16s 225 WB_RGGBLevelsUnknown19? int16s[4] 229 ColorTempUnknown19? int16s 230 WB_RGGBLevelsUnknown20? int16s[4] 234 ColorTempUnknown20? int16s 235 WB_RGGBLevelsUnknown21? int16s[4] 239 ColorTempUnknown21? int16s 240 WB_RGGBLevelsUnknown22? int16s[4] 244 ColorTempUnknown22? int16s 245 WB_RGGBLevelsUnknown23? int16s[4] 249 ColorTempUnknown23? int16s 250 WB_RGGBLevelsUnknown24? int16s[4] 254 ColorTempUnknown24? int16s 255 WB_RGGBLevelsUnknown25? int16s[4] 259 ColorTempUnknown25? int16s 260 WB_RGGBLevelsUnknown26? int16s[4] 264 ColorTempUnknown26? int16s 265 WB_RGGBLevelsUnknown27? int16s[4] 269 ColorTempUnknown27? int16s 270 WB_RGGBLevelsUnknown28? int16s[4] 274 ColorTempUnknown28? int16s 275 WB_RGGBLevelsUnknown29? int16s[4] 279 ColorTempUnknown29? int16s 280 ColorCalib? Canon ColorCalib 343 PerChannelBlackLevel int16u[4] 810 NormalWhiteLevel int16u 811 SpecularWhiteLevel int16u 812 LinearityUpperMargin int16u

Canon ColorData11 Tags

These tags are used by the EOS R3, R7 and R6mkII

Index2 Tag Name Writable —— ——– ——– 0 ColorDataVersion int16s 105 WB_RGGBLevelsAsShot int16s[4] 109 ColorTempAsShot int16s 110 WB_RGGBLevelsAuto int16s[4] 114 ColorTempAuto int16s 115 WB_RGGBLevelsMeasured int16s[4] 119 ColorTempMeasured int16s 120 WB_RGGBLevelsUnknown? int16s[4] 124 ColorTempUnknown? int16s 125 WB_RGGBLevelsUnknown2? int16s[4] 129 ColorTempUnknown2? int16s 130 WB_RGGBLevelsUnknown3? int16s[4] 134 ColorTempUnknown3? int16s 135 WB_RGGBLevelsUnknown4? int16s[4] 139 ColorTempUnknown4? int16s 140 WB_RGGBLevelsUnknown5? int16s[4] 144 ColorTempUnknown5? int16s 145 WB_RGGBLevelsUnknown6? int16s[4] 149 ColorTempUnknown6? int16s 150 WB_RGGBLevelsUnknown7? int16s[4] 154 ColorTempUnknown7? int16s 155 WB_RGGBLevelsUnknown8? int16s[4] 159 ColorTempUnknown8? int16s 160 WB_RGGBLevelsUnknown9? int16s[4] 164 ColorTempUnknown9? int16s 165 WB_RGGBLevelsUnknown10? int16s[4] 169 ColorTempUnknown10? int16s 170 WB_RGGBLevelsUnknown11? int16s[4] 174 ColorTempUnknown11? int16s 175 WB_RGGBLevelsUnknown11? int16s[4] 179 ColorTempUnknown11? int16s 180 WB_RGGBLevelsUnknown12? int16s[4] 184 ColorTempUnknown12? int16s 185 WB_RGGBLevelsUnknown13? int16s[4] 189 ColorTempUnknown13? int16s 190 WB_RGGBLevelsUnknown14? int16s[4] 194 ColorTempUnknown14? int16s 195 WB_RGGBLevelsUnknown15? int16s[4] 199 ColorTempUnknown15? int16s 200 WB_RGGBLevelsUnknown16? int16s[4] 204 ColorTempUnknown16? int16s 205 WB_RGGBLevelsDaylight int16s[4] 209 ColorTempDaylight int16s 210 WB_RGGBLevelsShade int16s[4] 214 ColorTempShade int16s 215 WB_RGGBLevelsCloudy int16s[4] 219 ColorTempCloudy int16s 220 WB_RGGBLevelsTungsten int16s[4] 224 ColorTempTungsten int16s 225 WB_RGGBLevelsFluorescent int16s[4] 229 ColorTempFluorescent int16s 230 WB_RGGBLevelsKelvin int16s[4] 234 ColorTempKelvin int16s 235 WB_RGGBLevelsFlash int16s[4] 239 ColorTempFlash int16s 240 WB_RGGBLevelsUnknown17? int16s[4] 244 ColorTempUnknown17? int16s 245 WB_RGGBLevelsUnknown18? int16s[4] 249 ColorTempUnknown18? int16s 250 WB_RGGBLevelsUnknown19? int16s[4] 254 ColorTempUnknown19? int16s 255 WB_RGGBLevelsUnknown20? int16s[4] 259 ColorTempUnknown20? int16s 260 WB_RGGBLevelsUnknown21? int16s[4] 264 ColorTempUnknown21? int16s 265 WB_RGGBLevelsUnknown22? int16s[4] 269 ColorTempUnknown22? int16s 270 WB_RGGBLevelsUnknown23? int16s[4] 274 ColorTempUnknown23? int16s 275 WB_RGGBLevelsUnknown24? int16s[4] 279 ColorTempUnknown24? int16s 280 WB_RGGBLevelsUnknown25? int16s[4] 284 ColorTempUnknown25? int16s 285 WB_RGGBLevelsUnknown26? int16s[4] 289 ColorTempUnknown26? int16s 290 WB_RGGBLevelsUnknown27? int16s[4] 294 ColorTempUnknown27? int16s 300 ColorCalib? Canon ColorCalib 363 PerChannelBlackLevel int16u[4] 640 NormalWhiteLevel int16u 641 SpecularWhiteLevel int16u 642 LinearityUpperMargin int16u

Canon ColorDataUnknown Tags

Index2 Tag Name Writable —— ——– ——– 0 ColorDataVersion no

Canon ColorInfo Tags

Index2 Tag Name Writable —— ——– ——– 1 Saturation int16s 2 ColorTone int16s 3 ColorSpace int16s

Canon AFMicroAdj Tags

Index4 Tag Name Writable —— ——– ——– 1 AFMicroAdjMode int32s 2 AFMicroAdjValue rational64s

Canon VignettingCorr Tags

This information is found in images from newer EOS models.

Index2 Tag Name Writable —— ——– ——– 0 VignettingCorrVersion no 2 PeripheralLighting int16s 3 DistortionCorrection int16s 4 ChromaticAberrationCorr int16s 5 ChromaticAberrationCorr int16s 6 PeripheralLightingValue int16s 9 DistortionCorrectionValue int16s 11 OriginalImageWidth int16s 12 OriginalImageHeight int16s

Canon VignettingCorrUnknown Tags

Vignetting correction from PowerShot models.

Index2 Tag Name Writable —— ——– ——– 0 VignettingCorrVersion no

Canon VignettingCorr2 Tags

Index4 Tag Name Writable —— ——– ——– 5 PeripheralLightingSetting int32s 6 ChromaticAberrationSetting int32s 7 DistortionCorrectionSetting int32s 9 DigitalLensOptimizerSetting int32s

Canon LightingOpt Tags

This information is new in images from the EOS 7D.

Index4 Tag Name Writable —— ——– ——– 1 PeripheralIlluminationCorr int32s 2 AutoLightingOptimizer int32s 3 HighlightTonePriority int32s 4 LongExposureNoiseReduction int32s 5 HighISONoiseReduction int32s 10 DigitalLensOptimizer int32s 11 DualPixelRaw int32s

Canon LensInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 LensSerialNumber undef[5]

Canon Ambience Tags

Index4 Tag Name Writable —— ——– ——– 1 AmbienceSelection int32s

Canon MultiExp Tags

Index4 Tag Name Writable —— ——– ——– 1 MultiExposure int32s 2 MultiExposureControl int32s 3 MultiExposureShots int32s

Canon FilterInfo Tags

Information about creative filter settings.

Tag ID Tag Name Writable —— ——– ——– 0x0101 GrainyBWFilter no 0x0201 SoftFocusFilter no 0x0301 ToyCameraFilter no 0x0401 MiniatureFilter no 0x0402 MiniatureFilterOrientation no 0x0403 MiniatureFilterPosition no 0x0404 MiniatureFilterParameter no 0x0501 FisheyeFilter no 0x0601 PaintingFilter no 0x0701 WatercolorFilter no

Canon HDRInfo Tags

Index4 Tag Name Writable —— ——– ——– 1 HDR int32s 2 HDREffect int32s

Canon LogInfo Tags

Index4 Tag Name Writable —— ——– ——– 4 CompressionFormat int32s 6 Sharpness int32s 7 Saturation int32s 8 ColorTone int32s 9 ColorSpace2 int32s 10 ColorMatrix int32s 11 CanonLogVersion int32s

Canon AFConfig Tags

Index4 Tag Name Writable —— ——– ——– 1 AFConfigTool int32s 2 AFTrackingSensitivity int32s 3 AFAccelDecelTracking int32s 4 AFPointSwitching int32s 5 AIServoFirstImage int32s 6 AIServoSecondImage int32s 7 USMLensElectronicMF int32s 8 AFAssistBeam int32s 9 OneShotAFRelease int32s 10 AutoAFPointSelEOSiTRAF int32s 11 LensDriveWhenAFImpossible int32s 12 SelectAFAreaSelectionMode int32s 13 AFAreaSelectionMethod int32s 14 OrientationLinkedAF int32s 15 ManualAFPointSelPattern int32s 16 AFPointDisplayDuringFocus int32s 17 VFDisplayIllumination int32s 18 AFStatusViewfinder int32s 19 InitialAFPointInServo int32s

Canon RawBurstInfo Tags

Index4 Tag Name Writable —— ——– ——– 1 RawBurstImageNum int32u 2 RawBurstImageCount int32u

Canon CTMD Tags

Canon Timed MetaData tags found in CR3 images. The ExtractEmbedded option is automatically applied when reading CR3 files to be able to extract this information.

Tag ID Tag Name Writable —— ——– ——– 0x0001 TimeStamp no 0x0004 FocalInfo Canon FocalInfo 0x0005 ExposureInfo Canon ExposureInfo 0x0007 ExifInfo7 Canon ExifInfo 0x0008 ExifInfo8 Canon ExifInfo 0x0009 ExifInfo9 Canon ExifInfo

Canon FocalInfo Tags

Index4 Tag Name Writable —— ——– ——– 0 FocalLength no

Canon ExposureInfo Tags

Index4 Tag Name Writable —— ——– ——– 0 FNumber no 1 ExposureTime no 2 ISO no

Canon ExifInfo Tags

Tag ID Tag Name Writable —— ——– ——– 0x8769 ExifIFD EXIF 0x927c MakerNoteCanon Canon

Canon CDI1 Tags

Tag ID Tag Name Writable —— ——– ——– IAD1 IAD1 Canon IAD1

Canon IAD1 Tags

Index2 Tag Name Writable —— ——– ——– [no tags known]

Canon CMP1 Tags

Index2 Tag Name Writable —— ——– ——– 8 ImageWidth no 10 ImageHeight no

Canon CNOP Tags

Tag ID Tag Name Writable —— ——– ——– [no tags known]

Canon CNTH Tags

Canon-specific QuickTime tags found in the CNTH atom of MOV/MP4 videos from some cameras.

Tag ID Tag Name Writable —— ——– ——– CNDA ThumbnailImage undef

Canon uuid Tags

Tags extracted from the uuid atom of MP4 videos from cameras such as the SX280, and CR3 images from cameras such as the EOS M50.

Tag ID Tag Name Writable —— ——– ——– CCTP CanonCCTP Canon CCTP CMT1 IFD0 EXIF CMT2 ExifIFD EXIF CMT3 MakerNoteCanon Canon CMT4 GPSInfo GPS CNCV CompressorVersion no CNOP CanonCNOP Canon CNOP CNTH CanonCNTH Canon CNTH THMB ThumbnailImage no

Canon CCTP Tags

Tag ID Tag Name Writable —— ——– ——– [no tags known]

Canon Skip Tags

Information found in the “skip” atom of Canon MOV videos.

Tag ID Tag Name Writable —— ——– ——– CNDB Unknown_CNDB? no

Canon uuid2 Tags

Tag ID Tag Name Writable —— ——– ——– CNOP CanonVRD CanonVRD

CanonCustom Tags

CanonCustom Functions1D Tags

These custom functions are used by all 1D models up to but not including the Mark III.

Tag ID Tag Name Writable —— ——– ——– 0 FocusingScreen int8u 1 FinderDisplayDuringExposure int8u 2 ShutterReleaseNoCFCard int8u 3 ISOSpeedExpansion int8u 4 ShutterAELButton int8u 5 ManualTv int8u 6 ExposureLevelIncrements int8u 7 USMLensElectronicMF int8u 8 LCDPanels int8u 9 AEBSequenceAutoCancel int8u 10 AFPointIllumination int8u 11 AFPointSelection int8u 12 MirrorLockup int8u 13 AFPointSpotMetering int8u 14 FillFlashAutoReduction int8u 15 ShutterCurtainSync int8u 16 SafetyShiftInAvOrTv int8u 17 AFPointActivationArea int8u 18 SwitchToRegisteredAFPoint int8u 19 LensAFStopButton int8u 20 AIServoTrackingSensitivity int8u 21 AIServoContinuousShooting int8u

CanonCustom Functions5D Tags

Tag ID Tag Name Writable —— ——– ——– 0 FocusingScreen int8u 1 SetFunctionWhenShooting int8u 2 LongExposureNoiseReduction int8u 3 FlashSyncSpeedAv int8u 4 Shutter-AELock int8u 5 AFAssistBeam int8u 6 ExposureLevelIncrements int8u 7 FlashFiring int8u 8 ISOExpansion int8u 9 AEBSequenceAutoCancel int8u 10 SuperimposedDisplay int8u 11 MenuButtonDisplayPosition int8u 12 MirrorLockup int8u 13 AFPointSelectionMethod int8u 14 ETTLII int8u 15 ShutterCurtainSync int8u 16 SafetyShiftInAvOrTv int8u 17 AFPointActivationArea int8u 18 LCDDisplayReturnToShoot int8u 19 LensAFStopButton int8u 20 AddOriginalDecisionData int8u

CanonCustom Functions10D Tags

Tag ID Tag Name Writable —— ——– ——– 1 SetButtonWhenShooting int8u 2 ShutterReleaseNoCFCard int8u 3 FlashSyncSpeedAv int8u 4 Shutter-AELock int8u 5 AFAssist int8u 6 ExposureLevelIncrements int8u 7 AFPointRegistration int8u 8 RawAndJpgRecording int8u 9 AEBSequenceAutoCancel int8u 10 SuperimposedDisplay int8u 11 MenuButtonDisplayPosition int8u 12 MirrorLockup int8u 13 AssistButtonFunction int8u 14 FillFlashAutoReduction int8u 15 ShutterCurtainSync int8u 16 SafetyShiftInAvOrTv int8u 17 LensAFStopButton int8u

CanonCustom Functions20D Tags

Tag ID Tag Name Writable —— ——– ——– 0 SetFunctionWhenShooting int8u 1 LongExposureNoiseReduction int8u 2 FlashSyncSpeedAv int8u 3 Shutter-AELock int8u 4 AFAssistBeam int8u 5 ExposureLevelIncrements int8u 6 FlashFiring int8u 7 ISOExpansion int8u 8 AEBSequenceAutoCancel int8u 9 SuperimposedDisplay int8u 10 MenuButtonDisplayPosition int8u 11 MirrorLockup int8u 12 AFPointSelectionMethod int8u 13 ETTLII int8u 14 ShutterCurtainSync int8u 15 SafetyShiftInAvOrTv int8u 16 LensAFStopButton int8u 17 AddOriginalDecisionData int8u

CanonCustom Functions30D Tags

Tag ID Tag Name Writable —— ——– ——– 1 SetFunctionWhenShooting int8u 2 LongExposureNoiseReduction int8u 3 FlashSyncSpeedAv int8u 4 Shutter-AELock int8u 5 AFAssistBeam int8u 6 ExposureLevelIncrements int8u 7 FlashFiring int8u 8 ISOExpansion int8u 9 AEBSequenceAutoCancel int8u 10 SuperimposedDisplay int8u 11 MenuButtonDisplayPosition int8u 12 MirrorLockup int8u 13 AFPointSelectionMethod int8u 14 ETTLII int8u 15 ShutterCurtainSync int8u 16 SafetyShiftInAvOrTv int8u 17 MagnifiedView int8u 18 LensAFStopButton int8u 19 AddOriginalDecisionData int8u

CanonCustom Functions350D Tags

Tag ID Tag Name Writable —— ——– ——– 0 SetButtonCrossKeysFunc int8u 1 LongExposureNoiseReduction int8u 2 FlashSyncSpeedAv int8u 3 Shutter-AELock int8u 4 AFAssistBeam int8u 5 ExposureLevelIncrements int8u 6 MirrorLockup int8u 7 ETTLII int8u 8 ShutterCurtainSync int8u

CanonCustom Functions400D Tags

Tag ID Tag Name Writable —— ——– ——– 0 SetButtonCrossKeysFunc int8u 1 LongExposureNoiseReduction int8u 2 FlashSyncSpeedAv int8u 3 Shutter-AELock int8u 4 AFAssistBeam int8u 5 ExposureLevelIncrements int8u 6 MirrorLockup int8u 7 ETTLII int8u 8 ShutterCurtainSync int8u 9 MagnifiedView int8u 10 LCDDisplayAtPowerOn int8u

CanonCustom FunctionsD30 Tags

Custom functions for the EOS D30 and D60.

Tag ID Tag Name Writable —— ——– ——– 1 LongExposureNoiseReduction int8u 2 Shutter-AELock int8u 3 MirrorLockup int8u 4 ExposureLevelIncrements int8u 5 AFAssist int8u 6 FlashSyncSpeedAv int8u 7 AEBSequenceAutoCancel int8u 8 ShutterCurtainSync int8u 9 LensAFStopButton int8u 10 FillFlashAutoReduction int8u 11 MenuButtonReturn int8u 12 SetButtonWhenShooting int8u 13 SensorCleaning int8u 14 SuperimposedDisplay int8u 15 ShutterReleaseNoCFCard int8u

CanonCustom FuncsUnknown Tags

Tag ID Tag Name Writable —— ——– ——– [no tags known]

CanonCustom PersonalFuncs Tags

Personal function settings for the EOS-1D.

Index2 Tag Name Writable —— ——– ——– 1 PF0CustomFuncRegistration int16u 2 PF1DisableShootingModes int16u 3 PF2DisableMeteringModes int16u 4 PF3ManualExposureMetering int16u 5 PF4ExposureTimeLimits int16u 6 PF5ApertureLimits int16u 7 PF6PresetShootingModes int16u 8 PF7BracketContinuousShoot int16u 9 PF8SetBracketShots int16u 10 PF9ChangeBracketSequence int16u 11 PF10RetainProgramShift int16u 14 PF13DrivePriority int16u 15 PF14DisableFocusSearch int16u 16 PF15DisableAFAssistBeam int16u 17 PF16AutoFocusPointShoot int16u 18 PF17DisableAFPointSel int16u 19 PF18EnableAutoAFPointSel int16u 20 PF19ContinuousShootSpeed int16u 21 PF20LimitContinousShots int16u 22 PF21EnableQuietOperation int16u 24 PF23SetTimerLengths int16u 25 PF24LightLCDDuringBulb int16u 26 PF25DefaultClearSettings int16u 27 PF26ShortenReleaseLag int16u 28 PF27ReverseDialRotation int16u 29 PF28NoQuickDialExpComp int16u 30 PF29QuickDialSwitchOff int16u 31 PF30EnlargementMode int16u 32 PF31OriginalDecisionData int16u

CanonCustom PersonalFuncValues Tags

Index2 Tag Name Writable —— ——– ——– 1 PF1Value int16u 2 PF2Value int16u 3 PF3Value int16u 4 PF4ExposureTimeMin int16u 5 PF4ExposureTimeMax int16u 6 PF5ApertureMin int16u 7 PF5ApertureMax int16u 8 PF8BracketShots int16u 9 PF19ShootingSpeedLow int16u 10 PF19ShootingSpeedHigh int16u 11 PF20MaxContinousShots int16u 12 PF23ShutterButtonTime int16u 13 PF23FELockTime int16u 14 PF23PostReleaseTime int16u 15 PF25AEMode int16u 16 PF25MeteringMode int16u 17 PF25DriveMode int16u 18 PF25AFMode int16u 19 PF25AFPointSel int16u 20 PF25ImageSize int16u 21 PF25WBMode int16u 22 PF25Parameters int16u 23 PF25ColorMatrix int16u 24 PF27Value int16u

CanonCustom Functions2 Tags

Beginning with the EOS 1D Mark III, Canon finally created a set of custom function tags which are (reasonably) consistent across models. The EOS 1D Mark III has 57 custom function tags divided into four main groups: 1. Exposure (0x0101-0x010f), 2. Image (0x0201-0x0203), Flash Exposure (0x0304-0x0306) and Display (0x0407-0x0409), 3. Auto Focus (0x0501-0x050e) and Drive (0x060f-0x0611), and 4. Operation (0x0701-0x070a) and Others (0x080b-0x0810). The table below lists tags used by the EOS 1D Mark III, as well as newer tags and values added by later models.

Tag ID Tag Name Writable —— ——– ——– 0x0101 ExposureLevelIncrements int32s 0x0102 ISOSpeedIncrements int32s 0x0103 ISOSpeedRange int32s[3] ISOExpansion int32s 0x0104 AEBAutoCancel int32s 0x0105 AEBSequence int32s 0x0106 AEBShotCount int32s AEBShotCount int32s[2] 0x0107 SpotMeterLinkToAFPoint int32s 0x0108 SafetyShift int32s 0x0109 UsableShootingModes int32s UsableShootingModes int32s[2] 0x010a UsableMeteringModes int32s UsableMeteringModes int32s[2] 0x010b ExposureModeInManual int32s 0x010c ShutterSpeedRange int32s[3] ShutterSpeedRange int32s[4] 0x010d ApertureRange int32s[3] ApertureRange int32s[4] 0x010e ApplyShootingMeteringMode int32s[8] 0x010f FlashSyncSpeedAv int32s 0x0110 AEMicroadjustment int32s[3] 0x0111 FEMicroadjustment int32s[3] 0x0112 SameExposureForNewAperture int32s 0x0113 ExposureCompAutoCancel int32s 0x0114 AELockMeterModeAfterFocus int32s 0x0201 LongExposureNoiseReduction int32s 0x0202 HighISONoiseReduction int32s 0x0203 HighlightTonePriority int32s 0x0204 AutoLightingOptimizer int32s 0x0304 ETTLII int32s 0x0305 ShutterCurtainSync int32s 0x0306 FlashFiring int32s 0x0407 ViewInfoDuringExposure int32s 0x0408 LCDIlluminationDuringBulb int32s 0x0409 InfoButtonWhenShooting int32s 0x040a ViewfinderWarnings int32s 0x040b LVShootingAreaDisplay int32s 0x040c LVShootingAreaDisplay int32s 0x0501 USMLensElectronicMF int32s 0x0502 AIServoTrackingSensitivity int32s 0x0503 AIServoImagePriority int32s 0x0504 AIServoTrackingMethod int32s 0x0505 LensDriveNoAF int32s 0x0506 LensAFStopButton int32s 0x0507 AFMicroadjustment int32s[5] 0x0508 AFPointAreaExpansion int32s 0x0509 SelectableAFPoint int32s 0x050a SwitchToRegisteredAFPoint int32s 0x050b AFPointAutoSelection int32s 0x050c AFPointDisplayDuringFocus int32s 0x050d AFPointBrightness int32s 0x050e AFAssistBeam int32s 0x050f AFPointSelectionMethod int32s 0x0510 VFDisplayIllumination int32s SuperimposedDisplay int32s 0x0511 AFDuringLiveView int32s 0x0512 SelectAFAreaSelectMode int32s 0x0513 ManualAFPointSelectPattern int32s 0x0514 DisplayAllAFPoints int32s 0x0515 FocusDisplayAIServoAndMF int32s 0x0516 OrientationLinkedAFPoint int32s 0x0517 MultiControllerWhileMetering int32s 0x0518 AccelerationTracking int32s 0x0519 AIServoFirstImagePriority int32s 0x051a AIServoSecondImagePriority int32s 0x051b AFAreaSelectMethod int32s 0x051c AutoAFPointColorTracking int32s 0x051d VFDisplayIllumination int32s 0x051e InitialAFPointAIServoAF int32s 0x060f MirrorLockup int32s 0x0610 ContinuousShootingSpeed int32s[6] ContinuousShootingSpeed int32s[5] ContinuousShootingSpeed int32s[3] 0x0611 ContinuousShotLimit int32s[2] 0x0612 RestrictDriveModes int32s RestrictDriveModes int32s[2] 0x0701 Shutter-AELock int32s AFAndMeteringButtons int32s ShutterButtonAFOnButton int32s 0x0702 AFOnAELockButtonSwitch int32s 0x0703 QuickControlDialInMeter int32s 0x0704 SetButtonWhenShooting int32s 0x0705 ManualTv int32s 0x0706 DialDirectionTvAv int32s 0x0707 AvSettingWithoutLens int32s 0x0708 WBMediaImageSizeSetting int32s 0x0709 LockMicrophoneButton int32s 0x070a ButtonFunctionControlOff int32s 0x070b AssignFuncButton int32s 0x070c CustomControls int32s 0x070d StartMovieShooting int32s 0x070e FlashButtonFunction int32s 0x070f MultiFunctionLock int32s 0x0710 TrashButtonFunction int32s 0x0711 ShutterReleaseWithoutLens int32s 0x0712 ControlRingRotation int32s 0x0713 FocusRingRotation int32s 0x0714 RFLensMFFocusRingSensitivity int32s 0x0715 CustomizeDials int32s 0x080b FocusingScreen int32s 0x080c TimerLength int32s[3] TimerLength int32s[4] 0x080d ShortReleaseTimeLag int32s 0x080e AddAspectRatioInfo int32s 0x080f AddOriginalDecisionData int32s 0x0810 LiveViewExposureSimulation int32s 0x0811 LCDDisplayAtPowerOn int32s 0x0812 MemoAudioQuality int32s 0x0813 DefaultEraseOption int32s 0x0814 RetractLensOnPowerOff int32s 0x0815 AddIPTCInformation int32s 0x0816 AudioCompression int32s

CanonVRD Tags

Canon Digital Photo Professional writes VRD (Recipe Data) information as a trailer record to JPEG, TIFF, CRW and CR2 images, or as stand-alone VRD or DR4 files. The tags listed below represent information found in these records. The complete VRD/DR4 data record may be accessed as a block using the Extra ‘CanonVRD’ or ‘CanonDR4’ tag, but this tag is not extracted or copied unless specified explicitly.

Tag ID Tag Name Writable —— ——– ——– 0xffff00f4 EditData CanonVRD Edit 0xffff00f5 IHLData CanonVRD IHL 0xffff00f6 XMP XMP 0xffff00f7 Edit4Data CanonVRD Edit4

CanonVRD Edit Tags

Canon VRD edit information.

Index Tag Name Writable —– ——– ——– 0 VRD1 CanonVRD Ver1 1 VRDStampTool CanonVRD StampTool 2 VRD2 CanonVRD Ver2

CanonVRD Ver1 Tags

Index1 Tag Name Writable —— ——– ——– 2 VRDVersion no 6 WBAdjRGGBLevels int16u[4] 24 WhiteBalanceAdj int16u 26 WBAdjColorTemp int16u 36 WBFineTuneActive int16u 40 WBFineTuneSaturation int16u 44 WBFineTuneTone int16u 46 RawColorAdj int16u 48 RawCustomSaturation int32s 52 RawCustomTone int32s 56 RawBrightnessAdj int32s 60 ToneCurveProperty int16u 122 DynamicRangeMin int16u 124 DynamicRangeMax int16u 272 ToneCurveActive int16u 275 ToneCurveMode int8u 276 BrightnessAdj int8s 277 ContrastAdj int8s 278 SaturationAdj int16s 286 ColorToneAdj int32s 294 LuminanceCurvePoints int16u[21] 336 LuminanceCurveLimits int16u[4] 345 ToneCurveInterpolation int8u 352 RedCurvePoints int16u[21] 394 RedCurveLimits int16u[4] 410 GreenCurvePoints int16u[21] 452 GreenCurveLimits int16u[4] 468 BlueCurvePoints int16u[21] 510 BlueCurveLimits int16u[4] 526 RGBCurvePoints int16u[21] 568 RGBCurveLimits int16u[4] 580 CropActive int16u 582 CropLeft int16u 584 CropTop int16u 586 CropWidth int16u 588 CropHeight int16u 602 SharpnessAdj int16u 608 CropAspectRatio int16u 610 ConstrainedCropWidth float 614 ConstrainedCropHeight float 618 CheckMark int16u 622 Rotation int16u 624 WorkColorSpace int16u

CanonVRD StampTool Tags

Index1 Tag Name Writable —— ——– ——– 0 StampToolCount no

CanonVRD Ver2 Tags

Tags added in DPP version 2.0 and later.

Index2 Tag Name Writable —— ——– ——– 2 PictureStyle int16s 3 IsCustomPictureStyle int16s 13 StandardRawColorTone int16s 14 StandardRawSaturation int16s 15 StandardRawContrast int16s 16 StandardRawLinear int16s 17 StandardRawSharpness int16s 18 StandardRawHighlightPoint int16s 19 StandardRawShadowPoint int16s 20 StandardOutputHighlightPoint int16s 21 StandardOutputShadowPoint int16s 22 PortraitRawColorTone int16s 23 PortraitRawSaturation int16s 24 PortraitRawContrast int16s 25 PortraitRawLinear int16s 26 PortraitRawSharpness int16s 27 PortraitRawHighlightPoint int16s 28 PortraitRawShadowPoint int16s 29 PortraitOutputHighlightPoint int16s 30 PortraitOutputShadowPoint int16s 31 LandscapeRawColorTone int16s 32 LandscapeRawSaturation int16s 33 LandscapeRawContrast int16s 34 LandscapeRawLinear int16s 35 LandscapeRawSharpness int16s 36 LandscapeRawHighlightPoint int16s 37 LandscapeRawShadowPoint int16s 38 LandscapeOutputHighlightPoint int16s 39 LandscapeOutputShadowPoint int16s 40 NeutralRawColorTone int16s 41 NeutralRawSaturation int16s 42 NeutralRawContrast int16s 43 NeutralRawLinear int16s 44 NeutralRawSharpness int16s 45 NeutralRawHighlightPoint int16s 46 NeutralRawShadowPoint int16s 47 NeutralOutputHighlightPoint int16s 48 NeutralOutputShadowPoint int16s 49 FaithfulRawColorTone int16s 50 FaithfulRawSaturation int16s 51 FaithfulRawContrast int16s 52 FaithfulRawLinear int16s 53 FaithfulRawSharpness int16s 54 FaithfulRawHighlightPoint int16s 55 FaithfulRawShadowPoint int16s 56 FaithfulOutputHighlightPoint int16s 57 FaithfulOutputShadowPoint int16s 58 MonochromeFilterEffect int16s 59 MonochromeToningEffect int16s 60 MonochromeContrast int16s 61 MonochromeLinear int16s 62 MonochromeSharpness int16s 63 MonochromeRawHighlightPoint int16s 64 MonochromeRawShadowPoint int16s 65 MonochromeOutputHighlightPoint int16s 66 MonochromeOutputShadowPoint int16s 69 UnknownContrast? int16s 70 UnknownLinear? int16s 71 UnknownSharpness? int16s 72 UnknownRawHighlightPoint? int16s 73 UnknownRawShadowPoint? int16s 74 UnknownOutputHighlightPoint? int16s 75 UnknownOutputShadowPoint? int16s 76 CustomColorTone int16s 77 CustomSaturation int16s 78 CustomContrast int16s 79 CustomLinear int16s 80 CustomSharpness int16s 81 CustomRawHighlightPoint int16s 82 CustomRawShadowPoint int16s 83 CustomOutputHighlightPoint int16s 84 CustomOutputShadowPoint int16s 88 CustomPictureStyleData no 94 ChrominanceNoiseReduction int16s 95 LuminanceNoiseReduction int16s 96 ChrominanceNR_TIFF_JPEG int16s 98 ChromaticAberrationOn int16s 99 DistortionCorrectionOn int16s 100 PeripheralIlluminationOn int16s 101 ColorBlur int16s 102 ChromaticAberration int16s 103 DistortionCorrection int16s 104 PeripheralIllumination int16s 105 AberrationCorrectionDistance int16s 106 ChromaticAberrationRed int16s 107 ChromaticAberrationBlue int16s 109 LuminanceNR_TIFF_JPEG int16s 110 AutoLightingOptimizerOn int16s 111 AutoLightingOptimizer int16s 117 StandardRawHighlight int16s 118 PortraitRawHighlight int16s 119 LandscapeRawHighlight int16s 120 NeutralRawHighlight int16s 121 FaithfulRawHighlight int16s 122 MonochromeRawHighlight int16s 123 UnknownRawHighlight? int16s 124 CustomRawHighlight int16s 126 StandardRawShadow int16s 127 PortraitRawShadow int16s 128 LandscapeRawShadow int16s 129 NeutralRawShadow int16s 130 FaithfulRawShadow int16s 131 MonochromeRawShadow int16s 132 UnknownRawShadow? int16s 133 CustomRawShadow int16s 139 AngleAdj int32s 142 CheckMark2 int16u 144 UnsharpMask int16s 146 StandardUnsharpMaskStrength int16s 148 StandardUnsharpMaskFineness int16s 150 StandardUnsharpMaskThreshold int16s 152 PortraitUnsharpMaskStrength int16s 154 PortraitUnsharpMaskFineness int16s 156 PortraitUnsharpMaskThreshold int16s 158 LandscapeUnsharpMaskStrength int16s 160 LandscapeUnsharpMaskFineness int16s 162 LandscapeUnsharpMaskThreshold int16s 164 NeutraUnsharpMaskStrength int16s 166 NeutralUnsharpMaskFineness int16s 168 NeutralUnsharpMaskThreshold int16s 170 FaithfulUnsharpMaskStrength int16s 172 FaithfulUnsharpMaskFineness int16s 174 FaithfulUnsharpMaskThreshold int16s 176 MonochromeUnsharpMaskStrength int16s 178 MonochromeUnsharpMaskFineness int16s 180 MonochromeUnsharpMaskThreshold int16s 182 CustomUnsharpMaskStrength int16s 184 CustomUnsharpMaskFineness int16s 186 CustomUnsharpMaskThreshold int16s 188 CustomDefaultUnsharpStrength int16s 190 CustomDefaultUnsharpFineness int16s 192 CustomDefaultUnsharpThreshold int16s 214 CropCircleActive int16s 215 CropCircleX int16s 216 CropCircleY int16s 217 CropCircleRadius int16s 220 DLOOn int16s 221 DLOSetting int16s 222 DLOShootingDistance int16s 223 DLODataLength no 224 DLOInfo CanonVRD DLOInfo 225 CameraRawColorTone int16s 226 CameraRawSaturation int16s 227 CameraRawContrast int16s 228 CameraRawLinear int16s 229 CameraRawSharpness int16s 230 CameraRawHighlightPoint int16s 231 CameraRawShadowPoint int16s 232 CameraRawOutputHighlightPoint int16s 233 CameraRawOutputShadowPoint int16s

CanonVRD DLOInfo Tags

Tags added when DLO (Digital Lens Optimizer) is on.

Index2 Tag Name Writable —— ——– ——– 4 DLOSettingApplied int16s 5 DLOVersion string[10] 10 DLOData no

CanonVRD IHL Tags

Tag ID Tag Name Writable —— ——– ——– 0x0001 IHL_EXIF EXIF IHL_EXIF? no 0x0003 ThumbnailImage no 0x0004 PreviewImage no 0x0005 RawCodecVersion no 0x0006 CRCDevelParams? no

CanonVRD Edit4 Tags

Canon DPP version 4 edit information.

Index Tag Name Writable —– ——– ——– 0 DR4 CanonVRD DR4

CanonVRD DR4 Tags

Tags written by Canon DPP version 4 in CanonVRD trailers and DR4 files. Each tag has three associated flag words which are stored with the directory entry, some of which are extracted as a separate tag, indicated in the table below by a decimal appended to the tag ID (.0, .1 or .2).

Tag ID Tag Name Writable —— ——– ——– header DR4Header CanonVRD DR4Header 0x10002 Rotation yes 0x10003 AngleAdj yes 0x10021 CustomPictureStyle yes 0x10101 CheckMark yes 0x10200 WorkColorSpace yes 0x20001 RawBrightnessAdj yes 0x20101 WhiteBalanceAdj yes 0x20102 WBAdjColorTemp yes 0x20105 WBAdjMagentaGreen yes 0x20106 WBAdjBlueAmber yes 0x20125 WBAdjRGGBLevels yes 0x20200 GammaLinear yes 0x20301 PictureStyle yes 0x20303 ContrastAdj yes 0x20304 ColorToneAdj yes 0x20305 ColorSaturationAdj yes 0x20306 MonochromeToningEffect yes 0x20307 MonochromeFilterEffect yes 0x20308 UnsharpMaskStrength yes 0x20309 UnsharpMaskFineness yes 0x2030a UnsharpMaskThreshold yes 0x2030b ShadowAdj yes 0x2030c HighlightAdj yes 0x20310 SharpnessAdj yes 0x20310.0 SharpnessAdjOn yes 0x20311 SharpnessStrength yes 0x20400 ToneCurve CanonVRD ToneCurve 0x20400.1 ToneCurveOriginal yes 0x20410 ToneCurveBrightness yes 0x20411 ToneCurveContrast yes 0x20500 AutoLightingOptimizer yes 0x20500.0 AutoLightingOptimizerOn yes 0x20600 LuminanceNoiseReduction yes 0x20601 ChrominanceNoiseReduction yes 0x20670 ColorMoireReduction yes 0x20670.0 ColorMoireReductionOn yes 0x20701 ShootingDistance yes 0x20702 PeripheralIllumination yes 0x20702.0 PeripheralIlluminationOn yes 0x20703 ChromaticAberration yes 0x20703.0 ChromaticAberrationOn yes 0x20704 ColorBlurOn yes 0x20705 DistortionCorrection yes 0x20705.0 DistortionCorrectionOn yes 0x20706 DLOSetting yes 0x20706.0 DLOOn yes 0x20707 ChromaticAberrationRed yes 0x20708 ChromaticAberrationBlue yes 0x20709 DistortionEffect yes 0x2070b DiffractionCorrectionOn yes 0x20900 ColorHue yes 0x20901 SaturationAdj yes 0x20910 RedHSL yes 0x20911 OrangeHSL yes 0x20912 YellowHSL yes 0x20913 GreenHSL yes 0x20914 AquaHSL yes 0x20915 BlueHSL yes 0x20916 PurpleHSL yes 0x20917 MagentaHSL yes 0x20a00 GammaInfo CanonVRD GammaInfo 0x30101 CropAspectRatio yes 0x30102 CropAspectRatioCustom yes 0xf0100 CropInfo CanonVRD CropInfo 0xf0500 CustomPictureStyleData yes 0xf0510 StampInfo CanonVRD StampInfo 0xf0511 DustInfo CanonVRD DustInfo 0xf0512 LensFocalLength yes

CanonVRD DR4Header Tags

Index4 Tag Name Writable —— ——– ——– 3 DR4CameraModel int32u

CanonVRD ToneCurve Tags

Index4 Tag Name Writable —— ——– ——– 0 ToneCurveColorSpace int32u 1 ToneCurveShape int32u 3 ToneCurveInputRange int32u[2] 5 ToneCurveOutputRange int32u[2] 7 RGBCurvePoints int32u[21] 10 ToneCurveX int32u 11 ToneCurveY int32u 45 RedCurvePoints int32u[21] 83 GreenCurvePoints int32u[21] 121 BlueCurvePoints int32u[21]

CanonVRD GammaInfo Tags

Index8 Tag Name Writable —— ——– ——– 2 GammaContrast double 3 GammaColorTone double 4 GammaSaturation double 5 GammaUnsharpMaskStrength double 6 GammaUnsharpMaskFineness double 7 GammaUnsharpMaskThreshold double 8 GammaSharpnessStrength double 9 GammaShadow double 10 GammaHighlight double 12 GammaBlackPoint double 13 GammaWhitePoint double 14 GammaMidPoint double 15 GammaCurveOutputRange double[2]

CanonVRD CropInfo Tags

Index4 Tag Name Writable —— ——– ——– 0 CropActive int32s 1 CropRotatedOriginalWidth int32s 2 CropRotatedOriginalHeight int32s 3 CropX int32s 4 CropY int32s 5 CropWidth int32s 6 CropHeight int32s 8 CropRotation double 10 CropOriginalWidth int32s 11 CropOriginalHeight int32s

CanonVRD StampInfo Tags

Index4 Tag Name Writable —— ——– ——– 2 StampToolCount no

CanonVRD DustInfo Tags

Index4 Tag Name Writable —— ——– ——– 2 DustDeleteApplied no

Casio Tags

Tag ID Tag Name Writable —— ——– ——– 0x0001 RecordingMode int16u 0x0002 Quality int16u 0x0003 FocusMode int16u 0x0004 FlashMode int16u 0x0005 FlashIntensity int16u 0x0006 ObjectDistance int32u 0x0007 WhiteBalance int16u 0x000a DigitalZoom int32u 0x000b Sharpness int16u 0x000c Contrast int16u 0x000d Saturation int16u 0x0014 ISO int16u 0x0015 FirmwareDate string[18] 0x0016 Enhancement int16u 0x0017 ColorFilter int16u 0x0018 AFPoint int16u 0x0019 FlashIntensity int16u 0x0e00 PrintIM PrintIM

Casio Type2 Tags

Tag ID Tag Name Writable —— ——– ——– 0x0002 PreviewImageSize int16u[2] 0x0003 PreviewImageLength int32u* 0x0004 PreviewImageStart int32u* 0x0008 QualityMode int16u 0x0009 CasioImageSize int16u 0x000d FocusMode int16u 0x0014 ISO int16u 0x0019 WhiteBalance int16u 0x001d FocalLength rational64u 0x001f Saturation int16u 0x0020 Contrast int16u 0x0021 Sharpness int16u 0x0e00 PrintIM PrintIM 0x2000 PreviewImage undef 0x2001 FirmwareDate string[18] 0x2011 WhiteBalanceBias int16u[2] 0x2012 WhiteBalance int16u 0x2021 AFPointPosition int16u[4]~ 0x2022 ObjectDistance int32u 0x2034 FlashDistance int16u 0x2076 SpecialEffectMode int8u[3] 0x2089 FaceInfo1 Casio FaceInfo1 FaceInfo2 Casio FaceInfo2 FaceInfoUnknown? yes 0x211c FacesDetected int8u 0x3000 RecordMode int16u 0x3001 ReleaseMode int16u 0x3002 Quality int16u 0x3003 FocusMode int16u 0x3006 HometownCity string 0x3007 BestShotMode int16u 0x3008 AutoISO int16u 0x3009 AFMode int16u 0x3011 Sharpness undef[2] 0x3012 Contrast undef[2] 0x3013 Saturation undef[2] 0x3014 ISO int16u 0x3015 ColorMode int16u 0x3016 Enhancement int16u 0x3017 ColorFilter int16u 0x301b ArtMode int16u 0x301c SequenceNumber int16u 0x301d BracketSequence int16u[2] 0x3020 ImageStabilization int16u 0x302a LightingMode int16u 0x302b PortraitRefiner int16u 0x3030 SpecialEffectLevel int16u 0x3031 SpecialEffectSetting int16u 0x3103 DriveMode int16u 0x310b ArtModeParameters int8u[3] 0x4001 CaptureFrameRate int16u[n] 0x4003 VideoQuality int16u

Casio FaceInfo1 Tags

Face-detect tags extracted from models such as the EX-H5.

Index1 Tag Name Writable —— ——– ——– 0 FacesDetected int8u 1 FaceDetectFrameSize int16u[2] 13 Face1Position int16u[4] 124 Face2Position int16u[4] 235 Face3Position int16u[4] 346 Face4Position int16u[4] 457 Face5Position int16u[4] 568 Face6Position int16u[4] 679 Face7Position int16u[4] 790 Face8Position int16u[4] 901 Face9Position int16u[4] 1012 Face10Position int16u[4]

Casio FaceInfo2 Tags

Face-detect tags extracted from models such as the EX-H20G and EX-ZR100.

Index1 Tag Name Writable —— ——– ——– 2 FacesDetected int8u 4 FaceDetectFrameSize int16u[2] 8 FaceOrientation int8u 24 Face1Position int16u[4] 76 Face2Position int16u[4] 128 Face3Position int16u[4] 180 Face4Position int16u[4] 232 Face5Position int16u[4] 284 Face6Position int16u[4] 336 Face7Position int16u[4] 388 Face8Position int16u[4] 440 Face9Position int16u[4] 492 Face10Position int16u[4]

Casio QVCI Tags

This information is found in the APP1 QVCI segment of JPEG images from the Casio QV-7000SX.

Index1 Tag Name Writable —— ——– ——– 44 CasioQuality no 55 FocalRange? no 77 DateTimeOriginal no 98 ModelType no 114 ManufactureIndex no 124 ManufactureCode no

Casio AVI Tags

This information is found in Casio GV-10 AVI videos.

Index1 Tag Name Writable —— ——– ——– 0 Software no

DJI Tags

This table lists tags found in the maker notes of images from some DJI Phantom drones.

Tag ID Tag Name Writable —— ——– ——– 0x0001 Make string 0x0003 SpeedX float 0x0004 SpeedY float 0x0005 SpeedZ float 0x0006 Pitch float 0x0007 Yaw float 0x0008 Roll float 0x0009 CameraPitch float 0x000a CameraYaw float 0x000b CameraRoll float

DJI XMP Tags

XMP tags used by DJI for images from drones.

These tags belong to the ExifTool XMP-drone-dji family 1 group.

Tag Name Writable ——– ——– AbsoluteAltitude real CalibratedFocalLength real CalibratedOpticalCenterX real CalibratedOpticalCenterY real CamReverse string DewarpData string DewarpFlag string FlightPitchDegree real FlightRollDegree real FlightXSpeed real FlightYSpeed real FlightYawDegree real FlightZSpeed real GPSLatitude real/ GPSLongitude real/ GPSLongtitude real/ GimbalPitchDegree real GimbalReverse string GimbalRollDegree real GimbalYawDegree real Latitude real Longitude real RelativeAltitude real RtkFlag string RtkStdHgt real RtkStdLat real RtkStdLon real SelfData string

DJI Info Tags

Tags written by some DJI drones.

Tag ID Tag Name Writable —— ——– ——– FlightDegree(Y,P,R) FlightDegree no FlightSpeed(X,Y,Z) FlightSpeed no GimbalDegree(Y,P,R) GimbalDegree no adj_dbg_info ADJDebugInfo no ae_dbg_info AEDebugInfo no ae_histogram_info AEHistogramInfo no ae_liveview_histogram_info AELiveViewHistogramInfo no ae_liveview_local_histogram AELiveViewLocalHistogram no ae_local_histogram AELocalHistogram no af_dbg_info AFDebugInfo no awb_dbg_info AWBDebugInfo no hiso Histogram no hyperlapse_dbg_info HyperlapsDebugInfo no sensor_id SensorID no xidiri Xidiri no

DJI ThermalParams Tags

Thermal parameters extracted from APP4 of DJI RJPEG files from the ZH20T.

Index1 Tag Name Writable —— ——– ——– 36 K1 no 40 K2 no 44 K3 no 48 K4 no 52 KF no 56 B1 no 60 B2 no 68 ObjectDistance no 70 RelativeHumidity no 72 Emissivity no 74 Reflection no 76 AmbientTemperature no 80 D2 no 84 KJ no 86 DB no 88 KK no

DJI ThermalParams2 Tags

Thermal parameters extracted from APP4 of DJI M3T RJPEG files.

Index1 Tag Name Writable —— ——– ——– 0 AmbientTemperature no 4 ObjectDistance no 8 Emissivity no 12 RelativeHumidity no 16 ReflectedTemperature no 101 IDString no

DJI ThermalParams3 Tags

Thermal parameters extracted from APP4 of some DJI RJPEG files.

Index1 Tag Name Writable —— ——– ——– 4 RelativeHumidity no 6 ObjectDistance no 8 Emissivity no 10 ReflectedTemperature no

FLIR Tags

Information extracted from the maker notes of JPEG images from thermal imaging cameras by FLIR Systems Inc.

Tag ID Tag Name Writable —— ——– ——– 0x0001 ImageTemperatureMax rational64u 0x0002 ImageTemperatureMin rational64u 0x0003 Emissivity rational64u 0x0004 UnknownTemperature? rational64u 0x0005 CameraTemperatureRangeMax? rational64u 0x0006 CameraTemperatureRangeMin? rational64u

FLIR FFF Tags

Information extracted from FLIR FFF images and the APP1 FLIR segment of JPEG images. These tags may also be extracted from the first frame of an FLIR SEQ file, or all frames if the ExtractEmbedded option is used. Setting ExtractEmbedded to 2 also the raw thermal data from all frames.

Tag ID Tag Name Writable —— ——– ——– _header FFFHeader FLIR Header 0x0001 RawData FLIR RawData 0x0005 GainDeadData FLIR GainDeadData 0x0006 CoarseData FLIR CoarseData 0x000e EmbeddedImage FLIR EmbeddedImage 0x0020 CameraInfo FLIR CameraInfo 0x0021 MeasurementInfo FLIR MeasInfo 0x0022 PaletteInfo FLIR PaletteInfo 0x0023 TextInfo FLIR TextInfo 0x0024 EmbeddedAudioFile no 0x0028 PaintData FLIR PaintData 0x002a PiP FLIR PiP 0x002b GPSInfo FLIR GPSInfo 0x002c MeterLink FLIR MeterLink 0x002e ParameterInfo FLIR ParamInfo

FLIR Header Tags

Tags extracted from the FLIR FFF/AFF header.

Index1 Tag Name Writable —— ——– ——– 4 CreatorSoftware no

FLIR RawData Tags

The thermal image data may be stored either as raw data, or in PNG format. If stored as raw data, ExifTool adds a TIFF header to allow the data to be viewed as a TIFF image. If stored in PNG format, the PNG image is extracted as-is. Note that most FLIR cameras using the PNG format seem to write the 16-bit raw image data in the wrong byte order.

Index2 Tag Name Writable —— ——– ——– 1 RawThermalImageWidth no 2 RawThermalImageHeight no 16 RawThermalImageType no 16.1 RawThermalImage no

FLIR GainDeadData Tags

Information found in FFF-format .GAN calibration image files.

Index2 Tag Name Writable —— ——– ——– 1 GainDeadMapImageWidth no 2 GainDeadMapImageHeight no 16 GainDeadMapImageType no 16.1 GainDeadMapImage no

FLIR CoarseData Tags

Information found in FFF-format .CRS correction image files.

Index2 Tag Name Writable —— ——– ——– 1 CoarseMapImageWidth no 2 CoarseMapImageHeight no 16 CoarseMapImageType no 16.1 CoarseMapImage no

FLIR EmbeddedImage Tags

Index2 Tag Name Writable —— ——– ——– 1 EmbeddedImageWidth no 2 EmbeddedImageHeight no 16 EmbeddedImageType no 16.1 EmbeddedImage no

FLIR CameraInfo Tags

FLIR camera information. The Planck tags are variables used in the temperature calculation. See <https://exiftool.org/forum/index.php?topic=4898.msg23972#msg23972> for details.

Index1 Tag Name Writable —— ——– ——– 32 Emissivity no 36 ObjectDistance no 40 ReflectedApparentTemperature no 44 AtmosphericTemperature no 48 IRWindowTemperature no 52 IRWindowTransmission no 60 RelativeHumidity no 88 PlanckR1 no 92 PlanckB no 96 PlanckF no 112 AtmosphericTransAlpha1 no 116 AtmosphericTransAlpha2 no 120 AtmosphericTransBeta1 no 124 AtmosphericTransBeta2 no 128 AtmosphericTransX no 144 CameraTemperatureRangeMax no 148 CameraTemperatureRangeMin no 152 CameraTemperatureMaxClip no 156 CameraTemperatureMinClip no 160 CameraTemperatureMaxWarn no 164 CameraTemperatureMinWarn no 168 CameraTemperatureMaxSaturated no 172 CameraTemperatureMinSaturated no 212 CameraModel no 244 CameraPartNumber no 260 CameraSerialNumber no 276 CameraSoftware no 368 LensModel no 400 LensPartNumber no 416 LensSerialNumber no 436 FieldOfView no 492 FilterModel no 508 FilterPartNumber no 540 FilterSerialNumber no 776 PlanckO no 780 PlanckR2 no 784 RawValueRangeMin no 786 RawValueRangeMax no 824 RawValueMedian no 828 RawValueRange no 900 DateTimeOriginal no 912 FocusStepCount no 1116 FocusDistance no 1124 FrameRate no

FLIR MeasInfo Tags

Tags listed below are only for the first measurement tool, however multiple measurements may be added, and information is extracted for all of them. Tags for subsequent measurements are generated as required with the prefixes “Meas2”, “Meas3”, etc.

Tag Name Writable ——– ——– Meas1Label no Meas1Params no Meas1Type no

FLIR PaletteInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 PaletteColors no 6 AboveColor no 9 BelowColor no 12 OverflowColor no 15 UnderflowColor no 18 Isotherm1Color no 21 Isotherm2Color no 26 PaletteMethod no 27 PaletteStretch no 48 PaletteFileName no 80 PaletteName no 112 Palette no

FLIR TextInfo Tags

Tag Name Writable ——– ——– Label0 no Label1 no Label2 no Label3 no Value0 no Value1 no Value2 no Value3 no

FLIR PaintData Tags

Information generated by FLIR Tools “Paint colors” tool.

Index2 Tag Name Writable —— ——– ——– 5 PaintImageWidth no 6 PaintImageHeight no 20 PaintImageType no 20.1 PaintImage no

FLIR PiP Tags

FLIR Picture in Picture tags.

Index2 Tag Name Writable —— ——– ——– 0 Real2IR no 2 OffsetX no 3 OffsetY no 4 PiPX1 no 5 PiPX2 no 6 PiPY1 no 7 PiPY2 no

FLIR GPSInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 GPSValid no 4 GPSVersionID no 8 GPSLatitudeRef no 10 GPSLongitudeRef no 16 GPSLatitude no 24 GPSLongitude no 32 GPSAltitude no 64 GPSDOP no 68 GPSSpeedRef no 70 GPSTrackRef no 72 GPSImgDirectionRef no 76 GPSSpeed no 80 GPSTrack no 84 GPSImgDirection no 88 GPSMapDatum no

FLIR MeterLink Tags

Tags containing Meterlink humidity meter information.

Index1 Tag Name Writable —— ——– ——– 26 Reading1Units no 28 Reading1Description no 32 Reading1Device no 96 Reading1Value no 126 Reading2Units no 128 Reading2Description no 132 Reading2Device no 196 Reading2Value no 226 Reading3Units no 228 Reading3Description no 232 Reading3Device no 296 Reading3Value no 326 Reading4Units no 328 Reading4Description no 332 Reading4Device no 396 Reading4Value no

FLIR ParamInfo Tags

Tag Name Writable ——– ——– DateTimeGenerated no Param0 no Param1 no Param2 no Param3 no

FLIR UserData Tags

Tags written by some FLIR cameras in a top-level (!) “udta” atom of MP4 videos.

Tag ID Tag Name Writable —— ——– ——– uuid FLIR_Parts FLIR Parts FLIR_Serial FLIR SerialNums FLIR_Params FLIR Params FLIR_UnknownUUID FLIR UnknownUUID FLIR_GPS FLIR GPS_UUID FLIR_MoreInfo FLIR MoreInfo SoftwareComponents? no FLIR_Unknown? no Units no+ ThumbnailImage no

FLIR Parts Tags

Tags extracted from the “uuid” box with ID 43c3993b0f94424b82056b66513f485d in FLIR MP4 videos.

Index1 Tag Name Writable —— ——– ——– 4 BAHPVer no BALPVer no Battery no BAVPVer no CamCore no DetectorBoard no Detector no GIDCVer no GIDPVer no GIPC_CPLD no GIPCVer no GIXIVer no MainBoard no Optics no PartNumber no

FLIR SerialNums Tags

Tags extracted from the “uuid” box with ID 57f5b93e51e448afa0d9c3ef1b37f712 in FLIR MP4 videos.

Index1 Tag Name Writable —— ——– ——– 12 UnknownSerial1? no 45 UnknownSerial2? no 78 UnknownSerial3? no 111 UnknownSerial4? no 123 UnknownNumber? no 126 CameraSerialNumber no

FLIR Params Tags

Tags extracted from the “uuid” box with ID 41e5dcf9e80a41ceadfe7f0c58082c19 in FLIR MP4 videos.

Index4 Tag Name Writable —— ——– ——– 1 ReflectedApparentTemperature no 2 AtmosphericTemperature no 3 Emissivity no 4 ObjectDistance no 5 RelativeHumidity no 6 EstimatedAtmosphericTrans no 7 IRWindowTemperature no 8 IRWindowTransmission no

FLIR UnknownUUID Tags

Tags extracted from the “uuid” box with ID 574520502cbb44adae5415e9b839d903 in FLIR MP4 videos.

Index4 Tag Name Writable —— ——– ——– [no tags known]

FLIR GPS_UUID Tags

Tags extracted from the “uuid” box with ID 7f2e21008b464918afb1de709a74f6f5 in FLIR MP4 videos.

Index4 Tag Name Writable —— ——– ——– 1 GPSLatitude no 2 GPSLongitude no 3 GPSAltitude no

FLIR MoreInfo Tags

Tags extracted from the “uuid” box with ID 2b452fdc74354094baee22a6b23a7cf8 in FLIR MP4 videos.

Index1 Tag Name Writable —— ——– ——– 5 LensModel no 11 UnknownTemperature1? no 15 UnknownTemperature2? no

FLIR AFF Tags

Tags extracted from FLIR “AFF” SEQ images.

Tag ID Tag Name Writable —— ——– ——– _header AFFHeader FLIR Header 0x0001 AFF1 FLIR AFF1 0x0005 AFF5 FLIR AFF5

FLIR AFF1 Tags

Index2 Tag Name Writable —— ——– ——– 1 SensorWidth no 2 SensorHeight no

FLIR AFF5 Tags

Index2 Tag Name Writable —— ——– ——– 19 SensorWidth no 20 SensorHeight no

FLIR FPF Tags

Tags extracted from FLIR Public image Format (FPF) files.

Index1 Tag Name Writable —— ——– ——– 32 FPFVersion no 36 ImageDataOffset no 40 ImageType no 42 ImagePixelFormat no 44 ImageWidth no 46 ImageHeight no 48 ExternalTriggerCount no 52 SequenceFrameNumber no 120 CameraModel no 152 CameraPartNumber no 184 CameraSerialNumber no 216 CameraTemperatureRangeMin no 220 CameraTemperatureRangeMax no 224 LensModel no 256 LensPartNumber no 288 LensSerialNumber no 320 FilterModel no 336 FilterPartNumber no 384 FilterSerialNumber no 480 Emissivity no 484 ObjectDistance no 488 ReflectedApparentTemperature no 492 AtmosphericTemperature no 496 RelativeHumidity no 500 ComputedAtmosphericTrans no 504 EstimatedAtmosphericTrans no 508 ReferenceTemperature no 512 IRWindowTemperature no 516 IRWindowTransmission no 584 DateTimeOriginal no 676 CameraScaleMin no 680 CameraScaleMax no 684 CalculatedScaleMin no 688 CalculatedScaleMax no 692 ActualScaleMin no 696 ActualScaleMax no

FujiFilm Tags

Tag ID Tag Name Writable —— ——– ——– 0x0000 Version undef 0x0010 InternalSerialNumber string 0x1000 Quality string 0x1001 Sharpness int16u 0x1002 WhiteBalance int16u 0x1003 Saturation int16u 0x1004 Contrast int16u 0x1005 ColorTemperature int16u 0x1006 Contrast int16u 0x100a WhiteBalanceFineTune int32s[2] 0x100b NoiseReduction int16u 0x100e NoiseReduction int16u 0x100f Clarity int32s 0x1010 FujiFlashMode int16u 0x1011 FlashExposureComp rational64s 0x1020 Macro int16u 0x1021 FocusMode int16u 0x1022 AFMode int16u 0x1023 FocusPixel int16u[2] 0x102b PrioritySettings FujiFilm PrioritySettings 0x102d FocusSettings FujiFilm FocusSettings 0x102e AFCSettings FujiFilm AFCSettings 0x1030 SlowSync int16u 0x1031 PictureMode int16u 0x1032 ExposureCount int16u 0x1033 EXRAuto int16u 0x1034 EXRMode int16u 0x1040 ShadowTone int32s 0x1041 HighlightTone int32s 0x1044 DigitalZoom int32u 0x1045 LensModulationOptimizer int32u 0x1047 GrainEffectRoughness int32s 0x1048 ColorChromeEffect int32s 0x1049 BWAdjustment int8s 0x104b BWMagentaGreen int8s 0x104c GrainEffectSize int16u 0x104d CropMode int16u 0x104e ColorChromeFXBlue int32s 0x1050 ShutterType int16u 0x1100 AutoBracketing int16u 0x1101 SequenceNumber int16u 0x1103 DriveSettings FujiFilm DriveSettings 0x1105 PixelShiftShots int16u 0x1106 PixelShiftOffset rational64s[2] 0x1153 PanoramaAngle int16u 0x1154 PanoramaDirection int16u 0x1201 AdvancedFilter int32u 0x1210 ColorMode int16u 0x1300 BlurWarning int16u 0x1301 FocusWarning int16u 0x1302 ExposureWarning int16u 0x1304 GEImageSize string 0x1400 DynamicRange int16u 0x1401 FilmMode int16u 0x1402 DynamicRangeSetting int16u 0x1403 DevelopmentDynamicRange int16u 0x1404 MinFocalLength rational64s 0x1405 MaxFocalLength rational64s 0x1406 MaxApertureAtMinFocal rational64s 0x1407 MaxApertureAtMaxFocal rational64s 0x140b AutoDynamicRange int16u 0x1422 ImageStabilization int16u[3] 0x1425 SceneRecognition int16u 0x1431 Rating int32u 0x1436 ImageGeneration int16u 0x1438 ImageCount int16u 0x1443 DRangePriority int16u 0x1444 DRangePriorityAuto int16u 0x1445 DRangePriorityFixed int16u 0x1446 FlickerReduction int32u 0x1447 FujiModel string 0x1448 FujiModel2 string 0x144d RollAngle rational64s 0x3803 VideoRecordingMode int32u 0x3804 PeripheralLighting int16u 0x3806 VideoCompression int16u 0x3820 FrameRate int16u 0x3821 FrameWidth int16u 0x3822 FrameHeight int16u 0x3824 FullHDHighSpeedRec int32u 0x4005 FaceElementSelected int16u[4] 0x4100 FacesDetected int16u 0x4103 FacePositions int16u[n] 0x4200 NumFaceElements int16u 0x4201 FaceElementTypes int8u[n] 0x4203 FaceElementPositions int16u[n] 0x4282 FaceRecInfo FujiFilm FaceRecInfo 0x8000 FileSource string 0x8002 OrderNumber int32u 0x8003 FrameNumber int16u 0xb211 Parallax rational64s

FujiFilm PrioritySettings Tags

Index2 Tag Name Writable —— ——– ——– 0.1 AF-SPriority int16u & 0x0f 0.2 AF-CPriority int16u & 0xf0

FujiFilm FocusSettings Tags

Index4 Tag Name Writable —— ——– ——– 0.1 FocusMode2 int32u & 0x0f 0.2 PreAF int32u & 0xf0 0.3 AFAreaMode int32u & 0xf00 0.4 AFAreaPointSize int32u & 0xf000 0.5 AFAreaZoneSize int32u & 0xf0000

FujiFilm AFCSettings Tags

Index4 Tag Name Writable —— ——– ——– 0 AF-CSetting int32u 0.1 AF-CTrackingSensitivity int32u & 0x0f 0.2 AF-CSpeedTrackingSensitivity int32u & 0xf0 0.3 AF-CZoneAreaSwitching int32u & 0xf00

FujiFilm DriveSettings Tags

Index4 Tag Name Writable —— ——– ——– 0.1 DriveMode int32u & 0xff 0.2 DriveSpeed int32u & 0xff000000

FujiFilm FaceRecInfo Tags

Face recognition information.

Tag Name Writable ——– ——– Face1Birthday no Face1Category no Face1Name no Face2Birthday no Face2Category no Face2Name no Face3Birthday no Face3Category no Face3Name no Face4Birthday no Face4Category no Face4Name no Face5Birthday no Face5Category no Face5Name no Face6Birthday no Face6Category no Face6Name no Face7Birthday no Face7Category no Face7Name no Face8Birthday no Face8Category no Face8Name no

FujiFilm RAF Tags

FujiFilm RAF images contain meta information stored in a proprietary FujiFilm RAF format, as well as EXIF information stored inside an embedded JPEG preview image. The table below lists tags currently decoded from the RAF-format information.

Tag ID Tag Name Writable —— ——– ——– 0x0100 RawImageFullSize no 0x0110 RawImageCropTopLeft no 0x0111 RawImageCroppedSize no 0x0115 RawImageAspectRatio no 0x0121 RawImageSize no 0x0130 FujiLayout no 0x0131 XTransLayout no 0x2000 WB_GRGBLevelsAuto no 0x2100 WB_GRGBLevelsDaylight no 0x2200 WB_GRGBLevelsCloudy no 0x2300 WB_GRGBLevelsDaylightFluor no 0x2301 WB_GRGBLevelsDayWhiteFluor no 0x2302 WB_GRGBLevelsWhiteFluorescent no 0x2310 WB_GRGBLevelsWarmWhiteFluor no 0x2311 WB_GRGBLevelsLivingRoomWarmWhiteFluor no 0x2400 WB_GRGBLevelsTungsten no 0x2ff0 WB_GRGBLevels no 0x9200 RelativeExposure no 0x9650 RawExposureBias no 0xc000 RAFData FujiFilm RAFData

FujiFilm RAFData Tags

Index1 Tag Name Writable —— ——– ——– 0 RawImageWidth no 4 RawImageWidth no RawImageHeight no 8 RawImageWidth no RawImageHeight no 12 RawImageHeight no

FujiFilm IFD Tags

Tags found in the FujiIFD information of RAF images from some models.

Tag ID Tag Name Writable —— ——– ——– 0xf000 FujiIFD FujiFilm IFD 0xf001 RawImageFullWidth no 0xf002 RawImageFullHeight no 0xf003 BitsPerSample no 0xf007 StripOffsets no 0xf008 StripByteCounts no 0xf00a BlackLevel no 0xf00b GeometricDistortionParams no 0xf00c WB_GRBLevelsStandard no 0xf00d WB_GRBLevelsAuto no 0xf00e WB_GRBLevels no 0xf00f ChromaticAberrationParams no 0xf010 VignettingParams no

FujiFilm MRAW Tags

Tags extracted from the M-RAW header of multi-image RAF files. The family 1 group name for these tags is “M-RAW”.

Tag ID Tag Name Writable —— ——– ——– 0x0001 RawImageNumber no 0x0005 ExposureTime no 0x0006 FNumber no 0x0007 ISO no

FujiFilm FFMV Tags

Information found in the FFMV atom of MOV videos.

Index1 Tag Name Writable —— ——– ——– 0 MovieStreamName no

FujiFilm MOV Tags

This information is found in MOV videos from some FujiFilm cameras.

Index1 Tag Name Writable —— ——– ——– 0 Make no 24 Model no 46 ExposureTime no 50 FNumber no 58 ExposureCompensation no

GE Tags

This table lists tags found in the maker notes of some General Imaging camera models.

Tag ID Tag Name Writable —— ——– ——– 0x0202 Macro int16u 0x0207 GEModel string 0x0300 GEMake string

HP Tags

These tables list tags found in the maker notes of some Hewlett-Packard camera models.

The first table lists tags found in the EXIF-format maker notes of the PhotoSmart 720 (also used by the Vivitar ViviCam 3705, 3705B and 3715).

Tag ID Tag Name Writable —— ——– ——– 0x0e00 PrintIM PrintIM

HP Type2 Tags

These tags are used by the PhotoSmart E427.

Tag ID Tag Name Writable —— ——– ——– Lens Shading LensShading no PreviewImage PreviewImage no Serial Number SerialNumber no

HP Type4 Tags

These tags are used by the PhotoSmart M627.

Index1 Tag Name Writable —— ——– ——– 12 MaxAperture no 16 ExposureTime no 20 CameraDateTime no 52 ISO no 92 SerialNumber no

HP Type6 Tags

These tags are used by the PhotoSmart M425, M525 and M527.

Index1 Tag Name Writable —— ——– ——– 12 FNumber no 16 ExposureTime no 20 CameraDateTime no 52 ISO no 88 SerialNumber no

HP TDHD Tags

These tags are extracted from the APP6 “TDHD” segment of Photosmart R837 JPEG images. Many other unknown tags exist in is data, and can be seen with the Unknown (-u) option.

Tag ID Tag Name Writable —— ——– ——– CMSN SerialNumber no FWRV FirmwareVersion no LSLV LSLV HP TDHD TDHD TDHD HP TDHD

JVC Tags

JVC EXIF maker note tags.

Tag ID Tag Name Writable —— ——– ——– 0x0002 CPUVersions no 0x0003 Quality no

JVC Text Tags

JVC/Victor text-based maker note tags.

Tag ID Tag Name Writable —— ——– ——– QTY Quality no VER MakerNoteVersion no

Kodak Tags

Many Kodak models don’t store the maker notes in standard IFD format, and these formats vary with different models. Some information has been decoded, but much of the Kodak information remains unknown.

The table below contains the most common set of Kodak tags. The following Kodak camera models have been tested and found to use these tags: C360, C663, C875, CX6330, CX6445, CX7330, CX7430, CX7525, CX7530, DC4800, DC4900, DX3500, DX3600, DX3900, DX4330, DX4530, DX4900, DX6340, DX6440, DX6490, DX7440, DX7590, DX7630, EasyShare-One, LS420, LS443, LS633, LS743, LS753, V530, V550, V570, V603, V610, V705, Z650, Z700, Z710, Z730, Z740, Z760 and Z7590.

Index1 Tag Name Writable —— ——– ——– 0 KodakModel string[8] 9 Quality int8u 10 BurstMode int8u 12 KodakImageWidth int16u 14 KodakImageHeight int16u 16 YearCreated int16u 18 MonthDayCreated int8u[2] 20 TimeCreated int8u[4] 24 BurstMode2? int16u 27 ShutterMode int8u 28 MeteringMode int8u 29 SequenceNumber int8u 30 FNumber int16u 32 ExposureTime int32u 36 ExposureCompensation int16s 38 VariousModes? int16u 40 Distance1? int32u 44 Distance2? int32u 48 Distance3? int32u 52 Distance4? int32u 56 FocusMode int8u 58 VariousModes2? int16u 60 PanoramaMode? int16u 62 SubjectDistance? int16u 64 WhiteBalance int8u 92 FlashMode int8u 93 FlashFired int8u 94 ISOSetting int16u 96 ISO int16u 98 TotalZoom int16u 100 DateTimeStamp int16u 102 ColorMode int16u 104 DigitalZoom int16u 107 Sharpness int8s

Kodak IFD Tags

These tags are found in a separate IFD of JPEG, TIFF, DCR and KDC images from some older Kodak models such as the DC50, DC120, DCS760C, DCS Pro 14N, 14nx, SLR/n, Pro Back and Canon EOS D2000.

Tag ID Tag Name Writable —— ——– ——– 0x0000 KodakVersion int8u[4] 0x0001 UnknownEV? rational64u 0x0003 ExposureValue rational64u 0x03e9 OriginalFileName string 0x03ea KodakTag int32u 0x03eb SensorLeftBorder int16u 0x03ec SensorTopBorder int16u 0x03ed SensorImageWidth int16u 0x03ee SensorImageHeight int16u 0x03ef BlackLevelTop int16u 0x03f0 BlackLevelBottom int16u 0x03f1 TextualInfo Kodak TextualInfo 0x03f2 FlashMode? int16u 0x03f3 FlashCompensation rational64s 0x03f4 WindMode? int16u 0x03f5 FocusMode? int16u 0x03f8 MinAperture rational64u 0x03f9 MaxAperture rational64u 0x03fa WhiteBalanceMode? int16u 0x03fb WhiteBalanceDetected? int16u 0x03fc WhiteBalance int16u 0x03fd Processing Kodak Processing ProcessingParameters no 0x03fe ImageAbsoluteX int16s 0x03ff ImageAbsoluteY int16s 0x0400 ApplicationKeyString string 0x0401 Time string 0x0402 GPSString string 0x0403 EventLogCapture? no 0x0404 ComponentTable? no 0x0405 CustomIlluminant? int16u 0x0406 CameraTemperature rational64s CameraTemperature no 0x0407 AdapterVoltage rational64u 0x0408 BatteryVoltage rational64u 0x0409 DacVoltages no 0x040a IlluminantDetectorData? no 0x040b PixelClockFrequency int32u 0x040c CenterPixel int16u[3] 0x040d BurstCount int16u 0x040e BlackLevelRough int16u 0x040f OffsetMapHorizontal? no 0x0410 OffsetMapVertical? no 0x0411 Histogram? no 0x0412 VerticalClockOverlaps int16u[2] 0x0413 SensorTemperature no 0x0414 XilinxVersion string 0x0415 FirmwareVersion int32u 0x0416 BlackLevelRoughAfter int16u 0x0417 BrightRowsTop no 0x0418 EventLogProcess no 0x0419 DacVoltagesFlush no 0x041a FlashUsed no 0x041b FlashType no 0x041c SelfTimer no 0x041d AFMode no 0x041e LensType no 0x041f ImageCropX int16s 0x0420 ImageCropY int16s 0x0421 AdjustedTbnImageWidth no 0x0422 AdjustedTbnImageHeight no 0x0423 IntegrationTime int32u 0x0424 BracketingMode no 0x0425 BracketingStep no 0x0426 BracketingCounter no 0x042e HuffmanTableLength no 0x042f HuffmanTableValue no 0x0438 MainBoardVersion int32u 0x0439 ImagerBoardVersion int32u 0x044c FocusEdgeMap no 0x05e6 IdleTiming no 0x05e7 FlushTiming no 0x05e8 IntegrateTiming no 0x05e9 RegisterReadTiming no 0x05ea FirstLineTransferTiming no 0x05eb ShiftTiming no 0x05ec NormalLineTransferTiming no 0x05ed TestTransferTiming no 0x05fa MinimumFlushRows no 0x05fd ImagerPowerOnDelayMsec int32u 0x05fe ImagerInitialTimingCode no 0x05ff ImagerLogicProgram no 0x0600 ImagerBiasSettlingDelayMsec int32u 0x0604 IdleSequence no 0x0605 FirstFlushSequence no 0x0606 FinalFlushSequence no 0x0607 SampleBlackSequence no 0x0608 TransferSequence no 0x060e DacCountsPerVolt no 0x060f BlackDacChannel no 0x0610 BlackAdCountsPerDacVolt no 0x0611 BlackTarget no 0x0612 BlackDacSettlingMsec no 0x07d0 StandardMatrixDaylight rational64s[9] 0x07d1 StandardMatrixTungsten rational64s[9] 0x07d2 StandardMatrixFluorescent rational64s[9] 0x07d3 StandardMatrixFlash rational64s[9] 0x07d4 StandardMatrixCustom rational64s[9] 0x07da DeviantMatrixDaylight rational64s[9] 0x07db DeviantMatrixTungsten rational64s[9] 0x07dc DeviantMatrixFluorescent rational64s[9] 0x07dd DeviantMatrixFlash rational64s[9] 0x07de DeviantMatrixCustom rational64s[9] 0x07e4 UniqueMatrixDaylight rational64s[9] 0x07e5 UniqueMatrixTungsten rational64s[9] 0x07e6 UniqueMatrixFluorescent rational64s[9] 0x07e7 UniqueMatrixFlash rational64s[9] 0x07e8 UniqueMatrixCustom rational64s[9] 0x07e9 UniqueMatrixAuto rational64s[9] 0x0834 StandardWhiteDaylight rational64s[3] 0x0835 StandardWhiteTungsten rational64s[3] 0x0836 StandardWhiteFluorescent rational64s[3] 0x0837 StandardWhiteFlash rational64s[3] 0x0838 StandardWhiteCustom rational64s[3] 0x083e DeviantWhiteDaylight rational64s[3] 0x083f DeviantWhiteTungsten rational64s[3] 0x0840 DeviantWhiteFluorescent rational64s[3] 0x0841 DeviantWhiteFlash rational64s[3] 0x0842 DeviantWhiteCustom rational64s[3] 0x0846 ColorTemperature int16u 0x0847 WB_RGBLevelsAsShot no 0x0848 WB_RGBLevelsDaylight no 0x0849 WB_RGBLevelsTungsten no 0x084a WB_RGBLevelsFluorescent no 0x084b WB_RGBLevelsFlash no 0x084c WB_RGBLevelsCustom no 0x084d WB_RGBLevelsAuto no 0x0852 WB_RGBMulDaylight rational64u[3] 0x0853 WB_RGBMulTungsten rational64u[3] 0x0854 WB_RGBMulFluorescent rational64u[3] 0x0855 WB_RGBMulFlash rational64u[3] 0x085c WB_RGBCoeffsDaylight no 0x085d WB_RGBCoeffsTungsten no 0x085e WB_RGBCoeffsFluorescent no 0x085f WB_RGBCoeffsFlash no 0x0898 ExposureGainDaylight rational64s 0x0899 ExposureGainTungsten rational64s 0x089a ExposureGainFluorescent rational64s 0x089b ExposureGainFlash rational64s 0x089c ExposureGainCustom rational64s 0x089d AnalogISOTable rational64u[3] 0x089e AnalogCaptureISO int32u 0x089f ISOCalibrationGain rational64u 0x08a0 ISOCalibrationGainTable no 0x08a1 ExposureHeadroomFactor no 0x08ab LinearitySplineTags no 0x08fc MonitorMatrix rational64s[9] 0x08fd TonScaleTable no 0x08fe Gamma rational64u 0x08ff LogLinTable no 0x0900 LinLogTable no 0x0901 GammaTable no 0x0902 LogScale rational64u 0x0903 BaseISO rational64u 0x0904 LinLogCoring int16u 0x0905 PatternGainConversionTable no 0x0906 DefectCount no 0x0907 DefectList no 0x0908 DefectListPacked no 0x0909 ImageSpace int16u 0x090a ThumbnailCompressionTable no 0x090b ThumbnailExpansionTable no 0x090c ImageCompressionTable no 0x090d ImageExpansionTable no 0x090e EighteenPercentPoint no 0x090f DefectIsoCode int16u 0x0910 BaseISODaylight rational64u 0x0911 BaseISOTungsten rational64u 0x0912 BaseISOFluorescent rational64u 0x0913 BaseISOFlash rational64u 0x091a MatrixSelectThreshold int16s 0x091b MatrixSelectK rational64u 0x091c IlluminantDetectTable no 0x091d RGTable no 0x091e MatrixSelectThreshold1 int16s 0x091f MatrixSelectThreshold2 int16s 0x0924 PortraitMatrix no 0x0925 PortraitToneScaleTable no 0x092e EnableSharpening int16u 0x092f SharpeningKernel int16s[25] 0x0930 EdgeMapSlope int16u 0x0931 EdgeMapX1 int16u 0x0932 EdgeMapX2 int16u 0x0933 KernelDenominators int16u[3] 0x0934 EdgeMapX3 int16u 0x0935 EdgeMapX4 int16u 0x0936 SharpenForThumbnail no 0x0937 EdgeSpline no 0x0938 DownSampleBy2Hor no 0x0939 DownSampleBy2Ver no 0x093a DownSampleBy4Hor no 0x093b DownSampleBy4Ver no 0x093c DownSampleBy3Hor no 0x093d DownSampleBy3Ver no 0x093e DownSampleBy6Hor no 0x093f DownSampleBy6Ver no 0x0940 DownSampleBy2Hor3MPdcr no 0x0941 DownSampleBy2Ver3MPdcr no 0x0942 ThumbnailResizeRatio no 0x0943 AtCaptureUserCrop int32u[4] 0x0944 ImageResolution int32u 0x0945 ImageResolutionJpg int32u 0x094c USMParametersLow no 0x094d USMParametersMed no 0x094e USMParametersHigh no 0x094f USMParametersHost no 0x0950 EdgeSplineLow no 0x0951 EdgeSplineMed no 0x0952 EdgeSplineHigh no 0x0953 USMParametersHost6MP no 0x0954 USMParametersHost3MP no 0x0960 PatternImagerWidth int16u 0x0961 PatternImagerHeight int16u 0x0962 PatternAreaWidth int16u 0x0963 PatternAreaHeight int16u 0x0964 PatternCorrectionGains no 0x0965 PatternCorrectionOffsets no 0x0966 PatternX int16u 0x0967 PatternY int16u 0x0968 PatternCorrectionFactors no 0x0969 PatternCorrectionFactorScale int16u 0x096a PatternCropRows1 int16u 0x096b PatternCropRows2 int16u 0x096c PatternCropCols1 int16u 0x096d PatternCropCols2 int16u 0x096e PixelCorrectionGains no 0x096f StitchRows no 0x0970 StitchColumns no 0x0971 PixelCorrectionScale int16u 0x0972 PixelCorrectionOffset int16u 0x0988 LensTableIndex no 0x0992 DiffTileGains602832 no 0x0993 DiffTileGains24t852822 no 0x099c TileGainDeterminationTable no 0x099d NemoBlurKernel no 0x099e NemoTileSize no 0x099f NemoGainFactors no 0x09a0 NemoDarkLimit no 0x09a1 NemoHighlight12Limit no 0x09c4 ImagerFileProductionLevel int16u 0x09c5 ImagerFileDateCreated int32u 0x09c6 CalibrationVersion string 0x09c7 ImagerFileTagsVersionStandard int16u 0x09c8 IFCameraModel string 0x09c9 CalibrationHistory string 0x09ca CalibrationLog no 0x09ce SensorSerialNumber string 0x09f6 DefectConcealArtCorrectThres no 0x09f7 SglColDCACThres1 no 0x09f8 SglColDCACThres2 no 0x09f9 SglColDCACTHres3 no 0x0a01 DblColDCACThres1 no 0x0a02 DblColDCACThres2 no 0x0a0a DefectConcealThresTable no 0x0a28 MonoUniqueMatrix no 0x0a29 MonoMonitorMatrix no 0x0a2a MonoToneScaleTable no 0x0a5a OmenInitialScaling no 0x0a5b OmenInitialRows no 0x0a5c OmenInitialColumns no 0x0a5d OmenInitialIPFStrength int32s[4] 0x0a5e OmenEarlyStrength int32s[4] 0x0a5f OmenAutoStrength int32s[4] 0x0a60 OmenAtCaptureStrength int32s[4] 0x0a61 OmenAtCaptureMode no 0x0a62 OmenFocalLengthLimit int16s 0x0a64 OmenSurfaceIndex int16s 0x0a65 OmenPercentToRationalLimitsRed no 0x0a66 OmenPercentToRationalLimitsGoR no 0x0a67 OmenPercentToRationalLimitsBlue no 0x0a68 OmenPercentToRationalLimitsGoB no 0x0a6e OmenEarlyGoBSurface no 0x0a6f OmenEarlyGoBRows no 0x0a70 OmenEarlyGoBColumns no 0x0a73 OmenSmoothingKernel no 0x0a74 OmenGradientOffset no 0x0a75 OmenGradientKernel no 0x0a76 OmenGradientKernelTaps no 0x0a77 OmenRatioClipFactors no 0x0a78 OmenRatioExclusionFactors no 0x0a79 OmenGradientExclusionLimits no 0x0a7a OmenROICoordinates no 0x0a7b OmenROICoefficients no 0x0a7c OmenRangeWeighting no 0x0a7d OmenMeanToStrength no 0x0bb8 FactoryWhiteGainsDaylight no 0x0bb9 FactoryWhiteOffsetsDaylight no 0x0bba DacGainsCoarse no 0x0bbb DacGainsFine no 0x0bbc DigitalExposureGains no 0x0bbd DigitalExposureBiases no 0x0bbe BlackClamp no 0x0bbf ChannelCoarseGainAdjust no 0x0bc0 BlackClampOffset no 0x0bf4 DMPixelThresholdFactor no 0x0bf5 DMWindowThresholdFactor no 0x0bf6 DMTrimFraction no 0x0bf7 DMSmoothRejThresh no 0x0bf8 DMFillRejThresh no 0x0bf9 VMWsize no 0x0bfa DMErodeRadius no 0x0bfb DMNumPatches no 0x0bfc DMNoiseScale no 0x0bfe BrightDefectThreshold no 0x0bff BrightDefectIntegrationMS no 0x0c00 BrightDefectIsoCode no 0x0c03 TopDarkRow1 no 0x0c04 TopDarkRow2 no 0x0c05 BottomDarkRow1 no 0x0c06 BottomDarkRow2 no 0x0c07 LeftDarkCol1 no 0x0c08 LeftDarkCol2 no 0x0c09 RightDarkCol1 no 0x0c0a RightDarkCol2 no 0x0c0b HMPixThresh no 0x0c0c HMColThresh no 0x0c0d HMWsize no 0x0c0e HMColRejThresh no 0x0c0f VMPixThresh no 0x0c10 VMColThresh no 0x0c11 VMNbands no 0x0c12 VMColDropThresh no 0x0c13 VMPatchResLimit no 0x0c14 MapScale no 0x0c1c Klut no 0x0c1d RimNonlinearity no 0x0c1e InverseRimNonlinearity no 0x0c1f RembrandtToneScale no 0x0c20 RimToNifColorTransform no 0x0c21 RimToNifScaleFactor no 0x0c22 NifNonlinearity no 0x0c23 SBALogTransform no 0x0c24 InverseSBALogTransform no 0x0c25 SBABlack int16u 0x0c26 SBAGray int16u 0x0c27 SBAWhite int16u 0x0c28 GaussianWeights no 0x0c29 SfsBoundary no 0x0c2a CoringTableBest no 0x0c2b CoringTableBetter no 0x0c2c CoringTableGood no 0x0c2d ExposureReferenceGain no 0x0c2e ExposureReferenceOffset no 0x0c2f SBARedBalanceLut no 0x0c30 SBAGreenBalanceLut no 0x0c31 SBABlueBalanceLut no 0x0c32 SBANeutralBAL int32s 0x0c33 SBAGreenMagentaBAL int32s 0x0c34 SBAIlluminantBAL int32s 0x0c35 SBAAnalysisComplete int8u 0x0c36 JPEGQTableBest no 0x0c37 JPEGQTableBetter no 0x0c38 JPEGQTableGood no 0x0c39 RembrandtPortraitToneScale no 0x0c3a RembrandtConsumerToneScale no 0x0c3b CFAGreenThreshold1 no 0x0c3c CFAGreenThreshold2 no 0x0c3d QTableLarge50Pct no 0x0c3e QTableLarge67Pct no 0x0c3f QTableLarge100Pct no 0x0c40 QTableMedium50Pct no 0x0c41 QTableMedium67Pct no 0x0c42 QTableMedium100Pct no 0x0c43 QTableSmall50Pct no 0x0c44 QTableSmall67Pct no 0x0c45 QTableSmall100Pct no 0x0c46 SBAHighGray int16u 0x0c47 SBALowGray int16u 0x0c48 CaptureLook int16u 0x0c49 SBAIllOffset int16s 0x0c4a SBAGmOffset int16s 0x0c4b NifNonlinearity12Bit no 0x0c4c SharpeningOn no 0x0c4d NifNonlinearity16Bit no 0x0c4e RawHistogram no 0x0c4f RawCFAComponentAverages no 0x0c50 DisableFlagsPresent no 0x0c51 DelayCols no 0x0c52 DummyColsLeft no 0x0c53 TrashColsRight no 0x0c54 BlackColsRight no 0x0c55 DummyColsRight no 0x0c56 OverClockColsRight no 0x0c57 UnusedBlackRowsTopOut no 0x0c58 TrashRowsBottom no 0x0c59 BlackRowsBottom no 0x0c5a OverClockRowsBottom no 0x0c5b BlackColsLeft no 0x0c5c BlackRowsTop no 0x0c5d PartialActiveColsLeft no 0x0c5e PartialActiveColsRight no 0x0c5f PartialActiveRowsTop no 0x0c60 PartialActiveRowsBottom no 0x0c61 ProcessBorderColsLeft int16u 0x0c62 ProcessBorderColsRight int16u 0x0c63 ProcessBorderRowsTop int16u 0x0c64 ProcessBorderRowsBottom int16u 0x0c65 ActiveCols no 0x0c66 ActiveRows no 0x0c67 FirstLines no 0x0c68 UnusedBlackRowsTopIn no 0x0c69 UnusedBlackRowsBottomIn no 0x0c6a UnusedBlackRowsBottomOut no 0x0c6b UnusedBlackColsLeftOut no 0x0c6c UnusedBlackColsLeftIn no 0x0c6d UnusedBlackColsRightIn no 0x0c6e UnusedBlackColsRightOut no 0x0c6f CFAOffsetRows int32u 0x0c70 ShiftCols int16s 0x0c71 CFAOffsetCols int32u 0x0c76 DarkMapScale no 0x0c77 HMapHandling no 0x0c78 VMapHandling no 0x0c79 DarkThreshold no 0x0c7a DMDitherMatrix int16u 0x0c7b DMDitherMatrixWidth int16u 0x0c7c DMDitherMatrixHeight int16u 0x0c7d MaxPixelValueThreshold int16u 0x0c7e HoleFillDeltaThreshold int16u 0x0c7f DarkPedestal int16u 0x0c80 ImageProcessingFileTagsVersionNumber int16u 0x0c81 ImageProcessingFileDateCreated string 0x0c82 DoublingMicrovolts int32s 0x0c83 DarkFrameShortExposure int32u 0x0c84 DarkFrameLongExposure int32u 0x0c85 DarkFrameCountFactor rational64u 0x0c88 HoleFillDarkDeltaThreshold int16u 0x0c89 FarkleWhiteThreshold no 0x0c8a ColumnResetOffsets no 0x0c8b ColumnGainFactors no 0x0c8c Channel0LagKernel no 0x0c8d Channel1LagKernel no 0x0c8e Channel2LagKernel no 0x0c8f Channel3LagKernel no 0x0c90 BluegrassTable no 0x0c91 BluegrassScale1 no 0x0c92 BluegrassScale2 no 0x0ce4 FinishedFileProcessingRequest no 0x0ce5 FirmwareVersion string 0x0ce6 HostSoftwareExportVersion no 0x0ce7 HostSoftwareRendering int32u 0x0dac DCS3XXProcessingInfoIFD no 0x0dad DCS3XXProcessingInfo no 0x0dae IPAVersion int32u 0x0db6 FinishIPAVersion no 0x0db7 FinishIPFVersion no 0x0db8 FinishFileType int32u 0x0db9 FinishResolution int32u 0x0dba FinishNoise int32u 0x0dbb FinishSharpening int32u 0x0dbc FinishLook int32u 0x0dbd FinishExposure int32u 0x0e0b SigmaScalingFactorLowRes rational64u 0x0e0c SigmaScalingFactorCamera rational64u 0x0e0d SigmaImpulseParameters int16u[n] 0x0e0e SigmaNoiseThreshTableV2 no 0x0e0f SigmaSizeTable int16u[n] 0x0e10 DacGainsCoarseAdjPreIF41 no 0x0e11 SigmaNoiseFilterCalTableV1 no 0x0e12 SigmaNoiseFilterTableV1 no 0x0e13 Lin12ToKlut8 no 0x0e14 SigmaNoiseFilterTableV1Version no 0x0e15 Lin12ToKlut12 no 0x0e16 Klut12ToLin12 no 0x0e17 NifNonlinearity12To16 no 0x0e18 SBALog12Transform no 0x0e19 InverseSBALog12Transform no 0x0e1a ToneScale0 no 0x0e1b ToneScale1 no 0x0e1c ToneScale2 no 0x0e1d ToneScale3 no 0x0e1e ToneScale4 no 0x0e1f ToneScale5 no 0x0e20 ToneScale6 no 0x0e21 ToneScale7 no 0x0e22 ToneScale8 no 0x0e23 ToneScale9 no 0x0e24 DayMat0 no 0x0e25 DayMat1 no 0x0e26 DayMat2 no 0x0e27 DayMat3 no 0x0e28 DayMat4 no 0x0e29 DayMat5 no 0x0e2a DayMat6 no 0x0e2b DayMat7 no 0x0e2c DayMat8 no 0x0e2d DayMat9 no 0x0e2e TungMat0 no 0x0e2f TungMat1 no 0x0e30 TungMat2 no 0x0e31 TungMat3 no 0x0e32 TungMat4 no 0x0e33 TungMat5 no 0x0e34 TungMat6 no 0x0e35 TungMat7 no 0x0e36 TungMat8 no 0x0e37 TungMat9 no 0x0e38 FluorMat0 no 0x0e39 FluorMat1 no 0x0e3a FluorMat2 no 0x0e3b FluorMat3 no 0x0e3c FluorMat4 no 0x0e3d FluorMat5 no 0x0e3e FluorMat6 no 0x0e3f FluorMat7 no 0x0e40 FluorMat8 no 0x0e41 FluorMat9 no 0x0e42 FlashMat0 no 0x0e43 FlashMat1 no 0x0e44 FlashMat2 no 0x0e45 FlashMat3 no 0x0e46 FlashMat4 no 0x0e47 FlashMat5 no 0x0e48 FlashMat6 no 0x0e49 FlashMat7 no 0x0e4a FlashMat8 no 0x0e4b FlashMat9 no 0x0e4c KodakLook string 0x0e4d IPFCameraModel string 0x0e4e AH2GreenInterpolationThreshold int16u 0x0e4f ResamplingKernelDenominators067 int16u[3] 0x0e50 ResamplingKernelDenominators050 int16u[3] 0x0e51 ResamplingKernelDenominators100 int16u[3] 0x0e56 LookMat0 no 0x0e57 LookMat1 no 0x0e58 LookMat2 no 0x0e59 LookMat3 no 0x0e5a LookMat4 no 0x0e5b LookMat5 no 0x0e5c LookMat6 no 0x0e5d LookMat7 no 0x0e5e LookMat8 no 0x0e5f LookMat9 no 0x0e60 CFAInterpolationAlgorithm int16u 0x0e61 CFAInterpolationMetric int16u 0x0e62 CFAZipperFixThreshold int16u 0x0e63 NoiseReductionParametersKhufuRGB int16u[9] 0x0e64 NoiseReductionParametersKhufu6MP int16u[9] 0x0e65 NoiseReductionParametersKhufu3MP int16u[9] 0x0e6a ChromaNoiseHighFThresh int32u[2] 0x0e6b ChromaNoiseLowFThresh int32u[2] 0x0e6c ChromaNoiseEdgeMapThresh int32u 0x0e6d ChromaNoiseColorSpace int32u 0x0e6e EnableChromaNoiseReduction int16u 0x0e6f NoiseReductionParametersHostRGB int16u[9] 0x0e70 NoiseReductionParametersHost6MP int16u[9] 0x0e71 NoiseReductionParametersHost3MP int16u[9] 0x0e72 NoiseReductionParametersCamera int16u[6] 0x0e73 NoiseReductionParametersAtCapture int16u[6] 0x0e74 LCDMatrix rational64s[9] 0x0e75 LCDMatrixChickFix rational64s[9] 0x0e76 LCDMatrixMarvin rational64s[9] 0x0e7c LCDGammaTableChickFix no 0x0e7d LCDGammaTableMarvin no 0x0e7e LCDGammaTable no 0x0e7f LCDSharpeningF1 no 0x0e80 LCDSharpeningF2 no 0x0e81 LCDSharpeningF3 no 0x0e82 LCDSharpeningF4 no 0x0e83 LCDEdgeMapX1 no 0x0e84 LCDEdgeMapX2 no 0x0e85 LCDEdgeMapX3 no 0x0e86 LCDEdgeMapX4 no 0x0e87 LCDEdgeMapSlope no 0x0e88 YCrCbMatrix no 0x0e89 LCDEdgeSpline no 0x0e92 Fac18Per int16u 0x0e93 Fac170Per int16u 0x0e94 Fac100Per int16u 0x0e9b ExtraTickLocations no 0x0e9c RGBtoeV0 no 0x0e9d RGBtoeV1 no 0x0e9e RGBtoeV2 no 0x0e9f RGBtoeV3 no 0x0ea0 RGBtoeV4 no 0x0ea1 RGBtoeV5 no 0x0ea2 RGBtoeV6 no 0x0ea3 RGBtoeV7 no 0x0ea4 RGBtoeV8 no 0x0ea5 RGBtoeV9 no 0x0ea6 LCDHistLUT0 no 0x0ea7 LCDHistLUT1 no 0x0ea8 LCDHistLUT2 no 0x0ea9 LCDHistLUT3 no 0x0eaa LCDHistLUT4 no 0x0eab LCDHistLUT5 no 0x0eac LCDHistLUT6 no 0x0ead LCDHistLUT7 no 0x0eae LCDHistLUT8 no 0x0eaf LCDHistLUT9 no 0x0eb0 LCDLinearClipValue no 0x0ece LCDStepYvalues no 0x0ecf LCDStepYvaluesChickFix no 0x0ed0 LCDStepYvaluesMarvin no 0x0ed8 InterpolationCoefficients no 0x0ed9 InterpolationCoefficients6MP no 0x0eda InterpolationCoefficients3MP no 0x0f00 NoiseReductionParametersHostNormal no 0x0f01 NoiseReductionParametersHostStrong no 0x0f02 NoiseReductionParametersHostLow no 0x0f0a MariahTextureThreshold int16u 0x0f0b MariahMapLoThreshold int16u 0x0f0c MariahMapHiThreshold int16u 0x0f0d MariahChromaBlurSize int16u 0x0f0e MariahSigmaThreshold int16u 0x0f0f MariahThresholds no 0x0f10 MariahThresholdsNormal no 0x0f11 MariahThresholdsStrong no 0x0f12 MariahThresholdsLow no 0x0f14 KhufuLinearRedMixingCoefficient no 0x0f15 KhufuLinearGreenMixingCoefficient no 0x0f16 KhufuLinearBlueMixingCoefficient no 0x0f17 KhufuUSpaceC2MixingCoefficient no 0x0f18 KhufuSigmaGaussianWeights no 0x0f19 KhufuSigmaScalingFactors6MP no 0x0f1a KhufuSigmaScalingFactors3MP no 0x0f1b KhufuSigmaScalingFactors14MP no 0x0f32 KhufuI0Thresholds no 0x0f33 KhufuI1Thresholds no 0x0f34 KhufuI2Thresholds no 0x0f35 KhufuI3Thresholds no 0x0f36 KhufuI4Thresholds no 0x0f37 KhufuI5Thresholds no 0x0f3c CondadoDayBVThresh int16u 0x0f3d CondadoNeuRange int16u 0x0f3e CondadoBVFactor int16s 0x0f3f CondadoIllFactor int16s 0x0f40 CondadoTunThresh int16s 0x0f41 CondadoFluThresh int16s 0x0f42 CondadoDayOffsets int16s[2] 0x0f43 CondadoTunOffsets int16s[2] 0x0f44 CondadoFluOffsets int16s[2] 0x0f5a ERIMMToCRGB0Spline no 0x0f5b ERIMMToCRGB1Spline no 0x0f5c ERIMMToCRGB2Spline no 0x0f5d ERIMMToCRGB3Spline no 0x0f5e ERIMMToCRGB4Spline no 0x0f5f ERIMMToCRGB5Spline no 0x0f60 ERIMMToCRGB6Spline no 0x0f61 ERIMMToCRGB7Spline no 0x0f62 ERIMMToCRGB8Spline no 0x0f63 ERIMMToCRGB9Spline no 0x0f64 CRGBToERIMM0Spline no 0x0f65 CRGBToERIMM1Spline no 0x0f66 CRGBToERIMM2Spline no 0x0f67 CRGBToERIMM3Spline no 0x0f68 CRGBToERIMM4Spline no 0x0f69 CRGBToERIMM5Spline no 0x0f6a CRGBToERIMM6Spline no 0x0f6b CRGBToERIMM7Spline no 0x0f6c CRGBToERIMM8Spline no 0x0f6d CRGBToERIMM9Spline no 0x0f6e ERIMMNonLinearitySpline no 0x0f6f Delta12To8Spline no 0x0f70 Delta8To12Spline no 0x0f71 InverseMonitorMatrix no 0x0f72 NifNonlinearityExt no 0x0f73 InvNifNonLinearity no 0x0f74 RIMM13ToERIMM12Spline no 0x0f78 ToneScale0Spline no 0x0f79 ToneScale1Spline no 0x0f7a ToneScale2Spline no 0x0f7b ToneScale3Spline no 0x0f7c ToneScale4Spline no 0x0f7d ToneScale5Spline no 0x0f7e ToneScale6Spline no 0x0f7f ToneScale7Spline no 0x0f80 ToneScale8Spline no 0x0f81 ToneScale9Spline no 0x0f82 ERIMMToneScale0Spline no 0x0f83 ERIMMToneScale1Spline no 0x0f84 ERIMMToneScale2Spline no 0x0f85 ERIMMToneScale3Spline no 0x0f86 ERIMMToneScale4Spline no 0x0f87 ERIMMToneScale5Spline no 0x0f88 ERIMMToneScale6Spline no 0x0f89 ERIMMToneScale7Spline no 0x0f8a ERIMMToneScale8Spline no 0x0f8b ERIMMToneScale9Spline no 0x0f8c RIMMToCRGB0Spline no 0x0f8d RIMMToCRGB1Spline no 0x0f8e RIMMToCRGB2Spline no 0x0f8f RIMMToCRGB3Spline no 0x0f90 RIMMToCRGB4Spline no 0x0f91 RIMMToCRGB5Spline no 0x0f92 RIMMToCRGB6Spline no 0x0f93 RIMMToCRGB7Spline no 0x0f94 RIMMToCRGB8Spline no 0x0f95 RIMMToCRGB9Spline no 0x0fa0 QTableLarge25Pct no 0x0fa1 QTableMedium25Pct no 0x0fa2 QTableSmall25Pct no 0x1130 NoiseReductionKernel no 0x1388 UserMetaData no 0x1389 InputProfile undef 0x138a KodakLookProfile undef 0x138b OutputProfile undef 0x1390 SourceProfilePrefix string 0x1391 ToneCurveProfileName string 0x1392 InputProfile ICC_Profile 0x1393 ProcessParametersV2 no 0x1394 ReservedBlob2 no 0x1395 ReservedBlob3 no 0x1396 ReservedBlob4 no 0x1397 ReservedBlob5 no 0x1398 ReservedBlob6 no 0x1399 ReservedBlob7 no 0x139a ReservedBlob8 no 0x139b ReservedBlob9 no 0x1770 ScriptVersion int32u 0x177a ImagerTimingData no 0x1784 ISO int32u 0x17a2 Scav11Cols no 0x17a3 Scav12Cols no 0x17a4 Scav21Cols no 0x17a5 Scav22Cols no 0x17a6 ActiveCTEMonitor1Cols no 0x17a7 ActiveCTEMonitor2Cols no 0x17a8 ActiveCTEMonitorRows no 0x17a9 ActiveBuf1Cols no 0x17aa ActiveBuf2Cols no 0x17ab ActiveBuf1Rows no 0x17ac ActiveBuf2Rows no 0x17c0 HRNoiseLines no 0x17c1 RNoiseLines no 0x17c2 ANoiseLines no 0x17d4 ImagerCols int16u 0x17de ImagerRows int16u 0x17e8 PartialActiveCols1 int32u 0x17f2 PartialActiveCols2 int32u 0x17fc PartialActiveRows1 int32u 0x1806 PartialActiveRows2 int32u 0x1810 ElectricalBlackColumns int32u 0x181a ResetBlackSegRows int32u 0x1838 CaptureWidthNormal int32u 0x1839 CaptureHeightNormal int32u 0x183a CaptureWidthResetBlackSegNormal no 0x183b CaptureHeightResetBlackSegNormal no 0x183c DarkRefOffsetNormal no 0x1842 CaptureWidthTest int32u 0x1843 CaptureHeightTest no 0x1844 CaptureWidthResetBlackSegTest no 0x1845 CaptureHeightResetBlackSegTest no 0x1846 DarkRefOffsetTest no 0x184c ImageSegmentStartLine int32u 0x184d ImageSegmentLines int32u 0x184e SkipLineTime int32u 0x1860 FastResetLineTime int32u 0x186a NormalLineTime int32u 0x1874 MinIntegrationRows int32u 0x187e PreReadFastResetCount int32u 0x1888 TransferTimeNormal int32u 0x1889 TransferTimeTest int32u 0x188a QuietTime int32u 0x189c OverClockCols int16u 0x18a6 H2ResetBlackPixels int32u 0x18b0 H3ResetBlackPixels int32u 0x18ba BlackAcquireRows int32u 0x18c4 OverClockRows int16u 0x18ce H3ResetBlackColumns int32u 0x18d8 DarkBlackSegRows int32u 0x1900 CrossbarEnable no 0x1901 FifoenOnePixelDelay int32u 0x1902 ReadoutTypeRequested int32u 0x1903 ReadoutTypeActual int32u 0x190a OffsetDacValue int32u 0x1914 TempAmpGainX100 int32u 0x191e VarrayDacNominalValues int32u[3] 0x1928 VddimDacNominalValues no 0x1964 C14Configuration int32u 0x196e TDA1Offset int32u[3] 0x196f TDA1Bandwidth int32u 0x1970 TDA1Gain int32u[3] 0x1971 TDA1EdgePolarity int32u 0x1978 TDA2Offset int32u[3] 0x1979 TDA2Bandwidth int32u 0x197a TDA2Gain int32u[3] 0x197b TDA2EdgePolarity int32u 0x1982 TDA3Offset int32u[3] 0x1983 TDA3Bandwidth int32u 0x1984 TDA3Gain int32u[3] 0x1985 TDA3EdgePolarity int32u 0x198c TDA4Offset int32u[3] 0x198d TDA4Bandwidth int32u 0x198e TDA4Gain int32u[3] 0x198f TDA4EdgePolarity int32u 0xfde8 ComLenBlkSize int16u

Kodak TextualInfo Tags

Below is a list of tags which have been observed in the Kodak TextualInfo data, however ExifTool will extract information from any tags found here.

Tag ID Tag Name Writable —— ——– ——– AF Function AFMode no Actual Compensation ActualCompensation no Aperture Aperture no Auto Bracket AutoBracket no Brightness Value BrightnessValue no Camera CameraModel no Camera body CameraBody no Compensation ExposureCompensation no Date Date no Exposure Bias ExposureBias no Exposure Mode ExposureMode no Firmware Version FirmwareVersion no Flash Compensation FlashExposureComp no Flash Fired FlashFired no Flash Sync Mode FlashSyncMode no Focal Length FocalLength no Height KodakImageHeight no ISO ISO no ISO Speed ISO no Image Number ImageNumber no Lens Lens no Max Aperture MaxAperture no Meter Mode MeterMode no Min Aperture MinAperture no Popup Flash PopupFlash no Serial Number SerialNumber no Shooting Mode ShootingMode no Shutter ShutterSpeed no Temperature Temperature no Time Time no White balance WhiteBalance no Width KodakImageWidth no _other_info OtherInfo no

Kodak Processing Tags

Index2 Tag Name Writable —— ——– ——– 20 WB_RGBLevels no

Kodak Type2 Tags

These tags are used by the Kodak DC220, DC260, DC265 and DC290, Hewlett-Packard PhotoSmart 618, C500 and C912, Pentax EI-200 and EI-2000, and Minolta EX1500Z.

Index1 Tag Name Writable —— ——– ——– 8 KodakMaker string[32] 40 KodakModel string[32] 108 KodakImageWidth int32u 112 KodakImageHeight int32u

Kodak Type3 Tags

These tags are used by the DC240, DC280, DC3400 and DC5000.

Index1 Tag Name Writable —— ——– ——– 12 YearCreated int16u 14 MonthDayCreated int8u[2] 16 TimeCreated int8u[4] 30 OpticalZoom int16u 55 Sharpness int8s 56 ExposureTime int32u 60 FNumber int16u 78 ISO int16u

Kodak Type4 Tags

These tags are used by the DC200 and DC215.

Index1 Tag Name Writable —— ——– ——– 32 OriginalFileName string[12]

Kodak Type5 Tags

These tags are used by the CX4200, CX4210, CX4230, CX4300, CX4310, CX6200 and CX6230.

Index1 Tag Name Writable —— ——– ——– 20 ExposureTime int32u 26 WhiteBalance int8u 28 FNumber int16u 30 ISO int16u 32 OpticalZoom int16u 34 DigitalZoom int16u 39 FlashMode int8u 42 ImageRotated int8u 43 Macro int8u

Kodak Type6 Tags

These tags are used by the DX3215 and DX3700.

Index1 Tag Name Writable —— ——– ——– 16 ExposureTime int32u 20 ISOSetting? int32u 24 FNumber int16u 26 ISO int16u 28 OpticalZoom int16u 30 DigitalZoom int16u 34 Flash int16u

Kodak Type7 Tags

The maker notes of models such as the C340, C433, CC533, LS755, V803 and V1003 seem to start with the camera serial number. The C310, C315, C330, C643, C743, CD33, CD43, CX7220 and CX7300 maker notes are also decoded using this table, although the strings for these cameras don’t conform to the usual Kodak serial number format, and instead have the model name followed by 8 digits.

Index1 Tag Name Writable —— ——– ——– 0 SerialNumber string[16]

Kodak Type8 Tags

Kodak models such as the ZD710, P712, P850, P880, V1233, V1253, V1275, V1285, Z612, Z712, Z812, Z885 use standard TIFF IFD format for the maker notes. In keeping with Kodak’s strategy of inconsistent makernotes, models such as the M380, M1033, M1093, V1073, V1273, Z1012, Z1085 and Z8612 also use these tags, but these makernotes begin with a TIFF header instead of an IFD entry count and use relative instead of absolute offsets. There is a large amount of information stored in these maker notes (apparently with much duplication), but relatively few tags have so far been decoded.

Tag ID Tag Name Writable —— ——– ——– 0xfc00 SubIFD0 Kodak SubIFD0 Kodak SubIFD0 0xfc01 SubIFD1 Kodak SubIFD1 Kodak SubIFD1 0xfc02 SubIFD2 Kodak SubIFD2 Kodak SubIFD2 0xfc03 SubIFD3 Kodak SubIFD3 Kodak SubIFD3 0xfc04 SubIFD4 Kodak SubIFD4 Kodak SubIFD4 0xfc05 SubIFD5 Kodak SubIFD5 Kodak SubIFD5 0xfc06 SubIFD6 Kodak SubIFD6 Kodak SubIFD6 0xfcff SubIFD255 Kodak SubIFD0 0xff00 CameraInfo Kodak CameraInfo

Kodak SubIFD0 Tags

SubIFD0 through SubIFD5 tags are written a number of newer Kodak models.

Tag ID Tag Name Writable —— ——– ——– 0xfa02 SceneMode int16u 0xfa19 SerialNumber string 0xfa1d KodakImageWidth int16u 0xfa1e KodakImageHeight int16u 0xfa20 SensorWidth int16u 0xfa21 SensorHeight int16u 0xfa23 FNumber int16u 0xfa24 ExposureTime int32u 0xfa2e ISO int16u 0xfa3d OpticalZoom int16u 0xfa46 ISO int16u 0xfa51 KodakImageWidth int16u 0xfa52 KodakImageHeight int16u 0xfa54 ThumbnailWidth int16u 0xfa55 ThumbnailHeight int16u 0xfa57 PreviewImageWidth int16u 0xfa58 PreviewImageHeight int16u

Kodak SubIFD1 Tags

Tag ID Tag Name Writable —— ——– ——– 0x0027 ISO int16u 0x0028 ISO int16u

Kodak SubIFD2 Tags

Tag ID Tag Name Writable —— ——– ——– 0x6002 SceneModeUsed int32u 0x6006 OpticalZoom int32u 0x6103 MaxAperture int32u 0xf002 SceneModeUsed int32u 0xf006 OpticalZoom int32u 0xf103 FNumber int32u 0xf104 ExposureTime int32u 0xf105 ISO int32u

Kodak SubIFD3 Tags

Tag ID Tag Name Writable —— ——– ——– 0x1000 OpticalZoom int16u

Kodak SubIFD4 Tags

Tag ID Tag Name Writable —— ——– ——– [no tags known]

Kodak SubIFD5 Tags

Tag ID Tag Name Writable —— ——– ——– 0x000f OpticalZoom int16u

Kodak SubIFD6 Tags

SubIFD6 is written by the M580.

Tag ID Tag Name Writable —— ——– ——– [no tags known]

Kodak CameraInfo Tags

These tags are used by the P712, P850 and P880.

Tag ID Tag Name Writable —— ——– ——– 0xf900 SensorWidth int16u 0xf901 SensorHeight int16u 0xf902 BayerPattern string 0xf903 SensorFullWidth int16u 0xf904 SensorFullHeight int16u 0xf907 KodakImageWidth int16u 0xf908 KodakImageHeight int16u 0xfa00 KodakInfoType string 0xfa04 SerialNumber string 0xfd04 FNumber int16u 0xfd05 ExposureTime int32u 0xfd06 ISO int16u

Kodak Type9 Tags

These tags are used by the Kodak C140, C180, C913, C1013, M320, M340 and M550, as well as various cameras marketed by other manufacturers.

Index1 Tag Name Writable —— ——– ——– 12 FNumber int16u 16 ExposureTime int32u 20 DateTimeOriginal string[20] 52 ISO int16u 87 FirmwareVersion string[16] 168 UnknownNumber no 196 UnknownNumber no

Kodak Type10 Tags

Another variation of the IFD-format type, this time with just a byte order indicator instead of a full TIFF header. These tags are used by the Z980.

Tag ID Tag Name Writable —— ——– ——– 0x0002 PreviewImageSize int16u[2] 0x0012 ExposureTime int32u 0x0013 FNumber int16u 0x0014 ISO int16u 0x001d FocalLength int32u

Kodak Type11 Tags

These tags are found in models such as the PixPro S-1. They are not writable because the inconsistency of Kodak maker notes is beginning to get on my nerves.

Tag ID Tag Name Writable —— ——– ——– 0x0104 FirmwareVersion no 0x0203 PictureEffect no 0x0207 KodakModel no 0x0300 KodakMake no 0x0308 LensSerialNumber no 0x0309 LensModel no 0x030d LevelMeter? no 0x0311 Pitch no 0x0312 Yaw no 0x0313 Roll no 0x0314 CX? no 0x0315 CY? no 0x0316 Rads? no

Kodak Unknown Tags

Index1 Tag Name Writable —— ——– ——– [no tags known]

Kodak Meta Tags

These tags are found in the APP3 “Meta” segment of JPEG images from Kodak cameras such as the DC280, DC3400, DC5000, MC3, M580, Z950 and Z981. The structure of this segment is similar to the APP1 “Exif” segment, but a different set of tags is used.

Tag ID Tag Name Writable —— ——– ——– 0xc350 FilmProductCode no 0xc351 ImageSourceEK no 0xc352 CaptureConditionsPAR no 0xc353 CameraOwner undef 0xc354 SerialNumber undef 0xc355 UserSelectGroupTitle no 0xc356 DealerIDNumber no 0xc357 CaptureDeviceFID no 0xc358 EnvelopeNumber no 0xc359 FrameNumber no 0xc35a FilmCategory no 0xc35b FilmGencode no 0xc35c ModelAndVersion no 0xc35d FilmSize no 0xc35e SBA_RGBShifts no 0xc35f SBAInputImageColorspace no 0xc360 SBAInputImageBitDepth no 0xc361 SBAExposureRecord no 0xc362 UserAdjSBA_RGBShifts no 0xc363 ImageRotationStatus no 0xc364 RollGuidElements no 0xc365 MetadataNumber no 0xc366 EditTagArray no 0xc367 Magnification no 0xc36c NativeXResolution no 0xc36d NativeYResolution no 0xc36e KodakEffectsIFD Kodak SpecialEffects 0xc36f KodakBordersIFD Kodak Borders 0xc37a NativeResolutionUnit no 0xc418 SourceImageDirectory no 0xc419 SourceImageFileName no 0xc41a SourceImageVolumeName no 0xc46c PrintQuality no 0xc46e ImagePrintStatus no

Kodak SpecialEffects Tags

The Kodak SpecialEffects and Borders tags are found in sub-IFD’s within the Kodak JPEG APP3 “Meta” segment.

Tag ID Tag Name Writable —— ——– ——– 0x0000 DigitalEffectsVersion no 0x0001 DigitalEffectsName no 0x0002 DigitalEffectsType no

Kodak Borders Tags

Tag ID Tag Name Writable —— ——– ——– 0x0000 BordersVersion no 0x0001 BorderName no 0x0002 BorderID no 0x0003 BorderLocation no 0x0004 BorderType no 0x0008 WatermarkType no

Kodak KDC_IFD Tags

These tags are found in a separate IFD of KDC images from some newer Kodak models such as the P880 and Z1015IS.

Tag ID Tag Name Writable —— ——– ——– 0xfa00 SerialNumber string 0xfa0d WhiteBalance int8u 0xfa25 WB_RGBLevelsAuto no 0xfa27 WB_RGBLevelsTungsten no 0xfa28 WB_RGBLevelsFluorescent no 0xfa29 WB_RGBLevelsDaylight no 0xfa2a WB_RGBLevelsShade no

Kodak frea Tags

Information stored in the “frea” atom of Kodak PixPro SP360 MP4 videos.

Tag ID Tag Name Writable —— ——– ——– scra PreviewImage no thma ThumbnailImage no tima Duration no ver KodakVersion no

Kodak Free Tags

Information stored in the “free” atom of Kodak MP4 videos. (VERY bad form for Kodak to store useful information in an atom intended for unused space!)

Tag ID Tag Name Writable —— ——– ——– AprV ApertureValue no BrtV BrightnessValue no Expc ExposureCompensation no Expo ExposureTime no FL35 FocalLengthIn35mmFormat no FNum FNumber no FoLn FocalLength no ISOS ISO no SVer FirmwareVersion no Scrn PreviewInfo Kodak Scrn Seri SerialNumber no StSV ShutterSpeedValue no

Kodak Scrn Tags

Index2 Tag Name Writable —— ——– ——– 0 PreviewImageWidth no 1 PreviewImageHeight no 2 PreviewImageLength no 4 PreviewImage no

Kodak DcMD Tags

Metadata directory found in MOV and MP4 videos from some Kodak cameras.

Tag ID Tag Name Writable —— ——– ——– CMbo CameraByteOrder no Cmbo CameraByteOrder no DcEM DcEM Kodak DcEM DcME DcME Kodak DcME

Kodak DcEM Tags

Tag ID Tag Name Writable —— ——– ——– [no tags known]

Kodak DcME Tags

Tag ID Tag Name Writable —— ——– ——– [no tags known]

Kodak MOV Tags

This information is found in the TAGS atom of MOV videos from Kodak models such as the P880.

Index1 Tag Name Writable —— ——– ——– 0 Make no 22 Model no 64 ModelType no 78 ExposureTime no 82 FNumber no 90 ExposureCompensation no 112 FocalLength no

Kodak pose Tags

Streamed orientation information from the PixPro 4KVR360, extracted as sub-documents when the Duplicates option is used.

Tag ID Tag Name Writable —— ——– ——– Accelerometer Accelerometer no AngularVelocity AngularVelocity no

Leaf Tags

These tags are found in .MOS images from Leaf digital camera backs as written by Creo Leaf Capture. They exist within the Leaf-specific directory structure of EXIF tag 0x8606. The tables below list observed Leaf tags, however ExifTool will extract any tags found in the Leaf directories even if they don’t appear in these tables.

Tag ID Tag Name Writable —— ——– ——– JPEG_preview_data PreviewImage no JPEG_preview_info PreviewInfo no PDA_histogram_data PDAHistogram no back_serial_number BackSerial no camera_profile CameraProfile Leaf CameraProfile icc_camera_profile ICC_Profile ICC_Profile icc_camera_to_tone_matrix ToneMatrix no icc_camera_to_tone_space_flow ToneSpaceFlow no icc_rgb_ws_profile RGB_Profile ICC_Profile image_offset ImageOffset no pattern_ratation_angle PatternAngle no

Leaf CameraProfile Tags

All Tag ID’s in the following table have a leading ‘CamProf_’ which has been removed.

Tag ID Tag Name Writable —— ——– ——– back_type CameraBackType no capture_profile CaptureProfile Leaf CaptureProfile image_profile ImageProfile Leaf ImageProfile name CameraName no type CameraType no version CameraProfileVersion no

Leaf CaptureProfile Tags

All Tag ID’s in the following table have a leading ‘CaptProf_’ which has been removed.

Tag ID Tag Name Writable —— ——– ——– CCD_rect CCDRect no CCD_valid_rect CCDValidRect no CCD_video_rect CCDVideoRect no back_type CaptProfBackType no center_dark_rect CenterDarkRect no color_averages ColorAverages no color_matrix ColorMatrix no dark_correction_type DarkCorrectionType no image_bounds ImageBounds no image_fields ImageFields no image_offset ImageOffset no left_dark_rect LeftDarkRect no luminance_consts LuminanceConsts no mosaic_pattern MosaicPattern no name CaptProfName no number_of_planes NumberOfPlanes no raw_data_rotation RawDataRotation no reconstruction_type ReconstructionType no right_dark_rect RightDarkRect no serial_number CaptureSerial no type CaptProfType no version CaptProfVersion no xy_offset_info XYOffsetInfo no

Leaf ImageProfile Tags

All Tag ID’s in the following table have a leading ‘ImgProf_’ which has been removed.

Tag ID Tag Name Writable —— ——– ——– back_type ImgProfBackType no image_status ImageStatus no name ImgProfName no rotation_angle RotationAngle no shoot_setup ShootSetup Leaf ShootSetup type ImgProfType no version ImgProfVersion no

Leaf ShootSetup Tags

All Tag ID’s in the following table have a leading ‘ShootObj_’ which has been removed.

Tag ID Tag Name Writable —— ——– ——– back_type ShootObjBackType no camera_setup CameraSetup Leaf CameraSetup capture_setup CaptureSetup Leaf CaptureSetup color_setup ColorSetup Leaf ColorSetup look_header LookHeader Leaf LookHeader name ShootObjName no save_setup SaveSetup Leaf SaveSetup type ShootObjType no version ShootObjVersion no

Leaf CameraSetup Tags

All Tag ID’s in the following table have a leading ‘CameraObj_’ which has been removed.

Tag ID Tag Name Writable —— ——– ——– ISO_speed ISOSpeed no back_type CameraObjBackType no camera_type CameraType no lens_ID LensID no lens_type LensType no name CameraObjName no strobe Strobe no type CameraObjType no version CameraObjVersion no

Leaf CaptureSetup Tags

All Tag ID’s in the following table have a leading ‘CaptureObj_’ which has been removed.

Tag ID Tag Name Writable —— ——– ——– Multi_quality MultiQuality no back_type CaptureObjBackType no name CaptureObjName no neutals Neutals Leaf Neutrals selection Selection Leaf Selection sharpness Sharpness Leaf Sharpness single_quality SingleQuality no tone_curve ToneCurve Leaf ToneCurve type CaptureObjType no version CaptureObjVersion no

Leaf Neutrals Tags

All Tag ID’s in the following table have a leading ‘NeutObj_’ which has been removed.

Tag ID Tag Name Writable —— ——– ——– back_type NeutObjBackType no color_casts ColorCasts no highlight_end_points HighlightEndPoints no name NeutObjName no neutrals Neutrals no shadow_end_points ShadowEndPoints no type NeutObjType no version NeutObjVersion no

Leaf Selection Tags

All Tag ID’s in the following table have a leading ‘SelObj_’ which has been removed.

Tag ID Tag Name Writable —— ——– ——– back_type SelObjBackType no locks Locks no name SelObjName no orientation Orientation no rect Rect no resolution Resolution no scale Scale no type SelObjType no version SelObjVersion no

Leaf Sharpness Tags

All Tag ID’s in the following table have a leading ‘SharpObj_’ which has been removed.

Tag ID Tag Name Writable —— ——– ——– back_type SharpObjBackType no data_len DataLen no name SharpObjName no sharp_info SharpInfo no sharp_method SharpMethod no type SharpObjType no version SharpObjVersion no

Leaf ToneCurve Tags

All Tag ID’s in the following table have a leading ‘ToneObj_’ which has been removed.

Tag ID Tag Name Writable —— ——– ——– back_type ToneObjBackType no gamma Gamma no name ToneObjName no npts Npts no tones Tones no type ToneObjType no version ToneObjVersion no

Leaf ColorSetup Tags

All Tag ID’s in the following table have a leading ‘ColorObj_’ which has been removed.

Tag ID Tag Name Writable —— ——– ——– back_type ColorObjBackType no color_mode ColorMode no color_type ColorType no has_ICC HasICC no input_profile InputProfile no name ColorObjName no output_profile OutputProfile no type ColorObjType no version ColorObjVersion no

Leaf LookHeader Tags

All Tag ID’s in the following table have a leading ‘LookHead_’ which has been removed.

Tag ID Tag Name Writable —— ——– ——– back_type LookHeadBackType no name LookHeadName no type LookHeadType no version LookHeadVersion no

Leaf SaveSetup Tags

All Tag ID’s in the following table have a leading ‘SaveObj_’ which has been removed.

Tag ID Tag Name Writable —— ——– ——– back_type SaveObjBackType no leaf_auto_active LeafAutoActive no leaf_auto_base_name LeafAutoBaseName no leaf_hot_folder LeafHotFolder no leaf_open_proc_HDR LeafOpenProcHDR no leaf_output_file_type LeafOutputFileType no leaf_save_selection LeafSaveSelection no name SaveObjName no std_auto_active StdAutoActive no std_base_name StdBaseName no std_hot_folder StdHotFolder no std_open_in_photoshop StdOpenInPhotoshop no std_output_bit_depth StdOutputBitDepth no std_output_color_mode StdOutputColorMode no std_output_file_type StdOutputFileType no std_oxygen StdOxygen no std_save_selection StdSaveSelection no std_scaled_output StdScaledOutput no std_sharpen_output StdSharpenOutput no type SaveObjType no version SaveObjVersion no

Leaf SubIFD Tags

Leaf writes a TIFF-format sub-IFD inside IFD0 of a MOS image. No tags in this sub-IFD are currently known, except for tags 0x8602 and 0x8606 which really shouldn’t be here anyway (so they don’t appear in the table below) because they duplicate references to the same data from tags with the same ID in IFD0.

Tag ID Tag Name Writable —— ——– ——– [no tags known]

Minolta Tags

These tags are used by Minolta, Konica/Minolta as well as some Sony cameras. Minolta doesn’t make things easy for decoders because the meaning of some tags and the location where some information is stored is different for different camera models. (Take MinoltaQuality for example, which may be located in 5 different places.)

Tag ID Tag Name Writable —— ——– ——– 0x0000 MakerNoteVersion undef[4] 0x0001 MinoltaCameraSettingsOld Minolta CameraSettings 0x0003 MinoltaCameraSettings Minolta CameraSettings 0x0004 MinoltaCameraSettings7D Minolta CameraSettings7D 0x0010 CameraInfoA100 Minolta CameraInfoA100 0x0018 ISInfoA100 Minolta ISInfoA100 ImageStabilization no 0x0020 WBInfoA100 Minolta WBInfoA100 0x0040 CompressedImageSize int32u 0x0081 PreviewImage undef 0x0088 PreviewImageStart int32u* 0x0089 PreviewImageLength int32u* 0x0100 SceneMode int32u 0x0101 ColorMode int32u 0x0102 MinoltaQuality int32u 0x0103 MinoltaQuality int32u MinoltaImageSize int32u 0x0104 FlashExposureComp rational64s 0x0105 Teleconverter int32u 0x0107 ImageStabilization int32u 0x0109 RawAndJpgRecording int32u 0x010a ZoneMatching int32u 0x010b ColorTemperature int32u 0x010c LensType int32u 0x0111 ColorCompensationFilter int32s 0x0112 WhiteBalanceFineTune int32u 0x0113 ImageStabilization int32u 0x0114 MinoltaCameraSettings5D Minolta CameraSettings5D CameraSettingsA100 Minolta CameraSettingsA100 0x0115 WhiteBalance int32u 0x0e00 PrintIM PrintIM 0x0f00 MinoltaCameraSettings2 no

Minolta CameraSettings Tags

There is some variability in CameraSettings information between different models (and sometimes even between different firmware versions), so this information may not be as reliable as it should be. Because of this, tags in the following tables are set to lower priority to prevent them from superseding the values of same-named tags in other locations when duplicate tags are disabled.

Index4 Tag Name Writable —— ——– ——– 1 ExposureMode int32u 2 FlashMode int32u 3 WhiteBalance int32u~ 4 MinoltaImageSize int32u 5 MinoltaQuality int32u 6 DriveMode int32u 7 MeteringMode int32u 8 ISO int32u 9 ExposureTime int32u 10 FNumber int32u 11 MacroMode int32u 12 DigitalZoom int32u 13 ExposureCompensation int32u 14 BracketStep int32u 16 IntervalLength int32u 17 IntervalNumber int32u 18 FocalLength int32u 19 FocusDistance int32u 20 FlashFired int32u 21 MinoltaDate int32u 22 MinoltaTime int32u 23 MaxAperture int32u 26 FileNumberMemory int32u 27 LastFileNumber int32u 28 ColorBalanceRed int32u 29 ColorBalanceGreen int32u 30 ColorBalanceBlue int32u 31 Saturation int32u 32 Contrast int32u 33 Sharpness int32u 34 SubjectProgram int32u 35 FlashExposureComp int32u 36 ISOSetting int32u 37 MinoltaModelID int32u 38 IntervalMode int32u 39 FolderName int32u 40 ColorMode int32u 41 ColorFilter int32u 42 BWFilter int32u 43 InternalFlash int32u 44 Brightness int32u 45 SpotFocusPointX int32u 46 SpotFocusPointY int32u 47 WideFocusZone int32u 48 FocusMode int32u 49 FocusArea int32u 50 DECPosition int32u 51 ColorProfile int32u 52 DataImprint int32u 63 FlashMetering int32u

Minolta CameraSettings7D Tags

Index2 Tag Name Writable —— ——– ——– 0 ExposureMode int16u 2 MinoltaImageSize int16u 3 MinoltaQuality int16u 4 WhiteBalance int16u 14 FocusMode int16u 16 AFPoints int16u 21 Flash int16u 22 FlashMode int16u 28 ISOSetting int16u 30 ExposureCompensation int16s 37 ColorSpace int16u 38 Sharpness int16u 39 Contrast int16u 40 Saturation int16u 45 FreeMemoryCardImages int16u 63 ColorTemperature int16s 64 HueAdjustment int16u 70 Rotation int16u 71 FNumber int16u 72 ExposureTime int16u 74 FreeMemoryCardImages int16u 94 ImageNumber int16u 96 NoiseReduction int16u 98 ImageNumber2 int16u 113 ImageStabilization int16u 117 ZoneMatchingOn int16u

Minolta CameraInfoA100 Tags

Camera information for the Sony DSLR-A100.

Index1 Tag Name Writable —— ——– ——– 1 AFSensorActive int8u 2 AFStatusActiveSensor int16s 4 AFStatusTop-right int16s 6 AFStatusBottom-right int16s 8 AFStatusBottom int16s 10 AFStatusMiddleHorizontal int16s 12 AFStatusCenterVertical int16s 14 AFStatusTop int16s 16 AFStatusTop-left int16s 18 AFStatusBottom-left int16s 20 FocusLocked int8u 21 AFPoint int8u 22 AFMode int8u 45 AFStatusLeft int16s 47 AFStatusCenterHorizontal int16s 49 AFStatusRight int16s 51 AFAreaMode int8u

Minolta ISInfoA100 Tags

Image stabilization information for the Sony DSLR-A100.

Index1 Tag Name Writable —— ——– ——– 0 ImageStabilization int16u

Minolta WBInfoA100 Tags

White balance information for the Sony DSLR-A100.

Index1 Tag Name Writable —— ——– ——– 14 DriveMode int8u 16 Rotation int8u 20 ImageStabilizationSetting int8u 21 DynamicRangeOptimizerMode int8u 42 ExposureCompensationMode int8u 43 WBBracketShotNumber int8u 44 WhiteBalanceBracketing int8u 45 ExposureBracketShotNumber int8u 49 FlashFunction int16u 52 ExposureMode int16u 54 ColorMode int16u 56 AverageLV int16u 60 FrameNumber int8u 150 WB_RGBLevels int16u[3] 174 WB_GBRGLevels int16u[4] 192 WB_RedLevelsTungsten int16u[7] 206 WB_BlueLevelsTungsten int16u[7] 220 WB_RedLevelsDaylight int16u[7] 234 WB_BlueLevelsDaylight int16u[7] 248 WB_RedLevelsCloudy int16u[7] 262 WB_BlueLevelsCloudy int16u[7] 276 WB_RedLevelsFlash int16u[7] 290 WB_BlueLevelsFlash int16u[7] 332 WB_RedLevelsFluorescent int16u[7] 346 WB_BlueLevelsFluorescent int16u[7] 360 WB_RedLevelsShade int16u[7] 374 WB_BlueLevelsShade int16u[7] 392 WB_RedLevel6500K int16u 394 WB_BlueLevel6500K int16u 396 WB_RedLevelCustom int16u 398 WB_BlueLevelCustom int16u 408 WB_RedLevel3500K int16u 410 WB_BlueLevel3500K int16u 446 WB_RedLevelsKelvin int16u[75] 596 WB_BlueLevelsKelvin int16u[75] 772 WB_RBLevelsFlash int16u[2] 776 WB_RBLevelsCoolWhiteF int16u[2] 1000 WB_RBLevelsTungsten int16u[2] 1004 WB_RBLevelsDaylight int16u[2] 1008 WB_RBLevelsCloudy int16u[2] 1012 WB_RBLevelsFlash int16u[2] 1020 WB_RedLevelsFluorescent int16u[7] 1034 WB_BlueLevelsFluorescent int16u[7] 1048 WB_RBLevelsShade int16u[2] 1056 WB_RBLevels6500K int16u[2] 1060 WB_RBLevelsCustom int16u[2] 1072 WB_RBLevels3500K int16u[2] 1320 WB_RBLevelsDaylight int16u[2] 1350 WB_RGBLevels int16u[3] 1576 AEMeteringSegments int8u[40] 1680 MeasuredLV int8u 1681 BrightnessValue int8u 4172 TiffMeteringImage no 18872 ExposureTime int8u 18874 ISO int8u 18875 FocusDistance int8u 18877 LensType int16uRev 18880 ExposureCompensation int8s 18881 FlashExposureComp int8s 18882 ImageStabilization int8u 18883 BrightnessValue int8u 18885 MaxAperture int8u 18887 FNumber int8u 18908 InternalSerialNumber string[12]

Minolta CameraSettings5D Tags

Index2 Tag Name Writable —— ——– ——– 10 ExposureMode int16u 12 MinoltaImageSize int16u 13 MinoltaQuality int16u 14 WhiteBalance int16u 31 Flash int16u 32 FlashMode int16u 37 MeteringMode int16u 38 ISOSetting int16u 47 ColorSpace int16u 48 Sharpness int16u 49 Contrast int16u 50 Saturation int16u 53 ExposureTime int16u 54 FNumber int16u 55 FreeMemoryCardImages int16u 73 ColorTemperature int16s 74 HueAdjustment int16u 80 Rotation int16u 83 ExposureCompensation int16u 84 FreeMemoryCardImages int16u 101 Rotation int16u 110 ColorTemperature int16s 113 PictureFinish int16u 174 ImageNumber int16u 176 NoiseReduction int16u 189 ImageStabilization int16u

Minolta CameraSettingsA100 Tags

Camera settings information for the Sony DSLR-A100.

Index2 Tag Name Writable —— ——– ——– 0 ExposureMode int16u 1 ExposureCompensationSetting int16u 5 HighSpeedSync int16u 6 ShutterSpeedSetting int16u 7 ApertureSetting int16u 8 ExposureTime int16u 9 FNumber int16u 10 DriveMode2 int16u 11 WhiteBalance int16u 12 FocusMode int16u 13 AFPointSelected int16u 14 AFAreaMode int16u 15 FlashMode int16u 16 FlashExposureCompSet int16u 18 MeteringMode int16u 19 ISOSetting int16u 20 ZoneMatchingMode int16u 21 DynamicRangeOptimizer int16u 22 ColorMode int16u 23 ColorSpace int16u 24 Sharpness int16u 25 Contrast int16u 26 Saturation int16u 28 FlashMetering int16u 29 PrioritySetupShutterRelease int16u 30 DriveMode int16u 31 SelfTimerTime int16u 32 ContinuousBracketing int16u 33 SingleFrameBracketing int16u 34 WhiteBalanceBracketing int16u 35 WhiteBalanceSetting int16u 36 PresetWhiteBalance int16u 37 ColorTemperatureSetting int16u 38 CustomWBSetting int16u 39 DynamicRangeOptimizerSetting int16u 50 FreeMemoryCardImages int16u 52 CustomWBRedLevel int16u 53 CustomWBGreenLevel int16u 54 CustomWBBlueLevel int16u 55 CustomWBError int16u 56 WhiteBalanceFineTune int16s 57 ColorTemperature int16u 58 ColorCompensationFilter int16s 59 SonyImageSize int16u 60 SonyQuality int16u 61 InstantPlaybackTime int16u 62 InstantPlaybackSetup int16u 63 NoiseReduction int16u 64 EyeStartAF int16u 65 RedEyeReduction int16u 66 FlashDefault int16u 67 AutoBracketOrder int16u 68 FocusHoldButton int16u 69 AELButton int16u 70 ControlDialSet int16u 71 ExposureCompensationMode int16u 72 AFAssist int16u 73 CardShutterLock int16u 74 LensShutterLock int16u 75 AFAreaIllumination int16u 76 MonitorDisplayOff int16u 77 RecordDisplay int16u 78 PlayDisplay int16u 80 ExposureIndicator int16u 81 AELExposureIndicator int16u 82 ExposureBracketingIndicatorLast int16u 83 MeteringOffScaleIndicator int16u 84 FlashExposureIndicator int16u 85 FlashExposureIndicatorNext int16u 86 FlashExposureIndicatorLast int16u 87 ImageStabilization int16u 88 FocusModeSwitch int16u 89 FlashType int16u 90 Rotation int16u 91 AELock int16u 94 ColorTemperature int16u 95 ColorCompensationFilter int16s 96 BatteryState int16u

Minolta MMA Tags

This information is found in MOV videos from Minolta models such as the DiMAGE A2, S414 and 7Hi.

Index1 Tag Name Writable —— ——– ——– 0 Make no 20 SoftwareVersion no

Minolta MOV1 Tags

This information is found in MOV videos from some Konica Minolta models such as the DiMage Z10 and X50.

Index1 Tag Name Writable —— ——– ——– 0 Make no 32 ModelType no 46 ExposureTime no 50 FNumber no 58 ExposureCompensation no 80 FocalLength no

Minolta MOV2 Tags

This information is found in MOV videos from some Minolta models such as the DiMAGE X and Xt.

Index1 Tag Name Writable —— ——– ——– 0 Make no 24 ModelType no 38 ExposureTime no 42 FNumber no 50 ExposureCompensation no 72 FocalLength no

Motorola Tags

Tag ID Tag Name Writable —— ——– ——– 0x5500 BuildNumber string 0x5501 SerialNumber string 0x6420 CustomRendered string 0x64d0 DriveMode string 0x665e Sensor string 0x6705 ManufactureDate string

Nikon Tags

Tag ID Tag Name Writable —— ——– ——– 0x0001 MakerNoteVersion undef[4] 0x0002 ISO int16u[2] 0x0003 ColorMode string 0x0004 Quality string 0x0005 WhiteBalance string 0x0006 Sharpness string 0x0007 FocusMode string 0x0008 FlashSetting string 0x0009 FlashType string 0x000b WhiteBalanceFineTune int16s[n] 0x000c WB_RBLevels rational64u[4] 0x000d ProgramShift undef[4] 0x000e ExposureDifference undef[4] 0x000f ISOSelection string 0x0010 DataDump no 0x0011 PreviewIFD Nikon PreviewIFD 0x0012 FlashExposureComp undef[4] 0x0013 ISOSetting int16u[2] 0x0014 ColorBalanceA Nikon ColorBalanceA NRWData Nikon ColorBalanceB Nikon ColorBalanceC 0x0016 ImageBoundary int16u[4] 0x0017 ExternalFlashExposureComp undef[4] 0x0018 FlashExposureBracketValue undef[4] 0x0019 ExposureBracketValue rational64s 0x001a ImageProcessing string 0x001b CropHiSpeed int16u[7] 0x001c ExposureTuning undef[3] 0x001d SerialNumber string! 0x001e ColorSpace int16u 0x001f VRInfo Nikon VRInfo 0x0020 ImageAuthentication int8u 0x0021 FaceDetect Nikon FaceDetect 0x0022 ActiveD-Lighting int16u 0x0023 PictureControlData Nikon PictureControl Nikon PictureControl2 Nikon PictureControl3 Nikon PictureControlUnknown 0x0024 WorldTime Nikon WorldTime 0x0025 ISOInfo Nikon ISOInfo 0x002a VignetteControl int16u 0x002b DistortInfo Nikon DistortInfo 0x002c UnknownInfo Nikon UnknownInfo 0x0032 UnknownInfo2 Nikon UnknownInfo2 0x0034 ShutterMode int16u 0x0035 HDRInfo Nikon HDRInfo HDRInfo2 Nikon HDRInfo2 0x0037 MechanicalShutterCount int32u 0x0039 LocationInfo Nikon LocationInfo 0x003d BlackLevel int16u[4] 0x003e ImageSizeRAW yes 0x003f WhiteBalanceFineTune rational64s[2] 0x0044 JPGCompression yes 0x0045 CropArea int16u[4] 0x004e NikonSettings NikonSettings 0x004f ColorTemperatureAuto int16u 0x0080 ImageAdjustment string 0x0081 ToneComp string 0x0082 AuxiliaryLens string 0x0083 LensType int8u 0x0084 Lens rational64u[4] 0x0085 ManualFocusDistance rational64u 0x0086 DigitalZoom rational64u 0x0087 FlashMode int8u 0x0088 AFInfo Nikon AFInfo Nikon AFInfo 0x0089 ShootingMode int16u~ 0x008b LensFStops undef[4] 0x008c ContrastCurve undef! 0x008d ColorHue string 0x008f SceneMode string 0x0090 LightSource string 0x0091 ShotInfoD40 Nikon ShotInfoD40 ShotInfoD80 Nikon ShotInfoD80 ShotInfoD90 Nikon ShotInfoD90 ShotInfoD3a Nikon ShotInfoD3a ShotInfoD3b Nikon ShotInfoD3b ShotInfoD3X Nikon ShotInfoD3X ShotInfoD3S Nikon ShotInfoD3S ShotInfoD300a Nikon ShotInfoD300a ShotInfoD300b Nikon ShotInfoD300b ShotInfoD300S Nikon ShotInfoD300S ShotInfoD700 Nikon ShotInfoD700 ShotInfoD780 Nikon ShotInfoD780 ShotInfoD7500 Nikon ShotInfoD7500 ShotInfoD800 Nikon ShotInfoD800 ShotInfoD810 Nikon ShotInfoD810 ShotInfoD850 Nikon ShotInfoD850 ShotInfoD5000 Nikon ShotInfoD5000 ShotInfoD5100 Nikon ShotInfoD5100 ShotInfoD5200 Nikon ShotInfoD5200 ShotInfoD7000 Nikon ShotInfoD7000 ShotInfoD4 Nikon ShotInfoD4 ShotInfoD4S Nikon ShotInfoD4S ShotInfoD500 Nikon ShotInfoD500 ShotInfoD6 Nikon ShotInfoD6 ShotInfoD610 Nikon ShotInfoD610 ShotInfoZ7II Nikon ShotInfoZ7II ShotInfoZ8 Nikon ShotInfoZ8 ShotInfoZ9 Nikon ShotInfoZ9 ShotInfo02xx Nikon ShotInfo ShotInfoUnknown Nikon ShotInfo 0x0092 HueAdjustment int16s 0x0093 NEFCompression int16u 0x0094 SaturationAdj int16s 0x0095 NoiseReduction string 0x0096 NEFLinearizationTable undef! 0x0097 ColorBalance0100 Nikon ColorBalance1 ColorBalance0102 Nikon ColorBalance2 ColorBalance0103 Nikon ColorBalance3 ColorBalance0205 Nikon ColorBalance2 ColorBalance0209 Nikon ColorBalance4 ColorBalance02 Nikon ColorBalance2 ColorBalance0211 Nikon ColorBalance4 ColorBalance0213 Nikon ColorBalance2 ColorBalance0215 Nikon ColorBalance4 ColorBalance0219 Nikon ColorBalance2 ColorBalanceUnknown1 Nikon ColorBalanceUnknown ColorBalanceUnknown2 Nikon ColorBalanceUnknown2 ColorBalanceUnknown Nikon ColorBalanceUnknown 0x0098 LensData0100 Nikon LensData00 LensData0101 Nikon LensData01 LensData0201 Nikon LensData01 LensData0204 Nikon LensData0204 LensData0400 Nikon LensData0400 LensData0402 Nikon LensData0402 LensData0403 Nikon LensData0403 LensData0800 Nikon LensData0800 LensDataUnknown Nikon LensDataUnknown 0x0099 RawImageCenter int16u[2] 0x009a SensorPixelSize rational64u[2] 0x009c SceneAssist string 0x009d DateStampMode int16u 0x009e RetouchHistory int16u[10] 0x00a0 SerialNumber string 0x00a2 ImageDataSize int32u 0x00a5 ImageCount int32u 0x00a6 DeletedImageCount int32u 0x00a7 ShutterCount int32u! 0x00a8 FlashInfo0100 Nikon FlashInfo0100 FlashInfo0102 Nikon FlashInfo0102 FlashInfo0103 Nikon FlashInfo0103 FlashInfo0106 Nikon FlashInfo0106 FlashInfo0107 Nikon FlashInfo0107 FlashInfo0300 Nikon FlashInfo0300 FlashInfoUnknown Nikon FlashInfoUnknown 0x00a9 ImageOptimization string 0x00aa Saturation string 0x00ab VariProgram string 0x00ac ImageStabilization string 0x00ad AFResponse string 0x00b0 MultiExposure Nikon MultiExposure MultiExposure2 Nikon MultiExposure Nikon MultiExposure2 0x00b1 HighISONoiseReduction int16u 0x00b3 ToningEffect string 0x00b6 PowerUpTime undef 0x00b7 AFInfo2 Nikon AFInfo2V0400 Nikon AFInfo2 0x00b8 FileInfo Nikon FileInfo Nikon FileInfo 0x00b9 AFTune Nikon AFTune 0x00bb RetouchInfo Nikon RetouchInfo 0x00bd PictureControlData Nikon PictureControl 0x00bf SilentPhotography yes 0x00c3 BarometerInfo Nikon BarometerInfo 0x0e00 PrintIM PrintIM 0x0e01 NikonCaptureData NikonCapture 0x0e09 NikonCaptureVersion string^ 0x0e0e NikonCaptureOffsets Nikon CaptureOffsets 0x0e10 NikonScanIFD Nikon Scan 0x0e13 NikonCaptureEditVersions NikonCapture NikonCaptureEditVersions undef!^ 0x0e1d NikonICCProfile ICC_Profile 0x0e1e NikonCaptureOutput Nikon CaptureOutput 0x0e22 NEFBitDepth int16u[4]!

Nikon ast Tags

Tags used by Nikon NX Studio in Nikon NKSC sidecar files and trailers.

These tags belong to the ExifTool XMP-ast family 1 group.

Tag Name Writable ——– ——– About no GPSAltitude no GPSAltitudeRef no GPSImgDirection no GPSImgDirectionRef no GPSLatitude no GPSLatitudeRef no GPSLongitude no GPSLongitudeRef no GPSMapDatum no GPSVersionID no IPTC IPTC Version no XMLPackets XMP

Nikon nine Tags

These tags belong to the ExifTool XMP-nine family 1 group.

Tag Name Writable ——– ——– About no Label no NineEdits Nikon NineEdits Rating no Trim no Version no

Nikon NineEdits Tags

XML-based tags used to store editing information.

Tag Name Writable ——– ——– FilterParametersBinary no FilterParametersCustomCustomData no FilterParametersExportExportData no

Nikon sdc Tags

These tags belong to the ExifTool XMP-sdc family 1 group.

Tag Name Writable ——– ——– About no AppName no AppVersion no Version no

Nikon PreviewIFD Tags

Tag ID Tag Name Writable —— ——– ——– 0x00fe SubfileType no 0x0103 Compression no 0x011a XResolution no 0x011b YResolution no 0x0128 ResolutionUnit no 0x0201 PreviewImageStart int32u* 0x0202 PreviewImageLength int32u* 0x0213 YCbCrPositioning no

Nikon ColorBalanceA Tags

Index2 Tag Name Writable —— ——– ——– 624 WB_RBLevels int16u[2]! 626 WB_RBLevelsAuto int16u[2]! 628 WB_RBLevelsDaylight int16u[14]! 642 WB_RBLevelsIncandescent int16u[14]! 656 WB_RBLevelsFluorescent int16u[6]! 662 WB_RBLevelsCloudy int16u[14]! 676 WB_RBLevelsFlash int16u[14]! 690 WB_RBLevelsShade int16u[14]!

Nikon ColorBalanceB Tags

Color balance tags used by the P6000.

Index1 Tag Name Writable —— ——– ——– 4 ColorBalanceVersion undef[4] 5096 WB_RGGBLevels int32u[4]! 5112 WB_RGGBLevelsDaylight int32u[4]! 5128 WB_RGGBLevelsCloudy int32u[4]! 5160 WB_RGGBLevelsTungsten int32u[4]! 5176 WB_RGGBLevelsFluorescentW int32u[4]! 5192 WB_RGGBLevelsFlash int32u[4]! 5224 WB_RGGBLevelsCustom int32u[4]! 5240 WB_RGGBLevelsAuto int32u[4]!

Nikon ColorBalanceC Tags

Color balance tags used by the P1000, P7000, P7100 and B700.

Index1 Tag Name Writable —— ——– ——– 4 ColorBalanceVersion undef[4] 32 BlackLevel int16u 56 WB_RGGBLevels int32u[4]! 76 WB_RGGBLevelsDaylight int32u[4]! 96 WB_RGGBLevelsCloudy int32u[4]! 116 WB_RGGBLevelsShade int32u[4]! 136 WB_RGGBLevelsTungsten int32u[4]! 156 WB_RGGBLevelsFluorescentW int32u[4]! 176 WB_RGGBLevelsFluorescentN int32u[4]! 196 WB_RGGBLevelsFluorescentD int32u[4]! 216 WB_RGGBLevelsHTMercury int32u[4]! 256 WB_RGGBLevelsCustom int32u[4]! 276 WB_RGGBLevelsAuto int32u[4]!

Nikon VRInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 VRInfoVersion no 4 VibrationReduction int8u 6 VRMode int8u 8 VRType int8u

Nikon FaceDetect Tags

Index2 Tag Name Writable —— ——– ——– 1 FaceDetectFrameSize int16u[2] 3 FacesDetected int16u 4 Face1Position int16u[4] 8 Face2Position int16u[4] 12 Face3Position int16u[4] 16 Face4Position int16u[4] 20 Face5Position int16u[4] 24 Face6Position int16u[4] 28 Face7Position int16u[4] 32 Face8Position int16u[4] 36 Face9Position int16u[4] 40 Face10Position int16u[4] 44 Face11Position int16u[4] 48 Face12Position int16u[4]

Nikon PictureControl Tags

Index1 Tag Name Writable —— ——– ——– 0 PictureControlVersion no 4 PictureControlName string[20] 24 PictureControlBase string[20] 48 PictureControlAdjust int8u 49 PictureControlQuickAdjust int8u 50 Sharpness int8u 51 Contrast int8u 52 Brightness int8u 53 Saturation int8u 54 HueAdjustment int8u 55 FilterEffect int8u 56 ToningEffect int8u 57 ToningSaturation int8u

Nikon PictureControl2 Tags

Index1 Tag Name Writable —— ——– ——– 0 PictureControlVersion no 4 PictureControlName string[20] 24 PictureControlBase string[20] 48 PictureControlAdjust int8u 49 PictureControlQuickAdjust int8u 51 Sharpness int8u 53 Clarity int8u 55 Contrast int8u 57 Brightness int8u 59 Saturation int8u 61 Hue int8u 63 FilterEffect int8u 64 ToningEffect int8u 65 ToningSaturation int8u

Nikon PictureControl3 Tags

Index1 Tag Name Writable —— ——– ——– 0 PictureControlVersion no 8 PictureControlName string[20] 28 PictureControlBase string[20] 54 PictureControlAdjust int8u 55 PictureControlQuickAdjust int8u 57 Sharpness int8u 59 MidRangeSharpness int8u 61 Clarity int8u 63 Contrast int8u 65 Brightness int8u 67 Saturation int8u 69 Hue int8u 71 FilterEffect int8u 72 ToningEffect int8u 73 ToningSaturation int8u

Nikon PictureControlUnknown Tags

Index1 Tag Name Writable —— ——– ——– 0 PictureControlVersion no

Nikon WorldTime Tags

Index1 Tag Name Writable —— ——– ——– 0 TimeZone int16s 2 DaylightSavings int8u 3 DateDisplayFormat int8u

Nikon ISOInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 ISO int8u 4 ISOExpansion int16u 6 ISO2 int8u 10 ISOExpansion2 int16u

Nikon DistortInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 DistortionVersion? no 4 AutoDistortionControl int8u

Nikon UnknownInfo Tags

Index4 Tag Name Writable —— ——– ——– 0 UnknownInfoVersion? no

Nikon UnknownInfo2 Tags

Index4 Tag Name Writable —— ——– ——– 0 UnknownInfo2Version? no

Nikon HDRInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 HDRInfoVersion no 4 HDR int8u 5 HDRLevel int8u 6 HDRSmoothing int8u 7 HDRLevel2 int8u

Nikon HDRInfo2 Tags

Index1 Tag Name Writable —— ——– ——– 0 HDRInfoVersion no 4 HDR int8u 5 HDRLevel int8u

Nikon LocationInfo Tags

Tags written by some Nikon GPS-equipped cameras like the AW100.

Index1 Tag Name Writable —— ——– ——– 0 LocationInfoVersion undef[4] 4 TextEncoding int8u 5 CountryCode undef[3] 8 POILevel int8u 9 Location undef[70]

Nikon MakerNotes0x51 Tags

Index1 Tag Name Writable —— ——– ——– 0 FirmwareVersion51 no 10 NEFCompression int16u[0.5]

Nikon MakerNotes0x56 Tags

Index1 Tag Name Writable —— ——– ——– 0 FirmwareVersion no 4 BurstGroupID int16u

Nikon AFInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 AFAreaMode int8u 1 AFPoint int8u 2 AFPointsInFocus int16u

Nikon ShotInfoD40 Tags

These tags are extracted from encrypted data in D40 and D40X images.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 582 ShutterCount int32u 586.1 VibrationReduction int8u & 0x08 729 CustomSettingsD40 NikonCustom SettingsD40

Nikon ShotInfoD80 Tags

These tags are extracted from encrypted data in D80 images.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 586 ShutterCount int32u 590.1 Rotation int8u & 0x07 590.2 VibrationReduction int8u & 0x18 590.3 FlashFired int8u & 0xe0 708 NikonImageSize int8u & 0xf0 708.1 ImageQuality int8u & 0x0f 748 CustomSettingsD80 NikonCustom SettingsD80

Nikon ShotInfoD90 Tags

These tags are extracted from encrypted data in images from the D90 with firmware 1.00.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 693 ISO2 int8u 725 ShutterCount int32u 884 CustomSettingsD90 NikonCustom SettingsD90

Nikon ShotInfoD3a Tags

These tags are extracted from encrypted data in images from the D3 with firmware 1.00 and earlier.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 598 ISO2 int8u 630 ShutterCount int32u 723.1 NikonImageSize int8u & 0x18 723.2 ImageQuality int8u & 0x07 769 CustomSettingsD3 NikonCustom SettingsD3

Nikon ShotInfoD3b Tags

These tags are extracted from encrypted data in images from the D3 with firmware 1.10, 2.00, 2.01 and 2.02.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 16 ImageArea int8u 605 ISO2 int8u 637 ShutterCount int32u 639 ShutterCount int32u 650 PreFlashReturnStrength int8u 732.1 NikonImageSize int8u & 0x18 732.2 ImageQuality int8u & 0x07 778 CustomSettingsD3 NikonCustom SettingsD3

Nikon ShotInfoD3X Tags

These tags are extracted from encrypted data in images from the D3X with firmware 1.00.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 605 ISO2 int8u 640 ShutterCount int32u 779 CustomSettingsD3X NikonCustom SettingsD3

Nikon ShotInfoD3S Tags

These tags are extracted from encrypted data in images from the D3S with firmware 1.00 and earlier.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 16 ImageArea int8u 545 ISO2 int8u 578 ShutterCount int32u 671.1 JPGCompression int8u & 0x40 718 CustomSettingsD3S NikonCustom SettingsD3

Nikon ShotInfoD300a Tags

These tags are extracted from encrypted data in images from the D300 with firmware 1.00 and earlier.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 604 ISO2 int8u 633 ShutterCount int32u 721 AFFineTuneAdj int16u 790 CustomSettingsD300 NikonCustom SettingsD3

Nikon ShotInfoD300b Tags

These tags are extracted from encrypted data in images from the D300 with firmware 1.10.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 613 ISO2 int8u 644 ShutterCount int32u 732 AFFineTuneAdj int16u 802 CustomSettingsD300 NikonCustom SettingsD3

Nikon ShotInfoD300S Tags

These tags are extracted from encrypted data in images from the D300S with firmware 1.00.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 613 ISO2 int8u 646 ShutterCount int32u 804 CustomSettingsD300S NikonCustom SettingsD3

Nikon ShotInfoD700 Tags

These tags are extracted from encrypted data in images from the D700 with firmware 1.02f.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 613 ISO2 int8u 647 ShutterCount int32u 804 CustomSettingsD700 NikonCustom SettingsD700

Nikon ShotInfoD780 Tags

These tags are extracted from encrypted data in images from the D780.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 156 OrientOffset Nikon OrientationInfo

Nikon OrientationInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 RollAngle fixed32u 4 PitchAngle fixed32u 8 YawAngle fixed32u

Nikon ShotInfoD7500 Tags

These tags are extracted from encrypted data in images from the D7500.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 160 OrientOffset Nikon OrientationInfo

Nikon ShotInfoD800 Tags

These tags are extracted from encrypted data in images from the D800.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 1216 RepeatingFlashOutputExternal int8u 1218 RepeatingFlashRateExternal int8u 1219 RepeatingFlashCountExternal int8u 1234 FlashExposureComp2 int8s 1242 RepeatingFlashRateBuilt-in int8u 1243 RepeatingFlashCountBuilt-in int8u 1308 SequenceNumber int8u 1531 ShutterCount int32u 1772 CustomSettingsD800 NikonCustom SettingsD800

Nikon ShotInfoD810 Tags

These tags are extracted from encrypted data in images from the D810.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 16 SettingsOffset Nikon SettingsInfoD810 36 BracketingOffset Nikon BracketingInfoD810 56 ISOAutoOffset Nikon ISOAutoInfoD810 64 CustomSettingsOffset NikonCustom SettingsD810 132 OrientationOffset Nikon OrientationInfo

Nikon SettingsInfoD810 Tags

Index1 Tag Name Writable —— ——– ——– 316 SecondarySlotFunction int8u & 0x03

Nikon BracketingInfoD810 Tags

Index1 Tag Name Writable —— ——– ——– 15 AEBracketingSteps int8u & 0xff 16 WBBracketingSteps int8u & 0xff 23 NikonMeteringMode int8u & 0x03

Nikon ISOAutoInfoD810 Tags

Index1 Tag Name Writable —— ——– ——– 4 ISOAutoShutterTime int8u & 0x3f 5 ISOAutoHiLimit int8u & 0xff

Nikon ShotInfoD850 Tags

These tags are extracted from encrypted data in images from the D850.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 16 MenuSettingsOffset Nikon MenuSettingsD850 76 MoreSettingsOffset Nikon MoreSettingsD850 88 CustomSettingsOffset NikonCustom SettingsD850 160 OrientationOffset Nikon OrientationInfo

Nikon MenuSettingsD850 Tags

Index1 Tag Name Writable —— ——– ——– 1757 PhotoShootingMenuBankImageArea int8u & 0x07

Nikon MoreSettingsD850 Tags

Index1 Tag Name Writable —— ——– ——– 36 PhotoShootingMenuBank int8u & 0x03 37 PrimarySlot int8u & 0x80

Nikon ShotInfoD5000 Tags

These tags are extracted from encrypted data in images from the D5000 with firmware 1.00.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 693 ISO2 int8u 726 ShutterCount int32u 888 CustomSettingsD5000 NikonCustom SettingsD5000

Nikon ShotInfoD5100 Tags

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 801 ShutterCount int32u 1031 CustomSettingsD5100 NikonCustom SettingsD5100

Nikon ShotInfoD5200 Tags

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 3032 ShutterCount int32u 3285 CustomSettingsD5200 NikonCustom SettingsD5200

Nikon ShotInfoD7000 Tags

These tags are extracted from encrypted data in images from the D7000 with firmware 1.01b.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 800 ShutterCount int32u 1028 CustomSettingsD7000 NikonCustom SettingsD7000

Nikon ShotInfoD4 Tags

These tags are extracted from encrypted data in images from the D4.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 1873 CustomSettingsD4 NikonCustom SettingsD4

Nikon ShotInfoD4S Tags

These tags are extracted from encrypted data in images from the D4S.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 464 SecondarySlotFunction int8u & 0x03 5964 AEBracketingSteps int8u & 0xff 5965 WBBracketingSteps int8u & 0xff 6221 ReleaseMode int8u & 0xff 6301 CustomSettingsD4S NikonCustom SettingsD4 6338 MultiSelectorLiveViewMode int8u & 0xc0 6378 ISOAutoShutterTime int8u & 0x3f 6379 ISOAutoHiLimit int8u & 0xff 6461 CustomSettingsD4S NikonCustom SettingsD4 13579 OrientationInfo Nikon OrientationInfo 13971 Rotation int8u & 0x30

Nikon ShotInfoD500 Tags

These tags are extracted from encrypted data in images from the D5 and D500.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 16 RotationInfoOffset Nikon RotationInfoD500 20 JPGInfoOffset Nikon JPGInfoD500 44 BracketingOffset Nikon BracketingInfoD500 80 ShootingMenuOffset Nikon ShootingMenuD500 88 CustomSettingsOffset Nikon CustomSettingsD500 160 OrientationOffset Nikon OrientationInfo 168 OtherOffset Nikon OtherInfoD500

Nikon RotationInfoD500 Tags

Index1 Tag Name Writable —— ——– ——– 26 Rotation int8u & 0x03 32 Interval int8u~ 36 IntervalFrame int8u~ 1330 FlickerReductionIndicator int8u & 0x01

Nikon JPGInfoD500 Tags

Index1 Tag Name Writable —— ——– ——– 36 JPGCompression int8u & 0x01

Nikon BracketingInfoD500 Tags

Index1 Tag Name Writable —— ——– ——– 15 AEBracketingSteps int8u & 0xff 16 WBBracketingSteps int8u & 0xff 23 ADLBracketingStep int8u & 0xf0 24 ADLBracketingType int8u & 0x0f

Nikon ShootingMenuD500 Tags

Index1 Tag Name Writable —— ——– ——– 0 PhotoShootingMenuBank int8u & 0x03 2 PrimarySlot int8u & 0x80 4 ISOAutoShutterTime int8u & 0x3f 5 ISOAutoHiLimit int8u & 0xff 7 FlickerReduction int8u & 0x20 7.1 PhotoShootingMenuBankImageArea int8u & 0x07

Nikon CustomSettingsD500 Tags

Index1 Tag Name Writable —— ——– ——– 0 CustomSettingsD5 NikonCustom SettingsD5 CustomSettingsD500 NikonCustom SettingsD500

Nikon OtherInfoD500 Tags

Index1 Tag Name Writable —— ——– ——– 532 NikonMeteringMode int8u & 0x03

Nikon ShotInfoD6 Tags

These tags are extracted from encrypted data in images from the D6.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 48 SequenceOffset Nikon SeqInfoD6 156 OrientationOffset Nikon OrientationInfo 164 IntervalOffset Nikon IntervalInfoD6

Nikon SeqInfoD6 Tags

Index1 Tag Name Writable —— ——– ——– 36 IntervalShooting int16u~ 43 ImageArea int8u

Nikon IntervalInfoD6 Tags

Index1 Tag Name Writable —— ——– ——– 380 Intervals int32u 384 ShotsPerInterval int32u 388 IntervalExposureSmoothing int8u 390 IntervalPriority int8u 424 FocusShiftNumberShots int8u 428 FocusShiftStepWidth int8u 432 FocusShiftInterval int8u~ 436 FocusShiftExposureLock int8u 526 DiffractionCompensation int8u 532 FlashControlMode int8u 538 FlashGNDistance? no 542 FlashOutput? int8u 552 FlashRemoteControl? int8u 556 FlashMasterControlMode int8u 558 FlashMasterCompensation? int8s 562 FlashMasterOutput? int8u 564 FlashWirelessOption? int8u 714 MovieType? int8u

Nikon ShotInfoD610 Tags

These tags are extracted from encrypted data in images from the D610.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 1999 CustomSettingsD610 NikonCustom SettingsD610

Nikon ShotInfoZ7II Tags

These tags are extracted from encrypted data in images from the Z7II.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 48 IntervalOffset Nikon IntervalInfoZ7II 56 PortraitOffset Nikon PortraitInfoZ7II 136 OrientationOffset Nikon OrientationInfo 152 OrientationOffset Nikon OrientationInfo 160 MenuOffset Nikon MenuInfoZ7II

Nikon IntervalInfoZ7II Tags

Index1 Tag Name Writable —— ——– ——– 36 IntervalShooting int16u~ 43 ImageArea int8u

Nikon PortraitInfoZ7II Tags

Index1 Tag Name Writable —— ——– ——– 160 PortraitImpressionBalance int8u[2]~

Nikon MenuInfoZ7II Tags

Index1 Tag Name Writable —— ——– ——– 16 MenuSettingsOffsetZ7II Nikon MenuSettingsZ7II

Nikon MenuSettingsZ7II Tags

These tags are used by the Z5, Z6, Z7, Z6II, Z7II, Z50, Zfc and Zf.

Index1 Tag Name Writable —— ——– ——– 92 ReleaseMode no 160 IntervalDurationHours int32u 164 IntervalDurationMinutes int32u 168 IntervalDurationSeconds int32u 176 Intervals int32u 180 ShotsPerInterval int32u 184 IntervalExposureSmoothing int8u 186 IntervalPriority int8u 220 FocusShiftNumberShots int8u 224 FocusShiftStepWidth int8u 228 FocusShiftInterval int8u~ 232 FocusShiftExposureLock int8u 322 DiffractionCompensation int8u 323 AutoDistortionControl int8u 326 NikonMeteringMode int8u 328 FlashControlMode int8u 334 FlashGNDistance? no 338 FlashOutput? int8u 346 FlashWirelessOption? int8u 348 FlashRemoteControl? int8u 352 FlashMasterControlMode int8u 354 FlashMasterCompensation? int8s 358 FlashMasterOutput? int8u 502 MovieFrameSize? int8u 504 MovieFrameRate? int8u 506 MovieSlowMotion? int8u 510 MovieType? int8u 516 MovieISOAutoManualMode? int16u 568 MovieActiveD-Lighting? int8u 572 MovieHighISONoiseReduction? int8u 574 MovieVignetteControl? int8u 576 MovieVignetteControlSameAsPhoto? int8u 577 MovieDiffractionCompensation? int8u 578 MovieAutoDistortionControl? int8u 584 MovieFocusMode? int8u 590 MovieVibrationReduction? int8u 591 MovieVibrationReductionSameAsPhoto? int8u 858 HDMIOutputN-Log? int8u

Nikon ShotInfoZ8 Tags

These tags are extracted from encrypted data in images from the Z8.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 48 SequenceOffset Nikon SeqInfoZ9 132 OrientOffset Nikon OrientationInfo 140 MenuOffset Nikon MenuInfoZ8

Nikon SeqInfoZ9 Tags

Index1 Tag Name Writable —— ——– ——– 32 FocusShiftShooting int8u~ 40 IntervalShooting int16u~

Nikon MenuInfoZ8 Tags

Index1 Tag Name Writable —— ——– ——– 16 MenuSettingsOffsetZ8 Nikon MenuSettingsZ8

Nikon MenuSettingsZ8 Tags

These tags are used by the Z8 firmware 1.00.

Index1 Tag Name Writable ————— ——– 72 HighFrameRate int8u 152 MultipleExposureMode int8u 154 MultiExposureShots int8u 184 IntervalDurationHours int32u 188 IntervalDurationMinutes int32u 192 IntervalDurationSeconds int32u 200 Intervals int32u 204 ShotsPerInterval int32u 208 IntervalExposureSmoothing int8u 210 IntervalPriority int8u 244 FocusShiftNumberShots int8u 248 FocusShiftStepWidth int8u 252 FocusShiftInterval int8u~ 256 FocusShiftExposureLock? int8u 286 PhotoShootingMenuBank int8u 288 ExtendedMenuBanks int8u 324 PhotoShootingMenuBankImageArea int8u 338 AutoISO int8u 340 ISOAutoHiLimit? int16u 342 ISOAutoFlashLimit? int16u 350 ISOAutoShutterTime no 432 MovieVignetteControl? int8u 434 DiffractionCompensation int8u 436 FlickerReductionShooting int8u 440 FlashControlMode int8u 548 AFAreaMode int8u 550 VRMode int8u 554 BracketSet int8u 556 BracketProgram int8u 558 BracketIncrement int8u 570 HDR int8u 576 SecondarySlotFunction int8u 582 HDRLevel int8u 586 Slot2JpgSize? int8u 592 DXCropAlert int8u 594 SubjectDetection int8u 596 DynamicAFAreaSize int8u 618 ToneMap? int8u 622 PortraitImpressionBalance int8u 636 HighFrequencyFlickerReductionShooting? int8u 730 MovieImageArea? int8u & 0x01 740 MovieType? int8u 742 MovieISOAutoHiLimit? int16u 744 MovieISOAutoControlManualMode? int8u 746 MovieISOAutoManualMode? int16u 820 MovieActiveD-Lighting? int8u 822 MovieHighISONoiseReduction? int8u 828 MovieFlickerReduction int8u 830 MovieMeteringMode? int8u 832 MovieFocusMode? int8u 834 MovieAFAreaMode int8u 836 MovieVRMode? int8u 840 MovieElectronicVR? int8u 842 MovieSoundRecording? int8u 844 MicrophoneSensitivity? int8u 846 MicrophoneAttenuator? int8u 848 MicrophoneFrequencyResponse? int8u 850 WindNoiseReduction? int8u 882 MovieFrameSize? int8u 884 MovieFrameRate? int8u 886 MicrophoneJackPower? int8u 887 MovieDXCropAlert? int8u 888 MovieSubjectDetection? int8u 896 MovieHighResZoom? int8u 943 CustomSettingsZ8 NikonCustom SettingsZ8 1682 Language? int8u 1684 TimeZone int8u 1690 MonitorBrightness? int8u 1712 AFFineTune? int8u 1716 NonCPULens1FocalLength? int16u~ 1718 NonCPULens2FocalLength? int16u~ 1720 NonCPULens3FocalLength? int16u~ 1722 NonCPULens4FocalLength? int16u~ 1724 NonCPULens5FocalLength? int16u~ 1726 NonCPULens6FocalLength? int16u~ 1728 NonCPULens7FocalLength? int16u~ 1730 NonCPULens8FocalLength? int16u~ 1732 NonCPULens9FocalLength? int16u~ 1734 NonCPULens10FocalLength? int16u~ 1736 NonCPULens11FocalLength? int16u~ 1738 NonCPULens12FocalLength? int16u~ 1740 NonCPULens13FocalLength? int16u~ 1742 NonCPULens14FocalLength? int16u~ 1744 NonCPULens15FocalLength? int16u~ 1746 NonCPULens16FocalLength? int16u~ 1748 NonCPULens17FocalLength? int16u~ 1750 NonCPULens18FocalLength? int16u~ 1752 NonCPULens19FocalLength? int16u~ 1754 NonCPULens20FocalLength? int16u~ 1756 NonCPULens1MaxAperture? int16u 1758 NonCPULens2MaxAperture? int16u 1760 NonCPULens3MaxAperture? int16u 1762 NonCPULens4MaxAperture? int16u 1764 NonCPULens5MaxAperture? int16u 1766 NonCPULens6MaxAperture? int16u 1768 NonCPULens7MaxAperture? int16u 1770 NonCPULens8MaxAperture? int16u 1772 NonCPULens9MaxAperture? int16u 1774 NonCPULens10MaxAperture? int16u 1776 NonCPULens11MaxAperture? int16u 1778 NonCPULens12MaxAperture? int16u 1780 NonCPULens13MaxAperture? int16u 1782 NonCPULens14MaxAperture? int16u 1784 NonCPULens15MaxAperture? int16u 1786 NonCPULens16MaxAperture? int16u 1788 NonCPULens17MaxAperture? int16u 1790 NonCPULens18MaxAperture? int16u 1792 NonCPULens19MaxAperture? int16u 1794 NonCPULens20MaxAperture? int16u 1808 HDMIOutputResolution int8u 1826 AirplaneMode? int8u 1827 EmptySlotRelease? int8u 1862 EnergySavingMode? int8u 1890 USBPowerDelivery? int8u 1899 SensorShield? int8u

Nikon ShotInfoZ9 Tags

These tags are extracted from encrypted data in images from the Z9.

Index Tag Name Writable —– ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 48 SequenceOffset Nikon SeqInfoZ9 88 Offset13 Nikon Offset13InfoZ9 128 AutoCaptureOffset Nikon AutoCaptureInfo 132 OrientOffset Nikon OrientationInfo 140 MenuOffset Nikon MenuInfoZ9

Nikon Offset13InfoZ9 Tags

Index1 Tag Name Writable —— ——– ——– 3048 AFAreaInitialXPosition int8s~ 3049 AFAreaInitialYPosition int8s~ 3050 AFAreaInitialWidth int8u 3051 AFAreaInitialHeight int8u

Nikon AutoCaptureInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 AutoCapturedFrame int8u 1 AutoCaptureCriteria int8u~ 55 AutoCaptureRecordingTime int8u 56 AutoCaptureWaitTime int8u 74 AutoCaptureDistanceFar int8u~ 78 AutoCaptureDistanceNear int8u~ 95 AutoCaptureCriteriaMotionDirection int8u~ 99 AutoCaptureCriteriaMotionSpeed int8u 100 AutoCaptureCriteriaMotionSize int8u 105 AutoCaptureCriteriaSubjectSize int8u 106 AutoCaptureCriteriaSubjectType int8u

Nikon MenuInfoZ9 Tags

Index1 Tag Name Writable —— ——– ——– 16 MenuSettingsOffsetZ9 Nikon MenuSettingsZ9 MenuSettingsOffsetZ9v3 - MenuSettingsOffsetZ9v4 Nikon MenuSettingsZ9v3 - Nikon MenuSettingsZ9v4

Nikon MenuSettingsZ9 Tags

These tags are used by the Z9.

Index1 Tag Name Writable —— ——– ——– 140 MultipleExposureMode int8u 142 MultiExposureShots int8u 188 Intervals int32u 192 ShotsPerInterval int32u 232 FocusShiftNumberShots int8u 236 FocusShiftStepWidth int8u 240 FocusShiftInterval int8u~ 244 FocusShiftExposureLock? int8u 274 PhotoShootingMenuBank int8u 276 ExtendedMenuBanks int8u 308 PhotoShootingMenuBankImageArea int8u 322 AutoISO int8u 324 ISOAutoHiLimit? int16u 326 ISOAutoFlashLimit? int16u 334 ISOAutoShutterTime no 416 MovieVignetteControl? int8u 418 DiffractionCompensation int8u 420 FlickerReductionShooting int8u 424 FlashControlMode int8u 426 FlashMasterCompensation? int8s 430 FlashGNDistance? no 434 FlashOutput? int8u 444 FlashRemoteControl? int8u 456 FlashWirelessOption? int8u 528 AFAreaMode int8u 530 VRMode int8u 534 BracketSet int8u 536 BracketProgram int8u 538 BracketIncrement int8u 556 SecondarySlotFunction int8u 572 DXCropAlert int8u 574 SubjectDetection int8u 576 DynamicAFAreaSize int8u 604 MovieImageArea? int8u & 0x01 614 MovieType? int8u 616 MovieISOAutoHiLimit? int16u 618 MovieISOAutoControlManualMode? int8u 620 MovieISOAutoManualMode? int16u 696 MovieActiveD-Lighting? int8u 698 MovieHighISONoiseReduction? int8u 704 MovieFlickerReduction int8u 706 MovieMeteringMode? int8u 708 MovieFocusMode? int8u 710 MovieAFAreaMode int8u 712 MovieVRMode? int8u 716 MovieElectronicVR? int8u 718 MovieSoundRecording? int8u 720 MicrophoneSensitivity? int8u 722 MicrophoneAttenuator? int8u 724 MicrophoneFrequencyResponse? int8u 726 WindNoiseReduction? int8u 748 MovieToneMap? int8u 754 MovieFrameSize? int8u 756 MovieFrameRate? int8u 762 MicrophoneJackPower? int8u 763 MovieDXCropAlert? int8u 764 MovieSubjectDetection? int8u 799 CustomSettingsZ9 NikonCustom SettingsZ9 1426 Language? int8u 1428 TimeZone int8u 1434 MonitorBrightness? no 1456 AFFineTune? int8u 1552 HDMIOutputResolution int8u 1565 SetClockFromLocationData? int8u 1572 AirplaneMode? int8u 1573 EmptySlotRelease? int8u 1608 EnergySavingMode? int8u 1632 RecordLocationData? int8u 1636 USBPowerDelivery? int8u 1645 SensorShield? int8u

Nikon MenuSettingsZ9v3 Tags

These tags are used by the Z9 firmware 3.00.

Index1 Tag Name Writable ————— ——– 72 HighFrameRate int8u 154 MultipleExposureMode int8u 156 MultiExposureShots int8u 204 Intervals int32u 208 ShotsPerInterval int32u 248 FocusShiftNumberShots int8u 252 FocusShiftStepWidth int8u 256 FocusShiftInterval int8u~ 260 FocusShiftExposureLock? int8u 290 PhotoShootingMenuBank int8u 292 ExtendedMenuBanks int8u 328 PhotoShootingMenuBankImageArea int8u 342 AutoISO int8u 344 ISOAutoHiLimit? int16u 346 ISOAutoFlashLimit? int16u 354 ISOAutoShutterTime no 436 MovieVignetteControl? int8u 438 DiffractionCompensation int8u 440 FlickerReductionShooting int8u 444 FlashControlMode int8u 446 FlashMasterCompensation? int8s 450 FlashGNDistance? no 454 FlashOutput? int8u 548 AFAreaMode int8u 550 VRMode int8u 554 BracketSet int8u 556 BracketProgram int8u 558 BracketIncrement int8u 576 SecondarySlotFunction int8u 592 DXCropAlert int8u 594 SubjectDetection int8u 596 DynamicAFAreaSize int8u 636 HighFrequencyFlickerReductionShooting? int8u 646 MovieImageArea? int8u & 0x01 656 MovieType? int8u 658 MovieISOAutoHiLimit? int16u 660 MovieISOAutoControlManualMode? int8u 662 MovieISOAutoManualMode? int16u 736 MovieActiveD-Lighting? int8u 738 MovieHighISONoiseReduction? int8u 744 MovieFlickerReduction int8u 746 MovieMeteringMode? int8u 748 MovieFocusMode? int8u 750 MovieAFAreaMode int8u 752 MovieVRMode? int8u 756 MovieElectronicVR? int8u 758 MovieSoundRecording? int8u 760 MicrophoneSensitivity? int8u 762 MicrophoneAttenuator? int8u 764 MicrophoneFrequencyResponse? int8u 766 WindNoiseReduction? int8u 788 MovieToneMap? int8u 794 MovieFrameSize? int8u 796 MovieFrameRate? int8u 802 MicrophoneJackPower? int8u 803 MovieDXCropAlert? int8u 804 MovieSubjectDetection? int8u 812 MovieHighResZoom? int8u 847 CustomSettingsZ9 NikonCustom SettingsZ9 1474 Language? int8u 1476 TimeZone int8u 1482 MonitorBrightness? int8u 1504 AFFineTune? int8u 1600 HDMIOutputResolution int8u 1613 SetClockFromLocationData? int8u 1620 AirplaneMode? int8u 1621 EmptySlotRelease? int8u 1656 EnergySavingMode? int8u 1680 RecordLocationData? int8u 1684 USBPowerDelivery? int8u 1693 SensorShield? int8u 1754 FocusShiftAutoReset? int8u 1810 PreReleaseBurstLength int8u 1812 PostReleaseBurstLength int8u

Nikon MenuSettingsZ9v4 Tags

These tags are used by the Z9 firmware 3.00.

Index1 Tag Name Writable ————— ——– 72 HighFrameRate int8u 154 MultipleExposureMode int8u 156 MultiExposureShots int8u 204 Intervals int32u 208 ShotsPerInterval int32u 248 FocusShiftNumberShots int8u 252 FocusShiftStepWidth int8u 256 FocusShiftInterval int8u~ 260 FocusShiftExposureLock? int8u 290 PhotoShootingMenuBank int8u 292 ExtendedMenuBanks int8u 328 PhotoShootingMenuBankImageArea int8u 342 AutoISO int8u 344 ISOAutoHiLimit? int16u 346 ISOAutoFlashLimit? int16u 354 ISOAutoShutterTime no 436 MovieVignetteControl? int8u 438 DiffractionCompensation int8u 440 FlickerReductionShooting int8u 444 FlashControlMode int8u 446 FlashMasterCompensation? int8s 450 FlashGNDistance? no 454 FlashOutput? int8u 548 AFAreaMode int8u 550 VRMode int8u 554 BracketSet int8u 556 BracketProgram int8u 558 BracketIncrement int8u 570 HDR int8u 576 SecondarySlotFunction int8u 582 HDRLevel int8u 586 Slot2JpgSize? int8u 592 DXCropAlert int8u 594 SubjectDetection int8u 596 DynamicAFAreaSize int8u 636 HighFrequencyFlickerReductionShooting? int8u 646 MovieImageArea? int8u & 0x01 656 MovieType? int8u 658 MovieISOAutoHiLimit? int16u 660 MovieISOAutoControlManualMode? int8u 662 MovieISOAutoManualMode? int16u 736 MovieActiveD-Lighting? int8u 738 MovieHighISONoiseReduction? int8u 744 MovieFlickerReduction int8u 746 MovieMeteringMode? int8u 748 MovieFocusMode? int8u 750 MovieAFAreaMode int8u 752 MovieVRMode? int8u 756 MovieElectronicVR? int8u 758 MovieSoundRecording? int8u 760 MicrophoneSensitivity? int8u 762 MicrophoneAttenuator? int8u 764 MicrophoneFrequencyResponse? int8u 766 WindNoiseReduction? int8u 788 MovieToneMap? int8u 794 MovieFrameSize? int8u 796 MovieFrameRate? int8u 802 MicrophoneJackPower? int8u 803 MovieDXCropAlert? int8u 804 MovieSubjectDetection? int8u 812 MovieHighResZoom? int8u 847 CustomSettingsZ9v4 NikonCustom SettingsZ9v4 1498 Language? int8u 1500 TimeZone int8u 1506 MonitorBrightness? int8u 1528 AFFineTune? int8u 1532 NonCPULens1FocalLength? int16s~ 1536 NonCPULens2FocalLength? int16s~ 1540 NonCPULens3FocalLength? int16s~ 1544 NonCPULens4FocalLength? int16s~ 1548 NonCPULens5FocalLength? int16s~ 1552 NonCPULens6FocalLength? int16s~ 1556 NonCPULens7FocalLength? int16s~ 1560 NonCPULens8FocalLength? int16s~ 1564 NonCPULens9FocalLength? int16s~ 1568 NonCPULens10FocalLength? int16s~ 1572 NonCPULens11FocalLength? int16s~ 1576 NonCPULens12FocalLength? int16s~ 1580 NonCPULens13FocalLength? int16s~ 1584 NonCPULens14FocalLength? int16s~ 1588 NonCPULens15FocalLength? int16s~ 1592 NonCPULens16FocalLength? int16s~ 1596 NonCPULens17FocalLength? int16s~ 1600 NonCPULens18FocalLength? int16s~ 1604 NonCPULens19FocalLength? int16s~ 1608 NonCPULens20FocalLength? int16s~ 1612 NonCPULens1MaxAperture? int16s~ 1616 NonCPULens2MaxAperture? int16s~ 1620 NonCPULens3MaxAperture? int16s~ 1624 NonCPULens4MaxAperture? int16s~ 1628 NonCPULens5MaxAperture? int16s~ 1632 NonCPULens6MaxAperture? int16s~ 1636 NonCPULens7MaxAperture? int16s~ 1640 NonCPULens8MaxAperture? int16s~ 1644 NonCPULens9MaxAperture? int16s~ 1648 NonCPULens10MaxAperture? int16s~ 1652 NonCPULens11MaxAperture? int16s~ 1656 NonCPULens12MaxAperture? int16s~ 1660 NonCPULens13MaxAperture? int16s~ 1664 NonCPULens14MaxAperture? int16s~ 1668 NonCPULens15MaxAperture? int16s~ 1672 NonCPULens16MaxAperture? int16s~ 1676 NonCPULens17MaxAperture? int16s~ 1680 NonCPULens18MaxAperture? int16s~ 1684 NonCPULens19MaxAperture? int16s~ 1688 NonCPULens20MaxAperture? int16s~ 1704 HDMIOutputResolution int8u 1717 SetClockFromLocationData? int8u 1724 AirplaneMode? int8u 1725 EmptySlotRelease? int8u 1760 EnergySavingMode? int8u 1784 RecordLocationData? int8u 1788 USBPowerDelivery? int8u 1797 SensorShield? int8u 1862 AutoCapturePreset int8u 1864 FocusShiftAutoReset? int8u 1922 PreReleaseBurstLength int8u 1924 PostReleaseBurstLength int8u 1938 VerticalISOButton int8u 1940 ExposureCompensationButton int8u 1942 ISOButton int8u 2002 ViewModeShowEffectsOfSettings? int8u 2004 DispButton int8u 2048 ExposureDelay fixed32u~ 2056 PlaybackButton int8u 2058 WBButton int8u 2060 BracketButton int8u 2062 FlashModeButton int8u 2064 LensFunc1ButtonPlaybackMode int8u 2066 LensFunc2ButtonPlaybackMode int8u 2068 PlaybackButtonPlaybackMode int8u 2070 BracketButtonPlaybackMode int8u 2072 FlashModeButtonPlaybackMode int8u

Nikon ShotInfo Tags

This information is encrypted for ShotInfoVersion 02xx, and some tags are only valid for specific models.

Index1 Tag Name Writable —— ——– ——– 0 ShotInfoVersion no 4 FirmwareVersion no 16 DistortionControl int8u 102 VR_0x66? int8u 106 ShutterCount int32u 110 DeletedImageCount int32u 117 VibrationReduction int8u 130 VibrationReduction int8u 343 ShutterCount undef[2] 430 VibrationReduction int8u 589 ShutterCount int32u

Nikon ColorBalance1 Tags

Index2 Tag Name Writable —— ——– ——– 0 WB_RBGGLevels int16u[4]!

Nikon ColorBalance2 Tags

This information is encrypted for most camera models.

Index2 Tag Name Writable —— ——– ——– 0 WB_RGGBLevels int16u[4]!

Nikon ColorBalance3 Tags

Index2 Tag Name Writable —— ——– ——– 0 WB_RGBGLevels int16u[4]!

Nikon ColorBalance4 Tags

Index2 Tag Name Writable —— ——– ——– 0 WB_GRBGLevels int16u[4]!

Nikon ColorBalanceUnknown Tags

Index1 Tag Name Writable —— ——– ——– 0 ColorBalanceVersion undef[4]

Nikon ColorBalanceUnknown2 Tags

Index2 Tag Name Writable —— ——– ——– 0 ColorBalanceVersion undef[4]

Nikon LensData00 Tags

This structure is used by the D100, and D1X with firmware version 1.1.

Index1 Tag Name Writable —— ——– ——– 0 LensDataVersion no 6 LensIDNumber int8u 7 LensFStops int8u 8 MinFocalLength int8u 9 MaxFocalLength int8u 10 MaxApertureAtMinFocal int8u 11 MaxApertureAtMaxFocal int8u 12 MCUVersion int8u

Nikon LensData01 Tags

Nikon encrypts the LensData information below if LensDataVersion is 0201 or higher, but the decryption algorithm is known so the information can be extracted.

Index1 Tag Name Writable —— ——– ——– 0 LensDataVersion no 4 ExitPupilPosition int8u 5 AFAperture int8u 8 FocusPosition int8u 9 FocusDistance int8u 10 FocalLength int8u 11 LensIDNumber int8u 12 LensFStops int8u 13 MinFocalLength int8u 14 MaxFocalLength int8u 15 MaxApertureAtMinFocal int8u 16 MaxApertureAtMaxFocal int8u 17 MCUVersion int8u 18 EffectiveMaxAperture int8u

Nikon LensData0204 Tags

Nikon encrypts the LensData information below if LensDataVersion is 0201 or higher, but the decryption algorithm is known so the information can be extracted.

Index1 Tag Name Writable —— ——– ——– 0 LensDataVersion no 4 ExitPupilPosition int8u 5 AFAperture int8u 8 FocusPosition int8u 10 FocusDistance int8u 11 FocalLength int8u 12 LensIDNumber int8u 13 LensFStops int8u 14 MinFocalLength int8u 15 MaxFocalLength int8u 16 MaxApertureAtMinFocal int8u 17 MaxApertureAtMaxFocal int8u 18 MCUVersion int8u 19 EffectiveMaxAperture int8u

Nikon LensData0400 Tags

Tags extracted from the encrypted lens data of the Nikon 1J1/1V1/1J2.

Index1 Tag Name Writable —— ——– ——– 0 LensDataVersion no 394 LensModel string[64]

Nikon LensData0402 Tags

Tags extracted from the encrypted lens data of the Nikon 1J3/1S1/1V2.

Index1 Tag Name Writable —— ——– ——– 0 LensDataVersion no 395 LensModel string[64]

Nikon LensData0403 Tags

Tags extracted from the encrypted lens data of the Nikon 1J4/1J5.

Index1 Tag Name Writable —— ——– ——– 0 LensDataVersion no 684 LensModel string[64]

Nikon LensData0800 Tags

Tags found in the encrypted LensData from cameras such as the Z6 and Z7.

Index1 Tag Name Writable —— ——– ——– 0 LensDataVersion no 4 ExitPupilPosition int8u 5 AFAperture int8u 11 FocusDistance int8u 12 FocalLength int8u 13 LensIDNumber int8u 14 LensFStops int8u 15 MinFocalLength int8u 16 MaxFocalLength int8u 17 MaxApertureAtMinFocal int8u 18 MaxApertureAtMaxFocal int8u 19 MCUVersion int8u 20 EffectiveMaxAperture int8u 47 NewLensData undef[17] 48 LensID int16u 53 LensMountType int8u 54 MaxAperture int16u 56 FNumber int16u 60 FocalLength int16u 76 FocusDistanceRangeWidth? int8u 78 FocusDistance int16u~ 86 LensDriveEnd? int8u 88 FocusStepsFromInfinity? int8u 90 LensPositionAbsolute int32s

Nikon LensDataUnknown Tags

Index1 Tag Name Writable —— ——– ——– 0 LensDataVersion no

Nikon FlashInfo0100 Tags

These tags are used by the D2H, D2Hs, D2X, D2Xs, D50, D70, D70s, D80 and D200.

Index1 Tag Name Writable —— ——– ——– 0 FlashInfoVersion no 4 FlashSource int8u 6 ExternalFlashFirmware int8u[2] 8 ExternalFlashFlags int8u 9.1 FlashCommanderMode int8u & 0x80 9.2 FlashControlMode int8u & 0x7f 10 FlashOutput int8u FlashCompensation int8s 11 FlashFocalLength int8u 12 RepeatingFlashRate int8u 13 RepeatingFlashCount int8u 14 FlashGNDistance int8u 15 FlashGroupAControlMode int8u & 0x0f 16 FlashGroupBControlMode int8u & 0x0f 17 FlashGroupAOutput int8u FlashGroupACompensation int8s 18 FlashGroupBOutput int8u FlashGroupBCompensation int8s

Nikon FlashInfo0102 Tags

These tags are used by the D3 (firmware 1.x), D40, D40X, D60 and D300 (firmware 1.00).

Index1 Tag Name Writable —— ——– ——– 0 FlashInfoVersion no 4 FlashSource int8u 6 ExternalFlashFirmware int8u[2] 8 ExternalFlashFlags int8u 9.1 FlashCommanderMode int8u & 0x80 9.2 FlashControlMode int8u & 0x7f 10 FlashOutput int8u FlashCompensation int8s 12 FlashFocalLength int8u 13 RepeatingFlashRate int8u 14 RepeatingFlashCount int8u 15 FlashGNDistance int8u 16.1 FlashGroupAControlMode int8u & 0x0f 17.1 FlashGroupBControlMode int8u & 0xf0 17.2 FlashGroupCControlMode int8u & 0x0f 18 FlashGroupAOutput int8u FlashGroupACompensation int8s 19 FlashGroupBOutput int8u FlashGroupBCompensation int8s 20 FlashGroupCOutput int8u FlashGroupCCompensation int8s

Nikon FlashInfo0103 Tags

These tags are used by the D3 (firmware 2.x), D3X, D3S, D4, D90, D300 (firmware 1.10), D300S, D600, D700, D800, D3000, D3100, D3200, D5000, D5100, D5200, D7000.

Index1 Tag Name Writable —— ——– ——– 0 FlashInfoVersion no 4 FlashSource int8u 6 ExternalFlashFirmware int8u[2] 8 ExternalFlashFlags int8u 9.1 FlashCommanderMode int8u & 0x80 9.2 FlashControlMode int8u & 0x7f 10 FlashOutput int8u FlashCompensation int8s 12 FlashFocalLength int8u 13 RepeatingFlashRate int8u 14 RepeatingFlashCount int8u 15 FlashGNDistance int8u 16 FlashColorFilter int8u 17.1 FlashGroupAControlMode int8u & 0x0f 18.1 FlashGroupBControlMode int8u & 0xf0 18.2 FlashGroupCControlMode int8u & 0x0f 19 FlashGroupAOutput int8u FlashGroupACompensation int8s 20 FlashGroupBOutput int8u FlashGroupBCompensation int8s 21 FlashGroupCOutput int8u FlashGroupCCompensation int8s 27 ExternalFlashCompensation int8s 29 FlashExposureComp3 int8s 39 FlashExposureComp4 int8s

Nikon FlashInfo0106 Tags

These tags are used by the Df, D610, D3300, D5300, D7100 and Coolpix A.

Index1 Tag Name Writable —— ——– ——– 0 FlashInfoVersion no 4 FlashSource int8u 6 ExternalFlashFirmware int8u[2] 8 ExternalFlashFlags int8u 9.1 FlashCommanderMode int8u & 0x80 9.2 FlashControlMode int8u & 0x7f 12 FlashFocalLength int8u 13 RepeatingFlashRate int8u 14 RepeatingFlashCount int8u 15 FlashGNDistance int8u 16 FlashColorFilter int8u 17.1 FlashGroupAControlMode int8u & 0x0f 18.1 FlashGroupBControlMode int8u & 0xf0 18.2 FlashGroupCControlMode int8u & 0x0f 39 FlashOutput int8u FlashCompensation int8s 40 FlashGroupAOutput int8u FlashGroupACompensation int8s 41 FlashGroupBOutput int8u FlashGroupBCompensation int8s 42 FlashGroupCOutput int8u FlashGroupCCompensation int8s

Nikon FlashInfo0107 Tags

These tags are used by the D4S, D750, D810, D5500, D7200 (FlashInfoVersion 0107) and the D5, D500, D850 and D3400 (FlashInfoVersion 0108).

Index1 Tag Name Writable —— ——– ——– 0 FlashInfoVersion no 4 FlashSource int8u 6 ExternalFlashFirmware int8u[2] 8.1 ExternalFlashZoomOverride int8u & 0x80 8.2 ExternalFlashStatus int8u & 0x01 9.1 ExternalFlashReadyState int8u & 0x07 10 FlashCompensation int8s 12 FlashFocalLength int8u 13 RepeatingFlashRate int8u 14 RepeatingFlashCount int8u 15 FlashGNDistance int8u 17.1 FlashGroupAControlMode int8u & 0x0f 18.1 FlashGroupBControlMode int8u & 0xf0 18.2 FlashGroupCControlMode int8u & 0x0f 40 FlashGroupAOutput int8u FlashGroupACompensation int8s 41 FlashGroupBOutput int8u FlashGroupBCompensation int8s 42 FlashGroupCOutput int8u FlashGroupCCompensation int8s

Nikon FlashInfo0300 Tags

Index1 Tag Name Writable —— ——– ——– 0 FlashInfoVersion no 4 FlashSource int8u 6 ExternalFlashFirmware int8u[2] 8 ExternalFlashFlags int8u 9.1 FlashCommanderMode int8u & 0x80 9.2 FlashControlMode int8u & 0x7f 10 FlashCompensation int8s 13 RepeatingFlashRate int8u 14 RepeatingFlashCount int8u 15 FlashGNDistance int8u 16 FlashColorFilter int8u 17.1 FlashGroupAControlMode int8u & 0x0f 18.1 FlashGroupBControlMode int8u & 0xf0 18.2 FlashGroupCControlMode int8u & 0x0f 33 FlashOutput int8u 37 FlashIlluminationPattern int8u 38 FlashFocalLength int8u 40 FlashGroupAOutput int8u FlashGroupACompensation int8s 41 FlashGroupBOutput int8u FlashGroupBCompensation int8s 42 FlashGroupCOutput int8u FlashGroupCCompensation int8s

Nikon FlashInfoUnknown Tags

Index1 Tag Name Writable —— ——– ——– 0 FlashInfoVersion no

Nikon MultiExposure Tags

Index4 Tag Name Writable —— ——– ——– 0 MultiExposureVersion no 1 MultiExposureMode int32u 2 MultiExposureShots int32u 3 MultiExposureAutoGain int32u

Nikon MultiExposure2 Tags

Index4 Tag Name Writable —— ——– ——– 0 MultiExposureVersion no 1 MultiExposureMode int32u 2 MultiExposureShots int32u 3 MultiExposureOverlayMode int32u

Nikon AFInfo2V0400 Tags

Index1 Tag Name Writable —— ——– ——– 0 AFInfo2Version no 5 AFAreaMode int8u 10 AFPointsUsed undef[51] 62 AFImageWidth int16u 64 AFImageHeight int16u 66 AFAreaXPosition int16u 67 FocusPositionHorizontal int8u~ 68 AFAreaYPosition int16u 69 FocusPositionVertical int8u~ 70 AFAreaWidth int16u 72 AFAreaHeight int16u 74 FocusResult int8u

Nikon AFInfo2 Tags

These tags are written by Nikon DSLR’s which have the live view feature.

Index1 Tag Name Writable —— ——– ——– 0 AFInfo2Version no 4 ContrastDetectAF int8u 5 AFAreaMode int8u 6 PhaseDetectAF int8u 7 PrimaryAFPoint int8u 8 AFPointsUsed undef[7] AFPointsUsed undef[2] AFPointsUsed undef[5] AFPointsUsed undef[17] AFPointsUsed undef[21] AFPointsUsed undef[29] AFPointsUsed undef[20] AFPointsUsed undef[7] PrimaryAFPoint int8u 10 AFPointsUsed undef[7] AFPointsUsed undef[11] AFPointsUsed undef[14] 16 AFImageWidth int16u 18 AFImageHeight int16u 20 AFAreaXPosition int16u 22 AFAreaYPosition int16u 24 AFAreaWidth int16u 26 AFAreaHeight int16u 28 ContrastDetectAFInFocus int8u AFPointsSelected undef[20] 42 AFImageWidth int16u 44 AFImageHeight int16u 46 AFAreaXPosition int16u 47 FocusPositionHorizontal int8u~ 48 AFAreaYPosition int16u AFPointsInFocus undef[20] 49 FocusPositionVertical int8u~ 50 AFAreaWidth int16u 52 AFAreaHeight int16u 56 PrimaryAFPoint int8u 68 PrimaryAFPoint int8u 70 AFImageWidth int16u 72 AFImageHeight int16u 74 AFAreaXPosition int16u 76 AFAreaYPosition int16u 78 AFAreaWidth int16u 80 AFAreaHeight int16u 82 ContrastDetectAFInFocus int8u

Nikon FileInfo Tags

Index2 Tag Name Writable —— ——– ——– 0 FileInfoVersion no 2 MemoryCardNumber int16u 3 DirectoryNumber int16u 4 FileNumber int16u

Nikon AFTune Tags

Index1 Tag Name Writable —— ——– ——– 0 AFFineTune int8u 1 AFFineTuneIndex int8u 2 AFFineTuneAdj int8s 3 AFFineTuneAdjTele int8s

Nikon RetouchInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 RetouchInfoVersion no 5 RetouchNEFProcessing int8s

Nikon BarometerInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 BarometerInfoVersion no 6 Altitude int32s

Nikon CaptureOffsets Tags

Tag ID Tag Name Writable —— ——– ——– 0x0001 IFD0_Offset no 0x0002 PreviewIFD_Offset no 0x0003 SubIFD_Offset no

Nikon Scan Tags

This information is written by the Nikon Scan software.

Tag ID Tag Name Writable —— ——– ——– 0x0002 FilmType string 0x0040 MultiSample string 0x0041 BitDepth int16u 0x0050 MasterGain rational64s 0x0051 ColorGain rational64s[3] 0x0060 ScanImageEnhancer int32u 0x0100 DigitalICE string 0x0110 ROCInfo Nikon ROC 0x0120 GEMInfo Nikon GEM 0x0200 DigitalDEEShadowAdj int32u 0x0201 DigitalDEEThreshold int32u 0x0202 DigitalDEEHighlightAdj int32u

Nikon ROC Tags

Index4 Tag Name Writable —— ——– ——– 0 DigitalROC int32u

Nikon GEM Tags

Index4 Tag Name Writable —— ——– ——– 0 DigitalGEM int32u

Nikon CaptureOutput Tags

Index4 Tag Name Writable —— ——– ——– 2 OutputImageWidth int32u 3 OutputImageHeight int32u 4 OutputResolution int32u

Nikon Type2 Tags

Tag ID Tag Name Writable —— ——– ——– 0x0003 Quality yes 0x0004 ColorMode yes 0x0005 ImageAdjustment yes 0x0006 CCDSensitivity yes 0x0007 WhiteBalance yes 0x0008 Focus yes 0x000a DigitalZoom yes 0x000b Converter yes

Nikon NEFInfo Tags

As-yet unknown information found in SubIFD1 tag 0xc7d5 of NEF images from cameras such as the Z6 and Z7, and NRW images from some Coolpix cameras.

Tag ID Tag Name Writable —— ——– ——– 0x0005 DistortionInfo Nikon DistortionInfo 0x0006 VignetteInfo Nikon VignetteInfo

Nikon DistortionInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 DistortionCorrectionVersion string[4] 4 DistortionCorrection int8u 20 RadialDistortionCoefficient1 rational64s~ 28 RadialDistortionCoefficient2 rational64s~ 36 RadialDistortionCoefficient3 rational64s~

Nikon VignetteInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 VignetteCorrectionVersion string[4] 36 VignetteCoefficient1 rational64s~ 52 VignetteCoefficient2 rational64s~ 68 VignetteCoefficient3 rational64s~

Nikon AVI Tags

Nikon-specific RIFF tags found in AVI videos.

Tag ID Tag Name Writable —— ——– ——– nctg NikonTags Nikon AVITags ncth ThumbnailImage no ncvr NikonVers Nikon AVIVers ncvw PreviewImage no

Nikon AVITags Tags

These tags and the AVIVer tags below are found in proprietary-format records of Nikon AVI videos.

Tag ID Tag Name Writable —— ——– ——– 0x0003 Make no 0x0004 Model no 0x0005 Software no 0x0006 Equipment no 0x0007 Orientation no 0x0008 ExposureTime no 0x0009 FNumber no 0x000a ExposureCompensation no 0x000b MaxApertureValue no 0x000c MeteringMode no 0x000f FocalLength no 0x0010 XResolution no 0x0011 YResolution no 0x0012 ResolutionUnit no 0x0013 DateTimeOriginal no 0x0014 CreateDate no 0x0016 Duration no 0x0018 FocusMode no 0x001b DigitalZoom no 0x001d ColorMode no 0x001e Sharpness no 0x001f WhiteBalance no 0x0020 NoiseReduction no

Nikon AVIVers Tags

Tag ID Tag Name Writable —— ——– ——– 0x0001 MakerNoteType no 0x0002 MakerNoteVersion no

Nikon NCDT Tags

Nikon-specific QuickTime tags found in the NCDT atom of MOV videos from various Nikon models.

Tag ID Tag Name Writable —— ——– ——– NCDB NikonNCDB Nikon NCDB NCHD MakerNoteVersion no NCM1 PreviewImage1 no NCM2 PreviewImage2 no NCTG NikonTags Nikon NCTG NCTH ThumbnailImage no NCVW PreviewImage no

Nikon NCDB Tags

Tag ID Tag Name Writable —— ——– ——– [no tags known]

Nikon NCTG Tags

These tags are found in proprietary-format records of the NCTG atom in MOV videos from some Nikon cameras.

Tag ID Tag Name Writable —— ——– ——– 0x0001 Make no 0x0002 Model no 0x0003 Software no 0x0011 CreateDate no 0x0012 DateTimeOriginal no 0x0013 FrameCount no 0x0016 FrameRate no 0x0019 TimeZone no 0x0022 FrameWidth no 0x0023 FrameHeight no 0x0032 AudioChannels no 0x0033 AudioBitsPerSample no 0x0034 AudioSampleRate no 0x1002 NikonDateTime no 0x1013 ElectronicVR no 0x110829a ExposureTime no 0x110829d FNumber no 0x1108822 ExposureProgram no 0x1109204 ExposureCompensation no 0x1109207 MeteringMode no 0x110920a FocalLength no 0x110a431 SerialNumber no 0x110a432 LensInfo no 0x110a433 LensMake no 0x110a434 LensModel no 0x110a435 LensSerialNumber no 0x1200000 GPSVersionID no 0x1200001 GPSLatitudeRef no 0x1200002 GPSLatitude no 0x1200003 GPSLongitudeRef no 0x1200004 GPSLongitude no 0x1200005 GPSAltitudeRef no 0x1200006 GPSAltitude no 0x1200007 GPSTimeStamp no 0x1200008 GPSSatellites no 0x1200010 GPSImgDirectionRef no 0x1200011 GPSImgDirection no 0x1200012 GPSMapDatum no 0x120001d GPSDateStamp no 0x2000001 MakerNoteVersion no 0x2000005 WhiteBalance no 0x2000007 FocusMode no 0x200000b WhiteBalanceFineTune no 0x200001b CropHiSpeed no 0x200001e ColorSpace no 0x200001f VRInfo Nikon VRInfo 0x2000022 ActiveD-Lighting no 0x2000023 PictureControlData Nikon PictureControl Nikon PictureControl2 Nikon PictureControl3 Nikon PictureControlUnknown 0x2000024 WorldTime Nikon WorldTime 0x2000025 ISOInfo Nikon ISOInfo 0x200002a VignetteControl no 0x200002c UnknownInfo Nikon UnknownInfo 0x2000032 UnknownInfo2 Nikon UnknownInfo2 0x2000039 LocationInfo Nikon LocationInfo 0x200003f WhiteBalanceFineTune no 0x200004e NikonSettings NikonSettings 0x2000083 LensType no 0x2000084 Lens no 0x2000087 FlashMode no 0x2000098 LensData0100 Nikon LensData00 LensData0101 Nikon LensData01 LensData0201 Nikon LensData01 LensData0204 Nikon LensData0204 LensData0400 Nikon LensData0400 LensData0402 Nikon LensData0402 LensData0403 Nikon LensData0403 LensData0800 Nikon LensData0800 LensDataUnknown Nikon LensDataUnknown 0x20000a7 ShutterCount no 0x20000a8 FlashInfo0100 Nikon FlashInfo0100 FlashInfo0102 Nikon FlashInfo0102 FlashInfo0103 Nikon FlashInfo0103 FlashInfo0106 Nikon FlashInfo0106 FlashInfo0107 Nikon FlashInfo0107 FlashInfoUnknown Nikon FlashInfoUnknown 0x20000ab VariProgram no 0x20000b1 HighISONoiseReduction no 0x20000b7 AFInfo2 Nikon AFInfo2 0x20000c3 BarometerInfo Nikon BarometerInfo

Nikon MOV Tags

This information is found in MOV and QT videos from some Nikon cameras.

Index1 Tag Name Writable —— ——– ——– 0 Make no 24 Model no 38 ExposureTime no 42 FNumber no 50 ExposureCompensation no 68 WhiteBalance no 72 FocalLength no 175 Software no 223 ISO no

NikonCustom Tags

Unfortunately, the NikonCustom settings are stored in a binary data block which changes from model to model. This means that significant effort must be spent in decoding these for each model, usually requiring hundreds of test images from a dedicated Nikon owner. For this reason, the NikonCustom settings have not been decoded for all models. The tables below list the custom settings for the currently supported models.

NikonCustom SettingsD40 Tags

Custom settings for the Nikon D40.

Index1 Tag Name Writable —— ——– ——– 0.1 Beep int8u & 0x80 0.2 AFAssist int8u & 0x40 0.3 NoMemoryCard int8u & 0x20 0.4 ImageReview int8u & 0x10 1.1 AutoISO int8u & 0x80 1.2 AutoISOMax int8u & 0x30 1.3 AutoISOMinShutterSpeed int8u & 0x07 2.1 ImageReviewTime int8u & 0x07 3.1 MonitorOffTime int8u & 0xe0 3.2 MeteringTime int8u & 0x1c 3.3 SelfTimerTime int8u & 0x03 3.4 RemoteOnDuration int8u & 0xc0 4.1 AELockButton int8u & 0x0e 4.2 AELock int8u & 0x01 5.1 ShootingModeSetting int8u & 0x70 5.2 TimerFunctionButton int8u & 0x07 6.1 Metering int8u & 0x03 8.1 InternalFlash int8u & 0x10 8.2 ManualFlashOutput int8u & 0x07 9 FlashLevel int8s 10.1 FocusModeSetting int8u & 0xc0 11.1 AFAreaModeSetting int8u & 0x30

NikonCustom SettingsD80 Tags

Custom settings for the Nikon D80.

Index1 Tag Name Writable —— ——– ——– 0.1 Beep int8u & 0x80 0.2 AFAssist int8u & 0x40 0.3 NoMemoryCard int8u & 0x20 0.4 ImageReview int8u & 0x10 0.5 Illumination int8u & 0x08 0.6 MainDialExposureComp int8u & 0x04 0.7 EVStepSize int8u & 0x01 1.1 AutoISO int8u & 0x40 1.2 AutoISOMax int8u & 0x30 1.3 AutoISOMinShutterSpeed int8u & 0x0f 2.1 AutoBracketSet int8u & 0xc0 2.2 AutoBracketOrder int8u & 0x20 3.1 MonitorOffTime int8u & 0xe0 3.2 MeteringTime int8u & 0x1c 3.3 SelfTimerTime int8u & 0x03 4.1 AELockButton int8u & 0x1e 4.2 AELock int8u & 0x01 4.3 RemoteOnDuration int8u & 0xc0 5.1 CommandDials int8u & 0x80 5.2 FunctionButton int8u & 0x78 6.1 GridDisplay int8u & 0x80 6.2 ViewfinderWarning int8u & 0x40 6.3 CenterWeightedAreaSize int8u & 0x0c 6.4 ExposureDelayMode int8u & 0x20 6.5 MB-D80Batteries int8u & 0x03 7.1 FlashWarning int8u & 0x80 7.2 FlashShutterSpeed int8u & 0x78 7.3 AutoFP int8u & 0x04 7.4 ModelingFlash int8u & 0x02 8.1 InternalFlash int8u & 0xc0 8.2 ManualFlashOutput int8u & 0x07 9.1 RepeatingFlashOutput int8u & 0x70 9.2 RepeatingFlashCount int8u & 0x0f 10.1 RepeatingFlashRate int8u & 0xf0 10.2 CommanderChannel int8u & 0x03 11.1 CommanderInternalFlash int8u & 0xc0 11.2 CommanderGroupAMode int8u & 0x30 11.3 CommanderGroupBMode int8u & 0x0c 12.1 CommanderInternalTTLComp int8u & 0x1f 12.2 CommanderInternalManualOutput int8u & 0xe0 13.1 CommanderGroupA_TTL-AAComp int8u & 0x1f 13.2 CommanderGroupAManualOutput int8u & 0xe0 14.1 CommanderGroupB_TTL-AAComp int8u & 0x1f 14.2 CommanderGroupBManualOutput int8u & 0xe0 15.1 CenterAFArea int8u & 0x80 15.2 FocusAreaSelection int8u & 0x04 15.3 AFAreaIllumination int8u & 0x03 16.1 AFAreaModeSetting int8u & 0xc0

NikonCustom SettingsD90 Tags

Custom settings for the D90.

Index1 Tag Name Writable —— ——– ——– 0.1 LightSwitch int8u & 0x08 2.1 AFAreaModeSetting int8u & 0x60 2.2 CenterFocusPoint int8u & 0x10 2.3 AFAssist int8u & 0x01 2.4 AFPointIllumination int8u & 0x06 2.5 FocusPointWrap int8u & 0x08 3.1 AELockForMB-D80 int8u & 0x1c 3.2 MB-D80BatteryType int8u & 0x03 4.1 Beep int8u & 0x40 4.2 GridDisplay int8u & 0x02 4.3 ISODisplay int8u & 0x0c 4.4 ViewfinderWarning int8u & 0x01 4.5 NoMemoryCard int8u & 0x20 5.1 ScreenTips int8u & 0x04 5.2 FileNumberSequence int8u & 0x08 5.3 ShootingInfoDisplay int8u & 0xc0 5.4 LCDIllumination int8u & 0x20 6.1 EasyExposureComp int8u & 0x01 6.2 ReverseIndicators int8u & 0x80 7.1 ExposureControlStepSize int8u & 0x40 8.1 CenterWeightedAreaSize int8u & 0x60 8.2 FineTuneOptMatrixMetering int8u & 0x0f 9.1 FineTuneOptCenterWeighted int8u & 0xf0 9.2 FineTuneOptSpotMetering int8u & 0x0f 11.1 CLModeShootingSpeed int8u & 0x07 11.2 ExposureDelayMode int8u & 0x40 13.1 AutoBracketSet int8u & 0xe0 13.2 AutoBracketOrder int8u & 0x10 14.1 FuncButton int8u & 0x78 16.1 OKButton int8u & 0x18 17.1 AELockButton int8u & 0x38 18.1 CommandDialsReverseRotation int8u & 0x80 18.2 ShutterReleaseButtonAE-L int8u & 0x02 19.1 MeteringTime int8u & 0xf0 19.2 RemoteOnDuration int8u & 0x03 20.1 SelfTimerTime int8u & 0xc0 20.2 SelfTimerShotCount int8u & 0x1e 21.1 PlaybackMonitorOffTime int8u & 0x1c 21.2 ImageReviewTime int8u & 0xe0 22.1 MenuMonitorOffTime int8u & 0xe0 22.2 ShootingInfoMonitorOffTime int8u & 0x1c 23.1 FlashShutterSpeed int8u & 0x0f 24.1 InternalFlash int8u & 0xc0 24.2 ManualFlashOutput int8u & 0x1f 25.1 RepeatingFlashOutput int8u & 0x70 25.2 RepeatingFlashCount int8u & 0x0f 26.1 RepeatingFlashRate int8u & 0xf0 31.1 FlashWarning int8u & 0x80 31.2 CommanderInternalTTLComp int8u & 0x1f 31.3 ModelingFlash int8u & 0x20 31.4 AutoFP int8u & 0x40 32.1 CommanderGroupA_TTLComp int8u & 0x1f 33.1 CommanderGroupB_TTLComp int8u & 0x1f 34.1 LiveViewAF int8u & 0xc0

NikonCustom SettingsD3 Tags

Custom settings for the D3, D3S, D3X, D300 and D300S.

Index1 Tag Name Writable —— ——– ——– 0.1 CustomSettingsBank int8u & 0x03 0.2 CustomSettingsAllDefault int8u & 0x80 1.1 AF-CPrioritySelection int8u & 0xc0 1.2 AF-SPrioritySelection int8u & 0x20 1.3 AFPointSelection int8u & 0x10 1.4 DynamicAFArea int8u & 0x0c 1.5 FocusTrackingLockOn int8u & 0x03 2.1 AFActivation int8u & 0x80 2.2 FocusPointWrap int8u & 0x08 2.3 AFPointIllumination int8u & 0x60 AFPointIllumination int8u & 0x06 2.4 AFPointBrightness int8u & 0x06 2.5 AFAssist int8u & 0x01 3.1 AFOnButton int8u & 0x07 3.2 VerticalAFOnButton int8u & 0x70 3.3 AF-OnForMB-D10 int8u & 0x70 4.1 FocusTrackingLockOn int8u & 0x07 4.2 AssignBktButton int8u & 0x08 4.3 MultiSelectorLiveView int8u & 0xc0 4.4 InitialZoomLiveView int8u & 0x30 6.1 ISOStepSize int8u & 0xc0 6.2 ExposureControlStepSize int8u & 0x30 6.3 ExposureCompStepSize int8u & 0x0c 6.4 EasyExposureCompensation int8u & 0x03 7.1 CenterWeightedAreaSize int8u & 0xe0 7.2 FineTuneOptCenterWeighted int8u & 0x0f 8.1 FineTuneOptMatrixMetering int8u & 0xf0 8.2 FineTuneOptSpotMetering int8u & 0x0f 9.1 MultiSelectorShootMode int8u & 0xc0 9.2 MultiSelectorPlaybackMode int8u & 0x30 9.3 InitialZoomSetting int8u & 0x0c 9.4 MultiSelector int8u & 0x01 10.1 ExposureDelayMode int8u & 0x40 10.2 CLModeShootingSpeed int8u & 0x07 10.3 CHModeShootingSpeed int8u & 0x30 11 MaxContinuousRelease int8u 12.1 ReverseIndicators int8u & 0x20 12.2 FileNumberSequence int8u & 0x02 FileNumberSequence int8u & 0x08 12.3 RearDisplay int8u & 0x80 12.4 ViewfinderDisplay int8u & 0x40 12.5 BatteryOrder int8u & 0x04 12.6 MB-D10Batteries int8u & 0x03 12.7 ScreenTips int8u & 0x10 13.1 Beep int8u & 0xc0 13.2 ShootingInfoDisplay int8u & 0x30 13.3 GridDisplay int8u & 0x02 13.4 ViewfinderWarning int8u & 0x01 13.5 MultiSelectorPlaybackMode int8u & 0x03 14.1 PreviewButton int8u & 0xf8 FuncButton int8u & 0xf8 14.2 PreviewButtonPlusDials int8u & 0x07 FuncButtonPlusDials int8u & 0x07 15.1 FuncButton int8u & 0xf8 PreviewButton int8u & 0xf8 15.2 FuncButtonPlusDials int8u & 0x07 PreviewButtonPlusDials int8u & 0x07 16.1 AELockButton int8u & 0xf8 16.2 AELockButtonPlusDials int8u & 0x07 17.1 CommandDialsReverseRotation int8u & 0x80 17.2 CommandDialsChangeMainSub int8u & 0x40 17.3 CommandDialsApertureSetting int8u & 0x20 17.4 CommandDialsMenuAndPlayback int8u & 0x10 17.5 LCDIllumination int8u & 0x08 17.6 PhotoInfoPlayback int8u & 0x04 17.7 ShutterReleaseButtonAE-L int8u & 0x02 17.8 ReleaseButtonToUseDial int8u & 0x01 18.1 SelfTimerTime int8u & 0x18 18.2 MonitorOffTime int8u & 0x07 20.1 FlashSyncSpeed int8u & 0xe0 FlashSyncSpeed int8u & 0xf0 20.2 FlashShutterSpeed int8u & 0x0f 21.1 AutoBracketSet int8u & 0xc0 AutoBracketSet int8u & 0xe0 21.2 AutoBracketModeM int8u & 0x30 AutoBracketModeM int8u & 0x18 21.3 AutoBracketOrder int8u & 0x08 AutoBracketOrder int8u & 0x04 21.4 ModelingFlash int8u & 0x01 22.1 NoMemoryCard int8u & 0x80 22.2 MeteringTime int8u & 0x0f 23.1 InternalFlash int8u & 0xc0 25.1 ImageReviewTime int8u & 0xe0 25.2 PlaybackMonitorOffTime int8u & 0x1c 26.1 MenuMonitorOffTime int8u & 0xe0 26.2 ShootingInfoMonitorOffTime int8u & 0x1c

NikonCustom SettingsD700 Tags

Custom settings for the D700.

Index1 Tag Name Writable —— ——– ——– 0.1 CustomSettingsBank int8u & 0x03 0.2 CustomSettingsAllDefault int8u & 0x80 1.1 AF-CPrioritySelection int8u & 0xc0 1.2 AF-SPrioritySelection int8u & 0x20 1.3 AFPointSelection int8u & 0x10 1.4 DynamicAFArea int8u & 0x0c 2.1 AFActivation int8u & 0x80 2.2 FocusPointWrap int8u & 0x08 2.3 AFPointIllumination int8u & 0x06 2.4 AFAssist int8u & 0x01 3.1 FocusTrackingLockOn int8u & 0x07 3.2 AF-OnForMB-D10 int8u & 0x70 4.1 ISOStepSize int8u & 0xc0 4.2 ExposureControlStepSize int8u & 0x30 4.3 ExposureCompStepSize int8u & 0x0c 4.4 EasyExposureCompensation int8u & 0x03 5.1 CenterWeightedAreaSize int8u & 0x70 6.1 FineTuneOptMatrixMetering int8u & 0xf0 6.2 FineTuneOptSpotMetering int8u & 0x0f 7.1 ShutterReleaseButtonAE-L int8u & 0x80 7.2 SelfTimerTime int8u & 0x30 7.3 MeteringTime int8u & 0x0f 8.1 PlaybackMonitorOffTime int8u & 0x38 8.2 MenuMonitorOffTime int8u & 0x07 9.1 ShootingInfoMonitorOffTime int8u & 0x38 9.2 ImageReviewTime int8u & 0x07 10.1 Beep int8u & 0xc0 10.2 ShootingInfoDisplay int8u & 0x30 10.3 LCDIllumination int8u & 0x08 10.4 ExposureDelayMode int8u & 0x04 10.5 GridDisplay int8u & 0x02 11.1 FileNumberSequence int8u & 0x40 11.2 CLModeShootingSpeed int8u & 0x07 12 MaxContinuousRelease int8u 13.1 ScreenTips int8u & 0x08 13.2 BatteryOrder int8u & 0x04 13.3 MB-D10BatteryType int8u & 0x03 15.1 FlashSyncSpeed int8u & 0xf0 15.2 FlashShutterSpeed int8u & 0x0f 16.1 FlashControlBuilt-in int8u & 0xc0 16.2 ManualFlashOutput int8u & 0x1f 17.1 RepeatingFlashOutput int8u & 0x70 17.2 RepeatingFlashCount int8u & 0x0f 18.1 RepeatingFlashRate int8u & 0xf0 18.2 CommanderInternalTTLChannel int8u & 0x03 20.1 CommanderInternalTTLCompBuiltin int8u & 0x1f 21.1 CommanderInternalTTLCompGroupA int8u & 0x1f 22.1 CommanderInternalTTLCompGroupB int8u & 0x1f 26.1 AutoBracketSet int8u & 0xc0 26.2 AutoBracketModeM int8u & 0x30 26.3 AutoBracketOrder int8u & 0x08 26.4 ModelingFlash int8u & 0x01 27.1 MultiSelectorShootMode int8u & 0xc0 27.2 MultiSelectorPlaybackMode int8u & 0x30 27.3 InitialZoomSetting int8u & 0x0c 27.4 MultiSelector int8u & 0x01 28.1 FuncButton int8u & 0xf8 29.1 PreviewButton int8u & 0xf8 30.1 AELockButton int8u & 0xf8 31.1 FuncButtonPlusDials int8u & 0x70 31.2 PreviewButtonPlusDials int8u & 0x07 32.1 AELockButtonPlusDials int8u & 0x70 33.1 CommandDialsReverseRotation int8u & 0x80 33.2 CommandDialsChangeMainSub int8u & 0x40 33.3 CommandDialsApertureSetting int8u & 0x20 33.4 CommandDialsMenuAndPlayback int8u & 0x10 33.5 ReverseIndicators int8u & 0x08 33.6 PhotoInfoPlayback int8u & 0x04 33.7 NoMemoryCard int8u & 0x02 33.8 ReleaseButtonToUseDial int8u & 0x01

NikonCustom SettingsD800 Tags

Custom settings for the D800 and D800E.

Index1 Tag Name Writable —— ——– ——– 12.1 AutoBracketingSet int8u & 0xe0 12.2 AutoBracketOrder int8u & 0x10 12.3 AutoBracketingMode int8u & 0x0c 22.1 FlashSyncSpeed int8u & 0xf0 22.2 FlashShutterSpeed int8u & 0x0f 23.1 FlashControlBuilt-in int8u & 0xc0 23.2 ManualFlashOutput int8u & 0x1f 24.1 RepeatingFlashOutput int8u & 0x70 24.2 RepeatingFlashCount int8u & 0x0f 25.1 RepeatingFlashRate int8u & 0xf0 25.2 CommanderChannel int8u & 0x03 27.1 CommanderInternalFlash int8u & 0xc0 27.2 CommanderInternalManualOutput int8u & 0x1f 28.1 CommanderGroupAMode int8u & 0xc0 28.2 CommanderGroupAManualOutput int8u & 0x1f 29.1 CommanderGroupBMode int8u & 0xc0 29.2 CommanderGroupBManualOutput int8u & 0x1f 30.1 ModelingFlash int8u & 0x20 30.2 CommanderInternalTTLComp int8u & 0x1f 31.1 CommanderGroupA_TTL-AAComp int8u & 0x1f 32.1 CommanderGroupB_TTL-AAComp int8u & 0x1f

NikonCustom SettingsD810 Tags

Custom settings for the D810.

Index1 Tag Name Writable —— ——– ——– 0.1 LightSwitch int8u & 0x08 0.2 CustomSettingsBank int8u & 0x03 1.1 AF-CPrioritySelection int8u & 0xc0 1.2 AF-SPrioritySelection int8u & 0x20 1.3 AFPointSelection int8u & 0x10 1.4 FocusTrackingLockOn int8u & 0x07 2.1 AFActivation int8u & 0x80 2.2 FocusPointWrap int8u & 0x08 2.3 AFPointBrightness int8u & 0x06 2.4 AFAssist int8u & 0x01 3.1 BatteryOrder int8u & 0x40 3.2 MB-D12BatteryType int8u & 0x03 4.1 Pitch int8u & 0x40 4.2 NoMemoryCard int8u & 0x20 4.3 ISODisplay int8u & 0x0c 4.4 GridDisplay int8u & 0x02 5.1 ShootingInfoDisplay int8u & 0xc0 5.2 LCDIllumination int8u & 0x20 5.3 ElectronicFront-CurtainShutter int8u & 0x08 5.4 ScreenTips int8u & 0x04 5.5 Beep int8u & 0x03 6.1 ReverseIndicators int8u & 0x80 6.2 CommandDialsReverseRotation int8u & 0x18 6.3 EasyExposureCompensation int8u & 0x03 7.1 ExposureControlStepSize int8u & 0xc0 7.2 ISOStepSize int8u & 0x30 7.3 ExposureCompStepSize int8u & 0x0c 8.1 CenterWeightedAreaSize int8u & 0xe0 8.2 FineTuneOptMatrixMetering int8u & 0x0f 9.1 FineTuneOptCenterWeighted int8u & 0xf0 9.2 FineTuneOptSpotMetering int8u & 0x0f 10.1 MultiSelectorShootMode int8u & 0xc0 10.2 MultiSelectorPlaybackMode int8u & 0x30 10.3 MultiSelector int8u & 0x01 11.1 ExposureDelayMode int8u & 0xc0 11.2 CLModeShootingSpeed int8u & 0x0f 12.1 MaxContinuousRelease int8u 13.1 AutoBracketSet int8u & 0xe0 13.2 AutoBracketOrder int8u & 0x10 13.3 AutoBracketModeM int8u & 0x0c 14.1 FuncButton int8u & 0x1f 15.1 PreviewButton int8u & 0x1f 16.1 AssignBktButton int8u & 0x07 17.1 AELockButton int8u & 0x1f 18.1 CommandDialsChangeMainSub int8u & 0xe0 18.2 CommandDialsMenuAndPlayback int8u & 0x18 18.3 CommandDialsApertureSetting int8u & 0x04 18.4 ShutterReleaseButtonAE-L int8u & 0x02 18.5 ReleaseButtonToUseDial int8u & 0x01 19.1 StandbyTimer int8u & 0xf0 20.1 SelfTimerTime int8u & 0xc0 20.2 SelfTimerShotInterval int8u & 0x30 20.3 SelfTimerShotCount int8u & 0x0f 21.1 ImageReviewMonitorOffTime int8u & 0xe0 21.2 LiveViewMonitorOffTime int8u & 0x1c 22.1 MenuMonitorOffTime int8u & 0xe0 22.2 ShootingInfoMonitorOffTime int8u & 0x1c 23.1 FlashSyncSpeed int8u & 0xf0 23.2 FlashShutterSpeed int8u & 0x0f 24.1 FlashControlBuilt-in int8u & 0xc0 31.1 ModelingFlash int8u & 0x20 36.1 PlaybackMonitorOffTime int8u & 0xe0 37.1 MultiSelectorLiveView int8u & 0xc0 38.1 ShutterSpeedLock int8u & 0x80 38.2 ApertureLock int8u & 0x40 38.3 MovieShutterButton int8u & 0x20 38.4 FlashExposureCompArea int8u & 0x04 40.1 MovieAELockButtonAssignment int8u & 0x0f 41.1 MovieFunctionButton int8u & 0x70 41.2 MoviePreviewButton int8u & 0x07 42.1 FuncButtonPlusDials int8u & 0x0f 43.1 PreviewButtonPlusDials int8u & 0x0f 44.1 AELockButtonPlusDials int8u & 0x0f 45.1 AssignMovieRecordButton int8u & 0x0f 46.1 FineTuneOptHighlightWeighted int8u & 0x0f 47.1 DynamicAreaAFDisplay int8u & 0x80 47.2 AFPointIllumination int8u & 0x40 47.3 StoreByOrientation int8u & 0x18 47.4 GroupAreaAFIllumination int8u & 0x04 48.1 MatrixMetering int8u & 0x80 48.2 LiveViewButtonOptions int8u & 0x30 48.3 AFModeRestrictions int8u & 0x03 49.1 LimitAFAreaModeSelection int8u & 0x7e 50.1 AF-OnForMB-D12 int8u & 0x07 51.1 AssignRemoteFnButton int8u & 0x1f 52.1 LensFocusFunctionButtons int8u & 0x3f

NikonCustom SettingsD850 Tags

Custom settings for the D850.

Index1 Tag Name Writable —— ——– ——– 0.2 CustomSettingsBank int8u & 0x03 1.1 AF-CPrioritySelection int8u & 0xc0 1.2 AF-SPrioritySelection int8u & 0x20 1.3 AFPointSelection int8u & 0x10 1.4 Three-DTrackingFaceDetection int8u & 0x08 1.5 BlockShotAFResponse int8u & 0x07 2.1 FocusPointWrap int8u & 0x08 2.2 AFPointBrightness int8u & 0x06 4.1 ISODisplay int8u & 0x08 4.2 GridDisplay int8u & 0x02 5.1 LCDIllumination int8u & 0x20 5.2 ElectronicFront-CurtainShutter int8u & 0x08 6.1 ReverseIndicators int8u & 0x80 6.2 CommandDialsReverseRotation int8u & 0x18 6.3 EasyExposureCompensation int8u & 0x03 7.1 ExposureControlStepSize int8u & 0xc0 7.2 ISOStepSize int8u & 0x30 7.3 ExposureCompStepSize int8u & 0x0c 8.1 CenterWeightedAreaSize int8u & 0xe0 8.2 FineTuneOptMatrixMetering int8u & 0x0f 9.1 FineTuneOptCenterWeighted int8u & 0xf0 9.2 FineTuneOptSpotMetering int8u & 0x0f 10.1 MultiSelectorShootMode int8u & 0xe0 10.2 MultiSelectorPlaybackMode int8u & 0x0c 10.3 MultiSelector int8u & 0x01 11.1 ExposureDelayMode int8u & 0xe0 11.2 CLModeShootingSpeed int8u & 0x0f 12.1 MaxContinuousRelease int8u 13.1 AutoBracketOrder int8u & 0x10 13.2 AutoBracketModeM int8u & 0x0c 14.1 Func1Button int8u & 0x3f 15.1 PreviewButton int8u & 0x3f 16.1 AssignBktButton int8u & 0x07 18.1 CommandDialsChangeMainSub int8u & 0xe0 18.2 CommandDialsMenuAndPlayback int8u & 0x18 18.3 CommandDialsApertureSetting int8u & 0x04 18.4 ReleaseButtonToUseDial int8u & 0x01 19.1 StandbyTimer int8u & 0xf0 20.1 SelfTimerTime int8u & 0xc0 20.2 SelfTimerShotInterval int8u & 0x30 20.3 SelfTimerShotCount int8u & 0x0f 21.1 ImageReviewMonitorOffTime int8u & 0xe0 21.2 LiveViewMonitorOffTime int8u & 0x1c 22.1 MenuMonitorOffTime int8u & 0xe0 22.2 ShootingInfoMonitorOffTime int8u & 0x1c 23.1 FlashSyncSpeed int8u & 0xf0 23.2 FlashShutterSpeed int8u & 0x0f 31.1 ModelingFlash int8u & 0x20 36.1 PlaybackMonitorOffTime int8u & 0xe0 37.1 MultiSelectorLiveView int8u & 0xc0 38.1 ShutterSpeedLock int8u & 0x80 38.2 ApertureLock int8u & 0x40 38.3 MovieShutterButton int8u & 0x10 38.4 FlashExposureCompArea int8u & 0x04 38.5 AutoFlashISOSensitivity int8u & 0x02 41.1 MovieFunc1Button int8u & 0xf0 41.2 MoviePreviewButton int8u & 0x0f 42.1 Func1ButtonPlusDials int8u & 0x0f 43.1 PreviewButtonPlusDials int8u & 0x0f 45.1 AssignMovieRecordButtonPlusDials int8u & 0x0f 46.1 FineTuneOptHighlightWeighted int8u & 0x0f 47.1 DynamicAreaAFDisplay int8u & 0x80 47.2 AFPointIllumination int8u & 0x40 47.3 StoreByOrientation int8u & 0x18 48.1 MatrixMetering int8u & 0x80 48.2 LiveViewButtonOptions int8u & 0x30 48.3 AFModeRestrictions int8u & 0x03 49.1 LimitAFAreaModeSelection int8u & 0x7e 52.1 LensFocusFunctionButtons int8u & 0x3f 66.1 VerticalMultiSelector int8u & 0xff 67.1 AssignMB-D18FuncButton int8u & 0x3f 68.1 AssignMB-D18FuncButtonPlusDials int8u & 0x0f 70.1 AF-OnButton int8u & 0x3f 71.1 SubSelector int8u & 0x80 72.1 SubSelectorCenter int8u & 0x3f 73.1 SubSelectorPlusDials int8u & 0x0f 74.1 AssignMovieSubselector int8u & 0xf0 75.1 AssignMovieFunc1ButtonPlusDials int8u & 0x10 75.2 AssignMoviePreviewButtonPlusDials int8u & 0x01 76.1 AssignMovieSubselectorPlusDials int8u & 0x10 77.1 SyncReleaseMode int8u & 0x80 77.2 ContinuousModeLiveView int8u & 0x40 78.1 Three-DTrackingWatchArea int8u & 0x80 78.2 SubjectMotion int8u & 0x60 78.3 AFActivation int8u & 0x08 78.4 ShutterReleaseButtonAE-L int8u & 0x03 79.1 AssignMB-D18AF-OnButton int8u & 0x7f 80.1 Func2Button int8u & 0x3f 82.1 AssignMovieFunc2Button int8u & 0x70

NikonCustom SettingsD5000 Tags

Custom settings for the D5000.

Index1 Tag Name Writable —— ——– ——– 0.1 AFAreaModeSetting int8u & 0x60 0.2 AFAssist int8u & 0x01 2.1 Beep int8u & 0xc0 2.2 GridDisplay int8u & 0x02 2.3 ISODisplay int8u & 0x08 2.4 NoMemoryCard int8u & 0x20 3.1 FileNumberSequence int8u & 0x08 4.1 RangeFinder int8u & 0x10 4.2 DateImprint int8u & 0x08 4.3 ReverseIndicators int8u & 0x80 5.1 EVStepSize int8u & 0x40 9.1 ExposureDelayMode int8u & 0x40 11.1 AutoBracketSet int8u & 0xc0 12.1 TimerFunctionButton int8u & 0x38 15.1 AELockButton int8u & 0x38 16.1 ShutterReleaseButtonAE-L int8u & 0x02 16.2 CommandDialsReverseRotation int8u & 0x80 17.1 MeteringTime int8u & 0x70 17.2 RemoteOnDuration int8u & 0x03 18.1 SelfTimerTime int8u & 0xc0 18.2 SelfTimerShotCount int8u & 0x1e 19.1 ImageReviewTime int8u & 0xe0 20.1 PlaybackMenusTime int8u & 0xe0 22.1 InternalFlash int8u & 0xc0 22.2 ManualFlashOutput int8u & 0x1f 32.1 LiveViewAF int8u & 0x60

NikonCustom SettingsD5100 Tags

Custom settings for the D5100.

Index1 Tag Name Writable —— ——– ——– 0.1 AF-CPrioritySelection int8u & 0x80 1.1 AFAssist int8u & 0x01 3.1 Beep int8u & 0xc0 3.2 NoMemoryCard int8u & 0x20 3.3 ISODisplay int8u & 0x08 4.1 FileNumberSequence int8u & 0x08 5.1 RangeFinder int8u & 0x10 5.2 ReverseIndicators int8u & 0x80 6.1 EVStepSize int8u & 0x40 10.1 ExposureDelayMode int8u & 0x40 12.1 AutoBracketSet int8u & 0xc0 13.1 TimerFunctionButton int8u & 0x38 16.1 AELockButton int8u & 0x38 17.1 ShutterReleaseButtonAE-L int8u & 0x02 17.2 CommandDialsReverseRotation int8u & 0x80 18.1 MeteringTime int8u & 0x70 18.2 RemoteOnDuration int8u & 0x03 19.1 SelfTimerTime int8u & 0xc0 19.2 SelfTimerShotCount int8u & 0x0f 20.1 ImageReviewTime int8u & 0xe0 20.2 LiveViewMonitorOffTime int8u & 0x1c 21.1 PlaybackMenusTime int8u & 0xe0 23.1 ManualFlashOutput int8u & 0x1f

NikonCustom SettingsD5200 Tags

Custom settings for the D5200.

Index1 Tag Name Writable —— ——– ——– 0.1 AF-CPrioritySelection int8u & 0x80 0.2 NumberOfFocusPoints int8u & 0x10 1.1 AFAssist int8u & 0x01 3.1 Beep int8u & 0xc0 3.2 NoMemoryCard int8u & 0x20 3.3 ISODisplay int8u & 0x08 4.1 FileNumberSequence int8u & 0x08 5.1 RangeFinder int8u & 0x04 5.2 ReverseExposureCompDial int8u & 0x10 5.3 ReverseShutterSpeedAperture int8u & 0x08 5.4 ReverseIndicators int8u & 0x80 6.1 EVStepSize int8u & 0x40 10.1 ExposureDelayMode int8u & 0x40 12.1 AutoBracketSet int8u & 0xc0 13.1 FunctionButton int8u & 0x1f 16.1 AELockButton int8u & 0x0f 17.1 ShutterReleaseButtonAE-L int8u & 0x02 18.1 StandbyTimer int8u & 0xe0 18.2 RemoteOnDuration int8u & 0x03 19.1 SelfTimerTime int8u & 0xc0 19.2 SelfTimerShotCount int8u & 0x0f 20.1 ImageReviewTime int8u & 0xe0 20.2 LiveViewMonitorOffTime int8u & 0x1c 21.1 PlaybackMenusTime int8u & 0xe0 23.1 InternalFlash int8u & 0xc0 23.2 ManualFlashOutput int8u & 0x1f

NikonCustom SettingsD7000 Tags

Custom settings for the D7000.

Index1 Tag Name Writable —— ——– ——– 0.1 AF-CPrioritySelection int8u & 0x80 0.2 AF-SPrioritySelection int8u & 0x20 0.3 NumberOfFocusPoints int8u & 0x10 0.4 FocusTrackingLockOn int8u & 0x07 1.1 FocusPointWrap int8u & 0x08 1.2 AFPointIllumination int8u & 0x06 1.3 AFAssist int8u & 0x01 2.1 BatteryOrder int8u & 0x40 2.2 AF-OnForMB-D11 int8u & 0x1c 2.3 MB-D11BatteryType int8u & 0x03 3.1 BeepPitch int8u & 0xc0 3.2 NoMemoryCard int8u & 0x20 3.3 ISODisplay int8u & 0x0c 3.4 GridDisplay int8u & 0x02 3.5 ViewfinderWarning int8u & 0x01 4.1 ShootingInfoDisplay int8u & 0xc0 4.2 LCDIllumination int8u & 0x20 4.3 FileNumberSequence int8u & 0x08 4.4 ScreenTips int8u & 0x04 4.5 BeepVolume int8u & 0x03 5.1 ReverseIndicators int8u & 0x80 5.2 EasyExposureCompensation int8u & 0x03 6.1 ExposureControlStep int8u & 0x40 6.2 ISOSensitivityStep int8u & 0x10 7.1 CenterWeightedAreaSize int8u & 0xe0 10.1 ExposureDelayMode int8u & 0x40 10.2 CLModeShootingSpeed int8u & 0x07 11 MaxContinuousRelease int8u 12.1 AutoBracketSet int8u & 0xe0 12.2 AutoBracketOrder int8u & 0x10 13.1 FuncButton int8u & 0xf8 14.1 PreviewButton int8u & 0xf8 15.1 OKButton int8u & 0x18 16.1 AELockButton int8u & 0x38 17.1 CommandDialsReverseRotation int8u & 0x80 17.2 CommandDialsChangeMainSub int8u & 0x60 17.3 CommandDialsApertureSetting int8u & 0x04 17.4 CommandDialsMenuAndPlayback int8u & 0x18 17.5 ShutterReleaseButtonAE-L int8u & 0x02 17.6 ReleaseButtonToUseDial int8u & 0x01 18.1 MeteringTime int8u & 0xf0 18.2 RemoteOnDuration int8u & 0x03 19.1 SelfTimerTime int8u & 0xc0 19.2 SelfTimerInterval int8u & 0x30 19.3 SelfTimerShotCount int8u & 0x0f 20.1 ImageReviewTime int8u & 0xe0 20.2 LiveViewMonitorOffTime int8u & 0x1c 21.1 MenuMonitorOffTime int8u & 0xe0 21.2 ShootingInfoMonitorOffTime int8u & 0x1c 22.1 FlashSyncSpeed int8u & 0xf0 22.2 FlashShutterSpeed int8u & 0x0f 23.1 FlashControlBuilt-in int8u & 0xc0 23.2 ManualFlashOutput int8u & 0x1f 24.1 RepeatingFlashOutput int8u & 0x70 24.2 RepeatingFlashCount int8u & 0x0f 25.1 RepeatingFlashRate int8u & 0xf0 26.1 CommanderInternalTTLCompBuiltin int8u & 0x1f 27.1 CommanderInternalTTLCompGroupA int8u & 0x1f 28.1 CommanderInternalTTLCompGroupB int8u & 0x1f 30.1 FlashWarning int8u & 0x80 30.2 ModelingFlash int8u & 0x20 34.1 LiveViewAFAreaMode int8u & 0x60 34.2 LiveViewAFMode int8u & 0x02 35.1 PlaybackMonitorOffTime int8u & 0xe0

NikonCustom SettingsD4 Tags

Custom settings for the D4 and D4S.

Index1 Tag Name Writable —— ——– ——– 0.1 CustomSettingsBank int8u & 0x03 1.1 AF-CPrioritySelection int8u & 0xc0 1.2 AF-SPrioritySelection int8u & 0x20 1.3 AFPointSelection int8u & 0x10 1.4 FocusTrackingLockOn int8u & 0x07 2.1 AFActivation int8u & 0x80 2.2 FocusPointWrap int8u & 0x08 4.1 Pitch int8u & 0x40 4.2 NoMemoryCard int8u & 0x20 4.3 GridDisplay int8u & 0x02 5.1 ShootingInfoDisplay int8u & 0xc0 5.2 LCDIllumination int8u & 0x20 5.3 ScreenTips int8u & 0x04 5.4 Beep int8u & 0x03 6.1 ReverseIndicators int8u & 0x80 6.2 RearDisplay int8u & 0x40 6.3 ViewfinderDisplay int8u & 0x20 6.4 CommandDialsReverseRotation int8u & 0x18 6.5 EasyExposureCompensation int8u & 0x03 7.1 ExposureControlStepSize int8u & 0xc0 7.2 ISOStepSize int8u & 0x30 7.3 ExposureCompStepSize int8u & 0x0c 8.1 CenterWeightedAreaSize int8u & 0xe0 8.2 FineTuneOptMatrixMetering int8u & 0x0f 9.1 FineTuneOptCenterWeighted int8u & 0xf0 9.2 FineTuneOptSpotMetering int8u & 0x0f 10.1 MultiSelectorShootMode int8u & 0xc0 10.2 MultiSelectorPlaybackMode int8u & 0x30 10.3 MultiSelector int8u & 0x01 11.1 ExposureDelayMode int8u & 0xc0 11.2 CHModeShootingSpeed int8u & 0x10 11.3 CLModeShootingSpeed int8u & 0x0f 12 MaxContinuousRelease int8u 13.1 AutoBracketSet int8u & 0xe0 13.2 AutoBracketOrder int8u & 0x10 13.3 AutoBracketModeM int8u & 0x0c 14.1 FuncButton int8u & 0xf8 14.2 FuncButtonPlusDials int8u & 0x07 15.1 PreviewButton int8u & 0xf8 15.2 PreviewButtonPlusDials int8u & 0x07 16.1 AssignBktButton int8u & 0x07 18.1 CommandDialsChangeMainSub int8u & 0xe0 18.2 CommandDialsMenuAndPlayback int8u & 0x18 18.3 CommandDialsApertureSetting int8u & 0x04 18.4 ShutterReleaseButtonAE-L int8u & 0x02 18.5 ReleaseButtonToUseDial int8u & 0x01 19.1 StandbyTimer int8u & 0xf0 20.1 SelfTimerTime int8u & 0xc0 20.2 SelfTimerShotCount int8u & 0x0f 20.3 SelfTimerShotInterval int8u & 0x30 21.1 ImageReviewMonitorOffTime int8u & 0xe0 21.2 LiveViewMonitorOffTime int8u & 0x1c 22.1 MenuMonitorOffTime int8u & 0xe0 22.2 ShootingInfoMonitorOffTime int8u & 0x1c 23.1 FlashSyncSpeed int8u & 0xf0 23.2 FlashShutterSpeed int8u & 0x0f 31.1 ModelingFlash int8u & 0x20 36.1 PlaybackMonitorOffTime int8u & 0xe0 37.1 PlaybackZoom int8u & 0x01 38.1 ShutterSpeedLock int8u & 0x80 38.2 ApertureLock int8u & 0x40 38.3 MovieShutterButton int8u & 0x30 38.4 FlashExposureCompArea int8u & 0x04 41.1 MovieFunctionButton int8u & 0x70 41.2 MoviePreviewButton int8u & 0x07 42.1 VerticalMultiSelector int8u & 0x60 42.2 VerticalFuncButton int8u & 0x1f 43.1 VerticalFuncButtonPlusDials int8u & 0xf0 43.2 AssignMovieRecordButton int8u & 0x07 46.1 DynamicAreaAFDisplay int8u & 0x80 46.2 AFPointIllumination int8u & 0x60 46.3 StoreByOrientation int8u & 0x18 46.4 GroupAreaAFIllumination int8u & 0x04 46.5 AFPointBrightness int8u & 0x03 47.1 AFOnButton int8u & 0x70 47.2 VerticalAFOnButton int8u & 0x07 48.1 SubSelectorAssignment int8u & 0x80 48.2 MovieSubSelectorAssignment int8u & 0x07 49.1 SubSelector int8u & 0xf8 49.2 SubSelectorPlusDials int8u & 0x07 50.1 MatrixMetering int8u & 0x80 50.2 LiveViewButtonOptions int8u & 0x30 50.3 AFModeRestrictions int8u & 0x03 51.1 LimitAFAreaModeSelection int8u & 0x7e 52.1 MovieFunctionButtonPlusDials int8u & 0x10 52.2 MoviePreviewButtonPlusDials int8u & 0x01 53.1 MovieSubSelectorAssignmentPlusDials int8u & 0x10 54.1 AssignRemoteFnButton int8u & 0x1f 55.1 LensFocusFunctionButtons int8u & 0x3f

NikonCustom SettingsD5 Tags

Custom settings for the D5.

Index1 Tag Name Writable —— ——– ——– 0.1 CustomSettingsBank int8u & 0x03 1.1 AF-CPrioritySelection int8u & 0xc0 1.2 AF-SPrioritySelection int8u & 0x20 1.3 NumberOfFocusPoints int8u & 0x10 1.4 Three-DTrackingFaceDetection int8u & 0x08 1.5 BlockShotAFResponse int8u & 0x07 2.1 FocusPointWrap int8u & 0x08 2.2 AFPointBrightness int8u & 0x06 4.1 ISODisplay int8u & 0x08 4.2 GridDisplay int8u & 0x02 5.1 LCDIllumination int8u & 0x20 5.2 ElectronicFront-CurtainShutter int8u & 0x08 6.1 ReverseIndicators int8u & 0x80 6.2 CommandDialsReverseRotation int8u & 0x18 6.3 EasyExposureCompensation int8u & 0x03 7.1 ExposureControlStepSize int8u & 0xc0 7.2 ISOStepSize int8u & 0x30 7.3 ExposureCompStepSize int8u & 0x0c 8.1 CenterWeightedAreaSize int8u & 0xe0 8.2 FineTuneOptMatrixMetering int8u & 0x0f 9.1 FineTuneOptCenterWeighted int8u & 0xf0 9.2 FineTuneOptSpotMetering int8u & 0x0f 10.1 MultiSelectorShootMode int8u & 0xe0 10.3 MultiSelector int8u & 0x01 11.1 ExposureDelayMode int8u & 0xc0 11.2 CLModeShootingSpeed int8u & 0x0f 12.1 MaxContinuousRelease int8u 13.1 AutoBracketOrder int8u & 0x10 13.2 AutoBracketModeM int8u & 0x0c 14.1 Func1Button int8u & 0x3f 15.1 PreviewButton int8u & 0x3f 16.1 AssignBktButton int8u & 0x07 18.1 CommandDialsChangeMainSub int8u & 0xe0 18.2 CommandDialsMenuAndPlayback int8u & 0x18 18.3 CommandDialsApertureSetting int8u & 0x04 18.4 ReleaseButtonToUseDial int8u & 0x01 19.1 StandbyTimer int8u & 0xf0 20.1 SelfTimerTime int8u & 0xc0 20.2 SelfTimerShotInterval int8u & 0x30 20.3 SelfTimerShotCount int8u & 0x0f 21.1 ImageReviewMonitorOffTime int8u & 0xe0 21.2 LiveViewMonitorOffTime int8u & 0x1c 22.1 MenuMonitorOffTime int8u & 0xe0 22.2 ShootingInfoMonitorOffTime int8u & 0x1c 23.1 FlashSyncSpeed int8u & 0xf0 23.2 FlashShutterSpeed int8u & 0x0f 31.1 ModelingFlash int8u & 0x20 36.1 PlaybackMonitorOffTime int8u & 0xe0 37.1 MultiSelectorLiveView int8u & 0xc0 38.1 ShutterSpeedLock int8u & 0x80 38.2 ApertureLock int8u & 0x40 38.3 MovieShutterButton int8u & 0x10 38.4 FlashExposureCompArea int8u & 0x04 38.5 AutoFlashISOSensitivity int8u & 0x02 41.1 MovieFunc1Button int8u & 0xf0 41.2 MoviePreviewButton int8u & 0x0f 42.1 Func1ButtonPlusDials int8u & 0x0f 43.1 PreviewButtonPlusDials int8u & 0x0f 45.1 AssignMovieRecordButtonPlusDials int8u & 0x0f 46.1 FineTuneOptHighlightWeighted int8u & 0x0f 47.1 DynamicAreaAFDisplay int8u & 0x80 47.2 AFPointIllumination int8u & 0x40 47.3 StoreByOrientation int8u & 0x18 48.1 MatrixMetering int8u & 0x80 48.2 LiveViewButtonOptions int8u & 0x30 48.3 AFModeRestrictions int8u & 0x03 49.1 LimitAFAreaModeSelection int8u & 0x7e 52.1 LensFocusFunctionButtons int8u & 0x3f 66.1 VerticalMultiSelector int8u & 0xff 67.1 VerticalFuncButton int8u & 0x3f 68.1 VerticalFuncPlusDials int8u & 0x0f 70.1 AF-OnButton int8u & 0x3f 71.1 SubSelector int8u & 0x80 72.1 SubSelectorCenter int8u & 0x3f 73.1 SubSelectorPlusDials int8u & 0x0f 74.1 AssignMovieSubselector int8u & 0xf0 75.1 AssignMovieFunc1ButtonPlusDials int8u & 0x10 75.2 AssignMoviePreviewButtonPlusDials int8u & 0x01 76.1 AssignMovieSubselectorPlusDials int8u & 0x10 77.1 SyncReleaseMode int8u & 0x80 78.1 Three-DTrackingWatchArea int8u & 0x80 78.2 SubjectMotion int8u & 0x60 78.3 AFActivation int8u & 0x08 78.4 ShutterReleaseButtonAE-L int8u & 0x03 79.1 VerticalAFOnButton int8u & 0x7f 80.1 Func2Button int8u & 0x3f 81.1 Func2ButtonPlusDials int8u & 0x0f 82.1 AssignMovieFunc2Button int8u & 0x70 83.1 Func3Button int8u & 0x03

NikonCustom SettingsD500 Tags

Custom settings for the D500.

Index1 Tag Name Writable —— ——– ——– 0.1 CustomSettingsBank int8u & 0x03 1.1 AF-CPrioritySelection int8u & 0xc0 1.2 AF-SPrioritySelection int8u & 0x20 1.3 NumberOfFocusPoints int8u & 0x10 1.4 Three-DTrackingFaceDetection int8u & 0x08 1.5 BlockShotAFResponse int8u & 0x07 2.1 FocusPointWrap int8u & 0x08 2.2 AFPointBrightness int8u & 0x06 4.1 ISODisplay int8u & 0x08 4.2 GridDisplay int8u & 0x02 5.1 LCDIllumination int8u & 0x20 5.2 ElectronicFront-CurtainShutter int8u & 0x08 6.1 ReverseIndicators int8u & 0x80 6.2 CommandDialsReverseRotation int8u & 0x18 6.3 EasyExposureCompensation int8u & 0x03 7.1 ExposureControlStepSize int8u & 0xc0 7.2 ISOStepSize int8u & 0x30 7.3 ExposureCompStepSize int8u & 0x0c 8.1 CenterWeightedAreaSize int8u & 0xe0 8.2 FineTuneOptMatrixMetering int8u & 0x0f 9.1 FineTuneOptCenterWeighted int8u & 0xf0 9.2 FineTuneOptSpotMetering int8u & 0x0f 10.1 MultiSelectorShootMode int8u & 0xe0 10.2 MultiSelectorPlaybackMode int8u & 0x0c 10.3 MultiSelector int8u & 0x01 11.1 ExposureDelayMode int8u & 0xc0 11.2 CLModeShootingSpeed int8u & 0x0f 12.1 MaxContinuousRelease int8u 13.1 AutoBracketOrder int8u & 0x10 13.2 AutoBracketModeM int8u & 0x0c 14.1 Func1Button int8u & 0x3f 15.1 PreviewButton int8u & 0x3f 16.1 AssignBktButton int8u & 0x07 18.1 CommandDialsChangeMainSub int8u & 0xe0 18.2 CommandDialsMenuAndPlayback int8u & 0x18 18.3 CommandDialsApertureSetting int8u & 0x04 18.4 ReleaseButtonToUseDial int8u & 0x01 19.1 StandbyTimer int8u & 0xf0 20.1 SelfTimerTime int8u & 0xc0 20.2 SelfTimerShotInterval int8u & 0x30 20.3 SelfTimerShotCount int8u & 0x0f 21.1 ImageReviewMonitorOffTime int8u & 0xe0 21.2 LiveViewMonitorOffTime int8u & 0x1c 22.1 MenuMonitorOffTime int8u & 0xe0 22.2 ShootingInfoMonitorOffTime int8u & 0x1c 23.1 FlashSyncSpeed int8u & 0xf0 23.2 FlashShutterSpeed int8u & 0x0f 31.1 ModelingFlash int8u & 0x20 36.1 PlaybackMonitorOffTime int8u & 0xe0 37.1 MultiSelectorLiveView int8u & 0xc0 38.1 ShutterSpeedLock int8u & 0x80 38.2 ApertureLock int8u & 0x40 38.3 MovieShutterButton int8u & 0x10 38.4 FlashExposureCompArea int8u & 0x04 38.5 AutoFlashISOSensitivity int8u & 0x02 41.1 MovieFunc1Button int8u & 0xf0 41.2 MoviePreviewButton int8u & 0x0f 42.1 Func1ButtonPlusDials int8u & 0x0f 43.1 PreviewButtonPlusDials int8u & 0x0f 45.1 AssignMovieRecordButtonPlusDials int8u & 0x0f 46.1 FineTuneOptHighlightWeighted int8u & 0x0f 47.1 DynamicAreaAFDisplay int8u & 0x80 47.2 AFPointIllumination int8u & 0x40 47.3 StoreByOrientation int8u & 0x18 47.4 GroupAreaAFIllumination int8u & 0x04 48.1 MatrixMetering int8u & 0x80 48.2 LiveViewButtonOptions int8u & 0x30 48.3 AFModeRestrictions int8u & 0x03 49.1 LimitAFAreaModeSelection int8u & 0x7e 52.1 LensFocusFunctionButtons int8u & 0x3f 66.1 VerticalMultiSelector int8u & 0xff 67.1 AssignMB-D17FuncButton int8u & 0x3f 68.1 AssignMB-D17FuncButtonPlusDials int8u & 0x0f 70.1 AF-OnButton int8u & 0x3f 71.1 SubSelector int8u & 0x80 72.1 SubSelectorCenter int8u & 0x3f 73.1 SubSelectorPlusDials int8u & 0x0f 74.1 AssignMovieSubselector int8u & 0xf0 75.1 AssignMovieFunc1ButtonPlusDials int8u & 0x10 75.2 AssignMoviePreviewButtonPlusDials int8u & 0x01 76.1 AssignMovieSubselectorPlusDials int8u & 0x10 77.1 SyncReleaseMode int8u & 0x80 78.1 Three-DTrackingWatchArea int8u & 0x80 78.2 SubjectMotion int8u & 0x60 78.3 AFActivation int8u & 0x08 78.4 ShutterReleaseButtonAE-L int8u & 0x03 79.1 AssignMB-D17AF-OnButton int8u & 0x7f 80.1 Func2Button int8u & 0x3f 82.1 AssignMovieFunc2Button int8u & 0x70

NikonCustom SettingsD610 Tags

Custom settings for the D610.

Index1 Tag Name Writable —— ——– ——– 0.1 AF-CPrioritySelection int8u & 0x80 0.2 AF-SPrioritySelection int8u & 0x20 0.3 NumberOfFocusPoints int8u & 0x10 0.4 FocusTrackingLockOn int8u & 0x07 1.1 FocusPointWrap int8u & 0x08 1.2 AFPointIllumination int8u & 0x06 1.3 AFAssist int8u & 0x01 5.1 EasyExposureCompensation int8u & 0x03 6.1 ExposureControlStep int8u & 0x40 6.2 ISOSensitivityStep int8u & 0x10 7.1 CenterWeightedAreaSize int8u & 0xe0 7.2 FineTuneOptMatrixMetering int8u & 0x0f 8.1 FineTuneOptCenterWeighted int8u & 0xf0 8.2 FineTuneOptSpotMetering int8u & 0x0f 17.1 ShutterReleaseButtonAE-L int8u & 0x02 18.1 StandbyTimer int8u & 0xf0 18.2 RemoteOnDuration int8u & 0x03 19.1 SelfTimerTime int8u & 0xc0 19.2 SelfTimerShotInterval int8u & 0x30 19.3 SelfTimerShotCount int8u & 0x0f 20.1 ImageReviewMonitorOffTime int8u & 0xe0 20.2 LiveViewMonitorOffTime int8u & 0x1c 21.1 MenuMonitorOffTime int8u & 0xe0 21.2 ShootingInfoMonitorOffTime int8u & 0x1c 35.1 PlaybackMonitorOffTime int8u & 0xe0

NikonCustom SettingsZ8 Tags

Custom settings for the Z8.

Index1 Tag Name Writable —— ——– ——– 1 CustomSettingsBank int8u 3 AF-CPrioritySelection int8u 5 AF-SPrioritySelection int8u 7 BlockShotAFResponse int8u 11 AFPointSel int8u 13 StoreByOrientation int8u 15 AFActivation int8u 16 AF-OnOutOfFocusRelease? int8u 17 LimitAF-AreaModeSelPinpoint? int8u 19 LimitAF-AreaModeSelWideAF_S? int8u 20 LimitAF-AreaModeSelWideAF_L? int8u 21 LimitAFAreaModeSelAuto? int8u 22 FocusPointWrap? int8u 23 ManualFocusPointIllumination? int8u 24 DynamicAreaAFAssist? int8u 25 AF-AssistIlluminator int8u 26 ManualFocusRingInAFMode int8u 27 ExposureControlStepSize int8u 29 EasyExposureCompensation int8u 31 CenterWeightedAreaSize int8u 33 FineTuneOptMatrixMetering int8s 35 FineTuneOptCenterWeighted int8s 37 FineTuneOptSpotMetering int8s 39 FineTuneOptHighlightWeighted int8s 41 ShutterReleaseButtonAE-L int8u 43 SelfTimerTime int8u 45 SelfTimerShotCount int8u 49 SelfTimerShotInterval int8u 51 PlaybackMonitorOffTime int8u 53 MenuMonitorOffTime int8u 55 ShootingInfoMonitorOffTime int8u 57 ImageReviewMonitorOffTime int8u 59 CLModeShootingSpeed int8u 61 MaxContinuousRelease no 65 SyncReleaseMode? int8u 69 LimitSelectableImageAreaDX? int8u 70 LimitSelectableImageArea1To1? int8u 71 LimitSelectableImageArea16To9? int8u 72 FileNumberSequence int8u 73 FocusPeakingLevel? int8u 75 FocusPeakingHighlightColor? int8u 81 ContinuousModeDisplay int8u 83 FlashSyncSpeed no 85 HighSpeedSync int8u 87 FlashShutterSpeed no 89 FlashExposureCompArea int8u 91 AutoFlashISOSensitivity int8u 93 ModelingFlash int8u 95 AutoBracketModeM int8u 97 AutoBracketOrder int8u 99 Func1Button int8u 115 Func2Button int8u 131 AFOnButton int8u 143 SubSelector? int8u 155 AssignMovieRecordButton? int8u 159 LensFunc1Button int8u 167 LensFunc2Button int8u 173 LensControlRing int8u 175 MultiSelectorShootMode int8u 179 MultiSelectorPlaybackMode int8u 183 ShutterSpeedLock int8u 184 ApertureLock int8u 186 CmdDialsReverseRotation int8u 191 UseDialWithoutHold? int8u 193 ReverseIndicators? int8u 195 MovieFunc1Button int8u 199 MovieFunc2Button int8u 203 MovieAF-OnButton int8u 215 MovieLensControlRing int8u 217 MovieMultiSelector? int8u 221 MovieAFSpeed int8u 223 MovieAFSpeedApply int8u 225 MovieAFTrackingSensitivity int8u 257 LCDIllumination? int8u 258 ExtendedShutterSpeeds int8u 259 SubjectMotion int8u 261 FocusPointPersistence int8u 263 AutoFocusModeRestrictions? int8u 267 CHModeShootingSpeed int8u 273 FlashBurstPriority? int8u 335 LimitAF-AreaModeSelDynamic_S? int8u 336 LimitAF-AreaModeSelDynamic_M? int8u 337 LimitAF-AreaModeSelDynamic_L? int8u 339 LimitAF-AreaModeSel3DTracking? int8u 341 PlaybackFlickUp? int8u 345 PlaybackFlickDown? int8u 349 ISOStepSize int8u 355 ReverseFocusRing int8u 356 EVFImageFrame? int8u 357 EVFGrid? int8u 359 VirtualHorizonStyle? int8u 421 Func1ButtonPlaybackMode? int8u 423 Func2ButtonPlaybackMode? int8u 437 MovieRecordButtonPlaybackMode? int8u 459 CommandDialPlaybackMode? int8u 463 SubCommandDialPlaybackMode? int8u 467 FocusPointLock? int8u 469 ControlRingResponse int8u 515 MovieAFAreaMode? int8u 529 ZebraPatternToneRange? int8u 531 MovieZebraPattern? int8u 533 MovieHighlightDisplayThreshold? int8u 535 MovieMidtoneDisplayValue? int8u 537 MovieMidtoneDisplayRange? int8u~ 541 MovieEVFGrid? int8u 549 MovieShutterSpeedLock? int8u 550 MovieFocusPointLock? int8u 563 MatrixMetering? int8u 564 AF-CFocusDisplay int8u 565 FocusPeakingDisplay? int8u 567 KeepExposure int8u 585 StarlightView? int8u 587 EVFWarmDisplayMode? int8u 589 EVFWarmDisplayBrightness? int8s 591 EVFReleaseIndicator? int8u 601 MovieApertureLock? int8u 607 FlickAdvanceDirection? int8u 647 PreReleaseBurstLength int8u 649 PostReleaseBurstLength int8u 681 ViewModeShowEffectsOfSettings? int8u 683 DispButton int8u

NikonCustom SettingsZ9 Tags

Custom settings for the Z9.

Index1 Tag Name Writable —— ——– ——– 1 CustomSettingsBank int8u 3 AF-CPrioritySelection int8u 5 AF-SPrioritySelection int8u 7 BlockShotAFResponse int8u 11 AFPointSel int8u 13 StoreByOrientation int8u 15 AFActivation int8u 16 AF-OnOutOfFocusRelease? int8u 17 LimitAF-AreaModeSelPinpoint? int8u 19 LimitAF-AreaModeSelWideAF_S? int8u 20 LimitAF-AreaModeSelWideAF_L? int8u 21 LimitAFAreaModeSelAuto? int8u 22 FocusPointWrap? int8u 23 ManualFocusPointIllumination? int8u 24 DynamicAreaAFAssist? int8u 25 AF-AssistIlluminator int8u 26 ManualFocusRingInAFMode int8u 27 ExposureControlStepSize int8u 29 EasyExposureCompensation int8u 31 CenterWeightedAreaSize int8u 33 FineTuneOptMatrixMetering int8s 35 FineTuneOptCenterWeighted int8s 37 FineTuneOptSpotMetering int8s 39 FineTuneOptHighlightWeighted int8s 41 ShutterReleaseButtonAE-L int8u 43 SelfTimerTime int8u 45 SelfTimerShotCount int8u 49 SelfTimerShotInterval int8u 51 PlaybackMonitorOffTime int8u 53 MenuMonitorOffTime int8u 55 ShootingInfoMonitorOffTime int8u 57 ImageReviewMonitorOffTime int8u 59 CLModeShootingSpeed int8u 61 MaxContinuousRelease no 65 SyncReleaseMode? int8u 69 LimitSelectableImageAreaDX? int8u 70 LimitSelectableImageArea1To1? int8u 71 LimitSelectableImageArea16To9? int8u 72 FileNumberSequence int8u 73 FocusPeakingLevel? int8u 75 FocusPeakingHighlightColor? int8u 81 ContinuousModeDisplay int8u 83 FlashSyncSpeed no 85 HighSpeedSync int8u 87 FlashShutterSpeed no 89 FlashExposureCompArea int8u 91 AutoFlashISOSensitivity int8u 93 ModelingFlash int8u 95 AutoBracketModeM int8u 97 AutoBracketOrder int8u 99 Func1Button int8u 115 Func2Button int8u 131 AFOnButton int8u 143 SubSelector? int8u 155 AssignMovieRecordButton? int8u 159 LensFunc1Button int8u 167 LensFunc2Button int8u 173 LensControlRing int8u 175 MultiSelectorShootMode int8u 179 MultiSelectorPlaybackMode int8u 183 ShutterSpeedLock int8u 184 ApertureLock int8u 186 CmdDialsReverseRotation int8u 191 UseDialWithoutHold? int8u 193 ReverseIndicators? int8u 195 MovieFunc1Button int8u 199 MovieFunc2Button int8u 203 MovieAF-OnButton int8u 207 MovieMultiSelector? int8u 215 MovieLensControlRing int8u 221 MovieAFSpeed int8u 223 MovieAFSpeedApply int8u 225 MovieAFTrackingSensitivity int8u 257 LCDIllumination? int8u 258 ExtendedShutterSpeeds int8u 259 SubjectMotion int8u 261 FocusPointPersistence int8u 263 AutoFocusModeRestrictions? int8u 267 CHModeShootingSpeed int8u 269.1 LimitReleaseModeSelCL? int8u & 0x02 269.2 LimitReleaseModeSelCH? int8u & 0x04 269.3 LimitReleaseModeSelC30? int8u & 0x10 269.4 LimitReleaseModeSelC120? int8u & 0x40 269.5 LimitReleaseModeSelSelf? int8u & 0x80 273 FlashBurstPriority? int8u 277 VerticalFuncButton int8u 281 Func3Button int8u 285 VerticalAFOnButton int8u 293 VerticalMultiSelectorPlaybackMode? int8u 295 MovieFunc3Button int8u 335 LimitAF-AreaModeSelDynamic_S? int8u 336 LimitAF-AreaModeSelDynamic_M? int8u 337 LimitAF-AreaModeSelDynamic_L? int8u 339 LimitAF-AreaModeSel3DTracking? int8u 341 PlaybackFlickUp? int8u 345 PlaybackFlickDown? int8u 349 ISOStepSize int8u 355 ReverseFocusRing int8u 356 EVFImageFrame? int8u 357 EVFGrid? int8u 359 VirtualHorizonStyle? int8u 373 Func4Button? int8u 379 AudioButton? int8u 381 QualityButton? int8u 399 VerticalMultiSelector? int8u 421 Func1ButtonPlaybackMode? int8u 423 Func2ButtonPlaybackMode? int8u 425 Func3ButtonPlaybackMode? int8u 431 Func4ButtonPlaybackMode? int8u 437 MovieRecordButtonPlaybackMode? int8u 439 VerticalFuncButtonPlaybackMode? int8u 441 AudioButtonPlaybackMode? int8u 447 QualityButtonPlaybackMode? int8u 453 WhiteBalanceButtonPlaybackMode? int8u 459 CommandDialPlaybackMode? int8u 463 SubCommandDialPlaybackMode? int8u 467 FocusPointLock? int8u 469 ControlRingResponse int8u 481 VerticalMovieFuncButton? int8u 505 VerticalMovieAFOnButton? int8u 515 MovieAFAreaMode? int8u 527 HDMIViewAssist? int8u 529 ZebraPatternToneRange? int8u 531 MovieZebraPattern? int8u 533 MovieHighlightDisplayThreshold? int8u 535 MovieMidtoneDisplayValue? int8u 537 MovieMidtoneDisplayRange? int8u~ 541 MovieEVFGrid? int8u 549 MovieShutterSpeedLock? int8u 550 MovieFocusPointLock? int8u 563 MatrixMetering? int8u 564 AF-CFocusDisplay int8u 565 FocusPeakingDisplay? int8u 567 KeepExposure int8u 585 StarlightView? int8u 587 EVFWarmDisplayMode? int8u 589 EVFWarmDisplayBrightness? int8s 591 EVFReleaseIndicator? int8u 601 MovieApertureLock? int8u 607 FlickAdvanceDirection? int8u

NikonCustom SettingsZ9v4 Tags

Custom settings for the Z9.

Index1 Tag Name Writable —— ——– ——– 1 CustomSettingsBank int8u 3 AF-CPrioritySelection int8u 5 AF-SPrioritySelection int8u 7 BlockShotAFResponse int8u 11 AFPointSel int8u 13 StoreByOrientation int8u 15 AFActivation int8u 16 AF-OnOutOfFocusRelease? int8u 17 LimitAF-AreaModeSelPinpoint? int8u 19 LimitAF-AreaModeSelWideAF_S? int8u 20 LimitAF-AreaModeSelWideAF_L? int8u 21 LimitAFAreaModeSelAuto? int8u 22 FocusPointWrap? int8u 23 ManualFocusPointIllumination? int8u 24 DynamicAreaAFAssist? int8u 25 AF-AssistIlluminator int8u 26 ManualFocusRingInAFMode int8u 27 ExposureControlStepSize int8u 29 EasyExposureCompensation int8u 31 CenterWeightedAreaSize int8u 33 FineTuneOptMatrixMetering int8s 35 FineTuneOptCenterWeighted int8s 37 FineTuneOptSpotMetering int8s 39 FineTuneOptHighlightWeighted int8s 41 ShutterReleaseButtonAE-L int8u 43 SelfTimerTime int8u 45 SelfTimerShotCount int8u 49 SelfTimerShotInterval int8u 51 PlaybackMonitorOffTime int8u 53 MenuMonitorOffTime int8u 55 ShootingInfoMonitorOffTime int8u 57 ImageReviewMonitorOffTime int8u 59 CLModeShootingSpeed int8u 61 MaxContinuousRelease no 65 SyncReleaseMode? int8u 69 LimitSelectableImageAreaDX? int8u 70 LimitSelectableImageArea1To1? int8u 71 LimitSelectableImageArea16To9? int8u 72 FileNumberSequence int8u 73 FocusPeakingLevel? int8u 75 FocusPeakingHighlightColor? int8u 81 ContinuousModeDisplay int8u 83 FlashSyncSpeed no 85 HighSpeedSync int8u 87 FlashShutterSpeed no 89 FlashExposureCompArea int8u 91 AutoFlashISOSensitivity int8u 93 ModelingFlash int8u 95 AutoBracketModeM int8u 97 AutoBracketOrder int8u 99 Func1Button int8u 115 Func2Button int8u 131 AFOnButton int8u 143 SubSelector? int8u 155 AssignMovieRecordButton? int8u 159 LensFunc1Button int8u 167 LensFunc2Button int8u 173 LensControlRing int8u 175 MultiSelectorShootMode int8u 179 MultiSelectorPlaybackMode int8u 183 ShutterSpeedLock int8u 184 ApertureLock int8u 186 CmdDialsReverseRotation int8u 191 UseDialWithoutHold? int8u 193 ReverseIndicators? int8u 195 MovieFunc1Button int8u 199 MovieFunc2Button int8u 203 MovieAF-OnButton int8u 207 MovieMultiSelector? int8u 215 MovieLensControlRing int8u 221 MovieAFSpeed int8u 223 MovieAFSpeedApply int8u 225 MovieAFTrackingSensitivity int8u 279 LCDIllumination? int8u 280 ExtendedShutterSpeeds int8u 281 SubjectMotion int8u 283 FocusPointPersistence int8u 285 AutoFocusModeRestrictions? int8u 289 CHModeShootingSpeed int8u 293.1 LimitReleaseModeSelCL? int8u & 0x02 293.2 LimitReleaseModeSelCH? int8u & 0x04 293.3 LimitReleaseModeSelC30? int8u & 0x10 293.4 LimitReleaseModeSelC120? int8u & 0x40 293.5 LimitReleaseModeSelSelf? int8u & 0x80 297 FlashBurstPriority? int8u 301 VerticalFuncButton int8u 305 Func3Button int8u 309 VerticalAFOnButton int8u 317 VerticalMultiSelectorPlaybackMode? int8u 319 MovieFunc3Button int8u 359 LimitAF-AreaModeSelDynamic_S? int8u 360 LimitAF-AreaModeSelDynamic_M? int8u 361 LimitAF-AreaModeSelDynamic_L? int8u 363 LimitAF-AreaModeSel3DTracking? int8u 365 PlaybackFlickUp? int8u 369 PlaybackFlickDown? int8u 373 ISOStepSize int8u 379 ReverseFocusRing int8u 380 EVFImageFrame? int8u 381 EVFGrid? int8u 383 VirtualHorizonStyle? int8u 397 Func4Button? int8u 403 AudioButton? int8u 405 QualityButton? int8u 423 VerticalMultiSelector? int8u 445 Func1ButtonPlaybackMode? int8u 447 Func2ButtonPlaybackMode? int8u 449 Func3ButtonPlaybackMode? int8u 455 Func4ButtonPlaybackMode? int8u 461 MovieRecordButtonPlaybackMode? int8u 463 VerticalFuncButtonPlaybackMode? int8u 465 AudioButtonPlaybackMode? int8u 471 QualityButtonPlaybackMode? int8u 477 WhiteBalanceButtonPlaybackMode? int8u 483 CommandDialPlaybackMode? int8u 487 SubCommandDialPlaybackMode? int8u 491 FocusPointLock? int8u 493 ControlRingResponse int8u 505 VerticalMovieFuncButton? int8u 529 VerticalMovieAFOnButton? int8u 539 MovieAFAreaMode? int8u 551 HDMIViewAssist? int8u 553 ZebraPatternToneRange? int8u 555 MovieZebraPattern? int8u 557 MovieHighlightDisplayThreshold? int8u 559 MovieMidtoneDisplayValue? int8u 561 MovieMidtoneDisplayRange? int8u~ 565 MovieEVFGrid? int8u 573 MovieShutterSpeedLock? int8u 574 MovieFocusPointLock? int8u 587 MatrixMetering? int8u 588 AF-CFocusDisplay int8u 589 FocusPeakingDisplay? int8u 591 KeepExposure int8u 609 StarlightView? int8u 611 EVFWarmDisplayMode? int8u 613 EVFWarmDisplayBrightness? int8s 615 EVFReleaseIndicator? int8u 625 MovieApertureLock? int8u 631 FlickAdvanceDirection? int8u

NikonCapture Tags

This information is written by the Nikon Capture software in tag 0x0e01 of the maker notes of NEF images.

Tag ID Tag Name Writable —— ——– ——– 0x8ae85e LCHEditor int8u 0x83a1a25 HistogramXML undef 0xc89224b ColorAberrationControl int8u 0x116fea21 HighlightData NikonCapture HighlightData 0x2175eb78 D-LightingHQ int8u 0x2fc08431 StraightenAngle double 0x374233e0 CropData NikonCapture CropData 0x39c456ac PictureCtrl NikonCapture PictureCtrl 0x3cfc73c6 RedEyeData NikonCapture RedEyeData 0x3d136244 EditVersionName string 0x416391c6 QuickFix int8u 0x56a54260 Exposure NikonCapture Exposure 0x5f0e7d23 ColorBooster int8u 0x6a6e36b6 D-LightingHQSelected int8u 0x753dcbc0 NoiseReduction int8u 0x76a43200 UnsharpMask int8u 0x76a43201 Curves int8u 0x76a43202 ColorBalanceAdj int8u 0x76a43203 AdvancedRaw int8u 0x76a43204 WhiteBalanceAdj int8u 0x76a43205 VignetteControl int8u 0x76a43206 FlipHorizontal int8u 0x76a43207 Rotation int16u 0x84589434 BrightnessData NikonCapture Brightness 0x890ff591 D-LightingHQData NikonCapture DLightingHQ 0x926f13e0 NoiseReductionData NikonCapture NoiseReduction 0x9ef5f6e0 IPTCData IPTC 0xab5eca5e PhotoEffects int8u 0xac6bd5c0 VignetteControlIntensity int16s 0xb0384e1e PhotoEffectsData NikonCapture PhotoEffects 0xb999a36f ColorBoostData NikonCapture ColorBoost 0xbf3c6c20 WBAdjData NikonCapture WBAdjData 0xce5554aa D-LightingHS int8u 0xe2173c47 PictureControl int8u 0xe37b4337 D-LightingHSData NikonCapture DLightingHS 0xe42b5161 UnsharpData NikonCapture UnsharpData 0xe9651831 PhotoEffectHistoryXML undef 0xfe28a44f AutoRedEye int8u 0xfe443a45 ImageDustOff int8u

NikonCapture HighlightData Tags

Index1 Tag Name Writable —— ——– ——– 0 ShadowProtection int8s 1 SaturationAdj int8s 6 HighlightProtection int8s

NikonCapture CropData Tags

Index1 Tag Name Writable —— ——– ——– 30 CropLeft double 38 CropTop double 46 CropRight double 54 CropBottom double 142 CropOutputWidthInches double 150 CropOutputHeightInches double 158 CropScaledResolution double 174 CropSourceResolution double 182 CropOutputResolution double 190 CropOutputScale double 198 CropOutputWidth double 206 CropOutputHeight double 214 CropOutputPixels double

NikonCapture PictureCtrl Tags

Index1 Tag Name Writable —— ——– ——– 0 PictureControlActive int8u 19 PictureControlMode string[16] 42 QuickAdjust int8u 43 SharpeningAdj int8u 44 ContrastAdj int8u 45 BrightnessAdj int8u 46 SaturationAdj int8u 47 HueAdj int8u

NikonCapture RedEyeData Tags

Index1 Tag Name Writable —— ——– ——– 0 RedEyeCorrection int8u

NikonCapture Exposure Tags

Index1 Tag Name Writable —— ——– ——– 0 ExposureAdj int16s 18 ExposureAdj2 double 36 ActiveD-Lighting int8u 37 ActiveD-LightingMode int8u

NikonCapture Brightness Tags

Index1 Tag Name Writable —— ——– ——– 0 BrightnessAdj double 8 EnhanceDarkTones int8u

NikonCapture DLightingHQ Tags

Index4 Tag Name Writable —— ——– ——– 0 D-LightingHQShadow int32u 1 D-LightingHQHighlight int32u 2 D-LightingHQColorBoost int32u

NikonCapture NoiseReduction Tags

Index1 Tag Name Writable —— ——– ——– 4 EdgeNoiseReduction int8u 5 ColorMoireReductionMode int8u 9 NoiseReductionIntensity int32u 13 NoiseReductionSharpness int32u 17 NoiseReductionMethod int16u 21 ColorMoireReduction int8u 23 NoiseReduction int8u 24 ColorNoiseReductionIntensity int32u 28 ColorNoiseReductionSharpness int32u

NikonCapture PhotoEffects Tags

Index1 Tag Name Writable —— ——– ——– 0 PhotoEffectsType int8u 4 PhotoEffectsRed int16s 6 PhotoEffectsGreen int16s 8 PhotoEffectsBlue int16s

NikonCapture ColorBoost Tags

Index1 Tag Name Writable —— ——– ——– 0 ColorBoostType int8u 1 ColorBoostLevel int32u

NikonCapture WBAdjData Tags

Index1 Tag Name Writable —— ——– ——– 0 WBAdjRedBalance double 8 WBAdjBlueBalance double 16 WBAdjMode int8u 20 WBAdjLighting int16u 24 WBAdjTemperature int16u 37 WBAdjTint int32s

NikonCapture DLightingHS Tags

Index4 Tag Name Writable —— ——– ——– 0 D-LightingHSAdjustment int32u 1 D-LightingHSColorBoost int32u

NikonCapture UnsharpData Tags

Index1 Tag Name Writable —— ——– ——– 0 UnsharpCount int8u 19 Unsharp1Color int16u 23 Unsharp1Intensity int16u 25 Unsharp1HaloWidth int16u 27 Unsharp1Threshold int8u 46 Unsharp2Color int16u 50 Unsharp2Intensity int16u 52 Unsharp2HaloWidth int16u 54 Unsharp2Threshold int8u 73 Unsharp3Color int16u 77 Unsharp3Intensity int16u 79 Unsharp3HaloWidth int16u 81 Unsharp3Threshold int8u 100 Unsharp4Color int16u 104 Unsharp4Intensity int16u 106 Unsharp4HaloWidth int16u 108 Unsharp4Threshold int8u

Nintendo Tags

Tag ID Tag Name Writable —— ——– ——– 0x1101 CameraInfo Nintendo CameraInfo

Nintendo CameraInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 ModelID undef[4] 8 TimeStamp int32u 24 InternalSerialNumber undef[4] 40 Parallax float 48 Category int16u

Olympus Tags

Tags 0x0000 through 0x0103 are used by some older Olympus cameras, and are the same as Konica/Minolta tags. These tags are also used for some models from other brands such as Acer, BenQ, Epson, Hitachi, HP, Maginon, Minolta, Pentax, Ricoh, Samsung, Sanyo, SeaLife, Sony, Supra and Vivitar.

Tag ID Tag Name Writable —— ——– ——– 0x0000 MakerNoteVersion undef 0x0001 MinoltaCameraSettingsOld Minolta CameraSettings 0x0003 MinoltaCameraSettings Minolta CameraSettings 0x0040 CompressedImageSize int32u 0x0081 PreviewImageData no 0x0088 PreviewImageStart no 0x0089 PreviewImageLength no 0x0100 ThumbnailImage undef 0x0104 BodyFirmwareVersion string 0x0200 SpecialMode int32u[3]~ 0x0201 Quality int16u~ 0x0202 Macro int16u 0x0203 BWMode int16u 0x0204 DigitalZoom rational64u 0x0205 FocalPlaneDiagonal rational64u 0x0206 LensDistortionParams int16s[6] 0x0207 CameraType string 0x0208 TextInfo Olympus TextInfo 0x0209 CameraID string 0x020b EpsonImageWidth int32u 0x020c EpsonImageHeight int32u 0x020d EpsonSoftware string 0x0280 PreviewImage int8u 0x0300 PreCaptureFrames int16u 0x0301 WhiteBoard int16u 0x0302 OneTouchWB int16u 0x0303 WhiteBalanceBracket int16u 0x0304 WhiteBalanceBias int16u 0x0400 SensorArea undef[8] 0x0401 BlackLevel int32u[4] 0x0403 SceneMode int16u 0x0404 SerialNumber string 0x0405 Firmware string 0x0e00 PrintIM PrintIM 0x0f00 DataDump no 0x0f01 DataDump2 no 0x0f04 ZoomedPreviewStart int32u* 0x0f05 ZoomedPreviewLength int32u* 0x0f06 ZoomedPreviewSize int16u[2] 0x1000 ShutterSpeedValue rational64s 0x1001 ISOValue rational64s 0x1002 ApertureValue rational64s 0x1003 BrightnessValue rational64s 0x1004 FlashMode int16u 0x1005 FlashDevice int16u 0x1006 ExposureCompensation rational64s 0x1007 SensorTemperature int16s 0x1008 LensTemperature int16s 0x1009 LightCondition int16u 0x100a FocusRange int16u 0x100b FocusMode int16u 0x100c ManualFocusDistance rational64u 0x100d ZoomStepCount int16u 0x100e FocusStepCount int16u 0x100f Sharpness int16u 0x1010 FlashChargeLevel int16u 0x1011 ColorMatrix int16u[9] 0x1012 BlackLevel int16u[4] 0x1013 ColorTemperatureBG? int16u 0x1014 ColorTemperatureRG? int16u 0x1015 WBMode int16u[2] 0x1017 RedBalance int16u[2] 0x1018 BlueBalance int16u[2] 0x1019 ColorMatrixNumber int16u 0x101a SerialNumber string 0x101b ExternalFlashAE1_0? int32u 0x101c ExternalFlashAE2_0? int32u 0x101d InternalFlashAE1_0? int32u 0x101e InternalFlashAE2_0? int32u 0x101f ExternalFlashAE1? int32u 0x1020 ExternalFlashAE2? int32u 0x1021 InternalFlashAE1? int32u 0x1022 InternalFlashAE2? int32u 0x1023 FlashExposureComp rational64s 0x1024 InternalFlashTable int16u 0x1025 ExternalFlashGValue rational64s 0x1026 ExternalFlashBounce int16u 0x1027 ExternalFlashZoom int16u 0x1028 ExternalFlashMode int16u 0x1029 Contrast int16u 0x102a SharpnessFactor int16u 0x102b ColorControl int16u[6] 0x102c ValidBits int16u[2] 0x102d CoringFilter int16u 0x102e OlympusImageWidth int32u 0x102f OlympusImageHeight int32u 0x1030 SceneDetect int16u 0x1031 SceneArea? int32u[8] 0x1033 SceneDetectData? int32u[720] 0x1034 CompressionRatio rational64u 0x1035 PreviewImageValid int32u 0x1036 PreviewImageStart int32u* 0x1037 PreviewImageLength int32u* 0x1038 AFResult int16u 0x1039 CCDScanMode int16u 0x103a NoiseReduction int16u 0x103b FocusStepInfinity int16u 0x103c FocusStepNear int16u 0x103d LightValueCenter rational64s 0x103e LightValuePeriphery rational64s 0x103f FieldCount? int16u 0x2010 Equipment Olympus Equipment EquipmentIFD Olympus Equipment 0x2020 CameraSettings Olympus CameraSettings CameraSettingsIFD Olympus CameraSettings 0x2030 RawDevelopment Olympus RawDevelopment RawDevelopmentIFD Olympus RawDevelopment 0x2031 RawDev2 Olympus RawDevelopment2 RawDev2IFD Olympus RawDevelopment2 0x2040 ImageProcessing Olympus ImageProcessing ImageProcessingIFD Olympus ImageProcessing 0x2050 FocusInfo Olympus FocusInfo FocusInfoIFD Olympus FocusInfo CameraParameters undef 0x2100 Olympus2100 Olympus FE Olympus2100IFD Olympus FE 0x2200 Olympus2200 Olympus FE Olympus2200IFD Olympus FE 0x2300 Olympus2300 Olympus FE Olympus2300IFD Olympus FE 0x2400 Olympus2400 Olympus FE Olympus2400IFD Olympus FE 0x2500 Olympus2500 Olympus FE Olympus2500IFD Olympus FE 0x2600 Olympus2600 Olympus FE Olympus2600IFD Olympus FE 0x2700 Olympus2700 Olympus FE Olympus2700IFD Olympus FE 0x2800 Olympus2800 Olympus FE Olympus2800IFD Olympus FE 0x2900 Olympus2900 Olympus FE Olympus2900IFD Olympus FE 0x3000 RawInfo Olympus RawInfo RawInfoIFD Olympus RawInfo 0x4000 MainInfo Olympus MainInfoIFD Olympus 0x5000 UnknownInfo Olympus UnknownInfo UnknownInfoIFD Olympus UnknownInfo

Olympus TextInfo Tags

This information is in text format (similar to APP12 information, but with spaces instead of linefeeds). Below are tags which have been observed, but any information found here will be extracted, even if the tag is not listed.

Tag ID Tag Name Writable —— ——– ——– Resolution Resolution no Type CameraType no

Olympus Equipment Tags

Tag ID Tag Name Writable —— ——– ——– 0x0000 EquipmentVersion undef[4] 0x0100 CameraType2 string[6] 0x0101 SerialNumber string[32] 0x0102 InternalSerialNumber string[32] 0x0103 FocalPlaneDiagonal rational64u 0x0104 BodyFirmwareVersion int32u 0x0201 LensType int8u[6] 0x0202 LensSerialNumber string[32] 0x0203 LensModel string 0x0204 LensFirmwareVersion int32u 0x0205 MaxApertureAtMinFocal int16u 0x0206 MaxApertureAtMaxFocal int16u 0x0207 MinFocalLength int16u 0x0208 MaxFocalLength int16u 0x020a MaxAperture int16u 0x020b LensProperties int16u 0x0301 Extender int8u[6] 0x0302 ExtenderSerialNumber string[32] 0x0303 ExtenderModel string 0x0304 ExtenderFirmwareVersion int32u 0x0403 ConversionLens string 0x1000 FlashType int16u 0x1001 FlashModel int16u 0x1002 FlashFirmwareVersion int32u 0x1003 FlashSerialNumber string[32]

Olympus CameraSettings Tags

Tag ID Tag Name Writable —— ——– ——– 0x0000 CameraSettingsVersion undef[4] 0x0100 PreviewImageValid int32u 0x0101 PreviewImageStart int32u* 0x0102 PreviewImageLength int32u* 0x0200 ExposureMode int16u 0x0201 AELock int16u 0x0202 MeteringMode int16u 0x0203 ExposureShift rational64s 0x0204 NDFilter yes 0x0300 MacroMode int16u 0x0301 FocusMode int16u[n] 0x0302 FocusProcess int16u[n] 0x0303 AFSearch int16u 0x0304 AFAreas int32u[64]~ 0x0305 AFPointSelected rational64s[5] 0x0306 AFFineTune int8u 0x0307 AFFineTuneAdj int16s[3] 0x0308 FocusBracketStepSize int8u 0x0309 AISubjectTrackingMode int16u 0x0400 FlashMode int16u 0x0401 FlashExposureComp rational64s 0x0403 FlashRemoteControl int16u 0x0404 FlashControlMode int16u[n] 0x0405 FlashIntensity rational64s[n] 0x0406 ManualFlashStrength rational64s[n] 0x0500 WhiteBalance2 int16u 0x0501 WhiteBalanceTemperature int16u 0x0502 WhiteBalanceBracket int16s 0x0503 CustomSaturation int16s[3]~ 0x0504 ModifiedSaturation int16u 0x0505 ContrastSetting int16s[3] 0x0506 SharpnessSetting int16s[3] 0x0507 ColorSpace int16u 0x0509 SceneMode int16u 0x050a NoiseReduction int16u 0x050b DistortionCorrection int16u 0x050c ShadingCompensation int16u 0x050d CompressionFactor rational64u 0x050f Gradation int16s[n] 0x0520 PictureMode int16u[n] 0x0521 PictureModeSaturation int16s[3] 0x0522 PictureModeHue? int16s 0x0523 PictureModeContrast int16s[3] 0x0524 PictureModeSharpness int16s[3] 0x0525 PictureModeBWFilter int16s 0x0526 PictureModeTone int16s 0x0527 NoiseFilter int16s[3] 0x0529 ArtFilter int16u[4] 0x052c MagicFilter int16u[4] 0x052d PictureModeEffect int16s[3] 0x052e ToneLevel yes 0x052f ArtFilterEffect int16u[20] 0x0532 ColorCreatorEffect int16s[6] 0x0537 MonochromeProfileSettings int16s[6] 0x0538 FilmGrainEffect int16s 0x0539 ColorProfileSettings int16s[14] 0x053a MonochromeVignetting int16s 0x053b MonochromeColor int16s 0x0600 DriveMode int16u[n]~ 0x0601 PanoramaMode int16u~ 0x0603 ImageQuality2 int16u 0x0604 ImageStabilization int32u 0x0804 StackedImage int32u[2] 0x0900 ManometerPressure int16u 0x0901 ManometerReading int32s[2] 0x0902 ExtendedWBDetect int16u 0x0903 RollAngle int16s[2] 0x0904 PitchAngle int16s[2] 0x0908 DateTimeUTC string

Olympus RawDevelopment Tags

Tag ID Tag Name Writable —— ——– ——– 0x0000 RawDevVersion undef[4] 0x0100 RawDevExposureBiasValue rational64s 0x0101 RawDevWhiteBalanceValue int16u 0x0102 RawDevWBFineAdjustment int16s 0x0103 RawDevGrayPoint int16u[3] 0x0104 RawDevSaturationEmphasis int16s[3] 0x0105 RawDevMemoryColorEmphasis int16u 0x0106 RawDevContrastValue int16s[3] 0x0107 RawDevSharpnessValue int16s[3] 0x0108 RawDevColorSpace int16u 0x0109 RawDevEngine int16u 0x010a RawDevNoiseReduction int16u 0x010b RawDevEditStatus int16u 0x010c RawDevSettings int16u

Olympus RawDevelopment2 Tags

Tag ID Tag Name Writable —— ——– ——– 0x0000 RawDevVersion undef[4] 0x0100 RawDevExposureBiasValue rational64s 0x0101 RawDevWhiteBalance int16u 0x0102 RawDevWhiteBalanceValue int16u 0x0103 RawDevWBFineAdjustment int16s 0x0104 RawDevGrayPoint int16u[3] 0x0105 RawDevContrastValue int16s[3] 0x0106 RawDevSharpnessValue int16s[3] 0x0107 RawDevSaturationEmphasis int16s[3] 0x0108 RawDevMemoryColorEmphasis int16u 0x0109 RawDevColorSpace int16u 0x010a RawDevNoiseReduction int16u 0x010b RawDevEngine int16u 0x010c RawDevPictureMode int16u 0x010d RawDevPMSaturation int16s[3] 0x010e RawDevPMContrast int16s[3] 0x010f RawDevPMSharpness int16s[3] 0x0110 RawDevPM_BWFilter int16u 0x0111 RawDevPMPictureTone int16u 0x0112 RawDevGradation int16s[3] 0x0113 RawDevSaturation3 int16s[3] 0x0119 RawDevAutoGradation int16u 0x0120 RawDevPMNoiseFilter int16u 0x0121 RawDevArtFilter int16u[4]

Olympus ImageProcessing Tags

Tag ID Tag Name Writable —— ——– ——– 0x0000 ImageProcessingVersion undef[4] 0x0100 WB_RBLevels int16u[2] 0x0102 WB_RBLevels3000K int16u[2] 0x0103 WB_RBLevels3300K int16u[2] 0x0104 WB_RBLevels3600K int16u[2] 0x0105 WB_RBLevels3900K int16u[2] 0x0106 WB_RBLevels4000K int16u[2] 0x0107 WB_RBLevels4300K int16u[2] 0x0108 WB_RBLevels4500K int16u[2] 0x0109 WB_RBLevels4800K int16u[2] 0x010a WB_RBLevels5300K int16u[2] 0x010b WB_RBLevels6000K int16u[2] 0x010c WB_RBLevels6600K int16u[2] 0x010d WB_RBLevels7500K int16u[2] 0x010e WB_RBLevelsCWB1 int16u[2] 0x010f WB_RBLevelsCWB2 int16u[2] 0x0110 WB_RBLevelsCWB3 int16u[2] 0x0111 WB_RBLevelsCWB4 int16u[2] 0x0113 WB_GLevel3000K int16u 0x0114 WB_GLevel3300K int16u 0x0115 WB_GLevel3600K int16u 0x0116 WB_GLevel3900K int16u 0x0117 WB_GLevel4000K int16u 0x0118 WB_GLevel4300K int16u 0x0119 WB_GLevel4500K int16u 0x011a WB_GLevel4800K int16u 0x011b WB_GLevel5300K int16u 0x011c WB_GLevel6000K int16u 0x011d WB_GLevel6600K int16u 0x011e WB_GLevel7500K int16u 0x011f WB_GLevel int16u 0x0200 ColorMatrix int16u[9] 0x0300 Enhancer int16u 0x0301 EnhancerValues int16u[7] 0x0310 CoringFilter int16u 0x0311 CoringValues int16u[7] 0x0600 BlackLevel2 int16u[4] 0x0610 GainBase int16u 0x0611 ValidBits int16u[2] 0x0612 CropLeft int16u[2] 0x0613 CropTop int16u[2] 0x0614 CropWidth int32u 0x0615 CropHeight int32u 0x0635 UnknownBlock1? undef 0x0636 UnknownBlock2? undef 0x0805 SensorCalibration int16s[2] 0x1010 NoiseReduction2 int16u 0x1011 DistortionCorrection2 int16u 0x1012 ShadingCompensation2 int16u 0x101c MultipleExposureMode int16u[2] 0x1103 UnknownBlock3? undef 0x1104 UnknownBlock4? undef 0x1112 AspectRatio int8u[2] 0x1113 AspectFrame int16u[4] 0x1200 FacesDetected int32u[n] 0x1201 FaceDetectArea int16s[n] 0x1202 MaxFaces int32u[3] 0x1203 FaceDetectFrameSize int16u[6] 0x1207 FaceDetectFrameCrop int16s[12] 0x1306 CameraTemperature no 0x1900 KeystoneCompensation int8u[2] 0x1901 KeystoneDirection int8u[2] 0x1906 KeystoneValue int16s[3]

Olympus FocusInfo Tags

Tag ID Tag Name Writable —— ——– ——– 0x0000 FocusInfoVersion undef[4] 0x0209 AutoFocus? int16u 0x0210 SceneDetect int16u 0x0211 SceneArea? int32u[8] 0x0212 SceneDetectData? int32u[720] 0x0300 ZoomStepCount int16u 0x0301 FocusStepCount int16u 0x0303 FocusStepInfinity int16u 0x0304 FocusStepNear int16u 0x0305 FocusDistance rational64u 0x0308 AFPoint int16u 0x031b AFPointDetails no AFPointDetails int16u 0x0328 AFInfo Olympus AFInfo 0x1201 ExternalFlash int16u[2] 0x1203 ExternalFlashGuideNumber? rational64s 0x1204 ExternalFlashBounce int16u 0x1205 ExternalFlashZoom rational64u 0x1208 InternalFlash int16u[n] 0x1209 ManualFlash int16u[2]~ 0x120a MacroLED int16u 0x1500 SensorTemperature int16s 0x1600 ImageStabilization undef~

Olympus AFInfo Tags

Index1 Tag Name Writable —— ——– ——– [no tags known]

Olympus FE Tags

Some FE models write a large number of tags here, but most of this information remains unknown.

Tag ID Tag Name Writable —— ——– ——– 0x0100 BodyFirmwareVersion string

Olympus RawInfo Tags

These tags are found only in ORF images of some models (eg. C8080WZ).

Tag ID Tag Name Writable —— ——– ——– 0x0000 RawInfoVersion undef[4] 0x0100 WB_RBLevelsUsed int16u[2] 0x0110 WB_RBLevelsAuto int16u[2] 0x0120 WB_RBLevelsShade int16u[2] 0x0121 WB_RBLevelsCloudy int16u[2] 0x0122 WB_RBLevelsFineWeather int16u[2] 0x0123 WB_RBLevelsTungsten int16u[2] 0x0124 WB_RBLevelsEveningSunlight int16u[2] 0x0130 WB_RBLevelsDaylightFluor int16u[2] 0x0131 WB_RBLevelsDayWhiteFluor int16u[2] 0x0132 WB_RBLevelsCoolWhiteFluor int16u[2] 0x0133 WB_RBLevelsWhiteFluorescent int16u[2] 0x0200 ColorMatrix2 int16u[9] 0x0310 CoringFilter int16u 0x0311 CoringValues int16u[11] 0x0600 BlackLevel2 int16u[4] 0x0601 YCbCrCoefficients no 0x0611 ValidPixelDepth int16u[2] 0x0612 CropLeft int16u 0x0613 CropTop int16u 0x0614 CropWidth int32u 0x0615 CropHeight int32u 0x1000 LightSource int16u 0x1001 WhiteBalanceComp int16s[3] 0x1010 SaturationSetting int16s[3] 0x1011 HueSetting int16s[3] 0x1012 ContrastSetting int16s[3] 0x1013 SharpnessSetting int16s[3] 0x2000 CMExposureCompensation rational64s 0x2001 CMWhiteBalance int16u 0x2002 CMWhiteBalanceComp int16s 0x2010 CMWhiteBalanceGrayPoint int16u[3] 0x2020 CMSaturation int16s[3] 0x2021 CMHue int16s[3] 0x2022 CMContrast int16s[3] 0x2023 CMSharpness int16s[3]

Olympus UnknownInfo Tags

Tag ID Tag Name Writable —— ——– ——– [no tags known]

Olympus DSS Tags

Information extracted from DSS/DS2 files and the ID3 XOLY frame of MP3 files written by some Olympus voice recorders.

Index1 Tag Name Writable —— ——– ——– 12 Model no 38 StartTime no 50 EndTime no 62 Duration no 798 Comment no

Olympus AVI Tags

This information is found in Olympus AVI videos.

Index1 Tag Name Writable —— ——– ——– 18 Make no 44 Model no 94 FNumber no 131 DateTime1 no 157 DateTime2 no 297 ThumbInfo Olympus thmb2

Olympus thmb2 Tags

Index1 Tag Name Writable —— ——– ——– 0 ThumbnailWidth no 2 ThumbnailHeight no 4 ThumbnailLength no 8 ThumbnailImage no

Olympus WAV Tags

This information is found in WAV files from Olympus PCM linear recorders like the LS-5, LS-10, LS-11.

Index1 Tag Name Writable —— ——– ——– 12 Model no 28 FileNumber no 38 DateTimeOriginal no 50 DateTimeEnd no 62 RecordingTime no 512 Duration no 522 Index01 no 532 Index02 no 542 Index03 no 552 Index04 no 562 Index05 no 572 Index06 no 582 Index07 no 592 Index08 no 602 Index09 no 612 Index10 no 622 Index11 no 632 Index12 no 642 Index13 no 652 Index14 no 662 Index15 no 672 Index16 no

Olympus MOV1 Tags

This information is found in MOV videos from Olympus models such as the D540Z, D595Z, FE100, FE110, FE115, FE170 and FE200.

Index1 Tag Name Writable —— ——– ——– 0 Make no 24 Model no 38 ExposureUnknown? no 42 FNumber no 50 ExposureCompensation no 72 FocalLength no

Olympus MOV2 Tags

This information is found in MOV videos from Olympus models such as the FE120, FE140 and FE190.

Index1 Tag Name Writable —— ——– ——– 0 Make no 24 Model no 54 ExposureTime no 58 FNumber no 66 ExposureCompensation no 88 FocalLength no 193 ISO no

Olympus MP4 Tags

This information is found in MP4 videos from Olympus models such as the u7040 and u9010.

Index1 Tag Name Writable —— ——– ——– 0 Make no 24 Model no 40 FNumber no 48 ExposureCompensation no 104 MovableInfo Olympus MovableInfo 114 MovableInfo Olympus MovableInfo

Olympus MovableInfo Tags

Index1 Tag Name Writable —— ——– ——– 4 ISO no 44 EncoderVersion no 60 DecoderVersion no 131 Thumbnail Olympus Thumbnail

Olympus Thumbnail Tags

Index4 Tag Name Writable —— ——– ——– 1 ThumbnailWidth no 2 ThumbnailHeight no 3 ThumbnailLength no 4 ThumbnailOffset no

Olympus MOV3 Tags

QuickTime information found in the TAGS atom of MOV videos from the E-M5.

Tag ID Tag Name Writable —— ——– ——– OLYM OlympusAtom Olympus OLYM2

Olympus OLYM2 Tags

Tag ID Tag Name Writable —— ——– ——– prms MakerNotes Olympus prms scrn PreviewInfo Olympus scrn2 thmb ThumbInfo Olympus thmb2

Olympus prms Tags

Information extracted from the “prms” atom in MOV videos from Olympus models such as the OM E-M5.

Index1 Tag Name Writable —— ——– ——– 18 Make no 44 Model no 131 DateTime1 no 157 DateTime2 no 383 LensModel no

Olympus scrn2 Tags

Index1 Tag Name Writable —— ——– ——– 2 OlympusPreview Olympus scrn

Olympus scrn Tags

Information extracted from the “scrn” atom of Olympus MP4 videos.

Index1 Tag Name Writable —— ——– ——– 0 PreviewImageLength no 4 PreviewImage no

Olympus thmb Tags

Information extracted from the “thmb” atom of Olympus MP4 videos.

Index1 Tag Name Writable —— ——– ——– 0 ThumbnailLength no 4 ThumbnailImage no

Olympus OLYM Tags

Tags found in the OLYM atom of MP4 videos from the TG-810.

Index1 Tag Name Writable —— ——– ——– 14 Make no 40 Model no 90 FNumber no 127 DateTimeOriginal no 153 DateTime2 no 265 ThumbnailWidth no 267 ThumbnailHeight no

PanasonicRaw Tags

These tags are found in IFD0 of Panasonic/Leica RAW, RW2 and RWL images.

Tag ID Tag Name Writable —— ——– ——– 0x0001 PanasonicRawVersion undef 0x0002 SensorWidth no 0x0003 SensorHeight no 0x0004 SensorTopBorder no 0x0005 SensorLeftBorder no 0x0006 SensorBottomBorder no 0x0007 SensorRightBorder no 0x0008 SamplesPerPixel int16u! 0x0009 CFAPattern int16u! 0x000a BitsPerSample int16u! 0x000b Compression int16u! 0x000e LinearityLimitRed int16u 0x000f LinearityLimitGreen int16u 0x0010 LinearityLimitBlue int16u 0x0011 RedBalance int16u 0x0012 BlueBalance int16u 0x0013 WBInfo PanasonicRaw WBInfo 0x0017 ISO int16u 0x0018 HighISOMultiplierRed int16u 0x0019 HighISOMultiplierGreen int16u 0x001a HighISOMultiplierBlue int16u 0x001b NoiseReductionParams undef[n]! 0x001c BlackLevelRed int16u 0x001d BlackLevelGreen int16u 0x001e BlackLevelBlue int16u 0x0024 WBRedLevel int16u 0x0025 WBGreenLevel int16u 0x0026 WBBlueLevel int16u 0x0027 WBInfo2 PanasonicRaw WBInfo2 0x002d RawFormat int16u! 0x002e JpgFromRaw JPEG 0x002f CropTop int16u 0x0030 CropLeft int16u 0x0031 CropBottom int16u 0x0032 CropRight int16u 0x010f Make string 0x0110 Model string 0x0111 StripOffsets no 0x0112 Orientation int16u 0x0116 RowsPerStrip no 0x0117 StripByteCounts no 0x0118 RawDataOffset no 0x0119 DistortionInfo PanasonicRaw DistortionInfo 0x011c Gamma int16u 0x0120 CameraIFD PanasonicRaw CameraIFD 0x0121 Multishot int32u 0x0127 JpgFromRaw2 no 0x013b Artist string 0x02bc ApplicationNotes XMP 0x8298 Copyright string 0x83bb IPTC-NAA IPTC 0x8769 ExifOffset EXIF 0x8825 GPSInfo GPS

PanasonicRaw CameraIFD Tags

Tag ID Tag Name Writable —— ——– ——– 0x1001 MultishotOn no 0x1100 FocusStepNear no 0x1101 FocusStepCount no 0x1102 FlashFired no 0x1105 ZoomPosition no 0x1200 LensAttached no 0x1201 LensTypeMake no 0x1202 LensTypeModel no 0x1203 FocalLengthIn35mmFormat no 0x1301 ApertureValue no 0x1302 ShutterSpeedValue no 0x1303 SensitivityValue no 0x1305 HighISOMode no 0x1412 FacesDetected no 0x3200 WB_CFA0_LevelDaylight no 0x3201 WB_CFA1_LevelDaylight no 0x3202 WB_CFA2_LevelDaylight no 0x3203 WB_CFA3_LevelDaylight no 0x3300 WhiteBalanceSet no 0x3420 WB_RedLevelAuto no 0x3421 WB_BlueLevelAuto no 0x3501 Orientation no 0x3600 WhiteBalanceDetected no

PanasonicRaw WBInfo Tags

Index2 Tag Name Writable —— ——– ——– 0 NumWBEntries int16u 1 WBType1 int16u 2 WB_RBLevels1 int16u[2] 4 WBType2 int16u 5 WB_RBLevels2 int16u[2] 7 WBType3 int16u 8 WB_RBLevels3 int16u[2] 10 WBType4 int16u 11 WB_RBLevels4 int16u[2] 13 WBType5 int16u 14 WB_RBLevels5 int16u[2] 16 WBType6 int16u 17 WB_RBLevels6 int16u[2] 19 WBType7 int16u 20 WB_RBLevels7 int16u[2]

PanasonicRaw WBInfo2 Tags

Index2 Tag Name Writable —— ——– ——– 0 NumWBEntries int16u 1 WBType1 int16u 2 WB_RGBLevels1 int16u[3] 5 WBType2 int16u 6 WB_RGBLevels2 int16u[3] 9 WBType3 int16u 10 WB_RGBLevels3 int16u[3] 13 WBType4 int16u 14 WB_RGBLevels4 int16u[3] 17 WBType5 int16u 18 WB_RGBLevels5 int16u[3] 21 WBType6 int16u 22 WB_RGBLevels6 int16u[3] 25 WBType7 int16u 26 WB_RGBLevels7 int16u[3]

PanasonicRaw DistortionInfo Tags

Lens distortion correction information.

Tag ID Tag Name Writable —— ——– ——– 0x0002 DistortionParam02 int16s 0x0004 DistortionParam04 int16s 0x0005 DistortionScale int16s 7.1 DistortionCorrection int16s & 0x0f 0x0008 DistortionParam08 int16s 0x0009 DistortionParam09 int16s 0x000b DistortionParam11 int16s 0x000c DistortionN? int16s

SigmaRaw Tags

These tags are used in Sigma and Foveon RAW (.X3F) images. Metadata is also extracted from the JpgFromRaw image if it exists (all models but the SD9 and SD10). Currently, metadata may only be written to the embedded JpgFromRaw.

Tag ID Tag Name Writable —— ——– ——– Header Header SigmaRaw Header Header4 Header4 SigmaRaw Header4 HeaderExt HeaderExt SigmaRaw HeaderExt IMA2 PreviewImage no JpgFromRaw no IMAG PreviewImage no PROP Properties SigmaRaw Properties

SigmaRaw Header Tags

Information extracted from the header of an X3F file.

Tag ID Tag Name Writable —— ——– ——– 0x0001 FileVersion no 0x0002 ImageUniqueID no 0x0006 MarkBits no 0x0007 ImageWidth no 0x0008 ImageHeight no 0x0009 Rotation no 0x000a WhiteBalance no 0x0012 SceneCaptureType no

SigmaRaw Header4 Tags

Header information for version 4.0 or greater X3F.

Index4 Tag Name Writable —— ——– ——– 1 FileVersion no 10 ImageWidth no 11 ImageHeight no 12 Rotation no

SigmaRaw HeaderExt Tags

Extended header data found in version 2.1 and 2.2 files

Tag ID Tag Name Writable —— ——– ——– 0x0000 Unused no 0x0001 ExposureAdjust no 0x0002 Contrast no 0x0003 Shadow no 0x0004 Highlight no 0x0005 Saturation no 0x0006 Sharpness no 0x0007 RedAdjust no 0x0008 GreenAdjust no 0x0009 BlueAdjust no 0x000a X3FillLight no

SigmaRaw Properties Tags

Tag ID Tag Name Writable —— ——– ——– AEMODE MeteringMode no AFAREA AFArea no AFINFOCUS AFInFocus no AFMODE FocusMode no APERTURE FNumber no AP_DESC ApertureDisplayed no BRACKET BracketShot no BURST BurstShot no CAMMANUF Make no CAMMODEL Model no CAMNAME CameraName no CAMSERIAL SerialNumber no CM_DESC SceneCaptureType no COLORSPACE ColorSpace no DRIVE DriveMode no EVAL_STATE EvalState no EXPCOMP ExposureCompensation no EXPNET NetExposureCompensation no EXPTIME IntegrationTime no FIRMVERS FirmwareVersion no FLASH FlashMode no FLASHEXPCOMP FlashExpComp no FLASHPOWER FlashPower no FLASHTTLMODE FlashTTLMode no FLASHTYPE FlashType no FLENGTH FocalLength no FLEQ35MM FocalLengthIn35mmFormat no FOCUS Focus no IMAGEBOARDID ImageBoardID no IMAGERBOARDID ImagerBoardID no IMAGERTEMP SensorTemperature no ISO ISO no LENSARANGE LensApertureRange no LENSFRANGE LensFocalRange no LENSMODEL LensType no PMODE ExposureProgram no RESOLUTION Quality no SENSORID SensorID no SHUTTER ExposureTime no SH_DESC ShutterSpeedDisplayed no TIME DateTimeOriginal no VERSION_BF VersionBF no WB_DESC WhiteBalance no

Lytro Tags

Tag definitions for Lytro Light Field Picture (LFP) files. ExifTool extracts the full JSON metadata blocks, as well as breaking them down into individual tags. All available tags are extracted from the JSON metadata, even if they don’t appear in the table below.

Tag Name Writable ——– ——– AccelerometerTime no AccelerometerX no AccelerometerY no AccelerometerZ no CameraType no DateTimeOriginal no EmbeddedImage no ExposureTime no FNumber no FirmwareVersion no FocalLength no FocalPlaneXResolution no FrameExposureTime no ISO no ImageLimitExposureBias no ImageModulationExposureBias no JSONMetadata no+ LensTemperature no Make no Model no Orientation no SensorSerialNumber no SerialNumber no SocTemperature no

PhaseOne Tags

These tags are extracted from the maker notes of Phase One images.

Tag ID Tag Name Writable —— ——– ——– 0x0100 CameraOrientation no 0x0102 SerialNumber string 0x0105 ISO int32s 0x0106 ColorMatrix1 float[9] 0x0107 WB_RGBLevels float[3] 0x0108 SensorWidth int32s 0x0109 SensorHeight int32s 0x010a SensorLeftMargin int32s 0x010b SensorTopMargin int32s 0x010c ImageWidth int32s 0x010d ImageHeight int32s 0x010e RawFormat int32s 0x010f RawData no 0x0110 SensorCalibration PhaseOne SensorCalibration 0x0112 DateTimeOriginal no 0x0113 ImageNumber int32s 0x0203 Software string 0x0204 System string 0x0210 SensorTemperature float 0x0211 SensorTemperature2 float 0x0212 UnknownDate? int32u 0x021c StripOffsets no 0x021d BlackLevel int32s 0x0222 SplitColumn int32s 0x0223 BlackLevelData int16u[n] 0x0226 ColorMatrix2 float[9] 0x0267 AFAdjustment float 0x0301 FirmwareVersions string 0x0400 ShutterSpeedValue float 0x0401 ApertureValue float 0x0402 ExposureCompensation float 0x0403 FocalLength float 0x0410 CameraModel string 0x0412 LensModel string 0x0414 MaxApertureValue float 0x0415 MinApertureValue float 0x0455 Viewfinder string

PhaseOne SensorCalibration Tags

Tag ID Tag Name Writable —— ——– ——– 0x0400 SensorDefects no 0x0401 AllColorFlatField1? no 0x0407 SerialNumber string 0x040b RedBlueFlatField? no 0x0410 AllColorFlatField2? no 0x0416 AllColorFlatField3? no 0x0419 LinearizationCoefficients1 no 0x041a LinearizationCoefficients2 no

Reconyx Tags

The following tags are extracted from the maker notes of Reconyx Hyperfire cameras such as the HC500, HC600 and PC900.

Index2 Tag Name Writable —— ——– ——– 0 MakerNoteVersion no 1 FirmwareVersion no 4 FirmwareDate int16u[2] 6 TriggerMode string[2] 7 Sequence int16u[2] 9 EventNumber int16u[2] 11 DateTimeOriginal int16u[6] 18 MoonPhase int16u 19 AmbientTemperatureFahrenheit int16s 20 AmbientTemperature int16s 21 SerialNumber undef[30] 36 Contrast int16u 37 Brightness int16u 38 Sharpness int16u 39 Saturation int16u 40 InfraredIlluminator int16u 41 MotionSensitivity int16u 42 BatteryVoltage int16u 43 UserLabel string[22]

Reconyx Type2 Tags

Tags extracted from models such as the UltraFire.

Index1 Tag Name Writable —— ——– ——– 24 FirmwareVersion undef[7] 31 Micro1Version undef[7] 38 BootLoaderVersion undef[7] 45 Micro2Version undef[7] 52 TriggerMode undef[1] 53 Sequence int8u[2] 55 EventNumber int32u 59 DateTimeOriginal int8u[7] 66 DayOfWeek int8u 67 MoonPhase int8u 68 AmbientTemperatureFahrenheit int16s 70 AmbientTemperature int16s 72 Illumination int8u 73 BatteryVoltage int16u 75 SerialNumber string[15] 90 UserLabel string[21]

Reconyx Type3 Tags

Tags extracted from models such as the HF2 PRO.

Index1 Tag Name Writable —— ——– ——– 16 FileNumber int16u 18 DirectoryNumber int16u 42 FirmwareVersion int16u[3] 48 FirmwareDate int16u[2] 52 TriggerMode string[2] 54 Sequence int16u[2] 58 EventNumber int16u[2] 62 DateTimeOriginal int16u[6] 74 DayOfWeek int16u 76 MoonPhase int16u 78 AmbientTemperatureFahrenheit int16s 80 AmbientTemperature int16s 82 Contrast int16u 84 Brightness int16u 86 Sharpness int16u 88 Saturation int16u 90 Flash int16u 92 AmbientInfrared int16u 94 AmbientLight int16u 96 MotionSensitivity int16u 98 BatteryVoltage int16u 100 BatteryVoltageAvg int16u 102 BatteryType int16u 104 UserLabel string[22] 126 SerialNumber unicode[15]

Sanyo Tags

Tag ID Tag Name Writable —— ——– ——– 0x00ff MakerNoteOffset int32u 0x0100 SanyoThumbnail undef 0x0200 SpecialMode int32u[3] 0x0201 SanyoQuality int16u 0x0202 Macro int16u 0x0204 DigitalZoom rational64u 0x0207 SoftwareVersion yes 0x0208 PictInfo yes 0x0209 CameraID yes 0x020e SequentialShot int16u 0x020f WideRange int16u 0x0210 ColorAdjustmentMode int16u 0x0213 QuickShot int16u 0x0214 SelfTimer int16u 0x0216 VoiceMemo int16u 0x0217 RecordShutterRelease int16u 0x0218 FlickerReduce int16u 0x0219 OpticalZoomOn int16u 0x021b DigitalZoomOn int16u 0x021d LightSourceSpecial int16u 0x021e Resaved int16u 0x021f SceneSelect int16u 0x0223 ManualFocusDistance rational64u FaceInfo - 0x0224 SequenceShotInterval int16u 0x0225 FlashMode int16u 0x0e00 PrintIM PrintIM 0x0f00 DataDump no

Sanyo FaceInfo Tags

Index4 Tag Name Writable —— ——– ——– 0 FacesDetected int32u 4 FacePosition int32u[4]

Sanyo MOV Tags

This information is found in Sanyo MOV videos.

Index1 Tag Name Writable —— ——– ——– 0 Make no 24 Model no 38 ExposureTime no 42 FNumber no 50 ExposureCompensation no 68 WhiteBalance no 72 FocalLength no

Sanyo MP4 Tags

This information is found in Sanyo MP4 videos.

Index1 Tag Name Writable —— ——– ——– 0 Make no 24 Model no 50 FNumber no 58 ExposureCompensation no 106 ISO no 209 Software no 210 Software no 241 Thumbnail Sanyo Thumbnail 242 Thumbnail Sanyo Thumbnail

Sanyo Thumbnail Tags

Index4 Tag Name Writable —— ——– ——– 1 ThumbnailWidth no 2 ThumbnailHeight no 3 ThumbnailLength no 4 ThumbnailOffset no

Samsung Tags

Tags found in the binary “STMN” format maker notes written by a number of Samsung models.

Index4 Tag Name Writable —— ——– ——– 0 MakerNoteVersion undef[8] 2 PreviewImageStart int32u* 3 PreviewImageLength int32u* 11 SamsungIFD Samsung IFD

Samsung IFD Tags

This is a standard-format IFD found in the maker notes of some Samsung models, except that the entry count is a 4-byte integer and the offsets are relative to the end of the IFD. Currently, no tags in this IFD are known, so the Unknown (-u) or Verbose (-v) option must be used to see this information.

Tag ID Tag Name Writable —— ——– ——– [no tags known]

Samsung Type2 Tags

Tags found in the EXIF-format maker notes of newer Samsung models.

Tag ID Tag Name Writable —— ——– ——– 0x0001 MakerNoteVersion undef[4] 0x0002 DeviceType int32u 0x0003 SamsungModelID int32u 0x0011 OrientationInfo Samsung OrientationInfo 0x0020 SmartAlbumColor int16u[2] 0x0021 PictureWizard Samsung PictureWizard 0x0030 LocalLocationName string 0x0031 LocationName string 0x0035 PreviewIFD Nikon PreviewIFD Nikon PreviewIFD 0x0040 RawDataByteOrder yes 0x0041 WhiteBalanceSetup int32u 0x0043 CameraTemperature rational64s 0x0050 RawDataCFAPattern yes 0x0100 FaceDetect int16u 0x0120 FaceRecognition int32u 0x0123 FaceName string 0xa001 FirmwareName string 0xa002 SerialNumber string 0xa003 LensType int16u[n] 0xa004 LensFirmware string 0xa005 InternalLensSerialNumber string 0xa010 SensorAreas int32u[8] 0xa011 ColorSpace int16u 0xa012 SmartRange int16u 0xa013 ExposureCompensation rational64s 0xa014 ISO int32u 0xa018 ExposureTime rational64u 0xa019 FNumber rational64u 0xa01a FocalLengthIn35mmFormat int32u 0xa020 EncryptionKey int32u[11]! 0xa021 WB_RGGBLevelsUncorrected int32u[4] 0xa022 WB_RGGBLevelsAuto int32u[4] 0xa023 WB_RGGBLevelsIlluminator1 int32u[4] 0xa024 WB_RGGBLevelsIlluminator2 int32u[4] 0xa025 HighlightLinearityLimit int32u 0xa028 WB_RGGBLevelsBlack int32s[4] 0xa030 ColorMatrix int32s[9] 0xa031 ColorMatrixSRGB int32s[9] 0xa032 ColorMatrixAdobeRGB int32s[9] 0xa033 CbCrMatrixDefault int32s[4] 0xa034 CbCrMatrix int32s[4] 0xa035 CbCrGainDefault int32u[2] 0xa036 CbCrGain int32u[2] 0xa040 ToneCurveSRGBDefault int32u[23] 0xa041 ToneCurveAdobeRGBDefault int32u[23] 0xa042 ToneCurveSRGB int32u[23] 0xa043 ToneCurveAdobeRGB int32u[23] 0xa048 RawData? int32s[12] 0xa050 Distortion? int32s[8] 0xa051 ChromaticAberration? int16u[22] 0xa052 Vignetting? int16u[15] 0xa053 VignettingCorrection? int16u[15] 0xa054 VignettingSetting? int16u[15]

Samsung OrientationInfo Tags

Camera orientation information written by the Gear 360 (SM-C200).

Index8 Tag Name Writable —— ——– ——– 0 YawAngle? rational64s 1 PitchAngle rational64s 2 RollAngle rational64s

Samsung PictureWizard Tags

Index2 Tag Name Writable —— ——– ——– 0 PictureWizardMode int16u 1 PictureWizardColor int16u 2 PictureWizardSaturation int16u 3 PictureWizardSharpness int16u 4 PictureWizardContrast int16u

Samsung APP5 Tags

Tag ID Tag Name Writable —— ——– ——– ssuniqueid UniqueID no

Samsung Trailer Tags

Tags extracted from the trailer of JPEG images written when using certain features (such as “Sound & Shot” or “Shot & More”) from Samsung models such as the Galaxy S4 and Tab S, and from the ‘sefd’ atom in HEIC images from the Samsung S10+.

Tag Name Writable ——– ——– DepthMapData no DepthMapData2 no DepthMapName no DualCameraImage no DualCameraImageName no DualShotExtra Samsung DualShotExtra EmbeddedAudioFile no EmbeddedAudioFileName no EmbeddedImage no EmbeddedImage2 no EmbeddedImageName no EmbeddedVideoFile no EmbeddedVideoType no MCCData no SingleShotDepthMap no SingleShotMeta Samsung SingleShotMeta SurroundShotVideo no SurroundShotVideoName no TimeStamp no

Samsung DualShotExtra Tags

Index4 Tag Name Writable —— ——– ——– 16 DepthMapWidth no 17 DepthMapHeight no

Samsung SingleShotMeta Tags

Tag ID Tag Name Writable —— ——– ——– beautyColorLevel BeautyColorLevel no beautyRetouchLevel BeautyRetouchLevel no blurStrength BlurStrength no bokehShape BokehShape no colorpopStrength ColorpopStrength no depthHWHeight DepthHWHeight no depthHWWidth DepthHWWidth no depthSWHeight DepthSWHeight no depthSWWidth DepthSWWidth no deviceOrientation DeviceOrientation no effectStrength EffectStrength no effectType EffectType no flipStatus FlipStatus no inputHeight InputHeight no inputWidth InputWidth no isArtBokeh IsArtBokeh no lensFacing LensFacing no monoStrength MonoStrength no objectOrientation ObjectOrientation no outputHeight OutputHeight no outputWidth OutputWidth no perfMode PerfMode no segHeight SegHeight no segWidth SegWidth no sidelightStrength SidelightStrength no spinStrength SpinStrength no vintageStrength VintageStrength no zoomStrength ZoomStrength no

Samsung sec Tags

This information is found in the @sec atom of Samsung MP4 videos from models such as the WB30F.

Index1 Tag Name Writable —— ——– ——– 0 Make no 32 Model no 512 ThumbnailWidth no 516 ThumbnailHeight no 520 ThumbnailLength no 524 ThumbnailImage no

Samsung INFO Tags

This information is found in MP4 videos from Samsung models such as the SMX-C20N.

Tag ID Tag Name Writable —— ——– ——– EFCT Effect no QLTY Quality no

Samsung MP4 Tags

This information is found in Samsung MP4 videos from models such as the WP10.

Index1 Tag Name Writable —— ——– ——– 0 Make no 24 Model no 46 ExposureTime no 50 FNumber no 58 ExposureCompensation no 106 ISO no 125 Software no 244 Thumbnail Samsung Thumbnail

Samsung Thumbnail Tags

Index4 Tag Name Writable —— ——– ——– 1 ThumbnailWidth no 2 ThumbnailHeight no 3 ThumbnailLength no 4 ThumbnailOffset no

Samsung smta Tags

This information is found in the smta atom of Samsung MP4 videos from models such as the Galaxy S4.

Tag ID Tag Name Writable —— ——– ——– mdln SamsungModel no svss SamsungSvss Samsung svss

Samsung svss Tags

This information is found in the svss atom of Samsung MP4 videos from models such as the Galaxy S4.

Tag ID Tag Name Writable —— ——– ——– [no tags known]

Ricoh Tags

Tag ID Tag Name Writable —— ——– ——– 0x0001 MakerNoteType string 0x0002 FirmwareVersion string 0x0005 SerialNumber undef[16] InternalSerialNumber undef[16] 0x0e00 PrintIM PrintIM 0x1000 RecordingFormat int16u 0x1001 ImageInfo Ricoh ImageInfo ExposureProgram int16u 0x1002 DriveMode int16u 0x1003 Sharpness int32u WhiteBalance int16u 0x1004 WhiteBalanceFineTune int16u 0x1006 FocusMode int16u 0x1007 AutoBracketing int16u 0x1009 MacroMode int16u 0x100a FlashMode int16u 0x100b FlashExposureComp rational64s 0x100c ManualFlashOutput rational64s 0x100d FullPressSnap int16u 0x100e DynamicRangeExpansion int16u 0x100f NoiseReduction int16u 0x1010 ImageEffects int16u 0x1011 Vignetting int16u 0x1012 Contrast int32u 0x1013 Saturation int32u 0x1014 Sharpness int32u 0x1015 ToningEffect int16u 0x1016 HueAdjust int16u 0x1017 WideAdapter int16u 0x1018 CropMode int16u 0x1019 NDFilter int16u 0x101a WBBracketShotNumber int16u 0x1200 AFStatus int16u 0x1201 AFAreaXPosition1 int32u 0x1202 AFAreaYPosition1 int32u 0x1203 AFAreaXPosition int32u 0x1204 AFAreaYPosition int32u 0x1205 AFAreaMode int16u 0x1307 ColorTempKelvin int32u 0x1308 ColorTemperature int32u 0x1500 FocalLength rational64u 0x1601 SensorWidth int32u 0x1602 SensorHeight int32u 0x1603 CroppedImageWidth int32u 0x1604 CroppedImageHeight int32u 0x2001 RicohSubdir Ricoh Subdir RicohSubdirIFD Ricoh Subdir RicohRR1Subdir Ricoh Subdir 0x4001 ThetaSubdir Ricoh ThetaSubdir

Ricoh ImageInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 RicohImageWidth int16u 2 RicohImageHeight int16u 6 RicohDate int8u[7] 28 PreviewImageStart int16u* 30 PreviewImageLength int16u* 32 FlashMode int8u 33 Macro int8u 34 Sharpness int8u 38 WhiteBalance int8u 39 ISOSetting int8u 40 Saturation int8u

Ricoh Subdir Tags

Tag ID Tag Name Writable —— ——– ——– 0x0004 ManufactureDate1 string[20] 0x0005 ManufactureDate2 string[20] 0x001a FaceInfo Ricoh FaceInfo 0x0029 FirmwareInfo Ricoh FirmwareInfo 0x002a NoiseReduction int32u 0x002c SerialInfo Ricoh SerialInfo

Ricoh FaceInfo Tags

Index1 Tag Name Writable —— ——– ——– 181 FacesDetected int8u 182 FaceDetectFrameSize int16u[2] 188 Face1Position int16u[4] 200 Face2Position int16u[4] 212 Face3Position int16u[4] 224 Face4Position int16u[4] 236 Face5Position int16u[4] 248 Face6Position int16u[4] 260 Face7Position int16u[4] 272 Face8Position int16u[4]

Ricoh FirmwareInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 FirmwareRevision string[12] 12 FirmwareRevision2 string[12]

Ricoh SerialInfo Tags

This information is found in images from the GXR.

Index1 Tag Name Writable —— ——– ——– 0 BodyFirmware string[16] 16 BodySerialNumber string[16] 32 LensFirmware string[16] 48 LensSerialNumber string[16]

Ricoh ThetaSubdir Tags

Tag ID Tag Name Writable —— ——– ——– 0x0003 Accelerometer rational64s[2] 0x0004 Compass rational64u 0x000a TimeZone string

Ricoh Type2 Tags

Tags written by models such as the Ricoh HZ15 and the Pentax XG-1. These are not writable due to numerous formatting errors as written by these cameras.

Tag ID Tag Name Writable —— ——– ——– 0x0207 RicohModel no 0x0300 RicohMake no

Ricoh Text Tags

Some Ricoh DC and RDC models use a text-based format for their maker notes instead of the IFD format used by the Caplio models. Below is a list of known tags in this information.

Tag ID Tag Name Writable —— ——– ——– Bg BlueGain no Gg GreenGain no Rev FirmwareVersion no Rg RedGain no Rv FirmwareVersion no

Ricoh RMETA Tags

The Ricoh Caplio Pro G3 has the ability to add custom fields to the APP5 “RMETA” segment of JPEG images. While only a few observed tags have been defined below, ExifTool will extract any information found here.

Tag ID Tag Name Writable —— ——– ——– Azimuth Azimuth no Condition Condition no Lit Lit no Location Location no Sign type SignType no _audio SoundFile no _barcode Barcodes no+

Ricoh AVI Tags

Tag ID Tag Name Writable —— ——– ——– mnrt MakerNoteRicoh Ricoh rdc2 RicohRDC2? no thum ThumbnailImage no ucmt Comment no

Ricoh RDTA Tags

Tag ID Tag Name Writable —— ——– ——– 0x0000 Accelerometer no 0x0010 TimeStamp no

Ricoh RDTB Tags

Tag ID Tag Name Writable —— ——– ——– 0x0000 Gyroscope no 0x0010 TimeStamp no

Ricoh RDTC Tags

Tag ID Tag Name Writable —— ——– ——– 0x0000 MagneticField no 0x0010 TimeStamp no

Ricoh RDTG Tags

Tag ID Tag Name Writable —— ——– ——– 0x0000 TimeStamp no 0x0064 FrameNumber no

Ricoh RDTL Tags

Tag ID Tag Name Writable —— ——– ——– 0x0000 GPSDateTime no 0x0008 GPSLatitude no 0x0010 GPSLongitude no 0x0018 GPSAltitude no

Sigma Tags

These tags are written by Sigma/Foveon cameras. In the early days Sigma was a class leader by releasing their maker note specification to the public, but since then they have deviated from this standard and newer camera models are less than consistent about their metadata formats.

Tag ID Tag Name Writable —— ——– ——– 0x0002 SerialNumber string 0x0003 DriveMode string 0x0004 ResolutionMode string 0x0005 AFMode string 0x0006 FocusSetting string 0x0007 WhiteBalance string 0x0008 ExposureMode string 0x0009 MeteringMode string 0x000a LensFocalRange string 0x000b ColorSpace string 0x000c ExposureCompensation string ExposureAdjust? rational64s 0x000d Contrast string Contrast rational64s 0x000e Shadow string Shadow rational64s 0x000f Highlight string Highlight rational64s 0x0010 Saturation string Saturation rational64s 0x0011 Sharpness string Sharpness rational64s 0x0012 X3FillLight string X3FillLight rational64s 0x0014 ColorAdjustment string ColorAdjustment rational64s[3] 0x0015 AdjustmentMode string 0x0016 Quality string 0x0017 Firmware string 0x0018 Software string 0x0019 AutoBracket string 0x001a PreviewImageStart int32u* ChrominanceNoiseReduction string 0x001b PreviewImageLength int32u* LuminanceNoiseReduction string 0x001c PreviewImageSize int16u[2] PreviewImageStart int32u* 0x001d MakerNoteVersion undef PreviewImageLength int32u* 0x001e PreviewImageSize int16u[2] 0x001f AFPoint string MakerNoteVersion undef 0x0022 FileFormat string 0x0024 Calibration string 0x0026 FileFormat string 0x0027 LensType string LensType - Sigma LensType 0x002a LensFocalRange rational64u[2] 0x002b LensMaxApertureRange rational64u[2] 0x002c ColorMode int32u 0x0030 LensApertureRange string Calibration string 0x0031 FNumber rational64u 0x0032 ExposureTime rational64u 0x0033 ExposureTime2 string 0x0034 BurstShot int32u 0x0035 ExposureCompensation rational64s 0x0039 SensorTemperature string 0x003a FlashExposureComp rational64s 0x003b Firmware string 0x003c WhiteBalance string 0x003d PictureMode string 0x0048 LensApertureRange string 0x0049 FNumber rational64u 0x004a ExposureTime rational64u 0x004b ExposureTime2 string 0x004d ExposureCompensation rational64s 0x0055 SensorTemperature string 0x0056 FlashExposureComp rational64s 0x0057 Firmware2 string 0x0058 WhiteBalance string 0x0059 DigitalFilter string 0x0084 Model string 0x0086 ISO int16u 0x0087 ResolutionMode string 0x0088 WhiteBalance string 0x008c Firmware string 0x011f CameraCalibration float[9] 0x0120 WBSettings Sigma WBSettings 0x0121 WBSettings2 Sigma WBSettings2

Sigma WBSettings Tags

Index4 Tag Name Writable —— ——– ——– 0 WB_RGBLevelsAuto float[3] 3 WB_RGBLevelsDaylight float[3] 6 WB_RGBLevelsShade float[3] 9 WB_RGBLevelsOvercast float[3] 12 WB_RGBLevelsIncandescent float[3] 15 WB_RGBLevelsFluorescent float[3] 18 WB_RGBLevelsFlash float[3] 21 WB_RGBLevelsCustom1 float[3] 24 WB_RGBLevelsCustom2 float[3] 27 WB_RGBLevelsCustom3 float[3]

Sigma WBSettings2 Tags

Index4 Tag Name Writable —— ——– ——– 0 WB_RGBLevelsUnknown0? float[3] 3 WB_RGBLevelsUnknown1? float[3] 6 WB_RGBLevelsUnknown2? float[3] 9 WB_RGBLevelsUnknown3? float[3] 12 WB_RGBLevelsUnknown4? float[3] 15 WB_RGBLevelsUnknown5? float[3] 18 WB_RGBLevelsUnknown6? float[3] 21 WB_RGBLevelsUnknown7? float[3] 24 WB_RGBLevelsUnknown8? float[3] 27 WB_RGBLevelsUnknown9? float[3]

Sony Tags

The following information has been decoded from the MakerNotes of Sony cameras. Some of these tags have been inherited from the Minolta MakerNotes.

Tag ID Tag Name Writable —— ——– ——– 0x0010 CameraInfo Sony CameraInfo CameraInfo2 Sony CameraInfo2 CameraInfo3 Sony CameraInfo3 CameraInfoUnknown Sony CameraInfoUnknown 0x0020 FocusInfo Sony FocusInfo MoreInfo Sony MoreInfo 0x0102 Quality int32u 0x0104 FlashExposureComp rational64s 0x0105 Teleconverter int32u 0x0112 WhiteBalanceFineTune int32u 0x0114 CameraSettings Sony CameraSettings CameraSettings2 Sony CameraSettings2 CameraSettings3 Sony CameraSettings3 CameraSettingsUnknown Sony CameraSettingsUnknown 0x0115 WhiteBalance int32u 0x0116 ExtraInfo Sony ExtraInfo ExtraInfo2 Sony ExtraInfo2 ExtraInfo3 Sony ExtraInfo3 0x0e00 PrintIM PrintIM 0x1000 MultiBurstMode undef 0x1001 MultiBurstImageWidth int16u 0x1002 MultiBurstImageHeight int16u 0x1003 Panorama Sony Panorama 0x2001 PreviewImage undef 0x2002 Rating int32u 0x2004 Contrast int32s 0x2005 Saturation int32s 0x2006 Sharpness int32s 0x2007 Brightness int32s 0x2008 LongExposureNoiseReduction int32u 0x2009 HighISONoiseReduction int16u 0x200a HDR int32u 0x200b MultiFrameNoiseReduction int32u 0x200e PictureEffect int16u 0x200f SoftSkinEffect int32u 0x2010 Tag2010a Sony Tag2010a Tag2010b Sony Tag2010b Tag2010c Sony Tag2010c Tag2010d Sony Tag2010d Tag2010e Sony Tag2010e Tag2010f Sony Tag2010f Tag2010g Sony Tag2010g Tag2010h Sony Tag2010h Tag2010i Sony Tag2010i 0x2011 VignettingCorrection int32u 0x2012 LateralChromaticAberration int32u 0x2013 DistortionCorrectionSetting int32u 0x2014 WBShiftAB_GM int32s[2] 0x2016 AutoPortraitFramed int16u 0x2017 FlashAction int32u 0x201a ElectronicFrontCurtainShutter int32u 0x201b FocusMode int8u 0x201c AFAreaModeSetting int8u 0x201d FlexibleSpotPosition int16u[2] 0x201e AFPointSelected int8u 0x2020 AFPointsUsed no 0x2021 AFTracking int8u 0x2022 FocalPlaneAFPointsUsed no 0x2023 MultiFrameNREffect int32u 0x2026 WBShiftAB_GM_Precise int32s[2]~ 0x2027 FocusLocation int16u[4] 0x2028 VariableLowPassFilter int16u[2] 0x2029 RAWFileType int16u 0x202a Tag202a Sony Tag202a 0x202b PrioritySetInAWB int8u 0x202c MeteringMode2 int16u 0x202d ExposureStandardAdjustment rational64s 0x202e Quality int16u[2] 0x202f PixelShiftInfo undef 0x2031 SerialNumber string 0x2032 Shadows int32s 0x2033 Highlights int32s 0x2034 Fade int32s 0x2035 SharpnessRange int32s 0x2036 Clarity int32s 0x2037 FocusFrameSize no 0x2039 JPEG-HEIFSwitch int16u 0x2044 HiddenInfo Sony HiddenInfo 0x204a FocusLocation2 int16u[4] 0x3000 ShotInfo Sony ShotInfo 0x900b Tag900b Sony Tag900b 0x9050 Tag9050a Sony Tag9050a Tag9050b Sony Tag9050b Tag9050c Sony Tag9050c Tag9050d Sony Tag9050d 0x9400 Tag9400a Sony Tag9400a Tag9400b Sony Tag9400b Tag9400c Sony Tag9400c 0x9401 Tag9401 Sony Tag9401 0x9402 Tag9402 Sony Tag9402 0x9403 Tag9403 Sony Tag9403 0x9404 Tag9404a Sony Tag9404a Tag9404b Sony Tag9404b Tag9404c Sony Tag9404c 0x9405 Tag9405a Sony Tag9405a Tag9405b Sony Tag9405b 0x9406 Tag9406 Sony Tag9406 Tag9406b Sony Tag9406b 0x940a Tag940a Sony Tag940a 0x940c Tag940c Sony Tag940c 0x940e AFInfo Sony AFInfo Tag940e Sony Tag940e 0x9416 Sony_0x9416 Sony Tag9416 0xb000 FileFormat int8u[4] 0xb001 SonyModelID int16u 0xb020 CreativeStyle string 0xb021 ColorTemperature int32u 0xb022 ColorCompensationFilter int32u 0xb023 SceneMode int32u 0xb024 ZoneMatching int32u 0xb025 DynamicRangeOptimizer int32u 0xb026 ImageStabilization int32u 0xb027 LensType int32u 0xb028 MinoltaMakerNote Minolta 0xb029 ColorMode int32u 0xb02a LensSpec int8u[8] 0xb02b FullImageSize int32u[2] 0xb02c PreviewImageSize int32u[2] 0xb040 Macro int16u 0xb041 ExposureMode int16u 0xb042 FocusMode int16u 0xb043 AFAreaMode int16u 0xb044 AFIlluminator int16u 0xb047 JPEGQuality int16u 0xb048 FlashLevel int16s 0xb049 ReleaseMode int16u 0xb04a SequenceNumber int16u 0xb04b Anti-Blur int16u 0xb04e FocusMode int16u 0xb04f DynamicRangeOptimizer int16u 0xb050 HighISONoiseReduction2 int16u 0xb052 IntelligentAuto int16u 0xb054 WhiteBalance int16u

Sony CameraInfo Tags

Camera information for the A700, A850 and A900.

Index1 Tag Name Writable —— ——– ——– 0 LensSpec undef[8] 20 FocusModeSetting int8u 21 AFPointSelected int8u 25 AFPoint int8u 30 AFStatusActiveSensor int16s 32 AFStatusUpper-left int16s 34 AFStatusLeft int16s 36 AFStatusLower-left int16s 38 AFStatusFarLeft int16s 40 AFStatusBottomAssist-left int16s 42 AFStatusBottom int16s 44 AFStatusBottomAssist-right int16s 46 AFStatusCenter-7 int16s 48 AFStatusCenter-horizontal int16s 50 AFStatusCenter-9 int16s 52 AFStatusCenter-10 int16s 54 AFStatusCenter-11 int16s 56 AFStatusCenter-12 int16s 58 AFStatusCenter-vertical int16s 60 AFStatusCenter-14 int16s 62 AFStatusTopAssist-left int16s 64 AFStatusTop int16s 66 AFStatusTopAssist-right int16s 68 AFStatusFarRight int16s 70 AFStatusUpper-right int16s 72 AFStatusRight int16s 74 AFStatusLower-right int16s 76 AFStatusCenterF2-8 int16s 304 AFMicroAdjValue int8u 305 AFMicroAdjMode int8u & 0x80 305.1 AFMicroAdjRegisteredLenses int8u & 0x7f

Sony CameraInfo2 Tags

Camera information for the DSLR-A200, A230, A290, A300, A330, A350, A380 and A390.

Index1 Tag Name Writable —— ——– ——– 0 LensSpec undef[8] 20 AFPointSelected int8u 21 FocusModeSetting int8u 24 AFPoint int8u 27 AFStatusActiveSensor int16s 29 AFStatusTop-right int16s 31 AFStatusBottom-right int16s 33 AFStatusBottom int16s 35 AFStatusMiddleHorizontal int16s 37 AFStatusCenterVertical int16s 39 AFStatusTop int16s 41 AFStatusTop-left int16s 43 AFStatusBottom-left int16s 45 AFStatusLeft int16s 47 AFStatusCenterHorizontal int16s 49 AFStatusRight int16s

Sony CameraInfo3 Tags

Camera information stored by the A33, A35, A55, A450, A500, A550, A560, A580, NEX-3/5/5C/C3 and VG10E. Some tags are valid only for some of these models.

Index1 Tag Name Writable —— ——– ——– 0 LensSpec undef[8] 14 FocalLength int16u 16 FocalLengthTeleZoom int16u 20 AFPointSelected int8u 21 FocusMode int8u 24 AFPoint int8u 25 FocusStatus int8u 27 AFStatusActiveSensor int16s 28 AFPointSelected int8u 29 FocusMode int8u AFStatusTop-right int16s 31 AFStatusBottom-right int16s 32 AFPoint int8u 33 AFStatusActiveSensor int16s AFStatusBottom int16s 35 AFStatus15 Sony AFStatus15 AFStatusMiddleHorizontal int16s 37 AFStatusCenterVertical int16s 39 AFStatusTop int16s 41 AFStatusTop-left int16s 43 AFStatusBottom-left int16s 45 AFStatusLeft int16s 47 AFStatusCenterHorizontal int16s 49 AFStatusRight int16s

Sony AFStatus15 Tags

AF Status information for models with 15-point AF.

Index1 Tag Name Writable —— ——– ——– 0 AFStatusUpper-left int16s 2 AFStatusLeft int16s 4 AFStatusLower-left int16s 6 AFStatusFarLeft int16s 8 AFStatusTopHorizontal int16s 10 AFStatusNearRight int16s 12 AFStatusCenterHorizontal int16s 14 AFStatusNearLeft int16s 16 AFStatusBottomHorizontal int16s 18 AFStatusTopVertical int16s 20 AFStatusCenterVertical int16s 22 AFStatusBottomVertical int16s 24 AFStatusFarRight int16s 26 AFStatusUpper-right int16s 28 AFStatusRight int16s 30 AFStatusLower-right int16s 32 AFStatusUpper-middle int16s 34 AFStatusLower-middle int16s

Sony CameraInfoUnknown Tags

Index1 Tag Name Writable —— ——– ——– [no tags known]

Sony FocusInfo Tags

More camera settings and focus information decoded for models such as the A200, A230, A290, A300, A330, A350, A380, A390, A700, A850 and A900.

Index1 Tag Name Writable —— ——– ——– 14 DriveMode2 int8u 16 Rotation int8u 20 ImageStabilizationSetting int8u 21 DynamicRangeOptimizerMode int8u 43 BracketShotNumber int8u 44 WhiteBalanceBracketing int8u 45 BracketShotNumber2 int8u 46 DynamicRangeOptimizerBracket int8u 47 ExposureBracketShotNumber int8u 63 ExposureProgram int8u 65 CreativeStyle int8u 109 ISOSetting int8u 111 ISO int8u 119 DynamicRangeOptimizerMode int8u 121 DynamicRangeOptimizerLevel int8u 2118 ShutterCount int32u 2491 FocusPosition int8u 4368 TiffMeteringImage no

Sony MoreInfo Tags

More camera settings information decoded for the A450, A500, A550, A560, A580, A33, A35, A55, NEX-3/5/C3 and VG10E.

Tag ID Tag Name Writable —— ——– ——– 0x0001 MoreSettings Sony MoreSettings 0x0002 FaceInfo Sony FaceInfo FaceInfoA Sony FaceInfoA 0x0107 TiffMeteringImage no 0x0201 MoreInfo0201 Sony MoreInfo0201 0x0401 MoreInfo0401 Sony MoreInfo0401

Sony MoreSettings Tags

Index1 Tag Name Writable —— ——– ——– 1 DriveMode2 int8u 2 ExposureProgram int8u 3 MeteringMode int8u 4 DynamicRangeOptimizerSetting int8u 5 DynamicRangeOptimizerLevel int8u 6 ColorSpace int8u 7 CreativeStyleSetting int8u 8 ContrastSetting int8s 9 SaturationSetting int8s 10 SharpnessSetting int8s 13 WhiteBalanceSetting int8u 14 ColorTemperatureSetting int8u 15 ColorCompensationFilterSet int8s 16 FlashMode int8u 17 LongExposureNoiseReduction int8u 18 HighISONoiseReduction int8u 19 FocusMode int8u 21 MultiFrameNoiseReduction int8u 22 HDRSetting int8u 23 HDRLevel int8u 24 ViewingMode int8u 25 FaceDetection int8u 26 CustomWB_RBLevels int16uRev[2] 30 BrightnessValue int8u ExposureCompensationSet int8u 31 ISO int8u FlashExposureCompSet int8u 32 FNumber int8u LiveViewAFMethod int8u 33 ExposureTime int8u ISO int8u 34 FNumber int8u 35 FocalLength2 int8u ExposureTime int8u 36 ExposureCompensation2 int16s 37 FocalLength2 int8u ISO int8u 38 FlashExposureCompSet2 int16s ExposureCompensation2 int16s FNumber int8u 39 ExposureTime int8u 40 Orientation2 int8u 41 FocusPosition2 int8u FocalLength2 int8u 42 FlashAction int8u ExposureCompensation2 int16s 43 FocusPosition2 int8u 44 FocusMode2 int8u FlashAction int8u FlashExposureCompSet2 int16s 46 FocusMode2 int8u Orientation2 int8u 47 FocusPosition2 int8u 48 FlashAction int8u 50 FocusMode2 int8u 119 FlashAction2 int8u 120 FlashActionExternal int8u 124 FlashActionExternal int8u 130 FlashStatus int8u 134 FlashStatus int8u

Sony FaceInfo Tags

Index2 Tag Name Writable —— ——– ——– 0 FacesDetected int16s 1 Face1Position int16u[4] 6 Face2Position int16u[4] 11 Face3Position int16u[4] 16 Face4Position int16u[4] 21 Face5Position int16u[4] 26 Face6Position int16u[4] 31 Face7Position int16u[4] 36 Face8Position int16u[4]

Sony FaceInfoA Tags

Index2 Tag Name Writable —— ——– ——– 3 FacesDetected no 11 PotentialFace1Position int16u[4] 21 PotentialFace2Position int16u[4] 31 PotentialFace3Position int16u[4] 41 PotentialFace4Position int16u[4] 51 PotentialFace5Position int16u[4] 61 PotentialFace6Position int16u[4] 71 PotentialFace7Position int16u[4] 81 PotentialFace8Position int16u[4] 91 Face1Position int16u[4] 101 Face2Position int16u[4] 111 Face3Position int16u[4] 121 Face4Position int16u[4]

Sony MoreInfo0201 Tags

Index1 Tag Name Writable —— ——– ——– 283 ImageCount int32u 293 ShutterCount int32u 330 ShutterCount int32u

Sony MoreInfo0401 Tags

Index1 Tag Name Writable —— ——– ——– 1102 ShotNumberSincePowerUp int32u

Sony CameraSettings Tags

Camera settings for the A200, A300, A350, A700, A850 and A900.

Index2 Tag Name Writable —— ——– ——– 0 ExposureTime int16u 1 FNumber int16u 2 HighSpeedSync int16u 3 ExposureCompensationSet int16u 4 DriveMode int16u & 0xff 5 WhiteBalanceSetting int16u 6 WhiteBalanceFineTune int16u 7 ColorTemperatureSet int16u 8 ColorCompensationFilterSet int16u 12 ColorTemperatureCustom int16u 13 ColorCompensationFilterCustom int16u 15 WhiteBalance int16u 16 FocusModeSetting int16u 17 AFAreaMode int16u 18 AFPointSetting int16u 19 FlashMode int16u 20 FlashExposureCompSet int16u 21 MeteringMode int16u 22 ISOSetting int16u 24 DynamicRangeOptimizerMode int16u 25 DynamicRangeOptimizerLevel int16u 26 CreativeStyle int16u 27 ColorSpace int16u 28 Sharpness int16u 29 Contrast int16u 30 Saturation int16u 31 ZoneMatchingValue int16u 34 Brightness int16u 35 FlashControl int16u 40 PrioritySetupShutterRelease int16u 41 AFIlluminator int16u 42 AFWithShutter int16u 43 LongExposureNoiseReduction int16u 44 HighISONoiseReduction int16u 45 ImageStyle int16u 46 FocusModeSwitch int16u 47 ShutterSpeedSetting int16u 48 ApertureSetting int16u 60 ExposureProgram int16u 61 ImageStabilizationSetting int16u 62 FlashAction int16u 63 Rotation int16u 64 AELock int16u 76 FlashAction2 int16u 77 FocusMode int16u 80 BatteryState int16u 81 BatteryLevel int16u 83 FocusStatus int16u 84 SonyImageSize int16u 85 AspectRatio int16u 86 Quality int16u 88 ExposureLevelIncrements int16u 106 RedEyeReduction int16u 154 FolderNumber int16u & 0x3ff 155 ImageNumber int16u & 0x3fff

Sony CameraSettings2 Tags

Camera settings for the A230, A290, A330, A380 and A390.

Index2 Tag Name Writable —— ——– ——– 0 ExposureTime int16u 1 FNumber int16u 2 HighSpeedSync int16u 3 ExposureCompensationSet int16u 4 WhiteBalanceSetting int16u 5 WhiteBalanceFineTune int16u 6 ColorTemperatureSet int16u 7 ColorCompensationFilterSet int16u 8 CustomWB_RGBLevels int16u[3] 11 ColorTemperatureCustom int16u 12 ColorCompensationFilterCustom int16u 14 WhiteBalance int16u 15 FocusModeSetting int16u 16 AFAreaMode int16u 17 AFPointSetting int16u 18 FlashExposureCompSet int16u 19 MeteringMode int16u 20 ISOSetting int16u 22 DynamicRangeOptimizerMode int16u 23 DynamicRangeOptimizerLevel int16u 24 CreativeStyle int16u 25 Sharpness int16u 26 Contrast int16u 27 Saturation int16u 31 FlashControl int16u 37 LongExposureNoiseReduction int16u 38 HighISONoiseReduction int16u 39 ImageStyle int16u 40 ShutterSpeedSetting int16u 41 ApertureSetting int16u 60 ExposureProgram int16u 61 ImageStabilizationSetting int16u 62 FlashAction int16u 63 Rotation int16u 64 AELock int16u 76 FlashAction2 int16u 77 FocusMode int16u 83 FocusStatus int16u 84 SonyImageSize int16u 85 AspectRatio int16u 86 Quality int16u 88 ExposureLevelIncrements int16u 126 DriveMode int16u & 0xff 127 FlashMode int16u 131 ColorSpace int16u

Sony CameraSettings3 Tags

Camera settings for models such as the A33, A35, A55, A450, A500, A550, A560, A580, NEX-3, NEX-5, NEX-C3 and NEX-VG10E.

Index1 Tag Name Writable —— ——– ——– 0 ShutterSpeedSetting int8u 1 ApertureSetting int8u 2 ISOSetting int8u 3 ExposureCompensationSet int8u 4 DriveModeSetting int8u 5 ExposureProgram int8u 6 FocusModeSetting int8u 7 MeteringMode int8u 9 SonyImageSize int8u 10 AspectRatio int8u 11 Quality int8u 12 DynamicRangeOptimizerSetting int8u 13 DynamicRangeOptimizerLevel int8u 14 ColorSpace int8u 15 CreativeStyleSetting int8u 16 ContrastSetting int8s 17 SaturationSetting int8s 18 SharpnessSetting int8s 22 WhiteBalanceSetting int8u 23 ColorTemperatureSetting int8u 24 ColorCompensationFilterSet int8s 25 CustomWB_RGBLevels int16uRev[3] 32 FlashMode int8u 33 FlashControl int8u 35 FlashExposureCompSet int8u 36 AFAreaMode int8u 37 LongExposureNoiseReduction int8u 38 HighISONoiseReduction int8u 39 SmileShutterMode int8u 40 RedEyeReduction int8u 45 HDRSetting int8u 46 HDRLevel int8u 47 ViewingMode int8u 48 FaceDetection int8u 49 SmileShutter int8u 50 SweepPanoramaSize int8u 51 SweepPanoramaDirection int8u 52 DriveMode int8u 53 MultiFrameNoiseReduction int8u 54 LiveViewAFSetting int8u 56 PanoramaSize3D int8u 131 AFButtonPressed int8u 132 LiveViewMetering int8u 133 ViewingMode2 int8u 134 AELock int8u 135 FlashStatusBuilt-in int8u 136 FlashStatusExternal int8u 139 LiveViewFocusMode int8u 153 LensMount int8u 268 SequenceNumber int8u 276 FolderNumber int32u & 0xffc000 276.1 ImageNumber int32u & 0x3fff 512 ShotNumberSincePowerUp2 int32u 643 AFButtonPressed int8u 644 LiveViewMetering int8u 645 ViewingMode2 int8u 646 AELock int8u 647 FlashStatusBuilt-in int8u 648 FlashStatusExternal int8u 651 LiveViewFocusMode int8u 780 SequenceNumber int8u 788 ImageNumber int16u & 0x3fff 790 FolderNumber int16u & 0x3ff 1008 LensE-mountVersion int16u 1011 LensFirmwareVersion int16u~ 1015 LensType2 int16u 1024 ImageNumber int16u & 0x3fff 1026 FolderNumber int16u & 0x3ff

Sony CameraSettingsUnknown Tags

Index2 Tag Name Writable —— ——– ——– [no tags known]

Sony ExtraInfo Tags

Extra hardware information for the A850 and A900.

Index1 Tag Name Writable —— ——– ——– 1 BatteryTemperature int8u 2 BatteryUnknown? no 8 BatteryVoltage? no 10 ImageStabilization2? int8u 12 BatteryLevel int8u 26 ExtraInfoVersion int8u[4]

Sony ExtraInfo2 Tags

Extra hardware information for the A230/290/330/380/390.

Index1 Tag Name Writable —— ——– ——– 4 BatteryLevel int8u 18 ImageStabilization int8u

Sony ExtraInfo3 Tags

Extra hardware information for the A33, A35, A55, A450, A500, A550, A560, A580 and NEX-3/5/C3/VG10.

Index1 Tag Name Writable —— ——– ——– 0 BatteryUnknown? int16u 2 BatteryTemperature int8u 4 BatteryLevel int8u 6 BatteryVoltage1 int16u 8 BatteryVoltage2 int16u 17 ImageStabilization int8u 20 BatteryState int8u ExposureProgram int8u ModeDialPosition int8u 22 MemoryCardConfiguration int8u & 0xc0 CameraOrientation int8u 24 CameraOrientation int8u & 0x30

Sony Panorama Tags

Tags found in panorama images from various Sony DSC, NEX, SLT and DSLR cameras. The width/height values of these tags are not affected by camera rotation – the width is always the longer dimension.

Index4 Tag Name Writable —— ——– ——– 1 PanoramaFullWidth int32u 2 PanoramaFullHeight int32u 3 PanoramaDirection int32u 4 PanoramaCropLeft int32u 5 PanoramaCropTop int32u 6 PanoramaCropRight int32u 7 PanoramaCropBottom int32u 8 PanoramaFrameWidth int32u 9 PanoramaFrameHeight int32u 10 PanoramaSourceWidth int32u 11 PanoramaSourceHeight int32u

Sony Tag2010a Tags

Valid for NEX-5N.

Index1 Tag Name Writable —— ——– ——– 1200 MeterInfo? Sony MeterInfo 4392 ReleaseMode3 int8u 4396 ReleaseMode2 int8u 4404 SelfTimer int8u 4408 FlashMode int8u 4414 StopsAboveBaseISO int16u 4416 BrightnessValue int16u 4420 DynamicRangeOptimizer int8u 4424 HDRSetting int8u 4428 ExposureCompensation int16s 4446 PictureProfile int8u 4447 PictureProfile int8u 4451 PictureEffect2 int8u 4464 Quality2 int8u 4468 MeteringMode int8u 4469 ExposureProgram int8u 4476 WB_RGBLevels int16u[3]

Sony MeterInfo Tags

Information possibly related to metering. Extracted only if the Unknown option is used.

Index1 Tag Name Writable —— ——– ——– 0 MeterInfo1Row1 int32u[27] 108 MeterInfo1Row2 int32u[27] 216 MeterInfo1Row3 int32u[27] 324 MeterInfo1Row4 int32u[27] 432 MeterInfo1Row5 int32u[27] 540 MeterInfo1Row6 int32u[27] 648 MeterInfo1Row7 int32u[27] 756 MeterInfo2Row1 int32u[33] 888 MeterInfo2Row2 int32u[33] 1020 MeterInfo2Row3 int32u[33] 1152 MeterInfo2Row4 int32u[33] 1284 MeterInfo2Row5 int32u[33] 1416 MeterInfo2Row6 int32u[33] 1548 MeterInfo2Row7 int32u[33] 1680 MeterInfo2Row8 int32u[33] 1812 MeterInfo2Row9 int32u[33]

Sony Tag2010b Tags

Valid for SLT-A65/A77, NEX-7/VG20E.

Index1 Tag Name Writable —— ——– ——– 0 SequenceImageNumber int32u 4 SequenceFileNumber int32u 8 ReleaseMode2 int32u 438 SonyDateTime undef[7] 804 DynamicRangeOptimizer int8u 1204 MeterInfo? Sony MeterInfo 4392 ReleaseMode3 int8u 4396 ReleaseMode2 int8u 4404 SelfTimer int8u 4408 FlashMode int8u 4414 StopsAboveBaseISO int16u 4416 BrightnessValue int16u 4420 DynamicRangeOptimizer int8u 4424 HDRSetting int8u 4428 ExposureCompensation int16s 4450 PictureProfile int8u 4451 PictureProfile int8u 4455 PictureEffect2 int8u 4468 Quality2 int8u 4472 MeteringMode int8u 4473 ExposureProgram int8u 4480 WB_RGBLevels int16u[3] 4632 SonyISO int16u 6691 DistortionCorrParams int16s[16]

Sony Tag2010c Tags

Valid for SLT-A37/A57 and NEX-F3.

Index1 Tag Name Writable —— ——– ——– 0 SequenceImageNumber int32u 4 SequenceFileNumber int32u 8 ReleaseMode2 int32u 512 DigitalZoomRatio int8u 528 SonyDateTime undef[7] 768 DynamicRangeOptimizer int8u 1168 MeterInfo? Sony MeterInfo 4356 ReleaseMode3 int8u 4360 ReleaseMode2 int8u 4368 SelfTimer int8u 4372 FlashMode int8u 4378 StopsAboveBaseISO int16u 4380 BrightnessValue int16u 4384 DynamicRangeOptimizer int8u 4388 HDRSetting int8u 4392 ExposureCompensation int16s 4414 PictureProfile int8u 4415 PictureProfile int8u 4419 PictureEffect2 int8u 4432 Quality2 int8u 4436 MeteringMode int8u 4437 ExposureProgram int8u 4444 WB_RGBLevels int16u[3] 4596 SonyISO int16u

Sony Tag2010d Tags

Valid for DSC-HX10V/HX20V/HX200V/TX66/TX200V/TX300V/WX50/WX100/WX150, but not valid for panorama images.

Index1 Tag Name Writable —— ——– ——– 0 SequenceImageNumber int32u 4 SequenceFileNumber int32u 8 ReleaseMode2 int32u 510 SonyDateTime undef[7] 892 DynamicRangeOptimizer int8u 1292 MeterInfo? Sony MeterInfo 4480 ReleaseMode3 int8u 4484 ReleaseMode2 int8u 4492 SelfTimer int8u 4496 FlashMode int8u 4502 StopsAboveBaseISO int16u 4504 BrightnessValue int16u 4508 DynamicRangeOptimizer int8u 4512 HDRSetting int8u 4538 PictureProfile int8u 4539 PictureProfile int8u 4543 PictureEffect2 int8u 4560 MeteringMode int8u 4561 ExposureProgram int8u 4568 WB_RGBLevels int16u[3] 4720 SonyISO int16u

Sony Tag2010e Tags

Valid for SLT-A58/A99, ILCE-3000/3500, NEX-3N/5R/5T/6/VG30E/VG900, DSC-RX100, DSC-RX1/RX1R. Also valid for DSC-HX300/HX50V/TX30/WX60/WX200/ WX300, but not for panorama images.

Index1 Tag Name Writable —— ——– ——– 0 SequenceImageNumber int32u 4 SequenceFileNumber int32u 8 ReleaseMode2 int32u 540 DigitalZoomRatio int8u 556 SonyDateTime undef[7] 808 DynamicRangeOptimizer int8u 1208 MeterInfo? Sony MeterInfo 4444 ReleaseMode3 int8u 4448 ReleaseMode2 int8u 4456 SelfTimer int8u 4460 FlashMode int8u 4466 StopsAboveBaseISO int16u 4468 BrightnessValue int16u 4472 DynamicRangeOptimizer int8u 4476 HDRSetting int8u 4480 ExposureCompensation int16s 4502 PictureProfile int8u 4503 PictureProfile int8u 4507 PictureEffect2 int8u 4520 Quality2 int8u 4524 MeteringMode int8u 4525 ExposureProgram int8u 4532 WB_RGBLevels int16u[3] 4692 SonyISO int16u 4696 SonyISO int16u 4728 FocalLength int16u 4730 MinFocalLength int16u 4732 MaxFocalLength int16u 4736 SonyISO int16u 6256 DistortionCorrParams int16s[16] 6289 LensFormat int8u 6290 LensMount int8u 6291 LensType2 int16u 6294 LensType int16u 6296 DistortionCorrParamsPresent int8u 6297 DistortionCorrParamsNumber int8u 6444 AspectRatio int8u 6792 AspectRatio int8u

Sony Tag2010f Tags

Valid for DSC-RX100M2, DSC-QX10/QX100.

Index1 Tag Name Writable —— ——– ——– 4 ReleaseMode2 int32u 80 DynamicRangeOptimizer int8u 480 MeterInfo? Sony MeterInfo 4116 ReleaseMode3 int8u 4120 ReleaseMode2 int8u 4128 SelfTimer int8u 4132 FlashMode int8u 4138 StopsAboveBaseISO int16u 4140 BrightnessValue int16u 4144 DynamicRangeOptimizer int8u 4148 HDRSetting int8u 4152 ExposureCompensation int16s 4174 PictureProfile int8u 4175 PictureProfile int8u 4179 PictureEffect2 int8u 4192 Quality2 int8u 4196 MeteringMode int8u 4197 ExposureProgram int8u 4204 WB_RGBLevels int16u[3] 4404 FocalLength int16u 4406 MinFocalLength int16u 4408 MaxFocalLength int16u 4412 SonyISO int16u 6444 AspectRatio int8u

Sony Tag2010g Tags

Valid for DSC-HX60V/HX350/HX400V/QX30/RX10/RX100M3/WX220/WX350, ILCE-7/7R/7S/7M2/5000/5100/6000/QX1, ILCA-68/77M2.

Index1 Tag Name Writable —— ——– ——– 4 ReleaseMode2 int32u 80 DynamicRangeOptimizer int8u 524 ReleaseMode3 int8u 528 ReleaseMode2 int8u 536 SelfTimer int8u 540 FlashMode int8u 546 StopsAboveBaseISO int16u 548 BrightnessValue int16u 552 DynamicRangeOptimizer int8u 556 HDRSetting int8u 560 ExposureCompensation int16s 582 PictureProfile int8u 583 PictureProfile int8u 587 PictureEffect2 int8u 600 Quality2 int8u 604 MeteringMode int8u 605 ExposureProgram int8u 612 WB_RGBLevels int16u[3] 812 FocalLength int16u 814 MinFocalLength int16u 816 MaxFocalLength int16u 836 SonyISO int16u 904 MeterInfo? Sony MeterInfo 6300 DistortionCorrParams int16s[16] 6333 LensFormat int8u 6334 LensMount int8u 6335 LensType2 int16u 6338 LensType int16u 6340 DistortionCorrParamsPresent int8u 6341 DistortionCorrParamsNumber int8u 6488 AspectRatio int8u

Sony Tag2010h Tags

Valid for DSC-HX80/HX90V/RX0/RX1RM2/RX10M2/RX10M3/RX100M4/RX100M5/WX500, ILCE-6300/6500/7RM2/7SM2, ILCA-99M2.

Index1 Tag Name Writable —— ——– ——– 4 ReleaseMode2 int32u 80 DynamicRangeOptimizer int8u 524 ReleaseMode3 int8u 528 ReleaseMode2 int8u 536 SelfTimer int8u 540 FlashMode int8u 546 StopsAboveBaseISO int16u 548 BrightnessValue int16u 552 DynamicRangeOptimizer int8u 556 HDRSetting int8u 560 ExposureCompensation int16s 582 PictureProfile int8u 583 PictureProfile int8u 587 PictureEffect2 int8u 600 Quality2 int8u 604 MeteringMode int8u 605 ExposureProgram int8u 612 WB_RGBLevels int16u[3] 812 FocalLength int16u 814 MinFocalLength int16u 816 MaxFocalLength int16u 838 SonyISO int16u 904 MeterInfo? Sony MeterInfo 920 MeterInfo? Sony MeterInfo 6348 DistortionCorrParams int16s[16] 6381 LensFormat int8u 6382 LensMount int8u 6383 LensType2 int16u 6386 LensType int16u 6388 DistortionCorrParamsPresent int8u 6389 DistortionCorrParamsNumber int8u 6444 AspectRatio int8u

Sony Tag2010i Tags

Valid for ILCE-6100/6400/6600/7C/7M3/7RM3/7RM4/9/9M2, DSC-RX0M2/RX10M4/RX100M6/ RX100M5A/RX100M7/HX99.

Index1 Tag Name Writable —— ——– ——– 4 ReleaseMode2 int32u 78 DynamicRangeOptimizer int8u 516 ReleaseMode3 int8u 520 ReleaseMode2 int8u 528 SelfTimer int8u 529 FlashMode int8u 535 StopsAboveBaseISO int16u 537 BrightnessValue int16u 539 DynamicRangeOptimizer int8u 543 HDRSetting int8u 547 ExposureCompensation int16s 567 PictureProfile int8u 568 PictureProfile int8u 572 PictureEffect2 int8u 583 Quality2 int8u 587 MeteringMode int8u 588 ExposureProgram int8u 594 WB_RGBLevels int16u[3] 778 FocalLength int16u 780 MinFocalLength int16u 782 MaxFocalLength int16u 800 SonyISO int16u 877 MeterInfo? Sony MeterInfo9 6096 DistortionCorrParams int16s[16] 6129 LensFormat int8u 6130 LensMount int8u 6131 LensType2 int16u 6134 LensType int16u 6136 DistortionCorrParamsPresent int8u 6137 DistortionCorrParamsNumber int8u 6284 AspectRatio int8u

Sony MeterInfo9 Tags

Information possibly related to metering. Extracted only if the Unknown option is used.

Index1 Tag Name Writable —— ——– ——– 0 MeterInfo1Row1 no 90 MeterInfo1Row2 no 180 MeterInfo1Row3 no 270 MeterInfo1Row4 no 360 MeterInfo1Row5 no 450 MeterInfo1Row6 no 540 MeterInfo1Row7 no 630 MeterInfo2Row1 no 740 MeterInfo2Row2 no 850 MeterInfo2Row3 no 960 MeterInfo2Row4 no 1070 MeterInfo2Row5 no 1180 MeterInfo2Row6 no 1290 MeterInfo2Row7 no 1400 MeterInfo2Row8 no 1510 MeterInfo2Row9 no

Sony Tag202a Tags

Index1 Tag Name Writable —— ——– ——– 1 FocalPlaneAFPointsUsed int8u 2 FocalPlaneAFPointArea int16u[2] 6 FocalPlaneAFPointLocation1 int16u[2] 10 FocalPlaneAFPointLocation2 int16u[2] 14 FocalPlaneAFPointLocation3 int16u[2] 18 FocalPlaneAFPointLocation4 int16u[2] 22 FocalPlaneAFPointLocation5 int16u[2] 26 FocalPlaneAFPointLocation6 int16u[2] 30 FocalPlaneAFPointLocation7 int16u[2] 34 FocalPlaneAFPointLocation8 int16u[2] 38 FocalPlaneAFPointLocation9 int16u[2] 42 FocalPlaneAFPointLocation10 int16u[2] 46 FocalPlaneAFPointLocation11 int16u[2] 50 FocalPlaneAFPointLocation12 int16u[2] 54 FocalPlaneAFPointLocation13 int16u[2] 58 FocalPlaneAFPointLocation14 int16u[2] 62 FocalPlaneAFPointLocation15 int16u[2]

Sony HiddenInfo Tags

Index4 Tag Name Writable —— ——– ——– 0 HiddenDataOffset int32u 1 HiddenDataLength int32u

Sony ShotInfo Tags

Index1 Tag Name Writable —— ——– ——– 2 FaceInfoOffset no 6 SonyDateTime string[20] 26 SonyImageHeight int16u 28 SonyImageWidth int16u 48 FacesDetected int16u 50 FaceInfoLength no 52 MetaVersion string[16] 72 FaceInfo1 Sony FaceInfo1 94 FaceInfo2 Sony FaceInfo2

Sony FaceInfo1 Tags

Index1 Tag Name Writable —— ——– ——– 0 Face1Position int16u[4] 32 Face2Position int16u[4] 64 Face3Position int16u[4] 96 Face4Position int16u[4] 128 Face5Position int16u[4] 160 Face6Position int16u[4] 192 Face7Position int16u[4] 224 Face8Position int16u[4]

Sony FaceInfo2 Tags

Index1 Tag Name Writable —— ——– ——– 0 Face1Position int16u[4] 37 Face2Position int16u[4] 74 Face3Position int16u[4] 111 Face4Position int16u[4] 148 Face5Position int16u[4] 185 Face6Position int16u[4] 222 Face7Position int16u[4] 259 Face8Position int16u[4]

Sony Tag900b Tags

Index1 Tag Name Writable —— ——– ——– 2 FacesDetected no 189 FaceDetection no

Sony Tag9050a Tags

Data for tags 0x9050, 0x94xx and 0x2010 is encrypted by a simple substitution cipher, but the deciphered values are listed below.

Index1 Tag Name Writable —— ——– ——– 0 SonyMaxAperture int8u 1 SonyMinAperture int8u 32 Shutter int16u[3] 49 FlashStatus int8u 50 ShutterCount int32u 58 SonyExposureTime int16u 60 SonyFNumber int16u 63 ReleaseMode2 int8u 76 ShutterCount2 int32u 81 SonyDateTime2 undef[6] 103 ReleaseMode2 int8u 124 InternalSerialNumber int8u[4]~ 240 InternalSerialNumber int8u[5] 261 LensMount int8u 262 LensFormat int8u 263 LensType2 int16u 265 LensType int16u 267 DistortionCorrParamsPresent int8u 276 APS-CSizeCapture int8u 277 LensSpecFeatures undef[2] 278 LensSpecFeatures undef[2] 416 ShutterCount3 int32u 426 ShutterCount3 int32u 445 ShutterCount3 int32u

Sony Tag9050b Tags

Valid from July 2015 for ILCE-6100/6300/6400/6500/6600/7C/7M3/7RM2/7RM3/7RM4/ 7SM2/9/9M2, ILCA-99M2.

Index1 Tag Name Writable —— ——– ——– 0 SonyMaxAperture int8u 1 SonyMinAperture int8u 38 Shutter int16u[3] 57 FlashStatus int8u 58 ShutterCount int32u 70 SonyExposureTime int16u 72 SonyFNumber int16u 75 ReleaseMode2 int8u 80 ShutterCount2 int32u 82 ShutterCount2 int32u 88 ShutterCount2 int32u 97 SonyTimeMinSec no 107 ReleaseMode2 int8u 109 ReleaseMode2 int8u 115 ReleaseMode2 int8u 136 InternalSerialNumber int8u[6]~ 261 LensMount int8u 262 LensFormat int8u 263 LensType2 int16u 265 LensType int16u 267 DistortionCorrParamsPresent int8u 276 APS-CSizeCapture int8u 278 LensSpecFeatures undef[2] 415 ShutterCount3 int32u 459 ShutterCount3 int32u 461 ShutterCount3 int32u 491 APS-CSizeCapture int8u 493 LensSpecFeatures undef[2] 494 APS-CSizeCapture int8u 496 LensSpecFeatures undef[2] 538 APS-CSizeCapture int8u 540 LensSpecFeatures undef[2] APS-CSizeCapture int8u 542 LensSpecFeatures undef[2]

Sony Tag9050c Tags

Valid from July 2020 for ILCE-1/7SM3, ILME-FX3.

Index1 Tag Name Writable —— ——– ——– 38 Shutter int16u[3] 57 FlashStatus int8u 58 ShutterCount int32u~ 70 SonyExposureTime int16u 72 SonyFNumber int16u 75 ReleaseMode2 int8u 80 ShutterCount2 int32u 102 SonyExposureTime int16u 104 SonyFNumber int16u 107 ReleaseMode2 int8u 136 InternalSerialNumber int8u[6]~ 138 InternalSerialNumber int8u[6]~

Sony Tag9050d Tags

Valid for ILCE-6700/7CM2/7CR/ZV-E1.

Index1 Tag Name Writable —— ——– ——– 10 ShutterCount int32u 26 SonyExposureTime int16u 28 SonyFNumber int16u 31 ReleaseMode2 int8u 56 InternalSerialNumber int8u[6]~

Sony Tag9400a Tags

Valid for many DSC, NEX and SLT models

Index1 Tag Name Writable —— ——– ——– 8 SequenceImageNumber int32u 12 SequenceFileNumber int32u 16 ReleaseMode2 int8u 18 DigitalZoom int8u 26 ShotNumberSincePowerUp int32u 34 SequenceLength int8u 40 CameraOrientation int8u 41 Quality2 int8u 68 SonyImageHeight int16u~ 82 ModelReleaseYear int8u~

Sony Tag9400b Tags

Valid for NEX-3N, ILCE-3000/3500, SLT-A58, DSC-WX60, DSC-WX300, DSC-RX100M2, DSC-HX50V, DSC-QX10/QX100.

Index1 Tag Name Writable —— ——– ——– 8 SequenceImageNumber int32u 12 SequenceFileNumber int32u 16 ReleaseMode2 int8u 18 DigitalZoom int8u 22 ShotNumberSincePowerUp int32u 30 SequenceLength int8u 36 CameraOrientation int8u 37 Quality2 int8u 63 SonyImageHeight int16u~ 70 ModelReleaseYear int8u~

Sony Tag9400c Tags

Valid for DSC-HX60V/HX80/HX90V/HX99/HX350/HX400V/QX30/RX0/RX1RM2/RX10/ RX10M2/RX10M3/RX10M4/RX100M3/RX100M4/RX100M5/RX100M5A/RX100M6/RX100M7/WX220/ WX350/WX500, ILCE-1/7/7C/7R/7S/7M2/7M3/7RM2/7RM3/7RM4/7SM2/7SM3/9/9M2/5000/ 5100/6000/6100/6300/6400/6500/6600/QX1, ILCA-68/77M2/99M2.

Index1 Tag Name Writable —— ——– ——– 9 ReleaseMode2 int8u 10 ShotNumberSincePowerUp int32u 18 SequenceImageNumber int32u 22 SequenceLength int8u 26 SequenceFileNumber int32u 30 SequenceLength int8u 41 CameraOrientation int8u 42 Quality2 int8u 83 ModelReleaseYear int8u~ 307 ShutterType int8u 313 ShutterType int8u 319 ShutterType int8u

Sony Tag9401 Tags

Index1 Tag Name Writable —— ——– ——– 994 ISOInfo Sony ISOInfo 1012 ISOInfo Sony ISOInfo 1102 ISOInfo Sony ISOInfo 1176 ISOInfo Sony ISOInfo 1181 ISOInfo Sony ISOInfo 1185 ISOInfo Sony ISOInfo 1186 ISOInfo Sony ISOInfo 1210 ISOInfo Sony ISOInfo 1437 ISOInfo Sony ISOInfo 1588 ISOInfo Sony ISOInfo 1590 ISOInfo Sony ISOInfo 1612 ISOInfo Sony ISOInfo 1619 ISOInfo Sony ISOInfo 1656 ISOInfo Sony ISOInfo 1720 ISOInfo Sony ISOInfo 1758 ISOInfo Sony ISOInfo 1767 ISOInfo Sony ISOInfo

Sony ISOInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 ISOSetting int8u 2 ISOAutoMin int8u 4 ISOAutoMax int8u

Sony Tag9402 Tags

Index1 Tag Name Writable —— ——– ——– 4 AmbientTemperature int8s 22 FocusMode int8u & 0x7f 23 AFAreaMode int8u 45 FocusPosition2 int8u

Sony Tag9403 Tags

Index1 Tag Name Writable —— ——– ——– 5 CameraTemperature int8s

Sony Tag9404a Tags

Index1 Tag Name Writable —— ——– ——– 11 ExposureProgram int8u 13 IntelligentAuto int8u 25 LensZoomPosition int16u

Sony Tag9404b Tags

Index1 Tag Name Writable —— ——– ——– 12 ExposureProgram int8u 14 IntelligentAuto int8u 30 LensZoomPosition int16u 32 FocusPosition2 int8u

Sony Tag9404c Tags

Index1 Tag Name Writable —— ——– ——– 11 ExposureProgram int8u 13 IntelligentAuto int8u

Sony Tag9405a Tags

Valid for SLT, NEX, ILCE-3000/3500 and several DSC models.

Index1 Tag Name Writable —— ——– ——– 1536 DistortionCorrParamsPresent int8u 1537 DistortionCorrection int8u 1539 LensFormat int8u 1540 LensMount int8u 1541 LensType2 int16u 1544 LensType int16u 1610 VignettingCorrParams int16s[16] 1642 ChromaticAberrationCorrParams int16s[32] 1738 DistortionCorrParams int16s[16]

Sony Tag9405b Tags

Valid for DSC-HX60V/HX80/HX90V/HX99/HX350/HX400V/QX30/RX0/RX10/RX10M2/ RX10M3/RX10M4/RX100M3/RX100M4/RX100M5/RX100M5A/RX100M6/RX100M7/WX220/WX350, ILCE-7/7M2/7M3/7R/7RM2/7RM3/7RM4/7S/7SM2/9/9M2/5000/5100/6000/6100/6300/ 6400/6500/6600/QX1, ILCA-68/77M2/99M2.

Index1 Tag Name Writable —— ——– ——– 4 SonyISO int16u 6 BaseISO int16u 10 StopsAboveBaseISO int16u 14 SonyExposureTime2 int16u 16 ExposureTime rational32u 20 SonyFNumber int16u 22 SonyMaxApertureValue int16u 36 SequenceImageNumber int32u 52 ReleaseMode2 int8u 62 SonyImageWidthMax int16u 64 SonyImageHeightMax int16u 66 HighISONoiseReduction int8u 68 LongExposureNoiseReduction int8u 70 PictureEffect2 int8u 72 ExposureProgram int8u 74 CreativeStyle int8u 82 Sharpness int8s 90 DistortionCorrParamsPresent int8u 91 DistortionCorrection int8u 93 LensFormat int8u 94 LensMount int8u 96 LensType2 int16u 98 LensType int16u 100 DistortionCorrParams int16s[16] 834 LensZoomPosition int16u 842 VignettingCorrParams int16s[16] 846 LensZoomPosition int16u 848 VignettingCorrParams int16s[16] 858 LensZoomPosition int16u 860 VignettingCorrParams int16s[16] 872 VignettingCorrParams int16s[16] 892 ChromaticAberrationCorrParams int16s[32] 900 ChromaticAberrationCorrParams int16s[32] 924 ChromaticAberrationCorrParams int16s[32] 944 ChromaticAberrationCorrParams int16s[32] 952 ChromaticAberrationCorrParams int16s[32]

Sony Tag9406 Tags

Index1 Tag Name Writable —— ——– ——– 5 BatteryTemperature int8u 6 BatteryLevelGrip1 int8u 7 BatteryLevel int8u 8 BatteryLevelGrip2 int8u

Sony Tag9406b Tags

Index1 Tag Name Writable —— ——– ——– 5 BatteryLevel int8u 7 BatteryLevel2 int8u

Sony Tag940a Tags

These tags are currently extracted for SLT models only.

Index1 Tag Name Writable —— ——– ——– 4 AFPointsSelected int32u

Sony Tag940c Tags

E-mount cameras only.

Index1 Tag Name Writable —— ——– ——– 8 LensMount2 int8u 9 LensType3 int16u 11 CameraE-mountVersion int16u 13 LensE-mountVersion int16u 20 LensFirmwareVersion int16u~

Sony AFInfo Tags

These tags are currently extracted for SLT models only.

Index1 Tag Name Writable —— ——– ——– 2 AFType int8u 4 AFStatusActiveSensor int16s 5 FocusMode int8u 7 AFPoint int8u 8 AFPointInFocus int8u 9 AFPointAtShutterRelease int8u 10 AFAreaMode int8u 11 FocusMode int8u 16 AFPointsUsed int8u[10] 17 AFStatus15 Sony AFStatus15 AFStatus19 Sony AFStatus19 55 AFPoint int8u 56 AFPointInFocus int8u 57 AFPointAtShutterRelease int8u 58 AFAreaMode int8u 59 AFStatusActiveSensor int16s 67 ExposureProgram int8u 80 AFMicroAdj int8s 125 AFStatus79 Sony AFStatus79 366 AFPointsUsed int32u 381 AFMicroAdj int8s 382 ExposureProgram int8u

Sony AFStatus19 Tags

AF Status information for models with 19-point AF.

Index1 Tag Name Writable —— ——– ——– 0 AFStatusUpperFarLeft int16s 2 AFStatusUpper-leftHorizontal int16s 4 AFStatusFarLeftHorizontal int16s 6 AFStatusLeftHorizontal int16s 8 AFStatusLowerFarLeft int16s 10 AFStatusLower-leftHorizontal int16s 12 AFStatusUpper-leftVertical int16s 14 AFStatusLeftVertical int16s 16 AFStatusLower-leftVertical int16s 18 AFStatusFarLeftVertical int16s 20 AFStatusTopHorizontal int16s 22 AFStatusNearRight int16s 24 AFStatusCenterHorizontal int16s 26 AFStatusNearLeft int16s 28 AFStatusBottomHorizontal int16s 30 AFStatusTopVertical int16s 32 AFStatusUpper-middle int16s 34 AFStatusCenterVertical int16s 36 AFStatusLower-middle int16s 38 AFStatusBottomVertical int16s 40 AFStatusUpperFarRight int16s 42 AFStatusUpper-rightHorizontal int16s 44 AFStatusFarRightHorizontal int16s 46 AFStatusRightHorizontal int16s 48 AFStatusLowerFarRight int16s 50 AFStatusLower-rightHorizontal int16s 52 AFStatusFarRightVertical int16s 54 AFStatusUpper-rightVertical int16s 56 AFStatusRightVertical int16s 58 AFStatusLower-rightVertical int16s

Sony AFStatus79 Tags

AF Status information for models with 79-point AF.

Index1 Tag Name Writable —— ——– ——– 0 AFStatus_00_B4 int16s 2 AFStatus_01_C4 int16s 4 AFStatus_02_D4 int16s 6 AFStatus_03_E4 int16s 8 AFStatus_04_F4 int16s 10 AFStatus_05_G4 int16s 12 AFStatus_06_H4 int16s 14 AFStatus_07_B3 int16s 16 AFStatus_08_C3 int16s 18 AFStatus_09_D3 int16s 20 AFStatus_10_E3 int16s 22 AFStatus_11_F3 int16s 24 AFStatus_12_G3 int16s 26 AFStatus_13_H3 int16s 28 AFStatus_14_B2 int16s 30 AFStatus_15_C2 int16s 32 AFStatus_16_D2 int16s 34 AFStatus_17_E2 int16s 36 AFStatus_18_F2 int16s 38 AFStatus_19_G2 int16s 40 AFStatus_20_H2 int16s 42 AFStatus_21_C1 int16s 44 AFStatus_22_D1 int16s 46 AFStatus_23_E1 int16s 48 AFStatus_24_F1 int16s 50 AFStatus_25_G1 int16s 52 AFStatus_26_A7_Vertical int16s 54 AFStatus_27_A6_Vertical int16s 56 AFStatus_28_A5_Vertical int16s 58 AFStatus_29_C7_Vertical int16s 60 AFStatus_30_C6_Vertical int16s 62 AFStatus_31_C5_Vertical int16s 64 AFStatus_32_E7_Vertical int16s 66 AFStatus_33_E6_Center_Vertical int16s 68 AFStatus_34_E5_Vertical int16s 70 AFStatus_35_G7_Vertical int16s 72 AFStatus_36_G6_Vertical int16s 74 AFStatus_37_G5_Vertical int16s 76 AFStatus_38_I7_Vertical int16s 78 AFStatus_39_I6_Vertical int16s 80 AFStatus_40_I5_Vertical int16s 82 AFStatus_41_A7 int16s 84 AFStatus_42_B7 int16s 86 AFStatus_43_C7 int16s 88 AFStatus_44_D7 int16s 90 AFStatus_45_E7 int16s 92 AFStatus_46_F7 int16s 94 AFStatus_47_G7 int16s 96 AFStatus_48_H7 int16s 98 AFStatus_49_I7 int16s 100 AFStatus_50_A6 int16s 102 AFStatus_51_B6 int16s 104 AFStatus_52_C6 int16s 106 AFStatus_53_D6 int16s 108 AFStatus_54_E6_Center int16s 110 AFStatus_55_F6 int16s 112 AFStatus_56_G6 int16s 114 AFStatus_57_H6 int16s 116 AFStatus_58_I6 int16s 118 AFStatus_59_A5 int16s 120 AFStatus_60_B5 int16s 122 AFStatus_61_C5 int16s 124 AFStatus_62_D5 int16s 126 AFStatus_63_E5 int16s 128 AFStatus_64_F5 int16s 130 AFStatus_65_G5 int16s 132 AFStatus_66_H5 int16s 134 AFStatus_67_I5 int16s 136 AFStatus_68_C11 int16s 138 AFStatus_69_D11 int16s 140 AFStatus_70_E11 int16s 142 AFStatus_71_F11 int16s 144 AFStatus_72_G11 int16s 146 AFStatus_73_B10 int16s 148 AFStatus_74_C10 int16s 150 AFStatus_75_D10 int16s 152 AFStatus_76_E10 int16s 154 AFStatus_77_F10 int16s 156 AFStatus_78_G10 int16s 158 AFStatus_79_H10 int16s 160 AFStatus_80_B9 int16s 162 AFStatus_81_C9 int16s 164 AFStatus_82_D9 int16s 166 AFStatus_83_E9 int16s 168 AFStatus_84_F9 int16s 170 AFStatus_85_G9 int16s 172 AFStatus_86_H9 int16s 174 AFStatus_87_B8 int16s 176 AFStatus_88_C8 int16s 178 AFStatus_89_D8 int16s 180 AFStatus_90_E8 int16s 182 AFStatus_91_F8 int16s 184 AFStatus_92_G8 int16s 186 AFStatus_93_H8 int16s 188 AFStatus_94_E6_Center_F2-8 int16s

Sony Tag940e Tags

E-mount models.

Index1 Tag Name Writable —— ——– ——– 6662 TiffMeteringImageWidth no 6663 TiffMeteringImageHeight no 6664 TiffMeteringImage no

Sony Tag9416 Tags

Valid for the ILCE-1/6700/7CM2/7CR/7M4/7RM5/7SM3/9M3, ILME-FX3/FX30, ZV-E1.

Index1 Tag Name Writable —— ——– ——– 0 Tag9416_0000 no 4 SonyISO no 6 StopsAboveBaseISO no 10 SonyExposureTime2 no 12 ExposureTime no 16 SonyFNumber2 no 18 SonyMaxApertureValue no 29 SequenceImageNumber no 43 ReleaseMode2 no 53 ExposureProgram no 55 CreativeStyle no 72 LensMount no 73 LensFormat no 74 LensMount no 75 LensType2 no 77 LensType no 79 DistortionCorrParams no 112 PictureProfile no 113 FocalLength no 115 MinFocalLength no 117 MaxFocalLength no 2191 VignettingCorrParams no 2193 VignettingCorrParams no 2205 VignettingCorrParams no 2229 APS-CSizeCapture no 2231 APS-CSizeCapture no 2277 APS-CSizeCapture no 2324 ChromaticAberrationCorrParams no 2326 ChromaticAberrationCorrParams no 2373 ChromaticAberrationCorrParams no

Sony PIC Tags

The TextInfo data is extracted as a block to preserve the formatting, and some of the more interesting information is extracted as separate tags.

Tag ID Tag Name Writable —— ——– ——– BC: Barcode no BarCode: Barcode no Capt: SensorTemperature no FWVer: FirmwareVersion no IFD PIC_IFD Sony Temp: CameraTemperature no Temp:Clbt: BoardTemperature no TextInfo1 TextInfo1 no TextInfo2 TextInfo2 no VR Enable C: VibrationReduction no barcode: Barcode no

Sony Ericsson Tags

Maker notes found in images from some Sony Ericsson phones.

Tag ID Tag Name Writable —— ——– ——– 0x0201 PreviewImageStart int32u* 0x0202 PreviewImageLength int32u* 0x2000 MakerNoteVersion undef[4]

Sony SRF Tags

The maker notes in SRF (Sony Raw Format) images contain 7 IFD’s with family 1 group names SRF0 through SRF6. SRF0 and SRF1 use the tags in this table, while SRF2 through SRF5 use the tags in the next table, and SRF6 uses standard EXIF tags. All information other than SRF0 is encrypted, but thanks to Dave Coffin the decryption algorithm is known. SRF images are written by the Sony DSC-F828 and DSC-V3.

Tag ID Tag Name Writable —— ——– ——– 0x0000 SRF2Key no 0x0001 DataKey no

Sony SRF2 Tags

These tags are found in the SRF2 through SRF5 IFD’s.

Tag ID Tag Name Writable —— ——– ——– 0x0002 SRF6Offset no 0x0003 SRFDataOffset? no 0x0004 RawDataOffset no 0x0005 RawDataLength no 0x0043 MaxApertureAtMaxFocal no 0x0044 MaxApertureAtMinFocal no 0x0045 MinFocalLength no 0x0046 MaxFocalLength no 0x00c0 WBRedDaylight no 0x00c1 WBGreenDaylight no 0x00c2 WBBlueDaylight no 0x00c3 WBRedCloudy no 0x00c4 WBGreenCloudy no 0x00c5 WBBlueCloudy no 0x00c6 WBRedFluorescent no 0x00c7 WBGreenFluorescent no 0x00c8 WBBlueFluorescent no 0x00c9 WBRedTungsten no 0x00ca WBGreenTungsten no 0x00cb WBBlueTungsten no 0x00cc WBRedFlash no 0x00cd WBGreenFlash no 0x00ce WBBlueFlash no 0x00d0 WBRedAsShot no 0x00d1 WBGreenAsShot no 0x00d2 WBBlueAsShot no

Sony SR2Private Tags

The SR2 format uses the DNGPrivateData tag to reference a private IFD containing these tags. SR2 images are written by the Sony DSC-R1, but this information is also written to ARW images by other models.

Tag ID Tag Name Writable —— ——– ——– 0x7200 SR2SubIFDOffset no 0x7201 SR2SubIFDLength no 0x7221 SR2SubIFDKey no 0x7240 IDC_IFD SonyIDC 0x7241 IDC2_IFD SonyIDC 0x7250 MRWInfo MinoltaRaw

Sony SR2SubIFD Tags

Tags in the encrypted SR2SubIFD

Tag ID Tag Name Writable —— ——– ——– 0x7300 BlackLevel int16u[4]! 0x7302 WB_GRBGLevelsAuto int16s[4]! 0x7303 WB_GRBGLevels int16s[4]! 0x7310 BlackLevel int16u[4]! 0x7312 WB_RGGBLevelsAuto int16s[4]! 0x7313 WB_RGGBLevels int16s[4]! 0x7480 WB_RGBLevelsDaylight int16s[4]! 0x7481 WB_RGBLevelsCloudy int16s[4]! 0x7482 WB_RGBLevelsTungsten int16s[4]! 0x7483 WB_RGBLevelsFlash int16s[4]! 0x7484 WB_RGBLevels4500K int16s[4]! 0x7486 WB_RGBLevelsFluorescent int16s[4]! 0x74a0 MaxApertureAtMaxFocal no 0x74a1 MaxApertureAtMinFocal no 0x74a2 MaxFocalLength no 0x74a3 MinFocalLength no 0x74c0 SR2DataIFD Sony SR2DataIFD 0x7800 ColorMatrix no 0x7820 WB_RGBLevelsDaylight int16s[3]! 0x7821 WB_RGBLevelsCloudy int16s[3]! 0x7822 WB_RGBLevelsTungsten int16s[3]! 0x7823 WB_RGBLevelsFlash int16s[3]! 0x7824 WB_RGBLevels4500K int16s[3]! 0x7825 WB_RGBLevelsShade int16s[3]! 0x7826 WB_RGBLevelsFluorescent int16s[3]! 0x7827 WB_RGBLevelsFluorescentP1 int16s[3]! 0x7828 WB_RGBLevelsFluorescentP2 int16s[3]! 0x7829 WB_RGBLevelsFluorescentM1 int16s[3]! 0x782a WB_RGBLevels8500K int16s[3]! 0x782b WB_RGBLevels6000K int16s[3]! 0x782c WB_RGBLevels3200K int16s[3]! 0x782d WB_RGBLevels2500K int16s[3]! 0x787f WhiteLevel int16u[3]! 0x797d VignettingCorrParams no 0x7980 ChromaticAberrationCorrParams no 0x7982 DistortionCorrParams no

Sony SR2DataIFD Tags

Tag ID Tag Name Writable —— ——– ——– 0x7770 ColorMode no

Sony PMP Tags

These tags are written in the proprietary-format header of PMP images from the DSC-F1.

Index1 Tag Name Writable —— ——– ——– 8 JpgFromRawStart no 12 JpgFromRawLength no 22 SonyImageWidth no 24 SonyImageHeight no 27 Orientation no 29 ImageQuality no 52 Comment no 76 DateTimeOriginal no 84 ModifyDate no 102 ExposureTime no 106 FNumber no 108 ExposureCompensation no 112 FocalLength no 118 Flash no

Sony rtmd Tags

These tags are extracted from the ‘rtmd’ timed metadata of MP4 videos from some models when the ExtractEmbedded option is used.

Tag ID Tag Name Writable —— ——– ——– 0x8000 FNumber no 0x8109 ExposureTime no 0x810a MasterGainAdjustment no 0x810b ISO no 0x810c ElectricalExtenderMagnification no 0x8500 GPSVersionID no 0x8501 GPSLatitudeRef no 0x8502 GPSLatitude no 0x8503 GPSLongitudeRef no 0x8504 GPSLongitude no 0x8507 GPSTimeStamp no 0x8509 GPSStatus no 0x850a GPSMeasureMode no 0x8512 GPSMapDatum no 0x851d GPSDateStamp no 0xe303 WhiteBalance no 0xe304 DateTime no 0xe43b PitchRollYaw no 0xe44b Accelerometer no

SonyIDC Tags

Tags written by the Sony Image Data Converter utility in ARW images.

Tag ID Tag Name Writable —— ——– ——– 0x0201 IDCPreviewStart int32u* 0x0202 IDCPreviewLength int32u* 0x8000 IDCCreativeStyle int32u 0x8001 CreativeStyleWasChanged int32u 0x8002 PresetWhiteBalance int32u 0x8013 ColorTemperatureAdj int16u 0x8014 PresetWhiteBalanceAdj int32s 0x8015 ColorCorrection int32s 0x8016 SaturationAdj int32s 0x8017 ContrastAdj int32s 0x8018 BrightnessAdj int32s 0x8019 HueAdj int32s 0x801a SharpnessAdj int32s 0x801b SharpnessOvershoot int32s 0x801c SharpnessUndershoot int32s 0x801d SharpnessThreshold int32s 0x801e NoiseReductionMode int16u 0x8021 GrayPoint int16u[4] 0x8022 D-RangeOptimizerMode int16u 0x8023 D-RangeOptimizerValue int32s 0x8024 D-RangeOptimizerHighlight int32s 0x8026 HighlightColorDistortReduct int16u 0x8027 NoiseReductionValue int32s 0x8028 EdgeNoiseReduction int32s 0x8029 ColorNoiseReduction int32s 0x802d D-RangeOptimizerShadow int32s 0x8030 PeripheralIllumCentralRadius int32s 0x8031 PeripheralIllumCentralValue int32s 0x8032 PeripheralIllumPeriphValue int32s 0x8040 DistortionCompensation int32s 0x9000 ToneCurveBrightnessX int16u[n] 0x9001 ToneCurveRedX int16u[n] 0x9002 ToneCurveGreenX int16u[n] 0x9003 ToneCurveBlueX int16u[n] 0x9004 ToneCurveBrightnessY int16u[n] 0x9005 ToneCurveRedY int16u[n] 0x9006 ToneCurveGreenY int16u[n] 0x9007 ToneCurveBlueY int16u[n] 0x900d ChromaticAberrationCorrection int32s 0x900e InclinationCorrection int32u 0x900f InclinationAngle int32s 0x9010 Cropping int32u 0x9011 CropArea int32u[4] 0x9012 PreviewImageSize int32u[2] 0x9013 PxShiftPeriphEdgeNR int32s 0x9014 PxShiftPeriphEdgeNRValue int32s 0x9017 WhitesAdj int32s 0x9018 BlacksAdj int32s 0x9019 HighlightsAdj int32s 0x901a ShadowsAdj int32s 0xd000 CurrentVersion int32u 0xd001 VersionIFD SonyIDC 0xd100 VersionCreateDate string 0xd101 VersionModifyDate string

Unknown Tags

The following tags are decoded in unsupported maker notes. Use the Unknown (-u) option to display other unknown tags.

Tag ID Tag Name Writable —— ——– ——– 0x0e00 PrintIM PrintIM

DNG Tags

The main DNG tags are found in the EXIF table. The tables below define only information found within structures of these main DNG tag values. See <http://www.adobe.com/products/dng/> for the official DNG specification.

DNG AdobeData Tags

This information is found in the “Adobe” DNGPrivateData.

The maker notes (‘MakN’) are processed by ExifTool, but some information may have been lost by the Adobe DNG Converter. This is because the Adobe DNG Converter (as of version 6.3) doesn’t properly handle information referenced from inside the maker notes that lies outside the original maker notes block. This information is lost when only the maker note block is copied to the DNG image. While this doesn’t effect all makes of cameras, it is a problem for some major brands such as Olympus and Sony.

Other entries in this table represent proprietary information that is extracted from the original RAW image and restructured to a different (but still proprietary) Adobe format.

Tag ID Tag Name Writable —— ——– ——– CRW AdobeCRW CanonRaw Koda AdobeKoda Kodak IFD Leaf AdobeLeaf Leaf SubIFD MRW AdobeMRW MinoltaRaw MakN MakerNoteApple Apple MakerNoteNikon Nikon MakerNoteCanon Canon MakerNoteCasio Casio MakerNoteCasio2 Casio Type2 MakerNoteDJIInfo DJI Info MakerNoteDJI DJI MakerNoteFLIR FLIR MakerNoteFujiFilm FujiFilm MakerNoteGE GE MakerNoteGE2 FujiFilm MakerNoteHasselblad Unknown MakerNoteHP HP MakerNoteHP2 HP Type2 MakerNoteHP4 HP Type4 MakerNoteHP6 HP Type6 MakerNoteISL Unknown MakerNoteJVC JVC MakerNoteJVCText JVC Text MakerNoteKodak1a Kodak MakerNoteKodak1b Kodak MakerNoteKodak2 Kodak Type2 MakerNoteKodak3 Kodak Type3 MakerNoteKodak4 Kodak Type4 MakerNoteKodak5 Kodak Type5 MakerNoteKodak6a Kodak Type6 MakerNoteKodak6b Kodak Type6 MakerNoteKodak7 Kodak Type7 MakerNoteKodak8a Kodak Type8 MakerNoteKodak8b Kodak Type8 MakerNoteKodak8c Kodak Type8 MakerNoteKodak9 Kodak Type9 MakerNoteKodak10 Kodak Type10 MakerNoteKodak11 Kodak Type11 MakerNoteKodak12 Kodak Type11 MakerNoteKodakUnknown Kodak Unknown MakerNoteKyocera Unknown MakerNoteMinolta Minolta MakerNoteMinolta2 Olympus MakerNoteMinolta3 undef MakerNoteMotorola Motorola MakerNoteNikon2 Nikon Type2 MakerNoteNikon3 Nikon MakerNoteNintendo Nintendo MakerNoteOlympus Olympus MakerNoteOlympus2 Olympus MakerNoteOlympus3 Olympus MakerNoteLeica Panasonic MakerNoteLeica2 Panasonic Leica2 MakerNoteLeica3 Panasonic Leica3 MakerNoteLeica4 Panasonic Leica4 MakerNoteLeica5 Panasonic Leica5 MakerNoteLeica6 Panasonic Leica6 MakerNoteLeica7 Panasonic Leica6 MakerNoteLeica8 Panasonic Leica5 MakerNoteLeica9 Panasonic Leica9 MakerNoteLeica10 Panasonic MakerNotePanasonic Panasonic MakerNotePanasonic2 Panasonic Type2 MakerNotePanasonic3 Panasonic MakerNotePentax Pentax MakerNotePentax2 Pentax Type2 MakerNotePentax3 Casio Type2 MakerNotePentax4 Pentax Type4 MakerNotePentax5 Pentax MakerNotePentax6 Pentax S1 MakerNotePhaseOne PhaseOne MakerNoteReconyx Reconyx MakerNoteReconyx2 Reconyx Type2 MakerNoteReconyx3 Reconyx Type3 MakerNoteRicohPentax Pentax MakerNoteRicoh Ricoh MakerNoteRicoh2 Ricoh Type2 MakerNoteRicohText Ricoh Text MakerNoteSamsung1a undef MakerNoteSamsung1b Samsung MakerNoteSamsung2 Samsung Type2 MakerNoteSanyo Sanyo MakerNoteSanyoC4 Sanyo MakerNoteSanyoPatch Sanyo MakerNoteSigma Sigma MakerNoteSony Sony MakerNoteSony2 Olympus MakerNoteSony3 Olympus MakerNoteSony4 Sony PIC MakerNoteSony5 Sony MakerNoteSonyEricsson Sony Ericsson MakerNoteSonySRF Sony SRF MakerNoteUnknownText undef MakerNoteUnknownBinary undef MakerNoteUnknown Unknown Pano AdobePano PanasonicRaw RAF AdobeRAF FujiFilm RAF SR2 AdobeSR2 Sony SR2Private

DNG OriginalRaw Tags

This table defines tags extracted from the DNG OriginalRawFileData information.

Tag ID Tag Name Writable —— ——– ——– 0x0000 OriginalRawImage no 0x0001 OriginalRawResource no 0x0002 OriginalRawFileType no 0x0003 OriginalRawCreator no 0x0004 OriginalTHMImage no 0x0005 OriginalTHMResource no 0x0006 OriginalTHMFileType no 0x0007 OriginalTHMCreator no

DNG ImageSeq Tags

Index1 Tag Name Writable —— ——– ——– 0 SeqID no 1 SeqType no 2 SeqFrameInfo no 3 SeqIndex no 7 SeqCount no 11 SeqFinal no

DNG ProfileDynamicRange Tags

Index1 Tag Name Writable —— ——– ——– 0 PDRVersion no 2 DynamicRange no 4 HintMaxOutputValue no

JSON Tags

Other than a few tags in the table below, JSON tags have not been pre-defined. However, ExifTool will read any existing tags from basic JSON-formatted files.

Tag Name Writable ——– ——– ON1_SettingsData PLIST ON1_SettingsMetadataCreated no ON1_SettingsMetadataModified no ON1_SettingsMetadataName no ON1_SettingsMetadataPluginID no ON1_SettingsMetadataTimestamp no ON1_SettingsMetadataUsage no ON1_SettingsMetadataVisibleToUser no

CBOR Tags

The tags below are extracted from CBOR (Concise Binary Object Representation) metadata. The C2PA specification uses this format for some metadata. As well as these tags, ExifTool will read any existing tags.

Tag Name Writable ——– ——– AuthorIdentifier no AuthorName no DocumentID no Format no InstanceID no Relationship no ThumbnailHash no+ ThumbnailURL no Title no

PLIST Tags

Apple Property List tags. ExifTool reads both XML and binary-format PLIST files, and will extract any existing tags even if they aren’t listed below. These tags belong to the family 0 “PLIST” group, but family 1 group may be either “XML” or “PLIST” depending on whether the format is XML or binary.

Tag ID Tag Name Writable —— ——– ——– MetaDataList//DateTimeOriginal DateTimeOriginal no MetaDataList//Duration Duration no MetaDataList//Geolocation/Latitude GPSLatitude no MetaDataList//Geolocation/Longitude GPSLongitude no MetaDataList//Geolocation/MapDatum GPSMapDatum no XMLFileType XMLFileType no cast//name Cast no+ codirectors//name Codirectors no+ directors//name Directors no+ producers//name Producers no+ screenwriters//name Screenwriters no+ studio//name Studio no+

CanonRaw Tags

These tags apply to CRW-format Canon RAW files and information in the APP0 “CIFF” segment of JPEG images. When writing CanonRaw/CIFF information, the length of the information is preserved (and the new information is truncated or padded as required) unless Writable is resize. Currently, only JpgFromRaw and ThumbnailImage are allowed to change size. See <https://exiftool.org/canon_raw.html> for a description of the Canon CRW format.

CRW images also support the addition of a CanonVRD trailer, which in turn supports XMP. This trailer is created automatically if necessary when ExifTool is used to write XMP to a CRW image.

Tag ID Tag Name Writable —— ——– ——– 0x0000 NullRecord undef 0x0001 FreeBytes undef 0x0032 CanonColorInfo1 no 0x0805 CanonFileDescription string[32] UserComment string[256] 0x080a CanonRawMakeModel CanonRaw MakeModel 0x080b CanonFirmwareVersion string[32] 0x080c ComponentVersion string 0x080d ROMOperationMode string[8] 0x0810 OwnerName string[32] 0x0815 CanonImageType string[32] 0x0816 OriginalFileName string[32] 0x0817 ThumbnailFileName string[32] 0x100a TargetImageType int16u 0x1010 ShutterReleaseMethod int16u 0x1011 ShutterReleaseTiming int16u 0x1016 ReleaseSetting int16u 0x101c BaseISO int16u 0x1028 CanonFlashInfo? int16u[4] 0x1029 CanonFocalLength Canon FocalLength 0x102a CanonShotInfo Canon ShotInfo 0x102c CanonColorInfo2 no 0x102d CanonCameraSettings Canon CameraSettings 0x1030 WhiteSample CanonRaw WhiteSample 0x1031 SensorInfo Canon SensorInfo 0x1033 CustomFunctions10D CanonCustom Functions10D CustomFunctionsD30 CanonCustom FunctionsD30 CustomFunctionsD60 CanonCustom FunctionsD30 CustomFunctionsUnknown CanonCustom FuncsUnknown 0x1038 CanonAFInfo Canon AFInfo 0x1093 CanonFileInfo Canon FileInfo 0x10a9 ColorBalance Canon ColorBalance 0x10ae ColorTemperature int16u 0x10b4 ColorSpace int16u 0x10b5 RawJpgInfo CanonRaw RawJpgInfo 0x1803 ImageFormat CanonRaw ImageFormat 0x1804 RecordID int32u 0x1806 SelfTimerTime int32u 0x1807 TargetDistanceSetting float 0x180b SerialNumber int32u UnknownNumber? yes 0x180e TimeStamp CanonRaw TimeStamp 0x1810 ImageInfo CanonRaw ImageInfo 0x1813 FlashInfo CanonRaw FlashInfo 0x1814 MeasuredEV float 0x1817 FileNumber int32u 0x1818 ExposureInfo CanonRaw ExposureInfo 0x1834 CanonModelID int32u 0x1835 DecoderTable CanonRaw DecoderTable 0x183b SerialNumberFormat int32u 0x2005 RawData no 0x2007 JpgFromRaw resize^ 0x2008 ThumbnailImage resize^ 0x2804 ImageDescription CanonRaw 0x2807 CameraObject CanonRaw 0x3002 ShootingRecord CanonRaw 0x3003 MeasuredInfo CanonRaw 0x3004 CameraSpecification CanonRaw 0x300a ImageProps CanonRaw 0x300b ExifInformation CanonRaw

CanonRaw MakeModel Tags

Index1 Tag Name Writable —— ——– ——– 0 Make string[6] 6 Model string

CanonRaw WhiteSample Tags

Index2 Tag Name Writable —— ——– ——– 1 WhiteSampleWidth no 2 WhiteSampleHeight no 3 WhiteSampleLeftBorder no 4 WhiteSampleTopBorder no 5 WhiteSampleBits no

CanonRaw RawJpgInfo Tags

Index2 Tag Name Writable —— ——– ——– 1 RawJpgQuality int16u 2 RawJpgSize int16u 3 RawJpgWidth int16u 4 RawJpgHeight int16u

CanonRaw ImageFormat Tags

Index4 Tag Name Writable —— ——– ——– 0 FileFormat int32u 1 TargetCompressionRatio float

CanonRaw TimeStamp Tags

Index4 Tag Name Writable —— ——– ——– 0 DateTimeOriginal int32u 1 TimeZoneCode int32s 2 TimeZoneInfo int32u

CanonRaw ImageInfo Tags

Index4 Tag Name Writable —— ——– ——– 0 ImageWidth no 1 ImageHeight no 2 PixelAspectRatio no 3 Rotation int32s 4 ComponentBitDepth no 5 ColorBitDepth no 6 ColorBW no

CanonRaw FlashInfo Tags

Index4 Tag Name Writable —— ——– ——– 0 FlashGuideNumber float 1 FlashThreshold float

CanonRaw ExposureInfo Tags

Index4 Tag Name Writable —— ——– ——– 0 ExposureCompensation float 1 ShutterSpeedValue float 2 ApertureValue float

CanonRaw DecoderTable Tags

Index4 Tag Name Writable —— ——– ——– 0 DecoderTableNumber no 2 CompressedDataOffset no 3 CompressedDataLength no

KyoceraRaw Tags

Tags for Kyocera Contax N Digital RAW images.

Index1 Tag Name Writable —— ——– ——– 1 FirmwareVersion no 12 Model no 25 Make no 33 DateTimeOriginal no 52 ISO no 56 ExposureTime no 60 WB_RGGBLevels no 88 FNumber no 104 MaxAperture no 112 FocalLength no 124 Lens no

MinoltaRaw Tags

These tags are used in Minolta RAW format (MRW) images.

Tag ID Tag Name Writable —— ——– ——– “�PRD” MinoltaPRD MinoltaRaw PRD “�RIF” MinoltaRIF MinoltaRaw RIF “�TTW” MinoltaTTW EXIF “�WBG” MinoltaWBG MinoltaRaw WBG

MinoltaRaw PRD Tags

Index1 Tag Name Writable —— ——– ——– 0 FirmwareID string[8] 8 SensorHeight int16u 10 SensorWidth int16u 12 ImageHeight int16u 14 ImageWidth int16u 16 RawDepth int8u 17 BitDepth int8u 18 StorageMethod int8u 23 BayerPattern int8u

MinoltaRaw RIF Tags

Index1 Tag Name Writable —— ——– ——– 1 Saturation int8s 2 Contrast int8s 3 Sharpness int8s 4 WBMode int8u~ 5 ProgramMode int8u 6 ISOSetting int8u 7 ColorMode int32u[0.25] 8 WB_RBLevelsTungsten int16u[2] 12 WB_RBLevelsDaylight int16u[2] 16 WB_RBLevelsCloudy int16u[2] 20 WB_RBLevelsCoolWhiteF int16u[2] 24 WB_RBLevelsFlash int16u[2] 28 WB_RBLevelsCustom int16u[2] 32 WB_RBLevelsShade int16u[2] 36 WB_RBLevelsDaylightF int16u[2] 40 WB_RBLevelsDayWhiteF int16u[2] 44 WB_RBLevelsWhiteF int16u[2] 56 ColorFilter int8s 57 BWFilter int8u 58 ZoneMatching int8u 59 Hue int8s 60 ColorTemperature int8u 74 ZoneMatching int8u 76 ColorTemperature int8u 77 ColorFilter int8u 78 ColorTemperature int8u 79 ColorFilter int8u 80 RawDataLength no

MinoltaRaw WBG Tags

Index1 Tag Name Writable —— ——– ——– 0 WBScale int8u[4] 4 WB_GBRGLevels int16u[4] WB_RGGBLevels int16u[4]

JFIF Tags

The following information is extracted from the JPEG JFIF header. See <https://www.w3.org/Graphics/JPEG/jfif3.pdf> for the JFIF 1.02 specification.

Index1 Tag Name Writable —— ——– ——– 0 JFIFVersion no: 2 ResolutionUnit int8u: 3 XResolution int16u: 5 YResolution int16u: 7 ThumbnailWidth no 8 ThumbnailHeight no 9 ThumbnailTIFF no

JFIF Extension Tags

Thumbnail images extracted from the JFXX segment.

Tag ID Tag Name Writable —— ——– ——– 0x0010 ThumbnailImage no 0x0011 ThumbnailTIFF no 0x0013 ThumbnailTIFF no

FlashPix Tags

The FlashPix file format, introduced in 1996, was developed by Kodak, Hewlett-Packard and Microsoft. Internally the FPX file structure mimics that of an old DOS disk with fixed-sized “sectors” (usually 512 bytes) and a “file allocation table” (FAT). No wonder this image format never became popular. However, some of the structures used in FlashPix streams are part of the EXIF specification, and are still being used in the APP2 FPXR segment of JPEG images by some digital cameras from manufacturers such as FujiFilm, Hewlett-Packard, Kodak and Sanyo.

ExifTool extracts FlashPix information from both FPX images and the APP2 FPXR segment of JPEG images. As well, FlashPix information is extracted from DOC, PPT, XLS (Microsoft Word, PowerPoint and Excel) documents, VSD (Microsoft Visio) drawings, and FLA (Macromedia/Adobe Flash project) files since these are based on the same file format as FlashPix (the Windows Compound Binary File format). Note that ExifTool identifies any unrecognized Windows Compound Binary file as a FlashPix (FPX) file. See <http://graphcomp.com/info/specs/livepicture/fpx.pdf> for the FlashPix specification.

Note that Microsoft is not consistent with the time zone used for some date/time tags, and it may be either UTC or local time depending on the software used to create the file.

Tag ID Tag Name Writable —— ——– ——– “CompObj” CompObj FlashPix CompObj “Audio Info” AudioInfo FlashPix AudioInfo “Data Object” DataObject FlashPix DataObject “DocumentSummaryInformation” DocumentInfo FlashPix DocumentInfo “Extension List” Extensions FlashPix Extensions “Global Info” GlobalInfo FlashPix GlobalInfo “Image Contents” Image FlashPix Image “Image Info” ImageInfo FlashPix ImageInfo “Operation” Operation FlashPix Operation “Screen Nail” ScreenNail no “SummaryInformation” SummaryInfo FlashPix SummaryInfo “Transform” Transform FlashPix Transform Audio Stream AudioStream no BasicFileInfo BasicFileInfo no Contents Contents XMP Current User CurrentUser no ICC Profile 0001 ICC_Profile ICC_Profile IeImg EmbeddedImage no IeImg_class EmbeddedImageClass no IeImg_rect EmbeddedImageRectangle no Preview PreviewImage no Property PreviewInfo FlashPix PreviewInfo Subimage 0000 Header SubimageHdr FlashPix SubimageHdr WordDocument WordDocument FlashPix WordDocument _eeJPG EmbeddedImage no _eeLink LinkedFileName no _eePNG EmbeddedPNG no

FlashPix CompObj Tags

Index4 Tag Name Writable —— ——– ——– 0 CompObjUserTypeLen no 1 CompObjUserType no

FlashPix AudioInfo Tags

Tag ID Tag Name Writable —— ——– ——– [no tags known]

FlashPix DataObject Tags

Tag ID Tag Name Writable —— ——– ——– 0x10000 DataObjectID no 0x10002 LockedPropertyList no 0x10003 DataObjectTitle no 0x10004 LastModifier no 0x10005 RevisionNumber no 0x10006 DataCreateDate no 0x10007 DataModifyDate no 0x10008 CreatingApplication no 0x10100 DataObjectStatus no 0x10101 CreatingTransform no 0x10102 UsingTransforms no 0x10000000 CachedImageHeight no 0x10000001 CachedImageWidth no

FlashPix DocumentInfo Tags

The DocumentSummaryInformation property set includes a UserDefined property set for which only the Hyperlinks and HyperlinkBase tags are pre-defined. However, ExifTool will also extract any other information found in the UserDefined properties.

Tag ID Tag Name Writable —— ——– ——– 0x0002 Category no 0x0003 PresentationTarget no 0x0004 Bytes no 0x0005 Lines no 0x0006 Paragraphs no 0x0007 Slides no 0x0008 Notes no 0x0009 HiddenSlides no 0x000a MMClips no 0x000b ScaleCrop no 0x000c HeadingPairs no 0x000d TitleOfParts no 0x000e Manager no 0x000f Company no 0x0010 LinksUpToDate no 0x0011 CharCountWithSpaces no 0x0013 SharedDoc no 0x0016 HyperlinksChanged no 0x0017 AppVersion no 0x001a ContentType no 0x001b ContentStatus no 0x001c Language no 0x001d DocVersion no _PID_HLINKS Hyperlinks no _PID_LINKBASE HyperlinkBase no

FlashPix Extensions Tags

Tag ID Tag Name Writable —— ——– ——– 0x0001 ExtensionName no 0x0002 ExtensionClassID no 0x0003 ExtensionPersistence no 0x0004 ExtensionCreateDate no 0x0005 ExtensionModifyDate no 0x0006 CreatingApplication no 0x0007 ExtensionDescription no 0x1000 Storage-StreamPathname no 0x2000 FlashPixStreamPathname no 0x2001 FlashPixStreamFieldOffset no 0x3000 PropertySetPathname no 0x3001 PropertySetIDCodes no 0x3002 PropertyVectorElements no 0x4000 SubimageResolutions no 0x10000000 UsedExtensionNumbers no

FlashPix GlobalInfo Tags

Tag ID Tag Name Writable —— ——– ——– 0x10002 LockedPropertyList no 0x10003 TransformedImageTitle no 0x10004 LastModifier no 0x10100 VisibleOutputs no 0x10101 MaximumImageIndex no 0x10102 MaximumTransformIndex no 0x10103 MaximumOperationIndex no

FlashPix Image Tags

Tag ID Tag Name Writable —— ——– ——– 0x1000000 NumberOfResolutions no 0x1000002 ImageWidth no 0x1000003 ImageHeight no 0x1000004 DefaultDisplayHeight no 0x1000005 DefaultDisplayWidth no 0x1000006 DisplayUnits no 0x2000000 SubimageWidth no 0x2000001 SubimageHeight no 0x2000002 SubimageColor no 0x2000003 SubimageNumericalFormat no 0x2000004 DecimationMethod no 0x2000005 DecimationPrefilterWidth no 0x2000007 SubimageICC_Profile no 0x3000001 JPEGTables no 0x3000002 MaxJPEGTableIndex no

FlashPix ImageInfo Tags

Tag ID Tag Name Writable —— ——– ——– 0x21000000 FileSource no 0x21000001 SceneType no 0x21000002 CreationPathVector no 0x21000003 SoftwareRelease no 0x21000004 UserDefinedID no 0x21000005 SharpnessApproximation no 0x22000000 Copyright no 0x22000001 OriginalImageBroker no 0x22000002 DigitalImageBroker no 0x22000003 Authorship no 0x22000004 IntellectualPropertyNotes no 0x23000000 TestTarget no 0x23000002 GroupCaption no 0x23000003 CaptionText no 0x23000004 People no 0x23000007 Things no 0x2300000a DateTimeOriginal no 0x2300000b Events no 0x2300000c Places no 0x2300000f ContentDescriptionNotes no 0x24000000 Make no 0x24000001 Model no 0x24000002 SerialNumber no 0x25000000 CreateDate no 0x25000001 ExposureTime no 0x25000002 FNumber no 0x25000003 ExposureProgram no 0x25000004 BrightnessValue no 0x25000005 ExposureCompensation no 0x25000006 SubjectDistance no 0x25000007 MeteringMode no 0x25000008 LightSource no 0x25000009 FocalLength no 0x2500000a MaxApertureValue no 0x2500000b Flash no 0x2500000c FlashEnergy no 0x2500000d FlashReturn no 0x2500000e BackLight no 0x2500000f SubjectLocation no 0x25000010 ExposureIndex no 0x25000011 SpecialEffectsOpticalFilter no 0x25000012 PerPictureNotes no 0x26000000 SensingMethod no 0x26000001 FocalPlaneXResolution no 0x26000002 FocalPlaneYResolution no 0x26000003 FocalPlaneResolutionUnit no 0x26000004 SpatialFrequencyResponse no 0x26000005 CFAPattern no 0x26000007 ISO no 0x26000008 Opto-ElectricConvFactor no 0x27000000 FilmBrand no 0x27000001 FilmCategory no 0x27000002 FilmSize no 0x27000003 FilmRollNumber no 0x27000004 FilmFrameNumber no 0x28000000 ScannerMake no 0x28000001 ScannerModel no 0x28000002 ScannerSerialNumber no 0x28000003 ScanSoftware no 0x28000004 ScanSoftwareRevisionDate no 0x28000005 ServiceOrganizationName no 0x28000006 ScanOperatorID no 0x28000008 ScanDate no 0x28000009 ModifyDate no 0x2800000a ScannerPixelSize no 0x29000000 OriginalScannedImageSize no 0x29000001 OriginalDocumentSize no 0x29000002 OriginalMedium no 0x29000003 TypeOfOriginal no

FlashPix Operation Tags

Tag ID Tag Name Writable —— ——– ——– 0x10000 OperationID no

FlashPix SummaryInfo Tags

The Dictionary, CodePage and LocalIndicator tags are common to all FlashPix property tables, even though they are only listed in the SummaryInfo table.

Tag ID Tag Name Writable —— ——– ——– 0x0000 Dictionary no 0x0001 CodePage no 0x0002 Title no 0x0003 Subject no 0x0004 Author no 0x0005 Keywords no 0x0006 Comments no 0x0007 Template no 0x0008 LastModifiedBy no 0x0009 RevisionNumber no 0x000a TotalEditTime no 0x000b LastPrinted no 0x000c CreateDate no 0x000d ModifyDate no 0x000e Pages no 0x000f Words no 0x0010 Characters no 0x0011 ThumbnailClip no 0x0012 Software no 0x0013 Security no 0x0022 CreatedBy no 0x0023 DocumentID no 0x80000000 LocaleIndicator no

FlashPix Transform Tags

Tag ID Tag Name Writable —— ——– ——– 0x10000 TransformNodeID no 0x10001 OperationClassID no 0x10002 LockedPropertyList no 0x10003 TransformTitle no 0x10004 LastModifier no 0x10005 RevisionNumber no 0x10006 TransformCreateDate no 0x10007 TransformModifyDate no 0x10008 CreatingApplication no 0x10100 InputDataObjectList no 0x10101 OutputDataObjectList no 0x10102 OperationNumber no 0x10000000 ResultAspectRatio no 0x10000001 RectangleOfInterest no 0x10000002 Filtering no 0x10000003 SpatialOrientation no 0x10000004 ColorTwistMatrix no 0x10000005 ContrastAdjustment no

FlashPix PreviewInfo Tags

Preview information written by some FujiFilm models.

Index1 Tag Name Writable —— ——– ——– 13 PreviewImageWidth no 23 PreviewImageHeight no

FlashPix SubimageHdr Tags

Index4 Tag Name Writable —— ——– ——– 1 SubimageWidth no 2 SubimageHeight no 3 SubimageTileCount no 4 SubimageTileWidth no 5 SubimageTileHeight no 6 NumChannels no

FlashPix WordDocument Tags

Tags extracted from the Microsoft Word document stream.

Tag ID Tag Name Writable —— ——– ——– 0x0000 Identification no 0x0003 LanguageCode no 0x0005 DocFlags no 9.1 System no 9.2 Word97 no

FlashPix DocTable Tags

Tags extracted from the Microsoft Word document table.

Tag Name Writable ——– ——– CommentBy no DOP FlashPix DOP LastSavedBy no ModifyDate no

FlashPix DOP Tags

Microsoft office document properties.

Index1 Tag Name Writable —— ——– ——– 20 CreateDate no 24 ModifyDate no 28 LastPrinted no 32 RevisionNumber no 34 TotalEditTime no 38 Words no 42 Characters no 46 Pages no 48 Paragraphs no 56 Lines no

MPF Tags

These tags are part of the CIPA Multi-Picture Format specification, and are found in the APP2 “MPF” segment of JPEG images. MPImage data referenced from this segment is stored as a JPEG trailer. The MPF tags are not writable, however the MPF segment may be deleted as a group (with “MPF:All”) but then the JPEG trailer should also be deleted (with “Trailer:All”). See <https://web.archive.org/web/20190713230858/http://www.cipa.jp/std/documents/e/DC-007_E.pdf> for the official specification.

Tag ID Tag Name Writable —— ——– ——– 0xb000 MPFVersion no 0xb001 NumberOfImages no 0xb002 MPImageList MPF MPImage 0xb003 ImageUIDList no 0xb004 TotalFrames no 0xb101 MPIndividualNum no 0xb201 PanOrientation no 0xb202 PanOverlapH no 0xb203 PanOverlapV no 0xb204 BaseViewpointNum no 0xb205 ConvergenceAngle no 0xb206 BaselineLength no 0xb207 VerticalDivergence no 0xb208 AxisDistanceX no 0xb209 AxisDistanceY no 0xb20a AxisDistanceZ no 0xb20b YawAngle no 0xb20c PitchAngle no 0xb20d RollAngle no

MPF MPImage Tags

The first MPF “Large Thumbnail” image is extracted as PreviewImage, and the rest of the embedded MPF images are extracted as MPImage#. The ExtractEmbedded (-ee) option may be used to extract information from these embedded images.

Index1 Tag Name Writable —— ——– ——– 0.1 MPImageFlags no 0.2 MPImageFormat no 0.3 MPImageType no 4 MPImageLength no 8 MPImageStart no 12 DependentImage1EntryNumber no 14 DependentImage2EntryNumber no

InfiRay Tags

InfiRay Version Tags

This table lists tags found in the InfiRay APP2 IJPEG version header, found in JPEGs taken with the P2 Pro camera app.

Index1 Tag Name Writable —— ——– ——– 0 IJPEGVersion no 12 IJPEGOrgType no 13 IJPEGDispType no 14 IJPEGRotate no 15 IJPEGMirrorFlip no 16 ImageColorSwitchable no 17 ThermalColorPalette no 32 IRDataSize no 40 IRDataFormat no 42 IRImageWidth no 44 IRImageHeight no 46 IRImageBpp no 48 TempDataSize no 56 TempDataFormat no 58 TempImageWidth no 60 TempImageHeight no 62 TempImageBpp no 64 VisibleDataSize no 72 VisibleDataFormat no 74 VisibleImageWidth no 76 VisibleImageHeight no 78 VisibleImageBpp no

Stim Tags

These tags are part of the CIPA Stereo Still Image specification, and are found in the APP3 “Stim” segment of JPEG images. See <https://web.archive.org/web/20190718152459/http://www.cipa.jp/std/documents/e/DC-006_E.pdf> for the official specification.

Tag ID Tag Name Writable —— ——– ——– 0x0000 StimVersion no 0x0001 ApplicationData no 0x0002 ImageArrangement no 0x0003 ImageRotation no 0x0004 ScalingFactor no 0x0005 CropXSize no 0x0006 CropYSize no 0x0007 CropX Stim CropX 0x0008 CropY Stim CropY 0x0009 ViewType no 0x000a RepresentativeImage no 0x000b ConvergenceBaseImage no 0x000c AssumedDisplaySize no 0x000d AssumedDistanceView no 0x000e RepresentativeDisparityNear no 0x000f RepresentativeDisparityFar no 0x0010 InitialDisplayEffect no 0x0011 ConvergenceDistance no 0x0012 CameraArrangementInterval no 0x0013 ShootingCount no

Stim CropX Tags

Index1 Tag Name Writable —— ——– ——– 0 CropXCommonOffset no 2 CropXViewpointNumber no 3 CropXOffset no 7 CropXViewpointNumber2 no 8 CropXOffset2 no

Stim CropY Tags

Index1 Tag Name Writable —— ——– ——– 0 CropYCommonOffset no 2 CropYViewpointNumber no 3 CropYOffset no 7 CropYViewpointNumber2 no 8 CropYOffset2 no

Scalado Tags

Tags extracted from the JPEG APP4 “SCALADO” segment found in images from HTC, LG and Samsung phones. (Presumably written by Scalado mobile software, <http://www.scalado.com/>.)

Tag ID Tag Name Writable —— ——– ——– HGHT PreviewImageHeight no QUAL PreviewQuality no SPMO DataLength? no WDTH PreviewImageWidth no

InfiRay Tags

InfiRay Factory Tags

This table lists tags found in the InfiRay APP4 IJPEG camera factory defaults and calibration data.

Index1 Tag Name Writable —— ——– ——– 0 IJPEGTempVersion no 4 FactDefEmissivity no 5 FactDefTau no 6 FactDefTa no 8 FactDefTu no 10 FactDefDist no 12 FactDefA0 no 16 FactDefB0 no 20 FactDefA1 no 24 FactDefB1 no 28 FactDefP0 no 32 FactDefP1 no 36 FactDefP2 no 68 FactRelSensorTemp no 70 FactRelShutterTemp no 72 FactRelLensTemp no 100 FactStatusGain no 101 FactStatusEnvOK no 102 FactStatusDistOK no 103 FactStatusTempMap no

InfiRay Picture Tags

This table lists tags found in the InfiRay APP5 IJPEG picture temperature information.

Index1 Tag Name Writable —— ——– ——– 0 EnvironmentTemp no 4 Distance no 8 Emissivity no 12 Humidity no 16 ReferenceTemp no 32 TempUnit no 33 ShowCenterTemp no 34 ShowMaxTemp no 35 ShowMinTemp no 36 TempMeasureCount no

GoPro Tags

GoPro GPMF Tags

Tags extracted from the GPMF box of GoPro MP4 videos, the APP6 “GoPro” segment of JPEG files, and from the “gpmd” timed metadata if the ExtractEmbedded (-ee) option is enabled. Many more tags exist, but are currently unknown and extracted only with the Unknown (-u) option. Please let me know if you discover the meaning of any of these unknown tags. See <https://github.com/gopro/gpmf-parser> for details about this format.

Tag ID Tag Name Writable —— ——– ——– AALP AudioLevel no ACCL Accelerometer no ALLD AutoLowLightDuration no ATTD Attitude no ATTR AttitudeTarget no AUDO AudioSetting no BPOS Controller? no CASN CameraSerialNumber no CORI CameraOrientation no CSEN CoyoteSense no CYTS CoyoteStatus no DEVC DeviceContainer GoPro GPMF DVID DeviceID? no DVNM DeviceName no DZOM DigitalZoom no EISA ElectronicImageStabilization no EMPT Empty? no ESCS EscapeStatus? no EXPT MaximumShutterAngle no FACE FaceDetected no FCNM FaceNumbers no FMWR FirmwareVersion no FWVS OtherFirmware no GLPI GPSPos GoPro GLPI GPRI GPSRaw? GoPro GPRI GPS5 GPSInfo GoPro GPS5 GPSA GPSAltitudeSystem no GPSF GPSMeasureMode no GPSP GPSHPositioningError no GPSU GPSDateTime no GRAV GravityVector no GYRO Gyroscope no HUES PrediminantHue no IORI ImageOrientation no ISOE ISOSpeeds no ISOG ImageSensorGain no KBAT BatteryStatus GoPro KBAT LNED LocalPositionNED no MAGN Magnetometer no MINF Model no MTRX AccelerometerMatrix no MUID MediaUniqueID no MWET MicrophoneWet no OREN AutoRotation no ORIN InputOrientation no ORIO OutputOrientation no PHDR HDRSetting no PIMN AutoISOMin no PIMX AutoISOMax no PRES PhotoResolution no PRTN ProTune no PTCL ColorMode no PTEV ExposureCompensation no PTSH Sharpness no PTWB WhiteBalance no RATE Rate no RMRK Comments no SCAL ScaleFactor? no SCEN SceneClassification no SCPR ScaledPressure no SHUT ExposureTimes no SIMU ScaledIMU no SIUN SIUnits? no SROT SensorReadoutTime no STMP TimeStamp no STNM StreamName? no STRM NestedSignalStream GoPro GPMF SYST SystemTime no TMPC CameraTemperature no TSMP TotalSamples? no TYPE StructureType? no UNIF InputUniformity no UNIT Units? no VERS MetadataVersion no VFOV FieldOfView no VFRH VisualFlightRulesHUD no WBAL ColorTemperatures no WNDM WindProcessing no WRGB WhiteBalanceRGB no YAVG LumaAverage no

GoPro GLPI Tags

Index Tag Name Writable —– ——– ——– 0 GPSDateTime no 1 GPSLatitude no 2 GPSLongitude no 3 GPSAltitude no 5 GPSSpeedX no 6 GPSSpeedY no 7 GPSSpeedZ no 8 GPSTrack no

GoPro GPRI Tags

Index Tag Name Writable —– ——– ——– 0 GPSDateTimeRaw no 1 GPSLatitudeRaw no 2 GPSLongitudeRaw no 3 GPSAltitudeRaw no 6 GPSSpeedRaw no 7 GPSTrackRaw no

GoPro GPS5 Tags

Index Tag Name Writable —– ——– ——– 0 GPSLatitude no 1 GPSLongitude no 2 GPSAltitude no 3 GPSSpeed no 4 GPSSpeed3D no

GoPro KBAT Tags

Battery status information found in GoPro Karma videos.

Index Tag Name Writable —– ——– ——– 0 BatteryCurrent no 1 BatteryCapacity no 3 BatteryTemperature no 4 BatteryVoltage1 no 5 BatteryVoltage2 no 6 BatteryVoltage3 no 7 BatteryVoltage4 no 8 BatteryTime no 14 BatteryLevel no

GoPro fdsc Tags

Tags extracted from the MP4 “fdsc” timed metadata when the ExtractEmbedded (-ee) option is used.

Index1 Tag Name Writable —— ——– ——– 8 FirmwareVersion no 23 SerialNumber no 87 OtherSerialNumber no 102 Model no

InfiRay Tags

InfiRay MixMode Tags

This table lists tags found in the InfiRay APP6 IJPEG visual-infrared mixing mode section.

Index1 Tag Name Writable —— ——– ——– 0 MixMode no 1 FusionIntensity no 5 OffsetAdjustment no 9 CorrectionAsix no

Qualcomm Tags

The tags below have been observed in the JPEG APP7 “Qualcomm Camera Attributes” segment written by some cameras such as the HP iPAQ Voice Messenger. ExifTool will extract any information found from this segment, even if it is not listed in this table.

Tag Name Writable ——– ——– AECAggressiveness no AECCurrentExpIndex no AECCurrentSensorLuma no AECEnable no AECExposureIndexAdjStep no AECHighLumaRegionCount no AECHighLumaRegionThreshold no AECIndoorIdx no AECLumaTarget no AECLumaTolerance no AECMode no AECOdoorIdx no AECOutdoorBrightDiscarded no AECOutdoorBrightEnable no AECOutdoorBrightReduction no AECOutdoorBrightThresholdHI no AECOutdoorBrightThresholdLO no AECOutdoorGammaIndex no AECSnapshotDigitalGain no AECSnapshotExposureTimeMs no AECSnapshotLineCount no AECSnapshotSensorGain no AECVfeLuma no AFBoundary no AFCollectEndStat no AFEnable no AFFarEnd no AFFineSrchPoints no AFFineStep no AFFocusTime no AFGrossStep no AFMode no AFNearEnd no AFPosDefMacro no AFPosDefNorm no AFPosition no AFProcess no AFREnable no AFRFaster0ExpMod no AFRFaster0Trigger no AFRFaster1ExpMod no AFRFaster1Trigger no AFRFaster2ExpMod no AFRFaster2Trigger no AFRFaster3ExpMod no AFRFaster3Trigger no AFRFaster4ExpMod no AFRFaster4Trigger no AFRPossibleFrameCnt no AFRSlower0ExpMod no AFRSlower0Trigger no AFRSlower1ExpMod no AFRSlower1Trigger no AFRSlower2ExpMod no AFRSlower2Trigger no AFRSlower3ExpMod no AFRSlower3Trigger no AFRSlower4ExpMod no AFRSlower4Trigger no AFResetLensAfterSnap no AFStepsNearFar no AFStepsNearInfinity no AFTestMode no AFTracePositions00 no AFTracePositions01 no AFTracePositions02 no AFTracePositions03 no AFTracePositions04 no AFTracePositions05 no AFTracePositions06 no AFTracePositions07 no AFTracePositions08 no AFTracePositions09 no AFTracePositions10 no AFTracePositions11 no AFTracePositions12 no AFTracePositions13 no AFTracePositions14 no AFTracePositions15 no AFTracePositions16 no AFTracePositions17 no AFTracePositions18 no AFTracePositions19 no AFTracePositions20 no AFTracePositions21 no AFTracePositions22 no AFTracePositions23 no AFTracePositions24 no AFTracePositions25 no AFTracePositions26 no AFTracePositions27 no AFTracePositions28 no AFTracePositions29 no AFTracePositions30 no AFTracePositions31 no AFTracePositions32 no AFTracePositions33 no AFTracePositions34 no AFTracePositions35 no AFTracePositions36 no AFTracePositions37 no AFTracePositions38 no AFTracePositions39 no AFTracePositions40 no AFTracePositions41 no AFTracePositions42 no AFTracePositions43 no AFTracePositions44 no AFTracePositions45 no AFTracePositions46 no AFTracePositions47 no AFTracePositions48 no AFTracePositions49 no AFTraceStats00 no AFTraceStats01 no AFTraceStats02 no AFTraceStats03 no AFTraceStats04 no AFTraceStats05 no AFTraceStats06 no AFTraceStats07 no AFTraceStats08 no AFTraceStats09 no AFTraceStats10 no AFTraceStats11 no AFTraceStats12 no AFTraceStats13 no AFTraceStats14 no AFTraceStats15 no AFTraceStats16 no AFTraceStats17 no AFTraceStats18 no AFTraceStats19 no AFTraceStats20 no AFTraceStats21 no AFTraceStats22 no AFTraceStats23 no AFTraceStats24 no AFTraceStats25 no AFTraceStats26 no AFTraceStats27 no AFTraceStats28 no AFTraceStats29 no AFTraceStats30 no AFTraceStats31 no AFTraceStats32 no AFTraceStats33 no AFTraceStats34 no AFTraceStats35 no AFTraceStats36 no AFTraceStats37 no AFTraceStats38 no AFTraceStats39 no AFTraceStats40 no AFTraceStats41 no AFTraceStats42 no AFTraceStats43 no AFTraceStats44 no AFTraceStats45 no AFTraceStats46 no AFTraceStats47 no AFTraceStats48 no AFTraceStats49 no AFUndershootProtect no AFVfeHorzOffset no AFVfeHorzWidth no AFVfeMetricMax no AFVfeVertHeight no AFVfeVertOffset no ASF3EdgeDetect no ASF3EdgeFilterA11 no ASF3EdgeFilterA12 no ASF3EdgeFilterA13 no ASF3EdgeFilterA21 no ASF3EdgeFilterA22 no ASF3EdgeFilterA23 no ASF3EdgeFilterA31 no ASF3EdgeFilterA32 no ASF3EdgeFilterA33 no ASF3Enable no ASF3LowerThreshold no ASF3NoiseFilterA11 no ASF3NoiseFilterA12 no ASF3NoiseFilterA13 no ASF3NoiseFilterA21 no ASF3NoiseFilterA22 no ASF3NoiseFilterA23 no ASF3NoiseFilterA31 no ASF3NoiseFilterA32 no ASF3NoiseFilterA33 no ASF3UpperThreshold no ASF5BrtLoThres no ASF5BrtShrpDegF1 no ASF5BrtShrpDegF2 no ASF5BrtSmthPercent no ASF5BrtUpThres no ASF5Enable no ASF5ExposureIndex1 no ASF5ExposureIndex2 no ASF5Filter1A11 no ASF5Filter1A12 no ASF5Filter1A13 no ASF5Filter1A14 no ASF5Filter1A15 no ASF5Filter1A21 no ASF5Filter1A22 no ASF5Filter1A23 no ASF5Filter1A24 no ASF5Filter1A25 no ASF5Filter1A31 no ASF5Filter1A32 no ASF5Filter1A33 no ASF5Filter1A34 no ASF5Filter1A35 no ASF5Filter1A41 no ASF5Filter1A42 no ASF5Filter1A43 no ASF5Filter1A44 no ASF5Filter1A45 no ASF5Filter1A51 no ASF5Filter1A52 no ASF5Filter1A53 no ASF5Filter1A54 no ASF5Filter1A55 no ASF5Filter2A11 no ASF5Filter2A12 no ASF5Filter2A13 no ASF5Filter2A14 no ASF5Filter2A15 no ASF5Filter2A21 no ASF5Filter2A22 no ASF5Filter2A23 no ASF5Filter2A24 no ASF5Filter2A25 no ASF5Filter2A31 no ASF5Filter2A32 no ASF5Filter2A33 no ASF5Filter2A34 no ASF5Filter2A35 no ASF5Filter2A41 no ASF5Filter2A42 no ASF5Filter2A43 no ASF5Filter2A44 no ASF5Filter2A45 no ASF5Filter2A51 no ASF5Filter2A52 no ASF5Filter2A53 no ASF5Filter2A54 no ASF5Filter2A55 no ASF5FilterMode no ASF5LowLoThres no ASF5LowShrpDegF1 no ASF5LowShrpDegF2 no ASF5LowSmthPrcnt no ASF5LowUpThres no ASF5LumaFilter00 no ASF5LumaFilter01 no ASF5LumaFilter02 no ASF5LumaFilter03 no ASF5LumaFilter04 no ASF5LumaFilter05 no ASF5LumaFilter06 no ASF5LumaFilter07 no ASF5LumaFilter08 no ASF5MaxExposureIndex no ASF5NrmLoThres no ASF5NrmShrpDegF1 no ASF5NrmShrpDegF2 no ASF5NrmSmthPrcnt no ASF5NrmUpThres no ASF5NrmizeFactor1 no ASF5NrmizeFactor2 no AWBAggressiveness no AWBAgwGridDist2Thresh no AWBAlgorithm no AWBAveBgRatio no AWBAveRgRatio no AWBBlueGainAdjRef1 no AWBBlueGainAdjRef2 no AWBBlueGainAdjRef3 no AWBBlueGainAdjRef4 no AWBBlueGainAdjRef5 no AWBBlueGainAdjRef6 no AWBBlueGainAdjRef7 no AWBBlueGainAdjRef8 no AWBBlueGainRef1 no AWBBlueGainRef2 no AWBBlueGainRef3 no AWBBlueGainRef4 no AWBBlueGainRef5 no AWBBlueGainRef6 no AWBBlueGainRef7 no AWBBlueGainRef8 no AWBCcBias no AWBCompactClusterR2 no AWBEnable no AWBGreenOffsetBg no AWBGreenOffsetRg no AWBIndoorSampleInfluence no AWBLoVfeC1 no AWBLoVfeC2 no AWBLoVfeC3 no AWBLoVfeC4 no AWBLoVfeM1 no AWBLoVfeM2 no AWBLoVfeM3 no AWBLoVfeM4 no AWBLoVfeMaxY no AWBLoVfeMinY no AWBLowLigColCorEna no AWBMaxBGain no AWBMaxGGain no AWBMaxRGain no AWBMinBGain no AWBMinGGain no AWBMinRGain no AWBNormVfeC1 no AWBNormVfeC2 no AWBNormVfeC3 no AWBNormVfeC4 no AWBNormVfeM1 no AWBNormVfeM2 no AWBNormVfeM3 no AWBNormVfeM4 no AWBNormVfeMaxY no AWBNormVfeMinY no AWBOudorVfeC1 no AWBOudorVfeC2 no AWBOudorVfeC3 no AWBOudorVfeC4 no AWBOudorVfeM1 no AWBOudorVfeM2 no AWBOudorVfeM3 no AWBOudorVfeM4 no AWBOudorVfeMaxY no AWBOudorVfeMinY no AWBOutdoorSampleInfluence no AWBPrevWbBgain no AWBPrevWbGgain no AWBPrevWbRgain no AWBRedGainAdjRef1 no AWBRedGainAdjRef2 no AWBRedGainAdjRef3 no AWBRedGainAdjRef4 no AWBRedGainAdjRef5 no AWBRedGainAdjRef6 no AWBRedGainAdjRef7 no AWBRedGainAdjRef8 no AWBRedGainRef1 no AWBRedGainRef2 no AWBRedGainRef3 no AWBRedGainRef4 no AWBRedGainRef5 no AWBRedGainRef6 no AWBRedGainRef7 no AWBRedGainRef8 no AWBSampleDecision no AWBSnapshotBGain no AWBSnapshotRGain no AntiBadingPixelClk no AntiBadingPixelClkPerLine no AntibandingEnable no BlckLvlEvenCols no BlckLvlOddCols no CamMclkHz no ChroSupChroThres1 no ChroSupChroThres2 no ChroSupLumaThres1 no ChroSupLumaThres2 no ChroSupLumaThres3 no ChroSupLumaThres4 no ChromSupress no ClipToAfRato no CurrResol no DayltConvChrmA_M no DayltConvChrmA_P no DayltConvChrmB_M no DayltConvChrmB_P no DayltConvChrmC_M no DayltConvChrmC_P no DayltConvChrmD_M no DayltConvChrmD_P no DayltConvChrmKCb no DayltConvChrmKCr no DayltConvLumaK no DayltConvLumaV0 no DayltConvLumaV1 no DayltConvLumaV2 no DefConvChrmA_M no DefConvChrmA_P no DefConvChrmB_M no DefConvChrmB_P no DefConvChrmC_M no DefConvChrmC_P no DefConvChrmD_M no DefConvChrmD_P no DefConvChrmKCb no DefConvChrmKCr no DefConvLumaK no DefConvLumaV0 no DefConvLumaV1 no DefConvLumaV2 no DefCorC0 no DefCorC1 no DefCorC2 no DefCorC3 no DefCorC4 no DefCorC5 no DefCorC6 no DefCorC7 no DefCorC8 no DefCorK0 no DefCorK1 no DefCorK2 no DefLumaGammaMode no DefRgbGammaMode no DefectPixCorEnable no DefectPixMaxThresh no DefectPixMinThresh no DiscardFrstFrm no FrmSkipPttrn no GammaEnable no HJREnable no HJRMaxNumFrames no HJROneToTwoOffset no HJRTextureThreshold no HJR_NReductionFlat no HJR_NReductionTexture no IncandConvChrmA_M no IncandConvChrmA_P no IncandConvChrmB_M no IncandConvChrmB_P no IncandConvChrmC_M no IncandConvChrmC_P no IncandConvChrmD_M no IncandConvChrmD_P no IncandConvChrmKCb no IncandConvChrmKCr no IncandConvLumaK no IncandConvLumaV0 no IncandConvLumaV1 no IncandConvLumaV2 no LADetect no LAEnable no MaxPrviewFps no MaxVideoFps no NghtshtFps no NightshotMode no OutlierDistance no PclkInvert no PrviewFps no PrviewResol no R2ABlueCtbl00 no R2ABlueCtbl01 no R2ABlueCtbl02 no R2ABlueCtbl03 no R2ABlueCtbl04 no R2ABlueCtbl05 no R2ABlueCtbl06 no R2ABlueCtbl07 no R2ABlueCtbl08 no R2ABlueCtbl09 no R2ABlueCtbl10 no R2ABlueCtbl11 no R2ABlueCtbl12 no R2ABlueCtbl13 no R2ABlueCtbl14 no R2ABlueCtbl15 no R2ABlueCtbl16 no R2ABlueCtbl17 no R2ABlueCtbl18 no R2ABlueCtbl19 no R2ABlueCtbl20 no R2ABlueCtbl21 no R2ABlueCtbl22 no R2ABlueCtbl23 no R2ABlueCtbl24 no R2ABlueCtbl25 no R2ABlueCtbl26 no R2ABlueCtbl27 no R2ABlueCtbl28 no R2ABlueCtbl29 no R2ABlueCtbl30 no R2ABlueCtbl31 no R2ABlueStbl00 no R2ABlueStbl01 no R2ABlueStbl02 no R2ABlueStbl03 no R2ABlueStbl04 no R2ABlueStbl05 no R2ABlueStbl06 no R2ABlueStbl07 no R2ABlueStbl08 no R2ABlueStbl09 no R2ABlueStbl10 no R2ABlueStbl11 no R2ABlueStbl12 no R2ABlueStbl13 no R2ABlueStbl14 no R2ABlueStbl15 no R2ABlueStbl16 no R2ABlueStbl17 no R2ABlueStbl18 no R2ABlueStbl19 no R2ABlueStbl20 no R2ABlueStbl21 no R2ABlueStbl22 no R2ABlueStbl23 no R2ABlueStbl24 no R2ABlueStbl25 no R2ABlueStbl26 no R2ABlueStbl27 no R2ABlueStbl28 no R2ABlueStbl29 no R2ABlueStbl30 no R2ABlueStbl31 no R2ACx no R2ACy no R2AGreenCtbl00 no R2AGreenCtbl01 no R2AGreenCtbl02 no R2AGreenCtbl03 no R2AGreenCtbl04 no R2AGreenCtbl05 no R2AGreenCtbl06 no R2AGreenCtbl07 no R2AGreenCtbl08 no R2AGreenCtbl09 no R2AGreenCtbl10 no R2AGreenCtbl11 no R2AGreenCtbl12 no R2AGreenCtbl13 no R2AGreenCtbl14 no R2AGreenCtbl15 no R2AGreenCtbl16 no R2AGreenCtbl17 no R2AGreenCtbl18 no R2AGreenCtbl19 no R2AGreenCtbl20 no R2AGreenCtbl21 no R2AGreenCtbl22 no R2AGreenCtbl23 no R2AGreenCtbl24 no R2AGreenCtbl25 no R2AGreenCtbl26 no R2AGreenCtbl27 no R2AGreenCtbl28 no R2AGreenCtbl29 no R2AGreenCtbl30 no R2AGreenCtbl31 no R2AGreenStbl00 no R2AGreenStbl01 no R2AGreenStbl02 no R2AGreenStbl03 no R2AGreenStbl04 no R2AGreenStbl05 no R2AGreenStbl06 no R2AGreenStbl07 no R2AGreenStbl08 no R2AGreenStbl09 no R2AGreenStbl10 no R2AGreenStbl11 no R2AGreenStbl12 no R2AGreenStbl13 no R2AGreenStbl14 no R2AGreenStbl15 no R2AGreenStbl16 no R2AGreenStbl17 no R2AGreenStbl18 no R2AGreenStbl19 no R2AGreenStbl20 no R2AGreenStbl21 no R2AGreenStbl22 no R2AGreenStbl23 no R2AGreenStbl24 no R2AGreenStbl25 no R2AGreenStbl26 no R2AGreenStbl27 no R2AGreenStbl28 no R2AGreenStbl29 no R2AGreenStbl30 no R2AGreenStbl31 no R2AHeight no R2AIntervals no R2ARedCtbl00 no R2ARedCtbl01 no R2ARedCtbl02 no R2ARedCtbl03 no R2ARedCtbl04 no R2ARedCtbl05 no R2ARedCtbl06 no R2ARedCtbl07 no R2ARedCtbl08 no R2ARedCtbl09 no R2ARedCtbl10 no R2ARedCtbl11 no R2ARedCtbl12 no R2ARedCtbl13 no R2ARedCtbl14 no R2ARedCtbl15 no R2ARedCtbl16 no R2ARedCtbl17 no R2ARedCtbl18 no R2ARedCtbl19 no R2ARedCtbl20 no R2ARedCtbl21 no R2ARedCtbl22 no R2ARedCtbl23 no R2ARedCtbl24 no R2ARedCtbl25 no R2ARedCtbl26 no R2ARedCtbl27 no R2ARedCtbl28 no R2ARedCtbl29 no R2ARedCtbl30 no R2ARedCtbl31 no R2ARedStbl00 no R2ARedStbl01 no R2ARedStbl02 no R2ARedStbl03 no R2ARedStbl04 no R2ARedStbl05 no R2ARedStbl06 no R2ARedStbl07 no R2ARedStbl08 no R2ARedStbl09 no R2ARedStbl10 no R2ARedStbl11 no R2ARedStbl12 no R2ARedStbl13 no R2ARedStbl14 no R2ARedStbl15 no R2ARedStbl16 no R2ARedStbl17 no R2ARedStbl18 no R2ARedStbl19 no R2ARedStbl20 no R2ARedStbl21 no R2ARedStbl22 no R2ARedStbl23 no R2ARedStbl24 no R2ARedStbl25 no R2ARedStbl26 no R2ARedStbl27 no R2ARedStbl28 no R2ARedStbl29 no R2ARedStbl30 no R2ARedStbl31 no R2ATbl00 no R2ATbl01 no R2ATbl02 no R2ATbl03 no R2ATbl04 no R2ATbl05 no R2ATbl06 no R2ATbl07 no R2ATbl08 no R2ATbl09 no R2ATbl10 no R2ATbl11 no R2ATbl12 no R2ATbl13 no R2ATbl14 no R2ATbl15 no R2ATbl16 no R2ATbl17 no R2ATbl18 no R2ATbl19 no R2ATbl20 no R2ATbl21 no R2ATbl22 no R2ATbl23 no R2ATbl24 no R2ATbl25 no R2ATbl26 no R2ATbl27 no R2ATbl28 no R2ATbl29 no R2ATbl30 no R2ATbl31 no R2AWidth no R2D65BlueCtbl00 no R2D65BlueCtbl01 no R2D65BlueCtbl02 no R2D65BlueCtbl03 no R2D65BlueCtbl04 no R2D65BlueCtbl05 no R2D65BlueCtbl06 no R2D65BlueCtbl07 no R2D65BlueCtbl08 no R2D65BlueCtbl09 no R2D65BlueCtbl10 no R2D65BlueCtbl11 no R2D65BlueCtbl12 no R2D65BlueCtbl13 no R2D65BlueCtbl14 no R2D65BlueCtbl15 no R2D65BlueCtbl16 no R2D65BlueCtbl17 no R2D65BlueCtbl18 no R2D65BlueCtbl19 no R2D65BlueCtbl20 no R2D65BlueCtbl21 no R2D65BlueCtbl22 no R2D65BlueCtbl23 no R2D65BlueCtbl24 no R2D65BlueCtbl25 no R2D65BlueCtbl26 no R2D65BlueCtbl27 no R2D65BlueCtbl28 no R2D65BlueCtbl29 no R2D65BlueCtbl30 no R2D65BlueCtbl31 no R2D65BlueStbl00 no R2D65BlueStbl01 no R2D65BlueStbl02 no R2D65BlueStbl03 no R2D65BlueStbl04 no R2D65BlueStbl05 no R2D65BlueStbl06 no R2D65BlueStbl07 no R2D65BlueStbl08 no R2D65BlueStbl09 no R2D65BlueStbl10 no R2D65BlueStbl11 no R2D65BlueStbl12 no R2D65BlueStbl13 no R2D65BlueStbl14 no R2D65BlueStbl15 no R2D65BlueStbl16 no R2D65BlueStbl17 no R2D65BlueStbl18 no R2D65BlueStbl19 no R2D65BlueStbl20 no R2D65BlueStbl21 no R2D65BlueStbl22 no R2D65BlueStbl23 no R2D65BlueStbl24 no R2D65BlueStbl25 no R2D65BlueStbl26 no R2D65BlueStbl27 no R2D65BlueStbl28 no R2D65BlueStbl29 no R2D65BlueStbl30 no R2D65BlueStbl31 no R2D65Cx no R2D65Cy no R2D65GreenCtbl00 no R2D65GreenCtbl01 no R2D65GreenCtbl02 no R2D65GreenCtbl03 no R2D65GreenCtbl04 no R2D65GreenCtbl05 no R2D65GreenCtbl06 no R2D65GreenCtbl07 no R2D65GreenCtbl08 no R2D65GreenCtbl09 no R2D65GreenCtbl10 no R2D65GreenCtbl11 no R2D65GreenCtbl12 no R2D65GreenCtbl13 no R2D65GreenCtbl14 no R2D65GreenCtbl15 no R2D65GreenCtbl16 no R2D65GreenCtbl17 no R2D65GreenCtbl18 no R2D65GreenCtbl19 no R2D65GreenCtbl20 no R2D65GreenCtbl21 no R2D65GreenCtbl22 no R2D65GreenCtbl23 no R2D65GreenCtbl24 no R2D65GreenCtbl25 no R2D65GreenCtbl26 no R2D65GreenCtbl27 no R2D65GreenCtbl28 no R2D65GreenCtbl29 no R2D65GreenCtbl30 no R2D65GreenCtbl31 no R2D65GreenStbl00 no R2D65GreenStbl01 no R2D65GreenStbl02 no R2D65GreenStbl03 no R2D65GreenStbl04 no R2D65GreenStbl05 no R2D65GreenStbl06 no R2D65GreenStbl07 no R2D65GreenStbl08 no R2D65GreenStbl09 no R2D65GreenStbl10 no R2D65GreenStbl11 no R2D65GreenStbl12 no R2D65GreenStbl13 no R2D65GreenStbl14 no R2D65GreenStbl15 no R2D65GreenStbl16 no R2D65GreenStbl17 no R2D65GreenStbl18 no R2D65GreenStbl19 no R2D65GreenStbl20 no R2D65GreenStbl21 no R2D65GreenStbl22 no R2D65GreenStbl23 no R2D65GreenStbl24 no R2D65GreenStbl25 no R2D65GreenStbl26 no R2D65GreenStbl27 no R2D65GreenStbl28 no R2D65GreenStbl29 no R2D65GreenStbl30 no R2D65GreenStbl31 no R2D65Height no R2D65Intervals no R2D65RedCtbl00 no R2D65RedCtbl01 no R2D65RedCtbl02 no R2D65RedCtbl03 no R2D65RedCtbl04 no R2D65RedCtbl05 no R2D65RedCtbl06 no R2D65RedCtbl07 no R2D65RedCtbl08 no R2D65RedCtbl09 no R2D65RedCtbl10 no R2D65RedCtbl11 no R2D65RedCtbl12 no R2D65RedCtbl13 no R2D65RedCtbl14 no R2D65RedCtbl15 no R2D65RedCtbl16 no R2D65RedCtbl17 no R2D65RedCtbl18 no R2D65RedCtbl19 no R2D65RedCtbl20 no R2D65RedCtbl21 no R2D65RedCtbl22 no R2D65RedCtbl23 no R2D65RedCtbl24 no R2D65RedCtbl25 no R2D65RedCtbl26 no R2D65RedCtbl27 no R2D65RedCtbl28 no R2D65RedCtbl29 no R2D65RedCtbl30 no R2D65RedCtbl31 no R2D65RedStbl00 no R2D65RedStbl01 no R2D65RedStbl02 no R2D65RedStbl03 no R2D65RedStbl04 no R2D65RedStbl05 no R2D65RedStbl06 no R2D65RedStbl07 no R2D65RedStbl08 no R2D65RedStbl09 no R2D65RedStbl10 no R2D65RedStbl11 no R2D65RedStbl12 no R2D65RedStbl13 no R2D65RedStbl14 no R2D65RedStbl15 no R2D65RedStbl16 no R2D65RedStbl17 no R2D65RedStbl18 no R2D65RedStbl19 no R2D65RedStbl20 no R2D65RedStbl21 no R2D65RedStbl22 no R2D65RedStbl23 no R2D65RedStbl24 no R2D65RedStbl25 no R2D65RedStbl26 no R2D65RedStbl27 no R2D65RedStbl28 no R2D65RedStbl29 no R2D65RedStbl30 no R2D65RedStbl31 no R2D65Tbl00 no R2D65Tbl01 no R2D65Tbl02 no R2D65Tbl03 no R2D65Tbl04 no R2D65Tbl05 no R2D65Tbl06 no R2D65Tbl07 no R2D65Tbl08 no R2D65Tbl09 no R2D65Tbl10 no R2D65Tbl11 no R2D65Tbl12 no R2D65Tbl13 no R2D65Tbl14 no R2D65Tbl15 no R2D65Tbl16 no R2D65Tbl17 no R2D65Tbl18 no R2D65Tbl19 no R2D65Tbl20 no R2D65Tbl21 no R2D65Tbl22 no R2D65Tbl23 no R2D65Tbl24 no R2D65Tbl25 no R2D65Tbl26 no R2D65Tbl27 no R2D65Tbl28 no R2D65Tbl29 no R2D65Tbl30 no R2D65Tbl31 no R2D65Width no R2TL84BlueCtbl00 no R2TL84BlueCtbl01 no R2TL84BlueCtbl02 no R2TL84BlueCtbl03 no R2TL84BlueCtbl04 no R2TL84BlueCtbl05 no R2TL84BlueCtbl06 no R2TL84BlueCtbl07 no R2TL84BlueCtbl08 no R2TL84BlueCtbl09 no R2TL84BlueCtbl10 no R2TL84BlueCtbl11 no R2TL84BlueCtbl12 no R2TL84BlueCtbl13 no R2TL84BlueCtbl14 no R2TL84BlueCtbl15 no R2TL84BlueCtbl16 no R2TL84BlueCtbl17 no R2TL84BlueCtbl18 no R2TL84BlueCtbl19 no R2TL84BlueCtbl20 no R2TL84BlueCtbl21 no R2TL84BlueCtbl22 no R2TL84BlueCtbl23 no R2TL84BlueCtbl24 no R2TL84BlueCtbl25 no R2TL84BlueCtbl26 no R2TL84BlueCtbl27 no R2TL84BlueCtbl28 no R2TL84BlueCtbl29 no R2TL84BlueCtbl30 no R2TL84BlueCtbl31 no R2TL84BlueStbl00 no R2TL84BlueStbl01 no R2TL84BlueStbl02 no R2TL84BlueStbl03 no R2TL84BlueStbl04 no R2TL84BlueStbl05 no R2TL84BlueStbl06 no R2TL84BlueStbl07 no R2TL84BlueStbl08 no R2TL84BlueStbl09 no R2TL84BlueStbl10 no R2TL84BlueStbl11 no R2TL84BlueStbl12 no R2TL84BlueStbl13 no R2TL84BlueStbl14 no R2TL84BlueStbl15 no R2TL84BlueStbl16 no R2TL84BlueStbl17 no R2TL84BlueStbl18 no R2TL84BlueStbl19 no R2TL84BlueStbl20 no R2TL84BlueStbl21 no R2TL84BlueStbl22 no R2TL84BlueStbl23 no R2TL84BlueStbl24 no R2TL84BlueStbl25 no R2TL84BlueStbl26 no R2TL84BlueStbl27 no R2TL84BlueStbl28 no R2TL84BlueStbl29 no R2TL84BlueStbl30 no R2TL84BlueStbl31 no R2TL84Cx no R2TL84Cy no R2TL84GreenCtbl00 no R2TL84GreenCtbl01 no R2TL84GreenCtbl02 no R2TL84GreenCtbl03 no R2TL84GreenCtbl04 no R2TL84GreenCtbl05 no R2TL84GreenCtbl06 no R2TL84GreenCtbl07 no R2TL84GreenCtbl08 no R2TL84GreenCtbl09 no R2TL84GreenCtbl10 no R2TL84GreenCtbl11 no R2TL84GreenCtbl12 no R2TL84GreenCtbl13 no R2TL84GreenCtbl14 no R2TL84GreenCtbl15 no R2TL84GreenCtbl16 no R2TL84GreenCtbl17 no R2TL84GreenCtbl18 no R2TL84GreenCtbl19 no R2TL84GreenCtbl20 no R2TL84GreenCtbl21 no R2TL84GreenCtbl22 no R2TL84GreenCtbl23 no R2TL84GreenCtbl24 no R2TL84GreenCtbl25 no R2TL84GreenCtbl26 no R2TL84GreenCtbl27 no R2TL84GreenCtbl28 no R2TL84GreenCtbl29 no R2TL84GreenCtbl30 no R2TL84GreenCtbl31 no R2TL84GreenStbl00 no R2TL84GreenStbl01 no R2TL84GreenStbl02 no R2TL84GreenStbl03 no R2TL84GreenStbl04 no R2TL84GreenStbl05 no R2TL84GreenStbl06 no R2TL84GreenStbl07 no R2TL84GreenStbl08 no R2TL84GreenStbl09 no R2TL84GreenStbl10 no R2TL84GreenStbl11 no R2TL84GreenStbl12 no R2TL84GreenStbl13 no R2TL84GreenStbl14 no R2TL84GreenStbl15 no R2TL84GreenStbl16 no R2TL84GreenStbl17 no R2TL84GreenStbl18 no R2TL84GreenStbl19 no R2TL84GreenStbl20 no R2TL84GreenStbl21 no R2TL84GreenStbl22 no R2TL84GreenStbl23 no R2TL84GreenStbl24 no R2TL84GreenStbl25 no R2TL84GreenStbl26 no R2TL84GreenStbl27 no R2TL84GreenStbl28 no R2TL84GreenStbl29 no R2TL84GreenStbl30 no R2TL84GreenStbl31 no R2TL84Height no R2TL84Intervals no R2TL84RedCtbl00 no R2TL84RedCtbl01 no R2TL84RedCtbl02 no R2TL84RedCtbl03 no R2TL84RedCtbl04 no R2TL84RedCtbl05 no R2TL84RedCtbl06 no R2TL84RedCtbl07 no R2TL84RedCtbl08 no R2TL84RedCtbl09 no R2TL84RedCtbl10 no R2TL84RedCtbl11 no R2TL84RedCtbl12 no R2TL84RedCtbl13 no R2TL84RedCtbl14 no R2TL84RedCtbl15 no R2TL84RedCtbl16 no R2TL84RedCtbl17 no R2TL84RedCtbl18 no R2TL84RedCtbl19 no R2TL84RedCtbl20 no R2TL84RedCtbl21 no R2TL84RedCtbl22 no R2TL84RedCtbl23 no R2TL84RedCtbl24 no R2TL84RedCtbl25 no R2TL84RedCtbl26 no R2TL84RedCtbl27 no R2TL84RedCtbl28 no R2TL84RedCtbl29 no R2TL84RedCtbl30 no R2TL84RedCtbl31 no R2TL84RedStbl00 no R2TL84RedStbl01 no R2TL84RedStbl02 no R2TL84RedStbl03 no R2TL84RedStbl04 no R2TL84RedStbl05 no R2TL84RedStbl06 no R2TL84RedStbl07 no R2TL84RedStbl08 no R2TL84RedStbl09 no R2TL84RedStbl10 no R2TL84RedStbl11 no R2TL84RedStbl12 no R2TL84RedStbl13 no R2TL84RedStbl14 no R2TL84RedStbl15 no R2TL84RedStbl16 no R2TL84RedStbl17 no R2TL84RedStbl18 no R2TL84RedStbl19 no R2TL84RedStbl20 no R2TL84RedStbl21 no R2TL84RedStbl22 no R2TL84RedStbl23 no R2TL84RedStbl24 no R2TL84RedStbl25 no R2TL84RedStbl26 no R2TL84RedStbl27 no R2TL84RedStbl28 no R2TL84RedStbl29 no R2TL84RedStbl30 no R2TL84RedStbl31 no R2TL84Tbl00 no R2TL84Tbl01 no R2TL84Tbl02 no R2TL84Tbl03 no R2TL84Tbl04 no R2TL84Tbl05 no R2TL84Tbl06 no R2TL84Tbl07 no R2TL84Tbl08 no R2TL84Tbl09 no R2TL84Tbl10 no R2TL84Tbl11 no R2TL84Tbl12 no R2TL84Tbl13 no R2TL84Tbl14 no R2TL84Tbl15 no R2TL84Tbl16 no R2TL84Tbl17 no R2TL84Tbl18 no R2TL84Tbl19 no R2TL84Tbl20 no R2TL84Tbl21 no R2TL84Tbl22 no R2TL84Tbl23 no R2TL84Tbl24 no R2TL84Tbl25 no R2TL84Tbl26 no R2TL84Tbl27 no R2TL84Tbl28 no R2TL84Tbl29 no R2TL84Tbl30 no R2TL84Tbl31 no R2TL84Width no RolloffEnable no SensorFmt no SensorType no SensrFulHght no SensrFulWdth no SensrQtrHght no SensrQtrWdth no SnapshotResol no TL84ConvChrmA_M no TL84ConvChrmA_P no TL84ConvChrmB_M no TL84ConvChrmB_P no TL84ConvChrmC_M no TL84ConvChrmC_P no TL84ConvChrmD_M no TL84ConvChrmD_P no TL84ConvChrmKCb no TL84ConvChrmKCr no TL84ConvLumaK no TL84ConvLumaV0 no TL84ConvLumaV1 no TL84ConvLumaV2 no VideoFps no YhiYloConvChrmA_M no YhiYloConvChrmA_P no YhiYloConvChrmB_M no YhiYloConvChrmB_P no YhiYloConvChrmC_M no YhiYloConvChrmC_P no YhiYloConvChrmD_M no YhiYloConvChrmD_P no YhiYloConvChrmKCb no YhiYloConvChrmKCr no YhiYloConvLumaK no YhiYloConvLumaV0 no YhiYloConvLumaV1 no YhiYloConvLumaV2 no YhiYloCorC0 no YhiYloCorC1 no YhiYloCorC2 no YhiYloCorC3 no YhiYloCorC4 no YhiYloCorC5 no YhiYloCorC6 no YhiYloCorC7 no YhiYloCorC8 no YhiYloCorK0 no YhiYloCorK1 no YhiYloCorK2 no

InfiRay Tags

InfiRay OpMode Tags

This table lists tags found in the InfiRay APP7 IJPEG camera operation mode section.

Index1 Tag Name Writable —— ——– ——– 0 WorkingMode no 1 IntegralTime no 5 IntegratTimeHdr no 9 GainStable no 10 TempControlEnable no 11 DeviceTemp no

InfiRay Isothermal Tags

This table lists tags found in the InfiRay APP8 IJPEG picture isothermal information.

Index1 Tag Name Writable —— ——– ——– 0 IsothermalMax no 4 IsothermalMin no 8 ChromaBarMax no 12 ChromaBarMin no

InfiRay Sensor Tags

This table lists tags found in the InfiRay APP9 IJPEG sensor information chunk.

Index1 Tag Name Writable —— ——– ——– 0 IRSensorManufacturer no 64 IRSensorName no 128 IRSensorPartNumber no 192 IRSensorSerialNumber no 256 IRSensorFirmware no 320 IRSensorAperture no 324 IRFocalLength no 384 VisibleSensorManufacturer no 448 VisibleSensorName no 512 VisibleSensorPartNumber no 576 VisibleSensorSerialNumber no 640 VisibleSensorFirmware no 704 VisibleSensorAperture no 708 VisibleFocalLength no

Jpeg2000 Tags

The tags below are found in JPEG 2000 images and the C2PA CAI JUMBF metadata in various file types (see below). Note that ExifTool currently writes only EXIF, IPTC and XMP tags in Jpeg2000 images, and EXIF and XMP in JXL images. ExifTool will read/write Brotli-compressed EXIF and XMP in JXL images, but the API Compress option must be set to create new EXIF and XMP in compressed format.

C2PA (Coalition for Content Provenance and Authenticity) CAI (Content Authenticity Initiative) JUMBF (JPEG Universal Metadata Box Format) metdata is currently extracted from JPEG, PNG, TIFF-based (eg. TIFF, DNG), QuickTime-based (eg. MP4, MOV, HEIF, AVIF), RIFF-based (eg. WAV, AVI, WebP), PDF, SVG and GIF files, and ID3v2 metadata. The suggested ExifTool command-line arguments for reading C2PA metadata are -jumbf:all -G3 -b -j -u -struct. This metadata may be deleted from writable JPEG, PNG, WebP, TIFF-based, and QuickTime-based files by deleting the JUMBF group with -jumbf:all=. The C2PA JUMBF metadata may be extracted as a block via the JUMBF tag. See <https://c2pa.org/specifications/> for the C2PA specification.

Tag ID Tag Name Writable —— ——– ——– Exif EXIF EXIF asoc Association Jpeg2000 bfdb BinaryDataType no bfil BinaryFilter no bidb BinaryData no bpcc BitsPerComponent no brob BrotliXMP XMP BrotliEXIF EXIF BrotliJUMB Jpeg2000 c2sh C2PASaltHash no cbor CBORData CBOR cdef ComponentDefinition no cgrp ColorGroup no chck DigitalSignature no cmap ComponentMapping no colr ColorSpecification Jpeg2000 ColorSpec comp Composition no copt CompositionOptions no cref Cross-Reference no creg CodestreamRegistration no drep DesiredReproductions no dtbl DataReference no flst FragmentList no free Free no ftbl FragmentTable no ftyp FileType Jpeg2000 FileType gtso GraphicsTechnologyStandardOutput no hrgm GainMapImage no ihdr ImageHeader Jpeg2000 ImageHeader inst InstructionSet no jP JP2Signature no jp2c ContiguousCodestream no PreviewImage no jp2h JP2Header Jpeg2000 jp2i IntellectualProperty XMP jpch CodestreamHeader Jpeg2000 jplh CompositingLayerHeader Jpeg2000 json JSONData JSON jumb JUMBFBox Jpeg2000 jumd JUMBFDescr Jpeg2000 JUMD jxlc JXLCodestream no jxlp PartialJXLCodestream no lbl Label no mdat MediaData no mp7b MPEG7Binary no nlst NumberList no opct Opacity no pclr Palette no prfl Profile no res Resolution Jpeg2000 resc CaptureResolution Jpeg2000 CaptureResolution resd DisplayResolution Jpeg2000 DisplayResolution roid ROIDescription no rreq ReaderRequirements no uinf UUIDInfo Jpeg2000 ulst UUIDList no url URL no uuid UUID-EXIF EXIF UUID-EXIF2 EXIF UUID-EXIF_bad EXIF UUID-IPTC IPTC UUID-IPTC2 IPTC UUID-XMP XMP UUID-GeoJP2 EXIF UUID-Photoshop Photoshop UUID-C2PAClaimSignature CBOR UUID-Signature no UUID-Unknown no xml XML XMP XML XMP - XMP

Jpeg2000 ColorSpec Tags

The table below contains tags in the color specification (colr) box. This box may be rewritten by writing either ICC_Profile, ColorSpace or ColorSpecData. When writing, any existing colr boxes are replaced with the newly created colr box.

NOTE: Care must be taken when writing this color specification because writing a specification that is incompatible with the image data may make the image undisplayable.

Index1 Tag Name Writable —— ——– ——– 0 ColorSpecMethod int8s! 1 ColorSpecPrecedence int8s! 2 ColorSpecApproximation int8s! 3 ICC_Profile ICC_Profile ColorSpace int32u! ColorSpecData undef!

Jpeg2000 FileType Tags

Index4 Tag Name Writable —— ——– ——– 0 MajorBrand no 1 MinorVersion no 2 CompatibleBrands no

Jpeg2000 ImageHeader Tags

Index1 Tag Name Writable —— ——– ——– 0 ImageHeight no 4 ImageWidth no 8 NumberOfComponents no 10 BitsPerComponent no 11 Compression no

Jpeg2000 JUMD Tags

Information extracted from the JUMBF description box.

Tag ID Tag Name Writable —— ——– ——– id JUMDID no label JUMDLabel no sig JUMDSignature no toggles JUMDToggles? no type JUMDType no

Jpeg2000 CaptureResolution Tags

Index1 Tag Name Writable —— ——– ——– 0 CaptureYResolution no 4 CaptureXResolution no 8 CaptureYResolutionUnit no 9 CaptureXResolutionUnit no

Jpeg2000 DisplayResolution Tags

Index1 Tag Name Writable —— ——– ——– 0 DisplayYResolution no 4 DisplayXResolution no 8 DisplayYResolutionUnit no 9 DisplayXResolutionUnit no

APP12 Tags

APP12 PictureInfo Tags

The JPEG APP12 “Picture Info” segment was used by some older cameras, and contains ASCII-based meta information. Below are some tags which have been observed Agfa and Polaroid images, however ExifTool will extract information from any tags found in this segment.

Tag ID Tag Name Writable —— ——– ——– Aperture Aperture no ColorMode ColorMode no ConTake ConTake no ExpBias ExposureCompensation no FNumber FNumber no FWare FirmwareVersion no Flash Flash no FocusMode FocusMode no FocusPos FocusPos no ID ID no ImageSize ImageSize no LightS LightS no Macro Macro no Protect Protect no Quality Quality no Resolution Resolution no Serial# SerialNumber no Shutter ExposureTime no StrobeTime StrobeTime no TimeDate DateTimeOriginal no Type CameraType no Version Version no Ytarget YTarget no Zoom Zoom no ZoomPos ZoomPos no shtr ExposureTime no ylevel YLevel no

APP12 Ducky Tags

Photoshop uses the JPEG APP12 “Ducky” segment to store some information in “Save for Web” images.

Tag ID Tag Name Writable —— ——– ——– 0x0001 Quality int32u/ 0x0002 Comment string/ 0x0003 Copyright string/

AFCP Tags

AFCP stands for AXS File Concatenation Protocol, and is a poorly designed protocol for appending information to the end of files. This can be used as an auxiliary technique to store IPTC information in images, but is incompatible with some file formats.

ExifTool will read and write (but not create) AFCP IPTC information in JPEG and TIFF images.

See <http://web.archive.org/web/20080828211305/http://www.tocarte.com/media/axs_afcp_spec.pdf> for the AFCP specification.

Tag ID Tag Name Writable —— ——– ——– IPTC IPTC IPTC Nail ThumbnailImage no PrVw PreviewImage no TEXT Text no

DarwinCore Tags

Tags defined in the Darwin Core (dwc) XMP namespace. See <http://rs.tdwg.org/dwc/index.htm> for the official specification.

These tags belong to the ExifTool XMP-dwc family 1 group.

Tag Name Writable ——– ——– DCTermsLocation DarwinCore DCTermsLocation Struct DCContinent string_ DCCoordinatePrecision string_ DCCoordinateUncertaintyInMeters string_ DCCountry string_ DCCountryCode string_ DCCounty string_ DCDecimalLatitude string_ DCDecimalLongitude string_ DCFootprintSpatialFit string_ DCFootprintSRS string_ DCFootprintWKT string_ DCGeodeticDatum string_ DCGeoreferencedBy string_ DCGeoreferencedDate string_ DCGeoreferenceProtocol string_ DCGeoreferenceRemarks string_ DCGeoreferenceSources string_ DCGeoreferenceVerificationStatus string_ DCHigherGeography string_ DCHigherGeographyID string_ DCIsland string_ DCIslandGroup string_ DCLocality string_ DCLocationAccordingTo string_ DCLocationID string_ DCLocationRemarks string_ DCMaximumDepthInMeters string_ DCMaximumDistanceAboveSurfaceInMeters string_ DCMaximumElevationInMeters string_ DCMinimumDepthInMeters string_ DCMinimumDistanceAboveSurfaceInMeters string_ DCMinimumElevationInMeters string_ DCMunicipality string_ DCPointRadiusSpatialFit string_ DCStateProvince string_ DCVerbatimCoordinates string_ DCVerbatimCoordinateSystem string_ DCVerbatimDepth string_ DCVerbatimElevation string_ DCVerbatimLatitude string_ DCVerbatimLocality string_ DCVerbatimLongitude string_ DCVerbatimSRS string_ DCVerticalDatum string_ DCWaterBody string_ DCEvent DarwinCore Event Struct EventDay integer_ EventEarliestDate date_ EventEndDayOfYear integer_ EventDate date_ EventID string/_ EventRemarks lang-alt_ EventTime string_ EventFieldNotes string_ EventFieldNumber string_ EventHabitat string_ EventLatestDate date_ EventMonth integer_ EventParentEventID string_ EventSampleSizeUnit string_ EventSampleSizeValue string_ EventSamplingEffort string_ EventSamplingProtocol string_ EventStartDayOfYear integer_ EventVerbatimEventDate string_ EventYear integer_ FossilSpecimen DarwinCore MaterialSample Struct FossilSpecimenMaterialSampleID string_ GeologicalContext DarwinCore GeologicalContext Struct GeologicalContextBed string_ EarliestAgeOrLowestStage string_ EarliestEonOrLowestEonothem string_ EarliestEpochOrLowestSeries string_ EarliestEraOrLowestErathem string_ EarliestPeriodOrLowestSystem string_ GeologicalContextFormation string_ GeologicalContextID string_ GeologicalContextGroup string_ HighestBiostratigraphicZone string_ LatestAgeOrHighestStage string_ LatestEonOrHighestEonothem string_ LatestEpochOrHighestSeries string_ LatestEraOrHighestErathem string_ LatestPeriodOrHighestSystem string_ LithostratigraphicTerms string_ LowestBiostratigraphicZone string_ GeologicalContextMember string_ HumanObservation DarwinCore Event Struct HumanObservationDay integer_ HumanObservationEarliestDate date_ HumanObservationEndDayOfYear integer_ HumanObservationEventDate date_ HumanObservationEventID string/_ HumanObservationEventRemarks lang-alt_ HumanObservationEventTime string_ HumanObservationFieldNotes string_ HumanObservationFieldNumber string_ HumanObservationHabitat string_ HumanObservationLatestDate date_ HumanObservationMonth integer_ HumanObservationParentEventID string_ HumanObservationSampleSizeUnit string_ HumanObservationSampleSizeValue string_ HumanObservationSamplingEffort string_ HumanObservationSamplingProtocol string_ HumanObservationStartDayOfYear integer_ HumanObservationVerbatimEventDate string_ HumanObservationYear integer_ Identification DarwinCore Identification Struct DateIdentified date_ IdentificationID string_ IdentificationQualifier string_ IdentificationReferences string_ IdentificationRemarks string_ IdentificationVerificationStatus string_ IdentifiedBy string_ IdentifiedByID string_ TypeStatus string_ VerbatimIdentification string_ LivingSpecimen DarwinCore MaterialSample Struct LivingSpecimenMaterialSampleID string_ MachineObservation DarwinCore Event Struct MachineObservationDay integer_ MachineObservationEarliestDate date_ MachineObservationEndDayOfYear integer_ MachineObservationEventDate date_ MachineObservationEventID string/_ MachineObservationEventRemarks lang-alt_ MachineObservationEventTime string_ MachineObservationFieldNotes string_ MachineObservationFieldNumber string_ MachineObservationHabitat string_ MachineObservationLatestDate date_ MachineObservationMonth integer_ MachineObservationParentEventID string_ MachineObservationSampleSizeUnit string_ MachineObservationSampleSizeValue string_ MachineObservationSamplingEffort string_ MachineObservationSamplingProtocol string_ MachineObservationStartDayOfYear integer_ MachineObservationVerbatimEventDate string_ MachineObservationYear integer_ MaterialSample DarwinCore MaterialSample Struct MaterialSampleID string_ MeasurementOrFact DarwinCore MeasurementOrFact Struct MeasurementAccuracy string_ MeasurementDeterminedBy string_ MeasurementDeterminedDate date_ MeasurementID string_ MeasurementMethod string_ MeasurementRemarks string_ MeasurementType string_ MeasurementUnit string_ MeasurementValue string_ Occurrence DarwinCore Occurrence Struct OccurrenceAssociatedMedia string_ OccurrenceAssociatedOccurrences string_ OccurrenceAssociatedReferences string_ OccurrenceAssociatedSequences string_ OccurrenceAssociatedTaxa string_ OccurrenceBehavior string_ OccurrenceCatalogNumber string_ OccurrenceDegreeOfEstablishment string_ OccurrenceDisposition string_ OccurrenceEstablishmentMeans string_ OccurrenceGeoreferenceVerificationStatus string_ OccurrenceIndividualCount string_ OccurrenceIndividualID string_ OccurrenceLifeStage string_ OccurrenceDetails string_ OccurrenceID string_ OccurrenceRemarks string_ OccurrenceStatus string_ OccurrenceOrganismQuantity string_ OccurrenceOrganismQuantityType string_ OccurrenceOtherCatalogNumbers string_ OccurrencePathway string_ OccurrencePreparations string_ OccurrencePreviousIdentifications string_ OccurrenceRecordedBy string_ OccurrenceRecordedByID string_ OccurrenceRecordNumber string_ OccurrenceReproductiveCondition string_ OccurrenceSex string_ Organism DarwinCore Organism Struct OrganismAssociatedOccurrences string_ OrganismAssociatedOrganisms string_ OrganismID string_ OrganismName string_ OrganismRemarks string_ OrganismScope string_ OrganismPreviousIdentifications string_ PreservedSpecimen DarwinCore MaterialSample Struct PreservedSpecimenMaterialSampleID string_ Record DarwinCore Record Struct RecordBasisOfRecord string_ RecordCollectionCode string_ RecordCollectionID string_ RecordDataGeneralizations string_ RecordDatasetID string_ RecordDatasetName string_ RecordDynamicProperties string_ RecordInformationWithheld string_ RecordInstitutionCode string_ RecordInstitutionID string_ RecordOwnerInstitutionCode string_ ResourceRelationship DarwinCore ResourceRelationship Struct RelatedResourceID string_ RelationshipAccordingTo string_ RelationshipEstablishedDate date_ RelationshipOfResource string_ RelationshipOfResourceID string_ RelationshipRemarks string_ ResourceID string_ ResourceRelationshipID string_ Taxon DarwinCore Taxon Struct TaxonAcceptedNameUsage string_ TaxonAcceptedNameUsageID string_ TaxonClass string_ TaxonCultivarEpithet string_ TaxonFamily string_ TaxonGenus string_ TaxonHigherClassification string_ TaxonInfraspecificEpithet string_ TaxonKingdom string_ TaxonNameAccordingTo string_ TaxonNameAccordingToID string_ TaxonNamePublishedIn string_ TaxonNamePublishedInID string_ TaxonNamePublishedInYear string_ TaxonNomenclaturalCode string_ TaxonNomenclaturalStatus string_ TaxonOrder string_ TaxonOriginalNameUsage string_ TaxonOriginalNameUsageID string_ TaxonParentNameUsage string_ TaxonParentNameUsageID string_ TaxonPhylum string_ TaxonScientificName string_ TaxonScientificNameAuthorship string_ TaxonScientificNameID string_ TaxonSpecificEpithet string_ TaxonSubgenus string_ TaxonConceptID string_ TaxonID string_ TaxonTaxonomicStatus string_ TaxonRank string_ TaxonRemarks string_ TaxonVerbatimTaxonRank string_ TaxonVernacularName lang-alt_

DarwinCore DCTermsLocation Struct

Field Name Writable ———- ——– Continent string CoordinatePrecision string CoordinateUncertaintyInMeters string Country string CountryCode string County string DecimalLatitude string DecimalLongitude string FootprintSRS string FootprintSpatialFit string FootprintWKT string GeodeticDatum string GeoreferenceProtocol string GeoreferenceRemarks string GeoreferenceSources string GeoreferenceVerificationStatus string GeoreferencedBy string GeoreferencedDate string HigherGeography string HigherGeographyID string Island string IslandGroup string Locality string LocationAccordingTo string LocationID string LocationRemarks string MaximumDepthInMeters string MaximumDistanceAboveSurfaceInMeters string MaximumElevationInMeters string MinimumDepthInMeters string MinimumDistanceAboveSurfaceInMeters string MinimumElevationInMeters string Municipality string PointRadiusSpatialFit string StateProvince string VerbatimCoordinateSystem string VerbatimCoordinates string VerbatimDepth string VerbatimElevation string VerbatimLatitude string VerbatimLocality string VerbatimLongitude string VerbatimSRS string VerticalDatum string WaterBody string

DarwinCore Event Struct

Field Name Writable ———- ——– Day integer EarliestDate date EndDayOfYear integer EventDate date EventID string EventRemarks lang-alt EventTime string FieldNotes string FieldNumber string Habitat string LatestDate date Month integer ParentEventID string SampleSizeUnit string SampleSizeValue string SamplingEffort string SamplingProtocol string StartDayOfYear integer VerbatimEventDate string Year integer

DarwinCore MaterialSample Struct

Field Name Writable ———- ——– MaterialSampleID string

DarwinCore GeologicalContext Struct

Field Name Writable ———- ——– Bed string EarliestAgeOrLowestStage string EarliestEonOrLowestEonothem string EarliestEpochOrLowestSeries string EarliestEraOrLowestErathem string EarliestPeriodOrLowestSystem string Formation string GeologicalContextID string Group string HighestBiostratigraphicZone string LatestAgeOrHighestStage string LatestEonOrHighestEonothem string LatestEpochOrHighestSeries string LatestEraOrHighestErathem string LatestPeriodOrHighestSystem string LithostratigraphicTerms string LowestBiostratigraphicZone string Member string

DarwinCore Identification Struct

Field Name Writable ———- ——– DateIdentified date IdentificationID string IdentificationQualifier string IdentificationReferences string IdentificationRemarks string IdentificationVerificationStatus string IdentifiedBy string IdentifiedByID string TypeStatus string VerbatimIdentification string

DarwinCore MeasurementOrFact Struct

Field Name Writable ———- ——– MeasurementAccuracy string MeasurementDeterminedBy string MeasurementDeterminedDate date MeasurementID string MeasurementMethod string MeasurementRemarks string MeasurementType string MeasurementUnit string MeasurementValue string

DarwinCore Occurrence Struct

Field Name Writable ———- ——– AssociatedMedia string AssociatedOccurrences string AssociatedReferences string AssociatedSequences string AssociatedTaxa string Behavior string CatalogNumber string DegreeOfEstablishment string Disposition string EstablishmentMeans string GeoreferenceVerificationStatus string IndividualCount string IndividualID string LifeStage string OccurrenceDetails string OccurrenceID string OccurrenceRemarks string OccurrenceStatus string OrganismQuantity string OrganismQuantityType string OtherCatalogNumbers string Pathway string Preparations string PreviousIdentifications string RecordNumber string RecordedBy string RecordedByID string ReproductiveCondition string Sex string

DarwinCore Organism Struct

Field Name Writable ———- ——– AssociatedOccurrences string AssociatedOrganisms string OrganismID string OrganismName string OrganismRemarks string OrganismScope string PreviousIdentifications string

DarwinCore Record Struct

Field Name Writable ———- ——– BasisOfRecord string CollectionCode string CollectionID string DataGeneralizations string DatasetID string DatasetName string DynamicProperties string InformationWithheld string InstitutionCode string InstitutionID string OwnerInstitutionCode string

DarwinCore ResourceRelationship Struct

Field Name Writable ———- ——– RelatedResourceID string RelationshipAccordingTo string RelationshipEstablishedDate date RelationshipOfResource string RelationshipOfResourceID string RelationshipRemarks string ResourceID string ResourceRelationshipID string

DarwinCore Taxon Struct

Field Name Writable ———- ——– AcceptedNameUsage string AcceptedNameUsageID string Class string CultivarEpithet string Family string Genus string HigherClassification string InfraspecificEpithet string Kingdom string NameAccordingTo string NameAccordingToID string NamePublishedIn string NamePublishedInID string NamePublishedInYear string NomenclaturalCode string NomenclaturalStatus string Order string OriginalNameUsage string OriginalNameUsageID string ParentNameUsage string ParentNameUsageID string Phylum string ScientificName string ScientificNameAuthorship string ScientificNameID string SpecificEpithet string Subgenus string TaxonConceptID string TaxonID string TaxonRank string TaxonRemarks string TaxonomicStatus string VerbatimTaxonRank string VernacularName lang-alt

FotoStation Tags

The following tables define information found in the FotoWare FotoStation trailer.

Tag ID Tag Name Writable —— ——– ——– 0x0001 IPTC IPTC 0x0002 SoftEdit FotoStation SoftEdit 0x0003 ThumbnailImage yes 0x0004 PreviewImage yes

FotoStation SoftEdit Tags

Index4 Tag Name Writable —— ——– ——– 0 OriginalImageWidth int32s 1 OriginalImageHeight int32s 2 ColorPlanes int32s 3 XYResolution int32s 4 Rotation int32s 6 CropLeft int32s 7 CropTop int32s 8 CropRight int32s 9 CropBottom int32s 11 CropRotation int32s

PhotoMechanic Tags

The Photo Mechanic trailer contains data in an IPTC-format structure, with soft edit information stored under record number 2.

Record Tag Name Writable —— ——– ——– 2 SoftEdit PhotoMechanic SoftEdit

PhotoMechanic SoftEdit Tags

Tag ID Tag Name Writable —— ——– ——– 209 RawCropLeft int32s 210 RawCropTop int32s 211 RawCropRight int32s 212 RawCropBottom int32s 213 ConstrainedCropWidth int32s 214 ConstrainedCropHeight int32s 215 FrameNum int32s 216 Rotation int32s 217 CropLeft int32s 218 CropTop int32s 219 CropRight int32s 220 CropBottom int32s 221 Tagged int32s 222 ColorClass int32s 223 Rating int32s 236 PreviewCropLeft int32s 237 PreviewCropTop int32s 238 PreviewCropRight int32s 239 PreviewCropBottom int32s

PhotoMechanic XMP Tags

Below is a list of the observed PhotoMechanic XMP tags. The actual namespace prefix is “photomechanic” but ExifTool shortens this in the family 1 group name.

These tags belong to the ExifTool XMP-photomech family 1 group.

Tag Name Writable ——– ——– ColorClass integer CountryCode string/ CreatorIdentity string+ EditStatus string PMVersion string Prefs string Tagged boolean TimeCreated string/

Microsoft Tags

Microsoft XMP Tags

Microsoft Photo 1.0 schema XMP tags. This is likely not a complete list, but represents tags which have been observed in sample images. The actual namespace prefix is “MicrosoftPhoto”, but ExifTool shortens this in the family 1 group name.

These tags belong to the ExifTool XMP-microsoft family 1 group.

Tag Name Writable ——– ——– CameraSerialNumber string CreatorAppID string CreatorOpenWithUIOptions string DateAcquired date FlashManufacturer string FlashModel string ItemSubType string LastKeywordIPTC string+ LastKeywordXMP string+ LensManufacturer string LensModel string/ RatingPercent string

Microsoft MP1 Tags

Microsoft Photo 1.1 schema XMP tags which have been observed.

These tags belong to the ExifTool XMP-MP1 family 1 group.

Tag Name Writable ——– ——– Brightness string/ CameraModelID string/ Contrast string/ ExposureCompensation string/ PanoramicStitchCameraMotion string PanoramicStitchMapType string PanoramicStitchPhi0 real PanoramicStitchPhi1 real PanoramicStitchTheta0 real PanoramicStitchTheta1 real PipelineVersion string StreamType string WhiteBalance0 real WhiteBalance1 real WhiteBalance2 real

Microsoft MP Tags

Microsoft Photo 1.2 schema XMP tags which have been observed.

These tags belong to the ExifTool XMP-MP family 1 group.

Tag Name Writable ——– ——– RegionInfoDateRegionsValid date_ RegionInfoMP Microsoft RegionInfo Struct RegionInfoRegions Microsoft Regions Struct_+ RegionPersonDisplayName string_+ RegionPersonEmailDigest string_+ RegionPersonLiveIdCID string_+ RegionPersonSourceID string_+ RegionRectangle string_+

Microsoft RegionInfo Struct

Field Name Writable ———- ——– DateRegionsValid date Regions Microsoft Regions Struct+

Microsoft Regions Struct

Note that PersonLiveIdCID element is called PersonLiveCID according to the Microsoft specification, but in practice their software actually writes PersonLiveIdCID, so ExifTool uses this too.

Field Name Writable ———- ——– PersonDisplayName string PersonEmailDigest string PersonLiveIdCID string PersonSourceID string Rectangle string

Microsoft Stitch Tags

Information found in the Microsoft custom EXIF tag 0x4748, as written by Windows Live Photo Gallery.

Index4 Tag Name Writable —— ——– ——– 0 PanoramicStitchVersion int32u 1 PanoramicStitchCameraMotion int32u 2 PanoramicStitchMapType int32u 3 PanoramicStitchTheta0 float 4 PanoramicStitchTheta1 float 5 PanoramicStitchPhi0 float 6 PanoramicStitchPhi1 float

Microsoft Xtra Tags

Tags found in the Microsoft “Xtra” atom of QuickTime videos. Tag ID’s are not shown because some are unruly GUID’s. Currently most of these tags are not writable because the Microsoft documentation is poor and samples were not available, but more tags may be made writable in the future if samples are provided. Note that writable tags in this table are are flagged to “Avoid”, which means that other more common tags will be written instead if possible unless the Microsoft group is specified explicitly.

Tag Name Writable ——– ——– Abstract no AccountName no AcquisitionTime no AcquisitionTimeDay no AcquisitionTimeMonth no AcquisitionTimeYear no AcquisitionTimeYearMonth no AcquisitionTimeYearMonthDay no AlbumArtist Unicode/ AlbumArtist no AlbumArtistSortOrder no AlbumCoverURL Unicode/ AlbumID no AlbumIDAlbumArtist no AlbumTitle Unicode/ AlbumTitle no AlbumTitleSortOrder no AlternateSourceURL no Anniversary no Artist no AssistantsName no AssistantsPhone no Attachments no Attributes no AudioBitrate no AudioFormat no AudioSampleRate no AudioSampleSize no Author no Author no AuthorSortOrder no AuthorURL Unicode/ AutoSummary no AverageLevel no BccAddresses no BccNames no Beats-per-minute no BeatsPerMinute no BillingInformation no Birthday no BitDepth no Bitrate no Bitrate no BroadcastDate no BusinessAddress no BusinessCity no BusinessCountry-Region no BusinessFax no BusinessHomePage no BusinessPOBox no BusinessPhone no BusinessPostalCode no BusinessStateOrProvince no BusinessStreet no BuyNow no BuyTickets no CDTrackEnabled no CallLetters no CallbackNumber no CameraMaker no CameraManufacturer no CameraModel no CameraModel no CarPhone no Category Unicode/+ Category no CcAddresses no CcNames no CellPhone no ChannelNumber no Channels no Channels no ChapterNum no Children no City no ClientID no ClosedCaptioning no Color no Comment no Comments no Company no CompanyMainPhone no Complete no Composer Unicode/ Composers no Computer no Conductor Unicode/+ Conductors no ContactNames no ContentDistributor Unicode/ ContentDistributorDuration no ContentDistributorType no ContentGroupDescription no ContentType no Contributors no ConversationID no Copyright no Copyright no Count no Country-Region no Creator no CurrentBitrate no DLNAServerUDN no DLNASourceURI no DRMIndividualizedVersion no DRMKeyID no DTCPIPHost no DTCPIPPort no DVDID no DataRate no Date no DateAccessed no DateAcquired vt_filetime/ DateArchived no DateCompleted no DateCreated no DateImported no DateLastSaved no DateModified no DatePictureTaken no DateReceived no DateReleased no DateSent no DateVisited no Department no Description no Description no Description no Dimensions no Director Unicode/+ Directors no DisplayArtist no Division no DocumentID no DueDate no Duration no Duration no Duration no E-mail2 no E-mail3 no E-mailAddress no E-mailDisplayName no E-mailList no EncodedBy Unicode/ EncodedBy no EncodingTime date/ EndDate no EntryType no EpisodeName no Event no Event no ExifVersion no ExposureBias no ExposureProgram no ExposureTime no F-stop no FileAs no FileCount no FileSize no FileType no FileVersion no FirstName no FlagColor no FlagStatus no FlashMode no FocalLength no FocalLength35mm no Folder no FolderName no FolderPath no FormatTag no FourCC no FrameHeight no FrameRate no FrameRate no FrameWidth no Free-busyStatus no Frequency no FromAddresses no FromNames no FullName no Gender no Genre no Genre no GenreID no GivenName no HasAttachments no HasFlag no Hobbies no HomeAddress no HomeCity no HomeCountry-Region no HomeFax no HomePOBox no HomePhone no HomePostalCode no HomeStateOrProvince no HomeStreet no HorizontalResolution no IMAddresses no ISOSpeed no Importance no Incomplete no InitialKey Unicode/ InitialKey no Initials no IsAttachment no IsCompleted no IsDeleted no IsNetworkFeed no IsOnline no IsProtected no IsRecurring no IsVBR no JobTitle no Keywords no Kinds no Label no Language no Language no LastName no LastPrinted no LeadPerformer no LegalTrademarks no LensMaker no LensModel no LibraryID no LibraryName no LightSource no LinkStatus no LinkTarget no Location no Location no Lyrics no MCDI no MailingAddress no MaxAperture no MediaClassPrimaryID GUID/ MediaClassSecondaryID GUID/ MediaContentTypes no MediaCreated no MediaOriginalBroadcastDateTime no MediaOriginalChannel no MediaStationName no MediaType no MeteringMode no MiddleName no Mileage no ModifiedBy no Mood Unicode/ Mood no MoreInfo no Name no Nickname no OfficeLocation no OfflineAvailability no OfflineStatus no OptionalAttendeeAddresses no OptionalAttendees no OrganizerAddress no OrganizerName no Orientation no OriginalAlbumTitle Unicode/ OriginalArtist Unicode/ OriginalLyricist Unicode/ OtherAddress no OtherCity no OtherCountry-Region no OtherPOBox no OtherPostalCode no OtherStateOrProvince no OtherStreet no Owner no POBox no Pager no Pages no ParentalRating Unicode/ ParentalRating no ParentalRatingReason no PartOfSet no PartOfSet no PartOfSet no Participants no Path no PeakValue no PerceivedType no Period Unicode/ Period no PersonalTitle no PixelAspectRatioX no PixelAspectRatioY no PlaylistIndex no PostalCode no PrimaryE-mail no PrimaryPhone no Priority no Producer Unicode/+ Producers no ProductName no ProductVersion no Profession no ProgramDescription no ProgramMode no ProgramName no Project no PromotionURL Unicode/ Protected no ProtectionType no Provider no Provider Unicode/ ProviderLogoURL no ProviderRating no ProviderStyle no ProviderURL no Publisher Unicode/ Publisher no RadioBand no RadioFormat no Rating no RatingOrg no ReadStatus no RecordingTime no RecordingTime no RecordingTimeDay no RecordingTimeMonth no RecordingTimeYear no RecordingTimeYearMonth no RecordingTimeYearMonthDay no ReleaseDate no ReleaseDateDay no ReleaseDateMonth no ReleaseDateYear no ReleaseDateYearMonth no ReleaseDateYearMonthDay no ReminderTime no RequestState no RequiredAttendeeAddresses no RequiredAttendees no Rerun no Resources no SAP no Saturation no SearchRanking no SenderAddress no SenderName no Sensitivity no ShadowFilePath no Shared no SharedUserRating int64u/ SharedWith no Size no Slides no Source no SourceURL no SpaceFree no SpaceUsed no Spouse no StartDate no StateOrProvince no StationCallSign no StationName no Status no Status no Store no Street no Subject no Subject no SubjectDistance no SubscriptionContentID no Subtitle Unicode/ Subtitle no SubtitleDescription no Suffix no Summary no Sync01 no Sync02 no Sync03 no Sync04 no Sync05 no Sync06 no Sync07 no Sync08 no Sync09 no Sync10 no Sync11 no Sync12 no Sync13 no Sync14 no Sync15 no Sync16 no SyncOnly no SyncState no TTY-TTDPhone no TaskOwner no Telex no Temporary no Title no Title no TitleNum no TitleSortOrder no ToAddresses no ToDoTitle no ToNames no TotalBitrate no TotalDuration no TotalEditingTime no TotalFileSize no TotalSize no TrackNumber no TrackNumber no TrackingID no Type no Type no URL no UniqueFileIdentifier no Untitled0 no Untitled1 no Untitled2 no UserCustom1 no UserCustom2 no UserEffectiveRating no UserLastPlayedTime no UserPlayCount no UserPlaycountAfternoon no UserPlaycountEvening no UserPlaycountMorning no UserPlaycountNight no UserPlaycountWeekday no UserPlaycountWeekend no UserRating no UserServiceRating no UserWebURL no VerticalResolution no VideoBitrate no VideoCompression no VideoFormat no VideoFrameRate no VideoHeight no VideoWidth no WMCollectionGroupID no WMCollectionID no WMContentID no WMShadowFileSourceDRMType no WMShadowFileSourceFileType no Webpage no WhiteBalance no WindowsFileName no WordCount no Writer Unicode/ Writers no Year no Year no

GIMP Tags

The GNU Image Manipulation Program (GIMP) writes these tags in its native XCF (eXperimental Computing Facilty) images.

Tag ID Tag Name Writable —— ——– ——– header Header GIMP Header 0x0011 Compression no 0x0013 Resolution GIMP Resolution 0x0014 Tattoo no 0x0015 Parasites GIMP Parasite 0x0016 Units no

GIMP Header Tags

Index1 Tag Name Writable —— ——– ——– 9 XCFVersion no 14 ImageWidth no 18 ImageHeight no 22 ColorMode no

GIMP Resolution Tags

Index4 Tag Name Writable —— ——– ——– 0 XResolution no 1 YResolution no

GIMP Parasite Tags

Tag ID Tag Name Writable —— ——– ——– exif-data ExifData EXIF gimp-comment Comment no gimp-image-metadata XML XMP XML gimp-metadata XMP XMP icc-profile ICC_Profile ICC_Profile icc-profile-name ICCProfileName no iptc-data IPTCData IPTC jpeg-exif-data JPEGExifData EXIF

MIE Tags

MIE is a flexible format which may be used as a stand-alone meta information format, for encapsulation of other files and information, or as a trailer appended to other file formats. The tables below represent currently defined MIE tags, however ExifTool will also extract any other information present in a MIE file.

When writing MIE information, some special features are supported:

1) String values may be written as ASCII (ISO 8859-1) or UTF-8. ExifTool automatically detects the presence of wide characters and treats the string appropriately. Internally, UTF-8 text may be converted to UTF-16 or UTF-32 and stored in this format in the file if it is more compact.

2) All MIE string-value tags support localized text. Localized values are written by adding a language/country code to the tag name in the form TAG-xx_YY, where TAG is the tag name, xx is a 2-character lower case ISO 639-1 language code, and YY is a 2-character upper case ISO 3166-1 alpha 2 country code (eg. Title-en_US). But as usual, the user interface is case-insensitive, and ExifTool will write the correct case to the file.

3) Some numerical MIE tags allow units of measurement to be specified. For these tags, units may be added in brackets immediately following the value (eg. 55(mi/h)). If no units are specified, the default units are written.

4) ExifTool writes compressed metadata to MIE files if the Compress (-z) option is used and Compress::Zlib is available.

See <https://exiftool.org/MIE1.1-20070121.pdf> for the official MIE specification.

Tag ID Tag Name Writable —— ——– ——– 0Type SubfileType string 0Vers MIEVersion string 1Directory SubfileDirectory string 1Name SubfileName string 2MIME SubfileMIMEType string Meta Meta MIE Meta data SubfileData undef rsrc SubfileResource undef zmd5 MD5Digest string zmie TrailerSignature undef

MIE Meta Tags

Tag ID Tag Name Writable —— ——– ——– Audio Audio MIE Audio Camera Camera MIE Camera Document Document MIE Doc EXIF EXIF EXIF Geo Geo MIE Geo ICCProfile ICC_Profile ICC_Profile ID3 ID3 ID3 IPTC IPTC IPTC Image Image MIE Image MakerNotes MakerNotes MIE MakerNotes Preview Preview MIE Preview Thumbnail Thumbnail MIE Thumbnail Video Video MIE Video XMP XMP XMP

MIE Audio Tags

For the Audio group (and any other group containing a ‘data’ element), tags refer to the contained data if present, otherwise they refer to the main SubfileData. The 0Type and 1Name elements should exist only if data is present.

Tag ID Tag Name Writable —— ——– ——– 0Type RelatedAudioFileType string 1Name RelatedAudioFileName string Channels Channels int8u Compression AudioCompression string Duration Duration rational64u~ SampleBits SampleBits int16u SampleRate SampleRate int32u data RelatedAudioFile undef

MIE Camera Tags

Tag ID Tag Name Writable —— ——– ——– Brightness Brightness int8s ColorBalance ColorBalance rational64u[3] ColorTemperature ColorTemperature int32u Contrast Contrast int8s DigitalZoom DigitalZoom rational64u ExposureComp ExposureCompensation rational64s ExposureMode ExposureMode string ExposureTime ExposureTime rational64u FirmwareVersion FirmwareVersion string Flash Flash MIE Flash FocusMode FocusMode string ISO ISO int16u ISOSetting ISOSetting int16u ImageNumber ImageNumber int32u ImageQuality ImageQuality string ImageStabilization ImageStabilization int8u Lens Lens MIE Lens Make Make string MeasuredEV MeasuredEV rational64s Model Model string Orientation Orientation MIE Orient OwnerName OwnerName string Saturation Saturation int8s SensorSize SensorSize rational64u[2] SerialNumber SerialNumber string Sharpness Sharpness int8s ShootingMode ShootingMode string

MIE Flash Tags

Tag ID Tag Name Writable —— ——– ——– ExposureComp FlashExposureComp rational64s Fired FlashFired int8u GuideNumber FlashGuideNumber string Make FlashMake string Mode FlashMode string Model FlashModel string SerialNumber FlashSerialNumber string Type FlashType string

MIE Lens Tags

All recorded lens parameters (focal length, aperture, etc) include the effects of the extender if present.

Tag ID Tag Name Writable —— ——– ——– Extender Extender MIE Extender FNumber FNumber rational64u FocalLength FocalLength rational64u FocusDistance FocusDistance rational64u Make LensMake string MaxAperture MaxAperture rational64u MaxApertureAtMaxFocal MaxApertureAtMaxFocal rational64u MaxFocalLength MaxFocalLength rational64u MinAperture MinAperture rational64u MinFocalLength MinFocalLength rational64u Model LensModel string OpticalZoom OpticalZoom rational64u SerialNumber LensSerialNumber string

MIE Extender Tags

Tag ID Tag Name Writable —— ——– ——– Magnification ExtenderMagnification rational64s Make ExtenderMake string Model ExtenderModel string SerialNumber ExtenderSerialNumber string

MIE Orient Tags

These tags describe the camera orientation.

Tag ID Tag Name Writable —— ——– ——– Azimuth Azimuth rational64s Declination Declination rational64s Elevation Elevation rational64s RightAscension RightAscension rational64s Rotation Rotation rational64s

MIE Doc Tags

Information describing the main document, image or file.

Tag ID Tag Name Writable —— ——– ——– Author Author string Comment Comment string Contributors Contributors string+ Copyright Copyright string CreateDate CreateDate string EMail Email string Keywords Keywords string+ ModifyDate ModifyDate string OriginalDate DateTimeOriginal string Phone PhoneNumber string References References string+ Software Software string Title Title string URL URL string

MIE Geo Tags

Information related to geographic location.

Tag ID Tag Name Writable —— ——– ——– Address Address string City City string Country Country string GPS GPS MIE GPS PostalCode PostalCode string State State string UTM UTM MIE UTM

MIE GPS Tags

Tag ID Tag Name Writable —— ——– ——– Altitude GPSAltitude rational64s Bearing GPSDestBearing rational64s DateTime GPSDateTime string Datum GPSMapDatum string Differential GPSDifferential int8u Distance GPSDestDistance rational64s Heading GPSTrack rational64s Latitude GPSLatitude rational64s[n] Longitude GPSLongitude rational64s[n] MeasureMode GPSMeasureMode int8u Satellites GPSSatellites string Speed GPSSpeed rational64s

MIE UTM Tags

Tag ID Tag Name Writable —— ——– ——– Datum UTMMapDatum string Easting UTMEasting string Northing UTMNorthing string Zone UTMZone int8s

MIE Image Tags

Tag ID Tag Name Writable —— ——– ——– 0Type FullSizeImageType string 1Name FullSizeImageName string BitDepth BitDepth int16u ColorSpace ColorSpace string Components ComponentsConfiguration string Compression CompressionRatio rational32u ImageSize ImageSize int16u[n] OriginalImageSize OriginalImageSize int16u[n] Resolution Resolution rational64u[n] data FullSizeImage undef

MIE MakerNotes Tags

MIE maker notes are contained within separate groups for each manufacturer to avoid name conflicts.

Tag ID Tag Name Writable —— ——– ——– Canon Canon MIE Canon Casio Casio MIE Unknown FujiFilm FujiFilm MIE Unknown Kodak Kodak MIE Unknown KonicaMinolta KonicaMinolta MIE Unknown Nikon Nikon MIE Unknown Olympus Olympus MIE Unknown Panasonic Panasonic MIE Unknown Pentax Pentax MIE Unknown Ricoh Ricoh MIE Unknown Sigma Sigma MIE Unknown Sony Sony MIE Unknown

MIE Canon Tags

Tag ID Tag Name Writable —— ——– ——– VRD CanonVRD CanonVRD

MIE Unknown Tags

Tag ID Tag Name Writable —— ——– ——– [no tags known]

MIE Preview Tags

Tag ID Tag Name Writable —— ——– ——– 0Type PreviewImageType string 1Name PreviewImageName string ImageSize PreviewImageSize int16u[n] data PreviewImage undef

MIE Thumbnail Tags

Tag ID Tag Name Writable —— ——– ——– 0Type ThumbnailImageType string 1Name ThumbnailImageName string ImageSize ThumbnailImageSize int16u[n] data ThumbnailImage undef

MIE Video Tags

Tag ID Tag Name Writable —— ——– ——– 0Type RelatedVideoFileType string 1Name RelatedVideoFileName string Codec Codec string Duration Duration rational64u~ data RelatedVideoFile undef

GIF Tags

This table lists information extracted from GIF images. See <http://www.w3.org/Graphics/GIF/spec-gif89a.txt> for the official GIF89a specification.

Tag Name Writable ——– ——– Comment yes Duration no Extensions GIF Extensions FrameCount no GIFVersion no ScreenDescriptor GIF Screen Text no TransparentColor no

GIF Extensions Tags

Tags extracted from GIF89a application extensions.

Tag ID Tag Name Writable —— ——– ——– C2PA_GIF/ JUMBF Jpeg2000 ICCRGBG1/012 ICC_Profile ICC_Profile MIDICTRL/Jon MIDIControl GIF MIDIControl MIDISONG/Dm7 MIDISong no NETSCAPE/2.0 Animation GIF Animation XMP Data/XMP XMP XMP

GIF MIDIControl Tags

Information extracted from the MIDI control block extension.

Index1 Tag Name Writable —— ——– ——– 0 MIDIControlVersion no 1 SequenceNumber no 2 MelodicPolyphony no 3 PercussivePolyphony no 4 ChannelUsage no 6 DelayTime no

GIF Animation Tags

Information extracted from the “NETSCAPE2.0” animation extension.

Index1 Tag Name Writable —— ——– ——– 1 AnimationIterations no

GIF Screen Tags

Information extracted from the GIF logical screen descriptor.

Index1 Tag Name Writable —— ——– ——– 0 ImageWidth no 2 ImageHeight no 4.1 HasColorMap no 4.2 ColorResolutionDepth no 4.3 BitsPerPixel no 5 BackgroundColor no 6 PixelAspectRatio no

BMP Tags

There really isn’t much meta information in a BMP file as such, just a bit of image related information.

Index1 Tag Name Writable —— ——– ——– 0 BMPVersion no 4 ImageWidth no 8 ImageHeight no 12 Planes no 14 BitDepth no 16 Compression no 20 ImageLength no 24 PixelsPerMeterX no 28 PixelsPerMeterY no 32 NumColors no 36 NumImportantColors no 40 RedMask no 44 GreenMask no 48 BlueMask no 52 AlphaMask no 56 ColorSpace no 60 RedEndpoint no 72 GreenEndpoint no 84 BlueEndpoint no 96 GammaRed no 100 GammaGreen no 104 GammaBlue no 108 RenderingIntent no 112 ProfileDataOffset no 116 ProfileSize no

BMP OS2 Tags

Information extracted from OS/2-format BMP images.

Index1 Tag Name Writable —— ——– ——– 0 BMPVersion no 4 ImageWidth no 6 ImageHeight no 8 Planes no 10 BitDepth no

BMP Extra Tags

Extra information extracted from some BMP images.

Tag Name Writable ——– ——– EmbeddedJPG no EmbeddedPNG no ICC_Profile ICC_Profile LinkedProfileName no

BPG Tags

The information listed below is extracted from BPG (Better Portable Graphics) images. See <http://bellard.org/bpg/> for the specification.

Index1 Tag Name Writable —— ——– ——– 4 PixelFormat no 4.1 Alpha no 4.2 BitDepth no 4.3 ColorSpace no 4.4 Flags no 6 ImageWidth no 7 ImageHeight no 8 ImageLength no

BPG Extensions Tags

Tag ID Tag Name Writable —— ——– ——– 0x0001 EXIF EXIF 0x0002 ICC_Profile ICC_Profile 0x0003 XMP XMP 0x0004 ThumbnailBPG no 0x0005 AnimationControl? no

WPG Tags

Tags extracted from WordPerfect Graphics (WPG) images.

Tag Name Writable ——– ——– ImageHeightInches no ImageWidthInches no Records no+ RecordsV2 no+ WPGVersion no

ICO Tags

Information extracted from Windows ICO (icon) and CUR (cursor) files.

Index1 Tag Name Writable —— ——– ——– 2 ImageType no 4 ImageCount no 6 IconDir ICO IconDir

ICO IconDir Tags

Index1 Tag Name Writable —— ——– ——– 0 ImageWidth no 1 ImageHeight no 2 NumColors no 4 ColorPlanes no HotspotX no 6 BitsPerPixel no HotspotY no 8 ImageLength no

PICT Tags

The PICT format contains no true meta information, except for the possible exception of the LongComment opcode. By default, only ImageWidth, ImageHeight and X/YResolution are extracted from a PICT image. Tags in the following table represent image opcodes. Extraction of these tags is experimental, and is only enabled with the Verbose or Unknown options.

Tag ID Tag Name Writable —— ——– ——– 0x0000 Nop no 0x0001 ClipRgn no 0x0002 BkPat no 0x0003 TxFont no 0x0004 TxFace no 0x0005 TxMode no 0x0006 SpExtra no 0x0007 PnSize no 0x0008 PnMode no 0x0009 PnPat no 0x000a FillPat no 0x000b OvSize no 0x000c Origin no 0x000d TxSize no 0x000e FgColor no 0x000f BkColor no 0x0010 TxRatio no 0x0011 VersionOp no 0x0012 BkPixPat no 0x0013 PnPixPat no 0x0014 FillPixPat no 0x0015 PnLocHFrac no 0x0016 ChExtra no 0x0017 Reserved no 0x001a RGBFgCol no 0x001b RGBBkCol no 0x001c HiliteMode no 0x001d HiliteColor no 0x001e DefHilite no 0x001f OpColor no 0x0020 Line no 0x0021 LineFrom no 0x0022 ShortLine no 0x0023 ShortLineFrom no 0x0024 Reserved no 0x0028 LongText no 0x0029 DHText no 0x002a DVText no 0x002b DHDVText no 0x002c FontName no 0x002d LineJustify no 0x002e GlyphState no 0x002f Reserved no 0x0030 FrameRect no 0x0031 PaintRect no 0x0032 EraseRect no 0x0033 InvertRect no 0x0034 FillRect no 0x0035 Reserved no 0x0038 FrameSameRect no 0x0039 PaintSameRect no 0x003a EraseSameRect no 0x003b InvertSameRect no 0x003c FillSameRect no 0x003d Reserved no 0x0040 FrameRRect no 0x0041 PaintRRect no 0x0042 EraseRRect no 0x0043 InvertRRect no 0x0044 FillRRect no 0x0045 Reserved no 0x0048 FrameSameRRect no 0x0049 PaintSameRRect no 0x004a EraseSameRRect no 0x004b InvertSameRRect no 0x004c FillSameRRect no 0x004d Reserved no 0x0050 FrameOval no 0x0051 PaintOval no 0x0052 EraseOval no 0x0053 InvertOval no 0x0054 FillOval no 0x0055 Reserved no 0x0058 FrameSameOval no 0x0059 PaintSameOval no 0x005a EraseSameOval no 0x005b InvertSameOval no 0x005c FillSameOval no 0x005d Reserved no 0x0060 FrameArc no 0x0061 PaintArc no 0x0062 EraseArc no 0x0063 InvertArc no 0x0064 FillArc no 0x0065 Reserved no 0x0068 FrameSameArc no 0x0069 PaintSameArc no 0x006a EraseSameArc no 0x006b InvertSameArc no 0x006c FillSameArc no 0x006d Reserved no 0x0070 FramePoly no 0x0071 PaintPoly no 0x0072 ErasePoly no 0x0073 InvertPoly no 0x0074 FillPoly no 0x0075 Reserved no 0x0078 FrameSamePoly no 0x0079 PaintSamePoly no 0x007a EraseSamePoly no 0x007b InvertSamePoly no 0x007c FillSamePoly no 0x007d Reserved no 0x0080 FrameRgn no 0x0081 PaintRgn no 0x0082 EraseRgn no 0x0083 InvertRgn no 0x0084 FillRgn no 0x0085 Reserved no 0x0088 FrameSameRgn no 0x0089 PaintSameRgn no 0x008a EraseSameRgn no 0x008b InvertSameRgn no 0x008c FillSameRgn no 0x008d Reserved no 0x0090 BitsRect no 0x0091 BitsRgn no 0x0092 Reserved no 0x0098 PackBitsRect no 0x0099 PackBitsRgn no 0x009a DirectBitsRect no 0x009b DirectBitsRgn no 0x009c Reserved no 0x009d Reserved no 0x009e Reserved no 0x009f Reserved no 0x00a0 ShortComment no 0x00a1 LongComment Photoshop ICC_Profile 0x00a2 Reserved no 0x00b0 Reserved no 0x00d0 Reserved no 0x00ff OpEndPic no 0x0100 Reserved no 0x0200 Reserved no 0x02ff Version no 0x0300 Reserved no 0x0bff Reserved no 0x0c00 HeaderOp no 0x0c01 Reserved no 0x7f00 Reserved no 0x8000 Reserved no 0x8100 Reserved no 0x8200 CompressedQuickTime no 0x8201 UncompressedQuickTime no 0xffff Reserved no

PNG Tags

Tags extracted from PNG images. See <http://www.libpng.org/pub/png/spec/1.2/> for the official PNG 1.2 specification.

According to the specification, a PNG file should end at the IEND chunk, however ExifTool will preserve any data found after this when writing unless it is specifically deleted with -Trailer:All=. When reading, a minor warning is issued if this trailer exists, and ExifTool will attempt to parse this data as additional PNG chunks.

Also according to the PNG specification, there is no restriction on the location of text-type chunks (tEXt, zTXt and iTXt). However, certain utilities (including some Apple and Adobe utilities) won’t read the XMP iTXt chunk if it comes after the IDAT chunk, and at least one utility won’t read other text chunks here. For this reason, when writing, ExifTool 11.63 and later create new text chunks (including XMP) before IDAT, and move existing text chunks to before IDAT.

The PNG format contains CRC checksums that are validated when reading with either the Verbose or Validate option. When writing, these checksums are validated by default, but the FastScan option may be used to bypass this check if speed is more of a concern.

Tag ID Tag Name Writable —— ——– ——– IHDR ImageHeader PNG ImageHeader PLTE Palette no acTL AnimationControl PNG AnimationControl bKGD BackgroundColor no cHRM PrimaryChromaticities PNG PrimaryChromaticities cICP CICodePoints PNG CICodePoints caBX JUMBF Jpeg2000 cpIp OLEInfo FlashPix dSIG DigitalSignature no eXIf eXIf EXIF fRAc FractalParameters no gAMA Gamma yes! gIFg GIFGraphicControlExtension no gIFt GIFPlainTextExtension no gIFx GIFApplicationExtension no hIST PaletteHistogram no iCCP ICC_Profile ICC_Profile iCCP-name ProfileName yes iDOT AppleDataOffsets no iTXt InternationalText PNG TextualData meTa MeTa XMP XML oFFs ImageOffset no pCAL PixelCalibration no pHYs PhysicalPixel PNG PhysicalPixel sBIT SignificantBits no sCAL SubjectScale PNG SubjectScale sPLT SuggestedPalette no sRGB SRGBRendering yes! sTER StereoImage PNG StereoImage tEXt TextualData PNG TextualData tIME ModifyDate yes tRNS Transparency no tXMP XMP XMP vpAg VirtualPage PNG VirtualPage zTXt CompressedText PNG TextualData zxIf zxIf EXIF

PNG ImageHeader Tags

Index1 Tag Name Writable —— ——– ——– 0 ImageWidth no 4 ImageHeight no 8 BitDepth no 9 ColorType no 10 Compression no 11 Filter no 12 Interlace no

PNG AnimationControl Tags

Tags found in the Animation Control chunk. See <https://wiki.mozilla.org/APNG_Specification> for details.

Index4 Tag Name Writable —— ——– ——– 0 AnimationFrames no 1 AnimationPlays no

PNG PrimaryChromaticities Tags

Index4 Tag Name Writable —— ——– ——– 0 WhitePointX no 1 WhitePointY no 2 RedX no 3 RedY no 4 GreenX no 5 GreenY no 6 BlueX no 7 BlueY no

PNG CICodePoints Tags

These tags are found in the PNG cICP chunk and belong to the PNG-cICP family 1 group.

Index1 Tag Name Writable —— ——– ——– 0 ColorPrimaries no 1 TransferCharacteristics no 2 MatrixCoefficients no 3 VideoFullRangeFlag no

PNG TextualData Tags

The PNG TextualData format allows arbitrary tag names to be used. The tags listed below are the only ones that can be written (unless new user-defined tags are added via the configuration file), however ExifTool will extract any other TextualData tags that are found. All TextualData tags (including tags not listed below) are removed when deleting all PNG tags.

These tags may be stored as tEXt, zTXt or iTXt chunks in the PNG image. By default ExifTool writes new string-value tags as as uncompressed tEXt, or compressed zTXt if the Compress (-z) option is used and Compress::Zlib is available. Alternate language tags and values containing special characters (unless the Latin character set is used) are written as iTXt, and compressed if the Compress option is used and Compress::Zlib is available. Raw profile information is always created as compressed zTXt if Compress::Zlib is available, or tEXt otherwise. Standard XMP is written as uncompressed iTXt. User-defined tags may set an ‘iTXt’ flag in the tag definition to be written only as iTXt.

Alternate languages are accessed by suffixing the tag name with a ‘-’, followed by an RFC 3066 language code (eg. “PNG:Comment-fr”, or “Title-en-US”). See <http://www.ietf.org/rfc/rfc3066.txt> for the RFC 3066 specification.

Some of the tags below are not registered as part of the PNG specification, but are included here because they are generated by other software such as ImageMagick.

Tag ID Tag Name Writable —— ——– ——– Artist Artist string Author Author string Collection Collection string Comment Comment string Copyright Copyright string Creation Time CreationTime string Description Description string Disclaimer Disclaimer string Document Document string Label Label string Make Make string Model Model string Raw profile type 8bim Photoshop_Profile Photoshop Raw profile type APP1 APP1_Profile EXIF XMP Raw profile type exif EXIF_Profile EXIF Raw profile type icc ICC_Profile ICC_Profile Raw profile type icm ICC_Profile ICC_Profile Raw profile type iptc IPTC_Profile Photoshop Raw profile type xmp XMP_Profile XMP Software Software string Source Source string TimeStamp TimeStamp string Title Title string URL URL string Warning PNGWarning string XML:com.adobe.xmp XMP XMP create-date CreateDate string modify-date ModDate string

PNG PhysicalPixel Tags

These tags are found in the PNG pHYs chunk and belong to the PNG-pHYs family 1 group. They are all created together with default values if necessary when any of these tags is written, and may only be deleted as a group.

Index1 Tag Name Writable —— ——– ——– 0 PixelsPerUnitX int32u 4 PixelsPerUnitY int32u 8 PixelUnits int8u

PNG SubjectScale Tags

Index1 Tag Name Writable —— ——– ——– 0 SubjectUnits no 1 SubjectPixelWidth no 2 SubjectPixelHeight no

PNG StereoImage Tags

Index1 Tag Name Writable —— ——– ——– 0 StereoMode no

PNG VirtualPage Tags

Index4 Tag Name Writable —— ——– ——– 0 VirtualImageWidth no 1 VirtualImageHeight no 2 VirtualPageUnits no

MNG Tags

This table contains definitions for tags found in MNG and JNG images. MNG is a superset of PNG and JNG, so a MNG image may contain any of these tags as well as any PNG tags. Conversely, only some of these tags are valid for JNG images.

Tag ID Tag Name Writable —— ——– ——– BACK Background MNG Background BASI BasisObject MNG BasisObject CLIP ClipObjects MNG ClipObjects CLON CloneObject MNG CloneObject DBYK DropByKeyword no DEFI DefineObject MNG DefineObject DHDR DeltaPNGHeader MNG DeltaPNGHeader DISC DiscardObjects no DROP DropChunks no FRAM Frame no JHDR JNGHeader MNG JNGHeader LOOP Loop MNG Loop MAGN MagnifyObject MNG MagnifyObject MHDR MNGHeader MNG MNGHeader MOVE MoveObjects MNG MoveObjects ORDR OrderingRestrictions no PAST PasteImage MNG PasteImage PPLT PartialPalette no PROM PromoteParent MNG PromoteParent SAVE SaveObjects no SEEK SeekPoint no SHOW ShowObjects MNG ShowObjects TERM TerminationAction MNG TerminationAction eXPi ExportImage MNG ExportImage fPRI FramePriority MNG FramePriority nEED ResourcesNeeded no pHYg GlobalPixelSize PNG PhysicalPixel

MNG Background Tags

Index1 Tag Name Writable —— ——– ——– 0 BackgroundColor no 6 MandatoryBackground no 7 BackgroundImageID no 9 BackgroundTiling no

MNG BasisObject Tags

Index1 Tag Name Writable —— ——– ——– 0 ImageWidth no 4 ImageHeight no 8 BitDepth no 9 ColorType no 10 Compression no 11 Filter no 12 Interlace no 13 RedSample no 17 GreenSample no 21 BlueSample no 25 AlphaSample no 26 Viewable no

MNG ClipObjects Tags

Index1 Tag Name Writable —— ——– ——– 0 FirstObject no 2 LastObject no 4 DeltaType no 5 ClipBoundary no

MNG CloneObject Tags

Index1 Tag Name Writable —— ——– ——– 0 SourceID no 2 CloneID no 4 CloneType no 5 DoNotShow no 6 ConcreteFlag no 7 LocalDeltaType no 8 DeltaXY no

MNG DefineObject Tags

Index1 Tag Name Writable —— ——– ——– 0 ObjectID no 2 DoNotShow no 3 ConcreteFlag no 4 XYLocation no 12 ClippingBoundary no

MNG DeltaPNGHeader Tags

Index1 Tag Name Writable —— ——– ——– 0 ObjectID no 2 ImageType no 3 DeltaType no 4 BlockSize no 12 BlockLocation no

MNG JNGHeader Tags

Index1 Tag Name Writable —— ——– ——– 0 ImageWidth no 4 ImageHeight no 8 ColorType no 9 BitDepth no 10 Compression no 11 Interlace no 12 AlphaBitDepth no 13 AlphaCompression no 14 AlphaFilter no 15 AlphaInterlace no

MNG Loop Tags

Index1 Tag Name Writable —— ——– ——– 0 NestLevel no 1 IterationCount no 5 TerminationCondition no 6 IterationMinMax no 14 SignalNumber no

MNG MagnifyObject Tags

Index1 Tag Name Writable —— ——– ——– 0 FirstObjectID no 2 LastObjectID no 4 XMethod no 5 XMag no 7 YMag no 9 LeftMag no 11 RightMag no 13 TopMag no 15 BottomMag no 17 YMethod no

MNG MNGHeader Tags

Index4 Tag Name Writable —— ——– ——– 0 ImageWidth no 1 ImageHeight no 2 TicksPerSecond no 3 NominalLayerCount no 4 NominalFrameCount no 5 NominalPlayTime no 6 SimplicityProfile no

MNG MoveObjects Tags

Index1 Tag Name Writable —— ——– ——– 0 FirstObject no 2 LastObject no 4 DeltaType no 5 DeltaXY no

MNG PasteImage Tags

Index1 Tag Name Writable —— ——– ——– 0 DestinationID no 2 TargetDeltaType no 3 TargetXY no 11 SourceID no 13 CompositionMode no 14 Orientation no 15 OffsetOrigin no 16 OffsetXY no 24 BoundaryOrigin no 25 PastClippingBoundary no

MNG PromoteParent Tags

Index1 Tag Name Writable —— ——– ——– 0 NewColorType no 1 NewBitDepth no 2 FillMethod no

MNG ShowObjects Tags

Index1 Tag Name Writable —— ——– ——– 0 FirstObject no 2 LastObject no 4 ShowMode no

MNG TerminationAction Tags

Index1 Tag Name Writable —— ——– ——– 0 TerminationAction no 1 IterationEndAction no 2 Delay no 6 IterationMax no

MNG ExportImage Tags

Index1 Tag Name Writable —— ——– ——– 0 SnapshotID no 2 SnapshotName no

MNG FramePriority Tags

Index1 Tag Name Writable —— ——– ——– 0 DeltaType no 2 Priority no

FLIF Tags

Information extracted from Free Lossless Image Format files. See <http://flif.info/> for more information.

Tag ID Tag Name Writable —— ——– ——– 0 ImageType no 1 BitDepth no 2 ImageWidth no 3 ImageHeight no 4 AnimationFrames no 5 Encoding no eXif EXIF EXIF eXmp XMP XMP iCCP ICC_Profile ICC_Profile

DjVu Tags

Information is extracted from the following chunks in DjVu images. See <http://www.djvu.org/> for the DjVu specification.

Tag ID Tag Name Writable —— ——– ——– ANTa ANTa DjVu Ant ANTz CompressedAnnotation DjVu Ant FORM FORM DjVu Form INCL IncludedFileID no INFO INFO DjVu Info

DjVu Ant Tags

Information extracted from annotation chunks.

Tag ID Tag Name Writable —— ——– ——– metadata Metadata DjVu Meta xmp XMP XMP

DjVu Meta Tags

This table lists the standard DjVu metadata tags, but ExifTool will extract any tags that exist even if they don’t appear here. The DjVu v3 documentation endorses tags borrowed from two standards: 1) BibTeX bibliography system tags (all lowercase Tag ID’s in the table below), and 2) PDF DocInfo tags (capitalized Tag ID’s).

Tag ID Tag Name Writable —— ——– ——– Author Author no CreationDate CreateDate no Creator Creator no Keywords Keywords no ModDate ModifyDate no Producer Producer no Subject Subject no Title Title no Trapped Trapped no address Address no annote Annotation no author Author no booktitle BookTitle no chapter Chapter no crossref CrossRef no edition Edition no eprint EPrint no howpublished HowPublished no institution Institution no journal Journal no key Key no month Month no note Note no number Number no organization Organization no pages Pages no publisher Publisher no school School no series Series no title Title no type Type no url URL no volume Volume no year Year no

DjVu Form Tags

Index1 Tag Name Writable —— ——– ——– 0 SubfileType no

DjVu Info Tags

Index1 Tag Name Writable —— ——– ——– 0 ImageWidth no 2 ImageHeight no 4 DjVuVersion no 6 SpatialResolution no 8 Gamma no 9 Orientation no

DPX Tags

Tags extracted from DPX (Digital Picture Exchange) images.

Index1 Tag Name Writable —— ——– ——– 0 ByteOrder no 8 HeaderVersion no 16 DPXFileSize no 20 DittoKey no 36 ImageFileName no 136 CreateDate no 160 Creator no 260 Project no 460 Copyright no 660 EncryptionKey no 768 Orientation no 770 ImageElements no 772 ImageWidth no 776 ImageHeight no 780 DataSign no 800 ComponentsConfiguration no 801 TransferCharacteristic no 802 ColorimetricSpecification no 803 BitDepth no 820 ImageDescription no 892 Image2Description no 964 Image3Description no 1036 Image4Description no 1108 Image5Description no 1180 Image6Description no 1252 Image7Description no 1324 Image8Description no 1432 SourceFileName no 1532 SourceCreateDate no 1556 InputDeviceName no 1588 InputDeviceSerialNumber no 1628 AspectRatio no 1724 OriginalFrameRate no 1728 ShutterAngle no 1732 FrameID no 1764 SlateInformation no 1920 TimeCode no 1940 FrameRate no 1972 Reserved5? no 2048 UserID no

OpenEXR Tags

Information extracted from EXR images. Use the ExtractEmbedded option to extract information from all frames of a multipart image. See <http://www.openexr.com/> for the official specification.

Tag ID Tag Name Writable —— ——– ——– _flags Flags no _ver EXRVersion no adoptedNeutral AdoptedNeutral no altitude GPSAltitude no aperture Aperture no capDate DateTimeOriginal no channels Channels no chromaticities Chromaticities no chunkCount ChunkCount no comments Comments no compression Compression no dataWindow DataWindow no displayWindow DisplayWindow no envmap EnvironmentMap no expTime ExposureTime no focus FocusDistance no framesPerSecond FramesPerSecond no isoSpeed ISO no keyCode KeyCode no latitude GPSLatitude no lineOrder LineOrder no longitude GPSLongitude no lookModTransform LookModTransform no multiView MultiView no name Name no owner Owner no pixelAspectRatio PixelAspectRatio no preview Preview no renderingTransform RenderingTransform no screenWindowCenter ScreenWindowCenter no screenWindowWidth ScreenWindowWidth no tiles Tiles no timeCode TimeCode no type Type no utcOffset TimeZone no version Version no whiteLuminance WhiteLuminance no worldToCamera WorldToCamera no worldToNDC WorldToNDC no wrapmodes WrapModes no xDensity XResolution no

ZISRAW Tags

As well as the header information listed below, ExifTool also extracts the top-level XML-based metadata from Zeiss Integrated Software RAW (ZISRAW) CZI files.

Index1 Tag Name Writable —— ——– ——– 32 ZISRAWVersion no 48 PrimaryFileGUID no 64 FileGUID no

MRC Tags

Tags extracted from Medical Research Council (MRC) format imaging files. See <https://www.ccpem.ac.uk/mrc_format/mrc2014.php> for the specification.

Index4 Tag Name Writable —— ——– ——– 0 ImageWidth no 1 ImageHeight no 2 ImageDepth no 3 ImageMode no 4 StartPoint no 7 GridSize no 10 CellWidth no 11 CellHeight no 12 CellDepth no 13 CellAlpha no 14 CellBeta no 15 CellGamma no 16 ImageWidthAxis no 17 ImageHeightAxis no 18 ImageDepthAxis no 19 DensityMin no 20 DensityMax no 21 DensityMean no 22 SpaceGroupNumber no 23 ExtendedHeaderSize no 26 ExtendedHeaderType no 27 MRCVersion no 49 Origin no 53 MachineStamp no 54 RMSDeviation no 55 NumberOfLabels no 56 Label0 no 76 Label1 no 96 Label2 no 116 Label3 no 136 Label4 no 156 Label5 no 176 Label6 no 196 Label7 no 216 Label8 no 236 Label9 no

MRC FEI12 Tags

Tags extracted from FEI1 and FEI2 extended headers.

Index1 Tag Name Writable —— ——– ——– 0 MetadataSize no 4 MetadataVersion no 8 Bitmask1 no 12 TimeStamp no 20 MicroscopeType no 36 MicroscopeID no 52 Application no 68 AppVersion no 84 HighTension no 92 Dose no 100 AlphaTilt no 108 BetaTilt no 116 XStage no 124 YStage no 132 ZStage no 140 TiltAxisAngle no 148 DualAxisRot no 156 PixelSizeX no 164 PixelSizeY no 220 Defocus no 228 STEMDefocus no 236 AppliedDefocus no 244 InstrumentMode no 248 ProjectionMode no 252 ObjectiveLens no 268 HighMagnificationMode no 284 ProbeMode no 288 EFTEMOn no 289 Magnification no 297 Bitmask2 no 301 CameraLength no 309 SpotIndex no 313 IlluminationArea no 321 Intensity no 329 ConvergenceAngle no 337 IlluminationMode no 353 WideConvergenceAngleRange no 354 SlitInserted no 355 SlitWidth no 363 AccelVoltOffset no 371 DriftTubeVolt no 379 EnergyShift no 387 ShiftOffsetX no 395 ShiftOffsetY no 403 ShiftX no 411 ShiftY no 419 IntegrationTime no 427 BinningWidth no 431 BinningHeight no 435 CameraName no 451 ReadoutAreaLeft no 455 ReadoutAreaTop no 459 ReadoutAreaRight no 463 ReadoutAreaBottom no 467 CetaNoiseReduct no 468 CetaFramesSummed no 472 DirectDetElectronCounting no 473 DirectDetAlignFrames no 490 Bitmask3 no 518 PhasePlate no 519 STEMDetectorName no 535 Gain no 543 Offset no 571 DwellTime no 579 FrameTime no 587 ScanSizeLeft no 591 ScanSizeTop no 595 ScanSizeRight no 599 ScanSizeBottom no 603 FullScanFOV_X no 611 FullScanFOV_Y no 619 Element no 635 EnergyIntervalLower no 643 EnergyIntervalHigher no 651 Method no 655 IsDoseFraction no 656 FractionNumber no 660 StartFrame no 664 EndFrame no 668 InputStackFilename no 748 Bitmask4 no 752 AlphaTiltMin no 760 AlphaTiltMax no 768 ScanRotation no 776 DiffractionPatternRotation no 784 ImageRotation no 792 ScanModeEnumeration no 796 AcquisitionTimeStamp no 804 DetectorCommercialName no 820 StartTiltAngle no 828 EndTiltAngle no 836 TiltPerImage no 844 TitlSpeed no 852 BeamCenterX no 856 BeamCenterY no 860 CFEGFlashTimeStamp no 868 PhasePlatePosition no 872 ObjectiveAperture no

LIF Tags

Tags extracted from Leica Image Format (LIF) imaging files. As well as the tags listed below, all available information is extracted from the XML-format metadata in the LIF header.

Tag Name Writable ——– ——– TimeStampList no

MIFF Tags

The MIFF (Magick Image File Format) format allows aribrary tag names to be used. Only the standard tag names are listed below, however ExifTool will decode any tags found in the image.

Tag ID Tag Name Writable —— ——– ——– background-color BackgroundColor no blue-primary BluePrimary no border-color BorderColor no class Class no colors Colors no colorspace ColorSpace no columns ImageWidth no compression Compression no delay Delay no depth Depth no dispose Dispose no gamma Gamma no green-primary GreenPrimary no id ID no iterations Iterations no label Label no matt-color MattColor no matte Matte no montage Montage no packets Packets no page Page no profile-APP1 APP1_Profile EXIF XMP profile-exif EXIF_Profile EXIF profile-icc ICC_Profile ICC_Profile profile-iptc IPTC_Profile Photoshop profile-xmp XMP_Profile XMP red-primary RedPrimary no rendering-intent RenderingIntent no resolution Resolution no rows ImageHeight no scene Scene no signature Signature no units Units no white-point WhitePoint no

PCX Tags

Tags extracted from PC Paintbrush images.

Index1 Tag Name Writable —— ——– ——– 0 Manufacturer no 1 Software no 2 Encoding no 3 BitsPerPixel no 4 LeftMargin no 6 TopMargin no 8 ImageWidth no 10 ImageHeight no 12 XResolution no 14 YResolution no 65 ColorPlanes no 66 BytesPerLine no 68 ColorMode no 70 ScreenWidth no 72 ScreenHeight no

PGF Tags

The following table lists information extracted from the header of Progressive Graphics File (PGF) images. As well, information is extracted from the embedded PNG metadata image if it exists. See <http://www.libpgf.org/> for the PGF specification.

Index1 Tag Name Writable —— ——– ——– 3 PGFVersion no 8 ImageWidth no 12 ImageHeight no 16 PyramidLevels no 17 Quality no 18 BitsPerPixel no 19 ColorComponents no 20 ColorMode no 21 BackgroundColor no

PSP Tags

Tags extracted from Paint Shop Pro images (PSP, PSPIMAGE, PSPFRAME, PSPSHAPE, PSPTUBE and TUB extensions).

Tag ID Tag Name Writable —— ——– ——– FileVersion FileVersion no 0x0000 ImageInfo PSP Image PSP Image 0x0001 CreatorInfo PSP Creator 0x000a ExtendedInfo PSP Ext

PSP Image Tags

Index1 Tag Name Writable —— ——– ——– 0 ImageWidth no 4 ImageHeight no 8 ImageResolution no 16 ResolutionUnit no 17 Compression no 19 BitsPerSample no 21 Planes no 23 NumColors no

PSP Creator Tags

Tag ID Tag Name Writable —— ——– ——– 0x0000 Title no 0x0001 CreateDate no 0x0002 ModifyDate no 0x0003 Artist no 0x0004 Copyright no 0x0005 Description no 0x0006 CreatorAppID no 0x0007 CreatorAppVersion no

PSP Ext Tags

Tag ID Tag Name Writable —— ——– ——– 0x0003 EXIFInfo EXIF

PhotoCD Tags

Tags extracted from Kodak Photo CD Image Pac (PCD) files.

Index1 Tag Name Writable —— ——– ——– 7 SpecificationVersion no 9 AuthoringSoftwareRelease no 11 ImageMagnificationDescriptor no 13 CreateDate no 17 ModifyDate no 21 ImageMedium no 22 ProductType no 42 ScannerVendorID no 62 ScannerProductID no 78 ScannerFirmwareVersion no 82 ScannerFirmwareDate no 90 ScannerSerialNumber no 110 ScannerPixelSize no 112 ImageWorkstationMake no 132 CharacterSet no 133 CharacterEscapeSequence? no 165 PhotoFinisherName no 228 SceneBalanceAlgorithmRevision no 230 SceneBalanceAlgorithmCommand no 325 SceneBalanceAlgorithmFilmID no 331 CopyrightStatus no 332 CopyrightFileName no 1538 Orientation no 1538.1 ImageWidth no 1538.2 ImageHeight no 1538.3 CompressionClass no

Radiance Tags

Information extracted from Radiance RGBE HDR images. Tag ID’s are all uppercase as stored in the file, but converted to lowercase by when extracting to avoid conflicts with internal ExifTool variables. See <http://radsite.lbl.gov/radiance/refer/filefmts.pdf> and <http://www.graphics.cornell.edu/online/formats/rgbe/> for the specification.

Tag ID Tag Name Writable —— ——– ——– _command Command no _comment Comment no _orient Orientation no colorcorr ColorCorrection no exposure Exposure no format Format no gamma Gamma no pixaspect PixelAspectRatio no primaries ColorPrimaries no software Software no view View no

Other PFM Tags

Tags extracted from Portable FloatMap images. See <http://www.pauldebevec.com/Research/HDR/PFM/> for the specification.

Tag Name Writable ——– ——– ByteOrder no ColorSpace no ImageHeight no ImageWidth no

PDF Tags

The tags listed in the PDF tables below are those which are used by ExifTool to extract meta information, but they are only a small fraction of the total number of available PDF tags. See <http://www.adobe.com/devnet/pdf/pdf_reference.html> for the official PDF specification.

ExifTool supports reading and writing PDF documents up to version 2.0, including support for RC4, AES-128 and AES-256 encryption. A Password option is provided to allow processing of password-protected PDF files.

ExifTool may be used to write native PDF and XMP metadata to PDF files. It uses an incremental update technique that has the advantages of being both fast and reversible. If ExifTool was used to modify a PDF file, the original may be recovered by deleting the PDF-update pseudo-group (with -PDF-update:all= on the command line). However, there are two main disadvantages to this technique:

1) A linearized PDF file is no longer linearized after the update, so it must be subsequently re-linearized if this is required.

2) All metadata edits are reversible. While this would normally be considered an advantage, it is a potential security problem because old information is never actually deleted from the file. (However, after running ExifTool the old information may be removed permanently using the “qpdf” utility with this command: “qpdf –linearize in.pdf out.pdf”.)

Tag ID Tag Name Writable —— ——– ——– Encrypt Encrypt PDF Encrypt Info Info PDF Info Root Root PDF Root _linearized Linearized no

PDF Encrypt Tags

Tags extracted from the document Encrypt dictionary.

Tag ID Tag Name Writable —— ——– ——– Filter Encryption no P UserAccess no

PDF Info Tags

As well as the tags listed below, the PDF specification allows for user-defined tags to exist in the Info dictionary. These tags, which should have corresponding XMP-pdfx entries in the XMP of the PDF XML Metadata object, are also extracted by ExifTool.

Writable specifies the value format, and may be string, date, integer, real, boolean or name for PDF tags.

Tag ID Tag Name Writable —— ——– ——– AAPL:Keywords AppleKeywords string+ Author Author string CreationDate CreateDate date Creator Creator string Keywords Keywords string+ ModDate ModifyDate date Producer Producer string Subject Subject string Title Title string Trapped Trapped string!

PDF Root Tags

This is the PDF document catalog.

Tag ID Tag Name Writable —— ——– ——– AF AF PDF AF AcroForm AcroForm PDF AcroForm Lang Language no MarkInfo MarkInfo PDF MarkInfo Metadata Metadata PDF Metadata PageLayout PageLayout no PageMode PageMode no Pages Pages PDF Pages Perms Perms PDF Perms Version PDFVersion no

PDF AF Tags

Processed only for C2PA information if AFRelationship is “/C2PA_Manifest”.

Tag ID Tag Name Writable —— ——– ——– EF EF PDF EF

PDF EF Tags

Tag ID Tag Name Writable —— ——– ——– F F_ PDF F

PDF F Tags

C2PA JUMBF metadata extracted from “/C2PA_Manifest” file.

Tag ID Tag Name Writable —— ——– ——– _stream JUMBF Jpeg2000

PDF AcroForm Tags

Tag ID Tag Name Writable —— ——– ——– _has_xfa HasXFA no

PDF MarkInfo Tags

Tag ID Tag Name Writable —— ——– ——– Marked TaggedPDF no

PDF Metadata Tags

Tag ID Tag Name Writable —— ——– ——– XML_stream XMP XMP

PDF Pages Tags

Tag ID Tag Name Writable —— ——– ——– Count PageCount no Kids Kids PDF Kids

PDF Kids Tags

Tag ID Tag Name Writable —— ——– ——– Kids Kids PDF Kids Metadata Metadata PDF Metadata PieceInfo PieceInfo PDF PieceInfo Resources Resources PDF Resources

PDF PieceInfo Tags

Tag ID Tag Name Writable —— ——– ——– AdobePhotoshop AdobePhotoshop PDF AdobePhotoshop Illustrator Illustrator PDF Illustrator

PDF AdobePhotoshop Tags

Tag ID Tag Name Writable —— ——– ——– Private Private PDF Private

PDF Private Tags

Tag ID Tag Name Writable —— ——– ——– ImageResources ImageResources PDF ImageResources

PDF ImageResources Tags

Tag ID Tag Name Writable —— ——– ——– _stream _stream Photoshop

PDF Illustrator Tags

Tag ID Tag Name Writable —— ——– ——– Private Private PDF AIPrivate

PDF AIPrivate Tags

Tag ID Tag Name Writable —— ——– ——– AIMetaData AIMetaData PDF AIMetaData AIPDFPrivateData AIPDFPrivateData PostScript AIPrivateData AIPrivateData PostScript ContainerVersion ContainerVersion no CreatorVersion CreatorVersion no RoundTripVersion RoundTripVersion no

PDF AIMetaData Tags

Tag ID Tag Name Writable —— ——– ——– _stream _stream PostScript

PDF Resources Tags

Tag ID Tag Name Writable —— ——– ——– ColorSpace ColorSpace PDF ColorSpace Properties Properties PDF Properties XObject XObject PDF XObject

PDF ColorSpace Tags

Tag ID Tag Name Writable —— ——– ——– CS0 CS0 PDF DefaultRGB Cs1 Cs1 PDF DefaultRGB DefaultCMYK DefaultCMYK PDF DefaultRGB DefaultRGB DefaultRGB PDF DefaultRGB

PDF DefaultRGB Tags

Tag ID Tag Name Writable —— ——– ——– ICCBased ICCBased PDF ICCBased

PDF ICCBased Tags

Tag ID Tag Name Writable —— ——– ——– _stream _stream ICC_Profile

PDF Properties Tags

Tag ID Tag Name Writable —— ——– ——– MC MC PDF MC

PDF MC Tags

Tag ID Tag Name Writable —— ——– ——– Metadata Metadata PDF Metadata

PDF XObject Tags

Tag ID Tag Name Writable —— ——– ——– Im Im PDF Im

PDF Im Tags

Information extracted from embedded images with the ExtractEmbedded option. The EmbeddedImage and its metadata are extracted only for JPEG and Jpeg2000 image formats.

Tag ID Tag Name Writable —— ——– ——– ColorSpace EmbeddedImageColorSpace no+ Filter EmbeddedImageFilter no+ Height EmbeddedImageHeight no Image_stream EmbeddedImage no Width EmbeddedImageWidth no

PDF Perms Tags

Additional document permissions imposed by digital signatures.

Tag ID Tag Name Writable —— ——– ——– DocMDP DocMDP PDF Signature FieldMDP FieldMDP PDF Signature UR3 UR3 PDF Signature

PDF Signature Tags

Tag ID Tag Name Writable —— ——– ——– ContactInfo SignerContactInfo no Location SigningLocation no M SigningDate no Name SigningAuthority no Prop_AuthTime AuthenticationTime no Prop_AuthType AuthenticationType no Reason SigningReason no Reference Reference PDF Reference

PDF Reference Tags

Tag ID Tag Name Writable —— ——– ——– TransformParams TransformParams PDF TransformParams

PDF TransformParams Tags

Tag ID Tag Name Writable —— ——– ——– Action FieldPermissions no Annots AnnotationUsageRights no+ Document DocumentUsageRights no+ EF EmbeddedFileUsageRights no+ Fields FormFields no+ Form FormUsageRights no+ FormEX FormExtraUsageRights no+ Msg UsageRightsMessage no P ModificationPermissions no Signature SignatureUsageRights no+

PostScript Tags

Tag ID Tag Name Writable —— ——– ——– AI12_BuildNumber AIBuildNumber no AI3_ColorUsage AIColorUsage no AI5_FileFormat AIFileFormat no AI5_NumLayers AINumLayers no AI5_RulerUnits AIRulerUnits no AI5_TargetResolution AITargetResolution no AI8_CreatorVersion AICreatorVersion no AI9_ColorModel AIColorModel no Author Author string BeginDocument EmbeddedFile PostScript BeginICCProfile ICC_Profile ICC_Profile BeginPhotoshop PhotoshopData Photoshop BoundingBox BoundingBox no Copyright Copyright string CreationDate CreateDate string Creator Creator string EmbeddedFileName EmbeddedFileName no For For string ImageData ImageData no Keywords Keywords string ModDate ModifyDate string Pages Pages no Routing Routing string Subject Subject string TIFFPreview TIFFPreview no Title Title string Version Version string begin_xml_packet XMP XMP

ID3 Tags

ExifTool extracts ID3 and Lyrics3 information from MP3, MPEG, WAV, AIFF, OGG, FLAC, APE, MPC and RealAudio files. ID3v2 tags which support multiple languages (eg. Comment and Lyrics) are extracted by specifying the tag name, followed by a dash (’-’), then a 3-character ISO 639-2 language code (eg. “Comment-spa”). See <https://id3.org/> for the official ID3 specification and <http://www.loc.gov/standards/iso639-2/php/code_list.php> for a list of ISO 639-2 language codes.

Tag Name Writable ——– ——– ID3v1 ID3 v1 ID3v1_Enh ID3 v1_Enh ID3v2_2 ID3 v2_2 ID3v2_3 ID3 v2_3 ID3v2_4 ID3 v2_4

ID3 v1 Tags

Index1 Tag Name Writable —— ——– ——– 3 Title no 33 Artist no 63 Album no 93 Year no 97 Comment no 125 Track no 127 Genre no

ID3 v1_Enh Tags

ID3 version 1 “Enhanced TAG” information (not part of the official spec).

Index1 Tag Name Writable —— ——– ——– 4 Title2 no 64 Artist2 no 124 Album2 no 184 Speed no 185 Genre no 215 StartTime no 221 EndTime no

ID3 v2_2 Tags

ExifTool extracts mainly text-based tags from ID3v2 information. The tags in the tables below are those extracted by ExifTool, and don’t represent a complete list of available ID3v2 tags.

ID3 version 2.2 tags. (These are the tags written by iTunes 5.0.)

Tag ID Tag Name Writable —— ——– ——– CNT PlayCounter no COM Comment no GP1 Grouping no IPL InvolvedPeople no ITU iTunesU? no MVI MovementNumber no MVN MovementName no PCS Podcast? no PIC Picture no PIC-1 PictureFormat no PIC-2 PictureType no PIC-3 PictureDescription no POP Popularimeter no RVA RelativeVolumeAdjustment no SLT SynLyrics ID3 SynLyrics TAL Album no TBP BeatsPerMinute no TCM Composer no TCO Genre no TCP Compilation no TCR Copyright no TDA Date no TDY PlaylistDelay no TEN EncodedBy no TFT FileType no TIM Time no TKE InitialKey no TLA Language no TLE Length no TMT Media no TOA OriginalArtist no TOF OriginalFileName no TOL OriginalLyricist no TOR OriginalReleaseYear no TOT OriginalAlbum no TP1 Artist no TP2 Band no TP3 Conductor no TP4 InterpretedBy no TPA PartOfSet no TPB Publisher no TRC ISRC no TRD RecordingDates no TRK Track no TS2 AlbumArtistSortOrder no TSA AlbumSortOrder no TSC ComposerSortOrder no TSI Size no TSP PerformerSortOrder no TSS EncoderSettings no TST TitleSortOrder no TT1 Grouping no TT2 Title no TT3 Subtitle no TXT Lyricist no TXX UserDefinedText no TYE Year no ULT Lyrics no WAF FileURL no WAR ArtistURL no WAS SourceURL no WCM CommercialURL no WCP CopyrightURL no WPB PublisherURL no WXX UserDefinedURL no

ID3 SynLyrics Tags

The following tags are extracted from synchronized lyrics/text frames.

Tag Name Writable ——– ——– SynchronizedLyricsDescription no SynchronizedLyricsText no+ SynchronizedLyricsType no

ID3 v2_3 Tags

ID3 version 2.3 tags. Includes some non-standard tags written by other software.

Tag ID Tag Name Writable —— ——– ——– APIC Picture no APIC-1 PictureMIMEType no APIC-2 PictureType no APIC-3 PictureDescription no COMM Comment no GEOB GeneralEncapsulatedObject ID3 GEOB GRP1 Grouping no IPLS InvolvedPeople no ITNU iTunesU? no MCDI MusicCDIdentifier no MVIN MovementNumber no MVNM MovementName no OWNE Ownership no PCNT PlayCounter no PCST Podcast? no POPM Popularimeter no PRIV Private ID3 Private SYLT SynLyrics ID3 SynLyrics TALB Album no TBPM BeatsPerMinute no TCAT PodcastCategory no TCMP Compilation no TCOM Composer no TCON Genre no TCOP Copyright no TDAT Date no TDES PodcastDescription no TDLY PlaylistDelay no TENC EncodedBy no TEXT Lyricist no TFLT FileType no TGID PodcastID no TIME Time no TIT1 Grouping no TIT2 Title no TIT3 Subtitle no TKEY InitialKey no TKWD PodcastKeywords no TLAN Language no TLEN Length no TMED Media no TOAL OriginalAlbum no TOFN OriginalFileName no TOLY OriginalLyricist no TOPE OriginalArtist no TORY OriginalReleaseYear no TOWN FileOwner no TPE1 Artist no TPE2 Band no TPE3 Conductor no TPE4 InterpretedBy no TPOS PartOfSet no TPUB Publisher no TRCK Track no TRDA RecordingDates no TRSN InternetRadioStationName no TRSO InternetRadioStationOwner no TSIZ Size no TSO2 AlbumArtistSortOrder no TSOC ComposerSortOrder no TSRC ISRC no TSSE EncoderSettings no TXXX UserDefinedText no TYER Year no USER TermsOfUse no USLT Lyrics no WCOM CommercialURL no WCOP CopyrightURL no WFED PodcastURL no WOAF FileURL no WOAR ArtistURL no WOAS SourceURL no WORS InternetRadioStationURL no WPAY PaymentURL no WPUB PublisherURL no WXXX UserDefinedURL no XDOR OriginalReleaseTime no XOLY OlympusDSS Olympus DSS XSOA AlbumSortOrder no XSOP PerformerSortOrder no XSOT TitleSortOrder no

ID3 GEOB Tags

Tag ID Tag Name Writable —— ——– ——– GEOB-Data GEOB-Data no GEOB-Desc GEOB-Desc no GEOB-File GEOB-File no GEOB-Mime GEOB-Mime no application/x-c2pa-manifest-store JUMBF Jpeg2000

ID3 Private Tags

ID3 private (PRIV) tags. ExifTool will decode any private tags found, even if they do not appear in this table.

Tag Name Writable ——– ——– AverageLevel no PeakValue no WM_CollectionGroupID no WM_CollectionID no WM_ContentID no WM_MediaClassPrimaryID no WM_MediaClassSecondaryID no WM_Provider no XMP XMP

ID3 v2_4 Tags

ID3 version 2.4 tags. Includes some non-standard tags written by other software.

Tag ID Tag Name Writable —— ——– ——– APIC Picture no APIC-1 PictureMIMEType no APIC-2 PictureType no APIC-3 PictureDescription no COMM Comment no GEOB GeneralEncapsulatedObject ID3 GEOB GRP1 Grouping no ITNU iTunesU? no MCDI MusicCDIdentifier no MVIN MovementNumber no MVNM MovementName no OWNE Ownership no PCNT PlayCounter no PCST Podcast? no POPM Popularimeter no PRIV Private ID3 Private RVA2 RelativeVolumeAdjustment no SYLT SynLyrics ID3 SynLyrics TALB Album no TBPM BeatsPerMinute no TCAT PodcastCategory no TCMP Compilation no TCOM Composer no TCON Genre no TCOP Copyright no TDEN EncodingTime no TDES PodcastDescription no TDLY PlaylistDelay no TDOR OriginalReleaseTime no TDRC RecordingTime no TDRL ReleaseTime no TDTG TaggingTime no TENC EncodedBy no TEXT Lyricist no TFLT FileType no TGID PodcastID no TIPL InvolvedPeople no TIT1 Grouping no TIT2 Title no TIT3 Subtitle no TKEY InitialKey no TKWD PodcastKeywords no TLAN Language no TLEN Length no TMCL MusicianCredits no TMED Media no TMOO Mood no TOAL OriginalAlbum no TOFN OriginalFileName no TOLY OriginalLyricist no TOPE OriginalArtist no TOWN FileOwner no TPE1 Artist no TPE2 Band no TPE3 Conductor no TPE4 InterpretedBy no TPOS PartOfSet no TPRO ProducedNotice no TPUB Publisher no TRCK Track no TRSN InternetRadioStationName no TRSO InternetRadioStationOwner no TSO2 AlbumArtistSortOrder no TSOA AlbumSortOrder no TSOC ComposerSortOrder no TSOP PerformerSortOrder no TSOT TitleSortOrder no TSRC ISRC no TSSE EncoderSettings no TSST SetSubtitle no TXXX UserDefinedText no USER TermsOfUse no USLT Lyrics no WCOM CommercialURL no WCOP CopyrightURL no WFED PodcastURL no WOAF FileURL no WOAR ArtistURL no WOAS SourceURL no WORS InternetRadioStationURL no WPAY PaymentURL no WPUB PublisherURL no WXXX UserDefinedURL no XDOR OriginalReleaseTime no XOLY OlympusDSS Olympus DSS XSOA AlbumSortOrder no XSOP PerformerSortOrder no XSOT TitleSortOrder no

ID3 Lyrics3 Tags

ExifTool extracts Lyrics3 version 1.00 and 2.00 tags from any file that supports ID3. See <https://id3.org/Lyrics3> for the specification.

Tag ID Tag Name Writable —— ——– ——– AUT Author no CRC CRC no EAL ExtendedAlbumName no EAR ExtendedArtistName no ETT ExtendedTrackTitle no IMG AssociatedImageFile no IND Indications no INF AdditionalInfo no LYR Lyrics no

ITC Tags

This information is found in iTunes Cover Flow data files.

Tag ID Tag Name Writable —— ——– ——– data ImageData no itch Itch ITC Header item Item ITC Item

ITC Header Tags

Index1 Tag Name Writable —— ——– ——– 16 DataType no

ITC Item Tags

Index4 Tag Name Writable —— ——– ——– 0 LibraryID no 2 TrackID no 4 DataLocation no 5 ImageType no 7 ImageWidth no 8 ImageHeight no

QuickTime Tags

The QuickTime format is used for many different types of audio, video and image files (most notably, MOV/MP4 videos and HEIC/CR3 images). ExifTool extracts standard meta information and a variety of audio, video and image parameters, as well as proprietary information written by many camera models. Tags with a question mark after their name are not extracted unless the Unknown option is set.

When writing, ExifTool creates both QuickTime and XMP tags by default, but the group may be specified to write one or the other separately. If no location is specified, newly created QuickTime tags are added in the ItemList location if possible, otherwise in UserData, and finally in Keys, but this order may be changed by setting the PREFERRED level of the appropriate table in the config file (see example.config in the full distribution for an example). Note that some tags with the same name but different ID’s may exist in the same location, but the family 7 group names may be used to differentiate these. ExifTool currently writes only top-level metadata in QuickTime-based files; it extracts other track-specific and timed metadata, but can not yet edit tags in these locations (with the exception of track-level date/time tags).

Beware that the Keys tags are actually stored inside the ItemList in the file, so deleting the ItemList group as a block (ie. -ItemList:all=) also deletes Keys tags. Instead, to preserve Keys tags the ItemList tags may be deleted individually with -QuickTime:ItemList:all=.

Alternate language tags may be accessed for ItemList and Keys tags by adding a 3-character ISO 639-2 language code and an optional ISO 3166-1 alpha 2 country code to the tag name (eg. “ItemList:Artist-deu” or “ItemList::Artist-deu-DE”). Most UserData tags support a language code, but without a country code. If no language code is specified when writing, the default language is written and alternate languages for the tag are deleted. Use the “und” language code to write the default language without deleting alternate languages. Note that “eng” is treated as a default language when reading, but not when writing.

According to the specification, integer-format QuickTime date/time tags should be stored as UTC. Unfortunately, digital cameras often store local time values instead (presumably because they don’t know the time zone). For this reason, by default ExifTool does not assume a time zone for these values. However, if the API QuickTimeUTC option is set, then ExifTool will assume these values are properly stored as UTC, and will convert them to local time when extracting.

When writing string-based date/time tags, the system time zone is added if the PrintConv option is enabled and no time zone is specified. This is because Apple software may display crazy values if the time zone is missing for some tags.

By default ExifTool will remove null padding from some QuickTime containers in Canon CR3 files when writing, but the QuickTimePad option may be used to preserve the original size by padding with nulls if necessary.

See <https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/> for the official specification.

Tag ID Tag Name Writable —— ——– ——– GPS GPSDataList2? no IDIT DateTimeOriginal string PICT PreviewPICT no _htc HTCInfo QuickTime HTCInfo ardt ARDroneFile no frea Kodak_frea Kodak frea free KodakFree Kodak Free Pittasoft QuickTime Pittasoft ThumbnailImage no Free? no ftyp FileType QuickTime FileType gps0 GPSTrack QuickTime Stream gsen GSensor QuickTime Stream junk Junk? no mdat MediaData? no mdat-offset MediaDataOffset no mdat-size MediaDataSize no meco OtherMeta QuickTime OtherMeta meta Meta QuickTime Meta moof MovieFragment QuickTime MovieFragment moov Movie QuickTime Movie mpvd MotionPhotoVideo yes pict PreviewPICT no pnot Preview QuickTime Preview prrt ARDroneTelemetry no sefd SamsungTrailer Samsung Trailer skip CanonSkip Canon Skip PreviewImage no SkipInfo - Skip? no thm ThumbnailImage no thum ThumbnailImage no udat GPSLog no udta KenwoodData QuickTime Stream LIGO_JSON QuickTime Stream FLIRData FLIR UserData uuid XMP XMP UUID-PROF QuickTime Profile UUID-Flip QuickTime Flip UUID-Canon2 Canon uuid2 SensorData QuickTime Tags360Fly JUMBF Jpeg2000 CBOR CBOR SensorData no PreviewImage no UUID-Unknown? no wide Wide? no

QuickTime Stream Tags

The tags below are extracted from timed metadata in QuickTime and other formats of video files when the ExtractEmbedded option is used. Although most of these tags are combined into the single table below, ExifTool currently reads 68 different formats of timed GPS metadata from video files.

Tag Name Writable ——– ——– Accelerometer no AccelerometerData no AngularVelocity no CTMD Canon CTMD CameraDateTime no Car no DateTimeOriginal no Distance no ExposureCompensation no ExposureTime no FNumber no FrameNumber no GPSAltitude no GPSDOP no GPSDateTime no GPSLatitude no GPSLatitude2 no GPSLongitude no GPSLongitude2 no GPSSatellites no GPSSpeed no GPSSpeedRef no GPSTimeStamp no GPSTrack no GPSTrackRef no GSensor no INSV QuickTime INSV_MakerNotes ISO no JpgFromRaw no KiloCalories no PreviewInfo QuickTime PreviewInfo RVMI_gReV QuickTime RVMI_gReV RVMI_sReV QuickTime RVMI_sReV RawGSensor no SampleDateTime no SampleDuration no SampleTime no Text no TimeCode no Unknown00? no Unknown01? no Unknown02? no Unknown03? no UserLabel no VerticalSpeed no VideoTimeStamp no camm0 QuickTime camm0 camm1 QuickTime camm1 camm2 QuickTime camm2 camm3 QuickTime camm3 camm4 QuickTime camm4 camm5 QuickTime camm5 camm6 QuickTime camm6 camm7 QuickTime camm7 fdsc GoPro fdsc gpmd_Kingslim QuickTime Stream gpmd_Rove QuickTime Stream gpmd_FMAS QuickTime Stream gpmd_GoPro GoPro GPMF marl QuickTime marl mebx QuickTime Keys mett Parrot mett rtmd Sony rtmd tx3g QuickTime tx3g

QuickTime INSV_MakerNotes Tags

Tag ID Tag Name Writable —— ——– ——– 0x000a SerialNumber no 0x0012 Model no 0x001a Firmware no 0x002a Parameters no

QuickTime PreviewInfo Tags

Preview stored by TomTom Bandit ActionCam.

Index1 Tag Name Writable —— ——– ——– 8 PreviewImage no

QuickTime RVMI_gReV Tags

GPS information extracted from the RVMI box of MOV videos.

Index1 Tag Name Writable —— ——– ——– 4 GPSLatitude no 8 GPSLongitude no 16 GPSSpeed no 18 GPSTrack no

QuickTime RVMI_sReV Tags

G-sensor information extracted from the RVMI box of MOV videos.

Index1 Tag Name Writable —— ——– ——– 4 GSensor no

QuickTime camm0 Tags

The camm0 through camm7 tables define tags extracted from the Google Street View Camera Motion Metadata of MP4 videos. See <https://developers.google.com/streetview/publish/camm-spec> for the specification.

Tag ID Tag Name Writable —— ——– ——– 0x0004 AngleAxis no

QuickTime camm1 Tags

Tag ID Tag Name Writable —— ——– ——– 0x0004 PixelExposureTime no 0x0008 RollingShutterSkewTime no

QuickTime camm2 Tags

Tag ID Tag Name Writable —— ——– ——– 0x0004 AngularVelocity no

QuickTime camm3 Tags

Tag ID Tag Name Writable —— ——– ——– 0x0004 Acceleration no

QuickTime camm4 Tags

Tag ID Tag Name Writable —— ——– ——– 0x0004 Position no

QuickTime camm5 Tags

Tag ID Tag Name Writable —— ——– ——– 0x0004 GPSLatitude no 0x000c GPSLongitude no 0x0014 GPSAltitude no

QuickTime camm6 Tags

Tag ID Tag Name Writable —— ——– ——– 0x0004 GPSDateTime no 0x000c GPSMeasureMode no 0x0010 GPSLatitude no 0x0018 GPSLongitude no 0x0020 GPSAltitude no 0x0024 GPSHorizontalAccuracy no 0x0028 GPSVerticalAccuracy no 0x002c GPSVelocityEast no 0x0030 GPSVelocityNorth no 0x0034 GPSVelocityUp no 0x0038 GPSSpeedAccuracy no

QuickTime camm7 Tags

Tag ID Tag Name Writable —— ——– ——– 0x0004 MagneticField no

QuickTime marl Tags

Tags extracted from the marl ctbx timed metadata of GM cars.

Tag ID Tag Name Writable —— ——– ——– [no tags known]

QuickTime Keys Tags

This directory contains a list of key names which are used to decode tags written by the “mdta” handler. Also in this table are a few tags found in timed metadata that are not yet writable by ExifTool. The prefix of “com.apple.quicktime.” has been removed from the TagID’s below. These tags support alternate languages in the same way as the ItemList tags. Note that by default, ItemList and UserData tags are preferred when writing, so to create a tag when a same-named tag exists in either of these tables, either the “Keys” location must be specified (eg. -Keys:Author=Phil on the command line), or the PREFERRED level must be changed via the config file.

Tag ID Tag Name Writable —— ——– ——– Encoded_With EncodedWith yes album Album yes apple.photos.variation-identifier ApplePhotosVariationIdentifier int64s artist Artist yes artwork Artwork yes author Author yes camera.framereadouttimeinmicroseconds FrameReadoutTime yes camera.identifier CameraIdentifier yes collection.user UserCollection yes com.android.capture.fps AndroidCaptureFPS yes com.android.version AndroidVersion yes com.apple.photos.captureMode CaptureMode yes comment Comment yes compatible_brands CompatibleBrands yes/ content.identifier ContentIdentifier yes copyright Copyright yes creation_time CreationTime yes/ creationdate CreationDate yes description Description yes detected-face FaceInfo QuickTime FaceInfo detected-face.bounds DetectedFaceBounds no detected-face.face-id DetectedFaceID no detected-face.roll-angle DetectedFaceRollAngle no detected-face.yaw-angle DetectedFaceYawAngle no direction.facing CameraDirection yes direction.motion CameraMotion yes director Director yes displayname DisplayName yes encoder Encoder yes genre Genre yes information Information yes keywords Keywords yes live-photo-info LivePhotoInfo no live-photo.auto LivePhotoAuto int8u live-photo.vitality-score LivePhotoVitalityScore float live-photo.vitality-scoring-version LivePhotoVitalityScoringVersion int64s location.ISO6709 GPSCoordinates yes location.accuracy.horizontal LocationAccuracyHorizontal yes location.body LocationBody yes location.date LocationDate yes location.name LocationName yes location.note LocationNote yes location.role LocationRole yes major_brand MajorBrand yes/ make Make yes minor_version MinorVersion yes/ model Model yes player.movie.audio.balance Balance yes player.movie.audio.bass Bass yes player.movie.audio.gain AudioGain yes player.movie.audio.mute Mute int8u player.movie.audio.pitchshift PitchShift yes player.movie.audio.treble Treble yes player.movie.visual.brightness Brightness yes player.movie.visual.color Color yes player.movie.visual.contrast Contrast yes player.movie.visual.tint Tint yes player.version PlayerVersion yes producer Producer yes publisher Publisher yes rating.user UserRating yes software Software yes still-image-time StillImageTime no title Title yes version Version yes video-orientation VideoOrientation no year Year yes

QuickTime FaceInfo Tags

Tag ID Tag Name Writable —— ——– ——– crec FaceRec QuickTime FaceRec

QuickTime FaceRec Tags

Tag ID Tag Name Writable —— ——– ——– cits FaceItem QuickTime Keys

QuickTime tx3g Tags

Tags extracted from the tx3g sbtl timed metadata of Yuneec drones, and subtitle text in some other videos.

Tag ID Tag Name Writable —— ——– ——– Alt GPSAltitude no DateTime DateTime no GimPitch GimbalPitch no GimRoll GimbalRoll no GimYaw GimbalYaw no Lat GPSLatitude no Lon GPSLongitude no Pitch Pitch no Roll Roll no Text Text no Yaw Yaw no

QuickTime HTCInfo Tags

Tags written by some HTC camera phones.

Tag ID Tag Name Writable —— ——– ——– slmt Unknown_slmt? no

QuickTime Pittasoft Tags

Tags found in Pittasoft Blackvue dashcam “free” data.

Tag ID Tag Name Writable —— ——– ——– 3gf AccelData QuickTime Stream cprt Copyright no gps GPSLog no ptnm OriginalFileName no ptrh Ptrh QuickTime Pittasoft sttm StartTime no thum PreviewImage no

QuickTime FileType Tags

Index4 Tag Name Writable —— ——– ——– 0 MajorBrand no 1 MinorVersion no 2 CompatibleBrands no

QuickTime OtherMeta Tags

Tag ID Tag Name Writable —— ——– ——– mere MetaRelation QuickTime MetaRelation meta Meta QuickTime Meta

QuickTime MetaRelation Tags

Index4 Tag Name Writable —— ——– ——– [no tags known]

QuickTime Meta Tags

Tag ID Tag Name Writable —— ——– ——– bxml BinaryXML? no dinf DataInfo QuickTime DataInfo free Free? no hdlr Handler QuickTime Handler idat MetaImageSize no iinf ItemInformation QuickTime ItemInfo QuickTime ItemInfo iloc ItemLocation no ilst ItemList QuickTime ItemList ipmc IPMPControl? no ipro ItemProtection? no iprp ItemProperties QuickTime ItemProp iref ItemReference QuickTime ItemRef keys Keys QuickTime Keys pitm PrimaryItemReference no uuid MetaVersion no UUID-Unknown? no xml XML XMP XML

QuickTime DataInfo Tags

MP4 data information box.

Tag ID Tag Name Writable —— ——– ——– dref DataRef QuickTime DataRef

QuickTime DataRef Tags

MP4 data reference box.

Tag ID Tag Name Writable —— ——– ——– “url�” URL no url URL no urn URN no

QuickTime Handler Tags

Index1 Tag Name Writable —— ——– ——– 4 HandlerClass no 8 HandlerType no 12 HandlerVendorID no 24 HandlerDescription no

QuickTime ItemInfo Tags

Tag ID Tag Name Writable —— ——– ——– infe ItemInfoEntry no

QuickTime ItemList Tags

This is the preferred location for creating new QuickTime tags. Tags in this table support alternate languages which are accessed by adding a 3-character ISO 639-2 language code and an optional ISO 3166-1 alpha 2 country code to the tag name (eg. “ItemList:Title-fra” or “ItemList::Title-fra-FR”). When creating a new Meta box to contain the ItemList directory, by default ExifTool adds an ‘mdir’ (Metadata) Handler box because Apple software may ignore ItemList tags otherwise, but the API QuickTimeHandler option may be set to 0 to avoid this.

Tag ID Tag Name Writable —— ——– ——– —- iTunesInfo QuickTime iTunesInfo @PST ParentShortTitle string @ppi ParentProductID string @pti ParentTitle string @sti ShortTitle string AACR Unknown_AACR? string CDEK Unknown_CDEK? string CDET Unknown_CDET? string GUID GUID string VERS ProductVersion string aART AlbumArtist string akID AppleStoreAccountType int8s albm Album string/ apID AppleStoreAccount string atID ArtistID int32s auth Author string catg Category string cmID ComposerID string cnID AppleStoreCatalogID int32s covr CoverArt string cpil Compilation int8s cprt Copyright string desc Description string/ disk DiskNumber undef dscp Description string/ egid EpisodeGlobalUniqueID string geID GenreID int32s gnre Genre undef/ grup Grouping string/ gshh GoogleHostHeader string gspm GooglePingMessage string gspu GooglePingURL string gssd GoogleSourceData string gsst GoogleStartTime string gstd GoogleTrackDuration string hdvd HDVideo int8s itnu iTunesU int8s keyw Keyword string ldes LongDescription string ownr Owner string pcst Podcast int8s perf Performer string pgap PlayGap int8s plID AlbumID int32s[2] prID ProductID string purd PurchaseDate string purl PodcastURL string rate RatingPercent string rldt ReleaseDate string rtng Rating int8s sdes StoreDescription string sfID AppleStoreCountry int32s shwm ShowMovement int8s soaa SortAlbumArtist string soal SortAlbum string soar SortArtist string soco SortComposer string sonm SortName string sosn SortShow string stik MediaType int8s titl Title string/ tmpo BeatsPerMinute int16s trkn TrackNumber undef tven TVEpisodeID string tves TVEpisode int32s tvnn TVNetworkName string tvsh TVShow string tvsn TVSeason int32u xid ISRC string yrrc Year string “�ART” Artist string “�alb” Album string “�ard” ArtDirector string “�arg” Arranger string “�aut” Author string/ “�cmt” Comment string “�com” Composer string/ “�con” Conductor string “�cpy” Copyright string/ “�day” ContentCreateDate string “�des” Description string “�dir” Director string “�enc” EncodedBy string “�gen” Genre string “�grp” Grouping string “�lyr” Lyrics string “�mvc” MovementCount int16s “�mvi” MovementNumber int16s “�mvn” MovementName string “�nam” Title string “�nrt” Narrator string “�ope” OriginalArtist string “�prd” Producer string “�pub” Publisher string “�sne” SoundEngineer string “�sol” Soloist string “�st3” Subtitle string “�too” Encoder string “�trk” Track string “�wrk” Work string “�wrt” Composer string “�xpd” ExecutiveProducer string “�xyz” GPSCoordinates string

QuickTime iTunesInfo Tags

ExifTool will extract any iTunesInfo tags that exist, even if they are not defined in this table. These tags belong to the family 1 “iTunes” group, and are not currently writable.

Tag ID Tag Name Writable —— ——– ——– ARTISTS Artists no BARCODE Barcode no CATALOGNUMBER CatalogNumber no DISCNUMBER DiscNumber no Dynamic Range (DR) DynamicRange no Dynamic Range (R128) DynamicRangeR128 no Encoding Params EncodingParams QuickTime EncodingParams LABEL Label no MEDIA Media no MOOD Mood no Peak Level (R128) PeakLevelR128 no Peak Level (Sample) PeakLevelSample no RATING Rating no SCRIPT Script no TRACKNUMBER TrackNumber no Volume Level (R128) VolumeLevelR128 no Volume Level (ReplayGain) ReplayVolumeLevel no iTunEXTC ContentRating no iTunMOVI iTunMOVI PLIST iTunNORM VolumeNormalization no iTunSMPB iTunSMPB no iTunes_CDDB_1 CDDB1Info no iTunes_CDDB_TrackNumber CDDBTrackNumber no initialkey InitialKey no originaldate OriginalDate no originalyear OriginalYear no popularimeter Popularimeter no replaygain_track_gain ReplayTrackGain no replaygain_track_peak ReplayTrackPeak no tool iTunTool no ~length Length no

QuickTime EncodingParams Tags

Tag ID Tag Name Writable —— ——– ——– abrt AudioAvailableBitRateRange no acbf AudioBitRateControlMode no acef AudioExtendFrequencies no brat AudioCurrentTargetBitRate no cdcv AudioComponentVersion no cmnc AudioAvailableNumberChannels no init AudioIsInitialized no lmrc AudioDoesSampleRateConversion no mdel AudioMinimumDelayMode no mnip AudioMinimumNumberInputPackets no mnop AudioMinimumNumberOutputPackets no oppr AudioOutputPrecedence no pad0 AudioZeroFramesPadded no pakb AudioMaximumPacketByteSize no pakd AudioRequiresPacketDescription no pakf AudioPacketFrameSize no prmm AudioCodecPrimeMethod no srcq AudioQualitySetting no tbuf AudioInputBufferSize no ubuf AudioUsedInputBufferSize no ursr AudioUseRecommendedSampleRate no vbrq AudioVBRQuality no vers AudioEncodingParamsVersion no vpk? AudioHasVariablePacketByteSizes no

QuickTime ItemProp Tags

Tag ID Tag Name Writable —— ——– ——– ipco ItemPropertyContainer QuickTime ItemPropCont ipma ItemPropertyAssociation no

QuickTime ItemPropCont Tags

Tag ID Tag Name Writable —— ——– ——– auxC AuxiliaryImageType no av1C AV1Configuration QuickTime AV1Config clap CleanAperture no clli ContentLightLevel QuickTime ContentLightLevel colr ICC_Profile ICC_Profile ColorRepresentation QuickTime ColorRep hvcC HEVCConfiguration QuickTime HEVCConfig irot Rotation int8u! ispe ImageSpatialExtent no pasp PixelAspectRatio int32u! pixi ImagePixelDepth no rloc RelativeLocation no

QuickTime AV1Config Tags

Index1 Tag Name Writable —— ——– ——– 0 AV1ConfigurationVersion no 1 SeqProfile? no 1.1 SeqLevelIdx0? no 2 SeqTier0? no 2.1 HighBitDepth? no 2.2 TwelveBit? no 2.3 ChromaFormat no 2.4 ChromaSamplePosition no 3 InitialDelaySamples? no

QuickTime ContentLightLevel Tags

Index2 Tag Name Writable —— ——– ——– 0 MaxContentLightLevel no 1 MaxPicAverageLightLevel no

QuickTime ColorRep Tags

Index1 Tag Name Writable —— ——– ——– 0 ColorProfiles no 4 ColorPrimaries no 6 TransferCharacteristics no 8 MatrixCoefficients no 10 VideoFullRangeFlag no

QuickTime HEVCConfig Tags

Index1 Tag Name Writable —— ——– ——– 0 HEVCConfigurationVersion no 1 GeneralProfileSpace no 1.1 GeneralTierFlag no 1.2 GeneralProfileIDC no 2 GenProfileCompatibilityFlags no 6 ConstraintIndicatorFlags no 12 GeneralLevelIDC no 13 MinSpatialSegmentationIDC no 15 ParallelismType no 16 ChromaFormat no 17 BitDepthLuma no 18 BitDepthChroma no 19 AverageFrameRate no 21 ConstantFrameRate no 21.1 NumTemporalLayers no 21.2 TemporalIDNested no

QuickTime ItemRef Tags

The Item reference entries listed in the table below contain information about the associations between items in the file. This information is used by ExifTool, but these entries are not extracted as tags.

Tag ID Tag Name Writable —— ——– ——– auxl AuxiliaryImageRef no cdsc ContentDescribes no dimg DerivedImageRef no thmb ThumbnailRef no

QuickTime MovieFragment Tags

Tag ID Tag Name Writable —— ——– ——– meta Meta QuickTime Meta mfhd MovieFragmentHeader QuickTime MovieFragHdr traf TrackFragment QuickTime TrackFragment

QuickTime MovieFragHdr Tags

Index4 Tag Name Writable —— ——– ——– 1 MovieFragmentSequence no

QuickTime TrackFragment Tags

Tag ID Tag Name Writable —— ——– ——– meta Meta QuickTime Meta

QuickTime Movie Tags

Tag ID Tag Name Writable —— ——– ——– cmov CompressedMovie QuickTime CMovie gps GPSDataList? no htka HTCTrack QuickTime Track iods InitialObjectDescriptor? no meco OtherMeta QuickTime OtherMeta meta Meta QuickTime Meta mvhd MovieHeader QuickTime MovieHeader trak Track QuickTime Track udta UserData QuickTime UserData uuid UUID-USMT QuickTime UserMedia UUID-Canon Canon uuid GarminGPS QuickTime Stream GarminGPS no UUID-Unknown? no

QuickTime CMovie Tags

Tag ID Tag Name Writable —— ——– ——– dcom Compression no

QuickTime Track Tags

Tag ID Tag Name Writable —— ——– ——– mdia Media QuickTime Media meco OtherMeta QuickTime OtherMeta meta Meta QuickTime Meta tapt TrackAperture QuickTime TrackAperture tkhd TrackHeader QuickTime TrackHeader tref TrackRef QuickTime TrackRef udta UserData QuickTime UserData uuid UUID-USMT QuickTime UserMedia SphericalVideoXML XMP UUID-Unknown? no

QuickTime Media Tags

MP4 media box.

Tag ID Tag Name Writable —— ——– ——– hdlr Handler QuickTime Handler mdhd MediaHeader QuickTime MediaHeader minf MediaInfo QuickTime MediaInfo

QuickTime MediaHeader Tags

Index4 Tag Name Writable —— ——– ——– 0 MediaHeaderVersion no 1 MediaCreateDate int32u 2 MediaModifyDate int32u 3 MediaTimeScale no 4 MediaDuration no 5 MediaLanguageCode no

QuickTime MediaInfo Tags

MP4 media info box.

Tag ID Tag Name Writable —— ——– ——– dinf DataInfo QuickTime DataInfo gmhd GenMediaHeader QuickTime GenMediaHeader hdlr Handler QuickTime Handler hmhd HintHeader QuickTime HintHeader nmhd NullMediaHeader? no smhd AudioHeader QuickTime AudioHeader stbl SampleTable QuickTime SampleTable vmhd VideoHeader QuickTime VideoHeader

QuickTime GenMediaHeader Tags

Tag ID Tag Name Writable —— ——– ——– gmin GenMediaInfo QuickTime GenMediaInfo text Text? no tmcd TimeCode QuickTime TimeCode

QuickTime GenMediaInfo Tags

Index1 Tag Name Writable —— ——– ——– 0 GenMediaVersion no 1 GenFlags no 4 GenGraphicsMode no 6 GenOpColor no 12 GenBalance no

QuickTime TimeCode Tags

Tag ID Tag Name Writable —— ——– ——– tcmi TCMediaInfo QuickTime TCMediaInfo

QuickTime TCMediaInfo Tags

Index1 Tag Name Writable —— ——– ——– 4 TextFont no 6 TextFace no 8 TextSize no 12 TextColor no 18 BackgroundColor no 24 FontName no

QuickTime HintHeader Tags

MP4 hint media header.

Index2 Tag Name Writable —— ——– ——– 2 MaxPDUSize no 3 AvgPDUSize no 4 MaxBitrate no 6 AvgBitrate no

QuickTime AudioHeader Tags

MP4 audio media header.

Index2 Tag Name Writable —— ——– ——– 2 Balance no

QuickTime SampleTable Tags

MP4 sample table box.

Tag ID Tag Name Writable —— ——– ——– co64 ChunkOffset64? no cslg CompositionToDecodeTimelineMapping? no ctts CompositionTimeToSample? no padb SamplePaddingBits? no sbgp SampleToGroup? no sdtp IdependentAndDisposableSamples? no sgpd SampleGroupDescription? no stco ChunkOffset? no stdp SampleDegradationPriority? no stps PartialSyncSamples no stsc SampleToChunk? no stsd AudioSampleDesc QuickTime AudioSampleDesc VideoSampleDesc QuickTime ImageDesc HintSampleDesc QuickTime HintSampleDesc MetaSampleDesc QuickTime MetaSampleDesc OtherSampleDesc QuickTime OtherSampleDesc stsh ShadowSyncSampleTable? no stss SyncSampleTable? no stsz SampleSizes? no stts VideoFrameRate no TimeToSampleTable? no stz2 CompactSampleSizes? no subs Sub-sampleInformation? no

QuickTime AudioSampleDesc Tags

MP4 audio sample description. This hybrid atom contains both data and child atoms.

ID/Index Tag Name Writable ——– ——– ——– 4 AudioFormat no 20 AudioVendorID no 24 AudioChannels no 26 AudioBitsPerSample no 32 AudioSampleRate no SA3D SpatialAudio QuickTime SpatialAudio btrt BitrateInfo QuickTime Bitrate chan AudioChannelLayout QuickTime ChannelLayout damr DecodeConfig QuickTime DecodeConfig pinf PurchaseInfo QuickTime ProtectionInfo sinf ProtectionInfo QuickTime ProtectionInfo wave Wave QuickTime Wave

QuickTime SpatialAudio Tags

Spatial Audio tags.

Index1 Tag Name Writable —— ——– ——– 0 SpatialAudioVersion no 1 AmbisonicType no 2 AmbisonicOrder no 6 AmbisonicChannelOrdering no 7 AmbisonicNormalization no 8 AmbisonicChannels no 12 AmbisonicChannelMap no

QuickTime Bitrate Tags

Index4 Tag Name Writable —— ——– ——– 0 BufferSize no 1 MaxBitrate no 2 AverageBitrate no

QuickTime ChannelLayout Tags

Audio channel layout.

Index1 Tag Name Writable —— ——– ——– 4 LayoutFlags no 6 AudioChannels no 8 AudioChannelTypes no 12 NumChannelDescriptions no 16 Channel1Label no 20 Channel1Flags no 24 Channel1Coordinates no 36 Channel2Label no 40 Channel2Flags no 44 Channel2Coordinates no 56 Channel3Label no 60 Channel3Flags no 64 Channel3Coordinates no 76 Channel4Label no 80 Channel4Flags no 84 Channel4Coordinates no 96 Channel5Label no 100 Channel5Flags no 104 Channel5Coordinates no 116 Channel6Label no 120 Channel6Flags no 124 Channel6Coordinates no 136 Channel7Label no 140 Channel7Flags no 144 Channel7Coordinates no 156 Channel8Label no 160 Channel8Flags no 164 Channel8Coordinates no

QuickTime DecodeConfig Tags

Index1 Tag Name Writable —— ——– ——– 0 EncoderVendor no 4 EncoderVersion no

QuickTime ProtectionInfo Tags

Child atoms found in “sinf” and/or “pinf” atoms.

Tag ID Tag Name Writable —— ——– ——– enda Endianness no frma OriginalFormat no schi SchemeInfo QuickTime SchemeInfo schm SchemeType QuickTime SchemeType

QuickTime SchemeInfo Tags

Tag ID Tag Name Writable —— ——– ——– cert Certificate no iviv InitializationVector no key KeyID no name UserName no righ Rights QuickTime Rights user UserID no

QuickTime Rights Tags

Tag ID Tag Name Writable —— ——– ——– aver VersionRestrictions no medi MediaFlags no mode ModeFlags no plat Platform no song ItemID no tool ItemTool no tran TransactionID no veID ItemVendorID no

QuickTime SchemeType Tags

Index1 Tag Name Writable —— ——– ——– 4 SchemeType no 8 SchemeVersion no 10 SchemeURL no

QuickTime Wave Tags

Tag ID Tag Name Writable —— ——– ——– enda Endianness no frma PurchaseFileFormat no

QuickTime ImageDesc Tags

ID/Index Tag Name Writable ——– ——– ——– 2 CompressorID no 10 VendorID no 16 SourceImageWidth no 17 SourceImageHeight no 18 XResolution no 20 YResolution no 25 CompressorName no 41 BitDepth no CDI1 CDI1 Canon CDI1 CMP1 CMP1 Canon CMP1 JPEG JPEGInfo? no avcC AVCConfiguration? no btrt BitrateInfo QuickTime Bitrate clap CleanAperture QuickTime CleanAperture colr ColorRepresentation QuickTime ColorRep fiel VideoFieldOrder no gama Gamma no pasp PixelAspectRatio no st3d Stereoscopic3D no sv3d SphericalVideo QuickTime sv3d

QuickTime CleanAperture Tags

Index8 Tag Name Writable —— ——– ——– 0 CleanApertureWidth no 1 CleanApertureHeight no 2 CleanApertureOffsetX no 3 CleanApertureOffsetY no

QuickTime sv3d Tags

Tags defined by the Spherical Video V2 specification. See <https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md> for the specification.

Tag ID Tag Name Writable —— ——– ——– proj Projection QuickTime proj svhd MetadataSource no

QuickTime proj Tags

Tag ID Tag Name Writable —— ——– ——– cbmp CubemapProj QuickTime cbmp equi EquirectangularProj QuickTime equi prhd ProjectionHeader QuickTime prhd

QuickTime cbmp Tags

Index4 Tag Name Writable —— ——– ——– 1 Layout no 2 Padding no

QuickTime equi Tags

Index4 Tag Name Writable —— ——– ——– 1 ProjectionBoundsTop no 2 ProjectionBoundsBottom no 3 ProjectionBoundsLeft no 4 ProjectionBoundsRight no

QuickTime prhd Tags

Index4 Tag Name Writable —— ——– ——– 1 PoseYawDegrees no 2 PosePitchDegrees no 3 PoseRollDegrees no

QuickTime HintSampleDesc Tags

MP4 hint sample description.

ID/Index Tag Name Writable ——– ——– ——– 4 HintFormat no 16 HintTrackVersion no 20 MaxPacketSize no snro SequenceNumberRandomOffset no tims RTPTimeScale no tsro TimestampRandomOffset no

QuickTime MetaSampleDesc Tags

MP4 metadata sample description.

Tag ID Tag Name Writable —— ——– ——– 0x0004 MetaFormat no 0x0008 MetaType no btrt BitrateInfo QuickTime Bitrate keys Keys QuickTime Keys

QuickTime OtherSampleDesc Tags

Tag ID Tag Name Writable —— ——– ——– 0x0004 OtherFormat no 0x0018 PlaybackFrameRate no ftab FontTable no name OtherName no

QuickTime VideoHeader Tags

MP4 video media header.

Index2 Tag Name Writable —— ——– ——– 2 GraphicsMode no 3 OpColor no

QuickTime TrackAperture Tags

Tag ID Tag Name Writable —— ——– ——– clef CleanApertureDimensions no enof EncodedPixelsDimensions no prof ProductionApertureDimensions no

QuickTime TrackHeader Tags

Index4 Tag Name Writable —— ——– ——– 0 TrackHeaderVersion no 1 TrackCreateDate int32u 2 TrackModifyDate int32u 3 TrackID no 5 TrackDuration no 8 TrackLayer no 9 TrackVolume no 10 MatrixStructure fixed32s[9]! 19 ImageWidth no 20 ImageHeight no

QuickTime TrackRef Tags

Tag ID Tag Name Writable —— ——– ——– cdsc ContentDescribes no chap ChapterListTrackID no mpod ElementaryStreamTrack no tmcd TimeCode no

QuickTime UserData Tags

Tag ID’s beginning with the copyright symbol (hex 0xa9) are multi-language text. Alternate language tags are accessed by adding a dash followed by a 3-character ISO 639-2 language code to the tag name. ExifTool will extract any multi-language user data tags found, even if they aren’t in this table. Note when creating new tags, ItemList tags are preferred over these, so to create the tag when a same-named ItemList tag exists, either “UserData” must be specified (eg. -UserData:Artist=Monet on the command line), or the PREFERRED level must be changed via the config file.

Tag ID Tag Name Writable —— ——– ——– @day ContentCreateDate string/ @mak Make string/ @mod Model string/ @sec SamsungSec Samsung sec @swr SoftwareVersion string/ @xyz GPSCoordinates string/ AllF PlayAllFrames int8u CAME SerialNumberHash string CNCV CompressorVersion string CNFV FirmwareVersion string CNMN Model string/ CNOP CanonCNOP Canon CNOP CNTH CanonCNTH Canon CNTH DcMD KodakDcMD Kodak DcMD FFMV FujiFilmFFMV FujiFilm FFMV FIRM FirmwareVersion string/ “FOV�” FieldOfView string GPMF GoProGPMF GoPro GPMF GoPr GoProType string INFO SamsungINFO Samsung INFO LEIC LeicaLEIC Panasonic PANA LENS LensSerialNumber string LOOP LoopStyle int32u Lvlm LevelMeter? rational64s MMA0 MinoltaMMA0 Minolta MMA MMA1 MinoltaMMA1 Minolta MMA MVTG FujiFilmMVTG EXIF NCDT NikonNCDT Nikon NCDT PANA PanasonicPANA Panasonic PANA PENT PentaxPENT Pentax PENT PXMN MakerNotePentax5b Pentax MakerNotePentax5c Pentax MakerNotePentaxUnknown string PXTH PentaxPreview Pentax PXTH QVMI CasioQVMI EXIF RDTA RicohRDTA Ricoh RDTA RDTB RicohRDTB Ricoh RDTB RDTC RicohRDTC Ricoh RDTC RDTG RicohRDTG Ricoh RDTG RDTL RicohRDTL Ricoh RDTL RMKN RicohRMKN EXIF RTHU PreviewImage no SDLN PlayMode string SNum SerialNumber string/ SelO PlaySelection int8u TAGS FujiFilmTags FujiFilm MOV KodakTags Kodak MOV KonicaMinoltaTags Minolta MOV1 MinoltaTags Minolta MOV2 NikonTags Nikon MOV OlympusTags1 Olympus MOV1 OlympusTags2 Olympus MOV2 OlympusTags3 Olympus MP4 OlympusTags4 Olympus MOV3 PentaxTags Pentax MOV SamsungTags Samsung MP4 SanyoMOV Sanyo MOV SanyoMP4 Sanyo MP4 UnknownTags? string TTMD TomTomMetaData QuickTime TomTom WLOC WindowLocation int16u XMP_ XMP XMP Xtra MicrosoftXtra Microsoft Xtra _cx_ CX? rational64s _cy_ CY? rational64s _yaw Yaw rational64s/ albm Album string/ albr AlbumArtist string angl CameraAngle string apmd ApertureMode undef auth Author string/ ccid ContentID string cdis ContentDistributorID string chpl ChapterList no clfn ClipFileName string clid ClipID string clsf Classification undef/ cmid CameraID string cmnm Model string/ coll CollectionName string/ cprt Copyright string/ cver CodeVersion string cvru CoverURI string date DateTimeOriginal string dscp Description string/ gnre Genre string/ hinf HintTrackInfo QuickTime HintTrackInfo hinv HintVersion string hnti HintInfo QuickTime HintInfo htcb HTCBinary QuickTime HTCBinary icnu IconURI string infu InfoURL string kgtt TrackType string kywd Keywords no loci LocationInformation undef/ lrcu LyricsURI string lvlm LevelMeter? rational64s manu Make no mcvr PreviewImage string meta Meta QuickTime Meta modl Model no name Name string perf Performer string/ pmcc GarminSettings string pose pose Kodak pose ptch Pitch rational64s/ ptv PrintToVideo QuickTime Video rads Rads? rational64s reel ReelName string roll Roll rational64s/ rtng Rating undef/ scen Scene string scrn OlympusPreview Olympus scrn shot ShotName string slno SerialNumber string smta SamsungSmta Samsung smta tags Audible_tags Audible tags thmb MakerNotePentax5a Pentax OlympusThumbnail Olympus thmb ThumbnailImage string ThumbnailPNG string UnknownThumbnail string titl Title string/ urat UserRating undef/ uuid GarminSoftware string UUID-Unknown? no vndr Vendor string vrot AccelerometerData no yrrc Year undef/ “�ART” Artist string “�TIM” StartTimecode string “�TSC” StartTimeScale string “�TSZ” StartTimeSampleSize string “�alb” Album string “�arg” Arranger string “�ark” ArrangerKeywords string “�cmt” Comment string “�cok” ComposerKeywords string “�com” Composer string “�cpy” Copyright string “�day” ContentCreateDate string “�dir” Director string “�ed1” Edit1 string “�ed2” Edit2 string “�ed3” Edit3 string “�ed4” Edit4 string “�ed5” Edit5 string “�ed6” Edit6 string “�ed7” Edit7 string “�ed8” Edit8 string “�ed9” Edit9 string “�enc” EncoderID string “�fmt” Format string “�fpt” Pitch string “�frl” Roll string “�fyw” Yaw string “�gen” Genre string “�gpt” CameraPitch string “�grl” CameraRoll string “�grp” Grouping string “�gyw” CameraYaw string “�inf” Information string “�isr” ISRCCode string “�lab” RecordLabelName string “�lal” RecordLabelURL string “�lyr” Lyrics string “�mak” Make string “�mal” MakerURL string “�mdl” Model string/ “�mod” Model string “�nam” Title string “�pdk” ProducerKeywords string “�phg” RecordingCopyright string “�prd” Producer string “�prf” Performers string “�prk” PerformerKeywords string “�prl” PerformerURL string “�req” Requirements string “�snk” SubtitleKeywords string “�snm” Subtitle string “�src” SourceCredits string “�swf” SongWriter string “�swk” SongWriterKeywords string “�swr” SoftwareVersion string “�too” Encoder string “�trk” Track string “�wrt” Composer string/ “�xsp” SpeedX string “�xyz” GPSCoordinates string “�ysp” SpeedY string “�zsp” SpeedZ string

QuickTime TomTom Tags

Tags found in TomTom Bandit Action Cam MP4 videos.

Tag ID Tag Name Writable —— ——– ——– TTAD TomTomAD QuickTime Stream TTHL TomTomHL? no TTID TomTomID no TTVD TomTomVD no TTVI TomTomVI? no

QuickTime HintTrackInfo Tags

Tag ID Tag Name Writable —— ——– ——– dimm ImmediateDataBytes no dmax LargestPacketDuration no dmed MediaTrackBytes no drep RepeatedDataBytes no maxr MaxDataRate no npck NumPackets no nump NumPackets no payt PayloadType no pmax LargestPacketSize no tmax MaxTransmissionTime no tmin MinTransmissionTime no totl TotalBytes no tpaY TotalBytesNoRTPHeaders no tpay TotalBytesNoRTPHeaders no tpyl TotalBytesNoRTPHeaders no trpY TotalBytes no trpy TotalBytes no

QuickTime HintInfo Tags

Tag ID Tag Name Writable —— ——– ——– rtp RealtimeStreamingProtocol no sdp StreamingDataProtocol no

QuickTime HTCBinary Tags

Index4 Tag Name Writable —— ——– ——– [no tags known]

QuickTime Video Tags

Index1 Tag Name Writable —— ——– ——– 0 DisplaySize no 6 SlideShow no

QuickTime UserMedia Tags

Tag ID Tag Name Writable —— ——– ——– MTDT MetaData QuickTime MetaData

QuickTime MetaData Tags

Tag ID Tag Name Writable —— ——– ——– 0x0001 Title no 0x0003 ProductionDate no 0x0004 Software no 0x0005 Product no 0x000a TrackProperty no 0x000b TimeZone no 0x000c ModifyDate no

QuickTime MovieHeader Tags

Index4 Tag Name Writable —— ——– ——– 0 MovieHeaderVersion no 1 CreateDate int32u 2 ModifyDate int32u 3 TimeScale no 4 Duration no 5 PreferredRate no 6 PreferredVolume no 9 MatrixStructure no 18 PreviewTime no 19 PreviewDuration no 20 PosterTime no 21 SelectionTime no 22 SelectionDuration no 23 CurrentTime no 24 NextTrackID no

QuickTime Preview Tags

Index2 Tag Name Writable —— ——– ——– 0 PreviewDate int32u 2 PreviewVersion no 3 PreviewAtomType no 5 PreviewAtomIndex no

QuickTime SkipInfo Tags

Tag ID Tag Name Writable —— ——– ——– thma ThumbnailImage no ver Version no

QuickTime Profile Tags

Tag ID Tag Name Writable —— ——– ——– APRF AudioProfile QuickTime AudioProf FPRF FileGlobalProfile QuickTime FileProf OLYM OlympusOLYM Olympus OLYM VPRF VideoProfile QuickTime VideoProf

QuickTime AudioProf Tags

Index4 Tag Name Writable —— ——– ——– 0 AudioProfileVersion? no 1 AudioTrackID no 2 AudioCodec no 3 AudioCodecInfo? no 4 AudioAttributes no 5 AudioAvgBitrate no 6 AudioMaxBitrate no 7 AudioSampleRate no 8 AudioChannels no

QuickTime FileProf Tags

Index4 Tag Name Writable —— ——– ——– 0 FileProfileVersion? no 1 FileFunctionFlags no

QuickTime VideoProf Tags

Index4 Tag Name Writable —— ——– ——– 0 VideoProfileVersion? no 1 VideoTrackID no 2 VideoCodec no 3 VideoCodecInfo? no 4 VideoAttributes no 5 VideoAvgBitrate no 6 VideoMaxBitrate no 7 VideoAvgFrameRate no 8 VideoMaxFrameRate no 9 VideoSize no 10 PixelAspectRatio no

QuickTime Flip Tags

Found in MP4 files from Flip Video cameras.

Index4 Tag Name Writable —— ——– ——– 1 PreviewImageWidth no 2 PreviewImageHeight no 13 PreviewImageLength no 14 SerialNumber no 28 PreviewImage no

QuickTime Tags360Fly Tags

Timed metadata found in MP4 videos from the 360Fly.

Tag ID Tag Name Writable —— ——– ——– 0x0001 Accel360Fly QuickTime Accel360Fly 0x0002 Gyro360Fly QuickTime Gyro360Fly 0x0003 Mag360Fly QuickTime Mag360Fly 0x0005 GPS360Fly QuickTime GPS360Fly 0x0006 Rot360Fly QuickTime Rot360Fly 0x00fa Fusion360Fly QuickTime Fusion360Fly

QuickTime Accel360Fly Tags

Index1 Tag Name Writable —— ——– ——– 1 AccelMode? no 2 SampleTime no 10 AccelYPR no

QuickTime Gyro360Fly Tags

Index1 Tag Name Writable —— ——– ——– 1 GyroMode? no 2 SampleTime no 10 GyroYPR no

QuickTime Mag360Fly Tags

Index1 Tag Name Writable —— ——– ——– 1 MagMode? no 2 SampleTime no 10 MagnetometerXYZ no

QuickTime GPS360Fly Tags

Index1 Tag Name Writable —— ——– ——– 1 GPSMode? no 2 SampleTime no 10 GPSLatitude no 14 GPSLongitude no 18 GPSAltitude no 22 GPSSpeed no 24 GPSTrack no 26 Acceleration no

QuickTime Rot360Fly Tags

Index1 Tag Name Writable —— ——– ——– 1 RotMode? no 2 SampleTime no 10 RotationXYZ no

QuickTime Fusion360Fly Tags

Index1 Tag Name Writable —— ——– ——– 1 FusionMode? no 2 SampleTime no 10 FusionYPR no

QuickTime ImageFile Tags

Tags used in QTIF QuickTime Image Files.

Tag ID Tag Name Writable —— ——– ——– idat ImageData no idsc ImageDescription QuickTime ImageDesc iicc ICC_Profile ICC_Profile

RIFF Tags

The RIFF container format is used various types of fines including AVI, WAV, WEBP, LA, OFR, PAC and WV. According to the EXIF specification, Meta information is embedded in two types of RIFF LIST chunks: INFO and exif, and information about the audio content is stored in the fmt chunk. As well as this information, some video information and proprietary manufacturer-specific information is also extracted.

Large AVI videos may be a concatenation of two or more RIFF chunks. For these files, information is extracted from subsequent RIFF chunks as sub-documents, but the Duration is calculated for the full video.

ExifTool currently has the ability to write EXIF, XMP and ICC_Profile metadata to WEBP images, but can’t yet write to other RIFF-based formats.

Tag ID Tag Name Writable —— ——– ——– ALPH ALPH RIFF ALPH ANIM ANIM RIFF ANIM ANMF ANMF RIFF ANMF C2PA JUMBF Jpeg2000 CSET CharacterSet RIFF CSET EXIF EXIF EXIF UnknownEXIF no ICCP ICC_Profile ICC_Profile IDIT DateTimeOriginal no JUNK OlympusJunk Olympus AVI CasioJunk EXIF RicohJunk Ricoh AVI PentaxJunk Pentax Junk PentaxJunk2 Pentax Junk2 LucasJunk QuickTime Stream TextJunk no JUNQ OldXMP no LIST_INF0 Info RIFF Info LIST_INFO Info RIFF Info LIST_Tdat Tdat RIFF Tdat LIST_adtl AssociatedDataList RIFF LIST_exif Exif RIFF Exif LIST_hdrl Hdrl RIFF Hdrl LIST_hydt PentaxData Pentax AVI LIST_ncdt NikonData Nikon AVI LIST_pntx PentaxData2 Pentax AVI SGLT BikeBroAccel QuickTime Stream SLLT BikeBroGPS QuickTime Stream VP8 VP8Bitstream RIFF VP8 VP8L VP8L RIFF VP8L VP8X VP8X RIFF VP8X “XMP�” XMP XMP XMP XMP XMP _PMX XMP XMP aXML AXML XMP XML acid Acidizer RIFF Acidizer afsp Afsp no bext BroadcastExtension RIFF BroadcastExt cue CuePoints no ds64 DataSize64 RIFF DS64 fact NumberOfSamples no fmt AudioFormat RIFF AudioFormat gps0 GPSTrack QuickTime Stream gsen GSensor QuickTime Stream guan Guano no iXML IXML XMP XML id3 ID3 ID3 inst Instrument RIFF Instrument labl CuePointLabel no list ListType no ltxt LabeledText no note CuePointNote no olym Olym Olympus WAV plst Playlist no smpl Sampler RIFF Sampler tx_USER UserText RIFF UserText tx_Unknown Text no

RIFF ALPH Tags

WebP alpha chunk.

Index1 Tag Name Writable —— ——– ——– 0 AlphaPreprocessing no 0.1 AlphaFiltering no 0.2 AlphaCompression no

RIFF ANIM Tags

WebP animation chunk.

Index1 Tag Name Writable —— ——– ——– 0 BackgroundColor no 4 AnimationLoopCount no

RIFF ANMF Tags

WebP animation frame chunk.

Index1 Tag Name Writable —— ——– ——– 12 Duration no

RIFF CSET Tags

Index2 Tag Name Writable —— ——– ——– 0 CodePage no 1 CountryCode no 2 LanguageCode no 3 Dialect no

RIFF Info Tags

RIFF INFO tags found in AVI video and WAV audio files. Tags which are part of the EXIF 2.3 specification have an underlined Tag Name in the HTML version of this documentation. Other tags are found in AVI files generated by some software.

Tag ID Tag Name Writable —— ——– ——– AGES Rated no CMNT Comment no CODE EncodedBy no COMM Comments no DIRC Directory no DISP SoundSchemeTitle no DTIM DateTimeOriginal no GENR Genre no IARL ArchivalLocation no IART Artist no IAS1 FirstLanguage no IAS2 SecondLanguage no IAS3 ThirdLanguage no IAS4 FourthLanguage no IAS5 FifthLanguage no IAS6 SixthLanguage no IAS7 SeventhLanguage no IAS8 EighthLanguage no IAS9 NinthLanguage no IBSU BaseURL no ICAS DefaultAudioStream no ICDS CostumeDesigner no ICMS Commissioned no ICMT Comment no ICNM Cinematographer no ICNT Country no ICOP Copyright no ICRD DateCreated no ICRP Cropped no IDIM Dimensions no IDIT DateTimeOriginal no IDPI DotsPerInch no IDST DistributedBy no IEDT EditedBy no IENC EncodedBy no IENG Engineer no IGNR Genre no IKEY Keywords no ILGT Lightness no ILGU LogoURL no ILIU LogoIconURL no ILNG Language no IMBI MoreInfoBannerImage no IMBU MoreInfoBannerURL no IMED Medium no IMIT MoreInfoText no IMIU MoreInfoURL no IMUS MusicBy no INAM Title no IPDS ProductionDesigner no IPLT NumColors no IPRD Product no IPRO ProducedBy no IRIP RippedBy no IRTD Rating no ISBJ Subject no ISFT Software no ISGN SecondaryGenre no ISHP Sharpness no ISMP TimeCode no ISRC Source no ISRF SourceForm no ISTD ProductionStudio no ISTR Starring no ITCH Technician no ITRK TrackNumber no IWMU WatermarkURL no IWRI WrittenBy no LANG Language no LOCA Location no PRT1 Part no PRT2 NumberOfParts no RATE Rate no STAR Starring no STAT Statistics no TAPE TapeName no TCDO EndTimecode no TCOD StartTimecode no TITL Title no TLEN Length no TORG Organization no TRCK TrackNumber no TURL URL no TVER Version no VMAJ VegasVersionMajor no VMIN VegasVersionMinor no YEAR Year no

RIFF Tdat Tags

Tag ID Tag Name Writable —— ——– ——– [no tags known]

RIFF Exif Tags

These tags are part of the EXIF 2.3 specification for WAV audio files.

Tag ID Tag Name Writable —— ——– ——– ecor Make no emdl Model no emnt MakerNotes no erel RelatedImageFile no etim TimeCreated no eucm UserComment no ever ExifVersion no

RIFF Hdrl Tags

Tag ID Tag Name Writable —— ——– ——– IDIT DateTimeOriginal no ISMP TimeCode no LIST_odml OpenDML RIFF OpenDML LIST_strl Stream RIFF Stream avih AVIHeader RIFF AVIHeader

RIFF OpenDML Tags

Tag ID Tag Name Writable —— ——– ——– dmlh ExtendedAVIHeader RIFF ExtAVIHdr

RIFF ExtAVIHdr Tags

Index4 Tag Name Writable —— ——– ——– 0 TotalFrameCount no

RIFF Stream Tags

Tag ID Tag Name Writable —— ——– ——– strd StreamData RIFF StreamData strf AudioFormat RIFF AudioFormat VideoFormat BMP strh StreamHeader RIFF StreamHeader strn StreamName no

RIFF StreamData Tags

This chunk is used to store proprietary information in AVI videos from some cameras. The first 4 characters of the data are used as the Tag ID below.

Tag ID Tag Name Writable —— ——– ——– AVIF AVIF EXIF CASI CasioData Casio AVI Zora VendorName no unknown UnknownData no

RIFF AudioFormat Tags

Index2 Tag Name Writable —— ——– ——– 0 Encoding no 1 NumChannels no 2 SampleRate no 4 AvgBytesPerSec no 7 BitsPerSample no

RIFF StreamHeader Tags

Index4 Tag Name Writable —— ——– ——– 0 StreamType no 1 AudioCodec no VideoCodec no Codec no 5 AudioSampleRate no VideoFrameRate no StreamSampleRate no 8 AudioSampleCount no VideoFrameCount no StreamSampleCount no 10 Quality no 11 SampleSize no

RIFF AVIHeader Tags

Index4 Tag Name Writable —— ——– ——– 0 FrameRate no 1 MaxDataRate no 4 FrameCount no 6 StreamCount no 8 ImageWidth no 9 ImageHeight no

RIFF VP8 Tags

This chunk is found in simple-format (lossy) WebP files. See <https://developers.google.com/speed/webp/docs/riff_container> for the WebP container specification.

Index1 Tag Name Writable —— ——– ——– 0 VP8Version no 6 ImageWidth no 6.1 HorizontalScale no 8 ImageHeight no 8.1 VerticalScale no

RIFF VP8L Tags

This chunk is found in lossless WebP files.

Index1 Tag Name Writable —— ——– ——– 1 ImageWidth no 2 ImageHeight no

RIFF VP8X Tags

This chunk is found in extended WebP files.

Index1 Tag Name Writable —— ——– ——– 0 WebP_Flags no 4 ImageWidth no 6 ImageHeight no

RIFF Acidizer Tags

Index1 Tag Name Writable —— ——– ——– 0 AcidizerFlags no 4 RootNote no 12 Beats no 16 Meter no 20 Tempo no

RIFF BroadcastExt Tags

Information found in the Broadcast Audio Extension chunk (see <http://tech.ebu.ch/docs/tech/tech3285.pdf>).

Index1 Tag Name Writable —— ——– ——– 0 Description no 256 Originator no 288 OriginatorReference no 320 DateTimeOriginal no 338 TimeReference no 346 BWFVersion no 348 BWF_UMID no 602 CodingHistory no

RIFF DS64 Tags

64-bit data sizes for MBWF/RF64 files. See <https://tech.ebu.ch/docs/tech/tech3306-2009.pdf> for the specification.

Index8 Tag Name Writable —— ——– ——– 0 RIFFSize64 no 1 DataSize64 no 2 NumberOfSamples64 no

RIFF Instrument Tags

Index1 Tag Name Writable —— ——– ——– 0 UnshiftedNote no 1 FineTune no 2 Gain no 3 LowNote no 4 HighNote no 5 LowVelocity no 6 HighVelocity no

RIFF Sampler Tags

Index4 Tag Name Writable —— ——– ——– 0 Manufacturer no 1 Product no 2 SamplePeriod no 3 MIDIUnityNote no 4 MIDIPitchFraction no 5 SMPTEFormat no 6 SMPTEOffset no 7 NumSampleLoops no 8 SamplerDataLen no 9 SamplerData no

RIFF UserText Tags

Tags decoded from the USER-format txts stream written by Momento M6 dashcam. Extracted only if the ExtractEmbedded option is used.

Index1 Tag Name Writable —— ——– ——– 28 GPSAltitude no 40 Accelerometer no 56 GPSSpeed no 60 GPSLatitude no 64 GPSLongitude no 68 GPSDateTime no

FLAC Tags

Free Lossless Audio Codec (FLAC) meta information. ExifTool also extracts ID3 information from these files.

Tag ID Tag Name Writable —— ——– ——– 0x0000 StreamInfo FLAC StreamInfo 0x0001 Padding? no 0x0002 Application_riff RIFF ApplicationUnknown? no 0x0003 SeekTable? no 0x0004 VorbisComment Vorbis Comments 0x0005 CueSheet? no 0x0006 Picture FLAC Picture

FLAC StreamInfo Tags

FLAC is big-endian, so bit 0 is the high-order bit in this table.

Tag ID Tag Name Writable —— ——– ——– Bit000-015 BlockSizeMin no Bit016-031 BlockSizeMax no Bit032-055 FrameSizeMin no Bit056-079 FrameSizeMax no Bit080-099 SampleRate no Bit100-102 Channels no Bit103-107 BitsPerSample no Bit108-143 TotalSamples no Bit144-271 MD5Signature no

FLAC Picture Tags

Index4 Tag Name Writable —— ——– ——– 0 PictureType no 1 PictureMIMEType no 2 PictureDescription no 3 PictureWidth no 4 PictureHeight no 5 PictureBitsPerPixel no 6 PictureIndexedColors no 7 PictureLength no 8 Picture no

Parrot Tags

Parrot mett Tags

Streaming metadata found in Parrot drone videos. See <https://developer.parrot.com/docs/pdraw/metadata.html> for the specification.

Tag ID Tag Name Writable —— ——– ——– P1 ParrotV1 Parrot V1 P2 ParrotV2 Parrot V2 P3 ParrotV3 Parrot V3 E1 ParrotTimeStamp Parrot TimeStamp E2 ParrotFollowMe Parrot FollowMe E3 ParrotAutomation Parrot Automation application/arcore-accel ARCoreAccel Parrot ARCoreAccel application/arcore-custom-event ARCoreCustom Parrot ARCoreCustom application/arcore-gyro ARCoreGyro Parrot ARCoreGyro application/arcore-video-0 ARCoreVideo Parrot ARCoreVideo

Parrot V1 Tags

Parrot version 1 streaming metadata.

Index1 Tag Name Writable —— ——– ——– 4 DroneYaw no 6 DronePitch no 8 DroneRoll no 10 CameraPan no 12 CameraTilt no 14 FrameView no 22 ExposureTime no 24 ISO no 26 WifiRSSI no 27 Battery no 28 GPSLatitude no 32 GPSLongitude no 36 GPSAltitude no 36.1 GPSSatellites no 40 AltitudeFromTakeOff no 44 DistanceFromHome no 48 SpeedX no 50 SpeedY no 52 SpeedZ no 54 Binning no 54.1 FlyingState no 55 Animation no 55.1 PilotingMode no

Parrot V2 Tags

Parrot version 2 basic streaming metadata.

Index1 Tag Name Writable —— ——– ——– 4 Elevation no 8 GPSLatitude no 12 GPSLongitude no 16 GPSAltitude no 16.1 GPSSatellites no 20 GPSVelocityNorth no 22 GPSVelocityEast no 24 GPSVelocityDown no 26 AirSpeed no 28 DroneQuaternion no 36 FrameView no 44 CameraPan no 46 CameraTilt no 48 ExposureTime no 50 ISO no 52 Binning no 52.1 FlyingState no 53 Animation no 53.1 PilotingMode no 54 WifiRSSI no 55 Battery no Groups Groups no

Parrot V3 Tags

Parrot version 3 basic streaming metadata.

Index1 Tag Name Writable —— ——– ——– 4 Elevation no 8 GPSLatitude no 12 GPSLongitude no 16 GPSAltitude no 16.1 GPSSatellites no 20 GPSVelocityNorth no 22 GPSVelocityEast no 24 GPSVelocityDown no 26 AirSpeed no 28 DroneQuaternion no 36 FrameBaseView no 44 FrameView no 52 ExposureTime no 54 ISO no 56 RedBalance no 58 BlueBalance no 60 FOV no 64 LinkGoodput no 64.1 LinkQuality no 68 WifiRSSI no 69 Battery no 70 Binning no 70.1 FlyingState no 71 Animation no 71.1 PilotingMode no

Parrot TimeStamp Tags

Parrot streaming metadata timestamp extension.

Index1 Tag Name Writable —— ——– ——– 4 TimeStamp no

Parrot FollowMe Tags

Parrot streaming metadata follow-me extension.

Index1 Tag Name Writable —— ——– ——– 4 GPSTargetLatitude no 8 GPSTargetLongitude no 12 GPSTargetAltitude no 16 Follow-meMode no 17 Follow-meAnimation no

Parrot Automation Tags

Parrot streaming metadata automation extension.

Index1 Tag Name Writable —— ——– ——– 4 GPSFramingLatitude no 8 GPSFramingLongitude no 12 GPSFramingAltitude no 16 GPSDestLatitude no 20 GPSDestLongitude no 24 GPSDestAltitude no 28 AutomationAnimation no 29 AutomationFlags no

Parrot ARCoreAccel Tags

ARCore accelerometer data.

Index1 Tag Name Writable —— ——– ——– 4 AccelerometerUnknown? no 5 Accelerometer no

Parrot ARCoreCustom Tags

Index1 Tag Name Writable —— ——– ——– [no tags known]

Parrot ARCoreGyro Tags

ARCore accelerometer data.

Index1 Tag Name Writable —— ——– ——– 4 GyroscopeUnknown? no 5 Gyroscope no

Parrot ARCoreVideo Tags

Index1 Tag Name Writable —— ——– ——– [no tags known]

AAC Tags

Tags extracted from Advanced Audio Coding (AAC) files.

Tag ID Tag Name Writable —— ——– ——– Bit016-017 ProfileType no Bit018-021 SampleRate no Bit023-025 Channels no Encoder Encoder no

Ogg Tags

ExifTool extracts the following types of information from Ogg files. See <http://www.xiph.org/vorbis/doc/> for the Ogg specification.

Tag ID Tag Name Writable —— ——– ——– FLAC FLAC FLAC ID3 ID3 ID3 Opus Opus Opus theora Theora Theora vorbis Vorbis Vorbis

Vorbis Tags

Information extracted from Ogg Vorbis files. See <http://www.xiph.org/vorbis/doc/> for the Vorbis specification.

Tag ID Tag Name Writable —— ——– ——– 0x0001 Identification Vorbis Identification 0x0003 Comments Vorbis Comments

Vorbis Comments Tags

The tags below are only some common tags found in the Vorbis comments of Ogg Vorbis and Ogg FLAC audio files, however ExifTool will extract values from any tag found, even if not listed here.

Tag ID Tag Name Writable —— ——– ——– ACTOR Actor no ALBUM Album no ARTIST Artist no+ COMMENT Comment no COMPOSER Composer no CONTACT Contact no+ COPYRIGHT Copyright no COVERART CoverArt no COVERARTMIME CoverArtMIMEType no DATE Date no DESCRIPTION Description no DIRECTOR Director no ENCODED_BY EncodedBy no ENCODED_USING EncodedUsing no ENCODER Encoder no ENCODER_OPTIONS EncoderOptions no GENRE Genre no ISRC ISRCNumber no LICENSE License no LOCATION Location no METADATA_BLOCK_PICTURE Picture FLAC Picture ORGANIZATION Organization no PERFORMER Performer no+ PRODUCER Producer no REPLAYGAIN_ALBUM_GAIN ReplayGainAlbumGain no REPLAYGAIN_ALBUM_PEAK ReplayGainAlbumPeak no REPLAYGAIN_TRACK_GAIN ReplayGainTrackGain no REPLAYGAIN_TRACK_PEAK ReplayGainTrackPeak no TITLE Title no TRACKNUMBER TrackNumber no VERSION Version no vendor Vendor no

Vorbis Identification Tags

Index1 Tag Name Writable —— ——– ——– 0 VorbisVersion no 4 AudioChannels no 5 SampleRate no 9 MaximumBitrate no 13 NominalBitrate no 17 MinimumBitrate no

Opus Tags

Information extracted from Ogg Opus files. See <https://www.opus-codec.org/docs/> for the specification.

Tag ID Tag Name Writable —— ——– ——– OpusHead Header Opus Header OpusTags Comments Vorbis Comments

Opus Header Tags

Index1 Tag Name Writable —— ——– ——– 0 OpusVersion no 1 AudioChannels no 4 SampleRate no 8 OutputGain no

Theora Tags

Information extracted from Ogg Theora video files. See <http://www.theora.org/doc/Theora.pdf> for the Theora specification.

Tag ID Tag Name Writable —— ——– ——– 0x0080 Identification Theora Identification 0x0081 Comments Vorbis Comments

Theora Identification Tags

Tags extracted from the Theora identification header.

Index1 Tag Name Writable —— ——– ——– 0 TheoraVersion no 7 ImageWidth no 10 ImageHeight no 13 XOffset no 14 YOffset no 15 FrameRate no 23 PixelAspectRatio no 29 ColorSpace no 30 NominalVideoBitrate no 33 Quality no 34 PixelFormat no

APE Tags

Tags found in Monkey’s Audio (APE) information. Only a few common tags are listed below, but ExifTool will extract any tag found. ExifTool supports APEv1 and APEv2 tags, as well as ID3 information in APE files, and will also read APE metadata from MP3 and MPC files.

Tag ID Tag Name Writable —— ——– ——– Album Album no Artist Artist no DURATION Duration no Genre Genre no Title Title no Tool Name ToolName no Tool Version ToolVersion no Track Track no Year Year no

APE NewHeader Tags

APE MAC audio header for version 3.98 or later.

Index2 Tag Name Writable —— ——– ——– 0 CompressionLevel no 2 BlocksPerFrame no 4 FinalFrameBlocks no 6 TotalFrames no 8 BitsPerSample no 9 Channels no 10 SampleRate no

APE OldHeader Tags

APE MAC audio header for version 3.97 or earlier.

Index2 Tag Name Writable —— ——– ——– 0 APEVersion no 1 CompressionLevel no 3 Channels no 4 SampleRate no 10 TotalFrames no 12 FinalFrameBlocks no

Audible Tags

ExifTool will extract any information found in the metadata dictionary of Audible .AA files, even if not listed in the table below.

Tag ID Tag Name Writable —— ——– ——– _chapter_count ChapterCount no _cover_art CoverArt no author Author no copyright Copyright no pub_date_start PublishDateStart no pubdate PublishDate no

Audible tags Tags

Information found in “tags” atom of Audible M4B audio books.

Tag ID Tag Name Writable —— ——– ——– cvrx Audible_cvrx Audible cvrx meta Audible_meta Audible meta tseg Audible_tseg Audible tseg

Audible cvrx Tags

Audible cover art information in M4B audio books.

Tag Name Writable ——– ——– CoverArt no CoverArtType no

Audible meta Tags

Information found in Audible M4B “meta” atom.

Tag ID Tag Name Writable —— ——– ——– ALBUMARTIST AlbumArtist no Album Album no Artist Artist no Comment Comment no Genre Genre no SUBTITLE Subtitle no TOOL CreatorTool no Title Title no Year Year no itunesmediatype iTunesMediaType no track ChapterName no

Audible tseg Tags

Tag ID Tag Name Writable —— ——– ——– meta Audible_meta2 Audible meta tshd ChapterNumber no

MPC Tags

Tags used in Musepack (MPC) audio files. ExifTool also extracts ID3 and APE information from these files.

Tag ID Tag Name Writable —— ——– ——– Bit032-063 TotalFrames no Bit080-081 SampleRate no Bit084-087 Quality no Bit088-093 MaxBand no Bit096-111 ReplayGainTrackPeak no Bit112-127 ReplayGainTrackGain no Bit128-143 ReplayGainAlbumPeak no Bit144-159 ReplayGainAlbumGain no Bit179 FastSeek no Bit191 Gapless no Bit216-223 EncoderVersion no

MPEG Tags

The MPEG format doesn’t specify any file-level meta information. In lieu of this, information is extracted from the first audio and video frame headers in the file.

MPEG Audio Tags

Tag ID Tag Name Writable —— ——– ——– Bit11-12 MPEGAudioVersion no Bit13-14 AudioLayer no Bit16-19 AudioBitrate no Bit20-21 SampleRate no Bit24-25 ChannelMode no Bit26 MSStereo no Bit26-27 ModeExtension no Bit27 IntensityStereo no Bit28 CopyrightFlag no Bit29 OriginalMedia no Bit30-31 Emphasis no

MPEG Video Tags

Tag ID Tag Name Writable —— ——– ——– Bit00-11 ImageWidth no Bit12-23 ImageHeight no Bit24-27 AspectRatio no Bit28-31 FrameRate no Bit32-49 VideoBitrate no

MPEG Xing Tags

These tags are extracted from the Xing/Info frame.

Tag Name Writable ——– ——– Encoder no LameHeader MPEG Lame LameQuality no LameVBRQuality no VBRBytes no VBRFrames no VBRScale no

MPEG Lame Tags

Tags extracted from Lame 3.90 or later header.

Index1 Tag Name Writable —— ——– ——– 9 LameMethod no 10 LameLowPassFilter no 20 LameBitrate no 24 LameStereoMode no

M2TS Tags

The MPEG-2 transport stream is used as a container for many different audio/video formats (including AVCHD). This table lists information extracted from M2TS files.

Tag Name Writable ——– ——– AudioStreamType no Duration no VideoStreamType no _AC3 M2TS AC3 _H264 H264 _MISB MISB

M2TS AC3 Tags

Tags extracted from AC-3 audio streams.

Tag Name Writable ——– ——– AudioBitrate no AudioChannels no AudioSampleRate no SurroundMode no

H264 Tags

Tags extracted from H.264 video streams. The metadata for AVCHD videos is stored in this stream.

Tag Name Writable ——– ——– ImageHeight no ImageWidth no MDPM H264 MDPM

H264 MDPM Tags

The following tags are decoded from the Modified Digital Video Pack Metadata (MDPM) of the unregistered user data with UUID 17ee8c60f84d11d98cd60800200c9a66 in the H.264 Supplemental Enhancement Information (SEI). [Yes, this description is confusing, but nothing compared to the challenge of actually decoding the data!] This information may exist at regular intervals through the entire video, but only the first occurrence is extracted unless the ExtractEmbedded (-ee) option is used (in which case subsequent occurrences are extracted as sub-documents).

Tag ID Tag Name Writable —— ——– ——– 0x0013 TimeCode no 0x0018 DateTimeOriginal no 0x0070 Camera1 H264 Camera1 0x0071 Camera2 H264 Camera2 0x007f Shutter H264 Shutter 0x00a0 ExposureTime no 0x00a1 FNumber no 0x00a2 ExposureProgram no 0x00a3 BrightnessValue no 0x00a4 ExposureCompensation no 0x00a5 MaxApertureValue no 0x00a6 Flash no 0x00a7 CustomRendered no 0x00a8 WhiteBalance no 0x00a9 FocalLengthIn35mmFormat no 0x00aa SceneCaptureType no 0x00b0 GPSVersionID no 0x00b1 GPSLatitudeRef no 0x00b2 GPSLatitude no 0x00b5 GPSLongitudeRef no 0x00b6 GPSLongitude no 0x00b9 GPSAltitudeRef no 0x00ba GPSAltitude no 0x00bb GPSTimeStamp no 0x00be GPSStatus no 0x00bf GPSMeasureMode no 0x00c0 GPSDOP no 0x00c1 GPSSpeedRef no 0x00c2 GPSSpeed no 0x00c3 GPSTrackRef no 0x00c4 GPSTrack no 0x00c5 GPSImgDirectionRef no 0x00c6 GPSImgDirection no 0x00c7 GPSMapDatum no 0x00ca GPSDateStamp no 0x00e0 MakeModel H264 MakeModel 0x00e1 RecInfo H264 RecInfo 0x00e4 Model no 0x00ee FrameInfo H264 FrameInfo

H264 Camera1 Tags

Index1 Tag Name Writable —— ——– ——– 0 ApertureSetting no 1 Gain no 1.1 ExposureProgram no 2.1 WhiteBalance no 3 Focus no

H264 Camera2 Tags

Index1 Tag Name Writable —— ——– ——– 1 ImageStabilization no

H264 Shutter Tags

Index2 Tag Name Writable —— ——– ——– 1.1 ExposureTime no

H264 MakeModel Tags

Index2 Tag Name Writable —— ——– ——– 0 Make no

H264 RecInfo Tags

Recording information stored by some Canon video cameras.

Index1 Tag Name Writable —— ——– ——– 0 RecordingMode no

H264 FrameInfo Tags

Frame rate information stored by some Canon video cameras.

Index1 Tag Name Writable —— ——– ——– 0 CaptureFrameRate no 1 VideoFrameRate no

MISB Tags

These tags are extracted from STANAG-4609 MISB (Motion Industry Standards Board) KLV-format metadata in M2TS videos.

Tag ID Tag Name Writable —— ——– ——– 060E2B34030101010E01030302000000 Security MISB Security 060e2b3402030101434e415644494147 ChurchillNav MISB ChurchillNav 060e2b34020b01010e01030101000000 UASDataLink MISB UASDatalink <other> Unknown MISB Unknown

MISB Security Tags

Tags extracted from the MISB ST 0102.11 Security Metadata local set.

Tag ID Tag Name Writable —— ——– ——– 0x0001 SecurityClassification no 0x0002 ClassifyingCountryCodeMethod no 0x0003 ClassifyingCountry no 0x0004 SecuritySCI-SHIInformation no 0x0005 Caveats no 0x0006 ReleasingInstructions no 0x0007 ClassifiedBy no 0x0008 DerivedFrom no 0x0009 ClassificationReason no 0x000a DeclassificationDate no 0x000b ClassificationAndMarkingSystem no 0x000c ObjectCountryCodingMethod no 0x000d ObjectCountryCodes no 0x000e ClassificationComments no 0x000f UMID no 0x0010 StreamID no 0x0011 TransportStreamID no 0x0015 ItemDesignatorID no 0x0016 SecurityVersion no 0x0017 ClassifyingCountryCodingMethodDate no 0x0018 ObjectCountryCodingMethodDate no

MISB ChurchillNav Tags

Proprietary tags used by Churchill Navigation units. These tags are all currently unknown, but extracted with the Unknown option.

Tag ID Tag Name Writable —— ——– ——– [no tags known]

MISB UASDatalink Tags

Tags extracted from the MISB ST 0601.11 UAS Datalink local set.

Tag ID Tag Name Writable —— ——– ——– 0x0001 Checksum no 0x0002 GPSDateTime no 0x0003 MissionID no 0x0004 TailNumber no 0x0005 GPSTrack no 0x0006 PitchAngle no 0x0007 RollAngle no 0x0008 TrueAirspeed no 0x0009 IndicatedAirspeed no 0x000a ProjectIDCode no 0x000b SensorName no 0x000c ImageCoordinateSystem no 0x000d GPSLatitude no 0x000e GPSLongitude no 0x000f GPSAltitude no 0x0010 HorizontalFieldOfView no 0x0011 VerticalFieldOfView no 0x0012 SensorRelativeAzimuthAngle no 0x0013 SensorRelativeElevationAngle no 0x0014 SensorRelativeRollAngle no 0x0015 SlantRange no 0x0016 TargetWidth no 0x0017 FrameCenterLatitude no 0x0018 FrameCenterLongitude no 0x0019 FrameCenterElevation no 0x001a OffsetCornerLatitude1 no 0x001b OffsetCornerLongitude1 no 0x001c OffsetCornerLatitude2 no 0x001d OffsetCornerLongitude2 no 0x001e OffsetCornerLatitude3 no 0x001f OffsetCornerLongitude3 no 0x0020 OffsetCornerLatitude4 no 0x0021 OffsetCornerLongitude4 no 0x0022 IcingDetected no 0x0023 WindDirection no 0x0024 WindSpeed no 0x0025 StaticPressure no 0x0026 DensityAltitude no 0x0027 AirTemperature no 0x0028 TargetLocationLatitude no 0x0029 TargetLocationLongitude no 0x002a TargetLocationElevation no 0x002b TargetTrackGateWidth no 0x002c TargetTrackGateHeight no 0x002d TargetErrorEstimateCE90 no 0x002e TargetErrorEstimateLE90 no 0x002f GenericFlagData01 no 0x0030 SecurityLocalMetadataSet MISB Security 0x0031 DifferentialPressure no 0x0032 AngleOfAttack no 0x0033 VerticalSpeed no 0x0034 SideslipAngle no 0x0035 AirfieldBarometricPressure no 0x0036 AirfieldElevation no 0x0037 RelativeHumidity no 0x0038 GPSSpeed no 0x0039 GroundRange no 0x003a FuelRemaining no 0x003b CallSign no 0x003c WeaponLoad no 0x003d WeaponFired no 0x003e LaserPRFCode no 0x003f SensorFieldOfViewName no 0x0040 MagneticHeading no 0x0041 UAS_LSVersionNumber no 0x0042 TargetLocationCovarianceMatrix no 0x0043 AlternateLatitude no 0x0044 AlternateLongitude no 0x0045 AlternateAltitude no 0x0046 AlternateName no 0x0047 AlternateHeading no 0x0048 EventStartTime no 0x0049 RVTLocalSet MISB Unknown 0x004a VMTIDataSet MISB Unknown 0x004b SensorEllipsoidHeight no 0x004c AlternateEllipsoidHeight no 0x004d OperationalMode no 0x004e FrameCenterHeightAboveEllipsoid no 0x004f SensorVelocityNorth no 0x0050 SensorVelocityEast no 0x0051 ImageHorizonPixelPack no 0x0052 CornerLatitude1 no 0x0053 CornerLongitude1 no 0x0054 CornerLatitude2 no 0x0055 CornerLongitude2 no 0x0056 CornerLatitude3 no 0x0057 CornerLongitude3 no 0x0058 CornerLatitude4 no 0x0059 CornerLongitude4 no 0x005a FullPitchAngle no 0x005b FullRollAngle no 0x005c FullAngleOfAttack no 0x005d FullSideslipAngle no 0x005e MIISCoreIdentifier no 0x005f SARMotionImageryData MISB Unknown 0x0060 TargetWidthExtended no 0x0061 RangeImageLocalSet MISB Unknown 0x0062 GeoregistrationLocalSet MISB Unknown 0x0063 CompositeImagingLocalSet MISB Unknown 0x0064 SegmentLocalSet MISB Unknown 0x0065 AmendLocalSet MISB Unknown 0x0066 SDCC-FLP no 0x0067 DensityAltitudeExtended no 0x0068 SensorEllipsoidHeightExtended no 0x0069 AlternateEllipsoidHeightExtended no

MISB Unknown Tags

Other tags are extracted with the Unknown option.

Tag ID Tag Name Writable —— ——– ——– [no tags known]

Matroska Tags

The following tags are extracted from Matroska multimedia container files. This container format is used by file types such as MKA, MKV, MKS and WEBM. For speed, by default ExifTool extracts tags only up to the first Cluster. However, the Verbose (-v) and Unknown = 2 (-U) options force processing of Cluster data, and the ExtractEmbedded (-ee) option skips over Clusters to read subsequent tags. See <http://www.matroska.org/technical/specs/index.html> for the official Matroska specification.

Tag ID Tag Name Writable —— ——– ——– 0x0000 ChapterDisplay Matroska 0x0003 TrackType no 0x0005 ChapterString no 0x0006 VideoCodecID no AudioCodecID no CodecID no 0x0008 TrackDefault no 0x0009 ChapterTrackNumber? no 0x000e Slices Matroska 0x000f ChapterTrack Matroska 0x0011 ChapterTimeStart no 0x0012 ChapterTimeEnd no 0x0016 CueRefTime? no 0x0017 CueRefCluster? no 0x0018 ChapterFlagHidden? no 0x001a VideoScanType no 0x001b BlockDuration? no 0x001c TrackLacing? no 0x001f AudioChannels no 0x0020 BlockGroup Matroska 0x0021 Block? no 0x0022 BlockVirtual? no 0x0023 SimpleBlock? no 0x0024 CodecState? no 0x0025 BlockAdditional? no 0x0026 BlockMore Matroska 0x0027 Position no 0x002a CodecDecodeAll no 0x002b PrevSize no 0x002e TrackEntry Matroska 0x002f EncryptedBlock? no 0x0030 ImageWidth no 0x0033 CueTime? no 0x0035 AudioSampleRate no 0x0036 ChapterAtom Matroska 0x0037 CueTrackPositions Matroska 0x0039 TrackUsed no 0x003a ImageHeight no 0x003b CuePoint Matroska 0x003f CRC-32? no 0x004b BlockAdditionalID? no 0x004c LaceNumber? no 0x004d FrameNumber? no 0x004e Delay? no 0x004f ClusterDuration? no 0x0057 TrackNumber no 0x005b CueReference Matroska 0x0060 Video Matroska 0x0061 Audio Matroska 0x0067 TimeCode? no 0x0068 TimeSlice Matroska 0x006a CueCodecState? no 0x006b CueRefCodecState? no 0x006c Void? no 0x006e BlockAddID? no 0x0071 CueClusterPosition? no 0x0077 CueTrack? no 0x007a ReferencePriority? no 0x007b ReferenceBlock? no 0x007d ReferenceVirtual? no 0x0254 ContentCompressionAlgorithm no 0x0255 ContentCompressionSettings? no 0x0282 DocType no 0x0285 DocTypeReadVersion no 0x0286 EBMLVersion no 0x0287 DocTypeVersion no 0x02f2 EBMLMaxIDLength? no 0x02f3 EBMLMaxSizeLength? no 0x02f7 EBMLReadVersion no 0x037c ChapterLanguage no 0x037e ChapterCountry no 0x0444 SegmentFamily? no 0x0461 DateTimeOriginal no 0x047a TagLanguageBCP47 no 0x0484 TagDefault no 0x0485 TagBinary no 0x0487 TagString no 0x0489 Duration no 0x050d ChapterProcessPrivate? no 0x0598 ChapterFlagEnabled? no 0x05a3 TagName no 0x05b9 EditionEntry Matroska 0x05bc EditionUID? no 0x05bd EditionFlagHidden? no 0x05db EditionFlagDefault? no 0x05dd EditionFlagOrdered? no 0x065c AttachedFileData no 0x0660 AttachedFileMIMEType no 0x066e AttachedFileName no 0x0675 AttachedFileReferral? no 0x067e AttachedFileDescription no 0x06ae AttachedFileUID no 0x07e1 ContentEncryptionAlgorithm no 0x07e2 ContentEncryptionKeyID? no 0x07e3 ContentSignature? no 0x07e4 ContentSignatureKeyID? no 0x07e5 ContentSignatureAlgorithm no 0x07e6 ContentSignatureHashAlgorithm no 0x0d80 MuxingApp no 0x0dbb Seek Matroska 0x1031 ContentEncodingOrder? no 0x1032 ContentEncodingScope? no 0x1033 ContentEncodingType no 0x1034 ContentCompression Matroska 0x1035 ContentEncryption Matroska 0x135f CueRefNumber? no 0x136e TrackName no 0x1378 CueBlockNumber? no 0x137f TrackOffset? no 0x13ab SeekID? no 0x13ac SeekPosition? no 0x13b8 Stereo3DMode no 0x14aa CropBottom no 0x14b0 DisplayWidth no 0x14b2 DisplayUnit no 0x14b3 AspectRatioType no 0x14ba DisplayHeight no 0x14bb CropTop no 0x14cc CropLeft no 0x14dd CropRight no 0x15aa TrackForced no 0x15ee MaxBlockAdditionID? no 0x1741 WritingApp no 0x1854 SilentTracks Matroska 0x18d7 SilentTrackNumber no 0x21a7 AttachedFile Matroska 0x2240 ContentEncoding Matroska 0x2264 AudioBitsPerSample no 0x23a2 CodecPrivate? no 0x23c0 Targets Matroska 0x23c3 ChapterPhysicalEquivalent no 0x23c4 TagChapterUID no 0x23c5 TagTrackUID no 0x23c6 TagAttachmentUID no 0x23c9 TagEditionUID no 0x23ca TargetType no 0x2532 SignedElement? no 0x2624 TrackTranslate Matroska 0x26a5 TrackTranslateTrackID? no 0x26bf TrackTranslateCodec no 0x26fc TrackTranslateEditionUID? no 0x27c8 SimpleTag Matroska 0x28ca TargetTypeValue no 0x2911 ChapterProcessCommand Matroska 0x2922 ChapterProcessTime? no 0x2924 ChapterTranslate Matroska 0x2933 ChapterProcessData? no 0x2944 ChapterProcess Matroska 0x2955 ChapterProcessCodecID? no 0x29a5 ChapterTranslateID? no 0x29bf ChapterTranslateCodec no 0x29fc ChapterTranslateEditionUID? no 0x2d80 ContentEncodings Matroska 0x2de7 MinCache? no 0x2df8 MaxCache? no 0x2e67 ChapterSegmentUID? no 0x2ebc ChapterSegmentEditionUID? no 0x2fab TrackOverlay? no 0x3373 Tag Matroska 0x3384 SegmentFileName no 0x33a4 SegmentUID? no 0x33c4 ChapterUID? no 0x33c5 TrackUID no 0x3446 TrackAttachmentUID no 0x35a1 BlockAdditions Matroska 0x38b5 OutputAudioSampleRate no 0x3ba9 Title no 0x3d7b ChannelPositions? no 0x3e5b SignatureElements Matroska 0x3e7b SignatureElementList Matroska 0x3e8a SignatureAlgo no 0x3e9a SignatureHash no 0x3ea5 SignaturePublicKey? no 0x3eb5 Signature? no 0x7670 Projection Matroska Projection 0x2b59c TrackLanguage no 0x2b59d TrackLanguageIETF no 0x3314f TrackTimecodeScale no 0x383e3 FrameRate no 0x3e383 VideoFrameRate no DefaultDuration no 0x58688 VideoCodecName no AudioCodecName no CodecName no 0x6b240 CodecDownloadURL no 0xad7b1 TimecodeScale no 0xeb524 ColorSpace? no 0xfb523 Gamma no 0x1a9697 CodecSettings no 0x1b4040 CodecInfoURL no 0x1c83ab PrevFileName no 0x1cb923 PrevUID? no 0x1e83bb NextFileName no 0x1eb923 NextUID? no 0x43a770 Chapters Matroska 0x14d9b74 SeekHead Matroska 0x254c367 Tags Matroska 0x549a966 Info Matroska 0x654ae6b Tracks Matroska 0x8538067 SegmentHeader Matroska 0x941a469 Attachments Matroska 0xa45dfa3 EBMLHeader Matroska 0xb538667 SignatureSlot Matroska 0xc53bb6b Cues Matroska 0xf43b675 Cluster Matroska

Matroska Projection Tags

Projection tags defined by the Spherical Video V2 specification. See <https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md> for the specification.

Tag ID Tag Name Writable —— ——– ——– 0x7671 ProjectionType no 0x7672 EquirectangularProj QuickTime equi CubemapProj QuickTime cbmp ProjectionPrivate no 0x7673 ProjectionPoseYaw no 0x7674 ProjectionPosePitch no 0x7675 ProjectionPoseRoll no

Matroska StdTag Tags

Standardized Matroska tags, stored in a SimpleTag structure (see <https://www.matroska.org/technical/tagging.html>).

Tag ID Tag Name Writable —— ——– ——– ACCOMPANIMENT Accompaniment no ACTOR Actor no ADDRESS Address no ARRANGER Arranger no ARTIST Artist no ART_DIRECTOR ArtDirector no ASSISTANT_DIRECTOR AssistantDirector no BARCODE Barcode no BPM BPM no BPS BPS no CATALOG_NUMBER CatalogNumber no CHARACTER Character no CHOREGRAPHER Choregrapher no COMMENT Comment no COMPOSER Composer no COMPOSER_NATIONALITY ComposerNationality no COMPOSITION_LOCATION CompositionLocation no CONDUCTOR Conductor no CONTENT_TYPE ContentType no COPRODUCER Coproducer no COPYRIGHT Copyright no COSTUME_DESIGNER CostumeDesigner no COUNTRY Country no DATE_DIGITIZED CreateDate no DATE_ENCODED DateEncoded no DATE_PURCHASED DatePurchased no DATE_RECORDED DateTimeOriginal no DATE_RELEASED DateReleased no DATE_TAGGED DateTagged no DATE_WRITTEN DateWritten no DESCRIPTION Description no DIRECTOR Director no DIRECTOR_OF_PHOTOGRAPHY DirectorOfPhotography no DISTRIBUTED_BY DistributedBy no EDITED_BY EditedBy no EMAIL Email no ENCODED_BY EncodedBy no ENCODER Encoder no ENCODER_SETTINGS EncoderSettings no EXECUTIVE_PRODUCER ExecutiveProducer no FAX FAX no FPS FPS no GENRE Genre no IMDB IMDB no INITIAL_KEY InitialKey no INSTRUMENTS Instruments no ISBN ISBN no ISRC ISRC no KEYWORDS Keywords no LABEL Label no LABEL_CODE LabelCode no LAW_RATING LawRating no LCCN Lccn no LEAD_PERFORMER LeadPerformer no LICENSE License no LYRICIST Lyricist no LYRICS Lyrics no MASTERED_BY MasteredBy no MCDI MCDI no MEASURE Measure no MIXED_BY MixedBy no MOOD Mood no ORIGINAL Original no ORIGINAL_MEDIA_TYPE OriginalMediaType no PART_NUMBER PartNumber no PART_OFFSET PartOffset no PERIOD Period no PHONE Phone no PLAY_COUNTER PlayCounter no PRODUCER Producer no PRODUCTION_COPYRIGHT ProductionCopyright no PRODUCTION_DESIGNER ProductionDesigner no PRODUCTION_STUDIO ProductionStudio no PUBLISHER Publisher no PURCHASE_CURRENCY PurchaseCurrency no PURCHASE_INFO PurchaseInfo no PURCHASE_ITEM PurchaseItem no PURCHASE_OWNER PurchaseOwner no PURCHASE_PRICE PurchasePrice no RATING Rating no RECORDING_LOCATION RecordingLocation no REMIXED_BY RemixedBy no REPLAYGAIN_GAIN ReplaygainGain no REPLAYGAIN_PEAK ReplaygainPeak no SAMPLE Sample no SCREENPLAY_BY ScreenplayBy no SORT_WITH SortWith no SOUND_ENGINEER SoundEngineer no SPHERICAL-VIDEO SphericalVideoXML XMP SUBJECT Subject no SUBTITLE Subtitle no SUMMARY Summary no SYNOPSIS Synopsis no TERMS_OF_USE TermsOfUse no THANKS_TO ThanksTo no TITLE Title no TMDB TMDB no TOTAL_PARTS TotalParts no TUNING Tuning no TVDB TVDB no URL URL no WRITTEN_BY WrittenBy no spherical-video SphericalVideoXML XMP

MOI Tags

MOI files store information about associated MOD or TOD files, and are written by some JVC, Canon and Panasonic camcorders.

Index1 Tag Name Writable —— ——– ——– 0 MOIVersion no 6 DateTimeOriginal no 14 Duration no 128 AspectRatio no 132 AudioCodec no 134 AudioBitrate no 218 VideoBitrate no

MXF Tags

Tags extracted from Material Exchange Format files. Tag ID’s are not listed because they are bulky 16-byte binary values.

Tag Name Writable ——– ——– AAFManufacturerID? no AES3PCMDescriptor MXF AFDAndBarData? no AGICOAID? no AICI? no AIFCSummary? no ANCPacketCount no ANCPayloadByteArray no ANCPayloadSampleCoding no ANCPayloadSampleCount no ANCWrappingType no Abstract no Abstract no AccountingReferenceNumber no ActiveFormatDescriptor no ActiveLinesperFrame no ActiveSamplesperLine no ActiveState no Ad-ID? no Address MXF AddressLine no AddressLine no AddressNameValueSets? no AddressSets? no AdvertisingMaterialReference no AestheticValue no AlphaMaximumRef no AlphaMinimumRef no AlphaSampleDepth no AlphaTransparency no AlternateName no AlternateName no Alternates? no AnalogDataCodingKind no AnalogMetadataCarrier no AnalogMonitoringAndControlCodingKind no AnalogSystem no AnalogVideoSystemName no AnalogVideoSystemName? no AnamorphicLensCharacteristic no AnchorOffset no AncillaryResourceID? no AngleToNorth no AngularUnitKind no Annotation? no Annotation MXF AnnotationCueWordsSet? no AnnotationDescription no AnnotationDescription no AnnotationKind no AnnotationKind no AnnotationParticipantSets? no AnnotationSets? no AnnotationSynopsis no AnnotationSynopsis no ApplicationEnvironmentID no ApplicationInformationArray? no ApplicationName no ApplicationName no ApplicationPlatform no ApplicationPlatform no ApplicationPlug-InBatch? no ApplicationPlug-InInstanceID? no ApplicationProductID? no ApplicationScheme? no ApplicationSchemeBatch? no ApplicationSupplierName no ApplicationSupplierName no ApplicationVersionNumber no ApplicationVersionString no ApplicationVersionString no ApproximateImageContainerSize no ArchiveID no AssetValue no AssignedCategoryName no AssignedCategoryName no AssignedCategoryValue no AssignedCategoryValue no AssociatedMetadataDefinition? no AstronomicalBodyName no AstronomicalBodyName no AudienceAppreciation no AudienceRating no AudienceReach no AudienceShare no AudioAverageBitrate no AudioCodingSchemeCode no AudioCodingSchemeID? no AudioCodingSchemeName no AudioCompressionAlgorithm no AudioDeviceKind no AudioDeviceParameter no AudioDeviceParameterSetting no AudioEnhancementOrModificationDescription no AudioFirstMix-DownProcess no AudioFixedBitrateFlag no AudioMonoChannelCount no AudioNoiseReductionAlgorithm no AudioReferenceLevel no AudioReferenceLevel no AudioSampleRate no AudioSampleRate no AudioStereoChannelCount no AudioWatermarkKind no AuthenticationFlag no AuxiliaryBitsMode no AvailableRepresentations? no AverageBytesPerSecond no Award MXF AwardCategory no AwardCategory no AwardName no AwardName no AwardParticipantSets? no AwardSets? no BICI? no BackgroundMusicFlag no BankDetailsSet? no BeginAnchor no BeginAnchor no BextCodingHistory no BextCodingHistory no Bitrate no BitsPerAudioSample no BitsPerPixel no BitsPerPixel no BitsPerSample no BlackReferenceLevel no BlockAlign no BlockContinuityCount no BlockStartOffset no BoundingRectangle? no BrandMainTitle no BrandMainTitle no BrandOriginalTitle no BrandOriginalTitle no Branding MXF BrandingSets? no BroadcastChannel no BroadcastDate no BroadcastMediumCode no BroadcastMediumKind no BroadcastOrganizationName no BroadcastOrganizationName no BroadcastRegion no BroadcastRegion no BroadcastServiceName no BroadcastTime no BroadcasterRightsToCopy no BufferDelay? no BuildingName no BuildingName no Bypass no BypassOverride no ByteOffset no ByteOrder no CBEStartOffset no CDCIEssenceDescriptor MXF CISACLegalEntityID? no CaptionDescription MXF CaptionDescriptionSets? no CaptionKind no CaptionKind no CaptionTitles no CaptionsDescriptionParticipantSets? no CaptionsViaTeletext no CaptureAspectRatio no CaptureFilmFrameRate no CaptureGammaEquation no CaptureGammaEquation no CaptureGammaEquation? no CatalogDataStatus no CatalogDataStatus no CatalogPrefixNumber no CatalogingSystemName no CentralTelephoneNumber no ChannelAssignment? no ChannelCount no ChannelHandle no ChannelID no ChannelIDs no ChannelStatusMode no CipherAlgorithm? no CipherAlgorithmAES128CBC? no Citizenship no Citizenship no CityName no CityName no ClassDefinitions? no Classification MXF ClassificationAndMarkingSystem no ClassificationComment no ClassificationComment no ClassificationNameValueSets? no ClassificationReason no ClassificationSets? no ClassifiedBy no ClassifyingCountryCode no ClipCreationDateTime no ClipFramework MXF ClipID no ClipIDArray? no ClipKind no ClipNumber no ClipNumber no ClipShotSets? no CloneCount no ClosedBodyPartition? no ClosedCaptionSubtitlesFlag no ClosedCompleteBodyPartition? no ClosedCompleteHeader MXF Header ClosedGOPIndicator no ClosedHeader MXF Header CodecDefinition? no CodecDefinition? no CodecDefinitions? no CodecEssenceDescriptor? no CodecEssenceKinds? no CodedContentScanningKind no CodingLawKind no CodingLawName no CodingStyleDefault? no CollectionName no CollectionName no ColorDescriptor no ColorDescriptor no ColorFieldCode no ColorPrimaries no ColorPrimaries? no ColorRangeLevels no ColorSiting no ColorimetryCode no ColorimetryCode? no CommunicationSets? no Communications MXF CompleteFooter? no ComponentAttributes? no ComponentDataDefinition no ComponentDepth no ComponentKLVData? no ComponentMaximumRef no ComponentMinimumRef no ComponentUserComments? no ComponentsInSequence? no CompositionRendering? no ComputedKeyData no ComputedKeyFrames no ComputedKeySounds no ComputedKeywords no ComputedKeywords no ComputedObjectKind no ComputedObjectKind no ComputedStratumKind no ConstantBPictureFlag no ConsumerRightsToCopy no ContactDepartmentName no ContactDepartmentName no ContactID? no ContactKind no ContactKind no ContactNameValueSets? no ContactsList MXF ContactsListSet? no ContainerDefinitions? no ContainerLastModifyDate no ContainerVersion no ContentClassification no ContentClassification no ContentCodingSystem no ContentMaturityDescription no ContentMaturityGraphic no ContentMaturityRating no ContentPackageIndexArray? no ContentPackageMetadataLink no ContentStorage? no ContentStorageSet MXF ContentValue no ContextDescription no ContiguousDataFlag no Contract MXF ContractClauseDescription no ContractClauseDescription no ContractDateTime no ContractEntity no ContractInstallmentPercentage no ContractLineCode no ContractLineName no ContractLineName no ContractParticipantSets? no ContractSets? no ContractTermsOfBusiness no ContractTermsOfBusiness no ContractType no ContractType no ContractTypeCode no ContractTypeLink no ContributionStatus no ContributionStatus no ControlPointList? no ControlPointTime no CopyCount no CopyrightLicenseCountryCode no CopyrightLicenseRegionCode no CopyrightLicenseRegionName no CopyrightOwnerName no CopyrightOwnerName no CopyrightStatus no CopyrightStatus no CornerLatitudePoint1 no CornerLatitudePoint1 no CornerLatitudePoint2 no CornerLatitudePoint2 no CornerLatitudePoint3 no CornerLatitudePoint3 no CornerLatitudePoint4 no CornerLatitudePoint4 no CornerLongitudePoint1 no CornerLongitudePoint1 no CornerLongitudePoint2 no CornerLongitudePoint2 no CornerLongitudePoint3 no CornerLongitudePoint3 no CornerLongitudePoint4 no CornerLongitudePoint4 no CountryCodeMethod no CountryCodeMethod no CountryName no CountryName no CountryName no CountryName no CreateDate no CryptographicContext MXF CryptographicContextID? no CryptographicContextLink? no CryptographicContextObject? no CryptographicFramework MXF CryptographicFrameworkLabel? no CryptographicKeyID? no Csiz no Cue-InWords no Cue-InWords no Cue-OutWords no Cue-OutWords no CueWords MXF CulturalValue no CurrencyCode no CurrencyName no CurrentNumberInSequence no CurrentNumberInSequence no CurrentRepeatNumber no CutPoint no DMFramework MXF DMSegment MXF DMSet MXF DMSourceClip MXF DOI? no DVBParentalRating no DataDefinition? no DataDefinitions? no DataDeviceKind no DataDeviceParameterName no DataDeviceParameterSetting no DataEnhancementOrModificationDescription no DataEssenceCoding no DataEssenceCodingID? no DateTimeDropFrameFlag no DateTimeEmbeddedFlag no DateTimeKind? no DateTimeRate no DeclassificationDate no DefaultDataValue? no DefaultFadeDuration no DefaultFadeEditRate no DefaultFadeType? no DefaultNamespaceURI no DefaultNamespaceURI no DefaultObject? no DefinedName no DefinedName no DefinitionObjectID? no DefinitionObjectName no DefinitionObjectName no DegradedEffects? no DeltaEntryArray? no DerivedFrom no Description no Description no DescriptionKind no DescriptionKind no DescriptiveComment no DescriptiveComment no DescriptiveMetadataApplicationEnvironmentID no DescriptiveMetadataFramework? no DescriptiveMetadataPlug-InID? no DescriptiveMetadataScheme? no DescriptiveMetadataSchemes? no DescriptiveMetadataSetReferences? no DescriptiveMetadataSets? no DescriptiveMetadataTrackIDs no DeviceAbsoluteHeading no DeviceAbsolutePositionalAccuracy no DeviceAbsoluteSpeed no DeviceAltitude no DeviceAltitude no DeviceAssetNumber no DeviceDesignation no DeviceIDKind no DeviceKind no DeviceKind no DeviceKindCode no DeviceLatitude no DeviceLatitude no DeviceLatitude no DeviceLongitude no DeviceLongitude no DeviceLongitude no DeviceManufacturerName no DeviceManufacturerName no DeviceModel no DeviceParameterNameValueSets? no DeviceParameters MXF DeviceParametersSets? no DeviceRelativeHeading no DeviceRelativePositionX no DeviceRelativePositionY no DeviceRelativePositionZ no DeviceRelativePositionalAccuracy no DeviceRelativeSpeed no DeviceSerialNumber no DeviceUsageDescription no DeviceUsageDescription no DeviceXDimension no DeviceYDimension no DialNorm no Dictionary? no DictionaryDescription no DictionaryDescription no DictionaryIdentifier? no DigitalEncodingBitrate no DigitalMetadataCarrier no DigitalOrAnalogOrigination no DigitalVideoFileFormat no DirectorName no DiscPartitionCapacity no DisplayF2Offset no DisplayHeight no DisplayUnits no DisplayUnits no DisplayWidth no DisplayXOffset no DisplayYOffset no Dither no DropFrame no Duration no DynamicSourcePackageID? no DynamicSourceTrackIDs no E-mailAddress no E-mailAddress no EPGProgramSynopsis no EdgeCode no EdgeCodeFilmGauge? no EdgeCodeFormat? no EdgeCodeHeader? no EdgeCodeStart no EditHint? no EditRate no EditUnitFlags no EditUnitLength no EditingEventComment no EditingEventComment no EffectRendering? no ElectrospatialFormulation no ElementCount no ElementDelta no ElementLength no ElementNameList no Emphasis no EncryptedContainerLabel? no EncryptedSourceValue? no EncryptedTrackFileID? no EndAnchor no EndAnchor no EnhancementOrModificationDescription no EnumerationUnderlyingIntegerType? no EpisodeEndNumber no EpisodeNumber no EpisodeNumber no EpisodeStartNumber no EpisodicItemSets? no EssenceContainerArray? no EssenceContainerDataSet MXF EssenceContainerFormat? no EssenceContainerFormat? no EssenceContainers? no EssenceData? no EssenceDescription? no EssenceIsIdentified no EssenceLength no EssenceLocators? no EssenceStreamID no Event MXF EventAbsoluteDuration no EventAbsoluteDuration? no EventAbsoluteDurationFrameCount no EventAnnotationSets? no EventElapsedTimeToEnd no EventElapsedTimeToStart no EventEndTimeOffset no EventEndTimecodeOffset? no EventIndication no EventIndication no EventOrigin no EventSets? no EventStart no EventStartTimeOffset no EventStartTimecodeOffset? no EventTrack MXF EventTrackEditRate no ExCCIData? no ExposedAspectRatio no ExtendedCaptionsLanguageCode no ExtendedClipID no ExtendedClipIDArray? no ExtendedTextLanguageCode no ExtendibleElementNameList no FNumber no Fade-InDuration no Fade-InType? no Fade-OutDuration no Fade-OutType? no FamilyName no FamilyName no FaxNumber no FaxNumber no FemaleLeadActressName no FestivalName no FestivalName no FieldDominance no FieldFrameTypeCode no FieldOfViewHorizontal no FieldOfViewHorizontal no FieldOfViewVertical no FieldOfViewVerticalFP no FieldRate no FileDescriptor MXF FileDescriptors? no FileSecurityReport no FileSecurityWave no FillerData? no FilmBatchNumber no FilmBatchNumber no FilmCaptureAperture no FilmColorProcess no FilmFormatName no FilmFormatName no FilmFormatName? no FilmGauge? no FilmStockKind no FilmStockKind no FilmStockManufacturerName no FilmStockManufacturerName no FilmTestParameter no FilmTestResult no FilmTestResult? no FilmToVideoTransferDirection? no FilmToVideoTransferKind? no FilmToVideoTransferPhase? no FilteringApplied no FilteringCode no FirstBroadcastFlag no FirstGivenName no FirstGivenName no FirstNumberInSequence no FirstNumberInSequence no FirstTransmissionInfo no FixedArrayElementType? no FixedChannelStatusData? no FixedUserData? no FocalLength no FocalLength no Footer? no FormatDescriptor no FormatDescriptor no FormerFamilyName no FormerFamilyName no FrameCenterElevation no FrameCenterLatitude no FrameCenterLatitude no FrameCenterLatitude no FrameCenterLatitudeLongitude no FrameCenterLongitude no FrameCenterLongitude no FrameCenterLongitude no FrameCode no FrameCount no FrameCountOffset no FrameLayout no FramePositionalAccuracy no FrameRate no FrameworkExtendedTextLanguageCode no FrameworkTextLanguageCode no FrameworkThesaurusName no FrameworkThesaurusName no FrameworkTitle no FrameworkTitle no GenerationCloneNumber no GenerationCopyNumber no GenerationID? no GenericDataEssenceDescriptor MXF GenericPackage MXF GenericPayloads? no GenericPictureEssenceDescriptor MXF GenericSoundEssenceDescriptor MXF GenericTrack MXF Genre no Genre no GeographicAreaNorthwest? no GeographicAreaSourceDatum no GeographicAreaSoutheast? no GeographicLocation? no GeographicPolygonCoordinates? no GeographicPolygonSourceDatum no GeographicalCoordinates? no GlobalNumber no GraphicKind no GraphicUsageKind no GraphicUsageKind no GroupRelationship MXF GroupSet? no GroupSets? no GroupSynopsis no GroupSynopsis no HMACAlgorithmSHA1128? no HTMLDOCTYPE no HTMLDOCTYPE no HTMLMetaDescription no HTMLMetaDescription no HardwareAcceleratorFlag no HasAudioWatermark no HasVideoWatermark no HeaderByteCount no HistoricalValue no HonorsAndQualifications no HonorsAndQualifications no HorizontalActionSafePercentage no HorizontalDatum no HorizontalGraphicsSafePercentage no HorizontalSubsampling no IBTN? no IEEEDeviceID no IEEEManufacturerID no ISAN? no ISBD? no ISBN? no ISCI? no ISMN? no ISO3166CountryCode no ISO639-1LanguageCode no ISO639-1LanguageCode no ISO639CaptionsLanguageCode no ISO639TextLanguageCode no ISRC? no ISRN? no ISSN? no ISTC? no ISWC? no IdenticalGOPIndicator no Identification MXF Identification MXF IdentificationList? no IdentificationSets? no IdentificationUL? no IdentifierIssuingAuthority no IdentifierIssuingAuthority no IdentifierKind no IdentifierValue no ImageAlignmentOffset no ImageCategory no ImageCoordinateSystem no ImageEndOffset no ImageFormatSet? no ImageHeight no ImageSourceDeviceKind no ImageSourceDeviceKind no ImageStartOffset no ImageWidth no IncludeSync no IndexByteCount no IndexDuration no IndexEditRate no IndexEntryArray? no IndexStreamID no IndexTableSegment? no IndexingStartPosition no IndividualAwardName no InkNumber no InputSegment? no InputSegmentCount no InputSegments? no InsertMusicFlag no InstallmentNumber no InstanceUID? no IntegrationIndication no IntegrationIndication no IntellectualPropertyDescription no IntellectualPropertyDescription no IntellectualPropertyLicenseCountryCode no IntellectualPropertyLicenseRegionCode no IntellectualPropertyLicenseRegionName no IntellectualPropertyRights no IntellectualPropertyRights no IntendedAFD no IntentDescriptor no IntentDescriptor no InterestedPartyName no Interpolation? no InterpolationDefinitions? no IsConcrete no IsDubbed no IsLiveProduction no IsLiveTransmission no IsOptional no IsRecording no IsRepeat no IsSearchable no IsSigned no IsUniqueIdentifier no IsVoiceover no ItemDesignatorID? no ItemID no ItemName no ItemName no ItemValue no ItemValue no JFIFMarkerDescription no JFIFMarkerDescription no JPEG2000PictureSubDescriptor MXF JPEGTableID? no JobFunctionCode no JobFunctionName no JobFunctionName no JobTitle no JobTitle no Jurisdiction no Jurisdiction no KAGSize no KLVDataDefinitions? no KLVDataParentProperties? no KLVDataType? no KLVDataValue? no KLVMetadataSequence? no KeyCode? no KeyData no KeyDataOrProgram no KeyFrame no KeyFrameSampleCount no KeyFrames no KeyPoint MXF KeyPointSets? no KeySound no KeySounds no KeyText no KeyTimePoint no KeypointKind no KeypointKind no KeypointValue no KeypointValue no Keywords no Keywords no LUID no LanguageName no LanguageName no LastNumberInSequence no LastNumberInSequence no LayerNumber no LeadingLines no LengthSystemName no LengthUnitKind no LicenseOptionsDescription no LineNumber no LinkedApplicationPlug-InInstanceID? no LinkedDescriptiveFrameworkPlug-InID? no LinkedDescriptiveObjectPlug-InID? no LinkedGenerationID? no LinkedPackageID? no LinkedTimecodeTrackID? no LinkedTrackID no LinkingName no LinkingName no LocalCreationDateTime no LocalDatumAbsolutePositionAccuracy no LocalDatumRelativePositionAccuracy no LocalEndDateTime no LocalEventEndDateTime no LocalEventEndDateTime no LocalEventStartDateTime no LocalEventStartDateTime no LocalFestivalDateTime no LocalFilePath no LocalFilePath no LocalID no LocalLastModifyDate no LocalModifyDate no LocalStartDateTime no LocalTagEntries? no LocalTagUniqueID? no LocalTagValue no LocalTapeNumber no LocalTargetID no LocalTargetID no LocalUserDateTime no Location MXF LocationDescription no LocationDescription no LocationKind no LocationKind no LocationSets? no LockedIndicator no LogoFlag no LowDelayIndicator no LumaEquation no LuminanceSampleRate no MIC? no MICAlgorithm? no MIMECharSet no MIMECharSet no MIMEEncoding no MIMEEncoding no MIMEMediaType no MIMEMediaType no MPEG2VideoDescriptor MXF MPEG7BiMAccessUnitFrame1? no MPEG7BiMAccessUnitFrame2? no MPEG7BiMAccessUnitFrame3? no MPEG7BiMAccessUnitFrame4? no MPEG7BiMAccessUnitFrame5? no MPEG7BiMAccessUnitFrame6? no MPEG7BiMAccessUnitFrame7? no MPEG7BiMAccessUnitFrame8? no MPEG7BiMDecoderInitFrame1? no MPEG7BiMDecoderInitFrame2? no MPEG7BiMDecoderInitFrame3? no MPEG7BiMDecoderInitFrame4? no MPEG7BiMDecoderInitFrame5? no MPEG7BiMDecoderInitFrame6? no MPEG7BiMDecoderInitFrame7? no MPEG7BiMDecoderInitFrame8? no MPEGAudioBitrate no MPEGAudioRecodingDataset? no MPEGVideoRecodingDataset? no MagneticDiskNumber no MagneticTrack no MainCatalogNumber no MainName no MainName no MainSponsorName no MainTitle no MainTitle no MajorVersion no MaleLeadActorName no ManufacturerID? no ManufacturerInformationObject? no MapDatumUsed no MarkIn no MarkOut no MaterialAbsoluteDuration no MaterialAbsoluteDuration? no MaterialEndTimeOffset no MaterialEndTimecodeOffset? no MaterialPackage MXF MaximumAPIVersion no MaximumBPictureCount no MaximumGOPSize no MaximumSupportedEngineVersion no MaximumSupportedPlatformVersion no MaximumUseCount no MediaLocation no MemberNameList no MemberTypes? no MetadataEncodingSchemeCode no MetadataItemName no MetadataItemName no MetadataServerLocators? no MicrophonePlacementTechniques no MinimumAPIVersion no MinimumSupportedEngineVersion no MinimumSupportedPlatformVersion no MinorVersion no MissionID no MissionID no MobileTelephoneNumber no ModifyDate no MonoSourceTrackIDs no MultipleDescriptor MXF NITFLayerTargetID no NITFLayerTargetID no NMEADocumentText no NOLACode no NameSuffix no NameSuffix no NameValue MXF NamespacePrefix no NamespacePrefix no NamespacePrefixes no NamespacePrefixes no NamespaceURI no NamespaceURI no NamespaceURIs no NamespaceURIs no Nationality no Nationality no NatureOfPersonality no NatureOfPersonality no NetworkLocator MXF NextNumberInSequence no NextNumberInSequence no NielsenStreamIdentifier no NominationCategory no NominationCategory no Non-USClassifyingCountryCode no ObjectAreaDimension no ObjectClass? no ObjectClassDefinition? no ObjectCountryCode no ObjectCountryCode no ObjectCountryCodeMethod no ObjectDescription no ObjectDescription no ObjectDescriptionCode no ObjectHorizontalAverageDimension no ObjectIdentificationConfidence no ObjectKind no ObjectKind no ObjectModelVersion no ObjectName no ObjectRegionCode no ObjectRegionName no ObjectVerticalAverageDimension no ObliquityAngle no OffsetToIndexTable no OffsetToIndexTable no OffsetToMetadata no OffsetToMetadata no OpenBodyPartition? no OpenCompleteBodyPartition? no OpenCompleteHeader MXF Header OpenHeader MXF Header OperatingSystemInterpretations no OperationCategory? no OperationDataDefinition? no OperationDefinitionID? no OperationDefinitions? no OperationParameters? no OperationalPatternUL? no OpticalDiscNumber no OpticalTestParameterName no OpticalTestResult no OpticalTestResult no OpticalTrack no Organisation MXF OrganizationCode no OrganizationCode no OrganizationID no OrganizationID no OrganizationIDKind no OrganizationIDKind no OrganizationKind no OrganizationKind no OrganizationMainName no OrganizationMainName no OrganizationSets? no OrganizationalProgramNumber no OrganizationalProgramNumber no Origin no OriginCode no OriginalExtendedSpokenPrimaryLanguageCode no OriginalProducerName no OriginalProducerName no OriginalTitle no OriginalTitle no OtherGivenNames no OtherGivenNames no OtherValues no PII? no POSIXMicroseconds no PURL no PackLength no PackageAttributes? no PackageID? no PackageKLVData? no PackageLastModifyDate no PackageMarkInPosition no PackageMarkOutPosition no PackageMarker? no PackageName no PackageName no PackageTimelineMarkerRef? no PackageTracks? no PackageUsageKind? no PackageUserComments? no Packages? no PaddingBits no Palette? no PaletteLayout? no PanScanInformation? no ParameterDataType? no ParameterDefinition? no ParameterDefinitions? no Parameters? no ParentClass? no Participant MXF ParticipantID? no ParticipantOrganizationSets? no PartitionMetadata? no Password no Password no PayeeAccountName no PayeeAccountNumber no PayeeAccountSortCode no PayerAccountName no PayerAccountNumber no PayerAccountSortCode no PaymentDueDateTime no PaymentsSets? no PeakChannelCount no PeakEnvelope no PeakEnvelopeBlockSize no PeakEnvelopeData? no PeakEnvelopeData? no PeakEnvelopeFormat no PeakEnvelopeTimestamp no PeakEnvelopeVersion no PeakFrameCount no PeakOfPeaksPosition no PerceivedDisplayFormatCode no PerceivedDisplayFormatName no PerforationsPerFrame no PerforationsPerFrame no Person MXF PersonDescription no PersonDescription no PersonOrganizationSets? no PersonSets? no PhysicalInstanceKind no PhysicalMediaLength? no PhysicalMediaLocation no PictureComponentSizing? no PictureDisplayRate no PictureFormat MXF PixelLayout? no PlaceKeyword no PlaceKeyword no PlaceName no PlaceName no PlaintextOffset no PlatformDesignation no PlatformDesignation no PlatformHeadingAngle no PlatformModel no PlatformPitchAngle no PlatformRollAngle no PlatformSerialNumber no Plug-InAPIID? no Plug-InCategoryID? no Plug-InDefinitions? no Plug-InEngineID? no Plug-InLocatorSet? no Plug-InPlatformID? no PointsPerPeakValue no PolarCharacteristic no PosTableArray? no PositionInSequence no PositionTable? no PositionTableCount no PositionTableIndexing no PositionWithinViewportImageXCoordinate no PositionWithinViewportImageYCoordinate no PostCodeForPostbox no PostalCode no PostalCode no PostalTown no PostalTown no PostboxNumber no Preface MXF PresentationAspectRatio no PresentationGammaEquation no PresentationGammaEquation? no PresenterName no PreviousNumberInSequence no PreviousNumberInSequence no PreviousRepeatNumber no PrimaryExtendedSpokenLanguageCode no PrimaryOriginalLanguageCode no PrimaryPackage? no PrimarySpokenLanguageCode no Primer MXF Processing MXF ProcessingSet? no ProducerName no ProductFormat no ProductFormat no ProductionFramework MXF ProductionOrganizationRole no ProductionOrganizationRole no ProductionScriptReference no ProductionScriptReference no ProductionSettingPeriodSets? no ProfileAndLevel no ProgramAwardName no ProgramCommercialMaterialReference no ProgramIdentifier no ProgramIdentifierString no ProgramKind no ProgramMaterialClassificationCode no ProgramNumber no ProgramSupportMaterialReference no ProgrammingGroupKind no ProgrammingGroupKind no ProgrammingGroupTitle no ProgrammingGroupTitle no ProjectName no ProjectName no ProjectNumber no ProjectSet? no Projects MXF Properties? no PropertyType? no Publication MXF PublicationSets? no PublishingMediumName no PublishingMediumName no PublishingOrganizationName no PublishingOrganizationName no PublishingRegionName no PublishingRegionName no PublishingServiceName no PublishingServiceName no PulldownFieldDominance no PulldownSequence? no PurchaserAccountName no PurchaserAccountName no PurchaserAccountNumber no PurchaserIdentificationKind no PurchaserIdentificationValue no PurchasingDepartment no PurchasingOrganizationName no Purpose no Purpose no QltyBasicData no QltyBasicData no QltyCueSheet no QltyCueSheet no QltyEndOfModulation no QltyEndOfModulation no QltyOperatorComment no QltyOperatorComment no QltyQualityEvent no QltyQualityEvent no QltyQualityParameter no QltyQualityParameter no QltyStartOfModulation no QltyStartOfModulation no QualityFlag no QuantizationDefault? no RGBAEssenceDescriptor MXF RIFFChunkData? no RIFFChunkID no RIFFChunkLength no RP217DataStreamPID no RP217VideoStreamPID no RandomIndexMetadata? no RandomIndexMetadataV10? no Rating no RecordedFormat no RecordedFormat no RecordedTrackNumber no RecordingLabelName no RecordingLabelName no ReelOrRollNumber no RegionCode no RegionName no RegionName no RegisterAction no RegisterAdministrationArray? no RegisterAdministrationNotes no RegisterAdministrationObject? no RegisterApproverName no RegisterChildEntryArray? no RegisterCreationTime no RegisterEditorName no RegisterEntryAdministrationObject? no RegisterEntryArray? no RegisterEntryStatus? no RegisterItemDefiningDocumentName no RegisterItemDefinition no RegisterItemHierarchyLevel no RegisterItemIntroductionVersion no RegisterItemName no RegisterItemNotes no RegisterItemOriginatorName no RegisterItemStatusChangeDateTime no RegisterItemSymbol? no RegisterItemUL? no RegisterKind? no RegisterReleaseDateTime no RegisterStatusKind? no RegisterUserName no RegisterUserTime no RegisterVersion no RegistrantName no RelatedMaterialDescription no RelatedMaterialDescription no RelatedMaterialLocators? no RelativePositionInSequenceName no RelativePositionInSequenceOffset no RelativeScope no RelativeTrack no ReleasableCountryCode no ReleasableCountryCode no RenamedType? no ResourceID? no RestrictionsonUse no ReversePlay no ReversedByteOrder no Rights MXF RightsComment no RightsComment no RightsConditionDescription no RightsConditionDescription no RightsManagementAuthority no RightsManagementAuthority no RightsSets? no RightsStartDateTime no RightsStopDateTime no Rightsholder no Rightsholder no RoleName no RoleName no RoomNumber no RoomNumber no RoomOrSuiteName no RoomOrSuiteName no RootFormatVersion no RootMetaDictionary? no RootObjectDirectory? no RootPreface? no RoundedCaptureFilmFrameRate no RoundedTimecodeTimebase no RoundingLaw no RoundingMethodCode no RoyaltyIncomeInformation no RoyaltyPaymentInformation no Rsiz no SDKVersion no SICI? no SMPTE12MUserDateTime? no SMPTE309MUserDateTime? no SMPTE337MDataStreamNumber no SMPTEUL? no SalesContractNumber no Salutation no Salutation no SampleIndex? no SampleRate no SampledHeight no SampledWidth no SampledXOffset no SampledYOffset no SamplingHierarchyCode no SamplingStructureCode no ScanningDirection no SceneFramework MXF SceneNumber no SceneNumber no SceneSettingPeriodSets? no SceneShotSets? no ScramblingKeyKind no ScramblingKeyValue no Scripting MXF ScriptingKind no ScriptingKind no ScriptingLocators? no ScriptingSets? no ScriptingText no ScriptingText no SeasonEpisodeNumber no SeasonEpisodeTitle no SecondGivenName no SecondGivenName no SecondaryExtendedSpokenLanguageCode no SecondaryOriginalExtendedSpokenLanguageCode no SecondaryOriginalLanguageCode no SecondarySpokenLanguageCode no SecondaryTitle no SecondaryTitle no SectorSize no SecurityClassification no SecurityClassification no SecurityClassificationCaveats no SecurityClassificationCaveats no Selected? no SensorMode no SensorRollAngle no SensorSize no SensorType no SensorTypeCode no Sequence? no SequenceOffset no SequenceSet MXF SeriesNumber no SeriesNumber no SeriesinaSeriesGroupCount no SetElementType? no SettingCityName no SettingCityName no SettingCountryCode no SettingCountryName no SettingCountryName no SettingDateTime no SettingDescription no SettingDescription no SettingPeriod MXF SettingPeriodDescription no SettingPeriodDescription no SettingPostalCode no SettingPostalCode no SettingRegionCode no SettingRegionName no SettingRoomNumber no SettingRoomNumber no SettingStateOrProvinceOrCountyName no SettingStateOrProvinceOrCountyName no SettingStreetName no SettingStreetName no SettingStreetNumberOrBuildingName no SettingStreetNumberOrBuildingName no SettingTownName no SettingTownName no ShimName no ShootingCountryCode no ShootingRegionCode no ShootingRegionName no Shot MXF ShotComment no ShotComment no ShotCommentKind no ShotCommentKind no ShotCueWordsSet? no ShotDescription no ShotDescription no ShotDuration no ShotList no ShotLocationSets? no ShotParticipantRoleSets? no ShotPersonSets? no ShotStartPosition no ShotTrackIDs no SideNumber no Signal-to-NoiseRatio no SignalFormCode no SignalStandard no SignalStandard no SignatureTuneFlag no SimpleFlaggingCount no SingleSequenceFlag no Size no SlantRange no SlateInformation no SlateTitle no SliceCount no SliceNumber no SliceOffsetList? no Software-OnlySupportFlag no SourceClip? no SourceContainerFormat? no SourceImageCenterXCoordinate no SourceImageCenterYCoordinate no SourceIndex? no SourceKey? no SourceLength no SourceOrganization no SourceOrganization no SourcePackage MXF SourcePackageID? no SourceSpecies? no SourceTrackID no SourceTrackIDs no SourceValue? no SpeedChangeEffectFlag no SplicingMetadata? no StartTimeRelativeToReference no StartTimeRelativeToReference no StartTimecode no StartTimecodeRelativeToReference? no StateOrProvinceOrCountyName no StateOrProvinceOrCountyName no StaticTrack MXF StillFrame? no StorageDeviceKind no StorageKind no StorageKind no StorageKindCode no StorageMediaID no StorageMediaKind no StoredANCLineNumber no StoredF2Offset no StoredVBILineNumber no StratumKind no StreamData? no StreamElementType? no StreamID no StreamOffset no StreamPositionIndicator no StreamPositionIndicator no StreamPositionIndicator no StreamPositionIndicator no StreetName no StreetName no StreetNumber no StreetNumber no StringElementType? no StructuralComponent MXF Sub-descriptors? no SubDescriptor? no SubDescriptors? no SubjectAbsoluteHeading no SubjectAbsoluteSpeed no SubjectDistance no SubjectName no SubjectName no SubjectRelativeHeading no SubjectRelativePositionalAccuracy no SubjectRelativeSpeed no SubtitleDatafileFlag no SubtitlesPresent no SupplementaryName no SupplementaryName no SupplementaryOrganizationName no SupplementaryOrganizationName no SupplierAccountName no SupplierAccountName no SupplierAccountNumber no SupplierIdentificationKind no SupplierIdentificationValue no SupplyContractNumber no SupplyingDepartmentName no SupportOrAdministrationStatus no SupportOrAdministrationStatus no SupportOrganizationRole no SupportOrganizationRole no SystemNameOrNumber no TIFFSummary? no TaggedValueDefinitions? no TaggedValueParentProperties? no TakeNumber no TapeBatchNumber no TapeBatchNumber no TapeCapacity no TapeFormat? no TapeFormulation no TapeFormulation no TapeManufacturer no TapeManufacturer no TapePartitionCapacity no TapeShellKind no TapeShellKind no TapeStock no TapeStock no TargetAudience no TargetAudience no TargetClassOfStrongReference? no TargetClassOfWeakReference? no TargetSet? no TargetWidth no TechnicalValue no TelephoneNumber no TelephoneNumber no TeletextSubtitlesAvailable no TeletextSubtitlesFlag no TemporalOffset no TerminatingFillerData no TextLocator MXF TextlessBlackDuration no TextlessMaterial no TextualDescriptionKind no TextualDescriptionKind no Theme no Theme no ThemeMusicFlag no ThesaurusName no ThesaurusName no ThirdGivenName no ThirdGivenName no TimePeriodName no TimePeriodName no TimeSystemOffset no TimeUnitKind no TimebaseReferenceTrackID no TimecodeArray? no TimecodeComponent MXF TimecodeCreationDateTime? no TimecodeEndDateTime? no TimecodeEventEndDateTime? no TimecodeEventStartDateTime? no TimecodeKind no TimecodeLastModifyDate? no TimecodeModifyDate? no TimecodeSourceKind no TimecodeStartDateTime? no TimecodeStreamData? no TimecodeTimebase no TimecodeTimebase no TimecodeUserBitsFlag no TimepointValue? no TimingBiasCorrection no TimingBiasCorrectionDescription no TitleKind no TitleKind no Titles MXF TitlesSets? no ToleranceInterpolationMethod? no ToleranceMode? no ToleranceWindow? no ToolkitVersion no TotalCurrencyAmount no TotalEpisodeCount no TotalIncome no TotalLinesperFrame no TotalNumberInSequence no TotalPayment no TotalSamplesperLine no Track MXF TrackID no TrackName no TrackName no TrackNumber no TrackNumberBatch no Tracks? no TrafficID no TrailingLines no TranscriptReference no TranscriptReference no TransferFilmFrameRate no TransitionEffect? no TransmissionID no TransportStreamID no TripletSequenceNumber no TypeDefinitionElementValueList no TypeDefinitionExtendibleElementValues? no TypeDefinitions? no UCSEncoding no UPID? no UPN? no URL no URL no URL no URL no URN no UTCEndDateTime no UTCEventEndDateTime no UTCEventEndDateTime no UTCEventStartDateTime no UTCEventStartDateTime no UTCInstantDateTime no UTCInstantDateTime no UTCLastModifyDate no UTCLastModifyDate no UTCStartDateTime no UTCStartDateTime no UTCUserDateTime no UniformDataFlag no UnknownBWFChunks? no UpstreamAudioCompressionAlgorithm no UseDefaultValue no UserDataMode? no UserName no UserName no UserPosition no V10IndexTableSegment? no VBEEndOffset no VBIDataDescriptor MXF VBILineCount no VBIPayloadByteArray no VBIPayloadSampleCoding no VBIPayloadSampleCount no VBIWrappingType no VC-1AverageBitrate no VC-1BPictureCount no VC-1CodedContentType no VC-1IdenticalGOP no VC-1InitializationMetadata? no VC-1Level no VC-1MaximumBitrate no VC-1MaximumGOP no VC-1Profile no VC-1SingleSequence no Value? no VariableArrayElementType? no VersionNumber no VersionNumberString no VersionNumberString no VersionTitle no VersionTitle no VerticalActionSafePercentage no VerticalDatum no VerticalGraphicsSafePercentage no VerticalSub-sampling no VideoAndFilmFrameRelationship no VideoAverageBitrate no VideoClipDuration no VideoCodingSchemeID no VideoColorKind no VideoCompressionAlgorithm no VideoDeviceKind no VideoDeviceParameterName no VideoDeviceParameterSetting no VideoFixedBitrate no VideoIndexArray? no VideoLineMap no VideoNoiseReductionAlgorithm no VideoOrImageCompressionAlgorithm no VideoPayloadIdentifier no VideoPayloadIdentifier2002 no VideoTestParameter no VideoTestResult no VideoTestResult no VideoWatermarkKind no ViewportAspectRatio no ViewportHeight no ViewportImageCenterCCoordinate no ViewportImageCenterYCoordinate no ViewportWidth no VoiceTalentName no WAVESummary? no WaveAudioDescriptor MXF Weighting no WhiteReferenceLevel no Work-in-ProgressFlag no WorkingTitle no WorkingTitle no XMLDocumentText? no XMLDocumentText no XMLDocumentText no XMLDocumentText? no XOsiz no XTOsiz no XTsiz no Xsiz no YOsiz no YTOsiz no YTsiz no Ysiz no

MXF Header Tags

Index1 Tag Name Writable —— ——– ——– 0 MXFVersion no 24 FooterPosition no 32 HeaderSize no

DV Tags

The following tags are extracted from DV videos.

Tag Name Writable ——– ——– AspectRatio no AudioBitsPerSample no AudioChannels no AudioSampleRate no Colorimetry no DateTimeOriginal no Duration no FrameRate no ImageHeight no ImageWidth no TotalBitrate no VideoFormat no VideoScanType no

Flash Tags

The information below is extracted from SWF (Shockwave Flash) files. Tags with string ID’s represent information extracted from the file header.

Tag ID Tag Name Writable —— ——– ——– Compressed Compressed no Duration Duration no FlashVersion FlashVersion no FrameCount FrameCount no FrameRate FrameRate no ImageHeight ImageHeight no ImageWidth ImageWidth no 0x0045 FlashAttributes no 0x004d XMP XMP

Flash FLV Tags

Information is extracted from the following packets in FLV (Flash Video) files.

Tag ID Tag Name Writable —— ——– ——– 0x0008 Audio Flash Audio 0x0009 Video Flash Video 0x0012 Meta Flash Meta

Flash Audio Tags

Information extracted from the Flash Audio header.

Tag ID Tag Name Writable —— ——– ——– Bit0-3 AudioEncoding no Bit4-5 AudioSampleRate no Bit6 AudioBitsPerSample no Bit7 AudioChannels no

Flash Video Tags

Information extracted from the Flash Video header.

Tag ID Tag Name Writable —— ——– ——– Bit4-7 VideoEncoding no

Flash Meta Tags

Below are a few observed FLV Meta tags, but ExifTool will attempt to extract information from any tag found.

Tag ID Tag Name Writable —— ——– ——– audiocodecid AudioCodecID no audiodatarate AudioBitrate no audiodelay AudioDelay no audiosamplerate AudioSampleRate no audiosamplesize AudioSampleSize no audiosize AudioSize no bytelength ByteLength no canSeekToEnd CanSeekToEnd no canseekontime CanSeekOnTime no createdby CreatedBy no creationdate CreateDate no cuePoints CuePoint Flash CuePoint datasize DataSize no duration Duration no filesize FileSizeBytes no framerate FrameRate no hasAudio HasAudio no hasCuePoints HasCuePoints no hasKeyframes HasKeyFrames no hasMetadata HasMetadata no hasVideo HasVideo no height ImageHeight no httphostheader HTTPHostHeader no keyframesFilepositions KeyFramePositions no keyframesTimes KeyFramesTimes no lastkeyframetimestamp LastKeyFrameTime no lasttimestamp LastTimeStamp no liveXML XMP XMP metadatacreator MetadataCreator no metadatadate MetadataDate no pmsg Message no purl URL no sourcedata SourceData no starttime StartTime no stereo Stereo no totaldatarate TotalDataRate no totalduration TotalDuration no videocodecid VideoCodecID no videodatarate VideoBitrate no videosize VideoSize no width ImageWidth no

Flash CuePoint Tags

These tag names are added to the CuePoint name to generate complete tag names like “CuePoint0Name”.

Tag ID Tag Name Writable —— ——– ——– name Name no parameters Parameter Flash Parameter time Time no type Type no

Flash Parameter Tags

There are no pre-defined parameter tags, but ExifTool will extract any existing parameters, with tag names like “CuePoint0ParameterXxx”.

Tag ID Tag Name Writable —— ——– ——– [no tags known]

Real Tags

ExifTool recognizes three basic types of Real audio/video files: 1) RealMedia (RM, RV and RMVB), 2) RealAudio (RA), and 3) Real Metafile (RAM and RPM).

Real Media Tags

These Tag ID’s are Chunk ID’s used in RealMedia and RealVideo (RM, RV and RMVB) files.

Tag ID Tag Name Writable —— ——– ——– CONT CONT Real ContentDescr MDPR MDPR Real MediaProps PROP PROP Real Properties RJMD RJMD Real Metadata

Real ContentDescr Tags

Sequence Tag Name Writable ——– ——– ——– 0 TitleLen? no 1 Title no 2 AuthorLen? no 3 Author no 4 CopyrightLen? no 5 Copyright no 6 CommentLen? no 7 Comment no

Real MediaProps Tags

Sequence Tag Name Writable ——– ——– ——– 0 StreamNumber no 1 StreamMaxBitrate no 2 StreamAvgBitrate no 3 StreamMaxPacketSize no 4 StreamAvgPacketSize no 5 StreamStartTime no 6 StreamPreroll no 7 StreamDuration no 8 StreamNameLen? no 9 StreamName no 10 StreamMimeLen? no 11 StreamMimeType no 12 FileInfoLen? no 13 FileInfoLen2? no 14 FileInfoVersion no 15 PhysicalStreams? no 16 PhysicalStreamNumbers? no 17 DataOffsets? no 18 NumRules? no 19 PhysicalStreamNumberMap? no 20 NumProperties? no 21 FileInfoProperties Real FileInfo

Real FileInfo Tags

The following tags have been observed in the FileInfo properties, but any other existing information will also be extracted.

Tag ID Tag Name Writable —— ——– ——– Audiences Audiences no Audio Format AudioFormat no Content Rating ContentRating no Creation Date CreateDate no Description Description no File ID FileID no Generated By Software no Indexable Indexable no Keywords Keywords no Modification Date ModifyDate no Target Audiences TargetAudiences no Video Quality VideoQuality no audioMode AudioMode no videoMode VideoMode no

Real Properties Tags

Sequence Tag Name Writable ——– ——– ——– 0 MaxBitrate no 1 AvgBitrate no 2 MaxPacketSize no 3 AvgPacketSize no 4 NumPackets no 5 Duration no 6 Preroll no 7 IndexOffset? no 8 DataOffset? no 9 NumStreams no 10 Flags no

Real Metadata Tags

The tags below represent information which has been observed in the Real Metadata format, but ExifTool will extract any information it finds in this format. (As far as I can tell from the referenced documentation, string values should be plain text, but this is not the case for the only sample file I have been able to obtain containing this information. These tags could also be split into separate sub-directories, but this will wait until I have better documentation or a more complete set of samples.)

Tag ID Tag Name Writable —— ——– ——– Album/Name AlbumName no Track/Category TrackCategory no Track/Comments TrackComments no Track/Lyrics TrackLyrics no

Real Audio Tags

Tags in the following table reference information extracted from various versions of RealAudio (RA) files.

Tag ID Tag Name Writable —— ——– ——– .ra3 RA3 Real AudioV3 .ra4 RA4 Real AudioV4 .ra5 RA5 Real AudioV5

Real AudioV3 Tags

Sequence Tag Name Writable ——– ——– ——– 0 Channels no 1 Unknown? no 2 BytesPerMinute no 3 AudioBytes no 4 TitleLen? no 5 Title no 6 ArtistLen? no 7 Artist no 8 CopyrightLen? no 9 Copyright no 10 CommentLen? no 11 Comment no

Real AudioV4 Tags

Sequence Tag Name Writable ——– ——– ——– 0 FourCC1? no 1 AudioFileSize? no 2 Version2? no 3 HeaderSize? no 4 CodecFlavorID? no 5 CodedFrameSize? no 6 AudioBytes no 7 BytesPerMinute no 8 Unknown? no 9 SubPacketH? no 10 AudioFrameSize no 11 SubPacketSize? no 12 Unknown? no 13 SampleRate no 14 Unknown? no 15 BitsPerSample no 16 Channels no 17 FourCC2Len? no 18 FourCC2? no 19 FourCC3Len? no 20 FourCC3? no 21 Unknown? no 22 Unknown? no 23 TitleLen? no 24 Title no 25 ArtistLen? no 26 Artist no 27 CopyrightLen? no 28 Copyright no 29 CommentLen? no 30 Comment no

Real AudioV5 Tags

Sequence Tag Name Writable ——– ——– ——– 0 FourCC1? no 1 AudioFileSize? no 2 Version2? no 3 HeaderSize? no 4 CodecFlavorID? no 5 CodedFrameSize? no 6 AudioBytes no 7 BytesPerMinute no 8 Unknown? no 9 SubPacketH? no 10 FrameSize? no 11 SubPacketSize? no 12 SampleRate no 13 SampleRate2? no 14 BitsPerSample no 15 Channels no 16 Genr? no 17 FourCC3? no

Real Metafile Tags

Tags representing information extracted from Real Audio Metafile and RealMedia Plug-in Metafile (RAM and RPM) files.

Tag ID Tag Name Writable —— ——– ——– txt Text no url URL no

Red Tags

Tags extracted from Redcode R3D video files.

Tag ID Tag Name Writable —— ——– ——– RED1 Red1Header Red RED1 RED2 Red2Header Red RED2 0x1000 StartEdgeCode no 0x1001 StartTimecode no 0x1002 OtherDate1 no 0x1003 OtherDate2 no 0x1004 OtherDate3 no 0x1005 DateTimeOriginal no 0x1006 SerialNumber no 0x1019 CameraType no 0x101a ReelNumber no 0x101b Take no 0x1023 DateCreated no 0x1024 TimeCreated no 0x1025 FirmwareVersion no 0x1029 ReelTimecode no 0x102a StorageType no 0x1030 StorageFormatDate no 0x1031 StorageFormatTime no 0x1032 StorageSerialNumber no 0x1033 StorageModel no 0x1036 AspectRatio no 0x1042 Revision no 0x1056 OriginalFileName no 0x106e LensMake no 0x106f LensNumber no 0x1070 LensModel no 0x1071 Model no 0x107c CameraOperator no 0x1086 VideoFormat no 0x1096 Filter no 0x10a0 Brain no 0x10a1 Sensor no 0x200d ColorTemperature no 0x204b RGBCurves no 0x2066 OriginalFrameRate no 0x4037 CropArea no 0x403b ISO no 0x406a FNumber no 0x406b FocalLength no 0x606c FocusDistance no

Red RED1 Tags

Redcode version 1 header.

Index1 Tag Name Writable —— ——– ——– 7 RedcodeVersion no 54 ImageWidth no 58 ImageHeight no 62 FrameRate no 67 OriginalFileName no

Red RED2 Tags

Redcode version 2 header.

Index1 Tag Name Writable —— ——– ——– 7 RedcodeVersion no 76 ImageWidth no 80 ImageHeight no 86 FrameRate no

AIFF Tags

Tags extracted from Audio Interchange File Format (AIFF) files. See <http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/AIFF/AIFF.html> for the AIFF specification.

Tag ID Tag Name Writable —— ——– ——– (c) Copyright no ANNO Annotation no APPL ApplicationData no AUTH Author no COMM Common AIFF Common COMT Comment AIFF Comment FVER FormatVersion AIFF FormatVers ID3 ID3 ID3 NAME Name no

AIFF Common Tags

Index2 Tag Name Writable —— ——– ——– 0 NumChannels no 1 NumSampleFrames no 3 SampleSize no 4 SampleRate no 9 CompressionType no 11 CompressorName no

AIFF Comment Tags

Tag ID Tag Name Writable —— ——– ——– 0x0000 CommentTime no 0x0001 MarkerID no 0x0002 Comment no

AIFF FormatVers Tags

Index4 Tag Name Writable —— ——– ——– 0 FormatVersionTime no

ASF Tags

The ASF format is used by Windows WMA and WMV files, and DIVX videos. Tag ID’s aren’t listed because they are huge 128-bit GUID’s that would ruin the formatting of this table.

Tag Name Writable ——– ——– SimpleIndex no TimecodeIndex no Header ASF Header Data no XMP XMP Index no MediaIndex no

ASF Header Tags

Tag Name Writable ——– ——– Padding no ScriptCommand no ContentBranding ASF ContentBranding ContentEncryption no DigitalSignature no ExtendedContentEncryption no HeaderExtension ASF HeaderExtension ContentDescription ASF ContentDescr ErrorCorrection no StreamBitrateProps no CodecList ASF CodecList FileProperties ASF FileProperties StreamProperties ASF StreamProperties ExtendedContentDescr ASF ExtendedDescr BitrateMutualExclusion no Marker no

ASF ContentBranding Tags

Tag Name Writable ——– ——– BannerImageType no BannerImage no BannerImageURL no CopyrightURL no

ASF HeaderExtension Tags

Tag Name Writable ——– ——– ExtendedStreamProps no AdvancedContentEncryption no MetadataLibrary ASF ExtendedDescr TimecodeIndexParms no Compatibility no LanguageList no AdvancedMutualExcl no BandwidthSharing no Reserved1 no Metadata ASF ExtendedDescr GroupMutualExclusion no StreamPrioritization no IndexParameters no

ASF ExtendedDescr Tags

Tag Name Writable ——– ——– ASFLeakyBucketPairs no ASFPacketCount no ASFSecurityObjectsSize no AlbumArtist no AlbumCoverURL no AlbumTitle no AspectRatioX no AspectRatioY no AudioFileURL no AudioSourceURL no Author no AuthorURL no AverageLevel no BannerImageData no BannerImageType no BannerImageURL no BeatsPerMinute no Bitrate no Broadcast no BufferAverage no Can_Skip_Backward no Can_Skip_Forward no Category no Codec no Composer no Conductor no ContainerFormat no ContentDistributor no ContentGroupDescription no Copyright no CopyrightURL no CurrentBitrate no DRM no DRM_ContentID no DRM_DRMHeader no DRM_DRMHeader_ContentDistributor no DRM_DRMHeader_ContentID no DRM_DRMHeader_IndividualizedVersion no DRM_DRMHeader_KeyID no DRM_DRMHeader_LicenseAcqURL no DRM_DRMHeader_SubscriptionContentID no DRM_IndividualizedVersion no DRM_KeyID no DRM_LASignatureCert no DRM_LASignatureLicSrvCert no DRM_LASignaturePrivKey no DRM_LASignatureRootCert no DRM_LicenseAcqURL no DRM_V1LicenseAcqURL no DVDID no Description no Director no Duration no EncodedBy no EncodingSettings no EncodingTime no FileSize no Genre no GenreID no HasArbitraryDataStream no HasAttachedImages no HasAudio no HasFileTransferStream no HasImage no HasScript no HasVideo no ISRC no InitialKey no IsVBR no Is_Protected no Is_Trusted no Language no Lyrics no Lyrics_Synchronised no MCDI no MediaClassPrimaryID no MediaClassSecondaryID no MediaCredits no MediaIsDelay no MediaIsFinale no MediaIsLive no MediaIsPremiere no MediaIsRepeat no MediaIsSAP no MediaIsStereo no MediaIsSubtitled no MediaIsTape no MediaNetworkAffiliation no MediaOriginalBroadcastDateTime no MediaOriginalChannel no MediaStationCallSign no MediaStationName no ModifiedBy no Mood no NSC_Address no NSC_Description no NSC_Email no NSC_Name no NSC_Phone no NumberOfFrames no OptimalBitrate no OriginalAlbumTitle no OriginalArtist no OriginalFileName no OriginalLyricist no OriginalReleaseTime no OriginalReleaseYear no ParentalRating no ParentalRatingReason no PartOfSet no PeakBitrate no PeakValue no Period no Picture ASF Picture PlaylistDelay no Producer no PromotionURL no ProtectionType no Provider no ProviderCopyright no ProviderRating no ProviderStyle no Publisher no RadioStationName no RadioStationOwner no Rating no Seekable no SharedUserRating no Signature_Name no StreamTypeInfo no Stridable no Subtitle no SubtitleDescription no SubscriptionContentID no Text no Title no ToolName no ToolVersion no Track no TrackNumber no UniqueFileIdentifier no UserWebURL no VBRPeak no VideoClosedCaptioning no VideoFrameRate no VideoHeight no VideoWidth no WMADRCAverageReference no WMADRCAverageTarget no WMADRCPeakReference no WMADRCPeakTarget no WMCollectionGroupID no WMCollectionID no WMContentID no Writer no Year no

ASF Picture Tags

Tag Name Writable ——– ——– PictureType no PictureMIMEType no PictureDescription no Picture no

ASF ContentDescr Tags

Tag Name Writable ——– ——– Title no Author no Copyright no Description no Rating no

ASF CodecList Tags

Tag Name Writable ——– ——– AudioCodecDescription no AudioCodecName no OtherCodecDescription no OtherCodecName no VideoCodecDescription no VideoCodecName no

ASF FileProperties Tags

Index1 Tag Name Writable —— ——– ——– 0 FileID no 16 FileLength no 24 CreationDate no 32 DataPackets no 40 Duration no 48 SendDuration no 56 Preroll no 64 Flags no 68 MinPacketSize no 72 MaxPacketSize no 76 MaxBitrate no

ASF StreamProperties Tags

Tags with index 54 and greater are conditional based on the StreamType.

Index1 Tag Name Writable —— ——– ——– 0 StreamType no 16 ErrorCorrectionType no 32 TimeOffset no 48 StreamNumber no 54 AudioCodecID no ImageWidth no 56 AudioChannels no 58 AudioSampleRate no ImageHeight no

WTV Tags

Tags found in Windows recorded TV (WTV) videos.

Tag ID Tag Name Writable —— ——– ——– table.0.entries.legacy_attrib Metdata WTV Metadata

WTV Metadata Tags

ExifTool will extract any tag found, even if not in this table.

Tag Name Writable ——– ——– ATSCContent no ActualSoftPostPadding no ActualSoftPrePadding no Bitrate? no BrandingImageID no BrandingName no ContentProtected no ContentProtectedPercent no DTVContent no Duration no EncodeTime no EndTime no ExpirationDate? no ExpirationSpan? no Genre no HDContent no HardPostPadding no HardPrePadding no InBandRatingAttributes no InBandRatingLevel no InBandRatingSystem no KeepUntil no Language no MediaClassPrimaryID no MediaClassSecondaryID no MediaCredits no MediaIsDelay no MediaIsFinale no MediaIsLive no MediaIsMovie no MediaIsPremiere no MediaIsRepeat no MediaIsSAP no MediaIsSport no MediaIsStereo no MediaIsSubtitled no MediaIsTape no MediaNetworkAffiliation no MediaOriginalBroadcastDateTime no MediaOriginalChannel no MediaOriginalChannelSubNumber no MediaOriginalRunTime no MediaStationCallSign no MediaStationName no MediaThumbAspectRatioX no MediaThumbAspectRatioY no MediaThumbHeight no MediaThumbRatingAttributes no MediaThumbRatingLevel no MediaThumbRatingSystem no MediaThumbRet no MediaThumbStride no MediaThumbTimeStamp? no MediaThumbWidth no OriginalReleaseTime no OriginalSoftPostPadding no OriginalSoftPrePadding no ParentalRating no ParentalRatingReason no ProgramID no Provider no ProviderCopyright no ProviderRating no Quality no RequestID no ScheduleItemID no SeriesUID no ServiceID no Subtitle no SubtitleDescription no Title no VideoClosedCaptioning no Watched no

DICOM Tags

The DICOM format is based on the ACR-NEMA specification, but adds a file header and a number of new tags. ExifTool will extract information from either type of file. The Tag ID’s in the following table are the tag group and element numbers in hexadecimal, as given in the DICOM specification (see <http://medical.nema.org/>). The table below contains tags from the DICOM 2009 and earlier specifications plus some vendor-specific private tags.

Note that DICOM information may be saved in other file formats using the XMP DICOM Tags.

Tag ID Tag Name Writable —— ——– ——– 0002,0000 FileMetaInfoGroupLength no 0002,0001 FileMetaInfoVersion no 0002,0002 MediaStorageSOPClassUID no 0002,0003 MediaStorageSOPInstanceUID no 0002,0010 TransferSyntaxUID no 0002,0012 ImplementationClassUID no 0002,0013 ImplementationVersionName no 0002,0016 SourceApplicationEntityTitle no 0002,0100 PrivateInformationCreatorUID no 0002,0102 PrivateInformation no 0004,1130 FileSetID no 0004,1141 FileSetDescriptorFileID no 0004,1142 SpecificCharacterSetOfFile no 0004,1200 FirstDirectoryRecordOffset no 0004,1202 LastDirectoryRecordOffset no 0004,1212 FileSetConsistencyFlag no 0004,1220 DirectoryRecordSequence no 0004,1400 OffsetOfNextDirectoryRecord no 0004,1410 RecordInUseFlag no 0004,1420 LowerLevelDirectoryEntityOffset no 0004,1430 DirectoryRecordType no 0004,1432 PrivateRecordUID no 0004,1500 ReferencedFileID no 0004,1504 MRDRDirectoryRecordOffset no 0004,1510 ReferencedSOPClassUIDInFile no 0004,1511 ReferencedSOPInstanceUIDInFile no 0004,1512 ReferencedTransferSyntaxUIDInFile no 0004,151A ReferencedRelatedSOPClassUIDInFile no 0004,1600 NumberOfReferences no 0008,0000 IdentifyingGroupLength no 0008,0001 LengthToEnd no 0008,0005 SpecificCharacterSet no 0008,0006 LanguageCodeSequence no 0008,0008 ImageType no 0008,0010 RecognitionCode no 0008,0012 InstanceCreationDate no 0008,0013 InstanceCreationTime no 0008,0014 InstanceCreatorUID no 0008,0016 SOPClassUID no 0008,0018 SOPInstanceUID no 0008,001A RelatedGeneralSOPClassUID no 0008,001B OriginalSpecializedSOPClassUID no 0008,0020 StudyDate no 0008,0021 SeriesDate no 0008,0022 AcquisitionDate no 0008,0023 ContentDate no 0008,0024 OverlayDate no 0008,0025 CurveDate no 0008,002A AcquisitionDateTime no 0008,0030 StudyTime no 0008,0031 SeriesTime no 0008,0032 AcquisitionTime no 0008,0033 ContentTime no 0008,0034 OverlayTime no 0008,0035 CurveTime no 0008,0040 DataSetType no 0008,0041 DataSetSubtype no 0008,0042 NuclearMedicineSeriesType no 0008,0050 AccessionNumber no 0008,0052 QueryRetrieveLevel no 0008,0054 RetrieveAETitle no 0008,0056 InstanceAvailability no 0008,0058 FailedSOPInstanceUIDList no 0008,0060 Modality no 0008,0061 ModalitiesInStudy no 0008,0062 SOPClassesInStudy no 0008,0064 ConversionType no 0008,0068 PresentationIntentType no 0008,0070 Manufacturer no 0008,0080 InstitutionName no 0008,0081 InstitutionAddress no 0008,0082 InstitutionCodeSequence no 0008,0090 ReferringPhysicianName no 0008,0092 ReferringPhysicianAddress no 0008,0094 ReferringPhysicianTelephoneNumber no 0008,0096 ReferringPhysicianIDSequence no 0008,0100 CodeValue no 0008,0102 CodingSchemeDesignator no 0008,0103 CodingSchemeVersion no 0008,0104 CodeMeaning no 0008,0105 MappingResource no 0008,0106 ContextGroupVersion no 0008,0107 ContextGroupLocalVersion no 0008,010B ContextGroupExtensionFlag no 0008,010C CodingSchemeUID no 0008,010D ContextGroupExtensionCreatorUID no 0008,010F ContextIdentifier no 0008,0110 CodingSchemeIDSequence no 0008,0112 CodingSchemeRegistry no 0008,0114 CodingSchemeExternalID no 0008,0115 CodingSchemeName no 0008,0116 ResponsibleOrganization no 0008,0117 ContextUID no 0008,0201 TimezoneOffsetFromUTC no 0008,1000 NetworkID no 0008,1010 StationName no 0008,1030 StudyDescription no 0008,1032 ProcedureCodeSequence no 0008,103E SeriesDescription no 0008,1040 InstitutionalDepartmentName no 0008,1048 PhysiciansOfRecord no 0008,1049 PhysiciansOfRecordIDSequence no 0008,1050 PerformingPhysicianName no 0008,1052 PerformingPhysicianIDSequence no 0008,1060 NameOfPhysicianReadingStudy no 0008,1062 PhysicianReadingStudyIDSequence no 0008,1070 OperatorsName no 0008,1072 OperatorIDSequence no 0008,1080 AdmittingDiagnosesDescription no 0008,1084 AdmittingDiagnosesCodeSequence no 0008,1090 ManufacturersModelName no 0008,1100 ReferencedResultsSequence no 0008,1110 ReferencedStudySequence no 0008,1111 ReferencedProcedureStepSequence no 0008,1115 ReferencedSeriesSequence no 0008,1120 ReferencedPatientSequence no 0008,1125 ReferencedVisitSequence no 0008,1130 ReferencedOverlaySequence no 0008,113A ReferencedWaveformSequence no 0008,1140 ReferencedImageSequence no 0008,1145 ReferencedCurveSequence no 0008,114A ReferencedInstanceSequence no 0008,1150 ReferencedSOPClassUID no 0008,1155 ReferencedSOPInstanceUID no 0008,115A SOPClassesSupported no 0008,1160 ReferencedFrameNumber no 0008,1161 SimpleFrameList no 0008,1162 CalculatedFrameList no 0008,1163 TimeRange no 0008,1164 FrameExtractionSequence no 0008,1195 TransactionUID no 0008,1197 FailureReason no 0008,1198 FailedSOPSequence no 0008,1199 ReferencedSOPSequence no 0008,1200 OtherReferencedStudiesSequence no 0008,1250 RelatedSeriesSequence no 0008,2110 LossyImageCompression no 0008,2111 DerivationDescription no 0008,2112 SourceImageSequence no 0008,2120 StageName no 0008,2122 StageNumber no 0008,2124 NumberOfStages no 0008,2127 ViewName no 0008,2128 ViewNumber no 0008,2129 NumberOfEventTimers no 0008,212A NumberOfViewsInStage no 0008,2130 EventElapsedTimes no 0008,2132 EventTimerNames no 0008,2133 EventTimerSequence no 0008,2134 EventTimeOffset no 0008,2135 EventCodeSequence no 0008,2142 StartTrim no 0008,2143 StopTrim no 0008,2144 RecommendedDisplayFrameRate no 0008,2200 TransducerPosition no 0008,2204 TransducerOrientation no 0008,2208 AnatomicStructure no 0008,2218 AnatomicRegionSequence no 0008,2220 AnatomicRegionModifierSequence no 0008,2228 PrimaryAnatomicStructureSequence no 0008,2229 AnatomicStructureOrRegionSequence no 0008,2230 AnatomicStructureModifierSequence no 0008,2240 TransducerPositionSequence no 0008,2242 TransducerPositionModifierSequence no 0008,2244 TransducerOrientationSequence no 0008,2246 TransducerOrientationModifierSeq no 0008,2253 AnatomicEntrancePortalCodeSeqTrial no 0008,2255 AnatomicApproachDirCodeSeqTrial no 0008,2256 AnatomicPerspectiveDescrTrial no 0008,2257 AnatomicPerspectiveCodeSeqTrial no 0008,3001 AlternateRepresentationSequence no 0008,3010 IrradiationEventUID no 0008,4000 IdentifyingComments no 0008,9007 FrameType no 0008,9092 ReferencedImageEvidenceSequence no 0008,9121 ReferencedRawDataSequence no 0008,9123 CreatorVersionUID no 0008,9124 DerivationImageSequence no 0008,9154 SourceImageEvidenceSequence no 0008,9205 PixelPresentation no 0008,9206 VolumetricProperties no 0008,9207 VolumeBasedCalculationTechnique no 0008,9208 ComplexImageComponent no 0008,9209 AcquisitionContrast no 0008,9215 DerivationCodeSequence no 0008,9237 GrayscalePresentationStateSequence no 0008,9410 ReferencedOtherPlaneSequence no 0008,9458 FrameDisplaySequence no 0008,9459 RecommendedDisplayFrameRateInFloat no 0008,9460 SkipFrameRangeFlag no 0009,1001 FullFidelity no 0009,1002 SuiteID no 0009,1004 ProductID no 0009,1027 ImageActualDate no 0009,1030 ServiceID no 0009,1031 MobileLocationNumber no 0009,10E3 EquipmentUID no 0009,10E6 GenesisVersionNow no 0009,10E7 ExamRecordChecksum no 0009,10E9 ActualSeriesDataTimeStamp no 0010,0000 PatientGroupLength no 0010,0010 PatientName no 0010,0020 PatientID no 0010,0021 IssuerOfPatientID no 0010,0022 TypeOfPatientID no 0010,0030 PatientBirthDate no 0010,0032 PatientBirthTime no 0010,0040 PatientSex no 0010,0050 PatientInsurancePlanCodeSequence no 0010,0101 PatientPrimaryLanguageCodeSeq no 0010,0102 PatientPrimaryLanguageCodeModSeq no 0010,1000 OtherPatientIDs no 0010,1001 OtherPatientNames no 0010,1002 OtherPatientIDsSequence no 0010,1005 PatientBirthName no 0010,1010 PatientAge no 0010,1020 PatientSize no 0010,1030 PatientWeight no 0010,1040 PatientAddress no 0010,1050 InsurancePlanIdentification no 0010,1060 PatientMotherBirthName no 0010,1080 MilitaryRank no 0010,1081 BranchOfService no 0010,1090 MedicalRecordLocator no 0010,2000 MedicalAlerts no 0010,2110 Allergies no 0010,2150 CountryOfResidence no 0010,2152 RegionOfResidence no 0010,2154 PatientTelephoneNumbers no 0010,2160 EthnicGroup no 0010,2180 Occupation no 0010,21A0 SmokingStatus no 0010,21B0 AdditionalPatientHistory no 0010,21C0 PregnancyStatus no 0010,21D0 LastMenstrualDate no 0010,21F0 PatientReligiousPreference no 0010,2201 PatientSpeciesDescription no 0010,2202 PatientSpeciesCodeSequence no 0010,2203 PatientSexNeutered no 0010,2210 AnatomicalOrientationType no 0010,2292 PatientBreedDescription no 0010,2293 PatientBreedCodeSequence no 0010,2294 BreedRegistrationSequence no 0010,2295 BreedRegistrationNumber no 0010,2296 BreedRegistryCodeSequence no 0010,2297 ResponsiblePerson no 0010,2298 ResponsiblePersonRole no 0010,2299 ResponsibleOrganization no 0010,4000 PatientComments no 0010,9431 ExaminedBodyThickness no 0011,1010 PatientStatus no 0012,0010 ClinicalTrialSponsorName no 0012,0020 ClinicalTrialProtocolID no 0012,0021 ClinicalTrialProtocolName no 0012,0030 ClinicalTrialSiteID no 0012,0031 ClinicalTrialSiteName no 0012,0040 ClinicalTrialSubjectID no 0012,0042 ClinicalTrialSubjectReadingID no 0012,0050 ClinicalTrialTimePointID no 0012,0051 ClinicalTrialTimePointDescription no 0012,0060 ClinicalTrialCoordinatingCenter no 0012,0062 PatientIdentityRemoved no 0012,0063 DeidentificationMethod no 0012,0064 DeidentificationMethodCodeSequence no 0012,0071 ClinicalTrialSeriesID no 0012,0072 ClinicalTrialSeriesDescription no 0012,0084 DistributionType no 0012,0085 ConsentForDistributionFlag no 0018,0000 AcquisitionGroupLength no 0018,0010 ContrastBolusAgent no 0018,0012 ContrastBolusAgentSequence no 0018,0014 ContrastBolusAdministrationRoute no 0018,0015 BodyPartExamined no 0018,0020 ScanningSequence no 0018,0021 SequenceVariant no 0018,0022 ScanOptions no 0018,0023 MRAcquisitionType no 0018,0024 SequenceName no 0018,0025 AngioFlag no 0018,0026 InterventionDrugInformationSeq no 0018,0027 InterventionDrugStopTime no 0018,0028 InterventionDrugDose no 0018,0029 InterventionDrugSequence no 0018,002A AdditionalDrugSequence no 0018,0030 Radionuclide no 0018,0031 Radiopharmaceutical no 0018,0032 EnergyWindowCenterline no 0018,0033 EnergyWindowTotalWidth no 0018,0034 InterventionDrugName no 0018,0035 InterventionDrugStartTime no 0018,0036 InterventionSequence no 0018,0037 TherapyType no 0018,0038 InterventionStatus no 0018,0039 TherapyDescription no 0018,003A InterventionDescription no 0018,0040 CineRate no 0018,0042 InitialCineRunState no 0018,0050 SliceThickness no 0018,0060 KVP no 0018,0070 CountsAccumulated no 0018,0071 AcquisitionTerminationCondition no 0018,0072 EffectiveDuration no 0018,0073 AcquisitionStartCondition no 0018,0074 AcquisitionStartConditionData no 0018,0075 AcquisitionEndConditionData no 0018,0080 RepetitionTime no 0018,0081 EchoTime no 0018,0082 InversionTime no 0018,0083 NumberOfAverages no 0018,0084 ImagingFrequency no 0018,0085 ImagedNucleus no 0018,0086 EchoNumber no 0018,0087 MagneticFieldStrength no 0018,0088 SpacingBetweenSlices no 0018,0089 NumberOfPhaseEncodingSteps no 0018,0090 DataCollectionDiameter no 0018,0091 EchoTrainLength no 0018,0093 PercentSampling no 0018,0094 PercentPhaseFieldOfView no 0018,0095 PixelBandwidth no 0018,1000 DeviceSerialNumber no 0018,1002 DeviceUID no 0018,1003 DeviceID no 0018,1004 PlateID no 0018,1005 GeneratorID no 0018,1006 GridID no 0018,1007 CassetteID no 0018,1008 GantryID no 0018,1010 SecondaryCaptureDeviceID no 0018,1011 HardcopyCreationDeviceID no 0018,1012 DateOfSecondaryCapture no 0018,1014 TimeOfSecondaryCapture no 0018,1016 SecondaryCaptureDeviceManufacturer no 0018,1017 HardcopyDeviceManufacturer no 0018,1018 SecondaryCaptureDeviceModelName no 0018,1019 SecondaryCaptureDeviceSoftwareVers no 0018,101A HardcopyDeviceSoftwareVersion no 0018,101B HardcopyDeviceModelName no 0018,1020 SoftwareVersion no 0018,1022 VideoImageFormatAcquired no 0018,1023 DigitalImageFormatAcquired no 0018,1030 ProtocolName no 0018,1040 ContrastBolusRoute no 0018,1041 ContrastBolusVolume no 0018,1042 ContrastBolusStartTime no 0018,1043 ContrastBolusStopTime no 0018,1044 ContrastBolusTotalDose no 0018,1045 SyringeCounts no 0018,1046 ContrastFlowRate no 0018,1047 ContrastFlowDuration no 0018,1048 ContrastBolusIngredient no 0018,1049 ContrastBolusConcentration no 0018,1050 SpatialResolution no 0018,1060 TriggerTime no 0018,1061 TriggerSourceOrType no 0018,1062 NominalInterval no 0018,1063 FrameTime no 0018,1064 CardiacFramingType no 0018,1065 FrameTimeVector no 0018,1066 FrameDelay no 0018,1067 ImageTriggerDelay no 0018,1068 MultiplexGroupTimeOffset no 0018,1069 TriggerTimeOffset no 0018,106A SynchronizationTrigger no 0018,106C SynchronizationChannel no 0018,106E TriggerSamplePosition no 0018,1070 RadiopharmaceuticalRoute no 0018,1071 RadiopharmaceuticalVolume no 0018,1072 RadiopharmaceuticalStartTime no 0018,1073 RadiopharmaceuticalStopTime no 0018,1074 RadionuclideTotalDose no 0018,1075 RadionuclideHalfLife no 0018,1076 RadionuclidePositronFraction no 0018,1077 RadiopharmaceuticalSpecActivity no 0018,1078 RadiopharmaceuticalStartDateTime no 0018,1079 RadiopharmaceuticalStopDateTime no 0018,1080 BeatRejectionFlag no 0018,1081 LowRRValue no 0018,1082 HighRRValue no 0018,1083 IntervalsAcquired no 0018,1084 IntervalsRejected no 0018,1085 PVCRejection no 0018,1086 SkipBeats no 0018,1088 HeartRate no 0018,1090 CardiacNumberOfImages no 0018,1094 TriggerWindow no 0018,1100 ReconstructionDiameter no 0018,1110 DistanceSourceToDetector no 0018,1111 DistanceSourceToPatient no 0018,1114 EstimatedRadiographicMagnification no 0018,1120 GantryDetectorTilt no 0018,1121 GantryDetectorSlew no 0018,1130 TableHeight no 0018,1131 TableTraverse no 0018,1134 TableMotion no 0018,1135 TableVerticalIncrement no 0018,1136 TableLateralIncrement no 0018,1137 TableLongitudinalIncrement no 0018,1138 TableAngle no 0018,113A TableType no 0018,1140 RotationDirection no 0018,1141 AngularPosition no 0018,1142 RadialPosition no 0018,1143 ScanArc no 0018,1144 AngularStep no 0018,1145 CenterOfRotationOffset no 0018,1146 RotationOffset no 0018,1147 FieldOfViewShape no 0018,1149 FieldOfViewDimensions no 0018,1150 ExposureTime no 0018,1151 XRayTubeCurrent no 0018,1152 Exposure no 0018,1153 ExposureInMicroAmpSec no 0018,1154 AveragePulseWidth no 0018,1155 RadiationSetting no 0018,1156 RectificationType no 0018,115A RadiationMode no 0018,115E ImageAreaDoseProduct no 0018,1160 FilterType no 0018,1161 TypeOfFilters no 0018,1162 IntensifierSize no 0018,1164 ImagerPixelSpacing no 0018,1166 Grid no 0018,1170 GeneratorPower no 0018,1180 CollimatorGridName no 0018,1181 CollimatorType no 0018,1182 FocalDistance no 0018,1183 XFocusCenter no 0018,1184 YFocusCenter no 0018,1190 FocalSpots no 0018,1191 AnodeTargetMaterial no 0018,11A0 BodyPartThickness no 0018,11A2 CompressionForce no 0018,1200 DateOfLastCalibration no 0018,1201 TimeOfLastCalibration no 0018,1210 ConvolutionKernel no 0018,1240 UpperLowerPixelValues no 0018,1242 ActualFrameDuration no 0018,1243 CountRate no 0018,1244 PreferredPlaybackSequencing no 0018,1250 ReceiveCoilName no 0018,1251 TransmitCoilName no 0018,1260 PlateType no 0018,1261 PhosphorType no 0018,1300 ScanVelocity no 0018,1301 WholeBodyTechnique no 0018,1302 ScanLength no 0018,1310 AcquisitionMatrix no 0018,1312 InPlanePhaseEncodingDirection no 0018,1314 FlipAngle no 0018,1315 VariableFlipAngleFlag no 0018,1316 SAR no 0018,1318 DB-Dt no 0018,1400 AcquisitionDeviceProcessingDescr no 0018,1401 AcquisitionDeviceProcessingCode no 0018,1402 CassetteOrientation no 0018,1403 CassetteSize no 0018,1404 ExposuresOnPlate no 0018,1405 RelativeXRayExposure no 0018,1450 ColumnAngulation no 0018,1460 TomoLayerHeight no 0018,1470 TomoAngle no 0018,1480 TomoTime no 0018,1490 TomoType no 0018,1491 TomoClass no 0018,1495 NumberOfTomosynthesisSourceImages no 0018,1500 PositionerMotion no 0018,1508 PositionerType no 0018,1510 PositionerPrimaryAngle no 0018,1511 PositionerSecondaryAngle no 0018,1520 PositionerPrimaryAngleIncrement no 0018,1521 PositionerSecondaryAngleIncrement no 0018,1530 DetectorPrimaryAngle no 0018,1531 DetectorSecondaryAngle no 0018,1600 ShutterShape no 0018,1602 ShutterLeftVerticalEdge no 0018,1604 ShutterRightVerticalEdge no 0018,1606 ShutterUpperHorizontalEdge no 0018,1608 ShutterLowerHorizontalEdge no 0018,1610 CenterOfCircularShutter no 0018,1612 RadiusOfCircularShutter no 0018,1620 VerticesOfPolygonalShutter no 0018,1622 ShutterPresentationValue no 0018,1623 ShutterOverlayGroup no 0018,1624 ShutterPresentationColorCIELabVal no 0018,1700 CollimatorShape no 0018,1702 CollimatorLeftVerticalEdge no 0018,1704 CollimatorRightVerticalEdge no 0018,1706 CollimatorUpperHorizontalEdge no 0018,1708 CollimatorLowerHorizontalEdge no 0018,1710 CenterOfCircularCollimator no 0018,1712 RadiusOfCircularCollimator no 0018,1720 VerticesOfPolygonalCollimator no 0018,1800 AcquisitionTimeSynchronized no 0018,1801 TimeSource no 0018,1802 TimeDistributionProtocol no 0018,1803 NTPSourceAddress no 0018,2001 PageNumberVector no 0018,2002 FrameLabelVector no 0018,2003 FramePrimaryAngleVector no 0018,2004 FrameSecondaryAngleVector no 0018,2005 SliceLocationVector no 0018,2006 DisplayWindowLabelVector no 0018,2010 NominalScannedPixelSpacing no 0018,2020 DigitizingDeviceTransportDirection no 0018,2030 RotationOfScannedFilm no 0018,3100 IVUSAcquisition no 0018,3101 IVUSPullbackRate no 0018,3102 IVUSGatedRate no 0018,3103 IVUSPullbackStartFrameNumber no 0018,3104 IVUSPullbackStopFrameNumber no 0018,3105 LesionNumber no 0018,4000 AcquisitionComments no 0018,5000 OutputPower no 0018,5010 TransducerData no 0018,5012 FocusDepth no 0018,5020 ProcessingFunction no 0018,5021 PostprocessingFunction no 0018,5022 MechanicalIndex no 0018,5024 BoneThermalIndex no 0018,5026 CranialThermalIndex no 0018,5027 SoftTissueThermalIndex no 0018,5028 SoftTissueFocusThermalIndex no 0018,5029 SoftTissueSurfaceThermalIndex no 0018,5030 DynamicRange no 0018,5040 TotalGain no 0018,5050 DepthOfScanField no 0018,5100 PatientPosition no 0018,5101 ViewPosition no 0018,5104 ProjectionEponymousNameCodeSeq no 0018,5210 ImageTransformationMatrix no 0018,5212 ImageTranslationVector no 0018,6000 Sensitivity no 0018,6011 SequenceOfUltrasoundRegions no 0018,6012 RegionSpatialFormat no 0018,6014 RegionDataType no 0018,6016 RegionFlags no 0018,6018 RegionLocationMinX0 no 0018,601A RegionLocationMinY0 no 0018,601C RegionLocationMaxX1 no 0018,601E RegionLocationMaxY1 no 0018,6020 ReferencePixelX0 no 0018,6022 ReferencePixelY0 no 0018,6024 PhysicalUnitsXDirection no 0018,6026 PhysicalUnitsYDirection no 0018,6028 ReferencePixelPhysicalValueX no 0018,602A ReferencePixelPhysicalValueY no 0018,602C PhysicalDeltaX no 0018,602E PhysicalDeltaY no 0018,6030 TransducerFrequency no 0018,6031 TransducerType no 0018,6032 PulseRepetitionFrequency no 0018,6034 DopplerCorrectionAngle no 0018,6036 SteeringAngle no 0018,6038 DopplerSampleVolumeXPosRetired no 0018,6039 DopplerSampleVolumeXPosition no 0018,603A DopplerSampleVolumeYPosRetired no 0018,603B DopplerSampleVolumeYPosition no 0018,603C TMLinePositionX0Retired no 0018,603D TMLinePositionX0 no 0018,603E TMLinePositionY0Retired no 0018,603F TMLinePositionY0 no 0018,6040 TMLinePositionX1Retired no 0018,6041 TMLinePositionX1 no 0018,6042 TMLinePositionY1Retired no 0018,6043 TMLinePositionY1 no 0018,6044 PixelComponentOrganization no 0018,6046 PixelComponentMask no 0018,6048 PixelComponentRangeStart no 0018,604A PixelComponentRangeStop no 0018,604C PixelComponentPhysicalUnits no 0018,604E PixelComponentDataType no 0018,6050 NumberOfTableBreakPoints no 0018,6052 TableOfXBreakPoints no 0018,6054 TableOfYBreakPoints no 0018,6056 NumberOfTableEntries no 0018,6058 TableOfPixelValues no 0018,605A TableOfParameterValues no 0018,6060 RWaveTimeVector no 0018,7000 DetectorConditionsNominalFlag no 0018,7001 DetectorTemperature no 0018,7004 DetectorType no 0018,7005 DetectorConfiguration no 0018,7006 DetectorDescription no 0018,7008 DetectorMode no 0018,700A DetectorID no 0018,700C DateOfLastDetectorCalibration no 0018,700E TimeOfLastDetectorCalibration no 0018,7010 DetectorExposuresSinceCalibration no 0018,7011 DetectorExposuresSinceManufactured no 0018,7012 DetectorTimeSinceLastExposure no 0018,7014 DetectorActiveTime no 0018,7016 DetectorActiveOffsetFromExposure no 0018,701A DetectorBinning no 0018,7020 DetectorElementPhysicalSize no 0018,7022 DetectorElementSpacing no 0018,7024 DetectorActiveShape no 0018,7026 DetectorActiveDimensions no 0018,7028 DetectorActiveOrigin no 0018,702A DetectorManufacturerName no 0018,702B DetectorManufacturersModelName no 0018,7030 FieldOfViewOrigin no 0018,7032 FieldOfViewRotation no 0018,7034 FieldOfViewHorizontalFlip no 0018,7040 GridAbsorbingMaterial no 0018,7041 GridSpacingMaterial no 0018,7042 GridThickness no 0018,7044 GridPitch no 0018,7046 GridAspectRatio no 0018,7048 GridPeriod no 0018,704C GridFocalDistance no 0018,7050 FilterMaterial no 0018,7052 FilterThicknessMinimum no 0018,7054 FilterThicknessMaximum no 0018,7060 ExposureControlMode no 0018,7062 ExposureControlModeDescription no 0018,7064 ExposureStatus no 0018,7065 PhototimerSetting no 0018,8150 ExposureTimeInMicroSec no 0018,8151 XRayTubeCurrentInMicroAmps no 0018,9004 ContentQualification no 0018,9005 PulseSequenceName no 0018,9006 MRImagingModifierSequence no 0018,9008 EchoPulseSequence no 0018,9009 InversionRecovery no 0018,9010 FlowCompensation no 0018,9011 MultipleSpinEcho no 0018,9012 MultiPlanarExcitation no 0018,9014 PhaseContrast no 0018,9015 TimeOfFlightContrast no 0018,9016 Spoiling no 0018,9017 SteadyStatePulseSequence no 0018,9018 EchoPlanarPulseSequence no 0018,9019 TagAngleFirstAxis no 0018,9020 MagnetizationTransfer no 0018,9021 T2Preparation no 0018,9022 BloodSignalNulling no 0018,9024 SaturationRecovery no 0018,9025 SpectrallySelectedSuppression no 0018,9026 SpectrallySelectedExcitation no 0018,9027 SpatialPresaturation no 0018,9028 Tagging no 0018,9029 OversamplingPhase no 0018,9030 TagSpacingFirstDimension no 0018,9032 GeometryOfKSpaceTraversal no 0018,9033 SegmentedKSpaceTraversal no 0018,9034 RectilinearPhaseEncodeReordering no 0018,9035 TagThickness no 0018,9036 PartialFourierDirection no 0018,9037 CardiacSynchronizationTechnique no 0018,9041 ReceiveCoilManufacturerName no 0018,9042 MRReceiveCoilSequence no 0018,9043 ReceiveCoilType no 0018,9044 QuadratureReceiveCoil no 0018,9045 MultiCoilDefinitionSequence no 0018,9046 MultiCoilConfiguration no 0018,9047 MultiCoilElementName no 0018,9048 MultiCoilElementUsed no 0018,9049 MRTransmitCoilSequence no 0018,9050 TransmitCoilManufacturerName no 0018,9051 TransmitCoilType no 0018,9052 SpectralWidth no 0018,9053 ChemicalShiftReference no 0018,9054 VolumeLocalizationTechnique no 0018,9058 MRAcquisitionFrequencyEncodeSteps no 0018,9059 Decoupling no 0018,9060 DecoupledNucleus no 0018,9061 DecouplingFrequency no 0018,9062 DecouplingMethod no 0018,9063 DecouplingChemicalShiftReference no 0018,9064 KSpaceFiltering no 0018,9065 TimeDomainFiltering no 0018,9066 NumberOfZeroFills no 0018,9067 BaselineCorrection no 0018,9069 ParallelReductionFactorInPlane no 0018,9070 CardiacRRIntervalSpecified no 0018,9073 AcquisitionDuration no 0018,9074 FrameAcquisitionDateTime no 0018,9075 DiffusionDirectionality no 0018,9076 DiffusionGradientDirectionSequence no 0018,9077 ParallelAcquisition no 0018,9078 ParallelAcquisitionTechnique no 0018,9079 InversionTimes no 0018,9080 MetaboliteMapDescription no 0018,9081 PartialFourier no 0018,9082 EffectiveEchoTime no 0018,9083 MetaboliteMapCodeSequence no 0018,9084 ChemicalShiftSequence no 0018,9085 CardiacSignalSource no 0018,9087 DiffusionBValue no 0018,9089 DiffusionGradientOrientation no 0018,9090 VelocityEncodingDirection no 0018,9091 VelocityEncodingMinimumValue no 0018,9093 NumberOfKSpaceTrajectories no 0018,9094 CoverageOfKSpace no 0018,9095 SpectroscopyAcquisitionPhaseRows no 0018,9096 ParallelReductFactorInPlaneRetired no 0018,9098 TransmitterFrequency no 0018,9100 ResonantNucleus no 0018,9101 FrequencyCorrection no 0018,9103 MRSpectroscopyFOV-GeometrySequence no 0018,9104 SlabThickness no 0018,9105 SlabOrientation no 0018,9106 MidSlabPosition no 0018,9107 MRSpatialSaturationSequence no 0018,9112 MRTimingAndRelatedParametersSeq no 0018,9114 MREchoSequence no 0018,9115 MRModifierSequence no 0018,9117 MRDiffusionSequence no 0018,9118 CardiacTriggerSequence no 0018,9119 MRAveragesSequence no 0018,9125 MRFOV-GeometrySequence no 0018,9126 VolumeLocalizationSequence no 0018,9127 SpectroscopyAcquisitionDataColumns no 0018,9147 DiffusionAnisotropyType no 0018,9151 FrameReferenceDateTime no 0018,9152 MRMetaboliteMapSequence no 0018,9155 ParallelReductionFactorOutOfPlane no 0018,9159 SpectroscopyOutOfPlanePhaseSteps no 0018,9166 BulkMotionStatus no 0018,9168 ParallelReductionFactSecondInPlane no 0018,9169 CardiacBeatRejectionTechnique no 0018,9170 RespiratoryMotionCompTechnique no 0018,9171 RespiratorySignalSource no 0018,9172 BulkMotionCompensationTechnique no 0018,9173 BulkMotionSignalSource no 0018,9174 ApplicableSafetyStandardAgency no 0018,9175 ApplicableSafetyStandardDescr no 0018,9176 OperatingModeSequence no 0018,9177 OperatingModeType no 0018,9178 OperatingMode no 0018,9179 SpecificAbsorptionRateDefinition no 0018,9180 GradientOutputType no 0018,9181 SpecificAbsorptionRateValue no 0018,9182 GradientOutput no 0018,9183 FlowCompensationDirection no 0018,9184 TaggingDelay no 0018,9185 RespiratoryMotionCompTechDescr no 0018,9186 RespiratorySignalSourceID no 0018,9195 ChemicalShiftsMinIntegrateLimitHz no 0018,9196 ChemicalShiftsMaxIntegrateLimitHz no 0018,9197 MRVelocityEncodingSequence no 0018,9198 FirstOrderPhaseCorrection no 0018,9199 WaterReferencedPhaseCorrection no 0018,9200 MRSpectroscopyAcquisitionType no 0018,9214 RespiratoryCyclePosition no 0018,9217 VelocityEncodingMaximumValue no 0018,9218 TagSpacingSecondDimension no 0018,9219 TagAngleSecondAxis no 0018,9220 FrameAcquisitionDuration no 0018,9226 MRImageFrameTypeSequence no 0018,9227 MRSpectroscopyFrameTypeSequence no 0018,9231 MRAcqPhaseEncodingStepsInPlane no 0018,9232 MRAcqPhaseEncodingStepsOutOfPlane no 0018,9234 SpectroscopyAcqPhaseColumns no 0018,9236 CardiacCyclePosition no 0018,9239 SpecificAbsorptionRateSequence no 0018,9240 RFEchoTrainLength no 0018,9241 GradientEchoTrainLength no 0018,9295 ChemicalShiftsMinIntegrateLimitPPM no 0018,9296 ChemicalShiftsMaxIntegrateLimitPPM no 0018,9301 CTAcquisitionTypeSequence no 0018,9302 AcquisitionType no 0018,9303 TubeAngle no 0018,9304 CTAcquisitionDetailsSequence no 0018,9305 RevolutionTime no 0018,9306 SingleCollimationWidth no 0018,9307 TotalCollimationWidth no 0018,9308 CTTableDynamicsSequence no 0018,9309 TableSpeed no 0018,9310 TableFeedPerRotation no 0018,9311 SpiralPitchFactor no 0018,9312 CTGeometrySequence no 0018,9313 DataCollectionCenterPatient no 0018,9314 CTReconstructionSequence no 0018,9315 ReconstructionAlgorithm no 0018,9316 ConvolutionKernelGroup no 0018,9317 ReconstructionFieldOfView no 0018,9318 ReconstructionTargetCenterPatient no 0018,9319 ReconstructionAngle no 0018,9320 ImageFilter no 0018,9321 CTExposureSequence no 0018,9322 ReconstructionPixelSpacing no 0018,9323 ExposureModulationType no 0018,9324 EstimatedDoseSaving no 0018,9325 CTXRayDetailsSequence no 0018,9326 CTPositionSequence no 0018,9327 TablePosition no 0018,9328 ExposureTimeInMilliSec no 0018,9329 CTImageFrameTypeSequence no 0018,9330 XRayTubeCurrentInMilliAmps no 0018,9332 ExposureInMilliAmpSec no 0018,9333 ConstantVolumeFlag no 0018,9334 FluoroscopyFlag no 0018,9335 SourceToDataCollectionCenterDist no 0018,9337 ContrastBolusAgentNumber no 0018,9338 ContrastBolusIngredientCodeSeq no 0018,9340 ContrastAdministrationProfileSeq no 0018,9341 ContrastBolusUsageSequence no 0018,9342 ContrastBolusAgentAdministered no 0018,9343 ContrastBolusAgentDetected no 0018,9344 ContrastBolusAgentPhase no 0018,9345 CTDIvol no 0018,9346 CTDIPhantomTypeCodeSequence no 0018,9351 CalciumScoringMassFactorPatient no 0018,9352 CalciumScoringMassFactorDevice no 0018,9353 EnergyWeightingFactor no 0018,9360 CTAdditionalXRaySourceSequence no 0018,9401 ProjectionPixelCalibrationSequence no 0018,9402 DistanceSourceToIsocenter no 0018,9403 DistanceObjectToTableTop no 0018,9404 ObjectPixelSpacingInCenterOfBeam no 0018,9405 PositionerPositionSequence no 0018,9406 TablePositionSequence no 0018,9407 CollimatorShapeSequence no 0018,9412 XA-XRFFrameCharacteristicsSequence no 0018,9417 FrameAcquisitionSequence no 0018,9420 XRayReceptorType no 0018,9423 AcquisitionProtocolName no 0018,9424 AcquisitionProtocolDescription no 0018,9425 ContrastBolusIngredientOpaque no 0018,9426 DistanceReceptorPlaneToDetHousing no 0018,9427 IntensifierActiveShape no 0018,9428 IntensifierActiveDimensions no 0018,9429 PhysicalDetectorSize no 0018,9430 PositionOfIsocenterProjection no 0018,9432 FieldOfViewSequence no 0018,9433 FieldOfViewDescription no 0018,9434 ExposureControlSensingRegionsSeq no 0018,9435 ExposureControlSensingRegionShape no 0018,9436 ExposureControlSensRegionLeftEdge no 0018,9437 ExposureControlSensRegionRightEdge no 0018,9440 CenterOfCircExposControlSensRegion no 0018,9441 RadiusOfCircExposControlSensRegion no 0018,9447 ColumnAngulationPatient no 0018,9449 BeamAngle no 0018,9451 FrameDetectorParametersSequence no 0018,9452 CalculatedAnatomyThickness no 0018,9455 CalibrationSequence no 0018,9456 ObjectThicknessSequence no 0018,9457 PlaneIdentification no 0018,9461 FieldOfViewDimensionsInFloat no 0018,9462 IsocenterReferenceSystemSequence no 0018,9463 PositionerIsocenterPrimaryAngle no 0018,9464 PositionerIsocenterSecondaryAngle no 0018,9465 PositionerIsocenterDetRotAngle no 0018,9466 TableXPositionToIsocenter no 0018,9467 TableYPositionToIsocenter no 0018,9468 TableZPositionToIsocenter no 0018,9469 TableHorizontalRotationAngle no 0018,9470 TableHeadTiltAngle no 0018,9471 TableCradleTiltAngle no 0018,9472 FrameDisplayShutterSequence no 0018,9473 AcquiredImageAreaDoseProduct no 0018,9474 CArmPositionerTabletopRelationship no 0018,9476 XRayGeometrySequence no 0018,9477 IrradiationEventIDSequence no 0018,9504 XRay3DFrameTypeSequence no 0018,9506 ContributingSourcesSequence no 0018,9507 XRay3DAcquisitionSequence no 0018,9508 PrimaryPositionerScanArc no 0018,9509 SecondaryPositionerScanArc no 0018,9510 PrimaryPositionerScanStartAngle no 0018,9511 SecondaryPositionerScanStartAngle no 0018,9514 PrimaryPositionerIncrement no 0018,9515 SecondaryPositionerIncrement no 0018,9516 StartAcquisitionDateTime no 0018,9517 EndAcquisitionDateTime no 0018,9524 ApplicationName no 0018,9525 ApplicationVersion no 0018,9526 ApplicationManufacturer no 0018,9527 AlgorithmType no 0018,9528 AlgorithmDescription no 0018,9530 XRay3DReconstructionSequence no 0018,9531 ReconstructionDescription no 0018,9538 PerProjectionAcquisitionSequence no 0018,9601 DiffusionBMatrixSequence no 0018,9602 DiffusionBValueXX no 0018,9603 DiffusionBValueXY no 0018,9604 DiffusionBValueXZ no 0018,9605 DiffusionBValueYY no 0018,9606 DiffusionBValueYZ no 0018,9607 DiffusionBValueZZ no 0018,9701 DecayCorrectionDateTime no 0018,9715 StartDensityThreshold no 0018,9722 TerminationTimeThreshold no 0018,9725 DetectorGeometry no 0018,9727 AxialDetectorDimension no 0018,9735 PETPositionSequence no 0018,9739 NumberOfIterations no 0018,9740 NumberOfSubsets no 0018,9751 PETFrameTypeSequence no 0018,9756 ReconstructionType no 0018,9758 DecayCorrected no 0018,9759 AttenuationCorrected no 0018,9760 ScatterCorrected no 0018,9761 DeadTimeCorrected no 0018,9762 GantryMotionCorrected no 0018,9763 PatientMotionCorrected no 0018,9765 RandomsCorrected no 0018,9767 SensitivityCalibrated no 0018,9801 DepthsOfFocus no 0018,9804 ExclusionStartDatetime no 0018,9805 ExclusionDuration no 0018,9807 ImageDataTypeSequence no 0018,9808 DataType no 0018,980B AliasedDataType no 0018,A001 ContributingEquipmentSequence no 0018,A002 ContributionDateTime no 0018,A003 ContributionDescription no 0019,1002 NumberOfCellsIInDetector no 0019,1003 CellNumberAtTheta no 0019,1004 CellSpacing no 0019,100F HorizFrameOfRef no 0019,1011 SeriesContrast no 0019,1012 LastPseq no 0019,1013 StartNumberForBaseline no 0019,1014 EndNumberForBaseline no 0019,1015 StartNumberForEnhancedScans no 0019,1016 EndNumberForEnhancedScans no 0019,1017 SeriesPlane no 0019,1018 FirstScanRas no 0019,1019 FirstScanLocation no 0019,101A LastScanRas no 0019,101B LastScanLoc no 0019,101E DisplayFieldOfView no 0019,1023 TableSpeed no 0019,1024 MidScanTime no 0019,1025 MidScanFlag no 0019,1026 DegreesOfAzimuth no 0019,1027 GantryPeriod no 0019,102A XRayOnPosition no 0019,102B XRayOffPosition no 0019,102C NumberOfTriggers no 0019,102E AngleOfFirstView no 0019,102F TriggerFrequency no 0019,1039 ScanFOVType no 0019,1040 StatReconFlag no 0019,1041 ComputeType no 0019,1042 SegmentNumber no 0019,1043 TotalSegmentsRequested no 0019,1044 InterscanDelay no 0019,1047 ViewCompressionFactor no 0019,104A TotalNoOfRefChannels no 0019,104B DataSizeForScanData no 0019,1052 ReconPostProcflag no 0019,1057 CTWaterNumber no 0019,1058 CTBoneNumber no 0019,105A AcquisitionDuration no 0019,105E NumberOfChannels no 0019,105F IncrementBetweenChannels no 0019,1060 StartingView no 0019,1061 NumberOfViews no 0019,1062 IncrementBetweenViews no 0019,106A DependantOnNoViewsProcessed no 0019,106B FieldOfViewInDetectorCells no 0019,1070 ValueOfBackProjectionButton no 0019,1071 SetIfFatqEstimatesWereUsed no 0019,1072 ZChanAvgOverViews no 0019,1073 AvgOfLeftRefChansOverViews no 0019,1074 MaxLeftChanOverViews no 0019,1075 AvgOfRightRefChansOverViews no 0019,1076 MaxRightChanOverViews no 0019,107D SecondEcho no 0019,107E NumberOfEchoes no 0019,107F TableDelta no 0019,1081 Contiguous no 0019,1084 PeakSAR no 0019,1085 MonitorSAR no 0019,1087 CardiacRepetitionTime no 0019,1088 ImagesPerCardiacCycle no 0019,108A ActualReceiveGainAnalog no 0019,108B ActualReceiveGainDigital no 0019,108D DelayAfterTrigger no 0019,108F Swappf no 0019,1090 PauseInterval no 0019,1091 PulseTime no 0019,1092 SliceOffsetOnFreqAxis no 0019,1093 CenterFrequency no 0019,1094 TransmitGain no 0019,1095 AnalogReceiverGain no 0019,1096 DigitalReceiverGain no 0019,1097 BitmapDefiningCVs no 0019,1098 CenterFreqMethod no 0019,109B PulseSeqMode no 0019,109C PulseSeqName no 0019,109D PulseSeqDate no 0019,109E InternalPulseSeqName no 0019,109F TransmittingCoil no 0019,10A0 SurfaceCoilType no 0019,10A1 ExtremityCoilFlag no 0019,10A2 RawDataRunNumber no 0019,10A3 CalibratedFieldStrength no 0019,10A4 SATFatWaterBone no 0019,10A5 ReceiveBandwidth no 0019,10A7 UserData01 no 0019,10A8 UserData02 no 0019,10A9 UserData03 no 0019,10AA UserData04 no 0019,10AB UserData05 no 0019,10AC UserData06 no 0019,10AD UserData07 no 0019,10AE UserData08 no 0019,10AF UserData09 no 0019,10B0 UserData10 no 0019,10B1 UserData11 no 0019,10B2 UserData12 no 0019,10B3 UserData13 no 0019,10B4 UserData14 no 0019,10B5 UserData15 no 0019,10B6 UserData16 no 0019,10B7 UserData17 no 0019,10B8 UserData18 no 0019,10B9 UserData19 no 0019,10BA UserData20 no 0019,10BB UserData21 no 0019,10BC UserData22 no 0019,10BD UserData23 no 0019,10BE ProjectionAngle no 0019,10C0 SaturationPlanes no 0019,10C1 SurfaceCoilIntensity no 0019,10C2 SATLocationR no 0019,10C3 SATLocationL no 0019,10C4 SATLocationA no 0019,10C5 SATLocationP no 0019,10C6 SATLocationH no 0019,10C7 SATLocationF no 0019,10C8 SATThicknessR-L no 0019,10C9 SATThicknessA-P no 0019,10CA SATThicknessH-F no 0019,10CB PrescribedFlowAxis no 0019,10CC VelocityEncoding no 0019,10CD ThicknessDisclaimer no 0019,10CE PrescanType no 0019,10CF PrescanStatus no 0019,10D0 RawDataType no 0019,10D2 ProjectionAlgorithm no 0019,10D3 ProjectionAlgorithm no 0019,10D5 FractionalEcho no 0019,10D6 PrepPulse no 0019,10D7 CardiacPhases no 0019,10D8 VariableEchoflag no 0019,10D9 ConcatenatedSAT no 0019,10DA ReferenceChannelUsed no 0019,10DB BackProjectorCoefficient no 0019,10DC PrimarySpeedCorrectionUsed no 0019,10DD OverrangeCorrectionUsed no 0019,10DE DynamicZAlphaValue no 0019,10DF UserData no 0019,10E0 UserData no 0019,10E2 VelocityEncodeScale no 0019,10F2 FastPhases no 0019,10F9 TransmissionGain no 0020,0000 RelationshipGroupLength no 0020,000D StudyInstanceUID no 0020,000E SeriesInstanceUID no 0020,0010 StudyID no 0020,0011 SeriesNumber no 0020,0012 AcquisitionNumber no 0020,0013 InstanceNumber no 0020,0014 IsotopeNumber no 0020,0015 PhaseNumber no 0020,0016 IntervalNumber no 0020,0017 TimeSlotNumber no 0020,0018 AngleNumber no 0020,0019 ItemNumber no 0020,0020 PatientOrientation no 0020,0022 OverlayNumber no 0020,0024 CurveNumber no 0020,0026 LookupTableNumber no 0020,0030 ImagePosition no 0020,0032 ImagePositionPatient no 0020,0035 ImageOrientation no 0020,0037 ImageOrientationPatient no 0020,0050 Location no 0020,0052 FrameOfReferenceUID no 0020,0060 Laterality no 0020,0062 ImageLaterality no 0020,0070 ImageGeometryType no 0020,0080 MaskingImage no 0020,0100 TemporalPositionIdentifier no 0020,0105 NumberOfTemporalPositions no 0020,0110 TemporalResolution no 0020,0200 SynchronizationFrameOfReferenceUID no 0020,1000 SeriesInStudy no 0020,1001 AcquisitionsInSeries no 0020,1002 ImagesInAcquisition no 0020,1003 ImagesInSeries no 0020,1004 AcquisitionsInStudy no 0020,1005 ImagesInStudy no 0020,1020 Reference no 0020,1040 PositionReferenceIndicator no 0020,1041 SliceLocation no 0020,1070 OtherStudyNumbers no 0020,1200 NumberOfPatientRelatedStudies no 0020,1202 NumberOfPatientRelatedSeries no 0020,1204 NumberOfPatientRelatedInstances no 0020,1206 NumberOfStudyRelatedSeries no 0020,1208 NumberOfStudyRelatedInstances no 0020,1209 NumberOfSeriesRelatedInstances no 0020,31xx SourceImageIDs no 0020,3401 ModifyingDeviceID no 0020,3402 ModifiedImageID no 0020,3403 ModifiedImageDate no 0020,3404 ModifyingDeviceManufacturer no 0020,3405 ModifiedImageTime no 0020,3406 ModifiedImageDescription no 0020,4000 ImageComments no 0020,5000 OriginalImageIdentification no 0020,5002 OriginalImageIdentNomenclature no 0020,9056 StackID no 0020,9057 InStackPositionNumber no 0020,9071 FrameAnatomySequence no 0020,9072 FrameLaterality no 0020,9111 FrameContentSequence no 0020,9113 PlanePositionSequence no 0020,9116 PlaneOrientationSequence no 0020,9128 TemporalPositionIndex no 0020,9153 TriggerDelayTime no 0020,9156 FrameAcquisitionNumber no 0020,9157 DimensionIndexValues no 0020,9158 FrameComments no 0020,9161 ConcatenationUID no 0020,9162 InConcatenationNumber no 0020,9163 InConcatenationTotalNumber no 0020,9164 DimensionOrganizationUID no 0020,9165 DimensionIndexPointer no 0020,9167 FunctionalGroupPointer no 0020,9213 DimensionIndexPrivateCreator no 0020,9221 DimensionOrganizationSequence no 0020,9222 DimensionIndexSequence no 0020,9228 ConcatenationFrameOffsetNumber no 0020,9238 FunctionalGroupPrivateCreator no 0020,9241 NominalPercentageOfCardiacPhase no 0020,9245 NominalPercentOfRespiratoryPhase no 0020,9246 StartingRespiratoryAmplitude no 0020,9247 StartingRespiratoryPhase no 0020,9248 EndingRespiratoryAmplitude no 0020,9249 EndingRespiratoryPhase no 0020,9250 RespiratoryTriggerType no 0020,9251 RRIntervalTimeNominal no 0020,9252 ActualCardiacTriggerDelayTime no 0020,9253 RespiratorySynchronizationSequence no 0020,9254 RespiratoryIntervalTime no 0020,9255 NominalRespiratoryTriggerDelayTime no 0020,9256 RespiratoryTriggerDelayThreshold no 0020,9257 ActualRespiratoryTriggerDelayTime no 0020,9301 ImagePositionVolume no 0020,9302 ImageOrientationVolume no 0020,9308 ApexPosition no 0020,9421 DimensionDescriptionLabel no 0020,9450 PatientOrientationInFrameSequence no 0020,9453 FrameLabel no 0020,9518 AcquisitionIndex no 0020,9529 ContributingSOPInstancesRefSeq no 0020,9536 ReconstructionIndex no 0021,1003 SeriesFromWhichPrescribed no 0021,1005 GenesisVersionNow no 0021,1007 SeriesRecordChecksum no 0021,1018 GenesisVersionNow no 0021,1019 AcqreconRecordChecksum no 0021,1020 TableStartLocation no 0021,1035 SeriesFromWhichPrescribed no 0021,1036 ImageFromWhichPrescribed no 0021,1037 ScreenFormat no 0021,104A AnatomicalReferenceForScout no 0021,104F LocationsInAcquisition no 0021,1050 GraphicallyPrescribed no 0021,1051 RotationFromSourceXRot no 0021,1052 RotationFromSourceYRot no 0021,1053 RotationFromSourceZRot no 0021,1054 ImagePosition no 0021,1055 ImageOrientation no 0021,1056 IntegerSlop no 0021,1057 IntegerSlop no 0021,1058 IntegerSlop no 0021,1059 IntegerSlop no 0021,105A IntegerSlop no 0021,105B FloatSlop no 0021,105C FloatSlop no 0021,105D FloatSlop no 0021,105E FloatSlop no 0021,105F FloatSlop no 0021,1081 AutoWindowLevelAlpha no 0021,1082 AutoWindowLevelBeta no 0021,1083 AutoWindowLevelWindow no 0021,1084 ToWindowLevelLevel no 0021,1090 TubeFocalSpotPosition no 0021,1091 BiopsyPosition no 0021,1092 BiopsyTLocation no 0021,1093 BiopsyRefLocation no 0022,0001 LightPathFilterPassThroughWavelen no 0022,0002 LightPathFilterPassBand no 0022,0003 ImagePathFilterPassThroughWavelen no 0022,0004 ImagePathFilterPassBand no 0022,0005 PatientEyeMovementCommanded no 0022,0006 PatientEyeMovementCommandCodeSeq no 0022,0007 SphericalLensPower no 0022,0008 CylinderLensPower no 0022,0009 CylinderAxis no 0022,000A EmmetropicMagnification no 0022,000B IntraOcularPressure no 0022,000C HorizontalFieldOfView no 0022,000D PupilDilated no 0022,000E DegreeOfDilation no 0022,0010 StereoBaselineAngle no 0022,0011 StereoBaselineDisplacement no 0022,0012 StereoHorizontalPixelOffset no 0022,0013 StereoVerticalPixelOffset no 0022,0014 StereoRotation no 0022,0015 AcquisitionDeviceTypeCodeSequence no 0022,0016 IlluminationTypeCodeSequence no 0022,0017 LightPathFilterTypeStackCodeSeq no 0022,0018 ImagePathFilterTypeStackCodeSeq no 0022,0019 LensesCodeSequence no 0022,001A ChannelDescriptionCodeSequence no 0022,001B RefractiveStateSequence no 0022,001C MydriaticAgentCodeSequence no 0022,001D RelativeImagePositionCodeSequence no 0022,0020 StereoPairsSequence no 0022,0021 LeftImageSequence no 0022,0022 RightImageSequence no 0022,0030 AxialLengthOfTheEye no 0022,0031 OphthalmicFrameLocationSequence no 0022,0032 ReferenceCoordinates no 0022,0035 DepthSpatialResolution no 0022,0036 MaximumDepthDistortion no 0022,0037 AlongScanSpatialResolution no 0022,0038 MaximumAlongScanDistortion no 0022,0039 OphthalmicImageOrientation no 0022,0041 DepthOfTransverseImage no 0022,0042 MydriaticAgentConcUnitsSeq no 0022,0048 AcrossScanSpatialResolution no 0022,0049 MaximumAcrossScanDistortion no 0022,004E MydriaticAgentConcentration no 0022,0055 IlluminationWaveLength no 0022,0056 IlluminationPower no 0022,0057 IlluminationBandwidth no 0022,0058 MydriaticAgentSequence no 0023,1001 NumberOfSeriesInStudy no 0023,1002 NumberOfUnarchivedSeries no 0023,1010 ReferenceImageField no 0023,1050 SummaryImage no 0023,1070 StartTimeSecsInFirstAxial no 0023,1074 NoofUpdatesToHeader no 0023,107D IndicatesIfTheStudyHasCompleteInfo no 0025,1006 LastPulseSequenceUsed no 0025,1007 ImagesInSeries no 0025,1010 LandmarkCounter no 0025,1011 NumberOfAcquisitions no 0025,1014 IndicatesNoofUpdatesToHeader no 0025,1017 SeriesCompleteFlag no 0025,1018 NumberOfImagesArchived no 0025,1019 LastImageNumberUsed no 0025,101A PrimaryReceiverSuiteAndHost no 0027,1006 ImageArchiveFlag no 0027,1010 ScoutType no 0027,101C VmaMamp no 0027,101D VmaPhase no 0027,101E VmaMod no 0027,101F VmaClip no 0027,1020 SmartScanOnOffFlag no 0027,1030 ForeignImageRevision no 0027,1031 ImagingMode no 0027,1032 PulseSequence no 0027,1033 ImagingOptions no 0027,1035 PlaneType no 0027,1036 ObliquePlane no 0027,1040 RASLetterOfImageLocation no 0027,1041 ImageLocation no 0027,1042 CenterRCoordOfPlaneImage no 0027,1043 CenterACoordOfPlaneImage no 0027,1044 CenterSCoordOfPlaneImage no 0027,1045 NormalRCoord no 0027,1046 NormalACoord no 0027,1047 NormalSCoord no 0027,1048 RCoordOfTopRightCorner no 0027,1049 ACoordOfTopRightCorner no 0027,104A SCoordOfTopRightCorner no 0027,104B RCoordOfBottomRightCorner no 0027,104C ACoordOfBottomRightCorner no 0027,104D SCoordOfBottomRightCorner no 0027,1050 TableStartLocation no 0027,1051 TableEndLocation no 0027,1052 RASLetterForSideOfImage no 0027,1053 RASLetterForAnteriorPosterior no 0027,1054 RASLetterForScoutStartLoc no 0027,1055 RASLetterForScoutEndLoc no 0027,1060 ImageDimensionX no 0027,1061 ImageDimensionY no 0027,1062 NumberOfExcitations no 0028,0000 ImagePresentationGroupLength no 0028,0002 SamplesPerPixel no 0028,0003 SamplesPerPixelUsed no 0028,0004 PhotometricInterpretation no 0028,0005 ImageDimensions no 0028,0006 PlanarConfiguration no 0028,0008 NumberOfFrames no 0028,0009 FrameIncrementPointer no 0028,000A FrameDimensionPointer no 0028,0010 Rows no 0028,0011 Columns no 0028,0012 Planes no 0028,0014 UltrasoundColorDataPresent no 0028,0030 PixelSpacing no 0028,0031 ZoomFactor no 0028,0032 ZoomCenter no 0028,0034 PixelAspectRatio no 0028,0040 ImageFormat no 0028,0050 ManipulatedImage no 0028,0051 CorrectedImage no 0028,005F CompressionRecognitionCode no 0028,0060 CompressionCode no 0028,0061 CompressionOriginator no 0028,0062 CompressionLabel no 0028,0063 CompressionDescription no 0028,0065 CompressionSequence no 0028,0066 CompressionStepPointers no 0028,0068 RepeatInterval no 0028,0069 BitsGrouped no 0028,0070 PerimeterTable no 0028,0071 PerimeterValue no 0028,0080 PredictorRows no 0028,0081 PredictorColumns no 0028,0082 PredictorConstants no 0028,0090 BlockedPixels no 0028,0091 BlockRows no 0028,0092 BlockColumns no 0028,0093 RowOverlap no 0028,0094 ColumnOverlap no 0028,0100 BitsAllocated no 0028,0101 BitsStored no 0028,0102 HighBit no 0028,0103 PixelRepresentation no 0028,0104 SmallestValidPixelValue no 0028,0105 LargestValidPixelValue no 0028,0106 SmallestImagePixelValue no 0028,0107 LargestImagePixelValue no 0028,0108 SmallestPixelValueInSeries no 0028,0109 LargestPixelValueInSeries no 0028,0110 SmallestImagePixelValueInPlane no 0028,0111 LargestImagePixelValueInPlane no 0028,0120 PixelPaddingValue no 0028,0121 PixelPaddingRangeLimit no 0028,0200 ImageLocation no 0028,0300 QualityControlImage no 0028,0301 BurnedInAnnotation no 0028,0400 TransformLabel no 0028,0401 TransformVersionNumber no 0028,0402 NumberOfTransformSteps no 0028,0403 SequenceOfCompressedData no 0028,0404 DetailsOfCoefficients no 0028,04x2 CoefficientCoding no 0028,04x3 CoefficientCodingPointers no 0028,0700 DCTLabel no 0028,0701 DataBlockDescription no 0028,0702 DataBlock no 0028,0710 NormalizationFactorFormat no 0028,0720 ZonalMapNumberFormat no 0028,0721 ZonalMapLocation no 0028,0722 ZonalMapFormat no 0028,0730 AdaptiveMapFormat no 0028,0740 CodeNumberFormat no 0028,08x0 CodeLabel no 0028,08x2 NumberOfTables no 0028,08x3 CodeTableLocation no 0028,08x4 BitsForCodeWord no 0028,08x8 ImageDataLocation no 0028,0A02 PixelSpacingCalibrationType no 0028,0A04 PixelSpacingCalibrationDescription no 0028,1040 PixelIntensityRelationship no 0028,1041 PixelIntensityRelationshipSign no 0028,1050 WindowCenter no 0028,1051 WindowWidth no 0028,1052 RescaleIntercept no 0028,1053 RescaleSlope no 0028,1054 RescaleType no 0028,1055 WindowCenterAndWidthExplanation no 0028,1056 VOI_LUTFunction no 0028,1080 GrayScale no 0028,1090 RecommendedViewingMode no 0028,1100 GrayLookupTableDescriptor no 0028,1101 RedPaletteColorTableDescriptor no 0028,1102 GreenPaletteColorTableDescriptor no 0028,1103 BluePaletteColorTableDescriptor no 0028,1111 LargeRedPaletteColorTableDescr no 0028,1112 LargeGreenPaletteColorTableDescr no 0028,1113 LargeBluePaletteColorTableDescr no 0028,1199 PaletteColorTableUID no 0028,1200 GrayLookupTableData no 0028,1201 RedPaletteColorTableData no 0028,1202 GreenPaletteColorTableData no 0028,1203 BluePaletteColorTableData no 0028,1211 LargeRedPaletteColorTableData no 0028,1212 LargeGreenPaletteColorTableData no 0028,1213 LargeBluePaletteColorTableData no 0028,1214 LargePaletteColorLookupTableUID no 0028,1221 SegmentedRedColorTableData no 0028,1222 SegmentedGreenColorTableData no 0028,1223 SegmentedBlueColorTableData no 0028,1300 BreastImplantPresent no 0028,1350 PartialView no 0028,1351 PartialViewDescription no 0028,1352 PartialViewCodeSequence no 0028,135A SpatialLocationsPreserved no 0028,1402 DataPathAssignment no 0028,1404 BlendingLUT1Sequence no 0028,1406 BlendingWeightConstant no 0028,1408 BlendingLookupTableData no 0028,140C BlendingLUT2Sequence no 0028,140E DataPathID no 0028,140F RGBLUTTransferFunction no 0028,1410 AlphaLUTTransferFunction no 0028,2000 ICCProfile no 0028,2110 LossyImageCompression no 0028,2112 LossyImageCompressionRatio no 0028,2114 LossyImageCompressionMethod no 0028,3000 ModalityLUTSequence no 0028,3002 LUTDescriptor no 0028,3003 LUTExplanation no 0028,3004 ModalityLUTType no 0028,3006 LUTData no 0028,3010 VOILUTSequence no 0028,3110 SoftcopyVOILUTSequence no 0028,4000 ImagePresentationComments no 0028,5000 BiPlaneAcquisitionSequence no 0028,6010 RepresentativeFrameNumber no 0028,6020 FrameNumbersOfInterest no 0028,6022 FrameOfInterestDescription no 0028,6023 FrameOfInterestType no 0028,6030 MaskPointers no 0028,6040 RWavePointer no 0028,6100 MaskSubtractionSequence no 0028,6101 MaskOperation no 0028,6102 ApplicableFrameRange no 0028,6110 MaskFrameNumbers no 0028,6112 ContrastFrameAveraging no 0028,6114 MaskSubPixelShift no 0028,6120 TIDOffset no 0028,6190 MaskOperationExplanation no 0028,7FE0 PixelDataProviderURL no 0028,9001 DataPointRows no 0028,9002 DataPointColumns no 0028,9003 SignalDomainColumns no 0028,9099 LargestMonochromePixelValue no 0028,9108 DataRepresentation no 0028,9110 PixelMeasuresSequence no 0028,9132 FrameVOILUTSequence no 0028,9145 PixelValueTransformationSequence no 0028,9235 SignalDomainRows no 0028,9411 DisplayFilterPercentage no 0028,9415 FramePixelShiftSequence no 0028,9416 SubtractionItemID no 0028,9422 PixelIntensityRelationshipLUTSeq no 0028,9443 FramePixelDataPropertiesSequence no 0028,9444 GeometricalProperties no 0028,9445 GeometricMaximumDistortion no 0028,9446 ImageProcessingApplied no 0028,9454 MaskSelectionMode no 0028,9474 LUTFunction no 0028,9478 MaskVisibilityPercentage no 0028,9501 PixelShiftSequence no 0028,9502 RegionPixelShiftSequence no 0028,9503 VerticesOfTheRegion no 0028,9506 PixelShiftFrameRange no 0028,9507 LUTFrameRange no 0028,9520 ImageToEquipmentMappingMatrix no 0028,9537 EquipmentCoordinateSystemID no 0029,1004 LowerRangeOfPixels1a no 0029,1005 LowerRangeOfPixels1b no 0029,1006 LowerRangeOfPixels1c no 0029,1007 LowerRangeOfPixels1d no 0029,1008 LowerRangeOfPixels1e no 0029,1009 LowerRangeOfPixels1f no 0029,100A LowerRangeOfPixels1g no 0029,1015 LowerRangeOfPixels1h no 0029,1016 LowerRangeOfPixels1i no 0029,1017 LowerRangeOfPixels2 no 0029,1018 UpperRangeOfPixels2 no 0029,101A LenOfTotHdrInBytes no 0029,1026 VersionOfTheHdrStruct no 0029,1034 AdvantageCompOverflow no 0029,1035 AdvantageCompUnderflow no 0032,0000 StudyGroupLength no 0032,000A StudyStatusID no 0032,000C StudyPriorityID no 0032,0012 StudyIDIssuer no 0032,0032 StudyVerifiedDate no 0032,0033 StudyVerifiedTime no 0032,0034 StudyReadDate no 0032,0035 StudyReadTime no 0032,1000 ScheduledStudyStartDate no 0032,1001 ScheduledStudyStartTime no 0032,1010 ScheduledStudyStopDate no 0032,1011 ScheduledStudyStopTime no 0032,1020 ScheduledStudyLocation no 0032,1021 ScheduledStudyLocationAETitle no 0032,1030 ReasonForStudy no 0032,1031 RequestingPhysicianIDSequence no 0032,1032 RequestingPhysician no 0032,1033 RequestingService no 0032,1040 StudyArrivalDate no 0032,1041 StudyArrivalTime no 0032,1050 StudyCompletionDate no 0032,1051 StudyCompletionTime no 0032,1055 StudyComponentStatusID no 0032,1060 RequestedProcedureDescription no 0032,1064 RequestedProcedureCodeSequence no 0032,1070 RequestedContrastAgent no 0032,4000 StudyComments no 0038,0004 ReferencedPatientAliasSequence no 0038,0008 VisitStatusID no 0038,0010 AdmissionID no 0038,0011 IssuerOfAdmissionID no 0038,0016 RouteOfAdmissions no 0038,001A ScheduledAdmissionDate no 0038,001B ScheduledAdmissionTime no 0038,001C ScheduledDischargeDate no 0038,001D ScheduledDischargeTime no 0038,001E ScheduledPatientInstitResidence no 0038,0020 AdmittingDate no 0038,0021 AdmittingTime no 0038,0030 DischargeDate no 0038,0032 DischargeTime no 0038,0040 DischargeDiagnosisDescription no 0038,0044 DischargeDiagnosisCodeSequence no 0038,0050 SpecialNeeds no 0038,0060 ServiceEpisodeID no 0038,0061 IssuerOfServiceEpisodeID no 0038,0062 ServiceEpisodeDescription no 0038,0100 PertinentDocumentsSequence no 0038,0300 CurrentPatientLocation no 0038,0400 PatientInstitutionResidence no 0038,0500 PatientState no 0038,0502 PatientClinicalTrialParticipSeq no 0038,4000 VisitComments no 003A,0004 WaveformOriginality no 003A,0005 NumberOfWaveformChannels no 003A,0010 NumberOfWaveformSamples no 003A,001A SamplingFrequency no 003A,0020 MultiplexGroupLabel no 003A,0200 ChannelDefinitionSequence no 003A,0202 WaveformChannelNumber no 003A,0203 ChannelLabel no 003A,0205 ChannelStatus no 003A,0208 ChannelSourceSequence no 003A,0209 ChannelSourceModifiersSequence no 003A,020A SourceWaveformSequence no 003A,020C ChannelDerivationDescription no 003A,0210 ChannelSensitivity no 003A,0211 ChannelSensitivityUnitsSequence no 003A,0212 ChannelSensitivityCorrectionFactor no 003A,0213 ChannelBaseline no 003A,0214 ChannelTimeSkew no 003A,0215 ChannelSampleSkew no 003A,0218 ChannelOffset no 003A,021A WaveformBitsStored no 003A,0220 FilterLowFrequency no 003A,0221 FilterHighFrequency no 003A,0222 NotchFilterFrequency no 003A,0223 NotchFilterBandwidth no 003A,0230 WaveformDataDisplayScale no 003A,0231 WaveformDisplayBkgCIELabValue no 003A,0240 WaveformPresentationGroupSequence no 003A,0241 PresentationGroupNumber no 003A,0242 ChannelDisplaySequence no 003A,0244 ChannelRecommendDisplayCIELabValue no 003A,0245 ChannelPosition no 003A,0246 DisplayShadingFlag no 003A,0247 FractionalChannelDisplayScale no 003A,0248 AbsoluteChannelDisplayScale no 003A,0300 MultiplexAudioChannelsDescrCodeSeq no 003A,0301 ChannelIdentificationCode no 003A,0302 ChannelMode no 0040,0001 ScheduledStationAETitle no 0040,0002 ScheduledProcedureStepStartDate no 0040,0003 ScheduledProcedureStepStartTime no 0040,0004 ScheduledProcedureStepEndDate no 0040,0005 ScheduledProcedureStepEndTime no 0040,0006 ScheduledPerformingPhysiciansName no 0040,0007 ScheduledProcedureStepDescription no 0040,0008 ScheduledProtocolCodeSequence no 0040,0009 ScheduledProcedureStepID no 0040,000A StageCodeSequence no 0040,000B ScheduledPerformingPhysicianIDSeq no 0040,0010 ScheduledStationName no 0040,0011 ScheduledProcedureStepLocation no 0040,0012 PreMedication no 0040,0020 ScheduledProcedureStepStatus no 0040,0031 LocalNamespaceEntityID no 0040,0032 UniversalEntityID no 0040,0033 UniversalEntityIDType no 0040,0035 IdentifierTypeCode no 0040,0036 AssigningFacilitySequence no 0040,0100 ScheduledProcedureStepSequence no 0040,0220 ReferencedNonImageCompositeSOPSeq no 0040,0241 PerformedStationAETitle no 0040,0242 PerformedStationName no 0040,0243 PerformedLocation no 0040,0244 PerformedProcedureStepStartDate no 0040,0245 PerformedProcedureStepStartTime no 0040,0250 PerformedProcedureStepEndDate no 0040,0251 PerformedProcedureStepEndTime no 0040,0252 PerformedProcedureStepStatus no 0040,0253 PerformedProcedureStepID no 0040,0254 PerformedProcedureStepDescription no 0040,0255 PerformedProcedureTypeDescription no 0040,0260 PerformedProtocolCodeSequence no 0040,0261 PerformedProtocolType no 0040,0270 ScheduledStepAttributesSequence no 0040,0275 RequestAttributesSequence no 0040,0280 CommentsOnPerformedProcedureStep no 0040,0281 ProcStepDiscontinueReasonCodeSeq no 0040,0293 QuantitySequence no 0040,0294 Quantity no 0040,0295 MeasuringUnitsSequence no 0040,0296 BillingItemSequence no 0040,0300 TotalTimeOfFluoroscopy no 0040,0301 TotalNumberOfExposures no 0040,0302 EntranceDose no 0040,0303 ExposedArea no 0040,0306 DistanceSourceToEntrance no 0040,0307 DistanceSourceToSupport no 0040,030E ExposureDoseSequence no 0040,0310 CommentsOnRadiationDose no 0040,0312 XRayOutput no 0040,0314 HalfValueLayer no 0040,0316 OrganDose no 0040,0318 OrganExposed no 0040,0320 BillingProcedureStepSequence no 0040,0321 FilmConsumptionSequence no 0040,0324 BillingSuppliesAndDevicesSequence no 0040,0330 ReferencedProcedureStepSequence no 0040,0340 PerformedSeriesSequence no 0040,0400 CommentsOnScheduledProcedureStep no 0040,0440 ProtocolContextSequence no 0040,0441 ContentItemModifierSequence no 0040,050A SpecimenAccessionNumber no 0040,0512 ContainerIdentifier no 0040,051A ContainerDescription no 0040,0550 SpecimenSequence no 0040,0551 SpecimenIdentifier no 0040,0552 SpecimenDescriptionSequenceTrial no 0040,0553 SpecimenDescriptionTrial no 0040,0554 SpecimenUID no 0040,0555 AcquisitionContextSequence no 0040,0556 AcquisitionContextDescription no 0040,059A SpecimenTypeCodeSequence no 0040,0600 SpecimenShortDescription no 0040,06FA SlideIdentifier no 0040,071A ImageCenterPointCoordinatesSeq no 0040,072A XOffsetInSlideCoordinateSystem no 0040,073A YOffsetInSlideCoordinateSystem no 0040,074A ZOffsetInSlideCoordinateSystem no 0040,08D8 PixelSpacingSequence no 0040,08DA CoordinateSystemAxisCodeSequence no 0040,08EA MeasurementUnitsCodeSequence no 0040,09F8 VitalStainCodeSequenceTrial no 0040,1001 RequestedProcedureID no 0040,1002 ReasonForRequestedProcedure no 0040,1003 RequestedProcedurePriority no 0040,1004 PatientTransportArrangements no 0040,1005 RequestedProcedureLocation no 0040,1006 PlacerOrderNumber-Procedure no 0040,1007 FillerOrderNumber-Procedure no 0040,1008 ConfidentialityCode no 0040,1009 ReportingPriority no 0040,100A ReasonForRequestedProcedureCodeSeq no 0040,1010 NamesOfIntendedRecipientsOfResults no 0040,1011 IntendedRecipientsOfResultsIDSeq no 0040,1101 PersonIdentificationCodeSequence no 0040,1102 PersonAddress no 0040,1103 PersonTelephoneNumbers no 0040,1400 RequestedProcedureComments no 0040,2001 ReasonForImagingServiceRequest no 0040,2004 IssueDateOfImagingServiceRequest no 0040,2005 IssueTimeOfImagingServiceRequest no 0040,2006 PlacerOrderNum-ImagingServiceReq no 0040,2007 FillerOrderNum-ImagingServiceReq no 0040,2008 OrderEnteredBy no 0040,2009 OrderEntererLocation no 0040,2010 OrderCallbackPhoneNumber no 0040,2016 PlacerOrderNum-ImagingServiceReq no 0040,2017 FillerOrderNum-ImagingServiceReq no 0040,2400 ImagingServiceRequestComments no 0040,3001 ConfidentialityOnPatientDataDescr no 0040,4001 GenPurposeScheduledProcStepStatus no 0040,4002 GenPurposePerformedProcStepStatus no 0040,4003 GenPurposeSchedProcStepPriority no 0040,4004 SchedProcessingApplicationsCodeSeq no 0040,4005 SchedProcedureStepStartDateAndTime no 0040,4006 MultipleCopiesFlag no 0040,4007 PerformedProcessingAppsCodeSeq no 0040,4009 HumanPerformerCodeSequence no 0040,4010 SchedProcStepModificationDateTime no 0040,4011 ExpectedCompletionDateAndTime no 0040,4015 ResultingGenPurposePerfProcStepSeq no 0040,4016 RefGenPurposeSchedProcStepSeq no 0040,4018 ScheduledWorkitemCodeSequence no 0040,4019 PerformedWorkitemCodeSequence no 0040,4020 InputAvailabilityFlag no 0040,4021 InputInformationSequence no 0040,4022 RelevantInformationSequence no 0040,4023 RefGenPurSchedProcStepTransUID no 0040,4025 ScheduledStationNameCodeSequence no 0040,4026 ScheduledStationClassCodeSequence no 0040,4027 SchedStationGeographicLocCodeSeq no 0040,4028 PerformedStationNameCodeSequence no 0040,4029 PerformedStationClassCodeSequence no 0040,4030 PerformedStationGeogLocCodeSeq no 0040,4031 RequestedSubsequentWorkItemCodeSeq no 0040,4032 NonDICOMOutputCodeSequence no 0040,4033 OutputInformationSequence no 0040,4034 ScheduledHumanPerformersSequence no 0040,4035 ActualHumanPerformersSequence no 0040,4036 HumanPerformersOrganization no 0040,4037 HumanPerformerName no 0040,4040 RawDataHandling no 0040,8302 EntranceDoseInMilliGy no 0040,9094 RefImageRealWorldValueMappingSeq no 0040,9096 RealWorldValueMappingSequence no 0040,9098 PixelValueMappingCodeSequence no 0040,9210 LUTLabel no 0040,9211 RealWorldValueLastValueMapped no 0040,9212 RealWorldValueLUTData no 0040,9216 RealWorldValueFirstValueMapped no 0040,9224 RealWorldValueIntercept no 0040,9225 RealWorldValueSlope no 0040,A010 RelationshipType no 0040,A027 VerifyingOrganization no 0040,A030 VerificationDateTime no 0040,A032 ObservationDateTime no 0040,A040 ValueType no 0040,A043 ConceptNameCodeSequence no 0040,A050 ContinuityOfContent no 0040,A073 VerifyingObserverSequence no 0040,A075 VerifyingObserverName no 0040,A078 AuthorObserverSequence no 0040,A07A ParticipantSequence no 0040,A07C CustodialOrganizationSequence no 0040,A080 ParticipationType no 0040,A082 ParticipationDateTime no 0040,A084 ObserverType no 0040,A088 VerifyingObserverIdentCodeSequence no 0040,A090 EquivalentCDADocumentSequence no 0040,A0B0 ReferencedWaveformChannels no 0040,A120 DateTime no 0040,A121 Date no 0040,A122 Time no 0040,A123 PersonName no 0040,A124 UID no 0040,A130 TemporalRangeType no 0040,A132 ReferencedSamplePositions no 0040,A136 ReferencedFrameNumbers no 0040,A138 ReferencedTimeOffsets no 0040,A13A ReferencedDateTime no 0040,A160 TextValue no 0040,A168 ConceptCodeSequence no 0040,A170 PurposeOfReferenceCodeSequence no 0040,A180 AnnotationGroupNumber no 0040,A195 ModifierCodeSequence no 0040,A300 MeasuredValueSequence no 0040,A301 NumericValueQualifierCodeSequence no 0040,A30A NumericValue no 0040,A353 AddressTrial no 0040,A354 TelephoneNumberTrial no 0040,A360 PredecessorDocumentsSequence no 0040,A370 ReferencedRequestSequence no 0040,A372 PerformedProcedureCodeSequence no 0040,A375 CurrentRequestedProcEvidenceSeq no 0040,A385 PertinentOtherEvidenceSequence no 0040,A390 HL7StructuredDocumentRefSeq no 0040,A491 CompletionFlag no 0040,A492 CompletionFlagDescription no 0040,A493 VerificationFlag no 0040,A494 ArchiveRequested no 0040,A496 PreliminaryFlag no 0040,A504 ContentTemplateSequence no 0040,A525 IdenticalDocumentsSequence no 0040,A730 ContentSequence no 0040,B020 AnnotationSequence no 0040,DB00 TemplateIdentifier no 0040,DB06 TemplateVersion no 0040,DB07 TemplateLocalVersion no 0040,DB0B TemplateExtensionFlag no 0040,DB0C TemplateExtensionOrganizationUID no 0040,DB0D TemplateExtensionCreatorUID no 0040,DB73 ReferencedContentItemIdentifier no 0040,E001 HL7InstanceIdentifier no 0040,E004 HL7DocumentEffectiveTime no 0040,E006 HL7DocumentTypeCodeSequence no 0040,E010 RetrieveURI no 0040,E011 RetrieveLocationUID no 0042,0010 DocumentTitle no 0042,0011 EncapsulatedDocument no 0042,0012 MIMETypeOfEncapsulatedDocument no 0042,0013 SourceInstanceSequence no 0042,0014 ListOfMIMETypes no 0043,1001 BitmapOfPrescanOptions no 0043,1002 GradientOffsetInX no 0043,1003 GradientOffsetInY no 0043,1004 GradientOffsetInZ no 0043,1005 ImgIsOriginalOrUnoriginal no 0043,1006 NumberOfEPIShots no 0043,1007 ViewsPerSegment no 0043,1008 RespiratoryRateBpm no 0043,1009 RespiratoryTriggerPoint no 0043,100A TypeOfReceiverUsed no 0043,100B PeakRateOfChangeOfGradientField no 0043,100C LimitsInUnitsOfPercent no 0043,100D PSDEstimatedLimit no 0043,100E PSDEstimatedLimitInTeslaPerSecond no 0043,100F Saravghead no 0043,1010 WindowValue no 0043,1011 TotalInputViews no 0043,1012 X-RayChain no 0043,1013 DeconKernelParameters no 0043,1014 CalibrationParameters no 0043,1015 TotalOutputViews no 0043,1016 NumberOfOverranges no 0043,1017 IBHImageScaleFactors no 0043,1018 BBHCoefficients no 0043,1019 NumberOfBBHChainsToBlend no 0043,101A StartingChannelNumber no 0043,101B PpscanParameters no 0043,101C GEImageIntegrity no 0043,101D LevelValue no 0043,101E DeltaStartTime no 0043,101F MaxOverrangesInAView no 0043,1020 AvgOverrangesAllViews no 0043,1021 CorrectedAfterGlowTerms no 0043,1025 ReferenceChannels no 0043,1026 NoViewsRefChansBlocked no 0043,1027 ScanPitchRatio no 0043,1028 UniqueImageIden no 0043,1029 HistogramTables no 0043,102A UserDefinedData no 0043,102B PrivateScanOptions no 0043,102C EffectiveEchoSpacing no 0043,102D StringSlopField1 no 0043,102E StringSlopField2 no 0043,102F RawDataType no 0043,1030 RawDataType no 0043,1031 RACordOfTargetReconCenter no 0043,1032 RawDataType no 0043,1033 NegScanspacing no 0043,1034 OffsetFrequency no 0043,1035 UserUsageTag no 0043,1036 UserFillMapMSW no 0043,1037 UserFillMapLSW no 0043,1038 User25-48 no 0043,1039 SlopInt6-9 no 0043,1040 TriggerOnPosition no 0043,1041 DegreeOfRotation no 0043,1042 DASTriggerSource no 0043,1043 DASFpaGain no 0043,1044 DASOutputSource no 0043,1045 DASAdInput no 0043,1046 DASCalMode no 0043,1047 DASCalFrequency no 0043,1048 DASRegXm no 0043,1049 DASAutoZero no 0043,104A StartingChannelOfView no 0043,104B DASXmPattern no 0043,104C TGGCTriggerMode no 0043,104D StartScanToXrayOnDelay no 0043,104E DurationOfXrayOn no 0043,1060 SlopInt10-17 no 0043,1061 ScannerStudyEntityUID no 0043,1062 ScannerStudyID no 0043,106f ScannerTableEntry no 0044,0001 ProductPackageIdentifier no 0044,0002 SubstanceAdministrationApproval no 0044,0003 ApprovalStatusFurtherDescription no 0044,0004 ApprovalStatusDateTime no 0044,0007 ProductTypeCodeSequence no 0044,0008 ProductName no 0044,0009 ProductDescription no 0044,000A ProductLotIdentifier no 0044,000B ProductExpirationDateTime no 0044,0010 SubstanceAdministrationDateTime no 0044,0011 SubstanceAdministrationNotes no 0044,0012 SubstanceAdministrationDeviceID no 0044,0013 ProductParameterSequence no 0044,0019 SubstanceAdminParameterSeq no 0045,1001 NumberOfMacroRowsInDetector no 0045,1002 MacroWidthAtISOCenter no 0045,1003 DASType no 0045,1004 DASGain no 0045,1005 DASTemperature no 0045,1006 TableDirectionInOrOut no 0045,1007 ZSmoothingFactor no 0045,1008 ViewWeightingMode no 0045,1009 SigmaRowNumberWhichRowsWereUsed no 0045,100A MinimumDasValueFoundInTheScanData no 0045,100B MaximumOffsetShiftValueUsed no 0045,100C NumberOfViewsShifted no 0045,100D ZTrackingFlag no 0045,100E MeanZError no 0045,100F ZTrackingMaximumError no 0045,1010 StartingViewForRow2a no 0045,1011 NumberOfViewsInRow2a no 0045,1012 StartingViewForRow1a no 0045,1013 SigmaMode no 0045,1014 NumberOfViewsInRow1a no 0045,1015 StartingViewForRow2b no 0045,1016 NumberOfViewsInRow2b no 0045,1017 StartingViewForRow1b no 0045,1018 NumberOfViewsInRow1b no 0045,1019 AirFilterCalibrationDate no 0045,101A AirFilterCalibrationTime no 0045,101B PhantomCalibrationDate no 0045,101C PhantomCalibrationTime no 0045,101D ZSlopeCalibrationDate no 0045,101E ZSlopeCalibrationTime no 0045,101F CrosstalkCalibrationDate no 0045,1020 CrosstalkCalibrationTime no 0045,1021 IterboneOptionFlag no 0045,1022 PeristalticFlagOption no 0046,0012 LensDescription no 0046,0014 RightLensSequence no 0046,0015 LeftLensSequence no 0046,0018 CylinderSequence no 0046,0028 PrismSequence no 0046,0030 HorizontalPrismPower no 0046,0032 HorizontalPrismBase no 0046,0034 VerticalPrismPower no 0046,0036 VerticalPrismBase no 0046,0038 LensSegmentType no 0046,0040 OpticalTransmittance no 0046,0042 ChannelWidth no 0046,0044 PupilSize no 0046,0046 CornealSize no 0046,0060 DistancePupillaryDistance no 0046,0062 NearPupillaryDistance no 0046,0064 OtherPupillaryDistance no 0046,0075 RadiusOfCurvature no 0046,0076 KeratometricPower no 0046,0077 KeratometricAxis no 0046,0092 BackgroundColor no 0046,0094 Optotype no 0046,0095 OptotypePresentation no 0046,0100 AddNearSequence no 0046,0101 AddIntermediateSequence no 0046,0102 AddOtherSequence no 0046,0104 AddPower no 0046,0106 ViewingDistance no 0046,0125 ViewingDistanceType no 0046,0135 VisualAcuityModifiers no 0046,0137 DecimalVisualAcuity no 0046,0139 OptotypeDetailedDefinition no 0046,0146 SpherePower no 0046,0147 CylinderPower no 0050,0004 CalibrationImage no 0050,0010 DeviceSequence no 0050,0014 DeviceLength no 0050,0015 ContainerComponentWidth no 0050,0016 DeviceDiameter no 0050,0017 DeviceDiameterUnits no 0050,0018 DeviceVolume no 0050,0019 InterMarkerDistance no 0050,001B ContainerComponentID no 0050,0020 DeviceDescription no 0054,0010 EnergyWindowVector no 0054,0011 NumberOfEnergyWindows no 0054,0012 EnergyWindowInformationSequence no 0054,0013 EnergyWindowRangeSequence no 0054,0014 EnergyWindowLowerLimit no 0054,0015 EnergyWindowUpperLimit no 0054,0016 RadiopharmaceuticalInformationSeq no 0054,0017 ResidualSyringeCounts no 0054,0018 EnergyWindowName no 0054,0020 DetectorVector no 0054,0021 NumberOfDetectors no 0054,0022 DetectorInformationSequence no 0054,0030 PhaseVector no 0054,0031 NumberOfPhases no 0054,0032 PhaseInformationSequence no 0054,0033 NumberOfFramesInPhase no 0054,0036 PhaseDelay no 0054,0038 PauseBetweenFrames no 0054,0039 PhaseDescription no 0054,0050 RotationVector no 0054,0051 NumberOfRotations no 0054,0052 RotationInformationSequence no 0054,0053 NumberOfFramesInRotation no 0054,0060 RRIntervalVector no 0054,0061 NumberOfRRIntervals no 0054,0062 GatedInformationSequence no 0054,0063 DataInformationSequence no 0054,0070 TimeSlotVector no 0054,0071 NumberOfTimeSlots no 0054,0072 TimeSlotInformationSequence no 0054,0073 TimeSlotTime no 0054,0080 SliceVector no 0054,0081 NumberOfSlices no 0054,0090 AngularViewVector no 0054,0100 TimeSliceVector no 0054,0101 NumberOfTimeSlices no 0054,0200 StartAngle no 0054,0202 TypeOfDetectorMotion no 0054,0210 TriggerVector no 0054,0211 NumberOfTriggersInPhase no 0054,0220 ViewCodeSequence no 0054,0222 ViewModifierCodeSequence no 0054,0300 RadionuclideCodeSequence no 0054,0302 AdministrationRouteCodeSequence no 0054,0304 RadiopharmaceuticalCodeSequence no 0054,0306 CalibrationDataSequence no 0054,0308 EnergyWindowNumber no 0054,0400 ImageID no 0054,0410 PatientOrientationCodeSequence no 0054,0412 PatientOrientationModifierCodeSeq no 0054,0414 PatientGantryRelationshipCodeSeq no 0054,0500 SliceProgressionDirection no 0054,1000 SeriesType no 0054,1001 Units no 0054,1002 CountsSource no 0054,1004 ReprojectionMethod no 0054,1100 RandomsCorrectionMethod no 0054,1101 AttenuationCorrectionMethod no 0054,1102 DecayCorrection no 0054,1103 ReconstructionMethod no 0054,1104 DetectorLinesOfResponseUsed no 0054,1105 ScatterCorrectionMethod no 0054,1200 AxialAcceptance no 0054,1201 AxialMash no 0054,1202 TransverseMash no 0054,1203 DetectorElementSize no 0054,1210 CoincidenceWindowWidth no 0054,1220 SecondaryCountsType no 0054,1300 FrameReferenceTime no 0054,1310 PrimaryCountsAccumulated no 0054,1311 SecondaryCountsAccumulated no 0054,1320 SliceSensitivityFactor no 0054,1321 DecayFactor no 0054,1322 DoseCalibrationFactor no 0054,1323 ScatterFractionFactor no 0054,1324 DeadTimeFactor no 0054,1330 ImageIndex no 0054,1400 CountsIncluded no 0054,1401 DeadTimeCorrectionFlag no 0060,3000 HistogramSequence no 0060,3002 HistogramNumberOfBins no 0060,3004 HistogramFirstBinValue no 0060,3006 HistogramLastBinValue no 0060,3008 HistogramBinWidth no 0060,3010 HistogramExplanation no 0060,3020 HistogramData no 0062,0001 SegmentationType no 0062,0002 SegmentSequence no 0062,0003 SegmentedPropertyCategoryCodeSeq no 0062,0004 SegmentNumber no 0062,0005 SegmentLabel no 0062,0006 SegmentDescription no 0062,0008 SegmentAlgorithmType no 0062,0009 SegmentAlgorithmName no 0062,000A SegmentIdentificationSequence no 0062,000B ReferencedSegmentNumber no 0062,000C RecommendedDisplayGrayscaleValue no 0062,000D RecommendedDisplayCIELabValue no 0062,000E MaximumFractionalValue no 0062,000F SegmentedPropertyTypeCodeSequence no 0062,0010 SegmentationFractionalType no 0064,0002 DeformableRegistrationSequence no 0064,0003 SourceFrameOfReferenceUID no 0064,0005 DeformableRegistrationGridSequence no 0064,0007 GridDimensions no 0064,0008 GridResolution no 0064,0009 VectorGridData no 0064,000F PreDeformationMatrixRegistSeq no 0064,0010 PostDeformationMatrixRegistSeq no 0066,0001 NumberOfSurfaces no 0066,0002 SurfaceSequence no 0066,0003 SurfaceNumber no 0066,0004 SurfaceComments no 0066,0009 SurfaceProcessing no 0066,000A SurfaceProcessingRatio no 0066,000E FiniteVolume no 0066,0010 Manifold no 0066,0011 SurfacePointsSequence no 0066,0015 NumberOfSurfacePoints no 0066,0016 PointCoordinatesData no 0066,0017 PointPositionAccuracy no 0066,0018 MeanPointDistance no 0066,0019 MaximumPointDistance no 0066,001B AxisOfRotation no 0066,001C CenterOfRotation no 0066,001E NumberOfVectors no 0066,001F VectorDimensionality no 0066,0020 VectorAccuracy no 0066,0021 VectorCoordinateData no 0066,0023 TrianglePointIndexList no 0066,0024 EdgePointIndexList no 0066,0025 VertexPointIndexList no 0066,0026 TriangleStripSequence no 0066,0027 TriangleFanSequence no 0066,0028 LineSequence no 0066,0029 PrimitivePointIndexList no 0066,002A SurfaceCount no 0066,002F AlgorithmFamilyCodeSequ no 0066,0031 AlgorithmVersion no 0066,0032 AlgorithmParameters no 0066,0034 FacetSequence no 0066,0036 AlgorithmName no 0070,0001 GraphicAnnotationSequence no 0070,0002 GraphicLayer no 0070,0003 BoundingBoxAnnotationUnits no 0070,0004 AnchorPointAnnotationUnits no 0070,0005 GraphicAnnotationUnits no 0070,0006 UnformattedTextValue no 0070,0008 TextObjectSequence no 0070,0009 GraphicObjectSequence no 0070,0010 BoundingBoxTopLeftHandCorner no 0070,0011 BoundingBoxBottomRightHandCorner no 0070,0012 BoundingBoxTextHorizJustification no 0070,0014 AnchorPoint no 0070,0015 AnchorPointVisibility no 0070,0020 GraphicDimensions no 0070,0021 NumberOfGraphicPoints no 0070,0022 GraphicData no 0070,0023 GraphicType no 0070,0024 GraphicFilled no 0070,0040 ImageRotationRetired no 0070,0041 ImageHorizontalFlip no 0070,0042 ImageRotation no 0070,0050 DisplayedAreaTopLeftTrial no 0070,0051 DisplayedAreaBottomRightTrial no 0070,0052 DisplayedAreaTopLeft no 0070,0053 DisplayedAreaBottomRight no 0070,005A DisplayedAreaSelectionSequence no 0070,0060 GraphicLayerSequence no 0070,0062 GraphicLayerOrder no 0070,0066 GraphicLayerRecDisplayGraysclValue no 0070,0067 GraphicLayerRecDisplayRGBValue no 0070,0068 GraphicLayerDescription no 0070,0080 ContentLabel no 0070,0081 ContentDescription no 0070,0082 PresentationCreationDate no 0070,0083 PresentationCreationTime no 0070,0084 ContentCreatorName no 0070,0086 ContentCreatorIDCodeSequence no 0070,0100 PresentationSizeMode no 0070,0101 PresentationPixelSpacing no 0070,0102 PresentationPixelAspectRatio no 0070,0103 PresentationPixelMagRatio no 0070,0306 ShapeType no 0070,0308 RegistrationSequence no 0070,0309 MatrixRegistrationSequence no 0070,030A MatrixSequence no 0070,030C FrameOfRefTransformationMatrixType no 0070,030D RegistrationTypeCodeSequence no 0070,030F FiducialDescription no 0070,0310 FiducialIdentifier no 0070,0311 FiducialIdentifierCodeSequence no 0070,0312 ContourUncertaintyRadius no 0070,0314 UsedFiducialsSequence no 0070,0318 GraphicCoordinatesDataSequence no 0070,031A FiducialUID no 0070,031C FiducialSetSequence no 0070,031E FiducialSequence no 0070,0401 GraphicLayerRecomDisplayCIELabVal no 0070,0402 BlendingSequence no 0070,0403 RelativeOpacity no 0070,0404 ReferencedSpatialRegistrationSeq no 0070,0405 BlendingPosition no 0072,0002 HangingProtocolName no 0072,0004 HangingProtocolDescription no 0072,0006 HangingProtocolLevel no 0072,0008 HangingProtocolCreator no 0072,000A HangingProtocolCreationDateTime no 0072,000C HangingProtocolDefinitionSequence no 0072,000E HangingProtocolUserIDCodeSequence no 0072,0010 HangingProtocolUserGroupName no 0072,0012 SourceHangingProtocolSequence no 0072,0014 NumberOfPriorsReferenced no 0072,0020 ImageSetsSequence no 0072,0022 ImageSetSelectorSequence no 0072,0024 ImageSetSelectorUsageFlag no 0072,0026 SelectorAttribute no 0072,0028 SelectorValueNumber no 0072,0030 TimeBasedImageSetsSequence no 0072,0032 ImageSetNumber no 0072,0034 ImageSetSelectorCategory no 0072,0038 RelativeTime no 0072,003A RelativeTimeUnits no 0072,003C AbstractPriorValue no 0072,003E AbstractPriorCodeSequence no 0072,0040 ImageSetLabel no 0072,0050 SelectorAttributeVR no 0072,0052 SelectorSequencePointer no 0072,0054 SelectorSeqPointerPrivateCreator no 0072,0056 SelectorAttributePrivateCreator no 0072,0060 SelectorATValue no 0072,0062 SelectorCSValue no 0072,0064 SelectorISValue no 0072,0066 SelectorLOValue no 0072,0068 SelectorLTValue no 0072,006A SelectorPNValue no 0072,006C SelectorSHValue no 0072,006E SelectorSTValue no 0072,0070 SelectorUTValue no 0072,0072 SelectorDSValue no 0072,0074 SelectorFDValue no 0072,0076 SelectorFLValue no 0072,0078 SelectorULValue no 0072,007A SelectorUSValue no 0072,007C SelectorSLValue no 0072,007E SelectorSSValue no 0072,0080 SelectorCodeSequenceValue no 0072,0100 NumberOfScreens no 0072,0102 NominalScreenDefinitionSequence no 0072,0104 NumberOfVerticalPixels no 0072,0106 NumberOfHorizontalPixels no 0072,0108 DisplayEnvironmentSpatialPosition no 0072,010A ScreenMinimumGrayscaleBitDepth no 0072,010C ScreenMinimumColorBitDepth no 0072,010E ApplicationMaximumRepaintTime no 0072,0200 DisplaySetsSequence no 0072,0202 DisplaySetNumber no 0072,0203 DisplaySetLabel no 0072,0204 DisplaySetPresentationGroup no 0072,0206 DisplaySetPresentationGroupDescr no 0072,0208 PartialDataDisplayHandling no 0072,0210 SynchronizedScrollingSequence no 0072,0212 DisplaySetScrollingGroup no 0072,0214 NavigationIndicatorSequence no 0072,0216 NavigationDisplaySet no 0072,0218 ReferenceDisplaySets no 0072,0300 ImageBoxesSequence no 0072,0302 ImageBoxNumber no 0072,0304 ImageBoxLayoutType no 0072,0306 ImageBoxTileHorizontalDimension no 0072,0308 ImageBoxTileVerticalDimension no 0072,0310 ImageBoxScrollDirection no 0072,0312 ImageBoxSmallScrollType no 0072,0314 ImageBoxSmallScrollAmount no 0072,0316 ImageBoxLargeScrollType no 0072,0318 ImageBoxLargeScrollAmount no 0072,0320 ImageBoxOverlapPriority no 0072,0330 CineRelativeToRealTime no 0072,0400 FilterOperationsSequence no 0072,0402 FilterByCategory no 0072,0404 FilterByAttributePresence no 0072,0406 FilterByOperator no 0072,0432 SynchronizedImageBoxList no 0072,0434 TypeOfSynchronization no 0072,0500 BlendingOperationType no 0072,0510 ReformattingOperationType no 0072,0512 ReformattingThickness no 0072,0514 ReformattingInterval no 0072,0516 ReformattingOpInitialViewDir no 0072,0520 RenderingType3D no 0072,0600 SortingOperationsSequence no 0072,0602 SortByCategory no 0072,0604 SortingDirection no 0072,0700 DisplaySetPatientOrientation no 0072,0702 VOIType no 0072,0704 PseudoColorType no 0072,0706 ShowGrayscaleInverted no 0072,0710 ShowImageTrueSizeFlag no 0072,0712 ShowGraphicAnnotationFlag no 0072,0714 ShowPatientDemographicsFlag no 0072,0716 ShowAcquisitionTechniquesFlag no 0072,0717 DisplaySetHorizontalJustification no 0072,0718 DisplaySetVerticalJustification no 0074,1000 UnifiedProcedureStepState no 0074,1002 UPSProgressInformationSequence no 0074,1004 UnifiedProcedureStepProgress no 0074,1006 UnifiedProcedureStepProgressDescr no 0074,1008 UnifiedProcedureStepComURISeq no 0074,100a ContactURI no 0074,100c ContactDisplayName no 0074,1020 BeamTaskSequence no 0074,1022 BeamTaskType no 0074,1024 BeamOrderIndex no 0074,1030 DeliveryVerificationImageSequence no 0074,1032 VerificationImageTiming no 0074,1034 DoubleExposureFlag no 0074,1036 DoubleExposureOrdering no 0074,1038 DoubleExposureMeterset no 0074,103A DoubleExposureFieldDelta no 0074,1040 RelatedReferenceRTImageSequence no 0074,1042 GeneralMachineVerificationSequence no 0074,1044 ConventionalMachineVerificationSeq no 0074,1046 IonMachineVerificationSequence no 0074,1048 FailedAttributesSequence no 0074,104A OverriddenAttributesSequence no 0074,104C ConventionalControlPointVerifySeq no 0074,104E IonControlPointVerificationSeq no 0074,1050 AttributeOccurrenceSequence no 0074,1052 AttributeOccurrencePointer no 0074,1054 AttributeItemSelector no 0074,1056 AttributeOccurrencePrivateCreator no 0074,1200 ScheduledProcedureStepPriority no 0074,1202 WorklistLabel no 0074,1204 ProcedureStepLabel no 0074,1210 ScheduledProcessingParametersSeq no 0074,1212 PerformedProcessingParametersSeq no 0074,1216 UPSPerformedProcedureSequence no 0074,1220 RelatedProcedureStepSequence no 0074,1222 ProcedureStepRelationshipType no 0074,1230 DeletionLock no 0074,1234 ReceivingAE no 0074,1236 RequestingAE no 0074,1238 ReasonForCancellation no 0074,1242 SCPStatus no 0074,1244 SubscriptionListStatus no 0074,1246 UPSListStatus no 0088,0130 StorageMediaFileSetID no 0088,0140 StorageMediaFileSetUID no 0088,0200 IconImageSequence no 0088,0904 TopicTitle no 0088,0906 TopicSubject no 0088,0910 TopicAuthor no 0088,0912 TopicKeywords no 0100,0410 SOPInstanceStatus no 0100,0420 SOPAuthorizationDateAndTime no 0100,0424 SOPAuthorizationComment no 0100,0426 AuthorizationEquipmentCertNumber no 0400,0005 MACIDNumber no 0400,0010 MACCalculationTransferSyntaxUID no 0400,0015 MACAlgorithm no 0400,0020 DataElementsSigned no 0400,0100 DigitalSignatureUID no 0400,0105 DigitalSignatureDateTime no 0400,0110 CertificateType no 0400,0115 CertificateOfSigner no 0400,0120 Signature no 0400,0305 CertifiedTimestampType no 0400,0310 CertifiedTimestamp no 0400,0401 DigitalSignaturePurposeCodeSeq no 0400,0402 ReferencedDigitalSignatureSeq no 0400,0403 ReferencedSOPInstanceMACSeq no 0400,0404 MAC no 0400,0500 EncryptedAttributesSequence no 0400,0510 EncryptedContentTransferSyntaxUID no 0400,0520 EncryptedContent no 0400,0550 ModifiedAttributesSequence no 0400,0561 OriginalAttributesSequence no 0400,0562 AttributeModificationDateTime no 0400,0563 ModifyingSystem no 0400,0564 SourceOfPreviousValues no 0400,0565 ReasonForTheAttributeModification no 1000,xxx0 EscapeTriplet no 1000,xxx1 RunLengthTriplet no 1000,xxx2 HuffmanTableSize no 1000,xxx3 HuffmanTableTriplet no 1000,xxx4 ShiftTableSize no 1000,xxx5 ShiftTableTriplet no 1010,xxxx ZonalMap no 2000,0010 NumberOfCopies no 2000,001E PrinterConfigurationSequence no 2000,0020 PrintPriority no 2000,0030 MediumType no 2000,0040 FilmDestination no 2000,0050 FilmSessionLabel no 2000,0060 MemoryAllocation no 2000,0061 MaximumMemoryAllocation no 2000,0062 ColorImagePrintingFlag no 2000,0063 CollationFlag no 2000,0065 AnnotationFlag no 2000,0067 ImageOverlayFlag no 2000,0069 PresentationLUTFlag no 2000,006A ImageBoxPresentationLUTFlag no 2000,00A0 MemoryBitDepth no 2000,00A1 PrintingBitDepth no 2000,00A2 MediaInstalledSequence no 2000,00A4 OtherMediaAvailableSequence no 2000,00A8 SupportedImageDisplayFormatSeq no 2000,0500 ReferencedFilmBoxSequence no 2000,0510 ReferencedStoredPrintSequence no 2010,0010 ImageDisplayFormat no 2010,0030 AnnotationDisplayFormatID no 2010,0040 FilmOrientation no 2010,0050 FilmSizeID no 2010,0052 PrinterResolutionID no 2010,0054 DefaultPrinterResolutionID no 2010,0060 MagnificationType no 2010,0080 SmoothingType no 2010,00A6 DefaultMagnificationType no 2010,00A7 OtherMagnificationTypesAvailable no 2010,00A8 DefaultSmoothingType no 2010,00A9 OtherSmoothingTypesAvailable no 2010,0100 BorderDensity no 2010,0110 EmptyImageDensity no 2010,0120 MinDensity no 2010,0130 MaxDensity no 2010,0140 Trim no 2010,0150 ConfigurationInformation no 2010,0152 ConfigurationInformationDescr no 2010,0154 MaximumCollatedFilms no 2010,015E Illumination no 2010,0160 ReflectedAmbientLight no 2010,0376 PrinterPixelSpacing no 2010,0500 ReferencedFilmSessionSequence no 2010,0510 ReferencedImageBoxSequence no 2010,0520 ReferencedBasicAnnotationBoxSeq no 2020,0010 ImageBoxPosition no 2020,0020 Polarity no 2020,0030 RequestedImageSize no 2020,0040 RequestedDecimate-CropBehavior no 2020,0050 RequestedResolutionID no 2020,00A0 RequestedImageSizeFlag no 2020,00A2 DecimateCropResult no 2020,0110 BasicGrayscaleImageSequence no 2020,0111 BasicColorImageSequence no 2020,0130 ReferencedImageOverlayBoxSequence no 2020,0140 ReferencedVOILUTBoxSequence no 2030,0010 AnnotationPosition no 2030,0020 TextString no 2040,0010 ReferencedOverlayPlaneSequence no 2040,0011 ReferencedOverlayPlaneGroups no 2040,0020 OverlayPixelDataSequence no 2040,0060 OverlayMagnificationType no 2040,0070 OverlaySmoothingType no 2040,0072 OverlayOrImageMagnification no 2040,0074 MagnifyToNumberOfColumns no 2040,0080 OverlayForegroundDensity no 2040,0082 OverlayBackgroundDensity no 2040,0090 OverlayMode no 2040,0100 ThresholdDensity no 2040,0500 ReferencedImageBoxSequence no 2050,0010 PresentationLUTSequence no 2050,0020 PresentationLUTShape no 2050,0500 ReferencedPresentationLUTSequence no 2100,0010 PrintJobID no 2100,0020 ExecutionStatus no 2100,0030 ExecutionStatusInfo no 2100,0040 CreationDate no 2100,0050 CreationTime no 2100,0070 Originator no 2100,0140 DestinationAE no 2100,0160 OwnerID no 2100,0170 NumberOfFilms no 2100,0500 ReferencedPrintJobSequence no 2110,0010 PrinterStatus no 2110,0020 PrinterStatusInfo no 2110,0030 PrinterName no 2110,0099 PrintQueueID no 2120,0010 QueueStatus no 2120,0050 PrintJobDescriptionSequence no 2120,0070 ReferencedPrintJobSequence no 2130,0010 PrintManagementCapabilitiesSeq no 2130,0015 PrinterCharacteristicsSequence no 2130,0030 FilmBoxContentSequence no 2130,0040 ImageBoxContentSequence no 2130,0050 AnnotationContentSequence no 2130,0060 ImageOverlayBoxContentSequence no 2130,0080 PresentationLUTContentSequence no 2130,00A0 ProposedStudySequence no 2130,00C0 OriginalImageSequence no 2200,0001 LabelFromInfoExtractedFromInstance no 2200,0002 LabelText no 2200,0003 LabelStyleSelection no 2200,0004 MediaDisposition no 2200,0005 BarcodeValue no 2200,0006 BarcodeSymbology no 2200,0007 AllowMediaSplitting no 2200,0008 IncludeNonDICOMObjects no 2200,0009 IncludeDisplayApplication no 2200,000A SaveCompInstancesAfterMediaCreate no 2200,000B TotalNumberMediaPiecesCreated no 2200,000C RequestedMediaApplicationProfile no 2200,000D ReferencedStorageMediaSequence no 2200,000E FailureAttributes no 2200,000F AllowLossyCompression no 2200,0020 RequestPriority no 3002,0002 RTImageLabel no 3002,0003 RTImageName no 3002,0004 RTImageDescription no 3002,000A ReportedValuesOrigin no 3002,000C RTImagePlane no 3002,000D XRayImageReceptorTranslation no 3002,000E XRayImageReceptorAngle no 3002,0010 RTImageOrientation no 3002,0011 ImagePlanePixelSpacing no 3002,0012 RTImagePosition no 3002,0020 RadiationMachineName no 3002,0022 RadiationMachineSAD no 3002,0024 RadiationMachineSSD no 3002,0026 RTImageSID no 3002,0028 SourceToReferenceObjectDistance no 3002,0029 FractionNumber no 3002,0030 ExposureSequence no 3002,0032 MetersetExposure no 3002,0034 DiaphragmPosition no 3002,0040 FluenceMapSequence no 3002,0041 FluenceDataSource no 3002,0042 FluenceDataScale no 3002,0051 FluenceMode no 3002,0052 FluenceModeID no 3004,0001 DVHType no 3004,0002 DoseUnits no 3004,0004 DoseType no 3004,0006 DoseComment no 3004,0008 NormalizationPoint no 3004,000A DoseSummationType no 3004,000C GridFrameOffsetVector no 3004,000E DoseGridScaling no 3004,0010 RTDoseROISequence no 3004,0012 DoseValue no 3004,0014 TissueHeterogeneityCorrection no 3004,0040 DVHNormalizationPoint no 3004,0042 DVHNormalizationDoseValue no 3004,0050 DVHSequence no 3004,0052 DVHDoseScaling no 3004,0054 DVHVolumeUnits no 3004,0056 DVHNumberOfBins no 3004,0058 DVHData no 3004,0060 DVHReferencedROISequence no 3004,0062 DVHROIContributionType no 3004,0070 DVHMinimumDose no 3004,0072 DVHMaximumDose no 3004,0074 DVHMeanDose no 3006,0002 StructureSetLabel no 3006,0004 StructureSetName no 3006,0006 StructureSetDescription no 3006,0008 StructureSetDate no 3006,0009 StructureSetTime no 3006,0010 ReferencedFrameOfReferenceSequence no 3006,0012 RTReferencedStudySequence no 3006,0014 RTReferencedSeriesSequence no 3006,0016 ContourImageSequence no 3006,0020 StructureSetROISequence no 3006,0022 ROINumber no 3006,0024 ReferencedFrameOfReferenceUID no 3006,0026 ROIName no 3006,0028 ROIDescription no 3006,002A ROIDisplayColor no 3006,002C ROIVolume no 3006,0030 RTRelatedROISequence no 3006,0033 RTROIRelationship no 3006,0036 ROIGenerationAlgorithm no 3006,0038 ROIGenerationDescription no 3006,0039 ROIContourSequence no 3006,0040 ContourSequence no 3006,0042 ContourGeometricType no 3006,0044 ContourSlabThickness no 3006,0045 ContourOffsetVector no 3006,0046 NumberOfContourPoints no 3006,0048 ContourNumber no 3006,0049 AttachedContours no 3006,0050 ContourData no 3006,0080 RTROIObservationsSequence no 3006,0082 ObservationNumber no 3006,0084 ReferencedROINumber no 3006,0085 ROIObservationLabel no 3006,0086 RTROIIdentificationCodeSequence no 3006,0088 ROIObservationDescription no 3006,00A0 RelatedRTROIObservationsSequence no 3006,00A4 RTROIInterpretedType no 3006,00A6 ROIInterpreter no 3006,00B0 ROIPhysicalPropertiesSequence no 3006,00B2 ROIPhysicalProperty no 3006,00B4 ROIPhysicalPropertyValue no 3006,00B6 ROIElementalCompositionSequence no 3006,00B7 ROIElementalCompAtomicNumber no 3006,00B8 ROIElementalCompAtomicMassFraction no 3006,00C0 FrameOfReferenceRelationshipSeq no 3006,00C2 RelatedFrameOfReferenceUID no 3006,00C4 FrameOfReferenceTransformType no 3006,00C6 FrameOfReferenceTransformMatrix no 3006,00C8 FrameOfReferenceTransformComment no 3008,0010 MeasuredDoseReferenceSequence no 3008,0012 MeasuredDoseDescription no 3008,0014 MeasuredDoseType no 3008,0016 MeasuredDoseValue no 3008,0020 TreatmentSessionBeamSequence no 3008,0021 TreatmentSessionIonBeamSequence no 3008,0022 CurrentFractionNumber no 3008,0024 TreatmentControlPointDate no 3008,0025 TreatmentControlPointTime no 3008,002A TreatmentTerminationStatus no 3008,002B TreatmentTerminationCode no 3008,002C TreatmentVerificationStatus no 3008,0030 ReferencedTreatmentRecordSequence no 3008,0032 SpecifiedPrimaryMeterset no 3008,0033 SpecifiedSecondaryMeterset no 3008,0036 DeliveredPrimaryMeterset no 3008,0037 DeliveredSecondaryMeterset no 3008,003A SpecifiedTreatmentTime no 3008,003B DeliveredTreatmentTime no 3008,0040 ControlPointDeliverySequence no 3008,0041 IonControlPointDeliverySequence no 3008,0042 SpecifiedMeterset no 3008,0044 DeliveredMeterset no 3008,0045 MetersetRateSet no 3008,0046 MetersetRateDelivered no 3008,0047 ScanSpotMetersetsDelivered no 3008,0048 DoseRateDelivered no 3008,0050 TreatmentSummaryCalcDoseRefSeq no 3008,0052 CumulativeDoseToDoseReference no 3008,0054 FirstTreatmentDate no 3008,0056 MostRecentTreatmentDate no 3008,005A NumberOfFractionsDelivered no 3008,0060 OverrideSequence no 3008,0061 ParameterSequencePointer no 3008,0062 OverrideParameterPointer no 3008,0063 ParameterItemIndex no 3008,0064 MeasuredDoseReferenceNumber no 3008,0065 ParameterPointer no 3008,0066 OverrideReason no 3008,0068 CorrectedParameterSequence no 3008,006A CorrectionValue no 3008,0070 CalculatedDoseReferenceSequence no 3008,0072 CalculatedDoseReferenceNumber no 3008,0074 CalculatedDoseReferenceDescription no 3008,0076 CalculatedDoseReferenceDoseValue no 3008,0078 StartMeterset no 3008,007A EndMeterset no 3008,0080 ReferencedMeasuredDoseReferenceSeq no 3008,0082 ReferencedMeasuredDoseReferenceNum no 3008,0090 ReferencedCalculatedDoseRefSeq no 3008,0092 ReferencedCalculatedDoseRefNumber no 3008,00A0 BeamLimitingDeviceLeafPairsSeq no 3008,00B0 RecordedWedgeSequence no 3008,00C0 RecordedCompensatorSequence no 3008,00D0 RecordedBlockSequence no 3008,00E0 TreatmentSummaryMeasuredDoseRefSeq no 3008,00F0 RecordedSnoutSequence no 3008,00F2 RecordedRangeShifterSequence no 3008,00F4 RecordedLateralSpreadingDeviceSeq no 3008,00F6 RecordedRangeModulatorSequence no 3008,0100 RecordedSourceSequence no 3008,0105 SourceSerialNumber no 3008,0110 TreatmentSessionAppSetupSeq no 3008,0116 ApplicationSetupCheck no 3008,0120 RecordedBrachyAccessoryDeviceSeq no 3008,0122 ReferencedBrachyAccessoryDeviceNum no 3008,0130 RecordedChannelSequence no 3008,0132 SpecifiedChannelTotalTime no 3008,0134 DeliveredChannelTotalTime no 3008,0136 SpecifiedNumberOfPulses no 3008,0138 DeliveredNumberOfPulses no 3008,013A SpecifiedPulseRepetitionInterval no 3008,013C DeliveredPulseRepetitionInterval no 3008,0140 RecordedSourceApplicatorSequence no 3008,0142 ReferencedSourceApplicatorNumber no 3008,0150 RecordedChannelShieldSequence no 3008,0152 ReferencedChannelShieldNumber no 3008,0160 BrachyControlPointDeliveredSeq no 3008,0162 SafePositionExitDate no 3008,0164 SafePositionExitTime no 3008,0166 SafePositionReturnDate no 3008,0168 SafePositionReturnTime no 3008,0200 CurrentTreatmentStatus no 3008,0202 TreatmentStatusComment no 3008,0220 FractionGroupSummarySequence no 3008,0223 ReferencedFractionNumber no 3008,0224 FractionGroupType no 3008,0230 BeamStopperPosition no 3008,0240 FractionStatusSummarySequence no 3008,0250 TreatmentDate no 3008,0251 TreatmentTime no 300A,0002 RTPlanLabel no 300A,0003 RTPlanName no 300A,0004 RTPlanDescription no 300A,0006 RTPlanDate no 300A,0007 RTPlanTime no 300A,0009 TreatmentProtocols no 300A,000A PlanIntent no 300A,000B TreatmentSites no 300A,000C RTPlanGeometry no 300A,000E PrescriptionDescription no 300A,0010 DoseReferenceSequence no 300A,0012 DoseReferenceNumber no 300A,0013 DoseReferenceUID no 300A,0014 DoseReferenceStructureType no 300A,0015 NominalBeamEnergyUnit no 300A,0016 DoseReferenceDescription no 300A,0018 DoseReferencePointCoordinates no 300A,001A NominalPriorDose no 300A,0020 DoseReferenceType no 300A,0021 ConstraintWeight no 300A,0022 DeliveryWarningDose no 300A,0023 DeliveryMaximumDose no 300A,0025 TargetMinimumDose no 300A,0026 TargetPrescriptionDose no 300A,0027 TargetMaximumDose no 300A,0028 TargetUnderdoseVolumeFraction no 300A,002A OrganAtRiskFullVolumeDose no 300A,002B OrganAtRiskLimitDose no 300A,002C OrganAtRiskMaximumDose no 300A,002D OrganAtRiskOverdoseVolumeFraction no 300A,0040 ToleranceTableSequence no 300A,0042 ToleranceTableNumber no 300A,0043 ToleranceTableLabel no 300A,0044 GantryAngleTolerance no 300A,0046 BeamLimitingDeviceAngleTolerance no 300A,0048 BeamLimitingDeviceToleranceSeq no 300A,004A BeamLimitingDevicePositionTol no 300A,004B SnoutPositionTolerance no 300A,004C PatientSupportAngleTolerance no 300A,004E TableTopEccentricAngleTolerance no 300A,004F TableTopPitchAngleTolerance no 300A,0050 TableTopRollAngleTolerance no 300A,0051 TableTopVerticalPositionTolerance no 300A,0052 TableTopLongitudinalPositionTol no 300A,0053 TableTopLateralPositionTolerance no 300A,0055 RTPlanRelationship no 300A,0070 FractionGroupSequence no 300A,0071 FractionGroupNumber no 300A,0072 FractionGroupDescription no 300A,0078 NumberOfFractionsPlanned no 300A,0079 NumberFractionPatternDigitsPerDay no 300A,007A RepeatFractionCycleLength no 300A,007B FractionPattern no 300A,0080 NumberOfBeams no 300A,0082 BeamDoseSpecificationPoint no 300A,0084 BeamDose no 300A,0086 BeamMeterset no 300A,0088 BeamDosePointDepth no 300A,0089 BeamDosePointEquivalentDepth no 300A,008A BeamDosePointSSD no 300A,00A0 NumberOfBrachyApplicationSetups no 300A,00A2 BrachyAppSetupDoseSpecPoint no 300A,00A4 BrachyApplicationSetupDose no 300A,00B0 BeamSequence no 300A,00B2 TreatmentMachineName no 300A,00B3 PrimaryDosimeterUnit no 300A,00B4 SourceAxisDistance no 300A,00B6 BeamLimitingDeviceSequence no 300A,00B8 RTBeamLimitingDeviceType no 300A,00BA SourceToBeamLimitingDeviceDistance no 300A,00BB IsocenterToBeamLimitingDeviceDist no 300A,00BC NumberOfLeafJawPairs no 300A,00BE LeafPositionBoundaries no 300A,00C0 BeamNumber no 300A,00C2 BeamName no 300A,00C3 BeamDescription no 300A,00C4 BeamType no 300A,00C6 RadiationType no 300A,00C7 HighDoseTechniqueType no 300A,00C8 ReferenceImageNumber no 300A,00CA PlannedVerificationImageSequence no 300A,00CC ImagingDeviceSpecificAcqParams no 300A,00CE TreatmentDeliveryType no 300A,00D0 NumberOfWedges no 300A,00D1 WedgeSequence no 300A,00D2 WedgeNumber no 300A,00D3 WedgeType no 300A,00D4 WedgeID no 300A,00D5 WedgeAngle no 300A,00D6 WedgeFactor no 300A,00D7 TotalWedgeTrayWaterEquivThickness no 300A,00D8 WedgeOrientation no 300A,00D9 IsocenterToWedgeTrayDistance no 300A,00DA SourceToWedgeTrayDistance no 300A,00DB WedgeThinEdgePosition no 300A,00DC BolusID no 300A,00DD BolusDescription no 300A,00E0 NumberOfCompensators no 300A,00E1 MaterialID no 300A,00E2 TotalCompensatorTrayFactor no 300A,00E3 CompensatorSequence no 300A,00E4 CompensatorNumber no 300A,00E5 CompensatorID no 300A,00E6 SourceToCompensatorTrayDistance no 300A,00E7 CompensatorRows no 300A,00E8 CompensatorColumns no 300A,00E9 CompensatorPixelSpacing no 300A,00EA CompensatorPosition no 300A,00EB CompensatorTransmissionData no 300A,00EC CompensatorThicknessData no 300A,00ED NumberOfBoli no 300A,00EE CompensatorType no 300A,00F0 NumberOfBlocks no 300A,00F2 TotalBlockTrayFactor no 300A,00F3 TotalBlockTrayWaterEquivThickness no 300A,00F4 BlockSequence no 300A,00F5 BlockTrayID no 300A,00F6 SourceToBlockTrayDistance no 300A,00F7 IsocenterToBlockTrayDistance no 300A,00F8 BlockType no 300A,00F9 AccessoryCode no 300A,00FA BlockDivergence no 300A,00FB BlockMountingPosition no 300A,00FC BlockNumber no 300A,00FE BlockName no 300A,0100 BlockThickness no 300A,0102 BlockTransmission no 300A,0104 BlockNumberOfPoints no 300A,0106 BlockData no 300A,0107 ApplicatorSequence no 300A,0108 ApplicatorID no 300A,0109 ApplicatorType no 300A,010A ApplicatorDescription no 300A,010C CumulativeDoseReferenceCoefficient no 300A,010E FinalCumulativeMetersetWeight no 300A,0110 NumberOfControlPoints no 300A,0111 ControlPointSequence no 300A,0112 ControlPointIndex no 300A,0114 NominalBeamEnergy no 300A,0115 DoseRateSet no 300A,0116 WedgePositionSequence no 300A,0118 WedgePosition no 300A,011A BeamLimitingDevicePositionSequence no 300A,011C LeafJawPositions no 300A,011E GantryAngle no 300A,011F GantryRotationDirection no 300A,0120 BeamLimitingDeviceAngle no 300A,0121 BeamLimitingDeviceRotateDirection no 300A,0122 PatientSupportAngle no 300A,0123 PatientSupportRotationDirection no 300A,0124 TableTopEccentricAxisDistance no 300A,0125 TableTopEccentricAngle no 300A,0126 TableTopEccentricRotateDirection no 300A,0128 TableTopVerticalPosition no 300A,0129 TableTopLongitudinalPosition no 300A,012A TableTopLateralPosition no 300A,012C IsocenterPosition no 300A,012E SurfaceEntryPoint no 300A,0130 SourceToSurfaceDistance no 300A,0134 CumulativeMetersetWeight no 300A,0140 TableTopPitchAngle no 300A,0142 TableTopPitchRotationDirection no 300A,0144 TableTopRollAngle no 300A,0146 TableTopRollRotationDirection no 300A,0148 HeadFixationAngle no 300A,014A GantryPitchAngle no 300A,014C GantryPitchRotationDirection no 300A,014E GantryPitchAngleTolerance no 300A,0180 PatientSetupSequence no 300A,0182 PatientSetupNumber no 300A,0183 PatientSetupLabel no 300A,0184 PatientAdditionalPosition no 300A,0190 FixationDeviceSequence no 300A,0192 FixationDeviceType no 300A,0194 FixationDeviceLabel no 300A,0196 FixationDeviceDescription no 300A,0198 FixationDevicePosition no 300A,0199 FixationDevicePitchAngle no 300A,019A FixationDeviceRollAngle no 300A,01A0 ShieldingDeviceSequence no 300A,01A2 ShieldingDeviceType no 300A,01A4 ShieldingDeviceLabel no 300A,01A6 ShieldingDeviceDescription no 300A,01A8 ShieldingDevicePosition no 300A,01B0 SetupTechnique no 300A,01B2 SetupTechniqueDescription no 300A,01B4 SetupDeviceSequence no 300A,01B6 SetupDeviceType no 300A,01B8 SetupDeviceLabel no 300A,01BA SetupDeviceDescription no 300A,01BC SetupDeviceParameter no 300A,01D0 SetupReferenceDescription no 300A,01D2 TableTopVerticalSetupDisplacement no 300A,01D4 TableTopLongitudinalSetupDisplace no 300A,01D6 TableTopLateralSetupDisplacement no 300A,0200 BrachyTreatmentTechnique no 300A,0202 BrachyTreatmentType no 300A,0206 TreatmentMachineSequence no 300A,0210 SourceSequence no 300A,0212 SourceNumber no 300A,0214 SourceType no 300A,0216 SourceManufacturer no 300A,0218 ActiveSourceDiameter no 300A,021A ActiveSourceLength no 300A,0222 SourceEncapsulationNomThickness no 300A,0224 SourceEncapsulationNomTransmission no 300A,0226 SourceIsotopeName no 300A,0228 SourceIsotopeHalfLife no 300A,0229 SourceStrengthUnits no 300A,022A ReferenceAirKermaRate no 300A,022B SourceStrength no 300A,022C SourceStrengthReferenceDate no 300A,022E SourceStrengthReferenceTime no 300A,0230 ApplicationSetupSequence no 300A,0232 ApplicationSetupType no 300A,0234 ApplicationSetupNumber no 300A,0236 ApplicationSetupName no 300A,0238 ApplicationSetupManufacturer no 300A,0240 TemplateNumber no 300A,0242 TemplateType no 300A,0244 TemplateName no 300A,0250 TotalReferenceAirKerma no 300A,0260 BrachyAccessoryDeviceSequence no 300A,0262 BrachyAccessoryDeviceNumber no 300A,0263 BrachyAccessoryDeviceID no 300A,0264 BrachyAccessoryDeviceType no 300A,0266 BrachyAccessoryDeviceName no 300A,026A BrachyAccessoryDeviceNomThickness no 300A,026C BrachyAccessoryDevNomTransmission no 300A,0280 ChannelSequence no 300A,0282 ChannelNumber no 300A,0284 ChannelLength no 300A,0286 ChannelTotalTime no 300A,0288 SourceMovementType no 300A,028A NumberOfPulses no 300A,028C PulseRepetitionInterval no 300A,0290 SourceApplicatorNumber no 300A,0291 SourceApplicatorID no 300A,0292 SourceApplicatorType no 300A,0294 SourceApplicatorName no 300A,0296 SourceApplicatorLength no 300A,0298 SourceApplicatorManufacturer no 300A,029C SourceApplicatorWallNomThickness no 300A,029E SourceApplicatorWallNomTrans no 300A,02A0 SourceApplicatorStepSize no 300A,02A2 TransferTubeNumber no 300A,02A4 TransferTubeLength no 300A,02B0 ChannelShieldSequence no 300A,02B2 ChannelShieldNumber no 300A,02B3 ChannelShieldID no 300A,02B4 ChannelShieldName no 300A,02B8 ChannelShieldNominalThickness no 300A,02BA ChannelShieldNominalTransmission no 300A,02C8 FinalCumulativeTimeWeight no 300A,02D0 BrachyControlPointSequence no 300A,02D2 ControlPointRelativePosition no 300A,02D4 ControlPoint3DPosition no 300A,02D6 CumulativeTimeWeight no 300A,02E0 CompensatorDivergence no 300A,02E1 CompensatorMountingPosition no 300A,02E2 SourceToCompensatorDistance no 300A,02E3 TotalCompTrayWaterEquivThickness no 300A,02E4 IsocenterToCompensatorTrayDistance no 300A,02E5 CompensatorColumnOffset no 300A,02E6 IsocenterToCompensatorDistances no 300A,02E7 CompensatorRelStoppingPowerRatio no 300A,02E8 CompensatorMillingToolDiameter no 300A,02EA IonRangeCompensatorSequence no 300A,02EB CompensatorDescription no 300A,0302 RadiationMassNumber no 300A,0304 RadiationAtomicNumber no 300A,0306 RadiationChargeState no 300A,0308 ScanMode no 300A,030A VirtualSourceAxisDistances no 300A,030C SnoutSequence no 300A,030D SnoutPosition no 300A,030F SnoutID no 300A,0312 NumberOfRangeShifters no 300A,0314 RangeShifterSequence no 300A,0316 RangeShifterNumber no 300A,0318 RangeShifterID no 300A,0320 RangeShifterType no 300A,0322 RangeShifterDescription no 300A,0330 NumberOfLateralSpreadingDevices no 300A,0332 LateralSpreadingDeviceSequence no 300A,0334 LateralSpreadingDeviceNumber no 300A,0336 LateralSpreadingDeviceID no 300A,0338 LateralSpreadingDeviceType no 300A,033A LateralSpreadingDeviceDescription no 300A,033C LateralSpreadingDevWaterEquivThick no 300A,0340 NumberOfRangeModulators no 300A,0342 RangeModulatorSequence no 300A,0344 RangeModulatorNumber no 300A,0346 RangeModulatorID no 300A,0348 RangeModulatorType no 300A,034A RangeModulatorDescription no 300A,034C BeamCurrentModulationID no 300A,0350 PatientSupportType no 300A,0352 PatientSupportID no 300A,0354 PatientSupportAccessoryCode no 300A,0356 FixationLightAzimuthalAngle no 300A,0358 FixationLightPolarAngle no 300A,035A MetersetRate no 300A,0360 RangeShifterSettingsSequence no 300A,0362 RangeShifterSetting no 300A,0364 IsocenterToRangeShifterDistance no 300A,0366 RangeShifterWaterEquivThickness no 300A,0370 LateralSpreadingDeviceSettingsSeq no 300A,0372 LateralSpreadingDeviceSetting no 300A,0374 IsocenterToLateralSpreadingDevDist no 300A,0380 RangeModulatorSettingsSequence no 300A,0382 RangeModulatorGatingStartValue no 300A,0384 RangeModulatorGatingStopValue no 300A,038A IsocenterToRangeModulatorDistance no 300A,0390 ScanSpotTuneID no 300A,0392 NumberOfScanSpotPositions no 300A,0394 ScanSpotPositionMap no 300A,0396 ScanSpotMetersetWeights no 300A,0398 ScanningSpotSize no 300A,039A NumberOfPaintings no 300A,03A0 IonToleranceTableSequence no 300A,03A2 IonBeamSequence no 300A,03A4 IonBeamLimitingDeviceSequence no 300A,03A6 IonBlockSequence no 300A,03A8 IonControlPointSequence no 300A,03AA IonWedgeSequence no 300A,03AC IonWedgePositionSequence no 300A,0401 ReferencedSetupImageSequence no 300A,0402 SetupImageComment no 300A,0410 MotionSynchronizationSequence no 300A,0412 ControlPointOrientation no 300A,0420 GeneralAccessorySequence no 300A,0421 GeneralAccessoryID no 300A,0422 GeneralAccessoryDescription no 300A,0423 GeneralAccessoryType no 300A,0424 GeneralAccessoryNumber no 300C,0002 ReferencedRTPlanSequence no 300C,0004 ReferencedBeamSequence no 300C,0006 ReferencedBeamNumber no 300C,0007 ReferencedReferenceImageNumber no 300C,0008 StartCumulativeMetersetWeight no 300C,0009 EndCumulativeMetersetWeight no 300C,000A ReferencedBrachyAppSetupSeq no 300C,000C ReferencedBrachyAppSetupNumber no 300C,000E ReferencedSourceNumber no 300C,0020 ReferencedFractionGroupSequence no 300C,0022 ReferencedFractionGroupNumber no 300C,0040 ReferencedVerificationImageSeq no 300C,0042 ReferencedReferenceImageSequence no 300C,0050 ReferencedDoseReferenceSequence no 300C,0051 ReferencedDoseReferenceNumber no 300C,0055 BrachyReferencedDoseReferenceSeq no 300C,0060 ReferencedStructureSetSequence no 300C,006A ReferencedPatientSetupNumber no 300C,0080 ReferencedDoseSequence no 300C,00A0 ReferencedToleranceTableNumber no 300C,00B0 ReferencedBolusSequence no 300C,00C0 ReferencedWedgeNumber no 300C,00D0 ReferencedCompensatorNumber no 300C,00E0 ReferencedBlockNumber no 300C,00F0 ReferencedControlPointIndex no 300C,00F2 ReferencedControlPointSequence no 300C,00F4 ReferencedStartControlPointIndex no 300C,00F6 ReferencedStopControlPointIndex no 300C,0100 ReferencedRangeShifterNumber no 300C,0102 ReferencedLateralSpreadingDevNum no 300C,0104 ReferencedRangeModulatorNumber no 300E,0002 ApprovalStatus no 300E,0004 ReviewDate no 300E,0005 ReviewTime no 300E,0008 ReviewerName no 4000,0000 TextGroupLength no 4000,0010 Arbitrary no 4000,4000 TextComments no 4008,0040 ResultsID no 4008,0042 ResultsIDIssuer no 4008,0050 ReferencedInterpretationSequence no 4008,0100 InterpretationRecordedDate no 4008,0101 InterpretationRecordedTime no 4008,0102 InterpretationRecorder no 4008,0103 ReferenceToRecordedSound no 4008,0108 InterpretationTranscriptionDate no 4008,0109 InterpretationTranscriptionTime no 4008,010A InterpretationTranscriber no 4008,010B InterpretationText no 4008,010C InterpretationAuthor no 4008,0111 InterpretationApproverSequence no 4008,0112 InterpretationApprovalDate no 4008,0113 InterpretationApprovalTime no 4008,0114 PhysicianApprovingInterpretation no 4008,0115 InterpretationDiagnosisDescription no 4008,0117 InterpretationDiagnosisCodeSeq no 4008,0118 ResultsDistributionListSequence no 4008,0119 DistributionName no 4008,011A DistributionAddress no 4008,0200 InterpretationID no 4008,0202 InterpretationIDIssuer no 4008,0210 InterpretationTypeID no 4008,0212 InterpretationStatusID no 4008,0300 Impressions no 4008,4000 ResultsComments no 4FFE,0001 MACParametersSequence no 50xx,0005 CurveDimensions no 50xx,0010 NumberOfPoints no 50xx,0020 TypeOfData no 50xx,0022 CurveDescription no 50xx,0030 AxisUnits no 50xx,0040 AxisLabels no 50xx,0103 DataValueRepresentation no 50xx,0104 MinimumCoordinateValue no 50xx,0105 MaximumCoordinateValue no 50xx,0106 CurveRange no 50xx,0110 CurveDataDescriptor no 50xx,0112 CoordinateStartValue no 50xx,0114 CoordinateStepValue no 50xx,1001 CurveActivationLayer no 50xx,2000 AudioType no 50xx,2002 AudioSampleFormat no 50xx,2004 NumberOfChannels no 50xx,2006 NumberOfSamples no 50xx,2008 SampleRate no 50xx,200A TotalTime no 50xx,200C AudioSampleData no 50xx,200E AudioComments no 50xx,2500 CurveLabel no 50xx,2600 ReferencedOverlaySequence no 50xx,2610 ReferencedOverlayGroup no 50xx,3000 CurveData no 5200,9229 SharedFunctionalGroupsSequence no 5200,9230 PerFrameFunctionalGroupsSequence no 5400,0100 WaveformSequence no 5400,0110 ChannelMinimumValue no 5400,0112 ChannelMaximumValue no 5400,1004 WaveformBitsAllocated no 5400,1006 WaveformSampleInterpretation no 5400,100A WaveformPaddingValue no 5400,1010 WaveformData no 5600,0010 FirstOrderPhaseCorrectionAngle no 5600,0020 SpectroscopyData no 6000,0000 OverlayGroupLength no 60xx,0010 OverlayRows no 60xx,0011 OverlayColumns no 60xx,0012 OverlayPlanes no 60xx,0015 NumberOfFramesInOverlay no 60xx,0022 OverlayDescription no 60xx,0040 OverlayType no 60xx,0045 OverlaySubtype no 60xx,0050 OverlayOrigin no 60xx,0051 ImageFrameOrigin no 60xx,0052 OverlayPlaneOrigin no 60xx,0060 OverlayCompressionCode no 60xx,0061 OverlayCompressionOriginator no 60xx,0062 OverlayCompressionLabel no 60xx,0063 OverlayCompressionDescription no 60xx,0066 OverlayCompressionStepPointers no 60xx,0068 OverlayRepeatInterval no 60xx,0069 OverlayBitsGrouped no 60xx,0100 OverlayBitsAllocated no 60xx,0102 OverlayBitPosition no 60xx,0110 OverlayFormat no 60xx,0200 OverlayLocation no 60xx,0800 OverlayCodeLabel no 60xx,0802 OverlayNumberOfTables no 60xx,0803 OverlayCodeTableLocation no 60xx,0804 OverlayBitsForCodeWord no 60xx,1001 OverlayActivationLayer no 60xx,1100 OverlayDescriptorGray no 60xx,1101 OverlayDescriptorRed no 60xx,1102 OverlayDescriptorGreen no 60xx,1103 OverlayDescriptorBlue no 60xx,1200 OverlaysGray no 60xx,1201 OverlaysRed no 60xx,1202 OverlaysGreen no 60xx,1203 OverlaysBlue no 60xx,1301 ROIArea no 60xx,1302 ROIMean no 60xx,1303 ROIStandardDeviation no 60xx,1500 OverlayLabel no 60xx,3000 OverlayData no 60xx,4000 OverlayComments no 7Fxx,0000 PixelDataGroupLength no 7Fxx,0010 PixelData no 7Fxx,0011 VariableNextDataGroup no 7Fxx,0020 VariableCoefficientsSDVN no 7Fxx,0030 VariableCoefficientsSDHN no 7Fxx,0040 VariableCoefficientsSDDN no FFFA,FFFA DigitalSignaturesSequence no FFFC,FFFC DataSetTrailingPadding no FFFE,E000 StartOfItem no FFFE,E00D EndOfItems no FFFE,E0DD EndOfSequence no

FITS Tags

This table lists some standard Flexible Image Transport System (FITS) tags, but ExifTool will extract any other tags found. See <https://fits.gsfc.nasa.gov/fits_standard.html> for the specification.

Tag ID Tag Name Writable —— ——– ——– AUTHOR Author no BACKGRND Background no COMMENT Comment no DATE CreateDate no DATE-END ObservationDateEnd no DATE-OBS ObservationDate no HISTORY History no INSTRUME Instrument no OBJECT Object no OBSERVER Observer no REFERENC Reference no TELESCOP Telescope no TIME-END ObservationTimeEnd no TIME-OBS ObservationTime no

XISF Tags

This table lists some standard Extensible Image Serialization Format (XISF) tags, but ExifTool will extract any other tags found. See <https://pixinsight.com/xisf/> for the specification.

Tag ID Tag Name Writable —— ——– ——– Abstract Abstract no AccessRights AccessRights no Authors Authors no BibliographicReferences BibliographicReferences no BriefDescription BriefDescription no CompressionCodecs CompressionCodecs no CompressionLevel CompressionLevel no Contributors Contributors no Copyright Copyright no CreationTime CreateDate no CreatorApplication CreatorApplication no CreatorModule CreatorModule no CreatorOS CreatorOS no Description Description no ImageBounds ImageBounds no ImageColorSpace ColorSpace no ImageData ImageData no ImageGeometry ImageGeometry no ImageICCProfile ICC_Profile no ImageICCProfileLocation ICCProfileLocation no ImageId ImageID no ImageImageType ImageType no ImageLocation ImageLocation no ImageOffset ImagePixelOffset no ImageOrientation Orientation no ImagePixelStorage ImagePixelStorage no ImageResolutionHorizontal XResolution no ImageResolutionUnit ResolutionUnit no ImageResolutionVertical YResolution no ImageSampleFormat ImageSampleFormat no ImageUuid UUID no Keywords Keywords no Languages Languages no License License no OriginalCreationTime DateTimeOriginal no RelatedResources RelatedResources no Title Title no

HTML Tags

Meta information extracted from the header of HTML and XHTML files. This is a mix of information found in the META elements, XML element, and the TITLE element.

Tag ID Tag Name Writable —— ——– ——– abstract Abstract no author Author no classification Classification no content-language ContentLanguage no copyright Copyright no dc DC HTML dc description Description no distribution Distribution no doc-class DocClass no doc-rights DocRights no doc-type DocType no formatter Formatter no generator Generator no generatorversion GeneratorVersion no googlebot GoogleBot no http-equiv HTTP-equiv HTML equiv keywords Keywords no+ mssmarttagspreventparsing NoMSSmartTags no ncc NCC HTML ncc o Office HTML Office originator Originator no owner Owner no prod Prod HTML prod progid ProgID no rating Rating no refresh Refresh no resource-type ResourceType no revisit-after RevisitAfter no robots Robots no+ title Title no vw96 VW96 HTML vw96

HTML dc Tags

Dublin Core schema tags (also used in XMP).

Tag ID Tag Name Writable —— ——– ——– contributor Contributor no+ coverage Coverage no creator Creator no+ date Date no+ description Description no format Format no identifier Identifier no language Language no+ publisher Publisher no+ relation Relation no+ rights Rights no source Source no subject Subject no+ title Title no type Type no+

HTML equiv Tags

These tags have a family 1 group name of “HTTP-equiv”.

Tag ID Tag Name Writable —— ——– ——– cache-control CacheControl no content-disposition ContentDisposition no content-language ContentLanguage no content-script-type ContentScriptType no content-style-type ContentStyleType no content-type ContentType no default-style DefaultStyle no expires Expires no ext-cache ExtCache no imagetoolbar ImageToolbar no lotus Lotus no page-enter PageEnter no page-exit PageExit no pics-label PicsLabel no pragma Pragma no refresh Refresh no reply-to ReplyTo no set-cookie SetCookie no site-enter SiteEnter no site-exit SiteExit no vary Vary no window-target WindowTarget no

HTML ncc Tags

Tag ID Tag Name Writable —— ——– ——– charset CharacterSet no depth Depth no files Files no footnotes Footnotes no generator Generator no kbytesize KByteSize no maxpagenormal MaxPageNormal no multimediatype MultimediaType no narrator Narrator no pagefront PageFront no pagenormal PageNormal no pagespecial PageSpecial no prodnotes ProdNotes no produceddate ProducedDate no producer Producer no revision Revision no revisiondate RevisionDate no setinfo SetInfo no sidebars Sidebars no sourcedate SourceDate no sourceedition SourceEdition no sourcepublisher SourcePublisher no sourcerights SourceRights no sourcetitle SourceTitle no tocitems TOCItems no totaltime Duration no

HTML Office Tags

Tags written by Microsoft Office applications.

Tag ID Tag Name Writable —— ——– ——– Author Author no Category Category no Characters Characters no CharactersWithSpaces CharactersWithSpaces no Company Company no Created CreateDate no Description Description no Keywords Keywords no LastAuthor LastAuthor no LastPrinted LastPrinted no LastSaved ModifyDate no Lines Lines no Manager Manager no Pages Pages no Paragraphs Paragraphs no Revision RevisionNumber no Subject Subject no Template Template no TotalTime TotalEditTime no Version RevisionNumber no Words Words no

HTML prod Tags

Tag ID Tag Name Writable —— ——– ——– recengineer RecEngineer no reclocation RecLocation no

HTML vw96 Tags

Tag ID Tag Name Writable —— ——– ——– objecttype ObjectType no

Palm Tags

Information extracted from Palm database files (PDB and PRC extensions), Mobipocket electronic books (MOBI), and Amazon Kindle KF7 and KF8 books (AZW and AZW3).

Index4 Tag Name Writable —— ——– ——– 0 DatabaseName no 9 CreateDate no 10 ModifyDate no 11 LastBackupDate no 12 ModificationNumber no 15 PalmFileType no

Palm MOBI Tags

Information extracted from the MOBI header of Mobipocket and Amazon Kindle KF7 and KF8 files.

Index4 Tag Name Writable —— ——– ——– 0 Compression no 1 UncompressedTextLength no 3 Encryption no 6 MobiType no 7 CodePage no 9 MobiVersion no 21 BookName no 26 MinimumVersion no

Palm EXTH Tags

Information extracted from the MOBI extended header.

Tag ID Tag Name Writable —— ——– ——– 0x0001 DRMServerID no 0x0002 DRMCommerceID no 0x0003 DRM_E-BookBaseID no 0x0064 Author no 0x0065 Publisher no 0x0066 Imprint no 0x0067 Description no 0x0068 ISBN no 0x0069 Subject no+ 0x006a PublishDate no 0x006b Review no 0x006c Contributor no 0x006d Rights no 0x006e SubjectCode no 0x006f BookType no 0x0070 Source no 0x0071 ASIN no 0x0072 BookVersion no 0x0073 SampleFlag no 0x0074 StartReading no 0x0075 Adult no 0x0076 RetailPrice no 0x0077 RetailPriceCurrency no 0x007d ResourceCount no 0x0081 KF8CoverURI no 0x00c8 DictionaryShortName no 0x00cc CreatorSoftware no 0x00cd CreatorMajorVersion no 0x00ce CreatorMinorVersion no 0x00cf CreatorBuildNumber no 0x00d0 Watermark no 0x00d1 Tamper-proofKeys no 0x0191 ClippingLimit no 0x0192 PublisherLimit no 0x0194 TextToSpeech no 0x0195 RentalFlag no 0x0196 RentalExpirationDate no 0x01f5 CDEType no 0x01f6 LastUpdateTime no 0x01f7 UpdatedTitle no 0x01f8 ASIN2 no 0x020c Language no 0x020d Alignment no 0x0217 CreatorBuildNumber2 no

Torrent Tags

Below are tags commonly found in BitTorrent files. As well as these tags, any other existing tags will be extracted. For convenience, list items are expanded into individual tags with an index in the tag name, but only the tags with index “1” are listed in the tables below. See <https://wiki.theory.org/BitTorrentSpecification> for the BitTorrent specification.

Tag ID Tag Name Writable —— ——– ——– announce Announce no announce-list AnnounceList1 no comment Comment no created by Creator no creation date CreateDate no encoding Encoding no info Info Torrent Info url-list URLList1 no

Torrent Info Tags

Tag ID Tag Name Writable —— ——– ——– file-duration File1Duration no file-media File1Media no files Files Torrent Files length Length no md5sum MD5Sum no name Name no name.utf-8 NameUTF-8 no piece length PieceLength no pieces Pieces no private Private no profiles Profiles Torrent Profiles

Torrent Files Tags

Tag ID Tag Name Writable —— ——– ——– length File1Length no md5sum File1MD5Sum no path File1Path no path.utf-8 File1PathUTF-8 no

Torrent Profiles Tags

Tag ID Tag Name Writable —— ——– ——– acodec Profile1AudioCodec no height Profile1Height no vcodec Profile1VideoCodec no width Profile1Width no

EXE Tags

This module extracts information from various types of Windows, MacOS and Unix executable and library files. The first table below lists information extracted from the header of Windows PE (Portable Executable) EXE files and DLL libraries.

Index2 Tag Name Writable —— ——– ——– 0 MachineType no 2 TimeStamp no 9 ImageFileCharacteristics no 10 PEType no 11 LinkerVersion no 12 CodeSize no 14 InitializedDataSize no 16 UninitializedDataSize no 18 EntryPoint no 30 OSVersion no 32 ImageVersion no 34 SubsystemVersion no 44 Subsystem no

EXE PEVersion Tags

Information extracted from the VS_VERSION_INFO structure of Windows PE files.

Index4 Tag Name Writable —— ——– ——– 2 FileVersionNumber no 4 ProductVersionNumber no 6 FileFlagsMask no 7 FileFlags no 8 FileOS no 9 ObjectFileType no 10 FileSubtype no

EXE PEString Tags

Resource strings found in Windows PE files. The TagID’s are not shown because they are the same as the Tag Name. ExifTool will extract any existing StringFileInfo tags even if not listed in this table.

Tag Name Writable ——– ——– BuildDate no BuildVersion no CharacterSet no Comments no CompanyName no Copyright no FileDescription no FileVersion no InternalName no LanguageCode no LegalCopyright no LegalTrademarks no OriginalFileName no PrivateBuild no ProductName no ProductVersion no SpecialBuild no

EXE MachO Tags

Information extracted from Mach-O (Mac OS X) executable files and DYLIB libraries.

Index Tag Name Writable —– ——– ——– 0 CPUArchitecture no 1 CPUByteOrder no 2 CPUCount no 3 CPUType no+ 4 CPUSubtype no+ 5 ObjectFileType no 6 ObjectFlags no

EXE PEF Tags

Information extracted from PEF (Classic MacOS) executable files and libraries.

Index4 Tag Name Writable —— ——– ——– 2 CPUArchitecture no 3 PEFVersion no 4 TimeStamp no

EXE ELF Tags

Information extracted from ELF (Unix) executable files and SO libraries.

Index1 Tag Name Writable —— ——– ——– 4 CPUArchitecture no 5 CPUByteOrder no 16 ObjectFileType no 18 CPUType no

EXE AR Tags

Information extracted from static libraries.

Index1 Tag Name Writable —— ——– ——– 16 CreateDate no

EXE CHM Tags

Tags extracted from Microsoft Compiled HTML files.

Index4 Tag Name Writable —— ——– ——– 1 CHMVersion no 5 LanguageCode no

LNK Tags

Information extracted from MS Shell Link (Windows shortcut) files.

Index1 Tag Name Writable —— ——– ——– 0x0014 Flags no 0x0018 FileAttributes no 0x001c CreateDate no 0x0024 AccessDate no 0x002c ModifyDate no 0x0034 TargetFileSize no 0x0038 IconIndex no 0x003c RunWindow no 0x0040 HotKey no 0x10000 ItemID LNK ItemID 0x20000 LinkInfo LNK LinkInfo 0x30004 Description no 0x30008 RelativePath no 0x30010 WorkingDirectory no 0x30020 CommandLineArguments no 0x30040 IconFileName no 0xa0000000 UnknownData LNK UnknownData 0xa0000001 EnvVarData LNK UnknownData 0xa0000002 ConsoleData LNK ConsoleData 0xa0000003 TrackerData LNK TrackerData 0xa0000004 ConsoleFEData LNK ConsoleFEData 0xa0000005 SpecialFolderData LNK UnknownData 0xa0000006 DarwinData LNK UnknownData 0xa0000007 IconEnvData LNK UnknownData 0xa0000008 ShimData LNK UnknownData 0xa0000009 PropertyStoreData LNK UnknownData 0xa000000b KnownFolderData LNK UnknownData 0xa000000c VistaIDListData LNK UnknownData

LNK ItemID Tags

Tag ID Tag Name Writable —— ——– ——– 0x0032 Item0032 LNK Item0032

LNK Item0032 Tags

Index1 Tag Name Writable —— ——– ——– 14 TargetFileDOSName no

LNK LinkInfo Tags

Tag Name Writable ——– ——– CommonNetworkRelLink no CommonPathSuffix no DeviceName no DriveSerialNumber no DriveType no LocalBasePath no NetName no NetProviderType no VolumeID no VolumeLabel no

LNK UnknownData Tags

Index1 Tag Name Writable —— ——– ——– [no tags known]

LNK ConsoleData Tags

Index1 Tag Name Writable —— ——– ——– 8 FillAttributes no 10 PopupFillAttributes no 12 ScreenBufferSize no 16 WindowSize no 20 WindowOrigin no 32 FontSize no 36 FontFamily no 40 FontWeight no 44 FontName no 108 CursorSize no 112 FullScreen no 116 QuickEdit no 120 InsertMode no 124 WindowOriginAuto no 128 HistoryBufferSize no 132 NumHistoryBuffers no 136 RemoveHistoryDuplicates no

LNK TrackerData Tags

Index1 Tag Name Writable —— ——– ——– 16 MachineID no

LNK ConsoleFEData Tags

Index1 Tag Name Writable —— ——– ——– 8 CodePage no

Font Tags

This table contains a collection of tags found in font files of various formats. ExifTool current recognizes OTF, TTF, TTC, DFONT, PFA, PFB, PFM, AFM, ACFM and AMFM font files.

Tag ID Tag Name Writable —— ——– ——– AFM AFM Font AFM PFM PFMHeader Font PFM PSInfo PSFontInfo Font PSInfo fontname FontName no name Name Font Name numfonts NumFonts no postfont PostScriptFontName no

Font AFM Tags

Tags extracted from Adobe Font Metrics files (AFM, ACFM and AMFM).

Tag ID Tag Name Writable —— ——– ——– Ascender Ascender no CapHeight CapHeight no CharacterSet CharacterSet no Characters Characters no Creation Date CreateDate no Descender Descender no EncodingScheme EncodingScheme no EscChar EscChar no FamilyName FontFamily no FontName FontName no FullName FullName no IsBaseFont IsBaseFont no IsFixedV IsFixedV no MappingScheme MappingScheme no Notice Notice no Version Version no Weight Weight no XHeight XHeight no

Font PFM Tags

Tags extracted from the PFM file header.

Index1 Tag Name Writable —— ——– ——– 0 PFMVersion no 6 Copyright no 66 FontType no 68 PointSize no 70 YResolution no 72 XResolution no 74 Ascent no 76 InternalLeading no 78 ExternalLeading no 80 Italic no 81 Underline no 82 Strikeout no 83 Weight no 85 CharacterSet no 86 PixWidth no 88 PixHeight no 90 PitchAndFamily no 91 AvgWidth no 93 MaxWidth no 95 FirstChar no 96 LastChar no 97 DefaultChar no 98 BreakChar no 99 WidthBytes no

Font PSInfo Tags

Tags extracted from PostScript font files (PFA and PFB).

Tag ID Tag Name Writable —— ——– ——– Copyright Copyright no FSType FSType no FamilyName FontFamily no FontName FontName no FontType FontType no FullName FullName no ItalicAngle ItalicAngle no Notice Notice no UnderlinePosition UnderlinePosition no UnderlineThickness UnderlineThickness no Weight Weight no isFixedPitch IsFixedPitch no version Version no

Font Name Tags

The following tags are extracted from the TrueType font “name” table found in OTF, TTF, TTC and DFONT files. These tags support localized languages by adding a hyphen followed by a language code to the end of the tag name (eg. “Copyright-fr” or “License-en-US”). Tags with no language code use the default language of “en”.

Tag ID Tag Name Writable —— ——– ——– 0x0000 Copyright no 0x0001 FontFamily no 0x0002 FontSubfamily no 0x0003 FontSubfamilyID no 0x0004 FontName no 0x0005 NameTableVersion no 0x0006 PostScriptFontName no 0x0007 Trademark no 0x0008 Manufacturer no 0x0009 Designer no 0x000a Description no 0x000b VendorURL no 0x000c DesignerURL no 0x000d License no 0x000e LicenseInfoURL no 0x0010 PreferredFamily no 0x0011 PreferredSubfamily no 0x0012 CompatibleFontName no 0x0013 SampleText no 0x0014 PostScriptFontName no 0x0015 WWSFamilyName no 0x0016 WWSSubfamilyName no

VCard Tags

This table lists common vCard tags, but ExifTool will also extract any other vCard tags found. Tag names may have “Pref” added to indicate the preferred instance of a vCard property, and other “TYPE” parameters may also added to the tag name. VCF files may contain multiple vCard entries which are distinguished by the ExifTool family 3 group name (document number). See <http://tools.ietf.org/html/rfc6350> for the vCard 4.0 specification.

Tag ID Tag Name Writable —— ——– ——– Adr Address no Anniversary Anniversary no Bday Birthday no Email Email no Fn FormattedName no Gender Gender no Geo Geolocation no Impp IMPP no Lang Language no Logo Logo no N Name no Nickname Nickname no Note Note no Org Organization no Photo Photo no Prodid Software no Rev Revision no Sound Sound no Tel Telephone no Title JobTitle no Tz TimeZone no Uid UID no Url URL no Version VCardVersion no X-abdate ABDate no X-ablabel ABLabel no X-abrelatednames ABRelatedNames no X-abuid AB_UID no X-aim AIM no X-icq ICQ no X-socialprofile SocialProfile no

VCard VCalendar Tags

The VCard module is also used to process iCalendar ICS files since they use a format similar to vCard. The following table lists standard iCalendar tags, but any existing tags will be extracted. Top-level iCalendar components (eg. Event, Todo, Timezone, etc.) are used for the family 1 group names, and embedded components (eg. Alarm) are added as a prefix to the tag name. See <http://tools.ietf.org/html/rfc5545> for the official iCalendar 2.0 specification.

Tag ID Tag Name Writable —— ——– ——– Acknowledged Acknowledged no Action Action no Attach Attachment no Attendee Attendee no Calscale CalendarScale no Categories Categories no Class Classification no Comment Comment no Completed DateTimeCompleted no Contact Contact no Created DateCreated no Description Description no Dtend DateTimeEnd no Dtstamp DateTimeStamp no Dtstart DateTimeStart no Due DateTimeDue no Duration Duration no Exdate ExceptionDateTimes no Freebusy FreeBusyTime no Geo Geolocation no Last-modified ModifyDate no Location Location no Method Method no Organizer Organizer no Percent-complete PercentComplete no Priority Priority no Prodid Software no Rdate RecurrenceDateTimes no Recurrence-id RecurrenceID no Related-to RelatedTo no Repeat Repeat no Request-status RequestStatus no Resources Resources no Rrule RecurrenceRule no Sequence SequenceNumber no Status Status no Summary Summary no Transp TimeTransparency no Trigger Trigger no Tzid TimezoneID no Tzname TimezoneName no Tzoffsetfrom TimezoneOffsetFrom no Tzoffsetto TimezoneOffsetTo no Tzurl TimeZoneURL no Uid UID no Url URL no Version VCalendarVersion no X-apple-calendar-color CalendarColor no X-apple-default-alarm DefaultAlarm no X-apple-local-default-alarm LocalDefaultAlarm no X-microsoft-cdo-alldayevent AllDayEvent no X-microsoft-cdo-appt-sequence AppointmentSequence no X-microsoft-cdo-busystatus BusyStatus no X-microsoft-cdo-importance Importance no X-microsoft-cdo-insttype InstanceType no X-microsoft-cdo-intendedstatus IntendedBusyStatus no X-microsoft-cdo-ownerapptid OwnerAppointmentID no X-microsoft-disallow-counter DisallowCounterProposal no X-microsoft-donotforwardmeeting DoNotForwardMeeting no X-microsoft-locations MeetingLocations no X-wr-alarmuid AlarmUID no X-wr-caldesc CalendarDescription no X-wr-calname CalendarName no X-wr-relcalid CalendarID no X-wr-timezone TimeZone2 no

VCard VNote Tags

Tags extracted from V-Note VNT files.

Tag ID Tag Name Writable —— ——– ——– Body Body no Dcreated CreateDate no Last-modified ModifyDate no Version Version no

Text Tags

Although basic text files contain no metadata, the following tags are determined from a simple analysis of the data in TXT and CSV files. Statistics are generated only for 8-bit encodings, but the FastScan (-fast) option may be used to limit processing to the first 64 KiB in which case some tags are not produced. To avoid long processing delays, ExifTool will issue a minor warning and process only the first 64 KiB of any file larger than 20 MiB unless the IgnoreMinorErrors (-m) option is used.

Tag Name Writable ——– ——– ByteOrderMark no ColumnCount no Delimiter no LineCount no MIMEEncoding no Newlines no Quoting no RowCount no WordCount no

RSRC Tags

Tags extracted from Mac OS resource files, DFONT files and “._” sidecar files. These tags may also be extracted from the resource fork of any file in OS X, either by adding “/..namedfork/rsrc” to the filename to process the resource fork alone, or by using the ExtractEmbedded (-ee) option to process the resource fork as a sub-document of the main file. When writing, ExifTool preserves the Mac OS resource fork by default, but it may deleted with -rsrc:all= on the command line.

Tag ID Tag Name Writable —— ——– ——– 8BIM PhotoshopInfo Photoshop POST_0x01f5 PostscriptFont PostScript STR _0xbff3 ApplicationMissingMsg no STR _0xbff4 CreatorApplication no STR#_0x0080 Keywords no TEXT_0x0080 Description no sfnt Font Font Name usro_0x0000 OpenWithApplication no vers_0x0001 ApplicationVersion no

Rawzor Tags

Rawzor files store compressed images of other formats. As well as the information listed below, exiftool uncompresses and extracts the meta information from the original image.

Tag Name Writable ——– ——– CompressionFactor no OriginalFileSize no OriginalFileType no RawzorCreatorVersion no RawzorRequiredVersion no

ZIP Tags

The following tags are extracted from ZIP archives. ExifTool also extracts additional meta information from compressed documents inside some ZIP-based files such Office Open XML (DOCX, PPTX and XLSX), Open Document (ODB, ODC, ODF, ODG, ODI, ODP, ODS and ODT), iWork (KEY, PAGES, NUMBERS), Capture One Enhanced Image Package (EIP), Adobe InDesign Markup Language (IDML), Electronic Publication (EPUB), and Sketch design files (SKETCH). The ExifTool family 3 groups may be used to organize ZIP tags by embedded document number (ie. the exiftool -g3 option).

Index2 Tag Name Writable —— ——– ——– 2 ZipRequiredVersion no 3 ZipBitFlag no 4 ZipCompression no 5 ZipModifyDate no 7 ZipCRC no 9 ZipCompressedSize no 11 ZipUncompressedSize no 15 ZipFileName no _com ZipFileComment no

ZIP GZIP Tags

These tags are extracted from GZIP (GNU ZIP) archives, but currently only for the first file in the archive.

Index1 Tag Name Writable —— ——– ——– 2 Compression no 3 Flags no 4 ModifyDate no 8 ExtraFlags no 9 OperatingSystem no 10 ArchivedFileName no 11 Comment no

ZIP RAR Tags

These tags are extracted from RAR archive files.

Index1 Tag Name Writable —— ——– ——– 0 CompressedSize no 4 UncompressedSize no 8 OperatingSystem no 13 ModifyDate no 18 PackingMethod no 25 ArchivedFileName no

ZIP RAR5 Tags

These tags are extracted from RAR v5 and 7z archive files.

Tag Name Writable ——– ——– ArchivedFileName no CompressedSize no FileVersion no ModifyDate no OperatingSystem no UncompressedSize no

RTF Tags

This table lists standard tags of the RTF information group, but ExifTool will also extract any non-standard tags found in this group. As well, ExifTool will extract any custom properties that are found. See <http://www.microsoft.com/en-ca/download/details.aspx?id=10725> for the specification.

Tag ID Tag Name Writable —— ——– ——– author Author no buptim BackupTime no category Category no comment Comment no company Company no copyright Copyright no creatim CreateDate no doccomm Comments no edmins TotalEditTime no hlinkbase HyperlinkBase no id InternalIDNumber no keywords Keywords no manager Manager no nofchars Characters no nofcharsws CharactersWithSpaces no nofpages Pages no nofwords Words no operator LastModifiedBy no printim LastPrinted no revtim ModifyDate no subject Subject no title Title no vern InternalVersionNumber no version RevisionNumber no

OOXML Tags

The Office Open XML (OOXML) format was introduced with Microsoft Office 2007 and is used by file types such as DOCX, PPTX and XLSX. These are essentially ZIP archives containing XML files. The table below lists some tags which have been observed in OOXML documents, but ExifTool will extract any tags found from XML files of the OOXML document properties (“docProps”) directory.

Tips:

1) Structural ZIP tags may be ignored (if desired) with --ZIP:all on the command line.

2) Tags may be grouped by their document number in the ZIP archive with the -g3 or -G3 option.

Tag Name Writable ——– ——– AppVersion no Application no Category no Characters no CharactersWithSpaces no CheckedBy no Client no Company no CreateDate no DateCompleted no Department no Destination no Disposition no Division no DocSecurity no DocumentNumber no Editor no ForwardTo no Group no HeadingPairs no HiddenSlides no HyperlinkBase no HyperlinksChanged no Keywords no Language no LastModifiedBy no LastPrinted no Lines no LinksUpToDate no MMClips no Mailstop no Manager no Matter no ModifyDate no Notes no Office no Owner no Pages no Paragraphs no PresentationFormat no Project no Publisher no Purpose no ReceivedFrom no RecordedBy no RecordedDate no Reference no RevisionNumber no ScaleCrop no SharedDoc no Slides no Source no Status no TelephoneNumber no Template no TitlesOfParts no TotalEditTime no Typist no Words no

iWork Tags

The Apple iWork ‘09 file format is a ZIP archive containing XML files similar to the Office Open XML (OOXML) format. Metadata tags in iWork files are extracted even if they don’t appear below.

Tag Name Writable ——– ——– Author no Comment no Copyright no Keywords no Projects no+ Title no

ISO Tags

Tags extracted from ISO 9660 disk images.

Tag ID Tag Name Writable —— ——– ——– 0x0000 BootRecord ISO BootRecord 0x0001 PrimaryVolume ISO PrimaryVolume

ISO BootRecord Tags

Index1 Tag Name Writable —— ——– ——– 7 BootSystem no 39 BootIdentifier no

ISO PrimaryVolume Tags

Index1 Tag Name Writable —— ——– ——– 8 System no 40 VolumeName no 80 VolumeBlockCount no 120 VolumeSetDiskCount? no 124 VolumeSetDiskNumber? no 128 VolumeBlockSize no 132 PathTableSize? no 140 PathTableLocation? no 174 RootDirectoryCreateDate no 190 VolumeSetName no 318 Publisher no 446 DataPreparer no 574 Software no 702 CopyrightFileName no 740 AbstractFileName no 776 BibligraphicFileName no 813 VolumeCreateDate no 830 VolumeModifyDate no 847 VolumeExpirationDate no 864 VolumeEffectiveDate no

MacOS Tags

On MacOS systems, the there are additional MDItem and XAttr Finder tags that may be extracted. These tags are not extracted by default – they must be specifically requested or enabled via an API option. (Except when reading MacOS “._” files directly, see below.)

The tables below list some of the tags that may be extracted, but ExifTool will extract all available information even for tags not listed.

Tags in these tables are referred to as “pseudo” tags because their information is not stored in the file itself. As such, Writable tags in these tables may be changed without having to rewrite the file.

Note that on some filesystems, MacOS creates sidecar files with names that begin with “._”. ExifTool will read these files if specified, and extract the information listed in the following table without the need for extra options, but these files are not writable directly.

Tag ID Tag Name Writable —— ——– ——– 0x0002 RSRC RSRC 0x0009 ATTR MacOS XAttr

MacOS XAttr Tags

XAttr tags are extracted using the “xattr” utility. They are extracted if any “XAttr*” tag or the MacOS group is specifically requested, or by setting the API XAttrTags option to 1 or the API RequestAll option to 2 or higher. And they are extracted by default from MacOS “._” files when reading these files directly.

Tag Name Writable ——– ——– XAttrAppleMailDateReceived no XAttrAppleMailDateSent no XAttrAppleMailIsRemoteAttachment no XAttrFinderInfo no XAttrLastUsedDate no XAttrMDItemDownloadedDate no XAttrMDItemFinderComment no XAttrMDItemWhereFroms no XAttrMDLabel no XAttrQuarantine yes! XAttrResourceFork no

MacOS MDItem Tags

MDItem tags are extracted using the “mdls” utility. They are extracted if any “MDItem*” tag or the MacOS group is specifically requested, or by setting the API MDItemTags option to 1 or the API RequestAll option to 2 or higher. Note that these tags do not necessarily reflect the current metadata of a file – it may take some time for the MacOS mdworker daemon to index the file after a metadata change.

Tag Name Writable ——– ——– AppleMailDateReceived no AppleMailDateSent no AppleMailFlagged no AppleMailIsRemoteAttachment no AppleMailMessageID no AppleMailPriority no AppleMailRead no AppleMailRepliedTo no MDItemAccountHandles no MDItemAccountIdentifier no MDItemAcquisitionMake no MDItemAcquisitionModel no MDItemAltitude no MDItemAperture no MDItemAudioBitRate no MDItemAudioChannelCount no MDItemAuthorEmailAddresses no MDItemAuthors no MDItemBitsPerSample no MDItemBundleIdentifier no MDItemCity no MDItemCodecs no MDItemColorSpace no MDItemComment no MDItemContentCreationDate no MDItemContentCreationDateRanking no MDItemContentCreationDate_Ranking no MDItemContentModificationDate no MDItemContentType no MDItemContentTypeTree no MDItemContributors no MDItemCopyright no MDItemCountry no MDItemCreator no MDItemDateAdded no MDItemDateAdded_Ranking no MDItemDescription no MDItemDisplayName no MDItemDownloadedDate no MDItemDurationSeconds no MDItemEXIFGPSVersion no MDItemEXIFVersion no MDItemEmailConversationID no MDItemEncodingApplications no MDItemExposureMode no MDItemExposureProgram no MDItemExposureTimeSeconds no MDItemFNumber no MDItemFSContentChangeDate no MDItemFSCreationDate yes! MDItemFSCreatorCode no MDItemFSFinderFlags no MDItemFSHasCustomIcon no MDItemFSInvisible no MDItemFSIsExtensionHidden no MDItemFSIsStationery no MDItemFSLabel yes! MDItemFSName no MDItemFSNodeCount no MDItemFSOwnerGroupID no MDItemFSOwnerUserID no MDItemFSSize no MDItemFSTypeCode no MDItemFinderComment yes! MDItemFlashOnOff no MDItemFocalLength no MDItemGPSDateStamp no MDItemGPSStatus no MDItemGPSTrack no MDItemHasAlphaChannel no MDItemISOSpeed no MDItemIdentifier no MDItemImageDirection no MDItemInterestingDateRanking no MDItemInterestingDate_Ranking no MDItemIsApplicationManaged no MDItemIsExistingThread no MDItemIsLikelyJunk no MDItemKeywords no MDItemKind no MDItemLastUsedDate no MDItemLastUsedDate_Ranking no MDItemLatitude no MDItemLensModel no MDItemLogicalSize no MDItemLongitude no MDItemMailDateReceived_Ranking no MDItemMailboxes no MDItemMediaTypes no MDItemNumberOfPages no MDItemOrientation no MDItemOriginApplicationIdentifier no MDItemOriginMessageID no MDItemOriginSenderDisplayName no MDItemOriginSenderHandle no MDItemOriginSubject no MDItemPageHeight no MDItemPageWidth no MDItemPhysicalSize no MDItemPixelCount no MDItemPixelHeight no MDItemPixelWidth no MDItemPrimaryRecipientEmailAddresses no MDItemProfileName no MDItemRecipients no MDItemRedEyeOnOff no MDItemResolutionHeightDPI no MDItemResolutionWidthDPI no MDItemSecurityMethod no MDItemSpeed no MDItemStateOrProvince no MDItemStreamable no MDItemSubject no MDItemTimestamp no MDItemTitle no MDItemTotalBitRate no MDItemUseCount no MDItemUsedDates no MDItemUserDownloadedDate no MDItemUserDownloadedUserHandle no MDItemUserSharedReceivedDate no MDItemUserSharedReceivedRecipient no MDItemUserSharedReceivedRecipientHandle no MDItemUserSharedReceivedSender no MDItemUserSharedReceivedSenderHandle no MDItemUserSharedReceivedTransport no MDItemUserTags yes!+ MDItemVersion no MDItemVideoBitRate no MDItemWhereFroms no MDItemWhiteBalance no

Extra Tags

The extra tags provide extra features or extra information extracted or generated by ExifTool that is not directly associated with another tag group. The Group column lists the family 1 group name when reading. Tags with a “-” in this column are write-only.

Tags in the family 1 “System” group are referred to as “pseudo” tags because they don’t represent real metadata in the file. Instead, this information is stored in the directory structure of the filesystem. The Writable System “pseudo” tags in this table may be written without modifying the file itself. The TestName tag is used for dry-run testing before writing FileName.

Tag Name Group Writable ——– —– ——– Adobe Adobe yes! BaseName System no CanonDR4 CanonVRD yes!^ CanonVRD CanonVRD yes!^ Comment File yes CurrentIPTCDigest File no Directory System yes! EXIF EXIF yes! EmbeddedVideo File no Error ExifTool no ExifByteOrder File yes ExifToolVersion ExifTool no ExifUnicodeByteOrder - yes FileAccessDate System no FileAttributes System no FileBlockCount System no FileBlockSize System no FileCreateDate System yes! FileDeviceID System no FileDeviceNumber System no FileGroupID System yes! FileHardLinks System no FileInodeChangeDate System no FileInodeNumber System no FileModifyDate System yes! FileName System yes! FilePath System no FilePermissions System yes! FileSequence ExifTool no FileSize System no FileType File no FileTypeExtension File no FileUserID System yes! ForceWrite - yes Geosync - yes Geotag - yes Geotime - yes HardLink - yes! ICC_Profile ICC_Profile yes! ID3Size File no IPTC IPTC yes! ImageDataHash File no ImageHeight File no ImageWidth File no JPEGDigest File no JPEGImageLength File no JPEGQualityEstimate File no JUMBF JUMBF no MIMEType File no MaxVal File no NewGUID ExifTool no Now ExifTool no NumPlanes File no OtherImage File no PageCount File no PreviewImage File yes PreviewPDF File no PreviewPNG File no PreviewTIFF File no PreviewWMF File no ProcessingTime ExifTool no RAFVersion File no ResourceForkSize System no SphericalVideoXML GSpherical yes! SymLink - yes! TestName - yes! ThumbnailImage File no Trailer File yes! Validate ExifTool no Warning ExifTool no XML XML no XMP XMP yes! XResolution File no YResolution File no ZoneIdentifier System yes!

Composite Tags

The values of the composite tags are Derived From the values of other tags. These are convenience tags which are calculated after all other information is extracted. Only a few of these tags are writable directly, the others are changed by writing the corresponding Derived From tags. User-defined Composite tags, also useful for custom-formatting of tag values, may created via the ExifTool configuration file.

Tag Name Derived From Writable ——– ———— ——– AdvancedSceneMode Model no SceneMode AdvancedSceneType Aperture FNumber no ApertureValue AudioBitrate MPEG:MPEGAudioVersion no MPEG:SampleRate MPEG:VBRBytes MPEG:VBRFrames AutoFocus Nikon:PhaseDetectAF no Nikon:ContrastDetectAF AvgBitrate QuickTime::MediaDataSize no QuickTime::Duration BlueBalance WB_RGGBLevels no WB_RGBGLevels WB_RBGGLevels WB_GRBGLevels WB_GRGBLevels WB_GBRGLevels WB_RGBLevels WB_GRBLevels WB_RBLevels WBBlueLevel WBGreenLevel CDDBDiscPlayTime CDDB1Info no CDDBDiscTracks CDDB1Info no CFAPattern CFARepeatPatternDim no CFAPattern2 CircleOfConfusion ScaleFactor35efl no ConditionalFEC FlashExposureComp no FlashBits DOF FocalLength no Aperture CircleOfConfusion FocusDistance SubjectDistance ObjectDistance ApproximateFocusDistance FocusDistanceLower FocusDistanceUpper DateCreated Kodak:YearCreated no Kodak:MonthDayCreated DateTimeCreated IPTC:DateCreated no IPTC:TimeCreated DateTimeOriginal DateTimeCreated no DateCreated TimeCreated DateTimeOriginal ID3:RecordingTime no ID3:Year ID3:Date ID3:Time DepthMapTiff DepthMapData no DepthMapWidth DepthMapHeight DigitalCreationDateTime IPTC:DigitalCreationDate no IPTC:DigitalCreationTime DigitalZoom Canon:ZoomSourceWidth no Canon:ZoomTargetWidth Canon:DigitalZoom DriveMode ContinuousDrive no SelfTimer Duration AIFF:SampleRate no AIFF:NumSampleFrames Duration APE:SampleRate no APE:TotalFrames APE:BlocksPerFrame APE:FinalFrameBlocks Duration FLAC:SampleRate no FLAC:TotalSamples Duration FileSize no ID3Size MPEG:AudioBitrate MPEG:VideoBitrate MPEG:VBRFrames MPEG:SampleRate MPEG:MPEGAudioVersion Duration RIFF:FrameRate no RIFF:FrameCount VideoFrameRate VideoFrameCount Duration RIFF:AvgBytesPerSec no FileSize FrameCount VideoFrameCount Duration Vorbis:NominalBitrate no FileSize ExtenderStatus Olympus:Extender no Olympus:LensType MaxApertureValue FOV FocalLength no ScaleFactor35efl FocusDistance FileNumber DirectoryIndex yes FileIndex Flash XMP:FlashFired yes XMP:FlashReturn XMP:FlashMode XMP:FlashFunction XMP:FlashRedEyeMode XMP:Flash FlashType FlashBits no FocalLength35efl FocalLength no ScaleFactor35efl FocusDistance Sony:FocusPosition no FocalLength FocusDistance2 Sony:FocusPosition2 no FocalLengthIn35mmFormat GPSAltitude GPS:GPSAltitude no GPS:GPSAltitudeRef XMP:GPSAltitude XMP:GPSAltitudeRef GPSAltitude QuickTime:GPSCoordinates no GPSAltitude QuickTime:LocationInformation no GPSAltitudeRef QuickTime:GPSCoordinates no GPSAltitudeRef QuickTime:LocationInformation no GPSDateTime GPS:GPSDateStamp no GPS:GPSTimeStamp GPSDateTime Parrot:GPSLatitude no Main:CreateDate SampleTime GPSDateTime Sony:GPSDateStamp no Sony:GPSTimeStamp GPSDestLatitude GPS:GPSDestLatitude no GPS:GPSDestLatitudeRef GPSDestLatitudeRef XMP-exif:GPSDestLatitude no GPSDestLongitude GPS:GPSDestLongitude no GPS:GPSDestLongitudeRef GPSDestLongitudeRef XMP-exif:GPSDestLongitude no GPSLatitude GPS:GPSLatitude yes/ GPS:GPSLatitudeRef GPSLatitude QuickTime:GPSCoordinates no GPSLatitude QuickTime:LocationInformation no GPSLatitude Sony:GPSLatitude no Sony:GPSLatitudeRef GPSLatitudeRef XMP-exif:GPSLatitude no GPSLongitude GPS:GPSLongitude yes/ GPS:GPSLongitudeRef GPSLongitude QuickTime:GPSCoordinates no GPSLongitude QuickTime:LocationInformation no GPSLongitude Sony:GPSLongitude no Sony:GPSLongitudeRef GPSLongitudeRef XMP-exif:GPSLongitude no GPSPosition GPSLatitude yes! GPSLongitude HiddenData Sony:HiddenDataOffset no Sony:HiddenDataLength HyperfocalDistance FocalLength no Aperture CircleOfConfusion IDCPreviewImage IDCPreviewStart no IDCPreviewLength ISO Canon:CameraISO no Canon:BaseISO Canon:AutoISO ImageHeight IFD0:SensorTopBorder no IFD0:SensorBottomBorder ImageHeight Main:PostScript:ImageData no PostScript:BoundingBox ImageSize ImageWidth no ImageHeight ExifImageWidth ExifImageHeight RawImageCroppedSize ImageWidth IFD0:SensorLeftBorder no IFD0:SensorRightBorder ImageWidth Main:PostScript:ImageData no PostScript:BoundingBox JpgFromRaw JpgFromRawStart yes JpgFromRawLength Lens Canon:MinFocalLength no Canon:MaxFocalLength Lens35efl Canon:MinFocalLength no Canon:MaxFocalLength Lens ScaleFactor35efl LensID LensType no FocalLength MaxAperture MaxApertureValue MinFocalLength MaxFocalLength LensModel LensFocalRange LensSpec LensType2 LensType3 LensFocalLength RFLensType LensID LensModel no Lens XMP-aux:LensID Make LensID Nikon:LensIDNumber no LensFStops MinFocalLength MaxFocalLength MaxApertureAtMinFocal MaxApertureAtMaxFocal MCUVersion Nikon:LensType LensID Ricoh:LensFirmware no LensID XMP-aux:LensID no Make LensInfo FocalLength LensModel MaxApertureValue LensSpec Nikon:Lens no Nikon:LensType LensType LensTypeMake no LensTypeModel LightValue Aperture no ShutterSpeed ISO MPImage MPImageStart no MPImageLength MPImageType Megapixels ImageSize no OriginalDecisionData OriginalDecisionDataOffset yes! OtherImage OtherImageStart yes OtherImageLength OtherImageStart (1) OtherImageLength (1) PeakSpectralSensitivity FLIR:PlanckB no PreviewImage PreviewImageStart yes PreviewImageLength PreviewImageValid PreviewImageStart (1) PreviewImageLength (1) PreviewImage ScreenNail no PreviewImageSize PreviewImageWidth no PreviewImageHeight RedBalance WB_RGGBLevels no WB_RGBGLevels WB_RBGGLevels WB_GRBGLevels WB_GRGBLevels WB_GBRGLevels WB_RGBLevels WB_GRBLevels WB_RBLevels WBRedLevel WBGreenLevel RedEyeReduction CanonFlashMode no FlashBits RicohPitch Ricoh:Accelerometer no RicohRoll Ricoh:Accelerometer no Rotation QuickTime:MatrixStructure yes! QuickTime:HandlerType RunTimeSincePowerUp Apple:RunTimeValue no Apple:RunTimeScale ScaleFactor35efl FocalLength no FocalLengthIn35mmFormat Composite:DigitalZoom FocalPlaneDiagonal SensorSize FocalPlaneXSize FocalPlaneYSize FocalPlaneResolutionUnit FocalPlaneXResolution FocalPlaneYResolution ExifImageWidth ExifImageHeight CanonImageWidth CanonImageHeight ImageWidth ImageHeight ShootingMode CanonExposureMode no EasyMode BulbDuration ShutterCurtainHack FlashBits no ShutterCurtainSync ShutterSpeed ExposureTime no ShutterSpeedValue BulbDuration SingleShotDepthMapTiff SingleShotDepthMap no SegWidth SegHeight SubSecCreateDate EXIF:CreateDate yes SubSecTimeDigitized OffsetTimeDigitized SubSecDateTimeOriginal EXIF:DateTimeOriginal yes SubSecTimeOriginal OffsetTimeOriginal SubSecModifyDate EXIF:ModifyDate yes SubSecTime OffsetTime ThumbnailImage ThumbnailOffset yes ThumbnailLength ThumbnailTIFF SubfileType no Compression ImageWidth ImageHeight BitsPerSample PhotometricInterpretation StripOffsets SamplesPerPixel RowsPerStrip StripByteCounts PlanarConfiguration Orientation VolumeSize ISO:VolumeBlockCount no ISO:VolumeBlockSize WB_RGBLevels KDC_IFD:WhiteBalance no WB_RGBLevelsAuto WB_RGBLevelsFluorescent WB_RGBLevelsTungsten WB_RGBLevelsDaylight WB_RGBLevels4 WB_RGBLevels5 WB_RGBLevelsShade WB_RGBLevels KodakIFD:WhiteBalance no WB_RGBMul0 WB_RGBMul1 WB_RGBMul2 WB_RGBMul3 WB_RGBCoeffs0 WB_RGBCoeffs1 WB_RGBCoeffs2 WB_RGBCoeffs3 KodakIFD:ColorTemperature Kodak:WB_RGBLevels WB_RGGBLevels Canon:WhiteBalance no WB_RGGBLevelsAsShot WB_RGGBLevelsAuto WB_RGGBLevelsDaylight WB_RGGBLevelsCloudy WB_RGGBLevelsTungsten WB_RGGBLevelsFluorescent WB_RGGBLevelsFlash WB_RGGBLevelsCustom WB_RGGBLevelsShade WB_RGGBLevelsKelvin WB_RGGBLevels WB_RGGBLevelsUncorrected no WB_RGGBLevelsBlack ZoomedPreviewImage ZoomedPreviewStart no ZoomedPreviewLength

Shortcuts Tags

Shortcut tags are convenience tags that represent one or more other tag names. They are used like regular tags to read and write the information for a specified set of tags.

The shortcut tags below have been pre-defined, but user-defined shortcuts may be added via the %Image::ExifTool::UserDefined::Shortcuts lookup in the =/.ExifTool_config file. See the Image::ExifTool::Shortcuts documentation for more details.

Tag Name Refers To Writable ——– ——— ——– AllDates DateTimeOriginal yes CreateDate ModifyDate Canon FileName yes Model DateTimeOriginal ShootingMode ShutterSpeed Aperture MeteringMode ExposureCompensation ISO Lens FocalLength ImageSize Quality Flash FlashType ConditionalFEC RedEyeReduction ShutterCurtainHack WhiteBalance FocusMode Contrast Sharpness Saturation ColorTone ColorSpace LongExposureNoiseReduction FileSize FileNumber DriveMode OwnerName SerialNumber ColorSpaceTags ExifIFD:ColorSpace yes ExifIFD:Gamma InteropIFD:InteropIndex ICC_Profile Common FileName yes FileSize Model DateTimeOriginal ImageSize Quality FocalLength ShutterSpeed Aperture ISO WhiteBalance Flash CommonIFD0 IFD0:ImageDescription yes IFD0:Make IFD0:Model IFD0:Software IFD0:ModifyDate IFD0:Artist IFD0:Copyright IFD0:Rating IFD0:RatingPercent IFD0:DNGLensInfo IFD0:PanasonicTitle IFD0:PanasonicTitle2 IFD0:XPTitle IFD0:XPComment IFD0:XPAuthor IFD0:XPKeywords IFD0:XPSubject ImageDataMD5 ImageDataHash yes LargeTags CanonVRD yes DLOData EXIF ICC_Profile IDCPreviewImage ImageData IPTC JpgFromRaw OriginalRawImage OtherImage PreviewImage ThumbnailImage TIFFPreview XML XMP ZoomedPreviewImage MakerNotes MakerNotes yes MakerNoteApple MakerNoteCanon MakerNoteCasio MakerNoteCasio2 MakerNoteDJI MakerNoteDJIInfo MakerNoteFLIR MakerNoteFujiFilm MakerNoteGE MakerNoteGE2 MakerNoteHasselblad MakerNoteHP MakerNoteHP2 MakerNoteHP4 MakerNoteHP6 MakerNoteISL MakerNoteJVC MakerNoteJVCText MakerNoteKodak1a MakerNoteKodak1b MakerNoteKodak2 MakerNoteKodak3 MakerNoteKodak4 MakerNoteKodak5 MakerNoteKodak6a MakerNoteKodak6b MakerNoteKodak7 MakerNoteKodak8a MakerNoteKodak8b MakerNoteKodak8c MakerNoteKodak9 MakerNoteKodak10 MakerNoteKodak11 MakerNoteKodak12 MakerNoteKodakUnknown MakerNoteKyocera MakerNoteMinolta MakerNoteMinolta2 MakerNoteMinolta3 MakerNoteMotorola MakerNoteNikon MakerNoteNikon2 MakerNoteNikon3 MakerNoteNintendo MakerNoteOlympus MakerNoteOlympus2 MakerNoteOlympus3 MakerNoteLeica MakerNoteLeica2 MakerNoteLeica3 MakerNoteLeica4 MakerNoteLeica5 MakerNoteLeica6 MakerNoteLeica7 MakerNoteLeica8 MakerNoteLeica9 MakerNoteLeica10 MakerNotePanasonic MakerNotePanasonic2 MakerNotePanasonic3 MakerNotePentax MakerNotePentax2 MakerNotePentax3 MakerNotePentax4 MakerNotePentax5 MakerNotePentax6 MakerNotePhaseOne MakerNoteReconyx MakerNoteReconyx2 MakerNoteReconyx3 MakerNoteRicoh MakerNoteRicoh2 MakerNoteRicohPentax MakerNoteRicohText MakerNoteSamsung1a MakerNoteSamsung1b MakerNoteSamsung2 MakerNoteSanyo MakerNoteSanyoC4 MakerNoteSanyoPatch MakerNoteSigma MakerNoteSony MakerNoteSony2 MakerNoteSony3 MakerNoteSony4 MakerNoteSony5 MakerNoteSonyEricsson MakerNoteSonySRF MakerNoteUnknownText MakerNoteUnknownBinary MakerNoteUnknown Nikon Model yes SubSecDateTimeOriginal ShutterCount LensSpec FocalLength ImageSize ShutterSpeed Aperture ISO NoiseReduction ExposureProgram ExposureCompensation WhiteBalance WhiteBalanceFineTune ShootingMode Quality MeteringMode FocusMode ImageOptimization ToneComp ColorHue ColorSpace HueAdjustment Saturation Sharpness Flash FlashMode FlashExposureComp Unsafe IFD0:YCbCrPositioning yes IFD0:YCbCrCoefficients IFD0:TransferFunction ExifIFD:ComponentsConfiguration ExifIFD:CompressedBitsPerPixel InteropIFD:InteropIndex InteropIFD:InteropVersion InteropIFD:RelatedImageWidth InteropIFD:RelatedImageHeight ls-l FilePermissions yes FileHardLinks FileUserID FileGroupID FileSize# FileModifyDate FileName

MWG Tags

The Metadata Working Group (MWG) recommends techniques to allow certain overlapping EXIF, IPTC and XMP tags to be reconciled when reading, and synchronized when writing. The MWG Composite tags below are designed to aid in the implementation of these recommendations. As well, the MWG defines new XMP tags which are listed in the subsequent tables below. See <https://web.archive.org/web/20180919181934/http://www.metadataworkinggroup.org/pdf/mwg_guidance.pdf> for the official MWG specification.

MWG Composite Tags

The table below lists special Composite tags which are used to access other tags based on the MWG 2.0 recommendations. These tags are only accessible when explicitly loaded, but this is done automatically by the exiftool application if MWG is specified as a group for any tag on the command line, or manually with the -use MWG option. Via the API, the MWG Composite tags are loaded by calling “Image::ExifTool::MWG::Load()”.

When reading, the value of each MWG tag is Derived From the specified tags based on the MWG guidelines. When writing, the appropriate associated tags are written. The value of the IPTCDigest tag is updated automatically when the IPTC is changed if either the IPTCDigest tag didn’t exist beforehand or its value agreed with the original IPTC digest (indicating that the XMP is synchronized with the IPTC). IPTC information is written only if the original file contained IPTC.

Loading the MWG module activates “strict MWG conformance mode”, which has the effect of causing EXIF, IPTC and XMP in non-standard locations to be ignored when reading, as per the MWG recommendations. Instead, a “Warning” tag is generated when non-standard metadata is encountered. This feature may be disabled by setting $Image::ExifTool::MWG::strict = 0 in the ExifTool config file (or from your Perl script when using the API). Note that the behaviour when writing is not changed: ExifTool always creates new records only in the standard location, but writes new tags to any EXIF/IPTC/XMP records that exist.

Contrary to the EXIF specification, the MWG recommends that EXIF “ASCII” string values be stored as UTF-8. To honour this, the exiftool application sets the default internal EXIF string encoding to “UTF8” when the MWG module is loaded, but via the API this must be done manually by setting the CharsetEXIF option.

A complication of the MWG specification is that although the MWG:Creator property may consist of multiple values, the associated EXIF tag (EXIF:Artist) is only a simple string. To resolve this discrepancy the MWG recommends a technique which allows a list of values to be stored in a string by using a semicolon-space separator (with quotes around values if necessary). When the MWG module is loaded, ExifTool automatically implements this policy and changes EXIF:Artist to a list-type tag.

Tag Name Derived From Writable ——– ———— ——– City IPTC:City yes XMP-photoshop:City XMP-iptcExt:LocationShownCity CurrentIPTCDigest IPTCDigest Copyright EXIF:Copyright yes IPTC:CopyrightNotice XMP-dc:Rights CurrentIPTCDigest IPTCDigest Country IPTC:Country-PrimaryLocationName yes XMP-photoshop:Country XMP-iptcExt:LocationShownCountryName CurrentIPTCDigest IPTCDigest CreateDate Composite:SubSecCreateDate yes EXIF:CreateDate IPTC:DigitalCreationDate IPTC:DigitalCreationTime XMP-xmp:CreateDate CurrentIPTCDigest IPTCDigest Creator EXIF:Artist yes+ IPTC:By-line XMP-dc:Creator CurrentIPTCDigest IPTCDigest DateTimeOriginal Composite:SubSecDateTimeOriginal yes EXIF:DateTimeOriginal IPTC:DateCreated IPTC:TimeCreated XMP-photoshop:DateCreated CurrentIPTCDigest IPTCDigest Description EXIF:ImageDescription yes IPTC:Caption-Abstract XMP-dc:Description CurrentIPTCDigest IPTCDigest Keywords IPTC:Keywords yes+ XMP-dc:Subject CurrentIPTCDigest IPTCDigest Location IPTC:Sub-location yes XMP-iptcCore:Location XMP-iptcExt:LocationShownSublocation CurrentIPTCDigest IPTCDigest ModifyDate Composite:SubSecModifyDate yes EXIF:ModifyDate XMP-xmp:ModifyDate CurrentIPTCDigest IPTCDigest Orientation EXIF:Orientation yes Rating XMP-xmp:Rating yes State IPTC:Province-State yes XMP-photoshop:State XMP-iptcExt:LocationShownProvinceState CurrentIPTCDigest IPTCDigest

MWG Regions Tags

Image region metadata defined by the MWG 2.0 specification. These tags may be accessed without the need to load the MWG Composite tags above. See <https://web.archive.org/web/20180919181934/http://www.metadataworkinggroup.org/pdf/mwg_guidance.pdf> for the official specification.

These tags belong to the ExifTool XMP-mwg-rs family 1 group.

Tag Name Writable ——– ——– RegionInfo MWG RegionInfo Struct RegionAppliedToDimensions Dimensions Struct_ RegionAppliedToDimensionsH real_ RegionAppliedToDimensionsUnit string_ RegionAppliedToDimensionsW real_ RegionList MWG RegionStruct Struct_+ RegionArea Area Struct_+ RegionAreaD real_+ RegionAreaH real_+ RegionAreaUnit string_+ RegionAreaW real_+ RegionAreaX real_+ RegionAreaY real_+ RegionBarCodeValue string_+ RegionDescription string_+ RegionExtensions MWG Extensions Struct_+ RegionFocusUsage string_+ RegionName string_+ RegionRotation real_+ RegionSeeAlso string_+ RegionType string_+

MWG RegionInfo Struct

Field Name Writable ———- ——– AppliedToDimensions Dimensions Struct RegionList MWG RegionStruct Struct+

MWG RegionStruct Struct

Field Name Writable ———- ——– Area Area Struct BarCodeValue string Description string Extensions MWG Extensions Struct FocusUsage string Name string Rotation real Type string SeeAlso string

MWG Extensions Struct

This structure may contain any top-level XMP tags, but none have been pre-defined in ExifTool. Since no flattened tags have been pre-defined, RegionExtensions is writable only as a structure (eg. {xmp-dc:creator=me,rating=5}). Fields for this structure are identified using the standard ExifTool tag name (with optional leading group name, and/or trailing language code, and/or trailing # symbol to disable print conversion).

Field Name Writable ———- ——– [no tags known]

MWG Keywords Tags

Hierarchical keywords metadata defined by the MWG 2.0 specification. ExifTool unrolls keyword structures to an arbitrary depth of 6 to allow individual levels to be accessed with different tag names, and to avoid infinite recursion. See <https://web.archive.org/web/20180919181934/http://www.metadataworkinggroup.org/pdf/mwg_guidance.pdf> for the official specification.

These tags belong to the ExifTool XMP-mwg-kw family 1 group.

Tag Name Writable ——– ——– KeywordInfo MWG KeywordInfo Struct HierarchicalKeywords MWG KeywordStruct Struct_+ HierarchicalKeywords1Applied boolean_+ HierarchicalKeywords1Children MWG KeywordStruct Struct_+ HierarchicalKeywords2Applied boolean_+ HierarchicalKeywords2Children MWG KeywordStruct Struct_+ HierarchicalKeywords3Applied boolean_+ HierarchicalKeywords3Children MWG KeywordStruct Struct_+ HierarchicalKeywords4Applied boolean_+ HierarchicalKeywords4Children MWG KeywordStruct Struct_+ HierarchicalKeywords5Applied boolean_+ HierarchicalKeywords5Children MWG KeywordStruct Struct_+ HierarchicalKeywords6Applied boolean_+ HierarchicalKeywords6 string_+ HierarchicalKeywords5 string_+ HierarchicalKeywords4 string_+ HierarchicalKeywords3 string_+ HierarchicalKeywords2 string_+ HierarchicalKeywords1 string_+

MWG KeywordInfo Struct

Field Name Writable ———- ——– Hierarchy MWG KeywordStruct Struct+

MWG KeywordStruct Struct

Field Name Writable ———- ——– Applied boolean Children MWG KeywordStruct Struct+ Keyword string

MWG Collections Tags

Collections metadata defined by the MWG 2.0 specification. See <https://web.archive.org/web/20180919181934/http://www.metadataworkinggroup.org/pdf/mwg_guidance.pdf> for the official specification.

These tags belong to the ExifTool XMP-mwg-coll family 1 group.

Tag Name Writable ——– ——– Collections MWG CollectionInfo Struct+ CollectionName string_+ CollectionURI string_+

MWG CollectionInfo Struct

Field Name Writable ———- ——– CollectionName string CollectionURI string

NOTES

This document generated automatically by Image::ExifTool::BuildTagLookup.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2437 - Linux cli command Net_DBus_Test_MockMessagepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Test_MockMessagepm and provides detailed information about the command Net_DBus_Test_MockMessagepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Test_MockMessagepm.

NAME 🖥️ Net_DBus_Test_MockMessagepm 🖥️

Fake a message object when unit testing

SYNOPSIS

Sending a message

my $msg = new Net::DBus::Test::MockMessage; my $iterator = $msg->iterator; $iterator->append_byte(132); $iterator->append_int32(14241); $connection->send($msg);

DESCRIPTION

This module provides a “mock” counterpart to the Net::DBus::Binding::Message class. It is basically a pure Perl fake message object providing the same contract as the real message object. It is intended for use internally by the testing APIs.

METHODS

my $call = Net::DBus::Test::MockMessage->new_method_call( service_name => $service, object_path => $object, interface => $interface, method_name => $name);
Create a message representing a call on the object located at the path object_path within the client owning the well-known name given by service_name. The method to be invoked has the name method_name within the interface specified by the interface parameter.

my $msg = Net::DBus::Test::MockMessage->new_method_return( replyto => $method_call);
Create a message representing a reply to the method call passed in the replyto parameter.

my $signal = Net::DBus::Test::MockMessage->new_signal( object_path => $path, interface => $interface, signal_name => $name);
Creates a new message, representing a signal [to be] emitted by the object located under the path given by the object_path parameter. The name of the signal is given by the signal_name parameter, and is scoped to the interface given by the interface parameter.

my $msg = Net::DBus::Test::MockMessage->new_error( replyto => $method_call, name => $name, description => $description);
Creates a new message, representing an error which occurred during the handling of the method call object passed in as the replyto parameter. The name parameter is the formal name of the error condition, while the description is a short piece of text giving more specific information on the error.

my $type = $msg->get_type
Retrieves the type code for this message. The returned value corresponds to one of the four Net::DBus::Test::MockMessage::MESSAGE_TYPE_* constants.

my $name = $msg->get_error_name
Returns the formal name of the error, as previously passed in via the name parameter in the constructor.

my $interface = $msg->get_interface
Retrieves the name of the interface targeted by this message, possibly an empty string if there is no applicable interface for this message.

my $path = $msg->get_path
Retrieves the object path associated with the message, possibly an empty string if there is no applicable object for this message.

my $name = $msg->get_destination
Retrieves the unique or well-known bus name for client intended to be the recipient of the message. Possibly returns an empty string if the message is being broadcast to all clients.

my $name = $msg->get_sender
Retireves the unique name of the client sending the message

my $serial = $msg->get_serial
Retrieves the unique serial number of this message. The number is guaranteed unique for as long as the connection over which the message was sent remains open. May return zero, if the message is yet to be sent.

my $name = $msg->get_member
For method calls, retrieves the name of the method to be invoked, while for signals, retrieves the name of the signal.

$msg->set_sender($name)
Set the name of the client sending the message. The name must be the unique name of the client.

$msg->set_destination($name)
Set the name of the intended recipient of the message. This is typically used for signals to switch them from broadcast to unicast.

my $iterator = $msg->iterator;
Retrieves an iterator which can be used for reading or writing fields of the message. The returned object is an instance of the Net::DBus::Binding::Iterator class.

$boolean = $msg->get_no_reply()
Gets the flag indicating whether the message is expecting a reply to be sent.

$msg->set_no_reply($boolean)
Toggles the flag indicating whether the message is expecting a reply to be sent. All method call messages expect a reply by default. By toggling this flag the communication latency is reduced by removing the need for the client to wait

my @values = $msg->get_args_list
De-marshall all the values in the body of the message, using the message signature to identify data types. The values are returned as a list.

$msg->append_args_list(@values)
Append a set of values to the body of the message. Values will be encoded as either a string, list or dictionary as appropriate to their Perl data type. For more specific data typing needs, the Net::DBus::Binding::Iterator object should be used instead.

my $sig = $msg->get_signature
Retrieves a string representing the type signature of the values packed into the body of the message.

AUTHOR

Daniel P. Berrange

COPYRIGHT

Copyright (C) 2005-2009 Daniel P. Berrange

SEE ALSO

Net::DBus::Binding::Message, Net::DBus::Test::MockConnection, Net::DBus::Test::MockIterator

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2438 - Linux cli command Tk_Framepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Framepm and provides detailed information about the command Tk_Framepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Framepm.

NAME 🖥️ Tk_Framepm 🖥️

Create and manipulate Frame widgets

SYNOPSIS

$frame = $parent->Frame(?options?);

STANDARD OPTIONS

-borderwidth -highlightbackground -highlightthickness -takefocus -class -highlightcolor -relief -cursor

See Tk::options for details of the standard options.

WIDGET-SPECIFIC OPTIONS

Name: background

Class: Background

Switch: -background

This option is the same as the standard background option except that its value may also be specified as an undefined value. In this case, the widget will display no background or border, and no colors will be consumed from its colormap for its background and border.

Name: colormap

Class: Colormap

Switch: -colormap

Specifies a colormap to use for the window. The value may be either new, in which case a new colormap is created for the window and its children, or the name of another window (which must be on the same screen and have the same visual as $widget), in which case the new window will use the colormap from the specified window. If the colormap option is not specified, the new window uses the same colormap as its parent. This option may not be changed with the configure method.

Name: container

Class: Container

Switch: -container

The value must be a boolean. If true, it means that this window will be used as a container in which some other application will be embedded (for example, a Tk toplevel can be embedded using the -use option). The window will support the appropriate window manager protocols for things like geometry requests. The window should not have any children of its own in this application. This option may not be changed with the configure method.

Name: height

Class: Height

Switch: -height

Specifies the desired height for the window in any of the forms acceptable to Tk_GetPixels. If this option is less than or equal to zero then the window will not request any size at all.

Name: visual

Class: Visual

Switch: -visual

Specifies visual information for the new window in any of the forms accepted by Tk_GetVisual. If this option is not specified, the new window will use the same visual as its parent. The visual option may not be modified with the configure method.

Name: width

Class: Width

Switch: -width

Specifies the desired width for the window in any of the forms acceptable to Tk_GetPixels. If this option is less than or equal to zero then the window will not request any size at all.

DESCRIPTION

The Frame method creates a new window (given by the $widget argument) and makes it into a frame widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the frame such as its background color and relief. The frame command returns the path name of the new window.

A frame is a simple widget. Its primary purpose is to act as a spacer or container for complex window layouts. The only features of a frame are its background color and an optional 3-D border to make the frame appear raised or sunken.

WIDGET METHODS

The Frame method creates a widget object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class.

BINDINGS

When a new frame is created, it has no default event bindings: frames are not intended to be interactive.

KEYWORDS

frame, widget

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2439 - Linux cli command getutid_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getutid_r and provides detailed information about the command getutid_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getutid_r.

NAME 🖥️ getutid_r 🖥️

access utmp file entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <utmp.h>
struct utmp *getutent(void);
struct utmp *getutid(const struct utmp *ut);
struct utmp *getutline(const struct utmp *ut);
struct utmp *pututline(const struct utmp *ut);
void setutent(void);
void endutent(void);
int utmpname(const char *file);

DESCRIPTION

New applications should use the POSIX.1-specified “utmpx” versions of these functions; see STANDARDS.

utmpname() sets the name of the utmp-format file for the other utmp functions to access. If utmpname() is not used to set the filename before the other functions are used, they assume _PATH_UTMP, as defined in <paths.h>.

setutent() rewinds the file pointer to the beginning of the utmp file. It is generally a good idea to call it before any of the other functions.

endutent() closes the utmp file. It should be called when the user code is done accessing the file with the other functions.

getutent() reads a line from the current file position in the utmp file. It returns a pointer to a structure containing the fields of the line. The definition of this structure is shown in utmp(5).

getutid() searches forward from the current file position in the utmp file based upon ut. If ut->ut_type is one of RUN_LVL, BOOT_TIME, NEW_TIME, or OLD_TIME, getutid() will find the first entry whose ut_type field matches ut->ut_type. If ut->ut_type is one of INIT_PROCESS, LOGIN_PROCESS, USER_PROCESS, or DEAD_PROCESS, getutid() will find the first entry whose ut_id field matches ut->ut_id.

getutline() searches forward from the current file position in the utmp file. It scans entries whose ut_type is USER_PROCESS or LOGIN_PROCESS and returns the first one whose ut_line field matches ut->ut_line.

pututline() writes the utmp structure ut into the utmp file. It uses getutid() to search for the proper place in the file to insert the new entry. If it cannot find an appropriate slot for ut, pututline() will append the new entry to the end of the file.

RETURN VALUE

getutent(), getutid(), and getutline() return a pointer to a struct utmp on success, and NULL on failure (which includes the “record not found” case). This struct utmp is allocated in static storage, and may be overwritten by subsequent calls.

On success pututline() returns ut; on failure, it returns NULL.

utmpname() returns 0 if the new name was successfully stored, or -1 on failure.

On failure, these functions errno set to indicate the error.

ERRORS

ENOMEM
Out of memory.

ESRCH
Record not found.

setutent(), pututline(), and the getut*() functions can also fail for the reasons described in open(2).

FILES

/var/run/utmp
database of currently logged-in users

/var/log/wtmp
database of past user logins

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getutent()

Thread safety

MT-Unsafe init race:utent race:utentbuf sig:ALRM timer

getutid(), getutline()

Thread safety

MT-Unsafe init race:utent sig:ALRM timer

pututline()

Thread safety

MT-Unsafe race:utent sig:ALRM timer

setutent(), endutent(), utmpname()

Thread safetyMT-Unsafe race:utent

In the above table, utent in race:utent signifies that if any of the functions setutent(), getutent(), getutid(), getutline(), pututline(), utmpname(), or endutent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

None.

HISTORY

XPG2, SVr4.

In XPG2 and SVID 2 the function pututline() is documented to return void, and that is what it does on many systems (AIX, HP-UX). HP-UX introduces a new function _pututline() with the prototype given above for pututline().

All these functions are obsolete now on non-Linux systems. POSIX.1-2001 and POSIX.1-2008, following SUSv1, does not have any of these functions, but instead uses

#include <utmpx.h> struct utmpx *getutxent(void); struct utmpx *getutxid(const struct utmpx *); struct utmpx *getutxline(const struct utmpx *); struct utmpx *pututxline(const struct utmpx *); void setutxent(void); void endutxent(void);

These functions are provided by glibc, and perform the same task as their equivalents without the “x”, but use struct utmpx, defined on Linux to be the same as struct utmp. For completeness, glibc also provides utmpxname(), although this function is not specified by POSIX.1.

On some other systems, the utmpx structure is a superset of the utmp structure, with additional fields, and larger versions of the existing fields, and parallel files are maintained, often /var/*/utmpx and /var/*/wtmpx.

Linux glibc on the other hand does not use a parallel utmpx file since its utmp structure is already large enough. The “x” functions listed above are just aliases for their counterparts without the “x” (e.g., getutxent() is an alias for getutent()).

NOTES

glibc notes

The above functions are not thread-safe. glibc adds reentrant versions

#include <utmp.h>
int getutent_r(struct utmp *ubuf, struct utmp **ubufp);
int getutid_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);
int getutline_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getutent_r(), getutid_r(), getutline_r():

    _GNU_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */    _SVID_SOURCE || _BSD_SOURCE

These functions are GNU extensions, analogs of the functions of the same name without the _r suffix. The ubuf argument gives these functions a place to store their result. On success, they return 0, and a pointer to the result is written in *ubufp. On error, these functions return -1. There are no utmpx equivalents of the above functions. (POSIX.1 does not specify such functions.)

EXAMPLES

The following example adds and removes a utmp record, assuming it is run from within a pseudo terminal. For usage in a real application, you should check the return values of getpwuid(3) and ttyname(3).

#include <pwd.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <utmp.h>
int
main(void)
{
    struct utmp entry;
    system("echo before adding entry:;who");
    entry.ut_type = USER_PROCESS;
    entry.ut_pid = getpid();
    strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen("/dev/"));
    /* only correct for ptys named /dev/tty[pqr][0-9a-z] */
    strcpy(entry.ut_id, ttyname(STDIN_FILENO) + strlen("/dev/tty"));
    entry.ut_time = time(NULL);
    strcpy(entry.ut_user, getpwuid(getuid())->pw_name);
    memset(entry.ut_host, 0, UT_HOSTSIZE);
    entry.ut_addr = 0;
    setutent();
    pututline(&entry);
    system("echo after adding entry:;who");
    entry.ut_type = DEAD_PROCESS;
    memset(entry.ut_line, 0, UT_LINESIZE);
    entry.ut_time = 0;
    memset(entry.ut_user, 0, UT_NAMESIZE);
    setutent();
    pututline(&entry);
    system("echo after removing entry:;who");
    endutent();
    exit(EXIT_SUCCESS);
}

SEE ALSO

getutmp(3), utmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2440 - Linux cli command URI_Heuristicpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command URI_Heuristicpm and provides detailed information about the command URI_Heuristicpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the URI_Heuristicpm.

NAME 🖥️ URI_Heuristicpm 🖥️

Expand URI using heuristics

SYNOPSIS

use URI::Heuristic qw(uf_uristr); $u = uf_uristr(“example”); # http://www.example.com $u = uf_uristr(“www.sol.no/sol"); # http://www.sol.no/sol $u = uf_uristr(“aas”); # http://www.aas.no $u = uf_uristr(“ftp.funet.fi”); # ftp://ftp.funet.fi $u = uf_uristr("/etc/passwd”); # file:/etc/passwd

DESCRIPTION

This module provides functions that expand strings into real absolute URIs using some built-in heuristics. Strings that already represent absolute URIs (i.e. that start with a scheme: part) are never modified and are returned unchanged. The main use of these functions is to allow abbreviated URIs similar to what many web browsers allow for URIs typed in by the user.

The following functions are provided:

uf_uristr($str)
Tries to make the argument string into a proper absolute URI string. The “uf_” prefix stands for “User Friendly”. Under MacOS, it assumes that any string with a common URL scheme (http, ftp, etc.) is a URL rather than a local path. So don’t name your volumes after common URL schemes and expect uf_uristr() to construct valid file: URL’s on those volumes for you, because it won’t.

uf_uri($str)
Works the same way as uf_uristr() but returns a URI object.

ENVIRONMENT

If the hostname portion of a URI does not contain any dots, then certain qualified guesses are made. These guesses are governed by the following environment variables:

COUNTRY
The two-letter country code (ISO 3166) for your location. If the domain name of your host ends with two letters, then it is taken to be the default country. See also Locale::Country.

HTTP_ACCEPT_LANGUAGE, LC_ALL, LANG
If COUNTRY is not set, these standard environment variables are examined and country (not language) information possibly found in them is used as the default country.

URL_GUESS_PATTERN
Contains a space-separated list of URL patterns to try. The string “ACME” is for some reason used as a placeholder for the host name in the URL provided. Example: URL_GUESS_PATTERN=“www.ACME.no www.ACME.se www.ACME.com” export URL_GUESS_PATTERN Specifying URL_GUESS_PATTERN disables any guessing rules based on country. An empty URL_GUESS_PATTERN disables any guessing that involves host name lookups.

COPYRIGHT

Copyright 1997-1998, Gisle Aas

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2441 - Linux cli command XtSuperclass

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtSuperclass and provides detailed information about the command XtSuperclass, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtSuperclass.

NAME 🖥️ XtSuperclass 🖥️

obtain and verify a widget’s class

SYNTAX

#include <X11/Intrinsic.h>

WidgetClass XtClass(Widget w);

WidgetClass XtSuperclass(Widget w);

Boolean XtIsSubclass(Widget w, WidgetClass widget_class);

void XtCheckSubclass(Widget widget, WidgetClass widget_class, String message);

Boolean XtIsObject(Widget w);

Boolean XtIsRectObj(Widget w);

Boolean XtIsWidget(Widget w);

Boolean XtIsComposite(Widget w);

Boolean XtIsConstraint(Widget w);

Boolean XtIsShell(Widget w);

Boolean XtIsOverrideShell(Widget w);

Boolean XtIsWMShell(Widget w);

Boolean XtIsVendorShell(Widget w);

Boolean XtIsTransientShell(Widget w);

Boolean XtIsTopLevelShell(Widget w);

Boolean XtIsApplicationShell(Widget w);

Boolean XtIsSessionShell(Widget w);

ARGUMENTS

  1. Specifies the widget.

widget_class
Specifies the widget class.

message
Specifies the message that is to be used.

DESCRIPTION

The XtClass function returns a pointer to the widget’s class structure.

The XtSuperclass function returns a pointer to the widget’s superclass class structure.

The XtIsSubclass function returns True if the class of the specified widget is equal to or is a subclass of the specified class. The widget’s class can be any number of subclasses down the chain and need not be an immediate subclass of the specified class. Composite widgets that need to restrict the class of the items they contain can use XtIsSubclass to find out if a widget belongs to the desired class of objects.

The XtCheckSubclass macro determines if the class of the specified widget is equal to or is a subclass of the specified widget class. The widget can be any number of subclasses down the chain and need not be an immediate subclass of the specified widget class. If the specified widget is not a subclass, XtCheckSubclass constructs an error message from the supplied message, the widget’s actual class, and the expected class and calls XtErrorMsg. XtCheckSubclass should be used at the entry point of exported routines to ensure that the client has passed in a valid widget class for the exported operation.

XtCheckSubclass is only executed when the widget has been compiled with the compiler symbol DEBUG defined; otherwise, it is defined as the empty string and generates no code.

To test if a given widget belongs to a subclass of an Intrinsics-defined class, the Intrinsics defines macros or functions equivalent to XtIsSubclass for each of the built-in classes. These procedures are XtIsObject, XtIsRectObj, XtIsWidget, XtIsComposite, XtIsConstraint, XtIsShell, XtIsOverrideShell, XtIsWMShell, XtIsVendorShell, XtIsTransientShell, XtIsTopLevelShell, XtIsApplicationShell, and XtIsSessionShell.

The

SEE ALSO

XtAppErrorMsg(3), XtDisplay(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2442 - Linux cli command time_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command time_ttype and provides detailed information about the command time_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the time_ttype.

NAME 🖥️ time_ttype 🖥️

integer time

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <time.h>
typedef /* ... */ time_t;
#include <sys/types.h>
typedef /* ... */ suseconds_t;
typedef /* ... */ useconds_t;

DESCRIPTION

time_t
Used for time in seconds. According to POSIX, it is an integer type.

suseconds_t
Used for time in microseconds. It is a signed integer type capable of storing values at least in the range [-1, 1000000].

useconds_t
Used for time in microseconds. It is an unsigned integer type capable of storing values at least in the range [0, 1000000].

STANDARDS

time_t
C11, POSIX.1-2008.

suseconds_t
useconds_t
POSIX.1-2008.

HISTORY

time_t
C89, POSIX.1-2001.

suseconds_t
useconds_t
POSIX.1-2001.

<sched.h> defines time_t since POSIX.1-2008.

POSIX.1-2001 defined useconds_t in <unistd.h> too.

NOTES

On some architectures, the width of time_t can be controlled with the feature test macro _TIME_BITS. See feature_test_macros(7).

The following headers also provide time_t: <sched.h>, <sys/msg.h>, <sys/select.h>, <sys/sem.h>, <sys/shm.h>, <sys/stat.h>, <sys/time.h>, <sys/types.h>, and <utime.h>.

The following headers also provide suseconds_t: <sys/select.h> and <sys/time.h>.

SEE ALSO

stime(2), time(2), ctime(3), difftime(3), usleep(3), timeval(3type)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2443 - Linux cli command Tk_overviewpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_overviewpm and provides detailed information about the command Tk_overviewpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_overviewpm.

NAME 🖥️ Tk_overviewpm 🖥️

An overview of an Object Oriented Tk8 extension for perl5

SYNOPSIS

use Tk;

$main = MainWindow->new();

$widget = $main->Widget(...);

$widget->pack(...);

MainLoop;

DESCRIPTION

In writing the perl Tk extension, the goals were to provide a complete interface to the latest production version of John Ousterhout’s Tk, while providing an Object Oriented interface to perl code.

CONTENTS

The package is composed of three loosely connected parts:

pTk - Converted Tk source
The pTk sub-directory is a copy of the C code of Tk8.x, modified to allow use by languages other than the original Tcl. (The pTk can be read as ‘perl’ Tk or ‘portable’ Tk, depending on your sensibilities.)

Tk to Perl ‘Glue’
The top level directory provides Tk.xs and tkGlue.c which provide the perl-callable interfaces to pTk

Perl code for ‘Widget’ Classes
The Tk sub-directory contains the various perl modules that comprise the “Classes” that are visible to Tk applications. The “major” widgets such as Tk::Text are actually in separate directories at the top level (e.g. Text/* for Tk::Text) and are dynamically loaded as needed on platforms which support perl5’s DynaLoader.

CLASS HIERARCHY

package Tk; - the ‘base class’
All the “command names” documented in Tcl/Tk are made to look like perl sub’s and reside in the Tk package. Their names are all lower case. Typically there are very few commands at this level which are called directly by applications.

package Tk::Widget; - the ‘Widget class’
There are no actual objects of the Tk::Widget class; however all the various Tk window “widgets” inherit from it, and it in turn inherits all the core Tk functions from Tk. Tk::Widget provides various functions and interfaces which are common to all Widgets. A widget is represented to perl as a blessed reference to a hash. There are some members of the hash which are private to Tk and its tkGlue code. Keys starting with ’.’ and of the form /^_[A-Z][A-Za-z_]+_$/ (i.e. starting and ending in _ and with first char after _ being upper case) should be considered reserved to Tk.

Tk::Button, Tk::Entry, Tk::Text …
There is one class for each of the “Tk” widget item types. Some of them like Tk::Frame do very little indeed, and really only exist so that they can be derived from or so that focus or menu traversal can discover the “kind” of window being processed. Other classes, Tk::Text for example, provide a lot of methods used with Tk’s “bind” to provide a rich keyboard/mouse interface to the widgets’ data. These widget classes also include conversions of the Tcl code for event bindings, keyboard focus traversal, menu bars, and menu keyboard traversal. All the Tcl functions have been converted, but the names have changed (systematically) and they have been split up between the various classes in what I hope is an appropriate manner. Name changes are normally: dropping initial tk_ as the Tk-ness is implicit in the Tk:: prefix, and similarly dropping say Menu from the name if it has been moved the Tk::Menu class. Thus ‘proc tkMenuNextEntry’ becomes ‘sub NextEntry’ in the Tk::Menu package.

Tk::Image
This does for Tk8.x’s “images” what Tk::Widget does for widgets. Images are new to Tk8.x and the class structure is not mature either. There are three sub-classes Tk::Bitmap, Tk::Pixmap and Tk::Photo. It is possible to create dynamic or auto-loaded image types inherited from Tk::Image for other image types or photo formats (e.g. support for TIFF format).

Composite Widgets
A composite is some kind of ‘frame’ with subwidgets which give it useful behaviour. Tk::Dialog is an example of a composite widget classes built from the basic Tk ones. It is intended that user code should not need to be aware that a particular class is a composite, and create and configure such widgets in the same manner as any other kind. The configure mechanism and the methods of the class manipulate the subwidgets as required. Composite widgets are implemented via Tk::Frame and multiple inheritance. The two ‘frame’ base classes Tk::Frame and Tk::Toplevel include the additional class Tk::Derived in their inheritance. Tk::Derived provides methods to allow additional configure options to be defined for a widget. A Composite widget is typically defined as derived from Tk::Frame or Tk::Toplevel (e.g. Tk::Dialog).

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2444 - Linux cli command XtAddRawEventHandler

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAddRawEventHandler and provides detailed information about the command XtAddRawEventHandler, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAddRawEventHandler.

NAME 🖥️ XtAddRawEventHandler 🖥️

add and remove event handlers

SYNTAX

#include <X11/Intrinsic.h>

void XtAddEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data);

void XtAddRawEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data);

void XtRemoveEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data);

void XtRemoveRawEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data);

void XtInsertEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data, XtListPosition position);

void XtInsertRawEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data, XtListPosition position);

typedef enum { XtListHead, XtListTail } XtListPosition;

ARGUMENTS

client_data
Specifies additional data to be passed to the client’s event handler.

event_mask
Specifies the event mask for which to call or unregister this procedure.

nonmaskable
Specifies a Boolean value that indicates whether this procedure should be called or removed on the nonmaskable events ( GraphicsExpose, NoExpose, SelectionClear, SelectionRequest, SelectionNotify, ClientMessage, and MappingNotify).

proc
Specifies the procedure that is to be added or removed.

  1. Specifies the widget for which this event handler is being registered.

position
Specifies when the event handler is to be called relative to other previously registered handlers.

DESCRIPTION

The XtAddEventHandler function registers a procedure with the dispatch mechanism that is to be called when an event that matches the mask occurs on the specified widget. If the procedure is already registered with the same client_data, the specified mask is ORed into the existing mask. If the widget is realized, XtAddEventHandler calls XSelectInput, if necessary.

The XtAddRawEventHandler function is similar to XtAddEventHandler except that it does not affect the widget’s mask and never causes an XSelectInput for its events. Note that the widget might already have those mask bits set because of other nonraw event handlers registered on it.

The XtRemoveRawEventHandler function stops the specified procedure from receiving the specified events. Because the procedure is a raw event handler, this does not affect the widget’s mask and never causes a call on XSelectInput.

XtInsertEventHandler is identical to XtAddEventHandler with the additional position argument. If position is XtListHead, the event handler is registered to that it will be called before any event handlers that were previously registered for the same widget. If position is XtListTail, the event handler is registered to be called after any previously registered event handlers. If the procedure is already registered with the same client_data value, the specified mask augments the existing mask and the procedure is repositioned in the list.

XtInsertRawEventHandler is similar to XtInsertEventHandler except that it does not modify the widget’s event mask and never causes an XSelectInput for the specified events. If the procedure is already registered with the same client_data value, the specified mask augments the existing mask and the procedure is repositioned in the list.

SEE ALSO

XtAppNextEvent(3), XtBuildEventMask(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2445 - Linux cli command Regexp_Common__supportpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common__supportpm and provides detailed information about the command Regexp_Common__supportpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common__supportpm.

NAME 🖥️ Regexp_Common__supportpm 🖥️

  • Support functions for Regexp::Common.

SYNOPSIS

use Regexp::Common::_support qw /luhn/; luhn ($number) # Returns true/false.

DESCRIPTION

This module contains some subroutines to be used by other Regexp::Common modules. It’s not intended to be used directly. Subroutines from the module may disappear without any notice, or their meaning or interface may change without notice.

luhn
This subroutine returns true if its argument passes the luhn checksum test.

SEE ALSO

<http://www.webopedia.com/TERM/L/Luhn_formula.html>.

AUTHOR

Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2446 - Linux cli command sem_trywait

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sem_trywait and provides detailed information about the command sem_trywait, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sem_trywait.

NAME 🖥️ sem_trywait 🖥️

lock a semaphore

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <semaphore.h>
int sem_wait(sem_t *sem);
int sem_trywait(sem_t *sem);
int sem_timedwait(sem_t *restrict sem,
 const struct timespec *restrict abs_timeout);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sem_timedwait():

    _POSIX_C_SOURCE >= 200112L

DESCRIPTION

sem_wait() decrements (locks) the semaphore pointed to by sem. If the semaphore’s value is greater than zero, then the decrement proceeds, and the function returns, immediately. If the semaphore currently has the value zero, then the call blocks until either it becomes possible to perform the decrement (i.e., the semaphore value rises above zero), or a signal handler interrupts the call.

sem_trywait() is the same as sem_wait(), except that if the decrement cannot be immediately performed, then call returns an error (errno set to EAGAIN) instead of blocking.

sem_timedwait() is the same as sem_wait(), except that abs_timeout specifies a limit on the amount of time that the call should block if the decrement cannot be immediately performed. The abs_timeout argument points to a timespec(3) structure that specifies an absolute timeout in seconds and nanoseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).

If the timeout has already expired by the time of the call, and the semaphore could not be locked immediately, then sem_timedwait() fails with a timeout error (errno set to ETIMEDOUT).

If the operation can be performed immediately, then sem_timedwait() never fails with a timeout error, regardless of the value of abs_timeout. Furthermore, the validity of abs_timeout is not checked in this case.

RETURN VALUE

All of these functions return 0 on success; on error, the value of the semaphore is left unchanged, -1 is returned, and errno is set to indicate the error.

ERRORS

EAGAIN
(sem_trywait()) The operation could not be performed without blocking (i.e., the semaphore currently has the value zero).

EINTR
The call was interrupted by a signal handler; see signal(7).

EINVAL
sem is not a valid semaphore.

EINVAL
(sem_timedwait()) The value of abs_timeout.tv_nsecs is less than 0, or greater than or equal to 1000 million.

ETIMEDOUT
(sem_timedwait()) The call timed out before the semaphore could be locked.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sem_wait(), sem_trywait(), sem_timedwait()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

EXAMPLES

The (somewhat trivial) program shown below operates on an unnamed semaphore. The program expects two command-line arguments. The first argument specifies a seconds value that is used to set an alarm timer to generate a SIGALRM signal. This handler performs a sem_post(3) to increment the semaphore that is being waited on in main() using sem_timedwait(). The second command-line argument specifies the length of the timeout, in seconds, for sem_timedwait(). The following shows what happens on two different runs of the program:

$ ./a.out 2 3
About to call sem_timedwait()
sem_post() from handler
sem_timedwait() succeeded
$ ./a.out 2 1
About to call sem_timedwait()
sem_timedwait() timed out

Program source

#include <errno.h>
#include <semaphore.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include <assert.h>
sem_t sem;
#define handle_error(msg) \
    do { perror(msg); exit(EXIT_FAILURE); } while (0)
static void
handler(int sig)
{
    write(STDOUT_FILENO, "sem_post() from handler

“, 24); if (sem_post(&sem) == -1) { write(STDERR_FILENO, “sem_post() failed “, 18); _exit(EXIT_FAILURE); } } int main(int argc, char argv[]) { struct sigaction sa; struct timespec ts; int s; if (argc != 3) { fprintf(stderr, “Usage: %s “, argv[0]); exit(EXIT_FAILURE); } if (sem_init(&sem, 0, 0) == -1) handle_error(“sem_init”); / Establish SIGALRM handler; set alarm timer using argv[1]. / sa.sa_handler = handler; sigemptyset(&sa.sa_mask); sa.sa_flags = 0; if (sigaction(SIGALRM, &sa, NULL) == -1) handle_error(“sigaction”); alarm(atoi(argv[1])); / Calculate relative interval as current time plus number of seconds given argv[2]. / if (clock_gettime(CLOCK_REALTIME, &ts) == -1) handle_error(“clock_gettime”); ts.tv_sec += atoi(argv[2]); printf("%s() about to call sem_timedwait() “, func); while ((s = sem_timedwait(&sem, &ts)) == -1 && errno == EINTR) continue; / Restart if interrupted by handler. / / Check what happened. */ if (s == -1) { if (errno == ETIMEDOUT) printf(“sem_timedwait() timed out “); else perror(“sem_timedwait”); } else printf(“sem_timedwait() succeeded “); exit((s == 0) ? EXIT_SUCCESS : EXIT_FAILURE); }

SEE ALSO

clock_gettime(2), sem_getvalue(3), sem_post(3), timespec(3), sem_overview(7), time(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2447 - Linux cli command tgammaf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tgammaf and provides detailed information about the command tgammaf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tgammaf.

NAME 🖥️ tgammaf 🖥️

true gamma function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double tgamma(double x);
float tgammaf(float x);
long double tgammal(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

tgamma(), tgammaf(), tgammal():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions calculate the Gamma function of x.

The Gamma function is defined by

Gamma(x) = integral from 0 to infinity of t^(x-1) e^-t dt

It is defined for every real number except for nonpositive integers. For nonnegative integral m one has

Gamma(m+1) = m!

and, more generally, for all x:

Gamma(x+1) = x * Gamma(x)

Furthermore, the following is valid for all values of x outside the poles:

Gamma(x) * Gamma(1 - x) = PI / sin(PI * x)

RETURN VALUE

On success, these functions return Gamma(x).

If x is a NaN, a NaN is returned.

If x is positive infinity, positive infinity is returned.

If x is a negative integer, or is negative infinity, a domain error occurs, and a NaN is returned.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the correct mathematical sign.

If the result underflows, a range error occurs, and the functions return 0, with the correct mathematical sign.

If x is -0 or +0, a pole error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the same sign as the 0.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is a negative integer, or negative infinity
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised (but see BUGS).

Pole error: x is +0 or -0
errno is set to ERANGE. A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised.

Range error: result overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

glibc also gives the following error which is not specified in C99 or POSIX.1-2001.

Range error: result underflow
An underflow floating-point exception (FE_UNDERFLOW) is raised, and errno is set to ERANGE.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tgamma(), tgammaf(), tgammal()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

NOTES

This function had to be called “true gamma function” since there is already a function gamma(3) that returns something else (see gamma(3) for details).

BUGS

Before glibc 2.18, the glibc implementation of these functions did not set errno to EDOM when x is negative infinity.

Before glibc 2.19, the glibc implementation of these functions did not set errno to ERANGE on an underflow range error.

In glibc versions 2.3.3 and earlier, an argument of +0 or -0 incorrectly produced a domain error (errno set to EDOM and an FE_INVALID exception raised), rather than a pole error.

SEE ALSO

gamma(3), lgamma(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2448 - Linux cli command Net_Server_Singlepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Server_Singlepm and provides detailed information about the command Net_Server_Singlepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Server_Singlepm.

NAME 🖥️ Net_Server_Singlepm 🖥️

Net::Server personality

SYNOPSIS

use base qw(Net::Server::Single); sub process_request { #…code… }

DESCRIPTION

This module offers no functionality beyond the Net::Server base class. This modules only purpose is to provide parallelism for the MultiType personality.

See Net::Server

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2449 - Linux cli command Moose_Util_TypeConstraintspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Util_TypeConstraintspm and provides detailed information about the command Moose_Util_TypeConstraintspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Util_TypeConstraintspm.

NAME 🖥️ Moose_Util_TypeConstraintspm 🖥️

Type constraint system for Moose

VERSION

version 2.2207

SYNOPSIS

use Moose::Util::TypeConstraints; subtype Natural, as Int, where { $_ > 0 }; subtype NaturalLessThanTen, as Natural, where { $_ < 10 }, message { “This number ($_) is not less than ten!” }; coerce Num, from Str, via { 0+$_ }; class_type DateTimeClass, { class => DateTime }; role_type Barks, { role => Some::Library::Role::Barks }; enum RGBColors, [qw(red green blue)]; union StringOrArray, [qw( String ArrayRef )]; no Moose::Util::TypeConstraints;

DESCRIPTION

This module provides Moose with the ability to create custom type constraints to be used in attribute definition.

Important Caveat

This is NOT a type system for Perl 5. These are type constraints, and they are not used by Moose unless you tell it to. No type inference is performed, expressions are not typed, etc. etc. etc.

A type constraint is at heart a small “check if a value is valid” function. A constraint can be associated with an attribute. This simplifies parameter validation, and makes your code clearer to read, because you can refer to constraints by name.

Slightly Less Important Caveat

It is always a good idea to quote your type names.

This prevents Perl from trying to execute the call as an indirect object call. This can be an issue when you have a subtype with the same name as a valid class.

For instance:

subtype DateTime => as Object => where { $_->isa(DateTime) };

will just work, while this:

use DateTime; subtype DateTime => as Object => where { $_->isa(DateTime) };

will fail silently and cause many headaches. The simple way to solve this, as well as future proof your subtypes from classes which have yet to have been created, is to quote the type name:

use DateTime; subtype DateTime, as Object, where { $_->isa(DateTime) };

Default Type Constraints

This module also provides a simple hierarchy for Perl 5 types, here is that hierarchy represented visually.

Any Item Bool Maybe[`a] Undef Defined Value Str Num Int ClassName RoleName Ref ScalarRef[`a] ArrayRef[`a] HashRef[`a] CodeRef RegexpRef GlobRef FileHandle Object

NOTE: Any type followed by a type parameter [`a] can be parameterized, this means you can say:

ArrayRef[Int] # an array of integers HashRef[CodeRef] # a hash of str to CODE ref mappings ScalarRef[Int] # a reference to an integer Maybe[Str] # value may be a string, may be undefined

If Moose finds a name in brackets that it does not recognize as an existing type, it assumes that this is a class name, for example ArrayRef[DateTime].

NOTE: Unless you parameterize a type, then it is invalid to include the square brackets. I.e. ArrayRef[] will be treated as a new type name, not as a parameterization of ArrayRef.

NOTE: The Undef type constraint for the most part works correctly now, but edge cases may still exist, please use it sparingly.

NOTE: The ClassName type constraint does a complex package existence check. This means that your class must be loaded for this type constraint to pass.

NOTE: The RoleName constraint checks a string is a package name which is a role, like MyApp::Role::Comparable.

Type Constraint Naming

Type names declared via this module can only contain alphanumeric characters, colons (:), and periods (.).

Since the types created by this module are global, it is suggested that you namespace your types just as you would namespace your modules. So instead of creating a Color type for your My::Graphics module, you would call the type My::Graphics::Types::Color instead.

Use with Other Constraint Modules

This module can play nicely with other constraint modules with some slight tweaking. The where clause in types is expected to be a CODE reference which checks its first argument and returns a boolean. Since most constraint modules work in a similar way, it should be simple to adapt them to work with Moose.

For instance, this is how you could use it with Declare::Constraints::Simple to declare a completely new type.

type HashOfArrayOfObjects, where { IsHashRef( -keys => HasLength, -values => IsArrayRef(IsObject) )->(@_); };

For more examples see the t/examples/example_w_DCS.t test file.

Here is an example of using Test::Deep and its non-test related eq_deeply function.

type ArrayOfHashOfBarsAndRandomNumbers, where { eq_deeply($_, array_each(subhashof({ bar => isa(Bar), random_number => ignore() }))) };

For a complete example see the t/examples/example_w_TestDeep.t test file.

Error messages

Type constraints can also specify custom error messages, for when they fail to validate. This is provided as just another coderef, which receives the invalid value in $_, as in:

subtype PositiveInt, as Int, where { $_ > 0 }, message { “$_ is not a positive integer!” };

If no message is specified, a default message will be used, which indicates which type constraint was being used and what value failed. If Devel::PartialDump (version 0.14 or higher) is installed, it will be used to display the invalid value, otherwise it will just be printed as is.

FUNCTIONS

Type Constraint Constructors

The following functions are used to create type constraints. They will also register the type constraints your create in a global registry that is used to look types up by name.

See the “SYNOPSIS” for an example of how to use these.

subtype ‘Name’, as ‘Parent’, where { } …

This creates a named subtype.

If you provide a parent that Moose does not recognize, it will automatically create a new class type constraint for this name.

When creating a named type, the subtype function should either be called with the sugar helpers (where, message, etc), or with a name and a hashref of parameters:

subtype( Foo, { where => …, message => … } );

The valid hashref keys are as (the parent), where, message, and inline_as.

subtype as ‘Parent’, where { } …

This creates an unnamed subtype and will return the type constraint meta-object, which will be an instance of Moose::Meta::TypeConstraint.

When creating an anonymous type, the subtype function should either be called with the sugar helpers (where, message, etc), or with just a hashref of parameters:

subtype( { where => …, message => … } );

class_type ($class, ?$options)

Creates a new subtype of Object with the name $class and the metaclass Moose::Meta::TypeConstraint::Class.

# Create a type called Box which tests for objects which ->isa(Box) class_type Box;

By default, the name of the type and the name of the class are the same, but you can specify both separately.

# Create a type called Box which tests for objects which ->isa(ObjectLibrary::Box); class_type Box, { class => ObjectLibrary::Box };

role_type ($role, ?$options)

Creates a Role type constraint with the name $role and the metaclass Moose::Meta::TypeConstraint::Role.

# Create a type called Walks which tests for objects which ->does(Walks) role_type Walks;

By default, the name of the type and the name of the role are the same, but you can specify both separately.

# Create a type called Walks which tests for objects which ->does(MooseX::Role::Walks); role_type Walks, { role => MooseX::Role::Walks };

maybe_type ($type)

Creates a type constraint for either undef or something of the given type.

duck_type ($name, \methods)

This will create a subtype of Object and test to make sure the value can() do the methods in \@methods.

This is intended as an easy way to accept non-Moose objects that provide a certain interface. If you’re using Moose classes, we recommend that you use a requires-only Role instead.

duck_type (\methods)

If passed an ARRAY reference as the only parameter instead of the $name, \@methods pair, this will create an unnamed duck type. This can be used in an attribute definition like so:

has cache => ( is => ro, isa => duck_type( [qw( get_set )] ), );

enum ($name, \values)

This will create a basic subtype for a given set of strings. The resulting constraint will be a subtype of Str and will match any of the items in \@values. It is case sensitive. See the “SYNOPSIS” for a simple example.

NOTE: This is not a true proper enum type, it is simply a convenient constraint builder.

enum (\values)

If passed an ARRAY reference as the only parameter instead of the $name, \@values pair, this will create an unnamed enum. This can then be used in an attribute definition like so:

has sort_order => ( is => ro, isa => enum([qw[ ascending descending ]]), );

union ($name, \constraints)

This will create a basic subtype where any of the provided constraints may match in order to satisfy this constraint.

union (\constraints)

If passed an ARRAY reference as the only parameter instead of the $name, \@constraints pair, this will create an unnamed union. This can then be used in an attribute definition like so:

has items => ( is => ro, isa => union([qw[ Str ArrayRef ]]), );

This is similar to the existing string union:

isa => Str|ArrayRef

except that it supports anonymous elements as child constraints:

has color => ( isa => ro, isa => union([ Int, enum([qw[ red green blue ]]) ]), );

as ‘Parent’

This is just sugar for the type constraint construction syntax.

It takes a single argument, which is the name of a parent type.

where { … }

This is just sugar for the type constraint construction syntax.

It takes a subroutine reference as an argument. When the type constraint is tested, the reference is run with the value to be tested in $_. This reference should return true or false to indicate whether or not the constraint check passed.

message { … }

This is just sugar for the type constraint construction syntax.

It takes a subroutine reference as an argument. When the type constraint fails, then the code block is run with the value provided in $_. This reference should return a string, which will be used in the text of the exception thrown.

inline_as { … }

This can be used to define a “hand optimized” inlinable version of your type constraint.

You provide a subroutine which will be called as a method on a Moose::Meta::TypeConstraint object. It will receive a single parameter, the name of the variable to check, typically something like "$_" or "$_[0]".

The subroutine should return a code string suitable for inlining. You can assume that the check will be wrapped in parentheses when it is inlined.

The inlined code should include any checks that your type’s parent types do. If your parent type constraint defines its own inlining, you can simply use that to avoid repeating code. For example, here is the inlining code for the Value type, which is a subtype of Defined:

sub { $_[0]->parent()->_inline_check($_[1]) . && !ref( . $_[1] . ) }

type ‘Name’, where { } …

This creates a base type, which has no parent.

The type function should either be called with the sugar helpers (where, message, etc), or with a name and a hashref of parameters:

type( Foo, { where => …, message => … } );

The valid hashref keys are where, message, and inlined_as.

Type Constraint Utilities

match_on_type $value => ( $type => \action, … ?\default )

This is a utility function for doing simple type based dispatching similar to match/case in OCaml and case/of in Haskell. It is not as featureful as those languages, nor does not it support any kind of automatic destructuring bind. Here is a simple Perl pretty printer dispatching over the core Moose types.

sub ppprint { my $x = shift; match_on_type $x => ( HashRef => sub { my $hash = shift; { . ( join “, " => map { $_ . => . ppprint( $hash->{$_} ) } sort keys %$hash ) . }; }, ArrayRef => sub { my $array = shift; [ . ( join “, " => map { ppprint($_) } @$array ) . ]; }, CodeRef => sub {sub { … }}, RegexpRef => sub { qr/ . $_ . / }, GlobRef => sub { * . B::svref_2object($_)->NAME }, Object => sub { $_->can(to_string) ? $_->to_string : $_ }, ScalarRef => sub { \ . ppprint( ${$_} ) }, Num => sub {$_}, Str => sub { " . $_ . " }, Undef => sub {undef}, => sub { die “I dont know what $_ is” } ); }

Or a simple JSON serializer:

sub to_json { my $x = shift; match_on_type $x => ( HashRef => sub { my $hash = shift; { . ( join “, " => map { " . $_ . " : . to_json( $hash->{$_} ) } sort keys %$hash ) . }; }, ArrayRef => sub { my $array = shift; [ . ( join “, " => map { to_json($_) } @$array ) . ]; }, Num => sub {$_}, Str => sub { " . $_ . " }, Undef => sub {null}, => sub { die “$_ is not acceptable json type” } ); }

The matcher is done by mapping a $type to an \&action. The $type can be either a string type or a Moose::Meta::TypeConstraint object, and \&action is a subroutine reference. This function will dispatch on the first match for $value. It is possible to have a catch-all by providing an additional subroutine reference as the final argument to match_on_type.

Type Coercion Constructors

You can define coercions for type constraints, which allow you to automatically transform values to something valid for the type constraint. If you ask your accessor to coerce by adding the option coerce => 1, then Moose will run the type-coercion code first, followed by the type constraint check. This feature should be used carefully as it is very powerful and could easily take off a limb if you are not careful.

See the “SYNOPSIS” for an example of how to use these.

coerce ‘Name’, from ‘OtherName’, via { … }

This defines a coercion from one type to another. The Name argument is the type you are coercing to.

To define multiple coercions, supply more sets of from/via pairs:

coerce Name, from OtherName, via { … }, from ThirdName, via { … };

from ‘OtherName’

This is just sugar for the type coercion construction syntax.

It takes a single type name (or type object), which is the type being coerced from.

via { … }

This is just sugar for the type coercion construction syntax.

It takes a subroutine reference. This reference will be called with the value to be coerced in $_. It is expected to return a new value of the proper type for the coercion.

Creating and Finding Type Constraints

These are additional functions for creating and finding type constraints. Most of these functions are not available for importing. The ones that are importable as specified.

find_type_constraint($type_name)

This function can be used to locate the Moose::Meta::TypeConstraint object for a named type.

This function is importable.

register_type_constraint($type_object)

This function will register a Moose::Meta::TypeConstraint with the global type registry.

This function is importable.

normalize_type_constraint_name($type_constraint_name)

This method takes a type constraint name and returns the normalized form. This removes any whitespace in the string.

create_type_constraint_union($pipe_separated_types | @type_constraint_names)

create_named_type_constraint_union($name, $pipe_separated_types | @type_constraint_names)

This can take a union type specification like Int|ArrayRef[Int], or a list of names. It returns a new Moose::Meta::TypeConstraint::Union object.

create_parameterized_type_constraint($type_name)

Given a $type_name in the form of BaseType[ContainerType], this will create a new Moose::Meta::TypeConstraint::Parameterized object. The BaseType must already exist as a parameterizable type.

create_class_type_constraint($class, $options)

Given a class name this function will create a new Moose::Meta::TypeConstraint::Class object for that class name.

The $options is a hash reference that will be passed to the Moose::Meta::TypeConstraint::Class constructor (as a hash).

create_role_type_constraint($role, $options)

Given a role name this function will create a new Moose::Meta::TypeConstraint::Role object for that role name.

The $options is a hash reference that will be passed to the Moose::Meta::TypeConstraint::Role constructor (as a hash).

create_enum_type_constraint($name, $values)

Given a enum name this function will create a new Moose::Meta::TypeConstraint::Enum object for that enum name.

create_duck_type_constraint($name, $methods)

Given a duck type name this function will create a new Moose::Meta::TypeConstraint::DuckType object for that enum name.

find_or_parse_type_constraint($type_name)

Given a type name, this first attempts to find a matching constraint in the global registry.

If the type name is a union or parameterized type, it will create a new object of the appropriate, but if given a “regular” type that does not yet exist, it simply returns false.

When given a union or parameterized type, the member or base type must already exist.

If it creates a new union or parameterized type, it will add it to the global registry.

find_or_create_isa_type_constraint($type_name)

find_or_create_does_type_constraint($type_name)

These functions will first call find_or_parse_type_constraint. If that function does not return a type, a new type object will be created.

The isa variant will use create_class_type_constraint and the does variant will use create_role_type_constraint.

get_type_constraint_registry

Returns the Moose::Meta::TypeConstraint::Registry object which keeps track of all type constraints.

list_all_type_constraints

This will return a list of type constraint names in the global registry. You can then fetch the actual type object using find_type_constraint($type_name).

list_all_builtin_type_constraints

This will return a list of builtin type constraints, meaning those which are defined in this module. See the “Default Type Constraints” section for a complete list.

export_type_constraints_as_functions

This will export all the current type constraints as functions into the caller’s namespace (Int(), Str(), etc). Right now, this is mostly used for testing, but it might prove useful to others.

get_all_parameterizable_types

This returns all the parameterizable types that have been registered, as a list of type objects.

add_parameterizable_type($type)

Adds $type to the list of parameterizable types

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2450 - Linux cli command NetPacket_IPv6pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command NetPacket_IPv6pm and provides detailed information about the command NetPacket_IPv6pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the NetPacket_IPv6pm.

NAME 🖥️ NetPacket_IPv6pm 🖥️

Assemble and disassemble IPv6 (Internet Protocol version 6) packets.

VERSION

version 1.7.2

SYNOPSIS

use NetPacket::IPv6; $ip_obj = NetPacket::IPv6->decode($raw_pkt); $ip_pkt = NetPacket::IPv6->encode($ip_obj); $ip_data = NetPacket::IPv6::strip($raw_pkt);

DESCRIPTION

NetPacket::IPv6 provides a set of routines for assembling and disassembling packets using IPv6 (Internet Protocol version 6).

Methods

“NetPacket::IPv6->decode([RAW PACKET])”
Decode the raw packet data given and return an object containing instance data. This method will quite happily decode garbage input. It is the responsibility of the programmer to ensure valid packet data is passed to this method.

“NetPacket::IPv6->encode()”
Return an IPv6 packet encoded with the instance data specified. This will infer the total length of the packet automatically from the payload length and length of any extension headers.

“NetPacket::IPv6->pseudo_header([PACKET LENGTH], [PROTOCOL])”
Return an IPv6 pseudo-header suitable for computing checksums for certain upper-level protocols.

Functions

“NetPacket::IPv6::strip([RAW PACKET])”
Return the encapsulated data (or payload) contained in the IPv6 packet. This data is suitable to be used as input for other NetPacket::* modules. This function is equivalent to creating an object using the decode() constructor and returning the data field of that object.

“NetPacket::IPv6::ipv6_extheader([TYPE])”
Return whether the IP protocol type is an IPv6 extension header.

Instance data

The instance data for the NetPacket::IPv6 object consists of the following fields.

ver
The IP version number of this packet.

traffic_class
The traffic class of this packet, equivalent to the type-of-service field for IPv4.

flow_label
The flow label of this packet.

len
The payload length (including any extension headers) in bytes for this packet.

proto
The IP protocol number for this packet.

hop_limit
The hop limit for this packet, equivalent to the time-to-live field for IPv4.

src_ip
The source IP address for this packet in colon-separated hextet notation.

dest_ip
The destination IP address for this packet in colon-separated hextet notation.

extheaders
Array of any extension headers for this packet, as a hashref containing the fields described below. An ESP (Encapsulating Security Payload) header will not be represented here; as it and any further extension headers and the payload data will be encrypted, it will be instead represented as the packet payload data itself, with a protocol number of 50 (IPv6_EXTHEADER_ESP).

data
The encapsulated data (payload) for this IPv6 packet.

Extension headers may contain the following fields.

type
The extension header type number.

len
The extension header length, in 8-byte units, minus the first 8-byte unit. (For Authentication extension headers, this length is in 4-byte units, minus the first two 4-byte units.)

data
The remaining contents of the extension header following the next-header and length bytes.

Exports

default
none

tags
The following tags group together related exportable items.

“:protos”

“:tos”

“:misc”

Re-exported from NetPacket::IP for convenience.

“:extheaders”
IPv6_EXTHEADER_HOPBYHOP IPv6_EXTHEADER_ROUTING IPv6_EXTHEADER_FRAGMENT IPv6_EXTHEADER_ESP IPv6_EXTHEADER_AUTH IPv6_EXTHEADER_NONEXT IPv6_EXTHEADER_DESTOPT IPv6_EXTHEADER_MOBILITY IPv6_EXTHEADER_HOSTIDENT IPv6_EXTHEADER_SHIM6 IPv6_EXTHEADER_TESTING1 IPv6_EXTHEADER_TESTING2

“:versions”
IP_VERSION_IPv6

“:strip”
Import the strip function ipv6_strip.

“:ALL”
All the above exportable items.

EXAMPLE

The following script dumps IPv6 frames by IP address and protocol to standard output.

#!/usr/bin/perl -w use strict; use Net::PcapUtils; use NetPacket::Ethernet qw(:strip); use NetPacket::IPv6; sub process_pkt { my ($user, $hdr, $pkt) = @_; my $ip_obj = NetPacket::IPv6->decode(eth_strip($pkt)); print("$ip_obj->{src_ip}:$ip_obj->{dest_ip} $ip_obj->{proto} “); } Net::PcapUtils::loop(\process_pkt, FILTER => ip6);

TODO

More specific keys for well-defined extension headers.

Parse routing extension headers to correctly compute upper-level checksums.

COPYRIGHT

Copyright (c) 2018 Dan Book.

This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

AUTHOR

Dan Book <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2451 - Linux cli command __fpurge

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __fpurge and provides detailed information about the command __fpurge, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __fpurge.

NAME 🖥️ __fpurge 🖥️

purge a stream

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

/* unsupported */
#include <stdio.h>
int fpurge(FILE *stream);
/* supported */
#include <stdio.h>
#include <stdio_ext.h>
void __fpurge(FILE *stream);

DESCRIPTION

The function fpurge() clears the buffers of the given stream. For output streams this discards any unwritten output. For input streams this discards any input read from the underlying object but not yet obtained via getc(3); this includes any text pushed back via ungetc(3). See also fflush(3).

The function __fpurge() does precisely the same, but without returning a value.

RETURN VALUE

Upon successful completion fpurge() returns 0. On error, it returns -1 and sets errno to indicate the error.

ERRORS

EBADF
stream is not an open stream.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

__fpurge()

Thread safetyMT-Safe race:stream

STANDARDS

None.

HISTORY

fpurge()
4.4BSD. Not available under Linux.

__fpurge()
Solaris, glibc 2.1.95.

NOTES

Usually it is a mistake to want to discard input buffers.

SEE ALSO

fflush(3), setbuf(3), stdio_ext(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2452 - Linux cli command Image_ExifTool_DarwinCorepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_DarwinCorepm and provides detailed information about the command Image_ExifTool_DarwinCorepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_DarwinCorepm.

NAME 🖥️ Image_ExifTool_DarwinCorepm 🖥️

Darwin Core XMP tags

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This file contains tag definitions for the Darwin Core XMP namespace.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://rs.tdwg.org/dwc/index.htm>

SEE ALSO

“XMP Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2453 - Linux cli command IO_All_Linkpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_All_Linkpm and provides detailed information about the command IO_All_Linkpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_All_Linkpm.

NAME 🖥️ IO_All_Linkpm 🖥️

Link Support for IO::All

SYNOPSIS

See IO::All.

DESCRIPTION

<<<cpan-foot>>>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2454 - Linux cli command log2

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command log2 and provides detailed information about the command log2, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the log2.

NAME 🖥️ log2 🖥️

base-2 logarithmic function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double log2(double x);
float log2f(float x);
long double log2l(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

log2(), log2f(), log2l():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions return the base-2 logarithm of x.

RETURN VALUE

On success, these functions return the base-2 logarithm of x.

For special cases, including where x is 0, 1, negative, infinity, or NaN, see log(3).

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

For a discussion of the errors that can occur for these functions, see log(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

log2(), log2f(), log2l()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD.

SEE ALSO

cbrt(3), clog2(3), log(3), log10(3), sqrt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2455 - Linux cli command sem_post

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sem_post and provides detailed information about the command sem_post, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sem_post.

NAME 🖥️ sem_post 🖥️

unlock a semaphore

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <semaphore.h>
int sem_post(sem_t *sem);

DESCRIPTION

sem_post() increments (unlocks) the semaphore pointed to by sem. If the semaphore’s value consequently becomes greater than zero, then another process or thread blocked in a sem_wait(3) call will be woken up and proceed to lock the semaphore.

RETURN VALUE

sem_post() returns 0 on success; on error, the value of the semaphore is left unchanged, -1 is returned, and errno is set to indicate the error.

ERRORS

EINVAL
sem is not a valid semaphore.

EOVERFLOW
The maximum allowable value for a semaphore would be exceeded.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sem_post()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

sem_post() is async-signal-safe: it may be safely called within a signal handler.

EXAMPLES

See sem_wait(3) and shm_open(3).

SEE ALSO

sem_getvalue(3), sem_wait(3), sem_overview(7), signal-safety(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2456 - Linux cli command zip_source_win32w_create

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_win32w_create and provides detailed information about the command zip_source_win32w_create, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_win32w_create.

libzip (-lzip)

The functions

and

create a zip source on Windows using a Windows Unicode name. They open

and read

bytes from offset

from it. If

is 0 or -1, the whole file (starting from

is used.

If the file supports seek, the source can be used to open a zip archive from.

The file is opened and read when the data from the source is used, usually by

or

Upon successful completion, the created source is returned. Otherwise,

is returned and the error code in

or

is set to indicate the error.

and

fail if:

or

are invalid.

Required memory could not be allocated.

Opening

failed.

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2457 - Linux cli command isblank

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isblank and provides detailed information about the command isblank, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isblank.

NAME 🖥️ isblank 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2458 - Linux cli command Net_DNS_RR_TSIGpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_TSIGpm and provides detailed information about the command Net_DNS_RR_TSIGpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_TSIGpm.

NAME 🖥️ Net_DNS_RR_TSIGpm 🖥️

DNS TSIG resource record

SYNOPSIS

use Net::DNS; $tsig = Net::DNS::RR::TSIG->create( $keyfile ); $tsig = Net::DNS::RR::TSIG->create( $keyfile, fudge => 300 );

DESCRIPTION

Class for DNS Transaction Signature (TSIG) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

algorithm

$algorithm = $rr->algorithm; $rr->algorithm( $algorithm );

A domain name which specifies the name of the algorithm.

key

$rr->key( $key );

Base64 representation of the key material.

keybin

$rr->keybin( $keybin );

Binary representation of the key material.

time_signed

$time_signed = $rr->time_signed; $rr->time_signed( $time_signed );

Signing time as the number of seconds since 1 Jan 1970 00:00:00 UTC. The default signing time is the current time.

fudge

$fudge = $rr->fudge; $rr->fudge( $fudge );

“fudge” represents the permitted error in the signing time. The default fudge is 300 seconds.

mac

$rr->mac( $mac );

Message authentication code (MAC). The programmer must call the Net::DNS::Packet data() object method before this will return anything meaningful.

macbin

$macbin = $rr->macbin; $rr->macbin( $macbin );

Binary message authentication code (MAC).

prior_mac

$prior_mac = $rr->prior_mac; $rr->prior_mac( $prior_mac );

Prior message authentication code (MAC).

prior_macbin

$prior_macbin = $rr->prior_macbin; $rr->prior_macbin( $prior_macbin );

Binary prior message authentication code.

request_mac

$request_mac = $rr->request_mac; $rr->request_mac( $request_mac );

Request message authentication code (MAC).

request_macbin

$request_macbin = $rr->request_macbin; $rr->request_macbin( $request_macbin );

Binary request message authentication code.

original_id

$original_id = $rr->original_id; $rr->original_id( $original_id );

The message ID from the header of the original packet.

error

vrfyerrstr

$rcode = $tsig->error;

Returns the RCODE covering TSIG processing. Common values are NOERROR, BADSIG, BADKEY, and BADTIME. See RFC8945 for details.

other

$other = $tsig->other;

This field should be empty unless the error is BADTIME, in which case it will contain the server time as the number of seconds since 1 Jan 1970 00:00:00 UTC.

sig_function

sub signing_function { my ( $keybin, $data ) = @_; my $hmac = Digest::HMAC->new( $keybin, Digest::MD5 ); $hmac->add( $data ); return $hmac->digest; } $tsig->sig_function( \signing_function );

This sets the signing function to be used for this TSIG record. The default signing function is HMAC-MD5.

sig_data

$sigdata = $tsig->sig_data($packet);

Returns the packet packed according to RFC8945 in a form for signing. This is only needed if you want to supply an external signing function, such as is needed for TSIG-GSS.

create

$tsig = Net::DNS::RR::TSIG->create( $keyfile ); $tsig = Net::DNS::RR::TSIG->create( $keyfile, fudge => 300 );

Returns a TSIG RR constructed using the parameters in the specified key file, which is assumed to have been generated by tsig-keygen.

verify

$verify = $tsig->verify( $data ); $verify = $tsig->verify( $packet ); $verify = $tsig->verify( $reply, $query ); $verify = $tsig->verify( $packet, $prior );

The boolean verify method will return true if the hash over the packet data conforms to the data in the TSIG itself

TSIG Keys

The TSIG authentication mechanism employs shared secret keys to establish a trust relationship between two entities.

It should be noted that it is possible for more than one key to be in use simultaneously between any such pair of entities.

TSIG keys are generated using the tsig-keygen utility distributed with ISC BIND:

tsig-keygen -a HMAC-SHA256 host1-host2.example.

Other algorithms may be substituted for HMAC-SHA256 in the above example.

These keys must be protected in a manner similar to private keys, lest a third party masquerade as one of the intended parties by forging the message authentication code (MAC).

Configuring BIND Nameserver

The generated key must be added to the /etc/named.conf configuration or a separate file introduced by the $INCLUDE directive:

key “host1-host2.example. { algorithm hmac-sha256; secret “Secret+known+only+by+participating+entities=”; };

ACKNOWLEDGMENT

Most of the code in the Net::DNS::RR::TSIG module was contributed by Chris Turbeville.

Support for external signing functions was added by Andrew Tridgell.

TSIG verification, BIND keyfile handling and support for HMAC-SHA1, HMAC-SHA224, HMAC-SHA256, HMAC-SHA384 and HMAC-SHA512 functions was added by Dick Franks.

BUGS

A 32-bit representation of time is used, contrary to RFC8945 which demands 48 bits. This design decision will need to be reviewed before the code stops working on 7 February 2106.

COPYRIGHT

Copyright (c)2000,2001 Michael Fuhr.

Portions Copyright (c)2002,2003 Chris Reinhardt.

Portions Copyright (c)2013,2020 Dick Franks.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC8945 <https://iana.org/go/rfc8945>

TSIG Algorithm Names <https://iana.org/assignments/tsig-algorithm-names>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2459 - Linux cli command NetPacket_Ethernetpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command NetPacket_Ethernetpm and provides detailed information about the command NetPacket_Ethernetpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the NetPacket_Ethernetpm.

NAME 🖥️ NetPacket_Ethernetpm 🖥️

Assemble and disassemble ethernet packets.

VERSION

version 1.7.2

SYNOPSIS

use NetPacket::Ethernet; $eth_obj = NetPacket::Ethernet->decode($raw_pkt); $eth_pkt = NetPacket::Ethernet->encode(params…); # Not implemented $eth_data = NetPacket::Ethernet::strip($raw_pkt);

DESCRIPTION

NetPacket::Ethernet provides a set of routines for assembling and disassembling packets using the Ethernet protocol.

Methods

“NetPacket::Ethernet->decode([RAW PACKET])”
Decode the raw packet data given and return an object containing instance data. This method will quite happily decode garbage input. It is the responsibility of the programmer to ensure valid packet data is passed to this method.

“NetPacket::Ethernet->encode(param => value)”
Return an ethernet packet encoded with the instance data specified. Not implemented.

Functions

“NetPacket::Ethernet::strip([RAW PACKET])”
Return the encapsulated data (or payload) contained in the ethernet packet. This data is suitable to be used as input for other NetPacket::* modules. This function is equivalent to creating an object using the decode() constructor and returning the data field of that object.

Instance data

The instance data for the NetPacket::Ethernet object consists of the following fields.

src_mac
The source MAC address for the ethernet packet as a hex string.

dest_mac
The destination MAC address for the ethernet packet as a hex string.

type
The protocol type for the ethernet packet.

data
The payload for the ethernet packet.

Exports

default
none

exportable
ETH_TYPE_IP ETH_TYPE_ARP ETH_TYPE_APPLETALK ETH_TYPE_SNMP ETH_TYPE_IPv6 ETH_TYPE_PPP

tags
The following tags group together related exportable items.

“:types”
ETH_TYPE_IP ETH_TYPE_ARP ETH_TYPE_APPLETALK ETH_TYPE_SNMP ETH_TYPE_IPv6 ETH_TYPE_PPP

“:strip”
Import the strip function eth_strip which is an alias for NetPacket::Ethernet::strip

“:ALL”
All the above exportable items.

EXAMPLE

The following script dumps ethernet frames by mac address and protocol to standard output.

#!/usr/bin/perl -w use strict; use Net::PcapUtils; use NetPacket::Ethernet; sub process_pkt { my($arg, $hdr, $pkt) = @_; my $eth_obj = NetPacket::Ethernet->decode($pkt); print("$eth_obj->{src_mac}:$eth_obj->{dest_mac} $eth_obj->{type} “); } Net::PcapUtils::loop(\process_pkt);

TODO

Implement “encode()” function

COPYRIGHT

Copyright (c) 2001 Tim Potter and Stephanie Wehner.

Copyright (c) 1995,1996,1997,1998,1999 ANU and CSIRO on behalf of the participants in the CRC for Advanced Computational Systems (‘ACSys’).

This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

AUTHOR

Tim Potter <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2460 - Linux cli command sethostent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sethostent and provides detailed information about the command sethostent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sethostent.

NAME 🖥️ sethostent 🖥️

get network host entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
void sethostent(int stayopen);
void endhostent(void);
[[deprecated]] extern int h_errno;
[[deprecated]] struct hostent *gethostbyname(const char *name);
[[deprecated]] struct hostent *gethostbyaddr(const void addr[.len],
 socklen_t len, int type);
[[deprecated]] void herror(const char *s);
[[deprecated]] const char *hstrerror(int err);
/* System V/POSIX extension */
struct hostent *gethostent(void);
/* GNU extensions */
[[deprecated]]
struct hostent *gethostbyname2(const char *name, int af);
int gethostent_r(struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyaddr_r(const void addr[restrict .len], socklen_t len,
 int type,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyname_r(const char *restrict name,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyname2_r(const char *restrict name, int af,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

gethostbyname2(), gethostent_r(), gethostbyaddr_r(), gethostbyname_r(), gethostbyname2_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc up to and including 2.19:
        _BSD_SOURCE || _SVID_SOURCE

herror(), hstrerror():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.8 to glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE
    Before glibc 2.8:
        none

h_errno:

    Since glibc 2.19
        _DEFAULT_SOURCE || _POSIX_C_SOURCE < 200809L
    glibc 2.12 to glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE || _POSIX_C_SOURCE < 200809L
    Before glibc 2.12:
        none

DESCRIPTION

The gethostbyname*(), gethostbyaddr*(), herror(), and hstrerror() functions are obsolete. Applications should use getaddrinfo(3), getnameinfo(3), and gai_strerror(3) instead.

The sethostent() function specifies, if stayopen is true (1), that a connected TCP socket should be used for the name server queries and that the connection should remain open during successive queries. Otherwise, name server queries will use UDP datagrams.

The endhostent() function ends the use of a TCP connection for name server queries.

The gethostbyname() function returns a structure of type hostent for the given host name. Here name is either a hostname or an IPv4 address in standard dot notation (as for inet_addr(3)). If name is an IPv4 address, no lookup is performed and gethostbyname() simply copies name into the h_name field and its struct in_addr equivalent into the h_addr_list[0] field of the returned hostent structure. If name doesn’t end in a dot and the environment variable HOSTALIASES is set, the alias file pointed to by HOSTALIASES will first be searched for name (see hostname(7) for the file format). The current domain and its parents are searched unless name ends in a dot.

The gethostbyaddr() function returns a structure of type hostent for the given host address addr of length len and address type type. Valid address types are AF_INET and AF_INET6 (defined in <sys/socket.h>). The host address argument is a pointer to a struct of a type depending on the address type, for example a struct in_addr * (probably obtained via a call to inet_addr(3)) for address type AF_INET.

The (obsolete) herror() function prints the error message associated with the current value of h_errno on stderr.

The (obsolete) hstrerror() function takes an error number (typically h_errno) and returns the corresponding message string.

The domain name queries carried out by gethostbyname() and gethostbyaddr() rely on the Name Service Switch (nsswitch.conf(5)) configured sources or a local name server (named(8)). The default action is to query the Name Service Switch (nsswitch.conf(5)) configured sources, failing that, a local name server (named(8)).

Historical

The nsswitch.conf(5) file is the modern way of controlling the order of host lookups.

In glibc 2.4 and earlier, the order keyword was used to control the order of host lookups as defined in /etc/host.conf (host.conf(5)).

The hostent structure is defined in <netdb.h> as follows:

struct hostent {
    char  *h_name;            /* official name of host */
    char **h_aliases;         /* alias list */
    int    h_addrtype;        /* host address type */
    int    h_length;          /* length of address */
    char **h_addr_list;       /* list of addresses */
}
#define h_addr h_addr_list[0] /* for backward compatibility */

The members of the hostent structure are:

h_name
The official name of the host.

h_aliases
An array of alternative names for the host, terminated by a null pointer.

h_addrtype
The type of address; always AF_INET or AF_INET6 at present.

h_length
The length of the address in bytes.

h_addr_list
An array of pointers to network addresses for the host (in network byte order), terminated by a null pointer.

h_addr
The first address in h_addr_list for backward compatibility.

RETURN VALUE

The gethostbyname() and gethostbyaddr() functions return the hostent structure or a null pointer if an error occurs. On error, the h_errno variable holds an error number. When non-NULL, the return value may point at static data, see the notes below.

ERRORS

The variable h_errno can have the following values:

HOST_NOT_FOUND
The specified host is unknown.

NO_DATA
The requested name is valid but does not have an IP address. Another type of request to the name server for this domain may return an answer. The constant NO_ADDRESS is a synonym for NO_DATA.

NO_RECOVERY
A nonrecoverable name server error occurred.

TRY_AGAIN
A temporary error occurred on an authoritative name server. Try again later.

FILES

/etc/host.conf
resolver configuration file

/etc/hosts
host database file

/etc/nsswitch.conf
name service switch configuration

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

gethostbyname()

Thread safety

MT-Unsafe race:hostbyname env locale

gethostbyaddr()

Thread safety

MT-Unsafe race:hostbyaddr env locale

sethostent(), endhostent(), gethostent_r()

Thread safety

MT-Unsafe race:hostent env locale

herror(), hstrerror()

Thread safetyMT-Safe

gethostent()

Thread safety

MT-Unsafe race:hostent race:hostentbuf env locale

gethostbyname2()

Thread safety

MT-Unsafe race:hostbyname2 env locale

gethostbyaddr_r(), gethostbyname_r(), gethostbyname2_r()

Thread safetyMT-Safe env locale

In the above table, hostent in race:hostent signifies that if any of the functions sethostent(), gethostent(), gethostent_r(), or endhostent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

sethostent()
endhostent()
gethostent()
POSIX.1-2008.

gethostent_r()
GNU.

Others:
None.

HISTORY

sethostent()
endhostent()
gethostent()
POSIX.1-2001.

gethostbyname()
gethostbyaddr()
h_errno
Marked obsolescent in POSIX.1-2001. Removed in POSIX.1-2008, recommending the use of getaddrinfo(3) and getnameinfo(3) instead.

NOTES

The functions gethostbyname() and gethostbyaddr() may return pointers to static data, which may be overwritten by later calls. Copying the struct hostent does not suffice, since it contains pointers; a deep copy is required.

In the original BSD implementation the len argument of gethostbyname() was an int. The SUSv2 standard is buggy and declares the len argument of gethostbyaddr() to be of type size_t. (That is wrong, because it has to be int, and size_t is not. POSIX.1-2001 makes it socklen_t, which is OK.) See also accept(2).

The BSD prototype for gethostbyaddr() uses const char * for the first argument.

System V/POSIX extension

POSIX requires the gethostent() call, which should return the next entry in the host data base. When using DNS/BIND this does not make much sense, but it may be reasonable if the host data base is a file that can be read line by line. On many systems, a routine of this name reads from the file /etc/hosts. It may be available only when the library was built without DNS support. The glibc version will ignore ipv6 entries. This function is not reentrant, and glibc adds a reentrant version gethostent_r().

GNU extensions

glibc2 also has a gethostbyname2() that works like gethostbyname(), but permits to specify the address family to which the address must belong.

glibc2 also has reentrant versions gethostent_r(), gethostbyaddr_r(), gethostbyname_r(), and gethostbyname2_r(). The caller supplies a hostent structure ret which will be filled in on success, and a temporary work buffer buf of size buflen. After the call, result will point to the result on success. In case of an error or if no entry is found result will be NULL. The functions return 0 on success and a nonzero error number on failure. In addition to the errors returned by the nonreentrant versions of these functions, if buf is too small, the functions will return ERANGE, and the call should be retried with a larger buffer. The global variable h_errno is not modified, but the address of a variable in which to store error numbers is passed in h_errnop.

BUGS

gethostbyname() does not recognize components of a dotted IPv4 address string that are expressed in hexadecimal.

SEE ALSO

getaddrinfo(3), getnameinfo(3), inet(3), inet_ntop(3), inet_pton(3), resolver(3), hosts(5), nsswitch.conf(5), hostname(7), named(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2461 - Linux cli command sinl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sinl and provides detailed information about the command sinl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sinl.

NAME 🖥️ sinl 🖥️

sine function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double sin(double x);
float sinf(float x);
long double sinl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sinf(), sinl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the sine of x, where x is given in radians.

RETURN VALUE

On success, these functions return the sine of x.

If x is a NaN, a NaN is returned.

If x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is an infinity
errno is set to EDOM (but see BUGS). An invalid floating-point exception (FE_INVALID) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sin(), sinf(), sinl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

BUGS

Before glibc 2.10, the glibc implementation did not set errno to EDOM when a domain error occurred.

SEE ALSO

acos(3), asin(3), atan(3), atan2(3), cos(3), csin(3), sincos(3), tan(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2462 - Linux cli command Tk_ROTextpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_ROTextpm and provides detailed information about the command Tk_ROTextpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_ROTextpm.

NAME 🖥️ Tk_ROTextpm 🖥️

‘readonly’ perl/Tk Text widget

SYNOPSIS

use Tk::ROText; … $ro = $mw->ROText(?options,…?);

DESCRIPTION

This “IS A” text widget with all bindings removed that would alter the contents of the text widget. The contents can still be modified via method calls.

BINDINGS

Only read-only bindings from Tk::Text are available in Tk::ROText. Additionally the following bindings are defined:

<space>
Move the cursor forward by one screenful.

<BackSpace>
Move the cursor backward by one screenful.

KEYWORDS

widget, text, readonly

SEE ALSO

Tk::Text

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2463 - Linux cli command Variable_Magicpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Variable_Magicpm and provides detailed information about the command Variable_Magicpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Variable_Magicpm.

NAME 🖥️ Variable_Magicpm 🖥️

Associate user-defined magic to variables from Perl.

VERSION

Version 0.64

SYNOPSIS

use Variable::Magic qw<wizard cast VMG_OP_INFO_NAME>; { # A variable tracer my $wiz = wizard( set => sub { print “now set to ${$_[0]}! " }, free => sub { print “destroyed! " }, ); my $a = 1; cast $a, $wiz; $a = 2; # “now set to 2!” } # “destroyed!” { # A hash with a default value my $wiz = wizard( data => sub { $_[1] }, fetch => sub { $_[2] = $_[1] unless exists $_[0]->{$_[2]}; () }, store => sub { print “key $_[2] stored in $_[-1] " }, copy_key => 1, op_info => VMG_OP_INFO_NAME, ); my %h = (_default => 0, apple => 2); cast %h, $wiz, _default; print $h{banana}, " “; # “0” (there is no banana key in %h) $h{pear} = 1; # “key pear stored in helem” }

DESCRIPTION

Magic is Perl’s way of enhancing variables. This mechanism lets the user add extra data to any variable and hook syntactical operations (such as access, assignment or destruction) that can be applied to it. With this module, you can add your own magic to any variable without having to write a single line of XS.

You’ll realize that these magic variables look a lot like tied variables. It is not surprising, as tied variables are implemented as a special kind of magic, just like any ‘irregular’ Perl variable : scalars like $!, $( or $^W, the %ENV and %SIG hashes, the @ISA array, vec() and substr() lvalues, threads::shared variables… They all share the same underlying C API, and this module gives you direct access to it.

Still, the magic made available by this module differs from tieing and overloading in several ways :

  • Magic is not copied on assignment. You attach it to variables, not values (as for blessed references).

  • Magic does not replace the original semantics. Magic callbacks usually get triggered before the original action takes place, and cannot prevent it from happening. This also makes catching individual events easier than with tie, where you have to provide fallbacks methods for all actions by usually inheriting from the correct Tie::Std* class and overriding individual methods in your own class.

  • Magic is multivalued. You can safely apply different kinds of magics to the same variable, and each of them will be invoked successively.

  • Magic is type-agnostic. The same magic can be applied on scalars, arrays, hashes, subs or globs. But the same hook (see below for a list) may trigger differently depending on the type of the variable.

  • Magic is invisible at Perl level. Magical and non-magical variables cannot be distinguished with ref, tied or another trick.

  • Magic is notably faster. Mainly because perl’s way of handling magic is lighter by nature, and because there is no need for any method resolution. Also, since you don’t have to reimplement all the variable semantics, you only pay for what you actually use.

The operations that can be overloaded are :

  • get This magic is invoked when the variable is evaluated. It is never called for arrays and hashes.

  • set This magic is called each time the value of the variable changes. It is called for array subscripts and slices, but never for hashes.

  • len This magic only applies to arrays (though it used to also apply to scalars), and is triggered when the ‘size’ or the ’length’ of the variable has to be known by Perl. This is typically the magic involved when an array is evaluated in scalar context, but also on array assignment and loops (for, map or grep). The length is returned from the callback as an integer. Starting from perl 5.12, this magic is no longer called by the length keyword, and starting from perl 5.17.4 it is also no longer called for scalars in any situation, making this magic only meaningful on arrays. You can use the constants “VMG_COMPAT_SCALAR_LENGTH_NOLEN” and “VMG_COMPAT_SCALAR_NOLEN” to see if this magic is available for scalars or not.

  • clear This magic is invoked when the variable is reset, such as when an array is emptied. Please note that this is different from undefining the variable, even though the magic is called when the clearing is a result of the undefine (e.g. for an array, but actually a bug prevent it to work before perl 5.9.5 - see the history).

  • free This magic is called when a variable is destroyed as the result of going out of scope (but not when it is undefined). It behaves roughly like Perl object destructors (i.e. DESTROY methods), except that exceptions thrown from inside a free callback will always be propagated to the surrounding code.

  • copy When applied to tied arrays and hashes, this magic fires when you try to access or change their elements. Starting from perl 5.17.0, it can also be applied to closure prototypes, in which case the magic will be called when the prototype is cloned. The “VMG_COMPAT_CODE_COPY_CLONE” constant is true when your perl support this feature.

  • dup This magic is invoked when the variable is cloned across threads. It is currently not available.

  • local When this magic is set on a variable, all subsequent localizations of the variable will trigger the callback. It is available on your perl if and only if MGf_LOCAL is true.

The following actions only apply to hashes and are available if and only if “VMG_UVAR” is true. They are referred to as uvar magics.

  • fetch This magic is invoked each time an element is fetched from the hash.

  • store This one is called when an element is stored into the hash.

  • exists This magic fires when a key is tested for existence in the hash.

  • delete This magic is triggered when a key is deleted in the hash, regardless of whether the key actually exists in it.

You can refer to the tests to have more insight of where the different magics are invoked.

FUNCTIONS

“wizard”

wizard( data => sub { … }, get => sub { my ($ref, $data [, $op]) = @_; … }, set => sub { my ($ref, $data [, $op]) = @_; … }, len => sub { my ($ref, $data, $len [, $op]) = @_; … ; return $newlen }, clear => sub { my ($ref, $data [, $op]) = @_; … }, free => sub { my ($ref, $data [, $op]) = @_, … }, copy => sub { my ($ref, $data, $key, $elt [, $op]) = @_; … }, local => sub { my ($ref, $data [, $op]) = @_; … }, fetch => sub { my ($ref, $data, $key [, $op]) = @_; … }, store => sub { my ($ref, $data, $key [, $op]) = @_; … }, exists => sub { my ($ref, $data, $key [, $op]) = @_; … }, delete => sub { my ($ref, $data, $key [, $op]) = @_; … }, copy_key => $bool, op_info => [ 0 | VMG_OP_INFO_NAME | VMG_OP_INFO_OBJECT ], )

This function creates a ‘wizard’, an opaque object that holds the magic information. It takes a list of keys / values as argument, whose keys can be :

  • data A code (or string) reference to a private data constructor. It is called in scalar context each time the magic is cast onto a variable, with $_[0] being a reference to this variable and @_[1 .. @_-1] being all extra arguments that were passed to “cast”. The scalar returned from this call is then attached to the variable and can be retrieved later with “getdata”.

  • get, set, len, clear, free, copy, local, fetch, store, exists and delete Code (or string) references to the respective magic callbacks. You don’t have to specify all of them : the magic corresponding to undefined entries will simply not be hooked. When those callbacks are executed, $_[0] is a reference to the magic variable and $_[1] is the associated private data (or undef when no private data constructor is supplied with the wizard). Other arguments depend on which kind of magic is involved :

    • len $_[2] contains the natural, non-magical length of the variable (which can only be a scalar or an array as len magic is only relevant for these types). The callback is expected to return the new scalar or array length to use, or undef to default to the normal length.

    • copy When the variable for which the magic is invoked is an array or an hash, $_[2] is a either an alias or a copy of the current key, and $_[3] is an alias to the current element (i.e. the value). Since $_[2] might be a copy, it is useless to try to change it or cast magic on it. Starting from perl 5.17.0, this magic can also be called for code references. In this case, $_[2] is always undef and $_[3] is a reference to the cloned anonymous subroutine.

    • fetch, store, exists and delete $_[2] is an alias to the current key. Note that $_[2] may rightfully be readonly if the key comes from a bareword, and as such it is unsafe to assign to it. You can ask for a copy instead by passing copy_key => 1 to “wizard” which, at the price of a small performance hit, allows you to safely assign to $_[2] in order to e.g. redirect the action to another key.

    Finally, if op_info => $num is also passed to wizard, then one extra element is appended to @_. Its nature depends on the value of $num :

    • VMG_OP_INFO_NAME $_[-1] is the current op name.

    • VMG_OP_INFO_OBJECT $_[-1] is the B::OP object for the current op.

    Both result in a small performance hit, but just getting the name is lighter than getting the op object. These callbacks are always executed in scalar context. The returned value is coerced into a signed integer, which is then passed straight to the perl magic API. However, note that perl currently only cares about the return value of the len magic callback and ignores all the others. Starting with Variable::Magic 0.58, a reference returned from a non-len magic callback will not be destroyed immediately but will be allowed to survive until the end of the statement that triggered the magic. This lets you use this return value as a token for triggering a destructor after the original magic action takes place. You can see an example of this technique in the cookbook.

Each callback can be specified as :

  • a code reference, which will be called as a subroutine.

  • a string reference, where the string denotes which subroutine is to be called when magic is triggered. If the subroutine name is not fully qualified, then the current package at the time the magic is invoked will be used instead.

  • a reference to undef, in which case a no-op magic callback is installed instead of the default one. This may especially be helpful for local magic, where an empty callback prevents magic from being copied during localization.

Note that free magic is never called during global destruction, as there is no way to ensure that the wizard object and the callback were not destroyed before the variable.

Here is a simple usage example :

# A simple scalar tracer my $wiz = wizard( get => sub { print STDERR “got ${$_[0]} " }, set => sub { print STDERR “set to ${$_[0]} " }, free => sub { print STDERR “${$_[0]} was deleted " }, );

“cast”

cast [$@%&*]var, $wiz, @args

This function associates $wiz magic to the supplied variable, without overwriting any other kind of magic. It returns true on success or when $wiz magic is already attached, and croaks on error. When $wiz provides a data constructor, it is called just before magic is cast onto the variable, and it receives a reference to the target variable in $_[0] and the content of @args in @_[1 .. @args]. Otherwise, @args is ignored.

# Casts $wiz onto $x, passing (\x, 1) to the data constructor. my $x; cast $x, $wiz, 1;

The var argument can be an array or hash value. Magic for these scalars behaves like for any other, except that it is dispelled when the entry is deleted from the container. For example, if you want to call POSIX::tzset each time the TZ environment variable is changed in %ENV, you can use :

use POSIX; cast $ENV{TZ}, wizard set => sub { POSIX::tzset(); () };

If you want to handle the possible deletion of the TZ entry, you must also specify store magic.

“getdata”

getdata [$@%&*]var, $wiz

This accessor fetches the private data associated with the magic $wiz in the variable. It croaks when $wiz does not represent a valid magic object, and returns an empty list if no such magic is attached to the variable or when the wizard has no data constructor.

# Get the data attached to $wiz in $x, or undef if $wiz # did not attach any. my $data = getdata $x, $wiz;

“dispell”

dispell [$@%&*]variable, $wiz

The exact opposite of “cast” : it dissociates $wiz magic from the variable. This function returns true on success, 0 when no magic represented by $wiz could be found in the variable, and croaks if the supplied wizard is invalid.

# Dispell now. die no such magic in $x unless dispell $x, $wiz;

CONSTANTS

“MGf_COPY”

Evaluates to true if and only if the copy magic is available. This is the case for perl 5.7.3 and greater, which is ensured by the requirements of this module.

“MGf_DUP”

Evaluates to true if and only if the dup magic is available. This is the case for perl 5.7.3 and greater, which is ensured by the requirements of this module.

“MGf_LOCAL”

Evaluates to true if and only if the local magic is available. This is the case for perl 5.9.3 and greater.

“VMG_UVAR”

When this constant is true, you can use the fetch, store, exists and delete magics on hashes. Initial “VMG_UVAR” capability was introduced in perl 5.9.5, with a fully functional implementation shipped with perl 5.10.0.

“VMG_COMPAT_SCALAR_LENGTH_NOLEN”

True for perls that don’t call len magic when taking the length of a magical scalar.

“VMG_COMPAT_SCALAR_NOLEN”

True for perls that don’t call len magic on scalars. Implies “VMG_COMPAT_SCALAR_LENGTH_NOLEN”.

“VMG_COMPAT_ARRAY_PUSH_NOLEN”

True for perls that don’t call len magic when you push an element in a magical array. Starting from perl 5.11.0, this only refers to pushes in non-void context and hence is false.

“VMG_COMPAT_ARRAY_PUSH_NOLEN_VOID”

True for perls that don’t call len magic when you push in void context an element in a magical array.

“VMG_COMPAT_ARRAY_UNSHIFT_NOLEN_VOID”

True for perls that don’t call len magic when you unshift in void context an element in a magical array.

“VMG_COMPAT_ARRAY_UNDEF_CLEAR”

True for perls that call clear magic when undefining magical arrays.

“VMG_COMPAT_HASH_DELETE_NOUVAR_VOID”

True for perls that don’t call delete magic when you delete an element from a hash in void context.

“VMG_COMPAT_CODE_COPY_CLONE”

True for perls that call copy magic when a magical closure prototype is cloned.

“VMG_COMPAT_GLOB_GET”

True for perls that call get magic for operations on globs.

“VMG_PERL_PATCHLEVEL”

The perl patchlevel this module was built with, or 0 for non-debugging perls.

“VMG_THREADSAFE”

True if and only if this module could have been built with thread-safety features enabled.

“VMG_FORKSAFE”

True if and only if this module could have been built with fork-safety features enabled. This is always true except on Windows where it is false for perl 5.10.0 and below.

“VMG_OP_INFO_NAME”

Value to pass with op_info to get the current op name in the magic callbacks.

“VMG_OP_INFO_OBJECT”

Value to pass with op_info to get a B::OP object representing the current op in the magic callbacks.

COOKBOOK

Associate an object to any perl variable

This technique can be useful for passing user data through limited APIs. It is similar to using inside-out objects, but without the drawback of having to implement a complex destructor.

{ package Magical::UserData; use Variable::Magic qw<wizard cast getdata>; my $wiz = wizard data => sub { \_[1] }; sub ud ($@%*&]) : lvalue { my ($var) = @_; my $data = &getdata($var, $wiz); unless (defined $data) { $data = \my $slot); &cast($var, $wiz, $slot) or die “Couldnt cast UserData magic onto the variable”; } $$data; } } { BEGIN { *ud = \Magical::UserData::ud } my $cb; $cb = sub { print Hello, , ud(&$cb), “! " }; ud(&$cb) = world; $cb->(); # Hello, world! }

Recursively cast magic on datastructures

cast can be called from any magical callback, and in particular from data. This allows you to recursively cast magic on datastructures :

my $wiz; $wiz = wizard data => sub { my ($var, $depth) = @_; $depth ||= 0; my $r = ref $var; if ($r eq ARRAY) { &cast((ref() ? $_ : \), $wiz, $depth + 1) for @$var; } elsif ($r eq HASH) { &cast((ref() ? $_ : \), $wiz, $depth + 1) for values %$var; } return $depth; }, free => sub { my ($var, $depth) = @_; my $r = ref $var; print “free $r at depth $depth “; (); }; { my %h = ( a => [ 1, 2 ], b => { c => 3 } ); cast %h, $wiz; }

When %h goes out of scope, this prints something among the lines of :

free HASH at depth 0 free HASH at depth 1 free SCALAR at depth 2 free ARRAY at depth 1 free SCALAR at depth 3 free SCALAR at depth 3

Of course, this example does nothing with the values that are added after the cast.

Delayed magic actions

Starting with Variable::Magic 0.58, the return value of the magic callbacks can be used to delay the action until after the original action takes place :

my $delayed; my $delayed_aux = wizard( data => sub { $_[1] }, free => sub { my ($target) = $_[1]; my $target_data = &getdata($target, $delayed); local $target_data->{guard} = 1; if (ref $target eq SCALAR) { my $orig = $$target; $$target = $target_data->{mangler}->($orig); } return; }, ); $delayed = wizard( data => sub { return +{ guard => 0, mangler => $_[1] }; }, set => sub { return if $_[1]->{guard}; my $token; cast $token, $delayed_aux, $_[0]; return \token; }, ); my $x = 1; cast $x, $delayed => sub { $_[0] * 2 }; $x = 2; # $x is now 4 # But note that the delayed action only takes place at the end of the # current statement : my @y = ($x = 5, $x); # $x is now 10, but @y is (5, 5)

PERL MAGIC HISTORY

The places where magic is invoked have changed a bit through perl history. Here is a little list of the most recent ones.

  • 5.6.x p14416 : copy and dup magic.

  • 5.8.9 p28160 : Integration of p25854 (see below). p32542 : Integration of p31473 (see below).

  • 5.9.3 p25854 : len magic is no longer called when pushing an element into a magic array. p26569 : local magic.

  • 5.9.5 p31064 : Meaningful uvar magic. p31473 : clear magic was not invoked when undefining an array. The bug is fixed as of this version.

  • 5.10.0 Since PERL_MAGIC_uvar is uppercased, hv_magic_check() triggers copy magic on hash stores for (non-tied) hashes that also have uvar magic.

  • 5.11.x p32969 : len magic is no longer invoked when calling length with a magical scalar. p34908 : len magic is no longer called when pushing / unshifting an element into a magical array in void context. The push part was already covered by p25854. g9cdcb38b : len magic is called again when pushing into a magical array in non-void context.

EXPORT

The functions “wizard”, “cast”, “getdata” and “dispell” are only exported on request. All of them are exported by the tags :funcs and :all.

All the constants are also only exported on request, either individually or by the tags :consts and :all.

CAVEATS

In order to hook hash operations with magic, you need at least perl 5.10.0 (see “VMG_UVAR”).

If you want to store a magic object in the private data slot, you will not be able to recover the magic with “getdata”, since magic is not copied by assignment. You can work around this gotcha by storing a reference to the magic object instead.

If you define a wizard with free magic and cast it on itself, it results in a memory cycle, so this destructor will not be called when the wizard is freed.

DEPENDENCIES

perl 5.8.

A C compiler. This module may happen to build with a C++ compiler as well, but don’t rely on it, as no guarantee is made in this regard.

Carp (core since perl 5), XSLoader (since 5.6.0).

SEE ALSO

perlguts and perlapi for internal information about magic.

perltie and overload for other ways of enhancing objects.

AUTHOR

Vincent Pit <vpit at cpan.org>.

You can contact me by mail or on irc.perl.org (vincent).

BUGS

Please report any bugs or feature requests to bug-variable-magic at rt.cpan.org, or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Variable-Magic>. I will be notified, and then you’ll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Variable::Magic

COPYRIGHT & LICENSE

Copyright 2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2022,2024 Vincent Pit, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2464 - Linux cli command isalpha_l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isalpha_l and provides detailed information about the command isalpha_l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isalpha_l.

NAME 🖥️ isalpha_l 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2465 - Linux cli command Regexp_Common_URI_telnetpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_URI_telnetpm and provides detailed information about the command Regexp_Common_URI_telnetpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_URI_telnetpm.

NAME 🖥️ Regexp_Common_URI_telnetpm 🖥️

  • Returns a pattern for telnet URIs.

SYNOPSIS

use Regexp::Common qw /URI/; while (<>) { /$RE{URI}{telnet}/ and print “Contains a telnet URI. “; }

DESCRIPTION

$RE{URI}{telnet}

Returns a pattern that matches telnet URIs, as defined by RFC 1738. Telnet URIs have the form:

“telnet:” “//” [ user [ “:” password ] “@” ] host [ “:” port ] [ “/” ]

Under {-keep}, the following are returned:

$1
The complete URI.

$2
The scheme.

$3
The username:password combo, or just the username if there is no password.

$4
The username, if given.

$5
The password, if given.

$6
The host:port combo, or just the host if there’s no port.

$7
The host.

$8
The port, if given.

$9
The trailing slash, if any.

REFERENCES

[RFC 1738]
Berners-Lee, Tim, Masinter, L., McCahill, M.: Uniform Resource Locators (URL). December 1994.

SEE ALSO

Regexp::Common::URI for other supported URIs.

AUTHOR

Damian Conway ([email protected])

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2466 - Linux cli command Image_ExifTool_PrintIMpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_PrintIMpm and provides detailed information about the command Image_ExifTool_PrintIMpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_PrintIMpm.

NAME 🖥️ Image_ExifTool_PrintIMpm 🖥️

Read PrintIM meta information

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret Print Image Matching meta information.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

“PrintIM Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2467 - Linux cli command putwchar

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command putwchar and provides detailed information about the command putwchar, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the putwchar.

NAME 🖥️ putwchar 🖥️

write a wide character to standard output

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
wint_t putwchar(wchar_t wc);

DESCRIPTION

The putwchar() function is the wide-character equivalent of the putchar(3) function. It writes the wide character wc to stdout. If ferror(stdout) becomes true, it returns WEOF. If a wide character conversion error occurs, it sets errno to EILSEQ and returns WEOF. Otherwise, it returns wc.

For a nonlocking counterpart, see unlocked_stdio(3).

RETURN VALUE

The putwchar() function returns wc if no error occurred, or WEOF to indicate an error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

putwchar()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of putwchar() depends on the LC_CTYPE category of the current locale.

It is reasonable to expect that putwchar() will actually write the multibyte sequence corresponding to the wide character wc.

SEE ALSO

fputwc(3), unlocked_stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2468 - Linux cli command XtVaGetSubvalues

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtVaGetSubvalues and provides detailed information about the command XtVaGetSubvalues, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtVaGetSubvalues.

NAME 🖥️ XtVaGetSubvalues 🖥️

obtain and set widget resources

SYNTAX

#include <X11/Intrinsic.h>

void XtSetValues(Widget w, ArgList args, Cardinal num_args);

void XtVaSetValues(Widget w, … );

void XtSetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);

void XtVaSetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, … );

void XtGetValues(Widget w, ArgList args, Cardinal num_args);

void XtVaGetValues(Widget w, … );

void XtGetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);

void XtVaGetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, … );

ARGUMENTS

args
Specifies the argument list of name/address pairs that contain the resource name and either the address into which the resource value is to be stored or their new values.

base
Specifies the base address of the subpart data structure where the resources should be retrieved or written.

num_args
Specifies the number of arguments in the argument list.

resources
Specifies the nonwidget resource list or values.

num_resources
Specifies the number of resources in the resource list.

  1. Specifies the widget.


Specifies the variable argument list of name/address pairs that contain the resource name and either the address into which the resource value is to be stored or their new values.

DESCRIPTION

The XtSetValues function starts with the resources specified for the Core widget fields and proceeds down the subclass chain to the widget. At each stage, it writes the new value (if specified by one of the arguments) or the existing value (if no new value is specified) to a new widget data record. XtSetValues then calls the set_values procedures for the widget in superclass-to-subclass order. If the widget has any non-NULL set_values_hook fields, these are called immediately after the corresponding set_values procedure. This procedure permits subclasses to set nonwidget data for XtSetValues.

If the widget’s parent is a subclass of constraintWidgetClass, XtSetValues also updates the widget’s constraints. It starts with the constraint resources specified for constraintWidgetClass and proceeds down the subclass chain to the parent’s class. At each stage, it writes the new value or the existing value to a new constraint record. It then calls the constraint set_values procedures from constraintWidgetClass down to the parent’s class. The constraint set_values procedures are called with widget arguments, as for all set_values procedures, not just the constraint record arguments, so that they can make adjustments to the desired values based on full information about the widget.

XtSetValues determines if a geometry request is needed by comparing the current widget to the new widget. If any geometry changes are required, it makes the request, and the geometry manager returns XtGeometryYes, XtGeometryAlmost, or XtGeometryNo. If XtGeometryYes, XtSetValues calls the widget’s resize procedure. If XtGeometryNo, XtSetValues resets the geometry fields to their original values. If XtGeometryAlmost, XtSetValues calls the set_values_almost procedure, which determines what should be done and writes new values for the geometry fields into the new widget. XtSetValues then repeats this process, deciding once more whether the geometry manager should be called.

Finally, if any of the set_values procedures returned True, XtSetValues causes the widget’s expose procedure to be invoked by calling the Xlib XClearArea function on the widget’s window.

The XtSetSubvalues function stores resources into the structure identified by base.

The XtGetValues function starts with the resources specified for the core widget fields and proceeds down the subclass chain to the widget. The value field of a passed argument list should contain the address into which to store the corresponding resource value. It is the caller’s responsibility to allocate and deallocate this storage according to the size of the resource representation type used within the widget.

If the widget’s parent is a subclass of constraintWidgetClass, XtGetValues then fetches the values for any constraint resources requested. It starts with the constraint resources specified for constraintWidgetClass and proceeds down to the subclass chain to the parent’s constraint resources. If the argument list contains a resource name that is not found in any of the resource lists searched, the value at the corresponding address is not modified. Finally, if the get_values_hook procedures are non-NULL, they are called in superclass-to-subclass order after all the resource values have been fetched by XtGetValues. This permits a subclass to provide nonwidget resource data to XtGetValues.

The XtGetSubvalues function obtains resource values from the structure identified by base.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2469 - Linux cli command MenuPopdown

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command MenuPopdown and provides detailed information about the command MenuPopdown, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the MenuPopdown.

NAME 🖥️ MenuPopdown 🖥️

unmap a pop-up

SYNTAX

#include <X11/Intrinsic.h>

void XtPopdown(Widget popup_shell);

void XtCallbackPopdown(Widget w, XtPointer client_data, XtPointer call_data);

ACTIONS

void XtMenuPopdown(String shell_name);

ARGUMENTS

call_data
Specifies the callback data, which is not used by this procedure.

client_data
Specifies a pointer to the XtPopdownID structure.

popup_shell
Specifies the widget shell to pop down.

shell_name
Specifies the name of the widget shell to pop down.

  1. Specifies the widget.

DESCRIPTION

The XtPopdown function performs the following:

  • Calls XtCheckSubclass to ensure popup_shell is a subclass of Shell.

  • Checks that popup_shell is currently popped_up; otherwise, it generates an error.

  • Unmaps popup_shell’s window.

  • If popup_shell’s grab_kind is either XtGrabNonexclusive or XtGrabExclusive, it calls XtRemoveGrab.

  • Sets pop-up shell’s popped_up field to False.

  • Calls the callback procedures on the shell’s popdown_callback list.

The XtCallbackPopdown function casts the client data parameter to an XtPopdownID pointer:

typedef struct { Widget shell_widget; Widget enable_widget; } XtPopdownIDRec, *XtPopdownID;

The shell_widget is the pop-up shell to pop down, and the enable_widget is the widget that was used to pop it up.

XtCallbackPopdown calls XtPopdown with the specified shell_widget and then calls XtSetSensitive to resensitize the enable_widget.

If a shell name is not given, XtMenuPopdown calls XtPopdown with the widget for which the translation is specified. If a shell_name is specified in the translation table, XtMenuPopdown tries to find the shell by looking up the widget tree starting at the parent of the widget in which it is invoked. If it finds a shell with the specified name in the pop-up children of that parent, it pops down the shell; otherwise, it moves up the parent chain as needed. If XtMenuPopdown gets to the application top-level shell widget and cannot find a matching shell, it generates an error.

SEE ALSO

XtCreatePopupShell(3), XtPopup(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2470 - Linux cli command pthread_cond_wait

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_cond_wait and provides detailed information about the command pthread_cond_wait, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_cond_wait.

NAME 🖥️ pthread_cond_wait 🖥️

operations on conditions

SYNOPSIS

#include <pthread.h>
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
int pthread_cond_init(pthread_cond_t *cond,
 pthread_condattr_t *cond_attr);
int pthread_cond_signal(pthread_cond_t *cond);
int pthread_cond_broadcast(pthread_cond_t *cond);
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
 const struct timespec *abstime);
int pthread_cond_destroy(pthread_cond_t *cond);

DESCRIPTION

A condition (short for ``condition variable’’) is a synchronization device that allows threads to suspend execution and relinquish the processors until some predicate on shared data is satisfied. The basic operations on conditions are: signal the condition (when the predicate becomes true), and wait for the condition, suspending the thread execution until another thread signals the condition.

A condition variable must always be associated with a mutex, to avoid the race condition where a thread prepares to wait on a condition variable and another thread signals the condition just before the first thread actually waits on it.

pthread_cond_init initializes the condition variable cond, using the condition attributes specified in cond_attr, or default attributes if cond_attr is NULL. The LinuxThreads implementation supports no attributes for conditions, hence the cond_attr parameter is actually ignored.

Variables of type pthread_cond_t can also be initialized statically, using the constant PTHREAD_COND_INITIALIZER.

pthread_cond_signal restarts one of the threads that are waiting on the condition variable cond. If no threads are waiting on cond, nothing happens. If several threads are waiting on cond, exactly one is restarted, but it is not specified which.

pthread_cond_broadcast restarts all the threads that are waiting on the condition variable cond. Nothing happens if no threads are waiting on cond.

pthread_cond_wait atomically unlocks the mutex (as per pthread_unlock_mutex) and waits for the condition variable cond to be signaled. The thread execution is suspended and does not consume any CPU time until the condition variable is signaled. The mutex must be locked by the calling thread on entrance to pthread_cond_wait. Before returning to the calling thread, pthread_cond_wait re-acquires mutex (as per pthread_lock_mutex).

Unlocking the mutex and suspending on the condition variable is done atomically. Thus, if all threads always acquire the mutex before signaling the condition, this guarantees that the condition cannot be signaled (and thus ignored) between the time a thread locks the mutex and the time it waits on the condition variable.

pthread_cond_timedwait atomically unlocks mutex and waits on cond, as pthread_cond_wait does, but it also bounds the duration of the wait. If cond has not been signaled within the amount of time specified by abstime, the mutex mutex is re-acquired and pthread_cond_timedwait returns the error ETIMEDOUT. The abstime parameter specifies an absolute time, with the same origin as time(2) and gettimeofday(2): an abstime of 0 corresponds to 00:00:00 GMT, January 1, 1970.

pthread_cond_destroy destroys a condition variable, freeing the resources it might hold. No threads must be waiting on the condition variable on entrance to pthread_cond_destroy. In the LinuxThreads implementation, no resources are associated with condition variables, thus pthread_cond_destroy actually does nothing except checking that the condition has no waiting threads.

CANCELLATION

pthread_cond_wait and pthread_cond_timedwait are cancelation points. If a thread is cancelled while suspended in one of these functions, the thread immediately resumes execution, then locks again the mutex argument to pthread_cond_wait and pthread_cond_timedwait, and finally executes the cancelation. Consequently, cleanup handlers are assured that mutex is locked when they are called.

ASYNC-SIGNAL SAFETY

The condition functions are not async-signal safe, and should not be called from a signal handler. In particular, calling pthread_cond_signal or pthread_cond_broadcast from a signal handler may deadlock the calling thread.

RETURN VALUE

All condition variable functions return 0 on success and a non-zero error code on error.

ERRORS

pthread_cond_init, pthread_cond_signal, pthread_cond_broadcast, and pthread_cond_wait never return an error code.

The pthread_cond_timedwait function returns the following error codes on error:

ETIMEDOUT
The condition variable was not signaled until the timeout specified by abstime.

EINTR
pthread_cond_timedwait was interrupted by a signal.

The pthread_cond_destroy function returns the following error code on error:

EBUSY
Some threads are currently waiting on cond.

SEE ALSO

pthread_condattr_init(3), pthread_mutex_lock(3), pthread_mutex_unlock(3), gettimeofday(2), nanosleep(2).

EXAMPLE

Consider two shared variables x and y, protected by the mutex mut, and a condition variable cond that is to be signaled whenever x becomes greater than y.

int x,y;
pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;

Waiting until x is greater than y is performed as follows:

pthread_mutex_lock(&mut);
while (x <= y) {
        pthread_cond_wait(&cond, &mut);
}
/* operate on x and y */
pthread_mutex_unlock(&mut);

Modifications on x and y that may cause x to become greater than y should signal the condition if needed:

pthread_mutex_lock(&mut);
/* modify x and y */
if (x > y) pthread_cond_broadcast(&cond);
pthread_mutex_unlock(&mut);

If it can be proved that at most one waiting thread needs to be waken up (for instance, if there are only two threads communicating through x and y), pthread_cond_signal can be used as a slightly more efficient alternative to pthread_cond_broadcast. In doubt, use pthread_cond_broadcast.

To wait for x to become greater than y with a timeout of 5 seconds, do:

struct timeval now;
struct timespec timeout;
int retcode;
pthread_mutex_lock(&mut);
gettimeofday(&now);
timeout.tv_sec = now.tv_sec + 5;
timeout.tv_nsec = now.tv_usec * 1000;
retcode = 0;
while (x <= y && retcode != ETIMEDOUT) {
        retcode = pthread_cond_timedwait(&cond, &mut, &timeout);
}
if (retcode == ETIMEDOUT) {
        /* timeout occurred */
} else {
        /* operate on x and y */
}
pthread_mutex_unlock(&mut);
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2471 - Linux cli command Image_ExifTool_HPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_HPpm and provides detailed information about the command Image_ExifTool_HPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_HPpm.

NAME 🖥️ Image_ExifTool_HPpm 🖥️

Hewlett-Packard maker notes tags

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret Hewlett-Packard maker notes.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

“HP Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2472 - Linux cli command scalbf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command scalbf and provides detailed information about the command scalbf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the scalbf.

NAME 🖥️ scalbf 🖥️

multiply floating-point number by integral power of radix (OBSOLETE)

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
[[deprecated]] double scalb(double x, double exp);
[[deprecated]] float scalbf(float x, float exp);
[[deprecated]] long double scalbl(long double x, long double exp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

scalb():

    _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

scalbf(), scalbl():

    _XOPEN_SOURCE >= 600
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions multiply their first argument x by FLT_RADIX (probably 2) to the power of exp, that is:

    x * FLT_RADIX ** exp

The definition of FLT_RADIX can be obtained by including <float.h>.

RETURN VALUE

On success, these functions return x * FLT_RADIX ** exp.

If x or exp is a NaN, a NaN is returned.

If x is positive infinity (negative infinity), and exp is not negative infinity, positive infinity (negative infinity) is returned.

If x is +0 (-0), and exp is not positive infinity, +0 (-0) is returned.

If x is zero, and exp is positive infinity, a domain error occurs, and a NaN is returned.

If x is an infinity, and exp is negative infinity, a domain error occurs, and a NaN is returned.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with a sign the same as x.

If the result underflows, a range error occurs, and the functions return zero, with a sign the same as x.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is 0, and exp is positive infinity, or x is positive infinity and exp is negative infinity and the other argument is not a NaN
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

Range error, overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error, underflow
errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

scalb(), scalbf(), scalbl()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

scalb()
4.3BSD. Obsolescent in POSIX.1-2001; Removed in POSIX.1-2008, recommending the use of scalbln(3), scalblnf(3), or scalblnl(3) instead.

BUGS

Before glibc 2.20, these functions did not set errno for domain and range errors.

SEE ALSO

ldexp(3), scalbln(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2473 - Linux cli command Image_ExifTool_DjVupm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_DjVupm and provides detailed information about the command Image_ExifTool_DjVupm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_DjVupm.

NAME 🖥️ Image_ExifTool_DjVupm 🖥️

Read DjVu meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to extract meta information from DjVu images. Parsing of the DjVu IFF structure is done by Image::ExifTool::AIFF.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://djvu.sourceforge.net/>

<http://www.djvu.org/>

SEE ALSO

“DjVu Tags” in Image::ExifTool::TagNames, Image::ExifTool::AIFF (3pm), Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2474 - Linux cli command Regexp_Common_numberpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_numberpm and provides detailed information about the command Regexp_Common_numberpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_numberpm.

NAME 🖥️ Regexp_Common_numberpm 🖥️

  • provide regexes for numbers

SYNOPSIS

use Regexp::Common qw /number/; while (<>) { /^$RE{num}{int}$/ and print “Integer “; /^$RE{num}{real}$/ and print “Real “; /^$RE{num}{real}{-base => 16}$/ and print “Hexadecimal real “; }

DESCRIPTION

Please consult the manual of Regexp::Common for a general description of the works of this interface.

Do not use this module directly, but load it via Regexp::Common.

“$RE{num}{int}{-base}{-sep}{-group}{-places}{-sign}”

Returns a pattern that matches an integer.

If -base => B is specified, the integer is in base B, with 2 <= B <= 36. For bases larger than 10, upper case letters are used. The default base is 10.

If -sep => P is specified, the pattern P is required as a grouping marker within the number. If this option is not given, no grouping marker is used.

If -group => N is specified, digits between grouping markers must be grouped in sequences of exactly N digits. The default value of N is 3. If -group => N,M is specified, digits between grouping markers must be grouped in sequences of at least N digits, and at most M digits. This option is ignored unless the -sep option is used.

If -places => N is specified, the integer recognized must be exactly N digits wide. If -places => N,M is specified, the integer must be at least N wide, and at most M characters. There is no default, which means that integers are unlimited in size. This option is ignored if the -sep option is used.

If -sign => P is used, it’s a pattern the leading sign has to match. This defaults to [-+]?, which means the number is optionally preceded by a minus or a plus. If you want to match unsigned integers, use $RE{num}{int}{-sign => }.

For example:

$RE{num}{int} # match 1234567 $RE{num}{int}{-sep=>,} # match 1,234,567 $RE{num}{int}{-sep=>,?} # match 1234567 or 1,234,567 $RE{num}{int}{-sep=>.}{-group=>4} # match 1.2345.6789

Under -keep (see Regexp::Common):

$1
captures the entire number

$2
captures the optional sign of the number

$3
captures the complete set of digits

“$RE{num}{real}{-base}{-radix}{-places}{-sep}{-group}{-expon}”

Returns a pattern that matches a floating-point number.

If -base=N is specified, the number is assumed to be in that base (with A..Z representing the digits for 11..36). By default, the base is 10.

If -radix=P is specified, the pattern P is used as the radix point for the number (i.e. the “decimal point” in base 10). The default is qr/[.]/.

If -places=N is specified, the number is assumed to have exactly N places after the radix point. If -places=M,N is specified, the number is assumed to have between M and N places after the radix point. By default, the number of places is unrestricted.

If -sep=P specified, the pattern P is required as a grouping marker within the pre-radix section of the number. By default, no separator is allowed.

If -group=N is specified, digits between grouping separators must be grouped in sequences of exactly N characters. The default value of N is 3.

If -expon=P is specified, the pattern P is used as the exponential marker. The default value of P is qr/[Ee]/.

If -sign=P is specified, the pattern P is used to match the leading sign (and the sign of the exponent). This defaults to [-+]?, means means that an optional plus or minus sign can be used.

For example:

$RE{num}{real} # matches 123.456 or -0.1234567 $RE{num}{real}{-places=>2} # matches 123.45 or -0.12 $RE{num}{real}{-places=>0,3} # matches 123.456 or 0 or 9.8 $RE{num}{real}{-sep=>[,.]?} # matches 123,456 or 123.456 $RE{num}{real}{-base=>3} # matches 121.102

Under -keep:

$1
captures the entire match

$2
captures the optional sign of the number

$3
captures the complete mantissa

$4
captures the whole number portion of the mantissa

$5
captures the radix point

$6
captures the fractional portion of the mantissa

$7
captures the optional exponent marker

$8
captures the entire exponent value

$9
captures the optional sign of the exponent

$10
captures the digits of the exponent

“$RE{num}{dec}{-radix}{-places}{-sep}{-group}{-expon}”

A synonym for $RE{num}{real}{-base=>10}{...}

“$RE{num}{oct}{-radix}{-places}{-sep}{-group}{-expon}”

A synonym for $RE{num}{real}{-base=>8}{...}

“$RE{num}{bin}{-radix}{-places}{-sep}{-group}{-expon}”

A synonym for $RE{num}{real}{-base=>2}{...}

“$RE{num}{hex}{-radix}{-places}{-sep}{-group}{-expon}”

A synonym for $RE{num}{real}{-base=>16}{...}

“$RE{num}{decimal}{-base}{-radix}{-places}{-sep}{-group}”

The same as $RE{num}{real}, except that an exponent isn’t allowed. Hence, this returns a pattern matching decimal numbers.

If -base=N is specified, the number is assumed to be in that base (with A..Z representing the digits for 11..36). By default, the base is 10.

If -radix=P is specified, the pattern P is used as the radix point for the number (i.e. the “decimal point” in base 10). The default is qr/[.]/.

If -places=N is specified, the number is assumed to have exactly N places after the radix point. If -places=M,N is specified, the number is assumed to have between M and N places after the radix point. By default, the number of places is unrestricted.

If -sep=P specified, the pattern P is required as a grouping marker within the pre-radix section of the number. By default, no separator is allowed.

If -group=N is specified, digits between grouping separators must be grouped in sequences of exactly N characters. The default value of N is 3.

For example:

$RE{num}{decimal} # matches 123.456 or -0.1234567 $RE{num}{decimal}{-places=>2} # matches 123.45 or -0.12 $RE{num}{decimal}{-places=>0,3} # matches 123.456 or 0 or 9.8 $RE{num}{decimal}{-sep=>[,.]?} # matches 123,456 or 123.456 $RE{num}{decimal}{-base=>3} # matches 121.102

Under -keep:

$1
captures the entire match

$2
captures the optional sign of the number

$3
captures the complete mantissa

$4
captures the whole number portion of the mantissa

$5
captures the radix point

$6
captures the fractional portion of the mantissa

“$RE{num}{square}”

Returns a pattern that matches a (decimal) square. Because Perl’s arithmetic is lossy when using integers over about 53 bits, this pattern only recognizes numbers less than 9000000000000000, if one uses a Perl that is configured to use 64 bit integers. Otherwise, the limit is 2147483647. These restrictions were introduced in versions 2.116 and 2.117 of Regexp::Common. Regardless whether -keep was set, the matched number will be returned in $1.

“$RE{num}{roman}”

Returns a pattern that matches an integer written in Roman numbers. Case doesn’t matter. There is no unique way of writing Roman numerals, but we will not match anything. We require the Roman numerals to list the symbols in order (largest first). The symbols for thousand (M), hundred (C), ten (X), and one (I) can not be repeated more than four times. The symbols for five hundred (D), fifty (L), and five (V) may not appear more than once. A sequence of four repeated characters may also be written as a subtraction: by using the repeated character just once, and have it followed by the symbol which is 5 or 10 as large. So, four can be written as IIII, or as IV, and nine may be written as VIIII or IX. This corresponds to most modern uses of Roman numerals.

The largest number which will be matched is 4999, or MMMMDCCCCLXXXXVIIII, or MMMMCMXCIX.

Under -keep, the number will be captured in $1.

SEE ALSO

Regexp::Common for a general description of how to use this interface.

AUTHOR

Damian Conway ([email protected])

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

For a start, there are many common regexes missing. Send them in to [email protected].

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2475 - Linux cli command zip_file_extra_field_delete_by_id

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_file_extra_field_delete_by_id and provides detailed information about the command zip_file_extra_field_delete_by_id, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_file_extra_field_delete_by_id.

libzip (-lzip)

The

function deletes the extra field with index

for the file at position

in the zip archive.

If

is

then all extra fields will be deleted.

The following

are supported:

Delete extra fields from the archive’s central directory.

Delete extra fields from the local file headers.

The

function deletes the extra field with ID (two-byte signature)

and index

(in other words, the

extra field with ID

The other arguments are the same as for

will delete all extra fields of the specified ID).

Please note that due to the library design, the index of an extra field may be different between central directory and local file headers. For this reason, it is not allowed to specify both

and

in

except when deleting all extra fields (i.e.,

being

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error code in

is set to indicate the error.

and

fail if:

is not a valid file index in

and

were added in libzip 0.11.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2476 - Linux cli command Mail_Cappm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Mail_Cappm and provides detailed information about the command Mail_Cappm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Mail_Cappm.

NAME 🖥️ Mail_Cappm 🖥️

understand mailcap files

SYNOPSIS

my $mc = Mail::Cap->new; my $desc = $mc->description(image/gif); print “GIF desc: $desc “; my $cmd = $mc->viewCmd(text/plain; charset=iso-8859-1, file.txt);

DESCRIPTION

Parse mailcap files as specified in “RFC 1524 –A User Agent Configuration Mechanism For Multimedia Mail Format Information>. In the description below $type refers to the MIME type as specified in the Content-Type header of mail or HTTP messages. Examples of types are:

image/gif text/html text/plain; charset=iso-8859-1

You could also take a look at the File::MimeInfo distribution, which are accessing tables which are used by many applications on a system, and therefore have succeeded the mail-cap specifications on modern (UNIX) systems.

METHODS

Constructors

Mail::Cap->new(%options)
Create and initialize a new Mail::Cap object. If you give it an argument it will try to parse the specified file. Without any arguments it will search for the mailcap file using the standard mailcap path, or the MAILCAPS environment variable if it is defined. -Option –Default filename undef take FIRST

filename => FILENAME
Add the specified file to the list to standard locations. This file is tried first.

take => ‘ALL’|‘FIRST’
Include all mailcap files you can find. By default, only the first file is parsed, however the RFC tells us to include ALL. To maintain backwards compatibility, the default only takes the FIRST.

example: $mcap = new Mail::Cap; $mcap = new Mail::Cap “/mydir/mailcap”; $mcap = new Mail::Cap filename => “/mydir/mailcap”; $mcap = new Mail::Cap take => ALL; $mcap = Mail::Cap->new(take => ALL);

Run commands

These methods invoke a suitable program presenting or manipulating the media object in the specified file. They all return 1 if a command was found, and 0 otherwise. You might test $? for the outcome of the command.

$obj->compose($type, $file)

$obj->edit($type, $file)

$obj->print($type, $file)

$obj->view($type, $file)

Command creator

These methods return a string that is suitable for feeding to system() in order to invoke a suitable program presenting or manipulating the media object in the specified file. It will return undef if no suitable specification exists.

$obj->composeCmd($type, $file)

$obj->editCmd($type, $file)

$obj->printCmd($type, $file)

$obj->viewCmd($type, $file)

Look-up definitions

Methods return the corresponding mailcap field for the type.

$obj->description($type)

$obj->field($type, $field)

Returns the specified field for the type. Returns undef if no specification exists.

$obj->nametemplate($type)

$obj->textualnewlines($type)

$obj->x11_bitmap($type)

SEE ALSO

This module is part of the MailTools distribution, http://perl.overmeer.net/mailtools/.

AUTHORS

The MailTools bundle was developed by Graham Barr. Later, Mark Overmeer took over maintenance without commitment to further development.

Mail::Cap by Gisle Aas <[email protected]>. Mail::Field::AddrList by Peter Orbaek <[email protected]>. Mail::Mailer and Mail::Send by Tim Bunce <[email protected]>. For other contributors see ChangeLog.

LICENSE

Copyrights 1995-2000 Graham Barr <[email protected]> and 2001-2017 Mark Overmeer <[email protected]>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2477 - Linux cli command Net_DBus_Binding_Iteratorpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Binding_Iteratorpm and provides detailed information about the command Net_DBus_Binding_Iteratorpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Binding_Iteratorpm.

NAME 🖥️ Net_DBus_Binding_Iteratorpm 🖥️

Reading and writing message parameters

SYNOPSIS

Creating a new message

my $msg = new Net::DBus::Binding::Message::Signal; my $iterator = $msg->iterator; $iterator->append_boolean(1); $iterator->append_byte(123);

Reading from a message

my $msg = …get it from somewhere… my $iter = $msg->iterator(); my $i = 0; while ($iter->has_next()) { $iter->next(); $i++; if ($i == 1) { my $val = $iter->get_boolean(); } elsif ($i == 2) { my $val = $iter->get_byte(); } }

DESCRIPTION

Provides an iterator for reading or writing message fields. This module provides a Perl API to access the dbus_message_iter_XXX methods in the C API. The array and dictionary types are not yet supported, and there are bugs in the Quad support (ie it always returns -1!).

METHODS

$res = $iter->has_next()
Determines if there are any more fields in the message itertor to be read. Returns a positive value if there are more fields, zero otherwise.

$success = $iter->next()
Skips the iterator onto the next field in the message. Returns a positive value if the current field pointer was successfully advanced, zero otherwise.

my $val = $iter->get_boolean()

$iter->append_boolean($val);

Read or write a boolean value from/to the message iterator

my $val = $iter->get_byte()

$iter->append_byte($val);

Read or write a single byte value from/to the message iterator.

my $val = $iter->get_string()

$iter->append_string($val);

Read or write a UTF-8 string value from/to the message iterator

my $val = $iter->get_object_path()

$iter->append_object_path($val);

Read or write a UTF-8 string value, whose contents is a valid object path, from/to the message iterator

my $val = $iter->get_signature()

$iter->append_signature($val);

Read or write a UTF-8 string, whose contents is a valid type signature, value from/to the message iterator

my $val = $iter->get_int16()

$iter->append_int16($val);

Read or write a signed 16 bit value from/to the message iterator

my $val = $iter->get_uint16()

$iter->append_uint16($val);

Read or write an unsigned 16 bit value from/to the message iterator

my $val = $iter->get_int32()

$iter->append_int32($val);

Read or write a signed 32 bit value from/to the message iterator

my $val = $iter->get_uint32()

$iter->append_uint32($val);

Read or write an unsigned 32 bit value from/to the message iterator

my $val = $iter->get_int64()

$iter->append_int64($val);

Read or write a signed 64 bit value from/to the message iterator. An error will be raised if this build of Perl does not support 64 bit integers

my $val = $iter->get_uint64()

$iter->append_uint64($val);

Read or write an unsigned 64 bit value from/to the message iterator. An error will be raised if this build of Perl does not support 64 bit integers

my $val = $iter->get_double()

$iter->append_double($val);

Read or write a double precision floating point value from/to the message iterator

my $val = $iter->get_unix_fd()

$iter->append_unix_fd($val);

Read or write a unix_fd value from/to the message iterator

my $value = $iter->get()

my $value = $iter->get($type);

Get the current value pointed to by this iterator. If the optional $type parameter is supplied, the wire type will be compared with the desired type & a warning output if their differ. The $type value must be one of the Net::DBus::Binding::Message::TYPE* constants.

my $hashref = $iter->get_dict()
If the iterator currently points to a dictionary value, unmarshalls and returns the value as a hash reference.

my $hashref = $iter->get_array()
If the iterator currently points to an array value, unmarshalls and returns the value as a array reference.

my $hashref = $iter->get_variant()
If the iterator currently points to a variant value, unmarshalls and returns the value contained in the variant.

my $hashref = $iter->get_struct()
If the iterator currently points to an struct value, unmarshalls and returns the value as a array reference. The values in the array correspond to members of the struct.

$iter->append($value)

$iter->append($value, $type)

Appends a value to the message associated with this iterator. The value is marshalled into wire format, according to the following rules. If the $value is an instance of Net::DBus::Binding::Value, the embedded data type is used. If the $type parameter is supplied, that is taken to represent the data type. The type must be one of the Net::DBus::Binding::Message::TYPE_* constants. Otherwise, the data type is chosen to be a string, dict or array according to the perl data types SCALAR, HASH or ARRAY.

my $type = $iter->guess_type($value)
Make a best guess at the on the wire data type to use for marshalling $value. If the value is a hash reference, the dictionary type is returned; if the value is an array reference the array type is returned; otherwise the string type is returned.

my $sig = $iter->format_signature($type)
Given a data type representation, construct a corresponding signature string

$iter->append_array($value, $type)
Append an array of values to the message. The $value parameter must be an array reference, whose elements all have the same data type specified by the $type parameter.

$iter->append_struct($value, $type)
Append a struct to the message. The $value parameter must be an array reference, whose elements correspond to members of the structure. The $type parameter encodes the type of each member of the struct.

$iter->append_dict($value, $type)
Append a dictionary to the message. The $value parameter must be an hash reference.The $type parameter encodes the type of the key and value of the hash.

$iter->append_variant($value)
Append a value to the message, encoded as a variant type. The $value can be of any type, however, the variant will be encoded as either a string, dictionary or array according to the rules of the guess_type method.

my $type = $iter->get_arg_type
Retrieves the type code of the value pointing to by this iterator. The returned code will correspond to one of the constants Net::DBus::Binding::Message::TYPE_*

my $type = $iter->get_element_type
If the iterator points to an array, retrieves the type code of array elements. The returned code will correspond to one of the constants Net::DBus::Binding::Message::TYPE_*

AUTHOR

Daniel P. Berrange

COPYRIGHT

Copyright (C) 2004-2011 Daniel P. Berrange

SEE ALSO

Net::DBus::Binding::Message

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2478 - Linux cli command telldir

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command telldir and provides detailed information about the command telldir, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the telldir.

NAME 🖥️ telldir 🖥️

return current location in directory stream

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <dirent.h>
long telldir(DIR *dirp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

telldir():

    _XOPEN_SOURCE
       || /* glibc >= 2.19: */ _DEFAULT_SOURCE
       || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The telldir() function returns the current location associated with the directory stream dirp.

RETURN VALUE

On success, the telldir() function returns the current location in the directory stream. On error, -1 is returned, and errno is set to indicate the error.

ERRORS

EBADF
Invalid directory stream descriptor dirp.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

telldir()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, 4.3BSD.

Up to glibc 2.1.1, the return type of telldir() was off_t. POSIX.1-2001 specifies long, and this is the type used since glibc 2.1.2.

In early filesystems, the value returned by telldir() was a simple file offset within a directory. Modern filesystems use tree or hash structures, rather than flat tables, to represent directories. On such filesystems, the value returned by telldir() (and used internally by readdir(3)) is a “cookie” that is used by the implementation to derive a position within a directory. Application programs should treat this strictly as an opaque value, making no assumptions about its contents.

SEE ALSO

closedir(3), opendir(3), readdir(3), rewinddir(3), scandir(3), seekdir(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2479 - Linux cli command hcreate

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command hcreate and provides detailed information about the command hcreate, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the hcreate.

NAME 🖥️ hcreate 🖥️

hash table management

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <search.h>
int hcreate(size_t nel);
void hdestroy(void);
ENTRY *hsearch(ENTRY item, ACTION action);
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <search.h>
int hcreate_r(size_t nel, struct hsearch_data *htab);
void hdestroy_r(struct hsearch_data *htab);
int hsearch_r(ENTRY item, ACTION action, ENTRY **retval,
 struct hsearch_data *htab);

DESCRIPTION

The three functions hcreate(), hsearch(), and hdestroy() allow the caller to create and manage a hash search table containing entries consisting of a key (a string) and associated data. Using these functions, only one hash table can be used at a time.

The three functions hcreate_r(), hsearch_r(), hdestroy_r() are reentrant versions that allow a program to use more than one hash search table at the same time. The last argument, htab, points to a structure that describes the table on which the function is to operate. The programmer should treat this structure as opaque (i.e., do not attempt to directly access or modify the fields in this structure).

First a hash table must be created using hcreate(). The argument nel specifies the maximum number of entries in the table. (This maximum cannot be changed later, so choose it wisely.) The implementation may adjust this value upward to improve the performance of the resulting hash table.

The hcreate_r() function performs the same task as hcreate(), but for the table described by the structure *htab. The structure pointed to by htab must be zeroed before the first call to hcreate_r().

The function hdestroy() frees the memory occupied by the hash table that was created by hcreate(). After calling hdestroy(), a new hash table can be created using hcreate(). The hdestroy_r() function performs the analogous task for a hash table described by *htab, which was previously created using hcreate_r().

The hsearch() function searches the hash table for an item with the same key as item (where “the same” is determined using strcmp(3)), and if successful returns a pointer to it.

The argument item is of type ENTRY, which is defined in <search.h> as follows:

typedef struct entry {
    char *key;
    void *data;
} ENTRY;

The field key points to a null-terminated string which is the search key. The field data points to data that is associated with that key.

The argument action determines what hsearch() does after an unsuccessful search. This argument must either have the value ENTER, meaning insert a copy of item (and return a pointer to the new hash table entry as the function result), or the value FIND, meaning that NULL should be returned. (If action is FIND, then data is ignored.)

The hsearch_r() function is like hsearch() but operates on the hash table described by *htab. The hsearch_r() function differs from hsearch() in that a pointer to the found item is returned in *retval, rather than as the function result.

RETURN VALUE

hcreate() and hcreate_r() return nonzero on success. They return 0 on error, with errno set to indicate the error.

On success, hsearch() returns a pointer to an entry in the hash table. hsearch() returns NULL on error, that is, if action is ENTER and the hash table is full, or action is FIND and item cannot be found in the hash table. hsearch_r() returns nonzero on success, and 0 on error. In the event of an error, these two functions set errno to indicate the error.

ERRORS

hcreate_r() and hdestroy_r() can fail for the following reasons:

EINVAL
htab is NULL.

hsearch() and hsearch_r() can fail for the following reasons:

ENOMEM
action was ENTER, key was not found in the table, and there was no room in the table to add a new entry.

ESRCH
action was FIND, and key was not found in the table.

POSIX.1 specifies only the ENOMEM error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

hcreate(), hsearch(), hdestroy()

Thread safetyMT-Unsafe race:hsearch

hcreate_r(), hsearch_r(), hdestroy_r()

Thread safetyMT-Safe race:htab

STANDARDS

hcreate()
hsearch()
hdestroy()
POSIX.1-2008.

hcreate_r()
hsearch_r()
hdestroy_r()
GNU.

HISTORY

hcreate()
hsearch()
hdestroy()
SVr4, POSIX.1-2001.

hcreate_r()
hsearch_r()
hdestroy_r()
GNU.

NOTES

Hash table implementations are usually more efficient when the table contains enough free space to minimize collisions. Typically, this means that nel should be at least 25% larger than the maximum number of elements that the caller expects to store in the table.

The hdestroy() and hdestroy_r() functions do not free the buffers pointed to by the key and data elements of the hash table entries. (It can’t do this because it doesn’t know whether these buffers were allocated dynamically.) If these buffers need to be freed (perhaps because the program is repeatedly creating and destroying hash tables, rather than creating a single table whose lifetime matches that of the program), then the program must maintain bookkeeping data structures that allow it to free them.

BUGS

SVr4 and POSIX.1-2001 specify that action is significant only for unsuccessful searches, so that an ENTER should not do anything for a successful search. In libc and glibc (before glibc 2.3), the implementation violates the specification, updating the data for the given key in this case.

Individual hash table entries can be added, but not deleted.

EXAMPLES

The following program inserts 24 items into a hash table, then prints some of them.

#include <search.h>
#include <stdio.h>
#include <stdlib.h>
static char *data[] = { "alpha", "bravo", "charlie", "delta",
     "echo", "foxtrot", "golf", "hotel", "india", "juliet",
     "kilo", "lima", "mike", "november", "oscar", "papa",
     "quebec", "romeo", "sierra", "tango", "uniform",
     "victor", "whisky", "x-ray", "yankee", "zulu"
};
int
main(void)
{
    ENTRY e;
    ENTRY *ep;
    hcreate(30);
    for (size_t i = 0; i < 24; i++) {
        e.key = data[i];
        /* data is just an integer, instead of a
           pointer to something */
        e.data = (void *) i;
        ep = hsearch(e, ENTER);
        /* there should be no failures */
        if (ep == NULL) {
            fprintf(stderr, "entry failed

“); exit(EXIT_FAILURE); } } for (size_t i = 22; i < 26; i++) { /* print two entries from the table, and show that two are not in the table */ e.key = data[i]; ep = hsearch(e, FIND); printf("%9.9s -> %9.9s:%d “, e.key, ep ? ep->key : “NULL”, ep ? (int)(ep->data) : 0); } hdestroy(); exit(EXIT_SUCCESS); }

SEE ALSO

bsearch(3), lsearch(3), malloc(3), tsearch(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2480 - Linux cli command IO_All_LWPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_All_LWPpm and provides detailed information about the command IO_All_LWPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_All_LWPpm.

NAME 🖥️ IO_All_LWPpm 🖥️

IO::All interface to LWP

SYNOPSIS

use IO::All; “hello world " > io(ftp://localhost/test/x); # save to FTP $content < io(http://example.org); # GET webpage io(http://example.org) > io(index.html); # save webpage

DESCRIPTION

This module acts as glue between IO::All and LWP, so that files can be read and written through the network using the convenient <IO:All> interface. Note that this module is not used directly: you just use IO::All, which knows when to autoload IO::All::HTTP, IO::All::HTTPS, IO::All::FTP, or IO::All::Gopher, which implement the specific protocols based on IO::All::LWP.

EXECUTION MODEL

GET requests. When the IO::All object is opened, the URI is fetched and stored by the object in an internal file handle. It can then be accessed like any other file via the IO::All methods and operators, it can be tied, etc.

PUT requests. When the IO::All object is opened, an internal file handle is created. It is possible to that file handle using the various IO::All methods and operators, it can be tied, etc. If $io->put is not called explicitly, when the IO::All object is closed, either explicitly via $io->close or automatically upon destruction, the actual PUT request is made.

The bad news is that the whole file is stored in memory after getting it or before putting it. This may cause problems if you are dealing with multi-gigabyte files!

METHODS

The simplest way of doing things is via the overloaded operators > and <, as shown in the SYNOPSIS. These take care of automatically opening and closing the files and connections as needed. However, various methods are available to provide a finer degree of control.

This is a subclass of IO::All. In addition to the inherited methods, the following methods are available:

  • ua Set or get the user agent object (LWP::UserAgent or a subclass). If called with a list, the list is passed to LWP::UserAgent->new. If called with an object, the object is used directly as the user agent. Note that there is a default user agent if no user agent is specified.

  • uri Set or get the URI. It can take either a URI object or a string, and it returns an URI object. Note that calling this method overrides the user and password fields, because URIs can contain authentication information.

  • user Set or get the user name for authentication. Note that the user name (and the password) can also be set as part of the URL, as in http://me:[email protected]/.

  • password Set or get the password for authentication. Note that the password can also be set as part of the URL, as discussed above.

  • get GET the current URI using LWP. Or, if called with an HTTP::Request object as a parameter, it does that request instead. It returns the HTTP::Response object.

  • put PUT to the current URI using LWP. If called with an HTTP::Request object, it does that request instead. If called with a scalar, it PUTs that as the content to the current URI, instead of the current accumulated content.

  • response Return the HTTP::Response object.

  • request Does an LWP request. It requires an HTTP::Request object as a parameter. Returns an HTTP::Response object.

  • open Overrides the open method from IO::All. It takes care of GETting the content, or of setting up the internal buffer for PUTting. Just like the open method from IO::All, it can take a mode: ‘<’ for GET and ‘>’ for PUT.

  • close Overrides the close method from IO::All. It takes care of PUTting the content.

DEPENDENCIES

This module uses LWP for all the heavy lifting. It also requires perl-5.8.0 or a more recent version.

SEE ALSO

IO::All, LWP, IO::All::HTTP, IO::All::FTP.

AUTHORS

Ivan Tubert-Brohman <[email protected]> and Brian Ingerson <[email protected]>

Thanks to Sergey Gleizer for the ua method.

COPYRIGHT

Copyright (c) 2007. Ivan Tubert-Brohman and Brian Ingerson. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See <http://www.perl.com/perl/misc/Artistic.html>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2481 - Linux cli command mktemp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mktemp and provides detailed information about the command mktemp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mktemp.

NAME 🖥️ mktemp 🖥️

make a unique temporary filename

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
char *mktemp(char *template);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

mktemp():

    Since glibc 2.12:
        (_XOPEN_SOURCE >= 500) && ! (_POSIX_C_SOURCE >= 200112L)
            || /* glibc >= 2.19: */ _DEFAULT_SOURCE
            || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
    Before glibc 2.12:
        _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 500

DESCRIPTION

Never use this function; see BUGS.

The mktemp() function generates a unique temporary filename from template. The last six characters of template must be XXXXXX and these are replaced with a string that makes the filename unique. Since it will be modified, template must not be a string constant, but should be declared as a character array.

RETURN VALUE

The mktemp() function always returns template. If a unique name was created, the last six bytes of template will have been modified in such a way that the resulting name is unique (i.e., does not exist already) If a unique name could not be created, template is made an empty string, and errno is set to indicate the error.

ERRORS

EINVAL
The last six characters of template were not XXXXXX.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mktemp()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

4.3BSD, POSIX.1-2001. Removed in POSIX.1-2008.

BUGS

Never use mktemp(). Some implementations follow 4.3BSD and replace XXXXXX by the current process ID and a single letter, so that at most 26 different names can be returned. Since on the one hand the names are easy to guess, and on the other hand there is a race between testing whether the name exists and opening the file, every use of mktemp() is a security risk. The race is avoided by mkstemp(3) and mkdtemp(3).

SEE ALSO

mktemp(1), mkdtemp(3), mkstemp(3), tempnam(3), tmpfile(3), tmpnam(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2482 - Linux cli command Net_LibIDN2pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_LibIDN2pm and provides detailed information about the command Net_LibIDN2pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_LibIDN2pm.

NAME 🖥️ Net_LibIDN2pm 🖥️

Perl bindings for GNU Libidn2

SYNOPSIS

use Net::LibIDN2 :all; use Encode; idn2_lookup_u8(Encode::encode_utf8(“m\N{U+00FC}\N{U+00DF}li.de”)) eq xn–mli-5ka8l.de; idn2_register_u8( Encode::encode_utf8(“m\N{U+00FC}\N{U+00DF}li”), “xn–mli-5ka8l” ) eq xn–mli-5ka8l; Encode::decode_utf8(idn2_to_unicode_88(“xn–mli-5ka8l.de”)) eq “m\N{U+00FC}\N{U+00DF}li.de”

DESCRIPTION

Provides bindings for GNU Libidn2, a C library for handling internationalized domain names based on IDNA 2008, Punycode and TR46.

Functions

Net::LibIDN2::idn2_lookup_u8($src, [$flags, [$rc]]);
Alternative name idn2_to_ascii_8. Perform IDNA2008 lookup string conversion on domain name $src, as described in section 5 of RFC 5891. Note that the input string must be encoded in UTF-8 and be in Unicode NFC form. Pass IDN2_NFC_INPUT in $flags to convert input to NFC form before further processing. IDN2_TRANSITIONAL and IDN2_NONTRANSITIONAL do already imply IDN2_NFC_INPUT. Pass IDN2_ALABEL_ROUNDTRIP in flags to convert any input A-labels to U-labels and perform additional testing. This is default if used with a libidn2 version >= 2.2. To switch this behavior off, pass IDN2_NO_ALABEL_ROUNDTRIP. Pass IDN2_TRANSITIONAL to enable Unicode TR46 transitional processing, and IDN2_NONTRANSITIONAL to enable Unicode TR46 non-transitional processing. Multiple flags may be specified by binary or:ing them together, for example IDN2_NFC_INPUT | IDN2_ALABEL_ROUNDTRIP. If linked to library GNU Libidn2 version > 2.0.3: IDN2_USE_STD3_ASCII_RULES disabled by default. Previously we were eliminating non-STD3 characters from domain strings such as _443._tcp.example.com, or IPs 1.2.3.4/24 provided to libidn2 functions. That was an unexpected regression for applications switching from libidn2 and thus it is no longer applied by default. Use IDN2_USE_STD3_ASCII_RULES to enable that behavior again. On error, returns undef. If a scalar variable is provided in $rc, returns the internal libidn2 C library result code as well.

Net::LibIDN2::idn2_lookup_ul($src, [$flags, [$rc]]);
Alternative name idn2_to_ascii_l. Similar to function idn2_lookup_u8 but $src is assumed to be encoded in the locale’s default coding system, and will be transcoded to UTF-8 and NFC normalized before returning the result.

Net::LibIDN2::idn2_register_u8($ulabel, [$alabel, [$flags, [$rc]]]);
Perform IDNA2008 register string conversion on domain label $ulabel and $alabel, as described in section 4 of RFC 5891. Note that the input ulabel must be encoded in UTF-8 and be in Unicode NFC form. Pass IDN2_NFC_INPUT in $flags to convert input $ulabel to NFC form before further processing. It is recommended to supply both $ulabel and $alabel for better error checking, but supplying just one of them will work. Passing in only $alabel is better than only $ulabel. See RFC 5891 section 4 for more information. On error, returns undef. If a scalar variable is provided in $rc, returns the internal libidn2 C library result code as well.

Net::LibIDN2::idn2_register_ul($ulabel, [$alabel, [$flags, [$rc]]]);
Similar to function idn2_register_u8 but $ulabel is assumed to be encoded in the locale’s default coding system, and will be transcoded to UTF-8 and NFC normalized before returning the result.

Net::LibIDN2::idn2_to_unicode_88($input, [$flags, [$rc]]);
Converts a possibly ACE encoded domain name in UTF-8 format into a an UTF-8 encoded string (punycode decoding). On error, returns undef. If a scalar variable is provided in $rc, returns the internal libidn2 C library result code as well.

Net::LibIDN2::idn2_to_unicode_8l($input, [$flags, [$rc]]);
Similar to function idn2_to_unicode_88 but the return value is encoded in the locale’s default coding system.

Net::LibIDN2::idn2_to_unicode_ll($input, [$flags, [$rc]]);
Similar to function idn2_to_unicode_8l but $input is also assumed to be encoded in the locale’s default coding system.

Net::LibIDN2::idn2_strerror($rc);
Convert internal libidn2 error code $rc to a human-readable string.

Net::LibIDN2::idn2_strerror_name($rc);
Convert internal libidn2 error code $rc to a string corresponding to internal header file symbols names like IDN2_MALLOC.

Net::LibIDN2::idn2_check_version([$req_version])
Checks that the version of the underlying IDN2 C library is at minimum the one given as a string in $req_version and if that is the case returns the actual version string of the underlying C library or undef if the condition is not met. If no parameter is passed to this function no check is done and only the version string is returned. See IDN2_VERSION for a suitable $req_version string, it corresponds to the idn2.h C header file version at compile time of this Perl module. Normally these two version numbers match, but if you compiled this Perl module against an older libidn2 and then run it with a newer libidn2 shared library, they will be different.

Constants

IDN2_VERSION
Pre-processor symbol with a string that describes the C header file version number at compile time of this Perl module. Used together with idn2_check_version() to verify header file and run-time library consistency.

IDN2_VERSION_NUMBER
Pre-processor symbol with a hexadecimal value describing the C header file version number at compile time of this Perl module. For example, when the header version is 1.2.4711 this symbol will have the value 0x01021267. The last four digits are used to enumerate development snapshots, but for all public releases they will be 0000.

IDN2_VERSION_MAJOR
Pre-processor symbol for the major version number (decimal). The version scheme is major.minor.patchlevel.

IDN2_VERSION_MINOR
Pre-processor symbol for the minor version number (decimal). The version scheme is major.minor.patchlevel.

IDN2_VERSION_PATCH
Pre-processor symbol for the patch level number (decimal). The version scheme is major.minor.patchlevel.

IDN2_LABEL_MAX_LENGTH
Constant specifying the maximum length of a DNS label to 63 characters, as specified in RFC 1034.

IDN2_DOMAIN_MAX_LENGTH
Constant specifying the maximum size of the wire encoding of a DNS domain to 255 characters, as specified in RFC 1034. Note that the usual printed representation of a domain name is limited to 253 characters if it does not end with a period or 254 characters if it ends with a period.

Result codes

“Net::LibIDN2::IDN2_OK” Successful return.

“Net::LibIDN2::IDN2_MALLOC” Memory allocation error.

“Net::LibIDN2::IDN2_NO_CODESET” Could not determine locale string encoding format.

“Net::LibIDN2::IDN2_ICONV_FAIL” Could not transcode locale string to UTF-8.

“Net::LibIDN2::IDN2_ENCODING_ERROR” Unicode data encoding error.

“Net::LibIDN2::IDN2_NFC” Error normalizing string.

“Net::LibIDN2::IDN2_PUNYCODE_BAD_INPUT” Punycode invalid input.

“Net::LibIDN2::IDN2_PUNYCODE_BIG_OUTPUT” Punycode output buffer too small.

“Net::LibIDN2::IDN2_PUNYCODE_OVERFLOW” Punycode conversion would overflow.

“Net::LibIDN2::IDN2_TOO_BIG_DOMAIN” Domain name longer than 255 characters.

“Net::LibIDN2::IDN2_TOO_BIG_LABEL” Domain label longer than 63 characters.

“Net::LibIDN2::IDN2_INVALID_ALABEL” Input A-label is not valid.

“Net::LibIDN2::IDN2_UALABEL_MISMATCH” Input A-label and U-label does not match.

“Net::LibIDN2::IDN2_NOT_NFC” String is not NFC.

“Net::LibIDN2::IDN2_2HYPHEN” String has forbidden two hyphens.

“Net::LibIDN2::IDN2_HYPHEN_STARTEND” String has forbidden starting/ending hyphen.

“Net::LibIDN2::IDN2_LEADING_COMBINING” String has forbidden leading combining character.

“Net::LibIDN2::IDN2_DISALLOWED” String has disallowed character.

“Net::LibIDN2::IDN2_CONTEXTJ” String has forbidden context-j character.

“Net::LibIDN2::IDN2_CONTEXTJ_NO_RULE” String has context-j character with no rule.

“Net::LibIDN2::IDN2_CONTEXTO” String has forbidden context-o character.

“Net::LibIDN2::IDN2_CONTEXTO_NO_RULE” String has context-o character with no rule.

“Net::LibIDN2::IDN2_UNASSIGNED” String has forbidden unassigned character.

“Net::LibIDN2::IDN2_BIDI” String has forbidden bi-directional properties.

“Net::LibIDN2::IDN2_DOT_IN_LABEL” Label has forbidden dot (TR46).

“Net::LibIDN2::IDN2_INVALID_TRANSITIONAL” Label has character forbidden in transitional mode (TR46).

“Net::LibIDN2::IDN2_INVALID_NONTRANSITIONAL” Label has character forbidden in non-transitional mode (TR46).

AUTHOR

Thomas Jacob, https://github.com/gnuthor

SEE ALSO

perl (1), RFC 5890-5893, TR 46, https://gitlab.com/libidn/libidn2.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2483 - Linux cli command inet_pton

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command inet_pton and provides detailed information about the command inet_pton, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the inet_pton.

NAME 🖥️ inet_pton 🖥️

convert IPv4 and IPv6 addresses from text to binary form

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <arpa/inet.h>
int inet_pton(int af, const char *restrict src",void*restrict"dst);

DESCRIPTION

This function converts the character string src into a network address structure in the af address family, then copies the network address structure to dst. The af argument must be either AF_INET or AF_INET6. dst is written in network byte order.

The following address families are currently supported:

AF_INET
src points to a character string containing an IPv4 network address in dotted-decimal format, “ddd.ddd.ddd.ddd”, where ddd is a decimal number of up to three digits in the range 0 to 255. The address is converted to a struct in_addr and copied to dst, which must be sizeof(struct in_addr) (4) bytes (32 bits) long.

AF_INET6
src points to a character string containing an IPv6 network address. The address is converted to a struct in6_addr and copied to dst, which must be sizeof(struct in6_addr) (16) bytes (128 bits) long. The allowed formats for IPv6 addresses follow these rules:

  • The preferred format is x:x:x:x:x:x:x:x. This form consists of eight hexadecimal numbers, each of which expresses a 16-bit value (i.e., each x can be up to 4 hex digits).

  • A series of contiguous zero values in the preferred format can be abbreviated to ::. Only one instance of :: can occur in an address. For example, the loopback address 0:0:0:0:0:0:0:1 can be abbreviated as ::1. The wildcard address, consisting of all zeros, can be written as ::.

  • An alternate format is useful for expressing IPv4-mapped IPv6 addresses. This form is written as x:x:x:x:x:x:d.d.d.d, where the six leading xs are hexadecimal values that define the six most-significant 16-bit pieces of the address (i.e., 96 bits), and the ds express a value in dotted-decimal notation that defines the least significant 32 bits of the address. An example of such an address is ::FFFF:204.152.189.116.

See RFC 2373 for further details on the representation of IPv6 addresses.

RETURN VALUE

inet_pton() returns 1 on success (network address was successfully converted). 0 is returned if src does not contain a character string representing a valid network address in the specified address family. If af does not contain a valid address family, -1 is returned and errno is set to EAFNOSUPPORT.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

inet_pton()

Thread safetyMT-Safe locale

VERSIONS

Unlike inet_aton(3) and inet_addr(3), inet_pton() supports IPv6 addresses. On the other hand, inet_pton() accepts only IPv4 addresses in dotted-decimal notation, whereas inet_aton(3) and inet_addr(3) allow the more general numbers-and-dots notation (hexadecimal and octal number formats, and formats that don’t require all four bytes to be explicitly written). For an interface that handles both IPv6 addresses, and IPv4 addresses in numbers-and-dots notation, see getaddrinfo(3).

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

BUGS

AF_INET6 does not recognize IPv4 addresses. An explicit IPv4-mapped IPv6 address must be supplied in src instead.

EXAMPLES

The program below demonstrates the use of inet_pton() and inet_ntop(3). Here are some example runs:

$ ./a.out i6 0:0:0:0:0:0:0:0
::
$ ./a.out i6 1:0:0:0:0:0:0:8
1::8
$ ./a.out i6 0:0:0:0:0:FFFF:204.152.189.116
::ffff:204.152.189.116

Program source

#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int
main(int argc, char *argv[])
{
    unsigned char buf[sizeof(struct in6_addr)];
    int domain, s;
    char str[INET6_ADDRSTRLEN];
    if (argc != 3) {
        fprintf(stderr, "Usage: %s {i4|i6|<num>} string

“, argv[0]); exit(EXIT_FAILURE); } domain = (strcmp(argv[1], “i4”) == 0) ? AF_INET : (strcmp(argv[1], “i6”) == 0) ? AF_INET6 : atoi(argv[1]); s = inet_pton(domain, argv[2], buf); if (s <= 0) { if (s == 0) fprintf(stderr, “Not in presentation format”); else perror(“inet_pton”); exit(EXIT_FAILURE); } if (inet_ntop(domain, buf, str, INET6_ADDRSTRLEN) == NULL) { perror(“inet_ntop”); exit(EXIT_FAILURE); } printf("%s “, str); exit(EXIT_SUCCESS); }

SEE ALSO

getaddrinfo(3), inet(3), inet_ntop(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2484 - Linux cli command pcap_open_livepcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_open_livepcap and provides detailed information about the command pcap_open_livepcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_open_livepcap.

NAME 🖥️ pcap_open_livepcap 🖥️

open a device for capturing

SYNOPSIS

#include <pcap/pcap.h>
char errbuf[PCAP_ERRBUF_SIZE];
pcap_t *pcap_open_live(const char *device, int snaplen,
int promisc, int to_ms, char *errbuf);

DESCRIPTION

pcap_open_live() is used to obtain a packet capture handle to look at packets on the network. device is a string that specifies the network device to open; on Linux systems with 2.2 or later kernels, a device argument of “any” or NULL can be used to capture packets from all interfaces.

snaplen specifies the snapshot length to be set on the handle.

promisc specifies whether the interface is to be put into promiscuous mode. If promisc is non-zero, promiscuous mode will be set, otherwise it will not be set.

to_ms specifies the packet buffer timeout, as a non-negative value, in milliseconds. (See pcap(3PCAP) for an explanation of the packet buffer timeout.)

RETURN VALUE

pcap_open_live() returns a pcap_t * on success and NULL on failure. If NULL is returned, errbuf is filled in with an appropriate error message. errbuf may also be set to warning text when pcap_open_live() succeeds; to detect this case the caller should store a zero-length string in errbuf before calling pcap_open_live() and display the warning to the user if errbuf is no longer a zero-length string. errbuf is assumed to be able to hold at least PCAP_ERRBUF_SIZE chars.

SEE ALSO

pcap_create(3PCAP), pcap_activate(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2485 - Linux cli command sgetspent_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sgetspent_r and provides detailed information about the command sgetspent_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sgetspent_r.

NAME 🖥️ sgetspent_r 🖥️

get shadow password file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

/* General shadow password file API */
#include <shadow.h>
struct spwd *getspnam(const char *name);
struct spwd *getspent(void);
void setspent(void);
void endspent(void);
struct spwd *fgetspent(FILE *stream);
struct spwd *sgetspent(const char *s);
int putspent(const struct spwd *p, FILE *stream);
int lckpwdf(void);
int ulckpwdf(void);
/* GNU extension */
#include <shadow.h>
int getspent_r(struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int getspnam_r(const char *name, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int fgetspent_r(FILE *stream, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int sgetspent_r(const char *s, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getspent_r(), getspnam_r(), fgetspent_r(), sgetspent_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

Long ago it was considered safe to have encrypted passwords openly visible in the password file. When computers got faster and people got more security-conscious, this was no longer acceptable. Julianne Frances Haugh implemented the shadow password suite that keeps the encrypted passwords in the shadow password database (e.g., the local shadow password file /etc/shadow, NIS, and LDAP), readable only by root.

The functions described below resemble those for the traditional password database (e.g., see getpwnam(3) and getpwent(3)).

The getspnam() function returns a pointer to a structure containing the broken-out fields of the record in the shadow password database that matches the username name.

The getspent() function returns a pointer to the next entry in the shadow password database. The position in the input stream is initialized by setspent(). When done reading, the program may call endspent() so that resources can be deallocated.

The fgetspent() function is similar to getspent() but uses the supplied stream instead of the one implicitly opened by setspent().

The sgetspent() function parses the supplied string s into a struct spwd.

The putspent() function writes the contents of the supplied struct spwd *p as a text line in the shadow password file format to stream. String entries with value NULL and numerical entries with value -1 are written as an empty string.

The lckpwdf() function is intended to protect against multiple simultaneous accesses of the shadow password database. It tries to acquire a lock, and returns 0 on success, or -1 on failure (lock not obtained within 15 seconds). The ulckpwdf() function releases the lock again. Note that there is no protection against direct access of the shadow password file. Only programs that use lckpwdf() will notice the lock.

These were the functions that formed the original shadow API. They are widely available.

Reentrant versions

Analogous to the reentrant functions for the password database, glibc also has reentrant functions for the shadow password database. The getspnam_r() function is like getspnam() but stores the retrieved shadow password structure in the space pointed to by spbuf. This shadow password structure contains pointers to strings, and these strings are stored in the buffer buf of size buflen. A pointer to the result (in case of success) or NULL (in case no entry was found or an error occurred) is stored in *spbufp.

The functions getspent_r(), fgetspent_r(), and sgetspent_r() are similarly analogous to their nonreentrant counterparts.

Some non-glibc systems also have functions with these names, often with different prototypes.

Structure

The shadow password structure is defined in <shadow.h> as follows:

struct spwd {
    char *sp_namp;     /* Login name */
    char *sp_pwdp;     /* Encrypted password */
    long  sp_lstchg;   /* Date of last change
                          (measured in days since
                          1970-01-01 00:00:00 +0000 (UTC)) */
    long  sp_min;      /* Min # of days between changes */
    long  sp_max;      /* Max # of days between changes */
    long  sp_warn;     /* # of days before password expires
                          to warn user to change it */
    long  sp_inact;    /* # of days after password expires
                          until account is disabled */
    long  sp_expire;   /* Date when account expires
                          (measured in days since
                          1970-01-01 00:00:00 +0000 (UTC)) */
    unsigned long sp_flag;  /* Reserved */
};

RETURN VALUE

The functions that return a pointer return NULL if no more entries are available or if an error occurs during processing. The functions which have int as the return value return 0 for success and -1 for failure, with errno set to indicate the error.

For the nonreentrant functions, the return value may point to static area, and may be overwritten by subsequent calls to these functions.

The reentrant functions return zero on success. In case of error, an error number is returned.

ERRORS

EACCES
The caller does not have permission to access the shadow password file.

ERANGE
Supplied buffer is too small.

FILES

/etc/shadow
local shadow password database file

/etc/.pwd.lock
lock file

The include file <paths.h> defines the constant _PATH_SHADOW to the pathname of the shadow password file.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getspnam()

Thread safety

MT-Unsafe race:getspnam locale

getspent()

Thread safety

MT-Unsafe race:getspent race:spentbuf locale

setspent(), endspent(), getspent_r()

Thread safety

MT-Unsafe race:getspent locale

fgetspent()

Thread safety

MT-Unsafe race:fgetspent

sgetspent()

Thread safety

MT-Unsafe race:sgetspent

putspent(), getspnam_r(), sgetspent_r()

Thread safety

MT-Safe locale

lckpwdf(), ulckpwdf(), fgetspent_r()

Thread safety

MT-Safe

In the above table, getspent in race:getspent signifies that if any of the functions setspent(), getspent(), getspent_r(), or endspent() are used in parallel in different threads of a program, then data races could occur.

VERSIONS

Many other systems provide a similar API.

STANDARDS

None.

SEE ALSO

getgrnam(3), getpwnam(3), getpwnam_r(3), shadow(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2486 - Linux cli command XtUngrabKeyboard

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtUngrabKeyboard and provides detailed information about the command XtUngrabKeyboard, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtUngrabKeyboard.

NAME 🖥️ XtUngrabKeyboard 🖥️

manage grabs

SYNTAX

#include <X11/Intrinsic.h>

void XtGrabKey(Widget widget, KeyCode keycode, Modifiers modifiers, Boolean owner_events, int pointer_mode, int keyboard_mode);

void XtUngrabKey(Widget widget, KeyCode keycode, Modifiers modifiers);

int XtGrabKeyboard(Widget widget, Boolean owner_events, int pointer_mode, int keyboard_mode, Time time);

void XtUngrabKeyboard(Widget widget, Time time);

void XtGrabButton(Widget widget, int button, Modifiers modifiers, Boolean owner_events, unsigned int event_mask, int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor);

void XtUngrabButton(Widget widget, unsigned button, Modifiers modifiers);

int XtGrabPointer(Widget widget, Boolean owner_events, unsigned int event_mask, int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor, Time time);

void XtUngrabPointer(Widget widget, Time time);

ARGUMENTS

widget
Specifies the widget in whose window the grab will occur. Must be of class Core or a subclass thereof.

keycode

modifiers

owner_events

pointer_mode

keyboard_mode

time

button

confine_to

cursor
Specifies arguments to the associated Xlib function call.

DESCRIPTION

XtGrabKey calls XGrabKey specifying the widget’s window as the grab window if the widget is realized. The remaining arguments are exactly as for XGrabKey. If the widget is not realized, or is later unrealized, the call to XGrabKey will be performed (again) when the widget is realized and its window becomes mapped. In the future, if XtDispatchEvent is called with a KeyPress event matching the specified keycode and modifiers (which may be AnyKey or AnyModifier, respectively) for the widget’s window, the Intrinsics will call XtUngrabKeyboard with the timestamp from the KeyPress event if either of the following conditions is true:

  • There is a modal cascade and the widget is not in the active subset of the cascade and the keyboard was not previously grabbed, or

  • XFilterEvent returns True.

XtUngrabKey calls XUngrabKey specifying the widget’s window as the ungrab window if the widget is realized. The remaining arguments are exactly as for XUngrabKey. If the widget is not realized, XtUngrabKey removes a deferred XtGrabKey request, if any, for the specified widget, keycode, and modifiers.

If the specified widget is realized XtGrabKeyboard calls XGrabKeyboard specifying the widget’s window as the grab window. The remaining arguments and return value are exactly as for XGrabKeyboard. If the widget is not realized, XtGrabKeyboard immediately returns GrabNotViewable. No future ungrab is implied by XtGrabKeyboard.

XtUngrabKeyboard calls XUngrabKeyboard with the specified time.

XtGrabButton calls XGrabButton specifying the widget’s window as the grab window if the widget is realized. The remaining arguments are exactly as for XGrabButton. If the widget is not realized, or is later unrealized, the call to XGrabButton will be performed (again) when the widget is realized and its window becomes mapped. In the future, if XtDispatchEvent is called with a ButtonPress event matching the specified button and modifiers (which may be AnyButton or AnyModifier, respectively) for the widget’s window, the Intrinsics will call XtUngrabPointer with the timestamp from the ButtonPress event if either of the following conditions is true:

  • There is a modal cascade and the widget is not in the active subset of the cascade and the pointer was not previously grabbed, or

  • XFilterEvent returns True.

XtUngrabButton calls XUngrabButton specifying the widget’s window as the ungrab window if the widget is realized. The remaining arguments are exactly as for XUngrabButton. If the widget is not realized, XtUngrabButton removes a deferred XtGrabButton request, if any, for the specified widget, button, and modifiers.

XtGrabPointer calls XGrabPointer specifying the widget’s window as the grab window. The remaining arguments and return value are exactly as for XGrabPointer. If the widget is not realized, XtGrabPointer immediately returns GrabNotViewable. No future ungrab is implied by XtGrabPointer.

XtUngrabPointer calls XUngrabPointer with the specified time.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2487 - Linux cli command speed_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command speed_ttype and provides detailed information about the command speed_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the speed_ttype.

NAME 🖥️ speed_ttype 🖥️

terminal special characters, baud rates, modes

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <termios.h>
typedef /* ... */ cc_t;
typedef /* ... */ speed_t;
typedef /* ... */ tcflag_t;

DESCRIPTION

cc_t is used for terminal special characters, speed_t for baud rates, and tcflag_t for modes.

All are unsigned integer types.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

SEE ALSO

termios(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2488 - Linux cli command xdrrec_endofrecord

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdrrec_endofrecord and provides detailed information about the command xdrrec_endofrecord, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdrrec_endofrecord.

NAME 🖥️ xdrrec_endofrecord 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2489 - Linux cli command zip_encryption_method_supported

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_encryption_method_supported and provides detailed information about the command zip_encryption_method_supported, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_encryption_method_supported.

libzip (-lzip)

The

returns if the encryption method

is supported for encryption (if

is zero) or decryption (otherwise).

Returns 1 if the method is supported, 0 otherwise.

was added in libzip 1.7.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2490 - Linux cli command __ppc_get_timebase_freq

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __ppc_get_timebase_freq and provides detailed information about the command __ppc_get_timebase_freq, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __ppc_get_timebase_freq.

NAME 🖥️ __ppc_get_timebase_freq 🖥️

get the current value of the Time Base Register on Power architecture and its frequency.

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/platform/ppc.h>
uint64_t __ppc_get_timebase(void);
uint64_t __ppc_get_timebase_freq(void);

DESCRIPTION

__ppc_get_timebase() reads the current value of the Time Base Register and returns its value, while __ppc_get_timebase_freq() returns the frequency in which the Time Base Register is updated.

The Time Base Register is a 64-bit register provided by Power Architecture processors. It stores a monotonically incremented value that is updated at a system-dependent frequency that may be different from the processor frequency.

RETURN VALUE

__ppc_get_timebase() returns a 64-bit unsigned integer that represents the current value of the Time Base Register.

__ppc_get_timebase_freq() returns a 64-bit unsigned integer that represents the frequency at which the Time Base Register is updated.

STANDARDS

GNU.

HISTORY

__ppc_get_timebase()
glibc 2.16.

__ppc_get_timebase_freq()
glibc 2.17.

EXAMPLES

The following program will calculate the time, in microseconds, spent between two calls to __ppc_get_timebase().

Program source

#include <inttypes.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/platform/ppc.h>
/* Maximum value of the Time Base Register: 2^60 - 1.
   Source: POWER ISA.  */
#define MAX_TB 0xFFFFFFFFFFFFFFF
int
main(void)
{
    uint64_t tb1, tb2, diff;
    uint64_t freq;
    freq = __ppc_get_timebase_freq();
    printf("Time Base frequency = %"PRIu64" Hz

“, freq); tb1 = __ppc_get_timebase(); // Do some stuff… tb2 = __ppc_get_timebase(); if (tb2 > tb1) { diff = tb2 - tb1; } else { /* Treat Time Base Register overflow. */ diff = (MAX_TB - tb2) + tb1; } printf(“Elapsed time = %1.2f usecs “, (double) diff * 1000000 / freq); exit(EXIT_SUCCESS); }

SEE ALSO

time(2), usleep(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2491 - Linux cli command Image_ExifTool_iWorkpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_iWorkpm and provides detailed information about the command Image_ExifTool_iWorkpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_iWorkpm.

NAME 🖥️ Image_ExifTool_iWorkpm 🖥️

Read Apple iWork ‘09 XML+ZIP files

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to extract meta information from Apple iWork ‘09 XML+ZIP files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

“iWork Tags” in Image::ExifTool::TagNames, “OOXML Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2492 - Linux cli command psiginfo

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command psiginfo and provides detailed information about the command psiginfo, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the psiginfo.

NAME 🖥️ psiginfo 🖥️

print signal description

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
void psignal(int sig, const char *s);
void psiginfo(const siginfo_t *pinfo, const char *s);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

psignal():

    Since glibc 2.19:
            _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

psiginfo():

    _POSIX_C_SOURCE >= 200809L

DESCRIPTION

The psignal() function displays a message on stderr consisting of the string s, a colon, a space, a string describing the signal number sig, and a trailing newline. If the string s is NULL or empty, the colon and space are omitted. If sig is invalid, the message displayed will indicate an unknown signal.

The psiginfo() function is like psignal(), except that it displays information about the signal described by pinfo, which should point to a valid siginfo_t structure. As well as the signal description, psiginfo() displays information about the origin of the signal, and other information relevant to the signal (e.g., the relevant memory address for hardware-generated signals, the child process ID for SIGCHLD, and the user ID and process ID of the sender, for signals set using kill(2) or sigqueue(3)).

RETURN VALUE

The psignal() and psiginfo() functions return no value.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

psignal(), psiginfo()

Thread safetyMT-Safe locale

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.10. POSIX.1-2008, 4.3BSD.

BUGS

Up to glibc 2.12, psiginfo() had the following bugs:

  • In some circumstances, a trailing newline is not printed.

  • Additional details are not displayed for real-time signals.

SEE ALSO

sigaction(2), perror(3), strsignal(3), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2493 - Linux cli command zip_source_write

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_write and provides detailed information about the command zip_source_write, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_write.

libzip (-lzip)

The function

writes

bytes from the buffer

to the zip source

at the current write offset.

The zip source

has to be prepared for writing by calling

first.

Upon successful completion the number of bytes written is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2494 - Linux cli command Net_DNS_RR_TLSApm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_TLSApm and provides detailed information about the command Net_DNS_RR_TLSApm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_TLSApm.

NAME 🖥️ Net_DNS_RR_TLSApm 🖥️

DNS TLSA resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name TLSA usage selector matchingtype certificate);

DESCRIPTION

The Transport Layer Security Authentication (TLSA) DNS resource record is used to associate a TLS server certificate or public key with the domain name where the record is found, forming a “TLSA certificate association”. The semantics of how the TLSA RR is interpreted are described in RFC6698.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

usage

$usage = $rr->usage; $rr->usage( $usage );

8-bit integer value which specifies the provided association that will be used to match the certificate presented in the TLS handshake.

selector

$selector = $rr->selector; $rr->selector( $selector );

8-bit integer value which specifies which part of the TLS certificate presented by the server will be matched against the association data.

matchingtype

$matchingtype = $rr->matchingtype; $rr->matchingtype( $matchingtype );

8-bit integer value which specifies how the certificate association is presented.

certificate

cert

$cert = $rr->cert; $rr->cert( $cert );

Hexadecimal representation of the certificate data.

certbin

$certbin = $rr->certbin; $rr->certbin( $certbin );

Binary representation of the certificate data.

babble

print $rr->babble;

The babble() method returns the ‘BubbleBabble’ representation of the digest if the Digest::BubbleBabble package is available, otherwise an empty string is returned.

BubbleBabble represents a message digest as a string of plausible words, to make the digest easier to verify. The “words” are not necessarily real words, but they look more like words than a string of hex characters.

The ‘BubbleBabble’ string is appended as a comment when the string method is called.

COPYRIGHT

Copyright (c)2012 Willem Toorop, NLnet Labs.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC6698 <https://tools.ietf.org/html/rfc6698>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2495 - Linux cli command rexec

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command rexec and provides detailed information about the command rexec, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the rexec.

NAME 🖥️ rexec 🖥️

return stream to a remote command

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
[[deprecated]]
int rexec(char **restrict ahost, int inport,
 const char *restrict user, const char *restrict passwd,
 const char *restrict cmd, int *restrict fd2p);
[[deprecated]]
int rexec_af(char **restrict ahost, int inport,
 const char *restrict user, const char *restrict passwd,
 const char *restrict cmd, int *restrict fd2p,
 sa_family_t af);

rexec(), rexec_af():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    In glibc up to and including 2.19:
        _BSD_SOURCE

DESCRIPTION

This interface is obsoleted by rcmd(3).

The rexec() function looks up the host *ahost using gethostbyname(3), returning -1 if the host does not exist. Otherwise, *ahost is set to the standard name of the host. If a username and password are both specified, then these are used to authenticate to the foreign host; otherwise the environment and then the .netrc file in user’s home directory are searched for appropriate information. If all this fails, the user is prompted for the information.

The port inport specifies which well-known DARPA Internet port to use for the connection; the call getservbyname(“exec”, “tcp”) (see getservent(3)) will return a pointer to a structure that contains the necessary port. The protocol for connection is described in detail in rexecd(8).

If the connection succeeds, a socket in the Internet domain of type SOCK_STREAM is returned to the caller, and given to the remote command as stdin and stdout. If fd2p is nonzero, then an auxiliary channel to a control process will be setup, and a file descriptor for it will be placed in *fd2p. The control process will return diagnostic output from the command (unit 2) on this channel, and will also accept bytes on this channel as being UNIX signal numbers, to be forwarded to the process group of the command. The diagnostic information returned does not include remote authorization failure, as the secondary connection is set up after authorization has been verified. If fd2p is 0, then the stderr (unit 2 of the remote command) will be made the same as the stdout and no provision is made for sending arbitrary signals to the remote process, although you may be able to get its attention by using out-of-band data.

rexec_af()

The rexec() function works over IPv4 (AF_INET). By contrast, the rexec_af() function provides an extra argument, af, that allows the caller to select the protocol. This argument can be specified as AF_INET, AF_INET6, or AF_UNSPEC (to allow the implementation to select the protocol).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

rexec(), rexec_af()

Thread safetyMT-Unsafe

STANDARDS

None.

HISTORY

rexec()
4.2BSD, BSD, Solaris.

rexec_af()
glibc 2.2.

BUGS

The rexec() function sends the unencrypted password across the network.

The underlying service is considered a big security hole and therefore not enabled on many sites; see rexecd(8) for explanations.

SEE ALSO

rcmd(3), rexecd(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2496 - Linux cli command pthread_setconcurrency

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_setconcurrency and provides detailed information about the command pthread_setconcurrency, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_setconcurrency.

NAME 🖥️ pthread_setconcurrency 🖥️

set/get the concurrency level

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_setconcurrency(int new_level);
int pthread_getconcurrency(void);

DESCRIPTION

The pthread_setconcurrency() function informs the implementation of the application’s desired concurrency level, specified in new_level. The implementation takes this only as a hint: POSIX.1 does not specify the level of concurrency that should be provided as a result of calling pthread_setconcurrency().

Specifying new_level as 0 instructs the implementation to manage the concurrency level as it deems appropriate.

pthread_getconcurrency() returns the current value of the concurrency level for this process.

RETURN VALUE

On success, pthread_setconcurrency() returns 0; on error, it returns a nonzero error number.

pthread_getconcurrency() always succeeds, returning the concurrency level set by a previous call to pthread_setconcurrency(), or 0, if pthread_setconcurrency() has not previously been called.

ERRORS

pthread_setconcurrency() can fail with the following error:

EINVAL
new_level is negative.

POSIX.1 also documents an EAGAIN error (“the value specified by new_level would cause a system resource to be exceeded”).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_setconcurrency(), pthread_getconcurrency()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.1. POSIX.1-2001.

NOTES

The default concurrency level is 0.

Concurrency levels are meaningful only for M:N threading implementations, where at any moment a subset of a process’s set of user-level threads may be bound to a smaller number of kernel-scheduling entities. Setting the concurrency level allows the application to give the system a hint as to the number of kernel-scheduling entities that should be provided for efficient execution of the application.

Both LinuxThreads and NPTL are 1:1 threading implementations, so setting the concurrency level has no meaning. In other words, on Linux these functions merely exist for compatibility with other systems, and they have no effect on the execution of a program.

SEE ALSO

pthread_attr_setscope(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2497 - Linux cli command shm_open

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command shm_open and provides detailed information about the command shm_open, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the shm_open.

NAME 🖥️ shm_open 🖥️

create/open or unlink POSIX shared memory objects

LIBRARY

Real-time library (librt, -lrt)

SYNOPSIS

#include <sys/mman.h>
#include <sys/stat.h> /* For mode constants */
#include <fcntl.h> /* For O_* constants */
int shm_open(const char *name, int oflag, mode_t mode);
int shm_unlink(const char *name);

DESCRIPTION

shm_open() creates and opens a new, or opens an existing, POSIX shared memory object. A POSIX shared memory object is in effect a handle which can be used by unrelated processes to mmap(2) the same region of shared memory. The shm_unlink() function performs the converse operation, removing an object previously created by shm_open().

The operation of shm_open() is analogous to that of open(2). name specifies the shared memory object to be created or opened. For portable use, a shared memory object should be identified by a name of the form /somename; that is, a null-terminated string of up to NAME_MAX (i.e., 255) characters consisting of an initial slash, followed by one or more characters, none of which are slashes.

oflag is a bit mask created by ORing together exactly one of O_RDONLY or O_RDWR and any of the other flags listed here:

O_RDONLY
Open the object for read access. A shared memory object opened in this way can be mmap(2)ed only for read (PROT_READ) access.

O_RDWR
Open the object for read-write access.

O_CREAT
Create the shared memory object if it does not exist. The user and group ownership of the object are taken from the corresponding effective IDs of the calling process, and the object’s permission bits are set according to the low-order 9 bits of mode, except that those bits set in the process file mode creation mask (see umask(2)) are cleared for the new object. A set of macro constants which can be used to define mode is listed in open(2). (Symbolic definitions of these constants can be obtained by including <sys/stat.h>.)

A new shared memory object initially has zero length—the size of the object can be set using ftruncate(2). The newly allocated bytes of a shared memory object are automatically initialized to 0.

O_EXCL
If O_CREAT was also specified, and a shared memory object with the given name already exists, return an error. The check for the existence of the object, and its creation if it does not exist, are performed atomically.

O_TRUNC
If the shared memory object already exists, truncate it to zero bytes.

Definitions of these flag values can be obtained by including <fcntl.h>.

On successful completion shm_open() returns a new file descriptor referring to the shared memory object. This file descriptor is guaranteed to be the lowest-numbered file descriptor not previously opened within the process. The FD_CLOEXEC flag (see fcntl(2)) is set for the file descriptor.

The file descriptor is normally used in subsequent calls to ftruncate(2) (for a newly created object) and mmap(2). After a call to mmap(2) the file descriptor may be closed without affecting the memory mapping.

The operation of shm_unlink() is analogous to unlink(2): it removes a shared memory object name, and, once all processes have unmapped the object, deallocates and destroys the contents of the associated memory region. After a successful shm_unlink(), attempts to shm_open() an object with the same name fail (unless O_CREAT was specified, in which case a new, distinct object is created).

RETURN VALUE

On success, shm_open() returns a file descriptor (a nonnegative integer). On success, shm_unlink() returns 0. On failure, both functions return -1 and set errno to indicate the error.

ERRORS

EACCES
Permission to shm_unlink() the shared memory object was denied.

EACCES
Permission was denied to shm_open() name in the specified mode, or O_TRUNC was specified and the caller does not have write permission on the object.

EEXIST
Both O_CREAT and O_EXCL were specified to shm_open() and the shared memory object specified by name already exists.

EINVAL
The name argument to shm_open() was invalid.

EMFILE
The per-process limit on the number of open file descriptors has been reached.

ENAMETOOLONG
The length of name exceeds PATH_MAX.

ENFILE
The system-wide limit on the total number of open files has been reached.

ENOENT
An attempt was made to shm_open() a name that did not exist, and O_CREAT was not specified.

ENOENT
An attempt was to made to shm_unlink() a name that does not exist.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

shm_open(), shm_unlink()

Thread safetyMT-Safe locale

VERSIONS

POSIX leaves the behavior of the combination of O_RDONLY and O_TRUNC unspecified. On Linux, this will successfully truncate an existing shared memory object—this may not be so on other UNIX systems.

The POSIX shared memory object implementation on Linux makes use of a dedicated tmpfs(5) filesystem that is normally mounted under /dev/shm.

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.2. POSIX.1-2001.

POSIX.1-2001 says that the group ownership of a newly created shared memory object is set to either the calling process’s effective group ID or “a system default group ID”. POSIX.1-2008 says that the group ownership may be set to either the calling process’s effective group ID or, if the object is visible in the filesystem, the group ID of the parent directory.

EXAMPLES

The programs below employ POSIX shared memory and POSIX unnamed semaphores to exchange a piece of data. The “bounce” program (which must be run first) raises the case of a string that is placed into the shared memory by the “send” program. Once the data has been modified, the “send” program then prints the contents of the modified shared memory. An example execution of the two programs is the following:

$ ./pshm_ucase_bounce /myshm &
[1] 270171
$ ./pshm_ucase_send /myshm hello
HELLO

Further detail about these programs is provided below.

Program source: pshm_ucase.h

The following header file is included by both programs below. Its primary purpose is to define a structure that will be imposed on the memory object that is shared between the two programs.

#ifndef PSHM_UCASE_H
#define PSHM_UCASE_H
#include <semaphore.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \
                        } while (0)
#define BUF_SIZE 1024   /* Maximum size for exchanged string */
/* Define a structure that will be imposed on the shared
   memory object */
struct shmbuf {
    sem_t  sem1;            /* POSIX unnamed semaphore */
    sem_t  sem2;            /* POSIX unnamed semaphore */
    size_t cnt;             /* Number of bytes used in 'buf' */
    char   buf[BUF_SIZE];   /* Data being transferred */
};
#endif  // include guard

Program source: pshm_ucase_bounce.c

The “bounce” program creates a new shared memory object with the name given in its command-line argument and sizes the object to match the size of the shmbuf structure defined in the header file. It then maps the object into the process’s address space, and initializes two POSIX semaphores inside the object to 0.

After the “send” program has posted the first of the semaphores, the “bounce” program upper cases the data that has been placed in the memory by the “send” program and then posts the second semaphore to tell the “send” program that it may now access the shared memory.

/* pshm_ucase_bounce.c
   Licensed under GNU General Public License v2 or later.
*/
#include <ctype.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <unistd.h>
#include "pshm_ucase.h"
int
main(int argc, char *argv[])
{
    int            fd;
    char           *shmpath;
    struct shmbuf  *shmp;
    if (argc != 2) {
        fprintf(stderr, "Usage: %s /shm-path

“, argv[0]); exit(EXIT_FAILURE); } shmpath = argv[1]; /* Create shared memory object and set its size to the size of our structure. / fd = shm_open(shmpath, O_CREAT | O_EXCL | O_RDWR, 0600); if (fd == -1) errExit(“shm_open”); if (ftruncate(fd, sizeof(struct shmbuf)) == -1) errExit(“ftruncate”); / Map the object into the caller’s address space. */ shmp = mmap(NULL, sizeof(shmp), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (shmp == MAP_FAILED) errExit(“mmap”); / Initialize semaphores as process-shared, with value 0. / if (sem_init(&shmp->sem1, 1, 0) == -1) errExit(“sem_init-sem1”); if (sem_init(&shmp->sem2, 1, 0) == -1) errExit(“sem_init-sem2”); / Wait for ‘sem1’ to be posted by peer before touching shared memory. / if (sem_wait(&shmp->sem1) == -1) errExit(“sem_wait”); / Convert data in shared memory into upper case. / for (size_t j = 0; j < shmp->cnt; j++) shmp->buf[j] = toupper((unsigned char) shmp->buf[j]); / Post ‘sem2’ to tell the peer that it can now access the modified data in shared memory. / if (sem_post(&shmp->sem2) == -1) errExit(“sem_post”); / Unlink the shared memory object. Even if the peer process is still using the object, this is okay. The object will be removed only after all open references are closed. */ shm_unlink(shmpath); exit(EXIT_SUCCESS); }

Program source: pshm_ucase_send.c

The “send” program takes two command-line arguments: the pathname of a shared memory object previously created by the “bounce” program and a string that is to be copied into that object.

The program opens the shared memory object and maps the object into its address space. It then copies the data specified in its second argument into the shared memory, and posts the first semaphore, which tells the “bounce” program that it can now access that data. After the “bounce” program posts the second semaphore, the “send” program prints the contents of the shared memory on standard output.

/* pshm_ucase_send.c
   Licensed under GNU General Public License v2 or later.
*/
#include <fcntl.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <unistd.h>
#include "pshm_ucase.h"
int
main(int argc, char *argv[])
{
    int            fd;
    char           *shmpath, *string;
    size_t         len;
    struct shmbuf  *shmp;
    if (argc != 3) {
        fprintf(stderr, "Usage: %s /shm-path string

“, argv[0]); exit(EXIT_FAILURE); } shmpath = argv[1]; string = argv[2]; len = strlen(string); if (len > BUF_SIZE) { fprintf(stderr, “String is too long “); exit(EXIT_FAILURE); } /* Open the existing shared memory object and map it into the caller’s address space. */ fd = shm_open(shmpath, O_RDWR, 0); if (fd == -1) errExit(“shm_open”); shmp = mmap(NULL, sizeof(shmp), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (shmp == MAP_FAILED) errExit(“mmap”); / Copy data into the shared memory object. / shmp->cnt = len; memcpy(&shmp->buf, string, len); / Tell peer that it can now access shared memory. / if (sem_post(&shmp->sem1) == -1) errExit(“sem_post”); / Wait until peer says that it has finished accessing the shared memory. / if (sem_wait(&shmp->sem2) == -1) errExit(“sem_wait”); / Write modified data in shared memory to standard output. */ write(STDOUT_FILENO, &shmp->buf, len); write(STDOUT_FILENO, " “, 1); exit(EXIT_SUCCESS); }

SEE ALSO

close(2), fchmod(2), fchown(2), fcntl(2), fstat(2), ftruncate(2), memfd_create(2), mmap(2), open(2), umask(2), shm_overview(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2498 - Linux cli command socklen_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command socklen_ttype and provides detailed information about the command socklen_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the socklen_ttype.

NAME 🖥️ socklen_ttype 🖥️

socket address

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/socket.h>
struct sockaddr {
 sa_family_t sa_family; /* Address family */
 char sa_data[]; /* Socket address */
};
struct sockaddr_storage {
 sa_family_t ss_family; /* Address family */
};
typedef /* ... */ socklen_t;
typedef /* ... */ sa_family_t;

Internet domain sockets

#include <netinet/in.h>
struct sockaddr_in {
 sa_family_t sin_family; /* AF_INET */
 in_port_t sin_port; /* Port number */
 struct in_addr sin_addr; /* IPv4 address */
};
struct sockaddr_in6 {
 sa_family_t sin6_family; /* AF_INET6 */
 in_port_t sin6_port; /* Port number */
 uint32_t sin6_flowinfo; /* IPv6 flow info */
 struct in6_addr sin6_addr; /* IPv6 address */
 uint32_t sin6_scope_id; /* Set of interfaces for a scope */
};
struct in_addr {
 in_addr_t s_addr;
};
struct in6_addr {
 uint8_t s6_addr[16];
};
typedef uint32_t in_addr_t;
typedef uint16_t in_port_t;

UNIX domain sockets

#include <sys/un.h>
struct sockaddr_un {
 sa_family_t sun_family; /* Address family */
 char sun_path[]; /* Socket pathname */
};

DESCRIPTION

sockaddr
Describes a socket address.

sockaddr_storage
A structure at least as large as any other sockaddr_* address structures. It’s aligned so that a pointer to it can be cast as a pointer to other sockaddr_* structures and used to access its fields.

socklen_t
Describes the length of a socket address. This is an integer type of at least 32 bits.

sa_family_t
Describes a socket’s protocol family. This is an unsigned integer type.

Internet domain sockets

sockaddr_in
Describes an IPv4 Internet domain socket address. The sin_port and sin_addr members are stored in network byte order.

sockaddr_in6
Describes an IPv6 Internet domain socket address. The sin6_addr.s6_addr array is used to contain a 128-bit IPv6 address, stored in network byte order.

UNIX domain sockets

sockaddr_un
Describes a UNIX domain socket address.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

socklen_t was invented by POSIX. See also accept(2).

These structures were invented before modern ISO C strict-aliasing rules. If aliasing rules are applied strictly, these structures would be extremely difficult to use without invoking Undefined Behavior. POSIX Issue 8 will fix this by requiring that implementations make sure that these structures can be safely used as they were designed.

NOTES

socklen_t is also defined in <netdb.h>.

sa_family_t is also defined in <netinet/in.h> and <sys/un.h>.

SEE ALSO

accept(2), bind(2), connect(2), getpeername(2), getsockname(2), getsockopt(2), sendto(2), setsockopt(2), socket(2), socketpair(2), getaddrinfo(3), gethostbyaddr(3), getnameinfo(3), htonl(3), ipv6(7), socket(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2499 - Linux cli command Net_DBus_Binding_Message_Signalpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Binding_Message_Signalpm and provides detailed information about the command Net_DBus_Binding_Message_Signalpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Binding_Message_Signalpm.

NAME 🖥️ Net_DBus_Binding_Message_Signalpm 🖥️

a message encoding a signal

SYNOPSIS

use Net::DBus::Binding::Message::Signal; my $signal = Net::DBus::Binding::Message::Signal->new( object_path => “/org/example/myobject”, interface => “org.example.myobject”, signal_name => “foo_changed”); $connection->send($signal);

DESCRIPTION

This module is part of the low-level DBus binding APIs, and should not be used by application code. No guarantees are made about APIs under the Net::DBus::Binding:: namespace being stable across releases.

This module provides a convenience constructor for creating a message representing a signal.

METHODS

my $signal = Net::DBus::Binding::Message::Signal->new( object_path => $path, interface => $interface, signal_name => $name);
Creates a new message, representing a signal [to be] emitted by the object located under the path given by the object_path parameter. The name of the signal is given by the signal_name parameter, and is scoped to the interface given by the interface parameter.

AUTHOR

Daniel P. Berrange.

COPYRIGHT

Copyright (C) 2004-2009 Daniel P. Berrange

SEE ALSO

Net::DBus::Binding::Message

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2500 - Linux cli command Net_DNS_RR_LPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_LPpm and provides detailed information about the command Net_DNS_RR_LPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_LPpm.

NAME 🖥️ Net_DNS_RR_LPpm 🖥️

DNS LP resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name IN LP preference FQDN); $rr = Net::DNS::RR->new( name => example.com, type => LP, preference => 10, target => target.example.com. );

DESCRIPTION

Class for DNS Locator Pointer (LP) resource records.

The LP DNS resource record (RR) is used to hold the name of a subnetwork for ILNP. The name is an FQDN which can then be used to look up L32 or L64 records. LP is, effectively, a Locator Pointer to L32 and/or L64 records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

preference

$preference = $rr->preference; $rr->preference( $preference );

A 16 bit unsigned integer in network byte order that indicates the relative preference for this LP record among other LP records associated with this owner name. Lower values are preferred over higher values.

FQDN, fqdn

target

$target = $rr->target; $rr->target( $target );

The FQDN field contains the DNS target name that is used to reference L32 and/or L64 records.

COPYRIGHT

Copyright (c)2012 Dick Franks.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC6742 <https://tools.ietf.org/html/rfc6742>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2501 - Linux cli command IO_Socket_Sockspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_Socket_Sockspm and provides detailed information about the command IO_Socket_Sockspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_Socket_Sockspm.

NAME 🖥️ IO_Socket_Sockspm 🖥️

Provides a way to create socks client or server both 4 and 5 version.

SYNOPSIS

Client

use IO::Socket::Socks; my $socks_client = IO::Socket::Socks->new( ProxyAddr => “proxy host”, ProxyPort => “proxy port”, ConnectAddr => “remote host”, ConnectPort => “remote port”, ) or die $SOCKS_ERROR; print $socks_client “foo “; $socks_client->close();

Server

use IO::Socket::Socks :constants; my $socks_server = IO::Socket::Socks->new( ProxyAddr => “localhost”, ProxyPort => 8000, Listen => 1, UserAuth => \auth, RequireAuth => 1 ) or die $SOCKS_ERROR; while(1) { my $client = $socks_server->accept(); unless ($client) { print “ERROR: $SOCKS_ERROR “; next; } my $command = $client->command(); if ($command->[0] == CMD_CONNECT) { # Handle the CONNECT $client->command_reply(REPLY_SUCCESS, addr, port); } … #read from the client and send to the CONNECT address … $client->close(); } sub auth { my ($user, $pass) = @_; return 1 if $user eq “foo” && $pass eq “bar”; return 0; }

DESCRIPTION

IO::Socket::Socks connects to a SOCKS proxy, tells it to open a connection to a remote host/port when the object is created. The object you receive can be used directly as a socket (with IO::Socket interface) for sending and receiving data from the remote host. In addition to create socks client this module could be used to create socks server. See examples below.

EXAMPLES

For complete examples of socks 4/5 client and server see `examples’ subdirectory in the distribution.

METHODS

Socks Client

new( %cfg )

new_from_socket($socket, %cfg)

new_from_fd($socket, %cfg)

Creates a new IO::Socket::Socks client object. new_from_socket() is the same as new(), but allows one to create object from an existing and not connected socket (new_from_fd is new_from_socket alias). To make IO::Socket::Socks object from connected socket see start_SOCKS

Both takes the following config hash:

SocksVersion => 4 or 5. Default is 5 Timeout => connect/accept timeout Blocking => Since IO::Socket::Socks version 0.5 you can perform non-blocking connect/bind by passing false value for this option. Default is true - blocking. See ready() below for more details. SocksResolve => resolve host name to ip by proxy server or not (will resolve by client). This overrides value of $SOCKS4_RESOLVE or $SOCKS5_RESOLVE variable. Boolean. SocksDebug => This will cause all of the SOCKS traffic to be presented on the command line in a form similar to the tables in the RFCs. This overrides value of $SOCKS_DEBUG variable. Boolean. ProxyAddr => Hostname of the proxy ProxyPort => Port of the proxy ConnectAddr => Hostname of the remote machine ConnectPort => Port of the remote machine BindAddr => Hostname of the remote machine which will connect to the proxy server after bind request BindPort => Port of the remote machine which will connect to the proxy server after bind request UdpAddr => Expected address where datagrams will be sent. Fill it with address of all zeros if address is not known at this moment. Proxy server may use this information to limit access to the association. UdpPort => Expected port where datagrams will be sent. Use zero port if port is not known at this moment. Proxy server may use this information to limit access to the association. AuthType => What kind of authentication to support: none - no authentication (default) userpass - Username/Password. For socks5 proxy only. RequireAuth => Do not send ANON as a valid auth mechanism. For socks5 proxy only Username => For socks5 if AuthType is set to userpass, then you must provide a username. For socks4 proxy with this option you can specify userid. Password => If AuthType is set to userpass, then you must provide a password. For socks5 proxy only.

The following options should be specified:

(ProxyAddr and ProxyPort) (ConnectAddr and ConnectPort) or (BindAddr and BindPort) or (UdpAddr and UdpPort)

Other options are facultative.

start_SOCKS($socket, %cfg)

This is a class method to start socks handshake on already connected socket. This will bless passed $socket to IO::Socket::Socks class. %cfg is like hash in the constructor. Only options listed below makes sense:

Timeout ConnectAddr ConnectPort BindAddr BindPort UdpAddr UdpPort SocksVersion SocksDebug SocksResolve AuthType RequireAuth Username Password AuthMethods

On success this method will return same $socket, but as IO::Socket::Socks object. On failure it will return undef (but socket will be still blessed to IO::Socket::Socks class). See example:

use IO::Socket; use IO::Socket::Socks; my $sock = IO::Socket::INET->new("$proxy_host:$proxy_port”) or die $@; $sock = IO::Socket::Socks->start_SOCKS($sock, ConnectAddr => “google.com”, ConnectPort => 80) or die $SOCKS_ERROR;

version( )

Returns socks version for this socket

ready( )

Returns true when socket becomes ready to transfer data (socks handshake done), false otherwise. This is useful for non-blocking connect/bind. When this method returns false value you can determine what socks handshake need for with $SOCKS_ERROR variable. It may need for read, then $SOCKS_ERROR will be SOCKS_WANT_READ or need for write, then it will be SOCKS_WANT_WRITE.

Example:

use IO::Socket::Socks; use IO::Select; my $sock = IO::Socket::Socks->new( ProxyAddr => localhost, ProxyPort => 1080, ConnectAddr => mail.com, ConnectPort => 80, Blocking => 0 ) or die $SOCKS_ERROR; my $sel = IO::Select->new($sock); until ($sock->ready) { if ($SOCKS_ERROR == SOCKS_WANT_READ) { $sel->can_read(); } elsif ($SOCKS_ERROR == SOCKS_WANT_WRITE) { $sel->can_write(); } else { die $SOCKS_ERROR; } # NOTE: when base class ($IO::Socket::Socks::SOCKET_CLASS) is IO::Socket::IP # and you are using kqueue or epoll to check for readable/writable sockets # you need to readd $sock to kqueue/epoll after each call to ready() (actually until socket will be connected to proxy server), # because IO::Socket::IP may change internal socket of $sock for milti-homed hosts. # There is no such problem when you are using select/poll } # you may want to return socket to blocking state by $sock->blocking(1) $sock->syswrite(“I am ready”);

accept( )

Accept an incoming connection after bind request. On failed returns undef. On success returns socket. No new socket created, returned socket is same on which this method was called. Because accept (2) is not invoked on the client side, socks server calls accept (2) and proxify all traffic via socket opened by client bind request. You can call accept only once on IO::Socket::Socks client socket.

command( %cfg )

Allows one to execute socks command on already opened socket. Thus you can create socks chain. For example see EXAMPLES section.

%cfg is like hash in the constructor. Only options listed below makes sense:

ConnectAddr ConnectPort BindAddr BindPort UdpAddr UdpPort SocksVersion SocksDebug SocksResolve AuthType RequireAuth Username Password AuthMethods

Values of the other options (Timeout for example) inherited from the constructor. Options like ProxyAddr and ProxyPort are not included.

dst( )

Return (host, port, address_type) of the remote host after connect/accept or socks server (host, port, address_type) after bind/udpassoc.

Socks Server

new( %cfg )

new_from_socket($socket, %cfg)

new_from_fd($socket, %cfg)

Creates a new IO::Socket::Socks server object. new_from_socket() is the same as new(), but allows one to create object from an existing socket (new_from_fd is new_from_socket alias). Both takes the following config hash:

SocksVersion => 4 for socks4, 5 for socks5 or [4,5] if you want accept both 4 and 5. Default is 5 Timeout => Timeout value for various operations Blocking => Since IO::Socket::Socks version 0.6 you can perform non-blocking accept by passing false value for this option. Default is true - blocking. See ready() below for more details. SocksResolve => For socks v5: return destination address to the client in form of 4 bytes if true, otherwise in form of host length and host name. For socks v4: allow use socks4a protocol extension if true and not otherwise. This overrides value of $SOCKS4_RESOLVE or $SOCKS5_RESOLVE. See also command_reply(). SocksDebug => This will cause all of the SOCKS traffic to be presented on the command line in a form similar to the tables in the RFCs. This overrides value of $SOCKS_DEBUG variable. Boolean. ProxyAddr => Local host bind address ProxyPort => Local host bind port UserAuth => Reference to a function that returns 1 if client allowed to use socks server, 0 otherwise. For socks5 proxy it takes login and password as arguments. For socks4 argument is userid. RequireAuth => Not allow anonymous access for socks5 proxy. Listen => Same as IO::Socket::INET listen option. Should be specified as number > 0.

The following options should be specified:

Listen ProxyAddr ProxyPort

Other options are facultative.

accept( )

Accept an incoming connection and return a new IO::Socket::Socks object that represents that connection. You must call command() on this to find out what the incoming connection wants you to do, and then call command_reply() to send back the reply.

version( )

Returns socks version for socket. It is useful when your server accepts both 4 and 5 version. Then you should know socks version to make proper response. Just call version() on socket received after accept().

ready( )

After non-blocking accept you will get new client socket object, which may be not ready to transfer data (if socks handshake is not done yet). ready() will return true value when handshake will be done successfully and false otherwise. Note, socket returned by accept() call will be always in blocking mode. So if your program can’t block you should set non-blocking mode for this socket before ready() call: $socket->blocking (0). When ready() returns false value you can determine what socks handshake needs for with $SOCKS_ERROR variable. It may need for read, then $SOCKS_ERROR will be SOCKS_WANT_READ or need for write, then it will be SOCKS_WANT_WRITE.

Example:

use IO::Socket::Socks; use IO::Select; my $server = IO::Socket::Socks->new(ProxyAddr => localhost, ProxyPort => 1080, Blocking => 0) or die $@; my $select = IO::Select->new($server); $select->can_read(); # wait for client my $client = $server->accept() or die “accept(): $! ($SOCKS_ERROR)”; $client->blocking(0); # !!! $select->add($client); $select->remove($server); # no more connections while (1) { if ($client->ready) { my $command = $client->command; … # do client command $client->command_reply(IO::Socket::Socks::REPLY_SUCCESS, $command->[1], $command->[2]); … # transfer traffic last; } elsif ($SOCKS_ERROR == SOCKS_WANT_READ) { $select->can_read(); } elsif ($SOCKS_ERROR == SOCKS_WANT_WRITE) { $select->can_write(); } else { die “Unexpected error: $SOCKS_ERROR”; } }

command( )

After you call accept() the client has sent the command they want you to process. This function should be called on the socket returned by accept(). It returns a reference to an array with the following format:

[ COMMAND, ADDRESS, PORT, ADDRESS TYPE ]

command_reply( REPLY CODE, ADDRESS, PORT )

After you call command() the client needs to be told what the result is. The REPLY CODE is one of the constants as follows (integer value):

For socks v4 REQUEST_GRANTED(90): request granted REQUEST_FAILED(91): request rejected or failed REQUEST_REJECTED_IDENTD(92): request rejected because SOCKS server cannot connect to identd on the client REQUEST_REJECTED_USERID(93): request rejected because the client program and identd report different user-ids For socks v5 REPLY_SUCCESS(0): Success REPLY_GENERAL_FAILURE(1): General Failure REPLY_CONN_NOT_ALLOWED(2): Connection Not Allowed REPLY_NETWORK_UNREACHABLE(3): Network Unreachable REPLY_HOST_UNREACHABLE(4): Host Unreachable REPLY_CONN_REFUSED(5): Connection Refused REPLY_TTL_EXPIRED(6): TTL Expired REPLY_CMD_NOT_SUPPORTED(7): Command Not Supported REPLY_ADDR_NOT_SUPPORTED(8): Address Not Supported

HOST and PORT are the resulting host and port (where server socket responsible for this command bound).

Note: for 5 version command_reply will try to resolve passed address if SocksResolve has true value and passed address is domain name. To avoid this just pass ip address ($socket->sockhost) instead of host name or turn off SocksResolve for this server. For version 4 passed host name will always be resolved to ip address even if SocksResolve has false value. Because this version doesn’t support ADDRESS as domain name.

VARIABLES

$SOCKS_ERROR

This scalar behaves like $! in that if undef is returned. $SOCKS_ERROR is IO::Socket::Socks::Error object with some overloaded operators. In string context this variable should contain a string reason for the error. In numeric context it contains error code.

$SOCKS4_RESOLVE

If this variable has true value resolving of host names will be done by proxy server, otherwise resolving will be done locally. Resolving host by socks proxy version 4 is extension to the protocol also known as socks4a. So, only socks4a proxy supports resolving of hostnames. Default value of this variable is false. This variable is not importable. See also `SocksResolve’ parameter in the constructor.

$SOCKS5_RESOLVE

If this variable has true value resolving of host names will be done by proxy server, otherwise resolving will be done locally. Note: some bugous socks5 servers doesn’t support resolving of host names. Default value is true. This variable is not importable. See also `SocksResolve’ parameter in the constructor.

$SOCKS_DEBUG

Default value is $ENV{SOCKS_DEBUG}. If this variable has true value and no SocksDebug option in the constructor specified, then SocksDebug will has true value. This variable is not importable.

$SOCKET_CLASS

With this variable you can get/set base socket class for IO::Socket::Socks. By default it tries to use IO::Socket::IP 0.36+ as socket class. And falls back to IO::Socket::INET if not available. You can set $IO::Socket::Socks::SOCKET_CLASS before loading of IO::Socket::Socks and then it will not try to detect proper base class itself. You can also set it after loading of IO::Socket::Socks and this will automatically update @ISA, so you shouldn’t worry about inheritance.

CONSTANTS

The following constants could be imported manually or using `:constants’ tag:

SOCKS5_VER SOCKS4_VER ADDR_IPV4 ADDR_DOMAINNAME ADDR_IPV6 CMD_CONNECT CMD_BIND CMD_UDPASSOC AUTHMECH_ANON AUTHMECH_USERPASS AUTHMECH_INVALID AUTHREPLY_SUCCESS AUTHREPLY_FAILURE ISS_UNKNOWN_ADDRESS # address type sent by client/server not supported by I::S::S ISS_BAD_VERSION # socks version sent by client/server != specified version ISS_CANT_RESOLVE # I::S::S failed to resolve some host REPLY_SUCCESS REPLY_GENERAL_FAILURE REPLY_CONN_NOT_ALLOWED REPLY_NETWORK_UNREACHABLE REPLY_HOST_UNREACHABLE REPLY_CONN_REFUSED REPLY_TTL_EXPIRED REPLY_CMD_NOT_SUPPORTED REPLY_ADDR_NOT_SUPPORTED REQUEST_GRANTED REQUEST_FAILED REQUEST_REJECTED_IDENTD REQUEST_REJECTED_USERID SOCKS_WANT_READ SOCKS_WANT_WRITE ESOCKSPROTO

SOCKS_WANT_READ, SOCKS_WANT_WRITE and ESOCKSPROTO are imported by default.

IPv6

Since version 0.66 IO::Socket::Socks supports IPv6 with help of IO::Socket::IP 0.36+. And will use IO::Socket::IP as base class if available. However you can force set $SOCKET_CLASS = "IO::Socket::INET" to use IPv4 only. See also $SOCKET_CLASS

FAQ

How to determine is connection to socks server (client accept) failed or some protocol error occurred?
You can check $! variable. If $! == ESOCKSPROTO constant, then it was error in the protocol. Error description could be found in $SOCKS_ERROR.

How to determine which error in the protocol occurred?
You should compare $SOCKS_ERROR with constants below: AUTHMECH_INVALID AUTHREPLY_FAILURE ISS_UNKNOWN_ADDRESS ISS_BAD_VERSION REPLY_GENERAL_FAILURE REPLY_CONN_NOT_ALLOWED REPLY_NETWORK_UNREACHABLE REPLY_HOST_UNREACHABLE REPLY_CONN_REFUSED REPLY_TTL_EXPIRED REPLY_CMD_NOT_SUPPORTED REPLY_ADDR_NOT_SUPPORTED REQUEST_FAILED REQUEST_REJECTED_IDENTD REQUEST_REJECTED_USERID

BUGS

The following options are not implemented:

GSSAPI authentication

UDP server side support

Patches are welcome.

SEE ALSO

IO::Socket::Socks::Wrapper

AUTHOR

Original author is Ryan Eatmon

Now maintained by Oleg G <[email protected]>

COPYRIGHT

This module is free software, you can redistribute it and/or modify it under the terms of LGPL.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2502 - Linux cli command POD2_JA_Unicode_GCStringpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command POD2_JA_Unicode_GCStringpm and provides detailed information about the command POD2_JA_Unicode_GCStringpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the POD2_JA_Unicode_GCStringpm.

NAME 🖥️ POD2_JA_Unicode_GCStringpm 🖥️

UAX #29 書記素クラスタの列としての文字列

SYNOPSIS

use Unicode::GCString; $gcstring = Unicode::GCString->new($string);

DESCRIPTION

Unicode::GCString はUnicode文字列を、Unicode標準附属書29 [UAX #29] で定義される「拡張書記素クラスタ」〔extended grapheme cluster〕の列として扱う。

書記素クラスタ〔grapheme cluster〕は、Unicode文字の列で、ひとつの書記素基底〔grapheme base〕と、付加的な書記素エキステンダ〔grapheme extender〕および/または**「前置」文字**〔“prepend” character〕から成る。これは人が「文字」とみなすものに近い。

公開インタフェース

コンストラクタ

new (STRING, [KEY => VALUE, …])

new (STRING, [LINEBREAK])

コンストラクタ。 Unicode文字列 STRING から新たに書記素クラスタ文字列 (Unicode::GCString オブジェクト) を作る。 KEY => VALUE の対については “オプション” in Unicode::LineBreak~[ja]を参照。 第二の形式では、 Unicode::LineBreak~[ja] オブジェクト LINEBREAK で分節の仕様を決定する。 : 最初の形式はリリース 2012.10 で導入された。

copy
コピーコンストラクタ。 書記素クラスタ文字列の複製を作る。 新たな文字列では、次の位置は先頭になる。

長さ

chars
インスタンスメソッド。 書記素クラスタ文字列に含まれるUnicode文字の数、つまりUnicode文字列としての長さを返す。

columns
インスタンスメソッド。 組み込みの文字データベースで決定される書記素クラスタ文字列の桁数を返す。 詳しくは “DESCRIPTION” in Unicode::LineBreak~[ja] を参照。

length
インスタンスメソッド。 書記素クラスタ文字列に含まれる書記素クラスタの数を返す。

文字列としての操作

as_string

“““OBJECT”””

インスタンスメソッド。 書記素クラスタ文字列を明示的にUnicode文字列に変換する。

cmp (STRING)

STRING “cmp” STRING

インスタンスメソッド。 文字列を比較する。特に風変わりなところはない。 文字列のどちらかがUnicode文字列でもよい。

concat (STRING)

STRING “.” STRING

インスタンスメソッド。 書記素クラスタ文字列を結合する。 STRING のどちらかがUnicode文字列でもよい。 結果の文字列の桁数 (columns() を参照) や書記素クラスタの数 (length() を参照) は、ふたつの文字列のそれの和になるとはかぎらないことに注意。 新たな文字列では、次の位置は左辺の文字列にセットされていた位置になる。

join ([STRING, …])
インスタンスメソッド。 STRING を、書記素クラスタ文字列をはさんでつなげる。 STRING のうちに Unicode文字列があってもよい。

substr (OFFSET, [LENGTH, [REPLACEMENT]])
インスタンスメソッド。 書記素クラスタ文字列の部分文字列を返す。 OFFSET と LENGTH は書記素クラスタで数える。 REPLACEMENT を指定すると、部分文字列をそれで置き換える。 REPLACEMENT は Unicode文字列でもよい。 Note: このメソッドは組み込み関数 substr() と異なり、左辺値を返すことはない。

書記素クラスタの列としての操作

as_array

“@{“OBJECT”}”

as_arrayref

インスタンスメソッド。 書記素クラスタ文字列を、書記素クラスタの情報の配列に変換する。

eos
インスタンスメソッド。 現在の位置が書記素クラスタ文字列の最後かどうか調べる。

item ([OFFSET])
インスタンスメソッド。 OFFSET番めの書記素クラスタを返す。 OFFSET を指定しないと、次の位置の書記素クラスタの情報を返す。

next

“<“OBJECT”>”

インスタンスメソッド、反復的。 次の位置の書記素クラスタを返し、次の位置をひとつ進める。

pos ([OFFSET])
インスタンスメソッド。 OFFSET を指定した場合は、次の位置をそれにする。 書記素クラスタ文字列の次の位置を返す。

その他

lbc
インスタンスメソッド。 最初の書記素クラスタの最初の文字の行分割クラス (Unicode::LineBreak~[ja] 参照) を返す。

lbcext
インスタンスメソッド。 最後の書記素クラスタの最後の書記素エキステンダの行分割クラス (Unicode::LineBreak~[ja] 参照) を返す。 書記素エキステンダがないか、またはクラスが CM の場合は、 最後の書記素基底の行分割クラスを返す。

CAVEATS

  • 書記素クラスタを「書記素」と呼ぶべきではない (ラリーはそう呼ぶが)。

  • Perl の 5.10.1 版あたりでは、Unicode::GCString オブジェクトから Unicode 文字列への暗黙の変換が "utf8_mg_pos_cache_update" キャッシュを混乱させることがある。 たとえば、つぎのように $sub = substr($gcstring, $i, $j); するかわりに、つぎのようにするとよい。 $sub = substr("$gcstring", $i, $j); $sub = substr($gcstring->as_string, $i, $j);

  • このモジュールでは「初期の」書記素クラスタ境界判別アルゴリズムを実装している。 手直し〔tailoring〕の機構にはまだ対応していない。

VERSION

$VERSION 変数を参照してほしい。

非互換な変更

-   

**new()** メソッドは非Unicode文字列を引数に取れるようになった。 その場合、文字列をiso-8859-1 (Latin 1) キャラクタセットで復号する。 以前のリリースでは、このメソッドに非Unicodeを入力すると死ぬようになっていた。

SEE ALSO

[UAX #29] Mark Davis (ed.) (2009-2013). Unicode Standard Annex #29: Unicode Text Segmentation, Revisions 15-23. <http://www.unicode.org/reports/tr29/>.

AUTHOR

Hatuka*nezumi - IKEDA Soji <hatuka(at)nezumi.nu>

COPYRIGHT

Copyright (C) 2009-2013 Hatuka*nezumi - IKEDA Soji.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2503 - Linux cli command Net_DNS_Resolver_UNIXpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_Resolver_UNIXpm and provides detailed information about the command Net_DNS_Resolver_UNIXpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_Resolver_UNIXpm.

NAME 🖥️ Net_DNS_Resolver_UNIXpm 🖥️

Unix resolver class

SYNOPSIS

use Net::DNS::Resolver;

DESCRIPTION

This class implements the OS specific portions of Net::DNS::Resolver.

No user serviceable parts inside, see Net::DNS::Resolver for all your resolving needs.

COPYRIGHT

Copyright (c)2003 Chris Reinhardt.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl, Net::DNS, Net::DNS::Resolver

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2504 - Linux cli command rewind

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command rewind and provides detailed information about the command rewind, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the rewind.

NAME 🖥️ rewind 🖥️

reposition a stream

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int fseek(FILE *stream, long offset, int whence);
long ftell(FILE *stream);
void rewind(FILE *stream);
int fgetpos(FILE *restrict stream, fpos_t *restrict pos);
int fsetpos(FILE *stream, const fpos_t *pos);

DESCRIPTION

The fseek() function sets the file position indicator for the stream pointed to by stream. The new position, measured in bytes, is obtained by adding offset bytes to the position specified by whence. If whence is set to SEEK_SET, SEEK_CUR, or SEEK_END, the offset is relative to the start of the file, the current position indicator, or end-of-file, respectively. A successful call to the fseek() function clears the end-of-file indicator for the stream and undoes any effects of the ungetc(3) function on the same stream.

The ftell() function obtains the current value of the file position indicator for the stream pointed to by stream.

The rewind() function sets the file position indicator for the stream pointed to by stream to the beginning of the file. It is equivalent to:

(void) fseek(stream, 0L, SEEK_SET)

except that the error indicator for the stream is also cleared (see clearerr(3)).

The fgetpos() and fsetpos() functions are alternate interfaces equivalent to ftell() and fseek() (with whence set to SEEK_SET), setting and storing the current value of the file offset into or from the object referenced by pos. On some non-UNIX systems, an fpos_t object may be a complex object and these routines may be the only way to portably reposition a text stream.

If the stream refers to a regular file and the resulting stream offset is beyond the size of the file, subsequent writes will extend the file with a hole, up to the offset, before committing any data. See lseek(2) for details on file seeking semantics.

RETURN VALUE

The rewind() function returns no value. Upon successful completion, fgetpos(), fseek(), fsetpos() return 0, and ftell() returns the current offset. Otherwise, -1 is returned and errno is set to indicate the error.

ERRORS

EINVAL
The whence argument to fseek() was not SEEK_SET, SEEK_END, or SEEK_CUR. Or: the resulting file offset would be negative.

ESPIPE
The file descriptor underlying stream is not seekable (e.g., it refers to a pipe, FIFO, or socket).

The functions fgetpos(), fseek(), fsetpos(), and ftell() may also fail and set errno for any of the errors specified for the routines fflush(3), fstat(2), lseek(2), and malloc(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fseek(), ftell(), rewind(), fgetpos(), fsetpos()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89.

SEE ALSO

lseek(2), fseeko(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2505 - Linux cli command XtVaCreateManagedWidget

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtVaCreateManagedWidget and provides detailed information about the command XtVaCreateManagedWidget, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtVaCreateManagedWidget.

NAME 🖥️ XtVaCreateManagedWidget 🖥️

create and destroy widgets

SYNTAX

#include <X11/Intrinsic.h>

Widget XtCreateWidget(const char *name, WidgetClass widget_class, Widget parent, ArgList args, Cardinal num_args);

Widget XtVaCreateWidget(const char *name, WidgetClass widget_class, Widget parent, … );

Widget XtCreateManagedWidget(const char *name, WidgetClass widget_class, Widget parent, ArgList args, Cardinal num_args);

Widget XtVaCreateManagedWidget(const char *name, WidgetClass widget_class, Widget parent, … );

void XtDestroyWidget(Widget w);

ARGUMENTS

args
Specifies the argument list to override the resource defaults.

name
Specifies the resource name for the created widget, which is used for retrieving resources and, for that reason, should not be the same as any other widget that is a child of same parent.

num_args
Specifies the number of arguments in the argument list.

parent
Specifies the parent widget.

  1. Specifies the widget.

widget_class
Specifies the widget class pointer for the created widget.


Specifies the variable argument list to override the resource defaults.

DESCRIPTION

The XtCreateWidget function performs much of the boilerplate operations of widget creation:

  • Checks to see if the class_initialize procedure has been called for this class and for all superclasses and, if not, calls those necessary in a superclass-to-subclass order.

  • Allocates memory for the widget instance.

  • If the parent is a subclass of constraintWidgetClass, it allocates memory for the parent’s constraints and stores the address of this memory into the constraints field.

  • Initializes the core nonresource data fields (for example, parent and visible).

  • Initializes the resource fields (for example, background_pixel) by using the resource lists specified for this class and all superclasses.

  • If the parent is a subclass of constraintWidgetClass, it initializes the resource fields of the constraints record by using the constraint resource list specified for the parent’s class and all superclasses up to constraintWidgetClass.

  • Calls the initialize procedures for the widget by starting at the Core initialize procedure on down to the widget’s initialize procedure.

  • If the parent is a subclass of compositeWidgetClass, it puts the widget into its parent’s children list by calling its parent’s insert_child procedure. For further information, see Section 3.5.

  • If the parent is a subclass of constraintWidgetClass, it calls the constraint initialize procedures, starting at constraintWidgetClass on down to the parent’s constraint initialize procedure.

Note that you can determine the number of arguments in an argument list by using the XtNumber macro. For further information, see Section 11.1.

The XtCreateManagedWidget function is a convenience routine that calls XtCreateWidget and XtManageChild.

The XtDestroyWidget function provides the only method of destroying a widget, including widgets that need to destroy themselves. It can be called at any time, including from an application callback routine of the widget being destroyed. This requires a two-phase destroy process in order to avoid dangling references to destroyed widgets.

In phase one, XtDestroyWidget performs the following:

  • If the being_destroyed field of the widget is True, it returns immediately.

  • Recursively descends the widget tree and sets the being_destroyed field to True for the widget and all children.

  • Adds the widget to a list of widgets (the destroy list) that should be destroyed when it is safe to do so.

Entries on the destroy list satisfy the invariant that if w2 occurs after w1 on the destroy list then w2 is not a descendent of w1. (A descendant refers to both normal and pop-up children.)

Phase two occurs when all procedures that should execute as a result of the current event have been called (including all procedures registered with the event and translation managers), that is, when the current invocation of XtDispatchEvent is about to return or immediately if not in XtDispatchEvent.

In phase two, XtDestroyWidget performs the following on each entry in the destroy list:

  • Calls the destroy callback procedures registered on the widget (and all descendants) in post-order (it calls children callbacks before parent callbacks).

  • If the widget’s parent is a subclass of compositeWidgetClass and if the parent is not being destroyed, it calls XtUnmanageChild on the widget and then calls the widget’s parent’s delete_child procedure (see Section 3.4).

  • If the widget’s parent is a subclass of constraintWidgetClass, it calls the constraint destroy procedure for the parent, then the parent’s superclass, until finally it calls the constraint destroy procedure for constraintWidgetClass.

  • Calls the destroy methods for the widget (and all descendants) in post-order. For each such widget, it calls the destroy procedure declared in the widget class, then the destroy procedure declared in its superclass, until finally it calls the destroy procedure declared in the Core class record.

  • Calls XDestroyWindow if the widget is realized (that is, has an X window). The server recursively destroys all descendant windows.

  • Recursively descends the tree and deallocates all pop-up widgets, constraint records, callback lists and, if the widget is a subclass of compositeWidgetClass, children.

SEE ALSO

XtAppCreateShell(3), XtCreatePopupShell(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2506 - Linux cli command log10l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command log10l and provides detailed information about the command log10l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the log10l.

NAME 🖥️ log10l 🖥️

base-10 logarithmic function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double log10(double x);
float log10f(float x);
long double log10l(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

log10f(), log10l():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the base-10 logarithm of x.

RETURN VALUE

On success, these functions return the base-10 logarithm of x.

For special cases, including where x is 0, 1, negative, infinity, or NaN, see log(3).

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

For a discussion of the errors that can occur for these functions, see log(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

log10(), log10f(), log10l()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

SEE ALSO

cbrt(3), clog10(3), exp10(3), log(3), log2(3), sqrt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2507 - Linux cli command ruserok_af

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ruserok_af and provides detailed information about the command ruserok_af, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ruserok_af.

NAME 🖥️ ruserok_af 🖥️

routines for returning a stream to a remote command

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h> /* Or <unistd.h> on some systems */
int rcmd(char **restrict ahost, unsigned short inport,
 const char *restrict locuser,
 const char *restrict remuser,
 const char *restrict cmd, int *restrict fd2p);
int rresvport(int *port);
int iruserok(uint32_t raddr, int superuser,
 const char *ruser, const char *luser);
int ruserok(const char *rhost, int superuser,
 const char *ruser, const char *luser);
int rcmd_af(char **restrict ahost, unsigned short inport,
 const char *restrict locuser,
 const char *restrict remuser,
 const char *restrict cmd, int *restrict fd2p,
 sa_family_t af);
int rresvport_af(int *port, sa_family_t af);
int iruserok_af(const void *restrict raddr, int superuser,
 const char *restrict ruser, const char *restrict luser,
 sa_family_t af);
int ruserok_af(const char *rhost, int superuser,
 const char *ruser, const char *luser,
 sa_family_t af);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

rcmd(), rcmd_af(), rresvport(), rresvport_af(), iruserok(), iruserok_af(), ruserok(), ruserok_af():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The rcmd() function is used by the superuser to execute a command on a remote machine using an authentication scheme based on privileged port numbers. The rresvport() function returns a file descriptor to a socket with an address in the privileged port space. The iruserok() and ruserok() functions are used by servers to authenticate clients requesting service with rcmd(). All four functions are used by the rshd(8) server (among others).

rcmd()

The rcmd() function looks up the host *ahost using gethostbyname(3), returning -1 if the host does not exist. Otherwise, *ahost is set to the standard name of the host and a connection is established to a server residing at the well-known Internet port inport.

If the connection succeeds, a socket in the Internet domain of type SOCK_STREAM is returned to the caller, and given to the remote command as stdin and stdout. If fd2p is nonzero, then an auxiliary channel to a control process will be set up, and a file descriptor for it will be placed in *fd2p. The control process will return diagnostic output from the command (unit 2) on this channel, and will also accept bytes on this channel as being UNIX signal numbers, to be forwarded to the process group of the command. If fd2p is 0, then the stderr (unit 2 of the remote command) will be made the same as the stdout and no provision is made for sending arbitrary signals to the remote process, although you may be able to get its attention by using out-of-band data.

The protocol is described in detail in rshd(8).

rresvport()

The rresvport() function is used to obtain a socket with a privileged port bound to it. This socket is suitable for use by rcmd() and several other functions. Privileged ports are those in the range 0 to 1023. Only a privileged process (on Linux, a process that has the CAP_NET_BIND_SERVICE capability in the user namespace governing its network namespace) is allowed to bind to a privileged port. In the glibc implementation, this function restricts its search to the ports from 512 to 1023. The port argument is value-result: the value it supplies to the call is used as the starting point for a circular search of the port range; on (successful) return, it contains the port number that was bound to.

iruserok() and ruserok()

The iruserok() and ruserok() functions take a remote host’s IP address or name, respectively, two usernames and a flag indicating whether the local user’s name is that of the superuser. Then, if the user is not the superuser, it checks the /etc/hosts.equiv file. If that lookup is not done, or is unsuccessful, the .rhosts in the local user’s home directory is checked to see if the request for service is allowed.

If this file does not exist, is not a regular file, is owned by anyone other than the user or the superuser, is writable by anyone other than the owner, or is hardlinked anywhere, the check automatically fails. Zero is returned if the machine name is listed in the hosts.equiv file, or the host and remote username are found in the .rhosts file; otherwise iruserok() and ruserok() return -1. If the local domain (as obtained from gethostname(2)) is the same as the remote domain, only the machine name need be specified.

If the IP address of the remote host is known, iruserok() should be used in preference to ruserok(), as it does not require trusting the DNS server for the remote host’s domain.

*_af() variants

All of the functions described above work with IPv4 (AF_INET) sockets. The “_af” variants take an extra argument that allows the socket address family to be specified. For these functions, the af argument can be specified as AF_INET or AF_INET6. In addition, rcmd_af() supports the use of AF_UNSPEC.

RETURN VALUE

The rcmd() function returns a valid socket descriptor on success. It returns -1 on error and prints a diagnostic message on the standard error.

The rresvport() function returns a valid, bound socket descriptor on success. On failure, it returns -1 and sets errno to indicate the error. The error code EAGAIN is overloaded to mean: “All network ports in use”.

For information on the return from ruserok() and iruserok(), see above.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

rcmd(), rcmd_af()

Thread safetyMT-Unsafe

rresvport(), rresvport_af()

Thread safetyMT-Safe

iruserok(), ruserok(), iruserok_af(), ruserok_af()

Thread safetyMT-Safe locale

STANDARDS

BSD.

HISTORY

iruserok_af()
rcmd_af()
rresvport_af()
ruserok_af()
glibc 2.2.

Solaris, 4.2BSD. The “_af” variants are more recent additions, and are not present on as wide a range of systems.

BUGS

iruserok() and iruserok_af() are declared in glibc headers only since glibc 2.12.

SEE ALSO

rlogin(1), rsh(1), rexec(3), rexecd(8), rlogind(8), rshd(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2508 - Linux cli command XtVaCreatePopupShell

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtVaCreatePopupShell and provides detailed information about the command XtVaCreatePopupShell, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtVaCreatePopupShell.

NAME 🖥️ XtVaCreatePopupShell 🖥️

create a popup shell

SYNTAX

#include <X11/Intrinsic.h>

Widget XtCreatePopupShell(const char *name, WidgetClass widget_class, Widget parent, ArgList args, Cardinal num_args);

Widget XtVaCreatePopupShell(const char *name, WidgetClass widget_class, Widget parent, … );

ARGUMENTS

args
Specifies the argument list to override the resource defaults.

name
Specifies the text name for the created shell widget.

num_args
Specifies the number of arguments in the argument list.

parent
Specifies the parent widget.

widget_class
Specifies the widget class pointer for the created shell widget.


Specifies the variable argument list to override the resource defaults.

DESCRIPTION

The XtCreatePopupShell function ensures that the specified class is a subclass of Shell and, rather than using insert_child to attach the widget to the parent’s children list, attaches the shell to the parent’s pop-ups list directly.

A spring-loaded pop-up invoked from a translation table already must exist at the time that the translation is invoked, so the translation manager can find the shell by name. Pop-ups invoked in other ways can be created on-the-fly when the pop-up actually is needed. This delayed creation of the shell is particularly useful when you pop up an unspecified number of pop-ups. You can look to see if an appropriate unused shell (that is, not currently popped up) exists and create a new shell if needed.

SEE ALSO

XtCreateWidget(3), XtPopdown(3), XtPopup(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2509 - Linux cli command get_avphys_pages

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command get_avphys_pages and provides detailed information about the command get_avphys_pages, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the get_avphys_pages.

NAME 🖥️ get_avphys_pages 🖥️

get total and available physical page counts

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/sysinfo.h>
long get_phys_pages(void);
long get_avphys_pages(void);

DESCRIPTION

The function get_phys_pages() returns the total number of physical pages of memory available on the system.

The function get_avphys_pages() returns the number of currently available physical pages of memory on the system.

RETURN VALUE

On success, these functions return a nonnegative value as given in DESCRIPTION. On failure, they return -1 and set errno to indicate the error.

ERRORS

ENOSYS
The system could not provide the required information (possibly because the /proc filesystem was not mounted).

STANDARDS

GNU.

HISTORY

Before glibc 2.23, these functions obtained the required information by scanning the MemTotal and MemFree fields of /proc/meminfo. Since glibc 2.23, these functions obtain the required information by calling sysinfo(2).

NOTES

The following sysconf(3) calls provide a portable means of obtaining the same information as the functions described on this page.

total_pages = sysconf(_SC_PHYS_PAGES);    /* total pages */
avl_pages = sysconf(_SC_AVPHYS_PAGES);    /* available pages */

EXAMPLES

The following example shows how get_phys_pages() and get_avphys_pages() can be used.

#include <stdio.h>
#include <stdlib.h>
#include <sys/sysinfo.h>
int
main(void)
{
    printf("This system has %ld pages of physical memory and "
            "%ld pages of physical memory available.

“, get_phys_pages(), get_avphys_pages()); exit(EXIT_SUCCESS); }

SEE ALSO

sysconf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2510 - Linux cli command grantpt

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command grantpt and provides detailed information about the command grantpt, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the grantpt.

NAME 🖥️ grantpt 🖥️

grant access to the slave pseudoterminal

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int grantpt(int fd);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

grantpt():

    Since glibc 2.24:
        _XOPEN_SOURCE >= 500
    glibc 2.23 and earlier:
        _XOPEN_SOURCE

DESCRIPTION

The grantpt() function changes the mode and owner of the slave pseudoterminal device corresponding to the master pseudoterminal referred to by the file descriptor fd. The user ID of the slave is set to the real UID of the calling process. The group ID is set to an unspecified value (e.g., tty). The mode of the slave is set to 0620 (crw–w—-).

The behavior of grantpt() is unspecified if a signal handler is installed to catch SIGCHLD signals.

RETURN VALUE

When successful, grantpt() returns 0. Otherwise, it returns -1 and sets errno to indicate the error.

ERRORS

EACCES
The corresponding slave pseudoterminal could not be accessed.

EBADF
The fd argument is not a valid open file descriptor.

EINVAL
The fd argument is valid but not associated with a master pseudoterminal.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

grantpt()

Thread safetyMT-Safe locale

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.1. POSIX.1-2001.

This is part of the UNIX 98 pseudoterminal support, see pts(4).

Historical systems implemented this function via a set-user-ID helper binary called “pt_chown”. glibc on Linux before glibc 2.33 could do so as well, in order to support configurations with only BSD pseudoterminals; this support has been removed. On modern systems this is either a no-op —with permissions configured on pty allocation, as is the case on Linux— or an ioctl(2).

SEE ALSO

open(2), posix_openpt(3), ptsname(3), unlockpt(3), pts(4), pty(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2511 - Linux cli command Image_ExifTool_Unknownpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Unknownpm and provides detailed information about the command Image_ExifTool_Unknownpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Unknownpm.

NAME 🖥️ Image_ExifTool_Unknownpm 🖥️

Unknown EXIF maker notes tags

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

Image::ExifTool has definitions for the maker notes from many manufacturers, however information can sometimes be extracted from unknown manufacturers if the maker notes are in standard IFD format. This module contains the definitions necessary for Image::ExifTool to read the maker notes from unknown manufacturers.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

“Unknown Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2512 - Linux cli command Tk_Mwmpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Mwmpm and provides detailed information about the command Tk_Mwmpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Mwmpm.

NAME 🖥️ Tk_Mwmpm 🖥️

Communicate with the Motif(tm) window manager.

SYNOPSIS

use Tk::Mwm;

$toplevel->mwmOption?(args)?

$toplevel->mwm(option ?,args?)

DESCRIPTION

Interface to special extentions supported by mwm.

METHODS

$toplevel->mwmDecoration?(?option??=>value? ?,…?)?
When no options are given, this method returns the values of all the decorations options for the toplevel window with the $toplevel. When only one option is given without specifying the value, the current value of that option is returned. When more than one “option-value” pairs are passed to this method, the specified values will be assigned to the corresponding options. As a result, the appearance of the Motif decorations around the toplevel window will be changed. Possible options are: -border, -menu, -maximize, -minimize, -resizeh and -title. The value must be a Boolean value. The values returned by this command are undefined when the window is not managed by mwm.

$toplevel->mwmIsmwmrunning
This returns value is true if mwm is running on the screen where the specified window is located, false otherwise.

$toplevel->mwmProtocol
When no additional options are given, this method returns all protocols associated with this toplevel window.

$toplevel->mwmProtocol(activate => protocol_name)
Activate the mwm protocol message in mwm’s menu.

$toplevel->MwmProtocol(add => protocol_name, menu_message)
Add a new mwm protocol message for this toplevel window. The message is identified by the string name specified in protocol_name. A menu item will be added into mwm’s menu as specified by menu_message. Once a new mwm protocol message is added to a toplevel, it can be caught by the TK protocol method. Here is an example: $toplevel->mwmProtocol(‘add’ => ‘MY_PRINT_HELLO’, ‘“Print Hello” _H Ctrl<Key>H’); $toplevel->protocol(‘MY_PRINT_HELLO’ => sub {print “Hello”});

$toplevel->mwmProtocol(‘deactivate’ => protocol_name)
Deactivate the mwm protocol message in mwm’s menu.

$toplevel->mwmProtocol(‘delete’ => protocol_name)
Delete the mwm protocol message from mwm’s menu. Please note that the window manager protocol handler associated with this protocol (by the protocol method) is not deleted automatically. You have to delete the protocol handle explicitly. E.g.: $mw->mwmProtocol(‘delete’ => ‘MY_PRINT_HELLO’); $mw->protocol(‘MY_PRINT_HELLO’ => ‘’);

BUGS

This is a Tix extension which perl/Tk has adopted. It has not been tested as perl/Tk’s author has not got round to installing a Motif Window Manager.

On some versions of mwm, the -border will not disappear unless -resizeh is turned off. Also, the -title will not disappear unless all of -title, -menu, -maximize and -minimize are turned off.

SEE ALSO

Tk::Wm Tk::tixWm Tk::Toplevel

KEYWORDS

window manager, mwm, TIX

AUTHOR

Ioi Kim Lam - [email protected]

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2513 - Linux cli command wcsnlen

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcsnlen and provides detailed information about the command wcsnlen, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcsnlen.

NAME 🖥️ wcsnlen 🖥️

determine the length of a fixed-size wide-character string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
size_t wcsnlen(const wchar_t s[.maxlen], size_t maxlen);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

wcsnlen():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The wcsnlen() function is the wide-character equivalent of the strnlen(3) function. It returns the number of wide-characters in the string pointed to by s, not including the terminating null wide character (L’�’), but at most maxlen wide characters (note: this parameter is not a byte count). In doing this, wcsnlen() looks at only the first maxlen wide characters at s and never beyond s[maxlen-1].

RETURN VALUE

The wcsnlen() function returns wcslen(s), if that is less than maxlen, or maxlen if there is no null wide character among the first maxlen wide characters pointed to by s.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcsnlen()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.1.

SEE ALSO

strnlen(3), wcslen(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2514 - Linux cli command xdr_u_long

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_u_long and provides detailed information about the command xdr_u_long, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_u_long.

NAME 🖥️ xdr_u_long 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2515 - Linux cli command pcap_open_dead_with_tstamp_precisionpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_open_dead_with_tstamp_precisionpcap and provides detailed information about the command pcap_open_dead_with_tstamp_precisionpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_open_dead_with_tstamp_precisionpcap.

NAME 🖥️ pcap_open_dead_with_tstamp_precisionpcap 🖥️

open a fake pcap_t for compiling filters or opening a capture for output

SYNOPSIS

#include <pcap/pcap.h>
pcap_t *pcap_open_dead(int linktype, int snaplen);
pcap_t *pcap_open_dead_with_tstamp_precision(int linktype, int snaplen,
    u_int precision);

DESCRIPTION

pcap_open_dead() and pcap_open_dead_with_tstamp_precision() are used for creating a pcap_t structure to use when calling the other functions in libpcap. It is typically used when just using libpcap for compiling BPF code; it can also be used if using pcap_dump_open(3PCAP), pcap_dump(3PCAP), and pcap_dump_close(3PCAP) to write a savefile if there is no pcap_t that supplies the packets to be written.

linktype specifies the link-layer type for the pcap_t.

snaplen specifies the snapshot length for the pcap_t.

When pcap_open_dead_with_tstamp_precision(), is used to create a pcap_t for use with pcap_dump_open(), precision specifies the time stamp precision for packets; PCAP_TSTAMP_PRECISION_MICRO should be specified if the packets to be written have time stamps in seconds and microseconds, and PCAP_TSTAMP_PRECISION_NANO should be specified if the packets to be written have time stamps in seconds and nanoseconds. Its value does not affect pcap_compile(3PCAP).

BACKWARD COMPATIBILITY

The pcap_open_dead_with_tstamp_precision() function became available in libpcap release 1.5.1. In previous releases, there was no mechanism to open a savefile for writing with time stamps given in seconds and nanoseconds.

SEE ALSO

pcap(3PCAP), pcap-linktype(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2516 - Linux cli command setjmp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setjmp and provides detailed information about the command setjmp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setjmp.

NAME 🖥️ setjmp 🖥️

performing a nonlocal goto

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <setjmp.h>
int setjmp(jmp_buf env);
int sigsetjmp(sigjmp_buf env, int savesigs);
[[noreturn]] void longjmp(jmp_buf env, int val);
[[noreturn]] void siglongjmp(sigjmp_buf env, int val);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

setjmp(): see NOTES.

sigsetjmp():

    _POSIX_C_SOURCE

DESCRIPTION

The functions described on this page are used for performing “nonlocal gotos”: transferring execution from one function to a predetermined location in another function. The setjmp() function dynamically establishes the target to which control will later be transferred, and longjmp() performs the transfer of execution.

The setjmp() function saves various information about the calling environment (typically, the stack pointer, the instruction pointer, possibly the values of other registers and the signal mask) in the buffer env for later use by longjmp(). In this case, setjmp() returns 0.

The longjmp() function uses the information saved in env to transfer control back to the point where setjmp() was called and to restore (“rewind”) the stack to its state at the time of the setjmp() call. In addition, and depending on the implementation (see NOTES), the values of some other registers and the process signal mask may be restored to their state at the time of the setjmp() call.

Following a successful longjmp(), execution continues as if setjmp() had returned for a second time. This “fake” return can be distinguished from a true setjmp() call because the “fake” return returns the value provided in val. If the programmer mistakenly passes the value 0 in val, the “fake” return will instead return 1.

sigsetjmp() and siglongjmp()

sigsetjmp() and siglongjmp() also perform nonlocal gotos, but provide predictable handling of the process signal mask.

If, and only if, the savesigs argument provided to sigsetjmp() is nonzero, the process’s current signal mask is saved in env and will be restored if a siglongjmp() is later performed with this env.

RETURN VALUE

setjmp() and sigsetjmp() return 0 when called directly; on the “fake” return that occurs after longjmp() or siglongjmp(), the nonzero value specified in val is returned.

The longjmp() or siglongjmp() functions do not return.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setjmp(), sigsetjmp()

Thread safetyMT-Safe

longjmp(), siglongjmp()

Thread safetyMT-Safe

STANDARDS

setjmp()
longjmp()
C11, POSIX.1-2008.

sigsetjmp()
siglongjmp()
POSIX.1-2008.

HISTORY

setjmp()
longjmp()
POSIX.1-2001, C89.

sigsetjmp()
siglongjmp()
POSIX.1-2001.

POSIX does not specify whether setjmp() will save the signal mask (to be later restored during longjmp()). In System V it will not. In 4.3BSD it will, and there is a function _setjmp() that will not. The behavior under Linux depends on the glibc version and the setting of feature test macros. Before glibc 2.19, setjmp() follows the System V behavior by default, but the BSD behavior is provided if the _BSD_SOURCE feature test macro is explicitly defined and none of _POSIX_SOURCE, _POSIX_C_SOURCE, _XOPEN_SOURCE, _GNU_SOURCE, or _SVID_SOURCE is defined. Since glibc 2.19, <setjmp.h> exposes only the System V version of setjmp(). Programs that need the BSD semantics should replace calls to setjmp() with calls to sigsetjmp() with a nonzero savesigs argument.

NOTES

setjmp() and longjmp() can be useful for dealing with errors inside deeply nested function calls or to allow a signal handler to pass control to a specific point in the program, rather than returning to the point where the handler interrupted the main program. In the latter case, if you want to portably save and restore signal masks, use sigsetjmp() and siglongjmp(). See also the discussion of program readability below.

CAVEATS

The compiler may optimize variables into registers, and longjmp() may restore the values of other registers in addition to the stack pointer and program counter. Consequently, the values of automatic variables are unspecified after a call to longjmp() if they meet all the following criteria:

  • they are local to the function that made the corresponding setjmp() call;

  • their values are changed between the calls to setjmp() and longjmp(); and

  • they are not declared as volatile.

Analogous remarks apply for siglongjmp().

Nonlocal gotos and program readability

While it can be abused, the traditional C “goto” statement at least has the benefit that lexical cues (the goto statement and the target label) allow the programmer to easily perceive the flow of control. Nonlocal gotos provide no such cues: multiple setjmp() calls might employ the same jmp_buf variable so that the content of the variable may change over the lifetime of the application. Consequently, the programmer may be forced to perform detailed reading of the code to determine the dynamic target of a particular longjmp() call. (To make the programmer’s life easier, each setjmp() call should employ a unique jmp_buf variable.)

Adding further difficulty, the setjmp() and longjmp() calls may not even be in the same source code module.

In summary, nonlocal gotos can make programs harder to understand and maintain, and an alternative should be used if possible.

Undefined Behavior

If the function which called setjmp() returns before longjmp() is called, the behavior is undefined. Some kind of subtle or unsubtle chaos is sure to result.

If, in a multithreaded program, a longjmp() call employs an env buffer that was initialized by a call to setjmp() in a different thread, the behavior is undefined.

POSIX.1-2008 Technical Corrigendum 2 adds longjmp() and siglongjmp() to the list of async-signal-safe functions. However, the standard recommends avoiding the use of these functions from signal handlers and goes on to point out that if these functions are called from a signal handler that interrupted a call to a non-async-signal-safe function (or some equivalent, such as the steps equivalent to exit(3) that occur upon a return from the initial call to main()), the behavior is undefined if the program subsequently makes a call to a non-async-signal-safe function. The only way of avoiding undefined behavior is to ensure one of the following:

  • After long jumping from the signal handler, the program does not call any non-async-signal-safe functions and does not return from the initial call to main().

  • Any signal whose handler performs a long jump must be blocked during every call to a non-async-signal-safe function and no non-async-signal-safe functions are called after returning from the initial call to main().

SEE ALSO

signal(7), signal-safety(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2517 - Linux cli command Net_DBus_ASyncReplypm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_ASyncReplypm and provides detailed information about the command Net_DBus_ASyncReplypm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_ASyncReplypm.

NAME 🖥️ Net_DBus_ASyncReplypm 🖥️

asynchronous method reply handler

SYNOPSIS

use Net::DBus::Annotation qw(:call); my $object = $service->get_object("/org/example/systemMonitor"); # List processes & get on with other work until # the list is returned. my $asyncreply = $object->list_processes(dbus_call_async, “someuser”); while (!$asyncreply->is_ready) { … do some background work.. } my $processes = $asyncreply->get_result;

DESCRIPTION

This object provides a handler for receiving asynchronous method replies. An asynchronous reply object is generated when making remote method call with the dbus_call_async annotation set.

METHODS

$asyncreply->discard_result;
Indicates that the caller is no longer interested in receiving the reply & that it should be discarded. After calling this method, this object should not be used again.

$asyncreply->wait_for_result;
Blocks the caller waiting for completion of the of the asynchronous reply. Upon returning from this method, the result can be obtained with the get_result method.

my $boolean = $asyncreply->is_ready;
Returns a true value if the asynchronous reply is now complete (or a timeout has occurred). When this method returns true, the result can be obtained with the get_result method.

$asyncreply->set_notify($coderef);
Sets a notify function which will be invoked when the asynchronous reply finally completes. The callback will be invoked with a single parameter which is this object.

my @data = $asyncreply->get_result;
Retrieves the data associated with the asynchronous reply. If a timeout occurred, then this method will throw an exception. This method can only be called once the reply is complete, as indicated by the is_ready method returning a true value. After calling this method, this object should no longer be used.

AUTHOR

Daniel Berrange <[email protected]>

COPYRIGHT

Copright (C) 2006-2011, Daniel Berrange.

SEE ALSO

Net::DBus, Net::DBus::RemoteObject, Net::DBus::Annotation

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2518 - Linux cli command Tk_Treepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Treepm and provides detailed information about the command Tk_Treepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Treepm.

NAME 🖥️ Tk_Treepm 🖥️

Create and manipulate Tree widgets

SYNOPSIS

use Tk::Tree;

$tree = $parent->Tree(?options?);

SUPER-CLASS

The Tree class is derived from the HList class and inherits all the methods, options and subwidgets of its super-class. A Tree widget is not scrolled by default.

STANDARD OPTIONS

Tree supports all the standard options of an HList widget. See Tk::options for details on the standard options.

WIDGET-SPECIFIC OPTIONS

Name: browseCmd

Class: BrowseCmd

Switch: -browsecmd

Specifies a callback to call whenever the user browses on an entry (usually by single-clicking on the entry). The callback is called with one argument, the pathname of the entry.

Name: closeCmd

Class: CloseCmd

Switch: -closecmd

Specifies a callback to call whenever an entry needs to be closed (See “BINDINGS” below). This method is called with one argument, the pathname of the entry. This method should perform appropriate actions to close the specified entry. If the -closecmd option is not specified, the default closing action is to hide all child entries of the specified entry.

Name: command

Class: Command

Switch: -command

Specifies a callback to call whenever the user activates an entry (usually by double-clicking on the entry). The callback is called with one argument, the pathname of the entry.

Name: ignoreInvoke

Class: IgnoreInvoke

Switch: -ignoreinvoke

A Boolean value that specifies when a branch should be opened or closed. A branch will always be opened or closed when the user presses the (+) and (-) indicators. However, when the user invokes a branch (by doublc-clicking or pressing <Return>), the branch will be opened or closed only if -ignoreinvoke is set to false (the default setting).

Name: openCmd

Class: OpenCmd

Switch: -opencmd

Specifies a callback to call whenever an entry needs to be opened (See “BINDINGS” below). This method is called with one argument, the pathname of the entry. This method should perform appropriate actions to open the specified entry. If the -opencmd option is not specified, the default opening action is to show all the child entries of the specified entry.

DESCRIPTION

The Tree method creates a new window and makes it into a Tree widget and return a reference to it. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the Tree widget such as its cursor and relief.

The Tree widget can be used to display hierarchical data in a tree form. The user can adjust the view of the tree by opening or closing parts of the tree.

To display a static tree structure, you can add the entries into the Tree widget and hide any entries as desired. Then you can call the autosetmode method. This will set up the Tree widget so that it handles all the open and close events automatically. the demonstration program Tixish/examples/perl-tix-tree).

The above method is not applicable if you want to maintain a dynamic tree structure, i.e, you do not know all the entries in the tree and you need to add or delete entries subsequently. To do this, you should first create the entries in the Tree widget. Then, use the setmode method to indicate the entries that can be opened or closed, and use the -opencmd and -closecmd options to handle the opening and closing events. (Please see the demonstration program Tixish/examples/perl-tix-dyntree).

Use either

$parent->Scrolled(‘Tree’, … );

or

$parent->ScrlTree( … );

to create a scrolled Tree. See Tk::Scrolled for details.

WIDGET METHODS

The Tree method creates a widget object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class.

The following additional methods are available for Tree widgets:

$tree->add_pathimage(treeRegExp [, openImg, closeImg])
This method defines images for a given path (images must be in xpm format). The path can be determined by a simplified regular expression. There are just three metasymbols:

^
at the beginning of the treeRegExp same as in Perl regular expressions

  • anything

$
at the end of the TreeRegExp, the same as in Perl regular expressions

Examples: $tree->add_pathimage(^root,openfolder,folder); matches root, root.foo, root.bar, but not foo.root $tree->add_pathimage(root.*.class,openfolder,folder); matches all paths containing root.<anything>.class, but not root.<anything>.<anything>.class * is one part of the path. If you want to use a wildcard for two steps, you have to use *.*. $tree->add_pathimage(class$,openfolder,folder); This matches all path with class at the end.

$tree->autosetmode
This method calls the setmode method for all the entries in this Tree widget: if an entry has no child entries, its mode is set to none. Otherwise, if the entry has any hidden child entries, its mode is set to open; otherwise its mode is set to close.

$tree->child_entries([$path][,$depth])
This method returns in list context an array that contains all pathnames of subentries within the given path. In scalar context it returns the number of subentries in the given path. Example: root | foo | bar | | bar1 | | bar2 my @childentries = $tree->child_entries(root.bar); # returns (root.bar.bar1, root.bar.bar2) my $nr_of_subentries = $tree->child_entries(root,2); # returns 4 If $path is omitted, all it is assumed, that the entry above ‘root’ is meant. $depth defines the numbers of levels.

$tree->close(entryPath)
Close the entry given by entryPath if its mode is close.

$tree->getmode(entryPath)
Returns the current mode of the entry given by entryPath.

$tree->open(entryPath)
Open the entry given by entryPath if its mode is open.

$tree->setmode(entryPath, mode)
This method is used to indicate whether the entry given by entryPath has children entries and whether the children are visible. mode must be one of open, close or none. If mode is set to open, a (+) indicator is drawn next to the entry. If mode is set to close, a (-) indicator is drawn next to the entry. If mode is set to none, no indicators will be drawn for this entry. The default mode is none. The open mode indicates the entry has hidden children and this entry can be opened by the user. The close mode indicates that all the children of the entry are now visible and the entry can be closed by the user.

BINDINGS

The basic mouse and keyboard bindings of the Tree widget are the same as the bindings of the HList widget. In addition, the entries can be opened or closed under the following conditions:

[1]
If the mode of the entry is open, it can be opened by clicking on its (+) indicator.

[2]
If the mode of the entry is close, it can be closed by clicking on its (-) indicator.

SEE ALSO

Tk::HList

AUTHOR

Perl/TK version by Chris Dean <[email protected]>. Original Tcl/Tix version by Ioi Kim Lam.

Additions by Renee Baecker <[email protected]>

ACKNOWLEDGEMENTS

Thanks to Achim Bohnet <[email protected]> for all his help.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2519 - Linux cli command XML_PatAct_ToObjectspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_PatAct_ToObjectspm and provides detailed information about the command XML_PatAct_ToObjectspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_PatAct_ToObjectspm.

NAME 🖥️ XML_PatAct_ToObjectspm 🖥️

An action module for creating Perl objects

SYNOPSIS

use XML::PatAct::ToObjects; my $patterns = [ PATTERN => [ OPTIONS ], PATTERN => “PERL-CODE”, … ]; my $matcher = XML::PatAct::ToObjects->new( Patterns => $patterns, Matcher => $matcher, CopyId => 1, CopyAttributes => 1 );

DESCRIPTION

XML::PatAct::ToObjects is a PerlSAX handler for applying pattern-action lists to XML parses or trees. XML::PatAct::ToObjects creates Perl objects of the types and contents of the action items you define.

New XML::PatAct::ToObject instances are creating by calling `new()’. Parameters can be passed as a list of key, value pairs or a hash. `new()’ requires the Patterns and Matcher parameters, the rest are optional:

Patterns
The pattern-action list to apply.

Matcher
An instance of the pattern or query matching module.

CopyId
Causes the `ID’ attribute, if any, in a source XML element to be copied to an `ID’ attribute in newly created objects. Note that IDs may be lost of no pattern matches that element or an object is not created (-make) for that element.

CopyAttributes
Causes all attributes of the element to be copied to the newly created objects.

Each action can either be a list of options defined below or a string containing a fragment of Perl code. If the action is a string of Perl code then simple then some simple substitutions are made as described further below.

Options that can be used in an action item containing an option-list:

-holder
Ignore this element, but continue processing it’s children (compare to -ignore). -pcdata may be used with this option.

-ignore
Ignore (discard) this element and it’s children (compare to -holder).

-pcdata
Character data in this element should be copied to the Contents field.

-make PACKAGE
Create an object blessed into PACKAGE, and continue processing this element and it’s children. PACKAGE may be the type `HASH’ to simply create an anonyous hash.

-args ARGUMENTS
Use ARGUMENTS in creating the object specified by -make. This is commonly used to copy element attributes into fields in the newly created object. For example: -make => HASH, -args => URL => %{href} would copy the `href’ attribute in an element to the `URL’ field of the newly created hash.

-field FIELD
Store this element, object, or children of this element in the parent object’s field named by FIELD.

-push-field FIELD
Similar to -field, except that FIELD is an array and the contents are pushed onto that array.

-value VALUE
Use VALUE as a literal value to store in FIELD, otherwise ignoring this element and it’s children. Only valid with -field or -push-field. `%{ATTRIBUTE}’ notation can be used to substitute the value of an attribute into the literal value.

-as-string
Convert the contents of this element to a string (as in XML::Grove::AsString) and store in FIELD. Only valid with -field or -push-field.

-grove
Copy this element to FIELD without further processing. The element can then be processed later as the Perl objects are manipulated. Only valid with -field or -push-field. If ToObjects is used with PerlSAX, this will use XML::Grove::Builder to build the grove element.

-grove-contents
Used with -make, -grove-contents creates an object but then takes all of the content of that element and stores it in Contents.

If an action item is a string, that string is treated as a fragment of Perl code. The following simple substitutions are performed on the fragment to provide easy access to the information being converted:

@ELEM@
The object that caused this action to be called. If ToObjects is used with PerlSAX this will be a hash with the element name and attributes, with XML::Grove this will be the element object, with Data::Grove it will be the matching object, and with XML::DOM it will be an XML::DOM::Element.

EXAMPLE

The example pattern-action list below will convert the following XML representing a Database schema:

<schema> <table> <name>MyTable</name> <summary>A short summary</summary> <description>A long description that may contain a subset of HTML</description> <column> <name>MyColumn1</name> <summary>A short summary</summary> <description>A long description</description> <unique/> <non-null/> <default>42</default> </column> </table> </schema>

into Perl objects looking like:

[ { Name => “MyTable”, Summary => “A short summary”, Description => $grove_object, Columns => [ { Name => “MyColumn1”, Summary => “A short summary”, Description => $grove_object, Unique => 1, NonNull => 1, Default => 42 } ] } ]

Here is a Perl script and pattern-action list that will perform the conversion using the simple name matching pattern module XML::PatAct::MatchName. The script accepts a Schema XML file as an argument ($ARGV[0]) to the script. This script creates a grove as one of it’s objects, so it requires the XML::Grove module.

use XML::Parser::PerlSAX; use XML::PatAct::MatchName; use XML::PatAct::ToObjects; my $patterns = [ schema => [ qw{ -holder } ], table => [ qw{ -make Schema::Table } ], name => [ qw{ -field Name -as-string } ], summary => [ qw{ -field Summary -as-string } ], description => [ qw{ -field Description -grove } ], column => [ qw{ -make Schema::Column -push-field Columns } ], unique => [ qw{ -field Unique -value 1 } ], non-null => [ qw{ -field NonNull -value 1 } ], default => [ qw{ -field Default -as-string } ], ]; my $matcher = XML::PatAct::MatchName->new( Patterns => $patterns ); my $handler = XML::PatAct::ToObjects->new( Patterns => $patterns, Matcher => $matcher); my $parser = XML::Parser::PerlSAX->new( Handler => $handler ); my $schema = $parser->parse(Source => { SystemId => $ARGV[0] } );

TODO

  • It’d be nice if patterns could be applied even in -as-string and -grove.

  • Implement Perl code actions.

  • -as-xml to write XML into the field.

AUTHOR

Ken MacLeod, [email protected]

SEE ALSO

perl (1), Data::Grove (3)

``Using PatAct Modules’’ and ``Creating PatAct Modules’’ in libxml-perl.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2520 - Linux cli command vfscanf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command vfscanf and provides detailed information about the command vfscanf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the vfscanf.

NAME 🖥️ vfscanf 🖥️

input FILE format conversion

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int scanf(const char *restrict format, ...);
int fscanf(FILE *restrict stream,
 const char *restrict format, ...);
#include <stdarg.h>
int vscanf(const char *restrict format, va_list ap);
int vfscanf(FILE *restrict stream,
 const char *restrict format, va_list ap);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

vscanf(), vfscanf():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The scanf() family of functions scans formatted input like sscanf(3), but read from a FILE. It is very difficult to use these functions correctly, and it is preferable to read entire lines with fgets(3) or getline(3) and parse them later with sscanf(3) or more specialized functions such as strtol(3).

The scanf() function reads input from the standard input stream stdin and fscanf() reads input from the stream pointer stream.

The vfscanf() function is analogous to vfprintf(3) and reads input from the stream pointer stream using a variable argument list of pointers (see stdarg(3). The vscanf() function is analogous to vprintf(3) and reads from the standard input.

RETURN VALUE

On success, these functions return the number of input items successfully matched and assigned; this can be fewer than provided for, or even zero, in the event of an early matching failure.

The value EOF is returned if the end of input is reached before either the first successful conversion or a matching failure occurs. EOF is also returned if a read error occurs, in which case the error indicator for the stream (see ferror(3)) is set, and errno is set to indicate the error.

ERRORS

EAGAIN
The file descriptor underlying stream is marked nonblocking, and the read operation would block.

EBADF
The file descriptor underlying stream is invalid, or not open for reading.

EILSEQ
Input byte sequence does not form a valid character.

EINTR
The read operation was interrupted by a signal; see signal(7).

EINVAL
Not enough arguments; or format is NULL.

ENOMEM
Out of memory.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

scanf(), fscanf(), vscanf(), vfscanf()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

CAVEATS

These functions make it difficult to distinguish newlines from other white space, This is especially problematic with line-buffered input, like the standard input stream.

These functions can’t report errors after the last non-suppressed conversion specification.

BUGS

It is impossible to accurately know how many characters these functions have consumed from the input stream, since they only report the number of successful conversions. For example, if the input is “123 a”, scanf("%d %d", &a, &b) will consume the digits, the newline, and the space, but not the letter a. This makes it difficult to recover from invalid input.

SEE ALSO

fgets(3), getline(3), sscanf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2521 - Linux cli command Image_ExifTool_Flashpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Flashpm and provides detailed information about the command Image_ExifTool_Flashpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Flashpm.

NAME 🖥️ Image_ExifTool_Flashpm 🖥️

Read Shockwave Flash meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read SWF (Shockwave Flash) and FLV (Flash Video) files.

NOTES

Flash Video AMF3 support has not yet been added because I haven’t yet found a FLV file containing AMF3 information. If someone sends me a sample then I will add AMF3 support.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.the-labs.com/MacromediaFlash/SWF-Spec/SWFfileformat.html>

<http://sswf.sourceforge.net/SWFalexref.html>

<http://osflash.org/flv/>

<http://www.irisa.fr/texmex/people/dufouil/ffmpegdoxy/flv_8h.html>

<http://help.adobe.com/en_US/FlashMediaServer/3.5_Deving/WS5b3ccc516d4fbf351e63e3d11a0773d56e-7ff6.html>

<http://www.adobe.com/devnet/swf/pdf/swf_file_format_spec_v9.pdf>

<http://www.adobe.com/devnet/flv/pdf/video_file_format_spec_v10.pdf>

SEE ALSO

“Flash Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2522 - Linux cli command MailToolspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command MailToolspm and provides detailed information about the command MailToolspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the MailToolspm.

NAME 🖥️ MailToolspm 🖥️

bundle of ancient email modules

SYNOPSIS

# This is a place-holder for the distribution

DESCRIPTION

MailTools is a bundle: an ancient form of combining packages into one distribution. Gladly, it can be distributed as if it is a normal distribution as well.

Be warned: The code you find here is very old. It works for simple emails, but when you start with new code then please use more sofisticated libraries. The main reason that you still find this code on CPAN, is because many books use it as example.

Component

In this distribution, you find

Mail::Address
Parse email address from a header line.

Mail::Cap
Interpret mailcap files: mappings of file-types to applications as used by many command-line email programs.

Mail::Field
Simplifies access to (some) email header fields. Used by Mail::Header.

Mail::Filter
Process Mail::Internet messages.

Mail::Header
Collection of Mail::Field objects, representing the header of a Mail::Internet object.

Mail::Internet
Represents a single email message, with header and body.

Mail::Mailer
Send Mail::Internet emails via direct smtp or local MTA’s.

Mail::Send
Build a Mail::Internet object, and then send it out using Mail::Mailer.

Mail::Util
“Smart functions” you should not depend on.

SEE ALSO

This module is part of the MailTools distribution, http://perl.overmeer.net/mailtools/.

AUTHORS

The MailTools bundle was developed by Graham Barr. Later, Mark Overmeer took over maintenance without commitment to further development.

Mail::Cap by Gisle Aas <[email protected]>. Mail::Field::AddrList by Peter Orbaek <[email protected]>. Mail::Mailer and Mail::Send by Tim Bunce <[email protected]>. For other contributors see ChangeLog.

LICENSE

Copyrights 1995-2000 Graham Barr <[email protected]> and 2001-2017 Mark Overmeer <[email protected]>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2523 - Linux cli command Net_DNS_RR_SOApm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_SOApm and provides detailed information about the command Net_DNS_RR_SOApm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_SOApm.

NAME 🖥️ Net_DNS_RR_SOApm 🖥️

DNS SOA resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name SOA mname rname 0 14400 3600 1814400 3600);

DESCRIPTION

Class for DNS Start of Authority (SOA) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

mname

$mname = $rr->mname; $rr->mname( $mname );

The domain name of the name server that was the original or primary source of data for this zone.

rname

$rname = $rr->rname; $rr->rname( $rname );

The mailbox which identifies the person responsible for maintaining this zone.

serial

$serial = $rr->serial; $serial = $rr->serial(value);

Unsigned 32 bit version number of the original copy of the zone. Zone transfers preserve this value.

RFC1982 defines a strict (irreflexive) partial ordering for zone serial numbers. The serial number will be incremented unless the replacement value argument satisfies the ordering constraint.

refresh

$refresh = $rr->refresh; $rr->refresh( $refresh );

A 32 bit time interval before the zone should be refreshed.

retry

$retry = $rr->retry; $rr->retry( $retry );

A 32 bit time interval that should elapse before a failed refresh should be retried.

expire

$expire = $rr->expire; $rr->expire( $expire );

A 32 bit time value that specifies the upper limit on the time interval that can elapse before the zone is no longer authoritative.

minimum

$minimum = $rr->minimum; $rr->minimum( $minimum );

The unsigned 32 bit minimum TTL field that should be exported with any RR from this zone.

Zone Serial Number Management

The internal logic of the serial() method offers support for several widely used zone serial numbering policies.

Strictly Sequential

$successor = $soa->serial( SEQUENTIAL );

The existing serial number is incremented modulo 2**32 because the value returned by the auxiliary SEQUENTIAL() function can never satisfy the serial number ordering constraint.

Date Encoded

$successor = $soa->serial( YYYYMMDDxx );

The 32 bit value returned by the auxiliary YYYYMMDDxx() function will be used if it satisfies the ordering constraint, otherwise the serial number will be incremented as above.

Serial number increments must be limited to 100 per day for the date information to remain useful.

Time Encoded

$successor = $soa->serial( UNIXTIME );

The 32 bit value returned by the auxiliary UNIXTIME() function will used if it satisfies the ordering constraint, otherwise the existing serial number will be incremented as above.

COPYRIGHT

Copyright (c)1997 Michael Fuhr.

Portions Copyright (c)2003 Chris Reinhardt.

Portions Copyright (c)2010,2012 Dick Franks.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC1035(3.3.13) <https://iana.org/go/rfc1035#section-3.3.13> RFC1982 <https://iana.org/go/rfc1982>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2524 - Linux cli command frexpl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command frexpl and provides detailed information about the command frexpl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the frexpl.

NAME 🖥️ frexpl 🖥️

convert floating-point number to fractional and integral components

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double frexp(double x, int *exp);
float frexpf(float x, int *exp);
long double frexpl(long double x, int *exp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

frexpf(), frexpl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions are used to split the number x into a normalized fraction and an exponent which is stored in exp.

RETURN VALUE

These functions return the normalized fraction. If the argument x is not zero, the normalized fraction is x times a power of two, and its absolute value is always in the range 1/2 (inclusive) to 1 (exclusive), that is, [0.5,1).

If x is zero, then the normalized fraction is zero and zero is stored in exp.

If x is a NaN, a NaN is returned, and the value of *exp is unspecified.

If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned, and the value of *exp is unspecified.

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

frexp(), frexpf(), frexpl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

EXAMPLES

The program below produces results such as the following:

$ ./a.out 2560
frexp(2560, &e) = 0.625: 0.625 * 2^12 = 2560
$ ./a.out -4
frexp(-4, &e) = -0.5: -0.5 * 2^3 = -4

Program source

#include <float.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
    double x, r;
    int exp;
    x = strtod(argv[1], NULL);
    r = frexp(x, &exp);
    printf("frexp(%g, &e) = %g: %g * %d^%d = %g

“, x, r, r, 2, exp, x); exit(EXIT_SUCCESS); }

SEE ALSO

ldexp(3), modf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2525 - Linux cli command Net_Server_Proto_UNIXpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Server_Proto_UNIXpm and provides detailed information about the command Net_Server_Proto_UNIXpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Server_Proto_UNIXpm.

NAME 🖥️ Net_Server_Proto_UNIXpm 🖥️

Net::Server UNIX protocol.

SYNOPSIS

See Net::Server::Proto.

DESCRIPTION

Protocol module for Net::Server. This module implements the UNIX SOCK_STREAM socket type. See Net::Server::Proto.

Any sockets created during startup will be chown’ed to the user and group specified in the startup arguments.

PARAMETERS

The following parameters may be specified in addition to normal command line parameters for a Net::Server. See Net::Server for more information on reading arguments.

unix_type
Can be either SOCK_STREAM or SOCK_DGRAM (default is SOCK_STREAM). This can also be passed on the port line (see Net::Server::Proto). However, this method is deprecated. If you want SOCK_STREAM - just use proto UNIX without any other arguments. If you’d like SOCK_DGRAM, use the new proto UNIXDGRAM.

METHODS

NS_unix_path/NS_unix_type
In addition to the standard NS_ methods of Net::Server::Proto classes, the UNIX types also have legacy calls to NS_unix_path and NS_unix_type. Since version 2.000, NS_unix_path is simply an alias to NS_port. NS_unix_type is now redundant with NS_proto. These methods were missing between version 2.000 and 2.003 but have been returned as legacy bridges.

QUICK PARAMETER LIST

Key Value Default # deprecated UNIX socket parameters unix_type (SOCK_STREAM|SOCK_DGRAM) SOCK_STREAM port “filename” undef # more recent usage port “filename / UNIX” port “filename / UNIXDGRAM”

LICENCE

Distributed under the same terms as Net::Server

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2526 - Linux cli command pthread_cond_init

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_cond_init and provides detailed information about the command pthread_cond_init, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_cond_init.

NAME 🖥️ pthread_cond_init 🖥️

operations on conditions

SYNOPSIS

#include <pthread.h>
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
int pthread_cond_init(pthread_cond_t *cond,
 pthread_condattr_t *cond_attr);
int pthread_cond_signal(pthread_cond_t *cond);
int pthread_cond_broadcast(pthread_cond_t *cond);
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
 const struct timespec *abstime);
int pthread_cond_destroy(pthread_cond_t *cond);

DESCRIPTION

A condition (short for ``condition variable’’) is a synchronization device that allows threads to suspend execution and relinquish the processors until some predicate on shared data is satisfied. The basic operations on conditions are: signal the condition (when the predicate becomes true), and wait for the condition, suspending the thread execution until another thread signals the condition.

A condition variable must always be associated with a mutex, to avoid the race condition where a thread prepares to wait on a condition variable and another thread signals the condition just before the first thread actually waits on it.

pthread_cond_init initializes the condition variable cond, using the condition attributes specified in cond_attr, or default attributes if cond_attr is NULL. The LinuxThreads implementation supports no attributes for conditions, hence the cond_attr parameter is actually ignored.

Variables of type pthread_cond_t can also be initialized statically, using the constant PTHREAD_COND_INITIALIZER.

pthread_cond_signal restarts one of the threads that are waiting on the condition variable cond. If no threads are waiting on cond, nothing happens. If several threads are waiting on cond, exactly one is restarted, but it is not specified which.

pthread_cond_broadcast restarts all the threads that are waiting on the condition variable cond. Nothing happens if no threads are waiting on cond.

pthread_cond_wait atomically unlocks the mutex (as per pthread_unlock_mutex) and waits for the condition variable cond to be signaled. The thread execution is suspended and does not consume any CPU time until the condition variable is signaled. The mutex must be locked by the calling thread on entrance to pthread_cond_wait. Before returning to the calling thread, pthread_cond_wait re-acquires mutex (as per pthread_lock_mutex).

Unlocking the mutex and suspending on the condition variable is done atomically. Thus, if all threads always acquire the mutex before signaling the condition, this guarantees that the condition cannot be signaled (and thus ignored) between the time a thread locks the mutex and the time it waits on the condition variable.

pthread_cond_timedwait atomically unlocks mutex and waits on cond, as pthread_cond_wait does, but it also bounds the duration of the wait. If cond has not been signaled within the amount of time specified by abstime, the mutex mutex is re-acquired and pthread_cond_timedwait returns the error ETIMEDOUT. The abstime parameter specifies an absolute time, with the same origin as time(2) and gettimeofday(2): an abstime of 0 corresponds to 00:00:00 GMT, January 1, 1970.

pthread_cond_destroy destroys a condition variable, freeing the resources it might hold. No threads must be waiting on the condition variable on entrance to pthread_cond_destroy. In the LinuxThreads implementation, no resources are associated with condition variables, thus pthread_cond_destroy actually does nothing except checking that the condition has no waiting threads.

CANCELLATION

pthread_cond_wait and pthread_cond_timedwait are cancelation points. If a thread is cancelled while suspended in one of these functions, the thread immediately resumes execution, then locks again the mutex argument to pthread_cond_wait and pthread_cond_timedwait, and finally executes the cancelation. Consequently, cleanup handlers are assured that mutex is locked when they are called.

ASYNC-SIGNAL SAFETY

The condition functions are not async-signal safe, and should not be called from a signal handler. In particular, calling pthread_cond_signal or pthread_cond_broadcast from a signal handler may deadlock the calling thread.

RETURN VALUE

All condition variable functions return 0 on success and a non-zero error code on error.

ERRORS

pthread_cond_init, pthread_cond_signal, pthread_cond_broadcast, and pthread_cond_wait never return an error code.

The pthread_cond_timedwait function returns the following error codes on error:

ETIMEDOUT
The condition variable was not signaled until the timeout specified by abstime.

EINTR
pthread_cond_timedwait was interrupted by a signal.

The pthread_cond_destroy function returns the following error code on error:

EBUSY
Some threads are currently waiting on cond.

SEE ALSO

pthread_condattr_init(3), pthread_mutex_lock(3), pthread_mutex_unlock(3), gettimeofday(2), nanosleep(2).

EXAMPLE

Consider two shared variables x and y, protected by the mutex mut, and a condition variable cond that is to be signaled whenever x becomes greater than y.

int x,y;
pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;

Waiting until x is greater than y is performed as follows:

pthread_mutex_lock(&mut);
while (x <= y) {
        pthread_cond_wait(&cond, &mut);
}
/* operate on x and y */
pthread_mutex_unlock(&mut);

Modifications on x and y that may cause x to become greater than y should signal the condition if needed:

pthread_mutex_lock(&mut);
/* modify x and y */
if (x > y) pthread_cond_broadcast(&cond);
pthread_mutex_unlock(&mut);

If it can be proved that at most one waiting thread needs to be waken up (for instance, if there are only two threads communicating through x and y), pthread_cond_signal can be used as a slightly more efficient alternative to pthread_cond_broadcast. In doubt, use pthread_cond_broadcast.

To wait for x to become greater than y with a timeout of 5 seconds, do:

struct timeval now;
struct timespec timeout;
int retcode;
pthread_mutex_lock(&mut);
gettimeofday(&now);
timeout.tv_sec = now.tv_sec + 5;
timeout.tv_nsec = now.tv_usec * 1000;
retcode = 0;
while (x <= y && retcode != ETIMEDOUT) {
        retcode = pthread_cond_timedwait(&cond, &mut, &timeout);
}
if (retcode == ETIMEDOUT) {
        /* timeout occurred */
} else {
        /* operate on x and y */
}
pthread_mutex_unlock(&mut);
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2527 - Linux cli command Tk_Derivedpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Derivedpm and provides detailed information about the command Tk_Derivedpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Derivedpm.

NAME 🖥️ Tk_Derivedpm 🖥️

Base class for widgets derived from others

SYNOPSIS

package Tk::MyNewWidget; use Tk::widgets qw/ BaseWidget, list of Tk widgets /; use base qw/ Tk::Derived Tk::BaseWidget /; Construct Tk::Widget MyNewWidget; sub ClassInit { my( $class, $mw ) = @_; #… e.g., class bindings here … $class->SUPER::ClassInit( $mw ); } sub Populate { my( $self, $args ) = @_; my $flag = delete $args->{-flag}; if( defined $flag ) { # handle -flag => xxx which can only be done at create # time the delete above ensures that new() does not try # and do $self->configure( -flag => xxx ); } $self->SUPER::Populate( $args ); $self = $self->Component( … ); $self->Delegates( … ); $self->ConfigSpecs( -cursor => [ SELF, cursor, Cursor, undef ], -something => [ METHOD, dbName, dbClass, default ], -text => [ $label, dbName, dbClass, default ], -heading => [ {-text => $head}, heading, Heading, My Heading ], ); } sub something { my( $self, $value) = @_; if ( @_ > 1 ) { # set it } return # current value }

DESCRIPTION

Tk::Derived is used with Perl’s multiple inheritance to override some methods normally inherited from Tk::Widget.

Tk::Derived should precede any Tk widgets in the class’s base class definition.

Tk::Derived’s main purpose is to apply wrappers to configure and cget methods of widgets to allow the derived widget to add to or modify behaviour of the configure options supported by the base widget.

The derived class should normally override the Populate method provided by Tk::Derived and call ConfigSpecs to declare configure options.

The public methods provided by Tk::Derived are as follows:

->ConfigSpecs(-key => [kind, name, Class, default], …)

SEE ALSO

Tk::ConfigSpecs Tk::mega Tk::composite

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2528 - Linux cli command Image_ExifTool_CanonRawpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_CanonRawpm and provides detailed information about the command Image_ExifTool_CanonRawpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_CanonRawpm.

NAME 🖥️ Image_ExifTool_CanonRawpm 🖥️

Read Canon RAW (CRW) meta information

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret meta information from Canon CRW raw files. These files are written directly by some Canon cameras, and contain meta information similar to that found in the EXIF Canon maker notes.

NOTES

The CR2 format written by some Canon cameras is very different the CRW format processed by this module. (CR2 is TIFF-based and uses standard EXIF tags.)

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.cybercom.net/~dcoffin/dcraw/>

<http://www.wonderland.org/crw/>

<http://xyrion.org/ciff/>

<https://exiftool.org/canon_raw.html>

ACKNOWLEDGEMENTS

Thanks to Dave Nicholson for decoding a number of new tags.

SEE ALSO

“CanonRaw Tags” in Image::ExifTool::TagNames, Image::ExifTool::Canon (3pm), Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2529 - Linux cli command Net_DNS_RR_NSEC3PARAMpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_NSEC3PARAMpm and provides detailed information about the command Net_DNS_RR_NSEC3PARAMpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_NSEC3PARAMpm.

NAME 🖥️ Net_DNS_RR_NSEC3PARAMpm 🖥️

DNS NSEC3PARAM resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name NSEC3PARAM algorithm flags iterations salt);

DESCRIPTION

Class for DNSSEC NSEC3PARAM resource records.

The NSEC3PARAM RR contains the NSEC3 parameters (hash algorithm, flags, iterations and salt) needed to calculate hashed ownernames.

The presence of an NSEC3PARAM RR at a zone apex indicates that the specified parameters may be used by authoritative servers to choose an appropriate set of NSEC3 records for negative responses.

The NSEC3PARAM RR is not used by validators or resolvers.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

algorithm

$algorithm = $rr->algorithm; $rr->algorithm( $algorithm );

The Hash Algorithm field is represented as an unsigned decimal integer. The value has a maximum of 255.

flags

$flags = $rr->flags; $rr->flags( $flags );

The Flags field is represented as an unsigned decimal integer. The value has a maximum of 255.

iterations

$iterations = $rr->iterations; $rr->iterations( $iterations );

The Iterations field is represented as an unsigned decimal integer. The value is between 0 and 65535, inclusive.

salt

$salt = $rr->salt; $rr->salt( $salt );

The Salt field is represented as a contiguous sequence of hexadecimal digits. A “-” (unquoted) is used in string format to indicate that the salt field is absent.

saltbin

$saltbin = $rr->saltbin; $rr->saltbin( $saltbin );

The Salt field as a sequence of octets.

COPYRIGHT

Copyright (c)2007,2008 NLnet Labs. Author Olaf M. Kolkman

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC5155 (4) <https://iana.org/go/rfc5155#section-4>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2530 - Linux cli command XtAppMainLoop

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppMainLoop and provides detailed information about the command XtAppMainLoop, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppMainLoop.

NAME 🖥️ XtAppMainLoop 🖥️

query and process events and input

SYNTAX

#include <X11/Intrinsic.h>

void XtAppNextEvent(XtAppContext app_context, XEvent *event_return);

Boolean XtAppPeekEvent(XtAppContext app_context, XEvent *event_return);

XtInputMask XtAppPending(XtAppContext app_context);

void XtAppProcessEvent(XtAppContext app_context, XtInputMask mask);

Boolean XtDispatchEvent(XEvent *event);

void XtAppMainLoop(XtAppContext app_context);

ARGUMENTS

app_context
Specifies the application context that identifies the application.

event
Specifies a pointer to the event structure that is to be dispatched to the appropriate event handler.

event_return
Returns the event information to the specified event structure.

mask
Specifies what types of events to process. The mask is the bitwise inclusive OR of any combination of XtIMXEvent, XtIMTimer, XtIMAlternateInput, and XtIMSignal. As a convenience, the X Toolkit defines the symbolic name XtIMAll to be the bitwise inclusive OR of all event types.

DESCRIPTION

If the X event queue is empty, XtAppNextEvent flushes the X output buffers of each Display in the application context and waits for an event while looking at the other input sources, timeout timeout values, and signal handlers and calling any callback procedures triggered by them. This wait time can be used for background processing (see Section 7.8).

If there is an event in the queue, XtAppPeekEvent fills in the event and returns a nonzero value. If no X input is on the queue, XtAppPeekEvent flushes the output buffer and blocks until input is available (possibly calling some timeout callbacks in the process). If the input is an event, XtAppPeekEvent fills in the event and returns a nonzero value. Otherwise, the input is for an alternate input source, and XtAppPeekEvent returns zero.

The XtAppPending function returns a nonzero value if there are events pending from the X server, timer pending, or other input sources pending. The value returned is a bit mask that is the OR of XtIMXEvent, XtIMTimer, XtIMAlternateInput, and XtIMSignal (see XtAppProcessEvent). If there are no events pending, XtAppPending flushes the output buffer and returns zero.

The XtAppProcessEvent function processes one timer, alternate input, signal source, or X event. If there is nothing of the appropriate type to process, XtAppProcessEvent blocks until there is. If there is more than one type of thing available to process, it is undefined which will get processed. Usually, this procedure is not called by client applications (see XtAppMainLoop). XtAppProcessEvent processes timer events by calling any appropriate timer callbacks, alternate input by calling any appropriate alternate input callbacks, signal source by calling any appropriate signal callbacks, and X events by calling XtDispatchEvent.

When an X event is received, it is passed to XtDispatchEvent, which calls the appropriate event handlers and passes them the widget, the event, and client-specific data registered with each procedure. If there are no handlers for that event registered, the event is ignored and the dispatcher simply returns. The order in which the handlers are called is undefined.

The XtDispatchEvent function sends those events to the event handler functions that have been previously registered with the dispatch routine. XtDispatchEvent returns True if it dispatched the event to some handler and False if it found no handler to dispatch the event to. The most common use of XtDispatchEvent is to dispatch events acquired with the XtAppNextEvent procedure. However, it also can be used to dispatch user-constructed events. XtDispatchEvent also is responsible for implementing the grab semantics for XtAddGrab.

The XtAppMainLoop function processes events using XtAppProcessEvent, varying the mask parameter and using XtAppPending to ensure that it has a chance to handle events of all types, i.e., X events, timer events, input events and signal sources. This constitutes the main loop of X Toolkit applications, and, as such, it does not return unless XtAppSetExitFlag is called. Applications are expected to exit in response to some user action. There is nothing special about XtAppMainLoop; it is simply an loop that processes events until XtAppGetExitFlag() returns true.

Applications can provide their own version of this loop, which tests some global termination flag or tests that the number of top-level widgets is larger than zero before circling back for the next event.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2531 - Linux cli command j0

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command j0 and provides detailed information about the command j0, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the j0.

NAME 🖥️ j0 🖥️

Bessel functions of the first kind

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double j0(double x);
double j1(double x);
double jn(int n, double x);
float j0f(float x);
float j1f(float x);
float jnf(int n, float x);
long double j0l(long double x);
long double j1l(long double x);
long double jnl(int n, long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

j0(), j1(), jn():

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

j0f(), j0l(), j1f(), j1l(), jnf(), jnl():

    _XOPEN_SOURCE >= 600
        || (_ISOC99_SOURCE && _XOPEN_SOURCE)
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The j0() and j1() functions return Bessel functions of x of the first kind of orders 0 and 1, respectively. The jn() function returns the Bessel function of x of the first kind of order n.

The j0f(), j1f(), and jnf(), functions are versions that take and return float values. The j0l(), j1l(), and jnl() functions are versions that take and return long double values.

RETURN VALUE

On success, these functions return the appropriate Bessel value of the first kind for x.

If x is a NaN, a NaN is returned.

If x is too large in magnitude, or the result underflows, a range error occurs, and the return value is 0.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error: result underflow, or x is too large in magnitude
errno is set to ERANGE.

These functions do not raise exceptions for fetestexcept(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

j0(), j0f(), j0l()

Thread safetyMT-Safe

j1(), j1f(), j1l()

Thread safetyMT-Safe

jn(), jnf(), jnl()

Thread safetyMT-Safe

STANDARDS

j0()
j1()
jn()
POSIX.1-2008.

Others:
BSD.

HISTORY

j0()
j1()
jn()
SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008.

Others:
BSD.

BUGS

There are errors of up to 2e-16 in the values returned by j0(), j1(), and jn() for values of x between -8 and 8.

SEE ALSO

y0(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2532 - Linux cli command Math_Random_ISAACpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Math_Random_ISAACpm and provides detailed information about the command Math_Random_ISAACpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Math_Random_ISAACpm.

NAME 🖥️ Math_Random_ISAACpm 🖥️

Perl interface to the ISAAC PRNG algorithm

VERSION

version 1.004

SYNOPSIS

use Math::Random::ISAAC; my $rng = Math::Random::ISAAC->new(@seeds); for (0..30) { print Result: . $rng->irand() . " “; }

DESCRIPTION

As with other Pseudo-Random Number Generator (PRNG) algorithms like the Mersenne Twister (see Math::Random::MT), this algorithm is designed to take some seed information and produce seemingly random results as output.

However, ISAAC (Indirection, Shift, Accumulate, Add, and Count) has different goals than these commonly used algorithms. In particular, it’s really fast - on average, it requires only 18.75 machine cycles to generate a 32-bit value. This makes it suitable for applications where a significant amount of random data needs to be produced quickly, such solving using the Monte Carlo method or for games.

The results are uniformly distributed, unbiased, and unpredictable unless you know the seed. The algorithm was published by Bob Jenkins in the late 90s and despite the best efforts of many security researchers, no feasible attacks have been found to date.

USAGE WARNING

There was no method supplied to provide the initial seed data by the author. On his web site, Bob Jenkins writes:

Seeding a random number generator is essentially the same problem as encrypting the seed with a block cipher.

In the same spirit, by default, this module does not seed the algorithm at all Ω- it simply fills the state with zeroes Ω- if no seed is provided. The idea is to remind users that selecting good seed data for their purpose is important, and for the module to conveniently set it to something like localtime behind-the-scenes hurts users in the long run, since they don’t understand the limitations of doing so.

The type of seed you might want to use depends entirely on the purpose of using this algorithm in your program in the first place. Here are some possible seeding methods:

1 Math::TrulyRandom
The Math::TrulyRandom module provides a way of obtaining truly random data by using timing interrupts. This is probably one of the better ways to seed the algorithm.

2 /dev/random
Using the system random device is, in principle, the best idea, since it gathers entropy from various sources including interrupt timing, other device interrupts, etc. However, it’s not portable to anything other than Unix-like platforms, and might not produce good data on some systems.

3 localtime()
This works for basic things like simulations, but results in not-so-random output, especially if you create new instances quickly (as the seeds would be the same within per-second resolution).

4 Time::HiRes
In theory, using Time::HiRes is the same as option (2), but you get a higher resolution time so you’re less likely to have the same seed twice. Note that you need to transform the output into an integer somehow, perhaps by taking the least significant bits or using a hash function. This would be less prone to duplicate instances, but it’s still not ideal.

METHODS

new

Math::Random::ISAAC->new( @seeds )

Creates a Math::Random::ISAAC object, based upon either the optimized C/XS version of the algorithm, Math::Random::ISAAC::XS, or falls back to the included Pure Perl module, Math::Random::ISAAC::PP.

Example code:

my $rng = Math::Random::ISAAC->new(time);

This method will return an appropriate Math::Random::ISAAC object or throw an exception on error.

rand

$rng->rand()

Returns a random double-precision floating point number which is normalized between 0 and 1 (inclusive; it’s a closed interval).

Internally, this simply takes the uniformly distributed unsigned integer from $rng->irand() and divides it by 2**32-1 (maximum unsigned integer size)

Example code:

my $next = $rng->rand();

This method will return a double-precision floating point number or throw an exception on error.

irand

$rng->irand()

Returns the next unsigned 32-bit random integer. It will return a value with a value such that: 0 <= x <= 2**32-1.

Example code:

my $next = $rng->irand();

This method will return a 32-bit unsigned integer or throw an exception on error.

PURPOSE

The intent of this module is to provide single simple interface to the two compatible implementations of this module, namely, Math::Random::ISAAC::XS and Math::Random::ISAAC::PP.

If, for some reason, you need to determine what version of the module is actually being included by Math::Random::ISAAC, then:

print Backend type: , $Math::Random::ISAAC::DRIVER, " “;

In order to force use of one or the other, simply load the appropriate module:

use Math::Random::ISAAC::XS; my $rng = Math::Random::ISAAC::XS->new(); # or use Math::Random::ISAAC::PP; my $rng = Math::Random::ISAAC::PP->new();

ACKNOWLEDGEMENTS

  • Special thanks to Bob Jenkins <[email protected]> for devising this very clever algorithm and releasing it into the public domain.

  • Thanks to John L. Allen (contact unknown) for providing a Perl port of the original ISAAC code, upon which Math::Random::ISAAC::PP is heavily based. His version is available on Bob’s web site, in the SEE ALSO section.

SEE ALSO

Math::Random::ISAAC::XS, the C/XS optimized version of this module, which will be used automatically if available.

<http://burtleburtle.net/bob/rand/isaacafa.html>, Bob Jenkins’ page about ISAAC, which explains the algorithm as well as potential attacks.

<http://eprint.iacr.org/2006/438.pdf>, a paper entitled On the pseudo-random generator ISAAC, which claims there are many seeds which will produce non-uniform results. The author, Jean-Philippe Aumasson, argues ISAAC should be using rotations (circular shifts) instead of normal shifts to increase diffusion of the state, among other things.

<http://eprint.iacr.org/2001/049.pdf>, a paper by Marina Pudovkina discussing plaintext attacks on the ISAAC keystream generator. Among other things, it notes that the time complexity is Tmet = 4.67*10^1240, so it remains a secure cipher for practical applications.

CAVEATS

  • There is no method that allows re-seeding of algorithms. This is not really necessary because one can simply call new again with the new seed data periodically. But he also provides a simple workaround: As ISAAC is intended to be a secure cipher, if you want to reseed it, one way is to use some other cipher to seed some initial version of ISAAC, then use ISAACs output as a seed for other instances of ISAAC whenever they need to be reseeded.

  • There is no way to clone a PRNG instance. I’m not sure why this is might even be necessary or useful. File a bug report with an explanation why and I’ll consider adding it to the next release.

BUGS

Please report any bugs or feature requests on the bugtracker website http://rt.cpan.org/NoAuth/Bugs.html?Dist=Math-Random-ISAAC

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR

Jonathan Yu <[email protected]>

COPYRIGHT AND LICENSE

Legally speaking, this package and its contents are:

Copyright (c) 2011 by Jonathan Yu <[email protected]>.

But this is really just a legal technicality that allows the author to offer this package under the public domain and also a variety of licensing options. For all intents and purposes, this is public domain software, which means you can do whatever you want with it.

The software is provided AS IS, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2533 - Linux cli command zip_get_error

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_get_error and provides detailed information about the command zip_get_error, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_get_error.

libzip (-lzip)

The

function returns the zip error for the zip archive

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2534 - Linux cli command mbstowcs

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mbstowcs and provides detailed information about the command mbstowcs, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mbstowcs.

NAME 🖥️ mbstowcs 🖥️

convert a multibyte string to a wide-character string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
size_t mbstowcs(wchar_t dest[restrict .dsize], const char *restrict src,
 size_t dsize);

DESCRIPTION

If dest is not NULL, convert the multibyte string src to a wide-character string starting at dest. At most dsize wide characters are written to dest. The sequence of characters in the string src shall begin in the initial shift state. The conversion can stop for three reasons:

  • An invalid multibyte sequence has been encountered. In this case, (size_t) -1 is returned.

  • dsize non-L’�’ wide characters have been stored at dest. In this case, the number of wide characters written to dest is returned, but the shift state at this point is lost.

  • The multibyte string has been completely converted, including the terminating null character (‘�’). In this case, the number of wide characters written to dest, excluding the terminating null wide character, is returned.

If dest is NULL, dsize is ignored, and the conversion proceeds as above, except that the converted wide characters are not written out to memory, and that no length limit exists.

In order to avoid the case 2 above, the programmer should make sure dsize is greater than or equal to mbstowcs(NULL,src,0)+1.

The programmer must ensure that there is room for at least dsize wide characters at dest.

RETURN VALUE

The number of wide characters that make up the converted part of the wide-character string, not including the terminating null wide character. If an invalid multibyte sequence was encountered, (size_t) -1 is returned.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mbstowcs()

Thread safetyMT-Safe

VERSIONS

The function mbsrtowcs(3) provides a better interface to the same functionality.

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of mbstowcs() depends on the LC_CTYPE category of the current locale.

EXAMPLES

The program below illustrates the use of mbstowcs(), as well as some of the wide character classification functions. An example run is the following:

$ ./t_mbstowcs de_DE.UTF-8 Grüße!
Length of source string (excluding terminator):
    8 bytes
    6 multibyte characters
Wide character string is: Grüße! (6 characters)
    G alpha upper
    r alpha lower
    ü alpha lower
    ß alpha lower
    e alpha lower
    ! !alpha

Program source

#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
#include <wctype.h>
int
main(int argc, char *argv[])
{
    size_t mbslen;      /* Number of multibyte characters in source */
    wchar_t *wcs;       /* Pointer to converted wide character string */
    if (argc < 3) {
        fprintf(stderr, "Usage: %s <locale> <string>

“, argv[0]); exit(EXIT_FAILURE); } /* Apply the specified locale. / if (setlocale(LC_ALL, argv[1]) == NULL) { perror(“setlocale”); exit(EXIT_FAILURE); } / Calculate the length required to hold argv[2] converted to a wide character string. / mbslen = mbstowcs(NULL, argv[2], 0); if (mbslen == (size_t) -1) { perror(“mbstowcs”); exit(EXIT_FAILURE); } / Describe the source string to the user. */ printf(“Length of source string (excluding terminator): “); printf(” %zu bytes “, strlen(argv[2])); printf(” %zu multibyte characters

“, mbslen); /* Allocate wide character string of the desired size. Add 1 to allow for terminating null wide character (L’�’). */ wcs = calloc(mbslen + 1, sizeof(wcs)); if (wcs == NULL) { perror(“calloc”); exit(EXIT_FAILURE); } / Convert the multibyte character string in argv[2] to a wide character string. / if (mbstowcs(wcs, argv[2], mbslen + 1) == (size_t) -1) { perror(“mbstowcs”); exit(EXIT_FAILURE); } printf(“Wide character string is: %ls (%zu characters) “, wcs, mbslen); / Now do some inspection of the classes of the characters in the wide character string. */ for (wchar_t *wp = wcs; *wp != 0; wp++) { printf(” %lc “, (wint_t) *wp); if (!iswalpha(*wp)) printf(”!”); printf(“alpha “); if (iswalpha(*wp)) { if (iswupper(*wp)) printf(“upper “); if (iswlower(*wp)) printf(“lower “); } putchar(’ ‘); } exit(EXIT_SUCCESS); }

SEE ALSO

mblen(3), mbsrtowcs(3), mbtowc(3), wcstombs(3), wctomb(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2535 - Linux cli command ttyname_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ttyname_r and provides detailed information about the command ttyname_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ttyname_r.

NAME 🖥️ ttyname_r 🖥️

return name of a terminal

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
char *ttyname(int fd);
int ttyname_r(int fd, char buf[.buflen], size_t buflen);

DESCRIPTION

The function ttyname() returns a pointer to the null-terminated pathname of the terminal device that is open on the file descriptor fd, or NULL on error (for example, if fd is not connected to a terminal). The return value may point to static data, possibly overwritten by the next call. The function ttyname_r() stores this pathname in the buffer buf of length buflen.

RETURN VALUE

The function ttyname() returns a pointer to a pathname on success. On error, NULL is returned, and errno is set to indicate the error. The function ttyname_r() returns 0 on success, and an error number upon error.

ERRORS

EBADF
Bad file descriptor.

ENODEV
fd refers to a slave pseudoterminal device but the corresponding pathname could not be found (see NOTES).

ENOTTY
fd does not refer to a terminal device.

ERANGE
(ttyname_r()) buflen was too small to allow storing the pathname.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

ttyname()

Thread safetyMT-Unsafe race:ttyname

ttyname_r()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, 4.2BSD.

NOTES

A process that keeps a file descriptor that refers to a pts(4) device open when switching to another mount namespace that uses a different /dev/ptmx instance may still accidentally find that a device path of the same name for that file descriptor exists. However, this device path refers to a different device and thus can’t be used to access the device that the file descriptor refers to. Calling ttyname() or ttyname_r() on the file descriptor in the new mount namespace will cause these functions to return NULL and set errno to ENODEV.

SEE ALSO

tty(1), fstat(2), ctermid(3), isatty(3), pts(4)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2536 - Linux cli command intmax_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command intmax_ttype and provides detailed information about the command intmax_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the intmax_ttype.

NAME 🖥️ intmax_ttype 🖥️

greatest-width basic integer types

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <stdint.h>
typedef /* ... */ intmax_t;
typedef /* ... */ uintmax_t;
#define INTMAX_WIDTH /* ... */
#define UINTMAX_WIDTH INTMAX_WIDTH
#define INTMAX_MAX /* 2**(INTMAX_WIDTH - 1) - 1 */
#define INTMAX_MIN /* - 2**(INTMAX_WIDTH - 1) */
#define UINTMAX_MAX /* 2**UINTMAX_WIDTH - 1 */
#define INTMAX_C(c) c ## /* ... */
#define UINTMAX_C(c) c ## /* ... */

DESCRIPTION

intmax_t is a signed integer type capable of representing any value of any basic signed integer type supported by the implementation. It is capable of storing values in the range [INTMAX_MIN, INTMAX_MAX].

uintmax_t is an unsigned integer type capable of representing any value of any basic unsigned integer type supported by the implementation. It is capable of storing values in the range [0, UINTMAX_MAX].

The macros [U]INTMAX_WIDTH expand to the width in bits of these types.

The macros [U]INTMAX_MAX expand to the maximum value that these types can hold.

The macro INTMAX_MIN expands to the minimum value that intmax_t can hold.

The macros [U]INTMAX_C() expand their argument to an integer constant of type [u]intmax_t.

The length modifier for [u]intmax_t for the printf(3) and the scanf(3) families of functions is j; resulting commonly in %jd, %ji, %ju, or %jx for printing [u]intmax_t values.

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

NOTES

The following header also provides these types: <inttypes.h>.

BUGS

These types may not be as large as extended integer types, such as __int128

SEE ALSO

int64_t(3type), intptr_t(3type), printf(3), strtoimax(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2537 - Linux cli command pow

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pow and provides detailed information about the command pow, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pow.

NAME 🖥️ pow 🖥️

power functions

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double pow(double x, double y);
float powf(float x, float y);
long double powl(long double x, long double y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

powf(), powl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the value of x raised to the power of y.

RETURN VALUE

On success, these functions return the value of x to the power of y.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the mathematically correct sign.

If result underflows, and is not representable, a range error occurs, and 0.0 with the appropriate sign is returned.

If x is +0 or -0, and y is an odd integer less than 0, a pole error occurs and HUGE_VAL, HUGE_VALF, or HUGE_VALL, is returned, with the same sign as x.

If x is +0 or -0, and y is less than 0 and not an odd integer, a pole error occurs and +HUGE_VAL, +HUGE_VALF, or +HUGE_VALL, is returned.

If x is +0 (-0), and y is an odd integer greater than 0, the result is +0 (-0).

If x is 0, and y greater than 0 and not an odd integer, the result is +0.

If x is -1, and y is positive infinity or negative infinity, the result is 1.0.

If x is +1, the result is 1.0 (even if y is a NaN).

If y is 0, the result is 1.0 (even if x is a NaN).

If x is a finite value less than 0, and y is a finite noninteger, a domain error occurs, and a NaN is returned.

If the absolute value of x is less than 1, and y is negative infinity, the result is positive infinity.

If the absolute value of x is greater than 1, and y is negative infinity, the result is +0.

If the absolute value of x is less than 1, and y is positive infinity, the result is +0.

If the absolute value of x is greater than 1, and y is positive infinity, the result is positive infinity.

If x is negative infinity, and y is an odd integer less than 0, the result is -0.

If x is negative infinity, and y less than 0 and not an odd integer, the result is +0.

If x is negative infinity, and y is an odd integer greater than 0, the result is negative infinity.

If x is negative infinity, and y greater than 0 and not an odd integer, the result is positive infinity.

If x is positive infinity, and y less than 0, the result is +0.

If x is positive infinity, and y greater than 0, the result is positive infinity.

Except as specified above, if x or y is a NaN, the result is a NaN.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is negative, and y is a finite noninteger
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

Pole error: x is zero, and y is negative
errno is set to ERANGE (but see BUGS). A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised.

Range error: the result overflows
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error: the result underflows
errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pow(), powf(), powl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

BUGS

Historical bugs (now fixed)

Before glibc 2.28, on some architectures (e.g., x86-64) pow() may be more than 10,000 times slower for some inputs than for other nearby inputs. This affects only pow(), and not powf() nor powl(). This problem was fixed in glibc 2.28.

A number of bugs in the glibc implementation of pow() were fixed in glibc 2.16.

In glibc 2.9 and earlier, when a pole error occurs, errno is set to EDOM instead of the POSIX-mandated ERANGE. Since glibc 2.10, glibc does the right thing.

In glibc 2.3.2 and earlier, when an overflow or underflow error occurs, glibc’s pow() generates a bogus invalid floating-point exception (FE_INVALID) in addition to the overflow or underflow exception.

SEE ALSO

cbrt(3), cpow(3), sqrt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2538 - Linux cli command Image_ExifTool_InDesignpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_InDesignpm and provides detailed information about the command Image_ExifTool_InDesignpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_InDesignpm.

NAME 🖥️ Image_ExifTool_InDesignpm 🖥️

Read/write meta information in Adobe InDesign files

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to read XMP meta information from Adobe InDesign (.IND, .INDD and .INDT) files.

LIMITATIONS

1) Only XMP meta information is processed.

2) A new XMP stream may not be created, so XMP tags may only be written to InDesign files which previously contained XMP.

3) File sizes of greater than 2 GB are supported only if the system supports them and the LargeFileSupport option is enabled.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.adobe.com/devnet/xmp/pdfs/XMPSpecificationPart3.pdf>

SEE ALSO

Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2539 - Linux cli command in_addr_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command in_addr_ttype and provides detailed information about the command in_addr_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the in_addr_ttype.

NAME 🖥️ in_addr_ttype 🖥️

socket address

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/socket.h>
struct sockaddr {
 sa_family_t sa_family; /* Address family */
 char sa_data[]; /* Socket address */
};
struct sockaddr_storage {
 sa_family_t ss_family; /* Address family */
};
typedef /* ... */ socklen_t;
typedef /* ... */ sa_family_t;

Internet domain sockets

#include <netinet/in.h>
struct sockaddr_in {
 sa_family_t sin_family; /* AF_INET */
 in_port_t sin_port; /* Port number */
 struct in_addr sin_addr; /* IPv4 address */
};
struct sockaddr_in6 {
 sa_family_t sin6_family; /* AF_INET6 */
 in_port_t sin6_port; /* Port number */
 uint32_t sin6_flowinfo; /* IPv6 flow info */
 struct in6_addr sin6_addr; /* IPv6 address */
 uint32_t sin6_scope_id; /* Set of interfaces for a scope */
};
struct in_addr {
 in_addr_t s_addr;
};
struct in6_addr {
 uint8_t s6_addr[16];
};
typedef uint32_t in_addr_t;
typedef uint16_t in_port_t;

UNIX domain sockets

#include <sys/un.h>
struct sockaddr_un {
 sa_family_t sun_family; /* Address family */
 char sun_path[]; /* Socket pathname */
};

DESCRIPTION

sockaddr
Describes a socket address.

sockaddr_storage
A structure at least as large as any other sockaddr_* address structures. It’s aligned so that a pointer to it can be cast as a pointer to other sockaddr_* structures and used to access its fields.

socklen_t
Describes the length of a socket address. This is an integer type of at least 32 bits.

sa_family_t
Describes a socket’s protocol family. This is an unsigned integer type.

Internet domain sockets

sockaddr_in
Describes an IPv4 Internet domain socket address. The sin_port and sin_addr members are stored in network byte order.

sockaddr_in6
Describes an IPv6 Internet domain socket address. The sin6_addr.s6_addr array is used to contain a 128-bit IPv6 address, stored in network byte order.

UNIX domain sockets

sockaddr_un
Describes a UNIX domain socket address.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

socklen_t was invented by POSIX. See also accept(2).

These structures were invented before modern ISO C strict-aliasing rules. If aliasing rules are applied strictly, these structures would be extremely difficult to use without invoking Undefined Behavior. POSIX Issue 8 will fix this by requiring that implementations make sure that these structures can be safely used as they were designed.

NOTES

socklen_t is also defined in <netdb.h>.

sa_family_t is also defined in <netinet/in.h> and <sys/un.h>.

SEE ALSO

accept(2), bind(2), connect(2), getpeername(2), getsockname(2), getsockopt(2), sendto(2), setsockopt(2), socket(2), socketpair(2), getaddrinfo(3), gethostbyaddr(3), getnameinfo(3), htonl(3), ipv6(7), socket(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2540 - Linux cli command Moose_Meta_TypeConstraint_Rolepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_TypeConstraint_Rolepm and provides detailed information about the command Moose_Meta_TypeConstraint_Rolepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_TypeConstraint_Rolepm.

NAME 🖥️ Moose_Meta_TypeConstraint_Rolepm 🖥️

Role/TypeConstraint parallel hierarchy

VERSION

version 2.2207

DESCRIPTION

This class represents type constraints for a role.

INHERITANCE

Moose::Meta::TypeConstraint::Role is a subclass of Moose::Meta::TypeConstraint.

METHODS

Moose::Meta::TypeConstraint::Role->new(%options)

This creates a new role type constraint based on the given %options.

It takes the same options as its parent, with two exceptions. First, it requires an additional option, role, which is name of the constraint’s role. Second, it automatically sets the parent to the Object type.

The constructor also overrides the hand optimized type constraint with one it creates internally.

$constraint->role

Returns the role name associated with the constraint.

$constraint->parents

Returns all the type’s parent types, corresponding to the roles that its role does.

$constraint->is_subtype_of($type_name_or_object)

If the given type is also a role type, then this checks that the type’s role does the other type’s role.

Otherwise it falls back to the implementation in Moose::Meta::TypeConstraint.

$constraint->create_child_type(%options)

This returns a new Moose::Meta::TypeConstraint object with the type as its parent.

Note that it does not return a Moose::Meta::TypeConstraint::Role object!

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2541 - Linux cli command Net_SSH2_Filepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_SSH2_Filepm and provides detailed information about the command Net_SSH2_Filepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_SSH2_Filepm.

NAME 🖥️ Net_SSH2_Filepm 🖥️

SSH2 SFTP file object

DESCRIPTION

An SFTP file object is created by the Net::SSH2::SFTP open method.

read ( buffer, size )

Read size bytes from the file into a given buffer. Returns number of bytes read, or undef on failure.

write ( buffer )

Write buffer to the remote file.

The libssh2_sftp_write function wrapped by this method has a complex and quite difficult (if not impossible at all) to use API. It tries to hide the packet pipelining being done under the hood in order to attain decent throughput.

Net::SSH2 can not hide that complexity without negatively affecting the transmission speed so it provides just a thin wrapper for that library function.

An excerpt from libssh2_sftp_write manual page follows:

WRITE AHEAD Starting in libssh2 version 1.2.8, the default behavior of libssh2 is to create several smaller outgoing packets for all data you pass to this function and it will return a positive number as soon as the first packet is acknowledged from the server. This has the effect that sometimes more data has been sent off but isnt acked yet when this function returns, and when this function is subsequently called again to write more data, libssh2 will immediately figure out that the data is already received remotely. In most normal situation this should not cause any problems, but it should be noted that if youve once called libssh2_sftp_write() with data and it returns short, you MUST still assume that the rest of the data mightve been cached so you need to make sure you dont alter that data and think that the version you have in your next function invoke will be detected or used. The reason for this funny behavior is that SFTP can only send 32K data in each packet and it gets all packets acked individually. This means we cannot use a simple serial approach if we want to reach high performance even on high latency connections. And we want that.

This is an example of simple file uploading

use constant BUF_SIZE => 128*1024; my $sftp = $ssh2->sftp; open my $fh, <, /tmp/doc.txt; my $sf = $sftp->open(doc.txt, O_CREAT|O_WRONLY|O_TRUNC); my $buf; while (sysread($fh, $buf, BUF_SIZE)) { while (length $buf) { my $rc = $sf->write($buf); if (!defined($rc)) { $sftp->die_with_error(write error); } # Remove transferred data from the buffer. substr($buf, 0, $rc) = ; } }

stat

Returns file attributes; see Net::SSH2::SFTP::stat.

setstat ( key, value… )

Sets file attributes; see Net::SSH2::SFTP::setstat.

seek ( offset )

Set the file pointer offset.

tell

Returns the current file pointer offset.

SEE ALSO

Net::SSH2::SFTP.

Check Net::SFTP::Foreign for a high level, perlish and easy to use SFTP client module. It can work on top of Net::SSH2 via the Net::SFTP::Foreign::Backend::Net_SSH2 backend module.

COPYRIGHT AND LICENSE

Copyright (C) 2005, 2006 by David B. Robins <[email protected]>;

Copyright (C) 2015 by Salvador Fandiño <[email protected]>;

All rights reserved.

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

The documentation for this package contains and excerpt from libssh2 manual pages. You can consult the license of the libssh2 project for the conditions regulating the copyright of that part.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2542 - Linux cli command zip_add

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_add and provides detailed information about the command zip_add, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_add.

libzip (-lzip)

The function

is the obsolete version of

It is the same as calling

with an empty

argument. Similarly, the

function is the obsolete version of

It is the same as calling

with an empty

argument.

was added in libzip 0.6. In libzip 0.10 the return type was changed from

to

It was deprecated in libzip 0.11, use

instead.

was added in libzip 0.6. In libzip 0.10 the type of

was changed from

to

It was deprecated in libzip 0.11, use

instead.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2543 - Linux cli command logwtmp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command logwtmp and provides detailed information about the command logwtmp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the logwtmp.

NAME 🖥️ logwtmp 🖥️

append an entry to the wtmp file

LIBRARY

System utilities library (libutil, -lutil)

SYNOPSIS

#include <utmp.h>
void updwtmp(const char *wtmp_file, const struct utmp *ut);
void logwtmp(const char *line, const char *name",constchar*"host);

DESCRIPTION

updwtmp() appends the utmp structure ut to the wtmp file.

logwtmp() constructs a utmp structure using line, name, host, current time, and current process ID. Then it calls updwtmp() to append the structure to the wtmp file.

FILES

/var/log/wtmp
database of past user logins

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

updwtmp(), logwtmp()

Thread safetyMT-Unsafe sig:ALRM timer

VERSIONS

For consistency with the other “utmpx” functions (see getutxent(3)), glibc provides (since glibc 2.1):

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <utmpx.h>
void updwtmpx (const char *wtmpx_file, const struct utmpx *utx);

This function performs the same task as updwtmp(), but differs in that it takes a utmpx structure as its last argument.

STANDARDS

None.

HISTORY

Solaris, NetBSD.

SEE ALSO

getutxent(3), wtmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2544 - Linux cli command Moose_Meta_TypeCoercionpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_TypeCoercionpm and provides detailed information about the command Moose_Meta_TypeCoercionpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_TypeCoercionpm.

NAME 🖥️ Moose_Meta_TypeCoercionpm 🖥️

The Moose Type Coercion metaclass

VERSION

version 2.2207

DESCRIPTION

A type coercion object is basically a mapping of one or more type constraints and the associated coercions subroutines.

It’s unlikely that you will need to instantiate an object of this class directly, as it’s part of the deep internals of Moose.

METHODS

Moose::Meta::TypeCoercion->new(%options)

Creates a new type coercion object, based on the options provided.

  • type_constraint This is the Moose::Meta::TypeConstraint object for the type that is being coerced to.

$coercion->type_coercion_map

This returns the map of type constraints to coercions as an array reference. The values of the array alternate between type names and subroutine references which implement the coercion.

The value is an array reference because coercions are tried in the order they are added.

$coercion->type_constraint

This returns the Moose::Meta::TypeConstraint that was passed to the constructor.

$coercion->has_coercion_for_type($type_name)

Returns true if the coercion can coerce the named type.

$coercion->add_type_coercions( $type_name => $sub, … )

This method takes a list of type names and subroutine references. If the coercion already has a mapping for a given type, it throws an exception.

Coercions are actually

$coercion->coerce($value)

This method takes a value and applies the first valid coercion it finds.

This means that if the value could belong to more than type in the coercion object, the first coercion added is used.

Moose::Meta::TypeCoercion->meta

This will return a Class::MOP::Class instance for this class.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2545 - Linux cli command getwchar

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getwchar and provides detailed information about the command getwchar, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getwchar.

NAME 🖥️ getwchar 🖥️

read a wide character from standard input

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
wint_t getwchar(void);

DESCRIPTION

The getwchar() function is the wide-character equivalent of the getchar(3) function. It reads a wide character from stdin and returns it. If the end of stream is reached, or if ferror(stdin) becomes true, it returns WEOF. If a wide-character conversion error occurs, it sets errno to EILSEQ and returns WEOF.

For a nonlocking counterpart, see unlocked_stdio(3).

RETURN VALUE

The getwchar() function returns the next wide-character from standard input, or WEOF.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getwchar()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

NOTES

The behavior of getwchar() depends on the LC_CTYPE category of the current locale.

It is reasonable to expect that getwchar() will actually read a multibyte sequence from standard input and then convert it to a wide character.

SEE ALSO

fgetwc(3), unlocked_stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2546 - Linux cli command optind

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command optind and provides detailed information about the command optind, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the optind.

NAME 🖥️ optind 🖥️

Parse command-line options

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
int getopt(int argc, char *argv[],
 const char *optstring);
extern char *optarg;
extern int optind, opterr, optopt;
#include <getopt.h>
int getopt_long(int argc, char *argv[],
 const char *optstring,
 const struct option *longopts, int *longindex);
int getopt_long_only(int argc, char *argv[],
 const char *optstring,
 const struct option *longopts, int *longindex);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getopt():

    _POSIX_C_SOURCE >= 2 || _XOPEN_SOURCE

getopt_long(), getopt_long_only():

    _GNU_SOURCE

DESCRIPTION

The getopt() function parses the command-line arguments. Its arguments argc and argv are the argument count and array as passed to the main() function on program invocation. An element of argv that starts with ‘-’ (and is not exactly “-” or “–”) is an option element. The characters of this element (aside from the initial ‘-’) are option characters. If getopt() is called repeatedly, it returns successively each of the option characters from each of the option elements.

The variable optind is the index of the next element to be processed in argv. The system initializes this value to 1. The caller can reset it to 1 to restart scanning of the same argv, or when scanning a new argument vector.

If getopt() finds another option character, it returns that character, updating the external variable optind and a static variable nextchar so that the next call to getopt() can resume the scan with the following option character or argv-element.

If there are no more option characters, getopt() returns -1. Then optind is the index in argv of the first argv-element that is not an option.

optstring is a string containing the legitimate option characters. A legitimate option character is any visible one byte ascii(7) character (for which isgraph(3) would return nonzero) that is not ‘-’, ‘:’, or ‘;’. If such a character is followed by a colon, the option requires an argument, so getopt() places a pointer to the following text in the same argv-element, or the text of the following argv-element, in optarg. Two colons mean an option takes an optional arg; if there is text in the current argv-element (i.e., in the same word as the option name itself, for example, “-oarg”), then it is returned in optarg, otherwise optarg is set to zero. This is a GNU extension. If optstring contains W followed by a semicolon, then -W foo is treated as the long option –foo. (The -W option is reserved by POSIX.2 for implementation extensions.) This behavior is a GNU extension, not available with libraries before glibc 2.

By default, getopt() permutes the contents of argv as it scans, so that eventually all the nonoptions are at the end. Two other scanning modes are also implemented. If the first character of optstring is ‘+’ or the environment variable POSIXLY_CORRECT is set, then option processing stops as soon as a nonoption argument is encountered. If ‘+’ is not the first character of optstring, it is treated as a normal option. If POSIXLY_CORRECT behaviour is required in this case optstring will contain two ‘+’ symbols. If the first character of optstring is ‘-’, then each nonoption argv-element is handled as if it were the argument of an option with character code 1. (This is used by programs that were written to expect options and other argv-elements in any order and that care about the ordering of the two.) The special argument “–” forces an end of option-scanning regardless of the scanning mode.

While processing the option list, getopt() can detect two kinds of errors: (1) an option character that was not specified in optstring and (2) a missing option argument (i.e., an option at the end of the command line without an expected argument). Such errors are handled and reported as follows:

  • By default, getopt() prints an error message on standard error, places the erroneous option character in optopt, and returns ‘?’ as the function result.

  • If the caller has set the global variable opterr to zero, then getopt() does not print an error message. The caller can determine that there was an error by testing whether the function return value is ‘?’. (By default, opterr has a nonzero value.)

  • If the first character (following any optional ‘+’ or ‘-’ described above) of optstring is a colon (’:’), then getopt() likewise does not print an error message. In addition, it returns ‘:’ instead of ‘?’ to indicate a missing option argument. This allows the caller to distinguish the two different types of errors.

getopt_long() and getopt_long_only()

The getopt_long() function works like getopt() except that it also accepts long options, started with two dashes. (If the program accepts only long options, then optstring should be specified as an empty string (""), not NULL.) Long option names may be abbreviated if the abbreviation is unique or is an exact match for some defined option. A long option may take a parameter, of the form –arg=param or –arg param.

longopts is a pointer to the first element of an array of struct option declared in <getopt.h> as

struct option {
    const char *name;
    int         has_arg;
    int        *flag;
    int         val;
};

The meanings of the different fields are:

name
is the name of the long option.

has_arg
is: no_argument (or 0) if the option does not take an argument; required_argument (or 1) if the option requires an argument; or optional_argument (or 2) if the option takes an optional argument.

flag
specifies how results are returned for a long option. If flag is NULL, then getopt_long() returns val. (For example, the calling program may set val to the equivalent short option character.) Otherwise, getopt_long() returns 0, and flag points to a variable which is set to val if the option is found, but left unchanged if the option is not found.

val
is the value to return, or to load into the variable pointed to by flag.

The last element of the array has to be filled with zeros.

If longindex is not NULL, it points to a variable which is set to the index of the long option relative to longopts.

getopt_long_only() is like getopt_long(), but ‘-’ as well as “–” can indicate a long option. If an option that starts with ‘-’ (not “–”) doesn’t match a long option, but does match a short option, it is parsed as a short option instead.

RETURN VALUE

If an option was successfully found, then getopt() returns the option character. If all command-line options have been parsed, then getopt() returns -1. If getopt() encounters an option character that was not in optstring, then ‘?’ is returned. If getopt() encounters an option with a missing argument, then the return value depends on the first character in optstring: if it is ‘:’, then ‘:’ is returned; otherwise ‘?’ is returned.

getopt_long() and getopt_long_only() also return the option character when a short option is recognized. For a long option, they return val if flag is NULL, and 0 otherwise. Error and -1 returns are the same as for getopt(), plus ‘?’ for an ambiguous match or an extraneous parameter.

ENVIRONMENT

POSIXLY_CORRECT
If this is set, then option processing stops as soon as a nonoption argument is encountered.

_<PID>_GNU_nonoption_argv_flags_
This variable was used by bash(1) 2.0 to communicate to glibc which arguments are the results of wildcard expansion and so should not be considered as options. This behavior was removed in bash(1) 2.01, but the support remains in glibc.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getopt(), getopt_long(), getopt_long_only()

Thread safety

MT-Unsafe race:getopt env

VERSIONS

POSIX specifies that the argv array argument should be const, but these functions permute its elements unless the environment variable POSIXLY_CORRECT is set. const is used in the actual prototype to be compatible with other systems; however, this page doesn’t show the qualifier, to avoid confusing readers.

STANDARDS

getopt()
POSIX.1-2008.

getopt_long()
getopt_long_only()
GNU.

The use of ‘+’ and ‘-’ in optstring is a GNU extension.

HISTORY

getopt()
POSIX.1-2001, and POSIX.2.

On some older implementations, getopt() was declared in <stdio.h>. SUSv1 permitted the declaration to appear in either <unistd.h> or <stdio.h>. POSIX.1-1996 marked the use of <stdio.h> for this purpose as LEGACY. POSIX.1-2001 does not require the declaration to appear in <stdio.h>.

NOTES

A program that scans multiple argument vectors, or rescans the same vector more than once, and wants to make use of GNU extensions such as ‘+’ and ‘-’ at the start of optstring, or changes the value of POSIXLY_CORRECT between scans, must reinitialize getopt() by resetting optind to 0, rather than the traditional value of 1. (Resetting to 0 forces the invocation of an internal initialization routine that rechecks POSIXLY_CORRECT and checks for GNU extensions in optstring.)

Command-line arguments are parsed in strict order meaning that an option requiring an argument will consume the next argument, regardless of whether that argument is the correctly specified option argument or simply the next option (in the scenario the user mis-specifies the command line). For example, if optstring is specified as “1n:” and the user specifies the command line arguments incorrectly as prog -n -1, the -n option will be given the optarg value “-1”, and the -1 option will be considered to have not been specified.

EXAMPLES

getopt()

The following trivial example program uses getopt() to handle two program options: -n, with no associated value; and -t val, which expects an associated value.

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int
main(int argc, char *argv[])
{
    int flags, opt;
    int nsecs, tfnd;
    nsecs = 0;
    tfnd = 0;
    flags = 0;
    while ((opt = getopt(argc, argv, "nt:")) != -1) {
        switch (opt) {
        case 'n':
            flags = 1;
            break;
        case 't':
            nsecs = atoi(optarg);
            tfnd = 1;
            break;
        default: /* '?' */
            fprintf(stderr, "Usage: %s [-t nsecs] [-n] name

“, argv[0]); exit(EXIT_FAILURE); } } printf(“flags=%d; tfnd=%d; nsecs=%d; optind=%d “, flags, tfnd, nsecs, optind); if (optind >= argc) { fprintf(stderr, “Expected argument after options “); exit(EXIT_FAILURE); } printf(“name argument = %s “, argv[optind]); /* Other code omitted */ exit(EXIT_SUCCESS); }

getopt_long()

The following example program illustrates the use of getopt_long() with most of its features.

#include <getopt.h>
#include <stdio.h>     /* for printf */
#include <stdlib.h>    /* for exit */
int
main(int argc, char *argv[])
{
    int c;
    int digit_optind = 0;
    while (1) {
        int this_option_optind = optind ? optind : 1;
        int option_index = 0;
        static struct option long_options[] = {
            {"add",     required_argument, 0,  0 },
            {"append",  no_argument,       0,  0 },
            {"delete",  required_argument, 0,  0 },
            {"verbose", no_argument,       0,  0 },
            {"create",  required_argument, 0, 'c'},
            {"file",    required_argument, 0,  0 },
            {0,         0,                 0,  0 }
        };
        c = getopt_long(argc, argv, "abc:d:012",
                        long_options, &option_index);
        if (c == -1)
            break;
        switch (c) {
        case 0:
            printf("option %s", long_options[option_index].name);
            if (optarg)
                printf(" with arg %s", optarg);
            printf("

“); break; case ‘0’: case ‘1’: case ‘2’: if (digit_optind != 0 && digit_optind != this_option_optind) printf(“digits occur in two different argv-elements. “); digit_optind = this_option_optind; printf(“option %c “, c); break; case ‘a’: printf(“option a “); break; case ‘b’: printf(“option b “); break; case ‘c’: printf(“option c with value ‘%s’ “, optarg); break; case ’d’: printf(“option d with value ‘%s’ “, optarg); break; case ‘?’: break; default: printf(”?? getopt returned character code 0%o ?? “, c); } } if (optind < argc) { printf(“non-option ARGV-elements: “); while (optind < argc) printf("%s “, argv[optind++]); printf(” “); } exit(EXIT_SUCCESS); }

SEE ALSO

getopt(1), getsubopt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2547 - Linux cli command pthread_attr_setinheritsched

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_attr_setinheritsched and provides detailed information about the command pthread_attr_setinheritsched, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_attr_setinheritsched.

NAME 🖥️ pthread_attr_setinheritsched 🖥️

set/get inherit-scheduler attribute in thread attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_attr_setinheritsched(pthread_attr_t *attr,
 int inheritsched);
int pthread_attr_getinheritsched(const pthread_attr_t *restrict attr,
 int *restrict inheritsched);

DESCRIPTION

The pthread_attr_setinheritsched() function sets the inherit-scheduler attribute of the thread attributes object referred to by attr to the value specified in inheritsched. The inherit-scheduler attribute determines whether a thread created using the thread attributes object attr will inherit its scheduling attributes from the calling thread or whether it will take them from attr.

The following scheduling attributes are affected by the inherit-scheduler attribute: scheduling policy (pthread_attr_setschedpolicy(3)), scheduling priority (pthread_attr_setschedparam(3)), and contention scope (pthread_attr_setscope(3)).

The following values may be specified in inheritsched:

PTHREAD_INHERIT_SCHED
Threads that are created using attr inherit scheduling attributes from the creating thread; the scheduling attributes in attr are ignored.

PTHREAD_EXPLICIT_SCHED
Threads that are created using attr take their scheduling attributes from the values specified by the attributes object.

The default setting of the inherit-scheduler attribute in a newly initialized thread attributes object is PTHREAD_INHERIT_SCHED.

The pthread_attr_getinheritsched() returns the inherit-scheduler attribute of the thread attributes object attr in the buffer pointed to by inheritsched.

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

pthread_attr_setinheritsched() can fail with the following error:

EINVAL
Invalid value in inheritsched.

POSIX.1 also documents an optional ENOTSUP error (“attempt was made to set the attribute to an unsupported value”) for pthread_attr_setinheritsched().

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_attr_setinheritsched(), pthread_attr_getinheritsched()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.0. POSIX.1-2001.

BUGS

As at glibc 2.8, if a thread attributes object is initialized using pthread_attr_init(3), then the scheduling policy of the attributes object is set to SCHED_OTHER and the scheduling priority is set to 0. However, if the inherit-scheduler attribute is then set to PTHREAD_EXPLICIT_SCHED, then a thread created using the attribute object wrongly inherits its scheduling attributes from the creating thread. This bug does not occur if either the scheduling policy or scheduling priority attribute is explicitly set in the thread attributes object before calling pthread_create(3).

EXAMPLES

See pthread_setschedparam(3).

SEE ALSO

pthread_attr_init(3), pthread_attr_setschedparam(3), pthread_attr_setschedpolicy(3), pthread_attr_setscope(3), pthread_create(3), pthread_setschedparam(3), pthread_setschedprio(3), pthreads(7), sched(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2548 - Linux cli command Net_Server_SIGpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Server_SIGpm and provides detailed information about the command Net_Server_SIGpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Server_SIGpm.

NAME 🖥️ Net_Server_SIGpm 🖥️

adpf - Safer signal handling

SYNOPSIS

use Net::Server::SIG qw(register_sig check_sigs); use IO::Select (); use POSIX qw(WNOHANG); my $select = IO::Select->new(); register_sig(PIPE => IGNORE, HUP => DEFAULT, USR1 => sub { print “I got a SIG $_[0] “; }, USR2 => sub { print “I got a SIG $_[0] “; }, CHLD => sub { 1 while waitpid(-1, WNOHANG) > 0; }, ); # add some handles to the select $select->add(\STDIN); # loop forever trying to stay alive while (1) { # do a timeout to see if any signals got passed us # while we were processing another signal my @fh = $select->can_read(10); my $key; my $val; # this is the handler for safe (fine under unsafe also) if (check_sigs()) { # or my @sigs = check_sigs(); next unless @fh; } my $handle = $fh[@fh]; # do something with the handle }

DESCRIPTION

Signals prior in Perl prior to 5.7 were unsafe. Since then signals have been implemented in a more safe algorithm. Net::Server::SIG provides backwards compatibility, while still working reliably with newer releases.

Using a property of the select() function, Net::Server::SIG attempts to fix the unsafe problem. If a process is blocking on select() any signal will short circuit the select. Using this concept, Net::Server::SIG does the least work possible (changing one bit from 0 to 1). And depends upon the actual processing of the signals to take place immediately after the select call via the check_sigs function. See the example shown above and also see the sigtest.pl script located in the examples directory of this distribution.

FUNCTIONS

“register_sig($SIG => \code_ref)”
Takes key/value pairs where the key is the signal name, and the argument is either a code ref, or the words ‘DEFAULT’ or ‘IGNORE’. The function register_sig must be used in conjunction with check_sigs, and with a blocking select() function call Ω- otherwise, you will observe the registered signal mysteriously vanish.

“unregister_sig($SIG)”
Takes the name of a signal as an argument. Calls register_sig with a this signal name and ‘DEFAULT’ as arguments (same as register_sig(SIG,‘DEFAULT’)

“check_sigs()”
Checks to see if any registered signals have occurred. If so, it will play the registered code ref for that signal. Return value is array containing any SIGNAL names that had occurred.

“sig_is_registered($SIG)”
Takes a signal name and returns any registered code_ref for that signal.

AUTHORS

Paul Seamons ([email protected])

Rob B Brown ([email protected]) - Provided a sounding board and feedback in creating Net::Server::SIG and sigtest.pl.

LICENSE

This package may be distributed under the terms of either the GNU General Public License or the Perl Artistic License All rights reserved.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2549 - Linux cli command XmbufGetScreenInfo

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XmbufGetScreenInfo and provides detailed information about the command XmbufGetScreenInfo, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XmbufGetScreenInfo.

NAME 🖥️ XmbufGetScreenInfo 🖥️

X multibuffering functions

SYNTAX

#include <X11/extensions/multibuf.h>

Bool XmbufQueryExtension(
    Display *dpy,
    Display *dpy,
    int *event_base_return,
    int *error_base_return);

Status XmbufGetVersion(
    Display *dpy,
    int *major_version_return,
    int *minor_version_return);

int XmbufCreateBuffers(
    Display *dpy,
    Window window,
    int count,
    int update_action,
    int update_hint,
    Multibuffer *buffers_update);

void XmbufDestroyBuffers(
    Display *dpy,
    Window window);

void XmbufDisplayBuffers(
    Display *dpy,
    int count,
    Multibuffer *buffers,
    int min_delay,
    int max_delay);

Status XmbufGetWindowAttributes(
    Display *dpy,
    Window window,
    XmbufWindowAttributes *attributes);

void XmbufChangeWindowAttributes(
    Display *dpy,
    Window window,
    unsigned long valuemask,
    XmbufSetWindowAttributes *attributes);

Status XmbufGetBufferAttributes(
    Display *dpy,
    Multibuffer buffer,
    XmbufBufferAttributes *attributes);

void XmbufChangeBufferAttributes(
    Display *dpy,
    Multibuffer buffer,
    unsigned long valuemask,
    XmbufSetBufferAttributes *attributes);

Status XmbufGetScreenInfo(
    Display *dpy,
    Drawable drawable,
    int *nmono_return,
    XmbufBufferInfo **mono_info_return,
    int *nstereo_return,
    XmbufBufferInfo **stereo_info_return);

Window XmbufCreateStereoWindow(
    Display *dpy,
    Window parent,
    int x,
    int y,
    unsigned int width,
    unsigned int height,
    unsigned int border_width,
    int depth,
    unsigned int class,                 /* InputOutput, InputOnly*/
    Visual *visual,
    unsigned long valuemask,
    XSetWindowAttributes *attributes,
    Multibuffer *left_return,
    Multibuffer *right_return);

STRUCTURES

Events:

typedef struct {
    int type;   /* of event */
    unsigned long serial;       /* # of last request processed by server */
    int send_event;     /* true if this came from a SendEvent request */
    Display *display;   /* Display the event was read from */
    Multibuffer buffer; /* buffer of event */
    int state;  /* see Clobbered constants above */
} XmbufClobberNotifyEvent;

typedef struct {
    int type;   /* of event */
    unsigned long serial;       /* # of last request processed by server */
    int send_event;     /* true if this came from a SendEvent request */
    Display *display;   /* Display the event was read from */
    Multibuffer buffer; /* buffer of event */
} XmbufUpdateNotifyEvent;

Per-window attributes that can be got:

typedef struct {
    int displayed_index;	/* which buffer is being displayed */
    int update_action;	/* Undefined, Background, Untouched, Copied */
    int update_hint;	/* Frequent, Intermittent, Static */
    int window_mode;	/* Mono, Stereo */
    int nbuffers;	/* Number of buffers */
    Multibuffer *buffers;	/* Buffers */
} XmbufWindowAttributes;

Per-window attributes that can be set:

typedef struct {
    int update_hint;	/* Frequent, Intermittent, Static */
} XmbufSetWindowAttributes;

Per-buffer attributes that can be got:

typedef struct {
    Window window;	/* which window this belongs to */
    unsigned long event_mask;	/* events that have been selected */
    int buffer_index;	/* which buffer is this */
    int side;	/* Mono, Left, Right */
} XmbufBufferAttributes;

Per-buffer attributes that can be set:

typedef struct {
    unsigned long event_mask;	/* events that have been selected */
} XmbufSetBufferAttributes;

Per-screen buffer info (there will be lists of them):

typedef struct {
    VisualID visualid;	/* visual usable at this depth */
    int max_buffers;	/* most buffers for this visual */
    int depth;	/* depth of buffers to be created */
} XmbufBufferInfo;

DESCRIPTION

The application programming library for the X11 Double-Buffering, Multi-Buffering, and Stereo Extension contains the interfaces described below. With the exception of * XmbufQueryExtension *, if any of these routines are called with a display that does not support the extension, the ExtensionErrorHandler (which can be set with * XSetExtensionErrorHandler * and functions the same way as * XSetErrorHandler *) will be called and the function will then return.

* XmbufQueryExtension * returns * True * if the multibuffering/stereo extension is available on the given display. If the extension exists, the value of the first event code (which should be added to the event type constants * MultibufferClobberNotify * and * MultibufferUpdateNotify * to get the actual values) is stored into event_base_return and the value of the first error code (which should be added to the error type constant * MultibufferBadBuffer * to get the actual value) is stored into error_base_return.

* XmbufGetVersion * gets the major and minor version numbers of the extension. The return value is zero if an error occurs or non-zero if no error happens.

* XmbufCreateBuffers * requests that “count” buffers be created with the given update_action and update_hint and be associated with the indicated window. The number of buffers created is returned (zero if an error occurred) and buffers_update is filled in with that many Multibuffer identifiers.

* XmbufDestroyBuffers * destroys the buffers associated with the given window.

* XmbufDisplayBuffers * displays the indicated buffers their appropriate windows within max_delay milliseconds after min_delay milliseconds have passed. No two buffers may be associated with the same window or else a Match error is generated.

* XmbufGetWindowAttributes * gets the multibuffering attributes that apply to all buffers associated with the given window. The list of buffers returns may be freed with * XFree *. Returns non-zero on success and zero if an error occurs.

* XmbufChangeWindowAttributes * sets the multibuffering attributes that apply to all buffers associated with the given window. This is currently limited to the update_hint.

* XmbufGetBufferAttributes * gets the attributes for the indicated buffer. Returns non-zero on success and zero if an error occurs.

* XmbufChangeBufferAttributes * sets the attributes for the indicated buffer. This is currently limited to the event_mask.

* XmbufGetScreenInfo * gets the parameters controlling how mono and stereo windows may be created on the screen of the given drawable. The numbers of sets of visual and depths are returned in nmono_return and nstereo_return. If nmono_return is greater than zero, then mono_info_return is set to the address of an array of * XmbufBufferInfo * structures describing the various visuals and depths that may be used. Otherwise, mono_info_return is set to NULL. Similarly, stereo_info_return is set according to nstereo_return. The storage returned in mono_info_return and stereo_info_return may be released by * XFree *. If no errors are encounted, non-zero will be returned.

* XmbufCreateStereoWindow * creates a stereo window in the same way that * XCreateWindow * creates a mono window. The buffer ids for the left and right buffers are returned in left_return and right_return, respectively. If an extension error handler that returns is installed, * None * will be returned if the extension is not available on this display.

PREDEFINED VALUES

Update_action field:

 MultibufferUpdateActionUndefined   MultibufferUpdateActionBackground   MultibufferUpdateActionUntouched   MultibufferUpdateActionCopied 

Update_hint field:

 MultibufferUpdateHintFrequent   MultibufferUpdateHintIntermittent   MultibufferUpdateHintStatic 

Valuemask fields:

 MultibufferWindowUpdateHint   MultibufferBufferEventMask 

Mono vs. stereo and left vs. right:

 MultibufferModeMono   MultibufferModeStereo   MultibufferSideMono   MultibufferSideLeft   MultibufferSideRight 

Clobber state:

 MultibufferUnclobbered   MultibufferPartiallyClobbered   MultibufferFullyClobbered 

Event stuff:

 MultibufferClobberNotifyMask   MultibufferUpdateNotifyMask   MultibufferClobberNotify   MultibufferUpdateNotify   MultibufferNumberEvents   MultibufferBadBuffer   MultibufferNumberErrors 

BUGS

This manual page needs more work.

SEE ALSO

Extending X for Double Buffering, Multi-Buffering, and Stereo

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2550 - Linux cli command Image_ExifTool_RIFFpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_RIFFpm and provides detailed information about the command Image_ExifTool_RIFFpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_RIFFpm.

NAME 🖥️ Image_ExifTool_RIFFpm 🖥️

Read RIFF/AVI/WAV meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to extract information from RIFF-based (Resource Interchange File Format) files, including AVI videos, WAV audio files and WEBP images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.exif.org/Exif2-2.PDF>

<http://www.vlsi.fi/datasheets/vs1011.pdf>

<http://www.music-center.com.br/spec_rif.htm>

<http://www.codeproject.com/audio/wavefiles.asp>

<http://msdn.microsoft.com/archive/en-us/directx9_c/directx/htm/avirifffilereference.asp>

<http://wiki.multimedia.cx/index.php?title=TwoCC>

<https://developers.google.com/speed/webp/docs/riff_container>

<https://tech.ebu.ch/docs/tech/tech3306-2009.pdf>

SEE ALSO

“RIFF Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2551 - Linux cli command sincos

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sincos and provides detailed information about the command sincos, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sincos.

NAME 🖥️ sincos 🖥️

calculate sin and cos simultaneously

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <math.h>
void sincos(double x, double *sin, double *cos);
void sincosf(float x, float *sin, float *cos);
void sincosl(long double x, long double *sin, long double *cos);

DESCRIPTION

Several applications need sine and cosine of the same angle x. These functions compute both at the same time, and store the results in *sin and *cos. Using this function can be more efficient than two separate calls to sin(3) and cos(3).

If x is a NaN, a NaN is returned in *sin and *cos.

If x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned in *sin and *cos.

RETURN VALUE

These functions return void.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is an infinity
errno is set to EDOM (but see BUGS). An invalid floating-point exception (FE_INVALID) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sincos(), sincosf(), sincosl()

Thread safetyMT-Safe

STANDARDS

GNU.

HISTORY

glibc 2.1.

NOTES

To see the performance advantage of sincos(), it may be necessary to disable gcc(1) built-in optimizations, using flags such as:

cc -O -lm -fno-builtin prog.c

BUGS

Before glibc 2.22, the glibc implementation did not set errno to EDOM when a domain error occurred.

SEE ALSO

cos(3), sin(3), tan(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2552 - Linux cli command freehostent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command freehostent and provides detailed information about the command freehostent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the freehostent.

NAME 🖥️ freehostent 🖥️

get network hostnames and addresses

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
[[deprecated]] struct hostent *getipnodebyname(const char *name, int af,
 int flags, int *error_num);
[[deprecated]] struct hostent *getipnodebyaddr(const void addr[.len],
 size_t len, int af,
 int *error_num);
[[deprecated]] void freehostent(struct hostent *ip);

DESCRIPTION

These functions are deprecated (and unavailable in glibc). Use getaddrinfo(3) and getnameinfo(3) instead.

The getipnodebyname() and getipnodebyaddr() functions return the names and addresses of a network host. These functions return a pointer to the following structure:

struct hostent {
    char  *h_name;
    char **h_aliases;
    int    h_addrtype;
    int    h_length;
    char **h_addr_list;
};

These functions replace the gethostbyname(3) and gethostbyaddr(3) functions, which could access only the IPv4 network address family. The getipnodebyname() and getipnodebyaddr() functions can access multiple network address families.

Unlike the gethostby functions, these functions return pointers to dynamically allocated memory. The freehostent() function is used to release the dynamically allocated memory after the caller no longer needs the hostent structure.

getipnodebyname() arguments

The getipnodebyname() function looks up network addresses for the host specified by the name argument. The af argument specifies one of the following values:

AF_INET
The name argument points to a dotted-quad IPv4 address or a name of an IPv4 network host.

AF_INET6
The name argument points to a hexadecimal IPv6 address or a name of an IPv6 network host.

The flags argument specifies additional options. More than one option can be specified by bitwise OR-ing them together. flags should be set to 0 if no options are desired.

AI_V4MAPPED
This flag is used with AF_INET6 to request a query for IPv4 addresses instead of IPv6 addresses; the IPv4 addresses will be mapped to IPv6 addresses.

AI_ALL
This flag is used with AI_V4MAPPED to request a query for both IPv4 and IPv6 addresses. Any IPv4 address found will be mapped to an IPv6 address.

AI_ADDRCONFIG
This flag is used with AF_INET6 to further request that queries for IPv6 addresses should not be made unless the system has at least one IPv6 address assigned to a network interface, and that queries for IPv4 addresses should not be made unless the system has at least one IPv4 address assigned to a network interface. This flag may be used by itself or with the AI_V4MAPPED flag.

AI_DEFAULT
This flag is equivalent to (AI_ADDRCONFIG | AI_V4MAPPED).

getipnodebyaddr() arguments

The getipnodebyaddr() function looks up the name of the host whose network address is specified by the addr argument. The af argument specifies one of the following values:

AF_INET
The addr argument points to a struct in_addr and len must be set to sizeof(struct in_addr).

AF_INET6
The addr argument points to a struct in6_addr and len must be set to sizeof(struct in6_addr).

RETURN VALUE

NULL is returned if an error occurred, and error_num will contain an error code from the following list:

HOST_NOT_FOUND
The hostname or network address was not found.

NO_ADDRESS
The domain name server recognized the network address or name, but no answer was returned. This can happen if the network host has only IPv4 addresses and a request has been made for IPv6 information only, or vice versa.

NO_RECOVERY
The domain name server returned a permanent failure response.

TRY_AGAIN
The domain name server returned a temporary failure response. You might have better luck next time.

A successful query returns a pointer to a hostent structure that contains the following fields:

h_name
This is the official name of this network host.

h_aliases
This is an array of pointers to unofficial aliases for the same host. The array is terminated by a null pointer.

h_addrtype
This is a copy of the af argument to getipnodebyname() or getipnodebyaddr(). h_addrtype will always be AF_INET if the af argument was AF_INET. h_addrtype will always be AF_INET6 if the af argument was AF_INET6.

h_length
This field will be set to sizeof(struct in_addr) if h_addrtype is AF_INET, and to sizeof(struct in6_addr) if h_addrtype is AF_INET6.

h_addr_list
This is an array of one or more pointers to network address structures for the network host. The array is terminated by a null pointer.

STANDARDS

None.

HISTORY

RFC 2553.

Present in glibc 2.1.91-95, but removed again. Several UNIX-like systems support them, but all call them deprecated.

SEE ALSO

getaddrinfo(3), getnameinfo(3), inet_ntop(3), inet_pton(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2553 - Linux cli command qsort_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command qsort_r and provides detailed information about the command qsort_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the qsort_r.

NAME 🖥️ qsort_r 🖥️

sort an array

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
void qsort(void base[.size * .nmemb], size_t nmemb, size_t size,
 int (*compar)(const void [.size], const void [.size]));
void qsort_r(void base[.size * .nmemb], size_t nmemb, size_t size,
 int (*compar)(const void [.size], const void [.size], void *),
 void *arg);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

qsort_r():

    _GNU_SOURCE

DESCRIPTION

The qsort() function sorts an array with nmemb elements of size size. The base argument points to the start of the array.

The contents of the array are sorted in ascending order according to a comparison function pointed to by compar, which is called with two arguments that point to the objects being compared.

The comparison function must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second. If two members compare as equal, their order in the sorted array is undefined.

The qsort_r() function is identical to qsort() except that the comparison function compar takes a third argument. A pointer is passed to the comparison function via arg. In this way, the comparison function does not need to use global variables to pass through arbitrary arguments, and is therefore reentrant and safe to use in threads.

RETURN VALUE

The qsort() and qsort_r() functions return no value.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

qsort(), qsort_r()

Thread safetyMT-Safe

STANDARDS

qsort()
C11, POSIX.1-2008.

HISTORY

qsort()
POSIX.1-2001, C89, SVr4, 4.3BSD.

qsort_r()
glibc 2.8.

NOTES

To compare C strings, the comparison function can call strcmp(3), as shown in the example below.

EXAMPLES

For one example of use, see the example under bsearch(3).

Another example is the following program, which sorts the strings given in its command-line arguments:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static int
cmpstringp(const void *p1, const void *p2)
{
    /* The actual arguments to this function are "pointers to
       pointers to char", but strcmp(3) arguments are "pointers
       to char", hence the following cast plus dereference. */
    return strcmp(*(const char **) p1, *(const char **) p2);
}
int
main(int argc, char *argv[])
{
    if (argc < 2) {
        fprintf(stderr, "Usage: %s <string>...

“, argv[0]); exit(EXIT_FAILURE); } qsort(&argv[1], argc - 1, sizeof(char *), cmpstringp); for (size_t j = 1; j < argc; j++) puts(argv[j]); exit(EXIT_SUCCESS); }

SEE ALSO

sort(1), alphasort(3), strcmp(3), versionsort(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2554 - Linux cli command tdelete

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tdelete and provides detailed information about the command tdelete, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tdelete.

NAME 🖥️ tdelete 🖥️

manage a binary search tree

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <search.h>
typedef enum { preorder, postorder, endorder, leaf } VISIT;
void *tsearch(const void *key, void **rootp,
 int (*compar)(const void *, const void *));
void *tfind(const void *key, void *const *rootp,
 int (*compar)(const void *, const void *));
void *tdelete(const void *restrict key, void **restrict rootp,
 int (*compar)(const void *, const void *));
void twalk(const void *root,
 void (*action)(const void *nodep, VISIT which,
 int depth));
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <search.h>
void twalk_r(const void *root,
 void (*action)(const void *nodep, VISIT which,
 void *closure),
 void *closure);
void tdestroy(void *root, void (*free_node)(void *nodep));

DESCRIPTION

tsearch(), tfind(), twalk(), and tdelete() manage a binary search tree. They are generalized from Knuth (6.2.2) Algorithm T. The first field in each node of the tree is a pointer to the corresponding data item. (The calling program must store the actual data.) compar points to a comparison routine, which takes pointers to two items. It should return an integer which is negative, zero, or positive, depending on whether the first item is less than, equal to, or greater than the second.

tsearch() searches the tree for an item. key points to the item to be searched for. rootp points to a variable which points to the root of the tree. If the tree is empty, then the variable that rootp points to should be set to NULL. If the item is found in the tree, then tsearch() returns a pointer to the corresponding tree node. (In other words, tsearch() returns a pointer to a pointer to the data item.) If the item is not found, then tsearch() adds it, and returns a pointer to the corresponding tree node.

tfind() is like tsearch(), except that if the item is not found, then tfind() returns NULL.

tdelete() deletes an item from the tree. Its arguments are the same as for tsearch().

twalk() performs depth-first, left-to-right traversal of a binary tree. root points to the starting node for the traversal. If that node is not the root, then only part of the tree will be visited. twalk() calls the user function action each time a node is visited (that is, three times for an internal node, and once for a leaf). action, in turn, takes three arguments. The first argument is a pointer to the node being visited. The structure of the node is unspecified, but it is possible to cast the pointer to a pointer-to-pointer-to-element in order to access the element stored within the node. The application must not modify the structure pointed to by this argument. The second argument is an integer which takes one of the values preorder, postorder, or endorder depending on whether this is the first, second, or third visit to the internal node, or the value leaf if this is the single visit to a leaf node. (These symbols are defined in <search.h>.) The third argument is the depth of the node; the root node has depth zero.

(More commonly, preorder, postorder, and endorder are known as preorder, inorder, and postorder: before visiting the children, after the first and before the second, and after visiting the children. Thus, the choice of name postorder is rather confusing.)

twalk_r() is similar to twalk(), but instead of the depth argument, the closure argument pointer is passed to each invocation of the action callback, unchanged. This pointer can be used to pass information to and from the callback function in a thread-safe fashion, without resorting to global variables.

tdestroy() removes the whole tree pointed to by root, freeing all resources allocated by the tsearch() function. For the data in each tree node the function free_node is called. The pointer to the data is passed as the argument to the function. If no such work is necessary, free_node must point to a function doing nothing.

RETURN VALUE

tsearch() returns a pointer to a matching node in the tree, or to the newly added node, or NULL if there was insufficient memory to add the item. tfind() returns a pointer to the node, or NULL if no match is found. If there are multiple items that match the key, the item whose node is returned is unspecified.

tdelete() returns a pointer to the parent of the node deleted, or NULL if the item was not found. If the deleted node was the root node, tdelete() returns a dangling pointer that must not be accessed.

tsearch(), tfind(), and tdelete() also return NULL if rootp was NULL on entry.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tsearch(), tfind(), tdelete()

Thread safetyMT-Safe race:rootp

twalk()

Thread safetyMT-Safe race:root

twalk_r()

Thread safetyMT-Safe race:root

tdestroy()

Thread safetyMT-Safe

STANDARDS

tsearch()
tfind()
tdelete()
twalk()
POSIX.1-2008.

tdestroy()
twalk_r()
GNU.

HISTORY

tsearch()
tfind()
tdelete()
twalk()
POSIX.1-2001, POSIX.1-2008, SVr4.

twalk_r()
glibc 2.30.

NOTES

twalk() takes a pointer to the root, while the other functions take a pointer to a variable which points to the root.

tdelete() frees the memory required for the node in the tree. The user is responsible for freeing the memory for the corresponding data.

The example program depends on the fact that twalk() makes no further reference to a node after calling the user function with argument “endorder” or “leaf”. This works with the GNU library implementation, but is not in the System V documentation.

EXAMPLES

The following program inserts twelve random numbers into a binary tree, where duplicate numbers are collapsed, then prints the numbers in order.

#define _GNU_SOURCE     /* Expose declaration of tdestroy() */
#include <search.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
static void *root = NULL;
static void *
xmalloc(size_t n)
{
    void *p;
    p = malloc(n);
    if (p)
        return p;
    fprintf(stderr, "insufficient memory

“); exit(EXIT_FAILURE); } static int compare(const void *pa, const void pb) { if ((int *) pa < *(int ) pb) return -1; if ((int *) pa > *(int *) pb) return 1; return 0; } static void action(const void *nodep, VISIT which, int depth) { int *datap; switch (which) { case preorder: break; case postorder: datap = *(int **) nodep; printf("%6d “, *datap); break; case endorder: break; case leaf: datap = *(int **) nodep; printf("%6d “, *datap); break; } } int main(void) { int *ptr; int **val; srand(time(NULL)); for (unsigned int i = 0; i < 12; i++) { ptr = xmalloc(sizeof(*ptr)); *ptr = rand() & 0xff; val = tsearch(ptr, &root, compare); if (val == NULL) exit(EXIT_FAILURE); if (*val != ptr) free(ptr); } twalk(root, action); tdestroy(root, free); exit(EXIT_SUCCESS); }

SEE ALSO

bsearch(3), hsearch(3), lsearch(3), qsort(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2555 - Linux cli command regcomp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command regcomp and provides detailed information about the command regcomp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the regcomp.

NAME 🖥️ regcomp 🖥️

POSIX regex functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <regex.h>
int regcomp(regex_t *restrict preg, const char *restrict regex,
 int cflags);
int regexec(const regex_t *restrict preg",constchar*restrict"string,
 size_t nmatch, regmatch_t pmatch[_Nullable restrict .nmatch],
 int eflags);
size_t regerror(int errcode, const regex_t *_Nullable restrict preg,
 char errbuf[_Nullable restrict .errbuf_size],
 size_t errbuf_size);
void regfree(regex_t *preg);
typedef struct {
 size_t re_nsub;
} regex_t;
typedef struct {
 regoff_t rm_so;
 regoff_t rm_eo;
} regmatch_t;
typedef /* ... */ regoff_t;

DESCRIPTION

Compilation

regcomp() is used to compile a regular expression into a form that is suitable for subsequent regexec() searches.

On success, the pattern buffer at *preg is initialized. regex is a null-terminated string. The locale must be the same when running regexec().

After regcomp() succeeds, preg->re_nsub holds the number of subexpressions in regex. Thus, a value of preg->re_nsub + 1 passed as nmatch to regexec() is sufficient to capture all matches.

cflags is the bitwise OR of zero or more of the following:

REG_EXTENDED
Use POSIX Extended Regular Expression syntax when interpreting regex. If not set, POSIX Basic Regular Expression syntax is used.

REG_ICASE
Do not differentiate case. Subsequent regexec() searches using this pattern buffer will be case insensitive.

REG_NOSUB
Report only overall success. regexec() will use only pmatch for REG_STARTEND, ignoring nmatch.

REG_NEWLINE
Match-any-character operators don’t match a newline.

A nonmatching list ([^…]) not containing a newline does not match a newline.

Match-beginning-of-line operator (^) matches the empty string immediately after a newline, regardless of whether eflags, the execution flags of regexec(), contains REG_NOTBOL.

Match-end-of-line operator ($) matches the empty string immediately before a newline, regardless of whether eflags contains REG_NOTEOL.

Matching

regexec() is used to match a null-terminated string against the compiled pattern buffer in *preg, which must have been initialised with regexec(). eflags is the bitwise OR of zero or more of the following flags:

REG_NOTBOL
The match-beginning-of-line operator always fails to match (but see the compilation flag REG_NEWLINE above). This flag may be used when different portions of a string are passed to regexec() and the beginning of the string should not be interpreted as the beginning of the line.

REG_NOTEOL
The match-end-of-line operator always fails to match (but see the compilation flag REG_NEWLINE above).

REG_STARTEND
Match [string + pmatch[0].rm_so,* string + pmatch[0].rm_eo*) instead of [string,* string + strlen(string)*). This allows matching embedded NUL bytes and avoids a strlen(3) on known-length strings. If any matches are returned (REG_NOSUB wasn’t passed to regcomp(), the match succeeded, and nmatch > 0), they overwrite pmatch as usual, and the match offsets remain relative to string (not string + pmatch[0].rm_so). This flag is a BSD extension, not present in POSIX.

Match offsets

Unless REG_NOSUB was passed to regcomp(), it is possible to obtain the locations of matches within string: regexec() fills nmatch elements of pmatch with results: pmatch[0] corresponds to the entire match, pmatch[1] to the first subexpression, etc. If there were more matches than nmatch, they are discarded; if fewer, unused elements of pmatch are filled with -1s.

Each returned valid (non--1) match corresponds to the range [string + rm_so,* string + rm_eo*).

regoff_t is a signed integer type capable of storing the largest value that can be stored in either an ptrdiff_t type or a ssize_t type.

Error reporting

regerror() is used to turn the error codes that can be returned by both regcomp() and regexec() into error message strings.

If preg isn’t a null pointer, errcode must be the latest error returned from an operation on preg.

If errbuf_size isn’t 0, up to errbuf_size bytes are copied to errbuf; the error string is always null-terminated, and truncated to fit.

Freeing

regfree() deinitializes the pattern buffer at *preg, freeing any associated memory; *preg must have been initialized via regcomp().

RETURN VALUE

regcomp() returns zero for a successful compilation or an error code for failure.

regexec() returns zero for a successful match or REG_NOMATCH for failure.

regerror() returns the size of the buffer required to hold the string.

ERRORS

The following errors can be returned by regcomp():

REG_BADBR
Invalid use of back reference operator.

REG_BADPAT
Invalid use of pattern operators such as group or list.

REG_BADRPT
Invalid use of repetition operators such as using ‘*’ as the first character.

REG_EBRACE
Un-matched brace interval operators.

REG_EBRACK
Un-matched bracket list operators.

REG_ECOLLATE
Invalid collating element.

REG_ECTYPE
Unknown character class name.

REG_EEND
Nonspecific error. This is not defined by POSIX.

REG_EESCAPE
Trailing backslash.

REG_EPAREN
Un-matched parenthesis group operators.

REG_ERANGE
Invalid use of the range operator; for example, the ending point of the range occurs prior to the starting point.

REG_ESIZE
Compiled regular expression requires a pattern buffer larger than 64 kB. This is not defined by POSIX.

REG_ESPACE
The regex routines ran out of memory.

REG_ESUBREG
Invalid back reference to a subexpression.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

regcomp(), regexec()

Thread safetyMT-Safe locale

regerror()

Thread safetyMT-Safe env

regfree()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

Prior to POSIX.1-2008, regoff_t was required to be capable of storing the largest value that can be stored in either an off_t type or a ssize_t type.

CAVEATS

re_nsub is only required to be initialized if REG_NOSUB wasn’t specified, but all known implementations initialize it regardless.

Both regex_t and regmatch_t may (and do) have more members, in any order. Always reference them by name.

EXAMPLES

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <regex.h>
#define ARRAY_SIZE(arr) (sizeof((arr)) / sizeof((arr)[0]))
static const char *const str =
        "1) John Driverhacker;
  1. John Doe;
  2. John Foo; “; static const char *const re = “John.*o”; int main(void) { static const char *s = str; regex_t regex; regmatch_t pmatch[1]; regoff_t off, len; if (regcomp(&regex, re, REG_NEWLINE)) exit(EXIT_FAILURE); printf(“String = "%s" “, str); printf(“Matches: “); for (unsigned int i = 0; ; i++) { if (regexec(&regex, s, ARRAY_SIZE(pmatch), pmatch, 0)) break; off = pmatch[0].rm_so + (s - str); len = pmatch[0].rm_eo - pmatch[0].rm_so; printf(”#%zu: “, i); printf(“offset = %jd; length = %jd “, (intmax_t) off, (intmax_t) len); printf(“substring = "%.*s" “, len, s + pmatch[0].rm_so); s += pmatch[0].rm_eo; } exit(EXIT_SUCCESS); }

SEE ALSO

grep(1), regex(7)

The glibc manual section, Regular Expressions

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2556 - Linux cli command pthread_mutex_trylock

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_mutex_trylock and provides detailed information about the command pthread_mutex_trylock, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_mutex_trylock.

NAME 🖥️ pthread_mutex_trylock 🖥️

operations on mutexes

SYNOPSIS

#include <pthread.h>
pthread_mutex_t fastmutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t recmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
pthread_mutex_t errchkmutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
int pthread_mutex_init(pthread_mutex_t *mutex,
 const pthread_mutexattr_t *mutexattr);
int pthread_mutex_lock(pthread_mutex_t *mutex);
int pthread_mutex_trylock(pthread_mutex_t *mutex);
int pthread_mutex_unlock(pthread_mutex_t *mutex);
int pthread_mutex_destroy(pthread_mutex_t *mutex);

DESCRIPTION

A mutex is a MUTual EXclusion device, and is useful for protecting shared data structures from concurrent modifications, and implementing critical sections and monitors.

A mutex has two possible states: unlocked (not owned by any thread), and locked (owned by one thread). A mutex can never be owned by two different threads simultaneously. A thread attempting to lock a mutex that is already locked by another thread is suspended until the owning thread unlocks the mutex first.

pthread_mutex_init initializes the mutex object pointed to by mutex according to the mutex attributes specified in mutexattr. If mutexattr is NULL, default attributes are used instead.

The LinuxThreads implementation supports only one mutex attributes, the mutex kind, which is either ``fast’’, ``recursive’’, or ``error checking’’. The kind of a mutex determines whether it can be locked again by a thread that already owns it. The default kind is ``fast’’. See pthread_mutexattr_init(3) for more information on mutex attributes.

Variables of type pthread_mutex_t can also be initialized statically, using the constants PTHREAD_MUTEX_INITIALIZER (for fast mutexes), PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP (for recursive mutexes), and PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP (for error checking mutexes).

pthread_mutex_lock locks the given mutex. If the mutex is currently unlocked, it becomes locked and owned by the calling thread, and pthread_mutex_lock returns immediately. If the mutex is already locked by another thread, pthread_mutex_lock suspends the calling thread until the mutex is unlocked.

If the mutex is already locked by the calling thread, the behavior of pthread_mutex_lock depends on the kind of the mutex. If the mutex is of the ``fast’’ kind, the calling thread is suspended until the mutex is unlocked, thus effectively causing the calling thread to deadlock. If the mutex is of the ``error checking’’ kind, pthread_mutex_lock returns immediately with the error code EDEADLK. If the mutex is of the ``recursive’’ kind, pthread_mutex_lock succeeds and returns immediately, recording the number of times the calling thread has locked the mutex. An equal number of pthread_mutex_unlock operations must be performed before the mutex returns to the unlocked state.

pthread_mutex_trylock behaves identically to pthread_mutex_lock, except that it does not block the calling thread if the mutex is already locked by another thread (or by the calling thread in the case of a ``fast’’ mutex). Instead, pthread_mutex_trylock returns immediately with the error code EBUSY.

pthread_mutex_unlock unlocks the given mutex. The mutex is assumed to be locked and owned by the calling thread on entrance to pthread_mutex_unlock. If the mutex is of the ``fast’’ kind, pthread_mutex_unlock always returns it to the unlocked state. If it is of the ``recursive’’ kind, it decrements the locking count of the mutex (number of pthread_mutex_lock operations performed on it by the calling thread), and only when this count reaches zero is the mutex actually unlocked.

On ``error checking’’ and ``recursive’’ mutexes, pthread_mutex_unlock actually checks at run-time that the mutex is locked on entrance, and that it was locked by the same thread that is now calling pthread_mutex_unlock. If these conditions are not met, an error code is returned and the mutex remains unchanged. ``Fast’’ mutexes perform no such checks, thus allowing a locked mutex to be unlocked by a thread other than its owner. This is non-portable behavior and must not be relied upon.

pthread_mutex_destroy destroys a mutex object, freeing the resources it might hold. The mutex must be unlocked on entrance. In the LinuxThreads implementation, no resources are associated with mutex objects, thus pthread_mutex_destroy actually does nothing except checking that the mutex is unlocked.

CANCELLATION

None of the mutex functions is a cancelation point, not even pthread_mutex_lock, in spite of the fact that it can suspend a thread for arbitrary durations. This way, the status of mutexes at cancelation points is predictable, allowing cancelation handlers to unlock precisely those mutexes that need to be unlocked before the thread stops executing. Consequently, threads using deferred cancelation should never hold a mutex for extended periods of time.

ASYNC-SIGNAL SAFETY

The mutex functions are not async-signal safe. What this means is that they should not be called from a signal handler. In particular, calling pthread_mutex_lock or pthread_mutex_unlock from a signal handler may deadlock the calling thread.

RETURN VALUE

pthread_mutex_init always returns 0. The other mutex functions return 0 on success and a non-zero error code on error.

ERRORS

The pthread_mutex_lock function returns the following error code on error:

EINVAL
The mutex has not been properly initialized.

EDEADLK
The mutex is already locked by the calling thread (``error checking’’ mutexes only).

The pthread_mutex_trylock function returns the following error codes on error:

EBUSY
The mutex could not be acquired because it was currently locked.

EINVAL
The mutex has not been properly initialized.

The pthread_mutex_unlock function returns the following error code on error:

EINVAL
The mutex has not been properly initialized.

EPERM
The calling thread does not own the mutex (``error checking’’ mutexes only).

The pthread_mutex_destroy function returns the following error code on error:

EBUSY
The mutex is currently locked.

SEE ALSO

pthread_mutexattr_init(3), pthread_mutexattr_setkind_np(3), pthread_cancel(3).

EXAMPLE

A shared global variable x can be protected by a mutex as follows:

int x;
pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER;

All accesses and modifications to x should be bracketed by calls to pthread_mutex_lock and pthread_mutex_unlock as follows:

pthread_mutex_lock(&mut);
/* operate on x */
pthread_mutex_unlock(&mut);
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2557 - Linux cli command XtReservePropertyAtom

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtReservePropertyAtom and provides detailed information about the command XtReservePropertyAtom, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtReservePropertyAtom.

NAME 🖥️ XtReservePropertyAtom 🖥️

maintain a cache of property atoms

SYNTAX

#include <X11/Intrinsic.h>

Atom XtReservePropertyAtom(Widget w);

void XtReleasePropertyAtom(Widget w, Atom atom);

ARGUMENTS

  1. Specifies the widget used to reserve the atom.

atom
Specifies the atom whose reservation is to be released.

DESCRIPTION

XtReservePropertyAtom returns an atom that may be used for properties in conjunction with conversion requests from widget w. The atom returned will be unique for the display of the widget specified.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2558 - Linux cli command Image_ExifTool_JVCpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_JVCpm and provides detailed information about the command Image_ExifTool_JVCpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_JVCpm.

NAME 🖥️ Image_ExifTool_JVCpm 🖥️

JVC EXIF maker notes tags

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains routines used by Image::ExifTool to interpret JVC maker notes.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

“JVC Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2559 - Linux cli command Net_DNS_RR_TKEYpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_TKEYpm and provides detailed information about the command Net_DNS_RR_TKEYpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_TKEYpm.

NAME 🖥️ Net_DNS_RR_TKEYpm 🖥️

DNS TKEY resource record

SYNOPSIS

use Net::DNS;

DESCRIPTION

Class for DNS TSIG Key (TKEY) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

algorithm

$algorithm = $rr->algorithm; $rr->algorithm( $algorithm );

The algorithm name is in the form of a domain name with the same meaning as in [RFC 2845]. The algorithm determines how the secret keying material agreed to using the TKEY RR is actually used to derive the algorithm specific key.

inception

$inception = $rr->inception; $rr->inception( $inception );

Time expressed as the number of non-leap seconds modulo 2**32 since the beginning of January 1970 GMT.

expiration

$expiration = $rr->expiration; $rr->expiration( $expiration );

Time expressed as the number of non-leap seconds modulo 2**32 since the beginning of January 1970 GMT.

mode

$mode = $rr->mode; $rr->mode( $mode );

The mode field specifies the general scheme for key agreement or the purpose of the TKEY DNS message, as defined in [RFC2930(2.5)].

error

$error = $rr->error; $rr->error( $error );

The error code field is an extended RCODE.

key

$key = $rr->key; $rr->key( $key );

Sequence of octets representing the key exchange data. The meaning of this data depends on the mode.

other

$other = $rr->other; $rr->other( $other );

Content not defined in the [RFC2930] specification but may be used in future extensions.

COPYRIGHT

Copyright (c)2000 Andrew Tridgell.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC2930 <https://tools.ietf.org/html/rfc2930>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2560 - Linux cli command Image_ExifTool_OpenEXRpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_OpenEXRpm and provides detailed information about the command Image_ExifTool_OpenEXRpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_OpenEXRpm.

NAME 🖥️ Image_ExifTool_OpenEXRpm 🖥️

Read OpenEXR meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to extract meta information from OpenEXR images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.openexr.com/documentation.html>

SEE ALSO

“OpenEXR Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2561 - Linux cli command Tk_Submethodspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Submethodspm and provides detailed information about the command Tk_Submethodspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Submethodspm.

NAME 🖥️ Tk_Submethodspm 🖥️

add aliases for tk sub-commands

SYNOPSIS

use Tk::Submethods ( command1 => [qw(sub1 sub2 sub3)], command2 => [qw(sub1 sub2 sub3)]);

DESCRIPTION

Creates ->commandSub(...) as an alias for ->command(sub,...) e.g. ->grabRelease for ->grab(release).

For each command/subcommand pair this creates a closure with command and subcommand as bound lexical variables and assigns a reference to this to a ‘glob’ in the callers package.

Someday the sub-commands may be created directly in the C code.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2562 - Linux cli command NetPacket_IGMPpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command NetPacket_IGMPpm and provides detailed information about the command NetPacket_IGMPpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the NetPacket_IGMPpm.

NAME 🖥️ NetPacket_IGMPpm 🖥️

Assemble and disassemble IGMP (Internet Group Management Protocol) packets.

VERSION

version 1.7.2

SYNOPSIS

use NetPacket::IGMP; $igmp_obj = NetPacket::IGMP->decode($raw_pkt); $igmp_pkt = NetPacket::IGMP->encode(params…); # Not implemented $igmp_data = NetPacket::IGMP::strip($raw_pkt);

DESCRIPTION

NetPacket::IGMP provides a set of routines for assembling and disassembling packets using IGMP (Internet Group Management Protocol).

Methods

“NetPacket::IGMP->decode([RAW PACKET])”
Decode the raw packet data given and return an object containing instance data. This method will quite happily decode garbage input. It is the responsibility of the programmer to ensure valid packet data is passed to this method.

“NetPacket::IGMP->encode(param => value)”
Return an IGMP packet encoded with the instance data specified. Not implemented.

Functions

“NetPacket::IGMP::strip([RAW PACKET])”
Return the encapsulated data (or payload) contained in the IGMP packet. This function returns undef as there is no encapsulated data in an IGMP packet.

Instance data

The instance data for the NetPacket::IGMP object consists of the following fields.

version
The IGMP version of this packet.

type
The message type for this packet.

len
The length (including length of header) in bytes for this packet.

subtype
The message subtype for this packet.

cksum
The checksum for this packet.

group_addr
The group address specified in this packet.

data
The encapsulated data (payload) for this packet.

Exports

default
none

exportable
IGMP_VERSION_RFC998 IGMP_VERSION_RFC1112 IGMP_HOST_MQUERY IGMP_HOST_MREPORT IGMP_IP_NO_HOSTS IGMP_IP_ALL_HOSTS IGMP_IP_ALL_ROUTERS

tags
The following tags group together related exportable items.

“:strip”
Import the strip function igmp_strip.

“:versions”
IGMP_VERSION_RFC998 IGMP_VERSION_RFC1112

“:msgtypes”
IGMP_HOST_MQUERY IGMP_HOST_MREPORT

“:group_addrs”
IGMP_IP_NO_HOSTS IGMP_IP_ALL_HOSTS IGMP_IP_ALL_ROUTERS

“:ALL”
All the above exportable items.

EXAMPLE

The following script dumps UDP frames by IP address and UDP port to standard output.

#!/usr/bin/perl -w use strict; use Net::PcapUtils; use NetPacket::Ethernet qw(:strip); use NetPacket::IP; use NetPacket::IGMP; sub process_pkt { my($arg, $hdr, $pkt) = @_; my $ip_obj = NetPacket::IP->decode(eth_strip($pkt)); my $igmp_obj = NetPacket::IGMP->decode($ip_obj->{data}); print("$ip_obj->{src_ip} -> $ip_obj->{dest_ip} “, “$igmp_obj->{type}/$igmp_obj->{subtype} “, “$igmp_obj->{group_addr} “); } Net::PcapUtils::loop(\process_pkt, FILTER => igmp);

TODO

Implement encode() function

COPYRIGHT

Copyright (c) 2001 Tim Potter.

Copyright (c) 1995,1996,1997,1998,1999 ANU and CSIRO on behalf of the participants in the CRC for Advanced Computational Systems (‘ACSys’).

This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

AUTHOR

Tim Potter <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2563 - Linux cli command va_arg

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command va_arg and provides detailed information about the command va_arg, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the va_arg.

NAME 🖥️ va_arg 🖥️

variable argument lists

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdarg.h>
void va_start(va_list ap, last);
type va_arg(va_list ap, type);
void va_end(va_list ap);
void va_copy(va_list dest, va_list src);

DESCRIPTION

A function may be called with a varying number of arguments of varying types. The include file <stdarg.h> declares a type va_list and defines three macros for stepping through a list of arguments whose number and types are not known to the called function.

The called function must declare an object of type va_list which is used by the macros va_start(), va_arg(), and va_end().

va_start()

The va_start() macro initializes ap for subsequent use by va_arg() and va_end(), and must be called first.

The argument last is the name of the last argument before the variable argument list, that is, the last argument of which the calling function knows the type.

Because the address of this argument may be used in the va_start() macro, it should not be declared as a register variable, or as a function or an array type.

va_arg()

The va_arg() macro expands to an expression that has the type and value of the next argument in the call. The argument ap is the va_list ap initialized by va_start(). Each call to va_arg() modifies ap so that the next call returns the next argument. The argument type is a type name specified so that the type of a pointer to an object that has the specified type can be obtained simply by adding a * to type.

The first use of the va_arg() macro after that of the va_start() macro returns the argument after last. Successive invocations return the values of the remaining arguments.

If there is no next argument, or if type is not compatible with the type of the actual next argument (as promoted according to the default argument promotions), random errors will occur.

If ap is passed to a function that uses va_arg(ap,type), then the value of ap is undefined after the return of that function.

va_end()

Each invocation of va_start() must be matched by a corresponding invocation of va_end() in the same function. After the call va_end(ap) the variable ap is undefined. Multiple traversals of the list, each bracketed by va_start() and va_end() are possible. va_end() may be a macro or a function.

va_copy()

The va_copy() macro copies the (previously initialized) variable argument list src to dest. The behavior is as if va_start() were applied to dest with the same last argument, followed by the same number of va_arg() invocations that was used to reach the current state of src.

An obvious implementation would have a va_list be a pointer to the stack frame of the variadic function. In such a setup (by far the most common) there seems nothing against an assignment

va_list aq = ap;

Unfortunately, there are also systems that make it an array of pointers (of length 1), and there one needs

va_list aq;
*aq = *ap;

Finally, on systems where arguments are passed in registers, it may be necessary for va_start() to allocate memory, store the arguments there, and also an indication of which argument is next, so that va_arg() can step through the list. Now va_end() can free the allocated memory again. To accommodate this situation, C99 adds a macro va_copy(), so that the above assignment can be replaced by

va_list aq;
va_copy(aq, ap);
...
va_end(aq);

Each invocation of va_copy() must be matched by a corresponding invocation of va_end() in the same function. Some systems that do not supply va_copy() have __va_copy instead, since that was the name used in the draft proposal.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

va_start(), va_end(), va_copy()

Thread safetyMT-Safe

va_arg()

Thread safetyMT-Safe race:ap

STANDARDS

C11, POSIX.1-2008.

HISTORY

va_start()
va_arg()
va_end()
C89, POSIX.1-2001.

va_copy()
C99, POSIX.1-2001.

CAVEATS

Unlike the historical varargs macros, the stdarg macros do not permit programmers to code a function with no fixed arguments. This problem generates work mainly when converting varargs code to stdarg code, but it also creates difficulties for variadic functions that wish to pass all of their arguments on to a function that takes a va_list argument, such as vfprintf(3).

EXAMPLES

The function foo takes a string of format characters and prints out the argument associated with each format character based on the type.

#include <stdio.h>
#include <stdarg.h>
void
foo(char *fmt, ...)   /* '...' is C syntax for a variadic function */
{
    va_list ap;
    int d;
    char c;
    char *s;
    va_start(ap, fmt);
    while (*fmt)
        switch (*fmt++) {
        case 's':              /* string */
            s = va_arg(ap, char *);
            printf("string %s

“, s); break; case ’d’: /* int / d = va_arg(ap, int); printf(“int %d “, d); break; case ‘c’: / char / / need a cast here since va_arg only takes fully promoted types */ c = (char) va_arg(ap, int); printf(“char %c “, c); break; } va_end(ap); }

SEE ALSO

vprintf(3), vscanf(3), vsyslog(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2564 - Linux cli command Image_ExifTool_ZISRAWpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_ZISRAWpm and provides detailed information about the command Image_ExifTool_ZISRAWpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_ZISRAWpm.

NAME 🖥️ Image_ExifTool_ZISRAWpm 🖥️

Read ZISRAW (CZI) meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read metadata from Zeiss Integrated Software RAW (ZISRAW) CZI files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<https://www.zeiss.com/microscopy/us/products/microscope-software/zen/czi.html>

SEE ALSO

“ZISRAW Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2565 - Linux cli command Regexp_Common_URI_RFC1738pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_URI_RFC1738pm and provides detailed information about the command Regexp_Common_URI_RFC1738pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_URI_RFC1738pm.

NAME 🖥️ Regexp_Common_URI_RFC1738pm 🖥️

  • Definitions from RFC1738;

SYNOPSIS

use Regexp::Common::URI::RFC1738 qw /:ALL/;

DESCRIPTION

This package exports definitions from RFC1738. It’s intended usage is for Regexp::Common::URI submodules only. Its interface might change without notice.

REFERENCES

[RFC 1738]
Berners-Lee, Tim, Masinter, L., McCahill, M.: Uniform Resource Locators (URL). December 1994.

AUTHOR

Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2566 - Linux cli command res_querydomain

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command res_querydomain and provides detailed information about the command res_querydomain, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the res_querydomain.

NAME 🖥️ res_querydomain 🖥️

resolver routines

LIBRARY

Resolver library (libresolv, -lresolv)

SYNOPSIS

#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
struct __res_state;
typedef struct __res_state *res_state;
int res_ninit(res_state statep);
void res_nclose(res_state statep);
int res_nquery(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nsearch(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nquerydomain(res_state statep,
 const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
int res_nmkquery(res_state statep,
 int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
int res_nsend(res_state statep,
 const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);
int dn_comp(const char *exp_dn, unsigned char comp_dn[.length],
 int length, unsigned char **dnptrs,
 unsigned char **lastdnptr);
int dn_expand(const unsigned char *msg,
 const unsigned char *eomorig,
 const unsigned char *comp_dn, char exp_dn[.length],
 int length);
[[deprecated]] extern struct __res_state _res;
[[deprecated]] int res_init(void);
[[deprecated]]
int res_query(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_search(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_querydomain(const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
[[deprecated]]
int res_mkquery(int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
[[deprecated]]
int res_send(const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);

DESCRIPTION

Note: This page is incomplete (various resolver functions provided by glibc are not described) and likely out of date.

The functions described below make queries to and interpret the responses from Internet domain name servers.

The API consists of a set of more modern, reentrant functions and an older set of nonreentrant functions that have been superseded. The traditional resolver interfaces such as res_init() and res_query() use some static (global) state stored in the _res structure, rendering these functions non-thread-safe. BIND 8.2 introduced a set of new interfaces res_ninit(), res_nquery(), and so on, which take a res_state as their first argument, so you can use a per-thread resolver state.

The res_ninit() and res_init() functions read the configuration files (see resolv.conf(5)) to get the default domain name and name server address(es). If no server is given, the local host is tried. If no domain is given, that associated with the local host is used. It can be overridden with the environment variable LOCALDOMAIN. res_ninit() or res_init() is normally executed by the first call to one of the other functions. Every call to res_ninit() requires a corresponding call to res_nclose() to free memory allocated by res_ninit() and subsequent calls to res_nquery().

The res_nquery() and res_query() functions query the name server for the fully qualified domain name name of specified type and class. The reply is left in the buffer answer of length anslen supplied by the caller.

The res_nsearch() and res_search() functions make a query and waits for the response like res_nquery() and res_query(), but in addition they implement the default and search rules controlled by RES_DEFNAMES and RES_DNSRCH (see description of _res options below).

The res_nquerydomain() and res_querydomain() functions make a query using res_nquery()/res_query() on the concatenation of name and domain.

The following functions are lower-level routines used by res_nquery()/res_query().

The res_nmkquery() and res_mkquery() functions construct a query message in buf of length buflen for the domain name dname. The query type op is one of the following (typically QUERY):

QUERY
Standard query.

IQUERY
Inverse query. This option was removed in glibc 2.26, since it has not been supported by DNS servers for a very long time.

NS_NOTIFY_OP
Notify secondary of SOA (Start of Authority) change.

newrr is currently unused.

The res_nsend() and res_send() function send a preformatted query given in msg of length msglen and returns the answer in answer which is of length anslen. They will call res_ninit()/res_init() if it has not already been called.

The dn_comp() function compresses the domain name exp_dn and stores it in the buffer comp_dn of length length. The compression uses an array of pointers dnptrs to previously compressed names in the current message. The first pointer points to the beginning of the message and the list ends with NULL. The limit of the array is specified by lastdnptr. If dnptr is NULL, domain names are not compressed. If lastdnptr is NULL, the list of labels is not updated.

The dn_expand() function expands the compressed domain name comp_dn to a full domain name, which is placed in the buffer exp_dn of size length. The compressed name is contained in a query or reply message, and msg points to the beginning of the message.

The resolver routines use configuration and state information contained in a __res_state structure (either passed as the statep argument, or in the global variable _res, in the case of the older nonreentrant functions). The only field of this structure that is normally manipulated by the user is the options field. This field can contain the bitwise “OR” of the following options:

RES_INIT
True if res_ninit() or res_init() has been called.

RES_DEBUG
Print debugging messages. This option is available only if glibc was built with debugging enabled, which is not the default.

RES_AAONLY (unimplemented; deprecated in glibc 2.25)
Accept authoritative answers only. res_send() continues until it finds an authoritative answer or returns an error. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEVC
Use TCP connections for queries rather than UDP datagrams.

RES_PRIMARY (unimplemented; deprecated in glibc 2.25)
Query primary domain name server only. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_IGNTC
Ignore truncation errors. Don’t retry with TCP.

RES_RECURSE
Set the recursion desired bit in queries. Recursion is carried out by the domain name server, not by res_send(). [Enabled by default].

RES_DEFNAMES
If set, res_search() will append the default domain name to single component names—that is, those that do not contain a dot. [Enabled by default].

RES_STAYOPEN
Used with RES_USEVC to keep the TCP connection open between queries.

RES_DNSRCH
If set, res_search() will search for hostnames in the current domain and in parent domains. This option is used by gethostbyname(3). [Enabled by default].

RES_INSECURE1
Accept a response from a wrong server. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_INSECURE2
Accept a response which contains a wrong query. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_NOALIASES
Disable usage of HOSTALIASES environment variable.

RES_USE_INET6
Try an AAAA query before an A query inside the gethostbyname(3) function, and map IPv4 responses in IPv6 “tunneled form” if no AAAA records are found but an A record set exists. Since glibc 2.25, this option is deprecated, and its usage produces a warning; applications should use getaddrinfo(3), rather than gethostbyname(3).

RES_ROTATE
Causes round-robin selection of name servers from among those listed. This has the effect of spreading the query load among all listed servers, rather than having all clients try the first listed server first every time.

RES_NOCHECKNAME (unimplemented; deprecated in glibc 2.25)
Disable the modern BIND checking of incoming hostnames and mail names for invalid characters such as underscore (_), non-ASCII, or control characters. This option was present until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_KEEPTSIG (unimplemented; deprecated in glibc 2.25)
Do not strip TSIG records. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_BLAST (unimplemented; deprecated in glibc 2.25)
Send each query simultaneously and recursively to all servers. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEBSTRING (glibc 2.3.4 to glibc 2.24)
Make reverse IPv6 lookups using the bit-label format described in RFC 2673; if this option is not set (which is the default), then nibble format is used. This option was removed in glibc 2.25, since it relied on a backward-incompatible DNS extension that was never deployed on the Internet.

RES_NOIP6DOTINT (glibc 2.24 and earlier)
Use ip6.arpa zone in IPv6 reverse lookup instead of ip6.int, which is deprecated since glibc 2.3.4. This option is present up to and including glibc 2.24, where it is enabled by default. In glibc 2.25, this option was removed.

RES_USE_EDNS0 (since glibc 2.6)
Enables support for the DNS extensions (EDNS0) described in RFC 2671.

RES_SNGLKUP (since glibc 2.10)
By default, glibc performs IPv4 and IPv6 lookups in parallel since glibc 2.9. Some appliance DNS servers cannot handle these queries properly and make the requests time out. This option disables the behavior and makes glibc perform the IPv6 and IPv4 requests sequentially (at the cost of some slowdown of the resolving process).

RES_SNGLKUPREOP
When RES_SNGLKUP option is enabled, opens a new socket for the each request.

RES_USE_DNSSEC
Use DNSSEC with OK bit in OPT record. This option implies RES_USE_EDNS0.

RES_NOTLDQUERY
Do not look up unqualified name as a top-level domain (TLD).

RES_DEFAULT
Default option which implies: RES_RECURSE, RES_DEFNAMES, RES_DNSRCH, and RES_NOIP6DOTINT.

RETURN VALUE

The res_ninit() and res_init() functions return 0 on success, or -1 if an error occurs.

The res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), res_querydomain(), res_nmkquery(), res_mkquery(), res_nsend(), and res_send() functions return the length of the response, or -1 if an error occurs.

The dn_comp() and dn_expand() functions return the length of the compressed name, or -1 if an error occurs.

In the case of an error return from res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), or res_querydomain(), the global variable h_errno (see gethostbyname(3)) can be consulted to determine the cause of the error.

FILES

/etc/resolv.conf
resolver configuration file

/etc/host.conf
resolver configuration file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

res_ninit(), res_nclose(), res_nquery(), res_nsearch(), res_nquerydomain(), res_nsend()

Thread safetyMT-Safe locale

res_nmkquery(), dn_comp(), dn_expand()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

4.3BSD.

SEE ALSO

gethostbyname(3), resolv.conf(5), resolver(5), hostname(7), named(8)

The GNU C library source file resolv/README.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2567 - Linux cli command sin

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sin and provides detailed information about the command sin, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sin.

NAME 🖥️ sin 🖥️

sine function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double sin(double x);
float sinf(float x);
long double sinl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sinf(), sinl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the sine of x, where x is given in radians.

RETURN VALUE

On success, these functions return the sine of x.

If x is a NaN, a NaN is returned.

If x is positive infinity or negative infinity, a domain error occurs, and a NaN is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is an infinity
errno is set to EDOM (but see BUGS). An invalid floating-point exception (FE_INVALID) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sin(), sinf(), sinl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

BUGS

Before glibc 2.10, the glibc implementation did not set errno to EDOM when a domain error occurred.

SEE ALSO

acos(3), asin(3), atan(3), atan2(3), cos(3), csin(3), sincos(3), tan(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2568 - Linux cli command Image_ExifTool_FLIFpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_FLIFpm and provides detailed information about the command Image_ExifTool_FLIFpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_FLIFpm.

NAME 🖥️ Image_ExifTool_FLIFpm 🖥️

Read/write FLIF meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to read and write meta information in FLIF (Free Lossless Image Format) images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://flif.info/>

<https://github.com/FLIF-hub/FLIF/blob/master/doc/metadata>

SEE ALSO

“FLIF Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2569 - Linux cli command warn

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command warn and provides detailed information about the command warn, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the warn.

NAME 🖥️ warn 🖥️

formatted error messages

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <err.h>
[[noreturn]] void err(int eval, const char *fmt, ...);
[[noreturn]] void errx(int eval, const char *fmt, ...);
void warn(const char *fmt, ...);
void warnx(const char *fmt, ...);
#include <stdarg.h>
[[noreturn]] void verr(int eval, const char *fmt, va_list args);
[[noreturn]] void verrx(int eval, const char *fmt, va_list args);
void vwarn(const char *fmt, va_list args);
void vwarnx(const char *fmt, va_list args);

DESCRIPTION

The err() and warn() family of functions display a formatted error message on the standard error output. In all cases, the last component of the program name, a colon character, and a space are output. If the fmt argument is not NULL, the printf(3)-like formatted error message is output. The output is terminated by a newline character.

The err(), verr(), warn(), and vwarn() functions append an error message obtained from strerror(3) based on the global variable errno, preceded by another colon and space unless the fmt argument is NULL.

The errx() and warnx() functions do not append an error message.

The err(), verr(), errx(), and verrx() functions do not return, but exit with the value of the argument eval.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

err(), errx(), warn(), warnx(), verr(), verrx(), vwarn(), vwarnx()

Thread safetyMT-Safe locale

STANDARDS

BSD.

HISTORY

err()
warn()
4.4BSD.

EXAMPLES

Display the current errno information string and exit:

p = malloc(size);
if (p == NULL)
    err(EXIT_FAILURE, NULL);
fd = open(file_name, O_RDONLY, 0);
if (fd == -1)
    err(EXIT_FAILURE, "%s", file_name);

Display an error message and exit:

if (tm.tm_hour < START_TIME)
    errx(EXIT_FAILURE, "too early, wait until %s",
            start_time_string);

Warn of an error:

fd = open(raw_device, O_RDONLY, 0);
if (fd == -1)
    warnx("%s: %s: trying the block device",
            raw_device, strerror(errno));
fd = open(block_device, O_RDONLY, 0);
if (fd == -1)
    err(EXIT_FAILURE, "%s", block_device);

SEE ALSO

error(3), exit(3), perror(3), printf(3), strerror(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2570 - Linux cli command Image_ExifTool_H264pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_H264pm and provides detailed information about the command Image_ExifTool_H264pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_H264pm.

NAME 🖥️ Image_ExifTool_H264pm 🖥️

Read meta information from H.264 video

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to extract information from H.264 video streams.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.itu.int/rec/T-REC-H.264/e>

<http://miffteevee.co.uk/documentation/development/H264Parser_8cpp-source.html>

<http://ffmpeg.org/>

SEE ALSO

“H264 Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2571 - Linux cli command fts_close

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fts_close and provides detailed information about the command fts_close, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fts_close.

NAME 🖥️ fts_close 🖥️

traverse a file hierarchy

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <sys/stat.h>
#include <fts.h>
FTS *fts_open(char *const *path_argv, int options,
 int (*_Nullable compar)(const FTSENT **, const FTSENT **));
FTSENT *fts_read(FTS *ftsp);
FTSENT *fts_children(FTS *ftsp, int instr);
int fts_set(FTS *ftsp, FTSENT *f, int instr);
int fts_close(FTS *ftsp);

DESCRIPTION

The fts functions are provided for traversing file hierarchies. A simple overview is that the fts_open() function returns a “handle” (of type FTS *) that refers to a file hierarchy “stream”. This handle is then supplied to the other fts functions. The function fts_read() returns a pointer to a structure describing one of the files in the file hierarchy. The function fts_children() returns a pointer to a linked list of structures, each of which describes one of the files contained in a directory in the hierarchy.

In general, directories are visited two distinguishable times; in preorder (before any of their descendants are visited) and in postorder (after all of their descendants have been visited). Files are visited once. It is possible to walk the hierarchy “logically” (visiting the files that symbolic links point to) or physically (visiting the symbolic links themselves), order the walk of the hierarchy or prune and/or revisit portions of the hierarchy.

Two structures (and associated types) are defined in the include file <fts.h>. The first type is FTS, the structure that represents the file hierarchy itself. The second type is FTSENT, the structure that represents a file in the file hierarchy. Normally, an FTSENT structure is returned for every file in the file hierarchy. In this manual page, “file” and “FTSENT structure” are generally interchangeable.

The FTSENT structure contains fields describing a file. The structure contains at least the following fields (there are additional fields that should be considered private to the implementation):

typedef struct _ftsent {
    unsigned short  fts_info;     /* flags for FTSENT structure */
    char           *fts_accpath;  /* access path */
    char           *fts_path;     /* root path */
    short           fts_pathlen;  /* strlen(fts_path) +
                                     strlen(fts_name) */
    char           *fts_name;     /* filename */
    short           fts_namelen;  /* strlen(fts_name) */
    short           fts_level;    /* depth (-1 to N) */
    int             fts_errno;    /* file errno */
    long            fts_number;   /* local numeric value */
    void           *fts_pointer;  /* local address value */
    struct _ftsent *fts_parent;   /* parent directory */
    struct _ftsent *fts_link;     /* next file structure */
    struct _ftsent *fts_cycle;    /* cycle structure */
    struct stat    *fts_statp;    /* [l]stat(2) information */
} FTSENT;

These fields are defined as follows:

fts_info
One of the following values describing the returned FTSENT structure and the file it represents. With the exception of directories without errors (FTS_D), all of these entries are terminal, that is, they will not be revisited, nor will any of their descendants be visited.

FTS_D
A directory being visited in preorder.

FTS_DC
A directory that causes a cycle in the tree. (The fts_cycle field of the FTSENT structure will be filled in as well.)

FTS_DEFAULT
Any FTSENT structure that represents a file type not explicitly described by one of the other fts_info values.

FTS_DNR
A directory which cannot be read. This is an error return, and the fts_errno field will be set to indicate what caused the error.

FTS_DOT
A file named “.” or “..” which was not specified as a filename to fts_open() (see FTS_SEEDOT).

FTS_DP
A directory being visited in postorder. The contents of the FTSENT structure will be unchanged from when it was returned in preorder, that is, with the fts_info field set to FTS_D.

FTS_ERR
This is an error return, and the fts_errno field will be set to indicate what caused the error.

FTS_F
A regular file.

FTS_NS
A file for which no [l] stat(2) information was available. The contents of the fts_statp field are undefined. This is an error return, and the fts_errno field will be set to indicate what caused the error.

FTS_NSOK
A file for which no [l] stat(2) information was requested. The contents of the fts_statp field are undefined.

FTS_SL
A symbolic link.

FTS_SLNONE
A symbolic link with a nonexistent target. The contents of the fts_statp field reference the file characteristic information for the symbolic link itself.

fts_accpath
A path for accessing the file from the current directory.

fts_path
The path for the file relative to the root of the traversal. This path contains the path specified to fts_open() as a prefix.

fts_pathlen
The sum of the lengths of the strings referenced by fts_path and fts_name.

fts_name
The name of the file.

fts_namelen
The length of the string referenced by fts_name.

fts_level
The depth of the traversal, numbered from -1 to N, where this file was found. The FTSENT structure representing the parent of the starting point (or root) of the traversal is numbered -1, and the FTSENT structure for the root itself is numbered 0.

fts_errno
If fts_children() or fts_read() returns an FTSENT structure whose fts_info field is set to FTS_DNR, FTS_ERR, or FTS_NS, the fts_errno field contains the error number (i.e., the errno value) specifying the cause of the error. Otherwise, the contents of the fts_errno field are undefined.

fts_number
This field is provided for the use of the application program and is not modified by the fts functions. It is initialized to 0.

fts_pointer
This field is provided for the use of the application program and is not modified by the fts functions. It is initialized to NULL.

fts_parent
A pointer to the FTSENT structure referencing the file in the hierarchy immediately above the current file, that is, the directory of which this file is a member. A parent structure for the initial entry point is provided as well, however, only the fts_level, fts_number, and fts_pointer fields are guaranteed to be initialized.

fts_link
Upon return from the fts_children() function, the fts_link field points to the next structure in the NULL-terminated linked list of directory members. Otherwise, the contents of the fts_link field are undefined.

fts_cycle
If a directory causes a cycle in the hierarchy (see FTS_DC), either because of a hard link between two directories, or a symbolic link pointing to a directory, the fts_cycle field of the structure will point to the FTSENT structure in the hierarchy that references the same file as the current FTSENT structure. Otherwise, the contents of the fts_cycle field are undefined.

fts_statp
A pointer to [l] stat(2) information for the file.

A single buffer is used for all of the paths of all of the files in the file hierarchy. Therefore, the fts_path and fts_accpath fields are guaranteed to be null-terminated only for the file most recently returned by fts_read(). To use these fields to reference any files represented by other FTSENT structures will require that the path buffer be modified using the information contained in that FTSENT structure’s fts_pathlen field. Any such modifications should be undone before further calls to fts_read() are attempted. The fts_name field is always null-terminated.

fts_open()

The fts_open() function takes a pointer to an array of character pointers naming one or more paths which make up a logical file hierarchy to be traversed. The array must be terminated by a null pointer.

There are a number of options, at least one of which (either FTS_LOGICAL or FTS_PHYSICAL) must be specified. The options are selected by ORing the following values:

FTS_LOGICAL
This option causes the fts routines to return FTSENT structures for the targets of symbolic links instead of the symbolic links themselves. If this option is set, the only symbolic links for which FTSENT structures are returned to the application are those referencing nonexistent files: the fts_statp field is obtained via stat(2) with a fallback to lstat(2).

FTS_PHYSICAL
This option causes the fts routines to return FTSENT structures for symbolic links themselves instead of the target files they point to. If this option is set, FTSENT structures for all symbolic links in the hierarchy are returned to the application: the fts_statp field is obtained via lstat(2).

FTS_COMFOLLOW
This option causes any symbolic link specified as a root path to be followed immediately, as if via FTS_LOGICAL, regardless of the primary mode.

FTS_NOCHDIR
As a performance optimization, the fts functions change directories as they walk the file hierarchy. This has the side-effect that an application cannot rely on being in any particular directory during the traversal. This option turns off this optimization, and the fts functions will not change the current directory. Note that applications should not themselves change their current directory and try to access files unless FTS_NOCHDIR is specified and absolute pathnames were provided as arguments to fts_open().

FTS_NOSTAT
By default, returned FTSENT structures reference file characteristic information (the fts_statp field) for each file visited. This option relaxes that requirement as a performance optimization, allowing the fts functions to set the fts_info field to FTS_NSOK and leave the contents of the fts_statp field undefined.

FTS_SEEDOT
By default, unless they are specified as path arguments to fts_open(), any files named “.” or “..” encountered in the file hierarchy are ignored. This option causes the fts routines to return FTSENT structures for them.

FTS_XDEV
This option prevents fts from descending into directories that have a different device number than the file from which the descent began.

The argument compar() specifies a user-defined function which may be used to order the traversal of the hierarchy. It takes two pointers to pointers to FTSENT structures as arguments and should return a negative value, zero, or a positive value to indicate if the file referenced by its first argument comes before, in any order with respect to, or after, the file referenced by its second argument. The fts_accpath, fts_path, and fts_pathlen fields of the FTSENT structures may never be used in this comparison. If the fts_info field is set to FTS_NS or FTS_NSOK, the fts_statp field may not either. If the compar() argument is NULL, the directory traversal order is in the order listed in path_argv for the root paths, and in the order listed in the directory for everything else.

fts_read()

The fts_read() function returns a pointer to an FTSENT structure describing a file in the hierarchy. Directories (that are readable and do not cause cycles) are visited at least twice, once in preorder and once in postorder. All other files are visited at least once. (Hard links between directories that do not cause cycles or symbolic links to symbolic links may cause files to be visited more than once, or directories more than twice.)

If all the members of the hierarchy have been returned, fts_read() returns NULL and sets errno to 0. If an error unrelated to a file in the hierarchy occurs, fts_read() returns NULL and sets errno to indicate the error. If an error related to a returned file occurs, a pointer to an FTSENT structure is returned, and errno may or may not have been set (see fts_info).

The FTSENT structures returned by fts_read() may be overwritten after a call to fts_close() on the same file hierarchy stream, or, after a call to fts_read() on the same file hierarchy stream unless they represent a file of type directory, in which case they will not be overwritten until after a call to fts_read() after the FTSENT structure has been returned by the function fts_read() in postorder.

fts_children()

The fts_children() function returns a pointer to an FTSENT structure describing the first entry in a NULL-terminated linked list of the files in the directory represented by the FTSENT structure most recently returned by fts_read(). The list is linked through the fts_link field of the FTSENT structure, and is ordered by the user-specified comparison function, if any. Repeated calls to fts_children() will re-create this linked list.

As a special case, if fts_read() has not yet been called for a hierarchy, fts_children() will return a pointer to the files in the logical directory specified to fts_open(), that is, the arguments specified to fts_open(). Otherwise, if the FTSENT structure most recently returned by fts_read() is not a directory being visited in preorder, or the directory does not contain any files, fts_children() returns NULL and sets errno to zero. If an error occurs, fts_children() returns NULL and sets errno to indicate the error.

The FTSENT structures returned by fts_children() may be overwritten after a call to fts_children(), fts_close(), or fts_read() on the same file hierarchy stream.

The instr argument is either zero or the following value:

FTS_NAMEONLY
Only the names of the files are needed. The contents of all the fields in the returned linked list of structures are undefined with the exception of the fts_name and fts_namelen fields.

fts_set()

The function fts_set() allows the user application to determine further processing for the file f of the stream ftsp. The fts_set() function returns 0 on success, and -1 if an error occurs.

The instr argument is either 0 (meaning “do nothing”) or one of the following values:

FTS_AGAIN
Revisit the file; any file type may be revisited. The next call to fts_read() will return the referenced file. The fts_stat and fts_info fields of the structure will be reinitialized at that time, but no other fields will have been changed. This option is meaningful only for the most recently returned file from fts_read(). Normal use is for postorder directory visits, where it causes the directory to be revisited (in both preorder and postorder) as well as all of its descendants.

FTS_FOLLOW
The referenced file must be a symbolic link. If the referenced file is the one most recently returned by fts_read(), the next call to fts_read() returns the file with the fts_info and fts_statp fields reinitialized to reflect the target of the symbolic link instead of the symbolic link itself. If the file is one of those most recently returned by fts_children(), the fts_info and fts_statp fields of the structure, when returned by fts_read(), will reflect the target of the symbolic link instead of the symbolic link itself. In either case, if the target of the symbolic link does not exist, the fields of the returned structure will be unchanged and the fts_info field will be set to FTS_SLNONE.

If the target of the link is a directory, the preorder return, followed by the return of all of its descendants, followed by a postorder return, is done.

FTS_SKIP
No descendants of this file are visited. The file may be one of those most recently returned by either fts_children() or fts_read().

fts_close()

The fts_close() function closes the file hierarchy stream referred to by ftsp and restores the current directory to the directory from which fts_open() was called to open ftsp. The fts_close() function returns 0 on success, and -1 if an error occurs.

ERRORS

The function fts_open() may fail and set errno for any of the errors specified for open(2) and malloc(3).

In addition, fts_open() may fail and set errno as follows:

ENOENT
Any element of path_argv was an empty string.

The function fts_close() may fail and set errno for any of the errors specified for chdir(2) and close(2).

The functions fts_read() and fts_children() may fail and set errno for any of the errors specified for chdir(2), malloc(3), opendir(3), readdir(3), and [l] stat(2).

In addition, fts_children(), fts_open(), and fts_set() may fail and set errno as follows:

EINVAL
options or instr was invalid.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fts_open(), fts_set(), fts_close()

Thread safetyMT-Safe

fts_read(), fts_children()

Thread safetyMT-Unsafe

STANDARDS

None.

HISTORY

glibc 2. 4.4BSD.

BUGS

Before glibc 2.23, all of the APIs described in this man page are not safe when compiling a program using the LFS APIs (e.g., when compiling with -D_FILE_OFFSET_BITS=64).

SEE ALSO

find(1), chdir(2), lstat(2), stat(2), ftw(3), qsort(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2572 - Linux cli command wmemchr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wmemchr and provides detailed information about the command wmemchr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wmemchr.

NAME 🖥️ wmemchr 🖥️

search a wide character in a wide-character array

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
wchar_t *wmemchr(const wchar_t s[.n], wchar_t c, size_t n);

DESCRIPTION

The wmemchr() function is the wide-character equivalent of the memchr(3) function. It searches the n wide characters starting at s for the first occurrence of the wide character c.

RETURN VALUE

The wmemchr() function returns a pointer to the first occurrence of c among the n wide characters starting at s, or NULL if c does not occur among these.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wmemchr()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

memchr(3), wcschr(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2573 - Linux cli command __freadable

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __freadable and provides detailed information about the command __freadable, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __freadable.

NAME 🖥️ __freadable 🖥️

interfaces to stdio FILE structure

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
#include <stdio_ext.h>
size_t __fbufsize(FILE *stream);
size_t __fpending(FILE *stream);
int __flbf(FILE *stream);
int __freadable(FILE *stream);
int __fwritable(FILE *stream);
int __freading(FILE *stream);
int __fwriting(FILE *stream);
int __fsetlocking(FILE *stream, int type);
void _flushlbf(void);
void __fpurge(FILE *stream);

DESCRIPTION

Solaris introduced routines to allow portable access to the internals of the FILE structure, and glibc also implemented these.

The __fbufsize() function returns the size of the buffer currently used by the given stream.

The __fpending() function returns the number of bytes in the output buffer. For wide-oriented streams the unit is wide characters. This function is undefined on buffers in reading mode, or opened read-only.

The __flbf() function returns a nonzero value if the stream is line-buffered, and zero otherwise.

The __freadable() function returns a nonzero value if the stream allows reading, and zero otherwise.

The __fwritable() function returns a nonzero value if the stream allows writing, and zero otherwise.

The __freading() function returns a nonzero value if the stream is read-only, or if the last operation on the stream was a read operation, and zero otherwise.

The __fwriting() function returns a nonzero value if the stream is write-only (or append-only), or if the last operation on the stream was a write operation, and zero otherwise.

The __fsetlocking() function can be used to select the desired type of locking on the stream. It returns the current type. The type argument can take the following three values:

FSETLOCKING_INTERNAL
Perform implicit locking around every operation on the given stream (except for the *_unlocked ones). This is the default.

FSETLOCKING_BYCALLER
The caller will take care of the locking (possibly using flockfile(3) in case there is more than one thread), and the stdio routines will not do locking until the state is reset to FSETLOCKING_INTERNAL.

FSETLOCKING_QUERY
Don’t change the type of locking. (Only return it.)

The _flushlbf() function flushes all line-buffered streams. (Presumably so that output to a terminal is forced out, say before reading keyboard input.)

The __fpurge() function discards the contents of the stream’s buffer.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

__fbufsize(), __fpending(), __fpurge(), __fsetlocking()

Thread safetyMT-Safe race:stream

__flbf(), __freadable(), __freading(), __fwritable(), __fwriting(), _flushlbf()

Thread safetyMT-Safe

SEE ALSO

flockfile(3), fpurge(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2574 - Linux cli command Moopm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moopm and provides detailed information about the command Moopm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moopm.

NAME 🖥️ Moopm 🖥️

Minimalist Object Orientation (with Moose compatibility)

SYNOPSIS

package Cat::Food; use Moo; use strictures 2; use namespace::clean; sub feed_lion { my $self = shift; my $amount = shift || 1; $self->pounds( $self->pounds - $amount ); } has taste => ( is => ro, ); has brand => ( is => ro, isa => sub { die “Only SWEET-TREATZ supported!” unless $_[0] eq SWEET-TREATZ }, ); has pounds => ( is => rw, isa => sub { die “$_[0] is too much cat food!” unless $_[0] < 15 }, ); 1;

And elsewhere:

my $full = Cat::Food->new( taste => DELICIOUS., brand => SWEET-TREATZ, pounds => 10, ); $full->feed_lion; say $full->pounds;

DESCRIPTION

Moo is an extremely light-weight Object Orientation system. It allows one to concisely define objects and roles with a convenient syntax that avoids the details of Perl’s object system. Moo contains a subset of Moose and is optimised for rapid startup.

Moo avoids depending on any XS modules to allow for simple deployments. The name Moo is based on the idea that it provides almost Ω- but not quite Ω- two thirds of Moose. As such, the Moose::Manual can serve as an effective guide to Moo aside from the MOP and Types sections.

Unlike Mouse this module does not aim at full compatibility with Moose’s surface syntax, preferring instead to provide full interoperability via the metaclass inflation capabilities described in MOO AND MOOSE.

For a full list of the minor differences between Moose and Moo’s surface syntax, see INCOMPATIBILITIES WITH MOOSE.

WHY MOO EXISTS

If you want a full object system with a rich Metaprotocol, Moose is already wonderful.

But if you don’t want to use Moose, you may not want less metaprotocol like Mouse offers, but you probably want no metaprotocol, which is what Moo provides. Moo is ideal for some situations where deployment or startup time precludes using Moose and Mouse:

  • A command line or CGI script where fast startup is essential

  • code designed to be deployed as a single file via App::FatPacker

  • A CPAN module that may be used by others in the above situations

Moo maintains transparent compatibility with Moose so if you install and load Moose you can use Moo classes and roles in Moose code without modification.

Moo Ω- Minimal Object Orientation Ω- aims to make it smooth to upgrade to Moose when you need more than the minimal features offered by Moo.

MOO AND MOOSE

If Moo detects Moose being loaded, it will automatically register metaclasses for your Moo and Moo::Role packages, so you should be able to use them in Moose code without modification.

Moo will also create Moose type constraints for Moo classes and roles, so that in Moose classes isa => MyMooClass and isa => MyMooRole work the same as for Moose classes and roles.

Extending a Moose class or consuming a Moose::Role will also work.

Extending a Mouse class or consuming a Mouse::Role will also work. But note that we don’t provide Mouse metaclasses or metaroles so the other way around doesn’t work. This feature exists for Any::Moose users porting to Moo; enabling Mouse users to use Moo classes is not a priority for us.

This means that there is no need for anything like Any::Moose for Moo code - Moo and Moose code should simply interoperate without problem. To handle Mouse code, you’ll likely need an empty Moo role or class consuming or extending the Mouse stuff since it doesn’t register true Moose metaclasses like Moo does.

If you need to disable the metaclass creation, add:

no Moo::sification;

to your code before Moose is loaded, but bear in mind that this switch is global and turns the mechanism off entirely so don’t put this in library code.

MOO AND CLASS::XSACCESSOR

If a new enough version of Class::XSAccessor is available, it will be used to generate simple accessors, readers, and writers for better performance. Simple accessors are those without lazy defaults, type checks/coercions, or triggers. Simple readers are those without lazy defaults. Readers and writers generated by Class::XSAccessor will behave slightly differently: they will reject attempts to call them with the incorrect number of parameters.

MOO VERSUS ANY::MOOSE

Any::Moose will load Mouse normally, and Moose in a program using Moose - which theoretically allows you to get the startup time of Mouse without disadvantaging Moose users.

Sadly, this doesn’t entirely work, since the selection is load order dependent - Moo’s metaclass inflation system explained above in MOO AND MOOSE is significantly more reliable.

So if you want to write a CPAN module that loads fast or has only pure perl dependencies but is also fully usable by Moose users, you should be using Moo.

For a full explanation, see the article <https://shadow.cat/blog/matt-s-trout/moo-versus-any-moose> which explains the differing strategies in more detail and provides a direct example of where Moo succeeds and Any::Moose fails.

PUBLIC METHODS

Moo provides several methods to any class using it.

new

Foo::Bar->new( attr1 => 3 );

or

Foo::Bar->new({ attr1 => 3 });

The constructor for the class. By default it will accept attributes either as a hashref, or a list of key value pairs. This can be customized with the BUILDARGS method.

does

if ($foo->does(Some::Role1)) { … }

Returns true if the object composes in the passed role.

DOES

if ($foo->DOES(Some::Role1) || $foo->DOES(Some::Class1)) { … }

Similar to does, but will also return true for both composed roles and superclasses.

meta

my $meta = Foo::Bar->meta; my @methods = $meta->get_method_list;

Returns an object that will behave as if it is a Moose metaclass object for the class. If you call anything other than make_immutable on it, the object will be transparently upgraded to a genuine Moose::Meta::Class instance, loading Moose in the process if required. make_immutable itself is a no-op, since we generate metaclasses that are already immutable, and users converting from Moose had an unfortunate tendency to accidentally load Moose by calling it.

LIFECYCLE METHODS

There are several methods that you can define in your class to control construction and destruction of objects. They should be used rather than trying to modify new or DESTROY yourself.

BUILDARGS

around BUILDARGS => sub { my ( $orig, $class, @args ) = @_; return { attr1 => $args[0] } if @args == 1 && !ref $args[0]; return $class->$orig(@args); }; Foo::Bar->new( 3 );

This class method is used to transform the arguments to new into a hash reference of attribute values.

The default implementation accepts a hash or hash reference of named parameters. If it receives a single argument that isn’t a hash reference it will throw an error.

You can override this method in your class to handle other types of options passed to the constructor.

This method should always return a hash reference of named options.

FOREIGNBUILDARGS

sub FOREIGNBUILDARGS { my ( $class, $options ) = @_; return $options->{foo}; }

If you are inheriting from a non-Moo class, the arguments passed to the parent class constructor can be manipulated by defining a FOREIGNBUILDARGS method. It will receive the same arguments as BUILDARGS, and should return a list of arguments to pass to the parent class constructor.

BUILD

sub BUILD { my ($self, $args) = @_; die “foo and bar cannot be used at the same time” if exists $args->{foo} && exists $args->{bar}; }

On object creation, any BUILD methods in the class’s inheritance hierarchy will be called on the object and given the results of BUILDARGS. They each will be called in order from the parent classes down to the child, and thus should not themselves call the parent’s method. Typically this is used for object validation or possibly logging.

DEMOLISH

sub DEMOLISH { my ($self, $in_global_destruction) = @_; … }

When an object is destroyed, any DEMOLISH methods in the inheritance hierarchy will be called on the object. They are given boolean to inform them if global destruction is in progress, and are called from the child class upwards to the parent. This is similar to BUILD methods but in the opposite order.

Note that this is implemented by a DESTROY method, which is only created on on the first construction of an object of your class. This saves on overhead for classes that are never instantiated or those without DEMOLISH methods. If you try to define your own DESTROY, this will cause undefined results.

IMPORTED SUBROUTINES

extends

extends Parent::Class;

Declares a base class. Multiple superclasses can be passed for multiple inheritance but please consider using roles instead. The class will be loaded but no errors will be triggered if the class can’t be found and there are already subs in the class.

Calling extends more than once will REPLACE your superclasses, not add to them like ‘use base’ would.

with

with Some::Role1;

or

with Some::Role1, Some::Role2;

Composes one or more Moo::Role (or Role::Tiny) roles into the current class. An error will be raised if these roles cannot be composed because they have conflicting method definitions. The roles will be loaded using the same mechanism as extends uses.

has

has attr => ( is => ro, );

Declares an attribute for the class.

package Foo; use Moo; has attr => ( is => ro ); package Bar; use Moo; extends Foo; has +attr => ( default => sub { “blah” }, );

Using the + notation, it’s possible to override an attribute.

has [qw(attr1 attr2 attr3)] => ( is => ro, );

Using an arrayref with multiple attribute names, it’s possible to declare multiple attributes with the same options.

The options for has are as follows:

“is”
required, may be ro, lazy, rwp or rw. ro stands for read-only and generates an accessor that dies if you attempt to write to it - i.e. a getter only - by defaulting reader to the name of the attribute. lazy generates a reader like ro, but also sets lazy to 1 and builder to _build_${attribute_name} to allow on-demand generated attributes. This feature was my attempt to fix my incompetence when originally designing lazy_build, and is also implemented by MooseX::AttributeShortcuts. There is, however, nothing to stop you using lazy and builder yourself with rwp or rw - it’s just that this isn’t generally a good idea so we don’t provide a shortcut for it. rwp stands for read-write protected and generates a reader like ro, but also sets writer to _set_${attribute_name} for attributes that are designed to be written from inside of the class, but read-only from outside. This feature comes from MooseX::AttributeShortcuts. rw stands for read-write and generates a normal getter/setter by defaulting the accessor to the name of the attribute specified.

“isa”
Takes a coderef which is used to validate the attribute. Unlike Moose, Moo does not include a basic type system, so instead of doing isa => Num, one should do use Scalar::Util qw(looks_like_number); … isa => sub { die “$_[0] is not a number!” unless looks_like_number $_[0] }, Note that the return value for isa is discarded. Only if the sub dies does type validation fail. Sub::Quote aware Since Moo does not run the isa check before coerce if a coercion subroutine has been supplied, isa checks are not structural to your code and can, if desired, be omitted on non-debug builds (although if this results in an uncaught bug causing your program to break, the Moo authors guarantee nothing except that you get to keep both halves). If you want Moose compatible or MooseX::Types style named types, look at Type::Tiny. To cause your isa entries to be automatically mapped to named Moose::Meta::TypeConstraint objects (rather than the default behaviour of creating an anonymous type), set: $Moo::HandleMoose::TYPE_MAP{$isa_coderef} = sub { require MooseX::Types::Something; return MooseX::Types::Something::TypeName(); }; Note that this example is purely illustrative; anything that returns a Moose::Meta::TypeConstraint object or something similar enough to it to make Moose happy is fine.

“coerce”
Takes a coderef which is meant to coerce the attribute. The basic idea is to do something like the following: coerce => sub { $_[0] % 2 ? $_[0] : $_[0] + 1 }, Note that Moo will always execute your coercion: this is to permit isa entries to be used purely for bug trapping, whereas coercions are always structural to your code. We do, however, apply any supplied isa check after the coercion has run to ensure that it returned a valid value. Sub::Quote aware If the isa option is a blessed object providing a coerce or coercion method, then the coerce option may be set to just 1.

“handles”
Takes a string handles => RobotRole Where RobotRole is a role that defines an interface which becomes the list of methods to handle. Takes a list of methods handles => [ qw( one two ) ] Takes a hashref handles => { un => one, }

“trigger”
Takes a coderef which will get called any time the attribute is set. This includes the constructor, but not default or built values. The coderef will be invoked against the object with the new value as an argument. If you set this to just 1, it generates a trigger which calls the _trigger_${attr_name} method on $self. This feature comes from MooseX::AttributeShortcuts. Note that Moose also passes the old value, if any; this feature is not yet supported. Sub::Quote aware

“default”
Takes a coderef which will get called with $self as its only argument to populate an attribute if no value for that attribute was supplied to the constructor. Alternatively, if the attribute is lazy, default executes when the attribute is first retrieved if no value has yet been provided. If a simple scalar is provided, it will be inlined as a string. Any non-code reference (hash, array) will result in an error - for that case instead use a code reference that returns the desired value. Note that if your default is fired during new() there is no guarantee that other attributes have been populated yet so you should not rely on their existence. Sub::Quote aware

“predicate”
Takes a method name which will return true if an attribute has a value. If you set this to just 1, the predicate is automatically named has_${attr_name} if your attribute’s name does not start with an underscore, or _has_${attr_name_without_the_underscore} if it does. This feature comes from MooseX::AttributeShortcuts.

“builder”
Takes a method name which will be called to create the attribute - functions exactly like default except that instead of calling $default->($self); Moo will call $self->$builder; The following features come from MooseX::AttributeShortcuts: If you set this to just 1, the builder is automatically named _build_${attr_name}. If you set this to a coderef or code-convertible object, that variable will be installed under $class::_build_${attr_name} and the builder set to the same name.

“clearer”
Takes a method name which will clear the attribute. If you set this to just 1, the clearer is automatically named clear_${attr_name} if your attribute’s name does not start with an underscore, or _clear_${attr_name_without_the_underscore} if it does. This feature comes from MooseX::AttributeShortcuts. NOTE: If the attribute is lazy, it will be regenerated from default or builder the next time it is accessed. If it is not lazy, it will be undef.

“lazy”
Boolean. Set this if you want values for the attribute to be grabbed lazily. This is usually a good idea if you have a builder which requires another attribute to be set.

“required”
Boolean. Set this if the attribute must be passed on object instantiation.

“reader”
The name of the method that returns the value of the attribute. If you like Java style methods, you might set this to get_foo

“writer”
The value of this attribute will be the name of the method to set the value of the attribute. If you like Java style methods, you might set this to set_foo.

“weak_ref”
Boolean. Set this if you want the reference that the attribute contains to be weakened. Use this when circular references, which cause memory leaks, are possible.

“init_arg”
Takes the name of the key to look for at instantiation time of the object. A common use of this is to make an underscored attribute have a non-underscored initialization name. undef means that passing the value in on instantiation is ignored.

“moosify”
Takes either a coderef or array of coderefs which is meant to transform the given attributes specifications if necessary when upgrading to a Moose role or class. You shouldn’t need this by default, but is provided as a means of possible extensibility.

before

before foo => sub { … };

See before method(s) => sub { … }; in Class::Method::Modifiers for full documentation.

around

around foo => sub { … };

See around method(s) => sub { … }; in Class::Method::Modifiers for full documentation.

after

after foo => sub { … };

See after method(s) => sub { … }; in Class::Method::Modifiers for full documentation.

SUB QUOTE AWARE

quote_sub in Sub::Quote allows us to create coderefs that are inlineable, giving us a handy, XS-free speed boost. Any option that is Sub::Quote aware can take advantage of this.

To do this, you can write

use Sub::Quote; use Moo; use namespace::clean; has foo => ( is => ro, isa => quote_sub(q{ die “Not <3” unless $_[0] < 3 }) );

which will be inlined as

do { local @_ = ($_[0]->{foo}); die “Not <3” unless $_[0] < 3; }

or to avoid localizing @_,

has foo => ( is => ro, isa => quote_sub(q{ my ($val) = @_; die “Not <3” unless $val < 3 }) );

which will be inlined as

do { my ($val) = ($_[0]->{foo}); die “Not <3” unless $val < 3; }

See Sub::Quote for more information, including how to pass lexical captures that will also be compiled into the subroutine.

CLEANING UP IMPORTS

Moo will not clean up imported subroutines for you; you will have to do that manually. The recommended way to do this is to declare your imports first, then use Moo, then use namespace::clean. Anything imported before namespace::clean will be scrubbed. Anything imported or declared after will be still be available.

package Record; use Digest::MD5 qw(md5_hex); use Moo; use namespace::clean; has name => (is => ro, required => 1); has id => (is => lazy); sub _build_id { my ($self) = @_; return md5_hex($self->name); } 1;

For example if you were to import these subroutines after namespace::clean like this

use namespace::clean; use Digest::MD5 qw(md5_hex); use Moo;

then any Record $r would have methods such as $r->md5_hex(), $r->has() and $r->around() - almost certainly not what you intend!

Moo::Roles behave slightly differently. Since their methods are composed into the consuming class, they can do a little more for you automatically. As long as you declare your imports before calling use Moo::Role, those imports and the ones Moo::Role itself provides will not be composed into consuming classes so there’s usually no need to use namespace::clean.

On namespace::autoclean: Older versions of namespace::autoclean would inflate Moo classes to full Moose classes, losing the benefits of Moo. If you want to use namespace::autoclean with a Moo class, make sure you are using version 0.16 or newer.

INCOMPATIBILITIES WITH MOOSE

TYPES

There is no built-in type system. isa is verified with a coderef; if you need complex types, Type::Tiny can provide types, type libraries, and will work seamlessly with both Moo and Moose. Type::Tiny can be considered the successor to MooseX::Types and provides a similar API, so that you can write

use Types::Standard qw(Int); has days_to_live => (is => ro, isa => Int);

API INCOMPATIBILITIES

initializer is not supported in core since the author considers it to be a bad idea and Moose best practices recommend avoiding it. Meanwhile trigger or coerce are more likely to be able to fulfill your needs.

No support for super, override, inner, or augment - the author considers augment to be a bad idea, and override can be translated:

override foo => sub { … super(); … }; around foo => sub { my ($orig, $self) = (shift, shift); … $self->$orig(@_); … };

The dump method is not provided by default. The author suggests loading Devel::Dwarn into main:: (via perl -MDevel::Dwarn ... for example) and using $obj->$::Dwarn() instead.

default only supports coderefs and plain scalars, because passing a hash or array reference as a default is almost always incorrect since the value is then shared between all objects using that default.

lazy_build is not supported; you are instead encouraged to use the is => lazy option supported by Moo and MooseX::AttributeShortcuts.

auto_deref is not supported since the author considers it a bad idea and it has been considered best practice to avoid it for some time.

documentation will show up in a Moose metaclass created from your class but is otherwise ignored. Then again, Moose ignores it as well, so this is arguably not an incompatibility.

Since coerce does not require isa to be defined but Moose does require it, the metaclass inflation for coerce alone is a trifle insane and if you attempt to subtype the result will almost certainly break.

Handling of warnings: when you use Moo we enable strict and warnings, in a similar way to Moose. The authors recommend the use of strictures, which enables FATAL warnings, and several extra pragmas when used in development: indirect, multidimensional, and bareword::filehandles.

Additionally, Moo supports a set of attribute option shortcuts intended to reduce common boilerplate. The set of shortcuts is the same as in the Moose module MooseX::AttributeShortcuts as of its version 0.009+. So if you:

package MyClass; use Moo; use strictures 2;

The nearest Moose invocation would be:

package MyClass; use Moose; use warnings FATAL => “all”; use MooseX::AttributeShortcuts;

or, if you’re inheriting from a non-Moose class,

package MyClass; use Moose; use MooseX::NonMoose; use warnings FATAL => “all”; use MooseX::AttributeShortcuts;

META OBJECT

There is no meta object. If you need this level of complexity you need Moose - Moo is small because it explicitly does not provide a metaprotocol. However, if you load Moose, then

Class::MOP::class_of($moo_class_or_role)

will return an appropriate metaclass pre-populated by Moo.

IMMUTABILITY

Finally, Moose requires you to call

_ _PACKAGE_ _->meta->make_immutable;

at the end of your class to get an inlined (i.e. not horribly slow) constructor. Moo does it automatically the first time ->new is called on your class. (make_immutable is a no-op in Moo to ease migration.)

An extension MooX::late exists to ease translating Moose packages to Moo by providing a more Moose-like interface.

COMPATIBILITY WITH OLDER PERL VERSIONS

Moo is compatible with perl versions back to 5.6. When running on older versions, additional prerequisites will be required. If you are packaging a script with its dependencies, such as with App::FatPacker, you will need to be certain that the extra prerequisites are included.

MRO::Compat
Required on perl versions prior to 5.10.0.

Devel::GlobalDestruction
Required on perl versions prior to 5.14.0.

SUPPORT

IRC: #moose on irc.perl.org

Bugtracker: <https://rt.cpan.org/Public/Dist/Display.html?Name=Moo>

Git repository: <git://github.com/moose/Moo.git>

Git browser: <https://github.com/moose/Moo>

AUTHOR

mst - Matt S. Trout (cpan:MSTROUT) <[email protected]>

CONTRIBUTORS

dg - David Leadbeater (cpan:DGL) <[email protected]>

frew - Arthur Axel fREW Schmidt (cpan:FREW) <[email protected]>

hobbs - Andrew Rodland (cpan:ARODLAND) <[email protected]>

jnap - John Napiorkowski (cpan:JJNAPIORK) <[email protected]>

ribasushi - Peter Rabbitson (cpan:RIBASUSHI) <[email protected]>

chip - Chip Salzenberg (cpan:CHIPS) <[email protected]>

ajgb - Alex J. G. Burzyński (cpan:AJGB) <[email protected]>

doy - Jesse Luehrs (cpan:DOY) <doy at tozt dot net>

perigrin - Chris Prather (cpan:PERIGRIN) <[email protected]>

Mithaldu - Christian Walde (cpan:MITHALDU) <[email protected]>

ilmari - Dagfinn Ilmari Mannsåker (cpan:ILMARI) <[email protected]>

tobyink - Toby Inkster (cpan:TOBYINK) <[email protected]>

haarg - Graham Knop (cpan:HAARG) <[email protected]>

mattp - Matt Phillips (cpan:MATTP) <[email protected]>

bluefeet - Aran Deltac (cpan:BLUEFEET) <[email protected]>

bubaflub - Bob Kuo (cpan:BUBAFLUB) <[email protected]>

ether = Karen Etheridge (cpan:ETHER) <[email protected]>

COPYRIGHT

Copyright (c) 2010-2015 the Moo AUTHOR and CONTRIBUTORS as listed above.

LICENSE

This library is free software and may be distributed under the same terms as perl itself. See <https://dev.perl.org/licenses/>.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2575 - Linux cli command pthread_attr_getguardsize

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_attr_getguardsize and provides detailed information about the command pthread_attr_getguardsize, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_attr_getguardsize.

NAME 🖥️ pthread_attr_getguardsize 🖥️

set/get guard size attribute in thread attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_attr_setguardsize(pthread_attr_t *attr",size_t"guardsize);
int pthread_attr_getguardsize(const pthread_attr_t *restrict attr,
 size_t *restrict guardsize);

DESCRIPTION

The pthread_attr_setguardsize() function sets the guard size attribute of the thread attributes object referred to by attr to the value specified in guardsize.

If guardsize is greater than 0, then for each new thread created using attr the system allocates an additional region of at least guardsize bytes at the end of the thread’s stack to act as the guard area for the stack (but see BUGS).

If guardsize is 0, then new threads created with attr will not have a guard area.

The default guard size is the same as the system page size.

If the stack address attribute has been set in attr (using pthread_attr_setstack(3) or pthread_attr_setstackaddr(3)), meaning that the caller is allocating the thread’s stack, then the guard size attribute is ignored (i.e., no guard area is created by the system): it is the application’s responsibility to handle stack overflow (perhaps by using mprotect(2) to manually define a guard area at the end of the stack that it has allocated).

The pthread_attr_getguardsize() function returns the guard size attribute of the thread attributes object referred to by attr in the buffer pointed to by guardsize.

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

POSIX.1 documents an EINVAL error if attr or guardsize is invalid. On Linux these functions always succeed (but portable and future-proof applications should nevertheless handle a possible error return).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_attr_setguardsize(), pthread_attr_getguardsize()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.1. POSIX.1-2001.

NOTES

A guard area consists of virtual memory pages that are protected to prevent read and write access. If a thread overflows its stack into the guard area, then, on most hard architectures, it receives a SIGSEGV signal, thus notifying it of the overflow. Guard areas start on page boundaries, and the guard size is internally rounded up to the system page size when creating a thread. (Nevertheless, pthread_attr_getguardsize() returns the guard size that was set by pthread_attr_setguardsize().)

Setting a guard size of 0 may be useful to save memory in an application that creates many threads and knows that stack overflow can never occur.

Choosing a guard size larger than the default size may be necessary for detecting stack overflows if a thread allocates large data structures on the stack.

BUGS

As at glibc 2.8, the NPTL threading implementation includes the guard area within the stack size allocation, rather than allocating extra space at the end of the stack, as POSIX.1 requires. (This can result in an EINVAL error from pthread_create(3) if the guard size value is too large, leaving no space for the actual stack.)

The obsolete LinuxThreads implementation did the right thing, allocating extra space at the end of the stack for the guard area.

EXAMPLES

See pthread_getattr_np(3).

SEE ALSO

mmap(2), mprotect(2), pthread_attr_init(3), pthread_attr_setstack(3), pthread_attr_setstacksize(3), pthread_create(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2576 - Linux cli command sem_init

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sem_init and provides detailed information about the command sem_init, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sem_init.

NAME 🖥️ sem_init 🖥️

initialize an unnamed semaphore

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <semaphore.h>
int sem_init(sem_t *sem, int pshared, unsigned int value);

DESCRIPTION

sem_init() initializes the unnamed semaphore at the address pointed to by sem. The value argument specifies the initial value for the semaphore.

The pshared argument indicates whether this semaphore is to be shared between the threads of a process, or between processes.

If pshared has the value 0, then the semaphore is shared between the threads of a process, and should be located at some address that is visible to all threads (e.g., a global variable, or a variable allocated dynamically on the heap).

If pshared is nonzero, then the semaphore is shared between processes, and should be located in a region of shared memory (see shm_open(3), mmap(2), and shmget(2)). (Since a child created by fork(2) inherits its parent’s memory mappings, it can also access the semaphore.) Any process that can access the shared memory region can operate on the semaphore using sem_post(3), sem_wait(3), and so on.

Initializing a semaphore that has already been initialized results in undefined behavior.

RETURN VALUE

sem_init() returns 0 on success; on error, -1 is returned, and errno is set to indicate the error.

ERRORS

EINVAL
value exceeds SEM_VALUE_MAX.

ENOSYS
pshared is nonzero, but the system does not support process-shared semaphores (see sem_overview(7)).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sem_init()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

Bizarrely, POSIX.1-2001 does not specify the value that should be returned by a successful call to sem_init(). POSIX.1-2008 rectifies this, specifying the zero return on success.

EXAMPLES

See shm_open(3) and sem_wait(3).

SEE ALSO

sem_destroy(3), sem_post(3), sem_wait(3), sem_overview(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2577 - Linux cli command XtMoveWidget

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtMoveWidget and provides detailed information about the command XtMoveWidget, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtMoveWidget.

NAME 🖥️ XtMoveWidget 🖥️

move and resize widgets

SYNTAX

#include <X11/Intrinsic.h>

void XtConfigureWidget(Widget w, Position x, Position y, Dimension width, Dimension height, Dimension border_width);

void XtMoveWidget(Widget w, Position x, Position y);

void XtResizeWidget(Widget w, Dimension width, Dimension height, Dimension border_width);

void XtResizeWindow(Widget w);

ARGUMENTS

width

height

border_width
Specify the new widget size.

  1. Specifies the widget.

  1. Specify the new widget x and y coordinates.

DESCRIPTION

The XtConfigureWidget function returns immediately if the specified geometry fields are the same as the old values. Otherwise, XtConfigureWidget writes the new x, y, width, height, and border_width values into the widget and, if the widget is realized, makes an Xlib XConfigureWindow call on the widget’s window.

If either the new width or height is different from its old value, XtConfigureWidget calls the widget’s resize procedure to notify it of the size change; otherwise, it simply returns.

The XtMoveWidget function returns immediately if the specified geometry fields are the same as the old values. Otherwise, XtMoveWidget writes the new x and y values into the widget and, if the widget is realized, issues an Xlib XMoveWindow call on the widget’s window.

The XtResizeWidget function returns immediately if the specified geometry fields are the same as the old values. Otherwise, XtResizeWidget writes the new width, height, and border_width values into the widget and, if the widget is realized, issues an XConfigureWindow call on the widget’s window.

If the new width or height are different from the old values, XtResizeWidget calls the widget’s resize procedure to notify it of the size change.

The XtResizeWindow function calls the XConfigureWindow Xlib function to make the window of the specified widget match its width, height, and border width. This request is done unconditionally because there is no way to tell if these values match the current values. Note that the widget’s resize procedure is not called.

There are very few times to use XtResizeWindow; instead, you should use XtResizeWidget.

SEE ALSO

XtMakeGeometryRequest(3), XtQueryGeometry(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2578 - Linux cli command getservbyname_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getservbyname_r and provides detailed information about the command getservbyname_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getservbyname_r.

NAME 🖥️ getservbyname_r 🖥️

get service entry (reentrant)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
int getservent_r(struct servent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct servent **restrict result);
int getservbyname_r(const char *restrict name,
 const char *restrict proto,
 struct servent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct servent **restrict result);
int getservbyport_r(int port,
 const char *restrict proto,
 struct servent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct servent **restrict result);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getservent_r(), getservbyname_r(), getservbyport_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The getservent_r(), getservbyname_r(), and getservbyport_r() functions are the reentrant equivalents of, respectively, getservent(3), getservbyname(3), and getservbyport(3). They differ in the way that the servent structure is returned, and in the function calling signature and return value. This manual page describes just the differences from the nonreentrant functions.

Instead of returning a pointer to a statically allocated servent structure as the function result, these functions copy the structure into the location pointed to by result_buf.

The buf array is used to store the string fields pointed to by the returned servent structure. (The nonreentrant functions allocate these strings in static storage.) The size of this array is specified in buflen. If buf is too small, the call fails with the error ERANGE, and the caller must try again with a larger buffer. (A buffer of length 1024 bytes should be sufficient for most applications.)

If the function call successfully obtains a service record, then *result is set pointing to result_buf; otherwise, *result is set to NULL.

RETURN VALUE

On success, these functions return 0. On error, they return one of the positive error numbers listed in errors.

On error, record not found (getservbyname_r(), getservbyport_r()), or end of input (getservent_r()) result is set to NULL.

ERRORS

ENOENT
(getservent_r()) No more records in database.

ERANGE
buf is too small. Try again with a larger buffer (and increased buflen).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getservent_r(), getservbyname_r(), getservbyport_r()

Thread safetyMT-Safe locale

VERSIONS

Functions with similar names exist on some other systems, though typically with different calling signatures.

STANDARDS

GNU.

EXAMPLES

The program below uses getservbyport_r() to retrieve the service record for the port and protocol named in its first command-line argument. If a third (integer) command-line argument is supplied, it is used as the initial value for buflen; if getservbyport_r() fails with the error ERANGE, the program retries with larger buffer sizes. The following shell session shows a couple of sample runs:

$ ./a.out 7 tcp 1
ERANGE! Retrying with larger buffer
getservbyport_r() returned: 0 (success)  (buflen=87)
s_name=echo; s_proto=tcp; s_port=7; aliases=
$ ./a.out 77777 tcp
getservbyport_r() returned: 0 (success)  (buflen=1024)
Call failed/record not found

Program source

#define _GNU_SOURCE
#include <ctype.h>
#include <errno.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_BUF 10000
int
main(int argc, char *argv[])
{
    int buflen, erange_cnt, port, s;
    struct servent result_buf;
    struct servent *result;
    char buf[MAX_BUF];
    char *protop;
    if (argc < 3) {
        printf("Usage: %s port-num proto-name [buflen]

“, argv[0]); exit(EXIT_FAILURE); } port = htons(atoi(argv[1])); protop = (strcmp(argv[2], “null”) == 0 || strcmp(argv[2], “NULL”) == 0) ? NULL : argv[2]; buflen = 1024; if (argc > 3) buflen = atoi(argv[3]); if (buflen > MAX_BUF) { printf(“Exceeded buffer limit (%d) “, MAX_BUF); exit(EXIT_FAILURE); } erange_cnt = 0; do { s = getservbyport_r(port, protop, &result_buf, buf, buflen, &result); if (s == ERANGE) { if (erange_cnt == 0) printf(“ERANGE! Retrying with larger buffer “); erange_cnt++; /* Increment a byte at a time so we can see exactly what size buffer was required. */ buflen++; if (buflen > MAX_BUF) { printf(“Exceeded buffer limit (%d) “, MAX_BUF); exit(EXIT_FAILURE); } } } while (s == ERANGE); printf(“getservbyport_r() returned: %s (buflen=%d) “, (s == 0) ? “0 (success)” : (s == ENOENT) ? “ENOENT” : strerror(s), buflen); if (s != 0 || result == NULL) { printf(“Call failed/record not found “); exit(EXIT_FAILURE); } printf(“s_name=%s; s_proto=%s; s_port=%d; aliases=”, result_buf.s_name, result_buf.s_proto, ntohs(result_buf.s_port)); for (char **p = result_buf.s_aliases; *p != NULL; p++) printf("%s “, *p); printf(” “); exit(EXIT_SUCCESS); }

SEE ALSO

getservent(3), services(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2579 - Linux cli command significandf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command significandf and provides detailed information about the command significandf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the significandf.

NAME 🖥️ significandf 🖥️

get mantissa of floating-point number

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double significand(double x);
float significandf(float x);
long double significandl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

significand(), significandf(), significandl():

    /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the mantissa of x scaled to the range [1FLT_RADIX). They are equivalent to

scalb(x, (double) -ilogb(x))

This function exists mainly for use in certain standardized tests for IEEE 754 conformance.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

significand(), significandf(), significandl()

Thread safetyMT-Safe

STANDARDS

None.

significand()
BSD.

HISTORY

significand()
BSD.

SEE ALSO

ilogb(3), scalb(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2580 - Linux cli command Win32_DBIODBCpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Win32_DBIODBCpm and provides detailed information about the command Win32_DBIODBCpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Win32_DBIODBCpm.

NAME 🖥️ Win32_DBIODBCpm 🖥️

Win32::ODBC emulation layer for the DBI

SYNOPSIS

use Win32::DBIODBC; # instead of use Win32::ODBC

DESCRIPTION

This is a very basic very alpha quality Win32::ODBC emulation for the DBI. To use it just replace

use Win32::ODBC;

in your scripts with

use Win32::DBIODBC;

or, while experimenting, you can pre-load this module without changing your scripts by doing

perl -MWin32::DBIODBC your_script_name

TO DO

Error handling is virtually non-existent.

AUTHOR

Tom Horen <[email protected]>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2581 - Linux cli command y0

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command y0 and provides detailed information about the command y0, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the y0.

NAME 🖥️ y0 🖥️

Bessel functions of the second kind

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double y0(double x);
double y1(double x);
double yn(int n, double x);
float y0f(float x);
float y1f(float x);
float ynf(int n, float x);
long double y0l(long double x);
long double y1l(long double x);
long double ynl(int n, long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

y0(), y1(), yn():

    _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

y0f(), y0l(), y1f(), y1l(), ynf(), ynl():

    _XOPEN_SOURCE >= 600
        || (_ISOC99_SOURCE && _XOPEN_SOURCE)
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The y0() and y1() functions return Bessel functions of x of the second kind of orders 0 and 1, respectively. The yn() function returns the Bessel function of x of the second kind of order n.

The value of x must be positive.

The y0f(), y1f(), and ynf() functions are versions that take and return float values. The y0l(), y1l(), and ynl() functions are versions that take and return long double values.

RETURN VALUE

On success, these functions return the appropriate Bessel value of the second kind for x.

If x is a NaN, a NaN is returned.

If x is negative, a domain error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively. (POSIX.1-2001 also allows a NaN return for this case.)

If x is 0.0, a pole error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively.

If the result underflows, a range error occurs, and the functions return 0.0

If the result overflows, a range error occurs, and the functions return -HUGE_VAL, -HUGE_VALF, or -HUGE_VALL, respectively. (POSIX.1-2001 also allows a 0.0 return for this case.)

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is negative
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

Pole error: x is 0.0
errno is set to ERANGE and an FE_DIVBYZERO exception is raised (but see BUGS).

Range error: result underflow
errno is set to ERANGE. No FE_UNDERFLOW exception is returned by fetestexcept(3) for this case.

Range error: result overflow
errno is set to ERANGE (but see BUGS). An overflow floating-point exception (FE_OVERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

y0(), y0f(), y0l()

Thread safetyMT-Safe

y1(), y1f(), y1l()

Thread safetyMT-Safe

yn(), ynf(), ynl()

Thread safetyMT-Safe

STANDARDS

y0()
y1()
yn()
POSIX.1-2008.

Others:
BSD.

HISTORY

y0()
y1()
yn()
SVr4, 4.3BSD, POSIX.1-2001.

Others:
BSD.

BUGS

Before glibc 2.19, these functions misdiagnosed pole errors: errno was set to EDOM, instead of ERANGE and no FE_DIVBYZERO exception was raised.

Before glibc 2.17, did not set errno for “range error: result underflow”.

In glibc 2.3.2 and earlier, these functions do not raise an invalid floating-point exception (FE_INVALID) when a domain error occurs.

SEE ALSO

j0(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2582 - Linux cli command zip_error_get_sys_type

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_error_get_sys_type and provides detailed information about the command zip_error_get_sys_type, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_error_get_sys_type.

libzip (-lzip)

The function

is deprecated; use

and

instead.

Replace

int i = zip_error_get_sys_type(ze);

with

zip_error_t error; zip_error_init_with_code(&error, ze); int i = zip_error_system_type(&error);

was added in libzip 0.6. It was deprecated in libzip 1.0, use

instead.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2583 - Linux cli command wcspbrk

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcspbrk and provides detailed information about the command wcspbrk, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcspbrk.

NAME 🖥️ wcspbrk 🖥️

search a wide-character string for any of a set of wide characters

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
wchar_t *wcspbrk(const wchar_t *wcs, const wchar_t *accept);

DESCRIPTION

The wcspbrk() function is the wide-character equivalent of the strpbrk(3) function. It searches for the first occurrence in the wide-character string pointed to by wcs of any of the characters in the wide-character string pointed to by accept.

RETURN VALUE

The wcspbrk() function returns a pointer to the first occurrence in wcs of any of the characters listed in accept. If wcs contains none of these characters, NULL is returned.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcspbrk()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

strpbrk(3), wcschr(3), wcscspn(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2584 - Linux cli command xdr_array

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_array and provides detailed information about the command xdr_array, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_array.

NAME 🖥️ xdr_array 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2585 - Linux cli command HTML_PullParserpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_PullParserpm and provides detailed information about the command HTML_PullParserpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_PullParserpm.

NAME 🖥️ HTML_PullParserpm 🖥️

Alternative HTML::Parser interface

SYNOPSIS

use HTML::PullParser; $p = HTML::PullParser->new(file => “index.html”, start => event, tagname, @attr, end => event, tagname, ignore_elements => [qw(script style)], ) || die “Cant open: $!”; while (my $token = $p->get_token) { #…do something with $token }

DESCRIPTION

The HTML::PullParser is an alternative interface to the HTML::Parser class. It basically turns the HTML::Parser inside out. You associate a file (or any IO::Handle object or string) with the parser at construction time and then repeatedly call $parser->get_token to obtain the tags and text found in the parsed document.

The following methods are provided:

$p = HTML::PullParser->new( file => $file, %options )

$p = HTML::PullParser->new( doc => \doc, %options )

A HTML::PullParser can be made to parse from either a file or a literal document based on whether the file or doc option is passed to the parser’s constructor. The file passed in can either be a file name or a file handle object. If a file name is passed, and it can’t be opened for reading, then the constructor will return an undefined value and $! will tell you why it failed. Otherwise the argument is taken to be some object that the HTML::PullParser can read() from when it needs more data. The stream will be read() until EOF, but not closed. A doc can be passed plain or as a reference to a scalar. If a reference is passed then the value of this scalar should not be changed before all tokens have been extracted. Next the information to be returned for the different token types must be set up. This is done by simply associating an argspec (as defined in HTML::Parser) with the events you have an interest in. For instance, if you want start tokens to be reported as the string S followed by the tagname and the attributes you might pass an start-option like this: $p = HTML::PullParser->new( doc => $document_to_parse, start => “S”, tagname, @attr, end => “E”, tagname, ); At last other HTML::Parser options, like ignore_tags, and unbroken_text, can be passed in. Note that you should not use the event_h options to set up parser handlers. That would confuse the inner logic of HTML::PullParser.

$token = $p->get_token
This method will return the next token found in the HTML document, or undef at the end of the document. The token is returned as an array reference. The content of this array match the argspec set up during HTML::PullParser construction.

$p->unget_token( @tokens )
If you find out you have read too many tokens you can push them back, so that they are returned again the next time $p->get_token is called.

EXAMPLES

The ’eg/hform’ script shows how we might parse the form section of HTML::Documents using HTML::PullParser.

SEE ALSO

HTML::Parser, HTML::TokeParser

COPYRIGHT

Copyright 1998-2001 Gisle Aas.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2586 - Linux cli command Image_ExifTool_IPTCpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_IPTCpm and provides detailed information about the command Image_ExifTool_IPTCpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_IPTCpm.

NAME 🖥️ Image_ExifTool_IPTCpm 🖥️

Read IPTC meta information

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret IPTC (International Press Telecommunications Council) meta information in image files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.iptc.org/IIM/>

SEE ALSO

“IPTC Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2587 - Linux cli command Net_DNS_RR_NAPTRpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_NAPTRpm and provides detailed information about the command Net_DNS_RR_NAPTRpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_NAPTRpm.

NAME 🖥️ Net_DNS_RR_NAPTRpm 🖥️

DNS NAPTR resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name NAPTR order preference flags service regexp replacement);

DESCRIPTION

DNS Naming Authority Pointer (NAPTR) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

order

$order = $rr->order; $rr->order( $order );

A 16-bit unsigned integer specifying the order in which the NAPTR records must be processed to ensure the correct ordering of rules. Low numbers are processed before high numbers.

preference

$preference = $rr->preference; $rr->preference( $preference );

A 16-bit unsigned integer that specifies the order in which NAPTR records with equal “order” values should be processed, low numbers being processed before high numbers.

flags

$flags = $rr->flags; $rr->flags( $flags );

A string containing flags to control aspects of the rewriting and interpretation of the fields in the record. Flags are single characters from the set [A-Z0-9].

service

$service = $rr->service; $rr->service( $service );

Specifies the service(s) available down this rewrite path. It may also specify the protocol used to communicate with the service.

regexp

$regexp = $rr->regexp; $rr->regexp;

A string containing a substitution expression that is applied to the original string held by the client in order to construct the next domain name to lookup.

replacement

$replacement = $rr->replacement; $rr->replacement( $replacement );

The next NAME to query for NAPTR, SRV, or address records depending on the value of the flags field.

COPYRIGHT

Copyright (c)1997 Michael Fuhr.

Portions Copyright (c)2005 Olaf Kolkman, NLnet Labs.

Based on code contributed by Ryan Moats.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC3403 <https://tools.ietf.org/html/rfc3403>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2588 - Linux cli command Net_DNS_RR_ZONEMDpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_ZONEMDpm and provides detailed information about the command Net_DNS_RR_ZONEMDpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_ZONEMDpm.

NAME 🖥️ Net_DNS_RR_ZONEMDpm 🖥️

DNS ZONEMD resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(“example.com. ZONEMD 2018031500 1 1 FEBE3D4CE2EC2FFA4BA99D46CD69D6D29711E55217057BEE 7EB1A7B641A47BA7FED2DD5B97AE499FAFA4F22C6BD647DE”);

DESCRIPTION

Class for DNS Zone Message Digest (ZONEMD) resource record.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

serial

$serial = $rr->serial; $rr->serial( $serial );

Unsigned 32-bit integer zone serial number.

scheme

$scheme = $rr->scheme; $rr->scheme( $scheme );

The scheme field is an 8-bit unsigned integer that identifies the methods by which data is collated and presented as input to the hashing function.

algorithm

$algorithm = $rr->algorithm; $rr->algorithm( $algorithm );

The algorithm field is an 8-bit unsigned integer that identifies the cryptographic hash algorithm used to construct the digest.

digest

$digest = $rr->digest; $rr->digest( $digest );

Hexadecimal representation of the digest over the zone content.

digestbin

$digestbin = $rr->digestbin; $rr->digestbin( $digestbin );

Binary representation of the digest over the zone content.

COPYRIGHT

Copyright (c)2019 Dick Franks.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC8976 <https://tools.ietf.org/html/rfc8976>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2589 - Linux cli command pcap_activatepcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_activatepcap and provides detailed information about the command pcap_activatepcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_activatepcap.

NAME 🖥️ pcap_activatepcap 🖥️

activate a capture handle

SYNOPSIS

#include <pcap/pcap.h>
int pcap_activate(pcap_t *p);

DESCRIPTION

pcap_activate() is used to activate a packet capture handle to look at packets on the network, with the options that were set on the handle being in effect.

RETURN VALUE

pcap_activate() returns 0 on success without warnings, a non-zero positive value on success with warnings, and a negative value on error. A non-zero return value indicates what warning or error condition occurred.

The possible warning values are:

PCAP_WARNING_PROMISC_NOTSUP
Promiscuous mode was requested, but the capture source doesn’t support promiscuous mode.

PCAP_WARNING_TSTAMP_TYPE_NOTSUP
The time stamp type specified in a previous pcap_set_tstamp_type(3PCAP) call isn’t supported by the capture source (the time stamp type is left as the default),

PCAP_WARNING
Another warning condition occurred; pcap_geterr(3PCAP) or pcap_perror(3PCAP) may be called with p as an argument to fetch or display a message describing the warning condition.

The possible error values are:

PCAP_ERROR_ACTIVATED
The handle has already been activated.

PCAP_ERROR_NO_SUCH_DEVICE
The capture source specified when the handle was created doesn’t exist.

PCAP_ERROR_PERM_DENIED
The process doesn’t have permission to open the capture source.

PCAP_ERROR_PROMISC_PERM_DENIED
The process has permission to open the capture source but doesn’t have permission to put it into promiscuous mode.

PCAP_ERROR_RFMON_NOTSUP
Monitor mode was specified but the capture source doesn’t support monitor mode.

PCAP_ERROR_IFACE_NOT_UP
The capture source device is not up.

PCAP_ERROR
Another error occurred. pcap_geterr() or pcap_perror() may be called with p as an argument to fetch or display a message describing the error.

If PCAP_WARNING_PROMISC_NOTSUP, PCAP_ERROR_NO_SUCH_DEVICE, or PCAP_ERROR_PERM_DENIED is returned, pcap_geterr() or pcap_perror() may be called with p as an argument to fetch or display an message giving additional details about the problem that might be useful for debugging the problem if it’s unexpected.

Additional warning and error codes may be added in the future; a program should check for positive, negative, and zero return codes, and treat all positive return codes as warnings and all negative return codes as errors. pcap_statustostr(3PCAP) can be called, with a warning or error code as an argument, to fetch a message describing the warning or error code.

If pcap_activate() fails, the pcap_t * is not closed and freed; it should be closed using pcap_close().

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2590 - Linux cli command xdr_opaque

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_opaque and provides detailed information about the command xdr_opaque, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_opaque.

NAME 🖥️ xdr_opaque 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2591 - Linux cli command XtVaCreateWidget

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtVaCreateWidget and provides detailed information about the command XtVaCreateWidget, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtVaCreateWidget.

NAME 🖥️ XtVaCreateWidget 🖥️

create and destroy widgets

SYNTAX

#include <X11/Intrinsic.h>

Widget XtCreateWidget(const char *name, WidgetClass widget_class, Widget parent, ArgList args, Cardinal num_args);

Widget XtVaCreateWidget(const char *name, WidgetClass widget_class, Widget parent, … );

Widget XtCreateManagedWidget(const char *name, WidgetClass widget_class, Widget parent, ArgList args, Cardinal num_args);

Widget XtVaCreateManagedWidget(const char *name, WidgetClass widget_class, Widget parent, … );

void XtDestroyWidget(Widget w);

ARGUMENTS

args
Specifies the argument list to override the resource defaults.

name
Specifies the resource name for the created widget, which is used for retrieving resources and, for that reason, should not be the same as any other widget that is a child of same parent.

num_args
Specifies the number of arguments in the argument list.

parent
Specifies the parent widget.

  1. Specifies the widget.

widget_class
Specifies the widget class pointer for the created widget.


Specifies the variable argument list to override the resource defaults.

DESCRIPTION

The XtCreateWidget function performs much of the boilerplate operations of widget creation:

  • Checks to see if the class_initialize procedure has been called for this class and for all superclasses and, if not, calls those necessary in a superclass-to-subclass order.

  • Allocates memory for the widget instance.

  • If the parent is a subclass of constraintWidgetClass, it allocates memory for the parent’s constraints and stores the address of this memory into the constraints field.

  • Initializes the core nonresource data fields (for example, parent and visible).

  • Initializes the resource fields (for example, background_pixel) by using the resource lists specified for this class and all superclasses.

  • If the parent is a subclass of constraintWidgetClass, it initializes the resource fields of the constraints record by using the constraint resource list specified for the parent’s class and all superclasses up to constraintWidgetClass.

  • Calls the initialize procedures for the widget by starting at the Core initialize procedure on down to the widget’s initialize procedure.

  • If the parent is a subclass of compositeWidgetClass, it puts the widget into its parent’s children list by calling its parent’s insert_child procedure. For further information, see Section 3.5.

  • If the parent is a subclass of constraintWidgetClass, it calls the constraint initialize procedures, starting at constraintWidgetClass on down to the parent’s constraint initialize procedure.

Note that you can determine the number of arguments in an argument list by using the XtNumber macro. For further information, see Section 11.1.

The XtCreateManagedWidget function is a convenience routine that calls XtCreateWidget and XtManageChild.

The XtDestroyWidget function provides the only method of destroying a widget, including widgets that need to destroy themselves. It can be called at any time, including from an application callback routine of the widget being destroyed. This requires a two-phase destroy process in order to avoid dangling references to destroyed widgets.

In phase one, XtDestroyWidget performs the following:

  • If the being_destroyed field of the widget is True, it returns immediately.

  • Recursively descends the widget tree and sets the being_destroyed field to True for the widget and all children.

  • Adds the widget to a list of widgets (the destroy list) that should be destroyed when it is safe to do so.

Entries on the destroy list satisfy the invariant that if w2 occurs after w1 on the destroy list then w2 is not a descendent of w1. (A descendant refers to both normal and pop-up children.)

Phase two occurs when all procedures that should execute as a result of the current event have been called (including all procedures registered with the event and translation managers), that is, when the current invocation of XtDispatchEvent is about to return or immediately if not in XtDispatchEvent.

In phase two, XtDestroyWidget performs the following on each entry in the destroy list:

  • Calls the destroy callback procedures registered on the widget (and all descendants) in post-order (it calls children callbacks before parent callbacks).

  • If the widget’s parent is a subclass of compositeWidgetClass and if the parent is not being destroyed, it calls XtUnmanageChild on the widget and then calls the widget’s parent’s delete_child procedure (see Section 3.4).

  • If the widget’s parent is a subclass of constraintWidgetClass, it calls the constraint destroy procedure for the parent, then the parent’s superclass, until finally it calls the constraint destroy procedure for constraintWidgetClass.

  • Calls the destroy methods for the widget (and all descendants) in post-order. For each such widget, it calls the destroy procedure declared in the widget class, then the destroy procedure declared in its superclass, until finally it calls the destroy procedure declared in the Core class record.

  • Calls XDestroyWindow if the widget is realized (that is, has an X window). The server recursively destroys all descendant windows.

  • Recursively descends the tree and deallocates all pop-up widgets, constraint records, callback lists and, if the widget is a subclass of compositeWidgetClass, children.

SEE ALSO

XtAppCreateShell(3), XtCreatePopupShell(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2592 - Linux cli command Image_ExifTool_Validatepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Validatepm and provides detailed information about the command Image_ExifTool_Validatepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Validatepm.

NAME 🖥️ Image_ExifTool_Validatepm 🖥️

Additional metadata validation

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains additional routines and definitions used when the ExifTool Validate option is enabled.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Image::ExifTool (3pm), “Extra Tags” in Image::ExifTool::TagNames

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2593 - Linux cli command stdarg

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command stdarg and provides detailed information about the command stdarg, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the stdarg.

NAME 🖥️ stdarg 🖥️

variable argument lists

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdarg.h>
void va_start(va_list ap, last);
type va_arg(va_list ap, type);
void va_end(va_list ap);
void va_copy(va_list dest, va_list src);

DESCRIPTION

A function may be called with a varying number of arguments of varying types. The include file <stdarg.h> declares a type va_list and defines three macros for stepping through a list of arguments whose number and types are not known to the called function.

The called function must declare an object of type va_list which is used by the macros va_start(), va_arg(), and va_end().

va_start()

The va_start() macro initializes ap for subsequent use by va_arg() and va_end(), and must be called first.

The argument last is the name of the last argument before the variable argument list, that is, the last argument of which the calling function knows the type.

Because the address of this argument may be used in the va_start() macro, it should not be declared as a register variable, or as a function or an array type.

va_arg()

The va_arg() macro expands to an expression that has the type and value of the next argument in the call. The argument ap is the va_list ap initialized by va_start(). Each call to va_arg() modifies ap so that the next call returns the next argument. The argument type is a type name specified so that the type of a pointer to an object that has the specified type can be obtained simply by adding a * to type.

The first use of the va_arg() macro after that of the va_start() macro returns the argument after last. Successive invocations return the values of the remaining arguments.

If there is no next argument, or if type is not compatible with the type of the actual next argument (as promoted according to the default argument promotions), random errors will occur.

If ap is passed to a function that uses va_arg(ap,type), then the value of ap is undefined after the return of that function.

va_end()

Each invocation of va_start() must be matched by a corresponding invocation of va_end() in the same function. After the call va_end(ap) the variable ap is undefined. Multiple traversals of the list, each bracketed by va_start() and va_end() are possible. va_end() may be a macro or a function.

va_copy()

The va_copy() macro copies the (previously initialized) variable argument list src to dest. The behavior is as if va_start() were applied to dest with the same last argument, followed by the same number of va_arg() invocations that was used to reach the current state of src.

An obvious implementation would have a va_list be a pointer to the stack frame of the variadic function. In such a setup (by far the most common) there seems nothing against an assignment

va_list aq = ap;

Unfortunately, there are also systems that make it an array of pointers (of length 1), and there one needs

va_list aq;
*aq = *ap;

Finally, on systems where arguments are passed in registers, it may be necessary for va_start() to allocate memory, store the arguments there, and also an indication of which argument is next, so that va_arg() can step through the list. Now va_end() can free the allocated memory again. To accommodate this situation, C99 adds a macro va_copy(), so that the above assignment can be replaced by

va_list aq;
va_copy(aq, ap);
...
va_end(aq);

Each invocation of va_copy() must be matched by a corresponding invocation of va_end() in the same function. Some systems that do not supply va_copy() have __va_copy instead, since that was the name used in the draft proposal.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

va_start(), va_end(), va_copy()

Thread safetyMT-Safe

va_arg()

Thread safetyMT-Safe race:ap

STANDARDS

C11, POSIX.1-2008.

HISTORY

va_start()
va_arg()
va_end()
C89, POSIX.1-2001.

va_copy()
C99, POSIX.1-2001.

CAVEATS

Unlike the historical varargs macros, the stdarg macros do not permit programmers to code a function with no fixed arguments. This problem generates work mainly when converting varargs code to stdarg code, but it also creates difficulties for variadic functions that wish to pass all of their arguments on to a function that takes a va_list argument, such as vfprintf(3).

EXAMPLES

The function foo takes a string of format characters and prints out the argument associated with each format character based on the type.

#include <stdio.h>
#include <stdarg.h>
void
foo(char *fmt, ...)   /* '...' is C syntax for a variadic function */
{
    va_list ap;
    int d;
    char c;
    char *s;
    va_start(ap, fmt);
    while (*fmt)
        switch (*fmt++) {
        case 's':              /* string */
            s = va_arg(ap, char *);
            printf("string %s

“, s); break; case ’d’: /* int / d = va_arg(ap, int); printf(“int %d “, d); break; case ‘c’: / char / / need a cast here since va_arg only takes fully promoted types */ c = (char) va_arg(ap, int); printf(“char %c “, c); break; } va_end(ap); }

SEE ALSO

vprintf(3), vscanf(3), vsyslog(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2594 - Linux cli command ulckpwdf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ulckpwdf and provides detailed information about the command ulckpwdf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ulckpwdf.

NAME 🖥️ ulckpwdf 🖥️

get shadow password file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

/* General shadow password file API */
#include <shadow.h>
struct spwd *getspnam(const char *name);
struct spwd *getspent(void);
void setspent(void);
void endspent(void);
struct spwd *fgetspent(FILE *stream);
struct spwd *sgetspent(const char *s);
int putspent(const struct spwd *p, FILE *stream);
int lckpwdf(void);
int ulckpwdf(void);
/* GNU extension */
#include <shadow.h>
int getspent_r(struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int getspnam_r(const char *name, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int fgetspent_r(FILE *stream, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int sgetspent_r(const char *s, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getspent_r(), getspnam_r(), fgetspent_r(), sgetspent_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

Long ago it was considered safe to have encrypted passwords openly visible in the password file. When computers got faster and people got more security-conscious, this was no longer acceptable. Julianne Frances Haugh implemented the shadow password suite that keeps the encrypted passwords in the shadow password database (e.g., the local shadow password file /etc/shadow, NIS, and LDAP), readable only by root.

The functions described below resemble those for the traditional password database (e.g., see getpwnam(3) and getpwent(3)).

The getspnam() function returns a pointer to a structure containing the broken-out fields of the record in the shadow password database that matches the username name.

The getspent() function returns a pointer to the next entry in the shadow password database. The position in the input stream is initialized by setspent(). When done reading, the program may call endspent() so that resources can be deallocated.

The fgetspent() function is similar to getspent() but uses the supplied stream instead of the one implicitly opened by setspent().

The sgetspent() function parses the supplied string s into a struct spwd.

The putspent() function writes the contents of the supplied struct spwd *p as a text line in the shadow password file format to stream. String entries with value NULL and numerical entries with value -1 are written as an empty string.

The lckpwdf() function is intended to protect against multiple simultaneous accesses of the shadow password database. It tries to acquire a lock, and returns 0 on success, or -1 on failure (lock not obtained within 15 seconds). The ulckpwdf() function releases the lock again. Note that there is no protection against direct access of the shadow password file. Only programs that use lckpwdf() will notice the lock.

These were the functions that formed the original shadow API. They are widely available.

Reentrant versions

Analogous to the reentrant functions for the password database, glibc also has reentrant functions for the shadow password database. The getspnam_r() function is like getspnam() but stores the retrieved shadow password structure in the space pointed to by spbuf. This shadow password structure contains pointers to strings, and these strings are stored in the buffer buf of size buflen. A pointer to the result (in case of success) or NULL (in case no entry was found or an error occurred) is stored in *spbufp.

The functions getspent_r(), fgetspent_r(), and sgetspent_r() are similarly analogous to their nonreentrant counterparts.

Some non-glibc systems also have functions with these names, often with different prototypes.

Structure

The shadow password structure is defined in <shadow.h> as follows:

struct spwd {
    char *sp_namp;     /* Login name */
    char *sp_pwdp;     /* Encrypted password */
    long  sp_lstchg;   /* Date of last change
                          (measured in days since
                          1970-01-01 00:00:00 +0000 (UTC)) */
    long  sp_min;      /* Min # of days between changes */
    long  sp_max;      /* Max # of days between changes */
    long  sp_warn;     /* # of days before password expires
                          to warn user to change it */
    long  sp_inact;    /* # of days after password expires
                          until account is disabled */
    long  sp_expire;   /* Date when account expires
                          (measured in days since
                          1970-01-01 00:00:00 +0000 (UTC)) */
    unsigned long sp_flag;  /* Reserved */
};

RETURN VALUE

The functions that return a pointer return NULL if no more entries are available or if an error occurs during processing. The functions which have int as the return value return 0 for success and -1 for failure, with errno set to indicate the error.

For the nonreentrant functions, the return value may point to static area, and may be overwritten by subsequent calls to these functions.

The reentrant functions return zero on success. In case of error, an error number is returned.

ERRORS

EACCES
The caller does not have permission to access the shadow password file.

ERANGE
Supplied buffer is too small.

FILES

/etc/shadow
local shadow password database file

/etc/.pwd.lock
lock file

The include file <paths.h> defines the constant _PATH_SHADOW to the pathname of the shadow password file.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getspnam()

Thread safety

MT-Unsafe race:getspnam locale

getspent()

Thread safety

MT-Unsafe race:getspent race:spentbuf locale

setspent(), endspent(), getspent_r()

Thread safety

MT-Unsafe race:getspent locale

fgetspent()

Thread safety

MT-Unsafe race:fgetspent

sgetspent()

Thread safety

MT-Unsafe race:sgetspent

putspent(), getspnam_r(), sgetspent_r()

Thread safety

MT-Safe locale

lckpwdf(), ulckpwdf(), fgetspent_r()

Thread safety

MT-Safe

In the above table, getspent in race:getspent signifies that if any of the functions setspent(), getspent(), getspent_r(), or endspent() are used in parallel in different threads of a program, then data races could occur.

VERSIONS

Many other systems provide a similar API.

STANDARDS

None.

SEE ALSO

getgrnam(3), getpwnam(3), getpwnam_r(3), shadow(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2595 - Linux cli command TIMEVAL_TO_TIMESPEC

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command TIMEVAL_TO_TIMESPEC and provides detailed information about the command TIMEVAL_TO_TIMESPEC, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the TIMEVAL_TO_TIMESPEC.

NAME 🖥️ TIMEVAL_TO_TIMESPEC 🖥️

convert between time structures

SYNOPSIS

#define _GNU_SOURCE
#include <sys/time.h>
void TIMEVAL_TO_TIMESPEC(const struct timeval *tv, struct timespec *ts);
void TIMESPEC_TO_TIMEVAL(struct timeval *tv, const struct timespec *ts);

DESCRIPTION

These macros convert from a timeval(3type) to a timespec(3type) structure, and vice versa, respectively.

This is especially useful for writing interfaces that receive a type, but are implemented with calls to functions that receive the other one.

STANDARDS

GNU, BSD.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2596 - Linux cli command Tk_ErrorDialogpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_ErrorDialogpm and provides detailed information about the command Tk_ErrorDialogpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_ErrorDialogpm.

NAME 🖥️ Tk_ErrorDialogpm 🖥️

Method invoked to process background errors

SYNOPSIS

Customization:

require Tk::ErrorDialog;

DESCRIPTION

Tk::ErrorDialog is a possibility to handle background errors. For a full descriptionm, see Tk::Error.

SEE ALSO

Tk::Error Tk::bind Tk::after Tk::fileevent

KEYWORDS

background error, reporting, error dialog

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2597 - Linux cli command XtAppPeekEvent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppPeekEvent and provides detailed information about the command XtAppPeekEvent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppPeekEvent.

NAME 🖥️ XtAppPeekEvent 🖥️

query and process events and input

SYNTAX

#include <X11/Intrinsic.h>

void XtAppNextEvent(XtAppContext app_context, XEvent *event_return);

Boolean XtAppPeekEvent(XtAppContext app_context, XEvent *event_return);

XtInputMask XtAppPending(XtAppContext app_context);

void XtAppProcessEvent(XtAppContext app_context, XtInputMask mask);

Boolean XtDispatchEvent(XEvent *event);

void XtAppMainLoop(XtAppContext app_context);

ARGUMENTS

app_context
Specifies the application context that identifies the application.

event
Specifies a pointer to the event structure that is to be dispatched to the appropriate event handler.

event_return
Returns the event information to the specified event structure.

mask
Specifies what types of events to process. The mask is the bitwise inclusive OR of any combination of XtIMXEvent, XtIMTimer, XtIMAlternateInput, and XtIMSignal. As a convenience, the X Toolkit defines the symbolic name XtIMAll to be the bitwise inclusive OR of all event types.

DESCRIPTION

If the X event queue is empty, XtAppNextEvent flushes the X output buffers of each Display in the application context and waits for an event while looking at the other input sources, timeout timeout values, and signal handlers and calling any callback procedures triggered by them. This wait time can be used for background processing (see Section 7.8).

If there is an event in the queue, XtAppPeekEvent fills in the event and returns a nonzero value. If no X input is on the queue, XtAppPeekEvent flushes the output buffer and blocks until input is available (possibly calling some timeout callbacks in the process). If the input is an event, XtAppPeekEvent fills in the event and returns a nonzero value. Otherwise, the input is for an alternate input source, and XtAppPeekEvent returns zero.

The XtAppPending function returns a nonzero value if there are events pending from the X server, timer pending, or other input sources pending. The value returned is a bit mask that is the OR of XtIMXEvent, XtIMTimer, XtIMAlternateInput, and XtIMSignal (see XtAppProcessEvent). If there are no events pending, XtAppPending flushes the output buffer and returns zero.

The XtAppProcessEvent function processes one timer, alternate input, signal source, or X event. If there is nothing of the appropriate type to process, XtAppProcessEvent blocks until there is. If there is more than one type of thing available to process, it is undefined which will get processed. Usually, this procedure is not called by client applications (see XtAppMainLoop). XtAppProcessEvent processes timer events by calling any appropriate timer callbacks, alternate input by calling any appropriate alternate input callbacks, signal source by calling any appropriate signal callbacks, and X events by calling XtDispatchEvent.

When an X event is received, it is passed to XtDispatchEvent, which calls the appropriate event handlers and passes them the widget, the event, and client-specific data registered with each procedure. If there are no handlers for that event registered, the event is ignored and the dispatcher simply returns. The order in which the handlers are called is undefined.

The XtDispatchEvent function sends those events to the event handler functions that have been previously registered with the dispatch routine. XtDispatchEvent returns True if it dispatched the event to some handler and False if it found no handler to dispatch the event to. The most common use of XtDispatchEvent is to dispatch events acquired with the XtAppNextEvent procedure. However, it also can be used to dispatch user-constructed events. XtDispatchEvent also is responsible for implementing the grab semantics for XtAddGrab.

The XtAppMainLoop function processes events using XtAppProcessEvent, varying the mask parameter and using XtAppPending to ensure that it has a chance to handle events of all types, i.e., X events, timer events, input events and signal sources. This constitutes the main loop of X Toolkit applications, and, as such, it does not return unless XtAppSetExitFlag is called. Applications are expected to exit in response to some user action. There is nothing special about XtAppMainLoop; it is simply an loop that processes events until XtAppGetExitFlag() returns true.

Applications can provide their own version of this loop, which tests some global termination flag or tests that the number of top-level widgets is larger than zero before circling back for the next event.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2598 - Linux cli command putpwent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command putpwent and provides detailed information about the command putpwent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the putpwent.

NAME 🖥️ putpwent 🖥️

write a password file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
#include <sys/types.h>
#include <pwd.h>
int putpwent(const struct passwd *restrict p",FILE*restrict"stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

putpwent():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _SVID_SOURCE

DESCRIPTION

The putpwent() function writes a password entry from the structure p in the file associated with stream.

The passwd structure is defined in <pwd.h> as follows:

struct passwd {
    char    *pw_name;        /* username */
    char    *pw_passwd;      /* user password */
    uid_t    pw_uid;         /* user ID */
    gid_t    pw_gid;         /* group ID */
    char    *pw_gecos;       /* real name */
    char    *pw_dir;         /* home directory */
    char    *pw_shell;       /* shell program */
};

RETURN VALUE

The putpwent() function returns 0 on success. On failure, it returns -1, and errno is set to indicate the error.

ERRORS

EINVAL
Invalid (NULL) argument given.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

putpwent()

Thread safetyMT-Safe locale

STANDARDS

None.

HISTORY

SVr4.

SEE ALSO

endpwent(3), fgetpwent(3), getpw(3), getpwent(3), getpwnam(3), getpwuid(3), setpwent(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2599 - Linux cli command sigaddset

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigaddset and provides detailed information about the command sigaddset, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigaddset.

NAME 🖥️ sigaddset 🖥️

POSIX signal set operations

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
int sigemptyset(sigset_t *set);
int sigfillset(sigset_t *set);
int sigaddset(sigset_t *set, int signum);
int sigdelset(sigset_t *set, int signum);
int sigismember(const sigset_t *set, int signum);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sigemptyset(), sigfillset(), sigaddset(), sigdelset(), sigismember():

    _POSIX_C_SOURCE

DESCRIPTION

These functions allow the manipulation of POSIX signal sets.

sigemptyset() initializes the signal set given by set to empty, with all signals excluded from the set.

sigfillset() initializes set to full, including all signals.

sigaddset() and sigdelset() add and delete respectively signal signum from set.

sigismember() tests whether signum is a member of set.

Objects of type sigset_t must be initialized by a call to either sigemptyset() or sigfillset() before being passed to the functions sigaddset(), sigdelset(), and sigismember() or the additional glibc functions described below (sigisemptyset(), sigandset(), and sigorset()). The results are undefined if this is not done.

RETURN VALUE

sigemptyset(), sigfillset(), sigaddset(), and sigdelset() return 0 on success and -1 on error.

sigismember() returns 1 if signum is a member of set, 0 if signum is not a member, and -1 on error.

On error, these functions set errno to indicate the error.

ERRORS

EINVAL
signum is not a valid signal.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sigemptyset(), sigfillset(), sigaddset(), sigdelset(), sigismember(), sigisemptyset(), sigorset(), sigandset()

Thread safetyMT-Safe

VERSIONS

GNU

If the _GNU_SOURCE feature test macro is defined, then <signal.h> exposes three other functions for manipulating signal sets:

int sigisemptyset(const sigset_t *set);
int sigorset(sigset_t *dest, const sigset_t *left,
 const sigset_t *right);
int sigandset(sigset_t *dest, const sigset_t *left,
 const sigset_t *right);

sigisemptyset() returns 1 if set contains no signals, and 0 otherwise.

sigorset() places the union of the sets left and right in dest. sigandset() places the intersection of the sets left and right in dest. Both functions return 0 on success, and -1 on failure.

These functions are nonstandard (a few other systems provide similar functions) and their use should be avoided in portable applications.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

When creating a filled signal set, the glibc sigfillset() function does not include the two real-time signals used internally by the NPTL threading implementation. See nptl(7) for details.

SEE ALSO

sigaction(2), sigpending(2), sigprocmask(2), sigsuspend(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2600 - Linux cli command siglongjmp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command siglongjmp and provides detailed information about the command siglongjmp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the siglongjmp.

NAME 🖥️ siglongjmp 🖥️

performing a nonlocal goto

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <setjmp.h>
int setjmp(jmp_buf env);
int sigsetjmp(sigjmp_buf env, int savesigs);
[[noreturn]] void longjmp(jmp_buf env, int val);
[[noreturn]] void siglongjmp(sigjmp_buf env, int val);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

setjmp(): see NOTES.

sigsetjmp():

    _POSIX_C_SOURCE

DESCRIPTION

The functions described on this page are used for performing “nonlocal gotos”: transferring execution from one function to a predetermined location in another function. The setjmp() function dynamically establishes the target to which control will later be transferred, and longjmp() performs the transfer of execution.

The setjmp() function saves various information about the calling environment (typically, the stack pointer, the instruction pointer, possibly the values of other registers and the signal mask) in the buffer env for later use by longjmp(). In this case, setjmp() returns 0.

The longjmp() function uses the information saved in env to transfer control back to the point where setjmp() was called and to restore (“rewind”) the stack to its state at the time of the setjmp() call. In addition, and depending on the implementation (see NOTES), the values of some other registers and the process signal mask may be restored to their state at the time of the setjmp() call.

Following a successful longjmp(), execution continues as if setjmp() had returned for a second time. This “fake” return can be distinguished from a true setjmp() call because the “fake” return returns the value provided in val. If the programmer mistakenly passes the value 0 in val, the “fake” return will instead return 1.

sigsetjmp() and siglongjmp()

sigsetjmp() and siglongjmp() also perform nonlocal gotos, but provide predictable handling of the process signal mask.

If, and only if, the savesigs argument provided to sigsetjmp() is nonzero, the process’s current signal mask is saved in env and will be restored if a siglongjmp() is later performed with this env.

RETURN VALUE

setjmp() and sigsetjmp() return 0 when called directly; on the “fake” return that occurs after longjmp() or siglongjmp(), the nonzero value specified in val is returned.

The longjmp() or siglongjmp() functions do not return.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setjmp(), sigsetjmp()

Thread safetyMT-Safe

longjmp(), siglongjmp()

Thread safetyMT-Safe

STANDARDS

setjmp()
longjmp()
C11, POSIX.1-2008.

sigsetjmp()
siglongjmp()
POSIX.1-2008.

HISTORY

setjmp()
longjmp()
POSIX.1-2001, C89.

sigsetjmp()
siglongjmp()
POSIX.1-2001.

POSIX does not specify whether setjmp() will save the signal mask (to be later restored during longjmp()). In System V it will not. In 4.3BSD it will, and there is a function _setjmp() that will not. The behavior under Linux depends on the glibc version and the setting of feature test macros. Before glibc 2.19, setjmp() follows the System V behavior by default, but the BSD behavior is provided if the _BSD_SOURCE feature test macro is explicitly defined and none of _POSIX_SOURCE, _POSIX_C_SOURCE, _XOPEN_SOURCE, _GNU_SOURCE, or _SVID_SOURCE is defined. Since glibc 2.19, <setjmp.h> exposes only the System V version of setjmp(). Programs that need the BSD semantics should replace calls to setjmp() with calls to sigsetjmp() with a nonzero savesigs argument.

NOTES

setjmp() and longjmp() can be useful for dealing with errors inside deeply nested function calls or to allow a signal handler to pass control to a specific point in the program, rather than returning to the point where the handler interrupted the main program. In the latter case, if you want to portably save and restore signal masks, use sigsetjmp() and siglongjmp(). See also the discussion of program readability below.

CAVEATS

The compiler may optimize variables into registers, and longjmp() may restore the values of other registers in addition to the stack pointer and program counter. Consequently, the values of automatic variables are unspecified after a call to longjmp() if they meet all the following criteria:

  • they are local to the function that made the corresponding setjmp() call;

  • their values are changed between the calls to setjmp() and longjmp(); and

  • they are not declared as volatile.

Analogous remarks apply for siglongjmp().

Nonlocal gotos and program readability

While it can be abused, the traditional C “goto” statement at least has the benefit that lexical cues (the goto statement and the target label) allow the programmer to easily perceive the flow of control. Nonlocal gotos provide no such cues: multiple setjmp() calls might employ the same jmp_buf variable so that the content of the variable may change over the lifetime of the application. Consequently, the programmer may be forced to perform detailed reading of the code to determine the dynamic target of a particular longjmp() call. (To make the programmer’s life easier, each setjmp() call should employ a unique jmp_buf variable.)

Adding further difficulty, the setjmp() and longjmp() calls may not even be in the same source code module.

In summary, nonlocal gotos can make programs harder to understand and maintain, and an alternative should be used if possible.

Undefined Behavior

If the function which called setjmp() returns before longjmp() is called, the behavior is undefined. Some kind of subtle or unsubtle chaos is sure to result.

If, in a multithreaded program, a longjmp() call employs an env buffer that was initialized by a call to setjmp() in a different thread, the behavior is undefined.

POSIX.1-2008 Technical Corrigendum 2 adds longjmp() and siglongjmp() to the list of async-signal-safe functions. However, the standard recommends avoiding the use of these functions from signal handlers and goes on to point out that if these functions are called from a signal handler that interrupted a call to a non-async-signal-safe function (or some equivalent, such as the steps equivalent to exit(3) that occur upon a return from the initial call to main()), the behavior is undefined if the program subsequently makes a call to a non-async-signal-safe function. The only way of avoiding undefined behavior is to ensure one of the following:

  • After long jumping from the signal handler, the program does not call any non-async-signal-safe functions and does not return from the initial call to main().

  • Any signal whose handler performs a long jump must be blocked during every call to a non-async-signal-safe function and no non-async-signal-safe functions are called after returning from the initial call to main().

SEE ALSO

signal(7), signal-safety(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2601 - Linux cli command XtCalloc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtCalloc and provides detailed information about the command XtCalloc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtCalloc.

NAME 🖥️ XtCalloc 🖥️

memory management functions

SYNTAX

#include <X11/Intrinsic.h>

char *XtMalloc(Cardinal size);

char *XtCalloc(Cardinal num, Cardinal size);

char *XtRealloc(char *ptr, Cardinal num);

void XtFree(char *ptr);

type *XtNew(type);

String XtNewString(String string);

Cardinal XtAsprintf(char **new_string, const char *format, …);

ARGUMENTS

num
Specifies the number of bytes or array elements.

ptr
Specifies a pointer to the old storage or to the block of storage that is to be freed.

size
Specifies the size of an array element (in bytes) or the number of bytes desired.

string
Specifies a previously declared string.

type
Specifies a previously declared data type.

new_string
Specifies a pointer to write a newly allocated string to.

format
Specifies a formatting string as defined by sprintf(3c)

DESCRIPTION

The XtMalloc functions returns a pointer to a block of storage of at least the specified size bytes. If there is insufficient memory to allocate the new block, XtMalloc calls XtErrorMsg.

The XtCalloc function allocates space for the specified number of array elements of the specified size and initializes the space to zero. If there is insufficient memory to allocate the new block, XtCalloc calls XtErrorMsg.

The XtRealloc function changes the size of a block of storage (possibly moving it). Then, it copies the old contents (or as much as will fit) into the new block and frees the old block. If there is insufficient memory to allocate the new block, XtRealloc calls XtErrorMsg. If ptr is NULL, XtRealloc allocates the new storage without copying the old contents; that is, it simply calls XtMalloc.

The XtFree function returns storage and allows it to be reused. If ptr is NULL, XtFree returns immediately.

XtNew returns a pointer to the allocated storage. If there is insufficient memory to allocate the new block, XtNew calls XtErrorMsg. XtNew is a convenience macro that calls XtMalloc with the following arguments specified:

((type *) XtMalloc((unsigned) sizeof(type))

XtNewString returns a pointer to a new string which is a duplicate of string. If there is insufficient memory to allocate the new block, or the argument is NULL XtNewString returns NULL. The memory can be freed with XtFree.

The XtAsprintf function allocates space for a string large enough to hold the string specified by the sprintf(3c) format pattern when used with the remaining arguments, and fills it with the formatted results. The address of the allocated string is placed into the pointer passed as ret. The length of the string (not including the terminating null byte) is returned. If there is insufficient memory to allocate the new block, XtAsprintf calls XtErrorMsg.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2602 - Linux cli command XtSetSelectionTimeout

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtSetSelectionTimeout and provides detailed information about the command XtSetSelectionTimeout, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtSetSelectionTimeout.

NAME 🖥️ XtSetSelectionTimeout 🖥️

set and obtain selection timeout values

SYNTAX

#include <X11/Intrinsic.h>

unsigned long XtGetSelectionTimeout(void);

void XtSetSelectionTimeout(unsigned long timeout);

ARGUMENTS

timeout
Specifies the selection timeout in milliseconds.

DESCRIPTION

The XtGetSelectionTimeout function has been superceded by XtAppGetSelectionTimeout.

The XtSetSelectionTimeout function has been superceded by XtAppSetSelectionTimeout.

SEE ALSO

XtAppGetSelectionTimeout(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2603 - Linux cli command XtConvert

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtConvert and provides detailed information about the command XtConvert, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtConvert.

NAME 🖥️ XtConvert 🖥️

invoke resource converters

SYNTAX

#include <X11/Intrinsic.h>

void XtConvert(Widget w, const char *from_type, XrmValuePtr from, const char *to_type, XrmValuePtr to_return);

void XtDirectConvert(XtConverter converter, XrmValuePtr args, Cardinal num_args, XrmValuePtr from, XrmValuePtr to_return);

ARGUMENTS

args
Specifies the argument list that contains the additional arguments needed to perform the conversion (often NULL).

converter
Specifies the conversion procedure that is to be called.

from
Specifies the value to be converted.

from_type
Specifies the source type.

num_args
Specifies the number of additional arguments (often zero).

to_type
Specifies the destination type.

to_return
Returns the converted value.

  1. Specifies the widget to use for additional arguments (if any are needed).

DESCRIPTION

The XtConvert function looks up the type converter registered to convert from_type to to_type, computes any additional arguments needed, and then calls XtDirectConvert. XtConvert has been replaced by XtConvertAndStore.

The XtDirectConvert function looks in the converter cache to see if this conversion procedure has been called with the specified arguments. If so, it returns a descriptor for information stored in the cache; otherwise, it calls the converter and enters the result in the cache.

Before calling the specified converter, XtDirectConvert sets the return value size to zero and the return value address to NULL. To determine if the conversion was successful, the client should check to_return.address for non-NULL. XtDirectConvert has been replaced by XtCallConverter.

SEE ALSO

XtAppAddConverter(3), XtStringConversionWarning(3), XtConvertAndStore(3), XtCallConverter(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2604 - Linux cli command zip_source_read

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_read and provides detailed information about the command zip_source_read, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_read.

libzip (-lzip)

The function

reads up to

bytes of data from

at the current read offset into the buffer

The zip source

has to be opened for reading by calling

first.

Upon successful completion the number of bytes read is returned. Upon reading end-of-file, zero is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2605 - Linux cli command iswgraph

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command iswgraph and provides detailed information about the command iswgraph, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the iswgraph.

NAME 🖥️ iswgraph 🖥️

test for graphic wide character

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wctype.h>
int iswgraph(wint_t wc);

DESCRIPTION

The iswgraph() function is the wide-character equivalent of the isgraph(3) function. It tests whether wc is a wide character belonging to the wide-character class “graph”.

The wide-character class “graph” is a subclass of the wide-character class “print”.

Being a subclass of the wide-character class “print”, the wide-character class “graph” is disjoint from the wide-character class “cntrl”.

The wide-character class “graph” is disjoint from the wide-character class “space” and therefore also disjoint from its subclass “blank”.

The wide-character class “graph” contains all the wide characters from the wide-character class “print” except the space character. It therefore contains the wide-character classes “alnum” and “punct”.

RETURN VALUE

The iswgraph() function returns nonzero if wc is a wide character belonging to the wide-character class “graph”. Otherwise, it returns zero.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

iswgraph()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of iswgraph() depends on the LC_CTYPE category of the current locale.

SEE ALSO

isgraph(3), iswctype(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2606 - Linux cli command Net_Server_PreForkSimplepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Server_PreForkSimplepm and provides detailed information about the command Net_Server_PreForkSimplepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Server_PreForkSimplepm.

NAME 🖥️ Net_Server_PreForkSimplepm 🖥️

Net::Server personality

SYNOPSIS

use base qw(Net::Server::PreForkSimple); sub process_request { #…code… } _ _PACKAGE_ _->run();

DESCRIPTION

Please read the pod on Net::Server first. This module is a personality, or extension, or sub class, of the Net::Server module.

This personality binds to one or more ports and then forks max_servers child processes. The server will make sure that at any given time there are always max_servers available to receive a client request. Each of these children will process up to max_requests client connections. This type is good for a heavily hit site that can keep max_servers processes dedicated to the serving. (Multi port accept defaults to using flock to serialize the children).

At this time, it does not appear that this module will pass tests on Win32 systems. Any ideas or patches for making the tests pass would be welcome.

SAMPLE CODE

Please see the sample listed in Net::Server.

COMMAND LINE ARGUMENTS

In addition to the command line arguments of the Net::Server base class, Net::Server::PreFork contains several other configurable parameters.

Key Value Default max_servers \d+ 50 max_requests \d+ 1000 serialize (flock|semaphore |pipe|none) undef # serialize defaults to flock on multi_port or on Solaris lock_file “filename” File::Temp->new check_for_dead \d+ 30 max_dequeue \d+ undef check_for_dequeue \d+ undef

max_servers
The maximum number of child servers to start and maintain. This does not apply to dequeue processes.

max_requests
The number of client connections to receive before a child terminates.

serialize
Determines whether the server serializes child connections. Options are undef, flock, semaphore, pipe, or none. Default is undef. On multi_port servers or on servers running on Solaris, the default is flock. The flock option uses blocking exclusive flock on the file specified in lock_file (see below). The semaphore option uses IPC::Semaphore (thanks to Bennett Todd) for giving some sample code. The pipe option reads on a pipe to choose the next. the flock option should be the most bulletproof while the pipe option should be the most portable. (Flock is able to relinquish the block if the process dies between accept on the socket and reading of the client connection - semaphore and pipe do not). An option of none will not perform any serialization. If none is passed and there are multiple ports then a the default serialization will be used instead of none.

lock_file
Filename to use in flock serialized accept in order to serialize the accept sequence between the children. This will default to a generated temporary filename. If default value is used the lock_file will be removed when the server closes.

check_for_dead
Seconds to wait before checking to see if a child died without letting the parent know.

max_dequeue
The maximum number of dequeue processes to start. If a value of zero or undef is given, no dequeue processes will be started. The number of running dequeue processes will be checked by the check_for_dead variable.

check_for_dequeue
Seconds to wait before forking off a dequeue process. The run_dequeue hook must be defined when using this setting. It is intended to use the dequeue process to take care of items such as mail queues. If a value of undef is given, no dequeue processes will be started.

CONFIGURATION FILE

Net::Server::PreFork allows for the use of a configuration file to read in server parameters. The format of this conf file is simple key value pairs. Comments and white space are ignored.

#————– file test.conf ————– ### server information max_servers 80 max_requests 1000 ### user and group to become user somebody group everybody ### logging ? log_file /var/log/server.log log_level 3 pid_file /tmp/server.pid ### access control allow .+(net|com) allow domain\com deny a.+ ### background the process? background 1 ### ports to bind host 127.0.0.1 port localhost:20204 port 20205 ### reverse lookups ? # reverse_lookups on #————– file test.conf ————–

PROCESS FLOW

Process flow follows Net::Server until the loop phase. At this point max_servers are forked and wait for connections. When a child accepts a connection, finishes processing a client, or exits, it relays that information to the parent, which keeps track and makes sure there are always max_servers running.

HOOKS

The PreForkSimple server has the following hooks in addition to the hooks provided by the Net::Server base class. See Net::Server

“$self->run_n_children_hook()”
This hook occurs at the top of run_n_children which is called each time the server goes to start more child processes. This gives the parent to do a little of its own accounting (as desired). Idea for this hook came from James FitzGibbon.

“$self->child_init_hook()”
This hook takes place immediately after the child process forks from the parent and before the child begins accepting connections. It is intended for any additional chrooting or other security measures. It is suggested that all perl modules be used by this point, so that the most shared memory possible is used.

“$self->child_finish_hook()”
This hook takes place immediately before the child tells the parent that it is exiting. It is intended for saving out logged information or other general cleanup.

“$self->run_dequeue()”
This hook only gets called in conjunction with the check_for_dequeue setting.

“$self->idle_loop_hook()”
This hook is called in every pass through the main process wait loop.

HOT DEPLOY

Since version 2.000, the PreForkSimple server has accepted the TTIN and TTOU signals. When a TTIN is received, the max_servers is increased by 1. If a TTOU signal is received the max_servers is decreased by 1. This allows for adjusting the number of handling processes without having to restart the server.

BUGS

Tests don’t seem to work on Win32. Any ideas or patches would be welcome.

TO DO

See Net::Server

AUTHOR

Paul T. Seamons [email protected]

THANKS

See Net::Server

SEE ALSO

Please see also Net::Server::Fork, Net::Server::INET, Net::Server::PreFork, Net::Server::MultiType, Net::Server::Single Net::Server::SIG Net::Server::Daemonize Net::Server::Proto

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2607 - Linux cli command Tk_Tablepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Tablepm and provides detailed information about the command Tk_Tablepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Tablepm.

NAME 🖥️ Tk_Tablepm 🖥️

Scrollable 2 dimensional table of Tk widgets

SYNOPSIS

use Tk::Table; $table = $parent->Table(-rows => number, -columns => number, -scrollbars => anchor, -fixedrows => number, -fixedcolumns => number, -takefocus => boolean); $widget = $table->Button(…); $old = $table->put($row,$col,$widget); $old = $table->put($row,$col,“Text”); # simple Label $widget = $table->get($row,$col); $cols = $table->totalColumns; $rows = $table->totalRows; $table->see($widget); $table->see($row,$col); ($row,$col) = $table->Posn($widget);

DESCRIPTION

Tk::Table is an all-perl widget/geometry manager which allows a two dimensional table of arbitrary perl/Tk widgets to be displayed.

Entries in the Table are simply ordinary perl/Tk widgets. They should be created with the Table as their parent. Widgets are positioned in the table using:

$table->put($row,$col,$widget)

If $widget is not a reference it is treated as a string, and a Lable widget is created with the string as its text.

All the widgets in each column are set to the same width - the requested width of the widest widget in the column. Likewise, all the widgets in each row are set to the same height - the requested height of the tallest widget in the column.

A number of rows and/or columns can be marked as ‘fixed’ - and so can serve as ‘headings’ for the remainder the rows which are scrollable.

The requested size of the table as a whole is such that the number of rows specified by -rows (default 10), and number of columns specified by -columns (default 10) can be displayed.

If the Table is told it can take the keyboard focus then cursor and scroll keys scroll the displayed widgets.

-scrollbars. By default, scrollbars will be added nw. To disable scrollbars, set -scrollbars to an empty string:

$table = $parent->Table(-scrollbars => , …);

The table can be emptied using

$table->clear

the widgets which were in the table are destroyed.

The Tk::Table widget is derived from a Tk::Frame, so inherits all its configure options.

The default focus traversal is giving the focus only to the table widget as a whole. To enable focus traversal into table cells (e.g. if there are embedded entry widgets), then the option -takefocus has to be set to 0.

BUGS / Snags / Possible enhancements

  • Very large Tables consume a lot of X windows.

  • No equivalent of pack’s -anchor/-pad etc. options

SEE ALSO

Tk::grid, Tk::HList, Tk::TableMatrix, Tk::MListbox, Tk::Columns

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2608 - Linux cli command XtAppGetSelectionTimeout

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppGetSelectionTimeout and provides detailed information about the command XtAppGetSelectionTimeout, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppGetSelectionTimeout.

NAME 🖥️ XtAppGetSelectionTimeout 🖥️

set and obtain selection timeout values

SYNTAX

#include <X11/Intrinsic.h>

unsigned long XtAppGetSelectionTimeout(XtAppContext app_context);

void XtAppSetSelectionTimeout(XtAppContext app_context, unsigned long timeout);

ARGUMENTS

app_context
Specifies the application context.

timeout
Specifies the selection timeout in milliseconds.

DESCRIPTION

The XtAppGetSelectionTimeout function returns the current selection timeout value, in milliseconds. The selection timeout is the time within which the two communicating applications must respond to one another. The initial timeout value is set by the selectionTimeout application resource, or, if selectionTimeout is not specified, it defaults to five seconds.

The XtAppSetSelectionTimeout function sets the Intrinsics’s selection timeout mechanism. Note that most applications should not set the selection timeout.

SEE ALSO

XtOwnSelection(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2609 - Linux cli command URI_URLpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command URI_URLpm and provides detailed information about the command URI_URLpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the URI_URLpm.

NAME 🖥️ URI_URLpm 🖥️

Uniform Resource Locators

SYNOPSIS

$u1 = URI::URL->new($str, $base); $u2 = $u1->abs;

DESCRIPTION

This module is provided for backwards compatibility with modules that depend on the interface provided by the URI::URL class that used to be distributed with the libwww-perl library.

The following differences exist compared to the URI class interface:

  • The URI::URL module exports the url() function as an alternate constructor interface.

  • The constructor takes an optional $base argument. The URI::URL class is a subclass of URI::WithBase.

  • The URI::URL->newlocal class method is the same as URI::file->new_abs.

  • URI::URL::strict (1)

  • $url->print_on method

  • $url->crack method

  • $url->full_path: same as ($uri->abs_path || “/”)

  • $url->netloc: same as $uri->authority

  • $url->epath, $url->equery: same as $uri->path, $uri->query

  • $url->path and $url->query pass unescaped strings.

  • $url->path_components: same as $uri->path_segments (if you don’t consider path segment parameters)

  • $url->params and $url->eparams methods

  • $url->base method. See URI::WithBase.

  • $url->abs and $url->rel have an optional $base argument. See URI::WithBase.

  • $url->frag: same as $uri->fragment

  • $url->keywords: same as $uri->query_keywords

  • $url->localpath and friends map to $uri->file.

  • $url->address and $url->encoded822addr: same as $uri->to for mailto URI

  • $url->groupart method for news URI

  • $url->article: same as $uri->message

SEE ALSO

URI, URI::WithBase

COPYRIGHT

Copyright 1998-2000 Gisle Aas.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2610 - Linux cli command getaliasent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getaliasent and provides detailed information about the command getaliasent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getaliasent.

NAME 🖥️ getaliasent 🖥️

read an alias entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <aliases.h>
void setaliasent(void);
void endaliasent(void);
struct aliasent *getaliasent(void);
int getaliasent_r(struct aliasent *restrict result,
 char buffer[restrict .buflen], size_t buflen,
 struct aliasent **restrict res);
struct aliasent *getaliasbyname(const char *name);
int getaliasbyname_r(const char *restrict name,
 struct aliasent *restrict result,
 char buffer[restrict .buflen], size_t buflen,
 struct aliasent **restrict res);

DESCRIPTION

One of the databases available with the Name Service Switch (NSS) is the aliases database, that contains mail aliases. (To find out which databases are supported, try getent –help.) Six functions are provided to access the aliases database.

The getaliasent() function returns a pointer to a structure containing the group information from the aliases database. The first time it is called it returns the first entry; thereafter, it returns successive entries.

The setaliasent() function rewinds the file pointer to the beginning of the aliases database.

The endaliasent() function closes the aliases database.

getaliasent_r() is the reentrant version of the previous function. The requested structure is stored via the first argument but the programmer needs to fill the other arguments also. Not providing enough space causes the function to fail.

The function getaliasbyname() takes the name argument and searches the aliases database. The entry is returned as a pointer to a struct aliasent.

getaliasbyname_r() is the reentrant version of the previous function. The requested structure is stored via the second argument but the programmer needs to fill the other arguments also. Not providing enough space causes the function to fail.

The struct aliasent is defined in <aliases.h>:

struct aliasent {
    char    *alias_name;             /* alias name */
    size_t   alias_members_len;
    char   **alias_members;          /* alias name list */
    int      alias_local;
};

RETURN VALUE

The functions getaliasent_r() and getaliasbyname_r() return a nonzero value on error.

FILES

The default alias database is the file /etc/aliases. This can be changed in the /etc/nsswitch.conf file.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setaliasent(), endaliasent(), getaliasent_r(), getaliasbyname_r()

Thread safetyMT-Safe locale

getaliasent(), getaliasbyname()

Thread safetyMT-Unsafe

STANDARDS

GNU.

HISTORY

The NeXT system has similar routines:

#include <aliasdb.h>
void alias_setent(void);
void alias_endent(void);
alias_ent *alias_getent(void);
alias_ent *alias_getbyname(char *name);

EXAMPLES

The following example compiles with gcc example.c -o example. It will dump all names in the alias database.

#include <aliases.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    struct aliasent *al;
    setaliasent();
    for (;;) {
        al = getaliasent();
        if (al == NULL)
            break;
        printf("Name: %s

“, al->alias_name); } if (errno) { perror(“reading alias”); exit(EXIT_FAILURE); } endaliasent(); exit(EXIT_SUCCESS); }

SEE ALSO

getgrent(3), getpwent(3), getspent(3), aliases(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2611 - Linux cli command Moose_Cookbook_Basics_DateTime_ExtendingNonMooseParentpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Basics_DateTime_ExtendingNonMooseParentpm and provides detailed information about the command Moose_Cookbook_Basics_DateTime_ExtendingNonMooseParentpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Basics_DateTime_ExtendingNonMooseParentpm.

NAME 🖥️ Moose_Cookbook_Basics_DateTime_ExtendingNonMooseParentpm 🖥️

Extending a non-Moose parent class

VERSION

version 2.2207

SYNOPSIS

package My::DateTime; use Moose; use MooseX::NonMoose; use DateTime::Calendar::Mayan; extends qw( DateTime ); has mayan_date => ( is => ro, isa => DateTime::Calendar::Mayan, init_arg => undef, lazy => 1, builder => _build_mayan_date, clearer => _clear_mayan_date, predicate => has_mayan_date, ); after set => sub { $_[0]->_clear_mayan_date; }; sub _build_mayan_date { DateTime::Calendar::Mayan->from_object( object => $_[0] ); }

DESCRIPTION

This recipe demonstrates how to use Moose to subclass a parent which is not Moose based. This recipe only works if the parent class uses a blessed hash reference for object instances. If your parent is doing something funkier, you should check out MooseX::NonMoose::InsideOut and MooseX::InsideOut.

The meat of this recipe is contained in MooseX::NonMoose, which does all the grunt work for you.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2612 - Linux cli command perror

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command perror and provides detailed information about the command perror, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the perror.

NAME 🖥️ perror 🖥️

print a system error message

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
void perror(const char *s);
#include <errno.h>
int errno; /* Not really declared this way; see errno(3) */
[[deprecated]] const char *const sys_errlist[];
[[deprecated]] int sys_nerr;

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sys_errlist, sys_nerr:

    From glibc 2.19 to glibc 2.31:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The perror() function produces a message on standard error describing the last error encountered during a call to a system or library function.

First (if s is not NULL and *s is not a null byte (‘�’)), the argument string s is printed, followed by a colon and a blank. Then an error message corresponding to the current value of errno and a new-line.

To be of most use, the argument string should include the name of the function that incurred the error.

The global error list sys_errlist[], which can be indexed by errno, can be used to obtain the error message without the newline. The largest message number provided in the table is sys_nerr-1. Be careful when directly accessing this list, because new error values may not have been added to sys_errlist[]. The use of sys_errlist[] is nowadays deprecated; use strerror(3) instead.

When a system call fails, it usually returns -1 and sets the variable errno to a value describing what went wrong. (These values can be found in <errno.h>.) Many library functions do likewise. The function perror() serves to translate this error code into human-readable form. Note that errno is undefined after a successful system call or library function call: this call may well change this variable, even though it succeeds, for example because it internally used some other library function that failed. Thus, if a failing call is not immediately followed by a call to perror(), the value of errno should be saved.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

perror()

Thread safetyMT-Safe race:stderr

STANDARDS

errno
perror()
C11, POSIX.1-2008.

sys_nerr
sys_errlist
BSD.

HISTORY

errno
perror()
POSIX.1-2001, C89, 4.3BSD.

sys_nerr
sys_errlist
Removed in glibc 2.32.

SEE ALSO

err(3), errno(3), error(3), strerror(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2613 - Linux cli command ts_read_mt

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ts_read_mt and provides detailed information about the command ts_read_mt, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ts_read_mt.

NAME 🖥️ ts_read_mt 🖥️

read tslib touch samples

SYNOPSIS

#include <tslib.h>

int ts_read(struct tsdev *dev, struct ts_sample *samp, int nr);

int ts_read_raw(struct tsdev *dev, struct ts_sample *samp, int nr);

int ts_read_mt(struct tsdev *dev, struct ts_sample_mt **samp, int slots, int nr);

int ts_read_raw_mt(struct tsdev *dev, struct ts_sample_mt **samp, int slots, int nr);

DESCRIPTION

ts_read() reads nr input samples with tslib’s filters applied. struct ts_sample is define as follows:

struct ts_sample {
        int             x;
        int             y;
        unsigned int    pressure;
        struct timeval  tv;
};

ts_read_mt() reads nr * slots input samples with tslib’s filters applied. struct ts_sample_mt is defined as follows:

struct ts_sample_mt {
        /* most recent ABS_MT_* event codes.
         * see linux/input.h for descriptions */
        int             x;
        int             y;
        unsigned int    pressure;
        int             slot;
        int             tracking_id;

        int             tool_type;
        int             tool_x;
        int             tool_y;
        unsigned int    touch_major;
        unsigned int    width_major;
        unsigned int    touch_minor;
        unsigned int    width_minor;
        int             orientation;
        int             distance;
        int             blob_id;

        struct timeval  tv;

        /* BTN_TOUCH state */
        short           pen_down;

        /* the TSLIB_MT_VALID bit is set in valid if this sample
         * contains new data;
	 * valid is set to 0 otherwise */
        short           valid;
};

The user has to provide the amount of memory described in nr and slots to hold them.

ts_read_raw() and ts_read_raw_mt() do the same thing without tslib’s filters applied.

RETURN VALUE

The number of actually read samples is returned. Especially when opened in non-blocking mode, see ts_setup() , that can be less than requested in the call. On failure, a negative error number is returned.

EXAMPLE

The following program continuously reads tslib multitouch input samples and prints slot and position values to stdout as the touch screen is touched.

#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>

#include <tslib.h>

#define READ_SAMPLES 1
#define MAX_SLOTS 5

int main(int argc, char **argv)
{
        struct tsdev *ts;
        struct ts_sample_mt **samp_mt = NULL;
        int i, j;
        int ret;

        ts = ts_setup(NULL, 0);
        if (!ts)
                return -1;

        samp_mt = malloc(READ_SAMPLES * sizeof(struct ts_sample_mt **));
        if (!samp_mt)
                return -1;

        for (i = 0; i < READ_SAMPLES; i++) {
                samp_mt[i] = calloc(MAX_SLOTS, sizeof(struct ts_sample_mt));
                if (!samp_mt[i])
                        return -1;
        }

        while(1) {
                ret = ts_read_mt(ts, samp_mt, MAX_SLOTS, READ_SAMPLES);
                for (i = 0; i < ret; i++) {
                        printf("sample nr %d, i);
                        for (j = 0; i < MAX_SLOTS; j++) {
                                if (!(samp_mt[i][j].valid & TSLIB_MT_VALID))
                                        continue;

                                printf("slot %d: X:%d Y: %d,
                                       samp_mt[i][j].slot,
                                       samp_mt[i][j].x,
                                       samp_mt[i][j].y);
                        }
                }
        }
}

SEE ALSO

ts_setup(3), ts_config(3), ts_open(3), ts_close(3), ts.conf(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2614 - Linux cli command xdr_bytes

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_bytes and provides detailed information about the command xdr_bytes, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_bytes.

NAME 🖥️ xdr_bytes 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2615 - Linux cli command IO_Uncompress_Brotlipm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_Uncompress_Brotlipm and provides detailed information about the command IO_Uncompress_Brotlipm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_Uncompress_Brotlipm.

NAME 🖥️ IO_Uncompress_Brotlipm 🖥️

Read Brotli buffers/streams

SYNOPSIS

use IO::Uncompress::Brotli; # uncompress a buffer (yielding at most 10MB) my $decoded = unbro $encoded, 10_000_000; # uncompress a stream my $bro = IO::Uncompress::Brotli->create; while(have_input()) { my $block = get_input_block(); my $decoded_block = $bro->decompress($block); handle_output_block($decoded_block); }

DESCRIPTION

IO::Uncompress::Brotli is a module that decompresses Brotli buffers and streams. Despite its name, it is not a subclass of IO::Uncompress::Base and does not implement its interface. This will be rectified in a future release.

One-shot interface

If you have the whole buffer in a Perl scalar use the unbro function.

unbro($input, $maximum_decoded_size)
Takes a whole compressed buffer as input and returns the decompressed data. It allocates a buffer of size $maximum_decoded_size to store the decompressed data, if this is not sufficient (or there is another error) this function will croak. Exported by default.

Streaming interface

If you want to process the data in blocks use the object oriented interface. The available methods are:

IO::Uncompress::Brotli->create
Returns a IO::Uncompress::Brotli instance. Please note that a single instance cannot be used to decompress multiple streams.

$bro->decompress($block)
Takes the a block of compressed data and returns a block of uncompressed data. Dies on error.

SEE ALSO

Brotli Compressed Data Format Internet-Draft: <https://www.ietf.org/id/draft-alakuijala-brotli-08.txt>

Brotli source code: <https://github.com/google/brotli/>

AUTHOR

Marius Gavrilescu, <[email protected]>

The encoder bindings, modernisation of the decoder bindings and a clean up of the overall project were contributed by:

Quim Rovira, <[email protected]>

Ævar Arnfjörð Bjarmason, <[email protected]>

Marcell Szathmári

Mattia Barbon, <[email protected]>

COPYRIGHT AND LICENSE

Copyright (C) 2015-2018 by Marius Gavrilescu

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

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2616 - Linux cli command pthread_attr_init

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_attr_init and provides detailed information about the command pthread_attr_init, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_attr_init.

NAME 🖥️ pthread_attr_init 🖥️

initialize and destroy thread attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_attr_init(pthread_attr_t *attr);
int pthread_attr_destroy(pthread_attr_t *attr);

DESCRIPTION

The pthread_attr_init() function initializes the thread attributes object pointed to by attr with default attribute values. After this call, individual attributes of the object can be set using various related functions (listed under SEE ALSO), and then the object can be used in one or more pthread_create(3) calls that create threads.

Calling pthread_attr_init() on a thread attributes object that has already been initialized results in undefined behavior.

When a thread attributes object is no longer required, it should be destroyed using the pthread_attr_destroy() function. Destroying a thread attributes object has no effect on threads that were created using that object.

Once a thread attributes object has been destroyed, it can be reinitialized using pthread_attr_init(). Any other use of a destroyed thread attributes object has undefined results.

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

POSIX.1 documents an ENOMEM error for pthread_attr_init(); on Linux these functions always succeed (but portable and future-proof applications should nevertheless handle a possible error return).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_attr_init(), pthread_attr_destroy()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

The pthread_attr_t type should be treated as opaque: any access to the object other than via pthreads functions is nonportable and produces undefined results.

EXAMPLES

The program below optionally makes use of pthread_attr_init() and various related functions to initialize a thread attributes object that is used to create a single thread. Once created, the thread uses the pthread_getattr_np(3) function (a nonstandard GNU extension) to retrieve the thread’s attributes, and then displays those attributes.

If the program is run with no command-line argument, then it passes NULL as the attr argument of pthread_create(3), so that the thread is created with default attributes. Running the program on Linux/x86-32 with the NPTL threading implementation, we see the following:

$ ulimit -s # No stack limit ==> default stack size is 2 MB
unlimited
$ ./a.out
Thread attributes:
        Detach state        = PTHREAD_CREATE_JOINABLE
        Scope               = PTHREAD_SCOPE_SYSTEM
        Inherit scheduler   = PTHREAD_INHERIT_SCHED
        Scheduling policy   = SCHED_OTHER
        Scheduling priority = 0
        Guard size          = 4096 bytes
        Stack address       = 0x40196000
        Stack size          = 0x201000 bytes

When we supply a stack size as a command-line argument, the program initializes a thread attributes object, sets various attributes in that object, and passes a pointer to the object in the call to pthread_create(3). Running the program on Linux/x86-32 with the NPTL threading implementation, we see the following:

$ ./a.out 0x3000000
posix_memalign() allocated at 0x40197000
Thread attributes:
        Detach state        = PTHREAD_CREATE_DETACHED
        Scope               = PTHREAD_SCOPE_SYSTEM
        Inherit scheduler   = PTHREAD_EXPLICIT_SCHED
        Scheduling policy   = SCHED_OTHER
        Scheduling priority = 0
        Guard size          = 0 bytes
        Stack address       = 0x40197000
        Stack size          = 0x3000000 bytes

Program source

#define _GNU_SOURCE     /* To get pthread_getattr_np() declaration */
#include <err.h>
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
static void
display_pthread_attr(pthread_attr_t *attr, char *prefix)
{
    int s, i;
    size_t v;
    void *stkaddr;
    struct sched_param sp;
    s = pthread_attr_getdetachstate(attr, &i);
    if (s != 0)
        errc(EXIT_FAILURE, s, "pthread_attr_getdetachstate");
    printf("%sDetach state        = %s

“, prefix, (i == PTHREAD_CREATE_DETACHED) ? “PTHREAD_CREATE_DETACHED” : (i == PTHREAD_CREATE_JOINABLE) ? “PTHREAD_CREATE_JOINABLE” : “???”); s = pthread_attr_getscope(attr, &i); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_getscope”); printf("%sScope = %s “, prefix, (i == PTHREAD_SCOPE_SYSTEM) ? “PTHREAD_SCOPE_SYSTEM” : (i == PTHREAD_SCOPE_PROCESS) ? “PTHREAD_SCOPE_PROCESS” : “???”); s = pthread_attr_getinheritsched(attr, &i); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_getinheritsched”); printf("%sInherit scheduler = %s “, prefix, (i == PTHREAD_INHERIT_SCHED) ? “PTHREAD_INHERIT_SCHED” : (i == PTHREAD_EXPLICIT_SCHED) ? “PTHREAD_EXPLICIT_SCHED” : “???”); s = pthread_attr_getschedpolicy(attr, &i); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_getschedpolicy”); printf("%sScheduling policy = %s “, prefix, (i == SCHED_OTHER) ? “SCHED_OTHER” : (i == SCHED_FIFO) ? “SCHED_FIFO” : (i == SCHED_RR) ? “SCHED_RR” : “???”); s = pthread_attr_getschedparam(attr, &sp); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_getschedparam”); printf("%sScheduling priority = %d “, prefix, sp.sched_priority); s = pthread_attr_getguardsize(attr, &v); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_getguardsize”); printf("%sGuard size = %zu bytes “, prefix, v); s = pthread_attr_getstack(attr, &stkaddr, &v); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_getstack”); printf("%sStack address = %p “, prefix, stkaddr); printf("%sStack size = %#zx bytes “, prefix, v); } static void * thread_start(void arg) { int s; pthread_attr_t gattr; / pthread_getattr_np() is a non-standard GNU extension that retrieves the attributes of the thread specified in its first argument. / s = pthread_getattr_np(pthread_self(), &gattr); if (s != 0) errc(EXIT_FAILURE, s, “pthread_getattr_np”); printf(“Thread attributes: “); display_pthread_attr(&gattr, " “); exit(EXIT_SUCCESS); / Terminate all threads */ } int main(int argc, char *argv[]) { pthread_t thr; pthread_attr_t attr; pthread_attr_t attrp; / NULL or &attr / int s; attrp = NULL; / If a command-line argument was supplied, use it to set the stack-size attribute and set a few other thread attributes, and set attrp pointing to thread attributes object. */ if (argc > 1) { size_t stack_size; void sp; attrp = &attr; s = pthread_attr_init(&attr); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_init”); s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_setdetachstate”); s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_setinheritsched”); stack_size = strtoul(argv[1], NULL, 0); s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size); if (s != 0) errc(EXIT_FAILURE, s, “posix_memalign”); printf(“posix_memalign() allocated at %p “, sp); s = pthread_attr_setstack(&attr, sp, stack_size); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_setstack”); } s = pthread_create(&thr, attrp, &thread_start, NULL); if (s != 0) errc(EXIT_FAILURE, s, “pthread_create”); if (attrp != NULL) { s = pthread_attr_destroy(attrp); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_destroy”); } pause(); / Terminates when other thread calls exit() */ }

SEE ALSO

pthread_attr_setaffinity_np(3), pthread_attr_setdetachstate(3), pthread_attr_setguardsize(3), pthread_attr_setinheritsched(3), pthread_attr_setschedparam(3), pthread_attr_setschedpolicy(3), pthread_attr_setscope(3), pthread_attr_setsigmask_np(3), pthread_attr_setstack(3), pthread_attr_setstackaddr(3), pthread_attr_setstacksize(3), pthread_create(3), pthread_getattr_np(3), pthread_setattr_default_np(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2617 - Linux cli command ntp_adjtime

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ntp_adjtime and provides detailed information about the command ntp_adjtime, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ntp_adjtime.

NAME 🖥️ ntp_adjtime 🖥️

tune kernel clock

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/timex.h>
int adjtimex(struct timex *buf);
int clock_adjtime(clockid_t clk_id, struct timex *buf);
int ntp_adjtime(struct timex *buf);

DESCRIPTION

Linux uses David L. Mills’ clock adjustment algorithm (see RFC 5905). The system call adjtimex() reads and optionally sets adjustment parameters for this algorithm. It takes a pointer to a timex structure, updates kernel parameters from (selected) field values, and returns the same structure updated with the current kernel values. This structure is declared as follows:

struct timex {
    int  modes;      /* Mode selector */
    long offset;     /* Time offset; nanoseconds, if STA_NANO
                        status flag is set, otherwise
                        microseconds */
    long freq;       /* Frequency offset; see NOTES for units */
    long maxerror;   /* Maximum error (microseconds) */
    long esterror;   /* Estimated error (microseconds) */
    int  status;     /* Clock command/status */
    long constant;   /* PLL (phase-locked loop) time constant */
    long precision;  /* Clock precision
                        (microseconds, read-only) */
    long tolerance;  /* Clock frequency tolerance (read-only);
                        see NOTES for units */
    struct timeval time;
                     /* Current time (read-only, except for
                        ADJ_SETOFFSET); upon return, time.tv_usec
                        contains nanoseconds, if STA_NANO status
                        flag is set, otherwise microseconds */
    long tick;       /* Microseconds between clock ticks */
    long ppsfreq;    /* PPS (pulse per second) frequency
                        (read-only); see NOTES for units */
    long jitter;     /* PPS jitter (read-only); nanoseconds, if
                        STA_NANO status flag is set, otherwise
                        microseconds */
    int  shift;      /* PPS interval duration
                        (seconds, read-only) */
    long stabil;     /* PPS stability (read-only);
                        see NOTES for units */
    long jitcnt;     /* PPS count of jitter limit exceeded
                        events (read-only) */
    long calcnt;     /* PPS count of calibration intervals
                        (read-only) */
    long errcnt;     /* PPS count of calibration errors
                        (read-only) */
    long stbcnt;     /* PPS count of stability limit exceeded
                        events (read-only) */
    int tai;         /* TAI offset, as set by previous ADJ_TAI
                        operation (seconds, read-only,
                        since Linux 2.6.26) */
    /* Further padding bytes to allow for future expansion */
};

The modes field determines which parameters, if any, to set. (As described later in this page, the constants used for ntp_adjtime() are equivalent but differently named.) It is a bit mask containing a bitwise OR combination of zero or more of the following bits:

ADJ_OFFSET
Set time offset from buf.offset. Since Linux 2.6.26, the supplied value is clamped to the range (-0.5s, +0.5s). In older kernels, an EINVAL error occurs if the supplied value is out of range.

ADJ_FREQUENCY
Set frequency offset from buf.freq. Since Linux 2.6.26, the supplied value is clamped to the range (-32768000, +32768000). In older kernels, an EINVAL error occurs if the supplied value is out of range.

ADJ_MAXERROR
Set maximum time error from buf.maxerror.

ADJ_ESTERROR
Set estimated time error from buf.esterror.

ADJ_STATUS
Set clock status bits from buf.status. A description of these bits is provided below.

ADJ_TIMECONST
Set PLL time constant from buf.constant. If the STA_NANO status flag (see below) is clear, the kernel adds 4 to this value.

ADJ_SETOFFSET (since Linux 2.6.39)
Add buf.time to the current time. If buf.status includes the ADJ_NANO flag, then buf.time.tv_usec is interpreted as a nanosecond value; otherwise it is interpreted as microseconds.

The value of buf.time is the sum of its two fields, but the field buf.time.tv_usec must always be nonnegative. The following example shows how to normalize a timeval with nanosecond resolution.

while (buf.time.tv_usec < 0) {
    buf.time.tv_sec  -= 1;
    buf.time.tv_usec += 1000000000;
}

ADJ_MICRO (since Linux 2.6.26)
Select microsecond resolution.

ADJ_NANO (since Linux 2.6.26)
Select nanosecond resolution. Only one of ADJ_MICRO and ADJ_NANO should be specified.

ADJ_TAI (since Linux 2.6.26)
Set TAI (Atomic International Time) offset from buf.constant.

ADJ_TAI should not be used in conjunction with ADJ_TIMECONST, since the latter mode also employs the buf.constant field.

For a complete explanation of TAI and the difference between TAI and UTC, see

BIPM

ADJ_TICK
Set tick value from buf.tick.

Alternatively, modes can be specified as either of the following (multibit mask) values, in which case other bits should not be specified in modes:

ADJ_OFFSET_SINGLESHOT
Old-fashioned adjtime(3): (gradually) adjust time by value specified in buf.offset, which specifies an adjustment in microseconds.

ADJ_OFFSET_SS_READ (functional since Linux 2.6.28)
Return (in buf.offset) the remaining amount of time to be adjusted after an earlier ADJ_OFFSET_SINGLESHOT operation. This feature was added in Linux 2.6.24, but did not work correctly until Linux 2.6.28.

Ordinary users are restricted to a value of either 0 or ADJ_OFFSET_SS_READ for modes. Only the superuser may set any parameters.

The buf.status field is a bit mask that is used to set and/or retrieve status bits associated with the NTP implementation. Some bits in the mask are both readable and settable, while others are read-only.

STA_PLL (read-write)
Enable phase-locked loop (PLL) updates via ADJ_OFFSET.

STA_PPSFREQ (read-write)
Enable PPS (pulse-per-second) frequency discipline.

STA_PPSTIME (read-write)
Enable PPS time discipline.

STA_FLL (read-write)
Select frequency-locked loop (FLL) mode.

STA_INS (read-write)
Insert a leap second after the last second of the UTC day, thus extending the last minute of the day by one second. Leap-second insertion will occur each day, so long as this flag remains set.

STA_DEL (read-write)
Delete a leap second at the last second of the UTC day. Leap second deletion will occur each day, so long as this flag remains set.

STA_UNSYNC (read-write)
Clock unsynchronized.

STA_FREQHOLD (read-write)
Hold frequency. Normally adjustments made via ADJ_OFFSET result in dampened frequency adjustments also being made. So a single call corrects the current offset, but as offsets in the same direction are made repeatedly, the small frequency adjustments will accumulate to fix the long-term skew.

This flag prevents the small frequency adjustment from being made when correcting for an ADJ_OFFSET value.

STA_PPSSIGNAL (read-only)
A valid PPS (pulse-per-second) signal is present.

STA_PPSJITTER (read-only)
PPS signal jitter exceeded.

STA_PPSWANDER (read-only)
PPS signal wander exceeded.

STA_PPSERROR (read-only)
PPS signal calibration error.

STA_CLOCKERR (read-only)
Clock hardware fault.

STA_NANO (read-only; since Linux 2.6.26)
Resolution (0 = microsecond, 1 = nanoseconds). Set via ADJ_NANO, cleared via ADJ_MICRO.

STA_MODE (since Linux 2.6.26)
Mode (0 = Phase Locked Loop, 1 = Frequency Locked Loop).

STA_CLK (read-only; since Linux 2.6.26)
Clock source (0 = A, 1 = B); currently unused.

Attempts to set read-only status bits are silently ignored.

clock_adjtime ()

The clock_adjtime() system call (added in Linux 2.6.39) behaves like adjtimex() but takes an additional clk_id argument to specify the particular clock on which to act.

ntp_adjtime ()

The ntp_adjtime() library function (described in the NTP “Kernel Application Program API”, KAPI) is a more portable interface for performing the same task as adjtimex(). Other than the following points, it is identical to adjtimex():

  • The constants used in modes are prefixed with “MOD_” rather than “ADJ_”, and have the same suffixes (thus, MOD_OFFSET, MOD_FREQUENCY, and so on), other than the exceptions noted in the following points.

  • MOD_CLKA is the synonym for ADJ_OFFSET_SINGLESHOT.

  • MOD_CLKB is the synonym for ADJ_TICK.

  • The is no synonym for ADJ_OFFSET_SS_READ, which is not described in the KAPI.

RETURN VALUE

On success, adjtimex() and ntp_adjtime() return the clock state; that is, one of the following values:

TIME_OK
Clock synchronized, no leap second adjustment pending.

TIME_INS
Indicates that a leap second will be added at the end of the UTC day.

TIME_DEL
Indicates that a leap second will be deleted at the end of the UTC day.

TIME_OOP
Insertion of a leap second is in progress.

TIME_WAIT
A leap-second insertion or deletion has been completed. This value will be returned until the next ADJ_STATUS operation clears the STA_INS and STA_DEL flags.

TIME_ERROR
The system clock is not synchronized to a reliable server. This value is returned when any of the following holds true:

  • Either STA_UNSYNC or STA_CLOCKERR is set.

  • STA_PPSSIGNAL is clear and either STA_PPSFREQ or STA_PPSTIME is set.

  • STA_PPSTIME and STA_PPSJITTER are both set.

  • STA_PPSFREQ is set and either STA_PPSWANDER or STA_PPSJITTER is set.

The symbolic name TIME_BAD is a synonym for TIME_ERROR, provided for backward compatibility.

Note that starting with Linux 3.4, the call operates asynchronously and the return value usually will not reflect a state change caused by the call itself.

On failure, these calls return -1 and set errno to indicate the error.

ERRORS

EFAULT
buf does not point to writable memory.

EINVAL (before Linux 2.6.26)
An attempt was made to set buf.freq to a value outside the range (-33554432, +33554432).

EINVAL (before Linux 2.6.26)
An attempt was made to set buf.offset to a value outside the permitted range. Before Linux 2.0, the permitted range was (-131072, +131072). From Linux 2.0 onwards, the permitted range was (-512000, +512000).

EINVAL
An attempt was made to set buf.status to a value other than those listed above.

EINVAL
The clk_id given to clock_adjtime() is invalid for one of two reasons. Either the System-V style hard-coded positive clock ID value is out of range, or the dynamic clk_id does not refer to a valid instance of a clock object. See clock_gettime(2) for a discussion of dynamic clocks.

EINVAL
An attempt was made to set buf.tick to a value outside the range 900000/HZ to 1100000/HZ, where HZ is the system timer interrupt frequency.

ENODEV
The hot-pluggable device (like USB for example) represented by a dynamic clk_id has disappeared after its character device was opened. See clock_gettime(2) for a discussion of dynamic clocks.

EOPNOTSUPP
The given clk_id does not support adjustment.

EPERM
buf.modes is neither 0 nor ADJ_OFFSET_SS_READ, and the caller does not have sufficient privilege. Under Linux, the CAP_SYS_TIME capability is required.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

ntp_adjtime()

Thread safetyMT-Safe

STANDARDS

adjtimex()
clock_adjtime()
Linux.

The preferred API for the NTP daemon is ntp_adjtime().

NOTES

In struct timex, freq, ppsfreq, and stabil are ppm (parts per million) with a 16-bit fractional part, which means that a value of 1 in one of those fields actually means 2^-16 ppm, and 2^16=65536 is 1 ppm. This is the case for both input values (in the case of freq) and output values.

The leap-second processing triggered by STA_INS and STA_DEL is done by the kernel in timer context. Thus, it will take one tick into the second for the leap second to be inserted or deleted.

SEE ALSO

clock_gettime(2), clock_settime(2), settimeofday(2), adjtime(3), ntp_gettime(3), capabilities(7), time(7), adjtimex(8), hwclock(8)

NTP “Kernel Application Program Interface”

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2618 - Linux cli command malloc_trim

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command malloc_trim and provides detailed information about the command malloc_trim, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the malloc_trim.

NAME 🖥️ malloc_trim 🖥️

release free memory from the heap

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <malloc.h>
int malloc_trim(size_t pad);

DESCRIPTION

The malloc_trim() function attempts to release free memory from the heap (by calling sbrk(2) or madvise(2) with suitable arguments).

The pad argument specifies the amount of free space to leave untrimmed at the top of the heap. If this argument is 0, only the minimum amount of memory is maintained at the top of the heap (i.e., one page or less). A nonzero argument can be used to maintain some trailing space at the top of the heap in order to allow future allocations to be made without having to extend the heap with sbrk(2).

RETURN VALUE

The malloc_trim() function returns 1 if memory was actually released back to the system, or 0 if it was not possible to release any memory.

ERRORS

No errors are defined.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

malloc_trim()

Thread safetyMT-Safe

STANDARDS

GNU.

VERSIONS

glibc 2.0.

NOTES

Only the main heap (using sbrk(2)) honors the pad argument; thread heaps do not.

Since glibc 2.8 this function frees memory in all arenas and in all chunks with whole free pages.

Before glibc 2.8 this function only freed memory at the top of the heap in the main arena.

SEE ALSO

sbrk(2), malloc(3), mallopt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2619 - Linux cli command popen

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command popen and provides detailed information about the command popen, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the popen.

NAME 🖥️ popen 🖥️

pipe stream to or from a process

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
FILE *popen(const char *command, const char *type);
int pclose(FILE *stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

popen(), pclose():

    _POSIX_C_SOURCE >= 2
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The popen() function opens a process by creating a pipe, forking, and invoking the shell. Since a pipe is by definition unidirectional, the type argument may specify only reading or writing, not both; the resulting stream is correspondingly read-only or write-only.

The command argument is a pointer to a null-terminated string containing a shell command line. This command is passed to /bin/sh using the -c flag; interpretation, if any, is performed by the shell.

The type argument is a pointer to a null-terminated string which must contain either the letter ‘r’ for reading or the letter ‘w’ for writing. Since glibc 2.9, this argument can additionally include the letter ’e’, which causes the close-on-exec flag (FD_CLOEXEC) to be set on the underlying file descriptor; see the description of the O_CLOEXEC flag in open(2) for reasons why this may be useful.

The return value from popen() is a normal standard I/O stream in all respects save that it must be closed with pclose() rather than fclose(3). Writing to such a stream writes to the standard input of the command; the command’s standard output is the same as that of the process that called popen(), unless this is altered by the command itself. Conversely, reading from the stream reads the command’s standard output, and the command’s standard input is the same as that of the process that called popen().

Note that output popen() streams are block buffered by default.

The pclose() function waits for the associated process to terminate and returns the exit status of the command as returned by wait4(2).

RETURN VALUE

popen(): on success, returns a pointer to an open stream that can be used to read or write to the pipe; if the fork(2) or pipe(2) calls fail, or if the function cannot allocate memory, NULL is returned.

pclose(): on success, returns the exit status of the command; if wait4(2) returns an error, or some other error is detected, -1 is returned.

On failure, both functions set errno to indicate the error.

ERRORS

The popen() function does not set errno if memory allocation fails. If the underlying fork(2) or pipe(2) fails, errno is set to indicate the error. If the type argument is invalid, and this condition is detected, errno is set to EINVAL.

If pclose() cannot obtain the child status, errno is set to ECHILD.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

popen(), pclose()

Thread safetyMT-Safe

VERSIONS

The ’e’ value for type is a Linux extension.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

CAVEATS

Carefully read Caveats in system(3).

BUGS

Since the standard input of a command opened for reading shares its seek offset with the process that called popen(), if the original process has done a buffered read, the command’s input position may not be as expected. Similarly, the output from a command opened for writing may become intermingled with that of the original process. The latter can be avoided by calling fflush(3) before popen().

Failure to execute the shell is indistinguishable from the shell’s failure to execute the command, or an immediate exit of the command. The only hint is an exit status of 127.

SEE ALSO

sh(1), fork(2), pipe(2), wait4(2), fclose(3), fflush(3), fopen(3), stdio(3), system(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2620 - Linux cli command Xevi

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Xevi and provides detailed information about the command Xevi, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Xevi.

NAME 🖥️ Xevi 🖥️

X Extended Visual Information functions

SYNOPSIS

#include <X11/extensions/XEVI.h>

Bool XeviQueryExtension (Display *dpy);

Bool XeviQueryVersion (Display *dpy, int *major_version_return, int *minor_version_return);

int XeviGetVisualInfo (Display *dpy, VisualID *visual, int n_visual, ExtendedVisualInfo ** evi_return, int * n_info_return);

DESCRIPTION

The X11 Extended Visual Information extension (EVI) allows a client to determine information about core X visuals beyond what the core protocol provides.

The EVI application programming library contains the interfaces described below. With the exception of XeviQueryExtension, if any of these routines are called with a display that does not support the extension, the ExtensionErrorHandler (which can be set with XSetExtensionErrorHandler and functions the same way as XSetErrorHandler) will be called and the function will then return.

XeviQueryExtension returns True if the Extended Visual Information extension is available on the given display. A client must call XeviQueryExtension before calling any other EVI function in order to negotiate a compatible protocol version; otherwise the client will get undefined behavior (EVI may or may not work).

XeviQueryVersion returns True if the request succeeded; the values of the major and minor protocol version supported by the server are returned in major_version_return and minor_version_return.

XeviGetVisualInfo returns a list of ExtendedVisualInfo structures that describe visual information beyond that supported by the core protocol. This includes layer information relevant for systems supporting overlays and/or underlay planes, and information that allows applications better to determine the level of hardware support for multiple colormaps. XeviGetVisualInfo returns Success if successful, or an X error otherwise. If the argument visual is NULL, then information for all visuals of all screens is returned. Otherwise, it’s a pointer to a list of visuals for which extended visual information is desired. n_visual is the number of elements in the array visual. evi_return returns a pointer to a list of ExtendedVisualInfo. When done, the client should free the list using XFree. n_info_return returns the number of elements in the array evi_return.

The ExtendedVisualInfo structure has the following fields:

VisualID	core_visual_id
int 	screen
int 	level
unsigned int	transparency_type
unsigned int	transparency_value
unsigned int	min_hw_colormaps
unsigned int	max_hw_colormaps
unsigned int	num_colormap_conflicts
VisualID *  	colormap_conflicts

The combination of core_visual_id and screen number uniquely specify the visual being described.

level returns the level number for the visual, 0 for normal planes, > 0 for overlays, < 0 for underlays.

transparency_type returns the type of transparency supported by the visual. XEVI_TRANSPARENCY_NONE if there are no transparent pixels, XEVI_TRANSPARENCY_PIXEL if the visual supports a transparent pixel, XEVI_TRANSPARENCY_MASK if the visual supports transparent plane(s).

transparency_value returns the pixel/plane value to set for transparency if transparency_type isn’t XEVI_TRANSPARENCY_NONE.

min_hw_colormaps and max_hw_colormaps return the minimum and maximum number of hardware colormaps backing up the visual.

num_colormap_conflicts returns the number of elements in colormap_conflicts. This array returns a list of visuals that may cause conflicts in the use of the hardware colormap. For example, if a 12-bit hardware colormap is overloaded to support 8-bit colormaps, the corresponding 8-bit visuals would conflict with the 12-bit visuals.

ERRORS

XeviGetVisualInfo will return BadValue if passed an illegal visual ID, BadAccess if the X server does not respond, BadAlloc if there is a memory allocation failure.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2621 - Linux cli command setnetent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setnetent and provides detailed information about the command setnetent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setnetent.

NAME 🖥️ setnetent 🖥️

get network entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
struct netent *getnetent(void);
struct netent *getnetbyname(const char *name);
struct netent *getnetbyaddr(uint32_t net, int type);
void setnetent(int stayopen);
void endnetent(void);

DESCRIPTION

The getnetent() function reads the next entry from the networks database and returns a netent structure containing the broken-out fields from the entry. A connection is opened to the database if necessary.

The getnetbyname() function returns a netent structure for the entry from the database that matches the network name.

The getnetbyaddr() function returns a netent structure for the entry from the database that matches the network number net of type type. The net argument must be in host byte order.

The setnetent() function opens a connection to the database, and sets the next entry to the first entry. If stayopen is nonzero, then the connection to the database will not be closed between calls to one of the getnet*() functions.

The endnetent() function closes the connection to the database.

The netent structure is defined in <netdb.h> as follows:

struct netent {
    char      *n_name;     /* official network name */
    char     **n_aliases;  /* alias list */
    int        n_addrtype; /* net address type */
    uint32_t   n_net;      /* network number */
}

The members of the netent structure are:

n_name
The official name of the network.

n_aliases
A NULL-terminated list of alternative names for the network.

n_addrtype
The type of the network number; always AF_INET.

n_net
The network number in host byte order.

RETURN VALUE

The getnetent(), getnetbyname(), and getnetbyaddr() functions return a pointer to a statically allocated netent structure, or a null pointer if an error occurs or the end of the file is reached.

FILES

/etc/networks
networks database file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getnetent()

Thread safety

MT-Unsafe race:netent race:netentbuf env locale

getnetbyname()

Thread safety

MT-Unsafe race:netbyname env locale

getnetbyaddr()

Thread safety

MT-Unsafe race:netbyaddr locale

setnetent(), endnetent()

Thread safety

MT-Unsafe race:netent env locale

In the above table, netent in race:netent signifies that if any of the functions setnetent(), getnetent(), or endnetent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, 4.3BSD.

Before glibc 2.2, the net argument of getnetbyaddr() was of type long.

SEE ALSO

getnetent_r(3), getprotoent(3), getservent(3)
RFC 1101

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2622 - Linux cli command wcscmp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcscmp and provides detailed information about the command wcscmp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcscmp.

NAME 🖥️ wcscmp 🖥️

compare two wide-character strings

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
int wcscmp(const wchar_t *s1, const wchar_t *s2);

DESCRIPTION

The wcscmp() function is the wide-character equivalent of the strcmp(3) function. It compares the wide-character string pointed to by s1 and the wide-character string pointed to by s2.

RETURN VALUE

The wcscmp() function returns zero if the wide-character strings at s1 and s2 are equal. It returns an integer greater than zero if at the first differing position i, the corresponding wide-character s1[i] is greater than s2[i]. It returns an integer less than zero if at the first differing position i, the corresponding wide-character s1[i] is less than s2[i].

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcscmp()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

strcmp(3), wcscasecmp(3), wmemcmp(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2623 - Linux cli command login_tty

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command login_tty and provides detailed information about the command login_tty, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the login_tty.

NAME 🖥️ login_tty 🖥️

terminal utility functions

LIBRARY

System utilities library (libutil, -lutil)

SYNOPSIS

#include <pty.h>
int openpty(int *amaster, int *aslave, char *name,
 const struct termios *termp,
 const struct winsize *winp);
pid_t forkpty(int *amaster, char *name,
 const struct termios *termp,
 const struct winsize *winp);
#include <utmp.h>
int login_tty(int fd);

DESCRIPTION

The openpty() function finds an available pseudoterminal and returns file descriptors for the master and slave in amaster and aslave. If name is not NULL, the filename of the slave is returned in name. If termp is not NULL, the terminal parameters of the slave will be set to the values in termp. If winp is not NULL, the window size of the slave will be set to the values in winp.

The login_tty() function prepares for a login on the terminal referred to by the file descriptor fd (which may be a real terminal device, or the slave of a pseudoterminal as returned by openpty()) by creating a new session, making fd the controlling terminal for the calling process, setting fd to be the standard input, output, and error streams of the current process, and closing fd.

The forkpty() function combines openpty(), fork(2), and login_tty() to create a new process operating in a pseudoterminal. A file descriptor referring to master side of the pseudoterminal is returned in amaster. If name is not NULL, the buffer it points to is used to return the filename of the slave. The termp and winp arguments, if not NULL, will determine the terminal attributes and window size of the slave side of the pseudoterminal.

RETURN VALUE

If a call to openpty(), login_tty(), or forkpty() is not successful, -1 is returned and errno is set to indicate the error. Otherwise, openpty(), login_tty(), and the child process of forkpty() return 0, and the parent process of forkpty() returns the process ID of the child process.

ERRORS

openpty() fails if:

ENOENT
There are no available terminals.

login_tty() fails if ioctl(2) fails to set fd to the controlling terminal of the calling process.

forkpty() fails if either openpty() or fork(2) fails.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

forkpty(), openpty()

Thread safetyMT-Safe locale

login_tty()

Thread safetyMT-Unsafe race:ttyname

STANDARDS

BSD.

HISTORY

The const modifiers were added to the structure pointer arguments of openpty() and forkpty() in glibc 2.8.

Before glibc 2.0.92, openpty() returns file descriptors for a BSD pseudoterminal pair; since glibc 2.0.92, it first attempts to open a UNIX 98 pseudoterminal pair, and falls back to opening a BSD pseudoterminal pair if that fails.

BUGS

Nobody knows how much space should be reserved for name. So, calling openpty() or forkpty() with non-NULL name may not be secure.

SEE ALSO

fork(2), ttyname(3), pty(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2624 - Linux cli command zip_source_error

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_error and provides detailed information about the command zip_source_error, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_error.

libzip (-lzip)

The

function returns the zip error for the data source

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2625 - Linux cli command Image_ExifTool_KyoceraRawpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_KyoceraRawpm and provides detailed information about the command Image_ExifTool_KyoceraRawpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_KyoceraRawpm.

NAME 🖥️ Image_ExifTool_KyoceraRawpm 🖥️

Read Kyocera RAW meta information

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to read meta information from Kyocera Contax N Digital RAW images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.cybercom.net/~dcoffin/dcraw/>

SEE ALSO

“KyoceraRaw Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2626 - Linux cli command getw

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getw and provides detailed information about the command getw, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getw.

NAME 🖥️ getw 🖥️

input and output of words (ints)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int getw(FILE *stream);
int putw(int w, FILE *stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getw(), putw():

    Since glibc 2.3.3:
        _XOPEN_SOURCE && ! (_POSIX_C_SOURCE >= 200112L)
            || /* glibc >= 2.19: */ _DEFAULT_SOURCE
            || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
    Before glibc 2.3.3:
        _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE

DESCRIPTION

getw() reads a word (that is, an int) from stream. It’s provided for compatibility with SVr4. We recommend you use fread(3) instead.

putw() writes the word w (that is, an int) to stream. It is provided for compatibility with SVr4, but we recommend you use fwrite(3) instead.

RETURN VALUE

Normally, getw() returns the word read, and putw() returns 0. On error, they return EOF.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getw(), putw()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

SVr4, SUSv2.

BUGS

The value returned on error is also a legitimate data value. ferror(3) can be used to distinguish between the two cases.

SEE ALSO

ferror(3), fread(3), fwrite(3), getc(3), putc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2627 - Linux cli command remque

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command remque and provides detailed information about the command remque, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the remque.

NAME 🖥️ remque 🖥️

insert/remove an item from a queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <search.h>
void insque(void *elem, void *prev);
void remque(void *elem);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

insque(), remque():

    _XOPEN_SOURCE >= 500
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

DESCRIPTION

The insque() and remque() functions manipulate doubly linked lists. Each element in the list is a structure of which the first two elements are a forward and a backward pointer. The linked list may be linear (i.e., NULL forward pointer at the end of the list and NULL backward pointer at the start of the list) or circular.

The insque() function inserts the element pointed to by elem immediately after the element pointed to by prev.

If the list is linear, then the call insque(elem, NULL) can be used to insert the initial list element, and the call sets the forward and backward pointers of elem to NULL.

If the list is circular, the caller should ensure that the forward and backward pointers of the first element are initialized to point to that element, and the prev argument of the insque() call should also point to the element.

The remque() function removes the element pointed to by elem from the doubly linked list.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

insque(), remque()

Thread safetyMT-Safe

VERSIONS

On ancient systems, the arguments of these functions were of type struct qelem *, defined as:

struct qelem {
    struct qelem *q_forw;
    struct qelem *q_back;
    char          q_data[1];
};

This is still what you will get if _GNU_SOURCE is defined before including <search.h>.

The location of the prototypes for these functions differs among several versions of UNIX. The above is the POSIX version. Some systems place them in <string.h>.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

BUGS

In glibc 2.4 and earlier, it was not possible to specify prev as NULL. Consequently, to build a linear list, the caller had to build a list using an initial call that contained the first two elements of the list, with the forward and backward pointers in each element suitably initialized.

EXAMPLES

The program below demonstrates the use of insque(). Here is an example run of the program:

$ ./a.out -c a b c
Traversing completed list:
    a
    b
    c
That was a circular list

Program source

#include <search.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
struct element {
    struct element *forward;
    struct element *backward;
    char *name;
};
static struct element *
new_element(void)
{
    struct element *e;
    e = malloc(sizeof(*e));
    if (e == NULL) {
        fprintf(stderr, "malloc() failed

“); exit(EXIT_FAILURE); } return e; } int main(int argc, char *argv[]) { struct element *first, *elem, prev; int circular, opt, errfnd; / The “-c” command-line option can be used to specify that the list is circular. / errfnd = 0; circular = 0; while ((opt = getopt(argc, argv, “c”)) != -1) { switch (opt) { case ‘c’: circular = 1; break; default: errfnd = 1; break; } } if (errfnd || optind >= argc) { fprintf(stderr, “Usage: %s [-c] string… “, argv[0]); exit(EXIT_FAILURE); } / Create first element and place it in the linked list. / elem = new_element(); first = elem; elem->name = argv[optind]; if (circular) { elem->forward = elem; elem->backward = elem; insque(elem, elem); } else { insque(elem, NULL); } / Add remaining command-line arguments as list elements. / while (++optind < argc) { prev = elem; elem = new_element(); elem->name = argv[optind]; insque(elem, prev); } / Traverse the list from the start, printing element names. */ printf(“Traversing completed list: “); elem = first; do { printf(” %s “, elem->name); elem = elem->forward; } while (elem != NULL && elem != first); if (elem == first) printf(“That was a circular list “); exit(EXIT_SUCCESS); }

SEE ALSO

queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2628 - Linux cli command timezone

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command timezone and provides detailed information about the command timezone, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the timezone.

NAME 🖥️ timezone 🖥️

initialize time conversion information

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <time.h>
void tzset(void);
extern char *tzname[2];
extern long timezone;
extern int daylight;

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

tzset():

    _POSIX_C_SOURCE

tzname:

    _POSIX_C_SOURCE

timezone, daylight:

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

DESCRIPTION

The tzset() function initializes the tzname variable from the TZ environment variable. This function is automatically called by the other time conversion functions that depend on the timezone. In a System-V-like environment, it will also set the variables timezone (seconds West of UTC) and daylight (to 0 if this timezone does not have any daylight saving time rules, or to nonzero if there is a time, past, present, or future when daylight saving time applies).

If the TZ variable does not appear in the environment, the system timezone is used. The system timezone is configured by copying, or linking, a file in the tzfile(5) format to /etc/localtime. A timezone database of these files may be located in the system timezone directory (see the FILES section below).

If the TZ variable does appear in the environment, but its value is empty, or its value cannot be interpreted using any of the formats specified below, then Coordinated Universal Time (UTC) is used.

The value of TZ can be one of two formats. The first format is a string of characters that directly represent the timezone to be used:

std offset[dst[offset][,start[/time],end[/time]]]

There are no spaces in the specification. The std string specifies an abbreviation for the timezone and must be three or more alphabetic characters. When enclosed between the less-than (<) and greater-than (>) signs, the character set is expanded to include the plus (+) sign, the minus (-) sign, and digits. The offset string immediately follows std and specifies the time value to be added to the local time to get Coordinated Universal Time (UTC). The offset is positive if the local timezone is west of the Prime Meridian and negative if it is east. The hour must be between 0 and 24, and the minutes and seconds 00 and 59:

[+|-]hh[:mm[:ss]]

The dst string and offset specify the name and offset for the corresponding daylight saving timezone. If the offset is omitted, it defaults to one hour ahead of standard time.

The start field specifies when daylight saving time goes into effect and the end field specifies when the change is made back to standard time. These fields may have the following formats:

Jn
This specifies the Julian day with n between 1 and 365. Leap days are not counted. In this format, February 29 can’t be represented; February 28 is day 59, and March 1 is always day 60.

n
This specifies the zero-based Julian day with n between 0 and 365. February 29 is counted in leap years.

Mm.w.d
This specifies day d (0 <= d <= 6) of week w (1 <= w <= 5) of month m (1 <= m <= 12). Week 1 is the first week in which day d occurs and week 5 is the last week in which day d occurs. Day 0 is a Sunday.

The time fields specify when, in the local time currently in effect, the change to the other time occurs. If omitted, the default is 02:00:00.

Here is an example for New Zealand, where the standard time (NZST) is 12 hours ahead of UTC, and daylight saving time (NZDT), 13 hours ahead of UTC, runs from the first Sunday in October to the third Sunday in March, and the changeovers happen at the default time of 02:00:00:

TZ="NZST-12:00:00NZDT-13:00:00,M10.1.0,M3.3.0"

The second format specifies that the timezone information should be read from a file:

:[filespec]

If the file specification filespec is omitted, or its value cannot be interpreted, then Coordinated Universal Time (UTC) is used. If filespec is given, it specifies another tzfile(5)-format file to read the timezone information from. If filespec does not begin with a ‘/’, the file specification is relative to the system timezone directory. If the colon is omitted each of the above TZ formats will be tried.

Here’s an example, once more for New Zealand:

TZ=":Pacific/Auckland"

ENVIRONMENT

TZ
If this variable is set its value takes precedence over the system configured timezone.

TZDIR
If this variable is set its value takes precedence over the system configured timezone database directory path.

FILES

/etc/localtime
The system timezone file.

/usr/share/zoneinfo/
The system timezone database directory.

/usr/share/zoneinfo/posixrules
When a TZ string includes a dst timezone without anything following it, then this file is used for the start/end rules. It is in the tzfile(5) format. By default, the zoneinfo Makefile hard links it to the America/New_York tzfile.

Above are the current standard file locations, but they are configurable when glibc is compiled.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tzset()

Thread safetyMT-Safe env locale

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4, 4.3BSD.

4.3BSD had a function char *timezone(zone, dst) that returned the name of the timezone corresponding to its first argument (minutes West of UTC). If the second argument was 0, the standard name was used, otherwise the daylight saving time version.

SEE ALSO

date(1), gettimeofday(2), time(2), ctime(3), getenv(3), tzfile(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2629 - Linux cli command wctomb

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wctomb and provides detailed information about the command wctomb, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wctomb.

NAME 🖥️ wctomb 🖥️

convert a wide character to a multibyte sequence

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int wctomb(char *s, wchar_t wc);

DESCRIPTION

If s is not NULL, the wctomb() function converts the wide character wc to its multibyte representation and stores it at the beginning of the character array pointed to by s. It updates the shift state, which is stored in a static anonymous variable known only to the wctomb() function, and returns the length of said multibyte representation, that is, the number of bytes written at s.

The programmer must ensure that there is room for at least MB_CUR_MAX bytes at s.

If s is NULL, the wctomb() function resets the shift state, known only to this function, to the initial state, and returns nonzero if the encoding has nontrivial shift state, or zero if the encoding is stateless.

RETURN VALUE

If s is not NULL, the wctomb() function returns the number of bytes that have been written to the byte array at s. If wc can not be represented as a multibyte sequence (according to the current locale), -1 is returned.

If s is NULL, the wctomb() function returns nonzero if the encoding has nontrivial shift state, or zero if the encoding is stateless.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wctomb()

Thread safetyMT-Unsafe race

VERSIONS

The function wcrtomb(3) provides a better interface to the same functionality.

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of wctomb() depends on the LC_CTYPE category of the current locale.

SEE ALSO

MB_CUR_MAX(3), mblen(3), mbstowcs(3), mbtowc(3), wcrtomb(3), wcstombs(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2630 - Linux cli command getpwnam

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getpwnam and provides detailed information about the command getpwnam, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getpwnam.

NAME 🖥️ getpwnam 🖥️

get password file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <pwd.h>
struct passwd *getpwnam(const char *name);
struct passwd *getpwuid(uid_t uid);
int getpwnam_r(const char *restrict name, struct passwd *restrict pwd,
 char buf[restrict .buflen], size_t buflen,
 struct passwd **restrict result);
int getpwuid_r(uid_t uid, struct passwd *restrict pwd,
 char buf[restrict .buflen], size_t buflen,
 struct passwd **restrict result);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getpwnam_r(), getpwuid_r():

    _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The getpwnam() function returns a pointer to a structure containing the broken-out fields of the record in the password database (e.g., the local password file /etc/passwd, NIS, and LDAP) that matches the username name.

The getpwuid() function returns a pointer to a structure containing the broken-out fields of the record in the password database that matches the user ID uid.

The passwd structure is defined in <pwd.h> as follows:

struct passwd {
    char   *pw_name;       /* username */
    char   *pw_passwd;     /* user password */
    uid_t   pw_uid;        /* user ID */
    gid_t   pw_gid;        /* group ID */
    char   *pw_gecos;      /* user information */
    char   *pw_dir;        /* home directory */
    char   *pw_shell;      /* shell program */
};

See passwd(5) for more information about these fields.

The getpwnam_r() and getpwuid_r() functions obtain the same information as getpwnam() and getpwuid(), but store the retrieved passwd structure in the space pointed to by pwd. The string fields pointed to by the members of the passwd structure are stored in the buffer buf of size buflen. A pointer to the result (in case of success) or NULL (in case no entry was found or an error occurred) is stored in *result.

The call

sysconf(_SC_GETPW_R_SIZE_MAX)

returns either -1, without changing errno, or an initial suggested size for buf. (If this size is too small, the call fails with ERANGE, in which case the caller can retry with a larger buffer.)

RETURN VALUE

The getpwnam() and getpwuid() functions return a pointer to a passwd structure, or NULL if the matching entry is not found or an error occurs. If an error occurs, errno is set to indicate the error. If one wants to check errno after the call, it should be set to zero before the call.

The return value may point to a static area, and may be overwritten by subsequent calls to getpwent(3), getpwnam(), or getpwuid(). (Do not pass the returned pointer to free(3).)

On success, getpwnam_r() and getpwuid_r() return zero, and set *result to pwd. If no matching password record was found, these functions return 0 and store NULL in *result. In case of error, an error number is returned, and NULL is stored in *result.

ERRORS

0 or ENOENT or ESRCH or EBADF or EPERM or …
The given name or uid was not found.

EINTR
A signal was caught; see signal(7).

EIO
I/O error.

EMFILE
The per-process limit on the number of open file descriptors has been reached.

ENFILE
The system-wide limit on the total number of open files has been reached.

ENOMEM
Insufficient memory to allocate passwd structure.

ERANGE
Insufficient buffer space supplied.

NOTE

The user password database mostly refers to /etc/passwd. However, with recent systems it also refers to network wide databases using NIS, LDAP and other local files as configured in /etc/nsswitch.conf.

FILES

/etc/passwd
local password database file

/etc/nsswitch.conf
System Databases and Name Service Switch configuration file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getpwnam()

Thread safety

MT-Unsafe race:pwnam locale

getpwuid()

Thread safety

MT-Unsafe race:pwuid locale

getpwnam_r(), getpwuid_r()

Thread safety

MT-Safe locale

VERSIONS

The pw_gecos field is not specified in POSIX, but is present on most implementations.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4, 4.3BSD.

NOTES

The formulation given above under “RETURN VALUE” is from POSIX.1-2001. It does not call “not found” an error, and hence does not specify what value errno might have in this situation. But that makes it impossible to recognize errors. One might argue that according to POSIX errno should be left unchanged if an entry is not found. Experiments on various UNIX-like systems show that lots of different values occur in this situation: 0, ENOENT, EBADF, ESRCH, EWOULDBLOCK, EPERM, and probably others.

The pw_dir field contains the name of the initial working directory of the user. Login programs use the value of this field to initialize the HOME environment variable for the login shell. An application that wants to determine its user’s home directory should inspect the value of HOME (rather than the value getpwuid(getuid())->pw_dir) since this allows the user to modify their notion of “the home directory” during a login session. To determine the (initial) home directory of another user, it is necessary to use getpwnam(“username”)->pw_dir or similar.

EXAMPLES

The program below demonstrates the use of getpwnam_r() to find the full username and user ID for the username supplied as a command-line argument.

#include <errno.h>
#include <pwd.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int
main(int argc, char *argv[])
{
    struct passwd pwd;
    struct passwd *result;
    char *buf;
    long bufsize;
    int s;
    if (argc != 2) {
        fprintf(stderr, "Usage: %s username

“, argv[0]); exit(EXIT_FAILURE); } bufsize = sysconf(_SC_GETPW_R_SIZE_MAX); if (bufsize == -1) /* Value was indeterminate / bufsize = 16384; / Should be more than enough */ buf = malloc(bufsize); if (buf == NULL) { perror(“malloc”); exit(EXIT_FAILURE); } s = getpwnam_r(argv[1], &pwd, buf, bufsize, &result); if (result == NULL) { if (s == 0) printf(“Not found “); else { errno = s; perror(“getpwnam_r”); } exit(EXIT_FAILURE); } printf(“Name: %s; UID: %jd “, pwd.pw_gecos, (intmax_t) pwd.pw_uid); exit(EXIT_SUCCESS); }

SEE ALSO

endpwent(3), fgetpwent(3), getgrnam(3), getpw(3), getpwent(3), getspnam(3), putpwent(3), setpwent(3), nsswitch.conf(5), passwd(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2631 - Linux cli command regerror

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command regerror and provides detailed information about the command regerror, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the regerror.

NAME 🖥️ regerror 🖥️

POSIX regex functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <regex.h>
int regcomp(regex_t *restrict preg, const char *restrict regex,
 int cflags);
int regexec(const regex_t *restrict preg",constchar*restrict"string,
 size_t nmatch, regmatch_t pmatch[_Nullable restrict .nmatch],
 int eflags);
size_t regerror(int errcode, const regex_t *_Nullable restrict preg,
 char errbuf[_Nullable restrict .errbuf_size],
 size_t errbuf_size);
void regfree(regex_t *preg);
typedef struct {
 size_t re_nsub;
} regex_t;
typedef struct {
 regoff_t rm_so;
 regoff_t rm_eo;
} regmatch_t;
typedef /* ... */ regoff_t;

DESCRIPTION

Compilation

regcomp() is used to compile a regular expression into a form that is suitable for subsequent regexec() searches.

On success, the pattern buffer at *preg is initialized. regex is a null-terminated string. The locale must be the same when running regexec().

After regcomp() succeeds, preg->re_nsub holds the number of subexpressions in regex. Thus, a value of preg->re_nsub + 1 passed as nmatch to regexec() is sufficient to capture all matches.

cflags is the bitwise OR of zero or more of the following:

REG_EXTENDED
Use POSIX Extended Regular Expression syntax when interpreting regex. If not set, POSIX Basic Regular Expression syntax is used.

REG_ICASE
Do not differentiate case. Subsequent regexec() searches using this pattern buffer will be case insensitive.

REG_NOSUB
Report only overall success. regexec() will use only pmatch for REG_STARTEND, ignoring nmatch.

REG_NEWLINE
Match-any-character operators don’t match a newline.

A nonmatching list ([^…]) not containing a newline does not match a newline.

Match-beginning-of-line operator (^) matches the empty string immediately after a newline, regardless of whether eflags, the execution flags of regexec(), contains REG_NOTBOL.

Match-end-of-line operator ($) matches the empty string immediately before a newline, regardless of whether eflags contains REG_NOTEOL.

Matching

regexec() is used to match a null-terminated string against the compiled pattern buffer in *preg, which must have been initialised with regexec(). eflags is the bitwise OR of zero or more of the following flags:

REG_NOTBOL
The match-beginning-of-line operator always fails to match (but see the compilation flag REG_NEWLINE above). This flag may be used when different portions of a string are passed to regexec() and the beginning of the string should not be interpreted as the beginning of the line.

REG_NOTEOL
The match-end-of-line operator always fails to match (but see the compilation flag REG_NEWLINE above).

REG_STARTEND
Match [string + pmatch[0].rm_so,* string + pmatch[0].rm_eo*) instead of [string,* string + strlen(string)*). This allows matching embedded NUL bytes and avoids a strlen(3) on known-length strings. If any matches are returned (REG_NOSUB wasn’t passed to regcomp(), the match succeeded, and nmatch > 0), they overwrite pmatch as usual, and the match offsets remain relative to string (not string + pmatch[0].rm_so). This flag is a BSD extension, not present in POSIX.

Match offsets

Unless REG_NOSUB was passed to regcomp(), it is possible to obtain the locations of matches within string: regexec() fills nmatch elements of pmatch with results: pmatch[0] corresponds to the entire match, pmatch[1] to the first subexpression, etc. If there were more matches than nmatch, they are discarded; if fewer, unused elements of pmatch are filled with -1s.

Each returned valid (non--1) match corresponds to the range [string + rm_so,* string + rm_eo*).

regoff_t is a signed integer type capable of storing the largest value that can be stored in either an ptrdiff_t type or a ssize_t type.

Error reporting

regerror() is used to turn the error codes that can be returned by both regcomp() and regexec() into error message strings.

If preg isn’t a null pointer, errcode must be the latest error returned from an operation on preg.

If errbuf_size isn’t 0, up to errbuf_size bytes are copied to errbuf; the error string is always null-terminated, and truncated to fit.

Freeing

regfree() deinitializes the pattern buffer at *preg, freeing any associated memory; *preg must have been initialized via regcomp().

RETURN VALUE

regcomp() returns zero for a successful compilation or an error code for failure.

regexec() returns zero for a successful match or REG_NOMATCH for failure.

regerror() returns the size of the buffer required to hold the string.

ERRORS

The following errors can be returned by regcomp():

REG_BADBR
Invalid use of back reference operator.

REG_BADPAT
Invalid use of pattern operators such as group or list.

REG_BADRPT
Invalid use of repetition operators such as using ‘*’ as the first character.

REG_EBRACE
Un-matched brace interval operators.

REG_EBRACK
Un-matched bracket list operators.

REG_ECOLLATE
Invalid collating element.

REG_ECTYPE
Unknown character class name.

REG_EEND
Nonspecific error. This is not defined by POSIX.

REG_EESCAPE
Trailing backslash.

REG_EPAREN
Un-matched parenthesis group operators.

REG_ERANGE
Invalid use of the range operator; for example, the ending point of the range occurs prior to the starting point.

REG_ESIZE
Compiled regular expression requires a pattern buffer larger than 64 kB. This is not defined by POSIX.

REG_ESPACE
The regex routines ran out of memory.

REG_ESUBREG
Invalid back reference to a subexpression.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

regcomp(), regexec()

Thread safetyMT-Safe locale

regerror()

Thread safetyMT-Safe env

regfree()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

Prior to POSIX.1-2008, regoff_t was required to be capable of storing the largest value that can be stored in either an off_t type or a ssize_t type.

CAVEATS

re_nsub is only required to be initialized if REG_NOSUB wasn’t specified, but all known implementations initialize it regardless.

Both regex_t and regmatch_t may (and do) have more members, in any order. Always reference them by name.

EXAMPLES

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <regex.h>
#define ARRAY_SIZE(arr) (sizeof((arr)) / sizeof((arr)[0]))
static const char *const str =
        "1) John Driverhacker;
  1. John Doe;
  2. John Foo; “; static const char *const re = “John.*o”; int main(void) { static const char *s = str; regex_t regex; regmatch_t pmatch[1]; regoff_t off, len; if (regcomp(&regex, re, REG_NEWLINE)) exit(EXIT_FAILURE); printf(“String = "%s" “, str); printf(“Matches: “); for (unsigned int i = 0; ; i++) { if (regexec(&regex, s, ARRAY_SIZE(pmatch), pmatch, 0)) break; off = pmatch[0].rm_so + (s - str); len = pmatch[0].rm_eo - pmatch[0].rm_so; printf(”#%zu: “, i); printf(“offset = %jd; length = %jd “, (intmax_t) off, (intmax_t) len); printf(“substring = "%.*s" “, len, s + pmatch[0].rm_so); s += pmatch[0].rm_eo; } exit(EXIT_SUCCESS); }

SEE ALSO

grep(1), regex(7)

The glibc manual section, Regular Expressions

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2632 - Linux cli command XtReleasePropertyAtom

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtReleasePropertyAtom and provides detailed information about the command XtReleasePropertyAtom, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtReleasePropertyAtom.

NAME 🖥️ XtReleasePropertyAtom 🖥️

maintain a cache of property atoms

SYNTAX

#include <X11/Intrinsic.h>

Atom XtReservePropertyAtom(Widget w);

void XtReleasePropertyAtom(Widget w, Atom atom);

ARGUMENTS

  1. Specifies the widget used to reserve the atom.

atom
Specifies the atom whose reservation is to be released.

DESCRIPTION

XtReservePropertyAtom returns an atom that may be used for properties in conjunction with conversion requests from widget w. The atom returned will be unique for the display of the widget specified.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2633 - Linux cli command getgrouplist

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getgrouplist and provides detailed information about the command getgrouplist, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getgrouplist.

NAME 🖥️ getgrouplist 🖥️

get list of groups to which a user belongs

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <grp.h>
int getgrouplist(const char *user, gid_t group,
 gid_t *groups, int *ngroups);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getgrouplist():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The getgrouplist() function scans the group database (see group(5)) to obtain the list of groups that user belongs to. Up to *ngroups of these groups are returned in the array groups.

If it was not among the groups defined for user in the group database, then group is included in the list of groups returned by getgrouplist(); typically this argument is specified as the group ID from the password record for user.

The ngroups argument is a value-result argument: on return it always contains the number of groups found for user, including group; this value may be greater than the number of groups stored in groups.

RETURN VALUE

If the number of groups of which user is a member is less than or equal to *ngroups, then the value *ngroups is returned.

If the user is a member of more than *ngroups groups, then getgrouplist() returns -1. In this case, the value returned in *ngroups can be used to resize the buffer passed to a further call to getgrouplist().

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getgrouplist()

Thread safetyMT-Safe locale

STANDARDS

None.

HISTORY

glibc 2.2.4.

BUGS

Before glibc 2.3.3, the implementation of this function contains a buffer-overrun bug: it returns the complete list of groups for user in the array groups, even when the number of groups exceeds *ngroups.

EXAMPLES

The program below displays the group list for the user named in its first command-line argument. The second command-line argument specifies the ngroups value to be supplied to getgrouplist(). The following shell session shows examples of the use of this program:

$ ./a.out cecilia 0
getgrouplist() returned -1; ngroups = 3
$ ./a.out cecilia 3
ngroups = 3
16 (dialout)
33 (video)
100 (users)

Program source

#include <errno.h>
#include <grp.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
    int            ngroups;
    gid_t          *groups;
    struct group   *gr;
    struct passwd  *pw;
    if (argc != 3) {
        fprintf(stderr, "Usage: %s <user> <ngroups>

“, argv[0]); exit(EXIT_FAILURE); } ngroups = atoi(argv[2]); groups = malloc(sizeof(groups) * ngroups); if (groups == NULL) { perror(“malloc”); exit(EXIT_FAILURE); } / Fetch passwd structure (contains first group ID for user). / errno = 0; pw = getpwnam(argv[1]); if (pw == NULL) { if (errno) perror(“getpwnam”); else fprintf(stderr, “no such user “); exit(EXIT_FAILURE); } / Retrieve group list. / if (getgrouplist(argv[1], pw->pw_gid, groups, &ngroups) == -1) { fprintf(stderr, “getgrouplist() returned -1; ngroups = %d “, ngroups); exit(EXIT_FAILURE); } / Display list of retrieved groups, along with group names. */ fprintf(stderr, “ngroups = %d “, ngroups); for (int j = 0; j < ngroups; j++) { printf("%d”, groups[j]); gr = getgrgid(groups[j]); if (gr != NULL) printf(” (%s)”, gr->gr_name); printf(” “); } exit(EXIT_SUCCESS); }

SEE ALSO

getgroups(2), setgroups(2), getgrent(3), group_member(3), group(5), passwd(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2634 - Linux cli command Image_ExifTool_Redpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Redpm and provides detailed information about the command Image_ExifTool_Redpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Redpm.

NAME 🖥️ Image_ExifTool_Redpm 🖥️

Read Redcode R3D video files

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to read metadata from Redcode R3D version 1 and 2 video files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.wikiwand.com/en/REDCODE>

SEE ALSO

“Red Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2635 - Linux cli command va_listtype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command va_listtype and provides detailed information about the command va_listtype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the va_listtype.

NAME 🖥️ va_listtype 🖥️

variable argument list

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <stdarg.h>
typedef /* ... */ va_list;

DESCRIPTION

Used by functions with a varying number of arguments of varying types. The function must declare an object of type va_list which is used by the macros va_start(3), va_arg(3), va_copy(3), and va_end(3) to traverse the list of arguments.

STANDARDS

C11, POSIX.1-2008.

HISTORY

C89, POSIX.1-2001.

NOTES

The following headers also provide va_list: <stdio.h> and <wchar.h>.

SEE ALSO

va_start(3), va_arg(3), va_copy(3), va_end(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2636 - Linux cli command XtAppGetExitFlag

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppGetExitFlag and provides detailed information about the command XtAppGetExitFlag, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppGetExitFlag.

NAME 🖥️ XtAppGetExitFlag 🖥️

thread support functions

SYNTAX

#include <X11/Intrinsic.h>

void XtAppSetExitFlag(XtAppContext app_context);

Boolean XtAppGetExitFlag(XtAppContext app_context);

ARGUMENTS

app_context
Specifies the application context.

DESCRIPTION

To indicate that an application context should exit, use XtAppSetExitFlag.

To test the exit status of an application context, use XtAppGetExitFlag.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2637 - Linux cli command Moose_Meta_Attribute_Native_Trait_Hashpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Attribute_Native_Trait_Hashpm and provides detailed information about the command Moose_Meta_Attribute_Native_Trait_Hashpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Attribute_Native_Trait_Hashpm.

NAME 🖥️ Moose_Meta_Attribute_Native_Trait_Hashpm 🖥️

Helper trait for HashRef attributes

VERSION

version 2.2207

SYNOPSIS

package Stuff; use Moose; has options => ( traits => [Hash], is => ro, isa => HashRef[Str], default => sub { {} }, handles => { set_option => set, get_option => get, has_no_options => is_empty, num_options => count, delete_option => delete, option_pairs => kv, }, );

DESCRIPTION

This trait provides native delegation methods for hash references.

PROVIDED METHODS

get($key, $key2, $key3…)

Returns values from the hash.

In list context it returns a list of values in the hash for the given keys. In scalar context it returns the value for the last key specified.

This method requires at least one argument.

set($key => $value, $key2 => $value2…)

Sets the elements in the hash to the given values. It returns the new values set for each key, in the same order as the keys passed to the method.

This method requires at least two arguments, and expects an even number of arguments.

delete($key, $key2, $key3…)

Removes the elements with the given keys.

In list context it returns a list of values in the hash for the deleted keys. In scalar context it returns the value for the last key specified.

keys

Returns the list of keys in the hash.

This method does not accept any arguments.

exists($key)

Returns true if the given key is present in the hash.

This method requires a single argument.

defined($key)

Returns true if the value of a given key is defined.

This method requires a single argument.

values

Returns the list of values in the hash.

This method does not accept any arguments.

kv

Returns the key/value pairs in the hash as an array of array references.

for my $pair ( $object->option_pairs ) { print “$pair->[0] = $pair->[1] “; }

This method does not accept any arguments.

elements

In list context, this returns the key/value pairs in the hash.

In scalar context, this returns the count of keys plus values. In other words, it’s the same as keys times two.

This method does not accept any arguments.

clear

Resets the hash to an empty value, like %hash = ().

This method does not accept any arguments.

count

Returns the number of elements in the hash. Also useful to check for a nonempty hash, because count returns a true (nonzero) value if there is something in the hash: has_options => count.

This method does not accept any arguments.

is_empty

If the hash is populated, returns false. Otherwise, returns true.

This method does not accept any arguments.

accessor($key)

accessor($key, $value)

If passed one argument, returns the value of the specified key. If passed two arguments, sets the value of the specified key.

When called as a setter, this method returns the value that was set.

shallow_clone

This method returns a shallow clone of the hash reference. The return value is a reference to a new hash with the same keys and values. It is shallow because any values that were references in the original will be the same references in the clone.

Why no “each”?

We have deliberately omitted a method for each, due to its stateful interaction with the hash iterator. Using keys or kv is much safer.

Moose::Meta::Attribute->meta

This will return a Class::MOP::Class instance for this class.

It should also be noted that Class::MOP will actually bootstrap this module by installing a number of attribute meta-objects into its metaclass.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2638 - Linux cli command Net_Server_Protopm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_Server_Protopm and provides detailed information about the command Net_Server_Protopm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_Server_Protopm.

NAME 🖥️ Net_Server_Protopm 🖥️

Net::Server Protocol compatibility layer

SYNOPSIS

NOTE: beginning in Net::Server 2.005, the default value for ipv is IPv* meaning that if no host is passed, or a hostname is past, all available socket types will be bound. You can force IPv4 only by adding an ipv => 4 configuration in any of the half dozen ways we let you specify it. NOTE: For IPv6 Net::Server will first try and use the module listed in server config ipv6_package, then $Net::Server::ipv6_package, then IO::Socket::IP, then IO::Socket::INET6 (which is deprecated). # Net::Server::Proto and its accompanying modules are not # intended to be used outside the scope of Net::Server. # That being said, here is how you use them. This is # only intended for anybody wishing to extend the # protocols to include some other set (ie maybe a # database connection protocol) use Net::Server::Proto; my @info = Net::Server::Proto->parse_info( $port, # port to connect to $default_host, # host to use if none found in port $default_proto, # proto to use if none found in port $default_ipv, # default of IPv6 or IPv4 if none found in port $server_obj, # Net::Server object ); my @raw_info = Net::Server::Proto->get_addr_info($host, $port, $proto); # returns arrayref of resolved ips, ports, and ipv values my $sock = Net::Server::Proto->object({ port => $port, host => $host, proto => $proto, ipv => $ipv, # * (IPv*) if false (default false) }, $server); # Net::Server::Proto will attempt to interface with # sub modules named similar to Net::Server::Proto::TCP # Individual sub modules will be loaded by # Net::Server::Proto as they are needed. use Net::Server::Proto::TCP; # or UDP or UNIX etc # Return an object which is a sub class of IO::Socket # At this point the object is not connected. # The method can gather any other information that it # needs from the server object. my $sock = Net::Server::Proto::TCP->object({ port => $port, host => $host, proto => $proto, ipv => 6, # IPv6 - default is * - can also be 4 }, $server); # Log that a connection is about to occur. # Use the facilities of the passed Net::Server object. $sock->log_connect( $server ); # Actually bind to port or socket file. This # is typically done by calling the configure method. $sock->connect(); # Allow for rebinding to an already open fileno. # Typically will just do an fdopen. $sock->reconnect(); ### Return a unique identifying string for this sock that # can be used when reconnecting. my $str = $sock->hup_string(); # Return the proto that is being used by this module. my $proto = $sock->NS_proto();

DESCRIPTION

Net::Server::Proto is an intermediate module which returns IO::Socket style objects blessed into its own set of classes (ie Net::Server::Proto::TCP, Net::Server::Proto::UNIX).

Only three or four protocols come bundled with Net::Server. TCP, UDP, UNIX, UNIXDGRAM, and SSLEAY. TCP is an implementation of SOCK_STREAM across an INET socket. UDP is an implementation of SOCK_DGRAM across an INET socket. UNIX uses a unix style socket file with the SOCK_STREAM protocol. UNIXGRAM uses a unix style socket file with the SOCK_DGRAM protocol. SSLEAY is actually just a layer on top of TCP but uses Net::SSLeay to read and write from the stream.

The protocol that is passed to Net::Server can be the name of another module which contains the protocol bindings. If a protocol of MyServer::MyTCP was passed, the socket would be blessed into that class. If Net::Server::Proto::TCP was passed, it would get that class. If a bareword, such as tcp, udp, unix, unixdgram or ssleay, is passed, the word is uppercased, and post pended to Net::Server::Proto:: (ie tcp = Net::Server::Proto::TCP).

METHODS

Protocol names used by the Net::Server::Proto should be sub classes of IO::Socket. These classes should also contain, as a minimum, the following methods should be provided:

object
Return an object which is a sub class of IO::Socket At this point the object is not connected. The method can gather any other information that it needs from the server object. Arguments are default_host, port, and a Net::Server style server object.

log_connect
Log that a connection is about to occur. Use the facilities of the passed Net::Server object. This should be an informative string explaining which properties are being used.

connect
Actually bind to port or socket file. This is typically done internally by calling the configure method of the IO::Socket super class.

reconnect
Allow for rebinding to an already open fileno. Typically will just do an fdopen using the IO::Socket super class.

hup_string
Return a unique identifying string for this sock that can be used when reconnecting. This is done to allow information including the file descriptor of the open sockets to be passed via %ENV during an exec. This string should always be the same based upon the configuration parameters.

NS_port
Net::Server protocol. Return the port that is being used by this module. If the underlying type is UNIX then port will actually be the path to the unix socket file.

NS_host
Net::Server protocol. Return the protocol that is being used by this module. This does not have to be a registered or known protocol.

NS_proto
Net::Server protocol. Return the protocol that is being used by this module. This does not have to be a registered or known protocol.

show
Similar to log_connect, but simply shows a listing of which properties were found. Can be used at any time.

HOST

The hostname may be either blank, ‘*’, be an IPv4 address, an IPv6 address, a bare hostname, or a hostname with IPv* specifications.

host => “127.0.0.1”, # an IPv4 address host => “::1”, # an IPv6 address host => localhost, # addresses returned by localhost (default IPv* - IPv4 and/or IPv6) host => localhost/IPv*, # same ipv => *, host => localhost, # same ipv => 6, host => localhost, # addresses returned by localhost (IPv6) ipv => IPv4 IPv6, host => localhost, # addresses returned by localhost (requires IPv6 and IPv4) host => *, # any local interfaces (default IPv*) ipv => *, host => *, # any local interfaces (any IPv6 or IPv4) host => */IPv*, # same

IPV

In addition to being able to specify IPV as a separate parameter, ipv may also be passed as a part of the host, as part of the port, as part of the protocol or may be specified via $ENV{‘IPV’}. The order of precedence is as follows:

1) Explicit IPv4 or IPv6 address - wins 2) ipv specified in port 3) ipv specified in host 4) ipv specified in proto 5) ipv specified in default settings 6) ipv specified in $ENV{IPV} 7) default to IPv*

PORT

The port is the most important argument passed to the sub module classes and to Net::Server::Proto itself. For tcp, udp, and ssleay style ports, the form is generally host:port/protocol, [host]:port/protocol, host|port|protocol, host/port, or port. If host is a numerical IPv6 address it should be enclosed in square brackets to avoid ambiguity in parsing a port number, e.g.: [::1]:80. Separating with spaces, commas, or pipes is also allowed, e.g. ::1, 80. For unix sockets the form is generally socket_file|unix or socket_file.

To help overcome parsing ambiguity, it is also possible to pass port as a hashref (or as an array of hashrefs) of information such as:

port => { host => “localhost”, ipv => 6, # could also pass IPv6 (* is default) port => 20203, proto => tcp, }

If a hashref does not include host, ipv, or proto - it will use the default value supplied by the general configuration.

A socket protocol family PF_INET or PF_INET6 is derived from a specified address family of the binding address. A PF_INET socket can only accept IPv4 connections. A PF_INET6 socket accepts IPv6 connections, but may also accept IPv4 connections, depending on OS and its settings. For example, on FreeBSD systems setting a sysctl net.inet6.ip6.v6only to 0 will allow IPv4 connections to a PF_INET6 socket. By default on linux, binding to host [::] will accept IPv4 or IPv6 connections.

The Net::Server::Proto::object method returns a list of objects corresponding to created sockets. For Unix and INET sockets the list typically contains just one element, but may return multiple objects when multiple protocol families are allowed or when a host name resolves to multiple local binding addresses. This is particularly true when an ipv value of ‘*’ is passed in allowing hostname resolution.

You can see what Net::Server::Proto parsed out by looking at the logs to see what log_connect said. You could also include a post_bind_hook similar to the following to debug what happened:

sub post_bind_hook { my $self = shift; foreach my $sock ( @{ $self->{server}->{sock} } ){ $self->log(2,$sock->show); } }

Rather than try to explain further, please look at the following examples:

# example 1 #———————————- $port = “20203”; $def_host = “default-domain.com”; $def_proto = undef; $def_ipv = undef; @info = Net::Server::Proto->parse_info($port,$def_host,$def_proto,$def_ipv); # @info = { # host => default-domain.com, # port => 20203, # proto => tcp, # will use Net::Server::Proto::TCP # ipv => *, # IPv* # }; # example 2 #———————————- $port = “someother.com:20203”; $def_host = “default-domain.com”; $def_proto = “tcp”; $def_ipv = undef; @info = Net::Server::Proto->parse_info($port,$def_host,$def_proto,$def_ipv); # @info = { # host => someother.com, # port => 20203, # proto => tcp, # will use Net::Server::Proto::TCP # ipv => *, # }; # example 3 #———————————- $port = “someother.com:20203/udp”; $def_host = “default-domain.com”; $def_proto = “tcp”; $def_ipv = undef; @info = Net::Server::Proto->parse_info($port,$def_host,$def_proto,$def_ipv); # @info = { # host => someother.com, # port => 20203, # proto => udp, # will use Net::Server::Proto::UDP # ipv => *, # }; # example 4 #———————————- $port = “someother.com:20203/Net::Server::Proto::UDP”; $def_host = “default-domain.com”; $def_proto = “TCP”; $def_ipv = 4; @info = Net::Server::Proto->parse_info($port,$def_host,$def_proto,$def_ipv); # @info = { # host => someother.com, # port => 20203, # proto => Net::Server::Proto::UDP, # ipv => 4, # }; # example 5 #———————————- $port = “someother.com:20203/MyObject::TCP”; $def_host = “default-domain.com”; $def_proto = “tcp”; @info = Net::Server::Proto->parse_info($port,$def_host,$def_proto); # @info = { # host => someother.com, # port => 20203, # proto => MyObject::TCP, # }; # example 6 #———————————- $port = “/tmp/mysock.file|unix”; $def_host = “default-domain.com”; $def_proto = “tcp”; $def_ipv = undef; @info = Net::Server::Proto->parse_info($port,$def_host,$def_proto,$def_ipv); # @info = { # host => *, # irrelevant for UNIX socket # port => /tmp/mysock.file, # not really a port # proto => unix, # will use Net::Server::Proto::UNIX # ipv => *, # irrelevant for UNIX socket # }; # example 7 #———————————- $port = “/tmp/mysock.file|unixdgram”; $def_host = “default-domain.com”; $def_proto = “tcp”; $def_ipv = undef; @info = Net::Server::Proto->parse_info($port,$def_host,$def_proto,$def_ipv); # @info = { # host => *, # irrelevant for UNIX socket # port => /tmp/mysock.file, # not really a port # proto => unixdgram, # will use Net::Server::Proto::UNIXDGRAM # ipv => *, # irrelevant for UNIX socket # }; # example 8 #———————————- $port = “/tmp/mysock.file|SOCK_STREAM|unix”; # legacy $def_host = “”; $def_proto = “tcp”; $def_ipv = undef; @info = Net::Server::Proto->parse_info($port,$def_host,$def_proto,$def_ipv); # @info = { # host => *, # irrelevant for UNIX socket # port => /tmp/mysock.file, # not really a port # proto => unix, # will use Net::Server::Proto::UNIX # unix_type => SOCK_STREAM, # ipv => *, # irrelevant for UNIX socket # }; # example 9 #———————————- $port = “/tmp/mysock.file|SOCK_DGRAM|unix”; # legacy $def_host = “”; $def_proto = “tcp”; $def_ipv = undef; @info = Net::Server::Proto->parse_info($port,$def_host,$def_proto,$def_ipv); # @info = { # host => *, # irrelevant for UNIX socket # port => /tmp/mysock.file, # not really a port # proto => unix, # will use Net::Server::Proto::UNIXDGRAM # unix_type => SOCK_DGRAM, # ipv => *, # irrelevant for UNIX socket # }; # example 10 #———————————- $port = “someother.com:20203/ssleay”; $def_host = “default-domain.com”; $def_proto = “tcp”; $def_ipv = undef; @info = Net::Server::Proto->parse_info($port,$def_host,$def_proto,$def_ipv); # @info = { # host => someother.com, # port => 20203, # proto => ssleay, # will use Net::Server::Proto::SSLEAY # ipv => *, # }; # example 11 #———————————- $port = “[::1]:20203 ipv6 tcp”; $def_host = “default-domain.com”; $def_proto = “tcp”; $def_ipv = undef; @info = Net::Server::Proto->parse_info($port,$def_host,$def_proto,$def_ipv); # @info = { # host => ::1, # port => 20203, # proto => tcp, # will use Net::Server::Proto::TCP # ipv => 6, # }; # example 12 #———————————- $port = “[::1]:20203 tcp”; $def_host = “default-domain.com/IPv6”; $def_proto = “tcp”; $def_ipv = undef; @info = Net::Server::Proto->parse_info($port,$def_host,$def_proto,$def_ipv); # @info = { # host => ::1, # port => 20203, # proto => tcp, # will use Net::Server::Proto::TCP # ipv => 6, # }; # example 13 #———————————- $port = “[someother.com]:20203 ipv6 ipv4 tcp”; $def_host = “default-domain.com”; $def_proto = “tcp”; $def_ipv = undef; @info = Net::Server::Proto->parse_info($port,$def_host,$def_proto,$def_ipv); # @info = ({ # host => someother.com, # port => 20203, # proto => tcp, # will use Net::Server::Proto::TCP # ipv => 4, # }, { # host => someother.com, # port => 20203, # proto => tcp, # will use Net::Server::Proto::TCP # ipv => 6, # }); # example 14 #———————————- # depending upon your configuration $port = “localhost:20203”; $def_host = “default-domain.com”; $def_proto = “tcp”; $def_ipv = undef; @info = Net::Server::Proto->parse_info($port,$def_host,$def_proto,$def_ipv); # @info = ({ # host => 127.0.0.1, # port => 20203, # proto => tcp, # will use Net::Server::Proto::TCP # ipv => 4, # IPv4 # }, { # host => ::1, # port => 20203, # proto => tcp, # will use Net::Server::Proto::TCP # ipv => 6, # IPv6 # }); # example 15 #———————————- # depending upon your configuration $port = “localhost:20203”; $def_host = “default-domain.com IPv*”; $def_proto = “tcp”; $def_ipv = undef; @info = Net::Server::Proto->parse_info($port,$def_host,$def_proto,$def_ipv); # @info = ({ # host => 127.0.0.1, # port => 20203, # proto => tcp, # will use Net::Server::Proto::TCP # ipv => 4, # IPv4 # }, { # host => ::1, # port => 20203, # proto => tcp, # will use Net::Server::Proto::TCP # ipv => 6, # IPv6 # }); # example 16 #———————————- # depending upon your configuration $ENV{IPV} = 4; $port = “localhost:20203”; $def_host = “default-domain.com”; $def_proto = “tcp”; $def_ipv = undef; @info = Net::Server::Proto->parse_info($port,$def_host,$def_proto,$def_ipv); # @info = ({ # host => 127.0.0.1, # port => 20203, # proto => tcp, # will use Net::Server::Proto::TCP # ipv => 4, # IPv4 # });

LICENCE

Distributed under the same terms as Net::Server

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2639 - Linux cli command setpwent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setpwent and provides detailed information about the command setpwent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setpwent.

NAME 🖥️ setpwent 🖥️

get password file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <pwd.h>
struct passwd *getpwent(void);
void setpwent(void);
void endpwent(void);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getpwent(), setpwent(), endpwent():

    _XOPEN_SOURCE >= 500
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The getpwent() function returns a pointer to a structure containing the broken-out fields of a record from the password database (e.g., the local password file /etc/passwd, NIS, and LDAP). The first time getpwent() is called, it returns the first entry; thereafter, it returns successive entries.

The setpwent() function rewinds to the beginning of the password database.

The endpwent() function is used to close the password database after all processing has been performed.

The passwd structure is defined in <pwd.h> as follows:

struct passwd {
    char   *pw_name;       /* username */
    char   *pw_passwd;     /* user password */
    uid_t   pw_uid;        /* user ID */
    gid_t   pw_gid;        /* group ID */
    char   *pw_gecos;      /* user information */
    char   *pw_dir;        /* home directory */
    char   *pw_shell;      /* shell program */
};

When shadow(5) passwords are enabled (which is default on many GNU/Linux installations) the content of pw_passwd is usually not very useful. In such a case most passwords are stored in a separate file.

The variable pw_shell may be empty, in which case the system will execute the default shell (/bin/sh) for the user.

For more information about the fields of this structure, see passwd(5).

RETURN VALUE

The getpwent() function returns a pointer to a passwd structure, or NULL if there are no more entries or an error occurred. If an error occurs, errno is set to indicate the error. If one wants to check errno after the call, it should be set to zero before the call.

The return value may point to a static area, and may be overwritten by subsequent calls to getpwent(), getpwnam(3), or getpwuid(3). (Do not pass the returned pointer to free(3).)

ERRORS

EINTR
A signal was caught; see signal(7).

EIO
I/O error.

EMFILE
The per-process limit on the number of open file descriptors has been reached.

ENFILE
The system-wide limit on the total number of open files has been reached.

ENOMEM
Insufficient memory to allocate passwd structure.

ERANGE
Insufficient buffer space supplied.

FILES

/etc/passwd
local password database file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getpwent()

Thread safety

MT-Unsafe race:pwent race:pwentbuf locale

setpwent(), endpwent()

Thread safety

MT-Unsafe race:pwent locale

In the above table, pwent in race:pwent signifies that if any of the functions setpwent(), getpwent(), or endpwent() are used in parallel in different threads of a program, then data races could occur.

VERSIONS

The pw_gecos field is not specified in POSIX, but is present on most implementations.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4, 4.3BSD.

SEE ALSO

fgetpwent(3), getpw(3), getpwent_r(3), getpwnam(3), getpwuid(3), putpwent(3), shadow(5), passwd(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2640 - Linux cli command zip_file_add

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_file_add and provides detailed information about the command zip_file_add, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_file_add.

libzip (-lzip)

The function

adds a file to a zip archive, while

replaces an existing file in a zip archive. The argument

specifies the zip archive to which the file should be added.

is the file’s name in the zip archive (for

while

specifies which file should be replaced (for

The

argument can be any combination of

with one of

Overwrite any existing file of the same name. For

only.

Guess encoding of

(default).

Interpret

as UTF-8.

Interpret

as code page 437 (CP-437).

The data is obtained from the

argument, see

should not be called on a

after it was used successfully in a

or

call.

Upon successful completion,

returns the index of the new file in the archive, and

returns 0. Otherwise, -1 is returned and the error code in

is set to indicate the error.

zip_source_t *s; const char *buf=“teststring”;

if ((s=zip_source_buffer(archive, buf, sizeof(buf), 0)) == NULL || zip_file_add(archive, name, s, ZIP_FL_ENC_UTF_8) < 0) { zip_source_free(s); printf(“error adding file: %s “, zip_strerror(archive)); }

and

fail if:

There is already a file called

in the archive. (Only applies to

and only if

is not provided).

or

are

or

is invalid.

Required memory could not be allocated.

Archive was opened in read-only mode.

and

were added in libzip 0.11.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2641 - Linux cli command zip_source

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source and provides detailed information about the command zip_source, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source.

libzip (-lzip)

A

is a data source used by

for adding or replacing file contents for a file in a zip archive. If the source supports seeking, it can also be used to open zip archives from. It is created by calling one of

or

is reference counted, and created with a reference count of 1.

and

will decrement the reference count of the

when they are done using it, so

only needs to be called when these functions return an error. Use

to increase the reference count, for example if you need the source after

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2642 - Linux cli command initstate_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command initstate_r and provides detailed information about the command initstate_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the initstate_r.

NAME 🖥️ initstate_r 🖥️

reentrant random number generator

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int random_r(struct random_data *restrict buf,
 int32_t *restrict result);
int srandom_r(unsigned int seed, struct random_data *buf);
int initstate_r(unsigned int seed, char statebuf[restrict .statelen],
 size_t statelen, struct random_data *restrict buf);
int setstate_r(char *restrict statebuf,
 struct random_data *restrict buf);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

random_r(), srandom_r(), initstate_r(), setstate_r():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

These functions are the reentrant equivalents of the functions described in random(3). They are suitable for use in multithreaded programs where each thread needs to obtain an independent, reproducible sequence of random numbers.

The random_r() function is like random(3), except that instead of using state information maintained in a global variable, it uses the state information in the argument pointed to by buf, which must have been previously initialized by initstate_r(). The generated random number is returned in the argument result.

The srandom_r() function is like srandom(3), except that it initializes the seed for the random number generator whose state is maintained in the object pointed to by buf, which must have been previously initialized by initstate_r(), instead of the seed associated with the global state variable.

The initstate_r() function is like initstate(3) except that it initializes the state in the object pointed to by buf, rather than initializing the global state variable. Before calling this function, the buf.state field must be initialized to NULL. The initstate_r() function records a pointer to the statebuf argument inside the structure pointed to by buf. Thus, statebuf should not be deallocated so long as buf is still in use. (So, statebuf should typically be allocated as a static variable, or allocated on the heap using malloc(3) or similar.)

The setstate_r() function is like setstate(3) except that it modifies the state in the object pointed to by buf, rather than modifying the global state variable. state must first have been initialized using initstate_r() or be the result of a previous call of setstate_r().

RETURN VALUE

All of these functions return 0 on success. On error, -1 is returned, with errno set to indicate the error.

ERRORS

EINVAL
A state array of less than 8 bytes was specified to initstate_r().

EINVAL
The statebuf or buf argument to setstate_r() was NULL.

EINVAL
The buf or result argument to random_r() was NULL.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

random_r(), srandom_r(), initstate_r(), setstate_r()

Thread safetyMT-Safe race:buf

STANDARDS

GNU.

BUGS

The initstate_r() interface is confusing. It appears that the random_data type is intended to be opaque, but the implementation requires the user to either initialize the buf.state field to NULL or zero out the entire structure before the call.

SEE ALSO

drand48(3), rand(3), random(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2643 - Linux cli command Mail_Addresspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Mail_Addresspm and provides detailed information about the command Mail_Addresspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Mail_Addresspm.

NAME 🖥️ Mail_Addresspm 🖥️

parse mail addresses

SYNOPSIS

use Mail::Address; my @addrs = Mail::Address->parse($line); foreach $addr (@addrs) { print $addr->format," “; }

DESCRIPTION

Mail::Address extracts and manipulates email addresses from a message header. It cannot be used to extract addresses from some random text. You can use this module to create RFC822 compliant fields.

Although Mail::Address is a very popular subject for books, and is used in many applications, it does a very poor job on the more complex message fields. It does only handle simple address formats (which covers about 95% of what can be found). Problems are with

  • no support for address groups, even not with the semi-colon as separator between addresses;

  • limited support for escapes in phrases and comments. There are cases where it can get wrong; and

  • you have to take care of most escaping when you create an address yourself: Mail::Address does not do that for you.

Often requests are made to the maintainers of this code improve this situation, but this is not a good idea, where it will break zillions of existing applications. If you wish for a fully RFC2822 compliant implementation you may take a look at Mail::Message::Field::Full, part of MailBox.

. Example

my $s = Mail::Message::Field::Full->new($from_header); # ref $s isa Mail::Message::Field::Addresses; my @g = $s->groups; # all groups, at least one # ref $g[0] isa Mail::Message::Field::AddrGroup; my $ga = $g[0]->addresses; # group addresses my @a = $s->addresses; # all addresses # ref $a[0] isa Mail::Message::Field::Address;

METHODS

Constructors

Mail::Address->new( $phrase, $address, [ $comment ] )
Create a new Mail::Address object which represents an address with the elements given. In a message these 3 elements would be seen like: PHRASE <ADDRESS> (COMMENT) ADDRESS (COMMENT) example: Mail::Address->new(“Perl5 Porters”, “[email protected]”);

$obj->parse($line)
Parse the given line a return a list of extracted Mail::Address objects. The line would normally be one taken from a To,Cc or Bcc line in a message example: my @addr = Mail::Address->parse($line);

Accessors

$obj->address()
Return the address part of the object.

$obj->comment()
Return the comment part of the object

$obj->format(@addresses)
Return a string representing the address in a suitable form to be placed on a To, Cc, or Bcc line of a message. This method is called on the first address to be used; other specified addresses will be appended, separated by commas.

$obj->phrase()
Return the phrase part of the object.

Smart accessors

$obj->host()
Return the address excluding the user id and ‘@’

$obj->name()
Using the information contained within the object attempt to identify what the person or groups name is. Note: This function tries to be smart with the “phrase” of the email address, which is probably a very bad idea. Consider to use phrase() itself.

$obj->user()
Return the address excluding the ‘@’ and the mail domain

SEE ALSO

This module is part of the MailTools distribution, http://perl.overmeer.net/mailtools/.

AUTHORS

The MailTools bundle was developed by Graham Barr. Later, Mark Overmeer took over maintenance without commitment to further development.

Mail::Cap by Gisle Aas <[email protected]>. Mail::Field::AddrList by Peter Orbaek <[email protected]>. Mail::Mailer and Mail::Send by Tim Bunce <[email protected]>. For other contributors see ChangeLog.

LICENSE

Copyrights 1995-2000 Graham Barr <[email protected]> and 2001-2017 Mark Overmeer <[email protected]>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2644 - Linux cli command mcheck

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mcheck and provides detailed information about the command mcheck, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mcheck.

NAME 🖥️ mcheck 🖥️

heap consistency checking

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <mcheck.h>
int mcheck(void (*abortfunc)(enum mcheck_status mstatus));
int mcheck_pedantic(void (*abortfunc)(enum mcheck_status mstatus));
void mcheck_check_all(void);
enum mcheck_status mprobe(void *ptr);

DESCRIPTION

The mcheck() function installs a set of debugging hooks for the malloc(3) family of memory-allocation functions. These hooks cause certain consistency checks to be performed on the state of the heap. The checks can detect application errors such as freeing a block of memory more than once or corrupting the bookkeeping data structures that immediately precede a block of allocated memory.

To be effective, the mcheck() function must be called before the first call to malloc(3) or a related function. In cases where this is difficult to ensure, linking the program with -lmcheck inserts an implicit call to mcheck() (with a NULL argument) before the first call to a memory-allocation function.

The mcheck_pedantic() function is similar to mcheck(), but performs checks on all allocated blocks whenever one of the memory-allocation functions is called. This can be very slow!

The mcheck_check_all() function causes an immediate check on all allocated blocks. This call is effective only if mcheck() is called beforehand.

If the system detects an inconsistency in the heap, the caller-supplied function pointed to by abortfunc is invoked with a single argument, mstatus, that indicates what type of inconsistency was detected. If abortfunc is NULL, a default function prints an error message on stderr and calls abort(3).

The mprobe() function performs a consistency check on the block of allocated memory pointed to by ptr. The mcheck() function should be called beforehand (otherwise mprobe() returns MCHECK_DISABLED).

The following list describes the values returned by mprobe() or passed as the mstatus argument when abortfunc is invoked:

MCHECK_DISABLED (mprobe() only)
mcheck() was not called before the first memory allocation function was called. Consistency checking is not possible.

MCHECK_OK (mprobe() only)
No inconsistency detected.

MCHECK_HEAD
Memory preceding an allocated block was clobbered.

MCHECK_TAIL
Memory following an allocated block was clobbered.

MCHECK_FREE
A block of memory was freed twice.

RETURN VALUE

mcheck() and mcheck_pedantic() return 0 on success, or -1 on error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mcheck(), mcheck_pedantic(), mcheck_check_all(), mprobe()

Thread safety

MT-Unsafe race:mcheck const:malloc_hooks

STANDARDS

GNU.

HISTORY

mcheck_pedantic()
mcheck_check_all()
glibc 2.2.

mcheck()
mprobe()
glibc 2.0.

NOTES

Linking a program with -lmcheck and using the MALLOC_CHECK_ environment variable (described in mallopt(3)) cause the same kinds of errors to be detected. But, using MALLOC_CHECK_ does not require the application to be relinked.

EXAMPLES

The program below calls mcheck() with a NULL argument and then frees the same block of memory twice. The following shell session demonstrates what happens when running the program:

$ ./a.out
About to free
About to free a second time
block freed twice
Aborted (core dumped)

Program source

#include <mcheck.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    char *p;
    if (mcheck(NULL) != 0) {
        fprintf(stderr, "mcheck() failed

“); exit(EXIT_FAILURE); } p = malloc(1000); fprintf(stderr, “About to free “); free(p); fprintf(stderr, " About to free a second time “); free(p); exit(EXIT_SUCCESS); }

SEE ALSO

malloc(3), mallopt(3), mtrace(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2645 - Linux cli command Moose_Manual_Supportpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Manual_Supportpm and provides detailed information about the command Moose_Manual_Supportpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Manual_Supportpm.

NAME 🖥️ Moose_Manual_Supportpm 🖥️

Policies regarding support, releases, and compatibility.

VERSION

version 2.2207

SUPPORT POLICY

There are two principles to Moose’s policy of supported behavior.

  1. Moose favors correctness over everything.

  2. Moose supports documented and tested behavior, not accidental behavior or side effects.

If a behavior has never been documented or tested, the behavior is officially undefined. Relying upon undocumented and untested behavior is done at your own risk.

If a behavior is documented or tested but found to be incorrect later, the behavior will go through a deprecation period. During the deprecation period, use of that feature will cause a warning. Eventually, the deprecated feature will be removed.

In some cases, it is not possible to deprecate a behavior. In this case, the behavior will simply be changed in a major release.

RELEASE SCHEDULE

Moose is on a system of quarterly major releases, with minor releases as needed between major releases. A minor release is defined as one that makes every attempt to preserve backwards compatibility. Currently this means that we did not introduce any new dependency conflicts, and that we did not make any changes to documented or tested behavior (this typically means that minor releases will not change any existing tests in the test suite, although they can add new ones). A minor release can include new features and bug fixes.

Major releases may be backwards incompatible. Moose prioritizes correctness over backwards compatibility or performance; see the DEPRECATION POLICY to understand how backwards incompatible changes are announced.

Major releases are scheduled to happen during fixed release windows. If the window is missed, then there will not be a major release until the next release window. The release windows are one month long, and occur during the months of January, April, July, and October.

Before a major release, a series of development releases will be made so that users can test the upcoming major release before it is distributed to CPAN. It is in the best interests of everyone involved if these releases are tested as widely as possible.

DEPRECATION POLICY

Moose has always prioritized correctness over performance and backwards compatibility.

Major deprecations or API changes are documented in the Changes file as well as in Moose::Manual::Delta. The Moose developers will also make an effort to warn users of upcoming deprecations and breakage through the Moose blog (http://blog.moose.perl.org).

Deprecated APIs will be preserved for at least one year after the major release which deprecates that API. Deprecated APIs will only be removed in a major release.

Moose will also warn during installation if the version of Moose being installed will break an installed dependency. Unfortunately, due to the nature of the Perl install process these warnings may be easy to miss.

BACKWARDS COMPATIBILITY

We try to ensure compatibility by having a extensive test suite (last count over 18000 tests), as well as testing a number of packages (currently just under 100 packages) that depend on Moose before any release.

The current list of downstream dependencies that are tested is in xt/author/test-my-dependents.t.

VERSION NUMBERS

Moose version numbers consist of three parts, in the form X.YYZZ. The X is the “special magic number” that only gets changed for really big changes. Think of this as being like the “5” in Perl 5.12.1.

The YY portion is the major version number. Moose uses even numbers for stable releases, and odd numbers for trial releases. The ZZ is the minor version, and it simply increases monotonically. It starts at “00” each time a new major version is released.

Semantically, this means that any two releases which share a major version should be API-compatible with each other. In other words, 2.0200, 2.0201, and 2.0274 are all API-compatible.

Prior to version 2.0, Moose version numbers were monotonically incrementing two decimal values (0.01, 0.02, … 1.11, 1.12, etc.).

Moose was declared production ready at version 0.18 (via <http://www.perlmonks.org/?node_id=608144>).

PERL VERSION COMPATIBILITY

As of version 2.16, Moose will officially support being run on perl 5.10.1+. Our current policy is to support the earliest version of Perl shipped in the latest stable release of any major operating system (this tends to mean CentOS). We will provide at least six months notice (two major releases) when we decide to increase the officially supported Perl version.

“Officially supported” does not mean that these are the only versions of Perl that Moose will work with. Our declared perl dependency will remain at 5.8.3 as long as our test suite continues to pass on 5.8.3. What this does mean is that the core Moose dev team will not be spending any time fixing bugs on versions that aren’t officially supported, and new contributions will not be rejected due to being incompatible with older versions of perl except in the most trivial of cases. We will, however, still welcome patches to make Moose compatible with earlier versions, if other people are still interested in maintaining compatibility. As such, the current minimum required version of 5.8.3 will remain for as long as downstream users are happy to assist with maintenance.

Note that although performance regressions are acceptable in order to maintain backwards compatibility (as long as they only affect the older versions), functionality changes and buggy behavior will not be. If it becomes impossible to provide identical functionality between modern Perl versions and unsupported Perl versions, we will increase our declared perl dependency instead.

CONTRIBUTING

Moose has an open contribution policy. Anybody is welcome to submit a patch. Please see Moose::Manual::Contributing for more details.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2646 - Linux cli command Net_DNS_RR_DNSKEYpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_DNSKEYpm and provides detailed information about the command Net_DNS_RR_DNSKEYpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_DNSKEYpm.

NAME 🖥️ Net_DNS_RR_DNSKEYpm 🖥️

DNS DNSKEY resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name DNSKEY flags protocol algorithm publickey);

DESCRIPTION

Class for DNSSEC Key (DNSKEY) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

flags

$flags = $rr->flags; $rr->flags( $flags );

Unsigned 16-bit number representing Boolean flags.

zone
$rr->zone(1); if ( $rr->zone ) { … } Boolean ZONE flag.

revoke
$rr->revoke(1); if ( $rr->revoke ) { … } Boolean REVOKE flag.

sep
$rr->sep(1); if ( $rr->sep ) { … } Boolean Secure Entry Point (SEP) flag.

protocol

$protocol = $rr->protocol; $rr->protocol( $protocol );

The 8-bit protocol number. This field MUST have value 3.

algorithm

$algorithm = $rr->algorithm; $rr->algorithm( $algorithm );

The 8-bit algorithm number describes the public key algorithm.

algorithm() may also be invoked as a class method or simple function to perform mnemonic and numeric code translation.

publickey

key

$key = $rr->key; $rr->key( $key );

Base64 representation of the public key material.

keybin

$keybin = $rr->keybin; $rr->keybin( $keybin );

Opaque octet string representing the public key material.

privatekeyname

$privatekeyname = $rr->privatekeyname;

Returns the name of the privatekey as it would be generated by the BIND dnssec-keygen program. The format of that name being:

K<fqdn>+<algorithm>+<keyid>.private

signame

Returns the canonical signer name of the privatekey.

keylength

Returns the length (in bits) of the modulus calculated from the key text.

keytag

print “keytag = “, $rr->keytag, " “;

Returns the 16-bit numerical key tag of the key. (RFC2535 4.1.6)

COPYRIGHT

Copyright (c)2003-2005 RIPE NCC. Author Olaf M. Kolkman

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC4034 (2) <https://iana.org/go/rfc4034#section-2>

DNSKEY Flags <https://www.iana.org/assignments/dnskey-flags>

Algorithm Numbers <https://iana.org/assignments/dns-sec-alg-numbers>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2647 - Linux cli command pcap_geterrpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_geterrpcap and provides detailed information about the command pcap_geterrpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_geterrpcap.

NAME 🖥️ pcap_geterrpcap 🖥️

get or print libpcap error message text

SYNOPSIS

#include <pcap/pcap.h>
char *pcap_geterr(pcap_t *p);
void pcap_perror(pcap_t *p, const char *prefix);

DESCRIPTION

pcap_geterr() returns the error text pertaining to the last pcap library error. NOTE: the pointer it returns will no longer point to a valid error message string after the pcap_t passed to it is closed; you must use or copy the string before closing the pcap_t.

pcap_perror() prints the text of the last pcap library error on stderr, prefixed by prefix.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2648 - Linux cli command Tk_Errorpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Errorpm and provides detailed information about the command Tk_Errorpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Errorpm.

NAME 🖥️ Tk_Errorpm 🖥️

Method invoked to process background errors

SYNOPSIS

Customization:

require Tk::ErrorDialog;

or

sub Tk::Error { my ($widget,$error,@locations) = @_; … }

DESCRIPTION

The Tk::Error method is invoked by perl/Tk when a background error occurs. Two possible implementations are provided in the distribution and individual applications or users can (re)define a Tk::Error method (e.g. as a perl sub) if they wish to handle background errors in some other manner.

A background error is one that occurs in a command that didn’t originate with the application. For example, if an error occurs while executing a callback specified with a bind or a after command, then it is a background error. For a non-background error, the error can simply be returned up through nested subroutines until it reaches the top-level code in the application; then the application can report the error in whatever way it wishes. When a background error occurs, the unwinding ends in the Tk library and there is no obvious way for Tk to report the error.

When Tk detects a background error, it saves information about the error and invokes the Tk::Error method later when Tk is idle.

Tk::Error is invoked by perl/Tk as if by the perl code:

$mainwindow->Tk::Error(“error message”, location …);

$mainwindow is the MainWindow associated with widget which detected the error, “error message” is a string describing the error that has been detected, location is a list of one or more “locations” which describe the call sequence at the point the error was detected.

The locations are a typically a mixture of perl location reports giving script name and line number, and simple strings describing locations in core Tk or perl/Tk C code.

Tk will ignore any result returned by the Tk::Error method. If another error occurs within the Tk::Error method (for example if it calls die) then Tk reports this error itself by writing a message to stderr (this is to avoid infinite loops due to any bugs in Tk::Error).

If several background errors accumulate before Tk::Error is invoked to process them, Tk::Error will be invoked once for each error, in the order they occurred. However, if Tk::Error calls Tk->break, then any remaining errors are skipped without calling Tk::Error.

The Tk module includes a default Tk::Error subroutine that simply reports the error on stderr.

Tk::ErrorDialog

An alternate definition is provided via:

require Tk::ErrorDialog;

that posts a dialog box containing the error message and offers the user a chance to see a stack trace showing where the error occurred.

This is an OO implementation of the Tcl/Tk command bgerror, with a twist: since there is only one ErrorDialog widget, you aren’t required to invoke the constructor to create it; it will be created automatically when the first background error occurs. However, in order to configure the -cleanupcode and -appendtraceback ErrorDialog options you must call the constructor and create it manually.

The ErrorDialog object essentially consists of two subwidgets: a Dialog widget to display the background error and a Text widget for the traceback information. If required, you can invoke various widget methods to customize these subwidgets - their advertised names are described below.

$mw->ErrorDialog(-cleanupcode => code, -appendtraceback => bool);

$mw is a window reference.

code is a CODE reference if special post-background error processing is required (default is undefined). The callback subroutine is called with @_ having the same arguments that Tk::Error was invoked with.

bool is a boolean indicating whether or not to append successive tracebacks (default is 1, do append).

Advertised ErrorDialog widgets

error_dialog is the Dialog widget reference.

text is the Text widget reference containing the traceback information.

BUGS

If after or fileevent are not invoked as methods of a widget then perl/Tk is unable to provide a $mainwindow argument. To support such code from earlier versions of perl/Tk perl/Tk therefore calls Tk::Error with string ‘Tk’ instead: **Tk->Tk::Error...**. In this case the Tk::Error in Tk::ErrorDialog and similar implementations cannot “popup” a window as they don’t know which display to use. A mechanism to supply the MainWindow in applications which only have one (a very common case) should be provided.

SEE ALSO

Tk::bind Tk::after Tk::fileevent

KEYWORDS

background error, reporting

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2649 - Linux cli command mq_unlink

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mq_unlink and provides detailed information about the command mq_unlink, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mq_unlink.

NAME 🖥️ mq_unlink 🖥️

remove a message queue

LIBRARY

Real-time library (librt, -lrt)

SYNOPSIS

#include <mqueue.h>
int mq_unlink(const char *name);

DESCRIPTION

mq_unlink() removes the specified message queue name. The message queue name is removed immediately. The queue itself is destroyed once any other processes that have the queue open close their descriptors referring to the queue.

RETURN VALUE

On success mq_unlink() returns 0; on error, -1 is returned, with errno set to indicate the error.

ERRORS

EACCES
The caller does not have permission to unlink this message queue.

ENAMETOOLONG
name was too long.

ENOENT
There is no message queue with the given name.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mq_unlink()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

SEE ALSO

mq_close(3), mq_getattr(3), mq_notify(3), mq_open(3), mq_receive(3), mq_send(3), mq_overview(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2650 - Linux cli command qgcvt

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command qgcvt and provides detailed information about the command qgcvt, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the qgcvt.

NAME 🖥️ qgcvt 🖥️

convert a floating-point number to a string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
[[deprecated]] char *qecvt(long double number, int ndigits,
 int *restrict decpt, int *restrict sign);
[[deprecated]] char *qfcvt(long double number, int ndigits,
 int *restrict decpt, int *restrict sign);
[[deprecated]] char *qgcvt(long double number, int ndigit, char *buf);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

qecvt(), qfcvt(), qgcvt():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    In glibc up to and including 2.19:
        _SVID_SOURCE

DESCRIPTION

The functions qecvt(), qfcvt(), and qgcvt() are identical to ecvt(3), fcvt(3), and gcvt(3) respectively, except that they use a long double argument number. See ecvt(3) and gcvt(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

qecvt()

Thread safetyMT-Unsafe race:qecvt

qfcvt()

Thread safetyMT-Unsafe race:qfcvt

qgcvt()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

SVr4, SunOS, GNU.

These functions are obsolete. Instead, snprintf(3) is recommended.

SEE ALSO

ecvt(3), ecvt_r(3), gcvt(3), sprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2651 - Linux cli command zip_source_zip

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_zip and provides detailed information about the command zip_source_zip, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_zip.

libzip (-lzip)

The function

creates a zip source from a file in a zip archive. The

argument is the (open) zip archive containing the source zip file at index

bytes from offset

will be used in the zip_source. If

is 0 or -1, the rest of the file, starting from

is used. If

is zero and

is -1, the whole file will be copied without decompressing it.

Supported flags are:

Try to get the original data without any changes that may have been made to

after opening it.

When adding the data from

re-compress it using the current settings instead of copying the compressed data.

Upon successful completion, the created source is returned. Otherwise,

is returned and the error code in

is set to indicate the error.

fails if:

Unchanged data was requested, but it is not available.

or

are invalid.

Required memory could not be allocated.

Additionally, it can return all error codes from

and

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2652 - Linux cli command Moose_Meta_TypeCoercion_Unionpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_TypeCoercion_Unionpm and provides detailed information about the command Moose_Meta_TypeCoercion_Unionpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_TypeCoercion_Unionpm.

NAME 🖥️ Moose_Meta_TypeCoercion_Unionpm 🖥️

The Moose Type Coercion metaclass for Unions

VERSION

version 2.2207

DESCRIPTION

This is a subclass of Moose::Meta::TypeCoercion that is used for Moose::Meta::TypeConstraint::Union objects.

METHODS

$coercion->has_coercion_for_type

This method always returns false.

$coercion->add_type_coercions

This method always throws an error. You cannot add coercions to a union type coercion.

$coercion->coerce($value)

This method will coerce by trying the coercions for each type in the union.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2653 - Linux cli command revtwowayam

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command revtwowayam and provides detailed information about the command revtwowayam, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the revtwowayam.

NAME 🖥️ revtwowayam 🖥️

Reverse strings sample two-way processor extension

SYNOPSIS

@load “revtwoway”

BEGIN {
    cmd = "/magic/mirror"
    print "hello, world" |& cmd
    cmd |& getline result
    print result
    close(cmd)
}

DESCRIPTION

The revtwoway extension adds a simple two-way processor that reverses the characters in each line sent to it for reading back by the AWK program. It’s main purpose is to show how to write a two-way extension, although it may also be mildly amusing.

SEE ALSO

GAWK: Effective AWK Programming, filefuncs(3am), fnmatch(3am), fork(3am), inplace(3am), ordchr(3am), readdir(3am), readfile(3am), revoutput(3am), rwarray(3am), time(3am).

AUTHOR

Arnold Robbins, [email protected].

COPYING PERMISSIONS

Copyright © 2012, 2013, 2018, Free Software Foundation, Inc.

Permission is granted to make and distribute verbatim copies of this manual page provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to process this file through troff and print the results, provided the printed document carries copying permission notice identical to this one except for the removal of this paragraph (this paragraph not being relevant to the printed manual page).

Permission is granted to copy and distribute modified versions of this manual page under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual page into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2654 - Linux cli command STAILQ_HEAD_INITIALIZER

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command STAILQ_HEAD_INITIALIZER and provides detailed information about the command STAILQ_HEAD_INITIALIZER, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the STAILQ_HEAD_INITIALIZER.

NAME 🖥️ STAILQ_HEAD_INITIALIZER 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2655 - Linux cli command HTML_Form_SubmitInputpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_Form_SubmitInputpm and provides detailed information about the command HTML_Form_SubmitInputpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_Form_SubmitInputpm.

NAME 🖥️ HTML_Form_SubmitInputpm 🖥️

An HTML form submit input element for use with HTML::Form

VERSION

version 6.11

AUTHOR

Gisle Aas <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 1998 by Gisle Aas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2656 - Linux cli command Image_ExifTool_WriteQuickTimepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_WriteQuickTimepm and provides detailed information about the command Image_ExifTool_WriteQuickTimepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_WriteQuickTimepm.

NAME 🖥️ Image_ExifTool_WriteQuickTimepm 🖥️

Write XMP to QuickTime (MOV and MP4) files

SYNOPSIS

These routines are autoloaded by Image::ExifTool::QuickTime.

DESCRIPTION

This file contains routines used by ExifTool to write XMP metadata to QuickTime-based file formats like MOV and MP4.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Image::ExifTool::QuickTime (3pm), Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2657 - Linux cli command zip_file_set_encryption

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_file_set_encryption and provides detailed information about the command zip_file_set_encryption, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_file_set_encryption.

libzip (-lzip)

The

function sets the encryption method for the file at position

in the zip archive to

using the password

The

is the same as returned by

For the

argument, currently only the following values are supported:

No encryption.

Winzip AES-128 encryption.

Winzip AES-192 encryption.

Winzip AES-256 encryption.

Traditional PKWare encryption. Do not use this method, it is not secure. It is only provided for backwards compatibility.

If

is

the default password provided by

is used.

The current encryption method for a file in a zip archive can be determined using

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

fails if:

Unsupported compression method requested.

is not a valid file index in

or the argument combination is invalid.

Required memory could not be allocated.

Read-only zip file, no changes allowed.

was added in libzip 1.2.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2658 - Linux cli command Net_DBus_BaseObjectpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_BaseObjectpm and provides detailed information about the command Net_DBus_BaseObjectpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_BaseObjectpm.

NAME 🖥️ Net_DBus_BaseObjectpm 🖥️

base class for exporting objects to the bus

SYNOPSIS

# Were going to be a DBus object use base qw(Net::DBus::BaseObject); # Export a Greeting signal taking a stringl string parameter dbus_signal(“Greeting”, [“string”]); # Export Hello as a method accepting a single string # parameter, and returning a single string value dbus_method(“Hello”, [“string”], [“string”]); sub new { my $class = shift; my $service = shift; my $self = $class->SUPER::new($service, “/org/demo/HelloWorld”); bless $self, $class; return $self; } sub _dispatch_object { my $self = shift; my $connection = shift; my $message = shift; if (….$message refers to a objects method … ) { …dispatch this objects interfaces/methods… return $reply; } }

DESCRIPTION

This the base of all objects which are exported to the message bus. It provides the core support for type introspection required for objects exported to the message. When sub-classing this object, the _dispatch object should be implemented to handle processing of incoming messages. The Net::DBus::Exporter module is used to declare which methods (and signals) are being exported to the message bus.

All packages inheriting from this, will automatically have the interface org.freedesktop.DBus.Introspectable registered with Net::DBus::Exporter, and the Introspect method within this exported.

Application developers will rarely want to use this class directly, instead either Net::DBus::Object or Net::DBus::ProxyObject are the common choices. This class will only be used if wanting to write a new approach to dispatching incoming method calls.

METHODS

my $object = Net::DBus::BaseObject->new($service, $path)
This creates a new DBus object with an path of $path registered within the service $service. The $path parameter should be a string complying with the usual DBus requirements for object paths, while the $service parameter should be an instance of Net::DBus::Service. The latter is typically obtained by calling the export_service method on the Net::DBus object.

my $object = Net::DBus::BaseObject->new($parentobj, $subpath)
This creates a new DBus child object with an path of $subpath relative to its parent $parentobj. The $subpath parameter should be a string complying with the usual DBus requirements for object paths, while the $parentobj parameter should be an instance of Net::DBus::BaseObject.

$object->disconnect();
This method disconnects the object from the bus, such that it will no longer receive messages sent by other clients. Any child objects will be recursively disconnected too. After an object has been disconnected, it is possible for Perl to garbage collect the object instance. It will also make it possible to connect a newly created object to the same path.

my $bool = $object->is_connected
Returns a true value if the object is connected to the bus, and thus capable of being accessed by remote clients. Returns false if the object is disconnected & thus ready for garbage collection. All objects start off in the connected state, and will only transition if the disconnect method is called.

my $service = $object->get_service
Retrieves the Net::DBus::Service object within which this object is exported.

my $path = $object->get_object_path
Retrieves the path under which this object is exported

$object->emit_signal_in($name, $interface, $client, @args);
Emits a signal from the object, with a name of $name. If the $interface parameter is defined, the signal will be scoped within that interface. If the $client parameter is defined, the signal will be unicast to that client on the bus. The signal and the data types of the arguments @args must have been registered with Net::DBus::Exporter by calling the dbus_signal method.

$self->emit_signal_to($name, $client, @args);
Emits a signal from the object, with a name of $name. The signal and the data types of the arguments @args must have been registered with Net::DBus::Exporter by calling the dbus_signal method. The signal will be sent only to the client named by the $client parameter.

$self->emit_signal($name, @args);
Emits a signal from the object, with a name of $name. The signal and the data types of the arguments @args must have been registered with Net::DBus::Exporter by calling the dbus_signal method. The signal will be broadcast to all clients on the bus.

$object->connect_to_signal_in($name, $interface, $coderef);
Connects a callback to a signal emitted by the object. The $name parameter is the name of the signal within the object, and $coderef is a reference to an anonymous subroutine. When the signal $name is emitted by the remote object, the subroutine $coderef will be invoked, and passed the parameters from the signal. The $interface parameter is used to specify the explicit interface defining the signal to connect to.

$object->connect_to_signal($name, $coderef);
Connects a callback to a signal emitted by the object. The $name parameter is the name of the signal within the object, and $coderef is a reference to an anonymous subroutine. When the signal $name is emitted by the remote object, the subroutine $coderef will be invoked, and passed the parameters from the signal.

$reply = $object->_dispatch_object($connection, $message);
The _dispatch_object method is to be used to handle dispatch of methods implemented by the object. The default implementation is a no-op and should be overridden by subclasses todo whatever processing is required. If the $message could be handled then another Net::DBus::Binding::Message instance should be returned for the reply. If undef is returned, then a generic error will be returned to the caller.

$currvalue = $object->_dispatch_property($name); =item $object->_dispatch_property($name, $newvalue);
The _dispatch_property method is to be used to handle dispatch of property reads and writes. The $name parameter is the name of the property being accessed. If $newvalue is supplied then the property is to be updated, otherwise the current value is to be returned. The default implementation will simply raise an error, so must be overridden in subclasses.

AUTHOR

Daniel P. Berrange

COPYRIGHT

Copyright (C) 2005-2011 Daniel P. Berrange

SEE ALSO

Net::DBus, Net::DBus::Service, Net::DBus::Object, Net::DBus::ProxyObject, Net::DBus::Exporter, Net::DBus::RemoteObject

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2659 - Linux cli command Net_SSLeaypm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_SSLeaypm and provides detailed information about the command Net_SSLeaypm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_SSLeaypm.

NAME 🖥️ Net_SSLeaypm 🖥️

Perl bindings for OpenSSL and LibreSSL

SYNOPSIS

use Net::SSLeay qw(get_https post_https sslcat make_headers make_form); ($page) = get_https(www.bacus.pt, 443, /); # Case 1 ($page, $response, %reply_headers) = get_https(www.bacus.pt, 443, /, # Case 2 make_headers(User-Agent => Cryptozilla/5.0b1, Referer => https://www.bacus.pt) ); ($page, $result, %headers) # Case 2b = get_https(www.bacus.pt, 443, /protected.html, make_headers(Authorization => Basic . MIME::Base64::encode("$user:$pass",)) ); ($page, $response, %reply_headers) = post_https(www.bacus.pt, 443, /foo.cgi, , # Case 3 make_form(OK => 1, name => Sampo) ); $reply = sslcat($host, $port, $request); # Case 4 ($reply, $err, $server_cert) = sslcat($host, $port, $request); # Case 5 $Net::SSLeay::trace = 2; # 0=no debugging, 1=ciphers, 2=trace, 3=dump data Net::SSLeay::initialize(); # Initialize ssl library once

DESCRIPTION

This module provides Perl bindings for libssl (an SSL/TLS API) and libcrypto (a cryptography API).

COMPATIBILITY

Net::SSLeay supports the following libssl implementations:

  • Any stable release of OpenSSL <https://www.openssl.org> in the 0.9.8 - 3.2 branches, except for OpenSSL 0.9.8 - 0.9.8b.

  • Any stable release of LibreSSL <https://www.libressl.org> in the 2.0 - 3.8 series, except for LibreSSL 3.2.2 and 3.2.3.

Net::SSLeay may not function as expected with releases other than the ones listed above due to libssl API incompatibilities, or, in the case of LibreSSL, because of deviations from the libssl API.

Net::SSLeay is only as secure as the underlying libssl implementation you use. Although Net::SSLeay maintains compatibility with old versions of OpenSSL and LibreSSL, it is strongly recommended that you use a version of OpenSSL or LibreSSL that is supported by the OpenSSL/LibreSSL developers and/or your operating system vendor. Many unsupported versions of OpenSSL and LibreSSL are known to contain severe security vulnerabilities. Refer to the OpenSSL Release Strategy <https://www.openssl.org/policies/releasestrat.html> and LibreSSL Support Schedule <https://www.libressl.org/releases.html> for information on which versions are currently supported.

The libssl API has changed significantly since OpenSSL 0.9.8: hundreds of functions have been added, deprecated or removed in the intervening versions. Although this documentation lists all of the functions and constants that Net::SSLeay may expose, they will not be available for use if they are missing from the underlying libssl implementation. Refer to the compatibility notes in this documentation, as well as the OpenSSL/LibreSSL manual pages, for information on which OpenSSL/LibreSSL versions support each function or constant. At run-time, you can check whether a function or constant is exposed before calling it using the following convention:

if ( defined &Net::SSLeay::libssl_function ) { # libssl_function() (or SSL_libssl_function()) is available Net::SSLeay::libssl_function(…); }

OVERVIEW

Net::SSLeay module basically comprise of:

  • High level functions for accessing web servers (by using HTTP/HTTPS)

  • Low level API (mostly mapped 1:1 to openssl’s C functions)

  • Convenience functions (related to low level API but with more perl friendly interface)

There is also a related module called Net::SSLeay::Handle included in this distribution that you might want to use instead. It has its own pod documentation.

High level functions for accessing web servers

This module offers some high level convenience functions for accessing web pages on SSL servers (for symmetry, the same API is offered for accessing http servers, too), an sslcat() function for writing your own clients, and finally access to the SSL api of the SSLeay/OpenSSL package so you can write servers or clients for more complicated applications.

For high level functions it is most convenient to import them into your main namespace as indicated in the synopsis.

Basic set of functions

  • get_https

  • post_https

  • put_https

  • head_https

  • do_https

  • sslcat

  • https_cat

  • make_form

  • make_headers

Case 1 (in SYNOPSIS) demonstrates the typical invocation of get_https() to fetch an HTML page from secure server. The first argument provides the hostname or IP in dotted decimal notation of the remote server to contact. The second argument is the TCP port at the remote end (your own port is picked arbitrarily from high numbered ports as usual for TCP). The third argument is the URL of the page without the host name part. If in doubt consult the HTTP specifications at <https://www.w3c.org>.

Case 2 (in SYNOPSIS) demonstrates full fledged use of get_https(). As can be seen, get_https() parses the response and response headers and returns them as a list, which can be captured in a hash for later reference. Also a fourth argument to get_https() is used to insert some additional headers in the request. make_headers() is a function that will convert a list or hash to such headers. By default get_https() supplies Host (to make virtual hosting easy) and Accept (reportedly needed by IIS) headers.

Case 2b (in SYNOPSIS) demonstrates how to get a password protected page. Refer to the HTTP protocol specifications for further details (e.g. RFC-2617).

Case 3 (in SYNOPSIS) invokes post_https() to submit a HTML/CGI form to a secure server. The first four arguments are equal to get_https() (note that the empty string () is passed as header argument). The fifth argument is the contents of the form formatted according to CGI specification. Do not post UTF-8 data as content: use utf8::downgrade first. In this case the helper function make_https() is used to do the formatting, but you could pass any string. post_https() automatically adds Content-Type and Content-Length headers to the request.

Case 4 (in SYNOPSIS) shows the fundamental sslcat() function (inspired in spirit by the netcat utility :-). It’s your swiss army knife that allows you to easily contact servers, send some data, and then get the response. You are responsible for formatting the data and parsing the response - sslcat() is just a transport.

Case 5 (in SYNOPSIS) is a full invocation of sslcat() which allows the return of errors as well as the server (peer) certificate.

The $trace global variable can be used to control the verbosity of the high level functions. Level 0 guarantees silence, level 1 (the default) only emits error messages.

Alternate versions of high-level API

  • get_https3

  • post_https3

  • put_https3

  • get_https4

  • post_https4

  • put_https4

The above mentioned functions actually return the response headers as a list, which only gets converted to hash upon assignment (this assignment looses information if the same header occurs twice, as may be the case with cookies). There are also other variants of the functions that return unprocessed headers and that return a reference to a hash.

($page, $response, @headers) = get_https(www.bacus.pt, 443, /); for ($i = 0; $i < $#headers; $i+=2) { print “$headers[$i] = " . $headers[$i+1] . " “; } ($page, $response, $headers, $server_cert) = get_https3(www.bacus.pt, 443, /); print “$headers “; ($page, $response, $headers_ref) = get_https4(www.bacus.pt, 443, /); for $k (sort keys %{$headers_ref}) { for $v (@{$$headers_ref{$k}}) { print “$k = $v “; } }

All of the above code fragments accomplish the same thing: display all values of all headers. The API functions ending in “3” return the headers simply as a scalar string and it is up to the application to split them up. The functions ending in “4” return a reference to a hash of arrays (see perlref and perllol if you are not familiar with complex perl data structures). To access a single value of such a header hash you would do something like

print $$headers_ref{COOKIE}[0];

Variants 3 and 4 also allow you to discover the server certificate in case you would like to store or display it, e.g.

($p, $resp, $hdrs, $server_cert) = get_https3(www.bacus.pt, 443, /); if (!defined($server_cert) || ($server_cert == 0)) { warn “Subject Name: undefined, Issuer Name: undefined”; } else { warn sprintf(Subject Name: %s Issuer Name: %s, Net::SSLeay::X509_NAME_oneline( Net::SSLeay::X509_get_subject_name($server_cert)), Net::SSLeay::X509_NAME_oneline( Net::SSLeay::X509_get_issuer_name($server_cert)) ); }

Beware that this method only allows after the fact verification of the certificate: by the time get_https3() has returned the https request has already been sent to the server, whether you decide to trust it or not. To do the verification correctly you must either employ the OpenSSL certificate verification framework or use the lower level API to first connect and verify the certificate and only then send the http data. See the implementation of ds_https3() for guidance on how to do this.

Using client certificates

Secure web communications are encrypted using symmetric crypto keys exchanged using encryption based on the certificate of the server. Therefore in all SSL connections the server must have a certificate. This serves both to authenticate the server to the clients and to perform the key exchange.

Sometimes it is necessary to authenticate the client as well. Two options are available: HTTP basic authentication and a client side certificate. The basic authentication over HTTPS is actually quite safe because HTTPS guarantees that the password will not travel in the clear. Never-the-less, problems like easily guessable passwords remain. The client certificate method involves authentication of the client at the SSL level using a certificate. For this to work, both the client and the server have certificates (which typically are different) and private keys.

The API functions outlined above accept additional arguments that allow one to supply the client side certificate and key files. The format of these files is the same as used for server certificates and the caveat about encrypting private keys applies.

($page, $result, %headers) # 2c = get_https(www.bacus.pt, 443, /protected.html, make_headers(Authorization => Basic . MIME::Base64::encode("$user:$pass”,)), , $mime_type6, $path_to_crt7, $path_to_key8 ); ($page, $response, %reply_headers) = post_https(www.bacus.pt, 443, /foo.cgi, # 3b make_headers(Authorization => Basic . MIME::Base64::encode("$user:$pass”,)), make_form(OK => 1, name => Sampo), $mime_type6, $path_to_crt7, $path_to_key8 );

Case 2c (in SYNOPSIS) demonstrates getting a password protected page that also requires a client certificate, i.e. it is possible to use both authentication methods simultaneously.

Case 3b (in SYNOPSIS) is a full blown POST to a secure server that requires both password authentication and a client certificate, just like in case 2c.

Note: The client will not send a certificate unless the server requests one. This is typically achieved by setting the verify mode to VERIFY_PEER on the server:

Net::SSLeay::set_verify($ssl, Net::SSLeay::VERIFY_PEER, 0);

See perldoc ~openssl/doc/ssl/SSL_CTX_set_verify.pod for a full description.

Working through a web proxy

  • set_proxy

Net::SSLeay can use a web proxy to make its connections. You need to first set the proxy host and port using set_proxy() and then just use the normal API functions, e.g:

Net::SSLeay::set_proxy(gateway.myorg.com, 8080); ($page) = get_https(www.bacus.pt, 443, /);

If your proxy requires authentication, you can supply a username and password as well

Net::SSLeay::set_proxy(gateway.myorg.com, 8080, joe, salainen); ($page, $result, %headers) = get_https(www.bacus.pt, 443, /protected.html, make_headers(Authorization => Basic . MIME::Base64::encode(“susie:pass”,)) );

This example demonstrates the case where we authenticate to the proxy as "joe" and to the final web server as "susie". Proxy authentication requires the MIME::Base64 module to work.

HTTP (without S) API

  • get_http

  • post_http

  • tcpcat

  • get_httpx

  • post_httpx

  • tcpxcat

Over the years it has become clear that it would be convenient to use the light-weight flavour API of Net::SSLeay for normal HTTP as well (see LWP for the heavy-weight object-oriented approach). In fact it would be nice to be able to flip https on and off on the fly. Thus regular HTTP support was evolved.

use Net::SSLeay qw(get_http post_http tcpcat get_httpx post_httpx tcpxcat make_headers make_form); ($page, $result, %headers) = get_http(www.bacus.pt, 443, /protected.html, make_headers(Authorization => Basic . MIME::Base64::encode("$user:$pass”,)) ); ($page, $response, %reply_headers) = post_http(www.bacus.pt, 443, /foo.cgi, , make_form(OK => 1, name => Sampo) ); ($reply, $err) = tcpcat($host, $port, $request); ($page, $result, %headers) = get_httpx($usessl, www.bacus.pt, 443, /protected.html, make_headers(Authorization => Basic . MIME::Base64::encode("$user:$pass”,)) ); ($page, $response, %reply_headers) = post_httpx($usessl, www.bacus.pt, 443, /foo.cgi, , make_form(OK => 1, name => Sampo) ); ($reply, $err, $server_cert) = tcpxcat($usessl, $host, $port, $request);

As can be seen, the "x" family of APIs takes as the first argument a flag which indicates whether SSL is used or not.

Certificate verification and Certificate Revocation Lists (CRLs)

OpenSSL supports the ability to verify peer certificates. It can also optionally check the peer certificate against a Certificate Revocation List (CRL) from the certificates issuer. A CRL is a file, created by the certificate issuer that lists all the certificates that it previously signed, but which it now revokes. CRLs are in PEM format.

You can enable Net::SSLeay CRL checking like this:

&Net::SSLeay::X509_STORE_set_flags( &Net::SSLeay::CTX_get_cert_store($ssl), &Net::SSLeay::X509_V_FLAG_CRL_CHECK );

After setting this flag, if OpenSSL checks a peer’s certificate, then it will attempt to find a CRL for the issuer. It does this by looking for a specially named file in the search directory specified by CTX_load_verify_locations. CRL files are named with the hash of the issuer’s subject name, followed by .r0, .r1 etc. For example ab1331b2.r0, ab1331b2.r1. It will read all the .r files for the issuer, and then check for a revocation of the peer certificate in all of them. (You can also force it to look in a specific named CRL file., see below). You can find out the hash of the issuer subject name in a CRL with

openssl crl -in crl.pem -hash -noout

If the peer certificate does not pass the revocation list, or if no CRL is found, then the handshaking fails with an error.

You can also force OpenSSL to look for CRLs in one or more arbitrarily named files.

my $bio = Net::SSLeay::BIO_new_file($crlfilename, r); my $crl = Net::SSLeay::PEM_read_bio_X509_CRL($bio); if ($crl) { Net::SSLeay::X509_STORE_add_crl( Net::SSLeay::CTX_get_cert_store($ssl, $crl) ); } else { # error reading CRL…. }

Usually the URLs where you can download the CRLs is contained in the certificate itself and you can extract them with

my @url = Net::SSLeay::P_X509_get_crl_distribution_points($cert);

But there is no automatic downloading of the CRLs and often these CRLs are too huge to just download them to verify a single certificate. Also, these CRLs are often in DER format which you need to convert to PEM before you can use it:

openssl crl -in crl.der -inform der -out crl.pem

So as an alternative for faster and timely revocation checks you better use the Online Status Revocation Protocol (OCSP).

Certificate verification and Online Status Revocation Protocol (OCSP)

While checking for revoked certificates is possible and fast with Certificate Revocation Lists, you need to download the complete and often huge list before you can verify a single certificate.

A faster way is to ask the CA to check the revocation of just a single or a few certificates using OCSP. Basically you generate for each certificate an OCSP_CERTID based on the certificate itself and its issuer, put the ids together into an OCSP_REQUEST and send the request to the URL given in the certificate.

As a result you get back an OCSP_RESPONSE and need to check the status of the response, check that it is valid (e.g. signed by the CA) and finally extract the information about each OCSP_CERTID to find out if the certificate is still valid or got revoked.

With Net::SSLeay this can be done like this:

# get id(s) for given certs, like from get_peer_certificate # or get_peer_cert_chain. This will croak if # - one tries to make an OCSP_CERTID for a self-signed certificate # - the issuer of the certificate cannot be found in the SSL objects # store, nor in the current certificate chain my $cert = Net::SSLeay::get_peer_certificate($ssl); my $id = eval { Net::SSLeay::OCSP_cert2ids($ssl,$cert) }; die “failed to make OCSP_CERTID: $@” if $@; # create OCSP_REQUEST from id(s) # Multiple can be put into the same request, if the same OCSP responder # is responsible for them. my $req = Net::SSLeay::OCSP_ids2req($id); # determine URI of OCSP responder my $uri = Net::SSLeay::P_X509_get_ocsp_uri($cert); # Send stringified OCSP_REQUEST with POST to $uri. # We can ignore certificate verification for https, because the OCSP # response itself is signed. my $ua = HTTP::Tiny->new(verify_SSL => 0); my $res = $ua->request( POST,$uri, { headers => { Content-type => application/ocsp-request }, content => Net::SSLeay::i2d_OCSP_REQUEST($req) }); my $content = $res && $res->{success} && $res->{content} or die “query failed”; # Extract OCSP_RESPONSE. # this will croak if the string is not an OCSP_RESPONSE my $resp = eval { Net::SSLeay::d2i_OCSP_RESPONSE($content) }; # Check status of response. my $status = Net::SSLeay::OCSP_response_status($resp); if ($status != Net::SSLeay::OCSP_RESPONSE_STATUS_SUCCESSFUL()) { die “OCSP response failed: " . Net::SSLeay::OCSP_response_status_str($status); } # Verify signature of response and if nonce matches request. # This will croak if there is a nonce in the response, but it does not match # the request. It will return false if the signature could not be verified, # in which case details can be retrieved with Net::SSLeay::ERR_get_error. # It will not complain if the response does not contain a nonce, which is # usually the case with pre-signed responses. if ( ! eval { Net::SSLeay::OCSP_response_verify($ssl,$resp,$req) }) { die “OCSP response verification failed”; } # Extract information from OCSP_RESPONSE for each of the ids. # If called in scalar context it will return the time (as time_t), when the # next update is due (minimum of all successful responses inside $resp). It # will croak on the following problems: # - response is expired or not yet valid # - no response for given OCSP_CERTID # - certificate status is not good (e.g. revoked or unknown) if ( my $nextupd = eval { Net::SSLeay::OCSP_response_results($resp,$id) }) { warn “certificate is valid, next update in " . ($nextupd-time()) . " seconds “; } else { die “certificate is not valid: $@”; } # But in array context it will return detailed information about each given # OCSP_CERTID instead croaking on errors: # if no @ids are given it will return information about all single responses # in the OCSP_RESPONSE my @results = Net::SSLeay::OCSP_response_results($resp,@ids); for my $r (@results) { print Dumper($r); # @results are in the same order as the @ids and contain: # $r->[0] - OCSP_CERTID # $r->[1] - undef if no error (certificate good) OR error message as string # $r->[2] - hash with details: # thisUpdate - time_t of this single response # nextUpdate - time_t when update is expected # statusType - integer: # V_OCSP_CERTSTATUS_GOOD(0) # V_OCSP_CERTSTATUS_REVOKED(1) # V_OCSP_CERTSTATUS_UNKNOWN(2) # revocationTime - time_t (only if revoked) # revocationReason - integer (only if revoked) # revocationReason_str - reason as string (only if revoked) }

To further speed up certificate revocation checking one can use a TLS extension to instruct the server to staple the OCSP response:

# set TLS extension before doing SSL_connect Net::SSLeay::set_tlsext_status_type($ssl, Net::SSLeay::TLSEXT_STATUSTYPE_ocsp()); # setup callback to verify OCSP response my $cert_valid = undef; Net::SSLeay::CTX_set_tlsext_status_cb($context,sub { my ($ssl,$resp) = @_; if (!$resp) { # Lots of servers dont return an OCSP response. # In this case we must check the OCSP status outside the SSL # handshake. warn “server did not return stapled OCSP response “; return 1; } # verify status my $status = Net::SSLeay::OCSP_response_status($resp); if ($status != Net::SSLeay::OCSP_RESPONSE_STATUS_SUCCESSFUL()) { warn “OCSP response failure: $status “; return 1; } # verify signature - we have no OCSP_REQUEST here to check nonce if (!eval { Net::SSLeay::OCSP_response_verify($ssl,$resp) }) { warn “OCSP response verify failed “; return 1; } # check if the certificate is valid # we should check here against the peer_certificate my $cert = Net::SSLeay::get_peer_certificate(); my $certid = eval { Net::SSLeay::OCSP_cert2ids($ssl,$cert) } or do { warn “cannot get certid from cert: $@”; $cert_valid = -1; return 1; }; if ( $nextupd = eval { Net::SSLeay::OCSP_response_results($resp,$certid) }) { warn “certificate not revoked “; $cert_valid = 1; } else { warn “certificate not valid: $@”; $cert_valid = 0; } }); # do SSL handshake here # …. # check if certificate revocation was checked already if ( ! defined $cert_valid) { # check revocation outside of SSL handshake by asking OCSP responder … } elsif ( ! $cert_valid ) { die “certificate not valid - closing SSL connection”; } elsif ( $cert_valid<0 ) { die “cannot verify certificate revocation - self-signed ?”; } else { # everything fine … }

Using Net::SSLeay in multi-threaded applications

IMPORTANT: versions 1.42 or earlier are not thread-safe!

Net::SSLeay module implements all necessary stuff to be ready for multi-threaded environment - it requires openssl-0.9.7 or newer. The implementation fully follows thread safety related requirements of openssl library(see <https://www.openssl.org/docs/manmaster/man3/threads.html>).

If you are about to use Net::SSLeay (or any other module based on Net::SSLeay) in multi-threaded perl application it is recommended to follow this best-practice:

Initialization

Load and initialize Net::SSLeay module in the main thread:

use threads; use Net::SSLeay; Net::SSLeay::load_error_strings(); Net::SSLeay::SSLeay_add_ssl_algorithms(); Net::SSLeay::randomize(); sub do_master_job { # … call whatever from Net::SSLeay } sub do_worker_job { # … call whatever from Net::SSLeay } # start threads my $master = threads->new(\do_master_job, param1, param2); my @workers = threads->new(\do_worker_job, arg1, arg2) for (1..10); # waiting for all threads to finish $_->join() for (threads->list);

NOTE: Openssl’s int SSL_library_init(void) function (which is also aliased as SSLeay_add_ssl_algorithms, OpenSSL_add_ssl_algorithms and add_ssl_algorithms) is not re-entrant and multiple calls can cause a crash in threaded application. Net::SSLeay implements flags preventing repeated calls to this function, therefore even multiple initialization via Net::SSLeay::SSLeay_add_ssl_algorithms() should work without trouble.

Using callbacks

Do not use callbacks across threads (the module blocks cross-thread callback operations and throws a warning). Always do the callback setup, callback use and callback destruction within the same thread.

Using openssl elements

All openssl elements (X509, SSL_CTX, …) can be directly passed between threads.

use threads; use Net::SSLeay; Net::SSLeay::load_error_strings(); Net::SSLeay::SSLeay_add_ssl_algorithms(); Net::SSLeay::randomize(); sub do_job { my $context = shift; Net::SSLeay::CTX_set_default_passwd_cb($context, sub { “secret” }); # … } my $c = Net::SSLeay::CTX_new(); threads->create(\do_job, $c);

Or:

use threads; use Net::SSLeay; my $context; # does not need to be shared Net::SSLeay::load_error_strings(); Net::SSLeay::SSLeay_add_ssl_algorithms(); Net::SSLeay::randomize(); sub do_job { Net::SSLeay::CTX_set_default_passwd_cb($context, sub { “secret” }); # … } $context = Net::SSLeay::CTX_new(); threads->create(\do_job);

Using other perl modules based on Net::SSLeay

It should be fine to use any other module based on Net::SSLeay (like IO::Socket::SSL) in multi-threaded applications. It is generally recommended to do any global initialization of such a module in the main thread before calling threads->new(..) or threads->create(..) but it might differ module by module.

To be safe you can load and init Net::SSLeay explicitly in the main thread:

use Net::SSLeay; use Other::SSLeay::Based::Module; Net::SSLeay::load_error_strings(); Net::SSLeay::SSLeay_add_ssl_algorithms(); Net::SSLeay::randomize();

Or even safer:

use Net::SSLeay; use Other::SSLeay::Based::Module; BEGIN { Net::SSLeay::load_error_strings(); Net::SSLeay::SSLeay_add_ssl_algorithms(); Net::SSLeay::randomize(); }

Combining Net::SSLeay with other modules linked with openssl

BEWARE: This might be a big trouble! This is not guaranteed be thread-safe!

There are many other (XS) modules linked directly to openssl library (like Crypt::SSLeay).

As it is expected that also “another” module will call SSLeay_add_ssl_algorithms at some point we have again a trouble with multiple openssl initialization by Net::SSLeay and “another” module.

As you can expect Net::SSLeay is not able to avoid multiple initialization of openssl library called by “another” module, thus you have to handle this on your own (in some cases it might not be possible at all to avoid this).

Threading with get_https and friends

The convenience functions get_https, post_https etc all initialize the SSL library by calling Net::SSLeay::initialize which does the conventional library initialization:

Net::SSLeay::load_error_strings(); Net::SSLeay::SSLeay_add_ssl_algorithms(); Net::SSLeay::randomize();

Net::SSLeay::initialize initializes the SSL library at most once. You can override the Net::SSLeay::initialize function if you desire some other type of initialization behaviour by get_https and friends. You can call Net::SSLeay::initialize from your own code if you desire this conventional library initialization.

Convenience routines

To be used with Low level API

Net::SSLeay::randomize($rn_seed_file,$additional_seed); Net::SSLeay::set_cert_and_key($ctx, $cert_path, $key_path); $cert = Net::SSLeay::dump_peer_certificate($ssl); Net::SSLeay::ssl_write_all($ssl, $message) or die “ssl write failure”; $got = Net::SSLeay::ssl_read_all($ssl) or die “ssl read failure”; $got = Net::SSLeay::ssl_read_CRLF($ssl [, $max_length]); $got = Net::SSLeay::ssl_read_until($ssl [, $delimit [, $max_length]]); Net::SSLeay::ssl_write_CRLF($ssl, $message);

  • randomize seeds the openssl PRNG with /dev/urandom (see the top of SSLeay.pm for how to change or configure this) and optionally with user provided data. It is very important to properly seed your random numbers, so do not forget to call this. The high level API functions automatically call randomize() so it is not needed with them. See also caveats.

  • set_cert_and_key takes two file names as arguments and sets the certificate and private key to those. This can be used to set either server certificates or client certificates.

  • dump_peer_certificate allows you to get a plaintext description of the certificate the peer (usually the server) presented to us.

  • ssl_read_all see ssl_write_all (below)

  • ssl_write_all ssl_read_all() and ssl_write_all() provide true blocking semantics for these operations (see limitation, below, for explanation). These are much preferred to the low level API equivalents (which implement BSD blocking semantics). The message argument to ssl_write_all() can be a reference. This is helpful to avoid unnecessary copying when writing something big, e.g: $data = A x 1000000000; Net::SSLeay::ssl_write_all($ssl, \data) or die “ssl write failed”;

  • ssl_read_CRLF uses ssl_read_all() to read in a line terminated with a carriage return followed by a linefeed (CRLF). The CRLF is included in the returned scalar.

  • ssl_read_until uses ssl_read_all() to read from the SSL input stream until it encounters a programmer specified delimiter. If the delimiter is undefined, $/ is used. If $/ is undefined, is used. One can optionally set a maximum length of bytes to read from the SSL input stream.

  • ssl_write_CRLF writes $message and appends CRLF to the SSL output stream.

Initialization

In order to use the low level API you should start your programs with the following incantation:

use Net::SSLeay qw(die_now die_if_ssl_error); Net::SSLeay::load_error_strings(); Net::SSLeay::SSLeay_add_ssl_algorithms(); # Important! Net::SSLeay::ENGINE_load_builtin_engines(); # If you want built-in engines Net::SSLeay::ENGINE_register_all_complete(); # If you want built-in engines Net::SSLeay::randomize();

Error handling functions

I can not emphasize the need to check for error enough. Use these functions even in the most simple programs, they will reduce debugging time greatly. Do not ask questions on the mailing list without having first sprinkled these in your code.

  • die_now

  • die_if_ssl_error die_now() and die_if_ssl_error() are used to conveniently print the SSLeay error stack when something goes wrong: Net::SSLeay::connect($ssl) or die_now(“Failed SSL connect ($!)”); Net::SSLeay::write($ssl, “foo”) or die_if_ssl_error(“SSL write ($!)”);

  • print_errs You can also use Net::SSLeay::print_errs() to dump the error stack without exiting the program. As can be seen, your code becomes much more readable if you import the error reporting functions into your main name space.

Sockets

Perl uses file handles for all I/O. While SSLeay has a quite flexible BIO mechanism and perl has an evolved PerlIO mechanism, this module still sticks to using file descriptors. Thus to attach SSLeay to a socket you should use fileno() to extract the underlying file descriptor:

Net::SSLeay::set_fd($ssl, fileno(S)); # Must use fileno

You should also set $| to 1 to eliminate STDIO buffering so you do not get confused if you use perl I/O functions to manipulate your socket handle.

If you need to select(2) on the socket, go right ahead, but be warned that OpenSSL does some internal buffering so SSL_read does not always return data even if the socket selected for reading (just keep on selecting and trying to read). Net::SSLeay is no different from the C language OpenSSL in this respect.

Callbacks

You can establish a per-context verify callback function something like this:

sub verify { my ($ok, $x509_store_ctx) = @_; print “Verifying certificate… “; # … return $ok; }

It is used like this:

Net::SSLeay::set_verify ($ssl, Net::SSLeay::VERIFY_PEER, \verify);

Per-context callbacks for decrypting private keys are implemented.

Net::SSLeay::CTX_set_default_passwd_cb($ctx, sub { “top-secret” }); Net::SSLeay::CTX_use_PrivateKey_file($ctx, “key.pem”, Net::SSLeay::FILETYPE_PEM) or die “Error reading private key”; Net::SSLeay::CTX_set_default_passwd_cb($ctx, undef);

If Hello Extensions are supported by your OpenSSL, a session secret callback can be set up to be called when a session secret is set by openssl.

Establish it like this:

Net::SSLeay::set_session_secret_cb($ssl, \session_secret_cb, $somedata);

It will be called like this:

sub session_secret_cb { my ($secret, \cipherlist, \preferredcipher, $somedata) = @_; }

No other callbacks are implemented. You do not need to use any callback for simple (i.e. normal) cases where the SSLeay built-in verify mechanism satisfies your needs.

It is required to reset these callbacks to undef immediately after use to prevent memory leaks, thread safety problems and crashes on exit that can occur if different threads set different callbacks.

If you want to use callback stuff, see examples/callback.pl! It’s the only one I am able to make work reliably.

Low level API

In addition to the high level functions outlined above, this module contains straight-forward access to CRYPTO and SSL parts of OpenSSL C API.

See the *.h headers from OpenSSL C distribution for a list of low level SSLeay functions to call (check SSLeay.xs to see if some function has been implemented). The module strips the initial "SSL_" off of the SSLeay names. Generally you should use Net::SSLeay:: in its place.

Note that some functions are prefixed with "P_" - these are very close to the original API however contain some kind of a wrapper making its interface more perl friendly.

For example:

In C:

#include <ssl.h> err = SSL_set_verify (ssl, SSL_VERIFY_CLIENT_ONCE, &your_call_back_here);

In Perl:

use Net::SSLeay; $err = Net::SSLeay::set_verify ($ssl, Net::SSLeay::VERIFY_CLIENT_ONCE, \your_call_back_here);

If the function does not start with SSL_ you should use the full function name, e.g.:

$err = Net::SSLeay::ERR_get_error;

The following new functions behave in perlish way:

$got = Net::SSLeay::read($ssl); # Performs SSL_read, but returns $got # resized according to data received. # Returns undef on failure. Net::SSLeay::write($ssl, $foo) || die; # Performs SSL_write, but automatically # figures out the size of $foo

Low level API: Version and library information related functions

  • OpenSSL_version_num and SSLeay COMPATIBILITY: SSLeay() is not available in Net-SSLeay-1.42 and before. SSLeay() was made an alias of OpenSSL_version_num() in OpenSSL 1.1.0 and LibreSSL 2.7.0. COMPATIBILITY: OpenSSL_version_num() requires at least Net-SSLeay-1.82 with OpenSSL 1.1.0, or Net-SSLeay-1.88 with LibreSSL 2.7.0. Both functions return OPENSSL_VERSION_NUMBER constant (numeric) as defined by the underlying OpenSSL or LibreSSL library. my $ver_number = Net::SSLeay::SSLeay(); # or my $ver_number = Net::SSLeay::OpenSSL_version_num(); # returns: OPENSSL_VERSION_NUMBER constant # OpenSSL version numbering is: # 0x00903100 => openssl-0.9.3 # 0x00904100 => openssl-0.9.4 # 0x00905100 => openssl-0.9.5 # 0x0090600f => openssl-0.9.6 # 0x0090601f => openssl-0.9.6a # … # 0x009060df => openssl-0.9.6m # 0x0090700f => openssl-0.9.7 # 0x0090701f => openssl-0.9.7a # … # 0x009070df => openssl-0.9.7m # 0x0090800f => openssl-0.9.8 # 0x0090801f => openssl-0.9.8a # … # 0x0090821f => openssl-0.9.8zh # 0x1000000f => openssl-1.0.0 # … # 0x1000014f => openssl-1.0.0t # 0x1000100f => openssl-1.0.1 # … # 0x1000115f => openssl-1.0.1u # 0x1000200f => openssl-1.0.2 # … # 0x1000215f => openssl-1.0.2u # 0x1010000f => openssl-1.1.0 # … # 0x101000cf => openssl-1.1.0l # 0x1010100f => openssl-1.1.1 # … # 0x1010117f => openssl-1.1.1w # 0x30000000 => openssl-3.0.0 # … # 0x300000c0 => openssl-3.0.12 # 0x30100000 => openssl-3.1.0 # … # 0x30100040 => openssl-3.1.4 # 0x30200000 => openssl-3.2.0 # Note that OpenSSL 3.0.0 and later do not set the status nibble in the # least significant octet to f. # LibreSSL returns 0x20000000 always: # 0x20000000 => libressl-2.2.1 # … # 0x20000000 => libressl-3.8.2 You can use the version number like this when you know that the underlying library is OpenSSL: if (Net::SSLeay::SSLeay() < 0x0090800f) { die “You need OpenSSL 0.9.8 or higher”; } LibresSSL 2.2.2 and later define constant LIBRESSL_VERSION_NUMBER that gives the LibreSSL version number. The format is the same that OpenSSL uses with OPENSSL_VERSION_NUMBER. You can do this if you need to check that the underlying library is LibreSSL and it’s recent enough: if (Net::SSLeay::SSLeay() != 0x20000000 || Net::SSLeay::LIBRESSL_VERSION_NUMBER() < 0x3040200f) { die “You need LibreSSL. Version 3.4.2 or higher”; } Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OpenSSL_version_num.html> See OpenSSL 1.1.1 and earlier documentation for the details of status nibble and the format interpretation.

  • SSLeay_version COMPATIBILITY: not available in Net-SSLeay-1.42 and before Returns different strings depending on $type. my $ver_string = Net::SSLeay::SSLeay_version($type); # $type # SSLEAY_VERSION - e.g. OpenSSL 1.0.0d 8 Feb 2011 # SSLEAY_CFLAGS - e.g. compiler: gcc -D_WINDLL -DOPENSSL_USE_APPLINK ….. # SSLEAY_BUILT_ON - e.g. built on: Fri May 6 00:00:46 GMT 2011 # SSLEAY_PLATFORM - e.g. platform: mingw # SSLEAY_DIR - e.g. OPENSSLDIR: “z:/….” # # returns: string Net::SSLeay::SSLeay_version(); # is equivalent to Net::SSLeay::SSLeay_version(SSLEAY_VERSION); OpenSSL 1.1.0 changed SSLeay_version() to an alias of OpenSSL_version(). To ensure correct functionality with LibreSSL, use SSLEAY_* constants with SSLeay_version() and OPENSSL_* constants with OpenSSL_version(). Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OpenSSL_version.html> OpenSSL website no longer has a manual page for SSLeay_version().

  • OpenSSL_version COMPATIBILITY: requires at least Net-SSLeay-1.82 with OpenSSL 1.1.0, or Net-SSLeay-1.88 with LibreSSL 2.7.0. Returns different strings depending on $t. Available $t constants depend on the library version. my $ver_string = Net::SSLeay::OpenSSL_version($t); # $t # OPENSSL_VERSION - e.g. OpenSSL 1.1.0g 2 Nov 2017 # OPENSSL_CFLAGS - e.g. compiler: cc -DDSO_DLFCN -DHAVE_DLFCN_H ….. # OPENSSL_BUILT_ON - e.g. built on: reproducible build, date unspecified # OPENSSL_PLATFORM - e.g. platform: darwin64-x86_64-cc # OPENSSL_DIR - e.g. OPENSSLDIR: “/opt/openssl-1.1.0g” # OPENSSL_ENGINES_DIR - e.g. ENGINESDIR: “/opt/openssl-1.1.0g/lib/engines-1.1” # # returns: string Net::SSLeay::OpenSSL_version(); # is equivalent to Net::SSLeay::OpenSSL_version(OPENSSL_VERSION); Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OpenSSL_version.html>

  • OPENSSL_info COMPATIBILITY: not available in Net-SSLeay-1.90 and before; requires at least OpenSSL 3.0.0-alpha1 Returns different strings depending on $t. Available $t constants depend on the library version. my $info_string = Net::SSLeay::OPENSSL_info($t); # $t # OPENSSL_INFO_CONFIG_DIR - e.g. /opt/openssl-3.0.1 # OPENSSL_INFO_… # # returns: string Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OPENSSL_info.html>

  • OPENSSL_version_major, OPENSSL_version_minor and OPENSSL_version_patch COMPATIBILITY: not available in Net-SSLeay-1.90 and before; requires at least OpenSSL 3.0.0-alpha1, not in LibreSSL Return constants OPENSSL_VERSION_MAJOR, OPENSSL_VERSION_MINOR and OPENSSL_VERSION_PATCH, respectively. my $major = Net::SSLeay::OPENSSL_version_major(); my $minor = Net::SSLeay::OPENSSL_version_minor(); my $patch = Net::SSLeay::OPENSSL_version_patch(); # # return: integer For example with OpenSSL 3.0.1, $major is 3, $minor is 0 and $patch is 1. Note: the constants record Net::SSLeay compile time values whereas the three functions return values from the library. Typically these are the same, but they can be different if the library version is updated but Net::SSLeay is not re-compiled. See the OpenSSL and LibreSSL API/ABI compatibility statements for more information. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OPENSSL_version_major.html>

  • OPENSSL_version_pre_release COMPATIBILITY: not available in Net-SSLeay-1.90 and before; requires at least OpenSSL 3.0.0-alpha1, not in LibreSSL Return constant string defined by C macro OPENSSL_VERSION_PRE_RELEASE. my $pre_release = Net::SSLeay::OPENSSL_version_pre_release(); # # returns: string (For example: “-alpha3” or "” for a release version) When the macro is not defined, an empty string is returned instead. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OPENSSL_version_pre_release.html>

  • OPENSSL_version_build_metadata COMPATIBILITY: not available in Net-SSLeay-1.90 and before; requires at least OpenSSL 3.0.0-alpha1, not in LibreSSL Return constant string defined by C macro OPENSSL_VERSION_BUILD_METADATA. my $metadata = Net::SSLeay::OPENSSL_version_build_metadata(); # # returns: string (For example: “+fips” or “”) When the macro is not defined, an empty string is returned instead. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OPENSSL_version_build_metadata.html>

Low level API: Initialization related functions

  • library_init Initialize SSL library by registering algorithms. my $rv = Net::SSLeay::library_init(); Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_library_init.html> While the original function from OpenSSL always returns 1, Net::SSLeay adds a wrapper around it to make sure that the OpenSSL function is only called once. Thus the function will return 1 if initialization was done and 0 if not, i.e. if initialization was done already before.

  • add_ssl_algorithms The alias for “library_init” Net::SSLeay::add_ssl_algorithms();

  • OpenSSL_add_ssl_algorithms The alias for “library_init” Net::SSLeay::OpenSSL_add_ssl_algorithms();

  • SSLeay_add_ssl_algorithms The alias for “library_init” Net::SSLeay::SSLeay_add_ssl_algorithms();

  • load_error_strings Registers the error strings for all libcrypto + libssl related functions. Net::SSLeay::load_error_strings(); # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/ERR_load_crypto_strings.html>

  • ERR_load_crypto_strings Registers the error strings for all libcrypto functions. No need to call this function if you have already called “load_error_strings”. Net::SSLeay::ERR_load_crypto_strings(); # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/ERR_load_crypto_strings.html>

  • ERR_load_RAND_strings Registers the error strings for RAND related functions. No need to call this function if you have already called “load_error_strings”. Net::SSLeay::ERR_load_RAND_strings(); # # returns: no return value

  • ERR_load_SSL_strings Registers the error strings for SSL related functions. No need to call this function if you have already called “load_error_strings”. Net::SSLeay::ERR_load_SSL_strings(); # # returns: no return value

  • OpenSSL_add_all_algorithms COMPATIBILITY: not available in Net-SSLeay-1.45 and before Add algorithms to internal table. Net::SSLeay::OpenSSL_add_all_algorithms(); # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OpenSSL_add_all_algorithms.html>

  • OPENSSL_add_all_algorithms_conf COMPATIBILITY: not available in Net-SSLeay-1.45 and before Similar to “OpenSSL_add_all_algorithms” - will ALWAYS load the config file Net::SSLeay::OPENSSL_add_all_algorithms_conf(); # # returns: no return value

  • OPENSSL_add_all_algorithms_noconf COMPATIBILITY: not available in Net-SSLeay-1.45 and before Similar to “OpenSSL_add_all_algorithms” - will NEVER load the config file Net::SSLeay::OPENSSL_add_all_algorithms_noconf(); # # returns: no return value

  • OPENSSL_cleanup COMPATIBILITY: not available in Net-SSLeay-1.92 and before; requires at least OpenSSL 1.1.0-pre3 or LibreSSL 3.6.0 Deinitialises OpenSSL libcrypto and libssl. Net::SSLeay::OPENSSL_cleanup(); # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OPENSSL_cleanup>

  • OPENSSL_init_crypto COMPATIBILITY: not available in Net-SSLeay-1.92 and before; requires at least OpenSSL 1.1.0-pre3 not enabled for LibreSSL. LibreSSL does not define OPENSSL_INIT_SETTINGS. Initialises OpenSSL libcrypto with non-default settings. my $rv = Net::SSLeay::OPENSSL_init_crypto($opts, $settings); # $opts - (uin64_t) flags to be set (bitmask) # $settings - value corresponding to OPENSSL_INIT_SETTINGS structure or undef (optional) # # returns: 1 on success or 0 on error Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OPENSSL_init_crypto>

  • OPENSSL_init_ssl COMPATIBILITY: not available in Net-SSLeay-1.92 and before; requires at least OpenSSL 1.1.0-pre3 not enabled for LibreSSL. LibreSSL does not define OPENSSL_INIT_SETTINGS. Initialises OpenSSL libssl with non-default settings. my $rv = Net::SSLeay::OPENSSL_init_ssl($opts, $settings); # $opts - (uin64_t) flags to be set (bitmask) # $settings - value corresponding to OPENSSL_INIT_SETTINGS structure or undef (optional) # # returns: 1 on success or 0 on error Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OPENSSL_init_ssl>

  • OPENSSL_INIT_new COMPATIBILITY: not available in Net-SSLeay-1.92 and before; requires at least OpenSSL 1.1.0-pre3, not in LibreSSL Allocates an OpenSSL OPENSSL_INIT_SETTINGS object. my $settings = Net::SSLeay::OPENSSL_init_new() # # returns: value corresponding to OPENSSL_INIT_SETTINGS structure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OPENSSL_INIT_new>

  • OPENSSL_INIT_free COMPATIBILITY: not available in Net-SSLeay-1.92 and before; requires at least OpenSSL 1.1.0-pre3, not in LibreSSL Releases an OpenSSL OPENSSL_INIT_SETTINGS object allocated with OPENSSL_INIT_new. Net::SSLeay::OPENSSL_init_free($settings) # $settings - value corresponding to OPENSSL_INIT_SETTINGS structure # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OPENSSL_INIT_free>

  • OPENSSL_INIT_set_config_filename COMPATIBILITY: not available in Net-SSLeay-1.92 and before; requires at least OpenSSL 1.1.0-pre3, not in LibreSSL Specify a nondefault filename to load as OpenSSL configuration file. my $rv = Net::SSLeay::OPENSSL_INIT_set_config_filename($settings, $filename); # $settings - value corresponding to OPENSSL_INIT_SETTINGS structure # $filename - (string) filename # # returns: 1 on success or 0 on error Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OPENSSL_INIT_set_config_filename>

  • OPENSSL_INIT_set_config_appname COMPATIBILITY: not available in Net-SSLeay-1.92 and before; requires at least OpenSSL 1.1.0-pre3, not in LibreSSL Specify a nondefault application name. my $rv = Net::SSLeay::OPENSSL_INIT_set_config_appname($settings, $name); # $settings - value corresponding to OPENSSL_INIT_SETTINGS structure # $name - (string) application name # # returns: 1 on success or 0 on error Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OPENSSL_INIT_set_config_appname>

  • OPENSSL_INIT_set_config_file_flags COMPATIBILITY: not available in Net-SSLeay-1.92 and before; requires at least OpenSSL 3.0.0-alpha1, not in LibreSSL Specify nondefault flags for loading OpenSSL configuration file. my $rv = Net::SSLeay::OPENSSL_INIT_set_config_file_flags($settings, $flags); # $settings - value corresponding to OPENSSL_INIT_SETTINGS structure # $flags - (unsigned long) flags to be set (bitmask) # # returns: 1 on success or 0 on error Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OPENSSL_INIT_set_config_file_flags>

Low level API: ERR_* and SSL_alert_* related functions

NOTE: Please note that SSL_alert_* function have “SSL_” part stripped from their names.

  • ERR_clear_error Clear the error queue. Net::SSLeay::ERR_clear_error(); # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/ERR_clear_error.html>

  • ERR_error_string Generates a human-readable string representing the error code $error. my $rv = Net::SSLeay::ERR_error_string($error); # $error - (unsigned integer) error code # # returns: string Check openssl doc <https://www.openssl.org/docs/manmaster/man3/ERR_error_string.html>

  • ERR_get_error Returns the earliest error code from the thread’s error queue and removes the entry. This function can be called repeatedly until there are no more error codes to return. my $rv = Net::SSLeay::ERR_get_error(); # # returns: (unsigned integer) error code Check openssl doc <https://www.openssl.org/docs/manmaster/man3/ERR_get_error.html>

  • ERR_peek_error Returns the earliest error code from the thread’s error queue without modifying it. my $rv = Net::SSLeay::ERR_peek_error(); # # returns: (unsigned integer) error code Check openssl doc <https://www.openssl.org/docs/manmaster/man3/ERR_get_error.html>

  • ERR_put_error Adds an error code to the thread’s error queue. It signals that the error of $reason code reason occurred in function $func of library $lib, in line number $line of $file. Net::SSLeay::ERR_put_error($lib, $func, $reason, $file, $line); # $lib - (integer) library id (check openssl/err.h for constants e.g. ERR_LIB_SSL) # $func - (integer) function id (check openssl/ssl.h for constants e.g. SSL_F_SSL23_READ) # $reason - (integer) reason id (check openssl/ssl.h for constants e.g. SSL_R_SSL_HANDSHAKE_FAILURE) # $file - (string) file name # $line - (integer) line number in $file # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/ERR_put_error.html> and <https://www.openssl.org/docs/manmaster/man3/err.html>

  • alert_desc_string Returns a two letter string as a short form describing the reason of the alert specified by value. my $rv = Net::SSLeay::alert_desc_string($value); # $value - (integer) alert id (check openssl/ssl.h for SSL3_AD_* and TLS1_AD_* constants) # # returns: description string (2 letters) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_alert_type_string.html>

  • alert_desc_string_long Returns a string describing the reason of the alert specified by value. my $rv = Net::SSLeay::alert_desc_string_long($value); # $value - (integer) alert id (check openssl/ssl.h for SSL3_AD_* and TLS1_AD_* constants) # # returns: description string Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_alert_type_string.html>

  • alert_type_string Returns a one letter string indicating the type of the alert specified by value. my $rv = Net::SSLeay::alert_type_string($value); # $value - (integer) alert id (check openssl/ssl.h for SSL3_AD_* and TLS1_AD_* constants) # # returns: string (1 letter) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_alert_type_string.html>

  • alert_type_string_long Returns a string indicating the type of the alert specified by value. my $rv = Net::SSLeay::alert_type_string_long($value); # $value - (integer) alert id (check openssl/ssl.h for SSL3_AD_* and TLS1_AD_* constants) # # returns: string Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_alert_type_string.html>

Low level API: SSL_METHOD_* related functions

  • SSLv23_method, SSLv23_server_method and SSLv23_client_method COMPATIBILITY: not available in Net-SSLeay-1.82 and before. Returns SSL_METHOD structure corresponding to general-purpose version-flexible TLS method, the return value can be later used as a param of “CTX_new_with_method”. NOTE: Consider using TLS_method, TLS_server_method or TLS_client_method with new code. my $rv = Net::SSLeay::SSLv2_method(); # # returns: value corresponding to openssls SSL_METHOD structure (0 on failure)

  • SSLv2_method Returns SSL_METHOD structure corresponding to SSLv2 method, the return value can be later used as a param of “CTX_new_with_method”. Only available where supported by the underlying openssl. my $rv = Net::SSLeay::SSLv2_method(); # # returns: value corresponding to openssls SSL_METHOD structure (0 on failure)

  • SSLv3_method Returns SSL_METHOD structure corresponding to SSLv3 method, the return value can be later used as a param of “CTX_new_with_method”. my $rv = Net::SSLeay::SSLv3_method(); # # returns: value corresponding to openssls SSL_METHOD structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_new.html>

  • TLSv1_method, TLSv1_server_method and TLSv1_client_method COMPATIBILITY: Requires OpenSSL or LibreSSL built with support for TLSv1. Server and client methods not available in Net-SSLeay-1.82 and before. Returns SSL_METHOD structure corresponding to TLSv1 method, the return value can be later used as a param of “CTX_new_with_method”. my $rv = Net::SSLeay::TLSv1_method(); # # returns: value corresponding to openssls SSL_METHOD structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_new.html>

  • TLSv1_1_method, TLSv1_1_server_method and TLSv1_1_client_method COMPATIBILITY: Requires OpenSSL >= 1.0.1 or LibreSSL built with support for TLSv1.1. Server and client methods not available in Net-SSLeay-1.82 and before. Returns SSL_METHOD structure corresponding to TLSv1_1 method, the return value can be later used as a param of “CTX_new_with_method”. my $rv = Net::SSLeay::TLSv1_1_method(); # # returns: value corresponding to openssls SSL_METHOD structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_new.html>

  • TLSv1_2_method, TLSv1_2_server_method and TLSv1_2_client_method COMPATIBILITY: Requires OpenSSL >= 1.0.1 or LibreSSL built with support for TLSv1.2. Server and client methods not available in Net-SSLeay-1.82 and before. Returns SSL_METHOD structure corresponding to TLSv1_2 method, the return value can be later used as a param of “CTX_new_with_method”. my $rv = Net::SSLeay::TLSv1_2_method(); # # returns: value corresponding to openssls SSL_METHOD structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_new.html>

  • TLS_method, TLS_server_method and TLS_client_method COMPATIBILITY: Not available in Net-SSLeay-1.82 and before. Returns SSL_METHOD structure corresponding to general-purpose version-flexible TLS method, the return value can be later used as a param of “CTX_new_with_method”. Only available where supported by the underlying openssl. my $rv = Net::SSLeay::TLS_method(); # # returns: value corresponding to openssls SSL_METHOD structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_new.html>

Low level API: ENGINE_* related functions

  • ENGINE_load_builtin_engines COMPATIBILITY: Requires an OpenSSL build with dynamic engine loading support. Load all bundled ENGINEs into memory and make them visible. Net::SSLeay::ENGINE_load_builtin_engines(); # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/ENGINE_by_id.html>

  • ENGINE_register_all_complete COMPATIBILITY: Requires an OpenSSL build with dynamic engine loading support. Register all loaded ENGINEs for every algorithm they collectively implement. Net::SSLeay::ENGINE_register_all_complete(); # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/ENGINE_by_id.html>

  • ENGINE_set_default COMPATIBILITY: Requires an OpenSSL build with dynamic engine loading support. Set default engine to $e + set its flags to $flags. my $rv = Net::SSLeay::ENGINE_set_default($e, $flags); # $e - value corresponding to openssls ENGINE structure # $flags - (integer) engine flags # flags value can be made by bitwise “OR"ing: # 0x0001 - ENGINE_METHOD_RSA # 0x0002 - ENGINE_METHOD_DSA # 0x0004 - ENGINE_METHOD_DH # 0x0008 - ENGINE_METHOD_RAND # 0x0010 - ENGINE_METHOD_ECDH # 0x0020 - ENGINE_METHOD_ECDSA # 0x0040 - ENGINE_METHOD_CIPHERS # 0x0080 - ENGINE_METHOD_DIGESTS # 0x0100 - ENGINE_METHOD_STORE # 0x0200 - ENGINE_METHOD_PKEY_METHS # 0x0400 - ENGINE_METHOD_PKEY_ASN1_METHS # Obvious all-or-nothing cases: # 0xFFFF - ENGINE_METHOD_ALL # 0x0000 - ENGINE_METHOD_NONE # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/ENGINE_by_id.html>

  • ENGINE_by_id Get ENGINE by its identification $id. COMPATIBILITY: Requires an OpenSSL build with dynamic engine loading support. my $rv = Net::SSLeay::ENGINE_by_id($id); # $id - (string) engine identification e.g. “dynamic” # # returns: value corresponding to openssls ENGINE structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/ENGINE_by_id.html>

Low level API: EVP_PKEY_* related functions

  • EVP_PKEY_copy_parameters Copies the parameters from key $from to key $to. my $rv = Net::SSLeay::EVP_PKEY_copy_parameters($to, $from); # $to - value corresponding to openssls EVP_PKEY structure # $from - value corresponding to openssls EVP_PKEY structure # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/EVP_PKEY_cmp.html>

  • EVP_PKEY_new COMPATIBILITY: not available in Net-SSLeay-1.45 and before Creates a new EVP_PKEY structure. my $rv = Net::SSLeay::EVP_PKEY_new(); # # returns: value corresponding to openssls EVP_PKEY structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/EVP_PKEY_new.html>

  • EVP_PKEY_free COMPATIBILITY: not available in Net-SSLeay-1.45 and before Free an allocated EVP_PKEY structure. Net::SSLeay::EVP_PKEY_free($pkey); # $pkey - value corresponding to openssls EVP_PKEY structure # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/EVP_PKEY_new.html>

  • EVP_PKEY_assign_RSA COMPATIBILITY: not available in Net-SSLeay-1.45 and before Set the key referenced by $pkey to $key NOTE: No reference counter will be increased, i.e. $key will be freed if $pkey is freed. my $rv = Net::SSLeay::EVP_PKEY_assign_RSA($pkey, $key); # $pkey - value corresponding to openssls EVP_PKEY structure # $key - value corresponding to openssls RSA structure # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/EVP_PKEY_assign_RSA.html>

  • EVP_PKEY_assign_EC_KEY COMPATIBILITY: not available in Net-SSLeay-1.74 and before Set the key referenced by $pkey to $key NOTE: No reference counter will be increased, i.e. $key will be freed if $pkey is freed. my $rv = Net::SSLeay::EVP_PKEY_assign_EC_KEY($pkey, $key); # $pkey - value corresponding to openssls EVP_PKEY structure # $key - value corresponding to openssls EC_KEY structure # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/EVP_PKEY_assign_EC_KEY.html>

  • EVP_PKEY_bits COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns the size of the key $pkey in bits. my $rv = Net::SSLeay::EVP_PKEY_bits($pkey); # $pkey - value corresponding to openssls EVP_PKEY structure # # returns: size in bits

  • EVP_PKEY_security_bits COMPATIBILITY: not available in Net-SSLeay-1.92 and before; requires at least OpenSSL 1.1.0 or at least LibreSSL 3.6.0 and Net-SSLeay-1.94 Returns the size of the key $pkey in bits. my $rv = Net::SSLeay::EVP_PKEY_security_bits($pkey); # $pkey - value corresponding to openssls EVP_PKEY structure # # returns: number of bits

  • EVP_PKEY_size COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns the maximum size of a signature in bytes. The actual signature may be smaller. my $rv = Net::SSLeay::EVP_PKEY_size($pkey); # $pkey - value corresponding to openssls EVP_PKEY structure # # returns: the maximum size in bytes Check openssl doc <https://www.openssl.org/docs/manmaster/man3/EVP_PKEY_size.html>

  • EVP_PKEY_id COMPATIBILITY: not available in Net-SSLeay-1.45 and before; requires at least OpenSSL 1.0.0 Returns $pkey type (integer value of corresponding NID). my $rv = Net::SSLeay::EVP_PKEY_id($pkey); # $pkey - value corresponding to openssls EVP_PKEY structure # # returns: (integer) key type Example: my $pubkey = Net::SSLeay::X509_get_pubkey($x509); my $type = Net::SSLeay::EVP_PKEY_id($pubkey); print Net::SSLeay::OBJ_nid2sn($type); # prints e.g. rsaEncryption

Low level API: PEM_* related functions

Check openssl doc <https://www.openssl.org/docs/manmaster/man3/pem.html>

  • PEM_read_bio_X509 COMPATIBILITY: not available in Net-SSLeay-1.45 and before Loads PEM formatted X509 certificate via given BIO structure. my $rv = Net::SSLeay::PEM_read_bio_X509($bio); # $bio - value corresponding to openssls BIO structure # # returns: value corresponding to openssls X509 structure (0 on failure) Example: my $bio = Net::SSLeay::BIO_new_file($filename, r); my $x509 = Net::SSLeay::PEM_read_bio_X509($bio); Net::SSLeay::BIO_free($bio);

  • PEM_read_bio_X509_REQ COMPATIBILITY: not available in Net-SSLeay-1.45 and before Loads PEM formatted X509_REQ object via given BIO structure. my $rv = Net::SSLeay::PEM_read_bio_X509_REQ($bio, $x=NULL, $cb=NULL, $u=NULL); # $bio - value corresponding to openssls BIO structure # # returns: value corresponding to openssls X509_REQ structure (0 on failure) Example: my $bio = Net::SSLeay::BIO_new_file($filename, r); my $x509_req = Net::SSLeay::PEM_read_bio_X509_REQ($bio); Net::SSLeay::BIO_free($bio);

  • PEM_read_bio_DHparams Reads DH structure from BIO. my $rv = Net::SSLeay::PEM_read_bio_DHparams($bio); # $bio - value corresponding to openssls BIO structure # # returns: value corresponding to openssls DH structure (0 on failure)

  • PEM_read_bio_X509_CRL Reads X509_CRL structure from BIO. my $rv = Net::SSLeay::PEM_read_bio_X509_CRL($bio); # $bio - value corresponding to openssls BIO structure # # returns: value corresponding to openssls X509_CRL structure (0 on failure)

  • PEM_read_bio_PrivateKey COMPATIBILITY: not available in Net-SSLeay-1.45 and before Loads PEM formatted private key via given BIO structure. my $rv = Net::SSLeay::PEM_read_bio_PrivateKey($bio, $cb, $data); # $bio - value corresponding to openssls BIO structure # $cb - reference to perl callback function # $data - data that will be passed to callback function (see examples below) # # returns: value corresponding to openssls EVP_PKEY structure (0 on failure) Example: my $bio = Net::SSLeay::BIO_new_file($filename, r); my $privkey = Net::SSLeay::PEM_read_bio_PrivateKey($bio); # ask for password if needed Net::SSLeay::BIO_free($bio); To use password you have the following options: $privkey = Net::SSLeay::PEM_read_bio_PrivateKey($bio, \callback_func); # use callback func for getting password $privkey = Net::SSLeay::PEM_read_bio_PrivateKey($bio, \callback_func, $data); # use callback_func + pass $data to callback_func $privkey = Net::SSLeay::PEM_read_bio_PrivateKey($bio, undef, “secret”); # use password “secret” $privkey = Net::SSLeay::PEM_read_bio_PrivateKey($bio, undef, “”); # use empty password Callback function signature: sub callback_func { my ($max_passwd_size, $rwflag, $data) = @_; # $max_passwd_size - maximum size of returned password (longer values will be discarded) # $rwflag - indicates whether we are loading (0) or storing (1) - for PEM_read_bio_PrivateKey always 0 # $data - the data passed to PEM_read_bio_PrivateKey as 3rd parameter return “secret”; }

  • PEM_X509_INFO_read_bio Reads a BIO containing a PEM formatted file into a STACK_OF(X509_INFO) structure. my $rv = Net::SSLeay::PEM_X509_INFO_read_bio($bio); # $bio - value corresponding to openssls BIO structure # # returns: value corresponding to openssls STACK_OF(X509_INFO) structure. Example: my $bio = Net::SSLeay::BIO_new_file($filename, r); my $sk_x509_info = Net::SSLeay::PEM_X509_INFO_read_bio($bio); Net::SSLeay::BIO_free($bio);

  • PEM_get_string_X509 NOTE: Does not exactly correspond to any low level API function Converts/exports X509 certificate to string (PEM format). Net::SSLeay::PEM_get_string_X509($x509); # $x509 - value corresponding to openssls X509 structure # # returns: string with $x509 in PEM format

  • PEM_get_string_PrivateKey COMPATIBILITY: not available in Net-SSLeay-1.45 and before. Requires legacy provider with OpenSSL 3.0 and later if the default value of $enc_alg (DES_CBC) is used. Converts public key $pk into PEM formatted string (optionally protected with password). my $rv = Net::SSLeay::PEM_get_string_PrivateKey($pk, $passwd, $enc_alg); # $pk - value corresponding to openssls EVP_PKEY structure # $passwd - [optional] (string) password to use for key encryption # $enc_alg - [optional] algorithm to use for key encryption (default: DES_CBC) - value corresponding to openssls EVP_CIPHER structure # # returns: PEM formatted string Examples: $pem_privkey = Net::SSLeay::PEM_get_string_PrivateKey($pk); $pem_privkey = Net::SSLeay::PEM_get_string_PrivateKey($pk, “secret”); $pem_privkey = Net::SSLeay::PEM_get_string_PrivateKey($pk, “secret”, Net::SSLeay::EVP_get_cipherbyname(“DES-EDE3-CBC”));

  • PEM_get_string_X509_CRL COMPATIBILITY: not available in Net-SSLeay-1.45 and before Converts X509_CRL object $x509_crl into PEM formatted string. Net::SSLeay::PEM_get_string_X509_CRL($x509_crl); # $x509_crl - value corresponding to openssls X509_CRL structure # # returns: no return value

  • PEM_get_string_X509_REQ COMPATIBILITY: not available in Net-SSLeay-1.45 and before Converts X509_REQ object $x509_crl into PEM formatted string. Net::SSLeay::PEM_get_string_X509_REQ($x509_req); # $x509_req - value corresponding to openssls X509_REQ structure # # returns: no return value

Low level API: d2i_* (DER format) related functions

  • d2i_X509_bio COMPATIBILITY: not available in Net-SSLeay-1.45 and before Loads DER formatted X509 certificate via given BIO structure. my $rv = Net::SSLeay::d2i_X509_bio($bp); # $bp - value corresponding to openssls BIO structure # # returns: value corresponding to openssls X509 structure (0 on failure) Example: my $bio = Net::SSLeay::BIO_new_file($filename, rb); my $x509 = Net::SSLeay::d2i_X509_bio($bio); Net::SSLeay::BIO_free($bio); Check openssl doc <https://www.openssl.org/docs/manmaster/man3/d2i_X509.html>

  • d2i_X509_CRL_bio COMPATIBILITY: not available in Net-SSLeay-1.45 and before Loads DER formatted X509_CRL object via given BIO structure. my $rv = Net::SSLeay::d2i_X509_CRL_bio($bp); # $bp - value corresponding to openssls BIO structure # # returns: value corresponding to openssls X509_CRL structure (0 on failure) Example: my $bio = Net::SSLeay::BIO_new_file($filename, rb); my $x509_crl = Net::SSLeay::d2i_X509_CRL_bio($bio); Net::SSLeay::BIO_free($bio);

  • d2i_X509_REQ_bio COMPATIBILITY: not available in Net-SSLeay-1.45 and before Loads DER formatted X509_REQ object via given BIO structure. my $rv = Net::SSLeay::d2i_X509_REQ_bio($bp); # $bp - value corresponding to openssls BIO structure # # returns: value corresponding to openssls X509_REQ structure (0 on failure) Example: my $bio = Net::SSLeay::BIO_new_file($filename, rb); my $x509_req = Net::SSLeay::d2i_X509_REQ_bio($bio); Net::SSLeay::BIO_free($bio);

Low level API: PKCS12 related functions

  • P_PKCS12_load_file COMPATIBILITY: not available in Net-SSLeay-1.45 and before Loads X509 certificate + private key + certificates of CA chain (if present in PKCS12 file). my ($privkey, $cert, @cachain) = Net::SSLeay::P_PKCS12_load_file($filename, $load_chain, $password); # $filename - name of PKCS12 file # $load_chain - [optional] whether load (1) or not(0) CA chain (default: 0) # $password - [optional] password for private key # # returns: triplet ($privkey, $cert, @cachain) # $privkey - value corresponding to openssls EVP_PKEY structure # $cert - value corresponding to openssls X509 structure # @cachain - array of values corresponding to openssls X509 structure (empty if no CA chain in PKCS12) IMPORTANT NOTE: after you do the job you need to call X509_free() on $privkey + all members of @cachain and EVP_PKEY_free() on $privkey. Examples: my ($privkey, $cert) = Net::SSLeay::P_PKCS12_load_file($filename); # or my ($privkey, $cert) = Net::SSLeay::P_PKCS12_load_file($filename, 0, $password); # or my ($privkey, $cert, @cachain) = Net::SSLeay::P_PKCS12_load_file($filename, 1); # or my ($privkey, $cert, @cachain) = Net::SSLeay::P_PKCS12_load_file($filename, 1, $password); # BEWARE: THIS IS WRONG - MEMORY LEAKS! (you cannot free @cachain items) my ($privkey, $cert) = Net::SSLeay::P_PKCS12_load_file($filename, 1, $password); NOTE Net::SSLeay 1.92_01 and earlier: With some combinations of Windows, perl, compiler and compiler options, you may see a runtime error “no OPENSSL_Applink”, when calling Net::SSLeay::P_PKCS12_load_file. See README.Win32 for more details.

Low level API: SESSION_* related functions

  • d2i_SSL_SESSION COMPATIBILITY: does not work in Net-SSLeay-1.85 and before Transforms the binary ASN1 representation string of an SSL/TLS session into an SSL_SESSION object. my $ses = Net::SSLeay::d2i_SSL_SESSION($data); # $data - the session as ASN1 representation string # # returns: $ses - the new SSL_SESSION Check openssl doc <https://www.openssl.org/docs/manmaster/man3/i2d_SSL_SESSION.html>

  • i2d_SSL_SESSION COMPATIBILITY: does not work in Net-SSLeay-1.85 and before Transforms the SSL_SESSION object in into the ASN1 representation and returns it as string. my $data = Net::SSLeay::i2d_SSL_SESSION($ses); # $ses - value corresponding to openssls SSL_SESSION structure # # returns: $data - session as string Check openssl doc <https://www.openssl.org/docs/manmaster/man3/d2i_SSL_SESSION.html>

  • SESSION_new Creates a new SSL_SESSION structure. my $rv = Net::SSLeay::SESSION_new(); # # returns: value corresponding to openssls SSL_SESSION structure (0 on failure)

  • SESSION_free Free an allocated SSL_SESSION structure. Net::SSLeay::SESSION_free($ses); # $ses - value corresponding to openssls SSL_SESSION structure # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_SESSION_free.html>

  • SESSION_up_ref COMPATIBILITY: not available in Net-SSLeay-1.85 and before; requires at least OpenSSL 1.1.0-pre4 or LibreSSL 2.7.0 Increases the reference counter on a SSL_SESSION structure. Net::SSLeay::SESSION_up_ref($ses); # $ses - value corresponding to openssls SSL_SESSION structure # # returns: 1 on success else 0 Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_SESSION_up_ref.html>

  • SESSION_dup COMPATIBILITY: not available in Net-SSLeay-1.85 and before; requires at least OpenSSL 1.1.1, not in LibreSSL Duplicates a SSL_SESSION structure. Net::SSLeay::SESSION_dup($ses); # $ses - value corresponding to openssls SSL_SESSION structure # # returns: the duplicated session Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_SESSION_dup.html>

  • SESSION_is_resumable COMPATIBILITY: not available in Net-SSLeay-1.85 and before; requires at least OpenSSL 1.1.1, not in LibreSSL Determine whether an SSL_SESSION object can be used for resumption. Net::SSLeay::SESSION_is_resumable($ses); # $ses - value corresponding to openssls SSL_SESSION structure # # returns: (integer) 1 if it can or 0 if not Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_SESSION_is_resumable.html>

  • SESSION_cmp Compare two SSL_SESSION structures. my $rv = Net::SSLeay::SESSION_cmp($sesa, $sesb); # $sesa - value corresponding to openssls SSL_SESSION structure # $sesb - value corresponding to openssls SSL_SESSION structure # # returns: 0 if the two structures are the same NOTE: Not available in openssl 1.0 or later

  • SESSION_get_app_data Can be used to get application defined value/data. my $rv = Net::SSLeay::SESSION_get_app_data($ses); # $ses - value corresponding to openssls SSL_SESSION structure # # returns: string/buffer/pointer ???

  • SESSION_set_app_data Can be used to set some application defined value/data. my $rv = Net::SSLeay::SESSION_set_app_data($s, $a); # $s - value corresponding to openssls SSL_SESSION structure # $a - (string/buffer/pointer ???) data # # returns: ???

  • SESSION_get_ex_data Is used to retrieve the information for $idx from session $ses. my $rv = Net::SSLeay::SESSION_get_ex_data($ses, $idx); # $ses - value corresponding to openssls SSL_SESSION structure # $idx - (integer) index for application specific data # # returns: pointer to ??? Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_SESSION_get_ex_new_index.html>

  • SESSION_set_ex_data Is used to store application data at arg for idx into the session object. my $rv = Net::SSLeay::SESSION_set_ex_data($ss, $idx, $data); # $ss - value corresponding to openssls SSL_SESSION structure # $idx - (integer) ??? # $data - (pointer) ??? # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_SESSION_get_ex_new_index.html>

  • SESSION_get_ex_new_index Is used to register a new index for application specific data. my $rv = Net::SSLeay::SESSION_get_ex_new_index($argl, $argp, $new_func, $dup_func, $free_func); # $argl - (long) ??? # $argp - (pointer) ??? # $new_func - function pointer ??? (CRYPTO_EX_new *) # $dup_func - function pointer ??? (CRYPTO_EX_dup *) # $free_func - function pointer ??? (CRYPTO_EX_free *) # # returns: (integer) ??? Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_SESSION_get_ex_new_index.html>

  • SESSION_get_master_key NOTE: Does not exactly correspond to any low level API function Returns ‘master_key’ value from SSL_SESSION structure $s Net::SSLeay::SESSION_get_master_key($s); # $s - value corresponding to openssls SSL_SESSION structure # # returns: master key (binary data)

  • SESSION_set1_master_key COMPATIBILITY: not available in Net-SSLeay-1.92 and before; requires at least OpenSSL 1.1.1pre1, not in LibreSSL Sets the master key value associated with a SSL_SESSION. my $ret = Net::SSLeay::SESSION_set1_master_key($sess, $key); # $sess - value corresponding to OpenSSL SSL_SESSION structure # $key - PSK key in packed binary format # # returns: 1 on success, 0 on failure Example: my $key = pack(H*, deadbeef); my $ret = Net::SSLeay::SESSION_set1_master_key($sess, $key); Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_SESSION_set1_master_key.html>

  • SESSION_set_master_key Sets ‘master_key’ value for SSL_SESSION structure $s Net::SSLeay::SESSION_set_master_key($s, $key); # $s - value corresponding to openssls SSL_SESSION structure # $key - master key (binary data) # # returns: no return value Not available with OpenSSL 1.1 and later. Code that previously used SESSION_set_master_key must now set $secret in the session_secret callback set with SSL_set_session_secret_cb.

  • SESSION_set_cipher COMPATIBILITY: not available in Net-SSLeay-1.92 and before; requires at least OpenSSL 1.1.1pre1, not in LibreSSL Set the ciphersuite associated with an SSL_SESSION. my $ret = Net::SSLeay::SESSION_set_cipher($s, $cipher); # $s - value corresponding to OpenSSL SSL_SESSION structure # $cipher - value corresponding to OpenSSL SSL_CIPHER structure # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_SESSION_set_cipher.html>

  • SESSION_set_protocol_version COMPATIBILITY: not available in Net-SSLeay-1.92 and before; requires at least OpenSSL 1.1.1pre1, not in LibreSSL Sets the protocol version associated with an SSL_SESSION. my $ret = Net::SSLeay::SESSION_set_protocol_version($s, $version); # $s - value corresponding to OpenSSL SSL_SESSION structure # $version - integer version constant. For example Net::SSLeay::TLS1_3_VERSION() # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_SESSION_set_protocol_version.html>

  • SESSION_get0_cipher COMPATIBILITY: not available in Net-SSLeay-1.92 and before; requires at least OpenSSL 1.1.0 or LibreSSL 3.4.0 Returns the value corresponding to OpenSSL’s SSL_CIPHER associated with an SSL_SESSION. my $ret = Net::SSLeay::SESSION_get0_cipher($s); # $s - value corresponding to OpenSSL SSL_SESSION structure # # returns: A value corresponding to OpenSSLs SSL_CIPHER structure or undef if SSL_CIPHER cant be determined. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_SESSION_get0_cipher.html>

  • SESSION_get_time Returns the time at which the session s was established. The time is given in seconds since 1.1.1970. my $rv = Net::SSLeay::SESSION_get_time($s); # $s - value corresponding to openssls SSL_SESSION structure # # returns: timestamp (seconds since 1.1.1970) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_SESSION_get_time.html>

  • get_time Technically the same functionality as “SESSION_get_time”. my $rv = Net::SSLeay::get_time($s);

  • SESSION_get_timeout Returns the timeout value set for session $s in seconds. my $rv = Net::SSLeay::SESSION_get_timeout($s); # $s - value corresponding to openssls SSL_SESSION structure # # returns: timeout (in seconds) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_SESSION_get_time.html>

  • get_timeout Technically the same functionality as “SESSION_get_timeout”. my $rv = Net::SSLeay::get_timeout($s);

  • SESSION_print NOTE: Does not exactly correspond to any low level API function Prints session details (e.g. protocol version, cipher, session-id …) to BIO. my $rv = Net::SSLeay::SESSION_print($fp, $ses); # $fp - value corresponding to openssls BIO structure # $ses - value corresponding to openssls SSL_SESSION structure # # returns: 1 on success, 0 on failure You have to use necessary BIO functions like this: # let us have $ssl corresponding to openssls SSL structure my $ses = Net::SSLeay::get_session($ssl); my $bio = Net::SSLeay::BIO_new(&Net::SSLeay::BIO_s_mem); Net::SSLeay::SESSION_print($bio, $ses); print Net::SSLeay::BIO_read($bio);

  • SESSION_print_fp Prints session details (e.g. protocol version, cipher, session-id …) to file handle. NOTE With some combinations of Windows, perl, compiler and compiler options, you may see a runtime error “no OPENSSL_Applink”, when calling Net::SSLeay::SESSION_print_fp. See README.Win32 for more details. my $rv = Net::SSLeay::SESSION_print_fp($fp, $ses); # $fp - perl file handle # $ses - value corresponding to openssls SSL_SESSION structure # # returns: 1 on success, 0 on failure Example: # let us have $ssl corresponding to openssls SSL structure my $ses = Net::SSLeay::get_session($ssl); open my $fh, “>”, “output.txt”; Net::SSLeay::SESSION_print_fp($fh,$ses); Similar functionality without Net::SSLeay::SESSION_print_fp my $ses = Net::SSLeay::get_session($ssl); my $bio = Net::SSLeay::BIO_new_file(output.txt, w); Net::SSLeay::SESSION_print($bio, $ses);

  • SESSION_set_time Replaces the creation time of the session s with the chosen value $t (seconds since 1.1.1970). my $rv = Net::SSLeay::SESSION_set_time($ses, $t); # $ses - value corresponding to openssls SSL_SESSION structure # $t - time value # # returns: 1 on success Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_SESSION_get_time.html>

  • set_time Technically the same functionality as “SESSION_set_time”. my $rv = Net::SSLeay::set_time($ses, $t);

  • SESSION_set_timeout Sets the timeout value for session s in seconds to $t. my $rv = Net::SSLeay::SESSION_set_timeout($s, $t); # $s - value corresponding to openssls SSL_SESSION structure # $t - timeout (in seconds) # # returns: 1 on success Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_SESSION_get_time.html>

  • set_timeout Technically the same functionality as “SESSION_set_timeout”. my $rv = Net::SSLeay::set_timeout($ses, $t);

Low level API: SSL_CTX_* related functions

NOTE: Please note that the function described in this chapter have “SSL_” part stripped from their original openssl names.

  • CTX_add_client_CA Adds the CA name extracted from $cacert to the list of CAs sent to the client when requesting a client certificate for $ctx. my $rv = Net::SSLeay::CTX_add_client_CA($ctx, $cacert); # $ctx - value corresponding to openssls SSL_CTX structure # $cacert - value corresponding to openssls X509 structure # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_client_CA_list.html>

  • CTX_add_extra_chain_cert Adds the certificate $x509 to the certificate chain presented together with the certificate. Several certificates can be added one after the other. my $rv = Net::SSLeay::CTX_add_extra_chain_cert($ctx, $x509); # $ctx - value corresponding to openssls SSL_CTX structure # $x509 - value corresponding to openssls X509 structure # # returns: 1 on success, check out the error stack to find out the reason for failure otherwise Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_add_extra_chain_cert.html>

  • CTX_add_session Adds the session $ses to the context $ctx. my $rv = Net::SSLeay::CTX_add_session($ctx, $ses); # $ctx - value corresponding to openssls SSL_CTX structure # $ses - value corresponding to openssls SSL_SESSION structure # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_add_session.html>

  • CTX_callback_ctrl ??? (more info needed) my $rv = Net::SSLeay::CTX_callback_ctrl($ctx, $cmd, $fp); # $ctx - value corresponding to openssls SSL_CTX structure # $cmd - (integer) command id # $fp - (function pointer) ??? # # returns: ??? Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_ctrl.html>

  • CTX_check_private_key Checks the consistency of a private key with the corresponding certificate loaded into $ctx. my $rv = Net::SSLeay::CTX_check_private_key($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: 1 on success, otherwise check out the error stack to find out the reason Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_use_certificate.html>

  • CTX_ctrl Internal handling function for SSL_CTX objects. BEWARE: openssl doc says: This function should never be called directly! my $rv = Net::SSLeay::CTX_ctrl($ctx, $cmd, $larg, $parg); # $ctx - value corresponding to openssls SSL_CTX structure # $cmd - (integer) command id # $larg - (integer) long ??? # $parg - (string/pointer) ??? # # returns: (long) result of given command ??? # valid $cmd values # 1 - SSL_CTRL_NEED_TMP_RSA # 2 - SSL_CTRL_SET_TMP_RSA # 3 - SSL_CTRL_SET_TMP_DH # 4 - SSL_CTRL_SET_TMP_ECDH # 5 - SSL_CTRL_SET_TMP_RSA_CB # 6 - SSL_CTRL_SET_TMP_DH_CB # 7 - SSL_CTRL_SET_TMP_ECDH_CB # 8 - SSL_CTRL_GET_SESSION_REUSED # 9 - SSL_CTRL_GET_CLIENT_CERT_REQUEST # 10 - SSL_CTRL_GET_NUM_RENEGOTIATIONS # 11 - SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS # 12 - SSL_CTRL_GET_TOTAL_RENEGOTIATIONS # 13 - SSL_CTRL_GET_FLAGS # 14 - SSL_CTRL_EXTRA_CHAIN_CERT # 15 - SSL_CTRL_SET_MSG_CALLBACK # 16 - SSL_CTRL_SET_MSG_CALLBACK_ARG # 17 - SSL_CTRL_SET_MTU # 20 - SSL_CTRL_SESS_NUMBER # 21 - SSL_CTRL_SESS_CONNECT # 22 - SSL_CTRL_SESS_CONNECT_GOOD # 23 - SSL_CTRL_SESS_CONNECT_RENEGOTIATE # 24 - SSL_CTRL_SESS_ACCEPT # 25 - SSL_CTRL_SESS_ACCEPT_GOOD # 26 - SSL_CTRL_SESS_ACCEPT_RENEGOTIATE # 27 - SSL_CTRL_SESS_HIT # 28 - SSL_CTRL_SESS_CB_HIT # 29 - SSL_CTRL_SESS_MISSES # 30 - SSL_CTRL_SESS_TIMEOUTS # 31 - SSL_CTRL_SESS_CACHE_FULL # 32 - SSL_CTRL_OPTIONS # 33 - SSL_CTRL_MODE # 40 - SSL_CTRL_GET_READ_AHEAD # 41 - SSL_CTRL_SET_READ_AHEAD # 42 - SSL_CTRL_SET_SESS_CACHE_SIZE # 43 - SSL_CTRL_GET_SESS_CACHE_SIZE # 44 - SSL_CTRL_SET_SESS_CACHE_MODE # 45 - SSL_CTRL_GET_SESS_CACHE_MODE # 50 - SSL_CTRL_GET_MAX_CERT_LIST # 51 - SSL_CTRL_SET_MAX_CERT_LIST # 52 - SSL_CTRL_SET_MAX_SEND_FRAGMENT # 53 - SSL_CTRL_SET_TLSEXT_SERVERNAME_CB # 54 - SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG # 55 - SSL_CTRL_SET_TLSEXT_HOSTNAME # 56 - SSL_CTRL_SET_TLSEXT_DEBUG_CB # 57 - SSL_CTRL_SET_TLSEXT_DEBUG_ARG # 58 - SSL_CTRL_GET_TLSEXT_TICKET_KEYS # 59 - SSL_CTRL_SET_TLSEXT_TICKET_KEYS # 60 - SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT # 61 - SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB # 62 - SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB_ARG # 63 - SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB # 64 - SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG # 65 - SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE # 66 - SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS # 67 - SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS # 68 - SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS # 69 - SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS # 70 - SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP # 71 - SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP # 72 - SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB # 73 - DTLS_CTRL_GET_TIMEOUT # 74 - DTLS_CTRL_HANDLE_TIMEOUT # 75 - DTLS_CTRL_LISTEN # 76 - SSL_CTRL_GET_RI_SUPPORT # 77 - SSL_CTRL_CLEAR_OPTIONS # 78 - SSL_CTRL_CLEAR_MODE # 82 - SSL_CTRL_GET_EXTRA_CHAIN_CERTS # 83 - SSL_CTRL_CLEAR_EXTRA_CHAIN_CERTS # 88 - SSL_CTRL_CHAIN # 89 - SSL_CTRL_CHAIN_CERT # 90 - SSL_CTRL_GET_CURVES # 91 - SSL_CTRL_SET_CURVES # 92 - SSL_CTRL_SET_CURVES_LIST # 93 - SSL_CTRL_GET_SHARED_CURVE # 94 - SSL_CTRL_SET_ECDH_AUTO # 97 - SSL_CTRL_SET_SIGALGS # 98 - SSL_CTRL_SET_SIGALGS_LIST # 99 - SSL_CTRL_CERT_FLAGS # 100 - SSL_CTRL_CLEAR_CERT_FLAGS # 101 - SSL_CTRL_SET_CLIENT_SIGALGS # 102 - SSL_CTRL_SET_CLIENT_SIGALGS_LIST # 103 - SSL_CTRL_GET_CLIENT_CERT_TYPES # 104 - SSL_CTRL_SET_CLIENT_CERT_TYPES # 105 - SSL_CTRL_BUILD_CERT_CHAIN # 106 - SSL_CTRL_SET_VERIFY_CERT_STORE # 107 - SSL_CTRL_SET_CHAIN_CERT_STORE # 108 - SSL_CTRL_GET_PEER_SIGNATURE_NID # 109 - SSL_CTRL_GET_SERVER_TMP_KEY # 110 - SSL_CTRL_GET_RAW_CIPHERLIST # 111 - SSL_CTRL_GET_EC_POINT_FORMATS # 112 - SSL_CTRL_GET_TLSA_RECORD # 113 - SSL_CTRL_SET_TLSA_RECORD # 114 - SSL_CTRL_PULL_TLSA_RECORD Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_ctrl.html>

  • CTX_flush_sessions Causes a run through the session cache of $ctx to remove sessions expired at time $tm. Net::SSLeay::CTX_flush_sessions($ctx, $tm); # $ctx - value corresponding to openssls SSL_CTX structure # $tm - specifies the time which should be used for the expiration test (seconds since 1.1.1970) # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_flush_sessions.html>

  • CTX_free Free an allocated SSL_CTX object. Net::SSLeay::CTX_free($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_free.html>

  • CTX_get_app_data Can be used to get application defined value/data. my $rv = Net::SSLeay::CTX_get_app_data($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: string/buffer/pointer ???

  • CTX_set_app_data Can be used to set some application defined value/data. my $rv = Net::SSLeay::CTX_set_app_data($ctx, $arg); # $ctx - value corresponding to openssls SSL_CTX structure # $arg - (string/buffer/pointer ???) data # # returns: ???

  • CTX_get0_param COMPATIBILITY: not available in Net-SSLeay-1.82 and before; requires at least OpenSSL 1.0.2-beta1 or LibreSSL 2.7.0 Returns the current verification parameters. my $vpm = Net::SSLeay::CTX_get0_param($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: value corresponding to openssls X509_VERIFY_PARAM structure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get0_param.html>

  • CTX_get_cert_store Returns the current certificate verification storage. my $rv = Net::SSLeay::CTX_get_cert_store($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: value corresponding to openssls X509_STORE structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_cert_store.html>

  • CTX_get_client_CA_list Returns the list of client CAs explicitly set for $ctx using “CTX_set_client_CA_list”. my $rv = Net::SSLeay::CTX_get_client_CA_list($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: value corresponding to openssls X509_NAME_STACK structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_get_client_CA_list.html>

  • CTX_get_ex_data Is used to retrieve the information for index $idx from $ctx. my $rv = Net::SSLeay::CTX_get_ex_data($ssl, $idx); # $ssl - value corresponding to openssls SSL_CTX structure # $idx - (integer) index for application specific data # # returns: pointer to ??? Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get_ex_new_index.html>

  • CTX_get_ex_new_index Is used to register a new index for application specific data. my $rv = Net::SSLeay::CTX_get_ex_new_index($argl, $argp, $new_func, $dup_func, $free_func); # $argl - (long) ??? # $argp - (pointer) ??? # $new_func - function pointer ??? (CRYPTO_EX_new *) # $dup_func - function pointer ??? (CRYPTO_EX_dup *) # $free_func - function pointer ??? (CRYPTO_EX_free *) # # returns: (integer) ??? Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get_ex_new_index.html>

  • CTX_get_mode Returns the mode set for ctx. my $rv = Net::SSLeay::CTX_get_mode($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: mode (bitmask) # to decode the return value (bitmask) use: # 0x00000001 corresponds to SSL_MODE_ENABLE_PARTIAL_WRITE # 0x00000002 corresponds to SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER # 0x00000004 corresponds to SSL_MODE_AUTO_RETRY # 0x00000008 corresponds to SSL_MODE_NO_AUTO_CHAIN # 0x00000010 corresponds to SSL_MODE_RELEASE_BUFFERS # (note: some of the bits might not be supported by older openssl versions) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_mode.html>

  • CTX_set_mode Adds the mode set via bitmask in $mode to $ctx. Options already set before are not cleared. my $rv = Net::SSLeay::CTX_set_mode($ctx, $mode); # $ctx - value corresponding to openssls SSL_CTX structure # $mode - mode bitmask # # returns: the new mode bitmask after adding $mode For bitmask details see “CTX_get_mode” (above). Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_mode.html>

  • CTX_get_options Returns the options (bitmask) set for $ctx. my $rv = Net::SSLeay::CTX_get_options($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: options (bitmask) BEWARE: The available constants and their values in bitmask depend on the TLS library. For example, SSL_OP_NO_TLSv1_3 became available much later than SSL_OP_NO_COMPRESS which is already deprecated by some libraries. Also, some previously used option values have been recycled and are now used for newer options. See the list of constants in this document for options Net::SSLeay currently supports. You are strongly encouraged to check your TLS library if you need to use numeric values directly. The following is a sample of historic values. It may not be correct anymore. # to decode the return value (bitmask) use: # 0x00000004 corresponds to SSL_OP_LEGACY_SERVER_CONNECT # 0x00000800 corresponds to SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS # 0x00004000 corresponds to SSL_OP_NO_TICKET # 0x00010000 corresponds to SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION # 0x00400000 corresponds to SSL_OP_CIPHER_SERVER_PREFERENCE # 0x04000000 corresponds to SSL_OP_NO_TLSv1 Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get_options.html>

  • CTX_set_options Adds the options set via bitmask in $options to ctx. Options already set before are not cleared. Net::SSLeay::CTX_set_options($ctx, $options); # $ctx - value corresponding to openssls SSL_CTX structure # $options - options bitmask # # returns: the new options bitmask after adding $options For bitmask details see “CTX_get_options” (above). Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html>

  • CTX_get_quiet_shutdown Returns the ‘quiet shutdown’ setting of $ctx. my $rv = Net::SSLeay::CTX_get_quiet_shutdown($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: (integer) the current setting Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_quiet_shutdown.html>

  • CTX_get_read_ahead my $rv = Net::SSLeay::CTX_get_read_ahead($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: (integer) read_ahead value

  • CTX_get_session_cache_mode Returns the currently used cache mode (bitmask). my $rv = Net::SSLeay::CTX_get_session_cache_mode($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: mode (bitmask) BEWARE: SESS_CACHE_OFF and other constants are not available in Net-SSLeay-1.82 and before. If the constants are not available, the following values have historically been correct. You are strongly encouraged to check your TLS library for the current values. # to decode the return value (bitmask) use: # 0x0000 corresponds to SSL_SESS_CACHE_OFF # 0x0001 corresponds to SSL_SESS_CACHE_CLIENT # 0x0002 corresponds to SSL_SESS_CACHE_SERVER # 0x0080 corresponds to SSL_SESS_CACHE_NO_AUTO_CLEAR # 0x0100 corresponds to SSL_SESS_CACHE_NO_INTERNAL_LOOKUP # 0x0200 corresponds to SSL_SESS_CACHE_NO_INTERNAL_STORE # (note: some of the bits might not be supported by older openssl versions) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_session_cache_mode.html>

  • CTX_set_session_cache_mode Enables/disables session caching by setting the operational mode for $ctx to $mode. my $rv = Net::SSLeay::CTX_set_session_cache_mode($ctx, $mode); # $ctx - value corresponding to openssls SSL_CTX structure # $mode - mode (bitmask) # # returns: previously set cache mode For bitmask details see “CTX_get_session_cache_mode” (above). Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_session_cache_mode.html>

  • CTX_get_timeout Returns the currently set timeout value for $ctx. my $rv = Net::SSLeay::CTX_get_timeout($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: timeout in seconds Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_timeout.html>

  • CTX_get_verify_depth Returns the verification depth limit currently set in $ctx. If no limit has been explicitly set, -1 is returned and the default value will be used. my $rv = Net::SSLeay::CTX_get_verify_depth($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: depth limit currently set in $ctx, -1 if no limit has been explicitly set Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get_verify_mode.html>

  • CTX_get_verify_mode Returns the verification mode (bitmask) currently set in $ctx. my $rv = Net::SSLeay::CTX_get_verify_mode($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: mode (bitmask) For bitmask details see “CTX_set_verify”. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get_verify_mode.html>

  • CTX_set_verify Sets the verification flags for $ctx to be $mode and specifies the verify_callback function to be used. Net::SSLeay::CTX_set_verify($ctx, $mode, $callback); # $ctx - value corresponding to openssls SSL_CTX structure # $mode - mode (bitmask), see OpenSSL manual # $callback - [optional] reference to perl callback function # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_verify.html>

  • CTX_set_post_handshake_auth COMPATIBILITY: not available in Net-SSLeay-1.85 and before; requires at least OpenSSL 1.1.1, not in LibreSSL Enable the Post-Handshake Authentication extension to be added to the ClientHello such that post-handshake authentication can be requested by the server. Net::SSLeay::CTX_set_posthandshake_auth($ctx, $val); # $ctx - value corresponding to openssls SSL_CTX structure # $val - 0 then the extension is not sent, otherwise it is # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_post_handshake_auth.html>

  • CTX_load_verify_locations Specifies the locations for $ctx, at which CA certificates for verification purposes are located. The certificates available via $CAfile and $CApath are trusted. my $rv = Net::SSLeay::CTX_load_verify_locations($ctx, $CAfile, $CApath); # $ctx - value corresponding to openssls SSL_CTX structure # $CAfile - (string) file of CA certificates in PEM format, the file can contain several CA certificates (or ) # $CApath - (string) directory containing CA certificates in PEM format (or ) # # returns: 1 on success, 0 on failure (check the error stack to find out the reason) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_load_verify_locations.html>

  • CTX_need_tmp_RSA Return the result of SSL_CTX_ctrl(ctx,SSL_CTRL_NEED_TMP_RSA,0,NULL) my $rv = Net::SSLeay::CTX_need_tmp_RSA($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: result of SSL_CTRL_NEED_TMP_RSA command Not available with OpenSSL 1.1 and later.

  • CTX_new The same as “CTX_v23_new” my $rv = Net::SSLeay::CTX_new(); # # returns: value corresponding to openssls SSL_CTX structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_new.html> Not available with OpenSSL 1.1 and later.

  • CTX_v2_new Creates a new SSL_CTX object - based on SSLv2_method() - as framework to establish TLS/SSL enabled connections. my $rv = Net::SSLeay::CTX_v2_new(); # # returns: value corresponding to openssls SSL_CTX structure (0 on failure)

  • CTX_v23_new Creates a new SSL_CTX object - based on SSLv23_method() - as framework to establish TLS/SSL enabled connections. my $rv = Net::SSLeay::CTX_v23_new(); # # returns: value corresponding to openssls SSL_CTX structure (0 on failure)

  • CTX_v3_new Creates a new SSL_CTX object - based on SSLv3_method() - as framework to establish TLS/SSL enabled connections. my $rv = Net::SSLeay::CTX_v3_new(); # # returns: value corresponding to openssls SSL_CTX structure (0 on failure)

  • CTX_tlsv1_new COMPATIBILITY: Requires OpenSSL or LibreSSL built with support for TLSv1. Creates a new SSL_CTX object - based on TLSv1_method() - as a framework for establishing connections using TLSv1. my $rv = Net::SSLeay::CTX_tlsv1_new(); # # returns: value corresponding to openssls SSL_CTX structure (0 on failure)

  • CTX_tlsv1_1_new COMPATIBILITY: Requires OpenSSL >= 1.0.1 or LibreSSL built with support for TLSv1.1. Creates a new SSL_CTX object - based on TLSv1_1_method() - as a framework for establishing connections using TLSv1.1. my $rv = Net::SSLeay::CTX_tlsv1_1_new(); # # returns: value corresponding to openssls SSL_CTX structure (0 on failure)

  • CTX_tlsv1_2_new COMPATIBILITY: Requires OpenSSL >= 1.0.1 or LibreSSL built with support for TLSv1.2. Creates a new SSL_CTX object - based on TLSv1_2_method() - as a framework for establishing connections using TLSv1.2. my $rv = Net::SSLeay::CTX_tlsv1_2_new(); # # returns: value corresponding to openssls SSL_CTX structure (0 on failure)

  • CTX_new_with_method Creates a new SSL_CTX object based on $meth method my $rv = Net::SSLeay::CTX_new_with_method($meth); # $meth - value corresponding to openssls SSL_METHOD structure # # returns: value corresponding to openssls SSL_CTX structure (0 on failure) # example my $ctx = Net::SSLeay::CTX_new_with_method(&Net::SSLeay::TLSv1_method); Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_new.html>

  • CTX_set_min_proto_version, CTX_set_max_proto_version, set_min_proto_version and set_max_proto_version, COMPATIBILITY: not available in Net-SSLeay-1.82 and before; requires at least OpenSSL 1.1.0-pre2 or LibreSSL 2.6.0 Set the minimum and maximum supported protocol for $ctx or $ssl. my $rv = Net::SSLeay::CTX_set_min_proto_version($ctx, $version); # $ctx - value corresponding to openssls SSL_CTX structure # $version - (integer) constant version value or 0 for automatic lowest or highest value # # returns: 1 on success, 0 on failure # example: allow only TLS 1.2 for a SSL_CTX my $rv_min = Net::SSLeay::CTX_set_min_proto_version($ctx, Net::SSLeay::TLS1_2_VERSION()); my $rv_max = Net::SSLeay::CTX_set_max_proto_version($ctx, Net::SSLeay::TLS1_2_VERSION()); # example: allow only TLS 1.1 for a SSL my $rv_min = Net::SSLeay::set_min_proto_version($ssl, Net::SSLeay::TLS1_1_VERSION()); my $rv_max = Net::SSLeay::set_max_proto_version($ssl, Net::SSLeay::TLS1_1_VERSION()); Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_min_proto_version.html>

  • CTX_get_min_proto_version, CTX_get_max_proto_version, get_min_proto_version and get_max_proto_version, COMPATIBILITY: not available in Net-SSLeay-1.82 and before; requires at least OpenSSL 1.1.0g Get the minimum and maximum supported protocol for $ctx or $ssl. my $version = Net::SSLeay::CTX_get_min_proto_version($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: 0 automatic lowest or highest value, configured value otherwise Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_min_proto_version.html>

  • CTX_remove_session Removes the session $ses from the context $ctx. my $rv = Net::SSLeay::CTX_remove_session($ctx, $ses); # $ctx - value corresponding to openssls SSL_CTX structure # $ses - value corresponding to openssls SSL_SESSION structure # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_add_session.html>

  • CTX_sess_accept my $rv = Net::SSLeay::CTX_sess_accept($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: number of started SSL/TLS handshakes in server mode Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_sess_number.html>

  • CTX_sess_accept_good my $rv = Net::SSLeay::CTX_sess_accept_good($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: number of successfully established SSL/TLS sessions in server mode Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_sess_number.html>

  • CTX_sess_accept_renegotiate my $rv = Net::SSLeay::CTX_sess_accept_renegotiate($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: number of start renegotiations in server mode Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_sess_number.html>

  • CTX_sess_cache_full my $rv = Net::SSLeay::CTX_sess_cache_full($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: number of sessions that were removed because the maximum session cache size was exceeded Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_sess_number.html>

  • CTX_sess_cb_hits my $rv = Net::SSLeay::CTX_sess_cb_hits($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: number of successfully retrieved sessions from the external session cache in server mode Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_sess_number.html>

  • CTX_sess_connect my $rv = Net::SSLeay::CTX_sess_connect($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: number of started SSL/TLS handshakes in client mode Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_sess_number.html>

  • CTX_sess_connect_good my $rv = Net::SSLeay::CTX_sess_connect_good($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: number of successfully established SSL/TLS sessions in client mode Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_sess_number.html>

  • CTX_sess_connect_renegotiate my $rv = Net::SSLeay::CTX_sess_connect_renegotiate($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: number of start renegotiations in client mode Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_sess_number.html>

  • CTX_sess_get_cache_size Returns the currently valid session cache size. my $rv = Net::SSLeay::CTX_sess_get_cache_size($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: current size Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_sess_set_cache_size.html>

  • CTX_sess_hits my $rv = Net::SSLeay::CTX_sess_hits($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: number of successfully reused sessions Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_sess_number.html>

  • CTX_sess_misses my $rv = Net::SSLeay::CTX_sess_misses($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: number of sessions proposed by clients that were not found in the internal session cache in server mode Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_sess_number.html>

  • CTX_sess_number my $rv = Net::SSLeay::CTX_sess_number($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: current number of sessions in the internal session cache Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_sess_number.html>

  • CTX_sess_set_cache_size Sets the size of the internal session cache of context $ctx to $size. Net::SSLeay::CTX_sess_set_cache_size($ctx, $size); # $ctx - value corresponding to openssls SSL_CTX structure # $size - cache size (0 = unlimited) # # returns: previously valid size Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_sess_set_cache_size.html>

  • CTX_sess_timeouts Returns the number of sessions proposed by clients and either found in the internal or external session cache in server mode, but that were invalid due to timeout. These sessions are not included in the SSL_CTX_sess_hits count. my $rv = Net::SSLeay::CTX_sess_timeouts($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: number of sessions Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_sess_number.html>

  • CTX_sess_set_new_cb COMPATIBILITY: not available in Net-SSLeay-1.85 and before Sets the callback function, which is automatically called whenever a new session was negotiated. Net::SSLeay::CTX_sess_set_new_cb($ctx, $func); # $ctx - value corresponding to openssls SSL_CTX structure # $func - perl reference to callback function # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_sess_set_new_cb.html>

  • CTX_sess_set_remove_cb COMPATIBILITY: not available in Net-SSLeay-1.85 and before Sets the callback function, which is automatically called whenever a session is removed by the SSL engine. Net::SSLeay::CTX_sess_set_remove_cb($ctx, $func); # $ctx - value corresponding to openssls SSL_CTX structure # $func - perl reference to callback function # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_sess_set_remove_cb.html>

  • CTX_sessions Returns a pointer to the lhash databases containing the internal session cache for ctx. my $rv = Net::SSLeay::CTX_sessions($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: value corresponding to openssls LHASH structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_sessions.html>

  • CTX_set1_param COMPATIBILITY: requires at least OpenSSL 1.0.0-beta3 Applies X509 verification parameters $vpm on $ctx my $rv = Net::SSLeay::CTX_set1_param($ctx, $vpm); # $ctx - value corresponding to openssls SSL_CTX structure # $vpm - value corresponding to openssls X509_VERIFY_PARAM structure # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get0_param.html>

  • CTX_set_cert_store Sets/replaces the certificate verification storage of $ctx to/with $store. Net::SSLeay::CTX_set_cert_store($ctx, $store); # $ctx - value corresponding to openssls SSL_CTX structure # $store - value corresponding to openssls X509_STORE structure # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_cert_store.html>

  • CTX_set_cert_verify_callback Sets the verification callback function for $ctx. SSL objects that are created from $ctx inherit the setting valid at the time when Net::SSLeay::new($ctx) is called. Net::SSLeay::CTX_set_cert_verify_callback($ctx, $func, $data); # $ctx - value corresponding to openssls SSL_CTX structure # $func - perl reference to callback function # $data - [optional] data that will be passed to callback function when invoked # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_cert_verify_callback.html>

  • CTX_set_cipher_list Sets the list of available ciphers for $ctx using the control string $str. The list of ciphers is inherited by all ssl objects created from $ctx. my $rv = Net::SSLeay::CTX_set_cipher_list($s, $str); # $s - value corresponding to openssls SSL_CTX structure # $str - (string) cipher list e.g. 3DES:+RSA # # returns: 1 if any cipher could be selected and 0 on complete failure The format of $str is described in <https://www.openssl.org/docs/manmaster/man1/openssl-ciphers.html> Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_cipher_list.html>

  • CTX_set_ciphersuites COMPATIBILITY: not available in Net-SSLeay-1.85 and before; requires at least OpenSSL 1.1.1 or at least LibreSSL 3.4.0 and Net-SSLeay-1.94 Configure the available TLSv1.3 ciphersuites. my $rv = Net::SSLeay::CTX_set_ciphersuites($ctx, $str); # $ctx - value corresponding to openssls SSL_CTX structure # $str - colon (”:”) separated list of TLSv1.3 ciphersuite names in order of preference # # returns: (integer) 1 if the requested ciphersuite list was configured, and 0 otherwise Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_ciphersuites.html>

  • CTX_set_client_CA_list Sets the list of CAs sent to the client when requesting a client certificate for $ctx. Net::SSLeay::CTX_set_client_CA_list($ctx, $list); # $ctx - value corresponding to openssls SSL_CTX structure # $list - value corresponding to openssls X509_NAME_STACK structure # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_client_CA_list.html>

  • CTX_set_default_passwd_cb Sets the default password callback called when loading/storing a PEM certificate with encryption. Net::SSLeay::CTX_set_default_passwd_cb($ctx, $func); # $ctx - value corresponding to openssls SSL_CTX structure # $func - perl reference to callback function # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_default_passwd_cb.html>

  • CTX_set_default_passwd_cb_userdata Sets a pointer to userdata which will be provided to the password callback on invocation. Net::SSLeay::CTX_set_default_passwd_cb_userdata($ctx, $userdata); # $ctx - value corresponding to openssls SSL_CTX structure # $userdata - data that will be passed to callback function when invoked # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_default_passwd_cb.html>

  • CTX_set_default_verify_paths ??? (more info needed) my $rv = Net::SSLeay::CTX_set_default_verify_paths($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: 1 on success, 0 on failure

  • CTX_set_ex_data Is used to store application data at $data for $idx into the $ctx object. my $rv = Net::SSLeay::CTX_set_ex_data($ssl, $idx, $data); # $ssl - value corresponding to openssls SSL_CTX structure # $idx - (integer) ??? # $data - (pointer) ??? # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get_ex_new_index.html>

  • CTX_set_purpose my $rv = Net::SSLeay::CTX_set_purpose($s, $purpose); # $s - value corresponding to openssls SSL_CTX structure # $purpose - (integer) purpose identifier # # returns: 1 on success, 0 on failure # available purpose identifier # 1 - X509_PURPOSE_SSL_CLIENT # 2 - X509_PURPOSE_SSL_SERVER # 3 - X509_PURPOSE_NS_SSL_SERVER # 4 - X509_PURPOSE_SMIME_SIGN # 5 - X509_PURPOSE_SMIME_ENCRYPT # 6 - X509_PURPOSE_CRL_SIGN # 7 - X509_PURPOSE_ANY # 8 - X509_PURPOSE_OCSP_HELPER # 9 - X509_PURPOSE_TIMESTAMP_SIGN # or use corresponding constants $purpose = &Net::SSLeay::X509_PURPOSE_SSL_CLIENT; # … $purpose = &Net::SSLeay::X509_PURPOSE_TIMESTAMP_SIGN;

  • CTX_set_quiet_shutdown Sets the ‘quiet shutdown’ flag for $ctx to be mode. SSL objects created from $ctx inherit the mode valid at the time Net::SSLeay::new($ctx) is called. Net::SSLeay::CTX_set_quiet_shutdown($ctx, $mode); # $ctx - value corresponding to openssls SSL_CTX structure # $mode - 0 or 1 # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_quiet_shutdown.html>

  • CTX_set_read_ahead my $rv = Net::SSLeay::CTX_set_read_ahead($ctx, $val); # $ctx - value corresponding to openssls SSL_CTX structure # $val - read_ahead value to be set # # returns: the original read_ahead value

  • CTX_set_session_id_context Sets the context $sid_ctx of length $sid_ctx_len within which a session can be reused for the $ctx object. my $rv = Net::SSLeay::CTX_set_session_id_context($ctx, $sid_ctx, $sid_ctx_len); # $ctx - value corresponding to openssls SSL_CTX structure # $sid_ctx - data buffer # $sid_ctx_len - length of data in $sid_ctx # # returns: 1 on success, 0 on failure (the error is logged to the error stack) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_session_id_context.html>

  • CTX_set_ssl_version Sets a new default TLS/SSL method for SSL objects newly created from this $ctx. SSL objects already created with Net::SSLeay::new($ctx) are not affected, except when Net::SSLeay:clear($ssl) is being called. my $rv = Net::SSLeay::CTX_set_ssl_version($ctx, $meth); # $ctx - value corresponding to openssls SSL_CTX structure # $meth - value corresponding to openssls SSL_METHOD structure # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_ssl_version.html>

  • CTX_set_timeout Sets the timeout for newly created sessions for $ctx to $t. The timeout value $t must be given in seconds. my $rv = Net::SSLeay::CTX_set_timeout($ctx, $t); # $ctx - value corresponding to openssls SSL_CTX structure # $t - timeout in seconds # # returns: previously set timeout value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_timeout.html>

  • CTX_set_tmp_dh Sets DH parameters to be used to be $dh. The key is inherited by all ssl objects created from $ctx. my $rv = Net::SSLeay::CTX_set_tmp_dh($ctx, $dh); # $ctx - value corresponding to openssls SSL_CTX structure # $dh - value corresponding to openssls DH structure # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_tmp_dh_callback.html>

  • CTX_set_tmp_dh_callback Sets the callback function for $ctx to be used when a DH parameters are required to $tmp_dh_callback. Net::SSLeay::CTX_set_tmp_dh_callback($ctx, $tmp_dh_callback); # $ctx - value corresponding to openssls SSL_CTX structure # tmp_dh_callback - (function pointer) ??? # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_tmp_dh_callback.html>

  • CTX_set_tmp_rsa Sets the temporary/ephemeral RSA key to be used to be $rsa. my $rv = Net::SSLeay::CTX_set_tmp_rsa($ctx, $rsa); # $ctx - value corresponding to openssls SSL_CTX structure # $rsa - value corresponding to openssls RSA structure # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/man1.0.2/man3/SSL_CTX_set_tmp_rsa_callback.html> Not available with OpenSSL 1.1 and later.

  • CTX_set_tmp_rsa_callback Sets the callback function for ctx to be used when a temporary/ephemeral RSA key is required to $tmp_rsa_callback. ??? (does this function really work?) Net::SSLeay::CTX_set_tmp_rsa_callback($ctx, $tmp_rsa_callback); # $ctx - value corresponding to openssls SSL_CTX structure # $tmp_rsa_callback - (function pointer) ??? # # returns: no return value Check openssl doc <https://www.openssl.org/docs/man1.0.2/man3/SSL_CTX_set_tmp_rsa_callback.html> Not available with OpenSSL 1.1 and later.

  • CTX_set_trust my $rv = Net::SSLeay::CTX_set_trust($s, $trust); # $s - value corresponding to openssls SSL_CTX structure # $trust - (integer) trust identifier # # returns: the original value # available trust identifiers # 1 - X509_TRUST_COMPAT # 2 - X509_TRUST_SSL_CLIENT # 3 - X509_TRUST_SSL_SERVER # 4 - X509_TRUST_EMAIL # 5 - X509_TRUST_OBJECT_SIGN # 6 - X509_TRUST_OCSP_SIGN # 7 - X509_TRUST_OCSP_REQUEST # 8 - X509_TRUST_TSA # or use corresponding constants $trust = &Net::SSLeay::X509_TRUST_COMPAT; # … $trust = &Net::SSLeay::X509_TRUST_TSA;

  • CTX_set_verify_depth Sets the maximum depth for the certificate chain verification that shall be allowed for ctx. Net::SSLeay::CTX_set_verify_depth($ctx, $depth); # $ctx - value corresponding to openssls SSL_CTX structure # $depth - max. depth # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_verify.html>

  • CTX_use_PKCS12_file Adds the certificate and private key from PKCS12 file $p12filename to $ctx. my $rv = Net::SSLeay::CTX_use_PKCS12_file($ctx, $p12filename, $password); # $ctx - value corresponding to openssls SSL_CTX structure # $p12filename - (string) filename # $password - (string) password to decrypt private key # # returns: 1 on success, 0 on failure NOTE Net::SSLeay 1.92_01 and earlier: With some combinations of Windows, perl, compiler and compiler options, you may see a runtime error “no OPENSSL_Applink”, when calling Net::SSLeay::CTX_use_PKCS12_file. See README.Win32 for more details.

  • CTX_use_PrivateKey Adds the private key $pkey to $ctx. my $rv = Net::SSLeay::CTX_use_PrivateKey($ctx, $pkey); # $ctx - value corresponding to openssls SSL_CTX structure # $pkey - value corresponding to openssls EVP_PKEY structure # # returns: 1 on success, otherwise check out the error stack to find out the reason Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_use_certificate.html>

  • CTX_use_PrivateKey_file Adds the first private key found in $file to $ctx. my $rv = Net::SSLeay::CTX_use_PrivateKey_file($ctx, $file, $type); # $ctx - value corresponding to openssls SSL_CTX structure # $file - (string) file name # $type - (integer) type - use constants &Net::SSLeay::FILETYPE_PEM or &Net::SSLeay::FILETYPE_ASN1 # # returns: 1 on success, otherwise check out the error stack to find out the reason Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_use_certificate.html>

  • CTX_use_RSAPrivateKey Adds the RSA private key $rsa to $ctx. my $rv = Net::SSLeay::CTX_use_RSAPrivateKey($ctx, $rsa); # $ctx - value corresponding to openssls SSL_CTX structure # $rsa - value corresponding to openssls RSA structure # # returns: 1 on success, otherwise check out the error stack to find out the reason Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_use_certificate.html>

  • CTX_use_RSAPrivateKey_file Adds the first RSA private key found in $file to $ctx. my $rv = Net::SSLeay::CTX_use_RSAPrivateKey_file($ctx, $file, $type); # $ctx - value corresponding to openssls SSL_CTX structure # $file - (string) file name # $type - (integer) type - use constants &Net::SSLeay::FILETYPE_PEM or &Net::SSLeay::FILETYPE_ASN1 # # returns: 1 on success, otherwise check out the error stack to find out the reason

  • CTX_use_certificate Loads the certificate $x into $ctx my $rv = Net::SSLeay::CTX_use_certificate($ctx, $x); # $ctx - value corresponding to openssls SSL_CTX structure # $x - value corresponding to openssls X509 structure # # returns: 1 on success, otherwise check out the error stack to find out the reason Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_use_certificate.html>

  • CTX_use_certificate_chain_file Loads a certificate chain from $file into $ctx. The certificates must be in PEM format and must be sorted starting with the subject’s certificate (actual client or server certificate), followed by intermediate CA certificates if applicable, and ending at the highest level (root) CA. my $rv = Net::SSLeay::CTX_use_certificate_chain_file($ctx, $file); # $ctx - value corresponding to openssls SSL_CTX structure # $file - (string) file name # # returns: 1 on success, otherwise check out the error stack to find out the reason Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_use_certificate.html>

  • CTX_use_certificate_file Loads the first certificate stored in $file into $ctx. my $rv = Net::SSLeay::CTX_use_certificate_file($ctx, $file, $type); # $ctx - value corresponding to openssls SSL_CTX structure # $file - (string) file name # $type - (integer) type - use constants &Net::SSLeay::FILETYPE_PEM or &Net::SSLeay::FILETYPE_ASN1 # # returns: 1 on success, otherwise check out the error stack to find out the reason Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_use_certificate.html>

  • CTX_get_security_level COMPATIBILITY: not available in Net-SSLeay-1.85 and before; requires at least OpenSSL 1.1.0 or at least LibreSSL 3.6.0 and Net-SSLeay-1.94 Returns the security level associated with $ctx. my $level = Net::SSLeay::CTX_get_security_level($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: (integer) current security level Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get_security_level.html>

  • CTX_set_security_level COMPATIBILITY: not available in Net-SSLeay-1.85 and before; requires at least OpenSSL 1.1.0 or at least LibreSSL 3.6.0 and Net-SSLeay-1.94 Sets the security level associated with $ctx to $level. Net::SSLeay::CTX_set_security_level($ctx, $level); # $ssl - value corresponding to openssls SSL_CTX structure # $level - new security level # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_security_level.html>

  • CTX_set_num_tickets COMPATIBILITY: not available in Net-SSLeay-1.85 and before; requires at least OpenSSL 1.1.1 or at least LibreSSL 3.5.0 and Net-SSLeay-1.94 Set number of TLSv1.3 session tickets that will be sent to a client. my $rv = Net::SSLeay::CTX_set_num_tickets($ctx, $number_of_tickets); # $ctx - value corresponding to openssls SSL_CTX structure # $number_of_tickets - number of tickets to send # # returns: 1 on success, 0 on failure Set to zero if you do not no want to support a session resumption. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_num_tickets.html>

  • CTX_get_num_tickets COMPATIBILITY: not available in Net-SSLeay-1.85 and before; requires at least OpenSSL 1.1.1 or at least LibreSSL 3.5.0 and Net-SSLeay-1.94 Get number of TLSv1.3 session tickets that will be sent to a client. my $number_of_tickets = Net::SSLeay::CTX_get_num_tickets($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: (integer) number of tickets to send Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get_num_tickets.html>

  • CTX_set_keylog_callback COMPATIBILITY: not available in Net-SSLeay-1.90 and before; requires at least OpenSSL 1.1.1pre1 or at least LibreSSL 3.5.0 and Net-SSLeay-1.94 Set the TLS key logging callback. Net::SSLeay::CTX_set_keylog_callback($ctx, $cb); # $ctx - value corresponding to openssls SSL_CTX structure # $cb - reference to a perl callback function # # returns: no return value The callback function will be called like this: keylog_cb_func($ssl, $line); # $ssl - value corresponding to OpenSSLs SSL object associated with the connection # $line - a string containing the key material in the format used by NSS for its SSLKEYLOGFILE debugging output Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_keylog_callback.html>

  • CTX_get_keylog_callback COMPATIBILITY: not available in Net-SSLeay-1.90 and before; requires at least OpenSSL 1.1.1pre1 or at least LibreSSL 3.5.0 and Net-SSLeay-1.94 Retrieve the previously set TLS key logging callback. my $cb = Net::SSLeay::CTX_get_keylog_callback($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: a reference to a perl callback function or undef if no callback is set Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get_keylog_callback.html>

  • CTX_set_client_hello_cb COMPATIBILITY: not available in Net-SSLeay-1.92 and before; requires at least OpenSSL 1.1.1pre1, not in LibreSSL Set a callback function called during the early stages of ClientHello processing on the server. When callback is undef, the existing callback is disabled. Net::SSLeay::CTX_set_client_hello_cb($ctx, $f, [$arg]); # $ctx - value corresponding to openssls SSL_CTX structure # $f - sub { my ($ssl, $arg) = @_; …; return ($ret, $al); } # $arg - optional data passed to the callback function when invoked # # returns: no return value The callback function will be called like this: client_hello_cb_func($ssl, $arg); # $ssl - value corresponding to OpenSSLs SSL object associated with the connection # $arg - data to callback # # An alert code must be returned with SSL_CLIENT_HELLO_FAILURE. # Return value examples: # ok: return Net::SSLeay::CLIENT_HELLO_SUCCESS(); # suspend: return Net::SSLeay::CLIENT_HELLO_RETRY(); # error: return (Net::SSLeay::CLIENT_HELLO_FAILURE(), Net::SSLeay::AD_NO_APPLICATION_PROTOCOL()); Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_client_hello_cb.html>

Low level API: SSL_* related functions

NOTE: Please note that the function described in this chapter have “SSL_” part stripped from their original openssl names.

  • new Creates a new SSL structure which is needed to hold the data for a TLS/SSL connection. The new structure inherits the settings of the underlying context $ctx: connection method (SSLv2/v3/TLSv1), options, verification settings, timeout settings. my $rv = Net::SSLeay::new($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: value corresponding to openssls SSL structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_new.html>

  • accept Waits for a TLS/SSL client to initiate the TLS/SSL handshake. The communication channel must already have been set and assigned to the ssl by setting an underlying BIO. my $rv = Net::SSLeay::accept($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: 1 = success, 0 = handshake not successful, <0 = fatal error during handshake Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_accept.html>

  • add_client_CA Adds the CA name extracted from cacert to the list of CAs sent to the client when requesting a client certificate for the chosen ssl, overriding the setting valid for ssl’s SSL_CTX object. my $rv = Net::SSLeay::add_client_CA($ssl, $x); # $ssl - value corresponding to openssls SSL structure # $x - value corresponding to openssls X509 structure # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_client_CA_list.html>

  • callback_ctrl ??? (more info needed) my $rv = Net::SSLeay::callback_ctrl($ssl, $cmd, $fp); # $ssl - value corresponding to openssls SSL structure # $cmd - (integer) command id # $fp - (function pointer) ??? # # returns: ??? Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_ctrl.html>

  • check_private_key Checks the consistency of a private key with the corresponding certificate loaded into $ssl my $rv = Net::SSLeay::check_private_key($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: 1 on success, otherwise check out the error stack to find out the reason Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_use_certificate.html>

  • clear Reset SSL object to allow another connection. Net::SSLeay::clear($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_clear.html>

  • connect Initiate the TLS/SSL handshake with an TLS/SSL server. my $rv = Net::SSLeay::connect($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: 1 = success, 0 = handshake not successful, <0 = fatal error during handshake Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_connect.html>

  • copy_session_id Copies the session structure fro $from to $to (+ also the private key and certificate associated with $from). Net::SSLeay::copy_session_id($to, $from); # $to - value corresponding to openssls SSL structure # $from - value corresponding to openssls SSL structure # # returns: no return value

  • ctrl Internal handling function for SSL objects. BEWARE: openssl doc says: This function should never be called directly! my $rv = Net::SSLeay::ctrl($ssl, $cmd, $larg, $parg); # $ssl - value corresponding to openssls SSL structure # $cmd - (integer) command id # $larg - (integer) long ??? # $parg - (string/pointer) ??? # # returns: (long) result of given command ??? For more details about valid $cmd values check “CTX_ctrl”. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_ctrl.html>

  • do_handshake Will wait for a SSL/TLS handshake to take place. If the connection is in client mode, the handshake will be started. The handshake routines may have to be explicitly set in advance using either SSL_set_connect_state or SSL_set_accept_state (3). my $rv = Net::SSLeay::do_handshake($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: 1 = success, 0 = handshake not successful, <0 = fatal error during handshake Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_do_handshake.html>

  • dup Returns a duplicate of $ssl. my $rv = Net::SSLeay::dup($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: value corresponding to openssls SSL structure (0 on failure)

  • free Free an allocated SSL structure. Net::SSLeay::free($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_free.html>

  • get0_param COMPATIBILITY: not available in Net-SSLeay-1.82 and before; requires at least OpenSSL 1.0.2-beta1 or LibreSSL 2.7.0 Returns the current verification parameters. my $vpm = Net::SSLeay::get0_param($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: value corresponding to openssls X509_VERIFY_PARAM structure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get0_param.html>

  • get_SSL_CTX Returns a pointer to the SSL_CTX object, from which $ssl was created with Net::SSLeay::new. my $rv = Net::SSLeay::get_SSL_CTX($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: value corresponding to openssls SSL_CTX structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_get_SSL_CTX.html>

  • set_SSL_CTX COMPATIBILITY: requires at least OpenSSL 0.9.8f Sets the SSL_CTX the corresponds to an SSL session. my $the_ssl_ctx = Net::SSLeay::set_SSL_CTX($ssl, $ssl_ctx); # $ssl - value corresponding to openssls SSL structure # $ssl_ctx - Change the ssl object to the given ssl_ctx # # returns - the ssl_ctx

  • get_app_data Can be used to get application defined value/data. my $rv = Net::SSLeay::get_app_data($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: string/buffer/pointer ???

  • set_app_data Can be used to set some application defined value/data. my $rv = Net::SSLeay::set_app_data($ssl, $arg); # $ssl - value corresponding to openssls SSL structure # $arg - (string/buffer/pointer ???) data # # returns: ???

  • get_certificate Gets X509 certificate from an established SSL connection. my $rv = Net::SSLeay::get_certificate($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: value corresponding to openssls X509 structure (0 on failure)

  • get_cipher Obtains the name of the currently used cipher. my $rv = Net::SSLeay::get_cipher($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: (string) cipher name e.g. DHE-RSA-AES256-SHA or , when no session has been established. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_get_current_cipher.html>

  • get_cipher_bits Obtain the number of secret/algorithm bits used. my $rv = Net::SSLeay::get_cipher_bits($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: number of secret bits used by current cipher Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_get_current_cipher.html> and <https://www.openssl.org/docs/manmaster/man3/SSL_CIPHER_get_name.html>

  • get_ciphers COMPATIBILITY: not available in Net-SSLeay-1.88 and before Returns a list of SSL_CIPHER structures available for $ssl sorted by preference my @ciphers = Net::SSLeay::get_ciphers($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: (list) SSL_CIPHER structures or nothing when $ssl is undefined or no ciphers are available Example: my @ciphers = Net::SSLeay::get_ciphers($ssl); foreach my $c (@ciphers) { print Net::SSLeay::CIPHER_get_name($c) . " “; } Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_get_ciphers.html>

  • get_cipher_list Returns the name (string) of the SSL_CIPHER listed for $ssl with priority $n. my $rv = Net::SSLeay::get_cipher_list($ssl, $n); # $ssl - value corresponding to openssls SSL structure # $n - (integer) priority # # returns: (string) cipher name e.g. EDH-DSS-DES-CBC3-SHA or undef in case of error Call Net::SSLeay::get_cipher_list with priority starting from 0 to obtain the sorted list of available ciphers, until undef is returned: my $priority = 0; while (my $c = Net::SSLeay::get_cipher_list($ssl, $priority)) { print “cipher[$priority] = $c “; $priority++; } Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_get_cipher_list.html>

  • get_client_CA_list Returns the list of client CAs explicitly set for $ssl using Net::SSLeay::set_client_CA_list or $ssl’s SSL_CTX object with Net::SSLeay::CTX_set_client_CA_list, when in server mode. In client mode, returns the list of client CAs sent from the server, if any. my $rv = Net::SSLeay::get_client_CA_list($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: value corresponding to openssls STACK_OF(X509_NAME) structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_get_client_CA_list.html>

  • get_current_cipher Returns the cipher actually used. my $rv = Net::SSLeay::get_current_cipher($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: value corresponding to openssls SSL_CIPHER structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_get_current_cipher.html>

  • get_default_timeout Returns the default timeout value assigned to SSL_SESSION objects negotiated for the protocol valid for $ssl. my $rv = Net::SSLeay::get_default_timeout($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: (long) timeout in seconds Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_get_default_timeout.html>

  • get_error Returns a result code for a preceding call to connect, accept, do_handshake, read, peek or write on $ssl. my $rv = Net::SSLeay::get_error($ssl, $ret); # $ssl - value corresponding to openssls SSL structure # $ret - return value of preceding TLS/SSL I/O operation # # returns: result code, which is one of the following values: # 0 - SSL_ERROR_NONE # 1 - SSL_ERROR_SSL # 2 - SSL_ERROR_WANT_READ # 3 - SSL_ERROR_WANT_WRITE # 4 - SSL_ERROR_WANT_X509_LOOKUP # 5 - SSL_ERROR_SYSCALL # 6 - SSL_ERROR_ZERO_RETURN # 7 - SSL_ERROR_WANT_CONNECT # 8 - SSL_ERROR_WANT_ACCEPT Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_get_error.html>

  • get_ex_data Is used to retrieve the information for $idx from $ssl. my $rv = Net::SSLeay::get_ex_data($ssl, $idx); # $ssl - value corresponding to openssls SSL structure # $idx - (integer) index for application specific data # # returns: pointer to ??? Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_get_ex_new_index.html>

  • set_ex_data Is used to store application data at $data for $idx into the $ssl object. my $rv = Net::SSLeay::set_ex_data($ssl, $idx, $data); # $ssl - value corresponding to openssls SSL structure # $idx - (integer) ??? # $data - (pointer) ??? # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_get_ex_new_index.html>

  • get_ex_new_index Is used to register a new index for application specific data. my $rv = Net::SSLeay::get_ex_new_index($argl, $argp, $new_func, $dup_func, $free_func); # $argl - (long) ??? # $argp - (pointer) ??? # $new_func - function pointer ??? (CRYPTO_EX_new *) # $dup_func - function pointer ??? (CRYPTO_EX_dup *) # $free_func - function pointer ??? (CRYPTO_EX_free *) # # returns: (integer) ??? Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_get_ex_new_index.html>

  • get_fd Returns the file descriptor which is linked to $ssl. my $rv = Net::SSLeay::get_fd($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: file descriptor (>=0) or -1 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_get_fd.html>

  • get_finished Obtains the latest ‘Finished’ message sent to the peer. Return value is zero if there’s been no Finished message yet. Default count is 2*EVP_MAX_MD_SIZE that is long enough for all possible Finish messages. If you supply a non-default count, the resulting return value may be longer than returned buf’s length. my $rv = Net::SSLeay::get_finished($ssl, $buf, $count); # $ssl - value corresponding to openssls SSL structure # $buf - buffer where the returned data will be stored # $count - [optional] max size of return data - default is 2*EVP_MAX_MD_SIZE # # returns: length of latest Finished message

  • get_peer_finished Obtains the latest ‘Finished’ message expected from the peer. Parameters and return value are similar to get_finished(). my $rv = Net::SSLeay::get_peer_finished($ssl, $buf, $count); # $ssl - value corresponding to openssls SSL structure # $buf - buffer where the returned data will be stored # $count - [optional] max size of return data - default is 2*EVP_MAX_MD_SIZE # # returns: length of latest Finished message

  • get_keyblock_size Gets the length of the TLS keyblock. Look for ‘key_block’ in TLS 1.2 and earlier TLS RFCs. Consider using TLS exporter interface defined by RFC 5705 instead of creating your own keying material exporter. NOTE: Does not exactly correspond to any low level API function. Intended for EAP-FAST. my $rv = Net::SSLeay::get_keyblock_size($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: keyblock size, -1 on error

  • get_mode Returns the mode (bitmask) set for $ssl. my $rv = Net::SSLeay::get_mode($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: mode (bitmask) To decode the return value (bitmask) see documentation for “CTX_get_mode”. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_mode.html>

  • set_mode Adds the mode set via bitmask in $mode to $ssl. Options already set before are not cleared. my $rv = Net::SSLeay::set_mode($ssl, $mode); # $ssl - value corresponding to openssls SSL structure # $mode - mode (bitmask) # # returns: the new mode bitmask after adding $mode For $mode bitmask details see “CTX_get_mode”. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_mode.html>

  • get_options Returns the options (bitmask) set for $ssl. my $rv = Net::SSLeay::get_options($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: options (bitmask) To decode the return value (bitmask) see documentation for “CTX_get_options”. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html>

  • set_options Adds the options set via bitmask in $options to $ssl. Options already set before are not cleared! Net::SSLeay::set_options($ssl, $options); # $ssl - value corresponding to openssls SSL structure # $options - options (bitmask) # # returns: the new options bitmask after adding $options For $options bitmask details see “CTX_get_options”. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html>

  • get_peer_certificate Get the X509 certificate of the peer. my $rv = Net::SSLeay::get_peer_certificate($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: value corresponding to openssls X509 structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_get_peer_certificate.html>

  • get_peer_cert_chain Get the certificate chain of the peer as an array of X509 structures. my @chain = Net::SSLeay::get_peer_cert_chain($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: list of X509 structures Example: my @chain = Net::SSLeay::get_peer_cert_chain($ssl); foreach my $x509 (@chain) { print Net::SSLeay::X509_NAME_oneline(Net::SSLeay::X509_get_subject_name($cert)) . " “; } Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_get_peer_cert_chain.html>

  • get_quiet_shutdown Returns the ‘quiet shutdown’ setting of ssl. my $rv = Net::SSLeay::get_quiet_shutdown($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: (integer) current quiet shutdown value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_quiet_shutdown.html>

  • get_rbio Get ‘read’ BIO linked to an SSL object $ssl. my $rv = Net::SSLeay::get_rbio($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: value corresponding to openssls BIO structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_get_rbio.html>

  • get_read_ahead my $rv = Net::SSLeay::get_read_ahead($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: (integer) read_ahead value

  • set_read_ahead Net::SSLeay::set_read_ahead($ssl, $val); # $ssl - value corresponding to openssls SSL structure # $val - read_ahead value to be set # # returns: the original read_ahead value

  • get_security_level COMPATIBILITY: not available in Net-SSLeay-1.85 and before; requires at least OpenSSL 1.1.0 or at least LibreSSL 3.6.0 and Net-SSLeay-1.94 Returns the security level associated with $ssl. my $level = Net::SSLeay::get_security_level($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: (integer) current security level Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_get_security_level.html>

  • set_security_level COMPATIBILITY: not available in Net-SSLeay-1.85 and before; requires at least OpenSSL 1.1.0 or at least LibreSSL 3.6.0 and Net-SSLeay-1.94 Sets the security level associated with $ssl to $level. Net::SSLeay::set_security_level($ssl, $level); # $ssl - value corresponding to openssls SSL structure # $level - new security level # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_set_security_level.html>

  • set_num_tickets COMPATIBILITY: not available in Net-SSLeay-1.85 and before; requires at least OpenSSL 1.1.1 or at least LibreSSL 3.5.0 and Net-SSLeay-1.94 Set number of TLSv1.3 session tickets that will be sent to a client. my $rv = Net::SSLeay::set_num_tickets($ssl, $number_of_tickets); # $ssl - value corresponding to openssls SSL structure # $number_of_tickets - number of tickets to send # # returns: 1 on success, 0 on failure Set to zero if you do not no want to support a session resumption. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_set_num_tickets.html>

  • get_num_tickets COMPATIBILITY: not available in Net-SSLeay-1.85 and before; requires at least OpenSSL 1.1.1 or at least LibreSSL 3.5.0 and Net-SSLeay-1.94 Get number of TLSv1.3 session tickets that will be sent to a client. my $number_of_tickets = Net::SSLeay::get_num_tickets($ctx); # $ctx - value corresponding to openssls SSL structure # # returns: number of tickets to send Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_get_num_tickets.html>

  • get_server_random Returns internal SSLv3 server_random value. Net::SSLeay::get_server_random($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: server_random value (binary data)

  • get_client_random NOTE: Does not exactly correspond to any low level API function Returns internal SSLv3 client_random value. Net::SSLeay::get_client_random($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: client_random value (binary data)

  • export_keying_material Returns keying material based on the string $label and optional $context. Note that with TLSv1.2 and lower, empty context (empty string) and undefined context (no value or ‘undef’) will return different values. my $out = Net::SSLeay::export_keying_material($ssl, $olen, $label, $context); # $ssl - value corresponding to openssls SSL structure # $olen - number of bytes to return # $label - application specific label # $context - [optional] context - default is undef for no context # # returns: keying material (binary data) or undef on error Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_export_keying_material.html>

  • get_session Retrieve TLS/SSL session data used in $ssl. The reference count of the SSL_SESSION is NOT incremented. my $rv = Net::SSLeay::get_session($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: value corresponding to openssls SSL_SESSION structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_get_session.html>

  • SSL_get0_session The alias for “get_session” (note that the name is SSL_get0_session NOT get0_session). my $rv = Net::SSLeay::SSL_get0_session();

  • get1_session Returns a pointer to the SSL_SESSION actually used in $ssl. The reference count of the SSL_SESSION is incremented by 1. my $rv = Net::SSLeay::get1_session($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: value corresponding to openssls SSL_SESSION structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_get_session.html>

  • get_shared_ciphers Returns string with a list (colon ‘:’ separated) of ciphers shared between client and server within SSL session $ssl. my $rv = Net::SSLeay::get_shared_ciphers(); # # returns: string like ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:…

  • get_shutdown Returns the shutdown mode of $ssl. my $rv = Net::SSLeay::get_shutdown($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: shutdown mode (bitmask) of ssl # to decode the return value (bitmask) use: # 0 - No shutdown setting, yet # 1 - SSL_SENT_SHUTDOWN # 2 - SSL_RECEIVED_SHUTDOWN Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_set_shutdown.html>

  • get_ssl_method Returns a function pointer to the TLS/SSL method set in $ssl. my $rv = Net::SSLeay::get_ssl_method($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: value corresponding to openssls SSL_METHOD structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_ssl_version.html>

  • in_init, in_before, is_init_finished, in_connect_init, in_accept_init COMPATIBILITY: not available in Net-SSLeay-1.85 and before. Retrieve information about the handshake state machine. All functions take $ssl as the only argument and return 0 or 1. These functions are recommended over get_state() and state(). my $rv = Net::SSLeay::is_init_finished($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: All functions return 1 or 0 Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_in_init.html>

  • get_state COMPATIBILITY: OpenSSL 1.1.0 and later use different constants which are not made available. Use is_init_finished() and related functions instead. Returns the SSL connection state. my $rv = Net::SSLeay::get_state($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: (integer) state value # to decode the returned state check: # SSL_ST_* constants in openssl/ssl.h # SSL2_ST_* constants in openssl/ssl2.h # SSL23_ST_* constants in openssl/ssl23.h # SSL3_ST_* + DTLS1_ST_* constants in openssl/ssl3.h

  • state Exactly the same as “get_state”. my $rv = Net::SSLeay::state($ssl);

  • set_state Sets the SSL connection state. Net::SSLeay::set_state($ssl,Net::SSLeay::SSL_ST_ACCEPT()); Not available with OpenSSL 1.1 and later.

  • get_verify_depth Returns the verification depth limit currently set in $ssl. my $rv = Net::SSLeay::get_verify_depth($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: current depth or -1 if no limit has been explicitly set Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get_verify_mode.html>

  • set_verify_depth Sets the maximum depth for the certificate chain verification that shall be allowed for $ssl. Net::SSLeay::set_verify_depth($ssl, $depth); # $ssl - value corresponding to openssls SSL structure # $depth - (integer) depth # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_verify.html>

  • get_verify_mode Returns the verification mode (bitmask) currently set in $ssl. my $rv = Net::SSLeay::get_verify_mode($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: mode (bitmask) To decode the return value (bitmask) see documentation for “CTX_get_verify_mode”. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get_verify_mode.html>

  • set_verify Sets the verification flags for $ssl to be $mode and specifies the $verify_callback function to be used. Net::SSLeay::set_verify($ssl, $mode, $callback); # $ssl - value corresponding to openssls SSL structure # $mode - mode (bitmask) # $callback - [optional] reference to perl callback function # # returns: no return value For $mode bitmask details see “CTX_get_verify_mode”. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_verify.html>

  • set_post_handshake_auth COMPATIBILITY: not available in Net-SSLeay-1.85 and before; requires at least OpenSSL 1.1.1, not in LibreSSL Enable the Post-Handshake Authentication extension to be added to the ClientHello such that post-handshake authentication can be requested by the server. Net::SSLeay::set_posthandshake_auth($ssl, $val); # $ssl - value corresponding to openssls SSL structure # $val - 0 then the extension is not sent, otherwise it is # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_set_post_handshake_auth.html>

  • verify_client_post_handshake COMPATIBILITY: not available in Net-SSLeay-1.85 and before; requires at least OpenSSL 1.1.1, not in LibreSSL verify_client_post_handshake causes a CertificateRequest message to be sent by a server on the given ssl connection. my $rv = Net::SSLeay::verify_client_post_handshake($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: 1 if the request succeeded, and 0 if the request failed. The error stack can be examined to determine the failure reason. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_verify_client_post_handshake.html>

  • get_verify_result Returns the result of the verification of the X509 certificate presented by the peer, if any. my $rv = Net::SSLeay::get_verify_result($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: (integer) # 0 - X509_V_OK: ok # 2 - X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: unable to get issuer certificate # 3 - X509_V_ERR_UNABLE_TO_GET_CRL: unable to get certificate CRL # 4 - X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: unable to decrypt certificates signature # 5 - X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: unable to decrypt CRLs signature # 6 - X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: unable to decode issuer public key # 7 - X509_V_ERR_CERT_SIGNATURE_FAILURE: certificate signature failure # 8 - X509_V_ERR_CRL_SIGNATURE_FAILURE: CRL signature failure # 9 - X509_V_ERR_CERT_NOT_YET_VALID: certificate is not yet valid # 10 - X509_V_ERR_CERT_HAS_EXPIRED: certificate has expired # 11 - X509_V_ERR_CRL_NOT_YET_VALID: CRL is not yet valid # 12 - X509_V_ERR_CRL_HAS_EXPIRED: CRL has expired # 13 - X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: format error in certificates notBefore field # 14 - X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: format error in certificates notAfter field # 15 - X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: format error in CRLs lastUpdate field # 16 - X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: format error in CRLs nextUpdate field # 17 - X509_V_ERR_OUT_OF_MEM: out of memory # 18 - X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: self signed certificate # 19 - X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: self signed certificate in certificate chain # 20 - X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: unable to get local issuer certificate # 21 - X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: unable to verify the first certificate # 22 - X509_V_ERR_CERT_CHAIN_TOO_LONG: certificate chain too long # 23 - X509_V_ERR_CERT_REVOKED: certificate revoked # 24 - X509_V_ERR_INVALID_CA: invalid CA certificate # 25 - X509_V_ERR_PATH_LENGTH_EXCEEDED: path length constraint exceeded # 26 - X509_V_ERR_INVALID_PURPOSE: unsupported certificate purpose # 27 - X509_V_ERR_CERT_UNTRUSTED: certificate not trusted # 28 - X509_V_ERR_CERT_REJECTED: certificate rejected # 29 - X509_V_ERR_SUBJECT_ISSUER_MISMATCH: subject issuer mismatch # 30 - X509_V_ERR_AKID_SKID_MISMATCH: authority and subject key identifier mismatch # 31 - X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: authority and issuer serial number mismatch # 32 - X509_V_ERR_KEYUSAGE_NO_CERTSIGN:key usage does not include certificate signing # 50 - X509_V_ERR_APPLICATION_VERIFICATION: application verification failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_get_verify_result.html>

  • set_verify_result Override result of peer certificate verification. Net::SSLeay::set_verify_result($ssl, $v); # $ssl - value corresponding to openssls SSL structure # $v - (integer) result value # # returns: no return value For more info about valid return values see “get_verify_result” Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_set_verify_result.html>

  • get_wbio Get ‘write’ BIO linked to an SSL object $ssl. my $rv = Net::SSLeay::get_wbio($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: value corresponding to openssls BIO structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_get_rbio.html>

  • load_client_CA_file Load X509 certificates from file (PEM formatted). my $rv = Net::SSLeay::load_client_CA_file($file); # $file - (string) file name # # returns: value corresponding to openssls STACK_OF(X509_NAME) structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_load_client_CA_file.html>

  • clear_num_renegotiations Executes SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS command on $ssl. my $rv = Net::SSLeay::clear_num_renegotiations($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: command result

  • need_tmp_RSA Executes SSL_CTRL_NEED_TMP_RSA command on $ssl. my $rv = Net::SSLeay::need_tmp_RSA($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: command result Not available with OpenSSL 1.1 and later.

  • num_renegotiations Executes SSL_CTRL_GET_NUM_RENEGOTIATIONS command on $ssl. my $rv = Net::SSLeay::num_renegotiations($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: command result

  • total_renegotiations Executes SSL_CTRL_GET_TOTAL_RENEGOTIATIONS command on $ssl. my $rv = Net::SSLeay::total_renegotiations($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: command result

  • peek Copies $max bytes from the specified $ssl into the returned value. In contrast to the Net::SSLeay::read() function, the data in the SSL buffer is unmodified after the SSL_peek() operation. Net::SSLeay::peek($ssl, $max); # $ssl - value corresponding to openssls SSL structure # $max - [optional] max bytes to peek (integer) - default is 32768 # # in scalar context: data read from the TLS/SSL connection, undef on error # in list context: two-item array consisting of data read (undef on error), # and return code from SSL_peek().

  • peek_ex COMPATIBILITY: not available in Net-SSLeay-1.85 and before; requires at least OpenSSL 1.1.1, not in LibreSSL Copies $max bytes from the specified $ssl into the returned value. In contrast to the Net::SSLeay::read_ex() function, the data in the SSL buffer is unmodified after the SSL_peek_ex() operation. my($got, $rv) = Net::SSLeay::peek_ex($ssl, $max); # $ssl - value corresponding to openssls SSL structure # $max - [optional] max bytes to peek (integer) - default is 32768 # # returns a list: two-item list consisting of data read (undef on error), # and return code from SSL_peek_ex(). Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_peek_ex.html>

  • pending Obtain number of readable bytes buffered in $ssl object. my $rv = Net::SSLeay::pending($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: the number of bytes pending Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_pending.html>

  • has_pending COMPATIBILITY: not available in Net-SSLeay-1.85 and before; requires at least OpenSSL 1.1.0, not in LibreSSL Returns 1 if $ssl has buffered data (whether processed or unprocessed) and 0 otherwise. my $rv = Net::SSLeay::has_pending($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: (integer) 1 or 0 Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_has_pending.html>

  • read Tries to read $max bytes from the specified $ssl. my $got = Net::SSLeay::read($ssl, $max); my($got, $rv) = Net::SSLeay::read($ssl, $max); # $ssl - value corresponding to openssls SSL structure # $max - [optional] max bytes to read (integer) - default is 32768 # # returns: # in scalar context: data read from the TLS/SSL connection, undef on error # in list context: two-item array consisting of data read (undef on error), # and return code from SSL_read(). Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_read.html>

  • read_ex COMPATIBILITY: not available in Net-SSLeay-1.85 and before; requires at least OpenSSL 1.1.1, not in LibreSSL Tries to read $max bytes from the specified $ssl. my($got, $rv) = Net::SSLeay::read_ex($ssl, $max); # $ssl - value corresponding to openssls SSL structure # $max - [optional] max bytes to read (integer) - default is 32768 # # returns a list: two-item list consisting of data read (undef on error), # and return code from SSL_read_ex(). Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_read_ex.html>

  • renegotiate Turn on flags for renegotiation so that renegotiation will happen my $rv = Net::SSLeay::renegotiate($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: 1 on success, 0 on failure

  • rstate_string Returns a 2 letter string indicating the current read state of the SSL object $ssl. my $rv = Net::SSLeay::rstate_string($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: 2-letter string Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_rstate_string.html>

  • rstate_string_long Returns a string indicating the current read state of the SSL object ssl. my $rv = Net::SSLeay::rstate_string_long($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: string with current state Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_rstate_string.html>

  • session_reused Query whether a reused session was negotiated during handshake. my $rv = Net::SSLeay::session_reused($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: 0 - new session was negotiated; 1 - session was reused. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_session_reused.html>

  • set1_param COMPATIBILITY: requires at least OpenSSL 1.0.0-beta3 Applies X509 verification parameters $vpm on $ssl my $rv = Net::SSLeay::set1_param($ssl, $vpm); # $ssl - value corresponding to openssls SSL structure # $vpm - value corresponding to openssls X509_VERIFY_PARAM structure # # returns: 1 on success, 0 on failure

  • set_accept_state Sets $ssl to work in server mode. Net::SSLeay::set_accept_state($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_set_connect_state.html>

  • set_bio Connects the BIOs $rbio and $wbio for the read and write operations of the TLS/SSL (encrypted) side of $ssl. Net::SSLeay::set_bio($ssl, $rbio, $wbio); # $ssl - value corresponding to openssls SSL structure # $rbio - value corresponding to openssls BIO structure # $wbio - value corresponding to openssls BIO structure # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_set_bio.html>

  • set_cipher_list Sets the list of ciphers only for ssl. my $rv = Net::SSLeay::set_cipher_list($ssl, $str); # $ssl - value corresponding to openssls SSL structure # $str - (string) cipher list e.g. 3DES:+RSA # # returns: 1 if any cipher could be selected and 0 on complete failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_cipher_list.html>

  • set_ciphersuites COMPATIBILITY: not available in Net-SSLeay-1.85 and before; requires at least OpenSSL 1.1.1 or at least LibreSSL 3.4.0 and Net-SSLeay-1.94 Configure the available TLSv1.3 ciphersuites. my $rv = Net::SSLeay::set_ciphersuites($ssl, $str); # $ssl - value corresponding to openssls SSL structure # $str - colon (”:”) separated list of TLSv1.3 ciphersuite names in order of preference # # returns: (integer) 1 if the requested ciphersuite list was configured, and 0 otherwise Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_set_ciphersuites.html>

  • set_client_CA_list Sets the list of CAs sent to the client when requesting a client certificate for the chosen $ssl, overriding the setting valid for $ssl’s SSL_CTX object. my $rv = Net::SSLeay::set_client_CA_list($ssl, $list); # $ssl - value corresponding to openssls SSL structure # $list - value corresponding to openssls STACK_OF(X509_NAME) structure # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_client_CA_list.html>

  • set_connect_state Sets $ssl to work in client mode. Net::SSLeay::set_connect_state($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_set_connect_state.html>

  • set_fd Sets the file descriptor $fd as the input/output facility for the TLS/SSL (encrypted) side of $ssl, $fd will typically be the socket file descriptor of a network connection. my $rv = Net::SSLeay::set_fd($ssl, $fd); # $ssl - value corresponding to openssls SSL structure # $fd - (integer) file handle (got via perls fileno) # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_set_fd.html>

  • set_psk_client_callback Sets the psk client callback. Net::SSLeay::set_psk_client_callback($ssl, sub { my $hint = shift; return ($identity, $key) } ); # $ssl - value corresponding to openssls SSL structure # $hint - PSK identity hint send by the server # $identity - PSK identity # $key - PSK key, hex string without the leading 0x, e.g. deadbeef # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_set_psk_client_callback.html>

  • set_rfd Sets the file descriptor $fd as the input (read) facility for the TLS/SSL (encrypted) side of $ssl. my $rv = Net::SSLeay::set_rfd($ssl, $fd); # $ssl - value corresponding to openssls SSL structure # $fd - (integer) file handle (got via perls fileno) # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_set_fd.html>

  • set_wfd my $rv = Net::SSLeay::set_wfd($ssl, $fd); # $ssl - value corresponding to openssls SSL structure # $fd - (integer) file handle (got via perls fileno) # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_set_fd.html>

  • set_info_callback Sets the callback function, that can be used to obtain state information for $ssl during connection setup and use. When callback is undef, the callback setting currently valid for ctx is used. Net::SSLeay::set_info_callback($ssl, $cb, [$data]); # $ssl - value corresponding to openssls SSL structure # $cb - sub { my ($ssl,$where,$ret,$data) = @_; … } # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_info_callback.html>

  • CTX_set_info_callback Sets the callback function on ctx, that can be used to obtain state information during ssl connection setup and use. When callback is undef, an existing callback will be disabled. Net::SSLeay::CTX_set_info_callback($ssl, $cb, [$data]); # $ssl - value corresponding to openssls SSL structure # $cb - sub { my ($ssl,$where,$ret,$data) = @_; … } # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_info_callback.html>

  • set_msg_callback Sets the callback function, that can be used to obtain protocol messages information for $ssl during connection setup and use. When callback is undef, the callback setting currently valid for ctx is used. Note that set_msg_callback_arg is not provided as there is no need to explicitly set $arg, this is handled by set_msg_callback. Net::SSLeay::set_msg_callback($ssl, $cb, [$arg]); # $ssl - value corresponding to openssls SSL structure # $cb - sub { my ($write_p,$version,$content_type,$buf,$len,$ssl,$arg) = @_; … } # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_set_msg_callback.html>

  • CTX_set_msg_callback Sets the callback function on ctx, that can be used to obtain protocol messages information for ssl connection setup and use. When callback is undef, the existing callback will be disabled. Note that CTX_set_msg_callback_arg is not provided as there is no need to explicitly set $arg, this is handled by CTX_set_msg_callback. Net::SSLeay::CTX_set_msg_callback($ssl, $cb, [$arg]); # $ssl - value corresponding to openssls SSL structure # $cb - sub { my ($write_p,$version,$content_type,$buf,$len,$ssl,$arg) = @_; … } # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_msg_callback.html>

  • set_pref_cipher Sets the list of available ciphers for $ssl using the control string $str. my $rv = Net::SSLeay::set_pref_cipher($ssl, $str); # $ssl - value corresponding to openssls SSL structure # $str - (string) cipher list e.g. 3DES:+RSA # # returns: 1 if any cipher could be selected and 0 on complete failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_cipher_list.html>

  • CTX_set_psk_client_callback Sets the psk client callback. Net::SSLeay::CTX_set_psk_client_callback($ssl, sub { my $hint = shift; return ($identity, $key) } ); # $ssl - value corresponding to openssls SSL structure # $hint - PSK identity hint send by the server # $identity - PSK identity # $key - PSK key, hex string without the leading 0x, e.g. deadbeef # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_psk_client_callback.html>

  • set_purpose my $rv = Net::SSLeay::set_purpose($ssl, $purpose); # $ssl - value corresponding to openssls SSL structure # $purpose - (integer) purpose identifier # # returns: 1 on success, 0 on failure For more info about available $purpose identifiers see “CTX_set_purpose”.

  • set_quiet_shutdown Sets the ‘quiet shutdown’ flag for $ssl to be $mode. Net::SSLeay::set_quiet_shutdown($ssl, $mode); # $ssl - value corresponding to openssls SSL structure # $mode - 0 or 1 # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_quiet_shutdown.html>

  • set_session Set a TLS/SSL session to be used during TLS/SSL connect. my $rv = Net::SSLeay::set_session($to, $ses); # $to - value corresponding to openssls SSL structure # $ses - value corresponding to openssls SSL_SESSION structure # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_set_session.html>

  • set_session_id_context Sets the context $sid_ctx of length $sid_ctx_len within which a session can be reused for the $ssl object. my $rv = Net::SSLeay::set_session_id_context($ssl, $sid_ctx, $sid_ctx_len); # $ssl - value corresponding to openssls SSL structure # $sid_ctx - data buffer # $sid_ctx_len - length of data in $sid_ctx # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_session_id_context.html>

  • set_session_secret_cb Setup pre-shared secret session resumption function. Net::SSLeay::set_session_secret_cb($ssl, $func, $data); # $ssl - value corresponding to openssls SSL structure # $func - perl reference to callback function # $data - [optional] data that will be passed to callback function when invoked # # returns: no return value The callback function will be called like: callback_function($secret, $ciphers, $pref_cipher, $data); # $secret is the current master session key, usually all 0s at the beginning of a session # $ciphers is ref to an array of peer cipher names # $pref_cipher is a ref to an index into the list of cipher names of # the preferred cipher. Set it if you want to specify a preferred cipher # $data is the data passed to set_session_secret_cb The callback function should return 1 if it likes the suggested cipher (or has selected an alternative by setting pref_cipher), else it should return 0 (in which case OpenSSL will select its own preferred cipher). With OpenSSL 1.1 and later, callback_function can change the master key for the session by altering $secret and returning 1.

  • CTX_set_tlsext_ticket_getkey_cb Setup encryption for TLS session tickets (stateless session reuse). Net::SSLeay::CTX_set_tlsext_ticket_getkey_cb($ctx, $func, $data); # $ctx - value corresponding to openssls SSL_CTX structure # $func - perl reference to callback function # $data - [optional] data that will be passed to callback function when invoked # # returns: no return value The callback function will be called like: getkey($data,[$key_name]) -> ($key,$current_key_name) # $data is the data passed to set_session_secret_cb # $key_name is the name of the key OpenSSL has extracted from the session ticket # $key is the requested key for ticket encryption + HMAC # $current_key_name is the name for the currently valid key OpenSSL will call the function without a key name if it generates a new ticket. It then needs the callback to return the encryption+HMAC key and an identifier (key name) for this key. When OpenSSL gets a session ticket from the client it extracts the key name and calls the callback with this name as argument. It then expects the callback to return the encryption+HMAC key matching the requested key name and and also the key name which should be used at the moment. If the requested key name and the returned key name differ it means that this session ticket was created with an expired key and need to be renewed. In this case OpenSSL will call the callback again with no key name to create a new session ticket based on the old one. The key must be at least 32 byte of random data which can be created with RAND_bytes. Internally the first 16 byte are used as key in AES-128 encryption while the next 16 byte are used for the SHA-256 HMAC. The key name are binary data and must be exactly 16 byte long. Example: Net::SSLeay::RAND_bytes(my $oldkey,32); Net::SSLeay::RAND_bytes(my $newkey,32); my $oldkey_name = pack(“a16”,oldsecret); my $newkey_name = pack(“a16”,newsecret); my @keys = ( [ $newkey_name, $newkey ], # current active key [ $oldkey_name, $oldkey ], # already expired ); Net::SSLeay::CTX_set_tlsext_ticket_getkey_cb($server2->_ctx, sub { my ($mykeys,$name) = @_; # return (current_key, current_key_name) if no name given return ($mykeys->[0][1],$mykeys->[0][0]) if ! $name; # return (matching_key, current_key_name) if we find a key matching # the given name for(my $i = 0; $i<@$mykeys; $i++) { next if $name ne $mykeys->[$i][0]; return ($mykeys->[$i][1],$mykeys->[0][0]); } # no matching key found return; },\keys); This function is based on the OpenSSL function SSL_CTX_set_tlsext_ticket_key_cb but provides a simpler to use interface. For more information see <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_tlsext_ticket_key_cb.html>

  • set_session_ticket_ext_cb Setup callback for TLS session tickets (stateless session reuse). Net::SSLeay::set_session_ticket_ext_cb($ssl, $func, $data); # $ssl - value corresponding to openssls SSL structure # $func - perl reference to callback function # $data - [optional] data that will be passed to callback function when invoked # # returns: no return value The callback function will be called like: getticket($ssl,$ticket,$data) -> $return_value # $ssl is a value corresponding to openssls SSL structure # $ticket is a value of received TLS session ticket (can also be empty) # $data is the data passed to set_session_ticket_ext_cb # $return_value is either 0 (failure) or 1 (success) This function is based on the OpenSSL function SSL_set_session_ticket_ext_cb.

  • set_session_ticket_ext Set TLS session ticket (stateless session reuse). Net::SSLeay::set_session_ticket_ext($ssl, $ticket); # $ssl - value corresponding to openssls SSL structure # $ticket - is a value of TLS session ticket which client will send (can also be empty string) # # returns: no return value The callback function will be called like: getticket($ssl,$ticket,$data) -> $return_value # $ssl is a value corresponding to openssls SSL structure # $ticket is a value of received TLS session ticket (can also be empty) # $data is the data passed to set_session_ticket_ext_cb # $return_value is either 0 (failure) or 1 (success) This function is based on the OpenSSL function SSL_set_session_ticket_ext_cb.

  • set_shutdown Sets the shutdown state of $ssl to $mode. Net::SSLeay::set_shutdown($ssl, $mode); # $ssl - value corresponding to openssls SSL structure # $mode - (integer) shutdown mode: # 0 - No shutdown # 1 - SSL_SENT_SHUTDOWN # 2 - SSL_RECEIVED_SHUTDOWN # 3 - SSL_RECEIVED_SHUTDOWN+SSL_SENT_SHUTDOWN # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_set_shutdown.html>

  • set_ssl_method Sets a new TLS/SSL method for a particular $ssl object. my $rv = Net::SSLeay::set_ssl_method($ssl, $method); # $ssl - value corresponding to openssls SSL structure # $method - value corresponding to openssls SSL_METHOD structure # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_ssl_version.html>

  • set_tmp_dh Sets DH parameters to be used to be $dh. my $rv = Net::SSLeay::set_tmp_dh($ssl, $dh); # $ssl - value corresponding to openssls SSL structure # $dh - value corresponding to openssls DH structure # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_tmp_dh_callback.html>

  • set_tmp_dh_callback Sets the callback function for $ssl to be used when a DH parameters are required to $dh_cb. ??? (does this function really work?) Net::SSLeay::set_tmp_dh_callback($ssl, $dh); # $ssl - value corresponding to openssls SSL structure # $dh_cb - pointer to function ??? # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_tmp_dh_callback.html>

  • set_tmp_rsa Sets the temporary/ephemeral RSA key to be used in $ssl to be $rsa. my $rv = Net::SSLeay::set_tmp_rsa($ssl, $rsa); # $ssl - value corresponding to openssls SSL structure # $rsa - value corresponding to openssls RSA structure # # returns: 1 on success, 0 on failure Example: $rsakey = Net::SSLeay::RSA_generate_key(); Net::SSLeay::set_tmp_rsa($ssl, $rsakey); Net::SSLeay::RSA_free($rsakey); Check openssl doc <https://www.openssl.org/docs/man1.0.2/man3/SSL_CTX_set_tmp_rsa_callback.html>

  • set_tmp_rsa_callback Sets the callback function for $ssl to be used when a temporary/ephemeral RSA key is required to $tmp_rsa_callback. ??? (does this function really work?) Net::SSLeay::set_tmp_rsa_callback($ssl, $tmp_rsa_callback); # $ssl - value corresponding to openssls SSL structure # $tmp_rsa_callback - (function pointer) ??? # # returns: no return value Check openssl doc <https://www.openssl.org/docs/man1.0.2/man3/SSL_CTX_set_tmp_rsa_callback.html>

  • set_trust my $rv = Net::SSLeay::set_trust($ssl, $trust); # $ssl - value corresponding to openssls SSL structure # $trust - (integer) trust identifier # # returns: the original value For more details about $trust values see “CTX_set_trust”.

  • shutdown Shuts down an active TLS/SSL connection. It sends the ‘close notify’ shutdown alert to the peer. my $rv = Net::SSLeay::shutdown($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: 1 - shutdown was successfully completed # 0 - shutdown is not yet finished, # -1 - shutdown was not successful Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_shutdown.html>

  • state_string Returns a 6 letter string indicating the current state of the SSL object $ssl. my $rv = Net::SSLeay::state_string($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: 6-letter string Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_state_string.html>

  • state_string_long Returns a string indicating the current state of the SSL object $ssl. my $rv = Net::SSLeay::state_string_long($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: state strings Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_state_string.html>

  • set_default_passwd_cb COMPATIBILITY: not available in Net-SSLeay-1.82 and before; requires at least OpenSSL 1.1.0f. Not needed with LibreSSL. Sets the default password callback called when loading/storing a PEM certificate with encryption for $ssl. Net::SSLeay::set_default_passwd_cb($ssl, $func); # $ssl - value corresponding to openssls SSL structure # $func - perl reference to callback function # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_default_passwd_cb.html>

  • set_default_passwd_cb_userdata COMPATIBILITY: not available in Net-SSLeay-1.82 and before; requires at least OpenSSL 1.1.0f. Not needed with LibreSSL. Sets a pointer to userdata which will be provided to the password callback of $ssl on invocation. Net::SSLeay::set_default_passwd_cb_userdata($ssl, $userdata); # $ssl - value corresponding to openssls SSL structure # $userdata - data that will be passed to callback function when invoked # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_default_passwd_cb.html>

  • use_PrivateKey Adds $pkey as private key to $ssl. my $rv = Net::SSLeay::use_PrivateKey($ssl, $pkey); # $ssl - value corresponding to openssls SSL structure # $pkey - value corresponding to openssls EVP_PKEY structure # # returns: 1 on success, otherwise check out the error stack to find out the reason Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_use_certificate.html>

  • use_PrivateKey_ASN1 Adds the private key of type $pk stored in $data to $ssl. my $rv = Net::SSLeay::use_PrivateKey_ASN1($pk, $ssl, $d, $len); # $pk - (integer) key type, NID of corresponding algorithm # $ssl - value corresponding to openssls SSL structure # $data - key data (binary) # $len - length of $data # # returns: 1 on success, otherwise check out the error stack to find out the reason Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_use_certificate.html>

  • use_PrivateKey_file Adds the first private key found in $file to $ssl. my $rv = Net::SSLeay::use_PrivateKey_file($ssl, $file, $type); # $ssl - value corresponding to openssls SSL structure # $file - (string) file name # $type - (integer) type - use constants &Net::SSLeay::FILETYPE_PEM or &Net::SSLeay::FILETYPE_ASN1 # # returns: 1 on success, otherwise check out the error stack to find out the reason Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_use_certificate.html>

  • use_RSAPrivateKey Adds $rsa as RSA private key to $ssl. my $rv = Net::SSLeay::use_RSAPrivateKey($ssl, $rsa); # $ssl - value corresponding to openssls SSL structure # $rsa - value corresponding to openssls RSA structure # # returns: 1 on success, otherwise check out the error stack to find out the reason Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_use_certificate.html>

  • use_RSAPrivateKey_ASN1 Adds RSA private key stored in $data to $ssl. my $rv = Net::SSLeay::use_RSAPrivateKey_ASN1($ssl, $data, $len); # $ssl - value corresponding to openssls SSL structure # $data - key data (binary) # $len - length of $data # # returns: 1 on success, otherwise check out the error stack to find out the reason Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_use_certificate.html>

  • use_RSAPrivateKey_file Adds the first RSA private key found in $file to $ssl. my $rv = Net::SSLeay::use_RSAPrivateKey_file($ssl, $file, $type); # $ssl - value corresponding to openssls SSL structure # $file - (string) file name # $type - (integer) type - use constants &Net::SSLeay::FILETYPE_PEM or &Net::SSLeay::FILETYPE_ASN1 # # returns: 1 on success, otherwise check out the error stack to find out the reason Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_use_certificate.html>

  • use_certificate Loads the certificate $x into $ssl. my $rv = Net::SSLeay::use_certificate($ssl, $x); # $ssl - value corresponding to openssls SSL structure # $x - value corresponding to openssls X509 structure # # returns: 1 on success, otherwise check out the error stack to find out the reason Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_use_certificate.html>

  • use_certificate_ASN1 Loads the ASN1 encoded certificate from $data to $ssl. my $rv = Net::SSLeay::use_certificate_ASN1($ssl, $data, $len); # $ssl - value corresponding to openssls SSL structure # $data - certificate data (binary) # $len - length of $data # # returns: 1 on success, otherwise check out the error stack to find out the reason Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_use_certificate.html>

  • use_certificate_chain_file COMPATIBILITY: not available in Net-SSLeay-1.82 and before; requires at least OpenSSL 1.1.0 or at least LibreSSL 3.6.0 and Net-SSLeay-1.94 Loads a certificate chain from $file into $ssl. The certificates must be in PEM format and must be sorted starting with the subject’s certificate (actual client or server certificate), followed by intermediate CA certificates if applicable, and ending at the highest level (root) CA. my $rv = Net::SSLeay::use_certificate_chain_file($ssl, $file); # $ssl - value corresponding to openssls SSL structure # $file - (string) file name # # returns: 1 on success, otherwise check out the error stack to find out the reason Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_use_certificate.html>

  • use_certificate_file Loads the first certificate stored in $file into $ssl. my $rv = Net::SSLeay::use_certificate_file($ssl, $file, $type); # $ssl - value corresponding to openssls SSL structure # $file - (string) file name # $type - (integer) type - use constants &Net::SSLeay::FILETYPE_PEM or &Net::SSLeay::FILETYPE_ASN1 # # returns: 1 on success, otherwise check out the error stack to find out the reason Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_use_certificate.html>

  • get_version Returns SSL/TLS protocol name my $rv = Net::SSLeay::get_version($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: (string) protocol name, see OpenSSL manual for the full list # TLSv1 # TLSv1.3 Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_get_version.html>

  • version Returns SSL/TLS protocol version my $rv = Net::SSLeay::version($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: (integer) protocol version, see OpenSSL manual for the full list # 0x0301 - TLS1_VERSION (TLSv1) # 0xFEFF - DTLS1_VERSION (DTLSv1) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_version.html>

  • client_version COMPATIBILITY: not available in Net-SSLeay-1.85 and before; requires at least OpenSSL 1.1.0, not in LibreSSL Returns TLS protocol version used by the client when initiating the connection my $rv = Net::SSLeay::client_version($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: (integer) protocol version, see OpenSSL manual for the full list # 0x0301 - TLS1_VERSION (TLSv1) # 0xFEFF - DTLS1_VERSION (DTLSv1) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_client_version.html>

  • is_dtls COMPATIBILITY: not available in Net-SSLeay-1.85 and before; requires at least OpenSSL 1.1.0 or at least LibreSSL 3.3.1 and Net-SSLeay-1.94 my $rv = Net::SSLeay::is_dtls($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: (integer) zero or one # 0 - connection is not using DTLS # 1 - connection is using DTLS Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_is_dtls.html>

  • want Returns state information for the SSL object $ssl. my $rv = Net::SSLeay::want($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: state # 1 - SSL_NOTHING # 2 - SSL_WRITING # 3 - SSL_READING # 4 - SSL_X509_LOOKUP Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_want.html>

  • write Writes data from the buffer $data into the specified $ssl connection. my $rv = Net::SSLeay::write($ssl, $data); # $ssl - value corresponding to openssls SSL structure # $data - data to be written # # returns: >0 - (success) number of bytes actually written to the TLS/SSL connection # 0 - write not successful, probably the underlying connection was closed # <0 - error Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_write.html>

  • write_ex COMPATIBILITY: not available in Net-SSLeay-1.85 and before; requires at least OpenSSL 1.1.1, not in LibreSSL Writes data from the buffer $data into the specified $ssl connection. my ($len, $rv) = Net::SSLeay::write_ex($ssl, $data); # $ssl - value corresponding to openssls SSL structure # $data - data to be written # # returns a list: two-item list consisting of number of bytes written, # and return code from SSL_write_ex() Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_write_ex.html>

  • write_partial NOTE: Does not exactly correspond to any low level API function Writes a fragment of data in $data from the buffer $data into the specified $ssl connection. This is a non-blocking function like Net::SSLeay::write(). my $rv = Net::SSLeay::write_partial($ssl, $from, $count, $data); # $ssl - value corresponding to openssls SSL structure # $from - (integer) offset from the beginning of $data # $count - (integer) length of data to be written # $data - data buffer # # returns: >0 - (success) number of bytes actually written to the TLS/SSL connection # 0 - write not successful, probably the underlying connection was closed # <0 - error

  • set_tlsext_host_name COMPATIBILITY: not available in Net-SSLeay-1.45 and before; requires at least OpenSSL 0.9.8f Sets TLS servername extension on SSL object $ssl to value $name. my $rv = set_tlsext_host_name($ssl, $name); # $ssl - value corresponding to openssls SSL structure # $name - (string) name to be set # # returns: 1 on success, 0 on failure

  • client_hello_isv2 COMPATIBILITY: not available in Net-SSLeay-1.92 and before; requires at least OpenSSL 1.1.1pre1, not in LibreSSL NOTE: to be used only from a callback set with CTX_set_client_hello_cb. Indicate if the ClientHello was carried in a SSLv2 record and is in the SSLv2 format. my $rv = client_hello_isv2($s); # $s - value corresponding to openssls SSL structure # # returns: 1 for SSLv2-format ClientHellos and 0 otherwise Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_client_hello_isv2.html>

  • client_hello_get0_legacy_version COMPATIBILITY: not available in Net-SSLeay-1.92 and before; requires at least OpenSSL 1.1.1pre1, not in LibreSSL NOTE: to be used only from a callback set with CTX_set_client_hello_cb. Returns legacy_version, also known as client_version, field from the ClientHello. my $rv = client_hello_get0_legacy_version($s); # $s - value corresponding to openssls SSL structure # # returns: unsigned integer, for example 0x0303 (TLS v1.2) with TLS 1.3 Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_client_hello_get0_legacy_version.html>

  • client_hello_get0_random, client_hello_get0_session_id, client_hello_get0_ciphers and client_hello_get0_compression_methods COMPATIBILITY: not available in Net-SSLeay-1.92 and before; requires at least OpenSSL 1.1.1pre1, not in LibreSSL NOTE: to be used only from a callback set with CTX_set_client_hello_cb. These functions return random, session_id, cipher_suites and compression_methods fields from the ClientHello, respectively. my $random = client_hello_get0_random($s); my $session_id = client_hello_get0_session_id($s); my $ciphers = client_hello_get0_ciphers($s); my $compression_methods = client_hello_get0_compression_methods($s); # $s - value corresponding to openssls SSL structure # # returns: raw octet data where data length, zero or more, depends on the field definition Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_client_hello_get0_random.html>

  • client_hello_get1_extensions_present and client_hello_get_extension_order COMPATIBILITY: not available in Net-SSLeay-1.92 and before; requires at least OpenSSL 1.1.1pre1, not in LibreSSL NOTE: to be used only from a callback set with CTX_set_client_hello_cb. Returns a reference to an array holding the numerical value of the TLS extension types in the order they appear in the ClientHello. client_hello_get_extension_order is similar and requires at least OpenSSL 3.2.0, not in LibreSSL. my $ref = client_hello_get1_extensions_present($s); # $s - value corresponding to openssls SSL structure # # returns: an array reference of zero or more extension types or undef on failure Example from a TLS 1.3 ClientHello: sub client_hello_cb { my ($ssl, $arg) = @_; my $ref = client_hello_get1_extensions_present($ssl); print join( , @$ref), " " if $ref; } Prints: 11 10 35 22 23 13 43 45 51 Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_client_hello_get1_extensions_present.html>

  • client_hello_get0_ext COMPATIBILITY: not available in Net-SSLeay-1.92 and before; requires at least OpenSSL 1.1.1pre1, not in LibreSSL NOTE: to be used only from a callback set with CTX_set_client_hello_cb. Returns an extension by type number from the ClientHello. my $ref = client_hello_get1_extensions_present($s, $type); # $s - value corresponding to openssls SSL structure # $type - (integer) extension type number # # returns: zero or more octets of extension contents including extension length, undef if the extension is not present Example: Get the value of TLS extension supported_versions. You can use constant TLSEXT_TYPE_supported_versions or 43 directly. sub client_hello_cb { my ($ssl, $arg) = @_; my $ext_ver = Net::SSLeay::client_hello_get0_ext($ssl, Net::SSLeay::TLSEXT_TYPE_supported_versions()); print unpack(H*, $ext_ver), " " if defined $ext_ver; } Prints: 080304030303020301 where the first octet 0x08 is the extension length and the following four 16bit values correspond to TLS versions 1.3, 1.2, 1.1 and 1.0. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_client_hello_get0_ext.html>

Low level API: RAND_* related functions

Check openssl doc related to RAND stuff <https://www.openssl.org/docs/manmaster/man3/rand.html>

  • RAND_add Mixes the $num bytes at $buf into the PRNG state. Net::SSLeay::RAND_add($buf, $num, $entropy); # $buf - buffer with data to be mixed into the PRNG state # $num - number of bytes in $buf # $entropy - estimate of how much randomness is contained in $buf (in bytes) # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/RAND_add.html>

  • RAND_seed Equivalent to “RAND_add” when $num == $entropy. Net::SSLeay::RAND_seed($buf); # Perlishly figures out buf size # $buf - buffer with data to be mixed into the PRNG state # $num - number of bytes in $buf # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/RAND_add.html>

  • RAND_status Gives PRNG status (seeded enough or not). my $rv = Net::SSLeay::RAND_status(); # returns: 1 if the PRNG has been seeded with enough data, 0 otherwise Check openssl doc <https://www.openssl.org/docs/manmaster/man3/RAND_add.html>

  • RAND_bytes Puts $num cryptographically strong pseudo-random bytes into $buf. my $rv = Net::SSLeay::RAND_bytes($buf, $num); # $buf - buffer where the random data will be stored # $num - the size (in bytes) of requested random data # # returns: 1 on success, -1 if not supported by the current RAND method, or 0 on other failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/RAND_bytes.html>

  • RAND_priv_bytes COMPATIBILITY: not available in Net-SSLeay-1.85 and before; requires at least OpenSSL 1.1.1, not in LibreSSL Puts $num cryptographically strong pseudo-random bytes into $buf. my $rv = Net::SSLeay::RAND_priv_bytes($buf, $num); # $buf - buffer where the random data will be stored # $num - the size (in bytes) of requested random data # # returns: 1 on success, -1 if not supported by the current RAND method, or 0 on other failure RAND_priv_bytes has the same semantics as RAND_bytes, but see see the documentation for more information. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/RAND_priv_bytes.html>

  • RAND_pseudo_bytes Puts $num pseudo-random (not necessarily unpredictable) bytes into $buf. my $rv = Net::SSLeay::RAND_pseudo_bytes($buf, $num); # $buf - buffer where the random data will be stored # $num - the size (in bytes) of requested random data # # returns: 1 if the bytes generated are cryptographically strong, 0 otherwise Check openssl doc <https://www.openssl.org/docs/manmaster/man3/RAND_bytes.html>

  • RAND_cleanup Erase the PRNG state. Net::SSLeay::RAND_cleanup(); # no args, no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/RAND_cleanup.html>

  • RAND_egd_bytes Queries the entropy gathering daemon EGD on socket $path for $bytes bytes. my $rv = Net::SSLeay::RAND_egd_bytes($path, $bytes); # $path - path to a socket of entropy gathering daemon EGD # $bytes - number of bytes we want from EGD # # returns: the number of bytes read from the daemon on success, and -1 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/RAND_egd.html>

  • RAND_file_name Generates a default path for the random seed file. my $file = Net::SSLeay::RAND_file_name($num); # $num - maximum size of returned file name # # returns: string with file name on success, (empty string) or undef on failure LibreSSL and OpenSSL 1.1.0a and later return undef when, for example, $num is not large enough to hold the filename. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/RAND_load_file.html>

  • RAND_load_file COMPATIBILITY: Is no longer functional on LibreSSL Reads $max_bytes of bytes from $file_name and adds them to the PRNG. my $rv = Net::SSLeay::RAND_load_file($file_name, $max_bytes); # $file_name - the name of file # $max_bytes - bytes to read from $file_name; -1 => the complete file is read # # returns: the number of bytes read Check openssl doc <https://www.openssl.org/docs/manmaster/man3/RAND_load_file.html>

  • RAND_write_file Writes 1024 random bytes to $file_name which can be used to initialize the PRNG by calling “RAND_load_file” in a later session. my $rv = Net::SSLeay::RAND_write_file($file_name); # $file_name - the name of file # # returns: the number of bytes written, and -1 if the bytes written were generated without appropriate seed Check openssl doc <https://www.openssl.org/docs/manmaster/man3/RAND_load_file.html>

  • RAND_poll Collects some entropy from operating system and adds it to the PRNG. my $rv = Net::SSLeay::RAND_poll(); # returns: 1 on success, 0 on failure (unable to gather reasonable entropy)

Low level API: OBJ_* related functions

  • OBJ_cmp Compares ASN1_OBJECT $a to ASN1_OBJECT $b. my $rv = Net::SSLeay::OBJ_cmp($a, $b); # $a - value corresponding to openssls ASN1_OBJECT structure # $b - value corresponding to openssls ASN1_OBJECT structure # # returns: if the two are identical 0 is returned Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OBJ_nid2obj.html>

  • OBJ_dup Returns a copy/duplicate of $o. my $rv = Net::SSLeay::OBJ_dup($o); # $o - value corresponding to openssls ASN1_OBJECT structure # # returns: value corresponding to openssls ASN1_OBJECT structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OBJ_nid2obj.html>

  • OBJ_nid2ln Returns long name for given NID $n. my $rv = Net::SSLeay::OBJ_nid2ln($n); # $n - (integer) NID # # returns: (string) long name e.g. commonName Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OBJ_nid2obj.html>

  • OBJ_ln2nid Returns NID corresponding to given long name $n. my $rv = Net::SSLeay::OBJ_ln2nid($s); # $s - (string) long name e.g. commonName # # returns: (integer) NID

  • OBJ_nid2sn Returns short name for given NID $n. my $rv = Net::SSLeay::OBJ_nid2sn($n); # $n - (integer) NID # # returns: (string) short name e.g. CN Example: print Net::SSLeay::OBJ_nid2sn(&Net::SSLeay::NID_commonName);

  • OBJ_sn2nid Returns NID corresponding to given short name $s. my $rv = Net::SSLeay::OBJ_sn2nid($s); # $s - (string) short name e.g. CN # # returns: (integer) NID Example: print “NID_commonName constant=”, &Net::SSLeay::NID_commonName; print “OBJ_sn2nid(CN)=”, Net::SSLeay::OBJ_sn2nid(CN);

  • OBJ_nid2obj Returns ASN1_OBJECT for given NID $n. my $rv = Net::SSLeay::OBJ_nid2obj($n); # $n - (integer) NID # # returns: value corresponding to openssls ASN1_OBJECT structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OBJ_nid2obj.html>

  • OBJ_obj2nid Returns NID corresponding to given ASN1_OBJECT $o. my $rv = Net::SSLeay::OBJ_obj2nid($o); # $o - value corresponding to openssls ASN1_OBJECT structure # # returns: (integer) NID Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OBJ_nid2obj.html>

  • OBJ_txt2obj Converts the text string s into an ASN1_OBJECT structure. If $no_name is 0 then long names (e.g. ‘commonName’) and short names (e.g. ‘CN’) will be interpreted as well as numerical forms (e.g. ‘2.5.4.3’). If $no_name is 1 only the numerical form is acceptable. my $rv = Net::SSLeay::OBJ_txt2obj($s, $no_name); # $s - text string to be converted # $no_name - (integer) 0 or 1 # # returns: value corresponding to openssls ASN1_OBJECT structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OBJ_nid2obj.html>

  • OBJ_obj2txt Converts the ASN1_OBJECT a into a textual representation. Net::SSLeay::OBJ_obj2txt($a, $no_name); # $a - value corresponding to openssls ASN1_OBJECT structure # $no_name - (integer) 0 or 1 # # returns: textual representation e.g. commonName ($no_name=0), 2.5.4.3 ($no_name=1) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OBJ_nid2obj.html>

  • OBJ_txt2nid Returns NID corresponding to text string $s which can be a long name, a short name or the numerical representation of an object. my $rv = Net::SSLeay::OBJ_txt2nid($s); # $s - (string) e.g. commonName or CN or 2.5.4.3 # # returns: (integer) NID Example: my $nid = Net::SSLeay::OBJ_txt2nid(2.5.4.3); Net::SSLeay::OBJ_nid2sn($n); Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OBJ_nid2obj.html>

Low level API: ASN1_INTEGER_* related functions

  • ASN1_INTEGER_new COMPATIBILITY: not available in Net-SSLeay-1.45 and before Creates a new ASN1_INTEGER structure. my $rv = Net::SSLeay::ASN1_INTEGER_new(); # # returns: value corresponding to openssls ASN1_INTEGER structure (0 on failure)

  • ASN1_INTEGER_free COMPATIBILITY: not available in Net-SSLeay-1.45 and before Free an allocated ASN1_INTEGER structure. Net::SSLeay::ASN1_INTEGER_free($i); # $i - value corresponding to openssls ASN1_INTEGER structure # # returns: no return value

  • ASN1_INTEGER_get COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns integer value of given ASN1_INTEGER object. BEWARE: If the value stored in ASN1_INTEGER is greater than max. integer that can be stored in ’long’ type (usually 32bit but may vary according to platform) then this function will return -1. For getting large ASN1_INTEGER values consider using “P_ASN1_INTEGER_get_dec” or “P_ASN1_INTEGER_get_hex”. my $rv = Net::SSLeay::ASN1_INTEGER_get($a); # $a - value corresponding to openssls ASN1_INTEGER structure # # returns: integer value of ASN1_INTEGER object in $a

  • ASN1_INTEGER_set COMPATIBILITY: not available in Net-SSLeay-1.45 and before Sets value of given ASN1_INTEGER object to value $val BEWARE: $val has max. limit (= max. integer that can be stored in ’long’ type). For setting large ASN1_INTEGER values consider using “P_ASN1_INTEGER_set_dec” or “P_ASN1_INTEGER_set_hex”. my $rv = Net::SSLeay::ASN1_INTEGER_set($i, $val); # $i - value corresponding to openssls ASN1_INTEGER structure # $val - integer value # # returns: 1 on success, 0 on failure

  • P_ASN1_INTEGER_get_dec COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns string with decimal representation of integer value of given ASN1_INTEGER object. Net::SSLeay::P_ASN1_INTEGER_get_dec($i); # $i - value corresponding to openssls ASN1_INTEGER structure # # returns: string with decimal representation

  • P_ASN1_INTEGER_get_hex COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns string with hexadecimal representation of integer value of given ASN1_INTEGER object. Net::SSLeay::P_ASN1_INTEGER_get_hex($i); # $i - value corresponding to openssls ASN1_INTEGER structure # # returns: string with hexadecimal representation

  • P_ASN1_INTEGER_set_dec COMPATIBILITY: not available in Net-SSLeay-1.45 and before Sets value of given ASN1_INTEGER object to value $val (decimal string, suitable for large integers) Net::SSLeay::P_ASN1_INTEGER_set_dec($i, $str); # $i - value corresponding to openssls ASN1_INTEGER structure # $str - string with decimal representation # # returns: 1 on success, 0 on failure

  • P_ASN1_INTEGER_set_hex COMPATIBILITY: not available in Net-SSLeay-1.45 and before Sets value of given ASN1_INTEGER object to value $val (hexadecimal string, suitable for large integers) Net::SSLeay::P_ASN1_INTEGER_set_hex($i, $str); # $i - value corresponding to openssls ASN1_INTEGER structure # $str - string with hexadecimal representation # # returns: 1 on success, 0 on failure

Low level API: ASN1_STRING_* related functions

  • P_ASN1_STRING_get COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns string value of given ASN1_STRING object. Net::SSLeay::P_ASN1_STRING_get($s, $utf8_decode); # $s - value corresponding to openssls ASN1_STRING structure # $utf8_decode - [optional] 0 or 1 whether the returned value should be utf8 decoded (default=0) # # returns: string $string = Net::SSLeay::P_ASN1_STRING_get($s); # is the same as: $string = Net::SSLeay::P_ASN1_STRING_get($s, 0);

Low level API: ASN1_TIME_* related functions

  • ASN1_TIME_new COMPATIBILITY: not available in Net-SSLeay-1.42 and before my $time = ASN1_TIME_new(); # returns: value corresponding to openssls ASN1_TIME structure

  • ASN1_TIME_free COMPATIBILITY: not available in Net-SSLeay-1.42 and before ASN1_TIME_free($time); # $time - value corresponding to openssls ASN1_TIME structure

  • ASN1_TIME_set COMPATIBILITY: not available in Net-SSLeay-1.42 and before ASN1_TIME_set($time, $t); # $time - value corresponding to openssls ASN1_TIME structure # $t - time value in seconds since 1.1.1970 BEWARE: It is platform dependent how this function will handle dates after 2038. Although perl’s integer is large enough the internal implementation of this function is dependent on the size of time_t structure (32bit time_t has problem with 2038). If you want to safely set date and time after 2038 use function “P_ASN1_TIME_set_isotime”.

  • P_ASN1_TIME_get_isotime COMPATIBILITY: not available in Net-SSLeay-1.42 and before NOTE: Does not exactly correspond to any low level API function Gives ISO-8601 string representation of ASN1_TIME structure. my $datetime_string = P_ASN1_TIME_get_isotime($time); # $time - value corresponding to openssls ASN1_TIME structure # # returns: datetime string like 2033-05-16T20:39:37Z or on failure The output format is compatible with module DateTime::Format::RFC3339

  • P_ASN1_TIME_set_isotime COMPATIBILITY: not available in Net-SSLeay-1.42 and before NOTE: Does not exactly correspond to any low level API function Sets time and date value of ANS1_time structure. my $rv = P_ASN1_TIME_set_isotime($time, $string); # $time - value corresponding to openssls ASN1_TIME structure # $string - ISO-8601 timedate string like 2033-05-16T20:39:37Z # # returns: 1 on success, 0 on failure The $string parameter has to be in full form like "2012-03-22T23:55:33" or "2012-03-22T23:55:33Z" or "2012-03-22T23:55:33CET". Short forms like "2012-03-22T23:55" or "2012-03-22" are not supported.

  • P_ASN1_TIME_put2string COMPATIBILITY: not available in Net-SSLeay-1.42 and before, has bugs with OpenSSL 0.9.8i NOTE: Does not exactly correspond to any low level API function Gives string representation of ASN1_TIME structure. my $str = P_ASN1_TIME_put2string($time); # $time - value corresponding to openssls ASN1_TIME structure # # returns: datetime string like May 16 20:39:37 2033 GMT

  • P_ASN1_UTCTIME_put2string NOTE: deprecated function, only for backward compatibility, just an alias for “P_ASN1_TIME_put2string”

Low level API: X509_* related functions

  • X509_new COMPATIBILITY: not available in Net-SSLeay-1.45 and before Allocates and initializes a X509 structure. my $rv = Net::SSLeay::X509_new(); # # returns: value corresponding to openssls X509 structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_new.html>

  • X509_free Frees up the X509 structure. Net::SSLeay::X509_free($a); # $a - value corresponding to openssls X509 structure # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_new.html>

  • X509_check_host COMPATIBILITY: not available in Net-SSLeay-1.68 and before; requires at least OpenSSL 1.0.2. X509_CHECK_FLAG_NEVER_CHECK_SUBJECT requires OpenSSL 1.1.0. Checks if the certificate Subject Alternative Name (SAN) or Subject CommonName (CN) matches the specified host name. my $rv = Net::SSLeay::X509_check_host($cert, $name, $flags, $peername); # $cert - value corresponding to openssls X509 structure # $name - host name to check # $flags (optional, default: 0) - can be the bitwise OR of: # &Net::SSLeay::X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT # &Net::SSLeay::X509_CHECK_FLAG_NO_WILDCARDS # &Net::SSLeay::X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS # &Net::SSLeay::X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS # &Net::SSLeay::X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS # &Net::SSLeay::X509_CHECK_FLAG_NEVER_CHECK_SUBJECT # $peername (optional) - If not omitted and $host matches $cert, # a copy of the matching SAN or CN from # the peer certificate is stored in $peername. # # returns: # 1 for a successful match # 0 for a failed match # -1 for an internal error # -2 if the input is malformed Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_check_host.html>.

  • X509_check_email COMPATIBILITY: not available in Net-SSLeay-1.68 and before; requires at least OpenSSL 1.0.2. Checks if the certificate matches the specified email address. my $rv = Net::SSLeay::X509_check_email($cert, $address, $flags); # $cert - value corresponding to openssls X509 structure # $address - email address to check # $flags (optional, default: 0) - see X509_check_host() # # returns: see X509_check_host() Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_check_email.html>.

  • X509_check_ip COMPATIBILITY: not available in Net-SSLeay-1.68 and before; requires at least OpenSSL 1.0.2. Checks if the certificate matches the specified IPv4 or IPv6 address. my $rv = Net::SSLeay::X509_check_ip($cert, $address, $flags); # $cert - value corresponding to openssls X509 structure # $address - IP address to check in binary format, in network byte order # $flags (optional, default: 0) - see X509_check_host() # # returns: see X509_check_host() Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_check_ip.html>.

  • X509_check_ip_asc COMPATIBILITY: not available in Net-SSLeay-1.68 and before; requires at least OpenSSL 1.0.2. Checks if the certificate matches the specified IPv4 or IPv6 address. my $rv = Net::SSLeay::X509_check_ip_asc($cert, $address, $flags); # $cert - value corresponding to openssls X509 structure # $address - IP address to check in text representation # $flags (optional, default: 0) - see X509_check_host() # # returns: see X509_check_host() Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_check_ip_asc.html>.

  • X509_certificate_type COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns bitmask with type of certificate $x. my $rv = Net::SSLeay::X509_certificate_type($x); # $x - value corresponding to openssls X509 structure # # returns: (integer) bitmask with certificate type # to decode bitmask returned by this function use these constants: # &Net::SSLeay::EVP_PKS_DSA # &Net::SSLeay::EVP_PKS_EC # &Net::SSLeay::EVP_PKS_RSA # &Net::SSLeay::EVP_PKT_ENC # &Net::SSLeay::EVP_PKT_EXCH # &Net::SSLeay::EVP_PKT_EXP # &Net::SSLeay::EVP_PKT_SIGN # &Net::SSLeay::EVP_PK_DH # &Net::SSLeay::EVP_PK_DSA # &Net::SSLeay::EVP_PK_EC # &Net::SSLeay::EVP_PK_RSA

  • X509_digest COMPATIBILITY: not available in Net-SSLeay-1.45 and before Computes digest/fingerprint of X509 $data using $type hash function. my $digest_value = Net::SSLeay::X509_digest($data, $type); # $data - value corresponding to openssls X509 structure # $type - value corresponding to openssls EVP_MD structure - e.g. got via EVP_get_digestbyname() # # returns: hash value (binary) # to get printable (hex) value of digest use: print unpack(H*, $digest_value);

  • X509_issuer_and_serial_hash COMPATIBILITY: not available in Net-SSLeay-1.45 and before Sort of a checksum of issuer name and serial number of X509 certificate $x. The result is not a full hash (e.g. sha-1), it is kind-of-a-hash truncated to the size of ‘unsigned long’ (32 bits). The resulting value might differ across different openssl versions for the same X509 certificate. my $rv = Net::SSLeay::X509_issuer_and_serial_hash($x); # $x - value corresponding to openssls X509 structure # # returns: number representing checksum

  • X509_issuer_name_hash COMPATIBILITY: not available in Net-SSLeay-1.45 and before Sort of a checksum of issuer name of X509 certificate $x. The result is not a full hash (e.g. sha-1), it is kind-of-a-hash truncated to the size of ‘unsigned long’ (32 bits). The resulting value might differ across different openssl versions for the same X509 certificate. my $rv = Net::SSLeay::X509_issuer_name_hash($x); # $x - value corresponding to openssls X509 structure # # returns: number representing checksum

  • X509_subject_name_hash COMPATIBILITY: not available in Net-SSLeay-1.45 and before Sort of a checksum of subject name of X509 certificate $x. The result is not a full hash (e.g. sha-1), it is kind-of-a-hash truncated to the size of ‘unsigned long’ (32 bits). The resulting value might differ across different openssl versions for the same X509 certificate. my $rv = Net::SSLeay::X509_subject_name_hash($x); # $x - value corresponding to openssls X509 structure # # returns: number representing checksum

  • X509_pubkey_digest COMPATIBILITY: not available in Net-SSLeay-1.45 and before Computes digest/fingerprint of public key from X509 certificate $data using $type hash function. my $digest_value = Net::SSLeay::X509_pubkey_digest($data, $type); # $data - value corresponding to openssls X509 structure # $type - value corresponding to openssls EVP_MD structure - e.g. got via EVP_get_digestbyname() # # returns: hash value (binary) # to get printable (hex) value of digest use: print unpack(H*, $digest_value);

  • X509_set_issuer_name COMPATIBILITY: not available in Net-SSLeay-1.45 and before Sets issuer of X509 certificate $x to $name. my $rv = Net::SSLeay::X509_set_issuer_name($x, $name); # $x - value corresponding to openssls X509 structure # $name - value corresponding to openssls X509_NAME structure # # returns: 1 on success, 0 on failure

  • X509_set_pubkey COMPATIBILITY: not available in Net-SSLeay-1.45 and before Sets public key of X509 certificate $x to $pkey. my $rv = Net::SSLeay::X509_set_pubkey($x, $pkey); # $x - value corresponding to openssls X509 structure # $pkey - value corresponding to openssls EVP_PKEY structure # # returns: 1 on success, 0 on failure

  • X509_set_serialNumber COMPATIBILITY: not available in Net-SSLeay-1.45 and before Sets serial number of X509 certificate $x to $serial. my $rv = Net::SSLeay::X509_set_serialNumber($x, $serial); # $x - value corresponding to openssls X509 structure # $serial - value corresponding to openssls ASN1_INTEGER structure # # returns: 1 on success, 0 on failure # to create $serial value use one of these: $serial = Net::SSLeay::P_ASN1_INTEGER_set_hex(45ad6f); $serial = Net::SSLeay::P_ASN1_INTEGER_set_dec(7896541238529631478); $serial = Net::SSLeay::ASN1_INTEGER_set(45896);

  • X509_set_subject_name COMPATIBILITY: not available in Net-SSLeay-1.45 and before Sets subject of X509 certificate $x to $name. my $rv = Net::SSLeay::X509_set_subject_name($x, $name); # $x - value corresponding to openssls X509 structure # $name - value corresponding to openssls X509_NAME structure # # returns: 1 on success, 0 on failure

  • X509_set_version COMPATIBILITY: not available in Net-SSLeay-1.45 and before Set ‘version’ value for X509 certificate $ to $version. my $rv = Net::SSLeay::X509_set_version($x, $version); # $x - value corresponding to openssls X509 structure # $version - (integer) version number # # returns: 1 on success, 0 on failure

  • X509_sign COMPATIBILITY: not available in Net-SSLeay-1.45 and before Sign X509 certificate $x with private key $pkey (using digest algorithm $md). my $rv = Net::SSLeay::X509_sign($x, $pkey, $md); # $x - value corresponding to openssls X509 structure # $pkey - value corresponding to openssls EVP_PKEY structure # $md - value corresponding to openssls EVP_MD structure # # returns: 1 on success, 0 on failure

  • X509_verify COMPATIBILITY: not available in Net-SSLeay-1.45 and before Verifies X509 object $a using public key $r (pubkey of issuing CA). my $rv = Net::SSLeay::X509_verify($x, $r); # $x - value corresponding to openssls X509 structure # $r - value corresponding to openssls EVP_PKEY structure # # returns: 0 - verify failure, 1 - verify OK, <0 - error

  • X509_get_ext_count COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns the total number of extensions in X509 object $x. my $rv = Net::SSLeay::X509_get_ext_count($x); # $x - value corresponding to openssls X509 structure # # returns: count of extensions

  • X509_get_pubkey COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns public key corresponding to given X509 object $x. my $rv = Net::SSLeay::X509_get_pubkey($x); # $x - value corresponding to openssls X509 structure # # returns: value corresponding to openssls EVP_PKEY structure (0 on failure) NOTE: This method returns only the public key’s key bits, without the algorithm or parameters. Use X509_get_X509_PUBKEY() to return the full public key (SPKI) instead.

  • X509_get_X509_PUBKEY COMPATIBILITY: not available in Net-SSLeay-1.72 and before Returns the full public key (SPKI) of given X509 certificate $x. Net::SSLeay::X509_get_X509_PUBKEY($x); # $x - value corresponding to openssls X509 structure # # returns: public key data in DER format (binary)

  • X509_get_serialNumber COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns serial number of X509 certificate $x. my $rv = Net::SSLeay::X509_get_serialNumber($x); # $x - value corresponding to openssls X509 structure # # returns: value corresponding to openssls ASN1_INTEGER structure (0 on failure) See “P_ASN1_INTEGER_get_dec”, “P_ASN1_INTEGER_get_hex” or “ASN1_INTEGER_get” to decode ASN1_INTEGER object.

  • X509_get0_serialNumber COMPATIBILITY: available in Net-SSLeay-1.86 onwards X509_get0_serialNumber() is the same as X509_get_serialNumber() except it accepts a const parameter and returns a const result.

  • X509_get_version COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns ‘version’ value of given X509 certificate $x. my $rv = Net::SSLeay::X509_get_version($x); # $x - value corresponding to openssls X509 structure # # returns: (integer) version

  • X509_get_ext Returns X509_EXTENSION from $x509 based on given position/index. my $rv = Net::SSLeay::X509_get_ext($x509, $index); # $x509 - value corresponding to openssls X509 structure # $index - (integer) position/index of extension within $x509 # # returns: value corresponding to openssls X509_EXTENSION structure (0 on failure)

  • X509_get_ext_by_NID Returns X509_EXTENSION from $x509 based on given NID. my $rv = Net::SSLeay::X509_get_ext_by_NID($x509, $nid, $loc); # $x509 - value corresponding to openssls X509 structure # $nid - (integer) NID value # $loc - (integer) position to start lookup at # # returns: position/index of extension, negative value on error # call Net::SSLeay::X509_get_ext($x509, $rv) to get the actual extension

  • X509_get_fingerprint Returns fingerprint of certificate $cert. NOTE: Does not exactly correspond to any low level API function. The implementation is based on openssl’s X509_digest(). Net::SSLeay::X509_get_fingerprint($x509, $type); # $x509 - value corresponding to openssls X509 structure # $type - (string) digest type, currently supported values: # “md5” # “sha1” # “sha256” # “ripemd160” # # returns: certificate digest - hexadecimal string (NOT binary data!)

  • X509_get_issuer_name Return an X509_NAME object representing the issuer of the certificate $cert. my $rv = Net::SSLeay::X509_get_issuer_name($cert); # $cert - value corresponding to openssls X509 structure # # returns: value corresponding to openssls X509_NAME structure (0 on failure)

  • X509_get0_notAfter, X509_getm_notAfter and X509_get_notAfter COMPATIBILITY: X509_get0_notAfter and X509_getm_notAfter are not available in Net-SSLeay-1.92 and before Return an object giving the time after which the certificate $cert is not valid. my $rv = Net::SSLeay::X509_get0_notAfter($cert); my $rvm = Net::SSLeay::X509_getm_notAfter($cert); # $cert - value corresponding to openssls X509 structure # # returns: $rv read-only value corresponding to openssls ASN1_TIME structure # $rvm mutable value corresponding to openssls ASN1_TIME structure To get human readable/printable form the return value you can use: my $time = Net::SSLeay::X509_get_notAfter($cert); print “notAfter=”, Net::SSLeay::P_ASN1_TIME_get_isotime($time), " “; NOTE: X509_get_notAfter is an alias and deprecated in OpenSSL 1.1.0 and later Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_get0_notAfter.html>

  • X509_get0_notBefore, X509_getm_notBefore and X509_get_notBefore COMPATIBILITY: X509_get0_notBefore and X509_getm_notBefore are not available in Net-SSLeay-1.92 and before Return an object giving the time before which the certificate $cert is not valid my $rv = Net::SSLeay::X509_get0_notBefore($cert); my $rvm = Net::SSLeay::X509_getm_notBefore($cert); # $cert - value corresponding to openssls X509 structure # # returns: $rv read-only value corresponding to openssls ASN1_TIME structure # $rvm mutable value corresponding to openssls ASN1_TIME structure To get human readable/printable form the return value you can use: my $time = Net::SSLeay::X509_get_notBefore($cert); print “notBefore=”, Net::SSLeay::P_ASN1_TIME_get_isotime($time), " “; NOTE: X509_get_notBefore is an alias and deprecated in OpenSSL 1.1.0 and later Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_get0_notBefore.html>

  • X509_get_subjectAltNames NOTE: Does not exactly correspond to any low level API function. Returns the list of alternative subject names from X509 certificate $cert. my @rv = Net::SSLeay::X509_get_subjectAltNames($cert); # $cert - value corresponding to openssls X509 structure # # returns: list containing pairs - name_type (integer), name_value (string) # where name_type can be: # 0 - GEN_OTHERNAME # 1 - GEN_EMAIL # 2 - GEN_DNS # 3 - GEN_X400 # 4 - GEN_DIRNAME # 5 - GEN_EDIPARTY # 6 - GEN_URI # 7 - GEN_IPADD # 8 - GEN_RID Note: type 7 - GEN_IPADD contains the IP address as a packed binary address. GEN_RID is available in Net-SSLeay-1.90 and later. Maximum length for returned RID string is currently 2500. Invalid and overly long RID values are skipped and not returned. GEN_X400 and GEN_EDIPARTY are not supported and will not be returned even when present in the certificate.

  • X509_get_subject_name Returns the subject of the certificate $cert. my $rv = Net::SSLeay::X509_get_subject_name($cert); # $cert - value corresponding to openssls X509 structure # # returns: value corresponding to openssls X509_NAME structure (0 on failure)

  • X509_gmtime_adj Adjust the ASN1_TIME object to the timestamp (in GMT). my $rv = Net::SSLeay::X509_gmtime_adj($s, $adj); # $s - value corresponding to openssls ASN1_TIME structure # $adj - timestamp (seconds since 1.1.1970) # # returns: value corresponding to openssls ASN1_TIME structure (0 on failure) BEWARE: this function may fail for dates after 2038 as it is dependent on time_t size on your system (32bit time_t does not work after 2038). Consider using “P_ASN1_TIME_set_isotime” instead).

  • X509_load_cert_crl_file Takes PEM file and loads all X509 certificates and X509 CRLs from that file into X509_LOOKUP structure. my $rv = Net::SSLeay::X509_load_cert_crl_file($ctx, $file, $type); # $ctx - value corresponding to openssls X509_LOOKUP structure # $file - (string) file name # $type - (integer) type - use constants &Net::SSLeay::FILETYPE_PEM or &Net::SSLeay::FILETYPE_ASN1 # if not FILETYPE_PEM then behaves as Net::SSLeay::X509_load_cert_file() # # returns: 1 on success, 0 on failure

  • X509_load_cert_file Loads/adds X509 certificate from $file to X509_LOOKUP structure my $rv = Net::SSLeay::X509_load_cert_file($ctx, $file, $type); # $ctx - value corresponding to openssls X509_LOOKUP structure # $file - (string) file name # $type - (integer) type - use constants &Net::SSLeay::FILETYPE_PEM or &Net::SSLeay::FILETYPE_ASN1 # # returns: 1 on success, 0 on failure

  • X509_load_crl_file Loads/adds X509 CRL from $file to X509_LOOKUP structure my $rv = Net::SSLeay::X509_load_crl_file($ctx, $file, $type); # $ctx - value corresponding to openssls X509_LOOKUP structure # $file - (string) file name # $type - (integer) type - use constants &Net::SSLeay::FILETYPE_PEM or &Net::SSLeay::FILETYPE_ASN1 # # returns: 1 on success, 0 on failure

  • X509_policy_level_get0_node COMPATIBILITY: no longer available in LibreSSL 3.8.0 and later ??? (more info needed) my $rv = Net::SSLeay::X509_policy_level_get0_node($level, $i); # $level - value corresponding to openssls X509_POLICY_LEVEL structure # $i - (integer) index/position # # returns: value corresponding to openssls X509_POLICY_NODE structure (0 on failure)

  • X509_policy_level_node_count COMPATIBILITY: no longer available in LibreSSL 3.8.0 and later ??? (more info needed) my $rv = Net::SSLeay::X509_policy_level_node_count($level); # $level - value corresponding to openssls X509_POLICY_LEVEL structure # # returns: (integer) node count

  • X509_policy_node_get0_parent COMPATIBILITY: no longer available in LibreSSL 3.8.0 and later ??? (more info needed) my $rv = Net::SSLeay::X509_policy_node_get0_parent($node); # $node - value corresponding to openssls X509_POLICY_NODE structure # # returns: value corresponding to openssls X509_POLICY_NODE structure (0 on failure)

  • X509_policy_node_get0_policy COMPATIBILITY: no longer available in LibreSSL 3.8.0 and later ??? (more info needed) my $rv = Net::SSLeay::X509_policy_node_get0_policy($node); # $node - value corresponding to openssls X509_POLICY_NODE structure # # returns: value corresponding to openssls ASN1_OBJECT structure (0 on failure)

  • X509_policy_node_get0_qualifiers COMPATIBILITY: no longer available in LibreSSL 3.8.0 and later ??? (more info needed) my $rv = Net::SSLeay::X509_policy_node_get0_qualifiers($node); # $node - value corresponding to openssls X509_POLICY_NODE structure # # returns: value corresponding to openssls STACK_OF(POLICYQUALINFO) structure (0 on failure)

  • X509_policy_tree_free COMPATIBILITY: no longer available in LibreSSL 3.8.0 and later ??? (more info needed) Net::SSLeay::X509_policy_tree_free($tree); # $tree - value corresponding to openssls X509_POLICY_TREE structure # # returns: no return value

  • X509_policy_tree_get0_level COMPATIBILITY: no longer available in LibreSSL 3.8.0 and later ??? (more info needed) my $rv = Net::SSLeay::X509_policy_tree_get0_level($tree, $i); # $tree - value corresponding to openssls X509_POLICY_TREE structure # $i - (integer) level index # # returns: value corresponding to openssls X509_POLICY_LEVEL structure (0 on failure)

  • X509_policy_tree_get0_policies COMPATIBILITY: no longer available in LibreSSL 3.8.0 and later ??? (more info needed) my $rv = Net::SSLeay::X509_policy_tree_get0_policies($tree); # $tree - value corresponding to openssls X509_POLICY_TREE structure # # returns: value corresponding to openssls STACK_OF(X509_POLICY_NODE) structure (0 on failure)

  • X509_policy_tree_get0_user_policies COMPATIBILITY: no longer available in LibreSSL 3.8.0 and later ??? (more info needed) my $rv = Net::SSLeay::X509_policy_tree_get0_user_policies($tree); # $tree - value corresponding to openssls X509_POLICY_TREE structure # # returns: value corresponding to openssls STACK_OF(X509_POLICY_NODE) structure (0 on failure)

  • X509_policy_tree_level_count COMPATIBILITY: no longer available in LibreSSL 3.8.0 and later ??? (more info needed) my $rv = Net::SSLeay::X509_policy_tree_level_count($tree); # $tree - value corresponding to openssls X509_POLICY_TREE structure # # returns: (integer) count

  • X509_verify_cert_error_string Returns a human readable error string for verification error $n. my $rv = Net::SSLeay::X509_verify_cert_error_string($n); # $n - (long) numeric error code # # returns: error string Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_STORE_CTX_get_error.html>

  • P_X509_add_extensions COMPATIBILITY: not available in Net-SSLeay-1.45 and before Adds one or more X509 extensions to X509 object $x. my $rv = Net::SSLeay::P_X509_add_extensions($x, $ca_cert, $nid, $value); # $x - value corresponding to openssls X509 structure # $ca_cert - value corresponding to openssls X509 structure (issuers cert - necessary for setting NID_authority_key_identifier) # $nid - NID identifying extension to be set # $value - extension value # # returns: 1 on success, 0 on failure You can set more extensions at once: my $rv = Net::SSLeay::P_X509_add_extensions($x509, $ca_cert, &Net::SSLeay::NID_key_usage => digitalSignature,keyEncipherment, &Net::SSLeay::NID_subject_key_identifier => hash, &Net::SSLeay::NID_authority_key_identifier => keyid, &Net::SSLeay::NID_authority_key_identifier => issuer, &Net::SSLeay::NID_basic_constraints => CA:FALSE, &Net::SSLeay::NID_ext_key_usage => serverAuth,clientAuth, &Net::SSLeay::NID_netscape_cert_type => server, &Net::SSLeay::NID_subject_alt_name => DNS:s1.dom.com,DNS:s2.dom.com,DNS:s3.dom.com, );

  • P_X509_copy_extensions COMPATIBILITY: not available in Net-SSLeay-1.45 and before Copies X509 extensions from X509_REQ object to X509 object - handy when you need to turn X509_REQ into X509 certificate. Net::SSLeay::P_X509_copy_extensions($x509_req, $x509, $override); # $x509_req - value corresponding to openssls X509_REQ structure # $x509 - value corresponding to openssls X509 structure # $override - (integer) flag indication whether to override already existing items in $x509 (default 1) # # returns: 1 on success, 0 on failure

  • P_X509_get_crl_distribution_points COMPATIBILITY: not available in Net-SSLeay-1.45 and before Get the list of CRL distribution points from X509 certificate. my @cdp = Net::SSLeay::P_X509_get_crl_distribution_points($x509); # $x509 - value corresponding to openssls X509 structure # # returns: list of distribution points (usually URLs)

  • P_X509_get_ext_key_usage COMPATIBILITY: not available in Net-SSLeay-1.45 and before Gets the list of extended key usage of given X509 certificate $cert. my @ext_usage = Net::SSLeay::P_X509_get_ext_key_usage($cert, $format); # $cert - value corresponding to openssls X509 structure # $format - choose type of return values: 0=OIDs, 1=NIDs, 2=shortnames, 3=longnames # # returns: list of values Examples: my @extkeyusage_oid = Net::SSLeay::P_X509_get_ext_key_usage($x509,0); # returns for example: (“1.3.6.1.5.5.7.3.1”, “1.3.6.1.5.5.7.3.2”) my @extkeyusage_nid = Net::SSLeay::P_X509_get_ext_key_usage($x509,1); # returns for example: (129, 130) my @extkeyusage_sn = Net::SSLeay::P_X509_get_ext_key_usage($x509,2); # returns for example: (“serverAuth”, “clientAuth”) my @extkeyusage_ln = Net::SSLeay::P_X509_get_ext_key_usage($x509,3); # returns for example: (“TLS Web Server Authentication”, “TLS Web Client Authentication”)

  • P_X509_get_key_usage COMPATIBILITY: not available in Net-SSLeay-1.45 and before Gets the list of key usage of given X509 certificate $cert. my @keyusage = Net::SSLeay::P_X509_get_key_usage($cert); # $cert - value corresponding to openssls X509 structure # # returns: list of key usage values which can be none, one or more from the following list: # “digitalSignature” # “nonRepudiation” # “keyEncipherment” # “dataEncipherment” # “keyAgreement” # “keyCertSign” # “cRLSign” # “encipherOnly” # “decipherOnly”

  • P_X509_get_netscape_cert_type COMPATIBILITY: not available in Net-SSLeay-1.45 and before Gets the list of Netscape cert types of given X509 certificate $cert. Net::SSLeay::P_X509_get_netscape_cert_type($cert); # $cert - value corresponding to openssls X509 structure # # returns: list of Netscape type values which can be none, one or more from the following list: # “client” # “server” # “email” # “objsign” # “reserved” # “sslCA” # “emailCA” # “objCA”

  • P_X509_get_pubkey_alg COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns ASN1_OBJECT corresponding to X509 certificate public key algorithm. my $rv = Net::SSLeay::P_X509_get_pubkey_alg($x); # $x - value corresponding to openssls X509 structure # # returns: value corresponding to openssls ASN1_OBJECT structure (0 on failure) To get textual representation use: my $alg = Net::SSLeay::OBJ_obj2txt(Net::SSLeay::P_X509_get_pubkey_alg($x509)); # returns for example: “rsaEncryption”

  • P_X509_get_signature_alg COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns ASN1_OBJECT corresponding to X509 signature key algorithm. my $rv = Net::SSLeay::P_X509_get_signature_alg($x); # $x - value corresponding to openssls X509 structure # # returns: value corresponding to openssls ASN1_OBJECT structure (0 on failure) To get textual representation use: my $alg = Net::SSLeay::OBJ_obj2txt(Net::SSLeay::P_X509_get_signature_alg($x509)); # returns for example: “sha1WithRSAEncryption”

  • sk_X509_new_null Returns a new, empty, STACK_OF(X509) structure. my $rv = Net::SSLeay::sk_X509_new_null(); # # returns: value corresponding to openssls STACK_OF(X509) structure

  • sk_X509_push Pushes an X509 structure onto a STACK_OF(X509) structure. my $rv = Net::SSLeay::sk_X509_push($sk_x509, $x509); # $sk_x509 - value corresponding to openssls STACK_OF(X509) structure # $x509 - value corresponding to openssls X509 structure # # returns: total number of elements after the operation, 0 on failure

  • sk_X509_pop Pops an single X509 structure from a STACK_OF(X509) structure. my $x509 = Net::SSLeay::sk_X509_pop($sk_x509); # $sk_x509 - value corresponding to openssls STACK_OF(X509) structure # # returns: a pointer to an X509 structure, undef on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/sk_TYPE_pop.html>

  • sk_X509_shift Shifts an single X509 structure onto a STACK_OF(X509) structure. my $x509 = Net::SSLeay::sk_X509_shift($sk_x509, $x509); # $sk_x509 - value corresponding to openssls STACK_OF(X509) structure # $x509 - value corresponding to openssls X509 structure # # returns: a pointer to an X509 structure, undef on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/sk_TYPE_shift.html>

  • sk_X509_unshift Unshifts an single X509 structure from a STACK_OF(X509) structure. my $rv = Net::SSLeay::sk_X509_unshift($sk_x509); # $sk_x509 - value corresponding to openssls STACK_OF(X509) structure # # returns: total number of elements after the operation, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/sk_TYPE_unshift.html>

  • sk_X509_insert Inserts a single X509 structure into a STACK_OF(X509) at the specified index. my $rv = Net::SSLeay::sk_X509_insert($sk_x509, $x509, $index); # $sk_x509 - value corresponding to openssls STACK_OF(X509) structure # $x509 - value corresponding to openssls X509 structure # $index - integer - 0 based index # # returns: total number of elements after the operation, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/sk_TYPE_insert.html>

  • sk_X509_delete Delete a single X509 structure from a STACK_OF(X509) at the specified index. my $x509 = Net::SSLeay::sk_X509_delete($sk_x509, $index); # $sk_x509 - value corresponding to openssls STACK_OF(X509) structure # $index - integer - 0 based index # # returns: a pointer to an X509 structure, undef on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/sk_TYPE_delete.html>

  • sk_X509_value Return a single X509 structure from a STACK_OF(X509) at the specified index. my $x509 = Net::SSLeay::sk_X509_value($sk_x509, $index); # $sk_x509 - value corresponding to openssls STACK_OF(X509) structure # $index - integer - 0 based index # # returns: a pointer to an X509 structure, undef on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/sk_TYPE_value.html>

  • sk_X509_num Return the number of X509 elements in a STACK_OF(X509). my $num = Net::SSLeay::sk_X509_num($sk_x509); # $sk_x509 - value corresponding to openssls STACK_OF(X509) structure # # returns: the number of elements in the stack, -1 if the passed stack is NULL Check openssl doc <https://www.openssl.org/docs/manmaster/man3/sk_TYPE_num.html>

Low level API: X509_REQ_* related functions

  • X509_REQ_new COMPATIBILITY: not available in Net-SSLeay-1.45 and before Creates a new X509_REQ structure. my $rv = Net::SSLeay::X509_REQ_new(); # # returns: value corresponding to openssls X509_REQ structure (0 on failure)

  • X509_REQ_free COMPATIBILITY: not available in Net-SSLeay-1.45 and before Free an allocated X509_REQ structure. Net::SSLeay::X509_REQ_free($x); # $x - value corresponding to openssls X509_REQ structure # # returns: no return value

  • X509_REQ_add1_attr_by_NID COMPATIBILITY: not available in Net-SSLeay-1.45 and before Adds an attribute whose name is defined by a NID $nid. The field value to be added is in $bytes. my $rv = Net::SSLeay::X509_REQ_add1_attr_by_NID($req, $nid, $type, $bytes); # $req - value corresponding to openssls X509_REQ structure # $nid - (integer) NID value # $type - (integer) type of data in $bytes (see below) # $bytes - data to be set # # returns: 1 on success, 0 on failure # values for $type - use constants: # &Net::SSLeay::MBSTRING_UTF8 - $bytes contains utf8 encoded data # &Net::SSLeay::MBSTRING_ASC - $bytes contains ASCII data

  • X509_REQ_digest COMPATIBILITY: not available in Net-SSLeay-1.45 and before Computes digest/fingerprint of X509_REQ $data using $type hash function. my $digest_value = Net::SSLeay::X509_REQ_digest($data, $type); # $data - value corresponding to openssls X509_REQ structure # $type - value corresponding to openssls EVP_MD structure - e.g. got via EVP_get_digestbyname() # # returns: hash value (binary) # to get printable (hex) value of digest use: print unpack(H*, $digest_value);

  • X509_REQ_get_attr_by_NID COMPATIBILITY: not available in Net-SSLeay-1.45 and before Retrieve the next index matching $nid after $lastpos ($lastpos should initially be set to -1). my $rv = Net::SSLeay::X509_REQ_get_attr_by_NID($req, $nid, $lastpos=-1); # $req - value corresponding to openssls X509_REQ structure # $nid - (integer) NID value # $lastpos - [optional] (integer) index where to start search (default -1) # # returns: index (-1 if there are no more entries) Note: use “P_X509_REQ_get_attr” to get the actual attribute value - e.g. my $index = Net::SSLeay::X509_REQ_get_attr_by_NID($req, $nid); my @attr_values = Net::SSLeay::P_X509_REQ_get_attr($req, $index);

  • X509_REQ_get_attr_by_OBJ COMPATIBILITY: not available in Net-SSLeay-1.45 and before Retrieve the next index matching $obj after $lastpos ($lastpos should initially be set to -1). my $rv = Net::SSLeay::X509_REQ_get_attr_by_OBJ($req, $obj, $lastpos=-1); # $req - value corresponding to openssls X509_REQ structure # $obj - value corresponding to openssls ASN1_OBJECT structure # $lastpos - [optional] (integer) index where to start search (default -1) # # returns: index (-1 if there are no more entries) Note: use “P_X509_REQ_get_attr” to get the actual attribute value - e.g. my $index = Net::SSLeay::X509_REQ_get_attr_by_NID($req, $nid); my @attr_values = Net::SSLeay::P_X509_REQ_get_attr($req, $index);

  • X509_REQ_get_attr_count COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns the total number of attributes in $req. my $rv = Net::SSLeay::X509_REQ_get_attr_count($req); # $req - value corresponding to openssls X509_REQ structure # # returns: (integer) items count

  • X509_REQ_get_pubkey COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns public key corresponding to given X509_REQ object $x. my $rv = Net::SSLeay::X509_REQ_get_pubkey($x); # $x - value corresponding to openssls X509_REQ structure # # returns: value corresponding to openssls EVP_PKEY structure (0 on failure)

  • X509_REQ_get_subject_name COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns X509_NAME object corresponding to subject name of given X509_REQ object $x. my $rv = Net::SSLeay::X509_REQ_get_subject_name($x); # $x - value corresponding to openssls X509_REQ structure # # returns: value corresponding to openssls X509_NAME structure (0 on failure)

  • X509_REQ_get_version COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns ‘version’ value for given X509_REQ object $x. my $rv = Net::SSLeay::X509_REQ_get_version($x); # $x - value corresponding to openssls X509_REQ structure # # returns: (integer) version e.g. 0 = “version 1”

  • X509_REQ_set_pubkey COMPATIBILITY: not available in Net-SSLeay-1.45 and before Sets public key of given X509_REQ object $x to $pkey. my $rv = Net::SSLeay::X509_REQ_set_pubkey($x, $pkey); # $x - value corresponding to openssls X509_REQ structure # $pkey - value corresponding to openssls EVP_PKEY structure # # returns: 1 on success, 0 on failure

  • X509_REQ_set_subject_name COMPATIBILITY: not available in Net-SSLeay-1.45 and before Sets subject name of given X509_REQ object $x to X509_NAME object $name. my $rv = Net::SSLeay::X509_REQ_set_subject_name($x, $name); # $x - value corresponding to openssls X509_REQ structure # $name - value corresponding to openssls X509_NAME structure # # returns: 1 on success, 0 on failure

  • X509_REQ_set_version COMPATIBILITY: not available in Net-SSLeay-1.45 and before Sets ‘version’ of given X509_REQ object $x to $version. my $rv = Net::SSLeay::X509_REQ_set_version($x, $version); # $x - value corresponding to openssls X509_REQ structure # $version - (integer) e.g. 0 = “version 1” # # returns: 1 on success, 0 on failure

  • X509_REQ_sign COMPATIBILITY: not available in Net-SSLeay-1.45 and before Sign X509_REQ object $x with private key $pk (using digest algorithm $md). my $rv = Net::SSLeay::X509_REQ_sign($x, $pk, $md); # $x - value corresponding to openssls X509_REQ structure # $pk - value corresponding to openssls EVP_PKEY structure (requestors private key) # $md - value corresponding to openssls EVP_MD structure # # returns: 1 on success, 0 on failure

  • X509_REQ_verify COMPATIBILITY: not available in Net-SSLeay-1.45 and before Verifies X509_REQ object $x using public key $r (pubkey of requesting party). my $rv = Net::SSLeay::X509_REQ_verify($x, $r); # $x - value corresponding to openssls X509_REQ structure # $r - value corresponding to openssls EVP_PKEY structure # # returns: 0 - verify failure, 1 - verify OK, <0 - error

  • P_X509_REQ_add_extensions COMPATIBILITY: not available in Net-SSLeay-1.45 and before Adds one or more X509 extensions to X509_REQ object $x. my $rv = Net::SSLeay::P_X509_REQ_add_extensions($x, $nid, $value); # $x - value corresponding to openssls X509_REQ structure # $nid - NID identifying extension to be set # $value - extension value # # returns: 1 on success, 0 on failure You can set more extensions at once: my $rv = Net::SSLeay::P_X509_REQ_add_extensions($x509_req, &Net::SSLeay::NID_key_usage => digitalSignature,keyEncipherment, &Net::SSLeay::NID_basic_constraints => CA:FALSE, &Net::SSLeay::NID_ext_key_usage => serverAuth,clientAuth, &Net::SSLeay::NID_netscape_cert_type => server, &Net::SSLeay::NID_subject_alt_name => DNS:s1.com,DNS:s2.com, &Net::SSLeay::NID_crl_distribution_points => URI:http://pki.com/crl1,URI:http://pki.com/crl2, );

  • P_X509_REQ_get_attr COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns attribute value for X509_REQ’s attribute at index $n. Net::SSLeay::P_X509_REQ_get_attr($req, $n); # $req - value corresponding to openssls X509_REQ structure # $n - (integer) attribute index # # returns: value corresponding to openssls ASN1_STRING structure

Low level API: X509_CRL_* related functions

  • X509_CRL_new COMPATIBILITY: not available in Net-SSLeay-1.45 and before Creates a new X509_CRL structure. my $rv = Net::SSLeay::X509_CRL_new(); # # returns: value corresponding to openssls X509_CRL structure (0 on failure)

  • X509_CRL_free COMPATIBILITY: not available in Net-SSLeay-1.45 and before Free an allocated X509_CRL structure. Net::SSLeay::X509_CRL_free($x); # $x - value corresponding to openssls X509_CRL structure # # returns: no return value

  • X509_CRL_digest COMPATIBILITY: not available in Net-SSLeay-1.45 and before Computes digest/fingerprint of X509_CRL $data using $type hash function. my $digest_value = Net::SSLeay::X509_CRL_digest($data, $type); # $data - value corresponding to openssls X509_CRL structure # $type - value corresponding to openssls EVP_MD structure - e.g. got via EVP_get_digestbyname() # # returns: hash value (binary) Example: my $x509_crl; my $md = Net::SSLeay::EVP_get_digestbyname(“sha1”); my $digest_value = Net::SSLeay::X509_CRL_digest($x509_crl, $md); # to get printable (hex) value of digest use: print “digest=”, unpack(H*, $digest_value), " “;

  • X509_CRL_get_ext COMPATIBILITY: not available in Net-SSLeay-1.54 and before Returns X509_EXTENSION from $x509 based on given position/index. my $rv = Net::SSLeay::X509_CRL_get_ext($x509, $index); # $x509 - value corresponding to openssls X509_CRL structure # $index - (integer) position/index of extension within $x509 # # returns: value corresponding to openssls X509_EXTENSION structure (0 on failure)

  • X509_CRL_get_ext_by_NID COMPATIBILITY: not available in Net-SSLeay-1.54 and before Returns X509_EXTENSION from $x509 based on given NID. my $rv = Net::SSLeay::X509_CRL_get_ext_by_NID($x509, $nid, $loc); # $x509 - value corresponding to openssls X509_CRL structure # $nid - (integer) NID value # $loc - (integer) position to start lookup at # # returns: position/index of extension, negative value on error # call Net::SSLeay::X509_CRL_get_ext($x509, $rv) to get the actual extension

  • X509_CRL_get_ext_count COMPATIBILITY: not available in Net-SSLeay-1.54 and before Returns the total number of extensions in X509_CRL object $x. my $rv = Net::SSLeay::X509_CRL_get_ext_count($x); # $x - value corresponding to openssls X509_CRL structure # # returns: count of extensions

  • X509_CRL_get_issuer COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns X509_NAME object corresponding to the issuer of X509_CRL $x. my $rv = Net::SSLeay::X509_CRL_get_issuer($x); # $x - value corresponding to openssls X509_CRL structure # # returns: value corresponding to openssls X509_NAME structure (0 on failure) See other X509_NAME_* functions to get more info from X509_NAME structure.

  • X509_CRL_get0_lastUpdate and X509_CRL_get_lastUpdate COMPATIBILITY: X509_CRL_get0_lastUpdate not available in Net-SSLeay-1.92 and before, X509_CRL_get_lastUpdate not available in Net-SSLeay-1.45 and before Returns ’lastUpdate’ date-time value of X509_CRL object $x. my $rv = Net::SSLeay::X509_CRL_get0_lastUpdate($x); # $x - value corresponding to openssls X509_CRL structure # # returns: read-only value corresponding to openssls ASN1_TIME structure NOTE: X509_CRL_get_lastUpdate is an alias and deprecated in OpenSSL 1.1.0 and later Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_CRL_get0_lastUpdate.html>

  • X509_CRL_get0_nextUpdate and X509_CRL_get_nextUpdate COMPATIBILITY: X509_CRL_get0_nextUpdate not available in Net-SSLeay-1.92 and before, X509_CRL_get_nextUpdate not available in Net-SSLeay-1.45 and before Returns ’nextUpdate’ date-time value of X509_CRL object $x. my $rv = Net::SSLeay::X509_CRL_get0_nextUpdate($x); # $x - value corresponding to openssls X509_CRL structure # # returns: read-only value corresponding to openssls ASN1_TIME structure or 0 if nextUpdate is not set NOTE: X509_CRL_get_nextUpdate is an alias and deprecated in OpenSSL 1.1.0 and later Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_CRL_get0_nextUpdate.html>

  • X509_CRL_get_version COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns ‘version’ value of given X509_CRL structure $x. my $rv = Net::SSLeay::X509_CRL_get_version($x); # $x - value corresponding to openssls X509_CRL structure # # returns: (integer) version

  • X509_CRL_set_issuer_name COMPATIBILITY: not available in Net-SSLeay-1.45 and before Sets the issuer of X509_CRL object $x to X509_NAME object $name. my $rv = Net::SSLeay::X509_CRL_set_issuer_name($x, $name); # $x - value corresponding to openssls X509_CRL structure # $name - value corresponding to openssls X509_NAME structure # # returns: 1 on success, 0 on failure

  • X509_CRL_set1_lastUpdate and X509_CRL_set_lastUpdate COMPATIBILITY: X509_CRL_set1_lastUpdate not available in Net-SSLeay-1.92 and before, X509_CRL_set_lastUpdate not available in Net-SSLeay-1.45 and before Sets ’lastUpdate’ value of X509_CRL object $x to $tm. my $rv = Net::SSLeay::X509_CRL_set1_lastUpdate($x, $tm); # $x - value corresponding to openssls X509_CRL structure # $tm - value corresponding to openssls ASN1_TIME structure # # returns: 1 on success, 0 on failure NOTE: X509_CRL_set_lastUpdate is an alias and deprecated in OpenSSL 1.1.0 and later Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_CRL_set1_lastUpdate.html>

  • X509_CRL_set1_nextUpdate and X509_CRL_set_nextUpdate COMPATIBILITY: X509_CRL_set1_nextUpdate not available in Net-SSLeay-1.92 and before, X509_CRL_set_nextUpdate not available in Net-SSLeay-1.45 and before Sets ’nextUpdate’ value of X509_CRL object $x to $tm. my $rv = Net::SSLeay::X509_CRL_set1_nextUpdate($x, $tm); # $x - value corresponding to openssls X509_CRL structure # $tm - value corresponding to openssls ASN1_TIME structure # # returns: 1 on success, 0 on failure NOTE: X509_CRL_set_nextUpdate is an alias and deprecated in OpenSSL 1.1.0 and later Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_CRL_set1_nextUpdate.html>

  • X509_CRL_set_version COMPATIBILITY: not available in Net-SSLeay-1.45 and before Sets ‘version’ value of given X509_CRL structure $x to $version. my $rv = Net::SSLeay::X509_CRL_set_version($x, $version); # $x - value corresponding to openssls X509_CRL structure # $version - (integer) version number (1 = version 2 CRL) # # returns: 1 on success, 0 on failure Note that if you want to use any X509_CRL extension you need to set “version 2 CRL” - Net::SSLeay::X509_CRL_set_version($x, 1).

  • X509_CRL_sign COMPATIBILITY: not available in Net-SSLeay-1.45 and before Sign X509_CRL object $x with private key $pkey (using digest algorithm $md). my $rv = Net::SSLeay::X509_CRL_sign($x, $pkey, $md); # $x - value corresponding to openssls X509_CRL structure # $pkey - value corresponding to openssls EVP_PKEY structure # $md - value corresponding to openssls EVP_MD structure # # returns: 1 on success, 0 on failure

  • X509_CRL_sort COMPATIBILITY: not available in Net-SSLeay-1.45 and before Sorts the data of X509_CRL object so it will be written in serial number order. my $rv = Net::SSLeay::X509_CRL_sort($x); # $x - value corresponding to openssls X509_CRL structure # # returns: 1 on success, 0 on failure

  • X509_CRL_verify COMPATIBILITY: not available in Net-SSLeay-1.45 and before Verifies X509_CRL object $a using public key $r (pubkey of issuing CA). my $rv = Net::SSLeay::X509_CRL_verify($a, $r); # $a - value corresponding to openssls X509_CRL structure # $r - value corresponding to openssls EVP_PKEY structure # # returns: 0 - verify failure, 1 - verify OK, <0 - error

  • P_X509_CRL_add_revoked_serial_hex COMPATIBILITY: not available in Net-SSLeay-1.45 and before Adds given serial number $serial_hex to X509_CRL object $crl. Net::SSLeay::P_X509_CRL_add_revoked_serial_hex($crl, $serial_hex, $rev_time, $reason_code, $comp_time); # $crl - value corresponding to openssls X509_CRL structure # $serial_hex - string (hexadecimal) representation of serial number # $rev_time - (revocation time) value corresponding to openssls ASN1_TIME structure # $reason_code - [optional] (integer) reason code (see below) - default 0 # $comp_time - [optional] (compromise time) value corresponding to openssls ASN1_TIME structure # # returns: no return value # reason codes: # 0 - unspecified # 1 - keyCompromise # 2 - CACompromise # 3 - affiliationChanged # 4 - superseded # 5 - cessationOfOperation # 6 - certificateHold # 7 - (value 7 is not used) # 8 - removeFromCRL # 9 - privilegeWithdrawn # 10 - aACompromise

  • P_X509_CRL_get_serial COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns serial number of X509_CRL object. my $rv = Net::SSLeay::P_X509_CRL_get_serial($crl); # $crl - value corresponding to openssls X509_CRL structure # # returns: value corresponding to openssls ASN1_INTEGER structure (0 on failure)

  • P_X509_CRL_set_serial COMPATIBILITY: not available in Net-SSLeay-1.45 and before Sets serial number of X509_CRL object to $crl_number. my $rv = Net::SSLeay::P_X509_CRL_set_serial($crl, $crl_number); # $crl - value corresponding to openssls X509_CRL structure # $crl_number - value corresponding to openssls ASN1_INTEGER structure # # returns: 1 on success, 0 on failure

  • P_X509_CRL_add_extensions COMPATIBILITY: not available in Net-SSLeay-1.88 and before Adds one or more X509 extensions to X509 CRL object $x. my $rv = Net::SSLeay::P_X509_CRL_add_extensions($x, $ca_cert, $nid, $value); # $x - value corresponding to openssls X509 CRL structure # $ca_cert - value corresponding to openssls X509 structure (issuers cert - necessary for setting NID_authority_key_identifier) # $nid - NID identifying extension to be set # $value - extension value # # returns: 1 on success, 0 on failure For more details see “P_X509_add_extensions”.

Low level API: X509_EXTENSION_* related functions

  • X509_EXTENSION_get_critical COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns ‘critical’ flag of given X509_EXTENSION object $ex. my $rv = Net::SSLeay::X509_EXTENSION_get_critical($ex); # $ex - value corresponding to openssls X509_EXTENSION structure # # returns: (integer) 1 - critical, 0 - noncritical

  • X509_EXTENSION_get_data COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns value (raw data) of X509_EXTENSION object $ne. my $rv = Net::SSLeay::X509_EXTENSION_get_data($ne); # $ne - value corresponding to openssls X509_EXTENSION structure # # returns: value corresponding to openssls ASN1_OCTET_STRING structure (0 on failure) Note: you can use “P_ASN1_STRING_get” to convert ASN1_OCTET_STRING into perl scalar variable.

  • X509_EXTENSION_get_object COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns OID (ASN1_OBJECT) of X509_EXTENSION object $ne. my $rv = Net::SSLeay::X509_EXTENSION_get_object($ex); # $ex - value corresponding to openssls X509_EXTENSION structure # # returns: value corresponding to openssls ASN1_OBJECT structure (0 on failure)

  • X509V3_EXT_print COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns string representation of given X509_EXTENSION object $ext. Net::SSLeay::X509V3_EXT_print($ext, $flags, $utf8_decode); # $ext - value corresponding to openssls X509_EXTENSION structure # $flags - [optional] (integer) Currently the flag argument is unused and should be set to 0 # $utf8_decode - [optional] 0 or 1 whether the returned value should be utf8 decoded (default=0) # # returns: no return value

  • X509V3_EXT_d2i Parses an extension and returns its internal structure. my $rv = Net::SSLeay::X509V3_EXT_d2i($ext); # $ext - value corresponding to openssls X509_EXTENSION structure # # returns: pointer ???

Low level API: X509_NAME_* related functions

  • X509_NAME_ENTRY_get_data COMPATIBILITY: not available in Net-SSLeay-1.45 and before Retrieves the field value of $ne in and ASN1_STRING structure. my $rv = Net::SSLeay::X509_NAME_ENTRY_get_data($ne); # $ne - value corresponding to openssls X509_NAME_ENTRY structure # # returns: value corresponding to openssls ASN1_STRING structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_NAME_ENTRY_get_object.html>

  • X509_NAME_ENTRY_get_object COMPATIBILITY: not available in Net-SSLeay-1.45 and before Retrieves the field name of $ne in and ASN1_OBJECT structure. my $rv = Net::SSLeay::X509_NAME_ENTRY_get_object($ne); # $ne - value corresponding to openssls X509_NAME_ENTRY structure # # returns: value corresponding to openssls ASN1_OBJECT structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_NAME_ENTRY_get_object.html>

  • X509_NAME_new COMPATIBILITY: not available in Net-SSLeay-1.55 and before Creates a new X509_NAME structure. Adds a field whose name is defined by a string $field. The field value to be added is in $bytes. my $rv = Net::SSLeay::X509_NAME_new(); # # returns: value corresponding to openssls X509_NAME structure (0 on failure)

  • X509_NAME_hash COMPATIBILITY: not available in Net-SSLeay-1.55 and before Sort of a checksum of issuer name $name. The result is not a full hash (e.g. sha-1), it is kind-of-a-hash truncated to the size of ‘unsigned long’ (32 bits). The resulting value might differ across different openssl versions for the same X509 certificate. my $rv = Net::SSLeay::X509_NAME_hash($name); # $name - value corresponding to openssls X509_NAME structure # # returns: number representing checksum

  • X509_NAME_add_entry_by_txt COMPATIBILITY: not available in Net-SSLeay-1.45 and before Adds a field whose name is defined by a string $field. The field value to be added is in $bytes. my $rv = Net::SSLeay::X509_NAME_add_entry_by_txt($name, $field, $type, $bytes, $len, $loc, $set); # $name - value corresponding to openssls X509_NAME structure # $field - (string) field definition (name) - e.g. “organizationName” # $type - (integer) type of data in $bytes (see below) # $bytes - data to be set # $loc - [optional] (integer) index where the new entry is inserted: if it is -1 (default) it is appended # $set - [optional] (integer) determines how the new type is added. If it is 0 (default) a new RDN is created # # returns: 1 on success, 0 on failure # values for $type - use constants: # &Net::SSLeay::MBSTRING_UTF8 - $bytes contains utf8 encoded data # &Net::SSLeay::MBSTRING_ASC - $bytes contains ASCII data Unicode note: when passing non-ascii (unicode) string in $bytes do not forget to set $flags = &Net::SSLeay::MBSTRING_UTF8 and encode the perl $string via $bytes = encode(utf-8, $string). Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_NAME_add_entry_by_txt.html>

  • X509_NAME_add_entry_by_NID COMPATIBILITY: not available in Net-SSLeay-1.45 and before Adds a field whose name is defined by a NID $nid. The field value to be added is in $bytes. my $rv = Net::SSLeay::X509_NAME_add_entry_by_NID($name, $nid, $type, $bytes, $len, $loc, $set); # $name - value corresponding to openssls X509_NAME structure # $nid - (integer) field definition - NID value # $type - (integer) type of data in $bytes (see below) # $bytes - data to be set # $loc - [optional] (integer) index where the new entry is inserted: if it is -1 (default) it is appended # $set - [optional] (integer) determines how the new type is added. If it is 0 (default) a new RDN is created # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_NAME_add_entry_by_txt.html>

  • X509_NAME_add_entry_by_OBJ COMPATIBILITY: not available in Net-SSLeay-1.45 and before Adds a field whose name is defined by a object (OID) $obj . The field value to be added is in $bytes. my $rv = Net::SSLeay::X509_NAME_add_entry_by_OBJ($name, $obj, $type, $bytes, $len, $loc, $set); # $name - value corresponding to openssls X509_NAME structure # $obj - field definition - value corresponding to openssls ASN1_OBJECT structure # $type - (integer) type of data in $bytes (see below) # $bytes - data to be set # $loc - [optional] (integer) index where the new entry is inserted: if it is -1 (default) it is appended # $set - [optional] (integer) determines how the new type is added. If it is 0 (default) a new RDN is created # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_NAME_add_entry_by_txt.html>

  • X509_NAME_cmp COMPATIBILITY: not available in Net-SSLeay-1.45 and before Compares two X509_NAME objects. my $rv = Net::SSLeay::X509_NAME_cmp($a, $b); # $a - value corresponding to openssls X509_NAME structure # $b - value corresponding to openssls X509_NAME structure # # returns: 0 if $a matches $b; non zero otherwise

  • X509_NAME_digest COMPATIBILITY: not available in Net-SSLeay-1.45 and before Computes digest/fingerprint of X509_NAME $data using $type hash function. my $digest_value = Net::SSLeay::X509_NAME_digest($data, $type); # $data - value corresponding to openssls X509_NAME structure # $type - value corresponding to openssls EVP_MD structure - e.g. got via EVP_get_digestbyname() # # returns: hash value (binary) # to get printable (hex) value of digest use: print unpack(H*, $digest_value);

  • X509_NAME_entry_count COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns the total number of entries in $name. my $rv = Net::SSLeay::X509_NAME_entry_count($name); # $name - value corresponding to openssls X509_NAME structure # # returns: (integer) entries count Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_NAME_get_index_by_NID.html>

  • X509_NAME_get_entry COMPATIBILITY: not available in Net-SSLeay-1.45 and before Retrieves the X509_NAME_ENTRY from $name corresponding to index $loc. Acceptable values for $loc run from 0 to Net::SSLeay::X509_NAME_entry_count($name) - 1. The value returned is an internal pointer which must not be freed. my $rv = Net::SSLeay::X509_NAME_get_entry($name, $loc); # $name - value corresponding to openssls X509_NAME structure # $loc - (integer) index of wanted entry # # returns: value corresponding to openssls X509_NAME_ENTRY structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_NAME_get_index_by_NID.html>

  • X509_NAME_print_ex COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns a string with human readable version of $name. Net::SSLeay::X509_NAME_print_ex($name, $flags, $utf8_decode); # $name - value corresponding to openssls X509_NAME structure # $flags - [optional] conversion flags (default XN_FLAG_RFC2253) - see below # $utf8_decode - [optional] 0 or 1 whether the returned value should be utf8 decoded (default=0) # # returns: string representation of $name # available conversion flags - use constants: # &Net::SSLeay::XN_FLAG_COMPAT # &Net::SSLeay::XN_FLAG_DN_REV # &Net::SSLeay::XN_FLAG_DUMP_UNKNOWN_FIELDS # &Net::SSLeay::XN_FLAG_FN_ALIGN # &Net::SSLeay::XN_FLAG_FN_LN # &Net::SSLeay::XN_FLAG_FN_MASK # &Net::SSLeay::XN_FLAG_FN_NONE # &Net::SSLeay::XN_FLAG_FN_OID # &Net::SSLeay::XN_FLAG_FN_SN # &Net::SSLeay::XN_FLAG_MULTILINE # &Net::SSLeay::XN_FLAG_ONELINE # &Net::SSLeay::XN_FLAG_RFC2253 # &Net::SSLeay::XN_FLAG_SEP_COMMA_PLUS # &Net::SSLeay::XN_FLAG_SEP_CPLUS_SPC # &Net::SSLeay::XN_FLAG_SEP_MASK # &Net::SSLeay::XN_FLAG_SEP_MULTILINE # &Net::SSLeay::XN_FLAG_SEP_SPLUS_SPC # &Net::SSLeay::XN_FLAG_SPC_EQ Most likely you will be fine with default: Net::SSLeay::X509_NAME_print_ex($name, &Net::SSLeay::XN_FLAG_RFC2253); Or you might want RFC2253-like output without utf8 chars escaping: use Net::SSLeay qw/XN_FLAG_RFC2253 ASN1_STRFLGS_ESC_MSB/; my $flag_rfc22536_utf8 = (XN_FLAG_RFC2253) & (~ ASN1_STRFLGS_ESC_MSB); my $result = Net::SSLeay::X509_NAME_print_ex($name, $flag_rfc22536_utf8, 1); Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_NAME_print_ex.html>

  • X509_NAME_get_text_by_NID Retrieves the text from the first entry in name which matches $nid, if no such entry exists -1 is returned. openssl note: this is a legacy function which has various limitations which makes it of minimal use in practice. It can only find the first matching entry and will copy the contents of the field verbatim: this can be highly confusing if the target is a multicharacter string type like a BMPString or a UTF8String. Net::SSLeay::X509_NAME_get_text_by_NID($name, $nid); # $name - value corresponding to openssls X509_NAME structure # $nid - NID value (integer) # # returns: text value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_NAME_get_index_by_NID.html>

  • X509_NAME_oneline Return an ASCII version of $name. Net::SSLeay::X509_NAME_oneline($name); # $name - value corresponding to openssls X509_NAME structure # # returns: (string) ASCII version of $name Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_NAME_print_ex.html>

  • sk_X509_NAME_free Free an allocated STACK_OF(X509_NAME) structure. Net::SSLeay::sk_X509_NAME_free($sk); # $sk - value corresponding to openssls STACK_OF(X509_NAME) structure # # returns: no return value

  • sk_X509_NAME_num Return number of items in STACK_OF(X509_NAME) my $rv = Net::SSLeay::sk_X509_NAME_num($sk); # $sk - value corresponding to openssls STACK_OF(X509_NAME) structure # # returns: number of items

  • sk_X509_NAME_value Returns X509_NAME from position $index in STACK_OF(X509_NAME) my $rv = Net::SSLeay::sk_X509_NAME_value($sk, $i); # $sk - value corresponding to openssls STACK_OF(X509_NAME) structure # $i - (integer) index/position # # returns: value corresponding to openssls X509_NAME structure (0 on failure)

  • add_file_cert_subjects_to_stack Add a file of certs to a stack. All certs in $file that are not already in the $stackCAs will be added. my $rv = Net::SSLeay::add_file_cert_subjects_to_stack($stackCAs, $file); # $stackCAs - value corresponding to openssls STACK_OF(X509_NAME) structure # $file - (string) filename # # returns: 1 on success, 0 on failure

  • add_dir_cert_subjects_to_stack Add a directory of certs to a stack. All certs in $dir that are not already in the $stackCAs will be added. my $rv = Net::SSLeay::add_dir_cert_subjects_to_stack($stackCAs, $dir); # $stackCAs - value corresponding to openssls STACK_OF(X509_NAME) structure # $dir - (string) the directory to append from. All files in this directory will be examined as potential certs. Any that are acceptable to SSL_add_dir_cert_subjects_to_stack() that are not already in the stack will be included. # # returns: 1 on success, 0 on failure

Low level API: X509_STORE_* related functions

  • X509_STORE_CTX_new returns a newly initialised X509_STORE_CTX structure.

  • X509_STORE_CTX_init X509_STORE_CTX_init() sets up an X509_STORE_CTX for a subsequent verification operation. It must be called before each call to X509_verify_cert(). my $rv = Net::SSLeay::X509_STORE_CTX_init($x509_store_ctx, $x509_store, $x509, $chain); # $x509_store_ctx - value corresponding to openssls X509_STORE_CTX structure (required) # $x509_store - value corresponding to openssls X509_STORE structure (optional) # $x509 - value corresponding to openssls X509 structure (optional) # $chain - value corresponding to openssls STACK_OF(X509) structure (optional) # # returns: 1 on success, 0 on failure # # Note: returns nothing with Net::SSLeay 1.90 and earlier. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_STORE_CTX_init.html>

  • X509_STORE_CTX_free Frees an X509_STORE_CTX structure. Net::SSLeay::X509_STORE_CTX_free($x509_store_ctx); # $x509_store_ctx - value corresponding to openssls X509_STORE_CTX structure

  • X509_verify_cert The X509_verify_cert() function attempts to discover and validate a certificate chain based on parameters in ctx. A complete description of the process is contained in the verify (1) manual page. If this function returns 0, use X509_STORE_CTX_get_error to get additional error information. my $rv = Net::SSLeay::X509_verify_cert($x509_store_ctx); # $x509_store_ctx - value corresponding to openssls X509_STORE_CTX structure # # returns: 1 if a complete chain can be built and validated, otherwise 0 Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_verify_cert.html>

  • X509_STORE_CTX_get_current_cert Returns the certificate in ctx which caused the error or 0 if no certificate is relevant. my $rv = Net::SSLeay::X509_STORE_CTX_get_current_cert($x509_store_ctx); # $x509_store_ctx - value corresponding to openssls X509_STORE_CTX structure # # returns: value corresponding to openssls X509 structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_STORE_CTX_get_error.html>

  • X509_STORE_CTX_get0_cert COMPATIBILITY: not available in Net-SSLeay-1.88 and before; requires at least OpenSSL 1.1.0pre6 or LibreSSL 2.7.0 Returns an internal pointer to the certificate being verified by the ctx. my $x509 = Net::SSLeay::X509_STORE_CTX_get0_cert($x509_store_ctx); # $x509_store_ctx - value corresponding to openssls X509_STORE_CTX structure # # returns: value corresponding to openssls X509 structure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_STORE_CTX_get0_cert.html>

  • X509_STORE_CTX_get1_chain Returns a returns a complete validate chain if a previous call to X509_verify_cert() is successful. my $rv = Net::SSLeay::X509_STORE_CTX_get1_chain($x509_store_ctx); # $x509_store_ctx - value corresponding to openssls X509_STORE_CTX structure # # returns: value corresponding to openssls STACK_OF(X509) structure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_STORE_CTX_get1_chain.html>

  • X509_STORE_CTX_get_error Returns the error code of $ctx. my $rv = Net::SSLeay::X509_STORE_CTX_get_error($x509_store_ctx); # $x509_store_ctx - value corresponding to openssls X509_STORE_CTX structure # # returns: (integer) error code For more info about error code values check function “get_verify_result”. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_STORE_CTX_get_error.html>

  • X509_STORE_CTX_get_error_depth Returns the depth of the error. This is a non-negative integer representing where in the certificate chain the error occurred. If it is zero it occurred in the end entity certificate, one if it is the certificate which signed the end entity certificate and so on. my $rv = Net::SSLeay::X509_STORE_CTX_get_error_depth($x509_store_ctx); # $x509_store_ctx - value corresponding to openssls X509_STORE_CTX structure # # returns: (integer) depth Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_STORE_CTX_get_error.html>

  • X509_STORE_CTX_get_ex_data Is used to retrieve the information for $idx from $x509_store_ctx. my $rv = Net::SSLeay::X509_STORE_CTX_get_ex_data($x509_store_ctx, $idx); # $x509_store_ctx - value corresponding to openssls X509_STORE_CTX structure # $idx - (integer) index for application specific data # # returns: pointer to ???

  • X509_STORE_CTX_set_ex_data Is used to store application data at arg for idx into $x509_store_ctx. my $rv = Net::SSLeay::X509_STORE_CTX_set_ex_data($x509_store_ctx, $idx, $data); # $x509_store_ctx - value corresponding to openssls X509_STORE_CTX structure # $idx - (integer) ??? # $data - (pointer) ??? # # returns: 1 on success, 0 on failure

  • X509_STORE_CTX_set_cert Sets the certificate to be verified in $x509_store_ctx to $x. Net::SSLeay::X509_STORE_CTX_set_cert($x509_store_ctx, $x); # $x509_store_ctx - value corresponding to openssls X509_STORE_CTX structure # $x - value corresponding to openssls X509 structure # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_STORE_CTX_new.html>

  • X509_STORE_new Returns a newly initialized X509_STORE structure. my $rv = Net::SSLeay::X509_STORE_new(); # # returns: value corresponding to openssls X509_STORE structure (0 on failure)

  • X509_STORE_free Frees an X509_STORE structure Net::SSLeay::X509_STORE_free($x509_store); # $x509_store - value corresponding to openssls X509_STORE structure

  • X509_STORE_add_lookup Adds a lookup to an X509_STORE for a given lookup method. my $method = &Net::SSLeay::X509_LOOKUP_hash_dir; my $rv = Net::SSLeay::X509_STORE_add_lookup($x509_store, $method); # $method - value corresponding to openssls X509_LOOKUP_METHOD structure # $x509_store - value corresponding to openssls X509_STORE structure # # returns: value corresponding to openssls X509_LOOKUP structure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_STORE_add_lookup.html>

  • X509_STORE_CTX_set_error Sets the error code of $ctx to $s. For example it might be used in a verification callback to set an error based on additional checks. Net::SSLeay::X509_STORE_CTX_set_error($x509_store_ctx, $s); # $x509_store_ctx - value corresponding to openssls X509_STORE_CTX structure # $s - (integer) error id # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_STORE_CTX_get_error.html>

  • X509_STORE_add_cert Adds X509 certificate $x into the X509_STORE $store. my $rv = Net::SSLeay::X509_STORE_add_cert($store, $x); # $store - value corresponding to openssls X509_STORE structure # $x - value corresponding to openssls X509 structure # # returns: 1 on success, 0 on failure

  • X509_STORE_add_crl Adds X509 CRL $x into the X509_STORE $store. my $rv = Net::SSLeay::X509_STORE_add_crl($store, $x); # $store - value corresponding to openssls X509_STORE structure # $x - value corresponding to openssls X509_CRL structure # # returns: 1 on success, 0 on failure

  • X509_STORE_set1_param ??? (more info needed) my $rv = Net::SSLeay::X509_STORE_set1_param($store, $pm); # $store - value corresponding to openssls X509_STORE structure # $pm - value corresponding to openssls X509_VERIFY_PARAM structure # # returns: 1 on success, 0 on failure

  • X509_LOOKUP_hash_dir Returns an X509_LOOKUP structure that instructs an X509_STORE to load files from a directory containing certificates with filenames in the format hash.N or crls with filenames in the format hash.rN my $rv = Net::SSLeay::X509_LOOKUP_hash_dir(); # # returns: value corresponding to openssls X509_LOOKUP_METHOD structure, with the hashed directory method Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_load_crl_file.html>

  • X509_LOOKUP_add_dir Add a directory to an X509_LOOKUP structure, usually obtained from X509_STORE_add_lookup. my $method = &Net::SSLeay::X509_LOOKUP_hash_dir; my $lookup = Net::SSLeay::X509_STORE_add_lookup($x509_store, $method); my $type = &Net::SSLeay::X509_FILETYPE_PEM; Net::SSLeay::X509_LOOKUP_add_dir($lookup, $dir, $type); # $lookup - value corresponding to openssls X509_LOOKUP structure # $dir - string path to a directory # $type - constant corresponding to the type of file in the directory - can be X509_FILETYPE_PEM, X509_FILETYPE_DEFAULT, or X509_FILETYPE_ASN1

  • X509_STORE_set_flags Net::SSLeay::X509_STORE_set_flags($ctx, $flags); # $ctx - value corresponding to openssls X509_STORE structure # $flags - (unsigned long) flags to be set (bitmask) # # returns: no return value # to create $flags value use corresponding constants like $flags = Net::SSLeay::X509_V_FLAG_CRL_CHECK(); For more details about $flags bitmask see “X509_VERIFY_PARAM_set_flags”.

  • X509_STORE_set_purpose Net::SSLeay::X509_STORE_set_purpose($ctx, $purpose); # $ctx - value corresponding to openssls X509_STORE structure # $purpose - (integer) purpose identifier # # returns: no return value For more details about $purpose identifier check “CTX_set_purpose”.

  • X509_STORE_set_trust Net::SSLeay::X509_STORE_set_trust($ctx, $trust); # $ctx - value corresponding to openssls X509_STORE structure # $trust - (integer) trust identifier # # returns: no return value For more details about $trust identifier check “CTX_set_trust”.

Low Level API: X509_INFO related functions

  • sk_X509_INFO_num Returns the number of values in a STACK_OF(X509_INFO) structure. my $rv = Net::SSLeay::sk_X509_INFO_num($sk_x509_info); # $sk_x509_info - value corresponding to openssls STACK_OF(X509_INFO) structure # # returns: number of values in $sk_X509_info

  • sk_X509_INFO_value Returns the value of a STACK_OF(X509_INFO) structure at a given index. my $rv = Net::SSLeay::sk_X509_INFO_value($sk_x509_info, $index); # $sk_x509_info - value corresponding to openssls STACK_OF(X509_INFO) structure # $index - index into the stack # # returns: value corresponding to openssls X509_INFO structure at the given index

  • P_X509_INFO_get_x509 Returns the X509 structure stored in an X509_INFO structure. my $rv = Net::SSLeay::P_X509_INFO_get_x509($x509_info); # $x509_info - value corresponding to openssls X509_INFO structure # # returns: value corresponding to openssls X509 structure

Low level API: X509_VERIFY_PARAM_* related functions

  • X509_VERIFY_PARAM_add0_policy Enables policy checking (it is disabled by default) and adds $policy to the acceptable policy set. my $rv = Net::SSLeay::X509_VERIFY_PARAM_add0_policy($param, $policy); # $param - value corresponding to openssls X509_VERIFY_PARAM structure # $policy - value corresponding to openssls ASN1_OBJECT structure # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_VERIFY_PARAM_set_flags.html>

  • X509_VERIFY_PARAM_add0_table ??? (more info needed) my $rv = Net::SSLeay::X509_VERIFY_PARAM_add0_table($param); # $param - value corresponding to openssls X509_VERIFY_PARAM structure # # returns: 1 on success, 0 on failure

  • X509_VERIFY_PARAM_add1_host COMPATIBILITY: not available in Net-SSLeay-1.82 and before; requires at least OpenSSL 1.0.2-beta2 or LibreSSL 2.7.0 Adds an additional reference identifier that can match the peer’s certificate. my $rv = Net::SSLeay::X509_VERIFY_PARAM_add1_host($param, $name); # $param - value corresponding to openssls X509_VERIFY_PARAM structure # $name - (string) name to be set # # returns: 1 on success, 0 on failure See also OpenSSL docs, “X509_VERIFY_PARAM_set1_host” and “X509_VERIFY_PARAM_set_hostflags” for more information, including wildcard matching. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_VERIFY_PARAM_set_flags.html>

  • X509_VERIFY_PARAM_clear_flags Clears the flags $flags in param. my $rv = Net::SSLeay::X509_VERIFY_PARAM_clear_flags($param, $flags); # $param - value corresponding to openssls X509_VERIFY_PARAM structure # $flags - (unsigned long) flags to be set (bitmask) # # returns: 1 on success, 0 on failure For more details about $flags bitmask see “X509_VERIFY_PARAM_set_flags”. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_VERIFY_PARAM_set_flags.html>

  • X509_VERIFY_PARAM_free Frees up the X509_VERIFY_PARAM structure. Net::SSLeay::X509_VERIFY_PARAM_free($param); # $param - value corresponding to openssls X509_VERIFY_PARAM structure # # returns: no return value

  • X509_VERIFY_PARAM_get0_peername COMPATIBILITY: not available in Net-SSLeay-1.82 and before; requires at least OpenSSL 1.0.2-beta2 or LibreSSL 2.7.0 Returns the DNS hostname or subject CommonName from the peer certificate that matched one of the reference identifiers. my $rv = Net::SSLeay::X509_VERIFY_PARAM_get0_peername($param); # $param - value corresponding to openssls X509_VERIFY_PARAM structure # # returns: (string) name e.g. *.example.com or undef Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_VERIFY_PARAM_set_flags.html>

  • X509_VERIFY_PARAM_get_depth Returns the current verification depth. my $rv = Net::SSLeay::X509_VERIFY_PARAM_get_depth($param); # $param - value corresponding to openssls X509_VERIFY_PARAM structure # # returns: (integer) depth Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_VERIFY_PARAM_set_flags.html>

  • X509_VERIFY_PARAM_get_flags Returns the current verification flags. my $rv = Net::SSLeay::X509_VERIFY_PARAM_get_flags($param); # $param - value corresponding to openssls X509_VERIFY_PARAM structure # # returns: (unsigned long) flags to be set (bitmask) For more details about returned flags bitmask see “X509_VERIFY_PARAM_set_flags”. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_VERIFY_PARAM_set_flags.html>

  • X509_VERIFY_PARAM_set_flags my $rv = Net::SSLeay::X509_VERIFY_PARAM_set_flags($param, $flags); # $param - value corresponding to openssls X509_VERIFY_PARAM structure # $flags - (unsigned long) flags to be set (bitmask) # # returns: 1 on success, 0 on failure # to create $flags value use corresponding constants like $flags = Net::SSLeay::X509_V_FLAG_CRL_CHECK(); For more details about $flags bitmask, see the OpenSSL docs below. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_VERIFY_PARAM_set_flags.html>

  • X509_VERIFY_PARAM_inherit ??? (more info needed) my $rv = Net::SSLeay::X509_VERIFY_PARAM_inherit($to, $from); # $to - value corresponding to openssls X509_VERIFY_PARAM structure # $from - value corresponding to openssls X509_VERIFY_PARAM structure # # returns: 1 on success, 0 on failure

  • X509_VERIFY_PARAM_lookup Finds X509_VERIFY_PARAM by name. my $rv = Net::SSLeay::X509_VERIFY_PARAM_lookup($name); # $name - (string) name we want to find # # returns: value corresponding to openssls X509_VERIFY_PARAM structure (0 on failure)

  • X509_VERIFY_PARAM_new Creates a new X509_VERIFY_PARAM structure. my $rv = Net::SSLeay::X509_VERIFY_PARAM_new(); # # returns: value corresponding to openssls X509_VERIFY_PARAM structure (0 on failure)

  • X509_VERIFY_PARAM_set1 Sets the name of X509_VERIFY_PARAM structure $to to the same value as the name of X509_VERIFY_PARAM structure $from. my $rv = Net::SSLeay::X509_VERIFY_PARAM_set1($to, $from); # $to - value corresponding to openssls X509_VERIFY_PARAM structure # $from - value corresponding to openssls X509_VERIFY_PARAM structure # # returns: 1 on success, 0 on failure

  • X509_VERIFY_PARAM_set1_email COMPATIBILITY: not available in Net-SSLeay-1.82 and before; requires at least OpenSSL 1.0.2-beta1 or LibreSSL 2.7.0 Sets the expected RFC822 email address to email. my $rv = Net::SSLeay::X509_VERIFY_PARAM_set1_email($param, $email); # $param - value corresponding to openssls X509_VERIFY_PARAM structure # $email - (string) email to be set # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_VERIFY_PARAM_set_flags.html>

  • X509_VERIFY_PARAM_set1_host COMPATIBILITY: not available in Net-SSLeay-1.82 and before; requires at least OpenSSL 1.0.2-beta1 or LibreSSL 2.7.0 Sets the expected DNS hostname to name clearing any previously specified host name or names. my $rv = Net::SSLeay::X509_VERIFY_PARAM_set1_host($param, $name); # $param - value corresponding to openssls X509_VERIFY_PARAM structure # $name - (string) name to be set # # returns: 1 on success, 0 on failure See also OpenSSL docs, “X509_VERIFY_PARAM_add1_host” and “X509_VERIFY_PARAM_set_hostflags” for more information, including wildcard matching. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_VERIFY_PARAM_set_flags.html>

  • X509_VERIFY_PARAM_set1_ip COMPATIBILITY: not available in Net-SSLeay-1.82 and before; requires at least OpenSSL 1.0.2-beta1 or LibreSSL 2.7.0 Sets the expected IP address to ip. my $rv = Net::SSLeay::X509_VERIFY_PARAM_set1_ip($param, $ip); # $param - value corresponding to openssls X509_VERIFY_PARAM structure # $ip - (binary) 4 octet IPv4 or 16 octet IPv6 address # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_VERIFY_PARAM_set_flags.html>

  • X509_VERIFY_PARAM_set1_ip_asc COMPATIBILITY: not available in Net-SSLeay-1.82 and before; requires at least OpenSSL 1.0.2-beta1 or LibreSSL 2.7.0 Sets the expected IP address to ipasc. my $rv = Net::SSLeay::X509_VERIFY_PARAM_set1_asc($param, $ipasc); # $param - value corresponding to openssls X509_VERIFY_PARAM structure # $ip - (string) IPv4 or IPv6 address # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_VERIFY_PARAM_set_flags.html>

  • X509_VERIFY_PARAM_set1_name Sets the name of X509_VERIFY_PARAM structure $param to $name. my $rv = Net::SSLeay::X509_VERIFY_PARAM_set1_name($param, $name); # $param - value corresponding to openssls X509_VERIFY_PARAM structure # $name - (string) name to be set # # returns: 1 on success, 0 on failure

  • X509_VERIFY_PARAM_set1_policies Enables policy checking (it is disabled by default) and sets the acceptable policy set to policies. Any existing policy set is cleared. The policies parameter can be 0 to clear an existing policy set. my $rv = Net::SSLeay::X509_VERIFY_PARAM_set1_policies($param, $policies); # $param - value corresponding to openssls X509_VERIFY_PARAM structure # $policies - value corresponding to openssls STACK_OF(ASN1_OBJECT) structure # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_VERIFY_PARAM_set_flags.html>

  • X509_VERIFY_PARAM_set_depth Sets the maximum verification depth to depth. That is the maximum number of untrusted CA certificates that can appear in a chain. Net::SSLeay::X509_VERIFY_PARAM_set_depth($param, $depth); # $param - value corresponding to openssls X509_VERIFY_PARAM structure # $depth - (integer) depth to be set # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_VERIFY_PARAM_set_flags.html>

  • X509_VERIFY_PARAM_set_hostflags COMPATIBILITY: not available in Net-SSLeay-1.82 and before; requires at least OpenSSL 1.0.2-beta2 or LibreSSL 2.7.0 Net::SSLeay::X509_VERIFY_PARAM_set_hostflags($param, $flags); # $param - value corresponding to openssls X509_VERIFY_PARAM structure # $flags - (unsigned int) flags to be set (bitmask) # # returns: no return value See also OpenSSL docs, “X509_VERIFY_PARAM_add1_host” and “X509_VERIFY_PARAM_set1_host” for more information. The flags for controlling wildcard checks and other features are defined in OpenSSL docs. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_VERIFY_PARAM_set_flags.html>

  • X509_VERIFY_PARAM_set_purpose Sets the verification purpose in $param to $purpose. This determines the acceptable purpose of the certificate chain, for example SSL client or SSL server. my $rv = Net::SSLeay::X509_VERIFY_PARAM_set_purpose($param, $purpose); # $param - value corresponding to openssls X509_VERIFY_PARAM structure # $purpose - (integer) purpose identifier # # returns: 1 on success, 0 on failure For more details about $purpose identifier check “CTX_set_purpose”. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_VERIFY_PARAM_set_flags.html>

  • X509_VERIFY_PARAM_set_time Sets the verification time in $param to $t. Normally the current time is used. Net::SSLeay::X509_VERIFY_PARAM_set_time($param, $t); # $param - value corresponding to openssls X509_VERIFY_PARAM structure # $t - (time_t) time in seconds since 1.1.1970 # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_VERIFY_PARAM_set_flags.html>

  • X509_VERIFY_PARAM_set_trust Sets the trust setting in $param to $trust. my $rv = Net::SSLeay::X509_VERIFY_PARAM_set_trust($param, $trust); # $param - value corresponding to openssls X509_VERIFY_PARAM structure # $trust - (integer) trust identifier # # returns: 1 on success, 0 on failure For more details about $trust identifier check “CTX_set_trust”. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/X509_VERIFY_PARAM_set_flags.html>

  • X509_VERIFY_PARAM_table_cleanup ??? (more info needed) Net::SSLeay::X509_VERIFY_PARAM_table_cleanup(); # # returns: no return value

Low level API: Cipher (EVP_CIPHER_*) related functions

  • EVP_get_cipherbyname COMPATIBILITY: not available in Net-SSLeay-1.45 and before Returns an EVP_CIPHER structure when passed a cipher name. my $rv = Net::SSLeay::EVP_get_cipherbyname($name); # $name - (string) cipher name e.g. aes-128-cbc, camellia-256-ecb, des-ede, … # # returns: value corresponding to openssls EVP_CIPHER structure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/EVP_EncryptInit.html>

Low level API: Digest (EVP_MD_*) related functions

  • OpenSSL_add_all_digests COMPATIBILITY: not available in Net-SSLeay-1.42 and before Net::SSLeay::OpenSSL_add_all_digests(); # no args, no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OpenSSL_add_all_algorithms.html>

  • P_EVP_MD_list_all COMPATIBILITY: not available in Net-SSLeay-1.42 and before; requires at least OpenSSL 1.0.0 NOTE: Does not exactly correspond to any low level API function my $rv = Net::SSLeay::P_EVP_MD_list_all(); # # returns: arrayref - list of available digest names The returned digest names correspond to values expected by “EVP_get_digestbyname”. Note that some of the digests are available by default and some only after calling “OpenSSL_add_all_digests”.

  • EVP_get_digestbyname COMPATIBILITY: not available in Net-SSLeay-1.42 and before my $rv = Net::SSLeay::EVP_get_digestbyname($name); # $name - string with digest name # # returns: value corresponding to openssls EVP_MD structure # The $name param can be: # md2 # md4 # md5 # mdc2 # ripemd160 # sha # sha1 # sha224 # sha256 # sha512 # whirlpool Or better check the supported digests by calling “P_EVP_MD_list_all”.

  • EVP_MD_type COMPATIBILITY: not available in Net-SSLeay-1.42 and before my $rv = Net::SSLeay::EVP_MD_type($md); # $md - value corresponding to openssls EVP_MD structure # # returns: the NID (integer) of the OBJECT IDENTIFIER representing the given message digest EVP_MD_type is a non-deprecated alias macro of EVP_MD_get_type since OpenSSL 3.0.0.

  • EVP_MD_size COMPATIBILITY: not available in Net-SSLeay-1.42 and before my $rv = Net::SSLeay::EVP_MD_size($md); # $md - value corresponding to openssls EVP_MD structure # # returns: the size of the message digest in bytes (e.g. 20 for SHA1)

  • EVP_MD_get0_description COMPATIBILITY: not available in Net-SSLeay-1.92 and before; requires at least OpenSSL 3.0.0-beta1, not in LibreSSL Return description of a message digest. my $rv = Net::SSLeay::EVP_MD_get0_description($md); # $md - value corresponding to openssls EVP_MD structure # # returns: String, a freeform and digest implementation dependent description of the digest for display and human consumption. (e.g. sha256) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/EVP_MD_get0_description.html>

  • EVP_MD_get0_name COMPATIBILITY: not available in Net-SSLeay-1.92 and before; requires at least OpenSSL 3.0.0-beta1, not in LibreSSL Return one name of a message digest. my $rv = Net::SSLeay::EVP_MD_get0_description($md); # $md - value corresponding to openssls EVP_MD structure # # returns: String, the name of the given message digest. For fetched message digests with multiple names, only one of them is returned; its recommended to use EVP_MD_names_do_all() instead. (e.g. SHA2-256 or SHA256 for the same digest) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/EVP_MD_get0_name.html>

  • EVP_MD_get_type COMPATIBILITY: not available in Net-SSLeay-1.92 and before; requires at least OpenSSL 3.0.0-beta1, not in LibreSSL Return NID value of a message digest. my $rv = Net::SSLeay::EVP_MD_get_type($md); # $md - value corresponding to openssls EVP_MD structure # # returns: Integer, the NID of the OBJECT IDENTIFIER representing the given message digest when passed an EVP_MD structure. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/EVP_MD_get_type.html>

  • EVP_MD_CTX_md COMPATIBILITY: not available in Net-SSLeay-1.42 and before Net::SSLeay::EVP_MD_CTX_md($ctx); # $ctx - value corresponding to openssls EVP_MD_CTX structure # # returns: value corresponding to openssls EVP_MD structure

  • EVP_MD_CTX_create COMPATIBILITY: not available in Net-SSLeay-1.42 and before Allocates, initializes and returns a digest context. my $rv = Net::SSLeay::EVP_MD_CTX_create(); # # returns: value corresponding to openssls EVP_MD_CTX structure The complete idea behind EVP_MD_CTX looks like this example: Net::SSLeay::OpenSSL_add_all_digests(); my $md = Net::SSLeay::EVP_get_digestbyname(“sha1”); my $ctx = Net::SSLeay::EVP_MD_CTX_create(); Net::SSLeay::EVP_DigestInit($ctx, $md); while(my $chunk = get_piece_of_data()) { Net::SSLeay::EVP_DigestUpdate($ctx,$chunk); } my $result = Net::SSLeay::EVP_DigestFinal($ctx); Net::SSLeay::EVP_MD_CTX_destroy($ctx); print “digest=”, unpack(H*, $result), " “; # print hex value

  • EVP_DigestInit_ex COMPATIBILITY: not available in Net-SSLeay-1.42 and before Sets up digest context $ctx to use a digest $type from ENGINE $impl, $ctx must be initialized before calling this function, type will typically be supplied by a function such as “EVP_get_digestbyname”. If $impl is 0 then the default implementation of digest $type is used. my $rv = Net::SSLeay::EVP_DigestInit_ex($ctx, $type, $impl); # $ctx - value corresponding to openssls EVP_MD_CTX structure # $type - value corresponding to openssls EVP_MD structure # $impl - value corresponding to openssls ENGINE structure # # returns: 1 for success and 0 for failure

  • EVP_DigestInit COMPATIBILITY: not available in Net-SSLeay-1.42 and before Behaves in the same way as “EVP_DigestInit_ex” except the passed context $ctx does not have to be initialized, and it always uses the default digest implementation. my $rv = Net::SSLeay::EVP_DigestInit($ctx, $type); # $ctx - value corresponding to openssls EVP_MD_CTX structure # $type - value corresponding to openssls EVP_MD structure # # returns: 1 for success and 0 for failure

  • EVP_MD_CTX_destroy COMPATIBILITY: not available in Net-SSLeay-1.42 and before Cleans up digest context $ctx and frees up the space allocated to it, it should be called only on a context created using “EVP_MD_CTX_create”. Net::SSLeay::EVP_MD_CTX_destroy($ctx); # $ctx - value corresponding to openssls EVP_MD_CTX structure # # returns: no return value

  • EVP_DigestUpdate COMPATIBILITY: not available in Net-SSLeay-1.42 and before my $rv = Net::SSLeay::EVP_DigestUpdate($ctx, $data); # $ctx - value corresponding to openssls EVP_MD_CTX structure # $data - data to be hashed # # returns: 1 for success and 0 for failure

  • EVP_DigestFinal_ex COMPATIBILITY: not available in Net-SSLeay-1.42 and before Retrieves the digest value from $ctx. After calling “EVP_DigestFinal_ex” no additional calls to “EVP_DigestUpdate” can be made, but “EVP_DigestInit_ex” can be called to initialize a new digest operation. my $digest_value = Net::SSLeay::EVP_DigestFinal_ex($ctx); # $ctx - value corresponding to openssls EVP_MD_CTX structure # # returns: hash value (binary) # to get printable (hex) value of digest use: print unpack(H*, $digest_value);

  • EVP_DigestFinal COMPATIBILITY: not available in Net-SSLeay-1.42 and before Similar to “EVP_DigestFinal_ex” except the digest context ctx is automatically cleaned up. my $rv = Net::SSLeay::EVP_DigestFinal($ctx); # $ctx - value corresponding to openssls EVP_MD_CTX structure # # returns: hash value (binary) # to get printable (hex) value of digest use: print unpack(H*, $digest_value);

  • MD2 COMPATIBILITY: not supported by default in OpenSSL 1.0.0 Computes MD2 from given $data (all data needs to be loaded into memory) my $digest = Net::SSLeay::MD2($data); print “digest(hexadecimal)=”, unpack(H*, $digest);

  • MD4 Computes MD4 from given $data (all data needs to be loaded into memory) my $digest = Net::SSLeay::MD4($data); print “digest(hexadecimal)=”, unpack(H*, $digest);

  • MD5 Computes MD5 from given $data (all data needs to be loaded into memory) my $digest = Net::SSLeay::MD5($data); print “digest(hexadecimal)=”, unpack(H*, $digest);

  • RIPEMD160 Computes RIPEMD160 from given $data (all data needs to be loaded into memory) my $digest = Net::SSLeay::RIPEMD160($data); print “digest(hexadecimal)=”, unpack(H*, $digest);

  • SHA1 COMPATIBILITY: not available in Net-SSLeay-1.42 and before Computes SHA1 from given $data (all data needs to be loaded into memory) my $digest = Net::SSLeay::SHA1($data); print “digest(hexadecimal)=”, unpack(H*, $digest);

  • SHA256 COMPATIBILITY: not available in Net-SSLeay-1.42 and before; requires at least OpenSSL 0.9.8 Computes SHA256 from given $data (all data needs to be loaded into memory) my $digest = Net::SSLeay::SHA256($data); print “digest(hexadecimal)=”, unpack(H*, $digest);

  • SHA512 COMPATIBILITY: not available in Net-SSLeay-1.42 and before; requires at least OpenSSL 0.9.8 Computes SHA512 from given $data (all data needs to be loaded into memory) my $digest = Net::SSLeay::SHA512($data); print “digest(hexadecimal)=”, unpack(H*, $digest);

  • EVP_Digest COMPATIBILITY: not available in Net-SSLeay-1.42 and before Computes “any” digest from given $data (all data needs to be loaded into memory) my $md = Net::SSLeay::EVP_get_digestbyname(“sha1”); # or any other algorithm my $digest = Net::SSLeay::EVP_Digest($data, $md); print “digest(hexadecimal)=”, unpack(H*, $digest);

  • EVP_sha1 COMPATIBILITY: not available in Net-SSLeay-1.42 and before my $md = Net::SSLeay::EVP_sha1(); # # returns: value corresponding to openssls EVP_MD structure

  • EVP_sha256 COMPATIBILITY: requires at least OpenSSL 0.9.8 my $md = Net::SSLeay::EVP_sha256(); # # returns: value corresponding to openssls EVP_MD structure

  • EVP_sha512 COMPATIBILITY: not available in Net-SSLeay-1.42 and before; requires at least OpenSSL 0.9.8 my $md = Net::SSLeay::EVP_sha512(); # # returns: value corresponding to openssls EVP_MD structure

  • EVP_add_digest my $rv = Net::SSLeay::EVP_add_digest($digest); # $digest - value corresponding to openssls EVP_MD structure # # returns: 1 on success, 0 otherwise

Low level API: CIPHER_* related functions

  • CIPHER_get_name COMPATIBILITY: not available in Net-SSLeay-1.42 and before Returns name of the cipher used. my $rv = Net::SSLeay::CIPHER_get_name($cipher); # $cipher - value corresponding to openssls SSL_CIPHER structure # # returns: (string) cipher name e.g. DHE-RSA-AES256-SHA, (NONE) if $cipher is undefined. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CIPHER_get_name.html> Example: my $ssl_cipher = Net::SSLeay::get_current_cipher($ssl); my $cipher_name = Net::SSLeay::CIPHER_get_name($ssl_cipher);

  • CIPHER_description COMPATIBILITY: doesn’t work correctly in Net-SSLeay-1.88 and before Returns a textual description of the cipher used. my $rv = Net::SSLeay::CIPHER_description($cipher); # $cipher - value corresponding to openssls SSL_CIPHER structure # # returns: (string) cipher description e.g. DHE-RSA-AES256-SHA SSLv3 Kx=DH Au=RSA Enc=AES(256) Mac=SHA1 Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CIPHER_description.html>

  • CIPHER_get_bits COMPATIBILITY: $alg_bits doesn’t work correctly in Net-SSLeay-1.88 and before Returns the number of secret bits used for cipher. my $rv = Net::SSLeay::CIPHER_get_bits($cipher, $alg_bits); # $cipher - value corresponding to openssls SSL_CIPHER structure # $alg_bits - [optional] empty scalar for storing additional return value # # returns: (integer) number of secret bits, 0 on error # (integer) in $alg_bits for bits processed by the chosen algorithm Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CIPHER_get_bits.html> Example: # bits and alg_bits are not equal for e.g., TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, # RFC 8422 name TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA my $alg_bits; my $bits = Net::SSLeay::CIPHER_get_bits($cipher, $alg_bits); # my $bits = Net::SSLeay::CIPHER_get_bits($cipher); print “bits: $bits, alg_bits: $alg_bits “;

  • CIPHER_get_version COMPATIBILITY: not available in Net-SSLeay-1.88 and before Returns version of SSL/TLS protocol that first defined the cipher my $rv = Net::SSLeay::CIPHER_get_version($cipher); # $cipher - value corresponding to openssls SSL_CIPHER structure # # returns: (string) cipher name e.g. TLSv1/SSLv3 with some libraries, TLSv1.0 or TLSv1.3, (NONE) if $cipher is undefined. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CIPHER_get_version.html>

  • CIPHER_get_handshake_digest COMPATIBILITY: not available in Net-SSLeay-1.92 and before; requires at least OpenSSL 1.1.1-pre1, not in LibreSSL Returns version of SSL/TLS protocol that first defined the cipher my $rv = Net::SSLeay::CIPHER_get_handshake_digest($cipher); # $cipher - value corresponding to openssls SSL_CIPHER structure # # returns: A value corresponding to OpenSSLs EVP_MD structure for the digest used during the SSL/TLS handshake when using $cipher. Check openssl doc <https://www.openssl.org/docs/ssl/SSL_CIPHER_get_handshake_digest.html>

  • CIPHER_find COMPATIBILITY: not available in Net-SSLeay-1.92 and before; requires at least OpenSSL 1.0.2 or LibreSSL 3.4.0 Returns a SSL_CIPHER structure from the current SSL using a two octet cipher ID. my $cipher = Net::SSLeay::CIPHER_find($ssl, $id); # $ssl - value corresponding to OpenSSL SSL structure # $id - two octet cipher ID. # # returns: A value corresponding to OpenSSL SSL_CIPHER structure or undef if cipher is not found or an error occurs. Example that prints ‘OpenSSL name is: TLS_AES_128_GCM_SHA256’ with TLSv1.3 when the ciphersuite is enabled: # TLS Cipher Suite 0x13, 0x01 is TLS_AES_128_GCM_SHA256 my $id = pack(n, 0x1301); my $cipher = Net::SSLeay::CIPHER_find($ssl, $id); printf(“OpenSSL name is: " . Net::SSLeay::CIPHER_get_name($cipher)); Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CIPHER_find.html>

Low level API: BN_* related functions

  • BN_dup Creates and returns a new BIGNUM from an existing BIGNUM. my $bn = Net::SSLeay::BN_dup($from); # $from - value corresponding to BIGNUM structure # # returns: a new BIGNUM containing the value $from Check openssl doc <https://www.openssl.org/docs/manmaster/man3/BN_dup.html>

  • BN_clear Clears BIGNUM data when it is no longer needed. Net::SSLeay::BN_clear($bn); # $bn - value corresponding to BIGNUM structure # # returns: nothing. $bn is set to 0. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/BN_clear.html>

  • BN_clear_free Clears and frees a previously allocated BIGNUM. Net::SSLeay::BN_clear_free($bn); # $bn - value corresponding to BIGNUM structure # # returns: nothing. $bn is no longer usable. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/BN_clear_free.html>

  • BN_free Frees previously a allocated BIGNUM. Net::SSLeay::BN_free($bn); # $bn - value corresponding to BIGNUM structure # # returns: nothing. $bn is no longer usable. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/BN_free.html>

Low level API: RSA_* related functions

  • RSA_generate_key Generates a key pair and returns it in a newly allocated RSA structure. The pseudo-random number generator must be seeded prior to calling RSA_generate_key. my $rv = Net::SSLeay::RSA_generate_key($bits, $e, $perl_cb, $perl_cb_arg); # $bits - (integer) modulus size in bits e.g. 512, 1024, 2048 # $e - (integer) public exponent, an odd number, typically 3, 17 or 65537 # $perl_cb - [optional] reference to perl callback function # $perl_cb_arg - [optional] data that will be passed to callback function when invoked # # returns: value corresponding to openssls RSA structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/RSA_generate_key.html>

  • RSA_free Frees the RSA structure and its components. The key is erased before the memory is returned to the system. Net::SSLeay::RSA_free($r); # $r - value corresponding to openssls RSA structure # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/RSA_new.html>

  • RSA_get_key_parameters COMPATIBILITY: not available when OpenSSL is 1.1.0 or later and Net-SSLeay is 1.92 or earlier Returns a list of pointers to BIGNUMs representing the parameters of the key in this order: (n, e, d, p, q, dmp1, dmq1, iqmp) Caution: returned list consists of direct pointers to BIGNUMs. These must not be freed by the caller. These pointers can be used to duplicate a BIGNUM, which would need to be blessed as Crypt::OpenSSL::Bignum for further use. See Crypt::OpenSSL::Bignum and OpenSSL manual for more about bless_pointer to why BN_dup() is used. my (@params) = RSA_get_key_parameters($r); my $dup = Net::SSLeay::BN_dup($params[1]); my $e = Crypt::OpenSSL::Bignum->bless_pointer($dup); print “exponent: “, $e->to_decimal(), " “; This function has no equivalent in OpenSSL or LibreSSL but combines functions RSA_get0_key, RSA_get0_factors and RSA_get0_crt_params for an easier interface. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/RSA_get0_key.html>

Low level API: BIO_* related functions

  • BIO_eof Returns 1 if the BIO has read EOF, the precise meaning of ‘EOF’ varies according to the BIO type. my $rv = Net::SSLeay::BIO_eof($s); # $s - value corresponding to openssls BIO structure # # returns: 1 if EOF has been reached 0 otherwise Check openssl doc <https://www.openssl.org/docs/manmaster/man3/BIO_ctrl.html>

  • BIO_f_ssl Returns the SSL BIO method. This is a filter BIO which is a wrapper round the OpenSSL SSL routines adding a BIO ‘flavour’ to SSL I/O. my $rv = Net::SSLeay::BIO_f_ssl(); # # returns: value corresponding to openssls BIO_METHOD structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/BIO_f_ssl.html>

  • BIO_free Frees up a single BIO. my $rv = Net::SSLeay::BIO_free($bio); # $bio; - value corresponding to openssls BIO structure # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/BIO_new.html>

  • BIO_new Returns a new BIO using method $type my $rv = Net::SSLeay::BIO_new($type); # $type - value corresponding to openssls BIO_METHOD structure # # returns: value corresponding to openssls BIO structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/BIO_new.html>

  • BIO_new_buffer_ssl_connect Creates a new BIO chain consisting of a buffering BIO, an SSL BIO (using ctx) and a connect BIO. my $rv = Net::SSLeay::BIO_new_buffer_ssl_connect($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: value corresponding to openssls BIO structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/BIO_f_ssl.html>

  • BIO_new_file Creates a new file BIO with mode $mode the meaning of mode is the same as the stdio function fopen(). The BIO_CLOSE flag is set on the returned BIO. my $rv = Net::SSLeay::BIO_new_file($filename, $mode); # $filename - (string) filename # $mode - (string) opening mode (as mode by stdio function fopen) # # returns: value corresponding to openssls BIO structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/BIO_s_file.html>

  • BIO_new_ssl Allocates an SSL BIO using SSL_CTX ctx and using client mode if client is non zero. my $rv = Net::SSLeay::BIO_new_ssl($ctx, $client); # $ctx - value corresponding to openssls SSL_CTX structure # $client - (integer) 0 or 1 - indicates ssl client mode # # returns: value corresponding to openssls BIO structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/BIO_f_ssl.html>

  • BIO_new_ssl_connect Creates a new BIO chain consisting of an SSL BIO (using ctx) followed by a connect BIO. my $rv = Net::SSLeay::BIO_new_ssl_connect($ctx); # $ctx - value corresponding to openssls SSL_CTX structure # # returns: value corresponding to openssls BIO structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/BIO_f_ssl.html>

  • BIO_pending Return the number of pending characters in the BIOs read buffers. my $rv = Net::SSLeay::BIO_pending($s); # $s - value corresponding to openssls BIO structure # # returns: the amount of pending data Check openssl doc <https://www.openssl.org/docs/manmaster/man3/BIO_ctrl.html>

  • BIO_wpending Return the number of pending characters in the BIOs write buffers. my $rv = Net::SSLeay::BIO_wpending($s); # $s - value corresponding to openssls BIO structure # # returns: the amount of pending data Check openssl doc <https://www.openssl.org/docs/manmaster/man3/BIO_ctrl.html>

  • BIO_read Read the underlying descriptor. Net::SSLeay::BIO_read($s, $max); # $s - value corresponding to openssls BIO structure # $max - [optional] max. bytes to read (if not specified, the value 32768 is used) # # returns: data Check openssl doc <https://www.openssl.org/docs/manmaster/man3/BIO_read.html>

  • BIO_write Attempts to write data from $buffer to BIO $b. my $rv = Net::SSLeay::BIO_write($b, $buffer); # $b - value corresponding to openssls BIO structure # $buffer - data # # returns: amount of data successfully written # or that no data was successfully read or written if the result is 0 or -1 # or -2 when the operation is not implemented in the specific BIO type Check openssl doc <https://www.openssl.org/docs/manmaster/man3/BIO_read.html>

  • BIO_s_mem Return the memory BIO method function. my $rv = Net::SSLeay::BIO_s_mem(); # # returns: value corresponding to openssls BIO_METHOD structure (0 on failure) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/BIO_s_mem.html>

  • BIO_ssl_copy_session_id Copies an SSL session id between BIO chains from and to. It does this by locating the SSL BIOs in each chain and calling SSL_copy_session_id() on the internal SSL pointer. my $rv = Net::SSLeay::BIO_ssl_copy_session_id($to, $from); # $to - value corresponding to openssls BIO structure # $from - value corresponding to openssls BIO structure # # returns: 1 on success, 0 on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/BIO_f_ssl.html>

  • BIO_ssl_shutdown Closes down an SSL connection on BIO chain bio. It does this by locating the SSL BIO in the chain and calling SSL_shutdown() on its internal SSL pointer. Net::SSLeay::BIO_ssl_shutdown($ssl_bio); # $ssl_bio - value corresponding to openssls BIO structure # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/BIO_f_ssl.html>

Low level API: Server side Server Name Indication (SNI) support

  • set_tlsext_host_name TBA

  • get_servername TBA

  • get_servername_type TBA

  • CTX_set_tlsext_servername_callback COMPATIBILITY: requires at least OpenSSL 0.9.8f This function is used in a server to support Server side Server Name Indication (SNI). Net::SSLeay::CTX_set_tlsext_servername_callback($ctx, $code); # $ctx - SSL context # $code - reference to a subroutine that will be called when a new connection is being initiated # # returns: no return value On the client side: use set_tlsext_host_name($ssl, $servername) before initiating the SSL connection. On the server side: Set up an additional SSL_CTX() for each different certificate. Add a servername callback to each SSL_CTX() using CTX_set_tlsext_servername_callback(). The callback function is required to retrieve the client-supplied servername with get_servername(ssl). Figure out the right SSL_CTX to go with that host name, then switch the SSL object to that SSL_CTX with set_SSL_CTX(). Example: # set callback Net::SSLeay::CTX_set_tlsext_servername_callback($ctx, sub { my $ssl = shift; my $h = Net::SSLeay::get_servername($ssl); Net::SSLeay::set_SSL_CTX($ssl, $hostnames{$h}->{ctx}) if exists $hostnames{$h}; } ); More complete example: # … initialize Net::SSLeay my %hostnames = ( sni1 => { cert=>sni1.pem, key=>sni1.key }, sni2 => { cert=>sni2.pem, key=>sni2.key }, ); # create a new context for each certificate/key pair for my $name (keys %hostnames) { $hostnames{$name}->{ctx} = Net::SSLeay::CTX_new or die; Net::SSLeay::CTX_set_cipher_list($hostnames{$name}->{ctx}, ALL); Net::SSLeay::set_cert_and_key($hostnames{$name}->{ctx}, $hostnames{$name}->{cert}, $hostnames{$name}->{key}) or die; } # create default context my $ctx = Net::SSLeay::CTX_new or die; Net::SSLeay::CTX_set_cipher_list($ctx, ALL); Net::SSLeay::set_cert_and_key($ctx, cert.pem,key.pem) or die; # set callback Net::SSLeay::CTX_set_tlsext_servername_callback($ctx, sub { my $ssl = shift; my $h = Net::SSLeay::get_servername($ssl); Net::SSLeay::set_SSL_CTX($ssl, $hostnames{$h}->{ctx}) if exists $hostnames{$h}; } ); # … later $s = Net::SSLeay::new($ctx); Net::SSLeay::set_fd($s, fileno($accepted_socket)); Net::SSLeay::accept($s);

Low level API: NPN (next protocol negotiation) related functions

NPN is being replaced with ALPN, a more recent TLS extension for application protocol negotiation that’s in process of being adopted by IETF. Please look below for APLN API description.

Simple approach for using NPN support looks like this:

### client side use Net::SSLeay; use IO::Socket::INET; Net::SSLeay::initialize(); my $sock = IO::Socket::INET->new(PeerAddr=>encrypted.google.com:443) or die; my $ctx = Net::SSLeay::CTX_tlsv1_new() or die; Net::SSLeay::CTX_set_options($ctx, &Net::SSLeay::OP_ALL); Net::SSLeay::CTX_set_next_proto_select_cb($ctx, [http1.1,spdy/2]); my $ssl = Net::SSLeay::new($ctx) or die; Net::SSLeay::set_fd($ssl, fileno($sock)) or die; Net::SSLeay::connect($ssl); warn “client:negotiated=",Net::SSLeay::P_next_proto_negotiated($ssl), " “; warn “client:last_status=”, Net::SSLeay::P_next_proto_last_status($ssl), " “; ### server side use Net::SSLeay; use IO::Socket::INET; Net::SSLeay::initialize(); my $ctx = Net::SSLeay::CTX_tlsv1_new() or die; Net::SSLeay::CTX_set_options($ctx, &Net::SSLeay::OP_ALL); Net::SSLeay::set_cert_and_key($ctx, “cert.pem”, “key.pem”); Net::SSLeay::CTX_set_next_protos_advertised_cb($ctx, [spdy/2,http1.1]); my $sock = IO::Socket::INET->new(LocalAddr=>localhost, LocalPort=>5443, Proto=>tcp, Listen=>20) or die; while (1) { my $ssl = Net::SSLeay::new($ctx); warn(“server:waiting for incoming connection… “); my $fd = $sock->accept(); Net::SSLeay::set_fd($ssl, $fd->fileno); Net::SSLeay::accept($ssl); warn “server:negotiated=",Net::SSLeay::P_next_proto_negotiated($ssl),” “; my $got = Net::SSLeay::read($ssl); Net::SSLeay::ssl_write_all($ssl, “length=".length($got)); Net::SSLeay::free($ssl); $fd->close(); } # check with: openssl s_client -connect localhost:5443 -nextprotoneg http/1.1,spdy/2

Please note that the selection (negotiation) is performed by client side, the server side simply advertise the list of supported protocols.

Advanced approach allows you to implement your own negotiation algorithm.

# see below documentation for: Net::SSLeay::CTX_set_next_proto_select_cb($ctx, $perl_callback_function, $callback_data); Net::SSLeay::CTX_set_next_protos_advertised_cb($ctx, $perl_callback_function, $callback_data);

Detection of NPN support (works even in older Net::SSLeay versions):

use Net::SSLeay; if (exists &Net::SSLeay::P_next_proto_negotiated) { # do NPN stuff }

  • CTX_set_next_proto_select_cb COMPATIBILITY: not available in Net-SSLeay-1.45 and before; requires at least OpenSSL 1.0.1 NOTE: You need CTX_set_next_proto_select_cb on client side of SSL connection. Simple usage - in this case a “common” negotiation algorithm (as implemented by openssl’s function SSL_select_next_proto) is used. $rv = Net::SSLeay::CTX_set_next_proto_select_cb($ctx, $arrayref); # $ctx - value corresponding to openssls SSL_CTX structure # $arrayref - list of accepted protocols - e.g. [http1.0, http1.1] # # returns: 0 on success, 1 on failure Advanced usage (you probably do not need this): $rv = Net::SSLeay::CTX_set_next_proto_select_cb($ctx, $perl_callback_function, $callback_data); # $ctx - value corresponding to openssls SSL_CTX structure # $perl_callback_function - reference to perl function # $callback_data - [optional] data to passed to callback function when invoked # # returns: 0 on success, 1 on failure # where callback function looks like sub npn_advertised_cb_invoke { my ($ssl, $arrayref_proto_list_advertised_by_server, $callback_data) = @_; my $status; # … $status = 1; # status can be: # 0 - OPENSSL_NPN_UNSUPPORTED # 1 - OPENSSL_NPN_NEGOTIATED # 2 - OPENSSL_NPN_NO_OVERLAP return $status, [http1.1,spdy/2]; # the callback has to return 2 values } To undefine/clear this callback use: Net::SSLeay::CTX_set_next_proto_select_cb($ctx, undef);

  • CTX_set_next_protos_advertised_cb COMPATIBILITY: not available in Net-SSLeay-1.45 and before; requires at least OpenSSL 1.0.1 NOTE: You need CTX_set_next_proto_select_cb on server side of SSL connection. Simple usage: $rv = Net::SSLeay::CTX_set_next_protos_advertised_cb($ctx, $arrayref); # $ctx - value corresponding to openssls SSL_CTX structure # $arrayref - list of advertised protocols - e.g. [http1.0, http1.1] # # returns: 0 on success, 1 on failure Advanced usage (you probably do not need this): $rv = Net::SSLeay::CTX_set_next_protos_advertised_cb($ctx, $perl_callback_function, $callback_data); # $ctx - value corresponding to openssls SSL_CTX structure # $perl_callback_function - reference to perl function # $callback_data - [optional] data to passed to callback function when invoked # # returns: 0 on success, 1 on failure # where callback function looks like sub npn_advertised_cb_invoke { my ($ssl, $callback_data) = @_; # … return [http1.1,spdy/2]; # the callback has to return arrayref } To undefine/clear this callback use: Net::SSLeay::CTX_set_next_protos_advertised_cb($ctx, undef);

  • P_next_proto_negotiated COMPATIBILITY: not available in Net-SSLeay-1.45 and before; requires at least OpenSSL 1.0.1 Returns the name of negotiated protocol for given SSL connection $ssl. $rv = Net::SSLeay::P_next_proto_negotiated($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: (string) negotiated protocol name (or undef if no negotiation was done or failed with fatal error)

  • P_next_proto_last_status COMPATIBILITY: not available in Net-SSLeay-1.45 and before; requires at least OpenSSL 1.0.1 Returns the result of the last negotiation for given SSL connection $ssl. $rv = Net::SSLeay::P_next_proto_last_status($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: (integer) negotiation status # 0 - OPENSSL_NPN_UNSUPPORTED # 1 - OPENSSL_NPN_NEGOTIATED # 2 - OPENSSL_NPN_NO_OVERLAP

Low level API: ALPN (application layer protocol negotiation) related functions

Application protocol can be negotiated via two different mechanisms employing two different TLS extensions: NPN (obsolete) and ALPN (recommended).

The API is rather similar, with slight differences reflecting protocol specifics. In particular, with ALPN the protocol negotiation takes place on server, while with NPN the client implements the protocol negotiation logic.

With ALPN, the most basic implementation looks like this:

### client side use Net::SSLeay; use IO::Socket::INET; Net::SSLeay::initialize(); my $sock = IO::Socket::INET->new(PeerAddr=>encrypted.google.com:443) or die; my $ctx = Net::SSLeay::CTX_tlsv1_new() or die; Net::SSLeay::CTX_set_options($ctx, &Net::SSLeay::OP_ALL); Net::SSLeay::CTX_set_alpn_protos($ctx, [http/1.1, http/2.0, spdy/3]); my $ssl = Net::SSLeay::new($ctx) or die; Net::SSLeay::set_fd($ssl, fileno($sock)) or die; Net::SSLeay::connect($ssl); warn “client:selected=",Net::SSLeay::P_alpn_selected($ssl), " “; ### server side use Net::SSLeay; use IO::Socket::INET; Net::SSLeay::initialize(); my $ctx = Net::SSLeay::CTX_tlsv1_new() or die; Net::SSLeay::CTX_set_options($ctx, &Net::SSLeay::OP_ALL); Net::SSLeay::set_cert_and_key($ctx, “cert.pem”, “key.pem”); Net::SSLeay::CTX_set_alpn_select_cb($ctx, [http/1.1, http/2.0, spdy/3]); my $sock = IO::Socket::INET->new(LocalAddr=>localhost, LocalPort=>5443, Proto=>tcp, Listen=>20) or die; while (1) { my $ssl = Net::SSLeay::new($ctx); warn(“server:waiting for incoming connection… “); my $fd = $sock->accept(); Net::SSLeay::set_fd($ssl, $fd->fileno); Net::SSLeay::accept($ssl); warn “server:selected=",Net::SSLeay::P_alpn_selected($ssl),” “; my $got = Net::SSLeay::read($ssl); Net::SSLeay::ssl_write_all($ssl, “length=".length($got)); Net::SSLeay::free($ssl); $fd->close(); } # check with: openssl s_client -connect localhost:5443 -alpn spdy/3,http/1.1

Advanced approach allows you to implement your own negotiation algorithm.

# see below documentation for: Net::SSLeay::CTX_set_alpn_select_cb($ctx, $perl_callback_function, $callback_data);

Detection of ALPN support (works even in older Net::SSLeay versions):

use Net::SSLeay; if (exists &Net::SSLeay::P_alpn_selected) { # do ALPN stuff }

  • CTX_set_alpn_select_cb COMPATIBILITY: not available in Net-SSLeay-1.55 and before; requires at least OpenSSL 1.0.2 NOTE: You need CTX_set_alpn_select_cb on server side of TLS connection. Simple usage - in this case a “common” negotiation algorithm (as implemented by openssl’s function SSL_select_next_proto) is used. $rv = Net::SSLeay::CTX_set_alpn_select_cb($ctx, $arrayref); # $ctx - value corresponding to openssls SSL_CTX structure # $arrayref - list of accepted protocols - e.g. [http/2.0, http/1.1, spdy/3] # # returns: 0 on success, 1 on failure Advanced usage (you probably do not need this): $rv = Net::SSLeay::CTX_set_alpn_select_cb($ctx, $perl_callback_function, $callback_data); # $ctx - value corresponding to openssls SSL_CTX structure # $perl_callback_function - reference to perl function # $callback_data - [optional] data to passed to callback function when invoked # # returns: 0 on success, 1 on failure # where callback function looks like sub alpn_select_cb_invoke { my ($ssl, $arrayref_proto_list_advertised_by_client, $callback_data) = @_; # … if ($negotiated) { return http/2.0; } else { return undef; } } To undefine/clear this callback use: Net::SSLeay::CTX_set_alpn_select_cb($ctx, undef);

  • set_alpn_protos COMPATIBILITY: not available in Net-SSLeay-1.55 and before; requires at least OpenSSL 1.0.2 NOTE: You need set_alpn_protos on client side of TLS connection. This adds list of supported application layer protocols to ClientHello message sent by a client. It advertises the enumeration of supported protocols: Net::SSLeay::set_alpn_protos($ssl, [http/1.1, http/2.0, spdy/3]); # returns 0 on success

  • CTX_set_alpn_protos COMPATIBILITY: not available in Net-SSLeay-1.55 and before; requires at least OpenSSL 1.0.2 NOTE: You need CTX_set_alpn_protos on client side of TLS connection. This adds list of supported application layer protocols to ClientHello message sent by a client. It advertises the enumeration of supported protocols: Net::SSLeay::CTX_set_alpn_protos($ctx, [http/1.1, http/2.0, spdy/3]); # returns 0 on success

  • P_alpn_selected COMPATIBILITY: not available in Net-SSLeay-1.55 and before; requires at least OpenSSL 1.0.2 Returns the name of negotiated protocol for given TLS connection $ssl. $rv = Net::SSLeay::P_alpn_selected($ssl); # $ssl - value corresponding to openssls SSL structure # # returns: (string) negotiated protocol name (or undef if no negotiation was done or failed with fatal error)

Low level API: DANE Support

OpenSSL version 1.0.2 adds preliminary support RFC6698 Domain Authentication of Named Entities (DANE) Transport Layer Association within OpenSSL

  • SSL_get_tlsa_record_byname COMPATIBILITY: DELETED from net-ssleay, since it is not supported by OpenSSL In order to facilitate DANE there is additional interface, SSL_get_tlsa_record_byname, accepting hostname, port and socket type that returns packed TLSA record. In order to make it even easier there is additional SSL_ctrl function that calls SSL_get_tlsa_record_byname for you. Latter is recommended for programmers that wish to maintain broader binary compatibility, e.g. make application work with both 1.0.2 and prior version (in which case call to SSL_ctrl with new code returning error would have to be ignored when running with prior version). Net::SSLeay::get_tlsa_record_byname($name, $port, $type);

Low level API: Other functions

  • COMP_add_compression_method Adds the compression method cm with the identifier id to the list of available compression methods. This list is globally maintained for all SSL operations within this application. It cannot be set for specific SSL_CTX or SSL objects. my $rv = Net::SSLeay::COMP_add_compression_method($id, $cm); # $id - (integer) compression method id # 0 to 63: methods defined by the IETF # 64 to 192: external party methods assigned by IANA # 193 to 255: reserved for private use # # $cm - value corresponding to openssls COMP_METHOD structure # # returns: 0 on success, 1 on failure (check the error queue to find out the reason) Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_COMP_add_compression_method.html>

  • DH_free Frees the DH structure and its components. The values are erased before the memory is returned to the system. Net::SSLeay::DH_free($dh); # $dh - value corresponding to openssls DH structure # # returns: no return value Check openssl doc <https://www.openssl.org/docs/manmaster/man3/DH_new.html>

  • FIPS_mode_set Enable or disable FIPS mode in a FIPS capable OpenSSL. Net::SSLeay::FIPS_mode_set($enable); # $enable - (integer) 1 to enable, 0 to disable

Low level API: EC related functions

  • CTX_set_tmp_ecdh TBA

  • EC_KEY_free TBA

  • EC_KEY_new_by_curve_name TBA

  • EC_KEY_generate_key Generates a EC key and returns it in a newly allocated EC_KEY structure. The EC key then can be used to create a PKEY which can be used in calls like X509_set_pubkey. my $key = Net::SSLeay::EVP_PKEY_new(); my $ec = Net::SSLeay::EC_KEY_generate_key($curve); Net::SSLeay::EVP_PKEY_assign_EC_KEY($key,$ec); # $curve - curve name like secp521r1 or the matching Id (integer) of the curve # # returns: value corresponding to openssls EC_KEY structure (0 on failure) This function has no equivalent in OpenSSL but combines multiple OpenSSL functions for an easier interface.

  • CTX_set_ecdh_auto, set_ecdh_auto These functions enable or disable the automatic curve selection on the server side by calling SSL_CTX_set_ecdh_auto or SSL_set_ecdh_auto respectively. If enabled the highest preference curve is automatically used for ECDH temporary keys used during key exchange. This function is no longer available for OpenSSL 1.1.0 or higher. Net::SSLeay::CTX_set_ecdh_auto($ctx,1); Net::SSLeay::set_ecdh_auto($ssl,1);

  • CTX_set1_curves_list, set1_curves_list These functions set the supported curves (in order of preference) by calling SSL_CTX_set1_curves_list or SSL_set1_curves_list respectively. For a TLS client these curves are offered to the server in the supported curves extension while on the server side these are used to determine the shared curve. These functions are only available since OpenSSL 1.1.0. Net::SSLeay::CTX_set1_curves_list($ctx,“P-521:P-384:P-256”); Net::SSLeay::set1_curves_list($ssl,“P-521:P-384:P-256”);

  • CTX_set1_groups_list, set1_groups_list These functions set the supported groups (in order of preference) by calling SSL_CTX_set1_groups_list or SSL_set1_groups_list respectively. This is practically the same as CTX_set1_curves_list and set1_curves_list except that all DH groups can be given as supported by TLS 1.3. These functions are only available since OpenSSL 1.1.1. Net::SSLeay::CTX_set1_groups_list($ctx,“P-521:P-384:P-256”); Net::SSLeay::set1_groups_list($ssl,“P-521:P-384:P-256”);

Low level API: OSSL_LIB_CTX and OSSL_PROVIDER related functions

  • OSSL_LIB_CTX_get0_global_default Returns a concrete (non NULL) reference to the global default library context. my $libctx = Net::SSLeay::OSSL_LIB_CTX_get0_global_default(); # returns: a value corresponding to OSSL_LIB_CTX structure or false on failure Typically it’s simpler to use undef with functions that take an OSSL_LIB_CTX argument when global default library context is needed. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OSSL_LIB_CTX_get0_global_default.html>

  • OSSL_PROVIDER_load Loads and initializes a provider my $provider = Net::SSLeay::OSSL_PROVIDER_load($libctx, $name); # $libctx - value corresponding to OSSL_LIB_CTX structure or undef # $name - (string) provider name, e.g., legacy # # returns: a value corresponding to OSSL_PROVIDER or false on failure Using undef loads the provider within the global default library context. my $provider = Net::SSLeay::OSSL_PROVIDER_load(undef, legacy); Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OSSL_PROVIDER_load.html>

  • OSSL_PROVIDER_try_load Loads and initializes a provider similar to OSSL_PROVIDER_load with additional fallback control. my $provider = Net::SSLeay::OSSL_PROVIDER_try_load($libctx, $name, $retain_fallbacks); # $libctx - value corresponding to OSSL_LIB_CTX structure or undef # $name - (string) provider name, e.g., legacy # $retain_fallbacks - (integer) 0 or 1 # # returns: a value corresponding to OSSL_PROVIDER or false on failure Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OSSL_PROVIDER_try_load.html>

  • OSSL_PROVIDER_unload Unloads the given provider. my $rv = Net::SSLeay::OSSL_PROVIDER_unload($provider); # $provider - a value corresponding to OSSL_PROVIDER # # returns: (integer) 1 on success, 0 on error Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OSSL_PROVIDER_unload.html>

  • OSSL_PROVIDER_available Checks if a named provider is available for use. my $rv = Net::SSLeay::OSSL_PROVIDER_available($libctx, $name); # $libctx - value corresponding to OSSL_LIB_CTX structure or undef # $name - (string) provider name, e.g., legacy # # returns: (integer) 1 if the named provider is available, otherwise 0. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OSSL_PROVIDER_available.html>

  • OSSL_PROVIDER_do_all Iterates over all loaded providers. A callback is called for each provider. my $rv = Net::SSLeay::OSSL_PROVIDER_do_all($libctx, $cb, $cbdata); # $libctx - value corresponding to OSSL_LIB_CTX structure or undef # $cb - reference to a perl callback function # $cbdata - data that will be passed to callback function # # returns: (integer) 1 if all callbacks returned 1, 0 the first time a callback returns 0. Example: sub do_all_cb { my ($provider, $cbdata) = @_; my $name = Net::SSLeay::OSSL_PROVIDER_get0_name($provider); print “Callback for provider: $name, cbdata: $cbdata “; return 1; } my $data_for_cb = Hello; # Triggers default provider automatic loading. Net::SSLeay::OSSL_PROVIDER_available(undef, default) || die default provider not available; Net::SSLeay::OSSL_PROVIDER_load(undef, legacy) || die load legacy; Net::SSLeay::OSSL_PROVIDER_load(undef, null) || die load null; Net::SSLeay::OSSL_PROVIDER_do_all(undef, \do_all_cb, $data_for_cb) || die a callback failed; Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OSSL_PROVIDER_do_all.html>

  • OSSL_PROVIDER_get0_name Returns the name of the given provider. my $name = Net::SSLeay::OSSL_PROVIDER_get0_name($provider); # $provider - a value corresponding to OSSL_PROVIDER # # returns: (string) provider name, e.g., legacy Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OSSL_PROVIDER_get0_name.html>

  • OSSL_PROVIDER_self_test Runs the provider’s self tests. my $rv = Net::SSLeay::OSSL_PROVIDER_self_test($provider); # $libctx - value corresponding to OSSL_LIB_CTX structure or undef # $provider - a value corresponding to OSSL_PROVIDER # # returns: (integer) returns 1 if the self tests pass, 0 on error Check openssl doc <https://www.openssl.org/docs/manmaster/man3/OSSL_PROVIDER_self_test.html>

Low level API: TLS PSK related functions

COMPATIBILITY: not available in Net-SSLeay-1.92 and before. The TLSv1.3 specific functions require at least OpenSSL 1.1.1 and the others require at least OpenSSL 1.0.0. Not available in LibreSSL.

  • CTX_use_psk_identity_hint Set PSK identity hint for SSL_CTX on TLS server for TLSv1.2 and earlier versions. my $ret = Net::SSLeay::CTX_use_psk_identity_hint($ctx, $hint); # $ctx - value corresponding to OpenSSL SSL_CTX structure # $hint - string, a hint sent to the TLS clients # # returns: 1 on success, 0 on failure Example: my $ret = Net::SSLeay::CTX_use_psk_identity_hint($ctx, ctx server identity_hint); Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_use_psk_identity_hint.html>

  • use_psk_identity_hint Set PSK identity hint for SSL on TLS server for TLSv1.2 and earlier versions. my $ret = Net::SSLeay::use_psk_identity_hint($ssl, $hint); # $ssl - value corresponding to OpenSSL SSL structure # $hint - string, a hint sent to the TLS clients # # returns: 1 on success, 0 on failure Example: my $ret = Net::SSLeay::use_psk_identity_hint($ssl, ssl server identity_hint); Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_use_psk_identity_hint.html>

  • CTX_set_psk_server_callback Set a callback for an SSL_CTX on TLS server for using PSKs with all TLS versions. NOTE: With TLSv1.3 Net::SSLeay::CTX_set_psk_find_session_callback or Net::SSLeay::set_psk_find_session_callback is recommended. # First set up a callback function. sub tls12_psk_cb { my ($ssl, $identity, $max_psk_len) = @_; # Note: $identity is potentially hostile user supplied data my $psk = pack(H*, deadbeef); return $psk if length $psk <= $max_psk_len; return undef; } my $cb = \tls12_psk_cb; Net::SSLeay::CTX_set_psk_server_callback($ctx, $cb); # $ctx - value corresponding to OpenSSL SSL_CTX structure # $cb - reference to callback function # # returns: no return value The callback function must return a PSK in packed binary format, or undef to trigger unknown_psk_identity alert and TLS handshake failure. If TLS handshake failure without PSK specific alert is required, return packed random data. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_psk_server_callback.html>

  • set_psk_server_callback Set a callback for an SSL on TLS server for using PSKs with all TLS versions. NOTE: With TLSv1.3 Net::SSLeay::CTX_set_psk_find_session_callback or Net::SSLeay::set_psk_find_session_callback is recommended. Net::SSLeay::set_psk_server_callback($ssl, $cb); # $ssl - value corresponding to OpenSSL SSL structure # $cb - reference to callback function # # returns: no return value See Net::SSLeay::CTX_set_psk_server_callback() documentation for a full example with a callback. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_set_psk_server_callback.html>

  • CTX_set_psk_find_session_callback Set a callback for an SSL_CTX on TLS server for using TLSv1.3 PSKs. # First set up a callback function. sub tls13_psk_cb { my ($ssl, $identity) = @_; # Note: $identity is potentially hostile user supplied data my $sess = Net::SSLeay::SESSION_new(); my $cipher = Net::SSLeay::CIPHER_find($ssl, pack(n, 0x1301)); Net::SSLeay::SESSION_set1_master_key($sess, pack(H*, deadbeef)); Net::SSLeay::SESSION_set_cipher($sess, $cipher); Net::SSLeay::SESSION_set_protocol_version($sess, Net::SSLeay::version($ssl)); return (1, $sess); } my $cb = \tls13_psk_cb; Net::SSLeay::CTX_set_psk_find_session_callback($ctx, $cb); # $ctx - value corresponding to OpenSSL SSL_CTX structure # $cb - reference to callback function # # returns: no return value The callback function must return a two value list. When the first value is 0, the connection setup fails. When the first value is 1, the second value must be a valid SSL_SESSION or undef. When the second value is a valid SSL_SESSION, the TLS handshake proceeds with PSK authentication. When the the second value is undef, PSK is not used the TLS handshake proceeds with certificate authentication. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_psk_find_session_callback.html>

  • set_psk_find_session_callback Set a callback for an SSL on TLS server for using TLSv1.3 PSKs. Net::SSLeay::set_psk_find_session_callback($ssl, $cb); # $ssl - value corresponding to OpenSSL SSL structure # $cb - reference to callback function # # returns: no return value See Net::SSLeay::CTX_set_psk_find_session_callback() documentation for a full example with a callback. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_set_psk_find_session_callback.html>

  • CTX_set_psk_use_session_callback Set a callback for an SSL_CTX on TLS client for using TLSv1.3 PSKs. # First set up a callback function. sub tls13_use_psk_cb { my ($ssl, $md) = @_; my $psk_identity = “test-tls-psk”; my $sess = Net::SSLeay::SESSION_new(); my $cipher = Net::SSLeay::CIPHER_find($ssl, pack(n, 0x1301)); Net::SSLeay::SESSION_set1_master_key($sess, pack(H*, deadbeef)); Net::SSLeay::SESSION_set_cipher($sess, $cipher); Net::SSLeay::SESSION_set_protocol_version($sess, Net::SSLeay::TLS1_3_VERSION()); # Typically not defined, see OpenSSL manual if ($md) { my $sess_md = Net::SSLeay::CIPHER_get_handshake_digest($cipher); my $md_type; $md_type = Net::SSLeay::EVP_MD_type($md) if $md; my $sess_md_type = Net::SSLeay::EVP_MD_type($sess_md); if ($md_type != $sess_md_type) { # Example only: guess and try SHA384 my $switched_cipher = Net::SSLeay::CIPHER_find($ssl, pack(n, 0x1302)); my $switched_md = Net::SSLeay::CIPHER_get_handshake_digest($switched_cipher); my $switched_md_type = Net::SSLeay::EVP_MD_type($switched_md); if ($md_type != $switched_md_type) { # Guessed wrong, cant proceed with mismatched digest function Net::SSLeay::SESSION_free($sess); return (0, undef, undef); } Net::SSLeay::SESSION_set_cipher($sess, $switched_cipher); } } return (1, $psk_identity, $sess); } my $cb = \tls13_use_psk_cb; Net::SSLeay::CTX_set_psk_use_session_callback($ctx, $cb); # $ctx - value corresponding to OpenSSL SSL_CTX structure # $cb - reference to callback function # # returns: no return value The callback function must return a two value list. When the first value is 0, the connection setup fails. When the first value is 1, the second value must be a valid SSL_SESSION or undef. When the second value is a valid SSL_SESSION, the TLS handshake proceeds with PSK authentication. When the the second value is undef, PSK is not used the TLS handshake proceeds with certificate authentication. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_psk_find_session_callback.html>

  • set_psk_use_session_callback Set a callback for an SSL on TLS client for using TLSv1.3 PSKs. # First set up a callback function. sub tls13_psk_cb { my ($ssl, $identity) = @_; # Note: $identity is potentially hostile user supplied data my $sess = Net::SSLeay::SESSION_new(); my $cipher = Net::SSLeay::CIPHER_find($ssl, pack(n, 0x1301)); Net::SSLeay::SESSION_set1_master_key($sess, pack(H*, deadbeef)); Net::SSLeay::SESSION_set_cipher($sess, $cipher); Net::SSLeay::SESSION_set_protocol_version($sess, Net::SSLeay::version($ssl)); return (1, $sess); } my $cb = \tls13_psk_cb; Net::SSLeay::CTX_set_psk_find_session_callback($ctx, $cb); # $ctx - value corresponding to OpenSSL SSL_CTX structure # $cb - reference to callback function # # returns: no return value The callback function must return a two value list. When the first value is 0, the connection setup fails. When the first value is 1, the second value must be a valid SSL_SESSION or undef. When the second value is a valid SSL_SESSION, the TLS handshake proceeds with PSK authentication. When the the second value is undef, PSK is not used the TLS handshake proceeds with certificate authentication. Check openssl doc <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_psk_find_session_callback.html>

Constants

There are many openssl constants available in Net::SSLeay. You can use them like this:

use Net::SSLeay; print &Net::SSLeay::NID_commonName; # or print Net::SSLeay::NID_commonName();

Or you can import them and use:

use Net::SSLeay qw/NID_commonName/; print &NID_commonName; # or print NID_commonName(); # or print NID_commonName;

The constants names are derived from openssl constants, however constants starting with SSL_ prefix have name with SSL_ part stripped - e.g. openssl’s constant SSL_OP_ALL is available as Net::SSLeay::OP_ALL

The list of all available constant names:

The list below is automatically generated - do not manually modify it. To add or remove a constant, edit helper_script/constants.txt, then run helper_script/update-exported-constants.

AD_ACCESS_DENIED OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS AD_BAD_CERTIFICATE OPENSSL_INIT_NO_LOAD_SSL_STRINGS AD_BAD_CERTIFICATE_HASH_VALUE OPENSSL_MODULES_DIR AD_BAD_CERTIFICATE_STATUS_RESPONSE OPENSSL_PLATFORM AD_BAD_RECORD_MAC OPENSSL_VERSION AD_CERTIFICATE_EXPIRED OPENSSL_VERSION_MAJOR AD_CERTIFICATE_REQUIRED OPENSSL_VERSION_MINOR AD_CERTIFICATE_REVOKED OPENSSL_VERSION_NUMBER AD_CERTIFICATE_UNKNOWN OPENSSL_VERSION_PATCH AD_CERTIFICATE_UNOBTAINABLE OPENSSL_VERSION_STRING AD_CLOSE_NOTIFY OP_ALL AD_DECODE_ERROR OP_ALLOW_CLIENT_RENEGOTIATION AD_DECOMPRESSION_FAILURE OP_ALLOW_NO_DHE_KEX AD_DECRYPTION_FAILED OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION AD_DECRYPT_ERROR OP_CIPHER_SERVER_PREFERENCE AD_EXPORT_RESTRICTION OP_CISCO_ANYCONNECT AD_HANDSHAKE_FAILURE OP_CLEANSE_PLAINTEXT AD_ILLEGAL_PARAMETER OP_COOKIE_EXCHANGE AD_INAPPROPRIATE_FALLBACK OP_CRYPTOPRO_TLSEXT_BUG AD_INSUFFICIENT_SECURITY OP_DISABLE_TLSEXT_CA_NAMES AD_INTERNAL_ERROR OP_DONT_INSERT_EMPTY_FRAGMENTS AD_MISSING_EXTENSION OP_ENABLE_KTLS AD_NO_APPLICATION_PROTOCOL OP_ENABLE_MIDDLEBOX_COMPAT AD_NO_CERTIFICATE OP_EPHEMERAL_RSA AD_NO_RENEGOTIATION OP_IGNORE_UNEXPECTED_EOF AD_PROTOCOL_VERSION OP_LEGACY_SERVER_CONNECT AD_RECORD_OVERFLOW OP_MICROSOFT_BIG_SSLV3_BUFFER AD_UNEXPECTED_MESSAGE OP_MICROSOFT_SESS_ID_BUG AD_UNKNOWN_CA OP_MSIE_SSLV2_RSA_PADDING AD_UNKNOWN_PSK_IDENTITY OP_NETSCAPE_CA_DN_BUG AD_UNRECOGNIZED_NAME OP_NETSCAPE_CHALLENGE_BUG AD_UNSUPPORTED_CERTIFICATE OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG AD_UNSUPPORTED_EXTENSION OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG AD_USER_CANCELLED OP_NON_EXPORT_FIRST ASN1_STRFLGS_ESC_CTRL OP_NO_ANTI_REPLAY ASN1_STRFLGS_ESC_MSB OP_NO_CLIENT_RENEGOTIATION ASN1_STRFLGS_ESC_QUOTE OP_NO_COMPRESSION ASN1_STRFLGS_RFC2253 OP_NO_ENCRYPT_THEN_MAC ASYNC_NO_JOBS OP_NO_EXTENDED_MASTER_SECRET ASYNC_PAUSED OP_NO_QUERY_MTU CB_ACCEPT_EXIT OP_NO_RENEGOTIATION CB_ACCEPT_LOOP OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION CB_ALERT OP_NO_SSL_MASK CB_CONNECT_EXIT OP_NO_SSLv2 CB_CONNECT_LOOP OP_NO_SSLv3 CB_EXIT OP_NO_TICKET CB_HANDSHAKE_DONE OP_NO_TLSv1 CB_HANDSHAKE_START OP_NO_TLSv1_1 CB_LOOP OP_NO_TLSv1_2 CB_READ OP_NO_TLSv1_3 CB_READ_ALERT OP_PKCS1_CHECK_1 CB_WRITE OP_PKCS1_CHECK_2 CB_WRITE_ALERT OP_PRIORITIZE_CHACHA CLIENT_HELLO_CB OP_SAFARI_ECDHE_ECDSA_BUG CLIENT_HELLO_ERROR OP_SINGLE_DH_USE CLIENT_HELLO_RETRY OP_SINGLE_ECDH_USE CLIENT_HELLO_SUCCESS OP_SSLEAY_080_CLIENT_DH_BUG CONF_MFLAGS_DEFAULT_SECTION OP_SSLREF2_REUSE_CERT_TYPE_BUG CONF_MFLAGS_IGNORE_ERRORS OP_TLSEXT_PADDING CONF_MFLAGS_IGNORE_MISSING_FILE OP_TLS_BLOCK_PADDING_BUG CONF_MFLAGS_IGNORE_RETURN_CODES OP_TLS_D5_BUG CONF_MFLAGS_NO_DSO OP_TLS_ROLLBACK_BUG CONF_MFLAGS_SILENT READING ERROR_NONE RECEIVED_SHUTDOWN ERROR_SSL RETRY_VERIFY ERROR_SYSCALL RSA_3 ERROR_WANT_ACCEPT RSA_F4 ERROR_WANT_ASYNC R_BAD_AUTHENTICATION_TYPE ERROR_WANT_ASYNC_JOB R_BAD_CHECKSUM ERROR_WANT_CLIENT_HELLO_CB R_BAD_MAC_DECODE ERROR_WANT_CONNECT R_BAD_RESPONSE_ARGUMENT ERROR_WANT_READ R_BAD_SSL_FILETYPE ERROR_WANT_RETRY_VERIFY R_BAD_SSL_SESSION_ID_LENGTH ERROR_WANT_WRITE R_BAD_STATE ERROR_WANT_X509_LOOKUP R_BAD_WRITE_RETRY ERROR_ZERO_RETURN R_CHALLENGE_IS_DIFFERENT EVP_PKS_DSA R_CIPHER_TABLE_SRC_ERROR EVP_PKS_EC R_INVALID_CHALLENGE_LENGTH EVP_PKS_RSA R_NO_CERTIFICATE_SET EVP_PKT_ENC R_NO_CERTIFICATE_SPECIFIED EVP_PKT_EXCH R_NO_CIPHER_LIST EVP_PKT_EXP R_NO_CIPHER_MATCH EVP_PKT_SIGN R_NO_PRIVATEKEY EVP_PK_DH R_NO_PUBLICKEY EVP_PK_DSA R_NULL_SSL_CTX EVP_PK_EC R_PEER_DID_NOT_RETURN_A_CERTIFICATE EVP_PK_RSA R_PEER_ERROR FILETYPE_ASN1 R_PEER_ERROR_CERTIFICATE FILETYPE_PEM R_PEER_ERROR_NO_CIPHER F_CLIENT_CERTIFICATE R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE F_CLIENT_HELLO R_PUBLIC_KEY_ENCRYPT_ERROR F_CLIENT_MASTER_KEY R_PUBLIC_KEY_IS_NOT_RSA F_D2I_SSL_SESSION R_READ_WRONG_PACKET_TYPE F_GET_CLIENT_FINISHED R_SHORT_READ F_GET_CLIENT_HELLO R_SSL_SESSION_ID_IS_DIFFERENT F_GET_CLIENT_MASTER_KEY R_UNABLE_TO_EXTRACT_PUBLIC_KEY F_GET_SERVER_FINISHED R_UNKNOWN_REMOTE_ERROR_TYPE F_GET_SERVER_HELLO R_UNKNOWN_STATE F_GET_SERVER_VERIFY R_X509_LIB F_I2D_SSL_SESSION SENT_SHUTDOWN F_READ_N SESSION_ASN1_VERSION F_REQUEST_CERTIFICATE SESS_CACHE_BOTH F_SERVER_HELLO SESS_CACHE_CLIENT F_SSL_CERT_NEW SESS_CACHE_NO_AUTO_CLEAR F_SSL_GET_NEW_SESSION SESS_CACHE_NO_INTERNAL F_SSL_NEW SESS_CACHE_NO_INTERNAL_LOOKUP F_SSL_READ SESS_CACHE_NO_INTERNAL_STORE F_SSL_RSA_PRIVATE_DECRYPT SESS_CACHE_OFF F_SSL_RSA_PUBLIC_ENCRYPT SESS_CACHE_SERVER F_SSL_SESSION_NEW SESS_CACHE_UPDATE_TIME F_SSL_SESSION_PRINT_FP SSL2_MT_CLIENT_CERTIFICATE F_SSL_SET_FD SSL2_MT_CLIENT_FINISHED F_SSL_SET_RFD SSL2_MT_CLIENT_HELLO F_SSL_SET_WFD SSL2_MT_CLIENT_MASTER_KEY F_SSL_USE_CERTIFICATE SSL2_MT_ERROR F_SSL_USE_CERTIFICATE_ASN1 SSL2_MT_REQUEST_CERTIFICATE F_SSL_USE_CERTIFICATE_FILE SSL2_MT_SERVER_FINISHED F_SSL_USE_PRIVATEKEY SSL2_MT_SERVER_HELLO F_SSL_USE_PRIVATEKEY_ASN1 SSL2_MT_SERVER_VERIFY F_SSL_USE_PRIVATEKEY_FILE SSL2_VERSION F_SSL_USE_RSAPRIVATEKEY SSL3_MT_CCS F_SSL_USE_RSAPRIVATEKEY_ASN1 SSL3_MT_CERTIFICATE F_SSL_USE_RSAPRIVATEKEY_FILE SSL3_MT_CERTIFICATE_REQUEST F_WRITE_PENDING SSL3_MT_CERTIFICATE_STATUS GEN_DIRNAME SSL3_MT_CERTIFICATE_URL GEN_DNS SSL3_MT_CERTIFICATE_VERIFY GEN_EDIPARTY SSL3_MT_CHANGE_CIPHER_SPEC GEN_EMAIL SSL3_MT_CLIENT_HELLO GEN_IPADD SSL3_MT_CLIENT_KEY_EXCHANGE GEN_OTHERNAME SSL3_MT_ENCRYPTED_EXTENSIONS GEN_RID SSL3_MT_END_OF_EARLY_DATA GEN_URI SSL3_MT_FINISHED GEN_X400 SSL3_MT_HELLO_REQUEST LIBRESSL_VERSION_NUMBER SSL3_MT_KEY_UPDATE MBSTRING_ASC SSL3_MT_MESSAGE_HASH MBSTRING_BMP SSL3_MT_NEWSESSION_TICKET MBSTRING_FLAG SSL3_MT_NEXT_PROTO MBSTRING_UNIV SSL3_MT_SERVER_DONE MBSTRING_UTF8 SSL3_MT_SERVER_HELLO MIN_RSA_MODULUS_LENGTH_IN_BYTES SSL3_MT_SERVER_KEY_EXCHANGE MODE_ACCEPT_MOVING_WRITE_BUFFER SSL3_MT_SUPPLEMENTAL_DATA MODE_ASYNC SSL3_RT_ALERT MODE_AUTO_RETRY SSL3_RT_APPLICATION_DATA MODE_ENABLE_PARTIAL_WRITE SSL3_RT_CHANGE_CIPHER_SPEC MODE_NO_AUTO_CHAIN SSL3_RT_HANDSHAKE MODE_RELEASE_BUFFERS SSL3_RT_HEADER NID_OCSP_sign SSL3_RT_INNER_CONTENT_TYPE NID_SMIMECapabilities SSL3_VERSION NID_X500 SSLEAY_BUILT_ON NID_X509 SSLEAY_CFLAGS NID_ad_OCSP SSLEAY_DIR NID_ad_ca_issuers SSLEAY_PLATFORM NID_algorithm SSLEAY_VERSION NID_authority_key_identifier ST_ACCEPT NID_basic_constraints ST_BEFORE NID_bf_cbc ST_CONNECT NID_bf_cfb64 ST_INIT NID_bf_ecb ST_OK NID_bf_ofb64 ST_READ_BODY NID_cast5_cbc ST_READ_HEADER NID_cast5_cfb64 TLS1_1_VERSION NID_cast5_ecb TLS1_2_VERSION NID_cast5_ofb64 TLS1_3_VERSION NID_certBag TLS1_VERSION NID_certificate_policies TLSEXT_STATUSTYPE_ocsp NID_client_auth TLSEXT_TYPE_application_layer_protocol_negotiation NID_code_sign TLSEXT_TYPE_cert_type NID_commonName TLSEXT_TYPE_certificate_authorities NID_countryName TLSEXT_TYPE_client_authz NID_crlBag TLSEXT_TYPE_client_cert_type NID_crl_distribution_points TLSEXT_TYPE_client_certificate_url NID_crl_number TLSEXT_TYPE_compress_certificate NID_crl_reason TLSEXT_TYPE_cookie NID_delta_crl TLSEXT_TYPE_early_data NID_des_cbc TLSEXT_TYPE_ec_point_formats NID_des_cfb64 TLSEXT_TYPE_elliptic_curves NID_des_ecb TLSEXT_TYPE_encrypt_then_mac NID_des_ede TLSEXT_TYPE_extended_master_secret NID_des_ede3 TLSEXT_TYPE_key_share NID_des_ede3_cbc TLSEXT_TYPE_max_fragment_length NID_des_ede3_cfb64 TLSEXT_TYPE_next_proto_neg NID_des_ede3_ofb64 TLSEXT_TYPE_padding NID_des_ede_cbc TLSEXT_TYPE_post_handshake_auth NID_des_ede_cfb64 TLSEXT_TYPE_psk NID_des_ede_ofb64 TLSEXT_TYPE_psk_kex_modes NID_des_ofb64 TLSEXT_TYPE_quic_transport_parameters NID_description TLSEXT_TYPE_renegotiate NID_desx_cbc TLSEXT_TYPE_server_authz NID_dhKeyAgreement TLSEXT_TYPE_server_cert_type NID_dnQualifier TLSEXT_TYPE_server_name NID_dsa TLSEXT_TYPE_session_ticket NID_dsaWithSHA TLSEXT_TYPE_signature_algorithms NID_dsaWithSHA1 TLSEXT_TYPE_signature_algorithms_cert NID_dsaWithSHA1_2 TLSEXT_TYPE_signed_certificate_timestamp NID_dsa_2 TLSEXT_TYPE_srp NID_email_protect TLSEXT_TYPE_status_request NID_ext_key_usage TLSEXT_TYPE_supported_groups NID_ext_req TLSEXT_TYPE_supported_versions NID_friendlyName TLSEXT_TYPE_truncated_hmac NID_givenName TLSEXT_TYPE_trusted_ca_keys NID_hmacWithSHA1 TLSEXT_TYPE_use_srtp NID_id_ad TLSEXT_TYPE_user_mapping NID_id_ce VERIFY_CLIENT_ONCE NID_id_kp VERIFY_FAIL_IF_NO_PEER_CERT NID_id_pbkdf2 VERIFY_NONE NID_id_pe VERIFY_PEER NID_id_pkix VERIFY_POST_HANDSHAKE NID_id_qt_cps V_OCSP_CERTSTATUS_GOOD NID_id_qt_unotice V_OCSP_CERTSTATUS_REVOKED NID_idea_cbc V_OCSP_CERTSTATUS_UNKNOWN NID_idea_cfb64 WRITING NID_idea_ecb X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT NID_idea_ofb64 X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS NID_info_access X509_CHECK_FLAG_NEVER_CHECK_SUBJECT NID_initials X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS NID_invalidity_date X509_CHECK_FLAG_NO_WILDCARDS NID_issuer_alt_name X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS NID_keyBag X509_CRL_VERSION_1 NID_key_usage X509_CRL_VERSION_2 NID_localKeyID X509_FILETYPE_ASN1 NID_localityName X509_FILETYPE_DEFAULT NID_md2 X509_FILETYPE_PEM NID_md2WithRSAEncryption X509_LOOKUP NID_md5 X509_PURPOSE_ANY NID_md5WithRSA X509_PURPOSE_CRL_SIGN NID_md5WithRSAEncryption X509_PURPOSE_NS_SSL_SERVER NID_md5_sha1 X509_PURPOSE_OCSP_HELPER NID_mdc2 X509_PURPOSE_SMIME_ENCRYPT NID_mdc2WithRSA X509_PURPOSE_SMIME_SIGN NID_ms_code_com X509_PURPOSE_SSL_CLIENT NID_ms_code_ind X509_PURPOSE_SSL_SERVER NID_ms_ctl_sign X509_PURPOSE_TIMESTAMP_SIGN NID_ms_efs X509_REQ_VERSION_1 NID_ms_ext_req X509_REQ_VERSION_2 NID_ms_sgc X509_REQ_VERSION_3 NID_name X509_TRUST_COMPAT NID_netscape X509_TRUST_DEFAULT NID_netscape_base_url X509_TRUST_EMAIL NID_netscape_ca_policy_url X509_TRUST_OBJECT_SIGN NID_netscape_ca_revocation_url X509_TRUST_OCSP_REQUEST NID_netscape_cert_extension X509_TRUST_OCSP_SIGN NID_netscape_cert_sequence X509_TRUST_SSL_CLIENT NID_netscape_cert_type X509_TRUST_SSL_SERVER NID_netscape_comment X509_TRUST_TSA NID_netscape_data_type X509_VERSION_1 NID_netscape_renewal_url X509_VERSION_2 NID_netscape_revocation_url X509_VERSION_3 NID_netscape_ssl_server_name X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH NID_ns_sgc X509_V_ERR_AKID_SKID_MISMATCH NID_organizationName X509_V_ERR_APPLICATION_VERIFICATION NID_organizationalUnitName X509_V_ERR_AUTHORITY_KEY_IDENTIFIER_CRITICAL NID_pbeWithMD2AndDES_CBC X509_V_ERR_CA_BCONS_NOT_CRITICAL NID_pbeWithMD2AndRC2_CBC X509_V_ERR_CA_CERT_MISSING_KEY_USAGE NID_pbeWithMD5AndCast5_CBC X509_V_ERR_CA_KEY_TOO_SMALL NID_pbeWithMD5AndDES_CBC X509_V_ERR_CA_MD_TOO_WEAK NID_pbeWithMD5AndRC2_CBC X509_V_ERR_CERT_CHAIN_TOO_LONG NID_pbeWithSHA1AndDES_CBC X509_V_ERR_CERT_HAS_EXPIRED NID_pbeWithSHA1AndRC2_CBC X509_V_ERR_CERT_NOT_YET_VALID NID_pbe_WithSHA1And128BitRC2_CBC X509_V_ERR_CERT_REJECTED NID_pbe_WithSHA1And128BitRC4 X509_V_ERR_CERT_REVOKED NID_pbe_WithSHA1And2_Key_TripleDES_CBC X509_V_ERR_CERT_SIGNATURE_FAILURE NID_pbe_WithSHA1And3_Key_TripleDES_CBC X509_V_ERR_CERT_UNTRUSTED NID_pbe_WithSHA1And40BitRC2_CBC X509_V_ERR_CRL_HAS_EXPIRED NID_pbe_WithSHA1And40BitRC4 X509_V_ERR_CRL_NOT_YET_VALID NID_pbes2 X509_V_ERR_CRL_PATH_VALIDATION_ERROR NID_pbmac1 X509_V_ERR_CRL_SIGNATURE_FAILURE NID_pkcs X509_V_ERR_DANE_NO_MATCH NID_pkcs3 X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT NID_pkcs7 X509_V_ERR_DIFFERENT_CRL_SCOPE NID_pkcs7_data X509_V_ERR_EC_KEY_EXPLICIT_PARAMS NID_pkcs7_digest X509_V_ERR_EE_KEY_TOO_SMALL NID_pkcs7_encrypted X509_V_ERR_EMAIL_MISMATCH NID_pkcs7_enveloped X509_V_ERR_EMPTY_SUBJECT_ALT_NAME NID_pkcs7_signed X509_V_ERR_EMPTY_SUBJECT_SAN_NOT_CRITICAL NID_pkcs7_signedAndEnveloped X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD NID_pkcs8ShroudedKeyBag X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD NID_pkcs9 X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD NID_pkcs9_challengePassword X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD NID_pkcs9_contentType X509_V_ERR_EXCLUDED_VIOLATION NID_pkcs9_countersignature X509_V_ERR_EXTENSIONS_REQUIRE_VERSION_3 NID_pkcs9_emailAddress X509_V_ERR_HOSTNAME_MISMATCH NID_pkcs9_extCertAttributes X509_V_ERR_INVALID_CA NID_pkcs9_messageDigest X509_V_ERR_INVALID_CALL NID_pkcs9_signingTime X509_V_ERR_INVALID_EXTENSION NID_pkcs9_unstructuredAddress X509_V_ERR_INVALID_NON_CA NID_pkcs9_unstructuredName X509_V_ERR_INVALID_POLICY_EXTENSION NID_private_key_usage_period X509_V_ERR_INVALID_PURPOSE NID_rc2_40_cbc X509_V_ERR_IP_ADDRESS_MISMATCH NID_rc2_64_cbc X509_V_ERR_ISSUER_NAME_EMPTY NID_rc2_cbc X509_V_ERR_KEYUSAGE_NO_CERTSIGN NID_rc2_cfb64 X509_V_ERR_KEYUSAGE_NO_CRL_SIGN NID_rc2_ecb X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE NID_rc2_ofb64 X509_V_ERR_KU_KEY_CERT_SIGN_INVALID_FOR_NON_CA NID_rc4 X509_V_ERR_MISSING_AUTHORITY_KEY_IDENTIFIER NID_rc4_40 X509_V_ERR_MISSING_SUBJECT_KEY_IDENTIFIER NID_rc5_cbc X509_V_ERR_NO_EXPLICIT_POLICY NID_rc5_cfb64 X509_V_ERR_NO_ISSUER_PUBLIC_KEY NID_rc5_ecb X509_V_ERR_NO_VALID_SCTS NID_rc5_ofb64 X509_V_ERR_OCSP_CERT_UNKNOWN NID_ripemd160 X509_V_ERR_OCSP_VERIFY_FAILED NID_ripemd160WithRSA X509_V_ERR_OCSP_VERIFY_NEEDED NID_rle_compression X509_V_ERR_OUT_OF_MEM NID_rsa X509_V_ERR_PATHLEN_INVALID_FOR_NON_CA NID_rsaEncryption X509_V_ERR_PATHLEN_WITHOUT_KU_KEY_CERT_SIGN NID_rsadsi X509_V_ERR_PATH_LENGTH_EXCEEDED NID_safeContentsBag X509_V_ERR_PATH_LOOP NID_sdsiCertificate X509_V_ERR_PERMITTED_VIOLATION NID_secretBag X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED NID_serialNumber X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED NID_server_auth X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION NID_sha X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN NID_sha1 X509_V_ERR_SIGNATURE_ALGORITHM_INCONSISTENCY NID_sha1WithRSA X509_V_ERR_SIGNATURE_ALGORITHM_MISMATCH NID_sha1WithRSAEncryption X509_V_ERR_STORE_LOOKUP NID_sha224 X509_V_ERR_SUBJECT_ISSUER_MISMATCH NID_sha224WithRSAEncryption X509_V_ERR_SUBJECT_KEY_IDENTIFIER_CRITICAL NID_sha256 X509_V_ERR_SUBJECT_NAME_EMPTY NID_sha256WithRSAEncryption X509_V_ERR_SUBTREE_MINMAX NID_sha384 X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256 NID_sha384WithRSAEncryption X509_V_ERR_SUITE_B_INVALID_ALGORITHM NID_sha3_224 X509_V_ERR_SUITE_B_INVALID_CURVE NID_sha3_256 X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM NID_sha3_384 X509_V_ERR_SUITE_B_INVALID_VERSION NID_sha3_512 X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED NID_sha512 X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY NID_sha512WithRSAEncryption X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE NID_sha512_224 X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE NID_sha512_224WithRSAEncryption X509_V_ERR_UNABLE_TO_GET_CRL NID_sha512_256 X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER NID_sha512_256WithRSAEncryption X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT NID_shaWithRSAEncryption X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY NID_shake128 X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE NID_shake256 X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION NID_stateOrProvinceName X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION NID_subject_alt_name X509_V_ERR_UNNESTED_RESOURCE NID_subject_key_identifier X509_V_ERR_UNSPECIFIED NID_surname X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX NID_sxnet X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE NID_time_stamp X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE NID_title X509_V_ERR_UNSUPPORTED_NAME_SYNTAX NID_undef X509_V_ERR_UNSUPPORTED_SIGNATURE_ALGORITHM NID_uniqueIdentifier X509_V_FLAG_ALLOW_PROXY_CERTS NID_x509Certificate X509_V_FLAG_CB_ISSUER_CHECK NID_x509Crl X509_V_FLAG_CHECK_SS_SIGNATURE NID_zlib_compression X509_V_FLAG_CRL_CHECK NOTHING X509_V_FLAG_CRL_CHECK_ALL OCSP_RESPONSE_STATUS_INTERNALERROR X509_V_FLAG_EXPLICIT_POLICY OCSP_RESPONSE_STATUS_MALFORMEDREQUEST X509_V_FLAG_EXTENDED_CRL_SUPPORT OCSP_RESPONSE_STATUS_SIGREQUIRED X509_V_FLAG_IGNORE_CRITICAL OCSP_RESPONSE_STATUS_SUCCESSFUL X509_V_FLAG_INHIBIT_ANY OCSP_RESPONSE_STATUS_TRYLATER X509_V_FLAG_INHIBIT_MAP OCSP_RESPONSE_STATUS_UNAUTHORIZED X509_V_FLAG_LEGACY_VERIFY OPENSSL_BUILT_ON X509_V_FLAG_NOTIFY_POLICY OPENSSL_CFLAGS X509_V_FLAG_NO_ALT_CHAINS OPENSSL_CPU_INFO X509_V_FLAG_NO_CHECK_TIME OPENSSL_DIR X509_V_FLAG_PARTIAL_CHAIN OPENSSL_ENGINES_DIR X509_V_FLAG_POLICY_CHECK OPENSSL_FULL_VERSION_STRING X509_V_FLAG_POLICY_MASK OPENSSL_INFO_CONFIG_DIR X509_V_FLAG_SUITEB_128_LOS OPENSSL_INFO_CPU_SETTINGS X509_V_FLAG_SUITEB_128_LOS_ONLY OPENSSL_INFO_DIR_FILENAME_SEPARATOR X509_V_FLAG_SUITEB_192_LOS OPENSSL_INFO_DSO_EXTENSION X509_V_FLAG_TRUSTED_FIRST OPENSSL_INFO_ENGINES_DIR X509_V_FLAG_USE_CHECK_TIME OPENSSL_INFO_LIST_SEPARATOR X509_V_FLAG_USE_DELTAS OPENSSL_INFO_MODULES_DIR X509_V_FLAG_X509_STRICT OPENSSL_INFO_SEED_SOURCE X509_V_OK OPENSSL_INIT_ADD_ALL_CIPHERS XN_FLAG_COMPAT OPENSSL_INIT_ADD_ALL_DIGESTS XN_FLAG_DN_REV OPENSSL_INIT_ASYNC XN_FLAG_DUMP_UNKNOWN_FIELDS OPENSSL_INIT_ATFORK XN_FLAG_FN_ALIGN OPENSSL_INIT_ENGINE_AFALG XN_FLAG_FN_LN OPENSSL_INIT_ENGINE_CAPI XN_FLAG_FN_MASK OPENSSL_INIT_ENGINE_CRYPTODEV XN_FLAG_FN_NONE OPENSSL_INIT_ENGINE_DYNAMIC XN_FLAG_FN_OID OPENSSL_INIT_ENGINE_OPENSSL XN_FLAG_FN_SN OPENSSL_INIT_ENGINE_PADLOCK XN_FLAG_MULTILINE OPENSSL_INIT_ENGINE_RDRAND XN_FLAG_ONELINE OPENSSL_INIT_LOAD_CONFIG XN_FLAG_RFC2253 OPENSSL_INIT_LOAD_CRYPTO_STRINGS XN_FLAG_SEP_COMMA_PLUS OPENSSL_INIT_LOAD_SSL_STRINGS XN_FLAG_SEP_CPLUS_SPC OPENSSL_INIT_NO_ADD_ALL_CIPHERS XN_FLAG_SEP_MASK OPENSSL_INIT_NO_ADD_ALL_DIGESTS XN_FLAG_SEP_MULTILINE OPENSSL_INIT_NO_ATEXIT XN_FLAG_SEP_SPLUS_SPC OPENSSL_INIT_NO_LOAD_CONFIG XN_FLAG_SPC_EQ

INTERNAL ONLY functions (do not use these)

The following functions are not intended for use from outside of Net::SSLeay module. They might be removed, renamed or changed without prior notice in future version.

Simply DO NOT USE THEM!

  • hello

  • blength

  • constant

EXAMPLES

One very good example to look at is the implementation of sslcat() in the SSLeay.pm file.

The following is a simple SSLeay client (with too little error checking :-(

#!/usr/bin/perl use Socket; use Net::SSLeay qw(die_now die_if_ssl_error) ; Net::SSLeay::load_error_strings(); Net::SSLeay::SSLeay_add_ssl_algorithms(); Net::SSLeay::randomize(); ($dest_serv, $port, $msg) = @ARGV; # Read command line $port = getservbyname ($port, tcp) unless $port =~ /^\d+$/; $dest_ip = gethostbyname ($dest_serv); $dest_serv_params = sockaddr_in($port, $dest_ip); socket (S, &AF_INET, &SOCK_STREAM, 0) or die “socket: $!”; connect (S, $dest_serv_params) or die “connect: $!”; select (S); $| = 1; select (STDOUT); # Eliminate STDIO buffering # The network connection is now open, lets fire up SSL $ctx = Net::SSLeay::CTX_new() or die_now(“Failed to create SSL_CTX $!”); Net::SSLeay::CTX_set_options($ctx, &Net::SSLeay::OP_ALL) or die_if_ssl_error(“ssl ctx set options”); $ssl = Net::SSLeay::new($ctx) or die_now(“Failed to create SSL $!”); Net::SSLeay::set_fd($ssl, fileno(S)); # Must use fileno $res = Net::SSLeay::connect($ssl) and die_if_ssl_error(“ssl connect”); print “Cipher `” . Net::SSLeay::get_cipher($ssl) . " “; # Exchange data $res = Net::SSLeay::write($ssl, $msg); # Perl knows how long $msg is die_if_ssl_error(“ssl write”); CORE::shutdown S, 1; # Half close –> No more output, sends EOF to server $got = Net::SSLeay::read($ssl); # Perl returns undef on failure die_if_ssl_error(“ssl read”); print $got; Net::SSLeay::free ($ssl); # Tear down connection Net::SSLeay::CTX_free ($ctx); close S;

The following is a simple SSLeay echo server (non forking):

#!/usr/bin/perl -w use Socket; use Net::SSLeay qw(die_now die_if_ssl_error); Net::SSLeay::load_error_strings(); Net::SSLeay::SSLeay_add_ssl_algorithms(); Net::SSLeay::randomize(); $our_ip = “����”; # Bind to all interfaces $port = 1235; $sockaddr_template = S n a4 x8; $our_serv_params = pack ($sockaddr_template, &AF_INET, $port, $our_ip); socket (S, &AF_INET, &SOCK_STREAM, 0) or die “socket: $!”; bind (S, $our_serv_params) or die “bind: $!”; listen (S, 5) or die “listen: $!”; $ctx = Net::SSLeay::CTX_new () or die_now(“CTX_new ($ctx): $!”); Net::SSLeay::CTX_set_options($ctx, &Net::SSLeay::OP_ALL) or die_if_ssl_error(“ssl ctx set options”); # Following will ask password unless private key is not encrypted Net::SSLeay::CTX_use_RSAPrivateKey_file ($ctx, plain-rsa.pem, &Net::SSLeay::FILETYPE_PEM); die_if_ssl_error(“private key”); Net::SSLeay::CTX_use_certificate_file ($ctx, plain-cert.pem, &Net::SSLeay::FILETYPE_PEM); die_if_ssl_error(“certificate”); while (1) { print “Accepting connections… “; ($addr = accept (NS, S)) or die “accept: $!”; select (NS); $| = 1; select (STDOUT); # Piping hot! ($af,$client_port,$client_ip) = unpack($sockaddr_template,$addr); @inetaddr = unpack(C4,$client_ip); print “$af connection from " . join (., @inetaddr) . “:$client_port “; # We now have a network connection, lets fire up SSLeay… $ssl = Net::SSLeay::new($ctx) or die_now(“SSL_new ($ssl): $!”); Net::SSLeay::set_fd($ssl, fileno(NS)); $err = Net::SSLeay::accept($ssl) and die_if_ssl_error(ssl accept); print “Cipher `” . Net::SSLeay::get_cipher($ssl) . " “; # Connected. Exchange some data. $got = Net::SSLeay::read($ssl); # Returns undef on fail die_if_ssl_error(“ssl read”); print “Got `$got (” . length ($got) . " chars) “; Net::SSLeay::write ($ssl, uc ($got)) or die “write: $!”; die_if_ssl_error(“ssl write”); Net::SSLeay::free ($ssl); # Tear down connection close NS; }

Yet another echo server. This one runs from /etc/inetd.conf so it avoids all the socket code overhead. Only caveat is opening an rsa key file - it had better be without any encryption or else it will not know where to ask for the password. Note how STDIN and STDOUT are wired to SSL.

#!/usr/bin/perl # /etc/inetd.conf # ssltst stream tcp nowait root /path/to/server.pl server.pl # /etc/services # ssltst 1234/tcp use Net::SSLeay qw(die_now die_if_ssl_error); Net::SSLeay::load_error_strings(); Net::SSLeay::SSLeay_add_ssl_algorithms(); Net::SSLeay::randomize(); chdir /key/dir or die “chdir: $!”; $| = 1; # Piping hot! open LOG, “>>/dev/console” or die “Cant open log file $!”; select LOG; print “server.pl started “; $ctx = Net::SSLeay::CTX_new() or die_now “CTX_new ($ctx) ($!)”; $ssl = Net::SSLeay::new($ctx) or die_now “new ($ssl) ($!)”; Net::SSLeay::set_options($ssl, &Net::SSLeay::OP_ALL) and die_if_ssl_error(“ssl set options”); # We get already open network connection from inetd, now we just # need to attach SSLeay to STDIN and STDOUT Net::SSLeay::set_rfd($ssl, fileno(STDIN)); Net::SSLeay::set_wfd($ssl, fileno(STDOUT)); Net::SSLeay::use_RSAPrivateKey_file ($ssl, plain-rsa.pem, Net::SSLeay::FILETYPE_PEM); die_if_ssl_error(“private key”); Net::SSLeay::use_certificate_file ($ssl, plain-cert.pem, Net::SSLeay::FILETYPE_PEM); die_if_ssl_error(“certificate”); Net::SSLeay::accept($ssl) and die_if_ssl_err(“ssl accept: $!”); print “Cipher `” . Net::SSLeay::get_cipher($ssl) . " “; $got = Net::SSLeay::read($ssl); die_if_ssl_error(“ssl read”); print “Got `$got (” . length ($got) . " chars) “; Net::SSLeay::write ($ssl, uc($got)) or die “write: $!”; die_if_ssl_error(“ssl write”); Net::SSLeay::free ($ssl); # Tear down the connection Net::SSLeay::CTX_free ($ctx); close LOG;

There are also a number of example/test programs in the examples directory:

sslecho.pl - A simple server, not unlike the one above minicli.pl - Implements a client using low level SSLeay routines sslcat.pl - Demonstrates using high level sslcat utility function get_page.pl - Is a utility for getting html pages from secure servers callback.pl - Demonstrates certificate verification and callback usage stdio_bulk.pl - Does SSL over Unix pipes ssl-inetd-serv.pl - SSL server that can be invoked from inetd.conf httpd-proxy-snif.pl - Utility that allows you to see how a browser sends https request to given server and what reply it gets back (very educative :-) makecert.pl - Creates a self signed cert (does not use this module)

INSTALLATION

See README and README.* in the distribution directory for installation guidance on a variety of platforms.

LIMITATIONS

Net::SSLeay::read() uses an internal buffer of 32KB, thus no single read will return more. In practice one read returns much less, usually as much as fits in one network packet. To work around this, you should use a loop like this:

$reply = ; while ($got = Net::SSLeay::read($ssl)) { last if print_errs(SSL_read); $reply .= $got; }

Although there is no built-in limit in Net::SSLeay::write(), the network packet size limitation applies here as well, thus use:

$written = 0; while ($written < length($message)) { $written += Net::SSLeay::write($ssl, substr($message, $written)); last if print_errs(SSL_write); }

Or alternatively you can just use the following convenience functions:

Net::SSLeay::ssl_write_all($ssl, $message) or die “ssl write failure”; $got = Net::SSLeay::ssl_read_all($ssl) or die “ssl read failure”;

KNOWN BUGS AND CAVEATS

LibreSSL versions in the 3.1 - 3.3 series contain a TLS 1.3 implementation that is not fully compatible with the libssl API, but is still advertised during protocol auto-negotiation. If you encounter problems or unexpected behaviour with SSL or SSL_CTX objects whose protocol version was automatically negotiated and libssl is provided by any of these versions of LibreSSL, it could be because the peers negotiated to use TLS 1.3 - try setting the maximum protocol version to TLS 1.2 (via Net::SSLeay::set_max_proto_version() or Net::SSLeay::CTX_set_max_proto_version()) before establishing the connection. The first stable LibreSSL version with a fully libssl-compatible TLS 1.3 implementation is 3.4.1.

An OpenSSL bug CVE-2015-0290 “OpenSSL Multiblock Corrupted Pointer Issue” can cause POST requests of over 90kB to fail or crash. This bug is reported to be fixed in OpenSSL 1.0.2a.

Autoloader emits a

Argument “xxx” isnt numeric in entersub at blib/lib/Net/SSLeay.pm

warning if die_if_ssl_error is made autoloadable. If you figure out why, drop me a line.

Callback set using SSL_set_verify() does not appear to work. This may well be an openssl problem (e.g. see ssl/ssl_lib.c line 1029). Try using SSL_CTX_set_verify() instead and do not be surprised if even this stops working in future versions.

Callback and certificate verification stuff is generally too little tested.

Random numbers are not initialized randomly enough, especially if you do not have /dev/random and/or /dev/urandom (such as in Solaris platforms - but it’s been suggested that cryptorand daemon from the SUNski package solves this). In this case you should investigate third party software that can emulate these devices, e.g. by way of a named pipe to some program.

Another gotcha with random number initialization is randomness depletion. This phenomenon, which has been extensively discussed in OpenSSL, Apache-SSL, and Apache-mod_ssl forums, can cause your script to block if you use /dev/random or to operate insecurely if you use /dev/urandom. What happens is that when too much randomness is drawn from the operating system’s randomness pool then randomness can temporarily be unavailable. /dev/random solves this problem by waiting until enough randomness can be gathered - and this can take a long time since blocking reduces activity in the machine and less activity provides less random events: a vicious circle. /dev/urandom solves this dilemma more pragmatically by simply returning predictable “random” numbers. Some /dev/urandom emulation software however actually seems to implement /dev/random semantics. Caveat emptor.

I’ve been pointed to two such daemons by Mik Firestone <mik@@speed.stdio._com> who has used them on Solaris 8:

  1. Entropy Gathering Daemon (EGD) at <https://egd.sourceforge.net/>

  2. Pseudo-random number generating daemon (PRNGD) at <https://prngd.sourceforge.net/>

If you are using the low level API functions to communicate with other SSL implementations, you would do well to call

Net::SSLeay::CTX_set_options($ctx, &Net::SSLeay::OP_ALL) or die_if_ssl_error(“ssl ctx set options”);

to cope with some well know bugs in some other SSL implementations. The high level API functions always set all known compatibility options.

Sometimes sslcat() (and the high level HTTPS functions that build on it) is too fast in signaling the EOF to legacy HTTPS servers. This causes the server to return empty page. To work around this problem you can set the global variable

$Net::SSLeay::slowly = 1; # Add sleep so broken servers can keep up

HTTP/1.1 is not supported. Specifically this module does not know to issue or serve multiple http requests per connection. This is a serious shortcoming, but using the SSL session cache on your server helps to alleviate the CPU load somewhat.

As of version 1.09 many newer OpenSSL auxiliary functions were added (from REM_AUTOMATICALLY_GENERATED_1_09 onwards in SSLeay.xs). Unfortunately I have not had any opportunity to test these. Some of them are trivial enough that I believe they “just work”, but others have rather complex interfaces with function pointers and all. In these cases you should proceed wit great caution.

This module defaults to using OpenSSL automatic protocol negotiation code for automatically detecting the version of the SSL/TLS protocol that the other end talks. With most web servers this works just fine, but once in a while I get complaints from people that the module does not work with some web servers. Usually this can be solved by explicitly setting the protocol version, e.g.

$Net::SSLeay::ssl_version = 2; # Insist on SSLv2 $Net::SSLeay::ssl_version = 3; # Insist on SSLv3 $Net::SSLeay::ssl_version = 10; # Insist on TLSv1 $Net::SSLeay::ssl_version = 11; # Insist on TLSv1.1 $Net::SSLeay::ssl_version = 12; # Insist on TLSv1.2 $Net::SSLeay::ssl_version = 13; # Insist on TLSv1.3

Although the autonegotiation is nice to have, the SSL standards do not formally specify any such mechanism. Most of the world has accepted the SSLeay/OpenSSL way of doing it as the de facto standard. But for the few that think differently, you have to explicitly speak the correct version. This is not really a bug, but rather a deficiency in the standards. If a site refuses to respond or sends back some nonsensical error codes (at the SSL handshake level), try this option before mailing me.

On some systems, OpenSSL may be compiled without support for SSLv2. If this is the case, Net::SSLeay will warn if ssl_version has been set to 2.

The high level API returns the certificate of the peer, thus allowing one to check what certificate was supplied. However, you will only be able to check the certificate after the fact, i.e. you already sent your form data by the time you find out that you did not trust them, oops.

So, while being able to know the certificate after the fact is surely useful, the security minded would still choose to do the connection and certificate verification first and only then exchange data with the site. Currently none of the high level API functions do this, thus you would have to program it using the low level API. A good place to start is to see how the Net::SSLeay::http_cat() function is implemented.

The high level API functions use a global file handle SSLCAT_S internally. This really should not be a problem because there is no way to interleave the high level API functions, unless you use threads (but threads are not very well supported in perl anyway). However, you may run into problems if you call undocumented internal functions in an interleaved fashion. The best solution is to “require Net::SSLeay” in one thread after all the threads have been created.

DIAGNOSTICS

Random number generator not seeded!!!
(W) This warning indicates that randomize() was not able to read /dev/random or /dev/urandom, possibly because your system does not have them or they are differently named. You can still use SSL, but the encryption will not be as strong.

open_tcp_connection: destination host not found:`server’ (port 123) ($!)
Name lookup for host named server failed.

open_tcp_connection: failed `server’, 123 ($!)
The name was resolved, but establishing the TCP connection failed.

msg 123: 1 - error:140770F8:SSL routines:SSL23_GET_SERVER_HELLO:unknown proto
SSLeay error string. The first number (123) is the PID, the second number (1) indicates the position of the error message in SSLeay error stack. You often see a pile of these messages as errors cascade.

msg 123: 1 - error:02001002::lib (2) :func (1) :reason (2)
The same as above, but you didn’t call load_error_strings() so SSLeay couldn’t verbosely explain the error. You can still find out what it means with this command: /usr/local/ssl/bin/ssleay errstr 02001002

Password is being asked for private key
This is normal behaviour if your private key is encrypted. Either you have to supply the password or you have to use an unencrypted private key. Scan OpenSSL.org for the FAQ that explains how to do this (or just study examples/makecert.pl which is used during make test to do just that).

SECURITY

You can mitigate some of the security vulnerabilities that might be present in your SSL/TLS application:

BEAST Attack

  • <https://web.archive.org/web/20140424022931/https://blogs.cisco.com/security/beat-the-beast-with-tls>

  • <https://community.qualys.com/blogs/securitylabs/2011/10/17/mitigating-the-beast-attack-on-tls>

  • <https://blog.zoller.lu/2011/09/beast-summary-tls-cbc-countermeasures.html>

The BEAST attack relies on a weakness in the way CBC mode is used in SSL/TLS. In OpenSSL versions 0.9.6d and later, the protocol-level mitigation is enabled by default, thus making it not vulnerable to the BEAST attack.

Solutions:

  • Compile with OpenSSL versions 0.9.6d or later, which enables SSL_OP_ALL by default

  • Ensure SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS is not enabled (its not enabled by default)

  • Don’t support SSLv2, SSLv3

  • Actively control the ciphers your server supports with set_cipher_list:

Net::SSLeay::set_cipher_list($ssl, RC4-SHA:HIGH:!ADH);

Session Resumption

  • <https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html>

The SSL Labs vulnerability test on your SSL server might report in red:

Session resumption No (IDs assigned but not accepted)

This report is not really bug or a vulnerability, since the server will not accept session resumption requests. However, you can prevent this noise in the report by disabling the session cache altogether:

Net::SSLeay::CTX_set_session_cache_mode($ssl_ctx, Net::SSLeay::SESS_CACHE_OFF()); # Use 0 if you dont have SESS_CACHE_OFF constant.

Secure Renegotiation and DoS Attack

  • <https://community.qualys.com/blogs/securitylabs/2011/10/31/tls-renegotiation-and-denial-of-service-attacks>

This is not a “security flaw,” it is more of a DoS vulnerability.

Solutions:

  • Do not support SSLv2

  • Do not set the SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION option

  • Compile with OpenSSL 0.9.8m or later

BUGS

If you encounter a problem with this module that you believe is a bug, please create a new issue <https://github.com/radiator-software/p5-net-ssleay/issues/new> in the Net-SSLeay GitHub repository. Please make sure your bug report includes the following information:

  • the code you are trying to run;

  • your operating system name and version;

  • the output of perl -V;

  • the version of OpenSSL or LibreSSL you are using.

AUTHOR

Originally written by Sampo Kellomäki.

Maintained by Florian Ragwitz between November 2005 and January 2010.

Maintained by Mike McCauley between November 2005 and June 2018.

Maintained by Tuure Vartiainen between June 2018 and July 2018.

Maintained by Chris Novakovic and Heikki Vatiainen since June 2018.

COPYRIGHT

Copyright (c) 1996-2003 Sampo Kellomäki <[email protected]>

Copyright (c) 2005-2010 Florian Ragwitz <[email protected]>

Copyright (c) 2005-2018 Mike McCauley <[email protected]>

Copyright (c) 2018 Tuure Vartiainen <[email protected]>

Copyright (c) 2018- Chris Novakovic <[email protected]>

Copyright (c) 2018- Heikki Vatiainen <[email protected]>

All rights reserved.

LICENSE

This module is released under the terms of the Artistic License 2.0. For details, see the LICENSE file distributed with Net-SSLeay’s source code.

SEE ALSO

Net::SSLeay::Handle - File handle interface ./examples - Example servers and a clients <https://www.openssl.org/> - OpenSSL source, documentation, etc [email protected] - General OpenSSL mailing list <https://www.ietf.org/rfc/rfc2246.txt> - TLS 1.0 specification <https://www.w3c.org> - HTTP specifications <https://www.ietf.org/rfc/rfc2617.txt> - How to send password <https://egd.sourceforge.net/> - Entropy Gathering Daemon (EGD) <https://prngd.sourceforge.net/> - pseudo-random number generating daemon (PRNGD) perl(1) perlref(1) perllol(1) perldoc ~openssl/doc/ssl/SSL_CTX_set_verify.pod

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2660 - Linux cli command ts_open

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ts_open and provides detailed information about the command ts_open, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ts_open.

NAME 🖥️ ts_open 🖥️

open a touch screen input device

SYNOPSIS

#include <tslib.h>

struct tsdev *ts_open(const char *dev_name, int nonblock);

DESCRIPTION

ts_open() allocates memory for a new touch screen device, opens and links the given input event device to it.

RETURN VALUE

A pointer to the opened struct tsdev is returned.

SEE ALSO

ts_setup(3), ts_close(3), ts_read(3), ts_config(3), ts.conf(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2661 - Linux cli command tanh

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tanh and provides detailed information about the command tanh, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tanh.

NAME 🖥️ tanh 🖥️

hyperbolic tangent function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double tanh(double x);
float tanhf(float x);
long double tanhl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

tanhf(), tanhl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the hyperbolic tangent of x, which is defined mathematically as:

    tanh(x) = sinh(x) / cosh(x)

RETURN VALUE

On success, these functions return the hyperbolic tangent of x.

If x is a NaN, a NaN is returned.

If x is +0 (-0), +0 (-0) is returned.

If x is positive infinity (negative infinity), +1 (-1) is returned.

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tanh(), tanhf(), tanhl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

SEE ALSO

acosh(3), asinh(3), atanh(3), cosh(3), ctanh(3), sinh(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2662 - Linux cli command ualarm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ualarm and provides detailed information about the command ualarm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ualarm.

NAME 🖥️ ualarm 🖥️

schedule signal after given number of microseconds

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
useconds_t ualarm(useconds_t usecs, useconds_t interval);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

ualarm():

    Since glibc 2.12:
        (_XOPEN_SOURCE >= 500) && ! (_POSIX_C_SOURCE >= 200809L)
            || /* glibc >= 2.19: */ _DEFAULT_SOURCE
            || /* glibc <= 2.19: */ _BSD_SOURCE
    Before glibc 2.12:
        _BSD_SOURCE || _XOPEN_SOURCE >= 500

DESCRIPTION

The ualarm() function causes the signal SIGALRM to be sent to the invoking process after (not less than) usecs microseconds. The delay may be lengthened slightly by any system activity or by the time spent processing the call or by the granularity of system timers.

Unless caught or ignored, the SIGALRM signal will terminate the process.

If the interval argument is nonzero, further SIGALRM signals will be sent every interval microseconds after the first.

RETURN VALUE

This function returns the number of microseconds remaining for any alarm that was previously set, or 0 if no alarm was pending.

ERRORS

EINTR
Interrupted by a signal; see signal(7).

EINVAL
usecs or interval is not smaller than 1000000. (On systems where that is considered an error.)

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

ualarm()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

4.3BSD, POSIX.1-2001. POSIX.1-2001 marks it as obsolete. Removed in POSIX.1-2008.

4.3BSD, SUSv2, and POSIX do not define any errors.

POSIX.1-2001 does not specify what happens if the usecs argument is 0. On Linux (and probably most other systems), the effect is to cancel any pending alarm.

The type useconds_t is an unsigned integer type capable of holding integers in the range [0,1000000]. On the original BSD implementation, and in glibc before glibc 2.1, the arguments to ualarm() were instead typed as unsigned int. Programs will be more portable if they never mention useconds_t explicitly.

The interaction of this function with other timer functions such as alarm(2), sleep(3), nanosleep(2), setitimer(2), timer_create(2), timer_delete(2), timer_getoverrun(2), timer_gettime(2), timer_settime(2), usleep(3) is unspecified.

This function is obsolete. Use setitimer(2) or POSIX interval timers (timer_create(2), etc.) instead.

SEE ALSO

alarm(2), getitimer(2), nanosleep(2), select(2), setitimer(2), usleep(3), time(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2663 - Linux cli command zip_dir_add

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_dir_add and provides detailed information about the command zip_dir_add, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_dir_add.

libzip (-lzip)

The function

adds a directory to a zip archive. The argument

specifies the zip archive to which the directory should be added.

is the directory’s name in the zip archive.

This function adds an entry to the archive. It does not check whether a directory with that name exists in the file system, nor does it add its contents if it does. The

argument can be any of:

Guess encoding of

(default).

Interpret

as UTF-8.

Interpret

as code page 437 (CP-437).

Upon successful completion, the index of the new entry in the archive is returned. Otherwise, -1 is returned and the error code in

is set to indicate the error.

fails if:

There is already an entry called

in the archive.

or

are

or invalid UTF-8 encoded file names.

Required memory could not be allocated.

was added in libzip 0.11.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2664 - Linux cli command XtOverrideTranslations

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtOverrideTranslations and provides detailed information about the command XtOverrideTranslations, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtOverrideTranslations.

NAME 🖥️ XtOverrideTranslations 🖥️

manage translation tables

SYNTAX

#include <X11/Intrinsic.h>

XtTranslations XtParseTranslationTable(const char *table);

void XtAugmentTranslations(Widget w, XtTranslations translations);

void XtOverrideTranslations(Widget w, XtTranslations translations);

void XtUninstallTranslations(Widget w);

ARGUMENTS

table
Specifies the translation table to compile.

translations
Specifies the compiled translation table to merge in (must not be NULL).

  1. Specifies the widget into which the new translations are to be merged or removed.

DESCRIPTION

The XtParseTranslationTable function compiles the translation table into the opaque internal representation of type XtTranslations. Note that if an empty translation table is required for any purpose, one can be obtained by calling XtParseTranslationTable and passing an empty string.

The XtAugmentTranslations function nondestructively merges the new translations into the existing widget translations. If the new translations contain an event or event sequence that already exists in the widget’s translations, the new translation is ignored.

The XtOverrideTranslations function destructively merges the new translations into the existing widget translations. If the new translations contain an event or event sequence that already exists in the widget’s translations, the new translation is merged in and override the widget’s translation.

To replace a widget’s translations completely, use XtSetValues on the XtNtranslations resource and specify a compiled translation table as the value.

The XtUninstallTranslations function causes the entire translation table for widget to be removed.

SEE ALSO

XtAppAddActions(3), XtCreatePopupShell(3), XtParseAcceleratorTable(3), XtPopup(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2665 - Linux cli command Net_DNS_RR_SPFpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_SPFpm and provides detailed information about the command Net_DNS_RR_SPFpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_SPFpm.

NAME 🖥️ Net_DNS_RR_SPFpm 🖥️

DNS SPF resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name SPF spfdata …); $rr = Net::DNS::RR->new( name => name, type => SPF, spfdata => single text string ); $rr = Net::DNS::RR->new( name => name, type => SPF, spfdata => [ multiple, strings, … ] );

DESCRIPTION

Class for DNS Sender Policy Framework (SPF) resource records.

SPF records inherit most of the properties of the Net::DNS::RR::TXT class.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

spfdata

txtdata

$string = $rr->spfdata; @list = $rr->spfdata; $rr->spfdata( @list );

When invoked in scalar context, spfdata() returns the policy text as a single string, with text elements concatenated without intervening spaces.

In a list context, spfdata() returns a list of the text elements.

COPYRIGHT

Copyright (c)2005 Olaf Kolkman, NLnet Labs.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR Net::DNS::RR::TXT RFC7208 <https://tools.ietf.org/html/rfc7208>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2666 - Linux cli command strtold

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strtold and provides detailed information about the command strtold, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strtold.

NAME 🖥️ strtold 🖥️

convert ASCII string to floating-point number

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
double strtod(const char *restrict nptr, char **restrict endptr);
float strtof(const char *restrict nptr, char **restrict endptr);
long double strtold(const char *restrict nptr",char**restrict"endptr);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strtof(), strtold():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The strtod(), strtof(), and strtold() functions convert the initial portion of the string pointed to by nptr to double, float, and long double representation, respectively.

The expected form of the (initial portion of the) string is optional leading white space as recognized by isspace(3), an optional plus (’+’) or minus sign (’-’) and then either (i) a decimal number, or (ii) a hexadecimal number, or (iii) an infinity, or (iv) a NAN (not-a-number).

A decimal number consists of a nonempty sequence of decimal digits possibly containing a radix character (decimal point, locale-dependent, usually ‘.’), optionally followed by a decimal exponent. A decimal exponent consists of an ‘E’ or ’e’, followed by an optional plus or minus sign, followed by a nonempty sequence of decimal digits, and indicates multiplication by a power of 10.

A hexadecimal number consists of a “0x” or “0X” followed by a nonempty sequence of hexadecimal digits possibly containing a radix character, optionally followed by a binary exponent. A binary exponent consists of a ‘P’ or ‘p’, followed by an optional plus or minus sign, followed by a nonempty sequence of decimal digits, and indicates multiplication by a power of 2. At least one of radix character and binary exponent must be present.

An infinity is either “INF” or “INFINITY”, disregarding case.

A NAN is “NAN” (disregarding case) optionally followed by a string, (n-char-sequence), where n-char-sequence specifies in an implementation-dependent way the type of NAN (see NOTES).

RETURN VALUE

These functions return the converted value, if any.

If endptr is not NULL, a pointer to the character after the last character used in the conversion is stored in the location referenced by endptr.

If no conversion is performed, zero is returned and (unless endptr is null) the value of nptr is stored in the location referenced by endptr.

If the correct value would cause overflow, plus or minus HUGE_VAL, HUGE_VALF, or HUGE_VALL is returned (according to the return type and sign of the value), and ERANGE is stored in errno.

If the correct value would cause underflow, a value with magnitude no larger than DBL_MIN, FLT_MIN, or LDBL_MIN is returned and ERANGE is stored in errno.

ERRORS

ERANGE
Overflow or underflow occurred.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strtod(), strtof(), strtold()

Thread safetyMT-Safe locale

VERSIONS

In the glibc implementation, the n-char-sequence that optionally follows “NAN” is interpreted as an integer number (with an optional ‘0’ or ‘0x’ prefix to select base 8 or 16) that is to be placed in the mantissa component of the returned value.

STANDARDS

C11, POSIX.1-2008.

HISTORY

strtod()
C89, POSIX.1-2001.

strtof()
strtold()
C99, POSIX.1-2001.

NOTES

Since 0 can legitimately be returned on both success and failure, the calling program should set errno to 0 before the call, and then determine if an error occurred by checking whether errno has a nonzero value after the call.

EXAMPLES

See the example on the strtol(3) manual page; the use of the functions described in this manual page is similar.

SEE ALSO

atof(3), atoi(3), atol(3), nan(3), nanf(3), nanl(3), strfromd(3), strtol(3), strtoul(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2667 - Linux cli command XtIsRealized

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtIsRealized and provides detailed information about the command XtIsRealized, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtIsRealized.

NAME 🖥️ XtIsRealized 🖥️

realize and unrealize widgets

SYNTAX

#include <X11/Intrinsic.h>

void XtRealizeWidget(Widget w);

Boolean XtIsRealized(Widget w);

void XtUnrealizeWidget(Widget w);

ARGUMENTS

  1. Specifies the widget.

DESCRIPTION

If the widget is already realized, XtRealizeWidget simply returns. Otherwise, it performs the following:

  • Binds all action names in the widget’s translation table to procedures (see Section 10.1.2).

  • Makes a post-order traversal of the widget tree rooted at the specified widget and calls the change_managed procedure of each composite widget that has one or more managed children.

  • Constructs an XSetWindowAttributes structure filled in with information derived from the Core widget fields and calls the realize procedure for the widget, which adds any widget-specific attributes and creates the X window.

  • If the widget is not a subclass of compositeWidgetClass, XtRealizeWidget returns; otherwise, it continues and performs the following:

    • Descends recursively to each of the widget’s managed children and calls the realize procedures. Primitive widgets that instantiate children are responsible for realizing those children themselves.

    • Maps all of the managed children windows that have mapped_when_managed True. (If a widget is managed but mapped_when_managed is False, the widget is allocated visual space but is not displayed. Some people seem to like this to indicate certain states.)

If the widget is a top-level shell widget (that is, it has no parent), and mapped_when_managed is True, XtRealizeWidget maps the widget window.

The XtIsRealized function returns True if the widget has been realized, that is, if the widget has a nonzero X window ID.

Some widget procedures (for example, set_values) might wish to operate differently after the widget has been realized.

The XtUnrealizeWidget function destroys the windows of an existing widget and all of its children (recursively down the widget tree). To recreate the windows at a later time, call XtRealizeWidget again. If the widget was managed, it will be unmanaged automatically before its window is freed.

SEE ALSO

XtManageChildren(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2668 - Linux cli command XtRemoveActionHook

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtRemoveActionHook and provides detailed information about the command XtRemoveActionHook, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtRemoveActionHook.

NAME 🖥️ XtRemoveActionHook 🖥️

register an action hook procedure

SYNTAX

#include <X11/Intrinsic.h>

XtActionHookId XtAppAddActionHook(XtAppContext app_context, XtActionHookProc proc, XtPointer client_data);

void XtRemoveActionHook(XtActionHookId id);

ARGUMENTS

app_context
Specifies the application context.

proc
Specifies the action hook procedure.

num_args
Specifies the application-specific data to be passed to the action hook.

DESCRIPTION

XtAppAddActionHook adds the specified procedure to the front of a list maintained in the application context. In the future, when an action routine is about to be invoked for any widget in this application context, either through the translation manager or via XtCallActionProc, the action hohok procedures will be called in reverse order of registration jut prior to invoking the action routine.

Action hook procedures are removed automatically and the XtActionHookId s destroyed when the application context in which they were added is destroyed.

XtRemoveActionHook removes the specified action hook procedure from the list in which it was registered.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2669 - Linux cli command IO_Socket_SSL_Interceptpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_Socket_SSL_Interceptpm and provides detailed information about the command IO_Socket_SSL_Interceptpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_Socket_SSL_Interceptpm.

NAME 🖥️ IO_Socket_SSL_Interceptpm 🖥️

  • SSL interception (man in the middle)

SYNOPSIS

use IO::Socket::SSL::Intercept; # create interceptor with proxy certificates my $mitm = IO::Socket::SSL::Intercept->new( proxy_cert_file => proxy_cert.pem, proxy_key_file => proxy_key.pem, … ); my $listen = IO::Socket::INET->new( LocalAddr => .., Listen => .. ); while (1) { # TCP accept new client my $client = $listen->accept or next; # SSL connect to server my $server = IO::Socket::SSL->new( PeerAddr => .., SSL_verify_mode => …, … ) or die “ssl connect failed: $!,$SSL_ERROR”; # clone server certificate my ($cert,$key) = $mitm->clone_cert( $server->peer_certificate ); # and upgrade client side to SSL with cloned certificate IO::Socket::SSL->start_SSL($client, SSL_server => 1, SSL_cert => $cert, SSL_key => $key ) or die “upgrade failed: $SSL_ERROR”; # now transfer data between $client and $server and analyze # the unencrypted data … }

DESCRIPTION

This module provides functionality to clone certificates and sign them with a proxy certificate, thus making it easy to intercept SSL connections (man in the middle). It also manages a cache of the generated certificates.

How Intercepting SSL Works

Intercepting SSL connections is useful for analyzing encrypted traffic for security reasons or for testing. It does not break the end-to-end security of SSL, e.g. a properly written client will notice the interception unless you explicitly configure the client to trust your interceptor. Intercepting SSL works the following way:

  • Create a new CA certificate, which will be used to sign the cloned certificates. This proxy CA certificate should be trusted by the client, or (a properly written client) will throw error messages or deny the connections because it detected a man in the middle attack. Due to the way the interception works there no support for client side certificates is possible. Using openssl such a proxy CA certificate and private key can be created with: openssl genrsa -out proxy_key.pem 1024 openssl req -new -x509 -extensions v3_ca -key proxy_key.pem -out proxy_cert.pem # export as PKCS12 for import into browser openssl pkcs12 -export -in proxy_cert.pem -inkey proxy_key.pem -out proxy_cert.p12

  • Configure client to connect to use intercepting proxy or somehow redirect connections from client to the proxy (e.g. packet filter redirects, ARP or DNS spoofing etc).

  • Accept the TCP connection from the client, e.g. don’t do any SSL handshakes with the client yet.

  • Establish the SSL connection to the server and verify the servers certificate as usually. Then create a new certificate based on the original servers certificate, but signed by your proxy CA. This is the step where IO::Socket::SSL::Intercept helps.

  • Upgrade the TCP connection to the client to SSL using the cloned certificate from the server. If the client trusts your proxy CA it will accept the upgrade to SSL.

  • Transfer data between client and server. While the connections to client and server are both encrypted with SSL you will read/write the unencrypted data in your proxy application.

METHODS

IO::Socket::SSL::Intercept helps creating the cloned certificate with the following methods:

$mitm = IO::Socket::SSL::Intercept->new(%args)
This creates a new interceptor object. %args should be

proxy_cert X509 | proxy_cert_file filename
This is the proxy certificate. It can be either given by an X509 object from Net::SSLeays internal representation, or using a file in PEM format.

proxy_key EVP_PKEY | proxy_key_file filename
This is the key for the proxy certificate. It can be either given by an EVP_PKEY object from Net::SSLeays internal representation, or using a file in PEM format. The key should not have a passphrase.

pubkey EVP_PKEY | pubkey_file filename
This optional argument specifies the public key used for the cloned certificate. It can be either given by an EVP_PKEY object from Net::SSLeays internal representation, or using a file in PEM format. If not given it will create a new public key on each call of new.

serial INTEGER|CODE
This optional argument gives the starting point for the serial numbers of the newly created certificates. If not set the serial number will be created based on the digest of the original certificate. If the value is code it will be called with serial(original_cert,CERT_asHash(original_cert)) and should return the new serial number.

cache HASH | SUBROUTINE
This optional argument gives a way to cache created certificates, so that they don’t get recreated on future accesses to the same host. If the argument ist not given an internal HASH ist used. If the argument is a hash it will store for each generated certificate a hash reference with cert and atime in the hash, where atime is the time of last access (to expire unused entries) and cert is the certificate. Please note, that the certificate is in Net::SSLeays internal X509 format and can thus not be simply dumped and restored. The key for the hash is an ident either given to clone_cert or generated from the original certificate. If the argument is a subroutine it will be called as $cache->(ident,sub). This call should return either an existing (cached) (cert,key) or call sub without arguments to create a new (cert,key), store it and return it. If called with $cache->(type) the function should just return 1 to signal that it supports the current type of cache. If it returns nothing instead the older cache interface is assumed for compatibility reasons.

($clone_cert,$key) = $mitm->clone_cert($original_cert,[ $ident ])
This clones the given certificate. An ident as the key into the cache can be given (like host:port), if not it will be created from the properties of the original certificate. It returns the cloned certificate and its key (which is the same for alle created certificates).

$string = $mitm->serialize
This creates a serialized version of the object (e.g. a string) which can then be used to persistently store created certificates over restarts of the application. The cache will only be serialized if it is a HASH. To work together with Storable the STORABLE_freeze function is defined to call serialize.

$mitm = IO::Socket::SSL::Intercept->unserialize($string)
This restores an Intercept object from a serialized string. To work together with Storable the STORABLE_thaw function is defined to call unserialize.

AUTHOR

Steffen Ullrich

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2670 - Linux cli command qfcvt_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command qfcvt_r and provides detailed information about the command qfcvt_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the qfcvt_r.

NAME 🖥️ qfcvt_r 🖥️

convert a floating-point number to a string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
[[deprecated]] int ecvt_r(double number, int ndigits,
 int *restrict decpt, int *restrict sign,
 char *restrict buf, size_t len);
[[deprecated]] int fcvt_r(double number, int ndigits,
 int *restrict decpt, int *restrict sign,
 char *restrict buf, size_t len);
[[deprecated]] int qecvt_r(long double number, int ndigits,
 int *restrict decpt, int *restrict sign,
 char *restrict buf, size_t len);
[[deprecated]] int qfcvt_r(long double number, int ndigits,
 int *restrict decpt, int *restrict sign,
 char *restrict buf, size_t len);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

ecvt_r(), fcvt_r(), qecvt_r(), qfcvt_r():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

The functions ecvt_r(), fcvt_r(), qecvt_r(), and qfcvt_r() are identical to ecvt(3), fcvt(3), qecvt(3), and qfcvt(3), respectively, except that they do not return their result in a static buffer, but instead use the supplied buf of size len. See ecvt(3) and qecvt(3).

RETURN VALUE

These functions return 0 on success, and -1 otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

ecvt_r(), fcvt_r(), qecvt_r(), qfcvt_r()

Thread safetyMT-Safe

STANDARDS

GNU.

NOTES

These functions are obsolete. Instead, sprintf(3) is recommended.

SEE ALSO

ecvt(3), qecvt(3), sprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2671 - Linux cli command Regexp_Common_listpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_listpm and provides detailed information about the command Regexp_Common_listpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_listpm.

NAME 🖥️ Regexp_Common_listpm 🖥️

  • provide regexes for lists

SYNOPSIS

use Regexp::Common qw /list/; while (<>) { /$RE{list}{-pat => \w+}/ and print “List of words”; /$RE{list}{-pat => $RE{num}{real}}/ and print “List of numbers”; }

DESCRIPTION

Please consult the manual of Regexp::Common for a general description of the works of this interface.

Do not use this module directly, but load it via Regexp::Common.

“$RE{list}{-pat}{-sep}{-lastsep}”

Returns a pattern matching a list of (at least two) substrings.

If -pat=P is specified, it defines the pattern for each substring in the list. By default, P is qr/.*?\S/. In Regexp::Common 0.02 or earlier, the default pattern was qr/.*?/. But that will match a single space, causing unintended parsing of a, b, and c as a list of four elements instead of 3 (with -word being (?:and)). One consequence is that a list of the form “a,,b” will no longer be parsed. Use the pattern qr /.*?/ to be able to parse this, but see the previous remark.

If -sep=P is specified, it defines the pattern P to be used as a separator between each pair of substrings in the list, except the final two. By default P is qr/\s*,\s*/.

If -lastsep=P is specified, it defines the pattern P to be used as a separator between the final two substrings in the list. By default P is the same as the pattern specified by the -sep flag.

For example:

$RE{list}{-pat=>\w+} # match a list of word chars $RE{list}{-pat=>$RE{num}{real}} # match a list of numbers $RE{list}{-sep=>" “} # match a tab-separated list $RE{list}{-lastsep=>,\s+and\s+} # match a proper English list

Under -keep:

$1
captures the entire list

$2
captures the last separator

“$RE{list}{conj}{-word=PATTERN}”

An alias for $RE{list}{-lastsep=>\s*,?\s*PATTERN\s*}

If -word is not specified, the default pattern is qr/and|or/.

For example:

$RE{list}{conj}{-word=>et} # match Jean, Paul, et Satre $RE{list}{conj}{-word=>oder} # match Bonn, Koln oder Hamburg

“$RE{list}{and}”

An alias for $RE{list}{conj}{-word=>and}

“$RE{list}{or}”

An alias for $RE{list}{conj}{-word=>or}

SEE ALSO

Regexp::Common for a general description of how to use this interface.

AUTHOR

Damian Conway ([email protected])

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

For a start, there are many common regexes missing. Send them in to [email protected].

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2672 - Linux cli command ts_config

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ts_config and provides detailed information about the command ts_config, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ts_config.

NAME 🖥️ ts_config 🖥️

read tslib’s configuration

SYNOPSIS

#include <tslib.h>

int ts_config(struct tsdev *dev);

int ts_reconfig(struct tsdev *dev);

DESCRIPTION

ts_config() loads and initialises all modules configured in the tslib configuration file TSLIB_CONFFILE , see ts.conf (5). ts_reconfig() re-runs ts_config and updates the configuration if the configuration file has changed.

RETURN VALUE

Zero is returned on success. A negative value is returned in case of an error.

SEE ALSO

ts_read(3), ts_open(3), ts_setup(3), ts_close(3), ts.conf(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2673 - Linux cli command XtInstallAccelerators

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtInstallAccelerators and provides detailed information about the command XtInstallAccelerators, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtInstallAccelerators.

NAME 🖥️ XtInstallAccelerators 🖥️

managing accelerator tables

SYNTAX

#include <X11/Intrinsic.h>

XtAccelerators XtParseAcceleratorTable(const char * source);

void XtInstallAccelerators(Widget destination, Widget source);

void XtInstallAllAccelerators(Widget destination, Widget source);

ARGUMENTS

source
Specifies the accelerator table to compile.

destination
Specifies the widget on which the accelerators are to be installed.

source
Specifies the widget or the root widget of the widget tree from which the accelerators are to come.

DESCRIPTION

The XtParseAcceleratorTable function compiles the accelerator table into the opaque internal representation.

The XtInstallAccelerators function installs the accelerators from source onto destination by augmenting the destination translations with the source accelerators. If the source display_accelerator method is non-NULL, XtInstallAccelerators calls it with the source widget and a string representation of the accelerator table, which indicates that its accelerators have been installed and that it should display them appropriately. The string representation of the accelerator table is its canonical translation table representation.

The XtInstallAllAccelerators function recursively descends the widget tree rooted at source and installs the accelerators of each widget encountered onto destination. A common use os to call XtInstallAllAccelerators and pass the application main window as the source.

SEE ALSO

XtParseTranslationTable(1)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2674 - Linux cli command ntp_gettime

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ntp_gettime and provides detailed information about the command ntp_gettime, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ntp_gettime.

NAME 🖥️ ntp_gettime 🖥️

get time parameters (NTP daemon interface)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/timex.h>
int ntp_gettime(struct ntptimeval *ntv);
int ntp_gettimex(struct ntptimeval *ntv);

DESCRIPTION

Both of these APIs return information to the caller via the ntv argument, a structure of the following type:

struct ntptimeval {
    struct timeval time;    /* Current time */
    long maxerror;          /* Maximum error */
    long esterror;          /* Estimated error */
    long tai;               /* TAI offset */
    /* Further padding bytes allowing for future expansion */
};

The fields of this structure are as follows:

time
The current time, expressed as a timeval structure:

struct timeval {
    time_t      tv_sec;   /* Seconds since the Epoch */
    suseconds_t tv_usec;  /* Microseconds */
};

maxerror
Maximum error, in microseconds. This value can be initialized by ntp_adjtime(3), and is increased periodically (on Linux: each second), but is clamped to an upper limit (the kernel constant NTP_PHASE_MAX, with a value of 16,000).

esterror
Estimated error, in microseconds. This value can be set via ntp_adjtime(3) to contain an estimate of the difference between the system clock and the true time. This value is not used inside the kernel.

tai
TAI (Atomic International Time) offset.

ntp_gettime() returns an ntptimeval structure in which the time, maxerror, and esterror fields are filled in.

ntp_gettimex() performs the same task as ntp_gettime(), but also returns information in the tai field.

RETURN VALUE

The return values for ntp_gettime() and ntp_gettimex() are as for adjtimex(2). Given a correct pointer argument, these functions always succeed.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

ntp_gettime(), ntp_gettimex()

Thread safetyMT-Safe

STANDARDS

ntp_gettime()
NTP Kernel Application Program Interface.

ntp_gettimex()
GNU.

HISTORY

ntp_gettime()
glibc 2.1.

ntp_gettimex()
glibc 2.12.

SEE ALSO

adjtimex(2), ntp_adjtime(3), time(7)

NTP “Kernel Application Program Interface”

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2675 - Linux cli command pcap_filepcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_filepcap and provides detailed information about the command pcap_filepcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_filepcap.

NAME 🖥️ pcap_filepcap 🖥️

get the standard I/O stream for a savefile being read

SYNOPSIS

#include <pcap/pcap.h>
FILE *pcap_file(pcap_t *p);

DESCRIPTION

pcap_file() returns the standard I/O stream of the ``savefile,’’ if a ``savefile’’ was opened with pcap_open_offline(3PCAP), or NULL, if a network device was opened with pcap_create(3PCAP) and pcap_activate(3PCAP), or with pcap_open_live(3PCAP).

Note that the Packet Capture library is usually built with large file support, so the standard I/O stream of the ``savefile’’ might refer to a file larger than 2 gigabytes; applications that use pcap_file() should, if possible, use calls that support large files on the return value of pcap_file() or the value returned by fileno(3) when passed the return value of pcap_file().

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2676 - Linux cli command Sub_Exporter_Utilpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Sub_Exporter_Utilpm and provides detailed information about the command Sub_Exporter_Utilpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Sub_Exporter_Utilpm.

NAME 🖥️ Sub_Exporter_Utilpm 🖥️

utilities to make Sub::Exporter easier

VERSION

version 0.990

DESCRIPTION

This module provides a number of utility functions for performing common or useful operations when setting up a Sub::Exporter configuration. All of the utilities may be exported, but none are by default.

PERL VERSION

This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years.

Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl.

THE UTILITIES

curry_method

exports => { some_method => curry_method, }

This utility returns a generator which will produce an invocant-curried version of a method. In other words, it will export a method call with the exporting class built in as the invocant.

A module importing the code some the above example might do this:

use Some::Module qw(some_method); my $x = some_method;

This would be equivalent to:

use Some::Module; my $x = Some::Module->some_method;

If Some::Module is subclassed and the subclass’s import method is called to import some_method, the subclass will be curried in as the invocant.

If an argument is provided for curry_method it is used as the name of the curried method to export. This means you could export a Widget constructor like this:

exports => { widget => curry_method(new) }

This utility may also be called as curry_class, for backwards compatibility.

curry_chain

curry_chain behaves like "curry_method", but is meant for generating exports that will call several methods in succession.

exports => { reticulate => curry_chain( new => gather_data => analyze => [ detail => 100 ] => results ), }

If imported from Spliner, calling the reticulate routine will be equivalent to:

Spliner->new->gather_data->analyze(detail => 100)->results;

If any method returns something on which methods may not be called, the routine croaks.

The arguments to curry_chain form an optlist. The names are methods to be called and the arguments, if given, are arrayrefs to be dereferenced and passed as arguments to those methods. curry_chain returns a generator like those expected by Sub::Exporter.

Achtung! at present, there is no way to pass arguments from the generated routine to the method calls. This will probably be solved in future revisions by allowing the opt list’s values to be subroutines that will be called with the generated routine’s stack.

merge_col

exports => { merge_col(defaults => { twiddle => \twiddle_gen, tweak => \_tweak_gen, }), }

This utility wraps the given generator in one that will merge the named collection into its args before calling it. This means that you can support a default collector in multiple exports without writing the code each time.

You can specify as many pairs of collection names and generators as you like.

mixin_installer

use Sub::Exporter -setup => { installer => Sub::Exporter::Util::mixin_installer, exports => [ qw(foo bar baz) ], };

This utility returns an installer that will install into a superclass and adjust the ISA importing class to include the newly generated superclass.

If the target of importing is an object, the hierarchy is reversed: the new class will be ISA the object’s class, and the object will be reblessed.

Prerequisites: This utility requires that Package::Generator be installed.

like

It’s a collector that adds imports for anything like given regex.

If you provide this configuration:

exports => [ qw(igrep imap islurp exhausted) ], collectors => { -like => Sub::Exporter::Util::like },

A user may import from your module like this:

use Your::Iterator -like => qr/^i/; # imports igre, imap, islurp

or

use Your::Iterator -like => [ qr/^i/ => { -prefix => your_ } ];

The group-like prefix and suffix arguments are respected; other arguments are passed on to the generators for matching exports.

AUTHOR

Ricardo Signes <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 2007 by Ricardo Signes.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2677 - Linux cli command XtCheckSubclass

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtCheckSubclass and provides detailed information about the command XtCheckSubclass, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtCheckSubclass.

NAME 🖥️ XtCheckSubclass 🖥️

obtain and verify a widget’s class

SYNTAX

#include <X11/Intrinsic.h>

WidgetClass XtClass(Widget w);

WidgetClass XtSuperclass(Widget w);

Boolean XtIsSubclass(Widget w, WidgetClass widget_class);

void XtCheckSubclass(Widget widget, WidgetClass widget_class, String message);

Boolean XtIsObject(Widget w);

Boolean XtIsRectObj(Widget w);

Boolean XtIsWidget(Widget w);

Boolean XtIsComposite(Widget w);

Boolean XtIsConstraint(Widget w);

Boolean XtIsShell(Widget w);

Boolean XtIsOverrideShell(Widget w);

Boolean XtIsWMShell(Widget w);

Boolean XtIsVendorShell(Widget w);

Boolean XtIsTransientShell(Widget w);

Boolean XtIsTopLevelShell(Widget w);

Boolean XtIsApplicationShell(Widget w);

Boolean XtIsSessionShell(Widget w);

ARGUMENTS

  1. Specifies the widget.

widget_class
Specifies the widget class.

message
Specifies the message that is to be used.

DESCRIPTION

The XtClass function returns a pointer to the widget’s class structure.

The XtSuperclass function returns a pointer to the widget’s superclass class structure.

The XtIsSubclass function returns True if the class of the specified widget is equal to or is a subclass of the specified class. The widget’s class can be any number of subclasses down the chain and need not be an immediate subclass of the specified class. Composite widgets that need to restrict the class of the items they contain can use XtIsSubclass to find out if a widget belongs to the desired class of objects.

The XtCheckSubclass macro determines if the class of the specified widget is equal to or is a subclass of the specified widget class. The widget can be any number of subclasses down the chain and need not be an immediate subclass of the specified widget class. If the specified widget is not a subclass, XtCheckSubclass constructs an error message from the supplied message, the widget’s actual class, and the expected class and calls XtErrorMsg. XtCheckSubclass should be used at the entry point of exported routines to ensure that the client has passed in a valid widget class for the exported operation.

XtCheckSubclass is only executed when the widget has been compiled with the compiler symbol DEBUG defined; otherwise, it is defined as the empty string and generates no code.

To test if a given widget belongs to a subclass of an Intrinsics-defined class, the Intrinsics defines macros or functions equivalent to XtIsSubclass for each of the built-in classes. These procedures are XtIsObject, XtIsRectObj, XtIsWidget, XtIsComposite, XtIsConstraint, XtIsShell, XtIsOverrideShell, XtIsWMShell, XtIsVendorShell, XtIsTransientShell, XtIsTopLevelShell, XtIsApplicationShell, and XtIsSessionShell.

The

SEE ALSO

XtAppErrorMsg(3), XtDisplay(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2678 - Linux cli command zip_source_seek_write

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_seek_write and provides detailed information about the command zip_source_seek_write, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_seek_write.

libzip (-lzip)

The function

sets the current write offset for

Just like in

depending on the

argument, the

is counted relative from:

start of file

current write offset in file

end of file

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2679 - Linux cli command getutxent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getutxent and provides detailed information about the command getutxent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getutxent.

NAME 🖥️ getutxent 🖥️

access utmp file entries

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <utmp.h>
struct utmp *getutent(void);
struct utmp *getutid(const struct utmp *ut);
struct utmp *getutline(const struct utmp *ut);
struct utmp *pututline(const struct utmp *ut);
void setutent(void);
void endutent(void);
int utmpname(const char *file);

DESCRIPTION

New applications should use the POSIX.1-specified “utmpx” versions of these functions; see STANDARDS.

utmpname() sets the name of the utmp-format file for the other utmp functions to access. If utmpname() is not used to set the filename before the other functions are used, they assume _PATH_UTMP, as defined in <paths.h>.

setutent() rewinds the file pointer to the beginning of the utmp file. It is generally a good idea to call it before any of the other functions.

endutent() closes the utmp file. It should be called when the user code is done accessing the file with the other functions.

getutent() reads a line from the current file position in the utmp file. It returns a pointer to a structure containing the fields of the line. The definition of this structure is shown in utmp(5).

getutid() searches forward from the current file position in the utmp file based upon ut. If ut->ut_type is one of RUN_LVL, BOOT_TIME, NEW_TIME, or OLD_TIME, getutid() will find the first entry whose ut_type field matches ut->ut_type. If ut->ut_type is one of INIT_PROCESS, LOGIN_PROCESS, USER_PROCESS, or DEAD_PROCESS, getutid() will find the first entry whose ut_id field matches ut->ut_id.

getutline() searches forward from the current file position in the utmp file. It scans entries whose ut_type is USER_PROCESS or LOGIN_PROCESS and returns the first one whose ut_line field matches ut->ut_line.

pututline() writes the utmp structure ut into the utmp file. It uses getutid() to search for the proper place in the file to insert the new entry. If it cannot find an appropriate slot for ut, pututline() will append the new entry to the end of the file.

RETURN VALUE

getutent(), getutid(), and getutline() return a pointer to a struct utmp on success, and NULL on failure (which includes the “record not found” case). This struct utmp is allocated in static storage, and may be overwritten by subsequent calls.

On success pututline() returns ut; on failure, it returns NULL.

utmpname() returns 0 if the new name was successfully stored, or -1 on failure.

On failure, these functions errno set to indicate the error.

ERRORS

ENOMEM
Out of memory.

ESRCH
Record not found.

setutent(), pututline(), and the getut*() functions can also fail for the reasons described in open(2).

FILES

/var/run/utmp
database of currently logged-in users

/var/log/wtmp
database of past user logins

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getutent()

Thread safety

MT-Unsafe init race:utent race:utentbuf sig:ALRM timer

getutid(), getutline()

Thread safety

MT-Unsafe init race:utent sig:ALRM timer

pututline()

Thread safety

MT-Unsafe race:utent sig:ALRM timer

setutent(), endutent(), utmpname()

Thread safetyMT-Unsafe race:utent

In the above table, utent in race:utent signifies that if any of the functions setutent(), getutent(), getutid(), getutline(), pututline(), utmpname(), or endutent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

None.

HISTORY

XPG2, SVr4.

In XPG2 and SVID 2 the function pututline() is documented to return void, and that is what it does on many systems (AIX, HP-UX). HP-UX introduces a new function _pututline() with the prototype given above for pututline().

All these functions are obsolete now on non-Linux systems. POSIX.1-2001 and POSIX.1-2008, following SUSv1, does not have any of these functions, but instead uses

#include <utmpx.h> struct utmpx *getutxent(void); struct utmpx *getutxid(const struct utmpx *); struct utmpx *getutxline(const struct utmpx *); struct utmpx *pututxline(const struct utmpx *); void setutxent(void); void endutxent(void);

These functions are provided by glibc, and perform the same task as their equivalents without the “x”, but use struct utmpx, defined on Linux to be the same as struct utmp. For completeness, glibc also provides utmpxname(), although this function is not specified by POSIX.1.

On some other systems, the utmpx structure is a superset of the utmp structure, with additional fields, and larger versions of the existing fields, and parallel files are maintained, often /var/*/utmpx and /var/*/wtmpx.

Linux glibc on the other hand does not use a parallel utmpx file since its utmp structure is already large enough. The “x” functions listed above are just aliases for their counterparts without the “x” (e.g., getutxent() is an alias for getutent()).

NOTES

glibc notes

The above functions are not thread-safe. glibc adds reentrant versions

#include <utmp.h>
int getutent_r(struct utmp *ubuf, struct utmp **ubufp);
int getutid_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);
int getutline_r(struct utmp *ut,
 struct utmp *ubuf, struct utmp **ubufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getutent_r(), getutid_r(), getutline_r():

    _GNU_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */    _SVID_SOURCE || _BSD_SOURCE

These functions are GNU extensions, analogs of the functions of the same name without the _r suffix. The ubuf argument gives these functions a place to store their result. On success, they return 0, and a pointer to the result is written in *ubufp. On error, these functions return -1. There are no utmpx equivalents of the above functions. (POSIX.1 does not specify such functions.)

EXAMPLES

The following example adds and removes a utmp record, assuming it is run from within a pseudo terminal. For usage in a real application, you should check the return values of getpwuid(3) and ttyname(3).

#include <pwd.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <utmp.h>
int
main(void)
{
    struct utmp entry;
    system("echo before adding entry:;who");
    entry.ut_type = USER_PROCESS;
    entry.ut_pid = getpid();
    strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen("/dev/"));
    /* only correct for ptys named /dev/tty[pqr][0-9a-z] */
    strcpy(entry.ut_id, ttyname(STDIN_FILENO) + strlen("/dev/tty"));
    entry.ut_time = time(NULL);
    strcpy(entry.ut_user, getpwuid(getuid())->pw_name);
    memset(entry.ut_host, 0, UT_HOSTSIZE);
    entry.ut_addr = 0;
    setutent();
    pututline(&entry);
    system("echo after adding entry:;who");
    entry.ut_type = DEAD_PROCESS;
    memset(entry.ut_line, 0, UT_LINESIZE);
    entry.ut_time = 0;
    memset(entry.ut_user, 0, UT_NAMESIZE);
    setutent();
    pututline(&entry);
    system("echo after removing entry:;who");
    endutent();
    exit(EXIT_SUCCESS);
}

SEE ALSO

getutmp(3), utmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2680 - Linux cli command Image_ExifTool_FotoStationpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_FotoStationpm and provides detailed information about the command Image_ExifTool_FotoStationpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_FotoStationpm.

NAME 🖥️ Image_ExifTool_FotoStationpm 🖥️

Read/write FotoWare FotoStation trailer

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read and write information from the FotoWare FotoStation trailer.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

ACKNOWLEDGEMENTS

Thanks to Mark Tate for information about the FotoStation data format.

SEE ALSO

“FotoStation Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2681 - Linux cli command memset

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command memset and provides detailed information about the command memset, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the memset.

NAME 🖥️ memset 🖥️

fill memory with a constant byte

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
void *memset(void s[.n], int c, size_t n);

DESCRIPTION

The memset() function fills the first n bytes of the memory area pointed to by s with the constant byte c.

RETURN VALUE

The memset() function returns a pointer to the memory area s.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

memset()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C89, SVr4, 4.3BSD.

SEE ALSO

bstring(3), bzero(3), swab(3), wmemset(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2682 - Linux cli command MB_CUR_MAX

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command MB_CUR_MAX and provides detailed information about the command MB_CUR_MAX, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the MB_CUR_MAX.

NAME 🖥️ MB_CUR_MAX 🖥️

maximum length of a multibyte character in the current locale

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <stdlib.h>

DESCRIPTION

The MB_CUR_MAX macro defines an integer expression giving the maximum number of bytes needed to represent a single wide character in the current locale. This value is locale dependent and therefore not a compile-time constant.

RETURN VALUE

An integer in the range [1, MB_LEN_MAX]. The value 1 denotes traditional 8-bit encoded characters.

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

SEE ALSO

MB_LEN_MAX(3), mblen(3), mbstowcs(3), mbtowc(3), wcstombs(3), wctomb(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2683 - Linux cli command fpclassify

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fpclassify and provides detailed information about the command fpclassify, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fpclassify.

NAME 🖥️ fpclassify 🖥️

floating-point classification macros

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
int fpclassify(x);
int isfinite(x);
int isnormal(x);
int isnan(x);
int isinf(x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

fpclassify(), isfinite(), isnormal():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

isnan():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || _XOPEN_SOURCE
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

isinf():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

Floating point numbers can have special values, such as infinite or NaN. With the macro fpclassify(x) you can find out what type x is. The macro takes any floating-point expression as argument. The result is one of the following values:

FP_NAN
x is “Not a Number”.

FP_INFINITE
x is either positive infinity or negative infinity.

FP_ZERO
x is zero.

FP_SUBNORMAL
x is too small to be represented in normalized format.

FP_NORMAL
if nothing of the above is correct then it must be a normal floating-point number.

The other macros provide a short answer to some standard questions.

isfinite(x)
returns a nonzero value if
(fpclassify(x) != FP_NAN && fpclassify(x) != FP_INFINITE)

isnormal(x)
returns a nonzero value if (fpclassify(x) == FP_NORMAL)

isnan(x)
returns a nonzero value if (fpclassify(x) == FP_NAN)

isinf(x)
returns 1 if x is positive infinity, and -1 if x is negative infinity.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fpclassify(), isfinite(), isnormal(), isnan(), isinf()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

In glibc 2.01 and earlier, isinf() returns a nonzero value (actually: 1) if x is positive infinity or negative infinity. (This is all that C99 requires.)

NOTES

For isinf(), the standards merely say that the return value is nonzero if and only if the argument has an infinite value.

SEE ALSO

finite(3), INFINITY(3), isgreater(3), signbit(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2684 - Linux cli command Moose_Meta_TypeConstraint_DuckTypepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_TypeConstraint_DuckTypepm and provides detailed information about the command Moose_Meta_TypeConstraint_DuckTypepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_TypeConstraint_DuckTypepm.

NAME 🖥️ Moose_Meta_TypeConstraint_DuckTypepm 🖥️

Type constraint for duck typing

VERSION

version 2.2207

DESCRIPTION

This class represents type constraints based on an enumerated list of required methods.

INHERITANCE

Moose::Meta::TypeConstraint::DuckType is a subclass of Moose::Meta::TypeConstraint.

METHODS

Moose::Meta::TypeConstraint::DuckType->new(%options)

This creates a new duck type constraint based on the given %options.

It takes the same options as its parent, with several exceptions. First, it requires an additional option, methods. This should be an array reference containing a list of required method names. Second, it automatically sets the parent to the Object type.

Finally, it ignores any provided constraint option. The constraint is generated automatically based on the provided methods.

$constraint->methods

Returns the array reference of required methods provided to the constructor.

$constraint->create_child_type

This returns a new Moose::Meta::TypeConstraint object with the type as its parent.

Note that it does not return a Moose::Meta::TypeConstraint::DuckType object!

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2685 - Linux cli command open_wmemstream

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command open_wmemstream and provides detailed information about the command open_wmemstream, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the open_wmemstream.

NAME 🖥️ open_wmemstream 🖥️

open a dynamic memory buffer stream

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
FILE *open_memstream(char **ptr, size_t *sizeloc);
#include <wchar.h>
FILE *open_wmemstream(wchar_t **ptr, size_t *sizeloc);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

open_memstream(), open_wmemstream():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The open_memstream() function opens a stream for writing to a memory buffer. The function dynamically allocates the buffer, and the buffer automatically grows as needed. Initially, the buffer has a size of zero. After closing the stream, the caller should free(3) this buffer.

The locations pointed to by ptr and sizeloc are used to report, respectively, the current location and the size of the buffer. The locations referred to by these pointers are updated each time the stream is flushed (fflush(3)) and when the stream is closed (fclose(3)). These values remain valid only as long as the caller performs no further output on the stream. If further output is performed, then the stream must again be flushed before trying to access these values.

A null byte is maintained at the end of the buffer. This byte is not included in the size value stored at sizeloc.

The stream maintains the notion of a current position, which is initially zero (the start of the buffer). Each write operation implicitly adjusts the buffer position. The stream’s buffer position can be explicitly changed with fseek(3) or fseeko(3). Moving the buffer position past the end of the data already written fills the intervening space with null characters.

The open_wmemstream() is similar to open_memstream(), but operates on wide characters instead of bytes.

RETURN VALUE

Upon successful completion, open_memstream() and open_wmemstream() return a FILE pointer. Otherwise, NULL is returned and errno is set to indicate the error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

open_memstream(), open_wmemstream()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

open_memstream()
glibc 1.0.x.

open_wmemstream()
glibc 2.4.

NOTES

There is no file descriptor associated with the file stream returned by these functions (i.e., fileno(3) will return an error if called on the returned stream).

BUGS

Before glibc 2.7, seeking past the end of a stream created by open_memstream() does not enlarge the buffer; instead the fseek(3) call fails, returning -1.

EXAMPLES

See fmemopen(3).

SEE ALSO

fmemopen(3), fopen(3), setbuf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2686 - Linux cli command TAILQ_HEAD_INITIALIZER

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command TAILQ_HEAD_INITIALIZER and provides detailed information about the command TAILQ_HEAD_INITIALIZER, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the TAILQ_HEAD_INITIALIZER.

NAME 🖥️ TAILQ_HEAD_INITIALIZER 🖥️

implementation of a doubly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
TAILQ_ENTRY(TYPE);
TAILQ_HEAD(HEADNAME, TYPE);
TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD head);
void TAILQ_INIT(TAILQ_HEAD *head);
int TAILQ_EMPTY(TAILQ_HEAD *head);
void TAILQ_INSERT_HEAD(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_TAIL(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_AFTER(TAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_FIRST(TAILQ_HEAD *head);
struct TYPE *TAILQ_LAST(TAILQ_HEAD *head, HEADNAME);
struct TYPE *TAILQ_PREV(struct TYPE *elm, HEADNAME, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_NEXT(struct TYPE *elm, TAILQ_ENTRY NAME);
TAILQ_FOREACH(struct TYPE *var, TAILQ_HEAD *head,
 TAILQ_ENTRY NAME);
TAILQ_FOREACH_REVERSE(struct TYPE *var, TAILQ_HEAD *head, HEADNAME,
 TAILQ_ENTRY NAME);
void TAILQ_REMOVE(TAILQ_HEAD *head, struct TYPE *elm,
 TAILQ_ENTRY NAME);
void TAILQ_CONCAT(TAILQ_HEAD *head1, TAILQ_HEAD *head2,
 TAILQ_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked tail queues.

In the macro definitions, TYPE is the name of a user defined structure, that must contain a field of type TAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user defined structure that must be declared using the macro TAILQ_HEAD().

Creation

A tail queue is headed by a structure defined by the TAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the queue and the other to the last element in the queue. The elements are doubly linked so that an arbitrary element can be removed without traversing the queue. New elements can be added to the queue after an existing element, before an existing element, at the head of the queue, or at the end of the queue. A TAILQ_HEAD structure is declared as follows:

TAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the queue. A pointer to the head of the queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

TAILQ_ENTRY() declares a structure that connects the elements in the queue.

TAILQ_HEAD_INITIALIZER() evaluates to an initializer for the queue head.

TAILQ_INIT() initializes the queue referenced by

TAILQ_EMPTY() evaluates to true if there are no items on the queue. head.

Insertion

TAILQ_INSERT_HEAD() inserts the new element elm at the head of the queue.

TAILQ_INSERT_TAIL() inserts the new element elm at the end of the queue.

TAILQ_INSERT_BEFORE() inserts the new element elm before the element listelm.

TAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

TAILQ_FIRST() returns the first item on the queue, or NULL if the queue is empty.

TAILQ_LAST() returns the last item on the queue. If the queue is empty the return value is NULL.

TAILQ_PREV() returns the previous item on the queue, or NULL if this item is the first.

TAILQ_NEXT() returns the next item on the queue, or NULL if this item is the last.

TAILQ_FOREACH() traverses the queue referenced by head in the forward direction, assigning each element in turn to var. var is set to NULL if the loop completes normally, or if there were no elements.

TAILQ_FOREACH_REVERSE() traverses the queue referenced by head in the reverse direction, assigning each element in turn to var.

Removal

TAILQ_REMOVE() removes the element elm from the queue.

Other features

TAILQ_CONCAT() concatenates the queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

TAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

TAILQ_FIRST(), TAILQ_LAST(), TAILQ_PREV(), and TAILQ_NEXT() return a pointer to the first, last, previous, or next TYPE structure, respectively.

TAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

STANDARDS

BSD.

HISTORY

4.4BSD.

CAVEATS

TAILQ_FOREACH() and TAILQ_FOREACH_REVERSE() don’t allow var to be removed or freed within the loop, as it would interfere with the traversal. TAILQ_FOREACH_SAFE() and TAILQ_FOREACH_REVERSE_SAFE(), which are present on the BSDs but are not present in glibc, fix this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    TAILQ_ENTRY(entry) entries;             /* Tail queue */
};
TAILQ_HEAD(tailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct tailhead head;                   /* Tail queue head */
    int i;
    TAILQ_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    TAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    TAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    TAILQ_INSERT_AFTER(&head, n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    TAILQ_INSERT_BEFORE(n2, n3, entries);
    TAILQ_REMOVE(&head, n2, entries);       /* Deletion */
    free(n2);
                                            /* Forward traversal */
    i = 0;
    TAILQ_FOREACH(np, &head, entries)
        np->data = i++;
                                            /* Reverse traversal */
    TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = TAILQ_FIRST(&head); while (n1 != NULL) { n2 = TAILQ_NEXT(n1, entries); free(n1); n1 = n2; } TAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2687 - Linux cli command Tk_Widgetpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Widgetpm and provides detailed information about the command Tk_Widgetpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Widgetpm.

NAME 🖥️ Tk_Widgetpm 🖥️

Base class of all widgets

SYNOPSIS

package Tk::Whatever; require Tk::Widget; @ISA = qw(Tk::Widget); Construct Tk::Widget Whatever; sub Tk_cmd { \Tk::whatever }

$widget->method(?arg, arg, …?)

DESCRIPTION

The Tk::Widget is an abstract base class for all Tk widgets.

Generic methods available to all widgets include the methods based on core winfo mechanism and are used to retrieve information about windows managed by Tk. They can take any of a number of different forms, depending on the method. The legal forms are:

$widget->appname?(newName)?
If newName isn’t specified, this method returns the name of the application (the name that may be used in send commands to communicate with the application). If newName is specified, then the name of the application is changed to newName. If the given name is already in use, then a suffix of the form `` #2’’ or `` #3’’ is appended in order to make the name unique. The method’s result is the name actually chosen. newName should not start with a capital letter. This will interfere with option processing, since names starting with capitals are assumed to be classes; as a result, Tk may not be able to find some options for the application. If sends have been disabled by deleting the send command, this command will re-enable them and recreate the send command.

$widget->atom(name)
Returns a decimal string giving the integer identifier for the atom whose name is name. If no atom exists with the name name then a new one is created.

$widget->atomname(id)
Returns the textual name for the atom whose integer identifier is id. This command is the inverse of the $widget->atom command. It generates an error if no such atom exists.

$widget->bell( ?-nice? );
This command rings the bell on the display for $widget and returns an empty string. The command uses the current bell-related settings for the display, which may be modified with programs such as xset. If -nice is not specified, this command also resets the screen saver for the screen. Some screen savers will ignore this, but others will reset so that the screen becomes visible again.

$widget->bindDump
This command returns a list of strings suitable for printing detailing binding information for a widget. It prints a widget’s bindtags. For each binding tag it prints all the bindings, comprised of the event descriptor and the callback. Callback arguments are printed, and Tk::Ev objects are expanded.

$widget->Busy?(?-recurse => 1?,-option => value?)?
This method configures a -cursor option for $widget and (if -recurse = 1> is specified) all its descendants. The cursor to be set may be passed as -cursor = cursor> or defaults to ‘watch’. Additional configure options are applied to $widget only. It also adds a special tag ‘Busy’ to the bindtags of the widgets so configured so that KeyPress, KeyRelease, ButtonPress and ButtonRelease events are ignored (with press events generating a call to bell). It then acquires a local grab for $widget. The state of the widgets and the grab is restored by a call to $widget->Unbusy.

$widget->caret( ?-x => x?, ?-y => y?, ?-height => height? );
Sets and queries the caret location for the display of the specified Tk window window. The caret is the per-display cursor location used for indicating global focus (e.g. to comply with Microsoft Accessibility guidelines), as well as for location of the over-the-spot XIM (X Input Methods) or Windows IME windows. If no options are specified, the last values used for setting the caret are return in option-value pair format. -x and -y represent window-relative coordinates, and -height is the height of the current cursor location, or the height of the specified window if none is given.

$widget->cells
Returns a decimal string giving the number of cells in the color map for $widget.

$widget->children
$widget->children Returns a list containing all the children of $widget. The list is in stacking order, with the lowest window first. Top-level windows are returned as children of their logical parents.

$widget->class
Returns the class name for $widget.

$widget->colormapfull
Returns 1 if the colormap for $widget is known to be full, 0 otherwise. The colormap for a window is ``known’’ to be full if the last attempt to allocate a new color on that window failed and this application hasn’t freed any colors in the colormap since the failed allocation.

$widget->ConfigSpecs
Used to perform delegated option configuration for a mega-widget. Returns, in Tk::Derived::ConfigSpecs notation (see Tk::ConfigSpecs), all possible options for a widget. For example, $s = $self->Scale; $self->ConfigSpecs( $s->ConfigSpecs, …. more ConfigSpecs specifications ); returns a hash of all Tk::Scale options, delegated to $s - e.g. some representative examples: -bigincrement => [$s, bigIncrement, BigIncrement, 0, 0] -digits => [$s, digits, Digits, 0, 0] -sliderlength => [$s, sliderLength, SliderLength, 10m, 30] -troughcolor => [$s, troughColor, Background, #c3c3c3, #c3c3c3] This provides an easy means of populating a mega-widget’s ConfigSpecs with initializers.

$widget->containing(rootX,rootY)
Returns the window containing the point given by rootX and rootY. RootX and rootY are specified in screen units (i.e. any form acceptable to Tk_GetPixels) in the coordinate system of the root window (if a virtual-root window manager is in use then the coordinate system of the virtual root window is used). If no window in this application contains the point then an empty string is returned. In selecting the containing window, children are given higher priority than parents and among siblings the highest one in the stacking order is chosen.

$widget->depth
Returns a decimal string giving the depth of $widget (number of bits per pixel).

$widget->destroy
This command deletes the window related to $widget, plus all its descendants. If all the MainWindows are deleted then the entire application will be destroyed. The perl object $widget continues to exist while references to it still exist, e.g. until variable goes out of scope. However any attempt to use Tk methods on the object will fail. Exists($widget) will return false on such objects. Note however that while a window exists for $widget the perl object is maintained (due to “references” in perl/Tk internals) even though original variables may have gone out of scope. (Normally this is intuitive.)

Exists($widget)
Returns 1 if there exists a window for $widget, 0 if no such window exists.

$widget->font(option?, arg, arg, …?)
Create and inspect fonts. See Tk::Font for further details.

$widget->fpixels(number)
Returns a floating-point value giving the number of pixels in $widget corresponding to the distance given by number. Number may be specified in any of the forms acceptable to Tk_GetScreenMM, such as ``2.0c’’ or ``1i’’. The return value may be fractional; for an integer value, use $widget->pixels.

$widget->Getimage(name)
Given name, look for an image file with that base name and return a Tk::Image. File extensions are tried in this order: xpm, gif, ppm, xbm until a valid iamge is found. If no image is found, try a builtin image with that name.

$widget->geometry
Returns the geometry for $widget, in the form widthxheight**+x+**y. All dimensions are in pixels.

$widget->height
Returns a decimal string giving $widget’s height in pixels. When a window is first created its height will be 1 pixel; the height will eventually be changed by a geometry manager to fulfill the window’s needs. If you need the true height immediately after creating a widget, invoke update to force the geometry manager to arrange it, or use $widget->reqheight to get the window’s requested height instead of its actual height.

$widget->id
Returns a hexadecimal string giving a low-level platform-specific identifier for $widget. On Unix platforms, this is the X window identifier. Under Windows, this is the Windows HWND. On the Macintosh the value has no meaning outside Tk.

$widget->idletasks
One of two methods which are used to bring the application ``up to date’’ by entering the event loop repeated until all pending events (including idle callbacks) have been processed. If the idletasks method is specified, then no new events or errors are processed; only idle callbacks are invoked. This causes operations that are normally deferred, such as display updates and window layout calculations, to be performed immediately. The idletasks command is useful in scripts where changes have been made to the application’s state and you want those changes to appear on the display immediately, rather than waiting for the script to complete. Most display updates are performed as idle callbacks, so idletasks will cause them to run. However, there are some kinds of updates that only happen in response to events, such as those triggered by window size changes; these updates will not occur in idletasks.

$widget->interps
Returns a list whose members are the names of all Tcl interpreters (e.g. all Tk-based applications) currently registered for a particular display. The return value refers to the display of $widget.

$widget->ismapped
Returns 1 if $widget is currently mapped, 0 otherwise.

$widget->lower(?belowThis?)
If the belowThis argument is omitted then the command lowers $widget so that it is below all of its siblings in the stacking order (it will be obscured by any siblings that overlap it and will not obscure any siblings). If belowThis is specified then it must be the path name of a window that is either a sibling of $widget or the descendant of a sibling of $widget. In this case the lower command will insert $widget into the stacking order just below belowThis (or the ancestor of belowThis that is a sibling of $widget); this could end up either raising or lowering $widget.

$widget->MapWindow
Cause $widget to be “mapped” i.e. made visible on the display. May confuse the geometry manager (pack, grid, place, …) that thinks it is managing the widget.

$widget->manager
Returns the name of the geometry manager currently responsible for $widget, or an empty string if $widget isn’t managed by any geometry manager. The name is usually the name of the method for the geometry manager, such as pack or place. If the geometry manager is a widget, such as canvases or text, the name is the widget’s class command, such as canvas.

$widget->name
Returns $widget’s name (i.e. its name within its parent, as opposed to its full path name). The command $mainwin->name will return the name of the application.

$widget->OnDestroy(callback);
OnDestroy accepts a standard perl/Tk callback. When the window associated with $widget is destroyed then the callback is invoked. Unlike $widget->bind(’<Destroy>’,…) the widgets methods are still available when callback is executed, so (for example) a Text widget can save its contents to a file. OnDestroy was required for new after mechanism.

$widget->parent
Returns $widget’s parent, or an empty string if $widget is the main window of the application.

$widget->PathName
Returns the Tk path name of $widget. This is the inverse of the “Widget” method. (This is an import from the C interface.)

$widget->pathname(id)
Returns an object whose X identifier is id. The identifier is looked up on the display of $widget. Id must be a decimal, hexadecimal, or octal integer and must correspond to a window in the invoking application, or an error occurs which can be trapped with eval { } or Tk::catch { }. If the window belongs to the application, but is not an object (for example wrapper windows, HList header, etc.) then undef is returned.

$widget->pixels(number)
Returns the number of pixels in $widget corresponding to the distance given by number. Number may be specified in any of the forms acceptable to Tk_GetPixels, such as ``2.0c’’ or ``1i’’. The result is rounded to the nearest integer value; for a fractional result, use $widget->fpixels.

$widget->pointerx
If the mouse pointer is on the same screen as $widget, returns the pointer’s x coordinate, measured in pixels in the screen’s root window. If a virtual root window is in use on the screen, the position is measured in the virtual root. If the mouse pointer isn’t on the same screen as $widget then -1 is returned.

$widget->pointerxy
If the mouse pointer is on the same screen as $widget, returns a list with two elements, which are the pointer’s x and y coordinates measured in pixels in the screen’s root window. If a virtual root window is in use on the screen, the position is computed in the virtual root. If the mouse pointer isn’t on the same screen as $widget then both of the returned coordinates are -1.

$widget->pointery
If the mouse pointer is on the same screen as $widget, returns the pointer’s y coordinate, measured in pixels in the screen’s root window. If a virtual root window is in use on the screen, the position is computed in the virtual root. If the mouse pointer isn’t on the same screen as $widget then -1 is returned.

$widget->raise(?aboveThis?)
If the aboveThis argument is omitted then the command raises $widget so that it is above all of its siblings in the stacking order (it will not be obscured by any siblings and will obscure any siblings that overlap it). If aboveThis is specified then it must be the path name of a window that is either a sibling of $widget or the descendant of a sibling of $widget. In this case the raise command will insert $widget into the stacking order just above aboveThis (or the ancestor of aboveThis that is a sibling of $widget); this could end up either raising or lowering $widget.

$widget->reqheight
Returns a decimal string giving $widget’s requested height, in pixels. This is the value used by $widget’s geometry manager to compute its geometry.

$widget->reqwidth
Returns a decimal string giving $widget’s requested width, in pixels. This is the value used by $widget’s geometry manager to compute its geometry.

$widget->rgb(color)
Returns a list containing three decimal values, which are the red, green, and blue intensities that correspond to color in the window given by $widget. Color may be specified in any of the forms acceptable for a color option.

$widget->rootx
Returns a decimal string giving the x-coordinate, in the root window of the screen, of the upper-left corner of $widget’s border (or $widget if it has no border).

$widget->rooty
Returns a decimal string giving the y-coordinate, in the root window of the screen, of the upper-left corner of $widget’s border (or $widget if it has no border).

$widget->scaling?(number)?
Sets and queries the current scaling factor used by Tk to convert between physical units (for example, points, inches, or millimeters) and pixels. The number argument is a floating point number that specifies the number of pixels per point on $widget’s display. If the number argument is omitted, the current value of the scaling factor is returned. A ``point’’ is a unit of measurement equal to 1/72 inch. A scaling factor of 1.0 corresponds to 1 pixel per point, which is equivalent to a standard 72 dpi monitor. A scaling factor of 1.25 would mean 1.25 pixels per point, which is the setting for a 90 dpi monitor; setting the scaling factor to 1.25 on a 72 dpi monitor would cause everything in the application to be displayed 1.25 times as large as normal. The initial value for the scaling factor is set when the application starts, based on properties of the installed monitor (as reported via the window system), but it can be changed at any time. Measurements made after the scaling factor is changed will use the new scaling factor, but it is undefined whether existing widgets will resize themselves dynamically to accommodate the new scaling factor.

$widget->screen
Returns the name of the screen associated with $widget, in the form displayName.screenIndex.

$widget->screencells
Returns a decimal string giving the number of cells in the default color map for $widget’s screen.

$widget->screendepth
Returns a decimal string giving the depth of the root window of $widget’s screen (number of bits per pixel).

$widget->screenheight
Returns a decimal string giving the height of $widget’s screen, in pixels.

$widget->screenmmheight
Returns a decimal string giving the height of $widget’s screen, in millimeters.

$widget->screenmmwidth
Returns a decimal string giving the width of $widget’s screen, in millimeters.

$widget->screenvisual
Returns one of the following strings to indicate the default visual class for $widget’s screen: directcolor, grayscale, pseudocolor, staticcolor, staticgray, or truecolor.

$widget->screenwidth
Returns a decimal string giving the width of $widget’s screen, in pixels.

$widget->server
Returns a string containing information about the server for $widget’s display. The exact format of this string may vary from platform to platform. For X servers the string has the form ``XmajorRminor vendor vendorVersion’’ where major and minor are the version and revision numbers provided by the server (e.g., X11R5), vendor is the name of the vendor for the server, and vendorRelease is an integer release number provided by the server.

$widget->toplevel
Returns the reference of the top-level window containing $widget.

$widget->Unbusy
Restores widget state after a call to $widget->Busy.

$widget->UnmapWindow
Cause $widget to be “unmapped” i.e. removed from the display. This does for any widget what $widget->withdraw does for toplevel widgets. May confuse the geometry manager (pack, grid, place, …) that thinks it is managing the widget.

$widget->update
One of two methods which are used to bring the application ``up to date’’ by entering the event loop repeated until all pending events (including idle callbacks) have been processed. The update method is useful in scripts where you are performing a long-running computation but you still want the application to respond to events such as user interactions; if you occasionally call update then user input will be processed during the next call to update.

$widget->useinputmethods( ?boolean? )
Sets and queries the state of whether Tk should use XIM (X Input Methods) for filtering events. The resulting state is returned. XIM is used in some locales (ie: Japanese, Korean), to handle special input devices. This feature is only significant on X. If XIM support is not available, this will always return 0. If the boolean argument is omitted, the current state is returned. This is turned on by default for the main display.

$widget->viewable
Returns 1 if $widget and all of its ancestors up through the nearest toplevel window are mapped. Returns 0 if any of these windows are not mapped.

$widget->visual
Returns one of the following strings to indicate the visual class for $widget: directcolor, grayscale, pseudocolor, staticcolor, staticgray, or truecolor.

$widget->visualid
Returns the X identifier for the visual for $widget.

$widget->visualsavailable(?includeids?)
Returns a list whose elements describe the visuals available for $widget’s screen. Each element consists of a visual class followed by an integer depth. The class has the same form as returned by $widget->visual. The depth gives the number of bits per pixel in the visual. In addition, if the includeids argument is provided, then the depth is followed by the X identifier for the visual.

$widget->vrootheight
Returns the height of the virtual root window associated with $widget if there is one; otherwise returns the height of $widget’s screen.

$widget->vrootwidth
Returns the width of the virtual root window associated with $widget if there is one; otherwise returns the width of $widget’s screen.

$widget->vrootx
Returns the x-offset of the virtual root window associated with $widget, relative to the root window of its screen. This is normally either zero or negative. Returns 0 if there is no virtual root window for $widget.

$widget->vrooty
Returns the y-offset of the virtual root window associated with $widget, relative to the root window of its screen. This is normally either zero or negative. Returns 0 if there is no virtual root window for $widget.

$widget->waitVariable(\name)

$widget->waitVisibility

$widget->waitWindow

The tk wait methods wait for one of several things to happen, then it returns without taking any other actions. The return value is always an empty string. waitVariable expects a reference to a perl variable and the command waits for that variable to be modified. This form is typically used to wait for a user to finish interacting with a dialog which sets the variable as part (possibly final) part of the interaction. waitVisibility waits for a change in $widget’s visibility state (as indicated by the arrival of a VisibilityNotify event). This form is typically used to wait for a newly-created window to appear on the screen before taking some action. waitWindow waits for $widget to be destroyed. This form is typically used to wait for a user to finish interacting with a dialog box before using the result of that interaction. Note that creating and destroying the window each time a dialog is required makes code modular but imposes overhead which can be avoided by withdrawing the window instead and using waitVisibility. While the tk wait methods are waiting they processes events in the normal fashion, so the application will continue to respond to user interactions. If an event handler invokes tkwait again, the nested call to tkwait must complete before the outer call can complete.

$widget->Walk(proc?, arg, …?)
Traverse a widget hierarchy starting at $widget while executing the subroutine proc to every visited widget. The arguments arg, … are supplied to the subroutine.

$widget->Widget(pathname)
Returns the widget reference for the given Tk path name, or undef if the path name does not match a Tk widget. This is the inverse of the “PathName” method. (This is an import from the C interface.)

$widget->width
Returns a decimal string giving $widget’s width in pixels. When a window is first created its width will be 1 pixel; the width will eventually be changed by a geometry manager to fulfill the window’s needs. If you need the true width immediately after creating a widget, invoke update to force the geometry manager to arrange it, or use $widget->reqwidth to get the window’s requested width instead of its actual width.

$widget->windowingsystem
Returns the current Tk windowing system, one of x11 (X11-based), win32 (MS Windows), classic (Mac OS Classic), or aqua (Mac OS X Aqua).

$widget->x
Returns a decimal string giving the x-coordinate, in $widget’s parent, of the upper-left corner of $widget’s border (or $widget if it has no border).

$widget->y
Returns a decimal string giving the y-coordinate, in $widget’s parent, of the upper-left corner of $widget’s border (or $widget if it has no border).

CAVEATS

The above documentation on generic methods is incomplete.

KEYWORDS

atom, children, class, geometry, height, identifier, information, interpreters, mapped, parent, path name, screen, virtual root, width, window

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2688 - Linux cli command Net_DNS_RR_URIpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_URIpm and provides detailed information about the command Net_DNS_RR_URIpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_URIpm.

NAME 🖥️ Net_DNS_RR_URIpm 🖥️

DNS URI resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name URI priority weight target);

DESCRIPTION

Class for DNS Service (URI) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

priority

$priority = $rr->priority; $rr->priority( $priority );

The priority of the target URI in this RR. The range of this number is 0-65535. A client MUST attempt to contact the URI with the lowest-numbered priority it can reach; weighted selection being used to distribute load across targets with equal priority.

weight

$weight = $rr->weight; $rr->weight( $weight );

A server selection mechanism. The weight field specifies a relative weight for entries with the same priority. Larger weights SHOULD be given a proportionately higher probability of being selected. The range of this number is 0-65535.

target

$target = $rr->target; $rr->target( $target );

The URI of the target. Resolution of the URI is according to the definitions for the Scheme of the URI.

COPYRIGHT

Copyright (c)2015 Dick Franks.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC7553 <https://tools.ietf.org/html/rfc7553>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2689 - Linux cli command ldiv_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ldiv_ttype and provides detailed information about the command ldiv_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ldiv_ttype.

NAME 🖥️ ldiv_ttype 🖥️

quotient and remainder of an integer division

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <stdlib.h>
typedef struct {
 int quot; /* Quotient */
 int rem; /* Remainder */
} div_t;
typedef struct {
 long quot; /* Quotient */
 long rem; /* Remainder */
} ldiv_t;
typedef struct {
 long long quot; /* Quotient */
 long long rem; /* Remainder */
} lldiv_t;
#include <inttypes.h>
typedef struct {
 intmax_t quot; /* Quotient */
 intmax_t rem; /* Remainder */
} imaxdiv_t;

DESCRIPTION

[[l]l]div_t is the type of the value returned by the [[l]l] div(3) function.

imaxdiv_t is the type of the value returned by the imaxdiv(3) function.

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

SEE ALSO

div(3), imaxdiv(3), ldiv(3), lldiv(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2690 - Linux cli command pthread_spin_init

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_spin_init and provides detailed information about the command pthread_spin_init, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_spin_init.

NAME 🖥️ pthread_spin_init 🖥️

initialize or destroy a spin lock

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_spin_init(pthread_spinlock_t *lock, int pshared);
int pthread_spin_destroy(pthread_spinlock_t *lock);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

pthread_spin_init(), pthread_spin_destroy():

    _POSIX_C_SOURCE >= 200112L

DESCRIPTION

General note: Most programs should use mutexes instead of spin locks. Spin locks are primarily useful in conjunction with real-time scheduling policies. See NOTES.

The pthread_spin_init() function allocates any resources required for the use of the spin lock referred to by lock and initializes the lock to be in the unlocked state. The pshared argument must have one of the following values:

PTHREAD_PROCESS_PRIVATE
The spin lock is to be operated on only by threads in the same process as the thread that calls pthread_spin_init(). (Attempting to share the spin lock between processes results in undefined behavior.)

PTHREAD_PROCESS_SHARED
The spin lock may be operated on by any thread in any process that has access to the memory containing the lock (i.e., the lock may be in a shared memory object that is shared among multiple processes).

Calling pthread_spin_init() on a spin lock that has already been initialized results in undefined behavior.

The pthread_spin_destroy() function destroys a previously initialized spin lock, freeing any resources that were allocated for that lock. Destroying a spin lock that has not been previously been initialized or destroying a spin lock while another thread holds the lock results in undefined behavior.

Once a spin lock has been destroyed, performing any operation on the lock other than once more initializing it with pthread_spin_init() results in undefined behavior.

The result of performing operations such as pthread_spin_lock(3), pthread_spin_unlock(3), and pthread_spin_destroy() on copies of the object referred to by lock is undefined.

RETURN VALUE

On success, there functions return zero. On failure, they return an error number. In the event that pthread_spin_init() fails, the lock is not initialized.

ERRORS

pthread_spin_init() may fail with the following errors:

EAGAIN
The system has insufficient resources to initialize a new spin lock.

ENOMEM
Insufficient memory to initialize the spin lock.

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.2. POSIX.1-2001.

Support for process-shared spin locks is a POSIX option. The option is supported in the glibc implementation.

NOTES

Spin locks should be employed in conjunction with real-time scheduling policies (SCHED_FIFO, or possibly SCHED_RR). Use of spin locks with nondeterministic scheduling policies such as SCHED_OTHER probably indicates a design mistake. The problem is that if a thread operating under such a policy is scheduled off the CPU while it holds a spin lock, then other threads will waste time spinning on the lock until the lock holder is once more rescheduled and releases the lock.

If threads create a deadlock situation while employing spin locks, those threads will spin forever consuming CPU time.

User-space spin locks are not applicable as a general locking solution. They are, by definition, prone to priority inversion and unbounded spin times. A programmer using spin locks must be exceptionally careful not only in the code, but also in terms of system configuration, thread placement, and priority assignment.

SEE ALSO

pthread_mutex_init(3), pthread_mutex_lock(3), pthread_spin_lock(3), pthread_spin_unlock(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2691 - Linux cli command Image_ExifTool_ID3pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_ID3pm and provides detailed information about the command Image_ExifTool_ID3pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_ID3pm.

NAME 🖥️ Image_ExifTool_ID3pm 🖥️

Read ID3 meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to extract ID3 information from audio files. ID3 information is found in MP3 and various other types of audio files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<https://id3.org/>

<http://www.mp3-tech.org/>

<http://www.fortunecity.com/underworld/sonic/3/id3tag.html>

<https://id3.org/Lyrics3>

SEE ALSO

“ID3 Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2692 - Linux cli command localeconv

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command localeconv and provides detailed information about the command localeconv, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the localeconv.

NAME 🖥️ localeconv 🖥️

get numeric formatting information

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <locale.h>
struct lconv *localeconv(void);

DESCRIPTION

The localeconv() function returns a pointer to a struct lconv for the current locale. This structure is shown in locale(7), and contains all values associated with the locale categories LC_NUMERIC and LC_MONETARY. Programs may also use the functions printf(3) and strfmon(3), which behave according to the actual locale in use.

RETURN VALUE

The localeconv() function returns a pointer to a filled in struct lconv. This structure may be (in glibc, is) statically allocated, and may be overwritten by subsequent calls. According to POSIX, the caller should not modify the contents of this structure. The localeconv() function always succeeds.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

localeconv()

Thread safety

MT-Unsafe race:localeconv locale

STANDARDS

C11.

HISTORY

C89.

BUGS

The printf(3) family of functions may or may not honor the current locale.

SEE ALSO

locale(1), localedef(1), isalpha(3), nl_langinfo(3), setlocale(3), strcoll(3), strftime(3), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2693 - Linux cli command XtAppCreateShell

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppCreateShell and provides detailed information about the command XtAppCreateShell, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppCreateShell.

NAME 🖥️ XtAppCreateShell 🖥️

create top-level widget instance

SYNTAX

#include <X11/Intrinsic.h>

Widget XtAppCreateShell(const char *application_name, const char *application_class, WidgetClass widget_class, Display *display, ArgList args, Cardinal num_args);

Widget XtVaAppCreateShell(const char * application_name, const char * application_class, WidgetClass widget_class, Display *display, … );

ARGUMENTS

application_name
Specifies the name of the application instance.

application_class
Specifies the class name of this application, which usually is the generic name for all instances of this application.

widget_class
Specifies the widget class that the application top-level widget should be.

display
Specifies the display from which to get the resources.

args
Specifies the argument list from which to get the resources.

num_args
Specifies the number of arguments in the argument list.


Specifies the variable argument list from which to get the resources.

DESCRIPTION

The XtAppCreateShell function saves the specified application name and application class for qualifying all widget resource specifiers. The application name and application class are used as the left-most components in all widget resource names for this application. XtAppCreateShell should be used to create a new logical application within a program or to create a shell on another display. In the first case, it allows the specification of a new root in the resource hierarchy. In the second case, it uses the resource database associated with the other display.

Note that the widget returned by XtAppCreateShell has the WM_COMMAND property set for session managers (see Chapter 4).

SEE ALSO

XtCreateWidget(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2694 - Linux cli command XtWindowOfObject

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtWindowOfObject and provides detailed information about the command XtWindowOfObject, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtWindowOfObject.

NAME 🖥️ XtWindowOfObject 🖥️

obtain window information about a widget

SYNTAX

#include <X11/Intrinsic.h>

Display *XtDisplay(Widget w);

Display *XtDisplayOfObject(Widget object);

Screen *XtScreen(Widget w);

Screen *XtScreenOfObject(Widget object);

Window XtWindow(Widget w);

Window XtWindowOfObject(Widget object);

ARGUMENTS

  1. Specifies the widget.

object
Specifies the widget.

DESCRIPTION

XtDisplay returns the display pointer for the specified widget.

XtDisplayOfObject returns the display pointer for the specified object.

XtScreen returns the screen pointer for the specified widget.

XtScreenOfObject returns the screen pointer for the specified object.

XtWindow returns the window of the specified widget.

XtWindowOfObject returns the window of the specified object.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2695 - Linux cli command fmodl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fmodl and provides detailed information about the command fmodl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fmodl.

NAME 🖥️ fmodl 🖥️

floating-point remainder function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double fmod(double x, double y);
float fmodf(float x, float y);
long double fmodl(long double x, long double y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

fmodf(), fmodl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions compute the floating-point remainder of dividing x by y. The return value is x - n * y, where n is the quotient of x / y, rounded toward zero to an integer.

To obtain the modulus, more specifically, the Least Positive Residue, you will need to adjust the result from fmod like so:

z = fmod(x, y);
if (z < 0)
	z += y;

An alternate way to express this is with fmod(fmod(x, y) + y, y), but the second fmod() usually costs way more than the one branch.

RETURN VALUE

On success, these functions return the value x - n*y, for some integer n, such that the returned value has the same sign as x and a magnitude less than the magnitude of y.

If x or y is a NaN, a NaN is returned.

If x is an infinity, a domain error occurs, and a NaN is returned.

If y is zero, a domain error occurs, and a NaN is returned.

If x is +0 (-0), and y is not zero, +0 (-0) is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is an infinity
errno is set to EDOM (but see BUGS). An invalid floating-point exception (FE_INVALID) is raised.

Domain error: y is zero
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fmod(), fmodf(), fmodl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

BUGS

Before glibc 2.10, the glibc implementation did not set errno to EDOM when a domain error occurred for an infinite x.

EXAMPLES

The call fmod(372, 360) returns 348.

The call fmod(-372, 360) returns -12.

The call fmod(-372, -360) also returns -12.

SEE ALSO

remainder(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2696 - Linux cli command pcap_datalink_val_to_descriptionpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_datalink_val_to_descriptionpcap and provides detailed information about the command pcap_datalink_val_to_descriptionpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_datalink_val_to_descriptionpcap.

NAME 🖥️ pcap_datalink_val_to_descriptionpcap 🖥️

get a name or description for a link-layer header type value

SYNOPSIS

#include <pcap.h>
const char *pcap_datalink_val_to_name(int dlt);
const char *pcap_datalink_val_to_description(int dlt);
const char *pcap_datalink_val_to_description_or_dlt(int dlt);

DESCRIPTION

pcap_datalink_val_to_name() translates a link-layer header type value to the corresponding link-layer header type name, which is the DLT_ name for the link-layer header type value with the DLT_ removed. NULL is returned if the type value does not correspond to a known DLT_ value.

pcap_datalink_val_to_description() translates a link-layer header type value to a short description of that link-layer header type. NULL is returned if the type value does not correspond to a known DLT_ value.

pcap_datalink_val_to_description_or_dlt() translates a link-layer header type value to a short description of that link-layer header type just like pcap_datalink_val_to_description(). If the type value does not correspond to a known DLT_ value, the string “DLT n” is returned, where n is the value of the dlt argument.

BACKWARD COMPATIBILITY

The pcap_datalink_val_to_description_or_dlt() function first became available in libpcap release 1.9.1. In previous releases, pcap_datalink_val_to_description() would have to be called and, if it returned NULL, a default string would have to be constructed.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2697 - Linux cli command Spreadsheet_WriteExcel_Chart_Externalpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_WriteExcel_Chart_Externalpm and provides detailed information about the command Spreadsheet_WriteExcel_Chart_Externalpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_WriteExcel_Chart_Externalpm.

NAME 🖥️ Spreadsheet_WriteExcel_Chart_Externalpm 🖥️

A writer class for Excel external charts.

SYNOPSIS

This module is used to include external charts in Spreadsheet::WriteExcel.

DESCRIPTION

This module is used to include external charts in Spreadsheet::WriteExcel. It is an internal module and isn’t used directly by the end user.

It is semi-deprecated in favour of using native charts. See Spreadsheet::WriteExcel::Chart.

For information on how to used external charts see the external_charts.txt (or .pod) in the external_charts directory of the distro.

AUTHOR

John McNamara [email protected]

COPYRIGHT

Copyright MM-MMX, John McNamara.

All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2698 - Linux cli command iswalnum

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command iswalnum and provides detailed information about the command iswalnum, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the iswalnum.

NAME 🖥️ iswalnum 🖥️

test for alphanumeric wide character

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wctype.h>
int iswalnum(wint_t wc);

DESCRIPTION

The iswalnum() function is the wide-character equivalent of the isalnum(3) function. It tests whether wc is a wide character belonging to the wide-character class “alnum”.

The wide-character class “alnum” is a subclass of the wide-character class “graph”, and therefore also a subclass of the wide-character class “print”.

Being a subclass of the wide-character class “print”, the wide-character class “alnum” is disjoint from the wide-character class “cntrl”.

Being a subclass of the wide-character class “graph”, the wide-character class “alnum” is disjoint from the wide-character class “space” and its subclass “blank”.

The wide-character class “alnum” is disjoint from the wide-character class “punct”.

The wide-character class “alnum” is the union of the wide-character classes “alpha” and “digit”. As such, it also contains the wide-character class “xdigit”.

The wide-character class “alnum” always contains at least the letters ‘A’ to ‘Z’, ‘a’ to ‘z’, and the digits ‘0’ to ‘9’.

RETURN VALUE

The iswalnum() function returns nonzero if wc is a wide character belonging to the wide-character class “alnum”. Otherwise, it returns zero.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

iswalnum()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of iswalnum() depends on the LC_CTYPE category of the current locale.

SEE ALSO

isalnum(3), iswctype(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2699 - Linux cli command tcgetpgrp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tcgetpgrp and provides detailed information about the command tcgetpgrp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tcgetpgrp.

NAME 🖥️ tcgetpgrp 🖥️

get and set terminal foreground process group

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
pid_t tcgetpgrp(int fd);
int tcsetpgrp(int fd, pid_t pgrp);

DESCRIPTION

The function tcgetpgrp() returns the process group ID of the foreground process group on the terminal associated to fd, which must be the controlling terminal of the calling process.

The function tcsetpgrp() makes the process group with process group ID pgrp the foreground process group on the terminal associated to fd, which must be the controlling terminal of the calling process, and still be associated with its session. Moreover, pgrp must be a (nonempty) process group belonging to the same session as the calling process.

If tcsetpgrp() is called by a member of a background process group in its session, and the calling process is not blocking or ignoring SIGTTOU, a SIGTTOU signal is sent to all members of this background process group.

RETURN VALUE

When fd refers to the controlling terminal of the calling process, the function tcgetpgrp() will return the foreground process group ID of that terminal if there is one, and some value larger than 1 that is not presently a process group ID otherwise. When fd does not refer to the controlling terminal of the calling process, -1 is returned, and errno is set to indicate the error.

When successful, tcsetpgrp() returns 0. Otherwise, it returns -1, and errno is set to indicate the error.

ERRORS

EBADF
fd is not a valid file descriptor.

EINVAL
pgrp has an unsupported value.

ENOTTY
The calling process does not have a controlling terminal, or it has one but it is not described by fd, or, for tcsetpgrp(), this controlling terminal is no longer associated with the session of the calling process.

EPERM
pgrp has a supported value, but is not the process group ID of a process in the same session as the calling process.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tcgetpgrp(), tcsetpgrp()

Thread safetyMT-Safe

VERSIONS

These functions are implemented via the TIOCGPGRP and TIOCSPGRP ioctls.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

The ioctls appeared in 4.2BSD. The functions are POSIX inventions.

SEE ALSO

setpgid(2), setsid(2), credentials(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2700 - Linux cli command Tk_Tcl-perlpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Tcl-perlpm and provides detailed information about the command Tk_Tcl-perlpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Tcl-perlpm.

NAME 🖥️ Tk_Tcl-perlpm 🖥️

very old suspect documentation on porting.

DESCRIPTION

This isn’t really a .pod yet, nor is it Tcl vs perl it is a copy of John’s comparison of Malcolm’s original perl/Tk port with the current one. It is also out-of-date in places.

From: [email protected] (John Stoffel ) Here are some thoughts on the new Tk extension and how I think the organization of the commands looks. Mostly, Im happy with it, it makes some things more organized and more consistent with tcl/tk, but since the overlying language is so different, I dont think we need to follow exactly the tcl/tk model for how to call the language. The basic structure of the Tk program is: require Tk; $top = MainWindow->new(); # # create widgets # Tk::MainLoop; sub method1 { } sub methodN { } This is pretty much the same as tkperl5a5, with some cosmetic naming changes, and some more useful command name and usage changes. A quick comparison in no particular order follows: tkperl5a5 Tk ——————————- ———————————– $top=tkinit(name,display,sync); $top=MainWindow->new(); tkpack $w, … ; $w->pack(…) $w = Class::new($top, …); $w = $top->Class(…); tkmainloop; Tk::MainLoop; tkbind($w,"<key>",sub); $w->bind("<key>",sub); tkdelete($w, …); $w->delete(…); $w->scanmark(…); $w->scan(“mark”, …); $w->scandragto(…); $w->scan(“dragto”, …); $w->tkselect(); $w->Select(); $w->selectadjust(…); $w->selection(“adjust”, …); $w->selectto(…); $w->selection(“to”, …); $w->selectfrom(…); $w->selection(“from”, …); $w->tkindex(…); $w->index(…); tclcmd(“xxx”,…); &Tk::xxx(…) # all Tk commands, but no Tcl at all tclcmd(“winfo”, xxx, $w, …); $w->xxx(…); $w->mark(…); $w->tag(…); $w->grabstatus(); $w->grab(“status”); $w->grabrelease(…); $w->grab(“release”, …); focus($w); $w->focus; update(); Tk->update(); idletasks(); Tk->update(“idletasks”); wm(“cmd”,$w, …); $w->cmd(…); destroy($w); $w->destroy(); Tk::option(…); $w->OptionGet(name,Class) $w->place(…) Tk::property(…); $w = Entry::new($parent,…) is now $w = $parent->Entry(…) As this allows new to be inherited from a Window class. -method=>x,-slave=>y is now -command => [x,y] 1st element of list is treated as “method” if y is an object reference. (You can have -command => [a,b,c,d,e] too; b..e get passed as args). Object references are now hashes rather than scalars and there is only ever one such per window. The Tcl_CmdInfo and PathName are entries in the hash. (This allows derived classes to re-bless the hash and keep their on stuff in it too.) Tks “Tcl_Interp” is in fact a ref to “.” window. You can find all the Tk windows descended from it as their object references get added (by PathName) into this hash. $w->MainWindow returns this hash from any window. I think that it should extend to multiple tkinits / Tk->news with different Displays - if Tk code does. Finally “bind” passes window as “extra” (or only) argument. Thus Tk::Button->bind(<Any-Enter>,“Enter”); Binds Enter events to Tk::Button::Enter by default but gets called as $w->Enter so derived class of Button can just define its own Enter method. &EvWref and associated globals and race conditions are no longer needed. One thing to beware of : commands bound to events with $widget->bind follow same pattern, but get passed extra args : $widget->bind(<Any-1>,[sub {print shift}, $one, $two ]); When sub gets called it has : $widget $one $two passed. 1st extra arg is reference to the per-widget hash that serves as the perl object for the widget. Every time an XEvent a reference to a special class is placed in the widget hash. It can be retrieved by $w->XEvent method. The methods of the XEvent class are the Tcl/Tk % special characters. Thus: $widget->bind(<Any-KeyPress>, sub { my $w = shift; my $e = $w->XEvent; print $w->PathName," “,$e->A,” pressed ,$e->xy," “); }); XEvent->xy is a special case which returns “@” . $e->x . “,” . $e->y which is common in Text package. Because of passing a blessed widget hash to “bound” subs they can be bound to (possibly inherited) methods of the widgets class: Class->bind(<Any-Down>,Down); sub Class::Down { my $w = shift; # handle down arrow } Also: -command and friends can take a list the 1st element can be a ref to as sub or a method name. Remaining elements are passed as args to the sub at “invoke” time. Thus : $b= $w->Button(blah blah, -command => [sub{print shift} , $fred ]); Should do the trick, provided $fred is defined at time of button creation. Thus 1st element of list is equivalent to Malcolms -method and second would be his -slave. Any further elements are a bonus and avoid having to pass ref to an array/hash as a slave.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2701 - Linux cli command unsetenv

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command unsetenv and provides detailed information about the command unsetenv, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the unsetenv.

NAME 🖥️ unsetenv 🖥️

change or add an environment variable

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int setenv(const char *name, const char *value, int overwrite);
int unsetenv(const char *name);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

setenv(), unsetenv():

    _POSIX_C_SOURCE >= 200112L
        || /* glibc <= 2.19: */ _BSD_SOURCE

DESCRIPTION

The setenv() function adds the variable name to the environment with the value value, if name does not already exist. If name does exist in the environment, then its value is changed to value if overwrite is nonzero; if overwrite is zero, then the value of name is not changed (and setenv() returns a success status). This function makes copies of the strings pointed to by name and value (by contrast with putenv(3)).

The unsetenv() function deletes the variable name from the environment. If name does not exist in the environment, then the function succeeds, and the environment is unchanged.

RETURN VALUE

setenv() and unsetenv() functions return zero on success, or -1 on error, with errno set to indicate the error.

ERRORS

EINVAL
name is NULL, points to a string of length 0, or contains an ‘=’ character.

ENOMEM
Insufficient memory to add a new variable to the environment.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setenv(), unsetenv()

Thread safetyMT-Unsafe const:env

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, 4.3BSD.

Prior to glibc 2.2.2, unsetenv() was prototyped as returning void; more recent glibc versions follow the POSIX.1-compliant prototype shown in the SYNOPSIS.

CAVEATS

POSIX.1 does not require setenv() or unsetenv() to be reentrant.

BUGS

POSIX.1 specifies that if name contains an ‘=’ character, then setenv() should fail with the error EINVAL; however, versions of glibc before glibc 2.3.4 allowed an ‘=’ sign in name.

SEE ALSO

clearenv(3), getenv(3), putenv(3), environ(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2702 - Linux cli command zip_set_file_comment

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_set_file_comment and provides detailed information about the command zip_set_file_comment, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_set_file_comment.

libzip (-lzip)

The

function is the obsolete version of

The only differences are the type of the

argument and the additional

argument.

is the same as calling

with an empty

argument.

was added in libzip 0.7. In libzip 0.10 the type of

was changed from

to

It was deprecated in libzip 0.11, use

instead.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2703 - Linux cli command Number_Bytes_Humanpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Number_Bytes_Humanpm and provides detailed information about the command Number_Bytes_Humanpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Number_Bytes_Humanpm.

NAME 🖥️ Number_Bytes_Humanpm 🖥️

Convert byte count to human readable format

SYNOPSIS

use Number::Bytes::Human qw(format_bytes parse_bytes); $size = format_bytes(0); # 0 $size = format_bytes(2*1024); # 2.0K $size = format_bytes(1_234_890, bs => 1000); # 1.3M $size = format_bytes(1E9, bs => 1000); # 1.0G my $bytes = parse_bytes(1.0K); # 1024 my $bytes = parse_bytes(1.0KB); # 1000, SI unit my $bytes = parse_bytes(1.0KiB); # 1024, SI unit # the OO way $human = Number::Bytes::Human->new(bs => 1000, si => 1); $size = $human->format(1E7); # 10MB $bytes = $human->parse(10MB); # 10*1000*1000 $bytes = $human->parse(10MiB); # 10*1024*1024 $bytes = $human->parse(10M); # Error, no SI unit $human->set_options(zero => -); $size = $human->format(0); # - $bytes = $human->parse(-); # 0 $human = Number::Bytes::Human->new(bs => 1000, round_style => round, precision => 2); $size = $human->format(10240000); # 10.24MB

DESCRIPTION

THIS IS ALPHA SOFTWARE: THE DOCUMENTATION AND THE CODE WILL SUFFER CHANGES SOME DAY (THANKS, GOD!).

This module provides a formatter which turns byte counts to usual readable format, like ‘2.0K’, ‘3.1G’, ‘100B’. It was inspired in the -h option of Unix utilities like du, df and ls for human-readable output.

From the FreeBSD man page of df: http://www.freebsd.org/cgi/man.cgi?query=df

“Human-readable” output. Use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte in order to reduce the number of digits to four or fewer using base 2 for sizes. byte B kilobyte K = 2**10 B = 1024 B megabyte M = 2**20 B = 1024 * 1024 B gigabyte G = 2**30 B = 1024 * 1024 * 1024 B terabyte T = 2**40 B = 1024 * 1024 * 1024 * 1024 B petabyte P = 2**50 B = 1024 * 1024 * 1024 * 1024 * 1024 B exabyte E = 2**60 B = 1024 * 1024 * 1024 * 1024 * 1024 * 1024 B zettabyte Z = 2**70 B = 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 B yottabyte Y = 2**80 B = 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 B

I have found this link to be quite useful:

http://www.t1shopper.com/tools/calculate/

If you feel like a hard-drive manufacturer, you can start counting bytes by powers of 1000 (instead of the generous 1024). Just use bs => 1000.

But if you are a floppy disk manufacturer and want to start counting in units of 1024000 (for your 1.44 MB disks)? Then use bs => 1_024_000.

If you feel like a purist academic, you can force the use of metric prefixes according to the Dec 1998 standard by the IEC. Never mind the units for base 1000 are (B, kB, MB, GB, TB, PB, EB, ZB, YB) and, even worse, the ones for base 1024 are (B, KiB, MiB, GiB, TiB, PiB, EiB, ZiB, YiB) with the horrible names: bytes, kibibytes, mebibytes, etc. All you have to do is to use si => 1. Ain’t that beautiful the SI system? Read about it:

http://physics.nist.gov/cuu/Units/binary.html

You can try a pure Perl "ls -lh"-inspired command with the one-liner, er, two-liner:

$ perl -MNumber::Bytes::Human=format_bytes \ -e printf “%5s %s “, format_bytes(-s), $_ for @ARGV *

Why to write such a module? Because if people can write such things in C, it can be written much easier in Perl and then reused, refactored, abused. And then, when it is much improved, some brave soul can port it back to C (if only for the warm feeling of painful programming).

It is also possible to parse human readable formatted bytes. The automatic format detection recognizes SI units with the blocksizes of 1000 and 1024 respectively and additionally the customary K / M / G etc. with blocksize 1024. When si => 1 is added to the options only SI units are recognized. Explicitly specifying a blocksize changes it for all detected units.

OBJECTS

An alternative to the functional style of this module is the OO fashion. This is useful for avoiding the unnecessary parsing of the arguments over and over if you have to format lots of numbers

for (@sizes) { my $fmt_size = format_bytes($_, @args); … }

versus

my $human = Number::Format::Bytes->new(@args); for (@sizes) { my $fmt_size = $human->format($_); … }

for TODO [TODO] MAKE IT JUST A MATTER OF STYLE: memoize _parse_args() $seed == undef

FUNCTIONS

format_bytes
$h_size = format_bytes($size, @options); Turns a byte count (like 1230) to a readable format like ‘1.3K’. You have a bunch of options to play with. See the section OPTIONS to know the details.

parse_bytes
$size = parse_bytes($h_size, @options); Turns a human readable byte count into a number of the equivalent bytes.

METHODS

new
$h = Number::Bytes::Human->new(@options); The constructor. For details on the arguments, see the section OPTIONS.

format
$h_size = $h->format($size); Turns a byte count (like 1230) to a readable format like ‘1.3K’. The statements $h = Number::Bytes::Human->new(@options); $h_size = $h->format($size); are equivalent to $h_size = format_bytes($size, @options), with only one pass for the option arguments.

parse
$size = $h->parse($h_size) Turns a human readable byte count into the number of bytes. The statements $h = Number::Bytes::Human->new(@options); $size = $h->format($h_size); are equivalent to $size = parse_bytes($h_size, @options), with only one pass for the option arguments.

set_options
$h->set_options(@options); To alter the options of a Number::Bytes::Human object. See OPTIONS.

OPTIONS

BASE
block | base | block_size | bs => 1000 | 1024 | 1024000 base_1024 | block_1024 | 1024 => 1 base_1000 | block_1000 | 1000 => 1 The base to be used: 1024 (default), 1000 or 1024000. Any other value throws an exception.

SUFFIXES
suffixes => 1000 | 1024 | 1024000 | si_1000 | si_1024 | $arrayref By default, the used suffixes stand for ‘’, ‘K’, ‘M’, … for base 1024 and ‘’, ‘k’, ‘M’, … for base 1000 (which are indeed the usual metric prefixes with implied unit as bytes, ‘B’). For the weird 1024000 base, suffixes are ‘’, ‘M’, ‘T’, etc.

ZERO
zero => string | undef The string 0 maps to (‘0’ by default). If undef, the general case is used. The string may contain ‘%S’ in which case the suffix for byte is used. format_bytes(0, zero => -) => -

METRIC SYSTEM
si => 1

ROUND
round_function => $coderef round_style => ceil | floor | round | trunc

TO_S

QUIET

quiet => 1 Suppresses the warnings emitted. Currently, the only case is when the number is large than $base**(@suffixes+1).

PRECISION
precision => <integer> default = 1 sets the precicion of digits, only apropreacte for round_style ‘round’ or if you want to accept it in as the second parameter to your custome round_function.

PRECISION_CUTOFF
precision_cutoff => <integer> default = 1 when the number of digits exceeds this number causes the precision to be cutoff (was default behaviour in 0.07 and below)

EXPORT

It is alright to import format_bytes and parse_bytes, but nothing is exported by default.

DIAGNOSTICS

“unknown round style $style”; “invalid base: $block (should be 1024, 1000 or 1024000)”; “round function ($args{round_function}) should be a code ref”; “suffixes ($args{suffixes}) should be 1000, 1024, 1024000 or an array ref”; “negative numbers are not allowed” (??)

SEE ALSO

lib/human.c and lib/human.h in GNU coreutils.

The _convert() solution by COG in Filesys::DiskUsage.

BUGS

Please report bugs via Github <https://github.com/aferreira/cpan-Number-Bytes-Human/issues>.

AUTHOR

Adriano R. Ferreira, <[email protected]>

Dagobert Michelsen, <[email protected]>

COPYRIGHT AND LICENSE

Copyright (C) 2005-2017 by Adriano R. Ferreira

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2704 - Linux cli command lconvtype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lconvtype and provides detailed information about the command lconvtype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lconvtype.

NAME 🖥️ lconvtype 🖥️

numeric formatting information

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <locale.h>
struct lconv { /* Values in the "C" locale: */
 char *decimal_point; /* "." */
 char *thousands_sep; /* "" */
 char *grouping; /* "" */
 char *mon_decimal_point; /* "" */
 char *mon_thousands_sep; /* "" */
 char *mon_grouping; /* "" */
 char *positive_sign; /* "" */
 char *negative_sign; /* "" */
 char *currency_symbol; /* "" */
 char frac_digits; /* CHAR_MAX */
 char p_cs_precedes; /* CHAR_MAX */
 char n_cs_precedes; /* CHAR_MAX */
 char p_sep_by_space; /* CHAR_MAX */
 char n_sep_by_space; /* CHAR_MAX */
 char p_sign_posn; /* CHAR_MAX */
 char n_sign_posn; /* CHAR_MAX */
 char *int_curr_symbol; /* "" */
 char int_frac_digits; /* CHAR_MAX */
 char int_p_cs_precedes; /* CHAR_MAX */
 char int_n_cs_precedes; /* CHAR_MAX */
 char int_p_sep_by_space; /* CHAR_MAX */
 char int_n_sep_by_space; /* CHAR_MAX */
 char int_p_sign_posn; /* CHAR_MAX */
 char int_n_sign_posn; /* CHAR_MAX */
};

DESCRIPTION

Contains members related to the formatting of numeric values. In the “C” locale, its members have the values shown in the comments above.

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001.

SEE ALSO

setlocale(3), localeconv(3), charsets(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2705 - Linux cli command XtGetErrorDatabaseText

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtGetErrorDatabaseText and provides detailed information about the command XtGetErrorDatabaseText, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtGetErrorDatabaseText.

NAME 🖥️ XtGetErrorDatabaseText 🖥️

obtain error database

SYNTAX

#include <X11/Intrinsic.h>

XrmDatabase *XtGetErrorDatabase(void);

void XtGetErrorDatabaseText(const char *name, const char *type, const char *class, const char *defaultMsg, char *buffer_return, int nbytes);

ARGUMENTS

buffer_return
Specifies the buffer into which the error message is to be returned.

class
Specifies the resource class of the error message.

default
Specifies the default message to use.

name

type
Specifies the name and type that are concatenated to form the resource name of the error message.

nbytes
Specifies the size of the buffer in bytes.

DESCRIPTION

The XtGetErrorDatabase function has been superceded by XtAppGetErrorDatabase.

The XtGetErrorDatabaseText function has been superceded by XtAppGetErrorDatabaseText.

SEE ALSO

XtAppGetErrorDatabase(3) XtAppGetErrorDatabaseText(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2706 - Linux cli command Image_ExifTool_PostScriptpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_PostScriptpm and provides detailed information about the command Image_ExifTool_PostScriptpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_PostScriptpm.

NAME 🖥️ Image_ExifTool_PostScriptpm 🖥️

Read PostScript meta information

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This code reads meta information from EPS (Encapsulated PostScript), PS (PostScript) and AI (Adobe Illustrator) files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://partners.adobe.com/public/developer/en/ps/5002.EPSF_Spec.pdf>

<http://partners.adobe.com/public/developer/en/ps/5001.DSC_Spec.pdf>

<http://partners.adobe.com/public/developer/en/illustrator/sdk/AI7FileFormat.pdf>

SEE ALSO

“PostScript Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2707 - Linux cli command IO_Socket_INET6pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command IO_Socket_INET6pm and provides detailed information about the command IO_Socket_INET6pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the IO_Socket_INET6pm.

NAME 🖥️ IO_Socket_INET6pm 🖥️

[ DEPRECATED!! ] Object interface for AF_INET/AF_INET6 domain sockets

SYNOPSIS

use IO::Socket::INET6;

WARNING

WARNING!! IO-Socket-INET6 is deprecated.

IO-Socket-INET6 was now succeeded by Paul Evans’ IO::Socket::IP . Please convert old code from IO-Socket-INET6 to IO-Socket-IP.

DESCRIPTION

IO::Socket::INET6 provides an object interface to creating and using sockets in either AF_INET or AF_INET6 domains. It is built upon the IO::Socket interface and inherits all the methods defined by IO::Socket.

CONSTRUCTOR

new ( [ARGS] )
Creates an IO::Socket::INET6 object, which is a reference to a newly created symbol (see the Symbol package). new optionally takes arguments, these arguments are in key-value pairs. In addition to the key-value pairs accepted by IO::Socket, IO::Socket::INET6 provides. Domain Address family AF_INET | AF_INET6 | AF_UNSPEC (default) PeerAddr Remote host address <hostname>[:<port>] PeerHost Synonym for PeerAddr PeerPort Remote port or service <service>[(<no>)] | <no> PeerFlow Remote flow information PeerScope Remote address scope LocalAddr Local host bind address hostname[:port] LocalHost Synonym for LocalAddr LocalPort Local host bind port <service>[(<no>)] | <no> LocalFlow Local host flow information LocalScope Local host address scope Proto Protocol name (or number) “tcp” | “udp” | … Type Socket type SOCK_STREAM | SOCK_DGRAM | … Listen Queue size for listen ReuseAddr Set SO_REUSEADDR before binding Reuse Set SO_REUSEADDR before binding (deprecated, prefer ReuseAddr) ReusePort Set SO_REUSEPORT before binding Broadcast Set SO_BROADCAST before binding Timeout Timeout value for various operations MultiHomed Try all addresses for multi-homed hosts Blocking Determine if connection will be blocking mode If Listen is defined then a listen socket is created, else if the socket type, which is derived from the protocol, is SOCK_STREAM then connect() is called. Although it is not illegal, the use of MultiHomed on a socket which is in non-blocking mode is of little use. This is because the first connect will never fail with a timeout as the connect call will not block. The PeerAddr can be a hostname, the IPv6-address on the 2001:800:40:2a05::10 form , or the IPv4-address on the 213.34.234.245 form. The PeerPort can be a number or a symbolic service name. The service name might be followed by a number in parenthesis which is used if the service is not known by the system. The PeerPort specification can also be embedded in the PeerAddr by preceding it with a :, and closing the IPv6 address on brackets [] if necessary: 124.678.12.34:23,[2a05:345f::10]:23,any.server.com:23. If Domain is not given, AF_UNSPEC is assumed, that is, both AF_INET and AF_INET6 will be both considered when resolving DNS names. AF_INET6 has priority. If you guess you are in trouble not reaching the peer,(the service is not available via AF_INET6 but AF_INET) you can either try Multihomed (try any address/family until reach) or concrete your address family (AF_INET, AF_INET6). If Proto is not given and you specify a symbolic PeerPort port, then the constructor will try to derive Proto from the service name. As a last resort Proto tcp is assumed. The Type parameter will be deduced from Proto if not specified. If the constructor is only passed a single argument, it is assumed to be a PeerAddr specification. If Blocking is set to 0, the connection will be in nonblocking mode. If not specified it defaults to 1 (blocking mode). Examples: $sock = IO::Socket::INET6->new(PeerAddr => www.perl.org, PeerPort => http(80), Proto => tcp); Suppose either you have no IPv6 connectivity or www.perl.org has no http service on IPv6. Then, (Trying all address/families until reach) $sock = IO::Socket::INET6->new(PeerAddr => www.perl.org, PeerPort => http(80), Multihomed => 1 , Proto => tcp); (Concrete to IPv4 protocol) $sock = IO::Socket::INET6->new(PeerAddr => www.perl.org, PeerPort => http(80), Domain => AF_INET , Proto => tcp); $sock = IO::Socket::INET6->new(PeerAddr => localhost:smtp(25)); $sock = IO::Socket::INET6->new(Listen => 5, LocalAddr => localhost, LocalPort => 9000, Proto => tcp); $sock = IO::Socket::INET6->new([::1]:25); $sock = IO::Socket::INET6->new(PeerPort => 9999, PeerAddr => Socket6::inet_ntop(AF_INET6,in6addr_broadcast), Proto => udp, LocalAddr => localhost, Broadcast => 1 ) or die “Cant bind : $@ “; NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE As of VERSION 1.18 all IO::Socket objects have autoflush turned on by default. This was not the case with earlier releases. NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE

METHODS

accept ()
See IO::Socket::INET.

bind ()
See IO::Socket::INET.

configure ()
This function exists in this module, but I (= Shlomi Fish) don’t know what it does, or understand it. It’s also not tested anywhere. I’ll be happy to be enlightened.

connect ()
See IO::Socket::INET.

sockaddr ()
Return the address part of the sockaddr structure for the socket

sockdomain()
Returns the domain of the socket - AF_INET or AF_INET6 or whatever.

sockport ()
Return the port number that the socket is using on the local host

sockhost ()
Return the address part of the sockaddr structure for the socket in a text form (2001:800:40:2a05::10 or 245.245.13.27)

sockflow ()
Return the flow information part of the sockaddr structure for the socket

sockscope ()
Return the scope identification part of the sockaddr structure for the socket

peeraddr ()
Return the address part of the sockaddr structure for the socket on the peer host

peerport ()
Return the port number for the socket on the peer host.

peerhost ()
Return the address part of the sockaddr structure for the socket on the peer host in a text form (2001:800:40:2a05::10 or 245.245.13.27)

peerflow ()
Return the flow information part of the sockaddr structure for the socket on the peer host

peerscope ()
Return the scope identification part of the sockaddr structure for the socket on the peer host

REPOSITORY

The Subversion repository for this module carrying complete version history and other information is:

<http://svn.berlios.de/svnroot/repos/web-cpan/IO-Socket-INET6/>

SEE ALSO

Socket,Socket6, IO::Socket

AUTHOR

This program is based on IO::Socket::INET by Graham Barr <[email protected]> and currently maintained by the Perl Porters.

Modified by Rafael Martinez Torres <[email protected]> and Euro6IX project.

Modified further by Shlomi Fish <[email protected]>, while disclaiming all copyrights.

COPYRIGHT

Copyright (c) 2003- Rafael Martinez Torres <[email protected]>.

Copyright (c) 2003- Euro6IX project.

Copyright (c) 1996-8 Graham Barr <[email protected]>.

All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2708 - Linux cli command sigeventtype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigeventtype and provides detailed information about the command sigeventtype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigeventtype.

NAME 🖥️ sigeventtype 🖥️

structure for notification from asynchronous routines

SYNOPSIS

#include <signal.h>
struct sigevent {
 int sigev_notify; /* Notification type */
 int sigev_signo; /* Signal number */
 union sigval sigev_value; /* Data passed with notification */
 void (*sigev_notify_function)(union sigval);
  /* Notification function
  (SIGEV_THREAD) */
 pthread_attr_t *sigev_notify_attributes;
  /* Notification attributes */
 /* Linux only: */
 pid_t sigev_notify_thread_id;
  /* ID of thread to signal
  (SIGEV_THREAD_ID) */
};
union sigval { /* Data passed with notification */
 int sival_int; /* Integer value */
 void *sival_ptr; /* Pointer value */
};

DESCRIPTION

sigevent

The sigevent structure is used by various APIs to describe the way a process is to be notified about an event (e.g., completion of an asynchronous request, expiration of a timer, or the arrival of a message).

The definition shown in the SYNOPSIS is approximate: some of the fields in the sigevent structure may be defined as part of a union. Programs should employ only those fields relevant to the value specified in sigev_notify.

The sigev_notify field specifies how notification is to be performed. This field can have one of the following values:

SIGEV_NONE
A “null” notification: don’t do anything when the event occurs.

SIGEV_SIGNAL
Notify the process by sending the signal specified in sigev_signo.

If the signal is caught with a signal handler that was registered using the sigaction(2) SA_SIGINFO flag, then the following fields are set in the siginfo_t structure that is passed as the second argument of the handler:

si_code
This field is set to a value that depends on the API delivering the notification.

si_signo
This field is set to the signal number (i.e., the same value as in sigev_signo).

si_value
This field is set to the value specified in sigev_value.

Depending on the API, other fields may also be set in the siginfo_t structure.

The same information is also available if the signal is accepted using sigwaitinfo(2).

SIGEV_THREAD
Notify the process by invoking sigev_notify_function “as if” it were the start function of a new thread. (Among the implementation possibilities here are that each timer notification could result in the creation of a new thread, or that a single thread is created to receive all notifications.) The function is invoked with sigev_value as its sole argument. If sigev_notify_attributes is not NULL, it should point to a pthread_attr_t structure that defines attributes for the new thread (see pthread_attr_init(3)).

SIGEV_THREAD_ID (Linux-specific)
Currently used only by POSIX timers; see timer_create(2).

sigval

Data passed with a signal.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

<aio.h> and <time.h> define sigevent since POSIX.1-2008.

NOTES

The following headers also provide sigevent: <aio.h>, <mqueue.h>, and <time.h>.

SEE ALSO

timer_create(2), getaddrinfo_a(3), lio_listio(3), mq_notify(3), pthread_sigqueue(3), sigqueue(3), aiocb(3type), siginfo_t(3type)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2709 - Linux cli command TAILQ_PREV

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command TAILQ_PREV and provides detailed information about the command TAILQ_PREV, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the TAILQ_PREV.

NAME 🖥️ TAILQ_PREV 🖥️

implementation of a doubly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
TAILQ_ENTRY(TYPE);
TAILQ_HEAD(HEADNAME, TYPE);
TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD head);
void TAILQ_INIT(TAILQ_HEAD *head);
int TAILQ_EMPTY(TAILQ_HEAD *head);
void TAILQ_INSERT_HEAD(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_TAIL(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_AFTER(TAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_FIRST(TAILQ_HEAD *head);
struct TYPE *TAILQ_LAST(TAILQ_HEAD *head, HEADNAME);
struct TYPE *TAILQ_PREV(struct TYPE *elm, HEADNAME, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_NEXT(struct TYPE *elm, TAILQ_ENTRY NAME);
TAILQ_FOREACH(struct TYPE *var, TAILQ_HEAD *head,
 TAILQ_ENTRY NAME);
TAILQ_FOREACH_REVERSE(struct TYPE *var, TAILQ_HEAD *head, HEADNAME,
 TAILQ_ENTRY NAME);
void TAILQ_REMOVE(TAILQ_HEAD *head, struct TYPE *elm,
 TAILQ_ENTRY NAME);
void TAILQ_CONCAT(TAILQ_HEAD *head1, TAILQ_HEAD *head2,
 TAILQ_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked tail queues.

In the macro definitions, TYPE is the name of a user defined structure, that must contain a field of type TAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user defined structure that must be declared using the macro TAILQ_HEAD().

Creation

A tail queue is headed by a structure defined by the TAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the queue and the other to the last element in the queue. The elements are doubly linked so that an arbitrary element can be removed without traversing the queue. New elements can be added to the queue after an existing element, before an existing element, at the head of the queue, or at the end of the queue. A TAILQ_HEAD structure is declared as follows:

TAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the queue. A pointer to the head of the queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

TAILQ_ENTRY() declares a structure that connects the elements in the queue.

TAILQ_HEAD_INITIALIZER() evaluates to an initializer for the queue head.

TAILQ_INIT() initializes the queue referenced by

TAILQ_EMPTY() evaluates to true if there are no items on the queue. head.

Insertion

TAILQ_INSERT_HEAD() inserts the new element elm at the head of the queue.

TAILQ_INSERT_TAIL() inserts the new element elm at the end of the queue.

TAILQ_INSERT_BEFORE() inserts the new element elm before the element listelm.

TAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

TAILQ_FIRST() returns the first item on the queue, or NULL if the queue is empty.

TAILQ_LAST() returns the last item on the queue. If the queue is empty the return value is NULL.

TAILQ_PREV() returns the previous item on the queue, or NULL if this item is the first.

TAILQ_NEXT() returns the next item on the queue, or NULL if this item is the last.

TAILQ_FOREACH() traverses the queue referenced by head in the forward direction, assigning each element in turn to var. var is set to NULL if the loop completes normally, or if there were no elements.

TAILQ_FOREACH_REVERSE() traverses the queue referenced by head in the reverse direction, assigning each element in turn to var.

Removal

TAILQ_REMOVE() removes the element elm from the queue.

Other features

TAILQ_CONCAT() concatenates the queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

TAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

TAILQ_FIRST(), TAILQ_LAST(), TAILQ_PREV(), and TAILQ_NEXT() return a pointer to the first, last, previous, or next TYPE structure, respectively.

TAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

STANDARDS

BSD.

HISTORY

4.4BSD.

CAVEATS

TAILQ_FOREACH() and TAILQ_FOREACH_REVERSE() don’t allow var to be removed or freed within the loop, as it would interfere with the traversal. TAILQ_FOREACH_SAFE() and TAILQ_FOREACH_REVERSE_SAFE(), which are present on the BSDs but are not present in glibc, fix this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    TAILQ_ENTRY(entry) entries;             /* Tail queue */
};
TAILQ_HEAD(tailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct tailhead head;                   /* Tail queue head */
    int i;
    TAILQ_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    TAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    TAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    TAILQ_INSERT_AFTER(&head, n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    TAILQ_INSERT_BEFORE(n2, n3, entries);
    TAILQ_REMOVE(&head, n2, entries);       /* Deletion */
    free(n2);
                                            /* Forward traversal */
    i = 0;
    TAILQ_FOREACH(np, &head, entries)
        np->data = i++;
                                            /* Reverse traversal */
    TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = TAILQ_FIRST(&head); while (n1 != NULL) { n2 = TAILQ_NEXT(n1, entries); free(n1); n1 = n2; } TAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2710 - Linux cli command MRO_Compatpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command MRO_Compatpm and provides detailed information about the command MRO_Compatpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the MRO_Compatpm.

NAME 🖥️ MRO_Compatpm 🖥️

mro::* interface compatibility for Perls < 5.9.5

SYNOPSIS

package PPP; use base qw/Exporter/; package X; use base qw/PPP/; package Y; use base qw/PPP/; package Z; use base qw/PPP/; package FooClass; use base qw/X Y Z/; package main; use MRO::Compat; my $linear = mro::get_linear_isa(FooClass); print join(q{, }, @$linear); # Prints: FooClass, X, PPP, Exporter, Y, Z

DESCRIPTION

The mro namespace provides several utilities for dealing with method resolution order and method caching in general in Perl 5.9.5 and higher.

This module provides those interfaces for earlier versions of Perl (back to 5.6.0 anyways).

It is a harmless no-op to use this module on 5.9.5+. That is to say, code which properly uses MRO::Compat will work unmodified on both older Perls and 5.9.5+.

If you’re writing a piece of software that would like to use the parts of 5.9.5+’s mro:: interfaces that are supported here, and you want compatibility with older Perls, this is the module for you.

Some parts of this code will work better and/or faster with Class::C3::XS installed (which is an optional prereq of Class::C3, which is in turn a prereq of this package), but it’s not a requirement.

This module never exports any functions. All calls must be fully qualified with the mro:: prefix.

The interface documentation here serves only as a quick reference of what the function basically does, and what differences between MRO::Compat and 5.9.5+ one should look out for. The main docs in 5.9.5’s mro are the real interface docs, and contain a lot of other useful information.

Functions

mro::get_linear_isa($classname[, $type])

Returns an arrayref which is the linearized ISA of the given class. Uses whichever MRO is currently in effect for that class by default, or the given MRO (either c3 or dfs if specified as $type).

The linearized ISA of a class is a single ordered list of all of the classes that would be visited in the process of resolving a method on the given class, starting with itself. It does not include any duplicate entries.

Note that UNIVERSAL (and any members of UNIVERSAL’s MRO) are not part of the MRO of a class, even though all classes implicitly inherit methods from UNIVERSAL and its parents.

mro::import

This allows the use mro dfs and use mro c3 syntaxes, providing you use MRO::Compat first. Please see the USING C3 section for additional details.

mro::set_mro($classname, $type)

Sets the mro of $classname to one of the types dfs or c3. Please see the USING C3 section for additional details.

mro::get_mro($classname)

Returns the MRO of the given class (either c3 or dfs).

It considers any Class::C3-using class to have C3 MRO even before Class::C3::initialize() is called.

mro::get_isarev($classname)

Returns an arrayref of classes who are subclasses of the given classname. In other words, classes in whose @ISA hierarchy we appear, no matter how indirectly.

This is much slower on pre-5.9.5 Perls with MRO::Compat than it is on 5.9.5+, as it has to search the entire package namespace.

mro::is_universal($classname)

Returns a boolean status indicating whether or not the given classname is either UNIVERSAL itself, or one of UNIVERSAL’s parents by @ISA inheritance.

Any class for which this function returns true is universal in the sense that all classes potentially inherit methods from it.

mro::invalidate_all_method_caches

Increments PL_sub_generation, which invalidates method caching in all packages.

Please note that this is rarely necessary, unless you are dealing with a situation which is known to confuse Perl’s method caching.

mro::method_changed_in($classname)

Invalidates the method cache of any classes dependent on the given class. In MRO::Compat on pre-5.9.5 Perls, this is an alias for mro::invalidate_all_method_caches above, as pre-5.9.5 Perls have no other way to do this. It will still enforce the requirement that you pass it a classname, for compatibility.

Please note that this is rarely necessary, unless you are dealing with a situation which is known to confuse Perl’s method caching.

mro::get_pkg_gen($classname)

Returns an integer which is incremented every time a local method of or the @ISA of the given package changes on Perl 5.9.5+. On earlier Perls with this MRO::Compat module, it will probably increment a lot more often than necessary.

USING C3

While this module makes the 5.9.5+ syntaxes use mro c3 and mro::set_mro("Foo", c3) available on older Perls, it does so merely by passing off the work to Class::C3.

It does not remove the need for you to call Class::C3::initialize(), Class::C3::reinitialize(), and/or Class::C3::uninitialize() at the appropriate times as documented in the Class::C3 docs. These three functions are always provided by MRO::Compat, either via Class::C3 itself on older Perls, or directly as no-ops on 5.9.5+.

SEE ALSO

Class::C3

mro

AUTHOR

Brandon L. Black, <[email protected]>

COPYRIGHT AND LICENSE

Copyright 2007-2008 Brandon L. Black <[email protected]>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2711 - Linux cli command zip_error_strerror

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_error_strerror and provides detailed information about the command zip_error_strerror, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_error_strerror.

libzip (-lzip)

The

function returns an error message string corresponding to

like

This string will stay valid until the next call to

or until

is called.

was added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2712 - Linux cli command Image_ExifTool_PanasonicRawpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_PanasonicRawpm and provides detailed information about the command Image_ExifTool_PanasonicRawpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_PanasonicRawpm.

NAME 🖥️ Image_ExifTool_PanasonicRawpm 🖥️

Read/write Panasonic/Leica RAW/RW2/RWL meta information

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to read and write meta information in Panasonic/Leica RAW, RW2 and RWL images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.cybercom.net/~dcoffin/dcraw/>

SEE ALSO

“PanasonicRaw Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2713 - Linux cli command zip_source_function

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_function and provides detailed information about the command zip_source_function, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_function.

libzip (-lzip)

The functions

and

creates a zip source from the user-provided function

which must be of the following type:

or

are used for reporting errors and can be

When called by the library, the first argument is the

argument supplied to the function. The next two arguments are a buffer

of size

when data is passed in or expected to be returned, or else

and 0. The last argument,

specifies which action the function should perform.

Depending on the uses, there are three useful sets of commands to be supported by a

Providing streamed data (for file data added to archives). Must support

and

Same as previous, but from a source allowing reading from arbitrary offsets (also for read-only zip archive). Must additionally support

and

Same as previous, but additionally allowing writing (also for writable zip archives). Must additionally support

and

Return 1 if an empty source should be accepted as a valid zip archive. This is the default if this command is not supported by a source. File system backed sources should return 0.

Prepare the source for writing. Use this to create any temporary file(s).

Prepare the source for writing, keeping the first

bytes of the original file. Only implement this command if it is more efficient than copying the data, and if it does not destructively overwrite the original file (you still have to be able to execute

The next write should happen at byte

Reading is done.

Finish writing to the source. Replace the original data with the newly written data. Clean up temporary files or internal buffers. Subsequently opening and reading from the source should return the newly written data.

Get error information.

points to an array of two ints, which should be filled with the libzip error code and the corresponding system error code for the error that occurred. See

for details on the error codes. If the source stores error information in a zip_error_t, use

and return its return value. Otherwise, return 2 * sizeof(int).

Clean up and free all resources, including

The callback function will not be called again.

Provide information about various data. Then the data should be put in the appropriate entry in the passed

argument, and the appropriate

value must be or’ed into the

member to denote that the corresponding data has been provided. A

structure can be initialized using

If a file is a plaintext file in ASCII. Can be used by extraction tools to automatically convert line endings (part of the interal file attributes). Member

flag

The general purpose bit flag in the zip in the local and central directory headers contain information about the compression method. Member

and

to denote which members have been set; flag

The external file attributes (usually operating system-specific). Member

flag

A minimum version needed required to unpack this entry (in the usual “major * 10 + minor” format). Member

flag

One of the operating systems as defined by the

variables (see

This value affects the interpretation of the external file attributes. Member

flag

Prepare for reading.

Read data into the buffer

of size

Return the number of bytes placed into

on success, and zero for end-of-file.

Remove the underlying file. This is called if a zip archive is empty when closed.

Abort writing to the source. Discard written data. Clean up temporary files or internal buffers. Subsequently opening and reading from the source should return the original data.

Specify position to read next byte from, like

Use

to decode the arguments into the following struct:

struct zip_source_args_seek { zip_int64_t offset; int whence; };

If the size of the source’s data is known, use

to validate the arguments and compute the new offset.

Specify position to write next byte to, like

See

for details.

Get meta information for the input data.

points to an allocated

which should be initialized using

and then filled in.

For uncompressed, unencrypted data, all information is optional. However, fill in as much information as is readily available.

If the data is compressed,

and

must be filled in.

If the data is encrypted,

and

must be filled in.

Information only available after the source has been read (e.g., size) can be omitted in an earlier call.

may be called with this argument even after being called with

Return sizeof(struct zip_stat) on success.

Return bitmap specifying which commands are supported. Use

If this command is not implemented, the source is assumed to be a read source without seek support.

Return the current read offset in the source, like

Return the current write offset in the source, like

Write data to the source. Return number of bytes written.

Commands should return -1 on error.

will be called to retrieve the error code. On success, commands return 0, unless specified otherwise in the description above.

The library will always issue

before issuing

or

When it no longer wishes to read from this source, it will issue

If the library wishes to read the data again, it will issue

a second time. If the function is unable to provide the data again, it should return -1.

or

will be called before

or

When writing is complete, either

or

will be called.

and

can be issued at any time.

will only be issued in response to the function returning -1.

will be the last command issued; if

was called and succeeded,

will be called before

and similarly for

or

and

or

Upon successful completion, the created source is returned. Otherwise,

is returned and the error code in

or

is set to indicate the error (unless it is

fails if:

Required memory could not be allocated.

and

were added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2714 - Linux cli command Image_ExifTool_LIFpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_LIFpm and provides detailed information about the command Image_ExifTool_LIFpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_LIFpm.

NAME 🖥️ Image_ExifTool_LIFpm 🖥️

Read LIF meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read metadata from Leica Image File (LIF) images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

“LIF Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2715 - Linux cli command Tk_Panepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Panepm and provides detailed information about the command Tk_Panepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Panepm.

NAME 🖥️ Tk_Panepm 🖥️

A window panner

SYNOPSIS

use Tk::Pane; $pane = $mw->Scrolled(“Pane”, Name => fred, -scrollbars => soe, -sticky => we, -gridded => y ); $pane->Frame; $pane->pack;

DESCRIPTION

Tk::Pane provides a scrollable frame widget. Once created it can be treated as a frame, except it is scrollable.

OPTIONS

-gridded => direction
Specifies if the top and left edges of the pane should snap to a grid column. This option is only useful if the widgets in the pane are managed by the grid geometry manager. Possible values are x, y and xy.

-sticky => style
If Pane is larger than its requested dimensions, this option may be used to position (or stretch) the slave within its cavity. Style is a string that contains zero or more of the characters n, s, e or w. The string can optionally contains spaces or commas, but they are ignored. Each letter refers to a side (north, south, east, or west) that the slave will “stick” to. If both n and s (or e and w) are specified, the slave will be stretched to fill the entire height (or width) of its cavity.

METHODS

$pane->see($widget ?,options?)
Adjusts the view so that $widget is visable. Additional parameters in options-value pairs can be passed, each option-value pair must be one of the following

-anchor => anchor
Specifies how to make the widget visable. If not given then as much of the widget as possible is made visable. Possible values are n, s, w, e, nw, ne, sw and se. This will cause an edge on the widget to be aligned with the corresponding edge on the pane. for example nw will cause the top left of the widget to be placed at the top left of the pane. s will cause the bottom of the widget to be placed at the bottom of the pane, and as much of the widget as possible made visable in the x direction.

$pane->xview
Returns a list containing two elements, both of which are real fractions between 0 and 1. The first element gives the position of the left of the window, relative to the Pane as a whole (0.5 means it is halfway through the Pane, for example). The second element gives the position of the right of the window, relative to the Pane as a whole.

$pane->xview($widget)
Adjusts the view in the window so that widget is displayed at the left of the window.

$pane->xview(moveto => fraction)
Adjusts the view in the window so that fraction of the total width of the Pane is off-screen to the left. fraction must be a fraction between 0 and 1.

$pane->xview(scroll => number, what)
This command shifts the view in the window left or right according to number and what. Number must be an integer. What must be either units or pages or an abbreviation of one of these. If what is units, the view adjusts left or right by number*10 screen units on the display; if it is pages then the view adjusts by number screenfuls. If number is negative then widgets farther to the left become visible; if it is positive then widgets farther to the right become visible.

$pane->yview
Returns a list containing two elements, both of which are real fractions between 0 and 1. The first element gives the position of the top of the window, relative to the Pane as a whole (0.5 means it is halfway through the Pane, for example). The second element gives the position of the bottom of the window, relative to the Pane as a whole.

$pane->yview($widget)
Adjusts the view in the window so that widget is displayed at the top of the window.

$pane->yview(moveto => fraction)
Adjusts the view in the window so that fraction of the total width of the Pane is off-screen to the top. fraction must be a fraction between 0 and 1.

$pane->yview(scroll => number, what)
This command shifts the view in the window up or down according to number and what. Number must be an integer. What must be either units or pages or an abbreviation of one of these. If what is units, the view adjusts up or down by number*10 screen units on the display; if it is pages then the view adjusts by number screenfuls. If number is negative then widgets farther up become visible; if it is positive then widgets farther down become visible.

AUTHOR

Graham Barr <[email protected]>

COPYRIGHT

Copyright (c) 1997-1998 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2716 - Linux cli command TAILQ_REMOVE

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command TAILQ_REMOVE and provides detailed information about the command TAILQ_REMOVE, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the TAILQ_REMOVE.

NAME 🖥️ TAILQ_REMOVE 🖥️

implementation of a doubly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
TAILQ_ENTRY(TYPE);
TAILQ_HEAD(HEADNAME, TYPE);
TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD head);
void TAILQ_INIT(TAILQ_HEAD *head);
int TAILQ_EMPTY(TAILQ_HEAD *head);
void TAILQ_INSERT_HEAD(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_TAIL(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_AFTER(TAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_FIRST(TAILQ_HEAD *head);
struct TYPE *TAILQ_LAST(TAILQ_HEAD *head, HEADNAME);
struct TYPE *TAILQ_PREV(struct TYPE *elm, HEADNAME, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_NEXT(struct TYPE *elm, TAILQ_ENTRY NAME);
TAILQ_FOREACH(struct TYPE *var, TAILQ_HEAD *head,
 TAILQ_ENTRY NAME);
TAILQ_FOREACH_REVERSE(struct TYPE *var, TAILQ_HEAD *head, HEADNAME,
 TAILQ_ENTRY NAME);
void TAILQ_REMOVE(TAILQ_HEAD *head, struct TYPE *elm,
 TAILQ_ENTRY NAME);
void TAILQ_CONCAT(TAILQ_HEAD *head1, TAILQ_HEAD *head2,
 TAILQ_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked tail queues.

In the macro definitions, TYPE is the name of a user defined structure, that must contain a field of type TAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user defined structure that must be declared using the macro TAILQ_HEAD().

Creation

A tail queue is headed by a structure defined by the TAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the queue and the other to the last element in the queue. The elements are doubly linked so that an arbitrary element can be removed without traversing the queue. New elements can be added to the queue after an existing element, before an existing element, at the head of the queue, or at the end of the queue. A TAILQ_HEAD structure is declared as follows:

TAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the queue. A pointer to the head of the queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

TAILQ_ENTRY() declares a structure that connects the elements in the queue.

TAILQ_HEAD_INITIALIZER() evaluates to an initializer for the queue head.

TAILQ_INIT() initializes the queue referenced by

TAILQ_EMPTY() evaluates to true if there are no items on the queue. head.

Insertion

TAILQ_INSERT_HEAD() inserts the new element elm at the head of the queue.

TAILQ_INSERT_TAIL() inserts the new element elm at the end of the queue.

TAILQ_INSERT_BEFORE() inserts the new element elm before the element listelm.

TAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

TAILQ_FIRST() returns the first item on the queue, or NULL if the queue is empty.

TAILQ_LAST() returns the last item on the queue. If the queue is empty the return value is NULL.

TAILQ_PREV() returns the previous item on the queue, or NULL if this item is the first.

TAILQ_NEXT() returns the next item on the queue, or NULL if this item is the last.

TAILQ_FOREACH() traverses the queue referenced by head in the forward direction, assigning each element in turn to var. var is set to NULL if the loop completes normally, or if there were no elements.

TAILQ_FOREACH_REVERSE() traverses the queue referenced by head in the reverse direction, assigning each element in turn to var.

Removal

TAILQ_REMOVE() removes the element elm from the queue.

Other features

TAILQ_CONCAT() concatenates the queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

TAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

TAILQ_FIRST(), TAILQ_LAST(), TAILQ_PREV(), and TAILQ_NEXT() return a pointer to the first, last, previous, or next TYPE structure, respectively.

TAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

STANDARDS

BSD.

HISTORY

4.4BSD.

CAVEATS

TAILQ_FOREACH() and TAILQ_FOREACH_REVERSE() don’t allow var to be removed or freed within the loop, as it would interfere with the traversal. TAILQ_FOREACH_SAFE() and TAILQ_FOREACH_REVERSE_SAFE(), which are present on the BSDs but are not present in glibc, fix this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    TAILQ_ENTRY(entry) entries;             /* Tail queue */
};
TAILQ_HEAD(tailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct tailhead head;                   /* Tail queue head */
    int i;
    TAILQ_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    TAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    TAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    TAILQ_INSERT_AFTER(&head, n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    TAILQ_INSERT_BEFORE(n2, n3, entries);
    TAILQ_REMOVE(&head, n2, entries);       /* Deletion */
    free(n2);
                                            /* Forward traversal */
    i = 0;
    TAILQ_FOREACH(np, &head, entries)
        np->data = i++;
                                            /* Reverse traversal */
    TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = TAILQ_FIRST(&head); while (n1 != NULL) { n2 = TAILQ_NEXT(n1, entries); free(n1); n1 = n2; } TAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2717 - Linux cli command namespace_cleanpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command namespace_cleanpm and provides detailed information about the command namespace_cleanpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the namespace_cleanpm.

NAME 🖥️ namespace_cleanpm 🖥️

Keep imports and functions out of your namespace

SYNOPSIS

package Foo; use warnings; use strict; use Carp qw(croak); # croak will be removed sub bar { 23 } # bar will be removed # remove all previously defined functions use namespace::clean; sub baz { bar() } # baz still defined, bar still bound # begin to collection function names from here again no namespace::clean; sub quux { baz() } # quux will be removed # remove all functions defined after the no unimport use namespace::clean; # Will print: No, No, Yes and No print +(_ _PACKAGE_ _->can(croak) ? Yes : No), " “; print +(_ _PACKAGE_ _->can(bar) ? Yes : No), " “; print +(_ _PACKAGE_ _->can(baz) ? Yes : No), " “; print +(_ _PACKAGE_ _->can(quux) ? Yes : No), " “; 1;

DESCRIPTION

Keeping packages clean

When you define a function, or import one, into a Perl package, it will naturally also be available as a method. This does not per se cause problems, but it can complicate subclassing and, for example, plugin classes that are included via multiple inheritance by loading them as base classes.

The namespace::clean pragma will remove all previously declared or imported symbols at the end of the current package’s compile cycle. Functions called in the package itself will still be bound by their name, but they won’t show up as methods on your class or instances.

By unimporting via no you can tell namespace::clean to start collecting functions for the next use namespace::clean; specification.

You can use the -except flag to tell namespace::clean that you don’t want it to remove a certain function or method. A common use would be a module exporting an import method along with some functions:

use ModuleExportingImport; use namespace::clean -except => [qw( import )];

If you just want to -except a single sub, you can pass it directly. For more than one value you have to use an array reference.

Late binding caveat

Note that the technique used by this module relies on perl having resolved all names to actual code references during the compilation of a scope. While this is almost always what the interpreter does, there are some exceptions, notably the sort SUBNAME style of the sort built-in invocation. The following example will not work, because sort does not try to resolve the function name to an actual code reference until runtime.

use MyApp::Utils my_sorter; use namespace::clean; my @sorted = sort my_sorter @list;

You need to work around this by forcing a compile-time resolution like so:

use MyApp::Utils my_sorter; use namespace::clean; my $my_sorter_cref = \my_sorter; my @sorted = sort $my_sorter_cref @list;

Explicitly removing functions when your scope is compiled

It is also possible to explicitly tell namespace::clean what packages to remove when the surrounding scope has finished compiling. Here is an example:

package Foo; use strict; # blessed NOT available sub my_class { use Scalar::Util qw( blessed ); use namespace::clean qw( blessed ); # blessed available return blessed shift; } # blessed NOT available

Moose

When using namespace::clean together with Moose you want to keep the installed meta method. So your classes should look like:

package Foo; use Moose; use namespace::clean -except => meta; …

Same goes for Moose::Role.

Cleaning other packages

You can tell namespace::clean that you want to clean up another package instead of the one importing. To do this you have to pass in the -cleanee option like this:

package My::MooseX::namespace::clean; use strict; use namespace::clean (); # no cleanup, just load sub import { namespace::clean->import( -cleanee => scalar(caller), -except => meta, ); }

If you don’t care about namespace::cleans discover-and--except logic, and just want to remove subroutines, try clean_subroutines.

METHODS

clean_subroutines

This exposes the actual subroutine-removal logic.

namespace::clean->clean_subroutines($cleanee, qw( subA subB ));

will remove subA and subB from $cleanee. Note that this will remove the subroutines immediately and not wait for scope end. If you want to have this effect at a specific time (e.g. namespace::clean acts on scope compile end) it is your responsibility to make sure it runs at that time.

import

Makes a snapshot of the current defined functions and installs a B::Hooks::EndOfScope hook in the current scope to invoke the cleanups.

unimport

This method will be called when you do a

no namespace::clean;

It will start a new section of code that defines functions to clean up.

get_class_store

This returns a reference to a hash in a passed package containing information about function names included and excluded from removal.

get_functions

Takes a class as argument and returns all currently defined functions in it as a hash reference with the function name as key and a typeglob reference to the symbol as value.

IMPLEMENTATION DETAILS

This module works through the effect that a

delete $SomePackage::{foo};

will remove the foo symbol from $SomePackage for run time lookups (e.g., method calls) but will leave the entry alive to be called by already resolved names in the package itself. namespace::clean will restore and therefor in effect keep all glob slots that aren’t CODE.

A test file has been added to the perl core to ensure that this behaviour will be stable in future releases.

Just for completeness sake, if you want to remove the symbol completely, use undef instead.

SEE ALSO

B::Hooks::EndOfScope

THANKS

Many thanks to Matt S Trout for the inspiration on the whole idea.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by AUTHORS

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2718 - Linux cli command pcap_injectpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_injectpcap and provides detailed information about the command pcap_injectpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_injectpcap.

NAME 🖥️ pcap_injectpcap 🖥️

transmit a packet

SYNOPSIS

#include <pcap/pcap.h>
int pcap_inject(pcap_t *p, const void *buf, size_t size);
int pcap_sendpacket(pcap_t *p, const u_char *buf, int size);

DESCRIPTION

pcap_inject() sends a raw packet through the network interface; buf points to the data of the packet, including the link-layer header, and size is the number of bytes in the packet.

Note that, even if you successfully open the network interface, you might not have permission to send packets on it, or it might not support sending packets; as pcap_open_live(3PCAP) doesn’t have a flag to indicate whether to open for capturing, sending, or capturing and sending, you cannot request an open that supports sending and be notified at open time whether sending will be possible. Note also that some devices might not support sending packets.

Note that, on some platforms, the link-layer header of the packet that’s sent might not be the same as the link-layer header of the packet supplied to pcap_inject(), as the source link-layer address, if the header contains such an address, might be changed to be the address assigned to the interface on which the packet it sent, if the platform doesn’t support sending completely raw and unchanged packets. Even worse, some drivers on some platforms might change the link-layer type field to whatever value libpcap used when attaching to the device, even on platforms that do nominally support sending completely raw and unchanged packets.

pcap_sendpacket() is like pcap_inject(), but it returns 0 on success, rather than returning the number of bytes written. (pcap_inject() comes from OpenBSD; pcap_sendpacket() comes from WinPcap/Npcap. Both are provided for compatibility.)

RETURN VALUE

pcap_inject() returns the number of bytes written on success, PCAP_ERROR_NOT_ACTIVATED if called on a capture handle that has been created but not activated, and PCAP_ERROR on other errors.

pcap_sendpacket() returns 0 on success, PCAP_ERROR_NOT_ACTIVATED if called on a capture handle that has been created but not activated, and PCAP_ERROR on other errors.

If PCAP_ERROR is returned, pcap_geterr(3PCAP) or pcap_perror(3PCAP) may be called with p as an argument to fetch or display the error text.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2719 - Linux cli command Sub_Exporter_Cookbookpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Sub_Exporter_Cookbookpm and provides detailed information about the command Sub_Exporter_Cookbookpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Sub_Exporter_Cookbookpm.

NAME 🖥️ Sub_Exporter_Cookbookpm 🖥️

useful, demonstrative, or stupid Sub::Exporter tricks

VERSION

version 0.990

OVERVIEW

Sub::Exporter is a fairly simple tool, and can be used to achieve some very simple goals. Its basic behaviors and their basic application (that is, traditional exporting of routines) are described in Sub::Exporter::Tutorial and Sub::Exporter. This document presents applications that may not be immediately obvious, or that can demonstrate how certain features can be put to use (for good or evil).

PERL VERSION

This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years.

Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl.

THE RECIPES

Exporting Methods as Routines

With Exporter.pm, exporting methods is a non-starter. Sub::Exporter makes it simple. By using the curry_method utility provided in Sub::Exporter::Util, a method can be exported with the invocant built in.

package Object::Strenuous; use Sub::Exporter::Util curry_method; use Sub::Exporter -setup => { exports => [ objection => curry_method(new) ], };

With this configuration, the importing code may contain:

my $obj = objection(“irrelevant”);

…and this will be equivalent to:

my $obj = Object::Strenuous->new(“irrelevant”);

The built-in invocant is determined by the invocant for the import method. That means that if we were to subclass Object::Strenuous as follows:

package Object::Strenuous::Repeated; @ISA = Object::Strenuous;

…then importing objection from the subclass would build-in that subclass.

Finally, since the invocant can be an object, you can write something like this:

package Cypher; use Sub::Exporter::Util curry_method; use Sub::Exporter -setup => { exports => [ encypher => curry_method ], };

with the expectation that import will be called on an instantiated Cypher object:

BEGIN { my $cypher = Cypher->new( … ); $cypher->import(encypher); }

Now there is a globally-available encypher routine which calls the encypher method on an otherwise unavailable Cypher object.

Exporting Methods as Methods

While exporting modules usually export subroutines to be called as subroutines, it’s easy to use Sub::Exporter to export subroutines meant to be called as methods on the importing package or its objects.

Here’s a trivial (and naive) example:

package Mixin::DumpObj; use Data::Dumper; use Sub::Exporter -setup => { exports => [ qw(dump) ] }; sub dump { my ($self) = @_; return Dumper($self); }

When writing your own object class, you can then import dump to be used as a method, called like so:

$object->dump;

By assuming that the importing class will provide a certain interface, a method-exporting module can be used as a simple plugin:

package Number::Plugin::Upto; use Sub::Exporter -setup => { into => Number, exports => [ qw(upto) ], groups => [ default => [ qw(upto) ] ], }; sub upto { my ($self) = @_; return 1 .. abs($self->as_integer); }

The into line in the configuration says that this plugin will export, by default, into the Number package, not into the use-ing package. It can be exported anyway, though, and will work as long as the destination provides an as_integer method like the one it expects. To import it to a different destination, one can just write:

use Number::Plugin::Upto { into => Quantity };

Mixing-in Complex External Behavior

When exporting methods to be used as methods (see above), one very powerful option is to export methods that are generated routines that maintain an enclosed reference to the exporting module. This allows a user to import a single method which is implemented in terms of a complete, well-structured package.

Here is a very small example:

package Data::Analyzer; use Sub::Exporter -setup => { exports => [ analyze => \generate_analyzer ], }; sub _generate_analyzer { my ($mixin, $name, $arg, $col) = @_; return sub { my ($self) = @_; my $values = [ $self->values ]; my $analyzer = $mixin->new($values); $analyzer->perform_analysis; $analyzer->aggregate_results; return $analyzer->summary; }; }

If imported by any package providing a values method, this plugin will provide a single analyze method that acts as a simple interface to a more complex set of behaviors.

Even more importantly, because the $mixin value will be the invocant on which the import was actually called, one can subclass Data::Analyzer and replace only individual pieces of the complex behavior, making it easy to write complex, subclassable toolkits with simple single points of entry for external interfaces.

Exporting Constants

While Sub::Exporter isn’t in the constant-exporting business, it’s easy to export constants by using one of its sister modules, Package::Generator.

package Important::Constants; use Sub::Exporter -setup => { collectors => [ constants => \set_constants ], }; sub _set_constants { my ($class, $value, $data) = @_; Package::Generator->assign_symbols( $data->{into}, [ MEANING_OF_LIFE => \42, ONE_TRUE_BASE => \13, FACTORS => [ 6, 9 ], ], ); return 1; }

Then, someone can write:

use Important::Constants constants; print “The factors @FACTORS produce $MEANING_OF_LIFE in $ONE_TRUE_BASE.”;

(The constants must be exported via a collector, because they are effectively altering the importing class in a way other than installing subroutines.)

Altering the Importer’s @ISA

It’s trivial to make a collector that changes the inheritance of an importing package:

use Sub::Exporter -setup => { collectors => { -base => \make_base }, }; sub _make_base { my ($class, $value, $data) = @_; my $target = $data->{into}; push @{"$target:ISA"}, $class; }

Then, the user of your class can write:

use Some::Class -base;

and become a subclass. This can be quite useful in building, for example, a module that helps build plugins. We may want a few utilities imported, but we also want to inherit behavior from some base plugin class;

package Framework::Util; use Sub::Exporter -setup => { exports => [ qw(log global_config) ], groups => [ _plugin => [ qw(log global_config) ] collectors => { -plugin => \become_plugin }, }; sub _become_plugin { my ($class, $value, $data) = @_; my $target = $data->{into}; push @{"$target:ISA"}, $class->plugin_base_class; push @{ $data->{import_args} }, -_plugin; }

Now, you can write a plugin like this:

package Framework::Plugin::AirFreshener; use Framework::Util -plugin;

Eating Exporter.pm’s Brain

You probably shouldn’t actually do this in production. It’s offered more as a demonstration than a suggestion.

sub exporter_upgrade { my ($pkg) = @_; my $new_pkg = “$pkg:UsingSubExporter”; return $new_pkg if $new_pkg->isa($pkg); Sub::Exporter::setup_exporter({ as => import, into => $new_pkg, exports => [ @{"$pkg:EXPORT_OK"} ], groups => { %{"$pkg:EXPORT_TAG"}, default => [ @{"$pkg:EXPORTS"} ], }, }); @{"$new_pkg:ISA"} = $pkg; return $new_pkg; }

This routine, given the name of an existing package configured to use Exporter.pm, returns the name of a new package with a Sub::Exporter-powered import routine. This lets you import Toolkit::exported_sub into the current package with the name foo by writing:

BEGIN { require Toolkit; exporter_upgrade(Toolkit)->import(exported_sub => { -as => foo }) }

If you’re feeling particularly naughty, this routine could have been declared in the UNIVERSAL package, meaning you could write:

BEGIN { require Toolkit; Toolkit->exporter_upgrade->import(exported_sub => { -as => foo }) }

The new package will have all the same exporter configuration as the original, but will support export and group renaming, including exporting into scalar references. Further, since Sub::Exporter uses can to find the routine being exported, the new package may be subclassed and some of its exports replaced.

AUTHOR

Ricardo Signes <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 2007 by Ricardo Signes.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2720 - Linux cli command timercmp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command timercmp and provides detailed information about the command timercmp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the timercmp.

NAME 🖥️ timercmp 🖥️

timeval operations

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/time.h>
void timeradd(struct timeval *a, struct timeval *b,
 struct timeval *res);
void timersub(struct timeval *a, struct timeval *b,
 struct timeval *res);
void timerclear(struct timeval *tvp);
int timerisset(struct timeval *tvp);
int timercmp(struct timeval *a, struct timeval *b, CMP);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The macros are provided to operate on timeval structures, defined in <sys/time.h> as:

struct timeval {
    time_t      tv_sec;     /* seconds */
    suseconds_t tv_usec;    /* microseconds */
};

timeradd() adds the time values in a and b, and places the sum in the timeval pointed to by res. The result is normalized such that res->tv_usec has a value in the range 0 to 999,999.

timersub() subtracts the time value in b from the time value in a, and places the result in the timeval pointed to by res. The result is normalized such that res->tv_usec has a value in the range 0 to 999,999.

timerclear() zeros out the timeval structure pointed to by tvp, so that it represents the Epoch: 1970-01-01 00:00:00 +0000 (UTC).

timerisset() returns true (nonzero) if either field of the timeval structure pointed to by tvp contains a nonzero value.

timercmp() compares the timer values in a and b using the comparison operator CMP, and returns true (nonzero) or false (0) depending on the result of the comparison. Some systems (but not Linux/glibc), have a broken timercmp() implementation, in which CMP of >=, <=, and == do not work; portable applications can instead use

!timercmp(..., <)
!timercmp(..., >)
!timercmp(..., !=)

RETURN VALUE

timerisset() and timercmp() return true (nonzero) or false (0).

ERRORS

No errors are defined.

STANDARDS

None.

HISTORY

BSD.

SEE ALSO

gettimeofday(2), time(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2721 - Linux cli command XtCreateWindow

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtCreateWindow and provides detailed information about the command XtCreateWindow, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtCreateWindow.

NAME 🖥️ XtCreateWindow 🖥️

window creation convenience function

SYNTAX

#include <X11/Intrinsic.h>

void XtCreateWindow(Widget w, unsigned int window_class, Visual *visual, XtValueMask value_mask, XSetWindowAttributes *attributes);

ARGUMENTS

attributes
Specifies the window attributes to use in the XCreateWindow call.

value_mask
Specifies which attribute fields to use.

visual
Specifies the visual type (usually CopyFromParent).

  1. Specifies the widget that is used to set the x,y coordinates and so on.

window_class
Specifies the Xlib window class (for example, InputOutput, InputOnly, or CopyFromParent).

DESCRIPTION

The XtCreateWindow function calls the Xlib XCreateWindow function with values from the widget structure and the passed parameters. Then, it assigns the created window to the widget’s window field.

XtCreateWindow evaluates the following fields of the Core widget structure:

  • depth

  • screen

  • parent -> core.window

  • x

  • y

  • width

  • height

  • border_width

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2722 - Linux cli command pthread_setname_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_setname_np and provides detailed information about the command pthread_setname_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_setname_np.

NAME 🖥️ pthread_setname_np 🖥️

set/get the name of a thread

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <pthread.h>
int pthread_setname_np(pthread_t thread, const char *name);
int pthread_getname_np(pthread_t thread, char name[.size], size_t size);

DESCRIPTION

By default, all the threads created using pthread_create() inherit the program name. The pthread_setname_np() function can be used to set a unique name for a thread, which can be useful for debugging multithreaded applications. The thread name is a meaningful C language string, whose length is restricted to 16 characters, including the terminating null byte (‘�’). The thread argument specifies the thread whose name is to be changed; name specifies the new name.

The pthread_getname_np() function can be used to retrieve the name of the thread. The thread argument specifies the thread whose name is to be retrieved. The buffer name is used to return the thread name; size specifies the number of bytes available in name. The buffer specified by name should be at least 16 characters in length. The returned thread name in the output buffer will be null terminated.

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

The pthread_setname_np() function can fail with the following error:

ERANGE
The length of the string specified pointed to by name exceeds the allowed limit.

The pthread_getname_np() function can fail with the following error:

ERANGE
The buffer specified by name and size is too small to hold the thread name.

If either of these functions fails to open /proc/self/task/tid/comm, then the call may fail with one of the errors described in open(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_setname_np(), pthread_getname_np()

Thread safetyMT-Safe

STANDARDS

GNU; hence the suffix “_np” (nonportable) in the names.

HISTORY

glibc 2.12.

NOTES

pthread_setname_np() internally writes to the thread-specific comm file under the /proc filesystem: /proc/self/task/tid/comm. pthread_getname_np() retrieves it from the same location.

EXAMPLES

The program below demonstrates the use of pthread_setname_np() and pthread_getname_np().

The following shell session shows a sample run of the program:

$ ./a.out
Created a thread. Default name is: a.out
The thread name after setting it is THREADFOO.
^Z                           # Suspend the program
[1]+  Stopped           ./a.out
$ ps H -C a.out -o 'pid tid cmd comm'
  PID   TID CMD                         COMMAND
 5990  5990 ./a.out                     a.out
 5990  5991 ./a.out                     THREADFOO
$ cat /proc/5990/task/5990/comm
a.out
$ cat /proc/5990/task/5991/comm
THREADFOO

Program source

#define _GNU_SOURCE
#include <err.h>
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#define NAMELEN 16
static void *
threadfunc(void *parm)
{
    sleep(5);          // allow main program to set the thread name
    return NULL;
}
int
main(int argc, char *argv[])
{
    pthread_t thread;
    int rc;
    char thread_name[NAMELEN];
    rc = pthread_create(&thread, NULL, threadfunc, NULL);
    if (rc != 0)
        errc(EXIT_FAILURE, rc, "pthread_create");
    rc = pthread_getname_np(thread, thread_name, NAMELEN);
    if (rc != 0)
        errc(EXIT_FAILURE, rc, "pthread_getname_np");
    printf("Created a thread. Default name is: %s

“, thread_name); rc = pthread_setname_np(thread, (argc > 1) ? argv[1] : “THREADFOO”); if (rc != 0) errc(EXIT_FAILURE, rc, “pthread_setname_np”); sleep(2); rc = pthread_getname_np(thread, thread_name, NAMELEN); if (rc != 0) errc(EXIT_FAILURE, rc, “pthread_getname_np”); printf(“The thread name after setting it is %s. “, thread_name); rc = pthread_join(thread, NULL); if (rc != 0) errc(EXIT_FAILURE, rc, “pthread_join”); printf(“Done “); exit(EXIT_SUCCESS); }

SEE ALSO

prctl(2), pthread_create(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2723 - Linux cli command Image_ExifTool_BigTIFFpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_BigTIFFpm and provides detailed information about the command Image_ExifTool_BigTIFFpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_BigTIFFpm.

NAME 🖥️ Image_ExifTool_BigTIFFpm 🖥️

Read Big TIFF meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to read meta information in BigTIFF images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.awaresystems.be/imaging/tiff/bigtiff.html>

SEE ALSO

“EXIF Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2724 - Linux cli command getnetent_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getnetent_r and provides detailed information about the command getnetent_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getnetent_r.

NAME 🖥️ getnetent_r 🖥️

get network entry (reentrant)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
int getnetent_r(struct netent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct netent **restrict result,
 int *restrict h_errnop);
int getnetbyname_r(const char *restrict name,
 struct netent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct netent **restrict result,
 int *restrict h_errnop);
int getnetbyaddr_r(uint32_t net, int type,
 struct netent *restrict result_buf,
 char buf[restrict .buflen], size_t buflen,
 struct netent **restrict result,
 int *restrict h_errnop);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getnetent_r(), getnetbyname_r(), getnetbyaddr_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The getnetent_r(), getnetbyname_r(), and getnetbyaddr_r() functions are the reentrant equivalents of, respectively, getnetent(3), getnetbyname(3), and getnetbynumber(3). They differ in the way that the netent structure is returned, and in the function calling signature and return value. This manual page describes just the differences from the nonreentrant functions.

Instead of returning a pointer to a statically allocated netent structure as the function result, these functions copy the structure into the location pointed to by result_buf.

The buf array is used to store the string fields pointed to by the returned netent structure. (The nonreentrant functions allocate these strings in static storage.) The size of this array is specified in buflen. If buf is too small, the call fails with the error ERANGE, and the caller must try again with a larger buffer. (A buffer of length 1024 bytes should be sufficient for most applications.)

If the function call successfully obtains a network record, then *result is set pointing to result_buf; otherwise, *result is set to NULL.

The buffer pointed to by h_errnop is used to return the value that would be stored in the global variable h_errno by the nonreentrant versions of these functions.

RETURN VALUE

On success, these functions return 0. On error, they return one of the positive error numbers listed in ERRORS.

On error, record not found (getnetbyname_r(), getnetbyaddr_r()), or end of input (getnetent_r()) result is set to NULL.

ERRORS

ENOENT
(getnetent_r()) No more records in database.

ERANGE
buf is too small. Try again with a larger buffer (and increased buflen).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getnetent_r(), getnetbyname_r(), getnetbyaddr_r()

Thread safetyMT-Safe locale

VERSIONS

Functions with similar names exist on some other systems, though typically with different calling signatures.

STANDARDS

GNU.

SEE ALSO

getnetent(3), networks(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2725 - Linux cli command Image_ExifTool_MakerNotespm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_MakerNotespm and provides detailed information about the command Image_ExifTool_MakerNotespm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_MakerNotespm.

NAME 🖥️ Image_ExifTool_MakerNotespm 🖥️

Read and write EXIF maker notes

SYNOPSIS

This module is required by Image::ExifTool.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret maker notes in EXIF information.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Image::ExifTool::TagNames (3pm), Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2726 - Linux cli command Image_ExifTool_Lang_japm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Lang_japm and provides detailed information about the command Image_ExifTool_Lang_japm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Lang_japm.

NAME 🖥️ Image_ExifTool_Lang_japm 🖥️

ExifTool Japanese language translations

DESCRIPTION

This file is used by Image::ExifTool to generate localized tag descriptions and values.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

ACKNOWLEDGEMENTS

Thanks to Jens Duttke and Kazunari Nishina for providing this translation.

SEE ALSO

Image::ExifTool (3pm), Image::ExifTool::TagInfoXML (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2727 - Linux cli command inet_addr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command inet_addr and provides detailed information about the command inet_addr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the inet_addr.

NAME 🖥️ inet_addr 🖥️

Internet address manipulation routines

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
int inet_aton(const char *cp, struct in_addr *inp);
in_addr_t inet_addr(const char *cp);
in_addr_t inet_network(const char *cp);
[[deprecated]] char *inet_ntoa(struct in_addr in);
[[deprecated]] struct in_addr inet_makeaddr(in_addr_t net,
 in_addr_t host);
[[deprecated]] in_addr_t inet_lnaof(struct in_addr in);
[[deprecated]] in_addr_t inet_netof(struct in_addr in);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

inet_aton(), inet_ntoa():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    In glibc up to and including 2.19:
        _BSD_SOURCE || _BSD_SOURCE

DESCRIPTION

inet_aton() converts the Internet host address cp from the IPv4 numbers-and-dots notation into binary form (in network byte order) and stores it in the structure that inp points to. inet_aton() returns nonzero if the address is valid, zero if not. The address supplied in cp can have one of the following forms:

a.b.c.d
Each of the four numeric parts specifies a byte of the address; the bytes are assigned in left-to-right order to produce the binary address.

a.b.c
Parts a and b specify the first two bytes of the binary address. Part c is interpreted as a 16-bit value that defines the rightmost two bytes of the binary address. This notation is suitable for specifying (outmoded) Class B network addresses.

a.b
Part a specifies the first byte of the binary address. Part b is interpreted as a 24-bit value that defines the rightmost three bytes of the binary address. This notation is suitable for specifying (outmoded) Class A network addresses.

a
The value a is interpreted as a 32-bit value that is stored directly into the binary address without any byte rearrangement.

In all of the above forms, components of the dotted address can be specified in decimal, octal (with a leading 0), or hexadecimal, with a leading 0X). Addresses in any of these forms are collectively termed IPV4 numbers-and-dots notation. The form that uses exactly four decimal numbers is referred to as IPv4 dotted-decimal notation (or sometimes: IPv4 dotted-quad notation).

inet_aton() returns 1 if the supplied string was successfully interpreted, or 0 if the string is invalid (errno is not set on error).

The inet_addr() function converts the Internet host address cp from IPv4 numbers-and-dots notation into binary data in network byte order. If the input is invalid, INADDR_NONE (usually -1) is returned. Use of this function is problematic because -1 is a valid address (255.255.255.255). Avoid its use in favor of inet_aton(), inet_pton(3), or getaddrinfo(3), which provide a cleaner way to indicate error return.

The inet_network() function converts cp, a string in IPv4 numbers-and-dots notation, into a number in host byte order suitable for use as an Internet network address. On success, the converted address is returned. If the input is invalid, -1 is returned.

The inet_ntoa() function converts the Internet host address in, given in network byte order, to a string in IPv4 dotted-decimal notation. The string is returned in a statically allocated buffer, which subsequent calls will overwrite.

The inet_lnaof() function returns the local network address part of the Internet address in. The returned value is in host byte order.

The inet_netof() function returns the network number part of the Internet address in. The returned value is in host byte order.

The inet_makeaddr() function is the converse of inet_netof() and inet_lnaof(). It returns an Internet host address in network byte order, created by combining the network number net with the local address host, both in host byte order.

The structure in_addr as used in inet_ntoa(), inet_makeaddr(), inet_lnaof(), and inet_netof() is defined in <netinet/in.h> as:

typedef uint32_t in_addr_t;
struct in_addr {
    in_addr_t s_addr;
};

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

inet_aton(), inet_addr(), inet_network(), inet_ntoa()

Thread safetyMT-Safe locale

inet_makeaddr(), inet_lnaof(), inet_netof()

Thread safetyMT-Safe

STANDARDS

inet_addr()
inet_ntoa()
POSIX.1-2008.

inet_aton()
None.

STANDARDS

inet_addr()
inet_ntoa()
POSIX.1-2001, 4.3BSD.

inet_lnaof(), inet_netof(), and inet_makeaddr() are legacy functions that assume they are dealing with classful network addresses. Classful networking divides IPv4 network addresses into host and network components at byte boundaries, as follows:

Class A
This address type is indicated by the value 0 in the most significant bit of the (network byte ordered) address. The network address is contained in the most significant byte, and the host address occupies the remaining three bytes.

Class B
This address type is indicated by the binary value 10 in the most significant two bits of the address. The network address is contained in the two most significant bytes, and the host address occupies the remaining two bytes.

Class C
This address type is indicated by the binary value 110 in the most significant three bits of the address. The network address is contained in the three most significant bytes, and the host address occupies the remaining byte.

Classful network addresses are now obsolete, having been superseded by Classless Inter-Domain Routing (CIDR), which divides addresses into network and host components at arbitrary bit (rather than byte) boundaries.

NOTES

On x86 architectures, the host byte order is Least Significant Byte first (little endian), whereas the network byte order, as used on the Internet, is Most Significant Byte first (big endian).

EXAMPLES

An example of the use of inet_aton() and inet_ntoa() is shown below. Here are some example runs:

$ ./a.out 226.000.000.037 # Last byte is in octal
226.0.0.31
$ ./a.out 0x7f.1  # First byte is in hex
127.0.0.1

Program source

#define _DEFAULT_SOURCE
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
    struct in_addr addr;
    if (argc != 2) {
        fprintf(stderr, "%s <dotted-address>

“, argv[0]); exit(EXIT_FAILURE); } if (inet_aton(argv[1], &addr) == 0) { fprintf(stderr, “Invalid address “); exit(EXIT_FAILURE); } printf("%s “, inet_ntoa(addr)); exit(EXIT_SUCCESS); }

SEE ALSO

byteorder(3), getaddrinfo(3), gethostbyname(3), getnameinfo(3), getnetent(3), inet_net_pton(3), inet_ntop(3), inet_pton(3), hosts(5), networks(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2728 - Linux cli command LIST_HEAD

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LIST_HEAD and provides detailed information about the command LIST_HEAD, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LIST_HEAD.

NAME 🖥️ LIST_HEAD 🖥️

implementation of a doubly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
LIST_ENTRY(TYPE);
LIST_HEAD(HEADNAME, TYPE);
LIST_HEAD LIST_HEAD_INITIALIZER(LIST_HEAD head);
void LIST_INIT(LIST_HEAD *head);
int LIST_EMPTY(LIST_HEAD *head);
void LIST_INSERT_HEAD(LIST_HEAD *head,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
void LIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, LIST_ENTRY NAME);
struct TYPE *LIST_FIRST(LIST_HEAD *head);
struct TYPE *LIST_NEXT(struct TYPE *elm, LIST_ENTRY NAME);
LIST_FOREACH(struct TYPE *var, LIST_HEAD *head, LIST_ENTRY NAME);
void LIST_REMOVE(struct TYPE *elm, LIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type LIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro LIST_HEAD().

Creation

A list is headed by a structure defined by the LIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are doubly linked so that an arbitrary element can be removed without traversing the list. New elements can be added to the list after an existing element, before an existing element, or at the head of the list. A LIST_HEAD structure is declared as follows:

LIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

LIST_ENTRY() declares a structure that connects the elements in the list.

LIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

LIST_INIT() initializes the list referenced by head.

LIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

LIST_INSERT_HEAD() inserts the new element elm at the head of the list.

LIST_INSERT_BEFORE() inserts the new element elm before the element listelm.

LIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

LIST_FIRST() returns the first element in the list, or NULL if the list is empty.

LIST_NEXT() returns the next element in the list, or NULL if this is the last.

LIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

LIST_REMOVE() removes the element elm from the list.

RETURN VALUE

LIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

LIST_FIRST(), and LIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

LIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

LIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. LIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    LIST_ENTRY(entry) entries;              /* List */
};
LIST_HEAD(listhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct listhead head;                   /* List head */
    int i;
    LIST_INIT(&head);                       /* Initialize the list */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    LIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    LIST_INSERT_AFTER(n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    LIST_INSERT_BEFORE(n2, n3, entries);
    i = 0;                                  /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        np->data = i++;
    LIST_REMOVE(n2, entries);               /* Deletion */
    free(n2);
                                            /* Forward traversal */
    LIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* List deletion */ n1 = LIST_FIRST(&head); while (n1 != NULL) { n2 = LIST_NEXT(n1, entries); free(n1); n1 = n2; } LIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2729 - Linux cli command sigfillset

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigfillset and provides detailed information about the command sigfillset, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigfillset.

NAME 🖥️ sigfillset 🖥️

POSIX signal set operations

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
int sigemptyset(sigset_t *set);
int sigfillset(sigset_t *set);
int sigaddset(sigset_t *set, int signum);
int sigdelset(sigset_t *set, int signum);
int sigismember(const sigset_t *set, int signum);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sigemptyset(), sigfillset(), sigaddset(), sigdelset(), sigismember():

    _POSIX_C_SOURCE

DESCRIPTION

These functions allow the manipulation of POSIX signal sets.

sigemptyset() initializes the signal set given by set to empty, with all signals excluded from the set.

sigfillset() initializes set to full, including all signals.

sigaddset() and sigdelset() add and delete respectively signal signum from set.

sigismember() tests whether signum is a member of set.

Objects of type sigset_t must be initialized by a call to either sigemptyset() or sigfillset() before being passed to the functions sigaddset(), sigdelset(), and sigismember() or the additional glibc functions described below (sigisemptyset(), sigandset(), and sigorset()). The results are undefined if this is not done.

RETURN VALUE

sigemptyset(), sigfillset(), sigaddset(), and sigdelset() return 0 on success and -1 on error.

sigismember() returns 1 if signum is a member of set, 0 if signum is not a member, and -1 on error.

On error, these functions set errno to indicate the error.

ERRORS

EINVAL
signum is not a valid signal.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sigemptyset(), sigfillset(), sigaddset(), sigdelset(), sigismember(), sigisemptyset(), sigorset(), sigandset()

Thread safetyMT-Safe

VERSIONS

GNU

If the _GNU_SOURCE feature test macro is defined, then <signal.h> exposes three other functions for manipulating signal sets:

int sigisemptyset(const sigset_t *set);
int sigorset(sigset_t *dest, const sigset_t *left,
 const sigset_t *right);
int sigandset(sigset_t *dest, const sigset_t *left,
 const sigset_t *right);

sigisemptyset() returns 1 if set contains no signals, and 0 otherwise.

sigorset() places the union of the sets left and right in dest. sigandset() places the intersection of the sets left and right in dest. Both functions return 0 on success, and -1 on failure.

These functions are nonstandard (a few other systems provide similar functions) and their use should be avoided in portable applications.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

When creating a filled signal set, the glibc sigfillset() function does not include the two real-time signals used internally by the NPTL threading implementation. See nptl(7) for details.

SEE ALSO

sigaction(2), sigpending(2), sigprocmask(2), sigsuspend(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2730 - Linux cli command Tk_callbackspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_callbackspm and provides detailed information about the command Tk_callbackspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_callbackspm.

NAME 🖥️ Tk_callbackspm 🖥️

Specifying code for Tk to call.

SYNOPSIS

One can specify a callback in one of the following ways:

Without arguments:

… => \subname, … … => sub { … }, … … => methodname, …

or with arguments:

… => [ \subname, args … ], … … => [ sub { … }, args… ], … … => [ methodname, args… ], …

DESCRIPTION

Perl/Tk has a callback, where Tcl/Tk has a command string (i.e. a fragment of Tcl to be executed). A perl/Tk callback can take one of the following basic forms:

  • Reference to a subroutine \&subname

  • Anonymous subroutine (closure) sub { ... }

  • A method name methodname

Any of these can be provided with arguments by enclosing them and the arguments in []. Here are some examples:

$mw->bind($class, "<Delete>" => ‘Delete’);

This will call $widget->Delete, the $widget being provided (by bind) as the one where the Delete key was pressed.

While having bind provide a widget object for you is ideal in many cases it can be irritating in others. Using the list form this behaviour can be modified:

$a->bind("<Delete>",[$b => ‘Delete’]);

because the first element $b is an object bind will call $b->Delete.

Note that method/object ordering only matters for bind callbacks, the auto-quoting in perl5.001 makes the first of these a little more readable:

$w->configure(-yscrollcommand => [ set => $ysb]); $w->configure(-yscrollcommand => [ $ysb => set ]);

but both will call $ysb->set(args provided by Tk)

Another use of arguments allows you to write generalized methods which are easier to re-use:

$a->bind("<Next>",[Next,Page]); $a->bind("<Down>",[Next,Line]);

This will call $a->Next(‘Page’) or $a->Next(‘Line’) respectively.

Note that the contents of the [] are evaluated by perl when the callback is created. It is often desirable for the arguments provided to the callback to depend on the details of the event which caused it to be executed. To allow for this callbacks can be nested using the Ev(...) “constructor”. Ev(...) inserts callback objects into the argument list. When perl/Tk glue code is preparing the argument list for the callback it is about to call it spots these special objects and recursively applies the callback process to them.

EXAMPLES

$entry->bind(<Return> => [$w , validate, Ev([get])]); $toplevel->bind(all, <Visibility>, [\unobscure, Ev(s)]); $mw->bind($class, <Down>, [SetCursor, Ev(UpDownLine,1)]);

SEE ALSO

Tk::bind Tk::after Tk::options Tk::fileevent

KEYWORDS

callback, closure, anonymous subroutine, bind

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2731 - Linux cli command Types_Serialiserpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Types_Serialiserpm and provides detailed information about the command Types_Serialiserpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Types_Serialiserpm.

NAME 🖥️ Types_Serialiserpm 🖥️

simple data types for common serialisation formats

SYNOPSIS

DESCRIPTION

This module provides some extra datatypes that are used by common serialisation formats such as JSON or CBOR. The idea is to have a repository of simple/small constants and containers that can be shared by different implementations so they become interoperable between each other.

SIMPLE SCALAR CONSTANTS

Simple scalar constants are values that are overloaded to act like simple Perl values, but have (class) type to differentiate them from normal Perl scalars. This is necessary because these have different representations in the serialisation formats.

In the following, functions with zero or one arguments have a prototype of () and ($), respectively, so act as constants and unary operators.

BOOLEANS (Types::Serialiser::Boolean class)

This type has only two instances, true and false. A natural representation for these in Perl is 1 and 0, but serialisation formats need to be able to differentiate between them and mere numbers.

$Types::Serialiser::true, Types::Serialiser::true
This value represents the true value. In most contexts is acts like the number 1. It is up to you whether you use the variable form ($Types::Serialiser::true) or the constant form (Types::Serialiser::true). The constant is represented as a reference to a scalar containing 1 - implementations are allowed to directly test for this.

$Types::Serialiser::false, Types::Serialiser::false
This value represents the false value. In most contexts is acts like the number 0. It is up to you whether you use the variable form ($Types::Serialiser::false) or the constant form (Types::Serialiser::false). The constant is represented as a reference to a scalar containing 0 - implementations are allowed to directly test for this.

Types::Serialiser::as_bool $value
Converts a Perl scalar into a boolean, which is useful syntactic sugar. Strictly equivalent to: $value ? $Types::Serialiser::true : $Types::Serialiser::false

$is_bool = Types::Serialiser::is_bool $value
Returns true iff the $value is either $Types::Serialiser::true or $Types::Serialiser::false. For example, you could differentiate between a perl true value and a Types::Serialiser::true by using this: $value && Types::Serialiser::is_bool $value

$is_true = Types::Serialiser::is_true $value
Returns true iff $value is $Types::Serialiser::true.

$is_false = Types::Serialiser::is_false $value
Returns false iff $value is $Types::Serialiser::false.

ERROR (Types::Serialiser::Error class)

This class has only a single instance, error. It is used to signal an encoding or decoding error. In CBOR for example, and object that couldn’t be encoded will be represented by a CBOR undefined value, which is represented by the error value in Perl.

$Types::Serialiser::error, Types::Serialiser::error
This value represents the error value. Accessing values of this type will throw an exception. The constant is represented as a reference to a scalar containing undef - implementations are allowed to directly test for this.

$is_error = Types::Serialiser::is_error $value
Returns false iff $value is $Types::Serialiser::error.

NOTES FOR XS USERS

The recommended way to detect whether a scalar is one of these objects is to check whether the stash is the Types::Serialiser::Boolean or Types::Serialiser::Error stash, and then follow the scalar reference to see if it’s 1 (true), 0 (false) or undef (error).

While it is possible to use an isa test, directly comparing stash pointers is faster and guaranteed to work.

For historical reasons, the Types::Serialiser::Boolean stash is just an alias for JSON::PP::Boolean. When printed, the classname with usually be JSON::PP::Boolean, but isa tests and stash pointer comparison will normally work correctly (i.e. Types::Serialiser::true ISA JSON::PP::Boolean, but also ISA Types::Serialiser::Boolean).

A GENERIC OBJECT SERIALIATION PROTOCOL

This section explains the object serialisation protocol used by CBOR::XS. It is meant to be generic enough to support any kind of generic object serialiser.

This protocol is called the Types::Serialiser object serialisation protocol.

ENCODING

When the encoder encounters an object that it cannot otherwise encode (for example, CBOR::XS can encode a few special types itself, and will first attempt to use the special TO_CBOR serialisation protocol), it will look up the FREEZE method on the object.

Note that the FREEZE method will normally be called during encoding, and MUST NOT change the data structure that is being encoded in any way, or it might cause memory corruption or worse.

If it exists, it will call it with two arguments: the object to serialise, and a constant string that indicates the name of the data model. For example CBOR::XS uses CBOR, and the JSON and JSON::XS modules (or any other JSON serialiser), would use JSON as second argument.

The FREEZE method can then return zero or more values to identify the object instance. The serialiser is then supposed to encode the class name and all of these return values (which must be encodable in the format) using the relevant form for Perl objects. In CBOR for example, there is a registered tag number for encoded perl objects.

The values that FREEZE returns must be serialisable with the serialiser that calls it. Therefore, it is recommended to use simple types such as strings and numbers, and maybe array references and hashes (basically, the JSON data model). You can always use a more complex format for a specific data model by checking the second argument, the data model.

The data model is not the same as the data format - the data model indicates what types and kinds of return values can be returned from FREEZE. For example, in CBOR it is permissible to return tagged CBOR values, while JSON does not support these at all, so JSON would be a valid (but too limited) data model name for CBOR::XS. similarly, a serialising format that supports more or less the same data model as JSON could use JSON as data model without losing anything.

DECODING

When the decoder then encounters such an encoded perl object, it should look up the THAW method on the stored classname, and invoke it with the classname, the constant string to identify the data model/data format, and all the return values returned by FREEZE.

EXAMPLES

See the OBJECT SERIALISATION section in the CBOR::XS manpage for more details, an example implementation, and code examples.

Here is an example FREEZE/THAW method pair:

sub My::Object::FREEZE { my ($self, $model) = @_; ($self->{type}, $self->{id}, $self->{variant}) } sub My::Object::THAW { my ($class, $model, $type, $id, $variant) = @_; $class->new (type => $type, id => $id, variant => $variant) }

BUGS

The use of overload makes this module much heavier than it should be (on my system, this module: 4kB RSS, overload: 260kB RSS).

SEE ALSO

Currently, JSON::XS and CBOR::XS use these types.

AUTHOR

Marc Lehmann <[email protected]> http://home.schmorp.de/

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2732 - Linux cli command wcscasecmp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcscasecmp and provides detailed information about the command wcscasecmp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcscasecmp.

NAME 🖥️ wcscasecmp 🖥️

compare two wide-character strings, ignoring case

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
int wcscasecmp(const wchar_t *s1, const wchar_t *s2);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

wcscasecmp():

    Since glibc 2.10:
        _POSIX_C_SOURCE >= 200809L
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The wcscasecmp() function is the wide-character equivalent of the strcasecmp(3) function. It compares the wide-character string pointed to by s1 and the wide-character string pointed to by s2, ignoring case differences (towupper(3), towlower(3)).

RETURN VALUE

The wcscasecmp() function returns zero if the wide-character strings at s1 and s2 are equal except for case distinctions. It returns a positive integer if s1 is greater than s2, ignoring case. It returns a negative integer if s1 is smaller than s2, ignoring case.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcscasecmp()

Thread safetyMT-Safe locale

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.1.

NOTES

The behavior of wcscasecmp() depends on the LC_CTYPE category of the current locale.

SEE ALSO

strcasecmp(3), wcscmp(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2733 - Linux cli command modfl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command modfl and provides detailed information about the command modfl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the modfl.

NAME 🖥️ modfl 🖥️

extract signed integral and fractional values from floating-point number

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double modf(double x, double *iptr);
float modff(float x, float *iptr);
long double modfl(long double x, long double *iptr);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

modff(), modfl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions break the argument x into an integral part and a fractional part, each of which has the same sign as x. The integral part is stored in the location pointed to by iptr.

RETURN VALUE

These functions return the fractional part of x.

If x is a NaN, a NaN is returned, and *iptr is set to a NaN.

If x is positive infinity (negative infinity), +0 (-0) is returned, and *iptr is set to positive infinity (negative infinity).

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

modf(), modff(), modfl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

SEE ALSO

frexp(3), ldexp(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2734 - Linux cli command Net_DNS_RR_RTpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_RTpm and provides detailed information about the command Net_DNS_RR_RTpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_RTpm.

NAME 🖥️ Net_DNS_RR_RTpm 🖥️

DNS RT resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name RT preference intermediate);

DESCRIPTION

Class for DNS Route Through (RT) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

preference

$preference = $rr->preference; $rr->preference( $preference ); A 16 bit integer representing the preference of the route. Smaller numbers indicate more preferred routes.

intermediate

$intermediate = $rr->intermediate; $rr->intermediate( $intermediate );

The domain name of a host which will serve as an intermediate in reaching the host specified by the owner name. The DNS RRs associated with the intermediate host are expected to include at least one A, X25, or ISDN record.

COPYRIGHT

Copyright (c)1997 Michael Fuhr.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC1183(3.3) <https://iana.org/go/rfc1183#section-3.3>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2735 - Linux cli command Spreadsheet_ParseExcel_SaveParser_Workbookpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_ParseExcel_SaveParser_Workbookpm and provides detailed information about the command Spreadsheet_ParseExcel_SaveParser_Workbookpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_ParseExcel_SaveParser_Workbookpm.

NAME 🖥️ Spreadsheet_ParseExcel_SaveParser_Workbookpm 🖥️

A class for SaveParser Workbooks.

SYNOPSIS

See the documentation for Spreadsheet::ParseExcel.

DESCRIPTION

This module is used in conjunction with Spreadsheet::ParseExcel. See the documentation for Spreadsheet::ParseExcel.

AUTHOR

Current maintainer 0.60+: Douglas Wilson [email protected]

Maintainer 0.40-0.59: John McNamara [email protected]

Maintainer 0.27-0.33: Gabor Szabo [email protected]

Original author: Kawai Takanori [email protected]

COPYRIGHT

Copyright (c) 2014 Douglas Wilson

Copyright (c) 2009-2013 John McNamara

Copyright (c) 2006-2008 Gabor Szabo

Copyright (c) 2000-2006 Kawai Takanori

All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2736 - Linux cli command XtLastEventProcessed

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtLastEventProcessed and provides detailed information about the command XtLastEventProcessed, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtLastEventProcessed.

NAME 🖥️ XtLastEventProcessed 🖥️

last event, last timestamp processed

SYNTAX

#include <X11/Intrinsic.h>

XEvent* XtLastEventProcessed(Display* display);

Time XtLastTimestampProcessed(Display* display);

ARGUMENTS

display
Specifies the open display connection.

DESCRIPTION

XtLastEventProcessed returns the last event passed to XtDispatchEvent for the specified display and NULL if there has been no event. The client must not modify the contents of the returned event.

XtLastTimestampProcessed returns the timestamp of the last KeyPress, KeyRelease, ButtonPress, ButtonRelease, MotionNotify, EnterNotify, LeaveNotify, PropertyNotify, or SelectionClear event that has been passed to XtDispatchEvent for the specified display and zero if there has been no such event.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2737 - Linux cli command Moose_Meta_TypeConstraint_Parameterizedpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_TypeConstraint_Parameterizedpm and provides detailed information about the command Moose_Meta_TypeConstraint_Parameterizedpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_TypeConstraint_Parameterizedpm.

NAME 🖥️ Moose_Meta_TypeConstraint_Parameterizedpm 🖥️

Type constraints with a bound parameter (ArrayRef[Int])

VERSION

version 2.2207

METHODS

This class is intentionally not documented because the API is confusing and needs some work.

INHERITANCE

Moose::Meta::TypeConstraint::Parameterized is a subclass of Moose::Meta::TypeConstraint.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2738 - Linux cli command XtAppPending

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppPending and provides detailed information about the command XtAppPending, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppPending.

NAME 🖥️ XtAppPending 🖥️

query and process events and input

SYNTAX

#include <X11/Intrinsic.h>

void XtAppNextEvent(XtAppContext app_context, XEvent *event_return);

Boolean XtAppPeekEvent(XtAppContext app_context, XEvent *event_return);

XtInputMask XtAppPending(XtAppContext app_context);

void XtAppProcessEvent(XtAppContext app_context, XtInputMask mask);

Boolean XtDispatchEvent(XEvent *event);

void XtAppMainLoop(XtAppContext app_context);

ARGUMENTS

app_context
Specifies the application context that identifies the application.

event
Specifies a pointer to the event structure that is to be dispatched to the appropriate event handler.

event_return
Returns the event information to the specified event structure.

mask
Specifies what types of events to process. The mask is the bitwise inclusive OR of any combination of XtIMXEvent, XtIMTimer, XtIMAlternateInput, and XtIMSignal. As a convenience, the X Toolkit defines the symbolic name XtIMAll to be the bitwise inclusive OR of all event types.

DESCRIPTION

If the X event queue is empty, XtAppNextEvent flushes the X output buffers of each Display in the application context and waits for an event while looking at the other input sources, timeout timeout values, and signal handlers and calling any callback procedures triggered by them. This wait time can be used for background processing (see Section 7.8).

If there is an event in the queue, XtAppPeekEvent fills in the event and returns a nonzero value. If no X input is on the queue, XtAppPeekEvent flushes the output buffer and blocks until input is available (possibly calling some timeout callbacks in the process). If the input is an event, XtAppPeekEvent fills in the event and returns a nonzero value. Otherwise, the input is for an alternate input source, and XtAppPeekEvent returns zero.

The XtAppPending function returns a nonzero value if there are events pending from the X server, timer pending, or other input sources pending. The value returned is a bit mask that is the OR of XtIMXEvent, XtIMTimer, XtIMAlternateInput, and XtIMSignal (see XtAppProcessEvent). If there are no events pending, XtAppPending flushes the output buffer and returns zero.

The XtAppProcessEvent function processes one timer, alternate input, signal source, or X event. If there is nothing of the appropriate type to process, XtAppProcessEvent blocks until there is. If there is more than one type of thing available to process, it is undefined which will get processed. Usually, this procedure is not called by client applications (see XtAppMainLoop). XtAppProcessEvent processes timer events by calling any appropriate timer callbacks, alternate input by calling any appropriate alternate input callbacks, signal source by calling any appropriate signal callbacks, and X events by calling XtDispatchEvent.

When an X event is received, it is passed to XtDispatchEvent, which calls the appropriate event handlers and passes them the widget, the event, and client-specific data registered with each procedure. If there are no handlers for that event registered, the event is ignored and the dispatcher simply returns. The order in which the handlers are called is undefined.

The XtDispatchEvent function sends those events to the event handler functions that have been previously registered with the dispatch routine. XtDispatchEvent returns True if it dispatched the event to some handler and False if it found no handler to dispatch the event to. The most common use of XtDispatchEvent is to dispatch events acquired with the XtAppNextEvent procedure. However, it also can be used to dispatch user-constructed events. XtDispatchEvent also is responsible for implementing the grab semantics for XtAddGrab.

The XtAppMainLoop function processes events using XtAppProcessEvent, varying the mask parameter and using XtAppPending to ensure that it has a chance to handle events of all types, i.e., X events, timer events, input events and signal sources. This constitutes the main loop of X Toolkit applications, and, as such, it does not return unless XtAppSetExitFlag is called. Applications are expected to exit in response to some user action. There is nothing special about XtAppMainLoop; it is simply an loop that processes events until XtAppGetExitFlag() returns true.

Applications can provide their own version of this loop, which tests some global termination flag or tests that the number of top-level widgets is larger than zero before circling back for the next event.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2739 - Linux cli command roundf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command roundf and provides detailed information about the command roundf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the roundf.

NAME 🖥️ roundf 🖥️

round to nearest integer, away from zero

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double round(double x);
float roundf(float x);
long double roundl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

round(), roundf(), roundl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions round x to the nearest integer, but round halfway cases away from zero (regardless of the current rounding direction, see fenv(3)), instead of to the nearest even integer like rint(3).

For example, round(0.5) is 1.0, and round(-0.5) is -1.0.

RETURN VALUE

These functions return the rounded integer value.

If x is integral, +0, -0, NaN, or infinite, x itself is returned.

ERRORS

No errors occur. POSIX.1-2001 documents a range error for overflows, but see NOTES.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

round(), roundf(), roundl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

NOTES

POSIX.1-2001 contains text about overflow (which might set errno to ERANGE, or raise an FE_OVERFLOW exception). In practice, the result cannot overflow on any current machine, so this error-handling stuff is just nonsense. (More precisely, overflow can happen only when the maximum value of the exponent is smaller than the number of mantissa bits. For the IEEE-754 standard 32-bit and 64-bit floating-point numbers the maximum value of the exponent is 127 (respectively, 1023), and the number of mantissa bits including the implicit bit is 24 (respectively, 53).)

If you want to store the rounded value in an integer type, you probably want to use one of the functions described in lround(3) instead.

SEE ALSO

ceil(3), floor(3), lround(3), nearbyint(3), rint(3), trunc(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2740 - Linux cli command Net_DNS_Parameterspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_Parameterspm and provides detailed information about the command Net_DNS_Parameterspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_Parameterspm.

NAME 🖥️ Net_DNS_Parameterspm 🖥️

DNS parameter assignments

SYNOPSIS

use Net::DNS::Parameters;

DESCRIPTION

Net::DNS::Parameters is a Perl package representing the DNS parameter allocation (key,value) tables as recorded in the definitive registry maintained and published by IANA.

FUNCTIONS

classbyname, typebyname, opcodebyname, rcodebyname, ednsoptionbyname, dsotypebyname

Access functions which return the numerical code corresponding to the given mnemonic.

classbyval, typebyval, opcodebyval, rcodebyval, ednsoptionbyval, dsotypebyval

Access functions which return the canonical mnemonic corresponding to the given numerical code.

COPYRIGHT

Copyright (c)2012,2016 Dick Franks.

Portions Copyright (c)1997 Michael Fuhr.

Portions Copyright (c)2003 Olaf Kolkman.

All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl, Net::DNS, IANA Registry <http://www.iana.org/assignments/dns-parameters>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2741 - Linux cli command sigemptyset

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigemptyset and provides detailed information about the command sigemptyset, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigemptyset.

NAME 🖥️ sigemptyset 🖥️

POSIX signal set operations

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
int sigemptyset(sigset_t *set);
int sigfillset(sigset_t *set);
int sigaddset(sigset_t *set, int signum);
int sigdelset(sigset_t *set, int signum);
int sigismember(const sigset_t *set, int signum);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

sigemptyset(), sigfillset(), sigaddset(), sigdelset(), sigismember():

    _POSIX_C_SOURCE

DESCRIPTION

These functions allow the manipulation of POSIX signal sets.

sigemptyset() initializes the signal set given by set to empty, with all signals excluded from the set.

sigfillset() initializes set to full, including all signals.

sigaddset() and sigdelset() add and delete respectively signal signum from set.

sigismember() tests whether signum is a member of set.

Objects of type sigset_t must be initialized by a call to either sigemptyset() or sigfillset() before being passed to the functions sigaddset(), sigdelset(), and sigismember() or the additional glibc functions described below (sigisemptyset(), sigandset(), and sigorset()). The results are undefined if this is not done.

RETURN VALUE

sigemptyset(), sigfillset(), sigaddset(), and sigdelset() return 0 on success and -1 on error.

sigismember() returns 1 if signum is a member of set, 0 if signum is not a member, and -1 on error.

On error, these functions set errno to indicate the error.

ERRORS

EINVAL
signum is not a valid signal.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sigemptyset(), sigfillset(), sigaddset(), sigdelset(), sigismember(), sigisemptyset(), sigorset(), sigandset()

Thread safetyMT-Safe

VERSIONS

GNU

If the _GNU_SOURCE feature test macro is defined, then <signal.h> exposes three other functions for manipulating signal sets:

int sigisemptyset(const sigset_t *set);
int sigorset(sigset_t *dest, const sigset_t *left,
 const sigset_t *right);
int sigandset(sigset_t *dest, const sigset_t *left,
 const sigset_t *right);

sigisemptyset() returns 1 if set contains no signals, and 0 otherwise.

sigorset() places the union of the sets left and right in dest. sigandset() places the intersection of the sets left and right in dest. Both functions return 0 on success, and -1 on failure.

These functions are nonstandard (a few other systems provide similar functions) and their use should be avoided in portable applications.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

When creating a filled signal set, the glibc sigfillset() function does not include the two real-time signals used internally by the NPTL threading implementation. See nptl(7) for details.

SEE ALSO

sigaction(2), sigpending(2), sigprocmask(2), sigsuspend(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2742 - Linux cli command mrand48_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mrand48_r and provides detailed information about the command mrand48_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mrand48_r.

NAME 🖥️ mrand48_r 🖥️

generate uniformly distributed pseudo-random numbers reentrantly

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int drand48_r(struct drand48_data *restrict buffer,
 double *restrict result);
int erand48_r(unsigned short xsubi[3],
 struct drand48_data *restrict buffer,
 double *restrict result);
int lrand48_r(struct drand48_data *restrict buffer,
 long *restrict result);
int nrand48_r(unsigned short xsubi[3],
 struct drand48_data *restrict buffer,
 long *restrict result);
int mrand48_r(struct drand48_data *restrict buffer,
 long *restrict result);
int jrand48_r(unsigned short xsubi[3],
 struct drand48_data *restrict buffer,
 long *restrict result);
int srand48_r(long int seedval, struct drand48_data *buffer);
int seed48_r(unsigned short seed16v[3], struct drand48_data *buffer);
int lcong48_r(unsigned short param[7], struct drand48_data *buffer);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

These functions are the reentrant analogs of the functions described in drand48(3). Instead of modifying the global random generator state, they use the supplied data buffer.

Before the first use, this struct must be initialized, for example, by filling it with zeros, or by calling one of the functions srand48_r(), seed48_r(), or lcong48_r().

RETURN VALUE

The return value is 0.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

drand48_r(), erand48_r(), lrand48_r(), nrand48_r(), mrand48_r(), jrand48_r(), srand48_r(), seed48_r(), lcong48_r()

Thread safetyMT-Safe race:buffer

STANDARDS

GNU.

SEE ALSO

drand48(3), rand(3), random(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2743 - Linux cli command Image_ExifTool_APP12pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_APP12pm and provides detailed information about the command Image_ExifTool_APP12pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_APP12pm.

NAME 🖥️ Image_ExifTool_APP12pm 🖥️

Read APP12 meta information

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret APP12 meta information.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

ACKNOWLEDGEMENTS

Thanks to Heinrich Giesen for his help decoding APP12 “Ducky” information.

SEE ALSO

“APP12 Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2744 - Linux cli command killpg

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command killpg and provides detailed information about the command killpg, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the killpg.

NAME 🖥️ killpg 🖥️

send signal to a process group

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <signal.h>
int killpg(int pgrp, int sig);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

killpg():

    _XOPEN_SOURCE >= 500
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE

DESCRIPTION

killpg() sends the signal sig to the process group pgrp. See signal(7) for a list of signals.

If pgrp is 0, killpg() sends the signal to the calling process’s process group. (POSIX says: if pgrp is less than or equal to 1, the behavior is undefined.)

For the permissions required to send a signal to another process, see kill(2).

RETURN VALUE

On success, zero is returned. On error, -1 is returned, and errno is set to indicate the error.

ERRORS

EINVAL
sig is not a valid signal number.

EPERM
The process does not have permission to send the signal to any of the target processes. For the required permissions, see kill(2).

ESRCH
No process can be found in the process group specified by pgrp.

ESRCH
The process group was given as 0 but the sending process does not have a process group.

VERSIONS

There are various differences between the permission checking in BSD-type systems and System V-type systems. See the POSIX rationale for kill(3p). A difference not mentioned by POSIX concerns the return value EPERM: BSD documents that no signal is sent and EPERM returned when the permission check failed for at least one target process, while POSIX documents EPERM only when the permission check failed for all target processes.

C library/kernel differences

On Linux, killpg() is implemented as a library function that makes the call kill(-pgrp, sig).

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4, 4.4BSD (first appeared in 4BSD).

SEE ALSO

getpgrp(2), kill(2), signal(2), capabilities(7), credentials(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2745 - Linux cli command towlower

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command towlower and provides detailed information about the command towlower, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the towlower.

NAME 🖥️ towlower 🖥️

convert a wide character to lowercase

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wctype.h>
wint_t towlower(wint_t wc);
wint_t towlower_l(wint_t wc, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

towlower_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

The towlower() function is the wide-character equivalent of the tolower(3) function. If wc is an uppercase wide character, and there exists a lowercase equivalent in the current locale, it returns the lowercase equivalent of wc. In all other cases, wc is returned unchanged.

The towlower_l() function performs the same task, but performs the conversion based on the character type information in the locale specified by locale. The behavior of towlower_l() is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The argument wc must be representable as a wchar_t and be a valid character in the locale or be the value WEOF.

RETURN VALUE

If wc was convertible to lowercase, towlower() returns its lowercase equivalent; otherwise it returns wc.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

towlower()

Thread safetyMT-Safe locale

towlower_l()

Thread safetyMT-Safe

STANDARDS

towlower()
C11, POSIX.1-2008 (XSI).

towlower_l()
POSIX.1-2008.

STANDARDS

towlower()
C99, POSIX.1-2001 (XSI). Obsolete in POSIX.1-2008 (XSI).

towlower_l()
glibc 2.3. POSIX.1-2008.

NOTES

The behavior of these functions depends on the LC_CTYPE category of the locale.

These functions are not very appropriate for dealing with Unicode characters, because Unicode knows about three cases: upper, lower, and title case.

SEE ALSO

iswlower(3), towctrans(3), towupper(3), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2746 - Linux cli command Image_ExifTool_PDFpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_PDFpm and provides detailed information about the command Image_ExifTool_PDFpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_PDFpm.

NAME 🖥️ Image_ExifTool_PDFpm 🖥️

Read PDF meta information

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This code reads meta information from PDF (Adobe Portable Document Format) files. It supports object streams introduced in PDF-1.5 but only with a limited set of Filter and Predictor algorithms, however all standard encryption methods through PDF-2.0 are supported, including AESV2 (AES-128) and AESV3 (AES-256).

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://partners.adobe.com/public/developer/pdf/index_reference.html>

Crypt::RC4

<http://www.adobe.com/devnet/acrobat/pdfs/PDF32000_2008.pdf>

<http://www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/adobe_supplement_iso32000.pdf>

<http://tools.ietf.org/search/rfc3454>

<http://www.armware.dk/RFC/rfc/rfc4013.html>

SEE ALSO

“PDF Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2747 - Linux cli command pthread_getcpuclockid

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_getcpuclockid and provides detailed information about the command pthread_getcpuclockid, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_getcpuclockid.

NAME 🖥️ pthread_getcpuclockid 🖥️

retrieve ID of a thread’s CPU time clock

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
#include <time.h>
int pthread_getcpuclockid(pthread_t thread, clockid_t *clockid);

DESCRIPTION

The pthread_getcpuclockid() function obtains the ID of the CPU-time clock of the thread whose ID is given in thread, and returns it in the location pointed to by clockid.

RETURN VALUE

On success, this function returns 0; on error, it returns a nonzero error number.

ERRORS

ENOENT
Per-thread CPU time clocks are not supported by the system.

ESRCH
No thread with the ID thread could be found.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_getcpuclockid()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.2. POSIX.1-2001.

NOTES

When thread refers to the calling thread, this function returns an identifier that refers to the same clock manipulated by clock_gettime(2) and clock_settime(2) when given the clock ID CLOCK_THREAD_CPUTIME_ID.

EXAMPLES

The program below creates a thread and then uses clock_gettime(2) to retrieve the total process CPU time, and the per-thread CPU time consumed by the two threads. The following shell session shows an example run:

$ ./a.out
Main thread sleeping
Subthread starting infinite loop
Main thread consuming some CPU time...
Process total CPU time:    1.368
Main thread CPU time:      0.376
Subthread CPU time:        0.992

Program source

/* Link with "-lrt" */
#include <errno.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#define handle_error(msg) \
        do { perror(msg); exit(EXIT_FAILURE); } while (0)
#define handle_error_en(en, msg) \
        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
static void *
thread_start(void *arg)
{
    printf("Subthread starting infinite loop

“); for (;;) continue; } static void pclock(char msg, clockid_t cid) { struct timespec ts; printf("%s”, msg); if (clock_gettime(cid, &ts) == -1) handle_error(“clock_gettime”); printf("%4jd.%03ld “, (intmax_t) ts.tv_sec, ts.tv_nsec / 1000000); } int main(void) { pthread_t thread; clockid_t cid; int s; s = pthread_create(&thread, NULL, thread_start, NULL); if (s != 0) handle_error_en(s, “pthread_create”); printf(“Main thread sleeping “); sleep(1); printf(“Main thread consuming some CPU time… “); for (unsigned int j = 0; j < 2000000; j++) getppid(); pclock(“Process total CPU time: “, CLOCK_PROCESS_CPUTIME_ID); s = pthread_getcpuclockid(pthread_self(), &cid); if (s != 0) handle_error_en(s, “pthread_getcpuclockid”); pclock(“Main thread CPU time: “, cid); / The preceding 4 lines of code could have been replaced by: pclock(“Main thread CPU time: “, CLOCK_THREAD_CPUTIME_ID); / s = pthread_getcpuclockid(thread, &cid); if (s != 0) handle_error_en(s, “pthread_getcpuclockid”); pclock(“Subthread CPU time: 1 “, cid); exit(EXIT_SUCCESS); / Terminates both threads */ }

SEE ALSO

clock_gettime(2), clock_settime(2), timer_create(2), clock_getcpuclockid(3), pthread_self(3), pthreads(7), time(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2748 - Linux cli command tailq

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tailq and provides detailed information about the command tailq, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tailq.

NAME 🖥️ tailq 🖥️

implementation of a doubly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
TAILQ_ENTRY(TYPE);
TAILQ_HEAD(HEADNAME, TYPE);
TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD head);
void TAILQ_INIT(TAILQ_HEAD *head);
int TAILQ_EMPTY(TAILQ_HEAD *head);
void TAILQ_INSERT_HEAD(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_TAIL(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_AFTER(TAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_FIRST(TAILQ_HEAD *head);
struct TYPE *TAILQ_LAST(TAILQ_HEAD *head, HEADNAME);
struct TYPE *TAILQ_PREV(struct TYPE *elm, HEADNAME, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_NEXT(struct TYPE *elm, TAILQ_ENTRY NAME);
TAILQ_FOREACH(struct TYPE *var, TAILQ_HEAD *head,
 TAILQ_ENTRY NAME);
TAILQ_FOREACH_REVERSE(struct TYPE *var, TAILQ_HEAD *head, HEADNAME,
 TAILQ_ENTRY NAME);
void TAILQ_REMOVE(TAILQ_HEAD *head, struct TYPE *elm,
 TAILQ_ENTRY NAME);
void TAILQ_CONCAT(TAILQ_HEAD *head1, TAILQ_HEAD *head2,
 TAILQ_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked tail queues.

In the macro definitions, TYPE is the name of a user defined structure, that must contain a field of type TAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user defined structure that must be declared using the macro TAILQ_HEAD().

Creation

A tail queue is headed by a structure defined by the TAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the queue and the other to the last element in the queue. The elements are doubly linked so that an arbitrary element can be removed without traversing the queue. New elements can be added to the queue after an existing element, before an existing element, at the head of the queue, or at the end of the queue. A TAILQ_HEAD structure is declared as follows:

TAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the queue. A pointer to the head of the queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

TAILQ_ENTRY() declares a structure that connects the elements in the queue.

TAILQ_HEAD_INITIALIZER() evaluates to an initializer for the queue head.

TAILQ_INIT() initializes the queue referenced by

TAILQ_EMPTY() evaluates to true if there are no items on the queue. head.

Insertion

TAILQ_INSERT_HEAD() inserts the new element elm at the head of the queue.

TAILQ_INSERT_TAIL() inserts the new element elm at the end of the queue.

TAILQ_INSERT_BEFORE() inserts the new element elm before the element listelm.

TAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

TAILQ_FIRST() returns the first item on the queue, or NULL if the queue is empty.

TAILQ_LAST() returns the last item on the queue. If the queue is empty the return value is NULL.

TAILQ_PREV() returns the previous item on the queue, or NULL if this item is the first.

TAILQ_NEXT() returns the next item on the queue, or NULL if this item is the last.

TAILQ_FOREACH() traverses the queue referenced by head in the forward direction, assigning each element in turn to var. var is set to NULL if the loop completes normally, or if there were no elements.

TAILQ_FOREACH_REVERSE() traverses the queue referenced by head in the reverse direction, assigning each element in turn to var.

Removal

TAILQ_REMOVE() removes the element elm from the queue.

Other features

TAILQ_CONCAT() concatenates the queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

TAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

TAILQ_FIRST(), TAILQ_LAST(), TAILQ_PREV(), and TAILQ_NEXT() return a pointer to the first, last, previous, or next TYPE structure, respectively.

TAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

STANDARDS

BSD.

HISTORY

4.4BSD.

CAVEATS

TAILQ_FOREACH() and TAILQ_FOREACH_REVERSE() don’t allow var to be removed or freed within the loop, as it would interfere with the traversal. TAILQ_FOREACH_SAFE() and TAILQ_FOREACH_REVERSE_SAFE(), which are present on the BSDs but are not present in glibc, fix this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    TAILQ_ENTRY(entry) entries;             /* Tail queue */
};
TAILQ_HEAD(tailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct tailhead head;                   /* Tail queue head */
    int i;
    TAILQ_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    TAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    TAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    TAILQ_INSERT_AFTER(&head, n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    TAILQ_INSERT_BEFORE(n2, n3, entries);
    TAILQ_REMOVE(&head, n2, entries);       /* Deletion */
    free(n2);
                                            /* Forward traversal */
    i = 0;
    TAILQ_FOREACH(np, &head, entries)
        np->data = i++;
                                            /* Reverse traversal */
    TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = TAILQ_FIRST(&head); while (n1 != NULL) { n2 = TAILQ_NEXT(n1, entries); free(n1); n1 = n2; } TAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2749 - Linux cli command Moose_Meta_TypeConstraint_Registrypm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_TypeConstraint_Registrypm and provides detailed information about the command Moose_Meta_TypeConstraint_Registrypm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_TypeConstraint_Registrypm.

NAME 🖥️ Moose_Meta_TypeConstraint_Registrypm 🖥️

registry for type constraints

VERSION

version 2.2207

DESCRIPTION

This class is a registry that maps type constraint names to Moose::Meta::TypeConstraint objects.

Currently, it is only used internally by Moose::Util::TypeConstraints, which creates a single global registry.

INHERITANCE

Moose::Meta::TypeConstraint::Registry is a subclass of Class::MOP::Object.

METHODS

Moose::Meta::TypeConstraint::Registry->new(%options)

This creates a new registry object based on the provided %options:

  • parent_registry This is an optional Moose::Meta::TypeConstraint::Registry object.

  • type_constraints This is hash reference of type names to type objects. This is optional. Constraints can be added to the registry after it is created.

$registry->get_parent_registry

Returns the registry’s parent registry, if it has one.

$registry->has_parent_registry

Returns true if the registry has a parent.

$registry->set_parent_registry($registry)

Sets the parent registry.

$registry->get_type_constraint($type_name)

This returns the Moose::Meta::TypeConstraint object from the registry for the given name, if one exists.

$registry->has_type_constraint($type_name)

Returns true if the registry has a type of the given name.

$registry->add_type_constraint($type)

Adds a new Moose::Meta::TypeConstraint object to the registry.

$registry->find_type_constraint($type_name)

This method looks in the current registry for the named type. If the type is not found, then this method will look in the registry’s parent, if it has one.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2750 - Linux cli command pid_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pid_ttype and provides detailed information about the command pid_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pid_ttype.

NAME 🖥️ pid_ttype 🖥️

process/user/group identifier

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/types.h>
typedef /* ... */ pid_t;
typedef /* ... */ uid_t;
typedef /* ... */ gid_t;
typedef /* ... */ id_t;

DESCRIPTION

pid_t is a type used for storing process IDs, process group IDs, and session IDs. It is a signed integer type.

uid_t is a type used to hold user IDs. It is an integer type.

gid_t is a type used to hold group IDs. It is an integer type.

id_t is a type used to hold a general identifier. It is an integer type that can be used to contain a pid_t, uid_t, or gid_t.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

The following headers also provide pid_t: <fcntl.h>, <sched.h>, <signal.h>, <spawn.h>, <sys/msg.h>, <sys/sem.h>, <sys/shm.h>, <sys/wait.h>, <termios.h>, <time.h>, <unistd.h>, and <utmpx.h>.

The following headers also provide uid_t: <pwd.h>, <signal.h>, <stropts.h>, <sys/ipc.h>, <sys/stat.h>, and <unistd.h>.

The following headers also provide gid_t: <grp.h>, <pwd.h>, <signal.h>, <stropts.h>, <sys/ipc.h>, <sys/stat.h>, and <unistd.h>.

The following header also provides id_t: <sys/resource.h>.

SEE ALSO

chown(2), fork(2), getegid(2), geteuid(2), getgid(2), getgroups(2), getpgid(2), getpid(2), getppid(2), getpriority(2), getpwnam(3), getresgid(2), getresuid(2), getsid(2), gettid(2), getuid(2), kill(2), pidfd_open(2), sched_setscheduler(2), waitid(2), getgrnam(3), sigqueue(3), credentials(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2751 - Linux cli command mq_close

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mq_close and provides detailed information about the command mq_close, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mq_close.

NAME 🖥️ mq_close 🖥️

close a message queue descriptor

LIBRARY

Real-time library (librt, -lrt)

SYNOPSIS

#include <mqueue.h>
int mq_close(mqd_t mqdes);

DESCRIPTION

mq_close() closes the message queue descriptor mqdes.

If the calling process has attached a notification request (see mq_notify(3)) to this message queue via mqdes, then this request is removed, and another process can now attach a notification request.

RETURN VALUE

On success mq_close() returns 0; on error, -1 is returned, with errno set to indicate the error.

ERRORS

EBADF
The message queue descriptor specified in mqdes is invalid.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mq_close()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

All open message queues are automatically closed on process termination, or upon execve(2).

SEE ALSO

mq_getattr(3), mq_notify(3), mq_open(3), mq_receive(3), mq_send(3), mq_unlink(3), mq_overview(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2752 - Linux cli command XtManageChild

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtManageChild and provides detailed information about the command XtManageChild, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtManageChild.

NAME 🖥️ XtManageChild 🖥️

manage and unmanage children

SYNTAX

#include <X11/Intrinsic.h>

typedef Widget *WidgetList;

void XtManageChildren(WidgetList children, Cardinal num_children);

void XtManageChild(Widget child);

void XtUnmanageChildren(WidgetList children, Cardinal num_children);

void XtUnmanageChild(Widget child);

void XtChangeManagedSet(WidgetList unmanage_children, Cardinal num_unmanage_children, XtDoChangeProc do_change_proc, XtPointer client_data, WidgetList manage_children, Cardinal num_manage_children);

Boolean XtIsManaged(Widget widget);

ARGUMENTS

child
Specifies the child.

children
Specifies a list of child widgets.

num_children
Specifies the number of children.

widget
Specifies the widget.

manage_children
Specifies the list of widget children to add to the managed set.

num_manage_children
Specifies the number of entries in the manage_children list.

unmanage_children
Specifies the list of widget children to remove from the managed set.

num_unmanage_children
Specifies the number of entries in the unmanage_children list.

do_change_proc
Specifies the post unmanage, pre manage hook procedure to invoke.

client_data
Specifies the client data to be passed to the hook procedure.

DESCRIPTION

The XtManageChildren function performs the following:

  • Issues an error if the children do not all have the same parent or if the parent is not a subclass of compositeWidgetClass.

  • Returns immediately if the common parent is being destroyed; otherwise, for each unique child on the list, XtManageChildren ignores the child if it already is managed or is being destroyed and marks it if not.

  • If the parent is realized and after all children have been marked, it makes some of the newly managed children viewable:

    • Calls the change_managed routine of the widgets’ parent.

    • Calls XtRealizeWidget on each previously unmanaged child that is unrealized.

    • Maps each previously unmanaged child that has map_when_managed True.

Managing children is independent of the ordering of children and independent of creating and deleting children. The layout routine of the parent should consider children whose managed field is True and should ignore all other children. Note that some composite widgets, especially fixed boxes, call XtManageChild from their insert_child procedure.

If the parent widget is realized, its change_managed procedure is called to notify it that its set of managed children has changed. The parent can reposition and resize any of its children. It moves each child as needed by calling XtMoveWidget, which first updates the x and y fields and then calls XMoveWindow if the widget is realized.

The XtManageChild function constructs a WidgetList of length one and calls XtManageChildren.

The XtUnmanageChildren function performs the following:

  • Issues an error if the children do not all have the same parent or if the parent is not a subclass of compositeWidgetClass.

  • Returns immediately if the common parent is being destroyed; otherwise, for each unique child on the list, XtUnmanageChildren performs the following:

    • Ignores the child if it already is unmanaged or is being destroyed and marks it if not.

    • If the child is realized, it makes it nonvisible by unmapping it.

  • Calls the change_managed routine of the widgets’ parent after all children have been marked if the parent is realized.

XtUnmanageChildren does not destroy the children widgets. Removing widgets from a parent’s managed set is often a temporary banishment, and, some time later, you may manage the children again.

The XtUnmanageChild function constructs a widget list of length one and calls XtUnmanageChildren.

The XtChangeManagedSet function performs the following:

  • Issues an error if the widgets specified in the manage_children and the unmanage_children lists to no all have the same parent, or if that parent is not a subclass of compositeWidgetClass.

  • Returns immediately if the common parent is being destroyed.

  • If no CompositeClassExtension is defined, or a CompositeClassExtension is defined but with an allows_change_managed_set field with a value of False, and XtChangeManagedSet was invoked with a non-NULL do_change_proc procedure then XtChangeManagedSet performs the following:

    • Calls XtUnmanageChildren (unmanage_children, num_unmanage_children).

    • Calls the do_change_proc specified.

    • Calls XtManageChildren (manage_children, num_manage_children) and then returns immediately.

  • Otherwise, if a CompositeClassExtension is defined with an allows_change_managed_set field with a value of True, or if no CompositeClassExtension is defined, and XtChangeManagedSet was invoked with a NULL do_change_proc procedure, then the following is performed:

    • For each child on the unmanage_children list; if the child is already unmanaged or is being destroyed it is ignored, otherwise it is marked as being unmanaged and if it is realized it is made nonvisible by being unmapped.

    • If the do_change_proc procedure is non-NULL then it is invoked as specified.

    • For each child on the manage_children list; if the child is already managed or it is being destroyed it is ignored, otherwise it is marked as managed

  • If the parent is realized and after all children have been marked, the change_managed method of the parent is invoked and subsequently some of the newly managed children are made viewable by:

    • Calling XtRealizeWidget on each of the previously unmanaged child that is unrealized.

    • Mapping each previously unmanaged child that has map_when_managed True.

The XtIsManaged function returns True if the specified widget is of class RectObj or any subclass thereof and is managed, or False otherwise.

SEE ALSO

XtMapWidget(3), XtRealizeWidget(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2753 - Linux cli command XtVaCreateArgsList

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtVaCreateArgsList and provides detailed information about the command XtVaCreateArgsList, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtVaCreateArgsList.

NAME 🖥️ XtVaCreateArgsList 🖥️

dynamically allocate a varargs list

SYNTAX

#include <X11/Intrinsic.h>

XtVarArgsList XtVaCreateArgsList(XtPointer unused, … );

ARGUMENTS

unused
Must be specified as NULL.


Specifies a variable parameter list of resource name and value pairs.

DESCRIPTION

The XtVaCreateArgsList function allocates memory and copies its arguments into a single list pointer, which may be used with XtVaNestedList. The end of both lists is identified by a name entry containing NULL. Any entries of type XtVaTypedArg are copied as specified without applying conversions. Data passed by reference (including Strings) are not copied, only the pointers themselves; the caller must ensure that the data remain valid for the lifetime of the created varargs list. The list should be freed using XtFree when no longer needed.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2754 - Linux cli command zip_file_set_external_attributes

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_file_set_external_attributes and provides detailed information about the command zip_file_set_external_attributes, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_file_set_external_attributes.

libzip (-lzip)

The

function sets the operating system and external attributes for the file at position

in the zip archive. Currently, no

are supported.

For a list of known

values, see

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

fails if:

is not a valid file index in

Required memory could not be allocated.

The

was opened in read-only mode.

was added in libzip 0.11.2.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2755 - Linux cli command Image_ExifTool_Jpeg2000pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Jpeg2000pm and provides detailed information about the command Image_ExifTool_Jpeg2000pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Jpeg2000pm.

NAME 🖥️ Image_ExifTool_Jpeg2000pm 🖥️

Read JPEG 2000 meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to read JPEG 2000 files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.jpeg.org/public/fcd15444-2.pdf>

<ftp://ftp.remotesensing.org/jpeg2000/fcd15444-1.pdf>

SEE ALSO

“Jpeg2000 Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2756 - Linux cli command gethostbyaddr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gethostbyaddr and provides detailed information about the command gethostbyaddr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gethostbyaddr.

NAME 🖥️ gethostbyaddr 🖥️

get network host entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
void sethostent(int stayopen);
void endhostent(void);
[[deprecated]] extern int h_errno;
[[deprecated]] struct hostent *gethostbyname(const char *name);
[[deprecated]] struct hostent *gethostbyaddr(const void addr[.len],
 socklen_t len, int type);
[[deprecated]] void herror(const char *s);
[[deprecated]] const char *hstrerror(int err);
/* System V/POSIX extension */
struct hostent *gethostent(void);
/* GNU extensions */
[[deprecated]]
struct hostent *gethostbyname2(const char *name, int af);
int gethostent_r(struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyaddr_r(const void addr[restrict .len], socklen_t len,
 int type,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyname_r(const char *restrict name,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyname2_r(const char *restrict name, int af,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

gethostbyname2(), gethostent_r(), gethostbyaddr_r(), gethostbyname_r(), gethostbyname2_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc up to and including 2.19:
        _BSD_SOURCE || _SVID_SOURCE

herror(), hstrerror():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.8 to glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE
    Before glibc 2.8:
        none

h_errno:

    Since glibc 2.19
        _DEFAULT_SOURCE || _POSIX_C_SOURCE < 200809L
    glibc 2.12 to glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE || _POSIX_C_SOURCE < 200809L
    Before glibc 2.12:
        none

DESCRIPTION

The gethostbyname*(), gethostbyaddr*(), herror(), and hstrerror() functions are obsolete. Applications should use getaddrinfo(3), getnameinfo(3), and gai_strerror(3) instead.

The sethostent() function specifies, if stayopen is true (1), that a connected TCP socket should be used for the name server queries and that the connection should remain open during successive queries. Otherwise, name server queries will use UDP datagrams.

The endhostent() function ends the use of a TCP connection for name server queries.

The gethostbyname() function returns a structure of type hostent for the given host name. Here name is either a hostname or an IPv4 address in standard dot notation (as for inet_addr(3)). If name is an IPv4 address, no lookup is performed and gethostbyname() simply copies name into the h_name field and its struct in_addr equivalent into the h_addr_list[0] field of the returned hostent structure. If name doesn’t end in a dot and the environment variable HOSTALIASES is set, the alias file pointed to by HOSTALIASES will first be searched for name (see hostname(7) for the file format). The current domain and its parents are searched unless name ends in a dot.

The gethostbyaddr() function returns a structure of type hostent for the given host address addr of length len and address type type. Valid address types are AF_INET and AF_INET6 (defined in <sys/socket.h>). The host address argument is a pointer to a struct of a type depending on the address type, for example a struct in_addr * (probably obtained via a call to inet_addr(3)) for address type AF_INET.

The (obsolete) herror() function prints the error message associated with the current value of h_errno on stderr.

The (obsolete) hstrerror() function takes an error number (typically h_errno) and returns the corresponding message string.

The domain name queries carried out by gethostbyname() and gethostbyaddr() rely on the Name Service Switch (nsswitch.conf(5)) configured sources or a local name server (named(8)). The default action is to query the Name Service Switch (nsswitch.conf(5)) configured sources, failing that, a local name server (named(8)).

Historical

The nsswitch.conf(5) file is the modern way of controlling the order of host lookups.

In glibc 2.4 and earlier, the order keyword was used to control the order of host lookups as defined in /etc/host.conf (host.conf(5)).

The hostent structure is defined in <netdb.h> as follows:

struct hostent {
    char  *h_name;            /* official name of host */
    char **h_aliases;         /* alias list */
    int    h_addrtype;        /* host address type */
    int    h_length;          /* length of address */
    char **h_addr_list;       /* list of addresses */
}
#define h_addr h_addr_list[0] /* for backward compatibility */

The members of the hostent structure are:

h_name
The official name of the host.

h_aliases
An array of alternative names for the host, terminated by a null pointer.

h_addrtype
The type of address; always AF_INET or AF_INET6 at present.

h_length
The length of the address in bytes.

h_addr_list
An array of pointers to network addresses for the host (in network byte order), terminated by a null pointer.

h_addr
The first address in h_addr_list for backward compatibility.

RETURN VALUE

The gethostbyname() and gethostbyaddr() functions return the hostent structure or a null pointer if an error occurs. On error, the h_errno variable holds an error number. When non-NULL, the return value may point at static data, see the notes below.

ERRORS

The variable h_errno can have the following values:

HOST_NOT_FOUND
The specified host is unknown.

NO_DATA
The requested name is valid but does not have an IP address. Another type of request to the name server for this domain may return an answer. The constant NO_ADDRESS is a synonym for NO_DATA.

NO_RECOVERY
A nonrecoverable name server error occurred.

TRY_AGAIN
A temporary error occurred on an authoritative name server. Try again later.

FILES

/etc/host.conf
resolver configuration file

/etc/hosts
host database file

/etc/nsswitch.conf
name service switch configuration

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

gethostbyname()

Thread safety

MT-Unsafe race:hostbyname env locale

gethostbyaddr()

Thread safety

MT-Unsafe race:hostbyaddr env locale

sethostent(), endhostent(), gethostent_r()

Thread safety

MT-Unsafe race:hostent env locale

herror(), hstrerror()

Thread safetyMT-Safe

gethostent()

Thread safety

MT-Unsafe race:hostent race:hostentbuf env locale

gethostbyname2()

Thread safety

MT-Unsafe race:hostbyname2 env locale

gethostbyaddr_r(), gethostbyname_r(), gethostbyname2_r()

Thread safetyMT-Safe env locale

In the above table, hostent in race:hostent signifies that if any of the functions sethostent(), gethostent(), gethostent_r(), or endhostent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

sethostent()
endhostent()
gethostent()
POSIX.1-2008.

gethostent_r()
GNU.

Others:
None.

HISTORY

sethostent()
endhostent()
gethostent()
POSIX.1-2001.

gethostbyname()
gethostbyaddr()
h_errno
Marked obsolescent in POSIX.1-2001. Removed in POSIX.1-2008, recommending the use of getaddrinfo(3) and getnameinfo(3) instead.

NOTES

The functions gethostbyname() and gethostbyaddr() may return pointers to static data, which may be overwritten by later calls. Copying the struct hostent does not suffice, since it contains pointers; a deep copy is required.

In the original BSD implementation the len argument of gethostbyname() was an int. The SUSv2 standard is buggy and declares the len argument of gethostbyaddr() to be of type size_t. (That is wrong, because it has to be int, and size_t is not. POSIX.1-2001 makes it socklen_t, which is OK.) See also accept(2).

The BSD prototype for gethostbyaddr() uses const char * for the first argument.

System V/POSIX extension

POSIX requires the gethostent() call, which should return the next entry in the host data base. When using DNS/BIND this does not make much sense, but it may be reasonable if the host data base is a file that can be read line by line. On many systems, a routine of this name reads from the file /etc/hosts. It may be available only when the library was built without DNS support. The glibc version will ignore ipv6 entries. This function is not reentrant, and glibc adds a reentrant version gethostent_r().

GNU extensions

glibc2 also has a gethostbyname2() that works like gethostbyname(), but permits to specify the address family to which the address must belong.

glibc2 also has reentrant versions gethostent_r(), gethostbyaddr_r(), gethostbyname_r(), and gethostbyname2_r(). The caller supplies a hostent structure ret which will be filled in on success, and a temporary work buffer buf of size buflen. After the call, result will point to the result on success. In case of an error or if no entry is found result will be NULL. The functions return 0 on success and a nonzero error number on failure. In addition to the errors returned by the nonreentrant versions of these functions, if buf is too small, the functions will return ERANGE, and the call should be retried with a larger buffer. The global variable h_errno is not modified, but the address of a variable in which to store error numbers is passed in h_errnop.

BUGS

gethostbyname() does not recognize components of a dotted IPv4 address string that are expressed in hexadecimal.

SEE ALSO

getaddrinfo(3), getnameinfo(3), inet(3), inet_ntop(3), inet_pton(3), resolver(3), hosts(5), nsswitch.conf(5), hostname(7), named(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2757 - Linux cli command Image_ExifTool_FLACpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_FLACpm and provides detailed information about the command Image_ExifTool_FLACpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_FLACpm.

NAME 🖥️ Image_ExifTool_FLACpm 🖥️

Read Free Lossless Audio Codec information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to extract meta information from Free Lossless Audio Codec (FLAC) audio files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://flac.sourceforge.net/>

SEE ALSO

“FLAC Tags” in Image::ExifTool::TagNames, “Ogg Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2758 - Linux cli command gai_error

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gai_error and provides detailed information about the command gai_error, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gai_error.

NAME 🖥️ gai_error 🖥️

asynchronous network address and service translation

LIBRARY

Asynchronous name lookup library (libanl, -lanl)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <netdb.h>
int getaddrinfo_a(int mode, struct gaicb *list[restrict],
 int nitems, struct sigevent *restrict sevp);
int gai_suspend(const struct gaicb *const list[], int nitems,
 const struct timespec *timeout);
int gai_error(struct gaicb *req);
int gai_cancel(struct gaicb *req);

DESCRIPTION

The getaddrinfo_a() function performs the same task as getaddrinfo(3), but allows multiple name look-ups to be performed asynchronously, with optional notification on completion of look-up operations.

The mode argument has one of the following values:

GAI_WAIT
Perform the look-ups synchronously. The call blocks until the look-ups have completed.

GAI_NOWAIT
Perform the look-ups asynchronously. The call returns immediately, and the requests are resolved in the background. See the discussion of the sevp argument below.

The array list specifies the look-up requests to process. The nitems argument specifies the number of elements in list. The requested look-up operations are started in parallel. NULL elements in list are ignored. Each request is described by a gaicb structure, defined as follows:

struct gaicb {
    const char            *ar_name;
    const char            *ar_service;
    const struct addrinfo *ar_request;
    struct addrinfo       *ar_result;
};

The elements of this structure correspond to the arguments of getaddrinfo(3). Thus, ar_name corresponds to the node argument and ar_service to the service argument, identifying an Internet host and a service. The ar_request element corresponds to the hints argument, specifying the criteria for selecting the returned socket address structures. Finally, ar_result corresponds to the res argument; you do not need to initialize this element, it will be automatically set when the request is resolved. The addrinfo structure referenced by the last two elements is described in getaddrinfo(3).

When mode is specified as GAI_NOWAIT, notifications about resolved requests can be obtained by employing the sigevent structure pointed to by the sevp argument. For the definition and general details of this structure, see sigevent(3type). The sevp->sigev_notify field can have the following values:

SIGEV_NONE
Don’t provide any notification.

SIGEV_SIGNAL
When a look-up completes, generate the signal sigev_signo for the process. See sigevent(3type) for general details. The si_code field of the siginfo_t structure will be set to SI_ASYNCNL.

SIGEV_THREAD
When a look-up completes, invoke sigev_notify_function as if it were the start function of a new thread. See sigevent(3type) for details.

For SIGEV_SIGNAL and SIGEV_THREAD, it may be useful to point sevp->sigev_value.sival_ptr to list.

The gai_suspend() function suspends execution of the calling thread, waiting for the completion of one or more requests in the array list. The nitems argument specifies the size of the array list. The call blocks until one of the following occurs:

  • One or more of the operations in list completes.

  • The call is interrupted by a signal that is caught.

  • The time interval specified in timeout elapses. This argument specifies a timeout in seconds plus nanoseconds (see nanosleep(2) for details of the timespec structure). If timeout is NULL, then the call blocks indefinitely (until one of the events above occurs).

No explicit indication of which request was completed is given; you must determine which request(s) have completed by iterating with gai_error() over the list of requests.

The gai_error() function returns the status of the request req: either EAI_INPROGRESS if the request was not completed yet, 0 if it was handled successfully, or an error code if the request could not be resolved.

The gai_cancel() function cancels the request req. If the request has been canceled successfully, the error status of the request will be set to EAI_CANCELED and normal asynchronous notification will be performed. The request cannot be canceled if it is currently being processed; in that case, it will be handled as if gai_cancel() has never been called. If req is NULL, an attempt is made to cancel all outstanding requests that the process has made.

RETURN VALUE

The getaddrinfo_a() function returns 0 if all of the requests have been enqueued successfully, or one of the following nonzero error codes:

EAI_AGAIN
The resources necessary to enqueue the look-up requests were not available. The application may check the error status of each request to determine which ones failed.

EAI_MEMORY
Out of memory.

EAI_SYSTEM
mode is invalid.

The gai_suspend() function returns 0 if at least one of the listed requests has been completed. Otherwise, it returns one of the following nonzero error codes:

EAI_AGAIN
The given timeout expired before any of the requests could be completed.

EAI_ALLDONE
There were no actual requests given to the function.

EAI_INTR
A signal has interrupted the function. Note that this interruption might have been caused by signal notification of some completed look-up request.

The gai_error() function can return EAI_INPROGRESS for an unfinished look-up request, 0 for a successfully completed look-up (as described above), one of the error codes that could be returned by getaddrinfo(3), or the error code EAI_CANCELED if the request has been canceled explicitly before it could be finished.

The gai_cancel() function can return one of these values:

EAI_CANCELED
The request has been canceled successfully.

EAI_NOTCANCELED
The request has not been canceled.

EAI_ALLDONE
The request has already completed.

The gai_strerror(3) function translates these error codes to a human readable string, suitable for error reporting.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getaddrinfo_a(), gai_suspend(), gai_error(), gai_cancel()

Thread safetyMT-Safe

STANDARDS

GNU.

HISTORY

glibc 2.2.3.

The interface of getaddrinfo_a() was modeled after the lio_listio(3) interface.

EXAMPLES

Two examples are provided: a simple example that resolves several requests in parallel synchronously, and a complex example showing some of the asynchronous capabilities.

Synchronous example

The program below simply resolves several hostnames in parallel, giving a speed-up compared to resolving the hostnames sequentially using getaddrinfo(3). The program might be used like this:

$ ./a.out mirrors.kernel.org enoent.linuxfoundation.org gnu.org
mirrors.kernel.org: 139.178.88.99
enoent.linuxfoundation.org: Name or service not known
gnu.org: 209.51.188.116

Here is the program source code

#define _GNU_SOURCE
#include <err.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MALLOC(n, type)  ((type *) reallocarray(NULL, n, sizeof(type)))
int
main(int argc, char *argv[])
{
    int ret;
    struct gaicb *reqs[argc - 1];
    char host[NI_MAXHOST];
    struct addrinfo *res;
    if (argc < 2) {
        fprintf(stderr, "Usage: %s HOST...

“, argv[0]); exit(EXIT_FAILURE); } for (size_t i = 0; i < argc - 1; i++) { reqs[i] = MALLOC(1, struct gaicb); if (reqs[i] == NULL) err(EXIT_FAILURE, “malloc”); memset(reqs[i], 0, sizeof(*reqs[0])); reqs[i]->ar_name = argv[i + 1]; } ret = getaddrinfo_a(GAI_WAIT, reqs, argc - 1, NULL); if (ret != 0) { fprintf(stderr, “getaddrinfo_a() failed: %s “, gai_strerror(ret)); exit(EXIT_FAILURE); } for (size_t i = 0; i < argc - 1; i++) { printf("%s: “, reqs[i]->ar_name); ret = gai_error(reqs[i]); if (ret == 0) { res = reqs[i]->ar_result; ret = getnameinfo(res->ai_addr, res->ai_addrlen, host, sizeof(host), NULL, 0, NI_NUMERICHOST); if (ret != 0) { fprintf(stderr, “getnameinfo() failed: %s “, gai_strerror(ret)); exit(EXIT_FAILURE); } puts(host); } else { puts(gai_strerror(ret)); } } exit(EXIT_SUCCESS); }

Asynchronous example

This example shows a simple interactive getaddrinfo_a() front-end. The notification facility is not demonstrated.

An example session might look like this:

$ ./a.out
> a mirrors.kernel.org enoent.linuxfoundation.org gnu.org
> c 2
[2] gnu.org: Request not canceled
> w 0 1
[00] mirrors.kernel.org: Finished
> l
[00] mirrors.kernel.org: 139.178.88.99
[01] enoent.linuxfoundation.org: Processing request in progress
[02] gnu.org: 209.51.188.116
> l
[00] mirrors.kernel.org: 139.178.88.99
[01] enoent.linuxfoundation.org: Name or service not known
[02] gnu.org: 209.51.188.116

The program source is as follows:

#define _GNU_SOURCE
#include <assert.h>
#include <err.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define CALLOC(n, type)  ((type *) calloc(n, sizeof(type)))
#define REALLOCF(ptr, n, type)                                          \
({                                                                      \
    static_assert(__builtin_types_compatible_p(typeof(ptr), type *));   \
                                                                        \
    (type *) reallocarrayf(ptr, n, sizeof(type));                       \
})
static struct gaicb **reqs = NULL;
static size_t nreqs = 0;
static inline void *
reallocarrayf(void *p, size_t nmemb, size_t size)
{
    void  *q;
    q = reallocarray(p, nmemb, size);
    if (q == NULL && nmemb != 0 && size != 0)
        free(p);
    return q;
}
static char *
getcmd(void)
{
    static char buf[256];
    fputs("> ", stdout); fflush(stdout);
    if (fgets(buf, sizeof(buf), stdin) == NULL)
        return NULL;
    if (buf[strlen(buf) - 1] == '

‘) buf[strlen(buf) - 1] = 0; return buf; } /* Add requests for specified hostnames. */ static void add_requests(void) { size_t nreqs_base = nreqs; char *host; int ret; while ((host = strtok(NULL, " “))) { nreqs++; reqs = REALLOCF(reqs, nreqs, struct gaicb ); if (reqs == NULL) err(EXIT_FAILURE, “reallocf”); reqs[nreqs - 1] = CALLOC(1, struct gaicb); if (reqs[nreqs - 1] == NULL) err(EXIT_FAILURE, “calloc”); reqs[nreqs - 1]->ar_name = strdup(host); } / Queue nreqs_base..nreqs requests. / ret = getaddrinfo_a(GAI_NOWAIT, &reqs[nreqs_base], nreqs - nreqs_base, NULL); if (ret) { fprintf(stderr, “getaddrinfo_a() failed: %s “, gai_strerror(ret)); exit(EXIT_FAILURE); } } / Wait until at least one of specified requests completes. */ static void wait_requests(void) { char *id; int ret; size_t n; struct gaicb const **wait_reqs; wait_reqs = CALLOC(nreqs, const struct gaicb ); if (wait_reqs == NULL) err(EXIT_FAILURE, “calloc”); / NULL elements are ignored by gai_suspend(). / while ((id = strtok(NULL, " “)) != NULL) { n = atoi(id); if (n >= nreqs) { printf(“Bad request number: %s “, id); return; } wait_reqs[n] = reqs[n]; } ret = gai_suspend(wait_reqs, nreqs, NULL); if (ret) { printf(“gai_suspend(): %s “, gai_strerror(ret)); return; } for (size_t i = 0; i < nreqs; i++) { if (wait_reqs[i] == NULL) continue; ret = gai_error(reqs[i]); if (ret == EAI_INPROGRESS) continue; printf(”[%02zu] %s: %s “, i, reqs[i]->ar_name, ret == 0 ? “Finished” : gai_strerror(ret)); } } / Cancel specified requests. */ static void cancel_requests(void) { char id; int ret; size_t n; while ((id = strtok(NULL, " “)) != NULL) { n = atoi(id); if (n >= nreqs) { printf(“Bad request number: %s “, id); return; } ret = gai_cancel(reqs[n]); printf(”[%s] %s: %s “, id, reqs[atoi(id)]->ar_name, gai_strerror(ret)); } } / List all requests. */ static void list_requests(void) { int ret; char host[NI_MAXHOST]; struct addrinfo *res; for (size_t i = 0; i < nreqs; i++) { printf(”[%02zu] %s: “, i, reqs[i]->ar_name); ret = gai_error(reqs[i]); if (!ret) { res = reqs[i]->ar_result; ret = getnameinfo(res->ai_addr, res->ai_addrlen, host, sizeof(host), NULL, 0, NI_NUMERICHOST); if (ret) { fprintf(stderr, “getnameinfo() failed: %s “, gai_strerror(ret)); exit(EXIT_FAILURE); } puts(host); } else { puts(gai_strerror(ret)); } } } int main(void) { char *cmdline; char *cmd; while ((cmdline = getcmd()) != NULL) { cmd = strtok(cmdline, " “); if (cmd == NULL) { list_requests(); } else { switch (cmd[0]) { case ‘a’: add_requests(); break; case ‘w’: wait_requests(); break; case ‘c’: cancel_requests(); break; case ’l’: list_requests(); break; default: fprintf(stderr, “Bad command: %c “, cmd[0]); break; } } } exit(EXIT_SUCCESS); }

SEE ALSO

getaddrinfo(3), inet(3), lio_listio(3), hostname(7), ip(7), sigevent(3type)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2759 - Linux cli command strfmon

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strfmon and provides detailed information about the command strfmon, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strfmon.

NAME 🖥️ strfmon 🖥️

convert monetary value to a string

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <monetary.h>
ssize_t strfmon(char s[restrict .max], size_t max,
 const char *restrict format, ...);
ssize_t strfmon_l(char s[restrict .max], size_t max, locale_t locale,
 const char *restrict format, ...);

DESCRIPTION

The strfmon() function formats the specified monetary amount according to the current locale and format specification format and places the result in the character array s of size max.

The strfmon_l() function performs the same task, but uses the locale specified by locale. The behavior of strfmon_l() is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

Ordinary characters in format are copied to s without conversion. Conversion specifiers are introduced by a ‘%’ character. Immediately following it there can be zero or more of the following flags:

**=**f
The single-byte character f is used as the numeric fill character (to be used with a left precision, see below). When not specified, the space character is used.

^
Do not use any grouping characters that might be defined for the current locale. By default, grouping is enabled.

( or +
The ( flag indicates that negative amounts should be enclosed between parentheses. The + flag indicates that signs should be handled in the default way, that is, amounts are preceded by the locale’s sign indication, for example, nothing for positive, “-” for negative.

!
Omit the currency symbol.

-
Left justify all fields. The default is right justification.

Next, there may be a field width: a decimal digit string specifying a minimum field width in bytes. The default is 0. A result smaller than this width is padded with spaces (on the left, unless the left-justify flag was given).

Next, there may be a left precision of the form “#” followed by a decimal digit string. If the number of digits left of the radix character is smaller than this, the representation is padded on the left with the numeric fill character. Grouping characters are not counted in this field width.

Next, there may be a right precision of the form “.” followed by a decimal digit string. The amount being formatted is rounded to the specified number of digits prior to formatting. The default is specified in the frac_digits and int_frac_digits items of the current locale. If the right precision is 0, no radix character is printed. (The radix character here is determined by LC_MONETARY, and may differ from that specified by LC_NUMERIC.)

Finally, the conversion specification must be ended with a conversion character. The three conversion characters are

%
(In this case, the entire specification must be exactly “%%”.) Put a ‘%’ character in the result string.

i
One argument of type double is converted using the locale’s international currency format.

n
One argument of type double is converted using the locale’s national currency format.

RETURN VALUE

The strfmon() function returns the number of characters placed in the array s, not including the terminating null byte, provided the string, including the terminating null byte, fits. Otherwise, it sets errno to E2BIG, returns -1, and the contents of the array is undefined.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strfmon()

Thread safetyMT-Safe locale

strfmon_l()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

EXAMPLES

The call

strfmon(buf, sizeof(buf), "[%^=*#6n] [%=*#6i]",
        1234.567, 1234.567);

outputs

[€ **1234,57] [EUR **1 234,57]

in the nl_NL locale. The de_DE, de_CH, en_AU, and en_GB locales yield

[ **1234,57 €] [ **1.234,57 EUR]
[ Fr. **1234.57] [ CHF **1'234.57]
[ $**1234.57] [ AUD**1,234.57]
[ £**1234.57] [ GBP**1,234.57]

SEE ALSO

duplocale(3), setlocale(3), sprintf(3), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2760 - Linux cli command xencrypt

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xencrypt and provides detailed information about the command xencrypt, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xencrypt.

NAME 🖥️ xencrypt 🖥️

RFS password encryption

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <rpc/des_crypt.h>
void passwd2des(char *passwd, char *key);
int xencrypt(char *secret, char *passwd);
int xdecrypt(char *secret, char *passwd);

DESCRIPTION

WARNING: Do not use these functions in new code. They do not achieve any type of acceptable cryptographic security guarantees.

The function passwd2des() takes a character string passwd of arbitrary length and fills a character array key of length 8. The array key is suitable for use as DES key. It has odd parity set in bit 0 of each byte. Both other functions described here use this function to turn their argument passwd into a DES key.

The xencrypt() function takes the ASCII character string secret given in hex, which must have a length that is a multiple of 16, encrypts it using the DES key derived from passwd by passwd2des(), and outputs the result again in secret as a hex string of the same length.

The xdecrypt() function performs the converse operation.

RETURN VALUE

The functions xencrypt() and xdecrypt() return 1 on success and 0 on error.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

passwd2des(), xencrypt(), xdecrypt()

Thread safetyMT-Safe

VERSIONS

These functions are available since glibc 2.1.

BUGS

The prototypes are missing from the abovementioned include file.

SEE ALSO

cbc_crypt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2761 - Linux cli command zip_file_strerror

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_file_strerror and provides detailed information about the command zip_file_strerror, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_file_strerror.

libzip (-lzip)

The

function returns a string describing the last error for the zip archive

while the

function does the same for a zip file

(one file in an archive). The returned string must not be modified or freed, and becomes invalid when

or

respectively, is closed or on the next call to

or

respectively, for the same archive.

and

return a pointer to the error string.

and

were added in libzip 0.6.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2762 - Linux cli command Image_ExifTool_WriteExifpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_WriteExifpm and provides detailed information about the command Image_ExifTool_WriteExifpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_WriteExifpm.

NAME 🖥️ Image_ExifTool_WriteExifpm 🖥️

Write EXIF meta information

SYNOPSIS

This file is autoloaded by Image::ExifTool::Exif.

DESCRIPTION

This file contains routines to write EXIF metadata.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Image::ExifTool::Exif (3pm), Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2763 - Linux cli command imaxdiv_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command imaxdiv_ttype and provides detailed information about the command imaxdiv_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the imaxdiv_ttype.

NAME 🖥️ imaxdiv_ttype 🖥️

quotient and remainder of an integer division

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <stdlib.h>
typedef struct {
 int quot; /* Quotient */
 int rem; /* Remainder */
} div_t;
typedef struct {
 long quot; /* Quotient */
 long rem; /* Remainder */
} ldiv_t;
typedef struct {
 long long quot; /* Quotient */
 long long rem; /* Remainder */
} lldiv_t;
#include <inttypes.h>
typedef struct {
 intmax_t quot; /* Quotient */
 intmax_t rem; /* Remainder */
} imaxdiv_t;

DESCRIPTION

[[l]l]div_t is the type of the value returned by the [[l]l] div(3) function.

imaxdiv_t is the type of the value returned by the imaxdiv(3) function.

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

SEE ALSO

div(3), imaxdiv(3), ldiv(3), lldiv(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2764 - Linux cli command mtrace

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mtrace and provides detailed information about the command mtrace, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mtrace.

NAME 🖥️ mtrace 🖥️

malloc tracing

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <mcheck.h>
void mtrace(void);
void muntrace(void);

DESCRIPTION

The mtrace() function installs hook functions for the memory-allocation functions (malloc(3), realloc(3) memalign(3), free(3)). These hook functions record tracing information about memory allocation and deallocation. The tracing information can be used to discover memory leaks and attempts to free nonallocated memory in a program.

The muntrace() function disables the hook functions installed by mtrace(), so that tracing information is no longer recorded for the memory-allocation functions. If no hook functions were successfully installed by mtrace(), muntrace() does nothing.

When mtrace() is called, it checks the value of the environment variable MALLOC_TRACE, which should contain the pathname of a file in which the tracing information is to be recorded. If the pathname is successfully opened, it is truncated to zero length.

If MALLOC_TRACE is not set, or the pathname it specifies is invalid or not writable, then no hook functions are installed, and mtrace() has no effect. In set-user-ID and set-group-ID programs, MALLOC_TRACE is ignored, and mtrace() has no effect.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mtrace(), muntrace()

Thread safetyMT-Unsafe

STANDARDS

GNU.

NOTES

In normal usage, mtrace() is called once at the start of execution of a program, and muntrace() is never called.

The tracing output produced after a call to mtrace() is textual, but not designed to be human readable. The GNU C library provides a Perl script, mtrace(1), that interprets the trace log and produces human-readable output. For best results, the traced program should be compiled with debugging enabled, so that line-number information is recorded in the executable.

The tracing performed by mtrace() incurs a performance penalty (if MALLOC_TRACE points to a valid, writable pathname).

BUGS

The line-number information produced by mtrace(1) is not always precise: the line number references may refer to the previous or following (nonblank) line of the source code.

EXAMPLES

The shell session below demonstrates the use of the mtrace() function and the mtrace(1) command in a program that has memory leaks at two different locations. The demonstration uses the following program:

$ cat t_mtrace.c

#include <mcheck.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    mtrace();
    for (unsigned int j = 0; j < 2; j++)
        malloc(100);            /* Never freed--a memory leak */
    calloc(16, 16);             /* Never freed--a memory leak */
    exit(EXIT_SUCCESS);
}

When we run the program as follows, we see that mtrace() diagnosed memory leaks at two different locations in the program:

$ cc -g t_mtrace.c -o t_mtrace
$ export MALLOC_TRACE=/tmp/t
$ ./t_mtrace
$ mtrace ./t_mtrace $MALLOC_TRACE
Memory not freed:
-----------------
   Address     Size     Caller
0x084c9378     0x64  at /home/cecilia/t_mtrace.c:12
0x084c93e0     0x64  at /home/cecilia/t_mtrace.c:12
0x084c9448    0x100  at /home/cecilia/t_mtrace.c:16

The first two messages about unfreed memory correspond to the two malloc(3) calls inside the for loop. The final message corresponds to the call to calloc(3) (which in turn calls malloc(3)).

SEE ALSO

mtrace(1), malloc(3), malloc_hook(3), mcheck(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2765 - Linux cli command Net_DNS_RR_OPENPGPKEYpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_OPENPGPKEYpm and provides detailed information about the command Net_DNS_RR_OPENPGPKEYpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_OPENPGPKEYpm.

NAME 🖥️ Net_DNS_RR_OPENPGPKEYpm 🖥️

DNS OPENPGPKEY resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name OPENPGPKEY key);

DESCRIPTION

Class for OpenPGP Key (OPENPGPKEY) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

key

$key = $rr->key; $rr->key( $key );

Base64 encoded representation of the OpenPGP public key material.

keybin

$keybin = $rr->keybin; $rr->keybin( $keybin );

OpenPGP public key material consisting of a single OpenPGP transferable public key in RFC4880 format.

COPYRIGHT

Copyright (c)2014 Dick Franks

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC7929 <https://tools.ietf.org/html/rfc7929>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2766 - Linux cli command slist

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command slist and provides detailed information about the command slist, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the slist.

NAME 🖥️ slist 🖥️

implementation of a singly linked list

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
SLIST_ENTRY(TYPE);
SLIST_HEAD(HEADNAME, TYPE);
SLIST_HEAD SLIST_HEAD_INITIALIZER(SLIST_HEAD head);
void SLIST_INIT(SLIST_HEAD *head);
int SLIST_EMPTY(SLIST_HEAD *head);
void SLIST_INSERT_HEAD(SLIST_HEAD *head,
 struct TYPE *elm, SLIST_ENTRY NAME);
void SLIST_INSERT_AFTER(struct TYPE *listelm,
 struct TYPE *elm, SLIST_ENTRY NAME);
struct TYPE *SLIST_FIRST(SLIST_HEAD *head);
struct TYPE *SLIST_NEXT(struct TYPE *elm, SLIST_ENTRY NAME);
SLIST_FOREACH(struct TYPE *var, SLIST_HEAD *head, SLIST_ENTRY NAME);
void SLIST_REMOVE(SLIST_HEAD *head, struct TYPE *elm,
 SLIST_ENTRY NAME);
void SLIST_REMOVE_HEAD(SLIST_HEAD *head,
 SLIST_ENTRY NAME);

DESCRIPTION

These macros define and operate on singly linked lists.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type SLIST_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro SLIST_HEAD().

Creation

A singly linked list is headed by a structure defined by the SLIST_HEAD() macro. This structure contains a single pointer to the first element on the list. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the list after an existing element or at the head of the list. An SLIST_HEAD structure is declared as follows:

SLIST_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

SLIST_ENTRY() declares a structure that connects the elements in the list.

SLIST_HEAD_INITIALIZER() evaluates to an initializer for the list head.

SLIST_INIT() initializes the list referenced by head.

SLIST_EMPTY() evaluates to true if there are no elements in the list.

Insertion

SLIST_INSERT_HEAD() inserts the new element elm at the head of the list.

SLIST_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

SLIST_FIRST() returns the first element in the list, or NULL if the list is empty.

SLIST_NEXT() returns the next element in the list.

SLIST_FOREACH() traverses the list referenced by head in the forward direction, assigning each element in turn to var.

Removal

SLIST_REMOVE() removes the element elm from the list.

SLIST_REMOVE_HEAD() removes the element elm from the head of the list. For optimum efficiency, elements being removed from the head of the list should explicitly use this macro instead of the generic SLIST_REMOVE().

RETURN VALUE

SLIST_EMPTY() returns nonzero if the list is empty, and zero if the list contains at least one entry.

SLIST_FIRST(), and SLIST_NEXT() return a pointer to the first or next TYPE structure, respectively.

SLIST_HEAD_INITIALIZER() returns an initializer that can be assigned to the list head.

STANDARDS

BSD.

HISTORY

4.4BSD.

BUGS

SLIST_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. SLIST_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    SLIST_ENTRY(entry) entries;             /* Singly linked list */
};
SLIST_HEAD(slisthead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct slisthead head;                  /* Singly linked list
                                               head */
    SLIST_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    SLIST_INSERT_HEAD(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    SLIST_INSERT_AFTER(n1, n2, entries);
    SLIST_REMOVE(&head, n2, entry, entries);/* Deletion */
    free(n2);
    n3 = SLIST_FIRST(&head);
    SLIST_REMOVE_HEAD(&head, entries);      /* Deletion from the head */
    free(n3);
    for (unsigned int i = 0; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        SLIST_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    SLIST_FOREACH(np, &head, entries)
        printf("%i

“, np->data); while (!SLIST_EMPTY(&head)) { /* List deletion */ n1 = SLIST_FIRST(&head); SLIST_REMOVE_HEAD(&head, entries); free(n1); } SLIST_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2767 - Linux cli command iruserok

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command iruserok and provides detailed information about the command iruserok, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the iruserok.

NAME 🖥️ iruserok 🖥️

routines for returning a stream to a remote command

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h> /* Or <unistd.h> on some systems */
int rcmd(char **restrict ahost, unsigned short inport,
 const char *restrict locuser,
 const char *restrict remuser,
 const char *restrict cmd, int *restrict fd2p);
int rresvport(int *port);
int iruserok(uint32_t raddr, int superuser,
 const char *ruser, const char *luser);
int ruserok(const char *rhost, int superuser,
 const char *ruser, const char *luser);
int rcmd_af(char **restrict ahost, unsigned short inport,
 const char *restrict locuser,
 const char *restrict remuser,
 const char *restrict cmd, int *restrict fd2p,
 sa_family_t af);
int rresvport_af(int *port, sa_family_t af);
int iruserok_af(const void *restrict raddr, int superuser,
 const char *restrict ruser, const char *restrict luser,
 sa_family_t af);
int ruserok_af(const char *rhost, int superuser,
 const char *ruser, const char *luser,
 sa_family_t af);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

rcmd(), rcmd_af(), rresvport(), rresvport_af(), iruserok(), iruserok_af(), ruserok(), ruserok_af():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The rcmd() function is used by the superuser to execute a command on a remote machine using an authentication scheme based on privileged port numbers. The rresvport() function returns a file descriptor to a socket with an address in the privileged port space. The iruserok() and ruserok() functions are used by servers to authenticate clients requesting service with rcmd(). All four functions are used by the rshd(8) server (among others).

rcmd()

The rcmd() function looks up the host *ahost using gethostbyname(3), returning -1 if the host does not exist. Otherwise, *ahost is set to the standard name of the host and a connection is established to a server residing at the well-known Internet port inport.

If the connection succeeds, a socket in the Internet domain of type SOCK_STREAM is returned to the caller, and given to the remote command as stdin and stdout. If fd2p is nonzero, then an auxiliary channel to a control process will be set up, and a file descriptor for it will be placed in *fd2p. The control process will return diagnostic output from the command (unit 2) on this channel, and will also accept bytes on this channel as being UNIX signal numbers, to be forwarded to the process group of the command. If fd2p is 0, then the stderr (unit 2 of the remote command) will be made the same as the stdout and no provision is made for sending arbitrary signals to the remote process, although you may be able to get its attention by using out-of-band data.

The protocol is described in detail in rshd(8).

rresvport()

The rresvport() function is used to obtain a socket with a privileged port bound to it. This socket is suitable for use by rcmd() and several other functions. Privileged ports are those in the range 0 to 1023. Only a privileged process (on Linux, a process that has the CAP_NET_BIND_SERVICE capability in the user namespace governing its network namespace) is allowed to bind to a privileged port. In the glibc implementation, this function restricts its search to the ports from 512 to 1023. The port argument is value-result: the value it supplies to the call is used as the starting point for a circular search of the port range; on (successful) return, it contains the port number that was bound to.

iruserok() and ruserok()

The iruserok() and ruserok() functions take a remote host’s IP address or name, respectively, two usernames and a flag indicating whether the local user’s name is that of the superuser. Then, if the user is not the superuser, it checks the /etc/hosts.equiv file. If that lookup is not done, or is unsuccessful, the .rhosts in the local user’s home directory is checked to see if the request for service is allowed.

If this file does not exist, is not a regular file, is owned by anyone other than the user or the superuser, is writable by anyone other than the owner, or is hardlinked anywhere, the check automatically fails. Zero is returned if the machine name is listed in the hosts.equiv file, or the host and remote username are found in the .rhosts file; otherwise iruserok() and ruserok() return -1. If the local domain (as obtained from gethostname(2)) is the same as the remote domain, only the machine name need be specified.

If the IP address of the remote host is known, iruserok() should be used in preference to ruserok(), as it does not require trusting the DNS server for the remote host’s domain.

*_af() variants

All of the functions described above work with IPv4 (AF_INET) sockets. The “_af” variants take an extra argument that allows the socket address family to be specified. For these functions, the af argument can be specified as AF_INET or AF_INET6. In addition, rcmd_af() supports the use of AF_UNSPEC.

RETURN VALUE

The rcmd() function returns a valid socket descriptor on success. It returns -1 on error and prints a diagnostic message on the standard error.

The rresvport() function returns a valid, bound socket descriptor on success. On failure, it returns -1 and sets errno to indicate the error. The error code EAGAIN is overloaded to mean: “All network ports in use”.

For information on the return from ruserok() and iruserok(), see above.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

rcmd(), rcmd_af()

Thread safetyMT-Unsafe

rresvport(), rresvport_af()

Thread safetyMT-Safe

iruserok(), ruserok(), iruserok_af(), ruserok_af()

Thread safetyMT-Safe locale

STANDARDS

BSD.

HISTORY

iruserok_af()
rcmd_af()
rresvport_af()
ruserok_af()
glibc 2.2.

Solaris, 4.2BSD. The “_af” variants are more recent additions, and are not present on as wide a range of systems.

BUGS

iruserok() and iruserok_af() are declared in glibc headers only since glibc 2.12.

SEE ALSO

rlogin(1), rsh(1), rexec(3), rexecd(8), rlogind(8), rshd(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2768 - Linux cli command MB_LEN_MAX

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command MB_LEN_MAX and provides detailed information about the command MB_LEN_MAX, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the MB_LEN_MAX.

NAME 🖥️ MB_LEN_MAX 🖥️

maximum multibyte length of a character across all locales

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <limits.h>

DESCRIPTION

The MB_LEN_MAX macro is the maximum number of bytes needed to represent a single wide character, in any of the supported locales.

RETURN VALUE

A constant integer greater than zero.

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

NOTES

The entities MB_LEN_MAX and sizeof(wchar_t) are totally unrelated. In glibc, MB_LEN_MAX is typically 16 (6 in glibc versions earlier than 2.2), while sizeof(wchar_t) is 4.

SEE ALSO

MB_CUR_MAX(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2769 - Linux cli command PadWalkerpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command PadWalkerpm and provides detailed information about the command PadWalkerpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the PadWalkerpm.

NAME 🖥️ PadWalkerpm 🖥️

play with other peoples’ lexical variables

SYNOPSIS

use PadWalker qw(peek_my peek_our peek_sub closed_over); …

DESCRIPTION

PadWalker is a module which allows you to inspect (and even change!) lexical variables in any subroutine which called you. It will only show those variables which are in scope at the point of the call.

PadWalker is particularly useful for debugging. It’s even used by Perl’s built-in debugger. (It can also be used for evil, of course.)

I wouldn’t recommend using PadWalker directly in production code, but it’s your call. Some of the modules that use PadWalker internally are certainly safe for and useful in production.

peek_my LEVEL

peek_our LEVEL

The LEVEL argument is interpreted just like the argument to caller. So peek_my(0) returns a reference to a hash of all the my variables that are currently in scope; peek_my(1) returns a reference to a hash of all the my variables that are in scope at the point where the current sub was called, and so on. peek_our works in the same way, except that it lists the our variables rather than the my variables. The hash associates each variable name with a reference to its value. The variable names include the sigil, so the variable $x is represented by the string ‘$x’. For example: my $x = 12; my $h = peek_my (0); ${$h->{$x}}++; print $x; # prints 13 Or a more complex example: sub increment_my_x { my $h = peek_my (1); ${$h->{$x}}++; } my $x=5; increment_my_x; print $x; # prints 6

peek_sub SUB
The peek_sub routine takes a coderef as its argument, and returns a hash of the my variables used in that sub. The values will usually be undefined unless the sub is in use (i.e. in the call-chain) at the time. On the other hand: my $x = “Hello!”; my $r = peek_sub(sub {$x})->{$x}; print “$$r “; # prints Hello! If the sub defines several my variables with the same name, you’ll get the last one. I don’t know of any use for peek_sub that isn’t broken as a result of this, and it will probably be deprecated in a future version in favour of some alternative interface.

closed_over SUB
closed_over is similar to peek_sub, except that it only lists the my variables which are used in the subroutine but defined outside: in other words, the variables which it closes over. This does have reasonable uses: see Data::Dump::Streamer, for example (a future version of which may in fact use closed_over).

set_closed_over SUB, HASH_REF
set_closed_over reassigns the pad variables that are closed over by the subroutine. The second argument is a hash of references, much like the one returned from closed_over.

var_name LEVEL, VAR_REF

var_name SUB, VAR_REF

var_name(sub, var_ref) returns the name of the variable referred to by var_ref, provided it is a my variable used in the sub. The sub parameter can be either a CODE reference or a number. If it’s a number, it’s treated the same way as the argument to peek_my. For example, my $foo; print var_name(0, \foo); # prints $foo sub my_name { return var_name(1, shift); } print my_name(\foo); # ditto

AUTHOR

Robin Houston <[email protected]>

With contributions from Richard Soberberg, Jesse Luehrs and Yuval Kogman, bug-spotting from Peter Scott, Dave Mitchell and Goro Fuji, and suggestions from demerphq.

SEE ALSO

Devel::LexAlias, Devel::Caller, Sub::Parameters

COPYRIGHT

Copyright (c) 2000-2009, Robin Houston. All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2770 - Linux cli command Image_ExifTool_Shiftpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Shiftpm and provides detailed information about the command Image_ExifTool_Shiftpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Shiftpm.

NAME 🖥️ Image_ExifTool_Shiftpm 🖥️

ExifTool time shifting routines

DESCRIPTION

This module contains routines used by ExifTool to shift date and time values.

METHODS

ShiftTime

Shift date/time value

use Image::ExifTool; $err = Image::ExifTool::ShiftTime($dateTime, $shift);

Inputs:
0) Date/time string in EXIF format (eg. 2016:01:30 11:45:00). 1) Shift string (see below) with optional leading sign for shift direction. 2) [optional] Direction of shift (-1 or +1), or 0 or undef to use the sign from the shift string. 3) [optional] Reference to time-shift hash – filled in by first call to ShiftTime, and used in subsequent calls to shift date/time values by the same relative amount (see “TRICKY” section below). or 0) Shift string (and $_ contains the input date/time string).

Return value:
Error string, or undef on success and the input date/time string is shifted by the specified amount.

SHIFT STRING

Time shifts are applied to standard EXIF-formatted date/time values (eg. 2005:03:14 18:55:00). Date-only and time-only values may also be shifted, and an optional timezone (eg. -05:00) is also supported. Here are some general rules and examples to explain how shift strings are interpreted:

Date-only values are shifted using the following formats:

Y:M:D - shift date by Y years, M months and D days M:D - shift months and days only D - shift specified number of days

Time-only values are shifted using the following formats:

h:m:s - shift time by h hours, m minutes and s seconds h:m - shift hours and minutes only h - shift specified number of hours

Timezone shifts are specified in the following formats:

+h:m - shift timezone by h hours and m minutes -h:m - negative shift of timezone hours and minutes +h - shift timezone hours only -h - negative shift of timezone hours only

A valid shift value consists of one or two arguments, separated by a space. If only one is provided, it is assumed to be a time shift when applied to a time-only or a date/time value, or a date shift when applied to a date-only value. For example:

1 - shift by 1 hour if applied to a time or date/time value, or by one day if applied to a date value 2:0 - shift 2 hours (time, date/time), or 2 months (date) 5:0:0 - shift 5 hours (time, date/time), or 5 years (date) 0:0:1 - shift 1 s (time, date/time), or 1 day (date)

If two arguments are given, the date shift is first, followed by the time shift:

3:0:0 0 - shift date by 3 years 0 15:30 - shift time by 15 hours and 30 minutes 1:0:0 0:0:0+5:0 - shift date by 1 year and timezone by 5 hours

A date shift is simply ignored if applied to a time value or visa versa.

Numbers specified in shift fields may contain a decimal point:

1.5 - 1 hour 30 minutes (time, date/time), or 1 day (date) 2.5 0 - 2 days 12 hours (date/time), 12 hours (time) or 2 days (date)

And to save typing, a zero is assumed for any missing numbers:

1:: - shift by 1 hour (time, date/time) or 1 year (date) 26:: 0 - shift date by 26 years +:30 - shift timezone by 30 minutes

Below are some specific examples applied to real date and/or time values (‘Dir’ is the applied shift direction: ‘+’ is positive, ‘-’ is negative):

Original Value Shift Dir Shifted Value ——————— ——- — ——————— 20:30:00 5 + 01:30:00 2005:01:27 5 + 2005:02:01 2005:01:27 20:30:00 5 + 2005:01:28 01:30:00 11:54:00 2.5 0 - 23:54:00 2005:11:02 2.5 0 - 2005:10:31 2005:11:02 11:54:00 2.5 0 - 2005:10:30 23:54:00 2004:02:28 08:00:00 1 1.3 + 2004:02:29 09:18:00 07:00:00 -5 + 07:00:00 07:00:00+01:00 -5 + 07:00:00-04:00 07:00:00Z +2:30 - 07:00:00-02:30 1970:01:01 35:: + 2005:01:01 2005:01:01 400 + 2006:02:05 10:00:00.00 ::1.33 - 09:59:58.67

NOTES

The format of the original date/time value is not changed when the time shift is applied. This means that the length of the date/time string will not change, and only the numbers in the string will be modified. The only exception to this rule is that a ‘Z’ timezone is changed to ‘+00:00’ notation if a timezone shift is applied. A timezone will not be added to the date/time string.

TRICKY

This module is perhaps more complicated than it needs to be because it is designed to be very flexible in the way time shifts are specified and applied…

The ability to shift dates by Y years, M months, etc, conflicts with the design goal of maintaining a constant shift for all time values when applying a batch shift. This is because shifting by 1 month can be equivalent to anything from 28 to 31 days, and 1 year can be 365 or 366 days, depending on the starting date.

The inconsistency is handled by shifting the first tag found with the actual specified shift, then calculating the equivalent time difference in seconds for this shift and applying this difference to subsequent tags in a batch conversion. So if it works as designed, the behaviour should be both intuitive and mathematically correct, and the user shouldn’t have to worry about details such as this (in keeping with Perl’s “do the right thing” philosophy).

BUGS

Due to the use of the standard time library functions, dates are typically limited to the range 1970 to 2038 on 32-bit systems.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2771 - Linux cli command SIMPLEQ_NEXT

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command SIMPLEQ_NEXT and provides detailed information about the command SIMPLEQ_NEXT, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the SIMPLEQ_NEXT.

NAME 🖥️ SIMPLEQ_NEXT 🖥️

implementation of a singly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
STAILQ_ENTRY(TYPE);
STAILQ_HEAD(HEADNAME, TYPE);
STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD head);
void STAILQ_INIT(STAILQ_HEAD *head);
int STAILQ_EMPTY(STAILQ_HEAD *head);
void STAILQ_INSERT_HEAD(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_TAIL(STAILQ_HEAD *head,
 struct TYPE *elm, STAILQ_ENTRY NAME);
void STAILQ_INSERT_AFTER(STAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, STAILQ_ENTRY NAME);
struct TYPE *STAILQ_FIRST(STAILQ_HEAD *head);
struct TYPE *STAILQ_NEXT(struct TYPE *elm, STAILQ_ENTRY NAME);
STAILQ_FOREACH(struct TYPE *var, STAILQ_HEAD *head, STAILQ_ENTRY NAME);
void STAILQ_REMOVE(STAILQ_HEAD *head, struct TYPE *elm, TYPE,
 STAILQ_ENTRY NAME);
void STAILQ_REMOVE_HEAD(STAILQ_HEAD *head,
 STAILQ_ENTRY NAME);
void STAILQ_CONCAT(STAILQ_HEAD *head1, STAILQ_HEAD *head2);

Note: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES.

DESCRIPTION

These macros define and operate on singly linked tail queues.

In the macro definitions, TYPE is the name of a user-defined structure, that must contain a field of type STAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user-defined structure that must be declared using the macro STAILQ_HEAD().

Creation

A singly linked tail queue is headed by a structure defined by the STAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the tail queue and the other to the last element in the tail queue. The elements are singly linked for minimum space and pointer manipulation overhead at the expense of O(n) removal for arbitrary elements. New elements can be added to the tail queue after an existing element, at the head of the tail queue, or at the end of the tail queue. A STAILQ_HEAD structure is declared as follows:

STAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the tail queue. A pointer to the head of the tail queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

STAILQ_ENTRY() declares a structure that connects the elements in the tail queue.

STAILQ_HEAD_INITIALIZER() evaluates to an initializer for the tail queue head.

STAILQ_INIT() initializes the tail queue referenced by head.

STAILQ_EMPTY() evaluates to true if there are no items on the tail queue.

Insertion

STAILQ_INSERT_HEAD() inserts the new element elm at the head of the tail queue.

STAILQ_INSERT_TAIL() inserts the new element elm at the end of the tail queue.

STAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

STAILQ_FIRST() returns the first item on the tail queue or NULL if the tail queue is empty.

STAILQ_NEXT() returns the next item on the tail queue, or NULL this item is the last.

STAILQ_FOREACH() traverses the tail queue referenced by head in the forward direction, assigning each element in turn to var.

Removal

STAILQ_REMOVE() removes the element elm from the tail queue.

STAILQ_REMOVE_HEAD() removes the element at the head of the tail queue. For optimum efficiency, elements being removed from the head of the tail queue should use this macro explicitly rather than the generic STAILQ_REMOVE() macro.

Other features

STAILQ_CONCAT() concatenates the tail queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

STAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

STAILQ_FIRST(), and STAILQ_NEXT() return a pointer to the first or next TYPE structure, respectively.

STAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

VERSIONS

Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for historical reasons they were named differently on different BSDs. STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility reasons, some systems provide both sets of macros. glibc provides both STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ equivalent to STAILQ_CONCAT().

BUGS

STAILQ_FOREACH() doesn’t allow var to be removed or freed within the loop, as it would interfere with the traversal. STAILQ_FOREACH_SAFE(), which is present on the BSDs but is not present in glibc, fixes this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

STANDARDS

BSD.

HISTORY

4.4BSD.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    STAILQ_ENTRY(entry) entries;        /* Singly linked tail queue */
};
STAILQ_HEAD(stailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct stailhead head;                  /* Singly linked tail queue
                                               head */
    STAILQ_INIT(&head);                     /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    STAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    STAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    STAILQ_INSERT_AFTER(&head, n1, n2, entries);
    STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
    free(n2);
    n3 = STAILQ_FIRST(&head);
    STAILQ_REMOVE_HEAD(&head, entries);     /* Deletion from the head */
    free(n3);
    n1 = STAILQ_FIRST(&head);
    n1->data = 0;
    for (unsigned int i = 1; i < 5; i++) {
        n1 = malloc(sizeof(struct entry));
        STAILQ_INSERT_HEAD(&head, n1, entries);
        n1->data = i;
    }
                                            /* Forward traversal */
    STAILQ_FOREACH(np, &head, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = STAILQ_FIRST(&head); while (n1 != NULL) { n2 = STAILQ_NEXT(n1, entries); free(n1); n1 = n2; } STAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2772 - Linux cli command Image_ExifTool_Olympuspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Olympuspm and provides detailed information about the command Image_ExifTool_Olympuspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Olympuspm.

NAME 🖥️ Image_ExifTool_Olympuspm 🖥️

Olympus/Epson maker notes tags

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret Olympus or Epson maker notes in EXIF information.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html>

<http://www.cybercom.net/~dcoffin/dcraw/>

<http://www.ozhiker.com/electronics/pjmt/jpeg_info/olympus_mn.html>

<http://olypedia.de/Olympus_Makernotes>

ACKNOWLEDGEMENTS

Thanks to Markku Hanninen, Remi Guyomarch, Frank Ledwon, Michael Meissner, Mark Dapoz, Ioannis Panagiotopoulos and Tomasz Kawecki for their help figuring out some Olympus tags, and Lilo Huang, Chris Shaw and Viktor Lushnikov for adding to the LensType list.

SEE ALSO

“Olympus Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2773 - Linux cli command setbuffer

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setbuffer and provides detailed information about the command setbuffer, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setbuffer.

NAME 🖥️ setbuffer 🖥️

stream buffering operations

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int setvbuf(FILE *restrict stream, char buf[restrict .size],
 int mode, size_t size);
void setbuf(FILE *restrict stream, char *restrict buf);
void setbuffer(FILE *restrict stream, char buf[restrict .size],
 size_t size);
void setlinebuf(FILE *stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

setbuffer(), setlinebuf():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The three types of buffering available are unbuffered, block buffered, and line buffered. When an output stream is unbuffered, information appears on the destination file or terminal as soon as written; when it is block buffered, many characters are saved up and written as a block; when it is line buffered, characters are saved up until a newline is output or input is read from any stream attached to a terminal device (typically stdin). The function fflush(3) may be used to force the block out early. (See fclose(3).)

Normally all files are block buffered. If a stream refers to a terminal (as stdout normally does), it is line buffered. The standard error stream stderr is always unbuffered by default.

The setvbuf() function may be used on any open stream to change its buffer. The mode argument must be one of the following three macros:

_IONBF
unbuffered

_IOLBF
line buffered

_IOFBF
fully buffered

Except for unbuffered files, the buf argument should point to a buffer at least size bytes long; this buffer will be used instead of the current buffer. If the argument buf is NULL, only the mode is affected; a new buffer will be allocated on the next read or write operation. The setvbuf() function may be used only after opening a stream and before any other operations have been performed on it.

The other three calls are, in effect, simply aliases for calls to setvbuf(). The setbuf() function is exactly equivalent to the call

setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);

The setbuffer() function is the same, except that the size of the buffer is up to the caller, rather than being determined by the default BUFSIZ. The setlinebuf() function is exactly equivalent to the call:

setvbuf(stream, NULL, _IOLBF, 0);

RETURN VALUE

The function setvbuf() returns 0 on success. It returns nonzero on failure (mode is invalid or the request cannot be honored). It may set errno on failure.

The other functions do not return a value.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setbuf(), setbuffer(), setlinebuf(), setvbuf()

Thread safetyMT-Safe

STANDARDS

setbuf()
setvbuf()
C11, POSIX.1-2008.

HISTORY

setbuf()
setvbuf()
C89, POSIX.1-2001.

CAVEATS

POSIX notes that the value of errno is unspecified after a call to setbuf() and further notes that, since the value of errno is not required to be unchanged after a successful call to setbuf(), applications should instead use setvbuf() in order to detect errors.

BUGS

You must make sure that the space that buf points to still exists by the time stream is closed, which also happens at program termination. For example, the following is invalid:

#include <stdio.h>
int
main(void)
{
    char buf[BUFSIZ];
    setbuf(stdout, buf);
    printf("Hello, world!

“); return 0; }

SEE ALSO

stdbuf(1), fclose(3), fflush(3), fopen(3), fread(3), malloc(3), printf(3), puts(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2774 - Linux cli command XShmQueryExtension

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XShmQueryExtension and provides detailed information about the command XShmQueryExtension, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XShmQueryExtension.

NAME 🖥️ XShmQueryExtension 🖥️

X Shared Memory extension functions

SYNTAX

#include <X11/Xlib.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
Bool	XShmQueryExtension(
	Display *display);
Bool XShmQueryVersion(
	Display *display;
	int *major, *minor;
	Bool *pixmaps);
int XShmPixmapFormat(
	Display *display);
Bool XShmAttach(
	Display *display;
	XShmSegmentInfo *shminfo);
Bool XShmDetach(
	Display *display;
	XShmSegmentInfo *shminfo);

XImage *XShmCreateImage (
	Display *display;
	Visual *visual;
	unsigned int depth;
	int format;
	char *data;
	XShmSegmentInfo *shminfo;
	unsigned int width, height);
Bool XShmPutImage(
	Display *display;
	Drawable d;
	GC gc;
	XImage *image;
	int src_x, src_y, dest_x, dest_y;
	unsigned int width, height;
	bool send_event);
Bool XShmGetImage (
	Display *display;
	Drawable d;
	XImage *image;
	int x, y;
	unsigned long plane_mask);
Pixmap XShmCreatePixmap(
        Display *display;
        Drawable d;
        char *data;
	XShmSegmentInfo *shminfo;
	unsigned int width, height, depth);
Status XShmGetEventBase(
	Display *display);

STRUCTURES

Events:
typedef struct {
    int type;               /* of event */
    unsigned long serial;   /* # of last request processed by server*/
    Bool send_event;        /* true if this came from a SendEvent request*/
    Display *display;       /* Display the event was read from */
    Drawable drawable;      /* drawable of request */
    int major_code;         /* ShmReqCode */
    int minor_code;         /* X_ShmPutImage */
    ShmSeg shmseg;          /* the ShmSeg used in the request*/
    unsigned long offset;   /* the offset into ShmSeg used in the request*/
} XShmCompletionEvent;
a structure of type XShmSegmentInfo :

typedef struct {
    ShmSeg shmseg;      /* resource id */
    int shmid;          /* kernel id */
    char *shmaddr;      /* address in client */
    Bool readOnly;      /* how the server should attach it */
} XShmSegmentInfo;

DESCRIPTION

* XShmQueryExtension * checks to see if the shared memory extensions are available for the specified display.

* XShmQueryVersion * returns the version numbers of the extension implementation. Shared memory pixmaps are supported if the pixmaps argument returns true.

* XShmAttach * tells the server to attach to your shared memory segment. If all goes well, you will get a non-zero status, back and your XImage is ready for use.

* XShmDetach * tells the server to detach from your shared memory segment.

* XShmPutImage * combines an image in memory with a shape of the specified drawable. If XYBitmap format is used, the depth must be one, or a ``BadMatch’’ error results. The foreground pixel in the GC defines the source for the one bits in the image, and the background pixel defines the source for the zero bits. For XYPixmap and ZPixmap, the depth must match the depth of the drawable, or a ``BadMatch’’ error results.

* XShmGetImage * reads image data into a shared memory XImage where display is the display of interest, drawable is the source drawable, image is the destination XImage, x and y are offsets within the drawable, and plane_mask defines which planes are to be read.

* XShmCreateImage * allocates the memory needed for an XImage structure for the specified display but does not allocate space for the image itself.

* XShmPixmapFormat * gets the format for the server. If your application can deal with the server pixmap data format, a shared memory segment and shminfo structure are created.

* XShmCreatePixmap * points to a pixmap which you can manipulate in all of the usual ways, with the added bonus of being able to edit its contents directly through the shared memory segment.

* XShmGetEventBase * gets the completion event value.

SEE ALSO

MIT-SHM - The MIT Shared Memory Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2775 - Linux cli command Net_DBus_Objectpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DBus_Objectpm and provides detailed information about the command Net_DBus_Objectpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DBus_Objectpm.

NAME 🖥️ Net_DBus_Objectpm 🖥️

Implement objects to export to the bus

SYNOPSIS

# Connecting an object to the bus, under a service package main; use Net::DBus; # Attach to the bus my $bus = Net::DBus->find; # Acquire a service org.demo.Hello my $service = $bus->export_service(“org.demo.Hello”); # Export our object within the service my $object = Demo::HelloWorld->new($service); ….rest of program… # Define a new package for the object were going # to export package Demo::HelloWorld; # Specify the main interface provided by our object use Net::DBus::Exporter qw(org.example.demo.Greeter); # Were going to be a DBus object use base qw(Net::DBus::Object); # Export a Greeting signal taking a stringl string parameter dbus_signal(“Greeting”, [“string”]); # Export Hello as a method accepting a single string # parameter, and returning a single string value dbus_method(“Hello”, [“string”], [“string”]); sub new { my $class = shift; my $service = shift; my $self = $class->SUPER::new($service, “/org/demo/HelloWorld”); bless $self, $class; return $self; } sub Hello { my $self = shift; my $name = shift; $self->emit_signal(“Greeting”, “Hello $name”); return “Said hello to $name”; } # Export Goodbye as a method accepting a single string # parameter, and returning a single string, but put it # in the org.exaple.demo.Farewell interface dbus_method(“Goodbye”, [“string”], [“string”], “org.example.demo.Farewell”); sub Goodbye { my $self = shift; my $name = shift; $self->emit_signal(“Greeting”, “Goodbye $name”); return “Said goodbye to $name”; }

DESCRIPTION

This the base for implementing objects which are directly exported to the bus. The methods implemented in a subclass are mapped to methods on the bus. By using this class, an application is directly tieing the RPC functionality into its object model. Applications may thus prefer to use the Net::DBus::ProxyObject class which allows the RPC functionality to be maintained separately from the core object model, by proxying RPC method calls.

METHODS

my $object = Net::DBus::Object->new($service, $path)
This creates a new DBus object with an path of $path registered within the service $service. The $path parameter should be a string complying with the usual DBus requirements for object paths, while the $service parameter should be an instance of Net::DBus::Service. The latter is typically obtained by calling the export_service method on the Net::DBus object.

my $object = Net::DBus::Object->new($parentobj, $subpath)
This creates a new DBus child object with an path of $subpath relative to its parent $parentobj. The $subpath parameter should be a string complying with the usual DBus requirements for object paths, while the $parentobj parameter should be an instance of Net::DBus::BaseObject or a subclass.

AUTHOR

Daniel P. Berrange

COPYRIGHT

Copyright (C) 2005-2011 Daniel P. Berrange

SEE ALSO

Net::DBus, Net::DBus::Service, Net::DBus::BaseObject, Net::DBus::ProxyObject, Net::DBus::Exporter, Net::DBus::RemoteObject

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2776 - Linux cli command pthread_testcancel

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_testcancel and provides detailed information about the command pthread_testcancel, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_testcancel.

NAME 🖥️ pthread_testcancel 🖥️

request delivery of any pending cancelation request

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
void pthread_testcancel(void);

DESCRIPTION

Calling pthread_testcancel() creates a cancelation point within the calling thread, so that a thread that is otherwise executing code that contains no cancelation points will respond to a cancelation request.

If cancelability is disabled (using pthread_setcancelstate(3)), or no cancelation request is pending, then a call to pthread_testcancel() has no effect.

RETURN VALUE

This function does not return a value. If the calling thread is canceled as a consequence of a call to this function, then the function does not return.

ERRORS

This function always succeeds.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_testcancel()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

glibc 2.0. POSIX.1-2001.

EXAMPLES

See pthread_cleanup_push(3).

SEE ALSO

pthread_cancel(3), pthread_cleanup_push(3), pthread_setcancelstate(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2777 - Linux cli command Regexp_Common_URI_faxpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_URI_faxpm and provides detailed information about the command Regexp_Common_URI_faxpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_URI_faxpm.

NAME 🖥️ Regexp_Common_URI_faxpm 🖥️

  • Returns a pattern for fax URIs.

SYNOPSIS

use Regexp::Common qw /URI/; while (<>) { /$RE{URI}{fax}/ and print “Contains a fax URI. “; }

DESCRIPTION

$RE{URI}{fax}

Returns a pattern that matches fax URIs, as defined by RFC 2806. Under {-keep}, the following are returned:

$1
The complete URI.

$2
The scheme.

$3
The phone number, including any possible add-ons like ISDN subaddress, a post dial part, area specifier, service provider, etc.

“$RE{URI}{fax}{nofuture}”

As above (including what’s returned by {-keep}), with the exception that future extensions are not allowed. Without allowing those future extensions, it becomes much easier to check a URI if the correct syntax for post dial, service provider, phone context, etc has been used - otherwise the regex could always classify them as a future extension.

REFERENCES

[RFC 1035]
Mockapetris, P.: DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION. November 1987.

[RFC 2396]
Berners-Lee, Tim, Fielding, R., and Masinter, L.: Uniform Resource Identifiers (URI): Generic Syntax. August 1998.

[RFC 2806]
Vaha-Sipila, A.: URLs for Telephone Calls. April 2000.

SEE ALSO

Regexp::Common::URI for other supported URIs.

AUTHOR

Damian Conway ([email protected])

MAINTENANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2778 - Linux cli command sscanf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sscanf and provides detailed information about the command sscanf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sscanf.

NAME 🖥️ sscanf 🖥️

input string format conversion

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int sscanf(const char *restrict str,
 const char *restrict format, ...);
#include <stdarg.h>
int vsscanf(const char *restrict str,
 const char *restrict format, va_list ap);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

vsscanf():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The sscanf() family of functions scans formatted input according to format as described below. This format may contain conversion specifications; the results from such conversions, if any, are stored in the locations pointed to by the pointer arguments that follow format. Each pointer argument must be of a type that is appropriate for the value returned by the corresponding conversion specification.

If the number of conversion specifications in format exceeds the number of pointer arguments, the results are undefined. If the number of pointer arguments exceeds the number of conversion specifications, then the excess pointer arguments are evaluated, but are otherwise ignored.

sscanf() These functions read their input from the string pointed to by str.

The vsscanf() function is analogous to vsprintf(3).

The format string consists of a sequence of directives which describe how to process the sequence of input characters. If processing of a directive fails, no further input is read, and sscanf() returns. A “failure” can be either of the following: input failure, meaning that input characters were unavailable, or matching failure, meaning that the input was inappropriate (see below).

A directive is one of the following:

·
A sequence of white-space characters (space, tab, newline, etc.; see isspace(3)). This directive matches any amount of white space, including none, in the input.

·
An ordinary character (i.e., one other than white space or ‘%’). This character must exactly match the next character of input.

·
A conversion specification, which commences with a ‘%’ (percent) character. A sequence of characters from the input is converted according to this specification, and the result is placed in the corresponding pointer argument. If the next item of input does not match the conversion specification, the conversion fails—this is a matching failure.

Each conversion specification in format begins with either the character ‘%’ or the character sequence “%n$” (see below for the distinction) followed by:

·
An optional ‘*’ assignment-suppression character: sscanf() reads input as directed by the conversion specification, but discards the input. No corresponding pointer argument is required, and this specification is not included in the count of successful assignments returned by scanf().

·
For decimal conversions, an optional quote character (’). This specifies that the input number may include thousands’ separators as defined by the LC_NUMERIC category of the current locale. (See setlocale(3).) The quote character may precede or follow the ‘*’ assignment-suppression character.

·
An optional ’m’ character. This is used with string conversions (%s, %c, %[), and relieves the caller of the need to allocate a corresponding buffer to hold the input: instead, sscanf() allocates a buffer of sufficient size, and assigns the address of this buffer to the corresponding pointer argument, which should be a pointer to a char * variable (this variable does not need to be initialized before the call). The caller should subsequently free(3) this buffer when it is no longer required.

·
An optional decimal integer which specifies the maximum field width. Reading of characters stops either when this maximum is reached or when a nonmatching character is found, whichever happens first. Most conversions discard initial white space characters (the exceptions are noted below), and these discarded characters don’t count toward the maximum field width. String input conversions store a terminating null byte (‘�’) to mark the end of the input; the maximum field width does not include this terminator.

·
An optional type modifier character. For example, the l type modifier is used with integer conversions such as %d to specify that the corresponding pointer argument refers to a long rather than a pointer to an int.

·
A conversion specifier that specifies the type of input conversion to be performed.

The conversion specifications in format are of two forms, either beginning with ‘%’ or beginning with “%n$”. The two forms should not be mixed in the same format string, except that a string containing “%n$” specifications can include %% and %*. If format contains ‘%’ specifications, then these correspond in order with successive pointer arguments. In the “%n$” form (which is specified in POSIX.1-2001, but not C99), n is a decimal integer that specifies that the converted input should be placed in the location referred to by the n-th pointer argument following format.

Conversions

The following type modifier characters can appear in a conversion specification:

h
Indicates that the conversion will be one of d, i, o, u, x, X, or n and the next pointer is a pointer to a short or unsigned short (rather than int).

hh
As for h, but the next pointer is a pointer to a signed char or unsigned char.

j
As for h, but the next pointer is a pointer to an intmax_t or a uintmax_t. This modifier was introduced in C99.

l
Indicates either that the conversion will be one of d, i, o, u, x, X, or n and the next pointer is a pointer to a long or unsigned long (rather than int), or that the conversion will be one of e, f, or g and the next pointer is a pointer to double (rather than float). If used with %c or %s, the corresponding parameter is considered as a pointer to a wide character or wide-character string respectively.

ll
(ell-ell) Indicates that the conversion will be one of b, d, i, o, u, x, X, or n and the next pointer is a pointer to a long long or unsigned long long (rather than int).

L
Indicates that the conversion will be either e, f, or g and the next pointer is a pointer to long double or (as a GNU extension) the conversion will be d, i, o, u, or x and the next pointer is a pointer to long long.

q
equivalent to L. This specifier does not exist in ANSI C.

t
As for h, but the next pointer is a pointer to a ptrdiff_t. This modifier was introduced in C99.

z
As for h, but the next pointer is a pointer to a size_t. This modifier was introduced in C99.

The following conversion specifiers are available:

%
Matches a literal ‘%’. That is, %% in the format string matches a single input ‘%’ character. No conversion is done (but initial white space characters are discarded), and assignment does not occur.

d
Matches an optionally signed decimal integer; the next pointer must be a pointer to int.

i
Matches an optionally signed integer; the next pointer must be a pointer to int. The integer is read in base 16 if it begins with 0x or 0X, in base 8 if it begins with 0, and in base 10 otherwise. Only characters that correspond to the base are used.

o
Matches an unsigned octal integer; the next pointer must be a pointer to unsigned int.

u
Matches an unsigned decimal integer; the next pointer must be a pointer to unsigned int.

x
Matches an unsigned hexadecimal integer (that may optionally begin with a prefix of 0x or 0X, which is discarded); the next pointer must be a pointer to unsigned int.

X
Equivalent to x.

f
Matches an optionally signed floating-point number; the next pointer must be a pointer to float.

e
Equivalent to f.

g
Equivalent to f.

E
Equivalent to f.

a
(C99) Equivalent to f.

s
Matches a sequence of non-white-space characters; the next pointer must be a pointer to the initial element of a character array that is long enough to hold the input sequence and the terminating null byte (‘�’), which is added automatically. The input string stops at white space or at the maximum field width, whichever occurs first.

c
Matches a sequence of characters whose length is specified by the maximum field width (default 1); the next pointer must be a pointer to char, and there must be enough room for all the characters (no terminating null byte is added). The usual skip of leading white space is suppressed. To skip white space first, use an explicit space in the format.

[
Matches a nonempty sequence of characters from the specified set of accepted characters; the next pointer must be a pointer to char, and there must be enough room for all the characters in the string, plus a terminating null byte. The usual skip of leading white space is suppressed. The string is to be made up of characters in (or not in) a particular set; the set is defined by the characters between the open bracket [ character and a close bracket ] character. The set excludes those characters if the first character after the open bracket is a circumflex (^). To include a close bracket in the set, make it the first character after the open bracket or the circumflex; any other position will end the set. The hyphen character - is also special; when placed between two other characters, it adds all intervening characters to the set. To include a hyphen, make it the last character before the final close bracket. For instance, [^]0-9-] means the set “everything except close bracket, zero through nine, and hyphen”. The string ends with the appearance of a character not in the (or, with a circumflex, in) set or when the field width runs out.

p
Matches a pointer value (as printed by %p in printf(3)); the next pointer must be a pointer to a pointer to void.

n
Nothing is expected; instead, the number of characters consumed thus far from the input is stored through the next pointer, which must be a pointer to int, or variant whose size matches the (optionally) supplied integer length modifier. This is not a conversion and does not increase the count returned by the function. The assignment can be suppressed with the * assignment-suppression character, but the effect on the return value is undefined. Therefore %*n conversions should not be used.

RETURN VALUE

On success, these functions return the number of input items successfully matched and assigned; this can be fewer than provided for, or even zero, in the event of an early matching failure.

The value EOF is returned if the end of input is reached before either the first successful conversion or a matching failure occurs.

ERRORS

EILSEQ
Input byte sequence does not form a valid character.

EINVAL
Not enough arguments; or format is NULL.

ENOMEM
Out of memory.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

sscanf(), vsscanf()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

C89, POSIX.1-2001.

The q specifier is the 4.4BSD notation for long long, while ll or the usage of L in integer conversions is the GNU notation.

The Linux version of these functions is based on the GNU libio library. Take a look at the info documentation of GNU libc (glibc-1.08) for a more concise description.

NOTES

The ‘a’ assignment-allocation modifier

Originally, the GNU C library supported dynamic allocation for string inputs (as a nonstandard extension) via the a character. (This feature is present at least as far back as glibc 2.0.) Thus, one could write the following to have sscanf() allocate a buffer for a string, with a pointer to that buffer being returned in *buf:

char *buf;
sscanf(str, "%as", &buf);

The use of the letter a for this purpose was problematic, since a is also specified by the ISO C standard as a synonym for f (floating-point input). POSIX.1-2008 instead specifies the m modifier for assignment allocation (as documented in DESCRIPTION, above).

Note that the a modifier is not available if the program is compiled with gcc -std=c99 or gcc -D_ISOC99_SOURCE (unless _GNU_SOURCE is also specified), in which case the a is interpreted as a specifier for floating-point numbers (see above).

Support for the m modifier was added to glibc 2.7, and new programs should use that modifier instead of a.

As well as being standardized by POSIX, the m modifier has the following further advantages over the use of a:

  • It may also be applied to %c conversion specifiers (e.g., %3mc).

  • It avoids ambiguity with respect to the %a floating-point conversion specifier (and is unaffected by gcc -std=c99 etc.).

BUGS

Numeric conversion specifiers

Use of the numeric conversion specifiers produces Undefined Behavior for invalid input. See C11 7.21.6.2/10. This is a bug in the ISO C standard, and not an inherent design issue with the API. However, current implementations are not safe from that bug, so it is not recommended to use them. Instead, programs should use functions such as strtol(3) to parse numeric input. Alternatively, mitigate it by specifying a maximum field width.

Nonstandard modifiers

These functions are fully C99 conformant, but provide the additional modifiers q and a as well as an additional behavior of the L and ll modifiers. The latter may be considered to be a bug, as it changes the behavior of modifiers defined in C99.

Some combinations of the type modifiers and conversion specifiers defined by C99 do not make sense (e.g., %Ld). While they may have a well-defined behavior on Linux, this need not to be so on other architectures. Therefore it usually is better to use modifiers that are not defined by C99 at all, that is, use q instead of L in combination with d, i, o, u, x, and X conversions or ll.

The usage of q is not the same as on 4.4BSD, as it may be used in float conversions equivalently to L.

EXAMPLES

To use the dynamic allocation conversion specifier, specify m as a length modifier (thus %ms or %m[range]). The caller must free(3) the returned string, as in the following example:

char *p;
int n;
errno = 0;
n = sscanf(str, "%m[a-z]", &p);
if (n == 1) {
    printf("read: %s

“, p); free(p); } else if (errno != 0) { perror(“sscanf”); } else { fprintf(stderr, “No matching characters “); }

As shown in the above example, it is necessary to call free(3) only if the sscanf() call successfully read a string.

SEE ALSO

getc(3), printf(3), setlocale(3), strtod(3), strtol(3), strtoul(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2779 - Linux cli command timeradd

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command timeradd and provides detailed information about the command timeradd, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the timeradd.

NAME 🖥️ timeradd 🖥️

timeval operations

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/time.h>
void timeradd(struct timeval *a, struct timeval *b,
 struct timeval *res);
void timersub(struct timeval *a, struct timeval *b,
 struct timeval *res);
void timerclear(struct timeval *tvp);
int timerisset(struct timeval *tvp);
int timercmp(struct timeval *a, struct timeval *b, CMP);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE

DESCRIPTION

The macros are provided to operate on timeval structures, defined in <sys/time.h> as:

struct timeval {
    time_t      tv_sec;     /* seconds */
    suseconds_t tv_usec;    /* microseconds */
};

timeradd() adds the time values in a and b, and places the sum in the timeval pointed to by res. The result is normalized such that res->tv_usec has a value in the range 0 to 999,999.

timersub() subtracts the time value in b from the time value in a, and places the result in the timeval pointed to by res. The result is normalized such that res->tv_usec has a value in the range 0 to 999,999.

timerclear() zeros out the timeval structure pointed to by tvp, so that it represents the Epoch: 1970-01-01 00:00:00 +0000 (UTC).

timerisset() returns true (nonzero) if either field of the timeval structure pointed to by tvp contains a nonzero value.

timercmp() compares the timer values in a and b using the comparison operator CMP, and returns true (nonzero) or false (0) depending on the result of the comparison. Some systems (but not Linux/glibc), have a broken timercmp() implementation, in which CMP of >=, <=, and == do not work; portable applications can instead use

!timercmp(..., <)
!timercmp(..., >)
!timercmp(..., !=)

RETURN VALUE

timerisset() and timercmp() return true (nonzero) or false (0).

ERRORS

No errors are defined.

STANDARDS

None.

HISTORY

BSD.

SEE ALSO

gettimeofday(2), time(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2780 - Linux cli command Image_ExifTool_Charsetpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Charsetpm and provides detailed information about the command Image_ExifTool_Charsetpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Charsetpm.

NAME 🖥️ Image_ExifTool_Charsetpm 🖥️

ExifTool character encoding routines

SYNOPSIS

This module is required by Image::ExifTool.

DESCRIPTION

This module contains routines used by ExifTool to translate special character sets. Currently, the following character sets are supported:

UTF8, UTF16, UCS2, UCS4, Arabic, Baltic, Cyrillic, Greek, Hebrew, JIS, Latin, Latin2, DOSLatinUS, DOSLatin1, DOSCyrillic, MacArabic, MacChineseCN, MacChineseTW, MacCroatian, MacCyrillic, MacGreek, MacHebrew, MacIceland, MacJapanese, MacKorean, MacLatin2, MacRSymbol, MacRoman, MacRomanian, MacThai, MacTurkish, PDFDoc, RSymbol, ShiftJIS, Symbol, Thai, Turkish, Vietnam

However, only some of these character sets are available to the user via ExifTool options – the multi-byte character sets are used only internally when decoding certain types of information.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2781 - Linux cli command regmatch_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command regmatch_ttype and provides detailed information about the command regmatch_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the regmatch_ttype.

NAME 🖥️ regmatch_ttype 🖥️

POSIX regex functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <regex.h>
int regcomp(regex_t *restrict preg, const char *restrict regex,
 int cflags);
int regexec(const regex_t *restrict preg",constchar*restrict"string,
 size_t nmatch, regmatch_t pmatch[_Nullable restrict .nmatch],
 int eflags);
size_t regerror(int errcode, const regex_t *_Nullable restrict preg,
 char errbuf[_Nullable restrict .errbuf_size],
 size_t errbuf_size);
void regfree(regex_t *preg);
typedef struct {
 size_t re_nsub;
} regex_t;
typedef struct {
 regoff_t rm_so;
 regoff_t rm_eo;
} regmatch_t;
typedef /* ... */ regoff_t;

DESCRIPTION

Compilation

regcomp() is used to compile a regular expression into a form that is suitable for subsequent regexec() searches.

On success, the pattern buffer at *preg is initialized. regex is a null-terminated string. The locale must be the same when running regexec().

After regcomp() succeeds, preg->re_nsub holds the number of subexpressions in regex. Thus, a value of preg->re_nsub + 1 passed as nmatch to regexec() is sufficient to capture all matches.

cflags is the bitwise OR of zero or more of the following:

REG_EXTENDED
Use POSIX Extended Regular Expression syntax when interpreting regex. If not set, POSIX Basic Regular Expression syntax is used.

REG_ICASE
Do not differentiate case. Subsequent regexec() searches using this pattern buffer will be case insensitive.

REG_NOSUB
Report only overall success. regexec() will use only pmatch for REG_STARTEND, ignoring nmatch.

REG_NEWLINE
Match-any-character operators don’t match a newline.

A nonmatching list ([^…]) not containing a newline does not match a newline.

Match-beginning-of-line operator (^) matches the empty string immediately after a newline, regardless of whether eflags, the execution flags of regexec(), contains REG_NOTBOL.

Match-end-of-line operator ($) matches the empty string immediately before a newline, regardless of whether eflags contains REG_NOTEOL.

Matching

regexec() is used to match a null-terminated string against the compiled pattern buffer in *preg, which must have been initialised with regexec(). eflags is the bitwise OR of zero or more of the following flags:

REG_NOTBOL
The match-beginning-of-line operator always fails to match (but see the compilation flag REG_NEWLINE above). This flag may be used when different portions of a string are passed to regexec() and the beginning of the string should not be interpreted as the beginning of the line.

REG_NOTEOL
The match-end-of-line operator always fails to match (but see the compilation flag REG_NEWLINE above).

REG_STARTEND
Match [string + pmatch[0].rm_so,* string + pmatch[0].rm_eo*) instead of [string,* string + strlen(string)*). This allows matching embedded NUL bytes and avoids a strlen(3) on known-length strings. If any matches are returned (REG_NOSUB wasn’t passed to regcomp(), the match succeeded, and nmatch > 0), they overwrite pmatch as usual, and the match offsets remain relative to string (not string + pmatch[0].rm_so). This flag is a BSD extension, not present in POSIX.

Match offsets

Unless REG_NOSUB was passed to regcomp(), it is possible to obtain the locations of matches within string: regexec() fills nmatch elements of pmatch with results: pmatch[0] corresponds to the entire match, pmatch[1] to the first subexpression, etc. If there were more matches than nmatch, they are discarded; if fewer, unused elements of pmatch are filled with -1s.

Each returned valid (non--1) match corresponds to the range [string + rm_so,* string + rm_eo*).

regoff_t is a signed integer type capable of storing the largest value that can be stored in either an ptrdiff_t type or a ssize_t type.

Error reporting

regerror() is used to turn the error codes that can be returned by both regcomp() and regexec() into error message strings.

If preg isn’t a null pointer, errcode must be the latest error returned from an operation on preg.

If errbuf_size isn’t 0, up to errbuf_size bytes are copied to errbuf; the error string is always null-terminated, and truncated to fit.

Freeing

regfree() deinitializes the pattern buffer at *preg, freeing any associated memory; *preg must have been initialized via regcomp().

RETURN VALUE

regcomp() returns zero for a successful compilation or an error code for failure.

regexec() returns zero for a successful match or REG_NOMATCH for failure.

regerror() returns the size of the buffer required to hold the string.

ERRORS

The following errors can be returned by regcomp():

REG_BADBR
Invalid use of back reference operator.

REG_BADPAT
Invalid use of pattern operators such as group or list.

REG_BADRPT
Invalid use of repetition operators such as using ‘*’ as the first character.

REG_EBRACE
Un-matched brace interval operators.

REG_EBRACK
Un-matched bracket list operators.

REG_ECOLLATE
Invalid collating element.

REG_ECTYPE
Unknown character class name.

REG_EEND
Nonspecific error. This is not defined by POSIX.

REG_EESCAPE
Trailing backslash.

REG_EPAREN
Un-matched parenthesis group operators.

REG_ERANGE
Invalid use of the range operator; for example, the ending point of the range occurs prior to the starting point.

REG_ESIZE
Compiled regular expression requires a pattern buffer larger than 64 kB. This is not defined by POSIX.

REG_ESPACE
The regex routines ran out of memory.

REG_ESUBREG
Invalid back reference to a subexpression.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

regcomp(), regexec()

Thread safetyMT-Safe locale

regerror()

Thread safetyMT-Safe env

regfree()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

Prior to POSIX.1-2008, regoff_t was required to be capable of storing the largest value that can be stored in either an off_t type or a ssize_t type.

CAVEATS

re_nsub is only required to be initialized if REG_NOSUB wasn’t specified, but all known implementations initialize it regardless.

Both regex_t and regmatch_t may (and do) have more members, in any order. Always reference them by name.

EXAMPLES

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <regex.h>
#define ARRAY_SIZE(arr) (sizeof((arr)) / sizeof((arr)[0]))
static const char *const str =
        "1) John Driverhacker;
  1. John Doe;
  2. John Foo; “; static const char *const re = “John.*o”; int main(void) { static const char *s = str; regex_t regex; regmatch_t pmatch[1]; regoff_t off, len; if (regcomp(&regex, re, REG_NEWLINE)) exit(EXIT_FAILURE); printf(“String = "%s" “, str); printf(“Matches: “); for (unsigned int i = 0; ; i++) { if (regexec(&regex, s, ARRAY_SIZE(pmatch), pmatch, 0)) break; off = pmatch[0].rm_so + (s - str); len = pmatch[0].rm_eo - pmatch[0].rm_so; printf(”#%zu: “, i); printf(“offset = %jd; length = %jd “, (intmax_t) off, (intmax_t) len); printf(“substring = "%.*s" “, len, s + pmatch[0].rm_so); s += pmatch[0].rm_eo; } exit(EXIT_SUCCESS); }

SEE ALSO

grep(1), regex(7)

The glibc manual section, Regular Expressions

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2782 - Linux cli command MAX

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command MAX and provides detailed information about the command MAX, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the MAX.

NAME 🖥️ MAX 🖥️

maximum or minimum of two values

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/param.h>
MAX(a, b);
MIN(a, b);

DESCRIPTION

These macros return the maximum or minimum of a and b.

RETURN VALUE

These macros return the value of one of their arguments, possibly converted to a different type (see BUGS).

ERRORS

These macros may raise the “invalid” floating-point exception when any of the arguments is NaN.

STANDARDS

GNU, BSD.

NOTES

If either of the arguments is of a floating-point type, you might prefer to use fmax(3) or fmin(3), which can handle NaN.

The arguments may be evaluated more than once, or not at all.

Some UNIX systems might provide these macros in a different header, or not at all.

BUGS

Due to the usual arithmetic conversions, the result of these macros may be very different from either of the arguments. To avoid this, ensure that both arguments have the same type.

EXAMPLES

#include <stdio.h>
#include <stdlib.h>
#include <sys/param.h>
int
main(int argc, char *argv[])
{
    int a, b, x;
    if (argc != 3) {
        fprintf(stderr, "Usage: %s <num> <num>

“, argv[0]); exit(EXIT_FAILURE); } a = atoi(argv[1]); b = atoi(argv[2]); x = MAX(a, b); printf(“MAX(%d, %d) is %d “, a, b, x); exit(EXIT_SUCCESS); }

SEE ALSO

fmax(3), fmin(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2783 - Linux cli command Moose_Meta_Role_Application_ToClasspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Role_Application_ToClasspm and provides detailed information about the command Moose_Meta_Role_Application_ToClasspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Role_Application_ToClasspm.

NAME 🖥️ Moose_Meta_Role_Application_ToClasspm 🖥️

Compose a role into a class

VERSION

version 2.2207

DESCRIPTION

METHODS

new

meta

apply

check_role_exclusions

check_required_methods

check_required_attributes

apply_attributes

apply_methods

apply_method_modifiers

apply_override_method_modifiers

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2784 - Linux cli command pthread_attr_setschedparam

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_attr_setschedparam and provides detailed information about the command pthread_attr_setschedparam, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_attr_setschedparam.

NAME 🖥️ pthread_attr_setschedparam 🖥️

set/get scheduling parameter attributes in thread attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_attr_setschedparam(pthread_attr_t *restrict attr,
 const struct sched_param *restrict param);
int pthread_attr_getschedparam(const pthread_attr_t *restrict attr,
 struct sched_param *restrict param);

DESCRIPTION

The pthread_attr_setschedparam() function sets the scheduling parameter attributes of the thread attributes object referred to by attr to the values specified in the buffer pointed to by param. These attributes determine the scheduling parameters of a thread created using the thread attributes object attr.

The pthread_attr_getschedparam() returns the scheduling parameter attributes of the thread attributes object attr in the buffer pointed to by param.

Scheduling parameters are maintained in the following structure:

struct sched_param {
    int sched_priority;     /* Scheduling priority */
};

As can be seen, only one scheduling parameter is supported. For details of the permitted ranges for scheduling priorities in each scheduling policy, see sched(7).

In order for the parameter setting made by pthread_attr_setschedparam() to have effect when calling pthread_create(3), the caller must use pthread_attr_setinheritsched(3) to set the inherit-scheduler attribute of the attributes object attr to PTHREAD_EXPLICIT_SCHED.

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

pthread_attr_setschedparam() can fail with the following error:

EINVAL
The priority specified in param does not make sense for the current scheduling policy of attr.

POSIX.1 also documents an ENOTSUP error for pthread_attr_setschedparam(). This value is never returned on Linux (but portable and future-proof applications should nevertheless handle this error return value).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_attr_setschedparam(), pthread_attr_getschedparam()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001. glibc 2.0.

NOTES

See pthread_attr_setschedpolicy(3) for a list of the thread scheduling policies supported on Linux.

EXAMPLES

See pthread_setschedparam(3).

SEE ALSO

sched_get_priority_min(2), pthread_attr_init(3), pthread_attr_setinheritsched(3), pthread_attr_setschedpolicy(3), pthread_create(3), pthread_setschedparam(3), pthread_setschedprio(3), pthreads(7), sched(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2785 - Linux cli command XML_DOM_Textpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_DOM_Textpm and provides detailed information about the command XML_DOM_Textpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_DOM_Textpm.

NAME 🖥️ XML_DOM_Textpm 🖥️

A piece of XML text in XML::DOM

DESCRIPTION

XML::DOM::Text extends XML::DOM::CharacterData, which extends XML::DOM::Node.

The Text interface represents the textual content (termed character data in XML) of an Element or Attr. If there is no markup inside an element’s content, the text is contained in a single object implementing the Text interface that is the only child of the element. If there is markup, it is parsed into a list of elements and Text nodes that form the list of children of the element.

When a document is first made available via the DOM, there is only one Text node for each block of text. Users may create adjacent Text nodes that represent the contents of a given element without any intervening markup, but should be aware that there is no way to represent the separations between these nodes in XML or HTML, so they will not (in general) persist between DOM editing sessions. The normalize() method on Element merges any such adjacent Text objects into a single node for each block of text; this is recommended before employing operations that depend on a particular document structure, such as navigation with XPointers.

METHODS

splitText (offset)
Breaks this Text node into two Text nodes at the specified offset, keeping both in the tree as siblings. This node then only contains all the content up to the offset point. And a new Text node, which is inserted as the next sibling of this node, contains all the content at and after the offset point. Parameters: offset The offset at which to split, starting from 0. Return Value: The new Text node. DOMExceptions:

  • INDEX_SIZE_ERR Raised if the specified offset is negative or greater than the number of characters in data.

  • NO_MODIFICATION_ALLOWED_ERR Raised if this node is readonly.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2786 - Linux cli command XML_Parserpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_Parserpm and provides detailed information about the command XML_Parserpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_Parserpm.

NAME 🖥️ XML_Parserpm 🖥️

A perl module for parsing XML documents

SYNOPSIS

use XML::Parser; $p1 = XML::Parser->new(Style => Debug); $p1->parsefile(REC-xml-19980210.xml); $p1->parse(<foo id=“me”>Hello World</foo>); # Alternative $p2 = XML::Parser->new(Handlers => {Start => \handle_start, End => \handle_end, Char => \handle_char}); $p2->parse($socket); # Another alternative $p3 = XML::Parser->new(ErrorContext => 2); $p3->setHandlers(Char => \text, Default => \other); open(my $fh, xmlgenerator |); $p3->parse($fh, ProtocolEncoding => ISO-8859-1); close($fh); $p3->parsefile(junk.xml, ErrorContext => 3);

DESCRIPTION

This module provides ways to parse XML documents. It is built on top of XML::Parser::Expat, which is a lower level interface to James Clark’s expat library. Each call to one of the parsing methods creates a new instance of XML::Parser::Expat which is then used to parse the document. Expat options may be provided when the XML::Parser object is created. These options are then passed on to the Expat object on each parse call. They can also be given as extra arguments to the parse methods, in which case they override options given at XML::Parser creation time.

The behavior of the parser is controlled either by "STYLES" and/or "HANDLERS" options, or by “setHandlers” method. These all provide mechanisms for XML::Parser to set the handlers needed by XML::Parser::Expat. If neither Style nor Handlers are specified, then parsing just checks the document for being well-formed.

When underlying handlers get called, they receive as their first parameter the Expat object, not the Parser object.

METHODS

new
This is a class method, the constructor for XML::Parser. Options are passed as keyword value pairs. Recognized options are:

  • Style This option provides an easy way to create a given style of parser. The built in styles are: “Debug”, “Subs”, “Tree”, “Objects”, and “Stream”. These are all defined in separate packages under XML::Parser::Style::*, and you can find further documentation for each style both below, and in those packages. Custom styles can be provided by giving a full package name containing at least one ‘::’. This package should then have subs defined for each handler it wishes to have installed. See “STYLES” below for a discussion of each built in style.

  • Handlers When provided, this option should be an anonymous hash containing as keys the type of handler and as values a sub reference to handle that type of event. All the handlers get passed as their 1st parameter the instance of expat that is parsing the document. Further details on handlers can be found in “HANDLERS”. Any handler set here overrides the corresponding handler set with the Style option.

  • Pkg Some styles will refer to subs defined in this package. If not provided, it defaults to the package which called the constructor.

  • ErrorContext This is an Expat option. When this option is defined, errors are reported in context. The value should be the number of lines to show on either side of the line in which the error occurred.

  • ProtocolEncoding This is an Expat option. This sets the protocol encoding name. It defaults to none. The built-in encodings are: UTF-8, ISO-8859-1, UTF-16, and US-ASCII. Other encodings may be used if they have encoding maps in one of the directories in the @Encoding_Path list. Check “ENCODINGS” for more information on encoding maps. Setting the protocol encoding overrides any encoding in the XML declaration.

  • Namespaces This is an Expat option. If this is set to a true value, then namespace processing is done during the parse. See “Namespaces” in XML::Parser::Expat for further discussion of namespace processing.

  • NoExpand This is an Expat option. Normally, the parser will try to expand references to entities defined in the internal subset. If this option is set to a true value, and a default handler is also set, then the default handler will be called when an entity reference is seen in text. This has no effect if a default handler has not been registered, and it has no effect on the expansion of entity references inside attribute values.

  • Stream_Delimiter This is an Expat option. It takes a string value. When this string is found alone on a line while parsing from a stream, then the parse is ended as if it saw an end of file. The intended use is with a stream of xml documents in a MIME multipart format. The string should not contain a trailing newline.

  • ParseParamEnt This is an Expat option. Unless standalone is set to “yes” in the XML declaration, setting this to a true value allows the external DTD to be read, and parameter entities to be parsed and expanded.

  • NoLWP This option has no effect if the ExternEnt or ExternEntFin handlers are directly set. Otherwise, if true, it forces the use of a file based external entity handler.

  • Non_Expat_Options If provided, this should be an anonymous hash whose keys are options that shouldn’t be passed to Expat. This should only be of concern to those subclassing XML::Parser.

setHandlers(TYPE, HANDLER [, TYPE, HANDLER […]])
This method registers handlers for various parser events. It overrides any previous handlers registered through the Style or Handler options or through earlier calls to setHandlers. By providing a false or undefined value as the handler, the existing handler can be unset. This method returns a list of type, handler pairs corresponding to the input. The handlers returned are the ones that were in effect prior to the call. See a description of the handler types in “HANDLERS”.

parse(SOURCE [, OPT => OPT_VALUE […]])
The SOURCE parameter should either be a string containing the whole XML document, or it should be an open IO::Handle. Constructor options to XML::Parser::Expat given as keyword-value pairs may follow the SOURCE parameter. These override, for this call, any options or attributes passed through from the XML::Parser instance. A die call is thrown if a parse error occurs. Otherwise it will return 1 or whatever is returned from the Final handler, if one is installed. In other words, what parse may return depends on the style.

parsestring
This is just an alias for parse for backwards compatibility.

parsefile(FILE [, OPT => OPT_VALUE […]])
Open FILE for reading, then call parse with the open handle. The file is closed no matter how parse returns. Returns what parse returns.

parse_start([ OPT => OPT_VALUE […]])
Create and return a new instance of XML::Parser::ExpatNB. Constructor options may be provided. If an init handler has been provided, it is called before returning the ExpatNB object. Documents are parsed by making incremental calls to the parse_more method of this object, which takes a string. A single call to the parse_done method of this object, which takes no arguments, indicates that the document is finished. If there is a final handler installed, it is executed by the parse_done method before returning and the parse_done method returns whatever is returned by the final handler.

HANDLERS

Expat is an event based parser. As the parser recognizes parts of the document (say the start or end tag for an XML element), then any handlers registered for that type of an event are called with suitable parameters. All handlers receive an instance of XML::Parser::Expat as their first argument. See “METHODS” in XML::Parser::Expat for a discussion of the methods that can be called on this object.

Init (Expat)

This is called just before the parsing of the document starts.

Final (Expat)

This is called just after parsing has finished, but only if no errors occurred during the parse. Parse returns what this returns.

Start (Expat, Element [, Attr, Val [,…]])

This event is generated when an XML start tag is recognized. Element is the name of the XML element type that is opened with the start tag. The Attr & Val pairs are generated for each attribute in the start tag.

End (Expat, Element)

This event is generated when an XML end tag is recognized. Note that an XML empty tag (<foo/>) generates both a start and an end event.

Char (Expat, String)

This event is generated when non-markup is recognized. The non-markup sequence of characters is in String. A single non-markup sequence of characters may generate multiple calls to this handler. Whatever the encoding of the string in the original document, this is given to the handler in UTF-8.

Proc (Expat, Target, Data)

This event is generated when a processing instruction is recognized.

Comment (Expat, Data)

This event is generated when a comment is recognized.

CdataStart (Expat)

This is called at the start of a CDATA section.

CdataEnd (Expat)

This is called at the end of a CDATA section.

Default (Expat, String)

This is called for any characters that don’t have a registered handler. This includes both characters that are part of markup for which no events are generated (markup declarations) and characters that could generate events, but for which no handler has been registered.

Whatever the encoding in the original document, the string is returned to the handler in UTF-8.

Unparsed (Expat, Entity, Base, Sysid, Pubid, Notation)

This is called for a declaration of an unparsed entity. Entity is the name of the entity. Base is the base to be used for resolving a relative URI. Sysid is the system id. Pubid is the public id. Notation is the notation name. Base and Pubid may be undefined.

Notation (Expat, Notation, Base, Sysid, Pubid)

This is called for a declaration of notation. Notation is the notation name. Base is the base to be used for resolving a relative URI. Sysid is the system id. Pubid is the public id. Base, Sysid, and Pubid may all be undefined.

ExternEnt (Expat, Base, Sysid, Pubid)

This is called when an external entity is referenced. Base is the base to be used for resolving a relative URI. Sysid is the system id. Pubid is the public id. Base, and Pubid may be undefined.

This handler should either return a string, which represents the contents of the external entity, or return an open filehandle that can be read to obtain the contents of the external entity, or return undef, which indicates the external entity couldn’t be found and will generate a parse error.

If an open filehandle is returned, it must be returned as either a glob (*FOO) or as a reference to a glob (e.g. an instance of IO::Handle).

A default handler is installed for this event. The default handler is XML::Parser::lwp_ext_ent_handler unless the NoLWP option was provided with a true value, otherwise XML::Parser::file_ext_ent_handler is the default handler for external entities. Even without the NoLWP option, if the URI or LWP modules are missing, the file based handler ends up being used after giving a warning on the first external entity reference.

The LWP external entity handler will use proxies defined in the environment (http_proxy, ftp_proxy, etc.).

Please note that the LWP external entity handler reads the entire entity into a string and returns it, where as the file handler opens a filehandle.

Also note that the file external entity handler will likely choke on absolute URIs or file names that don’t fit the conventions of the local operating system.

The expat base method can be used to set a basename for relative pathnames. If no basename is given, or if the basename is itself a relative name, then it is relative to the current working directory.

ExternEntFin (Expat)

This is called after parsing an external entity. It’s not called unless an ExternEnt handler is also set. There is a default handler installed that pairs with the default ExternEnt handler.

If you’re going to install your own ExternEnt handler, then you should set (or unset) this handler too.

Entity (Expat, Name, Val, Sysid, Pubid, Ndata, IsParam)

This is called when an entity is declared. For internal entities, the Val parameter will contain the value and the remaining three parameters will be undefined. For external entities, the Val parameter will be undefined, the Sysid parameter will have the system id, the Pubid parameter will have the public id if it was provided (it will be undefined otherwise), the Ndata parameter will contain the notation for unparsed entities. If this is a parameter entity declaration, then the IsParam parameter is true.

Note that this handler and the Unparsed handler above overlap. If both are set, then this handler will not be called for unparsed entities.

Element (Expat, Name, Model)

The element handler is called when an element declaration is found. Name is the element name, and Model is the content model as an XML::Parser::Content object. See “XML::Parser::ContentModel Methods” in XML::Parser::Expat for methods available for this class.

Attlist (Expat, Elname, Attname, Type, Default, Fixed)

This handler is called for each attribute in an ATTLIST declaration. So an ATTLIST declaration that has multiple attributes will generate multiple calls to this handler. The Elname parameter is the name of the element with which the attribute is being associated. The Attname parameter is the name of the attribute. Type is the attribute type, given as a string. Default is the default value, which will either be “#REQUIRED”, “#IMPLIED” or a quoted string (i.e. the returned string will begin and end with a quote character). If Fixed is true, then this is a fixed attribute.

Doctype (Expat, Name, Sysid, Pubid, Internal)

This handler is called for DOCTYPE declarations. Name is the document type name. Sysid is the system id of the document type, if it was provided, otherwise it’s undefined. Pubid is the public id of the document type, which will be undefined if no public id was given. Internal is the internal subset, given as a string. If there was no internal subset, it will be undefined. Internal will contain all whitespace, comments, processing instructions, and declarations seen in the internal subset. The declarations will be there whether or not they have been processed by another handler (except for unparsed entities processed by the Unparsed handler). However, comments and processing instructions will not appear if they’ve been processed by their respective handlers.

* DoctypeFin (Parser)

This handler is called after parsing of the DOCTYPE declaration has finished, including any internal or external DTD declarations.

XMLDecl (Expat, Version, Encoding, Standalone)

This handler is called for xml declarations. Version is a string containing the version. Encoding is either undefined or contains an encoding string. Standalone will be either true, false, or undefined if the standalone attribute is yes, no, or not made respectively.

STYLES

Debug

This just prints out the document in outline form. Nothing special is returned by parse.

Subs

Each time an element starts, a sub by that name in the package specified by the Pkg option is called with the same parameters that the Start handler gets called with.

Each time an element ends, a sub with that name appended with an underscore ("_"), is called with the same parameters that the End handler gets called with.

Nothing special is returned by parse.

Tree

Parse will return a parse tree for the document. Each node in the tree takes the form of a tag, content pair. Text nodes are represented with a pseudo-tag of “0” and the string that is their content. For elements, the content is an array reference. The first item in the array is a (possibly empty) hash reference containing attributes. The remainder of the array is a sequence of tag-content pairs representing the content of the element.

So for example the result of parsing:

<foo><head id=“a”>Hello <em>there</em></head><bar>Howdy<ref/></bar>do</foo>

would be:

Tag Content ================================================================== [foo, [{}, head, [{id => “a”}, 0, “Hello “, em, [{}, 0, “there”]], bar, [ {}, 0, “Howdy”, ref, [{}]], 0, “do” ] ]

The root document “foo”, has 3 children: a “head” element, a “bar” element and the text “do”. After the empty attribute hash, these are represented in it’s contents by 3 tag-content pairs.

Objects

This is similar to the Tree style, except that a hash object is created for each element. The corresponding object will be in the class whose name is created by appending “::” and the element name to the package set with the Pkg option. Non-markup text will be in the ::Characters class. The contents of the corresponding object will be in an anonymous array that is the value of the Kids property for that object.

Stream

This style also uses the Pkg package. If none of the subs that this style looks for is there, then the effect of parsing with this style is to print a canonical copy of the document without comments or declarations. All the subs receive as their 1st parameter the Expat instance for the document they’re parsing.

It looks for the following routines:

  • StartDocument Called at the start of the parse .

  • StartTag Called for every start tag with a second parameter of the element type. The $_ variable will contain a copy of the tag and the %_ variable will contain attribute values supplied for that element.

  • EndTag Called for every end tag with a second parameter of the element type. The $_ variable will contain a copy of the end tag.

  • Text Called just before start or end tags with accumulated non-markup text in the $_ variable.

  • PI Called for processing instructions. The $_ variable will contain a copy of the PI and the target and data are sent as 2nd and 3rd parameters respectively.

  • EndDocument Called at conclusion of the parse.

ENCODINGS

XML documents may be encoded in character sets other than Unicode as long as they may be mapped into the Unicode character set. Expat has further restrictions on encodings. Read the xmlparse.h header file in the expat distribution to see details on these restrictions.

Expat has built-in encodings for: UTF-8, ISO-8859-1, UTF-16, and US-ASCII. Encodings are set either through the XML declaration encoding attribute or through the ProtocolEncoding option to XML::Parser or XML::Parser::Expat.

For encodings other than the built-ins, expat calls the function load_encoding in the Expat package with the encoding name. This function looks for a file in the path list @XML::Parser::Expat::Encoding_Path, that matches the lower-cased name with a ‘.enc’ extension. The first one it finds, it loads.

If you wish to build your own encoding maps, check out the XML::Encoding module from CPAN.

AUTHORS

Larry Wall <[email protected]> wrote version 1.0.

Clark Cooper <[email protected]> picked up support, changed the API for this version (2.x), provided documentation, and added some standard package features.

Matt Sergeant <[email protected]> is now maintaining XML::Parser

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2787 - Linux cli command getpt

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getpt and provides detailed information about the command getpt, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getpt.

NAME 🖥️ getpt 🖥️

open a new pseudoterminal master

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <stdlib.h>
int getpt(void);

DESCRIPTION

getpt() opens a new pseudoterminal device and returns a file descriptor that refers to that device. It is equivalent to opening the pseudoterminal multiplexor device

open("/dev/ptmx", O_RDWR);

on Linux systems, though the pseudoterminal multiplexor device is located elsewhere on some systems that use the GNU C library.

RETURN VALUE

getpt() returns an open file descriptor upon successful completion. Otherwise, it returns -1 and sets errno to indicate the error.

ERRORS

getpt() can fail with various errors described in open(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getpt()

Thread safetyMT-Safe

VERSIONS

Use posix_openpt(3) instead.

STANDARDS

GNU.

HISTORY

glibc 2.1.

SEE ALSO

grantpt(3), posix_openpt(3), ptsname(3), unlockpt(3), ptmx(4), pty(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2788 - Linux cli command memrchr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command memrchr and provides detailed information about the command memrchr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the memrchr.

NAME 🖥️ memrchr 🖥️

scan memory for a character

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <string.h>
void *memchr(const void s[.n], int c, size_t n);
void *memrchr(const void s[.n], int c, size_t n);
[[deprecated]] void *rawmemchr(const void *s, int c);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

memrchr(), rawmemchr():

    _GNU_SOURCE

DESCRIPTION

The memchr() function scans the initial n bytes of the memory area pointed to by s for the first instance of c. Both c and the bytes of the memory area pointed to by s are interpreted as unsigned char.

The memrchr() function is like the memchr() function, except that it searches backward from the end of the n bytes pointed to by s instead of forward from the beginning.

The rawmemchr() function is similar to memchr(), but it assumes (i.e., the programmer knows for certain) that an instance of c lies somewhere in the memory area starting at the location pointed to by s. If an instance of c is not found, the behavior is undefined. Use either strlen(3) or memchr(3) instead.

RETURN VALUE

The memchr() and memrchr() functions return a pointer to the matching byte or NULL if the character does not occur in the given memory area.

The rawmemchr() function returns a pointer to the matching byte.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

memchr(), memrchr(), rawmemchr()

Thread safetyMT-Safe

STANDARDS

memchr()
C11, POSIX.1-2008.

memrchr()
rawmemchr()
GNU.

HISTORY

memchr()
POSIX.1-2001, C89, SVr4, 4.3BSD.

memrchr()
glibc 2.2.

rawmemchr()
glibc 2.1.

SEE ALSO

bstring(3), ffs(3), memmem(3), strchr(3), strpbrk(3), strrchr(3), strsep(3), strspn(3), strstr(3), wmemchr(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2789 - Linux cli command XShapeInputSelected

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XShapeInputSelected and provides detailed information about the command XShapeInputSelected, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XShapeInputSelected.

NAME 🖥️ XShapeInputSelected 🖥️

X nonrectangular shape functions

SYNTAX

#include <X11/extensions/shape.h>
Bool XShapeQueryExtension (
	Display *dpy,
	int *event_basep,
	int *error_basep);
Status XShapeQueryVersion (
	Display *dpy,
	int *major_versionp,
	int *minor_versionp);
void XShapeCombineRegion (
	Display *dpy,
	Window dest,
	int destKind,
	int xOff,
	int yOff,
	struct _XRegion *r,
	int op);
void XShapeCombineRectangles (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	XRectangle *rects,
	int n_rects,
	int op,
	int ordering);
void XShapeCombineMask (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	Pixmap src,
	int op);
void XShapeCombineShape (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff,
	Pixmap src,
	int srcKind,
	int op);
void XShapeOffsetShape (
	Display *dpy,
	XID dest,
	int destKind,
	int xOff,
	int yOff);
Status XShapeQueryExtents (
	Display *dpy,
	Window window,
	int *bShaped,
	int *xbs,
	int *ybs,
	unsigned int *wbs,
	unsigned int *hbs,
	int *cShaped,
	int *xcs,
	int *ycs,
	unsigned int *wcs,
	unsigned int *hcs);
void XShapeSelectInput (
	Display *dpy,
	Window window,
	unsigned longmask);
unsigned long XShapeInputSelected (
	Display *dpy,
	Window window);
XRectangle *XShapeGetRectangles (
	Display *dpy,
	Window window,
	int kind,
	int *count,
	int *ordering);

STRUCTURES

typedef struct {
    int type;	/* of event */
    unsigned long serial;	/* # of last request processed by server */
    Bool send_event;	/* true if this came from a SendEvent request */
    Display *display;	/* Display the event was read from */
    Window window;	/* window of event */
    int kind;	/* ShapeBounding or ShapeClip */
    int x, y;	/* extents of new region */
    unsigned width, height;
    Time time;	/* server timestamp when region changed */
    Bool shaped;	/* true if the region exists */
} XShapeEvent;

DESCRIPTION

The X11 Nonrectangular Window Shape Extension adds nonrectangular windows to the X Window System.

PREDEFINED VALUES

Operations:

 ShapeSet   ShapeUnion   ShapeIntersect   ShapeSubtract   ShapeInvert 

Shape Kinds:

 ShapeBounding   ShapeClip 

Event defines:

 ShapeNotifyMask   ShapeNotify 

BUGS

This manual page needs a lot more work.

SEE ALSO

X11 Nonrectangular Window Shape Extension

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2790 - Linux cli command Moose_Cookbook_Legacy_Debugging_BaseClassReplacementpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Legacy_Debugging_BaseClassReplacementpm and provides detailed information about the command Moose_Cookbook_Legacy_Debugging_BaseClassReplacementpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Legacy_Debugging_BaseClassReplacementpm.

NAME 🖥️ Moose_Cookbook_Legacy_Debugging_BaseClassReplacementpm 🖥️

Providing an alternate base object class

VERSION

version 2.2207

SYNOPSIS

package MyApp::Base; use Moose; extends Moose::Object; before new => sub { warn “Making a new " . $_[0] }; no Moose; package MyApp::UseMyBase; use Moose (); use Moose::Exporter; Moose::Exporter->setup_import_methods( also => Moose ); sub init_meta { shift; return Moose->init_meta( @_, base_class => MyApp::Base ); }

DESCRIPTION

WARNING: Replacing the base class entirely, as opposed to applying roles to the base class, is strongly discouraged. This recipe is provided solely for reference when encountering older code that does this.

A common extension is to provide an alternate base class. One way to do that is to make a MyApp::Base and add extends MyApp::Base to every class in your application. That’s pretty tedious. Instead, you can create a Moose-alike module that sets the base object class to MyApp::Base for you.

Then, instead of writing use Moose you can write use MyApp::UseMyBase.

In this particular example, our base class issues some debugging output every time a new object is created, but you can think of some more interesting things to do with your own base class.

This uses the magic of Moose::Exporter. When we call Moose::Exporter->setup_import_methods( also => Moose ) it builds import and unimport methods for you. The also => Moose bit says that we want to export everything that Moose does.

The import method that gets created will call our init_meta method, passing it for_caller => $caller as its arguments. The $caller is set to the class that actually imported us in the first place.

See the Moose::Exporter docs for more details on its API.

USING MyApp::UseMyBase

To actually use our new base class, we simply use MyApp::UseMyBase instead of Moose. We get all the Moose sugar plus our new base class.

package Foo; use MyApp::UseMyBase; has size => ( is => rw ); no MyApp::UseMyBase;

CONCLUSION

This is an awful lot of magic for a simple base class. You will often want to combine a metaclass trait with a base class extension, and that’s when this technique is useful.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2791 - Linux cli command pcap_setdirectionpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_setdirectionpcap and provides detailed information about the command pcap_setdirectionpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_setdirectionpcap.

NAME 🖥️ pcap_setdirectionpcap 🖥️

set the direction for which packets will be captured

SYNOPSIS

#include <pcap/pcap.h>
int pcap_setdirection(pcap_t *p, pcap_direction_t d);

DESCRIPTION

pcap_setdirection() is used to specify a direction that packets will be captured. d is one of the constants PCAP_D_IN, PCAP_D_OUT or PCAP_D_INOUT. PCAP_D_IN will only capture packets received by the device, PCAP_D_OUT will only capture packets sent by the device and PCAP_D_INOUT will capture packets received by or sent by the device. PCAP_D_INOUT is the default setting if this function is not called.

pcap_setdirection() isn’t necessarily fully supported on all platforms; some platforms might return an error for all values, and some other platforms might not support PCAP_D_OUT.

This operation is not supported if a ``savefile’’ is being read.

RETURN VALUE

pcap_setdirection() returns 0 on success, PCAP_ERROR_NOT_ACTIVATED if called on a capture handle that has been created but not activated, or PCAP_ERROR on other errors. If PCAP_ERROR is returned, pcap_geterr(3PCAP) or pcap_perror(3PCAP) may be called with p as an argument to fetch or display the error text.

SEE ALSO

pcap(3PCAP)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2792 - Linux cli command xdr_inline

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command xdr_inline and provides detailed information about the command xdr_inline, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the xdr_inline.

NAME 🖥️ xdr_inline 🖥️

library routines for external data representation

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS AND DESCRIPTION

These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using these routines.

The prototypes below are declared in <rpc/xdr.h> and make use of the following types:

typedef int bool_t; typedef bool_t (*xdrproc_t)(XDR *, void *,…);

For the declaration of the XDR type, see <rpc/xdr.h>.

bool_t xdr_array(XDR *xdrs, char **arrp, unsigned int *sizep,
 unsigned int maxsize, unsigned int elsize,
 xdrproc_t elproc);

A filter primitive that translates between variable-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while sizep is the address of the element count of the array; this element count cannot exceed maxsize. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bool(XDR *xdrs, bool_t *bp);

A filter primitive that translates between booleans (C integers) and their external representations. When encoding data, this filter produces values of either one or zero. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_bytes(XDR *xdrs, char **sp, unsigned int *sizep,
 unsigned int maxsize);

A filter primitive that translates between counted byte strings and their external representations. The argument sp is the address of the string pointer. The length of the string is located at address sizep; strings cannot be longer than maxsize. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_char(XDR *xdrs, char *cp);

A filter primitive that translates between C characters and their external representations. This routine returns one if it succeeds, zero otherwise. Note: encoded characters are not packed, and occupy 4 bytes each. For arrays of characters, it is worthwhile to consider xdr_bytes(), xdr_opaque(), or xdr_string().

void xdr_destroy(XDR *xdrs);

A macro that invokes the destroy routine associated with the XDR stream, xdrs. Destruction usually involves freeing private data structures associated with the stream. Using xdrs after invoking xdr_destroy() is undefined.

bool_t xdr_double(XDR *xdrs, double *dp);

A filter primitive that translates between C double precision numbers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_enum(XDR *xdrs, enum_t *ep);

A filter primitive that translates between C enums (actually integers) and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_float(XDR *xdrs, float *fp);

A filter primitive that translates between C floats and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdr_free(xdrproc_t proc, char *objp);

Generic freeing routine. The first argument is the XDR routine for the object being freed. The second argument is a pointer to the object itself. Note: the pointer passed to this routine is not freed, but what it points to is freed (recursively).

unsigned int xdr_getpos(XDR *xdrs);

A macro that invokes the get-position routine associated with the XDR stream, xdrs. The routine returns an unsigned integer, which indicates the position of the XDR byte stream. A desirable feature of XDR streams is that simple arithmetic works with this number, although the XDR stream instances need not guarantee this.

long *xdr_inline(XDR *xdrs, int len);

A macro that invokes the inline routine associated with the XDR stream, xdrs. The routine returns a pointer to a contiguous piece of the stream’s buffer; len is the byte length of the desired buffer. Note: pointer is cast to long *.

Warning: xdr_inline() may return NULL (0) if it cannot allocate a contiguous piece of a buffer. Therefore the behavior may vary among stream instances; it exists for the sake of efficiency.

bool_t xdr_int(XDR *xdrs, int *ip);

A filter primitive that translates between C integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_long(XDR *xdrs, long *lp);

A filter primitive that translates between C long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrmem_create(XDR *xdrs, char *addr, unsigned int size,
 enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to, or read from, a chunk of memory at location addr whose length is no more than size bytes long. The op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

bool_t xdr_opaque(XDR *xdrs, char *cp, unsigned int cnt);

A filter primitive that translates between fixed size opaque data and its external representation. The argument cp is the address of the opaque object, and cnt is its size in bytes. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_pointer(XDR *xdrs, char **objpp,
 unsigned int objsize, xdrproc_t xdrobj);

Like xdr_reference() except that it serializes null pointers, whereas xdr_reference() does not. Thus, xdr_pointer() can represent recursive data structures, such as binary trees or linked lists.

void xdrrec_create(XDR *xdrs, unsigned int sendsize,
 unsigned int recvsize, char *handle,
 int (*readit)(char *, char *, int),
 int (*writeit)(char *, char *, int));

This routine initializes the XDR stream object pointed to by xdrs. The stream’s data is written to a buffer of size sendsize; a value of zero indicates the system should use a suitable default. The stream’s data is read from a buffer of size recvsize; it too can be set to a suitable default by passing a zero value. When a stream’s output buffer is full, writeit is called. Similarly, when a stream’s input buffer is empty, readit is called. The behavior of these two routines is similar to the system calls read(2) and write(2), except that handle is passed to the former routines as the first argument. Note: the XDR stream’s op field must be set by the caller.

Warning: to read from an XDR stream created by this API, you’ll need to call xdrrec_skiprecord() first before calling any other XDR APIs. This inserts additional bytes in the stream to provide record boundary information. Also, XDR streams created with different xdr*_create APIs are not compatible for the same reason.

bool_t xdrrec_endofrecord(XDR *xdrs, int sendnow);

This routine can be invoked only on streams created by xdrrec_create(). The data in the output buffer is marked as a completed record, and the output buffer is optionally written out if sendnow is nonzero. This routine returns one if it succeeds, zero otherwise.

bool_t xdrrec_eof(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). After consuming the rest of the current record in the stream, this routine returns one if the stream has no more input, zero otherwise.

bool_t xdrrec_skiprecord(XDR *xdrs);

This routine can be invoked only on streams created by xdrrec_create(). It tells the XDR implementation that the rest of the current record in the stream’s input buffer should be discarded. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_reference(XDR *xdrs, char **pp, unsigned int size,
 xdrproc_t proc);

A primitive that provides pointer chasing within structures. The argument pp is the address of the pointer; size is the sizeof the structure that *pp points to; and proc is an XDR procedure that filters the structure between its C form and its external representation. This routine returns one if it succeeds, zero otherwise.

Warning: this routine does not understand null pointers. Use xdr_pointer() instead.

xdr_setpos(XDR *xdrs, unsigned int pos);

A macro that invokes the set position routine associated with the XDR stream xdrs. The argument pos is a position value obtained from xdr_getpos(). This routine returns one if the XDR stream could be repositioned, and zero otherwise.

Warning: it is difficult to reposition some types of XDR streams, so this routine may fail with one type of stream and succeed with another.

bool_t xdr_short(XDR *xdrs, short *sp);

A filter primitive that translates between C short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

void xdrstdio_create(XDR *xdrs, FILE *file, enum xdr_op op);

This routine initializes the XDR stream object pointed to by xdrs. The XDR stream data is written to, or read from, the stdio stream file. The argument op determines the direction of the XDR stream (either XDR_ENCODE, XDR_DECODE, or XDR_FREE).

Warning: the destroy routine associated with such XDR streams calls fflush(3) on the file stream, but never fclose(3).

bool_t xdr_string(XDR *xdrs, char **sp, unsigned int maxsize);

A filter primitive that translates between C strings and their corresponding external representations. Strings cannot be longer than maxsize. Note: sp is the address of the string’s pointer. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_char(XDR *xdrs, unsigned char *ucp);

A filter primitive that translates between unsigned C characters and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_int(XDR *xdrs, unsigned int *up);

A filter primitive that translates between C unsigned integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_long(XDR *xdrs, unsigned long *ulp);

A filter primitive that translates between C unsigned long integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_u_short(XDR *xdrs, unsigned short *usp);

A filter primitive that translates between C unsigned short integers and their external representations. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_union(XDR *xdrs, enum_t *dscmp, char *unp,
 const struct xdr_discrim *choices,
 xdrproc_t defaultarm); /* may equal NULL */

A filter primitive that translates between a discriminated C union and its corresponding external representation. It first translates the discriminant of the union located at dscmp. This discriminant is always an enum_t. Next the union located at unp is translated. The argument choices is a pointer to an array of xdr_discrim() structures. Each structure contains an ordered pair of [value,proc]. If the union’s discriminant is equal to the associated value, then the proc is called to translate the union. The end of the xdr_discrim() structure array is denoted by a routine of value NULL. If the discriminant is not found in the choices array, then the defaultarm procedure is called (if it is not NULL). Returns one if it succeeds, zero otherwise.

bool_t xdr_vector(XDR *xdrs, char *arrp, unsigned int size,
 unsigned int elsize, xdrproc_t elproc);

A filter primitive that translates between fixed-length arrays and their corresponding external representations. The argument arrp is the address of the pointer to the array, while size is the element count of the array. The argument elsize is the sizeof each of the array’s elements, and elproc is an XDR filter that translates between the array elements’ C form, and their external representation. This routine returns one if it succeeds, zero otherwise.

bool_t xdr_void(void);

This routine always returns one. It may be passed to RPC routines that require a function argument, where nothing is to be done.

bool_t xdr_wrapstring(XDR *xdrs, char **sp);

A primitive that calls xdr_string(xdrs, sp,MAXUN.UNSIGNED ); where MAXUN.UNSIGNED is the maximum value of an unsigned integer. xdr_wrapstring() is handy because the RPC package passes a maximum of two XDR routines as arguments, and xdr_string(), one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

xdr_array(), xdr_bool(), xdr_bytes(), xdr_char(), xdr_destroy(), xdr_double(), xdr_enum(), xdr_float(), xdr_free(), xdr_getpos(), xdr_inline(), xdr_int(), xdr_long(), xdrmem_create(), xdr_opaque(), xdr_pointer(), xdrrec_create(), xdrrec_eof(), xdrrec_endofrecord(), xdrrec_skiprecord(), xdr_reference(), xdr_setpos(), xdr_short(), xdrstdio_create(), xdr_string(), xdr_u_char(), xdr_u_int(), xdr_u_long(), xdr_u_short(), xdr_union(), xdr_vector(), xdr_void(), xdr_wrapstring()

Thread safetyMT-Safe

SEE ALSO

rpc(3)

The following manuals:

eXternal Data Representation Standard: Protocol Specification
eXternal Data Representation: Sun Technical Notes
XDR: External Data Representation Standard, RFC 1014, Sun Microsystems, Inc., USC-ISI.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2793 - Linux cli command printf_va_arg_functiontype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command printf_va_arg_functiontype and provides detailed information about the command printf_va_arg_functiontype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the printf_va_arg_functiontype.

NAME 🖥️ printf_va_arg_functiontype 🖥️

define custom behavior for printf-like functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <printf.h>
int register_printf_specifier(int spec, printf_function func,
 printf_arginfo_size_function arginfo);
int register_printf_modifier(const wchar_t *str);
int register_printf_type(printf_va_arg_function fct);

Callbacks

typedef int printf_function(FILE *stream, const struct printf_info *info,
 const void *const args[]);
typedef int printf_arginfo_size_function(const struct printf_info *info,
 size_t n, int argtypes[n], int size[n]);
typedef void printf_va_arg_function(void *mem, va_list *ap);

Types

struct printf_info {
 int prec; // Precision
 int width; // Width
 wchar_t spec; // Format letter
 unsigned int is_long_double:1;// L or ll flag
 unsigned int is_short:1; // h flag
 unsigned int is_long:1; // l flag
 unsigned int alt:1; // # flag
 unsigned int space:1; // Space flag
 unsigned int left:1; // - flag
 unsigned int showsign:1; // + flag
 unsigned int group:1; // ' flag
 unsigned int extra:1; // For special use
 unsigned int is_char:1; // hh flag
 unsigned int wide:1; // True for wide character streams
 unsigned int i18n:1; // I flag
 unsigned int is_binary128:1; /* Floating-point argument is
  ABI-compatible with
  IEC 60559 binary128 */
 unsigned short user; // Bits for user-installed modifiers
 wchar_t pad; // Padding character
};

Constants

#define PA_FLAG_LONG_LONG /* ... */
#define PA_FLAG_LONG_DOUBLE /* ... */
#define PA_FLAG_LONG /* ... */
#define PA_FLAG_SHORT /* ... */
#define PA_FLAG_PTR /* ... */

DESCRIPTION

These functions serve to extend and/or modify the behavior of the printf(3) family of functions.

register_printf_specifier()

This function registers a custom conversion specifier for the printf(3) family of functions.

spec
The character which will be used as a conversion specifier in the format string.

func
Callback function that will be executed by the printf(3) family of functions to format the input arguments into the output stream.

stream
Output stream where the formatted output should be printed. This stream transparently represents the output, even in the case of functions that write to a string.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in arginfo.

args
Array of pointers to the arguments to the printf(3) -like function.

arginfo
Callback function that will be executed by the printf(3) family of functions to know how many arguments should be parsed for the custom specifier and also their types.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in func.

n
Number of arguments remaining to be parsed.

argtypes
This array should be set to define the type of each of the arguments that will be parsed. Each element in the array represents one of the arguments to be parsed, in the same order that they are passed to the printf(3) -like function. Each element should be set to a base type (PA_*) from the enum above, or a custom one, and optionally ORed with an appropriate length modifier (PA_FLAG_*).

The type is determined by using one of the following constants:

PA_INT
int.

PA_CHAR
int, cast to char.

PA_WCHAR
wchar_t.

PA_STRING
const char *, a ‘�’-terminated string.

PA_WSTRING
const wchar_t *, a wide character L’�’-terminated string.

PA_POINTER
void *.

PA_FLOAT
float.

PA_DOUBLE
double.

PA_LAST
TODO.

size
For user-defined types, the size of the type (in bytes) should also be specified through this array. Otherwise, leave it unused.

arginfo is called before func, and prepares some information needed to call func.

register_printf_modifier()

TODO

register_printf_type()

TODO

RETURN VALUE

register_printf_specifier(), register_printf_modifier(), and register_printf_type() return zero on success, or -1 on error.

Callbacks

The callback of type printf_function should return the number of characters written, or -1 on error.

The callback of type printf_arginfo_size_function should return the number of arguments to be parsed by this specifier. It also passes information about the type of those arguments to the caller through argtypes. On error, it should return -1.

ERRORS

EINVAL
The specifier was not a valid character.

STANDARDS

GNU.

HISTORY

register_printf_function(3) is an older function similar to register_printf_specifier(), and is now deprecated. That function can’t handle user-defined types.

register_printf_specifier() supersedes register_printf_function(3).

EXAMPLES

The following example program registers the ‘b’ and ‘B’ specifiers to print integers in binary format, mirroring rules for other unsigned conversion specifiers like ‘x’ and ‘u’. This can be used to print in binary prior to C23.

/* This code is in the public domain */
#include <err.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <printf.h>
#define GROUP_SEP  '\''
struct Printf_Pad {
    char    ch;
    size_t  len;
};
static int b_printf(FILE *stream, const struct printf_info *info,
                    const void *const args[]);
static int b_arginf_sz(const struct printf_info *info,
                    size_t n, int argtypes[n], int size[n]);
static uintmax_t b_value(const struct printf_info *info,
                    const void *arg);
static size_t b_bin_repr(char bin[UINTMAX_WIDTH],
                    const struct printf_info *info, const void *arg);
static size_t b_bin_len(const struct printf_info *info,
                    ptrdiff_t min_len);
static size_t b_pad_len(const struct printf_info *info,
                    ptrdiff_t bin_len);
static ssize_t b_print_prefix(FILE *stream,
                    const struct printf_info *info);
static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info,
                    ptrdiff_t min_len);
static ssize_t b_print_number(FILE *stream,
                    const struct printf_info *info,
                    const char bin[UINTMAX_WIDTH],
                    size_t min_len, size_t bin_len);
static char pad_ch(const struct printf_info *info);
static ssize_t pad_spaces(FILE *stream, size_t pad_len);
int
main(void)
{
    if (register_printf_specifier('b', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('b', ...)");
    if (register_printf_specifier('B', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('B', ...)");
    printf("....----....----....----....----

“); printf("%llb; “, 0x5Ellu); printf("%lB; “, 0x5Elu); printf("%b; “, 0x5Eu); printf("%hB; “, 0x5Eu); printf("%hhb; “, 0x5Eu); printf("%jb; “, (uintmax_t)0x5E); printf("%zb; “, (size_t)0x5E); printf(”….—-….—-….—-….—- “); printf(”%#b; “, 0x5Eu); printf(”%#B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf("%10b; “, 0x5Eu); printf("%010b; “, 0x5Eu); printf(”%.10b; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%-10B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%‘B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”….—-….—-….—-….—- “); printf(”%#16.12b; “, 0xAB); printf(”%-#‘20.12b; “, 0xAB); printf(”%#‘020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#020B; “, 0xAB); printf(”%‘020B; “, 0xAB); printf("%020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#021B; “, 0xAB); printf(”%‘021B; “, 0xAB); printf("%021B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#022B; “, 0xAB); printf(”%‘022B; “, 0xAB); printf("%022B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#023B; “, 0xAB); printf(”%‘023B; “, 0xAB); printf("%023B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%-#‘19.11b; “, 0xAB); printf(”%#‘019B; “, 0xAB); printf(”%#019B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%‘019B; “, 0xAB); printf("%019B; “, 0xAB); printf(”%#016b; “, 0xAB); printf(”….—-….—-….—-….—- “); return 0; } static int b_printf(FILE *stream, const struct printf_info *info, const void const args[]) { char bin[UINTMAX_WIDTH]; size_t min_len, bin_len; ssize_t len, tmp; struct Printf_Pad pad = {0}; len = 0; min_len = b_bin_repr(bin, info, args[0]); bin_len = b_bin_len(info, min_len); pad.ch = pad_ch(info); if (pad.ch == ’ ‘) pad.len = b_pad_len(info, bin_len); / Padding with ’ ’ (right aligned) / if ((pad.ch == ’ ‘) && !info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } / “0b”/“0B” prefix / if (info->alt) { tmp = b_print_prefix(stream, info); if (tmp == EOF) return EOF; len += tmp; } / Padding with ‘0’ / if (pad.ch == ‘0’) { tmp = b_pad_zeros(stream, info, min_len); if (tmp == EOF) return EOF; len += tmp; } / Print number (including leading 0s to fill precision) / tmp = b_print_number(stream, info, bin, min_len, bin_len); if (tmp == EOF) return EOF; len += tmp; / Padding with ’ ’ (left aligned) */ if (info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } return len; } static int b_arginf_sz(const struct printf_info *info, size_t n, int argtypes[n], [[maybe_unused]] int size[n]) { if (n < 1) return -1; if (info->is_long_double) argtypes[0] = PA_INT | PA_FLAG_LONG_LONG; else if (info->is_long) argtypes[0] = PA_INT | PA_FLAG_LONG; else argtypes[0] = PA_INT; return 1; } static uintmax_t b_value(const struct printf_info *info, const void *arg) { if (info->is_long_double) return *(const unsigned long long *)arg; if (info->is_long) return *(const unsigned long )arg; / short and char are both promoted to int */ return *(const unsigned int *)arg; } static size_t b_bin_repr(char bin[UINTMAX_WIDTH], const struct printf_info *info, const void *arg) { size_t min_len; uintmax_t val; val = b_value(info, arg); bin[0] = ‘0’; for (min_len = 0; val; min_len++) { bin[min_len] = ‘0’ + (val % 2); val »= 1; } return MAX(min_len, 1); } static size_t b_bin_len(const struct printf_info *info, ptrdiff_t min_len) { return MAX(info->prec, min_len); } static size_t b_pad_len(const struct printf_info *info, ptrdiff_t bin_len) { ptrdiff_t pad_len; pad_len = info->width - bin_len; if (info->alt) pad_len -= 2; if (info->group) pad_len -= (bin_len - 1) / 4; return MAX(pad_len, 0); } static ssize_t b_print_prefix(FILE *stream, const struct printf_info *info) { ssize_t len; len = 0; if (fputc(‘0’, stream) == EOF) return EOF; len++; if (fputc(info->spec, stream) == EOF) return EOF; len++; return len; } static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info, ptrdiff_t min_len) { ssize_t len; ptrdiff_t tmp; len = 0; tmp = info->width - (info->alt * 2); if (info->group) tmp -= tmp / 5 - !(tmp % 5); for (ptrdiff_t i = tmp - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static ssize_t b_print_number(FILE *stream, const struct printf_info info, const char bin[UINTMAX_WIDTH], size_t min_len, size_t bin_len) { ssize_t len; len = 0; / Print leading zeros to fill precision / for (size_t i = bin_len - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } / Print number */ for (size_t i = min_len - 1; i < min_len; i–) { if (fputc(bin[i], stream) == EOF) return EOF; len++; if (!info->group || (i % 4) || !i) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static char pad_ch(const struct printf_info *info) { if ((info->prec != -1) || (info->pad == ’ ‘) || info->left) return ’ ‘; return ‘0’; } static ssize_t pad_spaces(FILE *stream, size_t pad_len) { ssize_t len; len = 0; for (size_t i = pad_len - 1; i < pad_len; i–) { if (fputc(’ ‘, stream) == EOF) return EOF; len++; } return len; }

SEE ALSO

asprintf(3), printf(3), wprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2794 - Linux cli command strtof

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command strtof and provides detailed information about the command strtof, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the strtof.

NAME 🖥️ strtof 🖥️

convert ASCII string to floating-point number

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
double strtod(const char *restrict nptr, char **restrict endptr);
float strtof(const char *restrict nptr, char **restrict endptr);
long double strtold(const char *restrict nptr",char**restrict"endptr);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

strtof(), strtold():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

The strtod(), strtof(), and strtold() functions convert the initial portion of the string pointed to by nptr to double, float, and long double representation, respectively.

The expected form of the (initial portion of the) string is optional leading white space as recognized by isspace(3), an optional plus (’+’) or minus sign (’-’) and then either (i) a decimal number, or (ii) a hexadecimal number, or (iii) an infinity, or (iv) a NAN (not-a-number).

A decimal number consists of a nonempty sequence of decimal digits possibly containing a radix character (decimal point, locale-dependent, usually ‘.’), optionally followed by a decimal exponent. A decimal exponent consists of an ‘E’ or ’e’, followed by an optional plus or minus sign, followed by a nonempty sequence of decimal digits, and indicates multiplication by a power of 10.

A hexadecimal number consists of a “0x” or “0X” followed by a nonempty sequence of hexadecimal digits possibly containing a radix character, optionally followed by a binary exponent. A binary exponent consists of a ‘P’ or ‘p’, followed by an optional plus or minus sign, followed by a nonempty sequence of decimal digits, and indicates multiplication by a power of 2. At least one of radix character and binary exponent must be present.

An infinity is either “INF” or “INFINITY”, disregarding case.

A NAN is “NAN” (disregarding case) optionally followed by a string, (n-char-sequence), where n-char-sequence specifies in an implementation-dependent way the type of NAN (see NOTES).

RETURN VALUE

These functions return the converted value, if any.

If endptr is not NULL, a pointer to the character after the last character used in the conversion is stored in the location referenced by endptr.

If no conversion is performed, zero is returned and (unless endptr is null) the value of nptr is stored in the location referenced by endptr.

If the correct value would cause overflow, plus or minus HUGE_VAL, HUGE_VALF, or HUGE_VALL is returned (according to the return type and sign of the value), and ERANGE is stored in errno.

If the correct value would cause underflow, a value with magnitude no larger than DBL_MIN, FLT_MIN, or LDBL_MIN is returned and ERANGE is stored in errno.

ERRORS

ERANGE
Overflow or underflow occurred.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

strtod(), strtof(), strtold()

Thread safetyMT-Safe locale

VERSIONS

In the glibc implementation, the n-char-sequence that optionally follows “NAN” is interpreted as an integer number (with an optional ‘0’ or ‘0x’ prefix to select base 8 or 16) that is to be placed in the mantissa component of the returned value.

STANDARDS

C11, POSIX.1-2008.

HISTORY

strtod()
C89, POSIX.1-2001.

strtof()
strtold()
C99, POSIX.1-2001.

NOTES

Since 0 can legitimately be returned on both success and failure, the calling program should set errno to 0 before the call, and then determine if an error occurred by checking whether errno has a nonzero value after the call.

EXAMPLES

See the example on the strtol(3) manual page; the use of the functions described in this manual page is similar.

SEE ALSO

atof(3), atoi(3), atol(3), nan(3), nanf(3), nanl(3), strfromd(3), strtol(3), strtoul(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2795 - Linux cli command timer_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command timer_ttype and provides detailed information about the command timer_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the timer_ttype.

NAME 🖥️ timer_ttype 🖥️

timer ID

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/types.h>
typedef /* ... */ timer_t;

DESCRIPTION

Used for timer ID returned by timer_create(2).

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

The following header also provides timer_t: <time.h>.

SEE ALSO

timer_create(2), timer_delete(2), timer_getoverrun(2), timer_settime(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2796 - Linux cli command Net_SSH2_KnownHostspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_SSH2_KnownHostspm and provides detailed information about the command Net_SSH2_KnownHostspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_SSH2_KnownHostspm.

NAME 🖥️ Net_SSH2_KnownHostspm 🖥️

SSH 2 knownhosts object

SYNOPSIS

##################################################################### # # # WARNING: The API provided by Net::SSH2::KnownHosts is # # experimental and could change in future versions of the module!!! # # # ##################################################################### my $kh = $ssh2->known_hosts; my $n_ent = $kh->readfile($known_hosts_path); # a non-existent known_hosts file usually is not an error… unless (defined $n_ent) { if ($ssh2->error != LIBSSH2_ERROR_FILE or -f $known_hosts_path) { die; # propagate error; } } my ($key, $type) = $ssh2->remote_hostkey; my $flags = ( LIBSSH2_KNOWNHOST_TYPE_PLAIN | LIBSSH2_KNOWNHOST_KEYENC_RAW | (($type + 1) << LIBSSH2_KNOWNHOST_KEY_SHIFT) ); my $check = $kh->check($hostname, $port, $key, $flags); if ($check == LIBSSH2_KNOWNHOST_CHECK_MATCH) { # ok! } elsif ($check == LIBSSH2_KNOWNHOST_CHECK_MISMATCH) { die “host verification failed, the key has changed!”; } elsif ($check == LIBSSH2_KNOWNHOST_CHECK_NOTFOUND) { die “host verification failed, key not found in known_hosts file” if $strict_host_key_checking; # else, save new key to file: unless ( $kh->add($hostname, , $key, “Perl added me”, $flags) and $kh->writefile($known_hosts_path) ) { warn “unable to save known_hosts file: " . ($ssh2->error)[1]; } } else { die “host key verification failed, unknown reason”; }

DESCRIPTION

##################################################################### # # # WARNING: The API provided by Net::SSH2::KnownHosts is # # experimental and could change in future versions of the module!!! # # # #####################################################################

The knownhosts object allows one to manipulate the entries in the known_host file usually located at ~/.ssh/known_hosts and which contains the public keys of the already known hosts.

The methods currently supported are as follows:

readfile (filename)

Populates the object with the entries in the given file.

It returns the number or entries read or undef on failure.

writefile (filename)

Saves the known host entries to the given file.

add (hostname, salt, key, comment, key_type|host_format|key_format)

Add a host and its associated key to the collection of known hosts.

The host_format argument specifies the format of the given host:

LIBSSH2_KNOWNHOST_TYPE_PLAIN - ascii “hostname.domain.tld” LIBSSH2_KNOWNHOST_TYPE_SHA1 - SHA1(salt, host) base64-encoded! LIBSSH2_KNOWNHOST_TYPE_CUSTOM - another hash

If SHA1 is selected as host format, the salt must be provided to the salt argument in base64 format.

The SHA-1 hash is what OpenSSH can be told to use in known_hosts files. If a custom type is used, salt is ignored and you must provide the host pre-hashed when checking for it in the check method.

The available key formats are as follow:

LIBSSH2_KNOWNHOST_KEYENC_RAW LIBSSH2_KNOWNHOST_KEYENC_BASE64

Finally, the available key types are as follow:

LIBSSH2_KNOWNHOST_KEY_RSA1 LIBSSH2_KNOWNHOST_KEY_SSHRSA LIBSSH2_KNOWNHOST_KEY_SSHDSS

The comment argument may be undef.

check (hostname, port, key, key_type|host_format|key_format)

Checks a host and its associated key against the collection of known hosts.

The key_type|host_format|key_format argument has the same meaning as in the “add” method.

undef may be passed as the port argument.

Returns:

LIBSSH2_KNOWNHOST_CHECK_MATCH (0) LIBSSH2_KNOWNHOST_CHECK_MISMATCH (1) LIBSSH2_KNOWNHOST_CHECK_NOTFOUND (2) LIBSSH2_KNOWNHOST_CHECK_FAILURE (3)

readline (string)

Read a known_hosts entry from the given string.

For instance, the following piece of code is more or less equivalent to the readfile method:

my $kh = $ssh2->known_hosts; if (open my $fh, <, $known_hosts_path) { while (<>) { eval { $kh->readline($_) } or warn “unable to parse known_hosts entry $_”; } }

writeline (hostname, port, key, key_type|host_format|key_format)

Searches the entry matching the given parameters (as described in the “check” method) and formats it into a line in the known_hosts format.

This method returns undef when some error happens.

This method should be considered experimental, the interface may change.

SEE ALSO

Net::SSH2, sshd (8).

COPYRIGHT AND LICENSE

Copyright (C) 2013-2015 Salvador Fandiño; all rights reserved.

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

The documentation on this file is based on the comments inside libssh2.h file from the libssh2 distribution which has the following copyright and license:

Copyright (c) 2004-2009, Sara Golemon <[email protected]> Copyright (c) 2009-2012 Daniel Stenberg Copyright (c) 2010 Simon Josefsson <[email protected]> All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Neither the name of the copyright holder nor the names of any other contributors may be used to endorse or promote products derived from this software without specific prior written permission.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2797 - Linux cli command Tk_MainWindowpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_MainWindowpm and provides detailed information about the command Tk_MainWindowpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_MainWindowpm.

NAME 🖥️ Tk_MainWindowpm 🖥️

Root widget of a widget tree

SYNOPSIS

use Tk; my $mw = MainWindow->new( … options … ); my $this = $mw->ThisWidget -> pack ; my $that = $mw->ThatWidget; … MainLoop;

DESCRIPTION

Perl/Tk applications (which have windows associated with them) create one or more MainWindows which act as the containers and parents of the other widgets.

Tk::MainWindow is a special kind of Toplevel widget. It is the root of a widget tree. Therefore $mw->Parent returns undef.

The default title of a MainWindow is the basename of the script (actually the Class name used for options lookup, i.e. with basename with inital caps) or ‘Ptk’ as the fallback value. If more than one MainWindow is created or several instances of the script are running at the same time the string " #n" is appended where the number n is set to get a unique value.

Unlike the standard Tcl/Tk’s wish, perl/Tk allows you to create several MainWindows. When the last MainWindow is destroyed the Tk eventloop exits (the eventloop is entered with the call of MainLoop). Various resources (bindings, fonts, images, colors) are maintained or cached for each MainWindow, so each MainWindow consumes more resources than a Toplevel. However multiple MainWindows can make sense when the user can destroy them independently.

METHODS

You can apply all methods that a Toplevel widget accepts.

The method $w->MainWindow applied to any widget will return the MainWindow to which the widget belongs (the MainWindow belongs to itself).

MISSING

Documentation is incomplete. Here are some missing items that should be explained in more detail:

  • The new mechanism for MainWindows is slightly different to other widgets.

  • There no explanation about what resources are bound to a MainWindow (e.g., ClassInit done per MainWindow)

  • Passing of command line options to override or augment arguments of the new method (see Tk::CmdLine).

SEE ALSO

Tk::Toplevel Tk::CmdLine

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2798 - Linux cli command WWW_Mechanize_Examplespm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command WWW_Mechanize_Examplespm and provides detailed information about the command WWW_Mechanize_Examplespm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the WWW_Mechanize_Examplespm.

NAME 🖥️ WWW_Mechanize_Examplespm 🖥️

Sample programs that use WWW::Mechanize

VERSION

version 2.18

SYNOPSIS

Plenty of people have learned WWW::Mechanize, and now, you can too!

Following are user-supplied samples of WWW::Mechanize in action. If you have samples you’d like to contribute, please send ’em to <[email protected]>.

You can also look at the t/*.t files in the distribution.

Please note that these examples are not intended to do any specific task. For all I know, they’re no longer functional because the sites they hit have changed. They’re here to give examples of how people have used WWW::Mechanize.

Note that the examples are in reverse order of my having received them, so the freshest examples are always at the top.

Starbucks Density Calculator, by Nat Torkington

Here’s a pair of programs from Nat Torkington, editor for O’Reilly Media and co-author of the Perl Cookbook.

Rael [Dornfest] discovered that you can easily find out how many Starbucks there are in an area by searching for “Starbucks”. So I wrote a silly scraper for some old census data and came up with some Starbucks density figures. There’s no meaning to these numbers thanks to errors from using old census data coupled with false positives in Yahoo search (e.g., “Dodie Starbuck-Your Style Desgn” in Portland OR). But it was fun to waste a night on. Here are the top twenty cities in descending order of population, with the amount of territory each Starbucks has. E.g., A New York NY Starbucks covers 1.7 square miles of ground. New York, NY 1.7 Los Angeles, CA 1.2 Chicago, IL 1.0 Houston, TX 4.6 Philadelphia, PA 6.8 San Diego, CA 2.7 Detroit, MI 19.9 Dallas, TX 2.7 Phoenix, AZ 4.1 San Antonio, TX 12.3 San Jose, CA 1.1 Baltimore, MD 3.9 Indianapolis, IN 12.1 San Francisco, CA 0.5 Jacksonville, FL 39.9 Columbus, OH 7.3 Milwaukee, WI 5.1 Memphis, TN 15.1 Washington, DC 1.4 Boston, MA 0.5

get_pop_data

#!/usr/bin/perl -w use WWW::Mechanize; use Storable; $url = http://www.census.gov/population/www/documentation/twps0027.html; $m = WWW::Mechanize->new(); $m->get($url); $c = $m->content; $c =~ m{<A NAME=.tabA.>(.*?)</TABLE>}s or die “Cant find the population table “; $t = $1; @outer = $t =~ m{<TR.*?>(.*?)</TR>}gs; shift @outer; foreach $r (@outer) { @bits = $r =~ m{<TD.*?>(.*?)</TD>}gs; for ($x = 0; $x < @bits; $x++) { $b = $bits[$x]; @v = split /\s*<BR>\s*/, $b; foreach (@v) { s/^\s+//; s/\s+$// } push @{$data[$x]}, @v; } } for ($y = 0; $y < @{$data[0]}; $y++) { $data{$data[1][$y]} = { NAME => $data[1][$y], RANK => $data[0][$y], POP => comma_free($data[2][$y]), AREA => comma_free($data[3][$y]), DENS => comma_free($data[4][$y]), }; } store(\data, “cities.dat”); sub comma_free { my $n = shift; $n =~ s/,//; return $n; }

plague_of_coffee

#!/usr/bin/perl -w use WWW::Mechanize; use strict; use Storable; $SIG{_ _WARN_ _} = sub {} ; # ssssssh my $Cities = retrieve(“cities.dat”); my $m = WWW::Mechanize->new(); $m->get(“http://local.yahoo.com/"); my @cities = sort { $Cities->{$a}{RANK} <=> $Cities->{$b}{RANK} } keys %$Cities; foreach my $c ( @cities ) { my $fields = { stx => “starbucks”, csz => $c, }; my $r = $m->submit_form(form_number => 2, fields => $fields); die “Couldnt submit form” unless $r->is_success; my $hits = number_of_hits($r); # my $ppl = sprintf("%d”, 1000 * $Cities->{$c}{POP} / $hits); # print “$c has $hits Starbucks. Thats one for every $ppl people. “; my $density = sprintf(”%.1f”, $Cities->{$c}{AREA} / $hits); print “$c : $density “; } sub number_of_hits { my $r = shift; my $c = $r->content; if ($c =~ m{\d+ out of <b>(\d+)</b> total results for}) { return $1; } if ($c =~ m{Sorry, no .*? found in or near}) { return 0; } if ($c =~ m{Your search matched multiple cities}) { warn “Your search matched multiple cities “; return 0; } if ($c =~ m{Sorry we couldn.t find that location}) { warn “No cities “; return 0; } if ($c =~ m{Could not find.*?, showing results for}) { warn “No matches “; return 0; } die “Unknown response $c “; }

pb-upload, by John Beppu

This program takes filenames of images from the command line and uploads them to a www.photobucket.com folder. John Beppu, the author, says:

I had 92 pictures I wanted to upload, and doing it through a browser would’ve been torture. But thanks to mech, all I had to do was `./pb.upload *.jpg` and watch it do its thing. It felt good. If I had more time, I’d implement WWW::Photobucket on top of WWW::Mechanize.

#!/usr/bin/perl -w -T use strict; use WWW::Mechanize; my $login = “login_name”; my $password = “password”; my $folder = “folder”; my $url = “http://img78.photobucket.com/albums/v281/$login/$folder/"; # login to your photobucket.com account my $mech = WWW::Mechanize->new(); $mech->get($url); $mech->submit_form( form_number => 1, fields => { password => $password }, ); die unless ($mech->success); # upload image files specified on command line foreach (@ARGV) { print “$_ “; $mech->form_number(2); $mech->field(the_file[] => $_); $mech->submit(); }

listmod, by Ian Langworth

Ian Langworth contributes this little gem that will bring joy to beleaguered mailing list admins. It discards spam messages through mailman’s web interface.

#!/arch/unix/bin/perl use strict; use warnings; # # listmod - fast alternative to mailman list interface # # usage: listmod crew XXXXXXXX # die “usage: $0 <listname> <password> " unless @ARGV == 2; my ($listname, $password) = @ARGV; use CGI qw(unescape); use WWW::Mechanize; my $m = WWW::Mechanize->new( autocheck => 1 ); use Term::ReadLine; my $term = Term::ReadLine->new($0); # submit the form, get the cookie, go to the list admin page $m->get(“https://lists.ccs.neu.edu/bin/admindb/$listname"); $m->set_visible( $password ); $m->click; # exit if nothing to do print “There are no pending requests. " and exit if $m->content =~ /There are no pending requests/; # select the first form and examine its contents $m->form_number(1); my $f = $m->current_form or die “Couldnt get first form! “; # get me the base form element for each email item my @items = map {m/^.+?-(.+)/} grep {m/senderbanp/} $f->param or die “Couldnt get items in first form! “; # iterate through items, prompt user, commit actions foreach my $item (@items) { # show item info my $sender = unescape($item); my ($subject) = [$f->find_input(“senderbanp-$item”)->value_names]->[1] =~ /Subject:\s+(.+?)\s+Size:/g; # prompt user my $choice = ; while ( $choice !~ /^[DAX]$/ ) { print “$sender\ $subject “; $choice = uc $term->readline(“Action: defer/accept/discard [dax]: “); print "

“; } # set button $m->field(“senderaction-$item” => {D=>0,A=>1,X=>3}->{$choice}); } # submit actions $m->click;

ccdl, by Andy Lester

Steve McConnell, author of the landmark Code Complete has put up the chapters for the 2nd edition in PDF format on his website. I needed to download them to take to Kinko’s to have printed. This little program did it for me.

#!/usr/bin/perl -w use strict; use WWW::Mechanize; my $start = “http://www.stevemcconnell.com/cc2/cc.htm"; my $mech = WWW::Mechanize->new( autocheck => 1 ); $mech->get( $start ); my @links = $mech->find_all_links( url_regex => qr/\d+.+\pdf$/ ); for my $link ( @links ) { my $url = $link->url_abs; my $filename = $url; $filename =~ s[^.+/][]; print “Fetching $url”; $mech->get( $url, :content_file => $filename ); print " “, -s $filename, " bytes “; }

quotes.pl, by Andy Lester

This was a program that was going to get a hack in Spidering Hacks, but got cut at the last minute, probably because it’s against IMDB’s TOS to scrape from it. I present it here as an example, not a suggestion that you break their TOS.

Last I checked, it didn’t work because their HTML didn’t match, but it’s still good as sample code.

#!/usr/bin/perl -w use strict; use WWW::Mechanize; use Getopt::Long; use Text::Wrap; my $match = undef; my $random = undef; GetOptions( “match=s” => \match, “random” => \random, ) or exit 1; my $movie = shift @ARGV or die “Must specify a movie “; my $quotes_page = get_quotes_page( $movie ); my @quotes = extract_quotes( $quotes_page ); if ( $match ) { $match = quotemeta($match); @quotes = grep /$match/i, @quotes; } if ( $random ) { print $quotes[rand @quotes]; } else { print join( " “, @quotes ); } sub get_quotes_page { my $movie = shift; my $mech = WWW::Mechanize->new; $mech->get( “http://www.imdb.com/search" ); $mech->success or die “Cant get the search page”; $mech->submit_form( form_number => 2, fields => { title => $movie, restrict => “Movies only”, }, ); my @links = $mech->find_all_links( url_regex => qr[^/Title] ) or die “No matches for $movie\ were found. “; # Use the first link my ( $url, $title ) = @{$links[0]}; warn “Checking $title… “; $mech->get( $url ); my $link = $mech->find_link( text_regex => qr/Memorable Quotes/i ) or die qq{"$title” has no quotes in IMDB! }; warn “Fetching quotes…

“; $mech->get( $link->[0] ); return $mech->content; } sub extract_quotes { my $page = shift; # Nibble away at the unwanted HTML at the beginnning… $page =~ s/.+Memorable Quotes//si; $page =~ s/.+?(<a name)/$1/si; # … and the end of the page $page =~ s/Browse titles in the movie quotes.+$//si; $page =~ s/<p.+$//g; # Quotes separated by an <HR> tag my @quotes = split( /<hr.+?>/, $page ); for my $quote ( @quotes ) { my @lines = split( /<br>/, $quote ); for ( @lines ) { s/<[^>]+>//g; # Strip HTML tags s/\s+/ /g; # Squash whitespace s/^ //; # Strip leading space s/ $//; # Strip trailing space s/"/"/g; # Replace HTML entity quotes # Word-wrap to fit in 72 columns $Text::Wrap::columns = 72; $_ = wrap( , , $_ ); } $quote = join( " “, @lines ); } return @quotes; }

cpansearch.pl, by Ed Silva

A quick little utility to search the CPAN and fire up a browser with a results page.

#!/usr/bin/perl # turn on perls safety features use strict; use warnings; # work out the name of the module were looking for my $module_name = $ARGV[0] or die “Must specify module name on command line”; # create a new browser use WWW::Mechanize; my $browser = WWW::Mechanize->new(); # tell it to get the main page $browser->get(“http://search.cpan.org/"); # okay, fill in the box with the name of the # module we want to look up $browser->form_number(1); $browser->field(“query”, $module_name); $browser->click(); # click on the link that matches the module name $browser->follow_link( text_regex => $module_name ); my $url = $browser->uri; # launch a browser… system(galeon, $url); exit(0);

lj_friends.cgi, by Matt Cashner

#!/usr/bin/perl # Provides an rss feed of a paid users LiveJournal friends list # Full entries, protected entries, etc. # Add to your favorite rss reader as # http://your.site.com/cgi-bin/lj_friends.cgi?user=USER&password=PASSWORD use warnings; use strict; use WWW::Mechanize; use CGI; my $cgi = CGI->new(); my $form = $cgi->Vars; my $agent = WWW::Mechanize->new(); $agent->get(http://www.livejournal.com/login.bml); $agent->form_number(3); $agent->field(user,$form->{user}); $agent->field(password,$form->{password}); $agent->submit(); $agent->get(http://www.livejournal.com/customview.cgi?user=.$form->{user}.&styleid=225596&checkcookies=1); print “Content-type: text/plain

“; print $agent->content();

Hacking Movable Type, by Dan Rinzel

use strict; use WWW::Mechanize; # a tool to automatically post entries to a moveable type weblog, and set arbitrary creation dates my $mech = WWW::Mechanize->new(); my $entry; $entry->{title} = “Test AutoEntry Title”; $entry->{btext} = “Test AutoEntry Body”; $entry->{date} = 2002-04-15 14:18:00; my $start = qq|http://my.blog.site/mt.cgi|; $mech->get($start); $mech->field(username,und3f1n3d); $mech->field(password,obscur3d); $mech->submit(); # to get login cookie $mech->get(qq|$start?_ _mode=view&_type=entry&blog_id=1|); $mech->form_name(entry_form); $mech->field(title,$entry->{title}); $mech->field(category_id,1); # adjust as needed $mech->field(text,$entry->{btext}); $mech->field(status,2); # publish, or 1 = draft $results = $mech->submit(); # if were ok with this entry being datestamped “NOW” (no {date} in %entry) # were done. Otherwise, time to be tricksy # MT returns a 302 redirect from this form. the redirect itself contains a <body onload=”"> handler # which takes the user to an editable version of the form where the create date can be edited # MT date format of YYYY-MM-DD HH:MI:SS is the only one that wont error out if ($entry->{date} && $entry->{date} =~ /^\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2}/) { # travel the redirect $results = $mech->get($results->{_headers}->{location}); $results->{_content} =~ /<body onLoad=”([^\]+)"/is; my $js = $1; $js =~ /\[^]+); $results = $mech->get($start.$1); $mech->form_name(entry_form); $mech->field(created_on_manual,$entry->{date}); $mech->submit(); }

get-despair, by Randal Schwartz

Randal submitted this bot that walks the despair.com site sucking down all the pictures.

use strict; $|++; use WWW::Mechanize; use File::Basename; my $m = WWW::Mechanize->new; $m->get(“http://www.despair.com/indem.html"); my @top_links = @{$m->links}; for my $top_link_num (0..$#top_links) { next unless $top_links[$top_link_num][0] =~ /^http:/; $m->follow_link( n=>$top_link_num ) or die “cant follow $top_link_num”; print $m->uri, " “; for my $image (grep m{^http://store4}, map $_->[0], @{$m->links}) { my $local = basename $image; print " $image…”, $m->mirror($image, $local)->message, " " } $m->back or die “cant go back”; }

AUTHOR

Andy Lester <andy at petdance.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2004 by Andy Lester.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2799 - Linux cli command Text_Globpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Text_Globpm and provides detailed information about the command Text_Globpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Text_Globpm.

NAME 🖥️ Text_Globpm 🖥️

match globbing patterns against text

SYNOPSIS

use Text::Glob qw( match_glob glob_to_regex ); print “matched " if match_glob( “foo.*”, “foo.bar” ); # prints foo.bar and foo.baz my $regex = glob_to_regex( “foo.*” ); for ( qw( foo.bar foo.baz foo bar ) ) { print “matched: $_ " if /$regex/; }

DESCRIPTION

Text::Glob implements glob (3) style matching that can be used to match against text, rather than fetching names from a filesystem. If you want to do full file globbing use the File::Glob module instead.

Routines

match_glob( $glob, @things_to_test )
Returns the list of things which match the glob from the source list.

glob_to_regex( $glob )
Returns a compiled regex which is the equivalent of the globbing pattern.

glob_to_regex_string( $glob )
Returns a regex string which is the equivalent of the globbing pattern.

SYNTAX

The following metacharacters and rules are respected.

“*” - match zero or more characters
a* matches a, aa, aaaa and many many more.

“?” - match exactly one character
a? matches aa, but not a, or aaa

Character sets/ranges
example.[ch] matches example.c and example.h demo.[a-c] matches demo.a, demo.b, and demo.c

alternation
example.{foo,bar,baz} matches example.foo, example.bar, and example.baz

leading . must be explicitly matched
*.foo does not match .bar.foo. For this you must either specify the leading . in the glob pattern (.*.foo), or set $Text::Glob::strict_leading_dot to a false value while compiling the regex.

“*” and “?” do not match the separator (i.e. do not match “/”)
*.foo does not match bar/baz.foo. For this you must either explicitly match the / in the glob (*/*.foo), or set $Text::Glob::strict_wildcard_slash to a false value while compiling the regex, or change the separator that Text::Glob uses by setting $Text::Glob::seperator (with the typo, yes) to an alternative value while compiling the regex.

BUGS

The code uses qr// to produce compiled regexes, therefore this module requires perl version 5.005_03 or newer.

AUTHOR

Richard Clamp <[email protected]>

COPYRIGHT

Copyright (C) 2002, 2003, 2006, 2007 Richard Clamp. All Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

File::Glob, glob (3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2800 - Linux cli command XtInstallAllAccelerators

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtInstallAllAccelerators and provides detailed information about the command XtInstallAllAccelerators, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtInstallAllAccelerators.

NAME 🖥️ XtInstallAllAccelerators 🖥️

managing accelerator tables

SYNTAX

#include <X11/Intrinsic.h>

XtAccelerators XtParseAcceleratorTable(const char * source);

void XtInstallAccelerators(Widget destination, Widget source);

void XtInstallAllAccelerators(Widget destination, Widget source);

ARGUMENTS

source
Specifies the accelerator table to compile.

destination
Specifies the widget on which the accelerators are to be installed.

source
Specifies the widget or the root widget of the widget tree from which the accelerators are to come.

DESCRIPTION

The XtParseAcceleratorTable function compiles the accelerator table into the opaque internal representation.

The XtInstallAccelerators function installs the accelerators from source onto destination by augmenting the destination translations with the source accelerators. If the source display_accelerator method is non-NULL, XtInstallAccelerators calls it with the source widget and a string representation of the accelerator table, which indicates that its accelerators have been installed and that it should display them appropriately. The string representation of the accelerator table is its canonical translation table representation.

The XtInstallAllAccelerators function recursively descends the widget tree rooted at source and installs the accelerators of each widget encountered onto destination. A common use os to call XtInstallAllAccelerators and pass the application main window as the source.

SEE ALSO

XtParseTranslationTable(1)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2801 - Linux cli command zip_source_buffer_fragment_create

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_source_buffer_fragment_create and provides detailed information about the command zip_source_buffer_fragment_create, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_source_buffer_fragment_create.

libzip (-lzip)

The functions

and

create a zip source from the data in

specifies the number of fragments. If

is non-zero, the data will be freed when it is no longer needed.

struct zip_stat { zip_uint8_t *data; /* pointer to the actual data */ zip_uint64_t length; /* length of this fragment */ };

The data

point to must remain valid for the lifetime of the created source.

itself can be discarded once the source is created.

The source can be used to open a zip archive from.

Upon successful completion, the created source is returned. Otherwise,

is returned and the error code in

or

is set to indicate the error.

and

fail if:

is greater than zero and

is

Required memory could not be allocated.

and

were added in libzip 1.4.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2802 - Linux cli command XtAppSetErrorMsgHandler

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppSetErrorMsgHandler and provides detailed information about the command XtAppSetErrorMsgHandler, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppSetErrorMsgHandler.

NAME 🖥️ XtAppSetErrorMsgHandler 🖥️

high-level error handlers

SYNTAX

#include <X11/Intrinsic.h>

void XtAppErrorMsg(XtAppContext app_context, const char *name, const char *type, const char *class, const char *defaultMsg, String *params, Cardinal *num_params);

XtErrorMsgHandler XtAppSetErrorMsgHandler(XtAppContext app_context, XtErrorMsgHandler msg_handler);

XtErrorMsgHandler XtAppSetWarningMsgHandler(XtAppContext app_context, XtErrorMsgHandler msg_handler);

void XtAppWarningMsg(XtAppContext app_context, const char *name, const char *type, const char *class, const char *defaultMsg, String *params, Cardinal *num_params);

ARGUMENTS

app_context
Specifies the application context.

class
Specifies the resource class of the error message.

defaultMsg
Specifies the default message to use.

name
Specifies the general kind of error.

type
Specifies the detailed name of the error.

msg_handler
Specifies the new fatal error procedure, which should not return or the nonfatal error procedure, which usually returns.

num_params
Specifies the number of values in the parameter list.

params
Specifies a pointer to a list of values to be stored in the message.

DESCRIPTION

The XtAppErrorMsg function calls the high-level error handler and passes the specified information.

The XtAppSetErrorMsgHandler function registers the specified procedure, which is called when a fatal error occurs.

The XtAppSetWarningMsgHandler function registers the specified procedure, which is called when a nonfatal error condition occurs.

The XtAppWarningMsg function calls the high-level error handler and passes the specified information.

SEE ALSO

XtAppGetErrorDatabase(3), XtAppError(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2803 - Linux cli command XtCallActionProc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtCallActionProc and provides detailed information about the command XtCallActionProc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtCallActionProc.

NAME 🖥️ XtCallActionProc 🖥️

invoke an action procedure directly

SYNTAX

#include <X11/Intrinsic.h>

void XtCallActionProc(Widget widget, const char *action, XEvent *event, String *params, Cardinal num_params);

ARGUMENTS

widget
Specifies the widget in which the action is to be invoked. Must be of class core of any subclass thereof.

action
Specifies the name of the action routine.

event
Specifies the contents of the event passed to the action routine.

params
Specifies the contents of the params passed to the action routine.

num_params
Specifies the num of entries in params.

DESCRIPTION

XtCallActionProc searches for the named action routine in the same manner and order as translation tables are bound. If found, the action routine is invoked with the specified widget, event pointer, and parameters. It is the responsibility of the caller to ensure that the contents of event, params, and num_params arguments are appropriate for the specified routine, and if necessary, that the specified widget is realized or sensitive. If the named action routine cannot be found, XtCallActionProc generates a warning message and returns.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2804 - Linux cli command fmod

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fmod and provides detailed information about the command fmod, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fmod.

NAME 🖥️ fmod 🖥️

floating-point remainder function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double fmod(double x, double y);
float fmodf(float x, float y);
long double fmodl(long double x, long double y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

fmodf(), fmodl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions compute the floating-point remainder of dividing x by y. The return value is x - n * y, where n is the quotient of x / y, rounded toward zero to an integer.

To obtain the modulus, more specifically, the Least Positive Residue, you will need to adjust the result from fmod like so:

z = fmod(x, y);
if (z < 0)
	z += y;

An alternate way to express this is with fmod(fmod(x, y) + y, y), but the second fmod() usually costs way more than the one branch.

RETURN VALUE

On success, these functions return the value x - n*y, for some integer n, such that the returned value has the same sign as x and a magnitude less than the magnitude of y.

If x or y is a NaN, a NaN is returned.

If x is an infinity, a domain error occurs, and a NaN is returned.

If y is zero, a domain error occurs, and a NaN is returned.

If x is +0 (-0), and y is not zero, +0 (-0) is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is an infinity
errno is set to EDOM (but see BUGS). An invalid floating-point exception (FE_INVALID) is raised.

Domain error: y is zero
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fmod(), fmodf(), fmodl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

BUGS

Before glibc 2.10, the glibc implementation did not set errno to EDOM when a domain error occurred for an infinite x.

EXAMPLES

The call fmod(372, 360) returns 348.

The call fmod(-372, 360) returns -12.

The call fmod(-372, -360) also returns -12.

SEE ALSO

remainder(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2805 - Linux cli command forkam

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command forkam and provides detailed information about the command forkam, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the forkam.

NAME 🖥️ forkam 🖥️

basic process management

SYNOPSIS

@load “fork”

pid = fork()

ret = waitpid(pid)

ret = wait();

DESCRIPTION

The fork extension adds three functions, as follows.

fork()
This function creates a new process. The return value is the zero in the child and the process-id number of the child in the parent, or -1 upon error. In the latter case, ERRNO indicates the problem. In the child, PROCINFO[“pid”] and PROCINFO[“ppid”] are updated to reflect the correct values.

waitpid()
This function takes a numeric argument, which is the process-id to wait for. The return value is that of the waitpid(2) system call.

wait()
This function waits for the first child to die. The return value is that of the wait(2) system call.

BUGS

There is no corresponding exec() function.

The interfaces could be enhanced to provide more facilities, including pulling out the various bits of the return status.

EXAMPLE

@load "fork"
...
if ((pid = fork()) == 0)
    print "hello from the child"
else
    print "hello from the parent"

SEE ALSO

GAWK: Effective AWK Programming, filefuncs(3am), fnmatch(3am), inplace(3am), ordchr(3am), readdir(3am), readfile(3am), revoutput(3am), rwarray(3am), time(3am).

fork(2), wait(2), waitpid(2).

AUTHOR

Arnold Robbins, [email protected].

COPYING PERMISSIONS

Copyright © 2012, 2013, 2018, Free Software Foundation, Inc.

Permission is granted to make and distribute verbatim copies of this manual page provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to process this file through troff and print the results, provided the printed document carries copying permission notice identical to this one except for the removal of this paragraph (this paragraph not being relevant to the printed manual page).

Permission is granted to copy and distribute modified versions of this manual page under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual page into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2806 - Linux cli command getwc

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getwc and provides detailed information about the command getwc, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getwc.

NAME 🖥️ getwc 🖥️

read a wide character from a FILE stream

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
#include <wchar.h>
wint_t fgetwc(FILE *stream);
wint_t getwc(FILE *stream);

DESCRIPTION

The fgetwc() function is the wide-character equivalent of the fgetc(3) function. It reads a wide character from stream and returns it. If the end of stream is reached, or if ferror(stream) becomes true, it returns WEOF. If a wide-character conversion error occurs, it sets errno to EILSEQ and returns WEOF.

The getwc() function or macro functions identically to fgetwc(). It may be implemented as a macro, and may evaluate its argument more than once. There is no reason ever to use it.

For nonlocking counterparts, see unlocked_stdio(3).

RETURN VALUE

On success, fgetwc() returns the next wide-character from the stream. Otherwise, WEOF is returned, and errno is set to indicate the error.

ERRORS

Apart from the usual ones, there is

EILSEQ
The data obtained from the input stream does not form a valid character.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fgetwc(), getwc()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of fgetwc() depends on the LC_CTYPE category of the current locale.

In the absence of additional information passed to the fopen(3) call, it is reasonable to expect that fgetwc() will actually read a multibyte sequence from the stream and then convert it to a wide character.

SEE ALSO

fgetws(3), fputwc(3), ungetwc(3), unlocked_stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2807 - Linux cli command rtime

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command rtime and provides detailed information about the command rtime, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the rtime.

NAME 🖥️ rtime 🖥️

get time from a remote machine

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <rpc/auth_des.h>
int rtime(struct sockaddr_in *addrp, struct rpc_timeval *timep,
 struct rpc_timeval *timeout);

DESCRIPTION

This function uses the Time Server Protocol as described in RFC 868 to obtain the time from a remote machine.

The Time Server Protocol gives the time in seconds since 00:00:00 UTC, 1 Jan 1900, and this function subtracts the appropriate constant in order to convert the result to seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).

When timeout is non-NULL, the udp/time socket (port 37) is used. Otherwise, the tcp/time socket (port 37) is used.

RETURN VALUE

On success, 0 is returned, and the obtained 32-bit time value is stored in timep->tv_sec. In case of error -1 is returned, and errno is set to indicate the error.

ERRORS

All errors for underlying functions (sendto(2), poll(2), recvfrom(2), connect(2), read(2)) can occur. Moreover:

EIO
The number of returned bytes is not 4.

ETIMEDOUT
The waiting time as defined in timeout has expired.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

rtime()

Thread safetyMT-Safe

NOTES

Only IPv4 is supported.

Some in.timed versions support only TCP. Try the example program with use_tcp set to 1.

BUGS

rtime() in glibc 2.2.5 and earlier does not work properly on 64-bit machines.

EXAMPLES

This example requires that port 37 is up and open. You may check that the time entry within /etc/inetd.conf is not commented out.

The program connects to a computer called “linux”. Using “localhost” does not work. The result is the localtime of the computer “linux”.

#include <errno.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <rpc/auth_des.h>
static int use_tcp = 0;
static const char servername[] = "linux";
int
main(void)
{
    int                 ret;
    time_t              t;
    struct hostent      *hent;
    struct rpc_timeval  time1 = {0, 0};
    struct rpc_timeval  timeout = {1, 0};
    struct sockaddr_in  name;
    memset(&name, 0, sizeof(name));
    sethostent(1);
    hent = gethostbyname(servername);
    memcpy(&name.sin_addr, hent->h_addr, hent->h_length);
    ret = rtime(&name, &time1, use_tcp ? NULL : &timeout);
    if (ret < 0)
        perror("rtime error");
    else {
        t = time1.tv_sec;
        printf("%s

“, ctime(&t)); } exit(EXIT_SUCCESS); }

SEE ALSO

ntpdate(1), inetd(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2808 - Linux cli command S_ISCHR

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command S_ISCHR and provides detailed information about the command S_ISCHR, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the S_ISCHR.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2809 - Linux cli command Tk_804deltapm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_804deltapm and provides detailed information about the command Tk_804deltapm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_804deltapm.

NAME 🖥️ Tk_804deltapm 🖥️

what is new for perl/Tk 804

DESCRIPTION

This document describes differences between the Tk800 series and the Tk804 series.

Incompatible Changes

In Tk804.028, there are some additional incompatible changes:

Return values of some Tk::Wm methods (e.g. aspect, wmGrid, iconposition, resizable …) were changed from returning tclish lists (e.g. “1 2 3 4”) to perlish lists (1,2,3,4).

Tk::Wm::wmTracing needs argument for setting on/off, without argument just return the current value.

All Tk804 releases have the following incompatible changes:

Tk804 will only work with perl 5.8.0 and above. For older perl versions look for Tk800.025.

curselection of Tk::Listbox now returns an array reference in scalar context. This means you have to write

my(@selected) = $listbox->curselection

or

my(@selected) = @{ $listbox->curselection }

now.

The fontActual method now returns the pixel value instead of the point value for -size. Pixel values are expressed as negative numbers.

Some enhancements from the “dash” patches are lost for now (i.e. -tile, -troughtile …).

The -state option is not available anymore for Tk::Text tags. Use -elide instead.

Enhancements

Tk804 is Unicode-aware.

It is possible to build Tk with Xft support on X11. This is strongly recommened if you are planning to make use of Unicode rendering capabilities of Tk. It also gives anti-aliased fonts for regular text (if you have TrueType or Type1 fonts and they are in your fontconfig config file).

The new method chooseDirectory is available as a standard directory selector.

Tk::PNG and Tk::JPEG are bundled now with the perl/Tk distribution, providing support for the image formats png and jpeg.

Improvements to Tk::Listbox: new option -activestyle, new methods itemconfigure and itemcget, new virtual event <<ListboxSelect>>.

More tests.

New Widgets

Tk::Labelframe
An alternative to Tk::LabFrame.

Tk::Panedwindow
An alternative to Tk::Adjuster.

Tk::Spinbox
An alternative to the CPAN module Tk::NumEntry.

Selected Bug Fixes

Changed Internals

Platform Specific Problems

Future Directions

Reporting Bugs

If you find what you think is a bug, you might check the articles recently posted to the comp.lang.perl.tk newsgroup.

If you believe you have an unreported bug, please send a mail to <[email protected]> and/or <[email protected]>. Be sure to trim your bug down to a tiny but sufficient test case.

SEE ALSO

Tk, Changes file in the Perl/Tk distribution.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2810 - Linux cli command Net_DNS_RR_SVCBpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_SVCBpm and provides detailed information about the command Net_DNS_RR_SVCBpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_SVCBpm.

NAME 🖥️ Net_DNS_RR_SVCBpm 🖥️

DNS SVCB resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name HTTPS SvcPriority TargetName SvcParams);

DESCRIPTION

DNS Service Binding (SVCB) resource record

Service binding and parameter specification via the DNS (SVCB and HTTPS RRs)

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

SvcPriority

$svcpriority = $rr->svcpriority; $rr->svcpriority( $svcpriority );

The priority of this record (relative to others, with lower values preferred). A value of 0 indicates AliasMode.

TargetName

$rr->targetname( $targetname ); $effecivetarget = $rr->targetname;

The domain name of either the alias target (for AliasMode) or the alternative endpoint (for ServiceMode).

For AliasMode SVCB RRs, a TargetName of “.” indicates that the service is not available or does not exist.

For ServiceMode SVCB RRs, a TargetName of “.” indicates that the owner name of this record must be used as the effective TargetName.

mandatory, alpn, no-default-alpn, port, ipv4hint, ech, ipv6hint

$rr = Net::DNS::RR->new( svcb.example. SVCB 1 svcb.example. port=1234 ); $rr->port(1234); $string = $rr->port(); # \210 $rr->key3($string);

Constructor methods for mnemonic SvcParams prescribed by RFC9460. When invoked without arguments, the methods return the presentation format value for the underlying key. The behaviour with undefined arguments is not specified.

keyNN

$keynn = $rr->keyNN; $rr->keyNN( $keynn ); $rr->keyNN( undef );

Generic constructor and accessor methods for SvcParams. The key index NN is a decimal integer in the range 0 .. 65535. The method argument and returned value are both presentation format strings. The method returns the undefined value if the key is not present. The specified key will be deleted if the value is undefined.

COPYRIGHT

Copyright (c)2020-2022 Dick Franks.

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC9460 <https://www.iana.org/go/rfc9460>

Service Parameter Keys <https://www.iana.org/assignments/dns-svcb>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2811 - Linux cli command updwtmpx

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command updwtmpx and provides detailed information about the command updwtmpx, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the updwtmpx.

NAME 🖥️ updwtmpx 🖥️

append an entry to the wtmp file

LIBRARY

System utilities library (libutil, -lutil)

SYNOPSIS

#include <utmp.h>
void updwtmp(const char *wtmp_file, const struct utmp *ut);
void logwtmp(const char *line, const char *name",constchar*"host);

DESCRIPTION

updwtmp() appends the utmp structure ut to the wtmp file.

logwtmp() constructs a utmp structure using line, name, host, current time, and current process ID. Then it calls updwtmp() to append the structure to the wtmp file.

FILES

/var/log/wtmp
database of past user logins

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

updwtmp(), logwtmp()

Thread safetyMT-Unsafe sig:ALRM timer

VERSIONS

For consistency with the other “utmpx” functions (see getutxent(3)), glibc provides (since glibc 2.1):

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <utmpx.h>
void updwtmpx (const char *wtmpx_file, const struct utmpx *utx);

This function performs the same task as updwtmp(), but differs in that it takes a utmpx structure as its last argument.

STANDARDS

None.

HISTORY

Solaris, NetBSD.

SEE ALSO

getutxent(3), wtmp(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2812 - Linux cli command Image_ExifTool_QuickTimeStreampm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_QuickTimeStreampm and provides detailed information about the command Image_ExifTool_QuickTimeStreampm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_QuickTimeStreampm.

NAME 🖥️ Image_ExifTool_QuickTimeStreampm 🖥️

Extract embedded information from media data

SYNOPSIS

These routines are autoloaded by Image::ExifTool::QuickTime.

DESCRIPTION

This file contains routines used by Image::ExifTool to extract embedded information like GPS tracks from MOV, MP4 and INSV media data.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

Lhttps://developer.apple.com/library/content/documentation/QuickTime/QTFF/QTFFChap3/qtff3.html#//apple_ref/doc/uid/TP40000939-CH205-SW130>

<http://sergei.nz/files/nvtk_mp42gpx.py>

<https://forum.flitsservice.nl/dashcam-info/dod-ls460w-gps-data-uit-mov-bestand-lezen-t87926.html>

<https://developers.google.com/streetview/publish/camm-spec>

<https://sergei.nz/extracting-gps-data-from-viofo-a119-and-other-novatek-powered-cameras/>

SEE ALSO

Image::ExifTool::QuickTime (3pm), “QuickTime Stream Tags” in Image::ExifTool::TagNames, “GoPro GPMF Tags” in Image::ExifTool::TagNames, “Sony rtmd Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2813 - Linux cli command Regexp_Common_URI_poppm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_Common_URI_poppm and provides detailed information about the command Regexp_Common_URI_poppm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_Common_URI_poppm.

NAME 🖥️ Regexp_Common_URI_poppm 🖥️

  • Returns a pattern for POP URIs.

SYNOPSIS

use Regexp::Common qw /URI/; while (<>) { /$RE{URI}{POP}/ and print “Contains a POP URI. “; }

DESCRIPTION

$RE{URI}{POP}

Returns a pattern that matches POP URIs, as defined by RFC 2384. POP URIs have the form:

“pop:” “//” [ user [ “;AUTH” ( “*” | auth_type ) ] “@” ] host [ “:” port ]

Under {-keep}, the following are returned:

$1
The complete URI.

$2
The scheme.

$3
The user, if given.

$4
The authentication type, if given (could be a *).

$5
The host.

$6
The port, if given.

REFERENCES

[RFC 2384]
Gellens, R.: POP URL Scheme. August 1998.

SEE ALSO

Regexp::Common::URI for other supported URIs.

AUTHOR

Abigail. ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD License. See the file COPYRIGHT.BSD. 4) The MIT License. See the file COPYRIGHT.MIT.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2814 - Linux cli command Tk_Spinboxpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_Spinboxpm and provides detailed information about the command Tk_Spinboxpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_Spinboxpm.

NAME 🖥️ Tk_Spinboxpm 🖥️

Create and manipulate Spinbox widgets

SYNOPSIS

$spinbox = $parent->Spinbox(?options?);

-activebackground -highlightthickness -repeatinterval -background -insertbackground -selectbackground -borderwidth -insertborderwidth -selectborderwidth -cursor -insertontime -selectforeground -exportselection -insertwidth -takefocus -font -insertofftime -textvariable -foreground -justify -xscrollcommand -highlightbackground -relief -highlightcolor -repeatdelay

WIDGET-SPECIFIC OPTIONS

Option: -buttonbackground

Name: buttonBackground

Class: Background

The background color to be used for the spin buttons.

Option: -buttoncursor

Name: buttonCursor

Class: Cursor

The cursor to be used when over the spin buttons. If this is empty (the default), a default cursor will be used.

Option: -buttondownrelief

Name: buttonDownRelief

Class: Relief

The relief to be used for the upper spin button.

Option: -buttonuprelief

Name: buttonUpRelief

Class: Relief

The relief to be used for the lower spin button.

Option: -command

Name: command

Class: Command

Specifies a Perl/Tk callback to invoke whenever a Spinbutton is invoked. The callback has these two arguments appended to any existing callback arguments: the current value of the widget and the direction of the button press (up or down).

Option: -disabledbackground

Name: disabledBackground

Class: DisabledBackground

Specifies the background color to use when the Spinbox is disabled. If this option is the empty string, the normal background color is used.

Option: -disabledforeground

Name: disabledForeground

Class: DisabledForeground

Specifies the foreground color to use when the Spinbox is disabled. If this option is the empty string, the normal foreground color is used.

Option: -format

Name: format

Class: Format

Specifies an alternate format to use when setting the string value when using the -from and -to range. This must be a format specifier of the form %<pad>.<pad>f, as it will format a floating-point number.

Option: -from

Name: from

Class: From

A floating-point value corresponding to the lowest value for a Spinbox, to be used in conjunction with -to and -increment. When all are specified correctly, the Spinbox will use these values to control its contents. This value must be less than the -to option. If -values is specified, it supercedes this option.

Option: -invalidcommand

Alias: -invcmd

Name: invalidCommand

Class: InvalidCommand

Specifies a script to eval when validateCommand returns 0. Setting it to an empty string disables this feature (the default). The best use of this option is to set it to bell. See Validation below for more information.

Option: -increment

Name: increment

Class: Increment

A floating-point value specifying the increment. When used with -from and -to, the value in the widget will be adjusted by -increment when a spin button is pressed (up adds the value, down subtracts the value).

Option: -readonlybackground

Name: readonlyBackground

Class: ReadonlyBackground

Specifies the background color to use when the Spinbox is readonly. If this option is the empty string, the normal background color is used.

Option: -state

Name: state

Class: State

Specifies one of three states for the Spinbox: normal, disabled, or readonly. If the Spinbox is readonly, then the value may not be changed using methods and no insertion cursor will be displayed, even if the input focus is in the widget; the contents of the widget may still be selected. If the Spinbox is disabled, the value may not be changed, no insertion cursor will be displayed, the contents will not be selectable, and the Spinbox may be displayed in a different color, depending on the values of the -disabledforeground and -disabledbackground options.

Option: -to

Name: to

Class: To

A floating-point value corresponding to the highest value for the Spinbox, to be used in conjunction with -from and -increment. When all are specified correctly, the Spinbox will use these values to control its contents. This value must be greater than the -from option. If -values is specified, it supercedes this option.

Option: -validate

Name: validate

Class: Validate

Specifies the mode in which validation should operate: none, focus, focusin, focusout, key, or all. It defaults to none. When you want validation, you must explicitly state which mode you wish to use. See Validation below for more.

Option: -validatecommand

Alias: -vcmd

Name: validateCommand

Class: ValidateCommand

Specifies a script to evaluate when you want to validate the input in the widget. Setting it to an empty string disables this feature (the default). Validation occurs according to the value of -validate. This command must return a valid boolean value. If it returns 0 (or the valid boolean equivalent) then the value of the widget will not change and the invalidCommand will be evaluated if it is set. If it returns 1, then value will be changed. See Validation below for more information.

Option: -values

Name: values

Class: Values

Must be a proper list value. If specified, the Spinbox will use these values as to control its contents, starting with the first value. This option has precedence over the -from and -to range.

Option: -width

Name: width

Class: Width

Specifies an integer value indicating the desired width of the Spinbox window, in average-size characters of the widget’s font. If the value is less than or equal to zero, the widget picks a size just large enough to hold its current text.

Option: -wrap

Name: wrap

Class: Wrap

Must be a proper boolean value. If on, the Spinbox will wrap around the values of data in the widget.

DESCRIPTION

The Spinbox method creates a new window (given by the $spinbox argument) and makes it into a Spinbox widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the Spinbox such as its colors, font, and relief.

A Spinbox is an extended Entry widget that allows he user to move, or spin, through a fixed set of ascending or descending values such as times or dates in addition to editing the value as in an entry. When first created, a Spinbox’s string is empty. A portion of the Spinbox may be selected as described below. If a Spinbox is exporting its selection (see the exportSelection option), then it will observe the standard protocols for handling the selection; Spinbox selections are available as type STRING. Spinboxes also observe the standard Tk rules for dealing with the input focus. When a Spinbox has the input focus it displays an insertion cursor to indicate where new characters will be inserted.

Spinboxes are capable of displaying strings that are too long to fit entirely within the widget’s window. In this case, only a portion of the string will be displayed; commands described below may be used to change the view in the window. Spinboxes use the standard -xscrollcommand mechanism for interacting with scrollbars (see the description of the -xscrollcommand option for details). They also support scanning, as described below.

VALIDATION

Validation works by setting the validateCommand option to a callback which will be evaluated according to the validate option as follows:

none
Default. This means no validation will occur.

focus
validateCommand will be called when the Spinbox receives or loses focus.

focusin
validateCommand will be called when the Spinbox receives focus.

focusout
validateCommand will be called when the Spinbox loses focus.

key
validateCommand will be called when the Spinbox is edited.

all
validateCommand will be called for all above conditions. The validateCommand and invalidCommand callbacks are invoked with at least 5 positional arguments, which are appended to any already existing callback arguments:

  • 1 The proposed value of the entry. If you are configuring the entry widget to have a new textVariable, this will be the value of that textVariable.

  • 2 The characters to be added (or deleted). This will be undef if validation is due to focus, explcit call to validate or if change is due to -textvariable changing.

  • 3 The current value of entry i.e. before the proposed change.

  • 4 The index of character string to be added/deleted, if any. Otherwise -1.

  • 5 Type of action. 1 == INSERT, 0 == DELETE, -1 if it’s a forced validation or textVariable validation.

In general, the textVariable and validateCommand can be dangerous to mix. Any problems have been overcome so that using the validateCommand will not interfere with the traditional behavior of the Spinbox widget. Using the textVariable for read-only purposes will never cause problems. The danger comes when you try set the textVariable to something that the validateCommand would not accept, which causes validate to become none (the invalidCommand will not be triggered). The same happens when an error occurs evaluating the validateCommand. Primarily, an error will occur when the validateCommand or invalidCommand encounters an error in its script while evaluating or validateCommand does not return a valid boolean value. The validate option will also set itself to none when you edit the Spinbox widget from within either the validateCommand or the invalidCommand. Such editions will override the one that was being validated. If you wish to edit the value of the widget during validation and still have the validate option set, you should include the command my $val = $spinbox->cget(-validate); $spinbox->configure(-validate => $val); in the validateCommand or invalidCommand (whichever one you were editing the Spinbox widget from). It is also recommended to not set an associated textVariable during validation, as that can cause the Spinbox widget to become out of sync with the textVariable.

WIDGET METHODS

The Spinbox command creates a widget object whose name is $widget. This command may be used to invoke various operations on the widget. It has the following general form:

$widget->method(?arg arg …?);

Many of the methods for Spinboxes take one or more indices as arguments. An index specifies a particular character in the Spinbox’s string, in any of the following ways:

number
Specifies the character as a numerical index, where 0 corresponds to the first character in the string.

anchor
Indicates the anchor point for the selection, which is set with the select from and select adjust methods.

end
Indicates the character just after the last one in the Spinbox’s string. This is equivalent to specifying a numerical index equal to the length of the Spinbox’s string.

insert
Indicates the character adjacent to and immediately following the insertion cursor.

sel.first
Indicates the first character in the selection. It is an error to use this form if the selection isn’t in the Spinbox window.

sel.last
Indicates the character just after the last one in the selection. It is an error to use this form if the selection isn’t in the Spinbox window.

  1. In this form, number is treated as an x-coordinate in the Spinbox’s window; the character spanning that x-coordinate is used. For example, ``@0’’ indicates the left-most character in the window.

Abbreviations may be used for any of the forms above, e.g. ``e’’ or ``sel.f’’. In general, out-of-range indices are automatically rounded to the nearest legal value.

The following commands are possible for Spinbox widgets:

$widget->bbox(index);
Returns a list of four numbers describing the bounding box of the character given by index. The first two elements of the list give the x and y coordinates of the upper-left corner of the screen area covered by the character (in pixels relative to the widget) and the last two elements give the width and height of the character, in pixels. The bounding box may refer to a region outside the visible area of the window.

$widget->cget(option);
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the Spinbox command.

$widget->configure(?option?, ?value, option, value, …?);
Query or modify the configuration options of the widget. If no option is specified, returns a list describing all of the available options for $widget (see Tk::configure for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the Spinbox command.

$widget->delete(first, ?last?);
Delete one or more elements of the Spinbox. First is the index of the first character to delete, and last is the index of the character just after the last one to delete. If last isn’t specified it defaults to first+1, i.e. a single character is deleted. This command returns an empty string.

$widget->get;
Returns the Spinbox’s string.

$widget->icursor(index);
Arrange for the insertion cursor to be displayed just before the character given by index. Returns an empty string.

$widget->identify(x, y);
Returns the name of the window element corresponding to coordinates x and y in the Spinbox. Return value is one of: none, buttondown, buttonup, entry.

$widget->index(index);
Returns the numerical index corresponding to index.

$widget->insert(index, string);
Insert the characters of string just before the character indicated by index. Returns an empty string.

$widget->invoke(element);
Causes the specified element, either buttondown or buttonup, to be invoked, triggering the action associated with it.

$widget->scan(option, args);
This command is used to implement scanning on Spinboxes. It has two forms, depending on option:

$widget->scanMark(x);
Records x and the current view in the Spinbox window; used in conjunction with later scan dragto commands. Typically this command is associated with a mouse button press in the widget. It returns an empty string.

$widget->scanDragto(x);
This command computes the difference between its x argument and the x argument to the last scan mark command for the widget. It then adjusts the view left or right by 10 times the difference in x-coordinates. This command is typically associated with mouse motion events in the widget, to produce the effect of dragging the Spinbox at high speed through the window. The return value is an empty string.

$widget->selection(option, arg);
This command is used to adjust the selection within a Spinbox. It has several forms, depending on option:

$widget->selectionAdjust(index);
Locate the end of the selection nearest to the character given by index, and adjust that end of the selection to be at index (i.e including but not going beyond index). The other end of the selection is made the anchor point for future select to commands. If the selection isn’t currently in the Spinbox, then a new selection is created to include the characters between index and the most recent selection anchor point, inclusive. Returns an empty string.

$widget->selectionClear;
Clear the selection if it is currently in this widget. If the selection isn’t in this widget then the command has no effect. Returns an empty string.

$widget->selectionElement(?element?);
Sets or gets the currently selected element. If a spinbutton element is specified, it will be displayed depressed.

$widget->selectionFrom(index);
Set the selection anchor point to just before the character given by index. Doesn’t change the selection. Returns an empty string.

$widget->selectionPresent;
Returns 1 if there is are characters selected in the Spinbox, 0 if nothing is selected.

$widget->selectionRange(start, end);
Sets the selection to include the characters starting with the one indexed by start and ending with the one just before end. If end refers to the same character as start or an earlier one, then the Spinbox’s selection is cleared.

$widget->selectionTo(index);
If index is before the anchor point, set the selection to the characters from index up to but not including the anchor point. If index is the same as the anchor point, do nothing. If index is after the anchor point, set the selection to the characters from the anchor point up to but not including index. The anchor point is determined by the most recent select from or select adjust command in this widget. If the selection isn’t in this widget then a new selection is created using the most recent anchor point specified for the widget. Returns an empty string.

$widget->set(?string?);
If string is specified, the Spinbox will try and set it to this value, otherwise it just returns the Spinbox’s string. If validation is on, it will occur when setting the string.

$widget->validate;
This command is used to force an evaluation of the validateCommand independent of the conditions specified by the validate option. This is done by temporarily setting the validate option to all. It returns 0 or 1.

$widget->xview(args);
This command is used to query and change the horizontal position of the text in the widget’s window. It can take any of the following forms:

$widget->xview;
Returns a list containing two elements. Each element is a real fraction between 0 and 1; together they describe the horizontal span that is visible in the window. For example, if the first element is .2 and the second element is .6, 20% of the Spinbox’s text is off-screen to the left, the middle 40% is visible in the window, and 40% of the text is off-screen to the right. These are the same values passed to scrollbars via the -xscrollcommand option.

$widget->xview(index);
Adjusts the view in the window so that the character given by index is displayed at the left edge of the window.

$widget->xviewMoveto(fraction);
Adjusts the view in the window so that the character fraction of the way through the text appears at the left edge of the window. Fraction must be a fraction between 0 and 1.

$widget->xviewScroll(number, what);
This command shifts the view in the window left or right according to number and what. Number must be an integer. What must be either units or pages or an abbreviation of one of these. If what is units, the view adjusts left or right by number average-width characters on the display; if it is pages then the view adjusts by number screenfuls. If number is negative then characters farther to the left become visible; if it is positive then characters farther to the right become visible.

DEFAULT BINDINGS

Tk automatically creates class bindings for Spinboxes that give them the following default behavior. In the descriptions below, ``word’’ refers to a contiguous group of letters, digits, or ``_’’ characters, or any single character other than these.

[1]
Clicking mouse button 1 positions the insertion cursor just before the character underneath the mouse cursor, sets the input focus to this widget, and clears any selection in the widget. Dragging with mouse button 1 strokes out a selection between the insertion cursor and the character under the mouse.

[2]
Double-clicking with mouse button 1 selects the word under the mouse and positions the insertion cursor at the beginning of the word. Dragging after a double click will stroke out a selection consisting of whole words.

[3]
Triple-clicking with mouse button 1 selects all of the text in the Spinbox and positions the insertion cursor before the first character.

[4]
The ends of the selection can be adjusted by dragging with mouse button 1 while the Shift key is down; this will adjust the end of the selection that was nearest to the mouse cursor when button 1 was pressed. If the button is double-clicked before dragging then the selection will be adjusted in units of whole words.

[5]
Clicking mouse button 1 with the Control key down will position the insertion cursor in the Spinbox without affecting the selection.

[6]
If any normal printing characters are typed in a Spinbox, they are inserted at the point of the insertion cursor.

[7]
The view in the Spinbox can be adjusted by dragging with mouse button 2. If mouse button 2 is clicked without moving the mouse, the selection is copied into the Spinbox at the position of the mouse cursor.

[8]
If the mouse is dragged out of the Spinbox on the left or right sides while button 1 is pressed, the Spinbox will automatically scroll to make more text visible (if there is more text off-screen on the side where the mouse left the window).

[9]
The Left and Right keys move the insertion cursor one character to the left or right; they also clear any selection in the Spinbox and set the selection anchor. If Left or Right is typed with the Shift key down, then the insertion cursor moves and the selection is extended to include the new character. Control-Left and Control-Right move the insertion cursor by words, and Control-Shift-Left and Control-Shift-Right move the insertion cursor by words and also extend the selection. Control-b and Control-f behave the same as Left and Right, respectively. Meta-b and Meta-f behave the same as Control-Left and Control-Right, respectively.

[10]
The Home key, or Control-a, will move the insertion cursor to the beginning of the Spinbox and clear any selection in the Spinbox. Shift-Home moves the insertion cursor to the beginning of the Spinbox and also extends the selection to that point.

[11]
The End key, or Control-e, will move the insertion cursor to the end of the Spinbox and clear any selection in the Spinbox. Shift-End moves the cursor to the end and extends the selection to that point.

[12]
The Select key and Control-Space set the selection anchor to the position of the insertion cursor. They don’t affect the current selection. Shift-Select and Control-Shift-Space adjust the selection to the current position of the insertion cursor, selecting from the anchor to the insertion cursor if there was not any selection previously.

[13]
Control-/ selects all the text in the Spinbox.

[14]
Control-\ clears any selection in the Spinbox.

[15]
The F16 key (labelled Copy on many Sun workstations) or Meta-w copies the selection in the widget to the clipboard, if there is a selection.

[16]
The F20 key (labelled Cut on many Sun workstations) or Control-w copies the selection in the widget to the clipboard and deletes the selection. If there is no selection in the widget then these keys have no effect.

[17]
The F18 key (labelled Paste on many Sun workstations) or Control-y inserts the contents of the clipboard at the position of the insertion cursor.

[18]
The Delete key deletes the selection, if there is one in the Spinbox. If there is no selection, it deletes the character to the right of the insertion cursor.

[19]
The BackSpace key and Control-h delete the selection, if there is one in the Spinbox. If there is no selection, it deletes the character to the left of the insertion cursor.

[20]
Control-d deletes the character to the right of the insertion cursor.

[21]
Meta-d deletes the word to the right of the insertion cursor.

[22]
Control-k deletes all the characters to the right of the insertion cursor.

[23]
Control-t reverses the order of the two characters to the right of the insertion cursor. If the Spinbox is disabled using the -state option, then the Spinbox’s view can still be adjusted and text in the Spinbox can still be selected, but no insertion cursor will be displayed and no text modifications will take place. The behavior of Spinboxes can be changed by defining new bindings for individual widgets or by redefining the class bindings.

KEYWORDS

Spinbox, Entry, widget

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2815 - Linux cli command tmtype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tmtype and provides detailed information about the command tmtype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tmtype.

NAME 🖥️ tmtype 🖥️

broken-down time

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <time.h>
struct tm {
 int tm_sec; /* Seconds [0, 60] */
 int tm_min; /* Minutes [0, 59] */
 int tm_hour; /* Hour [0, 23] */
 int tm_mday; /* Day of the month [1, 31] */
 int tm_mon;"/*Month["0, 11] (January = 0) */
 int tm_year; /* Year minus 1900 */
 int tm_wday;"/*Dayoftheweek["0, 6] (Sunday = 0) */
 int tm_yday;"/*Dayoftheyear["0, 365] (Jan/01 = 0) */
 int tm_isdst; /* Daylight savings flag */
 long tm_gmtoff; /* Seconds East of UTC */
 const char *tm_zone; /* Timezone abbreviation */
};

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

tm_gmtoff, tm_zone:

    Since glibc 2.20:
        _DEFAULT_SOURCE
    glibc 2.20 and earlier:
        _BSD_SOURCE

DESCRIPTION

Describes time, broken down into distinct components.

tm_isdst describes whether daylight saving time is in effect at the time described. The value is positive if daylight saving time is in effect, zero if it is not, and negative if the information is not available.

tm_gmtoff is the difference, in seconds, of the timezone represented by this broken-down time and UTC (this is the additive inverse of timezone(3)).

tm_zone is the equivalent of tzname(3) for the timezone represented by this broken-down time.

VERSIONS

In C90, tm_sec could represent values in the range [0, 61], which could represent a double leap second. UTC doesn’t permit double leap seconds, so it was limited to 60 in C99.

timezone(3), as a variable, is an XSI extension: some systems provide the V7-compatible timezone(3) function. The tm_gmtoff field provides an alternative (with the opposite sign) for those systems.

tm_zone points to static storage and may be overridden on subsequent calls to localtime(3) and similar functions (however, this never happens under glibc).

STANDARDS

C11, POSIX.1-2008.

HISTORY

C89, POSIX.1-2001.

tm_gmtoff and tm_zone originate from 4.3BSD-Tahoe (where tm_zone is a char *).

NOTES

tm_sec can represent a leap second with the value 60.

SEE ALSO

ctime(3), strftime(3), strptime(3), time(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2816 - Linux cli command Moose_Cookbook_Meta_Labeled_AttributeTraitpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Meta_Labeled_AttributeTraitpm and provides detailed information about the command Moose_Cookbook_Meta_Labeled_AttributeTraitpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Meta_Labeled_AttributeTraitpm.

NAME 🖥️ Moose_Cookbook_Meta_Labeled_AttributeTraitpm 🖥️

Labels implemented via attribute traits

VERSION

version 2.2207

SYNOPSIS

package MyApp::Meta::Attribute::Trait::Labeled; use Moose::Role; Moose::Util::meta_attribute_alias(Labeled); has label => ( is => rw, isa => Str, predicate => has_label, ); package MyApp::Website; use Moose; has url => ( traits => [qw/Labeled/], is => rw, isa => Str, label => “The sites URL”, ); has name => ( is => rw, isa => Str, ); sub dump { my $self = shift; my $meta = $self->meta; my $dump = ; for my $attribute ( map { $meta->get_attribute($_) } sort $meta->get_attribute_list ) { if ( $attribute->does(MyApp::Meta::Attribute::Trait::Labeled) && $attribute->has_label ) { $dump .= $attribute->label; } else { $dump .= $attribute->name; } my $reader = $attribute->get_read_method; $dump .= “: " . $self->$reader . " “; } return $dump; } package main; my $app = MyApp::Website->new( url => “http://google.com”, name => “Google” );

SUMMARY

In this recipe, we begin to delve into the wonder of meta-programming. Some readers may scoff and claim that this is the arena of only the most twisted Moose developers. Absolutely not! Any sufficiently twisted developer can benefit greatly from going more meta.

Our goal is to allow each attribute to have a human-readable “label” attached to it. Such labels would be used when showing data to an end user. In this recipe we label the url attribute with “The site’s URL” and create a simple method showing how to use that label.

META-ATTRIBUTE OBJECTS

All the attributes of a Moose-based object are actually objects themselves. These objects have methods and attributes. Let’s look at a concrete example.

has x => ( isa => Int, is => ro ); has y => ( isa => Int, is => rw );

Internally, the metaclass for Point has two Moose::Meta::Attribute objects. There are several methods for getting meta-attributes out of a metaclass, one of which is get_attribute_list. This method is called on the metaclass object.

The get_attribute_list method returns a list of attribute names. You can then use get_attribute to get the Moose::Meta::Attribute object itself.

Once you have this meta-attribute object, you can call methods on it like this:

print $point->meta->get_attribute(x)->type_constraint; => Int

To add a label to our attributes there are two steps. First, we need a new attribute metaclass trait that can store a label for an attribute. Second, we need to apply that trait to our attributes.

TRAITS

Roles that apply to metaclasses have a special name: traits. Don’t let the change in nomenclature fool you, traits are just roles.

“has” in Moose allows you to pass a traits parameter for an attribute. This parameter takes a list of trait names which are composed into an anonymous metaclass, and that anonymous metaclass is used for the attribute.

Yes, we still have lots of metaclasses in the background, but they’re managed by Moose for you.

Traits can do anything roles can do. They can add or refine attributes, wrap methods, provide more methods, define an interface, etc. The only difference is that you’re now changing the attribute metaclass instead of a user-level class.

DISSECTION

We start by creating a package for our trait.

package MyApp::Meta::Attribute::Trait::Labeled; use Moose::Role; has label => ( is => rw, isa => Str, predicate => has_label, );

You can see that a trait is just a Moose::Role. In this case, our role contains a single attribute, label. Any attribute which does this trait will now have a label.

We also register our trait with Moose:

Moose::Util::meta_attribute_alias(Labeled);

This allows Moose to find our trait by the short name Labeled when passed to the traits attribute option, rather than requiring the full package name to be specified.

Finally, we pass our trait when defining an attribute:

has url => ( traits => [qw/Labeled/], is => rw, isa => Str, label => “The sites URL”, );

The traits parameter contains a list of trait names. Moose will build an anonymous attribute metaclass from these traits and use it for this attribute.

The reason that we can pass the name Labeled, instead of MyApp::Meta::Attribute::Trait::Labeled, is because of the register_implementation code we touched on previously.

When you pass a metaclass to has, it will take the name you provide and prefix it with Moose::Meta::Attribute::Custom::Trait::. Then it calls register_implementation in the package. In this case, that means Moose ends up calling register_implementation from Moose::Meta::Attribute::Custom::Trait::Labeled.

If this function exists, it should return the real trait’s package name. This is exactly what our code does, returning MyApp::Meta::Attribute::Trait::Labeled. This is a little convoluted, and if you don’t like it, you can always use the fully-qualified name.

We can access this meta-attribute and its label like this:

$website->meta->get_attribute(url)->label() MyApp::Website->meta->get_attribute(url)->label()

We also have a regular attribute, name:

has name => ( is => rw, isa => Str, );

Finally, we have a dump method, which creates a human-readable representation of a MyApp::Website object. It will use an attribute’s label if it has one.

sub dump { my $self = shift; my $meta = $self->meta; my $dump = ; for my $attribute ( map { $meta->get_attribute($_) } sort $meta->get_attribute_list ) { if ( $attribute->does(MyApp::Meta::Attribute::Trait::Labeled) && $attribute->has_label ) { $dump .= $attribute->label; }

This is a bit of defensive code. We cannot depend on every meta-attribute having a label. Even if we define one for every attribute in our class, a subclass may neglect to do so. Or a superclass could add an attribute without a label.

We also check that the attribute has a label using the predicate we defined. We could instead make the label required. If we have a label, we use it, otherwise we use the attribute name:

else { $dump .= $attribute->name; } my $reader = $attribute->get_read_method; $dump .= “: " . $self->$reader . " “; } return $dump; }

The get_read_method is part of the Moose::Meta::Attribute API. It returns the name of a method that can read the attribute’s value, when called on the real object (don’t call this on the meta-attribute).

CONCLUSION

You might wonder why you’d bother with all this. You could just hardcode “The Site’s URL” in the dump method. But we want to avoid repetition. If you need the label once, you may need it elsewhere, maybe in the as_form method you write next.

Associating a label with an attribute just makes sense! The label is a piece of information about the attribute.

It’s also important to realize that this was a trivial example. You can make much more powerful metaclasses that do things, as opposed to just storing some more information. For example, you could implement a metaclass that expires attributes after a certain amount of time:

has site_cache => ( traits => [TimedExpiry], expires_after => { hours => 1 }, refresh_with => sub { get( $_[0]->url ) }, isa => Str, is => ro, );

The sky’s the limit!

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2817 - Linux cli command pthread_mutexattr_gettype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_mutexattr_gettype and provides detailed information about the command pthread_mutexattr_gettype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_mutexattr_gettype.

NAME 🖥️ pthread_mutexattr_gettype 🖥️

initialize and destroy a mutex attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_mutexattr_init(pthread_mutexattr_t *attr);
int pthread_mutexattr_destroy(pthread_mutexattr_t *attr);

DESCRIPTION

The pthread_mutexattr_init() function initializes the mutex attributes object pointed to by attr with default values for all attributes defined by the implementation.

The results of initializing an already initialized mutex attributes object are undefined.

The pthread_mutexattr_destroy() function destroys a mutex attribute object (making it uninitialized). Once a mutex attributes object has been destroyed, it can be reinitialized with pthread_mutexattr_init().

The results of destroying an uninitialized mutex attributes object are undefined.

RETURN VALUE

On success, these functions return 0. On error, they return a positive error number.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

NOTES

Subsequent changes to a mutex attributes object do not affect mutex that have already been initialized using that object.

SEE ALSO

pthread_mutex_init(3), pthread_mutexattr_getpshared(3), pthread_mutexattr_getrobust(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2818 - Linux cli command Regexp_IPv6pm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Regexp_IPv6pm and provides detailed information about the command Regexp_IPv6pm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Regexp_IPv6pm.

NAME 🖥️ Regexp_IPv6pm 🖥️

Regular expression for IPv6 addresses

SYNOPSIS

use Regexp::IPv6 qw($IPv6_re); $address =~ /^$IPv6_re$/ and print “IPv6 address “;

DESCRIPTION

This module exports the $IPv6_re regular expression that matches any valid IPv6 address as described in RFC 2373 - 2.2 Text Representation of Addresses but ::. Any string not compliant with such RFC will be rejected.

To match full strings use /^$IPv6_re$/.

COPYRIGHT AND LICENSE

Copyright (C) 2009, 2010 by Salvador Fandiño ([email protected])

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

Additionally, you are allowed to use the regexp generated by the module in any way you want, without any restriction. For instance, you are allowed to copy it verbating in your program.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2819 - Linux cli command TAILQ_NEXT

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command TAILQ_NEXT and provides detailed information about the command TAILQ_NEXT, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the TAILQ_NEXT.

NAME 🖥️ TAILQ_NEXT 🖥️

implementation of a doubly linked tail queue

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/queue.h>
TAILQ_ENTRY(TYPE);
TAILQ_HEAD(HEADNAME, TYPE);
TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD head);
void TAILQ_INIT(TAILQ_HEAD *head);
int TAILQ_EMPTY(TAILQ_HEAD *head);
void TAILQ_INSERT_HEAD(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_TAIL(TAILQ_HEAD *head,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_BEFORE(struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
void TAILQ_INSERT_AFTER(TAILQ_HEAD *head, struct TYPE *listelm,
 struct TYPE *elm, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_FIRST(TAILQ_HEAD *head);
struct TYPE *TAILQ_LAST(TAILQ_HEAD *head, HEADNAME);
struct TYPE *TAILQ_PREV(struct TYPE *elm, HEADNAME, TAILQ_ENTRY NAME);
struct TYPE *TAILQ_NEXT(struct TYPE *elm, TAILQ_ENTRY NAME);
TAILQ_FOREACH(struct TYPE *var, TAILQ_HEAD *head,
 TAILQ_ENTRY NAME);
TAILQ_FOREACH_REVERSE(struct TYPE *var, TAILQ_HEAD *head, HEADNAME,
 TAILQ_ENTRY NAME);
void TAILQ_REMOVE(TAILQ_HEAD *head, struct TYPE *elm,
 TAILQ_ENTRY NAME);
void TAILQ_CONCAT(TAILQ_HEAD *head1, TAILQ_HEAD *head2,
 TAILQ_ENTRY NAME);

DESCRIPTION

These macros define and operate on doubly linked tail queues.

In the macro definitions, TYPE is the name of a user defined structure, that must contain a field of type TAILQ_ENTRY, named NAME. The argument HEADNAME is the name of a user defined structure that must be declared using the macro TAILQ_HEAD().

Creation

A tail queue is headed by a structure defined by the TAILQ_HEAD() macro. This structure contains a pair of pointers, one to the first element in the queue and the other to the last element in the queue. The elements are doubly linked so that an arbitrary element can be removed without traversing the queue. New elements can be added to the queue after an existing element, before an existing element, at the head of the queue, or at the end of the queue. A TAILQ_HEAD structure is declared as follows:

TAILQ_HEAD(HEADNAME, TYPE) head;

where struct HEADNAME is the structure to be defined, and struct TYPE is the type of the elements to be linked into the queue. A pointer to the head of the queue can later be declared as:

struct HEADNAME *headp;

(The names head and headp are user selectable.)

TAILQ_ENTRY() declares a structure that connects the elements in the queue.

TAILQ_HEAD_INITIALIZER() evaluates to an initializer for the queue head.

TAILQ_INIT() initializes the queue referenced by

TAILQ_EMPTY() evaluates to true if there are no items on the queue. head.

Insertion

TAILQ_INSERT_HEAD() inserts the new element elm at the head of the queue.

TAILQ_INSERT_TAIL() inserts the new element elm at the end of the queue.

TAILQ_INSERT_BEFORE() inserts the new element elm before the element listelm.

TAILQ_INSERT_AFTER() inserts the new element elm after the element listelm.

Traversal

TAILQ_FIRST() returns the first item on the queue, or NULL if the queue is empty.

TAILQ_LAST() returns the last item on the queue. If the queue is empty the return value is NULL.

TAILQ_PREV() returns the previous item on the queue, or NULL if this item is the first.

TAILQ_NEXT() returns the next item on the queue, or NULL if this item is the last.

TAILQ_FOREACH() traverses the queue referenced by head in the forward direction, assigning each element in turn to var. var is set to NULL if the loop completes normally, or if there were no elements.

TAILQ_FOREACH_REVERSE() traverses the queue referenced by head in the reverse direction, assigning each element in turn to var.

Removal

TAILQ_REMOVE() removes the element elm from the queue.

Other features

TAILQ_CONCAT() concatenates the queue headed by head2 onto the end of the one headed by head1 removing all entries from the former.

RETURN VALUE

TAILQ_EMPTY() returns nonzero if the queue is empty, and zero if the queue contains at least one entry.

TAILQ_FIRST(), TAILQ_LAST(), TAILQ_PREV(), and TAILQ_NEXT() return a pointer to the first, last, previous, or next TYPE structure, respectively.

TAILQ_HEAD_INITIALIZER() returns an initializer that can be assigned to the queue head.

STANDARDS

BSD.

HISTORY

4.4BSD.

CAVEATS

TAILQ_FOREACH() and TAILQ_FOREACH_REVERSE() don’t allow var to be removed or freed within the loop, as it would interfere with the traversal. TAILQ_FOREACH_SAFE() and TAILQ_FOREACH_REVERSE_SAFE(), which are present on the BSDs but are not present in glibc, fix this limitation by allowing var to safely be removed from the list and freed from within the loop without interfering with the traversal.

EXAMPLES

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
struct entry {
    int data;
    TAILQ_ENTRY(entry) entries;             /* Tail queue */
};
TAILQ_HEAD(tailhead, entry);
int
main(void)
{
    struct entry *n1, *n2, *n3, *np;
    struct tailhead head;                   /* Tail queue head */
    int i;
    TAILQ_INIT(&head);                      /* Initialize the queue */
    n1 = malloc(sizeof(struct entry));      /* Insert at the head */
    TAILQ_INSERT_HEAD(&head, n1, entries);
    n1 = malloc(sizeof(struct entry));      /* Insert at the tail */
    TAILQ_INSERT_TAIL(&head, n1, entries);
    n2 = malloc(sizeof(struct entry));      /* Insert after */
    TAILQ_INSERT_AFTER(&head, n1, n2, entries);
    n3 = malloc(sizeof(struct entry));      /* Insert before */
    TAILQ_INSERT_BEFORE(n2, n3, entries);
    TAILQ_REMOVE(&head, n2, entries);       /* Deletion */
    free(n2);
                                            /* Forward traversal */
    i = 0;
    TAILQ_FOREACH(np, &head, entries)
        np->data = i++;
                                            /* Reverse traversal */
    TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)
        printf("%i

“, np->data); /* TailQ deletion */ n1 = TAILQ_FIRST(&head); while (n1 != NULL) { n2 = TAILQ_NEXT(n1, entries); free(n1); n1 = n2; } TAILQ_INIT(&head); exit(EXIT_SUCCESS); }

SEE ALSO

insque(3), queue(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2820 - Linux cli command XdbeQueryExtension

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XdbeQueryExtension and provides detailed information about the command XdbeQueryExtension, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XdbeQueryExtension.

NAME 🖥️ XdbeQueryExtension 🖥️

returns the version of DBE supported by the server.

SYNOPSIS

#include <X11/extensions/Xdbe.h>

Status XdbeQueryExtension( Display *dpy, int *major_version_return, int *minor_version_return)

DESCRIPTION

Sets major_version_return and minor_version_return to the major and minor DBE protocol version supported by the server. If the DBE library is compatible with the version returned by the server, this function returns non-zero. If dpy does not support the DBE extension, or if there was an error during communication with the server, or if the server and library protocol versions are incompatible, this function returns zero. No other Xdbe functions may be called before this function. If a client violates this rule, the effects of all subsequent Xdbe calls that it makes are undefined.

SEE ALSO

DBE, XdbeAllocateBackBufferName(), XdbeBeginIdiom(), XdbeDeallocateBackBufferName(), XdbeEndIdiom(), XdbeFreeVisualInfo(), XdbeGetBackBufferAttributes(), XdbeGetVisualInfo(), XdbeSwapBuffers().

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2821 - Linux cli command Jcode_Nihongopm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Jcode_Nihongopm and provides detailed information about the command Jcode_Nihongopm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Jcode_Nihongopm.

名前

Jcode - 日本語文字集合ハンドラ

概要

use Jcode; # # 古式ゆかしく Jcode::convert($str, $ocode, $icode, “z”); # もしくはオブジェクト指向で! print Jcode->new($str)->h2z->tr($from, $to)->utf8;

説明

Jcode.pmはオブジェクト的なアプローチと従来からのアプローチの両方を サポートしています。オブジェクト的なアプローチを使えばこんな感じで;

$iso_2022_jp = Jcode->new($str)->h2z->jis;

こちらよりエレガントでしょう:

$iso_2022_jp = $str; &jcode::convert(\iso_2022_jp, jis, &jcode::getcode(\str), “z”);

オブジェクトに馴染みの無い人のために、Jcode.pmはまだgetcode()convert()をサポートしています。

Perlのバージョンが5.8.1以上なら、Jcodeは、Perl 5.8以降の標準的な文字集合 ハンドラモジュールであるEncodeのラッパーとして振る舞います。

メソッド

特に言及しない限り、ここで挙げるメソッドは全てJcodeオブジェクトを返します。

コンストラクタ

$j = Jcode->new($str [, $icode])
$strからJcodeオブジェクト$jを生成します。明示的に$icodeをセットしなければ、 入力コードは自動的に判定されます。利用可能な文字集合については、下の getcodeを参照してください。 Perl 5.8.1以降では、$icodeにはEncodeが理解できる どんなエンコーディング名も使えます。 $j = Jcode->new($european, iso-latin1); オブジェクトを文字列化すると、EUCに変換された文字列が返ります。ですから print $j->eucとする代わりに、print $jとできます。

リファレンス渡し
スカラー値の代わりに、以下のようにリファレンスを渡せます。 Jcode->new(\str); これはほんの少し時間を節約します。その代償として、$strの値そのものが 変換されます(ある意味、$strはjcodeオブジェクトにtieされるのです)。

$j->set($str [, $icode])
$jの内部文字列に$strをセットします。繰り返しJcodeオブジェクトを使うときに 便利です(オブジェクトを生成する時間とメモリの節約になります)。 # mailboxをSJIS形式に変換 my $jconv = new Jcode; $/ = 00; while(<>){ print $jconv->set(\_)->mime_decode->sjis; }

$j->append($str [, $icode]);
$jの内部文字列に$strを加えます。

$j = jcode($str [, $icode]);
Jcode->new() の短縮形。以下のようにできます; $sjis = jcode($str)->sjis;

文字列のエンコード

一般に、$j->encodedとすることでencodedに変換された文字列を得ます。

$sjis = $j->sjis

$euc = $j->euc

$jis = $j->jis

$sjis = $j->sjis

$ucs2 = $j->ucs2

$utf8 = $j->utf8

自明でしょう。 WYCIWYG = What you code is what you get :)

$iso_2022_jp = $j->iso_2022_jp
$j->h2z->jisと同じです。 半角カナは強制的に全角に変換されます。 Perl 5.8.1以降では、Encodeがサポートするどんなエンコーディング名と エイリアスでも利用できます。例えば: $european = $j->iso_latin1; # メソッド名用に-は_に置き換えます 参考:Encode::Encoderがこれと同じ小技を使っています。

$j->fallback($fallback)
Perl 5.8.1以降では、Jcodeは内部の文字列をUTF-8で保持します。 ->encodingにマップできない文字は’?‘に置き換えられますが、 これはEncodeでの標準動作です。 my $unistr = “\x{262f}”; # 陰陽マーク my $j = jcode($unistr); # $j->euc の結果は ? に この振る舞いは、Encode同様、フォールバックを指定することで変更できます。 値はEncodeのものと一緒です。便宜のため、Jcode::FB_PERLQQJcode::FB_XMLCREFJcode::FB_HTMLCREFがEncodeのそれらへの エイリアスになっています。 print $j->fallback(Jcode::FB_PERLQQ)->euc; # \x{262f} print $j->fallback(Jcode::FB_XMLCREF)->euc; # ☯ print $j->fallback(Jcode::FB_HTMLCREF)->euc; # ☯ グローバル変数$Jcode::FALLBACKにデフォルトのフォールバックが保持 されていますので、この値を代入することでオーバーライドできます。 $Jcode::FALLBACK = Jcode::FB_PERLQQ; # デフォルトのフォールバックスキーマを設定

[@lines =] $jcode->jfold([$width, $newline_str, $kref])
$width(デフォルト:72)毎にjcode文字列内の行を折り返します。 $widthは”半角”文字の数です。全角文字は2文字としてカウントします。 $newline_str(デフォルトは )で指定された改行文字が加わります。 折り返された全行をリストで返します。 Perl 5.8.1以降は3番目の引数$krefにEUCの文字列の配列リファレンスを 渡すことで、簡易的な行頭禁則処理(ぶら下がり)を行えます。

$length = $jcode->jlength();
バイト長ではなく、全角文字も一文字として数えた場合の文字数を返します。

MIME::Base64を使うメソッド

下記のメソッドを使うには、MIME::Base64が必要です。インストールは単純に

perl -MCPAN -e CPAN::Shell->install(“MIME::Base64”)

とします。お使いのPerlが5.6以降であるなら、MIME::Base64は バンドルされているので、インストールの必要はありません。

$mime_header = $j->mime_encode([$lf, $bpl])
$strをRFC1522にあるMIME-Headerに変換します。$lfを指定すると、 行の折り返しに$lfが使われます(デフォルト: )。 $bplを指定すると、折り返すバイト数に$bplが使われます(デフォルト:76; この数値は76以下でなければなりません)。 Perl 5.8.1以降では、以下のようにしてもMIME Headerエンコードができます: $mime_header = $j->MIME_Header; この場合$mime_headerの戻り値はMIME-B-encoded UTF-8になります。 一方、$j->mime_encode()はMIME-B-encoded ISO-2022-JPを返します。 最近のほとんどのメーラーはどちらもサポートしています。

$j->mime_decode;
Jcodeオブジェクトの内部文字列をMIME-Headerデコードします。Perl 5.8.1 以降なら、以下のようにして同じことができます: Jcode->new($str, MIME-Header); こちらの場合、ISO-2022-JPだけではなくUTF-8などにも対応しており、 さらにMIME B EncodingのみならずMIME Q Encodingにも対応している ので、Perl 5.8.1以降であればこちらを使うべきでしょう。

半角 ←→ 全角

$j->h2z([$keep_dakuten])
X201カナ(半角)をX208カナ(全角)に変換します。 $keep_dakutenに真値をセットすると、濁点をそのままにします (これはつまり、「カ+゛」は「ガ」に変換されずにそのまま になるということです) $j->nmatchを通じてマッチした数を取得できます。

$j->z2h
X208カナ(全角)をX201カナ(半角)に変換します。 $j->nmatchを通じてマッチした数を取得できます。

正規表現エミュレータ

->m()->s()を使うには、Perl 5.8.1以降が 必要です。

$j->tr($from, $to, $opt);
Jcodeオブジェクトにtr/$from/$to/を適用します。$fromと$toは EUC-JPの文字列です。Perl 5.8.1以降では、flag付きのUTF-8文字列 も受け付けます。 $optをセットすると、tr/$from/$to/$optが適用されます。$optは ‘c’、’d’あるいはそれらの組み合わせでなければなりません。 $j->nmatchを通じてマッチした数を取得できます。 Perl 5.8.1以降では、trの形式に誤りのあった場合に->error_trを通じて、 $@を取得できます。 以下のメソッドはPerl 5.8.1以降でのみ利用可能です。

$j->s($patter, $replace, $opt);
個々にs/$pattern/$replace/$optを適用します。$optは正規表現オプションと 同じです。正規表現のオプションについてはperlreを参照ください。 $j->tr()$j->s()はそのオブジェクト自身を返すので、 以下のように操作を連結できます。 $j->tr(“A-Z”, “a-z”)->s(“foo”, “bar”);

[@match = ] $j->m($pattern, $opt);
m/$patter/$optを適用します。このメソッドは”オブジェクトを返さない” ので、$j->s()のようにメソッドを連結できないことに注意してください。 正規表現の形式に誤りのあった場合、->error_m、->error_sを通じて $@を取得できます。

インスタンス変数

もしJcodeオブジェクトのインスタンス変数にアクセスしたいなら、直接それら にアクセスするのではなく、アクセスメソッドを利用しましょう(これぞOOP です)。

参考までに、Jcodeは(一般的な方法である)ハッシュリファレンスの代わりに、 配列リファレンスを使うことで、スピードを最適化しています(実際のところ、 アクセスメソッドを使う限りこのことを知る必要はありません; もう一度 いいますが、これはOOPなのです)。

Perl 5.8.1以降では、ハッシュリファレンスを使うように変更されました。 これにより、Jcodeの拡張はものすごく簡単になります。

$j->r_str
EUC文字列へのリファレンス。 Perl 5.8.1以降ではUTF-8フラグの立ったUTF-8文字列へのリファレンスです。

$j->icode
直近の操作における入力文字コード。

$j->nmatch
マッチした数($j->tr等を使ったとき)。

サブルーチン

($code, [$nmatch]) = getcode($str)
$strの文字コードを返します。返るコードは以下の通りです。 ascii Ascii (日本語コードを含まない) binary Binary (テキストファイルではない) euc EUC-JP sjis SHIFT_JIS jis JIS (ISO-2022-JP) ucs2 UCS2 (Raw Unicode) utf8 UTF8 スカラーコンテキストの代わりに配列コンテキストを使うと、何文字分の コードが見つかったのかも返します。上の方で述べたように、$strは\str でも構いません。 jcode.pl 利用者の方へ: この関数はjcode::**getcode()**と100%上位互換が あります。――まあ、ほぼ100%; * 戻り値が配列のとき、その順番は逆となります; jcode::getcode()は$nmatchを最初に返します。 * jcode::getcode()は、EUC文字とSJIS文字の数が等しいとき、undefを 返します。 Jcode::getcode()はEUCを返します。これはJcode.pmには 中間がないためです。

Jcode::convert($str, [$ocode, $icode, $opt])
$strを$ocodeで指定した文字コードに変換します。$icodeも指定すると、 入力文字列をgetcode()でチェックする代わりに、$icodeと仮定します。 上の方で述べたように、$strは\strでも構いません。 jcode.pl 利用者の方へ: この関数はjcode::**convert()**と100%上位互換が あります!

バグ

Perlが5.8.1以降の場合、JcodeはEncodeのラッパーとして振る舞います。 つまり、JcodeはEncode内のバグの影響を受けます。

謝辞

このパッケージは、動機、デザインそしてコードの多くの点で、 歌代 和正 <[email protected]>氏のPerl4ライブラリjcode.plに負っています。

大崎 博基 <[email protected]>氏は、開発の非常に初期の段階から 正規表現を磨きあげる手助けをしてくれました。

[email protected] の JEncode には、JcodeとEncodeをどう融合させれば いいか大変大きな啓示を受けました。また、本日本語マニュアルも寄贈して いただきました。

そしてJcode ML <[email protected]>の皆さん。この方達なしには、 ここまで完成しなかったことでしょう。

参考

Encode

<http://www.iana.org/assignments/character-sets>

著作権

Copyright 1999-2005 Dan Kogai <[email protected]>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2822 - Linux cli command Net_DNS_RR_CERTpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_CERTpm and provides detailed information about the command Net_DNS_RR_CERTpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_CERTpm.

NAME 🖥️ Net_DNS_RR_CERTpm 🖥️

DNS CERT resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name IN CERT certtype keytag algorithm cert);

DESCRIPTION

Class for DNS Certificate (CERT) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

certtype

$certtype = $rr->certtype;

Returns the certtype code for the certificate (in numeric form).

keytag

$keytag = $rr->keytag; $rr->keytag( $keytag );

Returns the key tag for the public key in the certificate

algorithm

$algorithm = $rr->algorithm;

Returns the algorithm used by the certificate (in numeric form).

certificate

certbin

$certbin = $rr->certbin; $rr->certbin( $certbin );

Binary representation of the certificate.

cert

$cert = $rr->cert; $rr->cert( $cert );

Base64 representation of the certificate.

COPYRIGHT

Copyright (c)2002 VeriSign, Mike Schiraldi

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC4398 <https://iana.org/go/rfc4398>

Algorithm Numbers <https://iana.org/assignments/dns-sec-alg-numbers>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2823 - Linux cli command iswcntrl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command iswcntrl and provides detailed information about the command iswcntrl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the iswcntrl.

NAME 🖥️ iswcntrl 🖥️

test for control wide character

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wctype.h>
int iswcntrl(wint_t wc);

DESCRIPTION

The iswcntrl() function is the wide-character equivalent of the iscntrl(3) function. It tests whether wc is a wide character belonging to the wide-character class “cntrl”.

The wide-character class “cntrl” is disjoint from the wide-character class “print” and therefore also disjoint from its subclasses “graph”, “alpha”, “upper”, “lower”, “digit”, “xdigit”, “punct”.

For an unsigned char c, iscntrl(c) implies iswcntrl(btowc(c)), but not vice versa.

RETURN VALUE

The iswcntrl() function returns nonzero if wc is a wide character belonging to the wide-character class “cntrl”. Otherwise, it returns zero.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

iswcntrl()

Thread safetyMT-Safe locale

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

NOTES

The behavior of iswcntrl() depends on the LC_CTYPE category of the current locale.

SEE ALSO

iscntrl(3), iswctype(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2824 - Linux cli command lrand48_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lrand48_r and provides detailed information about the command lrand48_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lrand48_r.

NAME 🖥️ lrand48_r 🖥️

generate uniformly distributed pseudo-random numbers reentrantly

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int drand48_r(struct drand48_data *restrict buffer,
 double *restrict result);
int erand48_r(unsigned short xsubi[3],
 struct drand48_data *restrict buffer,
 double *restrict result);
int lrand48_r(struct drand48_data *restrict buffer,
 long *restrict result);
int nrand48_r(unsigned short xsubi[3],
 struct drand48_data *restrict buffer,
 long *restrict result);
int mrand48_r(struct drand48_data *restrict buffer,
 long *restrict result);
int jrand48_r(unsigned short xsubi[3],
 struct drand48_data *restrict buffer,
 long *restrict result);
int srand48_r(long int seedval, struct drand48_data *buffer);
int seed48_r(unsigned short seed16v[3], struct drand48_data *buffer);
int lcong48_r(unsigned short param[7], struct drand48_data *buffer);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPTION

These functions are the reentrant analogs of the functions described in drand48(3). Instead of modifying the global random generator state, they use the supplied data buffer.

Before the first use, this struct must be initialized, for example, by filling it with zeros, or by calling one of the functions srand48_r(), seed48_r(), or lcong48_r().

RETURN VALUE

The return value is 0.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

drand48_r(), erand48_r(), lrand48_r(), nrand48_r(), mrand48_r(), jrand48_r(), srand48_r(), seed48_r(), lcong48_r()

Thread safetyMT-Safe race:buffer

STANDARDS

GNU.

SEE ALSO

drand48(3), rand(3), random(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2825 - Linux cli command XtAppSetWarningMsgHandler

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtAppSetWarningMsgHandler and provides detailed information about the command XtAppSetWarningMsgHandler, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtAppSetWarningMsgHandler.

NAME 🖥️ XtAppSetWarningMsgHandler 🖥️

high-level error handlers

SYNTAX

#include <X11/Intrinsic.h>

void XtAppErrorMsg(XtAppContext app_context, const char *name, const char *type, const char *class, const char *defaultMsg, String *params, Cardinal *num_params);

XtErrorMsgHandler XtAppSetErrorMsgHandler(XtAppContext app_context, XtErrorMsgHandler msg_handler);

XtErrorMsgHandler XtAppSetWarningMsgHandler(XtAppContext app_context, XtErrorMsgHandler msg_handler);

void XtAppWarningMsg(XtAppContext app_context, const char *name, const char *type, const char *class, const char *defaultMsg, String *params, Cardinal *num_params);

ARGUMENTS

app_context
Specifies the application context.

class
Specifies the resource class of the error message.

defaultMsg
Specifies the default message to use.

name
Specifies the general kind of error.

type
Specifies the detailed name of the error.

msg_handler
Specifies the new fatal error procedure, which should not return or the nonfatal error procedure, which usually returns.

num_params
Specifies the number of values in the parameter list.

params
Specifies a pointer to a list of values to be stored in the message.

DESCRIPTION

The XtAppErrorMsg function calls the high-level error handler and passes the specified information.

The XtAppSetErrorMsgHandler function registers the specified procedure, which is called when a fatal error occurs.

The XtAppSetWarningMsgHandler function registers the specified procedure, which is called when a nonfatal error condition occurs.

The XtAppWarningMsg function calls the high-level error handler and passes the specified information.

SEE ALSO

XtAppGetErrorDatabase(3), XtAppError(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2826 - Linux cli command res_nmkquery

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command res_nmkquery and provides detailed information about the command res_nmkquery, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the res_nmkquery.

NAME 🖥️ res_nmkquery 🖥️

resolver routines

LIBRARY

Resolver library (libresolv, -lresolv)

SYNOPSIS

#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
struct __res_state;
typedef struct __res_state *res_state;
int res_ninit(res_state statep);
void res_nclose(res_state statep);
int res_nquery(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nsearch(res_state statep,
 const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
int res_nquerydomain(res_state statep,
 const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
int res_nmkquery(res_state statep,
 int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
int res_nsend(res_state statep,
 const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);
int dn_comp(const char *exp_dn, unsigned char comp_dn[.length],
 int length, unsigned char **dnptrs,
 unsigned char **lastdnptr);
int dn_expand(const unsigned char *msg,
 const unsigned char *eomorig,
 const unsigned char *comp_dn, char exp_dn[.length],
 int length);
[[deprecated]] extern struct __res_state _res;
[[deprecated]] int res_init(void);
[[deprecated]]
int res_query(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_search(const char *dname, int class, int type,
 unsigned char answer[.anslen], int anslen);
[[deprecated]]
int res_querydomain(const char *name, const char *domain,
 int class, int type, unsigned char answer[.anslen],
 int anslen);
[[deprecated]]
int res_mkquery(int op, const char *dname, int class,
 int type, const unsigned char data[.datalen], int datalen,
 const unsigned char *newrr,
 unsigned char buf[.buflen], int buflen);
[[deprecated]]
int res_send(const unsigned char msg[.msglen], int msglen,
 unsigned char answer[.anslen], int anslen);

DESCRIPTION

Note: This page is incomplete (various resolver functions provided by glibc are not described) and likely out of date.

The functions described below make queries to and interpret the responses from Internet domain name servers.

The API consists of a set of more modern, reentrant functions and an older set of nonreentrant functions that have been superseded. The traditional resolver interfaces such as res_init() and res_query() use some static (global) state stored in the _res structure, rendering these functions non-thread-safe. BIND 8.2 introduced a set of new interfaces res_ninit(), res_nquery(), and so on, which take a res_state as their first argument, so you can use a per-thread resolver state.

The res_ninit() and res_init() functions read the configuration files (see resolv.conf(5)) to get the default domain name and name server address(es). If no server is given, the local host is tried. If no domain is given, that associated with the local host is used. It can be overridden with the environment variable LOCALDOMAIN. res_ninit() or res_init() is normally executed by the first call to one of the other functions. Every call to res_ninit() requires a corresponding call to res_nclose() to free memory allocated by res_ninit() and subsequent calls to res_nquery().

The res_nquery() and res_query() functions query the name server for the fully qualified domain name name of specified type and class. The reply is left in the buffer answer of length anslen supplied by the caller.

The res_nsearch() and res_search() functions make a query and waits for the response like res_nquery() and res_query(), but in addition they implement the default and search rules controlled by RES_DEFNAMES and RES_DNSRCH (see description of _res options below).

The res_nquerydomain() and res_querydomain() functions make a query using res_nquery()/res_query() on the concatenation of name and domain.

The following functions are lower-level routines used by res_nquery()/res_query().

The res_nmkquery() and res_mkquery() functions construct a query message in buf of length buflen for the domain name dname. The query type op is one of the following (typically QUERY):

QUERY
Standard query.

IQUERY
Inverse query. This option was removed in glibc 2.26, since it has not been supported by DNS servers for a very long time.

NS_NOTIFY_OP
Notify secondary of SOA (Start of Authority) change.

newrr is currently unused.

The res_nsend() and res_send() function send a preformatted query given in msg of length msglen and returns the answer in answer which is of length anslen. They will call res_ninit()/res_init() if it has not already been called.

The dn_comp() function compresses the domain name exp_dn and stores it in the buffer comp_dn of length length. The compression uses an array of pointers dnptrs to previously compressed names in the current message. The first pointer points to the beginning of the message and the list ends with NULL. The limit of the array is specified by lastdnptr. If dnptr is NULL, domain names are not compressed. If lastdnptr is NULL, the list of labels is not updated.

The dn_expand() function expands the compressed domain name comp_dn to a full domain name, which is placed in the buffer exp_dn of size length. The compressed name is contained in a query or reply message, and msg points to the beginning of the message.

The resolver routines use configuration and state information contained in a __res_state structure (either passed as the statep argument, or in the global variable _res, in the case of the older nonreentrant functions). The only field of this structure that is normally manipulated by the user is the options field. This field can contain the bitwise “OR” of the following options:

RES_INIT
True if res_ninit() or res_init() has been called.

RES_DEBUG
Print debugging messages. This option is available only if glibc was built with debugging enabled, which is not the default.

RES_AAONLY (unimplemented; deprecated in glibc 2.25)
Accept authoritative answers only. res_send() continues until it finds an authoritative answer or returns an error. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEVC
Use TCP connections for queries rather than UDP datagrams.

RES_PRIMARY (unimplemented; deprecated in glibc 2.25)
Query primary domain name server only. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_IGNTC
Ignore truncation errors. Don’t retry with TCP.

RES_RECURSE
Set the recursion desired bit in queries. Recursion is carried out by the domain name server, not by res_send(). [Enabled by default].

RES_DEFNAMES
If set, res_search() will append the default domain name to single component names—that is, those that do not contain a dot. [Enabled by default].

RES_STAYOPEN
Used with RES_USEVC to keep the TCP connection open between queries.

RES_DNSRCH
If set, res_search() will search for hostnames in the current domain and in parent domains. This option is used by gethostbyname(3). [Enabled by default].

RES_INSECURE1
Accept a response from a wrong server. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_INSECURE2
Accept a response which contains a wrong query. This can be used to detect potential security hazards, but you need to compile glibc with debugging enabled and use RES_DEBUG option (for debug purpose only).

RES_NOALIASES
Disable usage of HOSTALIASES environment variable.

RES_USE_INET6
Try an AAAA query before an A query inside the gethostbyname(3) function, and map IPv4 responses in IPv6 “tunneled form” if no AAAA records are found but an A record set exists. Since glibc 2.25, this option is deprecated, and its usage produces a warning; applications should use getaddrinfo(3), rather than gethostbyname(3).

RES_ROTATE
Causes round-robin selection of name servers from among those listed. This has the effect of spreading the query load among all listed servers, rather than having all clients try the first listed server first every time.

RES_NOCHECKNAME (unimplemented; deprecated in glibc 2.25)
Disable the modern BIND checking of incoming hostnames and mail names for invalid characters such as underscore (_), non-ASCII, or control characters. This option was present until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_KEEPTSIG (unimplemented; deprecated in glibc 2.25)
Do not strip TSIG records. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_BLAST (unimplemented; deprecated in glibc 2.25)
Send each query simultaneously and recursively to all servers. This option was present but unimplemented until glibc 2.24; since glibc 2.25, it is deprecated, and its usage produces a warning.

RES_USEBSTRING (glibc 2.3.4 to glibc 2.24)
Make reverse IPv6 lookups using the bit-label format described in RFC 2673; if this option is not set (which is the default), then nibble format is used. This option was removed in glibc 2.25, since it relied on a backward-incompatible DNS extension that was never deployed on the Internet.

RES_NOIP6DOTINT (glibc 2.24 and earlier)
Use ip6.arpa zone in IPv6 reverse lookup instead of ip6.int, which is deprecated since glibc 2.3.4. This option is present up to and including glibc 2.24, where it is enabled by default. In glibc 2.25, this option was removed.

RES_USE_EDNS0 (since glibc 2.6)
Enables support for the DNS extensions (EDNS0) described in RFC 2671.

RES_SNGLKUP (since glibc 2.10)
By default, glibc performs IPv4 and IPv6 lookups in parallel since glibc 2.9. Some appliance DNS servers cannot handle these queries properly and make the requests time out. This option disables the behavior and makes glibc perform the IPv6 and IPv4 requests sequentially (at the cost of some slowdown of the resolving process).

RES_SNGLKUPREOP
When RES_SNGLKUP option is enabled, opens a new socket for the each request.

RES_USE_DNSSEC
Use DNSSEC with OK bit in OPT record. This option implies RES_USE_EDNS0.

RES_NOTLDQUERY
Do not look up unqualified name as a top-level domain (TLD).

RES_DEFAULT
Default option which implies: RES_RECURSE, RES_DEFNAMES, RES_DNSRCH, and RES_NOIP6DOTINT.

RETURN VALUE

The res_ninit() and res_init() functions return 0 on success, or -1 if an error occurs.

The res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), res_querydomain(), res_nmkquery(), res_mkquery(), res_nsend(), and res_send() functions return the length of the response, or -1 if an error occurs.

The dn_comp() and dn_expand() functions return the length of the compressed name, or -1 if an error occurs.

In the case of an error return from res_nquery(), res_query(), res_nsearch(), res_search(), res_nquerydomain(), or res_querydomain(), the global variable h_errno (see gethostbyname(3)) can be consulted to determine the cause of the error.

FILES

/etc/resolv.conf
resolver configuration file

/etc/host.conf
resolver configuration file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

res_ninit(), res_nclose(), res_nquery(), res_nsearch(), res_nquerydomain(), res_nsend()

Thread safetyMT-Safe locale

res_nmkquery(), dn_comp(), dn_expand()

Thread safetyMT-Safe

STANDARDS

None.

HISTORY

4.3BSD.

SEE ALSO

gethostbyname(3), resolv.conf(5), resolver(5), hostname(7), named(8)

The GNU C library source file resolv/README.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2827 - Linux cli command Image_ExifTool_Scaladopm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Scaladopm and provides detailed information about the command Image_ExifTool_Scaladopm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Scaladopm.

NAME 🖥️ Image_ExifTool_Scaladopm 🖥️

Read APP4 SCALADO metadata

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to read metadata from the JPEG APP4 SCALADO segment.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

“Scalado Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2828 - Linux cli command le16toh

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command le16toh and provides detailed information about the command le16toh, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the le16toh.

NAME 🖥️ le16toh 🖥️

convert values between host and big-/little-endian byte order

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <endian.h>
uint16_t htobe16(uint16_t host_16bits);
uint16_t htole16(uint16_t host_16bits);
uint16_t be16toh(uint16_t big_endian_16bits);
uint16_t le16toh(uint16_t little_endian_16bits);
uint32_t htobe32(uint32_t host_32bits);
uint32_t htole32(uint32_t host_32bits);
uint32_t be32toh(uint32_t big_endian_32bits);
uint32_t le32toh(uint32_t little_endian_32bits);
uint64_t htobe64(uint64_t host_64bits);
uint64_t htole64(uint64_t host_64bits);
uint64_t be64toh(uint64_t big_endian_64bits);
uint64_t le64toh(uint64_t little_endian_64bits);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

htobe16(), htole16(), be16toh(), le16toh(), htobe32(), htole32(), be32toh(), le32toh(), htobe64(), htole64(), be64toh(), le64toh():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    In glibc up to and including 2.19:
        _BSD_SOURCE

DESCRIPTION

These functions convert the byte encoding of integer values from the byte order that the current CPU (the “host”) uses, to and from little-endian and big-endian byte order.

The number, nn, in the name of each function indicates the size of integer handled by the function, either 16, 32, or 64 bits.

The functions with names of the form “htobenn” convert from host byte order to big-endian order.

The functions with names of the form “htolenn” convert from host byte order to little-endian order.

The functions with names of the form “benntoh” convert from big-endian order to host byte order.

The functions with names of the form “lenntoh” convert from little-endian order to host byte order.

VERSIONS

Similar functions are present on the BSDs, where the required header file is <sys/endian.h> instead of <endian.h>. Unfortunately, NetBSD, FreeBSD, and glibc haven’t followed the original OpenBSD naming convention for these functions, whereby the nn component always appears at the end of the function name (thus, for example, in NetBSD, FreeBSD, and glibc, the equivalent of OpenBSDs “betoh32” is “be32toh”).

STANDARDS

None.

HISTORY

glibc 2.9.

These functions are similar to the older byteorder(3) family of functions. For example, be32toh() is identical to ntohl().

The advantage of the byteorder(3) functions is that they are standard functions available on all UNIX systems. On the other hand, the fact that they were designed for use in the context of TCP/IP means that they lack the 64-bit and little-endian variants described in this page.

EXAMPLES

The program below display the results of converting an integer from host byte order to both little-endian and big-endian byte order. Since host byte order is either little-endian or big-endian, only one of these conversions will have an effect. When we run this program on a little-endian system such as x86-32, we see the following:

$ ./a.out
x.u32 = 0x44332211
htole32(x.u32) = 0x44332211
htobe32(x.u32) = 0x11223344

Program source

#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
    union {
        uint32_t u32;
        uint8_t arr[4];
    } x;
    x.arr[0] = 0x11;	/* Lowest-address byte */
    x.arr[1] = 0x22;
    x.arr[2] = 0x33;
    x.arr[3] = 0x44;	/* Highest-address byte */
    printf("x.u32 = %#x

“, x.u32); printf(“htole32(x.u32) = %#x “, htole32(x.u32)); printf(“htobe32(x.u32) = %#x “, htobe32(x.u32)); exit(EXIT_SUCCESS); }

SEE ALSO

bswap(3), byteorder(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2829 - Linux cli command pcap_open_deadpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_open_deadpcap and provides detailed information about the command pcap_open_deadpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_open_deadpcap.

NAME 🖥️ pcap_open_deadpcap 🖥️

open a fake pcap_t for compiling filters or opening a capture for output

SYNOPSIS

#include <pcap/pcap.h>
pcap_t *pcap_open_dead(int linktype, int snaplen);
pcap_t *pcap_open_dead_with_tstamp_precision(int linktype, int snaplen,
    u_int precision);

DESCRIPTION

pcap_open_dead() and pcap_open_dead_with_tstamp_precision() are used for creating a pcap_t structure to use when calling the other functions in libpcap. It is typically used when just using libpcap for compiling BPF code; it can also be used if using pcap_dump_open(3PCAP), pcap_dump(3PCAP), and pcap_dump_close(3PCAP) to write a savefile if there is no pcap_t that supplies the packets to be written.

linktype specifies the link-layer type for the pcap_t.

snaplen specifies the snapshot length for the pcap_t.

When pcap_open_dead_with_tstamp_precision(), is used to create a pcap_t for use with pcap_dump_open(), precision specifies the time stamp precision for packets; PCAP_TSTAMP_PRECISION_MICRO should be specified if the packets to be written have time stamps in seconds and microseconds, and PCAP_TSTAMP_PRECISION_NANO should be specified if the packets to be written have time stamps in seconds and nanoseconds. Its value does not affect pcap_compile(3PCAP).

BACKWARD COMPATIBILITY

The pcap_open_dead_with_tstamp_precision() function became available in libpcap release 1.5.1. In previous releases, there was no mechanism to open a savefile for writing with time stamps given in seconds and nanoseconds.

SEE ALSO

pcap(3PCAP), pcap-linktype(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2830 - Linux cli command getspnam_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getspnam_r and provides detailed information about the command getspnam_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getspnam_r.

NAME 🖥️ getspnam_r 🖥️

get shadow password file entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

/* General shadow password file API */
#include <shadow.h>
struct spwd *getspnam(const char *name);
struct spwd *getspent(void);
void setspent(void);
void endspent(void);
struct spwd *fgetspent(FILE *stream);
struct spwd *sgetspent(const char *s);
int putspent(const struct spwd *p, FILE *stream);
int lckpwdf(void);
int ulckpwdf(void);
/* GNU extension */
#include <shadow.h>
int getspent_r(struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int getspnam_r(const char *name, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int fgetspent_r(FILE *stream, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);
int sgetspent_r(const char *s, struct spwd *spbuf,
 char buf[.buflen], size_t buflen, struct spwd **spbufp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getspent_r(), getspnam_r(), fgetspent_r(), sgetspent_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

Long ago it was considered safe to have encrypted passwords openly visible in the password file. When computers got faster and people got more security-conscious, this was no longer acceptable. Julianne Frances Haugh implemented the shadow password suite that keeps the encrypted passwords in the shadow password database (e.g., the local shadow password file /etc/shadow, NIS, and LDAP), readable only by root.

The functions described below resemble those for the traditional password database (e.g., see getpwnam(3) and getpwent(3)).

The getspnam() function returns a pointer to a structure containing the broken-out fields of the record in the shadow password database that matches the username name.

The getspent() function returns a pointer to the next entry in the shadow password database. The position in the input stream is initialized by setspent(). When done reading, the program may call endspent() so that resources can be deallocated.

The fgetspent() function is similar to getspent() but uses the supplied stream instead of the one implicitly opened by setspent().

The sgetspent() function parses the supplied string s into a struct spwd.

The putspent() function writes the contents of the supplied struct spwd *p as a text line in the shadow password file format to stream. String entries with value NULL and numerical entries with value -1 are written as an empty string.

The lckpwdf() function is intended to protect against multiple simultaneous accesses of the shadow password database. It tries to acquire a lock, and returns 0 on success, or -1 on failure (lock not obtained within 15 seconds). The ulckpwdf() function releases the lock again. Note that there is no protection against direct access of the shadow password file. Only programs that use lckpwdf() will notice the lock.

These were the functions that formed the original shadow API. They are widely available.

Reentrant versions

Analogous to the reentrant functions for the password database, glibc also has reentrant functions for the shadow password database. The getspnam_r() function is like getspnam() but stores the retrieved shadow password structure in the space pointed to by spbuf. This shadow password structure contains pointers to strings, and these strings are stored in the buffer buf of size buflen. A pointer to the result (in case of success) or NULL (in case no entry was found or an error occurred) is stored in *spbufp.

The functions getspent_r(), fgetspent_r(), and sgetspent_r() are similarly analogous to their nonreentrant counterparts.

Some non-glibc systems also have functions with these names, often with different prototypes.

Structure

The shadow password structure is defined in <shadow.h> as follows:

struct spwd {
    char *sp_namp;     /* Login name */
    char *sp_pwdp;     /* Encrypted password */
    long  sp_lstchg;   /* Date of last change
                          (measured in days since
                          1970-01-01 00:00:00 +0000 (UTC)) */
    long  sp_min;      /* Min # of days between changes */
    long  sp_max;      /* Max # of days between changes */
    long  sp_warn;     /* # of days before password expires
                          to warn user to change it */
    long  sp_inact;    /* # of days after password expires
                          until account is disabled */
    long  sp_expire;   /* Date when account expires
                          (measured in days since
                          1970-01-01 00:00:00 +0000 (UTC)) */
    unsigned long sp_flag;  /* Reserved */
};

RETURN VALUE

The functions that return a pointer return NULL if no more entries are available or if an error occurs during processing. The functions which have int as the return value return 0 for success and -1 for failure, with errno set to indicate the error.

For the nonreentrant functions, the return value may point to static area, and may be overwritten by subsequent calls to these functions.

The reentrant functions return zero on success. In case of error, an error number is returned.

ERRORS

EACCES
The caller does not have permission to access the shadow password file.

ERANGE
Supplied buffer is too small.

FILES

/etc/shadow
local shadow password database file

/etc/.pwd.lock
lock file

The include file <paths.h> defines the constant _PATH_SHADOW to the pathname of the shadow password file.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getspnam()

Thread safety

MT-Unsafe race:getspnam locale

getspent()

Thread safety

MT-Unsafe race:getspent race:spentbuf locale

setspent(), endspent(), getspent_r()

Thread safety

MT-Unsafe race:getspent locale

fgetspent()

Thread safety

MT-Unsafe race:fgetspent

sgetspent()

Thread safety

MT-Unsafe race:sgetspent

putspent(), getspnam_r(), sgetspent_r()

Thread safety

MT-Safe locale

lckpwdf(), ulckpwdf(), fgetspent_r()

Thread safety

MT-Safe

In the above table, getspent in race:getspent signifies that if any of the functions setspent(), getspent(), getspent_r(), or endspent() are used in parallel in different threads of a program, then data races could occur.

VERSIONS

Many other systems provide a similar API.

STANDARDS

None.

SEE ALSO

getgrnam(3), getpwnam(3), getpwnam_r(3), shadow(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2831 - Linux cli command setservent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command setservent and provides detailed information about the command setservent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the setservent.

NAME 🖥️ setservent 🖥️

get service entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
struct servent *getservent(void);
struct servent *getservbyname(const char *name, const char *proto);
struct servent *getservbyport(int port, const char *proto);
void setservent(int stayopen);
void endservent(void);

DESCRIPTION

The getservent() function reads the next entry from the services database (see services(5)) and returns a servent structure containing the broken-out fields from the entry. A connection is opened to the database if necessary.

The getservbyname() function returns a servent structure for the entry from the database that matches the service name using protocol proto. If proto is NULL, any protocol will be matched. A connection is opened to the database if necessary.

The getservbyport() function returns a servent structure for the entry from the database that matches the port port (given in network byte order) using protocol proto. If proto is NULL, any protocol will be matched. A connection is opened to the database if necessary.

The setservent() function opens a connection to the database, and sets the next entry to the first entry. If stayopen is nonzero, then the connection to the database will not be closed between calls to one of the getserv*() functions.

The endservent() function closes the connection to the database.

The servent structure is defined in <netdb.h> as follows:

struct servent {
    char  *s_name;       /* official service name */
    char **s_aliases;    /* alias list */
    int    s_port;       /* port number */
    char  *s_proto;      /* protocol to use */
}

The members of the servent structure are:

s_name
The official name of the service.

s_aliases
A NULL-terminated list of alternative names for the service.

s_port
The port number for the service given in network byte order.

s_proto
The name of the protocol to use with this service.

RETURN VALUE

The getservent(), getservbyname(), and getservbyport() functions return a pointer to a statically allocated servent structure, or NULL if an error occurs or the end of the file is reached.

FILES

/etc/services
services database file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getservent()

Thread safety

MT-Unsafe race:servent race:serventbuf locale

getservbyname()

Thread safety

MT-Unsafe race:servbyname locale

getservbyport()

Thread safety

MT-Unsafe race:servbyport locale

setservent(), endservent()

Thread safety

MT-Unsafe race:servent locale

In the above table, servent in race:servent signifies that if any of the functions setservent(), getservent(), or endservent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, 4.3BSD.

SEE ALSO

getnetent(3), getprotoent(3), getservent_r(3), services(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2832 - Linux cli command powerof2

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command powerof2 and provides detailed information about the command powerof2, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the powerof2.

NAME 🖥️ powerof2 🖥️

test if a value is a power of 2

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <sys/param.h>
int powerof2(x);

DESCRIPTION

This macro returns true if x is a power of 2, and false otherwise.

0 is considered a power of 2. This can make sense considering wrapping of unsigned integers, and has interesting properties.

RETURN VALUE

True or false, if x is a power of 2 or not, respectively.

STANDARDS

BSD.

CAVEATS

The arguments may be evaluated more than once.

Because this macro is implemented using bitwise operations, some negative values can invoke undefined behavior. For example, the following invokes undefined behavior: powerof2(INT_MIN);. Call it only with unsigned types to be safe.

SEE ALSO

stdc_bit_ceil(3), stdc_bit_floor(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2833 - Linux cli command signbit

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command signbit and provides detailed information about the command signbit, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the signbit.

NAME 🖥️ signbit 🖥️

test sign of a real floating-point number

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
int signbit(x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

signbit():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

signbit() is a generic macro which can work on all real floating-point types. It returns a nonzero value if the value of x has its sign bit set.

This is not the same as x < 0.0, because IEEE 754 floating point allows zero to be signed. The comparison -0.0 < 0.0 is false, but signbit(-0.0) will return a nonzero value.

NaNs and infinities have a sign bit.

RETURN VALUE

The signbit() macro returns nonzero if the sign of x is negative; otherwise it returns zero.

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

signbit()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

This function is defined in IEC 559 (and the appendix with recommended functions in IEEE 754/IEEE 854).

SEE ALSO

copysign(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2834 - Linux cli command XauLockAuth

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XauLockAuth and provides detailed information about the command XauLockAuth, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XauLockAuth.

NAME 🖥️ XauLockAuth 🖥️

X authority database routines

SYNOPSIS

#include <X11/Xauth.h>

typedef struct xauth {
        unsigned short  family;
        unsigned short  address_length;
        char    *address;
        unsigned short  number_length;
        char    *number;
        unsigned short  name_length;
        char    *name;
        unsigned short  data_length;
        char    *data;
} Xauth;
char *XauFileName (void);
Xauth *XauReadAuth (FILE *auth_file );
int XauWriteAuth (FILE *auth_file, Xauth *auth );
Xauth *XauGetAuthByAddr (unsigned short family , unsigned short
address_length , const char *address , unsigned short
number_length , const char *number , unsigned short
name_length , const char *name );
Xauth *XauGetBestAuthByAddr (unsigned short family , unsigned short
address_length , const char *address , unsigned short
number_length , const char *number , int types_length ,
char **types , const int *type_lengths );
int XauLockAuth (const char *file_name , int retries , int
timeout , long dead );
int XauUnlockAuth (const char *file_name );
int XauDisposeAuth (Xauth *auth );

DESCRIPTION

XauFileName generates the default authorization file name by first checking the XAUTHORITY environment variable if set, else it returns $HOME/.Xauthority. This name is statically allocated and should not be freed.

XauReadAuth reads the next entry from auth_file. The entry is not statically allocated and should be freed by calling XauDisposeAuth.

XauWriteAuth writes an authorization entry to auth_file. It returns 1 on success, 0 on failure.

XauGetAuthByAddr searches for an entry which matches the given network address/display number pair. The entry is not statically allocated and should be freed by calling XauDisposeAuth.

XauGetBestAuthByAddr is similar to XauGetAuthByAddr, except that a list of acceptable authentication methods is specified. Xau will choose the file entry which matches the earliest entry in this list (e.g., the most secure authentication method). The types argument is an array of strings, one string for each authentication method. types_length specifies how many elements are in the types array. types_lengths is an array of integers representing the length of each string.

XauLockAuth does the work necessary to synchronously update an authorization file. First it makes two file names, one with ``-c’’ appended to file_name, the other with ``-l’’ appended. If the ``-c’’ file already exists and is more than dead seconds old, XauLockAuth removes it and the associated ``-l’’ file. To prevent possible synchronization troubles with NFS, a dead value of zero forces the files to be removed. XauLockAuth makes retries attempts to create and link the file names, pausing timeout seconds between each attempt. XauLockAuth returns a collection of values depending on the results:

LOCK_ERROR
A system error occurred, either a file_name which is too long, or an unexpected failure from a system call. errno may prove useful.

LOCK_TIMEOUT
retries attempts failed

LOCK_SUCCESS
The lock succeeded.

XauUnlockAuth undoes the work of XauLockAuth by unlinking both the ``-c’’ and ``-l’’ file names.

XauDisposeAuth frees storage allocated to hold an authorization entry.

SEE ALSO

xauth(1), xdm(1)

AUTHOR

Keith Packard, MIT X Consortium

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2835 - Linux cli command gnu_dev_minor

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gnu_dev_minor and provides detailed information about the command gnu_dev_minor, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gnu_dev_minor.

NAME 🖥️ gnu_dev_minor 🖥️

manage a device number

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/sysmacros.h>
dev_t makedev(unsigned int maj, unsigned int min);
unsigned int major(dev_t dev);
unsigned int minor(dev_t dev);

DESCRIPTION

A device ID consists of two parts: a major ID, identifying the class of the device, and a minor ID, identifying a specific instance of a device in that class. A device ID is represented using the type dev_t.

Given major and minor device IDs, makedev() combines these to produce a device ID, returned as the function result. This device ID can be given to mknod(2), for example.

The major() and minor() functions perform the converse task: given a device ID, they return, respectively, the major and minor components. These macros can be useful to, for example, decompose the device IDs in the structure returned by stat(2).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

makedev(), major(), minor()

Thread safetyMT-Safe

VERSIONS

The BSDs expose the definitions for these macros via <sys/types.h>.

STANDARDS

None.

HISTORY

BSD, HP-UX, Solaris, AIX, Irix.

These interfaces are defined as macros. Since glibc 2.3.3, they have been aliases for three GNU-specific functions: gnu_dev_makedev(), gnu_dev_major(), and gnu_dev_minor(). The latter names are exported, but the traditional names are more portable.

Depending on the version, glibc also exposes definitions for these macros from <sys/types.h> if suitable feature test macros are defined. However, this behavior was deprecated in glibc 2.25, and since glibc 2.28, <sys/types.h> no longer provides these definitions.

SEE ALSO

mknod(2), stat(2)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2836 - Linux cli command Image_ExifTool_PPMpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_PPMpm and provides detailed information about the command Image_ExifTool_PPMpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_PPMpm.

NAME 🖥️ Image_ExifTool_PPMpm 🖥️

Read and write PPM meta information

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read and write PPM (Portable Pixel Map), PGM (Portable Gray Map) and PBM (Portable BitMap) images.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://netpbm.sourceforge.net/doc/ppm.html>

<http://netpbm.sourceforge.net/doc/pgm.html>

<http://netpbm.sourceforge.net/doc/pbm.html>

SEE ALSO

“PPM Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2837 - Linux cli command XML_Twigpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XML_Twigpm and provides detailed information about the command XML_Twigpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XML_Twigpm.

NAME 🖥️ XML_Twigpm 🖥️

A perl module for processing huge XML documents in tree mode.

SYNOPSIS

Note that this documentation is intended as a reference to the module.

Complete docs, including a tutorial, examples, an easier to use HTML version, a quick reference card and a FAQ are available at <http://www.xmltwig.org/xmltwig>

Small documents (loaded in memory as a tree):

my $twig=XML::Twig->new(); # create the twig $twig->parsefile( doc.xml); # build it my_process( $twig); # use twig methods to process it $twig->print; # output the twig

Huge documents (processed in combined stream/tree mode):

# at most one div will be loaded in memory my $twig=XML::Twig->new( twig_handlers => { title => sub { $_->set_tag( h2) }, # change title tags to h2 # $_ is the current element para => sub { $_->set_tag( p) }, # change para to p hidden => sub { $_->delete; }, # remove hidden elements list => \my_list_process, # process list elements div => sub { $_[0]->flush; }, # output and free memory }, pretty_print => indented, # output will be nicely formatted empty_tags => html, # outputs <empty_tag /> ); $twig->parsefile( my_big.xml); sub my_list_process { my( $twig, $list)= @_; # … }

See XML::Twig 101 for other ways to use the module, as a filter for example.

DESCRIPTION

This module provides a way to process XML documents. It is build on top of XML::Parser.

The module offers a tree interface to the document, while allowing you to output the parts of it that have been completely processed.

It allows minimal resource (CPU and memory) usage by building the tree only for the parts of the documents that need actual processing, through the use of the twig_roots and twig_print_outside_roots options. The finish and finish_print methods also help to increase performances.

XML::Twig tries to make simple things easy so it tries its best to takes care of a lot of the (usually) annoying (but sometimes necessary) features that come with XML and XML::Parser.

TOOLS

XML::Twig comes with a few command-line utilities:

xml_pp - xml pretty-printer

XML pretty printer using XML::Twig

xml_grep - grep XML files looking for specific elements

xml_grep does a grep on XML files. Instead of using regular expressions it uses XPath expressions (in fact the subset of XPath supported by XML::Twig).

xml_split - cut a big XML file into smaller chunks

xml_split takes a (presumably big) XML file and split it in several smaller files, based on various criteria (level in the tree, size or an XPath expression)

xml_merge - merge back XML files split with xml_split

xml_merge takes several xml files that have been split using xml_split and recreates a single file.

xml_spellcheck - spellcheck XML files

xml_spellcheck lets you spell check the content of an XML file. It extracts the text (the content of elements and optionally of attributes), call a spell checker on it and then recreates the XML document.

XML::Twig 101

XML::Twig can be used either on “small” XML documents (that fit in memory) or on huge ones, by processing parts of the document and outputting or discarding them once they are processed.

Loading an XML document and processing it

my $t= XML::Twig->new(); $t->parse( <d><title>title</title><para>p 1</para><para>p 2</para></d>); my $root= $t->root; $root->set_tag( html); # change doc to html $title= $root->first_child( title); # get the title $title->set_tag( h1); # turn it into h1 my @para= $root->children( para); # get the para children foreach my $para (@para) { $para->set_tag( p); } # turn them into p $t->print; # output the document

Other useful methods include:

att: $elt->{att}->{foo} return the foo attribute for an element,

set_att : $elt->set_att( foo => "bar") sets the foo attribute to the bar value,

next_sibling: $elt->{next_sibling} return the next sibling in the document (in the example $title->{next_sibling} is the first para, you can also (and actually should) use $elt->next_sibling( para) to get it

The document can also be transformed through the use of the cut, copy, paste and move methods: $title->cut; $title->paste( after => $p); for example

And much, much more, see XML::Twig::Elt.

Processing an XML document chunk by chunk

One of the strengths of XML::Twig is that it let you work with files that do not fit in memory (BTW storing an XML document in memory as a tree is quite memory-expensive, the expansion factor being often around 10).

To do this you can define handlers, that will be called once a specific element has been completely parsed. In these handlers you can access the element and process it as you see fit, using the navigation and the cut-n-paste methods, plus lots of convenient ones like prefix . Once the element is completely processed you can then flush it, which will output it and free the memory. You can also purge it if you don’t need to output it (if you are just extracting some data from the document for example). The handler will be called again once the next relevant element has been parsed.

my $t= XML::Twig->new( twig_handlers => { section => \section, para => sub { $_->set_tag( p); } }, ); $t->parsefile( doc.xml); # the handler is called once a section is completely parsed, ie when # the end tag for section is found, it receives the twig itself and # the element (including all its sub-elements) as arguments sub section { my( $t, $section)= @_; # arguments for all twig_handlers $section->set_tag( div); # change the tag name # lets use the attribute nb as a prefix to the title my $title= $section->first_child( title); # find the title my $nb= $title->{att}->{nb}; # get the attribute $title->prefix( “$nb - “); # easy isnt it? $section->flush; # outputs the section and frees memory }

There is of course more to it: you can trigger handlers on more elaborate conditions than just the name of the element, section/title for example.

my $t= XML::Twig->new( twig_handlers => { section/title => sub { $_->print } } ) ->parsefile( doc.xml);

Here sub { $_->print } simply prints the current element ($_ is aliased to the element in the handler).

You can also trigger a handler on a test on an attribute:

my $t= XML::Twig->new( twig_handlers => { section[@level=“1”] => sub { $_->print } } ); ->parsefile( doc.xml);

You can also use start_tag_handlers to process an element as soon as the start tag is found. Besides prefix you can also use suffix ,

Processing just parts of an XML document

The twig_roots mode builds only the required sub-trees from the document Anything outside of the twig roots will just be ignored:

my $t= XML::Twig->new( # the twig will include just the root and selected titles twig_roots => { section/title => \print_n_purge, annex/title => \print_n_purge } ); $t->parsefile( doc.xml); sub print_n_purge { my( $t, $elt)= @_; print $elt->text; # print the text (including sub-element texts) $t->purge; # frees the memory }

You can use that mode when you want to process parts of a documents but are not interested in the rest and you don’t want to pay the price, either in time or memory, to build the tree for the it.

Building an XML filter

You can combine the twig_roots and the twig_print_outside_roots options to build filters, which let you modify selected elements and will output the rest of the document as is.

This would convert prices in $ to prices in Euro in a document:

my $t= XML::Twig->new( twig_roots => { price => \convert, }, # process prices twig_print_outside_roots => 1, # print the rest ); $t->parsefile( doc.xml); sub convert { my( $t, $price)= @_; my $currency= $price->{att}->{currency}; # get the currency if( $currency eq USD) { $usd_price= $price->text; # get the price # %rate is just a conversion table my $euro_price= $usd_price * $rate{usd2euro}; $price->set_text( $euro_price); # set the new price $price->set_att( currency => EUR); # dont forget this! } $price->print; # output the price }

XML::Twig and various versions of Perl, XML::Parser and expat:

XML::Twig is a lot more sensitive to variations in versions of perl, XML::Parser and expat than to the OS, so this should cover some reasonable configurations.

The “recommended configuration” is perl 5.8.3+ (for good Unicode support), XML::Parser 2.31+ and expat 1.95.5+

See <http://testers.cpan.org/search?request=dist&dist=XML-Twig> for the CPAN testers reports on XML::Twig, which list all tested configurations.

An Atom feed of the CPAN Testers results is available at <http://xmltwig.org/rss/twig_testers.rss>

Finally:

XML::Twig does NOT work with expat 1.95.4

XML::Twig only works with XML::Parser 2.27 in perl 5.6.*

Note that I can’t compile XML::Parser 2.27 anymore, so I can’t guarantee that it still works

XML::Parser 2.28 does not really work

When in doubt, upgrade expat, XML::Parser and Scalar::Util

Finally, for some optional features, XML::Twig depends on some additional modules. The complete list, which depends somewhat on the version of Perl that you are running, is given by running t/zz_dump_config.t

Simplifying XML processing

Whitespaces
Whitespaces that look non-significant are discarded, this behaviour can be controlled using the keep_spaces , keep_spaces_in and discard_spaces_in options.

Encoding
You can specify that you want the output in the same encoding as the input (provided you have valid XML, which means you have to specify the encoding either in the document or when you create the Twig object) using the keep_encoding option You can also use output_encoding to convert the internal UTF-8 format to the required encoding.

Comments and Processing Instructions (PI)
Comments and PI’s can be hidden from the processing, but still appear in the output (they are carried by the “real” element closer to them)

Pretty Printing
XML::Twig can output the document pretty printed so it is easier to read for us humans.

Surviving an untimely death
XML parsers are supposed to react violently when fed improper XML. XML::Parser just dies. XML::Twig provides the safe_parse and the safe_parsefile methods which wrap the parse in an eval and return either the parsed twig or 0 in case of failure.

Private attributes
Attributes with a name starting with # (illegal in XML) will not be output, so you can safely use them to store temporary values during processing. Note that you can store anything in a private attribute, not just text, it’s just a regular Perl variable, so a reference to an object or a huge data structure is perfectly fine.

CLASSES

XML::Twig uses a very limited number of classes. The ones you are most likely to use are XML::Twig of course, which represents a complete XML document, including the document itself (the root of the document itself is root), its handlers, its input or output filters… The other main class is XML::Twig::Elt, which models an XML element. Element here has a very wide definition: it can be a regular element, or but also text, with an element tag of #PCDATA (or #CDATA), an entity (tag is #ENT), a Processing Instruction (#PI), a comment (#COMMENT).

Those are the 2 commonly used classes.

You might want to look the elt_class option if you want to subclass XML::Twig::Elt.

Attributes are just attached to their parent element, they are not objects per se. (Please use the provided methods att and set_att to access them, if you access them as a hash, then your code becomes implementation dependent and might break in the future).

Other classes that are seldom used are XML::Twig::Entity_list and XML::Twig::Entity.

If you use XML::Twig::XPath instead of XML::Twig, elements are then created as XML::Twig::XPath::Elt

METHODS

XML::Twig

A twig is a subclass of XML::Parser, so all XML::Parser methods can be called on a twig object, including parse and parsefile. setHandlers on the other hand cannot be used, see BUGS

new
This is a class method, the constructor for XML::Twig. Options are passed as keyword value pairs. Recognized options are the same as XML::Parser, plus some (in fact a lot!) XML::Twig specifics. New Options:

twig_handlers
This argument consists of a hash { expression = \handler}> where expression is a an XPath-like expression (+ some others). XPath expressions are limited to using the child and descendant axis (indeed you can’t specify an axis), and predicates cannot be nested. You can use the string, or string(<tag>) function (except in twig_roots triggers). Additionally you can use regexps (/ delimited) to match attribute and string values. Examples: foo foo/bar foo//bar /foo/bar /foo//bar /foo/bar[@att1 = “val1” and @att2 = “val2”]/baz[@a >= 1] foo[string()=~ /^duh!+/] /foo[string(bar)=~ /\d+/]/baz[@att != 3] #CDATA can be used to call a handler for a CDATA section. #COMMENT can be used to call a handler for comments Some additional (non-XPath) expressions are also provided for convenience:

processing instructions
? or #PI triggers the handler for any processing instruction, and ?<target> or #PI <target> triggers a handler for processing instruction with the given target( ex: #PI xml-stylesheet).

level(<level>)
Triggers the handler on any element at that level in the tree (root is level 1)

_all_
Triggers the handler for all elements in the tree

_default_
Triggers the handler for each element that does NOT have any other handler.

Expressions are evaluated against the input document. Which means that even if you have changed the tag of an element (changing the tag of a parent element from a handler for example) the change will not impact the expression evaluation. There is an exception to this: “private” attributes (which name start with a ‘#’, and can only be created during the parsing, as they are not valid XML) are checked against the current twig. Handlers are triggered in fixed order, sorted by their type (xpath expressions first, then regexps, then level), then by whether they specify a full path (starting at the root element) or not, then by number of steps in the expression, then number of predicates, then number of tests in predicates. Handlers where the last step does not specify a step (foo/bar/*) are triggered after other XPath handlers. Finally _all_ handlers are triggered last. Important: once a handler has been triggered if it returns 0 then no other handler is called, except a _all_ handler which will be called anyway. If a handler returns a true value and other handlers apply, then the next applicable handler will be called. Repeat, rinse, lather..; The exception to that rule is when the do_not_chain_handlers option is set, in which case only the first handler will be called. Note that it might be a good idea to explicitly return a short true value (like 1) from handlers: this ensures that other applicable handlers are called even if the last statement for the handler happens to evaluate to false. This might also speedup the code by avoiding the result of the last statement of the code to be copied and passed to the code managing handlers. It can really pay to have 1 instead of a long string returned. When the closing tag for an element is parsed the corresponding handler is called, with 2 arguments: the twig and the Element . The twig includes the document tree that has been built so far, the element is the complete sub-tree for the element. The fact that the handler is called only when the closing tag for the element is found means that handlers for inner elements are called before handlers for outer elements. $_ is also set to the element, so it is easy to write inline handlers like para => sub { $_->set_tag( p); } Text is stored in elements whose tag name is #PCDATA (due to mixed content, text and sub-element in an element there is no way to store the text as just an attribute of the enclosing element, this is similar to the DOM model). Warning: if you have used purge or flush on the twig the element might not be complete, some of its children might have been entirely flushed or purged, and the start tag might even have been printed (by flush) already, so changing its tag might not give the expected result.

twig_roots
This argument lets you build the tree only for those elements you are interested in. Example: my $t= XML::Twig->new( twig_roots => { title => 1, subtitle => 1}); $t->parsefile( file); my $t= XML::Twig->new( twig_roots => { section/title => 1}); $t->parsefile( file); return a twig containing a document including only title and subtitle elements, as children of the root element. You can use generic_attribute_condition, attribute_condition, full_path, partial_path, tag, tag_regexp, _default_ and _all_ to trigger the building of the twig. string_condition and regexp_condition cannot be used as the content of the element, and the string, have not yet been parsed when the condition is checked. WARNING: path are checked for the document. Even if the twig_roots option is used they will be checked against the full document tree, not the virtual tree created by XML::Twig WARNING: twig_roots elements should NOT be nested, that would hopelessly confuse XML::Twig ;–( Note: you can set handlers (twig_handlers) using twig_roots Example: my $t= XML::Twig->new( twig_roots => { title => sub { $_[1]->print;}, subtitle => \process_subtitle } ); $t->parsefile( file);

twig_print_outside_roots
To be used in conjunction with the twig_roots argument. When set to a true value this will print the document outside of the twig_roots elements. Example: my $t= XML::Twig->new( twig_roots => { title => \number_title }, twig_print_outside_roots => 1, ); $t->parsefile( file); { my $nb; sub number_title { my( $twig, $title); $nb++; $title->prefix( “$nb “); $title->print; } } This example prints the document outside of the title element, calls number_title for each title element, prints it, and then resumes printing the document. The twig is built only for the title elements. If the value is a reference to a file handle then the document outside the twig_roots elements will be output to this file handle: open( my $out, >, out_file.xml) or die “cannot open out file.xml out_file:$!”; my $t= XML::Twig->new( twig_roots => { title => \number_title }, # default output to $out twig_print_outside_roots => $out, ); { my $nb; sub number_title { my( $twig, $title); $nb++; $title->prefix( “$nb “); $title->print( $out); # you have to print to \OUT here } }

start_tag_handlers
A hash { expression = \handler}>. Sets element handlers that are called when the element is open (at the end of the XML::Parser Start handler). The handlers are called with 2 params: the twig and the element. The element is empty at that point, its attributes are created though. You can use generic_attribute_condition, attribute_condition, full_path, partial_path, tag, tag_regexp, _default_ and _all_ to trigger the handler. string_condition and regexp_condition cannot be used as the content of the element, and the string, have not yet been parsed when the condition is checked. The main uses for those handlers are to change the tag name (you might have to do it as soon as you find the open tag if you plan to flush the twig at some point in the element, and to create temporary attributes that will be used when processing sub-element with twig_hanlders. Note: start_tag handlers can be called outside of twig_roots if this argument is used. Since the element object is not built, in this case handlers are called with the following arguments: $t (the twig), $tag (the tag of the element) and %att (a hash of the attributes of the element). If the twig_print_outside_roots argument is also used, if the last handler called returns a true value, then the start tag will be output as it appeared in the original document, if the handler returns a false value then the start tag will not be printed (so you can print a modified string yourself for example). Note that you can use the ignore method in start_tag_handlers (and only there).

end_tag_handlers
A hash { expression = \handler}>. Sets element handlers that are called when the element is closed (at the end of the XML::Parser End handler). The handlers are called with 2 params: the twig and the tag of the element. twig_handlers are called when an element is completely parsed, so why have this redundant option? There is only one use for end_tag_handlers: when using the twig_roots option, to trigger a handler for an element outside the roots. It is for example very useful to number titles in a document using nested sections: my @no= (0); my $no; my $t= XML::Twig->new( start_tag_handlers => { section => sub { $no[$#no]++; $no= join ., @no; push @no, 0; } }, twig_roots => { title => sub { $_->prefix( $no); $_->print; } }, end_tag_handlers => { section => sub { pop @no; } }, twig_print_outside_roots => 1 ); $t->parsefile( $file); Using the end_tag_handlers argument without twig_roots will result in an error.

do_not_chain_handlers
If this option is set to a true value, then only one handler will be called for each element, even if several satisfy the condition Note that the _all_ handler will still be called regardless

ignore_elts
This option lets you ignore elements when building the twig. This is useful in cases where you cannot use twig_roots to ignore elements, for example if the element to ignore is a sibling of elements you are interested in. Example: my $twig= XML::Twig->new( ignore_elts => { elt => discard }); $twig->parsefile( doc.xml); This will build the complete twig for the document, except that all elt elements (and their children) will be left out. The keys in the hash are triggers, limited to the same subset as start_tag_handlers. The values can be discard, to discard the element, print, to output the element as-is, string to store the text of the ignored element(s), including markup, in a field of the twig: $t->{twig_buffered_string} or a reference to a scalar, in which case the text of the ignored element(s), including markup, will be stored in the scalar. Any other value will be treated as discard.

char_handler
A reference to a subroutine that will be called every time PCDATA is found. The subroutine receives the string as argument, and returns the modified string: # WE WANT ALL STRINGS IN UPPER CASE sub my_char_handler { my( $text)= @_; $text= uc( $text); return $text; }

elt_class
The name of a class used to store elements. this class should inherit from XML::Twig::Elt (and by default it is XML::Twig::Elt). This option is used to subclass the element class and extend it with new methods. This option is needed because during the parsing of the XML, elements are created by XML::Twig, without any control from the user code.

keep_atts_order
Setting this option to a true value causes the attribute hash to be tied to a Tie::IxHash object. This means that Tie::IxHash needs to be installed for this option to be available. It also means that the hash keeps its order, so you will get the attributes in order. This allows outputting the attributes in the same order as they were in the original document.

keep_encoding
This is a (slightly?) evil option: if the XML document is not UTF-8 encoded and you want to keep it that way, then setting keep_encoding will use theExpat original_string method for character, thus keeping the original encoding, as well as the original entities in the strings. See the t/test6.t test file to see what results you can expect from the various encoding options. WARNING: if the original encoding is multi-byte then attribute parsing will be EXTREMELY unsafe under any Perl before 5.6, as it uses regular expressions which do not deal properly with multi-byte characters. You can specify an alternate function to parse the start tags with the parse_start_tag option (see below) WARNING: this option is NOT used when parsing with XML::Parser non-blocking parser (parse_start, parse_more, parse_done methods) which you probably should not use with XML::Twig anyway as they are totally untested!

output_encoding
This option generates an output_filter using Encode, Text::Iconv or Unicode::Map8 and Unicode::Strings, and sets the encoding in the XML declaration. This is the easiest way to deal with encodings, if you need more sophisticated features, look at output_filter below

output_filter
This option is used to convert the character encoding of the output document. It is passed either a string corresponding to a predefined filter or a subroutine reference. The filter will be called every time a document or element is processed by the “print” functions (print, sprint, flush). Pre-defined filters:

latin1
uses either Encode, Text::Iconv or Unicode::Map8 and Unicode::String or a regexp (which works only with XML::Parser 2.27), in this order, to convert all characters to ISO-8859-15 (usually latin1 is synonym to ISO-8859-1, but in practice it seems that ISO-8859-15, which includes the euro sign, is more useful and probably what most people want).

html
does the same conversion as latin1, plus encodes entities using HTML::Entities (oddly enough you will need to have HTML::Entities installed for it to be available). This should only be used if the tags and attribute names themselves are in US-ASCII, or they will be converted and the output will not be valid XML any more

safe
converts the output to ASCII (US) only plus character entities (&#nnn;) this should be used only if the tags and attribute names themselves are in US-ASCII, or they will be converted and the output will not be valid XML any more

safe_hex
same as safe except that the character entities are in hex (&#xnnn;)

encode_convert ($encoding)
Return a subref that can be used to convert utf8 strings to $encoding). Uses Encode. my $conv = XML::Twig::encode_convert( latin1); my $t = XML::Twig->new(output_filter => $conv);

iconv_convert ($encoding)
this function is used to create a filter subroutine that will be used to convert the characters to the target encoding using Text::Iconv (which needs to be installed, look at the documentation for the module and for the iconv library to find out which encodings are available on your system, iconv -l should give you a list of available encodings) my $conv = XML::Twig::iconv_convert( latin1); my $t = XML::Twig->new(output_filter => $conv);

unicode_convert ($encoding)
this function is used to create a filter subroutine that will be used to convert the characters to the target encoding using Unicode::Strings and Unicode::Map8 (which need to be installed, look at the documentation for the modules to find out which encodings are available on your system) my $conv = XML::Twig::unicode_convert( latin1); my $t = XML::Twig->new(output_filter => $conv);

The text and att methods do not use the filter, so their result are always in unicode. Those predeclared filters are based on subroutines that can be used by themselves (as XML::Twig::foo).

html_encode ($string)
Use HTML::Entities to encode a utf8 string

safe_encode ($string)
Use either a regexp (perl < 5.8) or Encode to encode non-ascii characters in the string in &#<nnnn>; format

safe_encode_hex ($string)
Use either a regexp (perl < 5.8) or Encode to encode non-ascii characters in the string in &#x<nnnn>; format

regexp2latin1 ($string)
Use a regexp to encode a utf8 string into latin 1 (ISO-8859-1). Does not work with Perl 5.8.0!

output_text_filter
same as output_filter, except it doesn’t apply to the brackets and quotes around attribute values. This is useful for all filters that could change the tagging, basically anything that does not just change the encoding of the output. html, safe and safe_hex are better used with this option.

input_filter
This option is similar to output_filter except the filter is applied to the characters before they are stored in the twig, at parsing time.

remove_cdata
Setting this option to a true value will force the twig to output CDATA sections as regular (escaped) PCDATA

parse_start_tag
If you use the keep_encoding option then this option can be used to replace the default parsing function. You should provide a coderef (a reference to a subroutine) as the argument, this subroutine takes the original tag (given by XML::Parser::Expat original_string() method) and returns a tag and the attributes in a hash (or in a list attribute_name/attribute value).

no_xxe
prevents external entities to be parsed. This is a security feature, in case the input XML cannot be trusted. With this option set to a true value defining external entities in the document will cause the parse to fail. This prevents an entity like <!ENTITY xxe PUBLIC "bar" "/etc/passwd"> to make the password fiel available in the document.

expand_external_ents
When this option is used external entities (that are defined) are expanded when the document is output using “print” functions such as print , sprint , flush and xml_string . Note that in the twig the entity will be stored as an element with a tag ‘#ENT’, the entity will not be expanded there, so you might want to process the entities before outputting it. If an external entity is not available, then the parse will fail. A special case is when the value of this option is -1. In that case a missing entity will not cause the parser to die, but its name, sysid and pubid will be stored in the twig as $twig->{twig_missing_system_entities} (a reference to an array of hashes { name => <name>, sysid => <sysid>, pubid => <pubid> }). Yes, this is a bit of a hack, but it’s useful in some cases. WARNING: setting expand_external_ents to 0 or -1 currently doesn’t work as expected; cf. <https://rt.cpan.org/Public/Bug/Display.html?id=118097>. To completelty turn off expanding external entities use no_xxe.

no_xxe
If this argument is set to a true value, expanding of external entities is turned off.

load_DTD
If this argument is set to a true value, parse or parsefile on the twig will load the DTD information. This information can then be accessed through the twig, in a DTD_handler for example. This will load even an external DTD. Default and fixed values for attributes will also be filled, based on the DTD. Note that to do this the module will generate a temporary file in the current directory. If this is a problem let me know and I will add an option to specify an alternate directory. See “DTD Handling” for more information

DTD_base <path_to_DTD_directory>
If the DTD is in a different directory, looks for it there, useful to make up somewhat for the lack of catalog support in expat. You still need a SYSTEM declaration

DTD_handler
Set a handler that will be called once the doctype (and the DTD) have been loaded, with 2 arguments, the twig and the DTD.

no_prolog
Does not output a prolog (XML declaration and DTD)

id
This optional argument gives the name of an attribute that can be used as an ID in the document. Elements whose ID is known can be accessed through the elt_id method. id defaults to ‘id’. See BUGS

discard_spaces
If this optional argument is set to a true value then spaces are discarded when they look non-significant: strings containing only spaces and at least one line feed are discarded. This argument is set to true by default. The exact algorithm to drop spaces is: strings including only spaces (perl \s) and at least one right before an open or close tag are dropped.

discard_all_spaces
If this argument is set to a true value, spaces are discarded more aggressively than with discard_spaces: strings not including a are also dropped. This option is appropriate for data-oriented XML.

keep_spaces
If this optional argument is set to a true value then all spaces in the document are kept, and stored as PCDATA. Warning: adding this option can result in changes in the twig generated: space that was previously discarded might end up in a new text element. see the difference by calling the following code with 0 and 1 as arguments: perl -MXML::Twig -eprint XML::Twig->new( keep_spaces => shift)->parse( “<d> <e/></d>”)->_dump keep_spaces and discard_spaces cannot be both set.

discard_spaces_in
This argument sets keep_spaces to true but will cause the twig builder to discard spaces in the elements listed. The syntax for using this argument is: XML::Twig->new( discard_spaces_in => [ elt1, elt2]);

keep_spaces_in
This argument sets discard_spaces to true but will cause the twig builder to keep spaces in the elements listed. The syntax for using this argument is: XML::Twig->new( keep_spaces_in => [ elt1, elt2]); Warning: adding this option can result in changes in the twig generated: space that was previously discarded might end up in a new text element.

pretty_print
Set the pretty print method, amongst ‘none’ (default), ‘nsgmls’, ‘nice’, ‘indented’, ‘indented_c’, ‘indented_a’, ‘indented_close_tag’, ‘cvs’, ‘wrapped’, ‘record’ and ‘record_c’ pretty_print formats:

none
The document is output as one ling string, with no line breaks except those found within text elements

nsgmls
Line breaks are inserted in safe places: that is within tags, between a tag and an attribute, between attributes and before the > at the end of a tag. This is quite ugly but better than none, and it is very safe, the document will still be valid (conforming to its DTD). This is how the SGML parser sgmls splits documents, hence the name.

nice
This option inserts line breaks before any tag that does not contain text (so element with textual content are not broken as the is the significant). WARNING: this option leaves the document well-formed but might make it invalid (not conformant to its DTD). If you have elements declared as <!ELEMENT foo (#PCDATA|bar)> then a foo element including a bar one will be printed as <foo> <bar>bar is just pcdata</bar> </foo> This is invalid, as the parser will take the line break after the foo tag as a sign that the element contains PCDATA, it will then die when it finds the bar tag. This may or may not be important for you, but be aware of it!

indented
Same as nice (and with the same warning) but indents elements according to their level

indented_c
Same as indented but a little more compact: the closing tags are on the same line as the preceding text

indented_close_tag
Same as indented except that the closing tag is also indented, to line up with the tags within the element

idented_a
This formats XML files in a line-oriented version control friendly way. The format is described in <http://tinyurl.com/2kwscq> (that’s an Oracle document with an insanely long URL). Note that to be totaly conformant to the “spec”, the order of attributes should not be changed, so if they are not already in alphabetical order you will need to use the keep_atts_order option.

cvs
Same as idented_a.

wrapped
Same as indented_c but lines are wrapped using Text::Wrap::wrap. The default length for lines is the default for $Text::Wrap::columns, and can be changed by changing that variable.

record
This is a record-oriented pretty print, that display data in records, one field per line (which looks a LOT like indented)

record_c
Stands for record compact, one record per line

empty_tags
Set the empty tag display style (’normal’, ‘html’ or ‘expand’). normal outputs an empty tag ‘<tag/>’, html adds a space ‘<tag />’ for elements that can be empty in XHTML and expand outputs ‘<tag></tag>

quote
Set the quote character for attributes (’single’ or ‘double’).

escape_gt
By default XML::Twig does not escape the character > in its output, as it is not mandated by the XML spec. With this option on, > will be replaced by &gt;

comments
Set the way comments are processed: ‘drop’ (default), ‘keep’ or ‘process’ Comments processing options:

drop
drops the comments, they are not read, nor printed to the output

keep
comments are loaded and will appear on the output, they are not accessible within the twig and will not interfere with processing though Note: comments in the middle of a text element such as <p>text <!– comment –> more text –></p> are kept at their original position in the text. Using “print” methods like print or sprint will return the comments in the text. Using text or field on the other hand will not. Any use of set_pcdata on the #PCDATA element (directly or through other methods like set_content) will delete the comment(s).

process
comments are loaded in the twig and will be treated as regular elements (their tag is #COMMENT) this can interfere with processing if you expect $elt->{first_child} to be an element but find a comment there. Validation will not protect you from this as comments can happen anywhere. You can use $elt->first_child( tag) (which is a good habit anyway) to get where you want. Consider using process if you are outputting SAX events from XML::Twig.

pi
Set the way processing instructions are processed: ‘drop’, ‘keep’ (default) or ‘process’ Note that you can also set PI handlers in the twig_handlers option: ? => \handler ?target => \handler 2 The handlers will be called with 2 parameters, the twig and the PI element if pi is set to process, and with 3, the twig, the target and the data if pi is set to keep. Of course they will not be called if pi is set to drop. If pi is set to keep the handler should return a string that will be used as-is as the PI text (it should look like “ <?target data? >” or ’’ if you want to remove the PI), Only one handler will be called, ?target or ? if no specific handler for that target is available.

map_xmlns
This option is passed a hashref that maps uri’s to prefixes. The prefixes in the document will be replaced by the ones in the map. The mapped prefixes can (actually have to) be used to trigger handlers, navigate or query the document. Here is an example: my $t= XML::Twig->new( map_xmlns => {http://www.w3.org/2000/svg => “svg”}, twig_handlers => { svg:circle => sub { $_->set_att( r => 20) } }, pretty_print => indented, ) ->parse( <doc xmlns:gr=“http://www.w3.org/2000/svg"> <gr:circle cx=“10” cy=“90” r=“10”/> </doc> ) ->print; This will output: <doc xmlns:svg=“http://www.w3.org/2000/svg"> <svg:circle cx=“10” cy=“90” r=“20”/> </doc>

keep_original_prefix
When used with map_xmlns this option will make XML::Twig use the original namespace prefixes when outputting a document. The mapped prefix will still be used for triggering handlers and in navigation and query methods. my $t= XML::Twig->new( map_xmlns => {http://www.w3.org/2000/svg => “svg”}, twig_handlers => { svg:circle => sub { $_->set_att( r => 20) } }, keep_original_prefix => 1, pretty_print => indented, ) ->parse( <doc xmlns:gr=“http://www.w3.org/2000/svg"> <gr:circle cx=“10” cy=“90” r=“10”/> </doc> ) ->print; This will output: <doc xmlns:gr=“http://www.w3.org/2000/svg"> <gr:circle cx=“10” cy=“90” r=“20”/> </doc>

original_uri ($prefix)
called within a handler, this will return the uri bound to the namespace prefix in the original document.

index ($arrayref or $hashref)
This option creates lists of specific elements during the parsing of the XML. It takes a reference to either a list of triggering expressions or to a hash name => expression, and for each one generates the list of elements that match the expression. The list can be accessed through the index method. example: # using an array ref my $t= XML::Twig->new( index => [ div, table ]) ->parsefile( “foo.xml”); my $divs= $t->index( div); my $first_div= $divs->[0]; my $last_table= $t->index( table => -1); # using a hashref to name the indexes my $t= XML::Twig->new( index => { email => a[@href=~/^ \s*mailto:/]}) ->parsefile( “foo.xml”); my $last_emails= $t->index( email => -1); Note that the index is not maintained after the parsing. If elements are deleted, renamed or otherwise hurt during processing, the index is NOT updated. (changing the id element OTOH will update the index)

att_accessors <list of attribute names>
creates methods that give direct access to attribute: my $t= XML::Twig->new( att_accessors => [ href, src]) ->parsefile( $file); my $first_href= $t->first_elt( img)->src; # same as ->att( src) $t->first_elt( img)->src( new_logo.png) # changes the attribute value

elt_accessors
creates methods that give direct access to the first child element (in scalar context) or the list of elements (in list context): the list of accessors to create can be given 1 2 different ways: in an array, or in a hash alias => expression my $t= XML::Twig->new( elt_accessors => [ ‘head’]) ->parsefile( $file); my $title_text= $t->root->head->field( ’title’); # same as $title_text= $t->root->first_child( ‘head’)->field( ’title’); my $t= XML::Twig->new( elt_accessors => { warnings => p[@class=“warning”], d2 => div[2]}, ) ->parsefile( $file); my $body= $t->first_elt( body); my @warnings= $body->warnings; # same as $body->children( p[@class=“warning”]); my $s2= $body->d2; # same as $body->first_child( div[2])

field_accessors
creates methods that give direct access to the first child element text: my $t= XML::Twig->new( field_accessors => [ h1]) ->parsefile( $file); my $div_title_text= $t->first_elt( div)->title; # same as $title_text= $t->first_elt( div)->field( title);

use_tidy
set this option to use HTML::Tidy instead of HTML::TreeBuilder to convert HTML to XML. HTML, especially real (real “crap”) HTML found in the wild, so depending on the data, one module or the other does a better job at the conversion. Also, HTML::Tidy can be a bit difficult to install, so XML::Twig offers both option. TIMTOWTDI

output_html_doctype
when using HTML::TreeBuilder to convert HTML, this option causes the DOCTYPE declaration to be output, which may be important for some legacy browsers. Without that option the DOCTYPE definition is NOT output. Also if the definition is completely wrong (ie not easily parsable), it is not output either.

Note: I _HATE_ the Java-like name of arguments used by most XML modules. So in pure TIMTOWTDI fashion all arguments can be written either as UglyJavaLikeName or as readable_perl_name: twig_print_outside_roots or TwigPrintOutsideRoots (or even twigPrintOutsideRoots {shudder}). XML::Twig normalizes them before processing them.

parse ( $source)
The $source parameter should either be a string containing the whole XML document, or it should be an open IO::Handle (aka a filehandle). A die call is thrown if a parse error occurs. Otherwise it will return the twig built by the parse. Use safe_parse if you want the parsing to return even when an error occurs. If this method is called as a class method (XML::Twig->parse( $some_xml_or_html)) then an XML::Twig object is created, using the parameters except the last one (eg XML::Twig->parse( pretty_print => indented, $some_xml_or_html)) and xparse is called on it. Note that when parsing a filehandle, the handle should NOT be open with an encoding (ie open with open( my $in, <, $filename). The file will be parsed by expat, so specifying the encoding actually causes problems for the parser (as in: it can crash it, see https://rt.cpan.org/Ticket/Display.html?id=78877). For parsing a file it is actually recommended to use parsefile on the file name, instead of <parse> on the open file.

parsestring
This is just an alias for parse for backwards compatibility.

parsefile (FILE [, OPT => OPT_VALUE […]])
Open FILE for reading, then call parse with the open handle. The file is closed no matter how parse returns. A die call is thrown if a parse error occurs. Otherwise it will return the twig built by the parse. Use safe_parsefile if you want the parsing to return even when an error occurs.

parsefile_inplace ( $file, $optional_extension)
Parse and update a file “in place”. It does this by creating a temp file, selecting it as the default for print() statements (and methods), then parsing the input file. If the parsing is successful, then the temp file is moved to replace the input file. If an extension is given then the original file is backed-up (the rules for the extension are the same as the rule for the -i option in perl).

parsefile_html_inplace ( $file, $optional_extension)
Same as parsefile_inplace, except that it parses HTML instead of XML

parseurl ($url $optional_user_agent)
Gets the data from $url and parse it. The data is piped to the parser in chunks the size of the XML::Parser::Expat buffer, so memory consumption and hopefully speed are optimal. For most (read “small”) XML it is probably as efficient (and easier to debug) to just get the XML file and then parse it as a string. use XML::Twig; use LWP::Simple; my $twig= XML::Twig->new(); $twig->parse( LWP::Simple::get( $URL )); or use XML::Twig; my $twig= XML::Twig->nparse( $URL); If the $optional_user_agent argument is used then it is used, otherwise a new one is created.

safe_parse ( SOURCE [, OPT => OPT_VALUE […]])
This method is similar to parse except that it wraps the parsing in an eval block. It returns the twig on success and 0 on failure (the twig object also contains the parsed twig). $@ contains the error message on failure. Note that the parsing still stops as soon as an error is detected, there is no way to keep going after an error.

safe_parsefile (FILE [, OPT => OPT_VALUE […]])
This method is similar to parsefile except that it wraps the parsing in an eval block. It returns the twig on success and 0 on failure (the twig object also contains the parsed twig) . $@ contains the error message on failure Note that the parsing still stops as soon as an error is detected, there is no way to keep going after an error.

safe_parseurl ($url $optional_user_agent)
Same as parseurl except that it wraps the parsing in an eval block. It returns the twig on success and 0 on failure (the twig object also contains the parsed twig) . $@ contains the error message on failure

parse_html ($string_or_fh)
parse an HTML string or file handle (by converting it to XML using HTML::TreeBuilder, which needs to be available). This works nicely, but some information gets lost in the process: newlines are removed, and (at least on the version I use), comments get an extra CDATA section inside ( <!– foo –> becomes <!– <![CDATA[ foo ]]> –>

parsefile_html ($file)
parse an HTML file (by converting it to XML using HTML::TreeBuilder, which needs to be available, or HTML::Tidy if the use_tidy option was used). The file is loaded completely in memory and converted to XML before being parsed. this method is to be used with caution though, as it doesn’t know about the file encoding, it is usually better to use parse_html, which gives you a chance to open the file with the proper encoding layer.

parseurl_html ($url $optional_user_agent)
parse an URL as html the same way parse_html does

safe_parseurl_html ($url $optional_user_agent)
Same as parseurl_html> except that it wraps the parsing in an eval block. It returns the twig on success and 0 on failure (the twig object also contains the parsed twig) . $@ contains the error message on failure

safe_parsefile_html ($file $optional_user_agent)
Same as parsefile_html> except that it wraps the parsing in an eval block. It returns the twig on success and 0 on failure (the twig object also contains the parsed twig) . $@ contains the error message on failure

safe_parse_html ($string_or_fh)
Same as parse_html except that it wraps the parsing in an eval block. It returns the twig on success and 0 on failure (the twig object also contains the parsed twig) . $@ contains the error message on failure

xparse ($thing_to_parse)
parse the $thing_to_parse, whether it is a filehandle, a string, an HTML file, an HTML URL, an URL or a file. Note that this is mostly a convenience method for one-off scripts. For example files that end in ‘.htm’ or ‘.html’ are parsed first as XML, and if this fails as HTML. This is certainly not the most efficient way to do this in general.

nparse ($optional_twig_options, $thing_to_parse)
create a twig with the $optional_options, and parse the $thing_to_parse, whether it is a filehandle, a string, an HTML file, an HTML URL, an URL or a file. Examples: XML::Twig->nparse( “file.xml”); XML::Twig->nparse( error_context => 1, “file://file.xml”);

nparse_pp ($optional_twig_options, $thing_to_parse)
same as nparse but also sets the pretty_print option to indented.

nparse_e ($optional_twig_options, $thing_to_parse)
same as nparse but also sets the error_context option to 1.

nparse_ppe ($optional_twig_options, $thing_to_parse)
same as nparse but also sets the pretty_print option to indented and the error_context option to 1.

parser
This method returns the expat object (actually the XML::Parser::Expat object) used during parsing. It is useful for example to call XML::Parser::Expat methods on it. To get the line of a tag for example use $t->parser->current_line.

setTwigHandlers ($handlers)
Set the twig_handlers. $handlers is a reference to a hash similar to the one in the twig_handlers option of new. All previous handlers are unset. The method returns the reference to the previous handlers.

setTwigHandler ($exp $handler)
Set a single twig_handler for elements matching $exp. $handler is a reference to a subroutine. If the handler was previously set then the reference to the previous handler is returned.

setStartTagHandlers ($handlers)
Set the start_tag handlers. $handlers is a reference to a hash similar to the one in the start_tag_handlers option of new. All previous handlers are unset. The method returns the reference to the previous handlers.

setStartTagHandler ($exp $handler)
Set a single start_tag handlers for elements matching $exp. $handler is a reference to a subroutine. If the handler was previously set then the reference to the previous handler is returned.

setEndTagHandlers ($handlers)
Set the end_tag handlers. $handlers is a reference to a hash similar to the one in the end_tag_handlers option of new. All previous handlers are unset. The method returns the reference to the previous handlers.

setEndTagHandler ($exp $handler)
Set a single end_tag handlers for elements matching $exp. $handler is a reference to a subroutine. If the handler was previously set then the reference to the previous handler is returned.

setTwigRoots ($handlers)
Same as using the twig_roots option when creating the twig

setCharHandler ($exp $handler)
Set a char_handler

setIgnoreEltsHandler ($exp)
Set a ignore_elt handler (elements that match $exp will be ignored

setIgnoreEltsHandlers ($exp)
Set all ignore_elt handlers (previous handlers are replaced)

dtd
Return the dtd (an XML::Twig::DTD object) of a twig

xmldecl
Return the XML declaration for the document, or a default one if it doesn’t have one

doctype
Return the doctype for the document

doctype_name
returns the doctype of the document from the doctype declaration

system_id
returns the system value of the DTD of the document from the doctype declaration

public_id
returns the public doctype of the document from the doctype declaration

internal_subset
returns the internal subset of the DTD

dtd_text
Return the DTD text

dtd_print
Print the DTD

model ($tag)
Return the model (in the DTD) for the element $tag

root
Return the root element of a twig

set_root ($elt)
Set the root of a twig

first_elt ($optional_condition)
Return the first element matching $optional_condition of a twig, if no condition is given then the root is returned

last_elt ($optional_condition)
Return the last element matching $optional_condition of a twig, if no condition is given then the last element of the twig is returned

elt_id ($id)
Return the element whose id attribute is $id

getEltById
Same as elt_id

index ($index_name, $optional_index)
If the $optional_index argument is present, return the corresponding element in the index (created using the index option for XML::Twig-new>) If the argument is not present, return an arrayref to the index

normalize
merge together all consecutive pcdata elements in the document (if for example you have turned some elements into pcdata using erase, this will give you a “clean” document in which there all text elements are as long as possible).

encoding
This method returns the encoding of the XML document, as defined by the encoding attribute in the XML declaration (ie it is undef if the attribute is not defined)

set_encoding
This method sets the value of the encoding attribute in the XML declaration. Note that if the document did not have a declaration it is generated (with an XML version of 1.0)

xml_version
This method returns the XML version, as defined by the version attribute in the XML declaration (ie it is undef if the attribute is not defined)

set_xml_version
This method sets the value of the version attribute in the XML declaration. If the declaration did not exist it is created.

standalone
This method returns the value of the standalone declaration for the document

set_standalone
This method sets the value of the standalone attribute in the XML declaration. Note that if the document did not have a declaration it is generated (with an XML version of 1.0)

set_output_encoding
Set the encoding “attribute” in the XML declaration

set_doctype ($name, $system, $public, $internal)
Set the doctype of the element. If an argument is undef (or not present) then its former value is retained, if a false (’’ or 0) value is passed then the former value is deleted;

entity_list
Return the entity list of a twig

entity_names
Return the list of all defined entities

entity ($entity_name)
Return the entity

notation_list
Return the notation list of a twig

notation_names
Return the list of all defined notations

notation ($notation_name)
Return the notation

change_gi ($old_gi, $new_gi)
Performs a (very fast) global change. All elements $old_gi are now $new_gi. This is a bit dangerous though and should be avoided if < possible, as the new tag might be ignored in subsequent processing. See BUGS

flush ($optional_filehandle, %options)
Flushes a twig up to (and including) the current element, then deletes all unnecessary elements from the tree that’s kept in memory. flush keeps track of which elements need to be open/closed, so if you flush from handlers you don’t have to worry about anything. Just keep flushing the twig every time you’re done with a sub-tree and it will come out well-formed. After the whole parsing don’t forget toflush one more time to print the end of the document. The doctype and entity declarations are also printed. flush take an optional filehandle as an argument. If you use flush at any point during parsing, the document will be flushed one last time at the end of the parsing, to the proper filehandle. options: use the update_DTD option if you have updated the (internal) DTD and/or the entity list and you want the updated DTD to be output The pretty_print option sets the pretty printing of the document. Example: $t->flush( Update_DTD => 1); $t->flush( $filehandle, pretty_print => indented); $t->flush( \FILE);

flush_up_to ($elt, $optional_filehandle, %options)
Flushes up to the $elt element. This allows you to keep part of the tree in memory when you flush. options: see flush.

purge
Does the same as a flush except it does not print the twig. It just deletes all elements that have been completely parsed so far.

purge_up_to ($elt)
Purges up to the $elt element. This allows you to keep part of the tree in memory when you purge.

print ($optional_filehandle, %options)
Prints the whole document associated with the twig. To be used only AFTER the parse. options: see flush.

print_to_file ($filename, %options)
Prints the whole document associated with the twig to file $filename. To be used only AFTER the parse. options: see flush.

safe_print_to_file ($filename, %options)
Prints the whole document associated with the twig to file $filename. This variant, which probably only works on *nix prints to a temp file, then move the temp file to overwrite the original file. This is a bit safer when 2 processes an potentiallywrite the same file: only the last one will succeed, but the file won’t be corruted. I often use this for cron jobs, so testing the code doesn’t interfere with the cron job running at the same time. options: see flush.

sprint
Return the text of the whole document associated with the twig. To be used only AFTER the parse. options: see flush.

trim
Trim the document: gets rid of initial and trailing spaces, and replaces multiple spaces by a single one.

toSAX1 ($handler)
Send SAX events for the twig to the SAX1 handler $handler

toSAX2 ($handler)
Send SAX events for the twig to the SAX2 handler $handler

flush_toSAX1 ($handler)
Same as flush, except that SAX events are sent to the SAX1 handler $handler instead of the twig being printed

flush_toSAX2 ($handler)
Same as flush, except that SAX events are sent to the SAX2 handler $handler instead of the twig being printed

ignore
This method should be called during parsing, usually in start_tag_handlers. It causes the element to be skipped during the parsing: the twig is not built for this element, it will not be accessible during parsing or after it. The element will not take up any memory and parsing will be faster. Note that this method can also be called on an element. If the element is a parent of the current element then this element will be ignored (the twig will not be built any more for it and what has already been built will be deleted).

set_pretty_print ($style)
Set the pretty print method, amongst ‘none’ (default), ‘nsgmls’, ‘nice’, ‘indented’, indented_c, ‘wrapped’, ‘record’ and ‘record_cWARNING: the pretty print style is a GLOBAL variable, so once set it’s applied to ALL print’s (and sprint’s). Same goes if you use XML::Twig with mod_perl . This should not be a problem as the XML that’s generated is valid anyway, and XML processors (as well as HTML processors, including browsers) should not care. Let me know if this is a big problem, but at the moment the performance/cleanliness trade-off clearly favors the global approach.

set_empty_tag_style ($style)
Set the empty tag display style (’normal’, ‘html’ or ‘expand’). As with set_pretty_print this sets a global flag. normal outputs an empty tag ‘<tag/>’, html adds a space ‘<tag />’ for elements that can be empty in XHTML and expand outputs ‘<tag></tag>

set_remove_cdata ($flag)
set (or unset) the flag that forces the twig to output CDATA sections as regular (escaped) PCDATA

print_prolog ($optional_filehandle, %options)
Prints the prolog (XML declaration + DTD + entity declarations) of a document. options: see flush.

prolog ($optional_filehandle, %options)
Return the prolog (XML declaration + DTD + entity declarations) of a document. options: see flush.

finish
Call Expat finish method. Unsets all handlers (including internal ones that set context), but expat continues parsing to the end of the document or until it finds an error. It should finish up a lot faster than with the handlers set.

finish_print
Stops twig processing, flush the twig and proceed to finish printing the document as fast as possible. Use this method when modifying a document and the modification is done.

finish_now
Stops twig processing, does not finish parsing the document (which could actually be not well-formed after the point where finish_now is called). Execution resumes after the Lparse> or parsefile call. The content of the twig is what has been parsed so far (all open elements at the time finish_now is called are considered closed).

set_expand_external_entities
Same as using the expand_external_ents option when creating the twig

set_input_filter
Same as using the input_filter option when creating the twig

set_keep_atts_order
Same as using the keep_atts_order option when creating the twig

set_keep_encoding
Same as using the keep_encoding option when creating the twig

escape_gt
usually XML::Twig does not escape > in its output. Using this option makes it replace > by >

do_not_escape_gt
reverts XML::Twig behavior to its default of not escaping > in its output.

set_output_filter
Same as using the output_filter option when creating the twig

set_output_text_filter
Same as using the output_text_filter option when creating the twig

add_stylesheet ($type, @options)
Adds an external stylesheet to an XML document. Supported types and options:

xsl
option: the url of the stylesheet Example: $t->add_stylesheet( xsl => “xsl_style.xsl”); will generate the following PI at the beginning of the document: <?xml-stylesheet type=“text/xsl” href=“xsl_style.xsl”?>

css
option: the url of the stylesheet

active_twig
a class method that returns the last processed twig, so you don’t necessarily need the object to call methods on it.

Methods inherited from XML::Parser::Expat
A twig inherits all the relevant methods from XML::Parser::Expat. These methods can only be used during the parsing phase (they will generate a fatal error otherwise). Inherited methods are:

depth
Returns the size of the context list.

in_element
Returns true if NAME is equal to the name of the innermost currently opened element. If namespace processing is being used and you want to check against a name that may be in a namespace, then use the generate_ns_name method to create the NAME argument.

within_element
Returns the number of times the given name appears in the context list. If namespace processing is being used and you want to check against a name that may be in a namespace, then use the generate_ns_name method to create the NAME argument.

context
Returns a list of element names that represent open elements, with the last one being the innermost. Inside start and end tag handlers, this will be the tag of the parent element.

current_line
Returns the line number of the current position of the parse.

current_column
Returns the column number of the current position of the parse.

current_byte
Returns the current position of the parse.

position_in_context
Returns a string that shows the current parse position. LINES should be an integer >= 0 that represents the number of lines on either side of the current parse line to place into the returned string.

base ([NEWBASE])
Returns the current value of the base for resolving relative URIs. If NEWBASE is supplied, changes the base to that value.

current_element
Returns the name of the innermost currently opened element. Inside start or end handlers, returns the parent of the element associated with those tags.

element_index
Returns an integer that is the depth-first visit order of the current element. This will be zero outside of the root element. For example, this will return 1 when called from the start handler for the root element start tag.

recognized_string
Returns the string from the document that was recognized in order to call the current handler. For instance, when called from a start handler, it will give us the start-tag string. The string is encoded in UTF-8. This method doesn’t return a meaningful string inside declaration handlers.

original_string
Returns the verbatim string from the document that was recognized in order to call the current handler. The string is in the original document encoding. This method doesn’t return a meaningful string inside declaration handlers.

xpcroak
Concatenate onto the given message the current line number within the XML document plus the message implied by ErrorContext. Then croak with the formed message.

xpcarp
Concatenate onto the given message the current line number within the XML document plus the message implied by ErrorContext. Then carp with the formed message.

xml_escape(TEXT [, CHAR [, CHAR …]])
Returns TEXT with markup characters turned into character entities. Any additional characters provided as arguments are also turned into character references where found in TEXT. (this method is broken on some versions of expat/XML::Parser)

path ( $optional_tag)
Return the element context in a form similar to XPath’s short form: ‘/root/tag1/../tag

get_xpath ( $optional_array_ref, $xpath, $optional_offset)
Performs a get_xpath on the document root (see <Elt|“Elt”>) If the $optional_array_ref argument is used the array must contain elements. The $xpath expression is applied to each element in turn and the result is union of all results. This way a first query can be refined in further steps.

find_nodes ( $optional_array_ref, $xpath, $optional_offset)
same as get_xpath

findnodes ( $optional_array_ref, $xpath, $optional_offset)
same as get_xpath (similar to the XML::LibXML method)

findvalue ( $optional_array_ref, $xpath, $optional_offset)
Return the join of all texts of the results of applying get_xpath to the node (similar to the XML::LibXML method)

findvalues ( $optional_array_ref, $xpath, $optional_offset)
Return an array of all texts of the results of applying get_xpath to the node

subs_text ($regexp, $replace)
subs_text does text substitution on the whole document, similar to perl’s s/// operator.

dispose
Useful only if you don’t have Scalar::Util or WeakRef installed. Reclaims properly the memory used by an XML::Twig object. As the object has circular references it never goes out of scope, so if you want to parse lots of XML documents then the memory leak becomes a problem. Use $twig->dispose to clear this problem.

att_accessors (list_of_attribute_names)
A convenience method that creates l-valued accessors for attributes. So $twig->create_accessors( foo) will create a foo method that can be called on elements: $elt->foo; # equivalent to $elt->{att}->{foo}; $elt->foo( bar); # equivalent to $elt->set_att( foo => bar); The methods are l-valued only under those perl’s that support this feature (5.6 and above)

create_accessors (list_of_attribute_names)
Same as att_accessors

elt_accessors (list_of_attribute_names)
A convenience method that creates accessors for elements. So $twig->create_accessors( foo) will create a foo method that can be called on elements: $elt->foo; # equivalent to $elt->first_child( foo);

field_accessors (list_of_attribute_names)
A convenience method that creates accessors for element values (field). So $twig->create_accessors( foo) will create a foo method that can be called on elements: $elt->foo; # equivalent to $elt->field( foo);

set_do_not_escape_amp_in_atts
An evil method, that I only document because Test::Pod::Coverage complaints otherwise, but really, you don’t want to know about it.

XML::Twig::Elt

new ($optional_tag, $optional_atts, @optional_content)
The tag is optional (but then you can’t have a content ), the $optional_atts argument is a reference to a hash of attributes, the content can be just a string or a list of strings and element. A content of ‘#EMPTY’ creates an empty element; Examples: my $elt= XML::Twig::Elt->new(); my $elt= XML::Twig::Elt->new( para => { align => center }); my $elt= XML::Twig::Elt->new( para => { align => center }, foo); my $elt= XML::Twig::Elt->new( br => #EMPTY); my $elt= XML::Twig::Elt->new( para); my $elt= XML::Twig::Elt->new( para => this is a para); my $elt= XML::Twig::Elt->new( para => $elt3, another para); The strings are not parsed, the element is not attached to any twig. WARNING: if you rely on ID’s then you will have to set the id yourself. At this point the element does not belong to a twig yet, so the ID attribute is not known so it won’t be stored in the ID list. Note that #COMMENT, #PCDATA or #CDATA are valid tag names, that will create text elements. To create an element foo containing a CDATA section: my $foo= XML::Twig::Elt->new( #CDATA => “content of the CDATA section”) ->wrap_in( foo); An attribute of ‘#CDATA’, will create the content of the element as CDATA: my $elt= XML::Twig::Elt->new( p => { #CDATA => 1}, foo < bar); creates an element <p><![CDATA[foo < bar]]></>

parse ($string, %args)
Creates an element from an XML string. The string is actually parsed as a new twig, then the root of that twig is returned. The arguments in %args are passed to the twig. As always if the parse fails the parser will die, so use an eval if you want to trap syntax errors. As obviously the element does not exist beforehand this method has to be called on the class: my $elt= parse XML::Twig::Elt( “<a> string to parse, with <sub/> <elements>, actually tons of </elements> h</a>”);

set_inner_xml ($string)
Sets the content of the element to be the tree created from the string

set_inner_html ($string)
Sets the content of the element, after parsing the string with an HTML parser (HTML::Parser)

set_outer_xml ($string)
Replaces the element with the tree created from the string

print ($optional_filehandle, $optional_pretty_print_style)
Prints an entire element, including the tags, optionally to a $optional_filehandle, optionally with a $pretty_print_style. The print outputs XML data so base entities are escaped.

print_to_file ($filename, %options)
Prints the element to file $filename. options: see flush. =item sprint ($elt, $optional_no_enclosing_tag) Return the xml string for an entire element, including the tags. If the optional second argument is true then only the string inside the element is returned (the start and end tag for $elt are not). The text is XML-escaped: base entities (& and < in text, & < and " in attribute values) are turned into entities.

gi
Return the gi of the element (the gi is the generic identifier the tag name in SGML parlance). tag and name are synonyms of gi.

tag
Same as gi

name
Same as tag

set_gi ($tag)
Set the gi (tag) of an element

set_tag ($tag)
Set the tag (=tag) of an element

set_name ($name)
Set the name (=tag) of an element

root
Return the root of the twig in which the element is contained.

twig
Return the twig containing the element.

parent ($optional_condition)
Return the parent of the element, or the first ancestor matching the $optional_condition

first_child ($optional_condition)
Return the first child of the element, or the first child matching the $optional_condition

has_child ($optional_condition)
Return the first child of the element, or the first child matching the $optional_condition (same as first_child)

has_children ($optional_condition)
Return the first child of the element, or the first child matching the $optional_condition (same as first_child)

first_child_text ($optional_condition)
Return the text of the first child of the element, or the first child matching the $optional_condition If there is no first_child then returns ‘’. This avoids getting the child, checking for its existence then getting the text for trivial cases. Similar methods are available for the other navigation methods:

last_child_text

prev_sibling_text

next_sibling_text

prev_elt_text

next_elt_text

child_text

parent_text

All this methods also exist in “trimmed” variant:

first_child_trimmed_text

last_child_trimmed_text

prev_sibling_trimmed_text

next_sibling_trimmed_text

prev_elt_trimmed_text

next_elt_trimmed_text

child_trimmed_text

parent_trimmed_text

field ($condition)

Same method as first_child_text with a different name

fields ($condition_list)
Return the list of field (text of first child matching the conditions), missing fields are returned as the empty string. Same method as first_child_text with a different name

trimmed_field ($optional_condition)
Same method as first_child_trimmed_text with a different name

set_field ($condition, $optional_atts, @list_of_elt_and_strings)
Set the content of the first child of the element that matches $condition, the rest of the arguments is the same as for set_content If no child matches $condition _and_ if $condition is a valid XML element name, then a new element by that name is created and inserted as the last child.

first_child_matches ($optional_condition)
Return the element if the first child of the element (if it exists) passes the $optional_condition undef otherwise if( $elt->first_child_matches( title)) … is equivalent to if( $elt->{first_child} && $elt->{first_child}->passes( title)) first_child_is is another name for this method Similar methods are available for the other navigation methods:

last_child_matches

prev_sibling_matches

next_sibling_matches

prev_elt_matches

next_elt_matches

child_matches

parent_matches

is_first_child ($optional_condition)

returns true (the element) if the element is the first child of its parent (optionally that satisfies the $optional_condition)

is_last_child ($optional_condition)
returns true (the element) if the element is the last child of its parent (optionally that satisfies the $optional_condition)

prev_sibling ($optional_condition)
Return the previous sibling of the element, or the previous sibling matching $optional_condition

next_sibling ($optional_condition)
Return the next sibling of the element, or the first one matching $optional_condition.

next_elt ($optional_elt, $optional_condition)
Return the next elt (optionally matching $optional_condition) of the element. This is defined as the next element which opens after the current element opens. Which usually means the first child of the element. Counter-intuitive as it might look this allows you to loop through the whole document by starting from the root. The $optional_elt is the root of a subtree. When the next_elt is out of the subtree then the method returns undef. You can then walk a sub-tree with: my $elt= $subtree_root; while( $elt= $elt->next_elt( $subtree_root)) { # insert processing code here }

prev_elt ($optional_condition)
Return the previous elt (optionally matching $optional_condition) of the element. This is the first element which opens before the current one. It is usually either the last descendant of the previous sibling or simply the parent

next_n_elt ($offset, $optional_condition)
Return the $offset-th element that matches the $optional_condition

following_elt
Return the following element (as per the XPath following axis)

preceding_elt
Return the preceding element (as per the XPath preceding axis)

following_elts
Return the list of following elements (as per the XPath following axis)

preceding_elts
Return the list of preceding elements (as per the XPath preceding axis)

children ($optional_condition)
Return the list of children (optionally which matches $optional_condition) of the element. The list is in document order.

children_count ($optional_condition)
Return the number of children of the element (optionally which matches $optional_condition)

children_text ($optional_condition)
In array context, returns an array containing the text of children of the element (optionally which matches $optional_condition) In scalar context, returns the concatenation of the text of children of the element

children_trimmed_text ($optional_condition)
In array context, returns an array containing the trimmed text of children of the element (optionally which matches $optional_condition) In scalar context, returns the concatenation of the trimmed text of children of the element

children_copy ($optional_condition)
Return a list of elements that are copies of the children of the element, optionally which matches $optional_condition

descendants ($optional_condition)
Return the list of all descendants (optionally which matches $optional_condition) of the element. This is the equivalent of the getElementsByTagName of the DOM (by the way, if you are really a DOM addict, you can use getElementsByTagName instead)

getElementsByTagName ($optional_condition)
Same as descendants

find_by_tag_name ($optional_condition)
Same as descendants

descendants_or_self ($optional_condition)
Same as descendants except that the element itself is included in the list if it matches the $optional_condition

first_descendant ($optional_condition)
Return the first descendant of the element that matches the condition

last_descendant ($optional_condition)
Return the last descendant of the element that matches the condition

ancestors ($optional_condition)
Return the list of ancestors (optionally matching $optional_condition) of the element. The list is ordered from the innermost ancestor to the outermost one NOTE: the element itself is not part of the list, in order to include it you will have to use ancestors_or_self

ancestors_or_self ($optional_condition)
Return the list of ancestors (optionally matching $optional_condition) of the element, including the element (if it matches the condition>). The list is ordered from the innermost ancestor to the outermost one

passes ($condition)
Return the element if it passes the $condition

att ($att)
Return the value of attribute $att or undef

latt ($att)
Return the value of attribute $att or undef this method is an lvalue, so you can do $elt->latt( foo)= bar or $elt->latt( foo)++;

set_att ($att, $att_value)
Set the attribute of the element to the given value You can actually set several attributes this way: $elt->set_att( att1 => “val1”, att2 => “val2”);

del_att ($att)
Delete the attribute for the element You can actually delete several attributes at once: $elt->del_att( att1, att2, att3);

att_exists ($att)
Returns true if the attribute $att exists for the element, false otherwise

cut
Cut the element from the tree. The element still exists, it can be copied or pasted somewhere else, it is just not attached to the tree anymore. Note that the “old” links to the parent, previous and next siblings can still be accessed using the former_* methods

former_next_sibling
Returns the former next sibling of a cut node (or undef if the node has not been cut) This makes it easier to write loops where you cut elements: my $child= $parent->first_child( achild); while( $child->{att}->{cut}) { $child->cut; $child= ($child->{former} && $child->{former}->{next_sibling}); }

former_prev_sibling
Returns the former previous sibling of a cut node (or undef if the node has not been cut)

former_parent
Returns the former parent of a cut node (or undef if the node has not been cut)

cut_children ($optional_condition)
Cut all the children of the element (or all of those which satisfy the $optional_condition). Return the list of children

cut_descendants ($optional_condition)
Cut all the descendants of the element (or all of those which satisfy the $optional_condition). Return the list of descendants

copy ($elt)
Return a copy of the element. The copy is a “deep” copy: all sub-elements of the element are duplicated.

paste ($optional_position, $ref)
Paste a (previously cut or newly generated) element. Die if the element already belongs to a tree. Note that the calling element is pasted: $child->paste( first_child => $existing_parent); $new_sibling->paste( after => $this_sibling_is_already_in_the_tree); or my $new_elt= XML::Twig::Elt->new( tag => $content); $new_elt->paste( $position => $existing_elt); Example: my $t= XML::Twig->new->parse( doc.xml) my $toc= $t->root->new( toc); $toc->paste( $t->root); # $toc is pasted as first child of the root foreach my $title ($t->findnodes( /doc/section/title)) { my $title_toc= $title->copy; # paste $title_toc as the last child of toc $title_toc->paste( last_child => $toc) } Position options:

first_child (default)
The element is pasted as the first child of $ref

last_child
The element is pasted as the last child of $ref

before
The element is pasted before $ref, as its previous sibling.

after
The element is pasted after $ref, as its next sibling.

within
In this case an extra argument, $offset, should be supplied. The element will be pasted in the reference element (or in its first text child) at the given offset. To achieve this the reference element will be split at the offset.

Note that you can call directly the underlying method:

paste_before

paste_after

paste_first_child

paste_last_child

paste_within

move ($optional_position, $ref)

Move an element in the tree. This is just a cut then a paste. The syntax is the same as paste.

replace ($ref)
Replaces an element in the tree. Sometimes it is just not possible tocut an element then paste another in its place, so replace comes in handy. The calling element replaces $ref.

replace_with (@elts)
Replaces the calling element with one or more elements

delete
Cut the element and frees the memory.

prefix ($text, $optional_option)
Add a prefix to an element. If the element is a PCDATA element the text is added to the pcdata, if the elements first child is a PCDATA then the text is added to it’s pcdata, otherwise a new PCDATA element is created and pasted as the first child of the element. If the option is asis then the prefix is added asis: it is created in a separate PCDATA element with an asis property. You can then write: $elt1->prefix( <b>, asis); to create a <b> in the output of print.

suffix ($text, $optional_option)
Add a suffix to an element. If the element is a PCDATA element the text is added to the pcdata, if the elements last child is a PCDATA then the text is added to it’s pcdata, otherwise a new PCDATA element is created and pasted as the last child of the element. If the option is asis then the suffix is added asis: it is created in a separate PCDATA element with an asis property. You can then write: $elt2->suffix( </b>, asis);

trim
Trim the element in-place: spaces at the beginning and at the end of the element are discarded and multiple spaces within the element (or its descendants) are replaced by a single space. Note that in some cases you can still end up with multiple spaces, if they are split between several elements: <doc> text <b> hah! </b> yep</doc> gets trimmed to <doc>text <b> hah! </b> yep</doc> This is somewhere in between a bug and a feature.

normalize
merge together all consecutive pcdata elements in the element (if for example you have turned some elements into pcdata using erase, this will give you a “clean” element in which there all text fragments are as long as possible).

simplify (%options)
Return a data structure suspiciously similar to XML::Simple’s. Options are identical to XMLin options, see XML::Simple doc for more details (or use DATA::dumper or YAML to dump the data structure) Note: there is no magic here, if you write $twig->parsefile( $file )->simplify(); then it will load the entire document in memory. I am afraid you will have to put some work into it to get just the bits you want and discard the rest. Look at the synopsis or the XML::Twig 101 section at the top of the docs for more information.

content_key

forcearray

keyattr

noattr

normalize_space

aka normalise_space

variables (%var_hash)
%var_hash is a hash { name => value } This option allows variables in the XML to be expanded when the file is read. (there is no facility for putting the variable names back if you regenerate XML using XMLout). A ‘variable’ is any text of the form ${name} (or $name) which occurs in an attribute value or in the text content of an element. If ’name’ matches a key in the supplied hashref, ${name} will be replaced with the corresponding value from the hashref. If no matching key is found, the variable will not be replaced.

var_att ($attribute_name)
This option gives the name of an attribute that will be used to create variables in the XML: <dirs> <dir name=“prefix”>/usr/local</dir> <dir name=“exec_prefix”>$prefix/bin</dir> </dirs> use var => name to get $prefix replaced by /usr/local in the generated data structure By default variables are captured by the following regexp: /$(\w+)/

var_regexp (regexp)
This option changes the regexp used to capture variables. The variable name should be in $1

group_tags { grouping tag => grouped tag, grouping tag 2 => grouped tag 2…}
Option used to simplify the structure: elements listed will not be used. Their children will be, they will be considered children of the element parent. If the element is: <config host=“laptop.xmltwig.org”> <server>localhost</server> <dirs> <dir name=“base”>/home/mrodrigu/standards</dir> <dir name=“tools”>$base/tools</dir> </dirs> <templates> <template name=“std_def”>std_def.templ</template> <template name=“dummy”>dummy</template> </templates> </config> Then calling simplify with group_tags => { dirs => dir, templates => template} makes the data structure be exactly as if the start and end tags for dirs and templates were not there. A YAML dump of the structure base: /home/mrodrigu/standards host: laptop.xmltwig.org server: localhost template: - std_def.templ - dummy.templ tools: $base/tools

split_at ($offset)
Split a text (PCDATA or CDATA) element in 2 at $offset, the original element now holds the first part of the string and a new element holds the right part. The new element is returned If the element is not a text element then the first text child of the element is split

split ( $optional_regexp, $tag1, $atts1, $tag2, $atts2…)
Split the text descendants of an element in place, the text is split using the $regexp, if the regexp includes () then the matched separators will be wrapped in elements. $1 is wrapped in $tag1, with attributes $atts1 if $atts1 is given (as a hashref), $2 is wrapped in $tag2… if $elt is <p>tati tata <b>tutu tati titi</b> tata tati tata</p> $elt->split( qr/(ta)ti/, foo, {type => toto} ) will change $elt to <p><foo type=“toto”>ta</foo> tata <b>tutu <foo type=“toto”>ta</foo> titi</b> tata <foo type=“toto”>ta</foo> tata</p> The regexp can be passed either as a string or as qr// (perl 5.005 and later), it defaults to \s+ just as the split built-in (but this would be quite a useless behaviour without the $optional_tag parameter) $optional_tag defaults to PCDATA or CDATA, depending on the initial element type The list of descendants is returned (including un-touched original elements and newly created ones)

mark ( $regexp, $optional_tag, $optional_attribute_ref)
This method behaves exactly as split, except only the newly created elements are returned

wrap_children ( $regexp_string, $tag, $optional_attribute_hashref)
Wrap the children of the element that match the regexp in an element $tag. If $optional_attribute_hashref is passed then the new element will have these attributes. The $regexp_string includes tags, within pointy brackets, as in <title><para>+ and the usual Perl modifiers (+*?…). Tags can be further qualified with attributes: <para type="warning" classif="cosmic_secret">+. The values for attributes should be xml-escaped: <candy type="M&amp;Ms">* (<, & > and " should be escaped). Note that elements might get extra id attributes in the process. See add_id. Use strip_att to remove unwanted id’s. Here is an example: If the element $elt has the following content: <elt> <p>para 1</p> <l_l1_1>list 1 item 1 para 1</l_l1_1> <l_l1>list 1 item 1 para 2</l_l1> <l_l1_n>list 1 item 2 para 1 (only para)</l_l1_n> <l_l1_n>list 1 item 3 para 1</l_l1_n> <l_l1>list 1 item 3 para 2</l_l1> <l_l1>list 1 item 3 para 3</l_l1> <l_l1_1>list 2 item 1 para 1</l_l1_1> <l_l1>list 2 item 1 para 2</l_l1> <l_l1_n>list 2 item 2 para 1 (only para)</l_l1_n> <l_l1_n>list 2 item 3 para 1</l_l1_n> <l_l1>list 2 item 3 para 2</l_l1> <l_l1>list 2 item 3 para 3</l_l1> </elt> Then the code $elt->wrap_children( q{<l_l1_1><l_l1>*} , li => { type => “ul1” }); $elt->wrap_children( q{<l_l1_n><l_l1>*} , li => { type => “ul” }); $elt->wrap_children( q{<li type=“ul1”><li type=“ul”>+}, “ul”); $elt->strip_att( id); $elt->strip_att( type); $elt->print; will output: <elt> <p>para 1</p> <ul> <li> <l_l1_1>list 1 item 1 para 1</l_l1_1> <l_l1>list 1 item 1 para 2</l_l1> </li> <li> <l_l1_n>list 1 item 2 para 1 (only para)</l_l1_n> </li> <li> <l_l1_n>list 1 item 3 para 1</l_l1_n> <l_l1>list 1 item 3 para 2</l_l1> <l_l1>list 1 item 3 para 3</l_l1> </li> </ul> <ul> <li> <l_l1_1>list 2 item 1 para 1</l_l1_1> <l_l1>list 2 item 1 para 2</l_l1> </li> <li> <l_l1_n>list 2 item 2 para 1 (only para)</l_l1_n> </li> <li> <l_l1_n>list 2 item 3 para 1</l_l1_n> <l_l1>list 2 item 3 para 2</l_l1> <l_l1>list 2 item 3 para 3</l_l1> </li> </ul> </elt>

subs_text ($regexp, $replace)
subs_text does text substitution, similar to perl’s s/// operator. $regexp must be a perl regexp, created with the qr operator. $replace can include $1, $2… from the $regexp. It can also be used to create element and entities, by using &elt( tag => { att => val }, text) (similar syntax as new) and &ent( name). Here is a rather complex example: $elt->subs_text( qr{(?<!do not )link to (http://([^\s,]*))}, see &elt( a =>{ href => $1 }, $2) ); This will replace text like link to http://www.xmltwig.org by see <a href=“www.xmltwig.org”>www.xmltwig.org</a>, but not do not link to… Generating entities (here replacing spaces with  ): $elt->subs_text( qr{ }, &ent( “ ”)); or, using a variable: my $ent=" ”; $elt->subs_text( qr{ }, “&ent( $ent)”); Note that the substitution is always global, as in using the g modifier in a perl substitution, and that it is performed on all text descendants of the element. Bug: in the $regexp, you can only use \1, \2… if the replacement expression does not include elements or attributes. eg $t->subs_text( qr/((t[aiou])\2)/, $2); # ok, replaces toto, tata, titi, tutu by to, ta, ti, tu $t->subs_text( qr/((t[aiou])\2)/, &elt(p => $1) ); # NOK, does not find toto…

add_id ($optional_coderef)
Add an id to the element. The id is an attribute, id by default, see the id option for XML::Twig new to change it. Use an id starting with # to get an id that’s not output by print, flush or sprint, yet that allows you to use the elt_id method to get the element easily. If the element already has an id, no new id is generated. By default the method create an id of the form twig_id_<nnnn>, where <nnnn> is a number, incremented each time the method is called successfully.

set_id_seed ($prefix)
by default the id generated by add_id is twig_id_<nnnn>, set_id_seed changes the prefix to $prefix and resets the number to 1

strip_att ($att)
Remove the attribute $att from all descendants of the element (including the element) Return the element

change_att_name ($old_name, $new_name)
Change the name of the attribute from $old_name to $new_name. If there is no attribute $old_name nothing happens.

lc_attnames
Lower cases the name all the attributes of the element.

sort_children_on_value( %options)
Sort the children of the element in place according to their text. All children are sorted. Return the element, with its children sorted. %options are type : numeric | alpha (default: alpha) order : normal | reverse (default: normal) Return the element, with its children sorted

sort_children_on_att ($att, %options)
Sort the children of the element in place according to attribute $att. %options are the same as for sort_children_on_value Return the element.

sort_children_on_field ($tag, %options)
Sort the children of the element in place, according to the field $tag (the text of the first child of the child with this tag). %options are the same as for sort_children_on_value. Return the element, with its children sorted

sort_children( $get_key, %options)
Sort the children of the element in place. The $get_key argument is a reference to a function that returns the sort key when passed an element. For example: $elt->sort_children( sub { $_[0]->{att}->{“nb”} + $_[0]->text }, type => numeric, order => reverse );

field_to_att ($cond, $att)
Turn the text of the first sub-element matched by $cond into the value of attribute $att of the element. If $att is omitted then $cond is used as the name of the attribute, which makes sense only if $cond is a valid element (and attribute) name. The sub-element is then cut.

att_to_field ($att, $tag)
Take the value of attribute $att and create a sub-element $tag as first child of the element. If $tag is omitted then $att is used as the name of the sub-element.

get_xpath ($xpath, $optional_offset)
Return a list of elements satisfying the $xpath. $xpath is an XPATH-like expression. A subset of the XPATH abbreviated syntax is covered: tag tag[1] (or any other positive number) tag[last()] tag[@att] (the attribute exists for the element) tag[@att=“val”] tag[@att=~ /regexp/] tag[att1=“val1” and att2=“val2”] tag[att1=“val1” or att2=“val2”] tag[string()=“toto”] (returns tag elements which text (as per the text method) is toto) tag[string()=~/regexp/] (returns tag elements which text (as per the text method) matches regexp) expressions can start with / (search starts at the document root) expressions can start with . (search starts at the current element) // can be used to get all descendants instead of just direct children * matches any tag So the following examples from the XPath recommendation<http://www.w3.org/TR/xpath.html#path-abbrev> work: para selects the para element children of the context node * selects all element children of the context node para[1] selects the first para child of the context node para[last()] selects the last para child of the context node */para selects all para grandchildren of the context node /doc/chapter[5]/section[2] selects the second section of the fifth chapter of the doc chapter//para selects the para element descendants of the chapter element children of the context node //para selects all the para descendants of the document root and thus selects all para elements in the same document as the context node //olist/item selects all the item elements in the same document as the context node that have an olist parent .//para selects the para element descendants of the context node .. selects the parent of the context node para[@type=“warning”] selects all para children of the context node that have a type attribute with value warning employee[@secretary and @assistant] selects all the employee children of the context node that have both a secretary attribute and an assistant attribute The elements will be returned in the document order. If $optional_offset is used then only one element will be returned, the one with the appropriate offset in the list, starting at 0 Quoting and interpolating variables can be a pain when the Perl syntax and the XPATH syntax collide, so use alternate quoting mechanisms like q or qq (I like q{} and qq{} myself). Here are some more examples to get you started: my $p1= “p1”; my $p2= “p2”; my @res= $t->get_xpath( qq{p[string( “$p1”) or string( “$p2”)]}); my $a= “a1”; my @res= $t->get_xpath( qq{//*[@att="$a”]}); my $val= “a1”; my $exp= qq{//p[ \att=$val]}; # you need to use \ or you will get a warning my @res= $t->get_xpath( $exp); Note that the only supported regexps delimiters are / and that you must backslash all / in regexps AND in regular strings. XML::Twig does not provide natively full XPATH support, but you can use XML::Twig::XPath to get findnodes to use XML::XPath as the XPath engine, with full coverage of the spec. XML::Twig::XPath to get findnodes to use XML::XPath as the XPath engine, with full coverage of the spec.

find_nodes
same asget_xpath

findnodes
same as get_xpath

text @optional_options
Return a string consisting of all the PCDATA and CDATA in an element, without any tags. The text is not XML-escaped: base entities such as & and < are not escaped. The ‘no_recurse’ option will only return the text of the element, not of any included sub-elements (same as text_only).

text_only
Same as text except that the text returned doesn’t include the text of sub-elements.

trimmed_text
Same as text except that the text is trimmed: leading and trailing spaces are discarded, consecutive spaces are collapsed

set_text ($string)
Set the text for the element: if the element is a PCDATA, just set its text, otherwise cut all the children of the element and create a single PCDATA child for it, which holds the text.

merge ($elt2)
Move the content of $elt2 within the element

insert ($tag1, [$optional_atts1], $tag2, [$optional_atts2],…)
For each tag in the list inserts an element $tag as the only child of the element. The element gets the optional attributes in$optional_atts<n>. All children of the element are set as children of the new element. The upper level element is returned. $p->insert( table => { border=> 1}, tr, td) put $p in a table with a visible border, a single tr and a single td and return the table element: <p><table border=“1”><tr><td>original content of p</td></tr></table></p>

wrap_in (@tag)
Wrap elements in @tag as the successive ancestors of the element, returns the new element. $elt->wrap_in( td, tr, table) wraps the element as a single cell in a table for example. Optionally each tag can be followed by a hashref of attributes, that will be set on the wrapping element: $elt->wrap_in( p => { class => “advisory” }, div => { class => “intro”, id => “div_intro” });

insert_new_elt ($opt_position, $tag, $opt_atts_hashref, @opt_content)
Combines a new and a paste : creates a new element using $tag, $opt_atts_hashref and @opt_content which are arguments similar to those for new, then paste it, using $opt_position or first_child, relative to $elt. Return the newly created element

erase
Erase the element: the element is deleted and all of its children are pasted in its place.

set_content ( $optional_atts, @list_of_elt_and_strings) ( $optional_atts, ‘#EMPTY’)
Set the content for the element, from a list of strings and elements. Cuts all the element children, then pastes the list elements as the children. This method will create a PCDATA element for any strings in the list. The $optional_atts argument is the ref of a hash of attributes. If this argument is used then the previous attributes are deleted, otherwise they are left untouched. WARNING: if you rely on ID’s then you will have to set the id yourself. At this point the element does not belong to a twig yet, so the ID attribute is not known so it won’t be stored in the ID list. A content of ‘#EMPTY’ creates an empty element;

namespace ($optional_prefix)
Return the URI of the namespace that $optional_prefix or the element name belongs to. If the name doesn’t belong to any namespace, undef is returned.

local_name
Return the local name (without the prefix) for the element

ns_prefix
Return the namespace prefix for the element

current_ns_prefixes
Return a list of namespace prefixes valid for the element. The order of the prefixes in the list has no meaning. If the default namespace is currently bound, ’’ appears in the list.

inherit_att ($att, @optional_tag_list)
Return the value of an attribute inherited from parent tags. The value returned is found by looking for the attribute in the element then in turn in each of its ancestors. If the @optional_tag_list is supplied only those ancestors whose tag is in the list will be checked.

all_children_are ($optional_condition)
return 1 if all children of the element pass the $optional_condition, 0 otherwise

level ($optional_condition)
Return the depth of the element in the twig (root is 0). If $optional_condition is given then only ancestors that match the condition are counted. WARNING: in a tree created using the twig_roots option this will not return the level in the document tree, level 0 will be the document root, level 1 will be the twig_roots elements. During the parsing (in a twig_handler) you can use the depth method on the twig object to get the real parsing depth.

in ($potential_parent)
Return true if the element is in the potential_parent ($potential_parent is an element)

in_context ($cond, $optional_level)
Return true if the element is included in an element which passes $cond optionally within $optional_level levels. The returned value is the including element.

pcdata
Return the text of a PCDATA element or undef if the element is not PCDATA.

pcdata_xml_string
Return the text of a PCDATA element or undef if the element is not PCDATA. The text is “XML-escaped” (’&’ and ‘<’ are replaced by ‘&’ and ‘<’)

set_pcdata ($text)
Set the text of a PCDATA element. This method does not check that the element is indeed a PCDATA so usually you should use set_text instead.

append_pcdata ($text)
Add the text at the end of a PCDATA element.

is_cdata
Return 1 if the element is a CDATA element, returns 0 otherwise.

is_text
Return 1 if the element is a CDATA or PCDATA element, returns 0 otherwise.

cdata
Return the text of a CDATA element or undef if the element is not CDATA.

cdata_string
Return the XML string of a CDATA element, including the opening and closing markers.

set_cdata ($text)
Set the text of a CDATA element.

append_cdata ($text)
Add the text at the end of a CDATA element.

remove_cdata
Turns all CDATA sections in the element into regular PCDATA elements. This is useful when converting XML to HTML, as browsers do not support CDATA sections.

extra_data
Return the extra_data (comments and PI’s) attached to an element

set_extra_data ($extra_data)
Set the extra_data (comments and PI’s) attached to an element

append_extra_data ($extra_data)
Append extra_data to the existing extra_data before the element (if no previous extra_data exists then it is created)

set_asis
Set a property of the element that causes it to be output without being XML escaped by the print functions: if it contains a < b it will be output as such and not as a &lt; b. This can be useful to create text elements that will be output as markup. Note that all PCDATA descendants of the element are also marked as having the property (they are the ones that are actually impacted by the change). If the element is a CDATA element it will also be output asis, without the CDATA markers. The same goes for any CDATA descendant of the element

set_not_asis
Unsets the asis property for the element and its text descendants.

is_asis
Return the asis property status of the element ( 1 or undef)

closed
Return true if the element has been closed. Might be useful if you are somewhere in the tree, during the parse, and have no idea whether a parent element is completely loaded or not.

get_type
Return the type of the element: ‘#ELT’ for “real” elements, or ‘#PCDATA’, ‘#CDATA’, ‘#COMMENT’, ‘#ENT’, ‘#PI

is_elt
Return the tag if the element is a “real” element, or 0 if it is PCDATA, CDATA

contains_only_text
Return 1 if the element does not contain any other “real” element

contains_only ($exp)
Return the list of children if all children of the element match the expression $exp if( $para->contains_only( tt)) { … }

contains_a_single ($exp)
If the element contains a single child that matches the expression $exp returns that element. Otherwise returns 0.

is_field
same as contains_only_text

is_pcdata
Return 1 if the element is a PCDATA element, returns 0 otherwise.

is_ent
Return 1 if the element is an entity (an unexpanded entity) element, return 0 otherwise.

is_empty
Return 1 if the element is empty, 0 otherwise

set_empty
Flags the element as empty. No further check is made, so if the element is actually not empty the output will be messed. The only effect of this method is that the output will be <tag att="value""/>.

set_not_empty
Flags the element as not empty. if it is actually empty then the element will be output as <tag att="value""></tag>

is_pi
Return 1 if the element is a processing instruction (#PI) element, return 0 otherwise.

target
Return the target of a processing instruction

set_target ($target)
Set the target of a processing instruction

data
Return the data part of a processing instruction

set_data ($data)
Set the data of a processing instruction

set_pi ($target, $data)
Set the target and data of a processing instruction

pi_string
Return the string form of a processing instruction (<?target data?>)

is_comment
Return 1 if the element is a comment (#COMMENT) element, return 0 otherwise.

set_comment ($comment_text)
Set the text for a comment

comment
Return the content of a comment (just the text, not the <!-- and -->)

comment_string
Return the XML string for a comment (<!-- comment -->) Note that an XML comment cannot start or end with a ‘-’, or include ‘–’ (http://www.w3.org/TR/2008/REC-xml-20081126/#sec-comments), if that is the case (because you have created the comment yourself presumably, as it could not be in the input XML), then a space will be inserted before an initial ‘-’, after a trailing one or between two ‘-’ in the comment (which could presumably mangle javascript “hidden” in an XHTML comment);

set_ent ($entity)
Set an (non-expanded) entity (#ENT). $entity) is the entity text (&ent;)

ent
Return the entity for an entity (#ENT) element (&ent;)

ent_name
Return the entity name for an entity (#ENT) element (ent)

ent_string
Return the entity, either expanded if the expanded version is available, or non-expanded (&ent;) otherwise

child ($offset, $optional_condition)
Return the $offset-th child of the element, optionally the $offset-th child that matches $optional_condition. The children are treated as a list, so $elt->child( 0) is the first child, while $elt->child( -1) is the last child.

child_text ($offset, $optional_condition)
Return the text of a child or undef if the sibling does not exist. Arguments are the same as child.

last_child ($optional_condition)
Return the last child of the element, or the last child matching $optional_condition (ie the last of the element children matching the condition).

last_child_text ($optional_condition)
Same as first_child_text but for the last child.

sibling ($offset, $optional_condition)
Return the next or previous $offset-th sibling of the element, or the $offset-th one matching $optional_condition. If $offset is negative then a previous sibling is returned, if $offset is positive then a next sibling is returned. $offset=0 returns the element if there is no condition or if the element matches the condition>, undef otherwise.

sibling_text ($offset, $optional_condition)
Return the text of a sibling or undef if the sibling does not exist. Arguments are the same as sibling.

prev_siblings ($optional_condition)
Return the list of previous siblings (optionally matching $optional_condition) for the element. The elements are ordered in document order.

next_siblings ($optional_condition)
Return the list of siblings (optionally matching $optional_condition) following the element. The elements are ordered in document order.

siblings ($optional_condition)
Return the list of siblings (optionally matching $optional_condition) of the element (excluding the element itself). The elements are ordered in document order.

pos ($optional_condition)
Return the position of the element in the children list. The first child has a position of 1 (as in XPath). If the $optional_condition is given then only siblings that match the condition are counted. If the element itself does not match the condition then 0 is returned.

atts
Return a hash ref containing the element attributes

set_atts ({ att1=>$att1_val, att2=> $att2_val… })
Set the element attributes with the hash ref supplied as the argument. The previous attributes are lost (ie the attributes set by set_atts replace all of the attributes of the element). You can also pass a list instead of a hashref: $elt->set_atts( att1 => val1,...)

del_atts
Deletes all the element attributes.

att_nb
Return the number of attributes for the element

has_atts
Return true if the element has attributes (in fact return the number of attributes, thus being an alias to att_nb

has_no_atts
Return true if the element has no attributes, false (0) otherwise

att_names
return a list of the attribute names for the element

att_xml_string ($att, $options)
Return the attribute value, where ‘&’, ‘<’ and quote (” or the value of the quote option at twig creation) are XML-escaped. The options are passed as a hashref, setting escape_gt to a true value will also escape ‘>’ ($elt( ‘myatt’, { escape_gt => 1 });

set_id ($id)
Set the id attribute of the element to the value. See elt_id to change the id attribute name

id
Gets the id attribute value

del_id ($id)
Deletes the id attribute of the element and remove it from the id list for the document

class
Return the class attribute for the element (methods on the class attribute are quite convenient when dealing with XHTML, or plain XML that will eventually be displayed using CSS)

lclass
same as class, except that this method is an lvalue, so you can do $elt->lclass= "foo"

set_class ($class)
Set the class attribute for the element to $class

add_class ($class)
Add $class to the element class attribute: the new class is added only if it is not already present. Note that classes are then sorted alphabetically, so the class attribute can be changed even if the class is already there

remove_class ($class)
Remove $class from the element class attribute. Note that classes are then sorted alphabetically, so the class attribute can be changed even if the class is already there

add_to_class ($class)
alias for add_class

att_to_class ($att)
Set the class attribute to the value of attribute $att

add_att_to_class ($att)
Add the value of attribute $att to the class attribute of the element

move_att_to_class ($att)
Add the value of attribute $att to the class attribute of the element and delete the attribute

tag_to_class
Set the class attribute of the element to the element tag

add_tag_to_class
Add the element tag to its class attribute

set_tag_class ($new_tag)
Add the element tag to its class attribute and sets the tag to $new_tag

in_class ($class)
Return true (1) if the element is in the class $class (if $class is one of the tokens in the element class attribute)

tag_to_span
Change the element tag tp span and set its class to the old tag

tag_to_div
Change the element tag tp div and set its class to the old tag

DESTROY
Frees the element from memory.

start_tag
Return the string for the start tag for the element, including the /> at the end of an empty element tag

end_tag
Return the string for the end tag of an element. For an empty element, this returns the empty string (’’).

xml_string @optional_options
Equivalent to $elt->sprint( 1), returns the string for the entire element, excluding the element’s tags (but nested element tags are present) The ‘no_recurse’ option will only return the text of the element, not of any included sub-elements (same as xml_text_only).

inner_xml
Another synonym for xml_string

outer_xml
Another synonym for sprint

xml_text
Return the text of the element, encoded (and processed by the current output_filter or output_encoding options, without any tag.

xml_text_only
Same as xml_text except that the text returned doesn’t include the text of sub-elements.

set_pretty_print ($style)
Set the pretty print method, amongst ‘none’ (default), ‘nsgmls’, ‘nice’, ‘indented’, ‘record’ and ‘record_c’ pretty_print styles:

none
the default, no is used

nsgmls
nsgmls style, with added within tags

nice
adds wherever possible (NOT SAFE, can lead to invalid XML)

indented
same as nice plus indents elements (NOT SAFE, can lead to invalid XML)

record
table-oriented pretty print, one field per line

record_c
table-oriented pretty print, more compact than record, one record per line

set_empty_tag_style ($style)
Set the method to output empty tags, amongst ‘normal’ (default), ‘html’, and ‘expand’, normal outputs an empty tag ‘<tag/>’, html adds a space ‘<tag />’ for elements that can be empty in XHTML and expand outputs ‘<tag></tag>

set_remove_cdata ($flag)
set (or unset) the flag that forces the twig to output CDATA sections as regular (escaped) PCDATA

set_indent ($string)
Set the indentation for the indented pretty print style (default is 2 spaces)

set_quote ($quote)
Set the quotes used for attributes. can be ‘double’ (default) or ‘single

cmp ($elt)
Compare the order of the 2 elements in a twig. C<$a> is the <A>..</A> element, C<$b> is the <B>…</B> element document $a->cmp( $b) <A> … </A> … <B> … </B> -1 <A> … <B> … </B> … </A> -1 <B> … </B> … <A> … </A> 1 <B> … <A> … </A> … </B> 1 $a == $b 0 $a and $b not in the same tree undef

before ($elt)
Return 1 if $elt starts before the element, 0 otherwise. If the 2 elements are not in the same twig then return undef. if( $a->cmp( $b) == -1) { return 1; } else { return 0; }

after ($elt)
Return 1 if $elt starts after the element, 0 otherwise. If the 2 elements are not in the same twig then return undef. if( $a->cmp( $b) == -1) { return 1; } else { return 0; }

other comparison methods

lt

le

gt

ge

path

Return the element context in a form similar to XPath’s short form: ‘/root/tag1/../tag

xpath
Return a unique XPath expression that can be used to find the element again. It looks like /doc/sect[3]/title: unique elements do not have an index, the others do.

flush
flushes the twig up to the current element (strictly equivalent to $elt->root->flush)

private methods
Low-level methods on the twig:

set_parent ($parent)

set_first_child ($first_child)

set_last_child ($last_child)

set_prev_sibling ($prev_sibling)

set_next_sibling ($next_sibling)

set_twig_current

del_twig_current

twig_current

contains_text

Those methods should not be used, unless of course you find some creative and interesting, not to mention useful, ways to do it.

cond

Most of the navigation functions accept a condition as an optional argument The first element (or all elements for children or ancestors ) that passes the condition is returned.

The condition is a single step of an XPath expression using the XPath subset defined by get_xpath. Additional conditions are:

The condition can be

#ELT
return a “real” element (not a PCDATA, CDATA, comment or pi element)

#TEXT
return a PCDATA or CDATA element

regular expression
return an element whose tag matches the regexp. The regexp has to be created with qr// (hence this is available only on perl 5.005 and above)

code reference
applies the code, passing the current element as argument, if the code returns true then the element is returned, if it returns false then the code is applied to the next candidate.

XML::Twig::XPath

XML::Twig implements a subset of XPath through the get_xpath method.

If you want to use the whole XPath power, then you can use XML::Twig::XPath instead. In this case XML::Twig uses XML::XPath to execute XPath queries. You will of course need XML::XPath installed to be able to use XML::Twig::XPath.

See XML::XPath for more information.

The methods you can use are:

findnodes ($path)
return a list of nodes found by $path.

findnodes_as_string ($path)
return the nodes found reproduced as XML. The result is not guaranteed to be valid XML though.

findvalue ($path)
return the concatenation of the text content of the result nodes

In order for XML::XPath to be used as the XPath engine the following methods are included in XML::Twig:

in XML::Twig

getRootNode

getParentNode

getChildNodes

in XML::Twig::Elt

string_value

toString

getName

getRootNode

getNextSibling

getPreviousSibling

isElementNode

isTextNode

isPI

isPINode

isProcessingInstructionNode

isComment

isCommentNode

getTarget

getChildNodes

getElementById

XML::Twig::XPath::Elt

The methods you can use are the same as on XML::Twig::XPath elements:

findnodes ($path)
return a list of nodes found by $path.

findnodes_as_string ($path)
return the nodes found reproduced as XML. The result is not guaranteed to be valid XML though.

findvalue ($path)
return the concatenation of the text content of the result nodes

XML::Twig::Entity_list

new
Create an entity list.

add ($ent)
Add an entity to an entity list.

add_new_ent ($name, $val, $sysid, $pubid, $ndata, $param)
Create a new entity and add it to the entity list

delete ($ent or $tag).
Delete an entity (defined by its name or by the Entity object) from the list.

print ($optional_filehandle)
Print the entity list.

list
Return the list as an array

XML::Twig::Entity

new ($name, $val, $sysid, $pubid, $ndata, $param)
Same arguments as the Entity handler for XML::Parser.

print ($optional_filehandle)
Print an entity declaration.

name
Return the name of the entity

val
Return the value of the entity

sysid
Return the system id for the entity (for NDATA entities)

pubid
Return the public id for the entity (for NDATA entities)

ndata
Return true if the entity is an NDATA entity

param
Return true if the entity is a parameter entity

text
Return the entity declaration text.

XML::Twig::Notation_list

new
Create an notation list.

add ($notation)
Add an notation to an notation list.

add_new_notation ($name, $base, $sysid, $pubid)
Create a new notation and add it to the notation list

delete ($notation or $tag).
Delete an notation (defined by its name or by the Notation object) from the list.

print ($optional_filehandle)
Print the notation list.

list
Return the list as an array

XML::Twig::Notation

new ($name, $base, $sysid, $pubid)
Same argumnotations as the Notation handler for XML::Parser.

print ($optional_filehandle)
Print an notation declaration.

name
Return the name of the notation

base
Return the base to be used for resolving a relative URI

sysid
Return the system id for the notation

pubid
Return the public id for the notation

text
Return the notation declaration text.

EXAMPLES

Additional examples (and a complete tutorial) can be found on the XML::Twig Page<http://www.xmltwig.org/xmltwig/>

To figure out what flush does call the following script with an XML file and an element name as arguments

use XML::Twig; my ($file, $elt)= @ARGV; my $t= XML::Twig->new( twig_handlers => { $elt => sub {$_[0]->flush; print " [flushed here] “;} }); $t->parsefile( $file, ErrorContext => 2); $t->flush; print " “;

NOTES

Subclassing XML::Twig

Useful methods:

elt_class
In order to subclass XML::Twig you will probably need to subclass also XML::Twig::Elt. Use the elt_class option when you create the XML::Twig object to get the elements created in a different class (which should be a subclass of XML::Twig::Elt.

add_options
If you inherit XML::Twig new method but want to add more options to it you can use this method to prevent XML::Twig to issue warnings for those additional options.

DTD Handling

There are 3 possibilities here. They are:

No DTD
No doctype, no DTD information, no entity information, the world is simple…

Internal DTD
The XML document includes an internal DTD, and maybe entity declarations. If you use the load_DTD option when creating the twig the DTD information and the entity declarations can be accessed. The DTD and the entity declarations will be flush‘ed (or print‘ed) either as is (if they have not been modified) or as reconstructed (poorly, comments are lost, order is not kept, due to it’s content this DTD should not be viewed by anyone) if they have been modified. You can also modify them directly by changing the $twig->{twig_doctype}->{internal} field (straight from XML::Parser, see the Doctype handler doc)

External DTD
The XML document includes a reference to an external DTD, and maybe entity declarations. If you use the load_DTD when creating the twig the DTD information and the entity declarations can be accessed. The entity declarations will be flush‘ed (or print‘ed) either as is (if they have not been modified) or as reconstructed (badly, comments are lost, order is not kept). You can change the doctype through the $twig->set_doctype method and print the dtd through the $twig->dtd_text or $twig->dtd_print methods. If you need to modify the entity list this is probably the easiest way to do it.

Flush

Remember that element handlers are called when the element is CLOSED, so if you have handlers for nested elements the inner handlers will be called first. It makes it for example trickier than it would seem to number nested sections (or clauses, or divs), as the titles in the inner sections are handled before the outer sections.

BUGS

segfault during parsing
This happens when parsing huge documents, or lots of small ones, with a version of Perl before 5.16. This is due to a bug in the way weak references are handled in Perl itself. The fix is either to upgrade to Perl 5.16 or later (perlbrew is a great tool to manage several installations of perl on the same machine). Another, NOT RECOMMENDED, way of fixing the problem, is to switch off weak references by writing XML::Twig::_set_weakrefs( 0); at the top of the code. This is totally unsupported, and may lead to other problems though,

entity handling
Due to XML::Parser behaviour, non-base entities in attribute values disappear if they are not declared in the document: att="val&ent;" will be turned into att => val, unless you use the keep_encoding argument to XML::Twig->new

DTD handling
The DTD handling methods are quite bugged. No one uses them and it seems very difficult to get them to work in all cases, including with several slightly incompatible versions of XML::Parser and of libexpat. Basically you can read the DTD, output it back properly, and update entities, but not much more. So use XML::Twig with standalone documents, or with documents referring to an external DTD, but don’t expect it to properly parse and even output back the DTD.

memory leak
If you use a REALLY old Perl (5.005!) and a lot of twigs you might find that you leak quite a lot of memory (about 2Ks per twig). You can use the dispose method to free that memory after you are done. If you create elements the same thing might happen, use the delete method to get rid of them. Alternatively installing the Scalar::Util (or WeakRef) module on a version of Perl that supports it (>5.6.0) will get rid of the memory leaks automagically.

ID list
The ID list is NOT updated when elements are cut or deleted.

change_gi
This method will not function properly if you do: $twig->change_gi( $old1, $new); $twig->change_gi( $old2, $new); $twig->change_gi( $new, $even_newer);

sanity check on XML::Parser method calls
XML::Twig should really prevent calls to some XML::Parser methods, especially the setHandlers method.

pretty printing
Pretty printing (at least using the ‘indented’ style) is hard to get right! Only elements that belong to the document will be properly indented. Printing elements that do not belong to the twig makes it impossible for XML::Twig to figure out their depth, and thus their indentation level. Also there is an unavoidable bug when using flush and pretty printing for elements with mixed content that start with an embedded element: <elt><b>b</b>toto<b>bold</b></elt> will be output as <elt> <b>b</b>toto<b>bold</b></elt> if you flush the twig when you find the <b> element

Globals

These are the things that can mess up calling code, especially if threaded. They might also cause problem under mod_perl.

Exported constants
Whether you want them or not you get them! These are subroutines to use as constant when creating or testing elements PCDATA return #PCDATA CDATA return #CDATA PI return #PI, I had the choice between PROC and PI :–(

Module scoped values: constants
these should cause no trouble: %base_ent= ( > => >, < => <, & => &, "” => ', " => ", ); CDATA_START = “<![CDATA[”; CDATA_END = “]]>”; PI_START = “<?”; PI_END = “?>”; COMMENT_START = “<!–”; COMMENT_END = “–>”; pretty print styles ( $NSGMLS, $NICE, $INDENTED, $INDENTED_C, $WRAPPED, $RECORD1, $RECORD2)= (1..7); empty tag output style ( $HTML, $EXPAND)= (1..2);

Module scoped values: might be changed
Most of these deal with pretty printing, so the worst that can happen is probably that XML output does not look right, but is still valid and processed identically by XML processors. $empty_tag_style can mess up HTML bowsers though and changing $ID would most likely create problems. $pretty=0; # pretty print style $quote=”; # quote for attributes $INDENT= ; # indent for indented pretty print $empty_tag_style= 0; # how to display empty tags $ID # attribute used as an id (id by default)

Module scoped values: definitely changed
These 2 variables are used to replace tags by an index, thus saving some space when creating a twig. If they really cause you too much trouble, let me know, it is probably possible to create either a switch or at least a version of XML::Twig that does not perform this optimization. %gi2index; # tag => index @index2gi; # list of tags

If you need to manipulate all those values, you can use the following methods on the XML::Twig object:

global_state
Return a hashref with all the global variables used by XML::Twig The hash has the following fields: pretty, quote, indent, empty_tag_style, keep_encoding, expand_external_entities, output_filter, output_text_filter, keep_atts_order

set_global_state ($state)
Set the global state, $state is a hashref

save_global_state
Save the current global state

restore_global_state
Restore the previously saved (using Lsave_global_state> state

TODO

SAX handlers
Allowing XML::Twig to work on top of any SAX parser

multiple twigs are not well supported
A number of twig features are just global at the moment. These include the ID list and the “tag pool” (if you use change_gi then you change the tag for ALL twigs). A future version will try to support this while trying not to be to hard on performance (at least when a single twig is used!).

AUTHOR

Michel Rodriguez <[email protected]>

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Bug reports should be sent using: RT <http://rt.cpan.org/NoAuth/Bugs.html?Dist=XML-Twig>

Comments can be sent to [email protected]

The XML::Twig page is at <http://www.xmltwig.org/xmltwig/> It includes the development version of the module, a slightly better version of the documentation, examples, a tutorial and a: Processing XML efficiently with Perl and XML::Twig: <http://www.xmltwig.org/xmltwig/tutorial/index.html>

SEE ALSO

Complete docs, including a tutorial, examples, an easier to use HTML version of the docs, a quick reference card and a FAQ are available at <http://www.xmltwig.org/xmltwig/>

git repository at <http://github.com/mirod/xmltwig>

XML::Parser, XML::Parser::Expat, XML::XPath, Encode, Text::Iconv, Scalar::Utils

Alternative Modules

XML::Twig is not the only XML::Processing module available on CPAN (far from it!).

The main alternative I would recommend is XML::LibXML.

Here is a quick comparison of the 2 modules:

XML::LibXML, actually libxml2 on which it is based, sticks to the standards, and implements a good number of them in a rather strict way: XML, XPath, DOM, RelaxNG, I must be forgetting a couple (XInclude?). It is fast and rather frugal memory-wise.

XML::Twig is older: when I started writing it XML::Parser/expat was the only game in town. It implements XML and that’s about it (plus a subset of XPath, and you can use XML::Twig::XPath if you have XML::XPathEngine installed for full support). It is slower and requires more memory for a full tree than XML::LibXML. On the plus side (yes, there is a plus side!) it lets you process a big document in chunks, and thus let you tackle documents that couldn’t be loaded in memory by XML::LibXML, and it offers a lot (and I mean a LOT!) of higher-level methods, for everything, from adding structure to “low-level” XML, to shortcuts for XHTML conversions and more. It also DWIMs quite a bit, getting comments and non-significant whitespaces out of the way but preserving them in the output for example. As it does not stick to the DOM, is also usually leads to shorter code than in XML::LibXML.

Beyond the pure features of the 2 modules, XML::LibXML seems to be preferred by “XML-purists”, while XML::Twig seems to be more used by Perl Hackers who have to deal with XML. As you have noted, XML::Twig also comes with quite a lot of docs, but I am sure if you ask for help about XML::LibXML here or on Perlmonks you will get answers.

Note that it is actually quite hard for me to compare the 2 modules: on one hand I know XML::Twig inside-out and I can get it to do pretty much anything I need to (or I improve it ;–), while I have a very basic knowledge of XML::LibXML. So feature-wise, I’d rather use XML::Twig ;–). On the other hand, I am painfully aware of some of the deficiencies, potential bugs and plain ugly code that lurk in XML::Twig, even though you are unlikely to be affected by them (unless for example you need to change the DTD of a document programmatically), while I haven’t looked much into XML::LibXML so it still looks shinny and clean to me.

That said, if you need to process a document that is too big to fit memory and XML::Twig is too slow for you, my reluctant advice would be to use “bare” XML::Parser. It won’t be as easy to use as XML::Twig: basically with XML::Twig you trade some speed (depending on what you do from a factor 3 to… none) for ease-of-use, but it will be easier IMHO than using SAX (albeit not standard), and at this point a LOT faster (see the last test in <http://www.xmltwig.org/article/simple_benchmark/>).

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2838 - Linux cli command wcwidth

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcwidth and provides detailed information about the command wcwidth, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcwidth.

NAME 🖥️ wcwidth 🖥️

determine columns needed for a wide character

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _XOPEN_SOURCE /* See feature_test_macros(7) */
#include <wchar.h>
int wcwidth(wchar_t c);

DESCRIPTION

The wcwidth() function returns the number of columns needed to represent the wide character c. If c is a printable wide character, the value is at least 0. If c is null wide character (L’�’), the value is 0. Otherwise, -1 is returned.

RETURN VALUE

The wcwidth() function returns the number of column positions for c.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcwidth()

Thread safetyMT-Safe locale

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

Note that before glibc 2.2.5, glibc used the prototype

int wcwidth(wint_t c);

NOTES

The behavior of wcwidth() depends on the LC_CTYPE category of the current locale.

SEE ALSO

iswprint(3), wcswidth(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2839 - Linux cli command __ppc_set_ppr_low

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command __ppc_set_ppr_low and provides detailed information about the command __ppc_set_ppr_low, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the __ppc_set_ppr_low.

Programmer’s Manual"

NAME 🖥️ __ppc_set_ppr_low 🖥️

Set the Program Priority Register

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/platform/ppc.h>
void __ppc_set_ppr_med(void);
void __ppc_set_ppr_very_low(void);
void __ppc_set_ppr_low(void);
void __ppc_set_ppr_med_low(void);
void __ppc_set_ppr_med_high(void);

DESCRIPTION

These functions provide access to the Program Priority Register (PPR) on the Power architecture.

The PPR is a 64-bit register that controls the program’s priority. By adjusting the PPR value the programmer may improve system throughput by causing system resources to be used more efficiently, especially in contention situations. The available unprivileged states are covered by the following functions:

__ppc_set_ppr_med()
sets the Program Priority Register value to medium (default).

__ppc_set_ppr_very_low()
sets the Program Priority Register value to very low.

__ppc_set_ppr_low()
sets the Program Priority Register value to low.

__ppc_set_ppr_med_low()
sets the Program Priority Register value to medium low.

The privileged state medium high may also be set during certain time intervals by problem-state (unprivileged) programs, with the following function:

__ppc_set_ppr_med_high()
sets the Program Priority to medium high.

If the program priority is medium high when the time interval expires or if an attempt is made to set the priority to medium high when it is not allowed, the priority is set to medium.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

__ppc_set_ppr_med(), __ppc_set_ppr_very_low(), __ppc_set_ppr_low(), __ppc_set_ppr_med_low(), __ppc_set_ppr_med_high()

Thread safetyMT-Safe

STANDARDS

GNU.

HISTORY

__ppc_set_ppr_med()
__ppc_set_ppr_low()
__ppc_set_ppr_med_low()
glibc 2.18.

__ppc_set_ppr_very_low()
__ppc_set_ppr_med_high()
glibc 2.23.

NOTES

The functions __ppc_set_ppr_very_low() and __ppc_set_ppr_med_high() will be defined by <sys/platform/ppc.h> if _ARCH_PWR8 is defined. Availability of these functions can be tested using #ifdef _ARCH_PWR8.

SEE ALSO

__ppc_yield(3)

Power ISA, Book II - Section 3.1 (Program Priority Registers)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2840 - Linux cli command pthread_mutexattr_getpshared

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_mutexattr_getpshared and provides detailed information about the command pthread_mutexattr_getpshared, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_mutexattr_getpshared.

NAME 🖥️ pthread_mutexattr_getpshared 🖥️

get/set process-shared mutex attribute

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_mutexattr_getpshared(
 const pthread_mutexattr_t *restrict attr,
 int *restrict pshared);
int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr,
 int pshared);

DESCRIPTION

These functions get and set the process-shared attribute in a mutex attributes object. This attribute must be appropriately set to ensure correct, efficient operation of a mutex created using this attributes object.

The process-shared attribute can have one of the following values:

PTHREAD_PROCESS_PRIVATE
Mutexes created with this attributes object are to be shared only among threads in the same process that initialized the mutex. This is the default value for the process-shared mutex attribute.

PTHREAD_PROCESS_SHARED
Mutexes created with this attributes object can be shared between any threads that have access to the memory containing the object, including threads in different processes.

pthread_mutexattr_getpshared() places the value of the process-shared attribute of the mutex attributes object referred to by attr in the location pointed to by pshared.

pthread_mutexattr_setpshared() sets the value of the process-shared attribute of the mutex attributes object referred to by attr to the value specified in pshared.

If attr does not refer to an initialized mutex attributes object, the behavior is undefined.

RETURN VALUE

On success, these functions return 0. On error, they return a positive error number.

ERRORS

pthread_mutexattr_setpshared() can fail with the following errors:

EINVAL
The value specified in pshared is invalid.

ENOTSUP
pshared is PTHREAD_PROCESS_SHARED but the implementation does not support process-shared mutexes.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

SEE ALSO

pthread_mutexattr_init(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2841 - Linux cli command Image_ExifTool_MIEUnitspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_MIEUnitspm and provides detailed information about the command Image_ExifTool_MIEUnitspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_MIEUnitspm.

NAME 🖥️ Image_ExifTool_MIEUnitspm 🖥️

MIE units documentation

DESCRIPTION

The MIE format allows units of measurement to be specified in brackets at the end of a MIE tag name (eg. “Volume(m3)”). This document describes the standard MIE units abbreviations.

SYNTAX

The units string may contain any ASCII characters in the range 0x21 (’!’) to 0x7d (’}’), excepting the bracket characters (0x28 and 0x29). An empty string is allowed, and indicates a dimensionless value. Standard units should be used where possible. In the standard units, an underline (’_’) is used to indicate a subscript, and multiple words may be separated with a hyphen (’-’).

Exponents should be positive, and require no separator (eg. “m2” for square meters). Prefixes may be added to the standard units (eg. “cm”) except when the resulting name conflicts with another standard unit.

Multiplication is indicated by ‘.’, and division by ‘/’. Reciprocal units (ie. the multiplicative inverse) are obtained through division rather than the use of negative exponents (eg. “/in”, not “in-1”). In MIE units, multiplication has precedence over division, so everything to the right of a ‘/’ is in the denominator. (See “EXAMPLES” for a few examples.)

Below is a table summarizing the special characters used in MIE units strings.

. multiplication / division (used for negative exponents) - word separator _ subscript {} annotation [] used to avoid name conflicts if necessary 0-9 exponentiation

STANDARD UNITS

dimensionless [G] Newtonian constant of gravitation (unclassified) [g] standard acceleration of free fall (acceleration) [h] Planck constant (action) [k] Boltzmann constant (unclassified) {cfu} colony forming units (number) {rbc} red blood cell count (number) {tbl} tablets (number) {tot} particles total count (number) % percent (fraction) 10^N the number ten for arbitrary powers (number) A Ampere (electric current) a year (time) a_g mean Gregorian year (time) a_j mean Julian year (time) a_t tropical year (time) acr acre, U.S. (area) acr_br acre, British (area) Ao Angstrom (length) APL-U APL unit (biologic activity of anticardiolipin IgA) ar are (area) arb-U arbitrary unit (arbitrary) arcmin minute of arc (plane angle) arcsec second of arc (plane angle) atm standard atmosphere (pressure) att technical atmosphere (pressure) AU astronomic unit (length) b barn (action area) B bel (level) B-kW bel kilowatt (power level) B-mV bel millivolt (electric potential level) B-SPL bel sound pressure (pressure level) B-uV bel microvolt (electric potential level) B-V bel volt (electric potential level) B-W bel watt (power level) bar bar (pressure) bbl barrel (fluid volume) Bd baud (signal transmission rate) bdsk-U Bodansky unit (biologic activity of phosphatase) beth-U Bethesda unit (biologic activity of factor VIII inhibitor) bf board foot (volume) Bi Biot (electric current) bit bit (amount of information) Bq Becquerel (radioactivity) Btu British thermal unit (energy) Btu_39 British thermal unit at 39 degF (energy) Btu_59 British thermal unit at 59 degF (energy) Btu_60 British thermal unit at 60 degF (energy) Btu_IT international table British thermal unit (energy) Btu_m mean British thermal unit (energy) Btu_th thermochemical British thermal unit (energy) bu bushel, U.S. (dry volume) bu_br bushel, British (volume) By byte (amount of information) C Coulomb (electric charge) c velocity of light (velocity) cal calorie (energy) Cal nutrition label Calories (energy) cal_15 calorie at 15 degC (energy) cal_20 calorie at 20 degC (energy) cal_IT international table calorie (energy) cal_m mean calorie (energy) cal_th thermochemical calorie (energy) car_Au carat of gold alloys (mass fraction) car_m metric carat (mass) cd candela (luminous intensity) Cel degree Celsius (temperature) Ch Charriere (gauge of catheters) ch Gunters chain, U.S. (length) ch_br Gunters chain, British (length) Ci Curie (radioactivity) cicero cicero (length) circ circle (plane angle) cml circular mil, international (area) cr cord, international (volume) crd_us cord, U.S. (fluid volume) cup_us cup (volume) d day (time) deg degree (plane angle) deg{mag} degree from magnetic north (plane angle) degF degree Fahrenheit (temperature) didot didot (length) diop diopter (refraction of a lens) dpt dry pint, U.S. (dry volume) dqt dry quart, U.S. (dry volume) dr dram (mass) dr_ap dram, apothecary (mass) drp drop (volume) dye-U Dye unit (biologic activity of amylase) dyn dyne (force) e elementary charge (electric charge) eps_0 permittivity of vacuum (electric permittivity) eq equivalents (amount of substance) erg erg (energy) eV electronvolt (energy) F Farad (electric capacitance) fdr fluid dram, U.S. (fluid volume) fdr_br fluid dram, British (volume) foz fluid ounce, U.S. (fluid volume) foz_br fluid ounce, British (volume) ft foot, international (length) ft_br foot, British (length) ft_us foot, U.S. (length) fth fathom, international (length) fth_br fathom, British (length) fth_us fathom, U.S. (length) fur furlong, U.S. (length) G Gauss (magnetic flux density) g gram (mass) g.m/{H-B} gram meter per heartbeat (prop. to ventricular stroke work) g% gram percent (mass fraction) Gal Gal (acceleration) gal gallon, U.S. (fluid volume) gal_br gallon, British (volume) gal_wi historical winchester gallon (dry volume) Gb Gilbert (magnetic tension) gf gram-force (force) gil gill, U.S. (fluid volume) gil_br gill, British (volume) gon gon (plane angle) GPL-U GPL unit (biologic activity of anticardiolipin IgG) gr grain (mass) Gy Gray (energy dose) H Henry (inductance) h hour (time) hd hand, international (height of horses) hnsf-U Hounsfield unit (x-ray attenuation) HP horsepower (power) hp_C homeopathic potency of centesimal series (homeopathic potency) hp_X homeopathic potency of decimal series (homeopathic potency) HPF high power field (view area in microscope) Hz Herz (frequency) in inch, international (length) in_br inch, British (length) in_us inch, U.S. (length) in-H2O inch of water column (pressure) in-Hg inch of mercury column (pressure) iU international unit (arbitrary) J Joule (energy) K Kelvin (temperature) ka-U King-Armstrong unit (biologic activity of phosphatase) kat katal (catalytic activity) kg{wet-tis} kilogram of wet tissue (mass) kn knot, international (velocity) kn_br knot, British (velocity) knk-U Kunkel unit (arbitrary biologic activity) Ky Kayser (lineic number) l liter (volume) L liter (volume) lb pound (mass) lb_ap pound, apothecary (mass) lb_tr pound, troy (mass) lbf pound force (force) lcwt long hunderdweight (mass) ligne ligne (length) lk link for Gunters chain, U.S. (length) lk_br link for Gunters chain, British (length) lm lumen (luminous flux) Lmb Lambert (brightness) lne line (length) LPF low power field (view area in microscope) lton long ton (mass) lx lux (illuminance) ly light-year (length) m meter (length) m_e electron mass (mass) m_p proton mass (mass) m-H2O meter of water column (pressure) m-Hg meter of mercury column (pressure) mclg-U Mac Lagan unit (arbitrary biologic activity) mesh mesh, international (lineic number) MET metabolic equivalent (metabolic cost of physical activity) mg{creat} milligram of creatinine (mass) mho mho (electric conductance) mi mile, international (statute mile) (length) mi_br mile, British (length) mi_us mile, U.S. (length) mil mil, international (length) mil_us mil, U.S. (length) min minute (time) min_br minim, British (volume) min_us minim, U.S. (fluid volume) mo month (time) mo_g mean Gregorian month (time) mo_j mean Julian month (time) mo_s synodal month (time) mol mole (amount of substance) MPL-U MPL unit (biologic activity of anticardiolipin IgM) mu_0 permeability of vacuum (magnetic permeability) Mx Maxwell (flux of magnetic induction) N Newton (force) nmi nautical mile, international (length) nmi_br nautical mile, British (length) Np neper (level) Oe Oersted (magnetic field intensity) Ohm Ohm (electric resistance) osm osmole of dissolved particles (amount of substance) oz ounce (mass) oz_ap ounce, apothecary (mass) oz_tr ounce, troy (mass) P Poise (dynamic viscosity) Pa Pascal (pressure) pc parsec (length) pc_br pace (length) pca pica (length) pca_pr Printers pica (length) pH pH (acidity) ph phot (illuminance) pi the number pi (number) pied pied (length) pk peck, U.S. (dry volume) pk_br peck, British (volume) pnt point (length) pnt_pr Printers point (length) pouce pouce (length) ppb parts per billion (fraction) ppm parts per million (fraction) ppth parts per thousand (fraction) pptr parts per trillion (fraction) PRU peripheral vascular resistance unit (fluid resistance) psi pound per square inch (pressure) pt pint, U.S. (fluid volume) pt_br pint, British (volume) pwt_tr pennyweight (mass) qt quart, U.S. (fluid volume) qt_br quart, British (volume) R Roentgen (ion dose) rad radian (plane angle) RAD radiation absorbed dose (energy dose) rch Ramdens chain, U.S. (length) rd rod, U.S. (length) rd_br rod, British (length) REM radiation equivalent man (dose equivalent) rlk_us link for Ramdens chain (length) s second (time) S Siemens (electric conductance) sb stilb (lum. intensity density) sc_ap scruple, apothecary (mass) sct section (area) scwt short hundredweight (mass) smgy-U Somogyi unit (biologic activity of amylase) sph spere (solid angle) sr streadian (solid angle) st stere (volume) St Stokes (kinematic viscosity) ston short ton (mass) stone stone (mass) Sv Sievert (dose equivalent) Sv-U Svedberg unit (sedimentation coefficient) T Tesla (magnetic flux density) t tonne (mass) tb-U tuberculin unit (biologic activity of tuberculin) tbs tablespoon, U.S. (volume) todd-U Todd unit (biologic activity antistreptolysin O) tsp teaspoon, U.S. (volume) twp township (area) u unified atomic mass unit (mass) U Unit (catalytic activity) USP-U U.S. Pharmacopeia unit (arbitrary) V Volt (electric potential) W Watt (power) Wb Weber (magnetic flux) wk week (time) yd yard, international (length) yd_br yard, British (length) yd_us yard, U.S. (length)

PREFIXES

Standard SI prefixes:

y yocto (10^-24) z zepto (10^-21) a atto (10^-18) f femto (10^-15) p pico (10^-12) n nano (10^-9) u micro (10^-6) m milli (10^-3) c centi (10^-2) d deci (10^-1) da deka (10) h hecto (10^2) k kilo (10^3) G giga (10^9) M mega (10^6) T tera (10^12) P peta (10^15) E exa (10^18) Z zetta (10^21) Y yotta (10^24)

Binary power prefixes:

Ki kibi (2^10) Mi mebi (2^20) Gi gibi (2^30) Ti tebi (2^40)

EXAMPLES

A few examples of combined units strings:

/cm3 per cubic centimeter in2 square inches kg.m/s2 Newtons (N) m3/kg.s2 units of [G] 10^100 googols

HISTORY

2006-12-14 - PH Created

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://aurora.regenstrief.org/UCUM/>

SEE ALSO

Image::ExifTool::MIE (3pm), Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2842 - Linux cli command Image_ExifTool_PCXpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_PCXpm and provides detailed information about the command Image_ExifTool_PCXpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_PCXpm.

NAME 🖥️ Image_ExifTool_PCXpm 🖥️

Read metadata from PC Paintbrush files

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains routines required by Image::ExifTool to extract information from PC Paintbrush (PCX) files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://qzx.com/pc-gpe/pcx.txt>

<https://www.fileformat.info/format/pcx/corion.htm>

SEE ALSO

“PCX Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2843 - Linux cli command log2l

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command log2l and provides detailed information about the command log2l, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the log2l.

NAME 🖥️ log2l 🖥️

base-2 logarithmic function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double log2(double x);
float log2f(float x);
long double log2l(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

log2(), log2f(), log2l():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions return the base-2 logarithm of x.

RETURN VALUE

On success, these functions return the base-2 logarithm of x.

For special cases, including where x is 0, 1, negative, infinity, or NaN, see log(3).

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

For a discussion of the errors that can occur for these functions, see log(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

log2(), log2f(), log2l()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD.

SEE ALSO

cbrt(3), clog2(3), log(3), log10(3), sqrt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2844 - Linux cli command Tie_IxHashpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tie_IxHashpm and provides detailed information about the command Tie_IxHashpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tie_IxHashpm.

NAME 🖥️ Tie_IxHashpm 🖥️

ordered associative arrays for Perl

SYNOPSIS

# simple usage use Tie::IxHash; tie HASHVARIABLE, Tie::IxHash [, LIST]; # OO interface with more powerful features use Tie::IxHash; TIEOBJECT = Tie::IxHash->new( [LIST] ); TIEOBJECT->Splice( OFFSET [, LENGTH [, LIST]] ); TIEOBJECT->Push( LIST ); TIEOBJECT->Pop; TIEOBJECT->Shift; TIEOBJECT->Unshift( LIST ); TIEOBJECT->Keys( [LIST] ); TIEOBJECT->Values( [LIST] ); TIEOBJECT->Indices( LIST ); TIEOBJECT->Delete( [LIST] ); TIEOBJECT->Replace( OFFSET, VALUE, [KEY] ); TIEOBJECT->Reorder( LIST ); TIEOBJECT->SortByKey; TIEOBJECT->SortByValue; TIEOBJECT->Length;

DESCRIPTION

This Perl module implements Perl hashes that preserve the order in which the hash elements were added. The order is not affected when values corresponding to existing keys in the IxHash are changed. The elements can also be set to any arbitrary supplied order. The familiar perl array operations can also be performed on the IxHash.

Standard “TIEHASH” Interface

The standard TIEHASH mechanism is available. This interface is recommended for simple uses, since the usage is exactly the same as regular Perl hashes after the tie is declared.

Object Interface

This module also provides an extended object-oriented interface that can be used for more powerful operations with the IxHash. The following methods are available:

FETCH, STORE, DELETE, EXISTS
These standard TIEHASH methods mandated by Perl can be used directly. See the tie entry in perlfunc (1) for details.

Push, Pop, Shift, Unshift, Splice
These additional methods resembling Perl functions are available for operating on key-value pairs in the IxHash. The behavior is the same as the corresponding perl functions, except when a supplied hash key already exists in the hash. In that case, the existing value is updated but its order is not affected. To unconditionally alter the order of a supplied key-value pair, first DELETE the IxHash element.

Keys
Returns an array of IxHash element keys corresponding to the list of supplied indices. Returns an array of all the keys if called without arguments. Note the return value is mostly only useful when used in a list context (since perl will convert it to the number of elements in the array when used in a scalar context, and that may not be very useful). If a single argument is given, returns the single key corresponding to the index. This is usable in either scalar or list context.

Values
Returns an array of IxHash element values corresponding to the list of supplied indices. Returns an array of all the values if called without arguments. Note the return value is mostly only useful when used in a list context (since perl will convert it to the number of elements in the array when used in a scalar context, and that may not be very useful). If a single argument is given, returns the single value corresponding to the index. This is usable in either scalar or list context.

Indices
Returns an array of indices corresponding to the supplied list of keys. Note the return value is mostly only useful when used in a list context (since perl will convert it to the number of elements in the array when used in a scalar context, and that may not be very useful). If a single argument is given, returns the single index corresponding to the key. This is usable in either scalar or list context.

Delete
Removes elements with the supplied keys from the IxHash.

Replace
Substitutes the IxHash element at the specified index with the supplied value-key pair. If a key is not supplied, simply substitutes the value at index with the supplied value. If an element with the supplied key already exists, it will be removed from the IxHash first.

Reorder
This method can be used to manipulate the internal order of the IxHash elements by supplying a list of keys in the desired order. Note however, that any IxHash elements whose keys are not in the list will be removed from the IxHash.

Length
Returns the number of IxHash elements.

SortByKey
Reorders the IxHash elements by textual comparison of the keys.

SortByValue
Reorders the IxHash elements by textual comparison of the values.

Clear
Resets the IxHash to its pristine state: with no elements at all.

EXAMPLE

use Tie::IxHash; # simple interface $t = tie(%myhash, Tie::IxHash, a => 1, b => 2); %myhash = (first => 1, second => 2, third => 3); $myhash{fourth} = 4; @keys = keys %myhash; @values = values %myhash; print(“y”) if exists $myhash{third}; # OO interface $t = Tie::IxHash->new(first => 1, second => 2, third => 3); $t->Push(fourth => 4); # same as $myhash{fourth} = 4; ($k, $v) = $t->Pop; # $k is fourth, $v is 4 $t->Unshift(neg => -1, zeroth => 0); ($k, $v) = $t->Shift; # $k is neg, $v is -1 @oneandtwo = $t->Splice(1, 2, foo => 100, bar => 101); @keys = $t->Keys; @values = $t->Values; @indices = $t->Indices(foo, zeroth); @itemkeys = $t->Keys(@indices); @itemvals = $t->Values(@indices); $t->Replace(2, 0.3, other); $t->Delete(second, zeroth); $len = $t->Length; # number of key-value pairs $t->Reorder(reverse @keys); $t->SortByKey; $t->SortByValue;

BUGS

You cannot specify a negative length to Splice. Negative indexes are OK, though.

NOTE

Indexing always begins at 0 (despite the current $[ setting) for all the functions.

TODO

Addition of elements with keys that already exist to the end of the IxHash must be controlled by a switch.

Provide TIEARRAY interface when it stabilizes in Perl.

Rewrite using XSUBs for efficiency.

AUTHOR

Gurusamy Sarathy [email protected]

Copyright (c) 1995 Gurusamy Sarathy. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

VERSION

Version 1.23

SEE ALSO

perl (1)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2845 - Linux cli command pcap_dump_openpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_dump_openpcap and provides detailed information about the command pcap_dump_openpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_dump_openpcap.

NAME 🖥️ pcap_dump_openpcap 🖥️

open a file to which to write packets

SYNOPSIS

#include <pcap/pcap.h>
pcap_dumper_t *pcap_dump_open(pcap_t *p, const char *fname);
pcap_dumper_t *pcap_dump_open_append(pcap_t *p, const char *fname);
pcap_dumper_t *pcap_dump_fopen(pcap_t *p, FILE *fp);

DESCRIPTION

pcap_dump_open() is called to open a ``savefile’’ for writing. fname specifies the name of the file to open. The file will have the same format as those used by tcpdump(1) and tcpslice(1). If the file does not exist, it will be created; if the file exists, it will be truncated and overwritten. The name “-” is a synonym for stdout.

pcap_dump_fopen() is called to write data to an existing open stream fp; this stream will be closed by a subsequent call to pcap_dump_close(3PCAP). The stream is assumed to be at the beginning of a file that has been newly created or truncated, so that writes will start at the beginning of the file. Note that on Windows, that stream should be opened in binary mode.

p is a capture or ``savefile’’ handle returned by an earlier call to pcap_create(3PCAP) and activated by an earlier call to pcap_activate(3PCAP), or returned by an earlier call to pcap_open_offline(3PCAP), pcap_open_live(3PCAP), or pcap_open_dead(3PCAP). The time stamp precision, link-layer type, and snapshot length from p are used as the link-layer type and snapshot length of the output file.

pcap_dump_open_append() is like pcap_dump_open() but, if the file already exists, and is a pcap file with the same byte order as the host opening the file, and has the same time stamp precision, link-layer header type, and snapshot length as p, it will write new packets at the end of the file.

RETURN VALUE

A pointer to a pcap_dumper_t structure to use in subsequent pcap_dump(3PCAP) and pcap_dump_close(3PCAP) calls is returned on success. NULL is returned on failure. If NULL is returned, pcap_geterr(3PCAP) can be used to get the error text.

BACKWARD COMPATIBILITY

The pcap_dump_open_append() function became available in libpcap release 1.7.2. In previous releases, there is no support for appending packets to an existing savefile.

SEE ALSO

pcap(3PCAP), pcap-savefile(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2846 - Linux cli command pow10f

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pow10f and provides detailed information about the command pow10f, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pow10f.

NAME 🖥️ pow10f 🖥️

base-10 power functions

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <math.h>
double pow10(double x);
float pow10f(float x);
long double pow10l(long double x);

DESCRIPTION

These functions return the value of 10 raised to the power x.

Note well: These functions perform exactly the same task as the functions described in exp10(3), with the difference that the latter functions are now standardized in TS 18661-4:2015. Those latter functions should be used in preference to the functions described in this page.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pow10(), pow10f(), pow10l()

Thread safetyMT-Safe

STANDARDS

GNU.

VERSIONS

glibc 2.1. Removed in glibc 2.27.

SEE ALSO

exp10(3), pow(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2847 - Linux cli command Tk_fileeventpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_fileeventpm and provides detailed information about the command Tk_fileeventpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_fileeventpm.

NAME 🖥️ Tk_fileeventpm 🖥️

Execute a callback when a filehandle becomes readable or writable

SYNOPSIS

$widget->fileevent(fileHandle,readable?,callback?)

$widget->fileevent(fileHandle,writable?,callback?)

DESCRIPTION

This command is used to create file event handlers. A file event handler is a binding between a filehandle and a callback, such that the callback is evaluated whenever the filehandle becomes readable or writable. File event handlers are most commonly used to allow data to be received from another process on an event-driven basis, so that the receiver can continue to interact with the user while waiting for the data to arrive. If an application invokes <>, sysread or read on a blocking filehandle when there is no input data available, the process will block; until the input data arrives, it will not be able to service other events, so it will appear to the user to ``freeze up’’. With fileevent, the process can tell when data is present and only invoke gets or read when they won’t block.

The fileHandle argument to fileevent refers to an open filehandle, such as the return value from a previous open or socket command. If the callback argument is specified, then fileevent creates a new event handler: callback will be evaluated whenever the filehandle becomes readable or writable (depending on the argument to fileevent). In this case fileevent returns an empty string. The readable and writable event handlers for a file are independent, and may be created and deleted separately. However, there may be at most one readable and one writable handler for a file at a given time in a given interpreter. If fileevent is called when the specified handler already exists in the invoking interpreter, the new callback replaces the old one.

If the callback argument is not specified, fileevent returns the current callback for fileHandle, or an empty string if there is none. If the callback argument is specified as an empty string then the event handler is deleted, so that no callback will be invoked. A file event handler is also deleted automatically whenever its filehandle is closed or its interpreter is deleted.

A filehandle is considered to be readable if there is unread data available on the underlying device. A filehandle is also considered to be readable if an end of file or error condition is present on the underlying file or device. It is important for callback to check for these conditions and handle them appropriately; for example, if there is no special check for end of file, an infinite loop may occur where callback reads no data, returns, and is immediately invoked again.

A filehandle is considered to be writable if at least one byte of data can be written to the underlying file or device without blocking, or if an error condition is present on the underlying file or device.

Event-driven I/O works best for filehandles that have been placed into nonblocking mode. In blocking mode, a print command may block if you give it more data than the underlying file or device can accept, and a <>, sysread or read command will block if you attempt to read more data than is ready; no events will be processed while the commands block. In nonblocking mode print, <>, sysread and read never block. See the documentation for the individual commands for information on how they handle blocking and nonblocking filehandles.

The callback for a file event is executed in the context of $widget with which fileevent was invoked. If an error occurs while executing the callback then the Tk::Error mechanism is used to report the error. In addition, the file event handler is deleted if it ever returns an error; this is done in order to prevent infinite loops due to buggy handlers.

BUGS

On windows platforms fileevent is limited in the types of filehandles that behave correctly. Making filehandles non-blocking is only implemented on a subset of UNIX platforms (see Tk::IO).

CREDITS

fileevent is based on the addinput command created by Mark Diekhans.

SEE ALSO

Tk::IO Tk::callbacks

KEYWORDS

asynchronous I/O, blocking, filehandle, event handler, nonblocking, readable, callback, writable.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2848 - Linux cli command Xmbuf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Xmbuf and provides detailed information about the command Xmbuf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Xmbuf.

NAME 🖥️ Xmbuf 🖥️

X multibuffering functions

SYNTAX

#include <X11/extensions/multibuf.h>

Bool XmbufQueryExtension(
    Display *dpy,
    Display *dpy,
    int *event_base_return,
    int *error_base_return);

Status XmbufGetVersion(
    Display *dpy,
    int *major_version_return,
    int *minor_version_return);

int XmbufCreateBuffers(
    Display *dpy,
    Window window,
    int count,
    int update_action,
    int update_hint,
    Multibuffer *buffers_update);

void XmbufDestroyBuffers(
    Display *dpy,
    Window window);

void XmbufDisplayBuffers(
    Display *dpy,
    int count,
    Multibuffer *buffers,
    int min_delay,
    int max_delay);

Status XmbufGetWindowAttributes(
    Display *dpy,
    Window window,
    XmbufWindowAttributes *attributes);

void XmbufChangeWindowAttributes(
    Display *dpy,
    Window window,
    unsigned long valuemask,
    XmbufSetWindowAttributes *attributes);

Status XmbufGetBufferAttributes(
    Display *dpy,
    Multibuffer buffer,
    XmbufBufferAttributes *attributes);

void XmbufChangeBufferAttributes(
    Display *dpy,
    Multibuffer buffer,
    unsigned long valuemask,
    XmbufSetBufferAttributes *attributes);

Status XmbufGetScreenInfo(
    Display *dpy,
    Drawable drawable,
    int *nmono_return,
    XmbufBufferInfo **mono_info_return,
    int *nstereo_return,
    XmbufBufferInfo **stereo_info_return);

Window XmbufCreateStereoWindow(
    Display *dpy,
    Window parent,
    int x,
    int y,
    unsigned int width,
    unsigned int height,
    unsigned int border_width,
    int depth,
    unsigned int class,                 /* InputOutput, InputOnly*/
    Visual *visual,
    unsigned long valuemask,
    XSetWindowAttributes *attributes,
    Multibuffer *left_return,
    Multibuffer *right_return);

STRUCTURES

Events:

typedef struct {
    int type;   /* of event */
    unsigned long serial;       /* # of last request processed by server */
    int send_event;     /* true if this came from a SendEvent request */
    Display *display;   /* Display the event was read from */
    Multibuffer buffer; /* buffer of event */
    int state;  /* see Clobbered constants above */
} XmbufClobberNotifyEvent;

typedef struct {
    int type;   /* of event */
    unsigned long serial;       /* # of last request processed by server */
    int send_event;     /* true if this came from a SendEvent request */
    Display *display;   /* Display the event was read from */
    Multibuffer buffer; /* buffer of event */
} XmbufUpdateNotifyEvent;

Per-window attributes that can be got:

typedef struct {
    int displayed_index;	/* which buffer is being displayed */
    int update_action;	/* Undefined, Background, Untouched, Copied */
    int update_hint;	/* Frequent, Intermittent, Static */
    int window_mode;	/* Mono, Stereo */
    int nbuffers;	/* Number of buffers */
    Multibuffer *buffers;	/* Buffers */
} XmbufWindowAttributes;

Per-window attributes that can be set:

typedef struct {
    int update_hint;	/* Frequent, Intermittent, Static */
} XmbufSetWindowAttributes;

Per-buffer attributes that can be got:

typedef struct {
    Window window;	/* which window this belongs to */
    unsigned long event_mask;	/* events that have been selected */
    int buffer_index;	/* which buffer is this */
    int side;	/* Mono, Left, Right */
} XmbufBufferAttributes;

Per-buffer attributes that can be set:

typedef struct {
    unsigned long event_mask;	/* events that have been selected */
} XmbufSetBufferAttributes;

Per-screen buffer info (there will be lists of them):

typedef struct {
    VisualID visualid;	/* visual usable at this depth */
    int max_buffers;	/* most buffers for this visual */
    int depth;	/* depth of buffers to be created */
} XmbufBufferInfo;

DESCRIPTION

The application programming library for the X11 Double-Buffering, Multi-Buffering, and Stereo Extension contains the interfaces described below. With the exception of * XmbufQueryExtension *, if any of these routines are called with a display that does not support the extension, the ExtensionErrorHandler (which can be set with * XSetExtensionErrorHandler * and functions the same way as * XSetErrorHandler *) will be called and the function will then return.

* XmbufQueryExtension * returns * True * if the multibuffering/stereo extension is available on the given display. If the extension exists, the value of the first event code (which should be added to the event type constants * MultibufferClobberNotify * and * MultibufferUpdateNotify * to get the actual values) is stored into event_base_return and the value of the first error code (which should be added to the error type constant * MultibufferBadBuffer * to get the actual value) is stored into error_base_return.

* XmbufGetVersion * gets the major and minor version numbers of the extension. The return value is zero if an error occurs or non-zero if no error happens.

* XmbufCreateBuffers * requests that “count” buffers be created with the given update_action and update_hint and be associated with the indicated window. The number of buffers created is returned (zero if an error occurred) and buffers_update is filled in with that many Multibuffer identifiers.

* XmbufDestroyBuffers * destroys the buffers associated with the given window.

* XmbufDisplayBuffers * displays the indicated buffers their appropriate windows within max_delay milliseconds after min_delay milliseconds have passed. No two buffers may be associated with the same window or else a Match error is generated.

* XmbufGetWindowAttributes * gets the multibuffering attributes that apply to all buffers associated with the given window. The list of buffers returns may be freed with * XFree *. Returns non-zero on success and zero if an error occurs.

* XmbufChangeWindowAttributes * sets the multibuffering attributes that apply to all buffers associated with the given window. This is currently limited to the update_hint.

* XmbufGetBufferAttributes * gets the attributes for the indicated buffer. Returns non-zero on success and zero if an error occurs.

* XmbufChangeBufferAttributes * sets the attributes for the indicated buffer. This is currently limited to the event_mask.

* XmbufGetScreenInfo * gets the parameters controlling how mono and stereo windows may be created on the screen of the given drawable. The numbers of sets of visual and depths are returned in nmono_return and nstereo_return. If nmono_return is greater than zero, then mono_info_return is set to the address of an array of * XmbufBufferInfo * structures describing the various visuals and depths that may be used. Otherwise, mono_info_return is set to NULL. Similarly, stereo_info_return is set according to nstereo_return. The storage returned in mono_info_return and stereo_info_return may be released by * XFree *. If no errors are encounted, non-zero will be returned.

* XmbufCreateStereoWindow * creates a stereo window in the same way that * XCreateWindow * creates a mono window. The buffer ids for the left and right buffers are returned in left_return and right_return, respectively. If an extension error handler that returns is installed, * None * will be returned if the extension is not available on this display.

PREDEFINED VALUES

Update_action field:

 MultibufferUpdateActionUndefined   MultibufferUpdateActionBackground   MultibufferUpdateActionUntouched   MultibufferUpdateActionCopied 

Update_hint field:

 MultibufferUpdateHintFrequent   MultibufferUpdateHintIntermittent   MultibufferUpdateHintStatic 

Valuemask fields:

 MultibufferWindowUpdateHint   MultibufferBufferEventMask 

Mono vs. stereo and left vs. right:

 MultibufferModeMono   MultibufferModeStereo   MultibufferSideMono   MultibufferSideLeft   MultibufferSideRight 

Clobber state:

 MultibufferUnclobbered   MultibufferPartiallyClobbered   MultibufferFullyClobbered 

Event stuff:

 MultibufferClobberNotifyMask   MultibufferUpdateNotifyMask   MultibufferClobberNotify   MultibufferUpdateNotify   MultibufferNumberEvents   MultibufferBadBuffer   MultibufferNumberErrors 

BUGS

This manual page needs more work.

SEE ALSO

Extending X for Double Buffering, Multi-Buffering, and Stereo

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2849 - Linux cli command putc_unlocked

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command putc_unlocked and provides detailed information about the command putc_unlocked, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the putc_unlocked.

NAME 🖥️ putc_unlocked 🖥️

nonlocking stdio functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdio.h>
int getc_unlocked(FILE *stream);
int getchar_unlocked(void);
int putc_unlocked(int c, FILE *stream);
int putchar_unlocked(int c);
void clearerr_unlocked(FILE *stream);
int feof_unlocked(FILE *stream);
int ferror_unlocked(FILE *stream);
int fileno_unlocked(FILE *stream);
int fflush_unlocked(FILE *_Nullable stream);
int fgetc_unlocked(FILE *stream);
int fputc_unlocked(int c, FILE *stream);
size_t fread_unlocked(void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
size_t fwrite_unlocked(const void ptr[restrict .size * .n],
 size_t size, size_t n,
 FILE *restrict stream);
char *fgets_unlocked(char s[restrict .n], int n",FILE*restrict"stream);
int fputs_unlocked(const char *restrict s, FILE *restrict stream);
#include <wchar.h>
wint_t getwc_unlocked(FILE *stream);
wint_t getwchar_unlocked(void);
wint_t fgetwc_unlocked(FILE *stream);
wint_t fputwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwc_unlocked(wchar_t wc, FILE *stream);
wint_t putwchar_unlocked(wchar_t wc);
wchar_t *fgetws_unlocked(wchar_t ws[restrict .n], int n,
 FILE *restrict stream);
int fputws_unlocked(const wchar_t *restrict ws,
 FILE *restrict stream);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getc_unlocked(), getchar_unlocked(), putc_unlocked(), putchar_unlocked():

    /* glibc >= 2.24: */ _POSIX_C_SOURCE >= 199309L
        || /* glibc <= 2.23: */ _POSIX_C_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

clearerr_unlocked(), feof_unlocked(), ferror_unlocked(), fileno_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked():

    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), getwchar_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwchar_unlocked(), fgetws_unlocked(), fputws_unlocked():

    _GNU_SOURCE

DESCRIPTION

Each of these functions has the same behavior as its counterpart without the “_unlocked” suffix, except that they do not use locking (they do not set locks themselves, and do not test for the presence of locks set by others) and hence are thread-unsafe. See flockfile(3).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getc_unlocked(), putc_unlocked(), clearerr_unlocked(), fflush_unlocked(), fgetc_unlocked(), fputc_unlocked(), fread_unlocked(), fwrite_unlocked(), fgets_unlocked(), fputs_unlocked(), getwc_unlocked(), fgetwc_unlocked(), fputwc_unlocked(), putwc_unlocked(), fgetws_unlocked(), fputws_unlocked()

Thread safety

MT-Safe race:stream

getchar_unlocked(), getwchar_unlocked()

Thread safety

MT-Unsafe race:stdin

putchar_unlocked(), putwchar_unlocked()

Thread safety

MT-Unsafe race:stdout

feof_unlocked(), ferror_unlocked(), fileno_unlocked()

Thread safetyMT-Safe

STANDARDS

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2008.

Others:
None.

HISTORY

getc_unlocked()
getchar_unlocked()
putc_unlocked()
putchar_unlocked()
POSIX.1-2001.

SEE ALSO

flockfile(3), stdio(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2850 - Linux cli command zip_file_get_comment

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_file_get_comment and provides detailed information about the command zip_file_get_comment, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_file_get_comment.

libzip (-lzip)

The

function returns the comment for the file at position

in the zip archive. The name is in UTF-8 encoding unless

was specified (see below). This pointer should not be modified or

and becomes invalid when

is closed. If

is not

the integer to which it points will be set to the length of the comment. If

is set to

the original unchanged comment is returned.

Additionally, the following

are supported:

Return the unmodified comment as it is in the ZIP archive.

(Default.) Guess the encoding of the comment in the ZIP archive and convert it to UTF-8, if necessary.

Follow the ZIP specification for file names and extend it to file comments, expecting them to be encoded in CP-437 in the ZIP archive (except if it is a UTF-8 comment from the special extra field). Convert it to UTF-8.

ASCII is a subset of both CP-437 and UTF-8.

Upon successful completion, a pointer to the comment is returned, or

if there is no comment. In case of an error,

is returned and the error code in

is set to indicate the error.

fails if:

is not a valid file index in

was added in libzip 0.11.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2851 - Linux cli command HTML_Treepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_Treepm and provides detailed information about the command HTML_Treepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_Treepm.

NAME 🖥️ HTML_Treepm 🖥️

build and scan parse-trees of HTML

VERSION

This document describes version 5.07 of HTML::Tree, released August 31, 2017 as part of HTML-Tree.

SYNOPSIS

use HTML::TreeBuilder; my $tree = HTML::TreeBuilder->new(); $tree->parse_file($filename); # Then do something with the tree, using HTML::Element # methods – for example: $tree->dump # Finally: $tree->delete;

DESCRIPTION

HTML-Tree is a suite of Perl modules for making parse trees out of HTML source. It consists of mainly two modules, whose documentation you should refer to: HTML::TreeBuilder and HTML::Element.

HTML::TreeBuilder is the module that builds the parse trees. (It uses HTML::Parser to do the work of breaking the HTML up into tokens.)

The tree that TreeBuilder builds for you is made up of objects of the class HTML::Element.

If you find that you do not properly understand the documentation for HTML::TreeBuilder and HTML::Element, it may be because you are unfamiliar with tree-shaped data structures, or with object-oriented modules in general. Sean Burke has written some articles for The Perl Journal (www.tpj.com) that seek to provide that background. The full text of those articles is contained in this distribution, as:

HTML::Tree::AboutObjects
User’s View of Object-Oriented Modules from TPJ17.

HTML::Tree::AboutTrees
Trees from TPJ18

HTML::Tree::Scanning
Scanning HTML from TPJ19

Readers already familiar with object-oriented modules and tree-shaped data structures should read just the last article. Readers without that background should read the first, then the second, and then the third.

METHODS

All these methods simply redirect to the corresponding method in HTML::TreeBuilder. It’s more efficient to use HTML::TreeBuilder directly, and skip loading HTML::Tree at all.

new

Redirects to new in HTML::TreeBuilder.

new_from_file

Redirects to new_from_file in HTML::TreeBuilder.

new_from_content

Redirects to new_from_content in HTML::TreeBuilder.

new_from_url

Redirects to new_from_url in HTML::TreeBuilder.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc HTML::Tree You can also look for information at:

  • AnnoCPAN: Annotated CPAN documentation <http://annocpan.org/dist/HTML-Tree>

  • CPAN Ratings <http://cpanratings.perl.org/d/HTML-Tree>

  • RT: CPAN’s request tracker <http://rt.cpan.org/NoAuth/Bugs.html?Dist=HTML-Tree>

  • Search CPAN <http://search.cpan.org/dist/HTML-Tree>

  • Stack Overflow <http://stackoverflow.com/questions/tagged/html-tree> If you have a question about how to use HTML-Tree, Stack Overflow is the place to ask it. Make sure you tag it both perl and html-tree.

SEE ALSO

HTML::TreeBuilder, HTML::Element, HTML::Tagset, HTML::Parser, HTML::DOMbo

The book Perl & LWP by Sean M. Burke published by O’Reilly and Associates, 2002. ISBN: 0-596-00178-9

It has several chapters to do with HTML processing in general, and HTML-Tree specifically. There’s more info at:

http://www.oreilly.com/catalog/perllwp/ http://www.amazon.com/exec/obidos/ASIN/0596001789

SOURCE REPOSITORY

HTML-Tree is now maintained using Git. The main public repository is <https://github.com/kentfredric/HTML-Tree>.

The best way to send a patch is to make a pull request there.

ACKNOWLEDGEMENTS

Thanks to Gisle Aas, Sean Burke and Andy Lester for their original work.

Thanks to Chicago Perl Mongers (http://chicago.pm.org) for their patches submitted to HTML::Tree as part of the Phalanx project (http://qa.perl.org/phalanx).

Thanks to the following people for additional patches and documentation: Terrence Brannon, Gordon Lack, Chris Madsen and Ricardo Signes.

AUTHOR

Current maintainers:

  • Christopher J. Madsen <perl AT cjmweb.net>

  • Jeff Fearn <jfearn AT cpan.org>

Original HTML-Tree author:

  • Gisle Aas

Former maintainers:

  • Sean M. Burke

  • Andy Lester

  • Pete Krawczyk <petek AT cpan.org>

You can follow or contribute to HTML-Tree’s development at <https://github.com/kentfredric/HTML-Tree>.

COPYRIGHT AND LICENSE

Copyright 1995-1998 Gisle Aas, 1999-2004 Sean M. Burke, 2005 Andy Lester, 2006 Pete Krawczyk, 2010 Jeff Fearn, 2012 Christopher J. Madsen. (Except the articles contained in HTML::Tree::AboutObjects, HTML::Tree::AboutTrees, and HTML::Tree::Scanning, which are all copyright 2000 The Perl Journal.)

Except for those three TPJ articles, the whole HTML-Tree distribution, of which this file is a part, is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Those three TPJ articles may be distributed under the same terms as Perl itself.

The programs in this library are distributed in the hope that they will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2852 - Linux cli command XtInsertEventHandler

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtInsertEventHandler and provides detailed information about the command XtInsertEventHandler, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtInsertEventHandler.

NAME 🖥️ XtInsertEventHandler 🖥️

add and remove event handlers

SYNTAX

#include <X11/Intrinsic.h>

void XtAddEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data);

void XtAddRawEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data);

void XtRemoveEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data);

void XtRemoveRawEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data);

void XtInsertEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data, XtListPosition position);

void XtInsertRawEventHandler(Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data, XtListPosition position);

typedef enum { XtListHead, XtListTail } XtListPosition;

ARGUMENTS

client_data
Specifies additional data to be passed to the client’s event handler.

event_mask
Specifies the event mask for which to call or unregister this procedure.

nonmaskable
Specifies a Boolean value that indicates whether this procedure should be called or removed on the nonmaskable events ( GraphicsExpose, NoExpose, SelectionClear, SelectionRequest, SelectionNotify, ClientMessage, and MappingNotify).

proc
Specifies the procedure that is to be added or removed.

  1. Specifies the widget for which this event handler is being registered.

position
Specifies when the event handler is to be called relative to other previously registered handlers.

DESCRIPTION

The XtAddEventHandler function registers a procedure with the dispatch mechanism that is to be called when an event that matches the mask occurs on the specified widget. If the procedure is already registered with the same client_data, the specified mask is ORed into the existing mask. If the widget is realized, XtAddEventHandler calls XSelectInput, if necessary.

The XtAddRawEventHandler function is similar to XtAddEventHandler except that it does not affect the widget’s mask and never causes an XSelectInput for its events. Note that the widget might already have those mask bits set because of other nonraw event handlers registered on it.

The XtRemoveRawEventHandler function stops the specified procedure from receiving the specified events. Because the procedure is a raw event handler, this does not affect the widget’s mask and never causes a call on XSelectInput.

XtInsertEventHandler is identical to XtAddEventHandler with the additional position argument. If position is XtListHead, the event handler is registered to that it will be called before any event handlers that were previously registered for the same widget. If position is XtListTail, the event handler is registered to be called after any previously registered event handlers. If the procedure is already registered with the same client_data value, the specified mask augments the existing mask and the procedure is repositioned in the list.

XtInsertRawEventHandler is similar to XtInsertEventHandler except that it does not modify the widget’s event mask and never causes an XSelectInput for the specified events. If the procedure is already registered with the same client_data value, the specified mask augments the existing mask and the procedure is repositioned in the list.

SEE ALSO

XtAppNextEvent(3), XtBuildEventMask(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2853 - Linux cli command getrpcent_r

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getrpcent_r and provides detailed information about the command getrpcent_r, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getrpcent_r.

NAME 🖥️ getrpcent_r 🖥️

get RPC entry (reentrant)

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
int getrpcent_r(struct rpcent *result_buf, char buf[.buflen],
 size_t buflen, struct rpcent **result);
int getrpcbyname_r(const char *name,
 struct rpcent *result_buf, char buf[.buflen],
 size_t buflen, struct rpcent **result);
int getrpcbynumber_r(int number,
 struct rpcent *result_buf, char buf[.buflen],
 size_t buflen, struct rpcent **result);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getrpcent_r(), getrpcbyname_r(), getrpcbynumber_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.19 and earlier:
        _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

The getrpcent_r(), getrpcbyname_r(), and getrpcbynumber_r() functions are the reentrant equivalents of, respectively, getrpcent(3), getrpcbyname(3), and getrpcbynumber(3). They differ in the way that the rpcent structure is returned, and in the function calling signature and return value. This manual page describes just the differences from the nonreentrant functions.

Instead of returning a pointer to a statically allocated rpcent structure as the function result, these functions copy the structure into the location pointed to by result_buf.

The buf array is used to store the string fields pointed to by the returned rpcent structure. (The nonreentrant functions allocate these strings in static storage.) The size of this array is specified in buflen. If buf is too small, the call fails with the error ERANGE, and the caller must try again with a larger buffer. (A buffer of length 1024 bytes should be sufficient for most applications.)

If the function call successfully obtains an RPC record, then *result is set pointing to result_buf; otherwise, *result is set to NULL.

RETURN VALUE

On success, these functions return 0. On error, they return one of the positive error numbers listed in ERRORS.

On error, record not found (getrpcbyname_r(), getrpcbynumber_r()), or end of input (getrpcent_r()) result is set to NULL.

ERRORS

ENOENT
(getrpcent_r()) No more records in database.

ERANGE
buf is too small. Try again with a larger buffer (and increased buflen).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getrpcent_r(), getrpcbyname_r(), getrpcbynumber_r()

Thread safetyMT-Safe locale

VERSIONS

Functions with similar names exist on some other systems, though typically with different calling signatures.

STANDARDS

GNU.

SEE ALSO

getrpcent(3), rpc(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2854 - Linux cli command XtNameToWidget

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtNameToWidget and provides detailed information about the command XtNameToWidget, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtNameToWidget.

NAME 🖥️ XtNameToWidget 🖥️

translating strings to widgets or widgets to windows

SYNTAX

#include <X11/Intrinsic.h>

Widget XtNameToWidget(Widget reference, const char *names);

Widget XtWindowToWidget(Display *display, Window window);

ARGUMENTS

display
Specifies the display on which the window is defined.

names
Specifies the fully qualified name of the desired widget.

reference
Specifies the widget from which the search is to start.

window
Specify the window for which you want the widget.

DESCRIPTION

The XtNameToWidget function looks for a widget whose name is the first component in the specified names and that is a pop-up child of reference (or a normal child if reference is a subclass of compositeWidgetClass). It then uses that widget as the new reference and repeats the search after deleting the first component from the specified names. If it cannot find the specified widget, XtNameToWidget returns NULL.

Note that the names argument contains the name of a widget with respect to the specified reference widget and can contain more than one widget name (separated by periods) for widgets that are not direct children of the specified reference widget.

If more than one child of the reference widget matches the name, XtNameToWidget can return any of the children. The Intrinsics do not require that all children of a widget have unique names. If the specified names contain more than one component and if more than one child matches the first component, XtNameToWidget can return NULL if the single branch that it follows does not contain the named widget. That is, XtNameToWidget does not back up and follow other matching branches of the widget tree.

The XtWindowToWidget function translates the specified window and display pointer into the appropriate widget instance.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2855 - Linux cli command LWP_ConnCachepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command LWP_ConnCachepm and provides detailed information about the command LWP_ConnCachepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the LWP_ConnCachepm.

NAME 🖥️ LWP_ConnCachepm 🖥️

Connection cache manager

NOTE

This module is experimental. Details of its interface is likely to change in the future.

SYNOPSIS

use LWP::ConnCache; my $cache = LWP::ConnCache->new; $cache->deposit($type, $key, $sock); $sock = $cache->withdraw($type, $key);

DESCRIPTION

The LWP::ConnCache class is the standard connection cache manager for LWP::UserAgent.

METHODS

The following basic methods are provided:

new

my $cache = LWP::ConnCache->new( %options )

This method constructs a new LWP::ConnCache object. The only option currently accepted is total_capacity. If specified it initializes the “total_capacity” in LWP::ConnCache option. It defaults to 1.

total_capacity

my $cap = $cache->total_capacity; $cache->total_capacity(0); # drop all immediately $cache->total_capacity(undef); # no limit $cache->total_capacity($number);

Get/sets the number of connection that will be cached. Connections will start to be dropped when this limit is reached. If set to 0, then all connections are immediately dropped. If set to undef, then there is no limit.

capacity

my $http_capacity = $cache->capacity(http); $cache->capacity(http, 2 );

Get/set a limit for the number of connections of the specified type that can be cached. The first parameter is a short string like "http" or "ftp".

drop

$cache->drop(); # Drop ALL connections # which is just a synonym for: $cache->drop(sub{1}); # Drop ALL connections # drop all connections older than 22 seconds and add a reason for it! $cache->drop(22, “Older than 22 secs dropped”); # which is just a synonym for: $cache->drop(sub { my ($conn, $type, $key, $deposit_time) = @_; if ($deposit_time < 22) { # true values drop the connection return 1; } # false values dont drop the connection return 0; }, “Older than 22 secs dropped” );

Drop connections by some criteria. The $checker argument is a subroutine that is called for each connection. If the routine returns a TRUE value then the connection is dropped. The routine is called with ($conn, $type, $key, $deposit_time) as arguments.

Shortcuts: If the $checker argument is absent (or undef) all cached connections are dropped. If the $checker is a number then all connections untouched that the given number of seconds or more are dropped. If $checker is a string then all connections of the given type are dropped.

The reason is passed on to the “dropped” in LWP::ConnCache method.

prune

$cache->prune();

Calling this method will drop all connections that are dead. This is tested by calling the “ping” in LWP::ConnCache method on the connections. If the “ping” in LWP::ConnCache method exists and returns a false value, then the connection is dropped.

get_types

my @types = $cache->get_types();

This returns all the type fields used for the currently cached connections.

get_connections

my @conns = $cache->get_connections(); # all connections my @conns = $cache->get_connections(http); # connections for http

This returns all connection objects of the specified type. If no type is specified then all connections are returned. In scalar context the number of cached connections of the specified type is returned.

PROTOCOL METHODS

The following methods are called by low-level protocol modules to try to save away connections and to get them back.

deposit

$cache->deposit($type, $key, $conn);

This method adds a new connection to the cache. As a result, other already cached connections might be dropped. Multiple connections with the same type/key might be added.

withdraw

my $conn = $cache->withdraw($type, $key);

This method tries to fetch back a connection that was previously deposited. If no cached connection with the specified $type/$key is found, then undef is returned. There is not guarantee that a deposited connection can be withdrawn, as the cache manger is free to drop connections at any time.

INTERNAL METHODS

The following methods are called internally. Subclasses might want to override them.

enforce_limits

$conn->enforce_limits([$type])

This method is called with after a new connection is added (deposited) in the cache or capacity limits are adjusted. The default implementation drops connections until the specified capacity limits are not exceeded.

dropping

$conn->dropping($conn_record, $reason)

This method is called when a connection is dropped. The record belonging to the dropped connection is passed as the first argument and a string describing the reason for the drop is passed as the second argument. The default implementation makes some noise if the $LWP::ConnCache::DEBUG variable is set and nothing more.

SUBCLASSING

For specialized cache policy it makes sense to subclass LWP::ConnCache and perhaps override the “deposit” in LWP::ConnCache, “enforce_limits” in LWP::ConnCache, and “dropping” in LWP::ConnCache methods.

The object itself is a hash. Keys prefixed with cc_ are reserved for the base class.

SEE ALSO

LWP::UserAgent

COPYRIGHT

Copyright 2001 Gisle Aas.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2856 - Linux cli command va_end

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command va_end and provides detailed information about the command va_end, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the va_end.

NAME 🖥️ va_end 🖥️

variable argument lists

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdarg.h>
void va_start(va_list ap, last);
type va_arg(va_list ap, type);
void va_end(va_list ap);
void va_copy(va_list dest, va_list src);

DESCRIPTION

A function may be called with a varying number of arguments of varying types. The include file <stdarg.h> declares a type va_list and defines three macros for stepping through a list of arguments whose number and types are not known to the called function.

The called function must declare an object of type va_list which is used by the macros va_start(), va_arg(), and va_end().

va_start()

The va_start() macro initializes ap for subsequent use by va_arg() and va_end(), and must be called first.

The argument last is the name of the last argument before the variable argument list, that is, the last argument of which the calling function knows the type.

Because the address of this argument may be used in the va_start() macro, it should not be declared as a register variable, or as a function or an array type.

va_arg()

The va_arg() macro expands to an expression that has the type and value of the next argument in the call. The argument ap is the va_list ap initialized by va_start(). Each call to va_arg() modifies ap so that the next call returns the next argument. The argument type is a type name specified so that the type of a pointer to an object that has the specified type can be obtained simply by adding a * to type.

The first use of the va_arg() macro after that of the va_start() macro returns the argument after last. Successive invocations return the values of the remaining arguments.

If there is no next argument, or if type is not compatible with the type of the actual next argument (as promoted according to the default argument promotions), random errors will occur.

If ap is passed to a function that uses va_arg(ap,type), then the value of ap is undefined after the return of that function.

va_end()

Each invocation of va_start() must be matched by a corresponding invocation of va_end() in the same function. After the call va_end(ap) the variable ap is undefined. Multiple traversals of the list, each bracketed by va_start() and va_end() are possible. va_end() may be a macro or a function.

va_copy()

The va_copy() macro copies the (previously initialized) variable argument list src to dest. The behavior is as if va_start() were applied to dest with the same last argument, followed by the same number of va_arg() invocations that was used to reach the current state of src.

An obvious implementation would have a va_list be a pointer to the stack frame of the variadic function. In such a setup (by far the most common) there seems nothing against an assignment

va_list aq = ap;

Unfortunately, there are also systems that make it an array of pointers (of length 1), and there one needs

va_list aq;
*aq = *ap;

Finally, on systems where arguments are passed in registers, it may be necessary for va_start() to allocate memory, store the arguments there, and also an indication of which argument is next, so that va_arg() can step through the list. Now va_end() can free the allocated memory again. To accommodate this situation, C99 adds a macro va_copy(), so that the above assignment can be replaced by

va_list aq;
va_copy(aq, ap);
...
va_end(aq);

Each invocation of va_copy() must be matched by a corresponding invocation of va_end() in the same function. Some systems that do not supply va_copy() have __va_copy instead, since that was the name used in the draft proposal.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

va_start(), va_end(), va_copy()

Thread safetyMT-Safe

va_arg()

Thread safetyMT-Safe race:ap

STANDARDS

C11, POSIX.1-2008.

HISTORY

va_start()
va_arg()
va_end()
C89, POSIX.1-2001.

va_copy()
C99, POSIX.1-2001.

CAVEATS

Unlike the historical varargs macros, the stdarg macros do not permit programmers to code a function with no fixed arguments. This problem generates work mainly when converting varargs code to stdarg code, but it also creates difficulties for variadic functions that wish to pass all of their arguments on to a function that takes a va_list argument, such as vfprintf(3).

EXAMPLES

The function foo takes a string of format characters and prints out the argument associated with each format character based on the type.

#include <stdio.h>
#include <stdarg.h>
void
foo(char *fmt, ...)   /* '...' is C syntax for a variadic function */
{
    va_list ap;
    int d;
    char c;
    char *s;
    va_start(ap, fmt);
    while (*fmt)
        switch (*fmt++) {
        case 's':              /* string */
            s = va_arg(ap, char *);
            printf("string %s

“, s); break; case ’d’: /* int / d = va_arg(ap, int); printf(“int %d “, d); break; case ‘c’: / char / / need a cast here since va_arg only takes fully promoted types */ c = (char) va_arg(ap, int); printf(“char %c “, c); break; } va_end(ap); }

SEE ALSO

vprintf(3), vscanf(3), vsyslog(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2857 - Linux cli command getpass

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getpass and provides detailed information about the command getpass, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getpass.

NAME 🖥️ getpass 🖥️

get a password

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
[[deprecated]] char *getpass(const char *prompt);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

getpass():

    Since glibc 2.2.2:
        _XOPEN_SOURCE && ! (_POSIX_C_SOURCE >= 200112L)
            || /* glibc >= 2.19: */ _DEFAULT_SOURCE
            || /* glibc <= 2.19: */ _BSD_SOURCE
    Before glibc 2.2.2:
        none

DESCRIPTION

This function is obsolete. Do not use it. See NOTES. If you want to read input without terminal echoing enabled, see the description of the ECHO flag in termios(3).

The getpass() function opens /dev/tty (the controlling terminal of the process), outputs the string prompt, turns off echoing, reads one line (the “password”), restores the terminal state and closes /dev/tty again.

RETURN VALUE

The function getpass() returns a pointer to a static buffer containing (the first PASS_MAX bytes of) the password without the trailing newline, terminated by a null byte (‘�’). This buffer may be overwritten by a following call. On error, the terminal state is restored, errno is set to indicate the error, and NULL is returned.

ERRORS

ENXIO
The process does not have a controlling terminal.

FILES

/dev/tty

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getpass()

Thread safetyMT-Unsafe term

STANDARDS

None.

HISTORY

Version 7 AT&T UNIX. Present in SUSv2, but marked LEGACY. Removed in POSIX.1-2001.

NOTES

You should use instead readpassphrase(3bsd), provided by libbsd.

In the GNU C library implementation, if /dev/tty cannot be opened, the prompt is written to stderr and the password is read from stdin. There is no limit on the length of the password. Line editing is not disabled.

According to SUSv2, the value of PASS_MAX must be defined in <limits.h> in case it is smaller than 8, and can in any case be obtained using sysconf(_SC_PASS_MAX). However, POSIX.2 withdraws the constants PASS_MAX and _SC_PASS_MAX, and the function getpass(). The glibc version accepts _SC_PASS_MAX and returns BUFSIZ (e.g., 8192).

BUGS

The calling process should zero the password as soon as possible to avoid leaving the cleartext password visible in the process’s address space.

SEE ALSO

crypt(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2858 - Linux cli command Image_ExifTool_Lang_fipm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Lang_fipm and provides detailed information about the command Image_ExifTool_Lang_fipm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Lang_fipm.

NAME 🖥️ Image_ExifTool_Lang_fipm 🖥️

ExifTool Finnish language translations

DESCRIPTION

This file is used by Image::ExifTool to generate localized tag descriptions and values.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

ACKNOWLEDGEMENTS

Thanks to Jens Duttke and Jarkko Mäkineva for providing this translation.

SEE ALSO

Image::ExifTool (3pm), Image::ExifTool::TagInfoXML (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2859 - Linux cli command Spreadsheet_ParseExcel_SaveParserpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_ParseExcel_SaveParserpm and provides detailed information about the command Spreadsheet_ParseExcel_SaveParserpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_ParseExcel_SaveParserpm.

NAME 🖥️ Spreadsheet_ParseExcel_SaveParserpm 🖥️

Rewrite an existing Excel file.

SYNOPSIS

Say we start with an Excel file that looks like this:

—————————————————– | | A | B | C | —————————————————– | 1 | Hello | … | … | … | 2 | World | … | … | … | 3 | *Bold text* | … | … | … | 4 | … | … | … | … | 5 | … | … | … | …

Then we process it with the following program:

#!/usr/bin/perl use strict; use warnings; use Spreadsheet::ParseExcel; use Spreadsheet::ParseExcel::SaveParser; # Open an existing file with SaveParser my $parser = Spreadsheet::ParseExcel::SaveParser->new(); my $template = $parser->Parse(template.xls); # Get the first worksheet. my $worksheet = $template->worksheet(0); my $row = 0; my $col = 0; # Overwrite the string in cell A1 $worksheet->AddCell( $row, $col, New string ); # Add a new string in cell B1 $worksheet->AddCell( $row, $col + 1, Newer ); # Add a new string in cell C1 with the format from cell A3. my $cell = $worksheet->get_cell( $row + 2, $col ); my $format_number = $cell->{FormatNo}; $worksheet->AddCell( $row, $col + 2, Newest, $format_number ); # Write over the existing file or write a new file. $template->SaveAs(newfile.xls);

We should now have an Excel file that looks like this:

—————————————————– | | A | B | C | —————————————————– | 1 | New string | Newer | *Newest* | … | 2 | World | … | … | … | 3 | *Bold text* | … | … | … | 4 | … | … | … | … | 5 | … | … | … | …

DESCRIPTION

The Spreadsheet::ParseExcel::SaveParser module rewrite an existing Excel file by reading it with Spreadsheet::ParseExcel and rewriting it with Spreadsheet::WriteExcel.

METHODS

Parser

new()

$parse = new Spreadsheet::ParseExcel::SaveParser();

Constructor.

Parse()

$workbook = $parse->Parse($sFileName); $workbook = $parse->Parse($sFileName , $formatter);

Returns a Workbook object. If an error occurs, returns undef.

The optional $formatter is a Formatter Class to format the value of cells.

Workbook

The Parse() method returns a Spreadsheet::ParseExcel::SaveParser::Workbook object.

This is a subclass of the Spreadsheet::ParseExcel::Workbook and has the following methods:

worksheets()

Returns an array of Worksheet objects. This was most commonly used to iterate over the worksheets in a workbook:

for my $worksheet ( $workbook->worksheets() ) { … }

worksheet()

The worksheet() method returns a single Worksheet object using either its name or index:

$worksheet = $workbook->worksheet(Sheet1); $worksheet = $workbook->worksheet(0);

Returns undef if the sheet name or index doesn’t exist.

AddWorksheet()

$workbook = $workbook->AddWorksheet($name, %properties);

Create a new Worksheet object of type Spreadsheet::ParseExcel::Worksheet.

The %properties hash contains the properties of new Worksheet.

AddFont

$workbook = $workbook->AddFont(%properties);

Create new Font object of type Spreadsheet::ParseExcel::Font.

The %properties hash contains the properties of new Font.

AddFormat

$workbook = $workbook->AddFormat(%properties);

The %properties hash contains the properties of new Font.

Worksheet

Spreadsheet::ParseExcel::SaveParser::Worksheet

Worksheet is a subclass of Spreadsheet::ParseExcel::Worksheet. And has these methods :

The Worksbook::worksheet() method returns a Spreadsheet::ParseExcel::SaveParser::Worksheet object.

This is a subclass of the Spreadsheet::ParseExcel::Worksheet and has the following methods:

AddCell

$workbook = $worksheet->AddCell($row, $col, $value, $format [$encoding]);

Create new Cell object of type Spreadsheet::ParseExcel::Cell.

The $format parameter is the format number rather than a full format object.

To specify just same as another cell, you can set it like below:

$row = 0; $col = 0; $worksheet = $template->worksheet(0); $cell = $worksheet->get_cell( $row, $col ); $format_number = $cell->{FormatNo}; $worksheet->AddCell($row +1, $coll, New data, $format_number);

TODO

Please note that this module is currently (versions 0.50-0.60) undergoing a major restructuring and rewriting.

Known Problems

You can only rewrite the features that Spreadsheet::WriteExcel supports so macros, graphs and some other features in the original Excel file will be lost. Also, formulas aren’t rewritten, only the result of a formula is written.

Only last print area will remain. (Others will be removed)

AUTHOR

Current maintainer 0.60+: Douglas Wilson [email protected]

Maintainer 0.40-0.59: John McNamara [email protected]

Maintainer 0.27-0.33: Gabor Szabo [email protected]

Original author: Kawai Takanori [email protected]

COPYRIGHT

Copyright (c) 2014 Douglas Wilson

Copyright (c) 2009-2013 John McNamara

Copyright (c) 2006-2008 Gabor Szabo

Copyright (c) 2000-2002 Kawai Takanori and Nippon-RAD Co. OP Division

All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2860 - Linux cli command pthread_attr_getschedparam

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_attr_getschedparam and provides detailed information about the command pthread_attr_getschedparam, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_attr_getschedparam.

NAME 🖥️ pthread_attr_getschedparam 🖥️

set/get scheduling parameter attributes in thread attributes object

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
int pthread_attr_setschedparam(pthread_attr_t *restrict attr,
 const struct sched_param *restrict param);
int pthread_attr_getschedparam(const pthread_attr_t *restrict attr,
 struct sched_param *restrict param);

DESCRIPTION

The pthread_attr_setschedparam() function sets the scheduling parameter attributes of the thread attributes object referred to by attr to the values specified in the buffer pointed to by param. These attributes determine the scheduling parameters of a thread created using the thread attributes object attr.

The pthread_attr_getschedparam() returns the scheduling parameter attributes of the thread attributes object attr in the buffer pointed to by param.

Scheduling parameters are maintained in the following structure:

struct sched_param {
    int sched_priority;     /* Scheduling priority */
};

As can be seen, only one scheduling parameter is supported. For details of the permitted ranges for scheduling priorities in each scheduling policy, see sched(7).

In order for the parameter setting made by pthread_attr_setschedparam() to have effect when calling pthread_create(3), the caller must use pthread_attr_setinheritsched(3) to set the inherit-scheduler attribute of the attributes object attr to PTHREAD_EXPLICIT_SCHED.

RETURN VALUE

On success, these functions return 0; on error, they return a nonzero error number.

ERRORS

pthread_attr_setschedparam() can fail with the following error:

EINVAL
The priority specified in param does not make sense for the current scheduling policy of attr.

POSIX.1 also documents an ENOTSUP error for pthread_attr_setschedparam(). This value is never returned on Linux (but portable and future-proof applications should nevertheless handle this error return value).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_attr_setschedparam(), pthread_attr_getschedparam()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001. glibc 2.0.

NOTES

See pthread_attr_setschedpolicy(3) for a list of the thread scheduling policies supported on Linux.

EXAMPLES

See pthread_setschedparam(3).

SEE ALSO

sched_get_priority_min(2), pthread_attr_init(3), pthread_attr_setinheritsched(3), pthread_attr_setschedpolicy(3), pthread_create(3), pthread_setschedparam(3), pthread_setschedprio(3), pthreads(7), sched(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2861 - Linux cli command Image_ExifTool_Fixuppm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Fixuppm and provides detailed information about the command Image_ExifTool_Fixuppm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Fixuppm.

NAME 🖥️ Image_ExifTool_Fixuppm 🖥️

Utility to handle pointer fixups

SYNOPSIS

use Image::ExifTool::Fixup; $fixup = Image::ExifTool::Fixup->new; # add a new fixup to a pointer at the specified offset in data $fixup->AddFixup($offset); # add a new Fixup object to the tree $fixup->AddFixup($subFixup); $fixup->{Start} += $shift1; # shift pointer offsets and values $fixup->{Shift} += $shift2; # shift pointer values only # recursively apply fixups to the specified data $fixup->ApplyFixups(\data); $fixup->Dump(); # dump debugging information $fixup->IsEmpty(); # return true if no offsets to fix

DESCRIPTION

This module contains the code to keep track of pointers in memory and to shift these pointers as required. It is used by ExifTool to maintain the pointers in image file directories (IFD’s).

NOTES

Keeps track of pointers with different byte ordering, and relies on Image::ExifTool::GetByteOrder() to determine the current byte ordering when adding new pointers to a fixup.

Maintains a hierarchical list of fixups so that the whole hierarchy can be shifted by a simple shift at the base. Hierarchy is collapsed to a linear list when ApplyFixups() is called.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2862 - Linux cli command llrintl

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command llrintl and provides detailed information about the command llrintl, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the llrintl.

NAME 🖥️ llrintl 🖥️

round to nearest integer

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
long lrint(double x);
long lrintf(float x);
long lrintl(long double x);
long long llrint(double x);
long long llrintf(float x);
long long llrintl(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions round their argument to the nearest integer value, using the current rounding direction (see fesetround(3)).

Note that unlike the rint(3) family of functions, the return type of these functions differs from that of their arguments.

RETURN VALUE

These functions return the rounded integer value.

If x is a NaN or an infinity, or the rounded value is too large to be stored in a long (long long in the case of the ll* functions), then a domain error occurs, and the return value is unspecified.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is a NaN or infinite, or the rounded value is too large
An invalid floating-point exception (FE_INVALID) is raised.

These functions do not set errno.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

lrint(), lrintf(), lrintl(), llrint(), llrintf(), llrintl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

ceil(3), floor(3), lround(3), nearbyint(3), rint(3), round(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2863 - Linux cli command Moose_Manual_Delegationpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Manual_Delegationpm and provides detailed information about the command Moose_Manual_Delegationpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Manual_Delegationpm.

NAME 🖥️ Moose_Manual_Delegationpm 🖥️

Attribute delegation

VERSION

version 2.2207

WHAT IS DELEGATION?

Delegation is a feature that lets you create “proxy” methods that do nothing more than call some other method on an attribute. This lets you simplify a complex set of “has-a” relationships and present a single unified API from one class.

With delegation, consumers of a class don’t need to know about all the objects it contains, reducing the amount of API they need to learn.

Delegations are defined as a mapping between one or more methods provided by the “real” class (the delegatee), and a set of corresponding methods in the delegating class. The delegating class can re-use the method names provided by the delegatee or provide its own names.

Delegation is also a great way to wrap an existing class, especially a non-Moose class or one that is somehow hard (or impossible) to subclass.

DEFINING A MAPPING

Moose offers a number of options for defining a delegation’s mapping, ranging from simple to complex.

The simplest form is to simply specify a list of methods:

package Website; use Moose; has uri => ( is => ro, isa => URI, handles => [qw( host path )], );

Using an arrayref tells Moose to create methods in your class that match the method names in the delegated class.

With this definition, we can call $website->host and it “just works”. Under the hood, Moose will call $website->uri->host for you. Note that $website is not automatically passed to the host method; the invocant is $website->uri.

We can also define a mapping as a hash reference. This allows you to rename methods as part of the mapping:

package Website; use Moose; has uri => ( is => ro, isa => URI, handles => { hostname => host, path => path, }, );

Using a hash tells Moose to create method names (specified on the left) which invoke the delegated class methods (specified on the right).

In this example, we’ve created a $website->hostname method, rather than simply using URI.pm’s name, host in the Website class.

These two mapping forms are the ones you will use most often. The remaining methods are a bit more complex.

has uri => ( is => ro, isa => URI, handles => qr/^(?:host|path|query.*)/, );

This is similar to the array version, except it uses the regex to match against all the methods provided by the delegatee. In order for this to work, you must provide an isa parameter for the attribute, and it must be a class. Moose uses this to introspect the delegatee class and determine what methods it provides.

You can use a role name as the value of handles:

has uri => ( is => ro, isa => URI, handles => HasURI, );

Moose will introspect the role to determine what methods it provides and create a name-for-name mapping for each of those methods.

Finally, you can provide a sub reference to generate a mapping that behaves like the hash example above. You probably won’t need this version often (if ever). See the Moose docs for more details on exactly how this works.

NATIVE DELEGATION

Native delegations allow you to delegate to standard Perl data structures as if they were objects.

has queue => ( traits => [Array], isa => ArrayRef[Item], default => sub { [ ] }, handles => { add_item => push, next_item => shift, }, )

The Array trait in the traits parameter tells Moose that you would like to use the set of Array helpers. Moose will then create add_item and next_item methods that “just work”. Behind the scenes add_item is something like

sub add_item { my ($self, @items) = @_; for my $item (@items) { $Item_TC->validate($item); } push @{ $self->queue }, @items; }

For example, you might use Array helpers to add add_task and add_appointment methods to a Calendar class:

has tasks => ( traits => [Array], isa => ArrayRef[Task], default => sub { [ ] }, handles => { add_task => push, next_task => shift, }, ); has appointments => ( traits => [Array], isa => ArrayRef[Appointment], default => sub { [ ] }, handles => { add_appointment => push, next_appointment => shift, }, );

Which you would call as:

$calendar->add_task( $task_obj ); $calendar->add_appointment( $appointment_obj );

As mentioned above, each trait provides a number of methods which are summarized below. For more information about each of these provided methods see the documentation for that specific trait.

Moose includes the following traits for native delegation.

  • Array The following methods are provided by the native Array trait: count, is_empty, elements, get, pop, push, shift, unshift, splice, first, first_index, grep, map, reduce, sort, sort_in_place, shuffle, uniq, join, set, delete, insert, clear, accessor, natatime, shallow_clone

  • Bool The following methods are provided by the native Bool trait: set, unset, toggle, not

  • Code The following methods are provided by the native Code trait: execute, execute_method

  • Counter The following methods are provided by the native Counter trait: set, inc, dec, reset

  • Hash The following methods are provided by the native Hash trait: get, set, delete, keys, exists, defined, values, kv, elements, clear, count, is_empty, accessor, shallow_clone

  • Number The following methods are provided by the native Number trait: add, sub, mul, div, mod, abs

  • String The following methods are provided by the native String trait: inc, append, prepend, replace, match, chop, chomp, clear, length, substr

CURRYING

Currying allows you to create a method with some pre-set parameters. You can create a curried delegation method:

package Spider; use Moose; has request => ( is => ro isa => HTTP::Request, handles => { set_user_agent => [ header => UserAgent ], }, )

With this definition, calling $spider->set_user_agent(MyClient) will call $spider->request->header(UserAgent, MyClient) behind the scenes.

Note that with currying, the currying always starts with the first parameter to a method ($_[0]). Any arguments you pass to the delegation come after the curried arguments.

MISSING ATTRIBUTES

It is perfectly valid to delegate methods to an attribute which is not required or can be undefined. When a delegated method is called, Moose will throw a runtime error if the attribute does not contain an object.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2864 - Linux cli command XtErrorMsg

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtErrorMsg and provides detailed information about the command XtErrorMsg, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtErrorMsg.

NAME 🖥️ XtErrorMsg 🖥️

high-level error handlers

SYNTAX

#include <X11/Intrinsic.h>

void XtErrorMsg(const char *name, const char *type, const char *class, const char *defaultMsg, String *params, Cardinal *num_params);

void XtSetErrorMsgHandler(XtErrorMsgHandler msg_handler);

void XtSetWarningMsgHandler(XtErrorMsgHandler msg_handler);

void XtWarningMsg(const char *name, const char *type, const char *class, const char *defaultMsg, String *params, Cardinal *num_params);

ARGUMENTS

class
Specifies the resource class of the error message.

default
Specifies the default message to use.

name
Specifies the general kind of error.

type
Specifies the detailed name of the error.

msg_handler
Specifies the new fatal error procedure, which should not return or the nonfatal error procedure, which usually returns.

num_params
Specifies the number of values in the parameter list.

params
Specifies a pointer to a list of values to be stored in the message.

DESCRIPTION

The XtErrorMsg function has been superceded by XtAppErrorMsg.

The XtSetErrorMsgHandler function has been superceded by XtAppSetErrorMsgHandler.

The XtSetWarningMsgHandler function has been superceded by XtAppSetWarningMsgHandler.

The XtWarningMsg function has been superceded by XtAppWarningMsg

SEE ALSO

XtAppErrorMsg(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2865 - Linux cli command getenv

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getenv and provides detailed information about the command getenv, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getenv.

NAME 🖥️ getenv 🖥️

get an environment variable

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
char *getenv(const char *name);
char *secure_getenv(const char *name);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

secure_getenv():

    _GNU_SOURCE

DESCRIPTION

The getenv() function searches the environment list to find the environment variable name, and returns a pointer to the corresponding value string.

The GNU-specific secure_getenv() function is just like getenv() except that it returns NULL in cases where “secure execution” is required. Secure execution is required if one of the following conditions was true when the program run by the calling process was loaded:

  • the process’s effective user ID did not match its real user ID or the process’s effective group ID did not match its real group ID (typically this is the result of executing a set-user-ID or set-group-ID program);

  • the effective capability bit was set on the executable file; or

  • the process has a nonempty permitted capability set.

Secure execution may also be required if triggered by some Linux security modules.

The secure_getenv() function is intended for use in general-purpose libraries to avoid vulnerabilities that could occur if set-user-ID or set-group-ID programs accidentally trusted the environment.

RETURN VALUE

The getenv() function returns a pointer to the value in the environment, or NULL if there is no match.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getenv(), secure_getenv()

Thread safetyMT-Safe env

STANDARDS

getenv()
C11, POSIX.1-2008.

secure_getenv()
GNU.

HISTORY

getenv()
POSIX.1-2001, C89, C99, SVr4, 4.3BSD.

secure_getenv()
glibc 2.17.

NOTES

The strings in the environment list are of the form name=value.

As typically implemented, getenv() returns a pointer to a string within the environment list. The caller must take care not to modify this string, since that would change the environment of the process.

The implementation of getenv() is not required to be reentrant. The string pointed to by the return value of getenv() may be statically allocated, and can be modified by a subsequent call to getenv(), putenv(3), setenv(3), or unsetenv(3).

The “secure execution” mode of secure_getenv() is controlled by the AT_SECURE flag contained in the auxiliary vector passed from the kernel to user space.

SEE ALSO

clearenv(3), getauxval(3), putenv(3), setenv(3), unsetenv(3), capabilities(7), environ(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2866 - Linux cli command Image_ExifTool_Torrentpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Torrentpm and provides detailed information about the command Image_ExifTool_Torrentpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Torrentpm.

NAME 🖥️ Image_ExifTool_Torrentpm 🖥️

Read information from BitTorrent file

SYNOPSIS

This module is used by Image::ExifTool

DESCRIPTION

This module contains definitions required by Image::ExifTool to read bencoded information from BitTorrent files.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<https://wiki.theory.org/BitTorrentSpecification>

SEE ALSO

“Torrent Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2867 - Linux cli command lcong48

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command lcong48 and provides detailed information about the command lcong48, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the lcong48.

NAME 🖥️ lcong48 🖥️

generate uniformly distributed pseudo-random numbers

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
double drand48(void);
double erand48(unsigned short xsubi[3]);
long lrand48(void);
long nrand48(unsigned short xsubi[3]);
long mrand48(void);
long jrand48(unsigned short xsubi[3]);
void srand48(long seedval);
unsigned short *seed48(unsigned short seed16v[3]);
void lcong48(unsigned short param[7]);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

All functions shown above:

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

DESCRIPTION

These functions generate pseudo-random numbers using the linear congruential algorithm and 48-bit integer arithmetic.

The drand48() and erand48() functions return nonnegative double-precision floating-point values uniformly distributed over the interval [0.0, 1.0).

The lrand48() and nrand48() functions return nonnegative long integers uniformly distributed over the interval [0, 2^31).

The mrand48() and jrand48() functions return signed long integers uniformly distributed over the interval [-2^31, 2^31).

The srand48(), seed48(), and lcong48() functions are initialization functions, one of which should be called before using drand48(), lrand48(), or mrand48(). The functions erand48(), nrand48(), and jrand48() do not require an initialization function to be called first.

All the functions work by generating a sequence of 48-bit integers, Xi, according to the linear congruential formula:

Xn+1 = (aXn + c) mod m, where n >= 0

The parameter m = 2^48, hence 48-bit integer arithmetic is performed. Unless lcong48() is called, a and c are given by:

a = 0x5DEECE66D
c = 0xB

The value returned by any of the functions drand48(), erand48(), lrand48(), nrand48(), mrand48(), or jrand48() is computed by first generating the next 48-bit Xi in the sequence. Then the appropriate number of bits, according to the type of data item to be returned, is copied from the high-order bits of Xi and transformed into the returned value.

The functions drand48(), lrand48(), and mrand48() store the last 48-bit Xi generated in an internal buffer. The functions erand48(), nrand48(), and jrand48() require the calling program to provide storage for the successive Xi values in the array argument xsubi. The functions are initialized by placing the initial value of Xi into the array before calling the function for the first time.

The initializer function srand48() sets the high order 32-bits of Xi to the argument seedval. The low order 16-bits are set to the arbitrary value 0x330E.

The initializer function seed48() sets the value of Xi to the 48-bit value specified in the array argument seed16v. The previous value of Xi is copied into an internal buffer and a pointer to this buffer is returned by seed48().

The initialization function lcong48() allows the user to specify initial values for Xi, a, and c. Array argument elements param[0-2] specify Xi, param[3-5] specify a, and param[6] specifies c. After lcong48() has been called, a subsequent call to either srand48() or seed48() will restore the standard values of a and c.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

drand48(), erand48(), lrand48(), nrand48(), mrand48(), jrand48(), srand48(), seed48(), lcong48()

Thread safety

MT-Unsafe race:drand48

The above functions record global state information for the random number generator, so they are not thread-safe.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4.

SEE ALSO

rand(3), random(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2868 - Linux cli command Spreadsheet_WriteExcel_BIFFwriterpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Spreadsheet_WriteExcel_BIFFwriterpm and provides detailed information about the command Spreadsheet_WriteExcel_BIFFwriterpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Spreadsheet_WriteExcel_BIFFwriterpm.

NAME 🖥️ Spreadsheet_WriteExcel_BIFFwriterpm 🖥️

An abstract base class for Excel workbooks and worksheets.

SYNOPSIS

See the documentation for Spreadsheet::WriteExcel

DESCRIPTION

This module is used in conjunction with Spreadsheet::WriteExcel.

AUTHOR

John McNamara [email protected]

COPYRIGHT

Copyright MM-MMX, John McNamara.

All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2869 - Linux cli command isatty

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isatty and provides detailed information about the command isatty, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isatty.

NAME 🖥️ isatty 🖥️

test whether a file descriptor refers to a terminal

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <unistd.h>
int isatty(int fd);

DESCRIPTION

The isatty() function tests whether fd is an open file descriptor referring to a terminal.

RETURN VALUE

isatty() returns 1 if fd is an open file descriptor referring to a terminal; otherwise 0 is returned, and errno is set to indicate the error.

ERRORS

EBADF
fd is not a valid file descriptor.

ENOTTY
fd refers to a file other than a terminal. On some older kernels, some types of files resulted in the error EINVAL in this case (which is a violation of POSIX, which specifies the error ENOTTY).

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isatty()

Thread safetyMT-Safe

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr4, 4.3BSD.

SEE ALSO

fstat(2), ttyname(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2870 - Linux cli command pcap_fopen_offline_with_tstamp_precisionpcap

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pcap_fopen_offline_with_tstamp_precisionpcap and provides detailed information about the command pcap_fopen_offline_with_tstamp_precisionpcap, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pcap_fopen_offline_with_tstamp_precisionpcap.

NAME 🖥️ pcap_fopen_offline_with_tstamp_precisionpcap 🖥️

open a saved capture file for reading

SYNOPSIS

#include <pcap/pcap.h>
char errbuf[PCAP_ERRBUF_SIZE];
pcap_t *pcap_open_offline(const char *fname, char *errbuf);
pcap_t *pcap_open_offline_with_tstamp_precision(const char *fname,
    u_int precision, char *errbuf);
pcap_t *pcap_fopen_offline(FILE *fp, char *errbuf);
pcap_t *pcap_fopen_offline_with_tstamp_precision(FILE *fp,
    u_int precision, char *errbuf);

DESCRIPTION

pcap_open_offline() and pcap_open_offline_with_tstamp_precision() are called to open a ``savefile’’ for reading.

fname specifies the name of the file to open. The file can have the pcap file format as described in pcap-savefile(5), which is the file format used by, among other programs, tcpdump(1) and tcpslice(1), or can have the pcapng file format, although not all pcapng files can be read. The name “-” is a synonym for stdin.

pcap_open_offline_with_tstamp_precision() takes an additional precision argument specifying the time stamp precision desired; if PCAP_TSTAMP_PRECISION_MICRO is specified, packet time stamps will be supplied in seconds and microseconds, and if PCAP_TSTAMP_PRECISION_NANO is specified, packet time stamps will be supplied in seconds and nanoseconds. If the time stamps in the file do not have the same precision as the requested precision, they will be scaled up or down as necessary before being supplied.

Alternatively, you may call pcap_fopen_offline() or pcap_fopen_offline_with_tstamp_precision() to read dumped data from an existing open stream fp. pcap_fopen_offline_with_tstamp_precision() takes an additional precision argument as described above. Note that on Windows, that stream should be opened in binary mode.

RETURN VALUE

pcap_open_offline(), pcap_open_offline_with_tstamp_precision(), pcap_fopen_offline(), and pcap_fopen_offline_with_tstamp_precision() return a pcap_t * on success and NULL on failure. If NULL is returned, errbuf is filled in with an appropriate error message. errbuf is assumed to be able to hold at least PCAP_ERRBUF_SIZE chars.

BACKWARD COMPATIBILITY

pcap_open_offline_with_tstamp_precision() and pcap_fopen_offline_with_tstamp_precision() became available in libpcap release 1.5.1. In previous releases, time stamps from a savefile are always given in seconds and microseconds.

SEE ALSO

pcap(3PCAP), pcap-savefile(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2871 - Linux cli command Tk_DirTreepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_DirTreepm and provides detailed information about the command Tk_DirTreepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_DirTreepm.

NAME 🖥️ Tk_DirTreepm 🖥️

Create and manipulate DirTree widgets

SYNOPSIS

use Tk::DirTree;

$dirtree = $parent->DirTree(?options?);

SUPER-CLASS

The DirTree class is derived from the Tree class and inherits all the methods, options and subwidgets of its super-class.

STANDARD OPTIONS

Tree supports all the standard options of a Tree widget. See Tk::options for details on the standard options.

WIDGET-SPECIFIC OPTIONS

Name: browseCmd

Class: BrowseCmd

Switch: -browsecmd

Specifies a callback to call whenever the user browses on a directory (usually by single-clicking on the name of the directory). The callback is called with one argument, the complete pathname of the directory.

Name: command

Class: Command

Switch: -command

Specifies the callback to be called when the user activates on a directory (usually by double-clicking on the name of the directory). The callback is called with one argument, the complete pathname of the directory.

Name: dircmd

Class: DirCmd

Switch: -dircmd

Specifies the callback to be called when a directory listing is needed for a particular directory. If this option is not specified, by default the DirTree widget will attempt to read the directory as a Unix directory. On special occasions, the application programmer may want to supply a special method for reading directories: for example, when he needs to list remote directories. In this case, the -dircmd option can be used. The specified callback accepts two arguments: the first is the name of the directory to be listed; the second is a Boolean value indicating whether hidden sub-directories should be listed. This callback returns a list of names of the sub-directories of this directory. For example: sub read_dir { my( $dir, $showhidden ) = @_; return( qw/DOS NORTON WINDOWS/ ) if $dir eq “C:"; return(); }

Name: showHidden

Class: ShowHidden

Switch: -showhidden

Specifies whether hidden directories should be shown. By default, a directory name starting with a period “.” is considered as a hidden directory. This rule can be overridden by supplying an alternative -dircmd option.

Name: directory

Class: Directory

Switch: -directory

Alias: -value

Specifies the name of the current directory to be displayed in the DirTree widget.

DESCRIPTION

The DirTree constructor method creates a new window (given by the $dirtree argument) and makes it into a DirTree widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the DirTree such as its cursor and relief. The DirTree widget displays a list view of a directory, its previous directories and its sub-directories. The user can choose one of the directories displayed in the list or change to another directory.

WIDGET METHODS

The DirTree method creates a widget object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class.

The following additional methods are available for DirTree widgets:

$dirtree->chdir(dir)
Change the current directory to dir.

OTHER METHODS

These methods have to be documented or made private:

OpenCmd

Populate

add_to_tree

dirnames

fullpath

has_subdir

opencmd

set_dir

BINDINGS

The mouse and keyboard bindings of the DirTree widget are the same as the bindings of the Tree widget.

KEYWORDS

directory, tree, tix

SEE ALSO

Tk::Tree Tk::HList

AUTHOR

Perl/TK version by Chris Dean <[email protected]>. Original Tcl/Tix version by Ioi Kim Lam.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2872 - Linux cli command Image_ExifTool_Shortcutspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Shortcutspm and provides detailed information about the command Image_ExifTool_Shortcutspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Shortcutspm.

NAME 🖥️ Image_ExifTool_Shortcutspm 🖥️

ExifTool shortcut tags

SYNOPSIS

This module is required by Image::ExifTool.

DESCRIPTION

This module contains definitions for tag name shortcuts used by Image::ExifTool. You can customize this file to add your own shortcuts.

Individual users may also add their own shortcuts to the .ExifTool_config file in their home directory (or the directory specified by the EXIFTOOL_HOME environment variable). The shortcuts are defined in a hash called %Image::ExifTool::UserDefined::Shortcuts. The keys of the hash are the shortcut names, and the elements are either tag names or references to lists of tag names.

An example shortcut definition in .ExifTool_config:

%Image::ExifTool::UserDefined::Shortcuts = ( MyShortcut => [createdate,exif:exposuretime,aperture], MyAlias => FocalLengthIn35mmFormat, );

In this example, MyShortcut is a shortcut for the CreateDate, EXIF:ExposureTime and Aperture tags, and MyAlias is a shortcut for FocalLengthIn35mmFormat.

The target tag names may contain an optional group name prefix. A group name applied to the shortcut will be ignored for any target tag with a group name prefix.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2873 - Linux cli command Moose_Cookbook_Meta_WhyMetapm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Meta_WhyMetapm and provides detailed information about the command Moose_Cookbook_Meta_WhyMetapm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Meta_WhyMetapm.

NAME 🖥️ Moose_Cookbook_Meta_WhyMetapm 🖥️

Welcome to the meta world (Why Go Meta?)

VERSION

version 2.2207

SUMMARY

You might want to read Moose::Manual::MOP if you haven’t done so yet.

If you’ve ever thought “Moose is great, but I wish it did X differently”, then you’ve gone meta. The meta recipes demonstrate how to change and extend the way Moose works by extending and overriding how the meta classes (Moose::Meta::Class, Moose::Meta::Attribute, etc) work.

The metaclass API is a set of classes that describe classes, roles, attributes, etc. The metaclass API lets you ask questions about a class, like “what attributes does it have?”, or “what roles does the class do?”

The metaclass system also lets you make changes to a class, for example by adding new methods or attributes.

The interface presented by Moose.pm (has, with, extends) is just a thin layer of syntactic sugar over the underlying metaclass system.

By extending and changing how this metaclass system works, you can create your own Moose variant.

Examples

Let’s say that you want to add additional properties to attributes. Specifically, we want to add a “label” property to each attribute, so we can write My::Class->meta()->get_attribute(size)->label(). The first recipe shows how to do this using an attribute trait.

You might also want to add additional properties to your metaclass. For example, if you were writing an ORM based on Moose, you could associate a table name with each class via the class’s metaclass object, letting you write My::Class->meta()->table_name().

SEE ALSO

Many of the MooseX modules on CPAN implement metaclass extensions. A couple good examples include MooseX::Aliases and MooseX::UndefTolerant. For a more complex example see Fey::ORM or Bread::Board::Declare.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2874 - Linux cli command Image_ExifTool_Lang_nlpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Lang_nlpm and provides detailed information about the command Image_ExifTool_Lang_nlpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Lang_nlpm.

NAME 🖥️ Image_ExifTool_Lang_nlpm 🖥️

ExifTool Dutch language translations

DESCRIPTION

This file is used by Image::ExifTool to generate localized tag descriptions and values.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

ACKNOWLEDGEMENTS

Thanks to Jens Duttke, Peter Moonen, Herman Beld and Peter van der Laan for providing this translation.

SEE ALSO

Image::ExifTool (3pm), Image::ExifTool::TagInfoXML (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2875 - Linux cli command ldexp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ldexp and provides detailed information about the command ldexp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ldexp.

NAME 🖥️ ldexp 🖥️

multiply floating-point number by integral power of 2

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double ldexp(double x, int exp);
float ldexpf(float x, int exp);
long double ldexpl(long double x, int exp);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

ldexpf(), ldexpl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
        || /* Since glibc 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPTION

These functions return the result of multiplying the floating-point number x by 2 raised to the power exp.

RETURN VALUE

On success, these functions return x * (2^exp).

If exp is zero, then x is returned.

If x is a NaN, a NaN is returned.

If x is positive infinity (negative infinity), positive infinity (negative infinity) is returned.

If the result underflows, a range error occurs, and zero is returned.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with a sign the same as x.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Range error, overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

Range error, underflow
errno is set to ERANGE. An underflow floating-point exception (FE_UNDERFLOW) is raised.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

ldexp(), ldexpf(), ldexpl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The variant returning double also conforms to SVr4, 4.3BSD, C89.

SEE ALSO

frexp(3), modf(3), scalbln(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2876 - Linux cli command longjmp

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command longjmp and provides detailed information about the command longjmp, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the longjmp.

NAME 🖥️ longjmp 🖥️

performing a nonlocal goto

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <setjmp.h>
int setjmp(jmp_buf env);
int sigsetjmp(sigjmp_buf env, int savesigs);
[[noreturn]] void longjmp(jmp_buf env, int val);
[[noreturn]] void siglongjmp(sigjmp_buf env, int val);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

setjmp(): see NOTES.

sigsetjmp():

    _POSIX_C_SOURCE

DESCRIPTION

The functions described on this page are used for performing “nonlocal gotos”: transferring execution from one function to a predetermined location in another function. The setjmp() function dynamically establishes the target to which control will later be transferred, and longjmp() performs the transfer of execution.

The setjmp() function saves various information about the calling environment (typically, the stack pointer, the instruction pointer, possibly the values of other registers and the signal mask) in the buffer env for later use by longjmp(). In this case, setjmp() returns 0.

The longjmp() function uses the information saved in env to transfer control back to the point where setjmp() was called and to restore (“rewind”) the stack to its state at the time of the setjmp() call. In addition, and depending on the implementation (see NOTES), the values of some other registers and the process signal mask may be restored to their state at the time of the setjmp() call.

Following a successful longjmp(), execution continues as if setjmp() had returned for a second time. This “fake” return can be distinguished from a true setjmp() call because the “fake” return returns the value provided in val. If the programmer mistakenly passes the value 0 in val, the “fake” return will instead return 1.

sigsetjmp() and siglongjmp()

sigsetjmp() and siglongjmp() also perform nonlocal gotos, but provide predictable handling of the process signal mask.

If, and only if, the savesigs argument provided to sigsetjmp() is nonzero, the process’s current signal mask is saved in env and will be restored if a siglongjmp() is later performed with this env.

RETURN VALUE

setjmp() and sigsetjmp() return 0 when called directly; on the “fake” return that occurs after longjmp() or siglongjmp(), the nonzero value specified in val is returned.

The longjmp() or siglongjmp() functions do not return.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

setjmp(), sigsetjmp()

Thread safetyMT-Safe

longjmp(), siglongjmp()

Thread safetyMT-Safe

STANDARDS

setjmp()
longjmp()
C11, POSIX.1-2008.

sigsetjmp()
siglongjmp()
POSIX.1-2008.

HISTORY

setjmp()
longjmp()
POSIX.1-2001, C89.

sigsetjmp()
siglongjmp()
POSIX.1-2001.

POSIX does not specify whether setjmp() will save the signal mask (to be later restored during longjmp()). In System V it will not. In 4.3BSD it will, and there is a function _setjmp() that will not. The behavior under Linux depends on the glibc version and the setting of feature test macros. Before glibc 2.19, setjmp() follows the System V behavior by default, but the BSD behavior is provided if the _BSD_SOURCE feature test macro is explicitly defined and none of _POSIX_SOURCE, _POSIX_C_SOURCE, _XOPEN_SOURCE, _GNU_SOURCE, or _SVID_SOURCE is defined. Since glibc 2.19, <setjmp.h> exposes only the System V version of setjmp(). Programs that need the BSD semantics should replace calls to setjmp() with calls to sigsetjmp() with a nonzero savesigs argument.

NOTES

setjmp() and longjmp() can be useful for dealing with errors inside deeply nested function calls or to allow a signal handler to pass control to a specific point in the program, rather than returning to the point where the handler interrupted the main program. In the latter case, if you want to portably save and restore signal masks, use sigsetjmp() and siglongjmp(). See also the discussion of program readability below.

CAVEATS

The compiler may optimize variables into registers, and longjmp() may restore the values of other registers in addition to the stack pointer and program counter. Consequently, the values of automatic variables are unspecified after a call to longjmp() if they meet all the following criteria:

  • they are local to the function that made the corresponding setjmp() call;

  • their values are changed between the calls to setjmp() and longjmp(); and

  • they are not declared as volatile.

Analogous remarks apply for siglongjmp().

Nonlocal gotos and program readability

While it can be abused, the traditional C “goto” statement at least has the benefit that lexical cues (the goto statement and the target label) allow the programmer to easily perceive the flow of control. Nonlocal gotos provide no such cues: multiple setjmp() calls might employ the same jmp_buf variable so that the content of the variable may change over the lifetime of the application. Consequently, the programmer may be forced to perform detailed reading of the code to determine the dynamic target of a particular longjmp() call. (To make the programmer’s life easier, each setjmp() call should employ a unique jmp_buf variable.)

Adding further difficulty, the setjmp() and longjmp() calls may not even be in the same source code module.

In summary, nonlocal gotos can make programs harder to understand and maintain, and an alternative should be used if possible.

Undefined Behavior

If the function which called setjmp() returns before longjmp() is called, the behavior is undefined. Some kind of subtle or unsubtle chaos is sure to result.

If, in a multithreaded program, a longjmp() call employs an env buffer that was initialized by a call to setjmp() in a different thread, the behavior is undefined.

POSIX.1-2008 Technical Corrigendum 2 adds longjmp() and siglongjmp() to the list of async-signal-safe functions. However, the standard recommends avoiding the use of these functions from signal handlers and goes on to point out that if these functions are called from a signal handler that interrupted a call to a non-async-signal-safe function (or some equivalent, such as the steps equivalent to exit(3) that occur upon a return from the initial call to main()), the behavior is undefined if the program subsequently makes a call to a non-async-signal-safe function. The only way of avoiding undefined behavior is to ensure one of the following:

  • After long jumping from the signal handler, the program does not call any non-async-signal-safe functions and does not return from the initial call to main().

  • Any signal whose handler performs a long jump must be blocked during every call to a non-async-signal-safe function and no non-async-signal-safe functions are called after returning from the initial call to main().

SEE ALSO

signal(7), signal-safety(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2877 - Linux cli command pthread_getattr_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_getattr_np and provides detailed information about the command pthread_getattr_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_getattr_np.

NAME 🖥️ pthread_getattr_np 🖥️

get attributes of created thread

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <pthread.h>
int pthread_getattr_np(pthread_t thread, pthread_attr_t *attr);

DESCRIPTION

The pthread_getattr_np() function initializes the thread attributes object referred to by attr so that it contains actual attribute values describing the running thread thread.

The returned attribute values may differ from the corresponding attribute values passed in the attr object that was used to create the thread using pthread_create(3). In particular, the following attributes may differ:

  • the detach state, since a joinable thread may have detached itself after creation;

  • the stack size, which the implementation may align to a suitable boundary.

  • and the guard size, which the implementation may round upward to a multiple of the page size, or ignore (i.e., treat as 0), if the application is allocating its own stack.

Furthermore, if the stack address attribute was not set in the thread attributes object used to create the thread, then the returned thread attributes object will report the actual stack address that the implementation selected for the thread.

When the thread attributes object returned by pthread_getattr_np() is no longer required, it should be destroyed using pthread_attr_destroy(3).

RETURN VALUE

On success, this function returns 0; on error, it returns a nonzero error number.

ERRORS

ENOMEM
Insufficient memory.

In addition, if thread refers to the main thread, then pthread_getattr_np() can fail because of errors from various underlying calls: fopen(3), if /proc/self/maps can’t be opened; and getrlimit(2), if the RLIMIT_STACK resource limit is not supported.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

pthread_getattr_np()

Thread safetyMT-Safe

STANDARDS

GNU; hence the suffix “_np” (nonportable) in the name.

HISTORY

glibc 2.2.3.

EXAMPLES

The program below demonstrates the use of pthread_getattr_np(). The program creates a thread that then uses pthread_getattr_np() to retrieve and display its guard size, stack address, and stack size attributes. Command-line arguments can be used to set these attributes to values other than the default when creating the thread. The shell sessions below demonstrate the use of the program.

In the first run, on an x86-32 system, a thread is created using default attributes:

$ ulimit -s # No stack limit ==> default stack size is 2 MB
unlimited
$ ./a.out
Attributes of created thread:
        Guard size          = 4096 bytes
        Stack address       = 0x40196000 (EOS = 0x40397000)
        Stack size          = 0x201000 (2101248) bytes

In the following run, we see that if a guard size is specified, it is rounded up to the next multiple of the system page size (4096 bytes on x86-32):

$ ./a.out -g 4097
Thread attributes object after initializations:
        Guard size          = 4097 bytes
        Stack address       = (nil)
        Stack size          = 0x0 (0) bytes
Attributes of created thread:
        Guard size          = 8192 bytes
        Stack address       = 0x40196000 (EOS = 0x40397000)
        Stack size          = 0x201000 (2101248) bytes

In the last run, the program manually allocates a stack for the thread. In this case, the guard size attribute is ignored.

$ ./a.out -g 4096 -s 0x8000 -a
Allocated thread stack at 0x804d000
Thread attributes object after initializations:
        Guard size          = 4096 bytes
        Stack address       = 0x804d000 (EOS = 0x8055000)
        Stack size          = 0x8000 (32768) bytes
Attributes of created thread:
        Guard size          = 0 bytes
        Stack address       = 0x804d000 (EOS = 0x8055000)
        Stack size          = 0x8000 (32768) bytes

Program source

#define _GNU_SOURCE     /* To get pthread_getattr_np() declaration */
#include <err.h>
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
static void
display_stack_related_attributes(pthread_attr_t *attr, char *prefix)
{
    int s;
    size_t stack_size, guard_size;
    void *stack_addr;
    s = pthread_attr_getguardsize(attr, &guard_size);
    if (s != 0)
        errc(EXIT_FAILURE, s, "pthread_attr_getguardsize");
    printf("%sGuard size          = %zu bytes

“, prefix, guard_size); s = pthread_attr_getstack(attr, &stack_addr, &stack_size); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_getstack”); printf("%sStack address = %p”, prefix, stack_addr); if (stack_size > 0) printf(" (EOS = %p)", (char *) stack_addr + stack_size); printf(" “); printf("%sStack size = %#zx (%zu) bytes “, prefix, stack_size, stack_size); } static void display_thread_attributes(pthread_t thread, char prefix) { int s; pthread_attr_t attr; s = pthread_getattr_np(thread, &attr); if (s != 0) errc(EXIT_FAILURE, s, “pthread_getattr_np”); display_stack_related_attributes(&attr, prefix); s = pthread_attr_destroy(&attr); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_destroy”); } static void * / Start function for thread we create */ thread_start(void arg) { printf(“Attributes of created thread: “); display_thread_attributes(pthread_self(), " “); exit(EXIT_SUCCESS); / Terminate all threads */ } static void usage(char *pname, char msg) { if (msg != NULL) fputs(msg, stderr); fprintf(stderr, “Usage: %s [-s stack-size [-a]]” " [-g guard-size] “, pname); fprintf(stderr, " -a means program should allocate stack “); exit(EXIT_FAILURE); } static pthread_attr_t * / Get thread attributes from command line */ get_thread_attributes_from_cl(int argc, char *argv[], pthread_attr_t *attrp) { int s, opt, allocate_stack; size_t stack_size, guard_size; void *stack_addr; pthread_attr_t ret_attrp = NULL; / Set to attrp if we initialize a thread attributes object */ allocate_stack = 0; stack_size = -1; guard_size = -1; while ((opt = getopt(argc, argv, “ag:s:”)) != -1) { switch (opt) { case ‘a’: allocate_stack = 1; break; case ‘g’: guard_size = strtoul(optarg, NULL, 0); break; case ’s’: stack_size = strtoul(optarg, NULL, 0); break; default: usage(argv[0], NULL); } } if (allocate_stack && stack_size == -1) usage(argv[0], “Specifying -a without -s makes no sense “); if (argc > optind) usage(argv[0], “Extraneous command-line arguments “); if (stack_size != -1 || guard_size > 0) { ret_attrp = attrp; s = pthread_attr_init(attrp); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_init”); } if (stack_size != -1) { if (!allocate_stack) { s = pthread_attr_setstacksize(attrp, stack_size); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_setstacksize”); } else { s = posix_memalign(&stack_addr, sysconf(_SC_PAGESIZE), stack_size); if (s != 0) errc(EXIT_FAILURE, s, “posix_memalign”); printf(“Allocated thread stack at %p

“, stack_addr); s = pthread_attr_setstack(attrp, stack_addr, stack_size); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_setstacksize”); } } if (guard_size != -1) { s = pthread_attr_setguardsize(attrp, guard_size); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_setstacksize”); } return ret_attrp; } int main(int argc, char *argv[]) { int s; pthread_t thr; pthread_attr_t attr; pthread_attr_t attrp = NULL; / Set to &attr if we initialize a thread attributes object / attrp = get_thread_attributes_from_cl(argc, argv, &attr); if (attrp != NULL) { printf(“Thread attributes object after initializations: “); display_stack_related_attributes(attrp, " “); printf(” “); } s = pthread_create(&thr, attrp, &thread_start, NULL); if (s != 0) errc(EXIT_FAILURE, s, “pthread_create”); if (attrp != NULL) { s = pthread_attr_destroy(attrp); if (s != 0) errc(EXIT_FAILURE, s, “pthread_attr_destroy”); } pause(); / Terminates when other thread calls exit() */ }

SEE ALSO

pthread_attr_getaffinity_np(3), pthread_attr_getdetachstate(3), pthread_attr_getguardsize(3), pthread_attr_getinheritsched(3), pthread_attr_getschedparam(3), pthread_attr_getschedpolicy(3), pthread_attr_getscope(3), pthread_attr_getstack(3), pthread_attr_getstackaddr(3), pthread_attr_getstacksize(3), pthread_attr_init(3), pthread_create(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2878 - Linux cli command Moose_Manual_FAQpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Manual_FAQpm and provides detailed information about the command Moose_Manual_FAQpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Manual_FAQpm.

NAME 🖥️ Moose_Manual_FAQpm 🖥️

Frequently asked questions about Moose

VERSION

version 2.2207

FREQUENTLY ASKED QUESTIONS

Module Stability

Is Moose “production ready”?

Yes! Many sites with household names are using Moose to build high-traffic services. Countless others are using Moose in production. See <http://moose.iinteractive.com/about.html#organizations> for a partial list.

As of this writing, Moose is a dependency of several hundred CPAN modules. <https://metacpan.org/requires/module/Moose>

Is Moose’s API stable?

Yes. The sugary API, the one 95% of users will interact with, is very stable. Any changes will be 100% backwards compatible.

The meta API is less set in stone. We reserve the right to tweak parts of it to improve efficiency or consistency. This will not be done lightly. We do perform deprecation cycles. We really do not like making ourselves look bad by breaking your code. Submitting test cases is the best way to ensure that your code is not inadvertently broken by refactoring.

I heard Moose is slow, is this true?

Again, this one is tricky, so Yes and No.

Firstly, nothing in life is free, and some Moose features do cost more than others. It is also the policy of Moose to only charge you for the features you use, and to do our absolute best to not place any extra burdens on the execution of your code for features you are not using. Of course using Moose itself does involve some overhead, but it is mostly compile time. At this point we do have some options available for getting the speed you need.

Currently we provide the option of making your classes immutable as a means of boosting speed. This will mean a slightly larger compile time cost, but the runtime speed increase (especially in object construction) is pretty significant. This can be done with the following code:

MyClass->meta->make_immutable();

Constructors

How do I write custom constructors with Moose?

Ideally, you should never write your own new method, and should use Moose’s other features to handle your specific object construction needs. Here are a few scenarios, and the Moose way to solve them;

If you need to call initialization code post instance construction, then use the BUILD method. This feature is taken directly from Perl 6. Every BUILD method in your inheritance chain is called (in the correct order) immediately after the instance is constructed. This allows you to ensure that all your superclasses are initialized properly as well. This is the best approach to take (when possible) because it makes subclassing your class much easier.

If you need to affect the constructor’s parameters prior to the instance actually being constructed, you have a number of options.

To change the parameter processing as a whole, you can use the BUILDARGS method. The default implementation accepts key/value pairs or a hash reference. You can override it to take positional args, or any other format

To change the handling of individual parameters, there are coercions (See the Moose::Cookbook::Basics::HTTP_SubtypesAndCoercion for a complete example and explanation of coercions). With coercions it is possible to morph argument values into the correct expected types. This approach is the most flexible and robust, but does have a slightly higher learning curve.

How do I make non-Moose constructors work with Moose?

Usually the correct approach to subclassing a non-Moose class is delegation. Moose makes this easy using the handles keyword, coercions, and lazy_build, so subclassing is often not the ideal route.

That said, if you really need to inherit from a non-Moose class, see Moose::Cookbook::Basics::DateTime_ExtendingNonMooseParent for an example of how to do it, or take a look at “MooseX::NonMoose” in Moose::Manual::MooseX.

Accessors

How do I tell Moose to use get/set accessors?

The easiest way to accomplish this is to use the reader and writer attribute options:

has bar => ( isa => Baz, reader => get_bar, writer => set_bar, );

Moose will still take advantage of type constraints, triggers, etc. when creating these methods.

If you do not like this much typing, and wish it to be a default for your classes, please see MooseX::FollowPBP. This extension will allow you to write:

has bar => ( isa => Baz, is => rw, );

Moose will create separate get_bar and set_bar methods instead of a single bar method.

If you like bar and set_bar, see MooseX::SemiAffordanceAccessor.

NOTE: This cannot be set globally in Moose, as that would break other classes which are built with Moose. You can still save on typing by defining a new MyApp::Moose that exports Moose’s sugar and then turns on MooseX::FollowPBP. See Moose::Cookbook::Extending::Mooseish_MooseSugar.

How can I inflate/deflate values in accessors?

Well, the first question to ask is if you actually need both inflate and deflate.

If you only need to inflate, then we suggest using coercions. Here is some basic sample code for inflating a DateTime object:

class_type DateTime; coerce DateTime => from Str => via { DateTime::Format::MySQL->parse_datetime($_) }; has timestamp => (is => rw, isa => DateTime, coerce => 1);

This creates a custom type for DateTime objects, then attaches a coercion to that type. The timestamp attribute is then told to expect a DateTime type, and to try to coerce it. When a Str type is given to the timestamp accessor, it will attempt to coerce the value into a DateTime object using the code in found in the via block.

For a more comprehensive example of using coercions, see the Moose::Cookbook::Basics::HTTP_SubtypesAndCoercion.

If you need to deflate your attribute’s value, the current best practice is to add an around modifier to your accessor:

# a timestamp which stores as # seconds from the epoch has timestamp => (is => rw, isa => Int); around timestamp => sub { my $next = shift; my $self = shift; return $self->$next unless @_; # assume we get a DateTime object … my $timestamp = shift; return $self->$next( $timestamp->epoch ); };

It is also possible to do deflation using coercion, but this tends to get quite complex and require many subtypes. An example of this is outside the scope of this document, ask on #moose or send a mail to the list.

Still another option is to write a custom attribute metaclass, which is also outside the scope of this document, but we would be happy to explain it on #moose or the mailing list.

Method Modifiers

How can I affect the values in @_ using before?

You can’t, actually: before only runs before the main method, and it cannot easily affect the method’s execution.

You similarly can’t use after to affect the return value of a method.

We limit before and after because this lets you write more concise code. You do not have to worry about passing @_ to the original method, or forwarding its return value (being careful to preserve context).

The around method modifier has neither of these limitations, but is a little more verbose.

Alternatively, the MooseX::Mangle extension provides the mangle_args function, which does allow you to affect @_.

Can I use before to stop execution of a method?

Yes, but only if you throw an exception. If this is too drastic a measure then we suggest using around instead. The around method modifier is the only modifier which can gracefully prevent execution of the main method. Here is an example:

around baz => sub { my $next = shift; my ($self, %options) = @_; unless ($options->{bar} eq foo) { return bar; } $self->$next(%options); };

By choosing not to call the $next method, you can stop the execution of the main method.

Alternatively, the MooseX::Mangle extension provides the guard function, which will conditionally prevent execution of the original method.

Why can’t I see return values in an after modifier?

As with the before modifier, the after modifier is simply called after the main method. It is passed the original contents of @_ and not the return values of the main method.

Again, the arguments are too lengthy as to why this has to be. And as with before I recommend using an around modifier instead. Here is some sample code:

around foo => sub { my $next = shift; my ($self, @args) = @_; my @rv = $next->($self, @args); # do something silly with the return values return reverse @rv; };

Alternatively, the MooseX::Mangle extension provides the mangle_return function, which allows modifying the return values of the original method.

Type Constraints

How can I provide a custom error message for a type constraint?

Use the message option when building the subtype:

subtype NaturalLessThanTen => as Natural => where { $_ < 10 } => message { “This number ($_) is not less than ten!” };

This message block will be called when a value fails to pass the NaturalLessThanTen constraint check.

Can I turn off type constraint checking?

There’s no support for it in the core of Moose yet. This option may come in a future release.

Meanwhile there’s a MooseX extension that allows you to do this on a per-attribute basis, and if it doesn’t do what you it’s easy to write one that fits your use case.

My coercions stopped working with recent Moose, why did you break it?

Moose 0.76 fixed a case where coercions were being applied even if the original constraint passed. This has caused some edge cases to fail where people were doing something like

subtype Address, as Str; coerce Address, from Str, via { get_address($_) };

This is not what they intended, because the type constraint Address is too loose in this case. It is saying that all strings are Addresses, which is obviously not the case. The solution is to provide a where clause that properly restricts the type constraint:

subtype Address, as Str, where { looks_like_address($_) };

This will allow the coercion to apply only to strings that fail to look like an Address.

Roles

Why is BUILD not called for my composed roles?

BUILD is never called in composed roles. The primary reason is that roles are not order sensitive. Roles are composed in such a way that the order of composition does not matter (for information on the deeper theory of this read the original traits papers here <http://www.iam.unibe.ch/~scg/Research/Traits/>).

Because roles are essentially unordered, it would be impossible to determine the order in which to execute the BUILD methods.

As for alternate solutions, there are a couple.

  • Using a combination of lazy and default in your attributes to defer initialization (see the Binary Tree example in the cookbook for a good example of lazy/default usage Moose::Cookbook::Basics::BinaryTree_AttributeFeatures)

  • Use attribute triggers, which fire after an attribute is set, to facilitate initialization. These are described in the Moose docs, and examples can be found in the test suite.

In general, roles should not require initialization; they should either provide sane defaults or should be documented as needing specific initialization. One such way to “document” this is to have a separate attribute initializer which is required for the role. Here is an example of how to do this:

package My::Role; use Moose::Role; has height => ( is => rw, isa => Int, lazy => 1, default => sub { my $self = shift; $self->init_height; } ); requires init_height;

In this example, the role will not compose successfully unless the class provides a init_height method.

If none of those solutions work, then it is possible that a role is not the best tool for the job, and you really should be using classes. Or, at the very least, you should reduce the amount of functionality in your role so that it does not require initialization.

What are traits, and how are they different from roles?

In Moose, a trait is almost exactly the same thing as a role, except that traits typically register themselves, which allows you to refer to them by a short name (“Big” vs “MyApp::Role::Big”).

In Moose-speak, a Role is usually composed into a class at compile time, whereas a Trait is usually composed into an instance of a class at runtime to add or modify the behavior of just that instance.

Outside the context of Moose, traits and roles generally mean exactly the same thing. The original paper called them traits, but Perl 6 will call them roles.

Can an attribute-generated method (e.g. an accessor) satisfy requires?

Yes, just be sure to consume the role after declaring your attribute. “Required Attributes” in Moose::Manual::Roles provides an example:

package Breakable; use Moose::Role; requires stress; package Car; use Moose; has stress => ( is => rw, isa => Int ); with Breakable;

If you mistakenly consume the Breakable role before declaring your stress attribute, you would see an error like this:

Breakable requires the method stress to be implemented by Car at…

Moose and Subroutine Attributes

Why don’t subroutine attributes I inherited from a superclass work?

Currently when subclassing a module is done at runtime with the extends keyword, but attributes are checked at compile time by Perl. To make attributes work, you must place extends in a BEGIN block so that the attribute handlers will be available at compile time, like this:

BEGIN { extends qw/Foo/ }

Note that we’re talking about Perl’s subroutine attributes here, not Moose attributes:

sub foo : Bar(27) { … }

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2879 - Linux cli command gethostent

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command gethostent and provides detailed information about the command gethostent, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the gethostent.

NAME 🖥️ gethostent 🖥️

get network host entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
void sethostent(int stayopen);
void endhostent(void);
[[deprecated]] extern int h_errno;
[[deprecated]] struct hostent *gethostbyname(const char *name);
[[deprecated]] struct hostent *gethostbyaddr(const void addr[.len],
 socklen_t len, int type);
[[deprecated]] void herror(const char *s);
[[deprecated]] const char *hstrerror(int err);
/* System V/POSIX extension */
struct hostent *gethostent(void);
/* GNU extensions */
[[deprecated]]
struct hostent *gethostbyname2(const char *name, int af);
int gethostent_r(struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyaddr_r(const void addr[restrict .len], socklen_t len,
 int type,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyname_r(const char *restrict name,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);
[[deprecated]]
int gethostbyname2_r(const char *restrict name, int af,
 struct hostent *restrict ret,
 char buf[restrict .buflen], size_t buflen,
 struct hostent **restrict result,
 int *restrict h_errnop);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

gethostbyname2(), gethostent_r(), gethostbyaddr_r(), gethostbyname_r(), gethostbyname2_r():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc up to and including 2.19:
        _BSD_SOURCE || _SVID_SOURCE

herror(), hstrerror():

    Since glibc 2.19:
        _DEFAULT_SOURCE
    glibc 2.8 to glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE
    Before glibc 2.8:
        none

h_errno:

    Since glibc 2.19
        _DEFAULT_SOURCE || _POSIX_C_SOURCE < 200809L
    glibc 2.12 to glibc 2.19:
        _BSD_SOURCE || _SVID_SOURCE || _POSIX_C_SOURCE < 200809L
    Before glibc 2.12:
        none

DESCRIPTION

The gethostbyname*(), gethostbyaddr*(), herror(), and hstrerror() functions are obsolete. Applications should use getaddrinfo(3), getnameinfo(3), and gai_strerror(3) instead.

The sethostent() function specifies, if stayopen is true (1), that a connected TCP socket should be used for the name server queries and that the connection should remain open during successive queries. Otherwise, name server queries will use UDP datagrams.

The endhostent() function ends the use of a TCP connection for name server queries.

The gethostbyname() function returns a structure of type hostent for the given host name. Here name is either a hostname or an IPv4 address in standard dot notation (as for inet_addr(3)). If name is an IPv4 address, no lookup is performed and gethostbyname() simply copies name into the h_name field and its struct in_addr equivalent into the h_addr_list[0] field of the returned hostent structure. If name doesn’t end in a dot and the environment variable HOSTALIASES is set, the alias file pointed to by HOSTALIASES will first be searched for name (see hostname(7) for the file format). The current domain and its parents are searched unless name ends in a dot.

The gethostbyaddr() function returns a structure of type hostent for the given host address addr of length len and address type type. Valid address types are AF_INET and AF_INET6 (defined in <sys/socket.h>). The host address argument is a pointer to a struct of a type depending on the address type, for example a struct in_addr * (probably obtained via a call to inet_addr(3)) for address type AF_INET.

The (obsolete) herror() function prints the error message associated with the current value of h_errno on stderr.

The (obsolete) hstrerror() function takes an error number (typically h_errno) and returns the corresponding message string.

The domain name queries carried out by gethostbyname() and gethostbyaddr() rely on the Name Service Switch (nsswitch.conf(5)) configured sources or a local name server (named(8)). The default action is to query the Name Service Switch (nsswitch.conf(5)) configured sources, failing that, a local name server (named(8)).

Historical

The nsswitch.conf(5) file is the modern way of controlling the order of host lookups.

In glibc 2.4 and earlier, the order keyword was used to control the order of host lookups as defined in /etc/host.conf (host.conf(5)).

The hostent structure is defined in <netdb.h> as follows:

struct hostent {
    char  *h_name;            /* official name of host */
    char **h_aliases;         /* alias list */
    int    h_addrtype;        /* host address type */
    int    h_length;          /* length of address */
    char **h_addr_list;       /* list of addresses */
}
#define h_addr h_addr_list[0] /* for backward compatibility */

The members of the hostent structure are:

h_name
The official name of the host.

h_aliases
An array of alternative names for the host, terminated by a null pointer.

h_addrtype
The type of address; always AF_INET or AF_INET6 at present.

h_length
The length of the address in bytes.

h_addr_list
An array of pointers to network addresses for the host (in network byte order), terminated by a null pointer.

h_addr
The first address in h_addr_list for backward compatibility.

RETURN VALUE

The gethostbyname() and gethostbyaddr() functions return the hostent structure or a null pointer if an error occurs. On error, the h_errno variable holds an error number. When non-NULL, the return value may point at static data, see the notes below.

ERRORS

The variable h_errno can have the following values:

HOST_NOT_FOUND
The specified host is unknown.

NO_DATA
The requested name is valid but does not have an IP address. Another type of request to the name server for this domain may return an answer. The constant NO_ADDRESS is a synonym for NO_DATA.

NO_RECOVERY
A nonrecoverable name server error occurred.

TRY_AGAIN
A temporary error occurred on an authoritative name server. Try again later.

FILES

/etc/host.conf
resolver configuration file

/etc/hosts
host database file

/etc/nsswitch.conf
name service switch configuration

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

gethostbyname()

Thread safety

MT-Unsafe race:hostbyname env locale

gethostbyaddr()

Thread safety

MT-Unsafe race:hostbyaddr env locale

sethostent(), endhostent(), gethostent_r()

Thread safety

MT-Unsafe race:hostent env locale

herror(), hstrerror()

Thread safetyMT-Safe

gethostent()

Thread safety

MT-Unsafe race:hostent race:hostentbuf env locale

gethostbyname2()

Thread safety

MT-Unsafe race:hostbyname2 env locale

gethostbyaddr_r(), gethostbyname_r(), gethostbyname2_r()

Thread safetyMT-Safe env locale

In the above table, hostent in race:hostent signifies that if any of the functions sethostent(), gethostent(), gethostent_r(), or endhostent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

sethostent()
endhostent()
gethostent()
POSIX.1-2008.

gethostent_r()
GNU.

Others:
None.

HISTORY

sethostent()
endhostent()
gethostent()
POSIX.1-2001.

gethostbyname()
gethostbyaddr()
h_errno
Marked obsolescent in POSIX.1-2001. Removed in POSIX.1-2008, recommending the use of getaddrinfo(3) and getnameinfo(3) instead.

NOTES

The functions gethostbyname() and gethostbyaddr() may return pointers to static data, which may be overwritten by later calls. Copying the struct hostent does not suffice, since it contains pointers; a deep copy is required.

In the original BSD implementation the len argument of gethostbyname() was an int. The SUSv2 standard is buggy and declares the len argument of gethostbyaddr() to be of type size_t. (That is wrong, because it has to be int, and size_t is not. POSIX.1-2001 makes it socklen_t, which is OK.) See also accept(2).

The BSD prototype for gethostbyaddr() uses const char * for the first argument.

System V/POSIX extension

POSIX requires the gethostent() call, which should return the next entry in the host data base. When using DNS/BIND this does not make much sense, but it may be reasonable if the host data base is a file that can be read line by line. On many systems, a routine of this name reads from the file /etc/hosts. It may be available only when the library was built without DNS support. The glibc version will ignore ipv6 entries. This function is not reentrant, and glibc adds a reentrant version gethostent_r().

GNU extensions

glibc2 also has a gethostbyname2() that works like gethostbyname(), but permits to specify the address family to which the address must belong.

glibc2 also has reentrant versions gethostent_r(), gethostbyaddr_r(), gethostbyname_r(), and gethostbyname2_r(). The caller supplies a hostent structure ret which will be filled in on success, and a temporary work buffer buf of size buflen. After the call, result will point to the result on success. In case of an error or if no entry is found result will be NULL. The functions return 0 on success and a nonzero error number on failure. In addition to the errors returned by the nonreentrant versions of these functions, if buf is too small, the functions will return ERANGE, and the call should be retried with a larger buffer. The global variable h_errno is not modified, but the address of a variable in which to store error numbers is passed in h_errnop.

BUGS

gethostbyname() does not recognize components of a dotted IPv4 address string that are expressed in hexadecimal.

SEE ALSO

getaddrinfo(3), getnameinfo(3), inet(3), inet_ntop(3), inet_pton(3), resolver(3), hosts(5), nsswitch.conf(5), hostname(7), named(8)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2880 - Linux cli command Image_ExifTool_Ricohpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Image_ExifTool_Ricohpm and provides detailed information about the command Image_ExifTool_Ricohpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Image_ExifTool_Ricohpm.

NAME 🖥️ Image_ExifTool_Ricohpm 🖥️

Ricoh EXIF maker notes tags

SYNOPSIS

This module is loaded automatically by Image::ExifTool when required.

DESCRIPTION

This module contains definitions required by Image::ExifTool to interpret Ricoh maker notes EXIF meta information.

AUTHOR

Copyright 2003-2024, Phil Harvey (philharvey66 at gmail.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

REFERENCES

<http://www.ozhiker.com/electronics/pjmt/jpeg_info/ricoh_mn.html>

ACKNOWLEDGEMENTS

Thanks to Tim Gray for his help decoding a number of tags for the Ricoh GR.

SEE ALSO

“Ricoh Tags” in Image::ExifTool::TagNames, Image::ExifTool (3pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2881 - Linux cli command Moose_Meta_Role_Methodpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Meta_Role_Methodpm and provides detailed information about the command Moose_Meta_Role_Methodpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Meta_Role_Methodpm.

NAME 🖥️ Moose_Meta_Role_Methodpm 🖥️

A Moose Method metaclass for Roles

VERSION

version 2.2207

DESCRIPTION

This is primarily used to mark methods coming from a role as being different. Right now it is nothing but a subclass of Moose::Meta::Method.

BUGS

See “BUGS” in Moose for details on reporting bugs.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2882 - Linux cli command remquof

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command remquof and provides detailed information about the command remquof, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the remquof.

NAME 🖥️ remquof 🖥️

remainder and part of quotient

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double remquo(double x, double y, int *quo);
float remquof(float x, float y, int *quo);
long double remquol(long double x, long double y, int *quo);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

remquo(), remquof(), remquol():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions compute the remainder and part of the quotient upon division of x by y. A few bits of the quotient are stored via the quo pointer. The remainder is returned as the function result.

The value of the remainder is the same as that computed by the remainder(3) function.

The value stored via the quo pointer has the sign of x / y and agrees with the quotient in at least the low order 3 bits.

For example, remquo(29.0, 3.0) returns -1.0 and might store 2. Note that the actual quotient might not fit in an integer.

RETURN VALUE

On success, these functions return the same value as the analogous functions described in remainder(3).

If x or y is a NaN, a NaN is returned.

If x is an infinity, and y is not a NaN, a domain error occurs, and a NaN is returned.

If y is zero, and x is not a NaN, a domain error occurs, and a NaN is returned.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is an infinity or y is 0, and the other argument is not a NaN
An invalid floating-point exception (FE_INVALID) is raised.

These functions do not set errno.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

remquo(), remquof(), remquol()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

fmod(3), logb(3), remainder(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2883 - Linux cli command isxdigit

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command isxdigit and provides detailed information about the command isxdigit, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the isxdigit.

NAME 🖥️ isxdigit 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2884 - Linux cli command Moose_Cookbook_Snack_Typespm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Moose_Cookbook_Snack_Typespm and provides detailed information about the command Moose_Cookbook_Snack_Typespm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Moose_Cookbook_Snack_Typespm.

NAME 🖥️ Moose_Cookbook_Snack_Typespm 🖥️

Snippets of code for using Types and Type Constraints

VERSION

version 2.2207

SYNOPSIS

package Point; use Moose; has x => ( isa => Int, is => ro ); has y => ( isa => Int, is => rw ); package main; use Try::Tiny; my $point = try { Point->new( x => fifty, y => forty ); } catch { print “Oops: $_”; }; my $point; my $xval = forty-two; my $xattribute = Point->meta->find_attribute_by_name(x); my $xtype_constraint = $xattribute->type_constraint; if ( $xtype_constraint->check($xval) ) { $point = Point->new( x => $xval, y => 0 ); } else { print “Value: $xval is not an " . $xtype_constraint->name . " “; }

DESCRIPTION

This is the Point example from Moose::Cookbook::Basics::Point_AttributesAndSubclassing with type checking added.

If we try to assign a string value to an attribute that is an Int, Moose will die with an explicit error message. The error will include the attribute name, as well as the type constraint name and the value which failed the constraint check.

We use Try::Tiny to catch this error message.

Later, we get the Moose::Meta::TypeConstraint object from a Moose::Meta::Attribute and use the Moose::Meta::TypeConstraint to check a value directly.

SEE ALSO

Moose::Cookbook::Basics::Point_AttributesAndSubclassing

Moose::Util::TypeConstraints

Moose::Meta::Attribute

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2006 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2885 - Linux cli command XtVaGetApplicationResources

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XtVaGetApplicationResources and provides detailed information about the command XtVaGetApplicationResources, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XtVaGetApplicationResources.

NAME 🖥️ XtVaGetApplicationResources 🖥️

obtain application resources

SYNTAX

#include <X11/Intrinsic.h>

void XtGetApplicationResources(Widget w, XtPointer base, XtResourceList resources, Cardinal num_resources, ArgList args, Cardinal num_args);

void XtVaGetApplicationResources(Widget w, XtPointer base, XtResourceList resources, Cardinal num_resources, … );

ARGUMENTS

args
Specifies the argument list to override resources obtained from the resource database.

base
Specifies the base address of the subpart data structure where the resources should be written.

num_args
Specifies the number of arguments in the argument list.

num_resources
Specifies the number of resources in the resource list.

resources
Specifies the resource list for the subpart.

  1. Specifies the widget that wants resources for a subpart or that identifies the resource database to search.


Specifies the variable arguments to override resources obtained from the resource database.

DESCRIPTION

The XtGetApplicationResources function first uses the passed widget, which is usually an application shell, to construct a resource name and class list, Then, it retrieves the resources from the argument list, the resource database, or the resource list default values. After adding base to each address, XtGetApplicationResources copies the resources into the address given in the resource list. If args is NULL, num_args must be zero. However, if num_args is zero, the argument list is not referenced. The portable way to specify application resources is to declare them as members of a structure and pass the address of the structure as the base argument.

SEE ALSO

X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2886 - Linux cli command Tk_sendpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_sendpm and provides detailed information about the command Tk_sendpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_sendpm.

NAME 🖥️ Tk_sendpm 🖥️

Execute a command in a different application

SYNOPSIS

$result = $widget->send(?options,?app=>cmd?arg arg …?)

DESCRIPTION

This method arranges for cmd (and args) to be ‘sent’ to the application named by app. It returns the result or an error (hence above should probably be ‘wrapped’ in eval{} and $@ tested). App may be the name of any application whose main window is on the display containing the sender’s main window; it need not be within the same process. If no arg arguments are present, then the string to be sent is contained entirely within the cmd argument. If one or more args are present, they are concatenated separated by white space to form the string to be sent.

If the initial arguments of the call begin with ``-’’ they are treated as options. The following options are currently defined:

-async
Requests asynchronous invocation. In this case the send command will complete immediately without waiting for cmd to complete in the target application; no result will be available and errors in the sent command will be ignored. If the target application is in the same process as the sending application then the -async option is ignored.


Serves no purpose except to terminate the list of options. This option is needed only if app could contain a leading ``-’’ character.

APPLICATION NAMES

The name of an application is set initially from the name of the program or script that created the application. You can query and change the name of an application with the appname method.

WHAT IS A SEND

The send mechanism was designed to allow Tcl/Tk applications to send Tcl Scripts to each other. This does not map very well onto perl/Tk. Perl/Tk “sends” a string to app, what happens as a result of this depends on the receiving application. If the other application is a Tcl/Tk4.* application it will be treated as a Tcl Script. If the “other” application is perl/Tk application (including sends to self) then the string is passed as an argument to a method call of the following form:

$mainwindow->**Receive(**string);

There is a default (AutoLoaded) Tk::Receive which returns an error to the sending application. A particular application may define its own Receive method in any class in MainWindow’s inheritance tree to do whatever it sees fit. For example it could eval the string, possibly in a Safe “compartment”.

If a Tcl/Tk application “sends” anything to a perl/Tk application then the perl/Tk application would have to attempt to interpret the incoming string as a Tcl Script. Simple cases are should not be too hard to emulate (split on white space and treat first element as “command” and other elements as arguments).

SECURITY

The send command is potentially a serious security loophole, since any application that can connect to your X server can send scripts to your applications. Hence the default behaviour outlined above. (With the availability of Safe it may make sense to relax default behaviour a little.)

Unmonitored eval‘ing of these incoming “scripts” can cause perl to read and write files and invoke subprocesses under your name. Host-based access control such as that provided by xhost is particularly insecure, since it allows anyone with an account on particular hosts to connect to your server, and if disabled it allows anyone anywhere to connect to your server. In order to provide at least a small amount of security, core Tk checks the access control being used by the server and rejects incoming sends unless (a) xhost-style access control is enabled (i.e. only certain hosts can establish connections) and (b) the list of enabled hosts is empty. This means that applications cannot connect to your server unless they use some other form of authorization such as that provide by xauth.

SEE ALSO

“eval” in perlfunc, Safe, system’s administrator/corporate security guidelines etc.

KEYWORDS

application, name, remote execution, security, send

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2887 - Linux cli command zip_open

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command zip_open and provides detailed information about the command zip_open, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the zip_open.

libzip (-lzip)

The

function opens the zip archive specified by

and returns a pointer to a

used to manipulate the archive. The

are specified by

the following values, or 0 for none of them.

Perform additional stricter consistency checks on the archive, and error if they fail.

Create the archive if it does not exist.

Error if archive already exists.

If archive exists, ignore its current contents. In other words, handle it the same way as an empty archive.

Open archive in read-only mode.

If an error occurs and

is

it will be set to the corresponding error code.

The

function opens a zip archive encapsulated by the zip_source

using the provided

In case of error, the zip_error

is filled in.

Upon successful completion

and

return a

pointer. Otherwise,

is returned and

sets

to indicate the error, while

sets

to indicate the error.

The archive specified by

is opened unless:

The file specified by

exists and

is set.

Inconsistencies were found in the file specified by

This error is often caused by specifying

but can also happen without it.

The

argument is

Required memory could not be allocated.

The file specified by

does not exist and

is not set.

The file specified by

is not a zip archive.

The file specified by

could not be opened.

A read error occurred; see

for details.

The file specified by

does not allow seeks.

and

were added in libzip 1.0.

and

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2888 - Linux cli command mq_setattr

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command mq_setattr and provides detailed information about the command mq_setattr, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the mq_setattr.

NAME 🖥️ mq_setattr 🖥️

get/set message queue attributes

LIBRARY

Real-time library (librt, -lrt)

SYNOPSIS

#include <mqueue.h>
int mq_getattr(mqd_t mqdes, struct mq_attr *attr);
int mq_setattr(mqd_t mqdes, const struct mq_attr *restrict newattr,
 struct mq_attr *restrict oldattr);

DESCRIPTION

mq_getattr() and mq_setattr() respectively retrieve and modify attributes of the message queue referred to by the message queue descriptor mqdes.

mq_getattr() returns an mq_attr structure in the buffer pointed by attr. This structure is defined as:

struct mq_attr {
    long mq_flags;       /* Flags: 0 or O_NONBLOCK */
    long mq_maxmsg;      /* Max. # of messages on queue */
    long mq_msgsize;     /* Max. message size (bytes) */
    long mq_curmsgs;     /* # of messages currently in queue */
};

The mq_flags field contains flags associated with the open message queue description. This field is initialized when the queue is created by mq_open(3). The only flag that can appear in this field is O_NONBLOCK.

The mq_maxmsg and mq_msgsize fields are set when the message queue is created by mq_open(3). The mq_maxmsg field is an upper limit on the number of messages that may be placed on the queue using mq_send(3). The mq_msgsize field is an upper limit on the size of messages that may be placed on the queue. Both of these fields must have a value greater than zero. Two /proc files that place ceilings on the values for these fields are described in mq_overview(7).

The mq_curmsgs field returns the number of messages currently held in the queue.

mq_setattr() sets message queue attributes using information supplied in the mq_attr structure pointed to by newattr. The only attribute that can be modified is the setting of the O_NONBLOCK flag in mq_flags. The other fields in newattr are ignored. If the oldattr field is not NULL, then the buffer that it points to is used to return an mq_attr structure that contains the same information that is returned by mq_getattr().

RETURN VALUE

On success mq_getattr() and mq_setattr() return 0; on error, -1 is returned, with errno set to indicate the error.

ERRORS

EBADF
The message queue descriptor specified in mqdes is invalid.

EINVAL
newattr->mq_flags contained set bits other than O_NONBLOCK.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

mq_getattr(), mq_setattr()

Thread safetyMT-Safe

VERSIONS

On Linux, mq_getattr() and mq_setattr() are library functions layered on top of the mq_getsetattr(2) system call.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001.

EXAMPLES

The program below can be used to show the default mq_maxmsg and mq_msgsize values that are assigned to a message queue that is created with a call to mq_open(3) in which the attr argument is NULL. Here is an example run of the program:

$ ./a.out /testq
Maximum # of messages on queue:   10
Maximum message size:             8192

Since Linux 3.5, the following /proc files (described in mq_overview(7)) can be used to control the defaults:

$ uname -sr
Linux 3.8.0
$ cat /proc/sys/fs/mqueue/msg_default
10
$ cat /proc/sys/fs/mqueue/msgsize_default
8192

Program source

#include <fcntl.h>
#include <mqueue.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <unistd.h>
#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \
                        } while (0)
int
main(int argc, char *argv[])
{
    mqd_t mqd;
    struct mq_attr attr;
    if (argc != 2) {
        fprintf(stderr, "Usage: %s mq-name

“, argv[0]); exit(EXIT_FAILURE); } mqd = mq_open(argv[1], O_CREAT | O_EXCL, 0600, NULL); if (mqd == (mqd_t) -1) errExit(“mq_open”); if (mq_getattr(mqd, &attr) == -1) errExit(“mq_getattr”); printf(“Maximum # of messages on queue: %ld “, attr.mq_maxmsg); printf(“Maximum message size: %ld “, attr.mq_msgsize); if (mq_unlink(argv[1]) == -1) errExit(“mq_unlink”); exit(EXIT_SUCCESS); }

SEE ALSO

mq_close(3), mq_notify(3), mq_open(3), mq_receive(3), mq_send(3), mq_unlink(3), mq_overview(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2889 - Linux cli command HTML_HeadParserpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTML_HeadParserpm and provides detailed information about the command HTML_HeadParserpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTML_HeadParserpm.

NAME 🖥️ HTML_HeadParserpm 🖥️

Parse <HEAD> section of a HTML document

SYNOPSIS

require HTML::HeadParser; $p = HTML::HeadParser->new; $p->parse($text) and print “not finished”; $p->header(Title) # to access <title>….</title> $p->header(Content-Base) # to access <base href=“http://…"> $p->header(Foo) # to access <meta http-equiv=“Foo” content=”…"> $p->header(X-Meta-Author) # to access <meta name=“author” content="…"> $p->header(X-Meta-Charset) # to access <meta charset="…">

DESCRIPTION

The HTML::HeadParser is a specialized (and lightweight) HTML::Parser that will only parse the <HEAD>…</HEAD> section of an HTML document. The parse() method will return a FALSE value as soon as some <BODY> element or body text are found, and should not be called again after this.

Note that the HTML::HeadParser might get confused if raw undecoded UTF-8 is passed to the parse() method. Make sure the strings are properly decoded before passing them on.

The HTML::HeadParser keeps a reference to a header object, and the parser will update this header object as the various elements of the <HEAD> section of the HTML document are recognized. The following header fields are affected:

Content-Base:
The Content-Base header is initialized from the <base href="…"> element.

Title:
The Title header is initialized from the <title>…</title> element.

Isindex:
The Isindex header will be added if there is a <isindex> element in the <head>. The header value is initialized from the prompt attribute if it is present. If no prompt attribute is given it will have ‘?’ as the value.

X-Meta-Foo:
All <meta> elements containing a name attribute will result in headers using the prefix X-Meta- appended with the value of the name attribute as the name of the header, and the value of the content attribute as the pushed header value. <meta> elements containing a http-equiv attribute will result in headers as in above, but without the X-Meta- prefix in the header name. <meta> elements containing a charset attribute will result in an X-Meta-Charset header, using the value of the charset attribute as the pushed header value. The ‘:’ character can’t be represented in header field names, so if the meta element contains this char it’s substituted with ‘-’ before forming the field name.

METHODS

The following methods (in addition to those provided by the superclass) are available:

$hp = HTML::HeadParser->new

$hp = HTML::HeadParser->new( $header )

The object constructor. The optional $header argument should be a reference to an object that implement the header() and push_header() methods as defined by the HTTP::Headers class. Normally it will be of some class that is a or delegates to the HTTP::Headers class. If no $header is given HTML::HeadParser will create an HTTP::Headers object by itself (initially empty).

$hp->header;
Returns a reference to the header object.

$hp->header( $key )
Returns a header value. It is just a shorter way to write $hp->header->header($key).

EXAMPLE

$h = HTTP::Headers->new; $p = HTML::HeadParser->new($h); $p->parse(<<EOT); <title>Stupid example</title> <base href=“http://www.linpro.no/lwp/"> Normal text starts here. EOT undef $p; print $h->title; # should print “Stupid example”

SEE ALSO

HTML::Parser, HTTP::Headers

The HTTP::Headers class is distributed as part of the libwww-perl package. If you don’t have that distribution installed you need to provide the $header argument to the HTML::HeadParser constructor with your own object that implements the documented protocol.

COPYRIGHT

Copyright 1996-2001 Gisle Aas. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2890 - Linux cli command PA_DOUBLEconst

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command PA_DOUBLEconst and provides detailed information about the command PA_DOUBLEconst, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the PA_DOUBLEconst.

NAME 🖥️ PA_DOUBLEconst 🖥️

define custom behavior for printf-like functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <printf.h>
int register_printf_specifier(int spec, printf_function func,
 printf_arginfo_size_function arginfo);
int register_printf_modifier(const wchar_t *str);
int register_printf_type(printf_va_arg_function fct);

Callbacks

typedef int printf_function(FILE *stream, const struct printf_info *info,
 const void *const args[]);
typedef int printf_arginfo_size_function(const struct printf_info *info,
 size_t n, int argtypes[n], int size[n]);
typedef void printf_va_arg_function(void *mem, va_list *ap);

Types

struct printf_info {
 int prec; // Precision
 int width; // Width
 wchar_t spec; // Format letter
 unsigned int is_long_double:1;// L or ll flag
 unsigned int is_short:1; // h flag
 unsigned int is_long:1; // l flag
 unsigned int alt:1; // # flag
 unsigned int space:1; // Space flag
 unsigned int left:1; // - flag
 unsigned int showsign:1; // + flag
 unsigned int group:1; // ' flag
 unsigned int extra:1; // For special use
 unsigned int is_char:1; // hh flag
 unsigned int wide:1; // True for wide character streams
 unsigned int i18n:1; // I flag
 unsigned int is_binary128:1; /* Floating-point argument is
  ABI-compatible with
  IEC 60559 binary128 */
 unsigned short user; // Bits for user-installed modifiers
 wchar_t pad; // Padding character
};

Constants

#define PA_FLAG_LONG_LONG /* ... */
#define PA_FLAG_LONG_DOUBLE /* ... */
#define PA_FLAG_LONG /* ... */
#define PA_FLAG_SHORT /* ... */
#define PA_FLAG_PTR /* ... */

DESCRIPTION

These functions serve to extend and/or modify the behavior of the printf(3) family of functions.

register_printf_specifier()

This function registers a custom conversion specifier for the printf(3) family of functions.

spec
The character which will be used as a conversion specifier in the format string.

func
Callback function that will be executed by the printf(3) family of functions to format the input arguments into the output stream.

stream
Output stream where the formatted output should be printed. This stream transparently represents the output, even in the case of functions that write to a string.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in arginfo.

args
Array of pointers to the arguments to the printf(3) -like function.

arginfo
Callback function that will be executed by the printf(3) family of functions to know how many arguments should be parsed for the custom specifier and also their types.

info
Structure that holds context information, including the modifiers specified in the format string. This holds the same contents as in func.

n
Number of arguments remaining to be parsed.

argtypes
This array should be set to define the type of each of the arguments that will be parsed. Each element in the array represents one of the arguments to be parsed, in the same order that they are passed to the printf(3) -like function. Each element should be set to a base type (PA_*) from the enum above, or a custom one, and optionally ORed with an appropriate length modifier (PA_FLAG_*).

The type is determined by using one of the following constants:

PA_INT
int.

PA_CHAR
int, cast to char.

PA_WCHAR
wchar_t.

PA_STRING
const char *, a ‘�’-terminated string.

PA_WSTRING
const wchar_t *, a wide character L’�’-terminated string.

PA_POINTER
void *.

PA_FLOAT
float.

PA_DOUBLE
double.

PA_LAST
TODO.

size
For user-defined types, the size of the type (in bytes) should also be specified through this array. Otherwise, leave it unused.

arginfo is called before func, and prepares some information needed to call func.

register_printf_modifier()

TODO

register_printf_type()

TODO

RETURN VALUE

register_printf_specifier(), register_printf_modifier(), and register_printf_type() return zero on success, or -1 on error.

Callbacks

The callback of type printf_function should return the number of characters written, or -1 on error.

The callback of type printf_arginfo_size_function should return the number of arguments to be parsed by this specifier. It also passes information about the type of those arguments to the caller through argtypes. On error, it should return -1.

ERRORS

EINVAL
The specifier was not a valid character.

STANDARDS

GNU.

HISTORY

register_printf_function(3) is an older function similar to register_printf_specifier(), and is now deprecated. That function can’t handle user-defined types.

register_printf_specifier() supersedes register_printf_function(3).

EXAMPLES

The following example program registers the ‘b’ and ‘B’ specifiers to print integers in binary format, mirroring rules for other unsigned conversion specifiers like ‘x’ and ‘u’. This can be used to print in binary prior to C23.

/* This code is in the public domain */
#include <err.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <printf.h>
#define GROUP_SEP  '\''
struct Printf_Pad {
    char    ch;
    size_t  len;
};
static int b_printf(FILE *stream, const struct printf_info *info,
                    const void *const args[]);
static int b_arginf_sz(const struct printf_info *info,
                    size_t n, int argtypes[n], int size[n]);
static uintmax_t b_value(const struct printf_info *info,
                    const void *arg);
static size_t b_bin_repr(char bin[UINTMAX_WIDTH],
                    const struct printf_info *info, const void *arg);
static size_t b_bin_len(const struct printf_info *info,
                    ptrdiff_t min_len);
static size_t b_pad_len(const struct printf_info *info,
                    ptrdiff_t bin_len);
static ssize_t b_print_prefix(FILE *stream,
                    const struct printf_info *info);
static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info,
                    ptrdiff_t min_len);
static ssize_t b_print_number(FILE *stream,
                    const struct printf_info *info,
                    const char bin[UINTMAX_WIDTH],
                    size_t min_len, size_t bin_len);
static char pad_ch(const struct printf_info *info);
static ssize_t pad_spaces(FILE *stream, size_t pad_len);
int
main(void)
{
    if (register_printf_specifier('b', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('b', ...)");
    if (register_printf_specifier('B', b_printf, b_arginf_sz) == -1)
        err(EXIT_FAILURE, "register_printf_specifier('B', ...)");
    printf("....----....----....----....----

“); printf("%llb; “, 0x5Ellu); printf("%lB; “, 0x5Elu); printf("%b; “, 0x5Eu); printf("%hB; “, 0x5Eu); printf("%hhb; “, 0x5Eu); printf("%jb; “, (uintmax_t)0x5E); printf("%zb; “, (size_t)0x5E); printf(”….—-….—-….—-….—- “); printf(”%#b; “, 0x5Eu); printf(”%#B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf("%10b; “, 0x5Eu); printf("%010b; “, 0x5Eu); printf(”%.10b; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%-10B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”%‘B; “, 0x5Eu); printf(”….—-….—-….—-….—- “); printf(”….—-….—-….—-….—- “); printf(”%#16.12b; “, 0xAB); printf(”%-#‘20.12b; “, 0xAB); printf(”%#‘020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#020B; “, 0xAB); printf(”%‘020B; “, 0xAB); printf("%020B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#021B; “, 0xAB); printf(”%‘021B; “, 0xAB); printf("%021B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#022B; “, 0xAB); printf(”%‘022B; “, 0xAB); printf("%022B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%#023B; “, 0xAB); printf(”%‘023B; “, 0xAB); printf("%023B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%-#‘19.11b; “, 0xAB); printf(”%#‘019B; “, 0xAB); printf(”%#019B; “, 0xAB); printf(”….—-….—-….—-….—- “); printf(”%‘019B; “, 0xAB); printf("%019B; “, 0xAB); printf(”%#016b; “, 0xAB); printf(”….—-….—-….—-….—- “); return 0; } static int b_printf(FILE *stream, const struct printf_info *info, const void const args[]) { char bin[UINTMAX_WIDTH]; size_t min_len, bin_len; ssize_t len, tmp; struct Printf_Pad pad = {0}; len = 0; min_len = b_bin_repr(bin, info, args[0]); bin_len = b_bin_len(info, min_len); pad.ch = pad_ch(info); if (pad.ch == ’ ‘) pad.len = b_pad_len(info, bin_len); / Padding with ’ ’ (right aligned) / if ((pad.ch == ’ ‘) && !info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } / “0b”/“0B” prefix / if (info->alt) { tmp = b_print_prefix(stream, info); if (tmp == EOF) return EOF; len += tmp; } / Padding with ‘0’ / if (pad.ch == ‘0’) { tmp = b_pad_zeros(stream, info, min_len); if (tmp == EOF) return EOF; len += tmp; } / Print number (including leading 0s to fill precision) / tmp = b_print_number(stream, info, bin, min_len, bin_len); if (tmp == EOF) return EOF; len += tmp; / Padding with ’ ’ (left aligned) */ if (info->left) { tmp = pad_spaces(stream, pad.len); if (tmp == EOF) return EOF; len += tmp; } return len; } static int b_arginf_sz(const struct printf_info *info, size_t n, int argtypes[n], [[maybe_unused]] int size[n]) { if (n < 1) return -1; if (info->is_long_double) argtypes[0] = PA_INT | PA_FLAG_LONG_LONG; else if (info->is_long) argtypes[0] = PA_INT | PA_FLAG_LONG; else argtypes[0] = PA_INT; return 1; } static uintmax_t b_value(const struct printf_info *info, const void *arg) { if (info->is_long_double) return *(const unsigned long long *)arg; if (info->is_long) return *(const unsigned long )arg; / short and char are both promoted to int */ return *(const unsigned int *)arg; } static size_t b_bin_repr(char bin[UINTMAX_WIDTH], const struct printf_info *info, const void *arg) { size_t min_len; uintmax_t val; val = b_value(info, arg); bin[0] = ‘0’; for (min_len = 0; val; min_len++) { bin[min_len] = ‘0’ + (val % 2); val »= 1; } return MAX(min_len, 1); } static size_t b_bin_len(const struct printf_info *info, ptrdiff_t min_len) { return MAX(info->prec, min_len); } static size_t b_pad_len(const struct printf_info *info, ptrdiff_t bin_len) { ptrdiff_t pad_len; pad_len = info->width - bin_len; if (info->alt) pad_len -= 2; if (info->group) pad_len -= (bin_len - 1) / 4; return MAX(pad_len, 0); } static ssize_t b_print_prefix(FILE *stream, const struct printf_info *info) { ssize_t len; len = 0; if (fputc(‘0’, stream) == EOF) return EOF; len++; if (fputc(info->spec, stream) == EOF) return EOF; len++; return len; } static ssize_t b_pad_zeros(FILE *stream, const struct printf_info *info, ptrdiff_t min_len) { ssize_t len; ptrdiff_t tmp; len = 0; tmp = info->width - (info->alt * 2); if (info->group) tmp -= tmp / 5 - !(tmp % 5); for (ptrdiff_t i = tmp - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static ssize_t b_print_number(FILE *stream, const struct printf_info info, const char bin[UINTMAX_WIDTH], size_t min_len, size_t bin_len) { ssize_t len; len = 0; / Print leading zeros to fill precision / for (size_t i = bin_len - 1; i > min_len - 1; i–) { if (fputc(‘0’, stream) == EOF) return EOF; len++; if (!info->group || (i % 4)) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } / Print number */ for (size_t i = min_len - 1; i < min_len; i–) { if (fputc(bin[i], stream) == EOF) return EOF; len++; if (!info->group || (i % 4) || !i) continue; if (fputc(GROUP_SEP, stream) == EOF) return EOF; len++; } return len; } static char pad_ch(const struct printf_info *info) { if ((info->prec != -1) || (info->pad == ’ ‘) || info->left) return ’ ‘; return ‘0’; } static ssize_t pad_spaces(FILE *stream, size_t pad_len) { ssize_t len; len = 0; for (size_t i = pad_len - 1; i < pad_len; i–) { if (fputc(’ ‘, stream) == EOF) return EOF; len++; } return len; }

SEE ALSO

asprintf(3), printf(3), wprintf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2891 - Linux cli command islower

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command islower and provides detailed information about the command islower, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the islower.

NAME 🖥️ islower 🖥️

character classification functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

isascii():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

isblank():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

salnum_l(), salpha_l(), sblank_l(), scntrl_l(), sdigit_l(), sgraph_l(), slower_l(), sprint_l(), spunct_l(), sspace_l(), supper_l(), sxdigit_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700
    Before glibc 2.10:
        _GNU_SOURCE

isascii_l():

    Since glibc 2.10:
        _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
    Before glibc 2.10:
        _GNU_SOURCE

DESCRIPTION

These functions check whether c, which must have the value of an unsigned char or EOF, falls into a certain character class according to the specified locale. The functions without the “_l” suffix perform the check based on the current locale.

The functions with the “_l” suffix perform the check based on the locale specified by the locale object locale. The behavior of these functions is undefined if locale is the special locale object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a valid locale object handle.

The list below explains the operation of the functions without the “_l” suffix; the functions with the “_l” suffix differ only in using the locale object locale instead of the current locale.

isalnum()
checks for an alphanumeric character; it is equivalent to (isalpha(c) || isdigit(c)).

isalpha()
checks for an alphabetic character; in the standard “C” locale, it is equivalent to (isupper(c) || islower(c)). In some locales, there may be additional characters for which isalpha() is true—letters which are neither uppercase nor lowercase.

isascii()
checks whether c is a 7-bit unsigned char value that fits into the ASCII character set.

isblank()
checks for a blank character; that is, a space or a tab.

iscntrl()
checks for a control character.

isdigit()
checks for a digit (0 through 9).

isgraph()
checks for any printable character except space.

islower()
checks for a lowercase character.

isprint()
checks for any printable character including space.

ispunct()
checks for any printable character which is not a space or an alphanumeric character.

isspace()
checks for white-space characters. In the “C” and “POSIX” locales, these are: space, form-feed (’ ‘), newline (’ ‘), carriage return (’ ‘), horizontal tab (’ ‘), and vertical tab (’ ‘).

isupper()
checks for an uppercase letter.

isxdigit()
checks for hexadecimal digits, that is, one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F.

RETURN VALUE

The values returned are nonzero if the character c falls into the tested class, and zero if not.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

isalnum(), isalpha(), isascii(), isblank(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()

Thread safetyMT-Safe

STANDARDS

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
isblank()
C11, POSIX.1-2008.

isascii()
isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
POSIX.1-2008.

isascii_l()
GNU.

HISTORY

isalnum()
isalpha()
iscntrl()
isdigit()
isgraph()
islower()
isprint()
ispunct()
isspace()
isupper()
isxdigit()
C89, POSIX.1-2001.

isblank()
C99, POSIX.1-2001.

isascii()
POSIX.1-2001 (XSI).

POSIX.1-2008 marks it as obsolete, noting that it cannot be used portably in a localized application.

isalnum_l()
isalpha_l()
isblank_l()
iscntrl_l()
isdigit_l()
isgraph_l()
islower_l()
isprint_l()
ispunct_l()
isspace_l()
isupper_l()
isxdigit_l()
glibc 2.3. POSIX.1-2008.

isascii_l()
glibc 2.3.

CAVEATS

The standards require that the argument c for these functions is either EOF or a value that is representable in the type unsigned char; otherwise, the behavior is undefined. If the argument c is of type char, it must be cast to unsigned char, as in the following example:

char c;
...
res = toupper((unsigned char) c);

This is necessary because char may be the equivalent of signed char, in which case a byte where the top bit is set would be sign extended when converting to int, yielding a value that is outside the range of unsigned char.

The details of what characters belong to which class depend on the locale. For example, isupper() will not recognize an A-umlaut (Ä) as an uppercase letter in the default C locale.

SEE ALSO

iswalnum(3), iswalpha(3), iswblank(3), iswcntrl(3), iswdigit(3), iswgraph(3), iswlower(3), iswprint(3), iswpunct(3), iswspace(3), iswupper(3), iswxdigit(3), newlocale(3), setlocale(3), toascii(3), tolower(3), toupper(3), uselocale(3), ascii(7), locale(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2892 - Linux cli command Net_DNS_RR_CSYNCpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Net_DNS_RR_CSYNCpm and provides detailed information about the command Net_DNS_RR_CSYNCpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Net_DNS_RR_CSYNCpm.

NAME 🖥️ Net_DNS_RR_CSYNCpm 🖥️

DNS CSYNC resource record

SYNOPSIS

use Net::DNS; $rr = Net::DNS::RR->new(name CSYNC SOAserial flags typelist);

DESCRIPTION

Class for DNSSEC CSYNC resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

SOAserial

soaserial

$soaserial = $rr->soaserial; $rr->soaserial( $soaserial );

The SOA Serial field contains a copy of the 32-bit SOA serial number from the child zone.

flags

$flags = $rr->flags; $rr->flags( $flags );

The flags field contains 16 bits of boolean flags that define operations which affect the processing of the CSYNC record.

immediate
$rr->immediate(1); if ( $rr->immediate ) { … } If not set, a parental agent must not process the CSYNC record until the zone administrator approves the operation through an out-of-band mechanism.

soaminimum
$rr->soaminimum(1); if ( $rr->soaminimum ) { … } If set, a parental agent querying child authoritative servers must not act on data from zones advertising an SOA serial number less than the SOAserial value.

typelist

@typelist = $rr->typelist; $typelist = $rr->typelist;

The type list indicates the record types to be processed by the parental agent. When called in scalar context, the list is interpolated into a string.

COPYRIGHT

Copyright (c)2015 Dick Franks

All rights reserved.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the original copyright notices appear in all copies and that both copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SEE ALSO

perl Net::DNS Net::DNS::RR RFC7477 <https://tools.ietf.org/html/rfc7477>

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2893 - Linux cli command re_exec

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command re_exec and provides detailed information about the command re_exec, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the re_exec.

NAME 🖥️ re_exec 🖥️

BSD regex functions

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _REGEX_RE_COMP
#include <sys/types.h>
#include <regex.h>
[[deprecated]] char *re_comp(const char *regex);
[[deprecated]] int re_exec(const char *string);

DESCRIPTION

re_comp() is used to compile the null-terminated regular expression pointed to by regex. The compiled pattern occupies a static area, the pattern buffer, which is overwritten by subsequent use of re_comp(). If regex is NULL, no operation is performed and the pattern buffer’s contents are not altered.

re_exec() is used to assess whether the null-terminated string pointed to by string matches the previously compiled regex.

RETURN VALUE

re_comp() returns NULL on successful compilation of regex otherwise it returns a pointer to an appropriate error message.

re_exec() returns 1 for a successful match, zero for failure.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

re_comp(), re_exec()

Thread safetyMT-Unsafe

STANDARDS

None.

HISTORY

4.3BSD.

These functions are obsolete; the functions documented in regcomp(3) should be used instead.

SEE ALSO

regcomp(3), regex(7), GNU regex manual

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2894 - Linux cli command recno

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command recno and provides detailed information about the command recno, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the recno.

NAME 🖥️ recno 🖥️

record number database access method

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <sys/types.h>
#include <db.h>

DESCRIPTION

Note well: This page documents interfaces provided up until glibc 2.1. Since glibc 2.2, glibc no longer provides these interfaces. Probably, you are looking for the APIs provided by the libdb library instead.

The routine dbopen(3) is the library interface to database files. One of the supported file formats is record number files. The general description of the database access methods is in dbopen(3), this manual page describes only the recno-specific information.

The record number data structure is either variable or fixed-length records stored in a flat-file format, accessed by the logical record number. The existence of record number five implies the existence of records one through four, and the deletion of record number one causes record number five to be renumbered to record number four, as well as the cursor, if positioned after record number one, to shift down one record.

The recno access-method-specific data structure provided to dbopen(3) is defined in the <db.h> include file as follows:

typedef struct {
    unsigned long flags;
    unsigned int  cachesize;
    unsigned int  psize;
    int           lorder;
    size_t        reclen;
    unsigned char bval;
    char         *bfname;
} RECNOINFO;

The elements of this structure are defined as follows:

flags
The flag value is specified by ORing any of the following values:

R_FIXEDLEN
The records are fixed-length, not byte delimited. The structure element reclen specifies the length of the record, and the structure element bval is used as the pad character. Any records, inserted into the database, that are less than reclen bytes long are automatically padded.

R_NOKEY
In the interface specified by dbopen(3), the sequential record retrieval fills in both the caller’s key and data structures. If the R_NOKEY flag is specified, the cursor routines are not required to fill in the key structure. This permits applications to retrieve records at the end of files without reading all of the intervening records.

R_SNAPSHOT
This flag requires that a snapshot of the file be taken when dbopen(3) is called, instead of permitting any unmodified records to be read from the original file.

cachesize
A suggested maximum size, in bytes, of the memory cache. This value is only advisory, and the access method will allocate more memory rather than fail. If cachesize is 0 (no size is specified), a default cache is used.

psize
The recno access method stores the in-memory copies of its records in a btree. This value is the size (in bytes) of the pages used for nodes in that tree. If psize is 0 (no page size is specified), a page size is chosen based on the underlying filesystem I/O block size. See btree(3) for more information.

lorder
The byte order for integers in the stored database metadata. The number should represent the order as an integer; for example, big endian order would be the number 4,321. If lorder is 0 (no order is specified), the current host order is used.

reclen
The length of a fixed-length record.

bval
The delimiting byte to be used to mark the end of a record for variable-length records, and the pad character for fixed-length records. If no value is specified, newlines (" “) are used to mark the end of variable-length records and fixed-length records are padded with spaces.

bfname
The recno access method stores the in-memory copies of its records in a btree. If bfname is non-NULL, it specifies the name of the btree file, as if specified as the filename for a dbopen(3) of a btree file.

The data part of the key/data pair used by the recno access method is the same as other access methods. The key is different. The data field of the key should be a pointer to a memory location of type recno_t, as defined in the <db.h> include file. This type is normally the largest unsigned integral type available to the implementation. The size field of the key should be the size of that type.

Because there can be no metadata associated with the underlying recno access method files, any changes made to the default values (e.g., fixed record length or byte separator value) must be explicitly specified each time the file is opened.

In the interface specified by dbopen(3), using the put interface to create a new record will cause the creation of multiple, empty records if the record number is more than one greater than the largest record currently in the database.

ERRORS

The recno access method routines may fail and set errno for any of the errors specified for the library routine dbopen(3) or the following:

EINVAL
An attempt was made to add a record to a fixed-length database that was too large to fit.

BUGS

Only big and little endian byte order is supported.

SEE ALSO

btree(3), dbopen(3), hash(3), mpool(3)

Document Processing in a Relational Database System, Michael Stonebraker, Heidi Stettner, Joseph Kalash, Antonin Guttman, Nadene Lynn, Memorandum No. UCB/ERL M82/32, May 1982.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2895 - Linux cli command sigset_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command sigset_ttype and provides detailed information about the command sigset_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the sigset_ttype.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2896 - Linux cli command fminf

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command fminf and provides detailed information about the command fminf, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the fminf.

NAME 🖥️ fminf 🖥️

determine minimum of two floating-point numbers

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double fmin(double x, double y);
float fminf(float x, float y);
long double fminl(long double x, long double y);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

fmin(), fminf(), fminl():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions return the lesser value of x and y.

RETURN VALUE

These functions return the minimum of x and y.

If one argument is a NaN, the other argument is returned.

If both arguments are NaN, a NaN is returned.

ERRORS

No errors occur.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

fmin(), fminf(), fminl()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

SEE ALSO

fdim(3), fmax(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2897 - Linux cli command program_invocation_name

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command program_invocation_name and provides detailed information about the command program_invocation_name, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the program_invocation_name.

NAME 🖥️ program_invocation_name 🖥️

obtain name used to invoke calling program

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <errno.h>
extern char *program_invocation_name;
extern char *program_invocation_short_name;

DESCRIPTION

program_invocation_name contains the name that was used to invoke the calling program. This is the same as the value of argv[0] in main(), with the difference that the scope of program_invocation_name is global.

program_invocation_short_name contains the basename component of name that was used to invoke the calling program. That is, it is the same value as program_invocation_name, with all text up to and including the final slash (/), if any, removed.

These variables are automatically initialized by the glibc run-time startup code.

VERSIONS

The Linux-specific /proc/pid/cmdline file provides access to similar information.

STANDARDS

GNU.

SEE ALSO

proc(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2898 - Linux cli command Tk_compositepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_compositepm and provides detailed information about the command Tk_compositepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_compositepm.

NAME 🖥️ Tk_compositepm 🖥️

Defining a new composite widget class

SYNOPSIS

package Tk::MyNewWidget; use Tk::widgets qw/ list of Tk widgets /; use base qw/ Tk::Frame /; # or Tk::Toplevel Construct Tk::Widget MyNewWidget; sub ClassInit { my( $class, $mw ) = @_; #… e.g., class bindings here … $class->SUPER::ClassInit( $mw ); } sub Populate { my( $self, $args ) = @_; my $flag = delete $args->{-flag}; if( defined $flag ) { # handle -flag => xxx which can only be done at create # time the delete above ensures that new() does not try # and do $self->configure( -flag => xxx ); } $self->SUPER::Populate( $args ); $self = $self->Component( … ); $self->Delegates( … ); $self->ConfigSpecs( -cursor => [ SELF, cursor, Cursor, undef ], -something => [ METHOD, dbName, dbClass, default ], -text => [ $label, dbName, dbClass, default ], -heading => [ {-text => $head}, heading, Heading, My Heading ], ); } sub something { my( $self, $value) = @_; if ( @_ > 1 ) { # set it } return # current value } 1; _ _END_ _ =head1 NAME Tk::Whatever - a whatever widget =head1 SYNOPSIS use Tk::Whatever; $widget = $parent->Whatever(…); =head1 DESCRIPTION …

DESCRIPTION

The intention behind a composite is to create a higher-level widget, sometimes called a “super-widget” or “mega-widget”. Most often, a composite will be built upon other widgets by using them, as opposed to specializing on them. For example, the supplied composite widget LabEntry is made of an Entry and a Label; it is neither a kind-of Label nor is it a kind-of Entry.

Most of the work of a composite widget consistd in creating subwidgets, arranging to dispatch configure options to the proper subwidgets and manage composite-specific configure options.

GLORY DETAILS

Depending on your Perl/Tk knowledge this section may be enlighting or confusing.

Composite Widget

Since Perl/Tk is heavilly using an object-oriented approach, it is no suprise that creating a composite goes through a new() method. However, the composite does not normally define a new() method itself: it is usually sufficient to simply inherit it from Tk::Widget.

This is what happens when the composite uses

use base qw/ Tk::Frame /; # or Tk::Toplevel

to specify its inheritance chain. To complete the initialisation of the widget, it must call the Construct method from class Widget. That method accepts the name of the new class to create, i.e. the package name of your composite widget:

Construct Tk::Widget MyNewWidget;

Here, MyNewWidget is the package name (aka the widget’s class). This will define a constructor method for MyNewWidget, normally named after the widget’s class. Instanciating that composite in client code would the look like:

$mw = MainWindow->new; # creates a top-level MainWindow $self = $mw->MyNewWidget(); # creates an instance of the # composite widget MyNewWidget

Whenever a composite is instanciated in client code, Tk::Widget::new() will be invoked via the widget’s class constructor. That new method will call

$self->Populate(\args);

where %args is the arguments passed to the widget’s constructor. Note that Populate receives a reference to the hash array containing all arguments.

Populate is typically defined in the composite class (package), which creates the characteristic subwidgets of the class.

Creating Subwidgets

Subwidget creation happens usually in Populate(). The composite usually calls the subwidget’s constructor method either directly, for “private” subwidgets, or indirectly through the Component method for subwidgets that should be advertised to clients.

Populate may call Delegates to direct calls to methods of chosen subwidgets. For simple composites, typically most if not all methods are directed to a single subwidget - e.g. ScrListbox directs all methods to the core Listbox so that $composite->get(…) calls $listbox->get(…).

Defining mega-widget options

Populate should also call ConfigSpecs() to specify the way that configure-like options should be handled in the composite. Once Populate returns, method Tk::Frame::ConfigDefault walks through the ConfigSpecs entries and populates %$args hash with defaults for options from X resources (.Xdefaults, etc).

When Populate returns to Tk::Widget::new(), a call to $self->configure(%$args) is made which sets *all* the options.

SEE ALSO

Tk::ConfigSpecs Tk::mega Tk::Derived

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2899 - Linux cli command File_UserDirspm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command File_UserDirspm and provides detailed information about the command File_UserDirspm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the File_UserDirspm.

NAME 🖥️ File_UserDirspm 🖥️

Find extra media and documents directories

VERSION

version 0.09

SYNOPSIS

use File::UserDirs qw(:all); print xdg_desktop_dir; # e.g. /home/user/Desktop

DESCRIPTION

This module can be used to find directories as informally specified by the Freedesktop.org xdg-user-dirs software. This gives a mechanism to locate extra directories for media and documents files.

FUNCTIONS

May be exported on request. Also the group :all is defined which exports all methods.

xdg_desktop_dir

my $dir = xdg_desktop_dir;

Returns the desktop directory. Unless changed by the user, this is the directory Desktop in the home directory.

xdg_documents_dir

my $dir = xdg_documents_dir;

Returns the documents directory. Unless changed by the user, this is the home directory.

xdg_download_dir

my $dir = xdg_download_dir;

Returns the download directory. Unless changed by the user, this is the home directory.

xdg_music_dir

my $dir = xdg_music_dir;

Returns the music directory. Unless changed by the user, this is the home directory.

xdg_pictures_dir

my $dir = xdg_pictures_dir;

Returns the pictures directory. Unless changed by the user, this is the home directory.

xdg_publicshare_dir

my $dir = xdg_publicshare_dir;

Returns the public share directory. Unless changed by the user, this is the home directory.

xdg_templates_dir

my $dir = xdg_templates_dir;

Returns the templates directory. Unless changed by the user, this is the home directory.

xdg_videos_dir

my $dir = xdg_videos_dir;

Returns the videos directory. Unless changed by the user, this is the home directory.

DIAGNOSTICS

““xdg-user-dir” failed to start: %s”
The executable xdg-user-dir could not be run, most likely because it was not installed. See DEPENDENCIES.

CONFIGURATION AND ENVIRONMENT

The location of the directories can be specified by the user in the file $XDG_CONFIG_HOME/user-dirs.dirs. It is a shell file setting a number of environment variables. To find the exact pathname from Perl, run:

use File::BaseDir qw(config_home); print config_home(user-dirs.dirs);

Example customised user-dirs.dirs

XDG_DESKTOP_DIR="$HOME/Workspace" XDG_DOCUMENTS_DIR="$HOME/Files" XDG_DOWNLOAD_DIR="$HOME/Files/Downloads" XDG_MUSIC_DIR="$HOME/Files/Audio" XDG_PICTURES_DIR="$HOME/Files/Images" XDG_PUBLICSHARE_DIR="$HOME/public_html" XDG_TEMPLATES_DIR="$HOME/Files/Document templates" XDG_VIDEOS_DIR="$HOME/Files/Video"

DEPENDENCIES

This module requires the executable xdg-user-dir from the package xdg-user-dirs. Source code is available from <http://cgit.freedesktop.org/xdg/xdg-user-dirs/>.

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2003-2021 by Jaap Karssenberg || Pardus [Larus] <[email protected]>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2900 - Linux cli command intN_ttype

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command intN_ttype and provides detailed information about the command intN_ttype, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the intN_ttype.

NAME 🖥️ intN_ttype 🖥️

fixed-width basic integer types

LIBRARY

Standard C library (libc)

SYNOPSIS

#include <stdint.h>
typedef /* ... */ int8_t;
typedef /* ... */ int16_t;
typedef /* ... */ int32_t;
typedef /* ... */ int64_t;
typedef /* ... */ uint8_t;
typedef /* ... */ uint16_t;
typedef /* ... */ uint32_t;
typedef /* ... */ uint64_t;
#define INT8_WIDTH 8
#define INT16_WIDTH 16
#define INT32_WIDTH 32
#define INT64_WIDTH 64
#define UINT8_WIDTH 8
#define UINT16_WIDTH 16
#define UINT32_WIDTH 32
#define UINT64_WIDTH 64
#define INT8_MAX /* 2**(INT8_WIDTH - 1) - 1 */
#define INT16_MAX /* 2**(INT16_WIDTH - 1) - 1 */
#define INT32_MAX /* 2**(INT32_WIDTH - 1) - 1 */
#define INT64_MAX /* 2**(INT64_WIDTH - 1) - 1 */
#define INT8_MIN /* - 2**(INT8_WIDTH - 1) */
#define INT16_MIN /* - 2**(INT16_WIDTH - 1) */
#define INT32_MIN /* - 2**(INT32_WIDTH - 1) */
#define INT64_MIN /* - 2**(INT64_WIDTH - 1) */
#define UINT8_MAX /* 2**INT8_WIDTH - 1 */
#define UINT16_MAX /* 2**INT16_WIDTH - 1 */
#define UINT32_MAX /* 2**INT32_WIDTH - 1 */
#define UINT64_MAX /* 2**INT64_WIDTH - 1 */
#define INT8_C(c) c ## /* ... */
#define INT16_C(c) c ## /* ... */
#define INT32_C(c) c ## /* ... */
#define INT64_C(c) c ## /* ... */
#define UINT8_C(c) c ## /* ... */
#define UINT16_C(c) c ## /* ... */
#define UINT32_C(c) c ## /* ... */
#define UINT64_C(c) c ## /* ... */

DESCRIPTION

intN*_t* are signed integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are be capable of storing values in the range [INTN**_MIN**, INTN**_MAX**], substituting N by the appropriate number.

uintN*_t* are unsigned integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are capable of storing values in the range [0, UINTN**_MAX**], substituting N by the appropriate number.

According to POSIX, [u]int8_t, [u]int16_t, and [u]int32_t are required; [u]int64_t are only required in implementations that provide integer types with width 64; and all other types of this form are optional.

The macros [U]INTN**_WIDTH** expand to the width in bits of these types (N).

The macros [U]INTN**_MAX** expand to the maximum value that these types can hold.

The macros INTN**_MIN** expand to the minimum value that these types can hold.

The macros [U]INTN**_C**() expand their argument to an integer constant of type [u]intN*_t*.

The length modifiers for the [u]intN*_t* types for the printf(3) family of functions are expanded by macros of the forms PRIdN, PRIiN, PRIuN, and PRIxN (defined in <inttypes.h>); resulting for example in %“PRId64” or %“PRIi64” for printing int64_t values. The length modifiers for the [u]intN*_t* types for the scanf(3) family of functions are expanded by macros of the forms SCNdN, SCNiN, SCNuN, and SCNxN, (defined in <inttypes.h>); resulting for example in %“SCNu8” or %“SCNx8” for scanning uint8_t values.

STANDARDS

C11, POSIX.1-2008.

HISTORY

C99, POSIX.1-2001.

The [U]INTN**_WIDTH** macros were added in C23.

NOTES

The following header also provides these types: <inttypes.h>. <arpa/inet.h> also provides uint16_t and uint32_t.

SEE ALSO

intmax_t(3type), intptr_t(3type), printf(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2901 - Linux cli command Tk_afterpm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command Tk_afterpm and provides detailed information about the command Tk_afterpm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the Tk_afterpm.

NAME 🖥️ Tk_afterpm 🖥️

Execute a command after a time delay

SYNOPSIS

$widget->after(ms)

$id = $widget->after(ms?,callback?)

$id = $widget->repeat(ms?,callback?)

$widget->afterCancel($id)

$id = $widget->afterIdle(callback)

$widget->afterInfo?($id)?

$id->time(?delay?)

DESCRIPTION

This method is used to delay execution of the program or to execute a callback in background sometime in the future.

In perl/Tk $widget->after is implemented via the class Tk::After, and callbacks are associated with $widget, and are automatically cancelled when the widget is destroyed. An almost identical interface, but without automatic cancel, and without repeat is provided via Tk::after method.

Internal Details

The internal Tk::After class has the following synopsis:

$id = Tk::After->new($widget, tid, $time, once, callback); $id = Tk::After->new($widget, tid, $time, repeat, callback); $id->cancel; $id->time(?delay?);

$id is a Tk::After object, an array of 5 elements:

$widget is the parent widget reference.

tid is the internal timer id, a unique string.

$time is the string ‘idle’, representing an idle queue timer, or a integer millisecond value.

once or repeat specifies whether the timer is a one-time after event, or a repeating repeat event.

callback specifies a Perl/Tk Tk::Callback object.

Changing a repeat timer interval

It’s possible to change a repeat timer’s delay value, or even cancel any timer, using the time method. If delay is specified and non-zero, a new timer delay is established. If delay is zero the timer event is canceled just as if $id->cancel were invoked. In all cases the current millisecond timer delay is returned.

Note: the new timer delay will take effect on the subsequent timer event - this command will not cancel the pending timer event and re-issue it with the new delay time.

The after() method has several forms as follows:

$widget->after(ms)
The value ms must be an integer giving a time in milliseconds. The command sleeps for ms milliseconds and then returns. While the command is sleeping the application does not respond to events.

$widget->after(ms,callback)
In this form the command returns immediately, but it arranges for callback be executed ms milliseconds later as an event handler. The callback will be executed exactly once, at the given time. The command will be executed in context of $widget. If an error occurs while executing the delayed command then the Tk::Error mechanism is used to report the error. The after command returns an identifier (an object in the perl/Tk case) that can be used to cancel the delayed command using afterCancel.

$widget->repeat(ms,callback)
In this form the command returns immediately, but it arranges for callback be executed ms milliseconds later as an event handler. After callback has executed it is re-scheduled, to be executed in a futher ms, and so on until it is cancelled.

$widget->afterCancel($id)

$id->cancel

Cancels the execution of a delayed command that was previously scheduled. $id indicates which command should be canceled; it must have been the return value from a previous after command. If the command given by $id has already been executed (and is not scheduled to be executed again) then afterCancel has no effect.

$widget->afterCancel(callback)
This form is not robust in perl/Tk - its use is deprecated. This command should also cancel the execution of a delayed command. The callback argument is compared with pending callbacks, if a match is found, that callback is cancelled and will never be executed; if no such callback is currently pending then the afterCancel has no effect.

$widget->afterIdle(callback)
Arranges for callback to be evaluated later as an idle callback. The script will be run exactly once, the next time the event loop is entered and there are no events to process. The command returns an identifier that can be used to cancel the delayed command using afterCancel. If an error occurs while executing the script then the Tk::Error mechanism is used to report the error.

$widget->afterInfo?($id)?
This command returns information about existing event handlers. If no $id argument is supplied, the command returns a list of the identifiers for all existing event handlers created by the after and repeat commands for $widget. If $id is supplied, it specifies an existing handler; $id must have been the return value from some previous call to after or repeat and it must not have triggered yet or been cancelled. In this case the command returns a list with three elements. The first element of the list is the callback associated with $id, the second element is either idle or the integer timer millisecond value to indicate what kind of event handler it is, and the third is a string once or repeat to differentiate an after from a repeat event.

The after(ms) and afterIdle forms of the command assume that the application is event driven: the delayed commands will not be executed unless the application enters the event loop. In applications that are not normally event-driven, the event loop can be entered with the vwait and update commands.

SEE ALSO

Tk::Error Tk::callbacks

KEYWORDS

cancel, delay, idle callback, sleep, time

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2902 - Linux cli command ts_read_raw

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command ts_read_raw and provides detailed information about the command ts_read_raw, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the ts_read_raw.

NAME 🖥️ ts_read_raw 🖥️

read tslib touch samples

SYNOPSIS

#include <tslib.h>

int ts_read(struct tsdev *dev, struct ts_sample *samp, int nr);

int ts_read_raw(struct tsdev *dev, struct ts_sample *samp, int nr);

int ts_read_mt(struct tsdev *dev, struct ts_sample_mt **samp, int slots, int nr);

int ts_read_raw_mt(struct tsdev *dev, struct ts_sample_mt **samp, int slots, int nr);

DESCRIPTION

ts_read() reads nr input samples with tslib’s filters applied. struct ts_sample is define as follows:

struct ts_sample {
        int             x;
        int             y;
        unsigned int    pressure;
        struct timeval  tv;
};

ts_read_mt() reads nr * slots input samples with tslib’s filters applied. struct ts_sample_mt is defined as follows:

struct ts_sample_mt {
        /* most recent ABS_MT_* event codes.
         * see linux/input.h for descriptions */
        int             x;
        int             y;
        unsigned int    pressure;
        int             slot;
        int             tracking_id;

        int             tool_type;
        int             tool_x;
        int             tool_y;
        unsigned int    touch_major;
        unsigned int    width_major;
        unsigned int    touch_minor;
        unsigned int    width_minor;
        int             orientation;
        int             distance;
        int             blob_id;

        struct timeval  tv;

        /* BTN_TOUCH state */
        short           pen_down;

        /* the TSLIB_MT_VALID bit is set in valid if this sample
         * contains new data;
	 * valid is set to 0 otherwise */
        short           valid;
};

The user has to provide the amount of memory described in nr and slots to hold them.

ts_read_raw() and ts_read_raw_mt() do the same thing without tslib’s filters applied.

RETURN VALUE

The number of actually read samples is returned. Especially when opened in non-blocking mode, see ts_setup() , that can be less than requested in the call. On failure, a negative error number is returned.

EXAMPLE

The following program continuously reads tslib multitouch input samples and prints slot and position values to stdout as the touch screen is touched.

#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>

#include <tslib.h>

#define READ_SAMPLES 1
#define MAX_SLOTS 5

int main(int argc, char **argv)
{
        struct tsdev *ts;
        struct ts_sample_mt **samp_mt = NULL;
        int i, j;
        int ret;

        ts = ts_setup(NULL, 0);
        if (!ts)
                return -1;

        samp_mt = malloc(READ_SAMPLES * sizeof(struct ts_sample_mt **));
        if (!samp_mt)
                return -1;

        for (i = 0; i < READ_SAMPLES; i++) {
                samp_mt[i] = calloc(MAX_SLOTS, sizeof(struct ts_sample_mt));
                if (!samp_mt[i])
                        return -1;
        }

        while(1) {
                ret = ts_read_mt(ts, samp_mt, MAX_SLOTS, READ_SAMPLES);
                for (i = 0; i < ret; i++) {
                        printf("sample nr %d, i);
                        for (j = 0; i < MAX_SLOTS; j++) {
                                if (!(samp_mt[i][j].valid & TSLIB_MT_VALID))
                                        continue;

                                printf("slot %d: X:%d Y: %d,
                                       samp_mt[i][j].slot,
                                       samp_mt[i][j].x,
                                       samp_mt[i][j].y);
                        }
                }
        }
}

SEE ALSO

ts_setup(3), ts_config(3), ts_open(3), ts_close(3), ts.conf(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2903 - Linux cli command pthread_cleanup_push_defer_np

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command pthread_cleanup_push_defer_np and provides detailed information about the command pthread_cleanup_push_defer_np, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the pthread_cleanup_push_defer_np.

NAME 🖥️ pthread_cleanup_push_defer_np 🖥️

push and pop thread cancelation clean-up handlers while saving cancelability type

LIBRARY

POSIX threads library (libpthread, -lpthread)

SYNOPSIS

#include <pthread.h>
void pthread_cleanup_push_defer_np(void (*routine)(void *), void *arg);
void pthread_cleanup_pop_restore_np(int execute);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

pthread_cleanup_push_defer_np(), pthread_cleanup_pop_defer_np():

    _GNU_SOURCE

DESCRIPTION

These functions are the same as pthread_cleanup_push(3) and pthread_cleanup_pop(3), except for the differences noted on this page.

Like pthread_cleanup_push(3), pthread_cleanup_push_defer_np() pushes routine onto the thread’s stack of cancelation clean-up handlers. In addition, it also saves the thread’s current cancelability type, and sets the cancelability type to “deferred” (see pthread_setcanceltype(3)); this ensures that cancelation clean-up will occur even if the thread’s cancelability type was “asynchronous” before the call.

Like pthread_cleanup_pop(3), pthread_cleanup_pop_restore_np() pops the top-most clean-up handler from the thread’s stack of cancelation clean-up handlers. In addition, it restores the thread’s cancelability type to its value at the time of the matching pthread_cleanup_push_defer_np().

The caller must ensure that calls to these functions are paired within the same function, and at the same lexical nesting level. Other restrictions apply, as described in pthread_cleanup_push(3).

This sequence of calls:

pthread_cleanup_push_defer_np(routine, arg);
pthread_cleanup_pop_restore_np(execute);

is equivalent to (but shorter and more efficient than):

int oldtype;
pthread_cleanup_push(routine, arg);
pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);
...
pthread_setcanceltype(oldtype, NULL);
pthread_cleanup_pop(execute);

STANDARDS

GNU; hence the suffix “_np” (nonportable) in the names.

HISTORY

glibc 2.0

SEE ALSO

pthread_cancel(3), pthread_cleanup_push(3), pthread_setcancelstate(3), pthread_testcancel(3), pthreads(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2904 - Linux cli command tgamma

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command tgamma and provides detailed information about the command tgamma, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the tgamma.

NAME 🖥️ tgamma 🖥️

true gamma function

LIBRARY

Math library (libm, -lm)

SYNOPSIS

#include <math.h>
double tgamma(double x);
float tgammaf(float x);
long double tgammal(long double x);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

tgamma(), tgammaf(), tgammal():

    _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPTION

These functions calculate the Gamma function of x.

The Gamma function is defined by

Gamma(x) = integral from 0 to infinity of t^(x-1) e^-t dt

It is defined for every real number except for nonpositive integers. For nonnegative integral m one has

Gamma(m+1) = m!

and, more generally, for all x:

Gamma(x+1) = x * Gamma(x)

Furthermore, the following is valid for all values of x outside the poles:

Gamma(x) * Gamma(1 - x) = PI / sin(PI * x)

RETURN VALUE

On success, these functions return Gamma(x).

If x is a NaN, a NaN is returned.

If x is positive infinity, positive infinity is returned.

If x is a negative integer, or is negative infinity, a domain error occurs, and a NaN is returned.

If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the correct mathematical sign.

If the result underflows, a range error occurs, and the functions return 0, with the correct mathematical sign.

If x is -0 or +0, a pole error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the same sign as the 0.

ERRORS

See math_error(7) for information on how to determine whether an error has occurred when calling these functions.

The following errors can occur:

Domain error: x is a negative integer, or negative infinity
errno is set to EDOM. An invalid floating-point exception (FE_INVALID) is raised (but see BUGS).

Pole error: x is +0 or -0
errno is set to ERANGE. A divide-by-zero floating-point exception (FE_DIVBYZERO) is raised.

Range error: result overflow
errno is set to ERANGE. An overflow floating-point exception (FE_OVERFLOW) is raised.

glibc also gives the following error which is not specified in C99 or POSIX.1-2001.

Range error: result underflow
An underflow floating-point exception (FE_UNDERFLOW) is raised, and errno is set to ERANGE.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

tgamma(), tgammaf(), tgammal()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

glibc 2.1. C99, POSIX.1-2001.

NOTES

This function had to be called “true gamma function” since there is already a function gamma(3) that returns something else (see gamma(3) for details).

BUGS

Before glibc 2.18, the glibc implementation of these functions did not set errno to EDOM when x is negative infinity.

Before glibc 2.19, the glibc implementation of these functions did not set errno to ERANGE on an underflow range error.

In glibc versions 2.3.3 and earlier, an argument of +0 or -0 incorrectly produced a domain error (errno set to EDOM and an FE_INVALID exception raised), rather than a pole error.

SEE ALSO

gamma(3), lgamma(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2905 - Linux cli command wcsspn

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command wcsspn and provides detailed information about the command wcsspn, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the wcsspn.

NAME 🖥️ wcsspn 🖥️

get length of a prefix wide-character substring

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <wchar.h>
size_t wcsspn(const wchar_t *wcs, const wchar_t *accept);

DESCRIPTION

The wcsspn() function is the wide-character equivalent of the strspn(3) function. It determines the length of the longest initial segment of wcs which consists entirely of wide-characters listed in accept. In other words, it searches for the first occurrence in the wide-character string wcs of a wide-character not contained in the wide-character string accept.

RETURN VALUE

The wcsspn() function returns the number of wide characters in the longest initial segment of wcs which consists entirely of wide-characters listed in accept. In other words, it returns the position of the first occurrence in the wide-character string wcs of a wide-character not contained in the wide-character string accept, or wcslen(wcs) if there is none.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

wcsspn()

Thread safetyMT-Safe

STANDARDS

C11, POSIX.1-2008.

HISTORY

POSIX.1-2001, C99.

SEE ALSO

strspn(3), wcscspn(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2906 - Linux cli command HTTP_DAV_Responsepm

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command HTTP_DAV_Responsepm and provides detailed information about the command HTTP_DAV_Responsepm, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the HTTP_DAV_Responsepm.

NAME 🖥️ HTTP_DAV_Responsepm 🖥️

represents a WebDAV HTTP Response (ala HTTP::Response)

SYNOPSIS

require HTTP::DAV::Response;

DESCRIPTION

The HTTP::DAV::Response class encapsulates HTTP style responses. A response consists of a response line, some headers, and (potentially empty) content.

HTTP::DAV::Response is a subclass of HTTP::Response and therefore inherits its methods. (HTTP::Response in turn inherits it’s methods from HTTP::Message).

Therefore, this class actually inherits a rich library of functions. You are more likely wanting to read the HTTP::Response class as opposed to this class.

Instances of this class are usually created by a HTTP::DAV::Resource object after it has performed some request (such as get, lock, delete, etc). You use the object to analyse the success or otherwise of the request.

HTTP::DAV::Response was created to handle two extra functions that normal HTTP Responses don’t require:

- WebDAV responses have 6 extra error codes: 102, 207, 422, 423, 424 and 507. Older versions of the LWPs C<HTTP::Status> class did not have these extra codes. These were added. - WebDAV responses can actually contain more than one response (and often DO contain more than one) in the form of a “Multistatus”. These multistatus responses come in the form of an XML document. HTTP::DAV::Response can accurately parse these XML responses and emulate the normal of the C<HTTP::Response>.

HTTP::DAV::Response transparently implements these extra features without the user having to be aware, so you really should be reading the HTTP::Response documentation for most of the things you want to do (have I already said that?).

There are only a handful of custom functions that HTTP::DAV::Response returns and those are to handle multistatus requests, messages() and codes().

The six extra status codes that DAV servers can be returned in an HTTP Response are: 102 => Processing. Server has accepted the request, but has not yet completed it, 207 => Multistatus, 422 => Unprocessable Entity. Bad client XML sent?, 423 => Locked. The source or destination resource is locked, 424 => Failed Dependency, 507 => Insufficient Storage. The server is unable to store the request,

See HTTP::Status for the rest.

HANDLING A MULTISTATUS

So, many DAV requests may return a multistatus (207 multistatus) instead of, say, 200 OK or 403 Forbidden.

The HTTP::DAV::Response object stores each response sent back in the multistatus. You access them by array number.

The following code snippet shows what you will normally want to do:

$response = $resource->lock();

if ( $response->is_multistatus() ) {

foreach $num ( 0 .. $response->response_count() ) { ($err_code,$mesg,$url,$desc) = $response->response_bynum($num); print “$mesg ($err_code) for $url “; } }

Would produce something like this: Failed Dependency (424) for /test/directory Locked (423) for /test/directory/file3

This says that we couldn’t lock /test/directory because file3 which exists inside is already locked by somebody else.

METHODS

is_multistatus
This function takes no arguments and returns a 1 or a 0. For example: if ($response->is_multistatus() ) { } If the HTTP reply had 207 Multistatus in the header then that indicates that there are multiple status messages in the XML content that was returned. In this event, you may be interested in knowing what the individual messages were. To do this you would then use messages.

response_count
Takes no arguments and returns the number of error responses -1 that we got. Why -1? Because usually you will want to use this like an array operator: foreach $num ( 0 .. $response->response_count() ) { print $response->message_bynum(); }

response_bynum
Takes one argument, the response number that you’re interested in. And returns an array of details: ($code,$message,$url,$description) = response_bynum(2); where $code - is the HTTP error code (e.g. 403, 423, etc). $message - is the associated message for that error code. $url - is the url that this error applies to (recall that there can be multiple responses within one response and they all relate to one URL) $description - is server’s attempt at an english description of what happened.

code_bynum
Takes one argument, the response number that you’re interested in, and returns it’s code. E.g: $code = $response->code_bynum(1); See response_bynum()

message_bynum
Takes one argument, the response number that you’re interested in, and returns it’s message. E.g: $code = $response->message_bynum(1); See response_bynum()

url_bynum
Takes one argument, the response number that you’re interested in, and returns it’s url. E.g: $code = $response->message_bynum(1); See response_bynum()

description_bynum
Takes one argument, the response number that you’re interested in, and returns it’s description. E.g: $code = $response->message_description(1); See response_bynum()

messages
Takes no arguments and returns all of the messages returned in a multistatus response. If called in a scalar context then all of the messages will be returned joined together by newlines. If called in an array context the messages will be returned as an array. $messages = $response->messages(); e.g. $messages eq Forbidden Locked; @messages = $response->messages(); e.g. @messages eq [Forbidden, Locked]; This routine is a variant on the standard HTTP::Response message().

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2907 - Linux cli command getprotobynumber

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getprotobynumber and provides detailed information about the command getprotobynumber, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getprotobynumber.

NAME 🖥️ getprotobynumber 🖥️

get protocol entry

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <netdb.h>
struct protoent *getprotoent(void);
struct protoent *getprotobyname(const char *name);
struct protoent *getprotobynumber(int proto);
void setprotoent(int stayopen);
void endprotoent(void);

DESCRIPTION

The getprotoent() function reads the next entry from the protocols database (see protocols(5)) and returns a protoent structure containing the broken-out fields from the entry. A connection is opened to the database if necessary.

The getprotobyname() function returns a protoent structure for the entry from the database that matches the protocol name name. A connection is opened to the database if necessary.

The getprotobynumber() function returns a protoent structure for the entry from the database that matches the protocol number number. A connection is opened to the database if necessary.

The setprotoent() function opens a connection to the database, and sets the next entry to the first entry. If stayopen is nonzero, then the connection to the database will not be closed between calls to one of the getproto*() functions.

The endprotoent() function closes the connection to the database.

The protoent structure is defined in <netdb.h> as follows:

struct protoent {
    char  *p_name;       /* official protocol name */
    char **p_aliases;    /* alias list */
    int    p_proto;      /* protocol number */
}

The members of the protoent structure are:

p_name
The official name of the protocol.

p_aliases
A NULL-terminated list of alternative names for the protocol.

p_proto
The protocol number.

RETURN VALUE

The getprotoent(), getprotobyname(), and getprotobynumber() functions return a pointer to a statically allocated protoent structure, or a null pointer if an error occurs or the end of the file is reached.

FILES

/etc/protocols
protocol database file

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getprotoent()

Thread safety

MT-Unsafe race:protoent race:protoentbuf locale

getprotobyname()

Thread safety

MT-Unsafe race:protobyname locale

getprotobynumber()

Thread safety

MT-Unsafe race:protobynumber locale

setprotoent(), endprotoent()

Thread safety

MT-Unsafe race:protoent locale

In the above table, protoent in race:protoent signifies that if any of the functions setprotoent(), getprotoent(), or endprotoent() are used in parallel in different threads of a program, then data races could occur.

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, 4.3BSD.

SEE ALSO

getnetent(3), getprotoent_r(3), getservent(3), protocols(5)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2908 - Linux cli command swapcontext

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command swapcontext and provides detailed information about the command swapcontext, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the swapcontext.

NAME 🖥️ swapcontext 🖥️

manipulate user context

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ucontext.h>
void makecontext(ucontext_t *ucp, void (*func)(), int argc",...);"
int swapcontext(ucontext_t *restrict oucp,
 const ucontext_t *restrict ucp);

DESCRIPTION

In a System V-like environment, one has the type ucontext_t (defined in <ucontext.h> and described in getcontext(3)) and the four functions getcontext(3), setcontext(3), makecontext(), and swapcontext() that allow user-level context switching between multiple threads of control within a process.

The makecontext() function modifies the context pointed to by ucp (which was obtained from a call to getcontext(3)). Before invoking makecontext(), the caller must allocate a new stack for this context and assign its address to ucp->uc_stack, and define a successor context and assign its address to ucp->uc_link.

When this context is later activated (using setcontext(3) or swapcontext()) the function func is called, and passed the series of integer (int) arguments that follow argc; the caller must specify the number of these arguments in argc. When this function returns, the successor context is activated. If the successor context pointer is NULL, the thread exits.

The swapcontext() function saves the current context in the structure pointed to by oucp, and then activates the context pointed to by ucp.

RETURN VALUE

When successful, swapcontext() does not return. (But we may return later, in case oucp is activated, in which case it looks like swapcontext() returns 0.) On error, swapcontext() returns -1 and sets errno to indicate the error.

ERRORS

ENOMEM
Insufficient stack space left.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

makecontext()

Thread safety

MT-Safe race:ucp

swapcontext()

Thread safety

MT-Safe race:oucp race:ucp

STANDARDS

None.

HISTORY

glibc 2.1. SUSv2, POSIX.1-2001. Removed in POSIX.1-2008, citing portability issues, and recommending that applications be rewritten to use POSIX threads instead.

NOTES

The interpretation of ucp->uc_stack is just as in sigaltstack(2), namely, this struct contains the start and length of a memory area to be used as the stack, regardless of the direction of growth of the stack. Thus, it is not necessary for the user program to worry about this direction.

On architectures where int and pointer types are the same size (e.g., x86-32, where both types are 32 bits), you may be able to get away with passing pointers as arguments to makecontext() following argc. However, doing this is not guaranteed to be portable, is undefined according to the standards, and won’t work on architectures where pointers are larger than ints. Nevertheless, starting with glibc 2.8, glibc makes some changes to makecontext(), to permit this on some 64-bit architectures (e.g., x86-64).

EXAMPLES

The example program below demonstrates the use of getcontext(3), makecontext(), and swapcontext(). Running the program produces the following output:

$ ./a.out
main: swapcontext(&uctx_main, &uctx_func2)
func2: started
func2: swapcontext(&uctx_func2, &uctx_func1)
func1: started
func1: swapcontext(&uctx_func1, &uctx_func2)
func2: returning
func1: returning
main: exiting

Program source

#include <stdio.h>
#include <stdlib.h>
#include <ucontext.h>
static ucontext_t uctx_main, uctx_func1, uctx_func2;
#define handle_error(msg) \
    do { perror(msg); exit(EXIT_FAILURE); } while (0)
static void
func1(void)
{
    printf("%s: started

“, func); printf("%s: swapcontext(&uctx_func1, &uctx_func2) “, func); if (swapcontext(&uctx_func1, &uctx_func2) == -1) handle_error(“swapcontext”); printf("%s: returning “, func); } static void func2(void) { printf("%s: started “, func); printf("%s: swapcontext(&uctx_func2, &uctx_func1) “, func); if (swapcontext(&uctx_func2, &uctx_func1) == -1) handle_error(“swapcontext”); printf("%s: returning “, func); } int main(int argc, char argv[]) { char func1_stack[16384]; char func2_stack[16384]; if (getcontext(&uctx_func1) == -1) handle_error(“getcontext”); uctx_func1.uc_stack.ss_sp = func1_stack; uctx_func1.uc_stack.ss_size = sizeof(func1_stack); uctx_func1.uc_link = &uctx_main; makecontext(&uctx_func1, func1, 0); if (getcontext(&uctx_func2) == -1) handle_error(“getcontext”); uctx_func2.uc_stack.ss_sp = func2_stack; uctx_func2.uc_stack.ss_size = sizeof(func2_stack); / Successor context is f1(), unless argc > 1 */ uctx_func2.uc_link = (argc > 1) ? NULL : &uctx_func1; makecontext(&uctx_func2, func2, 0); printf("%s: swapcontext(&uctx_main, &uctx_func2) “, func); if (swapcontext(&uctx_main, &uctx_func2) == -1) handle_error(“swapcontext”); printf("%s: exiting “, func); exit(EXIT_SUCCESS); }

SEE ALSO

sigaction(2), sigaltstack(2), sigprocmask(2), getcontext(3), sigsetjmp(3)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2909 - Linux cli command XdbeFreeVisualInfo

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command XdbeFreeVisualInfo and provides detailed information about the command XdbeFreeVisualInfo, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the XdbeFreeVisualInfo.

NAME 🖥️ XdbeFreeVisualInfo 🖥️

frees information returned by XdbeGetVisualInfo().

SYNOPSIS

#include <X11/extensions/Xdbe.h>

void XdbeFreeVisualInfo( XdbeScreenVisualInfo *visual_info)

DESCRIPTION

This function frees the list of XdbeScreenVisualInfo returned by the function XdbeGetVisualInfo().

SEE ALSO

DBE, XdbeAllocateBackBufferName(), XdbeBeginIdiom(), XdbeDeallocateBackBufferName(), XdbeEndIdiom(), XdbeGetBackBufferAttributes(), XdbeGetVisualInfo(), XdbeQueryExtension(), XdbeSwapBuffers().

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2910 - Linux cli command putenv

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command putenv and provides detailed information about the command putenv, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the putenv.

NAME 🖥️ putenv 🖥️

change or add an environment variable

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <stdlib.h>
int putenv(char *string);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

putenv():

    _XOPEN_SOURCE
        || /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE

DESCRIPTION

The putenv() function adds or changes the value of environment variables. The argument string is of the form name=value. If name does not already exist in the environment, then string is added to the environment. If name does exist, then the value of name in the environment is changed to value. The string pointed to by string becomes part of the environment, so altering the string changes the environment.

RETURN VALUE

The putenv() function returns zero on success. On failure, it returns a nonzero value, and errno is set to indicate the error.

ERRORS

ENOMEM
Insufficient space to allocate new environment.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

putenv()

Thread safetyMT-Unsafe const:env

STANDARDS

POSIX.1-2008.

HISTORY

POSIX.1-2001, SVr2, 4.3BSD-Reno.

The putenv() function is not required to be reentrant, and the one in glibc 2.0 is not, but the glibc 2.1 version is.

Since glibc 2.1.2, the glibc implementation conforms to SUSv2: the pointer string given to putenv() is used. In particular, this string becomes part of the environment; changing it later will change the environment. (Thus, it is an error to call putenv() with an automatic variable as the argument, then return from the calling function while string is still part of the environment.) However, from glibc 2.0 to glibc 2.1.1, it differs: a copy of the string is used. On the one hand this causes a memory leak, and on the other hand it violates SUSv2.

The 4.3BSD-Reno version, like glibc 2.0, uses a copy; this is fixed in all modern BSDs.

SUSv2 removes the const from the prototype, and so does glibc 2.1.3.

The GNU C library implementation provides a nonstandard extension. If string does not include an equal sign:

putenv("NAME");

then the named variable is removed from the caller’s environment.

SEE ALSO

clearenv(3), getenv(3), setenv(3), unsetenv(3), environ(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2911 - Linux cli command getcontext

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command getcontext and provides detailed information about the command getcontext, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the getcontext.

NAME 🖥️ getcontext 🖥️

get or set the user context

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <ucontext.h>
int getcontext(ucontext_t *ucp);
int setcontext(const ucontext_t *ucp);

DESCRIPTION

In a System V-like environment, one has the two types mcontext_t and ucontext_t defined in <ucontext.h> and the four functions getcontext(), setcontext(), makecontext(3), and swapcontext(3) that allow user-level context switching between multiple threads of control within a process.

The mcontext_t type is machine-dependent and opaque. The ucontext_t type is a structure that has at least the following fields:

typedef struct ucontext_t {
    struct ucontext_t *uc_link;
    sigset_t          uc_sigmask;
    stack_t           uc_stack;
    mcontext_t        uc_mcontext;
    ...
} ucontext_t;

with sigset_t and stack_t defined in <signal.h>. Here uc_link points to the context that will be resumed when the current context terminates (in case the current context was created using makecontext(3)), uc_sigmask is the set of signals blocked in this context (see sigprocmask(2)), uc_stack is the stack used by this context (see sigaltstack(2)), and uc_mcontext is the machine-specific representation of the saved context, that includes the calling thread’s machine registers.

The function getcontext() initializes the structure pointed to by ucp to the currently active context.

The function setcontext() restores the user context pointed to by ucp. A successful call does not return. The context should have been obtained by a call of getcontext(), or makecontext(3), or received as the third argument to a signal handler (see the discussion of the SA_SIGINFO flag in sigaction(2)).

If the context was obtained by a call of getcontext(), program execution continues as if this call just returned.

If the context was obtained by a call of makecontext(3), program execution continues by a call to the function func specified as the second argument of that call to makecontext(3). When the function func returns, we continue with the uc_link member of the structure ucp specified as the first argument of that call to makecontext(3). When this member is NULL, the thread exits.

If the context was obtained by a call to a signal handler, then old standard text says that “program execution continues with the program instruction following the instruction interrupted by the signal”. However, this sentence was removed in SUSv2, and the present verdict is “the result is unspecified”.

RETURN VALUE

When successful, getcontext() returns 0 and setcontext() does not return. On error, both return -1 and set errno to indicate the error.

ERRORS

None defined.

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue

getcontext(), setcontext()

Thread safetyMT-Safe race:ucp

STANDARDS

None.

HISTORY

SUSv2, POSIX.1-2001.

POSIX.1-2008 removes these functions, citing portability issues, and recommending that applications be rewritten to use POSIX threads instead.

NOTES

The earliest incarnation of this mechanism was the setjmp(3)/ longjmp(3) mechanism. Since that does not define the handling of the signal context, the next stage was the sigsetjmp(3)/ siglongjmp(3) pair. The present mechanism gives much more control. On the other hand, there is no easy way to detect whether a return from getcontext() is from the first call, or via a setcontext() call. The user has to invent their own bookkeeping device, and a register variable won’t do since registers are restored.

When a signal occurs, the current user context is saved and a new context is created by the kernel for the signal handler. Do not leave the handler using longjmp(3): it is undefined what would happen with contexts. Use siglongjmp(3) or setcontext() instead.

SEE ALSO

sigaction(2), sigaltstack(2), sigprocmask(2), longjmp(3), makecontext(3), sigsetjmp(3), signal(7)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

2912 - Linux cli command readlinereadline

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command readlinereadline and provides detailed information about the command readlinereadline, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the readlinereadline.

NAME 🖥️ readlinereadline 🖥️

get a line from a user with editing

SYNOPSIS

#include <stdio.h>
#include <readline/readline.h>
#include <readline/history.h>

char *


readline (const char *prompt);

COPYRIGHT

Readline is Copyright (C) 1989-2020 Free Software Foundation, Inc.

DESCRIPTION

readline will read a line from the terminal and return it, using prompt as a prompt. If prompt is NULL or the empty string, no prompt is issued. The line returned is allocated with malloc(3); the caller must free it when finished. The line returned has the final newline removed, so only the text of the line remains.

readline offers editing capabilities while the user is entering the line. By default, the line editing commands are similar to those of emacs. A vi-style line editing interface is also available.

This manual page describes only the most basic use of readline. Much more functionality is available; see The GNU Readline Library and The GNU History Library for additional information.

RETURN VALUE

readline returns the text of the line read. A blank line returns the empty string. If EOF is encountered while reading a line, and the line is empty, NULL is returned. If an EOF is read with a non-empty line, it is treated as a newline.

NOTATION

An Emacs-style notation is used to denote keystrokes. Control keys are denoted by C-key, e.g., C-n means Control-N. Similarly, meta keys are denoted by M-key, so M-x means Meta-X. (On keyboards without a meta key, M-x means ESC x, i.e., press the Escape key then the x key. This makes ESC the meta prefix. The combination M-C-x means ESC-Control-x, or press the Escape key then hold the Control key while pressing the x key.)

Readline commands may be given numeric arguments, which normally act as a repeat count. Sometimes, however, it is the sign of the argument that is significant. Passing a negative argument to a command that acts in the forward direction (e.g., kill-line) causes that command to act in a backward direction. Commands whose behavior with arguments deviates from this are noted below.

When a command is described as killing text, the text deleted is saved for possible future retrieval (yanking). The killed text is saved in a kill ring. Consecutive kills cause the text to be accumulated into one unit, which can be yanked all at once. Commands which do not kill text separate the chunks of text on the kill ring.

INITIALIZATION FILE

Readline is customized by putting commands in an initialization file (the inputrc file). The name of this file is taken from the value of the INPUTRC environment variable. If that variable is unset, the default is ~/.inputrc. If that file does not exist or cannot be read, the ultimate default is /etc/inputrc. When a program which uses the readline library starts up, the init file is read, and the key bindings and variables are set. There are only a few basic constructs allowed in the readline init file. Blank lines are ignored. Lines beginning with a # are comments. Lines beginning with a $ indicate conditional constructs. Other lines denote key bindings and variable settings. Each program using this library may add its own commands and bindings.

For example, placing

M-Control-u: universal-argument

or

C-Meta-u: universal-argument

into the inputrc would make M-C-u execute the readline command universal-argument.

The following symbolic character names are recognized while processing key bindings: DEL, ESC, ESCAPE, LFD, NEWLINE, RET, RETURN, RUBOUT, SPACE, SPC, and TAB.

In addition to command names, readline allows keys to be bound to a string that is inserted when the key is pressed (a macro).

Key Bindings

The syntax for controlling key bindings in the inputrc file is simple. All that is required is the name of the command or the text of a macro and a key sequence to which it should be bound. The name may be specified in one of two ways: as a symbolic key name, possibly with Meta- or Control- prefixes, or as a key sequence. The name and key sequence are separated by a colon. There can be no whitespace between the name and the colon.

When using the form keyname: function-name or macro, keyname is the name of a key spelled out in English. For example:

Control-u: universal-argument
Meta-Rubout: backward-kill-word
Control-o: “> output”

In the above example, C-u is bound to the function universal-argument, M-DEL is bound to the function backward-kill-word, and C-o is bound to run the macro expressed on the right hand side (that is, to insert the text ``> output’’ into the line).

In the second form, “keyseq”: function-name or macro, keyseq differs from keyname above in that strings denoting an entire key sequence may be specified by placing the sequence within double quotes. Some GNU Emacs style key escapes can be used, as in the following example, but the symbolic character names are not recognized.

“\C-u”: universal-argument
“\C-x\C-r”: re-read-init-file
“[11~”: “Function Key 1”

In this example, C-u is again bound to the function universal-argument. C-x C-r is bound to the function re-read-init-file, and ESC [ 1 1 ~ is bound to insert the text ``Function Key 1’'.

The full set of GNU Emacs style escape sequences available when specifying key sequences is

\C-
control prefix

\M-
meta prefix


an escape character

**
backslash

**
literal “, a double quote

**
literal ‘, a single quote

In addition to the GNU Emacs style escape sequences, a second set of backslash escapes is available:


alert (bell)


backspace

\d
delete

** **
form feed

** **
newline


carriage return


horizontal tab

** **
vertical tab

*nnn*
the eight-bit character whose value is the octal value nnn (one to three digits)

\xHH
the eight-bit character whose value is the hexadecimal value HH (one or two hex digits)

When entering the text of a macro, single or double quotes should be used to indicate a macro definition. Unquoted text is assumed to be a function name. In the macro body, the backslash escapes described above are expanded. Backslash will quote any other character in the macro text, including " and ‘.

Bash allows the current readline key bindings to be displayed or modified with the bind builtin command. The editing mode may be switched during interactive use by using the -o option to the set builtin command. Other programs using this library provide similar mechanisms. The inputrc file may be edited and re-read if a program does not provide any other means to incorporate new bindings.

Variables

Readline has variables that can be used to further customize its behavior. A variable may be set in the inputrc file with a statement of the form

set variable-name value

Except where noted, readline variables can take the values On or Off (without regard to case). Unrecognized variable names are ignored. When a variable value is read, empty or null values, “on” (case-insensitive), and “1” are equivalent to On. All other values are equivalent to Off. The variables and their default values are:

active-region-start-color
A string variable that controls the text color and background when displaying the text in the active region (see the description of enable-active-region below). This string must not take up any physical character positions on the display, so it should consist only of terminal escape sequences. It is output to the terminal before displaying the text in the active region. This variable is reset to the default value whenever the terminal type changes. The default value is the string that puts the terminal in standout mode, as obtained from the terminal’s terminfo description. A sample value might be "".

active-region-end-color
A string variable that “undoes” the effects of active-region-start-color and restores “normal” terminal display appearance after displaying text in the active region. This string must not take up any physical character positions on the display, so it should consist only of terminal escape sequences. It is output to the terminal after displaying the text in the active region. This variable is reset to the default value whenever the terminal type changes. The default value is the string that restores the terminal from standout mode, as obtained from the terminal’s terminfo description. A sample value might be "”.

bell-style (audible)
Controls what happens when readline wants to ring the terminal bell. If set to none, readline never rings the bell. If set to visible, readline uses a visible bell if one is available. If set to audible, readline attempts to ring the terminal’s bell.

bind-tty-special-chars (On)
If set to On (the default), readline attempts to bind the control characters treated specially by the kernel’s terminal driver to their readline equivalents.

blink-matching-paren (Off)
If set to On, readline attempts to briefly move the cursor to an opening parenthesis when a closing parenthesis is inserted.

colored-completion-prefix (Off)
If set to On, when listing completions, readline displays the common prefix of the set of possible completions using a different color. The color definitions are taken from the value of the LS_COLORS environment variable. If there is a color definition in $LS_COLORS for the custom suffix “readline-colored-completion-prefix”, readline uses this color for the common prefix instead of its default.

colored-stats (Off)
If set to On, readline displays possible completions using different colors to indicate their file type. The color definitions are taken from the value of the LS_COLORS environment variable.

comment-begin (``#’’)
The string that is inserted in vi mode when the insert-comment command is executed. This command is bound to M-# in emacs mode and to # in vi command mode.

completion-display-width (-1)
The number of screen columns used to display possible matches when performing completion. The value is ignored if it is less than 0 or greater than the terminal screen width. A value of 0 will cause matches to be displayed one per line. The default value is -1.

completion-ignore-case (Off)
If set to On, readline performs filename matching and completion in a case-insensitive fashion.

completion-map-case (Off)
If set to On, and completion-ignore-case is enabled, readline treats hyphens (-) and underscores (_) as equivalent when performing case-insensitive filename matching and completion.

completion-prefix-display-length (0)
The length in characters of the common prefix of a list of possible completions that is displayed without modification. When set to a value greater than zero, common prefixes longer than this value are replaced with an ellipsis when displaying possible completions.

completion-query-items (100)
This determines when the user is queried about viewing the number of possible completions generated by the possible-completions command. It may be set to any integer value greater than or equal to zero. If the number of possible completions is greater than or equal to the value of this variable, readline will ask whether or not the user wishes to view them; otherwise they are simply listed on the terminal. A negative value causes readline to never ask.

convert-meta (On)
If set to On, readline will convert characters with the eighth bit set to an ASCII key sequence by stripping the eighth bit and prefixing it with an escape character (in effect, using escape as the meta prefix). The default is On, but readline will set it to Off if the locale contains eight-bit characters. This variable is dependent on the LC_CTYPE locale category, and may change if the locale is changed.

disable-completion (Off)
If set to On, readline will inhibit word completion. Completion characters will be inserted into the line as if they had been mapped to self-insert.

echo-control-characters (On)
When set to On, on operating systems that indicate they support it, readline echoes a character corresponding to a signal generated from the keyboard.

editing-mode (emacs)
Controls whether readline begins with a set of key bindings similar to Emacs or vi. editing-mode can be set to either emacs or vi.

emacs-mode-string (@)
If the show-mode-in-prompt variable is enabled, this string is displayed immediately before the last line of the primary prompt when emacs editing mode is active. The value is expanded like a key binding, so the standard set of meta- and control prefixes and backslash escape sequences is available. Use the \1 and \2 escapes to begin and end sequences of non-printing characters, which can be used to embed a terminal control sequence into the mode string.

enable-active-region (On)
The point is the current cursor position, and mark refers to a saved cursor position. The text between the point and mark is referred to as the region. When this variable is set to On, readline allows certain commands to designate the region as active. When the region is active, readline highlights the text in the region using the value of the active-region-start-color, which defaults to the string that enables the terminal’s standout mode. The active region shows the text inserted by bracketed-paste and any matching text found by incremental and non-incremental history searches.

enable-bracketed-paste (On)
When set to On, readline configures the terminal to insert each paste into the editing buffer as a single string of characters, instead of treating each character as if it had been read from the keyboard. This prevents readline from executing any editing commands bound to key sequences appearing in the pasted text.

enable-keypad (Off)
When set to On, readline will try to enable the application keypad when it is called. Some systems need this to enable the arrow keys.

enable-meta-key (On)
When set to On, readline will try to enable any meta modifier key the terminal claims to support when it is called. On many terminals, the meta key is used to send eight-bit characters.

expand-tilde (Off)
If set to On, tilde expansion is performed when readline attempts word completion.

history-preserve-point (Off)
If set to On, the history code attempts to place point at the same location on each history line retrieved with previous-history or next-history.

history-size (unset)
Set the maximum number of history entries saved in the history list. If set to zero, any existing history entries are deleted and no new entries are saved. If set to a value less than zero, the number of history entries is not limited. By default, the number of history entries is not limited. If an attempt is made to set history-size to a non-numeric value, the maximum number of history entries will be set to 500.

horizontal-scroll-mode (Off)
When set to On, makes readline use a single line for display, scrolling the input horizontally on a single screen line when it becomes longer than the screen width rather than wrapping to a new line. This setting is automatically enabled for terminals of height 1.

input-meta (Off)
If set to On, readline will enable eight-bit input (that is, it will not clear the eighth bit in the characters it reads), regardless of what the terminal claims it can support. The name meta-flag is a synonym for this variable. The default is Off, but readline will set it to On if the locale contains eight-bit characters. This variable is dependent on the LC_CTYPE locale category, and may change if the locale is changed.

isearch-terminators (``C-[ C-J’’)
The string of characters that should terminate an incremental search without subsequently executing the character as a command. If this variable has not been given a value, the characters ESC and C-J will terminate an incremental search.

keymap (emacs)
Set the current readline keymap. The set of legal keymap names is emacs, emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move, vi-command, and vi-insert. vi is equivalent to vi-command; emacs is equivalent to emacs-standard. The default value is emacs. The value of editing-mode also affects the default keymap.

keyseq-timeout (500)
Specifies the duration readline will wait for a character when reading an ambiguous key sequence (one that can form a complete key sequence using the input read so far, or can take additional input to complete a longer key sequence). If no input is received within the timeout, readline will use the shorter but complete key sequence. The value is specified in milliseconds, so a value of 1000 means that readline will wait one second for additional input. If this variable is set to a value less than or equal to zero, or to a non-numeric value, readline will wait until another key is pressed to decide which key sequence to complete.

mark-directories (On)
If set to On, completed directory names have a slash appended.

mark-modified-lines (Off)
If set to On, history lines that have been modified are displayed with a preceding asterisk (*).

mark-symlinked-directories (Off)
If set to On, completed names which are symbolic links to directories have a slash appended (subject to the value of mark-directories).

match-hidden-files (On)
This variable, when set to On, causes readline to match files whose names begin with a `.’ (hidden files) when performing filename completion. If set to Off, the leading `.’ must be supplied by the user in the filename to be completed.

menu-complete-display-prefix (Off)
If set to On, menu completion displays the common prefix of the list of possible completions (which may be empty) before cycling through the list.

output-meta (Off)
If set to On, readline will display characters with the eighth bit set directly rather than as a meta-prefixed escape sequence. The default is Off, but readline will set it to On if the locale contains eight-bit characters. This variable is dependent on the LC_CTYPE locale category, and may change if the locale is changed.

page-completions (On)
If set to On, readline uses an internal more-like pager to display a screenful of possible completions at a time.

print-completions-horizontally (Off)
If set to On, readline will display completions with matches sorted horizontally in alphabetical order, rather than down the screen.

revert-all-at-newline (Off)
If set to On, readline will undo all changes to history lines before returning when accept-line is executed. By default, history lines may be modified and retain individual undo lists across calls to readline.

show-all-if-ambiguous (Off)
This alters the default behavior of the completion functions. If set to On, words which have more than one possible completion cause the matches to be listed immediately instead of ringing the bell.

show-all-if-unmodified (Off)
This alters the default behavior of the completion functions in a fashion similar to show-all-if-ambiguous. If set to On, words which have more than one possible completion without any possible partial completion (the possible completions don’t share a common prefix) cause the matches to be listed immediately instead of ringing the bell.

show-mode-in-prompt (Off)
If set to On, add a string to the beginning of the prompt indicating the editing mode: emacs, vi command, or vi insertion. The mode strings are user-settable (e.g., emacs-mode-string).

skip-completed-text (Off)
If set to On, this alters the default completion behavior when inserting a single match into the line. It’s only active when performing completion in the middle of a word. If enabled, readline does not insert characters from the completion that match characters after point in the word being completed, so portions of the word following the cursor are not duplicated.

vi-cmd-mode-string ((cmd))
If the show-mode-in-prompt variable is enabled, this string is displayed immediately before the last line of the primary prompt when vi editing mode is active and in command mode. The value is expanded like a key binding, so the standard set of meta- and control prefixes and backslash escape sequences is available. Use the \1 and \2 escapes to begin and end sequences of non-printing characters, which can be used to embed a terminal control sequence into the mode string.

vi-ins-mode-string ((ins))
If the show-mode-in-prompt variable is enabled, this string is displayed immediately before the last line of the primary prompt when vi editing mode is active and in insertion mode. The value is expanded like a key binding, so the standard set of meta- and control prefixes and backslash escape sequences is available. Use the \1 and \2 escapes to begin and end sequences of non-printing characters, which can be used to embed a terminal control sequence into the mode string.

visible-stats (Off)
If set to On, a character denoting a file’s type as reported by stat(2) is appended to the filename when listing possible completions.

Conditional Constructs

Readline implements a facility similar in spirit to the conditional compilation features of the C preprocessor which allows key bindings and variable settings to be performed as the result of tests. There are four parser directives used.

$if
The $if construct allows bindings to be made based on the editing mode, the terminal being used, or the application using readline. The text of the test, after any comparison operator, extends to the end of the line; unless otherwise noted, no characters are required to isolate it.

mode
The mode= form of the $if directive is used to test whether readline is in emacs or vi mode. This may be used in conjunction with the set keymap command, for instance, to set bindings in the emacs-standard and emacs-ctlx keymaps only if readline is starting out in emacs mode.

term
The term= form may be used to include terminal-specific key bindings, perhaps to bind the key sequences output by the terminal’s function keys. The word on the right side of the = is tested against the full name of the terminal and the portion of the terminal name before the first -. This allows sun to match both sun and sun-cmd, for instance.

version
The version test may be used to perform comparisons against specific readline versions. The version expands to the current readline version. The set of comparison operators includes =, (and ==), !=, <=, >=, <, and >. The version number supplied on the right side of the operator consists of a major version number, an optional decimal point, and an optional minor version (e.g., 7.1). If the minor version is omitted, it is assumed to be 0. The operator may be separated from the string version and from the version number argument by whitespace.

application
The application construct is used to include application-specific settings. Each program using the readline library sets the application name, and an initialization file can test for a particular value. This could be used to bind key sequences to functions useful for a specific program. For instance, the following command adds a key sequence that quotes the current or previous word in bash:

$if Bash
# Quote the current or previous word
"\C-xq": "b\"f\""
$endif

variable
The variable construct provides simple equality tests for readline variables and values. The permitted comparison operators are =, ==, and !=. The variable name must be separated from the comparison operator by whitespace; the operator may be separated from the value on the right hand side by whitespace. Both string and boolean variables may be tested. Boolean variables must be tested against the values on and off.

$endif
This command, as seen in the previous example, terminates an $if command.

$else
Commands in this branch of the $if directive are executed if the test fails.

$include
This directive takes a single filename as an argument and reads commands and bindings from that file. For example, the following directive would read /etc/inputrc:

$include   /etc/inputrc

SEARCHING

Readline provides commands for searching through the command history for lines containing a specified string. There are two search modes: incremental and non-incremental.

Incremental searches begin before the user has finished typing the search string. As each character of the search string is typed, readline displays the next entry from the history matching the string typed so far. An incremental search requires only as many characters as needed to find the desired history entry. To search backward in the history for a particular string, type C-r. Typing C-s searches forward through the history. The characters present in the value of the isearch-terminators variable are used to terminate an incremental search. If that variable has not been assigned a value the Escape and C-J characters will terminate an incremental search. C-G will abort an incremental search and restore the original line. When the search is terminated, the history entry containing the search string becomes the current line.

To find other matching entries in the history list, type C-s or C-r as appropriate. This will search backward or forward in the history for the next line matching the search string typed so far. Any other key sequence bound to a readline command will terminate the search and execute that command. For instance, a newline will terminate the search and accept the line, thereby executing the command from the history list. A movement command will terminate the search, make the last line found the current line, and begin editing.

Non-incremental searches read the entire search string before starting to search for matching history lines. The search string may be typed by the user or be part of the contents of the current line.

EDITING COMMANDS

The following is a list of the names of the commands and the default key sequences to which they are bound. Command names without an accompanying key sequence are unbound by default.

In the following descriptions, point refers to the current cursor position, and mark refers to a cursor position saved by the set-mark command. The text between the point and mark is referred to as the region.

Commands for Moving

beginning-of-line (C-a)
Move to the start of the current line.

end-of-line (C-e)
Move to the end of the line.

forward-char (C-f)
Move forward a character.

backward-char (C-b)
Move back a character.

forward-word (M-f)
Move forward to the end of the next word. Words are composed of alphanumeric characters (letters and digits).

backward-word (M-b)
Move back to the start of the current or previous word. Words are composed of alphanumeric characters (letters and digits).

previous-screen-line
Attempt to move point to the same physical screen column on the previous physical screen line. This will not have the desired effect if the current readline line does not take up more than one physical line or if point is not greater than the length of the prompt plus the screen width.

next-screen-line
Attempt to move point to the same physical screen column on the next physical screen line. This will not have the desired effect if the current readline line does not take up more than one physical line or if the length of the current readline line is not greater than the length of the prompt plus the screen width.

clear-display (M-C-l)
Clear the screen and, if possible, the terminal’s scrollback buffer, then redraw the current line, leaving the current line at the top of the screen.

clear-screen (C-l)
Clear the screen, then redraw the current line, leaving the current line at the top of the screen. With an argument, refresh the current line without clearing the screen.

redraw-current-line
Refresh the current line.

Commands for Manipulating the History

accept-line (Newline, Return)
Accept the line regardless of where the cursor is. If this line is non-empty, it may be added to the history list for future recall with add_history(). If the line is a modified history line, the history line is restored to its original state.

previous-history (C-p)
Fetch the previous command from the history list, moving back in the list.

next-history (C-n)
Fetch the next command from the history list, moving forward in the list.

beginning-of-history (M-<)
Move to the first line in the history.

end-of-history (M->)
Move to the end of the input history, i.e., the line currently being entered.

operate-and-get-next (C-o)
Accept the current line for return to the calling application as if a newline had been entered, and fetch the next line relative to the current line from the history for editing. A numeric argument, if supplied, specifies the history entry to use instead of the current line.

fetch-history
With a numeric argument, fetch that entry from the history list and make it the current line. Without an argument, move back to the first entry in the history list.

reverse-search-history (C-r)
Search backward starting at the current line and moving `up’ through the history as necessary. This is an incremental search.

forward-search-history (C-s)
Search forward starting at the current line and moving `down’ through the history as necessary. This is an incremental search.

non-incremental-reverse-search-history (M-p)
Search backward through the history starting at the current line using a non-incremental search for a string supplied by the user.

non-incremental-forward-search-history (M-n)
Search forward through the history using a non-incremental search for a string supplied by the user.

history-search-backward
Search backward through the history for the string of characters between the start of the current line and the current cursor position (the point). The search string must match at the beginning of a history line. This is a non-incremental search.

history-search-forward
Search forward through the history for the string of characters between the start of the current line and the point. The search string must match at the beginning of a history line. This is a non-incremental search.

history-substring-search-backward
Search backward through the history for the string of characters between the start of the current line and the current cursor position (the point). The search string may match anywhere in a history line. This is a non-incremental search.

history-substring-search-forward
Search forward through the history for the string of characters between the start of the current line and the point. The search string may match anywhere in a history line. This is a non-incremental search.

yank-nth-arg (M-C-y)
Insert the first argument to the previous command (usually the second word on the previous line) at point. With an argument n, insert the nth word from the previous command (the words in the previous command begin with word 0). A negative argument inserts the nth word from the end of the previous command. Once the argument n is computed, the argument is extracted as if the “!n” history expansion had been specified.

yank-last-arg (M-. , M-_ )
Insert the last argument to the previous command (the last word of the previous history entry). With a numeric argument, behave exactly like yank-nth-arg. Successive calls to yank-last-arg move back through the history list, inserting the last word (or the word specified by the argument to the first call) of each line in turn. Any numeric argument supplied to these successive calls determines the direction to move through the history. A negative argument switches the direction through the history (back or forward). The history expansion facilities are used to extract the last argument, as if the “!$” history expansion had been specified.

Commands for Changing Text

end-of-file (usually C-d)
The character indicating end-of-file as set, for example, by ``stty’’. If this character is read when there are no characters on the line, and point is at the beginning of the line, readline interprets it as the end of input and returns

EOF.

delete-char (C-d)
Delete the character at point. If this function is bound to the same character as the tty EOF character, as C-d commonly is, see above for the effects.

backward-delete-char (Rubout)
Delete the character behind the cursor. When given a numeric argument, save the deleted text on the kill ring.

forward-backward-delete-char
Delete the character under the cursor, unless the cursor is at the end of the line, in which case the character behind the cursor is deleted.

quoted-insert (C-q, C-v)
Add the next character that you type to the line verbatim. This is how to insert characters like C-q, for example.

tab-insert (M-TAB)
Insert a tab character.

self-insert (a, b, A, 1, !, …)
Insert the character typed.

transpose-chars (C-t)
Drag the character before point forward over the character at point, moving point forward as well. If point is at the end of the line, then this transposes the two characters before point. Negative arguments have no effect.

transpose-words (M-t)
Drag the word before point past the word after point, moving point over that word as well. If point is at the end of the line, this transposes the last two words on the line.

upcase-word (M-u)
Uppercase the current (or following) word. With a negative argument, uppercase the previous word, but do not move point.

downcase-word (M-l)
Lowercase the current (or following) word. With a negative argument, lowercase the previous word, but do not move point.

capitalize-word (M-c)
Capitalize the current (or following) word. With a negative argument, capitalize the previous word, but do not move point.

overwrite-mode
Toggle overwrite mode. With an explicit positive numeric argument, switches to overwrite mode. With an explicit non-positive numeric argument, switches to insert mode. This command affects only emacs mode; vi mode does overwrite differently. Each call to readline() starts in insert mode. In overwrite mode, characters bound to self-insert replace the text at point rather than pushing the text to the right. Characters bound to backward-delete-char replace the character before point with a space. By default, this command is unbound.

Killing and Yanking

kill-line (C-k)
Kill the text from point to the end of the line.

backward-kill-line (C-x Rubout)
Kill backward to the beginning of the line.

unix-line-discard (C-u)
Kill backward from point to the beginning of the line. The killed text is saved on the kill-ring.

kill-whole-line
Kill all characters on the current line, no matter where point is.

kill-word (M-d)
Kill from point the end of the current word, or if between words, to the end of the next word. Word boundaries are the same as those used by forward-word.

backward-kill-word (M-Rubout)
Kill the word behind point. Word boundaries are the same as those used by backward-word.

unix-word-rubout (C-w)
Kill the word behind point, using white space as a word boundary. The killed text is saved on the kill-ring.

unix-filename-rubout
Kill the word behind point, using white space and the slash character as the word boundaries. The killed text is saved on the kill-ring.

*delete-horizontal-space (M-*
Delete all spaces and tabs around point.

kill-region
Kill the text between the point and mark (saved cursor position). This text is referred to as the region.

copy-region-as-kill
Copy the text in the region to the kill buffer.

copy-backward-word
Copy the word before point to the kill buffer. The word boundaries are the same as backward-word.

copy-forward-word
Copy the word following point to the kill buffer. The word boundaries are the same as forward-word.

yank (C-y)
Yank the top of the kill ring into the buffer at point.

yank-pop (M-y)
Rotate the kill ring, and yank the new top. Only works following yank or yank-pop.

Numeric Arguments

digit-argument (M-0, M-1, …, M–)
Add this digit to the argument already accumulating, or start a new argument. M– starts a negative argument.

universal-argument
This is another way to specify an argument. If this command is followed by one or more digits, optionally with a leading minus sign, those digits define the argument. If the command is followed by digits, executing universal-argument again ends the numeric argument, but is otherwise ignored. As a special case, if this command is immediately followed by a character that is neither a digit or minus sign, the argument count for the next command is multiplied by four. The argument count is initially one, so executing this function the first time makes the argument count four, a second time makes the argument count sixteen, and so on.

Completing

complete (TAB)
Attempt to perform completion on the text before point. The actual completion performed is application-specific. Bash, for instance, attempts completion treating the text as a variable (if the text begins with $), username (if the text begins with ~), hostname (if the text begins with @), or command (including aliases and functions) in turn. If none of these produces a match, filename completion is attempted. Gdb, on the other hand, allows completion of program functions and variables, and only attempts filename completion under certain circumstances.

possible-completions (M-?)
List the possible completions of the text before point. When displaying completions, readline sets the number of columns used for display to the value of completion-display-width, the value of the environment variable

COLUMNS, or the screen width, in that order.

insert-completions (M-*)
Insert all completions of the text before point that would have been generated by possible-completions.

menu-complete
Similar to complete, but replaces the word to be completed with a single match from the list of possible completions. Repeated execution of menu-complete steps through the list of possible completions, inserting each match in turn. At the end of the list of completions, the bell is rung (subject to the setting of bell-style) and the original text is restored. An argument of n moves n positions forward in the list of matches; a negative argument may be used to move backward through the list. This command is intended to be bound to TAB, but is unbound by default.

menu-complete-backward
Identical to menu-complete, but moves backward through the list of possible completions, as if menu-complete had been given a negative argument. This command is unbound by default.

delete-char-or-list
Deletes the character under the cursor if not at the beginning or end of the line (like delete-char). If at the end of the line, behaves identically to possible-completions.

Keyboard Macros

start-kbd-macro (C-x ( )
Begin saving the characters typed into the current keyboard macro.

end-kbd-macro (C-x ) )
Stop saving the characters typed into the current keyboard macro and store the definition.

call-last-kbd-macro (C-x e)
Re-execute the last keyboard macro defined, by making the characters in the macro appear as if typed at the keyboard.

print-last-kbd-macro ()
Print the last keyboard macro defined in a format suitable for the inputrc file.

Miscellaneous

re-read-init-file (C-x C-r)
Read in the contents of the inputrc file, and incorporate any bindings or variable assignments found there.

abort (C-g)
Abort the current editing command and ring the terminal’s bell (subject to the setting of bell-style).

do-lowercase-version (M-A, M-B, M-x, …)
If the metafied character x is uppercase, run the command that is bound to the corresponding metafied lowercase character. The behavior is undefined if x is already lowercase.

prefix-meta (ESC)
Metafy the next character typed.

ESC f is equivalent to Meta-f.

undo (C-_, C-x C-u)
Incremental undo, separately remembered for each line.

revert-line (M-r)
Undo all changes made to this line. This is like executing the undo command enough times to return the line to its initial state.

tilde-expand (M-&)
Perform tilde expansion on the current word.

set-mark (C-@, M-<space>)
Set the mark to the point. If a numeric argument is supplied, the mark is set to that position.

exchange-point-and-mark (C-x C-x)
Swap the point with the mark. The current cursor position is set to the saved position, and the old cursor position is saved as the mark.

character-search (C-])
A character is read and point is moved to the next occurrence of that character. A negative argument searches for previous occurrences.

character-search-backward (M-C-])
A character is read and point is moved to the previous occurrence of that character. A negative argument searches for subsequent occurrences.

skip-csi-sequence
Read enough characters to consume a multi-key sequence such as those defined for keys like Home and End. Such sequences begin with a Control Sequence Indicator (CSI), usually ESC-[. If this sequence is bound to “", keys producing such sequences will have no effect unless explicitly bound to a readline command, instead of inserting stray characters into the editing buffer. This is unbound by default, but usually bound to ESC-[.

insert-comment (M-#)
Without a numeric argument, the value of the readline comment-begin variable is inserted at the beginning of the current line. If a numeric argument is supplied, this command acts as a toggle: if the characters at the beginning of the line do not match the value of comment-begin, the value is inserted, otherwise the characters in comment-begin are deleted from the beginning of the line. In either case, the line is accepted as if a newline had been typed. The default value of comment-begin makes the current line a shell comment. If a numeric argument causes the comment character to be removed, the line will be executed by the shell.

dump-functions
Print all of the functions and their key bindings to the readline output stream. If a numeric argument is supplied, the output is formatted in such a way that it can be made part of an inputrc file.

dump-variables
Print all of the settable variables and their values to the readline output stream. If a numeric argument is supplied, the output is formatted in such a way that it can be made part of an inputrc file.

dump-macros
Print all of the readline key sequences bound to macros and the strings they output. If a numeric argument is supplied, the output is formatted in such a way that it can be made part of an inputrc file.

emacs-editing-mode (C-e)
When in vi command mode, this causes a switch to emacs editing mode.

vi-editing-mode (M-C-j)
When in emacs editing mode, this causes a switch to vi editing mode.

DEFAULT KEY BINDINGS

The following is a list of the default emacs and vi bindings. Characters with the eighth bit set are written as M-<character>, and are referred to as metafied characters. The printable ASCII characters not mentioned in the list of emacs standard bindings are bound to the self-insert function, which just inserts the given character into the input line. In vi insertion mode, all characters not specifically mentioned are bound to self-insert. Characters assigned to signal generation by stty(1) or the terminal driver, such as C-Z or C-C, retain that function. Upper and lower case metafied characters are bound to the same function in the emacs mode meta keymap. The remaining characters are unbound, which causes readline to ring the bell (subject to the setting of the bell-style variable).

Emacs Mode

Emacs Standard bindings

"C-@"  set-mark
"C-A"  beginning-of-line
"C-B"  backward-char
"C-D"  delete-char
"C-E"  end-of-line
"C-F"  forward-char
"C-G"  abort
"C-H"  backward-delete-char
"C-I"  complete
"C-J"  accept-line
"C-K"  kill-line
"C-L"  clear-screen
"C-M"  accept-line
"C-N"  next-history
"C-P"  previous-history
"C-Q"  quoted-insert
"C-R"  reverse-search-history
"C-S"  forward-search-history
"C-T"  transpose-chars
"C-U"  unix-line-discard
"C-V"  quoted-insert
"C-W"  unix-word-rubout
"C-Y"  yank
"C-]"  character-search
"C-_"  undo
"  " to "/"  self-insert
"0"  to "9"  self-insert
":"  to "~"  self-insert
"C-?"  backward-delete-char

Emacs Meta bindings

"M-C-G"  abort
"M-C-H"  backward-kill-word
"M-C-I"  tab-insert
"M-C-J"  vi-editing-mode
"M-C-L"  clear-display
"M-C-M"  vi-editing-mode
"M-C-R"  revert-line
"M-C-Y"  yank-nth-arg
"M-C-["  complete
"M-C-]"  character-search-backward
"M-space"  set-mark
"M-#"  insert-comment
"M-&"  tilde-expand
"M-*"  insert-completions
"M--"  digit-argument
"M-."  yank-last-arg
"M-0"  digit-argument
"M-1"  digit-argument
"M-2"  digit-argument
"M-3"  digit-argument
"M-4"  digit-argument
"M-5"  digit-argument
"M-6"  digit-argument
"M-7"  digit-argument
"M-8"  digit-argument
"M-9"  digit-argument
"M-<"  beginning-of-history
"M-="  possible-completions
"M->"  end-of-history
"M-?"  possible-completions
"M-B"  backward-word
"M-C"  capitalize-word
"M-D"  kill-word
"M-F"  forward-word
"M-L"  downcase-word
"M-N"  non-incremental-forward-search-history
"M-P"  non-incremental-reverse-search-history
"M-R"  revert-line
"M-T"  transpose-words
"M-U"  upcase-word
"M-Y"  yank-pop
"M-\"  delete-horizontal-space
"M-~"  tilde-expand
"M-C-?"  backward-kill-word
"M-_"  yank-last-arg

Emacs Control-X bindings

"C-XC-G"  abort
"C-XC-R"  re-read-init-file
"C-XC-U"  undo
"C-XC-X"  exchange-point-and-mark
"C-X("  start-kbd-macro
"C-X)"  end-kbd-macro
"C-XE"  call-last-kbd-macro
"C-XC-?"  backward-kill-line

VI Mode bindings

VI Insert Mode functions

"C-D"  vi-eof-maybe
"C-H"  backward-delete-char
"C-I"  complete
"C-J"  accept-line
"C-M"  accept-line
"C-R"  reverse-search-history
"C-S"  forward-search-history
"C-T"  transpose-chars
"C-U"  unix-line-discard
"C-V"  quoted-insert
"C-W"  unix-word-rubout
"C-Y"  yank
"C-["  vi-movement-mode
"C-_"  undo
"  " to "~"  self-insert
"C-?"  backward-delete-char

VI Command Mode functions

"C-D"  vi-eof-maybe
"C-E"  emacs-editing-mode
"C-G"  abort
"C-H"  backward-char
"C-J"  accept-line
"C-K"  kill-line
"C-L"  clear-screen
"C-M"  accept-line
"C-N"  next-history
"C-P"  previous-history
"C-Q"  quoted-insert
"C-R"  reverse-search-history
"C-S"  forward-search-history
"C-T"  transpose-chars
"C-U"  unix-line-discard
"C-V"  quoted-insert
"C-W"  unix-word-rubout
"C-Y"  yank
"C-_"  vi-undo
"  "  forward-char
"#"  insert-comment
"$"  end-of-line
"%"  vi-match
"&"  vi-tilde-expand
"*"  vi-complete
"+"  next-history
","  vi-char-search
"-"  previous-history
"."  vi-redo
"/"  vi-search
"0"  beginning-of-line
"1" to "9"  vi-arg-digit
";"  vi-char-search
"="  vi-complete
"?"  vi-search
"A"  vi-append-eol
"B"  vi-prev-word
"C"  vi-change-to
"D"  vi-delete-to
"E"  vi-end-word
"F"  vi-char-search
"G"  vi-fetch-history
"I"  vi-insert-beg
"N"  vi-search-again
"P"  vi-put
"R"  vi-replace
"S"  vi-subst
"T"  vi-char-search
"U"  revert-line
"W"  vi-next-word
"X"  backward-delete-char
"Y"  vi-yank-to
"\"  vi-complete
"^"  vi-first-print
"_"  vi-yank-arg
"`"  vi-goto-mark
"a"  vi-append-mode
"b"  vi-prev-word
"c"  vi-change-to
"d"  vi-delete-to
"e"  vi-end-word
"f"  vi-char-search
"h"  backward-char
"i"  vi-insertion-mode
"j"  next-history
"k"  prev-history
"l"  forward-char
"m"  vi-set-mark
"n"  vi-search-again
"p"  vi-put
"r"  vi-change-char
"s"  vi-subst
"t"  vi-char-search
"u"  vi-undo
"w"  vi-next-word
"x"  vi-delete
"y"  vi-yank-to
"|"  vi-column
"~"  vi-change-case

SEE ALSO

The Gnu Readline Library, Brian Fox and Chet Ramey
The Gnu History Library, Brian Fox and Chet Ramey
bash(1)

FILES

* ~/.inputrc *
Individual readline initialization file

AUTHORS

Brian Fox, Free Software Foundation
[email protected]

Chet Ramey, Case Western Reserve University
[email protected]

BUG REPORTS

If you find a bug in readline, you should report it. But first, you should make sure that it really is a bug, and that it appears in the latest version of the readline library that you have.

Once you have determined that a bug actually exists, mail a bug report to bug-readline@gnu.org. If you have a fix, you are welcome to mail that as well! Suggestions and `philosophical’ bug reports may be mailed to bug-readline@gnu.org or posted to the Usenet newsgroup gnu.bash.bug.

Comments and bug reports concerning this manual page should be directed to [email protected].

BUGS

It’s too big and too slow.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░